aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore36
-rw-r--r--HOWTO/DTRACE.md6
-rw-r--r--HOWTO/INSTALL-ANDROID.md52
-rw-r--r--HOWTO/INSTALL-CROSS.md53
-rw-r--r--HOWTO/INSTALL-WIN32.md10
-rw-r--r--HOWTO/INSTALL.md996
-rw-r--r--HOWTO/MARKDOWN.md7
-rw-r--r--HOWTO/OTP-PATCH-APPLY.md144
-rw-r--r--Makefile.in125
-rw-r--r--OTP_VERSION1
-rw-r--r--README.md11
-rw-r--r--aclocal.m41914
-rw-r--r--bootstrap/bin/start.bootbin5260 -> 5259 bytes
-rw-r--r--bootstrap/bin/start_clean.bootbin5260 -> 5259 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_a.beambin2288 -> 2500 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_asm.beambin11608 -> 11676 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_block.beambin14436 -> 15284 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_bool.beambin16244 -> 16308 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_bsm.beambin12536 -> 12580 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_clean.beambin9476 -> 11256 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_dead.beambin10212 -> 10212 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_dict.beambin5360 -> 5364 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_disasm.beambin25124 -> 26320 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_except.beambin3472 -> 3564 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_flatten.beambin2900 -> 3108 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_jump.beambin8524 -> 8700 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_opcodes.beambin6812 -> 7072 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_peep.beambin2428 -> 2428 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_receive.beambin6480 -> 6480 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_split.beambin2048 -> 2392 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_trim.beambin7672 -> 7672 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_type.beambin14328 -> 14488 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_utils.beambin13320 -> 13476 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_validator.beambin34556 -> 36240 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_z.beambin2080 -> 2748 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl.beambin30084 -> 32416 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_clauses.beambin2876 -> 2956 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_inline.beambin37776 -> 39100 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_trees.beambin18952 -> 20368 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/compile.beambin37912 -> 39832 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/compiler.app6
-rw-r--r--bootstrap/lib/compiler/ebin/compiler.appup22
-rw-r--r--bootstrap/lib/compiler/ebin/core_lib.beambin5460 -> 6120 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_lint.beambin11644 -> 12820 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_parse.beambin37664 -> 42968 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_pp.beambin12064 -> 13196 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_scan.beambin6628 -> 6672 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/erl_bifs.beambin2168 -> 2180 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/rec_env.beambin4772 -> 4772 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_dsetel.beambin6992 -> 7332 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_fold.beambin47268 -> 50468 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_inline.beambin4276 -> 4272 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_pre_attributes.beambin3348 -> 3348 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_pre_expand.beambin13420 -> 14244 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_codegen.beambin51992 -> 54516 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin51552 -> 54712 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_kernel.beambin43296 -> 47460 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_kernel_pp.beambin11780 -> 12644 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_life.beambin19992 -> 20696 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/application.beambin4572 -> 4524 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/application_controller.beambin31280 -> 32180 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/application_master.beambin6288 -> 6744 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/application_starter.beambin1256 -> 1256 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/auth.beambin6468 -> 6496 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/code.beambin7020 -> 7020 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/code_server.beambin26384 -> 28572 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log.beambin36988 -> 36596 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log_1.beambin24908 -> 25048 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log_server.beambin6404 -> 6668 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/dist_ac.beambin26632 -> 26652 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/dist_util.beambin10512 -> 10512 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/erl_boot_server.beambin5684 -> 6016 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/erl_ddll.beambin2916 -> 2916 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/erl_epmd.beambin7064 -> 7096 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/erl_reply.beambin912 -> 924 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/error_logger.beambin4416 -> 4480 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/erts_debug.beambin4004 -> 4312 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/file.beambin14492 -> 14692 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/file_io_server.beambin14528 -> 14400 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/file_server.beambin5420 -> 5436 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/gen_sctp.beambin3588 -> 3636 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/global.beambin32576 -> 32688 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/global_group.beambin17740 -> 17740 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/group.beambin13532 -> 13540 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/heart.beambin3952 -> 4072 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/hipe_unified_loader.beambin13084 -> 13516 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet.beambin22892 -> 23068 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_tcp.beambin2680 -> 2680 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_tcp_dist.beambin6240 -> 6240 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_udp.beambin1728 -> 1728 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_config.beambin7784 -> 7812 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_db.beambin26688 -> 26708 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_dns.beambin19772 -> 19812 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_gethost_native.beambin10500 -> 10500 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_hosts.beambin2144 -> 2144 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_parse.beambin12944 -> 12944 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_res.beambin15008 -> 15080 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_sctp.beambin2300 -> 2312 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_tcp.beambin2488 -> 2488 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_tcp_dist.beambin6524 -> 6524 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_udp.beambin1916 -> 1916 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/kernel.app5
-rw-r--r--bootstrap/lib/kernel/ebin/kernel.appup18
-rw-r--r--bootstrap/lib/kernel/ebin/kernel.beambin3792 -> 3852 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/kernel_config.beambin2708 -> 2760 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/net_adm.beambin3060 -> 3016 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/net_kernel.beambin22832 -> 22752 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/os.beambin5332 -> 5716 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/pg2.beambin7888 -> 7900 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/ram_file.beambin7016 -> 7032 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/rpc.beambin8616 -> 8616 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/standard_error.beambin3668 -> 3864 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/user.beambin11572 -> 11588 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/user_drv.beambin10304 -> 10356 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/wrap_log_reader.beambin3380 -> 3380 bytes
-rw-r--r--bootstrap/lib/kernel/include/dist.hrl3
-rw-r--r--bootstrap/lib/stdlib/ebin/array.beambin12032 -> 12032 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/base64.beambin4528 -> 4544 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/beam_lib.beambin18104 -> 18188 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/binary.beambin3644 -> 3644 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/c.beambin13872 -> 13956 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/calendar.beambin5176 -> 5176 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets.beambin53524 -> 53736 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_server.beambin7064 -> 7024 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_utils.beambin28824 -> 28880 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_v8.beambin27588 -> 27616 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_v9.beambin50164 -> 51024 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dict.beambin9132 -> 9216 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/digraph.beambin8308 -> 8308 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/digraph_utils.beambin6848 -> 6852 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/edlin.beambin9956 -> 9968 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/edlin_expand.beambin3096 -> 3168 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/epp.beambin27416 -> 28540 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_bits.beambin2552 -> 2552 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_compile.beambin4880 -> 7324 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_eval.beambin22692 -> 30744 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_expand_records.beambin21788 -> 22712 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_internal.beambin5176 -> 5236 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_lint.beambin83860 -> 89824 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_parse.beambin69084 -> 75628 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_pp.beambin25120 -> 26984 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_scan.beambin30132 -> 30044 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_tar.beambin15336 -> 17264 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/error_logger_file_h.beambin5128 -> 5128 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/error_logger_tty_h.beambin5008 -> 5056 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/escript.beambin17444 -> 17412 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/ets.beambin21812 -> 22292 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/eval_bits.beambin8068 -> 8136 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/file_sorter.beambin30752 -> 30804 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/filelib.beambin7932 -> 8072 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/filename.beambin12436 -> 12436 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gb_sets.beambin8284 -> 8284 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gb_trees.beambin4992 -> 4992 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen.beambin4048 -> 4048 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen_event.beambin18264 -> 18144 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen_fsm.beambin15628 -> 15724 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen_server.beambin17404 -> 18184 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io.beambin6836 -> 6696 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib.beambin9472 -> 9856 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib_format.beambin12408 -> 12424 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib_fread.beambin7404 -> 7404 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib_pretty.beambin14124 -> 15248 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/lib.beambin9652 -> 9652 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/lists.beambin29636 -> 29712 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/log_mf_h.beambin2640 -> 2672 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/maps.beambin0 -> 2016 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/ms_transform.beambin20236 -> 20388 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/orddict.beambin2748 -> 2812 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/otp_internal.beambin10140 -> 10136 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/pg.beambin2064 -> 2096 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/pool.beambin3848 -> 3848 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/proc_lib.beambin9968 -> 9812 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/proplists.beambin4948 -> 4948 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/qlc.beambin70168 -> 70184 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/qlc_pt.beambin73056 -> 73720 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/queue.beambin6184 -> 6184 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/re.beambin12928 -> 13876 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/sets.beambin7096 -> 7096 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/shell.beambin29752 -> 30252 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/slave.beambin4424 -> 5200 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/sofs.beambin40832 -> 40820 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/stdlib.app8
-rw-r--r--bootstrap/lib/stdlib/ebin/stdlib.appup20
-rw-r--r--bootstrap/lib/stdlib/ebin/supervisor.beambin23544 -> 23432 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/supervisor_bridge.beambin2760 -> 2824 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/sys.beambin7556 -> 8372 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/timer.beambin5476 -> 5476 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/unicode.beambin11584 -> 11608 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/win32reg.beambin5652 -> 5652 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/zip.beambin26848 -> 26848 bytes
-rw-r--r--configure.in49
-rw-r--r--erts/Makefile.in5
-rw-r--r--erts/aclocal.m496
-rw-r--r--erts/autoconf/vxworks/sed.general1
-rw-r--r--erts/configure.in406
-rw-r--r--erts/doc/src/Makefile3
-rw-r--r--erts/doc/src/absform.xml37
-rw-r--r--erts/doc/src/alt_dist.xml4
-rw-r--r--erts/doc/src/book.xml4
-rw-r--r--erts/doc/src/communication.xml2
-rw-r--r--erts/doc/src/crash_dump.xml38
-rw-r--r--erts/doc/src/driver.xml4
-rw-r--r--erts/doc/src/driver_entry.xml14
-rw-r--r--erts/doc/src/epmd.xml45
-rw-r--r--erts/doc/src/erl.xml162
-rw-r--r--erts/doc/src/erl_dist_protocol.xml2
-rw-r--r--erts/doc/src/erl_driver.xml78
-rw-r--r--erts/doc/src/erl_ext_dist.xml36
-rw-r--r--erts/doc/src/erl_nif.xml136
-rw-r--r--erts/doc/src/erl_prim_loader.xml20
-rw-r--r--erts/doc/src/erlang.xml426
-rw-r--r--erts/doc/src/erlc.xml14
-rw-r--r--erts/doc/src/erlsrv.xml4
-rw-r--r--erts/doc/src/erts_alloc.xml37
-rw-r--r--erts/doc/src/escript.xml44
-rw-r--r--erts/doc/src/fascicules.xml2
-rw-r--r--erts/doc/src/inet_cfg.xml4
-rw-r--r--erts/doc/src/init.xml4
-rw-r--r--erts/doc/src/match_spec.xml4
-rw-r--r--erts/doc/src/notes.xml1559
-rw-r--r--erts/doc/src/notes_history.xml4
-rw-r--r--erts/doc/src/part.xml3
-rw-r--r--erts/doc/src/part_notes.xml4
-rw-r--r--erts/doc/src/part_notes_history.xml4
-rw-r--r--erts/doc/src/ref_man.xml2
-rw-r--r--erts/doc/src/run_erl.xml6
-rw-r--r--erts/doc/src/specs.xml2
-rw-r--r--erts/doc/src/start.xml4
-rw-r--r--erts/doc/src/start_erl.xml4
-rw-r--r--erts/doc/src/time_correction.xml274
-rw-r--r--erts/doc/src/tty.xml4
-rw-r--r--erts/doc/src/werl.xml4
-rw-r--r--erts/doc/src/zlib.xml36
-rw-r--r--erts/emulator/Makefile.in141
-rw-r--r--erts/emulator/beam/atom.names14
-rw-r--r--erts/emulator/beam/beam_bif_load.c158
-rw-r--r--erts/emulator/beam/beam_bp.c8
-rw-r--r--erts/emulator/beam/beam_debug.c5
-rw-r--r--erts/emulator/beam/beam_emu.c623
-rw-r--r--erts/emulator/beam/beam_load.c81
-rw-r--r--erts/emulator/beam/beam_load.h1
-rw-r--r--erts/emulator/beam/beam_ranges.c2
-rw-r--r--erts/emulator/beam/bif.c133
-rw-r--r--erts/emulator/beam/bif.h118
-rw-r--r--erts/emulator/beam/bif.tab38
-rw-r--r--erts/emulator/beam/big.c47
-rw-r--r--erts/emulator/beam/big.h6
-rw-r--r--erts/emulator/beam/binary.c1144
-rw-r--r--erts/emulator/beam/break.c12
-rw-r--r--erts/emulator/beam/code_ix.c3
-rw-r--r--erts/emulator/beam/copy.c35
-rw-r--r--erts/emulator/beam/dist.c64
-rw-r--r--erts/emulator/beam/dist.h7
-rw-r--r--erts/emulator/beam/erl_alloc.c150
-rw-r--r--erts/emulator/beam/erl_alloc.h6
-rw-r--r--erts/emulator/beam/erl_alloc.types27
-rw-r--r--erts/emulator/beam/erl_alloc_util.c336
-rw-r--r--erts/emulator/beam/erl_alloc_util.h13
-rw-r--r--erts/emulator/beam/erl_async.c41
-rw-r--r--erts/emulator/beam/erl_bif_binary.c27
-rw-r--r--erts/emulator/beam/erl_bif_ddll.c32
-rw-r--r--erts/emulator/beam/erl_bif_guard.c23
-rw-r--r--[-rwxr-xr-x]erts/emulator/beam/erl_bif_info.c190
-rw-r--r--erts/emulator/beam/erl_bif_lists.c6
-rw-r--r--erts/emulator/beam/erl_bif_op.c12
-rw-r--r--erts/emulator/beam/erl_bif_port.c97
-rw-r--r--erts/emulator/beam/erl_bif_re.c471
-rw-r--r--erts/emulator/beam/erl_bif_timer.c2
-rw-r--r--erts/emulator/beam/erl_binary.h33
-rw-r--r--erts/emulator/beam/erl_bits.c5
-rw-r--r--erts/emulator/beam/erl_cpu_topology.c2
-rw-r--r--erts/emulator/beam/erl_db.c86
-rw-r--r--erts/emulator/beam/erl_db_hash.c2
-rw-r--r--erts/emulator/beam/erl_db_hash.h5
-rw-r--r--erts/emulator/beam/erl_db_tree.c4
-rw-r--r--erts/emulator/beam/erl_db_util.c20
-rw-r--r--erts/emulator/beam/erl_debug.c6
-rw-r--r--erts/emulator/beam/erl_driver.h58
-rw-r--r--erts/emulator/beam/erl_drv_nif.h8
-rw-r--r--erts/emulator/beam/erl_drv_thread.c5
-rw-r--r--erts/emulator/beam/erl_gc.c79
-rw-r--r--erts/emulator/beam/erl_gc.h37
-rw-r--r--erts/emulator/beam/erl_init.c384
-rw-r--r--erts/emulator/beam/erl_lock_check.c102
-rw-r--r--erts/emulator/beam/erl_lock_check.h26
-rw-r--r--erts/emulator/beam/erl_lock_count.c163
-rw-r--r--erts/emulator/beam/erl_lock_count.h26
-rw-r--r--erts/emulator/beam/erl_map.c837
-rw-r--r--erts/emulator/beam/erl_map.h72
-rw-r--r--erts/emulator/beam/erl_message.c59
-rw-r--r--erts/emulator/beam/erl_message.h5
-rw-r--r--erts/emulator/beam/erl_nif.c860
-rw-r--r--erts/emulator/beam/erl_nif.h81
-rw-r--r--erts/emulator/beam/erl_nif_api_funcs.h58
-rw-r--r--erts/emulator/beam/erl_port_task.c110
-rw-r--r--erts/emulator/beam/erl_port_task.h12
-rw-r--r--erts/emulator/beam/erl_printf_term.c52
-rw-r--r--erts/emulator/beam/erl_process.c3715
-rw-r--r--erts/emulator/beam/erl_process.h363
-rw-r--r--erts/emulator/beam/erl_process_dict.c4
-rw-r--r--erts/emulator/beam/erl_process_lock.c64
-rw-r--r--erts/emulator/beam/erl_process_lock.h25
-rw-r--r--erts/emulator/beam/erl_ptab.c103
-rw-r--r--erts/emulator/beam/erl_ptab.h6
-rw-r--r--erts/emulator/beam/erl_smp.h307
-rw-r--r--erts/emulator/beam/erl_term.c6
-rw-r--r--erts/emulator/beam/erl_term.h55
-rw-r--r--erts/emulator/beam/erl_thr_progress.c55
-rw-r--r--erts/emulator/beam/erl_thr_progress.h60
-rw-r--r--erts/emulator/beam/erl_threads.h807
-rw-r--r--erts/emulator/beam/erl_trace.c33
-rw-r--r--erts/emulator/beam/erl_trace.h1
-rw-r--r--erts/emulator/beam/erl_unicode.c167
-rw-r--r--erts/emulator/beam/erl_utils.h92
-rw-r--r--erts/emulator/beam/erl_vm.h4
-rw-r--r--erts/emulator/beam/erl_zlib.c40
-rw-r--r--erts/emulator/beam/erl_zlib.h6
-rw-r--r--erts/emulator/beam/external.c1179
-rw-r--r--erts/emulator/beam/external.h3
-rw-r--r--[-rwxr-xr-x]erts/emulator/beam/global.h433
-rw-r--r--erts/emulator/beam/io.c216
-rw-r--r--erts/emulator/beam/ops.tab101
-rw-r--r--erts/emulator/beam/sys.h33
-rw-r--r--erts/emulator/beam/utils.c902
-rw-r--r--erts/emulator/drivers/common/efile_drv.c82
-rw-r--r--erts/emulator/drivers/common/erl_efile.h3
-rw-r--r--erts/emulator/drivers/common/gzio.c74
-rw-r--r--erts/emulator/drivers/common/gzio.h16
-rw-r--r--erts/emulator/drivers/common/gzio_zutil.h9
-rw-r--r--erts/emulator/drivers/common/inet_drv.c942
-rw-r--r--erts/emulator/drivers/common/zlib_drv.c3
-rw-r--r--erts/emulator/drivers/ose/ose_efile.c1124
-rw-r--r--erts/emulator/drivers/ose/ose_signal_drv.c896
-rw-r--r--erts/emulator/drivers/ose/ttsl_drv.c68
-rw-r--r--erts/emulator/drivers/unix/multi_drv.c2
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c24
-rw-r--r--erts/emulator/drivers/win32/win_efile.c781
-rw-r--r--erts/emulator/hipe/hipe_amd64_bifs.m45
-rw-r--r--erts/emulator/hipe/hipe_arm_bifs.m473
-rw-r--r--erts/emulator/hipe/hipe_arm_glue.S41
-rw-r--r--erts/emulator/hipe/hipe_bif0.c172
-rw-r--r--erts/emulator/hipe/hipe_bif0.tab3
-rw-r--r--erts/emulator/hipe/hipe_bif2.c11
-rw-r--r--erts/emulator/hipe/hipe_bif2.tab1
-rw-r--r--erts/emulator/hipe/hipe_bif_list.m424
-rw-r--r--erts/emulator/hipe/hipe_debug.c1
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c44
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.h3
-rw-r--r--erts/emulator/hipe/hipe_native_bif.c17
-rw-r--r--erts/emulator/hipe/hipe_risc_glue.h8
-rw-r--r--erts/emulator/hipe/hipe_x86_glue.h8
-rw-r--r--erts/emulator/hipe/hipe_x86_signal.c6
-rw-r--r--erts/emulator/internal_doc/CarrierMigration.md285
-rw-r--r--erts/emulator/internal_doc/CodeLoading.md186
-rw-r--r--erts/emulator/internal_doc/DelayedDealloc.md175
-rw-r--r--erts/emulator/internal_doc/PTables.md356
-rw-r--r--erts/emulator/internal_doc/PortSignals.md267
-rw-r--r--erts/emulator/internal_doc/ProcessManagementOptimizations.md172
-rw-r--r--erts/emulator/internal_doc/SuperCarrier.md191
-rw-r--r--erts/emulator/internal_doc/ThreadProgress.md308
-rw-r--r--erts/emulator/internal_doc/Tracing.md220
-rw-r--r--erts/emulator/internal_doc/dec.erl1
-rw-r--r--erts/emulator/pcre/README.pcre_update.md733
-rw-r--r--erts/emulator/pcre/dftables.c (renamed from erts/emulator/pcre/make_latin1_table.c)57
-rw-r--r--erts/emulator/pcre/local_config.h4
-rw-r--r--erts/emulator/pcre/pcre-7.6.tar.bz2bin802829 -> 0 bytes
-rw-r--r--erts/emulator/pcre/pcre-8.33.tar.bz2bin0 -> 1440869 bytes
-rw-r--r--erts/emulator/pcre/pcre-8.33_1370.diff60
-rw-r--r--erts/emulator/pcre/pcre.h653
-rw-r--r--erts/emulator/pcre/pcre.mk119
-rw-r--r--erts/emulator/pcre/pcre_byte_order.c324
-rw-r--r--erts/emulator/pcre/pcre_chartables.c5
-rw-r--r--erts/emulator/pcre/pcre_compile.c6065
-rw-r--r--erts/emulator/pcre/pcre_config.c81
-rw-r--r--erts/emulator/pcre/pcre_dfa_exec.c2115
-rw-r--r--erts/emulator/pcre/pcre_exec.c6133
-rw-r--r--erts/emulator/pcre/pcre_fullinfo.c122
-rw-r--r--erts/emulator/pcre/pcre_get.c382
-rw-r--r--erts/emulator/pcre/pcre_globals.c39
-rw-r--r--erts/emulator/pcre/pcre_info.c94
-rw-r--r--erts/emulator/pcre/pcre_internal.h2550
-rw-r--r--erts/emulator/pcre/pcre_jit_compile.c9789
-rw-r--r--erts/emulator/pcre/pcre_latin_1_table.c6
-rw-r--r--erts/emulator/pcre/pcre_make_latin1_default.c367
-rw-r--r--erts/emulator/pcre/pcre_maketables.c25
-rw-r--r--erts/emulator/pcre/pcre_newline.c118
-rw-r--r--erts/emulator/pcre/pcre_ord2utf8.c33
-rw-r--r--erts/emulator/pcre/pcre_refcount.c23
-rw-r--r--erts/emulator/pcre/pcre_string_utils.c211
-rw-r--r--erts/emulator/pcre/pcre_study.c1307
-rw-r--r--erts/emulator/pcre/pcre_tables.c792
-rw-r--r--erts/emulator/pcre/pcre_try_flipped.c138
-rw-r--r--erts/emulator/pcre/pcre_ucd.c3298
-rw-r--r--erts/emulator/pcre/pcre_ucp_searchfuncs.c181
-rw-r--r--erts/emulator/pcre/pcre_valid_utf8.c243
-rw-r--r--erts/emulator/pcre/pcre_version.c19
-rw-r--r--erts/emulator/pcre/pcre_xclass.c104
-rw-r--r--erts/emulator/pcre/ucp.h82
-rw-r--r--erts/emulator/pcre/ucpinternal.h94
-rw-r--r--erts/emulator/pcre/ucptable.h3088
-rw-r--r--erts/emulator/sys/common/erl_check_io.c741
-rw-r--r--erts/emulator/sys/common/erl_check_io.h45
-rw-r--r--erts/emulator/sys/common/erl_poll.c2
-rw-r--r--erts/emulator/sys/common/erl_poll.h25
-rw-r--r--erts/emulator/sys/common/erl_sys_common_misc.c10
-rw-r--r--erts/emulator/sys/ose/beam.lmconf26
-rw-r--r--erts/emulator/sys/ose/driver_int.h41
-rw-r--r--erts/emulator/sys/ose/erl_main.c53
-rw-r--r--erts/emulator/sys/ose/erl_ose_sys.h353
-rw-r--r--erts/emulator/sys/ose/erl_ose_sys_ddll.c126
-rw-r--r--erts/emulator/sys/ose/erl_poll.c780
-rw-r--r--erts/emulator/sys/ose/erts.sig17
-rw-r--r--erts/emulator/sys/ose/gcc_4.4.3_lm_ppc.lcf182
-rw-r--r--erts/emulator/sys/ose/gcc_4.6.3_lm_ppc.lcf242
-rw-r--r--erts/emulator/sys/ose/sys.c1846
-rw-r--r--erts/emulator/sys/ose/sys_float.c844
-rw-r--r--erts/emulator/sys/ose/sys_time.c56
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c39
-rw-r--r--erts/emulator/sys/unix/erl_unix_sys.h32
-rw-r--r--erts/emulator/sys/unix/erl_unix_sys_ddll.c6
-rw-r--r--erts/emulator/sys/unix/sys.c104
-rw-r--r--erts/emulator/sys/unix/sys_float.c2
-rw-r--r--erts/emulator/sys/win32/erl_poll.c2
-rw-r--r--erts/emulator/sys/win32/erl_win32_sys_ddll.c32
-rw-r--r--erts/emulator/sys/win32/erl_win_dyn_driver.h4
-rw-r--r--erts/emulator/sys/win32/erl_win_sys.h28
-rw-r--r--[-rwxr-xr-x]erts/emulator/sys/win32/sys.c422
-rw-r--r--erts/emulator/test/Makefile2
-rw-r--r--erts/emulator/test/a_SUITE.erl14
-rw-r--r--erts/emulator/test/async_ports_SUITE.erl118
-rw-r--r--erts/emulator/test/async_ports_SUITE_data/Makefile.src15
-rw-r--r--erts/emulator/test/async_ports_SUITE_data/cport.c81
-rw-r--r--erts/emulator/test/big_SUITE.erl14
-rw-r--r--erts/emulator/test/binary_SUITE.erl517
-rw-r--r--erts/emulator/test/busy_port_SUITE.erl6
-rw-r--r--erts/emulator/test/code_parallel_load_SUITE.erl36
-rw-r--r--erts/emulator/test/driver_SUITE.erl181
-rw-r--r--erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c4
-rw-r--r--erts/emulator/test/driver_SUITE_data/otp_9302_drv.c29
-rw-r--r--erts/emulator/test/driver_SUITE_data/smaller_major_vsn_drv.c4
-rw-r--r--erts/emulator/test/driver_SUITE_data/sys_info_base_drv.c13
-rw-r--r--erts/emulator/test/driver_SUITE_data/sys_info_curr_drv.c11
-rw-r--r--erts/emulator/test/driver_SUITE_data/sys_info_prev_drv.c13
-rw-r--r--erts/emulator/test/erts_debug_SUITE.erl6
-rw-r--r--erts/emulator/test/exception_SUITE.erl11
-rw-r--r--erts/emulator/test/float_SUITE_data/fp_drv.c17
-rw-r--r--erts/emulator/test/fun_SUITE.erl33
-rw-r--r--erts/emulator/test/hash_SUITE.erl1
-rw-r--r--erts/emulator/test/map_SUITE.erl1135
-rw-r--r--erts/emulator/test/match_spec_SUITE.erl23
-rw-r--r--erts/emulator/test/mtx_SUITE_data/Makefile.src4
-rw-r--r--erts/emulator/test/nif_SUITE.erl295
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_SUITE.c292
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_mod.c53
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_mod.h6
-rw-r--r--erts/emulator/test/num_bif_SUITE.erl38
-rw-r--r--erts/emulator/test/port_SUITE.erl135
-rw-r--r--erts/emulator/test/port_bif_SUITE.erl27
-rw-r--r--erts/emulator/test/process_SUITE.erl219
-rw-r--r--erts/emulator/test/scheduler_SUITE.erl97
-rw-r--r--erts/emulator/test/send_term_SUITE.erl19
-rw-r--r--erts/emulator/test/send_term_SUITE_data/send_term_drv.c72
-rw-r--r--erts/emulator/test/system_info_SUITE.erl1
-rw-r--r--erts/emulator/test/trace_SUITE.erl22
-rw-r--r--erts/emulator/test/trace_call_time_SUITE.erl96
-rw-r--r--erts/emulator/test/tuple_SUITE.erl95
-rw-r--r--erts/emulator/test/z_SUITE.erl28
-rwxr-xr-xerts/emulator/utils/beam_makeops23
-rwxr-xr-xerts/emulator/utils/gen_git_version6
-rwxr-xr-xerts/emulator/utils/make_compiler_flags2
-rwxr-xr-xerts/emulator/utils/make_driver_tab99
-rwxr-xr-xerts/emulator/utils/make_version6
-rw-r--r--erts/emulator/zlib/adler32.c104
-rw-r--r--erts/emulator/zlib/compress.c9
-rw-r--r--erts/emulator/zlib/crc32.c121
-rw-r--r--erts/emulator/zlib/crc32.h4
-rw-r--r--erts/emulator/zlib/deflate.c521
-rw-r--r--erts/emulator/zlib/deflate.h47
-rw-r--r--erts/emulator/zlib/example.c570
-rw-r--r--erts/emulator/zlib/gzguts.h209
-rw-r--r--erts/emulator/zlib/inffast.c86
-rw-r--r--erts/emulator/zlib/inffast.h6
-rw-r--r--erts/emulator/zlib/inffixed.h6
-rw-r--r--erts/emulator/zlib/inflate.c418
-rw-r--r--erts/emulator/zlib/inflate.h33
-rw-r--r--erts/emulator/zlib/inftrees.c95
-rw-r--r--erts/emulator/zlib/inftrees.h29
-rw-r--r--erts/emulator/zlib/trees.c147
-rw-r--r--erts/emulator/zlib/trees.h4
-rw-r--r--erts/emulator/zlib/uncompr.c8
-rw-r--r--erts/emulator/zlib/zconf.h291
-rw-r--r--erts/emulator/zlib/zlib.h1379
-rw-r--r--erts/emulator/zlib/zutil.c68
-rw-r--r--erts/emulator/zlib/zutil.h145
-rw-r--r--erts/epmd/src/Makefile.in26
-rw-r--r--erts/epmd/src/epmd.c34
-rw-r--r--erts/epmd/src/epmd_cli.c4
-rw-r--r--erts/epmd/src/epmd_int.h24
-rw-r--r--erts/epmd/src/epmd_srv.c56
-rw-r--r--erts/epmd/test/epmd_SUITE.erl23
-rw-r--r--erts/etc/common/Makefile.in141
-rw-r--r--erts/etc/common/ct_run.c84
-rw-r--r--erts/etc/common/dialyzer.c104
-rw-r--r--erts/etc/common/erlc.c384
-rw-r--r--erts/etc/common/erlexec.c97
-rw-r--r--erts/etc/common/escript.c247
-rw-r--r--erts/etc/common/heart.c117
-rw-r--r--erts/etc/common/inet_gethost.c2
-rw-r--r--erts/etc/common/run_erl_common.c691
-rw-r--r--erts/etc/common/run_erl_common.h96
-rw-r--r--erts/etc/common/run_erl_vsn.h (renamed from erts/etc/unix/run_erl.h)9
-rw-r--r--erts/etc/common/safe_string.c (renamed from erts/etc/unix/safe_string.c)13
-rw-r--r--erts/etc/common/safe_string.h (renamed from erts/etc/unix/safe_string.h)13
-rw-r--r--erts/etc/common/to_erl_common.c716
-rw-r--r--erts/etc/common/to_erl_common.h28
-rw-r--r--erts/etc/common/typer.c97
-rw-r--r--erts/etc/ose/etc.lmconf20
-rw-r--r--erts/etc/ose/run_erl.c663
-rw-r--r--erts/etc/ose/run_erl.h29
-rw-r--r--erts/etc/ose/run_erl_main.c79
-rw-r--r--erts/etc/unix/cerl.src7
-rw-r--r--erts/etc/unix/etp-commands.in912
-rw-r--r--erts/etc/unix/run_erl.c605
-rw-r--r--erts/etc/unix/to_erl.c589
-rw-r--r--erts/etc/win32/Install.c132
-rw-r--r--erts/etc/win32/erl.c197
-rw-r--r--erts/etc/win32/erlang.icobin1398 -> 99678 bytes
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_global.h10
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_interactive.c669
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_interactive.h2
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_main.c2
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_registry.c249
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_registry.h16
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_service.c403
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_service.h2
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_util.c100
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_util.h18
-rw-r--r--erts/etc/win32/init_file.c32
-rw-r--r--erts/etc/win32/init_file.h4
-rw-r--r--erts/etc/win32/start_erl.c337
-rw-r--r--erts/etc/win32/win_erlexec.c209
-rw-r--r--erts/include/erl_native_features_config.h.in21
-rw-r--r--erts/include/internal/ethr_mutex.h8
-rw-r--r--erts/include/internal/ethread.h135
-rw-r--r--erts/include/internal/ethread_header_config.h.in2
-rw-r--r--erts/include/internal/ethread_inline.h49
-rw-r--r--erts/include/internal/libatomic_ops/ethr_atomic.h343
-rw-r--r--erts/include/internal/libatomic_ops/ethr_dw_atomic.h567
-rw-r--r--erts/include/internal/libatomic_ops/ethread.h3
-rw-r--r--erts/include/internal/ose/ethr_event.h113
-rw-r--r--erts/include/internal/ppc32/atomic.h146
-rw-r--r--erts/include/internal/win/ethr_membar.h8
-rw-r--r--erts/lib_src/Makefile.in2
-rw-r--r--erts/lib_src/common/erl_misc_utils.c19
-rw-r--r--erts/lib_src/common/ethr_aux.c21
-rw-r--r--erts/lib_src/common/ethr_mutex.c10
-rw-r--r--erts/lib_src/ose/ethr_event.c219
-rw-r--r--erts/lib_src/ose/ethread.c832
-rw-r--r--erts/lib_src/pthread/ethread.c8
-rw-r--r--erts/lib_src/win/ethread.c2
-rw-r--r--erts/preloaded/ebin/erl_prim_loader.beambin54696 -> 56292 bytes
-rw-r--r--erts/preloaded/ebin/erlang.beambin94264 -> 97956 bytes
-rw-r--r--erts/preloaded/ebin/erts_internal.beambin3272 -> 4164 bytes
-rw-r--r--erts/preloaded/ebin/init.beambin48652 -> 48808 bytes
-rw-r--r--erts/preloaded/ebin/otp_ring0.beambin1464 -> 1468 bytes
-rw-r--r--erts/preloaded/ebin/prim_eval.beambin1340 -> 1340 bytes
-rw-r--r--erts/preloaded/ebin/prim_file.beambin44264 -> 44904 bytes
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin72280 -> 73128 bytes
-rw-r--r--erts/preloaded/ebin/prim_zip.beambin23428 -> 23440 bytes
-rw-r--r--erts/preloaded/ebin/zlib.beambin12800 -> 13188 bytes
-rw-r--r--erts/preloaded/src/add_abstract_code14
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl53
-rw-r--r--erts/preloaded/src/erlang.erl194
-rw-r--r--erts/preloaded/src/erts.app.src2
-rw-r--r--erts/preloaded/src/erts_internal.erl41
-rw-r--r--erts/preloaded/src/init.erl9
-rw-r--r--erts/preloaded/src/prim_file.erl23
-rw-r--r--erts/preloaded/src/prim_inet.erl29
-rw-r--r--erts/preloaded/src/prim_zip.erl4
-rw-r--r--erts/preloaded/src/zlib.erl10
-rw-r--r--erts/start_scripts/Makefile2
-rw-r--r--erts/start_scripts/no_dot_erlang.rel.src4
-rw-r--r--erts/start_scripts/start_all_example.rel.src4
-rw-r--r--erts/start_scripts/start_clean.rel.src4
-rw-r--r--erts/start_scripts/start_sasl.rel.src4
-rw-r--r--erts/test/Makefile5
-rw-r--r--erts/test/erl_print_SUITE_data/Makefile.src2
-rw-r--r--erts/test/erlc_SUITE.erl8
-rw-r--r--erts/test/erlexec_SUITE.erl6
-rw-r--r--erts/test/ethread_SUITE_data/Makefile.src4
-rw-r--r--erts/test/ethread_SUITE_data/ethread_tests.c2
-rw-r--r--erts/test/nt_SUITE.erl4
-rw-r--r--erts/test/otp_SUITE.erl208
-rw-r--r--erts/test/upgrade_SUITE.erl448
-rw-r--r--erts/test/upgrade_SUITE_data/start.src36
-rw-r--r--erts/test/z_SUITE.erl4
-rw-r--r--erts/vsn.mk3
-rw-r--r--lib/Makefile41
-rw-r--r--lib/appmon/AUTHORS5
-rw-r--r--lib/appmon/BUGS_AND_FIXES5
-rw-r--r--lib/appmon/doc/src/Makefile120
-rw-r--r--lib/appmon/doc/src/app_win.gifbin4210 -> 0 bytes
-rw-r--r--lib/appmon/doc/src/app_win.ps680
-rw-r--r--lib/appmon/doc/src/appmon.xml67
-rw-r--r--lib/appmon/doc/src/appmon_chapter.xml328
-rw-r--r--lib/appmon/doc/src/book.xml47
-rw-r--r--lib/appmon/doc/src/listbox_win.gifbin4437 -> 0 bytes
-rw-r--r--lib/appmon/doc/src/listbox_win.ps741
-rw-r--r--lib/appmon/doc/src/main_win.gifbin3011 -> 0 bytes
-rw-r--r--lib/appmon/doc/src/main_win.ps691
-rw-r--r--lib/appmon/doc/src/note.gifbin1539 -> 0 bytes
-rw-r--r--lib/appmon/doc/src/notes.xml300
-rw-r--r--lib/appmon/doc/src/part_notes.xml39
-rw-r--r--lib/appmon/doc/src/pinfo_win.gifbin7351 -> 0 bytes
-rw-r--r--lib/appmon/doc/src/pinfo_win.ps1353
-rw-r--r--lib/appmon/doc/src/warning.gifbin1498 -> 0 bytes
-rw-r--r--lib/appmon/info5
-rw-r--r--lib/appmon/priv/Makefile65
-rw-r--r--lib/appmon/priv/appmon.gifbin125 -> 0 bytes
-rw-r--r--lib/appmon/priv/appmon.tool24
-rw-r--r--lib/appmon/priv/appmon_help.txt154
-rw-r--r--lib/appmon/priv/blank.html6
-rw-r--r--lib/appmon/priv/info_frames.html9
-rw-r--r--lib/appmon/priv/main_frame.html9
-rw-r--r--lib/appmon/priv/start_info.html31
-rw-r--r--lib/appmon/src/Makefile103
-rw-r--r--lib/appmon/src/appmon.app.src24
-rw-r--r--lib/appmon/src/appmon.appup.src18
-rw-r--r--lib/appmon/src/appmon.erl1081
-rw-r--r--lib/appmon/src/appmon_a.erl1122
-rw-r--r--lib/appmon/src/appmon_dg.erl205
-rw-r--r--lib/appmon/src/appmon_dg.hrl45
-rw-r--r--lib/appmon/src/appmon_lb.erl696
-rw-r--r--lib/appmon/src/appmon_place.erl192
-rw-r--r--lib/appmon/src/appmon_txt.erl307
-rw-r--r--lib/appmon/src/appmon_web.erl1031
-rw-r--r--lib/appmon/src/process_info.erl662
-rw-r--r--lib/appmon/vsn.mk1
-rw-r--r--lib/asn1/Makefile4
-rw-r--r--lib/asn1/c_src/Makefile45
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c128
-rw-r--r--lib/asn1/doc/src/asn1_spec.xmlsrc4
-rw-r--r--lib/asn1/doc/src/asn1_ug.xml932
-rw-r--r--lib/asn1/doc/src/asn1ct.xml34
-rw-r--r--lib/asn1/doc/src/asn1rt.xml32
-rw-r--r--lib/asn1/doc/src/book.xml4
-rw-r--r--lib/asn1/doc/src/fascicules.xml2
-rw-r--r--lib/asn1/doc/src/notes.xml196
-rw-r--r--lib/asn1/doc/src/part.xml4
-rw-r--r--lib/asn1/doc/src/ref_man.xml4
-rw-r--r--lib/asn1/src/Makefile1
-rw-r--r--lib/asn1/src/asn1.app.src3
-rw-r--r--lib/asn1/src/asn1.appup.src30
-rw-r--r--lib/asn1/src/asn1_records.hrl12
-rw-r--r--lib/asn1/src/asn1ct.erl77
-rw-r--r--lib/asn1/src/asn1ct_check.erl725
-rw-r--r--lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl71
-rw-r--r--lib/asn1/src/asn1ct_constructed_per.erl181
-rw-r--r--lib/asn1/src/asn1ct_func.erl14
-rw-r--r--lib/asn1/src/asn1ct_gen.erl418
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl428
-rw-r--r--lib/asn1/src/asn1ct_gen_check.erl271
-rw-r--r--lib/asn1/src/asn1ct_gen_per.erl38
-rw-r--r--lib/asn1/src/asn1ct_imm.erl959
-rw-r--r--lib/asn1/src/asn1ct_parser2.erl23
-rw-r--r--lib/asn1/src/asn1ct_table.erl34
-rw-r--r--lib/asn1/src/asn1ct_tok.erl4
-rw-r--r--lib/asn1/src/asn1ct_value.erl9
-rw-r--r--lib/asn1/src/asn1rt.erl3
-rw-r--r--lib/asn1/src/asn1rt_nif.erl2
-rw-r--r--lib/asn1/src/asn1rtt_ber.erl210
-rw-r--r--lib/asn1/src/asn1rtt_check.erl300
-rw-r--r--lib/asn1/src/asn1rtt_ext.erl2
-rw-r--r--lib/asn1/src/asn1rtt_per_common.erl50
-rw-r--r--lib/asn1/test/asn1_SUITE.erl108
-rw-r--r--lib/asn1/test/asn1_SUITE_data/Constraints.py7
-rw-r--r--lib/asn1/test/asn1_SUITE_data/Constructed.asn6
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn14
-rw-r--r--lib/asn1/test/asn1_SUITE_data/Default.asn23
-rw-r--r--lib/asn1/test/asn1_SUITE_data/DoubleEllipses.asn31
-rw-r--r--lib/asn1/test/asn1_SUITE_data/EnumExt.asn12
-rw-r--r--lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn14
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn114
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn17
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn14
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObj.asn45
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ParamBasic.asn122
-rw-r--r--lib/asn1/test/asn1_SUITE_data/SeqPrim.asn17
-rw-r--r--lib/asn1/test/asn1_SUITE_data/Set.py4
-rw-r--r--lib/asn1/test/asn1_SUITE_data/TAGDEFAULT-AUTOMATIC.asn25
-rw-r--r--lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl36
-rw-r--r--lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl4
-rw-r--r--lib/asn1/test/asn1_app_test.erl4
-rw-r--r--lib/asn1/test/asn1_appup_test.erl359
-rw-r--r--lib/asn1/test/asn1_test_lib.erl106
-rw-r--r--lib/asn1/test/ber_decode_error.erl18
-rw-r--r--lib/asn1/test/error_SUITE.erl123
-rw-r--r--lib/asn1/test/h323test.erl14
-rw-r--r--lib/asn1/test/testChoExtension.erl4
-rw-r--r--lib/asn1/test/testChoExternal.erl20
-rw-r--r--lib/asn1/test/testChoOptional.erl12
-rw-r--r--lib/asn1/test/testChoRecursive.erl4
-rw-r--r--lib/asn1/test/testChoTypeRefCho.erl2
-rw-r--r--lib/asn1/test/testChoTypeRefPrim.erl22
-rw-r--r--lib/asn1/test/testChoTypeRefSeq.erl27
-rw-r--r--lib/asn1/test/testChoTypeRefSet.erl27
-rw-r--r--lib/asn1/test/testConstraints.erl8
-rw-r--r--lib/asn1/test/testContextSwitchingTypes.erl14
-rw-r--r--lib/asn1/test/testDoubleEllipses.erl14
-rw-r--r--lib/asn1/test/testEnumExt.erl4
-rw-r--r--lib/asn1/test/testFragmented.erl4
-rw-r--r--lib/asn1/test/testInfObj.erl44
-rw-r--r--lib/asn1/test/testMergeCompile.erl44
-rw-r--r--lib/asn1/test/testNBAPsystem.erl15
-rw-r--r--lib/asn1/test/testParamBasic.erl3
-rw-r--r--lib/asn1/test/testParameterizedInfObj.erl78
-rw-r--r--lib/asn1/test/testPrimExternal.erl2
-rw-r--r--lib/asn1/test/testPrimStrings.erl319
-rw-r--r--lib/asn1/test/testSeqExtension.erl4
-rw-r--r--lib/asn1/test/testSeqExternal.erl18
-rw-r--r--lib/asn1/test/testSeqOf.erl26
-rw-r--r--lib/asn1/test/testSeqOfExternal.erl63
-rw-r--r--lib/asn1/test/testSeqOfTag.erl72
-rw-r--r--lib/asn1/test/testSeqPrim.erl4
-rw-r--r--lib/asn1/test/testSeqSetDefaultVal.erl358
-rw-r--r--lib/asn1/test/testSeqTag.erl36
-rw-r--r--lib/asn1/test/testSeqTypeRefCho.erl8
-rw-r--r--lib/asn1/test/testSeqTypeRefPrim.erl18
-rw-r--r--lib/asn1/test/testSeqTypeRefSeq.erl18
-rw-r--r--lib/asn1/test/testSeqTypeRefSet.erl18
-rw-r--r--lib/asn1/test/testSetExternal.erl18
-rw-r--r--lib/asn1/test/testSetOf.erl6
-rw-r--r--lib/asn1/test/testSetOfExternal.erl54
-rw-r--r--lib/asn1/test/testSetOfTag.erl72
-rw-r--r--lib/asn1/test/testSetTag.erl36
-rw-r--r--lib/asn1/test/testSetTypeRefCho.erl8
-rw-r--r--lib/asn1/test/testSetTypeRefPrim.erl18
-rw-r--r--lib/asn1/test/testSetTypeRefSeq.erl18
-rw-r--r--lib/asn1/test/testSetTypeRefSet.erl18
-rw-r--r--lib/asn1/test/testTcapsystem.erl78
-rw-r--r--lib/asn1/test/testTimer.erl242
-rw-r--r--lib/asn1/test/testTypeValueNotation.erl2
-rw-r--r--lib/asn1/test/test_compile_options.erl2
-rw-r--r--lib/asn1/vsn.mk2
-rw-r--r--[-rwxr-xr-x]lib/common_test/configure.in0
-rw-r--r--lib/common_test/doc/src/Makefile1
-rw-r--r--lib/common_test/doc/src/basics_chapter.xml4
-rw-r--r--lib/common_test/doc/src/book.xml4
-rw-r--r--lib/common_test/doc/src/common_test_app.xml2
-rw-r--r--lib/common_test/doc/src/config_file_chapter.xml4
-rw-r--r--lib/common_test/doc/src/cover_chapter.xml27
-rw-r--r--lib/common_test/doc/src/ct_hooks.xml50
-rw-r--r--lib/common_test/doc/src/ct_master_chapter.xml4
-rw-r--r--lib/common_test/doc/src/ct_run.xml5
-rw-r--r--lib/common_test/doc/src/dependencies_chapter.xml4
-rw-r--r--lib/common_test/doc/src/event_handler_chapter.xml42
-rw-r--r--lib/common_test/doc/src/example_chapter.xml4
-rw-r--r--lib/common_test/doc/src/fascicules.xml2
-rw-r--r--lib/common_test/doc/src/getting_started_chapter.xml4
-rw-r--r--lib/common_test/doc/src/install_chapter.xml4
-rw-r--r--lib/common_test/doc/src/notes.xml601
-rw-r--r--lib/common_test/doc/src/notes_history.xml4
-rw-r--r--lib/common_test/doc/src/part.xml4
-rw-r--r--lib/common_test/doc/src/part_notes.xml4
-rw-r--r--lib/common_test/doc/src/part_notes_history.xml4
-rw-r--r--lib/common_test/doc/src/ref_man.xml5
-rw-r--r--lib/common_test/doc/src/run_test_chapter.xml22
-rw-r--r--lib/common_test/doc/src/test_structure_chapter.xml4
-rw-r--r--lib/common_test/doc/src/why_test_chapter.xml4
-rw-r--r--lib/common_test/doc/src/write_test_chapter.xml2
-rw-r--r--lib/common_test/priv/Makefile.in2
-rwxr-xr-xlib/common_test/priv/auxdir/config.guess1534
-rwxr-xr-xlib/common_test/priv/auxdir/config.sub1789
-rwxr-xr-xlib/common_test/priv/auxdir/install-sh519
-rw-r--r--[-rwxr-xr-x]lib/common_test/priv/run_test.in0
-rw-r--r--lib/common_test/src/Makefile5
-rw-r--r--lib/common_test/src/common_test.app.src9
-rw-r--r--lib/common_test/src/common_test.appup.src22
-rw-r--r--lib/common_test/src/ct.erl19
-rw-r--r--lib/common_test/src/ct_conn_log_h.erl98
-rw-r--r--lib/common_test/src/ct_cover.erl175
-rw-r--r--lib/common_test/src/ct_framework.erl192
-rw-r--r--lib/common_test/src/ct_gen_conn.erl26
-rw-r--r--lib/common_test/src/ct_hooks.erl38
-rw-r--r--lib/common_test/src/ct_logs.erl164
-rw-r--r--lib/common_test/src/ct_master.erl13
-rw-r--r--lib/common_test/src/ct_netconfc.erl219
-rw-r--r--lib/common_test/src/ct_property_test.erl186
-rw-r--r--lib/common_test/src/ct_run.erl349
-rw-r--r--lib/common_test/src/ct_telnet.erl1021
-rw-r--r--lib/common_test/src/ct_telnet_client.erl195
-rw-r--r--lib/common_test/src/ct_testspec.erl7
-rw-r--r--lib/common_test/src/ct_util.erl45
-rw-r--r--lib/common_test/src/ct_util.hrl9
-rw-r--r--lib/common_test/src/ct_webtool.erl1207
-rw-r--r--lib/common_test/src/ct_webtool_sup.erl74
-rw-r--r--lib/common_test/src/cth_conn_log.erl80
-rw-r--r--lib/common_test/src/cth_surefire.erl4
-rw-r--r--lib/common_test/src/unix_telnet.erl86
-rw-r--r--lib/common_test/src/vts.erl10
-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_config_info_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_cover_SUITE.erl107
-rw-r--r--lib/common_test/test/ct_cover_SUITE_data/cover_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE.erl221
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_local_SUITE.erl63
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_SUITE.erl75
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_nostop_SUITE.erl68
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_test_mod.erl4
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/local.spec6
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/remote.spec6
-rw-r--r--lib/common_test/test/ct_cover_nomerge_SUITE_data/remote_nostop.spec6
-rw-r--r--lib/common_test/test/ct_error_SUITE.erl116
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_12_SUITE.erl10
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_13_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_14_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_3_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_7_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_8_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl138
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl18
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl2
-rw-r--r--lib/common_test/test/ct_event_handler_SUITE.erl38
-rw-r--r--lib/common_test/test/ct_event_handler_SUITE_data/event_handling_1/test/eh_11_SUITE.erl105
-rw-r--r--lib/common_test/test/ct_gen_conn_SUITE_data/conn_SUITE.erl34
-rw-r--r--lib/common_test/test/ct_group_info_SUITE.erl30
-rw-r--r--lib/common_test/test/ct_group_leader_SUITE_data/group_leader_SUITE.erl6
-rw-r--r--lib/common_test/test/ct_groups_spec_SUITE.erl75
-rw-r--r--lib/common_test/test/ct_groups_test_1_SUITE.erl20
-rw-r--r--lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_groups_test_2_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_groups_test_2_SUITE_data/groups_2/groups_22_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_hooks_SUITE.erl34
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_cth_fail_one_skip_one_SUITE.erl9
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/cth_log_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl29
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl4
-rw-r--r--lib/common_test/test/ct_master_SUITE.erl3
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl38
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ns.erl7
-rw-r--r--lib/common_test/test/ct_pre_post_test_io_SUITE.erl12
-rw-r--r--lib/common_test/test/ct_repeat_1_SUITE.erl74
-rw-r--r--lib/common_test/test/ct_repeat_testrun_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_repeat_testrun_SUITE_data/a_test/r1_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_repeat_testrun_SUITE_data/b_test/r2_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_sequence_1_SUITE.erl40
-rw-r--r--lib/common_test/test/ct_shell_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_skip_SUITE.erl118
-rw-r--r--lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_4_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_smoke_test_SUITE.erl10
-rw-r--r--lib/common_test/test/ct_snmp_SUITE_data/snmp.cfg16
-rw-r--r--lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE.erl30
-rw-r--r--lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE_data/target_addr.conf4
-rw-r--r--lib/common_test/test/ct_surefire_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_telnet_SUITE.erl168
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl115
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl262
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE.erl8
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_1_SUITE.erl8
-rw-r--r--lib/common_test/test/ct_test_support.erl67
-rw-r--r--lib/common_test/test/ct_testspec_1_SUITE.erl100
-rw-r--r--lib/common_test/test/ct_testspec_1_SUITE_data/groups_1/groups_12_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_testspec_1_SUITE_data/groups_2/groups_22_SUITE.erl2
-rw-r--r--lib/common_test/test/telnet_server.erl163
-rw-r--r--lib/common_test/vsn.mk2
-rw-r--r--lib/compiler/doc/src/book.xml4
-rw-r--r--lib/compiler/doc/src/compile.xml29
-rw-r--r--lib/compiler/doc/src/fascicules.xml2
-rw-r--r--lib/compiler/doc/src/notes.xml347
-rw-r--r--lib/compiler/doc/src/notes_history.xml4
-rw-r--r--lib/compiler/doc/src/part_notes.xml4
-rw-r--r--lib/compiler/doc/src/part_notes_history.xml4
-rw-r--r--lib/compiler/doc/src/ref_man.xml4
-rw-r--r--lib/compiler/src/beam_a.erl6
-rw-r--r--lib/compiler/src/beam_asm.erl2
-rw-r--r--lib/compiler/src/beam_block.erl27
-rw-r--r--lib/compiler/src/beam_bool.erl104
-rw-r--r--lib/compiler/src/beam_bsm.erl1
-rw-r--r--lib/compiler/src/beam_clean.erl30
-rw-r--r--lib/compiler/src/beam_dict.erl20
-rw-r--r--lib/compiler/src/beam_disasm.erl55
-rw-r--r--lib/compiler/src/beam_except.erl10
-rw-r--r--lib/compiler/src/beam_flatten.erl5
-rw-r--r--lib/compiler/src/beam_jump.erl18
-rw-r--r--lib/compiler/src/beam_split.erl7
-rw-r--r--lib/compiler/src/beam_type.erl6
-rw-r--r--lib/compiler/src/beam_utils.erl10
-rw-r--r--lib/compiler/src/beam_validator.erl100
-rw-r--r--lib/compiler/src/beam_z.erl16
-rw-r--r--lib/compiler/src/cerl.erl167
-rw-r--r--lib/compiler/src/cerl_clauses.erl23
-rw-r--r--lib/compiler/src/cerl_inline.erl65
-rw-r--r--lib/compiler/src/cerl_trees.erl48
-rw-r--r--lib/compiler/src/compile.erl96
-rw-r--r--lib/compiler/src/compiler.app.src4
-rw-r--r--lib/compiler/src/compiler.appup.src22
-rw-r--r--lib/compiler/src/core_lib.erl24
-rw-r--r--lib/compiler/src/core_lint.erl46
-rw-r--r--lib/compiler/src/core_parse.hrl11
-rw-r--r--lib/compiler/src/core_parse.yrl37
-rw-r--r--lib/compiler/src/core_pp.erl31
-rw-r--r--lib/compiler/src/core_scan.erl5
-rw-r--r--lib/compiler/src/erl_bifs.erl1
-rwxr-xr-xlib/compiler/src/genop.tab8
-rw-r--r--lib/compiler/src/rec_env.erl5
-rw-r--r--lib/compiler/src/sys_core_dsetel.erl12
-rw-r--r--lib/compiler/src/sys_core_fold.erl825
-rw-r--r--lib/compiler/src/sys_pre_expand.erl36
-rw-r--r--lib/compiler/src/v3_codegen.erl116
-rw-r--r--lib/compiler/src/v3_core.erl974
-rw-r--r--lib/compiler/src/v3_kernel.erl180
-rw-r--r--lib/compiler/src/v3_kernel.hrl2
-rw-r--r--lib/compiler/src/v3_kernel_pp.erl24
-rw-r--r--lib/compiler/src/v3_life.erl13
-rw-r--r--lib/compiler/test/Makefile3
-rw-r--r--lib/compiler/test/andor_SUITE.erl23
-rw-r--r--lib/compiler/test/beam_except_SUITE.erl10
-rw-r--r--lib/compiler/test/bs_bincomp_SUITE.erl38
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl35
-rw-r--r--lib/compiler/test/compilation_SUITE.erl16
-rw-r--r--lib/compiler/test/compile_SUITE.erl123
-rw-r--r--lib/compiler/test/compile_SUITE_data/small.erl48
-rw-r--r--lib/compiler/test/compile_SUITE_data/small_maps.erl16
-rw-r--r--lib/compiler/test/core_SUITE.erl10
-rw-r--r--lib/compiler/test/core_SUITE_data/bad_boolean_guard.core32
-rw-r--r--lib/compiler/test/core_SUITE_data/eval_case.core34
-rw-r--r--lib/compiler/test/core_SUITE_data/map_core_test.core95
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl78
-rw-r--r--lib/compiler/test/error_SUITE.erl43
-rw-r--r--lib/compiler/test/fun_SUITE.erl32
-rw-r--r--lib/compiler/test/guard_SUITE.erl30
-rw-r--r--lib/compiler/test/inline_SUITE.erl3
-rw-r--r--lib/compiler/test/inline_SUITE_data/maps_inline_test.erl70
-rw-r--r--lib/compiler/test/lc_SUITE.erl8
-rw-r--r--lib/compiler/test/map_SUITE.erl605
-rw-r--r--lib/compiler/test/match_SUITE.erl23
-rw-r--r--lib/compiler/test/receive_SUITE.erl1
-rw-r--r--lib/compiler/test/record_SUITE.erl8
-rw-r--r--lib/compiler/test/warnings_SUITE.erl140
-rw-r--r--lib/compiler/vsn.mk2
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml4
-rw-r--r--lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml4
-rw-r--r--lib/cosEvent/doc/src/book.xml4
-rw-r--r--lib/cosEvent/doc/src/ch_contents.xml4
-rw-r--r--lib/cosEvent/doc/src/ch_event_service.xml4
-rw-r--r--lib/cosEvent/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosEvent/doc/src/cosEventApp.xml4
-rw-r--r--lib/cosEvent/doc/src/fascicules.xml2
-rw-r--r--lib/cosEvent/doc/src/notes.xml20
-rw-r--r--lib/cosEvent/doc/src/part.xml4
-rw-r--r--lib/cosEvent/doc/src/part_notes.xml4
-rw-r--r--lib/cosEvent/doc/src/ref_man.xml4
-rw-r--r--lib/cosEvent/src/cosEvent.app.src3
-rw-r--r--lib/cosEvent/vsn.mk2
-rw-r--r--lib/cosEventDomain/doc/src/CosEventDomainAdmin.xml4
-rw-r--r--lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomain.xml4
-rw-r--r--lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomainFactory.xml4
-rw-r--r--lib/cosEventDomain/doc/src/book.xml4
-rw-r--r--lib/cosEventDomain/doc/src/ch_QoS.xml4
-rw-r--r--lib/cosEventDomain/doc/src/ch_contents.xml4
-rw-r--r--lib/cosEventDomain/doc/src/ch_event_domain_service.xml4
-rw-r--r--lib/cosEventDomain/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosEventDomain/doc/src/cosEventDomainApp.xml4
-rw-r--r--lib/cosEventDomain/doc/src/fascicules.xml2
-rw-r--r--lib/cosEventDomain/doc/src/notes.xml20
-rw-r--r--lib/cosEventDomain/doc/src/part.xml4
-rw-r--r--lib/cosEventDomain/doc/src/part_notes.xml4
-rw-r--r--lib/cosEventDomain/doc/src/ref_man.xml4
-rw-r--r--lib/cosEventDomain/src/cosEventDomain.app.src4
-rw-r--r--lib/cosEventDomain/vsn.mk2
-rw-r--r--lib/cosFileTransfer/doc/src/CosFileTransfer_Directory.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/CosFileTransfer_File.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/CosFileTransfer_FileIterator.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/CosFileTransfer_FileTransferSession.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/CosFileTransfer_VirtualFileSystem.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/book.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ch_contents.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ch_example.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ch_install.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ch_system.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/cosFileTransferApp.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/fascicules.xml2
-rw-r--r--lib/cosFileTransfer/doc/src/notes.xml20
-rw-r--r--lib/cosFileTransfer/doc/src/part.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/part_notes.xml4
-rw-r--r--lib/cosFileTransfer/doc/src/ref_man.xml4
-rw-r--r--lib/cosFileTransfer/src/cosFileTransfer.app.src4
-rw-r--r--lib/cosFileTransfer/vsn.mk2
-rw-r--r--lib/cosNotification/doc/src/CosNotification.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotification_AdminPropertiesAdmin.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotification_QoSAdmin.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ConsumerAdmin.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannel.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannelFactory.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxySupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushConsumer.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushSupplier.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyChannelAdmin_SupplierAdmin.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyComm_NotifyPublish.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyComm_NotifySubscribe.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyFilter_FilterAdmin.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyFilter_FilterFactory.xml4
-rw-r--r--lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml4
-rw-r--r--lib/cosNotification/doc/src/book.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_BNF.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_QoS.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_contents.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_example.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_install.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosNotification/doc/src/ch_system.xml4
-rw-r--r--lib/cosNotification/doc/src/cosNotificationApp.xml4
-rw-r--r--lib/cosNotification/doc/src/fascicules.xml2
-rw-r--r--lib/cosNotification/doc/src/notes.xml20
-rw-r--r--lib/cosNotification/doc/src/part.xml4
-rw-r--r--lib/cosNotification/doc/src/part_notes.xml4
-rw-r--r--lib/cosNotification/doc/src/ref_man.xml4
-rw-r--r--lib/cosNotification/src/cosNotification.app.src4
-rw-r--r--lib/cosNotification/vsn.mk2
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertiesIterator.xml4
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertyNamesIterator.xml4
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertySet.xml4
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertySetDef.xml4
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertySetDefFactory.xml4
-rw-r--r--lib/cosProperty/doc/src/CosPropertyService_PropertySetFactory.xml4
-rw-r--r--lib/cosProperty/doc/src/book.xml4
-rw-r--r--lib/cosProperty/doc/src/ch_contents.xml4
-rw-r--r--lib/cosProperty/doc/src/ch_example.xml4
-rw-r--r--lib/cosProperty/doc/src/ch_install.xml4
-rw-r--r--lib/cosProperty/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosProperty/doc/src/cosProperty.xml4
-rw-r--r--lib/cosProperty/doc/src/fascicules.xml2
-rw-r--r--lib/cosProperty/doc/src/notes.xml20
-rw-r--r--lib/cosProperty/doc/src/part.xml4
-rw-r--r--lib/cosProperty/doc/src/part_notes.xml4
-rw-r--r--lib/cosProperty/doc/src/ref_man.xml4
-rw-r--r--lib/cosProperty/src/cosProperty.app.src4
-rw-r--r--lib/cosProperty/vsn.mk2
-rw-r--r--lib/cosTime/doc/src/CosTime_TIO.xml4
-rw-r--r--lib/cosTime/doc/src/CosTime_TimeService.xml4
-rw-r--r--lib/cosTime/doc/src/CosTime_UTO.xml4
-rw-r--r--lib/cosTime/doc/src/CosTimerEvent_TimerEventHandler.xml4
-rw-r--r--lib/cosTime/doc/src/CosTimerEvent_TimerEventService.xml4
-rw-r--r--lib/cosTime/doc/src/book.xml4
-rw-r--r--lib/cosTime/doc/src/ch_contents.xml4
-rw-r--r--lib/cosTime/doc/src/ch_example.xml4
-rw-r--r--lib/cosTime/doc/src/ch_install.xml4
-rw-r--r--lib/cosTime/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosTime/doc/src/cosTime.xml4
-rw-r--r--lib/cosTime/doc/src/fascicules.xml2
-rw-r--r--lib/cosTime/doc/src/notes.xml20
-rw-r--r--lib/cosTime/doc/src/part.xml4
-rw-r--r--lib/cosTime/doc/src/part_notes.xml4
-rw-r--r--lib/cosTime/doc/src/ref_man.xml4
-rw-r--r--lib/cosTime/src/cosTime.app.src4
-rw-r--r--lib/cosTime/vsn.mk3
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_Control.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_Coordinator.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_RecoveryCoordinator.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_Resource.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_SubtransactionAwareResource.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_Synchronization.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_Terminator.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_TransactionFactory.xml4
-rw-r--r--lib/cosTransactions/doc/src/CosTransactions_TransactionalObject.xml4
-rw-r--r--lib/cosTransactions/doc/src/book.xml4
-rw-r--r--lib/cosTransactions/doc/src/ch_contents.xml4
-rw-r--r--lib/cosTransactions/doc/src/ch_example.xml4
-rw-r--r--lib/cosTransactions/doc/src/ch_install.xml4
-rw-r--r--lib/cosTransactions/doc/src/ch_introduction.xml4
-rw-r--r--lib/cosTransactions/doc/src/ch_skeletons.xml4
-rw-r--r--lib/cosTransactions/doc/src/cosTransactions.xml4
-rw-r--r--lib/cosTransactions/doc/src/fascicules.xml2
-rw-r--r--lib/cosTransactions/doc/src/notes.xml20
-rw-r--r--lib/cosTransactions/doc/src/part.xml4
-rw-r--r--lib/cosTransactions/doc/src/part_notes.xml4
-rw-r--r--lib/cosTransactions/doc/src/ref_man.xml4
-rw-r--r--lib/cosTransactions/src/cosTransactions.app.src3
-rw-r--r--lib/cosTransactions/vsn.mk2
-rw-r--r--lib/crypto/Makefile5
-rw-r--r--lib/crypto/c_src/Makefile.in41
-rw-r--r--lib/crypto/c_src/crypto.c652
-rw-r--r--lib/crypto/c_src/crypto_callback.c24
-rw-r--r--lib/crypto/doc/src/book.xml4
-rw-r--r--lib/crypto/doc/src/crypto.xml110
-rw-r--r--lib/crypto/doc/src/crypto_app.xml4
-rw-r--r--lib/crypto/doc/src/fascicules.xml2
-rw-r--r--lib/crypto/doc/src/insidecover.xml2
-rw-r--r--lib/crypto/doc/src/licenses.xml4
-rw-r--r--lib/crypto/doc/src/notes.xml201
-rw-r--r--lib/crypto/doc/src/ref_man.xml4
-rw-r--r--lib/crypto/doc/src/release_notes.xml4
-rw-r--r--lib/crypto/doc/src/usersguide.xml4
-rw-r--r--lib/crypto/src/Makefile6
-rw-r--r--lib/crypto/src/crypto.app.src12
-rw-r--r--lib/crypto/src/crypto.appup.src14
-rw-r--r--lib/crypto/src/crypto.erl127
-rw-r--r--lib/crypto/src/crypto_ec_curves.erl1215
-rw-r--r--lib/crypto/src/crypto_server.erl68
-rw-r--r--lib/crypto/src/crypto_sup.erl39
-rw-r--r--lib/crypto/test/crypto_SUITE.erl255
-rw-r--r--lib/crypto/vsn.mk2
-rw-r--r--lib/debugger/doc/src/book.xml4
-rw-r--r--lib/debugger/doc/src/debugger.xml4
-rw-r--r--lib/debugger/doc/src/debugger_chapter.xml2
-rw-r--r--lib/debugger/doc/src/fascicules.xml2
-rw-r--r--lib/debugger/doc/src/i.xml6
-rw-r--r--lib/debugger/doc/src/int.xml6
-rw-r--r--lib/debugger/doc/src/notes.xml122
-rw-r--r--lib/debugger/doc/src/part.xml4
-rw-r--r--lib/debugger/doc/src/ref_man.xml4
-rw-r--r--lib/debugger/priv/erlang_bug.pngbin2632 -> 4723 bytes
-rw-r--r--lib/debugger/src/Makefile16
-rw-r--r--lib/debugger/src/dbg_icmd.erl11
-rw-r--r--lib/debugger/src/dbg_ieval.erl269
-rw-r--r--lib/debugger/src/dbg_iload.erl86
-rw-r--r--lib/debugger/src/dbg_ui_break.erl98
-rw-r--r--lib/debugger/src/dbg_ui_break_win.erl314
-rw-r--r--lib/debugger/src/dbg_ui_edit.erl91
-rw-r--r--lib/debugger/src/dbg_ui_edit_win.erl128
-rw-r--r--lib/debugger/src/dbg_ui_filedialog_win.erl340
-rw-r--r--lib/debugger/src/dbg_ui_interpret.erl161
-rw-r--r--lib/debugger/src/dbg_ui_mon.erl738
-rw-r--r--lib/debugger/src/dbg_ui_mon_win.erl573
-rw-r--r--lib/debugger/src/dbg_ui_settings.erl162
-rw-r--r--lib/debugger/src/dbg_ui_trace.erl814
-rw-r--r--lib/debugger/src/dbg_ui_trace_win.erl1595
-rw-r--r--lib/debugger/src/dbg_ui_view.erl255
-rw-r--r--lib/debugger/src/dbg_ui_win.erl281
-rw-r--r--lib/debugger/src/dbg_ui_winman.erl182
-rw-r--r--lib/debugger/src/dbg_wx_filedialog_win.erl19
-rw-r--r--lib/debugger/src/dbg_wx_mon.erl6
-rw-r--r--lib/debugger/src/dbg_wx_mon_win.erl13
-rw-r--r--lib/debugger/src/dbg_wx_settings.erl10
-rw-r--r--lib/debugger/src/dbg_wx_trace.erl30
-rw-r--r--lib/debugger/src/dbg_wx_view.erl4
-rw-r--r--lib/debugger/src/debugger.app.src22
-rw-r--r--lib/debugger/src/debugger.appup.src10
-rw-r--r--lib/debugger/src/debugger.erl42
-rw-r--r--lib/debugger/src/i.erl4
-rw-r--r--lib/debugger/src/int.erl10
-rw-r--r--lib/debugger/test/Makefile1
-rw-r--r--lib/debugger/test/bs_construct_SUITE.erl40
-rw-r--r--lib/debugger/test/debugger_SUITE.erl7
-rw-r--r--lib/debugger/test/erl_eval_SUITE.erl27
-rw-r--r--lib/debugger/test/fun_SUITE.erl17
-rw-r--r--lib/debugger/test/int_eval_SUITE.erl10
-rw-r--r--lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl10
-rw-r--r--lib/debugger/test/map_SUITE.erl1003
-rw-r--r--lib/debugger/vsn.mk2
-rw-r--r--lib/dialyzer/doc/manual.txt6
-rw-r--r--lib/dialyzer/doc/src/book.xml4
-rw-r--r--lib/dialyzer/doc/src/dialyzer.xml117
-rw-r--r--lib/dialyzer/doc/src/dialyzer_chapter.xml2
-rw-r--r--lib/dialyzer/doc/src/fascicules.xml2
-rw-r--r--lib/dialyzer/doc/src/notes.xml290
-rw-r--r--lib/dialyzer/doc/src/part.xml4
-rw-r--r--lib/dialyzer/doc/src/part_notes.xml4
-rw-r--r--lib/dialyzer/doc/src/ref_man.xml4
-rw-r--r--lib/dialyzer/src/Makefile7
-rw-r--r--lib/dialyzer/src/dialyzer.app.src13
-rw-r--r--lib/dialyzer/src/dialyzer.appup.src11
-rw-r--r--lib/dialyzer/src/dialyzer.erl44
-rw-r--r--lib/dialyzer/src/dialyzer.hrl15
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl38
-rw-r--r--lib/dialyzer/src/dialyzer_behaviours.erl8
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl59
-rw-r--r--lib/dialyzer/src/dialyzer_cl.erl60
-rw-r--r--lib/dialyzer/src/dialyzer_cl_parse.erl30
-rw-r--r--lib/dialyzer/src/dialyzer_codeserver.erl41
-rw-r--r--lib/dialyzer/src/dialyzer_contracts.erl204
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl1467
-rw-r--r--lib/dialyzer/src/dialyzer_dep.erl72
-rw-r--r--lib/dialyzer/src/dialyzer_gui.erl1381
-rw-r--r--lib/dialyzer/src/dialyzer_gui_wx.erl33
-rw-r--r--lib/dialyzer/src/dialyzer_options.erl7
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl36
-rw-r--r--lib/dialyzer/src/dialyzer_races.erl51
-rw-r--r--lib/dialyzer/src/dialyzer_succ_typings.erl86
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl407
-rw-r--r--lib/dialyzer/src/dialyzer_utils.erl67
-rw-r--r--lib/dialyzer/test/Makefile2
-rw-r--r--lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl1
-rw-r--r--lib/dialyzer/test/dialyzer.cover3
-rw-r--r--lib/dialyzer/test/dialyzer_SUITE.erl112
-rw-r--r--lib/dialyzer/test/file_utils.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/array4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/crash2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/dict26
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/ets5
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/ewgi6
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/inf_loop12
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/inf_loop25
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/int4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/modules3
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/my_queue2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/opaque1
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/para21
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/queue21
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/simple92
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/timer2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/wings14
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl10
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl175
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl655
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl1300
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug5.erl10
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl93
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl36
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl123
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl64
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl77
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl27
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl17
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl60
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl65
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl28
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl123
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl138
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl571
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl125
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl9
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl5
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl4
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/results/compiler4
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/src/compiler/core_scan.erl1
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/src/compiler/sys_expand_pmod.erl2
-rw-r--r--lib/dialyzer/test/r9c_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/r9c_SUITE_data/results/asn12
-rw-r--r--lib/dialyzer/test/race_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow34
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow44
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow58
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_param8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/confusing_record_warning3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes39
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes23
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/eep37 (renamed from lib/appmon/doc/html/.gitignore)0
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/funs_from_outside7
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/invalid_spec_22
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/literals14
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/maps_difftype3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/my_sofs4
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/predef8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/pretty_bitstring3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/record_construct2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/record_pat2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/record_test2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/record_update2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/relevant_record_warning3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl16
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl47
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl40
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl6
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl148
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl9
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl17
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl531
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl19
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl16
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/eep37.erl15
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/fun2ms.erl21
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl83
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/limit.erl20
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/literals.erl33
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps1.erl77
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl11
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl12
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl23
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/on_load.erl7
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/predef.erl67
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/predef2.erl56
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/pretty_bitstring.erl8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/record_construct.erl2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/record_update.erl10
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/relevant_record_warning.erl (renamed from lib/dialyzer/test/small_SUITE_data/src/confusing_record_warning.erl)6
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field.erl11
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl17
-rw-r--r--lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/underspecs_SUITE_data/results/arr4
-rw-r--r--lib/dialyzer/test/underspecs_SUITE_data/src/arr.erl41
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options1
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings5
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl95
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl9
-rw-r--r--lib/dialyzer/test/user_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/vsn.mk2
-rwxr-xr-xlib/diameter/bin/diameterc4
-rw-r--r--lib/diameter/doc/src/book.xml4
-rw-r--r--lib/diameter/doc/src/diameter.xml192
-rw-r--r--lib/diameter/doc/src/diameter_app.xml2
-rw-r--r--lib/diameter/doc/src/diameter_codec.xml2
-rw-r--r--lib/diameter/doc/src/diameter_dict.xml11
-rw-r--r--lib/diameter/doc/src/diameter_examples.xml4
-rw-r--r--lib/diameter/doc/src/diameter_intro.xml2
-rw-r--r--lib/diameter/doc/src/diameter_make.xml22
-rw-r--r--lib/diameter/doc/src/diameter_sctp.xml38
-rw-r--r--lib/diameter/doc/src/diameter_soc.xml2
-rw-r--r--lib/diameter/doc/src/diameter_soc_rfc6733.xml4
-rw-r--r--lib/diameter/doc/src/diameter_tcp.xml2
-rw-r--r--lib/diameter/doc/src/diameter_transport.xml2
-rw-r--r--lib/diameter/doc/src/diameter_using.xml2
-rw-r--r--lib/diameter/doc/src/diameterc.xml2
-rw-r--r--lib/diameter/doc/src/notes.xml674
-rw-r--r--lib/diameter/doc/src/ref_man.xml2
-rw-r--r--lib/diameter/doc/src/seealso.ent9
-rw-r--r--lib/diameter/doc/src/user_man.xml4
-rw-r--r--lib/diameter/examples/code/GNUmakefile4
-rw-r--r--lib/diameter/examples/code/client.erl53
-rw-r--r--lib/diameter/examples/code/client_cb.erl14
-rw-r--r--lib/diameter/examples/code/node.erl174
-rw-r--r--lib/diameter/examples/code/peer.erl150
-rw-r--r--lib/diameter/examples/code/redirect_cb.erl8
-rw-r--r--lib/diameter/examples/code/relay.erl43
-rw-r--r--lib/diameter/examples/code/relay_cb.erl8
-rw-r--r--lib/diameter/examples/code/server.erl46
-rw-r--r--lib/diameter/examples/code/server_cb.erl55
-rw-r--r--lib/diameter/include/diameter.hrl11
-rw-r--r--lib/diameter/include/diameter_gen.hrl315
-rw-r--r--lib/diameter/src/Makefile24
-rw-r--r--lib/diameter/src/app.sed (renamed from lib/tv/Makefile)41
-rw-r--r--lib/diameter/src/base/diameter.erl11
-rw-r--r--lib/diameter/src/base/diameter_capx.erl40
-rw-r--r--lib/diameter/src/base/diameter_codec.erl317
-rw-r--r--lib/diameter/src/base/diameter_config.erl46
-rw-r--r--lib/diameter/src/base/diameter_lib.erl209
-rw-r--r--lib/diameter/src/base/diameter_peer.erl27
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl446
-rw-r--r--lib/diameter/src/base/diameter_reg.erl7
-rw-r--r--lib/diameter/src/base/diameter_service.erl362
-rw-r--r--lib/diameter/src/base/diameter_service_sup.erl4
-rw-r--r--lib/diameter/src/base/diameter_session.erl4
-rw-r--r--lib/diameter/src/base/diameter_stats.erl9
-rw-r--r--lib/diameter/src/base/diameter_sup.erl4
-rw-r--r--lib/diameter/src/base/diameter_sync.erl5
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl631
-rw-r--r--lib/diameter/src/base/diameter_types.erl188
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl173
-rw-r--r--lib/diameter/src/compiler/diameter_codegen.erl41
-rw-r--r--lib/diameter/src/compiler/diameter_dict_util.erl46
-rw-r--r--lib/diameter/src/compiler/diameter_forms.hrl6
-rw-r--r--lib/diameter/src/compiler/diameter_make.erl46
-rw-r--r--lib/diameter/src/diameter.app.src26
-rw-r--r--lib/diameter/src/diameter.appup.src159
-rw-r--r--lib/diameter/src/info/diameter_dbg.erl (renamed from lib/diameter/src/base/diameter_dbg.erl)167
-rw-r--r--lib/diameter/src/info/diameter_info.erl (renamed from lib/diameter/src/base/diameter_info.erl)14
-rw-r--r--lib/diameter/src/modules.mk14
-rw-r--r--lib/diameter/src/transport/diameter_sctp.erl320
-rw-r--r--lib/diameter/src/transport/diameter_tcp.erl37
-rw-r--r--lib/diameter/src/transport/diameter_transport_sup.erl4
-rw-r--r--lib/diameter/test/diameter_3xxx_SUITE.erl200
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl143
-rw-r--r--lib/diameter/test/diameter_capx_SUITE.erl6
-rw-r--r--lib/diameter/test/diameter_codec_SUITE.erl188
-rw-r--r--lib/diameter/test/diameter_codec_test.erl25
-rw-r--r--lib/diameter/test/diameter_compiler_SUITE.erl34
-rw-r--r--lib/diameter/test/diameter_config_SUITE.erl28
-rw-r--r--lib/diameter/test/diameter_ct.erl6
-rw-r--r--lib/diameter/test/diameter_dpr_SUITE.erl44
-rw-r--r--lib/diameter/test/diameter_event_SUITE.erl35
-rw-r--r--lib/diameter/test/diameter_examples_SUITE.erl93
-rw-r--r--lib/diameter/test/diameter_failover_SUITE.erl8
-rw-r--r--lib/diameter/test/diameter_gen_sctp_SUITE.erl39
-rw-r--r--lib/diameter/test/diameter_gen_tcp_SUITE.erl67
-rw-r--r--lib/diameter/test/diameter_pool_SUITE.erl133
-rw-r--r--lib/diameter/test/diameter_relay_SUITE.erl115
-rw-r--r--lib/diameter/test/diameter_tls_SUITE.erl18
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl448
-rw-r--r--lib/diameter/test/diameter_transport_SUITE.erl102
-rw-r--r--lib/diameter/test/diameter_util.erl80
-rw-r--r--lib/diameter/test/diameter_watchdog_SUITE.erl5
-rw-r--r--lib/diameter/test/modules.mk4
-rw-r--r--lib/diameter/vsn.mk6
-rw-r--r--lib/edoc/doc/src/book.xml4
-rw-r--r--lib/edoc/doc/src/fascicules.xml2
-rw-r--r--lib/edoc/doc/src/notes.xml80
-rw-r--r--lib/edoc/doc/src/part.xml4
-rw-r--r--lib/edoc/doc/src/part_notes.xml4
-rw-r--r--lib/edoc/doc/src/ref_man.xml4
-rw-r--r--lib/edoc/src/edoc.app.src4
-rw-r--r--lib/edoc/src/edoc.appup.src22
-rw-r--r--lib/edoc/src/edoc.erl35
-rw-r--r--lib/edoc/src/edoc_doclet.erl2
-rw-r--r--lib/edoc/src/edoc_layout.erl17
-rw-r--r--lib/edoc/src/edoc_lib.erl3
-rw-r--r--lib/edoc/src/edoc_parser.yrl17
-rw-r--r--lib/edoc/src/edoc_scanner.erl2
-rw-r--r--lib/edoc/src/edoc_specs.erl19
-rw-r--r--lib/edoc/src/edoc_tags.erl4
-rw-r--r--lib/edoc/src/edoc_types.erl5
-rw-r--r--lib/edoc/src/edoc_types.hrl4
-rw-r--r--lib/edoc/test/edoc_SUITE.erl62
-rw-r--r--lib/edoc/test/edoc_SUITE_data/map_module.erl67
-rw-r--r--lib/edoc/test/edoc_SUITE_data/un1.erl7
-rw-r--r--lib/edoc/test/edoc_SUITE_data/un2.erl8
-rw-r--r--lib/edoc/test/edoc_SUITE_data/un3.erl8
-rw-r--r--lib/edoc/vsn.mk2
-rw-r--r--lib/eldap/doc/src/book.xml4
-rw-r--r--lib/eldap/doc/src/eldap.xml41
-rw-r--r--lib/eldap/doc/src/fascicules.xml2
-rw-r--r--lib/eldap/doc/src/notes.xml142
-rw-r--r--lib/eldap/doc/src/ref_man.xml4
-rw-r--r--lib/eldap/doc/src/release_notes.xml4
-rw-r--r--lib/eldap/doc/src/usersguide.xml4
-rw-r--r--lib/eldap/src/Makefile2
-rw-r--r--lib/eldap/src/eldap.app.src4
-rw-r--r--lib/eldap/src/eldap.appup.src21
-rw-r--r--lib/eldap/src/eldap.erl105
-rw-r--r--lib/eldap/test/Makefile4
-rw-r--r--lib/eldap/test/README2
-rw-r--r--lib/eldap/test/eldap_basic_SUITE.erl1127
-rw-r--r--lib/eldap/test/eldap_basic_SUITE_data/RANDbin0 -> 512 bytes
-rw-r--r--lib/eldap/test/make_certs.erl357
-rw-r--r--lib/eldap/vsn.mk2
-rw-r--r--lib/erl_docgen/doc/src/block_tags.xml4
-rw-r--r--lib/erl_docgen/doc/src/book.xml4
-rw-r--r--lib/erl_docgen/doc/src/character_entities.xml4
-rw-r--r--lib/erl_docgen/doc/src/doc-build.xml2
-rw-r--r--lib/erl_docgen/doc/src/docgen_xml_check.xml4
-rw-r--r--lib/erl_docgen/doc/src/erl_docgen_app.xml4
-rw-r--r--lib/erl_docgen/doc/src/fasc_dtds.xml4
-rw-r--r--lib/erl_docgen/doc/src/fascicules.xml2
-rw-r--r--lib/erl_docgen/doc/src/header_tags.xml4
-rw-r--r--lib/erl_docgen/doc/src/inline_tags.xml4
-rw-r--r--lib/erl_docgen/doc/src/notes.xml75
-rw-r--r--lib/erl_docgen/doc/src/overview.xml4
-rw-r--r--lib/erl_docgen/doc/src/part.xml4
-rw-r--r--lib/erl_docgen/doc/src/ref_man.xml4
-rw-r--r--lib/erl_docgen/doc/src/refman_dtds.xml4
-rw-r--r--lib/erl_docgen/doc/src/user_guide_dtds.xml4
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl12
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl17
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl19
-rw-r--r--lib/erl_docgen/src/erl_docgen.app.src4
-rw-r--r--lib/erl_docgen/src/erl_docgen.appup.src22
-rw-r--r--lib/erl_docgen/test/Makefile65
-rw-r--r--lib/erl_docgen/test/erl_docgen.spec1
-rw-r--r--lib/erl_docgen/test/erl_docgen_SUITE.erl50
-rw-r--r--lib/erl_docgen/vsn.mk2
-rw-r--r--lib/erl_interface/aclocal.m41914
-rw-r--r--lib/erl_interface/configure.in20
-rw-r--r--lib/erl_interface/doc/src/book.xml4
-rw-r--r--lib/erl_interface/doc/src/ei.xml36
-rw-r--r--lib/erl_interface/doc/src/ei_connect.xml4
-rw-r--r--lib/erl_interface/doc/src/ei_users_guide.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_call.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_connect.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_error.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_eterm.xml2
-rw-r--r--lib/erl_interface/doc/src/erl_format.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_global.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_interface.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_malloc.xml4
-rw-r--r--lib/erl_interface/doc/src/erl_marshal.xml4
-rw-r--r--lib/erl_interface/doc/src/fascicules.xml2
-rw-r--r--lib/erl_interface/doc/src/notes.xml99
-rw-r--r--lib/erl_interface/doc/src/notes_history.xml4
-rw-r--r--lib/erl_interface/doc/src/part.xml4
-rw-r--r--lib/erl_interface/doc/src/part_erl_interface.xml4
-rw-r--r--lib/erl_interface/doc/src/part_notes.xml4
-rw-r--r--lib/erl_interface/doc/src/part_notes_history.xml4
-rw-r--r--lib/erl_interface/doc/src/ref_man.xml4
-rw-r--r--lib/erl_interface/doc/src/ref_man_ei.xml4
-rw-r--r--lib/erl_interface/doc/src/ref_man_erl_interface.xml4
-rw-r--r--lib/erl_interface/doc/src/registry.xml4
-rw-r--r--lib/erl_interface/ebin/.gitignore (renamed from lib/appmon/doc/man3/.gitignore)0
-rw-r--r--lib/erl_interface/include/ei.h8
-rw-r--r--lib/erl_interface/src/Makefile.in38
-rwxr-xr-xlib/erl_interface/src/auxdir/config.guess1534
-rwxr-xr-xlib/erl_interface/src/auxdir/config.sub1789
-rwxr-xr-xlib/erl_interface/src/auxdir/install-sh519
-rw-r--r--lib/erl_interface/src/connect/ei_connect.c12
-rw-r--r--lib/erl_interface/src/connect/ei_connect_int.h3
-rw-r--r--lib/erl_interface/src/connect/ei_resolve.c2
-rw-r--r--lib/erl_interface/src/decode/decode_big.c22
-rw-r--r--lib/erl_interface/src/decode/decode_skip.c10
-rw-r--r--lib/erl_interface/src/decode/decode_tuple_header.c23
-rw-r--r--lib/erl_interface/src/encode/encode_tuple_header.c19
-rw-r--r--lib/erl_interface/src/erl_interface.app.src32
-rw-r--r--lib/erl_interface/src/erl_interface.appup.src (renamed from lib/tv/src/tv.appup.src)6
-rw-r--r--lib/erl_interface/src/legacy/erl_connect.c2
-rw-r--r--lib/erl_interface/src/misc/ei_decode_term.c3
-rw-r--r--lib/erl_interface/src/misc/ei_x_encode.c12
-rw-r--r--lib/erl_interface/test/Makefile.src2
-rw-r--r--lib/erl_interface/test/all_SUITE_data/Makefile.src2
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.c6
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.h3
-rw-r--r--lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_decode_SUITE.erl1
-rw-r--r--lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c6
-rw-r--r--lib/erl_interface/test/ei_decode_encode_SUITE.erl11
-rw-r--r--lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c490
-rw-r--r--lib/erl_interface/test/ei_encode_SUITE.erl1
-rw-r--r--lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_format_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_print_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src5
-rw-r--r--lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/erl_format_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/erl_global_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/erl_match_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/test/port_call_SUITE_data/Makefile.src7
-rw-r--r--lib/erl_interface/vsn.mk3
-rw-r--r--lib/et/doc/src/book.xml4
-rw-r--r--lib/et/doc/src/et.xml4
-rw-r--r--lib/et/doc/src/et_collector.xml4
-rw-r--r--lib/et/doc/src/et_desc.xmlsrc2
-rw-r--r--lib/et/doc/src/et_examples.xmlsrc4
-rw-r--r--lib/et/doc/src/et_intro.xml4
-rw-r--r--lib/et/doc/src/et_selector.xml4
-rw-r--r--lib/et/doc/src/et_tutorial.xmlsrc4
-rw-r--r--lib/et/doc/src/et_viewer.xml4
-rw-r--r--lib/et/doc/src/notes.xml45
-rw-r--r--lib/et/doc/src/part.xml4
-rw-r--r--lib/et/doc/src/ref_man.xml4
-rw-r--r--lib/et/src/Makefile5
-rw-r--r--lib/et/src/et.app.src8
-rw-r--r--lib/et/src/et.appup.src10
-rw-r--r--lib/et/src/et_collector.erl2
-rw-r--r--lib/et/src/et_gs_contents_viewer.erl602
-rw-r--r--lib/et/src/et_gs_viewer.erl1498
-rw-r--r--lib/et/src/et_viewer.erl19
-rw-r--r--lib/et/src/modules.mk4
-rw-r--r--lib/et/test/Makefile1
-rw-r--r--lib/et/test/et_SUITE.erl50
-rw-r--r--lib/et/vsn.mk2
-rw-r--r--lib/eunit/doc/overview.edoc4
-rw-r--r--lib/eunit/doc/src/book.xml6
-rw-r--r--lib/eunit/doc/src/fascicules.xml2
-rw-r--r--lib/eunit/doc/src/notes.xml68
-rw-r--r--lib/eunit/doc/src/part.xml4
-rw-r--r--lib/eunit/doc/src/part_notes.xml4
-rw-r--r--lib/eunit/doc/src/ref_man.xml4
-rw-r--r--lib/eunit/include/eunit.hrl1
-rw-r--r--lib/eunit/src/Makefile5
-rw-r--r--lib/eunit/src/eunit.app.src4
-rw-r--r--lib/eunit/src/eunit.appup.src22
-rw-r--r--lib/eunit/src/eunit.erl1
-rw-r--r--lib/eunit/src/eunit_data.erl9
-rw-r--r--lib/eunit/src/eunit_lib.erl1
-rw-r--r--lib/eunit/src/eunit_serial.erl6
-rw-r--r--lib/eunit/src/eunit_surefire.erl1
-rw-r--r--lib/eunit/test/eunit_SUITE.erl10
-rw-r--r--lib/eunit/vsn.mk2
-rw-r--r--lib/gs/contribs/mandel/mandel.erl3
-rw-r--r--lib/gs/doc/src/book.xml4
-rw-r--r--lib/gs/doc/src/fascicules.xml2
-rw-r--r--lib/gs/doc/src/gs.xml6
-rw-r--r--lib/gs/doc/src/gs_chapter1.xml4
-rw-r--r--lib/gs/doc/src/gs_chapter2.xmlsrc4
-rw-r--r--lib/gs/doc/src/gs_chapter3.xml4
-rw-r--r--lib/gs/doc/src/gs_chapter4.xmlsrc4
-rw-r--r--lib/gs/doc/src/gs_chapter5.xmlsrc4
-rw-r--r--lib/gs/doc/src/gs_chapter6.xmlsrc4
-rw-r--r--lib/gs/doc/src/gs_chapter7.xmlsrc4
-rw-r--r--lib/gs/doc/src/gs_chapter8.xmlsrc4
-rw-r--r--lib/gs/doc/src/notes.xml33
-rw-r--r--lib/gs/doc/src/part.xml4
-rw-r--r--lib/gs/doc/src/part_notes.xml4
-rw-r--r--lib/gs/doc/src/ref_man.xml4
-rw-r--r--lib/gs/src/Makefile2
-rw-r--r--lib/gs/src/gs.app.src3
-rw-r--r--lib/gs/src/gs.appup.src22
-rw-r--r--lib/gs/src/gstk_generic.erl10
-rw-r--r--lib/gs/test/Makefile65
-rw-r--r--lib/gs/test/gs.spec1
-rw-r--r--lib/gs/test/gs_SUITE.erl50
-rw-r--r--lib/gs/vsn.mk2
-rw-r--r--lib/hipe/Makefile2
-rw-r--r--lib/hipe/arm/hipe_arm_assemble.erl48
-rw-r--r--lib/hipe/cerl/Makefile11
-rw-r--r--lib/hipe/cerl/cerl_closurean.erl8
-rw-r--r--lib/hipe/cerl/cerl_messagean.erl4
-rw-r--r--lib/hipe/cerl/cerl_prettypr.erl58
-rw-r--r--lib/hipe/cerl/cerl_to_icode.erl38
-rw-r--r--lib/hipe/cerl/cerl_typean.erl4
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl1838
-rw-r--r--lib/hipe/cerl/erl_types.erl2464
-rw-r--r--lib/hipe/doc/src/book.xml4
-rw-r--r--lib/hipe/doc/src/fascicules.xml2
-rw-r--r--lib/hipe/doc/src/hipe_app.xml2
-rw-r--r--lib/hipe/doc/src/notes.xml234
-rw-r--r--lib/hipe/doc/src/part_notes.xml4
-rw-r--r--lib/hipe/doc/src/ref_man.xml4
-rw-r--r--lib/hipe/flow/cfg.hrl6
-rw-r--r--lib/hipe/flow/cfg.inc4
-rw-r--r--lib/hipe/flow/hipe_dominators.erl8
-rw-r--r--lib/hipe/flow/liveness.inc6
-rw-r--r--lib/hipe/icode/hipe_beam_to_icode.erl143
-rw-r--r--lib/hipe/icode/hipe_icode.erl14
-rw-r--r--lib/hipe/icode/hipe_icode.hrl8
-rw-r--r--lib/hipe/icode/hipe_icode_callgraph.erl4
-rw-r--r--lib/hipe/icode/hipe_icode_cfg.erl6
-rw-r--r--lib/hipe/icode/hipe_icode_coordinator.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_exceptions.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_fp.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_instruction_counter.erl5
-rw-r--r--lib/hipe/icode/hipe_icode_mulret.erl20
-rw-r--r--lib/hipe/icode/hipe_icode_range.erl10
-rw-r--r--lib/hipe/icode/hipe_icode_ssa.erl4
-rw-r--r--lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl16
-rw-r--r--lib/hipe/icode/hipe_icode_type.erl53
-rw-r--r--lib/hipe/llvm/Makefile (renamed from lib/tv/src/Makefile)142
-rw-r--r--lib/hipe/llvm/elf32_format.hrl59
-rw-r--r--lib/hipe/llvm/elf64_format.hrl58
-rw-r--r--lib/hipe/llvm/elf_format.erl790
-rw-r--r--lib/hipe/llvm/elf_format.hrl488
-rw-r--r--lib/hipe/llvm/hipe_llvm.erl1131
-rw-r--r--lib/hipe/llvm/hipe_llvm_arch.hrl11
-rw-r--r--lib/hipe/llvm/hipe_llvm_liveness.erl112
-rw-r--r--lib/hipe/llvm/hipe_llvm_main.erl506
-rw-r--r--lib/hipe/llvm/hipe_llvm_merge.erl114
-rw-r--r--lib/hipe/llvm/hipe_rtl_to_llvm.erl1613
-rw-r--r--lib/hipe/main/hipe.app.src11
-rw-r--r--lib/hipe/main/hipe.appup.src7
-rw-r--r--lib/hipe/main/hipe.erl85
-rw-r--r--lib/hipe/main/hipe_main.erl42
-rw-r--r--lib/hipe/misc/hipe_consttab.erl8
-rw-r--r--lib/hipe/misc/hipe_consttab.hrl4
-rw-r--r--lib/hipe/misc/hipe_gensym.erl2
-rw-r--r--lib/hipe/misc/hipe_pack_constants.erl102
-rw-r--r--lib/hipe/misc/hipe_sdi.erl15
-rw-r--r--lib/hipe/ppc/hipe_ppc_assemble.erl48
-rw-r--r--lib/hipe/ppc/hipe_rtl_to_ppc.erl14
-rw-r--r--lib/hipe/regalloc/hipe_coalescing_regalloc.erl4
-rw-r--r--lib/hipe/regalloc/hipe_ig_moves.erl4
-rw-r--r--lib/hipe/regalloc/hipe_ls_regalloc.erl4
-rw-r--r--lib/hipe/regalloc/hipe_optimistic_regalloc.erl8
-rw-r--r--lib/hipe/regalloc/hipe_reg_worklists.erl4
-rw-r--r--lib/hipe/rtl/hipe_icode2rtl.erl4
-rw-r--r--lib/hipe/rtl/hipe_rtl.erl192
-rw-r--r--lib/hipe/rtl/hipe_rtl.hrl3
-rw-r--r--lib/hipe/rtl/hipe_rtl_arith.inc4
-rw-r--r--lib/hipe/rtl/hipe_rtl_binary_match.erl18
-rw-r--r--lib/hipe/rtl/hipe_rtl_liveness.erl3
-rw-r--r--lib/hipe/rtl/hipe_rtl_mk_switch.erl4
-rw-r--r--lib/hipe/rtl/hipe_rtl_ssa_const_prop.erl4
-rw-r--r--lib/hipe/rtl/hipe_rtl_ssapre.erl4
-rw-r--r--lib/hipe/rtl/hipe_tagscheme.erl37
-rw-r--r--lib/hipe/sparc/hipe_rtl_to_sparc.erl10
-rw-r--r--lib/hipe/sparc/hipe_sparc_assemble.erl48
-rw-r--r--lib/hipe/ssa/hipe_ssa.inc4
-rw-r--r--lib/hipe/ssa/hipe_ssa_const_prop.inc10
-rw-r--r--lib/hipe/test/Makefile80
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_add.erl18
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bincomp.erl79
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bits.erl150
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bitsize.erl23
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl32
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl35
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl133
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_build.erl41
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl25
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_checksum.erl35
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_construct.erl128
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_decode.erl980
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl91
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_des.erl734
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_extract.erl94
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_flatb.erl29
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_id3.erl75
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_match.erl175
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_native_float.erl22
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_orber.erl26
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch.erl269
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl67
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl23
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_potpurri.erl200
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_remove3.erl104
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_save.erl21
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_shell_native.erl275
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_split.erl105
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl26
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_utf.erl18
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_var_segs.erl76
-rw-r--r--lib/hipe/test/hipe.spec6
-rw-r--r--lib/hipe/test/hipe_SUITE.erl55
-rw-r--r--lib/hipe/test/hipe_testsuite_driver.erl201
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl20
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl17
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl40
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl16
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl7
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_export.erl11
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl31
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl36
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl54
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl35
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_update.erl14
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl46
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_is_map.erl24
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl6
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_map_size.erl29
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl41
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl24
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl28
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl22
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_exact.erl32
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_literals.erl13
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl32
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_values.erl28
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl27
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl9
-rw-r--r--lib/hipe/tools/Makefile3
-rw-r--r--lib/hipe/tools/hipe_tool.erl525
-rw-r--r--lib/hipe/util/hipe_digraph.erl8
-rw-r--r--lib/hipe/util/hipe_dot.erl6
-rw-r--r--lib/hipe/util/hipe_vectors.hrl4
-rw-r--r--lib/hipe/vsn.mk2
-rw-r--r--lib/hipe/x86/hipe_rtl_to_x86.erl15
-rw-r--r--lib/hipe/x86/hipe_x86_assemble.erl51
-rw-r--r--lib/hipe/x86/hipe_x86_postpass.erl4
-rw-r--r--lib/ic/c_src/oe_ei_encode_pid.c2
-rw-r--r--lib/ic/doc/src/CORBA_Environment_alloc.xml4
-rw-r--r--lib/ic/doc/src/book.xml4
-rw-r--r--lib/ic/doc/src/c-part.xml4
-rw-r--r--lib/ic/doc/src/ch_basic_idl.xml4
-rw-r--r--lib/ic/doc/src/ch_c_client.xml4
-rw-r--r--lib/ic/doc/src/ch_c_corba_env.xml4
-rw-r--r--lib/ic/doc/src/ch_c_mapping.xml4
-rw-r--r--lib/ic/doc/src/ch_c_server.xml4
-rw-r--r--lib/ic/doc/src/ch_erl_genserv.xml4
-rw-r--r--lib/ic/doc/src/ch_erl_plain.xml4
-rw-r--r--lib/ic/doc/src/ch_ic_protocol.xml4
-rw-r--r--lib/ic/doc/src/ch_introduction.xml4
-rw-r--r--lib/ic/doc/src/ch_java.xml4
-rw-r--r--lib/ic/doc/src/erl-part.xml4
-rw-r--r--lib/ic/doc/src/fascicules.xml2
-rw-r--r--lib/ic/doc/src/ic.xml4
-rw-r--r--lib/ic/doc/src/ic_c_protocol.xml4
-rw-r--r--lib/ic/doc/src/ic_clib.xml4
-rw-r--r--lib/ic/doc/src/java-part.xml4
-rw-r--r--lib/ic/doc/src/notes.xml35
-rw-r--r--lib/ic/doc/src/part.xml4
-rw-r--r--lib/ic/doc/src/part_notes.xml4
-rw-r--r--lib/ic/doc/src/ref_man.xml4
-rw-r--r--lib/ic/src/ic.app.src3
-rw-r--r--lib/ic/src/ic.erl2
-rw-r--r--lib/ic/src/ic_codegen.erl3
-rw-r--r--lib/ic/src/ic_pp.erl8
-rw-r--r--lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src6
-rw-r--r--lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src6
-rw-r--r--lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src6
-rw-r--r--lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src6
-rw-r--r--lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src6
-rw-r--r--lib/ic/test/java_client_erl_server_SUITE.erl2
-rw-r--r--lib/ic/vsn.mk2
-rw-r--r--lib/inets/doc/src/Makefile3
-rw-r--r--lib/inets/doc/src/book.xml4
-rw-r--r--lib/inets/doc/src/fascicules.xml2
-rw-r--r--lib/inets/doc/src/ftp.xml4
-rw-r--r--lib/inets/doc/src/ftp_client.xml4
-rw-r--r--lib/inets/doc/src/http_client.xml4
-rw-r--r--lib/inets/doc/src/http_server.xml4
-rw-r--r--lib/inets/doc/src/http_uri.xml13
-rw-r--r--lib/inets/doc/src/httpc.xml8
-rw-r--r--lib/inets/doc/src/httpd.xml38
-rw-r--r--lib/inets/doc/src/httpd_conf.xml12
-rw-r--r--lib/inets/doc/src/httpd_custom_api.xml63
-rw-r--r--lib/inets/doc/src/httpd_socket.xml4
-rw-r--r--lib/inets/doc/src/httpd_util.xml4
-rw-r--r--lib/inets/doc/src/inets.xml4
-rw-r--r--lib/inets/doc/src/inets_services.xml4
-rw-r--r--lib/inets/doc/src/mod_alias.xml4
-rw-r--r--lib/inets/doc/src/mod_auth.xml4
-rw-r--r--lib/inets/doc/src/mod_esi.xml4
-rw-r--r--lib/inets/doc/src/mod_security.xml4
-rw-r--r--lib/inets/doc/src/notes.xml346
-rw-r--r--lib/inets/doc/src/notes_history.xml4
-rw-r--r--lib/inets/doc/src/part.xml4
-rw-r--r--lib/inets/doc/src/part_notes.xml4
-rw-r--r--lib/inets/doc/src/part_notes_history.xml4
-rw-r--r--lib/inets/doc/src/ref_man.xml5
-rw-r--r--lib/inets/doc/src/tftp.xml4
-rw-r--r--lib/inets/examples/httpd_load_test/hdlt_slave.erl2
-rw-r--r--lib/inets/src/ftp/ftp.erl219
-rw-r--r--lib/inets/src/http_client/httpc_cookie.erl23
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl95
-rw-r--r--lib/inets/src/http_client/httpc_internal.hrl6
-rw-r--r--lib/inets/src/http_client/httpc_manager.erl46
-rw-r--r--lib/inets/src/http_lib/http_internal.hrl5
-rw-r--r--lib/inets/src/http_lib/http_request.erl26
-rw-r--r--lib/inets/src/http_lib/http_uri.erl35
-rw-r--r--lib/inets/src/http_server/Makefile3
-rw-r--r--lib/inets/src/http_server/httpd.erl12
-rw-r--r--lib/inets/src/http_server/httpd_conf.erl36
-rw-r--r--lib/inets/src/http_server/httpd_custom.erl69
-rw-r--r--lib/inets/src/http_server/httpd_example.erl4
-rw-r--r--lib/inets/src/http_server/httpd_manager.erl36
-rw-r--r--lib/inets/src/http_server/httpd_request.erl344
-rw-r--r--lib/inets/src/http_server/httpd_request_handler.erl71
-rw-r--r--lib/inets/src/http_server/httpd_response.erl49
-rw-r--r--lib/inets/src/http_server/httpd_util.erl9
-rw-r--r--lib/inets/src/http_server/mod_alias.erl14
-rw-r--r--lib/inets/src/inets_app/inets.app.src7
-rw-r--r--lib/inets/src/inets_app/inets.appup.src14
-rw-r--r--lib/inets/test/Makefile2
-rw-r--r--lib/inets/test/ftp_property_test_SUITE.erl52
-rw-r--r--lib/inets/test/ftp_suite_lib.erl20
-rw-r--r--lib/inets/test/http_format_SUITE.erl23
-rw-r--r--lib/inets/test/httpc_SUITE.erl153
-rw-r--r--lib/inets/test/httpd_1_0.erl9
-rw-r--r--lib/inets/test/httpd_1_1.erl111
-rw-r--r--lib/inets/test/httpd_SUITE.erl1764
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl324
-rw-r--r--lib/inets/test/httpd_block.erl6
-rw-r--r--lib/inets/test/httpd_test_lib.erl132
-rw-r--r--lib/inets/test/inets_appup_test.erl298
-rw-r--r--lib/inets/test/inets_sup_SUITE.erl145
-rw-r--r--lib/inets/test/inets_sup_SUITE_data/mime.types3
-rw-r--r--lib/inets/test/inets_sup_SUITE_data/simple.conf6
-rw-r--r--lib/inets/test/old_httpd_SUITE.erl145
-rw-r--r--lib/inets/test/property_test/README12
-rw-r--r--lib/inets/test/property_test/ftp_simple_client_server.erl306
-rw-r--r--lib/inets/test/property_test/ftp_simple_client_server_data/vsftpd.conf26
-rw-r--r--lib/inets/test/uri_SUITE.erl37
-rw-r--r--lib/inets/vsn.mk5
-rw-r--r--lib/jinterface/doc/src/book.xml4
-rw-r--r--lib/jinterface/doc/src/fascicules.xml2
-rw-r--r--lib/jinterface/doc/src/jinterface.xml4
-rw-r--r--lib/jinterface/doc/src/jinterface_users_guide.xml8
-rw-r--r--lib/jinterface/doc/src/notes.xml105
-rw-r--r--lib/jinterface/doc/src/notes_history.xml4
-rw-r--r--lib/jinterface/doc/src/part.xml4
-rw-r--r--lib/jinterface/doc/src/part_notes.xml4
-rw-r--r--lib/jinterface/doc/src/part_notes_history.xml4
-rw-r--r--lib/jinterface/doc/src/ref_man.xml4
-rw-r--r--lib/jinterface/ebin/.gitignore (renamed from lib/appmon/doc/pdf/.gitignore)0
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java144
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java15
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/Link.java7
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile25
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java4
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpCookedConnection.java2
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java13
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java13
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBinary.java6
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java16
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBoolean.java4
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangByte.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangChar.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDecodeException.java2
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDouble.java10
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFloat.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java7
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangInt.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java13
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java28
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java295
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangObject.java6
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java13
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPort.java7
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java6
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangShort.java6
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java10
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java10
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUInt.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUShort.java8
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpException.java2
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java3
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java67
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMD5.java34
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java28
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java11
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java67
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java40
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/java_files1
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.app.src32
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.appup.src (renamed from lib/toolbar/src/toolbar.appup.src)7
-rw-r--r--lib/jinterface/test/jinterface_SUITE.erl32
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/FunEquals.java73
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/GetNames.java6
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/Makefile.src4
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/Maps.java108
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/MboxLinkUnlink.java18
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/MboxSendReceive.java9
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java17
-rw-r--r--lib/jinterface/test/jitu.erl4
-rw-r--r--lib/jinterface/test/nc_SUITE.erl1
-rw-r--r--lib/jinterface/test/nc_SUITE_data/echo_server.java3
-rw-r--r--lib/jinterface/vsn.mk2
-rw-r--r--lib/kernel/doc/src/Makefile4
-rw-r--r--lib/kernel/doc/src/app.xml40
-rw-r--r--lib/kernel/doc/src/application.xml24
-rw-r--r--lib/kernel/doc/src/auth.xml4
-rw-r--r--lib/kernel/doc/src/book.xml4
-rw-r--r--lib/kernel/doc/src/code.xml2
-rw-r--r--lib/kernel/doc/src/config.xml4
-rw-r--r--lib/kernel/doc/src/disk_log.xml4
-rw-r--r--lib/kernel/doc/src/erl_boot_server.xml4
-rw-r--r--lib/kernel/doc/src/erl_ddll.xml4
-rw-r--r--lib/kernel/doc/src/erl_prim_loader_stub.xml4
-rw-r--r--lib/kernel/doc/src/erlang_stub.xml4
-rw-r--r--lib/kernel/doc/src/error_handler.xml2
-rw-r--r--lib/kernel/doc/src/error_logger.xml6
-rw-r--r--lib/kernel/doc/src/fascicules.xml2
-rw-r--r--lib/kernel/doc/src/file.xml160
-rw-r--r--lib/kernel/doc/src/gen_sctp.xml37
-rw-r--r--lib/kernel/doc/src/gen_tcp.xml17
-rw-r--r--lib/kernel/doc/src/gen_udp.xml28
-rw-r--r--lib/kernel/doc/src/global.xml2
-rw-r--r--lib/kernel/doc/src/global_group.xml4
-rw-r--r--lib/kernel/doc/src/heart.xml13
-rw-r--r--lib/kernel/doc/src/inet.xml126
-rw-r--r--lib/kernel/doc/src/inet_res.xml4
-rw-r--r--lib/kernel/doc/src/init_stub.xml4
-rw-r--r--lib/kernel/doc/src/kernel_app.xml57
-rw-r--r--lib/kernel/doc/src/net_adm.xml4
-rw-r--r--lib/kernel/doc/src/net_kernel.xml4
-rw-r--r--lib/kernel/doc/src/notes.xml402
-rw-r--r--lib/kernel/doc/src/notes_history.xml4
-rw-r--r--lib/kernel/doc/src/os.xml4
-rw-r--r--lib/kernel/doc/src/part_notes.xml4
-rw-r--r--lib/kernel/doc/src/part_notes_history.xml4
-rw-r--r--lib/kernel/doc/src/pg2.xml4
-rw-r--r--lib/kernel/doc/src/ref_man.xml7
-rw-r--r--lib/kernel/doc/src/ref_man.xml.src67
-rw-r--r--lib/kernel/doc/src/rpc.xml4
-rw-r--r--lib/kernel/doc/src/seq_trace.xml4
-rw-r--r--lib/kernel/doc/src/specs.xml2
-rw-r--r--lib/kernel/doc/src/user.xml4
-rw-r--r--lib/kernel/doc/src/wrap_log_reader.xml4
-rw-r--r--lib/kernel/doc/src/zlib_stub.xml4
-rw-r--r--lib/kernel/include/dist.hrl3
-rw-r--r--lib/kernel/src/Makefile1
-rw-r--r--lib/kernel/src/application.erl29
-rw-r--r--lib/kernel/src/application_controller.erl97
-rw-r--r--lib/kernel/src/application_master.erl50
-rw-r--r--lib/kernel/src/auth.erl4
-rw-r--r--lib/kernel/src/code.erl2
-rw-r--r--lib/kernel/src/code_server.erl258
-rw-r--r--lib/kernel/src/disk_log.erl13
-rw-r--r--lib/kernel/src/disk_log_1.erl78
-rw-r--r--lib/kernel/src/disk_log_server.erl30
-rw-r--r--lib/kernel/src/dist_ac.erl68
-rw-r--r--lib/kernel/src/dist_util.erl5
-rw-r--r--lib/kernel/src/erl_boot_server.erl41
-rw-r--r--lib/kernel/src/erl_distribution.erl1
-rw-r--r--lib/kernel/src/erl_epmd.erl86
-rw-r--r--lib/kernel/src/erl_reply.erl4
-rw-r--r--lib/kernel/src/error_logger.erl20
-rw-r--r--lib/kernel/src/erts_debug.erl25
-rw-r--r--lib/kernel/src/file.erl132
-rw-r--r--lib/kernel/src/file_io_server.erl12
-rw-r--r--lib/kernel/src/file_server.erl3
-rw-r--r--lib/kernel/src/gen_sctp.erl4
-rw-r--r--lib/kernel/src/gen_tcp.erl4
-rw-r--r--lib/kernel/src/gen_udp.erl4
-rw-r--r--lib/kernel/src/global.erl23
-rw-r--r--lib/kernel/src/global_group.erl13
-rw-r--r--lib/kernel/src/group.erl8
-rw-r--r--lib/kernel/src/heart.erl36
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl35
-rw-r--r--lib/kernel/src/inet.erl101
-rw-r--r--lib/kernel/src/inet6_tcp_dist.erl2
-rw-r--r--lib/kernel/src/inet_config.erl3
-rw-r--r--lib/kernel/src/inet_db.erl11
-rw-r--r--lib/kernel/src/inet_gethost_native.erl6
-rw-r--r--lib/kernel/src/inet_int.hrl1
-rw-r--r--lib/kernel/src/inet_parse.erl2
-rw-r--r--lib/kernel/src/inet_res.erl33
-rw-r--r--lib/kernel/src/inet_sctp.erl4
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl50
-rw-r--r--lib/kernel/src/kernel.app.src3
-rw-r--r--lib/kernel/src/kernel.appup.src16
-rw-r--r--lib/kernel/src/kernel.erl11
-rw-r--r--lib/kernel/src/kernel_config.erl6
-rw-r--r--lib/kernel/src/net_adm.erl15
-rw-r--r--lib/kernel/src/net_kernel.erl19
-rw-r--r--lib/kernel/src/os.erl56
-rw-r--r--lib/kernel/src/pg2.erl20
-rw-r--r--lib/kernel/src/rpc.erl30
-rw-r--r--lib/kernel/src/seq_trace.erl4
-rw-r--r--lib/kernel/src/standard_error.erl161
-rw-r--r--lib/kernel/src/user.erl8
-rw-r--r--lib/kernel/src/user_drv.erl41
-rw-r--r--lib/kernel/src/wrap_log_reader.erl10
-rw-r--r--lib/kernel/test/Makefile3
-rw-r--r--lib/kernel/test/application_SUITE.erl114
-rw-r--r--lib/kernel/test/application_SUITE_data/deadlock/deadlock.app2
-rw-r--r--lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl12
-rw-r--r--lib/kernel/test/application_SUITE_data/t4.config1
-rw-r--r--lib/kernel/test/code_SUITE.erl122
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl76
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl26
-rw-r--r--lib/kernel/test/file_SUITE.erl238
-rw-r--r--lib/kernel/test/file_name_SUITE.erl1
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl125
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE.erl41
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src9
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c62
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl149
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl113
-rw-r--r--lib/kernel/test/global_SUITE_data/global_trace.erl1
-rw-r--r--lib/kernel/test/heart_SUITE.erl8
-rw-r--r--lib/kernel/test/inet_SUITE.erl67
-rw-r--r--lib/kernel/test/interactive_shell_SUITE.erl3
-rw-r--r--lib/kernel/test/kernel_SUITE.erl128
-rw-r--r--lib/kernel/test/os_SUITE.erl26
-rw-r--r--lib/kernel/test/os_SUITE_data/my_echo.c28
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl177
-rw-r--r--lib/kernel/test/ram_file_SUITE.erl3
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl95
-rw-r--r--lib/kernel/test/standard_error_SUITE.erl (renamed from lib/crypto/src/crypto_app.erl)37
-rw-r--r--lib/kernel/test/zlib_SUITE.erl3
-rw-r--r--lib/kernel/vsn.mk2
-rw-r--r--lib/megaco/aclocal.m41914
-rw-r--r--lib/megaco/configure.in20
-rw-r--r--lib/megaco/doc/src/book.xml4
-rw-r--r--lib/megaco/doc/src/definitions/cite.defs.xml2
-rw-r--r--lib/megaco/doc/src/definitions/term.defs3
-rw-r--r--lib/megaco/doc/src/definitions/term.defs.xml2
-rw-r--r--lib/megaco/doc/src/fascicules.xml2
-rw-r--r--lib/megaco/doc/src/megaco.xml4
-rw-r--r--lib/megaco/doc/src/megaco_architecture.xml4
-rw-r--r--lib/megaco/doc/src/megaco_codec_meas.xml4
-rw-r--r--lib/megaco/doc/src/megaco_codec_mstone1.xml4
-rw-r--r--lib/megaco/doc/src/megaco_codec_mstone2.xml4
-rw-r--r--lib/megaco/doc/src/megaco_codec_transform.xml4
-rw-r--r--lib/megaco/doc/src/megaco_debug.xml4
-rw-r--r--lib/megaco/doc/src/megaco_edist_compress.xml4
-rw-r--r--lib/megaco/doc/src/megaco_encode.xml2
-rw-r--r--lib/megaco/doc/src/megaco_encoder.xml4
-rw-r--r--lib/megaco/doc/src/megaco_examples.xml4
-rw-r--r--lib/megaco/doc/src/megaco_flex_scanner.xml4
-rw-r--r--lib/megaco/doc/src/megaco_intro.xml4
-rw-r--r--lib/megaco/doc/src/megaco_mib.xml4
-rw-r--r--lib/megaco/doc/src/megaco_performance.xml4
-rw-r--r--lib/megaco/doc/src/megaco_run.xml4
-rw-r--r--lib/megaco/doc/src/megaco_tcp.xml4
-rw-r--r--lib/megaco/doc/src/megaco_transport.xml4
-rw-r--r--lib/megaco/doc/src/megaco_transport_mechanisms.xml4
-rw-r--r--lib/megaco/doc/src/megaco_udp.xml4
-rw-r--r--lib/megaco/doc/src/megaco_user.xml4
-rw-r--r--lib/megaco/doc/src/notes.xml95
-rw-r--r--lib/megaco/doc/src/notes_history.xml4
-rw-r--r--lib/megaco/doc/src/part.xml4
-rw-r--r--lib/megaco/doc/src/part_notes.xml4
-rw-r--r--lib/megaco/doc/src/part_notes_history.xml4
-rw-r--r--lib/megaco/doc/src/ref_man.xml4
-rw-r--r--lib/megaco/src/app/megaco.app.src5
-rw-r--r--lib/megaco/src/app/megaco.appup.src28
-rw-r--r--lib/megaco/src/binary/depend.mk2
-rw-r--r--lib/megaco/src/binary/megaco_binary_encoder_lib.erl8
-rw-r--r--lib/megaco/vsn.mk4
-rw-r--r--lib/mnesia/doc/src/Mnesia_App_A.xml4
-rw-r--r--lib/mnesia/doc/src/Mnesia_App_B.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_App_C.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_App_D.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap1.xml4
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap2.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap3.xml6
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap4.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap5.xmlsrc5
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap7.xmlsrc4
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap8.xml4
-rw-r--r--lib/mnesia/doc/src/book.xml4
-rw-r--r--lib/mnesia/doc/src/fascicules.xml2
-rw-r--r--lib/mnesia/doc/src/mnesia.xml46
-rw-r--r--lib/mnesia/doc/src/mnesia_frag_hash.xml4
-rw-r--r--lib/mnesia/doc/src/mnesia_registry.xml4
-rw-r--r--lib/mnesia/doc/src/notes.xml172
-rw-r--r--lib/mnesia/doc/src/notes_history.xml4
-rw-r--r--lib/mnesia/doc/src/part.xml4
-rw-r--r--lib/mnesia/doc/src/part_notes.xml4
-rw-r--r--lib/mnesia/doc/src/part_notes_history.xml4
-rw-r--r--lib/mnesia/doc/src/ref_man.xml4
-rw-r--r--lib/mnesia/src/mnesia.app.src3
-rw-r--r--lib/mnesia/src/mnesia.erl16
-rw-r--r--lib/mnesia/src/mnesia.hrl4
-rw-r--r--lib/mnesia/src/mnesia_controller.erl42
-rw-r--r--lib/mnesia/src/mnesia_dumper.erl29
-rw-r--r--lib/mnesia/src/mnesia_event.erl4
-rw-r--r--lib/mnesia/src/mnesia_frag.erl2
-rw-r--r--lib/mnesia/src/mnesia_index.erl14
-rw-r--r--lib/mnesia/src/mnesia_lib.erl72
-rw-r--r--lib/mnesia/src/mnesia_loader.erl3
-rw-r--r--lib/mnesia/src/mnesia_locker.erl47
-rw-r--r--lib/mnesia/src/mnesia_log.erl14
-rw-r--r--lib/mnesia/src/mnesia_monitor.erl98
-rw-r--r--lib/mnesia/src/mnesia_recover.erl39
-rw-r--r--lib/mnesia/src/mnesia_snmp_hook.erl8
-rw-r--r--lib/mnesia/src/mnesia_subscr.erl2
-rw-r--r--lib/mnesia/src/mnesia_tm.erl5
-rw-r--r--lib/mnesia/test/mnesia_SUITE.erl15
-rw-r--r--lib/mnesia/test/mnesia_config_test.erl7
-rw-r--r--lib/mnesia/test/mnesia_durability_test.erl30
-rw-r--r--lib/mnesia/test/mnesia_evil_coverage_test.erl11
-rw-r--r--lib/mnesia/test/mnesia_frag_test.erl4
-rw-r--r--lib/mnesia/test/mnesia_isolation_test.erl4
-rw-r--r--lib/mnesia/test/mnesia_nice_coverage_test.erl3
-rw-r--r--lib/mnesia/test/mnesia_qlc_test.erl2
-rw-r--r--lib/mnesia/test/mnesia_recovery_test.erl13
-rw-r--r--lib/mnesia/test/mnesia_schema_recovery_test.erl143
-rw-r--r--lib/mnesia/test/mnesia_test_lib.hrl37
-rw-r--r--lib/mnesia/test/mnesia_trans_access_test.erl7
-rw-r--r--lib/mnesia/vsn.mk2
-rw-r--r--lib/observer/doc/src/Makefile17
-rw-r--r--lib/observer/doc/src/book.xml4
-rw-r--r--lib/observer/doc/src/cdv.xml60
-rw-r--r--lib/observer/doc/src/crashdump.xml27
-rw-r--r--lib/observer/doc/src/crashdump_help.html307
-rw-r--r--lib/observer/doc/src/crashdump_ug.xml429
-rw-r--r--lib/observer/doc/src/etop.xml23
-rw-r--r--lib/observer/doc/src/etop_5.gifbin9576 -> 0 bytes
-rw-r--r--lib/observer/doc/src/etop_lines.gifbin14552 -> 0 bytes
-rw-r--r--lib/observer/doc/src/etop_main.gifbin12947 -> 0 bytes
-rw-r--r--lib/observer/doc/src/etop_opt.gifbin13572 -> 0 bytes
-rw-r--r--lib/observer/doc/src/etop_ug.xml48
-rw-r--r--lib/observer/doc/src/fascicules.xml2
-rw-r--r--lib/observer/doc/src/notes.xml131
-rw-r--r--lib/observer/doc/src/notes_history.xml4
-rw-r--r--lib/observer/doc/src/observer.xml4
-rw-r--r--lib/observer/doc/src/observer_app.xml4
-rw-r--r--lib/observer/doc/src/observer_ug.xml7
-rw-r--r--lib/observer/doc/src/part.xml4
-rw-r--r--lib/observer/doc/src/part_notes.xml4
-rw-r--r--lib/observer/doc/src/part_notes_history.xml4
-rw-r--r--lib/observer/doc/src/ref_man.xml5
-rw-r--r--lib/observer/doc/src/ttb.xml4
-rw-r--r--lib/observer/doc/src/ttb_ug.xml4
-rwxr-xr-xlib/observer/priv/bin/getop4
-rw-r--r--lib/observer/priv/bin/getop.bat2
-rw-r--r--lib/observer/priv/erlang_observer.pngbin2679 -> 3698 bytes
-rw-r--r--lib/observer/src/Makefile28
-rw-r--r--lib/observer/src/cdv_atom_cb.erl48
-rw-r--r--lib/observer/src/cdv_bin_cb.erl82
-rw-r--r--lib/observer/src/cdv_detail_wx.erl158
-rw-r--r--lib/observer/src/cdv_dist_cb.erl97
-rw-r--r--lib/observer/src/cdv_ets_cb.erl67
-rw-r--r--lib/observer/src/cdv_fun_cb.erl58
-rw-r--r--lib/observer/src/cdv_gen_cb.erl45
-rw-r--r--lib/observer/src/cdv_html_wx.erl136
-rw-r--r--lib/observer/src/cdv_info_wx.erl128
-rw-r--r--lib/observer/src/cdv_int_tab_cb.erl86
-rw-r--r--lib/observer/src/cdv_mem_cb.erl84
-rw-r--r--lib/observer/src/cdv_mod_cb.erl102
-rw-r--r--lib/observer/src/cdv_multi_wx.erl188
-rw-r--r--lib/observer/src/cdv_port_cb.erl103
-rw-r--r--lib/observer/src/cdv_proc_cb.erl156
-rw-r--r--lib/observer/src/cdv_table_wx.erl106
-rw-r--r--lib/observer/src/cdv_term_cb.erl76
-rw-r--r--lib/observer/src/cdv_timer_cb.erl54
-rw-r--r--lib/observer/src/cdv_virtual_list_wx.erl419
-rw-r--r--lib/observer/src/cdv_wx.erl462
-rw-r--r--lib/observer/src/crashdump_viewer.erl2169
-rw-r--r--lib/observer/src/crashdump_viewer.hrl169
-rw-r--r--lib/observer/src/crashdump_viewer_html.erl1440
-rw-r--r--lib/observer/src/etop.erl5
-rw-r--r--lib/observer/src/etop_defs.hrl6
-rw-r--r--lib/observer/src/etop_gui.erl374
-rw-r--r--lib/observer/src/etop_tr.erl38
-rw-r--r--lib/observer/src/etop_txt.erl13
-rw-r--r--lib/observer/src/observer.app.src30
-rw-r--r--lib/observer/src/observer.appup.src10
-rw-r--r--lib/observer/src/observer.erl7
-rw-r--r--lib/observer/src/observer_app_wx.erl27
-rw-r--r--lib/observer/src/observer_defs.hrl11
-rw-r--r--lib/observer/src/observer_html_lib.erl407
-rw-r--r--lib/observer/src/observer_lib.erl406
-rw-r--r--lib/observer/src/observer_perf_wx.erl29
-rw-r--r--lib/observer/src/observer_pro_wx.erl107
-rw-r--r--lib/observer/src/observer_procinfo.erl242
-rw-r--r--lib/observer/src/observer_sys_wx.erl24
-rw-r--r--lib/observer/src/observer_trace_wx.erl7
-rw-r--r--lib/observer/src/observer_tv_table.erl123
-rw-r--r--lib/observer/src/observer_tv_wx.erl6
-rw-r--r--lib/observer/src/observer_wx.erl73
-rw-r--r--lib/observer/test/crashdump_helper.erl66
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl832
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms13135
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms13285
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms13085
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms13035
-rw-r--r--lib/observer/test/observer_SUITE.erl252
-rw-r--r--lib/observer/vsn.mk2
-rw-r--r--lib/odbc/aclocal.m41914
-rw-r--r--lib/odbc/c_src/odbcserver.c80
-rw-r--r--lib/odbc/c_src/odbcserver.h4
-rw-r--r--lib/odbc/configure.in22
-rw-r--r--lib/odbc/doc/src/book.xml4
-rw-r--r--lib/odbc/doc/src/databases.xml4
-rw-r--r--lib/odbc/doc/src/error_handling.xml6
-rw-r--r--lib/odbc/doc/src/fascicules.xml2
-rw-r--r--lib/odbc/doc/src/getting_started.xml4
-rw-r--r--lib/odbc/doc/src/introduction.xml4
-rw-r--r--lib/odbc/doc/src/notes.xml114
-rw-r--r--lib/odbc/doc/src/notes_history.xml4
-rw-r--r--lib/odbc/doc/src/odbc.xml2
-rw-r--r--lib/odbc/doc/src/part.xml4
-rw-r--r--lib/odbc/doc/src/part_notes.xml4
-rw-r--r--lib/odbc/doc/src/part_notes_history.xml4
-rw-r--r--lib/odbc/doc/src/ref_man.xml4
-rw-r--r--lib/odbc/src/odbc.app.src3
-rw-r--r--lib/odbc/src/odbc.appup.src20
-rw-r--r--lib/odbc/test/odbc_connect_SUITE.erl37
-rw-r--r--lib/odbc/test/odbc_data_type_SUITE.erl3
-rw-r--r--lib/odbc/test/odbc_start_SUITE.erl23
-rw-r--r--lib/odbc/vsn.mk2
-rw-r--r--lib/orber/COSS/CosNaming/orber_cosnaming_utils.erl84
-rw-r--r--lib/orber/doc/src/CosNaming.xml4
-rw-r--r--lib/orber/doc/src/CosNaming_BindingIterator.xml4
-rw-r--r--lib/orber/doc/src/CosNaming_NamingContext.xml4
-rw-r--r--lib/orber/doc/src/CosNaming_NamingContextExt.xml4
-rw-r--r--lib/orber/doc/src/Module_Interface.xml4
-rw-r--r--lib/orber/doc/src/any.xml4
-rw-r--r--lib/orber/doc/src/book.xml4
-rw-r--r--lib/orber/doc/src/ch_contents.xml4
-rw-r--r--lib/orber/doc/src/ch_debugging.xml4
-rw-r--r--lib/orber/doc/src/ch_exceptions.xml4
-rw-r--r--lib/orber/doc/src/ch_idl_to_erlang_mapping.xml2
-rw-r--r--lib/orber/doc/src/ch_ifr.xml4
-rw-r--r--lib/orber/doc/src/ch_install.xml4
-rw-r--r--lib/orber/doc/src/ch_interceptors.xml4
-rw-r--r--lib/orber/doc/src/ch_introduction.xml4
-rw-r--r--lib/orber/doc/src/ch_naming_service.xml45
-rw-r--r--lib/orber/doc/src/ch_orber_kernel.xml4
-rw-r--r--lib/orber/doc/src/ch_orberweb.xml4
-rw-r--r--lib/orber/doc/src/ch_security.xml4
-rw-r--r--lib/orber/doc/src/ch_stubs.xml4
-rw-r--r--lib/orber/doc/src/corba.xml21
-rw-r--r--lib/orber/doc/src/corba_object.xml4
-rw-r--r--lib/orber/doc/src/example_part.xml4
-rw-r--r--lib/orber/doc/src/fascicules.xml2
-rw-r--r--lib/orber/doc/src/fixed.xml4
-rw-r--r--lib/orber/doc/src/interceptors.xml4
-rw-r--r--lib/orber/doc/src/intro_part.xml4
-rw-r--r--lib/orber/doc/src/lname.xml4
-rw-r--r--lib/orber/doc/src/lname_component.xml4
-rw-r--r--lib/orber/doc/src/notes.xml77
-rw-r--r--lib/orber/doc/src/orber.xml13
-rw-r--r--lib/orber/doc/src/orber_acl.xml4
-rw-r--r--lib/orber/doc/src/orber_diagnostics.xml4
-rw-r--r--lib/orber/doc/src/orber_ifr.xml4
-rw-r--r--lib/orber/doc/src/orber_tc.xml4
-rw-r--r--lib/orber/doc/src/part.xml4
-rw-r--r--lib/orber/doc/src/part_notes.xml4
-rw-r--r--lib/orber/doc/src/ref_man.xml4
-rw-r--r--lib/orber/doc/src/tools_debugging_part.xml4
-rw-r--r--lib/orber/src/Makefile6
-rw-r--r--lib/orber/src/cdr_decode.erl4
-rw-r--r--lib/orber/src/corba.erl45
-rw-r--r--lib/orber/src/corba_request.erl384
-rw-r--r--lib/orber/src/orber.app.src4
-rw-r--r--lib/orber/src/orber_env.erl7
-rw-r--r--lib/orber/src/orber_iiop.hrl4
-rw-r--r--lib/orber/src/orber_iiop_net.erl70
-rw-r--r--lib/orber/src/orber_iiop_outproxy.erl3
-rw-r--r--lib/orber/src/orber_iiop_pm.erl34
-rw-r--r--lib/orber/src/orber_interceptors.erl11
-rw-r--r--lib/orber/src/orber_socket.erl79
-rw-r--r--lib/orber/test/Makefile3
-rw-r--r--lib/orber/test/ip_v4v6_interop_SUITE.erl199
-rw-r--r--lib/orber/test/multi_ORB_SUITE.erl4
-rw-r--r--lib/orber/test/orber_firewall_ipv6_in_SUITE.erl49
-rw-r--r--lib/orber/test/orber_test_lib.erl8
-rw-r--r--lib/orber/vsn.mk3
-rw-r--r--lib/os_mon/c_src/memsup.c10
-rw-r--r--lib/os_mon/doc/src/book.xml4
-rw-r--r--lib/os_mon/doc/src/cpu_sup.xml4
-rw-r--r--lib/os_mon/doc/src/disksup.xml15
-rw-r--r--lib/os_mon/doc/src/fascicules.xml2
-rw-r--r--lib/os_mon/doc/src/memsup.xml4
-rw-r--r--lib/os_mon/doc/src/notes.xml89
-rw-r--r--lib/os_mon/doc/src/nteventlog.xml4
-rw-r--r--lib/os_mon/doc/src/os_mon_app.xml4
-rw-r--r--lib/os_mon/doc/src/os_mon_mib.xml4
-rw-r--r--lib/os_mon/doc/src/os_sup.xml4
-rw-r--r--lib/os_mon/doc/src/part_notes.xml4
-rw-r--r--lib/os_mon/doc/src/ref_man.xml4
-rw-r--r--lib/os_mon/src/cpu_sup.erl14
-rw-r--r--lib/os_mon/src/disksup.erl19
-rw-r--r--lib/os_mon/src/nteventlog.erl6
-rw-r--r--lib/os_mon/src/os_mon.app.src5
-rw-r--r--lib/os_mon/src/os_mon.appup.src27
-rw-r--r--lib/os_mon/src/os_sup.erl6
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl6
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl55
-rw-r--r--lib/os_mon/test/os_mon_SUITE.erl9
-rw-r--r--lib/os_mon/vsn.mk2
-rw-r--r--lib/ose/Makefile (renamed from lib/toolbar/Makefile)22
-rw-r--r--lib/ose/doc/html/.gitignore (renamed from lib/appmon/ebin/.gitignore)0
-rw-r--r--lib/ose/doc/man3/.gitignore (renamed from lib/pman/doc/html/.gitignore)0
-rw-r--r--lib/ose/doc/man6/.gitignore (renamed from lib/pman/doc/man3/.gitignore)0
-rw-r--r--lib/ose/doc/pdf/.gitignore (renamed from lib/pman/doc/pdf/.gitignore)0
-rw-r--r--lib/ose/doc/src/.gitignore1
-rw-r--r--lib/ose/doc/src/Makefile (renamed from lib/toolbar/doc/src/Makefile)75
-rw-r--r--lib/ose/doc/src/book.xml (renamed from lib/tv/doc/src/book.xml)24
-rw-r--r--lib/ose/doc/src/notes.xml92
-rw-r--r--lib/ose/doc/src/ose_app.xml (renamed from lib/appmon/doc/src/part.xml)24
-rw-r--r--lib/ose/doc/src/ose_erl_driver.xml110
-rw-r--r--lib/ose/doc/src/ose_intro.xml153
-rw-r--r--lib/ose/doc/src/ose_signals_chapter.xml239
-rw-r--r--lib/ose/doc/src/part.xml38
-rw-r--r--lib/ose/doc/src/ref_man.xml (renamed from lib/tv/doc/src/ref_man.xml)31
-rw-r--r--lib/ose/ebin/.gitignore (renamed from lib/pman/ebin/.gitignore)0
-rw-r--r--lib/ose/include/.gitignore (renamed from lib/toolbar/doc/html/.gitignore)0
-rw-r--r--lib/ose/info2
-rw-r--r--lib/ose/src/Makefile (renamed from lib/pman/src/Makefile)96
-rw-r--r--lib/ose/src/ose.app.src (renamed from lib/toolbar/src/toolbar.app.src)29
-rw-r--r--lib/ose/src/ose.appup.src (renamed from lib/pman/src/pman.appup.src)19
-rw-r--r--lib/ose/src/ose.erl452
-rw-r--r--lib/ose/test/Makefile67
-rw-r--r--lib/ose/test/ose.cover2
-rw-r--r--lib/ose/test/ose.spec1
-rw-r--r--lib/ose/test/ose_SUITE.erl765
-rw-r--r--lib/ose/vsn.mk1
-rw-r--r--lib/otp_mibs/doc/src/book.xml4
-rw-r--r--lib/otp_mibs/doc/src/fascicules.xml2
-rw-r--r--lib/otp_mibs/doc/src/introduction.xml4
-rw-r--r--lib/otp_mibs/doc/src/mibs.xml4
-rw-r--r--lib/otp_mibs/doc/src/notes.xml67
-rw-r--r--lib/otp_mibs/doc/src/otp_mib.xml4
-rw-r--r--lib/otp_mibs/doc/src/part.xml4
-rw-r--r--lib/otp_mibs/doc/src/part_notes.xml4
-rw-r--r--lib/otp_mibs/doc/src/ref_man.xml4
-rw-r--r--lib/otp_mibs/mibs/OTP-EVA-MIB.mib10
-rw-r--r--lib/otp_mibs/mibs/OTP-MIB.mib30
-rw-r--r--lib/otp_mibs/mibs/OTP-REG.mib8
-rw-r--r--lib/otp_mibs/mibs/OTP-TC.mib6
-rw-r--r--lib/otp_mibs/src/Makefile2
-rw-r--r--lib/otp_mibs/src/otp_mib.erl69
-rw-r--r--lib/otp_mibs/src/otp_mibs.app.src4
-rw-r--r--lib/otp_mibs/src/otp_mibs.appup.src11
-rw-r--r--lib/otp_mibs/test/Makefile (renamed from lib/toolbar/src/Makefile)86
-rw-r--r--lib/otp_mibs/test/otp_mibs_SUITE.cfg15
-rw-r--r--lib/otp_mibs/test/otp_mibs_SUITE.erl254
-rw-r--r--lib/otp_mibs/vsn.mk2
-rw-r--r--lib/parsetools/doc/src/book.xml4
-rw-r--r--lib/parsetools/doc/src/fascicules.xml2
-rw-r--r--lib/parsetools/doc/src/leex.xml2
-rw-r--r--lib/parsetools/doc/src/notes.xml56
-rw-r--r--lib/parsetools/doc/src/notes_history.xml4
-rw-r--r--lib/parsetools/doc/src/part_notes.xml4
-rw-r--r--lib/parsetools/doc/src/ref_man.xml4
-rw-r--r--lib/parsetools/doc/src/yecc.xml12
-rw-r--r--lib/parsetools/include/leexinc.hrl12
-rw-r--r--lib/parsetools/src/parsetools.app.src3
-rw-r--r--lib/parsetools/src/parsetools.appup.src22
-rw-r--r--lib/parsetools/src/yecc.erl4
-rw-r--r--lib/parsetools/test/Makefile1
-rw-r--r--lib/parsetools/test/app_SUITE.erl50
-rw-r--r--lib/parsetools/test/leex_SUITE.erl52
-rw-r--r--lib/parsetools/test/yecc_SUITE.erl1
-rw-r--r--lib/parsetools/vsn.mk2
-rw-r--r--lib/percept/doc/src/book.xml6
-rw-r--r--lib/percept/doc/src/egd_ug.xmlsrc6
-rw-r--r--lib/percept/doc/src/fascicules.xml2
-rw-r--r--lib/percept/doc/src/notes.xml44
-rw-r--r--lib/percept/doc/src/part.xml6
-rw-r--r--lib/percept/doc/src/part_notes.xml6
-rw-r--r--lib/percept/doc/src/percept_ug.xmlsrc6
-rw-r--r--lib/percept/doc/src/ref_man.xml4
-rw-r--r--lib/percept/src/Makefile3
-rw-r--r--lib/percept/src/percept.app.src4
-rw-r--r--lib/percept/src/percept.appup.src12
-rw-r--r--lib/percept/test/percept_SUITE.erl12
-rw-r--r--lib/percept/vsn.mk2
-rw-r--r--lib/pman/AUTHORS9
-rw-r--r--lib/pman/doc/src/fascicules.xml18
-rw-r--r--lib/pman/doc/src/main_window.gifbin14431 -> 0 bytes
-rw-r--r--lib/pman/doc/src/main_window.ps1573
-rw-r--r--lib/pman/doc/src/note.gifbin1539 -> 0 bytes
-rw-r--r--lib/pman/doc/src/notes.xml211
-rw-r--r--lib/pman/doc/src/options.gifbin5218 -> 0 bytes
-rw-r--r--lib/pman/doc/src/options.ps829
-rw-r--r--lib/pman/doc/src/part_notes.xml39
-rw-r--r--lib/pman/doc/src/pman.xml88
-rw-r--r--lib/pman/doc/src/pman_chapter.xml377
-rw-r--r--lib/pman/doc/src/toolbar.gifbin6848 -> 0 bytes
-rw-r--r--lib/pman/doc/src/trace.gifbin9829 -> 0 bytes
-rw-r--r--lib/pman/doc/src/trace.ps1312
-rw-r--r--lib/pman/doc/src/warning.gifbin1498 -> 0 bytes
-rw-r--r--lib/pman/info2
-rw-r--r--lib/pman/priv/Makefile58
-rw-r--r--lib/pman/priv/pman.gifbin199 -> 0 bytes
-rw-r--r--lib/pman/priv/pman.tool6
-rw-r--r--lib/pman/src/assert.hrl81
-rw-r--r--lib/pman/src/pman.app.src40
-rw-r--r--lib/pman/src/pman.erl132
-rw-r--r--lib/pman/src/pman_buf.erl117
-rw-r--r--lib/pman/src/pman_buf_buffer.erl102
-rw-r--r--lib/pman/src/pman_buf_converter.erl190
-rw-r--r--lib/pman/src/pman_buf_printer.erl91
-rw-r--r--lib/pman/src/pman_buf_utils.erl106
-rw-r--r--lib/pman/src/pman_main.erl789
-rw-r--r--lib/pman/src/pman_module_info.erl133
-rw-r--r--lib/pman/src/pman_options.erl395
-rw-r--r--lib/pman/src/pman_options.hrl34
-rw-r--r--lib/pman/src/pman_process.erl317
-rw-r--r--lib/pman/src/pman_relay.erl127
-rw-r--r--lib/pman/src/pman_relay_server.erl57
-rw-r--r--lib/pman/src/pman_shell.erl827
-rw-r--r--lib/pman/src/pman_tool.erl146
-rw-r--r--lib/pman/src/pman_win.erl677
-rw-r--r--lib/pman/src/pman_win.hrl39
-rw-r--r--lib/pman/vsn.mk1
-rw-r--r--lib/public_key/asn1/Makefile5
-rw-r--r--lib/public_key/asn1/OTP-PKIX.asn110
-rw-r--r--lib/public_key/asn1/OTP-PUB-KEY.set.asn1
-rw-r--r--lib/public_key/asn1/RFC5639.asn127
-rw-r--r--lib/public_key/doc/src/book.xml4
-rw-r--r--lib/public_key/doc/src/cert_records.xml13
-rw-r--r--lib/public_key/doc/src/fascicules.xml2
-rw-r--r--lib/public_key/doc/src/introduction.xml2
-rw-r--r--lib/public_key/doc/src/notes.xml97
-rw-r--r--lib/public_key/doc/src/part.xml6
-rw-r--r--lib/public_key/doc/src/part_notes.xml4
-rw-r--r--lib/public_key/doc/src/public_key.xml230
-rw-r--r--lib/public_key/doc/src/public_key_records.xml70
-rw-r--r--lib/public_key/doc/src/ref_man.xml4
-rw-r--r--lib/public_key/include/public_key.hrl21
-rw-r--r--lib/public_key/src/pubkey_cert.erl38
-rw-r--r--lib/public_key/src/pubkey_cert_records.erl34
-rw-r--r--lib/public_key/src/pubkey_crl.erl36
-rw-r--r--lib/public_key/src/pubkey_pbe.erl76
-rw-r--r--lib/public_key/src/pubkey_pem.erl30
-rw-r--r--lib/public_key/src/pubkey_ssh.erl7
-rw-r--r--lib/public_key/src/public_key.app.src4
-rw-r--r--lib/public_key/src/public_key.appup.src25
-rw-r--r--lib/public_key/src/public_key.erl153
-rw-r--r--lib/public_key/test/pbe_SUITE.erl70
-rw-r--r--lib/public_key/test/pbe_SUITE_data/old_aes_128_cbc_enc_key.pem (renamed from lib/public_key/test/pbe_SUITE_data/aes_128_cbc_enc_key)0
-rw-r--r--lib/public_key/test/pbe_SUITE_data/pbes1_des_cbc_md5_enc_key.pem17
-rw-r--r--lib/public_key/test/pbe_SUITE_data/pbes2_des_cbc_enc_key.pem (renamed from lib/public_key/test/pbe_SUITE_data/des_cbc_enc_key.pem)0
-rw-r--r--lib/public_key/test/pbe_SUITE_data/pbes2_des_ede3_cbc_enc_key.pem (renamed from lib/public_key/test/pbe_SUITE_data/des_ede3_cbc_enc_key.pem)0
-rw-r--r--lib/public_key/test/pbe_SUITE_data/pbes2_rc2_cbc_enc_key.pem (renamed from lib/public_key/test/pbe_SUITE_data/rc2_cbc_enc_key.pem)0
-rw-r--r--lib/public_key/test/public_key_SUITE.erl49
-rw-r--r--lib/public_key/test/public_key_SUITE_data/crl_signer.pem25
-rw-r--r--lib/public_key/test/public_key_SUITE_data/idp_cert.pem30
-rw-r--r--lib/public_key/test/public_key_SUITE_data/idp_crl.pem18
-rw-r--r--lib/public_key/vsn.mk2
-rw-r--r--lib/reltool/doc/src/book.xml4
-rw-r--r--lib/reltool/doc/src/notes.xml64
-rw-r--r--lib/reltool/doc/src/part.xml4
-rw-r--r--lib/reltool/doc/src/ref_man.xml4
-rw-r--r--lib/reltool/doc/src/reltool.xml2
-rw-r--r--lib/reltool/doc/src/reltool_examples.xml2
-rw-r--r--lib/reltool/doc/src/reltool_intro.xml4
-rw-r--r--lib/reltool/doc/src/reltool_usage.xml4
-rw-r--r--lib/reltool/src/reltool.app.src4
-rw-r--r--lib/reltool/src/reltool.appup.src9
-rw-r--r--lib/reltool/src/reltool.hrl3
-rw-r--r--lib/reltool/src/reltool_server.erl7
-rw-r--r--lib/reltool/src/reltool_target.erl9
-rw-r--r--lib/reltool/src/reltool_utils.erl2
-rw-r--r--lib/reltool/test/reltool_app_SUITE.erl9
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl23
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/unicode/ua-1.0/ebin/ua.app1
-rw-r--r--lib/reltool/test/reltool_test_lib.erl60
-rw-r--r--lib/reltool/vsn.mk2
-rw-r--r--lib/runtime_tools/c_src/Makefile.in33
-rw-r--r--lib/runtime_tools/c_src/dyntrace.c3
-rw-r--r--lib/runtime_tools/doc/specs/.gitignore1
-rw-r--r--lib/runtime_tools/doc/src/Makefile10
-rw-r--r--lib/runtime_tools/doc/src/book.xml2
-rw-r--r--lib/runtime_tools/doc/src/dbg.xml6
-rw-r--r--lib/runtime_tools/doc/src/dyntrace.xml4
-rw-r--r--lib/runtime_tools/doc/src/erts_alloc_config.xml4
-rw-r--r--lib/runtime_tools/doc/src/fascicules.xml2
-rw-r--r--lib/runtime_tools/doc/src/notes.xml122
-rw-r--r--lib/runtime_tools/doc/src/notes_history.xml4
-rw-r--r--lib/runtime_tools/doc/src/part.xml4
-rw-r--r--lib/runtime_tools/doc/src/part_notes.xml4
-rw-r--r--lib/runtime_tools/doc/src/part_notes_history.xml4
-rw-r--r--lib/runtime_tools/doc/src/ref_man.xml5
-rw-r--r--lib/runtime_tools/doc/src/runtime_tools_app.xml4
-rw-r--r--lib/runtime_tools/doc/src/specs.xml4
-rw-r--r--lib/runtime_tools/doc/src/system_information.xml98
-rw-r--r--lib/runtime_tools/src/dbg.erl64
-rw-r--r--lib/runtime_tools/src/erts_alloc_config.erl169
-rw-r--r--lib/runtime_tools/src/observer_backend.erl43
-rw-r--r--lib/runtime_tools/src/runtime_tools.app.src4
-rw-r--r--lib/runtime_tools/src/runtime_tools.appup.src10
-rw-r--r--lib/runtime_tools/src/runtime_tools_sup.erl1
-rw-r--r--lib/runtime_tools/src/system_information.erl289
-rw-r--r--lib/runtime_tools/src/ttb_autostart.erl1
-rw-r--r--lib/runtime_tools/test/dbg_SUITE.erl36
-rw-r--r--lib/runtime_tools/test/runtime_tools_SUITE.erl6
-rw-r--r--lib/runtime_tools/test/system_information_SUITE.erl10
-rw-r--r--lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat4
-rw-r--r--lib/runtime_tools/vsn.mk2
-rw-r--r--lib/sasl/doc/src/alarm_handler.xml14
-rw-r--r--lib/sasl/doc/src/appup.xml25
-rw-r--r--lib/sasl/doc/src/book.xml4
-rw-r--r--lib/sasl/doc/src/error_logging.xml4
-rw-r--r--lib/sasl/doc/src/fascicules.xml2
-rw-r--r--lib/sasl/doc/src/notes.xml80
-rw-r--r--lib/sasl/doc/src/notes_history.xml4
-rw-r--r--lib/sasl/doc/src/overload.xml4
-rw-r--r--lib/sasl/doc/src/part.xml4
-rw-r--r--lib/sasl/doc/src/part_notes.xml4
-rw-r--r--lib/sasl/doc/src/part_notes_history.xml4
-rw-r--r--lib/sasl/doc/src/rb.xml4
-rw-r--r--lib/sasl/doc/src/ref_man.xml4
-rw-r--r--lib/sasl/doc/src/rel.xml4
-rw-r--r--lib/sasl/doc/src/release_handler.xml4
-rw-r--r--lib/sasl/doc/src/relup.xml4
-rw-r--r--lib/sasl/doc/src/sasl_app.xml4
-rw-r--r--lib/sasl/doc/src/sasl_intro.xml4
-rw-r--r--lib/sasl/doc/src/script.xml4
-rw-r--r--lib/sasl/doc/src/systools.xml2
-rw-r--r--lib/sasl/examples/src/target_system.erl49
-rw-r--r--lib/sasl/src/erlsrv.erl15
-rw-r--r--lib/sasl/src/format_lib_supp.erl4
-rw-r--r--lib/sasl/src/overload.erl3
-rw-r--r--lib/sasl/src/rb.erl14
-rw-r--r--lib/sasl/src/release_handler.erl101
-rw-r--r--lib/sasl/src/release_handler_1.erl2
-rw-r--r--lib/sasl/src/sasl.app.src4
-rw-r--r--lib/sasl/src/sasl.appup.src18
-rw-r--r--lib/sasl/src/sasl_report_file_h.erl6
-rw-r--r--lib/sasl/src/sasl_report_tty_h.erl4
-rw-r--r--lib/sasl/src/si.erl4
-rw-r--r--lib/sasl/src/si_sasl_supp.erl8
-rw-r--r--lib/sasl/src/systools_lib.erl12
-rw-r--r--lib/sasl/src/systools_make.erl73
-rw-r--r--lib/sasl/src/systools_rc.erl14
-rw-r--r--lib/sasl/src/systools_relup.erl19
-rw-r--r--lib/sasl/test/installer.erl15
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl324
-rw-r--r--lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app (renamed from lib/pman/src/pman_buf.hrl)24
-rw-r--r--lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup (renamed from lib/kernel/test/code_SUITE_data/calendar.erl)24
-rw-r--r--lib/sasl/test/rh_test_lib.erl64
-rw-r--r--lib/sasl/test/sasl_SUITE.erl172
-rw-r--r--lib/sasl/test/systools_SUITE.erl68
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl2
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl2
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app1
-rw-r--r--lib/sasl/test/systools_rc_SUITE.erl168
-rw-r--r--lib/sasl/test/test_lib.hrl4
-rw-r--r--lib/sasl/vsn.mk2
-rw-r--r--lib/snmp/.gitignore3
-rw-r--r--lib/snmp/doc/src/book.xml4
-rw-r--r--lib/snmp/doc/src/fascicules.xml2
-rw-r--r--lib/snmp/doc/src/notes.xml240
-rw-r--r--lib/snmp/doc/src/notes_history.xml4
-rw-r--r--lib/snmp/doc/src/part.xml4
-rw-r--r--lib/snmp/doc/src/part_notes.xml4
-rw-r--r--lib/snmp/doc/src/part_notes_history.xml4
-rw-r--r--lib/snmp/doc/src/ref_man.xml2
-rw-r--r--lib/snmp/doc/src/snmp.xml4
-rw-r--r--lib/snmp/doc/src/snmp_advanced_agent.xml4
-rw-r--r--lib/snmp/doc/src/snmp_agent_config_files.xml58
-rw-r--r--lib/snmp/doc/src/snmp_agent_funct_descr.xml4
-rw-r--r--lib/snmp/doc/src/snmp_agent_netif.xml36
-rw-r--r--lib/snmp/doc/src/snmp_app.xml2
-rw-r--r--lib/snmp/doc/src/snmp_app_a.xml4
-rw-r--r--lib/snmp/doc/src/snmp_app_b.xml4
-rw-r--r--lib/snmp/doc/src/snmp_audit_trail_log.xml4
-rw-r--r--lib/snmp/doc/src/snmp_community_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmp_config.xml2
-rw-r--r--lib/snmp/doc/src/snmp_def_instr_functions.xml4
-rw-r--r--lib/snmp/doc/src/snmp_framework_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmp_generic.xml4
-rw-r--r--lib/snmp/doc/src/snmp_impl_example_agent.xml4
-rw-r--r--lib/snmp/doc/src/snmp_impl_example_manager.xml4
-rw-r--r--lib/snmp/doc/src/snmp_index.xml4
-rw-r--r--lib/snmp/doc/src/snmp_instr_functions.xml4
-rw-r--r--lib/snmp/doc/src/snmp_intro.xml4
-rw-r--r--lib/snmp/doc/src/snmp_manager_config_files.xml65
-rw-r--r--lib/snmp/doc/src/snmp_manager_funct_descr.xml4
-rw-r--r--lib/snmp/doc/src/snmp_manager_netif.xml47
-rw-r--r--lib/snmp/doc/src/snmp_mib_compiler.xml4
-rw-r--r--lib/snmp/doc/src/snmp_notification_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmp_pdus.xml4
-rw-r--r--lib/snmp/doc/src/snmp_standard_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmp_target_mib.xml24
-rw-r--r--lib/snmp/doc/src/snmp_user_based_sm_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmp_view_based_acm_mib.xml4
-rw-r--r--lib/snmp/doc/src/snmpa.xml2
-rw-r--r--lib/snmp/doc/src/snmpa_conf.xml68
-rw-r--r--lib/snmp/doc/src/snmpa_discovery_handler.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_error.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_error_io.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_error_logger.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_error_report.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_local_db.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_mib_data.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_mib_storage.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_mpd.xml69
-rw-r--r--lib/snmp/doc/src/snmpa_network_interface.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_network_interface_filter.xml42
-rw-r--r--lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml34
-rw-r--r--lib/snmp/doc/src/snmpa_notification_filter.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_supervisor.xml4
-rw-r--r--lib/snmp/doc/src/snmpc.xml4
-rw-r--r--lib/snmp/doc/src/snmpc_cmd.xml4
-rw-r--r--lib/snmp/doc/src/snmpm.xml16
-rw-r--r--lib/snmp/doc/src/snmpm_conf.xml10
-rw-r--r--lib/snmp/doc/src/snmpm_mpd.xml16
-rw-r--r--lib/snmp/doc/src/snmpm_network_interface.xml14
-rw-r--r--lib/snmp/doc/src/snmpm_network_interface_filter.xml36
-rw-r--r--lib/snmp/doc/src/snmpm_user.xml17
-rw-r--r--lib/snmp/src/agent/snmp_community_mib.erl78
-rw-r--r--lib/snmp/src/agent/snmp_framework_mib.erl115
-rw-r--r--lib/snmp/src/agent/snmp_generic.erl30
-rw-r--r--lib/snmp/src/agent/snmp_notification_mib.erl24
-rw-r--r--lib/snmp/src/agent/snmp_standard_mib.erl23
-rw-r--r--lib/snmp/src/agent/snmp_target_mib.erl258
-rw-r--r--lib/snmp/src/agent/snmp_user_based_sm_mib.erl14
-rw-r--r--lib/snmp/src/agent/snmp_view_based_acm_mib.erl23
-rw-r--r--lib/snmp/src/agent/snmpa_agent.erl17
-rw-r--r--lib/snmp/src/agent/snmpa_conf.erl605
-rw-r--r--lib/snmp/src/agent/snmpa_local_db.erl6
-rw-r--r--lib/snmp/src/agent/snmpa_mpd.erl120
-rw-r--r--lib/snmp/src/agent/snmpa_net_if.erl1288
-rw-r--r--lib/snmp/src/agent/snmpa_net_if_filter.erl56
-rw-r--r--lib/snmp/src/agent/snmpa_network_interface_filter.erl13
-rw-r--r--lib/snmp/src/agent/snmpa_trap.erl172
-rw-r--r--lib/snmp/src/app/snmp.app.src4
-rw-r--r--lib/snmp/src/app/snmp.appup.src26
-rw-r--r--lib/snmp/src/compile/snmpc_lib.erl1
-rw-r--r--lib/snmp/src/manager/depend.mk5
-rw-r--r--lib/snmp/src/manager/snmpm.erl49
-rw-r--r--lib/snmp/src/manager/snmpm_conf.erl256
-rw-r--r--lib/snmp/src/manager/snmpm_config.erl1283
-rw-r--r--lib/snmp/src/manager/snmpm_mpd.erl76
-rw-r--r--lib/snmp/src/manager/snmpm_net_if.erl904
-rw-r--r--lib/snmp/src/manager/snmpm_net_if_filter.erl60
-rw-r--r--lib/snmp/src/manager/snmpm_net_if_mt.erl1244
-rw-r--r--lib/snmp/src/manager/snmpm_server.erl671
-rw-r--r--lib/snmp/src/manager/snmpm_user.erl23
-rw-r--r--lib/snmp/src/manager/snmpm_user_default.erl16
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl739
-rw-r--r--lib/snmp/src/misc/snmp_config.erl565
-rw-r--r--lib/snmp/src/misc/snmp_log.erl209
-rw-r--r--lib/snmp/src/misc/snmp_pdus.erl8
-rw-r--r--lib/snmp/test/Makefile9
-rw-r--r--lib/snmp/test/klas3.erl13
-rw-r--r--lib/snmp/test/modules.mk4
-rw-r--r--lib/snmp/test/snmp_SUITE.erl29
-rw-r--r--lib/snmp/test/snmp_agent_test.erl759
-rw-r--r--lib/snmp/test/snmp_agent_test_lib.erl99
-rw-r--r--lib/snmp/test/snmp_appup_test.erl491
-rw-r--r--lib/snmp/test/snmp_conf_test.erl8
-rw-r--r--lib/snmp/test/snmp_manager_config_test.erl25
-rw-r--r--lib/snmp/test/snmp_manager_test.erl497
-rw-r--r--lib/snmp/test/snmp_manager_user.erl15
-rw-r--r--lib/snmp/test/snmp_test_lib.erl7
-rw-r--r--lib/snmp/test/snmp_test_lib.hrl19
-rw-r--r--lib/snmp/test/snmp_test_manager.erl6
-rw-r--r--lib/snmp/test/snmp_test_mgr.erl41
-rw-r--r--lib/snmp/test/snmp_test_mgr_counter_server.erl152
-rw-r--r--lib/snmp/test/snmp_test_mgr_misc.erl52
-rw-r--r--lib/snmp/test/snmp_to_snmpnet_SUITE.erl559
-rw-r--r--lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.binbin0 -> 3640 bytes
-rw-r--r--lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.mib71
-rw-r--r--lib/snmp/test/snmp_to_snmpnet_SUITE_data/snmpd.conf12
-rwxr-xr-xlib/snmp/test/snmp_to_snmpnet_SUITE_data/start_stop_wrapper47
-rw-r--r--lib/snmp/vsn.mk4
-rw-r--r--lib/ssh/doc/src/book.xml4
-rw-r--r--lib/ssh/doc/src/fascicules.xml2
-rw-r--r--lib/ssh/doc/src/introduction.xml2
-rw-r--r--lib/ssh/doc/src/notes.xml609
-rw-r--r--lib/ssh/doc/src/part_notes.xml4
-rw-r--r--lib/ssh/doc/src/ref_man.xml4
-rw-r--r--lib/ssh/doc/src/ssh.xml96
-rw-r--r--lib/ssh/doc/src/ssh_app.xml4
-rw-r--r--lib/ssh/doc/src/ssh_channel.xml2
-rw-r--r--lib/ssh/doc/src/ssh_client_key_api.xml2
-rw-r--r--lib/ssh/doc/src/ssh_connection.xml73
-rw-r--r--lib/ssh/doc/src/ssh_protocol.xml4
-rw-r--r--lib/ssh/doc/src/ssh_server_key_api.xml2
-rw-r--r--lib/ssh/doc/src/ssh_sftp.xml127
-rw-r--r--lib/ssh/doc/src/ssh_sftpd.xml2
-rw-r--r--lib/ssh/doc/src/usersguide.xml4
-rw-r--r--lib/ssh/doc/src/using_ssh.xml8
-rw-r--r--lib/ssh/examples/Makefile5
-rw-r--r--lib/ssh/examples/ssh_device.erl62
-rw-r--r--lib/ssh/src/Makefile3
-rw-r--r--lib/ssh/src/ssh.app.src5
-rw-r--r--lib/ssh/src/ssh.appup.src12
-rw-r--r--lib/ssh/src/ssh.erl107
-rw-r--r--lib/ssh/src/ssh.hrl1
-rw-r--r--lib/ssh/src/ssh_acceptor.erl52
-rw-r--r--lib/ssh/src/ssh_acceptor_sup.erl13
-rw-r--r--lib/ssh/src/ssh_auth.erl201
-rw-r--r--lib/ssh/src/ssh_bits.erl4
-rw-r--r--lib/ssh/src/ssh_channel.erl14
-rw-r--r--lib/ssh/src/ssh_cli.erl29
-rw-r--r--lib/ssh/src/ssh_connect.hrl7
-rw-r--r--lib/ssh/src/ssh_connection.erl339
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl319
-rw-r--r--lib/ssh/src/ssh_file.erl26
-rw-r--r--lib/ssh/src/ssh_info.erl201
-rw-r--r--lib/ssh/src/ssh_io.erl8
-rw-r--r--lib/ssh/src/ssh_message.erl71
-rw-r--r--lib/ssh/src/ssh_sftp.erl356
-rw-r--r--lib/ssh/src/ssh_sftpd.erl142
-rw-r--r--lib/ssh/src/ssh_system_sup.erl8
-rw-r--r--lib/ssh/src/ssh_transport.erl200
-rw-r--r--lib/ssh/src/ssh_xfer.erl74
-rw-r--r--lib/ssh/test/property_test/README12
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server.erl618
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_dsa13
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_rsa15
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key13
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key.pub11
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key16
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key.pub5
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_encode_decode.erl395
-rw-r--r--lib/ssh/test/property_test/ssh_eqc_subsys.erl63
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl619
-rw-r--r--lib/ssh/test/ssh_connection_SUITE.erl383
-rw-r--r--lib/ssh/test/ssh_property_test_SUITE.erl107
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE.erl492
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/big.txt16384
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f11
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f21
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f1.txt1
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f2.txt1
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl48
-rw-r--r--lib/ssh/test/ssh_test_lib.erl19
-rw-r--r--lib/ssh/test/ssh_to_openssh_SUITE.erl197
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE.erl587
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt1
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt1
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key13
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub11
-rw-r--r--lib/ssh/vsn.mk3
-rw-r--r--lib/ssl/doc/src/book.xml4
-rw-r--r--lib/ssl/doc/src/fascicules.xml2
-rw-r--r--lib/ssl/doc/src/notes.xml447
-rw-r--r--lib/ssl/doc/src/pkix_certs.xml4
-rw-r--r--lib/ssl/doc/src/refman.xml4
-rw-r--r--lib/ssl/doc/src/release_notes.xml4
-rw-r--r--lib/ssl/doc/src/ssl.xml182
-rw-r--r--lib/ssl/doc/src/ssl_app.xml15
-rw-r--r--lib/ssl/doc/src/ssl_distribution.xml4
-rw-r--r--lib/ssl/doc/src/ssl_protocol.xml6
-rw-r--r--lib/ssl/doc/src/ssl_session_cache_api.xml4
-rw-r--r--lib/ssl/doc/src/usersguide.xml4
-rw-r--r--lib/ssl/doc/src/using_ssl.xml4
-rw-r--r--lib/ssl/internal_doc/ssl-implementation.txt52
-rw-r--r--lib/ssl/src/Makefile5
-rw-r--r--lib/ssl/src/dtls.erl46
-rw-r--r--lib/ssl/src/dtls_connection.erl725
-rw-r--r--lib/ssl/src/dtls_connection.hrl21
-rw-r--r--lib/ssl/src/dtls_connection_sup.erl12
-rw-r--r--lib/ssl/src/dtls_handshake.erl404
-rw-r--r--lib/ssl/src/dtls_handshake.hrl4
-rw-r--r--lib/ssl/src/dtls_record.erl59
-rw-r--r--lib/ssl/src/dtls_record.hrl13
-rw-r--r--lib/ssl/src/dtls_v1.erl4
-rw-r--r--lib/ssl/src/ssl.app.src5
-rw-r--r--lib/ssl/src/ssl.appup.src33
-rw-r--r--lib/ssl/src/ssl.erl495
-rw-r--r--lib/ssl/src/ssl_alert.erl49
-rw-r--r--lib/ssl/src/ssl_alert.hrl20
-rw-r--r--lib/ssl/src/ssl_api.hrl33
-rw-r--r--lib/ssl/src/ssl_certificate.erl113
-rw-r--r--lib/ssl/src/ssl_cipher.erl87
-rw-r--r--lib/ssl/src/ssl_cipher.hrl16
-rw-r--r--lib/ssl/src/ssl_connection.erl262
-rw-r--r--lib/ssl/src/ssl_connection.hrl38
-rw-r--r--lib/ssl/src/ssl_dist_sup.erl16
-rw-r--r--lib/ssl/src/ssl_handshake.erl246
-rw-r--r--lib/ssl/src/ssl_handshake.hrl16
-rw-r--r--lib/ssl/src/ssl_internal.hrl50
-rw-r--r--lib/ssl/src/ssl_listen_tracker_sup.erl71
-rw-r--r--lib/ssl/src/ssl_manager.erl106
-rw-r--r--lib/ssl/src/ssl_pkix_db.erl33
-rw-r--r--lib/ssl/src/ssl_record.erl26
-rw-r--r--lib/ssl/src/ssl_record.hrl6
-rw-r--r--lib/ssl/src/ssl_socket.erl209
-rw-r--r--lib/ssl/src/ssl_sup.erl29
-rw-r--r--lib/ssl/src/ssl_v3.erl4
-rw-r--r--lib/ssl/src/tls.erl45
-rw-r--r--lib/ssl/src/tls_connection.erl177
-rw-r--r--lib/ssl/src/tls_connection_sup.erl4
-rw-r--r--lib/ssl/src/tls_handshake.erl98
-rw-r--r--lib/ssl/src/tls_handshake.hrl4
-rw-r--r--lib/ssl/src/tls_record.erl71
-rw-r--r--lib/ssl/src/tls_v1.erl90
-rw-r--r--lib/ssl/test/Makefile4
-rw-r--r--lib/ssl/test/erl_make_certs.erl6
-rw-r--r--lib/ssl/test/make_certs.erl315
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE.erl184
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/CA.pem14
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/ec1.crt11
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/ec1.key8
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/ec2.crt11
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/ec2.key8
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/rsa1.crt20
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/rsa1.key51
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/rsa2.crt20
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE_data/rsa2.key51
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl476
-rw-r--r--lib/ssl/test/ssl_certificate_verify_SUITE.erl201
-rw-r--r--lib/ssl/test/ssl_cipher_SUITE.erl188
-rw-r--r--lib/ssl/test/ssl_crl_SUITE.erl542
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl2
-rw-r--r--lib/ssl/test/ssl_handshake_SUITE.erl42
-rw-r--r--lib/ssl/test/ssl_pem_cache_SUITE.erl127
-rw-r--r--lib/ssl/test/ssl_test_lib.erl299
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl142
-rw-r--r--lib/ssl/vsn.mk2
-rw-r--r--lib/stdlib/doc/src/Makefile1
-rw-r--r--lib/stdlib/doc/src/array.xml18
-rw-r--r--lib/stdlib/doc/src/base64.xml2
-rw-r--r--lib/stdlib/doc/src/beam_lib.xml4
-rw-r--r--lib/stdlib/doc/src/binary.xml4
-rw-r--r--lib/stdlib/doc/src/book.xml4
-rw-r--r--lib/stdlib/doc/src/c.xml2
-rw-r--r--lib/stdlib/doc/src/calendar.xml4
-rw-r--r--lib/stdlib/doc/src/dets.xml4
-rw-r--r--lib/stdlib/doc/src/dict.xml21
-rw-r--r--lib/stdlib/doc/src/digraph.xml6
-rw-r--r--lib/stdlib/doc/src/digraph_utils.xml4
-rw-r--r--lib/stdlib/doc/src/epp.xml66
-rw-r--r--lib/stdlib/doc/src/erl_eval.xml2
-rw-r--r--lib/stdlib/doc/src/erl_expand_records.xml4
-rw-r--r--lib/stdlib/doc/src/erl_id_trans.xml4
-rw-r--r--lib/stdlib/doc/src/erl_internal.xml4
-rw-r--r--lib/stdlib/doc/src/erl_lint.xml4
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml12
-rw-r--r--lib/stdlib/doc/src/erl_pp.xml4
-rw-r--r--lib/stdlib/doc/src/erl_scan.xml4
-rw-r--r--lib/stdlib/doc/src/erl_tar.xml141
-rw-r--r--lib/stdlib/doc/src/ets.xml8
-rw-r--r--lib/stdlib/doc/src/fascicules.xml2
-rw-r--r--lib/stdlib/doc/src/file_sorter.xml4
-rw-r--r--lib/stdlib/doc/src/filelib.xml2
-rw-r--r--lib/stdlib/doc/src/filename.xml4
-rw-r--r--lib/stdlib/doc/src/gb_sets.xml92
-rw-r--r--lib/stdlib/doc/src/gb_trees.xml48
-rw-r--r--lib/stdlib/doc/src/gen_event.xml4
-rw-r--r--lib/stdlib/doc/src/gen_fsm.xml8
-rw-r--r--lib/stdlib/doc/src/gen_server.xml6
-rw-r--r--lib/stdlib/doc/src/io.xml2
-rw-r--r--lib/stdlib/doc/src/io_lib.xml2
-rw-r--r--lib/stdlib/doc/src/io_protocol.xml13
-rw-r--r--lib/stdlib/doc/src/lib.xml4
-rw-r--r--lib/stdlib/doc/src/lists.xml10
-rw-r--r--lib/stdlib/doc/src/log_mf_h.xml4
-rw-r--r--lib/stdlib/doc/src/maps.xml355
-rw-r--r--lib/stdlib/doc/src/math.xml4
-rw-r--r--lib/stdlib/doc/src/ms_transform.xml4
-rw-r--r--lib/stdlib/doc/src/notes.xml699
-rw-r--r--lib/stdlib/doc/src/notes_history.xml4
-rw-r--r--lib/stdlib/doc/src/orddict.xml11
-rw-r--r--lib/stdlib/doc/src/ordsets.xml4
-rw-r--r--lib/stdlib/doc/src/part.xml4
-rw-r--r--lib/stdlib/doc/src/part_notes.xml4
-rw-r--r--lib/stdlib/doc/src/part_notes_history.xml4
-rw-r--r--lib/stdlib/doc/src/pg.xml7
-rw-r--r--lib/stdlib/doc/src/pool.xml4
-rw-r--r--lib/stdlib/doc/src/proc_lib.xml4
-rw-r--r--lib/stdlib/doc/src/proplists.xml2
-rw-r--r--lib/stdlib/doc/src/qlc.xml4
-rw-r--r--lib/stdlib/doc/src/queue.xml12
-rw-r--r--lib/stdlib/doc/src/random.xml4
-rw-r--r--lib/stdlib/doc/src/re.xml1834
-rw-r--r--lib/stdlib/doc/src/ref_man.xml5
-rw-r--r--lib/stdlib/doc/src/sets.xml12
-rw-r--r--lib/stdlib/doc/src/shell.xml2
-rw-r--r--lib/stdlib/doc/src/shell_default.xml4
-rw-r--r--lib/stdlib/doc/src/slave.xml4
-rw-r--r--lib/stdlib/doc/src/sofs.xml4
-rw-r--r--lib/stdlib/doc/src/specs.xml3
-rw-r--r--lib/stdlib/doc/src/stdlib_app.xml2
-rw-r--r--lib/stdlib/doc/src/string.xml8
-rw-r--r--lib/stdlib/doc/src/supervisor.xml8
-rw-r--r--lib/stdlib/doc/src/supervisor_bridge.xml4
-rw-r--r--lib/stdlib/doc/src/sys.xml80
-rw-r--r--lib/stdlib/doc/src/timer.xml4
-rw-r--r--lib/stdlib/doc/src/unicode.xml2
-rw-r--r--lib/stdlib/doc/src/unicode_usage.xml84
-rw-r--r--lib/stdlib/doc/src/win32reg.xml4
-rw-r--r--lib/stdlib/doc/src/zip.xml15
-rw-r--r--lib/stdlib/examples/erl_id_trans.erl37
-rw-r--r--lib/stdlib/src/Makefile1
-rw-r--r--lib/stdlib/src/array.erl102
-rw-r--r--lib/stdlib/src/beam_lib.erl2
-rw-r--r--lib/stdlib/src/binary.erl8
-rw-r--r--lib/stdlib/src/c.erl30
-rw-r--r--lib/stdlib/src/dets.erl128
-rw-r--r--lib/stdlib/src/dets_server.erl24
-rw-r--r--lib/stdlib/src/dets_utils.erl24
-rw-r--r--lib/stdlib/src/dets_v8.erl8
-rw-r--r--lib/stdlib/src/dets_v9.erl14
-rw-r--r--lib/stdlib/src/dict.erl131
-rw-r--r--lib/stdlib/src/digraph.erl98
-rw-r--r--lib/stdlib/src/digraph_utils.erl46
-rw-r--r--lib/stdlib/src/edlin.erl5
-rw-r--r--lib/stdlib/src/edlin_expand.erl8
-rw-r--r--lib/stdlib/src/epp.erl201
-rw-r--r--lib/stdlib/src/erl_compile.erl243
-rw-r--r--lib/stdlib/src/erl_eval.erl244
-rw-r--r--lib/stdlib/src/erl_expand_records.erl60
-rw-r--r--lib/stdlib/src/erl_internal.erl7
-rw-r--r--lib/stdlib/src/erl_lint.erl422
-rw-r--r--lib/stdlib/src/erl_parse.yrl154
-rw-r--r--lib/stdlib/src/erl_pp.erl60
-rw-r--r--lib/stdlib/src/erl_scan.erl12
-rw-r--r--lib/stdlib/src/erl_tar.erl167
-rw-r--r--lib/stdlib/src/error_logger_tty_h.erl11
-rw-r--r--lib/stdlib/src/escript.erl23
-rw-r--r--lib/stdlib/src/ets.erl74
-rw-r--r--lib/stdlib/src/eval_bits.erl19
-rw-r--r--lib/stdlib/src/file_sorter.erl32
-rw-r--r--lib/stdlib/src/filelib.erl16
-rw-r--r--lib/stdlib/src/filename.erl6
-rw-r--r--lib/stdlib/src/gb_sets.erl168
-rw-r--r--lib/stdlib/src/gb_trees.erl140
-rw-r--r--lib/stdlib/src/gen.erl6
-rw-r--r--lib/stdlib/src/gen_event.erl85
-rw-r--r--lib/stdlib/src/gen_fsm.erl71
-rw-r--r--lib/stdlib/src/gen_server.erl214
-rw-r--r--lib/stdlib/src/io.erl53
-rw-r--r--lib/stdlib/src/io_lib.erl17
-rw-r--r--lib/stdlib/src/io_lib_format.erl2
-rw-r--r--lib/stdlib/src/io_lib_pretty.erl53
-rw-r--r--lib/stdlib/src/lists.erl15
-rw-r--r--lib/stdlib/src/log_mf_h.erl13
-rw-r--r--lib/stdlib/src/maps.erl214
-rw-r--r--lib/stdlib/src/ms_transform.erl13
-rw-r--r--lib/stdlib/src/orddict.erl16
-rw-r--r--lib/stdlib/src/otp_internal.erl83
-rw-r--r--lib/stdlib/src/pg.erl3
-rw-r--r--lib/stdlib/src/pool.erl4
-rw-r--r--lib/stdlib/src/proc_lib.erl6
-rw-r--r--lib/stdlib/src/qlc.erl2
-rw-r--r--lib/stdlib/src/qlc_pt.erl27
-rw-r--r--lib/stdlib/src/queue.erl75
-rw-r--r--lib/stdlib/src/re.erl177
-rw-r--r--lib/stdlib/src/sets.erl116
-rw-r--r--lib/stdlib/src/shell.erl23
-rw-r--r--lib/stdlib/src/slave.erl49
-rw-r--r--lib/stdlib/src/sofs.erl10
-rw-r--r--lib/stdlib/src/stdlib.app.src6
-rw-r--r--lib/stdlib/src/stdlib.appup.src18
-rw-r--r--lib/stdlib/src/string.erl1
-rw-r--r--lib/stdlib/src/supervisor.erl68
-rw-r--r--lib/stdlib/src/supervisor_bridge.erl11
-rw-r--r--lib/stdlib/src/sys.erl79
-rw-r--r--lib/stdlib/src/timer.erl2
-rw-r--r--lib/stdlib/src/zip.erl37
-rw-r--r--lib/stdlib/test/Makefile5
-rw-r--r--lib/stdlib/test/base64_SUITE.erl3
-rw-r--r--lib/stdlib/test/binary_module_SUITE.erl5
-rw-r--r--lib/stdlib/test/dets_SUITE.erl252
-rw-r--r--lib/stdlib/test/dict_SUITE.erl11
-rw-r--r--lib/stdlib/test/dict_test_lib.erl1
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE.erl165
-rw-r--r--lib/stdlib/test/epp_SUITE.erl106
-rw-r--r--lib/stdlib/test/erl_eval_SUITE.erl70
-rw-r--r--lib/stdlib/test/erl_expand_records_SUITE.erl21
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl393
-rw-r--r--lib/stdlib/test/erl_lint_SUITE_data/predef.erl67
-rw-r--r--lib/stdlib/test/erl_lint_SUITE_data/predef2.erl56
-rw-r--r--lib/stdlib/test/erl_pp_SUITE.erl90
-rw-r--r--lib/stdlib/test/erl_scan_SUITE.erl289
-rw-r--r--lib/stdlib/test/ets_SUITE.erl71
-rw-r--r--lib/stdlib/test/expand_test.erl6
-rw-r--r--lib/stdlib/test/expand_test1.erl4
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl145
-rw-r--r--lib/stdlib/test/filename_SUITE.erl53
-rw-r--r--lib/stdlib/test/gen_event_SUITE.erl11
-rw-r--r--lib/stdlib/test/gen_fsm_SUITE.erl59
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl62
-rw-r--r--lib/stdlib/test/io_SUITE.erl53
-rw-r--r--lib/stdlib/test/lists_SUITE.erl12
-rw-r--r--lib/stdlib/test/maps_SUITE.erl80
-rw-r--r--lib/stdlib/test/ms_transform_SUITE.erl40
-rw-r--r--lib/stdlib/test/qlc_SUITE.erl45
-rw-r--r--lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl1
-rw-r--r--lib/stdlib/test/re_SUITE.erl483
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput12625
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput10252
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput24832
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput38
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput4312
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput51764
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput61397
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput78380
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput88584
-rw-r--r--lib/stdlib/test/re_SUITE_data/testoutput92650
-rw-r--r--lib/stdlib/test/re_testoutput1_replacement_test.erl9828
-rw-r--r--lib/stdlib/test/re_testoutput1_split_test.erl15982
-rw-r--r--lib/stdlib/test/run_pcre_tests.erl289
-rw-r--r--lib/stdlib/test/shell_SUITE.erl30
-rw-r--r--lib/stdlib/test/stdlib_SUITE.erl129
-rw-r--r--lib/stdlib/test/string_SUITE.erl3
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl57
-rw-r--r--lib/stdlib/test/sys_SUITE.erl84
-rw-r--r--lib/stdlib/test/sys_sp1.erl114
-rw-r--r--lib/stdlib/test/sys_sp2.erl107
-rw-r--r--lib/stdlib/test/tar_SUITE.erl69
-rw-r--r--lib/stdlib/test/unicode_SUITE.erl12
-rw-r--r--lib/stdlib/vsn.mk2
-rw-r--r--lib/syntax_tools/doc/src/book.xml4
-rw-r--r--lib/syntax_tools/doc/src/fascicules.xml2
-rw-r--r--lib/syntax_tools/doc/src/notes.xml127
-rw-r--r--lib/syntax_tools/doc/src/part.xml4
-rw-r--r--lib/syntax_tools/doc/src/part_notes.xml4
-rw-r--r--lib/syntax_tools/doc/src/ref_man.xml4
-rw-r--r--lib/syntax_tools/src/epp_dodger.erl34
-rw-r--r--lib/syntax_tools/src/erl_comment_scan.erl13
-rw-r--r--lib/syntax_tools/src/erl_prettypr.erl34
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl406
-rw-r--r--lib/syntax_tools/src/erl_syntax_lib.erl10
-rw-r--r--lib/syntax_tools/src/erl_tidy.erl37
-rw-r--r--lib/syntax_tools/src/igor.erl20
-rw-r--r--lib/syntax_tools/src/syntax_tools.app.src3
-rw-r--r--lib/syntax_tools/src/syntax_tools.appup.src22
-rw-r--r--lib/syntax_tools/test/Makefile1
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE.erl332
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/m1.erl22
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/m2.erl26
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_SUITE_test_module.erl540
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_test.erl115
-rw-r--r--lib/syntax_tools/vsn.mk2
-rw-r--r--lib/test_server/doc/src/basics_chapter.xml2
-rw-r--r--lib/test_server/doc/src/book.xml4
-rw-r--r--lib/test_server/doc/src/example_chapter.xml4
-rw-r--r--lib/test_server/doc/src/fascicules.xml2
-rw-r--r--lib/test_server/doc/src/notes.xml191
-rw-r--r--lib/test_server/doc/src/notes_history.xml4
-rw-r--r--lib/test_server/doc/src/part.xml2
-rw-r--r--lib/test_server/doc/src/part_notes.xml2
-rw-r--r--lib/test_server/doc/src/part_notes_history.xml2
-rw-r--r--lib/test_server/doc/src/ref_man.xml2
-rw-r--r--lib/test_server/doc/src/run_test_chapter.xml4
-rw-r--r--lib/test_server/doc/src/test_server.xml27
-rw-r--r--lib/test_server/doc/src/test_server_app.xml2
-rw-r--r--lib/test_server/doc/src/test_server_ctrl.xml13
-rw-r--r--lib/test_server/doc/src/test_spec_chapter.xml2
-rw-r--r--lib/test_server/doc/src/ts.xml4
-rw-r--r--lib/test_server/doc/src/why_test_chapter.xml4
-rw-r--r--lib/test_server/doc/src/write_framework_chapter.xml2
-rw-r--r--lib/test_server/doc/src/write_test_chapter.xml2
-rw-r--r--lib/test_server/src/Makefile2
-rwxr-xr-xlib/test_server/src/config.guess1534
-rwxr-xr-xlib/test_server/src/config.sub1789
-rw-r--r--lib/test_server/src/configure.in102
-rw-r--r--lib/test_server/src/erl2html2.erl138
-rwxr-xr-xlib/test_server/src/install-sh519
-rw-r--r--lib/test_server/src/test_server.app.src5
-rw-r--r--lib/test_server/src/test_server.appup.src22
-rw-r--r--lib/test_server/src/test_server.erl356
-rw-r--r--lib/test_server/src/test_server_ctrl.erl525
-rw-r--r--lib/test_server/src/test_server_internal.hrl9
-rw-r--r--lib/test_server/src/test_server_node.erl41
-rw-r--r--lib/test_server/src/test_server_sup.erl378
-rw-r--r--lib/test_server/src/ts.erl113
-rw-r--r--lib/test_server/src/ts.unix.config2
-rw-r--r--lib/test_server/src/ts_erl_config.erl58
-rw-r--r--lib/test_server/src/ts_install.erl65
-rw-r--r--lib/test_server/src/ts_lib.erl5
-rw-r--r--lib/test_server/src/ts_make.erl16
-rw-r--r--lib/test_server/src/ts_run.erl11
-rw-r--r--lib/test_server/test/erl2html2_SUITE.erl2
-rw-r--r--lib/test_server/test/test_server_SUITE.erl1
-rw-r--r--lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl16
-rw-r--r--lib/test_server/test/test_server_SUITE_data/test_server_unicode_SUITE.erl1
-rw-r--r--lib/test_server/vsn.mk2
-rw-r--r--lib/toolbar/AUTHORS3
-rw-r--r--lib/toolbar/doc/src/bar.gifbin4591 -> 0 bytes
-rw-r--r--lib/toolbar/doc/src/bar.ps846
-rw-r--r--lib/toolbar/doc/src/book.xml49
-rw-r--r--lib/toolbar/doc/src/create_tool.gifbin5925 -> 0 bytes
-rw-r--r--lib/toolbar/doc/src/create_tool.ps5050
-rw-r--r--lib/toolbar/doc/src/fascicules.xml18
-rw-r--r--lib/toolbar/doc/src/note.gifbin1539 -> 0 bytes
-rw-r--r--lib/toolbar/doc/src/notes.xml180
-rw-r--r--lib/toolbar/doc/src/part.xml38
-rw-r--r--lib/toolbar/doc/src/part_notes.xml38
-rw-r--r--lib/toolbar/doc/src/ref_man.xml38
-rw-r--r--lib/toolbar/doc/src/toolbar.xml101
-rw-r--r--lib/toolbar/doc/src/toolbar_chapter.xml145
-rw-r--r--lib/toolbar/doc/src/warning.gifbin1498 -> 0 bytes
-rw-r--r--lib/toolbar/ebin/.gitignore0
-rw-r--r--lib/toolbar/info2
-rw-r--r--lib/toolbar/src/canvasbutton.erl239
-rw-r--r--lib/toolbar/src/toolbar.erl579
-rw-r--r--lib/toolbar/src/toolbar.hrl34
-rw-r--r--lib/toolbar/src/toolbar_graphics.erl404
-rw-r--r--lib/toolbar/src/toolbar_lib.erl223
-rw-r--r--lib/toolbar/src/toolbar_toolconfig.erl549
-rw-r--r--lib/toolbar/vsn.mk10
-rw-r--r--lib/tools/c_src/Makefile.in8
-rw-r--r--lib/tools/doc/src/book.xml4
-rw-r--r--lib/tools/doc/src/cover.xml2
-rw-r--r--lib/tools/doc/src/cover_chapter.xml4
-rw-r--r--lib/tools/doc/src/cprof.xml4
-rw-r--r--lib/tools/doc/src/cprof_chapter.xml4
-rw-r--r--lib/tools/doc/src/eprof.xml4
-rw-r--r--lib/tools/doc/src/erlang_mode.xml4
-rw-r--r--lib/tools/doc/src/erlang_mode_chapter.xml4
-rw-r--r--lib/tools/doc/src/fascicules.xml2
-rw-r--r--lib/tools/doc/src/fprof.xml6
-rw-r--r--lib/tools/doc/src/fprof_chapter.xml4
-rw-r--r--lib/tools/doc/src/instrument.xml4
-rw-r--r--lib/tools/doc/src/lcnt.xml4
-rw-r--r--lib/tools/doc/src/lcnt_chapter.xml4
-rw-r--r--lib/tools/doc/src/make.xml4
-rw-r--r--lib/tools/doc/src/notes.xml170
-rw-r--r--lib/tools/doc/src/notes_history.xml4
-rw-r--r--lib/tools/doc/src/part.xml4
-rw-r--r--lib/tools/doc/src/part_notes.xml4
-rw-r--r--lib/tools/doc/src/part_notes_history.xml4
-rw-r--r--lib/tools/doc/src/ref_man.xml4
-rw-r--r--lib/tools/doc/src/tags.xml4
-rw-r--r--lib/tools/doc/src/xref.xml2
-rw-r--r--lib/tools/doc/src/xref_chapter.xml4
-rw-r--r--lib/tools/emacs/erlang-skels.el174
-rw-r--r--lib/tools/emacs/erlang.el143
-rw-r--r--lib/tools/emacs/test.erl.indented29
-rw-r--r--lib/tools/emacs/test.erl.orig29
-rw-r--r--lib/tools/src/cover.erl187
-rw-r--r--lib/tools/src/lcnt.erl378
-rw-r--r--lib/tools/src/tags.erl9
-rw-r--r--lib/tools/src/tools.app.src22
-rw-r--r--lib/tools/src/tools.appup.src40
-rw-r--r--lib/tools/src/xref_compiler.erl4
-rw-r--r--lib/tools/src/xref_reader.erl10
-rw-r--r--lib/tools/src/xref_utils.erl4
-rw-r--r--lib/tools/test/cover_SUITE.erl141
-rw-r--r--lib/tools/test/cover_SUITE_data/b.erl8
-rw-r--r--lib/tools/test/cover_SUITE_data/f.erl7
-rw-r--r--lib/tools/test/eprof_SUITE.erl18
-rw-r--r--lib/tools/test/lcnt_SUITE.erl153
-rw-r--r--lib/tools/test/lcnt_SUITE_data/ehb_3_3_hist.lcntbin0 -> 601135 bytes
-rw-r--r--lib/tools/test/tools_SUITE.erl8
-rw-r--r--lib/tools/test/xref_SUITE.erl18
-rw-r--r--lib/tools/test/xref_SUITE_data/read/read.erl27
-rw-r--r--lib/tools/vsn.mk2
-rw-r--r--lib/tv/AUTHORS5
-rw-r--r--lib/tv/doc/html/.gitignore0
-rw-r--r--lib/tv/doc/man3/.gitignore0
-rw-r--r--lib/tv/doc/pdf/.gitignore0
-rw-r--r--lib/tv/doc/src/Makefile138
-rw-r--r--lib/tv/doc/src/fascicules.xml19
-rw-r--r--lib/tv/doc/src/info_window.gifbin6315 -> 0 bytes
-rw-r--r--lib/tv/doc/src/info_window.ps814
-rw-r--r--lib/tv/doc/src/note.gifbin1539 -> 0 bytes
-rw-r--r--lib/tv/doc/src/notes.xml288
-rw-r--r--lib/tv/doc/src/part.xml40
-rw-r--r--lib/tv/doc/src/part_notes.xml40
-rw-r--r--lib/tv/doc/src/set_poll_int.gifbin2789 -> 0 bytes
-rw-r--r--lib/tv/doc/src/set_poll_int.ps483
-rw-r--r--lib/tv/doc/src/table_visualizer_chapter.xml658
-rw-r--r--lib/tv/doc/src/tv.gifbin17015 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv.xml72
-rw-r--r--lib/tv/doc/src/tv_create_table.gifbin6211 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_create_table.ps1120
-rw-r--r--lib/tv/doc/src/tv_record_editor_mnesia.gifbin4982 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_record_editor_mnesia.ps897
-rw-r--r--lib/tv/doc/src/tv_row_marked.gifbin12354 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_row_marked.ps1611
-rw-r--r--lib/tv/doc/src/tv_row_marked_popup.gifbin13216 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_row_marked_popup.ps1324
-rw-r--r--lib/tv/doc/src/tv_search_result.gifbin23525 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_search_result.ps2739
-rw-r--r--lib/tv/doc/src/tv_search_window.gifbin5054 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_search_window.ps975
-rw-r--r--lib/tv/doc/src/tv_start.gifbin8089 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start.ps828
-rw-r--r--lib/tv/doc/src/tv_start_mnesia.gifbin8080 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start_mnesia.ps835
-rw-r--r--lib/tv/doc/src/tv_start_other_node.gifbin17327 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start_other_node.ps2316
-rw-r--r--lib/tv/doc/src/tv_start_pid_sorted.gifbin13775 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start_pid_sorted.ps1853
-rw-r--r--lib/tv/doc/src/tv_start_system.gifbin12372 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start_system.ps1330
-rw-r--r--lib/tv/doc/src/tv_start_system_unreadable.gifbin13890 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_start_system_unreadable.ps1377
-rw-r--r--lib/tv/doc/src/tv_table_browser.gifbin15457 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_table_browser.ps2024
-rw-r--r--lib/tv/doc/src/tv_table_browser_updated.gifbin15857 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_table_browser_updated.ps2124
-rw-r--r--lib/tv/doc/src/tv_table_loaded.gifbin15322 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_table_loaded.ps1430
-rw-r--r--lib/tv/doc/src/tv_table_sorted.gifbin15797 -> 0 bytes
-rw-r--r--lib/tv/doc/src/tv_table_sorted.ps1502
-rw-r--r--lib/tv/doc/src/warning.gifbin1498 -> 0 bytes
-rw-r--r--lib/tv/ebin/.gitignore0
-rw-r--r--lib/tv/info2
-rw-r--r--lib/tv/priv/Makefile72
-rw-r--r--lib/tv/priv/arrow_left.xbm5
-rw-r--r--lib/tv/priv/arrow_right.xbm5
-rw-r--r--lib/tv/priv/edit1.xbm12
-rw-r--r--lib/tv/priv/erlang.gifbin1297 -> 0 bytes
-rw-r--r--lib/tv/priv/help.xbm8
-rw-r--r--lib/tv/priv/info.xbm8
-rw-r--r--lib/tv/priv/key.xbm6
-rw-r--r--lib/tv/priv/more.xbm8
-rw-r--r--lib/tv/priv/no_sort.xbm8
-rw-r--r--lib/tv/priv/open.xbm8
-rw-r--r--lib/tv/priv/poll.xbm8
-rw-r--r--lib/tv/priv/search.xbm8
-rw-r--r--lib/tv/priv/sort.xbm8
-rw-r--r--lib/tv/priv/sort_reverse.xbm8
-rw-r--r--lib/tv/priv/tv.gifbin179 -> 0 bytes
-rw-r--r--lib/tv/priv/tv.tool23
-rw-r--r--lib/tv/src/tv.app.src56
-rw-r--r--lib/tv/src/tv.erl38
-rw-r--r--lib/tv/src/tv_comm_func.erl77
-rw-r--r--lib/tv/src/tv_db.erl1271
-rw-r--r--lib/tv/src/tv_db_int_def.hrl80
-rw-r--r--lib/tv/src/tv_db_search.erl475
-rw-r--r--lib/tv/src/tv_db_sort.erl141
-rw-r--r--lib/tv/src/tv_ets_rpc.erl140
-rw-r--r--lib/tv/src/tv_etsread.erl770
-rw-r--r--lib/tv/src/tv_info.erl884
-rw-r--r--lib/tv/src/tv_int_def.hrl56
-rw-r--r--lib/tv/src/tv_int_msg.hrl504
-rw-r--r--lib/tv/src/tv_io_lib.erl223
-rw-r--r--lib/tv/src/tv_io_lib_format.erl386
-rw-r--r--lib/tv/src/tv_io_lib_pretty.erl171
-rw-r--r--lib/tv/src/tv_ip.erl242
-rw-r--r--lib/tv/src/tv_main.erl1821
-rw-r--r--lib/tv/src/tv_main.hrl285
-rw-r--r--lib/tv/src/tv_mnesia_rpc.erl106
-rw-r--r--lib/tv/src/tv_new_table.erl666
-rw-r--r--lib/tv/src/tv_nodewin.erl412
-rw-r--r--lib/tv/src/tv_pb.erl663
-rw-r--r--lib/tv/src/tv_pb_funcs.erl1056
-rw-r--r--lib/tv/src/tv_pb_int_def.hrl99
-rw-r--r--lib/tv/src/tv_pc.erl795
-rw-r--r--lib/tv/src/tv_pc_graph_ctrl.erl120
-rw-r--r--lib/tv/src/tv_pc_int_def.hrl62
-rw-r--r--lib/tv/src/tv_pc_menu_handling.erl489
-rw-r--r--lib/tv/src/tv_pd.erl1127
-rw-r--r--lib/tv/src/tv_pd_display.erl1066
-rw-r--r--lib/tv/src/tv_pd_frames.erl482
-rw-r--r--lib/tv/src/tv_pd_int_def.hrl139
-rw-r--r--lib/tv/src/tv_pd_int_msg.hrl433
-rw-r--r--lib/tv/src/tv_pd_scale.erl305
-rw-r--r--lib/tv/src/tv_pg.erl430
-rw-r--r--lib/tv/src/tv_pg_gridfcns.erl1918
-rw-r--r--lib/tv/src/tv_pg_int_def.hrl92
-rw-r--r--lib/tv/src/tv_poll_dialog.erl363
-rw-r--r--lib/tv/src/tv_pw.erl328
-rw-r--r--lib/tv/src/tv_pw_int_def.hrl55
-rw-r--r--lib/tv/src/tv_pw_window.erl277
-rw-r--r--lib/tv/src/tv_rec_edit.erl754
-rw-r--r--lib/tv/src/tv_table_owner.erl122
-rw-r--r--lib/tv/src/tv_utils.erl179
-rw-r--r--lib/tv/vsn.mk1
-rw-r--r--lib/typer/Makefile2
-rw-r--r--lib/typer/doc/Makefile (renamed from lib/pman/Makefile)29
-rw-r--r--lib/typer/doc/html/.gitignore (renamed from lib/toolbar/doc/man3/.gitignore)0
-rw-r--r--lib/typer/doc/pdf/.gitignore (renamed from lib/toolbar/doc/pdf/.gitignore)0
-rw-r--r--lib/typer/doc/src/Makefile (renamed from lib/pman/doc/src/Makefile)43
-rw-r--r--lib/typer/doc/src/book.xml (renamed from lib/pman/doc/src/book.xml)16
-rw-r--r--lib/typer/doc/src/fascicules.xml (renamed from lib/appmon/doc/src/fascicules.xml)10
-rw-r--r--lib/typer/doc/src/notes.xml66
-rw-r--r--lib/typer/doc/src/part_notes.xml (renamed from lib/pman/doc/src/part.xml)12
-rw-r--r--lib/typer/doc/src/ref_man.xml (renamed from lib/pman/doc/src/ref_man.xml)12
-rw-r--r--lib/typer/doc/src/typer_app.xml (renamed from lib/appmon/doc/src/ref_man.xml)32
-rw-r--r--lib/typer/info2
-rw-r--r--lib/typer/src/Makefile2
-rw-r--r--lib/typer/src/typer.app.src4
-rw-r--r--lib/typer/src/typer.appup.src22
-rw-r--r--lib/typer/src/typer.erl30
-rw-r--r--lib/typer/test/Makefile65
-rw-r--r--lib/typer/test/typer.spec1
-rw-r--r--lib/typer/test/typer_SUITE.erl56
-rw-r--r--lib/typer/vsn.mk2
-rw-r--r--lib/webtool/doc/src/book.xml4
-rw-r--r--lib/webtool/doc/src/fascicules.xml2
-rw-r--r--lib/webtool/doc/src/notes.xml31
-rw-r--r--lib/webtool/doc/src/notes_history.xml4
-rw-r--r--lib/webtool/doc/src/part.xml4
-rw-r--r--lib/webtool/doc/src/part_notes.xml4
-rw-r--r--lib/webtool/doc/src/part_notes_history.xml4
-rw-r--r--lib/webtool/doc/src/ref_man.xml4
-rw-r--r--lib/webtool/doc/src/start_webtool.xml4
-rw-r--r--lib/webtool/doc/src/webtool.xml4
-rw-r--r--lib/webtool/doc/src/webtool_chapter.xml4
-rw-r--r--lib/webtool/src/Makefile2
-rw-r--r--lib/webtool/src/webtool.app.src4
-rw-r--r--lib/webtool/src/webtool.appup.src10
-rw-r--r--lib/webtool/test/Makefile65
-rw-r--r--lib/webtool/test/webtool.spec1
-rw-r--r--lib/webtool/test/webtool_SUITE.erl50
-rw-r--r--lib/webtool/vsn.mk2
-rw-r--r--lib/wx/aclocal.m41914
-rw-r--r--lib/wx/api_gen/Makefile4
-rw-r--r--lib/wx/api_gen/gen_util.erl10
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl2
-rw-r--r--lib/wx/api_gen/wx_doxygen.conf4
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.c_src36
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl46
-rw-r--r--lib/wx/api_gen/wx_extra/wxListCtrl.c_src4
-rw-r--r--lib/wx/api_gen/wx_gen.erl22
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl66
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl54
-rw-r--r--lib/wx/api_gen/wxapi.conf38
-rwxr-xr-xlib/wx/autoconf/config.guess1534
-rwxr-xr-xlib/wx/autoconf/config.sub1789
-rwxr-xr-xlib/wx/autoconf/install-sh258
-rw-r--r--lib/wx/c_src/Makefile.in17
-rw-r--r--lib/wx/c_src/gen/wxe_derived_dest.h24
-rw-r--r--lib/wx/c_src/gen/wxe_events.cpp172
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp441
-rw-r--r--lib/wx/c_src/gen/wxe_init.cpp6
-rw-r--r--lib/wx/c_src/gen/wxe_macros.h3310
-rw-r--r--lib/wx/c_src/wxe_callback_impl.cpp (renamed from lib/wx/c_src/wxePrintout.cpp)82
-rw-r--r--lib/wx/c_src/wxe_callback_impl.h100
-rw-r--r--lib/wx/c_src/wxe_driver.c4
-rw-r--r--lib/wx/c_src/wxe_driver.h3
-rw-r--r--lib/wx/c_src/wxe_events.h45
-rw-r--r--lib/wx/c_src/wxe_gl.cpp17
-rw-r--r--lib/wx/c_src/wxe_gl.h25
-rw-r--r--lib/wx/c_src/wxe_helpers.cpp95
-rw-r--r--lib/wx/c_src/wxe_helpers.h122
-rw-r--r--lib/wx/c_src/wxe_impl.cpp498
-rw-r--r--lib/wx/c_src/wxe_impl.h232
-rw-r--r--lib/wx/c_src/wxe_main.cpp163
-rw-r--r--lib/wx/c_src/wxe_memory.h62
-rw-r--r--[-rwxr-xr-x]lib/wx/configure.in35
-rw-r--r--lib/wx/doc/src/book.xml4
-rw-r--r--lib/wx/doc/src/fascicules.xml2
-rw-r--r--lib/wx/doc/src/notes.xml144
-rw-r--r--lib/wx/doc/src/part.xml4
-rw-r--r--lib/wx/doc/src/part_notes.xml4
-rw-r--r--lib/wx/doc/src/ref_man.xml.src4
-rw-r--r--lib/wx/examples/demo/ex_graphicsContext.erl2
-rw-r--r--lib/wx/include/wx.hrl262
-rw-r--r--lib/wx/priv/erlang-logo128.pngbin0 -> 6268 bytes
-rw-r--r--lib/wx/priv/erlang-logo32.pngbin1608 -> 1291 bytes
-rw-r--r--lib/wx/priv/erlang-logo64.pngbin4149 -> 2647 bytes
-rw-r--r--lib/wx/src/gen/gl.erl2
-rw-r--r--lib/wx/src/gen/glu.erl2
-rw-r--r--lib/wx/src/gen/wxActivateEvent.erl72
-rw-r--r--lib/wx/src/gen/wxBufferedDC.erl4
-rw-r--r--lib/wx/src/gen/wxBufferedPaintDC.erl4
-rw-r--r--lib/wx/src/gen/wxClientDC.erl4
-rw-r--r--lib/wx/src/gen/wxEvtHandler.erl48
-rw-r--r--lib/wx/src/gen/wxGridCellBoolEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellChoiceEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellFloatEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellNumberEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellTextEditor.erl4
-rw-r--r--lib/wx/src/gen/wxInitDialogEvent.erl64
-rw-r--r--lib/wx/src/gen/wxLocale.erl278
-rw-r--r--lib/wx/src/gen/wxMemoryDC.erl4
-rw-r--r--lib/wx/src/gen/wxMirrorDC.erl4
-rw-r--r--lib/wx/src/gen/wxPaintDC.erl4
-rw-r--r--lib/wx/src/gen/wxPopupTransientWindow.erl506
-rw-r--r--lib/wx/src/gen/wxPopupWindow.erl503
-rw-r--r--lib/wx/src/gen/wxPostScriptDC.erl4
-rw-r--r--lib/wx/src/gen/wxScreenDC.erl4
-rw-r--r--lib/wx/src/gen/wxTextCtrl.erl16
-rw-r--r--lib/wx/src/gen/wxWindowDC.erl4
-rw-r--r--lib/wx/src/gen/wx_misc.erl18
-rw-r--r--lib/wx/src/gen/wxe_debug.hrl3309
-rw-r--r--lib/wx/src/gen/wxe_funcs.hrl3309
-rw-r--r--lib/wx/src/wx.app.src3
-rw-r--r--lib/wx/src/wx.appup.src10
-rw-r--r--lib/wx/src/wxe.hrl5
-rw-r--r--lib/wx/src/wxe_master.erl18
-rw-r--r--lib/wx/src/wxe_server.erl207
-rw-r--r--lib/wx/src/wxe_util.erl33
-rw-r--r--lib/wx/test/wx_app_SUITE.erl9
-rw-r--r--lib/wx/test/wx_basic_SUITE.erl51
-rw-r--r--lib/wx/test/wx_class_SUITE.erl66
-rw-r--r--lib/wx/test/wx_event_SUITE.erl60
-rw-r--r--lib/wx/vsn.mk2
-rw-r--r--lib/xmerl/doc/src/book.xml4
-rw-r--r--lib/xmerl/doc/src/fascicules.xml2
-rw-r--r--lib/xmerl/doc/src/motorcycles2html.erl17
-rw-r--r--lib/xmerl/doc/src/notes.xml33
-rw-r--r--lib/xmerl/doc/src/notes_history.xml4
-rw-r--r--lib/xmerl/doc/src/part.xml4
-rw-r--r--lib/xmerl/doc/src/part_notes.xml4
-rw-r--r--lib/xmerl/doc/src/ref_man.xml4
-rw-r--r--lib/xmerl/doc/src/xmerl_sax_parser.xml4
-rw-r--r--lib/xmerl/doc/src/xmerl_ug.xmlsrc4
-rw-r--r--lib/xmerl/src/xmerl.app.src3
-rw-r--r--lib/xmerl/src/xmerl.appup.src31
-rw-r--r--lib/xmerl/src/xmerl_scan.erl3
-rw-r--r--lib/xmerl/src/xmerl_xsd.erl3
-rw-r--r--lib/xmerl/test/xmerl_SUITE.erl3
-rw-r--r--lib/xmerl/test/xmerl_appup_test.erl339
-rw-r--r--lib/xmerl/vsn.mk2
-rw-r--r--make/emd2exml.in6
-rw-r--r--make/ose_lm.mk.in75
-rw-r--r--make/otp.mk.in7
-rw-r--r--make/otp_ded.mk.in1
-rw-r--r--make/otp_default_release_path.mk (renamed from lib/appmon/Makefile)23
-rw-r--r--make/otp_release_targets.mk4
-rw-r--r--make/otp_released_app.mk43
-rw-r--r--make/otp_subdir.mk13
-rw-r--r--make/output.mk.in6
-rw-r--r--make/run_make.mk2
-rwxr-xr-xmake/verify_runtime_dependencies313
-rwxr-xr-xotp_build84
-rwxr-xr-xotp_patch_apply480
-rw-r--r--otp_versions.table23
-rw-r--r--system/doc/definitions/cite.defs.xml2
-rw-r--r--system/doc/definitions/term.defs5
-rw-r--r--system/doc/definitions/term.defs.xml2
-rw-r--r--system/doc/design_principles/applications.xml9
-rw-r--r--system/doc/design_principles/appup_cookbook.xml4
-rw-r--r--system/doc/design_principles/book.xml4
-rw-r--r--system/doc/design_principles/des_princ.xml4
-rw-r--r--system/doc/design_principles/distributed_applications.xml4
-rw-r--r--system/doc/design_principles/events.xml4
-rw-r--r--system/doc/design_principles/fsm.xml2
-rw-r--r--system/doc/design_principles/gen_server_concepts.xml4
-rw-r--r--system/doc/design_principles/included_applications.xml4
-rw-r--r--system/doc/design_principles/part.xml4
-rw-r--r--system/doc/design_principles/release_handling.xml23
-rw-r--r--system/doc/design_principles/release_structure.xml4
-rw-r--r--system/doc/design_principles/spec_proc.xml69
-rw-r--r--system/doc/design_principles/sup_princ.xml4
-rw-r--r--system/doc/efficiency_guide/advanced.xml4
-rw-r--r--system/doc/efficiency_guide/appendix.xml4
-rw-r--r--system/doc/efficiency_guide/binaryhandling.xml9
-rw-r--r--system/doc/efficiency_guide/book.xml4
-rw-r--r--system/doc/efficiency_guide/commoncaveats.xml4
-rw-r--r--system/doc/efficiency_guide/drivers.xml2
-rw-r--r--system/doc/efficiency_guide/functions.xml4
-rw-r--r--system/doc/efficiency_guide/introduction.xml4
-rw-r--r--system/doc/efficiency_guide/listhandling.xml4
-rw-r--r--system/doc/efficiency_guide/myths.xml4
-rw-r--r--system/doc/efficiency_guide/part.xml4
-rw-r--r--system/doc/efficiency_guide/processes.xml6
-rw-r--r--system/doc/efficiency_guide/profiling.xml4
-rw-r--r--system/doc/efficiency_guide/tablesDatabases.xml6
-rw-r--r--system/doc/embedded/book.xml4
-rw-r--r--system/doc/embedded/embedded_nt.xml4
-rw-r--r--system/doc/embedded/embedded_solaris.xml4
-rw-r--r--system/doc/embedded/intro.xml4
-rw-r--r--system/doc/embedded/part.xml2
-rw-r--r--system/doc/embedded/starting.xml4
-rw-r--r--system/doc/embedded/target.xml4
-rw-r--r--system/doc/embedded/vme_problems.xml4
-rw-r--r--system/doc/embedded/xntp.xml4
-rw-r--r--system/doc/getting_started/book.xml4
-rw-r--r--system/doc/getting_started/conc_prog.xml50
-rw-r--r--system/doc/getting_started/intro.xml4
-rw-r--r--system/doc/getting_started/part.xml4
-rw-r--r--system/doc/getting_started/records_macros.xml8
-rw-r--r--system/doc/getting_started/robustness.xml12
-rw-r--r--system/doc/getting_started/seq_prog.xml198
-rw-r--r--system/doc/installation_guide/Makefile6
-rw-r--r--system/doc/installation_guide/book.xml4
-rw-r--r--system/doc/installation_guide/install-binary.xml129
-rw-r--r--system/doc/installation_guide/part.xml9
-rw-r--r--system/doc/installation_guide/verification.xml102
-rw-r--r--system/doc/installation_guide/xmlfiles.mk5
-rw-r--r--system/doc/oam/book.xml4
-rw-r--r--system/doc/oam/oam_intro.xml4
-rw-r--r--system/doc/oam/part.xml4
-rw-r--r--system/doc/programming_examples/bit_syntax.xml4
-rw-r--r--system/doc/programming_examples/book.xml4
-rw-r--r--system/doc/programming_examples/fun_test.erl8
-rw-r--r--system/doc/programming_examples/funs.xmlsrc4
-rw-r--r--system/doc/programming_examples/list_comprehensions.xml4
-rw-r--r--system/doc/programming_examples/part.xml4
-rw-r--r--system/doc/programming_examples/records.xml4
-rw-r--r--system/doc/reference_manual/book.xml4
-rw-r--r--system/doc/reference_manual/character_set.xml133
-rw-r--r--system/doc/reference_manual/code_loading.xml24
-rw-r--r--system/doc/reference_manual/data_types.xml37
-rw-r--r--system/doc/reference_manual/distributed.xml6
-rw-r--r--system/doc/reference_manual/errors.xml4
-rw-r--r--system/doc/reference_manual/expressions.xml278
-rw-r--r--system/doc/reference_manual/functions.xml4
-rw-r--r--system/doc/reference_manual/introduction.xml87
-rw-r--r--system/doc/reference_manual/macros.xml4
-rw-r--r--system/doc/reference_manual/modules.xml29
-rw-r--r--system/doc/reference_manual/part.xml5
-rw-r--r--system/doc/reference_manual/patterns.xml4
-rw-r--r--system/doc/reference_manual/ports.xml2
-rw-r--r--system/doc/reference_manual/processes.xml8
-rw-r--r--system/doc/reference_manual/records.xml4
-rw-r--r--system/doc/reference_manual/typespec.xml35
-rw-r--r--system/doc/system_architecture_intro/book.xml4
-rw-r--r--system/doc/system_architecture_intro/part.xml4
-rw-r--r--system/doc/system_architecture_intro/sys_arch_intro.xml6
-rw-r--r--system/doc/system_principles/book.xml4
-rw-r--r--system/doc/system_principles/create_target.xmlsrc254
-rw-r--r--system/doc/system_principles/error_logging.xml4
-rw-r--r--system/doc/system_principles/part.xml7
-rw-r--r--system/doc/system_principles/system_principles.xml13
-rw-r--r--system/doc/system_principles/upgrade.xml118
-rw-r--r--system/doc/system_principles/versions.xml268
-rw-r--r--system/doc/system_principles/xmlfiles.mk6
-rw-r--r--system/doc/top/Makefile4
-rw-r--r--system/doc/top/book.xml4
-rw-r--r--system/doc/top/templates/index.html.src10
-rw-r--r--system/doc/tutorial/appendix.xmlsrc4
-rw-r--r--system/doc/tutorial/book.xml4
-rw-r--r--system/doc/tutorial/c_port.xmlsrc4
-rw-r--r--system/doc/tutorial/c_portdriver.xmlsrc6
-rw-r--r--system/doc/tutorial/cnode.xmlsrc4
-rw-r--r--system/doc/tutorial/distribution.xml4
-rw-r--r--system/doc/tutorial/erl_interface.xmlsrc4
-rw-r--r--system/doc/tutorial/example.xmlsrc4
-rw-r--r--system/doc/tutorial/introduction.xml4
-rw-r--r--system/doc/tutorial/nif.xmlsrc4
-rw-r--r--system/doc/tutorial/overview.xml4
-rw-r--r--system/doc/tutorial/part.xml4
-rw-r--r--xcomp/README.md556
-rw-r--r--xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf1
-rw-r--r--xcomp/erl-xcomp-arm-android.conf264
-rw-r--r--xcomp/erl-xcomp-arm-linux.conf17
-rw-r--r--xcomp/erl-xcomp-powerpc-dso-linux-gnu.conf28
-rw-r--r--xcomp/erl-xcomp-powerpc-ose5.conf357
-rw-r--r--xcomp/erl-xcomp-sfk-linux-ose5.conf304
-rw-r--r--xcomp/erl-xcomp-vars.sh2
3555 files changed, 239631 insertions, 247927 deletions
diff --git a/.gitignore b/.gitignore
index 9cd91245f5..e27b5b12ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
# emacs
*~
+lib/tools/emacs/*.elc
# vim
.*.sw[a-z]
@@ -35,6 +36,8 @@ i386-pc-solaris[0-9]*.[0-9]*
i386-unknown-freebsd[0-9]*.[0-9]*
tile-tilera-linux-gnu
powerpc-unknown-linux-gnu
+i386-elf-ose
+powerpc-unknown-ose
# Mac OS X
a.out.dSYM/
@@ -96,6 +99,11 @@ lib/wx/c_src/win32/
lib/wx/priv/win32/
lib/wx/win32/
make/win32/
+make/otp_built
+make/otp_doc_built
+
+# OSE
+*.d
# Used by ic & orber & cos* applications.
IDL-GENERATED
@@ -114,6 +122,8 @@ JAVADOC-GENERATED
/bootstrap/lib/asn1
/bootstrap/lib/common_test
+/bootstrap/lib/edoc
+/bootstrap/lib/erl_docgen
/bootstrap/lib/hipe
/bootstrap/lib/ic
/bootstrap/lib/orber
@@ -177,6 +187,29 @@ JAVADOC-GENERATED
/lib/*/config.status
#
+# Files generated by "./otp_build autoconf"
+#
+
+/lib/configure.in
+/aclocal.m4
+/lib/common_test/priv/auxdir/config.guess
+/lib/common_test/priv/auxdir/config.sub
+/lib/common_test/priv/auxdir/install-sh
+/lib/erl_interface/aclocal.m4
+/lib/erl_interface/src/auxdir/config.guess
+/lib/erl_interface/src/auxdir/config.sub
+/lib/erl_interface/src/auxdir/install-sh
+/lib/megaco/aclocal.m4
+/lib/odbc/aclocal.m4
+/lib/test_server/src/config.guess
+/lib/test_server/src/config.sub
+/lib/test_server/src/install-sh
+/lib/wx/aclocal.m4
+/lib/wx/autoconf/config.guess
+/lib/wx/autoconf/config.sub
+/lib/wx/autoconf/install-sh
+
+#
# Files generated when building/running tests (especially if
# a directory in $ERL_TOP/release/tests has been symlinked to
# a test directory in lib).
@@ -199,6 +232,7 @@ JAVADOC-GENERATED
# common_test
+/lib/common_test/doc/src/ct_property_test.xml
/lib/common_test/doc/src/ct_slave.xml
/lib/common_test/priv/install.sh
@@ -348,6 +382,7 @@ JAVADOC-GENERATED
/system/doc/installation_guide/INSTALL.xml
/system/doc/installation_guide/INSTALL-CROSS.xml
/system/doc/installation_guide/INSTALL-WIN32.xml
+/system/doc/installation_guide/OTP-PATCH-APPLY.xml
/system/doc/installation_guide/MARKDOWN.xml
# test_server
@@ -379,4 +414,3 @@ JAVADOC-GENERATED
/lib/xmerl/src/xmerl_xpath_parse.erl
/lib/xmerl/test/xmerl_test.erl
/lib/erl_interface/config.h.in
-/lib/configure.in
diff --git a/HOWTO/DTRACE.md b/HOWTO/DTRACE.md
index 8fa2fd9d50..90f4addefd 100644
--- a/HOWTO/DTRACE.md
+++ b/HOWTO/DTRACE.md
@@ -27,12 +27,10 @@ Goals
Supported platforms
-------------------
-* OS X 10.6.x / Snow Leopard. It should also work for 10.7 / Lion,
- but I haven't personally tested it.
+* OS X 10.6.x / Snow Leopard, OS X 10.7.x / Lion and probably newer versions.
* Solaris 10. I have done limited testing on Solaris 11 and
OpenIndiana release 151a, and both appear to work.
-* FreeBSD 9.0, though please see the "FreeBSD 9.0 Release Notes"
- section below!
+* FreeBSD 9.0 and 10.0.
* Linux via SystemTap compatibility. Please see
[$ERL_TOP/HOWTO/SYSTEMTAP.md][] for more details.
diff --git a/HOWTO/INSTALL-ANDROID.md b/HOWTO/INSTALL-ANDROID.md
new file mode 100644
index 0000000000..31698d4ce3
--- /dev/null
+++ b/HOWTO/INSTALL-ANDROID.md
@@ -0,0 +1,52 @@
+Cross Compiling Erlang/OTP - ANDROID
+====================================
+
+Introduction
+------------
+
+This document describes how to cross compile Erlang OTP to Android/Rasberry Pi platforms.
+
+### Download and Install Android NDK ###
+
+https://developer.android.com/tools/sdk/ndk/index.html
+
+### Define System Variables ###
+
+export NDK_ROOT=/usr/local/android
+export NDK_PLAT=android-9
+export PATH=$NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin:$PATH
+
+### Configure OTP ###
+
+./otp_build configure \
+ --xcomp-conf=./xcomp/erl-xcomp-arm-android.conf \
+ --without-ssl
+
+### Compile OTP ###
+
+make noboot [-j4]
+
+### Make Release ###
+
+./otp_build release -a /usr/local/otp_R16B03_arm
+
+### Target Deployment ###
+
+Make a tarball out of /usr/local/otp_R16B03_arm and copy it to target device
+(e.g. Raspberry Pi). Extract it and install
+
+./Install /usr/local/otp_R16B03_arm
+
+Android SDK (adb tool) is used to deploy OTP/Erlang to target device for
+evaluation purpose only.
+
+adb push /usr/local/otp_R16B03_arm /mnt/sdcard/otp_R16B03_arm
+adb shell
+
+### Known Issues ###
+
+ * native inet:gethostbyname/1 return {error, nxdomain} on Raspberry PI. Use dns resolver to by-pass the issue (see http://www.erlang.org/doc/apps/erts/inet_cfg.html)
+
+### References ###
+
+ The port derives some solutions from https://code.google.com/p/erlang4android/
diff --git a/HOWTO/INSTALL-CROSS.md b/HOWTO/INSTALL-CROSS.md
index 03ea4c6e76..7f852860c9 100644
--- a/HOWTO/INSTALL-CROSS.md
+++ b/HOWTO/INSTALL-CROSS.md
@@ -103,14 +103,6 @@ has to be provided in the `$PATH`. The Erlang/OTP for the target system will
be built using this Erlang system, together with the cross compilation tools
provided.
-If you want to build the documentation out of the same source tree as you are
-cross compiling in, you currently need a full Erlang/OTP system of the same
-release as the one being built for the build machine. If this is the case,
-build and install one for the build machine (or use one already built) and add
-it to the `$PATH` before cross building, and building the documentation. See
-the [How to Build the Documentation][] section in the [$ERL_TOP/HOWTO/INSTALL.md][]
-document for information on how to build the documentation.
-
If you want to build using a compatible Erlang/OTP system in the `$PATH`,
jump to (3).
@@ -284,6 +276,14 @@ and then do the cross build of the system.
`otp_build release -a` will do the same as (5), and you will after this have
to do a manual install either by doing (6), or (7).
+Building and Installing the Documentation
+-----------------------------------------
+
+After the system has been cross built you can build and install the
+documentation the same way as after a native build of the system. See the
+[How to Build the Documentation][] section in the [$ERL_TOP/HOWTO/INSTALL.md][]
+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
@@ -520,12 +520,35 @@ When a variable has been set, no warning will be issued.
`posix_memalign` implementation that accepts larger than page size
alignment.
+* `erl_xcomp_ose_ldflags_pass1` - Linker flags for the OSE module (pass 1)
+
+* `erl_xcomp_ose_ldflags_pass2` - Linker flags for the OSE module (pass 2)
+
+* `erl_xcomp_ose_OSEROOT` - OSE installation root directory
+
+* `erl_xcomp_ose_STRIP` - Strip utility shipped with the OSE distribution
+
+* `erl_xcomp_ose_LM_POST_LINK` - OSE postlink tool
+
+* `erl_xcomp_ose_LM_SET_CONF` - Sets the configuration for an OSE load module
+
+* `erl_xcomp_ose_LM_ELF_SIZE` - Prints the section size information for an
+ OSE load module
+
+* `erl_xcomp_ose_LM_LCF` - OSE load module linker configuration file
+
+* `erl_xcomp_ose_BEAM_LM_CONF` - Beam OSE load module configuration file
+
+* `erl_xcomp_ose_EPMD_LM_CONF` - EPMD OSE load module configuration file
+
+* `erl_xcomp_ose_RUN_ERL_LM_CONF` - run_erl_lm OSE load module configuration file
+
Copyright and License
---------------------
%CopyrightBegin%
-Copyright Ericsson AB 2009-2013. All Rights Reserved.
+Copyright Ericsson AB 2009-2014. All Rights Reserved.
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
@@ -540,19 +563,11 @@ under the License.
%CopyrightEnd%
-Modifying This Document
------------------------
-
-Before modifying this document you need to have a look at the
-[$ERL_TOP/HOWTO/MARKDOWN.md][] document.
-
[$ERL_TOP/HOWTO/INSTALL.md]: INSTALL.md
- [Building in Git]: INSTALL.md#How-to-Build-and-Install-ErlangOTP_Building-in-Git
- [How to Build the Documentation]: INSTALL.md#The-ErlangOTP-Documentation_How-to-Build-the-Documentation
+ [Building in Git]: INSTALL.md#How-to-Build-and-Install-ErlangOTP
+ [How to Build the Documentation]: INSTALL.md#How-to-Build-and-Install-ErlangOTP_How-to-Build-the-Documentation
[cross configuration variables]: #Currently-Used-Configuration-Variables
[DESTDIR]: http://www.gnu.org/prep/standards/html_node/DESTDIR.html
- [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md
-
[?TOC]: true
diff --git a/HOWTO/INSTALL-WIN32.md b/HOWTO/INSTALL-WIN32.md
index 94d3688f23..0387572dd3 100644
--- a/HOWTO/INSTALL-WIN32.md
+++ b/HOWTO/INSTALL-WIN32.md
@@ -1018,7 +1018,7 @@ Copyright and License
%CopyrightBegin%
-Copyright Ericsson AB 2003-2012. All Rights Reserved.
+Copyright Ericsson AB 2003-2014. All Rights Reserved.
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
@@ -1033,15 +1033,7 @@ under the License.
%CopyrightEnd%
-Modifying This Document
------------------------
-
-Before modifying this document you need to have a look at the
-[$ERL_TOP/HOWTO/MARKDOWN.md][] document.
-
-
[1]: http://www.erlang.org/faq.html "mailing lists"
- [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md
[?TOC]: true
diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md
index 3dde37bfec..53b1b8cd8a 100644
--- a/HOWTO/INSTALL.md
+++ b/HOWTO/INSTALL.md
@@ -4,174 +4,109 @@ Building and Installing Erlang/OTP
Introduction
------------
-This document describes how to build and install Erlang/OTP-%OTP-REL%. You
-are advised to read the whole document before attempting to build and install
-Erlang/OTP. You can find more information about Open Source Erlang/OTP at:
+This document describes how to build and install Erlang/OTP-%OTP-REL%.
+Erlang/OTP should be possible to build from source on any Unix/Linux system,
+including OS X. You are advised to read the whole document
+before attempting to build and install Erlang/OTP.
- <http://www.erlang.org/>
+The source code can be downloaded from the official site of Erlang/OTP or GitHub.
+* <http://www.erlang.org>
+* <https://github.com/erlang/otp>
-The source code for Erlang/OTP can also be found in a Git repository:
-
- <http://github.com/erlang/otp>
-
-Erlang/OTP should be possible to build from source on any Unix system,
-including Mac OS X. This document describes how to native compile Erlang/OTP
-on Unix. For detailed instructions on how to
-
-* cross compile Erlang/OTP, see the [$ERL_TOP/HOWTO/INSTALL-CROSS.md][]
- document.
-
-* build Erlang/OTP on Windows, see the [$ERL_TOP/HOWTO/INSTALL-WIN32.md][]
- document.
-
- Binary releases for Windows can be found at
- <http://www.erlang.org/download.html>.
+Required Utilities
+------------------
-Before reading the above mentioned documents you are in any case advised to
-read this document first, since it covers building Erlang/OTP in general as
-well as other important information.
+These are the tools you need in order to unpack and build Erlang/OTP.
-Daily Build and Test
---------------------
-At Ericsson we have a "Daily Build and Test" that runs on:
+> *WARNING*: Please have a look at the [Known platform issues][] chapter
+> before you start.
-* Solaris 8, 9
- * Sparc32
- * Sparc64
-* Solaris 10
- * Sparc32
- * Sparc64
- * x86
-* SuSE Linux/GNU 9.4, 10.1
- * x86
-* SuSE Linux/GNU 10.0, 10.1, 11.0
- * x86
- * x86\_64
-* openSuSE 11.4 (Celadon)
- * x86\_64 (valgrind)
-* Fedora 7
- * PowerPC
-* Fedora 14
- * x86\_64
-* Gentoo Linux/GNU 1.12.11.1
- * x86
-* Ubuntu Linux/GNU 7.04, 10.04, 10.10, 11.0
- * x86\_64
-* MontaVista Linux/GNU 4.0.1
- * PowerPC
-* FreeBSD 8.2
- * x86
-* OpenBSD 5.0
- * x86\_64
-* Mac OS X 10.5.8 (Leopard), 10.7.3 (Lion), 10.9 (Mavericks)
- * x86
-* Windows XP SP3, 2003, Vista, 7
- * x86
-* Windows 7
- * x86\_64
+### Unpacking ###
-We also have the following "Daily Cross Builds":
+* GNU unzip, or a modern uncompress.
+* A TAR program that understands the GNU TAR format for long filenames.
-* SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64
-* SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64
+### Building ###
-and the following "Daily Cross Build Tests":
+* GNU `make`
+* Compiler -- GNU C Compiler, `gcc` or the C compiler frontend for LLVM, `clang`.
+* Perl 5
+* GNU `m4` -- If HiPE (native code) support is enabled. HiPE can be
+ disabled using `--disable-hipe`
+* `ncurses`, `termcap`, or `termlib` -- The development headers and
+ libraries are needed, often known as `ncurses-devel`. Use
+ `--without-termcap` to build without any of these libraries. Note that
+ in this case only the old shell (without any line editing) can be used.
+* `sed` -- Stream Editor for basic text transformation.
-* SuSE Linux/GNU 10.1 x86\_64
+#### Building in Git ####
-Versions Known NOT to Work
---------------------------
+* GNU `autoconf` of at least version 2.59. Note that `autoconf` is not
+ needed when building an unmodified version of the released source.
-* Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
- rpm named `gcc-3.3.3-41`. That version has a serious optimization bug
- that makes it unusable for building the Erlang emulator. Please
- upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
- Enterprise edition 9 (SLES9) has `gcc-3.3.3-43` and is not affected.
+#### Building on OS X ####
-* `gcc-4.3.0` has a serious optimizer bug. It produces an Erlang emulator
- that will crash immediately. The bug is supposed to be fixed in
- `gcc-4.3.1`.
+* Xcode -- Download and install via the Mac App Store.
+ Read about [Building on a Mac][] before proceeding.
-* FreeBSD had a bug which caused `kqueue`/`poll`/`select` to fail to detect
- that a `writev()` on a pipe has been made. This bug should have been fixed
- in FreeBSD 6.3 and FreeBSD 7.0. NetBSD and DragonFlyBSD probably have or
- have had the same bug. More information can be found at:
+### Installing ###
- * <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c>
- * <http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html>
+* An `install` program that can take multiple file names.
-* `getcwd()` on Solaris 9 can cause an emulator crash. If you have
- async-threads enabled you can increase the stack size of the
- async-threads as a temporary workaround. See the `+a` command-line
- argument in the documentation of `erl(1)`. Without async-threads the
- emulator is not as vulnerable to this bug, but if you hit it without
- async-threads the only workaround available is to enable async-threads
- and increase the stack size of the async-threads. Sun has however
- released patches that fixes the issue:
- > Problem Description: 6448300 large mnttab can cause stack overrun
- > during Solaris 9 getcwd
+Optional Utilities
+------------------
- More information can be found at:
+Some applications are automatically skipped if the dependencies aren't met.
+Here is a list of utilities needed for those applications. You will
+also find the utilities needed for building the documentation.
- * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-112874-40-1&searchclause=6448300>
- * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-114432-29-1&searchclause=6448300>
+### Building ###
-Required Utilities
-------------------
+* OpenSSL -- The opensource toolkit for Secure Socket Layer
+ and Transport Layer Security.
+ Required for building the application `crypto`.
+ Further, `ssl` and `ssh` require a working crypto application and
+ will also be skipped if OpenSSL is missing. The `public_key`
+ application will available without `crypto`, but the functionality
+ will be very limited.
+
+ The development package of OpenSSL including the header files are needed as well
+ as the binary command program `openssl`. At least version 0.9.8 of OpenSSL is required.
+ Read more and download from <http://www.openssl.org>.
+* Oracle Java SE JDK -- The Java Development Kit (Standard Edition).
+ Required for building the application `jinterface` and parts of `ic` and `orber`.
+ At least version 1.5.0 of the JDK is required.
+
+ Download from <http://www.oracle.com/technetwork/java/javase/downloads>.
+ We have also tested with IBM's JDK 1.5.0.
+* X Windows -- Development headers and libraries are needed
+ to build the Erlang/OTP application `gs` on Unix/Linux.
+* `flex` -- Headers and libraries are needed to build the flex
+ scanner for the `megaco` application on Unix/Linux.
+* wxWidgets -- Toolkit for GUI applications.
+ Required for building the `wx` application. At least
+ version 3.0 of wxWidgets is required.
-These are the tools you will need in order to unpack and build Erlang/OTP.
+ Download from <http://sourceforge.net/projects/wxwindows/files/3.0.0/>
+ or get it from GitHub: <https://github.com/wxWidgets/wxWidgets>
-### Unpacking ###
+ Further instructions on wxWidgets, read [Building with wxErlang][].
-* GNU unzip, or a modern uncompress.
-* A TAR program that understands the GNU TAR format for long filenames
- (such as GNU TAR).
-### Building ###
-* GNU `make`
-* `gcc` -- GNU C compiler
-* Perl 5
-* GNU `m4` -- If HiPE (native code) support is enabled. HiPE can be
- disabled using `--disable-hipe`
-* `ncurses`, `termcap`, or `termlib` -- The development headers and
- libraries are needed, often known as `ncurses-devel`. Use
- `--without-termcap` to build without any of these libraries. Note that
- in this case only the old shell (without any line editing) can be used.
-* OpenSSL -- Optional, but needed for building the Erlang/OTP applications
- `ssl` and `crypto`. You need the "development package" of OpenSSL, i.e.
- including the header files. For building the application `ssl` the OpenSSL
- binary command program `openssl` is also needed. At least version 0.9.8
- of OpenSSL is required. Can be downloaded from <http://www.openssl.org>.
-* Sun Java jdk-1.5.0 or higher -- Optional but needed for building the
- Erlang/OTP application `jinterface` and parts of `ic` and `orber`. Can
- be downloaded from <http://java.sun.com>. We have also tested IBM's
- JDK 1.5.0.
-* X Windows -- Optional, but development headers and libraries are needed
- to build the Erlang/OTP application `gs` on Unix/Linux.
-* `sed` -- There seem to be some problems with some of the `sed` version on
- Solaris. Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris
- platform.
-* `flex` -- Optional, headers and libraries are needed to build the `flex`
- scanner for the `megaco` application on Unix/Linux.
+### Building Documentation ###
-#### Building Documentation ####
+* `xsltproc` -- A command line XSLT processor.
-* `xsltproc` -- XSLT processor. A tool for applying XSLT stylesheets
- to XML documents. Can be downloaded from
+ A tool for applying XSLT stylesheets
+ to XML documents. Download xsltproc from
<http://xmlsoft.org/XSLT/xsltproc2.html>.
+
* `fop` -- Apache FOP print formatter (requires Java). Can be downloaded
from <http://xmlgraphics.apache.org/fop>.
-#### Building in Git ####
-* GNU `autoconf` of at least version 2.59. Note that `autoconf` is not
- needed when building an unmodified version of the released source.
-
-### Installing ###
-
-* An `install` program that can take multiple file names.
How to Build and Install Erlang/OTP
-----------------------------------
@@ -186,65 +121,205 @@ section below before proceeding.
### Unpacking ###
-Step 1: Start by unpacking the Erlang/OTP distribution file with your GNU
+Start by unpacking the Erlang/OTP distribution file with your GNU
compatible TAR program.
- $ gunzip -c otp_src_%OTP-REL%.tar.gz | tar xf -
+ $ tar -zxf otp_src_%OTP-VSN%.tar.gz # Assuming bash/sh
-alternatively:
+Now change directory into the base directory and set the `$ERL_TOP` variable.
- $ zcat otp_src_%OTP-REL%.tar.gz | tar xf -
+ $ cd otp_src_%OTP-VSN%
+ $ export ERL_TOP=`pwd` # Assuming bash/sh
+### Configuring ###
-Step 2: Now cd into the base directory (`$ERL_TOP`).
+Run the following commands to configure the build:
- $ cd otp_src_%OTP-REL%
+ $ ./configure [ options ]
-### Configuring ###
+> *NOTE*: If you are building Erlang/OTP from git you will need to run `./otp_build autoconf` to generate
+> the configure scripts.
-Step 3: On some platforms Perl may behave strangely if certain locales are
-set, so optionally you may need to set the LANG variable:
+By default, Erlang/OTP release will be installed in `/usr/local/{bin,lib/erlang}`.
+If you for instance don't have the permission to install in the standard location,
+ you can install Erlang/OTP somewhere else. For example, to install in
+`/opt/erlang/%OTP-VSN%/{bin,lib/erlang}`, use the `--prefix=/opt/erlang/%OTP-VSN%` option.
- # Bourne shell
- $ LANG=C; export LANG
+On some platforms Perl may behave strangely if certain locales are
+set. If you get errors when building, try setting the LANG variable:
-or
+ $ export LANG=C # Assuming bash/sh
- # C-Shell
- $ setenv LANG C
-Step 4: Run the following commands to configure the build:
+### Building ###
- $ ./configure [ options ]
+Build the Erlang/OTP release.
-If you are building it from git you will need to run `autoconf` to generate configure file.
-By default, Erlang/OTP will be installed in `/usr/local/{bin,lib/erlang}`.
-To instead install in `<BaseDir>/{bin,lib/erlang}`, use the
-`--prefix=<BaseDir>` option.
+ $ make
-If you upgraded the source with some patch you may need to clean up
-from previous builds before the new build. Before doing a `make clean`,
-be sure to read the [Pre-built Source Release][] section below.
-### Building ###
+### Testing ###
-Step 5: Build the Erlang/OTP package.
+Before installation you should test whether your build is working properly
+by running our smoke test. The smoke test is a subset of the complete Erlang/OTP test suites.
+First you will need to build and release the test suites.
- $ make
+ $ make release_tests
+
+This creates an additional folder in `$ERL_TOP/release` called `tests`.
+Now, it's time to start the smoke test.
+
+ $ cd release/tests/test_server
+ $ $ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
+
+To verify that everything is ok you should open `$ERL_TOP/release/tests/test_server/index.html`
+in your web browser and make sure that there are zero failed test cases.
+
+> *NOTE*: On builds without `crypto`, `ssl` and `ssh` there is a failed test case
+> for undefined functions. Verify that the failed test case log only shows calls
+> to skipped applications.
### Installing ###
-Step 6: Install then Erlang/OTP package
+You are now ready to install the Erlang/OTP release!
+The following command will install the release on your system.
$ make install
-### A Closer Look at the individual Steps ###
-Let us go through them in some detail.
+### Running ###
+
+You should now have a working release of Erlang/OTP!
+Jump to [System Principles][] for instructions on running Erlang/OTP.
+
+
+### How to Build the Documentation ###
+
+Make sure you're in the top directory in the source tree.
+
+ $ cd $ERL_TOP
+
+If you have just built Erlang/OTP in the current source tree, you have
+already ran `configure` and do not need to do this again; otherwise, run
+`configure`.
+
+ $ ./configure [Configure Args]
+
+When building the documentation you need a full Erlang/OTP-%OTP-VSN% system in
+the `$PATH`.
+
+ $ export PATH=$ERL_TOP/bin:$PATH # Assuming bash/sh
+
+Build the documentation.
+
+ $ make docs
+
+#### Build Issues ####
+
+We have sometimes experienced problems with Oracle's `java` running out of
+memory when running `fop`. Increasing the amount of memory available
+as follows has in our case solved the problem.
+
+ $ export FOP_OPTS="-Xmx<Installed amount of RAM in MB>m"
+
+More information can be found at
+* <http://xmlgraphics.apache.org/fop/0.95/running.html#memory>.
+
+
+### How to Install the Documentation ###
+
+The documentation can be installed either using the `install-docs` target,
+or using the `release_docs` target.
+
+* If you have installed Erlang/OTP using the `install` target, install
+ the documentation using the `install-docs` target. Install locations
+ determined by `configure` will be used. `$DESTDIR` can be used the
+ same way as when doing `make install`.
+
+ $ make install-docs
+
+* If you have installed Erlang/OTP using the `release` target, install
+ the documentation using the `release_docs` target. You typically want
+ to use the same `RELEASE_ROOT` as when invoking `make release`.
+
+ $ make release_docs RELEASE_ROOT=<release dir>
+
+
+### Accessing the Documentation ###
+
+After installation you can access the documentation by
+
+* Reading man pages. Make sure that `erl` is referring to the
+ installed version. For example `/usr/local/bin/erl`.
+ Try viewing at the man page for Mnesia
+
+ $ erl -man mnesia
-#### Configuring ####
+* Browsing the html pages by loading the page `/usr/local/lib/erlang/doc/erlang/index.html`
+ or `<BaseDir>/lib/erlang/doc/erlang/index.html` if the prefix option has been used.
-Step 4 runs a configuration script created by the GNU autoconf utility, which
+
+### How to Install the Pre-formatted Documentation ###
+
+Pre-formatted [html documentation][] and [man pages][] can be downloaded from
+* <http://www.erlang.org/download.html>.
+
+Extract the html archive in the installation directory.
+
+ $ cd <ReleaseDir>
+ $ tar -zxf otp_html_%OTP-VSN%.tar.gz
+
+For `erl -man <page>` to work the Unix manual pages have to be
+installed in the same way, i.e.
+
+ $ cd <ReleaseDir>
+ $ tar -zxf otp_man_%OTP-VSN%.tar.gz
+
+Where `<ReleaseDir>` is
+
+* `<PrefixDir>/lib/erlang` if you have installed Erlang/OTP using
+ `make install`.
+* `$DESTDIR<PrefixDir>/lib/erlang` if you have installed Erlang/OTP
+ using `make install DESTDIR=<TmpInstallDir>`.
+* `RELEASE_ROOT` if you have installed using
+ `make release RELEASE_ROOT=<ReleaseDir>`.
+
+
+Advanced configuration and build of Erlang/OTP
+----------------------------------------------
+
+If you want to tailor your Erlang/OTP build and installation, please read
+on for detailed information about the individual steps.
+
+### make and $ERL\_TOP ###
+
+All the makefiles in the entire directory tree use the environment
+variable `ERL_TOP` to find the absolute path of the installation. The
+`configure` script will figure this out and set it in the top level
+Makefile (which, when building, it will pass on). However, when
+developing it is sometimes convenient to be able to run make in a
+subdirectory. To do this you must set the `ERL_TOP` variable
+before you run make.
+
+For example, assume your GNU make program is called `make` and you
+want to rebuild the application `STDLIB`, then you could do:
+
+ $ cd lib/stdlib; env ERL_TOP=<Dir> make
+
+where `<Dir>` would be what you find `ERL_TOP` is set to in the top level
+Makefile.
+
+### otp\_build vs configure/make ###
+
+Building Erlang/OTP can be done either by using the `$ERL_TOP/otp_build`
+script, or by invoking `$ERL_TOP/configure` and `make` directly. Building using
+`otp_build` is easier since it involves fewer steps, but the `otp_build` build
+procedure is not as flexible as the `configure`/`make` build procedure. The binary
+releases for Windows that we deliver are built using `otp_build`.
+
+### Configuring ###
+
+The configure script is created by the GNU autoconf utility, which
checks for system specific features and then creates a number of makefiles.
The configure script allows you to customize a number of parameters;
@@ -260,27 +335,37 @@ use the `--prefix` argument like this: `./configure --prefix=<Dir>`.
Some of the available `configure` options are:
* `--prefix=PATH` - Specify installation prefix.
-* `--{enable,disable}-threads` - Thread support (enabled by default if
- possible)
+
+* `--{enable,disable}-threads` - Thread support. This is enabled by default if possible.
* `--{enable,disable}-smp-support` - SMP support (enabled by default if
- possible)
+ a usable POSIX thread library or native Windows threads is found)
* `--{enable,disable}-kernel-poll` - Kernel poll support (enabled by
default if possible)
* `--{enable,disable}-hipe` - HiPE support (enabled by default on supported
platforms)
+* `--{enable,disable}-fp-exceptions` - Floating point exceptions (an
+ optimization for floating point operations). The default differs
+ depending on operating system and hardware platform. Note that by
+ enabling this you might get a seemingly working system that sometimes
+ fail on floating point operations.
* `--enable-darwin-universal` - Build universal binaries on darwin i386.
* `--enable-darwin-64bit` - Build 64-bit binaries on darwin
* `--enable-m64-build` - Build 64-bit binaries using the `-m64` flag to
`(g)cc`
* `--enable-m32-build` - Build 32-bit binaries using the `-m32` flag to
`(g)cc`
+* `--with-assumed-cache-line-size=SIZE` - Set assumed cache-line size in
+ bytes. Default is 64. Valid values are powers of two between and
+ including 16 and 8192. The runtime system use this value in order to
+ try to avoid false sharing. A too large value wastes memory. A to
+ small value will increase the amount of false sharing.
* `--{with,without}-termcap` - termcap (without implies that only the old
Erlang shell can be used)
* `--with-javac=JAVAC` - Specify Java compiler to use
* `--{with,without}-javac` - Java compiler (without implies that the
`jinterface` application won't be built)
* `--{enable,disable}-dynamic-ssl-lib` - Dynamic OpenSSL libraries
-* `--{enable,disable}-shared-zlib` - Shared zlib library
+* `--{enable,disable}-builtin-zlib` - Use the built-in source for zlib.
* `--with-ssl=PATH` - Specify location of OpenSSL include and lib
* `--{with,without}-ssl` - OpenSSL (without implies that the `crypto`,
`ssh`, and `ssl` won't be built)
@@ -288,7 +373,7 @@ Some of the available `configure` options are:
memory accesses. If `configure` should inform you about no native atomic
implementation available, you typically want to try using the
`libatomic_ops` library. It can be downloaded from
- <http://www.hpl.hp.com/research/linux/atomic_ops/>.
+ <https://github.com/ivmai/libatomic_ops/>.
* `--disable-smp-require-native-atomics` - By default `configure` will
fail if an SMP runtime system is about to be built, and no implementation
for native atomic memory accesses can be found. If this happens, you are
@@ -297,36 +382,189 @@ Some of the available `configure` options are:
you can build using a fallback implementation based on mutexes or spinlocks.
Performance of the SMP runtime system will however suffer immensely without
an implementation for native atomic memory accesses.
+* `--enable-static-{nifs,drivers}` - To allow usage of nifs and drivers on OSs
+ that do not support dynamic linking of libraries it is possible to statically
+ link nifs and drivers with the main Erlang VM binary. This is done by passing
+ a comma separated list to the archives that you want to statically link. e.g.
+ `--enable-static-nifs=/home/$USER/my_nif.a`. The path has to be absolute and the
+ name of the archive has to be the same as the module, i.e. `my_nif` in the
+ example above. This is also true for drivers, but then it is the driver name
+ that has to be the same as the filename. You also have to define
+ `STATIC_ERLANG_{NIF,DRIVER}` when compiling the .o files for the nif/driver.
+ If your nif/driver depends on some other dynamic library, you now have to link
+ that to the Erlang VM binary. This is easily achived by passing `LIBS=-llibname`
+ to configure.
* `--without-$app` - By default all applications in Erlang/OTP will be included
in a release. If this is not wanted it is possible to specify that Erlang/OTP
- should be compiled without that applications, i.e. `--without-wx`. There is
- no automatic dependency handling inbetween applications. So if you disable
- an application that another depends on, you also have to disable the
+ should be compiled without one or more applications, i.e. `--without-wx`. There is
+ no automatic dependency handling between applications. If you disable
+ an application that another application depends on, you also have to disable the
dependant application.
+* `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers
+ functionality. Note that the dirty schedulers functionality is experimental,
+ and **not supported**. This functionality **will** be subject to backward
+ incompatible changes. Note that you should **not** enable the dirty scheduler
+ functionality on production systems. It is only provided for testing.
If you or your system has special requirements please read the `Makefile` for
additional configuration information.
-#### Building ####
+#### Atomic Memory Operations and the VM ####
+
+The VM with SMP support makes quite a heavy use of atomic memory operations.
+An implementation providing native atomic memory operations is therefore very
+important when building Erlang/OTP. By default the VM will refuse to build
+if native atomic memory operations are not available.
+
+Erlang/OTP itself provides implementations of native atomic memory operations
+that can be used when compiling with a `gcc` compatible compiler on 32-bit
+and 64-bit x86, 32-bit and 64-bit SPARC V9, and 32-bit PowerPC. When compiling
+with a `gcc` compatible compiler on other architectures, the VM may be able to
+make use of native atomic operations using the `__sync_*` primitives, but this
+should only be used as a last resort since this wont give you optimal
+performance. When compiling on Windows using a MicroSoft Visual C++ compiler
+native atomic memory operations are provided by Windows APIs.
+
+You are recommended to use the native atomic implementation provided by
+Erlang/OTP, or the API provided by Windows. If these do not provide native
+atomics on your platform, you are recommended to build and install
+[libatomic_ops][] before building Erlang/OTP. The `libatomic_ops` library
+provides native atomic memory operations for a variety of platforms and
+compilers. When building Erlang/OTP you need to inform the build system of
+where the `libatomic_ops` library is installed using the
+`--with-libatomic_ops=PATH` configure switch.
-Step 5 builds the Erlang/OTP system. On a fast computer, this will take about
-5 minutes. After completion of this step, you should have a working
-Erlang/OTP system which you can try by typing `bin/erl`. This should start
-up Erlang/OTP and give you a prompt:
+### Building ###
- $ bin/erl
- Erlang %OTP-REL% (erts-%ERTS-VSN%) [source] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
+Building Erlang/OTP on a relatively fast computer takes approximately
+5 minutes. To speed it up, you can utilize parallel make with the `-j<num_jobs>` option.
- Eshell V%ERTS-VSN% (abort with ^G)
- 1> _
+ $ export MAKEFLAGS=-j8 # Assuming bash/sh
+ $ make
-#### Installing ####
+If you've upgraded the source with a patch you may need to clean up from previous
+builds before the new build.
+Make sure to read the [Pre-built Source Release][] section below before doing a `make clean`.
-Step 6 is optional. It installs Erlang/OTP at a standardized location (if you
-change your mind about where you wish to install you can rerun step 4,
-without having to do step 5 again).
+#### Within Git ####
-##### Alternative Installation Procedures #####
+When building in a Git working directory you also have to have a GNU `autoconf`
+of at least version 2.59 on your system, because you need to generate the
+`configure` scripts before you can start building.
+
+The `configure` scripts are generated by invoking `./otp_build autoconf` in
+the `$ERL_TOP` directory. The `configure` scripts also have to be regenerated
+when a `configure.in` or `aclocal.m4` file has been modified. Note that when
+checking out a branch a `configure.in` or `aclocal.m4` file may change
+content, and you may therefore have to regenerate the `configure` scripts
+when checking out a branch. Regenerated `configure` scripts imply that you
+have to run `configure` and build again.
+
+> *NOTE*: Running `./otp_build autoconf` is **not** needed when building
+> an unmodified version of the released source.
+
+Other useful information can be found at our GitHub wiki:
+* <http://wiki.github.com/erlang/otp>
+
+#### OS X (Darwin) ####
+
+Make sure that the command `hostname` returns a valid fully qualified host
+name (this is configured in `/etc/hostconfig`). Otherwise you might experience
+problems when running distributed systems.
+
+If you develop linked-in drivers (shared library) you need to link using
+`gcc` and the flags `-bundle -flat_namespace -undefined suppress`. You also
+include `-fno-common` in `CFLAGS` when compiling. Use `.so` as the library
+suffix.
+
+If you have Xcode 4.3, or later, you will also need to download
+"Command Line Tools" via the Downloads preference pane in Xcode.
+
+#### Building with wxErlang ####
+
+If you want to build the `wx` application, you will need to get wxWidgets-3.0
+(`wxWidgets-3.0.0.tar.bz2` from <http://sourceforge.net/projects/wxwindows/files/3.0.0/>) or get it from github with bug fixes:
+
+ $ git clone --branch WX_3_0_branch [email protected]:wxWidgets/wxWidgets.git
+
+Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as
+mature as the old releases and the OS X port still lags behind the other ports.
+
+Configure and build wxWidgets (on Mavericks - 10.9):
+
+ $ ./configure --with-cocoa --prefix=/usr/local
+ or without support for old versions and with static libs
+ $ ./configure --with-cocoa --prefix=/usr/local --with-macosx-version-min=10.9 --disable-shared
+ $ make
+ $ sudo make install
+ $ export PATH=/usr/local/bin:$PATH
+
+Check that you got the correct wx-config
+
+ $ which wx-config && wx-config --version-full
+
+Build Erlang/OTP
+
+ $ export PATH=/usr/local/bin:$PATH
+ $ cd $ERL_TOP
+ $ ./configure
+ $ make
+ $ sudo make install
+
+
+#### Pre-built Source Release ####
+
+The source release is delivered with a lot of platform independent
+build results already pre-built. If you want to remove these pre-built
+files, invoke `./otp_build remove_prebuilt_files` from the `$ERL_TOP`
+directory. After you have done this, you can build exactly the same way
+as before, but the build process will take a much longer time.
+
+> *WARNING*: Doing `make clean` in an arbitrary directory of the source
+> tree, may remove files needed for bootstrapping the build.
+>
+> Doing `./otp_build save_bootstrap` from the `$ERL_TOP` directory before
+> doing `make clean` will ensure that it will be possible to build after
+> doing `make clean`. `./otp_build save_bootstrap` will be invoked
+> automatically when `make` is invoked from `$ERL_TOP` with either the
+> `clean` target, or the default target. It is also automatically invoked
+> if `./otp_build remove_prebuilt_files` is invoked.
+
+#### How to Build a Debug Enabled Erlang RunTime System ####
+
+After completing all the normal building steps described above a debug
+enabled runtime system can be built. To do this you have to change
+directory to `$ERL_TOP/erts/emulator`.
+
+In this directory execute:
+
+ $ make debug FLAVOR=$FLAVOR
+
+where `$FLAVOR` is either `plain` or `smp`. The flavor options will
+produce a beam.debug and beam.smp.debug executable respectively. The
+files are installed along side with the normal (opt) versions `beam.smp`
+and `beam`.
+
+To start the debug enabled runtime system execute:
+
+ $ $ERL_TOP/bin/cerl -debug
+
+The debug enabled runtime system features lock violation checking,
+assert checking and various sanity checks to help a developer ensure
+correctness. Some of these features can be enabled on a normal beam
+using appropriate configure options.
+
+There are other types of runtime systems that can be built as well
+using the similar steps just described.
+
+ $ make $TYPE FLAVOR=$FLAVOR
+
+where `$TYPE` is `opt`, `gcov`, `gprof`, `debug`, `valgrind`, or `lcnt`.
+These different beam types are useful for debugging and profiling
+purposes.
+
+
+### Installing ###
* Staged install using [DESTDIR][]. You can perform the install
phase in a temporary directory and later move the installation into
@@ -408,7 +646,7 @@ without having to do step 5 again).
if you want to try the system out, running test suites, etc, before doing
the real install without `EXTRA_PREFIX`.
-### Symbolic Links in --bindir ###
+#### Symbolic Links in --bindir ####
When doing `make install` and the default installation prefix is used,
relative symbolic links will be created from `/usr/local/bin` to all public
@@ -422,166 +660,10 @@ passed to `configure`. One can force relative, or absolute links by passing
phase. Note that such a request might cause a failure if the request cannot
be satisfied.
-### Pre-built Source Release ###
-The source release is delivered with a lot of platform independent
-build results already pre-built. If you want to remove these pre-built
-files, invoke `./otp_build remove_prebuilt_files` from the `$ERL_TOP`
-directory. After you have done this, you can build exactly the same way
-as before, but the build process will take a much longer time.
+### Running ###
-> *WARNING*: Doing `make clean` in an arbitrary directory of the source
-> tree, may remove files needed for bootstrapping the build.
->
-> Doing `./otp_build save_bootstrap` from the `$ERL_TOP` directory before
-> doing `make clean` will ensure that it will be possible to build after
-> doing `make clean`. `./otp_build save_bootstrap` will be invoked
-> automatically when `make` is invoked from `$ERL_TOP` with either the
-> `clean` target, or the default target. It is also automatically invoked
-> if `./otp_build remove_prebuilt_files` is invoked.
-
-### Building in Git ###
-
-When building in a Git working directory you also have to have a GNU `autoconf`
-of at least version 2.59 on your system, because you need to generate the
-`configure` scripts before you can start building.
-
-The `configure` scripts are generated by invoking `./otp_build autoconf` in
-the `$ERL_TOP` directory. The `configure` scripts also have to be regenerated
-when a `configure.in` or `aclocal.m4` file has been modified. Note that when
-checking out a branch a `configure.in` or `aclocal.m4` file may change
-content, and you may therefore have to regenerate the `configure` scripts
-when checking out a branch. Regenerated `configure` scripts imply that you
-have to run `configure` and build again.
-
-> *NOTE*: Running `./otp_build autoconf` is **not** needed when building
-> an unmodified version of the released source.
-
-Other useful information can be found at our github wiki:
-<http://wiki.github.com/erlang/otp>
-
-### make and $ERL\_TOP ###
-
-All the makefiles in the entire directory tree use the environment
-variable `ERL_TOP` to find the absolute path of the installation. The
-`configure` script will figure this out and set it in the top level
-Makefile (which, when building, it will pass on). However, when
-developing it is sometimes convenient to be able to run make in a
-subdirectory. To do this you must set the `ERL_TOP` variable
-before you run make.
-
-For example, assume your GNU make program is called `make` and you
-want to rebuild the application `STDLIB`, then you could do:
-
- $ cd lib/stdlib; env ERL_TOP=<Dir> make
-
-where `<Dir>` would be what you find `ERL_TOP` is set to in the top level
-Makefile.
-
-The Erlang/OTP Documentation
-----------------------------
-
-### How to Build the Documentation ###
-
- $ cd $ERL_TOP
-
-If you have just built Erlang/OTP in the current source tree, you have
-already ran `configure` and do not need to do this again; otherwise, run
-`configure`.
-
- $ ./configure [Configure Args]
-
-When building the documentation you need a full Erlang/OTP-%OTP-REL% system in
-the `$PATH`.
-
- $ export PATH=<Erlang/OTP-%OTP-REL% bin dir>:$PATH # Assuming bash/sh
-
-Build the documentation.
-
- $ make docs
-
-The documentation can be installed either using the `install-docs` target,
-or using the `release_docs` target.
-
-* If you have installed Erlang/OTP using the `install` target, install
- the documentation using the `install-docs` target. Install locations
- determined by `configure` will be used. `$DESTDIR` can be used the
- same way as when doing `make install`.
-
- $ make install-docs
-
-* If you have installed Erlang/OTP using the `release` target, install
- the documentation using the `release_docs` target. You typically want
- to use the same `RELEASE_ROOT` as when invoking `make release`.
-
- $ make release_docs RELEASE_ROOT=<release dir>
-
-#### Build Issues ####
-
-We have sometimes experienced problems with Sun's `java` running out of
-memory when running `fop`. Increasing the amount of memory available
-as follows has in our case solved the problem.
-
- $ export FOP_OPTS="-Xmx<Installed amount of RAM in MB>m"
-
-More information can be found at
-<http://xmlgraphics.apache.org/fop/0.95/running.html#memory>.
-
-### How to Install the Pre-formatted Documentation ###
-
-Pre-formatted [html documentation][] and [man pages][] can be downloaded at
-<http://www.erlang.org/download.html>.
-
-For some graphical tools to find the on-line help you have to install
-the HTML documentation on top of the installed OTP applications, i.e.
-
- $ cd <ReleaseDir>
- $ gunzip -c otp_html_%OTP-REL%.tar.gz | tar xf -
-
-For `erl -man <page>` to work the Unix manual pages have to be
-installed in the same way, i.e.
-
- $ cd <ReleaseDir>
- $ gunzip -c otp_man_%OTP-REL%.tar.gz | tar xf -
-
-Where `<ReleaseDir>` is
-
-* `<PrefixDir>/lib/erlang` if you have installed Erlang/OTP using
- `make install`.
-* `$DESTDIR<PrefixDir>/lib/erlang` if you have installed Erlang/OTP
- using `make install DESTDIR=<TmpInstallDir>`.
-* `RELEASE_ROOT` if you have installed using
- `make release RELEASE_ROOT=<ReleaseDir>`.
-
-Support for SMP (Symmetric Multi Processing)
---------------------------------------------
-
-An emulator with SMP support will be built by default on most platforms
-if a usable POSIX thread library or native Windows threads is found.
-
-You can force building of an SMP emulator, by using
-`./configure --enable-smp-support`. However, if configure does not
-automatically enable SMP support, the build is very likely to fail.
-
-Use `./configure --disable-smp-support` if you for some reason do not
-want to have the emulator with SMP support built.
-
-If SMP support is enabled, support for threaded I/O will also be turned on
-(also in the emulator without SMP support).
-
-The `erl` command will automatically start the SMP emulator if the
-computer has more than one logical processor. You can force a start
-of the emulator with SMP support by passing `-smp enable` as
-command line arguments to erl, and you can force a start of the
-emulator without SMP support by passing `-smp disable`.
-
-GS (Graphic System)
--------------------
-
-GS now Tcl/Tk 8.4. It will be searched for when starting GS.
-
-Using HiPE
-----------
+#### Using HiPE ####
HiPE supports the following system configurations:
@@ -602,12 +684,12 @@ HiPE supports the following system configurations:
* FreeBSD: FreeBSD 6.1 and 6.2 in 32-bit and 64-bit modes should work.
- * MacOSX/Darwin: Darwin 9.8.0 in 32-bit mode should work.
+ * OS X/Darwin: Darwin 9.8.0 in 32-bit mode should work.
* PowerPC: All 32-bit 6xx/7xx(G3)/74xx(G4) processors should work. 32-bit
mode on 970 (G5) and POWER5 processors should work.
- * Linux (Yellow Dog) and Mac OSX 10.4 are supported.
+ * Linux (Yellow Dog) and OS X 10.4 are supported.
* SPARC: All UltraSPARC processors running 32-bit user code should work.
@@ -626,11 +708,11 @@ HiPE is automatically enabled on the following systems:
* x86 in 32-bit mode: Linux, Solaris, FreeBSD
* x86 in 64-bit mode: Linux, Solaris, FreeBSD
-* PowerPC: Linux, MacOSX
+* PowerPC: Linux, Mac OSX
* SPARC: Linux
* ARM: Linux
-On other supported systems you need to `./configure --enable-hipe`.
+On other supported systems, see [Advanced Configure][] on how to enable HiPE.
If you are running on a platform supporting HiPE and if you have not disabled
HiPE, you can compile a module into native code like this from the Erlang
@@ -642,7 +724,7 @@ or
1> c(Module, [native|OtherOptions]).
-Using the erlc program, write like this:
+Using the erlc program, write like this
$ erlc +native Module.erl
@@ -657,115 +739,102 @@ Use `hipe:help_options/0` to print out the available options.
1> hipe:help_options().
-Mac OS X (Darwin)
------------------
-
-Make sure that the command `hostname` returns a valid fully qualified host
-name (this is configured in `/etc/hostconfig`).
-
-If you develop linked-in drivers (shared library) you need to link using
-`gcc` and the flags `-bundle -flat_namespace -undefined suppress`. You also
-include `-fno-common` in `CFLAGS` when compiling. Use `.so` as the library
-suffix.
-
-Use the `--enable-darwin-64bit` configure flag to build a 64-bit
-binaries on Mac OS X.
-
-Building a fast Erlang VM on Mac OS Lion
-----------------------------------------
-
-Starting with Xcode 4.2, Apple no longer includes a "real" `gcc`
-compiler (not based on the LLVM). Building with `llvm-gcc` or `clang`
-will work, but the performance of the Erlang run-time system will not
-be the best possible.
-
-Note that if you have `gcc-4.2` installed and included in `PATH`
-(from a previous version of Xcode), `configure` will automatically
-make sure that `gcc-4.2` will be used to compile `beam_emu.c`
-(the source file most in need of `gcc`).
-
-If you don't have `gcc-4.2.` and want to build a run-time system with
-the best possible performance, do like this:
+#### Running with GS ####
-Install Xcode from the AppStore if it is not already installed.
+The `gs` application requires the GUI toolkit Tcl/Tk to run. At least
+version 8.4 is required.
-If you have Xcode 4.3, or later, you will also need to download
-"Command Line Tools" via the Downloads preference pane in Xcode.
-
-Some tools may still be lacking or out-of-date, we recommend using
-[Homebrew](https://github.com/mxcl/homebrew/wiki/installation) or
-Macports to update those tools.
-
-Install MacPorts (<http://www.macports.org/>). Then:
-
- $ sudo port selfupdate
- $ sudo port install gcc45 +universal
-
-### Building with wxErlang ###
-
-If you want to build the `wx` application, you will need to get wxWidgets-3.0 (or later)
-(`wxWidgets-3.0.0.tar.bz2` from <http://sourceforge.net/projects/wxwindows/files/3.0.0/>)
-or get it from github:
- $ git clone [email protected]:wxWidgets/wxWidgets.git
-
-Be aware that the wxWidgets-3.0 is a new release of wxWidgets, it is not as matured
-as the old releases and the MacOsX port still lags behind the other ports.
-
-Configure and build wxWidgets:
-
- $ ./configure --with-cocoa --prefix=/usr/local
- % Optional version and static libs: --with-macosx-version-min=10.9 --disable-shared
- $ make
- $ sudo make install
- $ export PATH=/usr/local/bin:$PATH
+Known platform issues
+---------------------
-Check that you got the correct wx-config
+* Suse linux 9.1 is shipped with a patched GCC version 3.3.3, having the
+ rpm named `gcc-3.3.3-41`. That version has a serious optimization bug
+ that makes it unusable for building the Erlang emulator. Please
+ upgrade GCC to a newer version before building on Suse 9.1. Suse Linux
+ Enterprise edition 9 (SLES9) has `gcc-3.3.3-43` and is not affected.
- $ which wx-config
+* `gcc-4.3.0` has a serious optimizer bug. It produces an Erlang emulator
+ that will crash immediately. The bug is supposed to be fixed in
+ `gcc-4.3.1`.
-### Finish up ###
+* FreeBSD had a bug which caused `kqueue`/`poll`/`select` to fail to detect
+ that a `writev()` on a pipe has been made. This bug should have been fixed
+ in FreeBSD 6.3 and FreeBSD 7.0. NetBSD and DragonFlyBSD probably have or
+ have had the same bug. More information can be found at:
-Build Erlang
+ * <http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c>
+ * <http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html>
- $ export PATH=/usr/local/bin:$PATH
- $ cd $ERL_TOP
- $ ./configure --enable-shared-zlib
- $ make
- $ sudo make install
+* `getcwd()` on Solaris 9 can cause an emulator crash. If you have
+ async-threads enabled you can increase the stack size of the
+ async-threads as a temporary workaround. See the `+a` command-line
+ argument in the documentation of `erl(1)`. Without async-threads the
+ emulator is not as vulnerable to this bug, but if you hit it without
+ async-threads the only workaround available is to enable async-threads
+ and increase the stack size of the async-threads. Oracle has however
+ released patches that fixes the issue:
-How to Build a Debug Enabled Erlang RunTime System
---------------------------------------------------
+ > Problem Description: 6448300 large mnttab can cause stack overrun
+ > during Solaris 9 getcwd
-After completing all the normal building steps described above a debug
-enabled runtime system can be built. To do this you have to change
-directory to `$ERL_TOP/erts/emulator`.
+ More information can be found at:
+ * <https://getupdates.oracle.com/readme/112874-40>
+ * <https://getupdates.oracle.com/readme/114432-29>
-In this directory execute:
+* `sed` on Solaris seem to have some problems. For example on
+ Solaris 8, the BSD `sed` and XPG4 `sed` should be avoided.
+ Make sure `/bin/sed` or `/usr/bin/sed` is used on the Solaris
+ platform.
- $ make debug FLAVOR=$FLAVOR
-where `$FLAVOR` is either `plain` or `smp`. The flavor options will
-produce a beam.debug and beam.smp.debug executable respectively. The
-files are installed along side with the normal (opt) versions `beam.smp`
-and `beam`.
+Daily Build and Test
+--------------------
+At Ericsson we have a "Daily Build and Test" that runs on:
-To start the debug enabled runtime system execute:
+* Solaris 8, 9
+ * Sparc32
+ * Sparc64
+* Solaris 10
+ * Sparc32
+ * Sparc64
+ * x86
+* SuSE Linux/GNU 9.4, 10.1
+ * x86
+* SuSE Linux/GNU 10.0, 10.1, 11.0
+ * x86
+ * x86\_64
+* openSuSE 11.4 (Celadon)
+ * x86\_64 (valgrind)
+* Fedora 7
+ * PowerPC
+* Fedora 16
+ * x86\_64
+* Gentoo Linux/GNU 1.12.11.1
+ * x86
+* Ubuntu Linux/GNU 7.04, 10.04, 10.10, 11.04, 12.04
+ * x86\_64
+* MontaVista Linux/GNU 4.0.1
+ * PowerPC
+* FreeBSD 10.0
+ * x86
+* OpenBSD 5.4
+ * x86\_64
+* OS X 10.5.8 (Leopard), 10.7.5 (Lion), 10.9.1 (Mavericks)
+ * x86
+* Windows XP SP3, 2003, Vista, 7
+ * x86
+* Windows 7
+ * x86\_64
- $ $ERL_TOP/bin/cerl -debug
+We also have the following "Daily Cross Builds":
-The debug enabled runtime system features lock violation checking,
-assert checking and various sanity checks to help a developer ensure
-correctness. Some of these features can be enabled on a normal beam
-using appropriate configure options.
+* SuSE Linux/GNU 10.1 x86 -> SuSE Linux/GNU 10.1 x86\_64
+* SuSE Linux/GNU 10.1 x86\_64 -> Linux/GNU TILEPro64
-There are other types of runtime systems that can be built as well
-using the similar steps just described.
+and the following "Daily Cross Build Tests":
- $ make $TYPE FLAVOR=$FLAVOR
+* SuSE Linux/GNU 10.1 x86\_64
-where `$TYPE` is `opt`, `gcov`, `gprof`, `debug`, `valgrind`, or `lcnt`.
-These different beam types are useful for debugging and profiling
-purposes.
Authors
-------
@@ -774,12 +843,13 @@ Authors are mostly listed in the application's `AUTHORS` files,
that is `$ERL_TOP/lib/*/AUTHORS` and `$ERL_TOP/erts/AUTHORS`,
not in the individual source files.
+
Copyright and License
---------------------
%CopyrightBegin%
-Copyright Ericsson AB 1998-2013. All Rights Reserved.
+Copyright Ericsson AB 1998-2014. All Rights Reserved.
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
@@ -794,28 +864,26 @@ under the License.
%CopyrightEnd%
-More Information
-----------------
-
-More information can be found at <http://www.erlang.org>.
-
-Modifying This Document
------------------------
-Before modifying this document you need to have a look at the
-[$ERL_TOP/HOWTO/MARKDOWN.md][] document.
[$ERL_TOP/HOWTO/INSTALL-CROSS.md]: INSTALL-CROSS.md
[$ERL_TOP/HOWTO/INSTALL-WIN32.md]: INSTALL-WIN32.md
[DESTDIR]: http://www.gnu.org/prep/standards/html_node/DESTDIR.html
- [Building in Git]: #How-to-Build-and-Install-ErlangOTP_Building-in-Git
- [Pre-built Source Release]: #How-to-Build-and-Install-ErlangOTP_Prebuilt-Source-Release
- [make and $ERL_TOP]: #How-to-Build-and-Install-ErlangOTP_make-and-ERLTOP
- [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-REL%.tar.gz
- [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-REL%.tar.gz
- [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-REL%.tar.gz
- [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md
-
- [?TOC]: true
+ [Building in Git]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Within-Git
+ [Advanced Configure]: #Advanced-configuration-and-build-of-ErlangOTP_Configuring
+ [Pre-built Source Release]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Prebuilt-Source-Release
+ [make and $ERL_TOP]: #Advanced-configuration-and-build-of-ErlangOTP_make-and-ERLTOP
+ [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-VSN%.tar.gz
+ [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-VSN%.tar.gz
+ [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-VSN%.tar.gz
+ [System Principles]: ../system_principles/system_principles
+ [Known platform issues]: #Known-platform-issues
+ [native build]: #How-to-Build-and-Install-ErlangOTP
+ [cross build]: INSTALL-CROSS.md
+ [Required Utilities]: #Required-Utilities
+ [Optional Utilities]: #Optional-Utilities
+ [Building on a Mac]: #Advanced-configuration-and-build-of-ErlangOTP_Building_OS-X-Darwin
+ [Building with wxErlang]: #Advanced-configuration-and-build-of-ErlangOTP_Building_Building-with-wxErlang
+ [libatomic_ops]: https://github.com/ivmai/libatomic_ops/
diff --git a/HOWTO/MARKDOWN.md b/HOWTO/MARKDOWN.md
index c9ad09a1be..8e8a5c02cf 100644
--- a/HOWTO/MARKDOWN.md
+++ b/HOWTO/MARKDOWN.md
@@ -223,8 +223,11 @@ places. Appropriate attributes to the `X` tag will also be generated.
\%CopyrightBegin\% and \%CopyrightEnd\% "tags" will be removed from
the output.
-* All occurrences of \%OTP-REL% will be replaced by current release number
- (e.g. R14A).
+* All occurrences of \%OTP-REL% will be replaced by current OTP release number
+ (e.g. 17).
+
+* All occurrences of \%OTP-VSN% will be replaced by current OTP version
+ (e.g. 17.0).
* All occurrences of \%ERTS-VSN% will be replaced by current ERTS version
(e.g. 5.8).
diff --git a/HOWTO/OTP-PATCH-APPLY.md b/HOWTO/OTP-PATCH-APPLY.md
new file mode 100644
index 0000000000..2aa31629ef
--- /dev/null
+++ b/HOWTO/OTP-PATCH-APPLY.md
@@ -0,0 +1,144 @@
+Patching OTP Applications
+=========================
+
+Introduction
+------------
+
+This document describes the process of patching an existing OTP
+installation with one or more Erlang/OTP applications of newer versions
+than already installed. The tool `otp_patch_apply` is available for this
+specific purpose. It resides in the top directory of the Erlang/OTP
+source tree.
+
+The `otp_patch_apply` tool utilizes the [runtime_dependencies][] tag in
+the [application resource file][]. This information is used to determine
+if the patch can be installed in the given Erlang/OTP installation
+directory.
+
+Read more about the [version handling][] introduced in Erlang/OTP release
+17, which also describes how to determine if an installation includes one
+or more patched applications.
+
+If you want to apply patches of multiple OTP applications that resides
+in different OTP versions, you have to apply these patches in multiple
+steps. It is only possible to apply multiple OTP applications from the
+same OTP version at once.
+
+Prerequisites
+-------------
+
+It's assumed that the reader is familiar with
+[building and installing Erlang/OTP][]. To be able to patch an
+application, the following must exist:
+
+* An Erlang/OTP installation.
+
+* An Erlang/OTP source tree containing the updated applications that
+ you want to patch into the existing Erlang/OTP installation.
+
+Using otp\_patch\_apply
+-----------------------
+
+> *WARNING*: Patching applications is a one-way process.
+> Create a backup of your OTP installation directory before
+> proceeding.
+
+First of all, build the OTP source tree at `$ERL_TOP` containing
+the updated applications.
+
+> *NOTE*: Before applying a patch you need to do a *full* build
+> of OTP in the source directory.
+
+If you are building in `git` you first need to generate the
+`configure` scripts:
+
+ $ ./otp_build autoconf
+
+Configure and build all applications in OTP:
+
+ $ configure
+ $ make
+
+or
+
+ $ ./otp_build configure
+ $ ./otp_build boot -a
+
+If you have installed documentation in the OTP installation, also
+build the documentation:
+
+ $ make docs
+
+After the successful build it's time to patch. The source tree directory,
+the directory of the installation and the applications to patch are given
+as arguments to `otp_patch_apply`. The dependencies of each application
+are validated against the applications in the installation and the other
+applications given as arguments. If a dependency error is detected, the
+script will be aborted.
+
+The `otp_patch_apply` syntax:
+
+ $ otp_patch_apply -s <Dir> -i <Dir> [-l <Dir>] [-c] [-f] [-h] \
+ [-n] [-v] <App1> [... <AppN>]
+
+ -s <Dir> -- OTP source directory that contains build results.
+ -i <Dir> -- OTP installation directory to patch.
+ -l <Dir> -- Alternative OTP source library directory path(s)
+ containing build results of OTP applications.
+ Multiple paths should be colon separated.
+ -c -- Cleanup (remove) old versions of applications
+ patched in the installation.
+ -f -- Force patch of application(s) even though
+ dependencies are not fulfilled (should only be
+ considered in a test environment).
+ -h -- Print help then exit.
+ -n -- Do not install documentation.
+ -v -- Print version then exit.
+ <AppX> -- Application to patch.
+
+ Environment Variable:
+ ERL_LIBS -- Alternative OTP source library directory path(s)
+ containing build results of OTP applications.
+ Multiple paths should be colon separated.
+
+> *NOTE*: The complete build environment is required while running
+> `otp_patch_apply`.
+
+> *NOTE*: All source directories identified by `-s` and `-l` should
+> contain build results of OTP applications.
+
+For example, if the user wants to install patched versions of `mnesia`
+and `ssl` built in `/home/me/git/otp` into the OTP installation
+located in `/opt/erlang/my_otp` type
+
+ $ otp_patch_apply -s /home/me/git/otp -i /opt/erlang/my_otp \
+ mnesia ssl
+
+> *NOTE*: If the list of applications contains core applications,
+> i.e `erts`, `kernel`, `stdlib` or `sasl`, the `Install` script in
+> the patched Erlang/OTP installation must be rerun.
+
+The patched applications are appended to the list of installed
+applications. Take a look at
+`<InstallDir>/releases/OTP-REL/installed_application_versions`.
+
+Sanity check
+------------
+
+The application dependencies can be checked using the Erlang shell.
+Application dependencies are verified among installed applications by
+`otp_patch_apply`, but these are not necessarily those actually loaded.
+By calling `system_information:sanity_check()` one can validate
+dependencies among applications actually loaded.
+
+ 1> system_information:sanity_check().
+ ok
+
+Please take a look at the reference of [sanity_check()][] for more
+information.
+
+[application resource file]: kernel:app
+[runtime_dependencies]: kernel:app#runtime_dependencies
+[building and installing Erlang/OTP]: INSTALL.md
+[version handling]: ../system_principles/versions
+[sanity_check()]: runtime_tools:system_information#sanity_check-0
diff --git a/Makefile.in b/Makefile.in
index d1fd64632c..5c96c789dc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -172,6 +172,7 @@ endif
TARGET := @TARGET@
include $(ERL_TOP)/make/target.mk
export TARGET
+include $(ERL_TOP)/make/otp_default_release_path.mk
BOOTSTRAP_ONLY = @BOOTSTRAP_ONLY@
@@ -395,29 +396,39 @@ endif
cd $(ERL_TOP)/erts && \
ERL_TOP=$(ERL_TOP) PATH=$(INST_PATH_PREFIX)"$${PATH}" \
$(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" release
+ifeq ($(RELEASE_ROOT),)
+ $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)/releases/@OTP_REL@"
+else
+ $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(RELEASE_ROOT)/releases/@OTP_REL@"
+endif
# ---------------------------------------------------------------
# Target only used when building commercial ERTS patches
# ---------------------------------------------------------------
-release_docs docs: mod2app
+
+release_docs docs: doc_bootstrap_build doc_bootstrap_copy mod2app
ifeq ($(OTP_SMALL_BUILD),true)
cd $(ERL_TOP)/lib && \
- PATH=$(ERL_TOP)/bin:"$${PATH}" ERL_TOP=$(ERL_TOP) \
- $(MAKE) TESTROOT="$(RELEASE_ROOT)" $@
+ PATH=$(BOOT_PREFIX)"$${PATH}" ERL_TOP=$(ERL_TOP) \
+ $(MAKE) TESTROOT="$(RELEASE_ROOT)" DOCGEN=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen $@
else
cd $(ERL_TOP)/lib && \
- PATH=$(ERL_TOP)/bin:"$${PATH}" ERL_TOP=$(ERL_TOP) \
- $(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" $@
+ PATH=$(BOOT_PREFIX)"$${PATH}" ERL_TOP=$(ERL_TOP) \
+ $(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" DOCGEN=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen $@
endif
cd $(ERL_TOP)/erts && \
- PATH=$(ERL_TOP)/bin:"$${PATH}" ERL_TOP=$(ERL_TOP) \
- $(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" $@
+ PATH=$(BOOT_PREFIX)"$${PATH}" ERL_TOP=$(ERL_TOP) \
+ $(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" DOCGEN=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen $@
cd $(ERL_TOP)/system/doc && \
- PATH=$(ERL_TOP)/bin:"$${PATH}" \
- ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT="$(RELEASE_ROOT)" $@
+ PATH=$(BOOT_PREFIX)"$${PATH}" \
+ ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT="$(RELEASE_ROOT)" DOCGEN=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen $@
+ifneq ($(OTP_SMALL_BUILD),true)
+ echo "OTP doc built" > $(ERL_TOP)/make/otp_doc_built
+endif
+
mod2app:
- PATH=$(ERL_TOP)/bin:"$${PATH}" escript $(ERL_TOP)/lib/erl_docgen/priv/bin/xref_mod_app.escript -topdir $(ERL_TOP) -outfile $(ERL_TOP)/make/$(TARGET)/mod2app.xml
+ PATH=$(BOOT_PREFIX)"$${PATH}" escript $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/priv/bin/xref_mod_app.escript -topdir $(ERL_TOP) -outfile $(ERL_TOP)/make/$(TARGET)/mod2app.xml
# ----------------------------------------------------------------------
ERLANG_EARS=$(BOOTSTRAP_ROOT)/bootstrap/erts
@@ -440,6 +451,7 @@ else
$(make_verbose)cd lib && \
ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \
$(MAKE) opt BUILD_ALL=true
+ $(V_at)echo "OTP built" > $(ERL_TOP)/make/otp_built
endif
kernel:
$(make_verbose)cd lib/kernel && \
@@ -762,6 +774,80 @@ tertiary_bootstrap_copy:
done
# $(V_at)cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin
+doc_bootstrap_build:
+ $(make_verbose)cd lib && \
+ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \
+ $(MAKE) opt DOC_BOOTSTRAP=true
+
+doc_bootstrap_copy:
+ $(make_verbose)
+# XMERL
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/xmerl ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/xmerl ; fi
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/xmerl/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/xmerl/ebin ; fi
+ $(V_at)for x in lib/xmerl/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/xmerl/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# xmerl/include already copied in secondary bootstrap
+# EDOC
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc ; fi
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/ebin ; fi
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/include ; fi
+ $(V_at)for x in lib/edoc/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ $(V_at)for x in lib/edoc/include/*.hrl; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/edoc/include/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+# ERL_DOCGEN
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen ; fi
+ $(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/ebin ; fi
+ $(V_at)for x in lib/erl_docgen/ebin/*.beam; do \
+ BN=`basename $$x`; \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/ebin/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ done
+ $(V_at)for d in priv priv/bin priv/css priv/dtd priv/dtd_html_entities priv/dtd_man_entities priv/images priv/js priv/js/flipmenu priv/xsl; do \
+ if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/$$d ; then mkdir -p $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/$$d ; fi; \
+ for x in lib/erl_docgen/$$d/*; do \
+ BN=`basename $$x`; \
+ if test ! -d lib/erl_docgen/$$d/$$BN ; then \
+ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/$$d/$$BN; \
+ test -f $$TF && \
+ test '!' -z "`find $$x -newer $$TF -print`" && \
+ cp $$x $$TF; \
+ test '!' -f $$TF && \
+ cp $$x $$TF; \
+ true; \
+ fi; \
+ done; \
+ done
+
.PHONY: check_recreate_primary_bootstrap recreate_primary_bootstrap
@@ -906,6 +992,11 @@ TEST_DIRS := \
erts/epmd/test \
erts/emulator/test
+# Any applications listed in SKIP-APPLICATIONS should be skipped
+SKIP_FILE := $(wildcard lib/SKIP-APPLICATIONS)
+SKIP_TEST_DIRS := $(if $(SKIP_FILE),$(foreach APP,$(shell cat $(SKIP_FILE)),lib/$(APP)/test))
+TEST_DIRS := $(filter-out $(SKIP_TEST_DIRS),$(TEST_DIRS))
+
.PHONY: tests release_tests $(TEST_DIRS)
tests release_tests: $(TEST_DIRS)
@@ -921,7 +1012,7 @@ $(TEST_DIRS):
#
# Order is important here, don't change it!
#
-INST_DEP += install.dirs install.emulator install.libs install.Install install.bin
+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
install: $(INST_DEP)
@@ -950,6 +1041,13 @@ install.Install:
(cd "$(ERLANG_LIBDIR)" \
&& ./Install $(INSTALL_CROSS) -minimal "$(ERLANG_INST_LIBDIR)")
+install.otp_version:
+ifeq ($(ERLANG_LIBDIR),)
+ $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)/releases/@OTP_REL@"
+else
+ $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(ERLANG_LIBDIR)/releases/@OTP_REL@"
+endif
+
#
# Install erlang base public files
#
@@ -992,10 +1090,13 @@ $(IBIN_DIR):
clean: check_recreate_primary_bootstrap
rm -f *~ *.bak config.log config.status prebuilt.files ibin/*
- find . -type f -name SKIP -print | xargs $(RM)
cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
cd lib && ERL_TOP=$(ERL_TOP) $(MAKE) clean BUILD_ALL=true
+distclean: clean
+ find . -type f -name SKIP -print | xargs $(RM)
+ find . -type f -name SKIP-APPLICATIONS -print | xargs $(RM)
+
#
# Just wipe out emulator, not libraries
#
diff --git a/OTP_VERSION b/OTP_VERSION
new file mode 100644
index 0000000000..3309c98bff
--- /dev/null
+++ b/OTP_VERSION
@@ -0,0 +1 @@
+17.5.6
diff --git a/README.md b/README.md
index a6a4f11be8..bf80b6391b 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,15 @@ middle-ware to develop these systems. It includes its own distributed
database, applications to interface towards other languages, debugging
and release handling tools.
+ERTS and BEAM
+-------------
+**BEAM** is the name of the virtual machine where all Erlang code is executed.
+Every compiled Erlang file has the suffix .beam. The virtual machine
+is sometimes referred to as the emulator.
+
+**ERTS** is the Erlang Runtime System where the BEAM, kernel and
+standard libraries amongst others are included.
+
More information can be found at [erlang.org] [1].
Building and Installing
@@ -57,7 +66,7 @@ Copyright and License
> %CopyrightBegin%
>
-> Copyright Ericsson AB 2010-2012. All Rights Reserved.
+> Copyright Ericsson AB 2010-2014. All Rights Reserved.
>
> The contents of this file are subject to the Erlang Public License,
> Version 1.1, (the "License"); you may not use this file except in
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index 46b30a16b3..0000000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,1914 +0,0 @@
-dnl
-dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 1998-2013. All Rights Reserved.
-dnl
-dnl The contents of this file are subject to the Erlang Public License,
-dnl Version 1.1, (the "License"); you may not use this file except in
-dnl compliance with the License. You should have received a copy of the
-dnl Erlang Public License along with this software. If not, it can be
-dnl retrieved online at http://www.erlang.org/.
-dnl
-dnl Software distributed under the License is distributed on an "AS IS"
-dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-dnl the License for the specific language governing rights and limitations
-dnl under the License.
-dnl
-dnl %CopyrightEnd%
-dnl
-
-dnl
-dnl aclocal.m4
-dnl
-dnl Local macros used in configure.in. The Local Macros which
-dnl could/should be part of autoconf are prefixed LM_, macros specific
-dnl to the Erlang system are prefixed ERL_.
-dnl
-
-AC_DEFUN(LM_PRECIOUS_VARS,
-[
-
-dnl ERL_TOP
-AC_ARG_VAR(ERL_TOP, [Erlang/OTP top source directory])
-
-dnl Tools
-AC_ARG_VAR(CC, [C compiler])
-AC_ARG_VAR(CFLAGS, [C compiler flags])
-AC_ARG_VAR(STATIC_CFLAGS, [C compiler static flags])
-AC_ARG_VAR(CFLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag passed via C compiler])
-AC_ARG_VAR(CPP, [C/C++ preprocessor])
-AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
-AC_ARG_VAR(CXX, [C++ compiler])
-AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
-AC_ARG_VAR(LD, [linker (is often overridden by configure)])
-AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
-AC_ARG_VAR(LIBS, [libraries])
-AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LD_FLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(LFS_CFLAGS, [large file support C compiler flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LDFLAGS, [large file support linker flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LIBS, [large file support libraries (set all LFS_* variables or none)])
-AC_ARG_VAR(RANLIB, [ranlib])
-AC_ARG_VAR(AR, [ar])
-AC_ARG_VAR(GETCONF, [getconf])
-
-dnl Cross system root
-AC_ARG_VAR(erl_xcomp_sysroot, [Absolute cross system root path (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_isysroot, [Absolute cross system root include path (only used when cross compiling)])
-
-dnl Cross compilation variables
-AC_ARG_VAR(erl_xcomp_bigendian, [big endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_double_middle_endian, [double-middle-endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_clock_gettime_correction, [clock_gettime() can be used for time correction: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_nptl, [have Native POSIX Thread Library: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigusrx, [SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigaltstack, [have working sigaltstack(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_poll, [have working poll(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_kqueue, [have working kqueue(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_putenv_copy, [putenv() stores key-value copy: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_reliable_fpe, [have reliable floating point exceptions: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_getaddrinfo, [have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_gethrvtime_procfs_ioctl, [have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-
-])
-
-AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
-[
-erl_xcomp_without_sysroot=no
-if test "$cross_compiling" = "yes"; then
- test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
- test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
-else
- erl_xcomp_sysroot=
- erl_xcomp_isysroot=
-fi
-])
-
-AC_DEFUN(LM_CHECK_GETCONF,
-[
-if test "$cross_compiling" != "yes"; then
- AC_CHECK_PROG([GETCONF], [getconf], [getconf], [false])
-else
- dnl First check if we got a `<HOST>-getconf' in $PATH
- host_getconf="$host_alias-getconf"
- AC_CHECK_PROG([GETCONF], [$host_getconf], [$host_getconf], [false])
- if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
- dnl We should perhaps give up if we have'nt found it by now, but at
- dnl least in one Tilera MDE `getconf' under sysroot is a bourne
- dnl shell script which we can use. We try to find `<HOST>-getconf'
- dnl or `getconf' under sysconf, but only under sysconf since
- dnl `getconf' in $PATH is almost guaranteed to be for the build
- dnl machine.
- GETCONF=
- prfx="$erl_xcomp_sysroot"
- AC_PATH_TOOL([GETCONF], [getconf], [false],
- ["$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"])
- fi
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_WINDOWS_ENVIRONMENT
-dnl
-dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
-dnl
-
-AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
-[
-MIXED_CYGWIN=no
-MIXED_MSYS=no
-
-AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
-if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- elif test -x /usr/bin/msysinfo; then
- CFLAGS="-O2"
- MIXED_MSYS=yes
- AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
-else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
-fi
-
-AC_SUBST(MIXED_VC)
-
-if test "x$MIXED_MSYS" != "xyes"; then
- AC_MSG_CHECKING(for mixed cygwin and native MinGW environment)
- if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
- else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
- fi
-else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
-
-AC_MSG_CHECKING(if we mix cygwin with any native compiler)
-if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_CYGWIN)
-
-AC_MSG_CHECKING(if we mix msys with another native compiler)
-if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_MSYS)
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_FIND_EMU_CC
-dnl
-dnl
-dnl Tries fairly hard to find a C compiler that can handle jump tables.
-dnl Defines the @EMU_CC@ variable for the makefiles and
-dnl inserts NO_JUMP_TABLE in the header if one cannot be found...
-dnl
-
-AC_DEFUN(LM_FIND_EMU_CC,
- [AC_CACHE_CHECK(for a compiler that handles jumptables,
- ac_cv_prog_emu_cc,
- [
-AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
-lbl1:
- return 1;
-lbl2:
- return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
-
-if test $ac_cv_prog_emu_cc = no; then
- for ac_progname in emu_cc.sh gcc-4.2 gcc; do
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
- break
- fi
- done
-fi
-
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
- CFLAGS=""
- CPPFLAGS=""
- AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
- lbl1:
- return 1;
- lbl2:
- return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
- CC=$save_CC
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-])
-if test $ac_cv_prog_emu_cc = no; then
- AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
-else
- EMU_CC=$ac_cv_prog_emu_cc
-fi
-AC_SUBST(EMU_CC)
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_INSTALL_DIR
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl Figure out how to create directories with parents.
-dnl (In my opinion INSTALL_DIR is a bad name, MKSUBDIRS or something is better)
-dnl
-dnl We prefer 'install -d', but use 'mkdir -p' if it exists.
-dnl If none of these methods works, we give up.
-dnl
-
-
-AC_DEFUN(LM_PROG_INSTALL_DIR,
-[AC_CACHE_CHECK(how to create a directory including parents,
-ac_cv_prog_mkdir_p,
-[
-temp_name_base=config.$$
-temp_name=$temp_name_base/x/y/z
-$INSTALL -d $temp_name >/dev/null 2>&1
-ac_cv_prog_mkdir_p=none
-if test -d $temp_name; then
- ac_cv_prog_mkdir_p="$INSTALL -d"
-else
- mkdir -p $temp_name >/dev/null 2>&1
- if test -d $temp_name; then
- ac_cv_prog_mkdir_p="mkdir -p"
- fi
-fi
-rm -fr $temp_name_base
-])
-
-case "${ac_cv_prog_mkdir_p}" in
- none) AC_MSG_ERROR(don't know how create directories with parents) ;;
- *) INSTALL_DIR="$ac_cv_prog_mkdir_p" AC_SUBST(INSTALL_DIR) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_PERL5
-dnl
-dnl Try to find perl version 5. If found set PERL to the absolute path
-dnl of the program, if not found set PERL to false.
-dnl
-dnl On some systems /usr/bin/perl is perl 4 and e.g.
-dnl /usr/local/bin/perl is perl 5. We try to handle this case by
-dnl putting a couple of
-dnl Tries to handle the case that there are two programs called perl
-dnl in the path and one of them is perl 5 and the other isn't.
-dnl
-AC_DEFUN(LM_PROG_PERL5,
-[AC_PATH_PROGS(PERL, perl5 perl, false,
- /usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH})
-changequote(, )dnl
-dnl[ That bracket is needed to balance the right bracket below
-if test "$PERL" = "false" || $PERL -e 'exit ($] >= 5)'; then
-changequote([, ])dnl
- ac_cv_path_PERL=false
- PERL=false
-dnl AC_MSG_WARN(perl version 5 not found)
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SO_BSDCOMPAT
-dnl
-dnl Check if the system has the SO_BSDCOMPAT flag on sockets (linux)
-dnl
-AC_DEFUN(LM_DECL_SO_BSDCOMPAT,
-[AC_CACHE_CHECK([for SO_BSDCOMPAT declaration], ac_cv_decl_so_bsdcompat,
-AC_TRY_COMPILE([#include <sys/socket.h>], [int i = SO_BSDCOMPAT;],
- ac_cv_decl_so_bsdcompat=yes,
- ac_cv_decl_so_bsdcompat=no))
-
-case "${ac_cv_decl_so_bsdcompat}" in
- "yes" ) AC_DEFINE(HAVE_SO_BSDCOMPAT,[],
- [Define if you have SO_BSDCOMPAT flag on sockets]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_INADDR_LOOPBACK
-dnl
-dnl Try to find declaration of INADDR_LOOPBACK, if nowhere provide a default
-dnl
-
-AC_DEFUN(LM_DECL_INADDR_LOOPBACK,
-[AC_CACHE_CHECK([for INADDR_LOOPBACK in netinet/in.h],
- ac_cv_decl_inaddr_loopback,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>], [int i = INADDR_LOOPBACK;],
-ac_cv_decl_inaddr_loopback=yes, ac_cv_decl_inaddr_loopback=no)
-])
-
-if test ${ac_cv_decl_inaddr_loopback} = no; then
- AC_CACHE_CHECK([for INADDR_LOOPBACK in rpc/types.h],
- ac_cv_decl_inaddr_loopback_rpc,
- AC_TRY_COMPILE([#include <rpc/types.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_rpc=yes,
- ac_cv_decl_inaddr_loopback_rpc=no))
-
- case "${ac_cv_decl_inaddr_loopback_rpc}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H,[],
- [Define if you need to include rpc/types.h to get INADDR_LOOPBACK defined]) ;;
- * )
- AC_CACHE_CHECK([for INADDR_LOOPBACK in winsock2.h],
- ac_cv_decl_inaddr_loopback_winsock2,
- AC_TRY_COMPILE([#define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_winsock2=yes,
- ac_cv_decl_inaddr_loopback_winsock2=no))
- case "${ac_cv_decl_inaddr_loopback_winsock2}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_WINSOCK2_H,[],
- [Define if you need to include winsock2.h to get INADDR_LOOPBACK defined]) ;;
- * )
- # couldn't find it anywhere
- AC_DEFINE(HAVE_NO_INADDR_LOOPBACK,[],
- [Define if you don't have a definition of INADDR_LOOPBACK]) ;;
- esac;;
- esac
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_SOCKADDR_SA_LEN
-dnl
-dnl Check if the sockaddr structure has the field sa_len
-dnl
-
-AC_DEFUN(LM_STRUCT_SOCKADDR_SA_LEN,
-[AC_CACHE_CHECK([whether struct sockaddr has sa_len field],
- ac_cv_struct_sockaddr_sa_len,
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>], [struct sockaddr s; s.sa_len = 10;],
- ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no))
-
-dnl FIXME convbreak
-case ${ac_cv_struct_sockaddr_sa_len} in
- "no" ) AC_DEFINE(NO_SA_LEN,[1],[Define if you dont have salen]) ;;
- *) ;;
-esac
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_EXCEPTION
-dnl
-dnl Check to see whether the system supports the matherr function
-dnl and its associated type "struct exception".
-dnl
-
-AC_DEFUN(LM_STRUCT_EXCEPTION,
-[AC_CACHE_CHECK([for struct exception (and matherr function)],
- ac_cv_struct_exception,
-AC_TRY_COMPILE([#include <math.h>],
- [struct exception x; x.type = DOMAIN; x.type = SING;],
- ac_cv_struct_exception=yes, ac_cv_struct_exception=no))
-
-case "${ac_cv_struct_exception}" in
- "yes" ) AC_DEFINE(USE_MATHERR,[1],[Define if you have matherr() function and struct exception type]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_IPV6
-dnl
-dnl Check for ipv6 support and what the in6_addr structure is called.
-dnl (early linux used in_addr6 insted of in6_addr)
-dnl
-
-AC_DEFUN(LM_SYS_IPV6,
-[AC_MSG_CHECKING(for IP version 6 support)
-AC_CACHE_VAL(ac_cv_sys_ipv6_support,
-[ok_so_far=yes
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in6_addr a6; struct sockaddr_in6 s6;], ok_so_far=yes, ok_so_far=no)
-
-if test $ok_so_far = yes; then
- ac_cv_sys_ipv6_support=yes
-else
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in_addr6 a6; struct sockaddr_in6 s6;],
- ac_cv_sys_ipv6_support=in_addr6, ac_cv_sys_ipv6_support=no)
-fi
-])dnl
-
-dnl
-dnl Have to use old style AC_DEFINE due to BC with old autoconf.
-dnl
-
-case ${ac_cv_sys_ipv6_support} in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- ;;
- in_addr6)
- AC_MSG_RESULT([yes (but I am redefining in_addr6 to in6_addr)])
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- AC_DEFINE(HAVE_IN_ADDR6_STRUCT,[],[Early linux used in_addr6 instead of in6_addr, define if you have this])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_MULTICAST
-dnl
-dnl Check for multicast support. Only checks for multicast options in
-dnl setsockopt(), no check is performed that multicasting actually works.
-dnl If options are found defines HAVE_MULTICAST_SUPPORT
-dnl
-
-AC_DEFUN(LM_SYS_MULTICAST,
-[AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support,
-[AC_EGREP_CPP(yes,
-[#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP)
-yes
-#endif
-], ac_cv_sys_multicast_support=yes, ac_cv_sys_multicast_support=no)])
-if test $ac_cv_sys_multicast_support = yes; then
- AC_DEFINE(HAVE_MULTICAST_SUPPORT,[1],
- [Define if setsockopt() accepts multicast options])
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SYS_ERRLIST
-dnl
-dnl Define SYS_ERRLIST_DECLARED if the variable sys_errlist is declared
-dnl in a system header file, stdio.h or errno.h.
-dnl
-
-AC_DEFUN(LM_DECL_SYS_ERRLIST,
-[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h or errno.h],
- ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#include <errno.h>], [char *msg = *(sys_errlist + 1);],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-if test $ac_cv_decl_sys_errlist = yes; then
- AC_DEFINE(SYS_ERRLIST_DECLARED,[],
- [define if the variable sys_errlist is declared in a system header file])
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_FUNC_DECL( funname, declaration [, extra includes
-dnl [, action-if-found [, action-if-not-found]]] )
-dnl
-dnl Checks if the declaration "declaration" of "funname" conflicts
-dnl with the header files idea of how the function should be
-dnl declared. It is useful on systems which lack prototypes and you
-dnl need to provide your own (e.g. when you want to take the address
-dnl of a function). The 4'th argument is expanded if conflicting,
-dnl the 5'th argument otherwise
-dnl
-dnl
-
-AC_DEFUN(LM_CHECK_FUNC_DECL,
-[AC_MSG_CHECKING([for conflicting declaration of $1])
-AC_CACHE_VAL(ac_cv_func_decl_$1,
-[AC_TRY_COMPILE([#include <stdio.h>
-$3],[$2
-char *c = (char *)$1;
-], eval "ac_cv_func_decl_$1=no", eval "ac_cv_func_decl_$1=yes")])
-if eval "test \"`echo '$ac_cv_func_decl_'$1`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$4], , :, [$4])
-else
- AC_MSG_RESULT(no)
-ifelse([$5], , , [$5
-])dnl
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl AC_DOUBLE_MIDDLE_ENDIAN
-dnl
-dnl Checks whether doubles are represented in "middle-endian" format.
-dnl Sets ac_cv_double_middle_endian={no,yes,unknown} accordingly,
-dnl as well as DOUBLE_MIDDLE_ENDIAN.
-dnl
-dnl
-
-AC_DEFUN([AC_C_DOUBLE_MIDDLE_ENDIAN],
-[AC_CACHE_CHECK(whether double word ordering is middle-endian, ac_cv_c_double_middle_endian,
-[# It does not; compile a test program.
-AC_RUN_IFELSE(
-[AC_LANG_SOURCE([[#include <stdlib.h>
-
-int
-main(void)
-{
- int i = 0;
- int zero = 0;
- int bigendian;
- int zero_index = 0;
-
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
-
- /* we'll use the one with 32-bit words */
- union
- {
- double d;
- unsigned int c[2];
- } vint;
-
- union
- {
- double d;
- unsigned long c[2];
- } vlong;
-
- union
- {
- double d;
- unsigned short c[2];
- } vshort;
-
-
- /* Are we little or big endian? From Harbison&Steele. */
- u.l = 1;
- bigendian = (u.c[sizeof (long int) - 1] == 1);
-
- zero_index = bigendian ? 1 : 0;
-
- vint.d = 1.0;
- vlong.d = 1.0;
- vshort.d = 1.0;
-
- if (sizeof(unsigned int) == 4)
- {
- if (vint.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned long) == 4)
- {
- if (vlong.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned short) == 4)
- {
- if (vshort.c[zero_index] != 0)
- zero = 1;
- }
-
- exit (zero);
-}
-]])],
- [ac_cv_c_double_middle_endian=no],
- [ac_cv_c_double_middle_endian=yes],
- [ac_cv_c_double_middle=unknown])])
-case $ac_cv_c_double_middle_endian in
- yes)
- m4_default([$1],
- [AC_DEFINE([DOUBLE_MIDDLE_ENDIAN], 1,
- [Define to 1 if your processor stores the words in a double in
- middle-endian format (like some ARMs).])]) ;;
- no)
- $2 ;;
- *)
- m4_default([$3],
- [AC_MSG_WARN([unknown double endianness
-presetting ac_cv_c_double_middle_endian=no (or yes) will help])]) ;;
-esac
-])# AC_C_DOUBLE_MIDDLE_ENDIAN
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_THR_LIB
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl LM_CHECK_THR_LIB sets THR_LIBS, THR_DEFS, and THR_LIB_NAME. It also
-dnl checks for some pthread headers which will appear in DEFS or config.h.
-dnl
-
-AC_DEFUN(LM_CHECK_THR_LIB,
-[
-
-NEED_NPTL_PTHREAD_H=no
-
-dnl win32?
-AC_MSG_CHECKING([for native win32 threads])
-if test "X$host_os" = "Xwin32"; then
- AC_MSG_RESULT(yes)
- THR_DEFS="-DWIN32_THREADS"
- THR_LIBS=
- THR_LIB_NAME=win32_threads
- THR_LIB_TYPE=win32_threads
-else
- AC_MSG_RESULT(no)
- THR_DEFS=
- THR_LIBS=
- THR_LIB_NAME=
- THR_LIB_TYPE=posix_unknown
-
-dnl Try to find POSIX threads
-
-dnl The usual pthread lib...
- AC_CHECK_LIB(pthread, pthread_create, THR_LIBS="-lpthread")
-
-dnl Very old versions of FreeBSD have pthreads in special c library, c_r...
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_LIB(c_r, pthread_create, THR_LIBS="-lc_r")
- fi
-
-dnl QNX has pthreads in standard C library
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_FUNC(pthread_create, THR_LIBS="none_needed")
- fi
-
-dnl On ofs1 the '-pthread' switch should be used
- if test "x$THR_LIBS" = "x"; then
- AC_MSG_CHECKING([if the '-pthread' switch can be used])
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -pthread"
- AC_TRY_LINK([#include <pthread.h>],
- pthread_create((void*)0,(void*)0,(void*)0,(void*)0);,
- [THR_DEFS="-pthread"
- THR_LIBS="-pthread"])
- CFLAGS=$saved_cflags
- if test "x$THR_LIBS" != "x"; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
- if test "x$THR_LIBS" != "x"; then
- THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
- THR_LIB_NAME=pthread
- if test "x$THR_LIBS" = "xnone_needed"; then
- THR_LIBS=
- fi
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
- linux*)
- THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
-
- LM_CHECK_GETCONF
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
- if test $? -eq 0; then
- case "$libpthr_vsn" in
- *nptl*|*NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- elif test "$cross_compiling" = "yes"; then
- case "$erl_xcomp_linux_nptl" in
- "") nptl=cross;;
- yes|no) nptl=$erl_xcomp_linux_nptl;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl]);;
- esac
- else
- nptl=no
- fi
- AC_MSG_RESULT($nptl)
- if test $nptl = cross; then
- nptl=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $nptl = yes; then
- THR_LIB_TYPE=posix_nptl
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h,
- [need_nptl_incldir=yes
- NEED_NPTL_PTHREAD_H=yes])
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH"
- if test X$cross_compiling != Xyes; then
- nptl_path="$nptl_path:/usr/local/include:/usr/include"
- else
- IROOT="$erl_xcomp_isysroot"
- test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
- test "$IROOT" != "" || AC_MSG_ERROR([Don't know where to search for includes! Please set erl_xcomp_isysroot])
- nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
- fi
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need THR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $THR_DEFS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h,
- AC_DEFINE(HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- fi
-fi
-
-])
-
-AC_DEFUN(ERL_INTERNAL_LIBS,
-[
-
-ERTS_INTERNAL_X_LIBS=
-
-AC_CHECK_LIB(kstat, kstat_open,
-[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat])
-ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"])
-
-AC_SUBST(ERTS_INTERNAL_X_LIBS)
-
-])
-
-AC_DEFUN(ETHR_CHK_SYNC_OP,
-[
- AC_MSG_CHECKING([for $3-bit $1()])
- case "$2" in
- "1") sync_call="$1(&var);";;
- "2") sync_call="$1(&var, ($4) 0);";;
- "3") sync_call="$1(&var, ($4) 0, ($4) 0);";;
- esac
- have_sync_op=no
- AC_TRY_LINK([],
- [
- $4 res;
- volatile $4 var;
- res = $sync_call
- ],
- [have_sync_op=yes])
- test $have_sync_op = yes && $5
- AC_MSG_RESULT([$have_sync_op])
-])
-
-AC_DEFUN(ETHR_CHK_INTERLOCKED,
-[
- ilckd="$1"
- AC_MSG_CHECKING([for ${ilckd}()])
- case "$2" in
- "1") ilckd_call="${ilckd}(var);";;
- "2") ilckd_call="${ilckd}(var, ($3) 0);";;
- "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";;
- "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";;
- esac
- have_interlocked_op=no
- AC_TRY_LINK(
- [
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <intrin.h>
- ],
- [
- volatile $3 *var;
- volatile $3 arr[2];
-
- $ilckd_call
- return 0;
- ],
- [have_interlocked_op=yes])
- test $have_interlocked_op = yes && $4
- AC_MSG_RESULT([$have_interlocked_op])
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_FIND_ETHR_LIB
-dnl
-dnl NOTE! This macro may be changed at any time! Should *only* be used by
-dnl ERTS!
-dnl
-dnl Find a thread library to use. Sets ETHR_LIBS to libraries to link
-dnl with, ETHR_X_LIBS to extra libraries to link with (same as ETHR_LIBS
-dnl except that the ethread lib itself is not included), ETHR_DEFS to
-dnl defines to compile with, ETHR_THR_LIB_BASE to the name of the
-dnl thread library which the ethread library is based on, and ETHR_LIB_NAME
-dnl to the name of the library where the ethread implementation is located.
-dnl ERL_FIND_ETHR_LIB currently searches for 'pthreads', and
-dnl 'win32_threads'. If no thread library was found ETHR_LIBS, ETHR_X_LIBS,
-dnl ETHR_DEFS, ETHR_THR_LIB_BASE, and ETHR_LIB_NAME are all set to the
-dnl empty string.
-dnl
-
-AC_DEFUN(ERL_FIND_ETHR_LIB,
-[
-
-AC_ARG_ENABLE(native-ethr-impls,
- AS_HELP_STRING([--disable-native-ethr-impls],
- [disable native ethread implementations]),
-[ case "$enableval" in
- no) disable_native_ethr_impls=yes ;;
- *) disable_native_ethr_impls=no ;;
- esac ], disable_native_ethr_impls=no)
-
-test "X$disable_native_ethr_impls" = "Xyes" &&
- AC_DEFINE(ETHR_DISABLE_NATIVE_IMPLS, 1, [Define if you want to disable native ethread implementations])
-
-AC_ARG_ENABLE(x86-out-of-order,
- AS_HELP_STRING([--enable-x86-out-of-order],
- [enable x86/x84_64 out of order support (default disabled)]))
-
-AC_ARG_ENABLE(prefer-gcc-native-ethr-impls,
- AS_HELP_STRING([--enable-prefer-gcc-native-ethr-impls],
- [prefer gcc native ethread implementations]),
-[ case "$enableval" in
- yes) enable_prefer_gcc_native_ethr_impls=yes ;;
- *) enable_prefer_gcc_native_ethr_impls=no ;;
- esac ], enable_prefer_gcc_native_ethr_impls=no)
-
-test $enable_prefer_gcc_native_ethr_impls = yes &&
- AC_DEFINE(ETHR_PREFER_GCC_NATIVE_IMPLS, 1, [Define if you prefer gcc native ethread implementations])
-
-AC_ARG_WITH(libatomic_ops,
- AS_HELP_STRING([--with-libatomic_ops=PATH],
- [specify and prefer usage of libatomic_ops in the ethread library]))
-
-AC_ARG_WITH(with_sparc_memory_order,
- AS_HELP_STRING([--with-sparc-memory-order=TSO|PSO|RMO],
- [specify sparc memory order (defaults to RMO)]))
-
-LM_CHECK_THR_LIB
-ERL_INTERNAL_LIBS
-
-ethr_have_native_atomics=no
-ethr_have_native_spinlock=no
-ETHR_THR_LIB_BASE="$THR_LIB_NAME"
-ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
-ETHR_DEFS="$THR_DEFS"
-ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
-ETHR_LIBS=
-ETHR_LIB_NAME=
-
-ethr_modified_default_stack_size=
-
-dnl Name of lib where ethread implementation is located
-ethr_lib_name=ethread
-
-case "$THR_LIB_NAME" in
-
- win32_threads)
- ETHR_THR_LIB_BASE_DIR=win
- # * _WIN32_WINNT >= 0x0400 is needed for
- # TryEnterCriticalSection
- # * _WIN32_WINNT >= 0x0403 is needed for
- # InitializeCriticalSectionAndSpinCount
- # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
- #
- # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
- # and save it in ETHR_DEFS.
- found_win32_winnt=no
- for cppflag in $CPPFLAGS; do
- case $cppflag in
- -DWINVER*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- ;;
- -D_WIN32_WINNT*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- found_win32_winnt=yes
- ;;
- *)
- ;;
- esac
- done
- if test $found_win32_winnt = no; then
- AC_MSG_ERROR([-D_WIN32_WINNT missing in CPPFLAGS])
- fi
-
- AC_DEFINE(ETHR_WIN32_THREADS, 1, [Define if you have win32 threads])
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- have_interlocked_op=no
- ethr_have_native_atomics=no
- else
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT, 1, [Define if you have _InterlockedDecrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement_rel], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT_REL, 1, [Define if you have _InterlockedDecrement_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT, 1, [Define if you have _InterlockedIncrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement_acq], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ, 1, [Define if you have _InterlockedIncrement_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD, 1, [Define if you have _InterlockedExchangeAdd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd_acq], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ, 1, [Define if you have _InterlockedExchangeAdd_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64_acq], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ, 1, [Define if you have _InterlockedIncrement64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64, 1, [Define if you have _InterlockedExchangeAdd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64_acq], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ, 1, [Define if you have _InterlockedExchangeAdd64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()]))
- fi
- test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
- ;;
-
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
- case $host_os in
- openbsd*)
- # The default stack size is insufficient for our needs
- # on OpenBSD. We increase it to 256 kilo words.
- ethr_modified_default_stack_size=256;;
- linux*)
- ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
-
- if test X$cross_compiling = Xyes; then
- case X$erl_xcomp_linux_usable_sigusrx in
- X) usable_sigusrx=cross;;
- Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx]);;
- esac
- case X$erl_xcomp_linux_usable_sigaltstack in
- X) usable_sigaltstack=cross;;
- Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack]);;
- esac
- else
- # FIXME: Test for actual problems instead of kernel versions
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- usable_sigusrx=no
- usable_sigaltstack=no;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- usable_sigaltstack=no;;
- *)
- usable_sigusrx=yes
- usable_sigaltstack=yes;;
- esac
- fi
-
- AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
- AC_MSG_RESULT($usable_sigusrx)
- if test $usable_sigusrx = cross; then
- usable_sigusrx=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigusrx = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
- fi
-
- AC_MSG_CHECKING(if sigaltstack can be used)
- AC_MSG_RESULT($usable_sigaltstack)
- if test $usable_sigaltstack = cross; then
- usable_sigaltstack=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigaltstack = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need ETHR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
-
- dnl We need the thread library in order to find some functions
- saved_libs="$LIBS"
- LIBS="$LIBS $ETHR_X_LIBS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(ETHR_HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- if test $NEED_NPTL_PTHREAD_H = yes; then
- AC_DEFINE(ETHR_NEED_NPTL_PTHREAD_H, 1, \
-[Define if you need the <nptl/pthread.h> header file.])
- fi
-
- AC_CHECK_HEADER(sched.h, \
- AC_DEFINE(ETHR_HAVE_SCHED_H, 1, \
-[Define if you have the <sched.h> header file.]))
-
- AC_CHECK_HEADER(sys/time.h, \
- AC_DEFINE(ETHR_HAVE_SYS_TIME_H, 1, \
-[Define if you have the <sys/time.h> header file.]))
-
- AC_TRY_COMPILE([#include <time.h>
- #include <sys/time.h>],
- [struct timeval *tv; return 0;],
- AC_DEFINE(ETHR_TIME_WITH_SYS_TIME, 1, \
-[Define if you can safely include both <sys/time.h> and <time.h>.]))
-
-
- dnl
- dnl Check for functions
- dnl
-
- AC_CHECK_FUNC(pthread_spin_lock, \
- [ethr_have_native_spinlock=yes \
- AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
-[Define if you have the pthread_spin_lock function.])])
-
- have_sched_yield=no
- have_librt_sched_yield=no
- AC_CHECK_FUNC(sched_yield, [have_sched_yield=yes])
- if test $have_sched_yield = no; then
- AC_CHECK_LIB(rt, sched_yield,
- [have_librt_sched_yield=yes
- ETHR_X_LIBS="$ETHR_X_LIBS -lrt"])
- fi
- if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
- AC_DEFINE(ETHR_HAVE_SCHED_YIELD, 1, [Define if you have the sched_yield() function.])
- AC_MSG_CHECKING([whether sched_yield() returns an int])
- sched_yield_ret_int=no
- AC_TRY_COMPILE([
- #ifdef ETHR_HAVE_SCHED_H
- #include <sched.h>
- #endif
- ],
- [int sched_yield();],
- [sched_yield_ret_int=yes])
- AC_MSG_RESULT([$sched_yield_ret_int])
- if test $sched_yield_ret_int = yes; then
- AC_DEFINE(ETHR_SCHED_YIELD_RET_INT, 1, [Define if sched_yield() returns an int.])
- fi
- fi
-
- have_pthread_yield=no
- AC_CHECK_FUNC(pthread_yield, [have_pthread_yield=yes])
- if test $have_pthread_yield = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_YIELD, 1, [Define if you have the pthread_yield() function.])
- AC_MSG_CHECKING([whether pthread_yield() returns an int])
- pthread_yield_ret_int=no
- AC_TRY_COMPILE([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [int pthread_yield();],
- [pthread_yield_ret_int=yes])
- AC_MSG_RESULT([$pthread_yield_ret_int])
- if test $pthread_yield_ret_int = yes; then
- AC_DEFINE(ETHR_PTHREAD_YIELD_RET_INT, 1, [Define if pthread_yield() returns an int.])
- fi
- fi
-
- have_pthread_rwlock_init=no
- AC_CHECK_FUNC(pthread_rwlock_init, [have_pthread_rwlock_init=yes])
- if test $have_pthread_rwlock_init = yes; then
-
- ethr_have_pthread_rwlockattr_setkind_np=no
- AC_CHECK_FUNC(pthread_rwlockattr_setkind_np,
- [ethr_have_pthread_rwlockattr_setkind_np=yes])
-
- if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP, 1, \
-[Define if you have the pthread_rwlockattr_setkind_np() function.])
-
- AC_MSG_CHECKING([for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP])
- ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
- AC_TRY_LINK([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [
- pthread_rwlockattr_t *attr;
- return pthread_rwlockattr_setkind_np(attr,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- ],
- [ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes])
- AC_MSG_RESULT([$ethr_pthread_rwlock_writer_nonrecursive_initializer_np])
- if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 1, \
-[Define if you have the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP rwlock attribute.])
- fi
- fi
- fi
-
- if test "$force_pthread_rwlocks" = "yes"; then
-
- AC_DEFINE(ETHR_FORCE_PTHREAD_RWLOCK, 1, \
-[Define if you want to force usage of pthread rwlocks])
-
- if test $have_pthread_rwlock_init = yes; then
- AC_MSG_WARN([Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues.])
- else
- AC_MSG_ERROR([User forced usage of pthread rwlock, but no such implementation was found])
- fi
- fi
-
- AC_CHECK_FUNC(pthread_attr_setguardsize, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE, 1, \
-[Define if you have the pthread_attr_setguardsize function.]))
-
- linux_futex=no
- AC_MSG_CHECKING([for Linux futexes])
- AC_TRY_LINK([
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <linux/futex.h>
- #include <sys/time.h>
- ],
- [
- int i = 1;
- syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
- (void*)0,(void*)0, 0);
- syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
- (void*)0,(void*)0, 0);
- return 0;
- ],
- linux_futex=yes)
- AC_MSG_RESULT([$linux_futex])
- test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
-
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int128_t)
-
- if test "$ac_cv_sizeof_int" = "4"; then
- int32="int"
- elif test "$ac_cv_sizeof_long" = "4"; then
- int32="long"
- elif test "$ac_cv_sizeof_long_long" = "4"; then
- int32="long long"
- else
- AC_MSG_ERROR([No 32-bit type found])
- fi
-
- if test "$ac_cv_sizeof_int" = "8"; then
- int64="int"
- elif test "$ac_cv_sizeof_long" = "8"; then
- int64="long"
- elif test "$ac_cv_sizeof_long_long" = "8"; then
- int64="long long"
- else
- AC_MSG_ERROR([No 64-bit type found])
- fi
-
- int128=no
- if test "$ac_cv_sizeof___int128_t" = "16"; then
- int128="__int128_t"
- fi
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- ethr_have_native_atomics=no
- else
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP32, 1, [Define if you have __sync_val_compare_and_swap() for 32-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH32, 1, [Define if you have __sync_add_and_fetch() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND32, 1, [Define if you have __sync_fetch_and_and() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR32, 1, [Define if you have __sync_fetch_and_or() for 32-bit integers]))
-
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP64, 1, [Define if you have __sync_val_compare_and_swap() for 64-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH64, 1, [Define if you have __sync_add_and_fetch() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND64, 1, [Define if you have __sync_fetch_and_and() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR64, 1, [Define if you have __sync_fetch_and_or() for 64-bit integers]))
-
- if test $int128 != no; then
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [128], [$int128], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP128, 1, [Define if you have __sync_val_compare_and_swap() for 128-bit integers]))
- fi
-
- AC_MSG_CHECKING([for a usable libatomic_ops implementation])
- case "x$with_libatomic_ops" in
- xno | xyes | x)
- libatomic_ops_include=
- ;;
- *)
- if test -d "${with_libatomic_ops}/include"; then
- libatomic_ops_include="-I$with_libatomic_ops/include"
- CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
- else
- AC_MSG_ERROR([libatomic_ops include directory $with_libatomic_ops/include not found])
- fi;;
- esac
- ethr_have_libatomic_ops=no
- AC_TRY_LINK([#include "atomic_ops.h"],
- [
- volatile AO_t x;
- AO_t y;
- int z;
-
- AO_nop_full();
- AO_store(&x, (AO_t) 0);
- z = AO_load(&x);
- z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
- ],
- [ethr_have_native_atomics=yes
- ethr_have_libatomic_ops=yes])
- AC_MSG_RESULT([$ethr_have_libatomic_ops])
- if test $ethr_have_libatomic_ops = yes; then
- AC_CHECK_SIZEOF(AO_t, ,
- [
- #include <stdio.h>
- #include "atomic_ops.h"
- ])
- AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used])
-
- AC_DEFINE(ETHR_HAVE_LIBATOMIC_OPS, 1, [Define if you have libatomic_ops atomic operations])
- if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_DEFINE(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS, 1, [Define if you prefer libatomic_ops native ethread implementations])
- fi
- ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
- elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_MSG_ERROR([No usable libatomic_ops implementation found])
- fi
-
- case "$host_cpu" in
- sparc | sun4u | sparc64 | sun4v)
- case "$with_sparc_memory_order" in
- "TSO")
- AC_DEFINE(ETHR_SPARC_TSO, 1, [Define if only run in Sparc TSO mode]);;
- "PSO")
- AC_DEFINE(ETHR_SPARC_PSO, 1, [Define if only run in Sparc PSO, or TSO mode]);;
- "RMO"|"")
- AC_DEFINE(ETHR_SPARC_RMO, 1, [Define if run in Sparc RMO, PSO, or TSO mode]);;
- *)
- AC_MSG_ERROR([Unsupported Sparc memory order: $with_sparc_memory_order]);;
- esac
- ethr_have_native_atomics=yes;;
- i86pc | i*86 | x86_64 | amd64)
- if test "$enable_x86_out_of_order" = "yes"; then
- AC_DEFINE(ETHR_X86_OUT_OF_ORDER, 1, [Define if x86/x86_64 out of order instructions should be synchronized])
- fi
- ethr_have_native_atomics=yes;;
- macppc | ppc | powerpc | "Power Macintosh")
- ethr_have_native_atomics=yes;;
- tile)
- ethr_have_native_atomics=yes;;
- *)
- ;;
- esac
-
- fi
-
- test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes
-
- dnl Restore LIBS
- LIBS=$saved_libs
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- ;;
- *)
- ;;
-esac
-
-AC_MSG_CHECKING([whether default stack size should be modified])
-if test "x$ethr_modified_default_stack_size" != "x"; then
- AC_DEFINE_UNQUOTED(ETHR_MODIFIED_DEFAULT_STACK_SIZE, $ethr_modified_default_stack_size, [Define if you want to modify the default stack size])
- AC_MSG_RESULT([yes; to $ethr_modified_default_stack_size kilo words])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$ETHR_THR_LIB_BASE" != "x"; then
- ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
- ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
- ETHR_LIB_NAME=$ethr_lib_name
-fi
-
-AC_CHECK_SIZEOF(void *)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
-
-AC_CHECK_SIZEOF(int)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_INT, $ac_cv_sizeof_int, [Define to the size of int])
-AC_CHECK_SIZEOF(long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG, $ac_cv_sizeof_long, [Define to the size of long])
-AC_CHECK_SIZEOF(long long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long, [Define to the size of long long])
-AC_CHECK_SIZEOF(__int64)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT64, $ac_cv_sizeof___int64, [Define to the size of __int64])
-AC_CHECK_SIZEOF(__int128_t)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT128_T, $ac_cv_sizeof___int128_t, [Define to the size of __int128_t])
-
-
-case X$erl_xcomp_bigendian in
- X) ;;
- Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian]);;
-esac
-
-AC_C_BIGENDIAN
-
-if test "$ac_cv_c_bigendian" = "yes"; then
- AC_DEFINE(ETHR_BIGENDIAN, 1, [Define if bigendian])
-fi
-
-case X$erl_xcomp_double_middle_endian in
- X) ;;
- Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian]);;
-esac
-
-AC_C_DOUBLE_MIDDLE_ENDIAN
-
-ETHR_X86_SSE2_ASM=no
-case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in
- yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64)
- AC_MSG_CHECKING([for gcc sse2 asm support])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -msse2"
- gcc_sse2_asm=no
- AC_TRY_COMPILE([],
- [
- long long x, *y;
- __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory");
- ],
- [gcc_sse2_asm=yes])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$gcc_sse2_asm])
- if test "$gcc_sse2_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_SSE2_ASM_SUPPORT, 1, [Define if you use a gcc that supports -msse2 and understand sse2 specific asm statements])
- ETHR_X86_SSE2_ASM=yes
- fi
- ;;
- *)
- ;;
-esac
-
-case "$GCC-$host_cpu" in
- yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64)
- gcc_dw_cmpxchg_asm=no
- AC_MSG_CHECKING([for gcc double word cmpxchg asm support])
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
- __asm__ __volatile__(
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "pushl %%ebx\n\t"
- "movl %8, %%ebx\n\t"
-#endif
-#if ETHR_SIZEOF_PTR == 4
- "lock; cmpxchg8b %0\n\t"
-#else
- "lock; cmpxchg16b %0\n\t"
-#endif
- "setz %3\n\t"
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "popl %%ebx\n\t"
-#endif
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]),
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "r"(new[0])
-#else
- "b"(new[0])
-#endif
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test $gcc_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
-#if !defined(__PIC__) || !__PIC__
-# error nope
-#endif
- __asm__ __volatile__(
- "pushl %%ebx\n\t"
- "movl (%7), %%ebx\n\t"
- "movl 4(%7), %%ecx\n\t"
- "lock; cmpxchg8b %0\n\t"
- "setz %3\n\t"
- "popl %%ebx\n\t"
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new)
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_CMPXCHG8B_REGISTER_SHORTAGE, 1, [Define if you get a register shortage with cmpxchg8b and position independent code])
- fi
- fi
- AC_MSG_RESULT([$gcc_dw_cmpxchg_asm])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT, 1, [Define if you use a gcc that supports the double word cmpxchg instruction])
- fi;;
- *)
- ;;
-esac
-
-AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \
-[Define if you have all ethread defines])
-
-AC_SUBST(ETHR_X_LIBS)
-AC_SUBST(ETHR_LIBS)
-AC_SUBST(ETHR_LIB_NAME)
-AC_SUBST(ETHR_DEFS)
-AC_SUBST(ETHR_THR_LIB_BASE)
-AC_SUBST(ETHR_THR_LIB_BASE_DIR)
-AC_SUBST(ETHR_X86_SSE2_ASM)
-
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_TIME_CORRECTION
-dnl
-dnl In the presence of a high resolution realtime timer Erlang can adapt
-dnl its view of time relative to this timer. On solaris such a timer is
-dnl available with the syscall gethrtime(). On other OS's a fallback
-dnl solution using times() is implemented. (However on e.g. FreeBSD times()
-dnl is implemented using gettimeofday so it doesn't make much sense to
-dnl use it there...) On second thought, it seems to be safer to do it the
-dnl other way around. I.e. only use times() on OS's where we know it will
-dnl work...
-dnl
-
-AC_DEFUN(ERL_TIME_CORRECTION,
-[if test x$ac_cv_func_gethrtime = x; then
- AC_CHECK_FUNC(gethrtime)
-fi
-if test x$clock_gettime_correction = xunknown; then
- AC_TRY_COMPILE([#include <time.h>],
- [struct timespec ts;
- long long result;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- result = ((long long) ts.tv_sec) * 1000000000LL +
- ((long long) ts.tv_nsec);],
- clock_gettime_compiles=yes,
- clock_gettime_compiles=no)
-else
- clock_gettime_compiles=no
-fi
-
-
-AC_CACHE_CHECK([how to correct for time adjustments], erl_cv_time_correction,
-[
-case $clock_gettime_correction in
- yes)
- erl_cv_time_correction=clock_gettime;;
- no|unknown)
- case $ac_cv_func_gethrtime in
- yes)
- erl_cv_time_correction=hrtime ;;
- no)
- case $host_os in
- linux*)
- case $clock_gettime_correction in
- unknown)
- if test x$clock_gettime_compiles = xyes; then
- if test X$cross_compiling != Xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
- else
- case X$erl_xcomp_linux_clock_gettime_correction in
- X)
- erl_cv_time_correction=cross;;
- Xyes|Xno)
- if test $erl_xcomp_linux_clock_gettime_correction = yes; then
- erl_cv_time_correction=clock_gettime
- else
- erl_cv_time_correction=times
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction]);;
- esac
- fi
- else
- erl_cv_time_correction=times
- fi
- ;;
- *)
- erl_cv_time_correction=times ;;
- esac
- ;;
- *)
- erl_cv_time_correction=none ;;
- esac
- ;;
- esac
- ;;
-esac
-])
-
-xrtlib=""
-case $erl_cv_time_correction in
- times)
- AC_DEFINE(CORRECT_USING_TIMES,[],
- [Define if you do not have a high-res. timer & want to use times() instead])
- ;;
- clock_gettime|cross)
- if test $erl_cv_time_correction = cross; then
- erl_cv_time_correction=clock_gettime
- AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
- fi
- xrtlib="-lrt"
- AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
- [Define if you want to use clock_gettime to simulate gethrtime])
- ;;
-esac
-dnl
-dnl Check if gethrvtime is working, and if to use procfs ioctl
-dnl or (yet to be written) write to the procfs ctl file.
-dnl
-
-AC_MSG_CHECKING([if gethrvtime works and how to use it])
-AC_TRY_RUN([
-/* gethrvtime procfs ioctl test */
-/* These need to be undef:ed to not break activation of
- * micro level process accounting on /proc/self
- */
-#ifdef _LARGEFILE_SOURCE
-# undef _LARGEFILE_SOURCE
-#endif
-#ifdef _FILE_OFFSET_BITS
-# undef _FILE_OFFSET_BITS
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-int main() {
- long msacct = PR_MSACCT;
- int fd;
- long long start, stop;
- int i;
- pid_t pid = getpid();
- char proc_self[30] = "/proc/";
-
- sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid);
- if ( (fd = open(proc_self, O_WRONLY)) == -1)
- exit(1);
- if (ioctl(fd, PIOCSET, &msacct) < 0)
- exit(2);
- if (close(fd) < 0)
- exit(3);
- start = gethrvtime();
- for (i = 0; i < 100; i++)
- stop = gethrvtime();
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
-}
-],
-erl_gethrvtime=procfs_ioctl,
-erl_gethrvtime=false,
-[
-case X$erl_xcomp_gethrvtime_procfs_ioctl in
- X)
- erl_gethrvtime=cross;;
- Xyes|Xno)
- if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
- erl_gethrvtime=procfs_ioctl
- else
- erl_gethrvtime=false
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl]);;
-esac
-])
-
-case $erl_gethrvtime in
- procfs_ioctl)
- AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
- [define if gethrvtime() works and uses ioctl() to /proc/self])
- AC_MSG_RESULT(uses ioctl to procfs)
- ;;
- *)
- if test $erl_gethrvtime = cross; then
- erl_gethrvtime=false
- AC_MSG_RESULT(cross)
- AC_MSG_WARN([result 'not working' guessed because of cross compilation])
- else
- AC_MSG_RESULT(not working)
- fi
-
- dnl
- dnl Check if clock_gettime (linux) is working
- dnl
-
- AC_MSG_CHECKING([if clock_gettime can be used to get process CPU time])
- save_libs=$LIBS
- LIBS="-lrt"
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
- #include <time.h>
- int main() {
- long long start, stop;
- int i;
- struct timespec tp;
-
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) < 0)
- exit(1);
- start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- for (i = 0; i < 100; i++)
- clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
- stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
- }
- ],
- erl_clock_gettime=yes,
- erl_clock_gettime=no,
- [
- case X$erl_xcomp_clock_gettime_cpu_time in
- X) erl_clock_gettime=cross;;
- Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
- *) AC_MSG_ERROR([Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time]);;
- esac
- ])
- LIBS=$save_libs
- case $host_os in
- linux*)
- AC_MSG_RESULT([no; not stable])
- LIBRT=$xrtlib
- ;;
- *)
- AC_MSG_RESULT($erl_clock_gettime)
- case $erl_clock_gettime in
- yes)
- AC_DEFINE(HAVE_CLOCK_GETTIME,[],
- [define if clock_gettime() works for getting process time])
- LIBRT=-lrt
- ;;
- cross)
- erl_clock_gettime=no
- AC_MSG_WARN([result no guessed because of cross compilation])
- LIBRT=$xrtlib
- ;;
- *)
- LIBRT=$xrtlib
- ;;
- esac
- ;;
- esac
- AC_SUBST(LIBRT)
- ;;
-esac
-])dnl
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_TRY_ENABLE_CFLAG
-dnl
-dnl
-dnl Tries a CFLAG and sees if it can be enabled without compiler errors
-dnl $1: textual cflag to add
-dnl $2: variable to store the modified CFLAG in
-dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
-dnl
-dnl
-AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
- saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $$2";
- AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
- CFLAGS=$saved_CFLAGS;
- if test "X$can_enable_flag" = "Xtrue"; then
- AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $$2")
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl ERL_TRY_LINK_JAVA(CLASSES, FUNCTION-BODY
-dnl [ACTION_IF_FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Freely inspired by AC_TRY_LINK. (Maybe better to create a
-dnl AC_LANG_JAVA instead...)
-AC_DEFUN(ERL_TRY_LINK_JAVA,
-[java_link='$JAVAC conftest.java 1>&AC_FD_CC'
-changequote(, )dnl
-cat > conftest.java <<EOF
-$1
-class conftest { public static void main(String[] args) {
- $2
- ; return; }}
-EOF
-changequote([, ])dnl
-if AC_TRY_EVAL(java_link) && test -s conftest.class; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
-else
- echo "configure: failed program was:" 1>&AC_FD_CC
- cat conftest.java 1>&AC_FD_CC
- echo "configure: PATH was $PATH" 1>&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
- $4
-])dnl
-fi
-rm -f conftest*])
-#define UNSAFE_MASK 0xc0000000 /* Mask for bits that must be constant */
-
-
diff --git a/bootstrap/bin/start.boot b/bootstrap/bin/start.boot
index ca6df9fcf5..6cc4fa1f43 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 ca6df9fcf5..6cc4fa1f43 100644
--- a/bootstrap/bin/start_clean.boot
+++ b/bootstrap/bin/start_clean.boot
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_a.beam b/bootstrap/lib/compiler/ebin/beam_a.beam
index a4965abd48..87e9759ffe 100644
--- a/bootstrap/lib/compiler/ebin/beam_a.beam
+++ b/bootstrap/lib/compiler/ebin/beam_a.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_asm.beam b/bootstrap/lib/compiler/ebin/beam_asm.beam
index 75bae8060e..e6c5cc9028 100644
--- a/bootstrap/lib/compiler/ebin/beam_asm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_asm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_block.beam b/bootstrap/lib/compiler/ebin/beam_block.beam
index 370f328a96..11482a1451 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_bool.beam b/bootstrap/lib/compiler/ebin/beam_bool.beam
index 196e442556..6454719448 100644
--- a/bootstrap/lib/compiler/ebin/beam_bool.beam
+++ b/bootstrap/lib/compiler/ebin/beam_bool.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_bsm.beam b/bootstrap/lib/compiler/ebin/beam_bsm.beam
index 9e3d9832b1..1b51483bb1 100644
--- a/bootstrap/lib/compiler/ebin/beam_bsm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_bsm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_clean.beam b/bootstrap/lib/compiler/ebin/beam_clean.beam
index 3fe3225c14..f6a9ff987d 100644
--- a/bootstrap/lib/compiler/ebin/beam_clean.beam
+++ b/bootstrap/lib/compiler/ebin/beam_clean.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_dead.beam b/bootstrap/lib/compiler/ebin/beam_dead.beam
index b664286f0f..dc924a2905 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_dict.beam b/bootstrap/lib/compiler/ebin/beam_dict.beam
index 50771f4e90..89867ee4a3 100644
--- a/bootstrap/lib/compiler/ebin/beam_dict.beam
+++ b/bootstrap/lib/compiler/ebin/beam_dict.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_disasm.beam b/bootstrap/lib/compiler/ebin/beam_disasm.beam
index 959e989b6d..f050f39ca0 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 e340e0f4c6..0de15769c4 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_flatten.beam b/bootstrap/lib/compiler/ebin/beam_flatten.beam
index 8f06d7270c..35dae78125 100644
--- a/bootstrap/lib/compiler/ebin/beam_flatten.beam
+++ b/bootstrap/lib/compiler/ebin/beam_flatten.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_jump.beam b/bootstrap/lib/compiler/ebin/beam_jump.beam
index c296bdd18d..2b839bc997 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_opcodes.beam b/bootstrap/lib/compiler/ebin/beam_opcodes.beam
index 8425c2b2b5..eaf39a378e 100644
--- a/bootstrap/lib/compiler/ebin/beam_opcodes.beam
+++ b/bootstrap/lib/compiler/ebin/beam_opcodes.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_peep.beam b/bootstrap/lib/compiler/ebin/beam_peep.beam
index a21cc7e1e1..214fa56911 100644
--- a/bootstrap/lib/compiler/ebin/beam_peep.beam
+++ b/bootstrap/lib/compiler/ebin/beam_peep.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_receive.beam b/bootstrap/lib/compiler/ebin/beam_receive.beam
index 2f1fcc9fe1..5da32b5db6 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_split.beam b/bootstrap/lib/compiler/ebin/beam_split.beam
index 2271c15ee4..1d12f2cf1d 100644
--- a/bootstrap/lib/compiler/ebin/beam_split.beam
+++ b/bootstrap/lib/compiler/ebin/beam_split.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_trim.beam b/bootstrap/lib/compiler/ebin/beam_trim.beam
index b655cdb4cf..b844602370 100644
--- a/bootstrap/lib/compiler/ebin/beam_trim.beam
+++ b/bootstrap/lib/compiler/ebin/beam_trim.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_type.beam b/bootstrap/lib/compiler/ebin/beam_type.beam
index 5fd60ebee1..7f80c1a691 100644
--- a/bootstrap/lib/compiler/ebin/beam_type.beam
+++ b/bootstrap/lib/compiler/ebin/beam_type.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_utils.beam b/bootstrap/lib/compiler/ebin/beam_utils.beam
index 9360e60827..8507db5454 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 b8a3491caa..07225dc8b1 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/beam_z.beam b/bootstrap/lib/compiler/ebin/beam_z.beam
index 4d28344035..ad551bcc8c 100644
--- a/bootstrap/lib/compiler/ebin/beam_z.beam
+++ b/bootstrap/lib/compiler/ebin/beam_z.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl.beam b/bootstrap/lib/compiler/ebin/cerl.beam
index a10f017869..0f0670c9ae 100644
--- a/bootstrap/lib/compiler/ebin/cerl.beam
+++ b/bootstrap/lib/compiler/ebin/cerl.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_clauses.beam b/bootstrap/lib/compiler/ebin/cerl_clauses.beam
index 97e96c47bd..2357df79f4 100644
--- a/bootstrap/lib/compiler/ebin/cerl_clauses.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_clauses.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_inline.beam b/bootstrap/lib/compiler/ebin/cerl_inline.beam
index 3fa8c7d69f..2f7f220ebd 100644
--- a/bootstrap/lib/compiler/ebin/cerl_inline.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_inline.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_trees.beam b/bootstrap/lib/compiler/ebin/cerl_trees.beam
index 49528c1635..1338631c23 100644
--- a/bootstrap/lib/compiler/ebin/cerl_trees.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_trees.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/compile.beam b/bootstrap/lib/compiler/ebin/compile.beam
index 9de2c1a0cf..eb682b953c 100644
--- a/bootstrap/lib/compiler/ebin/compile.beam
+++ b/bootstrap/lib/compiler/ebin/compile.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/compiler.app b/bootstrap/lib/compiler/ebin/compiler.app
index 902f9c4948..ea1be86c83 100644
--- a/bootstrap/lib/compiler/ebin/compiler.app
+++ b/bootstrap/lib/compiler/ebin/compiler.app
@@ -18,7 +18,7 @@
{application, compiler,
[{description, "ERTS CXC 138 10"},
- {vsn, "4.9.3"},
+ {vsn, "5.0.3"},
{modules, [
beam_a,
beam_asm,
@@ -67,4 +67,6 @@
]},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","hipe-3.10.3","erts-6.0",
+ "crypto-3.3"]}]}.
diff --git a/bootstrap/lib/compiler/ebin/compiler.appup b/bootstrap/lib/compiler/ebin/compiler.appup
index 4a12f3a770..e73b9aa60c 100644
--- a/bootstrap/lib/compiler/ebin/compiler.appup
+++ b/bootstrap/lib/compiler/ebin/compiler.appup
@@ -1 +1,21 @@
-{"4.9.2",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"5.0",
+ [{<<".*">>,[{restart_application, compiler}]}],
+ [{<<".*">>,[{restart_application, compiler}]}]
+}.
diff --git a/bootstrap/lib/compiler/ebin/core_lib.beam b/bootstrap/lib/compiler/ebin/core_lib.beam
index d03dfe646c..54f43c6c10 100644
--- a/bootstrap/lib/compiler/ebin/core_lib.beam
+++ b/bootstrap/lib/compiler/ebin/core_lib.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_lint.beam b/bootstrap/lib/compiler/ebin/core_lint.beam
index bfe9914644..e172ec6af7 100644
--- a/bootstrap/lib/compiler/ebin/core_lint.beam
+++ b/bootstrap/lib/compiler/ebin/core_lint.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_parse.beam b/bootstrap/lib/compiler/ebin/core_parse.beam
index 80820731c1..121ef65275 100644
--- a/bootstrap/lib/compiler/ebin/core_parse.beam
+++ b/bootstrap/lib/compiler/ebin/core_parse.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_pp.beam b/bootstrap/lib/compiler/ebin/core_pp.beam
index e96e4bc654..e6e60fb658 100644
--- a/bootstrap/lib/compiler/ebin/core_pp.beam
+++ b/bootstrap/lib/compiler/ebin/core_pp.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_scan.beam b/bootstrap/lib/compiler/ebin/core_scan.beam
index f14eda5a33..73f588232a 100644
--- a/bootstrap/lib/compiler/ebin/core_scan.beam
+++ b/bootstrap/lib/compiler/ebin/core_scan.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/erl_bifs.beam b/bootstrap/lib/compiler/ebin/erl_bifs.beam
index e2dc90c887..27136581c1 100644
--- a/bootstrap/lib/compiler/ebin/erl_bifs.beam
+++ b/bootstrap/lib/compiler/ebin/erl_bifs.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/rec_env.beam b/bootstrap/lib/compiler/ebin/rec_env.beam
index edabfdf444..4bd37b16c0 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_dsetel.beam b/bootstrap/lib/compiler/ebin/sys_core_dsetel.beam
index 11c194a5cc..29dfdfb755 100644
--- a/bootstrap/lib/compiler/ebin/sys_core_dsetel.beam
+++ b/bootstrap/lib/compiler/ebin/sys_core_dsetel.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 330654dbf0..64477ec574 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/sys_core_inline.beam b/bootstrap/lib/compiler/ebin/sys_core_inline.beam
index d8eabeda7c..1e358ee0ea 100644
--- a/bootstrap/lib/compiler/ebin/sys_core_inline.beam
+++ b/bootstrap/lib/compiler/ebin/sys_core_inline.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam b/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
index d3b213e75a..f7621bbc3f 100644
--- a/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
+++ b/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
index 60933730c3..c0c537f623 100644
--- a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
+++ b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_codegen.beam b/bootstrap/lib/compiler/ebin/v3_codegen.beam
index 5b06d8656e..3670fd206c 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 7410397300..851b5512c3 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_kernel.beam b/bootstrap/lib/compiler/ebin/v3_kernel.beam
index a0afb3fac2..1e549a41c7 100644
--- a/bootstrap/lib/compiler/ebin/v3_kernel.beam
+++ b/bootstrap/lib/compiler/ebin/v3_kernel.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_kernel_pp.beam b/bootstrap/lib/compiler/ebin/v3_kernel_pp.beam
index 8f18f5ff25..1798a279b0 100644
--- a/bootstrap/lib/compiler/ebin/v3_kernel_pp.beam
+++ b/bootstrap/lib/compiler/ebin/v3_kernel_pp.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_life.beam b/bootstrap/lib/compiler/ebin/v3_life.beam
index 2392863c3d..0eb0cb6caf 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/application.beam b/bootstrap/lib/kernel/ebin/application.beam
index e39352117f..6946d17545 100644
--- a/bootstrap/lib/kernel/ebin/application.beam
+++ b/bootstrap/lib/kernel/ebin/application.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/application_controller.beam b/bootstrap/lib/kernel/ebin/application_controller.beam
index b7081212cb..2a4525c27f 100644
--- a/bootstrap/lib/kernel/ebin/application_controller.beam
+++ b/bootstrap/lib/kernel/ebin/application_controller.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/application_master.beam b/bootstrap/lib/kernel/ebin/application_master.beam
index 0af5dc0e00..365bc7b53d 100644
--- a/bootstrap/lib/kernel/ebin/application_master.beam
+++ b/bootstrap/lib/kernel/ebin/application_master.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/application_starter.beam b/bootstrap/lib/kernel/ebin/application_starter.beam
index 06d8098af9..f5059a487a 100644
--- a/bootstrap/lib/kernel/ebin/application_starter.beam
+++ b/bootstrap/lib/kernel/ebin/application_starter.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/auth.beam b/bootstrap/lib/kernel/ebin/auth.beam
index bdca504da5..3cc607cb14 100644
--- a/bootstrap/lib/kernel/ebin/auth.beam
+++ b/bootstrap/lib/kernel/ebin/auth.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/code.beam b/bootstrap/lib/kernel/ebin/code.beam
index 2994e5257a..5428f2cf0c 100644
--- a/bootstrap/lib/kernel/ebin/code.beam
+++ b/bootstrap/lib/kernel/ebin/code.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/code_server.beam b/bootstrap/lib/kernel/ebin/code_server.beam
index 89417b095b..340c5feed9 100644
--- a/bootstrap/lib/kernel/ebin/code_server.beam
+++ b/bootstrap/lib/kernel/ebin/code_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log.beam b/bootstrap/lib/kernel/ebin/disk_log.beam
index 5ec7cfe5eb..8a7d6a8388 100644
--- a/bootstrap/lib/kernel/ebin/disk_log.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log_1.beam b/bootstrap/lib/kernel/ebin/disk_log_1.beam
index 3e69311b53..5193dfa53d 100644
--- a/bootstrap/lib/kernel/ebin/disk_log_1.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log_1.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log_server.beam b/bootstrap/lib/kernel/ebin/disk_log_server.beam
index 81b76167a5..8c1622c7d8 100644
--- a/bootstrap/lib/kernel/ebin/disk_log_server.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/dist_ac.beam b/bootstrap/lib/kernel/ebin/dist_ac.beam
index 857e91c66f..9d3f7548b6 100644
--- a/bootstrap/lib/kernel/ebin/dist_ac.beam
+++ b/bootstrap/lib/kernel/ebin/dist_ac.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/dist_util.beam b/bootstrap/lib/kernel/ebin/dist_util.beam
index 84738305f7..ea09695075 100644
--- a/bootstrap/lib/kernel/ebin/dist_util.beam
+++ b/bootstrap/lib/kernel/ebin/dist_util.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/erl_boot_server.beam b/bootstrap/lib/kernel/ebin/erl_boot_server.beam
index 47563a5d81..6e56a1061d 100644
--- a/bootstrap/lib/kernel/ebin/erl_boot_server.beam
+++ b/bootstrap/lib/kernel/ebin/erl_boot_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/erl_ddll.beam b/bootstrap/lib/kernel/ebin/erl_ddll.beam
index 90c831b045..e15e49d61c 100644
--- a/bootstrap/lib/kernel/ebin/erl_ddll.beam
+++ b/bootstrap/lib/kernel/ebin/erl_ddll.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/erl_epmd.beam b/bootstrap/lib/kernel/ebin/erl_epmd.beam
index 0eaecd949a..bf171450e9 100644
--- a/bootstrap/lib/kernel/ebin/erl_epmd.beam
+++ b/bootstrap/lib/kernel/ebin/erl_epmd.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/erl_reply.beam b/bootstrap/lib/kernel/ebin/erl_reply.beam
index c492a19d6f..79fb539bd3 100644
--- a/bootstrap/lib/kernel/ebin/erl_reply.beam
+++ b/bootstrap/lib/kernel/ebin/erl_reply.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/error_logger.beam b/bootstrap/lib/kernel/ebin/error_logger.beam
index bad3d6211f..10f7a0b984 100644
--- a/bootstrap/lib/kernel/ebin/error_logger.beam
+++ b/bootstrap/lib/kernel/ebin/error_logger.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/erts_debug.beam b/bootstrap/lib/kernel/ebin/erts_debug.beam
index cc7d774ee5..17320342bc 100644
--- a/bootstrap/lib/kernel/ebin/erts_debug.beam
+++ b/bootstrap/lib/kernel/ebin/erts_debug.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/file.beam b/bootstrap/lib/kernel/ebin/file.beam
index 9906ddd1fe..5305c3854c 100644
--- a/bootstrap/lib/kernel/ebin/file.beam
+++ b/bootstrap/lib/kernel/ebin/file.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/file_io_server.beam b/bootstrap/lib/kernel/ebin/file_io_server.beam
index 6916cdcc58..dfaa1b07f0 100644
--- a/bootstrap/lib/kernel/ebin/file_io_server.beam
+++ b/bootstrap/lib/kernel/ebin/file_io_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/file_server.beam b/bootstrap/lib/kernel/ebin/file_server.beam
index 2ebded8ba5..48352e9dfd 100644
--- a/bootstrap/lib/kernel/ebin/file_server.beam
+++ b/bootstrap/lib/kernel/ebin/file_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/gen_sctp.beam b/bootstrap/lib/kernel/ebin/gen_sctp.beam
index e1384d1b5e..e2bb806f2b 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/global.beam b/bootstrap/lib/kernel/ebin/global.beam
index 8ba005c6da..d25be3994c 100644
--- a/bootstrap/lib/kernel/ebin/global.beam
+++ b/bootstrap/lib/kernel/ebin/global.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/global_group.beam b/bootstrap/lib/kernel/ebin/global_group.beam
index d84e01aa51..d11f60015a 100644
--- a/bootstrap/lib/kernel/ebin/global_group.beam
+++ b/bootstrap/lib/kernel/ebin/global_group.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/group.beam b/bootstrap/lib/kernel/ebin/group.beam
index c34d495e04..412b8e0007 100644
--- a/bootstrap/lib/kernel/ebin/group.beam
+++ b/bootstrap/lib/kernel/ebin/group.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/heart.beam b/bootstrap/lib/kernel/ebin/heart.beam
index 7e81d1610a..d4972ecdd2 100644
--- a/bootstrap/lib/kernel/ebin/heart.beam
+++ b/bootstrap/lib/kernel/ebin/heart.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
index 3bfeac1d19..6df9ac9564 100644
--- a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
+++ b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet.beam b/bootstrap/lib/kernel/ebin/inet.beam
index 63e221d4b0..4fff1c069d 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_tcp.beam b/bootstrap/lib/kernel/ebin/inet6_tcp.beam
index dc592e336c..036b0495c8 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_tcp_dist.beam b/bootstrap/lib/kernel/ebin/inet6_tcp_dist.beam
index 4b5543b994..83305c1826 100644
--- a/bootstrap/lib/kernel/ebin/inet6_tcp_dist.beam
+++ b/bootstrap/lib/kernel/ebin/inet6_tcp_dist.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet6_udp.beam b/bootstrap/lib/kernel/ebin/inet6_udp.beam
index 2c94263b99..73f0b52b90 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_config.beam b/bootstrap/lib/kernel/ebin/inet_config.beam
index 7db3eddc6e..e858ac20f1 100644
--- a/bootstrap/lib/kernel/ebin/inet_config.beam
+++ b/bootstrap/lib/kernel/ebin/inet_config.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_db.beam b/bootstrap/lib/kernel/ebin/inet_db.beam
index 674fef3a42..45e7d9e0d0 100644
--- a/bootstrap/lib/kernel/ebin/inet_db.beam
+++ b/bootstrap/lib/kernel/ebin/inet_db.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_dns.beam b/bootstrap/lib/kernel/ebin/inet_dns.beam
index b962e1ef21..9fd86024e0 100644
--- a/bootstrap/lib/kernel/ebin/inet_dns.beam
+++ b/bootstrap/lib/kernel/ebin/inet_dns.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
index 03cb896d1c..098c397936 100644
--- a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
+++ b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_hosts.beam b/bootstrap/lib/kernel/ebin/inet_hosts.beam
index 78e81ce23d..3e70a8b8c1 100644
--- a/bootstrap/lib/kernel/ebin/inet_hosts.beam
+++ b/bootstrap/lib/kernel/ebin/inet_hosts.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_parse.beam b/bootstrap/lib/kernel/ebin/inet_parse.beam
index d2ef990dba..90ccd8b440 100644
--- a/bootstrap/lib/kernel/ebin/inet_parse.beam
+++ b/bootstrap/lib/kernel/ebin/inet_parse.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_res.beam b/bootstrap/lib/kernel/ebin/inet_res.beam
index 698fd4b721..2636552e92 100644
--- a/bootstrap/lib/kernel/ebin/inet_res.beam
+++ b/bootstrap/lib/kernel/ebin/inet_res.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_sctp.beam b/bootstrap/lib/kernel/ebin/inet_sctp.beam
index 098a2c9277..503cbc11e2 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 00a8175665..d854abd830 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 358d9ae403..2e54f1e1f4 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 6fb98bd777..6fbdd29f6d 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 712e4300c9..3388f28e91 100644
--- a/bootstrap/lib/kernel/ebin/kernel.app
+++ b/bootstrap/lib/kernel/ebin/kernel.app
@@ -21,7 +21,7 @@
{application, kernel,
[
{description, "ERTS CXC 138 10"},
- {vsn, "2.16.4"},
+ {vsn, "3.1"},
{modules, [application,
application_controller,
application_master,
@@ -114,6 +114,7 @@
pg2]},
{applications, []},
{env, [{error_logger, tty}]},
- {mod, {kernel, []}}
+ {mod, {kernel, []}},
+ {runtime_dependencies, ["erts-6.1.2", "stdlib-2.0", "sasl-2.4"]}
]
}.
diff --git a/bootstrap/lib/kernel/ebin/kernel.appup b/bootstrap/lib/kernel/ebin/kernel.appup
index 5557aa47e5..b6fade4222 100644
--- a/bootstrap/lib/kernel/ebin/kernel.appup
+++ b/bootstrap/lib/kernel/ebin/kernel.appup
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,13 +15,11 @@
%% under the License.
%%
%% %CopyrightEnd%
-{"2.16.4",
- %% Up from - max two major revisions back
- [{<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.14(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14
- %% Down to - max two major revisions back
- [{<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.14(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14
+{"3.1",
+ %% Up from - max one major revision back
+ [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
+ [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/bootstrap/lib/kernel/ebin/kernel.beam b/bootstrap/lib/kernel/ebin/kernel.beam
index 7f6d8fcb30..c938b218e1 100644
--- a/bootstrap/lib/kernel/ebin/kernel.beam
+++ b/bootstrap/lib/kernel/ebin/kernel.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/kernel_config.beam b/bootstrap/lib/kernel/ebin/kernel_config.beam
index ce8077390c..c35da2c73d 100644
--- a/bootstrap/lib/kernel/ebin/kernel_config.beam
+++ b/bootstrap/lib/kernel/ebin/kernel_config.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/net_adm.beam b/bootstrap/lib/kernel/ebin/net_adm.beam
index dc7e091cf2..4b09aae8a5 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/kernel/ebin/net_kernel.beam b/bootstrap/lib/kernel/ebin/net_kernel.beam
index c5e31f18dc..33193008c7 100644
--- a/bootstrap/lib/kernel/ebin/net_kernel.beam
+++ b/bootstrap/lib/kernel/ebin/net_kernel.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/os.beam b/bootstrap/lib/kernel/ebin/os.beam
index 5161ebea09..b1b92ca36b 100644
--- a/bootstrap/lib/kernel/ebin/os.beam
+++ b/bootstrap/lib/kernel/ebin/os.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/pg2.beam b/bootstrap/lib/kernel/ebin/pg2.beam
index 06347b102c..c26b5a4ffc 100644
--- a/bootstrap/lib/kernel/ebin/pg2.beam
+++ b/bootstrap/lib/kernel/ebin/pg2.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/ram_file.beam b/bootstrap/lib/kernel/ebin/ram_file.beam
index 74fcc898c3..4d6df15730 100644
--- a/bootstrap/lib/kernel/ebin/ram_file.beam
+++ b/bootstrap/lib/kernel/ebin/ram_file.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/rpc.beam b/bootstrap/lib/kernel/ebin/rpc.beam
index 4782908361..4a8aa5da69 100644
--- a/bootstrap/lib/kernel/ebin/rpc.beam
+++ b/bootstrap/lib/kernel/ebin/rpc.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/standard_error.beam b/bootstrap/lib/kernel/ebin/standard_error.beam
index 21b5722bb2..be4f9292e7 100644
--- a/bootstrap/lib/kernel/ebin/standard_error.beam
+++ b/bootstrap/lib/kernel/ebin/standard_error.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/user.beam b/bootstrap/lib/kernel/ebin/user.beam
index 2a72398b7c..0e06c78fce 100644
--- a/bootstrap/lib/kernel/ebin/user.beam
+++ b/bootstrap/lib/kernel/ebin/user.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/user_drv.beam b/bootstrap/lib/kernel/ebin/user_drv.beam
index 4bbf85a4e4..4a2cd01b0d 100644
--- a/bootstrap/lib/kernel/ebin/user_drv.beam
+++ b/bootstrap/lib/kernel/ebin/user_drv.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/wrap_log_reader.beam b/bootstrap/lib/kernel/ebin/wrap_log_reader.beam
index 7a328be682..f35187c269 100644
--- a/bootstrap/lib/kernel/ebin/wrap_log_reader.beam
+++ b/bootstrap/lib/kernel/ebin/wrap_log_reader.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/include/dist.hrl b/bootstrap/lib/kernel/include/dist.hrl
index e32c112e63..77556d1303 100644
--- a/bootstrap/lib/kernel/include/dist.hrl
+++ b/bootstrap/lib/kernel/include/dist.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,3 +37,4 @@
-define(DFLAG_DIST_HDR_ATOM_CACHE,16#2000).
-define(DFLAG_SMALL_ATOM_TAGS, 16#4000).
-define(DFLAG_UTF8_ATOMS, 16#10000).
+-define(DFLAG_MAP_TAG, 16#20000).
diff --git a/bootstrap/lib/stdlib/ebin/array.beam b/bootstrap/lib/stdlib/ebin/array.beam
index 28d04dea2c..76cb41da49 100644
--- a/bootstrap/lib/stdlib/ebin/array.beam
+++ b/bootstrap/lib/stdlib/ebin/array.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/base64.beam b/bootstrap/lib/stdlib/ebin/base64.beam
index 2ca9a4d0b8..e8d4b44102 100644
--- a/bootstrap/lib/stdlib/ebin/base64.beam
+++ b/bootstrap/lib/stdlib/ebin/base64.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/beam_lib.beam b/bootstrap/lib/stdlib/ebin/beam_lib.beam
index 611f271cb9..b22233171b 100644
--- a/bootstrap/lib/stdlib/ebin/beam_lib.beam
+++ b/bootstrap/lib/stdlib/ebin/beam_lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/binary.beam b/bootstrap/lib/stdlib/ebin/binary.beam
index 6077d965ed..14d6ba7976 100644
--- a/bootstrap/lib/stdlib/ebin/binary.beam
+++ b/bootstrap/lib/stdlib/ebin/binary.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/c.beam b/bootstrap/lib/stdlib/ebin/c.beam
index b2999a6255..b184c21d94 100644
--- a/bootstrap/lib/stdlib/ebin/c.beam
+++ b/bootstrap/lib/stdlib/ebin/c.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/calendar.beam b/bootstrap/lib/stdlib/ebin/calendar.beam
index 3f4f14abc3..19e0443dd2 100644
--- a/bootstrap/lib/stdlib/ebin/calendar.beam
+++ b/bootstrap/lib/stdlib/ebin/calendar.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets.beam b/bootstrap/lib/stdlib/ebin/dets.beam
index e77331b292..46adf4ee3a 100644
--- a/bootstrap/lib/stdlib/ebin/dets.beam
+++ b/bootstrap/lib/stdlib/ebin/dets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_server.beam b/bootstrap/lib/stdlib/ebin/dets_server.beam
index 215dda572c..7ce673e23c 100644
--- a/bootstrap/lib/stdlib/ebin/dets_server.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_server.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_utils.beam b/bootstrap/lib/stdlib/ebin/dets_utils.beam
index 2895659a45..cb4da358d6 100644
--- a/bootstrap/lib/stdlib/ebin/dets_utils.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_utils.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_v8.beam b/bootstrap/lib/stdlib/ebin/dets_v8.beam
index 32e872a31b..eac0a308b7 100644
--- a/bootstrap/lib/stdlib/ebin/dets_v8.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_v8.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_v9.beam b/bootstrap/lib/stdlib/ebin/dets_v9.beam
index 615db8ab9b..c85adabcae 100644
--- a/bootstrap/lib/stdlib/ebin/dets_v9.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_v9.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dict.beam b/bootstrap/lib/stdlib/ebin/dict.beam
index 83d30876cc..e39c79bd5a 100644
--- a/bootstrap/lib/stdlib/ebin/dict.beam
+++ b/bootstrap/lib/stdlib/ebin/dict.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/digraph.beam b/bootstrap/lib/stdlib/ebin/digraph.beam
index 82735d07cc..40db38c992 100644
--- a/bootstrap/lib/stdlib/ebin/digraph.beam
+++ b/bootstrap/lib/stdlib/ebin/digraph.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/digraph_utils.beam b/bootstrap/lib/stdlib/ebin/digraph_utils.beam
index 95592947b8..64783f4e1d 100644
--- a/bootstrap/lib/stdlib/ebin/digraph_utils.beam
+++ b/bootstrap/lib/stdlib/ebin/digraph_utils.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/edlin.beam b/bootstrap/lib/stdlib/ebin/edlin.beam
index 7b8e03a722..f006e86851 100644
--- a/bootstrap/lib/stdlib/ebin/edlin.beam
+++ b/bootstrap/lib/stdlib/ebin/edlin.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/edlin_expand.beam b/bootstrap/lib/stdlib/ebin/edlin_expand.beam
index 01570cb1d4..e182f67bd8 100644
--- a/bootstrap/lib/stdlib/ebin/edlin_expand.beam
+++ b/bootstrap/lib/stdlib/ebin/edlin_expand.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/epp.beam b/bootstrap/lib/stdlib/ebin/epp.beam
index 879370ef87..83469557cd 100644
--- a/bootstrap/lib/stdlib/ebin/epp.beam
+++ b/bootstrap/lib/stdlib/ebin/epp.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_bits.beam b/bootstrap/lib/stdlib/ebin/erl_bits.beam
index 7149491121..627b9ca711 100644
--- a/bootstrap/lib/stdlib/ebin/erl_bits.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_bits.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_compile.beam b/bootstrap/lib/stdlib/ebin/erl_compile.beam
index 1311018a7f..e650afbf6d 100644
--- a/bootstrap/lib/stdlib/ebin/erl_compile.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_compile.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_eval.beam b/bootstrap/lib/stdlib/ebin/erl_eval.beam
index 6f4180ee07..95454c885a 100644
--- a/bootstrap/lib/stdlib/ebin/erl_eval.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_eval.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_expand_records.beam b/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
index 411f453a95..b2104b1d3f 100644
--- a/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_internal.beam b/bootstrap/lib/stdlib/ebin/erl_internal.beam
index d8c77627f1..b851ca484e 100644
--- a/bootstrap/lib/stdlib/ebin/erl_internal.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_internal.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_lint.beam b/bootstrap/lib/stdlib/ebin/erl_lint.beam
index 30c387c53c..8ae35899d0 100644
--- a/bootstrap/lib/stdlib/ebin/erl_lint.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_lint.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_parse.beam b/bootstrap/lib/stdlib/ebin/erl_parse.beam
index b66feba048..4c27146a81 100644
--- a/bootstrap/lib/stdlib/ebin/erl_parse.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_parse.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_pp.beam b/bootstrap/lib/stdlib/ebin/erl_pp.beam
index ecc8933bef..4549b309ca 100644
--- a/bootstrap/lib/stdlib/ebin/erl_pp.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_pp.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_scan.beam b/bootstrap/lib/stdlib/ebin/erl_scan.beam
index c8da05cb67..b2b97bda8a 100644
--- a/bootstrap/lib/stdlib/ebin/erl_scan.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_scan.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_tar.beam b/bootstrap/lib/stdlib/ebin/erl_tar.beam
index 80e49621dd..24c65996b3 100644
--- a/bootstrap/lib/stdlib/ebin/erl_tar.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_tar.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/error_logger_file_h.beam b/bootstrap/lib/stdlib/ebin/error_logger_file_h.beam
index 496e41c858..673ee6e8b2 100644
--- a/bootstrap/lib/stdlib/ebin/error_logger_file_h.beam
+++ b/bootstrap/lib/stdlib/ebin/error_logger_file_h.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam b/bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam
index 3c4c135495..87d58cf378 100644
--- a/bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam
+++ b/bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/escript.beam b/bootstrap/lib/stdlib/ebin/escript.beam
index 12a578278f..401b41a2f5 100644
--- a/bootstrap/lib/stdlib/ebin/escript.beam
+++ b/bootstrap/lib/stdlib/ebin/escript.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/ets.beam b/bootstrap/lib/stdlib/ebin/ets.beam
index 81ff105494..8d024aaa99 100644
--- a/bootstrap/lib/stdlib/ebin/ets.beam
+++ b/bootstrap/lib/stdlib/ebin/ets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/eval_bits.beam b/bootstrap/lib/stdlib/ebin/eval_bits.beam
index 2342b1c81d..6627e1132c 100644
--- a/bootstrap/lib/stdlib/ebin/eval_bits.beam
+++ b/bootstrap/lib/stdlib/ebin/eval_bits.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/file_sorter.beam b/bootstrap/lib/stdlib/ebin/file_sorter.beam
index a1be03ba3a..b5844d5ddb 100644
--- a/bootstrap/lib/stdlib/ebin/file_sorter.beam
+++ b/bootstrap/lib/stdlib/ebin/file_sorter.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/filelib.beam b/bootstrap/lib/stdlib/ebin/filelib.beam
index 14ab68a7e1..ab3600c2f2 100644
--- a/bootstrap/lib/stdlib/ebin/filelib.beam
+++ b/bootstrap/lib/stdlib/ebin/filelib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/filename.beam b/bootstrap/lib/stdlib/ebin/filename.beam
index de676f2bed..4c64d477aa 100644
--- a/bootstrap/lib/stdlib/ebin/filename.beam
+++ b/bootstrap/lib/stdlib/ebin/filename.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gb_sets.beam b/bootstrap/lib/stdlib/ebin/gb_sets.beam
index 444c2745a0..feadc1d1ed 100644
--- a/bootstrap/lib/stdlib/ebin/gb_sets.beam
+++ b/bootstrap/lib/stdlib/ebin/gb_sets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gb_trees.beam b/bootstrap/lib/stdlib/ebin/gb_trees.beam
index 24aab57544..879b8cdf76 100644
--- a/bootstrap/lib/stdlib/ebin/gb_trees.beam
+++ b/bootstrap/lib/stdlib/ebin/gb_trees.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen.beam b/bootstrap/lib/stdlib/ebin/gen.beam
index 277a881630..6f15e461f6 100644
--- a/bootstrap/lib/stdlib/ebin/gen.beam
+++ b/bootstrap/lib/stdlib/ebin/gen.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen_event.beam b/bootstrap/lib/stdlib/ebin/gen_event.beam
index 313bd2dcce..e7aaf99eb0 100644
--- a/bootstrap/lib/stdlib/ebin/gen_event.beam
+++ b/bootstrap/lib/stdlib/ebin/gen_event.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen_fsm.beam b/bootstrap/lib/stdlib/ebin/gen_fsm.beam
index 561b562115..1eee773838 100644
--- a/bootstrap/lib/stdlib/ebin/gen_fsm.beam
+++ b/bootstrap/lib/stdlib/ebin/gen_fsm.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen_server.beam b/bootstrap/lib/stdlib/ebin/gen_server.beam
index d7221a4ea3..833287bbe2 100644
--- a/bootstrap/lib/stdlib/ebin/gen_server.beam
+++ b/bootstrap/lib/stdlib/ebin/gen_server.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io.beam b/bootstrap/lib/stdlib/ebin/io.beam
index 19ae65b3bf..fd64aedde1 100644
--- a/bootstrap/lib/stdlib/ebin/io.beam
+++ b/bootstrap/lib/stdlib/ebin/io.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib.beam b/bootstrap/lib/stdlib/ebin/io_lib.beam
index 08e497e35a..ad77021190 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib_format.beam b/bootstrap/lib/stdlib/ebin/io_lib_format.beam
index a476dcc6be..fcfce54d0e 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib_format.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib_format.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib_fread.beam b/bootstrap/lib/stdlib/ebin/io_lib_fread.beam
index f3f059df26..8c45cf484c 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib_fread.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib_fread.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
index b9bcaf8cf2..9504baab1b 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/lib.beam b/bootstrap/lib/stdlib/ebin/lib.beam
index 0de626c384..c9086e1796 100644
--- a/bootstrap/lib/stdlib/ebin/lib.beam
+++ b/bootstrap/lib/stdlib/ebin/lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/lists.beam b/bootstrap/lib/stdlib/ebin/lists.beam
index 332a2088d0..96eb8f3a86 100644
--- a/bootstrap/lib/stdlib/ebin/lists.beam
+++ b/bootstrap/lib/stdlib/ebin/lists.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/log_mf_h.beam b/bootstrap/lib/stdlib/ebin/log_mf_h.beam
index 7d5ef0e093..58a8d68ed5 100644
--- a/bootstrap/lib/stdlib/ebin/log_mf_h.beam
+++ b/bootstrap/lib/stdlib/ebin/log_mf_h.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/maps.beam b/bootstrap/lib/stdlib/ebin/maps.beam
new file mode 100644
index 0000000000..8473da95d7
--- /dev/null
+++ b/bootstrap/lib/stdlib/ebin/maps.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/ms_transform.beam b/bootstrap/lib/stdlib/ebin/ms_transform.beam
index f532375e3a..55eec2691c 100644
--- a/bootstrap/lib/stdlib/ebin/ms_transform.beam
+++ b/bootstrap/lib/stdlib/ebin/ms_transform.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/orddict.beam b/bootstrap/lib/stdlib/ebin/orddict.beam
index 6892fd2c9e..5fea6d0622 100644
--- a/bootstrap/lib/stdlib/ebin/orddict.beam
+++ b/bootstrap/lib/stdlib/ebin/orddict.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/otp_internal.beam b/bootstrap/lib/stdlib/ebin/otp_internal.beam
index de1c007a77..7c2d60d845 100644
--- a/bootstrap/lib/stdlib/ebin/otp_internal.beam
+++ b/bootstrap/lib/stdlib/ebin/otp_internal.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/pg.beam b/bootstrap/lib/stdlib/ebin/pg.beam
index 65195defbf..31f30461d8 100644
--- a/bootstrap/lib/stdlib/ebin/pg.beam
+++ b/bootstrap/lib/stdlib/ebin/pg.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/pool.beam b/bootstrap/lib/stdlib/ebin/pool.beam
index 8ad59de20d..72934a42d7 100644
--- a/bootstrap/lib/stdlib/ebin/pool.beam
+++ b/bootstrap/lib/stdlib/ebin/pool.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/proc_lib.beam b/bootstrap/lib/stdlib/ebin/proc_lib.beam
index a297dff09c..368d3e39a0 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/proplists.beam b/bootstrap/lib/stdlib/ebin/proplists.beam
index c768955ca7..2640cfe4ae 100644
--- a/bootstrap/lib/stdlib/ebin/proplists.beam
+++ b/bootstrap/lib/stdlib/ebin/proplists.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/qlc.beam b/bootstrap/lib/stdlib/ebin/qlc.beam
index aee8ce61e5..ec3f0d174e 100644
--- a/bootstrap/lib/stdlib/ebin/qlc.beam
+++ b/bootstrap/lib/stdlib/ebin/qlc.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/qlc_pt.beam b/bootstrap/lib/stdlib/ebin/qlc_pt.beam
index 2f1db1d159..6184f0c295 100644
--- a/bootstrap/lib/stdlib/ebin/qlc_pt.beam
+++ b/bootstrap/lib/stdlib/ebin/qlc_pt.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/queue.beam b/bootstrap/lib/stdlib/ebin/queue.beam
index 8907a03b57..b7eab3f8d1 100644
--- a/bootstrap/lib/stdlib/ebin/queue.beam
+++ b/bootstrap/lib/stdlib/ebin/queue.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/re.beam b/bootstrap/lib/stdlib/ebin/re.beam
index 17b5c0bd75..74b369bb0c 100644
--- a/bootstrap/lib/stdlib/ebin/re.beam
+++ b/bootstrap/lib/stdlib/ebin/re.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/sets.beam b/bootstrap/lib/stdlib/ebin/sets.beam
index 74eb720790..d8546de28d 100644
--- a/bootstrap/lib/stdlib/ebin/sets.beam
+++ b/bootstrap/lib/stdlib/ebin/sets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/shell.beam b/bootstrap/lib/stdlib/ebin/shell.beam
index 9ac9a3b167..8c4734f208 100644
--- a/bootstrap/lib/stdlib/ebin/shell.beam
+++ b/bootstrap/lib/stdlib/ebin/shell.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/slave.beam b/bootstrap/lib/stdlib/ebin/slave.beam
index 4f3dfa3716..532c46cd38 100644
--- a/bootstrap/lib/stdlib/ebin/slave.beam
+++ b/bootstrap/lib/stdlib/ebin/slave.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/sofs.beam b/bootstrap/lib/stdlib/ebin/sofs.beam
index b6a3f88679..90d82c23c0 100644
--- a/bootstrap/lib/stdlib/ebin/sofs.beam
+++ b/bootstrap/lib/stdlib/ebin/sofs.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/stdlib.app b/bootstrap/lib/stdlib/ebin/stdlib.app
index 505401a139..e92798b83d 100644
--- a/bootstrap/lib/stdlib/ebin/stdlib.app
+++ b/bootstrap/lib/stdlib/ebin/stdlib.app
@@ -19,7 +19,7 @@
%%
{application, stdlib,
[{description, "ERTS CXC 138 10"},
- {vsn, "1.19.4"},
+ {vsn, "2.3"},
{modules, [array,
base64,
beam_lib,
@@ -71,6 +71,7 @@
lib,
lists,
log_mf_h,
+ maps,
math,
ms_transform,
orddict,
@@ -101,5 +102,8 @@
{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,
dets]},
{applications, [kernel]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["sasl-2.4","kernel-3.0.2","erts-6.2","crypto-3.3",
+ "compiler-5.0"]}
+]}.
diff --git a/bootstrap/lib/stdlib/ebin/stdlib.appup b/bootstrap/lib/stdlib/ebin/stdlib.appup
index 0986bcf6c1..fb2e12f03c 100644
--- a/bootstrap/lib/stdlib/ebin/stdlib.appup
+++ b/bootstrap/lib/stdlib/ebin/stdlib.appup
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,13 +15,13 @@
%% under the License.
%%
%% %CopyrightEnd%
-{"1.19.4",
- %% Up from - max two major revisions back
- [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14
- %% Down to - max two major revisions back
- [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14
+{"2.3",
+ %% Up from - max one major revision back
+ [{<<"2\\.[1-2](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3
+ {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
+ [{<<"2\\.[1-2](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3
+ {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/bootstrap/lib/stdlib/ebin/supervisor.beam b/bootstrap/lib/stdlib/ebin/supervisor.beam
index e68e59dacd..40d9b28a18 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/supervisor_bridge.beam b/bootstrap/lib/stdlib/ebin/supervisor_bridge.beam
index 6480117b9e..54d7385738 100644
--- a/bootstrap/lib/stdlib/ebin/supervisor_bridge.beam
+++ b/bootstrap/lib/stdlib/ebin/supervisor_bridge.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/sys.beam b/bootstrap/lib/stdlib/ebin/sys.beam
index 7e2ba3c19b..1413b822f2 100644
--- a/bootstrap/lib/stdlib/ebin/sys.beam
+++ b/bootstrap/lib/stdlib/ebin/sys.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/timer.beam b/bootstrap/lib/stdlib/ebin/timer.beam
index 4269f1ebec..106d75c18a 100644
--- a/bootstrap/lib/stdlib/ebin/timer.beam
+++ b/bootstrap/lib/stdlib/ebin/timer.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/unicode.beam b/bootstrap/lib/stdlib/ebin/unicode.beam
index 572cb2b6fa..76342ef108 100644
--- a/bootstrap/lib/stdlib/ebin/unicode.beam
+++ b/bootstrap/lib/stdlib/ebin/unicode.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/win32reg.beam b/bootstrap/lib/stdlib/ebin/win32reg.beam
index 6df20f8db7..5d023ecb93 100644
--- a/bootstrap/lib/stdlib/ebin/win32reg.beam
+++ b/bootstrap/lib/stdlib/ebin/win32reg.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/zip.beam b/bootstrap/lib/stdlib/ebin/zip.beam
index 17006f313d..465a8b95a7 100644
--- a/bootstrap/lib/stdlib/ebin/zip.beam
+++ b/bootstrap/lib/stdlib/ebin/zip.beam
Binary files differ
diff --git a/configure.in b/configure.in
index f25a068be9..0e09af4eff 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 1998-2012. All Rights Reserved.
+dnl Copyright Ericsson AB 1998-2014. All Rights Reserved.
dnl
dnl The contents of this file are subject to the Erlang Public License,
dnl Version 1.1, (the "License"); you may not use this file except in
@@ -180,25 +180,36 @@ AC_PROG_LN_S
AC_PROG_RANLIB
#
-# Get erts version and otp release from erts/vsn.mk
+# Get erts version from erts/vsn.mk
#
AC_MSG_CHECKING([ERTS version])
[ERTS_VSN=`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
AC_MSG_RESULT([$ERTS_VSN])
AC_SUBST(ERTS_VSN)
+#
+# Get OTP release and OTP version from $ERL_TOP/OTP_VERSION
+#
AC_MSG_CHECKING([OTP release])
-[OTP_REL=`sed -n "s/^SYSTEM_VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
+[OTP_REL=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`]
AC_MSG_RESULT([$OTP_REL])
AC_SUBST(OTP_REL)
+AC_MSG_CHECKING([OTP version])
+[OTP_VSN=`cat $ERL_TOP/OTP_VERSION`]
+AC_MSG_RESULT([$OTP_VSN])
+AC_SUBST(OTP_VSN)
+
AC_ARG_ENABLE(threads,
AS_HELP_STRING([--enable-threads], [enable async thread support])
AS_HELP_STRING([--disable-threads], [disable async thread support]))
+AC_ARG_ENABLE(dirty-schedulers,
+AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support]))
+
AC_ARG_ENABLE(halfword-emulator,
AS_HELP_STRING([--enable-halfword-emulator],
- [enable halfword emulator (only for 64bit builds)]))
+ [enable halfword emulator (only for 64bit builds). Note: Halfword emulator is marked as deprecated and scheduled for removal in future major release.]))
AC_ARG_ENABLE(smp-support,
AS_HELP_STRING([--enable-smp-support], [enable smp support])
@@ -251,12 +262,24 @@ AS_HELP_STRING([--with-ssl=PATH], [specify location of OpenSSL include and lib])
AS_HELP_STRING([--with-ssl], [use SSL (default)])
AS_HELP_STRING([--without-ssl], [don't use SSL]))
+AC_ARG_WITH(ssl-incl,
+AS_HELP_STRING([--with-ssl-incl=PATH],
+ [location of OpenSSL include dir, if different than specified by --with-ssl=PATH]))
+
+AC_ARG_WITH(ssl-rpath,
+AS_HELP_STRING([--with-ssl-rpath=yes|no|PATHS],
+ [runtime library path for OpenSSL. Default is 'yes', which equates to a
+ number of standard locations. If 'no', then no runtime
+ library paths wil be used. Anything else should be a
+ comma separated list of paths.]))
+
AC_ARG_ENABLE(dynamic-ssl-lib,
AS_HELP_STRING([--disable-dynamic-ssl-lib],
[disable using dynamic openssl libraries]))
-AC_ARG_ENABLE(shared-zlib,
-AS_HELP_STRING([--enable-shared-zlib], [enable using shared zlib library]))
+AC_ARG_ENABLE(builtin-zlib,
+AS_HELP_STRING([--enable-builtin-zlib],
+ [force use of our own built-in zlib]))
dnl This functionality has been lost along the way... :(
dnl It could perhaps be nice to reintroduce some day; therefore,
@@ -354,6 +377,12 @@ elif test X"$TMPSYS" '=' X"Darwin-i386"; then
export LDFLAGS
fi
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]))
+
AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
@@ -363,9 +392,9 @@ AS_HELP_STRING(
[verbose build output (undo: "make V=0")])dnl
])
-DEFAULT_VERBOSITY=1
-if test X${enable_silent_rules} = Xyes; then
- DEFAULT_VERBOSITY=0
+DEFAULT_VERBOSITY=0
+if test X${enable_silent_rules} = Xno; then
+ DEFAULT_VERBOSITY=1
fi
AC_SUBST(DEFAULT_VERBOSITY)
@@ -394,7 +423,7 @@ AC_SUBST(NATIVE_LIBS_ENABLED)
rm -f $ERL_TOP/lib/SKIP-APPLICATIONS
for app in `cd lib && ls -d *`; do
var=`eval echo \\$with_$app`
- if test X${var} == Xno; then
+ if test X${var} = Xno; then
echo "$app" >> $ERL_TOP/lib/SKIP-APPLICATIONS
fi
done
diff --git a/erts/Makefile.in b/erts/Makefile.in
index e3db37d3fd..47298cccba 100644
--- a/erts/Makefile.in
+++ b/erts/Makefile.in
@@ -48,6 +48,7 @@ debug opt clean:
( cd $$d && $(MAKE) $@ FLAVOR=$(FLAVOR) ) || exit $$? ; \
fi ; \
done
+ (cd preloaded/src && $(MAKE) ../ebin/erts.app)
# ----------------------------------------------------------------------
# These are "convenience targets", provided as shortcuts for developers
@@ -135,6 +136,10 @@ release:
( cd $$d && $(MAKE) $@ ) || exit $$? ; \
fi ; \
done
+ ( $(MAKE) -f "$(ERL_TOP)/make/otp_released_app.mk" \
+ APP_PWD="$(ERL_TOP)/erts" APP_VSN=VSN APP=erts \
+ TESTROOT="$(TESTROOT)" update) \
+ || exit $$?
.PHONY: release_docs
release_docs:
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 46b30a16b3..5735cdea5c 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -74,6 +74,21 @@ AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for re
AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
+dnl Cross compilation variables for OSE
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass1, [Linker flags for the OSE module (pass 1) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass2, [Linker flags for the OSE module (pass 2) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_OSEROOT, [OSE installation root directory (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_STRIP, [Strip utility shipped with the OSE distribution(only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_POST_LINK, [OSE postlink tool (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_SET_CONF, [Sets the configuration for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_ELF_SIZE, [Prints the section size information for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_LCF, [OSE load module linker configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_BEAM_LM_CONF, [BEAM OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_EPMD_LM_CONF, [EPMD OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_RUN_ERL_LM_CONF, [run_erl_lm OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_CONFD, [OSE confd source file])
+AC_ARG_VAR(erl_xcomp_ose_CRT0_LM, [OSE crt0 lm source file])
+
])
AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
@@ -231,31 +246,31 @@ lbl1:
return 1;
lbl2:
return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
+],ac_cv_prog_emu_cc="$CC",ac_cv_prog_emu_cc=no)
-if test $ac_cv_prog_emu_cc = no; then
+if test "$ac_cv_prog_emu_cc" = no; then
for ac_progname in emu_cc.sh gcc-4.2 gcc; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
+ if test -f "$ac_dir/$ac_progname"; then
+ ac_cv_prog_emu_cc="$ac_dir/$ac_progname"
break
fi
done
IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
+ if test "$ac_cv_prog_emu_cc" != no; then
break
fi
done
fi
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
+if test "$ac_cv_prog_emu_cc" != no; then
+ save_CC="$CC"
save_CFLAGS=$CFLAGS
save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
+ CC="$ac_cv_prog_emu_cc"
CFLAGS=""
CPPFLAGS=""
AC_TRY_COMPILE([],[
@@ -276,17 +291,17 @@ if test $ac_cv_prog_emu_cc != no; then
return 1;
lbl2:
return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
+ ],ac_cv_prog_emu_cc="$CC",ac_cv_prog_emu_cc=no)
CC=$save_CC
CFLAGS=$save_CFLAGS
CPPFLAGS=$save_CPPFLAGS
fi
])
-if test $ac_cv_prog_emu_cc = no; then
+if test "$ac_cv_prog_emu_cc" = no; then
AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
+ EMU_CC="$CC"
else
- EMU_CC=$ac_cv_prog_emu_cc
+ EMU_CC="$ac_cv_prog_emu_cc"
fi
AC_SUBST(EMU_CC)
])
@@ -488,6 +503,8 @@ AC_CACHE_VAL(ac_cv_sys_ipv6_support,
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -500,6 +517,8 @@ else
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -728,6 +747,12 @@ if test "X$host_os" = "Xwin32"; then
THR_LIBS=
THR_LIB_NAME=win32_threads
THR_LIB_TYPE=win32_threads
+elif test "X$host_os" = "Xose"; then
+ AC_MSG_RESULT(yes)
+ THR_DEFS="-DOSE_THREADS"
+ THR_LIBS=
+ THR_LIB_NAME=ose_threads
+ THR_LIB_TYPE=ose_threads
else
AC_MSG_RESULT(no)
THR_DEFS=
@@ -1078,9 +1103,22 @@ case "$THR_LIB_NAME" in
test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
;;
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ pthread|ose_threads)
+ case "$THR_LIB_NAME" in
+ pthread)
+ ETHR_THR_LIB_BASE_DIR=pthread
+ AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ ;;
+ ose_threads)
+ AC_DEFINE(ETHR_OSE_THREADS, 1,
+ [Define if you have OSE style threads])
+ ETHR_THR_LIB_BASE_DIR=ose
+ AC_CHECK_HEADER(ose_spi/ose_spi.h,
+ AC_DEFINE(HAVE_OSE_SPI_H, 1,
+ [Define if you have the "ose_spi/ose_spi.h" header file.]))
+ ;;
+ esac
+ if test "x$THR_LIB_NAME" = "xpthread"; then
case $host_os in
openbsd*)
# The default stack size is insufficient for our needs
@@ -1139,6 +1177,7 @@ case "$THR_LIB_NAME" in
*) ;;
esac
+ fi
dnl We sometimes need ETHR_DEFS in order to find certain headers
dnl (at least for pthread.h on osf1).
saved_cppflags="$CPPFLAGS"
@@ -1151,7 +1190,6 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for headers
dnl
-
AC_CHECK_HEADER(pthread.h, \
AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
[Define if you have the <pthread.h> header file.]))
@@ -1184,7 +1222,7 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for functions
dnl
-
+ if test "x$THR_LIB_NAME" = "xpthread"; then
AC_CHECK_FUNC(pthread_spin_lock, \
[ethr_have_native_spinlock=yes \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
@@ -1311,6 +1349,8 @@ case "$THR_LIB_NAME" in
AC_MSG_RESULT([$linux_futex])
test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
+ fi
+
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
@@ -1381,9 +1421,31 @@ case "$THR_LIB_NAME" in
int z;
AO_nop_full();
+#if defined(AO_HAVE_store)
AO_store(&x, (AO_t) 0);
+#elif defined(AO_HAVE_store_release)
+ AO_store_release(&x, (AO_t) 0);
+#else
+#error No store
+#endif
+#if defined(AO_HAVE_load)
z = AO_load(&x);
+#elif defined(AO_HAVE_load_acquire)
+ z = AO_load_acquire(&x);
+#else
+#error No load
+#endif
+#if defined(AO_HAVE_compare_and_swap_full)
z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
+#elif defined(AO_HAVE_compare_and_swap_release)
+ z = AO_compare_and_swap_release(&x, (AO_t) 0, (AO_t) 1);
+#elif defined(AO_HAVE_compare_and_swap_acquire)
+ z = AO_compare_and_swap_acquire(&x, (AO_t) 0, (AO_t) 1);
+#elif defined(AO_HAVE_compare_and_swap)
+ z = AO_compare_and_swap(&x, (AO_t) 0, (AO_t) 1);
+#else
+#error No compare_and_swap
+#endif
],
[ethr_have_native_atomics=yes
ethr_have_libatomic_ops=yes])
diff --git a/erts/autoconf/vxworks/sed.general b/erts/autoconf/vxworks/sed.general
index dbb9420b67..efa4e99054 100644
--- a/erts/autoconf/vxworks/sed.general
+++ b/erts/autoconf/vxworks/sed.general
@@ -57,6 +57,7 @@ s|@ETHR_LIB_NAME@||
s|@ETHR_DEFS@||
s|@ETHR_THR_LIB_BASE@||
s|@ETHR_THR_LIB_BASE_DIR@||
+s|@SYSTEMD_DAEMON_LIBS@||
s|@EMU_THR_DEFS@||
s|@EMU_THR_LIBS@||
s|@EMU_THR_LIB_NAME@|ethread|
diff --git a/erts/configure.in b/erts/configure.in
index bad748d8fe..b3fe48d62c 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*-
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 1997-2013. All Rights Reserved.
+dnl Copyright Ericsson AB 1997-2014. All Rights Reserved.
dnl
dnl The contents of this file are subject to the Erlang Public License,
dnl Version 1.1, (the "License"); you may not use this file except in
@@ -101,7 +101,7 @@ ERL_XCOMP_SYSROOT_INIT
AC_ISC_POSIX
-AC_CONFIG_HEADER($host/config.h:config.h.in include/internal/$host/ethread_header_config.h:include/internal/ethread_header_config.h.in include/$host/erl_int_sizes_config.h:include/erl_int_sizes_config.h.in)
+AC_CONFIG_HEADER($host/config.h:config.h.in include/internal/$host/ethread_header_config.h:include/internal/ethread_header_config.h.in include/$host/erl_int_sizes_config.h:include/erl_int_sizes_config.h.in include/$host/erl_native_features_config.h:include/erl_native_features_config.h.in)
dnl ----------------------------------------------------------------------
dnl Optional features.
dnl ----------------------------------------------------------------------
@@ -123,6 +123,7 @@ AS_HELP_STRING([--enable-bootstrap-only],
with_ssl_zlib=no
enable_hipe=no
enable_sctp=no
+ enable_dirty_schedulers=no
fi
])
@@ -134,9 +135,16 @@ AS_HELP_STRING([--disable-threads], [disable async thread support]),
*) enable_threads=yes ;;
esac ], enable_threads=unknown)
+AC_ARG_ENABLE(dirty-schedulers,
+AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support]),
+[ case "$enableval" in
+ no) enable_dirty_schedulers=no ;;
+ *) enable_dirty_schedulers=yes ;;
+ esac ], enable_dirty_schedulers=no)
+
AC_ARG_ENABLE(halfword-emulator,
AS_HELP_STRING([--enable-halfword-emulator],
- [enable halfword emulator (only for 64bit builds)]),
+ [enable halfword emulator (only for 64bit builds). Note: Halfword emulator is marked as deprecated and scheduled for removal in future major release.]),
[ case "$enableval" in
no) enable_halfword_emualtor=no ;;
*) enable_halfword_emulator=yes ;;
@@ -206,9 +214,6 @@ AC_ARG_ENABLE(native-libs,
AS_HELP_STRING([--enable-native-libs],
[compile Erlang libraries to native code]))
-AC_ARG_ENABLE(tsp,
-AS_HELP_STRING([--enable-tsp], [compile tsp app]))
-
AC_ARG_ENABLE(fp-exceptions,
AS_HELP_STRING([--enable-fp-exceptions],
[use hardware floating point exceptions (default if hipe enabled)]),
@@ -339,6 +344,30 @@ AS_HELP_STRING([--enable-clock-gettime],
*) clock_gettime_correction=yes ;;
esac ], clock_gettime_correction=unknown)
+AC_ARG_WITH(assumed-cache-line-size,
+AS_HELP_STRING([--with-assumed-cache-line-size=SIZE],
+ [specify assumed cache line size in bytes (valid values are powers of two between and including 16 and 8192; default is 64)]))
+
+dnl Require the assumed cache-line size to be a power of two between 16 and 8192
+case "$with_assumed_cache_line_size" in
+ ""|no|yes)
+ with_assumed_cache_line_size=64;;
+ 16|32|64|128|256|512|1024|2048|4096|8192)
+ ;;
+ *)
+ AC_MSG_ERROR([Invalid assumed cache-line size of $with_assumed_cache_line_size bytes])
+ ;;
+esac
+
+AC_DEFINE_UNQUOTED(ASSUMED_CACHE_LINE_SIZE,
+ $with_assumed_cache_line_size,
+ [Assumed cache-line size (in bytes)])
+
+AC_ARG_ENABLE(systemd,
+AS_HELP_STRING([--enable-systemd], [enable systemd support in epmd]),
+[],
+[enable_systemd=no])
+
dnl Magic test for clearcase.
OTP_RELEASE=
if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then
@@ -349,6 +378,16 @@ else
fi
AC_SUBST(OTP_RELEASE)
+AC_MSG_CHECKING([OTP release])
+[SYSTEM_VSN=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`]
+AC_MSG_RESULT([$SYSTEM_VSN])
+AC_SUBST(SYSTEM_VSN)
+
+AC_MSG_CHECKING([OTP version])
+[OTP_VERSION=`cat $ERL_TOP/OTP_VERSION`]
+AC_MSG_RESULT([$OTP_VERSION])
+AC_SUBST(OTP_VERSION)
+
dnl OK, we might have darwin switches off different kinds, lets
dnl check it all before continuing.
TMPSYS=`uname -s`-`uname -m`
@@ -406,6 +445,28 @@ else
fi
fi
+AC_ARG_ENABLE(static-nifs,
+AS_HELP_STRING([--enable-static-nifs], [link nifs statically. If yes then all nifs in all Erlang/OTP applications will be statically linked into the main binary. It is also possible to give a list of nifs that should be linked statically. The list should be a comma separated and contain the absolute path to a .a archive for each nif that is to be statically linked. The name of the .a archive has to be the same as the name of the nif. Note that you have to link any external dependencies that the nifs have to the main binary, so for the crypto nif you want to pass LIBS=-lcrypto to configure.]),
+ STATIC_NIFS="$enableval",
+ STATIC_NIFS=no)
+AC_SUBST(STATIC_NIFS)
+
+AC_ARG_ENABLE(static-drivers,
+AS_HELP_STRING([--enable-static-drivers], [comma separated list of linked-in drivers to link statically with the main binary. The list should contain the absolute path to a .a archive for each driver that is to be statically linked. The name of the .a archive has to be the same as the name of the driver.]),
+ STATIC_DRIVERS="$enableval",
+ STATIC_DRIVERS=no)
+AC_SUBST(STATIC_DRIVERS)
+
+AC_ARG_WITH(ets-write-concurrency-locks,
+AS_HELP_STRING([--with-ets-write-concurrency-locks={8|16|32|64|128|256}],
+ [specify how many locks the write_concurrency option for ets should use.])
+AS_HELP_STRING([--without-ets-write-concurrency-locks],
+ [use the default number of write_concurrency locks (default)]))
+
+if test X"$with_ets_write_concurrency_locks" != X""; then
+ AC_DEFINE_UNQUOTED(ERTS_DB_HASH_LOCK_CNT,$with_ets_write_concurrency_locks,
+ [Define to override the default number of write_concurrency locks])
+fi
dnl ----------------------------------------------------------------------
dnl Checks for programs.
@@ -444,7 +505,7 @@ dnl
extra_flags="-I${ERL_TOP}/erts/$host $OTP_EXTRA_FLAGS"
CFLAGS="$CFLAGS $extra_flags"
-DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags"
+DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags $DEBUG_CFLAGS"
DEBUG_FLAGS=-g
dnl
@@ -612,6 +673,7 @@ case $chk_arch_ in
x86_64) ARCH=amd64;;
amd64) ARCH=amd64;;
macppc) ARCH=ppc;;
+ powerpc) ARCH=ppc;;
ppc) ARCH=ppc;;
ppc64) ARCH=ppc64;;
"Power Macintosh") ARCH=ppc;;
@@ -619,8 +681,10 @@ case $chk_arch_ in
armv5teb) ARCH=arm;;
armv5tel) ARCH=arm;;
armv5tejl) ARCH=arm;;
- armv6l) ARCH=arm;;
+ armv6l) ARCH=arm;;
+ armv6hl) ARCH=arm;;
armv7l) ARCH=arm;;
+ armv7hl) ARCH=arm;;
tile) ARCH=tile;;
*) ARCH=noarch;;
esac
@@ -757,6 +821,16 @@ if test "$enable_halfword_emulator" = "yes"; then
[Define if building a halfword-heap 64bit emulator])
ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS halfword"
AC_MSG_RESULT([yes])
+
+ test -f "$ERL_TOP/erts/CONF_INFO" ||
+ echo "" > "$ERL_TOP/erts/CONF_INFO"
+ cat >> $ERL_TOP/erts/CONF_INFO <<EOF
+
+ The HALFWORD emulator has been enabled.
+ This is a DEPRECATED feature scheduled for removal
+ in a future major release.
+
+EOF
else
AC_MSG_ERROR(no; halfword emulator not supported on this architecture)
fi
@@ -886,7 +960,10 @@ dnl what the user say. This might not be the right way to do it, but
dnl for now that is the way we do it.
USER_LD=$LD
USER_LDFLAGS="$LDFLAGS"
-LD='$(CC)'
+case $host in
+ *ose) ;;
+ *) LD='$(CC)' ;;
+esac
AC_SUBST(LD)
LDFLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
@@ -897,12 +974,15 @@ dnl AC_CYGWIN is deprecated
AC_EXEEXT
AC_OBJEXT
-dnl This is the os flavour, should be unix, vxworks or win32
-if test "X$host" = "Xwin32"; then
- ERLANG_OSTYPE=win32
-else
- ERLANG_OSTYPE=unix
-fi
+dnl This is the os flavour, should be unix, ose, vxworks or win32
+case $host in
+ win32)
+ ERLANG_OSTYPE=win32 ;;
+ *ose)
+ ERLANG_OSTYPE=ose ;;
+ *)
+ ERLANG_OSTYPE=unix ;;
+esac
AC_SUBST(ERLANG_OSTYPE)
@@ -1086,7 +1166,7 @@ fi
AC_SUBST(ERTS_BUILD_SMP_EMU)
-AC_CHECK_FUNCS([posix_fadvise])
+AC_CHECK_FUNCS([posix_fadvise closefrom])
AC_CHECK_HEADERS([linux/falloc.h])
dnl * Old glibcs have broken fallocate64(). Make sure not to use it.
AC_CACHE_CHECK([whether fallocate() works],i_cv_fallocate_works,[
@@ -1187,7 +1267,7 @@ case "$enable_threads"-"$found_threads" in
AC_MSG_RESULT(yes; enabled by user) ;;
unknown-yes)
case $host_os in
- solaris*|linux*|darwin*|win32)
+ solaris*|linux*|darwin*|win32|ose)
emu_threads=yes
AC_MSG_RESULT(yes; default on this platform)
;;
@@ -1211,6 +1291,14 @@ esac
if test $emu_threads != yes; then
enable_lock_check=no
enable_lock_count=no
+ AC_MSG_CHECKING(whether dirty schedulers should be enabled)
+ if test "x$enable_dirty_schedulers" != "xno"; then
+ AC_DEFINE(ERL_NIF_DIRTY_SCHEDULER_SUPPORT, 1, [Dirty scheduler support])
+ AC_DEFINE(ERL_DRV_DIRTY_SCHEDULER_SUPPORT, 1, [Dirty scheduler support])
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
else
# Threads enabled for emulator
EMU_THR_LIB_NAME=$ETHR_LIB_NAME
@@ -1229,7 +1317,18 @@ else
if test "x$enable_lock_count" != "xno"; then
EMU_THR_DEFS="$EMU_THR_DEFS -DERTS_ENABLE_LOCK_COUNT"
fi
-
+
+ AC_MSG_CHECKING(whether dirty schedulers should be enabled)
+ if test "x$enable_dirty_schedulers" != "xno"; then
+ EMU_THR_DEFS="$EMU_THR_DEFS -DERTS_DIRTY_SCHEDULERS"
+ AC_DEFINE(ERTS_DIRTY_SCHEDULERS, 1, [Define if the emulator supports dirty schedulers])
+ AC_DEFINE(ERL_NIF_DIRTY_SCHEDULER_SUPPORT, 1, [Dirty scheduler support])
+ AC_DEFINE(ERL_DRV_DIRTY_SCHEDULER_SUPPORT, 1, [Dirty scheduler support])
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+
disable_child_waiter_thread=no
case $host_os in
solaris*)
@@ -1250,7 +1349,7 @@ else
enable_child_waiter_thread=no
fi
;;
- win32)
+ win32|ose)
# Child waiter thread cannot be enabled
disable_child_waiter_thread=yes
enable_child_waiter_thread=no
@@ -1325,7 +1424,7 @@ TERMCAP_LIB=
if test "x$with_termcap" != "xno" &&
test "X$host" != "Xwin32"; then
# try these libs
- termcap_libs="ncurses curses termcap termlib"
+ termcap_libs="tinfo ncurses curses termcap termlib"
for termcap_lib in $termcap_libs; do
AC_CHECK_LIB($termcap_lib, tgetent, TERMCAP_LIB="-l$termcap_lib")
@@ -1361,24 +1460,44 @@ dnl -------------
dnl zlib
dnl -------------
-AC_ARG_ENABLE(shared-zlib,
-AS_HELP_STRING([--enable-shared-zlib], [enable using shared zlib library]),
-[ case "$enableval" in
- no) enable_shared_zlib=no ;;
- *) enable_shared_zlib=yes ;;
- esac ], enable_shared_zlib=no)
+AC_ARG_ENABLE(builtin-zlib,
+ AS_HELP_STRING([--enable-builtin-zlib],
+ [force use of our own built-in zlib]),
+ [ case "$enableval" in
+ no) enable_builtin_zlib=no ;;
+ *) enable_builtin_zlib=yes ;;
+ esac ], enable_builtin_zlib=no)
Z_LIB=
-if test "x$enable_shared_zlib" = "xyes" ; then
- AC_CHECK_LIB(z, adler32_combine,
- [Z_LIB="-lz"
- AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if you have the `z' library (-lz).])],
- [AC_MSG_ERROR([cannot find any shared zlib])])
+if test "x$enable_builtin_zlib" = "xyes"; then
+ AC_MSG_NOTICE([Using our own built-in zlib source])
else
- AC_MSG_NOTICE([Using own zlib source])
+AC_MSG_CHECKING(for zlib 1.2.5 or higher)
+zlib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include "zlib.h"
+]],[[
+#if ZLIB_VERNUM >= 0x1250
+ Bytef s[1];
+ s[0] = 0;
+ (void) adler32((uLong)0, s, 1);
+#else
+#error "No zlib 1.2.5 or higher found"
+error
+#endif
+]])],
+[
+ Z_LIB="-lz"
+ AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if you have the `z' library (-lz).])
+ AC_MSG_RESULT(yes)
+],[
+ AC_MSG_RESULT(no)
+])
+LIBS=$zlib_save_LIBS
fi
-
AC_SUBST(Z_LIB)
dnl
@@ -1564,6 +1683,33 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_enaddr], [], [],
])
dnl ----------------------------------------------------------------------
+dnl Check the availability of systemd
+dnl ----------------------------------------------------------------------
+if test x"$enable_systemd" != x"no"; then
+
+systemd_daemon_save_LIBS=$LIBS
+LIBS=
+AC_SEARCH_LIBS(sd_listen_fds,[systemd systemd-daemon],
+ [have_sd_listen_fds=yes],[have_sd_listen_fds=no],$systemd_daemon_save_LIBS)
+AC_SEARCH_LIBS(sd_notify,[systemd systemd-daemon],
+ [have_sd_notify=yes],[have_sd_notify=no],$systemd_daemon_save_LIBS)
+AC_CHECK_HEADERS(systemd/sd-daemon.h,
+ [have_systemd_sd_daemon_h=yes],[have_systemd_sd_daemon_h=no])
+
+if test x"$have_sd_listen_fds" = x"yes" && \
+ test x"$have_sd_notify" = x"yes" && \
+ test x"$have_systemd_sd_daemon_h" = x"yes"; then
+ AC_DEFINE([HAVE_SYSTEMD_DAEMON],[1],[Define if you have systemd daemon])
+ SYSTEMD_DAEMON_LIBS=$LIBS
+elif test x"$enable_systemd" = x"yes"; then
+ AC_MSG_FAILURE([--enable-systemd was given, but test for systemd failed])
+fi
+LIBS=$systemd_daemon_save_LIBS
+fi
+AC_SUBST(SYSTEMD_DAEMON_LIBS)
+
+
+dnl ----------------------------------------------------------------------
dnl Check the availability for libdlpi
dnl ----------------------------------------------------------------------
AC_CHECK_LIB(dlpi, dlpi_open)
@@ -1638,7 +1784,7 @@ if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then
AC_CHECK_DECLS([SCTP_UNORDERED, SCTP_ADDR_OVER, SCTP_ABORT,
SCTP_EOF, SCTP_SENDALL, SCTP_ADDR_CONFIRMED,
SCTP_DELAYED_ACK_TIME,
- SCTP_EMPTY,
+ SCTP_EMPTY, SCTP_UNCONFIRMED,
SCTP_CLOSED, SCTPS_IDLE,
SCTP_BOUND, SCTPS_BOUND,
SCTP_LISTEN, SCTPS_LISTEN,
@@ -1962,10 +2108,21 @@ AC_CHECK_FUNCS([getipnodebyname getipnodebyaddr gethostbyname2])
AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \
pread pwrite memmove strerror strerror_r strncasecmp \
gethrtime localtime_r gmtime_r inet_pton \
- mmap mremap memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \
+ memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \
flockfile fstat strlcpy strlcat setsid posix2time time2posix \
setlocale nl_langinfo poll mlockall])
+AC_MSG_CHECKING([for isfinite])
+AC_TRY_LINK([#include <math.h>],
+ [isfinite(0);], have_isfinite=yes, have_isfinite=no),
+
+if test $have_isfinite = yes; then
+ AC_DEFINE(HAVE_ISFINITE,[1],
+ [Define to 1 if you have the `isfinite' function.])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
case X$erl_xcomp_posix_memalign in
Xno) ;;
@@ -2003,6 +2160,17 @@ case $host_os in
AC_CHECK_FUNCS([writev]) ;;
esac
+case $host_os in
+ *ose)
+ AC_MSG_CHECKING([for mmap])
+ AC_MSG_RESULT(not using for OSE)
+ AC_MSG_CHECKING([for mremap])
+ AC_MSG_RESULT(not using for OSE) ;;
+ *)
+ AC_CHECK_FUNCS([mmap mremap]) ;;
+esac
+
+
AC_CHECK_DECLS([posix2time, time2posix],,,[#include <time.h>])
disable_vfork=false
@@ -2711,6 +2879,9 @@ esac
if test X${enable_fp_exceptions} = Xauto ; then
case $host_os in
+ *linux*)
+ enable_fp_exceptions=no
+ AC_MSG_NOTICE([Floating point exceptions disabled by default on Linux]) ;;
darwin*)
enable_fp_exceptions=no
AC_MSG_NOTICE([Floating point exceptions disabled by default on MacOS X]) ;;
@@ -3300,16 +3471,6 @@ dnl (using the --disable, --enable and --with switches).
dnl ----------------------------------------------------------------------
#
-# Check if we should compile TSP app
-#
-
-TSP_APP=
-if test X${enable_tsp} = Xyes; then
- TSP_APP=tsp
-fi
-AC_SUBST(TSP_APP)
-
-#
# Check if we should enable HiPE.
#
@@ -3616,6 +3777,7 @@ fi
DED_EMU_THR_DEFS=$EMU_THR_DEFS
DED_CFLAGS="$CFLAGS $CPPFLAGS"
if test "x$GCC" = xyes; then
+ DED_STATIC_CFLAGS="$DED_CFLAGS"
DED_CFLAGS="$DED_CFLAGS -fPIC"
fi
@@ -3623,11 +3785,14 @@ DED_EXT=so
case $host_os in
win32) DED_EXT=dll;;
darwin*)
- DED_CFLAGS="$DED_CFLAGS -fno-common";;
+ DED_CFLAGS="$DED_CFLAGS -fno-common"
+ DED_STATIC_CFLAGS="$DED_STATIC_CFLAGS -fno-common";;
*)
;;
esac
+DED_STATIC_CFLAGS="$DED_STATIC_CFLAGS -DSTATIC_ERLANG_NIF -DSTATIC_ERLANG_DRIVER"
+
# If DED_LD is set in environment, we expect all DED_LD* variables
# to be specified (cross compiling)
if test "x$DED_LD" = "x"; then
@@ -3737,6 +3902,7 @@ fi
AC_SUBST(DED_EXT)
AC_SUBST(DED_SYS_INCLUDE)
AC_SUBST(DED_CFLAGS)
+AC_SUBST(DED_STATIC_CFLAGS)
AC_SUBST(DED_LD)
AC_SUBST(DED_LDFLAGS)
AC_SUBST(DED_LD_FLAG_RUNTIME_LIBRARY_PATH)
@@ -3787,21 +3953,28 @@ esac
if test "$enable_dtrace_test" = "yes" ; then
if test "$DTRACE" = "dtrace" ; then
AC_CHECK_HEADERS(sys/sdt.h)
+ AC_MSG_CHECKING([for 1-stage DTrace precompilation])
# The OS X version of dtrace prints a spurious line here.
if ! dtrace -h $DTRACE_CPP -Iemulator/beam -o ./foo-dtrace.h -s emulator/beam/erlang_dtrace.d; then
AC_MSG_ERROR([Could not precompile erlang_dtrace.d: dtrace -h failed])
fi
- rm -f foo-dtrace.h
+ AC_MSG_RESULT([yes])
- $RM -f $DTRACE_2STEP_TEST
- if dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d 2> /dev/null && \
- test -f $DTRACE_2STEP_TEST ; then
- rm $DTRACE_2STEP_TEST
+ AC_MSG_CHECKING([for 2-stage DTrace precompilation])
+ AC_TRY_COMPILE([ #include "foo-dtrace.h" ],
+ [ERLANG_DIST_PORT_BUSY_ENABLED();],
+ [$RM -f $DTRACE_2STEP_TEST
+ dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d conftest.$OBJEXT 2>&AS_MESSAGE_LOG_FD
+ if test -f $DTRACE_2STEP_TEST; then
+ rm $DTRACE_2STEP_TEST
DTRACE_ENABLED_2STEP=yes
- AC_MSG_NOTICE([dtrace precompilation for 2-stage DTrace successful])
- else
- AC_MSG_NOTICE([dtrace precompilation for 1-stage DTrace successful])
- fi
+ fi],
+ [])
+ $RM -f foo-dtrace.h
+ AS_IF([test "x$DTRACE_ENABLED_2STEP" = "xyes"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+
DTRACE_ENABLED=yes
case $OPSYS in
linux)
@@ -3830,7 +4003,7 @@ dnl If set to --with-ssl=PATH we use that path as the prefix, i.e. we
dnl use "PATH/include" and "PATH/lib".
AC_SUBST(SSL_INCLUDE)
-AC_SUBST(SSL_ROOT)
+AC_SUBST(SSL_INCDIR)
AC_SUBST(SSL_LIBDIR)
AC_SUBST(SSL_CRYPTO_LIBNAME)
AC_SUBST(SSL_SSL_LIBNAME)
@@ -3843,7 +4016,7 @@ AC_SUBST(STATIC_KERBEROS_LIBS)
AC_SUBST(SSL_LINK_WITH_ZLIB)
AC_SUBST(STATIC_ZLIB_LIBS)
-std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
+std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /"
AC_ARG_WITH(ssl-zlib,
AS_HELP_STRING([--with-ssl-zlib=PATH],
@@ -3924,6 +4097,29 @@ AS_HELP_STRING([--with-ssl=PATH], [specify location of OpenSSL include and lib])
AS_HELP_STRING([--with-ssl], [use SSL (default)])
AS_HELP_STRING([--without-ssl], [don't use SSL]))
+AC_ARG_WITH(ssl-incl,
+AS_HELP_STRING([--with-ssl-incl=PATH], [location of OpenSSL include dir, if different than specified by --with-ssl=PATH]),
+[
+case X$with_ssl in
+ X | Xyes | Xno) AC_MSG_ERROR([--with-ssl-incl=PATH set without --with-ssl=PATH]);;
+esac
+],
+[with_ssl_incl=$with_ssl]) #default
+
+AC_ARG_WITH(ssl-rpath,
+AS_HELP_STRING([--with-ssl-rpath=yes|no|PATHS],
+ [runtime library path for OpenSSL. Default is "yes", which equates to a
+ number of standard locations. If "no", then no runtime
+ library paths wil be used. Anything else should be a
+ comma separated list of paths.]),
+[
+case X$with_ssl in
+ Xno) AC_MSG_ERROR([--with-ssl-rpath set without --with-ssl]);;
+esac
+],
+[with_ssl_rpath=yes]) #default
+
+
AC_ARG_ENABLE(dynamic-ssl-lib,
AS_HELP_STRING([--disable-dynamic-ssl-lib],
[disable using dynamic openssl libraries]),
@@ -3950,6 +4146,7 @@ for a in ssl crypto ssh; do
done
SSL_DYNAMIC_ONLY=$enable_dynamic_ssl
+SSL_STATIC_ONLY=no
case "$erl_xcomp_without_sysroot-$with_ssl" in
yes-* | no-no)
@@ -4037,7 +4234,7 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
dir="$erl_xcomp_sysroot$rdir"
if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then
is_real_ssl=yes
- SSL_ROOT="$dir"
+ SSL_INCDIR="$dir"
if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
if test -f "$dir/lib/VC/libeay32.lib"; then
SSL_RUNTIME_LIBDIR="$rdir/lib/VC"
@@ -4069,6 +4266,10 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
else
is_real_ssl=no
fi
+ elif test -f "$dir/lib/powerpc/libsslcrypto.a"; then
+ SSL_CRYPTO_LIBNAME=sslcrypto
+ SSL_LIBDIR="$dir/lib/powerpc/"
+ SSL_RUNTIME_LIBDIR="$rdir/lib/powerpc/"
else
if test "x$ac_cv_sizeof_void_p" = "x8"; then
if test -f "$dir/lib64/libcrypto.a"; then
@@ -4092,8 +4293,10 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
SSL_LIBDIR="$dir/lib"
fi
fi
- if test '!' -f $SSL_LIBDIR/libcrypto.a; then
+ if test '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.a"; then
SSL_DYNAMIC_ONLY=yes
+ elif test '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.so" -a '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.dylib"; then
+ SSL_STATIC_ONLY=yes
fi
SSL_BINDIR="$rdir/bin"
if test "x$is_real_ssl" = "xyes" ; then
@@ -4115,13 +4318,20 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
if test "x$ssl_found" = "xyes"; then
if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
ssl_linkable=yes
+ elif test "x${SSL_CRYPTO_LIBNAME}" = "xsslcrypto"; then
+ # This should only be triggered seen OSE
+ ssl_linkable=yes
else
saveCFLAGS="$CFLAGS"
saveLDFLAGS="$LDFLAGS"
saveLIBS="$LIBS"
CFLAGS="$CFLAGS $SSL_INCLUDE"
- LDFLAGS="$LDFLAGS -L$SSL_LIBDIR"
- LIBS="-lcrypto"
+ if test "x$SSL_STATIC_ONLY" = "xyes"; then
+ LIBS="${SSL_LIBDIR}/lib${SSL_CRYPTO_LIBNAME}.a"
+ else
+ LDFLAGS="$LDFLAGS -L$SSL_LIBDIR"
+ LIBS="$LIBS -l${SSL_CRYPTO_LIBNAME}"
+ fi
AC_TRY_LINK([
#include <stdio.h>
#include <openssl/hmac.h>],
@@ -4154,8 +4364,8 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
# Trust OpenBSD to have everything the in the correct locations.
ssl_found=yes
ssl_linkable=yes
- SSL_ROOT="$erl_xcomp_sysroot/usr"
- AC_MSG_RESULT([$SSL_ROOT])
+ SSL_INCDIR="$erl_xcomp_sysroot/usr"
+ AC_MSG_RESULT([$SSL_INCDIR])
SSL_RUNTIME_LIB="/usr/lib"
SSL_LIB="$erl_xcomp_sysroot/usr/lib"
SSL_BINDIR="/usr/sbin"
@@ -4222,7 +4432,10 @@ dnl so it is - be adoptable
if test ! -d "$with_ssl" ; then
AC_MSG_ERROR(Invalid path to option --with-ssl=PATH)
fi
- SSL_ROOT="$with_ssl"
+ if test ! -d "$with_ssl_incl" ; then
+ AC_MSG_ERROR(Invalid path to option --with-ssl-incl=PATH)
+ fi
+ SSL_INCDIR="$with_ssl_incl"
SSL_CRYPTO_LIBNAME=crypto
SSL_SSL_LIBNAME=ssl
if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes" && test -d "$with_ssl/lib/VC"; then
@@ -4249,6 +4462,9 @@ dnl so it is - be adoptable
# This probably wont work, but that's what the user said, so...
SSL_LIBDIR="$with_ssl/lib"
fi
+ elif test -f "$dir/lib/powerpc/libsslcrypto.a"; then
+ SSL_CRYPTO_LIBNAME=sslcrypto
+ SSL_LIBDIR="$with_ssl/lib/powerpc/"
elif test "x$ac_cv_sizeof_void_p" = "x8"; then
if test -f "$with_ssl/lib64/libcrypto.a"; then
SSL_LIBDIR="$with_ssl/lib64"
@@ -4264,15 +4480,17 @@ dnl so it is - be adoptable
else
SSL_LIBDIR="$with_ssl/lib"
fi
- if test '!' -f $SSL_LIBDIR/libcrypto.a; then
+ if test '!' -f "${SSL_LIBDIR}/lib${SSL_CRYPTO_LIBNAME}.a"; then
SSL_DYNAMIC_ONLY=yes
+ elif test '!' -f ${SSL_LIBDIR}/lib${SSL_CRYPTO_LIBNAME}.so -a '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.dylib"; then
+ SSL_STATIC_ONLY=yes
fi
- SSL_INCLUDE="-I$with_ssl/include"
+ SSL_INCLUDE="-I$with_ssl_incl/include"
SSL_APP=ssl
CRYPTO_APP=crypto
SSH_APP=ssh
if test "$cross_compiling" = "yes"; then
- SSL_RUNTIME_LIBDIR=`echo "$SSL_LIBDIR" | sed -n "s|^$erl_xcomp_sysroot\(.*\)\$|\1|p"`
+ SSL_RUNTIME_LIBDIR=`echo "$SSL_LIBDIR" | sed -n "s|^$erl_xcomp_sysroot\(/*\)\(.*\)\$|/\2|p"`
else
SSL_RUNTIME_LIBDIR="$SSL_LIBDIR"
fi
@@ -4330,8 +4548,8 @@ if test "x$SSL_APP" != "x" ; then
SSL_KRB5_INCLUDE=
if test "x$ssl_krb5_enabled" = "xyes" ; then
AC_MSG_CHECKING(for krb5.h in standard locations)
- for dir in $extra_dir "$SSL_ROOT/include" "$SSL_ROOT/include/openssl" \
- "$SSL_ROOT/include/kerberos" \
+ for dir in $extra_dir "$SSL_INCDIR/include" "$SSL_INCDIR/include/openssl" \
+ "$SSL_INCDIR/include/kerberos" \
"$erl_xcomp_isysroot/cygdrive/c/kerberos/include" \
"$erl_xcomp_isysroot/usr/local/kerberos/include" \
"$erl_xcomp_isysroot/usr/kerberos/include" \
@@ -4367,7 +4585,12 @@ cc_rflg="$CFLAG_RUNTIME_LIBRARY_PATH"
ld_rflg="$LDFLAG_RUNTIME_LIBRARY_PATH"
ded_ld_rflg="$DED_LD_FLAG_RUNTIME_LIBRARY_PATH"
-if test "$SSL_APP" != "" && test "$SSL_DYNAMIC_ONLY" = "yes" && \
+
+case "$with_ssl_rpath" in
+
+yes) # Use standard lib locations for ssl runtime library path
+
+ if test "$SSL_APP" != "" && test "$SSL_DYNAMIC_ONLY" = "yes" && \
{ test "$cc_rflg" != "" || test "$ld_rflg" != "" || test "$ded_ld_rflg" != ""; } ; then
AC_MSG_CHECKING(for ssl runtime library path to use)
@@ -4451,7 +4674,25 @@ if test "$SSL_APP" != "" && test "$SSL_DYNAMIC_ONLY" = "yes" && \
AC_MSG_RESULT([$rpath])
test "$rpath" != "" || AC_MSG_WARN([Cannot set run path during linking])
-fi
+ fi
+ ;;
+
+no) # Use no ssl runtime library path
+ SSL_DED_LD_RUNTIME_LIBRARY_PATH=
+ ;;
+
+*) # Use ssl runtime library paths set by --with-ssl-rpath (without any check)
+ ded_ld_rpath=
+ delimit=
+ for dir in `echo $with_ssl_rpath | sed "s/,/ /g"`; do
+ ded_ld_rpath="$ded_ld_rpath$delimit$ded_ld_rflg$dir"
+ delimit=" "
+ done
+ SSL_DED_LD_RUNTIME_LIBRARY_PATH="$ded_ld_rpath"
+ ;;
+
+esac
+
#--------------------------------------------------------------------
# Os mon stuff.
@@ -4628,7 +4869,7 @@ AH_BOTTOM([
#define HAVE_GETHRVTIME
#endif
-#ifndef HAVE_FINITE
+#if !defined(HAVE_ISFINITE) && !defined(HAVE_FINITE)
# if defined(HAVE_ISINF) && defined(HAVE_ISNAN)
# define USE_ISINF_ISNAN
# endif
@@ -4644,6 +4885,26 @@ if test "x$GCC" = xyes; then
fi
dnl ----------------------------------------------------------------------
+dnl Enable -fsanitize= flags.
+dnl ----------------------------------------------------------------------
+
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(
+ sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]),
+[
+case "$enableval" in
+ no) sanitizers= ;;
+ yes) sanitizers="-fsanitize=DEFAULT_SANITIZERS" ;;
+ *) sanitizers="-fsanitize=$enableval" ;;
+esac
+CFLAGS="$CFLAGS $sanitizers"
+LDFLAGS="$LDFLAGS $sanitizers"
+])
+
+dnl ----------------------------------------------------------------------
dnl Output the result.
dnl ----------------------------------------------------------------------
@@ -4659,6 +4920,7 @@ AC_OUTPUT(
Makefile:Makefile.in
../make/$host/otp.mk:../make/otp.mk.in
../make/$host/otp_ded.mk:../make/otp_ded.mk.in
+ ../make/$host/ose_lm.mk:../make/ose_lm.mk.in
dnl
dnl The ones below should be moved to their respective lib
dnl
diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile
index 89d7c85a86..e8b856c3ff 100644
--- a/erts/doc/src/Makefile
+++ b/erts/doc/src/Makefile
@@ -78,6 +78,7 @@ XML_CHAPTER_FILES = \
erl_ext_dist.xml \
erl_dist_protocol.xml \
communication.xml \
+ time_correction.xml \
notes.xml \
notes_history.xml
@@ -138,7 +139,7 @@ man: $(MAN1_FILES) $(MAN3_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-$(INFO_FILE): $(INFO_FILE_SRC) ../../vsn.mk
+$(INFO_FILE): $(INFO_FILE_SRC) $(ERL_TOP)/make/$(TARGET)/otp.mk
sed -e 's;%RELEASE%;$(SYSTEM_VSN);' $(INFO_FILE_SRC) > $(INFO_FILE)
diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml
index e512c19e05..835a4fc692 100644
--- a/erts/doc/src/absform.xml
+++ b/erts/doc/src/absform.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -217,6 +217,14 @@
Rep(E) = <c><![CDATA[{record_index,LINE,Name,Rep(Field)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0#Name.Field]]></c>, then
Rep(E) = <c><![CDATA[{record_field,LINE,Rep(E_0),Name,Rep(Field)}]]></c>.</item>
+ <item>If E is <c><![CDATA[#{W_1, ..., W_k}]]></c> where each
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,[Rep(W_1), ..., Rep(W_k)]}]]></c>. For Rep(W), see
+ below.</item>
+ <item>If E is <c><![CDATA[E_0#{W_1, ..., W_k}]]></c> where
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,Rep(E_0),[Rep(W_1), ..., Rep(W_k)]}]]></c>. For
+ Rep(W), see below.</item>
<item>If E is <c><![CDATA[catch E_0]]></c>, then
Rep(E) = <c><![CDATA[{'catch',LINE,Rep(E_0)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0(E_1, ..., E_k)]]></c>, then
@@ -290,6 +298,18 @@
<item>If E is <c><![CDATA[fun Fc_1 ; ... ; Fc_k end]]></c>
where each <c><![CDATA[Fc_i]]></c> is a function clause then Rep(E) =
<c><![CDATA[{'fun',LINE,{clauses,[Rep(Fc_1), ..., Rep(Fc_k)]}}]]></c>.</item>
+ <item>If E is <c><![CDATA[fun Name Fc_1 ; ... ; Name Fc_k end]]></c>
+ where <c><![CDATA[Name]]></c> is a variable and each
+ <c><![CDATA[Fc_i]]></c> is a function clause then Rep(E) =
+ <c><![CDATA[{named_fun,LINE,Name,[Rep(Fc_1), ..., Rep(Fc_k)]}]]></c>.
+ </item>
+ <item>If E is <c><![CDATA[query [E_0 || W_1, ..., W_k] end]]></c>,
+ where each <c><![CDATA[W_i]]></c> is a generator or a filter, then
+ Rep(E) = <c><![CDATA[{'query',LINE,{lc,LINE,Rep(E_0),[Rep(W_1), ..., Rep(W_k)]}}]]></c>.
+ For Rep(W), see below.</item>
+ <item>If E is <c><![CDATA[E_0.Field]]></c>, a Mnesia record access
+ inside a query, then
+ Rep(E) = <c><![CDATA[{record_field,LINE,Rep(E_0),Rep(Field)}]]></c>.</item>
<item>If E is <c><![CDATA[( E_0 )]]></c>, then
Rep(E) = <c><![CDATA[Rep(E_0)]]></c>,
i.e., parenthesized expressions cannot be distinguished from their bodies.</item>
@@ -322,6 +342,21 @@
is an integer, Rep(TS) = <c><![CDATA[{A, Value}]]></c>.</item>
</list>
</section>
+
+ <section>
+ <title>Map assoc and exact fields</title>
+ <p>When W is an assoc or exact field (in the body of a map), then:</p>
+ <list type="bulleted">
+ <item>If W is an assoc field <c><![CDATA[K => V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_assoc,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ <item>If W is an exact field <c><![CDATA[K := V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_exact,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ </list>
+ </section>
</section>
<section>
diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml
index 038950b54d..e4912576f7 100644
--- a/erts/doc/src/alt_dist.xml
+++ b/erts/doc/src/alt_dist.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/book.xml b/erts/doc/src/book.xml
index 00a2888685..dc02edc5c6 100644
--- a/erts/doc/src/book.xml
+++ b/erts/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/communication.xml b/erts/doc/src/communication.xml
index 61a9b0e716..02040c9edb 100644
--- a/erts/doc/src/communication.xml
+++ b/erts/doc/src/communication.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml
index 8f5515baca..2b5fc877c3 100644
--- a/erts/doc/src/crash_dump.xml
+++ b/erts/doc/src/crash_dump.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -85,20 +85,22 @@
operating system.</p>
<list type="bulleted">
<item>"<em>&lt;A&gt;</em>: Cannot allocate <em>&lt;N&gt;</em>
- bytes of memory (of type "<em>&lt;T&gt;</em>")." - The system
- has run out of memory. &lt;A&gt; is the allocator that failed
- to allocate memory, &lt;N&gt; is the number of bytes that
- &lt;A&gt; tried to allocate, and &lt;T&gt; is the memory block
- type that the memory was needed for. The most common case is
- that a process stores huge amounts of data. In this case
- &lt;T&gt; is most often <c><![CDATA[heap]]></c>, <c><![CDATA[old_heap]]></c>,
- <c><![CDATA[heap_frag]]></c>, or <c><![CDATA[binary]]></c>. For more information on
- allocators see
- <seealso marker="erts_alloc">erts_alloc(3)</seealso>.</item>
+ bytes of memory (of type "<em>&lt;T&gt;</em>", thread
+ <em>&lt;I&gt;</em>em>)." - The system has run out of memory. &lt;A&gt;
+ is the allocator that failed to allocate memory, &lt;N&gt; is the
+ number of bytes that &lt;A&gt; tried to allocate, &lt;T&gt; is the
+ memory block type that the memory was needed for, and &lt;I&gt; is the
+ thread identifier. The most common case is that a process stores huge
+ amounts of data. In this case &lt;T&gt; is most often
+ <c><![CDATA[heap]]></c>, <c><![CDATA[old_heap]]></c>,
+ <c><![CDATA[heap_frag]]></c>, or <c><![CDATA[binary]]></c>.
+ For more information on allocators see
+ <seealso marker="erts_alloc">erts_alloc(3)</seealso>.</item>
<item>"<em>&lt;A&gt;</em>: Cannot reallocate <em>&lt;N&gt;</em>
- bytes of memory (of type "<em>&lt;T&gt;</em>")." - Same as
- above with the exception that memory was being reallocated
- instead of being allocated when the system ran out of memory.</item>
+ bytes of memory (of type "<em>&lt;T&gt;</em>", thread
+ <em>&lt;I&gt;</em>em>)." - Same as above with the exception that memory
+ was being reallocated instead of being allocated when the system ran
+ out of memory.</item>
<item>"Unexpected op code <em>N</em>" - Error in compiled
code, <c><![CDATA[beam]]></c> file damaged or error in the compiler.</item>
<item>"Module <em>Name</em> undefined" <c><![CDATA[|]]></c> "Function
@@ -113,8 +115,9 @@
sockets/pipes can be used simultaneously by Erlang (due to
limitations in the Unix <c><![CDATA[select]]></c> call). The number of
open regular files is not affected by this.</item>
- <item>"Received SIGUSR1" - The SIGUSR1 signal was sent to the
- Erlang machine (Unix only).</item>
+ <item>"Received SIGUSR1" - Sending the SIGUSR1 signal to a
+ Erlang machine (Unix only) forces a crash dump. This slogan reflects
+ that the Erlang machine crash-dumped due to receiving that signal.</item>
<item>"Kernel pid terminated (<em>Who</em>)
(<em>Exit-reason</em>)" - The kernel supervisor has detected
a failure, usually that the <c><![CDATA[application_controller]]></c>
@@ -246,6 +249,9 @@
<tag><em>Last scheduled in for | Current call</em></tag>
<item>The current function of the process. These fields will not
always exist.</item>
+ <tag><em>Run queue</em></tag>
+ <item>The identifier of the scheduler run queue in which the process is
+ running.</item>
<tag><em>Spawned by</em></tag>
<item>The parent of the process, i.e. the process which executed
<c><![CDATA[spawn]]></c> or <c><![CDATA[spawn_link]]></c>.</item>
diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml
index 52283879c7..616703fdef 100644
--- a/erts/doc/src/driver.xml
+++ b/erts/doc/src/driver.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml
index c37138e7b1..b34ca136f3 100644
--- a/erts/doc/src/driver_entry.xml
+++ b/erts/doc/src/driver_entry.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2001</year><year>2012</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -110,6 +110,8 @@
<p>When the driver has passed the <c>driver_entry</c> over to
the emulator, the driver is <em>not</em> allowed to modify the
<c>driver_entry</c>.</p>
+ <p>If compiling a driver for static inclusion via --enable-static-drivers you
+ have to define STATIC_ERLANG_DRIVER before the DRIVER_INIT declaration.</p>
<note>
<p>Do <em>not</em> declare the <c>driver_entry</c> <c>const</c>. This since the emulator needs to
modify the <c>handle</c>, and the <c>handle2</c>
@@ -243,10 +245,14 @@ typedef struct erl_drv_entry {
something that the <c>WaitForMultipleObjects</c> API
function understands). (Some trickery in the emulator allows
more than the built-in limit of 64 <c>Events</c> to be used.)</p>
+ <p>On Enea OSE the <c>event</c> is one or more signals that can
+ be retrieved using <seealso marker="ose:ose_erl_driver#erl_drv_ose_get_signal">erl_drv_ose_get_signal</seealso>.</p>
<p>To use this with threads and asynchronous routines, create a
- pipe on unix and an Event on Windows. When the routine
+ pipe on unix, an Event on Windows or a unique signal number on
+ Enea OSE. When the routine
completes, write to the pipe (use <c>SetEvent</c> on
- Windows), this will make the emulator call
+ Windows or send a message to the emulator process on Enea OSE),
+ this will make the emulator call
<c>ready_input</c> or <c>ready_output</c>.</p>
<p>Spurious events may happen. That is, calls to <c>ready_input</c>
or <c>ready_output</c> even though no real events are signaled. In
diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml
index 3e7005410f..25f819ab50 100644
--- a/erts/doc/src/epmd.xml
+++ b/erts/doc/src/epmd.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -58,12 +58,12 @@
of the IP address and a port number. The name of the node is
an atom on the form of <c><![CDATA[Name@Node]]></c>.
The job of the <c><![CDATA[epmd]]></c> daemon is to keep track of which
- node name listens on which address. Hence, <c><![CDATA[epmd]]></c> map
+ node name listens on which address. Hence, <c><![CDATA[epmd]]></c> maps
symbolic node names to machine addresses.</p>
<p>The TCP/IP <c>epmd</c> daemon actually only keeps track of
- the <c>Name</c> (first) part of an Erlang node name, the <c>Host</c>
- part (whatever is after the <c><![CDATA[@]]></c> is implicit in the
+ the <c>Name</c> (first) part of an Erlang node name. The <c>Host</c>
+ part (whatever is after the <c><![CDATA[@]]></c>) is implicit in the
node name where the <c>epmd</c> daemon was actually contacted,
as is the IP address where the Erlang node can be
reached. Consistent and correct TCP naming services are
@@ -77,12 +77,12 @@
<p>The daemon is started automatically by the <c>erl</c>
command if the node is to be distributed and there is no
running instance present. If automatically launched,
- environment variables has to be used to alter the behavior of
+ environment variables have to be used to alter the behavior of
the daemon. See the <seealso
marker="#environment_variables">Environment
variables</seealso> section below.</p>
- <p>If the -daemon argument is not given, the
+ <p>If the -daemon argument is not given,
<c><![CDATA[epmd]]></c> runs as a normal program with the
controlling terminal of the shell in which it is
started. Normally, it should run as a daemon.</p>
@@ -122,7 +122,7 @@
comma-separated list of IP addresses and on the loopback address
(which is implicitly added to the list if it has not been
specified). This can also be set using the
- <c><![CDATA[ERL_EPMD_ADDRESS]]></c> environment variable, see the
+ <c><![CDATA[ERL_EPMD_ADDRESS]]></c> environment variable. See the
section <seealso marker="#environment_variables">Environment
variables</seealso> below.</p>
</item>
@@ -130,7 +130,7 @@
<item>
<p>Let this instance of epmd listen to another TCP port than
default 4369. This can also be set using the
- <c><![CDATA[ERL_EPMD_PORT]]></c> environment variable, see the
+ <c><![CDATA[ERL_EPMD_PORT]]></c> environment variable. See the
section <seealso marker="#environment_variables">Environment
variables</seealso> below</p>
</item>
@@ -153,7 +153,7 @@
<p>With relaxed command checking, the <c>epmd</c> daemon can be killed from the localhost with i.e. <c>epmd -kill</c> even if there are active nodes registered. Normally only daemons with an empty node database can be killed with the <c>epmd -kill</c> command.</p>
</item>
<item>
- <p>The <c>epmd -stop</c> command (and the corresponding messages to epmd, as can be given using <c>erl_interface/ei</c>) is normally always ignored, as it opens up for strange situation when two nodes of the same name can be alive at the same time. A node unregisters itself by just closing the connection to epmd, why the <c>stop</c> command was only intended for use in debugging situations.</p>
+ <p>The <c>epmd -stop</c> command (and the corresponding messages to epmd, as can be given using <c>erl_interface/ei</c>) is normally always ignored, as it opens up the possibility of a strange situation where two nodes of the same name can be alive at the same time. A node unregisters itself by just closing the connection to epmd, which is why the <c>stop</c> command was only intended for use in debugging situations.</p>
<p>With relaxed command checking enabled, you can forcibly unregister live nodes.</p>
</item>
</list>
@@ -166,7 +166,7 @@
<section>
<marker id="debug_flags"></marker>
<title>DbgExtra options</title>
- <p>These options are purely for debugging and testing epmd clients, they should not be used in normal operation.</p>
+ <p>These options are purely for debugging and testing epmd clients. They should not be used in normal operation.</p>
<taglist>
<tag><c><![CDATA[-packet_timeout Seconds]]></c></tag>
@@ -177,9 +177,9 @@
</item>
<tag><c><![CDATA[-delay_accept Seconds]]></c></tag>
<item>
- <p>To simulate a busy server you can insert a delay between epmd
- gets notified about that a new connection is requested and
- when the connections gets accepted.</p>
+ <p>To simulate a busy server you can insert a delay between when epmd
+ gets notified that a new connection is requested and
+ when the connection gets accepted.</p>
</item>
<tag><c><![CDATA[-delay_write Seconds]]></c></tag>
<item>
@@ -191,15 +191,15 @@
<section>
<marker id="interactive_flags"></marker>
<title>Interactive options</title>
- <p>These options make <c>epmd</c> run as an interactive command displaying the results of sending queries ta an already running instance of <c>epmd</c>. The epmd contacted is always on the local node, but the <c>-port</c> option can be used to select between instances if several are running using different port on the host.</p>
+ <p>These options make <c>epmd</c> run as an interactive command, displaying the results of sending queries to an already running instance of <c>epmd</c>. The epmd contacted is always on the local node, but the <c>-port</c> option can be used to select between instances if several are running using different ports on the host.</p>
<taglist>
<tag><c><![CDATA[-port No]]></c></tag>
<item>
<p>Contacts the <c>epmd</c> listening on the given TCP port number
(default 4369). This can also be set using the
- <c><![CDATA[ERL_EPMD_PORT]]></c> environment variable, see the
+ <c><![CDATA[ERL_EPMD_PORT]]></c> environment variable. See the
section <seealso marker="#environment_variables">Environment
- variables</seealso> below</p>
+ variables</seealso> below.</p>
</item>
<tag><c><![CDATA[-names]]></c></tag>
<item>
@@ -210,7 +210,7 @@
<p>Kill the currently running <c>epmd</c>.</p>
<p>Killing the running <c>epmd</c> is only allowed if <c>epmd
- -names</c> show an empty database or
+ -names</c> shows an empty database or
<c>-relaxed_command_check</c> was given when the running
instance of <c>epmd</c> was started. Note that
<c>-relaxed_command_check</c> is given when starting the
@@ -228,7 +228,7 @@
<p>This command can only be used when contacting <c>epmd</c>
instances started with the <c>-relaxed_command_check</c>
flag. Note that relaxed command checking has to be enabled for
- the <c>epmd</c> daemon contacted, When running epmd
+ the <c>epmd</c> daemon contacted. When running epmd
interactively,
<c>-relaxed_command_check</c> has no effect.</p>
</item>
@@ -259,7 +259,7 @@
<item>
<p>If set prior to start, the <c>epmd</c> daemon will behave
as if the <c>-relaxed_command_check</c> option was given at
- start-up. If consequently setting this option before starting
+ start-up. Consequently, if this option is set before starting
the Erlang virtual machine, the automatically started
<c>epmd</c> will accept the <c>-kill</c> and <c>-stop</c>
commands without restrictions.</p>
@@ -287,8 +287,8 @@
remote hosts. However, only the query commands are answered (and
acted upon) if the query comes from a remote host. It is always an
error to try to register a nodename if the client is not a process
- located on the same host as the <c>epmd</c> instance is running on,
- why such requests are considered hostile and the connection is
+ located on the same host as the <c>epmd</c> instance is running on-
+ such requests are considered hostile and the connection is
immediately closed.</p>
<p>The queries accepted from remote nodes are:</p>
@@ -307,3 +307,4 @@
</comref>
+
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 528a2d95aa..f08467bfc6 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
@@ -495,7 +495,7 @@
<c><![CDATA[werl]]></c>, not <c><![CDATA[erl]]></c> (<c><![CDATA[oldshell]]></c>). Note also that
<c><![CDATA[Ctrl-Break]]></c> is used instead of <c><![CDATA[Ctrl-C]]></c> on Windows.</p>
</item>
- <tag><c><![CDATA[+c]]></c></tag>
+ <tag><marker id="+c"><c><![CDATA[+c]]></c></marker></tag>
<item>
<p>Disable compensation for sudden changes of system time.</p>
<p>Normally, <c><![CDATA[erlang:now/0]]></c> will not immediately reflect
@@ -510,6 +510,9 @@
reflect the current system time. Note that timers are based
on <c><![CDATA[erlang:now/0]]></c>. If the system time jumps, timers
then time out at the wrong time.</p>
+ <p><em>NOTE</em>: You can check whether the adjustment is enabled or
+ disabled by calling
+ <seealso marker="erlang#system_info_tolerant_timeofday">erlang:system_info(tolerant_timeofday)</seealso>.</p>
</item>
<tag><c><![CDATA[+d]]></c></tag>
<item>
@@ -522,7 +525,8 @@
core dump and no crash dump if an internal error is detected.</p>
<p>Calling <c>erlang:halt/1</c> with a string argument will still
- produce a crash dump.</p>
+ produce a crash dump. On Unix systems, sending an emulator process
+ a SIGUSR1 signal will also force a crash dump.</p>
</item>
<tag><marker id="+e"><c><![CDATA[+e Number]]></c></marker></tag>
<item>
@@ -535,12 +539,15 @@
</item>
<tag><marker id="file_name_encoding"></marker><c><![CDATA[+fnl]]></c></tag>
<item>
- <p>The VM works with file names as if they are encoded using the ISO-latin-1 encoding, disallowing Unicode characters with codepoints beyond 255. This is default on operating systems that have transparent file naming, i.e. all Unixes except MacOSX.</p>
- <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names.</p>
+ <p>The VM works with file names as if they are encoded using the ISO-latin-1 encoding, disallowing Unicode characters with codepoints beyond 255.</p>
+ <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names. Note that this value also applies to command-line parameters and environment variables (see <seealso marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">STDLIB User's Guide</seealso>).</p>
</item>
<tag><c><![CDATA[+fnu[{w|i|e}]]]></c></tag>
<item>
- <p>The VM works with file names as if they are encoded using UTF-8 (or some other system specific Unicode encoding). This is the default on operating systems that enforce Unicode encoding, i.e. Windows and MacOSX.</p>
+ <p>The VM works with file names as if they are encoded using
+ UTF-8 (or some other system specific Unicode encoding). This
+ is the default on operating systems that enforce Unicode
+ encoding, i.e. Windows and MacOS X.</p>
<p>The <c>+fnu</c> switch can be followed by <c>w</c>,
<c>i</c>, or <c>e</c> to control the way wrongly encoded file
names are to be reported. <c>w</c> means that a warning is
@@ -552,11 +559,16 @@
encountered. <c>w</c> is the default. Note that
<c>file:read_link/1</c> will always return an error if the
link points to an invalid file name.</p>
- <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names.</p>
+ <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names. Note that this value also applies to command-line parameters and environment variables (see <seealso marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">STDLIB User's Guide</seealso>).</p>
</item>
<tag><c><![CDATA[+fna[{w|i|e}]]]></c></tag>
<item>
- <p>Selection between <c>+fnl</c> and <c>+fnu</c> is done based on the current locale settings in the OS, meaning that if you have set your terminal for UTF-8 encoding, the filesystem is expected to use the same encoding for file names (use with care).</p>
+ <p>Selection between <c>+fnl</c> and <c>+fnu</c> is done based
+ on the current locale settings in the OS, meaning that if you
+ have set your terminal for UTF-8 encoding, the filesystem is
+ expected to use the same encoding for file names. This is
+ default on all operating systems except MacOS X and
+ Windows.</p>
<p>The <c>+fna</c> switch can be followed by <c>w</c>,
<c>i</c>, or <c>e</c>. This will have effect if the locale
settings cause the behavior of <c>+fnu</c> to be selected.
@@ -564,7 +576,7 @@
settings cause the behavior of <c>+fnl</c> to be selected,
then <c>w</c>, <c>i</c>, or <c>e</c> will not have any
effect.</p>
- <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names.</p>
+ <p>See <seealso marker="stdlib:unicode_usage#unicode_file_names">STDLIB User's Guide</seealso> for more infomation about unicode file names. Note that this value also applies to command-line parameters and environment variables (see <seealso marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">STDLIB User's Guide</seealso>).</p>
</item>
<tag><c><![CDATA[+hms Size]]></c></tag>
<item>
@@ -576,6 +588,11 @@
<p>Sets the default binary virtual heap size of processes to the size
<c><![CDATA[Size]]></c>.</p>
</item>
+ <tag><c><![CDATA[+hpds Size]]></c></tag>
+ <item>
+ <p>Sets the initial process dictionary size of processes to the size
+ <c><![CDATA[Size]]></c>.</p>
+ </item>
<tag><c><![CDATA[+K true | false]]></c></tag>
<item>
<p>Enables or disables the kernel poll functionality if
@@ -792,6 +809,67 @@
SMP support enabled (see the <seealso marker="#smp">-smp</seealso>
flag).</p>
</item>
+ <tag><marker id="+SDcpu"><c><![CDATA[+SDcpu DirtyCPUSchedulers:DirtyCPUSchedulersOnline]]></c></marker></tag>
+ <item>
+ <p>Sets the number of dirty CPU scheduler threads to create and dirty
+ CPU scheduler threads to set online when threading support has been
+ enabled. The maximum for both values is 1024, and each value is further
+ limited by the settings for normal schedulers: the number of dirty CPU
+ scheduler threads created cannot exceed the number of normal scheduler
+ threads created, and the number of dirty CPU scheduler threads online
+ cannot exceed the number of normal scheduler threads online (see the
+ <seealso marker="#+S">+S</seealso> and <seealso marker="#+SP">+SP</seealso>
+ flags for more details). By default, the number of dirty CPU scheduler
+ threads created equals the number of normal scheduler threads created,
+ and the number of dirty CPU scheduler threads online equals the number
+ of normal scheduler threads online. <c>DirtyCPUSchedulers</c> may be
+ omitted if <c>:DirtyCPUSchedulersOnline</c> is not and vice versa. The
+ number of dirty CPU schedulers online can be changed at run time via
+ <seealso marker="erlang#system_flag_dirty_cpu_schedulers_online">erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline)</seealso>.
+ </p>
+ <p>This option is ignored if the emulator doesn't have threading support
+ enabled. Currently, <em>this option is experimental</em> and is supported only
+ if the emulator was configured and built with support for dirty schedulers
+ enabled (it's disabled by default).
+ </p>
+ </item>
+ <tag><marker id="+SDPcpu"><c><![CDATA[+SDPcpu DirtyCPUSchedulersPercentage:DirtyCPUSchedulersOnlinePercentage]]></c></marker></tag>
+ <item>
+ <p>Similar to <seealso marker="#+SDcpu">+SDcpu</seealso> but uses percentages to set the
+ number of dirty CPU scheduler threads to create and number of dirty CPU scheduler threads
+ to set online when threading support has been enabled. Specified values must be greater
+ than 0. For example, <c>+SDPcpu 50:25</c> sets the number of dirty CPU scheduler threads
+ to 50% of the logical processors configured and the number of dirty CPU scheduler threads
+ online to 25% of the logical processors available. <c>DirtyCPUSchedulersPercentage</c> may
+ be omitted if <c>:DirtyCPUSchedulersOnlinePercentage</c> is not and vice versa. The
+ number of dirty CPU schedulers online can be changed at run time via
+ <seealso marker="erlang#system_flag_dirty_cpu_schedulers_online">erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline)</seealso>.
+ </p>
+ <p>This option interacts with <seealso marker="#+SDcpu">+SDcpu</seealso> settings.
+ For example, on a system with 8 logical cores configured and 8 logical cores available,
+ the combination of the options <c>+SDcpu 4:4 +SDPcpu 50:25</c> (in either order) results
+ in 2 dirty CPU scheduler threads (50% of 4) and 1 dirty CPU scheduler thread online (25% of 4).
+ </p>
+ <p>This option is ignored if the emulator doesn't have threading support
+ enabled. Currently, <em>this option is experimental</em> and is supported only
+ if the emulator was configured and built with support for dirty schedulers
+ enabled (it's disabled by default).
+ </p>
+ </item>
+ <tag><marker id="+SDio"><c><![CDATA[+SDio IOSchedulers]]></c></marker></tag>
+ <item>
+ <p>Sets the number of dirty I/O scheduler threads to create when threading
+ support has been enabled. The valid range is 0-1024. By default, the number
+ of dirty I/O scheduler threads created is 10, same as the default number of
+ threads in the <seealso marker="#async_thread_pool_size">async thread pool
+ </seealso>.
+ </p>
+ <p>This option is ignored if the emulator doesn't have threading support
+ enabled. Currently, <em>this option is experimental</em> and is supported only
+ if the emulator was configured and built with support for dirty schedulers
+ enabled (it's disabled by default).
+ </p>
+ </item>
<tag><c><![CDATA[+sFlag Value]]></c></tag>
<item>
<p>Scheduling specific flags.</p>
@@ -941,6 +1019,10 @@
when schedulers frequently run out of work. When disabled,
the frequency with which schedulers run out of work will
not be taken into account by the load balancing logic.
+ <br/>&nbsp;&nbsp;<c>+scl false</c> is similar to
+ <seealso marker="#+sub">+sub true</seealso> with the difference
+ that <c>+sub true</c> also will balance scheduler utilization
+ between schedulers.
</p>
</item>
<tag><marker id="+sct"><c>+sct CpuTopology</c></marker></tag>
@@ -1065,6 +1147,23 @@
<p>For more information, see
<seealso marker="erlang#system_info_cpu_topology">erlang:system_info(cpu_topology)</seealso>.</p>
</item>
+ <tag><marker id="+secio"><c>+secio true|false</c></marker></tag>
+ <item>
+ <p>Enable or disable eager check I/O scheduling. The default
+ is currently <c>false</c>, but will most likely be changed
+ to <c>true</c> in OTP 18. The behaviour before this flag
+ was introduced corresponds to <c>+secio false</c>.</p>
+ <p>The flag effects when schedulers will check for I/O
+ operations possible to execute, and when such I/O operations
+ will execute. As the name of the parameter implies,
+ schedulers will be more eager to check for I/O when
+ <c>true</c> is passed. This however also implies that
+ execution of outstanding I/O operation will not be
+ prioritized to the same extent as when <c>false</c> is
+ passed.</p>
+ <p><seealso marker="erlang#system_info_eager_check_io"><c>erlang:system_info(eager_check_io)</c></seealso>
+ returns the value of this parameter used when starting the VM.</p>
+ </item>
<tag><marker id="+sfwi"><c>+sfwi Interval</c></marker></tag>
<item>
<p>Set scheduler forced wakeup interval. All run queues will
@@ -1087,7 +1186,30 @@
documentation of the <seealso marker="#+sbt">+sbt</seealso> flag.
</p>
</item>
- <tag><marker id="+swct"><c>+sws very_eager|eager|medium|lazy|very_lazy</c></marker></tag>
+ <tag><marker id="+sub"><c>+sub true|false</c></marker></tag>
+ <item>
+ <p>Enable or disable
+ <seealso marker="erts:erlang#statistics_scheduler_wall_time">scheduler
+ utilization</seealso> balancing of load. By default scheduler
+ utilization balancing is disabled and instead scheduler
+ compaction of load is enabled which will strive for a load
+ distribution which causes as many scheduler threads as possible
+ to be fully loaded (i.e., not run out of work). When scheduler
+ utilization balancing is enabled the system will instead try to
+ balance scheduler utilization between schedulers. That is,
+ strive for equal scheduler utilization on all schedulers.
+ <br/>&nbsp;&nbsp;&nbsp;<c>+sub true</c> is only supported on
+ systems where the runtime system detects and use a monotonically
+ increasing high resolution clock. On other systems, the runtime
+ system will fail to start.
+ <br/>&nbsp;&nbsp;&nbsp;<c>+sub true</c> implies
+ <seealso marker="#+scl">+scl false</seealso>. The difference
+ between <c>+sub true</c> and <c>+scl false</c> is that
+ <c>+scl false</c> will not try to balance the scheduler
+ utilization.
+ </p>
+ </item>
+ <tag><marker id="+swct"><c>+swct very_eager|eager|medium|lazy|very_lazy</c></marker></tag>
<item>
<p>
Set scheduler wake cleanup threshold. Default is <c>medium</c>.
@@ -1126,18 +1248,18 @@
<tag><marker id="+spp"><c>+spp Bool</c></marker></tag>
<item>
<p>Set default scheduler hint for port parallelism. If set to
- <c>true</c>, the VM will schedule port tasks when it by this can
- improve the parallelism in the system. If set to <c>false</c>,
- the VM will try to perform port tasks immediately and by this
- improve latency at the expense of parallelism. If this
- flag has not been passed, the default scheduler hint for port
- parallelism is currently <c>false</c>. The default used can be
- inspected in runtime by calling
- <seealso marker="erlang#system_info_port_parallelism">erlang:system_info(port_parallelism)</seealso>.
+ <c>true</c>, the VM will schedule port tasks when doing so will
+ improve parallelism in the system. If set to <c>false</c>, the VM
+ will try to perform port tasks immediately, improving latency at the
+ expense of parallelism. If this flag has not been passed, the
+ default scheduler hint for port parallelism is currently
+ <c>false</c>. The default used can be inspected in runtime by
+ calling <seealso
+ marker="erlang#system_info_port_parallelism">erlang:system_info(port_parallelism)</seealso>.
The default can be overriden on port creation by passing the
<seealso marker="erlang#open_port_parallelism">parallelism</seealso>
- option to
- <seealso marker="erlang#open_port/2">open_port/2</seealso></p>.
+ option to <seealso
+ marker="erlang#open_port/2">open_port/2</seealso></p>.
</item>
<tag><marker id="sched_thread_stack_size"><c><![CDATA[+sss size]]></c></marker></tag>
<item>
diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml
index 84f4be208d..890293d802 100644
--- a/erts/doc/src/erl_dist_protocol.xml
+++ b/erts/doc/src/erl_dist_protocol.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index c055d1ca9e..77fc906aca 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2001</year><year>2013</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -315,10 +315,13 @@
<c>ERL_DRV_EXTENDED_MINOR_VERSION</c> will be incremented when
new features are added. The runtime system uses the minor version
of the driver to determine what features to use.
- The runtime system will refuse to load a driver if the major
+ The runtime system will normally refuse to load a driver if the major
versions differ, or if the major versions are equal and the
minor version used by the driver is greater than the one used
- by the runtime system.</p>
+ by the runtime system. Old drivers with lower major versions
+ will however be allowed after a bump of the major version during
+ a transition period of two major releases. Such old drivers might
+ however fail if deprecated features are used.</p>
<p>The emulator will refuse to load a driver that does not use
the extended driver interface,
to allow for 64-bit capable drivers,
@@ -543,6 +546,7 @@ typedef struct ErlDrvSysInfo {
int scheduler_threads;
int nif_major_version;
int nif_minor_version;
+ int dirty_scheduler_support;
} ErlDrvSysInfo;
</code>
@@ -607,6 +611,10 @@ typedef struct ErlDrvSysInfo {
<tag><c>nif_minor_version</c></tag>
<item>The value of <c>ERL_NIF_MINOR_VERSION</c> when the runtime system was compiled.
</item>
+ <tag><c>dirty_scheduler_support</c></tag>
+ <item>A value <c>!= 0</c> if the runtime system has support for dirty scheduler threads;
+ otherwise <c>0</c>.
+ </item>
</taglist>
</item>
<tag><marker id="ErlDrvBinary"/>ErlDrvBinary</tag>
@@ -745,7 +753,7 @@ typedef struct ErlIOVec {
created and decrement it once when the port associated with
the lock terminates. The emulator will also increment the
reference count when an async job is enqueued and decrement
- it after an async job has been invoked, or canceled. Besides
+ it after an async job has been invoked. Besides
this, it is the responsibility of the driver to ensure that
the reference count does not reach zero before the last use
of the lock by the driver has been made. The reference count
@@ -1035,7 +1043,9 @@ typedef struct ErlIOVec {
<c>select</c>/<c>poll</c> can use).
On windows, the Win32 API function <c>WaitForMultipleObjects</c>
is used. This places other restrictions on the event object.
- Refer to the Win32 SDK documentation.</p>
+ Refer to the Win32 SDK documentation.
+ On Enea OSE, the receive function is used. See the <seealso
+ marker="ose:ose_erl_driver"></seealso> for more details.</p>
<p>The <c>on</c> parameter should be <c>1</c> for setting events
and <c>0</c> for clearing them.</p>
<p>The <c>mode</c> argument is a bitwise-or combination of
@@ -1047,7 +1057,7 @@ typedef struct ErlIOVec {
<seealso marker="driver_entry#ready_output">ready_output</seealso>.
</p>
<note>
- <p>Some OS (Windows) do not differentiate between read and write events.
+ <p>Some OS (Windows and Enea OSE) do not differentiate between read and write events.
The call-back for a fired event then only depends on the value of <c>mode</c>.</p>
</note>
<p><c>ERL_DRV_USE</c> specifies if we are using the event object or if we want to close it.
@@ -1742,15 +1752,19 @@ typedef struct ErlIOVec {
term consists of one to four elements in the array. The
term first has a term type, and then arguments. The
<c>port</c> parameter specifies the sending port.</p>
- <p>Tuple and lists (with the exception of strings, see below),
+ <p>Tuples, maps and lists (with the exception of strings, see below),
are built in reverse polish notation, so that to build a
tuple, the elements are given first, and then the tuple
- term, with a count. Likewise for lists.</p>
+ term, with a count. Likewise for lists and maps.</p>
<p>A tuple must be specified with the number of elements. (The
elements precede the <c>ERL_DRV_TUPLE</c> term.)</p>
<p>A list must be specified with the number of elements,
including the tail, which is the last term preceding
<c>ERL_DRV_LIST</c>.</p>
+ <p>A map must be specified with the number of key-value pairs <c>N</c>.
+ The key-value pairs must precede the <c>ERL_DRV_MAP</c> in this order:
+ <c>key1,value1,key2,value2,...,keyN,valueN</c>.
+ Duplicate keys are not allowed.</p>
<p>The special term <c>ERL_DRV_STRING_CONS</c> is used to
"splice" in a string in a list, a string given this way is
not a list per se, but the elements are elements of the
@@ -1774,6 +1788,7 @@ ERL_DRV_PID ErlDrvTermData pid (from driver_connected(ErlDrvPort port)
ERL_DRV_STRING_CONS char *str, int len
ERL_DRV_FLOAT double *dbl
ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len
+ERL_DRV_MAP int sz
</pre>
<p>The unsigned integer data type <c>ErlDrvUInt</c> and the
signed integer data type <c>ErlDrvSInt</c> are 64 bits wide
@@ -1856,6 +1871,24 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len
};
erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0]));
]]></code>
+
+ <p>To build the map <c>#{key1 => 100, key2 => {200, 300}}</c>, the
+ following call could be made.</p>
+ <code type="none"><![CDATA[
+ ErlDrvPort port = ...
+ ErlDrvTermData spec[] = {
+ ERL_DRV_ATOM, driver_mk_atom("key1"),
+ ERL_DRV_INT, 100,
+ ERL_DRV_ATOM, driver_mk_atom("key2"),
+ ERL_DRV_INT, 200,
+ ERL_DRV_INT, 300,
+ ERL_DRV_TUPLE, 2,
+ ERL_DRV_MAP, 2
+ };
+ erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0]));
+ ]]>
+ </code>
+
<p>If you want to pass a binary and don't already have the content
of the binary in an <c>ErlDrvBinary</c>, you can benefit from using
<c>ERL_DRV_BUF2BINARY</c> instead of creating an <c>ErlDrvBinary</c>
@@ -1995,14 +2028,13 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len
<c>async_invoke</c> and <c>async_free</c>. It's typically a
pointer to a structure that contains a pipe or event that
can be used to signal that the async operation completed.
- The data should be freed in <c>async_free</c>, because it's
- called if <c>driver_async_cancel</c> is called.</p>
+ The data should be freed in <c>async_free</c>.</p>
<p>When the async operation is done, <seealso marker="driver_entry#ready_async">ready_async</seealso> driver
entry function is called. If <c>ready_async</c> is null in
the driver entry, the <c>async_free</c> function is called
instead.</p>
- <p>The return value is a handle to the asynchronous task, which
- can be used as argument to <c>driver_async_cancel</c>.</p>
+ <p>The return value is -1 if the <c>driver_async</c> call
+ fails.</p>
<note>
<p>As of erts version 5.5.4.3 the default stack size for
threads in the async-thread pool is 16 kilowords,
@@ -2040,26 +2072,6 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len
</desc>
</func>
<func>
- <name><ret>int</ret><nametext>driver_async_cancel(long id)</nametext></name>
- <fsummary>Cancel an asynchronous call</fsummary>
- <desc>
- <marker id="driver_async_cancel"></marker>
- <p>This function used to cancel a scheduled asynchronous operation,
- if it was still in the queue. It returned 1 if it succeeded, and
- 0 if it failed.</p>
- <p>Since it could not guarantee success, it was more or less useless.
- The user had to implement synchronization of cancellation anyway.
- It also unnecessarily complicated the implementation. Therefore,
- as of OTP-R15B <c>driver_async_cancel()</c> is deprecated, and
- scheduled for removal in OTP-R17. It will currently always fail,
- and return 0.</p>
- <warning><p><c>driver_async_cancel()</c> is deprecated and will
- be removed in the OTP-R17 release.</p>
- </warning>
-
- </desc>
- </func>
- <func>
<name><ret>int</ret><nametext>driver_lock_driver(ErlDrvPort port)</nametext></name>
<fsummary>Make sure the driver is never unloaded</fsummary>
<desc>
diff --git a/erts/doc/src/erl_ext_dist.xml b/erts/doc/src/erl_ext_dist.xml
index 64a201cc8f..a6e7dddbed 100644
--- a/erts/doc/src/erl_ext_dist.xml
+++ b/erts/doc/src/erl_ext_dist.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2007</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -126,9 +126,8 @@
However, only characters that can be encoded using Latin1 (ISO-8859-1)
are currently supported in atoms. The support for UTF-8 encoded atoms
in the external format has been implemented in order to be able to support
- all Unicode characters in atoms in <em>some future release</em>. Full
- support for Unicode atoms will not happen before OTP-R18, and might
- be introduced even later than that. Until full Unicode support for
+ all Unicode characters in atoms in <em>some future release</em>.
+ Until full Unicode support for
atoms has been introduced, it is an <em>error</em> to pass atoms containing
characters that cannot be encoded in Latin1, and <em>the behavior is
undefined</em>.</p>
@@ -573,6 +572,33 @@
</section>
<section>
+ <marker id="MAP_EXT"/>
+ <title>MAP_EXT</title>
+
+ <table align="left">
+ <row>
+ <cell align="center">1</cell>
+ <cell align="center">4</cell>
+ <cell align="center">N</cell>
+ </row>
+ <row>
+ <cell align="center">116</cell>
+ <cell align="center">Arity</cell>
+ <cell align="center">Pairs</cell>
+ </row>
+ <tcaption></tcaption></table>
+ <p>
+ <c>MAP_EXT</c> encodes a map. The <c>Arity</c> field is an unsigned
+ 4 byte integer in big endian format that determines the number of
+ key-value pairs in the map. Key and value pairs (<c>Ki => Vi</c>)
+ are encoded in the <c>Pairs</c> section in the following order:
+ <c>K1, V1, K2, V2,..., Kn, Vn</c>.
+ Duplicate keys are <em>not allowed</em> within the same map.
+ </p>
+ <p><em>Since: </em>OTP 17.0</p>
+ </section>
+
+ <section>
<marker id="NIL_EXT"/>
<title>NIL_EXT</title>
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 864b91946a..3de94be9ff 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
@@ -168,20 +168,26 @@ ok
<p><marker id="lengthy_work"/>
As mentioned in the <seealso marker="#WARNING">warning</seealso> text at
the beginning of this document it is of vital importance that a native function
- does return relatively fast. It is hard to give an exact maximum amount
+ return relatively quickly. It is hard to give an exact maximum amount
of time that a native function is allowed to work, but as a rule of thumb
- a well behaving native function should return to its caller before a
+ a well-behaving native function should return to its caller before a
millisecond has passed. This can be achieved using different approaches.
- If you have full control over the code that are to execute in the native
+ If you have full control over the code to execute in the native
function, the best approach is to divide the work into multiple chunks of
- work and call the native function multiple times. Function
+ work and call the native function multiple times, either directly from Erlang code
+ or by having a native function schedule a future NIF call via the
+ <seealso marker="#enif_schedule_nif"> enif_schedule_nif</seealso> function. Function
<seealso marker="#enif_consume_timeslice">enif_consume_timeslice</seealso> can be
- used this facilitate such work division. In some cases, however, this might not
- be possible, e.g. when calling third party libraries. Then you typically want
+ used to help with such work division. In some cases, however, this might not
+ be possible, e.g. when calling third-party libraries. Then you typically want
to dispatch the work to another thread, return
from the native function, and wait for the result. The thread can send
the result back to the calling thread using message passing. Information
- about thread primitives can be found below.</p>
+ about thread primitives can be found below. If you have built your system
+ with <em>the currently experimental</em> support for dirty schedulers,
+ you may want to try out this functionality by dispatching the work to a
+ <seealso marker="#dirty_nifs">dirty NIF</seealso>,
+ which does not have the same duration restriction as a normal NIF.</p>
</description>
<section>
<title>FUNCTIONALITY</title>
@@ -312,6 +318,65 @@ ok
<p>The library initialization callbacks <c>load</c>, <c>reload</c> and
<c>upgrade</c> are all thread-safe even for shared state data.</p>
</item>
+
+ <tag><marker id="version_management"/>Version Management</tag>
+ <item><p>
+ When a NIF library is built, information about NIF API version
+ is compiled into the library. When a NIF library is loaded the
+ runtime system verifies that the library is of a compatible version.
+ <c>erl_nif.h</c> defines <c>ERL_NIF_MAJOR_VERSION</c>, and
+ <c>ERL_NIF_MINOR_VERSION</c>. <c>ERL_NIF_MAJOR_VERSION</c> will be
+ incremented when NIF library incompatible changes are made to the
+ Erlang runtime system. Normally it will suffice to recompile the NIF
+ library when the <c>ERL_NIF_MAJOR_VERSION</c> has changed, but it
+ could, under rare circumstances, mean that NIF libraries have to
+ be slightly modified. If so, this will of course be documented.
+ <c>ERL_NIF_MINOR_VERSION</c> will be incremented when
+ new features are added. The runtime system uses the minor version
+ to determine what features to use.
+ </p><p>
+ The runtime system will normally refuse to load a NIF library if
+ the major versions differ, or if the major versions are equal and
+ the minor version used by the NIF library is greater than the one
+ used by the runtime system. Old NIF libraries with lower major
+ versions will however be allowed after a bump of the major version
+ during a transition period of two major releases. Such old NIF
+ libraries might however fail if deprecated features are used.
+ </p></item>
+
+ <tag>Long-running NIFs</tag>
+ <item><p><marker id="dirty_nifs"/>Native functions
+ <seealso marker="#lengthy_work">
+ must normally run quickly</seealso>, as explained earlier in this document. They
+ generally should execute for no more than a millisecond. But not all native functions
+ can execute so quickly; for example, functions that encrypt large blocks of data or
+ perform lengthy file system operations can often run for tens of seconds or more.</p>
+ <p>If the functionality of a long-running NIF can be split so that its work can be
+ achieved through a series of shorter NIF calls, the application can either make that series
+ of NIF calls from the Erlang level, or it can call a NIF that first performs a chunk of the
+ work, then invokes the <seealso marker="#enif_schedule_nif">enif_schedule_nif</seealso>
+ function to schedule another NIF call to perform the next chunk. The final call scheduled
+ in this manner can then return the overall result. Breaking up a long-running function in
+ this manner enables the VM to regain control between calls to the NIFs, thereby avoiding
+ degraded responsiveness, scheduler load balancing problems, and other strange behaviours.</p>
+ <p>A NIF that cannot be split and cannot execute in a millisecond or less is called a "dirty NIF"
+ because it performs work that the Erlang runtime cannot handle cleanly.
+ <em>Note that the dirty NIF functionality described here is experimental</em> and that you have to
+ enable support for dirty schedulers when building OTP in order to try the functionality out.
+ Applications that make use of such functions must indicate to the runtime that the functions are
+ dirty so they can be handled specially. To schedule a dirty NIF for execution, the
+ appropriate flags value can be set for the NIF in its <seealso marker="#ErlNifFunc">ErlNifFunc</seealso>
+ entry, or the application can call <seealso marker="#enif_schedule_nif">enif_schedule_nif</seealso>,
+ passing to it a pointer to the dirty NIF to be executed and indicating with the <c>flags</c>
+ argument whether it expects the operation to be CPU-bound or I/O-bound.</p>
+ <note><p>Dirty NIF support is available only when the emulator is configured with dirty
+ schedulers enabled. This feature is currently disabled by default. To determine whether
+ the dirty NIF API is available, native code can check to see if the C preprocessor macro
+ <c>ERL_NIF_DIRTY_SCHEDULER_SUPPORT</c> is defined. Also, if the Erlang runtime was built
+ without threading support, dirty schedulers are disabled. To check at runtime for the presence
+ of dirty scheduler threads, code can use the <seealso marker="#enif_system_info"><c>
+ enif_system_info()</c></seealso> API function.</p></note>
+ </item>
</taglist>
</section>
<section>
@@ -330,6 +395,8 @@ ok
<c>upgrade</c> will be called to initialize the library.
<c>unload</c> is called to release the library. They are all
described individually below.</p>
+ <p>If compiling a nif for static inclusion via --enable-static-nifs you
+ have to define STATIC_ERLANG_NIF before the ERL_NIF_INIT declaration.</p>
</item>
<tag><marker id="load"/>int (*load)(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)</tag>
@@ -434,6 +501,7 @@ typedef struct {
const char* <em>name</em>;
unsigned <em>arity</em>;
ERL_NIF_TERM (*<em>fptr</em>)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ unsigned flags;
} ErlNifFunc;
</code>
<p>Describes a NIF by its name, arity and implementation.
@@ -444,7 +512,17 @@ typedef struct {
will thus denote the Nth argument to the NIF. Note that the
<c>argc</c> argument allows for the same C function to
implement several Erlang functions with different arity (but
- same name probably).</p>
+ same name probably). For a regular NIF, <c>flags</c> is 0 (and
+ so its value can be omitted for statically initialized <c>ErlNifFunc</c>
+ instances), or it can be used to indicate that the NIF is a <seealso
+ marker="#dirty_nifs">dirty NIF</seealso> that should be executed
+ on a dirty scheduler thread (<em>note that the dirty NIF functionality
+ described here is experimental</em> and that you have to enable
+ support for dirty schedulers when building OTP in order to try the
+ functionality out). If the dirty NIF is expected to be
+ CPU-bound, its <c>flags</c> field should be set to
+ <c>ERL_NIF_DIRTY_JOB_CPU_BOUND</c>, or for I/O-bound jobs,
+ <c>ERL_NIF_DIRTY_JOB_IO_BOUND</c>.</p>
</item>
<tag><marker id="ErlNifBinary"/>ErlNifBinary</tag>
<item>
@@ -775,6 +853,20 @@ 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 the
+ emulator is built with threading support, calling <c>enif_is_on_dirty_scheduler</c>
+ from within a dirty NIF returns true. It returns false when the calling NIF is a regular
+ NIF running on a normal scheduler thread, or when the emulator is built without threading
+ support.</p>
+ <note><p>This function is available only when the emulator is configured with dirty
+ schedulers enabled. This feature is currently disabled by default. To determine whether
+ the dirty NIF API is available, native code can check to see if the C preprocessor macro
+ <c>ERL_NIF_DIRTY_SCHEDULER_SUPPORT</c> is defined.</p></note>
+ </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>
@@ -1139,6 +1231,31 @@ typedef enum {
<desc><p>Same as <seealso marker="erl_driver#erl_drv_rwlock_tryrwlock">erl_drv_rwlock_tryrwlock</seealso>.
</p></desc>
</func>
+ <func><name><ret>ERL_NIF_TERM</ret><nametext>enif_schedule_nif(ErlNifEnv* env, const char* fun_name, int flags, ERL_NIF_TERM (*fp)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]), int argc, const ERL_NIF_TERM argv[])</nametext></name>
+ <fsummary>Schedule a NIF for execution</fsummary>
+ <desc>
+ <p>Schedule NIF <c>fp</c> to execute. This function allows an application to break up long-running
+ work into multiple regular NIF calls or to schedule a <seealso marker="#dirty_nifs">dirty NIF</seealso>
+ to execute on a dirty scheduler thread (<em>note that the dirty NIF functionality described here is
+ experimental</em> and that you have to enable support for dirty schedulers when building OTP in
+ order to try the functionality out).</p>
+ <p>The <c>fun_name</c> argument provides a name for the NIF being scheduled for execution. If it cannot
+ be converted to an atom, <c>enif_schedule_nif</c> returns a <c>badarg</c> exception.</p>
+ <p>The <c>flags</c> argument must be set to 0 for a regular NIF, or if the emulator was built the
+ experimental dirty scheduler support enabled, <c>flags</c> can be set to either <c>ERL_NIF_DIRTY_JOB_CPU_BOUND</c>
+ if the job is expected to be primarily CPU-bound, or <c>ERL_NIF_DIRTY_JOB_IO_BOUND</c> for jobs that will
+ be I/O-bound. If dirty scheduler threads are not available in the emulator, a try to schedule such a job
+ will result in a <c>badarg</c> exception.</p>
+
+ <p>The <c>argc</c> and <c>argv</c> arguments can either be the originals passed into the calling NIF, or
+ they can be values created by the calling NIF.</p>
+ <p>The calling NIF must use the return value of <c>enif_schedule_nif</c> as its own return value.</p>
+ <p>Be aware that <c>enif_schedule_nif</c>, as its name implies, only schedules the
+ NIF for future execution. The calling NIF does not block waiting for the scheduled NIF to
+ execute and return, which means that the calling NIF can't expect to receive the scheduled NIF
+ return value and use it for further operations.</p>
+ </desc>
+ </func>
<func><name><ret>ErlNifPid *</ret><nametext>enif_self(ErlNifEnv* caller_env, ErlNifPid* pid)</nametext></name>
<fsummary>Get the pid of the calling process.</fsummary>
<desc><p>Initialize the pid variable <c>*pid</c> to represent the
@@ -1236,4 +1353,3 @@ typedef enum {
<p><seealso marker="erlang#load_nif-2">erlang:load_nif/2</seealso></p>
</section>
</cref>
-
diff --git a/erts/doc/src/erl_prim_loader.xml b/erts/doc/src/erl_prim_loader.xml
index 9f5b3f385b..171f84decc 100644
--- a/erts/doc/src/erl_prim_loader.xml
+++ b/erts/doc/src/erl_prim_loader.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -148,6 +148,22 @@
</desc>
</func>
<func>
+ <name name="read_link_info" arity="1"/>
+ <fsummary>Get information about a link or file</fsummary>
+ <desc>
+ <p>This function works like
+ <seealso marker="#read_file_info/1">read_file_info/1</seealso>
+ except that if <c><anno>Filename</anno></c> is a symbolic link,
+ information about the link will be returned in the <c>file_info</c>
+ record and the <c>type</c> field of the record will be set to
+ <c>symlink</c>.</p>
+ <p>If <c><anno>Filename</anno></c> is not a symbolic link, this function
+ returns exactly the same result as <c>read_file_info/1</c>.
+ On platforms that do not support symbolic links, this function
+ is always equivalent to <c>read_file_info/1</c>.</p>
+ </desc>
+ </func>
+ <func>
<name name="set_path" arity="1"/>
<fsummary>Set the path of the loader</fsummary>
<desc>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index e3ef48a6c1..0e5909a52d 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -501,16 +501,87 @@
<name name="check_process_code" arity="2"/>
<fsummary>Check if a process is executing old code for a module</fsummary>
<desc>
- <p>Returns <c>true</c> if the process <c><anno>Pid</anno></c> is executing
- old code for <c><anno>Module</anno></c>. That is, if the current call of
- the process executes old code for this module, or if the
- process has references to old code for this module, or if the
- process contains funs that references old code for this
- module. Otherwise, it returns <c>false</c>.</p>
- <pre>
-> <input>check_process_code(Pid, lists).</input>
-false</pre>
+ <p>The same as
+ <seealso marker="#check_process_code/3"><c>erlang:check_process_code(<anno>Pid</anno>,
+ <anno>Module</anno>, [])</c></seealso>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="check_process_code" arity="3"/>
+ <fsummary>Check if a process is executing old code for a module</fsummary>
+ <desc>
+ <p>Check if the node local process identified by <c><anno>Pid</anno></c>
+ is executing old code for <c><anno>Module</anno></c>.</p>
+ <p>Currently available <c><anno>Option</anno>s</c>:</p>
+ <taglist>
+ <tag><c>{allow_gc, boolean()}</c></tag>
+ <item>
+ Determines if garbage collection is allowed when performing
+ the operation. If <c>{allow_gc, false}</c> is passed, and
+ a garbage collection is needed in order to determine the
+ result of the operation, the operation will be aborted
+ (see information on <c><anno>CheckResult</anno></c> below).
+ The default is to allow garbage collection, i.e.,
+ <c>{allow_gc, true}</c>.
+ </item>
+ <tag><c>{async, RequestId}</c></tag>
+ <item>
+ The <c>check_process_code/3</c> function will return
+ the value <c>async</c> immediately after the request
+ has been sent. When the request has been processed, the
+ process that called this function will be passed a
+ message on the form:<br/>
+ <c>{check_process_code, <anno>RequestId</anno>, <anno>CheckResult</anno>}</c>.
+ </item>
+ </taglist>
+ <p>If <c><anno>Pid</anno></c> equals <c>self()</c>, and
+ no <c>async</c> option has been passed, the operation will
+ be performed at once. In all other cases a request for
+ the operation will be sent to the process identified by
+ <c><anno>Pid</anno></c>, and will be handled when
+ appropriate. If no <c>async</c> option has been passed,
+ the caller will block until <c><anno>CheckResult</anno></c>
+ is available and can be returned.</p>
+ <p><c><anno>CheckResult</anno></c> informs about the result of
+ the request:</p>
+ <taglist>
+ <tag><c>true</c></tag>
+ <item>
+ The process identified by <c><anno>Pid</anno></c> is
+ executing old code for <c><anno>Module</anno></c>.
+ That is, the current call of the process executes old
+ code for this module, or the process has references
+ to old code for this module, or the process contains
+ funs that references old code for this module.
+ </item>
+ <tag><c>false</c></tag>
+ <item>
+ The process identified by <c><anno>Pid</anno></c> is
+ not executing old code for <c><anno>Module</anno></c>.
+ </item>
+ <tag><c>aborted</c></tag>
+ <item>
+ The operation was aborted since the process needed to
+ be garbage collected in order to determine the result
+ of the operation, and the operation was requested
+ by passing the <c>{allow_gc, false}</c> option.</item>
+ </taglist>
<p>See also <seealso marker="kernel:code">code(3)</seealso>.</p>
+ <p>Failures:</p>
+ <taglist>
+ <tag><c>badarg</c></tag>
+ <item>
+ If <c><anno>Pid</anno></c> is not a node local process identifier.
+ </item>
+ <tag><c>badarg</c></tag>
+ <item>
+ If <c><anno>Module</anno></c> is not an atom.
+ </item>
+ <tag><c>badarg</c></tag>
+ <item>
+ If <c><anno>OptionList</anno></c> is not a valid list of options.
+ </item>
+ </taglist>
</desc>
</func>
<func>
@@ -816,7 +887,7 @@ false</pre>
<fsummary>Print a term on standard output</fsummary>
<desc>
<p>Prints a text representation of <c><anno>Term</anno></c> on the standard
- output.</p>
+ output. On OSE the term is printed to the ramlog.</p>
<warning>
<p>This BIF is intended for debugging only.</p>
</warning>
@@ -1197,20 +1268,74 @@ true
that the spontaneous garbage collection will occur too late
or not at all. Improper use may seriously degrade system
performance.</p>
- <p>Compatibility note: In versions of OTP prior to R7,
- the garbage collection took place at the next context switch,
- not immediately. To force a context switch after a call to
- <c>erlang:garbage_collect()</c>, it was sufficient to make
- any function call.</p>
</desc>
</func>
<func>
<name name="garbage_collect" arity="1"/>
- <fsummary>Force an immediate garbage collection of a process</fsummary>
+ <fsummary>Garbage collect a process</fsummary>
+ <desc>
+ <p>The same as
+ <seealso marker="#garbage_collect/2"><c>garbage_collect(<anno>Pid</anno>, [])</c></seealso>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="garbage_collect" arity="2"/>
+ <fsummary>Garbage collect a process</fsummary>
<desc>
- <p>Works like <c>erlang:garbage_collect()</c> but on any
- process. The same caveats apply. Returns <c>false</c> if
- <c><anno>Pid</anno></c> refers to a dead process; <c>true</c> otherwise.</p>
+ <p>Garbage collect the node local process identified by
+ <c><anno>Pid</anno></c>.</p>
+ <p>Currently available <c><anno>Option</anno></c>s:</p>
+ <taglist>
+ <tag><c>{async, RequestId}</c></tag>
+ <item>
+ The <c>garbage_collect/2</c> function will return
+ the value <c>async</c> immediately after the request
+ has been sent. When the request has been processed, the
+ process that called this function will be passed a
+ message on the form:<br/>
+ <c>{garbage_collect, <anno>RequestId</anno>, <anno>GCResult</anno>}</c>.
+ </item>
+ </taglist>
+ <p>If <c><anno>Pid</anno></c> equals <c>self()</c>, and
+ no <c>async</c> option has been passed, the garbage
+ collection will be performed at once, i.e. the same as
+ calling
+ <seealso marker="#garbage_collect/0">garbage_collect/0</seealso>.
+ In all other cases a request for garbage collection will
+ be sent to the process identified by <c><anno>Pid</anno></c>,
+ and will be handled when appropriate. If no <c>async</c>
+ option has been passed, the caller will block until
+ <c><anno>GCResult</anno></c> is available and can be
+ returned.</p>
+ <p><c><anno>GCResult</anno></c> informs about the result of
+ the garbage collection request:</p>
+ <taglist>
+ <tag><c>true</c></tag>
+ <item>
+ The process identified by <c><anno>Pid</anno></c> has
+ been garbage collected.
+ </item>
+ <tag><c>false</c></tag>
+ <item>
+ No garbage collection was performed. This since the
+ the process identified by <c><anno>Pid</anno></c>
+ terminated before the request could be satisfied.
+ </item>
+ </taglist>
+ <p>Note that the same caveats as for
+ <seealso marker="#garbage_collect/0">garbage_collect/0</seealso>
+ apply.</p>
+ <p>Failures:</p>
+ <taglist>
+ <tag><c>badarg</c></tag>
+ <item>
+ If <c><anno>Pid</anno></c> is not a node local process identifier.
+ </item>
+ <tag><c>badarg</c></tag>
+ <item>
+ If <c><anno>OptionList</anno></c> is not a valid list of options.
+ </item>
+ </taglist>
</desc>
</func>
<func>
@@ -1231,7 +1356,7 @@ true
<name name="get" arity="1"/>
<fsummary>Return a value from the process dictionary</fsummary>
<desc>
- <p>Returns the value <c><anno>Val</anno></c>associated with <c><anno>Key</anno></c> in
+ <p>Returns the value <c><anno>Val</anno></c> associated with <c><anno>Key</anno></c> in
the process dictionary, or <c>undefined</c> if <c><anno>Key</anno></c>
does not exist.</p>
<pre>
@@ -1659,6 +1784,15 @@ os_prompt% </pre>
</desc>
</func>
<func>
+ <name name="is_map" arity="1"/>
+ <fsummary>Check whether a term is a map</fsummary>
+ <desc>
+ <p>Returns <c>true</c> if <c><anno>Term</anno></c> is a map;
+ otherwise returns <c>false</c>.</p>
+ <p>Allowed in guard tests.</p>
+ </desc>
+ </func>
+ <func>
<name name="is_number" arity="1"/>
<fsummary>Check whether a term is a number</fsummary>
<desc>
@@ -2095,6 +2229,17 @@ os_prompt% </pre>
</desc>
</func>
<func>
+ <name name="map_size" arity="1"/>
+ <fsummary>Return the size of a map</fsummary>
+ <desc>
+ <p>Returns an integer which is the number of key-value pairs in <c><anno>Map</anno></c>.</p>
+ <pre>
+> <input>map_size(#{a=>1, b=>2, c=>3}).</input>
+3</pre>
+ <p>Allowed in guard tests.</p>
+ </desc>
+ </func>
+ <func>
<name name="max" arity="2"/>
<fsummary>Return the largest of two term</fsummary>
<desc>
@@ -2613,7 +2758,28 @@ os_prompt% </pre>
<desc>
<p>Returns a port identifier as the result of opening a
new Erlang port. A port can be seen as an external Erlang
- process. <c><anno>PortName</anno></c> is one of the following:</p>
+ process.
+ </p>
+ <p>The name of the executable as well as the arguments
+ given in <c>cd</c>, <c>env</c>, <c>args</c> and <c>arg0</c> is subject to
+ Unicode file name translation if the system is running
+ in Unicode file name mode. To avoid
+ translation or force i.e. UTF-8, supply the executable
+ and/or arguments as a binary in the correct
+ encoding. See the <seealso
+ marker="kernel:file">file</seealso> module, the
+ <seealso marker="kernel:file#native_name_encoding/0">
+ file:native_name_encoding/0</seealso> function and the
+ <seealso marker="stdlib:unicode_usage">stdlib users guide
+ </seealso> for details.</p>
+
+ <note><p>The characters in the name (if given as a list)
+ can only be &gt; 255 if the Erlang VM is started in
+ Unicode file name translation mode, otherwise the name
+ of the executable is limited to the ISO-latin-1
+ character set.</p></note>
+
+ <p><c><anno>PortName</anno></c> is one of the following:</p>
<taglist>
<tag><c>{spawn, <anno>Command</anno>}</c></tag>
<item>
@@ -2668,32 +2834,13 @@ os_prompt% </pre>
executed, the appropriate command interpreter will
implicitly be invoked, but there will still be no
command argument expansion or implicit PATH search.</p>
-
- <p>The name of the executable as well as the arguments
- given in <c>args</c> and <c>arg0</c> is subject to
- Unicode file name translation if the system is running
- in Unicode file name mode. To avoid
- translation or force i.e. UTF-8, supply the executable
- and/or arguments as a binary in the correct
- encoding. See the <seealso
- marker="kernel:file">file</seealso> module, the
- <seealso marker="kernel:file#native_name_encoding/0">
- file:native_name_encoding/0</seealso> function and the
- <seealso marker="stdlib:unicode_usage">stdlib users guide
- </seealso> for details.</p>
-
- <note><p>The characters in the name (if given as a list)
- can only be &gt; 255 if the Erlang VM is started in
- Unicode file name translation mode, otherwise the name
- of the executable is limited to the ISO-latin-1
- character set.</p></note>
<p>If the <c><anno>FileName</anno></c> cannot be run, an error
exception, with the posix error code as the reason, is
raised. The error reason may differ between operating
systems. Typically the error <c>enoent</c> is raised
when one tries to run a program that is not found and
- <c>eaccess</c> is raised when the given file is not
+ <c>eacces</c> is raised when the given file is not
executable.</p>
</item>
<tag><c>{fd, <anno>In</anno>, <anno>Out</anno>}</c></tag>
@@ -2762,11 +2909,7 @@ os_prompt% </pre>
strings. The one exception is <c><anno>Val</anno></c> being the atom
<c>false</c> (in analogy with <c>os:getenv/1</c>), which
removes the environment variable.
- </p>
- <p>If Unicode filename encoding is in effect (see the <seealso
- marker="erts:erl#file_name_encoding">erl manual
- page</seealso>), the strings (both <c>Name</c> and
- <c>Value</c>) may contain characters with codepoints > 255.</p>
+ </p>
</item>
<tag><c>{args, [ string() | binary() ]}</c></tag>
<item>
@@ -2794,21 +2937,6 @@ os_prompt% </pre>
should not be given in this list. The proper executable name will
automatically be used as argv[0] where applicable.</p>
- <p>When the Erlang VM is running in Unicode file name
- mode, the arguments can contain any Unicode characters and
- will be translated into whatever is appropriate on the
- underlying OS, which means UTF-8 for all platforms except
- Windows, which has other (more transparent) ways of
- dealing with Unicode arguments to programs. To avoid
- Unicode translation of arguments, they can be supplied as
- binaries in whatever encoding is deemed appropriate.</p>
-
- <note><p>The characters in the arguments (if given as a
- list of characters) can only be &gt; 255 if the Erlang
- VM is started in Unicode file name mode,
- otherwise the arguments are limited to the
- ISO-latin-1 character set.</p></note>
-
<p>If one, for any reason, wants to explicitly set the
program name in the argument vector, the <c>arg0</c>
option can be used.</p>
@@ -2824,9 +2952,6 @@ os_prompt% </pre>
responds to this is highly system dependent and no specific
effect is guaranteed.</p>
- <p>The unicode file name translation rules of the
- <c>args</c> option apply to this option as well.</p>
-
</item>
<tag><c>exit_status</c></tag>
@@ -2906,11 +3031,11 @@ os_prompt% </pre>
<tag><marker id="open_port_parallelism"><c>{parallelism, Boolean}</c></marker></tag>
<item>
<p>Set scheduler hint for port parallelism. If set to <c>true</c>,
- the VM will schedule port tasks when it by this can improve the
+ the VM will schedule port tasks when doing so will improve
parallelism in the system. If set to <c>false</c>, the VM will
- try to perform port tasks immediately and by this improving the
- latency at the expense of parallelism. The default can be set on
- system startup by passing the
+ try to perform port tasks immediately, improving latency at the
+ expense of parallelism. The default can be set on system startup
+ by passing the
<seealso marker="erl#+spp">+spp</seealso> command line argument
to <seealso marker="erl">erl(1)</seealso>.
</p>
@@ -4717,6 +4842,8 @@ true</pre>
<c><anno>Node</anno></c> does not exist, a useless pid is returned.
Otherwise works like
<seealso marker="#spawn_opt/4">spawn_opt/4</seealso>.</p>
+ <note><p>The <c>monitor</c> option is currently not supported by
+ <c>spawn_opt/5</c>.</p></note>
</desc>
</func>
<func>
@@ -4841,7 +4968,7 @@ true</pre>
<desc>
<p>Note that the run-time is the sum of the run-time for all
threads in the Erlang run-time system and may therefore be greater
- than the wall-clock time.</p>
+ than the wall-clock time. The time is returned in milliseconds.</p>
<pre>
> <input>statistics(runtime).</input>
{1690,1620}
@@ -5089,6 +5216,34 @@ ok
</func>
<func>
<name name="system_flag" arity="2" clause_i="3"/>
+ <fsummary>Set system flag dirty CPU schedulers online</fsummary>
+ <desc>
+ <p><marker id="system_flag_dirty_cpu_schedulers_online"></marker>
+ Sets the amount of dirty CPU schedulers online. Valid range is
+ <![CDATA[1 <= DirtyCPUSchedulersOnline <= N]]> where <c>N</c> is the
+ lesser of the return values of <c>erlang:system_info(dirty_cpu_schedulers)</c> and
+ <c>erlang:system_info(schedulers_online)</c>.
+ </p>
+ <p>Returns the old value of the flag.</p>
+ <p>Note that the number of dirty CPU schedulers online may change if the number of
+ schedulers online changes. For example, if there are 12 schedulers and all are
+ online, and 6 dirty CPU schedulers, all online as well, and <c>system_flag/2</c>
+ is used to set the number of schedulers online to 6, then the number of dirty
+ CPU schedulers online is automatically decreased by half as well, down to 3.
+ Similarly, the number of dirty CPU schedulers online increases proportionally
+ to increases in the number of schedulers online.</p>
+ <p><em>Note that the dirty schedulers functionality is experimental</em>, and
+ that you have to enable support for dirty schedulers when building OTP in order
+ to try out the functionality.</p>
+ <p>For more information see
+ <seealso marker="#system_info_dirty_cpu_schedulers">erlang:system_info(dirty_cpu_schedulers)</seealso>
+ and
+ <seealso marker="#system_info_dirty_cpu_schedulers_online">erlang:system_info(dirty_cpu_schedulers_online)</seealso>.
+ </p>
+ </desc>
+ </func>
+ <func>
+ <name name="system_flag" arity="2" clause_i="4"/>
<fsummary>Set system flag fullsweep_after</fsummary>
<desc>
<p><c><anno>Number</anno></c> is a non-negative integer which indicates
@@ -5106,7 +5261,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="4"/>
+ <name name="system_flag" arity="2" clause_i="5"/>
<fsummary>Set system flag min_heap_size</fsummary>
<desc>
<p>Sets the default minimum heap size for processes. The
@@ -5121,7 +5276,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="5"/>
+ <name name="system_flag" arity="2" clause_i="6"/>
<fsummary>Set system flag min_bin_vheap_size</fsummary>
<desc>
<p>Sets the default minimum binary virtual heap size for processes. The
@@ -5136,7 +5291,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="6"/>
+ <name name="system_flag" arity="2" clause_i="7"/>
<fsummary>Set system flag multi_scheduling</fsummary>
<desc>
<p><marker id="system_flag_multi_scheduling"></marker>
@@ -5174,7 +5329,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="7"/>
+ <name name="system_flag" arity="2" clause_i="8"/>
<type name="scheduler_bind_type"/>
<fsummary>Set system flag scheduler_bind_type</fsummary>
<desc>
@@ -5294,7 +5449,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="8"/>
+ <name name="system_flag" arity="2" clause_i="9"/>
<fsummary>Set system flag scheduler_wall_time</fsummary>
<desc><p><marker id="system_flag_scheduler_wall_time"></marker>
Turns on/off scheduler wall time measurements. </p>
@@ -5304,7 +5459,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="9"/>
+ <name name="system_flag" arity="2" clause_i="10"/>
<fsummary>Set system flag schedulers_online</fsummary>
<desc>
<p><marker id="system_flag_schedulers_online"></marker>
@@ -5312,6 +5467,15 @@ ok
<![CDATA[1 <= SchedulersOnline <= erlang:system_info(schedulers)]]>.
</p>
<p>Returns the old value of the flag.</p>
+ <p>Note that if the emulator was built with support for <seealso
+ marker="#system_flag_dirty_cpu_schedulers_online">dirty schedulers</seealso>,
+ changing the number of schedulers online can also change the number of dirty
+ CPU schedulers online. For example, if there are 12 schedulers and all are
+ online, and 6 dirty CPU schedulers, all online as well, and <c>system_flag/2</c>
+ is used to set the number of schedulers online to 6, then the number of dirty
+ CPU schedulers online is automatically decreased by half as well, down to 3.
+ Similarly, the number of dirty CPU schedulers online increases proportionally
+ to increases in the number of schedulers online.</p>
<p>For more information see,
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>,
and
@@ -5320,7 +5484,7 @@ ok
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="10"/>
+ <name name="system_flag" arity="2" clause_i="11"/>
<fsummary>Set system flag trace_control_word</fsummary>
<desc>
<p>Sets the value of the node's trace control word to
@@ -5611,6 +5775,7 @@ ok
<name name="system_info" arity="1" clause_i="52"/>
<name name="system_info" arity="1" clause_i="53"/>
<name name="system_info" arity="1" clause_i="54"/>
+ <name name="system_info" arity="1" clause_i="55"/>
<fsummary>Information about the system</fsummary>
<desc>
<p>Returns various information about the current system
@@ -5680,6 +5845,72 @@ ok
compiled; otherwise, <c>false</c>.
</p>
</item>
+ <tag><marker id="system_info_dirty_cpu_schedulers"><c>dirty_cpu_schedulers</c></marker></tag>
+ <item>
+ <p>Returns the number of dirty CPU scheduler threads used by
+ the emulator. Dirty CPU schedulers execute CPU-bound
+ native functions such as NIFs, linked-in driver code, and BIFs
+ that cannot be managed cleanly by the emulator's normal schedulers.
+ </p>
+ <p>The number of dirty CPU scheduler threads is determined at emulator
+ boot time and cannot be changed after that. The number of dirty CPU
+ scheduler threads online can however be changed at any time. The number of
+ dirty CPU schedulers can be set on startup by passing
+ the <seealso marker="erts:erl#+SDcpu">+SDcpu</seealso> or
+ <seealso marker="erts:erl#+SDPcpu">+SDPcpu</seealso> command line flags,
+ see <seealso marker="erts:erl#+SDcpu">erl(1)</seealso>.
+ </p>
+ <p><em>Note that the dirty schedulers functionality is experimental</em>, and
+ that you have to enable support for dirty schedulers when building OTP in
+ order to try out the functionality.</p>
+ <p>See also <seealso marker="#system_flag_dirty_cpu_schedulers_online">erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline)</seealso>,
+ <seealso marker="#system_info_dirty_cpu_schedulers_online">erlang:system_info(dirty_cpu_schedulers_online)</seealso>,
+ <seealso marker="#system_info_dirty_io_schedulers">erlang:system_info(dirty_io_schedulers)</seealso>,
+ <seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>,
+ <seealso marker="#system_info_schedulers_online">erlang:system_info(schedulers_online)</seealso>, and
+ <seealso marker="#system_flag_schedulers_online">erlang:system_flag(schedulers_online, SchedulersOnline)</seealso>.</p>
+ </item>
+ <tag><marker id="system_info_dirty_cpu_schedulers_online"><c>dirty_cpu_schedulers_online</c></marker></tag>
+ <item>
+ <p>Returns the number of dirty CPU schedulers online. The return value
+ satisfies the following relationship:
+ <c><![CDATA[1 <= DirtyCPUSchedulersOnline <= N]]></c>, where <c>N</c> is
+ the lesser of the return values of <c>erlang:system_info(dirty_cpu_schedulers)</c> and
+ <c>erlang:system_info(schedulers_online)</c>.
+ </p>
+ <p>The number of dirty CPU schedulers online can be set on startup by passing
+ the <seealso marker="erts:erl#+SDcpu">+SDcpu</seealso> command line flag, see
+ <seealso marker="erts:erl#+SDcpu">erl(1)</seealso>.
+ </p>
+ <p><em>Note that the dirty schedulers functionality is experimental</em>, and
+ that you have to enable support for dirty schedulers when building OTP in
+ order to try out the functionality.</p>
+ <p>For more information, see
+ <seealso marker="#system_info_dirty_cpu_schedulers">erlang:system_info(dirty_cpu_schedulers)</seealso>,
+ <seealso marker="#system_info_dirty_io_schedulers">erlang:system_info(dirty_io_schedulers)</seealso>,
+ <seealso marker="#system_info_schedulers_online">erlang:system_info(schedulers_online)</seealso>, and
+ <seealso marker="#system_flag_dirty_cpu_schedulers_online">erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline)</seealso>.
+ </p>
+ </item>
+ <tag><marker id="system_info_dirty_io_schedulers"><c>dirty_io_schedulers</c></marker></tag>
+ <item>
+ <p>Returns the number of dirty I/O schedulers as an integer. Dirty I/O schedulers
+ execute I/O-bound native functions such as NIFs and linked-in driver code that
+ cannot be managed cleanly by the emulator's normal schedulers.
+ </p>
+ <p>This value can be set on startup by passing
+ the <seealso marker="erts:erl#+SDio">+SDio</seealso> command line flag, see
+ <seealso marker="erts:erl#+SDio">erl(1)</seealso>.
+ </p>
+ <p><em>Note that the dirty schedulers functionality is experimental</em>, and
+ that you have to enable support for dirty schedulers when building OTP in
+ order to try out the functionality.</p>
+ <p>For more information, see
+ <seealso marker="#system_info_dirty_cpu_schedulers">erlang:system_info(dirty_cpu_schedulers)</seealso>,
+ <seealso marker="#system_info_dirty_cpu_schedulers_online">erlang:system_info(dirty_cpu_schedulers_online)</seealso>, and
+ <seealso marker="#system_flag_dirty_cpu_schedulers_online">erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline)</seealso>.
+ </p>
+ </item>
<tag><c>dist</c></tag>
<item>
<p>Returns a binary containing a string of distribution
@@ -5740,6 +5971,16 @@ ok
The return value will always be <c>false</c> since
the elib_malloc allocator has been removed.</p>
</item>
+ <tag><marker id="system_info_eager_check_io"><c>eager_check_io</c></marker></tag>
+ <item>
+ <p>
+ Returns the value of the <c>erl</c>
+ <seealso marker="erl#+secio">+secio</seealso> command line
+ flag which is either <c>true</c> or <c>false</c>. See the
+ documentation of the command line flag for information about
+ the different values.
+ </p>
+ </item>
<tag><c>ets_limit</c></tag>
<item>
<p>Returns the maximum number of ETS tables allowed. This limit
@@ -5903,9 +6144,24 @@ ok
<seealso marker="#system_info_multi_scheduling">erlang:system_info(multi_scheduling)</seealso>, and
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
+ <tag><c>nif_version</c></tag>
+ <item>
+ <p>Returns a string containing the erlang NIF version
+ used by the runtime system. It will be on the form "&lt;major ver&gt;.&lt;minor ver&gt;".</p>
+ </item>
<tag><marker id="system_info_otp_release"><c>otp_release</c></marker></tag>
<item>
- <p>Returns a string containing the OTP release number.</p>
+ <p>Returns a string containing the OTP release number of the
+ OTP release that the currently executing ERTS application is
+ part of.</p>
+ <p>As of OTP release 17, the OTP release number corresponds to
+ the major OTP version number. There is no
+ <c>erlang:system_info()</c> argument giving the exact OTP
+ version. This since the exact OTP version in the general case
+ is hard to determine. For more information see
+ <seealso marker="doc/system_principles:versions">the
+ documentation of versions in the system principles
+ guide</seealso>.</p>
</item>
<tag><marker id="system_info_port_parallelism"><c>port_parallelism</c></marker></tag>
<item><p>Returns the default port parallelism scheduling hint used.
@@ -6055,6 +6311,13 @@ ok
(<seealso marker="erts:erl_driver#driver_async">driver_async()</seealso>)
as an integer.</p>
</item>
+ <tag><marker id="system_info_tolerant_timeofday"><c>tolerant_timeofday</c></marker></tag>
+ <item>
+ <p>Returns whether compensation for sudden changes of system
+ time is <c>enabled</c> or <c>disabled</c>.</p>
+ <p>See also <seealso marker="erts:erl#+c">+c</seealso>
+ command line flag.</p>
+ </item>
<tag><c>trace_control_word</c></tag>
<item>
<p>Returns the value of the node's trace control word.
@@ -6371,11 +6634,12 @@ ok
some details of the encoding. This option was
introduced in R11B-4. Currently, the allowed values for <c><anno>Version</anno></c>
are <c>0</c> and <c>1</c>.</p>
- <p><c>{minor_version, 1}</c> forces any floats in the term to be encoded
+ <p><c>{minor_version, 1}</c> is since 17.0 the default, it forces any floats in
+ the term to be encoded
in a more space-efficient and exact way (namely in the 64-bit IEEE format,
rather than converted to a textual representation). <c>binary_to_term/1</c>
- in R11B-4 and later is able decode the new representation.</p>
- <p><c>{minor_version, 0}</c> is currently the default, meaning that floats
+ in R11B-4 and later is able decode this representation.</p>
+ <p><c>{minor_version, 0}</c> meaning that floats
will be encoded using a textual representation; this option is useful if
you want to ensure that releases prior to R11B-4 can decode resulting
binary.</p>
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml
index 81dffe45cf..c3fc3b1686 100644
--- a/erts/doc/src/erlc.xml
+++ b/erts/doc/src/erlc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -234,6 +234,16 @@ erlc +export_all file.erl</pre>
from the shell.</p>
<p>Supported options: -I, -o, -D, -v, -W, -b.</p>
</item>
+ <tag>.S</tag>
+ <item>
+ <p>Erlang assembler source code. It generates a <c><![CDATA[.beam]]></c> file.</p>
+ <p>Supported options: same as for .erl.</p>
+ </item>
+ <tag>.core</tag>
+ <item>
+ <p>Erlang core source code. It generates a <c><![CDATA[.beam]]></c> file.</p>
+ <p>Supported options: same as for .erl.</p>
+ </item>
<tag>.yrl</tag>
<item>
<p>Yecc source code. It generates an <c><![CDATA[.erl]]></c> file.</p>
diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml
index 365ae21d39..71cee714a5 100644
--- a/erts/doc/src/erlsrv.xml
+++ b/erts/doc/src/erlsrv.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1998</year><year>2012</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml
index 49ee740a73..1ade41f1aa 100644
--- a/erts/doc/src/erts_alloc.xml
+++ b/erts/doc/src/erts_alloc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2002</year><year>2013</year>
+ <year>2002</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -395,16 +395,17 @@
<c><![CDATA[<utilization>]]></c> is an integer in the range
<c>[0, 100]</c> representing utilization in percent. When a
utilization value larger than zero is used, allocator instances
- are allowed to abandon multiblock carriers. Currently the default
- is zero. If <c>de</c> (default enabled) is passed instead of a
- <c><![CDATA[<utilization>]]></c>, a recomended non zero utilization
- value will be used. The actual value chosen depend on allocator
- type and may be changed between ERTS versions. Carriers will be
- abandoned when memory utilization in the allocator instance falls
- below the utilization value used. Once a carrier has been abandoned,
- no new allocations will be made in it. When an allocator instance
- gets an increased multiblock carrier need, it will first try to
- fetch an abandoned carrier from an allocator instances of the same
+ are allowed to abandon multiblock carriers. If <c>de</c> (default
+ enabled) is passed instead of a <c><![CDATA[<utilization>]]></c>,
+ a recomended non zero utilization value will be used. The actual
+ value chosen depend on allocator type and may be changed between
+ ERTS versions. Currently the default equals <c>de</c>, but this
+ may be changed in the future. Carriers will be abandoned when
+ memory utilization in the allocator instance falls below the
+ utilization value used. Once a carrier has been abandoned, no new
+ allocations will be made in it. When an allocator instance gets an
+ increased multiblock carrier need, it will first try to fetch an
+ abandoned carrier from an allocator instances of the same
allocator type. If no abandoned carrier could be fetched, it will
create a new empty carrier. When an abandoned carrier has been
fetched it will function as an ordinary carrier. This feature has
@@ -530,15 +531,9 @@
<p>Multiple, thread specific instances of the allocator.
This option will only have any effect on the runtime system
with SMP support. Default behaviour on the runtime system with
- SMP support:</p>
- <taglist>
- <tag><c>ll_alloc</c></tag>
- <item><c>1</c> instance.</item>
- <tag>Other allocators</tag>
- <item><c>NoSchedulers+1</c> instances. Each scheduler will use
- a lock-free instance of its own and other threads will use
- a common instance.</item>
- </taglist>
+ SMP support is <c>NoSchedulers+1</c> instances. Each scheduler will use
+ a lock-free instance of its own and other threads will use
+ a common instance.</p>
<p>It was previously (before ERTS version 5.9) possible to configure
a smaller amount of thread specific instances than schedulers.
This is, however, not possible any more.</p>
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml
index 9e2a87dde6..9159d68f60 100644
--- a/erts/doc/src/escript.xml
+++ b/erts/doc/src/escript.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>2007</year><year>2013</year>
+ <year>2007</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -44,6 +44,7 @@
<p><c>escript</c> runs a script written in Erlang.</p>
<p>Here follows an example.</p>
<pre>
+$ <input>chmod u+x factorial</input>
$ <input>cat factorial</input>
#!/usr/bin/env escript
%% -*- erlang -*-
@@ -66,12 +67,13 @@ usage() ->
fac(0) -> 1;
fac(N) -> N * fac(N-1).
-$ <input>factorial 5</input>
+$ <input>./factorial 5</input>
factorial 5 = 120
-$ <input>factorial</input>
+$ <input>./factorial</input>
usage: factorial integer
-$ <input>factorial five</input>
-usage: factorial integer </pre>
+$ <input>./factorial five</input>
+usage: factorial integer
+ </pre>
<p>The header of the Erlang script in the example differs from
a normal Erlang module. The first line is intended to be the
interpreter line, which invokes <c>escript</c>. However if you
@@ -90,6 +92,18 @@ $ <input>escript factorial 5</input> </pre>
marker="stdlib:epp#encoding">encoding</seealso> it can be
located on the second line.</p>
+ <note><p>
+ The encoding specified by the above mentioned comment
+ applies to the script itself. The encoding of the
+ I/O-server, however, has to be set explicitly like this:
+<code>io:setopts([{encoding, unicode}])</code></p>
+ <p>The default encoding of the I/O-server for <c>standard_io</c>
+ is <c>latin1</c>
+ since the script runs in a non-interactive terminal
+ (see <seealso marker="stdlib:unicode_usage#unicode_options_summary">
+ Using Unicode in Erlang</seealso>).
+ </p></note>
+
<p>On the third line (or second line depending on the presence
of the Emacs directive), it is possible to give arguments to
the emulator, such as </p>
@@ -139,8 +153,9 @@ halt(1).</pre>
-include_lib("kernel/include/file.hrl").</pre>
<p>to include the record definitions for the records used by the
<c>file:read_link_info/1</c> function. You can also select
- encoding here, but if there is a valid encoding comment on
- the second line it takes precedence.</p>
+ encoding by including a encoding comment here, but if there
+ is a valid encoding comment on the second line it takes
+ precedence.</p>
<p>The script will be checked for syntactic and semantic
correctness before being run. If there are warnings (such as
@@ -161,7 +176,7 @@ halt(1).</pre>
If much of the execution takes place in interpreted code it
may be worthwhile to compile it, even though the compilation
itself will take a little while. It is also possible to supply
- <c>native</c> instead of compile, this will compile the script
+ <c>native</c> instead of <c>compile</c>, this will compile the script
using the native flag, again depending on the characteristics
of the escript this could or could not be worth while.</p>
@@ -221,8 +236,13 @@ factorial 5 = 120
<v>EmuArgs = string() | 'undefined'</v>
<v>Body = {source, SourceCode}
| {beam, BeamCode}
- | {archive, ZipArchive}</v>
- <v>SourceCode = BeamCode = ZipArchive = binary()</v>
+ | {archive, ZipArchive}
+ | {archive, ZipFiles, ZipOptions}</v>
+ <v>SourceCode = BeamCode = file:filename() | binary()</v>
+ <v>ZipArchive = <seealso marker="stdlib:zip#type-filename">zip:filename()</seealso> | binary()</v>
+ <v>ZipFiles = [ZipFile]</v>
+ <v>ZipFile = file:filename() | {file:filename(), binary()} | {file:filename(), binary(), file:file_info()}</v>
+ <v>ZipOptions = [<seealso marker="stdlib:zip#type-create_option">zip:create_option()</seealso>]</v>
</type>
<desc>
<p>The <marker id="create_2"></marker> <c>create/2</c>
@@ -237,7 +257,7 @@ factorial 5 = 120
can either be returned as a binary or written to file.</p>
<p>As an example of how the function can be used, we create an
- interpreted escript which uses emu_args to set some emulator
+ interpreted escript which uses <c>emu_args</c> to set some emulator
flag. In this case it happens to disable the smp_support. We
do also extract the different sections from the newly created
script:</p>
diff --git a/erts/doc/src/fascicules.xml b/erts/doc/src/fascicules.xml
index cae197a516..1c371bd9c8 100644
--- a/erts/doc/src/fascicules.xml
+++ b/erts/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml
index 2a033c037c..d40bc5f9ee 100644
--- a/erts/doc/src/inet_cfg.xml
+++ b/erts/doc/src/inet_cfg.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2010</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/init.xml b/erts/doc/src/init.xml
index d5c43f6e57..09b5493341 100644
--- a/erts/doc/src/init.xml
+++ b/erts/doc/src/init.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml
index bdcf9c3816..334b47d34c 100644
--- a/erts/doc/src/match_spec.xml
+++ b/erts/doc/src/match_spec.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2012</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index 8c008c493e..35e6e55e72 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -30,6 +30,1557 @@
</header>
<p>This document describes the changes made to the ERTS application.</p>
+<section><title>Erts 6.4.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The VTS mode in Common Test has been modified to use a
+ private version of the Webtool application (ct_webtool).</p>
+ <p>
+ Own Id: OTP-12704 Aux Id: OTP-10922 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix missing quotation in the <c>LM_FIND_EMU_CC</c>
+ <c>autoconf</c> macro which could cause build failures.</p>
+ <p>
+ Own Id: OTP-12388</p>
+ </item>
+ <item>
+ <p>
+ Fix erroneous printout of monitors in crashdump file.</p>
+ <p>
+ Own Id: OTP-12537</p>
+ </item>
+ <item>
+ <p>
+ The runtime system without SMP support could crash in the
+ BIF <c>port_control/3</c> if the port that was being
+ accessed died during the call to the BIF.</p>
+ <p>
+ Own Id: OTP-12544 Aux Id: Seq12777 </p>
+ </item>
+ <item>
+ <p>
+ Avoid corrupt oversized integer to be created from binary
+ matching. Instead throw system_limit exception which is
+ the correct behavior. A peculiar symptom of this bug was
+ that bitwise operations (band, bor, bxor) on such
+ oversized integers could return the empty list [].
+ Credit: Mikael Pettersson, Nico Kruber</p>
+ <p>
+ Own Id: OTP-12556</p>
+ </item>
+ <item>
+ <p>
+ A race condition when calling <c>port_info/1</c> could
+ cause a memory fault has been fixed.</p>
+ <p>
+ Own Id: OTP-12587</p>
+ </item>
+ <item>
+ <p>
+ Fix comparison of exact terms. An overflow that could
+ cause faulty comparisons has been fixed. Comparison of
+ exact terms is exclusively used within Maps.</p>
+ <p>
+ Own Id: OTP-12623</p>
+ </item>
+ <item>
+ <p>
+ Fix bug in <c>list_to_integer/1</c> for very long lists
+ that could cause VM crash.</p>
+ <p>
+ Own Id: OTP-12624</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Introduced a runtime system internal 64-bit API for
+ atomic memory operations.</p>
+ <p>
+ Own Id: OTP-12351</p>
+ </item>
+ <item>
+ <p>
+ Add command line argument option for the initial size of
+ process dictionaries.</p>
+ <p>
+ Use '+hpds &lt;size&gt;' to set initial process
+ dictionary size for spawned processes.</p>
+ <p>
+ Own Id: OTP-12535 Aux Id: seq12809 </p>
+ </item>
+ <item>
+ <p>
+ Fix documentation on $char for Unicode</p>
+ <p>
+ Own Id: OTP-12545</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix getifaddrs realloc pointer error</p>
+ <p>
+ When a buffer was exhausted and subsequently reallocated,
+ we could get an unsafe pointer pointing to faulty memory.</p>
+ <p>
+ For this to occur we would need to have a large number of
+ interfaces and a reallocation of memory to a lower
+ addresses.</p>
+ <p>
+ The symptom would be garbage returned from
+ erlang:port_control(Port, 25, [])
+ (prim_inet:getifaddrs(Port) resulting in a badarg) or a
+ segmentation fault.</p>
+ <p>
+ Own Id: OTP-12445</p>
+ </item>
+ <item>
+ <p>
+ Don't close all file descriptors twice in child_setup</p>
+ <p>
+ The commit c2b4eab25c907f453a394d382c04cd04e6c06b49
+ introduced an error in which child_setup erroneously
+ tried to close all file descriptors twice.</p>
+ <p>
+ Use closefrom() if available when closing all file
+ descriptors.</p>
+ <p>
+ The function closefrom() was only used in the vfork()
+ case before but is now also used in the fork() case if
+ available.</p>
+ <p>
+ Own Id: OTP-12446</p>
+ </item>
+ <item>
+ <p>
+ During a crashdump all file descriptors are closed to
+ ensure the closing of the epmd port and to reserve a file
+ descriptor for the crashdump file.</p>
+ <p>
+ If a driver (third party library) cannot handle closing
+ of sockets this could result in a segmentation fault in
+ which case a crashdump would not be produced. This is now
+ fixed by only closing inets sockets via an emergency
+ close callback to the driver and thus closing the epmd
+ socket.</p>
+ <p>
+ Own Id: OTP-12447</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix HiPE debug lock checking on OS X 64bit</p>
+ <p>
+ Position-independent code is mandatory on OS X. We use
+ r11 as an intermediate register to fill
+ BIF_P-&gt;hipe.bif_callee. This fixes the following error
+ when doing `make debug FLAVOR=smp`:</p>
+ <p>
+ clang -cc1as: fatal error: error in backend: 32-bit
+ absolute addressing is not supported in 64-bit mode</p>
+ <p>
+ Own Id: OTP-12188</p>
+ </item>
+ <item>
+ <p>
+ Fix race bug that could cause VM crash in
+ <c>erlang:port_get_data/1</c> if the port was closed by a
+ concurrent process. Also fix fatal bug if
+ <c>port_set_data/2</c> is called with a non-immediate
+ data term. Both bugs exist since R16B01.</p>
+ <p>
+ Own Id: OTP-12208</p>
+ </item>
+ <item>
+ <p>
+ Correct make variable SSL_DED_LD_RUNTIME_LIBRARY_PATH
+ when erl_xcomp_sysroot ends with a slash.</p>
+ <p>
+ Own Id: OTP-12216 Aux Id: seq12700 </p>
+ </item>
+ <item>
+ <p>
+ Fix two cases of unreachable code caused by false use of
+ assigment operators.</p>
+ <p>
+ Own Id: OTP-12222</p>
+ </item>
+ <item>
+ <p>
+ Fix bug when hipe compiled code makes tail call to a BIF
+ that disables GC while trapping (sush as binary_to_list,
+ list_to_binary, binary_to_term, term_to_binary).</p>
+ <p>
+ Own Id: OTP-12231</p>
+ </item>
+ <item>
+ <p>
+ Fix bug when a migrated empty memory carrier is reused
+ just before it should be destroyed by the thread that
+ created it.</p>
+ <p>
+ Own Id: OTP-12249</p>
+ </item>
+ <item>
+ <p>
+ Prevents compile-time errors in NIFs, when the compiler
+ is instructed to treat missing field initializers as
+ errors, by adding an initializer for the new options
+ field which was added to ErlNifEntry for 17.3.</p>
+ <p>
+ Own Id: OTP-12266</p>
+ </item>
+ <item>
+ <p>
+ Fixed CPU topology detection on FreeBSD systems where
+ Erlang/OTP is compiled by new C compilers (including, but
+ possibly not limited to, gcc 4.9 and clang).</p>
+ <p>
+ Own Id: OTP-12267</p>
+ </item>
+ <item>
+ <p>
+ Use C99 function isfinite() instead of finite() when
+ available on non GCC compilers.</p>
+ <p>
+ Own Id: OTP-12268</p>
+ </item>
+ <item>
+ <p>
+ Fix bug on windows where an incorrect number of links
+ could be returned when doing file:read_file_info on a
+ directory.</p>
+ <p>
+ Own Id: OTP-12269</p>
+ </item>
+ <item>
+ <p>
+ Fix rare bug when purging module on VM started with
+ +Meamin.</p>
+ <p>
+ Own Id: OTP-12273</p>
+ </item>
+ <item>
+ <p>
+ Repair run_erl terminal window size adjustment sent from
+ to_erl. This was broken in OTP 17.0 which could lead to
+ strange cursor behaviour in the to_erl shell.</p>
+ <p>
+ Own Id: OTP-12275 Aux Id: seq12739 </p>
+ </item>
+ <item>
+ <p>
+ Fixed bug on windows causing gen_tcp/udp to return an
+ error when given an fd to work with.</p>
+ <p>
+ Own Id: OTP-12289</p>
+ </item>
+ <item>
+ <p>
+ Fix various internal erts issues where negating a signed
+ integer in C would trigger undefined behavior. This fixes
+ issues when dividing with bignums and list_to_integer.</p>
+ <p>
+ Own Id: OTP-12290</p>
+ </item>
+ <item>
+ <p>
+ When flushing output to stdout on windows, the emulator
+ could sometimes hang indefinitely waiting for the flush
+ to complete. This has been fixed.</p>
+ <p>
+ Own Id: OTP-12291</p>
+ </item>
+ <item>
+ <p>
+ Fix so that non-smp emulators with dirty scheduler
+ support shows the correct number of dirty schedulers when
+ calling erlang:system_info(system_version).</p>
+ <p>
+ Own Id: OTP-12295</p>
+ </item>
+ <item>
+ <p>
+ Add <c>nif_version</c> to <c>erlang:system_info/1</c> in
+ order to get the NIF API version of the runtime system in
+ a way similar to <c>driver_version</c>.</p>
+ <p>
+ Own Id: OTP-12298</p>
+ </item>
+ <item>
+ <p>
+ Fix bug that could cause the return value from dirty NIF
+ with zero arity to be treated as garbage, leading to VM
+ crash.</p>
+ <p>
+ Own Id: OTP-12300</p>
+ </item>
+ <item>
+ <p>
+ Improve allocation carrier migration search logic. This
+ will reduce the risk of failed migrations that could lead
+ to excess memory consumption. It will also improve smp
+ performance due to reduced memory contention on the
+ migration pool.</p>
+ <p>
+ Own Id: OTP-12323</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Introduced support for eager check I/O.</p>
+ <p>By default eager check I/O will be disabled, but this
+ will most likely be changed in OTP 18. When eager check
+ I/O is enabled, schedulers will more frequently check for
+ I/O work. Outstanding I/O operations will however not be
+ prioritized to the same extent as when eager check I/O is
+ disabled.</p>
+ <p>Eager check I/O can be enabled using the <c>erl</c>
+ command line argument: <seealso
+ marker="erl#+secio"><c>+secio true</c></seealso></p>
+ <p>Characteristics impact when enabled:</p> <list>
+ <item>Lower latency and smoother management of externally
+ triggered I/O operations.</item> <item>A slightly reduced
+ priority of externally triggered I/O operations.</item>
+ </list>
+ <p>
+ Own Id: OTP-12117</p>
+ </item>
+ <item>
+ <p>
+ Fix erts .app-file</p>
+ <p>
+ Own Id: OTP-12189</p>
+ </item>
+ <item>
+ <p>
+ Add configure option --with-ssl-incl=PATH to support
+ OpenSSL installations with headers and libraries at
+ different places.</p>
+ <p>
+ Own Id: OTP-12215 Aux Id: seq12700 </p>
+ </item>
+ <item>
+ <p>
+ Optimization of atomic memory operations with release
+ barrier semantics on 32-bit PowerPC when using the
+ implementation included in OTP.</p>
+ <p>
+ Own Id: OTP-12250</p>
+ </item>
+ <item>
+ <p>
+ Minor adjustment of scheduler activation code making sure
+ that an activation of a scheduler is not prevented by its
+ run-queue being non-empty. (Thanks to Songlu Cai)</p>
+ <p>
+ Own Id: OTP-12287</p>
+ </item>
+ <item>
+ <p>
+ Improved support for atomic memory operations provided by
+ the <url
+ href="https://github.com/ivmai/libatomic_ops/"><c>libatomic_ops</c></url>
+ library. Most importantly support for use of native
+ double word atomics when implemented by
+ <c>libatomic_ops</c> (for example, implemented for ARM).</p>
+ <p>
+ The <seealso
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP_Configuring_Atomic-Memory-Operations-and-the-VM"><c>$ERL_TOP/HOWTO/INSTALL.md</c></seealso>
+ document now also more clearly describes when you want to
+ build together with a <c>libatomic_ops</c> installation.</p>
+ <p>
+ Own Id: OTP-12302</p>
+ </item>
+ <item>
+ <p>
+ Add configure option --with-ssl-rpath to control which
+ runtime library path to use for dynamic linkage toward
+ OpenSSL.</p>
+ <p>
+ Own Id: OTP-12316 Aux Id: seq12753 </p>
+ </item>
+ <item>
+ <p>
+ Added systemd notify support to epmd</p>
+ <p>
+ Own Id: OTP-12321</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.2.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix bug when an migrated empty memory carrier is reused
+ just before it should be destroyed by the thread that
+ created it.</p>
+ <p>
+ Own Id: OTP-12249</p>
+ </item>
+ <item>
+ <p>
+ Repair run_erl terminal window size adjustment sent from
+ to_erl. This was broken in OTP 17.0 which could lead to
+ strange cursor behaviour in the to_erl shell.</p>
+ <p>
+ Own Id: OTP-12275 Aux Id: seq12739 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ General documentation updates.</p>
+ <p>
+ Own Id: OTP-12052</p>
+ </item>
+ <item>
+ <p>A bug in the VM code implementing sending of signals
+ to ports could cause the receiving port queue to remain
+ in a busy state forever. When this state had been
+ reached, processes sending command signals to the port
+ either got suspended forever, or, if the <c>nosuspend</c>
+ feature was used, always failed to send to the port. This
+ bug was introduced in ERTS version 5.10.</p>
+ <p>In order for this bug to be triggered on a port, one
+ had to at least once utilize the <c>nosuspend</c>
+ functionality when passing a signal to the port. This by
+ either calling</p> <list> <item> <seealso
+ marker="erlang#port_command/3"><c>port_command(Port,
+ Data, [nosuspend | Options])</c></seealso>, </item>
+ <item> <seealso
+ marker="erlang#send/3"><c>erlang:send(Port, {PortOwner,
+ {command, Data}}, [nosuspend | Options])</c></seealso>,
+ </item> <item> <seealso
+ marker="erlang#send_nosuspend/2"><c>erlang:send_nosuspend(Port,
+ {PortOwner, {command, Data}})</c></seealso>, or </item>
+ <item> <seealso
+ marker="erlang#send_nosuspend/3"><c>erlang:send_nosuspend(Port,
+ {PortOwner, {command, Data}}, Options)</c></seealso>.
+ </item> </list>
+ <p>Thanks Vasily Demidenok for reporting the issue, and
+ Sergey Kudryashov for providing a testcase.</p>
+ <p>
+ Own Id: OTP-12082 Aux Id: OTP-10336 </p>
+ </item>
+ <item>
+ <p>
+ Fix size overflow bug at memory allocation. A memory
+ allocation call, with an insane size close to the entire
+ address space, could return successfully as if it had
+ allocated just a few bytes. (Thanks to Don A. Bailey for
+ reporting)</p>
+ <p>
+ Own Id: OTP-12091</p>
+ </item>
+ <item>
+ <p>
+ Fix various issues where negating a signed integer would
+ trigger undefined behaviour. This fixes issues in the
+ enif_make_int64 interface and some edge cases inside the
+ erlang runtime system.</p>
+ <p>
+ Own Id: OTP-12097</p>
+ </item>
+ <item>
+ <p>
+ The documentation erroneously listed the <seealso
+ marker="erl#+swct"><c>+swct</c></seealso> command line
+ argument under <c>+sws</c>.</p>
+ <p>
+ Own Id: OTP-12102 Aux Id: OTP-10994 </p>
+ </item>
+ <item>
+ <p>
+ Profiling messages could be delivered out of order when
+ profiling on <c>runnable_procs</c> and/or
+ <c>runnable_ports</c> using <seealso
+ marker="erlang#system_profile/2"><c>erlang:system_profile/2</c></seealso>.
+ This bug was introduced in ERTS version 5.10.</p>
+ <p>
+ Own Id: OTP-12105 Aux Id: OTP-10336 </p>
+ </item>
+ <item>
+ <p>
+ Various logging fixes, including: Add run queue index to
+ the process dump in crash dumps.<br/> Add thread index to
+ enomem slogan when crashing.<br/> Remove error logger
+ message for sending messages to old instances of the same
+ node.</p>
+ <p>
+ Own Id: OTP-12115</p>
+ </item>
+ <item>
+ <p>
+ Fix compiler warnings reported by LLVM</p>
+ <p>
+ Own Id: OTP-12138</p>
+ </item>
+ <item>
+ <p>
+ Correct conversion of <c>MIN_SMALL</c> by
+ <c>list_to_integer/1</c> and <c>binary_to_integer/1</c>.
+ The bug produced an unnormalized bignum which can cause
+ strange behavior such as comparing different to a correct
+ <c>MIN_SMALL</c> integer. The value <c>MIN_SMALL</c> is
+ <c>-(1 bsl 27) = -134217728</c> on a 32-bit VM and <c>-(1
+ bsl 59) = -576460752303423488</c> on a 64-bit VM. (Thanks
+ to Jesper Louis Andersen, Mikael Pettersson and Anthony
+ Ramine for report, patch and optimization suggestion)</p>
+ <p>
+ Own Id: OTP-12140</p>
+ </item>
+ <item>
+ <p>
+ Fix bug in <c>term_to_binary</c> that reallocates binary
+ with inconsistent size information. Bug has never been
+ confirmed to be the cause of any faulty behavior.</p>
+ <p>
+ Own Id: OTP-12141</p>
+ </item>
+ <item>
+ <p>
+ Real_path method used while prim loading archive files
+ was not taking into account the fact that windows
+ directory symlinks can be across different drives.</p>
+ <p>
+ Own Id: OTP-12155</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add log2 histogram to lcnt for lock wait time</p>
+ <p>
+ Own Id: OTP-12059</p>
+ </item>
+ <item>
+ <p>
+ Introduced <seealso
+ marker="erl_nif#enif_schedule_nif"><c>enif_schedule_nif()</c></seealso>
+ to the NIF API.</p>
+ <p>
+ The <c>enif_schedule_nif()</c> function allows a
+ long-running NIF to be broken into separate NIF
+ invocations without the help of a wrapper function
+ written in Erlang. The NIF first executes part of the
+ long-running task, then calls <c>enif_schedule_nif()</c>
+ to schedule a NIF for later execution to continue the
+ task. Any number of NIFs can be scheduled in this manner,
+ one after another. Since the emulator regains control
+ between invocations, this helps avoid problems caused by
+ native code tying up scheduler threads for too long.</p>
+ <p>
+ The <c>enif_schedule_nif()</c> function also replaces the
+ <c>enif_schedule_dirty_nif()</c> in the experimental
+ dirty NIF API. Note that the only incompatible changes
+ made are in the experimental dirty NIF API.</p>
+ <p>
+ See the <seealso marker="erl_nif">NIF
+ documentation</seealso> for more information.</p>
+ <p>
+ Thanks to Steve Vinoski.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12128</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ OTP-11850 fixed filelib:wildcard/1 to work with broken
+ symlinks. This correction, however, introduced problems
+ since symlinks were no longer followed for functions like
+ filelib:ensure_dir/1, filelib:is_dir/1,
+ filelib:file_size/1, etc. This is now corrected.</p>
+ <p>
+ Own Id: OTP-12054 Aux Id: seq12660 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.1.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed ETHR_FORCE_INLINE which caused the build to break
+ on some platforms without adequate thread support
+ (VxWorks).</p>
+ <p>
+ Own Id: OTP-12010</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>The documentation for <c>spawn_opt/5</c> now has a
+ note mentioning that the <c>monitor</c> option is not
+ supported.</p>
+ <p>
+ Own Id: OTP-11849</p>
+ </item>
+ <item>
+ <p>
+ Fix broken system monitoring of <c>large_heap</c> for
+ non-smp VM. No message for <c>large_heap</c> was ever
+ sent on non-smp VM. Bug exist since R16B.</p>
+ <p>
+ Own Id: OTP-11852</p>
+ </item>
+ <item>
+ <p>
+ The emulator without SMP support crashed when passing a
+ message to a process without enough heap space for the
+ message. This bug was introduced in <c>erts-6.0</c>.</p>
+ <p>
+ Own Id: OTP-11887 Aux Id: OTP-11388 </p>
+ </item>
+ <item>
+ <p>
+ Fix race between ETS table deletion and unfixation that
+ could cause VM crash. The race could happen between a
+ terminating process that does not own the table but has a
+ fixation on it and another process that deletes the table
+ (maybe the owner terminating) at the same time. Bug
+ existed since R15B02.</p>
+ <p>
+ Own Id: OTP-11892</p>
+ </item>
+ <item>
+ <p>The string following the <c>-eval</c> option when
+ invoking <c>erl</c> would not be properly translated from
+ UTF-8 to a list of Unicode characters (as would the
+ arguments for <c>-run</c>).</p>
+ <p>That bug would cause the build of Erlang/OTP to fail
+ when building in a directory whose pathname contained
+ non-US ASCII characters encoded in UTF-8. (Thanks to Eric
+ Pailleau for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11916</p>
+ </item>
+ <item>
+ <p>
+ Fix erts_debug:size/1 to handle Map sizes</p>
+ <p>
+ Own Id: OTP-11923</p>
+ </item>
+ <item>
+ <p>
+ Removed <c>erlang:bitstr_to_list/1</c> and
+ <c>erlang:list_to_bitstr/1</c>. They were added by
+ mistake, and have always raised an <c>undefined</c>
+ exception when called.</p>
+ <p>
+ Own Id: OTP-11942</p>
+ </item>
+ <item>
+ <p>
+ Fixed compilation using mingw-w64 on Windows.</p>
+ <p>
+ Thanks to Jani Hakala.</p>
+ <p>
+ Own Id: OTP-11945</p>
+ </item>
+ <item>
+ <p>
+ The git sha is no longer printed in the shell start
+ header when erlang is built from a tagged git release.</p>
+ <p>
+ Own Id: OTP-11961</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug where <c>send</c> trace events were
+ erroneously dropped when the send was done to a
+ registered process. This bug was introduced in R16B.</p>
+ <p>
+ Own Id: OTP-11968</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The following native functions now bump an appropriate
+ amount of reductions and yield when out of
+ reductions:</p> <list>
+ <item><c>erlang:binary_to_list/1</c></item>
+ <item><c>erlang:binary_to_list/3</c></item>
+ <item><c>erlang:bitstring_to_list/1</c></item>
+ <item><c>erlang:list_to_binary/1</c></item>
+ <item><c>erlang:iolist_to_binary/1</c></item>
+ <item><c>erlang:list_to_bitstring/1</c></item>
+ <item><c>binary:list_to_bin/1</c></item> </list>
+ <p>Characteristics impact:</p> <taglist>
+ <tag>Performance</tag> <item>The functions converting
+ from lists got a performance loss for very small lists,
+ and a performance gain for very large lists.</item>
+ <tag>Priority</tag> <item>Previously a process executing
+ one of these functions effectively got an unfair priority
+ boost. This priority boost depended on the input size.
+ The larger the input was, the larger the priority boost
+ got. This unfair priority boost is now lost. </item>
+ </taglist>
+ <p>
+ Own Id: OTP-11888</p>
+ </item>
+ <item>
+ <p>
+ The systemd features of epmd have been removed from epmd
+ by default. To enable them you have to build erlang with
+ the configure option --enable-systemd.</p>
+ <p>
+ Own Id: OTP-11921</p>
+ </item>
+ <item>
+ <p>
+ Removed Erlang wrapper code used when calling
+ <c>binary_to_term/1</c>, and <c>binary_to_term/2</c>.
+ This improves the performance of these BIFs especially
+ when they are called with small binaries as input.</p>
+ <p>
+ Own Id: OTP-11931</p>
+ </item>
+ <item>
+ <p>
+ Add erlang:system_info(tolerant_timeofday), an API to
+ check whether compensation for sudden changes of system
+ time is enabled or not.</p>
+ <p>
+ Own Id: OTP-11970</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix broken system monitoring of <c>large_heap</c> for
+ non-smp VM. No message for <c>large_heap</c> was ever
+ sent on non-smp VM. Bug exist since R16B.</p>
+ <p>
+ Own Id: OTP-11852</p>
+ </item>
+ <item>
+ <p>
+ Fixed type spec of <c>erlang:system_info/1</c>.</p>
+ <p>
+ Own Id: OTP-11859 Aux Id: OTP-11615 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 6.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The option dupnames did not work as intended in re. When
+ looking for names with {capture, [Name, ...]}, re:run
+ returned a random instance of the match for that name,
+ instead of the leftmost matching instance, which was what
+ the documentation stated. This is now corrected to adhere
+ to the documentation. The option {capture,all_names}
+ along with a re:inspect/2 function is also added to
+ further help in using named subpatterns.</p>
+ <p>
+ Own Id: OTP-11205</p>
+ </item>
+ <item>
+ <p>
+ Allow loading of NIF library with unicode path name</p>
+ <p>
+ Own Id: OTP-11408</p>
+ </item>
+ <item>
+ <p>
+ Allow loading of driver with unicode path name</p>
+ <p>
+ Own Id: OTP-11549</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug where starting Erlang without having an open
+ stdin on fd 0 would sometimes deadlock the emulator when
+ terminating.</p>
+ <p>
+ Own Id: OTP-11558</p>
+ </item>
+ <item>
+ <p>
+ The option '-names' in epmd now works on Windows (Thanks
+ to Johannes Weißl)</p>
+ <p>
+ Own Id: OTP-11565</p>
+ </item>
+ <item>
+ <p>
+ Correction of the examples in escript documentation.
+ (Thanks to Pierre Fenoll).</p>
+ <p>
+ Own Id: OTP-11577</p>
+ </item>
+ <item>
+ <p>
+ Fix bs_get_integer instruction</p>
+ <p>
+ The instruction bs_get_integer could unnecessarily
+ trigger a garbage collection in failure cases which is
+ unwanted or outright dangerous.</p>
+ <p>
+ Ex:</p>
+ <p>
+ &lt;&lt;X:Sz,_/bits&gt;&gt; = &lt;&lt;"some
+ binary"&gt;&gt;</p>
+ <p>
+ Previously, if Sz induced X to a bignum it would reserved
+ memory size this on the heap via a garbage collection
+ before checking if the size could actually match.</p>
+ <p>
+ It will now check the binary size before triggering a
+ collection.</p>
+ <p>
+ Own Id: OTP-11581</p>
+ </item>
+ <item>
+ <p>
+ Remove heap space overestimation in <c>binary_to_term</c>
+ (and remote message reception) for integers in the
+ intervals [-2147483648,-1] and [256,2147483647] on 64-bit
+ emulators.</p>
+ <p>
+ Own Id: OTP-11585</p>
+ </item>
+ <item>
+ <p>
+ Add support for detecting the separate tinfo library from
+ ncurses (Thanks to Dirkjan Ochtman)</p>
+ <p>
+ Own Id: OTP-11590</p>
+ </item>
+ <item>
+ <p>
+ Deprecation warning for system_flag(cpu_topology) has
+ been extended for removal in OTP 18 (Thanks to Steve
+ Vinoski for the update)</p>
+ <p>
+ Own Id: OTP-11602</p>
+ </item>
+ <item>
+ <p>
+ Documentation improvement regarding some awkward wording
+ around the +spp flag. (Thanks to Brian L. Troutwine )</p>
+ <p>
+ Own Id: OTP-11607</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug where sendfile would return the wrong error
+ code for a remotely closed socket if the socket was in
+ passive mode. (Thanks to Vincent Siliakus for reporting
+ the bug.)</p>
+ <p>
+ Own Id: OTP-11614</p>
+ </item>
+ <item>
+ <p>
+ Increase garbage collection tenure rate</p>
+ <p>The garbage collector tries to maintain the previous
+ heap block size during a minor gc, i.e. 'need' is not
+ utilized in determining the size of the new heap, instead
+ it relies on tenure and garbage to be sufficiently
+ large.</p>
+ <p>In instances during intense growing with exclusively
+ live data on the heap coupled with delayed tenure,
+ fullsweeps would be triggered directly after a minor gc
+ to make room for 'need' since the new heap would be
+ full.</p>
+ <p>To remedy this, the tenure of terms on the minor heap
+ will always happen (if it is below the high watermark)
+ instead of every other minor gc.</p>
+ <p>Characteristics Impact: Reduced CPU-time spent in
+ garbage collection but may infer delays in collecting
+ garbage from the heap. Tweak 'fullsweep_after' options to
+ increase gc pressure if needed.</p>
+ <p>
+ Own Id: OTP-11617</p>
+ </item>
+ <item>
+ <p>
+ Fix bug when comparing integers with floats larger than
+ 2^992. The bug could potentially cause memory corruption
+ on 32-bit emulators.</p>
+ <p>
+ Own Id: OTP-11618</p>
+ </item>
+ <item>
+ <p>
+ Cross-compilation fixes for TileraMDE-3.0.1.125620</p>
+ <p>
+ Own Id: OTP-11635</p>
+ </item>
+ <item>
+ <p>
+ sendfile no longer uses async threads by default</p>
+ <p>
+ This has been done because a slow client attack is
+ possible if the async thread pool is used. The scenario
+ is:</p>
+ <p>
+ Client does a request for a file and then slowly receives
+ the file one byte at a time. This will eventually fill
+ the async thread pool with blocking sendfile operations
+ and thus starving the vm of all file operations.</p>
+ <p>
+ If you still want to use the async threads pool for
+ sendfile an option to enable it has been introduced.</p>
+ <p>
+ Thanks to Christopher Faulet for identifying this
+ vulnerability.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11639</p>
+ </item>
+ <item>
+ <p>
+ Do proper rollback of calls to
+ <c>enif_open_resource_type</c> when load/upgrade
+ callbacks of NIF library return failure.</p>
+ <p>
+ Own Id: OTP-11722</p>
+ </item>
+ <item>
+ <p>
+ Changed the default configuration when configuring with
+ <c>$ERL_TOP/configure</c> to be the same as when
+ configuring with <c>$ERL_TOP/otp_build configure</c>.</p>
+ <p>
+ Previously floating point exceptions got enabled by
+ default on Linux when HiPE was enabled when configuring
+ with <c>$ERL_TOP/configure</c>, but not when configuring
+ with <c>$ERL_TOP/otp_build configure</c>. The default is
+ now in both cases not to use floating point exceptions
+ since there still exist unresolved issues with floating
+ point exceptions on Linux.</p>
+ <p>
+ For more information see <seealso
+ marker="doc/installation_guide:INSTALL"><c>$ERL_TOP/HOWTO/INSTALL.md</c></seealso>.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11723</p>
+ </item>
+ <item>
+ <p>
+ A comment in erl_db_tree.c no longer differ from the
+ code. (Thanks to Cobus Carstens)</p>
+ <p>
+ Own Id: OTP-11793</p>
+ </item>
+ <item>
+ <p>
+ Fix epmd debug functionality for VxWorks (Thanks to Jay
+ True)</p>
+ <p>
+ Own Id: OTP-11808</p>
+ </item>
+ <item>
+ <p>
+ Use closefrom/2 when available in child_setup (Thanks to
+ Rick Reed and Anthony Ramine)</p>
+ <p>
+ Own Id: OTP-11809</p>
+ </item>
+ <item>
+ <p>
+ Fix dtrace/systemtap bug where the probe arguments would
+ be concatenated due to faulty length calculation. </p>
+ <p>
+ Thanks to Michal Ptaszek and Scott Lystig Fritchie</p>
+ <p>
+ Own Id: OTP-11816</p>
+ </item>
+ <item>
+ <p>
+ It is now better documented that the <c>+fn*</c> flags to
+ <c>erl</c> also affect how command line parameters and
+ environment variables are read. (Thanks to Vlad
+ Dumitrescu)</p>
+ <p>
+ Own Id: OTP-11818</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Options to set match_limit and match_limit_recursion are
+ added to re:run. The option report_errors is also added
+ to get more information when re:run fails due to limits
+ or compilation errors.</p>
+ <p>
+ Own Id: OTP-10285</p>
+ </item>
+ <item>
+ <p> Dialyzer's <c>unmatched_return</c> warnings have been
+ corrected. </p>
+ <p>
+ Own Id: OTP-10908</p>
+ </item>
+ <item>
+ <p>
+ A common case is to wrap an argument to
+ <c>list_to_binary/1</c> in a list to ensure conversion
+ can happen even though the argument may already be a
+ binary. Take special care of this case and do not copy
+ binary.</p>
+ <p>
+ Impact: May cause incompatibility since a single binary
+ is no longer copied. Use <c>binary:copy/1,2</c> instead.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11082</p>
+ </item>
+ <item>
+ <p>
+ Make erlang:open_port/2 spawn and spawn_executable handle
+ unicode.</p>
+ <p>
+ Own Id: OTP-11105</p>
+ </item>
+ <item>
+ <p>
+ Handle unicode (widestring) in erl, erlc, heart, etc on
+ windows.</p>
+ <p>
+ Own Id: OTP-11135</p>
+ </item>
+ <item>
+ <p>
+ The version of the PCRE library Used by Erlang's re
+ module is raised to 8.33 from 7.6. This means, among
+ other things, better Unicode and Unicode Character
+ Properties support. New options connected to PCRE 8.33
+ are also added to the re module (ucd, notempty_atstart,
+ no_start_optimize). PCRE has extended the regular
+ expression syntax between 7.6 and 8.33, why this imposes
+ a potential incompatibility. Only very complicated
+ regular expressions may be affected, but if you know you
+ are using obscure features, please test run your regular
+ expressions and verify that their behavior has not
+ changed.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11204</p>
+ </item>
+ <item>
+ <p>Filenames containing UTF-8 encoded characters can now
+ be handled by erlc.</p>
+ <p>If you have set the <c>ERLC_EMULATOR</c> environment
+ variable, note that <c>erlc</c> in OTP 17 will only work
+ with <c>erl</c> in OTP 17 since the protocol between the
+ <c>erlc</c> program and the <c>erl_compile</c> module has
+ changed.</p>
+ <p>
+ Own Id: OTP-11248</p>
+ </item>
+ <item>
+ <p>
+ By giving --enable-static-{nifs,drivers} to configure it
+ is now possible to statically linking of nifs and drivers
+ to the main Erlang VM binary. At the moment only the asn1
+ and crypto nifs of the Erlang/OTP nifs and drivers have
+ been prepared to be statically linked. For more details
+ see the Installation Guide in the System documentation.</p>
+ <p>
+ Own Id: OTP-11258</p>
+ </item>
+ <item>
+ <p>
+ Erlang/OTP has been ported to the realtime operating
+ system OSE. The port supports both smp and non-smp
+ emulator. For details around the port and how to started
+ see the User's Guide in the <seealso
+ marker="ose:ose_intro">ose</seealso> application. </p>
+ <p>
+ Note that not all parts of Erlang/OTP has been ported. </p>
+ <p>
+ Notable things that work are: non-smp and smp emulators,
+ OSE signal interaction, crypto, asn1, run_erl/to_erl,
+ tcp, epmd, distribution and most if not all non-os
+ specific functionality of Erlang.</p>
+ <p>
+ Notable things that does not work are: udp/sctp, os_mon,
+ erl_interface, binding of schedulers.</p>
+ <p>
+ Own Id: OTP-11334</p>
+ </item>
+ <item>
+ <p>
+ Add the {active,N} socket option for TCP, UDP, and SCTP,
+ where N is an integer in the range -32768..32767, to
+ allow a caller to specify the number of data messages to
+ be delivered to the controlling process. Once the
+ socket's delivered message count either reaches 0 or is
+ explicitly set to 0 with inet:setopts/2 or by including
+ {active,0} as an option when the socket is created, the
+ socket transitions to passive ({active, false}) mode and
+ the socket's controlling process receives a message to
+ inform it of the transition. TCP sockets receive
+ {tcp_passive,Socket}, UDP sockets receive
+ {udp_passive,Socket} and SCTP sockets receive
+ {sctp_passive,Socket}. </p>
+ <p>
+ The socket's delivered message counter defaults to 0, but
+ it can be set using {active,N} via any gen_tcp, gen_udp,
+ or gen_sctp function that takes socket options as
+ arguments, or via inet:setopts/2. New N values are added
+ to the socket's current counter value, and negative
+ numbers can be used to reduce the counter value.
+ Specifying a number that would cause the socket's counter
+ value to go above 32767 causes an einval error. If a
+ negative number is specified such that the counter value
+ would become negative, the socket's counter value is set
+ to 0 and the socket transitions to passive mode. If the
+ counter value is already 0 and inet:setopts(Socket,
+ [{active,0}]) is specified, the counter value remains at
+ 0 but the appropriate passive mode transition message is
+ generated for the socket.</p>
+ <p>
+ Thanks to Steve Vinoski</p>
+ <p>
+ Own Id: OTP-11368</p>
+ </item>
+ <item>
+ <p>
+ A new optional scheduler utilization balancing mechanism
+ has been introduced. For more information see the
+ <seealso marker="erl#+sub"><c>+sub</c></seealso> command
+ line argument.</p>
+ <p>
+ Characteristics impact: None, when not enabled. When
+ enabled, changed timing in the system, normally a small
+ overhead due to measuring of utilization and calculating
+ balancing information. On some systems, such as old
+ Windows systems, the overhead can be quite substantial.
+ This time measurement overhead highly depend on the
+ underlying primitives provided by the OS.</p>
+ <p>
+ Own Id: OTP-11385</p>
+ </item>
+ <item>
+ <p>
+ A call to either the <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF may trigger garbage
+ collection of another processes than the process calling
+ the BIF. The previous implementations performed these
+ kinds of garbage collections without considering the
+ internal state of the process being garbage collected. In
+ order to be able to more easily and more efficiently
+ implement yielding native code, these types of garbage
+ collections have been rewritten. A garbage collection
+ like this is now triggered by an asynchronous request
+ signal, the actual garbage collection is performed by the
+ process being garbage collected itself, and finalized by
+ a reply signal to the process issuing the request. Using
+ this approach processes can disable garbage collection
+ and yield without having to set up the heap in a state
+ that can be garbage collected.</p>
+ <p>
+ The <seealso
+ marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>,
+ and <seealso
+ marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso>
+ BIFs have been introduced. Both taking an option list as
+ last argument. Using these, one can issue asynchronous
+ requests.</p>
+ <p>
+ <c>code:purge/1</c> and <c>code:soft_purge/1</c> have
+ been rewritten to utilize asynchronous
+ <c>check_process_code</c> requests in order to
+ parallelize work.</p>
+ <p>
+ Characteristics impact: A call to the
+ <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF will normally take longer
+ time to complete while the system as a whole wont be as
+ much negatively effected by the operation as before. A
+ call to <c>code:purge/1</c> and <c>code:soft_purge/1</c>
+ may complete faster or slower depending on the state of
+ the system while the system as a whole wont be as much
+ negatively effected by the operation as before.</p>
+ <p>
+ Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p>
+ </item>
+ <item>
+ <p>
+ Cleanup 'Buckets' and 'Time left' fields in crashdump to
+ ease parsing.</p>
+ <p>
+ Own Id: OTP-11419</p>
+ </item>
+ <item>
+ <p>
+ Add sync option to file:open/2.</p>
+ <p>
+ The sync option adds the POSIX O_SYNC flag to the open
+ system call on platforms that support the flag or its
+ equivalent, e.g., FILE_FLAG_WRITE_THROUGH on Windows. For
+ platforms that don't support it, file:open/2 returns
+ {error, enotsup} if the sync option is passed in. Thank
+ to Steve Vinoski and Joseph Blomstedt</p>
+ <p>
+ Own Id: OTP-11498</p>
+ </item>
+ <item>
+ <p>
+ erlang:binary_to_term will now cost an appropriate amount
+ of reductions and will interrupt (yield) for reschedule
+ if the term is big. This avoids too long schedules when
+ binary_to_term is used. (Thanks to Svante Karlsson for
+ the original patch)</p>
+ <p>
+ Impact: Programs running binary_to_term on large binaries
+ will run more smoothly, but rescheduling will impact the
+ single process performance of the BIF. Single threaded
+ benchmarks might show degraded performance of the BIF,
+ while general system behaviour will be improved.</p>
+ <p>
+ Own Id: OTP-11535 Aux Id: OTP-11388 </p>
+ </item>
+ <item>
+ <p>
+ Added high resolution icon for windows. (Thanks to Daniel
+ Goertz for the inspiration.)</p>
+ <p>
+ Own Id: OTP-11560</p>
+ </item>
+ <item>
+ <p>
+ Migration of memory carriers has been enabled by default
+ on all ERTS internal memory allocators based on the
+ <seealso
+ marker="erts_alloc#alloc_util"><c>alloc_util</c></seealso>
+ framework except for <c>temp_alloc</c>. That is, <seealso
+ marker="erts_alloc#M_acul"><c>+M&lt;S&gt;acul
+ de</c></seealso> is default for these allocators. Note
+ that this also implies changed allocation strategies for
+ all of these allocators. They will all now use the
+ "address order first fit carrier best fit" strategy.</p>
+ <p>
+ By passing <c>+Muacul 0</c> on the command line, all
+ configuration changes made by this change will be
+ reverted.</p>
+ <p>
+ Characteristics impact: Improved memory characteristics
+ with a smaller memory footprint at the expense of a quite
+ small performance cost.</p>
+ <p>
+ Own Id: OTP-11604 Aux Id: OTP-10279 </p>
+ </item>
+ <item>
+ <p>A clarification has been added to the documentation of
+ <c>-on_load()</c> in the Reference Manual that it is only
+ recommended for loading NIF libraries.</p>
+ <p>
+ Own Id: OTP-11611</p>
+ </item>
+ <item>
+ <p><c>+fnaw</c> is now default when starting the
+ emulator; it used to be <c>+fnl</c>.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11612</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see Map Expressions in the
+ <seealso marker="doc/reference_manual:expressions#map_expressions">
+ Reference Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p>
+ The previously deprecated driver API function
+ <c>driver_async_cancel()</c> has been removed. Due to
+ this, the driver API version has been bumped to 3.0.</p>
+ <p>
+ Thanks to Steve Vinoski.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11628</p>
+ </item>
+ <item>
+ <p>
+ Experimental "dirty scheduler" functionality has been
+ introduced. In order to try the functionality out, you
+ need to pass the command line argument
+ <c>--enable-dirty-schedulers</c> to <c>configure</c> when
+ building the system.</p>
+ <p>
+ Dirty schedulers can currently only be used by NIFs on a
+ system with SMP support. More information can be found in
+ the <seealso
+ marker="erl_nif#dirty_nifs"><c>erl_nif(3)</c></seealso>
+ documentation, the <seealso
+ marker="erl"><c>erl(1)</c></seealso> documentation, and
+ in the git commit comment of commit
+ 'c1c03ae4ee50e58b7669ea88ec4d29c6b2b67c7b'.</p>
+ <p>
+ Note that the functionality is <em>experimental</em>, and
+ <em>not supported</em>. This functionality <em>will</em>
+ be subject to backward incompatible changes. You should
+ <em>not</em> enable the dirty scheduler functionality on
+ production systems. It is only provided for testing.</p>
+ <p>
+ Thanks to Steve Vinoski.</p>
+ <p>
+ Own Id: OTP-11629</p>
+ </item>
+ <item>
+ <p>
+ Improve reduction cost and yielding of
+ <c>term_to_binary</c>. The reduction cost is increased
+ and garbage collection is disabled during yield.</p>
+ <p>
+ Impact: Improves system responsiveness when
+ <c>term_to_binary</c> is called with large terms without
+ significant degradation of single threaded performance.</p>
+ <p>
+ Own Id: OTP-11648 Aux Id: OTP-11388 </p>
+ </item>
+ <item>
+ <p>
+ By default, the system's version of zlib will be used,
+ provided its version is 1.2.4 or higher; otherwise the
+ built-in zlib will be used. The built-in version of zlib
+ has been bumped to 1.2.8. (Use the
+ <c>--enable-builtin-zlib</c> option to <c>configure</c>
+ to force the use of the built-in zlib.)</p>
+ <p>
+ Own Id: OTP-11669</p>
+ </item>
+ <item>
+ <p>
+ The default float encoding in binary_to_term and
+ external_size has been changed to use minor_mode 1
+ instead of 0.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11738</p>
+ </item>
+ <item>
+ <p>
+ Introduced the <c>configure</c> option
+ <c>--with-assumed-cache-line-size=SIZE</c>. For more
+ information see <seealso
+ marker="doc/installation_guide:INSTALL"><c>$ERL_TOP/HOWTO/INSTALL.md</c></seealso>.</p>
+ <p>
+ Own Id: OTP-11742</p>
+ </item>
+ <item>
+ <p>
+ Halfword emulator is marked as deprecated. It still works
+ as before but is planned to be removed in a future major
+ release.</p>
+ <p>
+ Own Id: OTP-11777</p>
+ </item>
+ <item>
+ <p>
+ The external format for Maps has changed in a way that is
+ not compatible with the format used in OTP 17.0-rc1 and
+ OTP 17.0-rc2.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11782</p>
+ </item>
+ <item>
+ <p>
+ Fixed faulty make dependency that would make some make
+ versions fail while building gen_git_version.mk.</p>
+ <p>
+ Own Id: OTP-11784</p>
+ </item>
+ <item>
+ <p>
+ Introduced functionality for allowing old drivers and NIF
+ libraries to be loaded during a transition period. For
+ more information see <seealso
+ marker="erts:erl_driver#version_management">the version
+ management section in the <c>erl_driver(3)</c>
+ documentation</seealso> and <seealso
+ marker="erts:erl_nif#version_management">the version
+ management section in the <c>erl_nif(3)</c>
+ documentation</seealso>.</p>
+ <p>
+ Own Id: OTP-11799</p>
+ </item>
+ <item>
+ <p>
+ Support file paths longer than 259 characters on Windows.
+ Long absolute paths are automatically converted to UNC
+ format with a <c>\\?\</c> prefix which is the only way to
+ represent long paths. The 259 character limit still
+ applies for individual file names, relative paths and the
+ current working directory.</p>
+ <p>
+ Own Id: OTP-11813</p>
+ </item>
+ <item>
+ <p>
+ Document that escript:create/2 also accepts a 3-elements
+ tuple containing files and zip:create/3 options to build
+ a zip file.</p>
+ <p>
+ Thanks to Pierre Fenoll</p>
+ <p>
+ Own Id: OTP-11827</p>
+ </item>
+ <item>
+ <p>
+ Add systemd socket activation for epmd.</p>
+ <p>
+ Thanks to Matwey V. Kornilov</p>
+ <p>
+ Own Id: OTP-11829</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erts 5.10.4.1</title>
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ When using gen_tcp:connect and the <c>fd</c> option with
+ <c>port</c> and/or <c>ip</c>, the <c>port</c> and
+ <c>ip</c> options were ignored. This has been fixed so
+ that if <c>port</c> and/or <c>ip</c> is specified
+ together with <c>fd</c> a bind is requested for that
+ <c>fd</c>. If <c>port</c> and/or <c>ip</c> is not
+ specified bind will not be called.</p>
+ <p>
+ Own Id: OTP-12061</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erts 5.10.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
@@ -257,7 +1808,7 @@
processes before the BIF returns, or fail with an
exception due to the port not being open. </p><p> The
synchronous port BIFs are: </p> <list> <item><seealso
- marker="erlang#port_close/1/"><c>port_close/1</c></seealso></item>
+ marker="erlang#port_close/1"><c>port_close/1</c></seealso></item>
<item><seealso
marker="erlang#port_command/2"><c>port_command/2</c></seealso></item>
<item><seealso
@@ -4122,7 +5673,7 @@
<item>
<p>
The <c>configure</c> command line argument <seealso
- marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--enable-ethread-pre-pentium4-compatibility</seealso>
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--enable-ethread-pre-pentium4-compatibility</seealso>
had no effect. This option is now also automatically
enabled if required on the build machine.</p>
<p>
@@ -4701,7 +6252,7 @@
platforms than before. If <c>configure</c> warns about no
atomic implementation available, try using the
<c>libatomic_ops</c> library. Use the <seealso
- marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--with-libatomic_ops=PATH</seealso>
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--with-libatomic_ops=PATH</seealso>
<c>configure</c> command line argument when specifying
where the <c>libatomic_ops</c> installation is located.
The <c>libatomic_ops</c> library can be downloaded from:
@@ -4719,7 +6270,7 @@
the pentium 4 processor. If you want the runtime system
to be compatible with older processors (back to 486) you
need to pass the <seealso
- marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--enable-ethread-pre-pentium4-compatibility</seealso>
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--enable-ethread-pre-pentium4-compatibility</seealso>
<c>configure</c> command line argument when configuring
the system.</p>
<p>
diff --git a/erts/doc/src/notes_history.xml b/erts/doc/src/notes_history.xml
index cc3b938c86..4420311912 100644
--- a/erts/doc/src/notes_history.xml
+++ b/erts/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/part.xml b/erts/doc/src/part.xml
index fa50329cad..7b17b5b551 100644
--- a/erts/doc/src/part.xml
+++ b/erts/doc/src/part.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -32,6 +32,7 @@
<p>The Erlang Runtime System Application <em>ERTS</em>.</p>
</description>
<xi:include href="communication.xml"/>
+ <xi:include href="time_correction.xml"/>
<xi:include href="match_spec.xml"/>
<xi:include href="crash_dump.xml"/>
<xi:include href="alt_dist.xml"/>
diff --git a/erts/doc/src/part_notes.xml b/erts/doc/src/part_notes.xml
index 4f183999e6..b5c8f0af09 100644
--- a/erts/doc/src/part_notes.xml
+++ b/erts/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/part_notes_history.xml b/erts/doc/src/part_notes_history.xml
index 1b9bcca773..a99fa4a17f 100644
--- a/erts/doc/src/part_notes_history.xml
+++ b/erts/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/ref_man.xml b/erts/doc/src/ref_man.xml
index e55923c344..8ed7090a61 100644
--- a/erts/doc/src/ref_man.xml
+++ b/erts/doc/src/ref_man.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml
index c9784299b3..28e94c6da8 100644
--- a/erts/doc/src/run_erl.xml
+++ b/erts/doc/src/run_erl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -58,7 +58,7 @@
first argument to run_erl on the command line.</item>
<tag>pipe_dir</tag>
<item>This is where to put the named pipe, usually
- <c><![CDATA[/tmp/]]></c>. It shall be suffixed by a <c><![CDATA[/]]></c> (slash),
+ <c><![CDATA[/tmp/]]></c> on Unix or <c><![CDATA[/pipe/]]></c> on OSE. It shall be suffixed by a <c><![CDATA[/]]></c> (slash),
i.e. not <c><![CDATA[/tmp/epipies]]></c>, but <c><![CDATA[/tmp/epipes/]]></c>. </item>
<tag>log_dir</tag>
<item>This is where the log files are written. There will be one
diff --git a/erts/doc/src/specs.xml b/erts/doc/src/specs.xml
index e5c2f4783f..41a3984659 100644
--- a/erts/doc/src/specs.xml
+++ b/erts/doc/src/specs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<specs xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../specs/specs_erl_prim_loader.xml"/>
<xi:include href="../specs/specs_erlang.xml"/>
diff --git a/erts/doc/src/start.xml b/erts/doc/src/start.xml
index 5dc33deb2a..e9a5714f93 100644
--- a/erts/doc/src/start.xml
+++ b/erts/doc/src/start.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/start_erl.xml b/erts/doc/src/start_erl.xml
index 92d87b095a..fe808f7737 100644
--- a/erts/doc/src/start_erl.xml
+++ b/erts/doc/src/start_erl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/time_correction.xml b/erts/doc/src/time_correction.xml
new file mode 100644
index 0000000000..7f7c28fc30
--- /dev/null
+++ b/erts/doc/src/time_correction.xml
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>1999</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Time and time correction in Erlang</title>
+ <prepared>Patrik Nyblom</prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2013-08-28</date>
+ <rev>PA1</rev>
+ <file>time_correction.xml</file>
+ </header>
+ <p>Time is vital to an Erlang program and, more importantly, <em>correct</em>
+ time is vital to an Erlang program. As Erlang is a language with
+ soft real time properties and we have the possibility to express
+ time in our programs, the Virtual Machine and the language has to be
+ very careful about what is considered a correct point in time and in
+ how time functions behave.</p>
+
+ <p>In the beginning, Erlang was constructed assuming that the wall
+ clock time in the system showed a monotonic time moving forward at
+ exactly the same pace as the definition of time. That more or less
+ meant that an atomic clock (or better) was expected to be attached
+ to your hardware and that the hardware was then expected to be
+ locked away from any human (or unearthly) tinkering for all
+ eternity. While this might be a compelling thought, it's simply
+ never the case.</p>
+
+ <p>A "normal" modern computer can not keep time. Not on itself and
+ not unless you actually have a chip level atomic clock wired to
+ it. Time, as perceived by your computer, will normally need to be
+ corrected. Hence the NTP protocol that together with the ntpd
+ process will do it's best to keep your computers time in sync with
+ the "real" time in the universe. Between NTP corrections, usually a
+ less potent time-keeper than an atomic clock is used.</p>
+
+ <p>But NTP is not fail safe. The NTP server can be unavailable, the
+ ntp.conf can be wrongly configured or your computer may from time to
+ time be disconnected from the internet. Furthermore you can have a
+ user (or even system administrator) on your system that thinks the
+ right way to handle daylight saving time is to adjust the clock one
+ hour two times a year (a tip, that is not the right way to do
+ it...). To further complicate things, this user fetched your
+ software from the internet and has never ever thought about what's
+ the correct time as perceived by a computer. The user simply does
+ not care about keeping the wall clock in sync with the rest of the
+ universe. The user expects your program to have omnipotent knowledge
+ about the time.</p>
+
+ <p>Most programmers also expect time to be reliable, at least until
+ they realize that the wall clock time on their workstation is of by
+ a minute. Then they simply set it to the correct time, maybe or
+ maybe not in a smooth way. Most probably not in a smooth way.</p>
+
+ <p>The amount of problems that arise when you expect the wall clock
+ time on the system to always be correct may be immense. Therefore Erlang
+ introduced the "corrected estimate of time", or the "time
+ correction" many years ago. The time correction relies on the fact
+ that most operating systems have some kind of monotonic clock,
+ either a real time extension or some built in "tick counter" that is
+ independent of the wall clock settings. This counter may have
+ microsecond resolution or much less, but generally it has a drift
+ that is not to be ignored.</p>
+
+ <p>So we have this monotonic ticking and we have the wall clock
+ time. Two unreliable times that together can give us an estimate of
+ an actual wall clock time that does not jump around and that
+ monotonically moves forward. If the tick counter has a high
+ resolution, this is fairly easy to do, if the counter has a low
+ resolution, it's more expensive, but still doable down to
+ frequencies of 50-60 Hz (of the tick counter).</p>
+
+ <p>So the corrected time is the nearest approximation of an atomic
+ clock that is available on the computer. We want it to have the
+ following properties:</p>
+ <taglist>
+ <tag>Monotonic</tag>
+ <item>The clock should not move backwards</item>
+ <tag>Intervals should be near the truth</tag>
+ <item>We want the actual time (as measured by an atomic clock or
+ an astronomer) that passes between two time stamps, T1 and T2, to be as
+ near to T2 - T1 as possible.</item>
+ <tag>Tight coupling to the wall clock</tag>
+ <item>We want a timer that is to be fired when the wall clock
+ reaches a time in the future, to fire as near to that point in
+ time as possible</item>
+ </taglist>
+ <p>To meet all the criteria, we have to utilize both times in such a
+ way that Erlangs "corrected time" moves slightly slower or slightly
+ faster than the wall clock to get in sync with it. The word
+ "slightly" means a maximum of 1% difference to the wall clock time,
+ meaning that a sudden change in the wall clock of one minute, takes
+ 100 minutes to fix, by letting all "corrected time" move 1% slower
+ or faster.</p>
+
+ <p>Needless to say, correcting for a faulty handling of daylight
+ saving time may be disturbing to a user comparing wall clock
+ time to for example calendar:now_to_local_time(erlang:now()). But
+ calendar:now_to_local_time/1 is not supposed to be used for presenting wall
+ clock time to the user.</p>
+
+ <p>Time correction is not perfect, but it saves you from the havoc
+ of clocks jumping around, which would make timers in your program
+ fire far to late or far to early and could bring your whole system
+ to it's knees (or worse) just because someone detected a small error
+ in the wall clock time of the server where your program runs. So
+ while it might be confusing, it is still a really good feature of
+ Erlang and you should not throw it away using time functions which
+ may give you higher benchmark results, not unless you really know
+ what you're doing.</p>
+
+ <section>
+ <title>What does time correction mean in my system?</title>
+ <p>Time correction means that Erlang estimates a time from current
+ and previous settings of the wall clock, and it uses a fairly
+ exact tick counter to detect when the wall clock time has jumped
+ for some reason, slowly adjusting to the new value.</p>
+
+ <p>In practice, this means that the difference between two calls
+ to time corrected functions, like erlang:now(), might differ up to
+ one percent from the corresponding calls to non time corrected
+ functions (like os:timestamp()). Furthermore, if comparing
+ calendar:local_time/0 to calendar:now_to_local_time(erlang:now()),
+ you might temporarily see a difference, depending on how well kept your
+ system is.</p>
+
+ <p>It is important to understand that it is (to the program)
+ always unknown if it is the wall clock time that moves in the
+ wrong pace or the Erlang corrected time. The only way to determine
+ that, is to have an external source of universally correct time. If
+ some such source is available, the wall clock time can be kept
+ nearly perfect at all times, and no significant difference will be
+ detected between erlang:now/0's pace and the wall clock's.</p>
+
+ <p>Still, the time correction will mean that your system keeps
+ it's real time characteristics very well, even when the wall clock
+ is unreliable.</p>
+ </section>
+ <section>
+ <title>Where does Erlang use corrected time?</title>
+ <p>For all functionality where real time characteristics are
+ desirable, time correction is used. This basically means:</p>
+ <taglist>
+ <tag>erlang:now/0</tag>
+ <item>The infamous erlang:now/0 function uses time correction so
+ that differences between two "now-timestamps" will correspond to
+ other timeouts in the system. erlang:now/0 also holds other
+ properties, discussed later.</item>
+ <tag>receive ... after</tag>
+ <item>Timeouts on receive uses time correction to determine a
+ stable timeout interval.</item>
+ <tag>The timer module</tag>
+ <item>As the timer module uses other built in functions which
+ deliver corrected time, the timer module itself works with
+ corrected time.</item>
+ <tag>erlang:start_timer/3 and erlang:send_after/3</tag>
+ <item>The timer BIF's work with corrected time, so that they
+ will not fire prematurely or too late due to changes in the wall
+ clock time.</item>
+ </taglist>
+
+ <p>All other functionality in the system where erlang:now/0 or any
+ other time corrected functionality is used, will of course
+ automatically benefit from it, as long as it's not "optimized" to
+ use some other time stamp function (like os:timestamp/0).</p>
+
+ <p>Modules like calendar and functions like erlang:localtime/0 use
+ the wall clock time as it is currently set on the system. They
+ will not use corrected time. However, if you use a now-value and
+ convert it to local time, you will get a corrected local time
+ value, which may or may not be what you want. Typically older code
+ tend to use erlang:now/0 as a wall clock time, which is usually
+ correct (at least when testing), but might surprise you when
+ compared to other times in the system.</p>
+ </section>
+ <section>
+ <title>What is erlang:now/0 really?</title>
+ <p>erlang:now/0 is a function designed to serve multiple purposes
+ (or a multi-headed beast if you're a VM designer). It is expected
+ to hold the following properties:</p>
+ <taglist>
+ <tag>Monotonic</tag>
+ <item>erlang:now() never jumps backwards - it always moves
+ forward</item>
+ <tag>Interval correct</tag>
+ <item>The interval between two erlang:now() calls is expected to
+ correspond to the correct time in real life (as defined by an
+ atomic clock, or better)</item>
+ <tag>Absolute correctness</tag>
+ <item>The erlang:now/0 value should be possible to convert to an
+ absolute and correct date-time, corresponding to the real world
+ date and time (the wall clock)</item>
+ <tag>System correspondence</tag>
+ <item>The erlang:now/0 value converted to a date-time is
+ expected to correspond to times given by other programs on the
+ system (or by functions like os:timestamp/0)</item>
+ <tag>Unique</tag>
+ <item>No two calls to erlang:now on one Erlang node should
+ return the same value</item>
+ </taglist>
+ <p>All these requirements are possible to uphold at the same
+ time if (and only if):</p>
+ <taglist>
+ <tag>The wall clock time of the system is perfect</tag>
+ <item>The system (Operating System) time needs to be perfectly
+ in sync with the actual time as defined by an atomic clock or
+ a better time source. A good installation using NTP, and that is
+ up to date before Erlang starts, will have properties that for
+ most users and programs will be near indistinguishable from the
+ perfect time. Note that any larger corrections to the time done
+ by hand, or after Erlang has started, will partly (or
+ temporarily) invalidate some of the properties, as the time is
+ no longer perfect.</item>
+ <tag>Less than one call per microsecond to erlang:now/0 is
+ done</tag>
+ <item>This means that at <em>any</em> microsecond interval in
+ time, there can be no more than one call to erlang:now/0 in the
+ system. However, for the system not to loose it's properties
+ completely, it's enough that it on average is no more than one
+ call per microsecond (in one Erlang node).</item>
+ </taglist>
+ <p>The uniqueness property of erlang:now/0 is the most limiting
+ property. It means that erlang:now() maintains a global state and
+ that there is a hard-to-check property of the system that needs to
+ be maintained. For most applications this is still not a problem,
+ but a future system might very well manage to violate the
+ frequency limit on the calls globally. The uniqueness property is
+ also quite useless, as there are globally unique references that
+ provide a much better unique value to programs. However the
+ property will need to be maintained unless a really subtle
+ backward compatibility issue is to be introduced.</p>
+ </section>
+ <section>
+ <title>Should I use erlang:now/0 or os:timestamp/0</title>
+ <p>The simple answer is to use erlang:now/0 for everything where
+ you want to keep real time characteristics, but use os:timestamp
+ for things like logs, user communication and debugging (typically
+ timer:ts uses os:timestamp, as it is a test tool, not a real world
+ application API). The benefit of using os:timestamp/0 is that it's
+ faster and does not involve any global state (unless the operating
+ system has one). The downside is that it will be vulnerable to wall
+ clock time changes.</p>
+ </section>
+ <section>
+ <title>Turning off time correction</title>
+ <p>If, for some reason, time correction causes trouble and you are
+ absolutely confident that the wall clock on the system is nearly
+ perfect, you can turn off time correction completely by giving the
+ <c>+c</c> option to <c>erl</c>. The probability for this being a
+ good idea, is very low.</p>
+ </section>
+</chapter>
+
diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml
index b16523e085..db15195f65 100644
--- a/erts/doc/src/tty.xml
+++ b/erts/doc/src/tty.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/werl.xml b/erts/doc/src/werl.xml
index 1494d91da8..49cc45e745 100644
--- a/erts/doc/src/werl.xml
+++ b/erts/doc/src/werl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml
index 8917ab5c3a..da8ccdecdf 100644
--- a/erts/doc/src/zlib.xml
+++ b/erts/doc/src/zlib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2005</year><year>2011</year>
+ <year>2005</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -161,20 +161,22 @@ list_to_binary([Compressed|Last])</pre>
state. <c><anno>MemLevel</anno></c>=1 uses minimum memory but is slow and
reduces compression ratio; <c><anno>MemLevel</anno></c>=9 uses maximum
memory for optimal speed. The default value is 8.</p>
- <p>The <c><anno>Strategy</anno></c> parameter is used to tune the
- compression algorithm. Use the value <c>default</c> for
- normal data, <c>filtered</c> for data produced by a filter
- (or predictor), or <c>huffman_only</c> to force Huffman
- encoding only (no string match). Filtered data consists
- mostly of small values with a somewhat random
- distribution. In this case, the compression algorithm is
- tuned to compress them better. The effect of
- <c>filtered</c>is to force more Huffman coding and less
- string matching; it is somewhat intermediate between
- <c>default</c> and <c>huffman_only</c>. The <c><anno>Strategy</anno></c>
- parameter only affects the compression ratio but not the
- correctness of the compressed output even if it is not set
- appropriately.</p>
+ <p>The <c><anno>Strategy</anno></c> parameter is used to tune
+ the compression algorithm. Use the value <c>default</c> for
+ normal data, <c>filtered</c> for data produced by a filter (or
+ predictor), <c>huffman_only</c> to force Huffman encoding
+ only (no string match), or <c>rle</c> to limit match
+ distances to one (run-length encoding). Filtered data
+ consists mostly of small values with a somewhat random
+ distribution. In this case, the compression algorithm is tuned
+ to compress them better. The effect of <c>filtered</c>is to
+ force more Huffman coding and less string matching; it is
+ somewhat intermediate between <c>default</c> and
+ <c>huffman_only</c>. <c>rle</c> is designed to be almost as
+ fast as <c>huffman_only</c>, but give better compression for PNG
+ image data. The <c><anno>Strategy</anno></c> parameter only
+ affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately.</p>
</desc>
</func>
<func>
@@ -300,7 +302,7 @@ list_to_binary([B1,B2])</pre>
<fsummary>Decompress data</fsummary>
<desc>
<p><c>inflate/2</c> decompresses as much data as possible.
- It may some introduce some output latency (reading
+ It may introduce some output latency (reading
input without producing any output).</p>
<p>If a preset dictionary is needed at this point (see
<c>inflateSetDictionary</c> below), <c>inflate/2</c> throws a
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index f442540f49..7145824f91 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -22,6 +22,9 @@ include ../vsn.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-include $(TARGET)/gen_git_version.mk
+ifeq ($(findstring ose,$(TARGET)),ose)
+include $(ERL_TOP)/make/$(TARGET)/ose_lm.mk
+endif
ENABLE_ALLOC_TYPE_VARS = @ENABLE_ALLOC_TYPE_VARS@
HIPE_ENABLED=@HIPE_ENABLED@
@@ -136,6 +139,28 @@ endif
endif
endif
+comma:=,
+space:=
+space+=
+
+STATIC_NIFS=@STATIC_NIFS@
+ifneq ($(STATIC_NIFS),no)
+ifeq ($(STATIC_NIFS),yes)
+STATIC_NIFS=$(ERL_TOP)/lib/asn1/priv/lib/$(TARGET)/asn1rt_nif.a \
+ $(ERL_TOP)/lib/crypto/priv/lib/$(TARGET)/crypto$(TYPEMARKER).a
+endif
+STATIC_NIFS:=$(subst $(comma),$(space),$(STATIC_NIFS))
+endif
+
+STATIC_DRIVERS=@STATIC_DRIVERS@
+ifneq ($(STATIC_DRIVERS),no)
+ifeq ($(STATIC_DRIVERS),yes)
+STATIC_DRIVERS=
+endif
+STATIC_DRIVERS:=$(subst $(comma),$(space),$(STATIC_DRIVERS))
+endif
+
+
#
# NOTE: When adding a new type update ERL_BUILD_TYPE_MARKER in sys/unix/sys.c
#
@@ -212,7 +237,9 @@ HCC = @HCC@
LD = @LD@
DEXPORT = @DEXPORT@
RANLIB = @RANLIB@
+ifneq ($(findstring ose,$(TARGET)),ose)
STRIP = strip
+endif
PERL = @PERL@
RM = @RM@
MKDIR = @MKDIR@
@@ -351,7 +378,9 @@ LIBS += -l$(ERTS_INTERNAL_LIB)$(TYPEMARKER)
endif # erts_internal_r
+ifneq ($(TARGET),arm-unknown-linux-androideabi)
LIBS += @LIBRT@
+endif
LIBS += @LIBCARBON@
@@ -387,13 +416,6 @@ else
UNIX_ONLY_BUILDS =
endif
-ifeq ($(TARGET), win32)
-TMPVAR := $(shell LANG=C $(PERL) utils/make_compiler_flags -o $(TTF_DIR)/erl_compile_flags.h -v CONFIG_H "N/A" -v CFLAGS "$(CFLAGS)" -v LDFLAGS "$(LDFLAGS)")
-else
-# We force this to be run every time this makefile is executed
-TMPVAR := $(shell LANG=C $(PERL) utils/make_compiler_flags -o $(TTF_DIR)/erl_compile_flags.h -f CONFIG_H "$(ERL_TOP)/erts/$(TARGET)/config.h" -v CFLAGS "$(CFLAGS)" -v LDFLAGS "$(LDFLAGS)")
-endif
-
.PHONY: all
ifdef VOID_EMULATOR
all:
@@ -472,6 +494,15 @@ release_docs_spec:
_create_dirs := $(shell mkdir -p $(CREATE_DIRS))
+
+# has to be run after _create_dirs
+ifeq ($(TARGET), win32)
+TMPVAR := $(shell LANG=C $(PERL) utils/make_compiler_flags -o $(TTF_DIR)/erl_compile_flags.h -v CONFIG_H "N/A" -v CFLAGS "$(CFLAGS)" -v LDFLAGS "$(LDFLAGS)")
+else
+# We force this to be run every time this makefile is executed
+TMPVAR := $(shell LANG=C $(PERL) utils/make_compiler_flags -o $(TTF_DIR)/erl_compile_flags.h -f CONFIG_H "$(ERL_TOP)/erts/$(TARGET)/config.h" -v CFLAGS "$(CFLAGS)" -v LDFLAGS "$(LDFLAGS)")
+endif
+
GENERATE =
HIPE_ASM =
@@ -491,10 +522,9 @@ ifdef DTRACE_ENABLED
# global.h causes problems by including dtrace-wrapper.h which includes
# the autogenerated erlang_dtrace.h ... so make erlang_dtrace.h very early.
DTRACE_HEADERS = $(TARGET)/erlang_dtrace.h
-generate: $(DTRACE_HEADERS) $(GENERATE)
+GENERATE+= $(DTRACE_HEADERS)
else
DTRACE_HEADERS =
-generate: $(GENERATE)
endif
ifdef HIPE_ENABLED
@@ -552,13 +582,13 @@ $(TTF_DIR)/erl_alloc_types.h: beam/erl_alloc.types utils/make_alloc_types
GENERATE += $(TTF_DIR)/erl_alloc_types.h
# version include file
-$(TARGET)/erl_version.h: ../vsn.mk
- $(gen_verbose)LANG=C $(PERL) utils/make_version -o $@ $(SYSTEM_VSN) $(VSN)$(SERIALNO) $(TARGET)
+$(TARGET)/erl_version.h: ../vsn.mk $(ERL_TOP)/make/$(TARGET)/otp.mk
+ $(gen_verbose)LANG=C $(PERL) utils/make_version -o $@ $(SYSTEM_VSN) $(OTP_VERSION) $(VSN)$(SERIALNO) $(TARGET)
GENERATE += $(TARGET)/erl_version.h
# driver table
-$(TTF_DIR)/driver_tab.c: Makefile.in
- $(gen_verbose)LANG=C $(PERL) utils/make_driver_tab -o $@ $(DRV_OBJS)
+$(TTF_DIR)/driver_tab.c: Makefile.in utils/make_driver_tab
+ $(gen_verbose)LANG=C $(PERL) utils/make_driver_tab -o $@ -nifs $(STATIC_NIF_LIBS) -drivers $(DRV_OBJS) $(STATIC_DRIVER_LIBS)
GENERATE += $(TTF_DIR)/driver_tab.c
@@ -643,7 +673,6 @@ endif
ifneq ($(filter tile-%,$(TARGET)),)
$(OBJDIR)/beam_emu.o: beam/beam_emu.c
$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \
- -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \
$(INCLUDES) -c $< -o $@
else
# Usually the same as the default rule, but certain platforms (e.g. win32) mix
@@ -664,6 +693,14 @@ $(OBJDIR)/%.o: $(TTF_DIR)/%.c
$(OBJDIR)/%.o: sys/$(ERLANG_OSTYPE)/%.c
$(V_CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
+ifeq ($(findstring ose,$(TARGET)),ose)
+$(OBJDIR)/ose_confd.o: $(OSE_CONFD)
+ $(V_CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
+
+$(OBJDIR)/crt0_lm.o: $(CRT0_LM)
+ $(V_CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
+endif
+
$(OBJDIR)/%.o: sys/common/%.c
$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
@@ -758,7 +795,7 @@ RUN_OBJS = \
$(OBJDIR)/erl_zlib.o $(OBJDIR)/erl_nif.o \
$(OBJDIR)/erl_bif_binary.o $(OBJDIR)/erl_ao_firstfit_alloc.o \
$(OBJDIR)/erl_thr_queue.o $(OBJDIR)/erl_sched_spec_pre_alloc.o \
- $(OBJDIR)/erl_ptab.o
+ $(OBJDIR)/erl_ptab.o $(OBJDIR)/erl_map.o
ifeq ($(TARGET),win32)
DRV_OBJS = \
@@ -766,7 +803,8 @@ DRV_OBJS = \
$(OBJDIR)/efile_drv.o \
$(OBJDIR)/inet_drv.o \
$(OBJDIR)/zlib_drv.o \
- $(OBJDIR)/ram_file_drv.o
+ $(OBJDIR)/ram_file_drv.o \
+ $(OBJDIR)/ttsl_drv.o
OS_OBJS = \
$(OBJDIR)/win_efile.o \
$(OBJDIR)/win_con.o \
@@ -778,6 +816,30 @@ OS_OBJS = \
$(OBJDIR)/sys_interrupt.o \
$(OBJDIR)/sys_env.o \
$(OBJDIR)/dosmap.o
+
+else
+ifeq ($(findstring ose,$(TARGET)),ose)
+OS_OBJS = \
+ $(OBJDIR)/sys.o \
+ $(OBJDIR)/driver_tab.o \
+ $(OBJDIR)/ose_efile.o \
+ $(OBJDIR)/gzio.o \
+ $(OBJDIR)/elib_memmove.o
+
+OS_OBJS += $(OBJDIR)/ose_confd.o \
+ $(OBJDIR)/crt0_lm.o
+
+OS_OBJS += $(OBJDIR)/sys_float.o \
+ $(OBJDIR)/sys_time.o
+
+DRV_OBJS = \
+ $(OBJDIR)/efile_drv.o \
+ $(OBJDIR)/ose_signal_drv.o \
+ $(OBJDIR)/inet_drv.o \
+ $(OBJDIR)/zlib_drv.o \
+ $(OBJDIR)/ram_file_drv.o \
+ $(OBJDIR)/ttsl_drv.o
+
else
OS_OBJS = \
$(OBJDIR)/sys.o \
@@ -792,10 +854,34 @@ DRV_OBJS = \
$(OBJDIR)/efile_drv.o \
$(OBJDIR)/inet_drv.o \
$(OBJDIR)/zlib_drv.o \
- $(OBJDIR)/ram_file_drv.o
+ $(OBJDIR)/ram_file_drv.o \
+ $(OBJDIR)/ttsl_drv.o
+endif
+endif
+
+ifneq ($(STATIC_NIFS),no)
+STATIC_NIF_LIBS = $(STATIC_NIFS)
+DEPLIBS += $(STATIC_NIF_LIBS)
+COMPILE_STATIC_LIBS = yes
+else
+STATIC_NIF_LIBS=
+endif
+
+ifneq ($(STATIC_DRIVERS),no)
+STATIC_DRIVER_LIBS = $(STATIC_DRIVERS)
+DEPLIBS += $(STATIC_DRIVER_LIBS)
+COMPILE_STATIC_LIBS = yes
+else
+STATIC_DRIVER_LIBS=
endif
- DRV_OBJS += $(OBJDIR)/ttsl_drv.o
+ifeq ($(COMPILE_STATIC_LIBS),yes)
+
+$(STATIC_NIF_LIBS) $(STATIC_DRIVER_LIBS):
+ echo "=== Entering lib to make static libs"
+ (cd $(ERL_TOP)/lib/ && $(MAKE) BUILD_STATIC_LIBS=1 TYPE=$(TYPE) static_lib)
+ echo "=== Leaving lib after making static libs"
+endif
ifeq ($(ERTS_ENABLE_KERNEL_POLL),yes)
OS_OBJS += $(OBJDIR)/erl_poll.kp.o \
@@ -936,20 +1022,29 @@ $(OBJDIR)/hipe_arm.o: hipe/hipe_arm.c
# ----------------------------------------------------------------------
# The emulator itself
+#
ifeq ($(TARGET), win32)
# Only the basic erlang to begin with eh?
$(BINDIR)/$(EMULATOR_EXECUTABLE): $(INIT_OBJS) $(OBJS) $(DEPLIBS)
$(ld_verbose)$(PURIFY) $(LD) -dll -def:sys/$(ERLANG_OSTYPE)/erl.def -implib:$(BINDIR)/erl_dll.lib -o $(BINDIR)/$(EMULATOR_EXECUTABLE) \
- $(LDFLAGS) $(DEXPORT) $(INIT_OBJS) $(OBJS) $(LIBS)
-else
+ $(LDFLAGS) $(DEXPORT) $(INIT_OBJS) $(OBJS) $(STATIC_NIF_LIBS) \
+ $(STATIC_DRIVER_LIBS) $(LIBS)
+else
+ifeq ($(findstring ose,$(TARGET)),ose)
+$(BINDIR)/$(EMULATOR_EXECUTABLE): $(INIT_OBJS) $(OBJS) $(DEPLIBS) $(LCF)
+ $(call build-ose-load-module, $@, $(INIT_OBJS) $(OBJS), $(STATIC_NIF_LIBS) \
+ $(STATIC_DRIVER_LIBS) $(LIBS), $(BEAM_LMCONF))
+else
$(BINDIR)/$(EMULATOR_EXECUTABLE): $(INIT_OBJS) $(OBJS) $(DEPLIBS)
$(ld_verbose)$(PURIFY) $(LD) -o $(BINDIR)/$(EMULATOR_EXECUTABLE) \
- $(HIPEBEAMLDFLAGS) $(LDFLAGS) $(DEXPORT) $(INIT_OBJS) $(OBJS) $(LIBS)
+ $(HIPEBEAMLDFLAGS) $(LDFLAGS) $(DEXPORT) $(INIT_OBJS) $(OBJS) \
+ $(STATIC_NIF_LIBS) $(STATIC_DRIVER_LIBS) $(LIBS)
endif
+endif
# ----------------------------------------------------------------------
# Dependencies
@@ -995,7 +1090,9 @@ BEAM_SRC=$(wildcard beam/*.c)
DRV_COMMON_SRC=$(wildcard drivers/common/*.c)
DRV_OSTYPE_SRC=$(wildcard drivers/$(ERLANG_OSTYPE)/*.c)
ALL_SYS_SRC=$(wildcard sys/$(ERLANG_OSTYPE)/*.c) $(wildcard sys/common/*.c)
-TARGET_SRC=$(wildcard $(TARGET)/*.c) $(wildcard $(TTF_DIR)/*.c)
+# We use $(shell ls) here instead of wildcard as $(wildcard ) resolved at
+# loadtime of the makefile and at that time these files are not generated yet.
+TARGET_SRC=$(shell ls $(TARGET)/*.c) $(shell ls $(TTF_DIR)/*.c)
# I do not want the -MG flag on windows, it does not work properly for a
# windows build.
diff --git a/erts/emulator/beam/atom.names b/erts/emulator/beam/atom.names
index c2f32ba089..5d06a32941 100644
--- a/erts/emulator/beam/atom.names
+++ b/erts/emulator/beam/atom.names
@@ -71,6 +71,7 @@ atom ac
atom active
atom all
atom all_but_first
+atom all_names
atom alloc_info
atom alloc_sizes
atom allocated
@@ -78,6 +79,7 @@ atom allocated_areas
atom allocator
atom allocator_sizes
atom alloc_util_allocators
+atom allow_gc
atom allow_passive_connect
atom already_loaded
atom amd64
@@ -114,6 +116,8 @@ atom binary_longest_prefix_trap
atom binary_longest_suffix_trap
atom binary_match_trap
atom binary_matches_trap
+atom binary_to_list_continue
+atom binary_to_term_trap
atom block
atom blocked
atom bm
@@ -176,6 +180,7 @@ atom dexit
atom depth
atom dgroup_leader
atom dictionary
+atom dirty_cpu_schedulers_online
atom disable_trace
atom disabled
atom display_items
@@ -311,6 +316,7 @@ atom line_length
atom linked_in_driver
atom links
atom list
+atom list_to_binary_continue
atom little
atom loaded
atom load_cancelled
@@ -322,6 +328,8 @@ atom low
atom Lt='<'
atom machine
atom match
+atom match_limit
+atom match_limit_recursion
atom match_spec
atom max
atom maximum
@@ -351,11 +359,13 @@ atom multi_scheduling
atom multiline
atom name
atom named_table
+atom namelist
atom native_addresses
atom Neq='=/='
atom Neqeq='/='
atom net_kernel
atom net_kernel_terminated
+atom never_utf
atom new
atom new_index
atom new_uniq
@@ -381,6 +391,7 @@ atom nosuspend
atom no_float
atom no_integer
atom no_network
+atom no_start_optimize
atom not
atom not_a_list
atom not_loaded
@@ -391,6 +402,7 @@ atom notalive
atom notbol
atom noteol
atom notempty
+atom notempty_atstart
atom notify
atom notsup
atom nouse_stdio
@@ -475,6 +487,7 @@ atom register
atom registered_name
atom reload
atom rem
+atom report_errors
atom reset
atom restart
atom return_from
@@ -557,6 +570,7 @@ atom true
atom tuple
atom type
atom ucompile
+atom ucp
atom undef
atom ungreedy
atom unicode
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 649594a334..ef42bb20d3 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -33,10 +33,11 @@
#include "beam_catches.h"
#include "erl_binary.h"
#include "erl_nif.h"
+#include "erl_bits.h"
#include "erl_thr_progress.h"
static void set_default_trace_pattern(Eterm module);
-static Eterm check_process_code(Process* rp, Module* modp);
+static Eterm check_process_code(Process* rp, Module* modp, int allow_gc, int *redsp);
static void delete_code(Module* modp);
static void decrement_refc(BeamInstr* code);
static int is_native(BeamInstr* code);
@@ -201,7 +202,7 @@ finish_loading_1(BIF_ALIST_1)
* to keep the elements in.
*/
- n = list_length(BIF_ARG_1);
+ n = erts_list_length(BIF_ARG_1);
if (n == -1) {
ERTS_BIF_PREP_ERROR(res, BIF_P, BADARG);
goto done;
@@ -427,69 +428,82 @@ check_old_code_1(BIF_ALIST_1)
}
Eterm
-check_process_code_2(BIF_ALIST_2)
+erts_check_process_code(Process *c_p, Eterm module, int allow_gc, int *redsp)
{
- Process* rp;
Module* modp;
+ Eterm res;
+ ErtsCodeIndex code_ix;
- if (is_not_atom(BIF_ARG_2)) {
- goto error;
- }
- if (is_internal_pid(BIF_ARG_1)) {
- Eterm res;
- ErtsCodeIndex code_ix;
-
- code_ix = erts_active_code_ix();
- modp = erts_get_module(BIF_ARG_2, code_ix);
- if (modp == NULL) { /* Doesn't exist. */
- return am_false;
- }
- erts_rlock_old_code(code_ix);
- if (modp->old.code == NULL) { /* No old code. */
- erts_runlock_old_code(code_ix);
- return am_false;
- }
- erts_runlock_old_code(code_ix);
-
-#ifdef ERTS_SMP
- rp = erts_pid2proc_suspend(BIF_P, ERTS_PROC_LOCK_MAIN,
- BIF_ARG_1, ERTS_PROC_LOCK_MAIN);
-#else
- rp = erts_pid2proc(BIF_P, 0, BIF_ARG_1, 0);
-#endif
- if (!rp) {
- BIF_RET(am_false);
- }
- if (rp == ERTS_PROC_LOCK_BUSY) {
- ERTS_BIF_YIELD2(bif_export[BIF_check_process_code_2], BIF_P,
- BIF_ARG_1, BIF_ARG_2);
- }
- erts_rlock_old_code(code_ix);
- if (modp->old.code != NULL) { /* must check again */
- res = check_process_code(rp, modp);
- }
- else {
- res = am_false;
- }
- erts_runlock_old_code(code_ix);
-#ifdef ERTS_SMP
- if (BIF_P != rp) {
- erts_resume(rp, ERTS_PROC_LOCK_MAIN);
- erts_smp_proc_unlock(rp, ERTS_PROC_LOCK_MAIN);
+ (*redsp)++;
+
+ ASSERT(is_atom(module));
+
+ code_ix = erts_active_code_ix();
+ modp = erts_get_module(module, code_ix);
+ if (!modp)
+ return am_false;
+ erts_rlock_old_code(code_ix);
+ res = modp->old.code ? check_process_code(c_p, modp, allow_gc, redsp) : am_false;
+ erts_runlock_old_code(code_ix);
+
+ return res;
+}
+
+BIF_RETTYPE erts_internal_check_process_code_2(BIF_ALIST_2)
+{
+ int reds = 0;
+ Eterm res;
+ Eterm olist = BIF_ARG_2;
+ int allow_gc = 1;
+
+ if (is_not_atom(BIF_ARG_1))
+ goto badarg;
+
+ while (is_list(olist)) {
+ Eterm *lp = list_val(olist);
+ Eterm opt = CAR(lp);
+ if (is_tuple(opt)) {
+ Eterm* tp = tuple_val(opt);
+ switch (arityval(tp[0])) {
+ case 2:
+ switch (tp[1]) {
+ case am_allow_gc:
+ switch (tp[2]) {
+ case am_false:
+ allow_gc = 0;
+ break;
+ case am_true:
+ allow_gc = 1;
+ break;
+ default:
+ goto badarg;
+ }
+ break;
+ default:
+ goto badarg;
+ }
+ break;
+ default:
+ goto badarg;
+ }
}
-#endif
- BIF_RET(res);
- }
- else if (is_external_pid(BIF_ARG_1)
- && external_pid_dist_entry(BIF_ARG_1) == erts_this_dist_entry) {
- BIF_RET(am_false);
+ else
+ goto badarg;
+ olist = CDR(lp);
}
+ if (is_not_nil(olist))
+ goto badarg;
+
+ res = erts_check_process_code(BIF_P, BIF_ARG_1, allow_gc, &reds);
+
+ ASSERT(is_value(res));
+
+ BIF_RET2(res, reds);
- error:
+badarg:
BIF_ERROR(BIF_P, BADARG);
}
-
BIF_RETTYPE delete_module_1(BIF_ALIST_1)
{
ErtsCodeIndex code_ix;
@@ -710,7 +724,7 @@ set_default_trace_pattern(Eterm module)
}
static Eterm
-check_process_code(Process* rp, Module* modp)
+check_process_code(Process* rp, Module* modp, int allow_gc, int *redsp)
{
BeamInstr* start;
char* mod_start;
@@ -773,6 +787,16 @@ check_process_code(Process* rp, Module* modp)
}
}
+ if (rp->flags & F_DISABLE_GC) {
+ /*
+ * Cannot proceed. Process has disabled gc in order to
+ * safely leave inconsistent data on the heap and/or
+ * off heap lists. Need to wait for gc to be enabled
+ * again.
+ */
+ return THE_NON_VALUE;
+ }
+
/*
* See if there are funs that refer to the old version of the module.
*/
@@ -786,6 +810,8 @@ check_process_code(Process* rp, Module* modp)
if (done_gc) {
return am_true;
} else {
+ if (!allow_gc)
+ return am_aborted;
/*
* Try to get rid of this fun by garbage collecting.
* Clear both fvalue and ftrace to make sure they
@@ -796,7 +822,7 @@ check_process_code(Process* rp, Module* modp)
rp->ftrace = NIL;
done_gc = 1;
FLAGS(rp) |= F_NEED_FULLSWEEP;
- (void) erts_garbage_collect(rp, 0, rp->arg_reg, rp->arity);
+ *redsp += erts_garbage_collect(rp, 0, rp->arg_reg, rp->arity);
goto rescan;
}
}
@@ -850,6 +876,9 @@ check_process_code(Process* rp, Module* modp)
Uint lit_size;
struct erl_off_heap_header* oh;
+ if (!allow_gc)
+ return am_aborted;
+
/*
* Try to get rid of constants by by garbage collecting.
* Clear both fvalue and ftrace.
@@ -859,11 +888,12 @@ check_process_code(Process* rp, Module* modp)
rp->ftrace = NIL;
done_gc = 1;
FLAGS(rp) |= F_NEED_FULLSWEEP;
- (void) erts_garbage_collect(rp, 0, rp->arg_reg, rp->arity);
+ *redsp += erts_garbage_collect(rp, 0, rp->arg_reg, rp->arity);
literals = (Eterm *) modp->old.code[MI_LITERALS_START];
lit_size = (Eterm *) modp->old.code[MI_LITERALS_END] - literals;
oh = (struct erl_off_heap_header *)
modp->old.code[MI_LITERALS_OFF_HEAP];
+ *redsp += lit_size / 10; /* Need, better value... */
erts_garbage_collect_literals(rp, literals, lit_size, oh);
}
}
@@ -911,7 +941,15 @@ any_heap_refs(Eterm* start, Eterm* end, char* mod_start, Uint mod_size)
break;
case TAG_PRIMARY_HEADER:
if (!header_is_transparent(val)) {
- Eterm* new_p = p + thing_arityval(val);
+ Eterm* new_p;
+ if (header_is_bin_matchstate(val)) {
+ ErlBinMatchState *ms = (ErlBinMatchState*) p;
+ ErlBinMatchBuffer *mb = &(ms->mb);
+ if (in_area(EXPAND_POINTER(mb->orig), mod_start, mod_size)) {
+ return 1;
+ }
+ }
+ new_p = p + thing_arityval(val);
ASSERT(start <= new_p && new_p < end);
p = new_p;
}
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index 68907a771a..4e711c89e0 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -46,7 +46,8 @@
#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP)
# define ERTS_SMP_REQ_PROC_MAIN_LOCK(P) \
- if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN)
+ if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN,\
+ __FILE__, __LINE__)
# define ERTS_SMP_UNREQ_PROC_MAIN_LOCK(P) \
if ((P)) erts_proc_lc_unrequire_lock((P), ERTS_PROC_LOCK_MAIN)
#else
@@ -641,7 +642,7 @@ erts_generic_breakpoint(Process* c_p, BeamInstr* I, Eterm* reg)
erts_smp_atomic_inc_nob(&bp->count->acount);
}
- if (bp_flags & ERTS_BPF_TIME_TRACE_ACTIVE) {
+ if (bp_flags & ERTS_BPF_TIME_TRACE_ACTIVE && erts_is_tracer_proc_valid(c_p)) {
Eterm w;
erts_trace_time_call(c_p, I, bp->time);
w = (BeamInstr) *c_p->cp;
@@ -729,7 +730,8 @@ erts_bif_trace(int bif_index, Process* p, Eterm* args, BeamInstr* I)
}
}
if (bp_flags & ERTS_BPF_TIME_TRACE_ACTIVE &&
- IS_TRACED_FL(p, F_TRACE_CALLS)) {
+ IS_TRACED_FL(p, F_TRACE_CALLS) &&
+ erts_is_tracer_proc_valid(p)) {
BeamInstr *pc = (BeamInstr *)ep->code+3;
erts_trace_time_call(p, pc, bp->time);
}
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index e36ec2a93e..a3cd08834f 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -635,6 +635,11 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr)
case op_i_put_tuple_rI:
case op_i_put_tuple_xI:
case op_i_put_tuple_yI:
+ case op_new_map_jdII:
+ case op_update_map_assoc_jsdII:
+ case op_update_map_exact_jsdII:
+ case op_i_has_map_fields_fsI:
+ case op_i_get_map_elements_fsI:
{
int n = unpacked[-1];
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 78ab6fa30f..8bfb7d2ad2 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,7 @@
#include "big.h"
#include "beam_load.h"
#include "erl_binary.h"
+#include "erl_map.h"
#include "erl_bits.h"
#include "dist.h"
#include "beam_bp.h"
@@ -48,7 +49,7 @@
# define OpCase(OpCode) case op_##OpCode
# define CountCase(OpCode) case op_count_##OpCode
# define OpCode(OpCode) ((Uint*)op_##OpCode)
-# define Goto(Rel) {Go = (int)(Rel); goto emulator_loop;}
+# define Goto(Rel) {Go = (int)(UWord)(Rel); goto emulator_loop;}
# define LabelAddr(Addr) &&##Addr
#else
# define OpCase(OpCode) lb_##OpCode
@@ -70,7 +71,8 @@ do { \
ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking()); \
} while (0)
# define ERTS_SMP_REQ_PROC_MAIN_LOCK(P) \
- if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN)
+ if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN,\
+ __FILE__, __LINE__)
# define ERTS_SMP_UNREQ_PROC_MAIN_LOCK(P) \
if ((P)) erts_proc_lc_unrequire_lock((P), ERTS_PROC_LOCK_MAIN)
# else
@@ -133,7 +135,7 @@ do { \
/* We don't check the range if an ordinary switch is used */
#ifdef NO_JUMP_TABLE
-#define VALID_INSTR(IP) (0 <= (int)(IP) && ((int)(IP) < (NUMBER_OF_OPCODES*2+10)))
+#define VALID_INSTR(IP) ((UWord)(IP) < (NUMBER_OF_OPCODES*2+10))
#else
#define VALID_INSTR(IP) \
((SWord)LabelAddr(emulator_loop) <= (SWord)(IP) && \
@@ -217,6 +219,7 @@ BeamInstr beam_continue_exit[1];
BeamInstr* em_call_error_handler;
BeamInstr* em_apply_bif;
+BeamInstr* em_call_nif;
/* NOTE These should be the only variables containing trace instructions.
@@ -700,6 +703,19 @@ extern int count_instructions;
Fail; \
}
+#define IsMap(Src, Fail) if (is_not_map(Src)) { Fail; }
+
+#define HasMapField(Src, Key, Fail) if (has_not_map_field(Src, Key)) { Fail; }
+
+#define GetMapElement(Src, Key, Dst, Fail) \
+ do { \
+ Eterm _res = get_map_element(Src, Key); \
+ if (is_non_value(_res)) { \
+ Fail; \
+ } \
+ Dst = _res; \
+ } while (0)
+
#define IsFunction(X, Action) \
do { \
if ( !(is_any_fun(X)) ) { \
@@ -943,7 +959,13 @@ static BeamInstr* apply_fun(Process* p, Eterm fun,
Eterm args, Eterm* reg) NOINLINE;
static Eterm new_fun(Process* p, Eterm* reg,
ErlFunEntry* fe, int num_free) NOINLINE;
-
+static Eterm new_map(Process* p, Eterm* reg, BeamInstr* I) NOINLINE;
+static Eterm update_map_assoc(Process* p, Eterm* reg,
+ Eterm map, BeamInstr* I) NOINLINE;
+static Eterm update_map_exact(Process* p, Eterm* reg,
+ Eterm map, BeamInstr* I) NOINLINE;
+static int has_not_map_field(Eterm map, Eterm key);
+static Eterm get_map_element(Eterm map, Eterm key);
/*
* Functions not directly called by process_main(). OK to inline.
@@ -1169,11 +1191,16 @@ void process_main(void)
* c_p->arg_reg before calling the scheduler.
*/
if (!init_done) {
+ /* This should only be reached during the init phase when only the main
+ * process is running. I.e. there is no race for init_done.
+ */
init_done = 1;
goto init_emulator;
}
+
c_p = NULL;
reds_used = 0;
+
goto do_schedule1;
do_schedule:
@@ -1182,7 +1209,11 @@ 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 (diff > 0 && (Uint) diff > erts_system_monitor_long_schedule
+#ifdef ERTS_DIRTY_SCHEDULERS
+ && !ERTS_SCHEDULER_IS_DIRTY(c_p->scheduler_data)
+#endif
+ ) {
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);
@@ -1270,7 +1301,7 @@ void process_main(void)
(Eterm)fptr[1], (Uint)fptr[2],
NULL, fun_buf);
} else {
- erts_snprintf(fun_buf, sizeof(fun_buf),
+ erts_snprintf(fun_buf, sizeof(DTRACE_CHARBUF_NAME(fun_buf)),
"<unknown/%p>", next);
}
}
@@ -2322,6 +2353,175 @@ void process_main(void)
Goto(*I);
}
+ OpCase(new_map_jdII): {
+ Eterm res;
+
+ x(0) = r(0);
+ SWAPOUT;
+ res = new_map(c_p, reg, I);
+ SWAPIN;
+ r(0) = x(0);
+ StoreResult(res, Arg(1));
+ Next(4+Arg(3));
+ }
+
+ OpCase(i_has_map_fields_fsI): {
+ map_t* mp;
+ Eterm map;
+ Eterm field;
+ Eterm *ks;
+ BeamInstr* fs;
+ Uint sz,n;
+
+ GetArg1(1, map);
+
+ /* this instruction assumes Arg1 is a map,
+ * i.e. that it follows a test is_map if needed.
+ */
+
+ mp = (map_t *)map_val(map);
+ sz = map_get_size(mp);
+
+ if (sz == 0) {
+ SET_I((BeamInstr *) Arg(0));
+ goto has_map_fields_fail;
+ }
+
+ ks = map_get_keys(mp);
+ n = (Uint)Arg(2);
+ fs = &Arg(3); /* pattern fields */
+
+ ASSERT(n>0);
+
+ while(sz) {
+ field = (Eterm)*fs;
+ if (EQ(field,*ks)) {
+ n--;
+ fs++;
+ if (n == 0) break;
+ }
+ ks++; sz--;
+ }
+
+ if (n) {
+ SET_I((BeamInstr *) Arg(0));
+ goto has_map_fields_fail;
+ }
+
+ I += 4 + Arg(2);
+has_map_fields_fail:
+ ASSERT(VALID_INSTR(*I));
+ Goto(*I);
+ }
+
+#define PUT_TERM_REG(term, desc) \
+do { \
+ switch ((desc) & _TAG_IMMED1_MASK) { \
+ case (R_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ r(0) = (term); \
+ break; \
+ case (X_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ x((desc) >> _TAG_IMMED1_SIZE) = (term); \
+ break; \
+ case (Y_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ y((desc) >> _TAG_IMMED1_SIZE) = (term); \
+ break; \
+ default: \
+ ASSERT(0); \
+ break; \
+ } \
+} while(0)
+
+ OpCase(i_get_map_elements_fsI): {
+ Eterm map;
+ map_t *mp;
+ Eterm field;
+ Eterm *ks;
+ Eterm *vs;
+ BeamInstr *fs;
+ Uint sz,n;
+
+ GetArg1(1, map);
+
+ /* this instruction assumes Arg1 is a map,
+ * i.e. that it follows a test is_map if needed.
+ */
+
+ mp = (map_t *)map_val(map);
+ sz = map_get_size(mp);
+
+ if (sz == 0) {
+ SET_I((BeamInstr *) Arg(0));
+ goto get_map_elements_fail;
+ }
+
+ n = (Uint)Arg(2) / 2;
+ fs = &Arg(3); /* pattern fields and target registers */
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ while(sz) {
+ field = (Eterm)*fs;
+ if (EQ(field,*ks)) {
+ PUT_TERM_REG(*vs, fs[1]);
+ n--;
+ fs += 2;
+ /* no more values to fetch, we are done */
+ if (n == 0) break;
+ }
+ ks++; sz--;
+ vs++;
+ }
+
+ if (n) {
+ SET_I((BeamInstr *) Arg(0));
+ goto get_map_elements_fail;
+ }
+
+ I += 4 + Arg(2);
+get_map_elements_fail:
+ ASSERT(VALID_INSTR(*I));
+ Goto(*I);
+ }
+#undef PUT_TERM_REG
+
+ OpCase(update_map_assoc_jsdII): {
+ Eterm res;
+ Eterm map;
+
+ GetArg1(1, map);
+ x(0) = r(0);
+ SWAPOUT;
+ res = update_map_assoc(c_p, reg, map, I);
+ SWAPIN;
+ if (is_value(res)) {
+ r(0) = x(0);
+ StoreResult(res, Arg(2));
+ Next(5+Arg(4));
+ } else {
+ goto badarg;
+ }
+ }
+
+ OpCase(update_map_exact_jsdII): {
+ Eterm res;
+ Eterm map;
+
+ GetArg1(1, map);
+ x(0) = r(0);
+ SWAPOUT;
+ res = update_map_exact(c_p, reg, map, I);
+ SWAPIN;
+ if (is_value(res)) {
+ r(0) = x(0);
+ StoreResult(res, Arg(2));
+ Next(5+Arg(4));
+ } else {
+ goto badarg;
+ }
+ }
+
+
/*
* All guards with zero arguments have special instructions:
* self/0
@@ -3303,6 +3503,7 @@ void process_main(void)
* 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;
@@ -4326,7 +4527,19 @@ void process_main(void)
flags = Arg(2);
BsGetFieldSize(tmp_arg2, (flags >> 3), ClauseFail(), size);
if (size >= SMALL_BITS) {
- Uint wordsneeded = 1+WSIZE(NBYTES((Uint) size));
+ Uint wordsneeded;
+ /* check bits size before potential gc.
+ * We do not want a gc and then realize we don't need
+ * the allocated space (i.e. if the op fails)
+ *
+ * remember to reacquire the matchbuffer after gc.
+ */
+
+ mb = ms_matchbuffer(tmp_arg1);
+ if (mb->size - mb->offset < size) {
+ ClauseFail();
+ }
+ wordsneeded = 1+WSIZE(NBYTES((Uint) size));
TestHeapPreserve(wordsneeded, Arg(1), tmp_arg1);
}
mb = ms_matchbuffer(tmp_arg1);
@@ -4952,6 +5165,7 @@ void process_main(void)
em_call_error_handler = OpCode(call_error_handler);
em_apply_bif = OpCode(apply_bif);
+ em_call_nif = OpCode(call_nif);
beam_apply[0] = (BeamInstr) OpCode(i_apply);
beam_apply[1] = (BeamInstr) OpCode(normal_exit);
@@ -5010,6 +5224,8 @@ translate_gc_bif(void* gcf)
return bit_size_1;
} else if (gcf == erts_gc_byte_size_1) {
return byte_size_1;
+ } else if (gcf == erts_gc_map_size_1) {
+ return map_size_1;
} else if (gcf == erts_gc_abs_1) {
return abs_1;
} else if (gcf == erts_gc_float_1) {
@@ -6206,6 +6422,397 @@ new_fun(Process* p, Eterm* reg, ErlFunEntry* fe, int num_free)
return make_fun(funp);
}
+static int has_not_map_field(Eterm map, Eterm key)
+{
+ map_t* mp;
+ Eterm* keys;
+ Uint i;
+ Uint n;
+
+ mp = (map_t *)map_val(map);
+ keys = map_get_keys(mp);
+ n = map_get_size(mp);
+ if (is_immed(key)) {
+ for (i = 0; i < n; i++) {
+ if (keys[i] == key) {
+ return 0;
+ }
+ }
+ } else {
+ for (i = 0; i < n; i++) {
+ if (EQ(keys[i], key)) {
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+static Eterm get_map_element(Eterm map, Eterm key)
+{
+ map_t *mp;
+ Eterm* ks, *vs;
+ Uint i;
+ Uint n;
+
+ mp = (map_t *)map_val(map);
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+ n = map_get_size(mp);
+ if (is_immed(key)) {
+ for (i = 0; i < n; i++) {
+ if (ks[i] == key) {
+ return vs[i];
+ }
+ }
+ } else {
+ for (i = 0; i < n; i++) {
+ if (EQ(ks[i], key)) {
+ return vs[i];
+ }
+ }
+ }
+ return THE_NON_VALUE;
+}
+
+#define GET_TERM(term, dest) \
+do { \
+ Eterm src = (Eterm)(term); \
+ switch (src & _TAG_IMMED1_MASK) { \
+ case (R_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ dest = x(0); \
+ break; \
+ case (X_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ dest = x(src >> _TAG_IMMED1_SIZE); \
+ break; \
+ case (Y_REG_DEF << _TAG_PRIMARY_SIZE) | TAG_PRIMARY_HEADER: \
+ dest = y(src >> _TAG_IMMED1_SIZE); \
+ break; \
+ default: \
+ dest = src; \
+ break; \
+ } \
+} while(0)
+
+
+static Eterm
+new_map(Process* p, Eterm* reg, BeamInstr* I)
+{
+ Uint n = Arg(3);
+ Uint i;
+ Uint need = n + 1 /* hdr */ + 1 /*size*/ + 1 /* ptr */ + 1 /* arity */;
+ Eterm keys;
+ Eterm *mhp,*thp;
+ Eterm *E;
+ BeamInstr *ptr;
+ map_t *mp;
+
+ if (HeapWordsLeft(p) < need) {
+ erts_garbage_collect(p, need, reg, Arg(2));
+ }
+
+ thp = p->htop;
+ mhp = thp + 1 + n/2;
+ E = p->stop;
+ ptr = &Arg(4);
+ keys = make_tuple(thp);
+ *thp++ = make_arityval(n/2);
+
+ mp = (map_t *)mhp; mhp += MAP_HEADER_SIZE;
+ mp->thing_word = MAP_HEADER;
+ mp->size = n/2;
+ mp->keys = keys;
+
+ for (i = 0; i < n/2; i++) {
+ GET_TERM(*ptr++, *thp++);
+ GET_TERM(*ptr++, *mhp++);
+ }
+ p->htop = mhp;
+ return make_map(mp);
+}
+
+static Eterm
+update_map_assoc(Process* p, Eterm* reg, Eterm map, BeamInstr* I)
+{
+ Uint n;
+ Uint num_old;
+ Uint num_updates;
+ Uint need;
+ map_t *old_mp, *mp;
+ Eterm res;
+ Eterm* hp;
+ Eterm* E;
+ Eterm* old_keys;
+ Eterm* old_vals;
+ BeamInstr* new_p;
+ Eterm new_key;
+ Eterm* kp;
+
+ if (is_not_map(map)) {
+ return THE_NON_VALUE;
+ }
+
+ old_mp = (map_t *) map_val(map);
+ num_old = map_get_size(old_mp);
+
+ /*
+ * If the old map is empty, create a new map.
+ */
+
+ if (num_old == 0) {
+ return new_map(p, reg, I+1);
+ }
+
+ /*
+ * Allocate heap space for the worst case (i.e. all keys in the
+ * update list are new).
+ */
+
+ num_updates = Arg(4) / 2;
+ need = 2*(num_old+num_updates) + 1 + MAP_HEADER_SIZE;
+ if (HeapWordsLeft(p) < need) {
+ Uint live = Arg(3);
+ reg[live] = map;
+ erts_garbage_collect(p, need, reg, live+1);
+ map = reg[live];
+ old_mp = (map_t *)map_val(map);
+ }
+
+ /*
+ * Build the skeleton for the map, ready to be filled in.
+ *
+ * +-----------------------------------+
+ * | (Space for aritvyal for keys) | <-----------+
+ * +-----------------------------------+ |
+ * | (Space for key 1) | | <-- kp
+ * +-----------------------------------+ |
+ * . |
+ * . |
+ * . |
+ * +-----------------------------------+ |
+ * | (Space for last key) | |
+ * +-----------------------------------+ |
+ * | MAP_HEADER | |
+ * +-----------------------------------+ |
+ * | (Space for number of keys/values) | |
+ * +-----------------------------------+ |
+ * | Boxed tuple pointer >----------------+
+ * +-----------------------------------+
+ * | (Space for value 1) | <-- hp
+ * +-----------------------------------+
+ */
+
+ E = p->stop;
+ kp = p->htop + 1; /* Point to first key */
+ hp = kp + num_old + num_updates;
+
+ res = make_map(hp);
+ mp = (map_t *)hp;
+ hp += MAP_HEADER_SIZE;
+ mp->thing_word = MAP_HEADER;
+ mp->keys = make_tuple(kp-1);
+
+ old_vals = map_get_values(old_mp);
+ old_keys = map_get_keys(old_mp);
+
+ new_p = &Arg(5);
+ GET_TERM(*new_p, new_key);
+ n = num_updates;
+
+ /*
+ * Fill in keys and values, until we run out of either updates
+ * or old values and keys.
+ */
+
+ for (;;) {
+ Eterm key;
+ Sint c;
+
+ ASSERT(kp < (Eterm *)mp);
+ key = *old_keys;
+ if ((c = CMP_TERM(key, new_key)) < 0) {
+ /* Copy old key and value */
+ *kp++ = key;
+ *hp++ = *old_vals;
+ old_keys++, old_vals++, num_old--;
+ } else { /* Replace or insert new */
+ GET_TERM(new_p[1], *hp++);
+ if (c > 0) { /* If new new key */
+ *kp++ = new_key;
+ } else { /* If replacement */
+ *kp++ = key;
+ old_keys++, old_vals++, num_old--;
+ }
+ n--;
+ if (n == 0) {
+ break;
+ } else {
+ new_p += 2;
+ GET_TERM(*new_p, new_key);
+ }
+ }
+ if (num_old == 0) {
+ break;
+ }
+ }
+
+ /*
+ * At this point, we have run out of either old keys and values,
+ * or the update list. In other words, at least of one n and
+ * num_old must be zero.
+ */
+
+ if (n > 0) {
+ /*
+ * All old keys and values have been copied, but there
+ * are still new keys and values in the update list that
+ * must be copied.
+ */
+ ASSERT(num_old == 0);
+ while (n-- > 0) {
+ GET_TERM(new_p[0], *kp++);
+ GET_TERM(new_p[1], *hp++);
+ new_p += 2;
+ }
+ } else {
+ /*
+ * All updates are now done. We may still have old
+ * keys and values that we must copy.
+ */
+ ASSERT(n == 0);
+ while (num_old-- > 0) {
+ ASSERT(kp < (Eterm *)mp);
+ *kp++ = *old_keys++;
+ *hp++ = *old_vals++;
+ }
+ }
+
+ /*
+ * Calculate how many values that are unused at the end of the
+ * key tuple and fill it out with a bignum header.
+ */
+ if ((n = (Eterm *)mp - kp) > 0) {
+ *kp = make_pos_bignum_header(n-1);
+ }
+
+ /*
+ * Fill in the size of the map in both the key tuple and in the map.
+ */
+
+ n = kp - p->htop - 1; /* Actual number of keys/values */
+ *p->htop = make_arityval(n);
+ mp->size = n;
+ p->htop = hp;
+ return res;
+}
+
+/*
+ * Update values for keys that already exist in the map.
+ */
+
+static Eterm
+update_map_exact(Process* p, Eterm* reg, Eterm map, BeamInstr* I)
+{
+ Uint n;
+ Uint i;
+ Uint num_old;
+ Uint need;
+ map_t *old_mp, *mp;
+ Eterm res;
+ Eterm* hp;
+ Eterm* E;
+ Eterm* old_keys;
+ Eterm* old_vals;
+ BeamInstr* new_p;
+ Eterm new_key;
+
+ if (is_not_map(map)) {
+ return THE_NON_VALUE;
+ }
+
+ old_mp = (map_t *) map_val(map);
+ num_old = map_get_size(old_mp);
+
+ /*
+ * If the old map is empty, create a new map.
+ */
+
+ if (num_old == 0) {
+ return THE_NON_VALUE;
+ }
+
+ /*
+ * Allocate the exact heap space needed.
+ */
+
+ need = num_old + MAP_HEADER_SIZE;
+ if (HeapWordsLeft(p) < need) {
+ Uint live = Arg(3);
+ reg[live] = map;
+ erts_garbage_collect(p, need, reg, live+1);
+ map = reg[live];
+ old_mp = (map_t *)map_val(map);
+ }
+
+ /*
+ * Update map, keeping the old key tuple.
+ */
+
+ hp = p->htop;
+ E = p->stop;
+
+ old_vals = map_get_values(old_mp);
+ old_keys = map_get_keys(old_mp);
+
+ res = make_map(hp);
+ mp = (map_t *)hp;
+ hp += MAP_HEADER_SIZE;
+ mp->thing_word = MAP_HEADER;
+ mp->size = num_old;
+ mp->keys = old_mp->keys;
+
+ /* Get array of key/value pairs to be updated */
+ new_p = &Arg(5);
+ GET_TERM(*new_p, new_key);
+
+ /* Update all values */
+ n = Arg(4) / 2; /* Number of values to be updated */
+ ASSERT(n > 0);
+ for (i = 0; i < num_old; i++) {
+ if (!EQ(*old_keys, new_key)) {
+ /* Not same keys */
+ *hp++ = *old_vals;
+ } else {
+ GET_TERM(new_p[1], *hp);
+ hp++;
+ n--;
+ if (n == 0) {
+ /*
+ * All updates done. Copy remaining values
+ * and return the result.
+ */
+ for (i++, old_vals++; i < num_old; i++) {
+ *hp++ = *old_vals++;
+ }
+ ASSERT(hp == p->htop + need);
+ p->htop = hp;
+ return res;
+ } else {
+ new_p += 2;
+ GET_TERM(*new_p, new_key);
+ }
+ }
+ old_vals++, old_keys++;
+ }
+
+ /*
+ * Updates left. That means that at least one the keys in the
+ * update list did not previously exist.
+ */
+ ASSERT(hp == p->htop + need);
+ return THE_NON_VALUE;
+}
+#undef GET_TERM
int catchlevel(Process *p)
{
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 938fd8f2c9..41c1b5d2c2 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -409,7 +409,7 @@ typedef struct LoaderState {
__result = __result << 8 | *Stp->file_p++; \
} \
Dest = __result; \
- } while (0)
+ }
#define GetByte(Stp, Dest) \
if ((Stp)->file_left < 1) { \
@@ -506,6 +506,9 @@ static GenOp* gen_select_literals(LoaderState* stp, GenOpArg S,
static GenOp* const_select_val(LoaderState* stp, GenOpArg S, GenOpArg Fail,
GenOpArg Size, GenOpArg* Rest);
+static GenOp* gen_get_map_element(LoaderState* stp, GenOpArg Fail, GenOpArg Src,
+ GenOpArg Size, GenOpArg* Rest);
+
static int freeze_code(LoaderState* stp);
static void final_touch(LoaderState* stp);
@@ -2360,7 +2363,11 @@ load_code(LoaderState* stp)
if (stp->may_load_nif) {
const int finfo_ix = ci - FUNC_INFO_SZ;
- enum { MIN_FUNC_SZ = 3 };
+#ifdef ERTS_DIRTY_SCHEDULERS
+ enum { MIN_FUNC_SZ = 4 };
+#else
+ enum { MIN_FUNC_SZ = 3 };
+#endif
if (finfo_ix - last_func_start < MIN_FUNC_SZ && last_func_start) {
/* Must make room for call_nif op */
int pad = MIN_FUNC_SZ - (finfo_ix - last_func_start);
@@ -3783,6 +3790,8 @@ gen_guard_bif1(LoaderState* stp, GenOpArg Fail, GenOpArg Live, GenOpArg Bif,
op->a[1].val = (BeamInstr) (void *) erts_gc_bit_size_1;
} else if (bf == byte_size_1) {
op->a[1].val = (BeamInstr) (void *) erts_gc_byte_size_1;
+ } else if (bf == map_size_1) {
+ op->a[1].val = (BeamInstr) (void *) erts_gc_map_size_1;
} else if (bf == abs_1) {
op->a[1].val = (BeamInstr) (void *) erts_gc_abs_1;
} else if (bf == float_1) {
@@ -3949,6 +3958,49 @@ tuple_append_put(LoaderState* stp, GenOpArg Arity, GenOpArg Dst,
return op;
}
+/*
+ * Replace a get_map_elements with one key to an instruction with one
+ * element
+ */
+
+static GenOp*
+gen_get_map_element(LoaderState* stp, GenOpArg Fail, GenOpArg Src,
+ GenOpArg Size, GenOpArg* Rest)
+{
+ GenOp* op;
+
+ ASSERT(Size.type == TAG_u);
+
+ NEW_GENOP(stp, op);
+ op->next = NULL;
+ op->op = genop_get_map_element_4;
+ op->arity = 4;
+
+ op->a[0] = Fail;
+ op->a[1] = Src;
+ op->a[2] = Rest[0];
+ op->a[3] = Rest[1];
+ return op;
+}
+
+static GenOp*
+gen_has_map_field(LoaderState* stp, GenOpArg Fail, GenOpArg Src,
+ GenOpArg Size, GenOpArg* Rest)
+{
+ GenOp* op;
+
+ ASSERT(Size.type == TAG_u);
+
+ NEW_GENOP(stp, op);
+ op->next = NULL;
+ op->op = genop_has_map_field_3;
+ op->arity = 4;
+
+ op->a[0] = Fail;
+ op->a[1] = Src;
+ op->a[2] = Rest[0];
+ return op;
+}
/*
* Freeze the code in memory, move the string table into place,
@@ -4376,6 +4428,7 @@ transform_engine(LoaderState* st)
Uint* restart; /* Where to restart if current match fails. */
GenOpArg def_vars[TE_MAX_VARS]; /* Default buffer for variables. */
GenOpArg* var = def_vars;
+ int num_vars = 0;
int i; /* General index. */
Uint mask;
GenOp* instr;
@@ -4578,9 +4631,9 @@ transform_engine(LoaderState* st)
{
int n = *pc++;
int formal_arity = gen_opc[instr->op].arity;
- int num_vars = n + (instr->arity - formal_arity);
int j = formal_arity;
+ num_vars = n + (instr->arity - formal_arity);
var = erts_alloc(ERTS_ALC_T_LOADER_TMP,
num_vars * sizeof(GenOpArg));
for (i = 0; i < n; i++) {
@@ -4592,7 +4645,6 @@ transform_engine(LoaderState* st)
}
break;
#endif
-
case TOP_next_arg:
ap++;
break;
@@ -4680,6 +4732,20 @@ transform_engine(LoaderState* st)
instr->a[ap].val = var[i].val;
ap++;
break;
+#if defined(TOP_store_rest_args)
+ case TOP_store_rest_args:
+ {
+ int n = *pc++;
+ int num_extra = num_vars - n;
+
+ ASSERT(n <= num_vars);
+ GENOP_ARITY(instr, instr->arity+num_extra);
+ memcpy(instr->a, instr->def_args, ap*sizeof(GenOpArg));
+ memcpy(instr->a+ap, var+n, num_extra*sizeof(GenOpArg));
+ ap += num_extra;
+ }
+ break;
+#endif
case TOP_try_me_else:
restart = pc + 1;
restart += *pc++;
@@ -4905,7 +4971,8 @@ get_tag_and_value(LoaderState* stp, Uint len_code,
arity = count/sizeof(Eterm);
*result = new_literal(stp, &hp, arity+1);
- (void) bytes_to_big(bigbuf, count, neg, hp);
+ if (is_nil(bytes_to_big(bigbuf, count, neg, hp)))
+ goto load_error;
if (bigbuf != default_buf) {
erts_free(ERTS_ALC_T_LOADER_TMP, (void *) bigbuf);
@@ -5808,7 +5875,7 @@ erts_make_stub_module(Process* p, Eterm Mod, Eterm Beam, Eterm Info)
Funcs = tp[1];
Patchlist = tp[2];
- if ((n = list_length(Funcs)) < 0) {
+ if ((n = erts_list_length(Funcs)) < 0) {
goto error;
}
if ((bytes = erts_get_aligned_binary_bytes(Beam, &temp_alloc)) == NULL) {
diff --git a/erts/emulator/beam/beam_load.h b/erts/emulator/beam/beam_load.h
index 65a8f26d7c..bd22b0c4de 100644
--- a/erts/emulator/beam/beam_load.h
+++ b/erts/emulator/beam/beam_load.h
@@ -49,6 +49,7 @@ extern void** beam_ops;
extern BeamInstr beam_debug_apply[];
extern BeamInstr* em_call_error_handler;
extern BeamInstr* em_apply_bif;
+extern BeamInstr* em_call_nif;
/*
* The following variables keep a sorted list of address ranges for
diff --git a/erts/emulator/beam/beam_ranges.c b/erts/emulator/beam/beam_ranges.c
index 0f2d5d0c2a..cb6470638f 100644
--- a/erts/emulator/beam/beam_ranges.c
+++ b/erts/emulator/beam/beam_ranges.c
@@ -282,7 +282,7 @@ find_range(BeamInstr* pc)
while (low < high) {
if (pc < mid->start) {
high = mid;
- } else if (pc > RANGE_END(mid)) {
+ } else if (pc >= RANGE_END(mid)) {
low = mid + 1;
} else {
erts_smp_atomic_set_nob(&r[active].mid, (erts_aint_t) mid);
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 13d31285b2..b43137597e 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -1869,6 +1869,7 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend, Eterm *refp) {
} else if (is_external_pid(to)) {
dep = external_pid_dist_entry(to);
if(dep == erts_this_dist_entry) {
+#if DEBUG
erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
erts_dsprintf(dsbufp,
"Discarding message %T from %T to %T in an old "
@@ -1879,6 +1880,7 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend, Eterm *refp) {
external_pid_creation(to),
erts_this_node->creation);
erts_send_error_to_logger(p->group_leader, dsbufp);
+#endif
return 0;
}
return remote_send(p, dep, to, to, msg, suspend);
@@ -1886,8 +1888,13 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend, Eterm *refp) {
Eterm id = erts_whereis_name_to_id(p, to);
rp = erts_proc_lookup(id);
- if (rp)
+ if (rp) {
+ if (IS_TRACED(p))
+ trace_send(p, to, msg);
+ if (ERTS_PROC_GET_SAVED_CALLS_BUF(p))
+ save_calls(p, &exp_send);
goto send_message;
+ }
pt = erts_port_lookup(id,
(erts_port_synchronous_ops
@@ -1907,6 +1914,7 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend, Eterm *refp) {
} else if (is_external_port(to)
&& (external_port_dist_entry(to)
== erts_this_dist_entry)) {
+#if DEBUG
erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
erts_dsprintf(dsbufp,
"Discarding message %T from %T to %T in an old "
@@ -1917,6 +1925,7 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend, Eterm *refp) {
external_port_creation(to),
erts_this_node->creation);
erts_send_error_to_logger(p->group_leader, dsbufp);
+#endif
return 0;
} else if (is_internal_port(to)) {
int ret_val;
@@ -2675,7 +2684,7 @@ BIF_RETTYPE list_to_atom_1(BIF_ALIST_1)
if (i < 0) {
erts_free(ERTS_ALC_T_TMP, (void *) buf);
- i = list_length(BIF_ARG_1);
+ i = erts_list_length(BIF_ARG_1);
if (i > MAX_ATOM_CHARACTERS) {
BIF_ERROR(BIF_P, SYSTEM_LIMIT);
}
@@ -2763,9 +2772,10 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
Eterm *integer, Eterm *rest)
{
Sint i = 0;
+ Uint ui = 0;
int skip = 0;
int neg = 0;
- int n = 0;
+ Sint n = 0;
int m;
int lg2;
Eterm res;
@@ -2816,8 +2826,8 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
unsigned_val(CAR(list_val(lst))) > '9') {
break;
}
- i = i * 10;
- i = i + unsigned_val(CAR(list_val(lst))) - '0';
+ ui = ui * 10;
+ ui = ui + unsigned_val(CAR(list_val(lst))) - '0';
n++;
lst = CDR(list_val(lst));
if (is_nil(lst)) {
@@ -2841,10 +2851,13 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
*/
if (n <= SMALL_DIGITS) { /* It must be small */
- if (neg) i = -i;
+ if (neg) i = -(Sint)ui;
+ else i = (Sint)ui;
res = make_small(i);
} else {
- lg2 = (n+1)*230/69+1;
+ /* Convert from log10 to log2 by multiplying with 1/log10(2)=3.3219
+ which we round up to (3 + 1/3) */
+ lg2 = (n+1)*3 + (n+1)/3 + 1;
m = (lg2+D_EXP-1)/D_EXP; /* number of digits */
m = BIG_NEED_SIZE(m); /* number of words + thing */
@@ -2882,9 +2895,6 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
res = big_plus_small(res, m, hp);
}
- if (is_big(res)) /* check if small */
- res = big_plus_small(res, 0, hp); /* includes conversion to small */
-
if (neg) {
if (is_small(res))
res = make_small(-signed_val(res));
@@ -2894,8 +2904,12 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
}
}
- if (is_big(res)) {
- hp += (big_arity(res)+1);
+ if (is_not_small(res)) {
+ res = big_plus_small(res, 0, hp); /* includes conversion to small */
+
+ if (is_not_small(res)) {
+ hp += (big_arity(res)+1);
+ }
}
HRelease(p,hp_end,hp);
}
@@ -2953,7 +2967,7 @@ BIF_RETTYPE list_to_integer_2(BIF_ALIST_2)
char *buf = NULL;
int base;
- i = list_length(BIF_ARG_1);
+ i = erts_list_length(BIF_ARG_1);
if (i < 0)
BIF_ERROR(BIF_P, BADARG);
@@ -3292,7 +3306,7 @@ BIF_RETTYPE list_to_float_1(BIF_ALIST_1)
Eterm res;
char *buf = NULL;
- i = list_length(BIF_ARG_1);
+ i = erts_list_length(BIF_ARG_1);
if (i < 0)
BIF_ERROR(BIF_P, BADARG);
@@ -3407,7 +3421,7 @@ BIF_RETTYPE list_to_tuple_1(BIF_ALIST_1)
Eterm* hp;
int len;
- if ((len = list_length(list)) < 0 || len > ERTS_MAX_TUPLE_SIZE) {
+ if ((len = erts_list_length(list)) < 0 || len > ERTS_MAX_TUPLE_SIZE) {
BIF_ERROR(BIF_P, BADARG);
}
@@ -3764,45 +3778,6 @@ BIF_RETTYPE now_0(BIF_ALIST_0)
/**********************************************************************/
-BIF_RETTYPE garbage_collect_1(BIF_ALIST_1)
-{
- int reds;
- Process *rp;
-
- if (is_not_pid(BIF_ARG_1)) {
- BIF_ERROR(BIF_P, BADARG);
- }
-
- if (BIF_P->common.id == BIF_ARG_1)
- rp = BIF_P;
- else {
-#ifdef ERTS_SMP
- rp = erts_pid2proc_suspend(BIF_P, ERTS_PROC_LOCK_MAIN,
- BIF_ARG_1, ERTS_PROC_LOCK_MAIN);
- if (rp == ERTS_PROC_LOCK_BUSY)
- ERTS_BIF_YIELD1(bif_export[BIF_garbage_collect_1], BIF_P, BIF_ARG_1);
-#else
- rp = erts_proc_lookup(BIF_ARG_1);
-#endif
- if (!rp)
- BIF_RET(am_false);
- }
-
- /* The GC cost is taken for the process executing this BIF. */
-
- FLAGS(rp) |= F_NEED_FULLSWEEP;
- reds = erts_garbage_collect(rp, 0, rp->arg_reg, rp->arity);
-
-#ifdef ERTS_SMP
- if (BIF_P != rp) {
- erts_resume(rp, ERTS_PROC_LOCK_MAIN);
- erts_smp_proc_unlock(rp, ERTS_PROC_LOCK_MAIN);
- }
-#endif
-
- BIF_RET2(am_true, reds);
-}
-
BIF_RETTYPE garbage_collect_0(BIF_ALIST_0)
{
int reds;
@@ -4372,7 +4347,11 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
switch (erts_set_schedulers_online(BIF_P,
ERTS_PROC_LOCK_MAIN,
signed_val(BIF_ARG_2),
- &old_no)) {
+ &old_no
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , 0
+#endif
+ )) {
case ERTS_SCHDLR_SSPND_DONE:
BIF_RET(make_small(old_no));
case ERTS_SCHDLR_SSPND_YIELD_RESTART:
@@ -4504,6 +4483,33 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
ref,
old ? am_true : am_false);
}
+#if defined(ERTS_SMP) && defined(ERTS_DIRTY_SCHEDULERS)
+ } else if (BIF_ARG_1 == am_dirty_cpu_schedulers_online) {
+ Sint old_no;
+ if (!is_small(BIF_ARG_2))
+ goto error;
+ switch (erts_set_schedulers_online(BIF_P,
+ ERTS_PROC_LOCK_MAIN,
+ signed_val(BIF_ARG_2),
+ &old_no,
+ 1)) {
+ case ERTS_SCHDLR_SSPND_DONE:
+ BIF_RET(make_small(old_no));
+ case ERTS_SCHDLR_SSPND_YIELD_RESTART:
+ ERTS_VBUMP_ALL_REDS(BIF_P);
+ BIF_TRAP2(bif_export[BIF_system_flag_2],
+ BIF_P, BIF_ARG_1, BIF_ARG_2);
+ case ERTS_SCHDLR_SSPND_YIELD_DONE:
+ ERTS_BIF_YIELD_RETURN_X(BIF_P, make_small(old_no),
+ am_dirty_cpu_schedulers_online);
+ case ERTS_SCHDLR_SSPND_EINVAL:
+ goto error;
+ default:
+ ASSERT(0);
+ BIF_ERROR(BIF_P, EXC_INTERNAL_ERROR);
+ break;
+ }
+#endif
} else if (ERTS_IS_ATOM_STR("scheduling_statistics", BIF_ARG_1)) {
int what;
if (ERTS_IS_ATOM_STR("disable", BIF_ARG_2))
@@ -4527,7 +4533,7 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
BIF_P->group_leader,
"A call to erlang:system_flag(cpu_topology, _) was made.\n"
"The cpu_topology argument is deprecated and scheduled\n"
- "for removal in erts-5.10/OTP-R16. For more information\n"
+ "for removal in Erlang/OTP 18. For more information\n"
"see the erlang:system_flag/2 documentation.\n");
BIF_TRAP1(set_cpu_topology_trap, BIF_P, BIF_ARG_2);
} else if (ERTS_IS_ATOM_STR("scheduler_bind_type", BIF_ARG_1)) {
@@ -4535,7 +4541,7 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
BIF_P->group_leader,
"A call to erlang:system_flag(scheduler_bind_type, _) was\n"
"made. The scheduler_bind_type argument is deprecated and\n"
- "scheduled for removal in erts-5.10/OTP-R16. For more\n"
+ "scheduled for removal in Erlang/OTP 18. For more\n"
"information see the erlang:system_flag/2 documentation.\n");
return erts_bind_schedulers(BIF_P, BIF_ARG_2);
}
@@ -4654,6 +4660,17 @@ BIF_RETTYPE bump_reductions_1(BIF_ALIST_1)
BIF_RET2(am_true, reds);
}
+BIF_RETTYPE erts_internal_cmp_term_2(BIF_ALIST_2) {
+ Sint res = CMP_TERM(BIF_ARG_1,BIF_ARG_2);
+
+ /* ensure -1, 0, 1 result */
+ if (res < 0) {
+ BIF_RET(make_small(-1));
+ } else if (res > 0) {
+ BIF_RET(make_small(1));
+ }
+ BIF_RET(make_small(0));
+}
/*
* Processes doing yield on return in a bif ends up in bif_return_trap().
*/
diff --git a/erts/emulator/beam/bif.h b/erts/emulator/beam/bif.h
index 51b77a95ed..72c55ccb55 100644
--- a/erts/emulator/beam/bif.h
+++ b/erts/emulator/beam/bif.h
@@ -124,12 +124,85 @@ do { \
return THE_NON_VALUE; \
} while(0)
+#define ERTS_BIF_ERROR_TRAPPED0(Proc, Reason, Bif) \
+do { \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ return THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_ERROR_TRAPPED1(Proc, Reason, Bif, A0) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ return THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_ERROR_TRAPPED2(Proc, Reason, Bif, A0, A1) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ reg[1] = (Eterm) (A1); \
+ return THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_ERROR_TRAPPED3(Proc, Reason, Bif, A0, A1, A2) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ reg[1] = (Eterm) (A1); \
+ reg[2] = (Eterm) (A2); \
+ return THE_NON_VALUE; \
+} while (0)
+
#define ERTS_BIF_PREP_ERROR(Ret, Proc, Reason) \
do { \
(Proc)->freason = (Reason); \
(Ret) = THE_NON_VALUE; \
} while (0)
+#define ERTS_BIF_PREP_ERROR_TRAPPED0(Ret, Proc, Reason, Bif) \
+do { \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ (Ret) = THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_PREP_ERROR_TRAPPED1(Ret, Proc, Reason, Bif, A0) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ (Ret) = THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_PREP_ERROR_TRAPPED2(Ret, Proc, Reason, Bif, A0, A1) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ reg[1] = (Eterm) (A1); \
+ (Ret) = THE_NON_VALUE; \
+} while (0)
+
+#define ERTS_BIF_PREP_ERROR_TRAPPED3(Ret, Proc, Reason, Bif, A0, A1, A2) \
+do { \
+ Eterm* reg = ERTS_PROC_GET_SCHDATA((Proc))->x_reg_array; \
+ (Proc)->freason = (Reason); \
+ (Proc)->current = (Bif)->code; \
+ reg[0] = (Eterm) (A0); \
+ reg[1] = (Eterm) (A1); \
+ reg[2] = (Eterm) (A2); \
+ (Ret) = THE_NON_VALUE; \
+} while (0)
#define ERTS_BIF_PREP_TRAP0(Ret, Trap, Proc) \
do { \
@@ -392,6 +465,51 @@ erts_bif_prep_await_proc_exit_apply_trap(Process *c_p,
Eterm args[],
int nargs);
+#ifndef HIPE
+
+#define HIPE_WRAPPER_BIF_DISABLE_GC(BIF_NAME, ARITY)
+
+#else
+
+#include "erl_fun.h"
+#include "hipe_mode_switch.h"
+
+/*
+ * Hipe wrappers used by native code for BIFs that disable GC while trapping.
+ * Also add usage of the wrapper in ../hipe/hipe_bif_list.m4
+ *
+ * Problem:
+ * When native code calls a BIF that traps, hipe_mode_switch will push a
+ * "trap frame" on the Erlang stack in order to find its way back from beam_emu
+ * back to native caller when finally done. If GC is disabled and stack/heap
+ * is full there is no place to push the "trap frame".
+ *
+ * Solution:
+ * We reserve space on stack for the "trap frame" here before the BIF is called.
+ * If the BIF does not trap, the space is reclaimed here before returning.
+ * If the BIF traps, hipe_push_beam_trap_frame() will detect that a "trap frame"
+ * already is reserved and use it.
+ */
+
+
+#define HIPE_WRAPPER_BIF_DISABLE_GC(BIF_NAME, ARITY) \
+BIF_RETTYPE hipe_wrapper_ ## BIF_NAME ## _ ## ARITY (Process* c_p, \
+ Eterm* args); \
+BIF_RETTYPE hipe_wrapper_ ## BIF_NAME ## _ ## ARITY (Process* c_p, \
+ Eterm* args) \
+{ \
+ BIF_RETTYPE res; \
+ hipe_reserve_beam_trap_frame(c_p, args, ARITY); \
+ res = BIF_NAME ## _ ## ARITY (c_p, args); \
+ if (is_value(res) || c_p->freason != TRAP) { \
+ hipe_unreserve_beam_trap_frame(c_p); \
+ } \
+ return res; \
+}
+
+#endif
+
+
#include "erl_bif_table.h"
#endif
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 6037c08dd8..e68b8e6274 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -45,8 +45,7 @@ bif erlang:apply/3
bif erlang:atom_to_list/1
bif erlang:binary_to_list/1
bif erlang:binary_to_list/3
-bif erlang:binary_to_term/1
-bif erlang:check_process_code/2
+bif erlang:binary_to_term/1
bif erlang:crc32/1
bif erlang:crc32/2
bif erlang:crc32_combine/3
@@ -67,7 +66,6 @@ bif erlang:float_to_list/1
bif erlang:float_to_list/2
bif erlang:fun_info/2
bif erlang:garbage_collect/0
-bif erlang:garbage_collect/1
bif erlang:get/0
bif erlang:get/1
bif erlang:get_keys/1
@@ -155,6 +153,11 @@ bif erts_internal:port_control/3
bif erts_internal:port_close/1
bif erts_internal:port_connect/2
+bif erts_internal:request_system_task/3
+bif erts_internal:check_process_code/2
+
+bif erts_internal:map_to_tuple_keys/1
+
# inet_db support
bif erlang:port_set_data/2
bif erlang:port_get_data/1
@@ -477,7 +480,7 @@ bif erlang:call_on_load_function/1
bif erlang:finish_after_on_load/2
#
-# New Bifs in R13B4
+# New Bifs in R13B04
#
bif erlang:binary_to_term/2
@@ -575,6 +578,33 @@ bif io:printable_range/0
bif os:unsetenv/1
#
+# New in R17A
+#
+
+bif re:inspect/2
+
+ubif erlang:is_map/1
+ubif erlang:map_size/1
+bif maps:to_list/1
+bif maps:find/2
+bif maps:get/2
+bif maps:from_list/1
+bif maps:is_key/2
+bif maps:keys/1
+bif maps:merge/2
+bif maps:new/0
+bif maps:put/3
+bif maps:remove/2
+bif maps:update/3
+bif maps:values/1
+
+bif erts_internal:cmp_term/2
+
+#
+# New in 17.1.
+#
+bif erlang:fun_info_mfa/1
+#
# Obsolete
#
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index 2b27b111d8..d1e46e3063 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -274,7 +274,9 @@
_b = _b << _s; \
_vn1 = _b >> H_EXP; \
_vn0 = _b & LO_MASK; \
- _un32 = (_a1 << _s) | ((_a0>>(D_EXP-_s)) & (-_s >> (D_EXP-1))); \
+ /* If needed to avoid undefined behaviour */ \
+ if (_s) _un32 = (_a1 << _s) | ((_a0>>(D_EXP-_s)) & (-_s >> (D_EXP-1))); \
+ else _un32 = _a1; \
_un10 = _a0 << _s; \
_un1 = _un10 >> H_EXP; \
_un0 = _un10 & LO_MASK; \
@@ -1506,13 +1508,15 @@ Eterm uword_to_big(UWord x, Eterm *y)
*/
Eterm small_to_big(Sint x, Eterm *y)
{
+ Uint xu;
if (x >= 0) {
+ xu = x;
*y = make_pos_bignum_header(1);
} else {
- x = -x;
+ xu = -(Uint)x;
*y = make_neg_bignum_header(1);
}
- BIG_DIGIT(y, 0) = x;
+ BIG_DIGIT(y, 0) = xu;
return make_big(y);
}
@@ -1540,21 +1544,24 @@ Eterm erts_uint64_to_big(Uint64 x, Eterm **hpp)
Eterm erts_sint64_to_big(Sint64 x, Eterm **hpp)
{
Eterm *hp = *hpp;
+ Uint64 ux;
int neg;
- if (x >= 0)
+ if (x >= 0) {
neg = 0;
+ ux = x;
+ }
else {
neg = 1;
- x = -x;
+ ux = -(Uint64)x;
}
#if defined(ARCH_32) || HALFWORD_HEAP
- if (x >= (((Uint64) 1) << 32)) {
+ if (ux >= (((Uint64) 1) << 32)) {
if (neg)
*hp = make_neg_bignum_header(2);
else
*hp = make_pos_bignum_header(2);
- BIG_DIGIT(hp, 0) = (Uint) (x & ((Uint) 0xffffffff));
- BIG_DIGIT(hp, 1) = (Uint) ((x >> 32) & ((Uint) 0xffffffff));
+ BIG_DIGIT(hp, 0) = (Uint) (ux & ((Uint) 0xffffffff));
+ BIG_DIGIT(hp, 1) = (Uint) ((ux >> 32) & ((Uint) 0xffffffff));
*hpp += 3;
}
else
@@ -1564,7 +1571,7 @@ Eterm erts_sint64_to_big(Sint64 x, Eterm **hpp)
*hp = make_neg_bignum_header(1);
else
*hp = make_pos_bignum_header(1);
- BIG_DIGIT(hp, 0) = (Uint) x;
+ BIG_DIGIT(hp, 0) = (Uint) ux;
*hpp += 2;
}
return make_big(hp);
@@ -1603,9 +1610,11 @@ big_to_double(Wterm x, double* resp)
/*
* Logic has been copied from erl_bif_guard.c and slightly
* modified to use a static instead of dynamic heap
+ *
+ * HALFWORD: Return relative term with 'heap' as base.
*/
Eterm
-double_to_big(double x, Eterm *heap)
+double_to_big(double x, Eterm *heap, Uint hsz)
{
int is_negative;
int ds;
@@ -1633,9 +1642,10 @@ double_to_big(double x, Eterm *heap)
sz = BIG_NEED_SIZE(ds); /* number of words including arity */
hp = heap;
- res = make_big(hp);
+ res = make_big_rel(hp, heap);
xp = (ErtsDigit*) (hp + 1);
+ ASSERT(ds < hsz);
for (i = ds - 1; i >= 0; i--) {
ErtsDigit d;
@@ -1890,6 +1900,8 @@ Eterm bytes_to_big(byte *xp, dsize_t xsz, int xsgn, Eterm *r)
*rwp = d;
rwp++;
}
+ if (rsz > BIG_ARITY_MAX)
+ return NIL;
if (xsgn) {
*r = make_neg_bignum_header(rsz);
}
@@ -2664,9 +2676,6 @@ Eterm erts_chars_to_integer(Process *BIF_P, char *bytes,
res = big_plus_small(res, m, hp);
}
- if (is_big(res)) /* check if small */
- res = big_plus_small(res, 0, hp); /* includes conversion to small */
-
if (neg) {
if (is_small(res))
res = make_small(-signed_val(res));
@@ -2676,8 +2685,12 @@ Eterm erts_chars_to_integer(Process *BIF_P, char *bytes,
}
}
- if (is_big(res)) {
- hp += (big_arity(res) + 1);
+ if (is_not_small(res)) {
+ res = big_plus_small(res, 0, hp); /* includes conversion to small */
+
+ if (is_not_small(res)) {
+ hp += (big_arity(res) + 1);
+ }
}
HRelease(BIF_P, hp_end, hp);
goto bytebuf_to_integer_1_done;
diff --git a/erts/emulator/beam/big.h b/erts/emulator/beam/big.h
index 1a7b14170f..da31876d75 100644
--- a/erts/emulator/beam/big.h
+++ b/erts/emulator/beam/big.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -101,7 +101,7 @@ typedef Uint dsize_t; /* Vector size type */
#define ERTS_SINT64_HEAP_SIZE(X) \
(IS_SSMALL((X)) \
? 0 \
- : ERTS_UINT64_BIG_HEAP_SIZE__((X) >= 0 ? (X) : -(X)))
+ : ERTS_UINT64_BIG_HEAP_SIZE__((X) >= 0 ? (X) : -(Uint64)(X)))
#define ERTS_UINT64_HEAP_SIZE(X) \
(IS_USMALL(0, (X)) ? 0 : ERTS_UINT64_BIG_HEAP_SIZE__((X)))
@@ -141,7 +141,7 @@ Eterm big_lshift(Eterm, Sint, Eterm*);
int big_comp (Wterm, Wterm);
int big_ucomp (Eterm, Eterm);
int big_to_double(Wterm x, double* resp);
-Eterm double_to_big(double, Eterm*);
+Eterm double_to_big(double, Eterm*, Uint hsz);
Eterm small_to_big(Sint, Eterm*);
Eterm uint_to_big(Uint, Eterm*);
Eterm uword_to_big(UWord, Eterm*);
diff --git a/erts/emulator/beam/binary.c b/erts/emulator/beam/binary.c
index 33abac2f3d..f50d484576 100644
--- a/erts/emulator/beam/binary.c
+++ b/erts/emulator/beam/binary.c
@@ -31,12 +31,11 @@
#include "erl_binary.h"
#include "erl_bits.h"
-#ifdef DEBUG
-static int list_to_bitstr_buf(Eterm obj, char* buf, Uint len);
-#else
-static int list_to_bitstr_buf(Eterm obj, char* buf);
-#endif
-static int bitstr_list_len(Eterm obj, Uint* num_bytes);
+static Export binary_to_list_continue_export;
+static Export list_to_binary_continue_export;
+
+static BIF_RETTYPE binary_to_list_continue(BIF_ALIST_1);
+static BIF_RETTYPE list_to_binary_continue(BIF_ALIST_1);
void
erts_init_binary(void)
@@ -49,6 +48,15 @@ erts_init_binary(void)
"Internal error: Address of orig_bytes[0] of a Binary"
" is *not* 8-byte aligned\n");
}
+
+ erts_init_trap_export(&binary_to_list_continue_export,
+ am_erts_internal, am_binary_to_list_continue, 1,
+ &binary_to_list_continue);
+
+ erts_init_trap_export(&list_to_binary_continue_export,
+ am_erts_internal, am_list_to_binary_continue, 1,
+ &list_to_binary_continue);
+
}
/*
@@ -333,6 +341,132 @@ BIF_RETTYPE integer_to_binary_1(BIF_ALIST_1)
BIF_RET(res);
}
+#define ERTS_B2L_BYTES_PER_REDUCTION 256
+
+typedef struct {
+ Eterm res;
+ Eterm *hp;
+#ifdef DEBUG
+ Eterm *hp_end;
+#endif
+ byte *bytes;
+ Uint size;
+ Uint bitoffs;
+} ErtsB2LState;
+
+static void b2l_state_destructor(Binary *mbp)
+{
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(mbp) == b2l_state_destructor);
+}
+
+static BIF_RETTYPE
+binary_to_list_chunk(Process *c_p,
+ Eterm mb_eterm,
+ ErtsB2LState* sp,
+ int reds_left,
+ int gc_disabled)
+{
+ BIF_RETTYPE ret;
+ int bump_reds;
+ Uint size;
+ byte *bytes;
+
+ size = (reds_left + 1)*ERTS_B2L_BYTES_PER_REDUCTION;
+ if (size > sp->size)
+ size = sp->size;
+ bytes = sp->bytes + (sp->size - size);
+
+ bump_reds = (size - 1)/ERTS_B2L_BYTES_PER_REDUCTION + 1;
+ BUMP_REDS(c_p, bump_reds);
+
+ ASSERT(is_list(sp->res) || is_nil(sp->res));
+
+ sp->res = erts_bin_bytes_to_list(sp->res,
+ sp->hp,
+ bytes,
+ size,
+ sp->bitoffs);
+ sp->size -= size;
+ sp->hp += 2*size;
+
+ if (sp->size > 0) {
+
+ if (!gc_disabled)
+ erts_set_gc_state(c_p, 0);
+
+ ASSERT(c_p->flags & F_DISABLE_GC);
+ ASSERT(is_value(mb_eterm));
+ ERTS_BIF_PREP_TRAP1(ret,
+ &binary_to_list_continue_export,
+ c_p,
+ mb_eterm);
+ }
+ else {
+
+ ASSERT(sp->hp == sp->hp_end);
+ ASSERT(sp->size == 0);
+
+ if (!gc_disabled || !erts_set_gc_state(c_p, 1))
+ ERTS_BIF_PREP_RET(ret, sp->res);
+ else
+ ERTS_BIF_PREP_YIELD_RETURN(ret, c_p, sp->res);
+ ASSERT(!(c_p->flags & F_DISABLE_GC));
+ }
+
+ return ret;
+}
+
+static ERTS_INLINE BIF_RETTYPE
+binary_to_list(Process *c_p, Eterm *hp, Eterm tail, byte *bytes, Uint size, Uint bitoffs)
+{
+ int reds_left = ERTS_BIF_REDS_LEFT(c_p);
+ if (size < reds_left*ERTS_B2L_BYTES_PER_REDUCTION) {
+ Eterm res;
+ BIF_RETTYPE ret;
+ int bump_reds = (size - 1)/ERTS_B2L_BYTES_PER_REDUCTION + 1;
+ BUMP_REDS(c_p, bump_reds);
+ res = erts_bin_bytes_to_list(tail, hp, bytes, size, bitoffs);
+ ERTS_BIF_PREP_RET(ret, res);
+ return ret;
+ }
+ else {
+ Binary *mbp = erts_create_magic_binary(sizeof(ErtsB2LState),
+ b2l_state_destructor);
+ ErtsB2LState *sp = ERTS_MAGIC_BIN_DATA(mbp);
+ Eterm mb;
+
+ sp->res = tail;
+ sp->hp = hp;
+#ifdef DEBUG
+ sp->hp_end = sp->hp + 2*size;
+#endif
+ sp->bytes = bytes;
+ sp->size = size;
+ sp->bitoffs = bitoffs;
+
+ hp = HAlloc(c_p, PROC_BIN_SIZE);
+ mb = erts_mk_magic_binary_term(&hp, &MSO(c_p), mbp);
+ return binary_to_list_chunk(c_p, mb, sp, reds_left, 0);
+ }
+}
+
+static BIF_RETTYPE binary_to_list_continue(BIF_ALIST_1)
+{
+ Binary *mbp = ((ProcBin *) binary_val(BIF_ARG_1))->val;
+
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(mbp) == b2l_state_destructor);
+
+ ASSERT(BIF_P->flags & F_DISABLE_GC);
+
+ return binary_to_list_chunk(BIF_P,
+ BIF_ARG_1,
+ (ErtsB2LState*) ERTS_MAGIC_BIN_DATA(mbp),
+ ERTS_BIF_REDS_LEFT(BIF_P),
+ 1);
+}
+
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_to_list, 1)
+
BIF_RETTYPE binary_to_list_1(BIF_ALIST_1)
{
Eterm real_bin;
@@ -354,14 +488,15 @@ BIF_RETTYPE binary_to_list_1(BIF_ALIST_1)
} else {
Eterm* hp = HAlloc(BIF_P, 2 * size);
byte* bytes = binary_bytes(real_bin)+offset;
-
- BIF_RET(erts_bin_bytes_to_list(NIL, hp, bytes, size, bitoffs));
+ return binary_to_list(BIF_P, hp, NIL, bytes, size, bitoffs);
}
error:
BIF_ERROR(BIF_P, BADARG);
}
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_to_list, 3)
+
BIF_RETTYPE binary_to_list_3(BIF_ALIST_3)
{
byte* bytes;
@@ -387,12 +522,13 @@ BIF_RETTYPE binary_to_list_3(BIF_ALIST_3)
}
i = stop-start+1;
hp = HAlloc(BIF_P, 2*i);
- BIF_RET(erts_bin_bytes_to_list(NIL, hp, bytes+start-1, i, bitoffs));
-
+ return binary_to_list(BIF_P, hp, NIL, bytes+start-1, i, bitoffs);
error:
BIF_ERROR(BIF_P, BADARG);
}
+HIPE_WRAPPER_BIF_DISABLE_GC(bitstring_to_list, 1)
+
BIF_RETTYPE bitstring_to_list_1(BIF_ALIST_1)
{
Eterm real_bin;
@@ -431,113 +567,441 @@ BIF_RETTYPE bitstring_to_list_1(BIF_ALIST_1)
previous = CONS(hp, make_binary(last), previous);
hp += 2;
}
- BIF_RET(erts_bin_bytes_to_list(previous, hp, bytes, size, bitoffs));
+
+ return binary_to_list(BIF_P, hp, previous, bytes, size, bitoffs);
}
/* Turn a possibly deep list of ints (and binaries) into */
/* One large binary object */
-/*
- * This bif also exists in the binary module, under the name
- * binary:list_to_bin/1, why it's divided into interface and
- * implementation. Also the backend for iolist_to_binary_1.
- */
+typedef enum {
+ ERTS_L2B_OK,
+ ERTS_L2B_YIELD,
+ ERTS_L2B_TYPE_ERROR,
+ ERTS_L2B_OVERFLOW_ERROR
+} ErtsL2BResult;
-BIF_RETTYPE erts_list_to_binary_bif(Process *p, Eterm arg)
-{
+#define ERTS_L2B_STATE_INITER(C_P, ARG, BIF, SZFunc, TBufFunc) \
+ {ERTS_IOLIST2BUF_STATE_INITER((C_P), (ARG)), \
+ (ARG), THE_NON_VALUE, (BIF), (SZFunc), (TBufFunc)}
+
+#define ERTS_L2B_STATE_MOVE(TO, FROM) \
+ sys_memcpy((void *) (TO), (void *) (FROM), sizeof(ErtsL2BState))
+
+typedef struct ErtsL2BState_ ErtsL2BState;
+
+struct ErtsL2BState_ {
+ ErtsIOList2BufState buf;
+ Eterm arg;
Eterm bin;
- ErlDrvSizeT size;
- byte* bytes;
-#ifdef DEBUG
- ErlDrvSizeT offset;
-#endif
+ Export *bif;
+ int (*iolist_to_buf_size)(ErtsIOListState *);
+ ErlDrvSizeT (*iolist_to_buf)(ErtsIOList2BufState *);
+};
- if (is_nil(arg)) {
- BIF_RET(new_binary(p,(byte*)"",0));
+static ERTS_INLINE ErtsL2BResult
+list_to_binary_engine(ErtsL2BState *sp)
+{
+ ErlDrvSizeT res;
+ Process *c_p = sp->buf.iolist.c_p;
+
+ /*
+ * have_size == 0 while sp->iolist_to_buf_size()
+ * has not finished the calculation.
+ */
+
+ if (!sp->buf.iolist.have_size) {
+ switch (sp->iolist_to_buf_size(&sp->buf.iolist)) {
+ case ERTS_IOLIST_YIELD:
+ return ERTS_L2B_YIELD;
+ case ERTS_IOLIST_OVERFLOW:
+ return ERTS_L2B_OVERFLOW_ERROR;
+ case ERTS_IOLIST_TYPE:
+ return ERTS_L2B_TYPE_ERROR;
+ case ERTS_IOLIST_OK:
+ break;
+ default:
+ ASSERT(0);
+ break;
+ }
+
+ ASSERT(sp->buf.iolist.have_size);
+
+ /*
+ * Size calculated... Setup state for
+ * sp->iolist_to_buf_*()
+ */
+
+ sp->bin = new_binary(c_p,
+ (byte *) NULL,
+ sp->buf.iolist.size);
+
+ if (sp->buf.iolist.size == 0)
+ return ERTS_L2B_OK;
+
+ sp->buf.buf = (char *) binary_bytes(sp->bin);
+ sp->buf.len = sp->buf.iolist.size;
+ sp->buf.iolist.obj = sp->arg;
+
+ if (sp->buf.iolist.reds_left <= 0) {
+ BUMP_ALL_REDS(c_p);
+ return ERTS_L2B_YIELD;
+ }
}
- if (is_not_list(arg)) {
- goto error;
+
+ ASSERT(sp->buf.iolist.size != 0);
+ ASSERT(is_value(sp->bin));
+ ASSERT(sp->buf.buf);
+
+ res = sp->iolist_to_buf(&sp->buf);
+
+ if (!ERTS_IOLIST_TO_BUF_FAILED(res)) {
+ ASSERT(res == 0);
+ return ERTS_L2B_OK;
}
- switch (erts_iolist_size(arg, &size)) {
- case ERTS_IOLIST_OVERFLOW: BIF_ERROR(p, SYSTEM_LIMIT);
- case ERTS_IOLIST_TYPE: goto error;
- default: ;
+
+ switch (res) {
+ case ERTS_IOLIST_TO_BUF_YIELD:
+ return ERTS_L2B_YIELD;
+ case ERTS_IOLIST_TO_BUF_OVERFLOW:
+ return ERTS_L2B_OVERFLOW_ERROR;
+ case ERTS_IOLIST_TO_BUF_TYPE_ERROR:
+ return ERTS_L2B_TYPE_ERROR;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid return value from iolist_to_buf_yielding()");
+ return ERTS_L2B_TYPE_ERROR;
}
- bin = new_binary(p, (byte *)NULL, size);
- bytes = binary_bytes(bin);
-#ifdef DEBUG
- offset =
-#endif
- erts_iolist_to_buf(arg, (char*) bytes, size);
+}
+
+static void
+l2b_state_destructor(Binary *mbp)
+{
+ ErtsL2BState *sp = ERTS_MAGIC_BIN_DATA(mbp);
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(mbp) == l2b_state_destructor);
+ DESTROY_SAVED_ESTACK(&sp->buf.iolist.estack);
+}
+
+static ERTS_INLINE Eterm
+l2b_final_touch(Process *c_p, ErtsL2BState *sp)
+{
+ Eterm *hp;
+ ErlSubBin* sbin;
+ if (sp->buf.offset == 0)
+ return sp->bin;
+
+ hp = HAlloc(c_p, ERL_SUB_BIN_SIZE);
+ ASSERT(sp->buf.offset > 0);
+ sbin = (ErlSubBin *) hp;
+ sbin->thing_word = HEADER_SUB_BIN;
+ sbin->size = sp->buf.iolist.size-1;
+ sbin->offs = 0;
+ sbin->orig = sp->bin;
+ sbin->bitoffs = 0;
+ sbin->bitsize = sp->buf.offset;
+ sbin->is_writable = 0;
+ return make_binary(sbin);
+}
+
+static BIF_RETTYPE
+list_to_binary_chunk(Eterm mb_eterm,
+ ErtsL2BState* sp,
+ int reds_left,
+ int gc_disabled)
+{
+ Eterm err = BADARG;
+ BIF_RETTYPE ret;
+ Process *c_p = sp->buf.iolist.c_p;
- ASSERT(offset == 0);
- BIF_RET(bin);
+ sp->buf.iolist.reds_left = reds_left;
- error:
- BIF_ERROR(p, BADARG);
+ switch (list_to_binary_engine(sp)) {
+
+ case ERTS_L2B_OK: {
+ Eterm result = l2b_final_touch(c_p, sp);
+ if (!gc_disabled || !erts_set_gc_state(c_p, 1))
+ ERTS_BIF_PREP_RET(ret, result);
+ else
+ ERTS_BIF_PREP_YIELD_RETURN(ret, c_p, result);
+ ASSERT(!(c_p->flags & F_DISABLE_GC));
+ break;
+ }
+ case ERTS_L2B_YIELD:
+ if (!gc_disabled) {
+ /* first yield... */
+ Eterm *hp;
+ Binary *mbp = erts_create_magic_binary(sizeof(ErtsL2BState),
+ l2b_state_destructor);
+ ErtsL2BState *new_sp = ERTS_MAGIC_BIN_DATA(mbp);
+
+ ERTS_L2B_STATE_MOVE(new_sp, sp);
+ sp = new_sp;
+
+ hp = HAlloc(c_p, PROC_BIN_SIZE);
+ mb_eterm = erts_mk_magic_binary_term(&hp, &MSO(c_p), mbp);
+
+ ASSERT(is_value(mb_eterm));
+
+ erts_set_gc_state(c_p, 0);
+ }
+
+ ASSERT(c_p->flags & F_DISABLE_GC);
+
+ ERTS_BIF_PREP_TRAP1(ret,
+ &list_to_binary_continue_export,
+ c_p,
+ mb_eterm);
+ break;
+
+ case ERTS_L2B_OVERFLOW_ERROR:
+ err = SYSTEM_LIMIT;
+ /* fall through */
+
+ case ERTS_L2B_TYPE_ERROR:
+ if (!gc_disabled)
+ ERTS_BIF_PREP_ERROR(ret, c_p, err);
+ else {
+ if (erts_set_gc_state(c_p, 1))
+ ERTS_VBUMP_ALL_REDS(c_p);
+
+ ERTS_BIF_PREP_ERROR_TRAPPED1(ret,
+ c_p,
+ err,
+ sp->bif,
+ sp->arg);
+ }
+
+ ASSERT(!(c_p->flags & F_DISABLE_GC));
+ break;
+
+ default:
+ ERTS_INTERNAL_ERROR("Invalid return value from list_to_binary_engine()");
+ ERTS_BIF_PREP_ERROR(ret,c_p, EXC_INTERNAL_ERROR);
+ break;
+ }
+ return ret;
+}
+
+static BIF_RETTYPE list_to_binary_continue(BIF_ALIST_1)
+{
+ Binary *mbp = ((ProcBin *) binary_val(BIF_ARG_1))->val;
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(mbp) == l2b_state_destructor);
+
+ ASSERT(BIF_P->flags & F_DISABLE_GC);
+
+ return list_to_binary_chunk(BIF_ARG_1,
+ ERTS_MAGIC_BIN_DATA(mbp),
+ ERTS_BIF_REDS_LEFT(BIF_P),
+ 1);
+}
+
+BIF_RETTYPE erts_list_to_binary_bif(Process *c_p, Eterm arg, Export *bif)
+{
+ BIF_RETTYPE ret;
+
+ if (is_nil(arg))
+ ERTS_BIF_PREP_RET(ret, new_binary(c_p, (byte *) "", 0));
+ else if (is_not_list(arg))
+ ERTS_BIF_PREP_ERROR(ret, c_p, BADARG);
+ else {
+ /* check for [binary()] case */
+ Eterm h = CAR(list_val(arg));
+ Eterm t = CDR(list_val(arg));
+ if (is_binary(h)
+ && is_nil(t)
+ && !(HEADER_SUB_BIN == *(binary_val(h))
+ && (((ErlSubBin *)binary_val(h))->bitoffs != 0
+ || ((ErlSubBin *)binary_val(h))->bitsize != 0))) {
+ ERTS_BIF_PREP_RET(ret, h);
+ }
+ else {
+ ErtsL2BState state = ERTS_L2B_STATE_INITER(c_p,
+ arg,
+ bif,
+ erts_iolist_size_yielding,
+ erts_iolist_to_buf_yielding);
+ int orig_reds_left = ERTS_BIF_REDS_LEFT(c_p);
+
+ /*
+ * First try to do it all at once without having to use
+ * yielding iolist_to_buf().
+ */
+ state.buf.iolist.reds_left = orig_reds_left;
+ switch (erts_iolist_size_yielding(&state.buf.iolist)) {
+ case ERTS_IOLIST_OK: {
+ ErlDrvSizeT size = state.buf.iolist.size;
+ Eterm bin;
+ char *buf;
+
+ if (size == 0) {
+ ERTS_BIF_PREP_RET(ret, new_binary(c_p, (byte *) NULL, 0));
+ break; /* done */
+ }
+
+ bin = new_binary(c_p, (byte *) NULL, size);
+ buf = (char *) binary_bytes(bin);
+
+ if (size < ERTS_IOLIST_TO_BUF_BYTES_PER_RED*CONTEXT_REDS) {
+ /* An (over) estimation of reductions needed */
+ int reds_left = state.buf.iolist.reds_left;
+ int to_buf_reds = orig_reds_left - reds_left;
+ to_buf_reds += size/ERTS_IOLIST_TO_BUF_BYTES_PER_RED;
+ if (to_buf_reds <= reds_left) {
+ ErlDrvSizeT res;
+
+ res = erts_iolist_to_buf(arg, buf, size);
+ if (res == 0) {
+ BUMP_REDS(c_p, to_buf_reds);
+ ERTS_BIF_PREP_RET(ret, bin);
+ break; /* done */
+ }
+ if (!ERTS_IOLIST_TO_BUF_FAILED(res))
+ ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf missmatch");
+ if (res == ERTS_IOLIST_TO_BUF_OVERFLOW)
+ goto overflow;
+ goto type_error;
+ }
+ }
+ /*
+ * Since size has been computed list_to_binary_chunk() expects
+ * state prepared for iolist_to_buf.
+ */
+ state.bin = bin;
+ state.buf.buf = buf;
+ state.buf.len = size;
+ state.buf.iolist.obj = arg;
+ /* Fall through... */
+ }
+ case ERTS_IOLIST_YIELD:
+ ret = list_to_binary_chunk(THE_NON_VALUE,
+ &state,
+ state.buf.iolist.reds_left,
+ 0);
+ break;
+ case ERTS_IOLIST_OVERFLOW:
+ overflow:
+ ERTS_BIF_PREP_ERROR(ret, c_p, SYSTEM_LIMIT);
+ break;
+ case ERTS_IOLIST_TYPE:
+ type_error:
+ default:
+ ERTS_BIF_PREP_ERROR(ret, c_p, BADARG);
+ break;
+ }
+ }
+ }
+ return ret;
}
+HIPE_WRAPPER_BIF_DISABLE_GC(list_to_binary, 1)
+
BIF_RETTYPE list_to_binary_1(BIF_ALIST_1)
{
- return erts_list_to_binary_bif(BIF_P, BIF_ARG_1);
+ return erts_list_to_binary_bif(BIF_P, BIF_ARG_1, bif_export[BIF_list_to_binary_1]);
}
-/* Turn a possibly deep list of ints (and binaries) into */
-/* One large binary object */
+HIPE_WRAPPER_BIF_DISABLE_GC(iolist_to_binary, 1)
BIF_RETTYPE iolist_to_binary_1(BIF_ALIST_1)
{
if (is_binary(BIF_ARG_1)) {
BIF_RET(BIF_ARG_1);
}
- return erts_list_to_binary_bif(BIF_P, BIF_ARG_1);
+ return erts_list_to_binary_bif(BIF_P, BIF_ARG_1, bif_export[BIF_iolist_to_binary_1]);
}
+static int bitstr_list_len(ErtsIOListState *);
+static ErlDrvSizeT list_to_bitstr_buf_yielding(ErtsIOList2BufState *);
+static ErlDrvSizeT list_to_bitstr_buf_not_yielding(ErtsIOList2BufState *);
+
+HIPE_WRAPPER_BIF_DISABLE_GC(list_to_bitstring, 1)
+
BIF_RETTYPE list_to_bitstring_1(BIF_ALIST_1)
{
- Eterm bin;
- Uint sz;
- int offset;
- byte* bytes;
- ErlSubBin* sb1;
- Eterm* hp;
-
- if (is_nil(BIF_ARG_1)) {
- BIF_RET(new_binary(BIF_P,(byte*)"",0));
- }
- if (is_not_list(BIF_ARG_1)) {
- error:
- BIF_ERROR(BIF_P, BADARG);
- }
- switch (bitstr_list_len(BIF_ARG_1, &sz)) {
- case ERTS_IOLIST_TYPE:
- goto error;
- case ERTS_IOLIST_OVERFLOW:
- BIF_ERROR(BIF_P, SYSTEM_LIMIT);
- }
- bin = new_binary(BIF_P, (byte *)NULL, sz);
- bytes = binary_bytes(bin);
-#ifdef DEBUG
- offset = list_to_bitstr_buf(BIF_ARG_1, (char*) bytes, sz);
-#else
- offset = list_to_bitstr_buf(BIF_ARG_1, (char*) bytes);
-#endif
- ASSERT(offset >= 0);
- if (offset > 0) {
- hp = HAlloc(BIF_P, ERL_SUB_BIN_SIZE);
- sb1 = (ErlSubBin *) hp;
- sb1->thing_word = HEADER_SUB_BIN;
- sb1->size = sz-1;
- sb1->offs = 0;
- sb1->orig = bin;
- sb1->bitoffs = 0;
- sb1->bitsize = offset;
- sb1->is_writable = 0;
- bin = make_binary(sb1);
+ BIF_RETTYPE ret;
+
+ if (is_nil(BIF_ARG_1))
+ ERTS_BIF_PREP_RET(ret, new_binary(BIF_P, (byte *) "", 0));
+ else if (is_not_list(BIF_ARG_1))
+ ERTS_BIF_PREP_ERROR(ret, BIF_P, BADARG);
+ else {
+ /* check for [bitstring()] case */
+ Eterm h = CAR(list_val(BIF_ARG_1));
+ Eterm t = CDR(list_val(BIF_ARG_1));
+ if (is_binary(h) && is_nil(t)) {
+ ERTS_BIF_PREP_RET(ret, h);
+ }
+ else {
+ ErtsL2BState state = ERTS_L2B_STATE_INITER(BIF_P,
+ BIF_ARG_1,
+ bif_export[BIF_list_to_bitstring_1],
+ bitstr_list_len,
+ list_to_bitstr_buf_yielding);
+ int orig_reds_left = ERTS_BIF_REDS_LEFT(BIF_P);
+
+ /*
+ * First try to do it all at once without having to use
+ * yielding list_to_bitstr_buf().
+ */
+ state.buf.iolist.reds_left = orig_reds_left;
+ switch (bitstr_list_len(&state.buf.iolist)) {
+ case ERTS_IOLIST_OK: {
+ ErlDrvSizeT size = state.buf.iolist.size;
+
+ state.bin = new_binary(BIF_P, (byte *) NULL, size);
+ state.buf.buf = (char *) binary_bytes(state.bin);
+ state.buf.len = size;
+ state.buf.iolist.obj = BIF_ARG_1;
+
+ if (size < ERTS_IOLIST_TO_BUF_BYTES_PER_RED*CONTEXT_REDS) {
+ /* An (over) estimation of reductions needed */
+ int reds_left = state.buf.iolist.reds_left;
+ int to_buf_reds = orig_reds_left - reds_left;
+ to_buf_reds += size/ERTS_IOLIST_TO_BUF_BYTES_PER_RED;
+ if (to_buf_reds <= reds_left) {
+ ErlDrvSizeT res;
+
+ res = list_to_bitstr_buf_not_yielding(&state.buf);
+ if (res == 0) {
+ Eterm res_bin = l2b_final_touch(BIF_P, &state);
+ BUMP_REDS(BIF_P, to_buf_reds);
+ ERTS_BIF_PREP_RET(ret, res_bin);
+ break; /* done */
+ }
+ if (!ERTS_IOLIST_TO_BUF_FAILED(res))
+ ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf missmatch");
+ if (res == ERTS_IOLIST_TO_BUF_OVERFLOW)
+ goto overflow;
+ goto type_error;
+ }
+ }
+ /*
+ * Since size has been computed list_to_binary_chunk() expects
+ * the state prepared for list_to_bitstr_buf.
+ */
+
+ /* Fall through... */
+ }
+ case ERTS_IOLIST_YIELD:
+ ret = list_to_binary_chunk(THE_NON_VALUE,
+ &state,
+ state.buf.iolist.reds_left,
+ 0);
+ break;
+ case ERTS_IOLIST_OVERFLOW:
+ overflow:
+ ERTS_BIF_PREP_ERROR(ret, BIF_P, SYSTEM_LIMIT);
+ break;
+ case ERTS_IOLIST_TYPE:
+ type_error:
+ default:
+ ERTS_BIF_PREP_ERROR(ret, BIF_P, BADARG);
+ break;
+ }
+ }
}
-
- BIF_RET(bin);
+
+ return ret;
}
BIF_RETTYPE split_binary_2(BIF_ALIST_2)
@@ -594,123 +1058,353 @@ BIF_RETTYPE split_binary_2(BIF_ALIST_2)
* Local functions.
*/
+static int
+list_to_bitstr_buf_bcopy(ErtsIOList2BufState *state, Eterm obj, int *yield_countp);
+
/*
* The input list is assumed to be type-correct and the buffer is
* assumed to be of sufficient size. Those assumptions are verified in
* the DEBUG-built emulator.
*/
-static int
+static ErlDrvSizeT
+list_to_bitstr_buf(int yield_support, ErtsIOList2BufState *state)
+{
+
+#undef LIST_TO_BITSTR_BUF_BCOPY_DBG
+#undef LIST_TO_BITSTR_BUF_BCOPY
#ifdef DEBUG
-list_to_bitstr_buf(Eterm obj, char* buf, Uint len)
+#define LIST_TO_BITSTR_BUF_BCOPY_DBG \
+ len -= size + (offset>7);
#else
-list_to_bitstr_buf(Eterm obj, char* buf)
+#define LIST_TO_BITSTR_BUF_BCOPY_DBG
#endif
-{
- Eterm* objp;
- int offset = 0;
+#define LIST_TO_BITSTR_BUF_BCOPY(CONSP) \
+ do { \
+ byte* bptr; \
+ Uint bitsize; \
+ Uint bitoffs; \
+ Uint num_bits; \
+ size_t size = binary_size(obj); \
+ if (yield_support) { \
+ size_t max_size = ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT; \
+ if (yield_count > 0) \
+ max_size *= yield_count+1; \
+ if (size > max_size) { \
+ state->objp = CONSP; \
+ goto L_bcopy_yield; \
+ } \
+ if (size >= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT) { \
+ int cost = (int) size; \
+ cost /= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT; \
+ yield_count -= cost; \
+ } \
+ } \
+ ASSERT(size <= len); \
+ ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize); \
+ num_bits = 8*size+bitsize; \
+ copy_binary_to_buffer(buf, offset, bptr, bitoffs, num_bits); \
+ offset += bitsize; \
+ buf += size + (offset>7); \
+ LIST_TO_BITSTR_BUF_BCOPY_DBG; \
+ offset = offset & 7; \
+ } while(0)
+
+#ifdef DEBUG
+ ErlDrvSizeT len;
+#endif
+ Eterm obj;
+ char *buf;
+ Eterm *objp = NULL;
+ int offset;
+ int init_yield_count = 0, yield_count;
DECLARE_ESTACK(s);
- goto L_again;
-
- while (!ESTACK_ISEMPTY(s)) {
- obj = ESTACK_POP(s);
- L_again:
- if (is_list(obj)) {
- L_iter_list:
- objp = list_val(obj);
- obj = CAR(objp);
- if (is_byte(obj)) {
- ASSERT(len > 0);
- if (offset == 0) {
- *buf++ = unsigned_val(obj);
- } else {
- *buf = (char)((unsigned_val(obj) >> offset) |
- ((*buf >> (8-offset)) << (8-offset)));
- buf++;
- *buf = (unsigned_val(obj) << (8-offset));
- }
+
+ obj = state->iolist.obj;
+ buf = state->buf;
+ offset = state->offset;
#ifdef DEBUG
- len--;
+ len = state->len;
#endif
- } else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
-
- ASSERT(size <= len);
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- num_bits = 8*size+bitsize;
- copy_binary_to_buffer(buf, offset, bptr, bitoffs, num_bits);
- offset += bitsize;
- buf += size + (offset>7);
+
+ if (!yield_support) {
+ yield_count = init_yield_count = 0; /* Shut up faulty warning... >:-( */
+ goto L_again;
+ }
+ else {
+
+ if (state->iolist.reds_left <= 0)
+ return ERTS_IOLIST_TO_BUF_YIELD;
+
+ ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
+ init_yield_count = (ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED
+ * state->iolist.reds_left);
+ yield_count = init_yield_count;
+
+ if (!state->iolist.estack.start)
+ goto L_again;
+ else {
+ int chk_stack;
+ /* Restart; restore state... */
+ ESTACK_RESTORE(s, &state->iolist.estack);
+
+ if (!state->bcopy.bptr)
+ chk_stack = 0;
+ else {
+ chk_stack = 1;
+ if (list_to_bitstr_buf_bcopy(state, THE_NON_VALUE, &yield_count)) {
+ /* Yield again... */
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ ESTACK_SAVE(s, &state->iolist.estack);
+ return ERTS_IOLIST_TO_BUF_YIELD;
+ }
+ buf = state->buf;
+ offset = state->offset;
#ifdef DEBUG
- len -= size + (offset>7);
+ len = state->len;
#endif
- offset = offset & 7;
- } else if (is_list(obj)) {
- ESTACK_PUSH(s, CDR(objp));
- goto L_iter_list; /* on head */
- } else {
- ASSERT(is_nil(obj));
}
- obj = CDR(objp);
- if (is_list(obj)) {
- goto L_iter_list; /* on tail */
- } else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
-
- ASSERT(size <= len);
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- num_bits = 8*size+bitsize;
- copy_binary_to_buffer(buf, offset, bptr, bitoffs, num_bits);
- offset += bitsize;
- buf += size+(offset>7);
+ objp = state->objp;
+ state->objp = NULL;
+
+ if (objp)
+ goto L_tail;
+ if (!chk_stack)
+ goto L_again;
+ /* check stack */
+ }
+ }
+
+ while (!ESTACK_ISEMPTY(s)) {
+ obj = ESTACK_POP(s);
+ L_again:
+ if (is_list(obj)) {
+ while (1) { /* Tail loop */
+ while (1) { /* Head loop */
+ if (yield_support && --yield_count <= 0)
+ goto L_yield;
+ objp = list_val(obj);
+ obj = CAR(objp);
+ if (is_byte(obj)) {
+ ASSERT(len > 0);
+ if (offset == 0) {
+ *buf++ = unsigned_val(obj);
+ } else {
+ *buf = (char)((unsigned_val(obj) >> offset) |
+ ((*buf >> (8-offset)) << (8-offset)));
+ buf++;
+ *buf = (unsigned_val(obj) << (8-offset));
+ }
#ifdef DEBUG
- len -= size+(offset>7);
+ len--;
#endif
- offset = offset & 7;
- } else {
- ASSERT(is_nil(obj));
+ } else if (is_binary(obj)) {
+ LIST_TO_BITSTR_BUF_BCOPY(objp);
+ } else if (is_list(obj)) {
+ ESTACK_PUSH(s, CDR(objp));
+ continue; /* Head loop */
+ } else {
+ ASSERT(is_nil(obj));
+ }
+ break;
+ }
+
+ L_tail:
+
+ obj = CDR(objp);
+ if (is_list(obj)) {
+ continue; /* Tail loop */
+ } else if (is_binary(obj)) {
+ LIST_TO_BITSTR_BUF_BCOPY(NULL);
+ } else {
+ ASSERT(is_nil(obj));
+ }
+ break;
}
} else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
-
- ASSERT(size <= len);
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- num_bits = 8*size+bitsize;
- copy_binary_to_buffer(buf, offset, bptr, bitoffs, num_bits);
- offset += bitsize;
- buf += size + (offset>7);
-#ifdef DEBUG
- len -= size + (offset>7);
-#endif
- offset = offset & 7;
+ LIST_TO_BITSTR_BUF_BCOPY(NULL);
} else {
+ if (yield_support && --yield_count <= 0)
+ goto L_yield;
ASSERT(is_nil(obj));
}
}
DESTROY_ESTACK(s);
- return offset;
+
+ if (yield_support) {
+ int reds;
+ CLEAR_SAVED_ESTACK(&state->iolist.estack);
+ reds = ((init_yield_count - yield_count - 1)
+ / ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED) + 1;
+ BUMP_REDS(state->iolist.c_p, reds);
+ state->iolist.reds_left -= reds;
+ if (state->iolist.reds_left < 0)
+ state->iolist.reds_left = 0;
+ }
+ state->buf = buf;
+ state->offset = offset;
+ return 0;
+
+L_bcopy_yield:
+
+ state->buf = buf;
+ state->offset = offset;
+#ifdef DEBUG
+ state->len = len;
+#endif
+
+ if (list_to_bitstr_buf_bcopy(state, obj, &yield_count) == 0)
+ ERTS_INTERNAL_ERROR("Missing yield");
+
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ ESTACK_SAVE(s, &state->iolist.estack);
+ return ERTS_IOLIST_TO_BUF_YIELD;
+
+L_yield:
+
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ state->iolist.obj = obj;
+ state->buf = buf;
+ state->offset = offset;
+ ESTACK_SAVE(s, &state->iolist.estack);
+#ifdef DEBUG
+ state->len = len;
+#endif
+ return ERTS_IOLIST_TO_BUF_YIELD;
+
+
+#undef LIST_TO_BITSTR_BUF_BCOPY_DBG
+#undef LIST_TO_BITSTR_BUF_BCOPY
+
+}
+
+static ErlDrvSizeT
+list_to_bitstr_buf_yielding(ErtsIOList2BufState *state)
+{
+ return list_to_bitstr_buf(1, state);
+}
+
+static ErlDrvSizeT
+list_to_bitstr_buf_not_yielding(ErtsIOList2BufState *state)
+{
+ return list_to_bitstr_buf(0, state);
}
static int
-bitstr_list_len(Eterm obj, Uint* num_bytes)
+list_to_bitstr_buf_bcopy(ErtsIOList2BufState *state, Eterm obj, int *yield_countp)
+{
+ int res;
+ char *buf = state->buf;
+ char *next_buf;
+ int offset = state->offset;
+ int next_offset;
+#ifdef DEBUG
+ ErlDrvSizeT len = state->len;
+ ErlDrvSizeT next_len;
+#endif
+ byte* bptr;
+ size_t size;
+ size_t max_size;
+ Uint bitoffs;
+ Uint num_bits;
+ Uint bitsize;
+ int yield_count = *yield_countp;
+
+ if (state->bcopy.bptr) {
+ bptr = state->bcopy.bptr;
+ size = state->bcopy.size;
+ bitoffs = state->bcopy.bitoffs;
+ bitsize = state->bcopy.bitsize;
+ state->bcopy.bptr = NULL;
+ }
+ else {
+
+ ASSERT(is_binary(obj));
+
+ size = binary_size(obj);
+
+ ASSERT(size <= len);
+
+ ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
+ }
+
+ max_size = (size_t) ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT;
+ if (yield_count > 0)
+ max_size *= (size_t) (yield_count+1);
+
+ if (size <= max_size) {
+ if (size >= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT) {
+ int cost = (int) size;
+ cost /= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT;
+ yield_count -= cost;
+ }
+ next_offset = offset + bitsize;
+ next_buf = buf + size+(next_offset>7);
+#ifdef DEBUG
+ next_len = len - size+(next_offset>7);
+#endif
+ next_offset &= 7;
+ num_bits = 8*size+bitsize;
+ res = 0;
+ }
+ else {
+ ASSERT(0 < max_size && max_size < size);
+ yield_count = 0;
+ state->bcopy.bptr = bptr + max_size;
+ state->bcopy.bitoffs = bitoffs;
+ state->bcopy.bitsize = bitsize;
+ state->bcopy.size = size - max_size;
+ next_buf = buf + max_size;
+#ifdef DEBUG
+ next_len = len - max_size;
+#endif
+ next_offset = offset;
+ num_bits = 8*max_size;
+ size = max_size;
+ res = 1;
+ }
+
+ copy_binary_to_buffer(buf, offset, bptr, bitoffs, num_bits);
+
+ state->offset = next_offset;
+ state->buf = next_buf;
+#ifdef DEBUG
+ state->len = next_len;
+#endif
+ *yield_countp = yield_count;
+
+ return res;
+}
+
+static int
+bitstr_list_len(ErtsIOListState *state)
{
Eterm* objp;
- Uint len = 0;
- Uint offs = 0;
+ Eterm obj;
+ Uint len, offs;
+ int res, init_yield_count, yield_count;
DECLARE_ESTACK(s);
+
+ if (state->reds_left <= 0)
+ return ERTS_IOLIST_YIELD;
+
+ len = (Uint) state->size;
+ offs = state->offs;
+ obj = state->obj;
+
+ ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
+ init_yield_count = ERTS_IOLIST_SIZE_YIELDS_COUNT_PER_RED;
+ init_yield_count *= state->reds_left;
+ yield_count = init_yield_count;
+ if (state->estack.start) {
+ /* Restart; restore estack... */
+ ESTACK_RESTORE(s, &state->estack);
+ }
+
goto L_again;
#define SAFE_ADD(Var, Val) \
@@ -737,46 +1431,55 @@ bitstr_list_len(Eterm obj, Uint* num_bytes)
obj = ESTACK_POP(s);
L_again:
if (is_list(obj)) {
- L_iter_list:
- objp = list_val(obj);
- /* Head */
- obj = CAR(objp);
- if (is_byte(obj)) {
- len++;
- if (len == 0) {
- goto L_overflow_error;
+ while (1) { /* Tail loop */
+ while (1) { /* Head loop */
+ if (--yield_count <= 0)
+ goto L_yield;
+ objp = list_val(obj);
+ /* Head */
+ obj = CAR(objp);
+ if (is_byte(obj)) {
+ len++;
+ if (len == 0) {
+ goto L_overflow_error;
+ }
+ } else if (is_binary(obj)) {
+ SAFE_ADD(len, binary_size(obj));
+ SAFE_ADD_BITSIZE(offs, obj);
+ } else if (is_list(obj)) {
+ ESTACK_PUSH(s, CDR(objp));
+ continue; /* Head loop */
+ } else if (is_not_nil(obj)) {
+ goto L_type_error;
+ }
+ break;
}
- } else if (is_binary(obj)) {
- SAFE_ADD(len, binary_size(obj));
- SAFE_ADD_BITSIZE(offs, obj);
- } else if (is_list(obj)) {
- ESTACK_PUSH(s, CDR(objp));
- goto L_iter_list; /* on head */
- } else if (is_not_nil(obj)) {
- goto L_type_error;
+ /* Tail */
+ obj = CDR(objp);
+ if (is_list(obj))
+ continue; /* Tail loop */
+ else if (is_binary(obj)) {
+ SAFE_ADD(len, binary_size(obj));
+ SAFE_ADD_BITSIZE(offs, obj);
+ } else if (is_not_nil(obj)) {
+ goto L_type_error;
+ }
+ break;
}
- /* Tail */
- obj = CDR(objp);
- if (is_list(obj))
- goto L_iter_list; /* on tail */
- else if (is_binary(obj)) {
+ } else {
+ if (--yield_count <= 0)
+ goto L_yield;
+ if (is_binary(obj)) {
SAFE_ADD(len, binary_size(obj));
SAFE_ADD_BITSIZE(offs, obj);
} else if (is_not_nil(obj)) {
goto L_type_error;
}
- } else if (is_binary(obj)) {
- SAFE_ADD(len, binary_size(obj));
- SAFE_ADD_BITSIZE(offs, obj);
- } else if (is_not_nil(obj)) {
- goto L_type_error;
}
}
#undef SAFE_ADD
#undef SAFE_ADD_BITSIZE
- DESTROY_ESTACK(s);
-
/*
* Make sure that the number of bits in the bitstring will fit
* in an Uint to ensure that the binary can be matched using
@@ -789,15 +1492,42 @@ bitstr_list_len(Eterm obj, Uint* num_bytes)
if (len << 3 < len) {
goto L_overflow_error;
}
- *num_bytes = len;
- return ERTS_IOLIST_OK;
+ state->size = len;
- L_type_error:
- DESTROY_ESTACK(s);
- return ERTS_IOLIST_TYPE;
+ res = ERTS_IOLIST_OK;
+
+ L_return: {
+ int yc = init_yield_count - yield_count;
+ int reds;
+
+ DESTROY_ESTACK(s);
+ CLEAR_SAVED_ESTACK(&state->estack);
+
+ reds = (yc - 1)/ERTS_IOLIST_SIZE_YIELDS_COUNT_PER_RED + 1;
+ BUMP_REDS(state->c_p, reds);
+ state->reds_left -= reds;
+ state->size = (ErlDrvSizeT) len;
+ state->have_size = 1;
+ return res;
+ }
L_overflow_error:
- DESTROY_ESTACK(s);
- return ERTS_IOLIST_OVERFLOW;
+ res = ERTS_IOLIST_OVERFLOW;
+ len = 0;
+ goto L_return;
+
+ L_type_error:
+ res = ERTS_IOLIST_TYPE;
+ len = 0;
+ goto L_return;
+
+ L_yield:
+ BUMP_ALL_REDS(state->c_p);
+ state->reds_left = 0;
+ state->size = len;
+ state->offs = offs;
+ state->obj = obj;
+ ESTACK_SAVE(s, &state->estack);
+ return ERTS_IOLIST_YIELD;
}
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c
index b7e1092907..2cddfe2800 100644
--- a/erts/emulator/beam/break.c
+++ b/erts/emulator/beam/break.c
@@ -112,10 +112,12 @@ process_killer(void)
erts_smp_proc_lock(rp, rp_locks);
state = erts_smp_atomic32_read_acqb(&rp->state);
if (state & (ERTS_PSFLG_FREE
- | ERTS_PSFLG_EXITING
- | ERTS_PSFLG_ACTIVE
- | ERTS_PSFLG_IN_RUNQ
- | ERTS_PSFLG_RUNNING)) {
+ | ERTS_PSFLG_EXITING
+ | ERTS_PSFLG_ACTIVE
+ | ERTS_PSFLG_ACTIVE_SYS
+ | ERTS_PSFLG_IN_RUNQ
+ | ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS)) {
erts_printf("Can only kill WAITING processes this way\n");
}
else {
@@ -179,7 +181,6 @@ static void doit_print_monitor(ErtsMonitor *mon, void *vpcontext)
ASSERT(is_node_name_atom(mon->pid));
erts_print(to, to_arg, "%s{to,{%T,%T},%T}", prefix, mon->name,
mon->pid, mon->ref);
- erts_print(to, to_arg,"}");
} else if (is_atom(mon->name)){ /* local by name */
erts_print(to, to_arg, "%s{to,{%T,%T},%T}", prefix, mon->name,
erts_this_dist_entry->sysname, mon->ref);
@@ -254,6 +255,7 @@ print_process_info(int to, void *to_arg, Process *p)
p->current[1],
p->current[2]);
}
+ erts_print(to, to_arg, "Run queue: %d\n", erts_get_runq_proc(p)->ix);
erts_print(to, to_arg, "Spawned by: %T\n", p->parent);
approx_started = (time_t) p->approx_started;
diff --git a/erts/emulator/beam/code_ix.c b/erts/emulator/beam/code_ix.c
index c66d5a2f05..4344558348 100644
--- a/erts/emulator/beam/code_ix.c
+++ b/erts/emulator/beam/code_ix.c
@@ -58,7 +58,8 @@ void erts_code_ix_init(void)
erts_smp_atomic32_init_nob(&the_staging_code_index, 0);
erts_smp_mtx_init(&code_write_permission_mtx, "code_write_permission");
#ifdef ERTS_ENABLE_LOCK_CHECK
- erts_tsd_key_create(&has_code_write_permission);
+ erts_tsd_key_create(&has_code_write_permission,
+ "erts_has_code_write_permission");
#endif
CIX_TRACE("init");
}
diff --git a/erts/emulator/beam/copy.c b/erts/emulator/beam/copy.c
index 23c0fca6aa..50548850eb 100644
--- a/erts/emulator/beam/copy.c
+++ b/erts/emulator/beam/copy.c
@@ -27,6 +27,7 @@
#include "erl_process.h"
#include "erl_gc.h"
#include "big.h"
+#include "erl_map.h"
#include "erl_binary.h"
#include "erl_bits.h"
#include "dtrace-wrapper.h"
@@ -47,7 +48,8 @@ copy_object(Eterm obj, Process* to)
if (DTRACE_ENABLED(copy_object)) {
DTRACE_CHARBUF(proc_name, 64);
- erts_snprintf(proc_name, sizeof(proc_name), "%T", to->common.id);
+ erts_snprintf(proc_name, sizeof(DTRACE_CHARBUF_NAME(proc_name)),
+ "%T", to->common.id);
DTRACE2(copy_object, proc_name, size);
}
#endif
@@ -150,6 +152,24 @@ Uint size_object(Eterm obj)
goto pop_next;
}
break;
+ case MAP_SUBTAG:
+ {
+ Uint n;
+ map_t *mp;
+ mp = (map_t*)map_val_rel(obj,base);
+ ptr = (Eterm *)mp;
+ n = map_get_size(mp) + 1;
+ sum += n + 2;
+ ptr += 2; /* hdr + size words */
+ while (n--) {
+ obj = *ptr++;
+ if (!IS_CONST(obj)) {
+ ESTACK_PUSH(s, obj);
+ }
+ }
+ goto pop_next;
+ }
+ break;
case BIN_MATCHSTATE_SUBTAG:
erl_exit(ERTS_ABORT_EXIT,
"size_object: matchstate term not allowed");
@@ -318,6 +338,15 @@ Eterm copy_struct(Eterm obj, Uint sz, Eterm** hpp, ErlOffHeap* off_heap)
}
}
break;
+ case MAP_SUBTAG:
+ {
+ i = map_get_size(objp) + 3;
+ *argp = make_map_rel(htop, dst_base);
+ while (i--) {
+ *htop++ = *objp++;
+ }
+ }
+ break;
case REFC_BINARY_SUBTAG:
{
ProcBin* pb;
@@ -537,6 +566,10 @@ Eterm copy_shallow(Eterm* ptr, Uint sz, Eterm** hpp, ErlOffHeap* off_heap)
}
goto off_heap_common;
+ case MAP_SUBTAG:
+ *hp++ = *tp++;
+ sz--;
+ break;
case EXTERNAL_PID_SUBTAG:
case EXTERNAL_PORT_SUBTAG:
case EXTERNAL_REF_SUBTAG:
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 6ecf3f0722..ec07ddcd9c 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -851,9 +851,12 @@ erts_dsig_send_msg(ErtsDSigData *dsdp, Eterm remote, Eterm message)
#ifdef USE_VM_PROBES
*node_name = *sender_name = *receiver_name = '\0';
if (DTRACE_ENABLED(message_send) || DTRACE_ENABLED(message_send_remote)) {
- erts_snprintf(node_name, sizeof(node_name), "%T", dsdp->dep->sysname);
- erts_snprintf(sender_name, sizeof(sender_name), "%T", sender->common.id);
- erts_snprintf(receiver_name, sizeof(receiver_name), "%T", remote);
+ erts_snprintf(node_name, sizeof(DTRACE_CHARBUF_NAME(node_name)),
+ "%T", dsdp->dep->sysname);
+ erts_snprintf(sender_name, sizeof(DTRACE_CHARBUF_NAME(sender_name)),
+ "%T", sender->common.id);
+ erts_snprintf(receiver_name, sizeof(DTRACE_CHARBUF_NAME(receiver_name)),
+ "%T", remote);
msize = size_object(message);
if (token != NIL && token != am_have_dt_utag) {
tok_label = signed_val(SEQ_TRACE_T_LABEL(token));
@@ -908,9 +911,11 @@ erts_dsig_send_reg_msg(ErtsDSigData *dsdp, Eterm remote_name, Eterm message)
#ifdef USE_VM_PROBES
*node_name = *sender_name = *receiver_name = '\0';
if (DTRACE_ENABLED(message_send) || DTRACE_ENABLED(message_send_remote)) {
- erts_snprintf(node_name, sizeof(node_name), "%T", dsdp->dep->sysname);
- erts_snprintf(sender_name, sizeof(sender_name), "%T", sender->common.id);
- erts_snprintf(receiver_name, sizeof(receiver_name),
+ erts_snprintf(node_name, sizeof(DTRACE_CHARBUF_NAME(node_name)),
+ "%T", dsdp->dep->sysname);
+ erts_snprintf(sender_name, sizeof(DTRACE_CHARBUF_NAME(sender_name)),
+ "%T", sender->common.id);
+ erts_snprintf(receiver_name, sizeof(DTRACE_CHARBUF_NAME(receiver_name)),
"{%T,%s}", remote_name, node_name);
msize = size_object(message);
if (token != NIL && token != am_have_dt_utag) {
@@ -971,11 +976,14 @@ erts_dsig_send_exit_tt(ErtsDSigData *dsdp, Eterm local, Eterm remote,
#ifdef USE_VM_PROBES
*node_name = *sender_name = *remote_name = '\0';
if (DTRACE_ENABLED(process_exit_signal_remote)) {
- erts_snprintf(node_name, sizeof(node_name), "%T", dsdp->dep->sysname);
- erts_snprintf(sender_name, sizeof(sender_name), "%T", sender->common.id);
- erts_snprintf(remote_name, sizeof(remote_name),
+ erts_snprintf(node_name, sizeof(DTRACE_CHARBUF_NAME(node_name)),
+ "%T", dsdp->dep->sysname);
+ erts_snprintf(sender_name, sizeof(DTRACE_CHARBUF_NAME(sender_name)),
+ "%T", sender->common.id);
+ erts_snprintf(remote_name, sizeof(DTRACE_CHARBUF_NAME(remote_name)),
"{%T,%s}", remote, node_name);
- erts_snprintf(reason_str, sizeof(reason), "%T", reason);
+ erts_snprintf(reason_str, sizeof(DTRACE_CHARBUF_NAME(reason_str)),
+ "%T", reason);
if (token != NIL && token != am_have_dt_utag) {
tok_label = signed_val(SEQ_TRACE_T_LABEL(token));
tok_lastcnt = signed_val(SEQ_TRACE_T_LASTCNT(token));
@@ -1797,8 +1805,9 @@ dsig_send(ErtsDSigData *dsdp, Eterm ctl, Eterm msg, int force_busy)
DTRACE_CHARBUF(port_str, 64);
DTRACE_CHARBUF(remote_str, 64);
- erts_snprintf(port_str, sizeof(port_str), "%T", cid);
- erts_snprintf(remote_str, sizeof(remote_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", cid);
+ erts_snprintf(remote_str, sizeof(DTRACE_CHARBUF_NAME(remote_str)),
"%T", dep->sysname);
DTRACE3(dist_port_not_busy, erts_this_node_sysname,
port_str, remote_str);
@@ -1855,9 +1864,11 @@ dsig_send(ErtsDSigData *dsdp, Eterm ctl, Eterm msg, int force_busy)
DTRACE_CHARBUF(remote_str, 64);
DTRACE_CHARBUF(pid_str, 16);
- erts_snprintf(port_str, sizeof(port_str), "%T", cid);
- erts_snprintf(remote_str, sizeof(remote_str), "%T", dep->sysname);
- erts_snprintf(pid_str, sizeof(pid_str), "%T", c_p->common.id);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", cid);
+ erts_snprintf(remote_str, sizeof(DTRACE_CHARBUF_NAME(remote_str)),
+ "%T", dep->sysname);
+ erts_snprintf(pid_str, sizeof(DTRACE_CHARBUF_NAME(pid_str)),
+ "%T", c_p->common.id);
DTRACE4(dist_port_busy, erts_this_node_sysname,
port_str, remote_str, pid_str);
}
@@ -1890,8 +1901,9 @@ dist_port_command(Port *prt, ErtsDistOutputBuf *obuf)
DTRACE_CHARBUF(port_str, 64);
DTRACE_CHARBUF(remote_str, 64);
- erts_snprintf(port_str, sizeof(port_str), "%T", prt->common.id);
- erts_snprintf(remote_str, sizeof(remote_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", prt->common.id);
+ erts_snprintf(remote_str, sizeof(DTRACE_CHARBUF_NAME(remote_str)),
"%T", prt->dist_entry->sysname);
DTRACE4(dist_output, erts_this_node_sysname, port_str,
remote_str, size);
@@ -1944,8 +1956,9 @@ dist_port_commandv(Port *prt, ErtsDistOutputBuf *obuf)
DTRACE_CHARBUF(port_str, 64);
DTRACE_CHARBUF(remote_str, 64);
- erts_snprintf(port_str, sizeof(port_str), "%T", prt->common.id);
- erts_snprintf(remote_str, sizeof(remote_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", prt->common.id);
+ erts_snprintf(remote_str, sizeof(DTRACE_CHARBUF_NAME(remote_str)),
"%T", prt->dist_entry->sysname);
DTRACE4(dist_outputv, erts_this_node_sysname, port_str,
remote_str, size);
@@ -2280,8 +2293,9 @@ erts_dist_port_not_busy(Port *prt)
DTRACE_CHARBUF(port_str, 64);
DTRACE_CHARBUF(remote_str, 64);
- erts_snprintf(port_str, sizeof(port_str), "%T", prt->common.id);
- erts_snprintf(remote_str, sizeof(remote_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", prt->common.id);
+ erts_snprintf(remote_str, sizeof(DTRACE_CHARBUF_NAME(remote_str)),
"%T", prt->dist_entry->sysname);
DTRACE3(dist_port_not_busy, erts_this_node_sysname,
port_str, remote_str);
@@ -3246,10 +3260,10 @@ send_nodes_mon_msgs(Process *c_p, Eterm what, Eterm node, Eterm type, Eterm reas
DTRACE_CHARBUF(type_str, 12);
DTRACE_CHARBUF(reason_str, 64);
- erts_snprintf(what_str, sizeof(what_str), "%T", what);
- erts_snprintf(node_str, sizeof(node_str), "%T", node);
- erts_snprintf(type_str, sizeof(type_str), "%T", type);
- erts_snprintf(reason_str, sizeof(reason_str), "%T", reason);
+ erts_snprintf(what_str, sizeof(DTRACE_CHARBUF_NAME(what_str)), "%T", what);
+ erts_snprintf(node_str, sizeof(DTRACE_CHARBUF_NAME(node_str)), "%T", node);
+ erts_snprintf(type_str, sizeof(DTRACE_CHARBUF_NAME(type_str)), "%T", type);
+ erts_snprintf(reason_str, sizeof(DTRACE_CHARBUF_NAME(reason_str)), "%T", reason);
DTRACE5(dist_monitor, erts_this_node_sysname,
what_str, node_str, type_str, reason_str);
}
diff --git a/erts/emulator/beam/dist.h b/erts/emulator/beam/dist.h
index ff8f5e106f..f32b999198 100644
--- a/erts/emulator/beam/dist.h
+++ b/erts/emulator/beam/dist.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -40,13 +40,16 @@
#define DFLAG_SMALL_ATOM_TAGS 0x4000
#define DFLAG_INTERNAL_TAGS 0x8000
#define DFLAG_UTF8_ATOMS 0x10000
+#define DFLAG_MAP_TAG 0x20000
/* All flags that should be enabled when term_to_binary/1 is used. */
#define TERM_TO_BINARY_DFLAGS (DFLAG_EXTENDED_REFERENCES \
| DFLAG_NEW_FUN_TAGS \
+ | DFLAG_NEW_FLOATS \
| DFLAG_EXTENDED_PIDS_PORTS \
| DFLAG_EXPORT_PTR_TAG \
- | DFLAG_BIT_BINARIES)
+ | DFLAG_BIT_BINARIES \
+ | DFLAG_MAP_TAG)
/* opcodes used in distribution messages */
#define DOP_LINK 1
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index b5ba9bb94a..90cd227fae 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -75,9 +75,9 @@
#define ERTS_ALC_DEFAULT_ENABLED_ACUL_EHEAP_ALLOC 45
#define ERTS_ALC_DEFAULT_ENABLED_ACUL_LL_ALLOC 85
-#define ERTS_ALC_DEFAULT_ACUL 0
-#define ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC 0
-#define ERTS_ALC_DEFAULT_ACUL_LL_ALLOC 0
+#define ERTS_ALC_DEFAULT_ACUL ERTS_ALC_DEFAULT_ENABLED_ACUL
+#define ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC ERTS_ALC_DEFAULT_ENABLED_ACUL_EHEAP_ALLOC
+#define ERTS_ALC_DEFAULT_ACUL_LL_ALLOC ERTS_ALC_DEFAULT_ENABLED_ACUL_LL_ALLOC
#ifndef ERTS_SMP
# undef ERTS_ALC_DEFAULT_ACUL
@@ -242,32 +242,13 @@ do { \
sys_memcpy((void *) (IP), (void *) &aui__, sizeof(struct au_init)); \
} while (0)
-#if ERTS_ALC_DEFAULT_ACUL \
- || ERTS_ALC_DEFAULT_ACUL_LL_ALLOC \
- || ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC
-
-static ERTS_INLINE void
-set_default_acul(struct au_init *ip, int acul)
-{
- ip->thr_spec = 1;
- ip->atype = AOFIRSTFIT;
- ip->init.aoff.flavor = AOFF_BF;
- ip->init.util.acul = acul;
-}
-
-#endif
-
static void
set_default_sl_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = GOODFIT;
-#endif
ip->init.util.name_prefix = "sl_";
ip->init.util.alloc_no = ERTS_ALC_A_SHORT_LIVED;
#ifndef SMALL_MEMORY
@@ -281,7 +262,7 @@ set_default_sl_alloc_opts(struct au_init *ip)
ip->init.util.force = 1;
ip->init.util.low_mem = 1;
#endif
-
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
static void
@@ -289,12 +270,8 @@ set_default_std_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = BESTFIT;
-#endif
ip->init.util.name_prefix = "std_";
ip->init.util.alloc_no = ERTS_ALC_A_STANDARD;
#ifndef SMALL_MEMORY
@@ -303,6 +280,7 @@ set_default_std_alloc_opts(struct au_init *ip)
ip->init.util.mmbcs = 32*1024; /* Main carrier size */
#endif
ip->init.util.ts = ERTS_ALC_MTA_STANDARD;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
static void
@@ -310,13 +288,9 @@ set_default_ll_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL_LL_ALLOC
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL_LL_ALLOC);
-#else
ip->thr_spec = 0;
ip->atype = BESTFIT;
ip->init.bf.ao = 1;
-#endif
ip->init.util.ramv = 0;
ip->init.util.mmsbc = 0;
ip->init.util.sbct = ~((UWord) 0);
@@ -332,6 +306,7 @@ set_default_ll_alloc_opts(struct au_init *ip)
ip->init.util.rsbcst = 0;
ip->init.util.rsbcmt = 0;
ip->init.util.rmbcmt = 0;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL_LL_ALLOC;
}
static void
@@ -363,12 +338,8 @@ set_default_eheap_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC);
-#else
ip->thr_spec = 1;
ip->atype = GOODFIT;
-#endif
ip->init.util.name_prefix = "eheap_";
ip->init.util.alloc_no = ERTS_ALC_A_EHEAP;
#ifndef SMALL_MEMORY
@@ -382,6 +353,7 @@ set_default_eheap_alloc_opts(struct au_init *ip)
ip->init.util.force = 1;
ip->init.util.low_mem = 1;
#endif
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL_EHEAP_ALLOC;
}
static void
@@ -389,12 +361,8 @@ set_default_binary_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = BESTFIT;
-#endif
ip->init.util.name_prefix = "binary_";
ip->init.util.alloc_no = ERTS_ALC_A_BINARY;
#ifndef SMALL_MEMORY
@@ -403,6 +371,7 @@ set_default_binary_alloc_opts(struct au_init *ip)
ip->init.util.mmbcs = 32*1024; /* Main carrier size */
#endif
ip->init.util.ts = ERTS_ALC_MTA_BINARY;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
static void
@@ -410,12 +379,8 @@ set_default_ets_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = BESTFIT;
-#endif
ip->init.util.name_prefix = "ets_";
ip->init.util.alloc_no = ERTS_ALC_A_ETS;
#ifndef SMALL_MEMORY
@@ -424,6 +389,7 @@ set_default_ets_alloc_opts(struct au_init *ip)
ip->init.util.mmbcs = 32*1024; /* Main carrier size */
#endif
ip->init.util.ts = ERTS_ALC_MTA_ETS;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
static void
@@ -431,12 +397,8 @@ set_default_driver_alloc_opts(struct au_init *ip)
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = BESTFIT;
-#endif
ip->init.util.name_prefix = "driver_";
ip->init.util.alloc_no = ERTS_ALC_A_DRIVER;
#ifndef SMALL_MEMORY
@@ -445,6 +407,7 @@ set_default_driver_alloc_opts(struct au_init *ip)
ip->init.util.mmbcs = 32*1024; /* Main carrier size */
#endif
ip->init.util.ts = ERTS_ALC_MTA_DRIVER;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
static void
@@ -453,12 +416,8 @@ set_default_fix_alloc_opts(struct au_init *ip,
{
SET_DEFAULT_ALLOC_OPTS(ip);
ip->enable = AU_ALLOC_DEFAULT_ENABLE(1);
-#if ERTS_ALC_DEFAULT_ACUL
- set_default_acul(ip, ERTS_ALC_DEFAULT_ACUL);
-#else
ip->thr_spec = 1;
ip->atype = BESTFIT;
-#endif
ip->init.bf.ao = 1;
ip->init.util.name_prefix = "fix_";
ip->init.util.fix_type_size = fix_type_sizes;
@@ -469,6 +428,7 @@ set_default_fix_alloc_opts(struct au_init *ip,
ip->init.util.mmbcs = 128*1024; /* Main carrier size */
#endif
ip->init.util.ts = ERTS_ALC_MTA_FIXED_SIZE;
+ ip->init.util.acul = ERTS_ALC_DEFAULT_ACUL;
}
#ifdef ERTS_SMP
@@ -560,26 +520,25 @@ strategy_support_carrier_migration(struct au_init *auip)
}
static ERTS_INLINE void
-check_disable_carrier_migration(struct au_init *auip)
-{
- if (!strategy_support_carrier_migration(auip) || !auip->thr_spec)
- auip->init.util.acul = 0;
-}
-
-static ERTS_INLINE void
-ensure_carrier_migration_support(struct au_init *auip)
+adjust_carrier_migration_support(struct au_init *auip)
{
- auip->thr_spec = 1; /* Need thread preferred */
+#ifdef ERTS_SMP
+ if (auip->init.util.acul) {
+ auip->thr_spec = -1; /* Need thread preferred */
- /*
- * If strategy cannot handle carrier migration,
- * default to a strategy that can...
- */
- if (!strategy_support_carrier_migration(auip)) {
- /* Default to aoffcbf */
- auip->atype = AOFIRSTFIT;
- auip->init.aoff.flavor = AOFF_BF;
+ /*
+ * If strategy cannot handle carrier migration,
+ * default to a strategy that can...
+ */
+ if (!strategy_support_carrier_migration(auip)) {
+ /* Default to aoffcbf */
+ auip->atype = AOFIRSTFIT;
+ auip->init.aoff.flavor = AOFF_BF;
+ }
}
+#else
+ auip->init.util.acul = 0;
+#endif
}
void
@@ -626,7 +585,8 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop)
if (ncpu < 1)
ncpu = 1;
- erts_tsd_key_create(&erts_allctr_prelock_tsd_key);
+ erts_tsd_key_create(&erts_allctr_prelock_tsd_key,
+ "erts_allctr_prelock_tsd_key");
erts_sys_alloc_init();
erts_init_utils_mem();
@@ -670,8 +630,21 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop)
init.fix_alloc.thr_spec = 0;
#endif
+ /* Make adjustments for carrier migration support */
+ init.temp_alloc.init.util.acul = 0;
+ adjust_carrier_migration_support(&init.sl_alloc);
+ adjust_carrier_migration_support(&init.std_alloc);
+ adjust_carrier_migration_support(&init.ll_alloc);
+ adjust_carrier_migration_support(&init.eheap_alloc);
+ adjust_carrier_migration_support(&init.binary_alloc);
+ adjust_carrier_migration_support(&init.ets_alloc);
+ adjust_carrier_migration_support(&init.driver_alloc);
+ adjust_carrier_migration_support(&init.fix_alloc);
+
if (init.erts_alloc_config) {
/* Adjust flags that erts_alloc_config won't like */
+
+ /* No thread specific instances */
init.temp_alloc.thr_spec = 0;
init.sl_alloc.thr_spec = 0;
init.std_alloc.thr_spec = 0;
@@ -680,18 +653,19 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop)
init.binary_alloc.thr_spec = 0;
init.ets_alloc.thr_spec = 0;
init.driver_alloc.thr_spec = 0;
- init.fix_alloc.thr_spec = 0;
- }
-
- check_disable_carrier_migration(&init.sl_alloc);
- check_disable_carrier_migration(&init.std_alloc);
- check_disable_carrier_migration(&init.ll_alloc);
- check_disable_carrier_migration(&init.eheap_alloc);
- check_disable_carrier_migration(&init.binary_alloc);
- check_disable_carrier_migration(&init.ets_alloc);
- check_disable_carrier_migration(&init.driver_alloc);
- check_disable_carrier_migration(&init.fix_alloc);
+ init.fix_alloc.thr_spec = 0;
+ /* No carrier migration */
+ init.temp_alloc.init.util.acul = 0;
+ init.sl_alloc.init.util.acul = 0;
+ init.std_alloc.init.util.acul = 0;
+ init.ll_alloc.init.util.acul = 0;
+ init.eheap_alloc.init.util.acul = 0;
+ init.binary_alloc.init.util.acul = 0;
+ init.ets_alloc.init.util.acul = 0;
+ init.driver_alloc.init.util.acul = 0;
+ init.fix_alloc.init.util.acul = 0;
+ }
#ifdef ERTS_SMP
/* Only temp_alloc can use thread specific interface */
@@ -1290,8 +1264,6 @@ handle_au_arg(struct au_init *auip,
break;
}
}
- ensure_carrier_migration_support(auip);
-
auip->init.util.acul = get_acul_value(auip, sub_param + 4, argv, ip);
}
else if(has_prefix("asbcst", sub_param)) {
@@ -1328,7 +1300,8 @@ handle_au_arg(struct au_init *auip,
else {
bad_value(param, sub_param + 1, alg);
}
- check_disable_carrier_migration(auip);
+ if (!strategy_support_carrier_migration(auip))
+ auip->init.util.acul = 0;
}
else
goto bad_switch;
@@ -1409,7 +1382,7 @@ handle_au_arg(struct au_init *auip,
}
else if (res == 0) {
auip->thr_spec = 0;
- check_disable_carrier_migration(auip);
+ auip->init.util.acul = 0;
break;
}
goto bad_switch;
@@ -1607,7 +1580,7 @@ handle_args(int *argc, char **argv, erts_alc_hndl_args_init_t *init)
for (a = 0; a < aui_sz; a++) {
aui[a]->thr_spec = 0;
- check_disable_carrier_migration(aui[a]);
+ aui[a]->init.util.acul = 0;
aui[a]->init.util.ramv = 0;
aui[a]->init.util.lmbcs = 5*1024*1024;
}
@@ -1754,6 +1727,9 @@ erts_alloc_register_scheduler(void *vesdp)
int ix = (int) esdp->no;
int aix;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
for (aix = ERTS_ALC_A_MIN; aix <= ERTS_ALC_A_MAX; aix++) {
ErtsAllocatorThrSpec_t *tspec = &erts_allctr_thr_spec[aix];
esdp->alloc_data.deallctr[aix] = NULL;
@@ -1897,8 +1873,8 @@ erts_alc_fatal_error(int error, int func, ErtsAlcType_t n, ...)
size = va_arg(argp, Uint);
va_end(argp);
erl_exit(1,
- "%s: Cannot %s %lu bytes of memory (of type \"%s\").\n",
- allctr_str, op, size, t_str);
+ "%s: Cannot %s %lu bytes of memory (of type \"%s\", thread %d).\n",
+ allctr_str, op, size, t_str, ERTS_ALC_GET_THR_IX());
break;
}
case ERTS_ALC_E_NOALLCTR:
diff --git a/erts/emulator/beam/erl_alloc.h b/erts/emulator/beam/erl_alloc.h
index f83f6b39cf..d3109b9432 100644
--- a/erts/emulator/beam/erl_alloc.h
+++ b/erts/emulator/beam/erl_alloc.h
@@ -209,8 +209,8 @@ int erts_is_allctr_wrapper_prelocked(void);
void *erts_alloc_permanent_cache_aligned(ErtsAlcType_t type, Uint size);
#ifndef ERTS_CACHE_LINE_SIZE
-/* Assume a cache line size of 64 bytes */
-# define ERTS_CACHE_LINE_SIZE ((UWord) 64)
+/* Assumed cache line size */
+# define ERTS_CACHE_LINE_SIZE ((UWord) ASSUMED_CACHE_LINE_SIZE)
# define ERTS_CACHE_LINE_MASK (ERTS_CACHE_LINE_SIZE - 1)
#endif
@@ -492,7 +492,7 @@ static TYPE * \
NAME##_alloc(void) \
{ \
ErtsSchedulerData *esdp = erts_get_scheduler_data(); \
- if (!esdp) \
+ if (!esdp || ERTS_SCHEDULER_IS_DIRTY(esdp)) \
return NULL; \
return (TYPE *) erts_sspa_alloc(sspa_data_##NAME##__, \
(int) esdp->no - 1); \
diff --git a/erts/emulator/beam/erl_alloc.types b/erts/emulator/beam/erl_alloc.types
index bb5eba80be..21434eb117 100644
--- a/erts/emulator/beam/erl_alloc.types
+++ b/erts/emulator/beam/erl_alloc.types
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2003-2013. All Rights Reserved.
+# Copyright Ericsson AB 2003-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -150,7 +150,7 @@ type LINK_LH STANDARD PROCESSES link_lh
type SUSPEND_MON STANDARD PROCESSES suspend_monitor
type PEND_SUSPEND SHORT_LIVED PROCESSES pending_suspend
type PROC_LIST SHORT_LIVED PROCESSES proc_list
-type EXTRA_ROOT SHORT_LIVED PROCESSES extra_root
+type SAVED_ESTACK SHORT_LIVED PROCESSES saved_estack
type FUN_ENTRY LONG_LIVED CODE fun_entry
type ATOM_TXT LONG_LIVED ATOM atom_text
type BEAM_REGISTER EHEAP PROCESSES beam_register
@@ -267,7 +267,8 @@ type CODE_IX_LOCK_Q SHORT_LIVED SYSTEM code_ix_lock_q
type PROC_INTERVAL LONG_LIVED SYSTEM process_interval
type BUSY_CALLER_TAB SHORT_LIVED SYSTEM busy_caller_table
type BUSY_CALLER SHORT_LIVED SYSTEM busy_caller
-type PORT_DATA_HEAP STANDARD SYSTEM port_data_heap
+type PROC_SYS_TSK SHORT_LIVED PROCESSES proc_sys_task
+type PROC_SYS_TSK_QS SHORT_LIVED PROCESSES proc_sys_task_queues
+if threads_no_smp
# Need thread safe allocs, but std_alloc and fix_alloc are not;
@@ -355,12 +356,14 @@ type DB_MS_PSDO_PROC LONG_LIVED_LOW ETS db_match_pseudo_proc
type SCHDLR_DATA LONG_LIVED_LOW SYSTEM scheduler_data
type LL_TEMP_TERM LONG_LIVED_LOW SYSTEM ll_temp_term
+type NIF_TRAP_EXPORT STANDARD_LOW CODE nif_trap_export_entry
type EXPORT LONG_LIVED_LOW CODE export_entry
type MONITOR_SH STANDARD_LOW PROCESSES monitor_sh
type NLINK_SH STANDARD_LOW PROCESSES nlink_sh
type AINFO_REQ STANDARD_LOW SYSTEM alloc_info_request
type SCHED_WTIME_REQ STANDARD_LOW SYSTEM sched_wall_time_request
type GC_INFO_REQ STANDARD_LOW SYSTEM gc_info_request
+type PORT_DATA_HEAP STANDARD_LOW SYSTEM port_data_heap
+else # "fullword"
@@ -373,12 +376,14 @@ type DB_MS_PSDO_PROC LONG_LIVED ETS db_match_pseudo_proc
type SCHDLR_DATA LONG_LIVED SYSTEM scheduler_data
type LL_TEMP_TERM LONG_LIVED SYSTEM ll_temp_term
+type NIF_TRAP_EXPORT STANDARD CODE nif_trap_export_entry
type EXPORT LONG_LIVED CODE export_entry
type MONITOR_SH FIXED_SIZE PROCESSES monitor_sh
type NLINK_SH FIXED_SIZE PROCESSES nlink_sh
type AINFO_REQ SHORT_LIVED SYSTEM alloc_info_request
type SCHED_WTIME_REQ SHORT_LIVED SYSTEM sched_wall_time_request
type GC_INFO_REQ SHORT_LIVED SYSTEM gc_info_request
+type PORT_DATA_HEAP STANDARD SYSTEM port_data_heap
+endif
@@ -393,6 +398,7 @@ type DRV_EV_STATE LONG_LIVED SYSTEM driver_event_state
type DRV_EV_D_STATE FIXED_SIZE SYSTEM driver_event_data_state
type DRV_SEL_D_STATE FIXED_SIZE SYSTEM driver_select_data_state
type FD_LIST SHORT_LIVED SYSTEM fd_list
+type ACTIVE_FD_ARR SHORT_LIVED SYSTEM active_fd_array
type POLLSET LONG_LIVED SYSTEM pollset
type POLLSET_UPDREQ SHORT_LIVED SYSTEM pollset_update_req
type POLL_FDS LONG_LIVED SYSTEM poll_fds
@@ -412,6 +418,21 @@ type PRT_REP_EXIT STANDARD SYSTEM port_report_exit
+endif
++if ose
+
+type SYS_READ_BUF TEMPORARY SYSTEM sys_read_buf
+type FD_TAB LONG_LIVED SYSTEM fd_tab
+type FD_ENTRY_BUF STANDARD SYSTEM fd_entry_buf
+type FD_SIG_LIST SHORT_LIVED SYSTEM fd_sig_list
+type DRV_EV STANDARD SYSTEM driver_event
+type CS_PROG_PATH LONG_LIVED SYSTEM cs_prog_path
+type ENVIRONMENT TEMPORARY SYSTEM environment
+type PUTENV_STR SYSTEM SYSTEM putenv_string
+type PRT_REP_EXIT STANDARD SYSTEM port_report_exit
+
++endif
+
+
+if win32
type DRV_DATA_BUF SYSTEM SYSTEM drv_data_buf
diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c
index c6cea0185f..e3172dc4fb 100644
--- a/erts/emulator/beam/erl_alloc_util.c
+++ b/erts/emulator/beam/erl_alloc_util.c
@@ -205,7 +205,7 @@ MBC after deallocating first block:
ASSERT(((UWord)(F) & (~FLG_MASK|THIS_FREE_BLK_HDR_FLG|PREV_FREE_BLK_HDR_FLG)) == THIS_FREE_BLK_HDR_FLG), \
(B)->bhdr = ((Sz) | (F)), \
(B)->u.carrier = (C))
-
+
# define IS_MBC_FIRST_ABLK(AP,B) \
((((UWord)(B) & ~ERTS_SACRR_UNIT_MASK) == MBC_HEADER_SIZE(AP)) \
&& ((B)->bhdr & MBC_ABLK_OFFSET_MASK) == 0)
@@ -378,9 +378,8 @@ do { \
#ifdef ERTS_SMP
#define SBC_HEADER_SIZE \
- (UNIT_CEILING(sizeof(Carrier_t) \
- - sizeof(ErtsAlcCPoolData_t) \
- + ABLK_HDR_SZ) \
+ (UNIT_CEILING(offsetof(Carrier_t, cpool) \
+ + ABLK_HDR_SZ) \
- ABLK_HDR_SZ)
#else
#define SBC_HEADER_SIZE \
@@ -929,6 +928,88 @@ unlink_carrier(CarrierList_t *cl, Carrier_t *crr)
#ifdef ERTS_SMP
+#ifdef DEBUG
+static int is_in_list(ErtsDoubleLink_t* sentinel, ErtsDoubleLink_t* node)
+{
+ ErtsDoubleLink_t* p;
+
+ ASSERT(node != sentinel);
+ for (p = sentinel->next; p != sentinel; p = p->next) {
+ if (p == node)
+ return 1;
+ }
+ return 0;
+}
+#endif /* DEBUG */
+
+static ERTS_INLINE void
+link_edl_after(ErtsDoubleLink_t* after_me, ErtsDoubleLink_t* node)
+{
+ ErtsDoubleLink_t* before_me = after_me->next;
+ ASSERT(node != after_me && node != before_me);
+ node->next = before_me;
+ node->prev = after_me;
+ before_me->prev = node;
+ after_me->next = node;
+}
+
+static ERTS_INLINE void
+link_edl_before(ErtsDoubleLink_t* before_me, ErtsDoubleLink_t* node)
+{
+ ErtsDoubleLink_t* after_me = before_me->prev;
+ ASSERT(node != before_me && node != after_me);
+ node->next = before_me;
+ node->prev = after_me;
+ before_me->prev = node;
+ after_me->next = node;
+}
+
+static ERTS_INLINE void
+unlink_edl(ErtsDoubleLink_t* node)
+{
+ node->next->prev = node->prev;
+ node->prev->next = node->next;
+}
+
+static ERTS_INLINE void
+relink_edl_before(ErtsDoubleLink_t* before_me, ErtsDoubleLink_t* node)
+{
+ if (node != before_me && node != before_me->prev) {
+ unlink_edl(node);
+ link_edl_before(before_me, node);
+ }
+}
+
+static ERTS_INLINE int is_abandoned(Carrier_t *crr)
+{
+ return crr->cpool.abandoned.next != NULL;
+}
+
+static ERTS_INLINE void
+link_abandoned_carrier(ErtsDoubleLink_t* list, Carrier_t *crr)
+{
+ ASSERT(!is_abandoned(crr));
+
+ link_edl_after(list, &crr->cpool.abandoned);
+
+ ASSERT(crr->cpool.abandoned.next != &crr->cpool.abandoned);
+ ASSERT(crr->cpool.abandoned.prev != &crr->cpool.abandoned);
+}
+
+static ERTS_INLINE void
+unlink_abandoned_carrier(Carrier_t *crr)
+{
+ ASSERT(is_in_list(&crr->cpool.orig_allctr->cpool.pooled_list,
+ &crr->cpool.abandoned) ||
+ is_in_list(&crr->cpool.orig_allctr->cpool.traitor_list,
+ &crr->cpool.abandoned));
+
+ unlink_edl(&crr->cpool.abandoned);
+
+ crr->cpool.abandoned.next = NULL;
+ crr->cpool.abandoned.prev = NULL;
+}
+
static ERTS_INLINE void
clear_busy_pool_carrier(Allctr_t *allctr, Carrier_t *crr)
{
@@ -955,7 +1036,7 @@ clear_busy_pool_carrier(Allctr_t *allctr, Carrier_t *crr)
}
}
-#endif
+#endif /* ERTS_SMP */
#if 0
#define ERTS_DBG_CHK_FIX_LIST(A, FIX, IX, B) \
@@ -1775,6 +1856,18 @@ handle_delayed_dealloc(Allctr_t *allctr,
* data has been overwritten by the queue.
*/
Carrier_t *crr = FIRST_BLK_TO_MBC(allctr, blk);
+
+ /* Restore word overwritten by the dd-queue as it will be read
+ * if this carrier is pulled from dc_list by cpool_fetch()
+ */
+ ERTS_ALC_CPOOL_ASSERT(FBLK_TO_MBC(blk) != crr);
+ ERTS_ALC_CPOOL_ASSERT(sizeof(ErtsAllctrDDBlock_t) == sizeof(void*));
+#ifdef MBC_ABLK_OFFSET_BITS
+ blk->u.carrier = crr;
+#else
+ blk->carrier = crr;
+#endif
+
ERTS_ALC_CPOOL_ASSERT(ERTS_ALC_IS_CPOOL_ENABLED(allctr));
ERTS_ALC_CPOOL_ASSERT(allctr == crr->cpool.orig_allctr);
ERTS_ALC_CPOOL_ASSERT(((erts_aint_t) allctr)
@@ -2563,10 +2656,9 @@ mbc_realloc(Allctr_t *allctr, void *p, Uint size, Uint32 alcu_flgs,
#ifdef ERTS_SMP
#define ERTS_ALC_MAX_DEALLOC_CARRIER 10
-#define ERTS_ALC_CPOOL_MAX_FETCH_INSPECT 10
+#define ERTS_ALC_CPOOL_MAX_FETCH_INSPECT 20
+#define ERTS_ALC_CPOOL_MAX_TRAITOR_INSPECT 10
#define ERTS_ALC_CPOOL_CHECK_LIMIT_COUNT 100
-#define ERTS_ALC_CPOOL_MAX_NO_CARRIERS 5
-#define ERTS_ALC_CPOOL_INSERT_ALLOWED_OFFSET 100
#define ERTS_ALC_CPOOL_MAX_FAILED_STAT_READS 3
#define ERTS_ALC_CPOOL_PTR_MOD_MRK (((erts_aint_t) 1) << 0)
@@ -2743,9 +2835,6 @@ cpool_insert(Allctr_t *allctr, Carrier_t *crr)
(erts_aint_t) CARRIER_SZ(crr));
erts_atomic_inc_nob(&allctr->cpool.stat.no_carriers);
- erts_smp_atomic_set_nob(&crr->allctr,
- ((erts_aint_t) allctr)|ERTS_CRR_ALCTR_FLG_IN_POOL);
-
/*
* We search in 'next' direction and begin by passing
* one element before trying to insert. This in order to
@@ -2804,6 +2893,9 @@ cpool_insert(Allctr_t *allctr, Carrier_t *crr)
cpool_set_mod_marked(&cpd2p->prev,
(erts_aint_t) &crr->cpool,
(erts_aint_t) cpd1p);
+
+ erts_smp_atomic_set_wb(&crr->allctr,
+ ((erts_aint_t) allctr)|ERTS_CRR_ALCTR_FLG_IN_POOL);
}
static void
@@ -2904,59 +2996,163 @@ cpool_delete(Allctr_t *allctr, Allctr_t *prev_allctr, Carrier_t *crr)
static Carrier_t *
cpool_fetch(Allctr_t *allctr, UWord size)
{
- int i;
+ int i, i_stop, has_passed_sentinel;
Carrier_t *crr;
ErtsAlcCPoolData_t *cpdp;
- ErtsAlcCPoolData_t *sentinel = &carrier_pool[allctr->alloc_no].sentinel;
+ ErtsAlcCPoolData_t *cpool_entrance;
+ ErtsAlcCPoolData_t *sentinel;
+ ErtsDoubleLink_t* dl;
+ ErtsDoubleLink_t* first_old_traitor;
ERTS_ALC_CPOOL_ASSERT(allctr->alloc_no == ERTS_ALC_A_INVALID /* testcase */
|| erts_thr_progress_is_managed_thread());
- i = 0;
+ i = ERTS_ALC_CPOOL_MAX_FETCH_INSPECT;
+ first_old_traitor = allctr->cpool.traitor_list.next;
+ cpool_entrance = NULL;
- /* First; check our own pending dealloc carrier list... */
- crr = allctr->cpool.dc_list.last;
- while (crr && i < ERTS_ALC_CPOOL_MAX_FETCH_INSPECT) {
- if (erts_atomic_read_nob(&crr->cpool.max_size) >= size) {
- unlink_carrier(&allctr->cpool.dc_list, crr);
-#ifdef ERTS_ALC_CPOOL_DEBUG
- ERTS_ALC_CPOOL_ASSERT(erts_smp_atomic_xchg_nob(&crr->allctr,
- ((erts_aint_t) allctr))
- == (((erts_aint_t) allctr) & ~ERTS_CRR_ALCTR_FLG_MASK));
-#else
- erts_smp_atomic_set_nob(&crr->allctr, ((erts_aint_t) allctr));
-#endif
- return crr;
+ /*
+ * Search my own pooled_list,
+ * i.e my abandoned carriers that were in the pool last time I checked.
+ */
+
+ dl = allctr->cpool.pooled_list.next;
+ while(dl != &allctr->cpool.pooled_list) {
+ erts_aint_t exp, act;
+ crr = (Carrier_t *) (((char *) dl) - offsetof(Carrier_t, cpool.abandoned));
+
+ ASSERT(!is_in_list(&allctr->cpool.traitor_list, dl));
+ ASSERT(crr->cpool.orig_allctr == allctr);
+ dl = dl->next;
+ exp = erts_smp_atomic_read_rb(&crr->allctr);
+ if ((exp & ERTS_CRR_ALCTR_FLG_MASK) == ERTS_CRR_ALCTR_FLG_IN_POOL
+ && erts_atomic_read_nob(&crr->cpool.max_size) >= size) {
+ /* Try to fetch it... */
+ act = erts_smp_atomic_cmpxchg_mb(&crr->allctr,
+ (erts_aint_t) allctr,
+ exp);
+ if (act == exp) {
+ cpool_delete(allctr, ((Allctr_t *) (act & ~ERTS_CRR_ALCTR_FLG_MASK)), crr);
+ unlink_abandoned_carrier(crr);
+
+ /* Move sentinel to continue next search from here */
+ relink_edl_before(dl, &allctr->cpool.pooled_list);
+ return crr;
+ }
+ exp = act;
+ }
+ if (exp & ERTS_CRR_ALCTR_FLG_IN_POOL) {
+ if (!cpool_entrance)
+ cpool_entrance = &crr->cpool;
+ }
+ else { /* Not in pool, move to traitor_list */
+ unlink_abandoned_carrier(crr);
+ link_abandoned_carrier(&allctr->cpool.traitor_list, crr);
+ }
+ if (--i <= 0) {
+ /* Move sentinel to continue next search from here */
+ relink_edl_before(dl, &allctr->cpool.pooled_list);
+ return NULL;
}
- crr = crr->prev;
- i++;
}
- /* ... then the pool ... */
+ /* Now search traitor_list.
+ * i.e carriers employed by other allocators last time I checked.
+ * They might have been abandoned since then.
+ */
+
+ i_stop = (i < ERTS_ALC_CPOOL_MAX_TRAITOR_INSPECT ?
+ 0 : i - ERTS_ALC_CPOOL_MAX_TRAITOR_INSPECT);
+ dl = first_old_traitor;
+ while(dl != &allctr->cpool.traitor_list) {
+ erts_aint_t exp, act;
+ crr = (Carrier_t *) (((char *) dl) - offsetof(Carrier_t, cpool.abandoned));
+ ASSERT(dl != &allctr->cpool.pooled_list);
+ ASSERT(crr->cpool.orig_allctr == allctr);
+ dl = dl->next;
+ exp = erts_smp_atomic_read_rb(&crr->allctr);
+ if (exp & ERTS_CRR_ALCTR_FLG_IN_POOL) {
+ if (!(exp & ERTS_CRR_ALCTR_FLG_BUSY)
+ && erts_atomic_read_nob(&crr->cpool.max_size) >= size) {
+ /* Try to fetch it... */
+ act = erts_smp_atomic_cmpxchg_mb(&crr->allctr,
+ (erts_aint_t) allctr,
+ exp);
+ if (act == exp) {
+ cpool_delete(allctr, ((Allctr_t *) (act & ~ERTS_CRR_ALCTR_FLG_MASK)), crr);
+ unlink_abandoned_carrier(crr);
+
+ /* Move sentinel to continue next search from here */
+ relink_edl_before(dl, &allctr->cpool.traitor_list);
+ return crr;
+ }
+ exp = act;
+ }
+ if (exp & ERTS_CRR_ALCTR_FLG_IN_POOL) {
+ if (!cpool_entrance)
+ cpool_entrance = &crr->cpool;
+
+ /* Move to pooled_list */
+ unlink_abandoned_carrier(crr);
+ link_abandoned_carrier(&allctr->cpool.pooled_list, crr);
+ }
+ }
+ if (--i <= i_stop) {
+ /* Move sentinel to continue next search from here */
+ relink_edl_before(dl, &allctr->cpool.traitor_list);
+ if (i > 0)
+ break;
+ else
+ return NULL;
+ }
+ }
/*
- * We search in 'prev' direction and begin by passing
- * one element before trying to fetch. This in order to
- * avoid contention with threads inserting elements.
+ * Finally search the shared pool and try employ foreign carriers
*/
- cpdp = cpool_aint2cpd(cpool_read(&sentinel->prev));
- if (cpdp == sentinel)
- return NULL;
+ sentinel = &carrier_pool[allctr->alloc_no].sentinel;
+ if (cpool_entrance) {
+ /* We saw a pooled carried above, use it as entrance into the pool
+ */
+ cpdp = cpool_entrance;
+ }
+ else {
+ /* No pooled carried seen above. Start search at cpool sentinel,
+ * but begin by passing one element before trying to fetch.
+ * This in order to avoid contention with threads inserting elements.
+ */
+ cpool_entrance = sentinel;
+ cpdp = cpool_aint2cpd(cpool_read(&cpool_entrance->prev));
+ if (cpdp == sentinel)
+ return NULL;
+ }
- while (i < ERTS_ALC_CPOOL_MAX_FETCH_INSPECT) {
+ has_passed_sentinel = 0;
+ while (1) {
erts_aint_t exp;
cpdp = cpool_aint2cpd(cpool_read(&cpdp->prev));
- if (cpdp == sentinel) {
+ if (cpdp == cpool_entrance) {
+ if (cpool_entrance == sentinel) {
+ cpdp = cpool_aint2cpd(cpool_read(&cpdp->prev));
+ if (cpdp == sentinel)
+ return NULL;
+ }
+ i = 0; /* Last one to inspect */
+ }
+ else if (cpdp == sentinel) {
+ if (has_passed_sentinel) {
+ /* We been here before. cpool_entrance must have been removed */
+ return NULL;
+ }
cpdp = cpool_aint2cpd(cpool_read(&cpdp->prev));
if (cpdp == sentinel)
return NULL;
- i = ERTS_ALC_CPOOL_MAX_FETCH_INSPECT; /* Last one to inspect */
+ has_passed_sentinel = 1;
}
- crr = (Carrier_t *) (((char *) cpdp) - offsetof(Carrier_t, cpool));
+ crr = (Carrier_t *)(((char *)cpdp) - offsetof(Carrier_t, cpool));
exp = erts_smp_atomic_read_rb(&crr->allctr);
- if (((exp & (ERTS_CRR_ALCTR_FLG_IN_POOL|ERTS_CRR_ALCTR_FLG_BUSY))
- == ERTS_CRR_ALCTR_FLG_IN_POOL)
+ if (((exp & (ERTS_CRR_ALCTR_FLG_MASK)) == ERTS_CRR_ALCTR_FLG_IN_POOL)
&& (erts_atomic_read_nob(&cpdp->max_size) >= size)) {
erts_aint_t act;
/* Try to fetch it... */
@@ -2965,11 +3161,35 @@ cpool_fetch(Allctr_t *allctr, UWord size)
exp);
if (act == exp) {
cpool_delete(allctr, ((Allctr_t *) (act & ~ERTS_CRR_ALCTR_FLG_MASK)), crr);
+ if (crr->cpool.orig_allctr == allctr) {
+ unlink_abandoned_carrier(crr);
+ }
return crr;
}
}
- i++;
+ if (--i <= 0)
+ return NULL;
}
+
+ /* Last; check our own pending dealloc carrier list... */
+ crr = allctr->cpool.dc_list.last;
+ while (crr) {
+ if (erts_atomic_read_nob(&crr->cpool.max_size) >= size) {
+ unlink_carrier(&allctr->cpool.dc_list, crr);
+#ifdef ERTS_ALC_CPOOL_DEBUG
+ ERTS_ALC_CPOOL_ASSERT(erts_smp_atomic_xchg_nob(&crr->allctr,
+ ((erts_aint_t) allctr))
+ == (((erts_aint_t) allctr) & ~ERTS_CRR_ALCTR_FLG_MASK));
+#else
+ erts_smp_atomic_set_nob(&crr->allctr, ((erts_aint_t) allctr));
+#endif
+ return crr;
+ }
+ crr = crr->prev;
+ if (--i <= 0)
+ return NULL;
+ }
+
return NULL;
}
@@ -3066,6 +3286,9 @@ schedule_dealloc_carrier(Allctr_t *allctr, Carrier_t *crr)
return;
}
+ if (is_abandoned(crr))
+ unlink_abandoned_carrier(crr);
+
if (crr->cpool.thr_prgr == ERTS_THR_PRGR_INVALID
|| erts_thr_progress_has_reached(crr->cpool.thr_prgr)) {
dealloc_carrier(allctr, crr, 1);
@@ -3112,6 +3335,8 @@ cpool_init_carrier_data(Allctr_t *allctr, Carrier_t *crr)
limit = (csz/100)*allctr->cpool.util_limit;
crr->cpool.abandon_limit = limit;
}
+ crr->cpool.abandoned.next = NULL;
+ crr->cpool.abandoned.prev = NULL;
}
static void
@@ -3142,6 +3367,9 @@ abandon_carrier(Allctr_t *allctr, Carrier_t *crr)
STAT_MBC_CPOOL_INSERT(allctr, crr);
unlink_carrier(&allctr->mbc_list, crr);
+ if (crr->cpool.orig_allctr == allctr) {
+ link_abandoned_carrier(&allctr->cpool.pooled_list, crr);
+ }
allctr->remove_mbc(allctr, crr);
@@ -3274,6 +3502,15 @@ create_carrier(Allctr_t *allctr, Uint umem_sz, UWord flags)
ASSERT(!(flags & CFLG_FORCE_MSEG && flags & CFLG_FORCE_SYS_ALLOC));
+ if (umem_sz > (ERTS_UINT_MAX - ERTS_UINT_MAX/100)) {
+ /* Do an overly conservative _overflow_ check here so we don't
+ * have to deal with it from here on. I guess we could be more accurate
+ * but I don't think the need to allocate over 99% of the address space
+ * will ever arise on any machine, neither 32 nor 64 bit.
+ */
+ return NULL;
+ }
+
blk_sz = UMEMSZ2BLKSZ(allctr, umem_sz);
#ifdef ERTS_SMP
@@ -3640,6 +3877,11 @@ destroy_carrier(Allctr_t *allctr, Block_t *blk, Carrier_t **busy_pcrr_pp)
if (busy_pcrr_pp && *busy_pcrr_pp) {
ERTS_ALC_CPOOL_ASSERT(*busy_pcrr_pp == crr);
*busy_pcrr_pp = NULL;
+ ERTS_ALC_CPOOL_ASSERT(erts_smp_atomic_read_nob(&crr->allctr)
+ == (((erts_aint_t) allctr)
+ | ERTS_CRR_ALCTR_FLG_IN_POOL
+ | ERTS_CRR_ALCTR_FLG_BUSY));
+ erts_smp_atomic_set_nob(&crr->allctr, ((erts_aint_t) allctr));
cpool_delete(allctr, allctr, crr);
}
else
@@ -5519,6 +5761,10 @@ erts_alcu_start(Allctr_t *allctr, AllctrInit_t *init)
allctr->min_block_size = sz;
}
+ allctr->cpool.pooled_list.next = &allctr->cpool.pooled_list;
+ allctr->cpool.pooled_list.prev = &allctr->cpool.pooled_list;
+ allctr->cpool.traitor_list.next = &allctr->cpool.traitor_list;
+ allctr->cpool.traitor_list.prev = &allctr->cpool.traitor_list;
allctr->cpool.dc_list.first = NULL;
allctr->cpool.dc_list.last = NULL;
allctr->cpool.abandon_limit = 0;
@@ -5561,11 +5807,11 @@ erts_alcu_start(Allctr_t *allctr, AllctrInit_t *init)
erts_mtx_init_x_opt(&allctr->mutex,
"alcu_allocator",
make_small(allctr->alloc_no),
- ERTS_LCNT_LT_ALLOC);
+ ERTS_LCNT_LT_ALLOC,1);
#else
erts_mtx_init_x(&allctr->mutex,
"alcu_allocator",
- make_small(allctr->alloc_no));
+ make_small(allctr->alloc_no),1);
#endif /*ERTS_ENABLE_LOCK_COUNT*/
#ifdef DEBUG
diff --git a/erts/emulator/beam/erl_alloc_util.h b/erts/emulator/beam/erl_alloc_util.h
index 7be6b1ed9d..eee920e66c 100644
--- a/erts/emulator/beam/erl_alloc_util.h
+++ b/erts/emulator/beam/erl_alloc_util.h
@@ -268,6 +268,11 @@ typedef union {char c[ERTS_ALLOC_ALIGN_BYTES]; long l; double d;} Unit_t;
#ifdef ERTS_SMP
+typedef struct ErtsDoubleLink_t_ {
+ struct ErtsDoubleLink_t_ *next;
+ struct ErtsDoubleLink_t_ *prev;
+}ErtsDoubleLink_t;
+
typedef struct {
erts_atomic_t next;
erts_atomic_t prev;
@@ -277,6 +282,7 @@ typedef struct {
UWord abandon_limit;
UWord blocks;
UWord blocks_size;
+ ErtsDoubleLink_t abandoned; /* node in pooled_list or traitor_list */
} ErtsAlcCPoolData_t;
#endif
@@ -500,7 +506,12 @@ struct Allctr_t_ {
CarrierList_t sbc_list;
#ifdef ERTS_SMP
struct {
- CarrierList_t dc_list;
+ /* pooled_list, traitor list and dc_list contain only
+ carriers _created_ by this allocator */
+ ErtsDoubleLink_t pooled_list;
+ ErtsDoubleLink_t traitor_list;
+ CarrierList_t dc_list;
+
UWord abandon_limit;
int disable_abandon;
int check_limit_count;
diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c
index e6d72f569b..decae6b2ca 100644
--- a/erts/emulator/beam/erl_async.c
+++ b/erts/emulator/beam/erl_async.c
@@ -166,6 +166,7 @@ async_ready_q(Uint sched_id)
#endif
+
void
erts_init_async(void)
{
@@ -226,11 +227,23 @@ erts_init_async(void)
thr_opts.suggested_stack_size
= erts_async_thread_suggested_stack_size;
+#ifdef ETHR_HAVE_THREAD_NAMES
+ thr_opts.name = malloc(sizeof(char)*(strlen("async_XXXX")+1));
+#endif
+
for (i = 0; i < erts_async_max_threads; i++) {
ErtsAsyncQ *aq = async_q(i);
+
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(thr_opts.name, "async_%d", i+1);
+#endif
+
erts_thr_create(&aq->thr_id, async_main, (void*) aq, &thr_opts);
}
+#ifdef ETHR_HAVE_THREAD_NAMES
+ free(thr_opts.name);
+#endif
/* Wait for async threads to initialize... */
erts_mtx_lock(&async->init.data.mtx);
@@ -279,7 +292,8 @@ static ERTS_INLINE void async_add(ErtsAsync *a, ErtsAsyncQ* q)
if (DTRACE_ENABLED(aio_pool_add)) {
DTRACE_CHARBUF(port_str, 16);
- erts_snprintf(port_str, sizeof(port_str), "%T", a->port);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", a->port);
/* DTRACE TODO: Get the queue length from erts_thr_q_enqueue() ? */
len = -1;
DTRACE2(aio_pool_add, port_str, len);
@@ -314,7 +328,8 @@ static ERTS_INLINE ErtsAsync *async_get(ErtsThrQ_t *q,
if (DTRACE_ENABLED(aio_pool_get)) {
DTRACE_CHARBUF(port_str, 16);
- erts_snprintf(port_str, sizeof(port_str), "%T", a->port);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", a->port);
/* DTRACE TODO: Get the length from erts_thr_q_dequeue() ? */
len = -1;
DTRACE2(aio_pool_get, port_str, len);
@@ -602,7 +617,7 @@ unsigned int driver_async_port_key(ErlDrvPort port)
** return values:
** 0 completed
** -1 error
-** N handle value (used with async_cancel)
+** N handle value
** arguments:
** ix driver index
** key pointer to secedule queue (NULL means round robin)
@@ -687,23 +702,3 @@ long driver_async(ErlDrvPort ix, unsigned int* key,
return id;
}
-
-int driver_async_cancel(unsigned int id)
-{
- /*
- * Not supported anymore. Always fail (which is backward
- * compatible).
- *
- * This functionality could be implemented again. However,
- * it is (and always has been) completely useless since
- * it doesn't give you any guarantees whatsoever. The user
- * needs to (and always have had to) synchronize in his/her
- * own code in order to get any guarantees.
- */
- return 0;
-}
-
-
-
-
-
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index ff775691b3..3bf78adce7 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -1324,9 +1324,9 @@ static int parse_match_opts_list(Eterm l, Eterm bin, Uint *posp, Uint *endp)
goto badarg;
}
if (len < 0) {
- Sint lentmp = -len;
+ Uint lentmp = -(Uint)len;
/* overflow */
- if (lentmp == len || lentmp < 0 || -lentmp != len) {
+ if ((Sint)lentmp < 0) {
goto badarg;
}
len = lentmp;
@@ -1555,9 +1555,9 @@ BIF_RETTYPE erts_binary_part(Process *p, Eterm binary, Eterm epos, Eterm elen)
goto badarg;
}
if (len < 0) {
- Sint lentmp = -len;
+ Uint lentmp = -(Uint)len;
/* overflow */
- if (lentmp == len || lentmp < 0 || -lentmp != len) {
+ if ((Sint)lentmp < 0) {
goto badarg;
}
len = lentmp;
@@ -1644,9 +1644,9 @@ BIF_RETTYPE erts_gc_binary_part(Process *p, Eterm *reg, Eterm live, int range_is
goto badarg;
}
if (len < 0) {
- Sint lentmp = -len;
+ Uint lentmp = -(Uint)len;
/* overflow */
- if (lentmp == len || lentmp < 0 || -lentmp != len) {
+ if ((Sint)lentmp < 0) {
goto badarg;
}
len = lentmp;
@@ -2213,9 +2213,9 @@ static BIF_RETTYPE binary_bin_to_list_common(Process *p,
goto badarg;
}
if (len < 0) {
- Sint lentmp = -len;
+ Uint lentmp = -(Uint)len;
/* overflow */
- if (lentmp == len || lentmp < 0 || -lentmp != len) {
+ if ((Sint)lentmp < 0) {
goto badarg;
}
len = lentmp;
@@ -2294,18 +2294,11 @@ BIF_RETTYPE binary_bin_to_list_1(BIF_ALIST_1)
BIF_ERROR(BIF_P,BADARG);
}
-/*
- * Ok, erlang:list_to_binary does not interrupt, and we really don't want
- * an alternative implementation for the exact same thing, why we
- * have descided to use the old non-restarting implementation for now.
- * In reality, there are seldom many iterations involved in doing this, so the
- * problem of long-running bifs is not really that big in this case.
- * So, for now we use the old implementation also in the module binary.
- */
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_list_to_bin, 1)
BIF_RETTYPE binary_list_to_bin_1(BIF_ALIST_1)
{
- return erts_list_to_binary_bif(BIF_P, BIF_ARG_1);
+ return erts_list_to_binary_bif(BIF_P, BIF_ARG_1, bif_export[BIF_binary_list_to_bin_1]);
}
typedef struct {
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c
index 1c3e955f47..56cd2ba04f 100644
--- a/erts/emulator/beam/erl_bif_ddll.c
+++ b/erts/emulator/beam/erl_bif_ddll.c
@@ -182,7 +182,7 @@ BIF_RETTYPE erl_ddll_try_load_3(BIF_ALIST_3)
Eterm name_term = BIF_ARG_2;
Eterm options = BIF_ARG_3;
char *path = NULL;
- ErlDrvSizeT path_len;
+ Sint path_len;
char *name = NULL;
DE_Handle *dh;
erts_driver_t *drv;
@@ -198,6 +198,7 @@ BIF_RETTYPE erl_ddll_try_load_3(BIF_ALIST_3)
int kill_ports = 0;
int do_build_load_error = 0;
int build_this_load_error = 0;
+ int encoding;
for(l = options; is_list(l); l = CDR(list_val(l))) {
Eterm opt = CAR(list_val(l));
@@ -257,18 +258,23 @@ BIF_RETTYPE erl_ddll_try_load_3(BIF_ALIST_3)
goto error;
}
- if (erts_iolist_size(path_term, &path_len)) {
- goto error;
+ encoding = erts_get_native_filename_encoding();
+ if (encoding == ERL_FILENAME_WIN_WCHAR) {
+ /* Do not convert the lib name to utf-16le yet, do that in win32 specific code */
+ /* since lib_name is used in error messages */
+ encoding = ERL_FILENAME_UTF8;
}
- path = erts_alloc(ERTS_ALC_T_DDLL_TMP_BUF, path_len + 1 /* might need path separator */ + sys_strlen(name) + 1);
- if (erts_iolist_to_buf(path_term, path, path_len) != 0) {
+ path = erts_convert_filename_to_encoding(path_term, NULL, 0,
+ ERTS_ALC_T_DDLL_TMP_BUF, 1, 0,
+ encoding, &path_len,
+ sys_strlen(name) + 2); /* might need path separator */
+ if (!path) {
goto error;
}
- while (path_len > 0 && (path[path_len-1] == '\\' || path[path_len-1] == '/')) {
- --path_len;
- }
+ ASSERT(path_len > 0 && path[path_len-1] == 0);
+ while (--path_len > 0 && (path[path_len-1] == '\\' || path[path_len-1] == '/'))
+ ;
path[path_len++] = '/';
- /*path[path_len] = '\0';*/
sys_strcpy(path+path_len,name);
#if DDLL_SMP
@@ -1524,7 +1530,7 @@ static int do_load_driver_entry(DE_Handle *dh, char *path, char *name)
assert_drv_list_rwlocked();
- if ((res = erts_sys_ddll_open(path, &(dh->handle))) != ERL_DE_NO_ERROR) {
+ if ((res = erts_sys_ddll_open(path, &(dh->handle), NULL)) != ERL_DE_NO_ERROR) {
return res;
}
@@ -1542,8 +1548,10 @@ static int do_load_driver_entry(DE_Handle *dh, char *path, char *name)
switch (dp->extended_marker) {
case ERL_DRV_EXTENDED_MARKER:
- if (ERL_DRV_EXTENDED_MAJOR_VERSION != dp->major_version
- || ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version) {
+ if (dp->major_version < ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD
+ || (ERL_DRV_EXTENDED_MAJOR_VERSION < dp->major_version
+ || (ERL_DRV_EXTENDED_MAJOR_VERSION == dp->major_version
+ && ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version))) {
/* Incompatible driver version */
res = ERL_DE_LOAD_ERROR_INCORRECT_VERSION;
goto error;
diff --git a/erts/emulator/beam/erl_bif_guard.c b/erts/emulator/beam/erl_bif_guard.c
index a715756c15..bbd8aa31d9 100644
--- a/erts/emulator/beam/erl_bif_guard.c
+++ b/erts/emulator/beam/erl_bif_guard.c
@@ -33,6 +33,7 @@
#include "bif.h"
#include "big.h"
#include "erl_binary.h"
+#include "erl_map.h"
static Eterm gc_double_to_integer(Process* p, double x, Eterm* reg, Uint live);
@@ -455,6 +456,28 @@ Eterm erts_gc_byte_size_1(Process* p, Eterm* reg, Uint live)
}
}
+Eterm erts_gc_map_size_1(Process* p, Eterm* reg, Uint live)
+{
+ Eterm arg = reg[live];
+ if (is_map(arg)) {
+ map_t *mp = (map_t*)map_val(arg);
+ Uint size = map_get_size(mp);
+ if (IS_USMALL(0, size)) {
+ return make_small(size);
+ } else {
+ Eterm* hp;
+ if (ERTS_NEED_GC(p, BIG_UINT_HEAP_SIZE)) {
+ erts_garbage_collect(p, BIG_UINT_HEAP_SIZE, reg, live);
+ }
+ hp = p->htop;
+ p->htop += BIG_UINT_HEAP_SIZE;
+ return uint_to_big(size, hp);
+ }
+ } else {
+ BIF_ERROR(p, BADARG);
+ }
+}
+
Eterm erts_gc_abs_1(Process* p, Eterm* reg, Uint live)
{
Eterm arg;
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index d7f1e2d971..b90362d82c 100755..100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -27,6 +27,7 @@
#include "erl_process.h"
#include "error.h"
#include "erl_driver.h"
+#include "erl_nif.h"
#include "bif.h"
#include "big.h"
#include "erl_version.h"
@@ -64,9 +65,11 @@ static Export *gather_gc_info_res_trap;
#define DECL_AM(S) Eterm AM_ ## S = am_atom_put(#S, sizeof(#S) - 1)
+static char otp_version[] = ERLANG_OTP_VERSION;
/* Keep erts_system_version as a global variable for easy access from a core */
-static char erts_system_version[] = ("Erlang " ERLANG_OTP_RELEASE
- " (erts-" ERLANG_VERSION ")"
+static char erts_system_version[] = ("Erlang/OTP " ERLANG_OTP_RELEASE
+ "%s"
+ " [erts-" ERLANG_VERSION "]"
#if !HEAP_ON_C_STACK && !HALFWORD_HEAP
" [no-c-stack-objects]"
#endif
@@ -88,6 +91,9 @@ static char erts_system_version[] = ("Erlang " ERLANG_OTP_RELEASE
" [smp:%beu:%beu]"
#endif
#ifdef USE_THREADS
+#if defined(ERTS_DIRTY_SCHEDULERS) && defined(ERTS_SMP)
+ " [ds:%beu:%beu:%beu]"
+#endif
" [async-threads:%d]"
#endif
#ifdef HIPE
@@ -304,13 +310,39 @@ make_link_list(Process *p, ErtsLink *root, Eterm tail)
int
erts_print_system_version(int to, void *arg, Process *c_p)
{
+ int i, rc = -1;
+ char *rc_str = "";
+ char rc_buf[100];
+ char *ov = otp_version;
#ifdef ERTS_SMP
Uint total, online, active;
- (void) erts_schedulers_state(&total, &online, &active, 0);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ Uint dirty_cpu, dirty_cpu_onln, dirty_io;
+
+ (void) erts_schedulers_state(&total, &online, &active, &dirty_cpu, &dirty_cpu_onln, &dirty_io, 0);
+#else
+ (void) erts_schedulers_state(&total, &online, &active, NULL, NULL, NULL, 0);
+#endif
#endif
- return erts_print(to, arg, erts_system_version
+ for (i = 0; i < sizeof(otp_version)-4; i++) {
+ if (ov[i] == '-' && ov[i+1] == 'r' && ov[i+2] == 'c')
+ rc = atoi(&ov[i+3]);
+ }
+ if (rc >= 0) {
+ if (rc == 0)
+ rc_str = " [DEVELOPMENT]";
+ else {
+ erts_snprintf(rc_buf, sizeof(rc_buf), " [RELEASE CANDIDATE %d]", rc);
+ rc_str = rc_buf;
+ }
+ }
+ return erts_print(to, arg, erts_system_version,
+ rc_str
#ifdef ERTS_SMP
, total, online
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , dirty_cpu, dirty_cpu_onln, dirty_io
+#endif
#endif
#ifdef USE_THREADS
, erts_async_max_threads
@@ -2428,6 +2460,13 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
ERL_DRV_EXTENDED_MINOR_VERSION);
hp = HAlloc(BIF_P, 2*n);
BIF_RET(buf_to_intlist(&hp, buf, n, NIL));
+ } else if (ERTS_IS_ATOM_STR("nif_version", BIF_ARG_1)) {
+ char buf[42];
+ int n = erts_snprintf(buf, 42, "%d.%d",
+ ERL_NIF_MAJOR_VERSION,
+ ERL_NIF_MINOR_VERSION);
+ hp = HAlloc(BIF_P, 2*n);
+ BIF_RET(buf_to_intlist(&hp, buf, n, NIL));
} else if (ERTS_IS_ATOM_STR("smp_support", BIF_ARG_1)) {
#ifdef ERTS_SMP
BIF_RET(am_true);
@@ -2454,6 +2493,9 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
switch (erts_schedulers_state(&total,
&online,
&active,
+ NULL,
+ NULL,
+ NULL,
1)) {
case ERTS_SCHDLR_SSPND_DONE: {
Eterm *hp = HAlloc(BIF_P, 4);
@@ -2477,7 +2519,7 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
BIF_RET(make_small(1));
#else
Uint total, online, active;
- switch (erts_schedulers_state(&total, &online, &active, 1)) {
+ switch (erts_schedulers_state(&total, &online, &active, NULL, NULL, NULL, 1)) {
case ERTS_SCHDLR_SSPND_DONE:
BIF_RET(make_small(online));
case ERTS_SCHDLR_SSPND_YIELD_RESTART:
@@ -2494,7 +2536,7 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
BIF_RET(make_small(1));
#else
Uint total, online, active;
- switch (erts_schedulers_state(&total, &online, &active, 1)) {
+ switch (erts_schedulers_state(&total, &online, &active, NULL, NULL, NULL, 1)) {
case ERTS_SCHDLR_SSPND_DONE:
BIF_RET(make_small(active));
case ERTS_SCHDLR_SSPND_YIELD_RESTART:
@@ -2506,6 +2548,20 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
BIF_ERROR(BIF_P, EXC_INTERNAL_ERROR);
}
#endif
+#if defined(ERTS_SMP) && defined(ERTS_DIRTY_SCHEDULERS)
+ } else if (ERTS_IS_ATOM_STR("dirty_cpu_schedulers", BIF_ARG_1)) {
+ Uint dirty_cpu;
+ erts_schedulers_state(NULL, NULL, NULL, &dirty_cpu, NULL, NULL, 1);
+ BIF_RET(make_small(dirty_cpu));
+ } else if (ERTS_IS_ATOM_STR("dirty_cpu_schedulers_online", BIF_ARG_1)) {
+ Uint dirty_cpu_onln;
+ erts_schedulers_state(NULL, NULL, NULL, NULL, &dirty_cpu_onln, NULL, 1);
+ BIF_RET(make_small(dirty_cpu_onln));
+ } else if (ERTS_IS_ATOM_STR("dirty_io_schedulers", BIF_ARG_1)) {
+ Uint dirty_io;
+ erts_schedulers_state(NULL, NULL, NULL, NULL, NULL, &dirty_io, 1);
+ BIF_RET(make_small(dirty_io));
+#endif
} else if (ERTS_IS_ATOM_STR("run_queues", BIF_ARG_1)) {
res = make_small(erts_no_run_queues);
BIF_RET(res);
@@ -2643,6 +2699,14 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
else if (ERTS_IS_ATOM_STR("ets_limit",BIF_ARG_1)) {
BIF_RET(make_small(erts_db_get_max_tabs()));
}
+ else if (ERTS_IS_ATOM_STR("tolerant_timeofday",BIF_ARG_1)) {
+ BIF_RET(erts_disable_tolerant_timeofday
+ ? am_disabled
+ : am_enabled);
+ }
+ else if (ERTS_IS_ATOM_STR("eager_check_io",BIF_ARG_1)) {
+ BIF_RET(erts_eager_check_io ? am_true : am_false);
+ }
BIF_ERROR(BIF_P, BADARG);
}
@@ -3002,6 +3066,25 @@ fun_info_2(BIF_ALIST_2)
return TUPLE2(hp, what, val);
}
+BIF_RETTYPE
+fun_info_mfa_1(BIF_ALIST_1)
+{
+ Process* p = BIF_P;
+ Eterm fun = BIF_ARG_1;
+ Eterm* hp;
+
+ if (is_fun(fun)) {
+ ErlFunThing* funp = (ErlFunThing *) fun_val(fun);
+ hp = HAlloc(p, 4);
+ BIF_RET(TUPLE3(hp,funp->fe->module,funp->fe->address[-2],make_small(funp->arity)));
+ } else if (is_export(fun)) {
+ Export* exp = (Export *) ((UWord) (export_val(fun))[1]);
+ hp = HAlloc(p, 4);
+ BIF_RET(TUPLE3(hp,exp->code[0],exp->code[1],make_small(exp->code[2])));
+ }
+ BIF_ERROR(p, BADARG);
+}
+
BIF_RETTYPE is_process_alive_1(BIF_ALIST_1)
{
if(is_internal_pid(BIF_ARG_1)) {
@@ -3232,17 +3315,38 @@ BIF_RETTYPE erts_debug_get_internal_state_1(BIF_ALIST_1)
BIF_RET(make_small((Uint) words));
}
else if (ERTS_IS_ATOM_STR("check_io_debug", BIF_ARG_1)) {
- /* Used by (emulator) */
- int res;
+ /* Used by driver_SUITE (emulator) */
+ Uint sz, *szp;
+ Eterm res, *hp, **hpp;
+ int no_errors;
+ ErtsCheckIoDebugInfo ciodi = {0};
#ifdef HAVE_ERTS_CHECK_IO_DEBUG
erts_smp_proc_unlock(BIF_P,ERTS_PROC_LOCK_MAIN);
- res = erts_check_io_debug();
+ no_errors = erts_check_io_debug(&ciodi);
erts_smp_proc_lock(BIF_P,ERTS_PROC_LOCK_MAIN);
#else
- res = 0;
+ no_errors = 0;
#endif
- ASSERT(res >= 0);
- BIF_RET(erts_make_integer((Uint) res, BIF_P));
+ sz = 0;
+ szp = &sz;
+ hpp = NULL;
+ while (1) {
+ res = erts_bld_tuple(hpp, szp, 4,
+ erts_bld_uint(hpp, szp,
+ (Uint) no_errors),
+ erts_bld_uint(hpp, szp,
+ (Uint) ciodi.no_used_fds),
+ erts_bld_uint(hpp, szp,
+ (Uint) ciodi.no_driver_select_structs),
+ erts_bld_uint(hpp, szp,
+ (Uint) ciodi.no_driver_event_structs));
+ if (hpp)
+ break;
+ hp = HAlloc(BIF_P, sz);
+ szp = NULL;
+ hpp = &hp;
+ }
+ BIF_RET(res);
}
else if (ERTS_IS_ATOM_STR("process_info_args", BIF_ARG_1)) {
/* Used by process_SUITE (emulator) */
@@ -3603,6 +3707,20 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2)
BIF_RET(am_true);
}
}
+ else if (ERTS_IS_ATOM_STR("gc_state", BIF_ARG_1)) {
+ /* Used by process_SUITE (emulator) */
+ int res, enable;
+
+ switch (BIF_ARG_2) {
+ case am_true: enable = 1; break;
+ case am_false: enable = 0; break;
+ default: BIF_ERROR(BIF_P, BADARG); break;
+ }
+
+ res = (BIF_P->flags & F_DISABLE_GC) ? am_false : am_true;
+ erts_set_gc_state(BIF_P, enable);
+ BIF_RET(res);
+ }
else if (ERTS_IS_ATOM_STR("send_fake_exit_signal", BIF_ARG_1)) {
/* Used by signal_SUITE (emulator) */
@@ -3789,16 +3907,19 @@ static Eterm lcnt_build_lock_stats_term(Eterm **hpp, Uint *szp, erts_lcnt_lock_s
Uint tries = 0, colls = 0;
unsigned long timer_s = 0, timer_ns = 0, timer_n = 0;
unsigned int line = 0;
+ unsigned int i;
Eterm af, uil;
Eterm uit, uic;
Eterm uits, uitns, uitn;
Eterm tt, tstat, tloc, t;
+ Eterm thist, vhist[ERTS_LCNT_HISTOGRAM_SLOT_SIZE];
/* term:
- * [{{file, line}, {tries, colls, {seconds, nanoseconds, n_blocks}}}]
+ * [{{file, line}, {tries, colls, {seconds, nanoseconds, n_blocks}},
+ * { .. histogram .. }]
*/
-
+
tries = (Uint) ethr_atomic_read(&stats->tries);
colls = (Uint) ethr_atomic_read(&stats->colls);
@@ -3807,23 +3928,27 @@ static Eterm lcnt_build_lock_stats_term(Eterm **hpp, Uint *szp, erts_lcnt_lock_s
timer_ns = stats->timer.ns;
timer_n = stats->timer_n;
- af = erts_atom_put(stats->file, strlen(stats->file), ERTS_ATOM_ENC_LATIN1, 1);
+ af = erts_atom_put((byte *)stats->file, strlen(stats->file), ERTS_ATOM_ENC_LATIN1, 1);
uil = erts_bld_uint( hpp, szp, line);
tloc = erts_bld_tuple(hpp, szp, 2, af, uil);
- uit = erts_bld_uint( hpp, szp, tries);
- uic = erts_bld_uint( hpp, szp, colls);
-
+ uit = erts_bld_uint( hpp, szp, tries);
+ uic = erts_bld_uint( hpp, szp, colls);
+
uits = erts_bld_uint( hpp, szp, timer_s);
uitns = erts_bld_uint( hpp, szp, timer_ns);
uitn = erts_bld_uint( hpp, szp, timer_n);
tt = erts_bld_tuple(hpp, szp, 3, uits, uitns, uitn);
tstat = erts_bld_tuple(hpp, szp, 3, uit, uic, tt);
-
- t = erts_bld_tuple(hpp, szp, 2, tloc, tstat);
-
- res = erts_bld_cons( hpp, szp, t, res);
+
+ for(i = 0; i < ERTS_LCNT_HISTOGRAM_SLOT_SIZE; i++) {
+ vhist[i] = erts_bld_uint(hpp, szp, stats->hist.ns[i]);
+ }
+ thist = erts_bld_tuplev(hpp, szp, ERTS_LCNT_HISTOGRAM_SLOT_SIZE, vhist);
+
+ t = erts_bld_tuple(hpp, szp, 3, tloc, tstat, thist);
+ res = erts_bld_cons( hpp, szp, t, res);
return res;
}
@@ -3844,13 +3969,13 @@ static Eterm lcnt_build_lock_term(Eterm **hpp, Uint *szp, erts_lcnt_lock_t *lock
ASSERT(ltype);
- type = erts_atom_put(ltype, strlen(ltype), ERTS_ATOM_ENC_LATIN1, 1);
- name = erts_atom_put(lock->name, strlen(lock->name), ERTS_ATOM_ENC_LATIN1, 1);
+ type = erts_atom_put((byte *)ltype, strlen(ltype), ERTS_ATOM_ENC_LATIN1, 1);
+ name = erts_atom_put((byte *)lock->name, strlen(lock->name), ERTS_ATOM_ENC_LATIN1, 1);
if (lock->flag & ERTS_LCNT_LT_ALLOC) {
/* use allocator types names as id's for allocator locks */
ltype = (char *) ERTS_ALC_A2AD(signed_val(lock->id));
- id = erts_atom_put(ltype, strlen(ltype), ERTS_ATOM_ENC_LATIN1, 1);
+ id = erts_atom_put((byte *)ltype, strlen(ltype), ERTS_ATOM_ENC_LATIN1, 1);
} else if (lock->flag & ERTS_LCNT_LT_PROCLOCK) {
/* use registered names as id's for process locks if available */
proc = erts_proc_lookup(lock->id);
@@ -3861,16 +3986,15 @@ static Eterm lcnt_build_lock_term(Eterm **hpp, Uint *szp, erts_lcnt_lock_t *lock
id = lock->id;
}
} else {
- id = lock->id;
+ id = lock->id;
}
-
+
for (i = 0; i < lock->n_stats; i++) {
stats = lcnt_build_lock_stats_term(hpp, szp, &(lock->stats[i]), stats);
}
-
- t = erts_bld_tuple(hpp, szp, 4, name, id, type, stats);
-
- res = erts_bld_cons( hpp, szp, t, res);
+
+ t = erts_bld_tuple(hpp, szp, 4, name, id, type, stats);
+ res = erts_bld_cons( hpp, szp, t, res);
return res;
}
@@ -3890,12 +4014,12 @@ static Eterm lcnt_build_result_term(Eterm **hpp, Uint *szp, erts_lcnt_data_t *da
dtns = erts_bld_uint( hpp, szp, data->duration.ns);
tdt = erts_bld_tuple(hpp, szp, 2, dts, dtns);
- adur = erts_atom_put(str_duration, strlen(str_duration), ERTS_ATOM_ENC_LATIN1, 1);
+ adur = erts_atom_put((byte *)str_duration, strlen(str_duration), ERTS_ATOM_ENC_LATIN1, 1);
tdur = erts_bld_tuple(hpp, szp, 2, adur, tdt);
/* lock tuple */
- aloc = erts_atom_put(str_locks, strlen(str_locks), ERTS_ATOM_ENC_LATIN1, 1);
+ aloc = erts_atom_put((byte *)str_locks, strlen(str_locks), ERTS_ATOM_ENC_LATIN1, 1);
for (lock = data->current_locks->head; lock != NULL ; lock = lock->next ) {
lloc = lcnt_build_lock_term(hpp, szp, lock, lloc);
diff --git a/erts/emulator/beam/erl_bif_lists.c b/erts/emulator/beam/erl_bif_lists.c
index 1805366cfe..820ed2385d 100644
--- a/erts/emulator/beam/erl_bif_lists.c
+++ b/erts/emulator/beam/erl_bif_lists.c
@@ -43,7 +43,7 @@ static BIF_RETTYPE append(Process* p, Eterm A, Eterm B)
Eterm* hp;
int i;
- if ((i = list_length(A)) < 0) {
+ if ((i = erts_list_length(A)) < 0) {
BIF_ERROR(p, BADARG);
}
if (i == 0) {
@@ -102,10 +102,10 @@ static Eterm subtract(Process* p, Eterm A, Eterm B)
int n;
int m;
- if ((n = list_length(A)) < 0) {
+ if ((n = erts_list_length(A)) < 0) {
BIF_ERROR(p, BADARG);
}
- if ((m = list_length(B)) < 0) {
+ if ((m = erts_list_length(B)) < 0) {
BIF_ERROR(p, BADARG);
}
diff --git a/erts/emulator/beam/erl_bif_op.c b/erts/emulator/beam/erl_bif_op.c
index adac0052d6..37dd6457db 100644
--- a/erts/emulator/beam/erl_bif_op.c
+++ b/erts/emulator/beam/erl_bif_op.c
@@ -36,6 +36,7 @@
#include "dist.h"
#include "erl_version.h"
#include "erl_binary.h"
+#include "erl_map.h"
BIF_RETTYPE and_2(BIF_ALIST_2)
{
@@ -321,7 +322,10 @@ BIF_RETTYPE is_record_3(BIF_ALIST_3)
BIF_RET(am_false);
}
-
-
-
-
+BIF_RETTYPE is_map_1(BIF_ALIST_1)
+{
+ if (is_map(BIF_ARG_1)) {
+ BIF_RET(am_true);
+ }
+ BIF_RET(am_false);
+}
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c
index 3cd53ef65d..7ce950e090 100644
--- a/erts/emulator/beam/erl_bif_port.c
+++ b/erts/emulator/beam/erl_bif_port.c
@@ -472,7 +472,7 @@ cleanup_old_port_data(erts_aint_t data)
ErtsPortDataHeap *pdhp = (ErtsPortDataHeap *) data;
size_t size;
ERTS_SMP_DATA_DEPENDENCY_READ_MEMORY_BARRIER;
- size = sizeof(ErtsPortDataHeap) + pdhp->hsize*(sizeof(Eterm) - 1);
+ size = sizeof(ErtsPortDataHeap) + (pdhp->hsize-1)*sizeof(Eterm);
erts_schedule_thr_prgr_later_cleanup_op(free_port_data_heap,
(void *) pdhp,
&pdhp->later_op,
@@ -493,8 +493,8 @@ void
erts_cleanup_port_data(Port *prt)
{
ASSERT(erts_atomic32_read_nob(&prt->state) & ERTS_PORT_SFLGS_INVALID_LOOKUP);
- cleanup_old_port_data(erts_smp_atomic_read_nob(&prt->data));
- erts_smp_atomic_set_nob(&prt->data, (erts_aint_t) THE_NON_VALUE);
+ cleanup_old_port_data(erts_smp_atomic_xchg_nob(&prt->data,
+ (erts_aint_t) NULL));
}
Uint
@@ -508,7 +508,7 @@ erts_port_data_size(Port *prt)
}
else {
ErtsPortDataHeap *pdhp = (ErtsPortDataHeap *) data;
- return (Uint) sizeof(ErtsPortDataHeap) + pdhp->hsize*(sizeof(Eterm)-1);
+ return (Uint) sizeof(ErtsPortDataHeap) + (pdhp->hsize-1)*sizeof(Eterm);
}
}
@@ -550,10 +550,11 @@ BIF_RETTYPE port_set_data_2(BIF_ALIST_2)
hsize = size_object(BIF_ARG_2);
pdhp = erts_alloc(ERTS_ALC_T_PORT_DATA_HEAP,
- sizeof(ErtsPortDataHeap) + hsize*(sizeof(Eterm)-1));
+ sizeof(ErtsPortDataHeap) + (hsize-1)*sizeof(Eterm));
hp = &pdhp->heap[0];
pdhp->off_heap.first = NULL;
pdhp->off_heap.overhead = 0;
+ pdhp->hsize = hsize;
pdhp->data = copy_struct(BIF_ARG_2, hsize, &hp, &pdhp->off_heap);
data = (erts_aint_t) pdhp;
ASSERT((data & 0x3) == 0);
@@ -561,8 +562,14 @@ BIF_RETTYPE port_set_data_2(BIF_ALIST_2)
data = erts_smp_atomic_xchg_wb(&prt->data, data);
+ if (data == (erts_aint_t)NULL) {
+ /* Port terminated by racing thread */
+ data = erts_smp_atomic_xchg_wb(&prt->data, data);
+ ASSERT(data != (erts_aint_t)NULL);
+ cleanup_old_port_data(data);
+ BIF_ERROR(BIF_P, BADARG);
+ }
cleanup_old_port_data(data);
-
BIF_RET(am_true);
}
@@ -581,6 +588,8 @@ BIF_RETTYPE port_get_data_1(BIF_ALIST_1)
BIF_ERROR(BIF_P, BADARG);
data = erts_smp_atomic_read_ddrb(&prt->data);
+ if (data == (erts_aint_t)NULL)
+ BIF_ERROR(BIF_P, BADARG); /* Port terminated by racing thread */
if ((data & 0x3) != 0) {
res = (Eterm) (UWord) data;
@@ -796,43 +805,29 @@ open_port(Process* p, Eterm name, Eterm settings, int *err_typep, int *err_nump)
goto badarg;
}
- if (*tp == am_spawn || *tp == am_spawn_driver) { /* A process port */
+ if (*tp == am_spawn || *tp == am_spawn_driver || *tp == am_spawn_executable) { /* A process port */
+ int encoding;
if (arity != make_arityval(2)) {
goto badarg;
}
name = tp[1];
- if (is_atom(name)) {
- name_buf = (char *) erts_alloc(ERTS_ALC_T_TMP,
- atom_tab(atom_val(name))->len+1);
- sys_memcpy((void *) name_buf,
- (void *) atom_tab(atom_val(name))->name,
- atom_tab(atom_val(name))->len);
- name_buf[atom_tab(atom_val(name))->len] = '\0';
- } else if ((i = is_string(name))) {
- name_buf = (char *) erts_alloc(ERTS_ALC_T_TMP, i + 1);
- if (intlist_to_buf(name, name_buf, i) != i)
- erl_exit(1, "%s:%d: Internal error\n", __FILE__, __LINE__);
- name_buf[i] = '\0';
- } else {
+ encoding = erts_get_native_filename_encoding();
+ /* Do not convert the command to utf-16le yet, do that in win32 specific code */
+ /* since the cmd is used for comparsion with drivers names and copied to port info */
+ if (encoding == ERL_FILENAME_WIN_WCHAR) {
+ encoding = ERL_FILENAME_UTF8;
+ }
+ if ((name_buf = erts_convert_filename_to_encoding(name, NULL, 0, ERTS_ALC_T_TMP,0,1, encoding, NULL, 0))
+ == NULL) {
goto badarg;
}
+
if (*tp == am_spawn_driver) {
opts.spawn_type = ERTS_SPAWN_DRIVER;
+ } else if (*tp == am_spawn_executable) {
+ opts.spawn_type = ERTS_SPAWN_EXECUTABLE;
}
- driver = &spawn_driver;
- } else if (*tp == am_spawn_executable) { /* A program */
- /*
- * {spawn_executable,Progname}
- */
-
- if (arity != make_arityval(2)) {
- goto badarg;
- }
- name = tp[1];
- if ((name_buf = erts_convert_filename_to_native(name, NULL, 0, ERTS_ALC_T_TMP,0,1, NULL)) == NULL) {
- goto badarg;
- }
- opts.spawn_type = ERTS_SPAWN_EXECUTABLE;
+
driver = &spawn_driver;
} else if (*tp == am_fd) { /* An fd port */
int n;
@@ -873,29 +868,8 @@ open_port(Process* p, Eterm name, Eterm settings, int *err_typep, int *err_nump)
}
if (edir != NIL) {
- /* A working directory is expressed differently if spawn_executable, i.e. Unicode is handles
- for spawn_executable... */
- if (opts.spawn_type != ERTS_SPAWN_EXECUTABLE) {
- Eterm iolist;
- DeclareTmpHeap(heap,4,p);
- int r;
-
- UseTmpHeap(4,p);
- heap[0] = edir;
- heap[1] = make_list(heap+2);
- heap[2] = make_small(0);
- heap[3] = NIL;
- iolist = make_list(heap);
- r = erts_iolist_to_buf(iolist, (char*) dir, MAXPATHLEN);
- UnUseTmpHeap(4,p);
- if (ERTS_IOLIST_TO_BUF_FAILED(r)) {
- goto badarg;
- }
- opts.wd = (char *) dir;
- } else {
- if ((opts.wd = erts_convert_filename_to_native(edir, NULL, 0, ERTS_ALC_T_TMP,0,1,NULL)) == NULL) {
- goto badarg;
- }
+ if ((opts.wd = erts_convert_filename_to_native(edir, NULL, 0, ERTS_ALC_T_TMP,0,1,NULL)) == NULL) {
+ goto badarg;
}
}
@@ -917,7 +891,7 @@ open_port(Process* p, Eterm name, Eterm settings, int *err_typep, int *err_nump)
DTRACE_CHARBUF(port_str, DTRACE_TERM_BUF_SIZE);
dtrace_proc_str(p, process_str);
- erts_snprintf(port_str, sizeof(port_str), "%T", port->common.id);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", port->common.id);
DTRACE3(port_open, process_str, name_buf, port_str);
}
#endif
@@ -973,11 +947,12 @@ static char **convert_args(Eterm l)
int n;
int i = 0;
Eterm str;
- /* We require at least one element in list (argv[0]) */
if (is_not_list(l) && is_not_nil(l)) {
return NULL;
}
- n = list_length(l);
+
+ n = erts_list_length(l);
+ /* We require at least one element in argv[0] + NULL at end */
pp = erts_alloc(ERTS_ALC_T_TMP, (n + 2) * sizeof(char **));
pp[i++] = erts_default_arg0;
while (is_list(l)) {
@@ -1021,7 +996,7 @@ static byte* convert_environment(Process* p, Eterm env)
byte* bytes;
int encoding = erts_get_native_filename_encoding();
- if ((n = list_length(env)) < 0) {
+ if ((n = erts_list_length(env)) < 0) {
return NULL;
}
heap_size = 2*(5*n+1);
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index 3d34c2a77f..448c6f6f6d 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -180,6 +180,9 @@ static Eterm make_signed_integer(int x, Process *p)
#define PARSE_FLAG_STARTOFFSET 8
#define PARSE_FLAG_CAPTURE_OPT 16
#define PARSE_FLAG_GLOBAL 32
+#define PARSE_FLAG_REPORT_ERRORS 64
+#define PARSE_FLAG_MATCH_LIMIT 128
+#define PARSE_FLAG_MATCH_LIMIT_RECURSION 256
#define CAPSPEC_VALUES 0
#define CAPSPEC_TYPE 1
@@ -192,7 +195,9 @@ parse_options(Eterm listp, /* in */
int *exec_options, /* out */
int *flags,/* out */
int *startoffset, /* out */
- Eterm *capture_spec) /* capture_spec[CAPSPEC_SIZE] */ /* out */
+ Eterm *capture_spec, /* capture_spec[CAPSPEC_SIZE] */ /* out */
+ int *match_limit, /* out */
+ int *match_limit_recursion) /* out */
{
int copt,eopt,fl;
Eterm item;
@@ -234,7 +239,7 @@ parse_options(Eterm listp, /* in */
case am_offset:
{
int tmp;
- if (!term_to_int(tp[2],&tmp)) {
+ if (!term_to_int(tp[2],&tmp) || tmp < 0) {
return -1;
}
if (startoffset != NULL) {
@@ -243,6 +248,31 @@ parse_options(Eterm listp, /* in */
}
fl |= (PARSE_FLAG_UNIQUE_EXEC_OPT|PARSE_FLAG_STARTOFFSET);
break;
+ case am_match_limit:
+ {
+ int tmp;
+ if (!term_to_int(tp[2],&tmp) || tmp < 0) {
+ return -1;
+ }
+ if (match_limit != NULL) {
+ *match_limit = tmp;
+ }
+ }
+ fl |= (PARSE_FLAG_UNIQUE_EXEC_OPT|PARSE_FLAG_MATCH_LIMIT);
+ break;
+ case am_match_limit_recursion:
+ {
+ int tmp;
+ if (!term_to_int(tp[2],&tmp) || tmp < 0) {
+ return -1;
+ }
+ if (match_limit_recursion != NULL) {
+ *match_limit_recursion = tmp;
+ }
+ }
+ fl |= (PARSE_FLAG_UNIQUE_EXEC_OPT|
+ PARSE_FLAG_MATCH_LIMIT_RECURSION);
+ break;
case am_newline:
if (!is_atom(tp[2])) {
return -1;
@@ -276,7 +306,7 @@ parse_options(Eterm listp, /* in */
default:
return -1;
}
- }else if (is_not_atom(item)) {
+ } else if (is_not_atom(item)) {
return -1;
} else {
switch(item) {
@@ -288,6 +318,10 @@ parse_options(Eterm listp, /* in */
eopt |= PCRE_NOTEMPTY;
fl |= PARSE_FLAG_UNIQUE_EXEC_OPT;
break;
+ case am_notempty_atstart:
+ eopt |= PCRE_NOTEMPTY_ATSTART;
+ fl |= PARSE_FLAG_UNIQUE_EXEC_OPT;
+ break;
case am_notbol:
eopt |= PCRE_NOTBOL;
fl |= PARSE_FLAG_UNIQUE_EXEC_OPT;
@@ -296,6 +330,10 @@ parse_options(Eterm listp, /* in */
eopt |= PCRE_NOTEOL;
fl |= PARSE_FLAG_UNIQUE_EXEC_OPT;
break;
+ case am_no_start_optimize:
+ copt |= PCRE_NO_START_OPTIMIZE;
+ fl |= PARSE_FLAG_UNIQUE_COMPILE_OPT;
+ break;
case am_caseless:
copt |= PCRE_CASELESS;
fl |= PARSE_FLAG_UNIQUE_COMPILE_OPT;
@@ -332,6 +370,18 @@ parse_options(Eterm listp, /* in */
copt |= PCRE_UNGREEDY;
fl |= PARSE_FLAG_UNIQUE_COMPILE_OPT;
break;
+ case am_ucp:
+ copt |= PCRE_UCP;
+ fl |= PARSE_FLAG_UNIQUE_COMPILE_OPT;
+ break;
+ case am_never_utf:
+ copt |= PCRE_NEVER_UTF;
+ fl |= PARSE_FLAG_UNIQUE_COMPILE_OPT;
+ break;
+ case am_report_errors:
+ fl |= (PARSE_FLAG_UNIQUE_EXEC_OPT |
+ PARSE_FLAG_REPORT_ERRORS);
+ break;
case am_unicode:
copt |= PCRE_UTF8;
fl |= (PARSE_FLAG_UNIQUE_COMPILE_OPT | PARSE_FLAG_UNICODE);
@@ -359,7 +409,7 @@ parse_options(Eterm listp, /* in */
if (compile_options != NULL) {
*compile_options = copt;
}
- if (exec_options != NULL) {
+ if (exec_options != NULL) {
*exec_options = eopt;
}
if (flags != NULL) {
@@ -373,34 +423,49 @@ parse_options(Eterm listp, /* in */
*/
static Eterm
-build_compile_result(Process *p, Eterm error_tag, pcre *result, int errcode, const char *errstr, int errofset, int unicode, int with_ok)
+build_compile_result(Process *p, Eterm error_tag, pcre *result, int errcode, const char *errstr, int errofset, int unicode, int with_ok, Eterm extra_err_tag)
{
Eterm *hp;
Eterm ret;
size_t pattern_size;
int capture_count;
+ int use_crlf;
+ unsigned long options;
if (!result) {
/* Return {error_tag, {Code, String, Offset}} */
int elen = sys_strlen(errstr);
int need = 3 /* tuple of 2 */ +
3 /* tuple of 2 */ +
- (2 * elen) /* The error string list */;
+ (2 * elen) /* The error string list */ +
+ ((extra_err_tag != NIL) ? 3 : 0);
hp = HAlloc(p, need);
ret = buf_to_intlist(&hp, (char *) errstr, elen, NIL);
ret = TUPLE2(hp, ret, make_small(errofset));
hp += 3;
+ if (extra_err_tag != NIL) {
+ /* Return {error_tag, {extra_tag,
+ {Code, String, Offset}}} instead */
+ ret = TUPLE2(hp, extra_err_tag, ret);
+ hp += 3;
+ }
ret = TUPLE2(hp, error_tag, ret);
} else {
erts_pcre_fullinfo(result, NULL, PCRE_INFO_SIZE, &pattern_size);
erts_pcre_fullinfo(result, NULL, PCRE_INFO_CAPTURECOUNT, &capture_count);
+ erts_pcre_fullinfo(result, NULL, PCRE_INFO_OPTIONS, &options);
+ options &= PCRE_NEWLINE_CR|PCRE_NEWLINE_LF | PCRE_NEWLINE_CRLF |
+ PCRE_NEWLINE_ANY | PCRE_NEWLINE_ANYCRLF;
+ use_crlf = (options == PCRE_NEWLINE_ANY ||
+ options == PCRE_NEWLINE_CRLF ||
+ options == PCRE_NEWLINE_ANYCRLF);
/* XXX: Optimize - keep in offheap binary to allow this to
be kept across traps w/o need of copying */
ret = new_binary(p, (byte *) result, pattern_size);
erts_pcre_free(result);
- hp = HAlloc(p, (with_ok) ? (3+5) : 5);
- ret = TUPLE4(hp,am_re_pattern, make_small(capture_count), make_small(unicode),ret);
+ hp = HAlloc(p, (with_ok) ? (3+6) : 6);
+ ret = TUPLE5(hp,am_re_pattern, make_small(capture_count), make_small(unicode),make_small(use_crlf),ret);
if (with_ok) {
- hp += 5;
+ hp += 6;
ret = TUPLE2(hp,am_ok,ret);
}
}
@@ -424,9 +489,12 @@ re_compile(Process* p, Eterm arg1, Eterm arg2)
int options = 0;
int pflags = 0;
int unicode = 0;
+#ifdef DEBUG
+ int buffres;
+#endif
- if (parse_options(arg2,&options,NULL,&pflags,NULL,NULL)
+ if (parse_options(arg2,&options,NULL,&pflags,NULL,NULL,NULL,NULL)
< 0) {
BIF_ERROR(p,BADARG);
}
@@ -445,16 +513,19 @@ re_compile(Process* p, Eterm arg1, Eterm arg2)
BIF_ERROR(p,BADARG);
}
expr = erts_alloc(ERTS_ALC_T_RE_TMP_BUF, slen + 1);
- if (erts_iolist_to_buf(arg1, expr, slen) != 0) {
- erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
- BIF_ERROR(p,BADARG);
- }
+#ifdef DEBUG
+ buffres =
+#endif
+ erts_iolist_to_buf(arg1, expr, slen);
+
+ ASSERT(buffres >= 0);
+
expr[slen]='\0';
result = erts_pcre_compile2(expr, options, &errcode,
&errstr, &errofset, default_table);
ret = build_compile_result(p, am_error, result, errcode,
- errstr, errofset, unicode, 1);
+ errstr, errofset, unicode, 1, NIL);
erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
BIF_RET(ret);
}
@@ -492,7 +563,7 @@ typedef struct _return_info {
} ReturnInfo;
typedef struct _restart_context {
- pcre_extra extra;
+ erts_pcre_extra extra;
void *restart_data;
Uint32 flags;
char *subject; /* to be able to free it when done */
@@ -502,6 +573,7 @@ typedef struct _restart_context {
} RestartContext;
#define RESTART_FLAG_SUBJECT_IN_BINARY 0x1
+#define RESTART_FLAG_REPORT_MATCH_LIMIT 0x2
static void cleanup_restart_context(RestartContext *rc)
{
@@ -542,13 +614,29 @@ static Eterm build_exec_return(Process *p, int rc, RestartContext *restartp, Ete
Eterm res;
Eterm *hp;
if (rc <= 0) {
- res = am_nomatch;
+ if (restartp->flags & RESTART_FLAG_REPORT_MATCH_LIMIT) {
+ if (rc == PCRE_ERROR_MATCHLIMIT) {
+ hp = HAlloc(p,3);
+ res = TUPLE2(hp,am_error,am_match_limit);
+ } else if (rc == PCRE_ERROR_RECURSIONLIMIT) {
+ hp = HAlloc(p,3);
+ res = TUPLE2(hp,am_error,am_match_limit_recursion);
+ } else {
+ res = am_nomatch;
+ }
+ } else {
+ res = am_nomatch;
+ }
} else {
- ReturnInfo *ri = restartp->ret_info;
+ ReturnInfo *ri;
ReturnInfo defri = {RetIndex,0,{0}};
- if (ri == NULL) {
+
+ if (restartp->ret_info == NULL) {
ri = &defri;
+ } else {
+ ri = restartp->ret_info;
}
+
if (ri->type == RetNone) {
res = am_match;
} else if (ri->type == RetIndex){
@@ -577,6 +665,17 @@ static Eterm build_exec_return(Process *p, int rc, RestartContext *restartp, Ete
ri->num_spec * 2 * sizeof(Eterm));
for (i = 0; i < ri->num_spec; ++i) {
x = ri->v[i];
+ if (x < -1) {
+ int n = i-x+1;
+ int j;
+ for (j = i+1; j < ri->num_spec && j < n; ++j) {
+ if (restartp->ovector[(ri->v[j])*2] >= 0) {
+ x = ri->v[j];
+ break;
+ }
+ }
+ i = n-1;
+ }
if (x < rc && x >= 0) {
tmp_vect[n*2] = make_signed_integer(restartp->ovector[x*2],p);
tmp_vect[n*2+1] = make_signed_integer(restartp->ovector[x*2+1]-restartp->ovector[x*2],p);
@@ -658,6 +757,17 @@ static Eterm build_exec_return(Process *p, int rc, RestartContext *restartp, Ete
ri->num_spec * sizeof(Eterm));
for (i = 0; i < ri->num_spec; ++i) {
x = ri->v[i];
+ if (x < -1) {
+ int n = i-x+1;
+ int j;
+ for (j = i+1; j < ri->num_spec && j < n; ++j) {
+ if (restartp->ovector[(ri->v[j])*2] >= 0) {
+ x = ri->v[j];
+ break;
+ }
+ }
+ i = n-1;
+ }
if (x < rc && x >= 0) {
char *cp;
int len;
@@ -722,6 +832,49 @@ static Eterm build_exec_return(Process *p, int rc, RestartContext *restartp, Ete
*/
#define RINFO_SIZ(Num) (sizeof(ReturnInfo) + (sizeof(int) * (Num - 1)))
+#define PICK_INDEX(NameEntry) \
+ ((int) ((((unsigned) ((unsigned char *) (NameEntry))[0]) << 8) + \
+ ((unsigned) ((unsigned char *) (NameEntry))[1])))
+
+
+static void build_one_capture(const pcre *code, ReturnInfo **ri, int *sallocated, int has_dupnames, char *name)
+{
+ ReturnInfo *r = (*ri);
+ if (has_dupnames) {
+ /* Build a sequence of positions, starting with -size if
+ more than one, otherwise just put the index there... */
+ char *first,*last;
+ int esize = erts_pcre_get_stringtable_entries(code,name,&first,&last);
+ if (esize == PCRE_ERROR_NOSUBSTRING) {
+ r->v[r->num_spec - 1] = -1;
+ } else if(last == first) {
+ r->v[r->num_spec - 1] = PICK_INDEX(first);
+ } else {
+ int num = ((last - first) / esize) + 1;
+ int i;
+ ASSERT(num > 1);
+ r->v[r->num_spec - 1] = -num; /* A value less than -1 means
+ multiple indexes for same name */
+ for (i = 0; i < num; ++i) {
+ ++(r->num_spec);
+ if(r->num_spec > (*sallocated)) {
+ (*sallocated) += 10;
+ r = erts_realloc(ERTS_ALC_T_RE_SUBJECT, r,
+ RINFO_SIZ((*sallocated)));
+ }
+ r->v[r->num_spec - 1] = PICK_INDEX(first);
+ first += esize;
+ }
+ }
+ } else {
+ /* Use the faster binary search if no duplicate names are present */
+ if ((r->v[r->num_spec - 1] = erts_pcre_get_stringnumber(code,name)) ==
+ PCRE_ERROR_NOSUBSTRING) {
+ r->v[r->num_spec - 1] = -1;
+ }
+ }
+ *ri = r;
+}
static ReturnInfo *
build_capture(Eterm capture_spec[CAPSPEC_SIZE], const pcre *code)
@@ -770,13 +923,58 @@ build_capture(Eterm capture_spec[CAPSPEC_SIZE], const pcre *code)
}
ri->v[ri->num_spec - 1] = 0;
break;
+ case am_all_names:
+ {
+ int rc,i,top;
+ int entrysize;
+ unsigned char *nametable, *last = NULL;
+ int has_dupnames;
+ unsigned long options;
+
+ if (erts_pcre_fullinfo(code, NULL, PCRE_INFO_OPTIONS, &options) != 0)
+ goto error;
+ if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ goto error;
+ if (top <= 0) {
+ ri->num_spec = 0;
+ ri->type = RetNone;
+ break;
+ }
+ if (erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize) != 0)
+ goto error;
+ if (erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable) != 0)
+ goto error;
+
+ has_dupnames = ((options & PCRE_DUPNAMES) != 0);
+
+ for(i=0;i<top;++i) {
+ if (last == NULL || !has_dupnames || strcmp((char *) last+2,(char *) nametable+2)) {
+ ASSERT(ri->num_spec >= 0);
+ ++(ri->num_spec);
+ if(ri->num_spec > sallocated) {
+ sallocated += 10;
+ ri = erts_realloc(ERTS_ALC_T_RE_SUBJECT, ri, RINFO_SIZ(sallocated));
+ }
+ if (has_dupnames) {
+ /* This could be more effective, we actually have
+ the names and could fill in the vector
+ immediately. Now we lookup the name again. */
+ build_one_capture(code,&ri,&sallocated,has_dupnames,(char *) nametable+2);
+ } else {
+ ri->v[ri->num_spec - 1] = PICK_INDEX(nametable);
+ }
+ }
+ last = nametable;
+ nametable += entrysize;
+ }
+ break;
+ }
default:
if (is_list(capture_spec[CAPSPEC_VALUES])) {
for(l=capture_spec[CAPSPEC_VALUES];is_list(l);l = CDR(list_val(l))) {
int x;
Eterm val = CAR(list_val(l));
- if (ri->num_spec < 0)
- ri->num_spec = 0;
+ ASSERT(ri->num_spec >= 0);
++(ri->num_spec);
if(ri->num_spec > sallocated) {
sallocated += 10;
@@ -785,6 +983,11 @@ build_capture(Eterm capture_spec[CAPSPEC_SIZE], const pcre *code)
if (term_to_int(val,&x)) {
ri->v[ri->num_spec - 1] = x;
} else if (is_atom(val) || is_binary(val) || is_list(val)) {
+ int has_dupnames;
+ unsigned long options;
+ if (erts_pcre_fullinfo(code, NULL, PCRE_INFO_OPTIONS, &options) != 0)
+ goto error;
+ has_dupnames = ((options & PCRE_DUPNAMES) != 0);
if (is_atom(val)) {
Atom *ap = atom_tab(atom_val(val));
if ((ap->len + 1) > tmpbsiz) {
@@ -799,6 +1002,10 @@ build_capture(Eterm capture_spec[CAPSPEC_SIZE], const pcre *code)
tmpb[ap->len] = '\0';
} else {
ErlDrvSizeT slen;
+#ifdef DEBUG
+ int buffres;
+#endif
+
if (erts_iolist_size(val, &slen)) {
goto error;
}
@@ -810,15 +1017,15 @@ build_capture(Eterm capture_spec[CAPSPEC_SIZE], const pcre *code)
(tmpbsiz = slen + 1));
}
}
- if (erts_iolist_to_buf(val, tmpb, slen) != 0) {
- goto error;
- }
+
+#ifdef DEBUG
+ buffres =
+#endif
+ erts_iolist_to_buf(val, tmpb, slen);
+ ASSERT(buffres >= 0);
tmpb[slen] = '\0';
}
- if ((ri->v[ri->num_spec - 1] = erts_pcre_get_stringnumber(code,tmpb)) ==
- PCRE_ERROR_NOSUBSTRING) {
- ri->v[ri->num_spec - 1] = -1;
- }
+ build_one_capture(code,&ri,&sallocated,has_dupnames,tmpb);
} else {
goto error;
}
@@ -867,15 +1074,18 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
unsigned long loop_count;
Eterm capture[CAPSPEC_SIZE] = CAPSPEC_INIT;
int is_list_cap;
+ int match_limit = 0;
+ int match_limit_recursion = 0;
- if (parse_options(arg3,&comp_options,&options,&pflags,&startoffset,capture)
+ if (parse_options(arg3,&comp_options,&options,&pflags,&startoffset,capture,
+ &match_limit,&match_limit_recursion)
< 0) {
BIF_ERROR(p,BADARG);
}
is_list_cap = ((pflags & PARSE_FLAG_CAPTURE_OPT) &&
(capture[CAPSPEC_TYPE] == am_list));
- if (is_not_tuple(arg2) || (arityval(*tuple_val(arg2)) != 4)) {
+ if (is_not_tuple(arg2) || (arityval(*tuple_val(arg2)) != 5)) {
if (is_binary(arg2) || is_list(arg2) || is_nil(arg2)) {
/* Compile from textual RE */
ErlDrvSizeT slen;
@@ -885,6 +1095,9 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
const char *errstr = "";
int errofset = 0;
int capture_count;
+#ifdef DEBUG
+ int buffres;
+#endif
if (pflags & PARSE_FLAG_UNICODE &&
(!is_binary(arg2) || !is_binary(arg1) ||
@@ -897,18 +1110,32 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
}
expr = erts_alloc(ERTS_ALC_T_RE_TMP_BUF, slen + 1);
- if (erts_iolist_to_buf(arg2, expr, slen) != 0) {
- erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
- BIF_ERROR(p,BADARG);
- }
+
+#ifdef DEBUG
+ buffres =
+#endif
+ erts_iolist_to_buf(arg2, expr, slen);
+
+ ASSERT(buffres >= 0);
+
expr[slen]='\0';
result = erts_pcre_compile2(expr, comp_options, &errcode,
&errstr, &errofset, default_table);
if (!result) {
- erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
/* Compilation error gives badarg except in the compile
- function */
- BIF_ERROR(p,BADARG);
+ function or if we have PARSE_FLAG_REPORT_ERRORS */
+ if (pflags & PARSE_FLAG_REPORT_ERRORS) {
+ res = build_compile_result(p, am_error, result, errcode,
+ errstr, errofset,
+ (pflags &
+ PARSE_FLAG_UNICODE) ? 1 : 0,
+ 1, am_compile);
+ erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
+ BIF_RET(res);
+ } else {
+ erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
+ BIF_ERROR(p,BADARG);
+ }
}
if (pflags & PARSE_FLAG_GLOBAL) {
Eterm precompiled =
@@ -917,7 +1144,7 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
errstr, errofset,
(pflags &
PARSE_FLAG_UNICODE) ? 1 : 0,
- 0);
+ 0, NIL);
Eterm *hp,r;
erts_free(ERTS_ALC_T_RE_TMP_BUF, expr);
hp = HAlloc(p,4);
@@ -947,7 +1174,8 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
tp = tuple_val(arg2);
if (tp[1] != am_re_pattern || is_not_small(tp[2]) ||
- is_not_small(tp[3]) || is_not_binary(tp[4])) {
+ is_not_small(tp[3]) || is_not_small(tp[4]) ||
+ is_not_binary(tp[5])) {
BIF_ERROR(p,BADARG);
}
@@ -967,9 +1195,9 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
}
ovsize = 3*(unsigned_val(tp[2])+1);
- code_size = binary_size(tp[4]);
- if ((code_tmp = (const pcre *)
- erts_get_aligned_binary_bytes(tp[4], &temp_alloc)) == NULL) {
+ code_size = binary_size(tp[5]);
+ code_tmp = (const pcre *) erts_get_aligned_binary_bytes(tp[5], &temp_alloc);
+ if (code_tmp == NULL || code_size < 4) {
erts_free_aligned_binary_bytes(temp_alloc);
BIF_ERROR(p, BADARG);
}
@@ -994,6 +1222,16 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
restart.extra.restart_flags = 0;
restart.extra.loop_counter_return = &loop_count;
restart.ret_info = NULL;
+
+ if (pflags & PARSE_FLAG_MATCH_LIMIT) {
+ restart.extra.flags |= PCRE_EXTRA_MATCH_LIMIT;
+ restart.extra.match_limit = match_limit;
+ }
+
+ if (pflags & PARSE_FLAG_MATCH_LIMIT_RECURSION) {
+ restart.extra.flags |= PCRE_EXTRA_MATCH_LIMIT_RECURSION;
+ restart.extra.match_limit_recursion = match_limit_recursion;
+ }
if (pflags & PARSE_FLAG_CAPTURE_OPT) {
if ((restart.ret_info = build_capture(capture,restart.code)) == NULL) {
@@ -1002,7 +1240,7 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
BIF_ERROR(p,BADARG);
}
}
-
+
/* Optimized - if already in binary off heap, keep that and avoid
copying, also binary returns can be sub binaries in that case */
@@ -1029,6 +1267,9 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
restart.subject = (char *) (pb->bytes+offset);
restart.flags |= RESTART_FLAG_SUBJECT_IN_BINARY;
} else {
+#ifdef DEBUG
+ int buffres;
+#endif
handle_iolist:
if (erts_iolist_size(arg1, &slength)) {
erts_free(ERTS_ALC_T_RE_SUBJECT, restart.ovector);
@@ -1040,24 +1281,30 @@ handle_iolist:
}
restart.subject = erts_alloc(ERTS_ALC_T_RE_SUBJECT, slength);
- if (erts_iolist_to_buf(arg1, restart.subject, slength) != 0) {
- erts_free(ERTS_ALC_T_RE_SUBJECT, restart.ovector);
- erts_free(ERTS_ALC_T_RE_SUBJECT, restart.code);
- erts_free(ERTS_ALC_T_RE_SUBJECT, restart.subject);
- if (restart.ret_info != NULL) {
- erts_free(ERTS_ALC_T_RE_SUBJECT, restart.ret_info);
- }
- BIF_ERROR(p,BADARG);
- }
+#ifdef DEBUG
+ buffres =
+#endif
+ erts_iolist_to_buf(arg1, restart.subject, slength);
+ ASSERT(buffres >= 0);
}
+ if (pflags & PARSE_FLAG_REPORT_ERRORS) {
+ restart.flags |= RESTART_FLAG_REPORT_MATCH_LIMIT;
+ }
#ifdef DEBUG
loop_count = 0xFFFFFFFF;
#endif
+
+ rc = erts_pcre_exec(restart.code, &(restart.extra), restart.subject,
+ slength, startoffset,
+ options, restart.ovector, ovsize);
+
+ if (rc == PCRE_ERROR_BADENDIANNESS || rc == PCRE_ERROR_BADMAGIC) {
+ cleanup_restart_context(&restart);
+ BIF_ERROR(p,BADARG);
+ }
- rc = erts_pcre_exec(restart.code, &(restart.extra), restart.subject, slength, startoffset,
- options, restart.ovector, ovsize);
ASSERT(loop_count != 0xFFFFFFFF);
BUMP_REDS(p, loop_count / LOOP_FACTOR);
if (rc == PCRE_ERROR_LOOP_LIMIT) {
@@ -1077,7 +1324,7 @@ handle_iolist:
arg2 /* To avoid GC of precompiled code, XXX: not utilized yet */,
magic_bin);
}
-
+
res = build_exec_return(p, rc, &restart, arg1);
cleanup_restart_context(&restart);
@@ -1149,6 +1396,120 @@ static BIF_RETTYPE re_exec_trap(BIF_ALIST_3)
BIF_RET(res);
}
+BIF_RETTYPE
+re_inspect_2(BIF_ALIST_2)
+{
+ Eterm *tp,*tmp_vec,*hp;
+ int i,top,j;
+ int entrysize;
+ unsigned char *nametable, *last,*name;
+ int has_dupnames;
+ unsigned long options;
+ int num_names;
+ Eterm res;
+ const pcre *code;
+ byte *temp_alloc = NULL;
+#ifdef DEBUG
+ int infores;
+#endif
+
+
+ if (is_not_tuple(BIF_ARG_1) || (arityval(*tuple_val(BIF_ARG_1)) != 5)) {
+ goto error;
+ }
+ tp = tuple_val(BIF_ARG_1);
+ if (tp[1] != am_re_pattern || is_not_small(tp[2]) ||
+ is_not_small(tp[3]) || is_not_small(tp[4]) ||
+ is_not_binary(tp[5])) {
+ goto error;
+ }
+ if (BIF_ARG_2 != am_namelist) {
+ goto error;
+ }
+ if ((code = (const pcre *)
+ erts_get_aligned_binary_bytes(tp[5], &temp_alloc)) == NULL) {
+ goto error;
+ }
+
+ /* OK, so let's try to get some info */
+
+ if (erts_pcre_fullinfo(code, NULL, PCRE_INFO_OPTIONS, &options) != 0)
+ goto error;
+
+#ifdef DEBUG
+ infores =
+#endif
+ erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top);
+
+ ASSERT(infores == 0);
+
+ if (top <= 0) {
+ hp = HAlloc(BIF_P, 3);
+ res = TUPLE2(hp,am_namelist,NIL);
+ erts_free_aligned_binary_bytes(temp_alloc);
+ BIF_RET(res);
+ }
+#ifdef DEBUG
+ infores =
+#endif
+ erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize);
+
+ ASSERT(infores == 0);
+
+#ifdef DEBUG
+ infores =
+#endif
+ erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable);
+
+ ASSERT(infores == 0);
+
+ has_dupnames = ((options & PCRE_DUPNAMES) != 0);
+ /* First, count the names */
+ num_names = 0;
+ last = NULL;
+ name = nametable;
+ for(i=0;i<top;++i) {
+ if (last == NULL || !has_dupnames || strcmp((char *) last+2,
+ (char *) name+2)) {
+ ++num_names;
+ }
+ last = name;
+ name += entrysize;
+ }
+ tmp_vec = erts_alloc(ERTS_ALC_T_RE_TMP_BUF,
+ num_names * sizeof(Eterm));
+ /* Re-iterate and fill tmp_vec */
+ last = NULL;
+ name = nametable;
+ j = 0;
+ for(i=0;i<top;++i) {
+ if (last == NULL || !has_dupnames || strcmp((char *) last+2,
+ (char *) name+2)) {
+ tmp_vec[j++] = new_binary(BIF_P, (byte *) name+2, strlen((char *) name+2));
+ }
+ last = name;
+ name += entrysize;
+ }
+ ASSERT(j == num_names);
+ hp = HAlloc(BIF_P, 3+2*j);
+ res = NIL;
+ for(i = j-1 ;i >= 0; --i) {
+ res = CONS(hp,tmp_vec[i],res);
+ hp += 2;
+ }
+ res = TUPLE2(hp,am_namelist,res);
+ erts_free_aligned_binary_bytes(temp_alloc);
+ erts_free(ERTS_ALC_T_RE_TMP_BUF, tmp_vec);
+ BIF_RET(res);
+
+ error:
+ /* tmp_vec never allocated when we reach here */
+ erts_free_aligned_binary_bytes(temp_alloc);
+ BIF_ERROR(BIF_P,BADARG);
+}
+
+
+
diff --git a/erts/emulator/beam/erl_bif_timer.c b/erts/emulator/beam/erl_bif_timer.c
index d67695e533..03ac97283c 100644
--- a/erts/emulator/beam/erl_bif_timer.c
+++ b/erts/emulator/beam/erl_bif_timer.c
@@ -616,7 +616,7 @@ erts_print_bif_timer_info(int to, void *to_arg)
: btm->receiver.proc.ess->common.id);
erts_print(to, to_arg, "=timer:%T\n", receiver);
erts_print(to, to_arg, "Message: %T\n", btm->message);
- erts_print(to, to_arg, "Time left: %u ms\n",
+ erts_print(to, to_arg, "Time left: %u\n",
erts_time_left(&btm->tm));
}
}
diff --git a/erts/emulator/beam/erl_binary.h b/erts/emulator/beam/erl_binary.h
index 819b19e566..06dfeb1260 100644
--- a/erts/emulator/beam/erl_binary.h
+++ b/erts/emulator/beam/erl_binary.h
@@ -166,7 +166,7 @@ Eterm erts_bin_bytes_to_list(Eterm previous, Eterm* hp, byte* bytes, Uint size,
* Common implementation for erlang:list_to_binary/1 and binary:list_to_bin/1
*/
-BIF_RETTYPE erts_list_to_binary_bif(Process *p, Eterm arg);
+BIF_RETTYPE erts_list_to_binary_bif(Process *p, Eterm arg, Export *bif);
BIF_RETTYPE erts_gc_binary_part(Process *p, Eterm *reg, Eterm live, int range_is_tuple);
BIF_RETTYPE erts_binary_part(Process *p, Eterm binary, Eterm epos, Eterm elen);
@@ -236,6 +236,8 @@ erts_bin_drv_alloc_fnf(Uint size)
{
Uint bsize = ERTS_SIZEOF_Binary(size) + CHICKEN_PAD;
void *res;
+ if (bsize < size) /* overflow */
+ return NULL;
res = erts_alloc_fnf(ERTS_ALC_T_DRV_BINARY, bsize);
ERTS_CHK_BIN_ALIGNMENT(res);
return (Binary *) res;
@@ -246,6 +248,8 @@ erts_bin_drv_alloc(Uint size)
{
Uint bsize = ERTS_SIZEOF_Binary(size) + CHICKEN_PAD;
void *res;
+ if (bsize < size) /* overflow */
+ erts_alloc_enomem(ERTS_ALC_T_DRV_BINARY, size);
res = erts_alloc(ERTS_ALC_T_DRV_BINARY, bsize);
ERTS_CHK_BIN_ALIGNMENT(res);
return (Binary *) res;
@@ -257,6 +261,8 @@ erts_bin_nrml_alloc(Uint size)
{
Uint bsize = ERTS_SIZEOF_Binary(size) + CHICKEN_PAD;
void *res;
+ if (bsize < size) /* overflow */
+ erts_alloc_enomem(ERTS_ALC_T_BINARY, size);
res = erts_alloc(ERTS_ALC_T_BINARY, bsize);
ERTS_CHK_BIN_ALIGNMENT(res);
return (Binary *) res;
@@ -267,11 +273,12 @@ erts_bin_realloc_fnf(Binary *bp, Uint size)
{
Binary *nbp;
Uint bsize = ERTS_SIZEOF_Binary(size) + CHICKEN_PAD;
+ ErtsAlcType_t type = (bp->flags & BIN_FLAG_DRV) ? ERTS_ALC_T_DRV_BINARY
+ : ERTS_ALC_T_BINARY;
ASSERT((bp->flags & BIN_FLAG_MAGIC) == 0);
- if (bp->flags & BIN_FLAG_DRV)
- nbp = erts_realloc_fnf(ERTS_ALC_T_DRV_BINARY, (void *) bp, bsize);
- else
- nbp = erts_realloc_fnf(ERTS_ALC_T_BINARY, (void *) bp, bsize);
+ if (bsize < size) /* overflow */
+ return NULL;
+ nbp = erts_realloc_fnf(type, (void *) bp, bsize);
ERTS_CHK_BIN_ALIGNMENT(nbp);
return nbp;
}
@@ -281,17 +288,14 @@ erts_bin_realloc(Binary *bp, Uint size)
{
Binary *nbp;
Uint bsize = ERTS_SIZEOF_Binary(size) + CHICKEN_PAD;
+ ErtsAlcType_t type = (bp->flags & BIN_FLAG_DRV) ? ERTS_ALC_T_DRV_BINARY
+ : ERTS_ALC_T_BINARY;
ASSERT((bp->flags & BIN_FLAG_MAGIC) == 0);
- if (bp->flags & BIN_FLAG_DRV)
- nbp = erts_realloc_fnf(ERTS_ALC_T_DRV_BINARY, (void *) bp, bsize);
- else
- nbp = erts_realloc_fnf(ERTS_ALC_T_BINARY, (void *) bp, bsize);
+ if (bsize < size) /* overflow */
+ erts_realloc_enomem(type, bp, size);
+ nbp = erts_realloc_fnf(type, (void *) bp, bsize);
if (!nbp)
- erts_realloc_n_enomem(ERTS_ALC_T2N(bp->flags & BIN_FLAG_DRV
- ? ERTS_ALC_T_DRV_BINARY
- : ERTS_ALC_T_BINARY),
- bp,
- bsize);
+ erts_realloc_enomem(type, bp, bsize);
ERTS_CHK_BIN_ALIGNMENT(nbp);
return nbp;
}
@@ -312,6 +316,7 @@ erts_create_magic_binary(Uint size, void (*destructor)(Binary *))
{
Uint bsize = ERTS_MAGIC_BIN_SIZE(size);
Binary* bptr = erts_alloc_fnf(ERTS_ALC_T_BINARY, bsize);
+ ASSERT(bsize > size);
if (!bptr)
erts_alloc_n_enomem(ERTS_ALC_T2N(ERTS_ALC_T_BINARY), bsize);
ERTS_CHK_BIN_ALIGNMENT(bptr);
diff --git a/erts/emulator/beam/erl_bits.c b/erts/emulator/beam/erl_bits.c
index 73765772c8..53c21c40e1 100644
--- a/erts/emulator/beam/erl_bits.c
+++ b/erts/emulator/beam/erl_bits.c
@@ -403,7 +403,10 @@ erts_bs_get_integer_2(Process *p, Uint num_bits, unsigned flags, ErlBinMatchBuff
words_needed = 1+WSIZE(bytes);
hp = HeapOnlyAlloc(p, words_needed);
res = bytes_to_big(LSB, bytes, sgn, hp);
- if (is_small(res)) {
+ if (is_nil(res)) {
+ p->htop = hp;
+ res = THE_NON_VALUE;
+ } else if (is_small(res)) {
p->htop = hp;
} else if ((actual = bignum_header_arity(*hp)+1) < words_needed) {
p->htop = hp + actual;
diff --git a/erts/emulator/beam/erl_cpu_topology.c b/erts/emulator/beam/erl_cpu_topology.c
index 88c6c34881..f594cb9392 100644
--- a/erts/emulator/beam/erl_cpu_topology.c
+++ b/erts/emulator/beam/erl_cpu_topology.c
@@ -1699,7 +1699,7 @@ erts_early_init_cpu_topology(int no_schedulers,
}
max_main_threads = erts_get_cpu_configured(cpuinfo);
- if (max_main_threads > no_schedulers)
+ if (max_main_threads > no_schedulers || max_main_threads < 0)
max_main_threads = no_schedulers;
*max_main_threads_p = max_main_threads;
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 41e64fcd4f..8f246ffa07 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -125,6 +125,7 @@ get_meta_main_tab_lock(unsigned slot)
static erts_smp_spinlock_t meta_main_tab_main_lock;
static Uint meta_main_tab_first_free; /* Index of first free slot */
static int meta_main_tab_cnt; /* Number of active tables */
+static int meta_main_tab_top; /* Highest ever used slot + 1 */
static Uint meta_main_tab_slot_mask; /* The slot index part of an unnamed table id */
static Uint meta_main_tab_seq_incr;
static Uint meta_main_tab_seq_cnt = 0; /* To give unique(-ish) table identifiers */
@@ -258,10 +259,11 @@ static void schedule_free_dbtable(DbTable* tb)
/*
* NON-SMP case: Caller is *not* allowed to access the *tb
* structure after this function has returned!
- * SMP case: Caller is allowed to access the *tb structure
- * until the bif has returned (we typically
- * need to unlock the table lock after this
- * function has returned).
+ * SMP case: Caller is allowed to access the *common* part of the *tb
+ * structure until the bif has returned (we typically need to
+ * unlock the table lock after this function has returned).
+ * Caller is *not* allowed to access the specialized part
+ * (hash or tree) of *tb after this function has returned.
*/
ASSERT(erts_refc_read(&tb->common.ref, 0) == 0);
erts_schedule_thr_prgr_later_cleanup_op(free_dbtable,
@@ -1469,6 +1471,10 @@ BIF_RETTYPE ets_new_2(BIF_ALIST_2)
ASSERT(slot>=0 && slot<db_max_tabs);
meta_main_tab_first_free = GET_NEXT_FREE_SLOT(slot);
meta_main_tab_cnt++;
+ if (slot >= meta_main_tab_top) {
+ ASSERT(slot == meta_main_tab_top);
+ meta_main_tab_top = slot + 1;
+ }
if (is_named) {
ret = BIF_ARG_1;
@@ -2058,27 +2064,31 @@ BIF_RETTYPE ets_all_0(BIF_ALIST_0)
{
DbTable* tb;
Eterm previous;
- int i, j;
+ int i;
Eterm* hp;
Eterm* hendp;
int t_tabs_cnt;
- int t_max_tabs;
+ int t_top;
erts_smp_spin_lock(&meta_main_tab_main_lock);
t_tabs_cnt = meta_main_tab_cnt;
- t_max_tabs = db_max_tabs;
+ t_top = meta_main_tab_top;
erts_smp_spin_unlock(&meta_main_tab_main_lock);
hp = HAlloc(BIF_P, 2*t_tabs_cnt);
hendp = hp + 2*t_tabs_cnt;
previous = NIL;
- j = 0;
- for(i = 0; (i < t_max_tabs && j < t_tabs_cnt); i++) {
+ for(i = 0; i < t_top; i++) {
erts_smp_rwmtx_t *mmtl = get_meta_main_tab_lock(i);
erts_smp_rwmtx_rlock(mmtl);
if (IS_SLOT_ALIVE(i)) {
- j++;
+ if (hp == hendp) {
+ /* Racing table creator, grab some more heap space */
+ t_tabs_cnt = 10;
+ hp = HAlloc(BIF_P, 2*t_tabs_cnt);
+ hendp = hp + 2*t_tabs_cnt;
+ }
tb = meta_main_tab[i].u.tb;
previous = CONS(hp, tb->common.id, previous);
hp += 2;
@@ -2849,6 +2859,7 @@ void init_db(void)
ERTS_ETS_MISC_MEM_ADD(size);
meta_main_tab_cnt = 0;
+ meta_main_tab_top = 0;
for (i=1; i<db_max_tabs; i++) {
SET_NEXT_FREE_SLOT(i-1,i);
}
@@ -3269,34 +3280,37 @@ erts_db_process_exiting(Process *c_p, ErtsProcLocks c_p_locks)
}
erts_smp_rwmtx_runlock(mmtl);
if (tb) {
- int reds;
- DbFixation** pp;
+ int reds = 0;
db_lock(tb, LCK_WRITE_REC);
- #ifdef ERTS_SMP
- erts_smp_mtx_lock(&tb->common.fixlock);
- #endif
- reds = 10;
-
- for (pp = &tb->common.fixations; *pp != NULL;
- pp = &(*pp)->next) {
- if ((*pp)->pid == pid) {
- DbFixation* fix = *pp;
- erts_aint_t diff = -((erts_aint_t) fix->counter);
- erts_refc_add(&tb->common.ref,diff,0);
- *pp = fix->next;
- erts_db_free(ERTS_ALC_T_DB_FIXATION,
- tb, fix, sizeof(DbFixation));
- ERTS_ETS_MISC_MEM_ADD(-sizeof(DbFixation));
- break;
+ if (!(tb->common.status & DB_DELETE)) {
+ DbFixation** pp;
+
+ #ifdef ERTS_SMP
+ erts_smp_mtx_lock(&tb->common.fixlock);
+ #endif
+ reds = 10;
+
+ for (pp = &tb->common.fixations; *pp != NULL;
+ pp = &(*pp)->next) {
+ if ((*pp)->pid == pid) {
+ DbFixation* fix = *pp;
+ erts_aint_t diff = -((erts_aint_t) fix->counter);
+ erts_refc_add(&tb->common.ref,diff,0);
+ *pp = fix->next;
+ erts_db_free(ERTS_ALC_T_DB_FIXATION,
+ tb, fix, sizeof(DbFixation));
+ ERTS_ETS_MISC_MEM_ADD(-sizeof(DbFixation));
+ break;
+ }
+ }
+ #ifdef ERTS_SMP
+ erts_smp_mtx_unlock(&tb->common.fixlock);
+ #endif
+ if (!IS_FIXED(tb) && IS_HASH_TABLE(tb->common.status)) {
+ db_unfix_table_hash(&(tb->hash));
+ reds += 40;
}
- }
- #ifdef ERTS_SMP
- erts_smp_mtx_unlock(&tb->common.fixlock);
- #endif
- if (!IS_FIXED(tb) && IS_HASH_TABLE(tb->common.status)) {
- db_unfix_table_hash(&(tb->hash));
- reds += 40;
}
db_unlock(tb, LCK_WRITE_REC);
BUMP_REDS(c_p, reds);
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index 2fea4671e1..06dac8f161 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -2106,7 +2106,7 @@ static void db_print_hash(int to, void *to_arg, int show, DbTable *tbl)
DbTableHash *tb = &tbl->hash;
int i;
- erts_print(to, to_arg, "Buckets: %d \n", NACTIVE(tb));
+ erts_print(to, to_arg, "Buckets: %d\n", NACTIVE(tb));
if (show) {
for (i = 0; i < NACTIVE(tb); i++) {
diff --git a/erts/emulator/beam/erl_db_hash.h b/erts/emulator/beam/erl_db_hash.h
index d17bd9f693..908cec11d4 100644
--- a/erts/emulator/beam/erl_db_hash.h
+++ b/erts/emulator/beam/erl_db_hash.h
@@ -33,7 +33,12 @@ typedef struct hash_db_term {
DbTerm dbterm; /* The actual term */
} HashDbTerm;
+#ifdef ERTS_DB_HASH_LOCK_CNT
+#define DB_HASH_LOCK_CNT ERTS_DB_HASH_LOCK_CNT
+#else
#define DB_HASH_LOCK_CNT 64
+#endif
+
typedef struct db_table_hash_fine_locks {
union {
erts_smp_rwmtx_t lck;
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index 25029ba90f..a62a83a928 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -485,7 +485,7 @@ static int db_first_tree(Process *p, DbTable *tbl, Eterm *ret)
*ret = am_EOT;
return DB_ERROR_NONE;
}
- /* Walk down to the tree to the left */
+ /* Walk down the tree to the left */
if ((stack = get_static_stack(tb)) != NULL) {
stack->pos = stack->slot = 0;
}
@@ -531,7 +531,7 @@ static int db_last_tree(Process *p, DbTable *tbl, Eterm *ret)
*ret = am_EOT;
return DB_ERROR_NONE;
}
- /* Walk down to the tree to the left */
+ /* Walk down the tree to the right */
if ((stack = get_static_stack(tb)) != NULL) {
stack->pos = stack->slot = 0;
}
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index ef3749a2c4..3927615e04 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -35,6 +35,7 @@
#include "bif.h"
#include "big.h"
#include "erl_binary.h"
+#include "erl_map.h"
#include "erl_thr_progress.h"
#include "erl_db_util.h"
@@ -482,7 +483,8 @@ void
match_pseudo_process_init(void)
{
#ifdef ERTS_SMP
- erts_smp_tsd_key_create(&match_pseudo_process_key);
+ erts_smp_tsd_key_create(&match_pseudo_process_key,
+ "erts_match_pseudo_process_key");
erts_smp_install_exit_handler(destroy_match_pseudo_process);
#else
match_pseudo_process = create_match_pseudo_process();
@@ -565,6 +567,12 @@ static DMCGuardBif guard_tab[] =
DBIF_ALL
},
{
+ am_is_map,
+ &is_map_1,
+ 1,
+ DBIF_ALL
+ },
+ {
am_is_binary,
&is_binary_1,
1,
@@ -631,6 +639,12 @@ static DMCGuardBif guard_tab[] =
DBIF_ALL
},
{
+ am_map_size,
+ &map_size_1,
+ 1,
+ DBIF_ALL
+ },
+ {
am_bit_size,
&bit_size_1,
1,
@@ -1838,7 +1852,7 @@ restart:
ep = termp;
break;
case matchArrayBind: /* When the array size is unknown. */
- ASSERT(termp);
+ ASSERT(termp || arity==0);
n = *pc++;
variables[n].term = dpm_array_to_list(psp, termp, arity);
break;
diff --git a/erts/emulator/beam/erl_debug.c b/erts/emulator/beam/erl_debug.c
index b90d00f236..50bdc79506 100644
--- a/erts/emulator/beam/erl_debug.c
+++ b/erts/emulator/beam/erl_debug.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2012. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2013. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,7 @@
#include "bif.h"
#include "beam_catches.h"
#include "erl_debug.h"
+#include "erl_map.h"
#define WITHIN(ptr, x, y) ((x) <= (ptr) && (ptr) < (y))
@@ -299,6 +300,9 @@ void erts_check_for_holes(Process* p)
ErlHeapFragment* hf;
Eterm* start;
+ if (p->flags & F_DISABLE_GC)
+ return;
+
start = p->last_htop ? p->last_htop : HEAP_START(p);
check_memory(start, HEAP_TOP(p));
p->last_htop = HEAP_TOP(p);
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index b68fd46fcc..e498ac70ec 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1999-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1999-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -132,10 +132,26 @@ typedef struct {
#define DO_WRITE ERL_DRV_WRITE
#define ERL_DRV_EXTENDED_MARKER (0xfeeeeeed)
-#define ERL_DRV_EXTENDED_MAJOR_VERSION 2
+#define ERL_DRV_EXTENDED_MAJOR_VERSION 3
#define ERL_DRV_EXTENDED_MINOR_VERSION 2
/*
+ * The emulator will refuse to load a driver with a major version
+ * lower than ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD. The load
+ * may however fail if user have not removed use of deprecated
+ * symbols.
+ *
+ * The ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD have to allow
+ * loading of drivers built at least two major OTP releases
+ * ago.
+ *
+ * Bump of major version to 3 happened in OTP 17. That is, in
+ * OTP 19 we can increase ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD
+ * to 3.
+ */
+#define ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD 2
+
+/*
* The emulator will refuse to load a driver with different major
* version than the one used by the emulator.
*/
@@ -182,7 +198,7 @@ typedef long long ErlDrvSInt64;
#error No 64-bit integer type
#endif
-#if defined(__WIN32__)
+#if defined(__WIN32__) || defined(_WIN32)
typedef ErlDrvUInt ErlDrvSizeT;
typedef ErlDrvSInt ErlDrvSSizeT;
#else
@@ -271,7 +287,6 @@ typedef struct ErlDrvCond_ ErlDrvCond;
typedef struct ErlDrvRWLock_ ErlDrvRWLock;
typedef int ErlDrvTSDKey;
-
/*
*
*/
@@ -346,6 +361,9 @@ typedef struct erl_drv_entry {
/* Called on behalf of driver_select when
it is safe to release 'event'. A typical
unix driver would call close(event) */
+ void (*emergency_close)(ErlDrvData drv_data);
+ /* called when the port is closed abruptly.
+ specifically when erl_crash_dump is called. */
/* When adding entries here, dont forget to pad in obsolete/driver.h */
} ErlDrvEntry;
@@ -365,17 +383,23 @@ typedef struct erl_drv_entry {
* It must initialize a ErlDrvEntry structure and return a pointer to it.
*/
+#ifdef STATIC_ERLANG_DRIVER
+# define ERLANG_DRIVER_NAME(NAME) NAME ## _driver_init
+#else
+# define ERLANG_DRIVER_NAME(NAME) driver_init
+#endif
+
/* For windows dynamic drivers */
#ifndef ERL_DRIVER_TYPES_ONLY
#if defined(__WIN32__)
# define DRIVER_INIT(DRIVER_NAME) \
- __declspec(dllexport) ErlDrvEntry* driver_init(void); \
- __declspec(dllexport) ErlDrvEntry* driver_init(void)
+ __declspec(dllexport) ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void); \
+ __declspec(dllexport) ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void)
#else
# define DRIVER_INIT(DRIVER_NAME) \
- ErlDrvEntry* driver_init(void); \
- ErlDrvEntry* driver_init(void)
+ ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void); \
+ ErlDrvEntry* ERLANG_DRIVER_NAME(DRIVER_NAME)(void)
#endif
#define ERL_DRV_BUSY_MSGQ_DISABLED (~((ErlDrvSizeT) 0))
@@ -599,6 +623,8 @@ EXTERN int null_func(void);
#define ERL_DRV_INT64 ((ErlDrvTermData) 15) /* ErlDrvSInt64 * */
#define ERL_DRV_UINT64 ((ErlDrvTermData) 16) /* ErlDrvUInt64 * */
+#define ERL_DRV_MAP ((ErlDrvTermData) 17) /* ErlDrvUInt */
+
#ifndef ERL_DRIVER_TYPES_ONLY
/* make terms for driver_output_term and driver_send_term */
@@ -651,12 +677,6 @@ EXTERN long driver_async(ErlDrvPort ix,
void* async_data,
void (*async_free)(void*));
-/*
- * driver_async_cancel() is deprecated. It is scheduled for removal
- * in OTP-R16. For more information see the erl_driver(3) documentation.
- */
-EXTERN int driver_async_cancel(unsigned int key) ERL_DRV_DEPRECATED_FUNC;
-
/* Locks the driver in the machine "forever", there is
no unlock function. Note that this is almost never useful, as an open
port towards the driver locks it until the port is closed, why unexpected
@@ -678,6 +698,16 @@ EXTERN char *driver_dl_error(void);
EXTERN int erl_drv_putenv(char *key, char *value);
EXTERN int erl_drv_getenv(char *key, char *value, size_t *value_size);
+#ifdef __OSE__
+typedef ErlDrvUInt ErlDrvOseEventId;
+EXTERN union SIGNAL *erl_drv_ose_get_signal(ErlDrvEvent ev);
+EXTERN ErlDrvEvent erl_drv_ose_event_alloc(SIGSELECT sig, ErlDrvOseEventId handle,
+ ErlDrvOseEventId (*resolve_signal)(union SIGNAL *sig), void *extra);
+EXTERN void erl_drv_ose_event_free(ErlDrvEvent ev);
+EXTERN void erl_drv_ose_event_fetch(ErlDrvEvent ev, SIGSELECT *sig,
+ ErlDrvOseEventId *handle, void **extra);
+#endif
+
#endif /* !ERL_DRIVER_TYPES_ONLY */
#ifdef WIN32_DYNAMIC_ERL_DRIVER
diff --git a/erts/emulator/beam/erl_drv_nif.h b/erts/emulator/beam/erl_drv_nif.h
index ea013a49a3..4e8c6dc68b 100644
--- a/erts/emulator/beam/erl_drv_nif.h
+++ b/erts/emulator/beam/erl_drv_nif.h
@@ -35,12 +35,20 @@ typedef struct {
int scheduler_threads;
int nif_major_version;
int nif_minor_version;
+ int dirty_scheduler_support;
} ErlDrvSysInfo;
typedef struct {
int suggested_stack_size;
} ErlDrvThreadOpts;
+#if defined(ERL_DRV_DIRTY_SCHEDULER_SUPPORT) || defined(ERL_NIF_DIRTY_SCHEDULER_SUPPORT)
+typedef enum {
+ ERL_DRV_DIRTY_JOB_CPU_BOUND = 1,
+ ERL_DRV_DIRTY_JOB_IO_BOUND = 2
+} ErlDrvDirtyJobFlags;
+#endif
+
#endif /* __ERL_DRV_NIF_H__ */
diff --git a/erts/emulator/beam/erl_drv_thread.c b/erts/emulator/beam/erl_drv_thread.c
index 4f1bba8657..147249f751 100644
--- a/erts/emulator/beam/erl_drv_thread.c
+++ b/erts/emulator/beam/erl_drv_thread.c
@@ -78,8 +78,6 @@ struct ErlDrvTid_ {
static ethr_tsd_key tid_key;
-static ethr_thr_opts def_ethr_opts = ETHR_THR_OPTS_DEFAULT_INITER;
-
#else /* USE_THREADS */
static Uint tsd_len;
static void **tsd;
@@ -123,7 +121,7 @@ void erl_drv_thr_init(void)
{
int i;
#ifdef USE_THREADS
- int res = ethr_tsd_key_create(&tid_key);
+ int res = ethr_tsd_key_create(&tid_key,"erts_tid_key");
if (res == 0)
res = ethr_install_exit_handler(thread_exit_handler);
if (res != 0)
@@ -605,6 +603,7 @@ erl_drv_thread_create(char *name,
struct ErlDrvTid_ *dtid;
ethr_thr_opts ethr_opts;
ethr_thr_opts *use_opts;
+ ethr_thr_opts def_ethr_opts = ETHR_THR_OPTS_DEFAULT_INITER;
if (!opts)
use_opts = NULL;
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index e89725c190..3856fc0a6a 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2002-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2002-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -28,6 +28,7 @@
#include "beam_catches.h"
#include "erl_binary.h"
#include "erl_bits.h"
+#include "erl_map.h"
#include "error.h"
#include "big.h"
#include "erl_gc.h"
@@ -400,10 +401,18 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj)
Uint reclaimed_now = 0;
int done = 0;
Uint ms1, s1, us1;
- ErtsSchedulerData *esdp = erts_get_scheduler_data();
+ ErtsSchedulerData *esdp;
#ifdef USE_VM_PROBES
DTRACE_CHARBUF(pidbuf, DTRACE_TERM_BUF_SIZE);
#endif
+
+ if (p->flags & F_DISABLE_GC) {
+ ASSERT(need == 0);
+ return 1;
+ }
+
+ esdp = erts_get_scheduler_data();
+
if (IS_TRACED_FL(p, F_TRACE_GC)) {
trace_gc(p, am_gc_start);
}
@@ -532,6 +541,9 @@ erts_garbage_collect_hibernate(Process* p)
Uint area_size;
Sint offs;
+ if (p->flags & F_DISABLE_GC)
+ ERTS_INTERNAL_ERROR("GC disabled");
+
/*
* Preliminaries.
*/
@@ -665,8 +677,10 @@ erts_garbage_collect_literals(Process* p, Eterm* literals,
Uint area_size;
Eterm* old_htop;
Uint n;
- struct erl_off_heap_header** prev;
+ struct erl_off_heap_header** prev = NULL;
+ if (p->flags & F_DISABLE_GC)
+ return;
/*
* Set GC state.
*/
@@ -772,10 +786,10 @@ erts_garbage_collect_literals(Process* p, Eterm* literals,
*/
if (oh) {
- prev = &MSO(p).first;
- while (*prev) {
- prev = &(*prev)->next;
- }
+ prev = &MSO(p).first;
+ while (*prev) {
+ prev = &(*prev)->next;
+ }
}
/*
@@ -804,6 +818,10 @@ erts_garbage_collect_literals(Process* p, Eterm* literals,
oh = oh->next;
}
+ if (prev) {
+ *prev = NULL;
+ }
+
/*
* We no longer need this temporary area.
*/
@@ -1146,7 +1164,7 @@ do_minor(Process *p, Uint new_sz, Eterm* objv, int nobj)
old_htop = sweep_one_area(OLD_HTOP(p), old_htop, heap, heap_size);
}
OLD_HTOP(p) = old_htop;
- HIGH_WATER(p) = (HEAP_START(p) != HIGH_WATER(p)) ? n_heap : n_htop;
+ HIGH_WATER(p) = n_htop;
if (MSO(p).first) {
sweep_off_heap(p, 0);
@@ -1855,6 +1873,21 @@ sweep_one_heap(Eterm* heap_ptr, Eterm* heap_end, Eterm* htop, char* src, Uint sr
if (!header_is_thing(gval)) {
heap_ptr++;
} else {
+ if (header_is_bin_matchstate(gval)) {
+ ErlBinMatchState *ms = (ErlBinMatchState*) heap_ptr;
+ ErlBinMatchBuffer *mb = &(ms->mb);
+ Eterm* origptr;
+ origptr = &(mb->orig);
+ ptr = boxed_val(*origptr);
+ val = *ptr;
+ if (IS_MOVED_BOXED(val)) {
+ *origptr = val;
+ mb->base = binary_bytes(*origptr);
+ } else if (in_area(ptr, src, src_size)) {
+ MOVE_BOXED(ptr,val,htop,origptr);
+ mb->base = binary_bytes(*origptr);
+ }
+ }
heap_ptr += (thing_arityval(gval)+1);
}
break;
@@ -1964,17 +1997,6 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset)
++n;
}
- /*
- * A trapping BIF can add to rootset by setting the extra_root
- * in the process_structure.
- */
- if (p->extra_root != NULL) {
- roots[n].v = p->extra_root->objv;
- roots[n].sz = p->extra_root->sz;
- ++n;
- }
-
-
ASSERT((is_nil(p->seq_trace_token) ||
is_tuple(follow_moved(p->seq_trace_token)) ||
is_atom(p->seq_trace_token)));
@@ -2015,6 +2037,20 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset)
roots[n].sz = 1;
n++;
}
+
+ /*
+ * If a NIF has saved arguments, they need to be added
+ */
+ if (ERTS_PROC_GET_NIF_TRAP_EXPORT(p)) {
+ Eterm* argv;
+ int argc;
+ if (erts_setup_nif_gc(p, &argv, &argc)) {
+ roots[n].v = argv;
+ roots[n].sz = argc;
+ n++;
+ }
+ }
+
ASSERT(n <= rootset->size);
mp = p->msg.first;
@@ -2552,11 +2588,6 @@ offset_one_rootset(Process *p, Sint offs, char* area, Uint area_size,
p->dictionary->used,
offs, area, area_size);
}
- if (p->extra_root != NULL) {
- offset_heap_ptr(p->extra_root->objv,
- p->extra_root->sz,
- offs, area, area_size);
- }
offset_heap_ptr(&p->fvalue, 1, offs, area, area_size);
offset_heap_ptr(&p->ftrace, 1, offs, area, area_size);
diff --git a/erts/emulator/beam/erl_gc.h b/erts/emulator/beam/erl_gc.h
index 1801df359a..5203dda263 100644
--- a/erts/emulator/beam/erl_gc.h
+++ b/erts/emulator/beam/erl_gc.h
@@ -20,6 +20,8 @@
#ifndef __ERL_GC_H__
#define __ERL_GC_H__
+#include "erl_map.h"
+
/* GC declarations shared by beam/erl_gc.c and hipe/hipe_gc.c */
#if defined(DEBUG) && !ERTS_GLB_INLINE_INCL_FUNC_DEF
@@ -42,23 +44,24 @@ do { \
HTOP += 2; /* update tospace htop */ \
} while(0)
-#define MOVE_BOXED(PTR,HDR,HTOP,ORIG) \
-do { \
- Eterm gval; \
- Sint nelts; \
- \
- ASSERT(is_header(HDR)); \
- gval = make_boxed(HTOP); \
- *ORIG = gval; \
- *HTOP++ = HDR; \
- *PTR++ = gval; \
- nelts = header_arity(HDR); \
- switch ((HDR) & _HEADER_SUBTAG_MASK) { \
- case SUB_BINARY_SUBTAG: nelts++; break; \
- case FUN_SUBTAG: nelts+=((ErlFunThing*)(PTR-1))->num_free+1; break; \
- } \
- while (nelts--) \
- *HTOP++ = *PTR++; \
+#define MOVE_BOXED(PTR,HDR,HTOP,ORIG) \
+do { \
+ Eterm gval; \
+ Sint nelts; \
+ \
+ ASSERT(is_header(HDR)); \
+ nelts = header_arity(HDR); \
+ switch ((HDR) & _HEADER_SUBTAG_MASK) { \
+ case SUB_BINARY_SUBTAG: nelts++; break; \
+ case MAP_SUBTAG: nelts+=map_get_size(PTR) + 1; break; \
+ case FUN_SUBTAG: nelts+=((ErlFunThing*)(PTR))->num_free+1; break; \
+ } \
+ gval = make_boxed(HTOP); \
+ *ORIG = gval; \
+ *HTOP++ = HDR; \
+ *PTR++ = gval; \
+ while (nelts--) *HTOP++ = *PTR++; \
+ \
} while(0)
#define in_area(ptr,start,nbytes) \
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 8c4fffa75b..743fd235bc 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -178,6 +178,11 @@ int erts_compat_rel;
static int no_schedulers;
static int no_schedulers_online;
+#ifdef ERTS_DIRTY_SCHEDULERS
+static int no_dirty_cpu_schedulers;
+static int no_dirty_cpu_schedulers_online;
+static int no_dirty_io_schedulers;
+#endif
#ifdef DEBUG
Uint32 verbose; /* See erl_debug.h for information about verbose */
@@ -189,6 +194,8 @@ int erts_disable_tolerant_timeofday; /* Time correction can be disabled it is
int erts_atom_table_size = ATOM_LIMIT; /* Maximum number of atoms */
+int erts_pd_initial_size = 10;
+
int erts_modified_timing_level;
int erts_no_crash_dump = 0; /* Use -d to suppress crash dump. */
@@ -304,7 +311,13 @@ erl_init(int ncpu,
erts_init_sys_common_misc();
erts_init_process(ncpu, proc_tab_sz, legacy_proc_tab);
erts_init_scheduling(no_schedulers,
- no_schedulers_online);
+ no_schedulers_online
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , no_dirty_cpu_schedulers,
+ no_dirty_cpu_schedulers_online,
+ no_dirty_io_schedulers
+#endif
+ );
erts_init_cpu_topology(); /* Must be after init_scheduling */
erts_init_gc(); /* Must be after init_scheduling */
erts_alloc_late_init();
@@ -313,7 +326,6 @@ erl_init(int ncpu,
BIN_VH_MIN_SIZE = erts_next_heap_size(BIN_VH_MIN_SIZE, 0);
erts_init_trace();
- erts_init_binary();
erts_init_bits();
erts_code_ix_init();
erts_init_fun_table();
@@ -326,6 +338,7 @@ erl_init(int ncpu,
erts_ddll_init();
init_emulator();
erts_ptab_init(); /* Must be after init_emulator() */
+ erts_init_binary(); /* Must be after init_emulator() */
erts_bp_init();
init_db(); /* Must be after init_emulator */
erts_bif_timer_init();
@@ -484,92 +497,111 @@ void erts_usage(void)
/* erts_fprintf(stderr, "-# number set the number of items to be used in traces etc\n"); */
- erts_fprintf(stderr, "-a size suggested stack size in kilo words for threads\n");
- erts_fprintf(stderr, " in the async-thread pool, valid range is [%d-%d]\n",
+ erts_fprintf(stderr, "-a size suggested stack size in kilo words for threads\n");
+ erts_fprintf(stderr, " in the async-thread pool, valid range is [%d-%d]\n",
ERTS_ASYNC_THREAD_MIN_STACK_SIZE,
ERTS_ASYNC_THREAD_MAX_STACK_SIZE);
- erts_fprintf(stderr, "-A number set number of threads in async thread pool,\n");
- erts_fprintf(stderr, " valid range is [0-%d]\n",
+ erts_fprintf(stderr, "-A number set number of threads in async thread pool,\n");
+ erts_fprintf(stderr, " valid range is [0-%d]\n",
ERTS_MAX_NO_OF_ASYNC_THREADS);
- erts_fprintf(stderr, "-B[c|d|i] c to have Ctrl-c interrupt the Erlang shell,\n");
- erts_fprintf(stderr, " d (or no extra option) to disable the break\n");
- erts_fprintf(stderr, " handler, i to ignore break signals\n");
+ erts_fprintf(stderr, "-B[c|d|i] c to have Ctrl-c interrupt the Erlang shell,\n");
+ erts_fprintf(stderr, " d (or no extra option) to disable the break\n");
+ erts_fprintf(stderr, " handler, i to ignore break signals\n");
/* erts_fprintf(stderr, "-b func set the boot function (default boot)\n"); */
- erts_fprintf(stderr, "-c disable continuous date/time correction with\n");
- erts_fprintf(stderr, " respect to uptime\n");
+ erts_fprintf(stderr, "-c disable continuous date/time correction with\n");
+ erts_fprintf(stderr, " respect to uptime\n");
- erts_fprintf(stderr, "-d don't write a crash dump for internally detected errors\n");
- erts_fprintf(stderr, " (halt(String) will still produce a crash dump)\n");
- erts_fprintf(stderr, "-fn[u|a|l] Control how filenames are interpreted\n");
- erts_fprintf(stderr, "-hms size set minimum heap size in words (default %d)\n",
+ erts_fprintf(stderr, "-d don't write a crash dump for internally detected errors\n");
+ erts_fprintf(stderr, " (halt(String) will still produce a crash dump)\n");
+ erts_fprintf(stderr, "-fn[u|a|l] Control how filenames are interpreted\n");
+ erts_fprintf(stderr, "-hms size set minimum heap size in words (default %d)\n",
H_DEFAULT_SIZE);
- erts_fprintf(stderr, "-hmbs size set minimum binary virtual heap size in words (default %d)\n",
+ erts_fprintf(stderr, "-hmbs size set minimum binary virtual heap size in words (default %d)\n",
VH_DEFAULT_SIZE);
+ erts_fprintf(stderr, "-hpds size initial process dictionary size (default %d)\n",
+ erts_pd_initial_size);
/* erts_fprintf(stderr, "-i module set the boot module (default init)\n"); */
- erts_fprintf(stderr, "-K boolean enable or disable kernel poll\n");
- erts_fprintf(stderr, "-n[s|a|d] Control behavior of signals to ports\n");
- erts_fprintf(stderr, " Note that this flag is deprecated!\n");
- erts_fprintf(stderr, "-M<X> <Y> memory allocator switches,\n");
- erts_fprintf(stderr, " see the erts_alloc(3) documentation for more info.\n");
- erts_fprintf(stderr, "-pc <set> Control what characters are considered printable (default latin1)\n");
- erts_fprintf(stderr, "-P number set maximum number of processes on this node,\n");
- erts_fprintf(stderr, " valid range is [%d-%d]\n",
+ erts_fprintf(stderr, "-K boolean enable or disable kernel poll\n");
+ erts_fprintf(stderr, "-n[s|a|d] Control behavior of signals to ports\n");
+ erts_fprintf(stderr, " Note that this flag is deprecated!\n");
+ erts_fprintf(stderr, "-M<X> <Y> memory allocator switches,\n");
+ erts_fprintf(stderr, " see the erts_alloc(3) documentation for more info.\n");
+ erts_fprintf(stderr, "-pc <set> Control what characters are considered printable (default latin1)\n");
+ erts_fprintf(stderr, "-P number set maximum number of processes on this node,\n");
+ erts_fprintf(stderr, " valid range is [%d-%d]\n",
ERTS_MIN_PROCESSES, ERTS_MAX_PROCESSES);
- erts_fprintf(stderr, "-Q number set maximum number of ports on this node,\n");
- erts_fprintf(stderr, " valid range is [%d-%d]\n",
+ erts_fprintf(stderr, "-Q number set maximum number of ports on this node,\n");
+ erts_fprintf(stderr, " valid range is [%d-%d]\n",
ERTS_MIN_PORTS, ERTS_MAX_PORTS);
- erts_fprintf(stderr, "-R number set compatibility release number,\n");
- erts_fprintf(stderr, " valid range [%d-%d]\n",
+ erts_fprintf(stderr, "-R number set compatibility release number,\n");
+ erts_fprintf(stderr, " valid range [%d-%d]\n",
this_rel-2, this_rel);
- erts_fprintf(stderr, "-r force ets memory block to be moved on realloc\n");
- erts_fprintf(stderr, "-rg amount set reader groups limit\n");
- erts_fprintf(stderr, "-sbt type set scheduler bind type, valid types are:\n");
- erts_fprintf(stderr, "-stbt type u|ns|ts|ps|s|nnts|nnps|tnnps|db\n");
- erts_fprintf(stderr, "-sbwt val set scheduler busy wait threshold, valid values are:\n");
- erts_fprintf(stderr, " none|very_short|short|medium|long|very_long.\n");
- erts_fprintf(stderr, "-scl bool enable/disable compaction of scheduler load,\n");
- erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
- erts_fprintf(stderr, "-sct cput set cpu topology,\n");
- erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
- erts_fprintf(stderr, "-sws val set scheduler wakeup strategy, valid values are:\n");
- erts_fprintf(stderr, " default|legacy.\n");
- erts_fprintf(stderr, "-swct val set scheduler wake cleanup threshold, valid values are:\n");
- erts_fprintf(stderr, " very_lazy|lazy|medium|eager|very_eager.\n");
- erts_fprintf(stderr, "-swt val set scheduler wakeup threshold, valid values are:\n");
- erts_fprintf(stderr, " very_low|low|medium|high|very_high.\n");
- erts_fprintf(stderr, "-sss size suggested stack size in kilo words for scheduler threads,\n");
- erts_fprintf(stderr, " valid range is [%d-%d]\n",
+ erts_fprintf(stderr, "-r force ets memory block to be moved on realloc\n");
+ erts_fprintf(stderr, "-rg amount set reader groups limit\n");
+ erts_fprintf(stderr, "-sbt type set scheduler bind type, valid types are:\n");
+ erts_fprintf(stderr, "-stbt type u|ns|ts|ps|s|nnts|nnps|tnnps|db\n");
+ erts_fprintf(stderr, "-sbwt val set scheduler busy wait threshold, valid values are:\n");
+ erts_fprintf(stderr, " none|very_short|short|medium|long|very_long.\n");
+ erts_fprintf(stderr, "-scl bool enable/disable compaction of scheduler load,\n");
+ erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
+ erts_fprintf(stderr, "-sct cput set cpu topology,\n");
+ erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
+ erts_fprintf(stderr, "-secio bool enable/disable eager check I/O scheduling,\n");
+ erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT
+ erts_fprintf(stderr, "-sub bool enable/disable scheduler utilization balancing,\n");
+#else
+ erts_fprintf(stderr, "-sub false disable scheduler utilization balancing,\n");
+#endif
+ erts_fprintf(stderr, " see the erl(1) documentation for more info.\n");
+ erts_fprintf(stderr, "-sws val set scheduler wakeup strategy, valid values are:\n");
+ erts_fprintf(stderr, " default|legacy.\n");
+ erts_fprintf(stderr, "-swct val set scheduler wake cleanup threshold, valid values are:\n");
+ erts_fprintf(stderr, " very_lazy|lazy|medium|eager|very_eager.\n");
+ erts_fprintf(stderr, "-swt val set scheduler wakeup threshold, valid values are:\n");
+ erts_fprintf(stderr, " very_low|low|medium|high|very_high.\n");
+ erts_fprintf(stderr, "-sss size suggested stack size in kilo words for scheduler threads,\n");
+ erts_fprintf(stderr, " valid range is [%d-%d]\n",
ERTS_SCHED_THREAD_MIN_STACK_SIZE,
ERTS_SCHED_THREAD_MAX_STACK_SIZE);
- erts_fprintf(stderr, "-spp Bool set port parallelism scheduling hint\n");
- erts_fprintf(stderr, "-S n1:n2 set number of schedulers (n1), and number of\n");
- erts_fprintf(stderr, " schedulers online (n2), maximum for both\n");
- erts_fprintf(stderr, " numbers is %d\n",
+ erts_fprintf(stderr, "-spp Bool set port parallelism scheduling hint\n");
+ erts_fprintf(stderr, "-S n1:n2 set number of schedulers (n1), and number of\n");
+ erts_fprintf(stderr, " schedulers online (n2), maximum for both\n");
+ erts_fprintf(stderr, " numbers is %d\n",
ERTS_MAX_NO_OF_SCHEDULERS);
- erts_fprintf(stderr, "-SP p1:p2 specify schedulers (p1) and schedulers online (p2)\n");
- erts_fprintf(stderr, " as percentages of logical processors configured and logical\n");
- erts_fprintf(stderr, " processors available, respectively\n");
- erts_fprintf(stderr, "-t size set the maximum number of atoms the "
- "emulator can handle\n");
- erts_fprintf(stderr, " valid range is [%d-%d]\n",
+ erts_fprintf(stderr, "-SP p1:p2 specify schedulers (p1) and schedulers online (p2)\n");
+ erts_fprintf(stderr, " as percentages of logical processors configured and logical\n");
+ erts_fprintf(stderr, " processors available, respectively\n");
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_fprintf(stderr, "-SDcpu n1:n2 set number of dirty CPU schedulers (n1), and number of\n");
+ erts_fprintf(stderr, " dirty CPU schedulers online (n2), valid range for both\n");
+ erts_fprintf(stderr, " numbers is [1-%d], and n2 must be less than or equal to n1\n",
+ ERTS_MAX_NO_OF_DIRTY_CPU_SCHEDULERS);
+ erts_fprintf(stderr, "-SDPcpu p1:p2 specify dirty CPU schedulers (p1) and dirty CPU schedulers\n");
+ erts_fprintf(stderr, " online (p2) as percentages of logical processors configured\n");
+ erts_fprintf(stderr, " and logical processors available, respectively\n");
+ erts_fprintf(stderr, "-SDio n set number of dirty I/O schedulers, valid range is [0-%d]\n",
+ ERTS_MAX_NO_OF_DIRTY_IO_SCHEDULERS);
+#endif
+ erts_fprintf(stderr, "-t size set the maximum number of atoms the emulator can handle\n");
+ erts_fprintf(stderr, " valid range is [%d-%d]\n",
MIN_ATOM_TABLE_SIZE, MAX_ATOM_TABLE_SIZE);
- erts_fprintf(stderr, "-T number set modified timing level,\n");
- erts_fprintf(stderr, " valid range is [0-%d]\n",
+ erts_fprintf(stderr, "-T number set modified timing level, valid range is [0-%d]\n",
ERTS_MODIFIED_TIMING_LEVELS-1);
- erts_fprintf(stderr, "-V print Erlang version\n");
+ erts_fprintf(stderr, "-V print Erlang version\n");
- erts_fprintf(stderr, "-v turn on chatty mode (GCs will be reported etc)\n");
+ erts_fprintf(stderr, "-v turn on chatty mode (GCs will be reported etc)\n");
- erts_fprintf(stderr, "-W<i|w> set error logger warnings mapping,\n");
- erts_fprintf(stderr, " see error_logger documentation for details\n");
- erts_fprintf(stderr, "-zdbbl size set the distribution buffer busy limit in kilobytes\n");
- erts_fprintf(stderr, " valid range is [1-%d]\n", INT_MAX/1024);
+ erts_fprintf(stderr, "-W<i|w> set error logger warnings mapping,\n");
+ erts_fprintf(stderr, " see error_logger documentation for details\n");
+ erts_fprintf(stderr, "-zdbbl size set the distribution buffer busy limit in kilobytes\n");
+ erts_fprintf(stderr, " valid range is [1-%d]\n", INT_MAX/1024);
erts_fprintf(stderr, "\n");
erts_fprintf(stderr, "Note that if the emulator is started with erlexec (typically\n");
erts_fprintf(stderr, "from the erl script), these flags should be specified with +.\n");
@@ -637,6 +669,13 @@ early_init(int *argc, char **argv) /*
int schdlrs_percentage = 100;
int schdlrs_onln_percentage = 100;
int max_main_threads;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ int dirty_cpu_scheds;
+ int dirty_cpu_scheds_online;
+ int dirty_cpu_scheds_pctg = 100;
+ int dirty_cpu_scheds_onln_pctg = 100;
+ int dirty_io_scheds;
+#endif
int max_reader_groups;
int reader_groups;
char envbuf[21]; /* enough for any 64-bit integer */
@@ -687,7 +726,7 @@ early_init(int *argc, char **argv) /*
#endif
#ifdef ERTS_SMP
erts_smp_atomic32_init_nob(&erts_writing_erl_crash_dump, 0L);
- erts_tsd_key_create(&erts_is_crash_dumping_key);
+ erts_tsd_key_create(&erts_is_crash_dumping_key,"erts_is_crash_dumping_key");
#else
erts_writing_erl_crash_dump = 0;
#endif
@@ -712,6 +751,12 @@ early_init(int *argc, char **argv) /*
schdlrs = no_schedulers;
schdlrs_onln = no_schedulers_online;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ dirty_cpu_scheds = no_schedulers;
+ dirty_cpu_scheds_online = no_schedulers_online;
+ dirty_io_scheds = 10;
+#endif
+
envbufsz = sizeof(envbuf);
/* erts_sys_getenv(_raw)() not initialized yet; need erts_sys_getenv__() */
@@ -752,7 +797,7 @@ early_init(int *argc, char **argv) /*
case 'A': {
/* set number of threads in thread pool */
char *arg = get_arg(argv[i]+2, argv[i+1], &i);
- if (((erts_async_max_threads = atoi(arg)) < 0) ||
+ if (((erts_async_max_threads = atoi(arg)) < ERTS_MIN_NO_OF_ASYNC_THREADS) ||
(erts_async_max_threads > ERTS_MAX_NO_OF_ASYNC_THREADS)) {
erts_fprintf(stderr,
"bad number of async threads %s\n",
@@ -802,7 +847,121 @@ early_init(int *argc, char **argv) /*
VERBOSE(DEBUG_SYSTEM,
("using %d:%d scheduler percentages\n",
schdlrs_percentage, schdlrs_onln_percentage));
- } else {
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (argv[i][2] == 'D') {
+ char *arg;
+ char *type = argv[i]+3;
+ if (strncmp(type, "Pcpu", 4) == 0) {
+ int ptot, ponln;
+ arg = get_arg(argv[i]+7, argv[i+1], &i);
+ switch (sscanf(arg, "%d:%d", &ptot, &ponln)) {
+ case 0:
+ switch (sscanf(arg, ":%d", &ponln)) {
+ case 1:
+ if (ponln < 0)
+ goto bad_SDPcpu;
+ ptot = 100;
+ goto chk_SDPcpu;
+ default:
+ goto bad_SDPcpu;
+ }
+ case 1:
+ if (ptot < 0)
+ goto bad_SDPcpu;
+ ponln = ptot < 100 ? ptot : 100;
+ goto chk_SDPcpu;
+ case 2:
+ if (ptot < 0 || ponln < 0)
+ goto bad_SDPcpu;
+ chk_SDPcpu:
+ dirty_cpu_scheds_pctg = ptot;
+ dirty_cpu_scheds_onln_pctg = ponln;
+ break;
+ default:
+ bad_SDPcpu:
+ erts_fprintf(stderr,
+ "bad dirty CPU schedulers percentage specifier %s\n",
+ arg);
+ erts_usage();
+ break;
+ }
+ VERBOSE(DEBUG_SYSTEM,
+ ("using %d:%d dirty CPU scheduler percentages\n",
+ dirty_cpu_scheds_pctg, dirty_cpu_scheds_onln_pctg));
+ } else if (strncmp(type, "cpu", 3) == 0) {
+ int tot, onln;
+ arg = get_arg(argv[i]+6, argv[i+1], &i);
+ switch (sscanf(arg, "%d:%d", &tot, &onln)) {
+ case 0:
+ switch (sscanf(arg, ":%d", &onln)) {
+ case 1:
+ tot = no_schedulers;
+ goto chk_SDcpu;
+ default:
+ goto bad_SDcpu;
+ }
+ case 1:
+ onln = tot < dirty_cpu_scheds_online ?
+ tot : dirty_cpu_scheds_online;
+ case 2:
+ chk_SDcpu:
+ if (tot > 0)
+ dirty_cpu_scheds = tot;
+ else
+ dirty_cpu_scheds = no_schedulers + tot;
+ if (onln > 0)
+ dirty_cpu_scheds_online = onln;
+ else
+ dirty_cpu_scheds_online = no_schedulers_online + onln;
+ if (dirty_cpu_scheds < 1 ||
+ ERTS_MAX_NO_OF_DIRTY_CPU_SCHEDULERS < dirty_cpu_scheds) {
+ erts_fprintf(stderr,
+ "bad amount of dirty CPU schedulers %d\n",
+ tot);
+ erts_usage();
+ }
+ if (dirty_cpu_scheds_online < 1 ||
+ dirty_cpu_scheds < dirty_cpu_scheds_online) {
+ erts_fprintf(stderr,
+ "bad amount of dirty CPU schedulers online %d "
+ "(total amount of dirty CPU schedulers %d)\n",
+ dirty_cpu_scheds_online, dirty_cpu_scheds);
+ erts_usage();
+ }
+ break;
+ default:
+ bad_SDcpu:
+ erts_fprintf(stderr,
+ "bad amount of dirty CPU schedulers %s\n",
+ arg);
+ erts_usage();
+ break;
+ }
+ VERBOSE(DEBUG_SYSTEM,
+ ("using %d:%d dirty CPU scheduler(s)\n", tot, onln));
+ } else if (strncmp(type, "io", 2) == 0) {
+ arg = get_arg(argv[i]+5, argv[i+1], &i);
+ dirty_io_scheds = atoi(arg);
+ if (dirty_io_scheds < 0 ||
+ dirty_io_scheds > ERTS_MAX_NO_OF_DIRTY_IO_SCHEDULERS) {
+ erts_fprintf(stderr,
+ "bad number of dirty I/O schedulers %s\n",
+ arg);
+ erts_usage();
+ }
+ VERBOSE(DEBUG_SYSTEM,
+ ("using %d dirty I/O scheduler(s)\n", dirty_io_scheds));
+ } else {
+ erts_fprintf(stderr,
+ "bad or missing dirty scheduler specifier: %s\n",
+ argv[i]);
+ erts_usage();
+ break;
+ }
+ }
+#endif
+ else {
int tot, onln;
char *arg = get_arg(argv[i]+2, argv[i+1], &i);
switch (sscanf(arg, "%d:%d", &tot, &onln)) {
@@ -889,6 +1048,17 @@ early_init(int *argc, char **argv) /*
(void)schdlrs_percentage;
(void)schdlrs_onln_percentage;
#endif
+#ifdef ERTS_DIRTY_SCHEDULERS
+ /* apply any dirty scheduler precentages */
+ if (dirty_cpu_scheds_pctg != 100 || dirty_cpu_scheds_onln_pctg != 100) {
+ dirty_cpu_scheds = dirty_cpu_scheds * dirty_cpu_scheds_pctg / 100;
+ dirty_cpu_scheds_online = dirty_cpu_scheds_online * dirty_cpu_scheds_onln_pctg / 100;
+ }
+ if (dirty_cpu_scheds > schdlrs)
+ dirty_cpu_scheds = schdlrs;
+ if (dirty_cpu_scheds_online > schdlrs_onln)
+ dirty_cpu_scheds_online = schdlrs_onln;
+#endif
}
#ifndef USE_THREADS
@@ -901,6 +1071,11 @@ early_init(int *argc, char **argv) /*
erts_no_schedulers = (Uint) no_schedulers;
#endif
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_no_dirty_cpu_schedulers = no_dirty_cpu_schedulers = dirty_cpu_scheds;
+ no_dirty_cpu_schedulers_online = dirty_cpu_scheds_online;
+ erts_no_dirty_io_schedulers = no_dirty_io_schedulers = dirty_io_scheds;
+#endif
erts_early_init_scheduling(no_schedulers);
alloc_opts.ncpu = ncpu;
@@ -918,10 +1093,18 @@ early_init(int *argc, char **argv) /*
*
* * Unmanaged threads that need to register:
* ** Async threads (see erl_async.c)
+ * ** Dirty scheduler threads
*/
erts_thr_progress_init(no_schedulers,
no_schedulers+2,
- erts_async_max_threads);
+#ifndef ERTS_DIRTY_SCHEDULERS
+ erts_async_max_threads
+#else
+ erts_async_max_threads +
+ erts_no_dirty_cpu_schedulers +
+ erts_no_dirty_io_schedulers
+#endif
+ );
#endif
erts_thr_q_init();
erts_init_utils();
@@ -1229,6 +1412,7 @@ erl_start(int argc, char **argv)
*
* h|ms - min_heap_size
* h|mbs - min_bin_vheap_size
+ * h|pds - erts_pd_initial_size
*
*/
if (has_prefix("mbs", sub_param)) {
@@ -1246,6 +1430,14 @@ erl_start(int argc, char **argv)
erts_usage();
}
VERBOSE(DEBUG_SYSTEM, ("using minimum heap size %d\n", H_MIN_SIZE));
+ } else if (has_prefix("pds", sub_param)) {
+ arg = get_arg(sub_param+3, argv[i+1], &i);
+ if ((erts_pd_initial_size = atoi(arg)) <= 0) {
+ erts_fprintf(stderr, "bad initial process dictionary size %s\n", arg);
+ erts_usage();
+ }
+ VERBOSE(DEBUG_SYSTEM, ("using initial process dictionary size %d\n",
+ erts_pd_initial_size));
} else {
/* backward compatibility */
arg = get_arg(argv[i]+2, argv[i+1], &i);
@@ -1386,7 +1578,15 @@ erl_start(int argc, char **argv)
break;
case 'S' : /* Was handled in early_init() just read past it */
- if (argv[i][2] == 'P')
+ if (argv[i][2] == 'D') {
+ char* type = argv[i]+3;
+ if (strcmp(type, "Pcpu") == 0)
+ (void) get_arg(argv[i]+7, argv[i+1], &i);
+ if (strcmp(type, "cpu") == 0)
+ (void) get_arg(argv[i]+6, argv[i+1], &i);
+ else if (strcmp(type, "io") == 0)
+ (void) get_arg(argv[i]+5, argv[i+1], &i);
+ } else if (argv[i][2] == 'P')
(void) get_arg(argv[i]+3, argv[i+1], &i);
else
(void) get_arg(argv[i]+2, argv[i+1], &i);
@@ -1433,8 +1633,10 @@ erl_start(int argc, char **argv)
}
else if (has_prefix("cl", sub_param)) {
arg = get_arg(sub_param+2, argv[i+1], &i);
- if (sys_strcmp("true", arg) == 0)
+ if (sys_strcmp("true", arg) == 0) {
erts_sched_compact_load = 1;
+ erts_sched_balance_util = 0;
+ }
else if (sys_strcmp("false", arg) == 0)
erts_sched_compact_load = 0;
else {
@@ -1487,6 +1689,22 @@ erl_start(int argc, char **argv)
erts_usage();
}
}
+ else if (has_prefix("ecio", sub_param)) {
+ arg = get_arg(sub_param+4, argv[i+1], &i);
+#ifndef __OSE__
+ if (sys_strcmp("true", arg) == 0)
+ erts_eager_check_io = 1;
+ else
+#endif
+ if (sys_strcmp("false", arg) == 0)
+ erts_eager_check_io = 0;
+ else {
+ erts_fprintf(stderr,
+ "bad schedule eager check I/O value '%s'\n",
+ arg);
+ erts_usage();
+ }
+ }
else if (has_prefix("pp", sub_param)) {
arg = get_arg(sub_param+2, argv[i+1], &i);
if (sys_strcmp(arg, "true") == 0)
@@ -1512,6 +1730,26 @@ erl_start(int argc, char **argv)
erts_usage();
}
}
+ else if (has_prefix("ub", sub_param)) {
+ arg = get_arg(sub_param+2, argv[i+1], &i);
+ if (sys_strcmp("true", arg) == 0) {
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT
+ erts_sched_balance_util = 1;
+#else
+ erts_fprintf(stderr,
+ "scheduler utilization balancing not "
+ "supported on this system\n");
+ erts_usage();
+#endif
+ }
+ else if (sys_strcmp("false", arg) == 0)
+ erts_sched_balance_util = 0;
+ else {
+ erts_fprintf(stderr, "bad scheduler utilization balancing "
+ " value '%s'\n", arg);
+ erts_usage();
+ }
+ }
else if (has_prefix("wct", sub_param)) {
arg = get_arg(sub_param+3, argv[i+1], &i);
if (erts_sched_set_wake_cleanup_threshold(arg) != 0) {
@@ -1859,8 +2097,10 @@ erl_exit_vv(int n, int flush_async, char *fmt, va_list args1, va_list args2)
system_cleanup(flush_async);
save_statistics();
-
- an = abs(n);
+ if (n < 0)
+ an = -(unsigned int)n;
+ else
+ an = n;
if (erts_mtrace_enabled)
erts_mtrace_exit((Uint32) an);
diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c
index 0dd83fa6ed..b105ece6f1 100644
--- a/erts/emulator/beam/erl_lock_check.c
+++ b/erts/emulator/beam/erl_lock_check.c
@@ -123,6 +123,9 @@ static erts_lc_lock_order_t erts_lock_order[] = {
{ "schdlr_sspnd", NULL },
{ "migration_info_update", NULL },
{ "run_queue", "address" },
+#ifdef ERTS_DIRTY_SCHEDULERS
+ { "dirty_run_queue_sleep_list", "address" },
+#endif
{ "process_table", NULL },
{ "cpu_info", NULL },
{ "pollset", "address" },
@@ -136,7 +139,6 @@ static erts_lc_lock_order_t erts_lock_order[] = {
{ "drv_tsd", NULL },
{ "async_enq_mtx", NULL },
#ifdef ERTS_SMP
- { "sys_msg_q", NULL },
{ "atom_tab", NULL },
{ "make_ref", NULL },
{ "misc_op_list_pre_alloc_lock", "address" },
@@ -145,6 +147,7 @@ static erts_lc_lock_order_t erts_lock_order[] = {
{ "btm_pre_alloc_lock", NULL, },
{ "dist_entry_out_queue", "address" },
{ "port_sched_lock", "port_id" },
+ { "sys_msg_q", NULL },
{ "port_table", NULL },
#endif
{ "mtrace_op", NULL },
@@ -224,8 +227,7 @@ rw_op_str(Uint16 flags)
case ERTS_LC_FLG_LO_READ:
return " (r)";
case ERTS_LC_FLG_LO_WRITE:
- erts_fprintf(stderr, "\nInternal error\n");
- lc_abort();
+ ERTS_INTERNAL_ERROR("Only write flag present");
default:
break;
}
@@ -238,6 +240,8 @@ struct erts_lc_locked_lock_t_ {
erts_lc_locked_lock_t *prev;
UWord extra;
Sint16 id;
+ char *file;
+ unsigned int line;
Uint16 flags;
};
@@ -265,9 +269,9 @@ union erts_lc_free_block_t_ {
static ethr_tsd_key locks_key;
-static erts_lc_locked_locks_t *erts_locked_locks;
+static erts_lc_locked_locks_t *erts_locked_locks = NULL;
-static erts_lc_free_block_t *free_blocks;
+static erts_lc_free_block_t *free_blocks = NULL;
#ifdef ERTS_LC_STATIC_ALLOC
#define ERTS_LC_FB_CHUNK_SIZE 10000
@@ -306,8 +310,7 @@ static ERTS_INLINE void lc_free(void *p)
static void *lc_core_alloc(void)
{
lc_unlock();
- erts_fprintf(stderr, "Lock checker out of memory!\n");
- lc_abort();
+ ERTS_INTERNAL_ERROR("Lock checker out of memory!\n");
}
#else
@@ -320,8 +323,7 @@ static void *lc_core_alloc(void)
fbs = (erts_lc_free_block_t *) malloc(sizeof(erts_lc_free_block_t)
* ERTS_LC_FB_CHUNK_SIZE);
if (!fbs) {
- erts_fprintf(stderr, "Lock checker failed to allocate memory!\n");
- lc_abort();
+ ERTS_INTERNAL_ERROR("Lock checker failed to allocate memory!");
}
for (i = 1; i < ERTS_LC_FB_CHUNK_SIZE - 1; i++) {
#ifdef DEBUG
@@ -361,11 +363,11 @@ create_locked_locks(char *thread_name)
{
erts_lc_locked_locks_t *l_lcks = malloc(sizeof(erts_lc_locked_locks_t));
if (!l_lcks)
- lc_abort();
+ ERTS_INTERNAL_ERROR("Lock checker failed to allocate memory!");
l_lcks->thread_name = strdup(thread_name ? thread_name : "unknown");
if (!l_lcks->thread_name)
- lc_abort();
+ ERTS_INTERNAL_ERROR("Lock checker failed to allocate memory!");
l_lcks->emu_thread = 0;
l_lcks->tid = erts_thr_self();
@@ -427,47 +429,51 @@ make_my_locked_locks(void)
}
static ERTS_INLINE erts_lc_locked_lock_t *
-new_locked_lock(erts_lc_lock_t *lck, Uint16 op_flags)
+new_locked_lock(erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line)
{
erts_lc_locked_lock_t *l_lck = (erts_lc_locked_lock_t *) lc_alloc();
l_lck->next = NULL;
l_lck->prev = NULL;
l_lck->id = lck->id;
l_lck->extra = lck->extra;
+ l_lck->file = file;
+ l_lck->line = line;
l_lck->flags = lck->flags | op_flags;
return l_lck;
}
static void
-print_lock2(char *prefix, Sint16 id, Wterm extra, Uint16 flags, char *suffix)
+raw_print_lock(char *prefix, Sint16 id, Wterm extra, Uint16 flags,
+ char* file, unsigned int line, char *suffix)
{
char *lname = (0 <= id && id < ERTS_LOCK_ORDER_SIZE
? erts_lock_order[id].name
: "unknown");
+ erts_fprintf(stderr,"%s'%s:",prefix,lname);
+
if (is_not_immed(extra))
- erts_fprintf(stderr,
- "%s'%s:%p%s'%s%s",
- prefix,
- lname,
- _unchecked_boxed_val(extra),
- lock_type(flags),
- rw_op_str(flags),
- suffix);
+ erts_fprintf(stderr,"%p",_unchecked_boxed_val(extra));
else
- erts_fprintf(stderr,
- "%s'%s:%T%s'%s%s",
- prefix,
- lname,
- extra,
- lock_type(flags),
- rw_op_str(flags),
- suffix);
+ erts_fprintf(stderr,"%T",extra);
+ erts_fprintf(stderr,"%s",lock_type(flags));
+
+ if (file)
+ erts_fprintf(stderr,"(%s:%d)",file,line);
+
+ erts_fprintf(stderr,"'%s%s",rw_op_str(flags),suffix);
+}
+
+static void
+print_lock2(char *prefix, Sint16 id, Wterm extra, Uint16 flags, char *suffix)
+{
+ raw_print_lock(prefix, id, extra, flags, NULL, 0, suffix);
}
static void
print_lock(char *prefix, erts_lc_lock_t *lck, char *suffix)
{
- print_lock2(prefix, lck->id, lck->extra, lck->flags, suffix);
+ raw_print_lock(prefix, lck->id, lck->extra, lck->flags, NULL, 0, suffix);
}
static void
@@ -483,7 +489,8 @@ print_curr_locks(erts_lc_locked_locks_t *l_lcks)
"Currently these locks are locked by the %s thread:\n",
l_lcks->thread_name);
for (l_lck = l_lcks->locked.first; l_lck; l_lck = l_lck->next)
- print_lock2(" ", l_lck->id, l_lck->extra, l_lck->flags, "\n");
+ raw_print_lock(" ", l_lck->id, l_lck->extra, l_lck->flags,
+ l_lck->file, l_lck->line, "\n");
}
}
@@ -681,7 +688,7 @@ erts_lc_set_thread_name(char *thread_name)
free((void *) l_lcks->thread_name);
l_lcks->thread_name = strdup(thread_name ? thread_name : "unknown");
if (!l_lcks->thread_name)
- lc_abort();
+ ERTS_INTERNAL_ERROR("strdup failed");
}
l_lcks->emu_thread = 1;
}
@@ -999,7 +1006,8 @@ erts_lc_trylock_force_busy_flg(erts_lc_lock_t *lck, Uint16 op_flags)
#endif
}
-void erts_lc_trylock_flg(int locked, erts_lc_lock_t *lck, Uint16 op_flags)
+void erts_lc_trylock_flg_x(int locked, erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line)
{
erts_lc_locked_locks_t *l_lcks;
erts_lc_locked_lock_t *l_lck;
@@ -1011,7 +1019,7 @@ void erts_lc_trylock_flg(int locked, erts_lc_lock_t *lck, Uint16 op_flags)
return;
l_lcks = make_my_locked_locks();
- l_lck = locked ? new_locked_lock(lck, op_flags) : NULL;
+ l_lck = locked ? new_locked_lock(lck, op_flags, file, line) : NULL;
if (!l_lcks->locked.last) {
ASSERT(!l_lcks->locked.first);
@@ -1052,13 +1060,14 @@ void erts_lc_trylock_flg(int locked, erts_lc_lock_t *lck, Uint16 op_flags)
}
-void erts_lc_require_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags)
+void erts_lc_require_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line)
{
erts_lc_locked_locks_t *l_lcks = make_my_locked_locks();
erts_lc_locked_lock_t *l_lck = l_lcks->locked.first;
if (!find_lock(&l_lck, lck))
required_not_locked(l_lcks, lck);
- l_lck = new_locked_lock(lck, op_flags);
+ l_lck = new_locked_lock(lck, op_flags, file, line);
if (!l_lcks->required.last) {
ASSERT(!l_lcks->required.first);
l_lck->next = l_lck->prev = NULL;
@@ -1126,7 +1135,8 @@ void erts_lc_unrequire_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags)
lc_free((void *) l_lck);
}
-void erts_lc_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags)
+void erts_lc_lock_flg_x(erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line)
{
erts_lc_locked_locks_t *l_lcks;
erts_lc_locked_lock_t *l_lck;
@@ -1138,7 +1148,7 @@ void erts_lc_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags)
return;
l_lcks = make_my_locked_locks();
- l_lck = new_locked_lock(lck, op_flags);
+ l_lck = new_locked_lock(lck, op_flags, file, line);
if (!l_lcks->locked.last) {
ASSERT(!l_lcks->locked.first);
@@ -1229,15 +1239,15 @@ erts_lc_trylock_force_busy(erts_lc_lock_t *lck)
}
void
-erts_lc_trylock(int locked, erts_lc_lock_t *lck)
+erts_lc_trylock_x(int locked, erts_lc_lock_t *lck, char *file, unsigned int line)
{
- erts_lc_trylock_flg(locked, lck, 0);
+ erts_lc_trylock_flg_x(locked, lck, 0, file, line);
}
void
-erts_lc_lock(erts_lc_lock_t *lck)
+erts_lc_lock_x(erts_lc_lock_t *lck, char *file, unsigned int line)
{
- erts_lc_lock_flg(lck, 0);
+ erts_lc_lock_flg_x(lck, 0, file, line);
}
void
@@ -1251,9 +1261,9 @@ void erts_lc_might_unlock(erts_lc_lock_t *lck)
erts_lc_might_unlock_flg(lck, 0);
}
-void erts_lc_require_lock(erts_lc_lock_t *lck)
+void erts_lc_require_lock(erts_lc_lock_t *lck, char *file, unsigned int line)
{
- erts_lc_require_lock_flg(lck, 0);
+ erts_lc_require_lock_flg(lck, 0, file, line);
}
void erts_lc_unrequire_lock(erts_lc_lock_t *lck)
@@ -1317,9 +1327,9 @@ erts_lc_init(void)
#endif /* #ifdef ERTS_LC_STATIC_ALLOC */
if (ethr_spinlock_init(&free_blocks_lock) != 0)
- lc_abort();
+ ERTS_INTERNAL_ERROR("spinlock_init failed");
- erts_tsd_key_create(&locks_key);
+ erts_tsd_key_create(&locks_key,"erts_lock_check_key");
}
void
diff --git a/erts/emulator/beam/erl_lock_check.h b/erts/emulator/beam/erl_lock_check.h
index 068340abe7..3f7f417e61 100644
--- a/erts/emulator/beam/erl_lock_check.h
+++ b/erts/emulator/beam/erl_lock_check.h
@@ -35,6 +35,11 @@
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifndef ERTS_ENABLE_LOCK_POSITION
+/* Enable in order for _x variants of mtx functions to be used. */
+#define ERTS_ENABLE_LOCK_POSITION 1
+#endif
+
typedef struct {
int inited;
Sint16 id;
@@ -79,13 +84,16 @@ void erts_lc_have_locks(int *resv, erts_lc_lock_t *lcks, int len);
void erts_lc_have_lock_ids(int *resv, int *ids, int len);
void erts_lc_check_no_locked_of_type(Uint16 flags);
int erts_lc_trylock_force_busy_flg(erts_lc_lock_t *lck, Uint16 op_flags);
-void erts_lc_trylock_flg(int locked, erts_lc_lock_t *lck, Uint16 op_flags);
-void erts_lc_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags);
+void erts_lc_trylock_flg_x(int locked, erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line);
+void erts_lc_lock_flg_x(erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line);
void erts_lc_unlock_flg(erts_lc_lock_t *lck, Uint16 op_flags);
void erts_lc_might_unlock_flg(erts_lc_lock_t *lck, Uint16 op_flags);
int erts_lc_trylock_force_busy(erts_lc_lock_t *lck);
-void erts_lc_trylock(int locked, erts_lc_lock_t *lck);
-void erts_lc_lock(erts_lc_lock_t *lck);
+void erts_lc_trylock_x(int locked, erts_lc_lock_t *lck,
+ char* file, unsigned int line);
+void erts_lc_lock_x(erts_lc_lock_t *lck, char* file, unsigned int line);
void erts_lc_unlock(erts_lc_lock_t *lck);
void erts_lc_might_unlock(erts_lc_lock_t *lck);
void erts_lc_init_lock(erts_lc_lock_t *lck, char *name, Uint16 flags);
@@ -96,10 +104,11 @@ int erts_lc_assert_failed(char *file, int line, char *assertion);
void erts_lc_set_thread_name(char *thread_name);
void erts_lc_pll(void);
-void erts_lc_require_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags);
+void erts_lc_require_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags,
+ char *file, unsigned int line);
void erts_lc_unrequire_lock_flg(erts_lc_lock_t *lck, Uint16 op_flags);
-void erts_lc_require_lock(erts_lc_lock_t *lck);
+void erts_lc_require_lock(erts_lc_lock_t *lck, char *file, unsigned int line);
void erts_lc_unrequire_lock(erts_lc_lock_t *lck);
int erts_lc_is_emu_thr(void);
@@ -116,4 +125,9 @@ int erts_lc_is_emu_thr(void);
#define ERTS_LC_ASSERT(A) ((void) 1)
#endif /* #ifdef ERTS_ENABLE_LOCK_CHECK */
+#define erts_lc_lock(lck) erts_lc_lock_x(lck,__FILE__,__LINE__)
+#define erts_lc_trylock(res,lck) erts_lc_trylock_x(res,lck,__FILE__,__LINE__)
+#define erts_lc_lock_flg(lck) erts_lc_lock_flg_x(lck,__FILE__,__LINE__)
+#define erts_lc_trylock_flg(res,lck) erts_lc_trylock_flg_x(res,lck,__FILE__,__LINE__)
+
#endif /* #ifndef ERTS_LOCK_CHECK_H__ */
diff --git a/erts/emulator/beam/erl_lock_count.c b/erts/emulator/beam/erl_lock_count.c
index 5f75b0ac0b..cf6996ea06 100644
--- a/erts/emulator/beam/erl_lock_count.c
+++ b/erts/emulator/beam/erl_lock_count.c
@@ -61,6 +61,25 @@ static ERTS_INLINE void lcnt_unlock(void) {
ethr_mutex_unlock(&lcnt_data_lock);
}
+const int log2_tab64[64] = {
+ 63, 0, 58, 1, 59, 47, 53, 2,
+ 60, 39, 48, 27, 54, 33, 42, 3,
+ 61, 51, 37, 40, 49, 18, 28, 20,
+ 55, 30, 34, 11, 43, 14, 22, 4,
+ 62, 57, 46, 52, 38, 26, 32, 41,
+ 50, 36, 17, 19, 29, 10, 13, 21,
+ 56, 45, 25, 31, 35, 16, 9, 12,
+ 44, 24, 15, 8, 23, 7, 6, 5};
+
+static ERTS_INLINE int lcnt_log2(Uint64 v) {
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v |= v >> 32;
+ return log2_tab64[((Uint64)((v - (v >> 1))*0x07EDD5E59A4E28C2)) >> 58];
+}
static char* lcnt_lock_type(Uint16 flag) {
switch(flag & ERTS_LCNT_LT_ALL) {
@@ -81,19 +100,20 @@ static void lcnt_clear_stats(erts_lcnt_lock_stats_t *stats) {
stats->timer_n = 0;
stats->file = (char *)str_undefined;
stats->line = 0;
+ sys_memzero(stats->hist.ns, sizeof(stats->hist.ns));
}
static void lcnt_time(erts_lcnt_time_t *time) {
-#ifdef HAVE_GETHRTIME
+#if 0 || defined(HAVE_GETHRTIME)
SysHrTime hr_time;
hr_time = sys_gethrtime();
time->s = (unsigned long)(hr_time / 1000000000LL);
time->ns = (unsigned long)(hr_time - 1000000000LL*time->s);
-#else
- SysTimeval tv;
- sys_gettimeofday(&tv);
- time->s = tv.tv_sec;
- time->ns = tv.tv_usec*1000LL;
+#else
+ SysTimeval tv;
+ sys_gettimeofday(&tv);
+ time->s = tv.tv_sec;
+ time->ns = tv.tv_usec*1000LL;
#endif
}
@@ -111,28 +131,29 @@ static void lcnt_time_diff(erts_lcnt_time_t *d, erts_lcnt_time_t *t1, erts_lcnt_
dns += 1000000000LL;
}
+ ASSERT(ds >= 0);
+
d->s = ds;
d->ns = dns;
}
-/* difference d must be positive */
+/* difference d must be non-negative */
static void lcnt_time_add(erts_lcnt_time_t *t, erts_lcnt_time_t *d) {
- unsigned long ngns = 0;
-
t->s += d->s;
t->ns += d->ns;
- ngns = t->ns / 1000000000LL;
+ t->s += t->ns / 1000000000LL;
t->ns = t->ns % 1000000000LL;
-
- t->s += ngns;
}
static erts_lcnt_thread_data_t *lcnt_thread_data_alloc(void) {
erts_lcnt_thread_data_t *eltd;
eltd = (erts_lcnt_thread_data_t*)malloc(sizeof(erts_lcnt_thread_data_t));
+ if (!eltd) {
+ ERTS_INTERNAL_ERROR("Lock counter failed to allocate memory!");
+ }
eltd->timer_set = 0;
eltd->lock_in_conflict = 0;
@@ -158,59 +179,64 @@ static char* lock_opt(Uint16 flag) {
return "--";
}
-static void print_lock_x(erts_lcnt_lock_t *lock, Uint16 flag, char *action, char *extra) {
- erts_aint_t colls, tries, w_state, r_state;
- erts_lcnt_lock_stats_t *stats = NULL;
-
+static void print_lock_x(erts_lcnt_lock_t *lock, Uint16 flag, char *action) {
+ erts_aint_t w_state, r_state;
char *type;
- int i;
-
+
+ if (strcmp(lock->name, "run_queue") != 0) return;
type = lcnt_lock_type(lock->flag);
r_state = ethr_atomic_read(&lock->r_state);
w_state = ethr_atomic_read(&lock->w_state);
-
if (lock->flag & flag) {
- erts_printf("%20s [%30s] [r/w state %4ld/%4ld] id %T %s\r\n",
- action,
- lock->name,
- r_state,
- w_state,
- lock->id,
- extra);
+ erts_fprintf(stderr,"%10s [%24s] [r/w state %4ld/%4ld] %2s id %T\r\n",
+ action,
+ lock->name,
+ r_state,
+ w_state,
+ type,
+ lock->id);
}
}
-
-static void print_lock(erts_lcnt_lock_t *lock, char *action) {
- if (strcmp(lock->name, "proc_main") == 0) {
- print_lock_x(lock, ERTS_LCNT_LT_ALL, action, "");
- }
-}
-
#endif
static erts_lcnt_lock_stats_t *lcnt_get_lock_stats(erts_lcnt_lock_t *lock, char *file, unsigned int line) {
unsigned int i;
erts_lcnt_lock_stats_t *stats = NULL;
-
- for (i = 0; i < lock->n_stats; i++) {
- if ((lock->stats[i].file == file) && (lock->stats[i].line == line)) {
- return &(lock->stats[i]);
- }
- }
- if (lock->n_stats < ERTS_LCNT_MAX_LOCK_LOCATIONS) {
- stats = &lock->stats[lock->n_stats];
- lock->n_stats++;
- stats->file = file;
- stats->line = line;
- return stats;
+ if (erts_lcnt_rt_options & ERTS_LCNT_OPT_LOCATION) {
+ for (i = 0; i < lock->n_stats; i++) {
+ if ((lock->stats[i].file == file) && (lock->stats[i].line == line)) {
+ return &(lock->stats[i]);
+ }
+ }
+ if (lock->n_stats < ERTS_LCNT_MAX_LOCK_LOCATIONS) {
+ stats = &lock->stats[lock->n_stats];
+ lock->n_stats++;
+ stats->file = file;
+ stats->line = line;
+ return stats;
+ }
}
return &lock->stats[0];
+}
+static void lcnt_update_stats_hist(erts_lcnt_hist_t *hist, erts_lcnt_time_t *time_wait) {
+ int idx;
+ unsigned long r;
+
+ if (time_wait->s > 0 || time_wait->ns > ERTS_LCNT_HISTOGRAM_MAX_NS) {
+ idx = ERTS_LCNT_HISTOGRAM_SLOT_SIZE - 1;
+ } else {
+ r = time_wait->ns >> ERTS_LCNT_HISTOGRAM_RSHIFT;
+ if (r) idx = lcnt_log2(r);
+ else idx = 0;
+ }
+ hist->ns[idx]++;
}
-static void lcnt_update_stats(erts_lcnt_lock_stats_t *stats, int lock_in_conflict, erts_lcnt_time_t *time_wait) {
+static void lcnt_update_stats(erts_lcnt_lock_stats_t *stats, int lock_in_conflict,
+ erts_lcnt_time_t *time_wait) {
ethr_atomic_inc(&stats->tries);
@@ -220,6 +246,7 @@ static void lcnt_update_stats(erts_lcnt_lock_stats_t *stats, int lock_in_conflic
if (time_wait) {
lcnt_time_add(&(stats->timer), time_wait);
stats->timer_n++;
+ lcnt_update_stats_hist(&stats->hist,time_wait);
}
}
@@ -236,7 +263,7 @@ void erts_lcnt_init() {
/* init tsd */
lcnt_n_thr = 0;
- ethr_tsd_key_create(&lcnt_thr_data_key);
+ ethr_tsd_key_create(&lcnt_thr_data_key,"lcnt_data");
lcnt_lock();
@@ -248,6 +275,9 @@ void erts_lcnt_init() {
/* init lcnt structure */
erts_lcnt_data = (erts_lcnt_data_t*)malloc(sizeof(erts_lcnt_data_t));
+ if (!erts_lcnt_data) {
+ ERTS_INTERNAL_ERROR("Lock counter failed to allocate memory!");
+ }
erts_lcnt_data->current_locks = erts_lcnt_list_init();
erts_lcnt_data->deleted_locks = erts_lcnt_list_init();
@@ -269,6 +299,9 @@ erts_lcnt_lock_list_t *erts_lcnt_list_init(void) {
erts_lcnt_lock_list_t *list;
list = (erts_lcnt_lock_list_t*)malloc(sizeof(erts_lcnt_lock_list_t));
+ if (!list) {
+ ERTS_INTERNAL_ERROR("Lock counter failed to allocate memory!");
+ }
list->head = NULL;
list->tail = NULL;
list->n = 0;
@@ -330,8 +363,9 @@ void erts_lcnt_list_delete(erts_lcnt_lock_list_t *list, erts_lcnt_lock_t *lock)
/* interface to erl_threads.h */
/* only lock on init and destroy, all others should use atomics */
void erts_lcnt_init_lock(erts_lcnt_lock_t *lock, char *name, Uint16 flag ) {
- erts_lcnt_init_lock_x(lock, name, flag, am_undefined);
+ erts_lcnt_init_lock_x(lock, name, flag, NIL);
}
+
void erts_lcnt_init_lock_x(erts_lcnt_lock_t *lock, char *name, Uint16 flag, Eterm id) {
int i;
if (!name) {
@@ -360,7 +394,6 @@ void erts_lcnt_init_lock_x(erts_lcnt_lock_t *lock, char *name, Uint16 flag, Eter
}
erts_lcnt_list_insert(erts_lcnt_data->current_locks, lock);
-
lcnt_unlock();
}
@@ -375,6 +408,9 @@ void erts_lcnt_destroy_lock(erts_lcnt_lock_t *lock) {
/* copy structure and insert the copy */
deleted_lock = (erts_lcnt_lock_t*)malloc(sizeof(erts_lcnt_lock_t));
+ if (!deleted_lock) {
+ ERTS_INTERNAL_ERROR("Lock counter failed to allocate memory!");
+ }
memcpy(deleted_lock, lock, sizeof(erts_lcnt_lock_t));
deleted_lock->next = NULL;
@@ -417,8 +453,9 @@ void erts_lcnt_lock_opt(erts_lcnt_lock_t *lock, Uint16 option) {
if ((w_state > 0) || (r_state > 0)) {
eltd->lock_in_conflict = 1;
- if (eltd->timer_set == 0)
+ if (eltd->timer_set == 0) {
lcnt_time(&eltd->timer);
+ }
eltd->timer_set++;
} else {
eltd->lock_in_conflict = 0;
@@ -433,7 +470,7 @@ void erts_lcnt_lock(erts_lcnt_lock_t *lock) {
if (!ERTS_LCNT_LOCK_TYPE(lock)) return;
w_state = ethr_atomic_read(&lock->w_state);
- ethr_atomic_inc( &lock->w_state);
+ ethr_atomic_inc(&lock->w_state);
eltd = lcnt_get_thread_data();
@@ -446,10 +483,10 @@ void erts_lcnt_lock(erts_lcnt_lock_t *lock) {
* 'atomicly'. All other locks will block the thread if w_state > 0
* i.e. locked.
*/
- if (eltd->timer_set == 0)
+ if (eltd->timer_set == 0) {
lcnt_time(&eltd->timer);
+ }
eltd->timer_set++;
-
} else {
eltd->lock_in_conflict = 0;
}
@@ -459,11 +496,10 @@ void erts_lcnt_lock(erts_lcnt_lock_t *lock) {
void erts_lcnt_lock_unaquire(erts_lcnt_lock_t *lock) {
/* should check if this thread was "waiting" */
-
if (erts_lcnt_rt_options & ERTS_LCNT_OPT_SUSPEND) return;
if (!ERTS_LCNT_LOCK_TYPE(lock)) return;
- ethr_atomic_dec( &lock->w_state);
+ ethr_atomic_dec(&lock->w_state);
}
/* erts_lcnt_lock_post
@@ -491,7 +527,7 @@ void erts_lcnt_lock_post_x(erts_lcnt_lock_t *lock, char *file, unsigned int line
if (!(lock->flag & (ERTS_LCNT_LT_RWMUTEX | ERTS_LCNT_LT_RWSPINLOCK))) {
flowstate = ethr_atomic_read(&lock->flowstate);
ASSERT(flowstate == 0);
- ethr_atomic_inc( &lock->flowstate);
+ ethr_atomic_inc(&lock->flowstate);
}
#endif
@@ -500,19 +536,12 @@ void erts_lcnt_lock_post_x(erts_lcnt_lock_t *lock, char *file, unsigned int line
ASSERT(eltd);
/* if lock was in conflict, time it */
-
- if (erts_lcnt_rt_options & ERTS_LCNT_OPT_LOCATION) {
- stats = lcnt_get_lock_stats(lock, file, line);
- } else {
- stats = &lock->stats[0];
- }
-
+ stats = lcnt_get_lock_stats(lock, file, line);
if (eltd->timer_set) {
lcnt_time(&timer);
lcnt_time_diff(&time_wait, &timer, &(eltd->timer));
lcnt_update_stats(stats, eltd->lock_in_conflict, &time_wait);
-
eltd->timer_set--;
ASSERT(eltd->timer_set >= 0);
} else {
@@ -541,11 +570,11 @@ void erts_lcnt_unlock(erts_lcnt_lock_t *lock) {
/* flowstate */
flowstate = ethr_atomic_read(&lock->flowstate);
ASSERT(flowstate == 1);
- ethr_atomic_dec( &lock->flowstate);
+ ethr_atomic_dec(&lock->flowstate);
/* write state */
w_state = ethr_atomic_read(&lock->w_state);
- ASSERT(w_state > 0)
+ ASSERT(w_state > 0);
#endif
ethr_atomic_dec(&lock->w_state);
}
@@ -582,9 +611,7 @@ void erts_lcnt_trylock(erts_lcnt_lock_t *lock, int res) {
ethr_atomic_inc( &lock->flowstate);
#endif
ethr_atomic_inc(&lock->w_state);
-
lcnt_update_stats(&(lock->stats[0]), 0, NULL);
-
} else {
ethr_atomic_inc(&lock->stats[0].tries);
ethr_atomic_inc(&lock->stats[0].colls);
diff --git a/erts/emulator/beam/erl_lock_count.h b/erts/emulator/beam/erl_lock_count.h
index a4fc91b510..ffbb93da1b 100644
--- a/erts/emulator/beam/erl_lock_count.h
+++ b/erts/emulator/beam/erl_lock_count.h
@@ -35,6 +35,10 @@
* | | | - collisions (including trylock busy)
* | | | - timer (time spent in waiting for lock)
* | | | - n_timer (collisions excluding trylock busy)
+ * | | | - histogram
+ * | | | | - # 0 = log2(lock wait_time ns)
+ * | | | | - ...
+ * | | | | - # n = log2(lock wait_time ns)
*
* Each instance of a lock is the unique lock, i.e. set and id in that set.
* For each lock there is a set of statistics with where and what impact
@@ -61,9 +65,24 @@
#define ERTS_LOCK_COUNT_H__
#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifndef ERTS_ENABLE_LOCK_POSITION
+/* Enable in order for _x variants of mtx functions to be used. */
+#define ERTS_ENABLE_LOCK_POSITION 1
+#endif
+
#include "ethread.h"
-#define ERTS_LCNT_MAX_LOCK_LOCATIONS (10)
+#define ERTS_LCNT_MAX_LOCK_LOCATIONS (10)
+
+/* histogram */
+#define ERTS_LCNT_HISTOGRAM_MAX_NS (((unsigned long)1LL << 28) - 1)
+#if 0 || defined(HAVE_GETHRTIME)
+#define ERTS_LCNT_HISTOGRAM_SLOT_SIZE (30)
+#define ERTS_LCNT_HISTOGRAM_RSHIFT (0)
+#else
+#define ERTS_LCNT_HISTOGRAM_SLOT_SIZE (20)
+#define ERTS_LCNT_HISTOGRAM_RSHIFT (10)
+#endif
#define ERTS_LCNT_LT_SPINLOCK (((Uint16) 1) << 0)
#define ERTS_LCNT_LT_RWSPINLOCK (((Uint16) 1) << 1)
@@ -98,6 +117,10 @@ typedef struct {
extern erts_lcnt_time_t timer_start;
+typedef struct {
+ Uint32 ns[ERTS_LCNT_HISTOGRAM_SLOT_SIZE]; /* log2 array of nano seconds occurences */
+} erts_lcnt_hist_t;
+
typedef struct erts_lcnt_lock_stats_s {
/* "tries" and "colls" needs to be atomic since
* trylock busy does not aquire a lock and there
@@ -112,6 +135,7 @@ typedef struct erts_lcnt_lock_stats_s {
unsigned long timer_n; /* #times waited for lock */
erts_lcnt_time_t timer; /* total wait time for lock */
+ erts_lcnt_hist_t hist;
} erts_lcnt_lock_stats_t;
/* rw locks uses both states, other locks only uses w_state */
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c
new file mode 100644
index 0000000000..a180047f6c
--- /dev/null
+++ b/erts/emulator/beam/erl_map.c
@@ -0,0 +1,837 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ *
+ * Author: Björn-Egil Dahlberg
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "sys.h"
+#include "erl_vm.h"
+#include "global.h"
+#include "erl_process.h"
+#include "error.h"
+#include "bif.h"
+
+#include "erl_map.h"
+
+/* BIFs
+ *
+ * DONE:
+ * - erlang:is_map/1
+ * - erlang:map_size/1
+ *
+ * - maps:find/2
+ * - maps:from_list/1
+ * - maps:get/2
+ * - maps:is_key/2
+ * - maps:keys/1
+ * - maps:merge/2
+ * - maps:new/0
+ * - maps:put/3
+ * - maps:remove/2
+ * - maps:to_list/1
+ * - maps:update/3
+ * - maps:values/1
+ *
+ * TODO:
+ * - maps:foldl/3
+ * - maps:foldr/3
+ * - maps:map/3
+ * - maps:size/1
+ * - maps:without/2
+ *
+ * DEBUG: for sharing calculation
+ * - erts_internal:map_to_tuple_keys/1
+ */
+
+/* erlang:map_size/1
+ * the corresponding instruction is implemented in:
+ * beam/erl_bif_guard.c
+ */
+
+BIF_RETTYPE map_size_1(BIF_ALIST_1) {
+ if (is_map(BIF_ARG_1)) {
+ Eterm *hp;
+ Uint hsz = 0;
+ map_t *mp = (map_t*)map_val(BIF_ARG_1);
+ Uint n = map_get_size(mp);
+
+ erts_bld_uint(NULL, &hsz, n);
+ hp = HAlloc(BIF_P, hsz);
+ BIF_RET(erts_bld_uint(&hp, NULL, n));
+ }
+
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:to_list/1
+ */
+
+BIF_RETTYPE maps_to_list_1(BIF_ALIST_1) {
+ if (is_map(BIF_ARG_1)) {
+ Uint n;
+ Eterm* hp;
+ Eterm *ks,*vs, res, tup;
+ map_t *mp = (map_t*)map_val(BIF_ARG_1);
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+ n = map_get_size(mp);
+ hp = HAlloc(BIF_P, (2 + 3) * n);
+ res = NIL;
+
+ while(n--) {
+ tup = TUPLE2(hp, ks[n], vs[n]); hp += 3;
+ res = CONS(hp, tup, res); hp += 2;
+ }
+
+ BIF_RET(res);
+ }
+
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:find/2
+ * return value if key *matches* a key in the map
+ */
+
+int erts_maps_find(Eterm key, Eterm map, Eterm *value) {
+
+ Eterm *ks,*vs;
+ map_t *mp;
+ Uint n,i;
+
+ mp = (map_t*)map_val(map);
+ n = map_get_size(mp);
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ for( i = 0; i < n; i++) {
+ if (EQ(ks[i], key)) {
+ *value = vs[i];
+ return 1;
+ }
+ }
+ return 0;
+}
+
+BIF_RETTYPE maps_find_2(BIF_ALIST_2) {
+ if (is_map(BIF_ARG_2)) {
+ Eterm *hp, value,res;
+
+ if (erts_maps_find(BIF_ARG_1, BIF_ARG_2, &value)) {
+ hp = HAlloc(BIF_P, 3);
+ res = make_tuple(hp);
+ *hp++ = make_arityval(2);
+ *hp++ = am_ok;
+ *hp++ = value;
+ BIF_RET(res);
+ }
+
+ BIF_RET(am_error);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+/* maps:get/2
+ * return value if key *matches* a key in the map
+ * exception bad_key if none matches
+ */
+
+
+int erts_maps_get(Eterm key, Eterm map, Eterm *value) {
+ Eterm *ks,*vs;
+ map_t *mp;
+ Uint n,i;
+
+ mp = (map_t*)map_val(map);
+ n = map_get_size(mp);
+
+ if (n == 0)
+ return 0;
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ if (is_immed(key)) {
+ for( i = 0; i < n; i++) {
+ if (ks[i] == key) {
+ *value = vs[i];
+ return 1;
+ }
+ }
+ }
+
+ for( i = 0; i < n; i++) {
+ if (EQ(ks[i], key)) {
+ *value = vs[i];
+ return 1;
+ }
+ }
+ return 0;
+}
+
+BIF_RETTYPE maps_get_2(BIF_ALIST_2) {
+ if (is_map(BIF_ARG_2)) {
+ Eterm *hp;
+ Eterm value, error;
+ char *s_error;
+
+ if (erts_maps_get(BIF_ARG_1, BIF_ARG_2, &value)) {
+ BIF_RET(value);
+ }
+
+ s_error = "bad_key";
+ error = am_atom_put(s_error, sys_strlen(s_error));
+
+ hp = HAlloc(BIF_P, 3);
+ BIF_P->fvalue = TUPLE2(hp, error, BIF_ARG_1);
+ BIF_ERROR(BIF_P, EXC_ERROR_2);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:from_list/1
+ * List may be unsorted [{K,V}]
+ */
+
+BIF_RETTYPE maps_from_list_1(BIF_ALIST_1) {
+ Eterm *kv, item = BIF_ARG_1;
+ Eterm *hp, *thp,*vs, *ks, keys, res;
+ map_t *mp;
+ Uint size = 0, unused_size = 0;
+ Sint c = 0;
+ Sint idx = 0;
+
+ if (is_list(item) || is_nil(item)) {
+
+ /* Calculate size and check validity */
+
+ while(is_list(item)) {
+ res = CAR(list_val(item));
+ if (is_not_tuple(res))
+ goto error;
+
+ kv = tuple_val(res);
+ if (*kv != make_arityval(2))
+ goto error;
+
+ size++;
+ item = CDR(list_val(item));
+ }
+
+ if (is_not_nil(item))
+ goto error;
+
+ hp = HAlloc(BIF_P, 3 + 1 + (2 * size));
+ thp = hp;
+ keys = make_tuple(hp);
+ *hp++ = make_arityval(size);
+ ks = hp;
+ hp += size;
+ mp = (map_t*)hp;
+ res = make_map(mp);
+ hp += MAP_HEADER_SIZE;
+ vs = hp;
+
+ mp->thing_word = MAP_HEADER;
+ mp->size = size; /* set later, might shrink*/
+ mp->keys = keys;
+
+ if (size == 0)
+ BIF_RET(res);
+
+ item = BIF_ARG_1;
+
+ /* first entry */
+ kv = tuple_val(CAR(list_val(item)));
+ ks[0] = kv[1];
+ vs[0] = kv[2];
+ size = 1;
+ item = CDR(list_val(item));
+
+ /* insert sort key/value pairs */
+ while(is_list(item)) {
+
+ kv = tuple_val(CAR(list_val(item)));
+
+ /* compare ks backwards
+ * idx represent word index to be written (hole position).
+ * We cannot copy the elements when searching since we might
+ * have an equal key. So we search for just the index first =(
+ *
+ * It is perhaps faster to move the values in the first pass.
+ * Check for uniqueness during insert phase and then have a
+ * second phace compacting the map if duplicates are found
+ * during insert. .. or do someother sort .. shell-sort perhaps.
+ */
+
+ idx = size;
+
+ while(idx > 0 && (c = CMP_TERM(kv[1],ks[idx-1])) < 0) { idx--; }
+
+ if (c == 0) {
+ /* last compare was equal,
+ * i.e. we have to release memory
+ * and overwrite that key/value
+ */
+ ks[idx-1] = kv[1];
+ vs[idx-1] = kv[2];
+ unused_size++;
+ } else {
+ Uint i = size;
+ while(i > idx) {
+ ks[i] = ks[i-1];
+ vs[i] = vs[i-1];
+ i--;
+ }
+ ks[idx] = kv[1];
+ vs[idx] = kv[2];
+ size++;
+ }
+ item = CDR(list_val(item));
+ }
+
+ if (unused_size) {
+ /* the key tuple is embedded in the heap
+ * write a bignum to clear it.
+ */
+ /* release values as normal since they are on the top of the heap */
+
+ ks[size] = make_pos_bignum_header(unused_size - 1);
+ HRelease(BIF_P, vs + size + unused_size, vs + size);
+ }
+
+ *thp = make_arityval(size);
+ mp->size = size;
+ BIF_RET(res);
+ }
+
+error:
+
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:is_key/2
+ */
+
+BIF_RETTYPE maps_is_key_2(BIF_ALIST_2) {
+ if (is_map(BIF_ARG_2)) {
+ Eterm *ks, key;
+ map_t *mp;
+ Uint n,i;
+
+ mp = (map_t*)map_val(BIF_ARG_2);
+ key = BIF_ARG_1;
+ n = map_get_size(mp);
+ ks = map_get_keys(mp);
+
+ if (n == 0)
+ BIF_RET(am_false);
+
+ if (is_immed(key)) {
+ for( i = 0; i < n; i++) {
+ if (ks[i] == key) {
+ BIF_RET(am_true);
+ }
+ }
+ }
+
+ for( i = 0; i < n; i++) {
+ if (EQ(ks[i], key)) {
+ BIF_RET(am_true);
+ }
+ }
+ BIF_RET(am_false);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:keys/1
+ */
+
+BIF_RETTYPE maps_keys_1(BIF_ALIST_1) {
+ if (is_map(BIF_ARG_1)) {
+ Eterm *hp, *ks, res = NIL;
+ map_t *mp;
+ Uint n;
+
+ mp = (map_t*)map_val(BIF_ARG_1);
+ n = map_get_size(mp);
+
+ if (n == 0)
+ BIF_RET(res);
+
+ hp = HAlloc(BIF_P, (2 * n));
+ ks = map_get_keys(mp);
+
+ while(n--) {
+ res = CONS(hp, ks[n], res); hp += 2;
+ }
+
+ BIF_RET(res);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+/* maps:merge/2
+ */
+
+BIF_RETTYPE maps_merge_2(BIF_ALIST_2) {
+ if (is_map(BIF_ARG_1) && is_map(BIF_ARG_2)) {
+ Eterm *hp,*thp;
+ Eterm tup;
+ Eterm *ks,*vs,*ks1,*vs1,*ks2,*vs2;
+ map_t *mp1,*mp2,*mp_new;
+ Uint n1,n2,i1,i2,need,unused_size=0;
+ Sint c = 0;
+
+ mp1 = (map_t*)map_val(BIF_ARG_1);
+ mp2 = (map_t*)map_val(BIF_ARG_2);
+ n1 = map_get_size(mp1);
+ n2 = map_get_size(mp2);
+
+ need = MAP_HEADER_SIZE + 1 + 2*(n1 + n2);
+
+ hp = HAlloc(BIF_P, need);
+ thp = hp;
+ tup = make_tuple(thp);
+ ks = hp + 1; hp += 1 + n1 + n2;
+ mp_new = (map_t*)hp; hp += MAP_HEADER_SIZE;
+ vs = hp; hp += n1 + n2;
+
+ mp_new->thing_word = MAP_HEADER;
+ mp_new->size = 0;
+ mp_new->keys = tup;
+
+ i1 = 0; i2 = 0;
+ ks1 = map_get_keys(mp1);
+ vs1 = map_get_values(mp1);
+ ks2 = map_get_keys(mp2);
+ vs2 = map_get_values(mp2);
+
+ while(i1 < n1 && i2 < n2) {
+ c = CMP_TERM(ks1[i1],ks2[i2]);
+ if ( c == 0) {
+ /* use righthand side arguments map value,
+ * but advance both maps */
+ *ks++ = ks2[i2];
+ *vs++ = vs2[i2];
+ i1++, i2++, unused_size++;
+ } else if ( c < 0) {
+ *ks++ = ks1[i1];
+ *vs++ = vs1[i1];
+ i1++;
+ } else {
+ *ks++ = ks2[i2];
+ *vs++ = vs2[i2];
+ i2++;
+ }
+ }
+
+ /* copy remaining */
+ while (i1 < n1) {
+ *ks++ = ks1[i1];
+ *vs++ = vs1[i1];
+ i1++;
+ }
+
+ while (i2 < n2) {
+ *ks++ = ks2[i2];
+ *vs++ = vs2[i2];
+ i2++;
+ }
+
+ if (unused_size) {
+ /* the key tuple is embedded in the heap, write a bignum to clear it.
+ *
+ * release values as normal since they are on the top of the heap
+ * size = n1 + n1 - unused_size
+ */
+
+ *ks = make_pos_bignum_header(unused_size - 1);
+ HRelease(BIF_P, vs + unused_size, vs);
+ }
+
+ mp_new->size = n1 + n2 - unused_size;
+ *thp = make_arityval(n1 + n2 - unused_size);
+
+ BIF_RET(make_map(mp_new));
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+/* maps:new/2
+ */
+
+BIF_RETTYPE maps_new_0(BIF_ALIST_0) {
+ Eterm* hp;
+ Eterm tup;
+ map_t *mp;
+
+ hp = HAlloc(BIF_P, (MAP_HEADER_SIZE + 1));
+ tup = make_tuple(hp);
+ *hp++ = make_arityval(0);
+
+ mp = (map_t*)hp;
+ mp->thing_word = MAP_HEADER;
+ mp->size = 0;
+ mp->keys = tup;
+
+ BIF_RET(make_map(mp));
+}
+
+/* maps:put/3
+ */
+
+Eterm erts_maps_put(Process *p, Eterm key, Eterm value, Eterm map) {
+ Sint n,i;
+ Sint c = 0;
+ Eterm* hp, *shp;
+ Eterm *ks,*vs, res, tup;
+ map_t *mp = (map_t*)map_val(map);
+
+ n = map_get_size(mp);
+
+ if (n == 0) {
+ hp = HAlloc(p, MAP_HEADER_SIZE + 1 + 2);
+ tup = make_tuple(hp);
+ *hp++ = make_arityval(1);
+ *hp++ = key;
+ res = make_map(hp);
+ *hp++ = MAP_HEADER;
+ *hp++ = 1;
+ *hp++ = tup;
+ *hp++ = value;
+
+ return res;
+ }
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ /* only allocate for values,
+ * assume key-tuple will be intact
+ */
+
+ hp = HAlloc(p, MAP_HEADER_SIZE + n);
+ shp = hp; /* save hp, used if optimistic update fails */
+ res = make_map(hp);
+ *hp++ = MAP_HEADER;
+ *hp++ = n;
+ *hp++ = mp->keys;
+
+ if (is_immed(key)) {
+ for( i = 0; i < n; i ++) {
+ if (ks[i] == key) {
+ *hp++ = value;
+ vs++;
+ c = 1;
+ } else {
+ *hp++ = *vs++;
+ }
+ }
+ } else {
+ for( i = 0; i < n; i ++) {
+ if (EQ(ks[i], key)) {
+ *hp++ = value;
+ vs++;
+ c = 1;
+ } else {
+ *hp++ = *vs++;
+ }
+ }
+ }
+
+ if (c)
+ return res;
+
+ /* need to make a new tuple,
+ * use old hp since it needs to be recreated anyway.
+ */
+ tup = make_tuple(shp);
+ *shp++ = make_arityval(n+1);
+
+ hp = HAlloc(p, 3 + n + 1);
+ res = make_map(hp);
+ *hp++ = MAP_HEADER;
+ *hp++ = n + 1;
+ *hp++ = tup;
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ ASSERT(n >= 0);
+
+ /* copy map in order */
+ while (n && ((c = CMP_TERM(*ks, key)) < 0)) {
+ *shp++ = *ks++;
+ *hp++ = *vs++;
+ n--;
+ }
+
+ *shp++ = key;
+ *hp++ = value;
+
+ ASSERT(n >= 0);
+
+ while(n--) {
+ *shp++ = *ks++;
+ *hp++ = *vs++;
+ }
+ /* we have one word remaining
+ * this will work out fine once we get the size word
+ * in the header.
+ */
+ *shp = make_pos_bignum_header(0);
+ return res;
+}
+
+BIF_RETTYPE maps_put_3(BIF_ALIST_3) {
+ if (is_map(BIF_ARG_3)) {
+ BIF_RET(erts_maps_put(BIF_P, BIF_ARG_1, BIF_ARG_2, BIF_ARG_3));
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:remove/3
+ */
+
+int erts_maps_remove(Process *p, Eterm key, Eterm map, Eterm *res) {
+ Sint n;
+ Uint need;
+ Eterm *hp_start;
+ Eterm *thp, *mhp;
+ Eterm *ks, *vs, tup;
+ map_t *mp = (map_t*)map_val(map);
+
+ n = map_get_size(mp);
+
+ if (n == 0) {
+ *res = map;
+ return 1;
+ }
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ /* Assume key exists.
+ * Release allocated if it didn't.
+ * Allocate key tuple first.
+ */
+
+ need = n + 1 - 1 + 3 + n - 1; /* tuple - 1 + map - 1 */
+ hp_start = HAlloc(p, need);
+ thp = hp_start;
+ mhp = thp + n; /* offset with tuple heap size */
+
+ tup = make_tuple(thp);
+ *thp++ = make_arityval(n - 1);
+
+ *res = make_map(mhp);
+ *mhp++ = MAP_HEADER;
+ *mhp++ = n - 1;
+ *mhp++ = tup;
+
+ if (is_immed(key)) {
+ while (1) {
+ if (*ks == key) {
+ goto found_key;
+ } else if (--n) {
+ *mhp++ = *vs++;
+ *thp++ = *ks++;
+ } else
+ break;
+ }
+ } else {
+ while(1) {
+ if (EQ(*ks, key)) {
+ goto found_key;
+ } else if (--n) {
+ *mhp++ = *vs++;
+ *thp++ = *ks++;
+ } else
+ break;
+ }
+ }
+
+ /* Not found, remove allocated memory
+ * and return previous map.
+ */
+ HRelease(p, hp_start + need, hp_start);
+
+ *res = map;
+ return 1;
+
+found_key:
+ /* Copy rest of keys and values */
+ if (--n) {
+ sys_memcpy(mhp, vs+1, n*sizeof(Eterm));
+ sys_memcpy(thp, ks+1, n*sizeof(Eterm));
+ }
+ return 1;
+}
+
+BIF_RETTYPE maps_remove_2(BIF_ALIST_2) {
+ if (is_map(BIF_ARG_2)) {
+ Eterm res;
+ if (erts_maps_remove(BIF_P, BIF_ARG_1, BIF_ARG_2, &res)) {
+ BIF_RET(res);
+ }
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+/* maps:update/3
+ */
+
+int erts_maps_update(Process *p, Eterm key, Eterm value, Eterm map, Eterm *res) {
+ Sint n,i;
+ Eterm* hp,*shp;
+ Eterm *ks,*vs;
+ map_t *mp = (map_t*)map_val(map);
+
+ if ((n = map_get_size(mp)) == 0) {
+ return 0;
+ }
+
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ /* only allocate for values,
+ * assume key-tuple will be intact
+ */
+
+ hp = HAlloc(p, MAP_HEADER_SIZE + n);
+ shp = hp;
+ *hp++ = MAP_HEADER;
+ *hp++ = n;
+ *hp++ = mp->keys;
+
+ if (is_immed(key)) {
+ for( i = 0; i < n; i ++) {
+ if (ks[i] == key) {
+ goto found_key;
+ } else {
+ *hp++ = *vs++;
+ }
+ }
+ } else {
+ for( i = 0; i < n; i ++) {
+ if (EQ(ks[i], key)) {
+ goto found_key;
+ } else {
+ *hp++ = *vs++;
+ }
+ }
+ }
+
+ HRelease(p, shp + MAP_HEADER_SIZE + n, shp);
+ return 0;
+
+found_key:
+ *hp++ = value;
+ vs++;
+ if (++i < n)
+ sys_memcpy(hp, vs, (n - i)*sizeof(Eterm));
+ *res = make_map(shp);
+ return 1;
+}
+
+BIF_RETTYPE maps_update_3(BIF_ALIST_3) {
+ if (is_map(BIF_ARG_3)) {
+ Eterm res;
+ if (erts_maps_update(BIF_P, BIF_ARG_1, BIF_ARG_2, BIF_ARG_3, &res)) {
+ BIF_RET(res);
+ }
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+
+/* maps:values/1
+ */
+
+BIF_RETTYPE maps_values_1(BIF_ALIST_1) {
+ if (is_map(BIF_ARG_1)) {
+ Eterm *hp, *vs, res = NIL;
+ map_t *mp;
+ Uint n;
+
+ mp = (map_t*)map_val(BIF_ARG_1);
+ n = map_get_size(mp);
+
+ if (n == 0)
+ BIF_RET(res);
+
+ hp = HAlloc(BIF_P, (2 * n));
+ vs = map_get_values(mp);
+
+ while(n--) {
+ res = CONS(hp, vs[n], res); hp += 2;
+ }
+
+ BIF_RET(res);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+int erts_validate_and_sort_map(map_t* mp)
+{
+ Eterm *ks = map_get_keys(mp);
+ Eterm *vs = map_get_values(mp);
+ Uint sz = map_get_size(mp);
+ Uint ix,jx;
+ Eterm tmp;
+ Sint c;
+
+ /* sort */
+
+ for (ix = 1; ix < sz; ix++) {
+ jx = ix;
+ while( jx > 0 && (c = CMP_TERM(ks[jx],ks[jx-1])) <= 0 ) {
+ /* identical key -> error */
+ if (c == 0) return 0;
+
+ tmp = ks[jx];
+ ks[jx] = ks[jx - 1];
+ ks[jx - 1] = tmp;
+
+ tmp = vs[jx];
+ vs[jx] = vs[jx - 1];
+ vs[jx - 1] = tmp;
+
+ jx--;
+ }
+ }
+ return 1;
+}
+
+/*
+ * erts_internal:map_to_tuple_keys/1
+ *
+ * Used in erts_debug:size/1
+ */
+
+BIF_RETTYPE erts_internal_map_to_tuple_keys_1(BIF_ALIST_1) {
+ if (is_map(BIF_ARG_1)) {
+ map_t *mp = (map_t*)map_val(BIF_ARG_1);
+ BIF_RET(mp->keys);
+ }
+ BIF_ERROR(BIF_P, BADARG);
+}
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h
new file mode 100644
index 0000000000..cfacb2ec28
--- /dev/null
+++ b/erts/emulator/beam/erl_map.h
@@ -0,0 +1,72 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+
+#ifndef __ERL_MAP_H__
+#define __ERL_MAP_H__
+
+#include "sys.h"
+/* MAP */
+
+typedef struct map_s {
+ Eterm thing_word;
+ Uint size;
+ Eterm keys; /* tuple */
+} map_t;
+/* map node
+ *
+ * -----------
+ * Eterm THING
+ * Uint size
+ * Eterm Keys -> {K1, K2, K3, ..., Kn} where n = size
+ * ----
+ * Eterm V1
+ * ...
+ * Eterm Vn, where n = size
+ * -----------
+ */
+
+
+
+/* erl_term.h stuff */
+#define make_map(x) make_boxed((Eterm*)(x))
+#define make_map_rel(x, BASE) make_boxed_rel((Eterm*)(x),(BASE))
+#define is_map(x) (is_boxed((x)) && is_map_header(*boxed_val((x))))
+#define is_map_rel(RTERM,BASE) is_map(rterm2wterm(RTERM,BASE))
+#define is_not_map(x) (!is_map((x)))
+#define is_map_header(x) (((x) & (_TAG_HEADER_MASK)) == _TAG_HEADER_MAP)
+#define header_is_map(x) ((((x) & (_HEADER_SUBTAG_MASK)) == MAP_SUBTAG))
+#define map_val(x) (_unchecked_boxed_val((x)))
+#define map_val_rel(RTERM, BASE) map_val(rterm2wterm(RTERM, BASE))
+
+#define map_get_values(x) (((Eterm *)(x)) + 3)
+#define map_get_keys(x) (((Eterm *)tuple_val(((map_t *)(x))->keys)) + 1)
+#define map_get_size(x) (((map_t*)(x))->size)
+
+#define MAP_HEADER _make_header(1,_TAG_HEADER_MAP)
+#define MAP_HEADER_SIZE (sizeof(map_t) / sizeof(Eterm))
+
+Eterm erts_maps_put(Process *p, Eterm key, Eterm value, Eterm map);
+int erts_maps_update(Process *p, Eterm key, Eterm value, Eterm map, Eterm *res);
+int erts_maps_find(Eterm key, Eterm map, Eterm *value);
+int erts_maps_get(Eterm key, Eterm map, Eterm *value);
+int erts_maps_remove(Process *p, Eterm key, Eterm map, Eterm *res);
+int erts_validate_and_sort_map(map_t* map);
+#endif
+
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index 6a9030fd99..8870fac7d9 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -415,7 +415,13 @@ erts_queue_dist_message(Process *rcvr,
if (!(*rcvr_locks & ERTS_PROC_LOCK_MSGQ))
erts_smp_proc_unlock(rcvr, ERTS_PROC_LOCK_MSGQ);
- erts_proc_notify_new_message(rcvr);
+ erts_proc_notify_new_message(rcvr,
+#ifdef ERTS_SMP
+ *rcvr_locks
+#else
+ 0
+#endif
+ );
}
}
@@ -542,7 +548,13 @@ queue_message(Process *c_p,
if (locked_msgq)
erts_smp_proc_unlock(receiver, ERTS_PROC_LOCK_MSGQ);
- erts_proc_notify_new_message(receiver);
+ erts_proc_notify_new_message(receiver,
+#ifdef ERTS_SMP
+ *receiver_locks
+#else
+ 0
+#endif
+ );
#ifndef ERTS_SMP
ERTS_HOLE_CHECK(receiver);
@@ -896,8 +908,10 @@ erts_send_message(Process* sender,
#ifdef USE_VM_PROBES
*sender_name = *receiver_name = '\0';
if (DTRACE_ENABLED(message_send)) {
- erts_snprintf(sender_name, sizeof(DTRACE_CHARBUF_NAME(sender_name)), "%T", sender->common.id);
- erts_snprintf(receiver_name, sizeof(DTRACE_CHARBUF_NAME(receiver_name)), "%T", receiver->common.id);
+ erts_snprintf(sender_name, sizeof(DTRACE_CHARBUF_NAME(sender_name)),
+ "%T", sender->common.id);
+ erts_snprintf(receiver_name, sizeof(DTRACE_CHARBUF_NAME(receiver_name)),
+ "%T", receiver->common.id);
}
#endif
if (SEQ_TRACE_TOKEN(sender) != NIL && !(flags & ERTS_SND_FLG_NO_SEQ_TRACE)) {
@@ -1030,7 +1044,6 @@ erts_send_message(Process* sender,
}
BM_SWAP_TIMER(send,system);
} else {
-#ifdef ERTS_SMP
ErlOffHeap *ohp;
Eterm *hp;
erts_aint32_t state;
@@ -1062,42 +1075,6 @@ erts_send_message(Process* sender,
#endif
);
BM_SWAP_TIMER(send,system);
-#else
- ErlMessage* mp = message_alloc();
- Eterm *hp;
- BM_SWAP_TIMER(send,size);
- msize = size_object(message);
- BM_SWAP_TIMER(size,send);
-
- if (receiver->stop - receiver->htop <= msize) {
- BM_SWAP_TIMER(send,system);
- erts_garbage_collect(receiver, msize, receiver->arg_reg, receiver->arity);
- BM_SWAP_TIMER(system,send);
- }
- hp = receiver->htop;
- receiver->htop = hp + msize;
- BM_SWAP_TIMER(send,copy);
- message = copy_struct(message, msize, &hp, &receiver->off_heap);
- BM_MESSAGE_COPIED(msize);
- BM_SWAP_TIMER(copy,send);
- DTRACE6(message_send, sender_name, receiver_name,
- (uint32_t)msize, tok_label, tok_lastcnt, tok_serial);
- ERL_MESSAGE_TERM(mp) = message;
- ERL_MESSAGE_TOKEN(mp) = NIL;
-#ifdef USE_VM_PROBES
- ERL_MESSAGE_DT_UTAG(mp) = NIL;
-#endif
- mp->next = NULL;
- mp->data.attached = NULL;
- LINK_MESSAGE(receiver, mp);
- res = receiver->msg.len;
- erts_proc_notify_new_message(receiver);
-
- if (IS_TRACED_FL(receiver, F_TRACE_RECEIVE)) {
- trace_receive(receiver, message);
- }
- BM_SWAP_TIMER(send,system);
-#endif /* #ifndef ERTS_SMP */
}
return res;
}
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index 771eba431f..0f3bb8d281 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -46,6 +46,11 @@ typedef struct erl_off_heap {
Uint64 overhead; /* Administrative overhead (used to force GC). */
} ErlOffHeap;
+#define ERTS_INIT_OFF_HEAP(OHP) \
+ do { \
+ (OHP)->first = NULL; \
+ (OHP)->overhead = 0; \
+ } while (0)
#include "external.h"
#include "erl_process.h"
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 48f8be8dd3..adc3520ebb 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -31,9 +31,11 @@
#include "bif.h"
#include "error.h"
#include "big.h"
+#include "erl_map.h"
#include "beam_bp.h"
#include "erl_thr_progress.h"
#include "dtrace-wrapper.h"
+#include "erl_process.h"
#if defined(USE_DYNAMIC_TRACE) && (defined(USE_DTRACE) || defined(USE_SYSTEMTAP))
#define HAVE_USE_DTRACE 1
#endif
@@ -470,6 +472,18 @@ int enif_inspect_binary(ErlNifEnv* env, Eterm bin_term, ErlNifBinary* bin)
struct enif_tmp_obj_t* tmp;
byte* raw_ptr;
}u;
+
+ if (is_boxed(bin_term) && *binary_val(bin_term) == HEADER_SUB_BIN) {
+ ErlSubBin* sb = (ErlSubBin*) binary_val(bin_term);
+ if (sb->is_writable) {
+ ProcBin* pb = (ProcBin*) binary_val(sb->orig);
+ ASSERT(pb->thing_word == HEADER_PROC_BIN);
+ if (pb->flags) {
+ erts_emasculate_writable_binary(pb);
+ sb->is_writable = 0;
+ }
+ }
+ }
u.tmp = NULL;
bin->data = erts_get_aligned_binary_bytes_extra(bin_term, &u.raw_ptr, allocator,
sizeof(struct enif_tmp_obj_t));
@@ -874,7 +888,7 @@ int enif_get_list_cell(ErlNifEnv* env, Eterm term, Eterm* head, Eterm* tail)
int enif_get_list_length(ErlNifEnv* env, Eterm term, unsigned* len)
{
if (is_not_list(term) && is_not_nil(term)) return 0;
- *len = list_length(term);
+ *len = erts_list_length(term);
return 1;
}
@@ -1213,7 +1227,8 @@ static void close_lib(struct erl_module_nif* lib)
lib->entry->unload(&env, lib->priv_data);
post_nif_noproc(&env);
}
- erts_sys_ddll_close(lib->handle);
+ if (!erts_is_static_nif(lib->handle))
+ erts_sys_ddll_close(lib->handle);
lib->handle = NULL;
}
@@ -1234,6 +1249,19 @@ static void steal_resource_type(ErlNifResourceType* type)
}
}
+/* The opened_rt_list is used by enif_open_resource_type()
+ * in order to rollback "creates" and "take-overs" in case the load fails.
+ */
+struct opened_resource_type
+{
+ struct opened_resource_type* next;
+
+ ErlNifResourceFlags op;
+ ErlNifResourceType* type;
+ ErlNifResourceDtor* new_dtor;
+};
+static struct opened_resource_type* opened_rt_list = NULL;
+
ErlNifResourceType*
enif_open_resource_type(ErlNifEnv* env,
const char* module_str,
@@ -1255,22 +1283,21 @@ enif_open_resource_type(ErlNifEnv* env,
if (type == NULL) {
if (flags & ERL_NIF_RT_CREATE) {
type = erts_alloc(ERTS_ALC_T_NIF,
- sizeof(struct enif_resource_type_t));
- type->dtor = dtor;
+ sizeof(struct enif_resource_type_t));
type->module = module_am;
type->name = name_am;
erts_refc_init(&type->refc, 1);
- type->owner = env->mod_nif;
- type->prev = &resource_type_list;
- type->next = resource_type_list.next;
- type->next->prev = type;
- type->prev->next = type;
op = ERL_NIF_RT_CREATE;
+ #ifdef DEBUG
+ type->dtor = (void*)1;
+ type->owner = (void*)2;
+ type->prev = (void*)3;
+ type->next = (void*)4;
+ #endif
}
}
else {
- if (flags & ERL_NIF_RT_TAKEOVER) {
- steal_resource_type(type);
+ if (flags & ERL_NIF_RT_TAKEOVER) {
op = ERL_NIF_RT_TAKEOVER;
}
else {
@@ -1278,12 +1305,13 @@ enif_open_resource_type(ErlNifEnv* env,
}
}
if (type != NULL) {
- type->owner = env->mod_nif;
- type->dtor = dtor;
- if (type->dtor != NULL) {
- erts_refc_inc(&type->owner->rt_dtor_cnt, 1);
- }
- erts_refc_inc(&type->owner->rt_cnt, 1);
+ struct opened_resource_type* ort = erts_alloc(ERTS_ALC_T_TMP,
+ sizeof(struct opened_resource_type));
+ ort->op = op;
+ ort->type = type;
+ ort->new_dtor = dtor;
+ ort->next = opened_rt_list;
+ opened_rt_list = ort;
}
if (tried != NULL) {
*tried = op;
@@ -1291,6 +1319,51 @@ enif_open_resource_type(ErlNifEnv* env,
return type;
}
+static void commit_opened_resource_types(struct erl_module_nif* lib)
+{
+ while (opened_rt_list) {
+ struct opened_resource_type* ort = opened_rt_list;
+
+ ErlNifResourceType* type = ort->type;
+
+ if (ort->op == ERL_NIF_RT_CREATE) {
+ type->prev = &resource_type_list;
+ type->next = resource_type_list.next;
+ type->next->prev = type;
+ type->prev->next = type;
+ }
+ else { /* ERL_NIF_RT_TAKEOVER */
+ steal_resource_type(type);
+ }
+
+ type->owner = lib;
+ type->dtor = ort->new_dtor;
+
+ if (type->dtor != NULL) {
+ erts_refc_inc(&lib->rt_dtor_cnt, 1);
+ }
+ erts_refc_inc(&lib->rt_cnt, 1);
+
+ opened_rt_list = ort->next;
+ erts_free(ERTS_ALC_T_TMP, ort);
+ }
+}
+
+static void rollback_opened_resource_types(void)
+{
+ while (opened_rt_list) {
+ struct opened_resource_type* ort = opened_rt_list;
+
+ if (ort->op == ERL_NIF_RT_CREATE) {
+ erts_free(ERTS_ALC_T_NIF, ort->type);
+ }
+
+ opened_rt_list = ort->next;
+ erts_free(ERTS_ALC_T_TMP, ort);
+ }
+}
+
+
static void nif_resource_dtor(Binary* bin)
{
ErlNifResource* resource = (ErlNifResource*) ERTS_MAGIC_BIN_DATA(bin);
@@ -1316,6 +1389,8 @@ void* enif_alloc_resource(ErlNifResourceType* type, size_t size)
{
Binary* bin = erts_create_magic_binary(SIZEOF_ErlNifResource(size), &nif_resource_dtor);
ErlNifResource* resource = ERTS_MAGIC_BIN_DATA(bin);
+
+ ASSERT(type->owner && type->next && type->prev); /* not allowed in load/upgrade */
resource->type = type;
erts_refc_inc(&bin->refc, 1);
#ifdef DEBUG
@@ -1406,7 +1481,7 @@ void* enif_dlopen(const char* lib,
ErtsSysDdllError errdesc = ERTS_SYS_DDLL_ERROR_INIT;
void* handle;
void* init_func;
- if (erts_sys_ddll_open2(lib, &handle, &errdesc) == ERL_DE_NO_ERROR) {
+ if (erts_sys_ddll_open(lib, &handle, &errdesc) == ERL_DE_NO_ERROR) {
if (erts_sys_ddll_load_nif_init(handle, &init_func, &errdesc) == ERL_DE_NO_ERROR) {
erts_sys_ddll_call_nif_init(init_func);
}
@@ -1450,6 +1525,576 @@ int enif_consume_timeslice(ErlNifEnv* env, int percent)
return ERTS_BIF_REDS_LEFT(env->proc) == 0;
}
+/*
+ * NIF exports need a few more items than the Export struct provides,
+ * including the erl_module_nif* and a NIF function pointer, so the
+ * NifExport below adds those. The Export member must be first in the
+ * struct. The saved_mfa, saved_argc, nif_level, alloced_argv_sz and argv
+ * members are used to track the MFA and arguments of the top NIF in case a
+ * chain of one or more enif_schedule_nif() calls results in an exception,
+ * since in that case the original MFA and registers have to be restored
+ * before returning to Erlang to ensure stacktrace information associated
+ * with the exception is correct.
+ */
+typedef ERL_NIF_TERM (*NativeFunPtr)(ErlNifEnv*, int, const ERL_NIF_TERM[]);
+
+typedef struct {
+ Export exp;
+ struct erl_module_nif* m;
+ NativeFunPtr fp;
+ Eterm saved_mfa[3];
+ int saved_argc;
+ int alloced_argv_sz;
+ Eterm argv[1];
+} NifExport;
+
+/*
+ * If a process has saved arguments, they need to be part of the GC
+ * rootset. The function below is called from setup_rootset() in
+ * erl_gc.c. This function is declared in erl_process.h.
+ */
+int
+erts_setup_nif_gc(Process* proc, Eterm** objv, int* nobj)
+{
+ NifExport* ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ int gc = (ep && ep->saved_argc > 0);
+
+ if (gc) {
+ *objv = ep->argv;
+ *nobj = ep->saved_argc;
+ }
+ return gc;
+}
+
+/*
+ * Allocate a NifExport and set it in proc specific data
+ */
+static NifExport*
+allocate_nif_sched_data(Process* proc, int argc)
+{
+ NifExport* ep;
+ size_t argv_extra, total;
+ int i;
+
+ argv_extra = argc > 1 ? sizeof(Eterm)*(argc-1) : 0;
+ total = sizeof(NifExport) + argv_extra;
+ ep = erts_alloc(ERTS_ALC_T_NIF_TRAP_EXPORT, total);
+ sys_memset((void*) ep, 0, total);
+ ep->alloced_argv_sz = argc;
+ for (i=0; i<ERTS_NUM_CODE_IX; i++) {
+ ep->exp.addressv[i] = &ep->exp.code[3];
+ }
+ ep->exp.code[3] = (BeamInstr) em_call_nif;
+ (void) ERTS_PROC_SET_NIF_TRAP_EXPORT(proc, ERTS_PROC_LOCK_MAIN, ep);
+ return ep;
+}
+
+static ERTS_INLINE void
+destroy_nif_export(NifExport *nif_export)
+{
+ erts_free(ERTS_ALC_T_NIF_TRAP_EXPORT, (void *) nif_export);
+}
+
+void
+erts_destroy_nif_export(void *nif_export)
+{
+ destroy_nif_export((NifExport *) nif_export);
+}
+
+/*
+ * Initialize a NifExport struct. Create it if needed and store it in the
+ * proc. The direct_fp function is what will be invoked by op_call_nif, and
+ * the indirect_fp function, if not NULL, is what the direct_fp function
+ * will call. If the allocated NifExport isn't enough to hold all of argv,
+ * allocate a larger one. Save MFA and registers only if the need_save
+ * parameter is true.
+ */
+static ERL_NIF_TERM
+init_nif_sched_data(ErlNifEnv* env, NativeFunPtr direct_fp, NativeFunPtr indirect_fp,
+ int need_save, int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ Eterm* reg = ERTS_PROC_GET_SCHDATA(proc)->x_reg_array;
+ NifExport* ep;
+ int i;
+
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ if (!ep)
+ ep = allocate_nif_sched_data(proc, argc);
+ else if (need_save && ep->alloced_argv_sz < argc) {
+ NifExport* new_ep = allocate_nif_sched_data(proc, argc);
+ destroy_nif_export(ep);
+ ep = new_ep;
+ }
+ ERTS_VBUMP_ALL_REDS(proc);
+ for (i = 0; i < argc; i++) {
+ if (need_save)
+ ep->argv[i] = reg[i];
+ reg[i] = (Eterm) argv[i];
+ }
+ if (need_save) {
+ ep->saved_mfa[0] = proc->current[0];
+ ep->saved_mfa[1] = proc->current[1];
+ ep->saved_mfa[2] = proc->current[2];
+ ep->saved_argc = argc;
+ }
+ proc->i = (BeamInstr*) ep->exp.addressv[0];
+ ep->exp.code[0] = (BeamInstr) proc->current[0];
+ ep->exp.code[1] = (BeamInstr) proc->current[1];
+ ep->exp.code[2] = argc;
+ ep->exp.code[4] = (BeamInstr) direct_fp;
+ ep->m = env->mod_nif;
+ ep->fp = indirect_fp;
+ proc->freason = TRAP;
+ proc->arity = argc;
+ return THE_NON_VALUE;
+}
+
+/*
+ * Restore saved MFA and registers. Registers are restored only when the
+ * exception flag is true.
+ */
+static void
+restore_nif_mfa(Process* proc, NifExport* ep, int exception)
+{
+ int i;
+ Eterm* reg = ERTS_PROC_GET_SCHDATA(proc)->x_reg_array;
+
+ proc->current[0] = ep->saved_mfa[0];
+ proc->current[1] = ep->saved_mfa[1];
+ proc->current[2] = ep->saved_mfa[2];
+ if (exception)
+ for (i = 0; i < ep->saved_argc; i++)
+ reg[i] = ep->argv[i];
+ ep->saved_argc = 0;
+ ep->saved_mfa[0] = THE_NON_VALUE;
+}
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+
+/*
+ * Finalize a dirty NIF call. This function is scheduled to cause the VM to
+ * switch the process off a dirty scheduler thread and back onto a regular
+ * scheduler thread, and then return the result from the dirty NIF. It also
+ * restores the original NIF MFA when necessary based on the value of
+ * ep->fp set by execute_dirty_nif via init_nif_sched_data -- non-NULL
+ * means restore, NULL means do not restore.
+ */
+static ERL_NIF_TERM
+dirty_nif_finalizer(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ NifExport* ep;
+
+ ASSERT(argc == 1);
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(env->proc->scheduler_data));
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ if (ep->fp)
+ restore_nif_mfa(proc, ep, 0);
+ return argv[0];
+}
+
+/* Finalize a dirty NIF call that raised an exception. Otherwise same as
+ * the dirty_nif_finalizer() function.
+ */
+static ERL_NIF_TERM
+dirty_nif_exception(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ NifExport* ep;
+
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(env->proc->scheduler_data));
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ if (ep->fp)
+ restore_nif_mfa(proc, ep, 1);
+ return enif_make_badarg(env);
+}
+
+/*
+ * Dirty NIF execution wrapper function. Invoke an application's dirty NIF,
+ * then check the result and schedule the appropriate finalizer function
+ * where needed. Also restore the original NIF MFA when appropriate.
+ */
+static ERL_NIF_TERM
+execute_dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ NativeFunPtr fp = (NativeFunPtr) proc->current[6];
+ NifExport* ep;
+ ERL_NIF_TERM result;
+
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY(env->proc->scheduler_data));
+
+ /*
+ * Set ep->fp to NULL before the native call so we know later whether it scheduled another NIF for execution
+ */
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ ep->fp = NULL;
+ result = (*fp)(env, argc, argv);
+ erts_smp_atomic32_read_band_mb(&proc->state,
+ ~(ERTS_PSFLG_DIRTY_CPU_PROC
+ |ERTS_PSFLG_DIRTY_IO_PROC
+ |ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q
+ |ERTS_PSFLG_DIRTY_IO_PROC_IN_Q));
+ if (erts_refc_dectest(&env->mod_nif->rt_dtor_cnt, 0) == 0 && env->mod_nif->mod == NULL)
+ close_lib(env->mod_nif);
+ /*
+ * If no more NIFs were scheduled by the native call via
+ * enif_schedule_nif(), then ep->fp will still be NULL as set above, in
+ * which case we need to restore the original NIF calling
+ * context. Reuse fp essentially as a boolean for this, passing it to
+ * init_nif_sched_data below. Both dirty_nif_exception and
+ * dirty_nif_finalizer then check ep->fp to decide whether or not to
+ * restore the original calling context.
+ */
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ if (ep->fp)
+ fp = NULL;
+ if (is_non_value(result)) {
+ if (proc->freason != TRAP) {
+ ASSERT(proc->freason == BADARG);
+ return init_nif_sched_data(env, dirty_nif_exception, fp, 0, argc, argv);
+ } else {
+ if (ep->fp == NULL)
+ restore_nif_mfa(proc, ep, 1);
+ return result;
+ }
+ }
+ else
+ return init_nif_sched_data(env, dirty_nif_finalizer, fp, 0, 1, &result);
+}
+
+/*
+ * Dirty NIF scheduling wrapper function. Schedule a dirty NIF to execute
+ * via the execute_dirty_nif() wrapper function. The dirty scheduler thread
+ * type (CPU or I/O) is indicated in flags parameter.
+ */
+static ERTS_INLINE ERL_NIF_TERM
+schedule_dirty_nif(ErlNifEnv* env, int flags, int argc, const ERL_NIF_TERM argv[])
+{
+ erts_aint32_t state, n, a;
+ Process* proc = env->proc;
+ NativeFunPtr fp = (NativeFunPtr) proc->current[6];
+ NifExport* ep;
+ int need_save;
+
+ ASSERT(flags==ERL_NIF_DIRTY_JOB_IO_BOUND || flags==ERL_NIF_DIRTY_JOB_CPU_BOUND);
+
+ a = erts_smp_atomic32_read_acqb(&proc->state);
+ while (1) {
+ n = state = a;
+ /*
+ * clear any current dirty flags and dirty queue indicators,
+ * in case the application is shifting a job from one type
+ * of dirty scheduler to the other
+ */
+ n &= ~(ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC
+ |ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q|ERTS_PSFLG_DIRTY_IO_PROC_IN_Q);
+ if (flags == ERL_NIF_DIRTY_JOB_CPU_BOUND)
+ n |= ERTS_PSFLG_DIRTY_CPU_PROC;
+ else
+ n |= ERTS_PSFLG_DIRTY_IO_PROC;
+ a = erts_smp_atomic32_cmpxchg_mb(&proc->state, n, state);
+ if (a == state)
+ break;
+ }
+ erts_refc_inc(&env->mod_nif->rt_dtor_cnt, 1);
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ need_save = (ep == NULL || is_non_value(ep->saved_mfa[0]));
+ return init_nif_sched_data(env, execute_dirty_nif, fp, need_save, argc, argv);
+}
+
+static ERL_NIF_TERM
+schedule_dirty_io_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ return schedule_dirty_nif(env, ERL_NIF_DIRTY_JOB_IO_BOUND, argc, argv);
+}
+
+static ERL_NIF_TERM
+schedule_dirty_cpu_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ return schedule_dirty_nif(env, ERL_NIF_DIRTY_JOB_CPU_BOUND, argc, argv);
+}
+
+#endif /* ERTS_DIRTY_SCHEDULERS */
+
+/*
+ * NIF execution wrapper used by enif_schedule_nif() for regular NIFs. It
+ * calls the actual NIF, restores original NIF MFA if necessary, and
+ * then returns the NIF result.
+ */
+static ERL_NIF_TERM
+execute_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ NativeFunPtr fp = (NativeFunPtr) proc->current[6];
+ NifExport* ep;
+ ERL_NIF_TERM result;
+
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ ep->fp = NULL;
+ result = (*fp)(env, argc, argv);
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ /*
+ * If no NIFs were scheduled by the native call via
+ * enif_schedule_nif(), then ep->fp will still be NULL as set above, in
+ * which case we need to restore the original NIF MFA.
+ */
+ if (ep->fp == NULL)
+ restore_nif_mfa(proc, ep, is_non_value(result) && proc->freason != TRAP);
+ return result;
+}
+
+ERL_NIF_TERM
+enif_schedule_nif(ErlNifEnv* env, const char* fun_name, int flags,
+ ERL_NIF_TERM (*fp)(ErlNifEnv*, int, const ERL_NIF_TERM[]),
+ int argc, const ERL_NIF_TERM argv[])
+{
+ Process* proc = env->proc;
+ NifExport* ep;
+ ERL_NIF_TERM fun_name_atom, result;
+ int need_save;
+
+ if (argc > MAX_ARG)
+ return enif_make_badarg(env);
+ fun_name_atom = enif_make_atom(env, fun_name);
+ if (enif_is_exception(env, fun_name_atom))
+ return fun_name_atom;
+
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ need_save = (ep == NULL || is_non_value(ep->saved_mfa[0]));
+
+ if (flags) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ NativeFunPtr sched_fun;
+ int chkflgs = (flags & (ERL_NIF_DIRTY_JOB_IO_BOUND|ERL_NIF_DIRTY_JOB_CPU_BOUND));
+ if (chkflgs == ERL_NIF_DIRTY_JOB_IO_BOUND)
+ sched_fun = schedule_dirty_io_nif;
+ else if (chkflgs == ERL_NIF_DIRTY_JOB_CPU_BOUND)
+ sched_fun = schedule_dirty_cpu_nif;
+ else
+ return enif_make_badarg(env);
+ result = init_nif_sched_data(env, sched_fun, fp, need_save, argc, argv);
+#else
+ return enif_make_badarg(env);
+#endif
+ }
+ else
+ result = init_nif_sched_data(env, execute_nif, fp, need_save, argc, argv);
+
+ ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc);
+ ASSERT(ep);
+ ep->exp.code[1] = (BeamInstr) fun_name_atom;
+ return result;
+}
+
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+
+int
+enif_is_on_dirty_scheduler(ErlNifEnv* env)
+{
+ return ERTS_SCHEDULER_IS_DIRTY(env->proc->scheduler_data);
+}
+
+#endif /* ERL_NIF_DIRTY_SCHEDULER_SUPPORT */
+
+/* Maps */
+
+int enif_is_map(ErlNifEnv* env, ERL_NIF_TERM term)
+{
+ return is_map(term);
+}
+
+int enif_get_map_size(ErlNifEnv* env, ERL_NIF_TERM term, size_t *size)
+{
+ if (is_map(term)) {
+ map_t *mp;
+ mp = (map_t*)map_val(term);
+ *size = map_get_size(mp);
+ return 1;
+ }
+ return 0;
+}
+
+ERL_NIF_TERM enif_make_new_map(ErlNifEnv* env)
+{
+ Eterm* hp = alloc_heap(env,MAP_HEADER_SIZE+1);
+ Eterm tup;
+ map_t *mp;
+
+ tup = make_tuple(hp);
+ *hp++ = make_arityval(0);
+ mp = (map_t*)hp;
+ mp->thing_word = MAP_HEADER;
+ mp->size = 0;
+ mp->keys = tup;
+
+ return make_map(mp);
+}
+
+int enif_make_map_put(ErlNifEnv* env,
+ Eterm map_in,
+ Eterm key,
+ Eterm value,
+ Eterm *map_out)
+{
+ if (is_not_map(map_in)) {
+ return 0;
+ }
+ flush_env(env);
+ *map_out = erts_maps_put(env->proc, key, value, map_in);
+ cache_env(env);
+ return 1;
+}
+
+int enif_get_map_value(ErlNifEnv* env,
+ Eterm map,
+ Eterm key,
+ Eterm *value)
+{
+ if (is_not_map(map)) {
+ return 0;
+ }
+ return erts_maps_get(key, map, value);
+}
+
+int enif_make_map_update(ErlNifEnv* env,
+ Eterm map_in,
+ Eterm key,
+ Eterm value,
+ Eterm *map_out)
+{
+ int res;
+ if (is_not_map(map_in)) {
+ return 0;
+ }
+
+ flush_env(env);
+ res = erts_maps_update(env->proc, key, value, map_in, map_out);
+ cache_env(env);
+ return res;
+}
+
+int enif_make_map_remove(ErlNifEnv* env,
+ Eterm map_in,
+ Eterm key,
+ Eterm *map_out)
+{
+ int res;
+ if (is_not_map(map_in)) {
+ return 0;
+ }
+ flush_env(env);
+ res = erts_maps_remove(env->proc, key, map_in, map_out);
+ cache_env(env);
+ return res;
+}
+
+int enif_map_iterator_create(ErlNifEnv *env,
+ Eterm map,
+ ErlNifMapIterator *iter,
+ ErlNifMapIteratorEntry entry)
+{
+ if (is_map(map)) {
+ map_t *mp = (map_t*)map_val(map);
+ size_t offset;
+
+ switch (entry) {
+ case ERL_NIF_MAP_ITERATOR_HEAD: offset = 0; break;
+ case ERL_NIF_MAP_ITERATOR_TAIL: offset = map_get_size(mp) - 1; break;
+ default: goto error;
+ }
+
+ /* empty maps are ok but will leave the iterator
+ * in bad shape.
+ */
+
+ iter->map = map;
+ iter->ks = ((Eterm *)map_get_keys(mp)) + offset;
+ iter->vs = ((Eterm *)map_get_values(mp)) + offset;
+ iter->t_limit = map_get_size(mp) + 1;
+ iter->idx = offset + 1;
+
+ return 1;
+ }
+
+error:
+#ifdef DEBUG
+ iter->map = THE_NON_VALUE;
+#endif
+ return 0;
+}
+
+void enif_map_iterator_destroy(ErlNifEnv *env, ErlNifMapIterator *iter)
+{
+ /* not used */
+#ifdef DEBUG
+ iter->map = THE_NON_VALUE;
+#endif
+
+}
+
+int enif_map_iterator_is_tail(ErlNifEnv *env, ErlNifMapIterator *iter)
+{
+ ASSERT(iter && is_map(iter->map));
+ ASSERT(iter->idx >= 0 && (iter->idx <= map_get_size(map_val(iter->map)) + 1));
+ return (iter->t_limit == 1 || iter->idx == iter->t_limit);
+}
+
+int enif_map_iterator_is_head(ErlNifEnv *env, ErlNifMapIterator *iter)
+{
+ ASSERT(iter && is_map(iter->map));
+ ASSERT(iter->idx >= 0 && (iter->idx <= map_get_size(map_val(iter->map)) + 1));
+ return (iter->t_limit == 1 || iter->idx == 0);
+}
+
+
+int enif_map_iterator_next(ErlNifEnv *env, ErlNifMapIterator *iter)
+{
+ ASSERT(iter && is_map(iter->map));
+ if (iter->idx < iter->t_limit) {
+ iter->idx++;
+ iter->ks++;
+ iter->vs++;
+ }
+ return (iter->idx != iter->t_limit);
+}
+
+int enif_map_iterator_prev(ErlNifEnv *env, ErlNifMapIterator *iter)
+{
+ ASSERT(iter && is_map(iter->map));
+ if (iter->idx > 0) {
+ iter->idx--;
+ iter->ks--;
+ iter->vs--;
+ }
+ return (iter->idx > 0);
+}
+
+int enif_map_iterator_get_pair(ErlNifEnv *env,
+ ErlNifMapIterator *iter,
+ Eterm *key,
+ Eterm *value)
+{
+ ASSERT(iter && is_map(iter->map));
+ if (iter->idx > 0 && iter->idx < iter->t_limit) {
+ ASSERT(iter->ks >= map_get_keys(map_val(iter->map)) &&
+ iter->ks < (map_get_keys(map_val(iter->map)) + map_get_size(map_val(iter->map))));
+ ASSERT(iter->vs >= map_get_values(map_val(iter->map)) &&
+ iter->vs < (map_get_values(map_val(iter->map)) + map_get_size(map_val(iter->map))));
+ *key = *(iter->ks);
+ *value = *(iter->vs);
+ return 1;
+ }
+ return 0;
+}
+
/***************************************************************************
** load_nif/2 **
***************************************************************************/
@@ -1557,6 +2202,35 @@ static Eterm load_nif_error(Process* p, const char* atom, const char* format, ..
return ret;
}
+/*
+ * The function below is for looping through ErlNifFunc arrays, helping
+ * provide backwards compatibility across the version 2.7 change that added
+ * the "flags" field to ErlNifFunc.
+ */
+static ErlNifFunc* next_func(ErlNifEntry* entry, int* incrp, ErlNifFunc* func)
+{
+ ASSERT(incrp);
+ if (!*incrp) {
+ if (entry->major > 2 || (entry->major == 2 && entry->minor >= 7))
+ *incrp = sizeof(ErlNifFunc);
+ else {
+ /*
+ * ErlNifFuncV1 below is what ErlNifFunc was before the
+ * addition of the flags field for 2.7, and is needed to handle
+ * backward compatibility.
+ */
+ typedef struct {
+ const char* name;
+ unsigned arity;
+ ERL_NIF_TERM (*fptr)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ }ErlNifFuncV1;
+ *incrp = sizeof(ErlNifFuncV1);
+ }
+ }
+ return (ErlNifFunc*) ((char*)func + *incrp);
+}
+
+
BIF_RETTYPE load_nif_2(BIF_ALIST_2)
{
static const char bad_lib[] = "bad_lib";
@@ -1564,12 +2238,13 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
static const char upgrade[] = "upgrade";
char* lib_name = NULL;
void* handle = NULL;
- void* init_func;
+ void* init_func = NULL;
ErlNifEntry* entry = NULL;
ErlNifEnv env;
- int len, i, err;
+ int i, err, encoding;
Module* mod;
Eterm mod_atom;
+ const Atom* mod_atomp;
Eterm f_atom;
BeamInstr* caller;
ErtsSysDdllError errdesc = ERTS_SYS_DDLL_ERROR_INIT;
@@ -1578,18 +2253,18 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
struct erl_module_nif* lib = NULL;
int reload_warning = 0;
- len = list_length(BIF_ARG_1);
- if (len < 0) {
- BIF_ERROR(BIF_P, BADARG);
+ encoding = erts_get_native_filename_encoding();
+ if (encoding == ERL_FILENAME_WIN_WCHAR) {
+ /* Do not convert the lib name to utf-16le yet, do that in win32 specific code */
+ /* since lib_name is used in error messages */
+ encoding = ERL_FILENAME_UTF8;
}
-
- lib_name = (char *) erts_alloc(ERTS_ALC_T_TMP, len + 1);
-
- if (intlist_to_buf(BIF_ARG_1, lib_name, len) != len) {
- erts_free(ERTS_ALC_T_TMP, lib_name);
+ lib_name = erts_convert_filename_to_encoding(BIF_ARG_1, NULL, 0,
+ ERTS_ALC_T_TMP, 1, 0, encoding,
+ NULL, 0);
+ if (!lib_name) {
BIF_ERROR(BIF_P, BADARG);
}
- lib_name[len] = '\0';
if (!erts_try_seize_code_write_permission(BIF_P)) {
erts_free(ERTS_ALC_T_TMP, lib_name);
@@ -1613,13 +2288,19 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
mod=erts_get_module(mod_atom, erts_active_code_ix());
ASSERT(mod != NULL);
+ mod_atomp = atom_tab(atom_val(mod_atom));
+ init_func = erts_static_nif_get_nif_init((char*)mod_atomp->name, mod_atomp->len);
+ if (init_func != NULL)
+ handle = init_func;
+
if (!in_area(caller, mod->curr.code, mod->curr.code_length)) {
ASSERT(in_area(caller, mod->old.code, mod->old.code_length));
ret = load_nif_error(BIF_P, "old_code", "Calling load_nif from old "
"module '%T' not allowed", mod_atom);
}
- else if ((err=erts_sys_ddll_open2(lib_name, &handle, &errdesc)) != ERL_DE_NO_ERROR) {
+ else if (init_func == NULL &&
+ (err=erts_sys_ddll_open(lib_name, &handle, &errdesc)) != ERL_DE_NO_ERROR) {
const char slogan[] = "Failed to load NIF library";
if (strstr(errdesc.str, lib_name) != NULL) {
ret = load_nif_error(BIF_P, "load_failed", "%s: '%s'", slogan, errdesc.str);
@@ -1628,7 +2309,8 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
ret = load_nif_error(BIF_P, "load_failed", "%s %s: '%s'", slogan, lib_name, errdesc.str);
}
}
- else if (erts_sys_ddll_load_nif_init(handle, &init_func, &errdesc) != ERL_DE_NO_ERROR) {
+ else if (init_func == NULL &&
+ erts_sys_ddll_load_nif_init(handle, &init_func, &errdesc) != ERL_DE_NO_ERROR) {
ret = load_nif_error(BIF_P, bad_lib, "Failed to find library init"
" function: '%s'", errdesc.str);
@@ -1637,8 +2319,11 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
(entry = erts_sys_ddll_call_nif_init(init_func)) == NULL)) {
ret = load_nif_error(BIF_P, bad_lib, "Library init-call unsuccessful");
}
- else if (entry->major != ERL_NIF_MAJOR_VERSION
- || entry->minor > ERL_NIF_MINOR_VERSION) {
+ else if (entry->major < ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD
+ || (ERL_NIF_MAJOR_VERSION < entry->major
+ || (ERL_NIF_MAJOR_VERSION == entry->major
+ && ERL_NIF_MINOR_VERSION < entry->minor))
+ || (entry->major==2 && entry->minor == 5)) { /* experimental maps */
ret = load_nif_error(BIF_P, bad_lib, "Library version (%d.%d) not compatible (with %d.%d).",
entry->major, entry->minor, ERL_NIF_MAJOR_VERSION, ERL_NIF_MINOR_VERSION);
@@ -1655,22 +2340,48 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
}
else {
/*erts_fprintf(stderr, "Found module %T\r\n", mod_atom);*/
-
+
+ int maybe_dirty_nifs = ((entry->major > 2 || (entry->major == 2 && entry->minor >= 7))
+ && (entry->options & ERL_NIF_DIRTY_NIF_OPTION));
+ int incr = 0;
+ ErlNifFunc* f = entry->funcs;
for (i=0; i < entry->num_of_funcs && ret==am_ok; i++) {
BeamInstr** code_pp;
- ErlNifFunc* f = &entry->funcs[i];
if (!erts_atom_get(f->name, sys_strlen(f->name), &f_atom, ERTS_ATOM_ENC_LATIN1)
|| (code_pp = get_func_pp(mod->curr.code, f_atom, f->arity))==NULL) {
ret = load_nif_error(BIF_P,bad_lib,"Function not found %T:%s/%u",
mod_atom, f->name, f->arity);
- }
- else if (code_pp[1] - code_pp[0] < (5+3)) {
+ }
+ else if (maybe_dirty_nifs && f->flags) {
+ /*
+ * If the flags field is non-zero and this emulator was
+ * built with dirty scheduler support, check that the flags
+ * value is legal. But if this emulator was built without
+ * dirty scheduler support, treat a non-zero flags field as
+ * a load error.
+ */
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (f->flags != ERL_NIF_DIRTY_JOB_IO_BOUND && f->flags != ERL_NIF_DIRTY_JOB_CPU_BOUND)
+ ret = load_nif_error(BIF_P, bad_lib, "Illegal flags field value %d for NIF %T:%s/%u",
+ f->flags, mod_atom, f->name, f->arity);
+#else
+ ret = load_nif_error(BIF_P, bad_lib, "NIF %T:%s/%u requires a runtime with dirty scheduler support.",
+ mod_atom, f->name, f->arity);
+#endif
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (code_pp[1] - code_pp[0] < (5+4))
+#else
+ else if (code_pp[1] - code_pp[0] < (5+3))
+#endif
+ {
ret = load_nif_error(BIF_P,bad_lib,"No explicit call to load_nif"
- " in module (%T:%s/%u to small)",
- mod_atom, entry->funcs[i].name, entry->funcs[i].arity);
+ " in module (%T:%s/%u too small)",
+ mod_atom, f->name, f->arity);
}
/*erts_fprintf(stderr, "Found NIF %T:%s/%u\r\n",
- mod_atom, entry->funcs[i].name, entry->funcs[i].arity);*/
+ mod_atom, f->name, f->arity);*/
+ f = next_func(entry, &incr, f);
}
}
@@ -1687,10 +2398,17 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
lib->entry = entry;
erts_refc_init(&lib->rt_cnt, 0);
erts_refc_init(&lib->rt_dtor_cnt, 0);
+ ASSERT(opened_rt_list == NULL);
lib->mod = mod;
env.mod_nif = lib;
- if (mod->curr.nif != NULL) { /* Reload */
- int k;
+ if (mod->curr.nif != NULL) { /*************** Reload ******************/
+ /*
+ * Repeated load_nif calls from same Erlang module instance ("reload")
+ * is deprecated and was only ment as a development feature not to
+ * be used in production systems. (See warning below)
+ */
+ int k, old_incr = 0;
+ ErlNifFunc* old_func;
lib->priv_data = mod->curr.nif->priv_data;
ASSERT(mod->curr.nif->entry != NULL);
@@ -1699,13 +2417,16 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
goto error;
}
/* Check that no NIF is removed */
+ old_func = mod->curr.nif->entry->funcs;
for (k=0; k < mod->curr.nif->entry->num_of_funcs; k++) {
- ErlNifFunc* old_func = &mod->curr.nif->entry->funcs[k];
+ int incr = 0;
+ ErlNifFunc* f = entry->funcs;
for (i=0; i < entry->num_of_funcs; i++) {
- if (old_func->arity == entry->funcs[i].arity
- && sys_strcmp(old_func->name, entry->funcs[i].name) == 0) {
+ if (old_func->arity == f->arity
+ && sys_strcmp(old_func->name, f->name) == 0) {
break;
}
+ f = next_func(entry, &incr, f);
}
if (i == entry->num_of_funcs) {
ret = load_nif_error(BIF_P,reload,"Reloaded library missing "
@@ -1713,7 +2434,8 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
old_func->name, old_func->arity);
goto error;
}
- }
+ old_func = next_func(mod->curr.nif->entry, &old_incr, old_func);
+ }
erts_pre_nif(&env, BIF_P, lib);
veto = entry->reload(&env, &lib->priv_data, BIF_ARG_2);
erts_post_nif(&env);
@@ -1721,6 +2443,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
ret = load_nif_error(BIF_P, reload, "Library reload-call unsuccessful.");
}
else {
+ commit_opened_resource_types(lib);
mod->curr.nif->entry = NULL; /* to prevent 'unload' callback */
erts_unload_nif(mod->curr.nif);
reload_warning = 1;
@@ -1728,7 +2451,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
}
else {
lib->priv_data = NULL;
- if (mod->old.nif != NULL) { /* Upgrade */
+ if (mod->old.nif != NULL) { /**************** Upgrade ***************/
void* prev_old_data = mod->old.nif->priv_data;
if (entry->upgrade == NULL) {
ret = load_nif_error(BIF_P, upgrade, "Upgrade not supported by this NIF library.");
@@ -1741,30 +2464,35 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
mod->old.nif->priv_data = prev_old_data;
ret = load_nif_error(BIF_P, upgrade, "Library upgrade-call unsuccessful.");
}
- /*else if (mod->old_nif->priv_data != prev_old_data) {
- refresh_cached_nif_data(mod->old_code, mod->old_nif);
- }*/
+ else
+ commit_opened_resource_types(lib);
}
- else if (entry->load != NULL) { /* Initial load */
+ else if (entry->load != NULL) { /********* Initial load ***********/
erts_pre_nif(&env, BIF_P, lib);
veto = entry->load(&env, &lib->priv_data, BIF_ARG_2);
erts_post_nif(&env);
if (veto) {
ret = load_nif_error(BIF_P, "load", "Library load-call unsuccessful.");
}
+ else
+ commit_opened_resource_types(lib);
}
}
if (ret == am_ok) {
/*
** Everything ok, patch the beam code with op_call_nif
*/
- mod->curr.nif = lib;
+
+ int incr = 0;
+ ErlNifFunc* f = entry->funcs;
+
+ mod->curr.nif = lib;
for (i=0; i < entry->num_of_funcs; i++)
{
BeamInstr* code_ptr;
- erts_atom_get(entry->funcs[i].name, sys_strlen(entry->funcs[i].name), &f_atom, ERTS_ATOM_ENC_LATIN1);
- code_ptr = *get_func_pp(mod->curr.code, f_atom, entry->funcs[i].arity);
-
+ erts_atom_get(f->name, sys_strlen(f->name), &f_atom, ERTS_ATOM_ENC_LATIN1);
+ code_ptr = *get_func_pp(mod->curr.code, f_atom, f->arity);
+
if (code_ptr[1] == 0) {
code_ptr[5+0] = (BeamInstr) BeamOp(op_call_nif);
}
@@ -1772,19 +2500,31 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
GenericBp* g = (GenericBp *) code_ptr[1];
ASSERT(code_ptr[5+0] ==
(BeamInstr) BeamOp(op_i_generic_breakpoint));
- g->orig_instr = (BeamInstr) BeamOp(op_call_nif);
- }
- code_ptr[5+1] = (BeamInstr) entry->funcs[i].fptr;
+ g->orig_instr = (BeamInstr) BeamOp(op_call_nif);
+ }
+ if ((entry->major > 2 || (entry->major == 2 && entry->minor >= 7))
+ && (entry->options & ERL_NIF_DIRTY_NIF_OPTION) && f->flags) {
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+ code_ptr[5+3] = (BeamInstr) f->fptr;
+ code_ptr[5+1] = (f->flags == ERL_NIF_DIRTY_JOB_IO_BOUND) ?
+ (BeamInstr) schedule_dirty_io_nif :
+ (BeamInstr) schedule_dirty_cpu_nif;
+#endif
+ }
+ else
+ code_ptr[5+1] = (BeamInstr) f->fptr;
code_ptr[5+2] = (BeamInstr) lib;
+ f = next_func(entry, &incr, f);
}
}
else {
error:
+ rollback_opened_resource_types();
ASSERT(ret != am_ok);
if (lib != NULL) {
erts_free(ERTS_ALC_T_NIF, lib);
}
- if (handle != NULL) {
+ if (handle != NULL && !erts_is_static_nif(handle)) {
erts_sys_ddll_close(handle);
}
erts_sys_ddll_free_error(&errdesc);
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 8006741a63..849024453c 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,11 @@
#ifndef __ERL_NIF_H__
#define __ERL_NIF_H__
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include "erl_native_features_config.h"
#include "erl_drv_nif.h"
/* Version history:
@@ -34,9 +38,29 @@
** 2.2: R14B03 enif_is_exception
** 2.3: R15 enif_make_reverse_list, enif_is_number
** 2.4: R16 enif_consume_timeslice
+** 2.5: First experimental maps API additions (libs of this version is not compatible with any other VM)
+** 2.5: R17 Maps API additions
+** 2.6: R17 with maps
+** R17 dirty schedulers
+** 2.7: 17.3 add enif_schedule_nif
+** remove enif_schedule_dirty_nif, enif_schedule_dirty_nif_finalizer, enif_dirty_nif_finalizer
+** add ErlNifEntry options
+** add ErlNifFunc flags
*/
#define ERL_NIF_MAJOR_VERSION 2
-#define ERL_NIF_MINOR_VERSION 4
+#define ERL_NIF_MINOR_VERSION 7
+
+/*
+ * The emulator will refuse to load a nif-lib with a major version
+ * lower than ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD. The load
+ * may however fail if user have not removed use of deprecated
+ * symbols.
+ *
+ * The ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD have to allow
+ * loading of nif-libs built at least two major OTP releases
+ * ago.
+ */
+#define ERL_NIF_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD 2
#include <stdlib.h>
@@ -95,6 +119,8 @@ typedef unsigned long long ERL_NIF_TERM;
# endif
#endif
+typedef ERL_NIF_TERM ERL_NIF_UINT;
+
struct enif_environment_t;
typedef struct enif_environment_t ErlNifEnv;
@@ -103,8 +129,10 @@ typedef struct
const char* name;
unsigned arity;
ERL_NIF_TERM (*fptr)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ unsigned flags;
}ErlNifFunc;
+
typedef struct enif_entry_t
{
int major;
@@ -117,8 +145,11 @@ typedef struct enif_entry_t
int (*upgrade)(ErlNifEnv*, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info);
void (*unload) (ErlNifEnv*, void* priv_data);
const char* vm_variant;
+ unsigned options;
}ErlNifEntry;
+/* Field bits for ErlNifEntry options */
+#define ERL_NIF_DIRTY_NIF_OPTION 1
typedef struct
@@ -159,6 +190,29 @@ typedef int ErlNifTSDKey;
typedef ErlDrvThreadOpts ErlNifThreadOpts;
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+typedef enum
+{
+ ERL_NIF_DIRTY_JOB_CPU_BOUND = ERL_DRV_DIRTY_JOB_CPU_BOUND,
+ ERL_NIF_DIRTY_JOB_IO_BOUND = ERL_DRV_DIRTY_JOB_IO_BOUND
+}ErlNifDirtyTaskFlags;
+#endif
+
+typedef struct /* All fields all internal and may change */
+{
+ ERL_NIF_TERM map;
+ ERL_NIF_UINT t_limit;
+ ERL_NIF_UINT idx;
+ ERL_NIF_TERM *ks;
+ ERL_NIF_TERM *vs;
+ void* __spare__[2]; /* for future additions to be ABI compatible (same struct size) */
+} ErlNifMapIterator;
+
+typedef enum {
+ ERL_NIF_MAP_ITERATOR_HEAD = 1,
+ ERL_NIF_MAP_ITERATOR_TAIL = 2
+} ErlNifMapIteratorEntry;
+
#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
# define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) RET_TYPE (*NAME) ARGS
typedef struct {
@@ -168,7 +222,7 @@ extern TWinDynNifCallbacks WinDynNifCallbacks;
# undef ERL_NIF_API_FUNC_DECL
#endif
-#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_)) && !defined(STATIC_ERLANG_DRIVER)
+#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_)) && !defined(STATIC_ERLANG_DRIVER) && !defined(STATIC_ERLANG_NIF)
# define ERL_NIF_API_FUNC_MACRO(NAME) (WinDynNifCallbacks.NAME)
# include "erl_nif_api_funcs.h"
/* note that we have to keep ERL_NIF_API_FUNC_MACRO defined */
@@ -180,17 +234,29 @@ extern TWinDynNifCallbacks WinDynNifCallbacks;
# undef ERL_NIF_API_FUNC_DECL
#endif
-
#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
# define ERL_NIF_INIT_GLOB TWinDynNifCallbacks WinDynNifCallbacks;
-# define ERL_NIF_INIT_DECL(MODNAME) __declspec(dllexport) ErlNifEntry* nif_init(TWinDynNifCallbacks* callbacks)
+# ifdef STATIC_ERLANG_NIF
+# define ERL_NIF_INIT_DECL(MODNAME) __declspec(dllexport) ErlNifEntry* MODNAME ## _nif_init(TWinDynNifCallbacks* callbacks)
+# else
+# define ERL_NIF_INIT_DECL(MODNAME) __declspec(dllexport) ErlNifEntry* nif_init(TWinDynNifCallbacks* callbacks)
+# endif
# define ERL_NIF_INIT_BODY memcpy(&WinDynNifCallbacks,callbacks,sizeof(TWinDynNifCallbacks))
#else
# define ERL_NIF_INIT_GLOB
# define ERL_NIF_INIT_BODY
-# define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* nif_init(void)
+# ifdef STATIC_ERLANG_NIF
+# define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* MODNAME ## _nif_init(void)
+# else
+# define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* nif_init(void)
+# endif
#endif
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+# define ERL_NIF_ENTRY_OPTIONS ERL_NIF_DIRTY_NIF_OPTION
+#else
+# define ERL_NIF_ENTRY_OPTIONS 0
+#endif
#ifdef __cplusplus
}
@@ -216,7 +282,8 @@ ERL_NIF_INIT_DECL(NAME) \
sizeof(FUNCS) / sizeof(*FUNCS), \
FUNCS, \
LOAD, RELOAD, UPGRADE, UNLOAD, \
- ERL_NIF_VM_VARIANT \
+ ERL_NIF_VM_VARIANT, \
+ ERL_NIF_ENTRY_OPTIONS \
}; \
ERL_NIF_INIT_BODY; \
return &entry; \
diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h
index 2f841645e1..630cefae93 100644
--- a/erts/emulator/beam/erl_nif_api_funcs.h
+++ b/erts/emulator/beam/erl_nif_api_funcs.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
#endif
/*
-** WARNING: add new ERL_NIF_API_FUNC_DECL entries at the bottom of the list
+** WARNING: Add new ERL_NIF_API_FUNC_DECL entries at the bottom of the list
** to keep compatibility on Windows!!!
**
** And don't forget to increase ERL_NIF_MINOR_VERSION in erl_nif.h
@@ -141,11 +141,36 @@ ERL_NIF_API_FUNC_DECL(int,enif_is_number,(ErlNifEnv*, ERL_NIF_TERM term));
ERL_NIF_API_FUNC_DECL(void*,enif_dlopen,(const char* lib, void (*err_handler)(void*,const char*), void* err_arg));
ERL_NIF_API_FUNC_DECL(void*,enif_dlsym,(void* handle, const char* symbol, void (*err_handler)(void*,const char*), void* err_arg));
ERL_NIF_API_FUNC_DECL(int,enif_consume_timeslice,(ErlNifEnv*, int percent));
+ERL_NIF_API_FUNC_DECL(int, enif_is_map, (ErlNifEnv* env, ERL_NIF_TERM term));
+ERL_NIF_API_FUNC_DECL(int, enif_get_map_size, (ErlNifEnv* env, ERL_NIF_TERM term, size_t *size));
+ERL_NIF_API_FUNC_DECL(ERL_NIF_TERM, enif_make_new_map, (ErlNifEnv* env));
+ERL_NIF_API_FUNC_DECL(int, enif_make_map_put, (ErlNifEnv* env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM value, ERL_NIF_TERM* map_out));
+ERL_NIF_API_FUNC_DECL(int, enif_get_map_value, (ErlNifEnv* env, ERL_NIF_TERM map, ERL_NIF_TERM key, ERL_NIF_TERM* value));
+ERL_NIF_API_FUNC_DECL(int, enif_make_map_update, (ErlNifEnv* env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM value, ERL_NIF_TERM* map_out));
+ERL_NIF_API_FUNC_DECL(int, enif_make_map_remove, (ErlNifEnv* env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM* map_out));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_create, (ErlNifEnv *env, ERL_NIF_TERM map, ErlNifMapIterator *iter, ErlNifMapIteratorEntry entry));
+ERL_NIF_API_FUNC_DECL(void, enif_map_iterator_destroy, (ErlNifEnv *env, ErlNifMapIterator *iter));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_is_head, (ErlNifEnv *env, ErlNifMapIterator *iter));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_is_tail, (ErlNifEnv *env, ErlNifMapIterator *iter));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_next, (ErlNifEnv *env, ErlNifMapIterator *iter));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_prev, (ErlNifEnv *env, ErlNifMapIterator *iter));
+ERL_NIF_API_FUNC_DECL(int, enif_map_iterator_get_pair, (ErlNifEnv *env, ErlNifMapIterator *iter, ERL_NIF_TERM *key, ERL_NIF_TERM *value));
+ERL_NIF_API_FUNC_DECL(ERL_NIF_TERM,enif_schedule_nif,(ErlNifEnv*,const char*,int,ERL_NIF_TERM (*)(ErlNifEnv*,int,const ERL_NIF_TERM[]),int,const ERL_NIF_TERM[]));
/*
-** Add new entries here to keep compatibility on Windows!!!
+** ADD NEW ENTRIES HERE (before this comment) !!!
*/
+
+
+/*
+ * Conditional EXPERIMENTAL stuff always last.
+ * Must be moved up and made unconditional to support binary backward
+ * compatibility on Windows.
+ */
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+ERL_NIF_API_FUNC_DECL(int,enif_is_on_dirty_scheduler,(ErlNifEnv*));
#endif
+#endif /* ERL_NIF_API_FUNC_DECL */
/*
** Please keep the ERL_NIF_API_FUNC_MACRO list below in the same order
@@ -259,18 +284,41 @@ ERL_NIF_API_FUNC_DECL(int,enif_consume_timeslice,(ErlNifEnv*, int percent));
# define enif_make_int64 ERL_NIF_API_FUNC_MACRO(enif_make_int64)
# define enif_make_uint64 ERL_NIF_API_FUNC_MACRO(enif_make_uint64)
#endif
-
# define enif_is_exception ERL_NIF_API_FUNC_MACRO(enif_is_exception)
# define enif_make_reverse_list ERL_NIF_API_FUNC_MACRO(enif_make_reverse_list)
# define enif_is_number ERL_NIF_API_FUNC_MACRO(enif_is_number)
# define enif_dlopen ERL_NIF_API_FUNC_MACRO(enif_dlopen)
# define enif_dlsym ERL_NIF_API_FUNC_MACRO(enif_dlsym)
# define enif_consume_timeslice ERL_NIF_API_FUNC_MACRO(enif_consume_timeslice)
+# define enif_is_map ERL_NIF_API_FUNC_MACRO(enif_is_map)
+# define enif_get_map_size ERL_NIF_API_FUNC_MACRO(enif_get_map_size)
+# define enif_make_new_map ERL_NIF_API_FUNC_MACRO(enif_make_new_map)
+# define enif_make_map_put ERL_NIF_API_FUNC_MACRO(enif_make_map_put)
+# define enif_get_map_value ERL_NIF_API_FUNC_MACRO(enif_get_map_value)
+# define enif_make_map_update ERL_NIF_API_FUNC_MACRO(enif_make_map_update)
+# define enif_make_map_remove ERL_NIF_API_FUNC_MACRO(enif_make_map_remove)
+# define enif_map_iterator_create ERL_NIF_API_FUNC_MACRO(enif_map_iterator_create)
+# define enif_map_iterator_destroy ERL_NIF_API_FUNC_MACRO(enif_map_iterator_destroy)
+# define enif_map_iterator_is_head ERL_NIF_API_FUNC_MACRO(enif_map_iterator_is_head)
+# define enif_map_iterator_is_tail ERL_NIF_API_FUNC_MACRO(enif_map_iterator_is_tail)
+# define enif_map_iterator_next ERL_NIF_API_FUNC_MACRO(enif_map_iterator_next)
+# define enif_map_iterator_prev ERL_NIF_API_FUNC_MACRO(enif_map_iterator_prev)
+# define enif_map_iterator_get_pair ERL_NIF_API_FUNC_MACRO(enif_map_iterator_get_pair)
+# define enif_schedule_nif ERL_NIF_API_FUNC_MACRO(enif_schedule_nif)
/*
-** Add new entries here
+** ADD NEW ENTRIES HERE (before this comment)
*/
+
+/*
+ * Conditional EXPERIMENTAL stuff always last
+ * Must be moved up and made unconditional to support binary backward
+ * compatibility on Windows.
+ */
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+# define enif_is_on_dirty_scheduler ERL_NIF_API_FUNC_MACRO(enif_is_on_dirty_scheduler)
#endif
+#endif /* ERL_NIF_API_FUNC_MACRO */
#if defined(__GNUC__) && !(defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 547a42beb2..2aa0a27197 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -32,6 +32,7 @@
#include "global.h"
#include "erl_port_task.h"
#include "dist.h"
+#include "erl_check_io.h"
#include "dtrace-wrapper.h"
#include <stdarg.h>
@@ -68,6 +69,13 @@ static void chk_task_queues(Port *pp, ErtsPortTask *execq, int processing_busy_q
#define DTRACE_DRIVER(PROBE_NAME, PP) do {} while(0)
#endif
+#define ERTS_SMP_LC_VERIFY_RQ(RQ, PP) \
+ do { \
+ ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(runq)); \
+ ERTS_SMP_LC_ASSERT((RQ) == ((ErtsRunQueue *) \
+ erts_smp_atomic_read_nob(&(PP)->run_queue))); \
+ } while (0)
+
erts_smp_atomic_t erts_port_task_outstanding_io_tasks;
#define ERTS_PT_STATE_SCHEDULED 0
@@ -543,6 +551,16 @@ reset_handle(ErtsPortTask *ptp)
}
static ERTS_INLINE void
+reset_executed_io_task_handle(ErtsPortTask *ptp)
+{
+ if (ptp->u.alive.handle) {
+ ASSERT(ptp == handle2task(ptp->u.alive.handle));
+ erts_io_notify_port_task_executed(ptp->u.alive.handle);
+ reset_port_task_handle(ptp->u.alive.handle);
+ }
+}
+
+static ERTS_INLINE void
set_handle(ErtsPortTask *ptp, ErtsPortTaskHandle *pthp)
{
ptp->u.alive.handle = pthp;
@@ -798,12 +816,13 @@ schedule_port_task_handle_list_free(ErtsPortTaskHandleList *pthlp)
static ERTS_INLINE void
abort_nosuspend_task(Port *pp,
ErtsPortTaskType type,
- ErtsPortTaskTypeData *tdp)
+ ErtsPortTaskTypeData *tdp,
+ int bpq_data)
{
ASSERT(type == ERTS_PORT_TASK_PROC_SIG);
- if (!pp->sched.taskq.bpq)
+ if (!bpq_data)
tdp->psig.callback(NULL,
ERTS_PORT_SFLG_INVALID,
ERTS_PROC2PORT_SIG_ABORT_NOSUSPEND,
@@ -877,6 +896,11 @@ enqueue_port(ErtsRunQueue *runq, Port *pp)
ASSERT(runq->ports.start && runq->ports.end);
erts_smp_inc_runq_len(runq, &runq->ports.info, ERTS_PORT_PRIO_LEVEL);
+
+#ifdef ERTS_SMP
+ if (runq->halt_in_progress)
+ erts_non_empty_runq(runq);
+#endif
}
static ERTS_INLINE Port *
@@ -986,6 +1010,7 @@ static ERTS_INLINE int
finalize_exec(Port *pp, ErtsPortTask **execq, int processing_busy_q)
{
erts_aint32_t act;
+ unsigned int prof_runnable_ports;
if (!processing_busy_q)
pp->sched.taskq.local.first = *execq;
@@ -1002,6 +1027,10 @@ finalize_exec(Port *pp, ErtsPortTask **execq, int processing_busy_q)
if (act & ERTS_PTS_FLG_CHK_UNSET_BUSY_PORT_Q)
act = check_unset_busy_port_q(pp, act, pp->sched.taskq.bpq);
+ prof_runnable_ports = erts_system_profile_flags.runnable_ports;
+ if (prof_runnable_ports)
+ erts_port_task_sched_lock(&pp->sched);
+
while (1) {
erts_aint32_t new, exp;
@@ -1013,12 +1042,24 @@ finalize_exec(Port *pp, ErtsPortTask **execq, int processing_busy_q)
act = erts_smp_atomic32_cmpxchg_relb(&pp->sched.flags, new, exp);
- ASSERT(!(act & ERTS_PTS_FLG_IN_RUNQ));
+ ERTS_LC_ASSERT(!(act & ERTS_PTS_FLG_IN_RUNQ));
+ ERTS_LC_ASSERT(!(act & ERTS_PTS_FLG_EXEC_IMM));
if (exp == act)
break;
}
+ if (prof_runnable_ports | IS_TRACED_FL(pp, F_TRACE_SCHED_PORTS)) {
+ /* trace port scheduling, out */
+ if (IS_TRACED_FL(pp, F_TRACE_SCHED_PORTS))
+ trace_sched_ports(pp, am_out);
+ if (prof_runnable_ports) {
+ if (!(act & (ERTS_PTS_FLG_EXEC_IMM|ERTS_PTS_FLG_HAVE_TASKS)))
+ profile_runnable_port(pp, am_inactive);
+ erts_port_task_sched_unlock(&pp->sched);
+ }
+ }
+
return (act & ERTS_PTS_FLG_HAVE_TASKS) != 0;
}
@@ -1340,7 +1381,7 @@ erts_port_task_abort_nosuspend_tasks(Port *pp)
#endif
schedule_port_task_handle_list_free(pthlp);
- abort_nosuspend_task(pp, type, &td);
+ abort_nosuspend_task(pp, type, &td, pp->sched.taskq.bpq != NULL);
}
}
@@ -1364,11 +1405,9 @@ erts_port_task_schedule(Eterm id,
Port *pp;
ErtsPortTask *ptp = NULL;
erts_aint32_t act, add_flags;
+ unsigned int prof_runnable_ports;
- if (pthp && erts_port_task_is_scheduled(pthp)) {
- ASSERT(0);
- erts_port_task_abort(pthp);
- }
+ ERTS_LC_ASSERT(!pthp || !erts_port_task_is_scheduled(pthp));
ASSERT(is_internal_port(id));
@@ -1452,6 +1491,10 @@ erts_port_task_schedule(Eterm id,
if (ns_pthlp)
add_flags |= ERTS_PTS_FLG_HAVE_NS_TASKS;
+ prof_runnable_ports = erts_system_profile_flags.runnable_ports;
+ if (prof_runnable_ports)
+ erts_port_task_sched_lock(&pp->sched);
+
while (1) {
erts_aint32_t new, exp;
@@ -1476,6 +1519,13 @@ erts_port_task_schedule(Eterm id,
goto done; /* Died after our task insert... */
}
+ if (prof_runnable_ports) {
+ if (!(act & ERTS_PTS_FLG_EXEC_IMM))
+ profile_runnable_port(pp, am_active);
+ erts_port_task_sched_unlock(&pp->sched);
+ prof_runnable_ports = 0;
+ }
+
/* Enqueue port on run-queue */
runq = erts_port_runq(pp);
@@ -1484,8 +1534,10 @@ erts_port_task_schedule(Eterm id,
#ifdef ERTS_SMP
xrunq = erts_check_emigration_need(runq, ERTS_PORT_PRIO_LEVEL);
+ ERTS_SMP_LC_ASSERT(runq != xrunq);
+ ERTS_SMP_LC_VERIFY_RQ(runq, pp);
if (xrunq) {
- /* Port emigrated ... */
+ /* Emigrate port ... */
erts_smp_atomic_set_nob(&pp->run_queue, (erts_aint_t) xrunq);
erts_smp_runq_unlock(runq);
runq = erts_port_runq(pp);
@@ -1495,10 +1547,6 @@ erts_port_task_schedule(Eterm id,
#endif
enqueue_port(runq, pp);
-
- if (erts_system_profile_flags.runnable_ports) {
- profile_runnable_port(pp, am_active);
- }
erts_smp_runq_unlock(runq);
@@ -1506,6 +1554,9 @@ erts_port_task_schedule(Eterm id,
done:
+ if (prof_runnable_ports)
+ erts_port_task_sched_unlock(&pp->sched);
+
#ifdef ERTS_SMP
if (dhndl != ERTS_THR_PRGR_DHANDLE_MANAGED)
erts_port_dec_refc(pp);
@@ -1520,7 +1571,7 @@ abort_nosuspend:
erts_port_dec_refc(pp);
#endif
- abort_nosuspend_task(pp, ptp->type, &ptp->u.alive.td);
+ abort_nosuspend_task(pp, ptp->type, &ptp->u.alive.td, 0);
ASSERT(ns_pthlp);
erts_free(ERTS_ALC_T_PT_HNDL_LIST, ns_pthlp);
@@ -1604,6 +1655,8 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
goto done;
}
+ ERTS_SMP_LC_VERIFY_RQ(runq, pp);
+
erts_smp_runq_unlock(runq);
*curr_port_pp = pp;
@@ -1654,8 +1707,6 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
goto aborted_port_task;
}
- reset_handle(ptp);
-
if (erts_system_monitor_long_schedule != 0) {
start_time = erts_timestamp_millis();
}
@@ -1666,6 +1717,7 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
switch (ptp->type) {
case ERTS_PORT_TASK_TIMEOUT:
+ reset_handle(ptp);
reds = ERTS_PORT_REDS_TIMEOUT;
if (!(state & ERTS_PORT_SFLGS_DEAD)) {
DTRACE_DRIVER(driver_timeout, pp);
@@ -1676,9 +1728,11 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
reds = ERTS_PORT_REDS_INPUT;
ASSERT((state & ERTS_PORT_SFLGS_DEAD) == 0);
DTRACE_DRIVER(driver_ready_input, pp);
- /* NOTE some windows drivers use ->ready_input for input and output */
+ /* NOTE some windows/ose drivers use ->ready_input
+ for input and output */
(*pp->drv_ptr->ready_input)((ErlDrvData) pp->drv_data,
ptp->u.alive.td.io.event);
+ reset_executed_io_task_handle(ptp);
io_tasks_executed++;
break;
case ERTS_PORT_TASK_OUTPUT:
@@ -1687,6 +1741,7 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
DTRACE_DRIVER(driver_ready_output, pp);
(*pp->drv_ptr->ready_output)((ErlDrvData) pp->drv_data,
ptp->u.alive.td.io.event);
+ reset_executed_io_task_handle(ptp);
io_tasks_executed++;
break;
case ERTS_PORT_TASK_EVENT:
@@ -1696,10 +1751,12 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
(*pp->drv_ptr->event)((ErlDrvData) pp->drv_data,
ptp->u.alive.td.io.event,
ptp->u.alive.td.io.event_data);
+ reset_executed_io_task_handle(ptp);
io_tasks_executed++;
break;
case ERTS_PORT_TASK_PROC_SIG: {
ErtsProc2PortSigData *sigdp = &ptp->u.alive.td.psig.data;
+ reset_handle(ptp);
ASSERT((state & ERTS_PORT_SFLGS_DEAD) == 0);
if (!pp->sched.taskq.bpq)
reds = ptp->u.alive.td.psig.callback(pp,
@@ -1717,6 +1774,7 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
break;
}
case ERTS_PORT_TASK_DIST_CMD:
+ reset_handle(ptp);
reds = erts_dist_command(pp, CONTEXT_REDS - pp->reds);
break;
default:
@@ -1759,10 +1817,6 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
erts_unblock_fpe(fpe_was_unmasked);
- /* trace port scheduling, out */
- if (IS_TRACED_FL(pp, F_TRACE_SCHED_PORTS)) {
- trace_sched_ports(pp, am_out);
- }
if (io_tasks_executed) {
ASSERT(erts_smp_atomic_read_nob(&erts_port_task_outstanding_io_tasks)
@@ -1785,11 +1839,7 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
erts_smp_runq_lock(runq);
- if (!active) {
- if (erts_system_profile_flags.runnable_ports)
- profile_runnable_port(pp, am_inactive);
- }
- else {
+ if (active) {
#ifdef ERTS_SMP
ErtsRunQueue *xrunq;
#endif
@@ -1798,6 +1848,8 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
#ifdef ERTS_SMP
xrunq = erts_check_emigration_need(runq, ERTS_PORT_PRIO_LEVEL);
+ ERTS_SMP_LC_ASSERT(runq != xrunq);
+ ERTS_SMP_LC_VERIFY_RQ(runq, pp);
if (!xrunq) {
#endif
enqueue_port(runq, pp);
@@ -1805,7 +1857,7 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
#ifdef ERTS_SMP
}
else {
- /* Port emigrated ... */
+ /* Emigrate port... */
erts_smp_atomic_set_nob(&pp->run_queue, (erts_aint_t) xrunq);
erts_smp_runq_unlock(runq);
@@ -2029,9 +2081,9 @@ begin_port_cleanup(Port *pp, ErtsPortTask **execqp, int *processing_busy_q_p)
DTRACE_CHARBUF(pid_str, 16);
ErtsProcList* plp2 = plp;
- erts_snprintf(port_str, sizeof(port_str), "%T", pp->common.id);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", pp->common.id);
while (plp2 != NULL) {
- erts_snprintf(pid_str, sizeof(pid_str), "%T", plp2->pid);
+ erts_snprintf(pid_str, sizeof(DTRACE_CHARBUF_NAME(pid_str)), "%T", plp2->pid);
DTRACE2(process_port_unblocked, pid_str, port_str);
}
}
diff --git a/erts/emulator/beam/erl_port_task.h b/erts/emulator/beam/erl_port_task.h
index 123253a057..406cd3c492 100644
--- a/erts/emulator/beam/erl_port_task.h
+++ b/erts/emulator/beam/erl_port_task.h
@@ -78,6 +78,7 @@ extern erts_smp_atomic_t erts_port_task_outstanding_io_tasks;
#define ERTS_PTS_FLG_PARALLELISM (((erts_aint32_t) 1) << 9)
#define ERTS_PTS_FLG_FORCE_SCHED (((erts_aint32_t) 1) << 10)
#define ERTS_PTS_FLG_EXITING (((erts_aint32_t) 1) << 11)
+#define ERTS_PTS_FLG_EXEC_IMM (((erts_aint32_t) 1) << 12)
#define ERTS_PTS_FLGS_BUSY \
(ERTS_PTS_FLG_BUSY_PORT | ERTS_PTS_FLG_BUSY_PORT_Q)
@@ -87,6 +88,7 @@ extern erts_smp_atomic_t erts_port_task_outstanding_io_tasks;
| ERTS_PTS_FLG_HAVE_BUSY_TASKS \
| ERTS_PTS_FLG_HAVE_TASKS \
| ERTS_PTS_FLG_EXEC \
+ | ERTS_PTS_FLG_EXEC_IMM \
| ERTS_PTS_FLG_FORCE_SCHED \
| ERTS_PTS_FLG_EXITING)
@@ -154,7 +156,7 @@ erts_port_task_handle_init(ErtsPortTaskHandle *pthp)
ERTS_GLB_INLINE int
erts_port_task_is_scheduled(ErtsPortTaskHandle *pthp)
{
- return ((void *) erts_smp_atomic_read_nob(pthp)) != NULL;
+ return ((void *) erts_smp_atomic_read_acqb(pthp)) != NULL;
}
ERTS_GLB_INLINE void erts_port_task_pre_init_sched(ErtsPortTaskSched *ptsp,
@@ -185,11 +187,13 @@ erts_port_task_init_sched(ErtsPortTaskSched *ptsp, Eterm instr_id)
ptsp->taskq.in.last = NULL;
erts_smp_atomic32_init_nob(&ptsp->flags, 0);
#ifdef ERTS_SMP
+ erts_mtx_init_x(&ptsp->mtx, lock_str, instr_id,
#ifdef ERTS_ENABLE_LOCK_COUNT
- if (!(erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK))
- lock_str = NULL;
+ (erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK)
+#else
+ 1
#endif
- erts_mtx_init_x(&ptsp->mtx, lock_str, instr_id);
+ );
#endif
}
diff --git a/erts/emulator/beam/erl_printf_term.c b/erts/emulator/beam/erl_printf_term.c
index 436147749e..d18760dc43 100644
--- a/erts/emulator/beam/erl_printf_term.c
+++ b/erts/emulator/beam/erl_printf_term.c
@@ -24,6 +24,7 @@
#include "erl_printf_term.h"
#include "sys.h"
#include "big.h"
+#include "erl_map.h"
#define PRINT_CHAR(CNT, FN, ARG, C) \
do { \
@@ -216,14 +217,15 @@ static int print_atom_name(fmtfn_t fn, void* arg, Eterm atom, long *dcount)
}
-#define PRT_BAR ((Eterm) 0)
-#define PRT_COMMA ((Eterm) 1)
-#define PRT_CLOSE_LIST ((Eterm) 2)
-#define PRT_CLOSE_TUPLE ((Eterm) 3)
-#define PRT_TERM ((Eterm) 4)
-#define PRT_ONE_CONS ((Eterm) 5)
-#define PRT_PATCH_FUN_SIZE ((Eterm) 6)
-#define PRT_LAST_ARRAY_ELEMENT ((Eterm) 7) /* Note! Must be last... */
+#define PRT_BAR ((Eterm) 0)
+#define PRT_COMMA ((Eterm) 1)
+#define PRT_CLOSE_LIST ((Eterm) 2)
+#define PRT_CLOSE_TUPLE ((Eterm) 3)
+#define PRT_ASSOC ((Eterm) 4)
+#define PRT_TERM ((Eterm) 5)
+#define PRT_ONE_CONS ((Eterm) 6)
+#define PRT_PATCH_FUN_SIZE ((Eterm) 7)
+#define PRT_LAST_ARRAY_ELEMENT ((Eterm) 8) /* Note! Must be last... */
static int
print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount,
@@ -260,6 +262,9 @@ print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount,
case PRT_CLOSE_TUPLE:
PRINT_CHAR(res, fn, arg, '}');
goto L_outer_loop;
+ case PRT_ASSOC:
+ PRINT_STRING(res, fn, arg, "=>");
+ goto L_outer_loop;
default:
popped.word = WSTACK_POP(s);
@@ -483,6 +488,37 @@ print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount,
PRINT_CHAR(res, fn, arg, '>');
}
break;
+ case MAP_DEF:
+ {
+ Uint n;
+ Eterm *ks, *vs;
+ map_t *mp = (map_t *)map_val(wobj);
+ n = map_get_size(mp);
+ ks = map_get_keys(mp);
+ vs = map_get_values(mp);
+
+ PRINT_CHAR(res, fn, arg, '#');
+ PRINT_CHAR(res, fn, arg, '{');
+ WSTACK_PUSH(s, PRT_CLOSE_TUPLE);
+ if (n > 0) {
+ n--;
+ WSTACK_PUSH(s, vs[n]);
+ WSTACK_PUSH(s, PRT_TERM);
+ WSTACK_PUSH(s, PRT_ASSOC);
+ WSTACK_PUSH(s, ks[n]);
+ WSTACK_PUSH(s, PRT_TERM);
+
+ while (n--) {
+ WSTACK_PUSH(s, PRT_COMMA);
+ WSTACK_PUSH(s, vs[n]);
+ WSTACK_PUSH(s, PRT_TERM);
+ WSTACK_PUSH(s, PRT_ASSOC);
+ WSTACK_PUSH(s, ks[n]);
+ WSTACK_PUSH(s, PRT_TERM);
+ }
+ }
+ }
+ break;
default:
PRINT_STRING(res, fn, arg, "<unknown:");
PRINT_POINTER(res, fn, arg, wobj);
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 1efd070afd..ea63d20dfa 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -44,6 +44,7 @@
#include "dtrace-wrapper.h"
#include "erl_ptab.h"
+
#define ERTS_DELAYED_WAKEUP_INFINITY (~(Uint64) 0)
#define ERTS_DELAYED_WAKEUP_REDUCTIONS ((Uint64) CONTEXT_REDS/2)
@@ -53,7 +54,11 @@
#define ERTS_PROC_MIN_CONTEXT_SWITCH_REDS_COST (CONTEXT_REDS/10)
+#ifndef ERTS_SCHED_MIN_SPIN
#define ERTS_SCHED_SPIN_UNTIL_YIELD 100
+#else
+#define ERTS_SCHED_SPIN_UNTIL_YIELD 1
+#endif
#define ERTS_SCHED_SYS_SLEEP_SPINCOUNT_VERY_LONG 40
#define ERTS_SCHED_AUX_WORK_SLEEP_SPINCOUNT_FACT_VERY_LONG 1000
@@ -143,8 +148,19 @@ extern BeamInstr beam_apply[];
extern BeamInstr beam_exit[];
extern BeamInstr beam_continue_exit[];
+#ifdef __OSE__
+/* Eager check I/O not supported on OSE yet. */
+int erts_eager_check_io = 0;
+#else
+int erts_eager_check_io = 0;
+#endif
int erts_sched_compact_load;
+int erts_sched_balance_util = 0;
Uint erts_no_schedulers;
+#ifdef ERTS_DIRTY_SCHEDULERS
+Uint erts_no_dirty_cpu_schedulers;
+Uint erts_no_dirty_io_schedulers;
+#endif
#define ERTS_THR_PRGR_LATER_CLEANUP_OP_THRESHOLD_VERY_LAZY (4*1024*1024)
#define ERTS_THR_PRGR_LATER_CLEANUP_OP_THRESHOLD_LAZY (512*1024)
@@ -182,6 +198,13 @@ static ErtsAuxWorkData *aux_thread_aux_work_data;
#define ERTS_SCHDLR_SSPND_CHNG_SET(VAL, OLD_VAL) \
erts_smp_atomic32_set_nob(&schdlr_sspnd.changing, (VAL))
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(VAL, OLD_VAL) \
+ erts_smp_atomic32_set_nob(&schdlr_sspnd.dirty_cpu_changing, (VAL))
+#define ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(VAL, OLD_VAL) \
+ erts_smp_atomic32_set_nob(&schdlr_sspnd.dirty_io_changing, (VAL))
+#endif
+
#else
#define ERTS_SCHDLR_SSPND_CHNG_SET(VAL, OLD_VAL) \
@@ -192,6 +215,23 @@ do { \
ASSERT(old_val__ == (OLD_VAL)); \
} while (0)
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(VAL, OLD_VAL) \
+do { \
+ erts_aint32_t old_val__; \
+ old_val__ = erts_smp_atomic32_xchg_nob(&schdlr_sspnd.dirty_cpu_changing, \
+ (VAL)); \
+ ASSERT(old_val__ == (OLD_VAL)); \
+} while (0)
+#define ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(VAL, OLD_VAL) \
+do { \
+ erts_aint32_t old_val__; \
+ old_val__ = erts_smp_atomic32_xchg_nob(&schdlr_sspnd.dirty_io_changing, \
+ (VAL)); \
+ ASSERT(old_val__ == (OLD_VAL)); \
+} while (0)
+#endif
+
#endif
@@ -201,11 +241,29 @@ static struct {
int online;
int curr_online;
int wait_curr_online;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ int dirty_cpu_online;
+ int dirty_cpu_curr_online;
+ int dirty_cpu_wait_curr_online;
+ int dirty_io_online;
+ int dirty_io_curr_online;
+ int dirty_io_wait_curr_online;
+#endif
erts_smp_atomic32_t changing;
erts_smp_atomic32_t active;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_smp_atomic32_t dirty_cpu_changing;
+ erts_smp_atomic32_t dirty_cpu_active;
+ erts_smp_atomic32_t dirty_io_changing;
+ erts_smp_atomic32_t dirty_io_active;
+#endif
struct {
int ongoing;
long wait_active;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ long dirty_cpu_wait_active;
+ long dirty_io_wait_active;
+#endif
ErtsProcList *procs;
} msb; /* Multi Scheduling Block */
} schdlr_sspnd;
@@ -258,6 +316,10 @@ ErtsAlignedRunQueue *erts_aligned_run_queues;
Uint erts_no_run_queues;
ErtsAlignedSchedulerData *erts_aligned_scheduler_data;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ErtsAlignedSchedulerData *erts_aligned_dirty_cpu_scheduler_data;
+ErtsAlignedSchedulerData *erts_aligned_dirty_io_scheduler_data;
+#endif
typedef union {
ErtsSchedulerSleepInfo ssi;
@@ -265,6 +327,12 @@ typedef union {
} ErtsAlignedSchedulerSleepInfo;
static ErtsAlignedSchedulerSleepInfo *aligned_sched_sleep_info;
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+static ErtsAlignedSchedulerSleepInfo *aligned_dirty_cpu_sched_sleep_info;
+static ErtsAlignedSchedulerSleepInfo *aligned_dirty_io_sched_sleep_info;
+#endif
+#endif
static Uint last_reductions;
static Uint last_exact_reductions;
@@ -283,6 +351,40 @@ struct erts_system_profile_flags_t erts_system_profile_flags;
#error "Need to store process_count in another type"
#endif
+typedef enum {
+ ERTS_PSTT_GC, /* Garbage Collect */
+ ERTS_PSTT_CPC /* Check Process Code */
+} ErtsProcSysTaskType;
+
+#define ERTS_MAX_PROC_SYS_TASK_ARGS 2
+
+struct ErtsProcSysTask_ {
+ ErtsProcSysTask *next;
+ ErtsProcSysTask *prev;
+ ErtsProcSysTaskType type;
+ Eterm requester;
+ Eterm reply_tag;
+ Eterm req_id;
+ Uint req_id_sz;
+ Eterm arg[ERTS_MAX_PROC_SYS_TASK_ARGS];
+ ErlOffHeap off_heap;
+ Eterm heap[1];
+};
+
+#define ERTS_PROC_SYS_TASK_SIZE(HSz) \
+ (sizeof(ErtsProcSysTask) - sizeof(Eterm) + sizeof(Eterm)*(HSz))
+
+struct ErtsProcSysTaskQs_ {
+ int qmask;
+ int ncount;
+ ErtsProcSysTask *q[ERTS_NO_PROC_PRIO_LEVELS];
+};
+
+ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(proc_sys_task_queues,
+ ErtsProcSysTaskQs,
+ 50,
+ ERTS_ALC_T_PROC_SYS_TSK_QS)
+
ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(misc_op_list,
ErtsMiscOpList,
10,
@@ -297,6 +399,16 @@ ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(proclist,
(ASSERT(-1 <= ((int) (IX)) \
&& ((int) (IX)) < ((int) erts_no_schedulers)), \
&aligned_sched_sleep_info[(IX)].ssi)
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(IX) \
+ (ASSERT(0 <= ((int) (IX)) \
+ && ((int) (IX)) < ((int) erts_no_dirty_cpu_schedulers)), \
+ &aligned_dirty_cpu_sched_sleep_info[(IX)].ssi)
+#define ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(IX) \
+ (ASSERT(0 <= ((int) (IX)) \
+ && ((int) (IX)) < ((int) erts_no_dirty_io_schedulers)), \
+ &aligned_dirty_io_sched_sleep_info[(IX)].ssi)
+#endif
#define ERTS_FOREACH_RUNQ(RQVAR, DO) \
do { \
@@ -353,6 +465,14 @@ static void aux_work_timeout_early_init(int no_schedulers);
static void aux_work_timeout_late_init(void);
static void setup_aux_work_timer(void);
+static int execute_sys_tasks(Process *c_p,
+ erts_aint32_t *statep,
+ int in_reds);
+static int cleanup_sys_tasks(Process *c_p,
+ erts_aint32_t in_state,
+ int in_reds);
+
+
#if defined(DEBUG) || 0
#define ERTS_DBG_CHK_AUX_WORK_VAL(V) dbg_chk_aux_work_val((V))
static void
@@ -399,7 +519,7 @@ dbg_chk_aux_work_val(erts_aint32_t value)
#ifdef ERTS_SMP
static void handle_pending_exiters(ErtsProcList *);
-
+static void wake_scheduler(ErtsRunQueue *rq);
#endif
#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_CHECK)
@@ -439,7 +559,7 @@ void
erts_pre_init_process(void)
{
#ifdef USE_THREADS
- erts_tsd_key_create(&sched_data_key);
+ erts_tsd_key_create(&sched_data_key, "erts_sched_data_key");
#endif
#ifdef ERTS_ENABLE_LOCK_CHECK
@@ -471,6 +591,16 @@ erts_pre_init_process(void)
erts_psd_required_locks[ERTS_PSD_CALL_TIME_BP].set_locks
= ERTS_PSD_CALL_TIME_BP_SET_LOCKS;
+ erts_psd_required_locks[ERTS_PSD_DELAYED_GC_TASK_QS].get_locks
+ = ERTS_PSD_DELAYED_GC_TASK_QS_GET_LOCKS;
+ erts_psd_required_locks[ERTS_PSD_DELAYED_GC_TASK_QS].set_locks
+ = ERTS_PSD_DELAYED_GC_TASK_QS_SET_LOCKS;
+
+ erts_psd_required_locks[ERTS_PSD_NIF_TRAP_EXPORT].get_locks
+ = ERTS_PSD_NIF_TRAP_EXPORT_GET_LOCKS;
+ erts_psd_required_locks[ERTS_PSD_NIF_TRAP_EXPORT].set_locks
+ = ERTS_PSD_NIF_TRAP_EXPORT_SET_LOCKS;
+
/* Check that we have locks for all entries */
for (ix = 0; ix < ERTS_PSD_SIZE; ix++) {
ERTS_SMP_LC_ASSERT(erts_psd_required_locks[ix].get_locks);
@@ -561,6 +691,7 @@ erts_late_init_process(void)
static void
init_sched_wall_time(ErtsSchedWallTime *swtp)
{
+ swtp->need = erts_sched_balance_util;
swtp->enabled = 0;
swtp->start = 0;
swtp->working.total = 0;
@@ -583,27 +714,205 @@ sched_wall_time_ts(void)
#endif
}
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+
+static ERTS_INLINE Uint64
+aschedtime_read(ErtsAtomicSchedTime *var)
+{
+ return (Uint64) erts_atomic64_read_nob((erts_atomic64_t *) var);
+}
+
+static ERTS_INLINE void
+aschedtime_set(ErtsAtomicSchedTime *var, Uint64 val)
+{
+ erts_atomic64_set_nob((erts_atomic64_t *) var, (erts_aint64_t) val);
+}
+
+static ERTS_INLINE void
+aschedtime_init(ErtsAtomicSchedTime *var)
+{
+ erts_atomic64_init_nob((erts_atomic64_t *) var, (erts_aint64_t) 0);
+}
+
+#define ERTS_GET_AVG_MAX_UNLOCKED_TRY 50
+#define ERTS_SCHED_AVG_UTIL_WRITE_MARKER (~((Uint64) 0))
+
+/* Intervals in nanoseconds */
+#define ERTS_SCHED_UTIL_SHORT_INTERVAL ((Uint64) 1*1000*1000*1000)
+#define ERTS_SCHED_UTIL_LONG_INTERVAL ((Uint64) 10*1000*1000*1000)
+
+
+#define ERTS_SCHED_UTIL_IGNORE_IMBALANCE_DIFF 5000 /* ppm */
+
+static ERTS_INLINE Uint64
+calc_sched_worktime(int is_working, Uint64 now, Uint64 last,
+ Uint64 interval, Uint64 old_worktime)
+{
+ Uint64 worktime;
+ Uint64 new;
+
+ if (now <= last)
+ return old_worktime;
+
+ new = now - last;
+
+ if (new >= interval)
+ return is_working ? interval : (Uint64) 0;
+
+
+ /*
+ * Division by 1000 in order to avoid
+ * overflow. If changed update assertions
+ * in init_runq_sched_util().
+ */
+ worktime = old_worktime;
+ worktime *= (interval - new)/1000;
+ worktime /= (interval/1000);
+ if (is_working)
+ worktime += new;
+
+ ASSERT(0 <= worktime && worktime <= interval);
+
+ return worktime;
+}
+
+static ERTS_INLINE void
+update_avg_sched_util(ErtsSchedulerData *esdp, Uint64 now, int is_working)
+{
+ ErtsRunQueue *rq;
+ int worked;
+ Uint64 swt, lwt, last;
+
+ rq = esdp->run_queue;
+ last = aschedtime_read(&rq->sched_util.last);
+
+ if (now <= last) {
+ ASSERT(last == ERTS_SCHED_AVG_UTIL_WRITE_MARKER);
+ return;
+ }
+
+ ASSERT(now >= last);
+
+ worked = rq->sched_util.is_working;
+
+ swt = calc_sched_worktime(worked, now, last, ERTS_SCHED_UTIL_SHORT_INTERVAL,
+ rq->sched_util.worktime.short_interval);
+ lwt = calc_sched_worktime(worked, now, last, ERTS_SCHED_UTIL_LONG_INTERVAL,
+ rq->sched_util.worktime.long_interval);
+
+ aschedtime_set(&rq->sched_util.last, ERTS_SCHED_AVG_UTIL_WRITE_MARKER);
+ ERTS_THR_WRITE_MEMORY_BARRIER;
+ rq->sched_util.is_working = is_working;
+ rq->sched_util.worktime.short_interval = swt;
+ rq->sched_util.worktime.long_interval = lwt;
+ ERTS_THR_WRITE_MEMORY_BARRIER;
+ aschedtime_set(&rq->sched_util.last, now);
+}
+
+int
+erts_get_sched_util(ErtsRunQueue *rq, int initially_locked, int short_interval)
+{
+ /* Average scheduler utilization in ppm */
+ int util, is_working, try = 0, locked = initially_locked;
+ Uint64 worktime, old_worktime, now, last, interval, *old_worktimep;
+
+ if (short_interval) {
+ old_worktimep = &rq->sched_util.worktime.short_interval;
+ interval = ERTS_SCHED_UTIL_SHORT_INTERVAL;
+ }
+ else {
+ old_worktimep = &rq->sched_util.worktime.long_interval;
+ interval = ERTS_SCHED_UTIL_LONG_INTERVAL;
+ }
+
+ while (1) {
+ Uint64 chk_last;
+ last = aschedtime_read(&rq->sched_util.last);
+ ERTS_THR_READ_MEMORY_BARRIER;
+ is_working = rq->sched_util.is_working;
+ old_worktime = *old_worktimep;
+ ERTS_THR_READ_MEMORY_BARRIER;
+ chk_last = aschedtime_read(&rq->sched_util.last);
+ if (chk_last == last)
+ break;
+ if (!locked) {
+ if (++try >= ERTS_GET_AVG_MAX_UNLOCKED_TRY) {
+ /* Writer will eventually block on runq-lock */
+ erts_smp_runq_lock(rq);
+ locked = 1;
+ }
+ }
+ }
+
+ if (!initially_locked && locked)
+ erts_smp_runq_unlock(rq);
+
+ now = sched_wall_time_ts();
+ worktime = calc_sched_worktime(is_working, now, last, interval, old_worktime);
+
+ util = (int) ((worktime * 1000000)/interval);
+
+ ASSERT(0 <= util && util <= 1000000);
+
+ return util;
+}
+
+static void
+init_runq_sched_util(ErtsRunQueueSchedUtil *rqsu, int enabled)
+{
+ aschedtime_init(&rqsu->last);
+ if (!enabled)
+ aschedtime_set(&rqsu->last, ERTS_SCHED_AVG_UTIL_WRITE_MARKER);
+ rqsu->is_working = 0;
+ rqsu->worktime.short_interval = (Uint64) 0;
+ rqsu->worktime.long_interval = (Uint64) 0;
+
+#ifdef DEBUG
+ {
+ Uint64 intrvl;
+ /*
+ * If one of these asserts fail we may have
+ * overflow in calc_sched_worktime(). Which
+ * have to be fixed either by shrinking
+ * interval size, or fix calculation of
+ * worktime in calc_sched_worktime().
+ */
+ intrvl = ERTS_SCHED_UTIL_SHORT_INTERVAL;
+ ASSERT(intrvl*(intrvl/1000) > intrvl);
+ intrvl = ERTS_SCHED_UTIL_LONG_INTERVAL;
+ ASSERT(intrvl*(intrvl/1000) > intrvl);
+ }
+#endif
+}
+
+#endif /* ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT */
+
static ERTS_INLINE void
sched_wall_time_change(ErtsSchedulerData *esdp, int working)
{
- if (esdp->sched_wall_time.enabled) {
+ if (esdp->sched_wall_time.need) {
Uint64 ts = sched_wall_time_ts();
- if (working) {
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ update_avg_sched_util(esdp, ts, working);
+#endif
+ if (esdp->sched_wall_time.enabled) {
+ if (working) {
#ifdef DEBUG
- ASSERT(!esdp->sched_wall_time.working.currently);
- esdp->sched_wall_time.working.currently = 1;
+ ASSERT(!esdp->sched_wall_time.working.currently);
+ esdp->sched_wall_time.working.currently = 1;
#endif
- ts -= esdp->sched_wall_time.start;
- esdp->sched_wall_time.working.start = ts;
- }
- else {
+ ts -= esdp->sched_wall_time.start;
+ esdp->sched_wall_time.working.start = ts;
+ }
+ else {
#ifdef DEBUG
- ASSERT(esdp->sched_wall_time.working.currently);
- esdp->sched_wall_time.working.currently = 0;
+ ASSERT(esdp->sched_wall_time.working.currently);
+ esdp->sched_wall_time.working.currently = 0;
#endif
- ts -= esdp->sched_wall_time.start;
- ts -= esdp->sched_wall_time.working.start;
- esdp->sched_wall_time.working.total += ts;
+ ts -= esdp->sched_wall_time.start;
+ ts -= esdp->sched_wall_time.working.start;
+ esdp->sched_wall_time.working.total += ts;
+ }
}
}
}
@@ -656,12 +965,17 @@ reply_sched_wall_time(void *vswtrp)
ErlHeapFragment *bp = NULL;
ASSERT(esdp);
-
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
if (swtrp->set) {
- if (!swtrp->enable && esdp->sched_wall_time.enabled)
+ if (!swtrp->enable && esdp->sched_wall_time.enabled) {
+ esdp->sched_wall_time.need = erts_sched_balance_util;
esdp->sched_wall_time.enabled = 0;
+ }
else if (swtrp->enable && !esdp->sched_wall_time.enabled) {
Uint64 ts = sched_wall_time_ts();
+ esdp->sched_wall_time.need = 1;
esdp->sched_wall_time.enabled = 1;
esdp->sched_wall_time.start = ts;
esdp->sched_wall_time.working.total = 0;
@@ -737,6 +1051,9 @@ erts_sched_wall_time_request(Process *c_p, int set, int enable)
if (!set && !esdp->sched_wall_time.enabled)
return THE_NON_VALUE;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
swtrp = swtreq_alloc();
ref = erts_make_ref(c_p);
@@ -991,6 +1308,9 @@ static ERTS_INLINE void
haw_thr_prgr_current_check_progress(ErtsAuxWorkData *awdp)
{
ErtsThrPrgrVal current = awdp->current_thr_prgr;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
if (current != ERTS_THR_PRGR_INVALID
&& !erts_thr_progress_equal(current, erts_thr_progress_current())) {
/*
@@ -1007,6 +1327,10 @@ handle_delayed_aux_work_wakeup(ErtsAuxWorkData *awdp, erts_aint32_t aux_work, in
{
int jix, max_jix;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
+
ASSERT(awdp->delayed_wakeup.next != ERTS_DELAYED_WAKEUP_INFINITY);
if (!waiting && awdp->delayed_wakeup.next > awdp->esdp->reductions)
@@ -1162,6 +1486,9 @@ handle_misc_aux_work_thr_prgr(ErtsAuxWorkData *awdp,
erts_aint32_t aux_work,
int waiting)
{
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
if (!erts_thr_progress_has_reached_this(haw_thr_prgr_current(awdp),
awdp->misc.thr_prgr))
return aux_work & ~ERTS_SSI_AUX_WORK_MISC_THR_PRGR;
@@ -1214,6 +1541,9 @@ erts_schedule_multi_misc_aux_work(int ignore_self,
if (ignore_self) {
ErtsSchedulerData *esdp = erts_get_scheduler_data();
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
if (esdp)
self = (int) esdp->no;
}
@@ -1243,6 +1573,9 @@ handle_async_ready(ErtsAuxWorkData *awdp,
int waiting)
{
ErtsSchedulerSleepInfo *ssi = awdp->ssi;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
unset_aux_work_flags(ssi, ERTS_SSI_AUX_WORK_ASYNC_READY);
if (erts_check_async_ready(awdp->async_ready.queue)) {
if (set_aux_work_flags(ssi, ERTS_SSI_AUX_WORK_ASYNC_READY)
@@ -1267,6 +1600,9 @@ handle_async_ready_clean(ErtsAuxWorkData *awdp,
{
void *thr_prgr_p;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
#ifdef ERTS_SMP
if (awdp->async_ready.need_thr_prgr
&& !erts_thr_progress_has_reached_this(haw_thr_prgr_current(awdp),
@@ -1304,6 +1640,9 @@ handle_fix_alloc(ErtsAuxWorkData *awdp, erts_aint32_t aux_work, int waiting)
ErtsSchedulerSleepInfo *ssi = awdp->ssi;
erts_aint32_t res;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
unset_aux_work_flags(ssi, (ERTS_SSI_AUX_WORK_FIX_ALLOC_LOWER_LIM
| ERTS_SSI_AUX_WORK_FIX_ALLOC_DEALLOC));
aux_work &= ~(ERTS_SSI_AUX_WORK_FIX_ALLOC_LOWER_LIM
@@ -1323,7 +1662,7 @@ void
erts_alloc_notify_delayed_dealloc(int ix)
{
ErtsSchedulerData *esdp = erts_get_scheduler_data();
- if (esdp)
+ if (esdp && !ERTS_SCHEDULER_IS_DIRTY(esdp))
schedule_aux_work_wakeup(&esdp->aux_work_data,
ix,
ERTS_SSI_AUX_WORK_DD);
@@ -1337,7 +1676,7 @@ erts_alloc_ensure_handle_delayed_dealloc_call(int ix)
{
#ifdef DEBUG
ErtsSchedulerData *esdp = erts_get_scheduler_data();
- ASSERT(!esdp || ix == (int) esdp->no);
+ ASSERT(!esdp || (ERTS_SCHEDULER_IS_DIRTY(esdp) || ix == (int) esdp->no));
#endif
set_aux_work_flags_wakeup_nob(ERTS_SCHED_SLEEP_INFO_IX(ix-1),
ERTS_SSI_AUX_WORK_DD);
@@ -1351,6 +1690,9 @@ handle_delayed_dealloc(ErtsAuxWorkData *awdp, erts_aint32_t aux_work, int waitin
ErtsThrPrgrVal wakeup = ERTS_THR_PRGR_INVALID;
int more_work = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
unset_aux_work_flags(ssi, ERTS_SSI_AUX_WORK_DD);
erts_alloc_scheduler_handle_delayed_dealloc((void *) awdp->esdp,
&need_thr_progress,
@@ -1390,6 +1732,9 @@ handle_delayed_dealloc_thr_prgr(ErtsAuxWorkData *awdp, erts_aint32_t aux_work, i
ErtsThrPrgrVal wakeup = ERTS_THR_PRGR_INVALID;
ErtsThrPrgrVal current = haw_thr_prgr_current(awdp);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
if (!erts_thr_progress_has_reached_this(current, awdp->dd.thr_prgr))
return aux_work & ~ERTS_SSI_AUX_WORK_DD_THR_PRGR;
@@ -1437,6 +1782,9 @@ handle_thr_prgr_later_op(ErtsAuxWorkData *awdp, erts_aint32_t aux_work, int wait
int lops;
ErtsThrPrgrVal current = haw_thr_prgr_current(awdp);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!awdp->esdp || !ERTS_SCHEDULER_IS_DIRTY(awdp->esdp));
+#endif
for (lops = 0; lops < ERTS_MAX_THR_PRGR_LATER_OPS; lops++) {
ErtsThrPrgrLaterOp *lop = awdp->later_op.first;
if (!erts_thr_progress_has_reached_this(current, lop->later))
@@ -1595,6 +1943,14 @@ erts_smp_notify_check_children_needed(void)
for (i = 0; i < erts_no_schedulers; i++)
set_aux_work_flags_wakeup_nob(ERTS_SCHED_SLEEP_INFO_IX(i),
ERTS_SSI_AUX_WORK_CHECK_CHILDREN);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ for (i = 0; i < erts_no_dirty_cpu_schedulers; i++)
+ set_aux_work_flags_wakeup_nob(ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(i),
+ ERTS_SSI_AUX_WORK_CHECK_CHILDREN);
+ for (i = 0; i < erts_no_dirty_io_schedulers; i++)
+ set_aux_work_flags_wakeup_nob(ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(i),
+ ERTS_SSI_AUX_WORK_CHECK_CHILDREN);
+#endif
}
static ERTS_INLINE erts_aint32_t
@@ -1811,6 +2167,9 @@ aux_work_timeout_early_init(int no_schedulers)
p = (UWord) malloc((sizeof(ErtsAuxWorkTmo)
+ sizeof(erts_atomic32_t)*(no_schedulers+1))
+ ERTS_CACHE_LINE_SIZE-1);
+ if (!p) {
+ ERTS_INTERNAL_ERROR("malloc failed to allocate memory!");
+ }
if (p & ERTS_CACHE_LINE_MASK)
p = (p & ~ERTS_CACHE_LINE_MASK) + ERTS_CACHE_LINE_SIZE;
ASSERT((p & ERTS_CACHE_LINE_MASK) == 0);
@@ -1942,6 +2301,9 @@ static ERTS_INLINE void
sched_active_sys(Uint no, ErtsRunQueue *rq)
{
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_RUNQ_IX_IS_DIRTY(rq->ix));
+#endif
ASSERT(rq->waiting < 0);
rq->waiting *= -1;
rq->waiting--;
@@ -1977,19 +2339,47 @@ try_set_sys_scheduling(void)
#endif
static ERTS_INLINE int
-prepare_for_sys_schedule(void)
+prepare_for_sys_schedule(ErtsSchedulerData *esdp, int non_blocking)
{
+ if (non_blocking && erts_eager_check_io) {
#ifdef ERTS_SMP
- while (!erts_port_task_have_outstanding_io_tasks()
- && try_set_sys_scheduling()) {
- if (!erts_port_task_have_outstanding_io_tasks())
- return 1;
- clear_sys_scheduling();
+#ifdef ERTS_SCHED_ONLY_POLL_SCHED_1
+ if (esdp->no != 1) {
+ /* If we are not scheduler 1 and ERTS_SCHED_ONLY_POLL_SCHED_1 is used
+ then we make sure to wake scheduler 1 */
+ ErtsRunQueue *rq = ERTS_RUNQ_IX(0);
+ wake_scheduler(rq);
+ return 0;
+ }
+#endif
+ return try_set_sys_scheduling();
+#else
+ return 1;
+#endif
}
- return 0;
+ else {
+#ifdef ERTS_SMP
+ while (!erts_port_task_have_outstanding_io_tasks()
+ && try_set_sys_scheduling()) {
+#ifdef ERTS_SCHED_ONLY_POLL_SCHED_1
+ if (esdp->no != 1) {
+ /* If we are not scheduler 1 and ERTS_SCHED_ONLY_POLL_SCHED_1 is used
+ then we make sure to wake scheduler 1 */
+ ErtsRunQueue *rq = ERTS_RUNQ_IX(0);
+ clear_sys_scheduling();
+ wake_scheduler(rq);
+ return 0;
+ }
+#endif
+ if (!erts_port_task_have_outstanding_io_tasks())
+ return 1;
+ clear_sys_scheduling();
+ }
+ return 0;
#else
- return !erts_port_task_have_outstanding_io_tasks();
+ return !erts_port_task_have_outstanding_io_tasks();
#endif
+ }
}
#ifdef ERTS_SMP
@@ -1998,6 +2388,9 @@ static ERTS_INLINE void
sched_change_waiting_sys_to_waiting(Uint no, ErtsRunQueue *rq)
{
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_RUNQ_IX_IS_DIRTY(rq->ix));
+#endif
ASSERT(rq->waiting < 0);
rq->waiting *= -1;
}
@@ -2013,7 +2406,7 @@ sched_waiting(Uint no, ErtsRunQueue *rq)
else
rq->waiting++;
rq->woken = 0;
- if (erts_system_profile_flags.scheduler)
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && erts_system_profile_flags.scheduler)
profile_scheduler(make_small(no), am_inactive);
}
@@ -2025,7 +2418,7 @@ sched_active(Uint no, ErtsRunQueue *rq)
rq->waiting++;
else
rq->waiting--;
- if (erts_system_profile_flags.scheduler)
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && erts_system_profile_flags.scheduler)
profile_scheduler(make_small(no), am_active);
}
@@ -2037,10 +2430,9 @@ ongoing_multi_scheduling_block(void)
}
static ERTS_INLINE void
-empty_runq(ErtsRunQueue *rq)
+empty_runq_aux(ErtsRunQueue *rq, Uint32 old_flags)
{
- Uint32 old_flags = ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_NONEMPTY|ERTS_RUNQ_FLG_PROTECTED);
- if (old_flags & ERTS_RUNQ_FLG_NONEMPTY) {
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && old_flags & ERTS_RUNQ_FLG_NONEMPTY) {
#ifdef DEBUG
erts_aint32_t empty = erts_smp_atomic32_read_nob(&no_empty_run_queues);
/*
@@ -2060,10 +2452,27 @@ empty_runq(ErtsRunQueue *rq)
}
static ERTS_INLINE void
+empty_runq(ErtsRunQueue *rq)
+{
+ Uint32 old_flags = ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_NONEMPTY|ERTS_RUNQ_FLG_PROTECTED);
+ empty_runq_aux(rq, old_flags);
+}
+
+static ERTS_INLINE Uint32
+empty_protected_runq(ErtsRunQueue *rq)
+{
+ Uint32 old_flags = ERTS_RUNQ_FLGS_BSET(rq,
+ ERTS_RUNQ_FLG_NONEMPTY|ERTS_RUNQ_FLG_PROTECTED,
+ ERTS_RUNQ_FLG_PROTECTED);
+ empty_runq_aux(rq, old_flags);
+ return old_flags;
+}
+
+static ERTS_INLINE void
non_empty_runq(ErtsRunQueue *rq)
{
Uint32 old_flags = ERTS_RUNQ_FLGS_SET(rq, ERTS_RUNQ_FLG_NONEMPTY);
- if (!(old_flags & ERTS_RUNQ_FLG_NONEMPTY)) {
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && (!(old_flags & ERTS_RUNQ_FLG_NONEMPTY))) {
#ifdef DEBUG
erts_aint32_t empty = erts_smp_atomic32_read_nob(&no_empty_run_queues);
/*
@@ -2083,6 +2492,18 @@ non_empty_runq(ErtsRunQueue *rq)
}
}
+void
+erts_empty_runq(ErtsRunQueue *rq)
+{
+ empty_runq(rq);
+}
+
+void
+erts_non_empty_runq(ErtsRunQueue *rq)
+{
+ non_empty_runq(rq);
+}
+
static erts_aint32_t
sched_prep_spin_wait(ErtsSchedulerSleepInfo *ssi)
{
@@ -2228,6 +2649,13 @@ aux_thread(void *unused)
ErtsThrPrgrCallbacks callbacks;
int thr_prgr_active = 1;
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ {
+ char buf[] = "aux_thread";
+ erts_lc_set_thread_name(buf);
+ }
+#endif
+
ssi->event = erts_tse_fetch();
callbacks.arg = (void *) ssi;
@@ -2259,6 +2687,8 @@ aux_thread(void *unused)
erts_thr_progress_active(NULL, thr_prgr_active = 0);
erts_thr_progress_prepare_wait(NULL);
+ ERTS_SCHED_FAIR_YIELD();
+
flgs = sched_spin_wait(ssi, 0);
if (flgs & ERTS_SSI_FLG_SLEEPING) {
@@ -2296,18 +2726,37 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+ erts_smp_spin_lock(&rq->sleepers.lock);
+#endif
flgs = sched_prep_spin_wait(ssi);
if (flgs & ERTS_SSI_FLG_SUSPENDED) {
/* Go suspend instead... */
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+ erts_smp_spin_unlock(&rq->sleepers.lock);
+#endif
return;
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix)) {
+ ssi->prev = NULL;
+ ssi->next = rq->sleepers.list;
+ if (rq->sleepers.list)
+ rq->sleepers.list->prev = ssi;
+ rq->sleepers.list = ssi;
+ erts_smp_spin_unlock(&rq->sleepers.lock);
+ }
+#endif
+
/*
* If all schedulers are waiting, one of them *should*
* be waiting in erl_sys_schedule()
*/
- if (!prepare_for_sys_schedule()) {
+ if (ERTS_SCHEDULER_IS_DIRTY(esdp) || !prepare_for_sys_schedule(esdp, 0)) {
sched_waiting(esdp->no, rq);
@@ -2317,30 +2766,35 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
tse_wait:
- if (thr_prgr_active != working)
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) && thr_prgr_active != working)
sched_wall_time_change(esdp, thr_prgr_active);
while (1) {
aux_work = erts_atomic32_read_acqb(&ssi->aux_work);
if (aux_work) {
- if (!thr_prgr_active) {
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) && !thr_prgr_active) {
erts_thr_progress_active(esdp, thr_prgr_active = 1);
sched_wall_time_change(esdp, 1);
}
aux_work = handle_aux_work(&esdp->aux_work_data, aux_work, 1);
- if (aux_work && erts_thr_progress_update(esdp))
+ if (aux_work && !ERTS_SCHEDULER_IS_DIRTY(esdp)
+ && erts_thr_progress_update(esdp))
erts_thr_progress_leader_update(esdp);
}
if (aux_work)
flgs = erts_smp_atomic32_read_acqb(&ssi->flags);
else {
- if (thr_prgr_active) {
- erts_thr_progress_active(esdp, thr_prgr_active = 0);
- sched_wall_time_change(esdp, 0);
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ if (thr_prgr_active) {
+ erts_thr_progress_active(esdp, thr_prgr_active = 0);
+ sched_wall_time_change(esdp, 0);
+ }
+ erts_thr_progress_prepare_wait(esdp);
}
- erts_thr_progress_prepare_wait(esdp);
+
+ ERTS_SCHED_FAIR_YIELD();
flgs = sched_spin_wait(ssi, spincount);
if (flgs & ERTS_SSI_FLG_SLEEPING) {
@@ -2355,7 +2809,8 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
} while (res == EINTR);
}
}
- erts_thr_progress_finalize_wait(esdp);
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+ erts_thr_progress_finalize_wait(esdp);
}
if (!(flgs & ERTS_SSI_FLG_WAITING)) {
@@ -2376,7 +2831,7 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
if (flgs & ~ERTS_SSI_FLG_SUSPENDED)
erts_smp_atomic32_read_band_nob(&ssi->flags, ERTS_SSI_FLG_SUSPENDED);
- if (!thr_prgr_active) {
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) && !thr_prgr_active) {
erts_thr_progress_active(esdp, thr_prgr_active = 1);
sched_wall_time_change(esdp, 1);
}
@@ -2393,6 +2848,13 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
erts_smp_atomic32_set_relb(&function_calls, 0);
*fcalls = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
+
+#ifdef ERTS_SCHED_ONLY_POLL_SCHED_1
+ ASSERT(esdp->no == 1);
+#endif
sched_waiting_sys(esdp->no, rq);
@@ -2413,7 +2875,6 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
sched_wall_time_change(esdp, working = 0);
ASSERT(!erts_port_task_have_outstanding_io_tasks());
-
erl_sys_schedule(1); /* Might give us something to do */
dt = erts_do_time_read_and_reset();
@@ -2459,7 +2920,7 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
* Got to check that we still got I/O tasks; otherwise
* we have to continue checking for I/O...
*/
- if (!prepare_for_sys_schedule()) {
+ if (!prepare_for_sys_schedule(esdp, 0)) {
spincount *= ERTS_SCHED_TSE_SLEEP_SPINCOUNT_FACT;
goto tse_wait;
}
@@ -2481,7 +2942,7 @@ scheduler_wait(int *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq)
* Got to check that we still got I/O tasks; otherwise
* we have to wait in erl_sys_schedule() after all...
*/
- if (!prepare_for_sys_schedule()) {
+ if (!prepare_for_sys_schedule(esdp, 0)) {
/*
* Not allowed to wait in erl_sys_schedule;
* do tse wait instead...
@@ -2585,7 +3046,7 @@ ssi_flags_set_wake(ErtsSchedulerSleepInfo *ssi)
}
static void
-wake_scheduler(ErtsRunQueue *rq, int incq)
+wake_scheduler(ErtsRunQueue *rq)
{
ErtsSchedulerSleepInfo *ssi;
erts_aint32_t flgs;
@@ -2604,10 +3065,53 @@ wake_scheduler(ErtsRunQueue *rq, int incq)
flgs = ssi_flags_set_wake(ssi);
erts_sched_finish_poke(ssi, flgs);
+}
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+static void
+wake_dirty_schedulers(ErtsRunQueue *rq, int one)
+{
+ ErtsSchedulerSleepInfo *ssi;
+ ErtsSchedulerSleepList *sl;
+
+ ASSERT(ERTS_RUNQ_IX_IS_DIRTY(rq->ix));
+
+ sl = &rq->sleepers;
+ erts_smp_spin_lock(&sl->lock);
+ ssi = sl->list;
+ if (!ssi) {
+ erts_smp_spin_unlock(&sl->lock);
+ if (one)
+ wake_scheduler(rq);
+ } else if (one) {
+ erts_aint32_t flgs;
+ if (ssi->prev)
+ ssi->prev->next = ssi->next;
+ else {
+ ASSERT(sl->list == ssi);
+ sl->list = ssi->next;
+ }
+ if (ssi->next)
+ ssi->next->prev = ssi->prev;
- if (incq && (flgs & ERTS_SSI_FLG_WAITING))
- non_empty_runq(rq);
+ erts_smp_spin_unlock(&sl->lock);
+
+ ERTS_THR_MEMORY_BARRIER;
+ flgs = ssi_flags_set_wake(ssi);
+ erts_sched_finish_poke(ssi, flgs);
+ } else {
+ sl->list = NULL;
+ erts_smp_spin_unlock(&sl->lock);
+
+ ERTS_THR_MEMORY_BARRIER;
+ do {
+ ErtsSchedulerSleepInfo *wake_ssi = ssi;
+ ssi = ssi->next;
+ erts_sched_finish_poke(wake_ssi, ssi_flags_set_wake(wake_ssi));
+ } while (ssi);
+ }
}
+#endif
#define ERTS_NO_USED_RUNQS_SHIFT 16
#define ERTS_NO_RUNQS_MASK 0xffff
@@ -2692,12 +3196,12 @@ chk_wake_sched(ErtsRunQueue *crq, int ix, int activate)
return 0;
wrq = ERTS_RUNQ_IX(ix);
flags = ERTS_RUNQ_FLGS_GET(wrq);
+ if (activate && !(flags & ERTS_RUNQ_FLG_SUSPENDED)) {
+ if (try_inc_no_active_runqs(ix+1))
+ (void) ERTS_RUNQ_FLGS_UNSET(wrq, ERTS_RUNQ_FLG_INACTIVE);
+ }
if (!(flags & (ERTS_RUNQ_FLG_SUSPENDED|ERTS_RUNQ_FLG_NONEMPTY))) {
- if (activate) {
- if (try_inc_no_active_runqs(ix+1))
- (void) ERTS_RUNQ_FLGS_UNSET(wrq, ERTS_RUNQ_FLG_INACTIVE);
- }
- wake_scheduler(wrq, 0);
+ wake_scheduler(wrq);
return 1;
}
return 0;
@@ -2744,8 +3248,14 @@ static ERTS_INLINE void
smp_notify_inc_runq(ErtsRunQueue *runq)
{
#ifdef ERTS_SMP
- if (runq)
- wake_scheduler(runq, 1);
+ if (runq) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(runq->ix))
+ wake_dirty_schedulers(runq, 1);
+ else
+#endif
+ wake_scheduler(runq);
+ }
#endif
}
@@ -2763,7 +3273,7 @@ erts_sched_notify_check_cpu_bind(void)
for (ix = 0; ix < erts_no_run_queues; ix++) {
ErtsRunQueue *rq = ERTS_RUNQ_IX(ix);
(void) ERTS_RUNQ_FLGS_SET(rq, ERTS_RUNQ_FLG_CHK_CPU_BIND);
- wake_scheduler(rq, 0);
+ wake_scheduler(rq);
}
#else
erts_sched_check_cpu_bind(erts_get_scheduler_data());
@@ -2848,7 +3358,7 @@ dequeue_process(ErtsRunQueue *runq, int prio_q, erts_aint32_t *statep)
if (statep)
*statep = state;
- prio = (int) (ERTS_PSFLG_PRIO_MASK & state);
+ prio = (int) ERTS_PSFLGS_GET_PRQ_PRIO(state);
rqi = &runq->procs.prio_info[prio];
@@ -2891,6 +3401,11 @@ check_immigration_need(ErtsRunQueue *c_rq, ErtsMigrationPath *mp, int prio)
if (!f_rq)
return NULL;
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (mp->sched_util)
+ return NULL;
+#endif
+
f_rq_flags = ERTS_RUNQ_FLGS_GET(f_rq);
if (f_rq_flags & ERTS_RUNQ_FLG_PROTECTED)
return NULL;
@@ -2997,7 +3512,7 @@ immigrate(ErtsRunQueue *c_rq, ErtsMigrationPath *mp)
erts_aint32_t state;
state = erts_smp_atomic32_read_acqb(&proc->state);
if (!(ERTS_PSFLG_BOUND & state)
- && (prio == (int) (ERTS_PSFLG_PRIO_MASK & state))) {
+ && (prio == (int) ERTS_PSFLGS_GET_PRQ_PRIO(state))) {
ErtsRunQueueInfo *rqi = &rq->procs.prio_info[prio];
unqueue_process(rq, rpq, rqi, prio, prev_proc, proc);
erts_smp_runq_unlock(rq);
@@ -3030,10 +3545,11 @@ suspend_run_queue(ErtsRunQueue *rq)
ERTS_SSI_FLG_SUSPENDED);
(void) ERTS_RUNQ_FLGS_SET(rq, ERTS_RUNQ_FLG_SUSPENDED);
- wake_scheduler(rq, 0);
+ wake_scheduler(rq);
}
static void scheduler_ix_resume_wake(Uint ix);
+static void scheduler_ssi_resume_wake(ErtsSchedulerSleepInfo *ssi);
static ERTS_INLINE void
resume_run_queue(ErtsRunQueue *rq)
@@ -3060,7 +3576,10 @@ resume_run_queue(ErtsRunQueue *rq)
erts_smp_runq_unlock(rq);
- scheduler_ix_resume_wake(rq->ix);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+#endif
+ scheduler_ix_resume_wake(rq->ix);
}
typedef struct {
@@ -3079,7 +3598,7 @@ schedule_bound_processes(ErtsRunQueue *rq,
while (proc) {
erts_aint32_t state = erts_smp_atomic32_read_acqb(&proc->state);
next = proc->next;
- enqueue_process(rq, (int) (ERTS_PSFLG_PRIO_MASK & state), proc);
+ enqueue_process(rq, (int) ERTS_PSFLGS_GET_PRQ_PRIO(state), proc);
proc = next;
}
}
@@ -3091,20 +3610,28 @@ evacuate_run_queue(ErtsRunQueue *rq,
int prio_q;
ErtsRunQueue *to_rq;
ErtsMigrationPaths *mps;
- ErtsMigrationPath *mp;
+ ErtsMigrationPath *mp = NULL;
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
(void) ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_PROTECTED);
- mps = erts_get_migration_paths_managed();
- mp = &mps->mpath[rq->ix];
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+#endif
+ {
+ mps = erts_get_migration_paths_managed();
+ mp = &mps->mpath[rq->ix];
+ }
/* Evacuate scheduled misc ops */
if (rq->misc.start) {
ErtsMiscOpList *start, *end;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_RUNQ_IX_IS_DIRTY(rq->ix));
+#endif
to_rq = mp->misc_evac_runq;
if (!to_rq)
return;
@@ -3122,6 +3649,9 @@ evacuate_run_queue(ErtsRunQueue *rq,
to_rq->misc.start = start;
to_rq->misc.end = end;
+
+ non_empty_runq(to_rq);
+
erts_smp_runq_unlock(to_rq);
smp_notify_inc_runq(to_rq);
erts_smp_runq_lock(to_rq);
@@ -3130,6 +3660,9 @@ evacuate_run_queue(ErtsRunQueue *rq,
if (rq->ports.start) {
Port *prt;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_RUNQ_IX_IS_DIRTY(rq->ix));
+#endif
to_rq = mp->prio[ERTS_PORT_PRIO_LEVEL].runq;
if (!to_rq)
return;
@@ -3165,15 +3698,26 @@ evacuate_run_queue(ErtsRunQueue *rq,
erts_aint32_t state;
Process *proc;
int notify = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ int requeue;
+#endif
to_rq = NULL;
- if (!mp->prio[prio_q].runq)
- return;
- if (prio_q == PRIORITY_NORMAL && !mp->prio[PRIORITY_LOW].runq)
- return;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+#endif
+ {
+ if (!mp->prio[prio_q].runq)
+ return;
+ if (prio_q == PRIORITY_NORMAL && !mp->prio[PRIORITY_LOW].runq)
+ return;
+ }
proc = dequeue_process(rq, prio_q, &state);
while (proc) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ requeue = 1;
+#endif
if (ERTS_PSFLG_BOUND & state) {
/* Bound processes get stuck here... */
proc->next = NULL;
@@ -3182,12 +3726,51 @@ evacuate_run_queue(ErtsRunQueue *rq,
else
sbpp->first = proc;
sbpp->last = proc;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ requeue = 0;
+#endif
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (state & ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q) {
+#ifdef DEBUG
+ erts_aint32_t old =
+#else
+ (void)
+#endif
+ erts_smp_atomic32_read_band_nob(&proc->state,
+ ~(ERTS_PSFLG_DIRTY_CPU_PROC
+ | ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q));
+ /* assert that no other dirty flags are set */
+ ASSERT(!(old & (ERTS_PSFLG_DIRTY_IO_PROC|ERTS_PSFLG_DIRTY_IO_PROC_IN_Q)));
+ } else if (state & ERTS_PSFLG_DIRTY_IO_PROC_IN_Q) {
+#ifdef DEBUG
+ erts_aint32_t old =
+#else
+ (void)
+#endif
+ erts_smp_atomic32_read_band_nob(&proc->state,
+ ~(ERTS_PSFLG_DIRTY_IO_PROC
+ | ERTS_PSFLG_DIRTY_IO_PROC_IN_Q));
+ /* assert that no other dirty flags are set */
+ ASSERT(!(old & (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q)));
+ }
+ if (requeue) {
+#else
else {
- int prio = (int) (ERTS_PSFLG_PRIO_MASK & state);
+#endif
+ int prio = (int) ERTS_PSFLGS_GET_PRQ_PRIO(state);
erts_smp_runq_unlock(rq);
- to_rq = mp->prio[prio].runq;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+ /*
+ * dirty run queues evacuate only to run
+ * queue 0 during multi-scheduling blocking
+ */
+ to_rq = ERTS_RUNQ_IX(0);
+ else
+#endif
+ to_rq = mp->prio[prio].runq;
RUNQ_SET_RQ(&proc->run_queue, to_rq);
erts_smp_runq_lock(to_rq);
@@ -3257,7 +3840,7 @@ try_steal_task_from_victim(ErtsRunQueue *rq, int *rq_lockedp, ErtsRunQueue *vrq,
erts_aint32_t state = erts_smp_atomic32_read_acqb(&proc->state);
if (!(ERTS_PSFLG_BOUND & state)) {
/* Steal process */
- int prio = (int) (ERTS_PSFLG_PRIO_MASK & state);
+ int prio = (int) ERTS_PSFLGS_GET_PRQ_PRIO(state);
ErtsRunQueueInfo *rqi = &vrq->procs.prio_info[prio];
unqueue_process(vrq, rpq, rqi, prio, prev_proc, proc);
erts_smp_runq_unlock(vrq);
@@ -3334,7 +3917,7 @@ try_steal_task(ErtsRunQueue *rq)
Uint32 flags;
/* Protect jobs we steal from getting stolen from us... */
- flags = ERTS_RUNQ_FLGS_SET(rq, ERTS_RUNQ_FLG_PROTECTED);
+ flags = empty_protected_runq(rq);
if (flags & ERTS_RUNQ_FLG_SUSPENDED)
return 0; /* go suspend instead... */
@@ -3413,6 +3996,9 @@ typedef struct {
int full_reds_history_change;
int oowc;
int max_len;
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ int sched_util;
+#endif
} ErtsRunQueueBalance;
static ErtsRunQueueBalance *run_queue_info;
@@ -3576,6 +4162,9 @@ check_balance(ErtsRunQueue *c_rq)
Sint64 scheds_reds, full_scheds_reds;
int forced, active, current_active, oowc, half_full_scheds, full_scheds,
mmax_len, blnc_no_rqs, qix, pix, freds_hist_ix;
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ int sched_util_balancing;
+#endif
if (erts_smp_atomic32_xchg_nob(&balance_info.checking_balance, 1)) {
c_rq->check_balance_reds = INT_MAX;
@@ -3631,6 +4220,10 @@ check_balance(ErtsRunQueue *c_rq)
return;
}
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ sched_util_balancing = 0;
+#endif
+
freds_hist_ix = balance_info.full_reds_history_index;
balance_info.full_reds_history_index++;
if (balance_info.full_reds_history_index >= ERTS_FULL_REDS_HISTORY_SIZE)
@@ -3661,7 +4254,12 @@ check_balance(ErtsRunQueue *c_rq)
run_queue_info[qix].oowc = rq->out_of_work_count;
run_queue_info[qix].max_len = rq->max_len;
rq->check_balance_reds = INT_MAX;
-
+
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (erts_sched_balance_util)
+ run_queue_info[qix].sched_util = erts_get_sched_util(rq, 1, 0);
+#endif
+
erts_smp_runq_unlock(rq);
}
@@ -3731,8 +4329,38 @@ check_balance(ErtsRunQueue *c_rq)
mmax_len = run_queue_info[qix].max_len;
}
- if (!erts_sched_compact_load)
+ if (!erts_sched_compact_load) {
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (erts_sched_balance_util && full_scheds < blnc_no_rqs) {
+ int avg_util = 0;
+
+ for (qix = 0; qix < blnc_no_rqs; qix++)
+ avg_util += run_queue_info[qix].sched_util;
+
+ avg_util /= blnc_no_rqs; /* in ppm */
+
+ sched_util_balancing = 1;
+ /*
+ * In order to avoid renaming a large amount of fields
+ * we write utilization values instead of lenght values
+ * in the 'max_len' and 'migration_limit' fields...
+ */
+ for (qix = 0; qix < blnc_no_rqs; qix++) {
+ run_queue_info[qix].flags = 0; /* Reset for later use... */
+ for (pix = 0; pix < ERTS_NO_PRIO_LEVELS; pix++) {
+ run_queue_info[qix].prio[pix].emigrate_to = -1;
+ run_queue_info[qix].prio[pix].immigrate_from = -1;
+ run_queue_info[qix].prio[pix].avail = 100;
+ run_queue_info[qix].prio[pix].max_len = run_queue_info[qix].sched_util;
+ run_queue_info[qix].prio[pix].migration_limit = avg_util;
+ }
+ }
+ active = blnc_no_rqs;
+ goto setup_migration_paths;
+ }
+#endif
goto all_active;
+ }
if (!forced && half_full_scheds != blnc_no_rqs) {
int min = 1;
@@ -3849,15 +4477,30 @@ check_balance(ErtsRunQueue *c_rq)
}
}
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ setup_migration_paths:
+#endif
+
/* Setup migration paths for all priorities */
for (pix = 0; pix < ERTS_NO_PRIO_LEVELS; pix++) {
int low = 0, high = 0;
for (qix = 0; qix < blnc_no_rqs; qix++) {
int len_diff = run_queue_info[qix].prio[pix].max_len;
len_diff -= run_queue_info[qix].prio[pix].migration_limit;
+
#ifdef DBG_PRINT
if (pix == 2) erts_fprintf(stderr, "%d ", len_diff);
#endif
+
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (sched_util_balancing
+ && -ERTS_SCHED_UTIL_IGNORE_IMBALANCE_DIFF <= len_diff
+ && len_diff <= ERTS_SCHED_UTIL_IGNORE_IMBALANCE_DIFF) {
+ /* ignore minor imbalance */
+ len_diff = 0;
+ }
+#endif
+
run_queue_compare[qix].qix = qix;
run_queue_compare[qix].len = len_diff;
if (len_diff != 0) {
@@ -3984,6 +4627,9 @@ erts_fprintf(stderr, "--------------------------------\n");
Uint32 flags = run_queue_info[qix].flags;
ErtsMigrationPath *mp = &new_mpaths->mpath[qix];
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ mp->sched_util = sched_util_balancing;
+#endif
mp->flags = flags;
mp->misc_evac_runq = NULL;
@@ -4238,13 +4884,20 @@ wakeup_other_check(ErtsRunQueue *rq, Uint32 flags)
rq->wakeup_other += (left_len*wo_reds
+ ERTS_WAKEUP_OTHER_FIXED_INC);
if (rq->wakeup_other > wakeup_other.limit) {
- int empty_rqs =
- erts_smp_atomic32_read_acqb(&no_empty_run_queues);
- if (flags & ERTS_RUNQ_FLG_PROTECTED)
- (void) ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_PROTECTED);
- if (empty_rqs != 0)
- wake_scheduler_on_empty_runq(rq);
- rq->wakeup_other = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && rq->waiting)
+ wake_dirty_schedulers(rq, 1);
+ else
+#endif
+ {
+ int empty_rqs =
+ erts_smp_atomic32_read_acqb(&no_empty_run_queues);
+ if (flags & ERTS_RUNQ_FLG_PROTECTED)
+ (void) ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_PROTECTED);
+ if (empty_rqs != 0)
+ wake_scheduler_on_empty_runq(rq);
+ rq->wakeup_other = 0;
+ }
}
}
rq->wakeup_other_reds = 0;
@@ -4405,11 +5058,17 @@ erts_early_init_scheduling(int no_schedulers)
wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_MEDIUM;
wakeup_other.type = ERTS_SCHED_WAKEUP_OTHER_TYPE_DEFAULT;
#endif
+#ifndef ERTS_SCHED_MIN_SPIN
sched_busy_wait.sys_schedule = ERTS_SCHED_SYS_SLEEP_SPINCOUNT_MEDIUM;
sched_busy_wait.tse = (ERTS_SCHED_SYS_SLEEP_SPINCOUNT_MEDIUM
* ERTS_SCHED_TSE_SLEEP_SPINCOUNT_FACT);
sched_busy_wait.aux_work = (ERTS_SCHED_SYS_SLEEP_SPINCOUNT_MEDIUM
* ERTS_SCHED_AUX_WORK_SLEEP_SPINCOUNT_FACT_MEDIUM);
+#else
+ sched_busy_wait.sys_schedule = ERTS_SCHED_SYS_SLEEP_SPINCOUNT_NONE;
+ sched_busy_wait.tse = ERTS_SCHED_SYS_SLEEP_SPINCOUNT_NONE;
+ sched_busy_wait.aux_work = ERTS_SCHED_SYS_SLEEP_SPINCOUNT_NONE;
+#endif
}
int
@@ -4525,7 +5184,14 @@ erts_sched_set_wake_cleanup_threshold(char *str)
static void
init_aux_work_data(ErtsAuxWorkData *awdp, ErtsSchedulerData *esdp, char *dawwp)
{
- awdp->sched_id = esdp ? (int) esdp->no : 0;
+ if (!esdp)
+ awdp->sched_id = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (ERTS_SCHEDULER_IS_DIRTY(esdp))
+ awdp->sched_id = (int) ERTS_DIRTY_SCHEDULER_NO(esdp);
+#endif
+ else
+ awdp->sched_id = (int) esdp->no;
awdp->esdp = esdp;
awdp->ssi = esdp ? esdp->ssi : NULL;
#ifdef ERTS_SMP
@@ -4565,41 +5231,122 @@ init_aux_work_data(ErtsAuxWorkData *awdp, ErtsSchedulerData *esdp, char *dawwp)
#endif
}
+static void
+init_scheduler_data(ErtsSchedulerData* esdp, int num,
+ ErtsSchedulerSleepInfo* ssi,
+ ErtsRunQueue* runq,
+ char** daww_ptr, size_t daww_sz)
+{
+#ifdef ERTS_SMP
+ erts_bits_init_state(&esdp->erl_bits_state);
+ esdp->match_pseudo_process = NULL;
+ esdp->free_process = NULL;
+#endif
+ esdp->x_reg_array =
+ erts_alloc_permanent_cache_aligned(ERTS_ALC_T_BEAM_REGISTER,
+ ERTS_X_REGS_ALLOCATED *
+ sizeof(Eterm));
+ esdp->f_reg_array =
+ erts_alloc_permanent_cache_aligned(ERTS_ALC_T_BEAM_REGISTER,
+ MAX_REG * sizeof(FloatDef));
+#if !HEAP_ON_C_STACK
+ esdp->num_tmp_heap_used = 0;
+#endif
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(runq->ix)) {
+ esdp->no = 0;
+ ERTS_DIRTY_SCHEDULER_NO(esdp) = (Uint) num;
+ }
+ else {
+ esdp->no = (Uint) num;
+ ERTS_DIRTY_SCHEDULER_NO(esdp) = 0;
+ }
+#else
+ esdp->no = (Uint) num;
+#endif
+ esdp->ssi = ssi;
+ esdp->current_process = NULL;
+ esdp->current_port = NULL;
+
+ esdp->virtual_reds = 0;
+ esdp->cpu_id = -1;
+
+ erts_init_atom_cache_map(&esdp->atom_cache_map);
+
+ esdp->run_queue = runq;
+ esdp->run_queue->scheduler = esdp;
+
+ if (daww_ptr) {
+ init_aux_work_data(&esdp->aux_work_data, esdp, *daww_ptr);
+#ifdef ERTS_SMP
+ *daww_ptr += daww_sz;
+#endif
+ }
+
+ esdp->reductions = 0;
+
+ init_sched_wall_time(&esdp->sched_wall_time);
+ erts_port_task_handle_init(&esdp->nosuspend_port_task_handle);
+}
+
void
-erts_init_scheduling(int no_schedulers, int no_schedulers_online)
+erts_init_scheduling(int no_schedulers, int no_schedulers_online
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , int no_dirty_cpu_schedulers, int no_dirty_cpu_schedulers_online,
+ int no_dirty_io_schedulers
+#endif
+ )
{
int ix, n, no_ssi;
char *daww_ptr;
-#ifdef ERTS_SMP
size_t daww_sz;
-#endif
+ size_t size_runqs;
init_misc_op_list_alloc();
+ init_proc_sys_task_queues_alloc();
#ifdef ERTS_SMP
set_wakeup_other_data();
#endif
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (erts_sched_balance_util)
+ erts_sched_compact_load = 0;
+#endif
+
ASSERT(no_schedulers_online <= no_schedulers);
ASSERT(no_schedulers_online >= 1);
ASSERT(no_schedulers >= 1);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(no_dirty_cpu_schedulers <= no_schedulers);
+ ASSERT(no_dirty_cpu_schedulers >= 1);
+ ASSERT(no_dirty_cpu_schedulers_online <= no_schedulers_online);
+ ASSERT(no_dirty_cpu_schedulers_online >= 1);
+#endif
/* Create and initialize run queues */
n = no_schedulers;
-
- erts_aligned_run_queues =
- erts_alloc_permanent_cache_aligned(ERTS_ALC_T_RUNQS,
- sizeof(ErtsAlignedRunQueue) * n);
+ size_runqs = sizeof(ErtsAlignedRunQueue) * (n + ERTS_NUM_DIRTY_RUNQS);
+ erts_aligned_run_queues =
+ erts_alloc_permanent_cache_aligned(ERTS_ALC_T_RUNQS, size_runqs);
#ifdef ERTS_SMP
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_aligned_run_queues += ERTS_NUM_DIRTY_RUNQS;
+#endif
erts_smp_atomic32_init_nob(&no_empty_run_queues, 0);
#endif
erts_no_run_queues = n;
- for (ix = 0; ix < n; ix++) {
+ for (ix = -(ERTS_NUM_DIRTY_RUNQS); ix < n; ix++) {
int pix, rix;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ErtsRunQueue *rq = ERTS_RUNQ_IX_IS_DIRTY(ix) ?
+ ERTS_DIRTY_RUNQ_IX(ix) : ERTS_RUNQ_IX(ix);
+#else
ErtsRunQueue *rq = ERTS_RUNQ_IX(ix);
+#endif
rq->ix = ix;
@@ -4610,6 +5357,14 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
erts_smp_mtx_init_x(&rq->mtx, "run_queue", make_small(ix + 1));
erts_smp_cnd_init(&rq->cnd);
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+ if (ERTS_RUNQ_IX_IS_DIRTY(ix))
+ erts_smp_spinlock_init(&rq->sleepers.lock, "dirty_run_queue_sleep_list");
+ rq->sleepers.list = NULL;
+#endif
+#endif
+
rq->waiting = 0;
rq->woken = 0;
ERTS_RUNQ_FLGS_INIT(rq, ERTS_RUNQ_FLG_NONEMPTY);
@@ -4648,6 +5403,11 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
rq->ports.info.reds = 0;
rq->ports.start = NULL;
rq->ports.end = NULL;
+
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ init_runq_sched_util(&rq->sched_util, erts_sched_balance_util);
+#endif
+
}
#ifdef ERTS_SMP
@@ -4665,6 +5425,10 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
n = (int) no_schedulers;
erts_no_schedulers = n;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_no_dirty_cpu_schedulers = no_dirty_cpu_schedulers;
+ erts_no_dirty_io_schedulers = no_dirty_io_schedulers;
+#endif
/* Create and initialize scheduler sleep info */
#ifdef ERTS_SMP
@@ -4691,6 +5455,29 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
#ifdef ERTS_SMP
aligned_sched_sleep_info++;
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ aligned_dirty_cpu_sched_sleep_info =
+ erts_alloc_permanent_cache_aligned(
+ ERTS_ALC_T_SCHDLR_SLP_INFO,
+ no_dirty_cpu_schedulers*sizeof(ErtsAlignedSchedulerSleepInfo));
+ for (ix = 0; ix < no_dirty_cpu_schedulers; ix++) {
+ ErtsSchedulerSleepInfo *ssi = &aligned_dirty_cpu_sched_sleep_info[ix].ssi;
+ erts_smp_atomic32_init_nob(&ssi->flags, 0);
+ ssi->event = NULL; /* initialized in sched_dirty_cpu_thread_func */
+ erts_atomic32_init_nob(&ssi->aux_work, 0);
+ }
+ aligned_dirty_io_sched_sleep_info =
+ erts_alloc_permanent_cache_aligned(
+ ERTS_ALC_T_SCHDLR_SLP_INFO,
+ no_dirty_io_schedulers*sizeof(ErtsAlignedSchedulerSleepInfo));
+ for (ix = 0; ix < no_dirty_io_schedulers; ix++) {
+ ErtsSchedulerSleepInfo *ssi = &aligned_dirty_io_sched_sleep_info[ix].ssi;
+ erts_smp_atomic32_init_nob(&ssi->flags, 0);
+ ssi->event = NULL; /* initialized in sched_dirty_io_thread_func */
+ erts_atomic32_init_nob(&ssi->aux_work, 0);
+ }
+#endif
#endif
/* Create and initialize scheduler specific data */
@@ -4701,6 +5488,7 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
daww_ptr = erts_alloc_permanent_cache_aligned(ERTS_ALC_T_SCHDLR_DATA,
daww_sz*n);
#else
+ daww_sz = 0;
daww_ptr = NULL;
#endif
@@ -4710,45 +5498,32 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
for (ix = 0; ix < n; ix++) {
ErtsSchedulerData *esdp = ERTS_SCHEDULER_IX(ix);
-#ifdef ERTS_SMP
- erts_bits_init_state(&esdp->erl_bits_state);
- esdp->match_pseudo_process = NULL;
- esdp->free_process = NULL;
-#endif
- esdp->x_reg_array =
- erts_alloc_permanent_cache_aligned(ERTS_ALC_T_BEAM_REGISTER,
- ERTS_X_REGS_ALLOCATED *
- sizeof(Eterm));
- esdp->f_reg_array =
- erts_alloc_permanent_cache_aligned(ERTS_ALC_T_BEAM_REGISTER,
- MAX_REG * sizeof(FloatDef));
-#if !HEAP_ON_C_STACK
- esdp->num_tmp_heap_used = 0;
-#endif
- esdp->no = (Uint) ix+1;
- esdp->ssi = ERTS_SCHED_SLEEP_INFO_IX(ix);
- esdp->current_process = NULL;
- esdp->current_port = NULL;
-
- esdp->virtual_reds = 0;
- esdp->cpu_id = -1;
-
- erts_init_atom_cache_map(&esdp->atom_cache_map);
-
- esdp->run_queue = ERTS_RUNQ_IX(ix);
- esdp->run_queue->scheduler = esdp;
+ init_scheduler_data(esdp, ix+1, ERTS_SCHED_SLEEP_INFO_IX(ix),
+ ERTS_RUNQ_IX(ix), &daww_ptr, daww_sz);
+ }
- init_aux_work_data(&esdp->aux_work_data, esdp, daww_ptr);
+#ifdef ERTS_DIRTY_SCHEDULERS
#ifdef ERTS_SMP
- daww_ptr += daww_sz;
-#endif
-
- esdp->reductions = 0;
-
- init_sched_wall_time(&esdp->sched_wall_time);
- erts_port_task_handle_init(&esdp->nosuspend_port_task_handle);
-
+ erts_aligned_dirty_cpu_scheduler_data =
+ erts_alloc_permanent_cache_aligned(
+ ERTS_ALC_T_SCHDLR_DATA,
+ no_dirty_cpu_schedulers*sizeof(ErtsAlignedSchedulerData));
+ for (ix = 0; ix < no_dirty_cpu_schedulers; ix++) {
+ ErtsSchedulerData *esdp = ERTS_DIRTY_CPU_SCHEDULER_IX(ix);
+ init_scheduler_data(esdp, ix+1, ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix),
+ ERTS_DIRTY_CPU_RUNQ, NULL, 0);
+ }
+ erts_aligned_dirty_io_scheduler_data =
+ erts_alloc_permanent_cache_aligned(
+ ERTS_ALC_T_SCHDLR_DATA,
+ no_dirty_io_schedulers*sizeof(ErtsAlignedSchedulerData));
+ for (ix = 0; ix < no_dirty_io_schedulers; ix++) {
+ ErtsSchedulerData *esdp = ERTS_DIRTY_IO_SCHEDULER_IX(ix);
+ init_scheduler_data(esdp, ix+1, ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(ix),
+ ERTS_DIRTY_IO_RUNQ, NULL, 0);
}
+#endif
+#endif
init_misc_aux_work();
#if !HALFWORD_HEAP
@@ -4772,6 +5547,16 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
schdlr_sspnd.curr_online = no_schedulers;
schdlr_sspnd.msb.ongoing = 0;
erts_smp_atomic32_init_nob(&schdlr_sspnd.active, no_schedulers);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_smp_atomic32_init_nob(&schdlr_sspnd.dirty_cpu_changing, 0);
+ schdlr_sspnd.dirty_cpu_online = no_dirty_cpu_schedulers_online;
+ schdlr_sspnd.dirty_cpu_curr_online = no_dirty_cpu_schedulers;
+ erts_smp_atomic32_init_nob(&schdlr_sspnd.dirty_cpu_active, no_dirty_cpu_schedulers);
+ erts_smp_atomic32_init_nob(&schdlr_sspnd.dirty_io_changing, 0);
+ schdlr_sspnd.dirty_io_online = no_dirty_io_schedulers;
+ schdlr_sspnd.dirty_io_curr_online = no_dirty_io_schedulers;
+ erts_smp_atomic32_init_nob(&schdlr_sspnd.dirty_io_active, no_dirty_io_schedulers);
+#endif
schdlr_sspnd.msb.procs = NULL;
init_no_runqs(no_schedulers_online, no_schedulers_online);
balance_info.last_active_runqs = no_schedulers;
@@ -4797,6 +5582,21 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
schdlr_sspnd.curr_online *= 2; /* Boot strapping... */
ERTS_SCHDLR_SSPND_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_ONLN
| ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ schdlr_sspnd.dirty_cpu_wait_curr_online = no_dirty_cpu_schedulers_online;
+ schdlr_sspnd.dirty_cpu_curr_online *= 2;
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_ONLN
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ for (ix = no_dirty_cpu_schedulers_online; ix < no_dirty_cpu_schedulers; ix++) {
+ ErtsSchedulerData* esdp = ERTS_DIRTY_CPU_SCHEDULER_IX(ix);
+ erts_smp_atomic32_read_bor_nob(&esdp->ssi->flags, ERTS_SSI_FLG_SUSPENDED);
+ }
+
+ schdlr_sspnd.dirty_io_wait_curr_online = no_dirty_io_schedulers;
+ schdlr_sspnd.dirty_io_curr_online *= 2;
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_ONLN
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+#endif
erts_smp_atomic32_init_nob(&doing_sys_schedule, 0);
@@ -4812,6 +5612,10 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online)
#endif
}
erts_no_schedulers = 1;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_no_dirty_cpu_schedulers = 0;
+ erts_no_dirty_io_schedulers = 0;
+#endif
#endif
erts_smp_atomic32_init_nob(&function_calls, 0);
@@ -4858,76 +5662,296 @@ erts_get_scheduler_data(void)
#endif
+static Process *
+make_proxy_proc(Process *prev_proxy, Process *proc, erts_aint32_t prio)
+{
+ erts_aint32_t state;
+ Process *proxy;
+#ifdef ERTS_SMP
+ ErtsRunQueue *rq = RUNQ_READ_RQ(&proc->run_queue);
+#endif
+
+ state = (ERTS_PSFLG_PROXY
+ | ERTS_PSFLG_IN_RUNQ
+ | (((erts_aint32_t) 1) << (prio + ERTS_PSFLGS_IN_PRQ_MASK_OFFSET))
+ | (prio << ERTS_PSFLGS_PRQ_PRIO_OFFSET)
+ | (prio << ERTS_PSFLGS_USR_PRIO_OFFSET)
+ | (prio << ERTS_PSFLGS_ACT_PRIO_OFFSET));
+
+ if (prev_proxy) {
+ proxy = prev_proxy;
+ ASSERT(erts_smp_atomic32_read_nob(&proxy->state) & ERTS_PSFLG_PROXY);
+ erts_smp_atomic32_set_nob(&proxy->state, state);
+#ifdef ERTS_SMP
+ RUNQ_SET_RQ(&proc->run_queue, rq);
+#endif
+ }
+ else {
+ proxy = erts_alloc(ERTS_ALC_T_PROC, sizeof(Process));
+#ifdef DEBUG
+ {
+ int i;
+ Uint32 *ui32 = (Uint32 *) (char *) proxy;
+ for (i = 0; i < sizeof(Process)/sizeof(Uint32); i++)
+ ui32[i] = (Uint32) 0xdeadbeef;
+ }
+#endif
+ erts_smp_atomic32_init_nob(&proxy->state, state);
+#ifdef ERTS_SMP
+ erts_smp_atomic_init_nob(&proxy->run_queue,
+ erts_smp_atomic_read_nob(&proc->run_queue));
+#endif
+ }
+
+ proxy->common.id = proc->common.id;
+
+ return proxy;
+}
+
+static ERTS_INLINE void
+free_proxy_proc(Process *proxy)
+{
+ ASSERT(erts_smp_atomic32_read_nob(&proxy->state) & ERTS_PSFLG_PROXY);
+ erts_free(ERTS_ALC_T_PROC, proxy);
+}
+
+#define ERTS_ENQUEUE_NOT 0
+#define ERTS_ENQUEUE_NORMAL_QUEUE 1
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_ENQUEUE_DIRTY_CPU_QUEUE 2
+#define ERTS_ENQUEUE_DIRTY_IO_QUEUE 3
+#endif
+
+static ERTS_INLINE int
+check_enqueue_in_prio_queue(Process *c_p,
+ erts_aint32_t *prq_prio_p,
+ erts_aint32_t *newp,
+ erts_aint32_t actual)
+{
+ erts_aint32_t aprio, qbit, max_qbit;
+
+ aprio = (actual >> ERTS_PSFLGS_ACT_PRIO_OFFSET) & ERTS_PSFLGS_PRIO_MASK;
+ qbit = 1 << aprio;
+
+ *prq_prio_p = aprio;
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (actual & (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC)) {
+ /*
+ * If we have system tasks of a priority higher
+ * or equal to the user priority, we enqueue
+ * on ordinary run-queue and take care of
+ * those system tasks first.
+ */
+ if (actual & ERTS_PSFLG_ACTIVE_SYS) {
+ erts_aint32_t uprio, stprio, qmask;
+ uprio = (actual >> ERTS_PSFLGS_USR_PRIO_OFFSET) & ERTS_PSFLGS_PRIO_MASK;
+ if (aprio < uprio)
+ goto enqueue_normal_runq; /* system tasks with higher prio */
+ erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_STATUS);
+ qmask = c_p->sys_task_qs->qmask;
+ erts_smp_proc_unlock(c_p, ERTS_PROC_LOCK_STATUS);
+ switch (qmask & -qmask) {
+ case MAX_BIT:
+ stprio = PRIORITY_MAX;
+ break;
+ case HIGH_BIT:
+ stprio = PRIORITY_HIGH;
+ break;
+ case NORMAL_BIT:
+ stprio = PRIORITY_NORMAL;
+ break;
+ case LOW_BIT:
+ stprio = PRIORITY_LOW;
+ break;
+ default:
+ stprio = PRIORITY_LOW+1;
+ break;
+ }
+ if (stprio <= uprio)
+ goto enqueue_normal_runq; /* system tasks with higher prio */
+ }
+
+ /* Enqueue in dirty run queue if not already enqueued */
+ if (actual & (ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q|ERTS_PSFLG_DIRTY_IO_PROC_IN_Q))
+ return ERTS_ENQUEUE_NOT; /* already in queue */
+ if (actual & ERTS_PSFLG_DIRTY_CPU_PROC) {
+ *newp |= ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q;
+ if (actual & ERTS_PSFLG_IN_RUNQ)
+ return -ERTS_ENQUEUE_DIRTY_CPU_QUEUE; /* use proxy */
+ *newp |= ERTS_PSFLG_IN_RUNQ;
+ return ERTS_ENQUEUE_DIRTY_CPU_QUEUE;
+ }
+ *newp |= ERTS_PSFLG_DIRTY_IO_PROC_IN_Q;
+ if (actual & ERTS_PSFLG_IN_RUNQ)
+ return -ERTS_ENQUEUE_DIRTY_IO_QUEUE; /* use proxy */
+ *newp |= ERTS_PSFLG_IN_RUNQ;
+ return ERTS_ENQUEUE_DIRTY_IO_QUEUE;
+ }
+
+ enqueue_normal_runq:
+#endif
+ max_qbit = (actual >> ERTS_PSFLGS_IN_PRQ_MASK_OFFSET) & ERTS_PSFLGS_QMASK;
+ max_qbit |= 1 << ERTS_PSFLGS_QMASK_BITS;
+ max_qbit &= -max_qbit;
+ /*
+ * max_qbit now either contain bit set for highest prio queue or a bit
+ * out of range (which will have a value larger than valid range).
+ */
+
+ if (qbit >= max_qbit)
+ return ERTS_ENQUEUE_NOT; /* Already queued in higher or equal prio */
+
+ /* Need to enqueue (if already enqueued, it is in lower prio) */
+ *newp |= qbit << ERTS_PSFLGS_IN_PRQ_MASK_OFFSET;
+
+ if ((actual & (ERTS_PSFLG_IN_RUNQ|ERTS_PSFLGS_USR_PRIO_MASK))
+ != (aprio << ERTS_PSFLGS_USR_PRIO_OFFSET)) {
+ /*
+ * Process struct already enqueued, or actual prio not
+ * equal to user prio, i.e., enqueue using proxy.
+ */
+ return -ERTS_ENQUEUE_NORMAL_QUEUE;
+ }
+
+ /*
+ * Enqueue using process struct.
+ */
+ *newp &= ~ERTS_PSFLGS_PRQ_PRIO_MASK;
+ *newp |= ERTS_PSFLG_IN_RUNQ | (aprio << ERTS_PSFLGS_PRQ_PRIO_OFFSET);
+ return ERTS_ENQUEUE_NORMAL_QUEUE;
+}
+
/*
- * scheduler_out_process() return with c_rq locked.
+ * schedule_out_process() return with c_rq locked.
*/
static ERTS_INLINE int
-schedule_out_process(ErtsRunQueue *c_rq, erts_aint32_t state, Process *p)
+schedule_out_process(ErtsRunQueue *c_rq, erts_aint32_t state, Process *p, Process *proxy)
{
- erts_aint32_t a, e, n;
- int res = 0;
+ erts_aint32_t a, e, n, enq_prio = -1;
+ int enqueue; /* < 0 -> use proxy */
+ Process* sched_p;
+ ErtsRunQueue* runq;
+#ifdef ERTS_SMP
+ int check_emigration_need;
+#endif
a = state;
while (1) {
n = e = a;
- ASSERT(a & ERTS_PSFLG_RUNNING);
- ASSERT(!(a & ERTS_PSFLG_IN_RUNQ));
+ ASSERT(a & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS));
+
+ enqueue = ERTS_ENQUEUE_NOT;
- n &= ~ERTS_PSFLG_RUNNING;
- if ((a & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED)) == ERTS_PSFLG_ACTIVE)
- n |= ERTS_PSFLG_IN_RUNQ;
+ n &= ~(ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS);
+ if (a & ERTS_PSFLG_ACTIVE_SYS
+ || (a & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED)) == ERTS_PSFLG_ACTIVE) {
+ enqueue = check_enqueue_in_prio_queue(p, &enq_prio, &n, a);
+ }
a = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
if (a == e)
break;
}
- if (!(n & ERTS_PSFLG_IN_RUNQ)) {
- if (erts_system_profile_flags.runnable_procs)
- profile_runnable_proc(p, am_inactive);
- }
- else {
- int prio = (int) (ERTS_PSFLG_PRIO_MASK & n);
- ErtsRunQueue *runq = erts_get_runq_proc(p);
+ switch (enqueue) {
+ case ERTS_ENQUEUE_NOT:
+ if (erts_system_profile_flags.runnable_procs) {
- ASSERT(!(n & ERTS_PSFLG_SUSPENDED));
+ /* Status lock prevents out of order "runnable proc" trace msgs */
+ ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p));
-#ifdef ERTS_SMP
- if (!(ERTS_PSFLG_BOUND & n)) {
- ErtsRunQueue *new_runq = erts_check_emigration_need(runq, prio);
- if (new_runq) {
- RUNQ_SET_RQ(&p->run_queue, new_runq);
- runq = new_runq;
+ if (!(a & ERTS_PSFLG_ACTIVE_SYS)
+ && (!(a & ERTS_PSFLG_ACTIVE)
+ || (a & ERTS_PSFLG_SUSPENDED))) {
+ /* Process inactive */
+ profile_runnable_proc(p, am_inactive);
}
}
+
+ if (proxy)
+ free_proxy_proc(proxy);
+
+ erts_smp_runq_lock(c_rq);
+ return 0;
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+ case ERTS_ENQUEUE_DIRTY_CPU_QUEUE:
+ case -ERTS_ENQUEUE_DIRTY_CPU_QUEUE:
+ runq = ERTS_DIRTY_CPU_RUNQ;
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY_CPU(runq->scheduler));
+#ifdef ERTS_SMP
+ check_emigration_need = 0;
+#endif
+ break;
+
+ case ERTS_ENQUEUE_DIRTY_IO_QUEUE:
+ case -ERTS_ENQUEUE_DIRTY_IO_QUEUE:
+ runq = ERTS_DIRTY_IO_RUNQ;
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY_IO(runq->scheduler));
+#ifdef ERTS_SMP
+ check_emigration_need = 0;
+#endif
+ break;
+#endif
#endif
- ASSERT(runq);
- res = 1;
- erts_smp_runq_lock(runq);
+ default:
+ ASSERT(enqueue == ERTS_ENQUEUE_NORMAL_QUEUE
+ || enqueue == -ERTS_ENQUEUE_NORMAL_QUEUE);
+
+ runq = erts_get_runq_proc(p);
+#ifdef ERTS_SMP
+ check_emigration_need = !(ERTS_PSFLG_BOUND & n);
+#endif
+ break;
+ }
+
+ ASSERT(!(n & ERTS_PSFLG_SUSPENDED) || (n & ERTS_PSFLG_ACTIVE_SYS));
- /* Enqueue the process */
- enqueue_process(runq, prio, p);
+ if (enqueue < 0)
+ sched_p = make_proxy_proc(proxy, p, enq_prio);
+ else {
+ sched_p = p;
+ if (proxy)
+ free_proxy_proc(proxy);
+ }
- if (runq == c_rq)
- return res;
- erts_smp_runq_unlock(runq);
- smp_notify_inc_runq(runq);
+#ifdef ERTS_SMP
+ if (check_emigration_need) {
+ ErtsRunQueue *new_runq = erts_check_emigration_need(runq, enq_prio);
+ if (new_runq) {
+ RUNQ_SET_RQ(&sched_p->run_queue, new_runq);
+ runq = new_runq;
+ }
}
+#endif
+
+ ASSERT(runq);
+
+ erts_smp_runq_lock(runq);
+
+ /* Enqueue the process */
+ enqueue_process(runq, (int) enq_prio, sched_p);
+
+ if (runq == c_rq)
+ return 1;
+ erts_smp_runq_unlock(runq);
+ smp_notify_inc_runq(runq);
erts_smp_runq_lock(c_rq);
- return res;
+ return 1;
}
static ERTS_INLINE void
-add2runq(Process *p, erts_aint32_t state)
+add2runq(Process *p, erts_aint32_t state, erts_aint32_t prio)
{
- int prio = (int) (ERTS_PSFLG_PRIO_MASK & state);
ErtsRunQueue *runq = erts_get_runq_proc(p);
#ifdef ERTS_SMP
if (!(ERTS_PSFLG_BOUND & state)) {
- ErtsRunQueue *new_runq = erts_check_emigration_need(runq, prio);
+ ErtsRunQueue *new_runq = erts_check_emigration_need(runq, (int) prio);
if (new_runq) {
RUNQ_SET_RQ(&p->run_queue, new_runq);
runq = new_runq;
@@ -4939,101 +5963,270 @@ add2runq(Process *p, erts_aint32_t state)
erts_smp_runq_lock(runq);
/* Enqueue the process */
- enqueue_process(runq, prio, p);
+ enqueue_process(runq, (int) prio, p);
erts_smp_runq_unlock(runq);
smp_notify_inc_runq(runq);
}
-static ERTS_INLINE void
-schedule_process(Process *p, erts_aint32_t state, int active_enq)
+static ERTS_INLINE int
+change_proc_schedule_state(Process *p,
+ erts_aint32_t clear_state_flags,
+ erts_aint32_t set_state_flags,
+ erts_aint32_t *statep,
+ erts_aint32_t *enq_prio_p,
+ ErtsProcLocks locks)
{
- erts_aint32_t a = state, n;
+ /*
+ * NOTE: ERTS_PSFLG_RUNNING, ERTS_PSFLG_RUNNING_SYS and
+ * ERTS_PSFLG_ACTIVE_SYS are not allowed to be
+ * altered by this function!
+ */
+ erts_aint32_t a = *statep, n;
+ int enqueue; /* < 0 -> use proxy */
+ unsigned int prof_runnable_procs = erts_system_profile_flags.runnable_procs;
+ unsigned int lock_status = (prof_runnable_procs
+ && !(locks & ERTS_PROC_LOCK_STATUS));
+
+ ERTS_SMP_LC_ASSERT(locks == erts_proc_lc_my_proc_locks(p));
+
+ ASSERT(!(a & ERTS_PSFLG_PROXY));
+ ASSERT((clear_state_flags & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_ACTIVE_SYS)) == 0);
+ ASSERT((set_state_flags & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_ACTIVE_SYS)) == 0);
+
+ if (lock_status)
+ erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
while (1) {
erts_aint32_t e;
n = e = a;
+ enqueue = ERTS_ENQUEUE_NOT;
+
if (a & ERTS_PSFLG_FREE)
- return; /* We don't want to schedule free processes... */
- n |= ERTS_PSFLG_ACTIVE;
- if (!(a & (ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_RUNNING)))
- n |= ERTS_PSFLG_IN_RUNQ;
+ break; /* We don't want to schedule free processes... */
+
+ if (clear_state_flags)
+ n &= ~clear_state_flags;
+
+ if (set_state_flags)
+ n |= set_state_flags;
+
+ if ((n & (ERTS_PSFLG_SUSPENDED
+ | ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_IN_RUNQ
+ | ERTS_PSFLG_ACTIVE)) == ERTS_PSFLG_ACTIVE) {
+ /*
+ * Active and seemingly need to be enqueued, but
+ * process may be in a run queue via proxy, need
+ * further inspection...
+ */
+ enqueue = check_enqueue_in_prio_queue(p, enq_prio_p, &n, a);
+ }
+
a = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
if (a == e)
break;
- if (!active_enq && (a & ERTS_PSFLG_ACTIVE))
- return; /* Someone else activated process ... */
+ if (enqueue == ERTS_ENQUEUE_NOT && n == a)
+ break;
}
- if (erts_system_profile_flags.runnable_procs
- && !(a & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED))) {
- profile_runnable_proc(p, am_active);
+ if (prof_runnable_procs) {
+
+ /* Status lock prevents out of order "runnable proc" trace msgs */
+
+ if (((n & (ERTS_PSFLG_SUSPENDED
+ | ERTS_PSFLG_ACTIVE)) == ERTS_PSFLG_ACTIVE)
+ && (!(a & (ERTS_PSFLG_ACTIVE_SYS
+ | ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS)
+ && (!(a & ERTS_PSFLG_ACTIVE)
+ || (a & ERTS_PSFLG_SUSPENDED))))) {
+ /* We activated a prevously inactive process */
+ profile_runnable_proc(p, am_active);
+ }
+
+ if (lock_status)
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
}
- if ((n & ERTS_PSFLG_IN_RUNQ) && !(a & ERTS_PSFLG_IN_RUNQ))
- add2runq(p, n);
+
+ *statep = a;
+
+ return enqueue;
+}
+
+static ERTS_INLINE void
+schedule_process(Process *p, erts_aint32_t in_state, ErtsProcLocks locks)
+{
+ erts_aint32_t enq_prio = -1;
+ erts_aint32_t state = in_state;
+ int enqueue = change_proc_schedule_state(p,
+ 0,
+ ERTS_PSFLG_ACTIVE,
+ &state,
+ &enq_prio,
+ locks);
+ if (enqueue != ERTS_ENQUEUE_NOT)
+ add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio),
+ state,
+ enq_prio);
}
void
-erts_schedule_process(Process *p, erts_aint32_t state)
+erts_schedule_process(Process *p, erts_aint32_t state, ErtsProcLocks locks)
{
- schedule_process(p, state, 0);
+ schedule_process(p, state, locks);
+}
+
+static void
+schedule_process_sys_task(Process *p, erts_aint32_t state, Process *proxy)
+{
+ /*
+ * Expects status lock to be locked when called, and
+ * returns with status lock unlocked...
+ */
+ erts_aint32_t a = state, n, enq_prio = -1;
+ int enqueue; /* < 0 -> use proxy */
+ unsigned int prof_runnable_procs = erts_system_profile_flags.runnable_procs;
+
+ /* Status lock prevents out of order "runnable proc" trace msgs */
+ ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p));
+
+ if (!prof_runnable_procs)
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+
+ ASSERT(!(state & ERTS_PSFLG_PROXY));
+
+ while (1) {
+ erts_aint32_t e;
+ n = e = a;
+
+ if (a & ERTS_PSFLG_FREE)
+ goto cleanup; /* We don't want to schedule free processes... */
+
+ enqueue = ERTS_ENQUEUE_NOT;
+ n |= ERTS_PSFLG_ACTIVE_SYS;
+ if (!(a & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)))
+ enqueue = check_enqueue_in_prio_queue(p, &enq_prio, &n, a);
+ a = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
+ if (a == e)
+ break;
+ if (a == n && enqueue == ERTS_ENQUEUE_NOT)
+ goto cleanup;
+ }
+
+ if (prof_runnable_procs) {
+
+ if (!(a & (ERTS_PSFLG_ACTIVE_SYS
+ | ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS))
+ && (!(a & ERTS_PSFLG_ACTIVE) || (a & ERTS_PSFLG_SUSPENDED))) {
+ /* We activated a prevously inactive process */
+ profile_runnable_proc(p, am_active);
+ }
+
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+ prof_runnable_procs = 0;
+ }
+
+ if (enqueue != ERTS_ENQUEUE_NOT) {
+ Process *sched_p;
+ if (enqueue > 0)
+ sched_p = p;
+ else {
+ sched_p = make_proxy_proc(proxy, p, enq_prio);
+ proxy = NULL;
+ }
+ add2runq(sched_p, n, enq_prio);
+ }
+
+cleanup:
+
+ if (prof_runnable_procs)
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+
+ if (proxy)
+ free_proxy_proc(proxy);
+
+ ERTS_SMP_LC_ASSERT(!(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p)));
}
static ERTS_INLINE int
suspend_process(Process *c_p, Process *p)
{
- erts_aint32_t state = erts_smp_atomic32_read_acqb(&p->state);
+ erts_aint32_t state;
int suspended = 0;
ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p));
+ state = erts_smp_atomic32_read_acqb(&p->state);
+
if ((state & ERTS_PSFLG_SUSPENDED))
suspended = -1;
else {
if (c_p == p) {
state = erts_smp_atomic32_read_bor_relb(&p->state,
ERTS_PSFLG_SUSPENDED);
- state |= ERTS_PSFLG_SUSPENDED;
- ASSERT(state & ERTS_PSFLG_RUNNING);
- suspended = 1;
+ ASSERT(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS));
+ suspended = (state & ERTS_PSFLG_SUSPENDED) ? -1: 1;
}
else {
while (!(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_EXITING))) {
- erts_aint32_t e, n;
+ erts_aint32_t n, e;
+
n = e = state;
n |= ERTS_PSFLG_SUSPENDED;
state = erts_smp_atomic32_cmpxchg_relb(&p->state, n, e);
if (state == e) {
- state = n;
suspended = 1;
break;
}
+ if (state & ERTS_PSFLG_SUSPENDED) {
+ suspended = -1;
+ break;
+ }
}
}
}
- if (state & ERTS_PSFLG_SUSPENDED) {
+ if (suspended) {
ASSERT(!(ERTS_PSFLG_RUNNING & state)
|| p == erts_get_current_process());
- if (erts_system_profile_flags.runnable_procs
- && (p->rcount == 0)
- && (state & ERTS_PSFLG_ACTIVE)) {
- profile_runnable_proc(p, am_inactive);
+ if (suspended > 0 && erts_system_profile_flags.runnable_procs) {
+
+ /* 'state' is before our change... */
+
+ if ((state & (ERTS_PSFLG_ACTIVE
+ | ERTS_PSFLG_ACTIVE_SYS
+ | ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_SUSPENDED)) == ERTS_PSFLG_ACTIVE) {
+ /* We made process inactive */
+ profile_runnable_proc(p, am_inactive);
+ }
+
}
p->rcount++; /* count number of suspend */
}
+
return suspended;
}
static ERTS_INLINE void
-resume_process(Process *p)
+resume_process(Process *p, ErtsProcLocks locks)
{
- erts_aint32_t state;
+ erts_aint32_t state, enq_prio = -1;
+ int enqueue;
+
ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_STATUS & erts_proc_lc_my_proc_locks(p));
ASSERT(p->rcount > 0);
@@ -5041,14 +6234,17 @@ resume_process(Process *p)
if (--p->rcount > 0) /* multiple suspend */
return;
- state = erts_smp_atomic32_read_band_mb(&p->state, ~ERTS_PSFLG_SUSPENDED);
- state &= ~ERTS_PSFLG_SUSPENDED;
- if ((state & (ERTS_PSFLG_EXITING
- | ERTS_PSFLG_ACTIVE
- | ERTS_PSFLG_IN_RUNQ
- | ERTS_PSFLG_RUNNING)) == ERTS_PSFLG_ACTIVE) {
- schedule_process(p, state, 1);
- }
+ state = erts_smp_atomic32_read_nob(&p->state);
+ enqueue = change_proc_schedule_state(p,
+ ERTS_PSFLG_SUSPENDED,
+ 0,
+ &state,
+ &enq_prio,
+ locks);
+ if (enqueue)
+ add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio),
+ state,
+ enq_prio);
}
int
@@ -5070,6 +6266,12 @@ static void
scheduler_ix_resume_wake(Uint ix)
{
ErtsSchedulerSleepInfo *ssi = ERTS_SCHED_SLEEP_INFO_IX(ix);
+ scheduler_ssi_resume_wake(ssi);
+}
+
+static void
+scheduler_ssi_resume_wake(ErtsSchedulerSleepInfo *ssi)
+{
erts_aint32_t xflgs = (ERTS_SSI_FLG_SLEEPING
| ERTS_SSI_FLG_TSE_SLEEPING
| ERTS_SSI_FLG_WAITING
@@ -5160,6 +6362,301 @@ sched_set_suspended_sleeptype(ErtsSchedulerSleepInfo *ssi)
}
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+
+static void
+suspend_scheduler(ErtsSchedulerData *esdp)
+{
+ erts_aint32_t flgs;
+ erts_aint32_t changing;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ long no = (long) (ERTS_SCHEDULER_IS_DIRTY(esdp)
+ ? ERTS_DIRTY_SCHEDULER_NO(esdp)
+ : esdp->no);
+#else
+ long no = (long) esdp->no;
+#endif
+ ErtsSchedulerSleepInfo *ssi = esdp->ssi;
+ long active_schedulers;
+ int curr_online = 1;
+ int wake = 0;
+ erts_aint32_t aux_work;
+ int thr_prgr_active = 1;
+ ErtsStuckBoundProcesses sbp = {NULL, NULL};
+ int* ss_onlinep;
+ int* ss_curr_onlinep;
+ int* ss_wait_curr_onlinep;
+ long* ss_wait_activep;
+ long ss_wait_active_target;
+ erts_smp_atomic32_t* ss_changingp;
+ erts_smp_atomic32_t* ss_activep;
+
+ /*
+ * Schedulers may be suspended in two different ways:
+ * - A scheduler may be suspended since it is not online.
+ * All schedulers with scheduler ids greater than
+ * schdlr_sspnd.online are suspended; same for dirty
+ * schedulers and schdlr_sspnd.dirty_cpu_online and
+ * schdlr_sspnd.dirty_io_online.
+ * - Multi scheduling is blocked. All schedulers except the
+ * scheduler with scheduler id 1 are suspended, and all
+ * dirty CPU and dirty I/O schedulers are suspended.
+ *
+ * Regardless of why a scheduler is suspended, it ends up here.
+ */
+
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp) || no != 1);
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ if (erts_smp_mtx_trylock(&schdlr_sspnd.mtx) == EBUSY) {
+ erts_smp_runq_unlock(esdp->run_queue);
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ erts_smp_runq_lock(esdp->run_queue);
+ }
+ if (ongoing_multi_scheduling_block())
+ evacuate_run_queue(esdp->run_queue, &sbp);
+ } else
+#endif
+ evacuate_run_queue(esdp->run_queue, &sbp);
+
+ erts_smp_runq_unlock(esdp->run_queue);
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ {
+ erts_sched_check_cpu_bind_prep_suspend(esdp);
+
+ if (erts_system_profile_flags.scheduler)
+ profile_scheduler(make_small(esdp->no), am_inactive);
+
+ sched_wall_time_change(esdp, 0);
+
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ }
+
+ flgs = sched_prep_spin_suspended(ssi, ERTS_SSI_FLG_SUSPENDED);
+ if (flgs & ERTS_SSI_FLG_SUSPENDED) {
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ if (ERTS_RUNQ_IS_DIRTY_CPU_RUNQ(esdp->run_queue)) {
+ active_schedulers = erts_smp_atomic32_dec_read_nob(&schdlr_sspnd.dirty_cpu_active);
+ ASSERT(active_schedulers >= 0);
+ changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_changing);
+ ss_onlinep = &schdlr_sspnd.dirty_cpu_online;
+ ss_curr_onlinep = &schdlr_sspnd.dirty_cpu_curr_online;
+ ss_wait_curr_onlinep = &schdlr_sspnd.dirty_cpu_wait_curr_online;
+ ss_changingp = &schdlr_sspnd.dirty_cpu_changing;
+ ss_wait_activep = &schdlr_sspnd.msb.dirty_cpu_wait_active;
+ ss_activep = &schdlr_sspnd.dirty_cpu_active;
+ } else {
+ active_schedulers = erts_smp_atomic32_dec_read_nob(&schdlr_sspnd.dirty_io_active);
+ ASSERT(active_schedulers >= 0);
+ changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_changing);
+ ss_onlinep = &schdlr_sspnd.dirty_io_online;
+ ss_curr_onlinep = &schdlr_sspnd.dirty_io_curr_online;
+ ss_wait_curr_onlinep = &schdlr_sspnd.dirty_io_wait_curr_online;
+ ss_changingp = &schdlr_sspnd.dirty_io_changing;
+ ss_wait_activep = &schdlr_sspnd.msb.dirty_io_wait_active;
+ ss_activep = &schdlr_sspnd.dirty_io_active;
+ }
+ ss_wait_active_target = 0;
+ }
+ else
+#endif
+ {
+ active_schedulers = erts_smp_atomic32_dec_read_nob(&schdlr_sspnd.active);
+ ASSERT(active_schedulers >= 1);
+ changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.changing);
+ ss_onlinep = &schdlr_sspnd.online;
+ ss_curr_onlinep = &schdlr_sspnd.curr_online;
+ ss_wait_curr_onlinep = &schdlr_sspnd.wait_curr_online;
+ ss_changingp = &schdlr_sspnd.changing;
+ ss_wait_activep = &schdlr_sspnd.msb.wait_active;
+ ss_activep = &schdlr_sspnd.active;
+ ss_wait_active_target = 1;
+ }
+ if (changing & ERTS_SCHDLR_SSPND_CHNG_MSB) {
+ if (active_schedulers == *ss_wait_activep)
+ wake = 1;
+ if (active_schedulers == ss_wait_active_target) {
+ changing = erts_smp_atomic32_read_band_nob(ss_changingp,
+ ~ERTS_SCHDLR_SSPND_CHNG_MSB);
+ changing &= ~ERTS_SCHDLR_SSPND_CHNG_MSB;
+ }
+ }
+
+ while (1) {
+ if (changing & ERTS_SCHDLR_SSPND_CHNG_ONLN) {
+ int changed = 0;
+ if (no > *ss_onlinep && curr_online) {
+ (*ss_curr_onlinep)--;
+ curr_online = 0;
+ changed = 1;
+ }
+ else if (no <= *ss_onlinep && !curr_online) {
+ (*ss_curr_onlinep)++;
+ curr_online = 1;
+ changed = 1;
+ }
+ if (changed
+ && *ss_curr_onlinep == *ss_wait_curr_onlinep)
+ wake = 1;
+ if (*ss_onlinep == *ss_curr_onlinep) {
+ changing = erts_smp_atomic32_read_band_nob(ss_changingp,
+ ~ERTS_SCHDLR_SSPND_CHNG_ONLN);
+ changing &= ~ERTS_SCHDLR_SSPND_CHNG_ONLN;
+ }
+ }
+
+ if (wake) {
+ erts_smp_cnd_signal(&schdlr_sspnd.cnd);
+ wake = 0;
+ }
+
+ if (curr_online && !ongoing_multi_scheduling_block()) {
+ flgs = erts_smp_atomic32_read_acqb(&ssi->flags);
+ if (!(flgs & ERTS_SSI_FLG_SUSPENDED))
+ break;
+ }
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+
+ while (1) {
+ erts_aint32_t qmask;
+ erts_aint32_t flgs;
+
+ qmask = (ERTS_RUNQ_FLGS_GET(esdp->run_queue)
+ & ERTS_RUNQ_FLGS_QMASK);
+ aux_work = erts_atomic32_read_acqb(&ssi->aux_work);
+ if (aux_work|qmask) {
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) && !thr_prgr_active) {
+ erts_thr_progress_active(esdp, thr_prgr_active = 1);
+ sched_wall_time_change(esdp, 1);
+ }
+ if (aux_work)
+ aux_work = handle_aux_work(&esdp->aux_work_data,
+ aux_work,
+ 1);
+
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) &&
+ (aux_work && erts_thr_progress_update(esdp)))
+ erts_thr_progress_leader_update(esdp);
+ if (qmask) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ erts_smp_runq_lock(esdp->run_queue);
+ if (ongoing_multi_scheduling_block())
+ evacuate_run_queue(esdp->run_queue, &sbp);
+ erts_smp_runq_unlock(esdp->run_queue);
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+ } else
+#endif
+ {
+ erts_smp_runq_lock(esdp->run_queue);
+ evacuate_run_queue(esdp->run_queue, &sbp);
+ erts_smp_runq_unlock(esdp->run_queue);
+ }
+ }
+ }
+
+ if (!aux_work) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ {
+ if (thr_prgr_active) {
+ erts_thr_progress_active(esdp, thr_prgr_active = 0);
+ sched_wall_time_change(esdp, 0);
+ }
+ erts_thr_progress_prepare_wait(esdp);
+ }
+ flgs = sched_spin_suspended(ssi,
+ ERTS_SCHED_SUSPEND_SLEEP_SPINCOUNT);
+ if (flgs == (ERTS_SSI_FLG_SLEEPING
+ | ERTS_SSI_FLG_WAITING
+ | ERTS_SSI_FLG_SUSPENDED)) {
+ flgs = sched_set_suspended_sleeptype(ssi);
+ if (flgs == (ERTS_SSI_FLG_SLEEPING
+ | ERTS_SSI_FLG_TSE_SLEEPING
+ | ERTS_SSI_FLG_WAITING
+ | ERTS_SSI_FLG_SUSPENDED)) {
+ int res;
+
+ do {
+ res = erts_tse_wait(ssi->event);
+ } while (res == EINTR);
+ }
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ erts_thr_progress_finalize_wait(esdp);
+ }
+
+ flgs = sched_prep_spin_suspended(ssi, (ERTS_SSI_FLG_WAITING
+ | ERTS_SSI_FLG_SUSPENDED));
+ if (!(flgs & ERTS_SSI_FLG_SUSPENDED))
+ break;
+ changing = erts_smp_atomic32_read_nob(ss_changingp);
+ if (changing & ~ERTS_SCHDLR_SSPND_CHNG_WAITER)
+ break;
+ }
+
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ changing = erts_smp_atomic32_read_nob(ss_changingp);
+ }
+
+ active_schedulers = erts_smp_atomic32_inc_read_nob(ss_activep);
+ changing = erts_smp_atomic32_read_nob(ss_changingp);
+ if ((changing & ERTS_SCHDLR_SSPND_CHNG_MSB)
+ && *ss_onlinep == active_schedulers) {
+ erts_smp_atomic32_read_band_nob(ss_changingp,
+ ~ERTS_SCHDLR_SSPND_CHNG_MSB);
+ }
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ ASSERT(no <= *ss_onlinep);
+ ASSERT(!ongoing_multi_scheduling_block());
+
+ }
+
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+
+ ASSERT(curr_online);
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ {
+ if (erts_system_profile_flags.scheduler)
+ profile_scheduler(make_small(esdp->no), am_active);
+
+ if (!thr_prgr_active) {
+ erts_thr_progress_active(esdp, thr_prgr_active = 1);
+ sched_wall_time_change(esdp, 1);
+ }
+ }
+
+ erts_smp_runq_lock(esdp->run_queue);
+ non_empty_runq(esdp->run_queue);
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+#endif
+ {
+ schedule_bound_processes(esdp->run_queue, &sbp);
+
+ erts_sched_check_cpu_bind_post_suspend(esdp);
+ }
+}
+
+#else /* !ERTS_DIRTY_SCHEDULERS */
+
static void
suspend_scheduler(ErtsSchedulerData *esdp)
{
@@ -5348,29 +6845,328 @@ suspend_scheduler(ErtsSchedulerData *esdp)
erts_sched_check_cpu_bind_post_suspend(esdp);
}
+#endif
+
ErtsSchedSuspendResult
erts_schedulers_state(Uint *total,
Uint *online,
Uint *active,
+ Uint *dirty_cpu,
+ Uint *dirty_cpu_online,
+ Uint *dirty_io,
int yield_allowed)
{
- int res;
+ int res = ERTS_SCHDLR_SSPND_EINVAL;
erts_aint32_t changing;
erts_smp_mtx_lock(&schdlr_sspnd.mtx);
changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.changing);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ changing |= (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_changing)
+ | erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_changing));
+#endif
if (yield_allowed && (changing & ~ERTS_SCHDLR_SSPND_CHNG_WAITER))
res = ERTS_SCHDLR_SSPND_YIELD_RESTART;
else {
- *active = *online = schdlr_sspnd.online;
- if (ongoing_multi_scheduling_block())
+ if (active)
+ *active = schdlr_sspnd.online;
+ if (online)
+ *online = schdlr_sspnd.online;
+ if (ongoing_multi_scheduling_block() && active)
*active = 1;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (dirty_cpu_online)
+ *dirty_cpu_online = schdlr_sspnd.dirty_cpu_online;
+#endif
res = ERTS_SCHDLR_SSPND_DONE;
}
erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
- *total = erts_no_schedulers;
+ if (total)
+ *total = erts_no_schedulers;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (dirty_cpu)
+ *dirty_cpu = erts_no_dirty_cpu_schedulers;
+ if (dirty_io)
+ *dirty_io = erts_no_dirty_io_schedulers;
+#endif
+ return res;
+}
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+
+ErtsSchedSuspendResult
+erts_set_schedulers_online(Process *p,
+ ErtsProcLocks plocks,
+ Sint new_no,
+ Sint *old_no
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , int dirty_only
+#endif
+ )
+{
+ ErtsSchedulerData *esdp;
+ int ix, res = -1, no, have_unlocked_plocks, end_wait;
+ erts_aint32_t changing = 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ErtsSchedulerSleepInfo* ssi;
+ int dirty_no, change_dirty;
+#endif
+
+ if (new_no < 1)
+ return ERTS_SCHDLR_SSPND_EINVAL;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (dirty_only && erts_no_dirty_cpu_schedulers < new_no)
+ return ERTS_SCHDLR_SSPND_EINVAL;
+#endif
+ else if (erts_no_schedulers < new_no)
+ return ERTS_SCHDLR_SSPND_EINVAL;
+
+ esdp = ERTS_PROC_GET_SCHDATA(p);
+ end_wait = 0;
+
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+
+ have_unlocked_plocks = 0;
+ no = (int) new_no;
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(schdlr_sspnd.dirty_cpu_online <= erts_no_dirty_cpu_schedulers);
+ if (dirty_only) {
+ if (no > schdlr_sspnd.online) {
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+ return ERTS_SCHDLR_SSPND_EINVAL;
+ }
+ dirty_no = no;
+ } else {
+ /*
+ * Adjust the number of dirty CPU schedulers online relative to the
+ * adjustment made to the number of normal schedulers online.
+ */
+ int total_pct = erts_no_dirty_cpu_schedulers*100/erts_no_schedulers;
+ int onln_pct = no*total_pct/schdlr_sspnd.online;
+ dirty_no = schdlr_sspnd.dirty_cpu_online*onln_pct/100;
+ if (dirty_no == 0)
+ dirty_no = 1;
+ ASSERT(dirty_no <= erts_no_dirty_cpu_schedulers);
+ }
+#endif
+ changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.changing);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ changing |= erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_changing);
+#endif
+ if (changing) {
+ res = ERTS_SCHDLR_SSPND_YIELD_RESTART;
+ }
+ else {
+ int online = *old_no = schdlr_sspnd.online;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ int dirty_online = schdlr_sspnd.dirty_cpu_online;
+
+ if (dirty_only) {
+ *old_no = schdlr_sspnd.dirty_cpu_online;
+ if (dirty_no == schdlr_sspnd.dirty_cpu_online) {
+ res = ERTS_SCHDLR_SSPND_DONE;
+ }
+ change_dirty = 1;
+ } else {
+#endif
+ if (no == schdlr_sspnd.online) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ dirty_only = 1;
+ if (dirty_no == schdlr_sspnd.dirty_cpu_online)
+#endif
+ res = ERTS_SCHDLR_SSPND_DONE;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else
+ change_dirty = 1;
+#endif
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else
+ change_dirty = (dirty_no != schdlr_sspnd.dirty_cpu_online);
+ }
+#endif
+ if (res == -1)
+ {
+ int increase = (no > online);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!dirty_only) {
+#endif
+ ERTS_SCHDLR_SSPND_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_ONLN
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ schdlr_sspnd.online = no;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ } else
+ increase = (dirty_no > dirty_online);
+ if (change_dirty) {
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_ONLN
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ schdlr_sspnd.dirty_cpu_online = dirty_no;
+ }
+#endif
+ if (increase) {
+ int ix;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (!dirty_only) {
+#endif
+ schdlr_sspnd.wait_curr_online = no;
+ if (ongoing_multi_scheduling_block()) {
+ for (ix = online; ix < no; ix++)
+ erts_sched_poke(ERTS_SCHED_SLEEP_INFO_IX(ix));
+ }
+ else {
+ if (plocks) {
+ have_unlocked_plocks = 1;
+ erts_smp_proc_unlock(p, plocks);
+ }
+ change_no_used_runqs(no);
+
+ for (ix = online; ix < no; ix++)
+ resume_run_queue(ERTS_RUNQ_IX(ix));
+
+ for (ix = no; ix < erts_no_run_queues; ix++)
+ suspend_run_queue(ERTS_RUNQ_IX(ix));
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ }
+ if (change_dirty) {
+ schdlr_sspnd.dirty_cpu_wait_curr_online = dirty_no;
+ ASSERT(schdlr_sspnd.dirty_cpu_curr_online !=
+ schdlr_sspnd.dirty_cpu_wait_curr_online);
+ if (ongoing_multi_scheduling_block()) {
+ for (ix = dirty_online; ix < dirty_no; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ erts_sched_poke(ssi);
+ }
+ } else {
+ for (ix = dirty_online; ix < dirty_no; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ scheduler_ssi_resume_wake(ssi);
+ erts_smp_atomic32_read_band_nob(&ssi->flags,
+ ~ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_CPU_RUNQ, 0);
+ }
+ }
+#endif
+ res = ERTS_SCHDLR_SSPND_DONE;
+ }
+ else /* if (no < online) */ {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (change_dirty) {
+ schdlr_sspnd.dirty_cpu_wait_curr_online = dirty_no;
+ ASSERT(schdlr_sspnd.dirty_cpu_curr_online !=
+ schdlr_sspnd.dirty_cpu_wait_curr_online);
+ if (ongoing_multi_scheduling_block()) {
+ for (ix = dirty_no; ix < dirty_online; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ erts_sched_poke(ssi);
+ }
+ } else {
+ for (ix = dirty_no; ix < dirty_online; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ erts_smp_atomic32_read_bor_nob(&ssi->flags,
+ ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_CPU_RUNQ, 0);
+ }
+ }
+ if (dirty_only) {
+ res = ERTS_SCHDLR_SSPND_DONE;
+ }
+ else
+#endif
+ {
+ if (p->scheduler_data->no <= no) {
+ res = ERTS_SCHDLR_SSPND_DONE;
+ schdlr_sspnd.wait_curr_online = no;
+ }
+ else {
+ /*
+ * Yield! Current process needs to migrate
+ * before bif returns.
+ */
+ res = ERTS_SCHDLR_SSPND_YIELD_DONE;
+ schdlr_sspnd.wait_curr_online = no+1;
+ }
+
+ if (ongoing_multi_scheduling_block()) {
+ for (ix = no; ix < online; ix++)
+ erts_sched_poke(ERTS_SCHED_SLEEP_INFO_IX(ix));
+ }
+ else {
+ if (plocks) {
+ have_unlocked_plocks = 1;
+ erts_smp_proc_unlock(p, plocks);
+ }
+
+ change_no_used_runqs(no);
+ for (ix = no; ix < erts_no_run_queues; ix++)
+ suspend_run_queue(ERTS_RUNQ_IX(ix));
+
+ for (ix = no; ix < online; ix++) {
+ ErtsRunQueue *rq = ERTS_RUNQ_IX(ix);
+ wake_scheduler(rq);
+ }
+ }
+ }
+ }
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (change_dirty) {
+ while (schdlr_sspnd.dirty_cpu_curr_online != schdlr_sspnd.dirty_cpu_wait_curr_online)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ erts_smp_atomic32_read_band_nob(&schdlr_sspnd.dirty_cpu_changing,
+ ~ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ }
+ if (!dirty_only)
+#endif
+ {
+ if (schdlr_sspnd.curr_online != schdlr_sspnd.wait_curr_online) {
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+ if (plocks && !have_unlocked_plocks) {
+ have_unlocked_plocks = 1;
+ erts_smp_proc_unlock(p, plocks);
+ }
+ erts_thr_progress_active(esdp, 0);
+ erts_thr_progress_prepare_wait(esdp);
+ end_wait = 1;
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ }
+
+ while (schdlr_sspnd.curr_online != schdlr_sspnd.wait_curr_online)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+
+ ASSERT(res != ERTS_SCHDLR_SSPND_DONE
+ ? (ERTS_SCHDLR_SSPND_CHNG_WAITER
+ & erts_smp_atomic32_read_nob(&schdlr_sspnd.changing))
+ : (ERTS_SCHDLR_SSPND_CHNG_WAITER
+ == erts_smp_atomic32_read_nob(&schdlr_sspnd.changing)));
+ erts_smp_atomic32_read_band_nob(&schdlr_sspnd.changing,
+ ~ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ }
+ }
+ }
+
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(schdlr_sspnd.dirty_cpu_online <= schdlr_sspnd.online);
+ if (!dirty_only)
+#endif
+ {
+ if (end_wait) {
+ erts_thr_progress_finalize_wait(esdp);
+ erts_thr_progress_active(esdp, 1);
+ }
+ if (have_unlocked_plocks)
+ erts_smp_proc_lock(p, plocks);
+ }
+
return res;
}
+#else /* !ERTS_DIRTY_SCHEDULERS */
+
ErtsSchedSuspendResult
erts_set_schedulers_online(Process *p,
ErtsProcLocks plocks,
@@ -5457,7 +7253,7 @@ erts_set_schedulers_online(Process *p,
for (ix = no; ix < online; ix++) {
ErtsRunQueue *rq = ERTS_RUNQ_IX(ix);
- wake_scheduler(rq, 0);
+ wake_scheduler(rq);
}
}
}
@@ -5499,15 +7295,24 @@ erts_set_schedulers_online(Process *p,
return res;
}
+#endif
+
ErtsSchedSuspendResult
erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
{
- int ix, res, have_unlocked_plocks = 0;
+ int ix, res, have_unlocked_plocks = 0, online;
erts_aint32_t changing;
ErtsProcList *plp;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ErtsSchedulerSleepInfo* ssi;
+#endif
erts_smp_mtx_lock(&schdlr_sspnd.mtx);
changing = erts_smp_atomic32_read_nob(&schdlr_sspnd.changing);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ changing |= (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_changing)
+ | erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_changing));
+#endif
if (changing) {
res = ERTS_SCHDLR_SSPND_YIELD_RESTART; /* Yield */
}
@@ -5517,10 +7322,13 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
erts_proclist_store_last(&schdlr_sspnd.msb.procs, plp);
p->flags |= F_HAVE_BLCKD_MSCHED;
ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.active) == 1);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_active) == 0);
+ ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_active) == 0);
+#endif
ASSERT(p->scheduler_data->no == 1);
res = ERTS_SCHDLR_SSPND_DONE_MSCHED_BLOCKED;
- }
- else {
+ } else {
int online = schdlr_sspnd.online;
p->flags |= F_HAVE_BLCKD_MSCHED;
if (plocks) {
@@ -5532,6 +7340,35 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
if (online == 1) {
res = ERTS_SCHDLR_SSPND_DONE_MSCHED_BLOCKED;
ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.active) == 1);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_active) == 1);
+ ASSERT(!(erts_smp_atomic32_read_nob(&ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(0)->flags)
+ & ERTS_SSI_FLG_SUSPENDED));
+ schdlr_sspnd.msb.dirty_cpu_wait_active = 0;
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_MSB
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(0);
+ erts_smp_atomic32_read_bor_nob(&ssi->flags, ERTS_SSI_FLG_SUSPENDED);
+ wake_dirty_schedulers(ERTS_DIRTY_CPU_RUNQ, 0);
+ while (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_active)
+ != schdlr_sspnd.msb.dirty_cpu_wait_active)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+
+ schdlr_sspnd.msb.dirty_io_wait_active = 0;
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_MSB
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ for (ix = 0; ix < erts_no_dirty_io_schedulers; ix++) {
+ ssi = ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(ix);
+ erts_smp_atomic32_read_bor_nob(&ssi->flags,
+ ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_IO_RUNQ, 0);
+ while (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_active)
+ != schdlr_sspnd.msb.dirty_io_wait_active)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+#endif
ASSERT(p->scheduler_data->no == 1);
}
else {
@@ -5550,13 +7387,44 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
schdlr_sspnd.msb.wait_active = 2;
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+ schdlr_sspnd.msb.dirty_cpu_wait_active = 0;
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_MSB
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ for (ix = 0; ix < erts_no_dirty_cpu_schedulers; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ erts_smp_atomic32_read_bor_nob(&ssi->flags,
+ ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_CPU_RUNQ, 0);
+ while (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_active)
+ != schdlr_sspnd.msb.dirty_cpu_wait_active)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ ASSERT(schdlr_sspnd.dirty_cpu_curr_online == schdlr_sspnd.dirty_cpu_online);
+
+ schdlr_sspnd.msb.dirty_io_wait_active = 0;
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET((ERTS_SCHDLR_SSPND_CHNG_MSB
+ | ERTS_SCHDLR_SSPND_CHNG_WAITER), 0);
+ for (ix = 0; ix < erts_no_dirty_io_schedulers; ix++) {
+ ssi = ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(ix);
+ erts_smp_atomic32_read_bor_nob(&ssi->flags,
+ ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_IO_RUNQ, 0);
+ while (erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_active)
+ != schdlr_sspnd.msb.dirty_io_wait_active)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ ASSERT(schdlr_sspnd.dirty_io_curr_online == schdlr_sspnd.dirty_io_online);
+#endif
change_no_used_runqs(1);
for (ix = 1; ix < erts_no_run_queues; ix++)
suspend_run_queue(ERTS_RUNQ_IX(ix));
for (ix = 1; ix < online; ix++) {
ErtsRunQueue *rq = ERTS_RUNQ_IX(ix);
- wake_scheduler(rq, 0);
+ wake_scheduler(rq);
}
if (erts_smp_atomic32_read_nob(&schdlr_sspnd.active)
@@ -5590,6 +7458,7 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
erts_smp_mtx_lock(&schdlr_sspnd.mtx);
}
+
ASSERT(res != ERTS_SCHDLR_SSPND_DONE_MSCHED_BLOCKED
? (ERTS_SCHDLR_SSPND_CHNG_WAITER
& erts_smp_atomic32_read_nob(&schdlr_sspnd.changing))
@@ -5630,12 +7499,12 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
p->flags &= ~F_HAVE_BLCKD_MSCHED;
schdlr_sspnd.msb.ongoing = 0;
if (schdlr_sspnd.online == 1) {
- /* No schedulers to resume */
+ /* No normal schedulers to resume */
ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.active) == 1);
ERTS_SCHDLR_SSPND_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_MSB);
}
else {
- int online = schdlr_sspnd.online;
+ online = schdlr_sspnd.online;
if (plocks) {
have_unlocked_plocks = 1;
erts_smp_proc_unlock(p, plocks);
@@ -5650,6 +7519,27 @@ erts_block_multi_scheduling(Process *p, ErtsProcLocks plocks, int on, int all)
for (ix = online; ix < erts_no_run_queues; ix++)
suspend_run_queue(ERTS_RUNQ_IX(ix));
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(ERTS_SCHDLR_SSPND_CHNG_MSB, 0);
+ schdlr_sspnd.msb.dirty_cpu_wait_active = schdlr_sspnd.dirty_cpu_online;
+ for (ix = 0; ix < schdlr_sspnd.dirty_cpu_online; ix++) {
+ ssi = ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(ix);
+ scheduler_ssi_resume_wake(ssi);
+ erts_smp_atomic32_read_band_nob(&ssi->flags,
+ ~ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_CPU_RUNQ, 0);
+
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(ERTS_SCHDLR_SSPND_CHNG_MSB, 0);
+ schdlr_sspnd.msb.dirty_io_wait_active = erts_no_dirty_io_schedulers;
+ for (ix = 0; ix < erts_no_dirty_io_schedulers; ix++) {
+ ssi = ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(ix);
+ scheduler_ssi_resume_wake(ssi);
+ erts_smp_atomic32_read_band_nob(&ssi->flags,
+ ~ERTS_SSI_FLG_SUSPENDED);
+ }
+ wake_dirty_schedulers(ERTS_DIRTY_IO_RUNQ, 0);
+#endif
res = ERTS_SCHDLR_SSPND_DONE;
}
}
@@ -5776,7 +7666,11 @@ sched_thread_func(void *vesdp)
erts_smp_atomic32_read_band_nob(&schdlr_sspnd.changing,
~ERTS_SCHDLR_SSPND_CHNG_ONLN);
if (no != 1)
+#ifdef ERTS_DIRTY_SCHEDULERS
+ erts_smp_cnd_broadcast(&schdlr_sspnd.cnd);
+#else
erts_smp_cnd_signal(&schdlr_sspnd.cnd);
+#endif
}
if (no == 1) {
@@ -5806,22 +7700,158 @@ sched_thread_func(void *vesdp)
return NULL;
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+static void*
+sched_dirty_cpu_thread_func(void *vesdp)
+{
+ ErtsThrPrgrCallbacks callbacks;
+ ErtsSchedulerData *esdp = vesdp;
+ Uint no = ERTS_DIRTY_SCHEDULER_NO(esdp);
+ ERTS_DIRTY_SCHEDULER_TYPE(esdp) = ERTS_DIRTY_CPU_SCHEDULER;
+ ASSERT(no != 0);
+ ERTS_DIRTY_CPU_SCHED_SLEEP_INFO_IX(no-1)->event = erts_tse_fetch();
+ callbacks.arg = (void *) esdp->ssi;
+ callbacks.wakeup = thr_prgr_wakeup;
+ callbacks.prepare_wait = NULL;
+ callbacks.wait = NULL;
+ callbacks.finalize_wait = NULL;
+
+ erts_thr_progress_register_unmanaged_thread(&callbacks);
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ {
+ char buf[31];
+ erts_snprintf(&buf[0], 31, "dirty cpu scheduler %beu", no);
+ erts_lc_set_thread_name(&buf[0]);
+ }
+#endif
+ erts_tsd_set(sched_data_key, vesdp);
+#if ERTS_USE_ASYNC_READY_Q
+ esdp->aux_work_data.async_ready.queue = NULL;
+#endif
+
+ erts_proc_lock_prepare_proc_lock_waiter();
+
+#ifdef HIPE
+ hipe_thread_signal_init();
+#endif
+ erts_thread_init_float();
+
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_cpu_changing)
+ & ERTS_SCHDLR_SSPND_CHNG_ONLN);
+
+ if (--schdlr_sspnd.dirty_cpu_curr_online == schdlr_sspnd.dirty_cpu_wait_curr_online) {
+ erts_smp_atomic32_read_band_nob(&schdlr_sspnd.dirty_cpu_changing,
+ ~ERTS_SCHDLR_SSPND_CHNG_ONLN);
+ if (no != 1)
+ erts_smp_cnd_broadcast(&schdlr_sspnd.cnd);
+ }
+
+ if (no == 1) {
+ while (schdlr_sspnd.dirty_cpu_curr_online != schdlr_sspnd.dirty_cpu_wait_curr_online)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_CPU_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ }
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+
+ process_main();
+ /* No schedulers should *ever* terminate */
+ erl_exit(ERTS_ABORT_EXIT,
+ "Dirty CPU scheduler thread number %beu terminated\n",
+ no);
+ return NULL;
+}
+
+static void*
+sched_dirty_io_thread_func(void *vesdp)
+{
+ ErtsThrPrgrCallbacks callbacks;
+ ErtsSchedulerData *esdp = vesdp;
+ Uint no = ERTS_DIRTY_SCHEDULER_NO(esdp);
+ ERTS_DIRTY_SCHEDULER_TYPE(esdp) = ERTS_DIRTY_IO_SCHEDULER;
+ ASSERT(no != 0);
+ ERTS_DIRTY_IO_SCHED_SLEEP_INFO_IX(no-1)->event = erts_tse_fetch();
+ callbacks.arg = (void *) esdp->ssi;
+ callbacks.wakeup = thr_prgr_wakeup;
+ callbacks.prepare_wait = NULL;
+ callbacks.wait = NULL;
+ callbacks.finalize_wait = NULL;
+
+ erts_thr_progress_register_unmanaged_thread(&callbacks);
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ {
+ char buf[31];
+ erts_snprintf(&buf[0], 31, "dirty io scheduler %beu", no);
+ erts_lc_set_thread_name(&buf[0]);
+ }
+#endif
+ erts_tsd_set(sched_data_key, vesdp);
+#if ERTS_USE_ASYNC_READY_Q
+ esdp->aux_work_data.async_ready.queue = NULL;
+#endif
+
+ erts_proc_lock_prepare_proc_lock_waiter();
+
+#ifdef HIPE
+ hipe_thread_signal_init();
+#endif
+ erts_thread_init_float();
+
+ erts_smp_mtx_lock(&schdlr_sspnd.mtx);
+ ASSERT(erts_smp_atomic32_read_nob(&schdlr_sspnd.dirty_io_changing)
+ & ERTS_SCHDLR_SSPND_CHNG_ONLN);
+
+ if (--schdlr_sspnd.dirty_io_curr_online == schdlr_sspnd.dirty_io_wait_curr_online) {
+ erts_smp_atomic32_read_band_nob(&schdlr_sspnd.dirty_io_changing,
+ ~ERTS_SCHDLR_SSPND_CHNG_ONLN);
+ if (no != 1)
+ erts_smp_cnd_broadcast(&schdlr_sspnd.cnd);
+ }
+
+ if (no == 1) {
+ while (schdlr_sspnd.dirty_io_curr_online != schdlr_sspnd.dirty_io_wait_curr_online)
+ erts_smp_cnd_wait(&schdlr_sspnd.cnd, &schdlr_sspnd.mtx);
+ ERTS_SCHDLR_SSPND_DIRTY_IO_CHNG_SET(0, ERTS_SCHDLR_SSPND_CHNG_WAITER);
+ }
+ erts_smp_mtx_unlock(&schdlr_sspnd.mtx);
+
+ process_main();
+ /* No schedulers should *ever* terminate */
+ erl_exit(ERTS_ABORT_EXIT,
+ "Dirty I/O scheduler thread number %beu terminated\n",
+ no);
+ return NULL;
+}
+#endif
+#endif
+
static ethr_tid aux_tid;
void
erts_start_schedulers(void)
{
int res = 0;
- Uint actual = 0;
+ Uint actual;
Uint wanted = erts_no_schedulers;
Uint wanted_no_schedulers = erts_no_schedulers;
ethr_thr_opts opts = ETHR_THR_OPTS_DEFAULT_INITER;
opts.detached = 1;
+#ifdef ETHR_HAVE_THREAD_NAMES
+ opts.name = malloc(80);
+ if (!opts.name) {
+ ERTS_INTERNAL_ERROR("malloc failed to allocate memory!");
+ }
+#endif
+
#ifdef ERTS_SMP
if (erts_runq_supervision_interval) {
opts.suggested_stack_size = 16;
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(opts.name, "runq_supervisor");
+#endif
erts_atomic_init_nob(&runq_supervisor_sleeping, 0);
if (0 != ethr_event_init(&runq_supervision_event))
erl_exit(1, "Failed to create run-queue supervision event\n");
@@ -5843,21 +7873,65 @@ erts_start_schedulers(void)
res = ENOTSUP;
}
- while (actual < wanted) {
+ for (actual = 0; actual < wanted; actual++) {
ErtsSchedulerData *esdp = ERTS_SCHEDULER_IX(actual);
- actual++;
- ASSERT(actual == esdp->no);
- res = ethr_thr_create(&esdp->tid,sched_thread_func,(void*)esdp,&opts);
+
+ ASSERT(actual == esdp->no - 1);
+
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(opts.name, "scheduler_%d", actual + 1);
+#endif
+
+#ifdef __OSE__
+ /* This should be done in the bind strategy */
+ opts.coreNo = (actual+1) % ose_num_cpus();
+#endif
+
+ res = ethr_thr_create(&esdp->tid, sched_thread_func, (void*)esdp, &opts);
+
if (res != 0) {
- actual--;
- break;
+ break;
}
}
-
+
erts_no_schedulers = actual;
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+ {
+ int ix;
+ for (ix = 0; ix < erts_no_dirty_cpu_schedulers; ix++) {
+ ErtsSchedulerData *esdp = ERTS_DIRTY_CPU_SCHEDULER_IX(ix);
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(opts.name,"dirty_cpu_scheduler_%d", ix + 1);
+#endif
+ res = ethr_thr_create(&esdp->tid,sched_dirty_cpu_thread_func,(void*)esdp,&opts);
+ if (res != 0)
+ erl_exit(1, "Failed to create dirty cpu scheduler thread %d\n", ix);
+ }
+ for (ix = 0; ix < erts_no_dirty_io_schedulers; ix++) {
+ ErtsSchedulerData *esdp = ERTS_DIRTY_IO_SCHEDULER_IX(ix);
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(opts.name,"dirty_io_scheduler_%d", ix + 1);
+#endif
+ res = ethr_thr_create(&esdp->tid,sched_dirty_io_thread_func,(void*)esdp,&opts);
+ if (res != 0)
+ erl_exit(1, "Failed to create dirty io scheduler thread %d\n", ix);
+ }
+ }
+#endif
+#endif
+
ERTS_THR_MEMORY_BARRIER;
+#ifdef ETHR_HAVE_THREAD_NAMES
+ sprintf(opts.name, "aux");
+#endif
+
+#ifdef __OSE__
+ opts.coreNo = 0;
+#endif /* __OSE__ */
+
res = ethr_thr_create(&aux_tid, aux_thread, NULL, &opts);
if (res != 0)
erl_exit(1, "Failed to create aux thread\n");
@@ -5877,6 +7951,10 @@ erts_start_schedulers(void)
actual, actual == 1 ? " was" : "s were");
erts_send_error_to_logger_nogl(dsbufp);
}
+
+#ifdef ETHR_HAVE_THREAD_NAMES
+ free(opts.name);
+#endif
}
#endif /* ERTS_SMP */
@@ -5978,7 +8056,8 @@ handle_pend_sync_suspend(Process *suspendee,
}
/* suspender is suspended waiting for suspendee to suspend;
resume suspender */
- resume_process(suspender);
+ ASSERT(suspendee != suspender);
+ resume_process(suspender, ERTS_PROC_LOCK_STATUS);
erts_smp_proc_unlock(suspender, ERTS_PROC_LOCK_STATUS);
}
}
@@ -6013,7 +8092,7 @@ pid2proc_not_running(Process *c_p, ErtsProcLocks c_p_locks,
ASSERT(c_p->flags & F_P2PNR_RESCHED);
c_p->flags &= ~F_P2PNR_RESCHED;
if (!suspend && rp)
- resume_process(rp);
+ resume_process(rp, rp_locks);
}
else {
@@ -6032,7 +8111,8 @@ pid2proc_not_running(Process *c_p, ErtsProcLocks c_p_locks,
goto done;
}
else {
- if (!(ERTS_PSFLG_RUNNING & erts_smp_atomic32_read_acqb(&rp->state)))
+ if (!((ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)
+ & erts_smp_atomic32_read_acqb(&rp->state)))
goto done;
}
@@ -6170,7 +8250,8 @@ handle_pend_bif_sync_suspend(Process *suspendee,
}
/* suspender is suspended waiting for suspendee to suspend;
resume suspender */
- resume_process(suspender);
+ ASSERT(suspender != suspendee);
+ resume_process(suspender, ERTS_PROC_LOCK_LINK|ERTS_PROC_LOCK_STATUS);
erts_smp_proc_unlock(suspender,
ERTS_PROC_LOCK_LINK|ERTS_PROC_LOCK_STATUS);
}
@@ -6530,7 +8611,8 @@ resume_process_1(BIF_ALIST_1)
ASSERT(ERTS_PSFLG_SUSPENDED
& erts_smp_atomic32_read_nob(&suspendee->state));
- resume_process(suspendee);
+ ASSERT(BIF_P != suspendee);
+ resume_process(suspendee, ERTS_PROC_LOCK_STATUS);
erts_smp_proc_unlock(suspendee, ERTS_PROC_LOCK_STATUS);
}
@@ -6660,7 +8742,7 @@ erts_resume(Process* process, ErtsProcLocks process_locks)
ERTS_SMP_LC_ASSERT(process_locks == erts_proc_lc_my_proc_locks(process));
if (!(process_locks & ERTS_PROC_LOCK_STATUS))
erts_smp_proc_lock(process, ERTS_PROC_LOCK_STATUS);
- resume_process(process);
+ resume_process(process, process_locks|ERTS_PROC_LOCK_STATUS);
if (!(process_locks & ERTS_PROC_LOCK_STATUS))
erts_smp_proc_unlock(process, ERTS_PROC_LOCK_STATUS);
}
@@ -6679,7 +8761,7 @@ erts_resume_processes(ErtsProcList *list)
proc = erts_pid2proc(NULL, 0, plp->pid, ERTS_PROC_LOCK_STATUS);
if (proc) {
if (erts_proclist_same(plp, proc)) {
- resume_process(proc);
+ resume_process(proc, ERTS_PROC_LOCK_STATUS);
nresumed++;
}
erts_smp_proc_unlock(proc, ERTS_PROC_LOCK_STATUS);
@@ -6695,7 +8777,7 @@ Eterm
erts_get_process_priority(Process *p)
{
erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
- switch (state & ERTS_PSFLG_PRIO_MASK) {
+ switch (ERTS_PSFLGS_GET_USR_PRIO(state)) {
case PRIORITY_MAX: return am_max;
case PRIORITY_HIGH: return am_high;
case PRIORITY_NORMAL: return am_normal;
@@ -6718,18 +8800,68 @@ erts_set_process_priority(Process *p, Eterm value)
}
a = erts_smp_atomic32_read_nob(&p->state);
- if (nprio == (a & ERTS_PSFLG_PRIO_MASK))
+ if (nprio == ERTS_PSFLGS_GET_USR_PRIO(a))
oprio = nprio;
else {
- erts_aint32_t e, n;
+ int slocked = 0;
+ erts_aint32_t e, n, aprio;
+
+ if (a & ERTS_PSFLG_ACTIVE_SYS) {
+ erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
+ slocked = 1;
+ }
+
do {
- oprio = a & ERTS_PSFLG_PRIO_MASK;
+ oprio = ERTS_PSFLGS_GET_USR_PRIO(a);
n = e = a;
- ASSERT(!(a & ERTS_PSFLG_IN_RUNQ));
+ if (!(a & (ERTS_PSFLG_ACTIVE_SYS|ERTS_PSFLG_DELAYED_SYS)))
+ aprio = nprio;
+ else {
+ int max_qbit;
+
+ if (!slocked) {
+ erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
+ slocked = 1;
+ }
+
+ max_qbit = 0;
+ if (a & ERTS_PSFLG_ACTIVE_SYS)
+ max_qbit |= p->sys_task_qs->qmask;
+ if (a & ERTS_PSFLG_DELAYED_SYS) {
+ ErtsProcSysTaskQs *qs;
+ qs = ERTS_PROC_GET_DELAYED_GC_TASK_QS(p);
+ ASSERT(qs);
+ max_qbit |= qs->qmask;
+ }
+ max_qbit &= -max_qbit;
+ switch (max_qbit) {
+ case MAX_BIT:
+ aprio = PRIORITY_MAX;
+ break;
+ case HIGH_BIT:
+ aprio = PRIORITY_HIGH;
+ break;
+ case NORMAL_BIT:
+ aprio = PRIORITY_NORMAL;
+ break;
+ case LOW_BIT:
+ aprio = PRIORITY_LOW;
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid qmask");
+ aprio = -1;
+ }
+
+ if (aprio > nprio) /* low value -> high prio */
+ aprio = nprio;
+ }
+
+ n &= ~(ERTS_PSFLGS_USR_PRIO_MASK
+ | ERTS_PSFLGS_ACT_PRIO_MASK);
+ n |= ((nprio << ERTS_PSFLGS_USR_PRIO_OFFSET)
+ | (aprio << ERTS_PSFLGS_ACT_PRIO_OFFSET));
- n &= ~ERTS_PSFLG_PRIO_MASK;
- n |= nprio;
a = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
} while (a != e);
}
@@ -6763,6 +8895,7 @@ erts_set_process_priority(Process *p, Eterm value)
Process *schedule(Process *p, int calls)
{
+ Process *proxy_p = NULL;
ErtsRunQueue *rq;
erts_aint_t dt;
ErtsSchedulerData *esdp;
@@ -6792,7 +8925,8 @@ Process *schedule(Process *p, int calls)
input_reductions = INPUT_REDUCTIONS;
}
- ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
+ ERTS_SMP_LC_ASSERT(ERTS_SCHEDULER_IS_DIRTY(erts_get_scheduler_data())
+ || !erts_thr_progress_is_blocking());
/*
* Clean up after the process being scheduled out.
@@ -6805,6 +8939,8 @@ Process *schedule(Process *p, int calls)
actual_reds = reds = 0;
erts_smp_runq_lock(rq);
} else {
+ sched_out_proc:
+
#ifdef ERTS_SMP
ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(p);
esdp = p->scheduler_data;
@@ -6858,10 +8994,11 @@ Process *schedule(Process *p, int calls)
esdp->reductions += reds;
- schedule_out_process(rq, state, p); /* Returns with rq locked! */
+ schedule_out_process(rq, state, p, proxy_p); /* Returns with rq locked! */
+ proxy_p = NULL;
ERTS_PROC_REDUCTIONS_EXECUTED(rq,
- (int) (state & ERTS_PSFLG_PRIO_MASK),
+ (int) ERTS_PSFLGS_GET_USR_PRIO(state),
reds,
actual_reds);
@@ -6870,18 +9007,19 @@ Process *schedule(Process *p, int calls)
p->scheduler_data = NULL;
#endif
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_MAIN|ERTS_PROC_LOCK_STATUS);
if (state & ERTS_PSFLG_FREE) {
#ifdef ERTS_SMP
ASSERT(esdp->free_process == p);
esdp->free_process = NULL;
-#else
- erts_free_proc(p);
+#else
+ state = erts_smp_atomic32_read_nob(&p->state);
+ if (!(state & ERTS_PSFLG_IN_RUNQ))
+ erts_free_proc(p);
#endif
}
- erts_smp_proc_unlock(p, ERTS_PROC_LOCK_MAIN|ERTS_PROC_LOCK_STATUS);
-
#ifdef ERTS_SMP
ASSERT(!esdp->free_process);
#endif
@@ -6899,45 +9037,42 @@ Process *schedule(Process *p, int calls)
}
- ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
+ ERTS_SMP_LC_ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp)
+ || !erts_thr_progress_is_blocking());
check_activities_to_run: {
#ifdef ERTS_SMP
ErtsMigrationPaths *mps;
ErtsMigrationPath *mp;
-
-#ifdef ERTS_SMP
- {
- ErtsProcList *pnd_xtrs = rq->procs.pending_exiters;
- if (erts_proclist_fetch(&pnd_xtrs, NULL)) {
- rq->procs.pending_exiters = NULL;
- erts_smp_runq_unlock(rq);
- handle_pending_exiters(pnd_xtrs);
- erts_smp_runq_lock(rq);
- }
-
+ ErtsProcList *pnd_xtrs = rq->procs.pending_exiters;
+ if (erts_proclist_fetch(&pnd_xtrs, NULL)) {
+ rq->procs.pending_exiters = NULL;
+ erts_smp_runq_unlock(rq);
+ handle_pending_exiters(pnd_xtrs);
+ erts_smp_runq_lock(rq);
}
-#endif
- if (rq->check_balance_reds <= 0)
- check_balance(rq);
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ if (rq->check_balance_reds <= 0)
+ check_balance(rq);
- ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
- ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
+ ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
- mps = erts_get_migration_paths_managed();
- mp = &mps->mpath[rq->ix];
+ mps = erts_get_migration_paths_managed();
+ mp = &mps->mpath[rq->ix];
- if (mp->flags & ERTS_RUNQ_FLGS_IMMIGRATE_QMASK)
- immigrate(rq, mp);
+ if (mp->flags & ERTS_RUNQ_FLGS_IMMIGRATE_QMASK)
+ immigrate(rq, mp);
+ }
+ ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
continue_check_activities_to_run:
flags = ERTS_RUNQ_FLGS_GET_NOB(rq);
continue_check_activities_to_run_known_flags:
-
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp)
+ || flags & ERTS_RUNQ_FLG_NONEMPTY);
if (flags & (ERTS_RUNQ_FLG_CHK_CPU_BIND|ERTS_RUNQ_FLG_SUSPENDED)) {
-
if (flags & ERTS_RUNQ_FLG_SUSPENDED) {
suspend_scheduler(esdp);
flags = ERTS_RUNQ_FLGS_GET_NOB(rq);
@@ -6948,22 +9083,32 @@ Process *schedule(Process *p, int calls)
erts_sched_check_cpu_bind(esdp);
}
}
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (ERTS_SCHEDULER_IS_DIRTY(esdp)
+ && (erts_smp_atomic32_read_acqb(&esdp->ssi->flags)
+ & ERTS_SSI_FLG_SUSPENDED))
+ suspend_scheduler(esdp);
+#endif
{
erts_aint32_t aux_work;
- int leader_update = erts_thr_progress_update(esdp);
+ int leader_update = ERTS_SCHEDULER_IS_DIRTY(esdp) ? 0
+ : erts_thr_progress_update(esdp);
aux_work = erts_atomic32_read_acqb(&esdp->ssi->aux_work);
- if (aux_work | leader_update) {
+ if (aux_work | leader_update | ERTS_SCHED_FAIR) {
erts_smp_runq_unlock(rq);
if (leader_update)
erts_thr_progress_leader_update(esdp);
+ else if (ERTS_SCHED_FAIR)
+ ERTS_SCHED_FAIR_YIELD();
if (aux_work)
handle_aux_work(&esdp->aux_work_data, aux_work, 0);
erts_smp_runq_lock(rq);
}
- }
- ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
+ ERTS_SMP_LC_ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp)
+ || !erts_thr_progress_is_blocking());
+ }
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(rq));
#else /* ERTS_SMP */
@@ -6977,6 +9122,17 @@ Process *schedule(Process *p, int calls)
flags = ERTS_RUNQ_FLGS_GET_NOB(rq);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && rq->halt_in_progress) {
+ /*
+ * TODO: if halt in progress, need to put the dirty scheduler
+ * to sleep somewhere around here to prevent it from picking up
+ * new work
+ */
+ }
+ else
+#endif
+
if ((!(flags & ERTS_RUNQ_FLGS_QMASK) && !rq->misc.start)
|| (rq->halt_in_progress && ERTS_EMPTY_RUNQ_PORTS(rq))) {
/* Prepare for scheduler wait */
@@ -6986,20 +9142,16 @@ Process *schedule(Process *p, int calls)
rq->wakeup_other = 0;
rq->wakeup_other_reds = 0;
- empty_runq(rq);
-
flags = ERTS_RUNQ_FLGS_GET_NOB(rq);
- if (flags & ERTS_RUNQ_FLG_SUSPENDED) {
- non_empty_runq(rq);
+ if (flags & ERTS_RUNQ_FLG_SUSPENDED)
goto continue_check_activities_to_run_known_flags;
- }
- else if (!(flags & ERTS_RUNQ_FLG_INACTIVE)) {
- if (try_steal_task(rq)) {
- non_empty_runq(rq);
+ if (flags & ERTS_RUNQ_FLG_INACTIVE)
+ empty_runq(rq);
+ else {
+ if (!ERTS_RUNQ_IX_IS_DIRTY(rq->ix) && try_steal_task(rq))
goto continue_check_activities_to_run;
- }
- (void) ERTS_RUNQ_FLGS_UNSET(rq, ERTS_RUNQ_FLG_PROTECTED);
+ empty_runq(rq);
/*
* Check for ERTS_RUNQ_FLG_SUSPENDED has to be done
@@ -7008,10 +9160,10 @@ Process *schedule(Process *p, int calls)
flags = ERTS_RUNQ_FLGS_GET_NOB(rq);
if (flags & ERTS_RUNQ_FLG_SUSPENDED) {
non_empty_runq(rq);
+ flags |= ERTS_RUNQ_FLG_NONEMPTY;
goto continue_check_activities_to_run_known_flags;
}
}
-
#endif
scheduler_wait(&fcalls, esdp, rq);
@@ -7022,7 +9174,9 @@ Process *schedule(Process *p, int calls)
goto check_activities_to_run;
}
- else if (fcalls > input_reductions && prepare_for_sys_schedule()) {
+ else if (!ERTS_SCHEDULER_IS_DIRTY(esdp) &&
+ (fcalls > input_reductions &&
+ prepare_for_sys_schedule(esdp, !0))) {
/*
* Schedule system-level activities.
*/
@@ -7030,8 +9184,6 @@ Process *schedule(Process *p, int calls)
erts_smp_atomic32_set_relb(&function_calls, 0);
fcalls = 0;
- ASSERT(!erts_port_task_have_outstanding_io_tasks());
-
#if 0 /* Not needed since we wont wait in sys schedule */
erts_sys_schedule_interrupt(0);
#endif
@@ -7063,7 +9215,9 @@ Process *schedule(Process *p, int calls)
if (RUNQ_READ_LEN(&rq->ports.info.len)) {
int have_outstanding_io;
have_outstanding_io = erts_port_task_execute(rq, &esdp->current_port);
- if ((have_outstanding_io && fcalls > 2*input_reductions)
+ if ((!erts_eager_check_io
+ && have_outstanding_io
+ && fcalls > 2*input_reductions)
|| rq->halt_in_progress) {
/*
* If we have performed more than 2*INPUT_REDUCTIONS since
@@ -7088,6 +9242,7 @@ Process *schedule(Process *p, int calls)
* Find a new process to run.
*/
pick_next_process: {
+ erts_aint32_t psflg_band_mask;
int prio_q;
int qmask;
@@ -7121,18 +9276,72 @@ Process *schedule(Process *p, int calls)
ASSERT(p); /* Wrong qmask in rq->flags? */
+ psflg_band_mask = ~(((erts_aint32_t) 1) << (ERTS_PSFLGS_GET_PRQ_PRIO(state)
+ + ERTS_PSFLGS_IN_PRQ_MASK_OFFSET));
+
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT((state & (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC)) !=
+ (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC));
+ if (state & (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC)) {
+ ASSERT((ERTS_SCHEDULER_IS_DIRTY_CPU(esdp) && (state & ERTS_PSFLG_DIRTY_CPU_PROC)) ||
+ (ERTS_SCHEDULER_IS_DIRTY_IO(esdp) && (state & ERTS_PSFLG_DIRTY_IO_PROC)));
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp) && !(state & ERTS_PSFLG_ACTIVE_SYS))
+ goto pick_next_process;
+ state &= ~(ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q|ERTS_PSFLG_DIRTY_IO_PROC_IN_Q);
+ }
+#endif
+
+ if (!(state & ERTS_PSFLG_PROXY))
+ psflg_band_mask &= ~ERTS_PSFLG_IN_RUNQ;
+ else {
+ proxy_p = p;
+ p = erts_proc_lookup_raw(proxy_p->common.id);
+ if (!p) {
+ free_proxy_proc(proxy_p);
+ proxy_p = NULL;
+ goto pick_next_process;
+ }
+ state = erts_smp_atomic32_read_nob(&p->state);
+ }
+
while (1) {
erts_aint32_t exp, new, tmp;
tmp = new = exp = state;
- new &= ~ERTS_PSFLG_IN_RUNQ;
- tmp = state & (ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_PENDING_EXIT);
- if (tmp != ERTS_PSFLG_SUSPENDED)
- new |= ERTS_PSFLG_RUNNING;
+ new &= psflg_band_mask;
+ if (!(state & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS))) {
+ tmp = state & (ERTS_PSFLG_SUSPENDED
+ | ERTS_PSFLG_PENDING_EXIT
+ | ERTS_PSFLG_ACTIVE_SYS);
+ if (tmp != ERTS_PSFLG_SUSPENDED) {
+ if (state & ERTS_PSFLG_ACTIVE_SYS)
+ new |= ERTS_PSFLG_RUNNING_SYS;
+ else
+ new |= ERTS_PSFLG_RUNNING;
+ }
+ }
state = erts_smp_atomic32_cmpxchg_relb(&p->state, new, exp);
if (state == exp) {
- tmp = state & (ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_PENDING_EXIT);
- if (tmp == ERTS_PSFLG_SUSPENDED)
+ if ((state & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_FREE))
+ || ((state & (ERTS_PSFLG_SUSPENDED
+ | ERTS_PSFLG_PENDING_EXIT
+ | ERTS_PSFLG_ACTIVE_SYS))
+ == ERTS_PSFLG_SUSPENDED)) {
+ if (state & ERTS_PSFLG_FREE) {
+#ifdef ERTS_SMP
+ erts_smp_proc_dec_refc(p);
+#else
+ erts_free_proc(p);
+#endif
+ }
+ if (proxy_p) {
+ free_proxy_proc(proxy_p);
+ proxy_p = NULL;
+ }
goto pick_next_process;
+ }
state = new;
break;
}
@@ -7162,7 +9371,11 @@ Process *schedule(Process *p, int calls)
(UWord) esdp->no);
int migrated = old && old != esdp->no;
- prio = (int) (state & ERTS_PSFLG_PRIO_MASK);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+#endif
+
+ prio = (int) ERTS_PSFLGS_GET_USR_PRIO(state);
erts_smp_spin_lock(&erts_sched_stat.lock);
erts_sched_stat.prio[prio].total_executed++;
@@ -7182,9 +9395,6 @@ Process *schedule(Process *p, int calls)
ASSERT(!p->scheduler_data);
p->scheduler_data = esdp;
#endif
- /* Never run a suspended process */
- ASSERT(!(ERTS_PSFLG_SUSPENDED & erts_smp_atomic32_read_nob(&p->state)));
-
reds = context_reds;
if (IS_TRACED(p)) {
@@ -7210,21 +9420,786 @@ Process *schedule(Process *p, int calls)
erts_check_my_tracer_proc(p);
#endif
+ if (state & ERTS_PSFLG_RUNNING_SYS) {
+ reds -= execute_sys_tasks(p, &state, reds);
+ if (reds <= 0
+#ifdef ERTS_DIRTY_SCHEDULERS
+ || (state & (ERTS_PSFLG_DIRTY_CPU_PROC|ERTS_PSFLG_DIRTY_IO_PROC))
+#endif
+ ) {
+ p->fcalls = reds;
+ goto sched_out_proc;
+ }
+
+ ASSERT(state & ERTS_PSFLG_RUNNING_SYS);
+ ASSERT(!(state & ERTS_PSFLG_RUNNING));
+
+ while (1) {
+ erts_aint32_t n, e;
+
+ if (((state & (ERTS_PSFLG_SUSPENDED
+ | ERTS_PSFLG_ACTIVE)) != ERTS_PSFLG_ACTIVE)
+ && !(state & ERTS_PSFLG_EXITING))
+ goto sched_out_proc;
+
+ n = e = state;
+ n &= ~ERTS_PSFLG_RUNNING_SYS;
+ n |= ERTS_PSFLG_RUNNING;
+
+ state = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
+ if (state == e) {
+ state = n;
+ break;
+ }
+
+ ASSERT(state & ERTS_PSFLG_RUNNING_SYS);
+ ASSERT(!(state & ERTS_PSFLG_RUNNING));
+ }
+ }
+
if (!(state & ERTS_PSFLG_EXITING)
&& ((FLAGS(p) & F_FORCE_GC)
|| (MSO(p).overhead > BIN_VHEAP_SZ(p)))) {
reds -= erts_garbage_collect(p, 0, p->arg_reg, p->arity);
- if (reds < 0) {
- reds = 1;
+ if (reds <= 0) {
+ p->fcalls = reds;
+ goto sched_out_proc;
}
}
+
+ if (proxy_p) {
+ free_proxy_proc(proxy_p);
+ proxy_p = NULL;
+ }
p->fcalls = reds;
ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(p);
+
+ /* Never run a suspended process */
+ ASSERT(!(ERTS_PSFLG_SUSPENDED & erts_smp_atomic32_read_nob(&p->state)));
+
return p;
}
}
+static int
+notify_sys_task_executed(Process *c_p, ErtsProcSysTask *st, Eterm st_result)
+{
+ Process *rp = erts_proc_lookup(st->requester);
+ if (rp) {
+ ErtsProcLocks rp_locks;
+ ErlOffHeap *ohp;
+ ErlHeapFragment* bp;
+ Eterm *hp, msg, req_id, result;
+ Uint st_result_sz, hsz;
+#ifdef DEBUG
+ Eterm *hp_start;
+#endif
+
+ rp_locks = (c_p == rp) ? ERTS_PROC_LOCK_MAIN : 0;
+
+ st_result_sz = is_immed(st_result) ? 0 : size_object(st_result);
+ hsz = st->req_id_sz + st_result_sz + 4 /* 3-tuple */;
+
+ hp = erts_alloc_message_heap(hsz,
+ &bp,
+ &ohp,
+ rp,
+ &rp_locks);
+
+#ifdef DEBUG
+ hp_start = hp;
+#endif
+
+ req_id = st->req_id_sz == 0 ? st->req_id : copy_struct(st->req_id,
+ st->req_id_sz,
+ &hp,
+ ohp);
+
+ result = st_result_sz == 0 ? st_result : copy_struct(st_result,
+ st_result_sz,
+ &hp,
+ ohp);
+
+ ASSERT(is_immed(st->reply_tag));
+
+ msg = TUPLE3(hp, st->reply_tag, req_id, result);
+
+#ifdef DEBUG
+ hp += 4;
+ ASSERT(hp_start + hsz == hp);
+#endif
+
+ erts_queue_message(rp,
+ &rp_locks,
+ bp,
+ msg,
+ NIL
+#ifdef USE_VM_PROBES
+ , NIL
+#endif
+ );
+
+ if (c_p == rp)
+ rp_locks &= ~ERTS_PROC_LOCK_MAIN;
+
+ if (rp_locks)
+ erts_smp_proc_unlock(rp, rp_locks);
+ }
+
+ erts_cleanup_offheap(&st->off_heap);
+
+ erts_free(ERTS_ALC_T_PROC_SYS_TSK, st);
+
+ return rp ? 1 : 0;
+}
+
+static ERTS_INLINE ErtsProcSysTask *
+fetch_sys_task(Process *c_p, erts_aint32_t state, int *qmaskp, int *priop)
+{
+ ErtsProcSysTaskQs *unused_qs = NULL;
+ int qbit, qmask;
+ ErtsProcSysTask *st, **qp;
+
+ *priop = -1; /* Shut up annoying erroneous warning */
+
+ erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_STATUS);
+
+ if (!c_p->sys_task_qs) {
+ qmask = 0;
+ st = NULL;
+ goto update_state;
+ }
+
+ qmask = c_p->sys_task_qs->qmask;
+
+ if ((state & (ERTS_PSFLG_ACTIVE
+ | ERTS_PSFLG_EXITING
+ | ERTS_PSFLG_SUSPENDED)) == ERTS_PSFLG_ACTIVE) {
+ /* No sys tasks if we got exclusively higher prio user work to do */
+ st = NULL;
+ switch (ERTS_PSFLGS_GET_USR_PRIO(state)) {
+ case PRIORITY_MAX:
+ if (!(qmask & MAX_BIT))
+ goto done;
+ break;
+ case PRIORITY_HIGH:
+ if (!(qmask & (MAX_BIT|HIGH_BIT)))
+ goto done;
+ break;
+ default:
+ break;
+ }
+ }
+
+ qbit = qmask & -qmask;
+ switch (qbit) {
+ case MAX_BIT:
+ qp = &c_p->sys_task_qs->q[PRIORITY_MAX];
+ *priop = PRIORITY_MAX;
+ break;
+ case HIGH_BIT:
+ qp = &c_p->sys_task_qs->q[PRIORITY_HIGH];
+ *priop = PRIORITY_HIGH;
+ break;
+ case NORMAL_BIT:
+ if (!(qmask & PRIORITY_LOW)
+ || ++c_p->sys_task_qs->ncount <= RESCHEDULE_LOW) {
+ qp = &c_p->sys_task_qs->q[PRIORITY_NORMAL];
+ *priop = PRIORITY_NORMAL;
+ break;
+ }
+ c_p->sys_task_qs->ncount = 0;
+ /* Fall through */
+ case LOW_BIT:
+ qp = &c_p->sys_task_qs->q[PRIORITY_LOW];
+ *priop = PRIORITY_LOW;
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid qmask");
+ }
+
+ st = *qp;
+ ASSERT(st);
+ if (st->next != st) {
+ *qp = st->next;
+ st->next->prev = st->prev;
+ st->prev->next = st->next;
+ }
+ else {
+ erts_aint32_t a, e, n, st_prio, qmask2;
+
+ *qp = NULL;
+ qmask &= ~qbit;
+ c_p->sys_task_qs->qmask = qmask;
+
+ update_state:
+
+ qmask2 = qmask;
+
+ if (state & ERTS_PSFLG_DELAYED_SYS) {
+ ErtsProcSysTaskQs *qs = ERTS_PROC_GET_DELAYED_GC_TASK_QS(c_p);
+ ASSERT(qs);
+ qmask2 |= qs->qmask;
+ }
+
+ switch (qmask2 & -qmask2) {
+ case MAX_BIT:
+ st_prio = PRIORITY_MAX;
+ break;
+ case HIGH_BIT:
+ st_prio = PRIORITY_HIGH;
+ break;
+ case NORMAL_BIT:
+ st_prio = PRIORITY_NORMAL;
+ break;
+ case LOW_BIT:
+ case 0:
+ st_prio = PRIORITY_LOW;
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid qmask");
+ }
+
+ if (!qmask) {
+ unused_qs = c_p->sys_task_qs;
+ c_p->sys_task_qs = NULL;
+ }
+
+ a = state;
+ do {
+ erts_aint32_t prio = ERTS_PSFLGS_GET_USR_PRIO(a);
+
+ if (prio > st_prio)
+ prio = st_prio;
+
+ n = e = a;
+
+ n &= ~ERTS_PSFLGS_ACT_PRIO_MASK;
+ n |= (prio << ERTS_PSFLGS_ACT_PRIO_OFFSET);
+
+ if (!qmask)
+ n &= ~ERTS_PSFLG_ACTIVE_SYS;
+
+ if (a == n)
+ break;
+ a = erts_smp_atomic32_cmpxchg_nob(&c_p->state, n, e);
+ } while (a != e);
+ }
+
+done:
+
+ erts_smp_proc_unlock(c_p, ERTS_PROC_LOCK_STATUS);
+
+ if (unused_qs)
+ proc_sys_task_queues_free(unused_qs);
+
+ *qmaskp = qmask;
+
+ return st;
+}
+
+static void save_gc_task(Process *c_p, ErtsProcSysTask *st, int prio);
+
+static int
+execute_sys_tasks(Process *c_p, erts_aint32_t *statep, int in_reds)
+{
+ int garbage_collected = 0;
+ erts_aint32_t state = *statep;
+ int max_reds = in_reds;
+ int reds = 0;
+ int qmask = 0;
+
+ ERTS_SMP_LC_ASSERT(erts_proc_lc_my_proc_locks(c_p) == ERTS_PROC_LOCK_MAIN);
+
+ do {
+ ErtsProcSysTask *st;
+ int st_prio;
+ Eterm st_res;
+
+ if (state & (ERTS_PSFLG_EXITING|ERTS_PSFLG_PENDING_EXIT)) {
+#ifdef ERTS_SMP
+ if (state & ERTS_PSFLG_PENDING_EXIT)
+ erts_handle_pending_exit(c_p, ERTS_PROC_LOCK_MAIN);
+#endif
+ ASSERT(ERTS_PROC_IS_EXITING(c_p));
+ break;
+ }
+
+ st = fetch_sys_task(c_p, state, &qmask, &st_prio);
+ if (!st)
+ break;
+
+ switch (st->type) {
+ case ERTS_PSTT_GC:
+ if (c_p->flags & F_DISABLE_GC) {
+ save_gc_task(c_p, st, st_prio);
+ st = NULL;
+ reds++;
+ }
+ else {
+ if (!garbage_collected) {
+ FLAGS(c_p) |= F_NEED_FULLSWEEP;
+ reds += erts_garbage_collect(c_p,
+ 0,
+ c_p->arg_reg,
+ c_p->arity);
+ garbage_collected = 1;
+ }
+ st_res = am_true;
+ }
+ break;
+ case ERTS_PSTT_CPC:
+ st_res = erts_check_process_code(c_p,
+ st->arg[0],
+ st->arg[1] == am_true,
+ &reds);
+ if (is_non_value(st_res)) {
+ /* Needed gc, but gc was disabled */
+ save_gc_task(c_p, st, st_prio);
+ st = NULL;
+ }
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid process sys task type");
+ st_res = am_false;
+ }
+
+ if (st)
+ reds += notify_sys_task_executed(c_p, st, st_res);
+
+ state = erts_smp_atomic32_read_acqb(&c_p->state);
+ } while (qmask && reds < max_reds);
+
+ *statep = state;
+
+ return reds;
+}
+
+static int
+cleanup_sys_tasks(Process *c_p, erts_aint32_t in_state, int in_reds)
+{
+ erts_aint32_t state = in_state;
+ int max_reds = in_reds;
+ int reds = 0;
+ int qmask = 0;
+
+ ERTS_SMP_LC_ASSERT(erts_proc_lc_my_proc_locks(c_p) == ERTS_PROC_LOCK_MAIN);
+
+ do {
+ ErtsProcSysTask *st;
+ Eterm st_res;
+ int st_prio;
+
+ st = fetch_sys_task(c_p, state, &qmask, &st_prio);
+ if (!st)
+ break;
+
+ switch (st->type) {
+ case ERTS_PSTT_GC:
+ st_res = am_false;
+ break;
+ case ERTS_PSTT_CPC:
+ st_res = am_false;
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid process sys task type");
+ st_res = am_false;
+ break;
+ }
+
+ reds += notify_sys_task_executed(c_p, st, st_res);
+
+ state = erts_smp_atomic32_read_acqb(&c_p->state);
+ } while (qmask && reds < max_reds);
+
+ return reds;
+}
+
+BIF_RETTYPE
+erts_internal_request_system_task_3(BIF_ALIST_3)
+{
+ Process *rp = erts_proc_lookup(BIF_ARG_1);
+ ErtsProcSysTaskQs *stqs, *free_stqs = NULL;
+ ErtsProcSysTask *st = NULL;
+ erts_aint32_t prio, rp_state;
+ int rp_locked;
+ Eterm noproc_res, req_type;
+
+ if (!rp && !is_internal_pid(BIF_ARG_1)) {
+ if (!is_external_pid(BIF_ARG_1))
+ goto badarg;
+ if (external_pid_dist_entry(BIF_ARG_1) != erts_this_dist_entry)
+ goto badarg;
+ }
+
+ switch (BIF_ARG_2) {
+ case am_max: prio = PRIORITY_MAX; break;
+ case am_high: prio = PRIORITY_HIGH; break;
+ case am_normal: prio = PRIORITY_NORMAL; break;
+ case am_low: prio = PRIORITY_LOW; break;
+ default: goto badarg;
+ }
+
+ if (is_not_tuple(BIF_ARG_3))
+ goto badarg;
+ else {
+ int i;
+ Eterm *tp = tuple_val(BIF_ARG_3);
+ Uint arity = arityval(*tp);
+ Eterm req_id;
+ Uint req_id_sz;
+ Eterm arg[ERTS_MAX_PROC_SYS_TASK_ARGS];
+ Uint arg_sz[ERTS_MAX_PROC_SYS_TASK_ARGS];
+ Uint tot_sz;
+ Eterm *hp;
+
+ if (arity < 2)
+ goto badarg;
+ if (arity > 2 + ERTS_MAX_PROC_SYS_TASK_ARGS)
+ goto badarg;
+ req_type = tp[1];
+ req_id = tp[2];
+ req_id_sz = is_immed(req_id) ? req_id : size_object(req_id);
+ tot_sz = req_id_sz;
+ for (i = 0; i < ERTS_MAX_PROC_SYS_TASK_ARGS; i++) {
+ int tix = 3 + i;
+ if (tix > arity) {
+ arg[i] = THE_NON_VALUE;
+ arg_sz[i] = 0;
+ }
+ else {
+ arg[i] = tp[tix];
+ if (is_immed(arg[i]))
+ arg_sz[i] = 0;
+ else {
+ arg_sz[i] = size_object(arg[i]);
+ tot_sz += arg_sz[i];
+ }
+ }
+ }
+ st = erts_alloc(ERTS_ALC_T_PROC_SYS_TSK,
+ ERTS_PROC_SYS_TASK_SIZE(tot_sz));
+ st->next = st->prev = st; /* Prep for empty prio queue */
+ ERTS_INIT_OFF_HEAP(&st->off_heap);
+ hp = &st->heap[0];
+
+ st->requester = BIF_P->common.id;
+ st->reply_tag = req_type;
+ st->req_id_sz = req_id_sz;
+ st->req_id = req_id_sz == 0 ? req_id : copy_struct(req_id,
+ req_id_sz,
+ &hp,
+ &st->off_heap);
+
+ for (i = 0; i < ERTS_MAX_PROC_SYS_TASK_ARGS; i++)
+ st->arg[i] = arg_sz[i] == 0 ? arg[i] : copy_struct(arg[i],
+ arg_sz[i],
+ &hp,
+ &st->off_heap);
+ ASSERT(&st->heap[0] + tot_sz == hp);
+ }
+
+ switch (req_type) {
+
+ case am_garbage_collect:
+ st->type = ERTS_PSTT_GC;
+ noproc_res = am_false;
+ if (!rp)
+ goto noproc;
+ break;
+
+ case am_check_process_code:
+ if (is_not_atom(st->arg[0]))
+ goto badarg;
+ if (st->arg[1] != am_true && st->arg[1] != am_false)
+ goto badarg;
+ noproc_res = am_false;
+ st->type = ERTS_PSTT_CPC;
+ if (!rp)
+ goto noproc;
+ break;
+
+ default:
+ goto badarg;
+ }
+
+ rp_state = erts_smp_atomic32_read_nob(&rp->state);
+
+ rp_locked = 0;
+
+ free_stqs = NULL;
+ if (rp_state & ERTS_PSFLG_ACTIVE_SYS)
+ stqs = NULL;
+ else {
+ alloc_qs:
+ stqs = proc_sys_task_queues_alloc();
+ stqs->qmask = 1 << prio;
+ stqs->ncount = 0;
+ stqs->q[PRIORITY_MAX] = NULL;
+ stqs->q[PRIORITY_HIGH] = NULL;
+ stqs->q[PRIORITY_NORMAL] = NULL;
+ stqs->q[PRIORITY_LOW] = NULL;
+ stqs->q[prio] = st;
+ }
+
+ if (!rp_locked) {
+ rp_locked = 1;
+ erts_smp_proc_lock(rp, ERTS_PROC_LOCK_STATUS);
+
+ rp_state = erts_smp_atomic32_read_nob(&rp->state);
+ if (rp_state & ERTS_PSFLG_EXITING) {
+ erts_smp_proc_unlock(rp, ERTS_PROC_LOCK_STATUS);
+ rp = NULL;
+ free_stqs = stqs;
+ goto noproc;
+ }
+ }
+
+ if (!rp->sys_task_qs) {
+ if (stqs)
+ rp->sys_task_qs = stqs;
+ else
+ goto alloc_qs;
+ }
+ else {
+ if (stqs)
+ free_stqs = stqs;
+ stqs = rp->sys_task_qs;
+ if (!stqs->q[prio]) {
+ stqs->q[prio] = st;
+ stqs->qmask |= 1 << prio;
+ }
+ else {
+ st->next = stqs->q[prio];
+ st->prev = stqs->q[prio]->prev;
+ st->next->prev = st;
+ st->prev->next = st;
+ ASSERT(stqs->qmask & (1 << prio));
+ }
+ }
+
+ if (ERTS_PSFLGS_GET_ACT_PRIO(rp_state) > prio) {
+ erts_aint32_t n, a, e;
+ /* Need to elevate actual prio */
+
+ a = rp_state;
+ do {
+ if (ERTS_PSFLGS_GET_ACT_PRIO(a) <= prio) {
+ n = a;
+ break;
+ }
+ n = e = a;
+ n &= ~ERTS_PSFLGS_ACT_PRIO_MASK;
+ n |= (prio << ERTS_PSFLGS_ACT_PRIO_OFFSET);
+ a = erts_smp_atomic32_cmpxchg_nob(&rp->state, n, e);
+ } while (a != e);
+ rp_state = n;
+ }
+
+ /*
+ * schedule_process_sys_task() unlocks status
+ * lock on process.
+ */
+ schedule_process_sys_task(rp, rp_state, NULL);
+
+ if (free_stqs)
+ proc_sys_task_queues_free(free_stqs);
+
+ BIF_RET(am_ok);
+
+noproc:
+
+ notify_sys_task_executed(BIF_P, st, noproc_res);
+ if (free_stqs)
+ proc_sys_task_queues_free(free_stqs);
+ BIF_RET(am_ok);
+
+badarg:
+
+ if (st) {
+ erts_cleanup_offheap(&st->off_heap);
+ erts_free(ERTS_ALC_T_PROC_SYS_TSK, st);
+ }
+ if (free_stqs)
+ proc_sys_task_queues_free(free_stqs);
+ BIF_ERROR(BIF_P, BADARG);
+}
+
+static void
+save_gc_task(Process *c_p, ErtsProcSysTask *st, int prio)
+{
+ erts_aint32_t state;
+ ErtsProcSysTaskQs *qs;
+
+ ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_MAIN == erts_proc_lc_my_proc_locks(c_p));
+
+ qs = ERTS_PROC_GET_DELAYED_GC_TASK_QS(c_p);
+ if (!qs) {
+ st->next = st->prev = st;
+ qs = proc_sys_task_queues_alloc();
+ qs->qmask = 1 << prio;
+ qs->ncount = 0;
+ qs->q[PRIORITY_MAX] = NULL;
+ qs->q[PRIORITY_HIGH] = NULL;
+ qs->q[PRIORITY_NORMAL] = NULL;
+ qs->q[PRIORITY_LOW] = NULL;
+ qs->q[prio] = st;
+ (void) ERTS_PROC_SET_DELAYED_GC_TASK_QS(c_p, ERTS_PROC_LOCK_MAIN, qs);
+ }
+ else {
+ if (!qs->q[prio]) {
+ st->next = st->prev = st;
+ qs->q[prio] = st;
+ qs->qmask |= 1 << prio;
+ }
+ else {
+ st->next = qs->q[prio];
+ st->prev = qs->q[prio]->prev;
+ st->next->prev = st;
+ st->prev->next = st;
+ ASSERT(qs->qmask & (1 << prio));
+ }
+ }
+
+ state = erts_smp_atomic32_read_nob(&c_p->state);
+ ASSERT((ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS) & state);
+
+ while (!(state & ERTS_PSFLG_DELAYED_SYS)
+ || prio < ERTS_PSFLGS_GET_ACT_PRIO(state)) {
+ erts_aint32_t n, e;
+
+ n = e = state;
+ n |= ERTS_PSFLG_DELAYED_SYS;
+ if (prio < ERTS_PSFLGS_GET_ACT_PRIO(state)) {
+ n &= ~ERTS_PSFLGS_ACT_PRIO_MASK;
+ n |= prio << ERTS_PSFLGS_ACT_PRIO_OFFSET;
+ }
+ state = erts_smp_atomic32_cmpxchg_relb(&c_p->state, n, e);
+ if (state == e)
+ break;
+ }
+}
+
+int
+erts_set_gc_state(Process *c_p, int enable)
+{
+ ErtsProcSysTaskQs *dgc_tsk_qs;
+ ASSERT(c_p == erts_get_current_process());
+ ASSERT((ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)
+ & erts_smp_atomic32_read_nob(&c_p->state));
+ ERTS_SMP_LC_ASSERT(ERTS_PROC_LOCK_MAIN == erts_proc_lc_my_proc_locks(c_p));
+
+ if (!enable) {
+ c_p->flags |= F_DISABLE_GC;
+ return 0;
+ }
+
+ c_p->flags &= ~F_DISABLE_GC;
+
+ dgc_tsk_qs = ERTS_PROC_GET_DELAYED_GC_TASK_QS(c_p);
+ if (!dgc_tsk_qs)
+ return 0;
+
+ /* Move delayed gc tasks into sys tasks queues. */
+
+ erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_STATUS);
+
+ if (!c_p->sys_task_qs) {
+ c_p->sys_task_qs = dgc_tsk_qs;
+ dgc_tsk_qs = NULL;
+ }
+ else {
+ ErtsProcSysTaskQs *stsk_qs;
+ int prio;
+
+ /*
+ * We push delayed tasks to the front of the queue
+ * since they have already made it to the front
+ * once and then been delayed after that.
+ */
+
+ stsk_qs = c_p->sys_task_qs;
+
+ while (dgc_tsk_qs->qmask) {
+ int qbit = dgc_tsk_qs->qmask & -dgc_tsk_qs->qmask;
+ dgc_tsk_qs->qmask &= ~qbit;
+ switch (qbit) {
+ case MAX_BIT:
+ prio = PRIORITY_MAX;
+ break;
+ case HIGH_BIT:
+ prio = PRIORITY_HIGH;
+ break;
+ case NORMAL_BIT:
+ prio = PRIORITY_NORMAL;
+ break;
+ case LOW_BIT:
+ prio = PRIORITY_LOW;
+ break;
+ default:
+ ERTS_INTERNAL_ERROR("Invalid qmask");
+ prio = -1;
+ break;
+ }
+
+ ASSERT(dgc_tsk_qs->q[prio]);
+
+ if (!stsk_qs->q[prio]) {
+ stsk_qs->q[prio] = dgc_tsk_qs->q[prio];
+ stsk_qs->qmask |= 1 << prio;
+ }
+ else {
+ ErtsProcSysTask *first1, *last1, *first2, *last2;
+
+ ASSERT(stsk_qs->qmask & (1 << prio));
+ first1 = dgc_tsk_qs->q[prio];
+ last1 = first1->prev;
+ first2 = stsk_qs->q[prio];
+ last2 = first1->prev;
+
+ last1->next = first2;
+ first2->prev = last1;
+
+ first1->prev = last2;
+ last2->next = first1;
+
+ stsk_qs->q[prio] = first1;
+ }
+
+ }
+ }
+
+#ifdef DEBUG
+ {
+ int qmask;
+ erts_aint32_t aprio, state =
+#endif
+
+ erts_smp_atomic32_read_bset_nob(&c_p->state,
+ (ERTS_PSFLG_DELAYED_SYS
+ | ERTS_PSFLG_ACTIVE_SYS),
+ ERTS_PSFLG_ACTIVE_SYS);
+
+#ifdef DEBUG
+ ASSERT(state & ERTS_PSFLG_DELAYED_SYS);
+ qmask = c_p->sys_task_qs->qmask;
+ aprio = ERTS_PSFLGS_GET_ACT_PRIO(state);
+ ASSERT(ERTS_PSFLGS_GET_USR_PRIO(state) >= aprio);
+ ASSERT((qmask & -qmask) >= (1 << aprio));
+ }
+#endif
+
+ erts_smp_proc_unlock(c_p, ERTS_PROC_LOCK_STATUS);
+
+ (void) ERTS_PROC_SET_DELAYED_GC_TASK_QS(c_p, ERTS_PROC_LOCK_MAIN, NULL);
+
+ if (dgc_tsk_qs)
+ proc_sys_task_queues_free(dgc_tsk_qs);
+
+ return 1;
+}
+
void
erts_sched_stat_modify(int what)
{
@@ -7324,6 +10299,10 @@ erts_schedule_misc_op(void (*func)(void *), void *arg)
rq->misc.start = molp;
rq->misc.end = molp;
+#ifdef ERTS_SMP
+ non_empty_runq(rq);
+#endif
+
erts_smp_runq_unlock(rq);
smp_notify_inc_runq(rq);
@@ -7506,7 +10485,7 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
* Check for errors.
*/
- if (is_not_atom(mod) || is_not_atom(func) || ((arity = list_length(args)) < 0)) {
+ if (is_not_atom(mod) || is_not_atom(func) || ((arity = erts_list_length(args)) < 0)) {
so->error_code = BADARG;
goto error;
}
@@ -7521,7 +10500,8 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
prio = (erts_aint32_t) so->priority;
}
- state |= (prio & ERTS_PSFLG_PRIO_MASK);
+ state |= (((prio & ERTS_PSFLGS_PRIO_MASK) << ERTS_PSFLGS_ACT_PRIO_OFFSET)
+ | ((prio & ERTS_PSFLGS_PRIO_MASK) << ERTS_PSFLGS_USR_PRIO_OFFSET));
if (!rq)
rq = erts_get_runq_proc(parent);
@@ -7592,13 +10572,14 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
p->htop = p->heap;
p->heap_sz = sz;
p->catches = 0;
- p->extra_root = NULL;
p->bin_vheap_sz = p->min_vheap_size;
p->bin_old_vheap_sz = p->min_vheap_size;
p->bin_old_vheap = 0;
p->bin_vheap_mature = 0;
+ p->sys_task_qs = NULL;
+
/* No need to initialize p->fcalls. */
p->current = p->initial+INITIAL_MOD;
@@ -7815,6 +10796,7 @@ void erts_init_empty_process(Process *p)
p->bin_vheap_sz = BIN_VH_MIN_SIZE;
p->bin_old_vheap_sz = BIN_VH_MIN_SIZE;
p->bin_old_vheap = 0;
+ p->sys_task_qs = NULL;
p->bin_vheap_mature = 0;
#ifdef ERTS_SMP
p->common.u.alive.ptimer = NULL;
@@ -8070,33 +11052,22 @@ delete_process(Process* p)
p->fvalue = NIL;
}
-static ERTS_INLINE erts_aint32_t
-set_proc_exiting_state(Process *p, erts_aint32_t state)
-{
- erts_aint32_t a, n, e;
- a = state;
- while (1) {
- n = e = a;
- n &= ~(ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_PENDING_EXIT);
- n |= ERTS_PSFLG_EXITING|ERTS_PSFLG_ACTIVE;
- if (!(a & (ERTS_PSFLG_IN_RUNQ|ERTS_PSFLG_RUNNING)))
- n |= ERTS_PSFLG_IN_RUNQ;
- a = erts_smp_atomic32_cmpxchg_relb(&p->state, n, e);
- if (a == e)
- break;
- }
- return a;
-}
-
static ERTS_INLINE void
set_proc_exiting(Process *p,
- erts_aint32_t state,
+ erts_aint32_t in_state,
Eterm reason,
ErlHeapFragment *bp)
{
+ erts_aint32_t state = in_state, enq_prio = -1;
+ int enqueue;
ERTS_SMP_LC_ASSERT(erts_proc_lc_my_proc_locks(p) == ERTS_PROC_LOCKS_ALL);
- state = set_proc_exiting_state(p, state);
+ enqueue = change_proc_schedule_state(p,
+ ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_PENDING_EXIT,
+ ERTS_PSFLG_EXITING|ERTS_PSFLG_ACTIVE,
+ &state,
+ &enq_prio,
+ ERTS_PROC_LOCKS_ALL);
p->fvalue = reason;
if (bp)
@@ -8111,15 +11082,38 @@ set_proc_exiting(Process *p,
cancel_timer(p);
p->i = (BeamInstr *) beam_exit;
- if (erts_system_profile_flags.runnable_procs
- && !(state & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED))) {
- profile_runnable_proc(p, am_active);
- }
-
- if (!(state & (ERTS_PSFLG_IN_RUNQ|ERTS_PSFLG_RUNNING)))
- add2runq(p, state);
+ if (enqueue)
+ add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio),
+ state,
+ enq_prio);
}
+static ERTS_INLINE erts_aint32_t
+set_proc_self_exiting(Process *c_p)
+{
+#ifdef DEBUG
+ int enqueue;
+#endif
+ erts_aint32_t state, enq_prio = -1;
+
+ ERTS_SMP_LC_ASSERT(erts_proc_lc_my_proc_locks(c_p) == ERTS_PROC_LOCKS_ALL);
+
+ state = erts_smp_atomic32_read_nob(&c_p->state);
+ ASSERT(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS));
+
+#ifdef DEBUG
+ enqueue =
+#endif
+ change_proc_schedule_state(c_p,
+ ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_PENDING_EXIT,
+ ERTS_PSFLG_EXITING|ERTS_PSFLG_ACTIVE,
+ &state,
+ &enq_prio,
+ ERTS_PROC_LOCKS_ALL);
+
+ ASSERT(!enqueue);
+ return state;
+}
#ifdef ERTS_SMP
@@ -8167,7 +11161,7 @@ handle_pending_exiters(ErtsProcList *pnd_xtrs)
if (p) {
if (erts_proclist_same(plp, p)) {
erts_aint32_t state = erts_smp_atomic32_read_acqb(&p->state);
- if (!(state & ERTS_PSFLG_RUNNING)) {
+ if (!(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS))) {
ASSERT(state & ERTS_PSFLG_PENDING_EXIT);
erts_handle_pending_exit(p, ERTS_PROC_LOCKS_ALL);
}
@@ -8196,8 +11190,15 @@ save_pending_exiter(Process *p)
erts_proclist_store_last(&rq->procs.pending_exiters, plp);
+ non_empty_runq(rq);
+
erts_smp_runq_unlock(rq);
- wake_scheduler(rq, 1);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (ERTS_RUNQ_IX_IS_DIRTY(rq->ix))
+ wake_dirty_schedulers(rq, 0);
+ else
+#endif
+ wake_scheduler(rq);
}
#endif
@@ -8349,7 +11350,7 @@ send_exit_signal(Process *c_p, /* current process if and only
dtrace_pid_str(from, sender_str);
dtrace_proc_str(rp, receiver_str);
- erts_snprintf(reason_buf, sizeof(reason_buf) - 1, "%T", reason);
+ erts_snprintf(reason_buf, sizeof(DTRACE_CHARBUF_NAME(reason_buf)) - 1, "%T", reason);
DTRACE3(process_exit_signal, sender_str, receiver_str, reason_buf);
}
#endif
@@ -8388,7 +11389,7 @@ send_exit_signal(Process *c_p, /* current process if and only
}
set_proc_exiting(c_p, state, rsn, NULL);
}
- else if (!(state & ERTS_PSFLG_RUNNING)) {
+ else if (!(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS))) {
/* Process not running ... */
ErtsProcLocks need_locks = ~(*rp_locks) & ERTS_PROC_LOCKS_ALL;
if (need_locks
@@ -8753,8 +11754,9 @@ resume_suspend_monitor(ErtsSuspendMonitor *smon, void *vc_p)
Process *suspendee = erts_pid2proc((Process *) vc_p, ERTS_PROC_LOCK_MAIN,
smon->pid, ERTS_PROC_LOCK_STATUS);
if (suspendee) {
+ ASSERT(suspendee != vc_p);
if (smon->active)
- resume_process(suspendee);
+ resume_process(suspendee, ERTS_PROC_LOCK_STATUS);
erts_smp_proc_unlock(suspendee, ERTS_PROC_LOCK_STATUS);
}
erts_destroy_suspend_monitor(smon);
@@ -8765,9 +11767,6 @@ resume_suspend_monitor(ErtsSuspendMonitor *smon, void *vc_p)
void
erts_do_exit_process(Process* p, Eterm reason)
{
-#ifdef ERTS_SMP
- erts_aint32_t state;
-#endif
p->arity = 0; /* No live registers */
p->fvalue = reason;
@@ -8792,10 +11791,9 @@ erts_do_exit_process(Process* p, Eterm reason)
#endif
#ifndef ERTS_SMP
- set_proc_exiting_state(p, erts_smp_atomic32_read_nob(&p->state));
+ set_proc_self_exiting(p);
#else
- state = set_proc_exiting_state(p, erts_smp_atomic32_read_nob(&p->state));
- if (state & ERTS_PSFLG_PENDING_EXIT) {
+ if (ERTS_PSFLG_PENDING_EXIT & set_proc_self_exiting(p)) {
/* Process exited before pending exit was received... */
p->pending_exit.reason = THE_NON_VALUE;
if (p->pending_exit.bp) {
@@ -8849,6 +11847,8 @@ erts_continue_exit_process(Process *p)
DistEntry *dep;
struct saved_calls *scb;
process_breakpoint_time_t *pbt;
+ erts_aint32_t state;
+ void *nif_export;
#ifdef DEBUG
int yield_allowed = 1;
@@ -8885,6 +11885,13 @@ erts_continue_exit_process(Process *p)
p->flags &= ~F_USING_DB;
}
+ erts_set_gc_state(p, 1);
+ state = erts_smp_atomic32_read_acqb(&p->state);
+ if (state & ERTS_PSFLG_ACTIVE_SYS) {
+ if (cleanup_sys_tasks(p, state, CONTEXT_REDS) >= CONTEXT_REDS/2)
+ goto yield;
+ }
+
if (p->flags & F_USING_DDLL) {
erts_ddll_proc_dead(p, ERTS_PROC_LOCK_MAIN);
p->flags &= ~F_USING_DDLL;
@@ -8962,22 +11969,37 @@ erts_continue_exit_process(Process *p)
{
/* Inactivate and notify free */
erts_aint32_t n, e, a = erts_smp_atomic32_read_nob(&p->state);
+#ifdef ERTS_SMP
+ int refc_inced = 0;
+#endif
while (1) {
n = e = a;
ASSERT(a & ERTS_PSFLG_EXITING);
n |= ERTS_PSFLG_FREE;
n &= ~ERTS_PSFLG_ACTIVE;
+#ifdef ERTS_SMP
+ if ((n & ERTS_PSFLG_IN_RUNQ) && !refc_inced) {
+ erts_smp_proc_inc_refc(p);
+ refc_inced = 1;
+ }
+#endif
a = erts_smp_atomic32_cmpxchg_mb(&p->state, n, e);
if (a == e)
break;
}
- }
+#ifdef ERTS_SMP
+ if (refc_inced && !(n & ERTS_PSFLG_IN_RUNQ))
+ erts_smp_proc_dec_refc(p);
+#endif
+ }
+
dep = ((p->flags & F_DISTRIBUTION)
? ERTS_PROC_SET_DIST_ENTRY(p, ERTS_PROC_LOCKS_ALL, NULL)
: NULL);
scb = ERTS_PROC_SET_SAVED_CALLS_BUF(p, ERTS_PROC_LOCKS_ALL, NULL);
pbt = ERTS_PROC_SET_CALL_TIME(p, ERTS_PROC_LOCKS_ALL, NULL);
+ nif_export = ERTS_PROC_SET_NIF_TRAP_EXPORT(p, ERTS_PROC_LOCKS_ALL, NULL);
erts_smp_proc_unlock(p, ERTS_PROC_LOCKS_ALL);
#ifdef BM_COUNTERS
@@ -9025,11 +12047,8 @@ erts_continue_exit_process(Process *p)
if (pbt)
erts_free(ERTS_ALC_T_BPD, (void *) pbt);
- if (p->extra_root != NULL) {
- (p->extra_root->cleanup)(p->extra_root); /* Should deallocate
- whole structure */
- p->extra_root = NULL;
- }
+ if (nif_export)
+ erts_destroy_nif_export(nif_export);
delete_process(p);
@@ -9075,7 +12094,7 @@ timeout_proc(Process* p)
state = erts_smp_atomic32_read_acqb(&p->state);
if (!(state & ERTS_PSFLG_ACTIVE))
- schedule_process(p, state, 0);
+ schedule_process(p, state, ERTS_PROC_LOCK_MAIN|ERTS_PROC_LOCK_STATUS);
}
@@ -9153,7 +12172,9 @@ erts_program_counter_info(int to, void *to_arg, Process *p)
print_function_from_pc(to, to_arg, p->cp);
erts_print(to, to_arg, ")\n");
state = erts_smp_atomic32_read_acqb(&p->state);
- if (!(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_GC))) {
+ if (!(state & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS
+ | ERTS_PSFLG_GC))) {
erts_print(to, to_arg, "arity = %d\n",p->arity);
if (!ERTS_IS_CRASH_DUMPING) {
/*
@@ -9241,6 +12262,10 @@ void erl_halt(int code)
if (-1 == erts_smp_atomic32_cmpxchg_acqb(&erts_halt_progress,
erts_no_schedulers,
-1)) {
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ERTS_DIRTY_CPU_RUNQ->halt_in_progress = 1;
+ ERTS_DIRTY_IO_RUNQ->halt_in_progress = 1;
+#endif
erts_halt_code = code;
notify_reap_ports_relb();
}
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 8d136f6e8b..f50b217d4a 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -70,7 +70,14 @@ typedef struct process Process;
struct ErtsNodesMonitor_;
+#define ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT 0
+#define ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT 0
+
#define ERTS_MAX_NO_OF_SCHEDULERS 1024
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_MAX_NO_OF_DIRTY_CPU_SCHEDULERS ERTS_MAX_NO_OF_SCHEDULERS
+#define ERTS_MAX_NO_OF_DIRTY_IO_SCHEDULERS ERTS_MAX_NO_OF_SCHEDULERS
+#endif
#define ERTS_DEFAULT_MAX_PROCESSES (1 << 18)
@@ -97,8 +104,14 @@ struct saved_calls {
};
extern Export exp_send, exp_receive, exp_timeout;
+extern int erts_eager_check_io;
extern int erts_sched_compact_load;
+extern int erts_sched_balance_util;
extern Uint erts_no_schedulers;
+#ifdef ERTS_DIRTY_SCHEDULERS
+extern Uint erts_no_dirty_cpu_schedulers;
+extern Uint erts_no_dirty_io_schedulers;
+#endif
extern Uint erts_no_run_queues;
extern int erts_sched_thread_suggested_stack_size;
#define ERTS_SCHED_THREAD_MIN_STACK_SIZE 4 /* Kilo words */
@@ -198,6 +211,10 @@ extern int erts_sched_thread_suggested_stack_size;
#define ERTS_RUNQ_FLGS_SET(RQ, FLGS) \
((Uint32) erts_smp_atomic32_read_bor_relb(&(RQ)->flags, \
(erts_aint32_t) (FLGS)))
+#define ERTS_RUNQ_FLGS_BSET(RQ, MSK, FLGS) \
+ ((Uint32) erts_smp_atomic32_read_bset_relb(&(RQ)->flags, \
+ (erts_aint32_t) (MSK), \
+ (erts_aint32_t) (FLGS)))
#define ERTS_RUNQ_FLGS_UNSET(RQ, FLGS) \
((Uint32) erts_smp_atomic32_read_band_relb(&(RQ)->flags, \
(erts_aint32_t) ~(FLGS)))
@@ -267,6 +284,13 @@ typedef enum {
typedef struct ErtsSchedulerSleepInfo_ ErtsSchedulerSleepInfo;
+#ifdef ERTS_DIRTY_SCHEDULERS
+typedef struct {
+ erts_smp_spinlock_t lock;
+ ErtsSchedulerSleepInfo *list;
+} ErtsSchedulerSleepList;
+#endif
+
struct ErtsSchedulerSleepInfo_ {
#ifdef ERTS_SMP
ErtsSchedulerSleepInfo *next;
@@ -316,9 +340,34 @@ typedef struct {
int reds;
} ErtsRunQueueInfo;
+
+#ifdef HAVE_GETHRTIME
+# undef ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT
+# define ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT 1
+#endif
+
#ifdef ERTS_SMP
+#undef ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+#define ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT_OPT
+
+typedef erts_atomic64_t ErtsAtomicSchedTime;
+
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+typedef struct {
+ ErtsAtomicSchedTime last;
+ struct {
+ Uint64 short_interval;
+ Uint64 long_interval;
+ } worktime;
+ int is_working;
+} ErtsRunQueueSchedUtil;
+#endif
+
typedef struct {
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ int sched_util;
+#endif
Uint32 flags;
ErtsRunQueue *misc_evac_runq;
struct {
@@ -348,6 +397,12 @@ struct ErtsRunQueue_ {
erts_smp_mtx_t mtx;
erts_smp_cnd_t cnd;
+#ifdef ERTS_DIRTY_SCHEDULERS
+#ifdef ERTS_SMP
+ ErtsSchedulerSleepList sleepers;
+#endif
+#endif
+
ErtsSchedulerData *scheduler;
int waiting; /* < 0 in sys schedule; > 0 on cnd variable */
int woken;
@@ -385,6 +440,9 @@ struct ErtsRunQueue_ {
Port *start;
Port *end;
} ports;
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ ErtsRunQueueSchedUtil sched_util;
+#endif
};
#ifdef ERTS_SMP
@@ -414,6 +472,7 @@ do { \
} while (0)
typedef struct {
+ int need; /* "+sbu true" or scheduler_wall_time enabled */
int enabled;
Uint64 start;
struct {
@@ -479,6 +538,21 @@ typedef struct {
#endif
} ErtsAuxWorkData;
+#ifdef ERTS_DIRTY_SCHEDULERS
+typedef enum {
+ ERTS_DIRTY_CPU_SCHEDULER,
+ ERTS_DIRTY_IO_SCHEDULER
+} ErtsDirtySchedulerType;
+
+typedef union {
+ struct {
+ ErtsDirtySchedulerType type: 1;
+ unsigned num: 31;
+ } s;
+ Uint no;
+} ErtsDirtySchedId;
+#endif
+
struct ErtsSchedulerData_ {
/*
* Keep X registers first (so we get as many low
@@ -499,12 +573,14 @@ struct ErtsSchedulerData_ {
Eterm tmp_heap[TMP_HEAP_SIZE];
int num_tmp_heap_used;
Eterm beam_emu_tmp_heap[BEAM_EMU_TMP_HEAP_SIZE];
- Eterm cmp_tmp_heap[CMP_TMP_HEAP_SIZE];
Eterm erl_arith_tmp_heap[ERL_ARITH_TMP_HEAP_SIZE];
#endif
ErtsSchedulerSleepInfo *ssi;
Process *current_process;
- Uint no; /* Scheduler number */
+ Uint no; /* Scheduler number for normal schedulers */
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ErtsDirtySchedId dirty_no; /* Scheduler number for dirty schedulers */
+#endif
Port *current_port;
ErtsRunQueue *run_queue;
int virtual_reds;
@@ -531,17 +607,34 @@ typedef union {
} ErtsAlignedSchedulerData;
extern ErtsAlignedSchedulerData *erts_aligned_scheduler_data;
+#ifdef ERTS_DIRTY_SCHEDULERS
+extern ErtsAlignedSchedulerData *erts_aligned_dirty_cpu_scheduler_data;
+extern ErtsAlignedSchedulerData *erts_aligned_dirty_io_scheduler_data;
+#endif
#ifndef ERTS_SMP
extern ErtsSchedulerData *erts_scheduler_data;
#endif
+#ifdef ERTS_SCHED_FAIR
+#define ERTS_SCHED_FAIR_YIELD() ETHR_YIELD()
+#else
+#define ERTS_SCHED_FAIR 0
+#define ERTS_SCHED_FAIR_YIELD()
+#endif
+
#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_CHECK)
int erts_smp_lc_runq_is_locked(ErtsRunQueue *);
#endif
#ifdef ERTS_INCLUDE_SCHEDULER_INTERNALS
+#ifdef ERTS_SMP
+void erts_empty_runq(ErtsRunQueue *rq);
+void erts_non_empty_runq(ErtsRunQueue *rq);
+#endif
+
+
/*
* Run queue locked during modifications. We use atomic ops since
* other threads peek at values without run queue lock.
@@ -574,6 +667,10 @@ erts_smp_inc_runq_len(ErtsRunQueue *rq, ErtsRunQueueInfo *rqi, int prio)
erts_smp_atomic32_set_relb(&rqi->len, len);
+#ifdef ERTS_SMP
+ if (rq->len == 0)
+ erts_non_empty_runq(rq);
+#endif
rq->len++;
if (rq->max_len < rq->len)
rq->max_len = len;
@@ -631,8 +728,10 @@ erts_smp_reset_max_len(ErtsRunQueue *rq, ErtsRunQueueInfo *rqi)
#define ERTS_PSD_SCHED_ID 2
#define ERTS_PSD_DIST_ENTRY 3
#define ERTS_PSD_CALL_TIME_BP 4
+#define ERTS_PSD_DELAYED_GC_TASK_QS 5
+#define ERTS_PSD_NIF_TRAP_EXPORT 6
-#define ERTS_PSD_SIZE 5
+#define ERTS_PSD_SIZE 7
typedef struct {
void *data[ERTS_PSD_SIZE];
@@ -656,6 +755,12 @@ typedef struct {
#define ERTS_PSD_CALL_TIME_BP_GET_LOCKS ERTS_PROC_LOCK_MAIN
#define ERTS_PSD_CALL_TIME_BP_SET_LOCKS ERTS_PROC_LOCK_MAIN
+#define ERTS_PSD_DELAYED_GC_TASK_QS_GET_LOCKS ERTS_PROC_LOCK_MAIN
+#define ERTS_PSD_DELAYED_GC_TASK_QS_SET_LOCKS ERTS_PROC_LOCK_MAIN
+
+#define ERTS_PSD_NIF_TRAP_EXPORT_GET_LOCKS ERTS_PROC_LOCK_MAIN
+#define ERTS_PSD_NIF_TRAP_EXPORT_SET_LOCKS ERTS_PROC_LOCK_MAIN
+
typedef struct {
ErtsProcLocks get_locks;
ErtsProcLocks set_locks;
@@ -688,6 +793,9 @@ typedef struct {
ErlHeapFragment *bp;
} ErtsPendExit;
+typedef struct ErtsProcSysTask_ ErtsProcSysTask;
+typedef struct ErtsProcSysTaskQs_ ErtsProcSysTaskQs;
+
#ifdef ERTS_SMP
typedef struct ErtsPendingSuspend_ ErtsPendingSuspend;
@@ -704,13 +812,6 @@ struct ErtsPendingSuspend_ {
#endif
-typedef struct ErlExtraRootSet_ ErlExtraRootSet;
-struct ErlExtraRootSet_ {
- Eterm *objv;
- Uint sz;
- void (*cleanup)(ErlExtraRootSet *);
-};
-
/* Defines to ease the change of memory architecture */
# define HEAP_START(p) (p)->heap
# define HEAP_TOP(p) (p)->htop
@@ -804,8 +905,6 @@ struct process {
ErlMessageQueue msg; /* Message queue */
- ErlExtraRootSet *extra_root; /* Used by trapping BIF's */
-
union {
ErtsBifTimer *bif_timers; /* Bif timers aiming at this process */
void *terminate;
@@ -855,6 +954,8 @@ struct process {
Uint64 bin_old_vheap_sz; /* Virtual old heap block size for binaries */
Uint64 bin_old_vheap; /* Virtual old heap size for binaries */
+ ErtsProcSysTaskQs *sys_task_qs;
+
erts_smp_atomic32_t state; /* Process state flags (see ERTS_PSFLG_*) */
#ifdef ERTS_SMP
@@ -924,24 +1025,73 @@ void erts_check_for_holes(Process* p);
# error "Need to increase ERTS_PSFLG_PRIO_SHIFT"
#endif
-#define ERTS_PSFLG_PRIO_SHIFT 2
+#define ERTS_PSFLGS_PRIO_BITS 2
+#define ERTS_PSFLGS_PRIO_MASK \
+ ((((erts_aint32_t) 1) << ERTS_PSFLGS_PRIO_BITS) - 1)
-#define ERTS_PSFLG_BIT(N) \
- (((erts_aint32_t) 1) << (ERTS_PSFLG_PRIO_SHIFT + (N)))
+#define ERTS_PSFLGS_ACT_PRIO_OFFSET (0*ERTS_PSFLGS_PRIO_BITS)
+#define ERTS_PSFLGS_USR_PRIO_OFFSET (1*ERTS_PSFLGS_PRIO_BITS)
+#define ERTS_PSFLGS_PRQ_PRIO_OFFSET (2*ERTS_PSFLGS_PRIO_BITS)
+#define ERTS_PSFLGS_ZERO_BIT_OFFSET (3*ERTS_PSFLGS_PRIO_BITS)
-#define ERTS_PSFLG_PRIO_MASK (ERTS_PSFLG_BIT(0) - 1)
+#define ERTS_PSFLGS_QMASK_BITS 4
+#define ERTS_PSFLGS_QMASK \
+ ((((erts_aint32_t) 1) << ERTS_PSFLGS_QMASK_BITS) - 1)
+#define ERTS_PSFLGS_IN_PRQ_MASK_OFFSET \
+ ERTS_PSFLGS_ZERO_BIT_OFFSET
-#define ERTS_PSFLG_FREE ERTS_PSFLG_BIT(0)
-#define ERTS_PSFLG_EXITING ERTS_PSFLG_BIT(1)
-#define ERTS_PSFLG_PENDING_EXIT ERTS_PSFLG_BIT(2)
-#define ERTS_PSFLG_ACTIVE ERTS_PSFLG_BIT(3)
-#define ERTS_PSFLG_IN_RUNQ ERTS_PSFLG_BIT(4)
-#define ERTS_PSFLG_RUNNING ERTS_PSFLG_BIT(5)
-#define ERTS_PSFLG_SUSPENDED ERTS_PSFLG_BIT(6)
-#define ERTS_PSFLG_GC ERTS_PSFLG_BIT(7)
-#define ERTS_PSFLG_BOUND ERTS_PSFLG_BIT(8)
-#define ERTS_PSFLG_TRAP_EXIT ERTS_PSFLG_BIT(9)
+#define ERTS_PSFLG_BIT(N) \
+ (((erts_aint32_t) 1) << (ERTS_PSFLGS_ZERO_BIT_OFFSET + (N)))
+/*
+ * ACT_PRIO -> Active prio, i.e., currently active prio. This
+ * prio may be higher than user prio.
+ * USR_PRIO -> User prio. i.e., prio the user has set.
+ * PRQ_PRIO -> Prio queue prio, i.e., prio queue currently
+ * enqueued in.
+ */
+#define ERTS_PSFLGS_ACT_PRIO_MASK \
+ (ERTS_PSFLGS_PRIO_MASK << ERTS_PSFLGS_ACT_PRIO_OFFSET)
+#define ERTS_PSFLGS_USR_PRIO_MASK \
+ (ERTS_PSFLGS_PRIO_MASK << ERTS_PSFLGS_USR_PRIO_OFFSET)
+#define ERTS_PSFLGS_PRQ_PRIO_MASK \
+ (ERTS_PSFLGS_PRIO_MASK << ERTS_PSFLGS_PRQ_PRIO_OFFSET)
+#define ERTS_PSFLG_IN_PRQ_MAX ERTS_PSFLG_BIT(0)
+#define ERTS_PSFLG_IN_PRQ_HIGH ERTS_PSFLG_BIT(1)
+#define ERTS_PSFLG_IN_PRQ_NORMAL ERTS_PSFLG_BIT(2)
+#define ERTS_PSFLG_IN_PRQ_LOW ERTS_PSFLG_BIT(3)
+#define ERTS_PSFLG_FREE ERTS_PSFLG_BIT(4)
+#define ERTS_PSFLG_EXITING ERTS_PSFLG_BIT(5)
+#define ERTS_PSFLG_PENDING_EXIT ERTS_PSFLG_BIT(6)
+#define ERTS_PSFLG_ACTIVE ERTS_PSFLG_BIT(7)
+#define ERTS_PSFLG_IN_RUNQ ERTS_PSFLG_BIT(8)
+#define ERTS_PSFLG_RUNNING ERTS_PSFLG_BIT(9)
+#define ERTS_PSFLG_SUSPENDED ERTS_PSFLG_BIT(10)
+#define ERTS_PSFLG_GC ERTS_PSFLG_BIT(11)
+#define ERTS_PSFLG_BOUND ERTS_PSFLG_BIT(12)
+#define ERTS_PSFLG_TRAP_EXIT ERTS_PSFLG_BIT(13)
+#define ERTS_PSFLG_ACTIVE_SYS ERTS_PSFLG_BIT(14)
+#define ERTS_PSFLG_RUNNING_SYS ERTS_PSFLG_BIT(15)
+#define ERTS_PSFLG_PROXY ERTS_PSFLG_BIT(16)
+#define ERTS_PSFLG_DELAYED_SYS ERTS_PSFLG_BIT(17)
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_PSFLG_DIRTY_CPU_PROC ERTS_PSFLG_BIT(18)
+#define ERTS_PSFLG_DIRTY_IO_PROC ERTS_PSFLG_BIT(19)
+#define ERTS_PSFLG_DIRTY_CPU_PROC_IN_Q ERTS_PSFLG_BIT(20)
+#define ERTS_PSFLG_DIRTY_IO_PROC_IN_Q ERTS_PSFLG_BIT(21)
+#endif
+
+#define ERTS_PSFLGS_IN_PRQ_MASK (ERTS_PSFLG_IN_PRQ_MAX \
+ | ERTS_PSFLG_IN_PRQ_HIGH \
+ | ERTS_PSFLG_IN_PRQ_NORMAL \
+ | ERTS_PSFLG_IN_PRQ_LOW)
+
+#define ERTS_PSFLGS_GET_ACT_PRIO(PSFLGS) \
+ (((PSFLGS) >> ERTS_PSFLGS_ACT_PRIO_OFFSET) & ERTS_PSFLGS_PRIO_MASK)
+#define ERTS_PSFLGS_GET_USR_PRIO(PSFLGS) \
+ (((PSFLGS) >> ERTS_PSFLGS_USR_PRIO_OFFSET) & ERTS_PSFLGS_PRIO_MASK)
+#define ERTS_PSFLGS_GET_PRQ_PRIO(PSFLGS) \
+ (((PSFLGS) >> ERTS_PSFLGS_USR_PRIO_OFFSET) & ERTS_PSFLGS_PRIO_MASK)
/* The sequential tracing token is a tuple of size 5:
*
@@ -1056,6 +1206,7 @@ extern struct erts_system_profile_flags_t erts_system_profile_flags;
#define F_HAVE_BLCKD_MSCHED (1 << 8) /* Process has blocked multi-scheduling */
#define F_P2PNR_RESCHED (1 << 9) /* Process has been rescheduled via erts_pid2proc_not_running() */
#define F_FORCE_GC (1 << 10) /* Force gc at process in-scheduling */
+#define F_DISABLE_GC (1 << 11) /* Disable GC */
/* process trace_flags */
#define F_SENSITIVE (1 << 0)
@@ -1134,24 +1285,80 @@ extern struct erts_system_profile_flags_t erts_system_profile_flags;
(p)->flags &= ~F_TIMO; \
} while (0)
+#if defined(ERTS_DIRTY_SCHEDULERS) && defined(ERTS_SMP)
+#define ERTS_NUM_DIRTY_RUNQS 2
+#else
+#define ERTS_NUM_DIRTY_RUNQS 0
+#endif
+
#define ERTS_RUNQ_IX(IX) \
(ASSERT(0 <= (IX) && (IX) < erts_no_run_queues), \
&erts_aligned_run_queues[(IX)].runq)
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_RUNQ_IX_IS_DIRTY(IX) \
+ (-(ERTS_NUM_DIRTY_RUNQS) <= (IX) && (IX) < 0)
+#define ERTS_DIRTY_RUNQ_IX(IX) \
+ (ASSERT(ERTS_RUNQ_IX_IS_DIRTY(IX)), \
+ &erts_aligned_run_queues[(IX)].runq)
+#define ERTS_DIRTY_CPU_RUNQ (&erts_aligned_run_queues[-1].runq)
+#define ERTS_DIRTY_IO_RUNQ (&erts_aligned_run_queues[-2].runq)
+#define ERTS_RUNQ_IS_DIRTY_CPU_RUNQ(RQ) ((RQ)->ix == -1)
+#define ERTS_RUNQ_IS_DIRTY_IO_RUNQ(RQ) ((RQ)->ix == -2)
+#else
+#define ERTS_RUNQ_IX_IS_DIRTY(IX) 0
+#endif
#define ERTS_SCHEDULER_IX(IX) \
(ASSERT(0 <= (IX) && (IX) < erts_no_schedulers), \
&erts_aligned_scheduler_data[(IX)].esd)
+#ifdef ERTS_DIRTY_SCHEDULERS
+#define ERTS_DIRTY_CPU_SCHEDULER_IX(IX) \
+ (ASSERT(0 <= (IX) && (IX) < erts_no_dirty_cpu_schedulers), \
+ &erts_aligned_dirty_cpu_scheduler_data[(IX)].esd)
+#define ERTS_DIRTY_IO_SCHEDULER_IX(IX) \
+ (ASSERT(0 <= (IX) && (IX) < erts_no_dirty_io_schedulers), \
+ &erts_aligned_dirty_io_scheduler_data[(IX)].esd)
+#define ERTS_DIRTY_SCHEDULER_NO(ESDP) \
+ ((ESDP)->dirty_no.s.num)
+#define ERTS_DIRTY_SCHEDULER_TYPE(ESDP) \
+ ((ESDP)->dirty_no.s.type)
+#ifdef ERTS_SMP
+#define ERTS_SCHEDULER_IS_DIRTY(ESDP) \
+ ((ESDP)->dirty_no.s.num != 0)
+#define ERTS_SCHEDULER_IS_DIRTY_CPU(ESDP) \
+ ((ESDP)->dirty_no.s.type == 0)
+#define ERTS_SCHEDULER_IS_DIRTY_IO(ESDP) \
+ ((ESDP)->dirty_no.s.type == 1)
+#else
+#define ERTS_SCHEDULER_IS_DIRTY(ESDP) 0
+#define ERTS_SCHEDULER_IS_DIRTY_CPU(ESDP) 0
+#define ERTS_SCHEDULER_IS_DIRTY_IO(ESDP) 0
+#endif
+#else
+#define ERTS_RUNQ_IX_IS_DIRTY(IX) 0
+#define ERTS_SCHEDULER_IS_DIRTY(ESDP) 0
+#define ERTS_SCHEDULER_IS_DIRTY_CPU(ESDP) 0
+#define ERTS_SCHEDULER_IS_DIRTY_IO(ESDP) 0
+#endif
void erts_pre_init_process(void);
void erts_late_init_process(void);
void erts_early_init_scheduling(int);
-void erts_init_scheduling(int, int);
+void erts_init_scheduling(int, int
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , int, int, int
+#endif
+ );
+int erts_set_gc_state(Process *c_p, int enable);
Eterm erts_sched_wall_time_request(Process *c_p, int set, int enable);
Eterm erts_gc_info_request(Process *c_p);
Uint64 erts_get_proc_interval(void);
Uint64 erts_ensure_later_proc_interval(Uint64);
Uint64 erts_step_proc_interval(void);
+int erts_setup_nif_gc(Process* proc, Eterm** objv, int* nobj); /* see erl_nif.c */
+void erts_destroy_nif_export(void *); /* see erl_nif.c */
+
ErtsProcList *erts_proclist_create(Process *);
void erts_proclist_destroy(ErtsProcList *);
@@ -1341,14 +1548,20 @@ int erts_dbg_check_halloc_lock(Process *p);
void erts_dbg_multi_scheduling_return_trap(Process *, Eterm);
#endif
int erts_get_max_no_executing_schedulers(void);
-#ifdef ERTS_SMP
+#if defined(ERTS_SMP) || defined(ERTS_DIRTY_SCHEDULERS)
ErtsSchedSuspendResult
-erts_schedulers_state(Uint *, Uint *, Uint *, int);
+erts_schedulers_state(Uint *, Uint *, Uint *, Uint *, Uint *, Uint *, int);
+#endif
+#ifdef ERTS_SMP
ErtsSchedSuspendResult
erts_set_schedulers_online(Process *p,
ErtsProcLocks plocks,
Sint new_no,
- Sint *old_no);
+ Sint *old_no
+#ifdef ERTS_DIRTY_SCHEDULERS
+ , int dirty_only
+#endif
+ );
ErtsSchedSuspendResult
erts_block_multi_scheduling(Process *, ErtsProcLocks, int, int);
int erts_is_multi_scheduling_blocked(void);
@@ -1461,7 +1674,7 @@ do { \
ErtsSchedulerData *esdp__ = ((P) \
? ERTS_PROC_GET_SCHDATA((Process *) (P)) \
: erts_get_scheduler_data()); \
- if (esdp__) \
+ if (esdp__ && !ERTS_SCHEDULER_IS_DIRTY(esdp__)) \
esdp__->verify_unused_temp_alloc( \
esdp__->verify_unused_temp_alloc_data); \
} while (0)
@@ -1483,17 +1696,17 @@ ErtsSchedulerData *erts_get_scheduler_data(void)
#endif
#endif
-void erts_schedule_process(Process *, erts_aint32_t);
+void erts_schedule_process(Process *, erts_aint32_t, ErtsProcLocks);
-ERTS_GLB_INLINE void erts_proc_notify_new_message(Process *p);
+ERTS_GLB_INLINE void erts_proc_notify_new_message(Process *p, ErtsProcLocks locks);
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
ERTS_GLB_INLINE void
-erts_proc_notify_new_message(Process *p)
+erts_proc_notify_new_message(Process *p, ErtsProcLocks locks)
{
/* No barrier needed, due to msg lock */
erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
if (!(state & ERTS_PSFLG_ACTIVE))
- erts_schedule_process(p, state);
+ erts_schedule_process(p, state, locks);
}
#endif
@@ -1591,6 +1804,16 @@ erts_psd_set(Process *p, ErtsProcLocks plocks, int ix, void *data)
#define ERTS_PROC_SET_CALL_TIME(P, L, PBT) \
((process_breakpoint_time_t *) erts_psd_set((P), (L), ERTS_PSD_CALL_TIME_BP, (void *) (PBT)))
+#define ERTS_PROC_GET_DELAYED_GC_TASK_QS(P) \
+ ((ErtsProcSysTaskQs *) erts_psd_get((P), ERTS_PSD_DELAYED_GC_TASK_QS))
+#define ERTS_PROC_SET_DELAYED_GC_TASK_QS(P, L, PBT) \
+ ((ErtsProcSysTaskQs *) erts_psd_set((P), (L), ERTS_PSD_DELAYED_GC_TASK_QS, (void *) (PBT)))
+
+#define ERTS_PROC_GET_NIF_TRAP_EXPORT(P) \
+ erts_psd_get((P), ERTS_PSD_NIF_TRAP_EXPORT)
+#define ERTS_PROC_SET_NIF_TRAP_EXPORT(P, L, NTE) \
+ erts_psd_set((P), (L), ERTS_PSD_NIF_TRAP_EXPORT, (void *) (NTE))
+
ERTS_GLB_INLINE Eterm erts_proc_get_error_handler(Process *p);
ERTS_GLB_INLINE Eterm erts_proc_set_error_handler(Process *p,
@@ -1636,6 +1859,13 @@ erts_proc_set_error_handler(Process *p, ErtsProcLocks plocks, Eterm handler)
extern erts_atomic_t erts_migration_paths;
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+int erts_get_sched_util(ErtsRunQueue *rq,
+ int initially_locked,
+ int short_interval);
+#endif
+
+
ERTS_GLB_INLINE ErtsMigrationPaths *erts_get_migration_paths_managed(void);
ERTS_GLB_INLINE ErtsMigrationPaths *erts_get_migration_paths(void);
ERTS_GLB_INLINE ErtsRunQueue *erts_check_emigration_need(ErtsRunQueue *c_rq,
@@ -1687,22 +1917,36 @@ erts_check_emigration_need(ErtsRunQueue *c_rq, int prio)
return mp->prio[prio].runq;
}
-
- if (prio == ERTS_PORT_PRIO_LEVEL)
- len = RUNQ_READ_LEN(&c_rq->ports.info.len);
+#if ERTS_HAVE_SCHED_UTIL_BALANCING_SUPPORT
+ if (mp->sched_util) {
+ ErtsRunQueue *rq = mp->prio[prio].runq;
+ /* No migration if other is non-empty */
+ if (!(ERTS_RUNQ_FLGS_GET(rq) & ERTS_RUNQ_FLG_NONEMPTY)
+ && erts_get_sched_util(rq, 0, 1) < mp->prio[prio].limit.other
+ && erts_get_sched_util(c_rq, 0, 1) > mp->prio[prio].limit.this) {
+ return rq;
+ }
+ }
else
- len = RUNQ_READ_LEN(&c_rq->procs.prio_info[prio].len);
-
- if (len > mp->prio[prio].limit.this) {
- ErtsRunQueue *n_rq = mp->prio[prio].runq;
- if (n_rq) {
- if (prio == ERTS_PORT_PRIO_LEVEL)
- len = RUNQ_READ_LEN(&n_rq->ports.info.len);
- else
- len = RUNQ_READ_LEN(&n_rq->procs.prio_info[prio].len);
-
- if (len < mp->prio[prio].limit.other)
- return n_rq;
+#endif
+ {
+
+ if (prio == ERTS_PORT_PRIO_LEVEL)
+ len = RUNQ_READ_LEN(&c_rq->ports.info.len);
+ else
+ len = RUNQ_READ_LEN(&c_rq->procs.prio_info[prio].len);
+
+ if (len > mp->prio[prio].limit.this) {
+ ErtsRunQueue *n_rq = mp->prio[prio].runq;
+ if (n_rq) {
+ if (prio == ERTS_PORT_PRIO_LEVEL)
+ len = RUNQ_READ_LEN(&n_rq->ports.info.len);
+ else
+ len = RUNQ_READ_LEN(&n_rq->procs.prio_info[prio].len);
+
+ if (len < mp->prio[prio].limit.other)
+ return n_rq;
+ }
}
}
}
@@ -1763,7 +2007,12 @@ Uint erts_get_scheduler_id(void)
{
#ifdef ERTS_SMP
ErtsSchedulerData *esdp = erts_get_scheduler_data();
- return esdp ? esdp->no : (Uint) 0;
+#ifdef ERTS_DIRTY_SCHEDULERS
+ if (esdp && ERTS_SCHEDULER_IS_DIRTY(esdp))
+ return 0;
+ else
+#endif
+ return esdp ? esdp->no : (Uint) 0;
#else
return erts_get_scheduler_data() ? (Uint) 1 : (Uint) 0;
#endif
@@ -1793,12 +2042,6 @@ erts_get_runq_current(ErtsSchedulerData *esdp)
#endif
}
-#ifdef ERTS_ENABLE_LOCK_COUNT
-
-#define erts_smp_runq_lock(rq) erts_smp_mtx_lock_x(&(rq)->mtx, __FILE__, __LINE__)
-
-#else
-
ERTS_GLB_INLINE void
erts_smp_runq_lock(ErtsRunQueue *rq)
{
@@ -1807,6 +2050,10 @@ erts_smp_runq_lock(ErtsRunQueue *rq)
#endif
}
+#ifdef ERTS_ENABLE_LOCK_COUNT
+
+#define erts_smp_runq_lock(rq) erts_smp_mtx_lock_x(&(rq)->mtx, __FILE__, __LINE__)
+
#endif
ERTS_GLB_INLINE int
diff --git a/erts/emulator/beam/erl_process_dict.c b/erts/emulator/beam/erl_process_dict.c
index a611b52af2..af20b26b15 100644
--- a/erts/emulator/beam/erl_process_dict.c
+++ b/erts/emulator/beam/erl_process_dict.c
@@ -47,7 +47,7 @@
/* Hash constant macros */
#define MAX_HASH 1342177280UL
-#define INITIAL_SIZE 10
+#define INITIAL_SIZE (erts_pd_initial_size)
/* Hash utility macros */
#define HASH_RANGE(PDict) ((PDict)->homeSize + (PDict)->splitPosition)
@@ -659,7 +659,7 @@ static void shrink(Process *p, Eterm* ret)
} else {
int needed = 4;
if (is_list(hi) && is_list(lo)) {
- needed = 2*list_length(hi);
+ needed = 2*erts_list_length(hi);
}
if (HeapWordsLeft(p) < needed) {
BUMP_REDS(p, erts_garbage_collect(p, needed, ret, 1));
diff --git a/erts/emulator/beam/erl_process_lock.c b/erts/emulator/beam/erl_process_lock.c
index 2db5df06b4..82cc68222d 100644
--- a/erts/emulator/beam/erl_process_lock.c
+++ b/erts/emulator/beam/erl_process_lock.c
@@ -117,7 +117,7 @@ erts_init_proc_lock(int cpus)
for (i = 0; i < ERTS_NO_OF_PIX_LOCKS; i++) {
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_mtx_init_x(&erts_pix_locks[i].u.mtx,
- "pix_lock", make_small(i));
+ "pix_lock", make_small(i), 1);
#else
erts_mtx_init(&erts_pix_locks[i].u.mtx, "pix_lock");
#endif
@@ -901,7 +901,7 @@ erts_pid2proc_opt(Process *c_p,
busy = (int) erts_smp_proc_raw_trylock__(proc, need_locks);
#if ERTS_PROC_LOCK_OWN_IMPL && defined(ERTS_ENABLE_LOCK_CHECK)
- erts_proc_lc_trylock(proc, need_locks, !busy);
+ erts_proc_lc_trylock(proc, need_locks, !busy, __FILE__,__LINE__);
#endif
#ifdef ERTS_PROC_LOCK_DEBUG
if (!busy)
@@ -1001,8 +1001,8 @@ erts_pid2proc_opt(Process *c_p,
void
erts_proc_lock_init(Process *p)
{
-#if ERTS_PROC_LOCK_OWN_IMPL
int i;
+#if ERTS_PROC_LOCK_OWN_IMPL
/* We always start with all locks locked */
#if ERTS_PROC_LOCK_ATOMIC_IMPL
erts_smp_atomic32_init_nob(&p->lock.flags,
@@ -1013,25 +1013,33 @@ erts_proc_lock_init(Process *p)
for (i = 0; i <= ERTS_PROC_LOCK_MAX_BIT; i++)
p->lock.queue[i] = NULL;
#ifdef ERTS_ENABLE_LOCK_CHECK
- erts_proc_lc_trylock(p, ERTS_PROC_LOCKS_ALL, 1);
+ erts_proc_lc_trylock(p, ERTS_PROC_LOCKS_ALL, 1,__FILE__,__LINE__);
#endif
#elif ERTS_PROC_LOCK_RAW_MUTEX_IMPL
- erts_mtx_init_x(&p->lock.main, "proc_main", p->common.id);
+
+#ifdef ERTS_ENABLE_LOCK_COUNT
+ int do_lock_count = 1;
+#else
+ int do_lock_count = 0;
+#endif
+
+ erts_mtx_init_x(&p->lock.main, "proc_main", p->common.id, do_lock_count);
ethr_mutex_lock(&p->lock.main.mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
erts_lc_trylock(1, &p->lock.main.lc);
#endif
- erts_mtx_init_x(&p->lock.link, "proc_link", p->common.id);
+ erts_mtx_init_x(&p->lock.link, "proc_link", p->common.id, do_lock_count);
ethr_mutex_lock(&p->lock.link.mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
erts_lc_trylock(1, &p->lock.link.lc);
#endif
- erts_mtx_init_x(&p->lock.msgq, "proc_msgq", p->common.id);
+ erts_mtx_init_x(&p->lock.msgq, "proc_msgq", p->common.id, do_lock_count);
ethr_mutex_lock(&p->lock.msgq.mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
erts_lc_trylock(1, &p->lock.msgq.lc);
#endif
- erts_mtx_init_x(&p->lock.status, "proc_status", p->common.id);
+ erts_mtx_init_x(&p->lock.status, "proc_status", p->common.id,
+ do_lock_count);
ethr_mutex_lock(&p->lock.status.mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
erts_lc_trylock(1, &p->lock.status.lc);
@@ -1210,50 +1218,51 @@ void erts_lcnt_enable_proc_lock_count(int enable)
#if ERTS_PROC_LOCK_OWN_IMPL
void
-erts_proc_lc_lock(Process *p, ErtsProcLocks locks)
+erts_proc_lc_lock(Process *p, ErtsProcLocks locks, char *file, unsigned int line)
{
erts_lc_lock_t lck = ERTS_LC_LOCK_INIT(-1,
p->common.id,
ERTS_LC_FLG_LT_PROCLOCK);
if (locks & ERTS_PROC_LOCK_MAIN) {
lck.id = lc_id.proc_lock_main;
- erts_lc_lock(&lck);
+ erts_lc_lock_x(&lck,file,line);
}
if (locks & ERTS_PROC_LOCK_LINK) {
lck.id = lc_id.proc_lock_link;
- erts_lc_lock(&lck);
+ erts_lc_lock_x(&lck,file,line);
}
if (locks & ERTS_PROC_LOCK_MSGQ) {
lck.id = lc_id.proc_lock_msgq;
- erts_lc_lock(&lck);
+ erts_lc_lock_x(&lck,file,line);
}
if (locks & ERTS_PROC_LOCK_STATUS) {
lck.id = lc_id.proc_lock_status;
- erts_lc_lock(&lck);
+ erts_lc_lock_x(&lck,file,line);
}
}
void
-erts_proc_lc_trylock(Process *p, ErtsProcLocks locks, int locked)
+erts_proc_lc_trylock(Process *p, ErtsProcLocks locks, int locked,
+ char* file, unsigned int line)
{
erts_lc_lock_t lck = ERTS_LC_LOCK_INIT(-1,
p->common.id,
ERTS_LC_FLG_LT_PROCLOCK);
if (locks & ERTS_PROC_LOCK_MAIN) {
lck.id = lc_id.proc_lock_main;
- erts_lc_trylock(locked, &lck);
+ erts_lc_trylock_x(locked, &lck, file, line);
}
if (locks & ERTS_PROC_LOCK_LINK) {
lck.id = lc_id.proc_lock_link;
- erts_lc_trylock(locked, &lck);
+ erts_lc_trylock_x(locked, &lck, file, line);
}
if (locks & ERTS_PROC_LOCK_MSGQ) {
lck.id = lc_id.proc_lock_msgq;
- erts_lc_trylock(locked, &lck);
+ erts_lc_trylock_x(locked, &lck, file, line);
}
if (locks & ERTS_PROC_LOCK_STATUS) {
lck.id = lc_id.proc_lock_status;
- erts_lc_trylock(locked, &lck);
+ erts_lc_trylock_x(locked, &lck, file, line);
}
}
@@ -1319,7 +1328,8 @@ erts_proc_lc_might_unlock(Process *p, ErtsProcLocks locks)
}
void
-erts_proc_lc_require_lock(Process *p, ErtsProcLocks locks)
+erts_proc_lc_require_lock(Process *p, ErtsProcLocks locks, char *file,
+ unsigned int line)
{
#if ERTS_PROC_LOCK_OWN_IMPL
erts_lc_lock_t lck = ERTS_LC_LOCK_INIT(-1,
@@ -1327,29 +1337,29 @@ erts_proc_lc_require_lock(Process *p, ErtsProcLocks locks)
ERTS_LC_FLG_LT_PROCLOCK);
if (locks & ERTS_PROC_LOCK_MAIN) {
lck.id = lc_id.proc_lock_main;
- erts_lc_require_lock(&lck);
+ erts_lc_require_lock(&lck, file, line);
}
if (locks & ERTS_PROC_LOCK_LINK) {
lck.id = lc_id.proc_lock_link;
- erts_lc_require_lock(&lck);
+ erts_lc_require_lock(&lck, file, line);
}
if (locks & ERTS_PROC_LOCK_MSGQ) {
lck.id = lc_id.proc_lock_msgq;
- erts_lc_require_lock(&lck);
+ erts_lc_require_lock(&lck, file, line);
}
if (locks & ERTS_PROC_LOCK_STATUS) {
lck.id = lc_id.proc_lock_status;
- erts_lc_require_lock(&lck);
+ erts_lc_require_lock(&lck, file, line);
}
#elif ERTS_PROC_LOCK_RAW_MUTEX_IMPL
if (locks & ERTS_PROC_LOCK_MAIN)
- erts_lc_require_lock(&p->lock.main.lc);
+ erts_lc_require_lock(&p->lock.main.lc, file, line);
if (locks & ERTS_PROC_LOCK_LINK)
- erts_lc_require_lock(&p->lock.link.lc);
+ erts_lc_require_lock(&p->lock.link.lc, file, line);
if (locks & ERTS_PROC_LOCK_MSGQ)
- erts_lc_require_lock(&p->lock.msgq.lc);
+ erts_lc_require_lock(&p->lock.msgq.lc, file, line);
if (locks & ERTS_PROC_LOCK_STATUS)
- erts_lc_require_lock(&p->lock.status.lc);
+ erts_lc_require_lock(&p->lock.status.lc, file, line);
#endif
}
diff --git a/erts/emulator/beam/erl_process_lock.h b/erts/emulator/beam/erl_process_lock.h
index 9dd503f3cb..052d992d3f 100644
--- a/erts/emulator/beam/erl_process_lock.h
+++ b/erts/emulator/beam/erl_process_lock.h
@@ -215,7 +215,7 @@ typedef struct erts_proc_lock_t_ {
/* Lock counter implemetation */
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
#define erts_smp_proc_lock__(P,I,L) erts_smp_proc_lock_x__(P,I,L,__FILE__,__LINE__)
#define erts_smp_proc_lock(P,L) erts_smp_proc_lock_x(P,L,__FILE__,__LINE__)
#endif
@@ -243,8 +243,10 @@ void erts_lcnt_enable_proc_lock_count(int enable);
erts_proc_lc_chk_no_proc_locks(__FILE__, __LINE__)
#define ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(P) \
erts_proc_lc_chk_only_proc_main((P))
-void erts_proc_lc_lock(Process *p, ErtsProcLocks locks);
-void erts_proc_lc_trylock(Process *p, ErtsProcLocks locks, int locked);
+void erts_proc_lc_lock(Process *p, ErtsProcLocks locks,
+ char *file, unsigned int line);
+void erts_proc_lc_trylock(Process *p, ErtsProcLocks locks, int locked,
+ char *file, unsigned int line);
void erts_proc_lc_unlock(Process *p, ErtsProcLocks locks);
void erts_proc_lc_might_unlock(Process *p, ErtsProcLocks locks);
void erts_proc_lc_chk_have_proc_locks(Process *p, ErtsProcLocks locks);
@@ -253,7 +255,8 @@ void erts_proc_lc_chk_only_proc_main(Process *p);
void erts_proc_lc_chk_no_proc_locks(char *file, int line);
ErtsProcLocks erts_proc_lc_my_proc_locks(Process *p);
int erts_proc_lc_trylock_force_busy(Process *p, ErtsProcLocks locks);
-void erts_proc_lc_require_lock(Process *p, ErtsProcLocks locks);
+void erts_proc_lc_require_lock(Process *p, ErtsProcLocks locks,
+ char* file, unsigned int line);
void erts_proc_lc_unrequire_lock(Process *p, ErtsProcLocks locks);
#else
#define ERTS_SMP_CHK_NO_PROC_LOCKS
@@ -372,7 +375,7 @@ ERTS_GLB_INLINE int erts_lc_pix_lock_is_locked(erts_pix_lock_t *);
ERTS_GLB_INLINE ErtsProcLocks erts_smp_proc_raw_trylock__(Process *p,
ErtsProcLocks locks);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_smp_proc_lock_x__(Process *,
erts_pix_lock_t *,
ErtsProcLocks,
@@ -482,7 +485,7 @@ busy_main:
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_proc_lock_x__(Process *p,
erts_pix_lock_t *pix_lck,
ErtsProcLocks locks,
@@ -528,7 +531,7 @@ erts_smp_proc_lock__(Process *p,
erts_lcnt_proc_lock_post_x(&(p->lock), locks, file, line);
#endif
#ifdef ERTS_ENABLE_LOCK_CHECK
- erts_proc_lc_lock(p, locks);
+ erts_proc_lc_lock(p, locks, file, line);
#endif
#ifdef ERTS_PROC_LOCK_DEBUG
@@ -695,7 +698,7 @@ erts_smp_proc_trylock__(Process *p,
#endif
#ifdef ERTS_ENABLE_LOCK_CHECK
- erts_proc_lc_trylock(p, locks, res == 0);
+ erts_proc_lc_trylock(p, locks, res == 0, __FILE__, __LINE__);
#endif
#if ERTS_PROC_LOCK_ATOMIC_IMPL
@@ -741,7 +744,7 @@ erts_proc_lock_op_debug(Process *p, ErtsProcLocks locks, int locked)
#endif /* ERTS_SMP */
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_smp_proc_lock_x(Process *, ErtsProcLocks, char *file, unsigned int line);
#else
ERTS_GLB_INLINE void erts_smp_proc_lock(Process *, ErtsProcLocks);
@@ -756,13 +759,13 @@ ERTS_GLB_INLINE void erts_smp_proc_add_refc(Process *, Sint32);
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_proc_lock_x(Process *p, ErtsProcLocks locks, char *file, unsigned int line)
#else
erts_smp_proc_lock(Process *p, ErtsProcLocks locks)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_smp_proc_lock_x__(p,
#if ERTS_PROC_LOCK_ATOMIC_IMPL
NULL,
diff --git a/erts/emulator/beam/erl_ptab.c b/erts/emulator/beam/erl_ptab.c
index fa5482b841..02943ee683 100644
--- a/erts/emulator/beam/erl_ptab.c
+++ b/erts/emulator/beam/erl_ptab.c
@@ -280,124 +280,38 @@ struct ErtsPTabListBifData_ {
};
-#ifdef ARCH_32
-
-static ERTS_INLINE Uint64
-dw_aint_to_uint64(erts_dw_aint_t *dw)
-{
-#ifdef ETHR_SU_DW_NAINT_T__
- return (Uint64) dw->dw_sint;
-#else
- Uint64 res;
- res = (Uint64) ((Uint32) dw->sint[ERTS_DW_AINT_HIGH_WORD]);
- res <<= 32;
- res |= (Uint64) ((Uint32) dw->sint[ERTS_DW_AINT_LOW_WORD]);
- return res;
-#endif
-}
-
-static void
-unint64_to_dw_aint(erts_dw_aint_t *dw, Uint64 val)
-{
-#ifdef ETHR_SU_DW_NAINT_T__
- dw->dw_sint = (ETHR_SU_DW_NAINT_T__) val;
-#else
- dw->sint[ERTS_DW_AINT_LOW_WORD] = (erts_aint_t) (val & 0xffffffff);
- dw->sint[ERTS_DW_AINT_HIGH_WORD] = (erts_aint_t) ((val >> 32) & 0xffffffff);
-#endif
-}
-
static ERTS_INLINE void
last_data_init_nob(ErtsPTab *ptab, Uint64 val)
{
- erts_dw_aint_t dw;
- unint64_to_dw_aint(&dw, val);
- erts_smp_dw_atomic_init_nob(&ptab->vola.tile.last_data, &dw);
+ erts_smp_atomic64_init_nob(&ptab->vola.tile.last_data, (erts_aint64_t) val);
}
static ERTS_INLINE void
last_data_set_relb(ErtsPTab *ptab, Uint64 val)
{
- erts_dw_aint_t dw;
- unint64_to_dw_aint(&dw, val);
- erts_smp_dw_atomic_set_relb(&ptab->vola.tile.last_data, &dw);
+ erts_smp_atomic64_set_relb(&ptab->vola.tile.last_data, (erts_aint64_t) val);
}
static ERTS_INLINE Uint64
last_data_read_nob(ErtsPTab *ptab)
{
- erts_dw_aint_t dw;
- erts_smp_dw_atomic_read_nob(&ptab->vola.tile.last_data, &dw);
- return dw_aint_to_uint64(&dw);
+ return (Uint64) erts_smp_atomic64_read_nob(&ptab->vola.tile.last_data);
}
static ERTS_INLINE Uint64
last_data_read_acqb(ErtsPTab *ptab)
{
- erts_dw_aint_t dw;
- erts_smp_dw_atomic_read_acqb(&ptab->vola.tile.last_data, &dw);
- return dw_aint_to_uint64(&dw);
+ return (Uint64) erts_smp_atomic64_read_acqb(&ptab->vola.tile.last_data);
}
static ERTS_INLINE Uint64
last_data_cmpxchg_relb(ErtsPTab *ptab, Uint64 new, Uint64 exp)
{
- erts_dw_aint_t dw_new, dw_xchg;
-
- unint64_to_dw_aint(&dw_new, new);
- unint64_to_dw_aint(&dw_xchg, exp);
-
- if (erts_smp_dw_atomic_cmpxchg_relb(&ptab->vola.tile.last_data,
- &dw_new,
- &dw_xchg))
- return exp;
- else
- return dw_aint_to_uint64(&dw_xchg);
-}
-
-#elif defined(ARCH_64)
-
-union {
- erts_smp_atomic_t pid_data;
- char align[ERTS_CACHE_LINE_SIZE];
-} last erts_align_attribute(ERTS_CACHE_LINE_SIZE);
-
-static ERTS_INLINE void
-last_data_init_nob(ErtsPTab *ptab, Uint64 val)
-{
- erts_smp_atomic_init_nob(&ptab->vola.tile.last_data, (erts_aint_t) val);
+ return (Uint64) erts_smp_atomic64_cmpxchg_relb(&ptab->vola.tile.last_data,
+ (erts_aint64_t) new,
+ (erts_aint64_t) exp);
}
-static ERTS_INLINE void
-last_data_set_relb(ErtsPTab *ptab, Uint64 val)
-{
- erts_smp_atomic_set_relb(&ptab->vola.tile.last_data, (erts_aint_t) val);
-}
-
-static ERTS_INLINE Uint64
-last_data_read_nob(ErtsPTab *ptab)
-{
- return (Uint64) erts_smp_atomic_read_nob(&ptab->vola.tile.last_data);
-}
-
-static ERTS_INLINE Uint64
-last_data_read_acqb(ErtsPTab *ptab)
-{
- return (Uint64) erts_smp_atomic_read_acqb(&ptab->vola.tile.last_data);
-}
-
-static ERTS_INLINE Uint64
-last_data_cmpxchg_relb(ErtsPTab *ptab, Uint64 new, Uint64 exp)
-{
- return (Uint64) erts_smp_atomic_cmpxchg_relb(&ptab->vola.tile.last_data,
- (erts_aint_t) new,
- (erts_aint_t) exp);
-}
-
-#else
-# error "Not 64-bit, nor 32-bit architecture..."
-#endif
-
static ERTS_INLINE int
last_data_cmp(Uint64 ld1, Uint64 ld2)
{
@@ -756,7 +670,8 @@ erts_ptab_delete_element(ErtsPTab *ptab,
pix = erts_ptab_id2pix(ptab, ptab_el->id);
- ASSERT(erts_get_scheduler_id()); /* *Need* to be a scheduler */
+ /* *Need* to be an managed thread */
+ ERTS_SMP_LC_ASSERT(erts_thr_progress_is_managed_thread());
erts_ptab_rlock(ptab);
maybe_save = ptab->list.data.deleted.end != NULL;
diff --git a/erts/emulator/beam/erl_ptab.h b/erts/emulator/beam/erl_ptab.h
index e3e05f14af..876241159b 100644
--- a/erts/emulator/beam/erl_ptab.h
+++ b/erts/emulator/beam/erl_ptab.h
@@ -88,11 +88,7 @@ typedef struct {
} ErtsPTabListData;
typedef struct {
-#ifdef ARCH_32
- erts_smp_dw_atomic_t last_data;
-#else
- erts_smp_atomic_t last_data;
-#endif
+ erts_smp_atomic64_t last_data;
erts_smp_atomic32_t count;
erts_smp_atomic32_t aid_ix;
erts_smp_atomic32_t fid_ix;
diff --git a/erts/emulator/beam/erl_smp.h b/erts/emulator/beam/erl_smp.h
index ecb5525022..6c40edeb3e 100644
--- a/erts/emulator/beam/erl_smp.h
+++ b/erts/emulator/beam/erl_smp.h
@@ -26,10 +26,13 @@
#define ERL_SMP_H
#include "erl_threads.h"
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
#define erts_smp_mtx_lock(L) erts_smp_mtx_lock_x(L, __FILE__, __LINE__)
+#define erts_smp_mtx_trylock(L) erts_smp_mtx_trylock_x(L, __FILE__, __LINE__)
#define erts_smp_spin_lock(L) erts_smp_spin_lock_x(L, __FILE__, __LINE__)
+#define erts_smp_rwmtx_tryrlock(L) erts_smp_rwmtx_tryrlock_x(L, __FILE__, __LINE__)
#define erts_smp_rwmtx_rlock(L) erts_smp_rwmtx_rlock_x(L, __FILE__, __LINE__)
+#define erts_smp_rwmtx_tryrwlock(L) erts_smp_rwmtx_tryrwlock_x(L, __FILE__, __LINE__)
#define erts_smp_rwmtx_rwlock(L) erts_smp_rwmtx_rwlock_x(L, __FILE__, __LINE__)
#define erts_smp_read_lock(L) erts_smp_read_lock_x(L, __FILE__, __LINE__)
#define erts_smp_write_lock(L) erts_smp_write_lock_x(L, __FILE__, __LINE__)
@@ -57,6 +60,7 @@ typedef erts_tsd_key_t erts_smp_tsd_key_t;
#define erts_smp_dw_atomic_t erts_dw_atomic_t
#define erts_smp_atomic_t erts_atomic_t
#define erts_smp_atomic32_t erts_atomic32_t
+#define erts_smp_atomic64_t erts_atomic64_t
typedef erts_spinlock_t erts_smp_spinlock_t;
typedef erts_rwlock_t erts_smp_rwlock_t;
void erts_thr_fatal_error(int, char *); /* implemented in erl_init.c */
@@ -92,6 +96,7 @@ typedef int erts_smp_tsd_key_t;
#define erts_smp_dw_atomic_t erts_no_dw_atomic_t
#define erts_smp_atomic_t erts_no_atomic_t
#define erts_smp_atomic32_t erts_no_atomic32_t
+#define erts_smp_atomic64_t erts_no_atomic64_t
#if __GNUC__ > 2
typedef struct { } erts_smp_spinlock_t;
typedef struct { } erts_smp_rwlock_t;
@@ -131,10 +136,11 @@ ERTS_GLB_INLINE void erts_smp_mtx_init_locked_x(erts_smp_mtx_t *mtx,
ERTS_GLB_INLINE void erts_smp_mtx_init(erts_smp_mtx_t *mtx, char *name);
ERTS_GLB_INLINE void erts_smp_mtx_init_locked(erts_smp_mtx_t *mtx, char *name);
ERTS_GLB_INLINE void erts_smp_mtx_destroy(erts_smp_mtx_t *mtx);
-ERTS_GLB_INLINE int erts_smp_mtx_trylock(erts_smp_mtx_t *mtx);
-#ifdef ERTS_ENABLE_LOCK_COUNT
-ERTS_GLB_INLINE void erts_smp_mtx_lock_x(erts_smp_mtx_t *mtx, char *file, int line);
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ERTS_GLB_INLINE int erts_smp_mtx_trylock_x(erts_smp_mtx_t *mtx, char *file, unsigned int line);
+ERTS_GLB_INLINE void erts_smp_mtx_lock_x(erts_smp_mtx_t *mtx, char *file, unsigned int line);
#else
+ERTS_GLB_INLINE int erts_smp_mtx_trylock(erts_smp_mtx_t *mtx);
ERTS_GLB_INLINE void erts_smp_mtx_lock(erts_smp_mtx_t *mtx);
#endif
ERTS_GLB_INLINE void erts_smp_mtx_unlock(erts_smp_mtx_t *mtx);
@@ -159,16 +165,18 @@ ERTS_GLB_INLINE void erts_smp_rwmtx_init_opt(erts_smp_rwmtx_t *rwmtx,
ERTS_GLB_INLINE void erts_smp_rwmtx_init(erts_smp_rwmtx_t *rwmtx,
char *name);
ERTS_GLB_INLINE void erts_smp_rwmtx_destroy(erts_smp_rwmtx_t *rwmtx);
-ERTS_GLB_INLINE int erts_smp_rwmtx_tryrlock(erts_smp_rwmtx_t *rwmtx);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ERTS_GLB_INLINE int erts_smp_rwmtx_tryrlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_smp_rwmtx_rlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_smp_rwmtx_rwlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line);
+ERTS_GLB_INLINE int erts_smp_rwmtx_tryrwlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line);
#else
+ERTS_GLB_INLINE int erts_smp_rwmtx_tryrlock(erts_smp_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_smp_rwmtx_rlock(erts_smp_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_smp_rwmtx_rwlock(erts_smp_rwmtx_t *rwmtx);
+ERTS_GLB_INLINE int erts_smp_rwmtx_tryrwlock(erts_smp_rwmtx_t *rwmtx);
#endif
ERTS_GLB_INLINE void erts_smp_rwmtx_runlock(erts_smp_rwmtx_t *rwmtx);
-ERTS_GLB_INLINE int erts_smp_rwmtx_tryrwlock(erts_smp_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_smp_rwmtx_rwunlock(erts_smp_rwmtx_t *rwmtx);
ERTS_GLB_INLINE int erts_smp_lc_rwmtx_is_rlocked(erts_smp_rwmtx_t *mtx);
ERTS_GLB_INLINE int erts_smp_lc_rwmtx_is_rwlocked(erts_smp_rwmtx_t *mtx);
@@ -179,7 +187,7 @@ ERTS_GLB_INLINE void erts_smp_spinlock_init(erts_smp_spinlock_t *lock,
char *name);
ERTS_GLB_INLINE void erts_smp_spinlock_destroy(erts_smp_spinlock_t *lock);
ERTS_GLB_INLINE void erts_smp_spin_unlock(erts_smp_spinlock_t *lock);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_smp_spin_lock_x(erts_smp_spinlock_t *lock, char *file, unsigned int line);
#else
ERTS_GLB_INLINE void erts_smp_spin_lock(erts_smp_spinlock_t *lock);
@@ -192,7 +200,7 @@ ERTS_GLB_INLINE void erts_smp_rwlock_init(erts_smp_rwlock_t *lock,
char *name);
ERTS_GLB_INLINE void erts_smp_rwlock_destroy(erts_smp_rwlock_t *lock);
ERTS_GLB_INLINE void erts_smp_read_unlock(erts_smp_rwlock_t *lock);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_smp_read_lock_x(erts_smp_rwlock_t *lock, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_smp_write_lock_x(erts_smp_rwlock_t *lock, char *file, unsigned int line);
#else
@@ -202,7 +210,8 @@ ERTS_GLB_INLINE void erts_smp_write_lock(erts_smp_rwlock_t *lock);
ERTS_GLB_INLINE void erts_smp_write_unlock(erts_smp_rwlock_t *lock);
ERTS_GLB_INLINE int erts_smp_lc_rwlock_is_rlocked(erts_smp_rwlock_t *lock);
ERTS_GLB_INLINE int erts_smp_lc_rwlock_is_rwlocked(erts_smp_rwlock_t *lock);
-ERTS_GLB_INLINE void erts_smp_tsd_key_create(erts_smp_tsd_key_t *keyp);
+ERTS_GLB_INLINE void erts_smp_tsd_key_create(erts_smp_tsd_key_t *keyp,
+ char *keyname);
ERTS_GLB_INLINE void erts_smp_tsd_key_delete(erts_smp_tsd_key_t key);
ERTS_GLB_INLINE void erts_smp_tsd_set(erts_smp_tsd_key_t key, void *value);
ERTS_GLB_INLINE void * erts_smp_tsd_get(erts_smp_tsd_key_t key);
@@ -482,6 +491,116 @@ ERTS_GLB_INLINE void erts_smp_thr_sigwait(const sigset_t *set, int *sig);
#define erts_smp_atomic32_set_dirty erts_atomic32_set_dirty
#define erts_smp_atomic32_read_dirty erts_atomic32_read_dirty
+/* 64-bit atomics */
+
+#define erts_smp_atomic64_init_nob erts_atomic64_init_nob
+#define erts_smp_atomic64_set_nob erts_atomic64_set_nob
+#define erts_smp_atomic64_read_nob erts_atomic64_read_nob
+#define erts_smp_atomic64_inc_read_nob erts_atomic64_inc_read_nob
+#define erts_smp_atomic64_dec_read_nob erts_atomic64_dec_read_nob
+#define erts_smp_atomic64_inc_nob erts_atomic64_inc_nob
+#define erts_smp_atomic64_dec_nob erts_atomic64_dec_nob
+#define erts_smp_atomic64_add_read_nob erts_atomic64_add_read_nob
+#define erts_smp_atomic64_add_nob erts_atomic64_add_nob
+#define erts_smp_atomic64_read_bor_nob erts_atomic64_read_bor_nob
+#define erts_smp_atomic64_read_band_nob erts_atomic64_read_band_nob
+#define erts_smp_atomic64_xchg_nob erts_atomic64_xchg_nob
+#define erts_smp_atomic64_cmpxchg_nob erts_atomic64_cmpxchg_nob
+#define erts_smp_atomic64_read_bset_nob erts_atomic64_read_bset_nob
+
+#define erts_smp_atomic64_init_mb erts_atomic64_init_mb
+#define erts_smp_atomic64_set_mb erts_atomic64_set_mb
+#define erts_smp_atomic64_read_mb erts_atomic64_read_mb
+#define erts_smp_atomic64_inc_read_mb erts_atomic64_inc_read_mb
+#define erts_smp_atomic64_dec_read_mb erts_atomic64_dec_read_mb
+#define erts_smp_atomic64_inc_mb erts_atomic64_inc_mb
+#define erts_smp_atomic64_dec_mb erts_atomic64_dec_mb
+#define erts_smp_atomic64_add_read_mb erts_atomic64_add_read_mb
+#define erts_smp_atomic64_add_mb erts_atomic64_add_mb
+#define erts_smp_atomic64_read_bor_mb erts_atomic64_read_bor_mb
+#define erts_smp_atomic64_read_band_mb erts_atomic64_read_band_mb
+#define erts_smp_atomic64_xchg_mb erts_atomic64_xchg_mb
+#define erts_smp_atomic64_cmpxchg_mb erts_atomic64_cmpxchg_mb
+#define erts_smp_atomic64_read_bset_mb erts_atomic64_read_bset_mb
+
+#define erts_smp_atomic64_init_acqb erts_atomic64_init_acqb
+#define erts_smp_atomic64_set_acqb erts_atomic64_set_acqb
+#define erts_smp_atomic64_read_acqb erts_atomic64_read_acqb
+#define erts_smp_atomic64_inc_read_acqb erts_atomic64_inc_read_acqb
+#define erts_smp_atomic64_dec_read_acqb erts_atomic64_dec_read_acqb
+#define erts_smp_atomic64_inc_acqb erts_atomic64_inc_acqb
+#define erts_smp_atomic64_dec_acqb erts_atomic64_dec_acqb
+#define erts_smp_atomic64_add_read_acqb erts_atomic64_add_read_acqb
+#define erts_smp_atomic64_add_acqb erts_atomic64_add_acqb
+#define erts_smp_atomic64_read_bor_acqb erts_atomic64_read_bor_acqb
+#define erts_smp_atomic64_read_band_acqb erts_atomic64_read_band_acqb
+#define erts_smp_atomic64_xchg_acqb erts_atomic64_xchg_acqb
+#define erts_smp_atomic64_cmpxchg_acqb erts_atomic64_cmpxchg_acqb
+#define erts_smp_atomic64_read_bset_acqb erts_atomic64_read_bset_acqb
+
+#define erts_smp_atomic64_init_relb erts_atomic64_init_relb
+#define erts_smp_atomic64_set_relb erts_atomic64_set_relb
+#define erts_smp_atomic64_read_relb erts_atomic64_read_relb
+#define erts_smp_atomic64_inc_read_relb erts_atomic64_inc_read_relb
+#define erts_smp_atomic64_dec_read_relb erts_atomic64_dec_read_relb
+#define erts_smp_atomic64_inc_relb erts_atomic64_inc_relb
+#define erts_smp_atomic64_dec_relb erts_atomic64_dec_relb
+#define erts_smp_atomic64_add_read_relb erts_atomic64_add_read_relb
+#define erts_smp_atomic64_add_relb erts_atomic64_add_relb
+#define erts_smp_atomic64_read_bor_relb erts_atomic64_read_bor_relb
+#define erts_smp_atomic64_read_band_relb erts_atomic64_read_band_relb
+#define erts_smp_atomic64_xchg_relb erts_atomic64_xchg_relb
+#define erts_smp_atomic64_cmpxchg_relb erts_atomic64_cmpxchg_relb
+#define erts_smp_atomic64_read_bset_relb erts_atomic64_read_bset_relb
+
+#define erts_smp_atomic64_init_ddrb erts_atomic64_init_ddrb
+#define erts_smp_atomic64_set_ddrb erts_atomic64_set_ddrb
+#define erts_smp_atomic64_read_ddrb erts_atomic64_read_ddrb
+#define erts_smp_atomic64_inc_read_ddrb erts_atomic64_inc_read_ddrb
+#define erts_smp_atomic64_dec_read_ddrb erts_atomic64_dec_read_ddrb
+#define erts_smp_atomic64_inc_ddrb erts_atomic64_inc_ddrb
+#define erts_smp_atomic64_dec_ddrb erts_atomic64_dec_ddrb
+#define erts_smp_atomic64_add_read_ddrb erts_atomic64_add_read_ddrb
+#define erts_smp_atomic64_add_ddrb erts_atomic64_add_ddrb
+#define erts_smp_atomic64_read_bor_ddrb erts_atomic64_read_bor_ddrb
+#define erts_smp_atomic64_read_band_ddrb erts_atomic64_read_band_ddrb
+#define erts_smp_atomic64_xchg_ddrb erts_atomic64_xchg_ddrb
+#define erts_smp_atomic64_cmpxchg_ddrb erts_atomic64_cmpxchg_ddrb
+#define erts_smp_atomic64_read_bset_ddrb erts_atomic64_read_bset_ddrb
+
+#define erts_smp_atomic64_init_rb erts_atomic64_init_rb
+#define erts_smp_atomic64_set_rb erts_atomic64_set_rb
+#define erts_smp_atomic64_read_rb erts_atomic64_read_rb
+#define erts_smp_atomic64_inc_read_rb erts_atomic64_inc_read_rb
+#define erts_smp_atomic64_dec_read_rb erts_atomic64_dec_read_rb
+#define erts_smp_atomic64_inc_rb erts_atomic64_inc_rb
+#define erts_smp_atomic64_dec_rb erts_atomic64_dec_rb
+#define erts_smp_atomic64_add_read_rb erts_atomic64_add_read_rb
+#define erts_smp_atomic64_add_rb erts_atomic64_add_rb
+#define erts_smp_atomic64_read_bor_rb erts_atomic64_read_bor_rb
+#define erts_smp_atomic64_read_band_rb erts_atomic64_read_band_rb
+#define erts_smp_atomic64_xchg_rb erts_atomic64_xchg_rb
+#define erts_smp_atomic64_cmpxchg_rb erts_atomic64_cmpxchg_rb
+#define erts_smp_atomic64_read_bset_rb erts_atomic64_read_bset_rb
+
+#define erts_smp_atomic64_init_wb erts_atomic64_init_wb
+#define erts_smp_atomic64_set_wb erts_atomic64_set_wb
+#define erts_smp_atomic64_read_wb erts_atomic64_read_wb
+#define erts_smp_atomic64_inc_read_wb erts_atomic64_inc_read_wb
+#define erts_smp_atomic64_dec_read_wb erts_atomic64_dec_read_wb
+#define erts_smp_atomic64_inc_wb erts_atomic64_inc_wb
+#define erts_smp_atomic64_dec_wb erts_atomic64_dec_wb
+#define erts_smp_atomic64_add_read_wb erts_atomic64_add_read_wb
+#define erts_smp_atomic64_add_wb erts_atomic64_add_wb
+#define erts_smp_atomic64_read_bor_wb erts_atomic64_read_bor_wb
+#define erts_smp_atomic64_read_band_wb erts_atomic64_read_band_wb
+#define erts_smp_atomic64_xchg_wb erts_atomic64_xchg_wb
+#define erts_smp_atomic64_cmpxchg_wb erts_atomic64_cmpxchg_wb
+#define erts_smp_atomic64_read_bset_wb erts_atomic64_read_bset_wb
+
+#define erts_smp_atomic64_set_dirty erts_atomic64_set_dirty
+#define erts_smp_atomic64_read_dirty erts_atomic64_read_dirty
+
#else /* !ERTS_SMP */
/* Double word size atomics */
@@ -744,6 +863,116 @@ ERTS_GLB_INLINE void erts_smp_thr_sigwait(const sigset_t *set, int *sig);
#define erts_smp_atomic32_set_dirty erts_no_atomic32_set
#define erts_smp_atomic32_read_dirty erts_no_atomic32_read
+/* 64-bit atomics */
+
+#define erts_smp_atomic64_init_nob erts_no_atomic64_set
+#define erts_smp_atomic64_set_nob erts_no_atomic64_set
+#define erts_smp_atomic64_read_nob erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_nob erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_nob erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_nob erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_nob erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_nob erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_nob erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_nob erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_nob erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_nob erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_nob erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_nob erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_mb erts_no_atomic64_set
+#define erts_smp_atomic64_set_mb erts_no_atomic64_set
+#define erts_smp_atomic64_read_mb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_mb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_mb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_mb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_mb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_mb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_mb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_mb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_mb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_mb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_mb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_mb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_acqb erts_no_atomic64_set
+#define erts_smp_atomic64_set_acqb erts_no_atomic64_set
+#define erts_smp_atomic64_read_acqb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_acqb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_acqb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_acqb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_acqb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_acqb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_acqb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_acqb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_acqb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_acqb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_acqb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_acqb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_relb erts_no_atomic64_set
+#define erts_smp_atomic64_set_relb erts_no_atomic64_set
+#define erts_smp_atomic64_read_relb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_relb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_relb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_relb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_relb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_relb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_relb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_relb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_relb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_relb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_relb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_relb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_ddrb erts_no_atomic64_set
+#define erts_smp_atomic64_set_ddrb erts_no_atomic64_set
+#define erts_smp_atomic64_read_ddrb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_ddrb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_ddrb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_ddrb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_ddrb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_ddrb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_ddrb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_ddrb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_ddrb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_ddrb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_ddrb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_ddrb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_rb erts_no_atomic64_set
+#define erts_smp_atomic64_set_rb erts_no_atomic64_set
+#define erts_smp_atomic64_read_rb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_rb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_rb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_rb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_rb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_rb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_rb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_rb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_rb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_rb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_rb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_rb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_init_wb erts_no_atomic64_set
+#define erts_smp_atomic64_set_wb erts_no_atomic64_set
+#define erts_smp_atomic64_read_wb erts_no_atomic64_read
+#define erts_smp_atomic64_inc_read_wb erts_no_atomic64_inc_read
+#define erts_smp_atomic64_dec_read_wb erts_no_atomic64_dec_read
+#define erts_smp_atomic64_inc_wb erts_no_atomic64_inc
+#define erts_smp_atomic64_dec_wb erts_no_atomic64_dec
+#define erts_smp_atomic64_add_read_wb erts_no_atomic64_add_read
+#define erts_smp_atomic64_add_wb erts_no_atomic64_add
+#define erts_smp_atomic64_read_bor_wb erts_no_atomic64_read_bor
+#define erts_smp_atomic64_read_band_wb erts_no_atomic64_read_band
+#define erts_smp_atomic64_xchg_wb erts_no_atomic64_xchg
+#define erts_smp_atomic64_cmpxchg_wb erts_no_atomic64_cmpxchg
+#define erts_smp_atomic64_read_bset_wb erts_no_atomic64_read_bset
+
+#define erts_smp_atomic64_set_dirty erts_no_atomic64_set
+#define erts_smp_atomic64_read_dirty erts_no_atomic64_read
+
#endif /* !ERTS_SMP */
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
@@ -835,7 +1064,7 @@ ERTS_GLB_INLINE void
erts_smp_mtx_init_x(erts_smp_mtx_t *mtx, char *name, Eterm extra)
{
#ifdef ERTS_SMP
- erts_mtx_init_x(mtx, name, extra);
+ erts_mtx_init_x(mtx, name, extra, 1);
#endif
}
@@ -843,7 +1072,7 @@ ERTS_GLB_INLINE void
erts_smp_mtx_init_locked_x(erts_smp_mtx_t *mtx, char *name, Eterm extra)
{
#ifdef ERTS_SMP
- erts_mtx_init_locked_x(mtx, name, extra);
+ erts_mtx_init_locked_x(mtx, name, extra, 1);
#endif
}
@@ -872,9 +1101,15 @@ erts_smp_mtx_destroy(erts_smp_mtx_t *mtx)
}
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_smp_mtx_trylock_x(erts_smp_mtx_t *mtx, char *file, unsigned int line)
+#else
erts_smp_mtx_trylock(erts_smp_mtx_t *mtx)
+#endif
{
-#ifdef ERTS_SMP
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
+ return erts_mtx_trylock_x(mtx,file,line);
+#elif defined(ERTS_SMP)
return erts_mtx_trylock(mtx);
#else
return 0;
@@ -884,13 +1119,13 @@ erts_smp_mtx_trylock(erts_smp_mtx_t *mtx)
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
-erts_smp_mtx_lock_x(erts_smp_mtx_t *mtx, char *file, int line)
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_smp_mtx_lock_x(erts_smp_mtx_t *mtx, char *file, unsigned int line)
#else
erts_smp_mtx_lock(erts_smp_mtx_t *mtx)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_mtx_lock_x(mtx, file, line);
#elif defined(ERTS_SMP)
erts_mtx_lock(mtx);
@@ -1020,9 +1255,15 @@ erts_smp_rwmtx_destroy(erts_smp_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_smp_rwmtx_tryrlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line)
+#else
erts_smp_rwmtx_tryrlock(erts_smp_rwmtx_t *rwmtx)
+#endif
{
-#ifdef ERTS_SMP
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
+ return erts_rwmtx_tryrlock_x(rwmtx, file, line);
+#elif defined(ERTS_SMP)
return erts_rwmtx_tryrlock(rwmtx);
#else
return 0;
@@ -1030,13 +1271,13 @@ erts_smp_rwmtx_tryrlock(erts_smp_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_rwmtx_rlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line)
#else
erts_smp_rwmtx_rlock(erts_smp_rwmtx_t *rwmtx)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_rwmtx_rlock_x(rwmtx, file, line);
#elif defined(ERTS_SMP)
erts_rwmtx_rlock(rwmtx);
@@ -1053,9 +1294,15 @@ erts_smp_rwmtx_runlock(erts_smp_rwmtx_t *rwmtx)
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_smp_rwmtx_tryrwlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line)
+#else
erts_smp_rwmtx_tryrwlock(erts_smp_rwmtx_t *rwmtx)
+#endif
{
-#ifdef ERTS_SMP
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
+ return erts_rwmtx_tryrwlock_x(rwmtx, file, line);
+#elif defined(ERTS_SMP)
return erts_rwmtx_tryrwlock(rwmtx);
#else
return 0;
@@ -1063,13 +1310,13 @@ erts_smp_rwmtx_tryrwlock(erts_smp_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_rwmtx_rwlock_x(erts_smp_rwmtx_t *rwmtx, char *file, unsigned int line)
#else
erts_smp_rwmtx_rwlock(erts_smp_rwmtx_t *rwmtx)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_rwmtx_rwlock_x(rwmtx, file, line);
#elif defined(ERTS_SMP)
erts_rwmtx_rwlock(rwmtx);
@@ -1171,13 +1418,13 @@ erts_smp_spin_unlock(erts_smp_spinlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_spin_lock_x(erts_smp_spinlock_t *lock, char *file, unsigned int line)
#else
erts_smp_spin_lock(erts_smp_spinlock_t *lock)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_spin_lock_x(lock, file, line);
#elif defined(ERTS_SMP)
erts_spin_lock(lock);
@@ -1237,13 +1484,13 @@ erts_smp_read_unlock(erts_smp_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_read_lock_x(erts_smp_rwlock_t *lock, char *file, unsigned int line)
#else
erts_smp_read_lock(erts_smp_rwlock_t *lock)
#endif
{
-#if defined(ERTS_ENABLE_LOCK_COUNT) && defined(ERTS_SMP)
+#if defined(ERTS_ENABLE_LOCK_POSITION) && defined(ERTS_SMP)
erts_read_lock_x(lock, file, line);
#elif defined(ERTS_SMP)
erts_read_lock(lock);
@@ -1263,13 +1510,13 @@ erts_smp_write_unlock(erts_smp_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_smp_write_lock_x(erts_smp_rwlock_t *lock, char *file, unsigned int line)
#else
erts_smp_write_lock(erts_smp_rwlock_t *lock)
#endif
{
-#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
+#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_POSITION)
erts_write_lock_x(lock, file, line);
#elif defined(ERTS_SMP)
erts_write_lock(lock);
@@ -1299,10 +1546,10 @@ erts_smp_lc_rwlock_is_rwlocked(erts_smp_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-erts_smp_tsd_key_create(erts_smp_tsd_key_t *keyp)
+erts_smp_tsd_key_create(erts_smp_tsd_key_t *keyp, char* keyname)
{
#ifdef ERTS_SMP
- erts_tsd_key_create(keyp);
+ erts_tsd_key_create(keyp,keyname);
#endif
}
diff --git a/erts/emulator/beam/erl_term.c b/erts/emulator/beam/erl_term.c
index 2f206ffbec..28cbe7004f 100644
--- a/erts/emulator/beam/erl_term.c
+++ b/erts/emulator/beam/erl_term.c
@@ -23,6 +23,7 @@
#include "sys.h"
#include "erl_vm.h"
#include "global.h"
+#include "erl_map.h"
#include <stdlib.h>
#include <stdio.h>
@@ -85,7 +86,10 @@ unsigned tag_val_def(Wterm x)
case (_TAG_HEADER_EXTERNAL_PID >> _TAG_PRIMARY_SIZE): return EXTERNAL_PID_DEF;
case (_TAG_HEADER_EXTERNAL_PORT >> _TAG_PRIMARY_SIZE): return EXTERNAL_PORT_DEF;
case (_TAG_HEADER_EXTERNAL_REF >> _TAG_PRIMARY_SIZE): return EXTERNAL_REF_DEF;
- default: return BINARY_DEF;
+ case (_TAG_HEADER_REFC_BIN >> _TAG_PRIMARY_SIZE): return BINARY_DEF;
+ case (_TAG_HEADER_HEAP_BIN >> _TAG_PRIMARY_SIZE): return BINARY_DEF;
+ case (_TAG_HEADER_SUB_BIN >> _TAG_PRIMARY_SIZE): return BINARY_DEF;
+ case (_TAG_HEADER_MAP >> _TAG_PRIMARY_SIZE): return MAP_DEF;
}
break;
}
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h
index 953edf79ea..37014ccf94 100644
--- a/erts/emulator/beam/erl_term.h
+++ b/erts/emulator/beam/erl_term.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2000-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -112,11 +112,11 @@ struct erl_node_; /* Declared in erl_node_tables.h */
* 1000 REFC_BINARY | |
* 1001 HEAP_BINARY | BINARIES |
* 1010 SUB_BINARY | |
- * 1011 Not used
+ * 1011 Not used; see comment below
* 1100 EXTERNAL_PID | |
* 1101 EXTERNAL_PORT | EXTERNAL THINGS |
* 1110 EXTERNAL_REF | |
- * 1111 Not used
+ * 1111 MAP
*
* COMMENTS:
*
@@ -135,14 +135,16 @@ struct erl_node_; /* Declared in erl_node_tables.h */
#define REF_SUBTAG (0x4 << _TAG_PRIMARY_SIZE) /* REF */
#define FUN_SUBTAG (0x5 << _TAG_PRIMARY_SIZE) /* FUN */
#define FLOAT_SUBTAG (0x6 << _TAG_PRIMARY_SIZE) /* FLOAT */
-#define EXPORT_SUBTAG (0x7 << _TAG_PRIMARY_SIZE) /* FLOAT */
+#define EXPORT_SUBTAG (0x7 << _TAG_PRIMARY_SIZE) /* FLOAT */
#define _BINARY_XXX_MASK (0x3 << _TAG_PRIMARY_SIZE)
#define REFC_BINARY_SUBTAG (0x8 << _TAG_PRIMARY_SIZE) /* BINARY */
#define HEAP_BINARY_SUBTAG (0x9 << _TAG_PRIMARY_SIZE) /* BINARY */
#define SUB_BINARY_SUBTAG (0xA << _TAG_PRIMARY_SIZE) /* BINARY */
+/* _BINARY_XXX_MASK depends on 0xB being unused */
#define EXTERNAL_PID_SUBTAG (0xC << _TAG_PRIMARY_SIZE) /* EXTERNAL_PID */
#define EXTERNAL_PORT_SUBTAG (0xD << _TAG_PRIMARY_SIZE) /* EXTERNAL_PORT */
#define EXTERNAL_REF_SUBTAG (0xE << _TAG_PRIMARY_SIZE) /* EXTERNAL_REF */
+#define MAP_SUBTAG (0xF << _TAG_PRIMARY_SIZE) /* MAP */
#define _TAG_HEADER_ARITYVAL (TAG_PRIMARY_HEADER|ARITYVAL_SUBTAG)
@@ -159,6 +161,7 @@ struct erl_node_; /* Declared in erl_node_tables.h */
#define _TAG_HEADER_EXTERNAL_PORT (TAG_PRIMARY_HEADER|EXTERNAL_PORT_SUBTAG)
#define _TAG_HEADER_EXTERNAL_REF (TAG_PRIMARY_HEADER|EXTERNAL_REF_SUBTAG)
#define _TAG_HEADER_BIN_MATCHSTATE (TAG_PRIMARY_HEADER|BIN_MATCHSTATE_SUBTAG)
+#define _TAG_HEADER_MAP (TAG_PRIMARY_HEADER|MAP_SUBTAG)
#define _TAG_HEADER_MASK 0x3F
@@ -354,7 +357,10 @@ _ET_DECLARE_CHECKED(Uint,thing_subtag,Eterm)
#define is_value(x) ((x) != THE_NON_VALUE)
/* binary object access methods */
-#define is_binary_header(x) (((x) & (_TAG_HEADER_MASK-_BINARY_XXX_MASK)) == _TAG_HEADER_REFC_BIN)
+#define is_binary_header(x) \
+ ((((x) & (_TAG_HEADER_MASK)) == _TAG_HEADER_REFC_BIN) || \
+ (((x) & (_TAG_HEADER_MASK)) == _TAG_HEADER_HEAP_BIN) || \
+ (((x) & (_TAG_HEADER_MASK)) == _TAG_HEADER_SUB_BIN))
#define make_binary(x) make_boxed((Eterm*)(x))
#define is_binary(x) (is_boxed((x)) && is_binary_header(*boxed_val((x))))
#define is_not_binary(x) (!is_binary((x)))
@@ -887,7 +893,8 @@ typedef struct external_thing_ {
(((x) & _TAG_HEADER_MASK) == _TAG_HEADER_EXTERNAL_REF)
#define is_external_header(x) \
- (((x) & (_TAG_HEADER_MASK-_BINARY_XXX_MASK)) == _TAG_HEADER_EXTERNAL_PID)
+ (((x) & (_TAG_HEADER_MASK-_BINARY_XXX_MASK)) == _TAG_HEADER_EXTERNAL_PID \
+ && ((x) & _TAG_HEADER_MASK) != _TAG_HEADER_MAP)
#define is_external(x) (is_boxed((x)) && is_external_header(*boxed_val((x))))
@@ -1064,8 +1071,8 @@ _ET_DECLARE_CHECKED(Uint,y_reg_index,Uint)
/*
* Backwards compatibility definitions:
- * - #define virtal *_DEF constants with values that fit term order:
- * number < atom < ref < fun < port < pid < tuple < nil < cons < binary
+ * - #define virtual *_DEF constants with values that fit term order:
+ * number < atom < ref < fun < port < pid < tuple < map < nil < cons < binary
* - tag_val_def() function generates virtual _DEF tag
* - not_eq_tags() and NUMBER_CODE() defined in terms
* of the tag_val_def() function
@@ -1074,19 +1081,20 @@ _ET_DECLARE_CHECKED(Uint,y_reg_index,Uint)
#define BINARY_DEF 0x0
#define LIST_DEF 0x1
#define NIL_DEF 0x2
-#define TUPLE_DEF 0x3
-#define PID_DEF 0x4
-#define EXTERNAL_PID_DEF 0x5
-#define PORT_DEF 0x6
-#define EXTERNAL_PORT_DEF 0x7
-#define EXPORT_DEF 0x8
-#define FUN_DEF 0x9
-#define REF_DEF 0xa
-#define EXTERNAL_REF_DEF 0xb
-#define ATOM_DEF 0xc
-#define FLOAT_DEF 0xd
-#define BIG_DEF 0xe
-#define SMALL_DEF 0xf
+#define MAP_DEF 0x3
+#define TUPLE_DEF 0x4
+#define PID_DEF 0x5
+#define EXTERNAL_PID_DEF 0x6
+#define PORT_DEF 0x7
+#define EXTERNAL_PORT_DEF 0x8
+#define EXPORT_DEF 0x9
+#define FUN_DEF 0xa
+#define REF_DEF 0xb
+#define EXTERNAL_REF_DEF 0xc
+#define ATOM_DEF 0xd
+#define FLOAT_DEF 0xe
+#define BIG_DEF 0xf
+#define SMALL_DEF 0x10
#if ET_DEBUG
extern unsigned tag_val_def_debug(Wterm, const char*, unsigned);
@@ -1096,8 +1104,8 @@ extern unsigned tag_val_def(Wterm);
#endif
#define not_eq_tags(X,Y) (tag_val_def((X)) ^ tag_val_def((Y)))
-#define NUMBER_CODE(x,y) ((tag_val_def(x) << 4) | tag_val_def(y))
-#define _NUMBER_CODE(TX,TY) ((TX << 4) | TY)
+#define NUMBER_CODE(x,y) ((tag_val_def(x) << 5) | tag_val_def(y))
+#define _NUMBER_CODE(TX,TY) ((TX << 5) | TY)
#define SMALL_SMALL _NUMBER_CODE(SMALL_DEF,SMALL_DEF)
#define SMALL_BIG _NUMBER_CODE(SMALL_DEF,BIG_DEF)
#define SMALL_FLOAT _NUMBER_CODE(SMALL_DEF,FLOAT_DEF)
@@ -1126,6 +1134,7 @@ extern unsigned tag_val_def(Wterm);
#define make_tuple_rel make_boxed_rel
#define make_external_rel make_boxed_rel
#define make_internal_ref_rel make_boxed_rel
+#define make_big_rel make_boxed_rel
#define binary_val_rel(RTERM, BASE) binary_val(rterm2wterm(RTERM, BASE))
#define list_val_rel(RTERM, BASE) list_val(rterm2wterm(RTERM, BASE))
diff --git a/erts/emulator/beam/erl_thr_progress.c b/erts/emulator/beam/erl_thr_progress.c
index cf5e3dc012..664c479eb6 100644
--- a/erts/emulator/beam/erl_thr_progress.c
+++ b/erts/emulator/beam/erl_thr_progress.c
@@ -115,70 +115,24 @@
#undef read_nob
#define read_nob erts_thr_prgr_read_nob__
-#ifdef ARCH_64
-
static ERTS_INLINE void
set_mb(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
{
- erts_atomic_set_mb(atmc, val);
+ erts_atomic64_set_mb(atmc, (erts_aint64_t) val);
}
static ERTS_INLINE void
set_nob(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
{
- erts_atomic_set_nob(atmc, val);
+ erts_atomic64_set_nob(atmc, (erts_aint64_t) val);
}
static ERTS_INLINE void
init_nob(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
{
- erts_atomic_init_nob(atmc, val);
-}
-
-#else
-
-#undef dw_aint_to_val
-#define dw_aint_to_val erts_thr_prgr_dw_aint_to_val__
-
-static void
-val_to_dw_aint(erts_dw_aint_t *dw_aint, ErtsThrPrgrVal val)
-{
-#ifdef ETHR_SU_DW_NAINT_T__
- dw_aint->dw_sint = (ETHR_SU_DW_NAINT_T__) val;
-#else
- dw_aint->sint[ERTS_DW_AINT_LOW_WORD]
- = (erts_aint_t) (val & 0xffffffff);
- dw_aint->sint[ERTS_DW_AINT_HIGH_WORD]
- = (erts_aint_t) ((val >> 32) & 0xffffffff);
-#endif
+ erts_atomic64_init_nob(atmc, (erts_aint64_t) val);
}
-static ERTS_INLINE void
-set_mb(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
-{
- erts_dw_aint_t dw_aint;
- val_to_dw_aint(&dw_aint, val);
- erts_dw_atomic_set_mb(atmc, &dw_aint);
-}
-
-static ERTS_INLINE void
-set_nob(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
-{
- erts_dw_aint_t dw_aint;
- val_to_dw_aint(&dw_aint, val);
- erts_dw_atomic_set_nob(atmc, &dw_aint);
-}
-
-static ERTS_INLINE void
-init_nob(ERTS_THR_PRGR_ATOMIC *atmc, ErtsThrPrgrVal val)
-{
- erts_dw_aint_t dw_aint;
- val_to_dw_aint(&dw_aint, val);
- erts_dw_atomic_init_nob(atmc, &dw_aint);
-}
-
-#endif
-
/* #define ERTS_THR_PROGRESS_STATE_DEBUG */
#ifdef ERTS_THR_PROGRESS_STATE_DEBUG
@@ -417,7 +371,8 @@ void
erts_thr_progress_pre_init(void)
{
intrnl = NULL;
- erts_tsd_key_create(&erts_thr_prgr_data_key__);
+ erts_tsd_key_create(&erts_thr_prgr_data_key__,
+ "erts_thr_prgr_data_key");
init_nob(&erts_thr_prgr__.current, ERTS_THR_PRGR_VAL_FIRST);
}
diff --git a/erts/emulator/beam/erl_thr_progress.h b/erts/emulator/beam/erl_thr_progress.h
index 5f392944c2..03ddbd467c 100644
--- a/erts/emulator/beam/erl_thr_progress.h
+++ b/erts/emulator/beam/erl_thr_progress.h
@@ -115,11 +115,7 @@ struct ErtsThrPrgrLaterOp_ {
extern erts_tsd_key_t erts_thr_prgr_data_key__;
-#ifdef ARCH_64
-# define ERTS_THR_PRGR_ATOMIC erts_atomic_t
-#else /* ARCH_32 */
-# define ERTS_THR_PRGR_ATOMIC erts_dw_atomic_t
-#endif
+#define ERTS_THR_PRGR_ATOMIC erts_atomic64_t
typedef struct {
void *arg;
@@ -158,10 +154,6 @@ void erts_thr_progress_unmanaged_continue__(int umrefc_ix);
void erts_thr_progress_dbg_print_state(void);
-#ifdef ARCH_32
-#define ERTS_THR_PRGR_ATOMIC erts_dw_atomic_t
-ERTS_GLB_INLINE ErtsThrPrgrVal erts_thr_prgr_dw_aint_to_val__(erts_dw_aint_t *dw_aint);
-#endif
ERTS_GLB_INLINE ErtsThrPrgrVal erts_thr_prgr_read_nob__(ERTS_THR_PRGR_ATOMIC *atmc);
ERTS_GLB_INLINE ErtsThrPrgrVal erts_thr_prgr_read_acqb__(ERTS_THR_PRGR_ATOMIC *atmc);
ERTS_GLB_INLINE ErtsThrPrgrVal erts_thr_prgr_read_mb__(ERTS_THR_PRGR_ATOMIC *atmc);
@@ -184,68 +176,24 @@ ERTS_GLB_INLINE int erts_thr_progress_has_reached(ErtsThrPrgrVal val);
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
-#ifdef ARCH_64
-
-ERTS_GLB_INLINE ErtsThrPrgrVal
-erts_thr_prgr_read_nob__(ERTS_THR_PRGR_ATOMIC *atmc)
-{
- return (ErtsThrPrgrVal) erts_atomic_read_nob(atmc);
-}
-
-ERTS_GLB_INLINE ErtsThrPrgrVal
-erts_thr_prgr_read_acqb__(ERTS_THR_PRGR_ATOMIC *atmc)
-{
- return (ErtsThrPrgrVal) erts_atomic_read_acqb(atmc);
-}
-
-ERTS_GLB_INLINE ErtsThrPrgrVal
-erts_thr_prgr_read_mb__(ERTS_THR_PRGR_ATOMIC *atmc)
-{
- return (ErtsThrPrgrVal) erts_atomic_read_mb(atmc);
-}
-
-#else /* ARCH_32 */
-
-ERTS_GLB_INLINE ErtsThrPrgrVal
-erts_thr_prgr_dw_aint_to_val__(erts_dw_aint_t *dw_aint)
-{
-#ifdef ETHR_SU_DW_NAINT_T__
- return (ErtsThrPrgrVal) dw_aint->dw_sint;
-#else
- ErtsThrPrgrVal res;
- res = (ErtsThrPrgrVal) ((Uint32) dw_aint->sint[ERTS_DW_AINT_HIGH_WORD]);
- res <<= 32;
- res |= (ErtsThrPrgrVal) ((Uint32) dw_aint->sint[ERTS_DW_AINT_LOW_WORD]);
- return res;
-#endif
-}
-
ERTS_GLB_INLINE ErtsThrPrgrVal
erts_thr_prgr_read_nob__(ERTS_THR_PRGR_ATOMIC *atmc)
{
- erts_dw_aint_t dw_aint;
- erts_dw_atomic_read_nob(atmc, &dw_aint);
- return erts_thr_prgr_dw_aint_to_val__(&dw_aint);
+ return (ErtsThrPrgrVal) erts_atomic64_read_nob(atmc);
}
ERTS_GLB_INLINE ErtsThrPrgrVal
erts_thr_prgr_read_acqb__(ERTS_THR_PRGR_ATOMIC *atmc)
{
- erts_dw_aint_t dw_aint;
- erts_dw_atomic_read_acqb(atmc, &dw_aint);
- return erts_thr_prgr_dw_aint_to_val__(&dw_aint);
+ return (ErtsThrPrgrVal) erts_atomic64_read_acqb(atmc);
}
ERTS_GLB_INLINE ErtsThrPrgrVal
erts_thr_prgr_read_mb__(ERTS_THR_PRGR_ATOMIC *atmc)
{
- erts_dw_aint_t dw_aint;
- erts_dw_atomic_read_mb(atmc, &dw_aint);
- return erts_thr_prgr_dw_aint_to_val__(&dw_aint);
+ return (ErtsThrPrgrVal) erts_atomic64_read_mb(atmc);
}
-#endif
-
ERTS_GLB_INLINE int
erts_thr_progress_is_managed_thread(void)
{
diff --git a/erts/emulator/beam/erl_threads.h b/erts/emulator/beam/erl_threads.h
index 759c8f4c33..7214f3ea33 100644
--- a/erts/emulator/beam/erl_threads.h
+++ b/erts/emulator/beam/erl_threads.h
@@ -281,10 +281,13 @@
#define ERTS_THR_READ_MEMORY_BARRIER ETHR_READ_MEMORY_BARRIER
#define ERTS_THR_DATA_DEPENDENCY_READ_MEMORY_BARRIER ETHR_READ_DEPEND_MEMORY_BARRIER
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
#define erts_mtx_lock(L) erts_mtx_lock_x(L, __FILE__, __LINE__)
+#define erts_mtx_trylock(L) erts_mtx_trylock_x(L, __FILE__, __LINE__)
#define erts_spin_lock(L) erts_spin_lock_x(L, __FILE__, __LINE__)
+#define erts_rwmtx_tryrlock(L) erts_rwmtx_tryrlock_x(L, __FILE__, __LINE__)
#define erts_rwmtx_rlock(L) erts_rwmtx_rlock_x(L, __FILE__, __LINE__)
+#define erts_rwmtx_tryrwlock(L) erts_rwmtx_tryrwlock_x(L, __FILE__, __LINE__)
#define erts_rwmtx_rwlock(L) erts_rwmtx_rwlock_x(L, __FILE__, __LINE__)
#define erts_read_lock(L) erts_read_lock_x(L, __FILE__, __LINE__)
#define erts_write_lock(L) erts_write_lock_x(L, __FILE__, __LINE__)
@@ -341,6 +344,16 @@ typedef ethr_ts_event erts_tse_t;
#define erts_aint32_t ethr_sint32_t
#define erts_atomic32_t ethr_atomic32_t
+#if defined(ARCH_32)
+# define erts_atomic64_t ethr_dw_atomic_t
+# define erts_aint64_t ethr_sint64_t
+#elif defined(ARCH_64)
+# define erts_atomic64_t ethr_atomic_t
+# define erts_aint64_t ethr_sint_t
+#else
+# error "Not supported architecture"
+#endif
+
#define ERTS_DW_AINT_HIGH_WORD ETHR_DW_SINT_HIGH_WORD
#define ERTS_DW_AINT_LOW_WORD ETHR_DW_SINT_LOW_WORD
@@ -411,10 +424,12 @@ typedef int erts_tse_t;
typedef struct { SWord sint[2]; } erts_dw_aint_t;
typedef SWord erts_aint_t;
typedef Sint32 erts_aint32_t;
+typedef Sint64 erts_aint64_t;
#define erts_dw_atomic_t erts_dw_aint_t
#define erts_atomic_t erts_aint_t
#define erts_atomic32_t erts_aint32_t
+#define erts_atomic64_t erts_aint64_t
#if __GNUC__ > 2
typedef struct { } erts_spinlock_t;
@@ -443,6 +458,7 @@ typedef struct { int gcc_is_buggy; } erts_rwlock_t;
#define erts_no_dw_atomic_t erts_dw_aint_t
#define erts_no_atomic_t erts_aint_t
#define erts_no_atomic32_t erts_aint32_t
+#define erts_no_atomic64_t erts_aint64_t
#define ERTS_AINT_NULL ((erts_aint_t) NULL)
@@ -461,18 +477,24 @@ ERTS_GLB_INLINE void erts_thr_exit(void *res);
ERTS_GLB_INLINE void erts_thr_install_exit_handler(void (*exit_handler)(void));
ERTS_GLB_INLINE erts_tid_t erts_thr_self(void);
ERTS_GLB_INLINE int erts_equal_tids(erts_tid_t x, erts_tid_t y);
-ERTS_GLB_INLINE void erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra);
-ERTS_GLB_INLINE void erts_mtx_init_x_opt(erts_mtx_t *mtx, char *name, Eterm extra, Uint16 opt);
+ERTS_GLB_INLINE void erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra,
+ int enable_lcnt);
+ERTS_GLB_INLINE void erts_mtx_init_x_opt(erts_mtx_t *mtx, char *name, Eterm extra,
+ Uint16 opt, int enable_lcnt);
ERTS_GLB_INLINE void erts_mtx_init_locked_x(erts_mtx_t *mtx,
char *name,
- Eterm extra);
+ Eterm extra,
+ int enable_lcnt);
ERTS_GLB_INLINE void erts_mtx_init(erts_mtx_t *mtx, char *name);
ERTS_GLB_INLINE void erts_mtx_init_locked(erts_mtx_t *mtx, char *name);
ERTS_GLB_INLINE void erts_mtx_destroy(erts_mtx_t *mtx);
-ERTS_GLB_INLINE int erts_mtx_trylock(erts_mtx_t *mtx);
-#ifdef ERTS_ENABLE_LOCK_COUNT
-ERTS_GLB_INLINE void erts_mtx_lock_x(erts_mtx_t *mtx, char *file, unsigned int line);
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ERTS_GLB_INLINE int erts_mtx_trylock_x(erts_mtx_t *mtx, char *file,
+ unsigned int line);
+ERTS_GLB_INLINE void erts_mtx_lock_x(erts_mtx_t *mtx, char *file,
+ unsigned int line);
#else
+ERTS_GLB_INLINE int erts_mtx_trylock(erts_mtx_t *mtx);
ERTS_GLB_INLINE void erts_mtx_lock(erts_mtx_t *mtx);
#endif
ERTS_GLB_INLINE void erts_mtx_unlock(erts_mtx_t *mtx);
@@ -496,16 +518,18 @@ ERTS_GLB_INLINE void erts_rwmtx_init_opt(erts_rwmtx_t *rwmtx,
ERTS_GLB_INLINE void erts_rwmtx_init(erts_rwmtx_t *rwmtx,
char *name);
ERTS_GLB_INLINE void erts_rwmtx_destroy(erts_rwmtx_t *rwmtx);
-ERTS_GLB_INLINE int erts_rwmtx_tryrlock(erts_rwmtx_t *rwmtx);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ERTS_GLB_INLINE int erts_rwmtx_tryrlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_rwmtx_rlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_rwmtx_rwlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line);
+ERTS_GLB_INLINE int erts_rwmtx_tryrwlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line);
#else
+ERTS_GLB_INLINE int erts_rwmtx_tryrlock(erts_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_rwmtx_rlock(erts_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_rwmtx_rwlock(erts_rwmtx_t *rwmtx);
+ERTS_GLB_INLINE int erts_rwmtx_tryrwlock(erts_rwmtx_t *rwmtx);
#endif
ERTS_GLB_INLINE void erts_rwmtx_runlock(erts_rwmtx_t *rwmtx);
-ERTS_GLB_INLINE int erts_rwmtx_tryrwlock(erts_rwmtx_t *rwmtx);
ERTS_GLB_INLINE void erts_rwmtx_rwunlock(erts_rwmtx_t *rwmtx);
ERTS_GLB_INLINE int erts_lc_rwmtx_is_rlocked(erts_rwmtx_t *mtx);
ERTS_GLB_INLINE int erts_lc_rwmtx_is_rwlocked(erts_rwmtx_t *mtx);
@@ -559,6 +583,29 @@ ERTS_GLB_INLINE erts_aint32_t erts_no_atomic32_cmpxchg(erts_no_atomic32_t *xchgp
ERTS_GLB_INLINE erts_aint32_t erts_no_atomic32_read_bset(erts_no_atomic32_t *var,
erts_aint32_t mask,
erts_aint32_t set);
+ERTS_GLB_INLINE void erts_no_atomic64_set(erts_no_atomic64_t *var,
+ erts_aint64_t i);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_read(erts_no_atomic64_t *var);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_inc_read(erts_no_atomic64_t *incp);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_dec_read(erts_no_atomic64_t *decp);
+ERTS_GLB_INLINE void erts_no_atomic64_inc(erts_no_atomic64_t *incp);
+ERTS_GLB_INLINE void erts_no_atomic64_dec(erts_no_atomic64_t *decp);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_add_read(erts_no_atomic64_t *addp,
+ erts_aint64_t i);
+ERTS_GLB_INLINE void erts_no_atomic64_add(erts_no_atomic64_t *addp,
+ erts_aint64_t i);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_read_bor(erts_no_atomic64_t *var,
+ erts_aint64_t mask);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_read_band(erts_no_atomic64_t *var,
+ erts_aint64_t mask);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_xchg(erts_no_atomic64_t *xchgp,
+ erts_aint64_t new);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_cmpxchg(erts_no_atomic64_t *xchgp,
+ erts_aint64_t new,
+ erts_aint64_t expected);
+ERTS_GLB_INLINE erts_aint64_t erts_no_atomic64_read_bset(erts_no_atomic64_t *var,
+ erts_aint64_t mask,
+ erts_aint64_t set);
ERTS_GLB_INLINE void erts_spinlock_init_x_opt(erts_spinlock_t *lock,
char *name,
@@ -571,7 +618,7 @@ ERTS_GLB_INLINE void erts_spinlock_init(erts_spinlock_t *lock,
char *name);
ERTS_GLB_INLINE void erts_spinlock_destroy(erts_spinlock_t *lock);
ERTS_GLB_INLINE void erts_spin_unlock(erts_spinlock_t *lock);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_spin_lock_x(erts_spinlock_t *lock, char *file, unsigned int line);
#else
ERTS_GLB_INLINE void erts_spin_lock(erts_spinlock_t *lock);
@@ -584,7 +631,7 @@ ERTS_GLB_INLINE void erts_rwlock_init(erts_rwlock_t *lock,
char *name);
ERTS_GLB_INLINE void erts_rwlock_destroy(erts_rwlock_t *lock);
ERTS_GLB_INLINE void erts_read_unlock(erts_rwlock_t *lock);
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
ERTS_GLB_INLINE void erts_read_lock_x(erts_rwlock_t *lock, char *file, unsigned int line);
ERTS_GLB_INLINE void erts_write_lock_x(erts_rwlock_t *lock, char *file, unsigned int line);
#else
@@ -594,7 +641,7 @@ ERTS_GLB_INLINE void erts_write_lock(erts_rwlock_t *lock);
ERTS_GLB_INLINE void erts_write_unlock(erts_rwlock_t *lock);
ERTS_GLB_INLINE int erts_lc_rwlock_is_rlocked(erts_rwlock_t *lock);
ERTS_GLB_INLINE int erts_lc_rwlock_is_rwlocked(erts_rwlock_t *lock);
-ERTS_GLB_INLINE void erts_tsd_key_create(erts_tsd_key_t *keyp);
+ERTS_GLB_INLINE void erts_tsd_key_create(erts_tsd_key_t *keyp, char *keyname);
ERTS_GLB_INLINE void erts_tsd_key_delete(erts_tsd_key_t key);
ERTS_GLB_INLINE void erts_tsd_set(erts_tsd_key_t key, void *value);
ERTS_GLB_INLINE void * erts_tsd_get(erts_tsd_key_t key);
@@ -1189,6 +1236,441 @@ erts_atomic32_read_dirty(erts_atomic32_t *var)
#endif
+/* 64-bit atomics */
+
+#if defined(ARCH_64)
+
+#define erts_atomic64_init_nob ethr_atomic_init
+#define erts_atomic64_set_nob ethr_atomic_set
+#define erts_atomic64_read_nob ethr_atomic_read
+#define erts_atomic64_inc_read_nob ethr_atomic_inc_read
+#define erts_atomic64_dec_read_nob ethr_atomic_dec_read
+#define erts_atomic64_inc_nob ethr_atomic_inc
+#define erts_atomic64_dec_nob ethr_atomic_dec
+#define erts_atomic64_add_read_nob ethr_atomic_add_read
+#define erts_atomic64_add_nob ethr_atomic_add
+#define erts_atomic64_read_bor_nob ethr_atomic_read_bor
+#define erts_atomic64_read_band_nob ethr_atomic_read_band
+#define erts_atomic64_xchg_nob ethr_atomic_xchg
+#define erts_atomic64_cmpxchg_nob ethr_atomic_cmpxchg
+#define erts_atomic64_read_bset_nob erts_atomic_read_bset_nob
+
+#define erts_atomic64_init_mb ethr_atomic_init_mb
+#define erts_atomic64_set_mb ethr_atomic_set_mb
+#define erts_atomic64_read_mb ethr_atomic_read_mb
+#define erts_atomic64_inc_read_mb ethr_atomic_inc_read_mb
+#define erts_atomic64_dec_read_mb ethr_atomic_dec_read_mb
+#define erts_atomic64_inc_mb ethr_atomic_inc_mb
+#define erts_atomic64_dec_mb ethr_atomic_dec_mb
+#define erts_atomic64_add_read_mb ethr_atomic_add_read_mb
+#define erts_atomic64_add_mb ethr_atomic_add_mb
+#define erts_atomic64_read_bor_mb ethr_atomic_read_bor_mb
+#define erts_atomic64_read_band_mb ethr_atomic_read_band_mb
+#define erts_atomic64_xchg_mb ethr_atomic_xchg_mb
+#define erts_atomic64_cmpxchg_mb ethr_atomic_cmpxchg_mb
+#define erts_atomic64_read_bset_mb erts_atomic_read_bset_mb
+
+#define erts_atomic64_init_acqb ethr_atomic_init_acqb
+#define erts_atomic64_set_acqb ethr_atomic_set_acqb
+#define erts_atomic64_read_acqb ethr_atomic_read_acqb
+#define erts_atomic64_inc_read_acqb ethr_atomic_inc_read_acqb
+#define erts_atomic64_dec_read_acqb ethr_atomic_dec_read_acqb
+#define erts_atomic64_inc_acqb ethr_atomic_inc_acqb
+#define erts_atomic64_dec_acqb ethr_atomic_dec_acqb
+#define erts_atomic64_add_read_acqb ethr_atomic_add_read_acqb
+#define erts_atomic64_add_acqb ethr_atomic_add_acqb
+#define erts_atomic64_read_bor_acqb ethr_atomic_read_bor_acqb
+#define erts_atomic64_read_band_acqb ethr_atomic_read_band_acqb
+#define erts_atomic64_xchg_acqb ethr_atomic_xchg_acqb
+#define erts_atomic64_cmpxchg_acqb ethr_atomic_cmpxchg_acqb
+#define erts_atomic64_read_bset_acqb erts_atomic_read_bset_acqb
+
+#define erts_atomic64_init_relb ethr_atomic_init_relb
+#define erts_atomic64_set_relb ethr_atomic_set_relb
+#define erts_atomic64_read_relb ethr_atomic_read_relb
+#define erts_atomic64_inc_read_relb ethr_atomic_inc_read_relb
+#define erts_atomic64_dec_read_relb ethr_atomic_dec_read_relb
+#define erts_atomic64_inc_relb ethr_atomic_inc_relb
+#define erts_atomic64_dec_relb ethr_atomic_dec_relb
+#define erts_atomic64_add_read_relb ethr_atomic_add_read_relb
+#define erts_atomic64_add_relb ethr_atomic_add_relb
+#define erts_atomic64_read_bor_relb ethr_atomic_read_bor_relb
+#define erts_atomic64_read_band_relb ethr_atomic_read_band_relb
+#define erts_atomic64_xchg_relb ethr_atomic_xchg_relb
+#define erts_atomic64_cmpxchg_relb ethr_atomic_cmpxchg_relb
+#define erts_atomic64_read_bset_relb erts_atomic_read_bset_relb
+
+#define erts_atomic64_init_ddrb ethr_atomic_init_ddrb
+#define erts_atomic64_set_ddrb ethr_atomic_set_ddrb
+#define erts_atomic64_read_ddrb ethr_atomic_read_ddrb
+#define erts_atomic64_inc_read_ddrb ethr_atomic_inc_read_ddrb
+#define erts_atomic64_dec_read_ddrb ethr_atomic_dec_read_ddrb
+#define erts_atomic64_inc_ddrb ethr_atomic_inc_ddrb
+#define erts_atomic64_dec_ddrb ethr_atomic_dec_ddrb
+#define erts_atomic64_add_read_ddrb ethr_atomic_add_read_ddrb
+#define erts_atomic64_add_ddrb ethr_atomic_add_ddrb
+#define erts_atomic64_read_bor_ddrb ethr_atomic_read_bor_ddrb
+#define erts_atomic64_read_band_ddrb ethr_atomic_read_band_ddrb
+#define erts_atomic64_xchg_ddrb ethr_atomic_xchg_ddrb
+#define erts_atomic64_cmpxchg_ddrb ethr_atomic_cmpxchg_ddrb
+#define erts_atomic64_read_bset_ddrb erts_atomic_read_bset_ddrb
+
+#define erts_atomic64_init_rb ethr_atomic_init_rb
+#define erts_atomic64_set_rb ethr_atomic_set_rb
+#define erts_atomic64_read_rb ethr_atomic_read_rb
+#define erts_atomic64_inc_read_rb ethr_atomic_inc_read_rb
+#define erts_atomic64_dec_read_rb ethr_atomic_dec_read_rb
+#define erts_atomic64_inc_rb ethr_atomic_inc_rb
+#define erts_atomic64_dec_rb ethr_atomic_dec_rb
+#define erts_atomic64_add_read_rb ethr_atomic_add_read_rb
+#define erts_atomic64_add_rb ethr_atomic_add_rb
+#define erts_atomic64_read_bor_rb ethr_atomic_read_bor_rb
+#define erts_atomic64_read_band_rb ethr_atomic_read_band_rb
+#define erts_atomic64_xchg_rb ethr_atomic_xchg_rb
+#define erts_atomic64_cmpxchg_rb ethr_atomic_cmpxchg_rb
+#define erts_atomic64_read_bset_rb erts_atomic_read_bset_rb
+
+#define erts_atomic64_init_wb ethr_atomic_init_wb
+#define erts_atomic64_set_wb ethr_atomic_set_wb
+#define erts_atomic64_read_wb ethr_atomic_read_wb
+#define erts_atomic64_inc_read_wb ethr_atomic_inc_read_wb
+#define erts_atomic64_dec_read_wb ethr_atomic_dec_read_wb
+#define erts_atomic64_inc_wb ethr_atomic_inc_wb
+#define erts_atomic64_dec_wb ethr_atomic_dec_wb
+#define erts_atomic64_add_read_wb ethr_atomic_add_read_wb
+#define erts_atomic64_add_wb ethr_atomic_add_wb
+#define erts_atomic64_read_bor_wb ethr_atomic_read_bor_wb
+#define erts_atomic64_read_band_wb ethr_atomic_read_band_wb
+#define erts_atomic64_xchg_wb ethr_atomic_xchg_wb
+#define erts_atomic64_cmpxchg_wb ethr_atomic_cmpxchg_wb
+#define erts_atomic64_read_bset_wb erts_atomic_read_bset_wb
+
+#define erts_atomic64_set_dirty erts_atomic_set_dirty
+#define erts_atomic64_read_dirty erts_atomic_read_dirty
+
+#elif defined(ARCH_32)
+
+#undef ERTS_ATOMIC64_OPS_DECL__
+
+#define ERTS_ATOMIC64_OPS_DECL__(BARRIER) \
+ERTS_GLB_INLINE void \
+erts_atomic64_init_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE void \
+erts_atomic64_set_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_ ## BARRIER(erts_atomic64_t *var); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_inc_read_ ## BARRIER(erts_atomic64_t *var); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_dec_read_ ## BARRIER(erts_atomic64_t *var); \
+ERTS_GLB_INLINE void \
+erts_atomic64_inc_ ## BARRIER(erts_atomic64_t *var); \
+ERTS_GLB_INLINE void \
+erts_atomic64_dec_ ## BARRIER(erts_atomic64_t *var); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_add_read_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE void \
+erts_atomic64_add_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_bor_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_band_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_xchg_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_cmpxchg_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t new, \
+ erts_aint64_t exp); \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_bset_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t mask, \
+ erts_aint64_t set)
+
+ERTS_ATOMIC64_OPS_DECL__(nob);
+ERTS_ATOMIC64_OPS_DECL__(mb);
+ERTS_ATOMIC64_OPS_DECL__(acqb);
+ERTS_ATOMIC64_OPS_DECL__(relb);
+ERTS_ATOMIC64_OPS_DECL__(ddrb);
+ERTS_ATOMIC64_OPS_DECL__(rb);
+ERTS_ATOMIC64_OPS_DECL__(wb);
+
+#undef ERTS_ATOMIC64_OPS_DECL__
+
+ERTS_GLB_INLINE void
+erts_atomic64_set_dirty(erts_atomic64_t *var, erts_aint64_t val);
+ERTS_GLB_INLINE erts_aint64_t
+erts_atomic64_read_dirty(erts_atomic64_t *var);
+
+#if ERTS_GLB_INLINE_INCL_FUNC_DEF
+
+/*
+ * The ethr_dw_atomic_*_nob() functions below
+ * are here to make it possible for the
+ * ERTS_ATOMIC64_OPS_IMPL__() to map erts
+ * barriers to ethread barriers...
+ */
+static ERTS_INLINE void
+ethr_dw_atomic_init_nob(ethr_dw_atomic_t *var,
+ ethr_dw_sint_t *val)
+{
+ ethr_dw_atomic_init(var, val);
+}
+
+static ERTS_INLINE void
+ethr_dw_atomic_set_nob(ethr_dw_atomic_t *var,
+ ethr_dw_sint_t *val)
+{
+ ethr_dw_atomic_set(var, val);
+}
+
+static ERTS_INLINE void
+ethr_dw_atomic_read_nob(ethr_dw_atomic_t *var,
+ ethr_dw_sint_t *val)
+{
+ ethr_dw_atomic_read(var, val);
+}
+
+static ERTS_INLINE int
+ethr_dw_atomic_cmpxchg_nob(ethr_dw_atomic_t *var,
+ ethr_dw_sint_t *new,
+ ethr_dw_sint_t *xchg)
+{
+ return ethr_dw_atomic_cmpxchg(var, new, xchg);
+}
+
+#undef ERTS_ATOMIC64_OPS_IMPL__
+#undef ERTS_ATOMIC64_DW_CMPXCHG_IMPL__
+#undef ERTS_DW_SINT_TO_AINT64__
+#undef ERTS_AINT64_TO_DW_SINT__
+
+#ifdef ETHR_SU_DW_NAINT_T__
+#define ERTS_DW_SINT_TO_AINT64__(DW) \
+ ((erts_aint64_t) DW.dw_sint)
+#define ERTS_AINT64_TO_DW_SINT__(DW, AINT64) \
+ (DW.dw_sint = (ETHR_SU_DW_NAINT_T__) AINT64)
+#else /* !ETHR_SU_DW_NAINT_T__ */
+#define ERTS_DW_SINT_TO_AINT64__(DW) \
+ ((((erts_aint64_t) DW.sint[ETHR_DW_SINT_HIGH_WORD]) << 32) \
+ | (((erts_aint64_t) DW.sint[ETHR_DW_SINT_LOW_WORD]) \
+ & ((erts_aint64_t) 0xffffffff)))
+#define ERTS_AINT64_TO_DW_SINT__(DW, AINT64) \
+ do { \
+ DW.sint[ETHR_DW_SINT_LOW_WORD] = \
+ (ethr_sint_t) (AINT64 & 0xffffffff); \
+ DW.sint[ETHR_DW_SINT_HIGH_WORD] = \
+ (ethr_sint_t) ((AINT64 >> 32) & 0xffffffff); \
+ } while (0)
+#endif /* !ETHR_SU_DW_NAINT_T__ */
+
+#define ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(CmpXchgOp, \
+ AVarP, XchgVar, NewVar, \
+ ModificationCode) \
+do { \
+ ethr_dw_sint_t dw_xchg__, dw_new__; \
+ ethr_dw_atomic_read(AVarP, &dw_xchg__); \
+ do { \
+ XchgVar = ERTS_DW_SINT_TO_AINT64__(dw_xchg__); \
+ { \
+ ModificationCode; \
+ } \
+ ERTS_AINT64_TO_DW_SINT__(dw_new__, NewVar); \
+ } while (!CmpXchgOp((AVarP), &dw_new__, &dw_xchg__)); \
+} while (0)
+
+#define ERTS_ATOMIC64_OPS_IMPL__(BARRIER) \
+ \
+ERTS_GLB_INLINE void \
+erts_atomic64_init_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ ethr_dw_sint_t dw; \
+ ERTS_AINT64_TO_DW_SINT__(dw, val); \
+ ethr_dw_atomic_init_ ## BARRIER(var, &dw); \
+} \
+ \
+ERTS_GLB_INLINE void \
+erts_atomic64_set_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ ethr_dw_sint_t dw; \
+ ERTS_AINT64_TO_DW_SINT__(dw, val); \
+ ethr_dw_atomic_set_ ## BARRIER(var, &dw); \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_ ## BARRIER(erts_atomic64_t *var) \
+{ \
+ ethr_dw_sint_t dw; \
+ ethr_dw_atomic_read_ ## BARRIER(var, &dw); \
+ return ERTS_DW_SINT_TO_AINT64__(dw); \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_inc_read_ ## BARRIER(erts_atomic64_t *var) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg + 1); \
+ return new; \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_dec_read_ ## BARRIER(erts_atomic64_t *var) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg - 1); \
+ return new; \
+} \
+ \
+ERTS_GLB_INLINE void \
+erts_atomic64_inc_ ## BARRIER(erts_atomic64_t *var) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg + 1); \
+} \
+ \
+ERTS_GLB_INLINE void \
+erts_atomic64_dec_ ## BARRIER(erts_atomic64_t *var) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg - 1); \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_add_read_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg + val); \
+ return new; \
+} \
+ \
+ERTS_GLB_INLINE void \
+erts_atomic64_add_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg + val); \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_bor_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg | val); \
+ return xchg; \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_band_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = xchg & val); \
+ return xchg; \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_xchg_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t val) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ new = val); \
+ return xchg; \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_cmpxchg_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t new, \
+ erts_aint64_t exp) \
+{ \
+ ethr_dw_sint_t dw_xchg, dw_new; \
+ ERTS_AINT64_TO_DW_SINT__(dw_xchg, exp); \
+ ERTS_AINT64_TO_DW_SINT__(dw_new, new); \
+ if (ethr_dw_atomic_cmpxchg_ ## BARRIER(var, &dw_new, &dw_xchg)) \
+ return exp; \
+ return ERTS_DW_SINT_TO_AINT64__(dw_xchg); \
+} \
+ \
+ERTS_GLB_INLINE erts_aint64_t \
+erts_atomic64_read_bset_ ## BARRIER(erts_atomic64_t *var, \
+ erts_aint64_t mask, \
+ erts_aint64_t set) \
+{ \
+ erts_aint64_t xchg, new; \
+ ERTS_ATOMIC64_DW_CMPXCHG_IMPL__(ethr_dw_atomic_cmpxchg_ ## BARRIER, \
+ var, xchg, new, \
+ { \
+ new = xchg & ~mask; \
+ new |= mask & set; \
+ }); \
+ return xchg; \
+}
+
+ERTS_ATOMIC64_OPS_IMPL__(nob)
+ERTS_ATOMIC64_OPS_IMPL__(mb)
+ERTS_ATOMIC64_OPS_IMPL__(acqb)
+ERTS_ATOMIC64_OPS_IMPL__(relb)
+ERTS_ATOMIC64_OPS_IMPL__(ddrb)
+ERTS_ATOMIC64_OPS_IMPL__(rb)
+ERTS_ATOMIC64_OPS_IMPL__(wb)
+
+#undef ERTS_ATOMIC64_OPS_IMPL__
+#undef ERTS_ATOMIC64_DW_CMPXCHG_IMPL__
+
+ERTS_GLB_INLINE void
+erts_atomic64_set_dirty(erts_atomic64_t *var, erts_aint64_t val)
+{
+ ethr_sint_t *sint = ethr_dw_atomic_addr(var);
+ ethr_dw_sint_t dw;
+ ERTS_AINT64_TO_DW_SINT__(dw, val);
+ sint[0] = dw.sint[0];
+ sint[1] = dw.sint[1];
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_atomic64_read_dirty(erts_atomic64_t *var)
+{
+ ethr_sint_t *sint;
+ ethr_dw_sint_t dw;
+ sint = ethr_dw_atomic_addr(var);
+ dw.sint[0] = sint[0];
+ dw.sint[1] = sint[1];
+ return ERTS_DW_SINT_TO_AINT64__(dw);
+}
+
+#undef ERTS_DW_SINT_TO_AINT64__
+#undef ERTS_AINT64_TO_DW_SINT__
+
+#endif /* ERTS_GLB_INLINE_INCL_FUNC_DEF */
+
+#endif /* ARCH_32 */
+
#else /* !USE_THREADS */
/* Double word size atomics */
@@ -1451,6 +1933,116 @@ erts_atomic32_read_dirty(erts_atomic32_t *var)
#define erts_atomic32_set_dirty erts_no_atomic32_set
#define erts_atomic32_read_dirty erts_no_atomic32_read
+/* 64-bit atomics */
+
+#define erts_atomic64_init_nob erts_no_atomic64_set
+#define erts_atomic64_set_nob erts_no_atomic64_set
+#define erts_atomic64_read_nob erts_no_atomic64_read
+#define erts_atomic64_inc_read_nob erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_nob erts_no_atomic64_dec_read
+#define erts_atomic64_inc_nob erts_no_atomic64_inc
+#define erts_atomic64_dec_nob erts_no_atomic64_dec
+#define erts_atomic64_add_read_nob erts_no_atomic64_add_read
+#define erts_atomic64_add_nob erts_no_atomic64_add
+#define erts_atomic64_read_bor_nob erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_nob erts_no_atomic64_read_band
+#define erts_atomic64_xchg_nob erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_nob erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_nob erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_mb erts_no_atomic64_set
+#define erts_atomic64_set_mb erts_no_atomic64_set
+#define erts_atomic64_read_mb erts_no_atomic64_read
+#define erts_atomic64_inc_read_mb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_mb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_mb erts_no_atomic64_inc
+#define erts_atomic64_dec_mb erts_no_atomic64_dec
+#define erts_atomic64_add_read_mb erts_no_atomic64_add_read
+#define erts_atomic64_add_mb erts_no_atomic64_add
+#define erts_atomic64_read_bor_mb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_mb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_mb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_mb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_mb erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_acqb erts_no_atomic64_set
+#define erts_atomic64_set_acqb erts_no_atomic64_set
+#define erts_atomic64_read_acqb erts_no_atomic64_read
+#define erts_atomic64_inc_read_acqb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_acqb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_acqb erts_no_atomic64_inc
+#define erts_atomic64_dec_acqb erts_no_atomic64_dec
+#define erts_atomic64_add_read_acqb erts_no_atomic64_add_read
+#define erts_atomic64_add_acqb erts_no_atomic64_add
+#define erts_atomic64_read_bor_acqb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_acqb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_acqb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_acqb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_acqb erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_relb erts_no_atomic64_set
+#define erts_atomic64_set_relb erts_no_atomic64_set
+#define erts_atomic64_read_relb erts_no_atomic64_read
+#define erts_atomic64_inc_read_relb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_relb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_relb erts_no_atomic64_inc
+#define erts_atomic64_dec_relb erts_no_atomic64_dec
+#define erts_atomic64_add_read_relb erts_no_atomic64_add_read
+#define erts_atomic64_add_relb erts_no_atomic64_add
+#define erts_atomic64_read_bor_relb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_relb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_relb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_relb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_relb erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_ddrb erts_no_atomic64_set
+#define erts_atomic64_set_ddrb erts_no_atomic64_set
+#define erts_atomic64_read_ddrb erts_no_atomic64_read
+#define erts_atomic64_inc_read_ddrb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_ddrb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_ddrb erts_no_atomic64_inc
+#define erts_atomic64_dec_ddrb erts_no_atomic64_dec
+#define erts_atomic64_add_read_ddrb erts_no_atomic64_add_read
+#define erts_atomic64_add_ddrb erts_no_atomic64_add
+#define erts_atomic64_read_bor_ddrb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_ddrb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_ddrb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_ddrb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_ddrb erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_rb erts_no_atomic64_set
+#define erts_atomic64_set_rb erts_no_atomic64_set
+#define erts_atomic64_read_rb erts_no_atomic64_read
+#define erts_atomic64_inc_read_rb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_rb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_rb erts_no_atomic64_inc
+#define erts_atomic64_dec_rb erts_no_atomic64_dec
+#define erts_atomic64_add_read_rb erts_no_atomic64_add_read
+#define erts_atomic64_add_rb erts_no_atomic64_add
+#define erts_atomic64_read_bor_rb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_rb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_rb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_rb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_rb erts_no_atomic64_read_bset
+
+#define erts_atomic64_init_wb erts_no_atomic64_set
+#define erts_atomic64_set_wb erts_no_atomic64_set
+#define erts_atomic64_read_wb erts_no_atomic64_read
+#define erts_atomic64_inc_read_wb erts_no_atomic64_inc_read
+#define erts_atomic64_dec_read_wb erts_no_atomic64_dec_read
+#define erts_atomic64_inc_wb erts_no_atomic64_inc
+#define erts_atomic64_dec_wb erts_no_atomic64_dec
+#define erts_atomic64_add_read_wb erts_no_atomic64_add_read
+#define erts_atomic64_add_wb erts_no_atomic64_add
+#define erts_atomic64_read_bor_wb erts_no_atomic64_read_bor
+#define erts_atomic64_read_band_wb erts_no_atomic64_read_band
+#define erts_atomic64_xchg_wb erts_no_atomic64_xchg
+#define erts_atomic64_cmpxchg_wb erts_no_atomic64_cmpxchg
+#define erts_atomic64_read_bset_wb erts_no_atomic64_read_bset
+
+#define erts_atomic64_set_dirty erts_no_atomic64_set
+#define erts_atomic64_read_dirty erts_no_atomic64_read
+
#endif /* !USE_THREADS */
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
@@ -1549,7 +2141,7 @@ erts_equal_tids(erts_tid_t x, erts_tid_t y)
}
ERTS_GLB_INLINE void
-erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra)
+erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra, int enable_lcnt)
{
#ifdef USE_THREADS
int res = ethr_mutex_init(&mtx->mtx);
@@ -1559,13 +2151,17 @@ erts_mtx_init_x(erts_mtx_t *mtx, char *name, Eterm extra)
erts_lc_init_lock_x(&mtx->lc, name, ERTS_LC_FLG_LT_MUTEX, extra);
#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX, extra);
+ if (enable_lcnt)
+ erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX, extra);
+ else
+ erts_lcnt_init_lock_x(&mtx->lcnt, NULL, ERTS_LCNT_LT_MUTEX, extra);
#endif
#endif
}
ERTS_GLB_INLINE void
-erts_mtx_init_x_opt(erts_mtx_t *mtx, char *name, Eterm extra, Uint16 opt)
+erts_mtx_init_x_opt(erts_mtx_t *mtx, char *name, Eterm extra, Uint16 opt,
+ int enable_lcnt)
{
#ifdef USE_THREADS
int res = ethr_mutex_init(&mtx->mtx);
@@ -1575,14 +2171,17 @@ erts_mtx_init_x_opt(erts_mtx_t *mtx, char *name, Eterm extra, Uint16 opt)
erts_lc_init_lock_x(&mtx->lc, name, ERTS_LC_FLG_LT_MUTEX, extra);
#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX | opt, extra);
+ if (enable_lcnt)
+ erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX | opt, extra);
+ else
+ erts_lcnt_init_lock_x(&mtx->lcnt, NULL, ERTS_LCNT_LT_MUTEX | opt, extra);
#endif
#endif
}
ERTS_GLB_INLINE void
-erts_mtx_init_locked_x(erts_mtx_t *mtx, char *name, Eterm extra)
+erts_mtx_init_locked_x(erts_mtx_t *mtx, char *name, Eterm extra, int enable_lcnt)
{
#ifdef USE_THREADS
int res = ethr_mutex_init(&mtx->mtx);
@@ -1592,7 +2191,10 @@ erts_mtx_init_locked_x(erts_mtx_t *mtx, char *name, Eterm extra)
erts_lc_init_lock_x(&mtx->lc, name, ERTS_LC_FLG_LT_MUTEX, extra);
#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX, extra);
+ if (enable_lcnt)
+ erts_lcnt_init_lock_x(&mtx->lcnt, name, ERTS_LCNT_LT_MUTEX, extra);
+ else
+ erts_lcnt_init_lock_x(&mtx->lcnt, NULL, ERTS_LCNT_LT_MUTEX, extra);
#endif
ethr_mutex_lock(&mtx->mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
@@ -1670,7 +2272,11 @@ erts_mtx_destroy(erts_mtx_t *mtx)
}
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_mtx_trylock_x(erts_mtx_t *mtx, char *file, unsigned int line)
+#else
erts_mtx_trylock(erts_mtx_t *mtx)
+#endif
{
#ifdef USE_THREADS
int res;
@@ -1684,8 +2290,12 @@ erts_mtx_trylock(erts_mtx_t *mtx)
res = ethr_mutex_trylock(&mtx->mtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_trylock_x(res == 0, &mtx->lc,file,line);
+#else
erts_lc_trylock(res == 0, &mtx->lc);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_trylock(&mtx->lcnt, res);
#endif
@@ -1697,7 +2307,7 @@ erts_mtx_trylock(erts_mtx_t *mtx)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_mtx_lock_x(erts_mtx_t *mtx, char *file, unsigned int line)
#else
erts_mtx_lock(erts_mtx_t *mtx)
@@ -1705,8 +2315,12 @@ erts_mtx_lock(erts_mtx_t *mtx)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_x(&mtx->lc, file, line);
+#else
erts_lc_lock(&mtx->lc);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock(&mtx->lcnt);
#endif
@@ -1857,7 +2471,10 @@ erts_rwmtx_init_opt_x(erts_rwmtx_t *rwmtx,
erts_lc_init_lock_x(&rwmtx->lc, name, ERTS_LC_FLG_LT_RWMUTEX, extra);
#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_lcnt_init_lock_x(&rwmtx->lcnt, name, ERTS_LCNT_LT_RWMUTEX, extra);
+ if (name && name[0] == '\0')
+ erts_lcnt_init_lock_x(&rwmtx->lcnt, NULL, ERTS_LCNT_LT_RWMUTEX, extra);
+ else
+ erts_lcnt_init_lock_x(&rwmtx->lcnt, name, ERTS_LCNT_LT_RWMUTEX, extra);
#endif
#endif
}
@@ -1921,7 +2538,11 @@ erts_rwmtx_destroy(erts_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_rwmtx_tryrlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line)
+#else
erts_rwmtx_tryrlock(erts_rwmtx_t *rwmtx)
+#endif
{
#ifdef USE_THREADS
int res;
@@ -1935,8 +2556,12 @@ erts_rwmtx_tryrlock(erts_rwmtx_t *rwmtx)
res = ethr_rwmutex_tryrlock(&rwmtx->rwmtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_trylock_flg_x(res == 0, &rwmtx->lc, ERTS_LC_FLG_LO_READ,file,line);
+#else
erts_lc_trylock_flg(res == 0, &rwmtx->lc, ERTS_LC_FLG_LO_READ);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_trylock_opt(&rwmtx->lcnt, res, ERTS_LCNT_LO_READ);
#endif
@@ -1948,7 +2573,7 @@ erts_rwmtx_tryrlock(erts_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_rwmtx_rlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line)
#else
erts_rwmtx_rlock(erts_rwmtx_t *rwmtx)
@@ -1956,8 +2581,12 @@ erts_rwmtx_rlock(erts_rwmtx_t *rwmtx)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_flg_x(&rwmtx->lc, ERTS_LC_FLG_LO_READ,file,line);
+#else
erts_lc_lock_flg(&rwmtx->lc, ERTS_LC_FLG_LO_READ);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock_opt(&rwmtx->lcnt, ERTS_LCNT_LO_READ);
#endif
@@ -1984,7 +2613,11 @@ erts_rwmtx_runlock(erts_rwmtx_t *rwmtx)
ERTS_GLB_INLINE int
+#ifdef ERTS_ENABLE_LOCK_POSITION
+erts_rwmtx_tryrwlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line)
+#else
erts_rwmtx_tryrwlock(erts_rwmtx_t *rwmtx)
+#endif
{
#ifdef USE_THREADS
int res;
@@ -1998,8 +2631,12 @@ erts_rwmtx_tryrwlock(erts_rwmtx_t *rwmtx)
res = ethr_rwmutex_tryrwlock(&rwmtx->rwmtx);
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_trylock_flg_x(res == 0, &rwmtx->lc, ERTS_LC_FLG_LO_READ_WRITE,file,line);
+#else
erts_lc_trylock_flg(res == 0, &rwmtx->lc, ERTS_LC_FLG_LO_READ_WRITE);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_trylock_opt(&rwmtx->lcnt, res, ERTS_LCNT_LO_READ_WRITE);
#endif
@@ -2011,7 +2648,7 @@ erts_rwmtx_tryrwlock(erts_rwmtx_t *rwmtx)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_rwmtx_rwlock_x(erts_rwmtx_t *rwmtx, char *file, unsigned int line)
#else
erts_rwmtx_rwlock(erts_rwmtx_t *rwmtx)
@@ -2019,8 +2656,12 @@ erts_rwmtx_rwlock(erts_rwmtx_t *rwmtx)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_flg_x(&rwmtx->lc, ERTS_LC_FLG_LO_READ_WRITE,file,line);
+#else
erts_lc_lock_flg(&rwmtx->lc, ERTS_LC_FLG_LO_READ_WRITE);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock_opt(&rwmtx->lcnt, ERTS_LCNT_LO_READ_WRITE);
#endif
@@ -2323,6 +2964,104 @@ erts_no_atomic32_read_bset(erts_no_atomic32_t *var,
return old;
}
+/* atomic64 */
+
+ERTS_GLB_INLINE void
+erts_no_atomic64_set(erts_no_atomic64_t *var, erts_aint64_t i)
+{
+ *var = i;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_read(erts_no_atomic64_t *var)
+{
+ return *var;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_inc_read(erts_no_atomic64_t *incp)
+{
+ return ++(*incp);
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_dec_read(erts_no_atomic64_t *decp)
+{
+ return --(*decp);
+}
+
+ERTS_GLB_INLINE void
+erts_no_atomic64_inc(erts_no_atomic64_t *incp)
+{
+ ++(*incp);
+}
+
+ERTS_GLB_INLINE void
+erts_no_atomic64_dec(erts_no_atomic64_t *decp)
+{
+ --(*decp);
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_add_read(erts_no_atomic64_t *addp, erts_aint64_t i)
+{
+ return *addp += i;
+}
+
+ERTS_GLB_INLINE void
+erts_no_atomic64_add(erts_no_atomic64_t *addp, erts_aint64_t i)
+{
+ *addp += i;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_read_bor(erts_no_atomic64_t *var, erts_aint64_t mask)
+{
+ erts_aint64_t old;
+ old = *var;
+ *var |= mask;
+ return old;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_read_band(erts_no_atomic64_t *var, erts_aint64_t mask)
+{
+ erts_aint64_t old;
+ old = *var;
+ *var &= mask;
+ return old;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_xchg(erts_no_atomic64_t *xchgp, erts_aint64_t new)
+{
+ erts_aint64_t old = *xchgp;
+ *xchgp = new;
+ return old;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_cmpxchg(erts_no_atomic64_t *xchgp,
+ erts_aint64_t new,
+ erts_aint64_t expected)
+{
+ erts_aint64_t old = *xchgp;
+ if (old == expected)
+ *xchgp = new;
+ return old;
+}
+
+ERTS_GLB_INLINE erts_aint64_t
+erts_no_atomic64_read_bset(erts_no_atomic64_t *var,
+ erts_aint64_t mask,
+ erts_aint64_t set)
+{
+ erts_aint64_t old = *var;
+ *var &= ~mask;
+ *var |= (mask & set);
+ return old;
+}
+
/* spinlock */
ERTS_GLB_INLINE void
@@ -2426,7 +3165,7 @@ erts_spin_unlock(erts_spinlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_spin_lock_x(erts_spinlock_t *lock, char *file, unsigned int line)
#else
erts_spin_lock(erts_spinlock_t *lock)
@@ -2434,8 +3173,12 @@ erts_spin_lock(erts_spinlock_t *lock)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_x(&lock->lc,file,line);
+#else
erts_lc_lock(&lock->lc);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock(&lock->lcnt);
#endif
@@ -2545,7 +3288,7 @@ erts_read_unlock(erts_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_read_lock_x(erts_rwlock_t *lock, char *file, unsigned int line)
#else
erts_read_lock(erts_rwlock_t *lock)
@@ -2553,8 +3296,12 @@ erts_read_lock(erts_rwlock_t *lock)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_flg_x(&lock->lc, ERTS_LC_FLG_LO_READ,file,line);
+#else
erts_lc_lock_flg(&lock->lc, ERTS_LC_FLG_LO_READ);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock_opt(&lock->lcnt, ERTS_LCNT_LO_READ);
#endif
@@ -2584,7 +3331,7 @@ erts_write_unlock(erts_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-#ifdef ERTS_ENABLE_LOCK_COUNT
+#ifdef ERTS_ENABLE_LOCK_POSITION
erts_write_lock_x(erts_rwlock_t *lock, char *file, unsigned int line)
#else
erts_write_lock(erts_rwlock_t *lock)
@@ -2592,8 +3339,12 @@ erts_write_lock(erts_rwlock_t *lock)
{
#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_CHECK
+#ifdef ERTS_ENABLE_LOCK_POSITION
+ erts_lc_lock_flg_x(&lock->lc, ERTS_LC_FLG_LO_READ_WRITE,file,line);
+#else
erts_lc_lock_flg(&lock->lc, ERTS_LC_FLG_LO_READ_WRITE);
#endif
+#endif
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_lock_opt(&lock->lcnt, ERTS_LCNT_LO_READ_WRITE);
#endif
@@ -2635,10 +3386,10 @@ erts_lc_rwlock_is_rwlocked(erts_rwlock_t *lock)
}
ERTS_GLB_INLINE void
-erts_tsd_key_create(erts_tsd_key_t *keyp)
+erts_tsd_key_create(erts_tsd_key_t *keyp, char *keyname)
{
#ifdef USE_THREADS
- int res = ethr_tsd_key_create(keyp);
+ int res = ethr_tsd_key_create(keyp, keyname);
if (res)
erts_thr_fatal_error(res, "create thread specific data key");
#endif
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index ff7fdfcfca..ea5c850a30 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1999-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1999-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -151,6 +151,11 @@ do { \
message dispatcher thread takes care of that). */
#define ERTS_GET_TRACER_REF(RES, TPID, TRACEE_FLGS) \
do { (RES) = (TPID); } while(0)
+int
+erts_is_tracer_proc_valid(Process* p)
+{
+ return 1;
+}
#else
#define ERTS_NULL_TRACER_REF NULL
#define ERTS_TRACER_REF_TYPE Process *
@@ -163,6 +168,20 @@ do { \
return; \
} \
} while (0)
+int
+erts_is_tracer_proc_valid(Process* p)
+{
+ Process* tracer;
+
+ tracer = erts_proc_lookup(ERTS_TRACER_PROC(p));
+ if (tracer && ERTS_TRACE_FLAGS(tracer) & F_TRACER) {
+ return 1;
+ } else {
+ ERTS_TRACER_PROC(p) = NIL;
+ ERTS_TRACE_FLAGS(p) = ~TRACEE_FLAGS;
+ return 0;
+ }
+}
#endif
static Uint active_sched;
@@ -2505,7 +2524,7 @@ monitor_large_heap(Process *p) {
#ifndef ERTS_SMP
ASSERT(is_internal_pid(system_monitor));
monitor_p = erts_proc_lookup(system_monitor);
- if (monitor_p || p == monitor_p) {
+ if (!monitor_p || p == monitor_p) {
return;
}
#endif
@@ -3309,6 +3328,8 @@ sys_msg_dispatcher_func(void *unused)
if (erts_thr_progress_update(NULL))
erts_thr_progress_leader_update(NULL);
+ ERTS_SCHED_FAIR_YIELD();
+
#ifdef DEBUG_PRINTOUTS
print_msg_type(smqp);
#endif
@@ -3467,12 +3488,20 @@ static void
init_sys_msg_dispatcher(void)
{
erts_smp_thr_opts_t thr_opts = ERTS_SMP_THR_OPTS_DEFAULT_INITER;
+#ifdef __OSE__
+ thr_opts.coreNo = 0;
+#endif
thr_opts.detached = 1;
init_smq_element_alloc();
sys_message_queue = NULL;
sys_message_queue_end = NULL;
erts_smp_cnd_init(&smq_cnd);
erts_smp_mtx_init(&smq_mtx, "sys_msg_q");
+
+#ifdef ETHR_HAVE_THREAD_NAMES
+ thr_opts.name = "sys_msg_dispatcher";
+#endif
+
erts_smp_thr_create(&sys_msg_dispatcher_tid,
sys_msg_dispatcher_func,
NULL,
diff --git a/erts/emulator/beam/erl_trace.h b/erts/emulator/beam/erl_trace.h
index 853c6cb0d8..4f2c70d6e7 100644
--- a/erts/emulator/beam/erl_trace.h
+++ b/erts/emulator/beam/erl_trace.h
@@ -39,6 +39,7 @@ void erts_change_default_tracing(int setflags, Uint *flagsp, Eterm *tracerp);
void erts_get_default_tracing(Uint *flagsp, Eterm *tracerp);
void erts_set_system_monitor(Eterm monitor);
Eterm erts_get_system_monitor(void);
+int erts_is_tracer_proc_valid(Process* p);
#ifdef ERTS_SMP
void erts_check_my_tracer_proc(Process *);
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index 569c0a7d31..f8e1431a53 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -1984,9 +1984,21 @@ BIF_RETTYPE binary_to_existing_atom_2(BIF_ALIST_2)
* string routines, that will certainly fail on some OS.
*/
-char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_size, ErtsAlcType_t alloc_type, int allow_empty, int allow_atom, Sint *used)
+char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, int allow_empty,
+ int allow_atom, Sint *used)
{
int encoding = erts_get_native_filename_encoding();
+ return erts_convert_filename_to_encoding(name, statbuf, statbuf_size, alloc_type,
+ allow_empty, allow_atom, encoding,
+ used, 0);
+}
+
+char *erts_convert_filename_to_encoding(Eterm name, char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, int allow_empty,
+ int allow_atom, int encoding, Sint *used,
+ Uint extra)
+{
char* name_buf = NULL;
if ((allow_atom && is_atom(name)) ||
@@ -1998,13 +2010,14 @@ char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_
}
if (encoding == ERL_FILENAME_WIN_WCHAR) {
need += 2;
+ extra *= 2;
} else {
++need;
}
if (used)
*used = (Sint) need;
- if (need > statbuf_size) {
- name_buf = (char *) erts_alloc(alloc_type, need);
+ if (need+extra > statbuf_size) {
+ name_buf = (char *) erts_alloc(alloc_type, need+extra);
} else {
name_buf = statbuf;
}
@@ -2016,52 +2029,27 @@ char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_
} else if (is_binary(name)) {
byte *temp_alloc = NULL;
byte *bytes;
- byte *err_pos;
- Uint size,num_chars;
+ Uint size;
size = binary_size(name);
bytes = erts_get_aligned_binary_bytes(name, &temp_alloc);
+
if (encoding != ERL_FILENAME_WIN_WCHAR) {
/*Add 0 termination only*/
if (used)
*used = (Sint) size+1;
- if (size+1 > statbuf_size) {
- name_buf = (char *) erts_alloc(alloc_type, size+1);
+ if (size+1+extra > statbuf_size) {
+ name_buf = (char *) erts_alloc(alloc_type, size+1+extra);
} else {
name_buf = statbuf;
}
memcpy(name_buf,bytes,size);
name_buf[size]=0;
- } else if (erts_analyze_utf8(bytes,size,&err_pos,&num_chars,NULL) != ERTS_UTF8_OK ||
- erts_get_user_requested_filename_encoding() == ERL_FILENAME_LATIN1) {
- byte *p;
- /* What to do now? Maybe latin1, so just take byte for byte instead */
- if (used)
- *used = (Sint) (size+1)*2;
- if ((size+1)*2 > statbuf_size) {
- name_buf = (char *) erts_alloc(alloc_type, (size+1)*2);
- } else {
- name_buf = statbuf;
- }
- p = (byte *) name_buf;
- while (size--) {
- *p++ = *bytes++;
- *p++ = 0;
- }
- *p++ = 0;
- *p++ = 0;
- } else { /* WIN_WCHAR and valid UTF8 */
- if (used)
- *used = (Sint) (num_chars+1)*2;
- if ((num_chars+1)*2 > statbuf_size) {
- name_buf = (char *) erts_alloc(alloc_type, (num_chars+1)*2);
- } else {
- name_buf = statbuf;
- }
- erts_copy_utf8_to_utf16_little((byte *) name_buf, bytes, num_chars);
- name_buf[num_chars*2] = 0;
- name_buf[num_chars*2+1] = 0;
- }
+ } else {
+ name_buf = erts_convert_filename_to_wchar(bytes, size,
+ statbuf, statbuf_size,
+ alloc_type, used, extra);
+ }
erts_free_aligned_binary_bytes(temp_alloc);
} else {
return NULL;
@@ -2069,6 +2057,50 @@ char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_
return name_buf;
}
+char* erts_convert_filename_to_wchar(byte* bytes, Uint size,
+ char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, Sint* used,
+ Uint extra_wchars)
+{
+ byte *err_pos;
+ Uint num_chars;
+ char* name_buf = NULL;
+ Sint need;
+ char *p;
+
+ if (erts_analyze_utf8(bytes,size,&err_pos,&num_chars,NULL) != ERTS_UTF8_OK ||
+ erts_get_user_requested_filename_encoding() == ERL_FILENAME_LATIN1) {
+
+ /* What to do now? Maybe latin1, so just take byte for byte instead */
+ need = (Sint) (size + extra_wchars + 1) * 2;
+ if (need > statbuf_size) {
+ name_buf = (char *) erts_alloc(alloc_type, need);
+ } else {
+ name_buf = statbuf;
+ }
+ p = name_buf;
+ while (size--) {
+ *p++ = *bytes++;
+ *p++ = 0;
+ }
+ } else { /* WIN_WCHAR and valid UTF8 */
+ need = (Sint) (num_chars + extra_wchars + 1) * 2;
+ if (need > statbuf_size) {
+ name_buf = (char *) erts_alloc(alloc_type, need);
+ } else {
+ name_buf = statbuf;
+ }
+ erts_copy_utf8_to_utf16_little((byte *) name_buf, bytes, num_chars);
+ p = name_buf + num_chars*2;
+ }
+ *p++ = 0;
+ *p++ = 0;
+ if (used)
+ *used = p - name_buf;
+ return name_buf;
+}
+
+
static int filename_len_16bit(byte *str)
{
byte *p = str;
@@ -2094,6 +2126,8 @@ Eterm erts_convert_native_to_filename(Process *p, byte *bytes)
mac = 1;
case ERL_FILENAME_UTF8:
size = strlen((char *) bytes);
+ if (size == 0)
+ return NIL;
if (erts_analyze_utf8(bytes,size,&err_pos,&num_chars,NULL) != ERTS_UTF8_OK) {
goto noconvert;
}
@@ -2148,16 +2182,31 @@ Sint erts_native_filename_need(Eterm ioterm, int encoding)
ap = atom_tab(atom_val(ioterm));
switch (encoding) {
case ERL_FILENAME_LATIN1:
- need = ap->len;
+ need = ap->latin1_chars; /* May be -1 */
break;
case ERL_FILENAME_UTF8_MAC:
case ERL_FILENAME_UTF8:
- for (i = 0; i < ap->len; i++) {
- need += (ap->name[i] >= 0x80) ? 2 : 1;
- }
+ need = ap->len;
break;
case ERL_FILENAME_WIN_WCHAR:
- need = 2*(ap->len);
+ if (ap->latin1_chars >= 0) {
+ need = 2* ap->latin1_chars;
+ }
+ else {
+ for (i = 0; i < ap->len; ) {
+ if (ap->name[i] < 0x80) {
+ i++;
+ } else if (ap->name[i] < 0xE0) {
+ i += 2;
+ } else if (ap->name[i] < 0xF0) {
+ i += 3;
+ } else {
+ need = -1;
+ break;
+ }
+ need += 2;
+ }
+ }
break;
default:
need = -1;
@@ -2287,26 +2336,36 @@ void erts_native_filename_put(Eterm ioterm, int encoding, byte *p)
switch (encoding) {
case ERL_FILENAME_LATIN1:
for (i = 0; i < ap->len; i++) {
- *p++ = ap->name[i];
- }
- break;
- case ERL_FILENAME_UTF8_MAC:
- case ERL_FILENAME_UTF8:
- for (i = 0; i < ap->len; i++) {
- if(ap->name[i] < 0x80) {
+ if (ap->name[i] < 0x80) {
*p++ = ap->name[i];
} else {
- *p++ = (((ap->name[i]) >> 6) | ((byte) 0xC0));
- *p++ = (((ap->name[i]) & 0x3F) | ((byte) 0x80));
+ ASSERT(ap->name[i] < 0xC4);
+ *p++ = ((ap->name[i] & 3) << 6) | (ap->name[i+1] & 0x3F);
+ i++;
}
}
break;
+ case ERL_FILENAME_UTF8_MAC:
+ case ERL_FILENAME_UTF8:
+ sys_memcpy(p, ap->name, ap->len);
+ break;
case ERL_FILENAME_WIN_WCHAR:
for (i = 0; i < ap->len; i++) {
/* Little endian */
- *p++ = ap->name[i];
- *p++ = 0;
- }
+ if (ap->name[i] < 0x80) {
+ *p++ = ap->name[i];
+ *p++ = 0;
+ } else if (ap->name[i] < 0xE0) {
+ *p++ = ((ap->name[i] & 3) << 6) | (ap->name[i+1] & 0x3F);
+ *p++ = ((ap->name[i] & 0x1C) >> 2);
+ i++;
+ } else {
+ ASSERT(ap->name[i] < 0xF0);
+ *p++ = ((ap->name[i+1] & 3) << 6) | (ap->name[i+2] & 0x3C);
+ *p++ = ((ap->name[i] & 0xF) << 4) | ((ap->name[i+1] & 0x3C) >> 2);
+ i += 2;
+ }
+ }
break;
default:
ASSERT(0);
diff --git a/erts/emulator/beam/erl_utils.h b/erts/emulator/beam/erl_utils.h
index 292d135946..c32f8fd61c 100644
--- a/erts/emulator/beam/erl_utils.h
+++ b/erts/emulator/beam/erl_utils.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2012-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2012-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -32,11 +32,7 @@ typedef struct {
#endif
union {
Uint64 not_atomic;
-#ifdef ARCH_64
- erts_atomic_t atomic;
-#else
- erts_dw_atomic_t atomic;
-#endif
+ erts_atomic64_t atomic;
} counter;
} erts_interval_t;
@@ -50,9 +46,6 @@ Uint64 erts_ensure_later_interval_nob(erts_interval_t *, Uint64);
Uint64 erts_ensure_later_interval_acqb(erts_interval_t *, Uint64);
Uint64 erts_smp_ensure_later_interval_nob(erts_interval_t *, Uint64);
Uint64 erts_smp_ensure_later_interval_acqb(erts_interval_t *, Uint64);
-#ifdef ARCH_32
-ERTS_GLB_INLINE Uint64 erts_interval_dw_aint_to_val__(erts_dw_aint_t *);
-#endif
ERTS_GLB_INLINE Uint64 erts_current_interval_nob__(erts_interval_t *);
ERTS_GLB_INLINE Uint64 erts_current_interval_acqb__(erts_interval_t *);
ERTS_GLB_INLINE Uint64 erts_current_interval_nob(erts_interval_t *);
@@ -62,46 +55,16 @@ ERTS_GLB_INLINE Uint64 erts_smp_current_interval_acqb(erts_interval_t *);
#if ERTS_GLB_INLINE_INCL_FUNC_DEF
-#ifdef ARCH_32
-
-ERTS_GLB_INLINE Uint64
-erts_interval_dw_aint_to_val__(erts_dw_aint_t *dw)
-{
-#ifdef ETHR_SU_DW_NAINT_T__
- return (Uint64) dw->dw_sint;
-#else
- Uint64 res;
- res = (Uint64) ((Uint32) dw->sint[ERTS_DW_AINT_HIGH_WORD]);
- res <<= 32;
- res |= (Uint64) ((Uint32) dw->sint[ERTS_DW_AINT_LOW_WORD]);
- return res;
-#endif
-}
-
-#endif
-
ERTS_GLB_INLINE Uint64
erts_current_interval_nob__(erts_interval_t *icp)
{
-#ifdef ARCH_64
- return (Uint64) erts_atomic_read_nob(&icp->counter.atomic);
-#else
- erts_dw_aint_t dw;
- erts_dw_atomic_read_nob(&icp->counter.atomic, &dw);
- return erts_interval_dw_aint_to_val__(&dw);
-#endif
+ return (Uint64) erts_atomic64_read_nob(&icp->counter.atomic);
}
ERTS_GLB_INLINE Uint64
erts_current_interval_acqb__(erts_interval_t *icp)
{
-#ifdef ARCH_64
- return (Uint64) erts_atomic_read_acqb(&icp->counter.atomic);
-#else
- erts_dw_aint_t dw;
- erts_dw_atomic_read_acqb(&icp->counter.atomic, &dw);
- return erts_interval_dw_aint_to_val__(&dw);
-#endif
+ return (Uint64) erts_atomic64_read_acqb(&icp->counter.atomic);
}
ERTS_GLB_INLINE Uint64
@@ -150,7 +113,7 @@ void erts_silence_warn_unused_result(long unused);
int erts_fit_in_bits_int64(Sint64);
int erts_fit_in_bits_int32(Sint32);
-int list_length(Eterm);
+int erts_list_length(Eterm);
int erts_is_builtin(Eterm, Eterm, int);
Uint32 make_broken_hash(Eterm);
Uint32 block_hash(byte *, unsigned, Uint32);
@@ -202,23 +165,38 @@ int eq(Eterm, Eterm);
#define EQ(x,y) (((x) == (y)) || (is_not_both_immed((x),(y)) && eq((x),(y))))
#if HALFWORD_HEAP
-Sint cmp_rel(Eterm, Eterm*, Eterm, Eterm*);
-#define CMP(A,B) cmp_rel(A,NULL,B,NULL)
+Sint erts_cmp_rel_opt(Eterm, Eterm*, Eterm, Eterm*, int);
+#define cmp_rel(A,A_BASE,B,B_BASE) erts_cmp_rel_opt(A,A_BASE,B,B_BASE,0)
+#define cmp_rel_term(A,A_BASE,B,B_BASE) erts_cmp_rel_opt(A,A_BASE,B,B_BASE,1)
+#define CMP(A,B) erts_cmp_rel_opt(A,NULL,B,NULL,0)
+#define CMP_TERM(A,B) erts_cmp_rel_opt(A,NULL,B,NULL,1)
#else
Sint cmp(Eterm, Eterm);
-#define cmp_rel(A,A_BASE,B,B_BASE) cmp(A,B)
-#define CMP(A,B) cmp(A,B)
+Sint erts_cmp(Eterm, Eterm, int);
+#define cmp_rel(A,A_BASE,B,B_BASE) erts_cmp(A,B,0)
+#define cmp_rel_term(A,A_BASE,B,B_BASE) erts_cmp(A,B,1)
+#define CMP(A,B) erts_cmp(A,B,0)
+#define CMP_TERM(A,B) erts_cmp(A,B,1)
#endif
-#define cmp_lt(a,b) (CMP((a),(b)) < 0)
-#define cmp_le(a,b) (CMP((a),(b)) <= 0)
-#define cmp_eq(a,b) (CMP((a),(b)) == 0)
-#define cmp_ne(a,b) (CMP((a),(b)) != 0)
-#define cmp_ge(a,b) (CMP((a),(b)) >= 0)
-#define cmp_gt(a,b) (CMP((a),(b)) > 0)
-
-#define CMP_LT(a,b) ((a) != (b) && cmp_lt((a),(b)))
-#define CMP_GE(a,b) ((a) == (b) || cmp_ge((a),(b)))
-#define CMP_EQ(a,b) ((a) == (b) || cmp_eq((a),(b)))
-#define CMP_NE(a,b) ((a) != (b) && cmp_ne((a),(b)))
+
+#define cmp_lt(a,b) (CMP((a),(b)) < 0)
+#define cmp_le(a,b) (CMP((a),(b)) <= 0)
+#define cmp_eq(a,b) (CMP((a),(b)) == 0)
+#define cmp_ne(a,b) (CMP((a),(b)) != 0)
+#define cmp_ge(a,b) (CMP((a),(b)) >= 0)
+#define cmp_gt(a,b) (CMP((a),(b)) > 0)
+
+#define cmp_lt_term(a,b) (CMP_TERM((a),(b)) < 0)
+#define cmp_le_term(a,b) (CMP_TERM((a),(b)) <= 0)
+#define cmp_ge_term(a,b) (CMP_TERM((a),(b)) >= 0)
+#define cmp_gt_term(a,b) (CMP_TERM((a),(b)) > 0)
+
+#define CMP_LT(a,b) ((a) != (b) && cmp_lt((a),(b)))
+#define CMP_GE(a,b) ((a) == (b) || cmp_ge((a),(b)))
+#define CMP_EQ(a,b) ((a) == (b) || cmp_eq((a),(b)))
+#define CMP_NE(a,b) ((a) != (b) && cmp_ne((a),(b)))
+
+#define CMP_LT_TERM(a,b) ((a) != (b) && cmp_lt_term((a),(b)))
+#define CMP_GE_TERM(a,b) ((a) == (b) || cmp_ge_term((a),(b)))
#endif
diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h
index 337422eead..6687b044ee 100644
--- a/erts/emulator/beam/erl_vm.h
+++ b/erts/emulator/beam/erl_vm.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -46,7 +46,6 @@
heap data on the C stack or if we use the buffers in the scheduler data. */
#define TMP_HEAP_SIZE 128 /* Number of Eterm in the schedulers
small heap for transient heap data */
-#define CMP_TMP_HEAP_SIZE 32 /* cmp wants its own tmp-heap... */
#define ERL_ARITH_TMP_HEAP_SIZE 4 /* as does erl_arith... */
#define BEAM_EMU_TMP_HEAP_SIZE 2 /* and beam_emu... */
@@ -175,6 +174,7 @@ extern int H_MIN_SIZE; /* minimum (heap + stack) */
extern int BIN_VH_MIN_SIZE; /* minimum virtual (bin) heap */
extern int erts_atom_table_size;/* Atom table size */
+extern int erts_pd_initial_size;/* Initial Process dictionary table size */
#define ORIG_CREATION 0
#define INTERNAL_CREATION 255
diff --git a/erts/emulator/beam/erl_zlib.c b/erts/emulator/beam/erl_zlib.c
index 47fd92988e..8e33144f96 100644
--- a/erts/emulator/beam/erl_zlib.c
+++ b/erts/emulator/beam/erl_zlib.c
@@ -87,6 +87,46 @@ int ZEXPORT erl_zlib_deflate_finish(z_stream *streamp)
return deflateEnd(streamp);
}
+int ZEXPORT erl_zlib_inflate_start(z_stream *streamp, const Bytef* source,
+ uLong sourceLen)
+{
+ streamp->next_in = (Bytef*)source;
+ streamp->avail_in = (uInt)sourceLen;
+ streamp->total_out = streamp->avail_out = 0;
+ streamp->next_out = NULL;
+ erl_zlib_alloc_init(streamp);
+ return inflateInit(streamp);
+}
+/*
+ * Inflate a chunk, The destination length is the limit.
+ * Returns Z_OK if more to process, Z_STREAM_END if we are done.
+ */
+int ZEXPORT erl_zlib_inflate_chunk(z_stream *streamp, Bytef* dest, uLongf* destLen)
+{
+ int err;
+ uLongf last_tot = streamp->total_out;
+
+ streamp->next_out = dest;
+ streamp->avail_out = (uInt)*destLen;
+
+ if ((uLong)streamp->avail_out != *destLen) return Z_BUF_ERROR;
+
+ err = inflate(streamp, Z_NO_FLUSH);
+ ASSERT(err != Z_STREAM_ERROR);
+ *destLen = streamp->total_out - last_tot;
+ return err;
+}
+
+/*
+ * When we are done, free up the inflate structure
+ * Retyurns Z_OK or Error
+ */
+int ZEXPORT erl_zlib_inflate_finish(z_stream *streamp)
+{
+ return inflateEnd(streamp);
+}
+
+
int ZEXPORT erl_zlib_compress2 (Bytef* dest, uLongf* destLen,
const Bytef* source, uLong sourceLen,
int level)
diff --git a/erts/emulator/beam/erl_zlib.h b/erts/emulator/beam/erl_zlib.h
index 5ac849d21c..160166c66b 100644
--- a/erts/emulator/beam/erl_zlib.h
+++ b/erts/emulator/beam/erl_zlib.h
@@ -39,6 +39,12 @@ int ZEXPORT erl_zlib_deflate_start(z_stream *streamp, const Bytef* source,
int ZEXPORT erl_zlib_deflate_chunk(z_stream *streamp, Bytef* dest, uLongf* destLen);
int ZEXPORT erl_zlib_deflate_finish(z_stream *streamp);
+int ZEXPORT erl_zlib_inflate_start(z_stream *streamp, const Bytef* source,
+ uLong sourceLen);
+int ZEXPORT erl_zlib_inflate_chunk(z_stream *streamp, Bytef* dest, uLongf* destLen);
+int ZEXPORT erl_zlib_inflate_finish(z_stream *streamp);
+
+
/* Use instead of compress
*/
#define erl_zlib_compress(dest,destLen,source,sourceLen) \
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 22b0a02937..45d1f7514e 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -42,10 +42,8 @@
#include "erl_binary.h"
#include "erl_bits.h"
#include "erl_zlib.h"
+#include "erl_map.h"
-#ifdef HIPE
-#include "hipe_mode_switch.h"
-#endif
#define in_area(ptr,start,nbytes) ((UWord)((char*)(ptr) - (char*)(start)) < (nbytes))
#define MAX_STRING_LEN 0xffff
@@ -61,6 +59,9 @@
*/
# define ERTS_DEBUG_USE_DIST_SEP
# endif
+# define IF_DEBUG(X) X
+#else
+# define IF_DEBUG(X)
#endif
/* Does Sint fit in Sint32?
@@ -84,38 +85,40 @@
static Export term_to_binary_trap_export;
static byte* enc_term(ErtsAtomCacheMap *, Eterm, byte*, Uint32, struct erl_off_heap_header** off_heap);
-static int enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
+struct TTBEncodeContext_;
+static int enc_term_int(struct TTBEncodeContext_*,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
struct erl_off_heap_header** off_heap, Sint *reds, byte **res);
static Uint is_external_string(Eterm obj, int* p_is_string);
static byte* enc_atom(ErtsAtomCacheMap *, Eterm, byte*, Uint32);
static byte* enc_pid(ErtsAtomCacheMap *, Eterm, byte*, Uint32);
-static byte* dec_term(ErtsDistExternal *, Eterm**, byte*, ErlOffHeap*, Eterm*);
+struct B2TContext_t;
+static byte* dec_term(ErtsDistExternal *, Eterm**, byte*, ErlOffHeap*, Eterm*, struct B2TContext_t*);
static byte* dec_atom(ErtsDistExternal *, byte*, Eterm*);
static byte* dec_pid(ErtsDistExternal *, Eterm**, byte*, ErlOffHeap*, Eterm*);
-static Sint decoded_size(byte *ep, byte* endp, int internal_tags);
+static Sint decoded_size(byte *ep, byte* endp, int internal_tags, struct B2TContext_t*);
static BIF_RETTYPE term_to_binary_trap_1(BIF_ALIST_1);
static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint flags,
Binary *context_b);
static Uint encode_size_struct2(ErtsAtomCacheMap *, Eterm, unsigned);
-static int encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
+struct TTBSizeContext_;
+static int encode_size_struct_int(struct TTBSizeContext_*, ErtsAtomCacheMap *acmp, Eterm obj,
unsigned dflags, Sint *reds, Uint *res);
+static Export binary_to_term_trap_export;
+static BIF_RETTYPE binary_to_term_trap_1(BIF_ALIST_1);
+static BIF_RETTYPE binary_to_term_int(Process* p, Uint32 flags, Eterm bin, Binary* context_b,
+ Export *bif, Eterm arg0, Eterm arg1);
+
void erts_init_external(void) {
-#if 1 /* In R16 */
erts_init_trap_export(&term_to_binary_trap_export,
- am_erlang, am_term_to_binary_trap, 1,
+ am_erts_internal, am_term_to_binary_trap, 1,
&term_to_binary_trap_1);
-#else
- sys_memset((void *) &term_to_binary_trap_export, 0, sizeof(Export));
- term_to_binary_trap_export.address = &term_to_binary_trap_export.code[3];
- term_to_binary_trap_export.code[0] = am_erlang;
- term_to_binary_trap_export.code[1] = am_term_to_binary_trap;
- term_to_binary_trap_export.code[2] = 1;
- term_to_binary_trap_export.code[3] = (BeamInstr) em_apply_bif;
- term_to_binary_trap_export.code[4] = (BeamInstr) &term_to_binary_trap_1;
-#endif
+
+ erts_init_trap_export(&binary_to_term_trap_export,
+ am_erts_internal, am_binary_to_term_trap, 1,
+ &binary_to_term_trap_1);
return;
}
@@ -514,7 +517,7 @@ Uint erts_encode_ext_size(Eterm term)
Uint erts_encode_ext_size_2(Eterm term, unsigned dflags)
{
- return encode_size_struct2(NULL, term, TERM_TO_BINARY_DFLAGS|dflags)
+ return encode_size_struct2(NULL, term, dflags)
+ 1 /* VERSION_MAGIC */;
}
@@ -877,7 +880,7 @@ erts_decode_dist_ext_size(ErtsDistExternal *edep)
goto fail;
ep = edep->extp+1;
}
- res = decoded_size(ep, edep->ext_endp, 0);
+ res = decoded_size(ep, edep->ext_endp, 0, NULL);
if (res >= 0)
return res;
fail:
@@ -889,12 +892,12 @@ Sint erts_decode_ext_size(byte *ext, Uint size)
{
if (size == 0 || *ext != VERSION_MAGIC)
return -1;
- return decoded_size(ext+1, ext+size, 0);
+ return decoded_size(ext+1, ext+size, 0, NULL);
}
Sint erts_decode_ext_size_ets(byte *ext, Uint size)
{
- Sint sz = decoded_size(ext, ext+size, 1);
+ Sint sz = decoded_size(ext, ext+size, 1, NULL);
ASSERT(sz >= 0);
return sz;
}
@@ -927,7 +930,7 @@ erts_decode_dist_ext(Eterm** hpp,
goto error;
ep++;
}
- ep = dec_term(edep, hpp, ep, off_heap, &obj);
+ ep = dec_term(edep, hpp, ep, off_heap, &obj, NULL);
if (!ep)
goto error;
@@ -948,7 +951,7 @@ Eterm erts_decode_ext(Eterm **hpp, ErlOffHeap *off_heap, byte **ext)
byte *ep = *ext;
if (*ep++ != VERSION_MAGIC)
return THE_NON_VALUE;
- ep = dec_term(NULL, hpp, ep, off_heap, &obj);
+ ep = dec_term(NULL, hpp, ep, off_heap, &obj, NULL);
if (!ep) {
#ifdef DEBUG
bin_write(ERTS_PRINT_STDERR,NULL,*ext,500);
@@ -962,7 +965,7 @@ Eterm erts_decode_ext(Eterm **hpp, ErlOffHeap *off_heap, byte **ext)
Eterm erts_decode_ext_ets(Eterm **hpp, ErlOffHeap *off_heap, byte *ext)
{
Eterm obj;
- ext = dec_term(NULL, hpp, ext, off_heap, &obj);
+ ext = dec_term(NULL, hpp, ext, off_heap, &obj, NULL);
ASSERT(ext);
return obj;
}
@@ -1043,22 +1046,33 @@ static BIF_RETTYPE term_to_binary_trap_1(BIF_ALIST_1)
Binary *bin = ((ProcBin *) binary_val(bt))->val;
Eterm res = erts_term_to_binary_int(BIF_P, Term, 0, 0,bin);
if (is_tuple(res)) {
+ ASSERT(BIF_P->flags & F_DISABLE_GC);
BIF_TRAP1(&term_to_binary_trap_export,BIF_P,res);
} else {
- BIF_RET(res);
+ if (erts_set_gc_state(BIF_P, 1)
+ || MSO(BIF_P).overhead > BIN_VHEAP_SZ(BIF_P))
+ ERTS_BIF_YIELD_RETURN(BIF_P, res);
+ else
+ BIF_RET(res);
}
}
-
+
+HIPE_WRAPPER_BIF_DISABLE_GC(term_to_binary, 1)
+
BIF_RETTYPE term_to_binary_1(BIF_ALIST_1)
{
Eterm res = erts_term_to_binary_int(BIF_P, BIF_ARG_1, 0, TERM_TO_BINARY_DFLAGS, NULL);
if (is_tuple(res)) {
+ erts_set_gc_state(BIF_P, 0);
BIF_TRAP1(&term_to_binary_trap_export,BIF_P,res);
} else {
+ ASSERT(!(BIF_P->flags & F_DISABLE_GC));
BIF_RET(res);
}
}
+HIPE_WRAPPER_BIF_DISABLE_GC(term_to_binary, 2)
+
BIF_RETTYPE term_to_binary_2(BIF_ALIST_2)
{
Process* p = BIF_P;
@@ -1067,7 +1081,6 @@ BIF_RETTYPE term_to_binary_2(BIF_ALIST_2)
int level = 0;
Uint flags = TERM_TO_BINARY_DFLAGS;
Eterm res;
- Binary *bin = NULL;
while (is_list(Flags)) {
Eterm arg = CAR(list_val(Flags));
@@ -1078,10 +1091,10 @@ BIF_RETTYPE term_to_binary_2(BIF_ALIST_2)
if (tp[1] == am_minor_version && is_small(tp[2])) {
switch (signed_val(tp[2])) {
case 0:
- flags = TERM_TO_BINARY_DFLAGS;
+ flags = TERM_TO_BINARY_DFLAGS & ~DFLAG_NEW_FLOATS;
break;
case 1:
- flags = TERM_TO_BINARY_DFLAGS|DFLAG_NEW_FLOATS;
+ flags = TERM_TO_BINARY_DFLAGS;
break;
default:
goto error;
@@ -1104,14 +1117,77 @@ BIF_RETTYPE term_to_binary_2(BIF_ALIST_2)
goto error;
}
- res = erts_term_to_binary_int(p, Term, level, flags, bin);
+ res = erts_term_to_binary_int(p, Term, level, flags, NULL);
if (is_tuple(res)) {
+ erts_set_gc_state(p, 0);
BIF_TRAP1(&term_to_binary_trap_export,BIF_P,res);
} else {
+ ASSERT(!(BIF_P->flags & F_DISABLE_GC));
BIF_RET(res);
}
}
+
+enum B2TState { /* order is somewhat significant */
+ B2TPrepare,
+ B2TUncompressChunk,
+ B2TSizeInit,
+ B2TSize,
+ B2TDecodeInit,
+ B2TDecode,
+ B2TDecodeList,
+ B2TDecodeTuple,
+ B2TDecodeString,
+ B2TDecodeBinary,
+
+ B2TDone,
+ B2TDecodeFail,
+ B2TBadArg
+};
+
+typedef struct {
+ int heap_size;
+ int terms;
+ byte* ep;
+ int atom_extra_skip;
+} B2TSizeContext;
+
+typedef struct {
+ byte* ep;
+ Eterm res;
+ Eterm* next;
+ Eterm* hp_start;
+ Eterm* hp;
+ Eterm* hp_end;
+ int remaining_n;
+ char* remaining_bytes;
+ Eterm* maps_head;
+} B2TDecodeContext;
+
+typedef struct {
+ z_stream stream;
+ byte* dbytes;
+ Uint dleft;
+} B2TUncompressContext;
+
+typedef struct B2TContext_t {
+ Sint heap_size;
+ byte* aligned_alloc;
+ ErtsBinary2TermState b2ts;
+ Uint32 flags;
+ SWord reds;
+ Eterm trap_bin;
+ Export *bif;
+ Eterm arg[2];
+ enum B2TState state;
+ union {
+ B2TSizeContext sc;
+ B2TDecodeContext dc;
+ B2TUncompressContext uc;
+ } u;
+} B2TContext;
+
+
static uLongf binary2term_uncomp_size(byte* data, Sint size)
{
z_stream stream;
@@ -1141,48 +1217,62 @@ static uLongf binary2term_uncomp_size(byte* data, Sint size)
return err == Z_STREAM_END ? uncomp_size : 0;
}
-static ERTS_INLINE Sint
-binary2term_prepare(ErtsBinary2TermState *state, byte *data, Sint data_size)
+static ERTS_INLINE int
+binary2term_prepare(ErtsBinary2TermState *state, byte *data, Sint data_size,
+ B2TContext* ctx)
{
- Sint res;
byte *bytes = data;
Sint size = data_size;
state->exttmp = 0;
if (size < 1 || *bytes != VERSION_MAGIC) {
- error:
- if (state->exttmp)
- erts_free(ERTS_ALC_T_TMP, state->extp);
- state->extp = NULL;
- state->exttmp = 0;
return -1;
}
bytes++;
size--;
if (size < 5 || *bytes != COMPRESSED) {
state->extp = bytes;
+ if (ctx)
+ ctx->state = B2TSizeInit;
}
else {
uLongf dest_len = (Uint32) get_int32(bytes+1);
bytes += 5;
size -= 5;
if (dest_len > 32*1024*1024
- || (state->extp = erts_alloc_fnf(ERTS_ALC_T_TMP, dest_len)) == NULL) {
+ || (state->extp = erts_alloc_fnf(ERTS_ALC_T_EXT_TERM_DATA, dest_len)) == NULL) {
+ /*
+ * Try avoid out-of-memory crash due to corrupted 'dest_len'
+ * by checking the actual length of the uncompressed data.
+ * The only way to do that is to uncompress it. Sad but true.
+ */
if (dest_len != binary2term_uncomp_size(bytes, size)) {
- goto error;
+ return -1;
}
- state->extp = erts_alloc(ERTS_ALC_T_TMP, dest_len);
+ state->extp = erts_alloc(ERTS_ALC_T_EXT_TERM_DATA, dest_len);
+ ctx->reds -= dest_len;
}
state->exttmp = 1;
- if (erl_zlib_uncompress(state->extp, &dest_len, bytes, size) != Z_OK)
- goto error;
+ if (ctx) {
+ if (erl_zlib_inflate_start(&ctx->u.uc.stream, bytes, size) != Z_OK)
+ return -1;
+
+ ctx->u.uc.dbytes = state->extp;
+ ctx->u.uc.dleft = dest_len;
+ ctx->state = B2TUncompressChunk;
+ }
+ else {
+ uLongf dlen = dest_len;
+ if (erl_zlib_uncompress(state->extp, &dlen, bytes, size) != Z_OK
+ || dlen != dest_len) {
+ return -1;
+ }
+ }
size = (Sint) dest_len;
}
- res = decoded_size(state->extp, state->extp + size, 0);
- if (res < 0)
- goto error;
- return res;
+ state->extsize = size;
+ return 0;
}
static ERTS_INLINE void
@@ -1190,7 +1280,7 @@ binary2term_abort(ErtsBinary2TermState *state)
{
if (state->exttmp) {
state->exttmp = 0;
- erts_free(ERTS_ALC_T_TMP, state->extp);
+ erts_free(ERTS_ALC_T_EXT_TERM_DATA, state->extp);
}
}
@@ -1198,11 +1288,11 @@ static ERTS_INLINE Eterm
binary2term_create(ErtsDistExternal *edep, ErtsBinary2TermState *state, Eterm **hpp, ErlOffHeap *ohp)
{
Eterm res;
- if (!dec_term(edep, hpp, state->extp, ohp, &res))
+ if (!dec_term(edep, hpp, state->extp, ohp, &res, NULL))
res = THE_NON_VALUE;
if (state->exttmp) {
state->exttmp = 0;
- erts_free(ERTS_ALC_T_TMP, state->extp);
+ erts_free(ERTS_ALC_T_EXT_TERM_DATA, state->extp);
}
return res;
}
@@ -1210,7 +1300,18 @@ binary2term_create(ErtsDistExternal *edep, ErtsBinary2TermState *state, Eterm **
Sint
erts_binary2term_prepare(ErtsBinary2TermState *state, byte *data, Sint data_size)
{
- return binary2term_prepare(state, data, data_size);
+ Sint res;
+
+ if (binary2term_prepare(state, data, data_size, NULL) < 0 ||
+ (res=decoded_size(state->extp, state->extp + state->extsize, 0, NULL)) < 0) {
+
+ if (state->exttmp)
+ erts_free(ERTS_ALC_T_EXT_TERM_DATA, state->extp);
+ state->extp = NULL;
+ state->exttmp = 0;
+ return -1;
+ }
+ return res;
}
void
@@ -1225,68 +1326,262 @@ erts_binary2term_create(ErtsBinary2TermState *state, Eterm **hpp, ErlOffHeap *oh
return binary2term_create(NULL,state, hpp, ohp);
}
-BIF_RETTYPE binary_to_term_1(BIF_ALIST_1)
+static void b2t_destroy_context(B2TContext* context)
{
- Sint heap_size;
- Eterm res;
+ erts_free_aligned_binary_bytes_extra(context->aligned_alloc,
+ ERTS_ALC_T_EXT_TERM_DATA);
+ context->aligned_alloc = NULL;
+ binary2term_abort(&context->b2ts);
+ if (context->state == B2TUncompressChunk) {
+ erl_zlib_inflate_finish(&context->u.uc.stream);
+ }
+}
+
+static void b2t_context_destructor(Binary *context_bin)
+{
+ B2TContext* ctx = (B2TContext*) ERTS_MAGIC_BIN_DATA(context_bin);
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(context_bin) == b2t_context_destructor);
+
+ b2t_destroy_context(ctx);
+}
+
+static BIF_RETTYPE binary_to_term_trap_1(BIF_ALIST_1)
+{
+ Binary *context_bin = ((ProcBin *) binary_val(BIF_ARG_1))->val;
+ ASSERT(ERTS_MAGIC_BIN_DESTRUCTOR(context_bin) == b2t_context_destructor);
+
+ return binary_to_term_int(BIF_P, 0, THE_NON_VALUE, context_bin, NULL,
+ THE_NON_VALUE, THE_NON_VALUE);
+}
+
+
+#define B2T_BYTES_PER_REDUCTION 128
+#define B2T_MEMCPY_FACTOR 8
+
+/* Define for testing */
+/*#define EXTREME_B2T_TRAPPING 1*/
+
+#ifdef EXTREME_B2T_TRAPPING
+static unsigned b2t_rand(void)
+{
+ static unsigned prev = 17;
+ prev = (prev * 214013 + 2531011);
+ return prev;
+}
+#endif
+
+
+static B2TContext* b2t_export_context(Process* p, B2TContext* src)
+{
+ Binary* context_b = erts_create_magic_binary(sizeof(B2TContext),
+ b2t_context_destructor);
+ B2TContext* ctx = ERTS_MAGIC_BIN_DATA(context_b);
Eterm* hp;
- Eterm* endp;
- Sint size;
- byte* bytes;
- byte* temp_alloc = NULL;
- ErtsBinary2TermState b2ts;
+ sys_memcpy(ctx, src, sizeof(B2TContext));
+ if (ctx->state >= B2TDecode && ctx->u.dc.next == &src->u.dc.res) {
+ ctx->u.dc.next = &ctx->u.dc.res;
+ }
+ hp = HAlloc(p, PROC_BIN_SIZE);
+ ctx->trap_bin = erts_mk_magic_binary_term(&hp, &MSO(p), context_b);
+ return ctx;
+}
- if ((bytes = erts_get_aligned_binary_bytes(BIF_ARG_1, &temp_alloc)) == NULL) {
- error:
- erts_free_aligned_binary_bytes(temp_alloc);
- BIF_ERROR(BIF_P, BADARG);
+static BIF_RETTYPE binary_to_term_int(Process* p, Uint32 flags, Eterm bin, Binary* context_b,
+ Export *bif_init, Eterm arg0, Eterm arg1)
+{
+ BIF_RETTYPE ret_val;
+#ifdef EXTREME_B2T_TRAPPING
+ SWord initial_reds = 1 + b2t_rand() % 4;
+#else
+ SWord initial_reds = (Uint)(ERTS_BIF_REDS_LEFT(p) * B2T_BYTES_PER_REDUCTION);
+#endif
+ B2TContext c_buff;
+ B2TContext *ctx;
+ int is_first_call;
+
+ if (context_b == NULL) {
+ /* Setup enough to get started */
+ is_first_call = 1;
+ ctx = &c_buff;
+ ctx->state = B2TPrepare;
+ ctx->aligned_alloc = NULL;
+ ctx->flags = flags;
+ ctx->bif = bif_init;
+ ctx->arg[0] = arg0;
+ ctx->arg[1] = arg1;
+ IF_DEBUG(ctx->trap_bin = THE_NON_VALUE;)
+ } else {
+ is_first_call = 0;
+ ctx = ERTS_MAGIC_BIN_DATA(context_b);
+ ASSERT(ctx->state != B2TPrepare);
}
- size = binary_size(BIF_ARG_1);
+ ctx->reds = initial_reds;
+
+ do {
+ switch (ctx->state) {
+ case B2TPrepare: {
+ byte* bytes;
+ Uint bin_size;
+ bytes = erts_get_aligned_binary_bytes_extra(bin,
+ &ctx->aligned_alloc,
+ ERTS_ALC_T_EXT_TERM_DATA,
+ 0);
+ if (bytes == NULL) {
+ ctx->b2ts.exttmp = 0;
+ ctx->state = B2TBadArg;
+ break;
+ }
+ bin_size = binary_size(bin);
+ if (ctx->aligned_alloc) {
+ ctx->reds -= bin_size / 8;
+ }
+ if (binary2term_prepare(&ctx->b2ts, bytes, bin_size, ctx) < 0) {
+ ctx->state = B2TBadArg;
+ }
+ break;
+ }
+ case B2TUncompressChunk: {
+ uLongf chunk = ctx->reds;
+ int zret;
+
+ if (chunk > ctx->u.uc.dleft)
+ chunk = ctx->u.uc.dleft;
+ zret = erl_zlib_inflate_chunk(&ctx->u.uc.stream,
+ ctx->u.uc.dbytes, &chunk);
+ ctx->u.uc.dbytes += chunk;
+ ctx->u.uc.dleft -= chunk;
+ if (zret == Z_OK && ctx->u.uc.dleft > 0) {
+ ctx->reds = 0;
+ }
+ else if (erl_zlib_inflate_finish(&ctx->u.uc.stream) == Z_OK
+ && zret == Z_STREAM_END
+ && ctx->u.uc.dleft == 0) {
+ ctx->reds -= chunk;
+ ctx->state = B2TSizeInit;
+ }
+ else {
+ ctx->state = B2TBadArg;
+ }
+ break;
+ }
+ case B2TSizeInit:
+ ctx->u.sc.ep = NULL;
+ ctx->state = B2TSize;
+ /*fall through*/
+ case B2TSize:
+ ctx->heap_size = decoded_size(ctx->b2ts.extp,
+ ctx->b2ts.extp + ctx->b2ts.extsize,
+ 0, ctx);
+ break;
+
+ case B2TDecodeInit:
+ if (ctx == &c_buff && ctx->b2ts.extsize > ctx->reds) {
+ /* dec_term will maybe trap, allocate space for magic bin
+ before result term to make it easy to trim with HRelease.
+ */
+ ctx = b2t_export_context(p, &c_buff);
+ }
+ ctx->u.dc.ep = ctx->b2ts.extp;
+ ctx->u.dc.res = (Eterm) (UWord) NULL;
+ ctx->u.dc.next = &ctx->u.dc.res;
+ ctx->u.dc.hp_start = HAlloc(p, ctx->heap_size);
+ ctx->u.dc.hp = ctx->u.dc.hp_start;
+ ctx->u.dc.hp_end = ctx->u.dc.hp_start + ctx->heap_size;
+ ctx->u.dc.maps_head = NULL;
+ ctx->state = B2TDecode;
+ /*fall through*/
+ case B2TDecode:
+ case B2TDecodeList:
+ case B2TDecodeTuple:
+ case B2TDecodeString:
+ case B2TDecodeBinary: {
+ ErtsDistExternal fakedep;
+ fakedep.flags = ctx->flags;
+ dec_term(&fakedep, NULL, NULL, &MSO(p), NULL, ctx);
+ break;
+ }
+ case B2TDecodeFail:
+ HRelease(p, ctx->u.dc.hp_end, ctx->u.dc.hp_start);
+ /*fall through*/
+ case B2TBadArg:
+ BUMP_REDS(p, (initial_reds - ctx->reds) / B2T_BYTES_PER_REDUCTION);
- heap_size = binary2term_prepare(&b2ts, bytes, size);
- if (heap_size < 0)
- goto error;
+ ASSERT(ctx->bif == bif_export[BIF_binary_to_term_1]
+ || ctx->bif == bif_export[BIF_binary_to_term_2]);
- hp = HAlloc(BIF_P, heap_size);
- endp = hp + heap_size;
+ if (is_first_call)
+ ERTS_BIF_PREP_ERROR(ret_val, p, BADARG);
+ else {
+ erts_set_gc_state(p, 1);
+ if (is_non_value(ctx->arg[1]))
+ ERTS_BIF_PREP_ERROR_TRAPPED1(ret_val, p, BADARG, ctx->bif,
+ ctx->arg[0]);
+ else
+ ERTS_BIF_PREP_ERROR_TRAPPED2(ret_val, p, BADARG, ctx->bif,
+ ctx->arg[0], ctx->arg[1]);
+ }
+ b2t_destroy_context(ctx);
+ return ret_val;
+
+ case B2TDone:
+ b2t_destroy_context(ctx);
+
+ if (ctx->u.dc.hp > ctx->u.dc.hp_end) {
+ erl_exit(1, ":%s, line %d: heap overrun by %d words(s)\n",
+ __FILE__, __LINE__, ctx->u.dc.hp - ctx->u.dc.hp_end);
+ }
+ HRelease(p, ctx->u.dc.hp_end, ctx->u.dc.hp);
- res = binary2term_create(NULL, &b2ts, &hp, &MSO(BIF_P));
+ if (!is_first_call) {
+ erts_set_gc_state(p, 1);
+ }
+ BUMP_REDS(p, (initial_reds - ctx->reds) / B2T_BYTES_PER_REDUCTION);
+ ERTS_BIF_PREP_RET(ret_val, ctx->u.dc.res);
+ return ret_val;
- erts_free_aligned_binary_bytes(temp_alloc);
+ default:
+ ASSERT(!"Unknown state in binary_to_term");
+ }
+ }while (ctx->reds > 0 || ctx->state >= B2TDone);
- if (hp > endp) {
- erl_exit(1, ":%s, line %d: heap overrun by %d words(s)\n",
- __FILE__, __LINE__, hp-endp);
+ if (ctx == &c_buff) {
+ ASSERT(ctx->trap_bin == THE_NON_VALUE);
+ ctx = b2t_export_context(p, &c_buff);
}
+ ASSERT(ctx->trap_bin != THE_NON_VALUE);
- HRelease(BIF_P, endp, hp);
+ if (is_first_call) {
+ erts_set_gc_state(p, 0);
+ }
+ BUMP_ALL_REDS(p);
- if (res == THE_NON_VALUE)
- goto error;
+ ERTS_BIF_PREP_TRAP1(ret_val, &binary_to_term_trap_export,
+ p, ctx->trap_bin);
- return res;
+ return ret_val;
}
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_to_term, 1)
+
+BIF_RETTYPE binary_to_term_1(BIF_ALIST_1)
+{
+ return binary_to_term_int(BIF_P, 0, BIF_ARG_1, NULL, bif_export[BIF_binary_to_term_1],
+ BIF_ARG_1, THE_NON_VALUE);
+}
+
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_to_term, 2)
+
BIF_RETTYPE binary_to_term_2(BIF_ALIST_2)
{
- Sint heap_size;
- Eterm res;
Eterm opts;
Eterm opt;
- Eterm* hp;
- Eterm* endp;
- Sint size;
- byte* bytes;
- byte* temp_alloc = NULL;
- ErtsBinary2TermState b2ts;
- ErtsDistExternal fakedep;
+ Uint32 flags = 0;
- fakedep.flags = 0;
opts = BIF_ARG_2;
while (is_list(opts)) {
opt = CAR(list_val(opts));
if (opt == am_safe) {
- fakedep.flags |= ERTS_DIST_EXT_BTT_SAFE;
+ flags |= ERTS_DIST_EXT_BTT_SAFE;
}
else {
goto error;
@@ -1297,35 +1592,11 @@ BIF_RETTYPE binary_to_term_2(BIF_ALIST_2)
if (is_not_nil(opts))
goto error;
- if ((bytes = erts_get_aligned_binary_bytes(BIF_ARG_1, &temp_alloc)) == NULL) {
- error:
- erts_free_aligned_binary_bytes(temp_alloc);
- BIF_ERROR(BIF_P, BADARG);
- }
- size = binary_size(BIF_ARG_1);
-
- heap_size = binary2term_prepare(&b2ts, bytes, size);
- if (heap_size < 0)
- goto error;
-
- hp = HAlloc(BIF_P, heap_size);
- endp = hp + heap_size;
-
- res = binary2term_create(&fakedep, &b2ts, &hp, &MSO(BIF_P));
-
- erts_free_aligned_binary_bytes(temp_alloc);
-
- if (hp > endp) {
- erl_exit(1, ":%s, line %d: heap overrun by %d words(s)\n",
- __FILE__, __LINE__, hp-endp);
- }
-
- HRelease(BIF_P, endp, hp);
-
- if (res == THE_NON_VALUE)
- goto error;
+ return binary_to_term_int(BIF_P, flags, BIF_ARG_1, NULL, bif_export[BIF_binary_to_term_2],
+ BIF_ARG_1, BIF_ARG_2);
- return res;
+error:
+ BIF_ERROR(BIF_P, BADARG);
}
Eterm
@@ -1357,9 +1628,9 @@ external_size_2(BIF_ALIST_2)
if (tp[1] == am_minor_version && is_small(tp[2])) {
switch (signed_val(tp[2])) {
case 0:
+ flags &= ~DFLAG_NEW_FLOATS;
break;
case 1:
- flags |= DFLAG_NEW_FLOATS;
break;
default:
goto error;
@@ -1473,25 +1744,29 @@ erts_term_to_binary(Process* p, Eterm Term, int level, Uint flags) {
/* #define EXTREME_TTB_TRAPPING 1 */
#ifndef EXTREME_TTB_TRAPPING
-#define TERM_TO_BINARY_LOOP_FACTOR 500
-#define TERM_TO_BINARY_SIZE_FACTOR 500000
-#define TERM_TO_BINARY_COMPRESS_CHUNK 500000
+#define TERM_TO_BINARY_LOOP_FACTOR 32
+#define TERM_TO_BINARY_COMPRESS_CHUNK (1 << 18)
#else
#define TERM_TO_BINARY_LOOP_FACTOR 1
-#define TERM_TO_BINARY_SIZE_FACTOR 10
#define TERM_TO_BINARY_COMPRESS_CHUNK 10
#endif
typedef enum { TTBSize, TTBEncode, TTBCompress } TTBState;
-typedef struct {
+typedef struct TTBSizeContext_ {
Uint flags;
int level;
+ Uint result;
+ Eterm obj;
+ ErtsEStack estack;
} TTBSizeContext;
-typedef struct {
+typedef struct TTBEncodeContext_ {
Uint flags;
int level;
+ byte* ep;
+ Eterm obj;
+ ErtsWStack wstack;
Binary *result_bin;
} TTBEncodeContext;
@@ -1514,15 +1789,17 @@ typedef struct {
} s;
} TTBContext;
-static void context_destructor(Binary *context_bin)
+static void ttb_context_destructor(Binary *context_bin)
{
TTBContext *context = ERTS_MAGIC_BIN_DATA(context_bin);
if (context->alive) {
context->alive = 0;
switch (context->state) {
case TTBSize:
+ DESTROY_SAVED_ESTACK(&context->s.sc.estack);
break;
case TTBEncode:
+ DESTROY_SAVED_WSTACK(&context->s.ec.wstack);
if (context->s.ec.result_bin != NULL) { /* Set to NULL if ever made alive! */
ASSERT(erts_refc_read(&(context->s.ec.result_bin->refc),0) == 0);
erts_bin_free(context->s.ec.result_bin);
@@ -1567,7 +1844,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
do { \
if (context_b == NULL) { \
context_b = erts_create_magic_binary(sizeof(TTBContext), \
- context_destructor); \
+ ttb_context_destructor); \
context = ERTS_MAGIC_BIN_DATA(context_b); \
memcpy(context,&c_buff,sizeof(TTBContext)); \
} \
@@ -1587,6 +1864,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
/* Setup enough to get started */
context->state = TTBSize;
context->alive = 1;
+ context->s.sc.estack.start = NULL;
context->s.sc.flags = flags;
context->s.sc.level = level;
} else {
@@ -1602,7 +1880,8 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
int level;
Uint flags;
/* Try for fast path */
- if (encode_size_struct_int(p, NULL, Term, context->s.sc.flags, &reds, &size) < 0) {
+ if (encode_size_struct_int(&context->s.sc, NULL, Term,
+ context->s.sc.flags, &reds, &size) < 0) {
EXPORT_CONTEXT();
/* Same state */
RETURN_STATE();
@@ -1615,7 +1894,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
/* Finish in one go */
res = erts_term_to_binary_simple(p, Term, size,
level, flags);
- BUMP_REDS(p, size / TERM_TO_BINARY_SIZE_FACTOR);
+ BUMP_REDS(p, 1);
return res;
}
@@ -1628,6 +1907,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
context->state = TTBEncode;
context->s.ec.flags = flags;
context->s.ec.level = level;
+ context->s.ec.wstack.wstart = NULL;
context->s.ec.result_bin = result_bin;
break;
}
@@ -1639,12 +1919,13 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
Binary *result_bin;
flags = context->s.ec.flags;
- if (enc_term_int(p,NULL,Term, bytes+1, flags, NULL, &reds, &endp) < 0) {
+ if (enc_term_int(&context->s.ec, NULL,Term, bytes+1, flags, NULL, &reds, &endp) < 0) {
EXPORT_CONTEXT();
RETURN_STATE();
}
real_size = endp - bytes;
result_bin = erts_bin_realloc(context->s.ec.result_bin,real_size);
+ result_bin->orig_size = real_size;
level = context->s.ec.level;
BUMP_REDS(p, (initial_reds - reds) / TERM_TO_BINARY_LOOP_FACTOR);
if (level == 0 || real_size < 6) { /* We are done */
@@ -1724,6 +2005,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
erl_zlib_deflate_finish(&(context->s.cc.stream));
result_bin = erts_bin_realloc(context->s.cc.destination_bin,
context->s.cc.dest_len+6);
+ result_bin->orig_size = context->s.cc.dest_len+6;
context->s.cc.destination_bin = NULL;
pb = (ProcBin *) HAlloc(p, PROC_BIN_SIZE);
pb->thing_word = HEADER_PROC_BIN;
@@ -2047,27 +2329,6 @@ dec_pid(ErtsDistExternal *edep, Eterm** hpp, byte* ep, ErlOffHeap* off_heap, Ete
#define ENC_PATCH_FUN_SIZE ((Eterm) 2)
#define ENC_LAST_ARRAY_ELEMENT ((Eterm) 3)
-/* Free extra rootset (used when trapping) */
-static void cleanup_ttb_extra_root(ErlExtraRootSet *rs)
-{
- if (rs->objv != NULL) {
- erts_free(ERTS_ALC_T_EXTRA_ROOT, rs->objv);
- }
- erts_free(ERTS_ALC_T_EXTRA_ROOT, rs);
-}
-
-/* Same as above, but we have an extra "stack" beyond GC reach, i.e. an array of two extra roots */
-static void cleanup_ttb_extra_root_2(ErlExtraRootSet *rs)
-{
- if (rs->objv != NULL) {
- erts_free(ERTS_ALC_T_EXTRA_ROOT, rs->objv);
- }
- if (rs[1].objv != NULL) {
- erts_free(ERTS_ALC_T_EXTRA_ROOT, rs[1].objv);
- }
-
- erts_free(ERTS_ALC_T_EXTRA_ROOT, rs);
-}
static byte*
enc_term(ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
@@ -2079,39 +2340,43 @@ enc_term(ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
}
static int
-enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
+enc_term_int(TTBEncodeContext* ctx, ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
struct erl_off_heap_header** off_heap, Sint *reds, byte **res)
{
- DECLARE_ESTACK(s);
- DECLARE_WSTACK(com);
+ DECLARE_WSTACK(s);
Uint n;
Uint i;
Uint j;
Uint* ptr;
Eterm val;
FloatDef f;
- int count_reds = (p != NULL && reds != NULL);
Sint r = 0;
+#if HALFWORD_HEAP
+ UWord wobj;
+#endif
+
- if (count_reds) {
- ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_EXTRA_ROOT);
- WSTACK_CHANGE_ALLOCATOR(com, ERTS_ALC_T_EXTRA_ROOT);
+ if (ctx) {
+ WSTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
r = *reds;
- }
- if (p && p->extra_root) { /* restore saved stacks and byte pointer */
- ESTACK_RESTORE(s,p->extra_root[0].objv, p->extra_root[0].sz);
- obj = ESTACK_POP(s);
- WSTACK_RESTORE(com, p->extra_root[1].objv, p->extra_root[1].sz);
- ep = (byte *) WSTACK_POP(com);
+ if (ctx->wstack.wstart) { /* restore saved stacks and byte pointer */
+ WSTACK_RESTORE(s, &ctx->wstack);
+ ep = ctx->ep;
+ obj = ctx->obj;
+ }
}
goto L_jump_start;
outer_loop:
- while (!ESTACK_ISEMPTY(s)) {
- obj = ESTACK_POP(s);
- switch (val = WSTACK_POP(com)) {
+ while (!WSTACK_ISEMPTY(s)) {
+#if HALFWORD_HEAP
+ obj = (Eterm) (wobj = WSTACK_POP(s));
+#else
+ obj = WSTACK_POP(s);
+#endif
+ switch (val = WSTACK_POP(s)) {
case ENC_TERM:
break;
case ENC_ONE_CONS:
@@ -2122,55 +2387,52 @@ enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dfla
obj = CAR(cons);
tl = CDR(cons);
- WSTACK_PUSH(com, is_list(tl) ? ENC_ONE_CONS : ENC_TERM);
- ESTACK_PUSH(s, tl);
+ WSTACK_PUSH(s, is_list(tl) ? ENC_ONE_CONS : ENC_TERM);
+ WSTACK_PUSH(s, tl);
}
break;
case ENC_PATCH_FUN_SIZE:
- /* obj will be discarded, it was NIL */
{
- byte* size_p = (byte *) WSTACK_POP(com);
+#if HALFWORD_HEAP
+ byte* size_p = (byte *) wobj;
+#else
+ byte* size_p = (byte *) obj;
+#endif
put_int32(ep - size_p, size_p);
}
goto outer_loop;
case ENC_LAST_ARRAY_ELEMENT:
/* obj is the tuple */
{
- Eterm* ptr = tuple_val(obj);
- i = arityval(*ptr);
- obj = ptr[i];
+#if HALFWORD_HEAP
+ Eterm* ptr = (Eterm *) wobj;
+#else
+ Eterm* ptr = (Eterm *) obj;
+#endif
+ obj = *ptr;
}
break;
default: /* ENC_LAST_ARRAY_ELEMENT+1 and upwards */
{
- Eterm* ptr = tuple_val(obj);
- i = arityval(*ptr);
- ESTACK_PUSH(s, obj); /* put back tuple and next element index */
- WSTACK_PUSH(com, val-1);
- obj = ptr[i - (val - ENC_LAST_ARRAY_ELEMENT)]; /* the index is counting down */
+#if HALFWORD_HEAP
+ Eterm* ptr = (Eterm *) wobj;
+#else
+ Eterm* ptr = (Eterm *) obj;
+#endif
+ WSTACK_PUSH(s, val-1);
+ obj = *ptr++;
+ WSTACK_PUSH(s, (UWord)ptr);
}
break;
}
L_jump_start:
- if (count_reds && --r == 0) {
+ if (ctx && --r == 0) {
*reds = r;
- ESTACK_PUSH(s,obj); /* push back current object, to be popped on restore */
- WSTACK_PUSH(com,((UWord) ep));
- if (p->extra_root == NULL) {
- /* NB. Allocate an array of two "extra-roots", of which only the first element
- is seen and handled by the GC. Index 1 holds the Wstack. */
- p->extra_root = erts_alloc(ERTS_ALC_T_EXTRA_ROOT, sizeof(ErlExtraRootSet)*2);
- p->extra_root->objv = NULL;
- p->extra_root->sz = 0;
- p->extra_root->cleanup = cleanup_ttb_extra_root_2;
- p->extra_root[1].objv = NULL;
- p->extra_root[1].sz = 0;
- p->extra_root[1].cleanup = NULL; /* Never used */
- }
- ESTACK_SAVE(s, p->extra_root[0].objv, p->extra_root[0].sz);
- WSTACK_SAVE(com, p->extra_root[1].objv, (p->extra_root[1].sz));
+ ctx->obj = obj;
+ ctx->ep = ep;
+ WSTACK_SAVE(s, &ctx->wstack);
return -1;
}
switch(tag_val_def(obj)) {
@@ -2316,8 +2578,36 @@ enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dfla
ep += 4;
}
if (i > 0) {
- WSTACK_PUSH(com, ENC_LAST_ARRAY_ELEMENT+i-1);
- ESTACK_PUSH(s, obj);
+ WSTACK_PUSH(s, ENC_LAST_ARRAY_ELEMENT+i-1);
+ WSTACK_PUSH(s, (UWord)ptr);
+ }
+ break;
+
+ case MAP_DEF:
+ {
+ map_t *mp = (map_t*)map_val(obj);
+ Uint size = map_get_size(mp);
+
+ *ep++ = MAP_EXT;
+ put_int32(size, ep); ep += 4;
+
+ if (size > 0) {
+ Eterm *kptr = map_get_keys(mp);
+ Eterm *vptr = map_get_values(mp);
+
+ for (i = size-1; i >= 1; i--) {
+ WSTACK_PUSH(s, ENC_TERM);
+ WSTACK_PUSH(s, (UWord) vptr[i]);
+ WSTACK_PUSH(s, ENC_TERM);
+ WSTACK_PUSH(s, (UWord) kptr[i]);
+ }
+
+ WSTACK_PUSH(s, ENC_TERM);
+ WSTACK_PUSH(s, (UWord) vptr[0]);
+
+ obj = kptr[0];
+ goto L_jump_start;
+ }
}
break;
@@ -2461,9 +2751,8 @@ enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dfla
int ei;
*ep++ = NEW_FUN_EXT;
- WSTACK_PUSH(com, (UWord) ep); /* Position for patching in size */
- WSTACK_PUSH(com, ENC_PATCH_FUN_SIZE);
- ESTACK_PUSH(s,NIL); /* Will be thrown away */
+ WSTACK_PUSH(s, ENC_PATCH_FUN_SIZE);
+ WSTACK_PUSH(s, (UWord) ep); /* Position for patching in size */
ep += 4;
*ep = funp->arity;
ep += 1;
@@ -2480,8 +2769,8 @@ enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dfla
fun_env:
for (ei = funp->num_free-1; ei > 0; ei--) {
- WSTACK_PUSH(com, ENC_TERM);
- ESTACK_PUSH(s, (UWord) funp->env[ei]);
+ WSTACK_PUSH(s, ENC_TERM);
+ WSTACK_PUSH(s, (UWord) funp->env[ei]);
}
if (funp->num_free != 0) {
obj = funp->env[0];
@@ -2524,13 +2813,9 @@ enc_term_int(Process *p,ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dfla
break;
}
}
- DESTROY_ESTACK(s);
- DESTROY_WSTACK(com);
- if (p && p->extra_root) {
- cleanup_ttb_extra_root_2(p->extra_root);
- p->extra_root = NULL;
- }
- if (count_reds) {
+ DESTROY_WSTACK(s);
+ if (ctx) {
+ ASSERT(ctx->wstack.wstart == NULL);
*reds = r;
}
*res = ep;
@@ -2604,21 +2889,115 @@ undo_offheap_in_area(ErlOffHeap* off_heap, Eterm* start, Eterm* end)
#endif /* DEBUG */
}
+
/* Decode term from external format into *objp.
** On failure return NULL and (R13B04) *hpp will be unchanged.
*/
static byte*
-dec_term(ErtsDistExternal *edep, Eterm** hpp, byte* ep, ErlOffHeap* off_heap, Eterm* objp)
+dec_term(ErtsDistExternal *edep, Eterm** hpp, byte* ep, ErlOffHeap* off_heap,
+ Eterm* objp, B2TContext* ctx)
{
- Eterm* hp_saved = *hpp;
+ Eterm* hp_saved;
int n;
ErtsAtomEncoding char_enc;
- register Eterm* hp = *hpp; /* Please don't take the address of hp */
- Eterm* next = objp;
+ register Eterm* hp; /* Please don't take the address of hp */
+ Eterm *maps_head; /* for validation of maps */
+ Eterm* next;
+ SWord reds;
+
+ if (ctx) {
+ hp_saved = ctx->u.dc.hp_start;
+ reds = ctx->reds;
+ next = ctx->u.dc.next;
+ ep = ctx->u.dc.ep;
+ hpp = &ctx->u.dc.hp;
+ maps_head = ctx->u.dc.maps_head;
+
+ if (ctx->state != B2TDecode) {
+ int n_limit = reds;
+
+ n = ctx->u.dc.remaining_n;
+ if (ctx->state == B2TDecodeBinary) {
+ n_limit *= B2T_MEMCPY_FACTOR;
+ ASSERT(n_limit >= reds);
+ reds -= n / B2T_MEMCPY_FACTOR;
+ }
+ else
+ reds -= n;
- *next = (Eterm) (UWord) NULL;
+ if (n > n_limit) {
+ ctx->u.dc.remaining_n -= n_limit;
+ n = n_limit;
+ reds = 0;
+ }
+ else {
+ ctx->u.dc.remaining_n = 0;
+ }
+
+ switch (ctx->state) {
+ case B2TDecodeList:
+ objp = next - 2;
+ while (n > 0) {
+ objp[0] = (Eterm) COMPRESS_POINTER(next);
+ objp[1] = make_list(next);
+ next = objp;
+ objp -= 2;
+ n--;
+ }
+ break;
+
+ case B2TDecodeTuple:
+ objp = next - 1;
+ while (n-- > 0) {
+ objp[0] = (Eterm) COMPRESS_POINTER(next);
+ next = objp;
+ objp--;
+ }
+ break;
+
+ case B2TDecodeString:
+ hp = *hpp;
+ hp[-1] = make_list(hp); /* overwrite the premature NIL */
+ while (n-- > 0) {
+ hp[0] = make_small(*ep++);
+ hp[1] = make_list(hp+2);
+ hp += 2;
+ }
+ hp[-1] = NIL;
+ *hpp = hp;
+ break;
+
+ case B2TDecodeBinary:
+ sys_memcpy(ctx->u.dc.remaining_bytes, ep, n);
+ ctx->u.dc.remaining_bytes += n;
+ ep += n;
+ break;
+
+ default:
+ ASSERT(!"Unknown state");
+ }
+ if (!ctx->u.dc.remaining_n) {
+ ctx->state = B2TDecode;
+ }
+ if (reds <= 0) {
+ ctx->u.dc.next = next;
+ ctx->u.dc.ep = ep;
+ ctx->reds = 0;
+ return NULL;
+ }
+ }
+ }
+ else {
+ hp_saved = *hpp;
+ reds = ERTS_SWORD_MAX;
+ next = objp;
+ *next = (Eterm) (UWord) NULL;
+ maps_head = NULL;
+ }
+ hp = *hpp;
while (next != NULL) {
+
objp = next;
next = (Eterm *) EXPAND_POINTER(*objp);
@@ -2677,6 +3056,8 @@ dec_term(ErtsDistExternal *edep, Eterm** hpp, byte* ep, ErlOffHeap* off_heap, Et
big = make_small(0);
} else {
big = bytes_to_big(first, n, neg, hp);
+ if (is_nil(big))
+ goto error;
if (is_big(big)) {
hp += big_arity(big) + 1;
}
@@ -2738,7 +3119,16 @@ dec_term_atom_common:
*objp = make_tuple(hp);
*hp++ = make_arityval(n);
hp += n;
- objp = hp - 1;
+ objp = hp - 1;
+ if (ctx) {
+ if (reds < n) {
+ ASSERT(reds > 0);
+ ctx->state = B2TDecodeTuple;
+ ctx->u.dc.remaining_n = n - reds;
+ n = reds;
+ }
+ reds -= n;
+ }
while (n-- > 0) {
objp[0] = (Eterm) COMPRESS_POINTER(next);
next = objp;
@@ -2756,17 +3146,27 @@ dec_term_atom_common:
break;
}
*objp = make_list(hp);
- hp += 2*n;
+ hp += 2 * n;
objp = hp - 2;
objp[0] = (Eterm) COMPRESS_POINTER((objp+1));
objp[1] = (Eterm) COMPRESS_POINTER(next);
next = objp;
objp -= 2;
- while (--n > 0) {
+ n--;
+ if (ctx) {
+ if (reds < n) {
+ ctx->state = B2TDecodeList;
+ ctx->u.dc.remaining_n = n - reds;
+ n = reds;
+ }
+ reds -= n;
+ }
+ while (n > 0) {
objp[0] = (Eterm) COMPRESS_POINTER(next);
- objp[1] = make_list(objp + 2);
+ objp[1] = make_list(next);
next = objp;
objp -= 2;
+ n--;
}
break;
case STRING_EXT:
@@ -2777,6 +3177,14 @@ dec_term_atom_common:
break;
}
*objp = make_list(hp);
+ if (ctx) {
+ if (reds < n) {
+ ctx->state = B2TDecodeString;
+ ctx->u.dc.remaining_n = n - reds;
+ n = reds;
+ }
+ reds -= n;
+ }
while (n-- > 0) {
hp[0] = make_small(*ep++);
hp[1] = make_list(hp+2);
@@ -2984,7 +3392,6 @@ dec_term_atom_common:
dbin->flags = 0;
dbin->orig_size = n;
erts_refc_init(&dbin->refc, 1);
- sys_memcpy(dbin->orig_bytes, ep, n);
pb = (ProcBin *) hp;
hp += PROC_BIN_SIZE;
pb->thing_word = HEADER_PROC_BIN;
@@ -2995,7 +3402,20 @@ dec_term_atom_common:
pb->bytes = (byte*) dbin->orig_bytes;
pb->flags = 0;
*objp = make_binary(pb);
- }
+ if (ctx) {
+ int n_limit = reds * B2T_MEMCPY_FACTOR;
+ if (n > n_limit) {
+ ctx->state = B2TDecodeBinary;
+ ctx->u.dc.remaining_n = n - n_limit;
+ ctx->u.dc.remaining_bytes = dbin->orig_bytes + n_limit;
+ n = n_limit;
+ reds = 0;
+ }
+ else
+ reds -= n / B2T_MEMCPY_FACTOR;
+ }
+ sys_memcpy(dbin->orig_bytes, ep, n);
+ }
ep += n;
break;
}
@@ -3018,13 +3438,14 @@ dec_term_atom_common:
sys_memcpy(hb->data, ep, n);
bin = make_binary(hb);
hp += heap_bin_size(n);
+ ep += n;
} else {
Binary* dbin = erts_bin_nrml_alloc(n);
ProcBin* pb;
+
dbin->flags = 0;
dbin->orig_size = n;
erts_refc_init(&dbin->refc, 1);
- sys_memcpy(dbin->orig_bytes, ep, n);
pb = (ProcBin *) hp;
pb->thing_word = HEADER_PROC_BIN;
pb->size = n;
@@ -3035,8 +3456,23 @@ dec_term_atom_common:
pb->flags = 0;
bin = make_binary(pb);
hp += PROC_BIN_SIZE;
- }
- ep += n;
+ if (ctx) {
+ int n_limit = reds * B2T_MEMCPY_FACTOR;
+ if (n > n_limit) {
+ ctx->state = B2TDecodeBinary;
+ ctx->u.dc.remaining_n = n - n_limit;
+ ctx->u.dc.remaining_bytes = dbin->orig_bytes + n_limit;
+ n = n_limit;
+ reds = 0;
+ }
+ else
+ reds -= n / B2T_MEMCPY_FACTOR;
+ }
+ sys_memcpy(dbin->orig_bytes, ep, n);
+ ep += n;
+ n = pb->size;
+ }
+
if (bitsize == 8 || n == 0) {
*objp = bin;
} else {
@@ -3067,7 +3503,7 @@ dec_term_atom_common:
goto error;
}
*hpp = hp;
- ep = dec_term(edep, hpp, ep, off_heap, &temp);
+ ep = dec_term(edep, hpp, ep, off_heap, &temp, NULL);
hp = *hpp;
if (ep == NULL) {
goto error;
@@ -3094,6 +3530,50 @@ dec_term_atom_common:
break;
}
break;
+ case MAP_EXT:
+ {
+ map_t *mp;
+ Uint32 size,n;
+ Eterm *kptr,*vptr;
+ Eterm keys;
+
+ size = get_int32(ep); ep += 4;
+
+ keys = make_tuple(hp);
+ *hp++ = make_arityval(size);
+ hp += size;
+ kptr = hp - 1;
+
+ mp = (map_t*)hp;
+ hp += MAP_HEADER_SIZE;
+ hp += size;
+ vptr = hp - 1;
+
+ /* kptr, last word for keys
+ * vptr, last word for values
+ */
+
+ /*
+ * Use thing_word to link through decoded maps.
+ * The list of maps is for later validation.
+ */
+
+ mp->thing_word = (Eterm) COMPRESS_POINTER(maps_head);
+ maps_head = (Eterm *) mp;
+
+ mp->size = size;
+ mp->keys = keys;
+ *objp = make_map(mp);
+
+ for (n = size; n; n--) {
+ *vptr = (Eterm) COMPRESS_POINTER(next);
+ *kptr = (Eterm) COMPRESS_POINTER(vptr);
+ next = kptr;
+ vptr--;
+ kptr--;
+ }
+ }
+ break;
case NEW_FUN_EXT:
{
ErlFunThing* funp = (ErlFunThing *) hp;
@@ -3127,7 +3607,7 @@ dec_term_atom_common:
}
*hpp = hp;
/* Index */
- if ((ep = dec_term(edep, hpp, ep, off_heap, &temp)) == NULL) {
+ if ((ep = dec_term(edep, hpp, ep, off_heap, &temp, NULL)) == NULL) {
goto error;
}
if (!is_small(temp)) {
@@ -3136,7 +3616,7 @@ dec_term_atom_common:
old_index = unsigned_val(temp);
/* Uniq */
- if ((ep = dec_term(edep, hpp, ep, off_heap, &temp)) == NULL) {
+ if ((ep = dec_term(edep, hpp, ep, off_heap, &temp, NULL)) == NULL) {
goto error;
}
if (!is_small(temp)) {
@@ -3204,7 +3684,7 @@ dec_term_atom_common:
}
/* Index */
- if ((ep = dec_term(edep, hpp, ep, off_heap, &temp)) == NULL) {
+ if ((ep = dec_term(edep, hpp, ep, off_heap, &temp, NULL)) == NULL) {
goto error;
}
if (!is_small(temp)) {
@@ -3213,7 +3693,7 @@ dec_term_atom_common:
old_index = unsigned_val(temp);
/* Uniq */
- if ((ep = dec_term(edep, hpp, ep, off_heap, &temp)) == NULL) {
+ if ((ep = dec_term(edep, hpp, ep, off_heap, &temp, NULL)) == NULL) {
goto error;
}
if (!is_small(temp)) {
@@ -3303,21 +3783,62 @@ dec_term_atom_common:
}
default:
- error:
- /* UNDO:
- * Must unlink all off-heap objects that may have been
- * linked into the process.
- */
- if (hp < *hpp) { /* Sometimes we used hp and sometimes *hpp */
- hp = *hpp; /* the largest must be the freshest */
- }
- undo_offheap_in_area(off_heap, hp_saved, hp);
- *hpp = hp_saved;
- return NULL;
+ goto error;
}
+
+ if (--reds <= 0) {
+ if (ctx) {
+ if (next || ctx->state != B2TDecode) {
+ ctx->u.dc.ep = ep;
+ ctx->u.dc.next = next;
+ ctx->u.dc.hp = hp;
+ ctx->u.dc.maps_head = maps_head;
+ ctx->reds = 0;
+ return NULL;
+ }
+ }
+ else {
+ reds = ERTS_SWORD_MAX;
+ }
+ }
+ }
+
+ /* Iterate through all the maps and check for validity and sort keys
+ * - done here for when we know it is complete.
+ */
+
+ while (maps_head) {
+ next = (Eterm *)(EXPAND_POINTER(*maps_head));
+ *maps_head = MAP_HEADER;
+ if (!erts_validate_and_sort_map((map_t*)maps_head))
+ goto error;
+ maps_head = next;
+ }
+
+ if (ctx) {
+ ctx->state = B2TDone;
+ ctx->reds = reds;
}
+
*hpp = hp;
return ep;
+
+error:
+ /* UNDO:
+ * Must unlink all off-heap objects that may have been
+ * linked into the process.
+ */
+ if (hp < *hpp) { /* Sometimes we used hp and sometimes *hpp */
+ hp = *hpp; /* the largest must be the freshest */
+ }
+ undo_offheap_in_area(off_heap, hp_saved, hp);
+ *hpp = hp_saved;
+ if (ctx) {
+ ctx->state = B2TDecodeFail;
+ ctx->reds = reds;
+ }
+
+ return NULL;
}
/* returns the number of bytes needed to encode an object
@@ -3331,26 +3852,24 @@ static Uint encode_size_struct2(ErtsAtomCacheMap *acmp, Eterm obj, unsigned dfla
}
static int
-encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
+encode_size_struct_int(TTBSizeContext* ctx, ErtsAtomCacheMap *acmp, Eterm obj,
unsigned dflags, Sint *reds, Uint *res)
{
DECLARE_ESTACK(s);
Uint m, i, arity;
Uint result = 0;
- int count_reds = (p != NULL && reds != 0);
Sint r = 0;
- if (count_reds) {
- ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_EXTRA_ROOT);
+ if (ctx) {
+ ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
r = *reds;
- }
-
- if (p && p->extra_root) { /* restore saved stack */
- ESTACK_RESTORE(s,p->extra_root->objv, p->extra_root->sz + 1);
- result = ESTACK_POP(s); /*Untagged, beyond p->extra_root->sz */
- obj = ESTACK_POP(s);
- }
+ if (ctx->estack.start) { /* restore saved stack */
+ ESTACK_RESTORE(s, &ctx->estack);
+ result = ctx->result;
+ obj = ctx->obj;
+ }
+ }
goto L_jump_start;
@@ -3376,18 +3895,11 @@ encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
}
L_jump_start:
- if (count_reds && --r == 0) {
+ if (ctx && --r == 0) {
*reds = r;
- ESTACK_PUSH(s,obj); /* push back current object */
- ESTACK_PUSH(s,result); /* Untagged, will be out of GC reach */
- if (p->extra_root == NULL) {
- p->extra_root = erts_alloc(ERTS_ALC_T_EXTRA_ROOT, sizeof(ErlExtraRootSet));
- p->extra_root->objv = NULL;
- p->extra_root->sz = 0;
- p->extra_root->cleanup = cleanup_ttb_extra_root;
- }
- ESTACK_SAVE(s, p->extra_root->objv, p->extra_root->sz);
- --p->extra_root->sz; /* Hide result from GC */
+ ctx->obj = obj;
+ ctx->result = result;
+ ESTACK_SAVE(s, &ctx->estack);
return -1;
}
switch (tag_val_def(obj)) {
@@ -3496,6 +4008,46 @@ encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
goto outer_loop;
}
break;
+ case MAP_DEF:
+ {
+ map_t *mp = (map_t*)map_val(obj);
+ Uint size = map_get_size(mp);
+ Uint i;
+ Eterm *ptr;
+
+ result += 1 + 4; /* tag + 4 bytes size */
+
+ /* push values first */
+ ptr = map_get_values(mp);
+ i = size;
+ while(i--) {
+ if (is_list(*ptr)) {
+ if ((m = is_string(*ptr)) && (m < MAX_STRING_LEN)) {
+ result += m + 2 + 1;
+ } else {
+ result += 5;
+ }
+ }
+ ESTACK_PUSH(s,*ptr);
+ ++ptr;
+ }
+
+ ptr = map_get_keys(mp);
+ i = size;
+ while(i--) {
+ if (is_list(*ptr)) {
+ if ((m = is_string(*ptr)) && (m < MAX_STRING_LEN)) {
+ result += m + 2 + 1;
+ } else {
+ result += 5;
+ }
+ }
+ ESTACK_PUSH(s,*ptr);
+ ++ptr;
+ }
+ goto outer_loop;
+ }
+ break;
case FLOAT_DEF:
if (dflags & DFLAG_NEW_FLOATS) {
result += 9;
@@ -3590,11 +4142,8 @@ encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
}
DESTROY_ESTACK(s);
- if (p && p->extra_root) {
- cleanup_ttb_extra_root(p->extra_root);
- p->extra_root = NULL;
- }
- if (count_reds) {
+ if (ctx) {
+ ASSERT(ctx->estack.start == NULL);
*reds = r;
}
*res = result;
@@ -3602,18 +4151,37 @@ encode_size_struct_int(Process *p, ErtsAtomCacheMap *acmp, Eterm obj,
}
static Sint
-decoded_size(byte *ep, byte* endp, int internal_tags)
+decoded_size(byte *ep, byte* endp, int internal_tags, B2TContext* ctx)
{
- int heap_size = 0;
+ int heap_size;
int terms;
- int atom_extra_skip = 0;
+ int atom_extra_skip;
Uint n;
+ SWord reds;
+
+ if (ctx) {
+ reds = ctx->reds;
+ if (ctx->u.sc.ep) {
+ heap_size = ctx->u.sc.heap_size;
+ terms = ctx->u.sc.terms;
+ ep = ctx->u.sc.ep;
+ atom_extra_skip = ctx->u.sc.atom_extra_skip;
+ goto init_done;
+ }
+ }
+ else
+ reds = 0; /* not used but compiler warns anyway */
+
+ heap_size = 0;
+ terms = 1;
+ atom_extra_skip = 0;
+init_done:
#define SKIP(sz) \
do { \
if ((sz) <= endp-ep) { \
ep += (sz); \
- } else { return -1; }; \
+ } else { goto error; }; \
} while (0)
#define SKIP2(sz1, sz2) \
@@ -3621,31 +4189,32 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
Uint sz = (sz1) + (sz2); \
if (sz1 < sz && (sz) <= endp-ep) { \
ep += (sz); \
- } else { return -1; } \
+ } else { goto error; } \
} while (0)
#define CHKSIZE(sz) \
do { \
- if ((sz) > endp-ep) { return -1; } \
+ if ((sz) > endp-ep) { goto error; } \
} while (0)
#define ADDTERMS(n) \
do { \
int before = terms; \
terms += (n); \
- if (terms < before) return -1; \
+ if (terms < before) goto error; \
} while (0)
-
- for (terms=1; terms > 0; terms--) {
- int tag;
-
+ ASSERT(terms > 0);
+ do {
+ int tag;
CHKSIZE(1);
tag = ep++[0];
switch (tag) {
case INTEGER_EXT:
SKIP(4);
+#if !defined(ARCH_64) || HALFWORD_HEAP
heap_size += BIG_UINT_HEAP_SIZE;
+#endif
break;
case SMALL_INTEGER_EXT:
SKIP(1);
@@ -3660,7 +4229,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
CHKSIZE(4);
n = get_int32(ep);
if (n > BIG_ARITY_MAX*sizeof(ErtsDigit)) {
- return -1;
+ goto error;
}
SKIP2(n,4+1); /* skip, size,sign,digits */
heap_size += 1+1+(n+sizeof(Eterm)-1)/sizeof(Eterm); /* XXX: 1 too much? */
@@ -3669,7 +4238,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
CHKSIZE(2);
n = get_int16(ep);
if (n > MAX_ATOM_CHARACTERS) {
- return -1;
+ goto error;
}
SKIP(n+2+atom_extra_skip);
atom_extra_skip = 0;
@@ -3679,7 +4248,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
n = get_int16(ep);
ep += 2;
if (n > MAX_ATOM_SZ_LIMIT) {
- return -1;
+ goto error;
}
SKIP(n+atom_extra_skip);
atom_extra_skip = 0;
@@ -3688,7 +4257,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
CHKSIZE(1);
n = get_int8(ep);
if (n > MAX_ATOM_CHARACTERS) {
- return -1;
+ goto error;
}
SKIP(n+1+atom_extra_skip);
atom_extra_skip = 0;
@@ -3698,7 +4267,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
n = get_int8(ep);
ep++;
if (n > MAX_ATOM_SZ_LIMIT) {
- return -1;
+ goto error;
}
SKIP(n+atom_extra_skip);
atom_extra_skip = 0;
@@ -3727,7 +4296,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
id_words = get_int16(ep);
if (id_words > ERTS_MAX_REF_NUMBERS)
- return -1;
+ goto error;
ep += 2;
atom_extra_skip = 1 + 4*id_words;
@@ -3769,6 +4338,13 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
ADDTERMS(n);
heap_size += n + 1;
break;
+ case MAP_EXT:
+ CHKSIZE(4);
+ n = get_int32(ep);
+ ep += 4;
+ ADDTERMS(2*n);
+ heap_size += 3 + n + 1 + n;
+ break;
case STRING_EXT:
CHKSIZE(2);
n = get_int16(ep);
@@ -3829,7 +4405,7 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
num_free = get_int32(ep);
ep += 4;
if (num_free > MAX_ARG) {
- return -1;
+ goto error;
}
terms += 4 + num_free;
heap_size += ERL_FUN_SIZE + num_free;
@@ -3846,24 +4422,47 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
case BINARY_INTERNAL_REF:
if (!internal_tags) {
- return -1;
+ goto error;
}
SKIP(sizeof(ProcBin));
heap_size += PROC_BIN_SIZE;
break;
case BIT_BINARY_INTERNAL_REF:
if (!internal_tags) {
- return -1;
+ goto error;
}
SKIP(2+sizeof(ProcBin));
heap_size += PROC_BIN_SIZE + ERL_SUB_BIN_SIZE;
break;
default:
- return -1;
+ goto error;
}
- }
+ terms--;
+
+ if (ctx && --reds <= 0 && terms > 0) {
+ ctx->u.sc.heap_size = heap_size;
+ ctx->u.sc.terms = terms;
+ ctx->u.sc.ep = ep;
+ ctx->u.sc.atom_extra_skip = atom_extra_skip;
+ ctx->reds = 0;
+ return 0;
+ }
+ }while (terms > 0);
+
/* 'terms' may be non-zero if it has wrapped around */
- return terms==0 ? heap_size : -1;
+ if (terms == 0) {
+ if (ctx) {
+ ctx->state = B2TDecodeInit;
+ ctx->reds = reds;
+ }
+ return heap_size;
+ }
+
+error:
+ if (ctx) {
+ ctx->state = B2TBadArg;
+ }
+ return -1;
#undef SKIP
#undef SKIP2
#undef CHKSIZE
diff --git a/erts/emulator/beam/external.h b/erts/emulator/beam/external.h
index ff29e84972..10565f67e5 100644
--- a/erts/emulator/beam/external.h
+++ b/erts/emulator/beam/external.h
@@ -50,6 +50,7 @@
#define LARGE_BIG_EXT 'o'
#define NEW_FUN_EXT 'p'
#define EXPORT_EXT 'q'
+#define MAP_EXT 't'
#define FUN_EXT 'u'
#define ATOM_UTF8_EXT 'v'
#define SMALL_ATOM_UTF8_EXT 'w'
@@ -146,6 +147,7 @@ typedef struct {
typedef struct {
byte *extp;
int exttmp;
+ Uint extsize;
} ErtsBinary2TermState;
/* -------------------------------------------------------------------------- */
@@ -154,7 +156,6 @@ void erts_init_atom_cache_map(ErtsAtomCacheMap *);
void erts_reset_atom_cache_map(ErtsAtomCacheMap *);
void erts_destroy_atom_cache_map(ErtsAtomCacheMap *);
void erts_finalize_atom_cache_map(ErtsAtomCacheMap *, Uint32);
-Uint erts_encode_ext_dist_header_size(ErtsAtomCacheMap *);
Uint erts_encode_ext_dist_header_size(ErtsAtomCacheMap *);
byte *erts_encode_ext_dist_header_setup(byte *, ErtsAtomCacheMap *);
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 063d16c0c7..32a2dc43e8 100755..100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -160,6 +160,7 @@ struct erts_driver_t_ {
void (*ready_async)(ErlDrvData drv_data, ErlDrvThreadData thread_data); /* Might be NULL */
void (*process_exit)(ErlDrvData drv_data, ErlDrvMonitor *monitor);
void (*stop_select)(ErlDrvEvent event, void*); /* Might be NULL */
+ void (*emergency_close)(ErlDrvData drv_data); /* Might be NULL */
};
extern erts_driver_t *driver_list;
@@ -186,11 +187,6 @@ extern void erts_ddll_remove_monitor(Process *p,
extern Eterm erts_ddll_monitor_driver(Process *p,
Eterm description,
ErtsProcLocks plocks);
-/*
- * Max no. of drivers (linked in and dynamically loaded). Each table
- * entry uses 4 bytes.
- */
-#define DRIVER_TAB_SIZE 32
/*
** Just like the driver binary but with initial flags
@@ -375,231 +371,237 @@ extern int stackdump_on_exit;
* DESTROY_ESTACK(Stack)
*/
+typedef struct {
+ Eterm* start;
+ Eterm* sp;
+ Eterm* end;
+ ErtsAlcType_t alloc_type;
+}ErtsEStack;
-void erl_grow_stack(ErtsAlcType_t a_type, Eterm** start, Eterm** sp, Eterm** end);
-#define ESTK_CONCAT(a,b) a##b
-#define ESTK_SUBSCRIPT(s,i) *((Eterm *)((byte *)ESTK_CONCAT(s,_start) + (i)))
#define DEF_ESTACK_SIZE (16)
-#define DECLARE_ESTACK(s) \
- Eterm ESTK_CONCAT(s,_default_stack)[DEF_ESTACK_SIZE]; \
- Eterm* ESTK_CONCAT(s,_start) = ESTK_CONCAT(s,_default_stack); \
- Eterm* ESTK_CONCAT(s,_sp) = ESTK_CONCAT(s,_start); \
- Eterm* ESTK_CONCAT(s,_end) = ESTK_CONCAT(s,_start) + DEF_ESTACK_SIZE;\
- ErtsAlcType_t ESTK_CONCAT(s,_alloc_type) = ERTS_ALC_T_ESTACK
+void erl_grow_estack(ErtsEStack*, Eterm* def_stack);
+#define ESTK_CONCAT(a,b) a##b
+#define ESTK_DEF_STACK(s) ESTK_CONCAT(s,_default_estack)
+
+#define DECLARE_ESTACK(s) \
+ Eterm ESTK_DEF_STACK(s)[DEF_ESTACK_SIZE]; \
+ ErtsEStack s = { \
+ ESTK_DEF_STACK(s), /* start */ \
+ ESTK_DEF_STACK(s), /* sp */ \
+ ESTK_DEF_STACK(s) + DEF_ESTACK_SIZE, /* end */ \
+ ERTS_ALC_T_ESTACK /* alloc_type */ \
+ }
#define ESTACK_CHANGE_ALLOCATOR(s,t) \
do { \
- if (ESTK_CONCAT(s,_start) != ESTK_CONCAT(s,_default_stack)) { \
+ if (s.start != ESTK_DEF_STACK(s)) { \
erl_exit(1, "Internal error - trying to change allocator " \
"type of active estack\n"); \
} \
- ESTK_CONCAT(s,_alloc_type) = (t); \
+ s.alloc_type = (t); \
} while (0)
+#define DESTROY_ESTACK(s) \
+do { \
+ if (s.start != ESTK_DEF_STACK(s)) { \
+ erts_free(s.alloc_type, s.start); \
+ } \
+} while(0)
+
+
/*
- * Do not free the stack after this, it may have pointers into what
- * was saved in 'v'. 'v' and 'vsize' are changed by this macro. If
- * 'v' points to anything, it should have been allocated by a previous
- * call to this macro. Be careful to set a correct allocator prior to
- * saving.
- * 'v' can be any lvalue pointer, it will point to an array of UWord
- * after calling this macro.
+ * Do not free the stack after this, it may have pointers into what
+ * was saved in 'dst'.
*/
-#define ESTACK_SAVE(s,v,vsize) /* v and vsize are "name parameters" */ \
-do { \
- Uint _esz = ESTACK_COUNT(s); \
- if (ESTK_CONCAT(s,_start) == ESTK_CONCAT(s,_default_stack)) { \
- if ((v) == NULL) { \
- (v) = erts_alloc(ESTK_CONCAT(s,_alloc_type), \
- DEF_ESTACK_SIZE * sizeof(Eterm)); \
- } \
- memcpy((v),ESTK_CONCAT(s,_start),_esz*sizeof(Eterm)); \
- } else { \
- (v) = (void *) ESTK_CONCAT(s,_start); \
- } \
- (vsize) = _esz; \
+#define ESTACK_SAVE(s,dst)\
+do {\
+ if (s.start == ESTK_DEF_STACK(s)) {\
+ UWord _wsz = ESTACK_COUNT(s);\
+ (dst)->start = erts_alloc(s.alloc_type,\
+ DEF_ESTACK_SIZE * sizeof(Eterm));\
+ memcpy((dst)->start, s.start,_wsz*sizeof(Eterm));\
+ (dst)->sp = (dst)->start + _wsz;\
+ (dst)->end = (dst)->start + DEF_ESTACK_SIZE;\
+ (dst)->alloc_type = s.alloc_type;\
+ } else\
+ *(dst) = s;\
} while (0)
-/*
- * Use on empty stack, only the allocator can be changed before this
- * The vector parameter is reset to NULL if the vector is moved to stack,
- * otherwise it's kept for reuse, so a saved and restored vector might
- * need freeing using the correct allocator parameter.
- * 'v' can be any lvalue pointer, it's cast to an (Eterm *).
+#define DESTROY_SAVED_ESTACK(estack)\
+do {\
+ if ((estack)->start) {\
+ erts_free((estack)->alloc_type, (estack)->start);\
+ (estack)->start = NULL;\
+ }\
+} while(0)
+
+#define CLEAR_SAVED_ESTACK(estack) ((void) ((estack)->start = NULL))
+
+/*
+ * Use on empty stack, only the allocator can be changed before this.
+ * The src stack is reset to NULL.
*/
-#define ESTACK_RESTORE(s, v, vsize) /*v is a "name parameter"*/ \
-do { \
- if ((vsize) > DEF_ESTACK_SIZE) { \
- Uint _ca = DEF_ESTACK_SIZE; \
- while (_ca < (vsize)) \
- _ca = _ca * 2; \
- ESTK_CONCAT(s,_start) = (Eterm *) (v); \
- ESTK_CONCAT(s,_end) = ((Eterm *)(v)) + _ca; \
- ESTK_CONCAT(s,_sp) = ESTK_CONCAT(s,_start) + (vsize); \
- (v) = NULL; \
- } else { \
- memcpy(ESTK_CONCAT(s,_start),(v),(vsize)*sizeof(Eterm));\
- ESTK_CONCAT(s,_sp) = ESTK_CONCAT(s,_start) + (vsize); \
- } \
- } while (0)
+#define ESTACK_RESTORE(s, src) \
+do { \
+ ASSERT(s.start == ESTK_DEF_STACK(s)); \
+ s = *(src); /* struct copy */ \
+ (src)->start = NULL; \
+ ASSERT(s.sp >= s.start); \
+ ASSERT(s.sp <= s.end); \
+} while (0)
-#define ESTACK_IS_STATIC(s) (ESTK_CONCAT(s,_start) == ESTK_CONCAT(s,_default_stack))
+#define ESTACK_IS_STATIC(s) (s.start == ESTK_DEF_STACK(s)))
-#define DESTROY_ESTACK(s) \
-do { \
- if (ESTK_CONCAT(s,_start) != ESTK_CONCAT(s,_default_stack)) { \
- erts_free(ESTK_CONCAT(s,_alloc_type), ESTK_CONCAT(s,_start)); \
- } \
+#define ESTACK_PUSH(s, x) \
+do { \
+ if (s.sp == s.end) { \
+ erl_grow_estack(&s, ESTK_DEF_STACK(s)); \
+ } \
+ *s.sp++ = (x); \
} while(0)
-#define ESTACK_PUSH(s, x) \
-do { \
- if (ESTK_CONCAT(s,_sp) == ESTK_CONCAT(s,_end)) { \
- erl_grow_stack(ESTK_CONCAT(s,_alloc_type),&ESTK_CONCAT(s,_start), \
- &ESTK_CONCAT(s,_sp), &ESTK_CONCAT(s,_end)); \
- } \
- *ESTK_CONCAT(s,_sp)++ = (x); \
+#define ESTACK_PUSH2(s, x, y) \
+do { \
+ if (s.sp > s.end - 2) { \
+ erl_grow_estack(&s, ESTK_DEF_STACK(s)); \
+ } \
+ *s.sp++ = (x); \
+ *s.sp++ = (y); \
} while(0)
-#define ESTACK_PUSH2(s, x, y) \
-do { \
- if (ESTK_CONCAT(s,_sp) > ESTK_CONCAT(s,_end) - 2) { \
- erl_grow_stack(ESTK_CONCAT(s,_alloc_type),&ESTK_CONCAT(s,_start), \
- &ESTK_CONCAT(s,_sp), &ESTK_CONCAT(s,_end)); \
- } \
- *ESTK_CONCAT(s,_sp)++ = (x); \
- *ESTK_CONCAT(s,_sp)++ = (y); \
+#define ESTACK_PUSH3(s, x, y, z) \
+do { \
+ if (s.sp > s.end - 3) { \
+ erl_grow_estack(&s, ESTK_DEF_STACK(s)); \
+ } \
+ *s.sp++ = (x); \
+ *s.sp++ = (y); \
+ *s.sp++ = (z); \
} while(0)
-#define ESTACK_PUSH3(s, x, y, z) \
-do { \
- if (ESTK_CONCAT(s,_sp) > ESTK_CONCAT(s,_end) - 3) { \
- erl_grow_stack(&ESTK_CONCAT(s,_start), &ESTK_CONCAT(s,_sp), \
- &ESTK_CONCAT(s,_end)); \
- } \
- *ESTK_CONCAT(s,_sp)++ = (x); \
- *ESTK_CONCAT(s,_sp)++ = (y); \
- *ESTK_CONCAT(s,_sp)++ = (z); \
-} while(0)
+#define ESTACK_COUNT(s) (s.sp - s.start)
+#define ESTACK_ISEMPTY(s) (s.sp == s.start)
+#define ESTACK_POP(s) (*(--s.sp))
-#define ESTACK_COUNT(s) (ESTK_CONCAT(s,_sp) - ESTK_CONCAT(s,_start))
-#define ESTACK_ISEMPTY(s) (ESTK_CONCAT(s,_sp) == ESTK_CONCAT(s,_start))
-#define ESTACK_POP(s) (*(--ESTK_CONCAT(s,_sp)))
+/*
+ * WSTACK: same as ESTACK but with UWord instead of Eterm
+ */
+typedef struct {
+ UWord* wstart;
+ UWord* wsp;
+ UWord* wend;
+ ErtsAlcType_t alloc_type;
+}ErtsWStack;
-void erl_grow_wstack(ErtsAlcType_t a_type, UWord** start, UWord** sp, UWord** end);
-#define WSTK_CONCAT(a,b) a##b
-#define WSTK_SUBSCRIPT(s,i) *((UWord *)((byte *)WSTK_CONCAT(s,_start) + (i)))
#define DEF_WSTACK_SIZE (16)
-#define DECLARE_WSTACK(s) \
- UWord WSTK_CONCAT(s,_default_stack)[DEF_WSTACK_SIZE]; \
- UWord* WSTK_CONCAT(s,_start) = WSTK_CONCAT(s,_default_stack); \
- UWord* WSTK_CONCAT(s,_sp) = WSTK_CONCAT(s,_start); \
- UWord* WSTK_CONCAT(s,_end) = WSTK_CONCAT(s,_start) + DEF_WSTACK_SIZE; \
- ErtsAlcType_t WSTK_CONCAT(s,_alloc_type) = ERTS_ALC_T_ESTACK
+void erl_grow_wstack(ErtsWStack*, UWord* def_stack);
+#define WSTK_CONCAT(a,b) a##b
+#define WSTK_DEF_STACK(s) WSTK_CONCAT(s,_default_wstack)
+
+#define DECLARE_WSTACK(s) \
+ UWord WSTK_DEF_STACK(s)[DEF_WSTACK_SIZE]; \
+ ErtsWStack s = { \
+ WSTK_DEF_STACK(s), /* wstart */ \
+ WSTK_DEF_STACK(s), /* wsp */ \
+ WSTK_DEF_STACK(s) + DEF_WSTACK_SIZE, /* wend */ \
+ ERTS_ALC_T_ESTACK /* alloc_type */ \
+ }
#define WSTACK_CHANGE_ALLOCATOR(s,t) \
do { \
- if (WSTK_CONCAT(s,_start) != WSTK_CONCAT(s,_default_stack)) { \
+ if (s.wstart != WSTK_DEF_STACK(s)) { \
erl_exit(1, "Internal error - trying to change allocator " \
"type of active wstack\n"); \
} \
- WSTK_CONCAT(s,_alloc_type) = (t); \
+ s.alloc_type = (t); \
} while (0)
-#define DESTROY_WSTACK(s) \
-do { \
- if (WSTK_CONCAT(s,_start) != WSTK_CONCAT(s,_default_stack)) { \
- erts_free(WSTK_CONCAT(s,_alloc_type), WSTK_CONCAT(s,_start)); \
- } \
+#define DESTROY_WSTACK(s) \
+do { \
+ if (s.wstart != WSTK_DEF_STACK(s)) { \
+ erts_free(s.alloc_type, s.wstart); \
+ } \
} while(0)
+
/*
- * Do not free the stack after this, it may have pointers into what
- * was saved in 'v'. 'v' and 'vsize' are changed by this macro. If
- * 'v' points to anything, it should have been allocated by a previous
- * call to this macro. Be careful to set a correct allocator prior to
- * saving.
- * 'v' can be any lvalue pointer, it will point to an array of UWord
- * after calling this macro.
+ * Do not free the stack after this, it may have pointers into what
+ * was saved in 'dst'.
*/
-#define WSTACK_SAVE(s,v,vsize) /* v and vsize are "name parameters" */ \
-do { \
- Uint _wsz = WSTACK_COUNT(s); \
- if (WSTK_CONCAT(s,_start) == WSTK_CONCAT(s,_default_stack)) { \
- if ((v) == NULL) { \
- (v) = erts_alloc(WSTK_CONCAT(s,_alloc_type), \
- DEF_WSTACK_SIZE * sizeof(UWord)); \
- } \
- memcpy((v),WSTK_CONCAT(s,_start),_wsz*sizeof(UWord)); \
- } else { \
- (v) = (void *) WSTK_CONCAT(s,_start); \
- } \
- (vsize) = _wsz; \
+#define WSTACK_SAVE(s,dst)\
+do {\
+ if (s.wstart == WSTK_DEF_STACK(s)) {\
+ UWord _wsz = WSTACK_COUNT(s);\
+ (dst)->wstart = erts_alloc(s.alloc_type,\
+ DEF_WSTACK_SIZE * sizeof(UWord));\
+ memcpy((dst)->wstart, s.wstart,_wsz*sizeof(UWord));\
+ (dst)->wsp = (dst)->wstart + _wsz;\
+ (dst)->wend = (dst)->wstart + DEF_WSTACK_SIZE;\
+ (dst)->alloc_type = s.alloc_type;\
+ } else\
+ *(dst) = s;\
} while (0)
-/*
- * Use on empty stack, only the allocator can be changed before this
- * The vector parameter is reset to NULL if the vector is moved to stack,
- * otherwise it's kept for reuse, so a saved and restored vector might
- * need freeing using the correct allocator parameter.
- * 'v' can be any lvalue pointer, it's cast to an (UWord *).
+#define DESTROY_SAVED_WSTACK(wstack)\
+do {\
+ if ((wstack)->wstart) {\
+ erts_free((wstack)->alloc_type, (wstack)->wstart);\
+ (wstack)->wstart = NULL;\
+ }\
+} while(0)
+
+#define CLEAR_SAVED_WSTACK(wstack) ((void) ((wstack)->wstart = NULL))
+
+/*
+ * Use on empty stack, only the allocator can be changed before this.
+ * The src stack is reset to NULL.
*/
-#define WSTACK_RESTORE(s, v, vsize) /*v is a "name parameter"*/ \
-do { \
- if ((vsize) > DEF_WSTACK_SIZE) { \
- Uint _ca = DEF_WSTACK_SIZE; \
- while (_ca < (vsize)) \
- _ca = _ca * 2; \
- WSTK_CONCAT(s,_start) = (UWord *) (v); \
- WSTK_CONCAT(s,_end) = ((UWord *)(v)) + _ca; \
- WSTK_CONCAT(s,_sp) = WSTK_CONCAT(s,_start) + (vsize); \
- (v) = NULL; \
- } else { \
- memcpy(WSTK_CONCAT(s,_start),(v),(vsize)*sizeof(UWord));\
- WSTK_CONCAT(s,_sp) = WSTK_CONCAT(s,_start) + (vsize); \
- } \
- } while (0)
+#define WSTACK_RESTORE(s, src) \
+do { \
+ ASSERT(s.wstart == WSTK_DEF_STACK(s)); \
+ s = *(src); /* struct copy */ \
+ (src)->wstart = NULL; \
+ ASSERT(s.wsp >= s.wstart); \
+ ASSERT(s.wsp <= s.wend); \
+} while (0)
-#define WSTACK_IS_STATIC(s) (WSTK_CONCAT(s,_start) == WSTK_CONCAT(s,_default_stack))
+#define WSTACK_IS_STATIC(s) (s.wstart == WSTK_DEF_STACK(s)))
-#define WSTACK_PUSH(s, x) \
-do { \
- if (WSTK_CONCAT(s,_sp) == WSTK_CONCAT(s,_end)) { \
- erl_grow_wstack(WSTK_CONCAT(s,_alloc_type), &WSTK_CONCAT(s,_start), \
- &WSTK_CONCAT(s,_sp), &WSTK_CONCAT(s,_end)); \
- } \
- *WSTK_CONCAT(s,_sp)++ = (x); \
+#define WSTACK_PUSH(s, x) \
+do { \
+ if (s.wsp == s.wend) { \
+ erl_grow_wstack(&s, WSTK_DEF_STACK(s)); \
+ } \
+ *s.wsp++ = (x); \
} while(0)
-#define WSTACK_PUSH2(s, x, y) \
-do { \
- if (WSTK_CONCAT(s,_sp) > WSTK_CONCAT(s,_end) - 2) { \
- erl_grow_wstack(WSTK_CONCAT(s,_alloc_type), &WSTK_CONCAT(s,_start), \
- &WSTK_CONCAT(s,_sp), &WSTK_CONCAT(s,_end)); \
- } \
- *WSTK_CONCAT(s,_sp)++ = (x); \
- *WSTK_CONCAT(s,_sp)++ = (y); \
+#define WSTACK_PUSH2(s, x, y) \
+do { \
+ if (s.wsp > s.wend - 2) { \
+ erl_grow_wstack(&s, WSTK_DEF_STACK(s)); \
+ } \
+ *s.wsp++ = (x); \
+ *s.wsp++ = (y); \
} while(0)
-#define WSTACK_PUSH3(s, x, y, z) \
-do { \
- if (WSTK_CONCAT(s,_sp) > WSTK_CONCAT(s,_end) - 3) { \
- erl_grow_wstack(WSTK_CONCAT(s,_alloc_type), &WSTK_CONCAT(s,_start), \
- &WSTK_CONCAT(s,_sp), &WSTK_CONCAT(s,_end)); \
- } \
- *WSTK_CONCAT(s,_sp)++ = (x); \
- *WSTK_CONCAT(s,_sp)++ = (y); \
- *WSTK_CONCAT(s,_sp)++ = (z); \
+#define WSTACK_PUSH3(s, x, y, z) \
+do { \
+ if (s.wsp > s.wend - 3) { \
+ erl_grow_wstack(&s, WSTK_DEF_STACK(s)); \
+ } \
+ *s.wsp++ = (x); \
+ *s.wsp++ = (y); \
+ *s.wsp++ = (z); \
} while(0)
-#define WSTACK_COUNT(s) (WSTK_CONCAT(s,_sp) - WSTK_CONCAT(s,_start))
+#define WSTACK_COUNT(s) (s.wsp - s.wstart)
+#define WSTACK_ISEMPTY(s) (s.wsp == s.wstart)
+#define WSTACK_POP(s) (*(--s.wsp))
-#define WSTACK_ISEMPTY(s) (WSTK_CONCAT(s,_sp) == WSTK_CONCAT(s,_start))
-#define WSTACK_POP(s) (*(--WSTK_CONCAT(s,_sp)))
/* binary.c */
@@ -655,6 +657,10 @@ Eterm erl_send(Process *p, Eterm to, Eterm msg);
Eterm erl_is_function(Process* p, Eterm arg1, Eterm arg2);
+/* beam_bif_load.c */
+Eterm erts_check_process_code(Process *c_p, Eterm module, int allow_gc, int *redsp);
+
+
/* beam_load.c */
typedef struct {
BeamInstr* current; /* Pointer to: Mod, Name, Arity */
@@ -847,11 +853,18 @@ Uint erts_port_ioq_size(Port *pp);
void erts_stale_drv_select(Eterm, ErlDrvPort, ErlDrvEvent, int, int);
Port *erts_get_heart_port(void);
+void erts_emergency_close_ports(void);
#if defined(ERTS_SMP) && defined(ERTS_ENABLE_LOCK_COUNT)
void erts_lcnt_enable_io_lock_count(int enable);
#endif
+/* driver_tab.c */
+typedef void *(*ErtsStaticNifInitFPtr)(void);
+ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name, int len);
+int erts_is_static_nif(void *handle);
+void erts_init_static_drivers(void);
+
/* erl_drv_thread.c */
void erl_drv_thr_init(void);
@@ -911,6 +924,17 @@ char *erts_convert_filename_to_native(Eterm name, char *statbuf,
ErtsAlcType_t alloc_type,
int allow_empty, int allow_atom,
Sint *used /* out */);
+char *erts_convert_filename_to_encoding(Eterm name, char *statbuf,
+ size_t statbuf_size,
+ ErtsAlcType_t alloc_type,
+ int allow_empty, int allow_atom,
+ int encoding,
+ Sint *used /* out */,
+ Uint extra);
+char* erts_convert_filename_to_wchar(byte* bytes, Uint size,
+ char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, Sint* used,
+ Uint extra_wchars);
Eterm erts_convert_native_to_filename(Process *p, byte *bytes);
Eterm erts_utf8_to_list(Process *p, Uint num, byte *bytes, Uint sz, Uint left,
Uint *num_built, Uint *num_eaten, Eterm tail);
@@ -933,20 +957,67 @@ struct Sint_buf {
};
char* Sint_to_buf(Sint, struct Sint_buf*);
+#define ERTS_IOLIST_STATE_INITER(C_P, OBJ) \
+ {(C_P), 0, 0, (OBJ), {NULL, NULL, NULL, ERTS_ALC_T_INVALID}, 0, 0}
+
+#define ERTS_IOLIST_STATE_MOVE(TO, FROM) \
+ sys_memcpy((void *) (TO), (void *) (FROM), sizeof(ErtsIOListState))
+
+#define ERTS_IOLIST_SIZE_YIELDS_COUNT_PER_RED 8
+
+typedef struct {
+ Process *c_p;
+ ErlDrvSizeT size;
+ Uint offs;
+ Eterm obj;
+ ErtsEStack estack;
+ int reds_left;
+ int have_size;
+} ErtsIOListState;
+
+#define ERTS_IOLIST2BUF_STATE_INITER(C_P, OBJ) \
+ {ERTS_IOLIST_STATE_INITER((C_P), (OBJ)), {NULL, 0, 0, 0}, NULL, 0, NULL, 0}
+
+#define ERTS_IOLIST2BUF_STATE_MOVE(TO, FROM) \
+ sys_memcpy((void *) (TO), (void *) (FROM), sizeof(ErtsIOList2BufState))
+
+#define ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT 32
+#define ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED 8
+#define ERTS_IOLIST_TO_BUF_BYTES_PER_RED \
+ (ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED*ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT)
+
+typedef struct {
+ ErtsIOListState iolist;
+ struct {
+ byte *bptr;
+ size_t size;
+ Uint bitoffs;
+ Uint bitsize;
+ } bcopy;
+ char *buf;
+ ErlDrvSizeT len;
+ Eterm *objp;
+ int offset;
+} ErtsIOList2BufState;
+
#define ERTS_IOLIST_OK 0
#define ERTS_IOLIST_OVERFLOW 1
#define ERTS_IOLIST_TYPE 2
+#define ERTS_IOLIST_YIELD 3
Eterm buf_to_intlist(Eterm**, const char*, size_t, Eterm); /* most callers pass plain char*'s */
#define ERTS_IOLIST_TO_BUF_OVERFLOW (~((ErlDrvSizeT) 0))
#define ERTS_IOLIST_TO_BUF_TYPE_ERROR (~((ErlDrvSizeT) 1))
+#define ERTS_IOLIST_TO_BUF_YIELD (~((ErlDrvSizeT) 2))
#define ERTS_IOLIST_TO_BUF_FAILED(R) \
- (((R) & (~((ErlDrvSizeT) 1))) == (~((ErlDrvSizeT) 1)))
+ (((R) & (~((ErlDrvSizeT) 3))) == (~((ErlDrvSizeT) 3)))
#define ERTS_IOLIST_TO_BUF_SUCCEEDED(R) \
(!ERTS_IOLIST_TO_BUF_FAILED((R)))
ErlDrvSizeT erts_iolist_to_buf(Eterm, char*, ErlDrvSizeT);
+ErlDrvSizeT erts_iolist_to_buf_yielding(ErtsIOList2BufState *);
+int erts_iolist_size_yielding(ErtsIOListState *state);
int erts_iolist_size(Eterm, ErlDrvSizeT *);
int is_string(Eterm);
void erl_at_exit(void (*) (void*), void*);
@@ -980,6 +1051,7 @@ Eterm erts_gc_length_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_size_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_bit_size_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_byte_size_1(Process* p, Eterm* reg, Uint live);
+Eterm erts_gc_map_size_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_abs_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_float_1(Process* p, Eterm* reg, Uint live);
Eterm erts_gc_round_1(Process* p, Eterm* reg, Uint live);
@@ -1110,7 +1182,12 @@ erts_alloc_message_heap_state(Uint size,
if (statep)
*statep = state;
if ((state & (ERTS_PSFLG_EXITING|ERTS_PSFLG_PENDING_EXIT))
+ || (receiver->flags & F_DISABLE_GC)
|| HEAP_LIMIT(receiver) - HEAP_TOP(receiver) <= size) {
+ /*
+ * The heap is either potentially in an inconsistent
+ * state, or not large enough.
+ */
#ifdef ERTS_SMP
if (locked_main) {
*receiver_locks &= ~ERTS_PROC_LOCK_MAIN;
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 9076bbe73c..7c6696405b 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -46,9 +46,12 @@
#define ERTS_WANT_EXTERNAL_TAGS
#include "external.h"
#include "dtrace-wrapper.h"
+#include "erl_map.h"
extern ErlDrvEntry fd_driver_entry;
+#ifndef __OSE__
extern ErlDrvEntry vanilla_driver_entry;
+#endif
extern ErlDrvEntry spawn_driver_entry;
extern ErlDrvEntry *driver_tab[]; /* table of static drivers, only used during initialization */
@@ -244,11 +247,13 @@ static ERTS_INLINE void port_init_instr(Port *prt
ASSERT(prt->drv_ptr && prt->lock);
if (!prt->drv_ptr->lock) {
char *lock_str = "port_lock";
+ erts_mtx_init_locked_x(prt->lock, lock_str, id,
#ifdef ERTS_ENABLE_LOCK_COUNT
- if (!(erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK))
- lock_str = NULL;
+ (erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK)
+#else
+ 0
#endif
- erts_mtx_init_locked_x(prt->lock, lock_str, id);
+ );
}
#endif
erts_port_task_init_sched(&prt->sched, id);
@@ -909,8 +914,8 @@ int erts_port_handle_xports(Port *prt)
(iov)->iov_base = (ptr); \
(iov)->iov_len = (len); \
if (sizeof((iov)->iov_len) < sizeof(len) \
- /* Check if (len) overflowed (iov)->iov_len */ \
- && ((len) >> (sizeof((iov)->iov_len)*CHAR_BIT)) != 0) { \
+ /* Check if (len) overflowed (iov)->iov_len */ \
+ && (iov)->iov_len != (len)) { \
goto L_overflow; \
} \
*(bv)++ = (bin); \
@@ -1213,9 +1218,10 @@ typedef struct {
static ERTS_INLINE ErtsTryImmDrvCallResult
try_imm_drv_call(ErtsTryImmDrvCallState *sp)
{
+ unsigned int prof_runnable_ports;
ErtsTryImmDrvCallResult res;
int reds_left_in;
- erts_aint32_t invalid_state, invalid_sched_flags;
+ erts_aint32_t act, exp, invalid_state, invalid_sched_flags;
Port *prt = sp->port;
Process *c_p = sp->c_p;
@@ -1242,18 +1248,39 @@ try_imm_drv_call(ErtsTryImmDrvCallState *sp)
goto locked_fail;
}
- sp->sched_flags = erts_smp_atomic32_read_nob(&prt->sched.flags);
- if (sp->sched_flags & invalid_sched_flags) {
- res = ERTS_TRY_IMM_DRV_CALL_INVALID_SCHED_FLAGS;
- goto locked_fail;
- }
+ prof_runnable_ports = erts_system_profile_flags.runnable_ports;
+ if (prof_runnable_ports)
+ erts_port_task_sched_lock(&prt->sched);
+
+ act = erts_smp_atomic32_read_nob(&prt->sched.flags);
+ do {
+ erts_aint32_t new;
+
+ if (act & invalid_sched_flags) {
+ res = ERTS_TRY_IMM_DRV_CALL_INVALID_SCHED_FLAGS;
+ sp->sched_flags = act;
+ goto locked_fail;
+ }
+ exp = act;
+ new = act | ERTS_PTS_FLG_EXEC_IMM;
+ act = erts_smp_atomic32_cmpxchg_mb(&prt->sched.flags, new, exp);
+ } while (act != exp);
+
+ sp->sched_flags = act;
if (!c_p)
reds_left_in = CONTEXT_REDS/10;
else {
if (IS_TRACED_FL(c_p, F_TRACE_SCHED_PROCS))
trace_virtual_sched(c_p, am_out);
+ /*
+ * No status lock held while sending runnable
+ * proc trace messages. It is however not needed
+ * in this case, since only this thread can send
+ * such messages for this process until the process
+ * has been scheduled out.
+ */
if (erts_system_profile_flags.runnable_procs
&& erts_system_profile_flags.exclusive)
profile_runnable_proc(c_p, am_inactive);
@@ -1268,11 +1295,14 @@ try_imm_drv_call(ErtsTryImmDrvCallState *sp)
ERTS_SMP_CHK_NO_PROC_LOCKS;
- if (IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS))
- trace_sched_ports_where(prt, am_in, sp->port_op);
- if (erts_system_profile_flags.runnable_ports
- && !erts_port_is_scheduled(prt))
- profile_runnable_port(prt, am_active);
+ if (prof_runnable_ports | IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS)) {
+ if (prof_runnable_ports && !(act & (ERTS_PTS_FLG_IN_RUNQ|ERTS_PTS_FLG_EXEC)))
+ profile_runnable_port(prt, am_active);
+ if (IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS))
+ trace_sched_ports_where(prt, am_in, sp->port_op);
+ if (prof_runnable_ports)
+ erts_port_task_sched_unlock(&prt->sched);
+ }
sp->fpe_was_unmasked = erts_block_fpe();
@@ -1289,17 +1319,31 @@ finalize_imm_drv_call(ErtsTryImmDrvCallState *sp)
int reds;
Port *prt = sp->port;
Process *c_p = sp->c_p;
+ erts_aint32_t act;
+ unsigned int prof_runnable_ports;
reds = prt->reds;
reds += erts_port_driver_callback_epilogue(prt, NULL);
erts_unblock_fpe(sp->fpe_was_unmasked);
- if (IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS))
- trace_sched_ports_where(prt, am_out, sp->port_op);
- if (erts_system_profile_flags.runnable_ports
- && !erts_port_is_scheduled(prt))
- profile_runnable_port(prt, am_inactive);
+ prof_runnable_ports = erts_system_profile_flags.runnable_ports;
+ if (prof_runnable_ports)
+ erts_port_task_sched_lock(&prt->sched);
+
+ act = erts_smp_atomic32_read_band_mb(&prt->sched.flags,
+ ~ERTS_PTS_FLG_EXEC_IMM);
+ ERTS_SMP_LC_ASSERT(act & ERTS_PTS_FLG_EXEC_IMM);
+
+ if (prof_runnable_ports | IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS)) {
+ if (IS_TRACED_FL(prt, F_TRACE_SCHED_PORTS))
+ trace_sched_ports_where(prt, am_out, sp->port_op);
+ if (prof_runnable_ports) {
+ if (!(act & (ERTS_PTS_FLG_IN_RUNQ|ERTS_PTS_FLG_EXEC)))
+ profile_runnable_port(prt, am_inactive);
+ erts_port_task_sched_unlock(&prt->sched);
+ }
+ }
erts_port_release(prt);
@@ -1314,6 +1358,13 @@ finalize_imm_drv_call(ErtsTryImmDrvCallState *sp)
if (IS_TRACED_FL(c_p, F_TRACE_SCHED_PROCS))
trace_virtual_sched(c_p, am_in);
+ /*
+ * No status lock held while sending runnable
+ * proc trace messages. It is however not needed
+ * in this case, since only this thread can send
+ * such messages for this process until the process
+ * has been scheduled out.
+ */
if (erts_system_profile_flags.runnable_procs
&& erts_system_profile_flags.exclusive)
profile_runnable_proc(c_p, am_active);
@@ -2468,7 +2519,7 @@ set_port_connected(int bang_op,
DTRACE_CHARBUF(newprocess_str, DTRACE_TERM_BUF_SIZE);
dtrace_pid_str(connect, process_str);
- erts_snprintf(port_str, sizeof(port_str), "%T", prt->common.id);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", prt->common.id);
dtrace_proc_str(rp, newprocess_str);
DTRACE4(port_connect, process_str, port_str, prt->name, newprocess_str);
}
@@ -2742,8 +2793,10 @@ void erts_init_io(int port_tab_size,
&drv_list_rwmtx_opts,
"driver_list");
driver_list = NULL;
- erts_smp_tsd_key_create(&driver_list_lock_status_key);
- erts_smp_tsd_key_create(&driver_list_last_error_key);
+ erts_smp_tsd_key_create(&driver_list_lock_status_key,
+ "erts_driver_list_lock_status_key");
+ erts_smp_tsd_key_create(&driver_list_last_error_key,
+ "erts_driver_list_last_error_key");
erts_ptab_init_table(&erts_port,
ERTS_ALC_T_PORT_TABLE,
@@ -2763,8 +2816,11 @@ void erts_init_io(int port_tab_size,
erts_smp_rwmtx_rwlock(&erts_driver_list_lock);
init_driver(&fd_driver, &fd_driver_entry, NULL);
+#ifndef __OSE__
init_driver(&vanilla_driver, &vanilla_driver_entry, NULL);
+#endif
init_driver(&spawn_driver, &spawn_driver_entry, NULL);
+ erts_init_static_drivers();
for (dp = driver_tab; *dp != NULL; dp++)
erts_add_driver_entry(*dp, NULL, 1);
@@ -3581,9 +3637,9 @@ erts_deliver_port_exit(Port *p, Eterm from, Eterm reason, int send_closed)
DTRACE_CHARBUF(port_str, DTRACE_TERM_BUF_SIZE);
DTRACE_CHARBUF(rreason_str, 64);
- erts_snprintf(from_str, sizeof(from_str), "%T", from);
+ erts_snprintf(from_str, sizeof(DTRACE_CHARBUF_NAME(from_str)), "%T", from);
dtrace_port_str(p, port_str);
- erts_snprintf(rreason_str, sizeof(rreason_str), "%T", rreason);
+ erts_snprintf(rreason_str, sizeof(DTRACE_CHARBUF_NAME(rreason_str)), "%T", rreason);
DTRACE4(port_exit, from_str, port_str, p->name, rreason_str);
}
#endif
@@ -4031,6 +4087,9 @@ erts_port_control(Process* c_p,
size,
&resp_bufp,
&resp_size);
+
+ control_flags = prt->control_flags;
+
finalize_imm_drv_call(&try_call_state);
if (tmp_alloced)
erts_free(ERTS_ALC_T_TMP, bufp);
@@ -4038,8 +4097,6 @@ erts_port_control(Process* c_p,
return ERTS_PORT_OP_BADARG;
}
- control_flags = prt->control_flags;
-
hsz = port_control_result_size(control_flags,
resp_bufp,
&resp_size,
@@ -4428,7 +4485,7 @@ make_port_info_term(Eterm **hpp_start,
int len;
int start;
static Eterm item[] = ERTS_PORT_INFO_1_ITEMS;
- static Eterm value[sizeof(item)/sizeof(item[0])];
+ Eterm value[sizeof(item)/sizeof(item[0])];
start = 0;
len = sizeof(item)/sizeof(item[0]);
@@ -4650,7 +4707,7 @@ set_busy_port(ErlDrvPort dprt, int on)
#ifdef USE_VM_PROBES
if (DTRACE_ENABLED(port_busy)) {
- erts_snprintf(port_str, sizeof(port_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
"%T", prt->common.id);
DTRACE1(port_busy, port_str);
}
@@ -4663,7 +4720,7 @@ set_busy_port(ErlDrvPort dprt, int on)
#ifdef USE_VM_PROBES
if (DTRACE_ENABLED(port_not_busy)) {
- erts_snprintf(port_str, sizeof(port_str),
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
"%T", prt->common.id);
DTRACE1(port_not_busy, port_str);
}
@@ -4715,9 +4772,9 @@ erts_port_resume_procs(Port *prt)
DTRACE_CHARBUF(pid_str, 16);
ErtsProcList* plp2 = plp;
- erts_snprintf(port_str, sizeof(port_str), "%T", prt->common.id);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", prt->common.id);
while (plp2 != NULL) {
- erts_snprintf(pid_str, sizeof(pid_str), "%T", plp2->pid);
+ erts_snprintf(pid_str, sizeof(DTRACE_CHARBUF_NAME(pid_str)), "%T", plp2->pid);
DTRACE2(process_port_unblocked, pid_str, port_str);
}
}
@@ -5292,6 +5349,17 @@ driver_deliver_term(Eterm to, ErlDrvTermData* data, int len)
depth++;
break;
}
+ case ERL_DRV_MAP: { /* int */
+ ERTS_DDT_CHK_ENOUGH_ARGS(1);
+ if ((int) ptr[0] < 0) ERTS_DDT_FAIL;
+ need += MAP_HEADER_SIZE + 1 + 2*ptr[0];
+ depth -= 2*ptr[0];
+ if (depth < 0) ERTS_DDT_FAIL;
+ ptr++;
+ depth++;
+ break;
+ }
+
default:
ERTS_DDT_FAIL;
}
@@ -5528,6 +5596,36 @@ driver_deliver_term(Eterm to, ErlDrvTermData* data, int len)
ptr += 2;
break;
+ case ERL_DRV_MAP: { /* int */
+ int size = (int)ptr[0];
+ Eterm* tp = hp;
+ Eterm* vp;
+ map_t *mp;
+
+ *tp = make_arityval(size);
+
+ hp += 1 + size;
+ mp = (map_t*)hp;
+ mp->thing_word = MAP_HEADER;
+ mp->size = size;
+ mp->keys = make_tuple(tp);
+ mess = make_map(mp);
+
+ hp += MAP_HEADER_SIZE + size; /* advance "heap" pointer */
+
+ tp += size; /* point at last key */
+ vp = hp - 1; /* point at last value */
+
+ while(size--) {
+ *vp-- = ESTACK_POP(stack);
+ *tp-- = ESTACK_POP(stack);
+ }
+ if (!erts_validate_and_sort_map(mp))
+ ERTS_DDT_FAIL;
+ ptr++;
+ break;
+ }
+
}
ESTACK_PUSH(stack, mess);
}
@@ -6078,7 +6176,7 @@ driver_pdl_create(ErlDrvPort dp)
return NULL;
pdl = erts_alloc(ERTS_ALC_T_PORT_DATA_LOCK,
sizeof(struct erl_drv_port_data_lock));
- erts_mtx_init(&pdl->mtx, "port_data_lock");
+ erts_mtx_init_x(&pdl->mtx, "port_data_lock", pp->common.id, 1);
pdl_init_refc(pdl);
erts_port_inc_refc(pp);
pdl->prt = pp;
@@ -7060,7 +7158,7 @@ void *driver_dl_open(char * path)
int res;
int *last_error_p = erts_smp_tsd_get(driver_list_last_error_key);
int locked = maybe_lock_driver_list();
- if ((res = erts_sys_ddll_open(path, &ptr)) == 0) {
+ if ((res = erts_sys_ddll_open(path, &ptr, NULL)) == 0) {
maybe_unlock_driver_list(locked);
return ptr;
} else {
@@ -7115,7 +7213,7 @@ char *driver_dl_error(void)
#define ERL_DRV_SYS_INFO_SIZE(LAST_FIELD) \
- (((size_t) &((ErlDrvSysInfo *) 0)->LAST_FIELD) \
+ (offsetof(ErlDrvSysInfo, LAST_FIELD) \
+ sizeof(((ErlDrvSysInfo *) 0)->LAST_FIELD))
void
@@ -7177,6 +7275,18 @@ driver_system_info(ErlDrvSysInfo *sip, size_t si_size)
sip->nif_major_version = ERL_NIF_MAJOR_VERSION;
sip->nif_minor_version = ERL_NIF_MINOR_VERSION;
}
+ /*
+ * 'dirty_scheduler_support' is the last field in the 4th version
+ * (driver version 3.1, NIF version 2.7)
+ */
+ if (si_size >= ERL_DRV_SYS_INFO_SIZE(dirty_scheduler_support)) {
+#if defined(ERL_NIF_DIRTY_SCHEDULER_SUPPORT) && defined(USE_THREADS)
+ sip->dirty_scheduler_support = 1;
+#else
+ sip->dirty_scheduler_support = 0;
+#endif
+ }
+
}
@@ -7240,6 +7350,8 @@ no_stop_select_callback(ErlDrvEvent event, void* private)
erts_send_error_to_logger_nogl(dsbufp);
}
+#define IS_DRIVER_VERSION_GE(DE,MAJOR,MINOR) \
+ ((DE)->major_version >= (MAJOR) && (DE)->minor_version >= (MINOR))
static int
init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
@@ -7263,10 +7375,11 @@ init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
erts_atom_put((byte *) drv->name,
sys_strlen(drv->name),
ERTS_ATOM_ENC_LATIN1,
- 1)
+ 1),
#else
- NIL
+ NIL,
#endif
+ 1
);
}
#endif
@@ -7286,6 +7399,7 @@ init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
drv->timeout = de->timeout ? de->timeout : no_timeout_callback;
drv->ready_async = de->ready_async;
drv->process_exit = de->process_exit;
+ drv->emergency_close = IS_DRIVER_VERSION_GE(de,3,2) ? de->emergency_close : NULL;
if (de->stop_select)
drv->stop_select = de->stop_select;
else
@@ -7304,6 +7418,8 @@ init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
}
}
+#undef IS_DRIVER_VERSION_GE
+
void
erts_destroy_driver(erts_driver_t *drv)
{
@@ -7447,7 +7563,7 @@ Port *erts_get_heart_port(void)
if (!port)
continue;
/* only examine undead or alive ports */
- if (erts_atomic32_read_nob(&port->state) & ERTS_PORT_SFLGS_DEAD)
+ if (erts_atomic32_read_nob(&port->state) & ERTS_PORT_SFLGS_INVALID_DRIVER_LOOKUP)
continue;
/* immediate atom compare */
reg = port->common.u.alive.reg;
@@ -7458,3 +7574,23 @@ Port *erts_get_heart_port(void)
return NULL;
}
+
+void erts_emergency_close_ports(void)
+{
+ int ix, max = erts_ptab_max(&erts_port);
+
+ for (ix = 0; ix < max; ix++) {
+ Port *port = erts_pix2port(ix);
+
+ if (!port)
+ continue;
+ /* only examine undead or alive ports */
+ if (erts_atomic32_read_nob(&port->state) & ERTS_PORT_SFLGS_INVALID_DRIVER_LOOKUP)
+ continue;
+
+ /* emergency close socket */
+ if (port->drv_ptr->emergency_close) {
+ port->drv_ptr->emergency_close((ErlDrvData) port->drv_data);
+ }
+ }
+}
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 1e5ae46bfa..68fcc177ae 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -763,17 +763,17 @@ allocate_init t I y
#################################################################
#
-# The BIFs erlang:check_process_code/2 must be called like a function,
+# The BIFs erts_internal:check_process_code/2 must be called like a function,
# to ensure that c_p->i (program counter) is set correctly (an ordinary
# BIF call doesn't set it).
#
-call_ext u==2 Bif=u$bif:erlang:check_process_code/2 => i_call_ext Bif
-call_ext_last u==2 Bif=u$bif:erlang:check_process_code/2 D => i_call_ext_last Bif D
-call_ext_only u==2 Bif=u$bif:erlang:check_process_code/2 => i_call_ext_only Bif
+call_ext u==2 Bif=u$bif:erts_internal:check_process_code/2 => i_call_ext Bif
+call_ext_last u==2 Bif=u$bif:erts_internal:check_process_code/2 D => i_call_ext_last Bif D
+call_ext_only u==2 Bif=u$bif:erts_internal:check_process_code/2 => i_call_ext_only Bif
#
-# The BIFs erlang:garbage_collect/0,1 must be called like functions,
+# The BIFs erlang:garbage_collect/0 must be called like a function,
# to allow them to invoke the garbage collector. (The stack pointer must
# be saved and p->arity must be zeroed, which is not done on ordinary BIF calls.)
#
@@ -782,10 +782,6 @@ call_ext u==0 Bif=u$bif:erlang:garbage_collect/0 => i_call_ext Bif
call_ext_last u==0 Bif=u$bif:erlang:garbage_collect/0 D => i_call_ext_last Bif D
call_ext_only u==0 Bif=u$bif:erlang:garbage_collect/0 => i_call_ext_only Bif
-call_ext u==1 Bif=u$bif:erlang:garbage_collect/1 => i_call_ext Bif
-call_ext_last u==1 Bif=u$bif:erlang:garbage_collect/1 D => i_call_ext_last Bif D
-call_ext_only u==1 Bif=u$bif:erlang:garbage_collect/1 => i_call_ext_only Bif
-
#
# put/2 and erase/1 must be able to do garbage collection, so we must call
# them like functions.
@@ -1470,6 +1466,93 @@ apply I
apply_last I P
#
+# Map instructions in R17.
+#
+
+put_map_assoc F n Dst Live Size Rest=* => new_map F Dst Live Size Rest
+put_map_assoc F Src=s Dst Live Size Rest=* => \
+ update_map_assoc F Src Dst Live Size Rest
+put_map_assoc F Src Dst Live Size Rest=* => \
+ move Src x | update_map_assoc F x Dst Live Size Rest
+put_map_exact F n Dst Live Size Rest=* => new_map F Dst Live Size Rest
+put_map_exact F Src=s Dst Live Size Rest=* => \
+ update_map_exact F Src Dst Live Size Rest
+put_map_exact F Src Dst Live Size Rest=* => \
+ move Src x | update_map_exact F x Dst Live Size Rest
+
+new_map j d I I
+update_map_assoc j s d I I
+update_map_exact j s d I I
+
+is_map Fail Literal=q => move Literal x | is_map Fail x
+is_map Fail c => jump Fail
+
+%macro: is_map IsMap -fail_action
+is_map f r
+is_map f x
+is_map f y
+
+## Transform has_map_field(s) #{ K1 := _, K2 := _ }
+
+has_map_field/3
+
+has_map_fields Fail Src Size=u==1 Rest=* => gen_has_map_field(Fail,Src,Size,Rest)
+has_map_fields Fail Src Size Rest=* => i_has_map_fields Fail Src Size Rest
+
+i_has_map_fields f s I
+
+has_map_field Fail Src=rxy Key=arxy => i_has_map_field Fail Src Key
+has_map_field Fail Src Key => move Key x | i_has_map_field Fail Src x
+
+%macro: i_has_map_field HasMapField -fail_action
+i_has_map_field f r a
+i_has_map_field f x a
+i_has_map_field f y a
+i_has_map_field f r r
+i_has_map_field f x r
+i_has_map_field f y r
+i_has_map_field f r x
+i_has_map_field f x x
+i_has_map_field f y x
+i_has_map_field f r y
+i_has_map_field f x y
+i_has_map_field f y y
+
+## Transform get_map_elements(s) #{ K1 := V1, K2 := V2 }
+
+get_map_element/4
+
+get_map_elements Fail Src=rxy Size=u==2 Rest=* => gen_get_map_element(Fail,Src,Size,Rest)
+get_map_elements Fail Src Size Rest=* => i_get_map_elements Fail Src Size Rest
+
+i_get_map_elements f s I
+
+get_map_element Fail Src=rxy Key=ax Dst => i_get_map_element Fail Src Key Dst
+get_map_element Fail Src=rxy Key=rycq Dst => \
+ move Key x | i_get_map_element Fail Src x Dst
+get_map_element Fail Src Key Dst => jump Fail
+
+%macro: i_get_map_element GetMapElement -fail_action
+i_get_map_element f r a r
+i_get_map_element f x a r
+i_get_map_element f y a r
+i_get_map_element f r a x
+i_get_map_element f x a x
+i_get_map_element f y a x
+i_get_map_element f r a y
+i_get_map_element f x a y
+i_get_map_element f y a y
+i_get_map_element f r x r
+i_get_map_element f x x r
+i_get_map_element f y x r
+i_get_map_element f r x x
+i_get_map_element f x x x
+i_get_map_element f y x x
+i_get_map_element f r x y
+i_get_map_element f x x y
+i_get_map_element f y x y
+
+#
# Optimize addition and subtraction of small literals using
# the i_increment/4 instruction (in bodies, not in guards).
#
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 31252ed78f..c29d4b3777 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -38,6 +38,8 @@
#if defined (__WIN32__)
# include "erl_win_sys.h"
+#elif defined (__OSE__)
+# include "erl_ose_sys.h"
#else
# include "erl_unix_sys.h"
#ifndef UNIX
@@ -64,8 +66,12 @@
*/
#ifndef ERTS_SYS_FD_TYPE
+#define ERTS_SYS_FD_INVALID ((ErtsSysFdType) -1)
typedef int ErtsSysFdType;
#else
+#ifndef ERTS_SYS_FD_INVALID
+# error missing ERTS_SYS_FD_INVALID
+#endif
typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
#endif
@@ -152,10 +158,14 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
/* In VC++, noreturn is a declspec that has to be before the types,
* but in GNUC it is an att ribute to be placed between return type
* and function name, hence __decl_noreturn <types> __noreturn <function name>
+ *
+ * at some platforms (e.g. Android) __noreturn is defined at sys/cdef.h
*/
#if __GNUC__
# define __decl_noreturn
-# define __noreturn __attribute__((noreturn))
+# ifndef __noreturn
+# define __noreturn __attribute__((noreturn))
+# endif
#else
# if defined(__WIN32__) && defined(_MSC_VER)
# define __noreturn
@@ -268,6 +278,7 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
typedef unsigned int Eterm;
typedef unsigned int Uint;
typedef int Sint;
+#define ERTS_UINT_MAX UINT_MAX
#define ERTS_SIZEOF_ETERM SIZEOF_INT
#define ErtsStrToSint strtol
#else
@@ -279,18 +290,21 @@ typedef unsigned long UWord;
typedef long SWord;
#define SWORD_CONSTANT(Const) Const##L
#define UWORD_CONSTANT(Const) Const##UL
+#define ERTS_UWORD_MAX ULONG_MAX
#define ERTS_SWORD_MAX LONG_MAX
#elif SIZEOF_VOID_P == SIZEOF_INT
typedef unsigned int UWord;
typedef int SWord;
#define SWORD_CONSTANT(Const) Const
#define UWORD_CONSTANT(Const) Const##U
+#define ERTS_UWORD_MAX UINT_MAX
#define ERTS_SWORD_MAX INT_MAX
#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
typedef unsigned long long UWord;
typedef long long SWord;
#define SWORD_CONSTANT(Const) Const##LL
#define UWORD_CONSTANT(Const) Const##ULL
+#define ERTS_UWORD_MAX ULLONG_MAX
#define ERTS_SWORD_MAX LLONG_MAX
#else
#error Found no appropriate type to use for 'Eterm', 'Uint' and 'Sint'
@@ -304,6 +318,7 @@ typedef unsigned long Uint;
typedef long Sint;
#define SWORD_CONSTANT(Const) Const##L
#define UWORD_CONSTANT(Const) Const##UL
+#define ERTS_UWORD_MAX ULONG_MAX
#define ERTS_SWORD_MAX LONG_MAX
#define ERTS_SIZEOF_ETERM SIZEOF_LONG
#define ErtsStrToSint strtol
@@ -313,6 +328,7 @@ typedef unsigned int Uint;
typedef int Sint;
#define SWORD_CONSTANT(Const) Const
#define UWORD_CONSTANT(Const) Const##U
+#define ERTS_UWORD_MAX UINT_MAX
#define ERTS_SWORD_MAX INT_MAX
#define ERTS_SIZEOF_ETERM SIZEOF_INT
#define ErtsStrToSint strtol
@@ -322,6 +338,7 @@ typedef unsigned long long Uint;
typedef long long Sint;
#define SWORD_CONSTANT(Const) Const##LL
#define UWORD_CONSTANT(Const) Const##ULL
+#define ERTS_UWORD_MAX ULLONG_MAX
#define ERTS_SWORD_MAX LLONG_MAX
#define ERTS_SIZEOF_ETERM SIZEOF_LONG_LONG
#if defined(__WIN32__)
@@ -335,6 +352,7 @@ typedef long long Sint;
typedef Uint UWord;
typedef Sint SWord;
+#define ERTS_UINT_MAX ERTS_UWORD_MAX
#endif /* HALFWORD_HEAP */
@@ -487,7 +505,7 @@ extern volatile int erts_writing_erl_crash_dump;
# define NO_ERF
# define NO_ERFC
/* This definition doesn't take NaN into account, but matherr() gets those */
-# define finite(x) (fabs(x) != HUGE_VAL)
+# define isfinite(x) (fabs(x) != HUGE_VAL)
# define USE_MATHERR
# define HAVE_FINITE
#endif
@@ -661,8 +679,7 @@ typedef struct {
#define ERTS_SYS_DDLL_ERROR_INIT {NULL}
extern void erts_sys_ddll_free_error(ErtsSysDdllError*);
extern void erl_sys_ddll_init(void); /* to initialize mutexes etc */
-extern int erts_sys_ddll_open2(const char *path, void **handle, ErtsSysDdllError*);
-#define erts_sys_ddll_open(P,H) erts_sys_ddll_open2(P,H,NULL)
+extern int erts_sys_ddll_open(const char *path, void **handle, ErtsSysDdllError*);
extern int erts_sys_ddll_open_noext(char *path, void **handle, ErtsSysDdllError*);
extern int erts_sys_ddll_load_driver_init(void *handle, void **function);
extern int erts_sys_ddll_load_nif_init(void *handle, void **function,ErtsSysDdllError*);
@@ -731,6 +748,14 @@ void init_getenv_state(GETENV_STATE *);
char * getenv_string(GETENV_STATE *);
void fini_getenv_state(GETENV_STATE *);
+#define HAVE_ERTS_CHECK_IO_DEBUG
+typedef struct {
+ int no_used_fds;
+ int no_driver_select_structs;
+ int no_driver_event_structs;
+} ErtsCheckIoDebugInfo;
+int erts_check_io_debug(ErtsCheckIoDebugInfo *ip);
+
/* xxxP */
#define SYS_DEFAULT_FLOAT_DECIMALS 20
void init_sys_float(void);
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 0d75bbcc77..f810fca9a4 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,7 @@
#include "bif.h"
#include "erl_binary.h"
#include "erl_bits.h"
+#include "erl_map.h"
#include "packet_parser.h"
#include "erl_gc.h"
#define ERTS_WANT_DB_INTERNAL__
@@ -47,6 +48,7 @@
#include "erl_sched_spec_pre_alloc.h"
#include "beam_bp.h"
#include "erl_ptab.h"
+#include "erl_check_io.h"
#undef M_TRIM_THRESHOLD
#undef M_TOP_PAD
@@ -185,39 +187,41 @@ erts_set_hole_marker(Eterm* ptr, Uint sz)
* Helper function for the ESTACK macros defined in global.h.
*/
void
-erl_grow_stack(ErtsAlcType_t a_type, Eterm** start, Eterm** sp, Eterm** end)
+erl_grow_estack(ErtsEStack* s, Eterm* default_estack)
{
- Uint old_size = (*end - *start);
+ Uint old_size = (s->end - s->start);
Uint new_size = old_size * 2;
- Uint sp_offs = *sp - *start;
- if (new_size > 2 * DEF_ESTACK_SIZE) {
- *start = erts_realloc(a_type, (void *) *start, new_size*sizeof(Eterm));
+ Uint sp_offs = s->sp - s->start;
+ if (s->start != default_estack) {
+ s->start = erts_realloc(s->alloc_type, s->start,
+ new_size*sizeof(Eterm));
} else {
- Eterm* new_ptr = erts_alloc(a_type, new_size*sizeof(Eterm));
- sys_memcpy(new_ptr, *start, old_size*sizeof(Eterm));
- *start = new_ptr;
+ Eterm* new_ptr = erts_alloc(s->alloc_type, new_size*sizeof(Eterm));
+ sys_memcpy(new_ptr, s->start, old_size*sizeof(Eterm));
+ s->start = new_ptr;
}
- *end = *start + new_size;
- *sp = *start + sp_offs;
+ s->end = s->start + new_size;
+ s->sp = s->start + sp_offs;
}
/*
- * Helper function for the ESTACK macros defined in global.h.
+ * Helper function for the WSTACK macros defined in global.h.
*/
void
-erl_grow_wstack(ErtsAlcType_t a_type, UWord** start, UWord** sp, UWord** end)
+erl_grow_wstack(ErtsWStack* s, UWord* default_wstack)
{
- Uint old_size = (*end - *start);
+ Uint old_size = (s->wend - s->wstart);
Uint new_size = old_size * 2;
- Uint sp_offs = *sp - *start;
- if (new_size > 2 * DEF_ESTACK_SIZE) {
- *start = erts_realloc(a_type, (void *) *start, new_size*sizeof(UWord));
+ Uint sp_offs = s->wsp - s->wstart;
+ if (s->wstart != default_wstack) {
+ s->wstart = erts_realloc(s->alloc_type, s->wstart,
+ new_size*sizeof(UWord));
} else {
- UWord* new_ptr = erts_alloc(a_type, new_size*sizeof(UWord));
- sys_memcpy(new_ptr, *start, old_size*sizeof(UWord));
- *start = new_ptr;
+ UWord* new_ptr = erts_alloc(s->alloc_type, new_size*sizeof(UWord));
+ sys_memcpy(new_ptr, s->wstart, old_size*sizeof(UWord));
+ s->wstart = new_ptr;
}
- *end = *start + new_size;
- *sp = *start + sp_offs;
+ s->wend = s->wstart + new_size;
+ s->wsp = s->wstart + sp_offs;
}
/* CTYPE macros */
@@ -255,7 +259,7 @@ erl_grow_wstack(ErtsAlcType_t a_type, UWord** start, UWord** sp, UWord** end)
* Returns -1 if not a proper list (i.e. not terminated with NIL)
*/
int
-list_length(Eterm list)
+erts_list_length(Eterm list)
{
int i = 0;
@@ -703,7 +707,7 @@ erts_bld_atom_2uint_3tup_list(Uint **hpp, Uint *szp, Sint length,
** If N < 0, Y = FUNNY_NUMBER4 else Y = FUNNY_NUMBER3.
** The hash value is Y*h(J) mod 2^32 where h(J) is calculated like
** h(0) = <initial hash>
-** h(i) = h(i-i)*X + B(i-1)
+** h(i) = h(i-1)*X + B(i-1)
** The above should hold regardless of internal representation.
** Pids are hashed like small numbers but with differrent constants, as are
** ports.
@@ -732,6 +736,8 @@ erts_bld_atom_2uint_3tup_list(Uint **hpp, Uint *szp, Sint length,
#define FUNNY_NUMBER10 268440479
#define FUNNY_NUMBER11 268440577
#define FUNNY_NUMBER12 268440581
+#define FUNNY_NUMBER13 268440593
+#define FUNNY_NUMBER14 268440611
static Uint32
hash_binary_bytes(Eterm bin, Uint sz, Uint32 hash)
@@ -783,10 +789,10 @@ Uint32 make_hash(Eterm term_arg)
unsigned op;
/* Must not collide with the real tag_val_def's: */
-#define MAKE_HASH_TUPLE_OP 0x10
-#define MAKE_HASH_FUN_OP 0x11
-#define MAKE_HASH_CDR_PRE_OP 0x12
-#define MAKE_HASH_CDR_POST_OP 0x13
+#define MAKE_HASH_TUPLE_OP 0x11
+#define MAKE_HASH_TERM_ARRAY_OP 0x12
+#define MAKE_HASH_CDR_PRE_OP 0x13
+#define MAKE_HASH_CDR_POST_OP 0x14
/*
** Convenience macro for calculating a bytewise hash on an unsigned 32 bit
@@ -875,7 +881,7 @@ tail_recur:
hash = hash*FUNNY_NUMBER2 + funp->fe->old_uniq;
if (num_free > 0) {
if (num_free > 1) {
- WSTACK_PUSH3(stack, (UWord) &funp->env[1], (num_free-1), MAKE_HASH_FUN_OP);
+ WSTACK_PUSH3(stack, (UWord) &funp->env[1], (num_free-1), MAKE_HASH_TERM_ARRAY_OP);
}
term = funp->env[0];
goto tail_recur;
@@ -965,6 +971,24 @@ tail_recur:
hash *= is_neg ? FUNNY_NUMBER4 : FUNNY_NUMBER3;
break;
}
+ case MAP_DEF:
+ {
+ map_t *mp = (map_t *)map_val(term);
+ int size = map_get_size(mp);
+ Eterm *ks = map_get_keys(mp);
+ Eterm *vs = map_get_values(mp);
+
+ /* Use a prime with size to remedy some of
+ * the {} and <<>> hash problems */
+ hash = hash*FUNNY_NUMBER13 + FUNNY_NUMBER14 + size;
+ if (size == 0)
+ break;
+
+ /* push values first */
+ WSTACK_PUSH3(stack, (UWord)vs, (UWord) size, MAKE_HASH_TERM_ARRAY_OP);
+ WSTACK_PUSH3(stack, (UWord)ks, (UWord) size, MAKE_HASH_TERM_ARRAY_OP);
+ break;
+ }
case TUPLE_DEF:
{
Eterm* ptr = tuple_val(term);
@@ -974,7 +998,7 @@ tail_recur:
op = MAKE_HASH_TUPLE_OP;
}/*fall through*/
case MAKE_HASH_TUPLE_OP:
- case MAKE_HASH_FUN_OP:
+ case MAKE_HASH_TERM_ARRAY_OP:
{
Uint i = (Uint) WSTACK_POP(stack);
Eterm* ptr = (Eterm*) WSTACK_POP(stack);
@@ -1068,9 +1092,11 @@ Uint32
make_hash2(Eterm term)
{
Uint32 hash;
+ Uint32 hash_xor_keys = 0;
+ Uint32 hash_xor_values = 0;
DeclareTmpHeapNoproc(tmp_big,2);
-/* (HCONST * {2, ..., 14}) mod 2^32 */
+/* (HCONST * {2, ..., 16}) mod 2^32 */
#define HCONST_2 0x3c6ef372UL
#define HCONST_3 0xdaa66d2bUL
#define HCONST_4 0x78dde6e4UL
@@ -1085,6 +1111,11 @@ make_hash2(Eterm term)
#define HCONST_13 0x08d12e65UL
#define HCONST_14 0xa708a81eUL
#define HCONST_15 0x454021d7UL
+#define HCONST_16 0xe3779b90UL
+
+#define HASH_MAP_TAIL (_make_header(1,_TAG_HEADER_REF))
+#define HASH_MAP_KEY (_make_header(2,_TAG_HEADER_REF))
+#define HASH_MAP_VAL (_make_header(3,_TAG_HEADER_REF))
#define UINT32_HASH_2(Expr1, Expr2, AConst) \
do { \
@@ -1180,11 +1211,45 @@ make_hash2(Eterm term)
UINT32_HASH(arity, HCONST_9);
if (arity == 0) /* Empty tuple */
goto hash2_common;
- for (i = arity; i >= 2; i--) {
+ for (i = arity; i >= 1; i--) {
tmp = elem[i];
ESTACK_PUSH(s, tmp);
}
- term = elem[1];
+ goto hash2_common;
+ }
+ break;
+ case MAP_SUBTAG:
+ {
+ map_t *mp = (map_t *)map_val(term);
+ int i;
+ int size = map_get_size(mp);
+ Eterm *ks = map_get_keys(mp);
+ Eterm *vs = map_get_values(mp);
+ UINT32_HASH(size, HCONST_16);
+ if (size == 0) {
+ goto hash2_common;
+ }
+ ESTACK_PUSH(s, hash_xor_values);
+ ESTACK_PUSH(s, hash_xor_keys);
+ ESTACK_PUSH(s, hash);
+ ESTACK_PUSH(s, HASH_MAP_TAIL);
+ hash = 0;
+ hash_xor_keys = 0;
+ hash_xor_values = 0;
+ for (i = size - 1; i >= 0; i--) {
+ tmp = vs[i];
+ ESTACK_PUSH(s, HASH_MAP_VAL);
+ ESTACK_PUSH(s, tmp);
+ }
+ /* We do not want to expose the tuple representation.
+ * Do not push the keys as a tuple.
+ */
+ for (i = size - 1; i >= 0; i--) {
+ tmp = ks[i];
+ ESTACK_PUSH(s, HASH_MAP_KEY);
+ ESTACK_PUSH(s, tmp);
+ }
+ goto hash2_common;
}
break;
case EXPORT_SUBTAG:
@@ -1378,15 +1443,47 @@ make_hash2(Eterm term)
default:
erl_exit(1, "Invalid tag in make_hash2(0x%X)\n", term);
hash2_common:
+
+ /* Uint32 hash always has the hash value of the previous term,
+ * compounded or otherwise.
+ */
+
if (ESTACK_ISEMPTY(s)) {
DESTROY_ESTACK(s);
UnUseTmpHeapNoproc(2);
return hash;
}
+
term = ESTACK_POP(s);
+
+ switch (term) {
+ case HASH_MAP_TAIL: {
+ hash = (Uint32) ESTACK_POP(s);
+ UINT32_HASH(hash_xor_keys, HCONST_16);
+ UINT32_HASH(hash_xor_values, HCONST_16);
+ hash_xor_keys = (Uint32) ESTACK_POP(s);
+ hash_xor_values = (Uint32) ESTACK_POP(s);
+ goto hash2_common;
+ }
+ case HASH_MAP_KEY:
+ hash_xor_keys ^= hash;
+ hash = 0;
+ goto hash2_common;
+ case HASH_MAP_VAL:
+ hash_xor_values ^= hash;
+ hash = 0;
+ goto hash2_common;
+ default:
+ break;
+ }
}
}
}
+
+#undef HASH_MAP_TAIL
+#undef HASH_MAP_KEY
+#undef HASH_MAP_VAL
+
#undef UINT32_HASH_2
#undef UINT32_HASH
#undef SINT32_HASH
@@ -1488,7 +1585,7 @@ tail_recur:
hash = hash*FUNNY_NUMBER2 + funp->fe->old_uniq;
if (num_free > 0) {
if (num_free > 1) {
- WSTACK_PUSH3(stack, (UWord) &funp->env[1], (num_free-1), MAKE_HASH_FUN_OP);
+ WSTACK_PUSH3(stack, (UWord) &funp->env[1], (num_free-1), MAKE_HASH_TERM_ARRAY_OP);
}
term = funp->env[0];
goto tail_recur;
@@ -1601,6 +1698,24 @@ tail_recur:
}
break;
+ case MAP_DEF:
+ {
+ map_t *mp = (map_t *)map_val(term);
+ int size = map_get_size(mp);
+ Eterm *ks = map_get_keys(mp);
+ Eterm *vs = map_get_values(mp);
+
+ /* Use a prime with size to remedy some of
+ * the {} and <<>> hash problems */
+ hash = hash*FUNNY_NUMBER13 + FUNNY_NUMBER14 + size;
+ if (size == 0)
+ break;
+
+ /* push values first */
+ WSTACK_PUSH3(stack, (UWord)vs, (UWord) size, MAKE_HASH_TERM_ARRAY_OP);
+ WSTACK_PUSH3(stack, (UWord)ks, (UWord) size, MAKE_HASH_TERM_ARRAY_OP);
+ break;
+ }
case TUPLE_DEF:
{
Eterm* ptr = tuple_val(term);
@@ -1610,7 +1725,7 @@ tail_recur:
op = MAKE_HASH_TUPLE_OP;
}/*fall through*/
case MAKE_HASH_TUPLE_OP:
- case MAKE_HASH_FUN_OP:
+ case MAKE_HASH_TERM_ARRAY_OP:
{
Uint i = (Uint) WSTACK_POP(stack);
Eterm* ptr = (Eterm*) WSTACK_POP(stack);
@@ -1638,7 +1753,7 @@ tail_recur:
return hash;
#undef MAKE_HASH_TUPLE_OP
-#undef MAKE_HASH_FUN_OP
+#undef MAKE_HASH_TERM_ARRAY_OP
#undef MAKE_HASH_CDR_PRE_OP
#undef MAKE_HASH_CDR_POST_OP
}
@@ -1675,7 +1790,7 @@ static int do_send_to_logger(Eterm tag, Eterm gleader, char *buf, int len)
p = erts_whereis_process(NULL, 0, am_error_logger, 0, 0);
if (p) {
erts_aint32_t state = erts_smp_atomic32_read_acqb(&p->state);
- if (state & ERTS_PSFLG_RUNNING)
+ if (state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS))
p = NULL;
}
}
@@ -2005,6 +2120,22 @@ tailrecur_ne:
++bb;
goto term_array;
}
+ case MAP_SUBTAG:
+ {
+ aa = map_val_rel(a, a_base);
+ if (!is_boxed(b) || *boxed_val_rel(b,b_base) != *aa)
+ goto not_equal;
+ bb = map_val_rel(b,b_base);
+ sz = map_get_size((map_t*)aa);
+
+ if (sz != map_get_size((map_t*)bb)) goto not_equal;
+ if (sz == 0) goto pop_next;
+
+ aa += 2;
+ bb += 2;
+ sz += 1; /* increment for tuple-keys */
+ goto term_array;
+ }
case REFC_BINARY_SUBTAG:
case HEAP_BINARY_SUBTAG:
case SUB_BINARY_SUBTAG:
@@ -2279,7 +2410,7 @@ static int cmpbytes(byte *s1, int l1, byte *s2, int l2)
*
* According to the Erlang Standard, types are orderered as follows:
* numbers < (characters) < atoms < refs < funs < ports < pids <
- * tuples < [] < conses < binaries.
+ * tuples < maps < [] < conses < binaries.
*
* Note that characters are currently not implemented.
*
@@ -2299,10 +2430,24 @@ static int cmp_atoms(Eterm a, Eterm b)
bb->name+3, bb->len-3);
}
+#if !HALFWORD_HEAP
+/* cmp(Eterm a, Eterm b)
+ * For compatibility with HiPE - arith-based compare.
+ */
+Sint cmp(Eterm a, Eterm b)
+{
+ return erts_cmp(a, b, 0);
+}
+#endif
+
+/* erts_cmp(Eterm a, Eterm b, int exact)
+ * exact = 1 -> term-based compare
+ * exact = 0 -> arith-based compare
+ */
#if HALFWORD_HEAP
-Sint cmp_rel(Eterm a, Eterm* a_base, Eterm b, Eterm* b_base)
+Sint erts_cmp_rel_opt(Eterm a, Eterm* a_base, Eterm b, Eterm* b_base, int exact)
#else
-Sint cmp(Eterm a, Eterm b)
+Sint erts_cmp(Eterm a, Eterm b, int exact)
#endif
{
DECLARE_WSTACK(stack);
@@ -2462,7 +2607,25 @@ tailrecur_ne:
++aa;
++bb;
goto term_array;
+ case (_TAG_HEADER_MAP >> _TAG_PRIMARY_SIZE) :
+ if (!is_map_rel(b,b_base)) {
+ a_tag = MAP_DEF;
+ goto mixed_types;
+ }
+ aa = (Eterm *)map_val_rel(a,a_base);
+ bb = (Eterm *)map_val_rel(b,b_base);
+ i = map_get_size((map_t*)aa);
+ if (i != map_get_size((map_t*)bb)) {
+ RETURN_NEQ((int)(i - map_get_size((map_t*)bb)));
+ }
+ if (i == 0) {
+ goto pop_next;
+ }
+ aa += 2;
+ bb += 2;
+ i += 1; /* increment for tuple-keys */
+ goto term_array;
case (_TAG_HEADER_FLOAT >> _TAG_PRIMARY_SIZE):
if (!is_float_rel(b,b_base)) {
a_tag = FLOAT_DEF;
@@ -2686,11 +2849,6 @@ tailrecur_ne:
{
FloatDef f1, f2;
Eterm big;
-#if HEAP_ON_C_STACK
- Eterm big_buf[CMP_TMP_HEAP_SIZE]; /* If HEAP_ON_C_STACK */
-#else
- Eterm *big_buf = erts_get_scheduler_data()->cmp_tmp_heap;
-#endif
#if HALFWORD_HEAP
Wterm aw = is_immed(a) ? a : rterm2wterm(a,a_base);
Wterm bw = is_immed(b) ? b : rterm2wterm(b,b_base);
@@ -2701,6 +2859,8 @@ tailrecur_ne:
#define MAX_LOSSLESS_FLOAT ((double)((1LL << 53) - 2))
#define MIN_LOSSLESS_FLOAT ((double)(((1LL << 53) - 2)*-1))
#define BIG_ARITY_FLOAT_MAX (1024 / D_EXP) /* arity of max float as a bignum */
+ Eterm big_buf[BIG_NEED_SIZE(BIG_ARITY_FLOAT_MAX)];
+
b_tag = tag_val_def(bw);
switch(_NUMBER_CODE(a_tag, b_tag)) {
@@ -2711,13 +2871,15 @@ tailrecur_ne:
j = big_sign(aw) ? -1 : 1;
break;
case SMALL_FLOAT:
+ if (exact) goto exact_fall_through;
GET_DOUBLE(bw, f2);
if (f2.fd < MAX_LOSSLESS_FLOAT && f2.fd > MIN_LOSSLESS_FLOAT) {
/* Float is within the no loss limit */
f1.fd = signed_val(aw);
j = float_comp(f1.fd, f2.fd);
+ }
#if ERTS_SIZEOF_ETERM == 8
- } else if (f2.fd > (double) (MAX_SMALL + 1)) {
+ else if (f2.fd > (double) (MAX_SMALL + 1)) {
/* Float is a positive bignum, i.e. bigger */
j = -1;
} else if (f2.fd < (double) (MIN_SMALL - 1)) {
@@ -2728,19 +2890,21 @@ tailrecur_ne:
j = signed_val(aw) - (Sint) f2.fd;
}
#else
- } else {
+ else {
/* If float is positive it is bigger than small */
j = (f2.fd > 0.0) ? -1 : 1;
}
#endif /* ERTS_SIZEOF_ETERM == 8 */
break;
case FLOAT_BIG:
+ if (exact) goto exact_fall_through;
{
Wterm tmp = aw;
aw = bw;
bw = tmp;
}/* fall through */
case BIG_FLOAT:
+ if (exact) goto exact_fall_through;
GET_DOUBLE(bw, f2);
if ((f2.fd < (double) (MAX_SMALL + 1))
&& (f2.fd > (double) (MIN_SMALL - 1))) {
@@ -2762,21 +2926,23 @@ tailrecur_ne:
j = float_comp(f1.fd, f2.fd);
}
} else {
- big = double_to_big(f2.fd, big_buf);
- j = big_comp(aw, big);
+ big = double_to_big(f2.fd, big_buf, sizeof(big_buf)/sizeof(Eterm));
+ j = big_comp(aw, rterm2wterm(big,big_buf));
}
if (_NUMBER_CODE(a_tag, b_tag) == FLOAT_BIG) {
j = -j;
}
break;
case FLOAT_SMALL:
+ if (exact) goto exact_fall_through;
GET_DOUBLE(aw, f1);
if (f1.fd < MAX_LOSSLESS_FLOAT && f1.fd > MIN_LOSSLESS_FLOAT) {
/* Float is within the no loss limit */
f2.fd = signed_val(bw);
j = float_comp(f1.fd, f2.fd);
+ }
#if ERTS_SIZEOF_ETERM == 8
- } else if (f1.fd > (double) (MAX_SMALL + 1)) {
+ else if (f1.fd > (double) (MAX_SMALL + 1)) {
/* Float is a positive bignum, i.e. bigger */
j = 1;
} else if (f1.fd < (double) (MIN_SMALL - 1)) {
@@ -2787,12 +2953,13 @@ tailrecur_ne:
j = (Sint) f1.fd - signed_val(bw);
}
#else
- } else {
+ else {
/* If float is positive it is bigger than small */
j = (f1.fd > 0.0) ? 1 : -1;
}
#endif /* ERTS_SIZEOF_ETERM == 8 */
break;
+exact_fall_through:
default:
j = b_tag - a_tag;
}
@@ -2846,7 +3013,7 @@ pop_next:
return 0;
not_equal:
- DESTROY_ESTACK(stack);
+ DESTROY_WSTACK(stack);
return j;
#undef CMP_NODES
@@ -3021,118 +3188,349 @@ buf_to_intlist(Eterm** hpp, const char *buf, size_t len, Eterm tail)
** Return remaining bytes in buffer on success
** ERTS_IOLIST_TO_BUF_OVERFLOW on overflow
** ERTS_IOLIST_TO_BUF_TYPE_ERROR on type error (including that result would not be a whole number of bytes)
+**
+** Note!
+** Do not detect indata errors in this fiunction that are not detected by erts_iolist_size!
+**
+** A caller should be able to rely on a successful return from erts_iolist_to_buf
+** if erts_iolist_size is previously successfully called and erts_iolist_to_buf
+** is called with a buffer at least as large as the value given by erts_iolist_size.
+**
*/
-ErlDrvSizeT erts_iolist_to_buf(Eterm obj, char* buf, ErlDrvSizeT alloced_len)
+typedef enum {
+ ERTS_IL2B_BCOPY_OK,
+ ERTS_IL2B_BCOPY_YIELD,
+ ERTS_IL2B_BCOPY_OVERFLOW,
+ ERTS_IL2B_BCOPY_TYPE_ERROR
+} ErtsIL2BBCopyRes;
+
+static ErtsIL2BBCopyRes
+iolist_to_buf_bcopy(ErtsIOList2BufState *state, Eterm obj, int *yield_countp);
+
+static ERTS_INLINE ErlDrvSizeT
+iolist_to_buf(const int yield_support,
+ ErtsIOList2BufState *state,
+ Eterm obj,
+ char* buf,
+ ErlDrvSizeT alloced_len)
{
- ErlDrvSizeT len = (ErlDrvSizeT) alloced_len;
- Eterm* objp;
+#undef IOLIST_TO_BUF_BCOPY
+#define IOLIST_TO_BUF_BCOPY(CONSP) \
+do { \
+ size_t size = binary_size(obj); \
+ if (size > 0) { \
+ Uint bitsize; \
+ byte* bptr; \
+ Uint bitoffs; \
+ Uint num_bits; \
+ if (yield_support) { \
+ size_t max_size = ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT; \
+ if (yield_count > 0) \
+ max_size *= yield_count+1; \
+ if (size > max_size) { \
+ state->objp = CONSP; \
+ goto L_bcopy_yield; \
+ } \
+ if (size >= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT) { \
+ int cost = (int) size; \
+ cost /= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT; \
+ yield_count -= cost; \
+ } \
+ } \
+ if (len < size) \
+ goto L_overflow; \
+ ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize); \
+ if (bitsize != 0) \
+ goto L_type_error; \
+ num_bits = 8*size; \
+ copy_binary_to_buffer(buf, 0, bptr, bitoffs, num_bits); \
+ buf += size; \
+ len -= size; \
+ } \
+} while (0)
+
+ ErlDrvSizeT res, len;
+ Eterm* objp = NULL;
+ int init_yield_count;
+ int yield_count;
DECLARE_ESTACK(s);
- goto L_again;
-
- while (!ESTACK_ISEMPTY(s)) {
- obj = ESTACK_POP(s);
- L_again:
- if (is_list(obj)) {
- L_iter_list:
- objp = list_val(obj);
- obj = CAR(objp);
- if (is_byte(obj)) {
- if (len == 0) {
- goto L_overflow;
- }
- *buf++ = unsigned_val(obj);
- len--;
- } else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
-
- if (len < size) {
+
+ len = (ErlDrvSizeT) alloced_len;
+
+ if (!yield_support) {
+ yield_count = init_yield_count = 0; /* Shut up faulty warning... >:-( */
+ goto L_again;
+ }
+ else {
+
+ if (state->iolist.reds_left <= 0)
+ return ERTS_IOLIST_TO_BUF_YIELD;
+
+ ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
+ init_yield_count = (ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED
+ * state->iolist.reds_left);
+ yield_count = init_yield_count;
+
+ if (!state->iolist.estack.start)
+ goto L_again;
+ else {
+ int chk_stack;
+ /* Restart; restore state... */
+ ESTACK_RESTORE(s, &state->iolist.estack);
+
+ if (!state->bcopy.bptr)
+ chk_stack = 0;
+ else {
+ chk_stack = 1;
+ switch (iolist_to_buf_bcopy(state, THE_NON_VALUE, &yield_count)) {
+ case ERTS_IL2B_BCOPY_OK:
+ break;
+ case ERTS_IL2B_BCOPY_YIELD:
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ ESTACK_SAVE(s, &state->iolist.estack);
+ return ERTS_IOLIST_TO_BUF_YIELD;
+ case ERTS_IL2B_BCOPY_OVERFLOW:
goto L_overflow;
- }
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- if (bitsize != 0) {
+ case ERTS_IL2B_BCOPY_TYPE_ERROR:
goto L_type_error;
}
- num_bits = 8*size;
- copy_binary_to_buffer(buf, 0, bptr, bitoffs, num_bits);
- buf += size;
- len -= size;
- } else if (is_list(obj)) {
- ESTACK_PUSH(s, CDR(objp));
- goto L_iter_list; /* on head */
- } else if (is_not_nil(obj)) {
- goto L_type_error;
}
- obj = CDR(objp);
- if (is_list(obj)) {
- goto L_iter_list; /* on tail */
- } else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
- if (len < size) {
- goto L_overflow;
+ obj = state->iolist.obj;
+ buf = state->buf;
+ len = state->len;
+ objp = state->objp;
+ state->objp = NULL;
+ if (objp)
+ goto L_tail;
+ if (!chk_stack)
+ goto L_again;
+ /* check stack */
+ }
+ }
+
+ while (!ESTACK_ISEMPTY(s)) {
+ obj = ESTACK_POP(s);
+ L_again:
+ if (is_list(obj)) {
+ while (1) { /* Tail loop */
+ while (1) { /* Head loop */
+ if (yield_support && --yield_count <= 0)
+ goto L_yield;
+ objp = list_val(obj);
+ obj = CAR(objp);
+ if (is_byte(obj)) {
+ if (len == 0) {
+ goto L_overflow;
+ }
+ *buf++ = unsigned_val(obj);
+ len--;
+ } else if (is_binary(obj)) {
+ IOLIST_TO_BUF_BCOPY(objp);
+ } else if (is_list(obj)) {
+ ESTACK_PUSH(s, CDR(objp));
+ continue; /* Head loop */
+ } else if (is_not_nil(obj)) {
+ goto L_type_error;
+ }
+ break;
}
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- if (bitsize != 0) {
+
+ L_tail:
+
+ obj = CDR(objp);
+
+ if (is_list(obj)) {
+ continue; /* Tail loop */
+ } else if (is_binary(obj)) {
+ IOLIST_TO_BUF_BCOPY(NULL);
+ } else if (is_not_nil(obj)) {
goto L_type_error;
}
- num_bits = 8*size;
- copy_binary_to_buffer(buf, 0, bptr, bitoffs, num_bits);
- buf += size;
- len -= size;
- } else if (is_not_nil(obj)) {
- goto L_type_error;
+ break;
}
} else if (is_binary(obj)) {
- byte* bptr;
- size_t size = binary_size(obj);
- Uint bitsize;
- Uint bitoffs;
- Uint num_bits;
- if (len < size) {
- goto L_overflow;
- }
- ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
- if (bitsize != 0) {
- goto L_type_error;
- }
- num_bits = 8*size;
- copy_binary_to_buffer(buf, 0, bptr, bitoffs, num_bits);
- buf += size;
- len -= size;
+ IOLIST_TO_BUF_BCOPY(NULL);
} else if (is_not_nil(obj)) {
goto L_type_error;
- }
+ } else if (yield_support && --yield_count <= 0)
+ goto L_yield;
}
+ res = len;
+
+ L_return:
+
DESTROY_ESTACK(s);
- return len;
+
+ if (yield_support) {
+ int reds;
+ CLEAR_SAVED_ESTACK(&state->iolist.estack);
+ reds = ((init_yield_count - yield_count - 1)
+ / ERTS_IOLIST_TO_BUF_YIELD_COUNT_PER_RED) + 1;
+ BUMP_REDS(state->iolist.c_p, reds);
+ state->iolist.reds_left -= reds;
+ if (state->iolist.reds_left < 0)
+ state->iolist.reds_left = 0;
+ }
+
+
+ return res;
L_type_error:
- DESTROY_ESTACK(s);
- return ERTS_IOLIST_TO_BUF_TYPE_ERROR;
+ res = ERTS_IOLIST_TO_BUF_TYPE_ERROR;
+ goto L_return;
L_overflow:
- DESTROY_ESTACK(s);
- return ERTS_IOLIST_TO_BUF_OVERFLOW;
+ res = ERTS_IOLIST_TO_BUF_OVERFLOW;
+ goto L_return;
+
+ L_bcopy_yield:
+
+ state->buf = buf;
+ state->len = len;
+
+ switch (iolist_to_buf_bcopy(state, obj, &yield_count)) {
+ case ERTS_IL2B_BCOPY_OK:
+ ERTS_INTERNAL_ERROR("Missing yield");
+ case ERTS_IL2B_BCOPY_YIELD:
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ ESTACK_SAVE(s, &state->iolist.estack);
+ return ERTS_IOLIST_TO_BUF_YIELD;
+ case ERTS_IL2B_BCOPY_OVERFLOW:
+ goto L_overflow;
+ case ERTS_IL2B_BCOPY_TYPE_ERROR:
+ goto L_type_error;
+ }
+
+ L_yield:
+
+ BUMP_ALL_REDS(state->iolist.c_p);
+ state->iolist.reds_left = 0;
+ state->iolist.obj = obj;
+ state->buf = buf;
+ state->len = len;
+ ESTACK_SAVE(s, &state->iolist.estack);
+ return ERTS_IOLIST_TO_BUF_YIELD;
+
+#undef IOLIST_TO_BUF_BCOPY
+}
+
+static ErtsIL2BBCopyRes
+iolist_to_buf_bcopy(ErtsIOList2BufState *state, Eterm obj, int *yield_countp)
+{
+ ErtsIL2BBCopyRes res;
+ char *buf = state->buf;
+ ErlDrvSizeT len = state->len;
+ byte* bptr;
+ size_t size;
+ size_t max_size;
+ Uint bitoffs;
+ Uint num_bits;
+ int yield_count = *yield_countp;
+
+ if (state->bcopy.bptr) {
+ bptr = state->bcopy.bptr;
+ size = state->bcopy.size;
+ bitoffs = state->bcopy.bitoffs;
+ state->bcopy.bptr = NULL;
+ }
+ else {
+ Uint bitsize;
+
+ ASSERT(is_binary(obj));
+
+ size = binary_size(obj);
+ if (size <= 0)
+ return ERTS_IL2B_BCOPY_OK;
+
+ if (len < size)
+ return ERTS_IL2B_BCOPY_OVERFLOW;
+
+ ERTS_GET_BINARY_BYTES(obj, bptr, bitoffs, bitsize);
+ if (bitsize != 0)
+ return ERTS_IL2B_BCOPY_TYPE_ERROR;
+ }
+
+ ASSERT(size > 0);
+ max_size = (size_t) ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT;
+ if (yield_count > 0)
+ max_size *= (size_t) (yield_count+1);
+
+ if (size <= max_size) {
+ if (size >= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT) {
+ int cost = (int) size;
+ cost /= ERTS_IOLIST_TO_BUF_BYTES_PER_YIELD_COUNT;
+ yield_count -= cost;
+ }
+ res = ERTS_IL2B_BCOPY_OK;
+ }
+ else {
+ ASSERT(0 < max_size && max_size < size);
+ yield_count = 0;
+ state->bcopy.bptr = bptr + max_size;
+ state->bcopy.bitoffs = bitoffs;
+ state->bcopy.size = size - max_size;
+ size = max_size;
+ res = ERTS_IL2B_BCOPY_YIELD;
+ }
+
+ num_bits = 8*size;
+ copy_binary_to_buffer(buf, 0, bptr, bitoffs, num_bits);
+ state->buf += size;
+ state->len -= size;
+ *yield_countp = yield_count;
+
+ return res;
+}
+
+ErlDrvSizeT erts_iolist_to_buf_yielding(ErtsIOList2BufState *state)
+{
+ return iolist_to_buf(1, state, state->iolist.obj, state->buf, state->len);
+}
+
+ErlDrvSizeT erts_iolist_to_buf(Eterm obj, char* buf, ErlDrvSizeT alloced_len)
+{
+ return iolist_to_buf(0, NULL, obj, buf, alloced_len);
}
/*
* Return 0 if successful, and non-zero if unsuccessful.
+ *
+ * It is vital that if erts_iolist_to_buf would return an error for
+ * any type of term data, this function should do so as well.
+ * Any input term error detected in erts_iolist_to_buf should also
+ * be detected in this function!
*/
-int erts_iolist_size(Eterm obj, ErlDrvSizeT* sizep)
+
+static ERTS_INLINE int
+iolist_size(const int yield_support, ErtsIOListState *state, Eterm obj, ErlDrvSizeT* sizep)
{
+ int res, init_yield_count, yield_count;
Eterm* objp;
- Uint size = 0; /* Intentionally Uint due to halfword heap */
+ Uint size = (Uint) *sizep; /* Intentionally Uint due to halfword heap */
DECLARE_ESTACK(s);
+
+ if (!yield_support)
+ yield_count = init_yield_count = 0; /* Shut up faulty warning... >:-( */
+ else {
+ if (state->reds_left <= 0)
+ return ERTS_IOLIST_YIELD;
+ ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
+ init_yield_count = ERTS_IOLIST_SIZE_YIELDS_COUNT_PER_RED;
+ init_yield_count *= state->reds_left;
+ yield_count = init_yield_count;
+ if (state->estack.start) {
+ /* Restart; restore state... */
+ ESTACK_RESTORE(s, &state->estack);
+ size = (Uint) state->size;
+ obj = state->obj;
+ }
+ }
+
goto L_again;
#define SAFE_ADD(Var, Val) \
@@ -3148,51 +3546,101 @@ int erts_iolist_size(Eterm obj, ErlDrvSizeT* sizep)
obj = ESTACK_POP(s);
L_again:
if (is_list(obj)) {
- L_iter_list:
- objp = list_val(obj);
- /* Head */
- obj = CAR(objp);
- if (is_byte(obj)) {
- size++;
- if (size == 0) {
- goto L_overflow_error;
+ while (1) { /* Tail loop */
+ while (1) { /* Head loop */
+ if (yield_support && --yield_count <= 0)
+ goto L_yield;
+ objp = list_val(obj);
+ /* Head */
+ obj = CAR(objp);
+ if (is_byte(obj)) {
+ size++;
+ if (size == 0) {
+ goto L_overflow_error;
+ }
+ } else if (is_binary(obj) && binary_bitsize(obj) == 0) {
+ SAFE_ADD(size, binary_size(obj));
+ } else if (is_list(obj)) {
+ ESTACK_PUSH(s, CDR(objp));
+ continue; /* Head loop */
+ } else if (is_not_nil(obj)) {
+ goto L_type_error;
+ }
+ break;
}
- } else if (is_binary(obj) && binary_bitsize(obj) == 0) {
- SAFE_ADD(size, binary_size(obj));
- } else if (is_list(obj)) {
- ESTACK_PUSH(s, CDR(objp));
- goto L_iter_list; /* on head */
- } else if (is_not_nil(obj)) {
- goto L_type_error;
+ /* Tail */
+ obj = CDR(objp);
+ if (is_list(obj))
+ continue; /* Tail loop */
+ else if (is_binary(obj) && binary_bitsize(obj) == 0) {
+ SAFE_ADD(size, binary_size(obj));
+ } else if (is_not_nil(obj)) {
+ goto L_type_error;
+ }
+ break;
}
- /* Tail */
- obj = CDR(objp);
- if (is_list(obj))
- goto L_iter_list; /* on tail */
- else if (is_binary(obj) && binary_bitsize(obj) == 0) {
+ } else {
+ if (yield_support && --yield_count <= 0)
+ goto L_yield;
+ if (is_binary(obj) && binary_bitsize(obj) == 0) { /* Tail was binary */
SAFE_ADD(size, binary_size(obj));
} else if (is_not_nil(obj)) {
goto L_type_error;
}
- } else if (is_binary(obj) && binary_bitsize(obj) == 0) { /* Tail was binary */
- SAFE_ADD(size, binary_size(obj));
- } else if (is_not_nil(obj)) {
- goto L_type_error;
}
}
#undef SAFE_ADD
- DESTROY_ESTACK(s);
*sizep = (ErlDrvSizeT) size;
- return ERTS_IOLIST_OK;
- L_overflow_error:
+ res = ERTS_IOLIST_OK;
+
+ L_return:
+
DESTROY_ESTACK(s);
- return ERTS_IOLIST_OVERFLOW;
+
+ if (yield_support) {
+ int yc, reds;
+ CLEAR_SAVED_ESTACK(&state->estack);
+ yc = init_yield_count - yield_count;
+ reds = ((yc - 1) / ERTS_IOLIST_SIZE_YIELDS_COUNT_PER_RED) + 1;
+ BUMP_REDS(state->c_p, reds);
+ state->reds_left -= reds;
+ state->size = (ErlDrvSizeT) size;
+ state->have_size = 1;
+ }
+
+ return res;
+
+ L_overflow_error:
+ res = ERTS_IOLIST_OVERFLOW;
+ size = 0;
+ goto L_return;
L_type_error:
- DESTROY_ESTACK(s);
- return ERTS_IOLIST_TYPE;
+ res = ERTS_IOLIST_TYPE;
+ size = 0;
+ goto L_return;
+
+ L_yield:
+ BUMP_ALL_REDS(state->c_p);
+ state->reds_left = 0;
+ state->size = size;
+ state->obj = obj;
+ ESTACK_SAVE(s, &state->estack);
+ return ERTS_IOLIST_YIELD;
+}
+
+int erts_iolist_size_yielding(ErtsIOListState *state)
+{
+ ErlDrvSizeT size = state->size;
+ return iolist_size(1, state, state->obj, &size);
+}
+
+int erts_iolist_size(Eterm obj, ErlDrvSizeT* sizep)
+{
+ *sizep = 0;
+ return iolist_size(0, NULL, obj, sizep);
}
/* return 0 if item is not a non-empty flat list of bytes */
@@ -3501,6 +3949,9 @@ erts_save_emu_args(int argc, char **argv)
size += sz+1;
}
ptr = (char *) malloc(size);
+ if (!ptr) {
+ ERTS_INTERNAL_ERROR("malloc failed to allocate memory!");
+ }
#ifdef DEBUG
end_ptr = ptr + size;
#endif
@@ -3765,19 +4216,7 @@ void erts_silence_warn_unused_result(long unused)
void
erts_interval_init(erts_interval_t *icp)
{
-#ifdef ARCH_64
- erts_atomic_init_nob(&icp->counter.atomic, 0);
-#else
- erts_dw_aint_t dw;
-#ifdef ETHR_SU_DW_NAINT_T__
- dw.dw_sint = 0;
-#else
- dw.sint[ERTS_DW_AINT_HIGH_WORD] = 0;
- dw.sint[ERTS_DW_AINT_LOW_WORD] = 0;
-#endif
- erts_dw_atomic_init_nob(&icp->counter.atomic, &dw);
-
-#endif
+ erts_atomic64_init_nob(&icp->counter.atomic, 0);
#ifdef DEBUG
icp->smp_api = 0;
#endif
@@ -3799,55 +4238,13 @@ erts_smp_interval_init(erts_interval_t *icp)
static ERTS_INLINE Uint64
step_interval_nob(erts_interval_t *icp)
{
-#ifdef ARCH_64
- return (Uint64) erts_atomic_inc_read_nob(&icp->counter.atomic);
-#else
- erts_dw_aint_t exp;
-
- erts_dw_atomic_read_nob(&icp->counter.atomic, &exp);
- while (1) {
- erts_dw_aint_t new = exp;
-
-#ifdef ETHR_SU_DW_NAINT_T__
- new.dw_sint++;
-#else
- new.sint[ERTS_DW_AINT_LOW_WORD]++;
- if (new.sint[ERTS_DW_AINT_LOW_WORD] == 0)
- new.sint[ERTS_DW_AINT_HIGH_WORD]++;
-#endif
-
- if (erts_dw_atomic_cmpxchg_nob(&icp->counter.atomic, &new, &exp))
- return erts_interval_dw_aint_to_val__(&new);
-
- }
-#endif
+ return (Uint64) erts_atomic64_inc_read_nob(&icp->counter.atomic);
}
static ERTS_INLINE Uint64
step_interval_relb(erts_interval_t *icp)
{
-#ifdef ARCH_64
- return (Uint64) erts_atomic_inc_read_relb(&icp->counter.atomic);
-#else
- erts_dw_aint_t exp;
-
- erts_dw_atomic_read_nob(&icp->counter.atomic, &exp);
- while (1) {
- erts_dw_aint_t new = exp;
-
-#ifdef ETHR_SU_DW_NAINT_T__
- new.dw_sint++;
-#else
- new.sint[ERTS_DW_AINT_LOW_WORD]++;
- if (new.sint[ERTS_DW_AINT_LOW_WORD] == 0)
- new.sint[ERTS_DW_AINT_HIGH_WORD]++;
-#endif
-
- if (erts_dw_atomic_cmpxchg_relb(&icp->counter.atomic, &new, &exp))
- return erts_interval_dw_aint_to_val__(&new);
-
- }
-#endif
+ return (Uint64) erts_atomic64_inc_read_relb(&icp->counter.atomic);
}
@@ -3855,38 +4252,10 @@ static ERTS_INLINE Uint64
ensure_later_interval_nob(erts_interval_t *icp, Uint64 ic)
{
Uint64 curr_ic;
-#ifdef ARCH_64
- curr_ic = (Uint64) erts_atomic_read_nob(&icp->counter.atomic);
- if (curr_ic > ic)
- return curr_ic;
- return (Uint64) erts_atomic_inc_read_nob(&icp->counter.atomic);
-#else
- erts_dw_aint_t exp;
-
- erts_dw_atomic_read_nob(&icp->counter.atomic, &exp);
- curr_ic = erts_interval_dw_aint_to_val__(&exp);
+ curr_ic = (Uint64) erts_atomic64_read_nob(&icp->counter.atomic);
if (curr_ic > ic)
return curr_ic;
-
- while (1) {
- erts_dw_aint_t new = exp;
-
-#ifdef ETHR_SU_DW_NAINT_T__
- new.dw_sint++;
-#else
- new.sint[ERTS_DW_AINT_LOW_WORD]++;
- if (new.sint[ERTS_DW_AINT_LOW_WORD] == 0)
- new.sint[ERTS_DW_AINT_HIGH_WORD]++;
-#endif
-
- if (erts_dw_atomic_cmpxchg_nob(&icp->counter.atomic, &new, &exp))
- return erts_interval_dw_aint_to_val__(&new);
-
- curr_ic = erts_interval_dw_aint_to_val__(&exp);
- if (curr_ic > ic)
- return curr_ic;
- }
-#endif
+ return (Uint64) erts_atomic64_inc_read_nob(&icp->counter.atomic);
}
@@ -3894,38 +4263,10 @@ static ERTS_INLINE Uint64
ensure_later_interval_acqb(erts_interval_t *icp, Uint64 ic)
{
Uint64 curr_ic;
-#ifdef ARCH_64
- curr_ic = (Uint64) erts_atomic_read_acqb(&icp->counter.atomic);
- if (curr_ic > ic)
- return curr_ic;
- return (Uint64) erts_atomic_inc_read_acqb(&icp->counter.atomic);
-#else
- erts_dw_aint_t exp;
-
- erts_dw_atomic_read_acqb(&icp->counter.atomic, &exp);
- curr_ic = erts_interval_dw_aint_to_val__(&exp);
+ curr_ic = (Uint64) erts_atomic64_read_acqb(&icp->counter.atomic);
if (curr_ic > ic)
return curr_ic;
-
- while (1) {
- erts_dw_aint_t new = exp;
-
-#ifdef ETHR_SU_DW_NAINT_T__
- new.dw_sint++;
-#else
- new.sint[ERTS_DW_AINT_LOW_WORD]++;
- if (new.sint[ERTS_DW_AINT_LOW_WORD] == 0)
- new.sint[ERTS_DW_AINT_HIGH_WORD]++;
-#endif
-
- if (erts_dw_atomic_cmpxchg_acqb(&icp->counter.atomic, &new, &exp))
- return erts_interval_dw_aint_to_val__(&new);
-
- curr_ic = erts_interval_dw_aint_to_val__(&exp);
- if (curr_ic > ic)
- return curr_ic;
- }
-#endif
+ return (Uint64) erts_atomic64_inc_read_acqb(&icp->counter.atomic);
}
Uint64
@@ -4006,7 +4347,6 @@ erts_smp_ensure_later_interval_acqb(erts_interval_t *icp, Uint64 ic)
#endif
}
-
/*
* A millisecond timestamp without time correction where there's no hrtime
* - for tracing on "long" things...
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index 8de578d8b7..3b8e7acb6e 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -99,7 +99,16 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+
+#ifndef __OSE__
+#include <ctype.h>
+#include <sys/types.h>
#include <stdlib.h>
+#else
+#include "ctype.h"
+#include "sys/types.h"
+#include "stdlib.h"
+#endif
/* Need (NON)BLOCKING macros for sendfile */
#ifndef WANT_NONBLOCKING
@@ -111,11 +120,9 @@
#include "erl_driver.h"
#include "erl_efile.h"
#include "erl_threads.h"
-#include "zlib.h"
#include "gzio.h"
#include "dtrace-wrapper.h"
-#include <ctype.h>
-#include <sys/types.h>
+
void erl_exit(int n, char *fmt, ...);
@@ -168,7 +175,7 @@ dt_private *get_dt_private(int);
#ifdef USE_THREADS
-#define IF_THRDS if (sys_info.async_threads > 0)
+#define THRDS_AVAILABLE (sys_info.async_threads > 0)
#ifdef HARDDEBUG /* HARDDEBUG in io.c is expected too */
#define TRACE_DRIVER fprintf(stderr, "Efile: ")
#else
@@ -178,24 +185,26 @@ dt_private *get_dt_private(int);
#define MUTEX_LOCK(m) do { IF_THRDS { TRACE_DRIVER; driver_pdl_lock(m); } } while (0)
#define MUTEX_UNLOCK(m) do { IF_THRDS { TRACE_DRIVER; driver_pdl_unlock(m); } } while (0)
#else
-#define IF_THRDS if (0)
+#define THRDS_AVAILABLE (0)
#define MUTEX_INIT(m, p)
#define MUTEX_LOCK(m)
#define MUTEX_UNLOCK(m)
#endif
+#define IF_THRDS if (THRDS_AVAILABLE)
+#define SENDFILE_FLGS_USE_THREADS (1 << 0)
/**
* On DARWIN sendfile can deadlock with close if called in
* different threads. So until Apple fixes so that sendfile
* is not buggy we disable usage of the async pool for
* DARWIN. The testcase t_sendfile_crashduring reproduces
- * this error when using +A 10.
+ * this error when using +A 10 and enabling SENDFILE_FLGS_USE_THREADS.
*/
#if defined(__APPLE__) && defined(__MACH__)
-#define USE_THRDS_FOR_SENDFILE 0
+#define USE_THRDS_FOR_SENDFILE(DATA) 0
#else
-#define USE_THRDS_FOR_SENDFILE (sys_info.async_threads > 0)
+#define USE_THRDS_FOR_SENDFILE(DATA) (DATA->flags & SENDFILE_FLGS_USE_THREADS)
#endif /* defined(__APPLE__) && defined(__MACH__) */
@@ -255,23 +264,6 @@ dt_private *get_dt_private(int);
-#define GET_TIME(i, b) \
- (i).year = get_int32((b) + 0 * 4); \
- (i).month = get_int32((b) + 1 * 4); \
- (i).day = get_int32((b) + 2 * 4); \
- (i).hour = get_int32((b) + 3 * 4); \
- (i).minute = get_int32((b) + 4 * 4); \
- (i).second = get_int32((b) + 5 * 4)
-
-#define PUT_TIME(i, b) \
- put_int32((i).year, (b) + 0 * 4); \
- put_int32((i).month, (b) + 1 * 4); \
- put_int32((i).day, (b) + 2 * 4); \
- put_int32((i).hour, (b) + 3 * 4); \
- put_int32((i).minute,(b) + 4 * 4); \
- put_int32((i).second,(b) + 5 * 4)
-
-
#if ALWAYS_READ_LINE_AHEAD
#define DEFAULT_LINEBUF_SIZE 2048
#else
@@ -301,7 +293,7 @@ static void file_stop_select(ErlDrvEvent event, void* _);
enum e_timer {timer_idle, timer_again, timer_write};
#ifdef HAVE_SENDFILE
enum e_sendfile {sending, not_sending};
-static void free_sendfile(void *data);
+#define SENDFILE_USE_THREADS (1 << 0)
#endif /* HAVE_SENDFILE */
struct t_data;
@@ -764,6 +756,9 @@ file_init(void)
: 0);
driver_system_info(&sys_info, sizeof(ErlDrvSysInfo));
+ /* run initiation of efile_driver if needed */
+ efile_init();
+
#ifdef USE_VM_PROBES
erts_mtx_init(&dt_driver_mutex, "efile_drv dtrace mutex");
pthread_key_create(&dt_driver_key, NULL);
@@ -818,7 +813,7 @@ file_start(ErlDrvPort port, char* command)
static void do_close(int flags, SWord fd) {
if (flags & EFILE_COMPRESSED) {
- erts_gzclose((gzFile)(fd));
+ erts_gzclose((ErtsGzFile)(fd));
} else {
efile_closefile((int) fd);
}
@@ -910,6 +905,7 @@ static void reply_Uint_posix_error(file_descriptor *desc, Uint num,
driver_output2(desc->port, response, t-response, NULL, 0);
}
+#ifdef HAVE_SENDFILE
static void reply_string_error(file_descriptor *desc, char* str) {
char response[256]; /* Response buffer. */
char* s;
@@ -920,6 +916,7 @@ static void reply_string_error(file_descriptor *desc, char* str) {
*t = tolower(*s);
driver_output2(desc->port, response, t-response, NULL, 0);
}
+#endif
static int reply_error(file_descriptor *desc,
Efile_error *errInfo) /* The error codes. */
@@ -1136,7 +1133,7 @@ static void invoke_read(void *data)
}
read_size = size;
if (d->flags & EFILE_COMPRESSED) {
- read_size = erts_gzread((gzFile)d->fd,
+ read_size = erts_gzread((ErtsGzFile)d->fd,
d->c.read.binp->orig_bytes + d->c.read.bin_offset,
size);
status = (read_size != (size_t) -1);
@@ -1209,7 +1206,7 @@ static void invoke_read_line(void *data)
size = need - d->c.read_line.read_size;
}
if (d->flags & EFILE_COMPRESSED) {
- read_size = erts_gzread((gzFile)d->fd,
+ read_size = erts_gzread((ErtsGzFile)d->fd,
d->c.read_line.binp->orig_bytes +
d->c.read_line.read_offset + d->c.read_line.read_size,
size);
@@ -1250,7 +1247,7 @@ static void invoke_read_line(void *data)
d->c.read_line.read_size -= too_much;
ASSERT(d->c.read_line.read_size >= 0);
if (d->flags & EFILE_COMPRESSED) {
- Sint64 location = erts_gzseek((gzFile)d->fd,
+ Sint64 location = erts_gzseek((ErtsGzFile)d->fd,
-((Sint64) too_much), EFILE_SEEK_CUR);
if (location == -1) {
d->result_ok = 0;
@@ -1535,7 +1532,7 @@ static void invoke_writev(void *data) {
*/
errno = EINVAL;
if (! (status =
- erts_gzwrite((gzFile)d->fd,
+ erts_gzwrite((ErtsGzFile)d->fd,
iov[i].iov_base,
iov[i].iov_len)) == iov[i].iov_len) {
d->errInfo.posix_errno =
@@ -1797,7 +1794,7 @@ static void invoke_lseek(void *data)
d->errInfo.posix_errno = EINVAL;
status = 0;
} else {
- d->c.lseek.location = erts_gzseek((gzFile)d->fd,
+ d->c.lseek.location = erts_gzseek((ErtsGzFile)d->fd,
offset, d->c.lseek.origin);
if (d->c.lseek.location == -1) {
d->errInfo.posix_errno = errno;
@@ -1885,7 +1882,7 @@ static void invoke_open(void *data)
if (status || (d->errInfo.posix_errno != EISDIR)) {
mode = (d->flags & EFILE_MODE_READ) ? "rb" : "wb";
d->fd = (SWord) erts_gzopen(d->b, mode);
- if ((gzFile)d->fd) {
+ if ((ErtsGzFile)d->fd) {
status = 1;
} else {
if (errno == 0) {
@@ -1933,7 +1930,7 @@ static void invoke_sendfile(void *data)
d->c.sendfile.written += nbytes;
- if (result == 1 || (result == 0 && USE_THRDS_FOR_SENDFILE)) {
+ if (result == 1 || (result == 0 && USE_THRDS_FOR_SENDFILE(d))) {
d->result_ok = 0;
} else if (result == 0 && (d->errInfo.posix_errno == EAGAIN
|| d->errInfo.posix_errno == EINTR)) {
@@ -1950,7 +1947,7 @@ static void invoke_sendfile(void *data)
static void free_sendfile(void *data) {
struct t_data *d = (struct t_data *)data;
- if (USE_THRDS_FOR_SENDFILE) {
+ if (USE_THRDS_FOR_SENDFILE(d)) {
SET_NONBLOCKING(d->c.sendfile.out_fd);
} else {
MUTEX_LOCK(d->c.sendfile.q_mtx);
@@ -4123,8 +4120,16 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
goto done;
}
- if (hd_len != 0 || tl_len != 0 || flags != 0) {
- /* We do not allow header, trailers and/or flags right now */
+ if (hd_len != 0 || tl_len != 0) {
+ /* We do not allow header, trailers */
+ reply_posix_error(desc, EINVAL);
+ goto done;
+ }
+
+
+ if (flags & SENDFILE_FLGS_USE_THREADS && !THRDS_AVAILABLE) {
+ /* We do not allow use_threads flag on a system where
+ no threads are available. */
reply_posix_error(desc, EINVAL);
goto done;
}
@@ -4134,6 +4139,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
d->command = command;
d->invoke = invoke_sendfile;
d->free = free_sendfile;
+ d->flags = flags;
d->level = 2;
d->c.sendfile.out_fd = (int) out_fd;
@@ -4153,7 +4159,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
d->c.sendfile.nbytes = nbytes;
- if (USE_THRDS_FOR_SENDFILE) {
+ if (USE_THRDS_FOR_SENDFILE(d)) {
SET_BLOCKING(d->c.sendfile.out_fd);
} else {
/**
diff --git a/erts/emulator/drivers/common/erl_efile.h b/erts/emulator/drivers/common/erl_efile.h
index 5387f75efc..5a8e3bc5db 100644
--- a/erts/emulator/drivers/common/erl_efile.h
+++ b/erts/emulator/drivers/common/erl_efile.h
@@ -34,6 +34,7 @@
#define EFILE_COMPRESSED 8
#define EFILE_MODE_EXCL 16
#define EFILE_NO_TRUNCATE 32 /* Special for reopening on VxWorks */
+#define EFILE_MODE_SYNC 64
/*
* Seek modes for efile_seek().
@@ -126,7 +127,7 @@ struct t_sendfile_hdtl {
/*
* Functions.
*/
-
+int efile_init(void);
int efile_mkdir(Efile_error* errInfo, char* name);
int efile_rmdir(Efile_error* errInfo, char* name);
int efile_delete_file(Efile_error* errInfo, char* name);
diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c
index e085c262b0..1ef1602ec9 100644
--- a/erts/emulator/drivers/common/gzio.c
+++ b/erts/emulator/drivers/common/gzio.c
@@ -20,6 +20,7 @@
#endif
#include <ctype.h>
#include "erl_driver.h"
+#include "erl_efile.h"
#include "sys.h"
#ifdef __WIN32__
@@ -73,15 +74,15 @@ typedef struct gz_stream {
int transparent; /* 1 if input file is not a .gz file */
char mode; /* 'w' or 'r' */
int position; /* Position (for seek) */
- int (*destroy)OF((struct gz_stream*)); /* Function to destroy
+ int (*destroy)(struct gz_stream*); /* Function to destroy
* this structure. */
} gz_stream;
-local gzFile gz_open OF((const char *path, const char *mode));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local uLong getLong OF((gz_stream *s));
+local ErtsGzFile gz_open (const char *path, const char *mode);
+local int get_byte (gz_stream *s);
+local void check_header (gz_stream *s);
+local int destroy (gz_stream *s);
+local uLong getLong (gz_stream *s);
#ifdef UNIX
/*
@@ -144,7 +145,7 @@ local uLong getLong OF((gz_stream *s));
can be checked to distinguish the two cases (if errno is zero, the
zlib error is Z_MEM_ERROR).
*/
-local gzFile gz_open (path, mode)
+local ErtsGzFile gz_open (path, mode)
const char *path;
const char *mode;
{
@@ -179,7 +180,7 @@ local gzFile gz_open (path, mode)
s->path = (char*)ALLOC(FILENAME_BYTELEN(path)+FILENAME_CHARSIZE);
if (s->path == NULL) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
FILENAME_COPY(s->path, path); /* do this early for debugging */
@@ -197,7 +198,7 @@ local gzFile gz_open (path, mode)
} while (*p++ && m < fmode + sizeof(fmode) - 1);
*m = '\0';
if (s->mode == '\0')
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
if (s->mode == 'w') {
err = deflateInit2(&(s->stream), level,
@@ -207,7 +208,7 @@ local gzFile gz_open (path, mode)
s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
if (err != Z_OK || s->outbuf == Z_NULL) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
} else {
/*
@@ -221,7 +222,7 @@ local gzFile gz_open (path, mode)
s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
if (err != Z_OK || s->inbuf == Z_NULL) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
}
s->stream.avail_out = Z_BUFSIZE;
@@ -229,17 +230,17 @@ local gzFile gz_open (path, mode)
errno = 0;
#if defined(FILENAMES_16BIT)
{
- char wfmode[160];
- int i=0,j;
- for(j=0;fmode[j] != '\0';++j) {
- wfmode[i++]=fmode[j];
- wfmode[i++]='\0';
+ FILE* efile_wfopen(const WCHAR* name, const WCHAR* mode);
+ WCHAR wfmode[80];
+ int i = 0;
+ int j;
+ for(j = 0; fmode[j] != '\0'; ++j) {
+ wfmode[i++] = (WCHAR) fmode[j];
}
- wfmode[i++] = '\0';
- wfmode[i++] = '\0';
- s->file = F_OPEN(path, wfmode);
+ wfmode[i++] = L'\0';
+ s->file = efile_wfopen((WCHAR *)path, wfmode);
if (s->file == NULL) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
}
#elif defined(UNIX)
@@ -249,18 +250,18 @@ local gzFile gz_open (path, mode)
s->file = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
}
if (s->file == -1) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
#else
- s->file = F_OPEN(path, fmode);
+ s->file = fopen(path, fmode);
if (s->file == NULL) {
- return s->destroy(s), (gzFile)Z_NULL;
+ return s->destroy(s), (ErtsGzFile)Z_NULL;
}
#endif
if (s->mode == 'r') {
check_header(s); /* skip the .gz header */
}
- return (gzFile)s;
+ return (ErtsGzFile)s;
}
/* ===========================================================================
@@ -296,7 +297,7 @@ local int gz_rewind (gz_stream *s)
/* ===========================================================================
Opens a gzip (.gz) file for reading or writing.
*/
-gzFile erts_gzopen (path, mode)
+ErtsGzFile erts_gzopen (path, mode)
const char *path;
const char *mode;
{
@@ -447,7 +448,7 @@ local int destroy (s)
gzread returns the number of bytes actually read (0 for end of file).
*/
int
-erts_gzread(gzFile file, voidp buf, unsigned len)
+erts_gzread(ErtsGzFile file, voidp buf, unsigned len)
{
gz_stream *s = (gz_stream*)file;
Bytef *start = buf; /* starting point for crc computation */
@@ -557,7 +558,7 @@ erts_gzread(gzFile file, voidp buf, unsigned len)
gzwrite returns the number of bytes actually written (0 in case of error).
*/
int
-erts_gzwrite(gzFile file, voidp buf, unsigned len)
+erts_gzwrite(ErtsGzFile file, voidp buf, unsigned len)
{
gz_stream *s = (gz_stream*)file;
@@ -593,11 +594,20 @@ erts_gzwrite(gzFile file, voidp buf, unsigned len)
*/
int
-erts_gzseek(gzFile file, int offset, int whence)
+erts_gzseek(ErtsGzFile file, int offset, int whence)
{
int pos;
gz_stream* s = (gz_stream *) file;
+ switch (whence) {
+ case EFILE_SEEK_SET: whence = SEEK_SET; break;
+ case EFILE_SEEK_CUR: whence = SEEK_CUR; break;
+ case EFILE_SEEK_END: whence = SEEK_END; break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+
if (s == NULL) {
errno = EINVAL;
return -1;
@@ -655,7 +665,7 @@ erts_gzseek(gzFile file, int offset, int whence)
degrade compression.
*/
int
-erts_gzflush(gzFile file, int flush)
+erts_gzflush(ErtsGzFile file, int flush)
{
uInt len;
int done = 0;
@@ -714,7 +724,7 @@ local uLong getLong (s)
and deallocates all the (de)compression state.
*/
int
-erts_gzclose(gzFile file)
+erts_gzclose(ErtsGzFile file)
{
int err;
gz_stream *s = (gz_stream*)file;
@@ -723,9 +733,9 @@ erts_gzclose(gzFile file)
if (s->mode == 'w') {
err = erts_gzflush (file, Z_FINISH);
- if (err != Z_OK) return s->destroy(file);
+ if (err != Z_OK) return s->destroy(s);
}
- return s->destroy(file);
+ return s->destroy(s);
}
diff --git a/erts/emulator/drivers/common/gzio.h b/erts/emulator/drivers/common/gzio.h
index 3f1e546140..ea50d922ec 100644
--- a/erts/emulator/drivers/common/gzio.h
+++ b/erts/emulator/drivers/common/gzio.h
@@ -17,11 +17,15 @@
* %CopyrightEnd%
*/
-gzFile erts_gzopen (const char *path, const char *mode);
-int erts_gzread(gzFile file, voidp buf, unsigned len);
-int erts_gzwrite(gzFile file, voidp buf, unsigned len);
-int erts_gzseek(gzFile, int, int);
-int erts_gzflush(gzFile file, int flush);
-int erts_gzclose(gzFile file);
+#include "zlib.h"
+
+typedef struct erts_gzFile* ErtsGzFile;
+
+ErtsGzFile erts_gzopen (const char *path, const char *mode);
+int erts_gzread(ErtsGzFile file, voidp buf, unsigned len);
+int erts_gzwrite(ErtsGzFile file, voidp buf, unsigned len);
+int erts_gzseek(ErtsGzFile, int, int);
+int erts_gzflush(ErtsGzFile file, int flush);
+int erts_gzclose(ErtsGzFile file);
ErlDrvBinary* erts_gzinflate_buffer(char*, uLong);
ErlDrvBinary* erts_gzdeflate_buffer(char*, uLong);
diff --git a/erts/emulator/drivers/common/gzio_zutil.h b/erts/emulator/drivers/common/gzio_zutil.h
index 00eccc80fc..854205cc2c 100644
--- a/erts/emulator/drivers/common/gzio_zutil.h
+++ b/erts/emulator/drivers/common/gzio_zutil.h
@@ -23,12 +23,6 @@
* that may change or not exist at all.
*/
-#ifndef HAVE_LIBZ
-/* Use our "real" copy of zutil.h if we don't use shared zlib */
-#include "zutil.h"
-
-#else /* HAVE_LIBZ: Shared zlib is used */
-
#define local static
#define DEF_MEM_LEVEL 8
#define zmemcpy sys_memcpy
@@ -77,6 +71,3 @@
# define OS_CODE 0x03 /* assume Unix */
#endif
-
-#endif /* HAVE_LIBZ */
-
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 45fac69303..3c6922eb8e 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -86,6 +86,17 @@
#endif
typedef unsigned long long llu_t;
+#ifndef INT16_MIN
+#define INT16_MIN (-32768)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+
+#ifdef __OSE__
+#include "inet.h"
+#endif
+
#ifdef __WIN32__
#define STRNCASECMP strncasecmp
@@ -189,6 +200,7 @@ typedef unsigned long long llu_t;
#define HAVE_MULTICAST_SUPPORT
+#define HAVE_UDP
#define ERRNO_BLOCK WSAEWOULDBLOCK
@@ -256,14 +268,13 @@ static BOOL (WINAPI *fpSetHandleInformation)(HANDLE,DWORD,DWORD);
#define sock_htonl(x) htonl((x))
#define sock_send(s,buf,len,flag) send((s),(buf),(len),(flag))
#define sock_sendv(s, vec, size, np, flag) \
- WSASend((s),(WSABUF*)(vec),\
- (size),(np),(flag),NULL,NULL)
+ WSASend((s),(WSABUF*)(vec),(size),(np),(flag),NULL,NULL)
#define sock_recv(s,buf,len,flag) recv((s),(buf),(len),(flag))
#define sock_recvfrom(s,buf,blen,flag,addr,alen) \
- recvfrom((s),(buf),(blen),(flag),(addr),(alen))
+ recvfrom((s),(buf),(blen),(flag),(addr),(alen))
#define sock_sendto(s,buf,blen,flag,addr,alen) \
- sendto((s),(buf),(blen),(flag),(addr),(alen))
+ sendto((s),(buf),(blen),(flag),(addr),(alen))
#define sock_hostname(buf, len) gethostname((buf), (len))
#define sock_getservbyname(name,proto) getservbyname((name),(proto))
@@ -282,7 +293,135 @@ static BOOL (WINAPI *fpSetHandleInformation)(HANDLE,DWORD,DWORD);
static unsigned long zero_value = 0;
static unsigned long one_value = 1;
-#else /* #ifdef __WIN32__ */
+#elif defined (__OSE__)
+
+/*
+ * Some notes about how inet (currently only tcp) works on OSE.
+ * The driver uses OSE signals to communicate with the one_inet
+ * process. Because of the difference in how signals and file descriptors
+ * work the whole select/deselect mechanic is very different.
+ * In ose when a sock_select is done a function is called. That function
+ * notes the changes that the driver want to do, but does not act on it.
+ * later when the function returns the new desired state is compared
+ * to the previous state and the apprioriate actions are taken. The action
+ * is usually to either request more data from the stack or stop requesting
+ * data.
+ *
+ * One thing to note is that the driver never does select/deselect. It always
+ * listens for the signals. Flow of data is regulated by sending or not sending
+ * signals to the ose inet process.
+ *
+ * The interesting functions to look at are:
+ * * inet_driver_select : called when sock_select is called
+ * * tcp_inet_ose_dispatch_signal : checks state changes and sends new signals
+ * * tcp_inet_drv_output_ose : ready output callback, reads signals and calls
+ * dispatch_signal
+ * * tcp_inet_drv_input_ose : ready input callback.
+ */
+
+#include "efs.h"
+#include "sys/socket.h"
+#include "sys/uio.h"
+#include "sfk/sys/sfk_uio.h"
+#include "netinet/in.h"
+#include "netinet/tcp.h"
+#include "netdb.h"
+#include "ose_spi/socket.sig"
+
+
+static ssize_t writev_fallback(int fd, const struct iovec *iov, int iovcnt, int max_sz);
+
+#define INVALID_SOCKET -1
+#define INVALID_EVENT -1
+#define SOCKET_ERROR -1
+
+#define SOCKET int
+#define HANDLE int
+#define FD_READ ERL_DRV_READ
+#define FD_WRITE ERL_DRV_WRITE
+#define FD_CLOSE 0
+#define FD_CONNECT (1<<4)
+#define FD_ACCEPT (1<<5)
+#define SOCK_FD_ERROR (1<<6)
+
+#define sock_connect(s, addr, len) connect((s), (addr), (len))
+#define sock_listen(s, b) listen((s), (b))
+#define sock_bind(s, addr, len) bind((s), (addr), (len))
+#define sock_getopt(s,t,n,v,l) getsockopt((s),(t),(n),(v),(l))
+#define sock_setopt(s,t,n,v,l) setsockopt((s),(t),(n),(v),(l))
+#define sock_name(s, addr, len) getsockname((s), (addr), (len))
+#define sock_peer(s, addr, len) getpeername((s), (addr), (len))
+#define sock_ntohs(x) ntohs((x))
+#define sock_ntohl(x) ntohl((x))
+#define sock_htons(x) htons((x))
+#define sock_htonl(x) htonl((x))
+
+#define sock_accept(s, addr, len) accept((s), (addr), (len))
+#define sock_send(s,buf,len,flag) inet_send((s),(buf),(len),(flag))
+#define sock_sendto(s,buf,blen,flag,addr,alen) \
+ sendto((s),(buf),(blen),(flag),(addr),(alen))
+#define sock_sendv(s, vec, size, np, flag) \
+ (*(np) = writev_fallback((s), (struct iovec*)(vec), (size), (*(np))))
+#define sock_sendmsg(s,msghdr,flag) sendmsg((s),(msghdr),(flag))
+
+#define sock_open(af, type, proto) socket((af), (type), (proto))
+#define sock_close(s) close((s))
+#define sock_dup(s) dup((s))
+#define sock_shutdown(s, how) shutdown((s), (how))
+
+#define sock_hostname(buf, len) gethostname((buf), (len))
+#define sock_getservbyname(name,proto) getservbyname((name), (proto))
+#define sock_getservbyport(port,proto) getservbyport((port), (proto))
+
+#define sock_recv(s,buf,len,flag) recv((s),(buf),(len),(flag))
+#define sock_recvfrom(s,buf,blen,flag,addr,alen) \
+ recvfrom((s),(buf),(blen),(flag),(addr),(alen))
+#define sock_recvmsg(s,msghdr,flag) recvmsg((s),(msghdr),(flag))
+
+#define sock_errno() errno
+#define sock_create_event(d) ((d)->s) /* return file descriptor */
+#define sock_close_event(e) /* do nothing */
+
+#ifndef WANT_NONBLOCKING
+#define WANT_NONBLOCKING
+#endif
+#include "sys.h"
+
+typedef unsigned long u_long;
+#define IN_CLASSA(a) ((((in_addr_t)(a)) & 0x80000000) == 0)
+#define IN_CLASSA_NET 0xff000000
+#define IN_CLASSA_NSHIFT 24
+#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
+#define IN_CLASSA_MAX 128
+
+#define IN_CLASSB(a) ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
+#define IN_CLASSB_NET 0xffff0000
+#define IN_CLASSB_NSHIFT 16
+#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
+#define IN_CLASSB_MAX 65536
+
+#define IN_CLASSC(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
+#define IN_CLASSC_NET 0xffffff00
+#define IN_CLASSC_NSHIFT 8
+#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
+
+#define IN_CLASSD(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
+#define IN_MULTICAST(a) IN_CLASSD(a)
+
+#define IN_EXPERIMENTAL(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
+#define IN_BADCLASS(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
+
+#define sock_select(d, flags, onoff) do { \
+ ASSERT(!(d)->is_ignored); \
+ (d)->event_mask = (onoff) ? \
+ ((d)->event_mask | (flags)) : \
+ ((d)->event_mask & ~(flags)); \
+ DEBUGF(("(%s / %d) sock_select(%ld): flags=%02X, onoff=%d, event_mask=%02lX, s=%d\r\n", \
+ __FILE__, __LINE__, (long) (d)->port, (flags), (onoff), (unsigned long) (d)->event_mask, (d)->s)); \
+ inet_driver_select((d), (flags), (onoff)); \
+ } while(0)
+
+#else /* !__OSE__ && !__WIN32__ */
#include <sys/time.h>
#ifdef NETDB_H_NEEDS_IN_H
@@ -323,6 +462,8 @@ static unsigned long one_value = 1;
#include <setns.h>
#endif
+#define HAVE_UDP
+
/* SCTP support -- currently for UNIX platforms only: */
#undef HAVE_SCTP
#if defined(HAVE_SCTP_H)
@@ -545,13 +686,13 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
(d)->event_mask = (onoff) ? \
((d)->event_mask | (flags)) : \
((d)->event_mask & ~(flags)); \
- DEBUGF(("sock_select(%ld): flags=%02X, onoff=%d, event_mask=%02lX\r\n", \
- (long) (d)->port, (flags), (onoff), (unsigned long) (d)->event_mask)); \
+ DEBUGF(("(%s / %d) sock_select(%ld): flags=%02X, onoff=%d, event_mask=%02lX\r\n", \
+ __FILE__, __LINE__, (long) (d)->port, (flags), (onoff), (unsigned long) (d)->event_mask)); \
inet_driver_select((d)->port, (ErlDrvEvent)(long)(d)->event, (flags), (onoff)); \
} while(0)
-#endif /* #ifdef __WIN32__ #else */
+#endif /* !__WIN32__ && !__OSE__ */
#ifdef HAVE_SOCKLEN_T
# define SOCKLEN_T socklen_t
@@ -612,6 +753,7 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define INET_PASSIVE 0 /* false */
#define INET_ACTIVE 1 /* true */
#define INET_ONCE 2 /* true; active once then passive */
+#define INET_MULTI 3 /* true; active N then passive */
/* INET_REQ_GETSTATUS enumeration */
#define INET_F_OPEN 0x0001
@@ -846,9 +988,10 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define INET_IFNAMSIZ 16
/* INET Ignore states */
-#define INET_IGNORE_NONE 0
-#define INET_IGNORE_READ 1
-#define INET_IGNORE_WRITE 1 << 1
+#define INET_IGNORE_NONE 0
+#define INET_IGNORE_READ (1 << 0)
+#define INET_IGNORE_WRITE (1 << 1)
+#define INET_IGNORE_PASSIVE (1 << 2)
/* Max length of Erlang Term Buffer (for outputting structured terms): */
#ifdef HAVE_SCTP
@@ -958,6 +1101,7 @@ typedef struct {
inet_async_op op_queue[INET_MAX_ASYNC]; /* call queue */
int active; /* 0 = passive, 1 = active, 2 = active once */
+ Sint16 active_count; /* counter for {active,N} */
int stype; /* socket type:
SOCK_STREAM/SOCK_DGRAM/SOCK_SEQPACKET */
int sprotocol; /* socket protocol:
@@ -1001,6 +1145,13 @@ typedef struct {
char *netns; /* Socket network namespace name
as full file path */
#endif
+#ifdef __OSE__
+ int select_state; /* state to keep track of whether we
+ should trigger another read/write
+ request at end of ready_input/output */
+ ErlDrvEvent events[6];
+#endif
+
} inet_descriptor;
@@ -1016,20 +1167,88 @@ static void tcp_inet_stop(ErlDrvData);
static void tcp_inet_command(ErlDrvData, char*, ErlDrvSizeT);
static void tcp_inet_commandv(ErlDrvData, ErlIOVec*);
static void tcp_inet_flush(ErlDrvData drv_data);
+#ifndef __OSE__
static void tcp_inet_drv_input(ErlDrvData, ErlDrvEvent);
static void tcp_inet_drv_output(ErlDrvData data, ErlDrvEvent event);
+#endif
static ErlDrvData tcp_inet_start(ErlDrvPort, char* command);
static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData, unsigned int,
char*, ErlDrvSizeT, char**, ErlDrvSizeT);
static void tcp_inet_timeout(ErlDrvData);
static void tcp_inet_process_exit(ErlDrvData, ErlDrvMonitor *);
static void inet_stop_select(ErlDrvEvent, void*);
+static void inet_emergency_close(ErlDrvData);
#ifdef __WIN32__
static void tcp_inet_event(ErlDrvData, ErlDrvEvent);
static void find_dynamic_functions(void);
#endif
-static struct erl_drv_entry tcp_inet_driver_entry =
+#ifdef __OSE__
+/* The structure of the signal used for requesting asynchronous
+ * notification from the stack. Under normal circumstances the network stack
+ * shouldn't overwrite the value set in the fd field by the sender
+ * of the request */
+struct OseAsyncSig {
+ struct FmEvent event;
+ int fd;
+};
+
+union SIGNAL {
+ SIGSELECT signo;
+ struct OseAsyncSig async;
+};
+
+static ErlDrvSSizeT tcp_inet_ctl_ose(ErlDrvData e, unsigned int cmd,
+ char* buf, ErlDrvSizeT len,
+ char** rbuf, ErlDrvSizeT rsize);
+static void tcp_inet_commandv_ose(ErlDrvData e, ErlIOVec* ev);
+static void tcp_inet_drv_output_ose(ErlDrvData data, ErlDrvEvent event);
+static void tcp_inet_drv_input_ose(ErlDrvData data, ErlDrvEvent event);
+static ErlDrvOseEventId inet_resolve_signal(union SIGNAL *sig);
+
+#ifdef INET_DRV_DEBUG
+
+static char *read_req = "SO_EVENT_READ_REQUEST";
+static char *read_rep = "SO_EVENT_READ_REPLY";
+static char *write_req = "SO_EVENT_WRITE_REQUEST";
+static char *write_rep = "SO_EVENT_WRITE_REPLY";
+static char *eof_req = "SO_EVENT_EOF_REQUEST";
+static char *eof_rep = "SO_EVENT_EOF_REPLY";
+static char *accept_req = "SO_EVENT_ACCEPT_REQUEST";
+static char *accept_rep = "SO_EVENT_ACCEPT_REPLY";
+static char *connect_req = "SO_EVENT_CONNECT_REQUEST";
+static char *connect_rep = "SO_EVENT_CONNECT_REPLY";
+static char *error_req = "SO_EVENT_ERROR_REQUEST";
+static char *error_rep = "SO_EVENT_ERROR_REPLY";
+static char signo_tmp[32];
+
+static char *signo_to_string(SIGSELECT signo) {
+ switch (signo) {
+ case SO_EVENT_READ_REQUEST: { return read_req; }
+ case SO_EVENT_READ_REPLY: { return read_rep; }
+ case SO_EVENT_WRITE_REQUEST: { return write_req; }
+ case SO_EVENT_WRITE_REPLY: { return write_rep; }
+ case SO_EVENT_EOF_REQUEST: { return eof_req; }
+ case SO_EVENT_EOF_REPLY: { return eof_rep; }
+ case SO_EVENT_ACCEPT_REQUEST: { return accept_req; }
+ case SO_EVENT_ACCEPT_REPLY: { return accept_rep; }
+ case SO_EVENT_CONNECT_REQUEST: { return connect_req; }
+ case SO_EVENT_CONNECT_REPLY: { return connect_rep; }
+ case SO_EVENT_ERROR_REQUEST: { return error_req; }
+ case SO_EVENT_ERROR_REPLY: { return error_rep; }
+ }
+
+ snprintf(signo_tmp,32,"0x%x",signo);
+
+ return signo_tmp;
+}
+
+#endif
+
+#endif /* __OSE__ */
+
+
+static struct erl_drv_entry tcp_inet_driver_entry =
{
tcp_inet_init, /* inet_init will add this driver !! */
tcp_inet_start,
@@ -1038,6 +1257,9 @@ static struct erl_drv_entry tcp_inet_driver_entry =
#ifdef __WIN32__
tcp_inet_event,
NULL,
+#elif defined(__OSE__)
+ tcp_inet_drv_input_ose, /*ready_input*/
+ tcp_inet_drv_output_ose, /*ready_output*/
#else
tcp_inet_drv_input,
tcp_inet_drv_output,
@@ -1045,9 +1267,17 @@ static struct erl_drv_entry tcp_inet_driver_entry =
"tcp_inet",
NULL,
NULL,
+#ifdef __OSE__
+ tcp_inet_ctl_ose,
+#else
tcp_inet_ctl,
+#endif
tcp_inet_timeout,
+#ifdef __OSE__
+ tcp_inet_commandv_ose,
+#else
tcp_inet_commandv,
+#endif
NULL,
tcp_inet_flush,
NULL,
@@ -1058,11 +1288,13 @@ static struct erl_drv_entry tcp_inet_driver_entry =
ERL_DRV_FLAG_USE_PORT_LOCKING|ERL_DRV_FLAG_SOFT_BUSY,
NULL,
tcp_inet_process_exit,
- inet_stop_select
+ inet_stop_select,
+ inet_emergency_close
};
+#ifdef HAVE_UDP
static int packet_inet_init(void);
static void packet_inet_stop(ErlDrvData);
static void packet_inet_command(ErlDrvData, char*, ErlDrvSizeT);
@@ -1110,8 +1342,10 @@ static struct erl_drv_entry udp_inet_driver_entry =
ERL_DRV_FLAG_USE_PORT_LOCKING,
NULL,
NULL,
- inet_stop_select
+ inet_stop_select,
+ inet_emergency_close
};
+#endif
#ifdef HAVE_SCTP
static struct erl_drv_entry sctp_inet_driver_entry =
@@ -1143,7 +1377,8 @@ static struct erl_drv_entry sctp_inet_driver_entry =
ERL_DRV_FLAG_USE_PORT_LOCKING,
NULL,
NULL, /* process_exit */
- inet_stop_select
+ inet_stop_select,
+ inet_emergency_close
};
#endif
@@ -1175,6 +1410,7 @@ static int tcp_deliver(tcp_descriptor* desc, int len);
static int tcp_inet_output(tcp_descriptor* desc, HANDLE event);
static int tcp_inet_input(tcp_descriptor* desc, HANDLE event);
+#ifdef HAVE_UDP
typedef struct {
inet_descriptor inet; /* common data structure (DON'T MOVE) */
int read_packets; /* Number of packets to read per invocation */
@@ -1186,29 +1422,54 @@ typedef struct {
static int packet_inet_input(udp_descriptor* udesc, HANDLE event);
static int packet_inet_output(udp_descriptor* udesc, HANDLE event);
+#endif
-/* convert descriptor poiner to inet_descriptor pointer */
+/* convert descriptor pointer to inet_descriptor pointer */
#define INETP(d) (&(d)->inet)
+#ifdef __OSE__
+static void inet_driver_select(inet_descriptor* desc,
+ int flags, int onoff);
+static void tcp_inet_ose_dispatch_signals(tcp_descriptor *desc,
+ int prev_select_state,
+ union SIGNAL *sig);
+#endif
+
static int async_ref = 0; /* async reference id generator */
#define NEW_ASYNC_ID() ((async_ref++) & 0xffff)
+/* check for transition from active to passive */
+#define INET_CHECK_ACTIVE_TO_PASSIVE(inet) \
+ do { \
+ if ((inet)->active == INET_ONCE) \
+ (inet)->active = INET_PASSIVE; \
+ else if ((inet)->active == INET_MULTI && --((inet)->active_count) == 0) { \
+ (inet)->active = INET_PASSIVE; \
+ packet_passive_message(inet); \
+ } \
+ } while (0)
static ErlDrvTermData am_ok;
static ErlDrvTermData am_tcp;
-static ErlDrvTermData am_udp;
static ErlDrvTermData am_error;
+static ErlDrvTermData am_einval;
static ErlDrvTermData am_inet_async;
static ErlDrvTermData am_inet_reply;
static ErlDrvTermData am_timeout;
static ErlDrvTermData am_closed;
+static ErlDrvTermData am_tcp_passive;
static ErlDrvTermData am_tcp_closed;
static ErlDrvTermData am_tcp_error;
-static ErlDrvTermData am_udp_error;
static ErlDrvTermData am_empty_out_q;
static ErlDrvTermData am_ssl_tls;
+#ifdef HAVE_UDP
+static ErlDrvTermData am_udp;
+static ErlDrvTermData am_udp_passive;
+static ErlDrvTermData am_udp_error;
+#endif
#ifdef HAVE_SCTP
static ErlDrvTermData am_sctp;
+static ErlDrvTermData am_sctp_passive;
static ErlDrvTermData am_sctp_error;
static ErlDrvTermData am_true;
static ErlDrvTermData am_false;
@@ -1218,6 +1479,7 @@ static ErlDrvTermData am_list;
static ErlDrvTermData am_binary;
static ErlDrvTermData am_active;
static ErlDrvTermData am_once;
+static ErlDrvTermData am_multi;
static ErlDrvTermData am_buffer;
static ErlDrvTermData am_linger;
static ErlDrvTermData am_recbuf;
@@ -1412,6 +1674,7 @@ static void *realloc_wrapper(void *current, ErlDrvSizeT size){
# define SCTP_ANC_BUFF_SIZE INET_DEF_BUFFER/2 /* XXX: not very good... */
#endif
+#ifdef HAVE_UDP
static int load_ip_port(ErlDrvTermData* spec, int i, char* buf)
{
spec[i++] = ERL_DRV_INT;
@@ -1446,6 +1709,7 @@ static int load_ip_address(ErlDrvTermData* spec, int i, int family, char* buf)
}
return i;
}
+#endif
#ifdef HAVE_SCTP
@@ -1466,8 +1730,8 @@ static int load_ip_and_port
unsigned int alen = len;
char abuf [len];
int res = inet_get_address(abuf, (inet_address*) addr, &alen);
- ASSERT(res==0);
- res = 0;
+ ASSERT(res==0); (void)res;
+
/* Now "abuf" contains: Family(1b), Port(2b), IP(4|16b) */
/* NB: the following functions are safe to use, as they create tuples
@@ -1612,10 +1876,12 @@ static void release_buffer(ErlDrvBinary* buf)
}
}
+#ifdef HAVE_UDP
static ErlDrvBinary* realloc_buffer(ErlDrvBinary* buf, ErlDrvSizeT newsz)
{
return driver_realloc_binary(buf, newsz);
}
+#endif
/* use a TRICK, access the refc field to see if any one else has
* a ref to this buffer then call driver_free_binary else
@@ -2627,6 +2893,9 @@ static ErlDrvTermData am_sctp_rtoinfo, /* Option names */
/* For #sctp_paddrinfo{}: */
am_active, am_inactive,
+# if HAVE_DECL_SCTP_UNCONFIRMED
+ am_unconfirmed,
+# endif
/* For #sctp_status{}: */
# if HAVE_DECL_SCTP_EMPTY
@@ -3276,6 +3545,7 @@ static int tcp_error_message(tcp_descriptor* desc, int err)
return erl_drv_output_term(desc->inet.dport, spec, i);
}
+#ifdef HAVE_UDP
/*
** active mode message:
** {udp, S, IP, Port, [H1,...Hsz | Data]} or
@@ -3366,7 +3636,41 @@ static int packet_binary_message
ASSERT(i <= PACKET_ERL_DRV_TERM_DATA_LEN);
return erl_drv_output_term(desc->dport, spec, i);
}
+#endif
+
+/*
+** active mode message: send active-to-passive transition message
+** {tcp_passive, S} or
+** {udp_passive, S} or
+** {sctp_passive, S}
+*/
+ static int packet_passive_message(inet_descriptor* desc)
+ {
+ ErlDrvTermData spec[6];
+ int i = 0;
+
+ DEBUGF(("packet_passive_message(%ld):\r\n", (long)desc->port));
+
+#if !defined(HAVE_UDP) && !defined(HAVE_SCTP)
+ i = LOAD_ATOM(spec, i, am_tcp_passive);
+#else
+ if (desc->sprotocol == IPPROTO_TCP)
+ i = LOAD_ATOM(spec, i, am_tcp_passive);
+ else {
+#ifdef HAVE_SCTP
+ i = LOAD_ATOM(spec, i, IS_SCTP(desc) ? am_sctp_passive : am_udp_passive);
+#else
+ i = LOAD_ATOM(spec, i, am_udp_passive);
+#endif
+ }
+#endif
+ i = LOAD_PORT(spec, i, desc->dport);
+ i = LOAD_TUPLE(spec, i, 2);
+ ASSERT(i <= 6);
+ return erl_drv_output_term(desc->dport, spec, i);
+ }
+#ifdef HAVE_UDP
/*
** send active message {udp_error|sctp_error, S, Error}
*/
@@ -3393,7 +3697,7 @@ static int packet_error_message(udp_descriptor* udesc, int err)
ASSERT(i == sizeof(spec)/sizeof(*spec));
return erl_drv_output_term(desc->dport, spec, i);
}
-
+#endif
/*
** active=TRUE:
@@ -3409,7 +3713,7 @@ static int tcp_reply_data(tcp_descriptor* desc, char* buf, int len)
int code;
const char* body = buf;
int bodylen = len;
-
+
packet_get_body(desc->inet.htype, &body, &bodylen);
if (desc->inet.deliver == INET_DELIVER_PORT) {
@@ -3427,8 +3731,7 @@ static int tcp_reply_data(tcp_descriptor* desc, char* buf, int len)
if (code < 0)
return code;
- if (desc->inet.active == INET_ONCE)
- desc->inet.active = INET_PASSIVE;
+ INET_CHECK_ACTIVE_TO_PASSIVE(INETP(desc));
return code;
}
@@ -3455,12 +3758,11 @@ tcp_reply_binary_data(tcp_descriptor* desc, ErlDrvBinary* bin, int offs, int len
}
if (code < 0)
return code;
- if (desc->inet.active == INET_ONCE)
- desc->inet.active = INET_PASSIVE;
+ INET_CHECK_ACTIVE_TO_PASSIVE(INETP(desc));
return code;
}
-
+#ifdef HAVE_UDP
static int
packet_reply_binary_data(inet_descriptor* desc, unsigned int hsz,
ErlDrvBinary * bin, int offs, int len,
@@ -3479,11 +3781,11 @@ packet_reply_binary_data(inet_descriptor* desc, unsigned int hsz,
code = packet_binary_message(desc, bin, offs, len, extra);
if (code < 0)
return code;
- if (desc->active == INET_ONCE)
- desc->active = INET_PASSIVE;
+ INET_CHECK_ACTIVE_TO_PASSIVE(desc);
return code;
}
}
+#endif
/* ----------------------------------------------------------------------------
@@ -3525,6 +3827,7 @@ sock_init(void) /* May be called multiple times. */
#ifdef HAVE_SCTP
static void inet_init_sctp(void) {
INIT_ATOM(sctp);
+ INIT_ATOM(sctp_passive);
INIT_ATOM(sctp_error);
INIT_ATOM(true);
INIT_ATOM(false);
@@ -3534,6 +3837,7 @@ static void inet_init_sctp(void) {
INIT_ATOM(binary);
INIT_ATOM(active);
INIT_ATOM(once);
+ INIT_ATOM(multi);
INIT_ATOM(buffer);
INIT_ATOM(linger);
INIT_ATOM(recbuf);
@@ -3621,7 +3925,10 @@ static void inet_init_sctp(void) {
/* For #sctp_paddrinfo{}: */
INIT_ATOM(active);
INIT_ATOM(inactive);
-
+# if HAVE_DECL_SCTP_UNCONFIRMED
+ INIT_ATOM(unconfirmed);
+# endif
+
/* For #sctp_status{}: */
# if HAVE_DECL_SCTP_EMPTY
INIT_ATOM(empty);
@@ -3657,15 +3964,22 @@ static int inet_init()
INIT_ATOM(ok);
INIT_ATOM(tcp);
+#ifdef HAVE_UDP
INIT_ATOM(udp);
+#endif
INIT_ATOM(error);
+ INIT_ATOM(einval);
INIT_ATOM(inet_async);
INIT_ATOM(inet_reply);
INIT_ATOM(timeout);
INIT_ATOM(closed);
+ INIT_ATOM(tcp_passive);
INIT_ATOM(tcp_closed);
INIT_ATOM(tcp_error);
+#ifdef HAVE_UDP
+ INIT_ATOM(udp_passive);
INIT_ATOM(udp_error);
+#endif
INIT_ATOM(empty_out_q);
INIT_ATOM(ssl_tls);
@@ -3684,7 +3998,10 @@ static int inet_init()
/* add TCP, UDP and SCTP drivers */
add_driver_entry(&tcp_inet_driver_entry);
+#ifdef HAVE_UDP
add_driver_entry(&udp_inet_driver_entry);
+#endif
+
#ifdef HAVE_SCTP
/* Check the size of SCTP AssocID -- currently both this driver and the
Erlang part require 32 bit: */
@@ -4013,6 +4330,16 @@ static void desc_close(inet_descriptor* desc)
desc->forced_events = 0;
desc->send_would_block = 0;
#endif
+#ifdef __OSE__
+ if (desc->events[0]) {
+ driver_select(desc->port,desc->events[0],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ driver_select(desc->port,desc->events[1],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ driver_select(desc->port,desc->events[2],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ driver_select(desc->port,desc->events[3],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ driver_select(desc->port,desc->events[4],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ driver_select(desc->port,desc->events[5],FD_READ|FD_WRITE|ERL_DRV_USE,0);
+ }
+#else
/*
* We should close the fd here, but the other driver might still
* be selecting on it.
@@ -4022,6 +4349,7 @@ static void desc_close(inet_descriptor* desc)
ERL_DRV_USE, 0);
else
inet_stop_select((ErlDrvEvent)(long)desc->event,NULL);
+#endif
desc->event = INVALID_EVENT; /* closed by stop_select callback */
desc->s = INVALID_SOCKET;
desc->event_mask = 0;
@@ -4053,7 +4381,7 @@ static int erl_inet_close(inet_descriptor* desc)
desc_close(desc);
desc->state = INET_STATE_CLOSED;
} else if (desc->prebound && (desc->s != INVALID_SOCKET)) {
- sock_select(desc, FD_READ | FD_WRITE | FD_CLOSE, 0);
+ sock_select(desc, FD_READ | FD_WRITE | FD_CLOSE | ERL_DRV_USE_NO_CALLBACK, 0);
desc->event_mask = 0;
#ifdef __WIN32__
desc->forced_events = 0;
@@ -4063,6 +4391,64 @@ static int erl_inet_close(inet_descriptor* desc)
return 0;
}
+#ifdef __OSE__
+static void inet_select_init(inet_descriptor* desc)
+{
+ desc->events[0] =
+ erl_drv_ose_event_alloc(SO_EVENT_READ_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[0],
+ ERL_DRV_READ|ERL_DRV_USE, 1);
+
+ desc->events[1] =
+ erl_drv_ose_event_alloc(SO_EVENT_EOF_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[1],
+ ERL_DRV_READ|ERL_DRV_USE, 1);
+
+ desc->events[2] =
+ erl_drv_ose_event_alloc(SO_EVENT_ACCEPT_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[2],
+ ERL_DRV_READ|ERL_DRV_USE, 1);
+
+ /* trigger tcp_inet_input */
+ desc->events[3] =
+ erl_drv_ose_event_alloc(SO_EVENT_WRITE_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[3],
+ ERL_DRV_WRITE|ERL_DRV_USE, 1);
+
+ desc->events[4] =
+ erl_drv_ose_event_alloc(SO_EVENT_CONNECT_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[4],
+ ERL_DRV_WRITE|ERL_DRV_USE, 1);
+
+ desc->events[5] =
+ erl_drv_ose_event_alloc(SO_EVENT_ERROR_REPLY,
+ desc->s,
+ inet_resolve_signal,
+ NULL);
+ driver_select(desc->port, desc->events[5],
+ ERL_DRV_WRITE|ERL_DRV_USE, 1);
+
+ /* Issue a select on error event before any other select to be sure we are
+ prepared to receive error notifications from the stack, even in the
+ situations when select isn't issued */
+ sock_select(desc, SOCK_FD_ERROR, 1);
+}
+#endif
static ErlDrvSSizeT inet_ctl_open(inet_descriptor* desc, int domain, int type,
char** rbuf, ErlDrvSizeT rsize)
@@ -4146,6 +4532,10 @@ static ErlDrvSSizeT inet_ctl_open(inet_descriptor* desc, int domain, int type,
#ifdef __WIN32__
driver_select(desc->port, desc->event, ERL_DRV_READ, 1);
#endif
+#ifdef __OSE__
+ inet_select_init(desc);
+#endif
+
desc->state = INET_STATE_OPEN;
desc->stype = type;
desc->sfamily = domain;
@@ -4155,28 +4545,50 @@ static ErlDrvSSizeT inet_ctl_open(inet_descriptor* desc, int domain, int type,
/* as inet_open but pass in an open socket (MUST BE OF RIGHT TYPE) */
static ErlDrvSSizeT inet_ctl_fdopen(inet_descriptor* desc, int domain, int type,
- SOCKET s, char** rbuf, ErlDrvSizeT rsize)
+ SOCKET s, Uint32 bound,
+ char** rbuf, ErlDrvSizeT rsize)
{
inet_address name;
unsigned int sz = sizeof(name);
- /* check that it is a socket and that the socket is bound */
- if (IS_SOCKET_ERROR(sock_name(s, (struct sockaddr*) &name, &sz)))
- return ctl_error(sock_errno(), rbuf, rsize);
- if (name.sa.sa_family != domain)
- return ctl_error(EINVAL, rbuf, rsize);
+ if (bound) {
+ /* check that it is a socket and that the socket is bound */
+ if (IS_SOCKET_ERROR(sock_name(s, (struct sockaddr*) &name, &sz)))
+ return ctl_error(sock_errno(), rbuf, rsize);
+ if (name.sa.sa_family != domain)
+ return ctl_error(EINVAL, rbuf, rsize);
+ }
+#ifdef __OSE__
+ /* for fdopen duplicating the sd will allow to uniquely identify
+ the signal from OSE with erlang port */
+ desc->s = sock_dup(s);
+#else
desc->s = s;
+#endif
+
if ((desc->event = sock_create_event(desc)) == INVALID_EVENT)
return ctl_error(sock_errno(), rbuf, rsize);
SET_NONBLOCKING(desc->s);
#ifdef __WIN32__
driver_select(desc->port, desc->event, ERL_DRV_READ, 1);
#endif
- desc->state = INET_STATE_BOUND; /* assume bound */
+
+ if (bound)
+ desc->state = INET_STATE_BOUND;
+ else
+ desc->state = INET_STATE_OPEN;
+
if (type == SOCK_STREAM) { /* check if connected */
sz = sizeof(name);
- if (!IS_SOCKET_ERROR(sock_peer(s, (struct sockaddr*) &name, &sz)))
+ if (!IS_SOCKET_ERROR(sock_peer(s, (struct sockaddr*) &name, &sz))) {
desc->state = INET_STATE_CONNECTED;
+#ifdef __OSE__
+ /* since we are dealing with different descriptors (i.e. inet and
+ socket) the select part should be initialized with the right
+ values */
+ inet_select_init(desc);
+#endif
+ }
}
desc->prebound = 1; /* used to prevent a real close since
@@ -4202,8 +4614,7 @@ struct addr_if {
#ifndef SIOCGIFNETMASK
-static struct in_addr net_mask(in)
-struct in_addr in;
+static struct in_addr net_mask(struct in_addr in)
{
register u_long i = sock_ntohl(in.s_addr);
@@ -4319,6 +4730,36 @@ static char* sockaddr_to_buf(struct sockaddr* addr, char* ptr, char* end)
return NULL;
}
+/* sockaddr_bufsz_need
+ * Returns the number of bytes needed to store the information
+ * through sockaddr_to_buf
+ */
+
+static size_t sockaddr_bufsz_need(struct sockaddr* addr)
+{
+ if (addr->sa_family == AF_INET || addr->sa_family == 0) {
+ return 1 + sizeof(struct in_addr);
+ }
+#if defined(HAVE_IN6) && defined(AF_INET6)
+ else if (addr->sa_family == AF_INET6) {
+ return 1 + sizeof(struct in6_addr);
+ }
+#endif
+#if defined(AF_LINK)
+ if (addr->sa_family == AF_LINK) {
+ struct sockaddr_dl *sdl_p = (struct sockaddr_dl*) addr;
+ return 2 + sdl_p->sdl_alen;
+ }
+#endif
+#if defined(AF_PACKET) && defined(HAVE_NETPACKET_PACKET_H)
+ else if(addr->sa_family == AF_PACKET) {
+ struct sockaddr_ll *sll_p = (struct sockaddr_ll*) addr;
+ return 2 + sll_p->sll_halen;
+ }
+#endif
+ return 0;
+}
+
static char* buf_to_sockaddr(char* ptr, char* end, struct sockaddr* addr)
{
buf_check(ptr,end,1);
@@ -5378,7 +5819,7 @@ done:
ia_p->Ipv6IfIndex &&
ia_p->Ipv6IfIndex != index)
{
- /* Oops, there was an other interface for IPv6. Possible? XXX */
+ /* Oops, there was another interface for IPv6. Possible? XXX */
index = ia_p->Ipv6IfIndex;
goto index;
}
@@ -5397,6 +5838,11 @@ done:
}
#elif defined(HAVE_GETIFADDRS)
+#ifdef DEBUG
+#define GETIFADDRS_BUFSZ (1)
+#else
+#define GETIFADDRS_BUFSZ (512)
+#endif
static ErlDrvSSizeT inet_ctl_getifaddrs(inet_descriptor* desc_p,
char **rbuf_pp, ErlDrvSizeT rsize)
@@ -5407,15 +5853,15 @@ static ErlDrvSSizeT inet_ctl_getifaddrs(inet_descriptor* desc_p,
char *buf_p;
char *buf_alloc_p;
- buf_size = 512;
- buf_alloc_p = ALLOC(buf_size);
+ buf_size = GETIFADDRS_BUFSZ;
+ buf_alloc_p = ALLOC(GETIFADDRS_BUFSZ);
buf_p = buf_alloc_p;
# define BUF_ENSURE(Size) \
do { \
int NEED_, GOT_ = buf_p - buf_alloc_p; \
NEED_ = GOT_ + (Size); \
if (NEED_ > buf_size) { \
- buf_size = NEED_ + 512; \
+ buf_size = NEED_ + GETIFADDRS_BUFSZ; \
buf_alloc_p = REALLOC(buf_alloc_p, buf_size); \
buf_p = buf_alloc_p + GOT_; \
} \
@@ -5428,7 +5874,7 @@ static ErlDrvSSizeT inet_ctl_getifaddrs(inet_descriptor* desc_p,
while (! (P_ = sockaddr_to_buf((sa), buf_p, \
buf_alloc_p+buf_size))) { \
int GOT_ = buf_p - buf_alloc_p; \
- buf_size += 512; \
+ buf_size += GETIFADDRS_BUFSZ; \
buf_alloc_p = REALLOC(buf_alloc_p, buf_size); \
buf_p = buf_alloc_p + GOT_; \
} \
@@ -5485,10 +5931,11 @@ static ErlDrvSSizeT inet_ctl_getifaddrs(inet_descriptor* desc_p,
|| ifa_p->ifa_addr->sa_family == AF_PACKET
#endif
) {
- char *bp = buf_p;
- BUF_ENSURE(1);
- SOCKADDR_TO_BUF(INET_IFOPT_HWADDR, ifa_p->ifa_addr);
- if (buf_p - bp < 4) buf_p = bp; /* Empty hwaddr */
+ size_t need = sockaddr_bufsz_need(ifa_p->ifa_addr);
+ if (need > 3) {
+ BUF_ENSURE(1 + need);
+ SOCKADDR_TO_BUF(INET_IFOPT_HWADDR, ifa_p->ifa_addr);
+ }
}
#endif
}
@@ -5503,6 +5950,7 @@ static ErlDrvSSizeT inet_ctl_getifaddrs(inet_descriptor* desc_p,
return buf_size;
# undef BUF_ENSURE
}
+#undef GETIFADDRS_BUFSZ
#else
@@ -5652,8 +6100,25 @@ static int inet_set_opts(inet_descriptor* desc, char* ptr, int len)
case INET_LOPT_ACTIVE:
DEBUGF(("inet_set_opts(%ld): s=%d, ACTIVE=%d\r\n",
- (long)desc->port, desc->s,ival));
+ (long)desc->port, desc->s, ival));
desc->active = ival;
+ if (desc->active == INET_MULTI) {
+ long ac = desc->active_count;
+ Sint16 nval = get_int16(ptr);
+ ptr += 2;
+ len -= 2;
+ ac += nval;
+ if (ac > INT16_MAX || ac < INT16_MIN)
+ return -1;
+ desc->active_count += nval;
+ if (desc->active_count < 0)
+ desc->active_count = 0;
+ if (desc->active_count == 0) {
+ desc->active = INET_PASSIVE;
+ packet_passive_message(desc);
+ }
+ } else
+ desc->active_count = 0;
if ((desc->stype == SOCK_STREAM) && (desc->active != INET_PASSIVE) &&
(desc->state == INET_STATE_CLOSED)) {
tcp_closed_message((tcp_descriptor *) desc);
@@ -5749,6 +6214,7 @@ static int inet_set_opts(inet_descriptor* desc, char* ptr, int len)
}
continue;
+#ifdef HAVE_UDP
case INET_LOPT_UDP_READ_PACKETS:
if (desc->stype == SOCK_DGRAM) {
udp_descriptor* udesc = (udp_descriptor*) desc;
@@ -5756,6 +6222,7 @@ static int inet_set_opts(inet_descriptor* desc, char* ptr, int len)
udesc->read_packets = ival;
}
continue;
+#endif
#ifdef HAVE_SETNS
case INET_LOPT_NETNS:
@@ -5964,7 +6431,8 @@ static int inet_set_opts(inet_descriptor* desc, char* ptr, int len)
/* XXX fprintf(stderr,"desc->htype == %d, old_htype == %d,
desc->active == %d, old_active == %d\r\n",(int)desc->htype,
(int) old_htype, (int) desc->active, (int) old_active );*/
- return 1+(desc->htype == old_htype && desc->active == INET_ONCE);
+ return 1+(desc->htype == old_htype &&
+ (desc->active == INET_ONCE || desc->active == INET_MULTI));
}
return 0;
}
@@ -6097,6 +6565,21 @@ static int sctp_set_opts(inet_descriptor* desc, char* ptr, int len)
case INET_LOPT_ACTIVE:
desc->active = get_int32(curr); curr += 4;
+ if (desc->active == INET_MULTI) {
+ long ac = desc->active_count;
+ Sint16 nval = get_int16(curr); curr += 2;
+ ac += nval;
+ if (ac > INT16_MAX || ac < INT16_MIN)
+ return -1;
+ desc->active_count += nval;
+ if (desc->active_count < 0)
+ desc->active_count = 0;
+ if (desc->active_count == 0) {
+ desc->active = INET_PASSIVE;
+ packet_passive_message(desc);
+ }
+ } else
+ desc->active_count = 0;
res = 0;
continue;
@@ -6619,6 +7102,11 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
case INET_LOPT_ACTIVE:
*ptr++ = opt;
put_int32(desc->active, ptr);
+ if (desc->active == INET_MULTI) {
+ PLACE_FOR(2,ptr);
+ put_int16(desc->active_count, ptr);
+ ptr += 2;
+ }
continue;
case INET_LOPT_PACKET:
*ptr++ = opt;
@@ -6701,6 +7189,7 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
}
continue;
+#ifdef HAVE_UDP
case INET_LOPT_UDP_READ_PACKETS:
if (desc->stype == SOCK_DGRAM) {
*ptr++ = opt;
@@ -6710,6 +7199,7 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
TRUNCATE_TO(0,ptr);
}
continue;
+#endif
#ifdef HAVE_SETNS
case INET_LOPT_NETNS:
@@ -6894,8 +7384,13 @@ static int load_paddrinfo (ErlDrvTermData * spec, int i,
case SCTP_INACTIVE:
i = LOAD_ATOM (spec, i, am_inactive);
break;
+# if HAVE_DECL_SCTP_UNCONFIRMED
+ case SCTP_UNCONFIRMED:
+ i = LOAD_ATOM (spec, i, am_unconfirmed);
+ break;
+# endif
default:
- ASSERT(0); /* NB: SCTP_UNCONFIRMED modifier not yet supported */
+ i = LOAD_ATOM (spec, i, am_undefined);
}
i = LOAD_INT (spec, i, pai->spinfo_cwnd);
i = LOAD_INT (spec, i, pai->spinfo_srtt);
@@ -6991,7 +7486,10 @@ static ErlDrvSSizeT sctp_fill_opts(inet_descriptor* desc,
}
case INET_LOPT_ACTIVE:
{
- PLACE_FOR(spec, i, 2*LOAD_ATOM_CNT + LOAD_TUPLE_CNT);
+ if (desc->active == INET_MULTI)
+ PLACE_FOR(spec, i, LOAD_ATOM_CNT + LOAD_INT_CNT + LOAD_TUPLE_CNT);
+ else
+ PLACE_FOR(spec, i, 2*LOAD_ATOM_CNT + LOAD_TUPLE_CNT);
i = LOAD_ATOM (spec, i, am_active);
switch (desc->active)
{
@@ -7004,6 +7502,9 @@ static ErlDrvSSizeT sctp_fill_opts(inet_descriptor* desc,
case INET_ONCE :
{ i = LOAD_ATOM (spec, i, am_once); break; }
+ case INET_MULTI :
+ { i = LOAD_INT(spec, i, desc->active_count); break; }
+
default: ASSERT (0);
}
i = LOAD_TUPLE (spec, i, 2);
@@ -7754,6 +8255,19 @@ static void inet_stop(inet_descriptor* desc)
FREE(desc);
}
+static void inet_emergency_close(ErlDrvData data)
+{
+ /* valid for any (UDP, TCP or SCTP) descriptor */
+ tcp_descriptor* tcp_desc = (tcp_descriptor*)data;
+ inet_descriptor* desc = INETP(tcp_desc);
+ DEBUGF(("inet_emergency_close(%ld) {s=%d\r\n",
+ (long)desc->port, desc->s));
+ if (desc->s != INVALID_SOCKET) {
+ sock_close(desc->s);
+ }
+}
+
+
static void set_default_msgq_limits(ErlDrvPort port)
{
ErlDrvSizeT q_high = INET_HIGH_MSGQ_WATERMARK;
@@ -7800,6 +8314,7 @@ static ErlDrvData inet_start(ErlDrvPort port, int size, int protocol)
socket */
desc->deliver = INET_DELIVER_TERM; /* standard term format */
desc->active = INET_PASSIVE; /* start passive */
+ desc->active_count = 0;
desc->oph = NULL;
desc->opt = NULL;
@@ -7833,6 +8348,15 @@ static ErlDrvData inet_start(ErlDrvPort port, int size, int protocol)
#ifdef HAVE_SETNS
desc->netns = NULL;
#endif
+#ifdef __OSE__
+ desc->select_state = 0;
+ desc->events[0] = NULL;
+ desc->events[1] = NULL;
+ desc->events[2] = NULL;
+ desc->events[3] = NULL;
+ desc->events[4] = NULL;
+ desc->events[5] = NULL;
+#endif
return (ErlDrvData)desc;
}
@@ -8208,11 +8732,19 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
if (*buf == 1 && !desc->is_ignored) {
sock_select(desc, (FD_READ|FD_WRITE|FD_CLOSE|ERL_DRV_USE_NO_CALLBACK), 0);
- desc->is_ignored = INET_IGNORE_READ;
+ if (desc->active)
+ desc->is_ignored = INET_IGNORE_READ;
+ else
+ desc->is_ignored = INET_IGNORE_PASSIVE;
} else if (*buf == 0 && desc->is_ignored) {
- int flags = (FD_READ|FD_CLOSE|((desc->is_ignored & INET_IGNORE_WRITE)?FD_WRITE:0));
+ int flags = FD_CLOSE;
+ if (desc->is_ignored & INET_IGNORE_READ)
+ flags |= FD_READ;
+ if (desc->is_ignored & INET_IGNORE_WRITE)
+ flags |= FD_WRITE;
desc->is_ignored = INET_IGNORE_NONE;
- sock_select(desc, flags, 1);
+ if (flags != FD_CLOSE)
+ sock_select(desc, flags, 1);
} else
return ctl_error(EINVAL, rbuf, rsize);
@@ -8545,6 +9077,11 @@ static tcp_descriptor* tcp_inet_copy(tcp_descriptor* desc,SOCKET s,
copy_desc->inet.port = port;
copy_desc->inet.dport = driver_mk_port(port);
+
+#ifdef __OSE__
+ inet_select_init(&copy_desc->inet);
+#endif
+
*err = 0;
return copy_desc;
}
@@ -8606,8 +9143,22 @@ static void tcp_inet_stop(ErlDrvData e)
inet_stop(INETP(desc));
}
+#ifdef __OSE__
-
+static ErlDrvSSizeT tcp_inet_ctl_ose(ErlDrvData e, unsigned int cmd,
+ char* buf, ErlDrvSizeT len,
+ char** rbuf, ErlDrvSizeT rsize) {
+
+ tcp_descriptor* desc = (tcp_descriptor*)e;
+ int prev_select_state = INETP(desc)->select_state;
+
+ ErlDrvSSizeT res = tcp_inet_ctl(e,cmd,buf,len,rbuf,rsize);
+
+ tcp_inet_ose_dispatch_signals((tcp_descriptor*)e,prev_select_state,NULL);
+
+ return res;
+}
+#endif
/* TCP requests from Erlang */
static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
@@ -8642,10 +9193,11 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
break;
}
- case INET_REQ_FDOPEN: { /* pass in an open socket */
+ case INET_REQ_FDOPEN: { /* pass in an open (and optionally bound) socket */
int domain;
+ int bound;
DEBUGF(("tcp_inet_ctl(%ld): FDOPEN\r\n", (long)desc->inet.port));
- if (len != 6) return ctl_error(EINVAL, rbuf, rsize);
+ if (len != 6 && len != 10) return ctl_error(EINVAL, rbuf, rsize);
switch(buf[0]) {
case INET_AF_INET:
domain = AF_INET;
@@ -8663,8 +9215,13 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_error(EINVAL, rbuf, rsize);
}
if (buf[1] != INET_TYPE_STREAM) return ctl_error(EINVAL, rbuf, rsize);
+
+ if (len == 6) bound = 1;
+ else bound = get_int32(buf+2+4);
+
return inet_ctl_fdopen(INETP(desc), domain, SOCK_STREAM,
- (SOCKET) get_int32(buf+2), rbuf, rsize);
+ (SOCKET) get_int32(buf+2),
+ bound, rbuf, rsize);
break;
}
@@ -8823,7 +9380,7 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
ErlDrvTermData caller = driver_caller(desc->inet.port);
tcp_descriptor* accept_desc;
int err;
-
+
if ((accept_desc = tcp_inet_copy(desc,s,caller,&err)) == NULL) {
sock_close(s);
return ctl_error(err, rbuf, rsize);
@@ -8857,7 +9414,8 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
char tbuf[2];
int n;
- DEBUGF(("tcp_inet_ctl(%ld): RECV\r\n", (long)desc->inet.port));
+ DEBUGF(("tcp_inet_ctl(%ld): RECV (s=%d)\r\n",
+ (long)desc->inet.port, desc->inet.s));
/* INPUT: Timeout(4), Length(4) */
if (!IS_CONNECTED(INETP(desc))) {
if (desc->tcp_add_flags & TCP_ADDF_DELAYED_CLOSE_RECV) {
@@ -8889,6 +9447,8 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
driver_set_timer(desc->inet.port, timeout);
if (!INETP(desc)->is_ignored)
sock_select(INETP(desc),(FD_READ|FD_CLOSE),1);
+ else
+ INETP(desc)->is_ignored |= INET_IGNORE_READ;
}
}
return ctl_reply(INET_REP_OK, tbuf, 2, rbuf, rsize);
@@ -9027,6 +9587,16 @@ static void tcp_inet_command(ErlDrvData e, char *buf, ErlDrvSizeT len)
DEBUGF(("tcp_inet_command(%ld) }\r\n", (long)desc->inet.port));
}
+#ifdef __OSE__
+
+static void tcp_inet_commandv_ose(ErlDrvData e, ErlIOVec* ev) {
+ int prev_select_state = INETP((tcp_descriptor*)e)->select_state;
+ tcp_inet_commandv(e, ev);
+ tcp_inet_ose_dispatch_signals((tcp_descriptor*)e,prev_select_state,NULL);
+}
+
+#endif
+
static void tcp_inet_commandv(ErlDrvData e, ErlIOVec* ev)
{
@@ -9090,6 +9660,22 @@ static void inet_stop_select(ErlDrvEvent event, void* _)
{
#ifdef __WIN32__
WSACloseEvent((HANDLE)event);
+#elif defined(__OSE__)
+ ErlDrvOseEventId id;
+ union SIGNAL *sig;
+ erl_drv_ose_event_fetch(event, NULL, &id,NULL);
+ DEBUGF(("inet_stop_select(?#?) {s=%d\n",id));
+ sock_close((int)id);
+ /* On socket close all the signals waiting to be processed as part of the
+ select should be deallocated */
+ while((sig = erl_drv_ose_get_signal(event))) {
+ DEBUGF(("inet_stop_select(?#?): Freeing signal %s\n",
+ signo_to_string(sig->signo)));
+ free_buf(&sig);
+ }
+ erl_drv_ose_event_free(event);
+ DEBUGF(("inet_stop_select(?#?) }\n"));
+
#else
sock_close((SOCKET)(long)event);
#endif
@@ -9209,12 +9795,13 @@ static int tcp_remain(tcp_descriptor* desc, int* len)
int n = desc->i_ptr - ptr; /* number of bytes read */
int tlen;
- DEBUGF(("tcp_remain(%ld): s=%d, n=%d, nfill=%d nsz=%d\r\n",
- (long)desc->inet.port, desc->inet.s, n, nfill, nsz));
-
tlen = packet_get_length(desc->inet.htype, ptr, n,
desc->inet.psize, desc->i_bufsz,
&desc->http_state);
+
+ DEBUGF(("tcp_remain(%ld): s=%d, n=%d, nfill=%d nsz=%d, tlen %d\r\n",
+ (long)desc->inet.port, desc->inet.s, n, nfill, nsz, tlen));
+
if (tlen > 0) {
if (tlen <= n) { /* got a packet */
*len = tlen;
@@ -9622,7 +10209,146 @@ static void tcp_inet_event(ErlDrvData e, ErlDrvEvent event)
return;
}
-#endif /* WIN32 */
+#elif defined(__OSE__) /* !__WIN32__ */
+/* The specific resolve signal function. It will return the socket descriptor
+ for which the select was issued */
+static ErlDrvOseEventId inet_resolve_signal(union SIGNAL *sig) {
+ DEBUGF(("%s(?#?): s=%d got signal %s, status = %d, extra = %d, sender = 0x%x\n",
+ __FUNCTION__,sig->async.fd,signo_to_string(sig->signo),
+ sig->async.event.status,
+ sig->async.event.extra,sender(&sig)));
+ if (sig->signo == SO_EVENT_READ_REPLY ||
+ sig->signo == SO_EVENT_ACCEPT_REPLY ||
+ sig->signo == SO_EVENT_EOF_REPLY ||
+ sig->signo == SO_EVENT_WRITE_REPLY ||
+ sig->signo == SO_EVENT_ERROR_REPLY ||
+ sig->signo == SO_EVENT_CONNECT_REPLY ) {
+ return sig->async.fd;
+ }
+
+ return -1;
+}
+
+static void inet_driver_select(inet_descriptor* desc,
+ int flags, int onoff) {
+ ASSERT(!desc->is_ignored);
+
+ if(onoff) {
+ desc->select_state |= flags;
+ } else {
+ desc->select_state &= ~flags;
+ }
+}
+
+static ssize_t writev_fallback(int fd, const struct iovec *iov, int iovcnt, int max_sz)
+{
+ size_t data_len = 0;
+ size_t sent = 0;
+ ssize_t n;
+ int i;
+
+ for(i = 0; i < iovcnt; i++)
+ {
+ data_len = iov[i].iov_len;
+tryagain:
+ n = sock_send(fd, iov[i].iov_base, data_len, 0);
+ if (IS_SOCKET_ERROR(n)) {
+ /* If buffer length is greater than the amount stack is able to
+ * send out then try to send at least max_sz (this comes with
+ * SO_EVENT_WRITE_REPLY signal*/
+ if ((errno == EMSGSIZE) && (max_sz > 0) && (data_len > max_sz)) {
+ data_len = max_sz;
+ goto tryagain;
+ }
+ break;
+ }
+ sent += n;
+ }
+ return sent;
+}
+
+#define OSE_EVENT_REQ(TCP_DESC,EVENT) do { \
+ union SIGNAL *sig = alloc(sizeof(struct OseAsyncSig), EVENT); \
+ sig->async.fd = INETP(TCP_DESC)->s; \
+ ose_request_event(INETP(TCP_DESC)->s, &sig, 1); \
+ DEBUGF(("%s(%ld): s=%d sent %s\r\n",__FUNCTION__, \
+ INETP(TCP_DESC)->port,INETP(TCP_DESC)->s,signo_to_string(EVENT))); \
+ } while(0)
+
+static void tcp_inet_ose_dispatch_signals(tcp_descriptor *desc,
+ int prev_select_state,
+ union SIGNAL *sig) {
+ if (sig) {
+ DEBUGF(("tcp_inet_ose_dispatch_signals(%ld) {s=%d resend\r\n",
+ (long)INETP(desc)->port,INETP(desc)->s));
+ /* We are reacting to a signal, which means that if
+ the select_state for that signal is still activated
+ we should send a new signal */
+ switch (sig->signo) {
+ case SO_EVENT_READ_REPLY: {
+ if (INETP(desc)->select_state & FD_READ)
+ OSE_EVENT_REQ(desc,SO_EVENT_READ_REQUEST);
+ break;
+ }
+ case SO_EVENT_WRITE_REPLY: {
+ if (INETP(desc)->select_state & FD_WRITE)
+ OSE_EVENT_REQ(desc,SO_EVENT_WRITE_REQUEST);
+ break;
+ }
+ case SO_EVENT_CONNECT_REPLY: {
+ if (INETP(desc)->select_state & FD_CONNECT)
+ OSE_EVENT_REQ(desc,SO_EVENT_CONNECT_REQUEST);
+ break;
+ }
+ case SO_EVENT_ACCEPT_REPLY: {
+ if (INETP(desc)->select_state & FD_ACCEPT)
+ OSE_EVENT_REQ(desc,SO_EVENT_ACCEPT_REQUEST);
+ break;
+ }
+ case SO_EVENT_ERROR_REPLY: {
+ if (INETP(desc)->select_state & SOCK_FD_ERROR)
+ OSE_EVENT_REQ(desc,SO_EVENT_ERROR_REQUEST);
+ break;
+ }
+
+ }
+ DEBUGF(("tcp_inet_ose_dispatch_signals(%ld) }\r\n",
+ (long)INETP(desc)->port));
+ }
+
+ if (INETP(desc)->select_state != prev_select_state) {
+ /* If the select state has changed we have to issue signals for
+ the state parts that have changed. */
+ int xor_select_state = INETP(desc)->select_state ^ prev_select_state;
+ DEBUGF(("tcp_inet_ose_dispatch_signals(%ld) {s=%d select change\r\n",
+ (long)INETP(desc)->port,INETP(desc)->s));
+ if ((xor_select_state & FD_READ) &&
+ (INETP(desc)->select_state & FD_READ)) {
+ OSE_EVENT_REQ(desc,SO_EVENT_READ_REQUEST);
+ }
+ if ((xor_select_state & FD_WRITE) &&
+ (INETP(desc)->select_state & FD_WRITE)) {
+ OSE_EVENT_REQ(desc,SO_EVENT_WRITE_REQUEST);
+ }
+ if ((xor_select_state & FD_CONNECT) &&
+ (INETP(desc)->select_state & FD_CONNECT)) {
+ OSE_EVENT_REQ(desc,SO_EVENT_CONNECT_REQUEST);
+ }
+ if ((xor_select_state & FD_ACCEPT) &&
+ (INETP(desc)->select_state & FD_ACCEPT)) {
+ OSE_EVENT_REQ(desc,SO_EVENT_ACCEPT_REQUEST);
+ }
+ if ((xor_select_state & SOCK_FD_ERROR) &&
+ (INETP(desc)->select_state & SOCK_FD_ERROR)) {
+ OSE_EVENT_REQ(desc,SO_EVENT_ERROR_REQUEST);
+ }
+
+ DEBUGF(("tcp_inet_ose_dispatch_signals(%ld) }\r\n",
+ (long)INETP(desc)->port));
+ }
+}
+
+#endif /* __OSE__ */
/* socket has input:
@@ -9643,7 +10369,7 @@ static int tcp_inet_input(tcp_descriptor* desc, HANDLE event)
unsigned int len;
inet_address remote;
inet_async_op *this_op = desc->inet.opt;
-
+
len = sizeof(desc->inet.remote);
s = sock_accept(desc->inet.s, (struct sockaddr*) &remote, &len);
if (s == INVALID_SOCKET && sock_errno() == ERRNO_BLOCK) {
@@ -9712,7 +10438,6 @@ static int tcp_inet_input(tcp_descriptor* desc, HANDLE event)
while (desc->inet.state == INET_STATE_MULTI_ACCEPTING) {
len = sizeof(desc->inet.remote);
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 */
goto done;
@@ -10038,6 +10763,49 @@ static int tcp_send(tcp_descriptor* desc, char* ptr, ErlDrvSizeT len)
return 0;
}
+#ifdef __OSE__
+
+static void tcp_inet_drv_output_ose(ErlDrvData data, ErlDrvEvent event)
+{
+ union SIGNAL *event_sig = erl_drv_ose_get_signal(event);
+
+ while (event_sig) {
+ int prev_select_state = INETP((tcp_descriptor*)data)->select_state;
+ int res = tcp_inet_output((tcp_descriptor*)data, (HANDLE)event_sig);
+ if (res != -1) {
+ tcp_inet_ose_dispatch_signals((tcp_descriptor*)data,
+ prev_select_state,event_sig);
+ free_buf(&event_sig);
+ event_sig = erl_drv_ose_get_signal(event);
+ } else {
+ /* NOTE: here the event object could have been deallocated!!!!
+ inet_stop_select is called when doing driver_select(ERL_DRV_USE,0)
+ */
+ free_buf(&event_sig);
+ return;
+ }
+ }
+}
+
+static void tcp_inet_drv_input_ose(ErlDrvData data, ErlDrvEvent event)
+{
+ union SIGNAL *event_sig = erl_drv_ose_get_signal(event);
+
+ while (event_sig) {
+ int prev_select_state = INETP((tcp_descriptor*)data)->select_state;
+ int res = tcp_inet_input((tcp_descriptor*)data, (HANDLE)event);
+ if (res != -1) {
+ tcp_inet_ose_dispatch_signals((tcp_descriptor*)data, prev_select_state,
+ event_sig);
+ free_buf(&event_sig);
+ event_sig = erl_drv_ose_get_signal(event);
+ } else {
+ free_buf(&event_sig);
+ return;
+ }
+ }
+}
+#else
static void tcp_inet_drv_output(ErlDrvData data, ErlDrvEvent event)
{
(void)tcp_inet_output((tcp_descriptor*)data, (HANDLE)event);
@@ -10047,6 +10815,7 @@ static void tcp_inet_drv_input(ErlDrvData data, ErlDrvEvent event)
{
(void)tcp_inet_input((tcp_descriptor*)data, (HANDLE)event);
}
+#endif
/* socket ready for ouput:
** 1. INET_STATE_CONNECTING => non block connect ?
@@ -10112,6 +10881,13 @@ static int tcp_inet_output(tcp_descriptor* desc, HANDLE event)
ssize_t n;
SysIOVec* iov;
+#ifdef __OSE__
+ /* For large size buffers case the amount of data that the stack is
+ able to send out (received in the .extra field) should be passed
+ down to writev_fallback */
+ n = event ? ((union SIGNAL*)event)->async.event.extra : 0;
+#endif
+
if ((iov = driver_peekq(ix, &vsize)) == NULL) {
sock_select(INETP(desc), FD_WRITE, 0);
send_empty_out_q_msgs(INETP(desc));
@@ -10123,8 +10899,8 @@ static int tcp_inet_output(tcp_descriptor* desc, HANDLE event)
if (IS_SOCKET_ERROR(sock_sendv(desc->inet.s, iov, vsize, &n, 0))) {
write_error:
if ((sock_errno() != ERRNO_BLOCK) && (sock_errno() != EINTR)) {
- DEBUGF(("tcp_inet_output(%ld): sock_sendv(%d) errno = %d\r\n",
- (long)desc->inet.port, vsize, sock_errno()));
+ DEBUGF(("tcp_inet_output(%ld): sock_sendv(%d) errno = %d (errno %d)\r\n",
+ (long)desc->inet.port, vsize, sock_errno(), errno));
ret = tcp_send_error(desc, sock_errno());
goto done;
}
@@ -10137,6 +10913,12 @@ static int tcp_inet_output(tcp_descriptor* desc, HANDLE event)
sizes > (max 32 bit signed int) */
size_t howmuch = 0x7FFFFFFF; /* max signed 32 bit */
int x;
+#ifdef __OSE__
+ /* For EWOULDBLOCK sock_sendv returns 0 so we have to be sure it
+ wasn't the case */
+ if(sock_errno() == ERRNO_BLOCK)
+ goto done;
+#endif
for(x = 0; x < vsize && iov[x].iov_len == 0; ++x)
;
if (x < vsize) {
@@ -10281,6 +11063,7 @@ static udp_descriptor* sctp_inet_copy(udp_descriptor* desc, SOCKET s, int* err)
+#ifdef HAVE_UDP
static int packet_inet_init()
{
return 0;
@@ -10311,6 +11094,7 @@ static ErlDrvData udp_inet_start(ErlDrvPort port, char *args)
set_default_msgq_limits(port);
return data;
}
+#endif
#ifdef HAVE_SCTP
static ErlDrvData sctp_inet_start(ErlDrvPort port, char *args)
@@ -10321,6 +11105,7 @@ static ErlDrvData sctp_inet_start(ErlDrvPort port, char *args)
}
#endif
+#ifdef HAVE_UDP
static void packet_inet_stop(ErlDrvData e)
{
/* There should *never* be any "empty out q" subscribers on
@@ -10409,10 +11194,11 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return replen;
- case INET_REQ_FDOPEN: { /* pass in an open (and bound) socket */
+ case INET_REQ_FDOPEN: { /* pass in an open (and optionally bound) socket */
SOCKET s;
+ int bound;
DEBUGF(("packet inet_ctl(%ld): FDOPEN\r\n", (long)desc->port));
- if (len != 6) {
+ if (len != 6 && len != 10) {
return ctl_error(EINVAL, rbuf, rsize);
}
switch (buf[0]) {
@@ -10437,7 +11223,11 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_error(EINVAL, rbuf, rsize);
}
s = (SOCKET)get_int32(buf+2);
- replen = inet_ctl_fdopen(desc, af, type, s, rbuf, rsize);
+
+ if (len == 6) bound = 1;
+ else bound = get_int32(buf+2+4);
+
+ replen = inet_ctl_fdopen(desc, af, type, s, bound, rbuf, rsize);
if ((*rbuf)[0] != INET_REP_ERROR) {
if (desc->active)
@@ -10831,7 +11621,7 @@ static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
else
inet_reply_ok(desc);
}
-
+#endif
#ifdef __WIN32__
static void packet_inet_event(ErlDrvData e, ErlDrvEvent event)
@@ -10853,6 +11643,7 @@ static void packet_inet_event(ErlDrvData e, ErlDrvEvent event)
#endif
+#ifdef HAVE_UDP
static void packet_inet_drv_input(ErlDrvData e, ErlDrvEvent event)
{
(void) packet_inet_input((udp_descriptor*)e, (HANDLE)event);
@@ -11109,6 +11900,7 @@ static int packet_inet_output(udp_descriptor* udesc, HANDLE event)
DEBUGF(("packet_inet_output(%ld) }\r\n", (long)desc->port));
return ret;
}
+#endif
/*---------------------------------------------------------------------------*/
diff --git a/erts/emulator/drivers/common/zlib_drv.c b/erts/emulator/drivers/common/zlib_drv.c
index 3fe5d282dc..3143e4511d 100644
--- a/erts/emulator/drivers/common/zlib_drv.c
+++ b/erts/emulator/drivers/common/zlib_drv.c
@@ -21,6 +21,9 @@
* ZLib interface for erlang
*
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <stdio.h>
#include <zlib.h>
#include <errno.h>
diff --git a/erts/emulator/drivers/ose/ose_efile.c b/erts/emulator/drivers/ose/ose_efile.c
new file mode 100644
index 0000000000..035ff81a9b
--- /dev/null
+++ b/erts/emulator/drivers/ose/ose_efile.c
@@ -0,0 +1,1124 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1997-2012. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Purpose: Provides file and directory operations for OSE.
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#if defined(HAVE_POSIX_FALLOCATE) && !defined(__sun) && !defined(__sun__)
+#define _XOPEN_SOURCE 600
+#endif
+#if !defined(_GNU_SOURCE) && defined(HAVE_LINUX_FALLOC_H)
+#define _GNU_SOURCE
+#endif
+#include "sys.h"
+#include "erl_driver.h"
+#include "erl_efile.h"
+#if defined(DARWIN) || defined(HAVE_LINUX_FALLOC_H) || defined(HAVE_POSIX_FALLOCATE)
+#include "fcntl.h"
+#endif
+#include "ose.h"
+#include "unistd.h"
+#include "sys/stat.h"
+#include "dirent.h"
+#include "sys/time.h"
+#include "time.h"
+#include "assert.h"
+
+/* Find a definition of MAXIOV, that is used in the code later. */
+#if defined IOV_MAX
+#define MAXIOV IOV_MAX
+#elif defined UIO_MAXIOV
+#define MAXIOV UIO_MAXIOV
+#else
+#define MAXIOV 16
+#endif
+
+/*
+ * Macros for testing file types.
+ */
+
+#define ISDIR(st) (((st).st_mode & S_IFMT) == S_IFDIR)
+#define ISREG(st) (((st).st_mode & S_IFMT) == S_IFREG)
+#define ISDEV(st) \
+ (((st).st_mode&S_IFMT) == S_IFCHR || ((st).st_mode&S_IFMT) == S_IFBLK)
+#define ISLNK(st) (((st).st_mode & S_IFLNK) == S_IFLNK)
+#ifdef NO_UMASK
+#define FILE_MODE 0644
+#define DIR_MODE 0755
+#else
+#define FILE_MODE 0666
+#define DIR_MODE 0777
+#endif
+
+#define IS_DOT_OR_DOTDOT(s) \
+ (s[0] == '.' && (s[1] == '\0' || (s[1] == '.' && s[2] == '\0')))
+
+/*
+ * Macros for handling local file descriptors
+ * and mutexes.
+ *
+ * Handling of files like this is necessary because OSE
+ * does not allow seeking after the end of a file. So
+ * what we do it emulate this by keeping track of the size
+ * of the file and where the file's positions is. If a
+ * write happens after eof then we pad it.
+ *
+ * Given time this should be rewritten to get rid of the
+ * mutex and use the port lock to protect the data. This
+ * could be done be done by adapting the efile api for some
+ * calls to allow some meta-data to be associated with the
+ * open file.
+ */
+
+#define L_FD_IS_VALID(fd_data) ((fd_data)->beyond_eof > 0)
+#define L_FD_INVALIDATE(fd_data) (fd_data)->beyond_eof = 0
+#define L_FD_CUR(fd_data) (fd_data)->pos
+#define L_FD_OFFS_BEYOND_EOF(fd_data, offs) \
+ (((fd_data)->size > offs) ? 0 : 1)
+
+#define L_FD_FAIL -1
+#define L_FD_SUCCESS 1
+#define L_FD_PAD_SIZE 255
+
+struct fd_meta {
+ ErlDrvMutex *meta_mtx;
+ struct fd_data *fd_data_list;
+};
+
+struct fd_data {
+ int fd;
+ struct fd_data *next;
+ struct fd_data *prev;
+ int pos;
+ int beyond_eof;
+ size_t size;
+#ifdef DEBUG
+ PROCESS owner;
+#endif
+};
+
+static int l_invalidate_local_fd(int fd);
+static int l_pad_file(struct fd_data *fd_data, off_t offset);
+static int check_error(int result, Efile_error* errInfo);
+static struct fd_data* l_new_fd(void);
+static int l_remove_local_fd(int fd);
+static struct fd_data* l_find_local_fd(int fd);
+static int l_update_local_fd(int fd, int pos, int size);
+
+static struct fd_meta* fdm = NULL;
+
+
+/***************************************************************************/
+
+static int
+l_remove_local_fd(int fd)
+{
+ struct fd_data *fd_data;
+ fd_data = l_find_local_fd(fd);
+
+ if (fd_data == NULL) {
+ return L_FD_FAIL;
+ }
+#ifdef DEBUG
+ assert(fd_data->owner == current_process());
+#endif
+ erl_drv_mutex_lock(fdm->meta_mtx);
+ /* head ? */
+ if (fd_data == fdm->fd_data_list) {
+ if (fd_data->next != NULL) {
+ /* remove link to head */
+ fd_data->next->prev = NULL;
+ /* set new head */
+ fdm->fd_data_list = fd_data->next;
+ }
+ else {
+ /* head is lonely */
+ fdm->fd_data_list = NULL;
+ }
+ }
+ else { /* not head */
+ if (fd_data->prev == NULL) {
+ erl_drv_mutex_unlock(fdm->meta_mtx);
+ return L_FD_FAIL;
+ }
+ else {
+ if (fd_data->next != NULL) {
+ fd_data->next->prev = fd_data->prev;
+ fd_data->prev->next = fd_data->next;
+ }
+ else {
+ fd_data->prev->next = NULL;
+ }
+ }
+ }
+
+ /* scramble values */
+ fd_data->beyond_eof = -1;
+ fd_data->next = NULL;
+ fd_data->prev = NULL;
+ fd_data->fd = -1;
+
+ /* unlock and clean */
+ driver_free(fd_data);
+ erl_drv_mutex_unlock(fdm->meta_mtx);
+
+ return L_FD_SUCCESS;
+}
+
+/***************************************************************************/
+
+static int
+l_invalidate_local_fd(int fd) {
+ struct fd_data *fd_data;
+
+ if ((fd_data = l_find_local_fd(fd)) == NULL) {
+ return L_FD_FAIL;
+ }
+
+ fd_data->beyond_eof = 0;
+ return L_FD_SUCCESS;
+}
+
+/****************************************************************************/
+
+static struct fd_data*
+l_find_local_fd(int fd) {
+ struct fd_data *fd_data;
+
+ fd_data = NULL;
+ erl_drv_mutex_lock(fdm->meta_mtx);
+ for (fd_data = fdm->fd_data_list; fd_data != NULL; ) {
+ if (fd_data->fd == fd) {
+#ifdef DEBUG
+ assert(fd_data->owner == current_process());
+#endif
+ break;
+ }
+ fd_data = fd_data->next;
+ }
+ erl_drv_mutex_unlock(fdm->meta_mtx);
+ return fd_data;
+}
+
+/***************************************************************************/
+
+static struct fd_data*
+l_new_fd(void) {
+ struct fd_data *fd_data;
+
+ fd_data = driver_alloc(sizeof(struct fd_data));
+ if (fd_data == NULL) {
+ return NULL;
+ }
+ erl_drv_mutex_lock(fdm->meta_mtx);
+ if (fdm->fd_data_list == NULL) {
+ fdm->fd_data_list = fd_data;
+ fdm->fd_data_list->prev = NULL;
+ fdm->fd_data_list->next = NULL;
+ }
+ else {
+ fd_data->next = fdm->fd_data_list;
+ fdm->fd_data_list = fd_data;
+ fdm->fd_data_list->prev = NULL;
+ }
+#ifdef DEBUG
+ fd_data->owner = current_process();
+#endif
+ erl_drv_mutex_unlock(fdm->meta_mtx);
+ return fd_data;
+}
+
+/***************************************************************************/
+
+static int
+l_update_local_fd(int fd, int pos, int size) {
+ struct fd_data *fd_data = NULL;
+
+ fd_data = l_find_local_fd(fd);
+ /* new fd to handle? */
+ if (fd_data == NULL) {
+ fd_data = l_new_fd();
+ if (fd_data == NULL) {
+ /* out of memory */
+ return L_FD_FAIL;
+ }
+ }
+ fd_data->size = size;
+ fd_data->pos = pos;
+ fd_data->fd = fd;
+ fd_data->beyond_eof = 1;
+
+ return L_FD_SUCCESS;
+}
+
+/***************************************************************************/
+
+static int
+l_pad_file(struct fd_data *fd_data, off_t offset) {
+ int size_dif;
+ int written = 0;
+ int ret_val = L_FD_SUCCESS;
+ char padding[L_FD_PAD_SIZE];
+
+ size_dif = (offset - fd_data->size);
+ memset(&padding, '\0', L_FD_PAD_SIZE);
+
+ while (size_dif > 0) {
+ written = write(fd_data->fd, padding,
+ (size_dif < L_FD_PAD_SIZE) ?
+ size_dif : L_FD_PAD_SIZE);
+ if (written < 0 && errno != EINTR && errno != EAGAIN) {
+ ret_val = -1;
+ break;
+ }
+ size_dif -= written;
+ }
+ L_FD_INVALIDATE(fd_data);
+ return ret_val;
+}
+
+/***************************************************************************/
+
+static int
+check_error(int result, Efile_error *errInfo) {
+ if (result < 0) {
+ errInfo->posix_errno = errInfo->os_errno = errno;
+ return 0;
+ }
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_init() {
+ fdm = driver_alloc(sizeof(struct fd_meta));
+ if (fdm == NULL) {
+ return L_FD_FAIL;
+ }
+ fdm->meta_mtx = erl_drv_mutex_create("ose_efile local fd mutex\n");
+ erl_drv_mutex_lock(fdm->meta_mtx);
+ fdm->fd_data_list = NULL;
+ erl_drv_mutex_unlock(fdm->meta_mtx);
+ return L_FD_SUCCESS;
+}
+
+/***************************************************************************/
+
+int
+efile_mkdir(Efile_error* errInfo, /* Where to return error codes. */
+ char* name) /* Name of directory to create. */
+{
+#ifdef NO_MKDIR_MODE
+ return check_error(mkdir(name), errInfo);
+#else
+ int res = mkdir(name, DIR_MODE);
+ if (res < 0 && errno == EINVAL) {
+ errno = ENOENT;
+ }
+ return check_error(res, errInfo);
+#endif
+}
+
+/***************************************************************************/
+
+int
+efile_rmdir(Efile_error* errInfo, /* Where to return error codes. */
+ char* name) /* Name of directory to delete. */
+{
+ if (rmdir(name) == 0) {
+ return 1;
+ }
+ if (errno == ENOTEMPTY) {
+ errno = EEXIST;
+ }
+ if (errno == EEXIST || errno == EINVAL) {
+ int saved_errno = errno;
+ struct stat file_stat;
+ struct stat cwd_stat;
+
+ if(stat(name, &file_stat) != 0) {
+ errno = ENOENT;
+ return check_error(-1, errInfo);
+ }
+ /*
+ * The error code might be wrong if this is the current directory.
+ */
+ if (stat(name, &file_stat) == 0 && stat(".", &cwd_stat) == 0 &&
+ file_stat.st_ino == cwd_stat.st_ino &&
+ file_stat.st_dev == cwd_stat.st_dev) {
+ saved_errno = EACCES;
+ }
+ errno = saved_errno;
+ }
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_delete_file(Efile_error* errInfo, /* Where to return error codes. */
+ char* name) /* Name of file to delete. */
+{
+ struct stat statbuf;
+
+ if (stat(name, &statbuf) >= 0) {
+ /* Do not let unlink() remove directories */
+ if (ISDIR(statbuf)) {
+ errno = EPERM;
+ return check_error(-1, errInfo);
+ }
+
+ if (unlink(name) == 0) {
+ return 1;
+ }
+
+ if (errno == EISDIR) {
+ errno = EPERM;
+ return check_error(-1, errInfo);
+ }
+ }
+ else {
+ if (errno == EINVAL) {
+ errno = ENOENT;
+ return check_error(-1, errInfo);
+ }
+ }
+ return check_error(-1, errInfo);
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * Changes the name of an existing file or directory, from src to dst.
+ * If src and dst refer to the same file or directory, does nothing
+ * and returns success. Otherwise if dst already exists, it will be
+ * deleted and replaced by src subject to the following conditions:
+ * If src is a directory, dst may be an empty directory.
+ * If src is a file, dst may be a file.
+ * In any other situation where dst already exists, the rename will
+ * fail.
+ *
+ * Results:
+ * If the directory was successfully created, returns 1.
+ * Otherwise the return value is 0 and errno is set to
+ * indicate the error. Some possible values for errno are:
+ *
+ * EACCES: src or dst parent directory can't be read and/or written.
+ * EEXIST: dst is a non-empty directory.
+ * EINVAL: src is a root directory or dst is a subdirectory of src.
+ * EISDIR: dst is a directory, but src is not.
+ * ENOENT: src doesn't exist, or src or dst is "".
+ * ENOTDIR: src is a directory, but dst is not.
+ * EXDEV: src and dst are on different filesystems.
+ *
+ * Side effects:
+ * The implementation of rename may allow cross-filesystem renames,
+ * but the caller should be prepared to emulate it with copy and
+ * delete if errno is EXDEV.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+efile_rename(Efile_error* errInfo, /* Where to return error codes. */
+ char* src, /* Original name. */
+ char* dst) /* New name. */
+{
+
+ /* temporary fix AFM does not recognize ./<file name>
+ * in destination remove pending on adaption of AFM fix
+ */
+
+ char *dot_str;
+ if (dst != NULL) {
+ dot_str = strchr(dst, '.');
+ if (dot_str && dot_str == dst && dot_str[1] == '/') {
+ dst = dst+2;
+ }
+ }
+
+ if (rename(src, dst) == 0) {
+ return 1;
+ }
+ if (errno == ENOTEMPTY) {
+ errno = EEXIST;
+ }
+ if (errno == EINVAL) {
+ struct stat file_stat;
+
+ if (stat(dst, &file_stat)== 0) {
+ if (ISDIR(file_stat)) {
+ errno = EISDIR;
+ }
+ else if (ISREG(file_stat)) {
+ errno = ENOTDIR;
+ }
+ else {
+ errno = EINVAL;
+ }
+ }
+ else {
+ errno = EINVAL;
+ }
+ }
+
+ if (strcmp(src, "/") == 0) {
+ errno = EINVAL;
+ }
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_chdir(Efile_error* errInfo, /* Where to return error codes. */
+ char* name) /* Name of directory to make current. */
+{
+ return check_error(chdir(name), errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_getdcwd(Efile_error* errInfo, /* Where to return error codes. */
+ int drive, /* 0 - current, 1 - A, 2 - B etc. */
+ char* buffer, /* Where to return the current
+ directory. */
+ size_t size) /* Size of buffer. */
+{
+ if (drive == 0) {
+ if (getcwd(buffer, size) == NULL)
+ return check_error(-1, errInfo);
+
+ return 1;
+ }
+
+ /*
+ * Drives other than 0 is not supported on Unix.
+ */
+
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
+ char* name, /* Name of directory to open. */
+ EFILE_DIR_HANDLE* p_dir_handle, /* Pointer to directory
+ handle of
+ open directory.*/
+ char* buffer, /* Pointer to buffer for
+ one filename. */
+ size_t *size) /* in-out Size of buffer, length
+ of name. */
+{
+ DIR *dp; /* Pointer to directory structure. */
+ struct dirent* dirp; /* Pointer to directory entry. */
+
+ /*
+ * If this is the first call, we must open the directory.
+ */
+
+ if (*p_dir_handle == NULL) {
+ dp = opendir(name);
+ if (dp == NULL)
+ return check_error(-1, errInfo);
+ *p_dir_handle = (EFILE_DIR_HANDLE) dp;
+ }
+
+ /*
+ * Retrieve the name of the next file using the directory handle.
+ */
+
+ dp = *((DIR **)((void *)p_dir_handle));
+ for (;;) {
+ dirp = readdir(dp);
+ if (dirp == NULL) {
+ closedir(dp);
+ return 0;
+ }
+ if (IS_DOT_OR_DOTDOT(dirp->d_name))
+ continue;
+ buffer[0] = '\0';
+ strncat(buffer, dirp->d_name, (*size)-1);
+ *size = strlen(dirp->d_name);
+ return 1;
+ }
+}
+
+/***************************************************************************/
+
+int
+efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
+ char* name, /* Name of directory to open. */
+ int flags, /* Flags to user for opening. */
+ int* pfd, /* Where to store the file
+ descriptor. */
+ Sint64 *pSize) /* Where to store the size of the
+ file. */
+{
+ struct stat statbuf;
+ int fd;
+ int mode; /* Open mode. */
+
+ if (stat(name, &statbuf) >= 0 && !ISREG(statbuf)) {
+ errno = EISDIR;
+ return check_error(-1, errInfo);
+ }
+
+ switch (flags & (EFILE_MODE_READ|EFILE_MODE_WRITE)) {
+ case EFILE_MODE_READ:
+ mode = O_RDONLY;
+ break;
+ case EFILE_MODE_WRITE:
+ if (flags & EFILE_NO_TRUNCATE)
+ mode = O_WRONLY | O_CREAT;
+ else
+ mode = O_WRONLY | O_CREAT | O_TRUNC;
+ break;
+ case EFILE_MODE_READ_WRITE:
+ mode = O_RDWR | O_CREAT;
+ break;
+ default:
+ errno = EINVAL;
+ return check_error(-1, errInfo);
+ }
+
+
+ if (flags & EFILE_MODE_APPEND) {
+ mode &= ~O_TRUNC;
+ mode |= O_APPEND;
+ }
+
+ if (flags & EFILE_MODE_EXCL) {
+ mode |= O_EXCL;
+ }
+
+ fd = open(name, mode, FILE_MODE);
+
+ if (!check_error(fd, errInfo))
+ return 0;
+
+ *pfd = fd;
+ if (pSize) {
+ *pSize = statbuf.st_size;
+ }
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_may_openfile(Efile_error* errInfo, char *name) {
+ struct stat statbuf; /* Information about the file */
+ int result;
+
+ result = stat(name, &statbuf);
+ if (!check_error(result, errInfo))
+ return 0;
+ if (!ISREG(statbuf)) {
+ errno = EISDIR;
+ return check_error(-1, errInfo);
+ }
+ return 1;
+}
+
+/***************************************************************************/
+
+void
+efile_closefile(int fd)
+{
+ if (l_find_local_fd(fd) != NULL) {
+ l_remove_local_fd(fd);
+ }
+ close(fd);
+}
+
+/***************************************************************************/
+
+int
+efile_fdatasync(Efile_error *errInfo, /* Where to return error codes. */
+ int fd) /* File descriptor for file to sync data. */
+{
+ return efile_fsync(errInfo, fd);
+}
+
+/***************************************************************************/
+
+int
+efile_fsync(Efile_error *errInfo, /* Where to return error codes. */
+ int fd) /* File descriptor for file to sync. */
+{
+ return check_error(fsync(fd), errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
+ char* name, int info_for_link)
+{
+ struct stat statbuf; /* Information about the file */
+ int result;
+
+ result = stat(name, &statbuf);
+ if (!check_error(result, errInfo)) {
+ return 0;
+ }
+
+#if SIZEOF_OFF_T == 4
+ pInfo->size_high = 0;
+#else
+ pInfo->size_high = (Uint32)(statbuf.st_size >> 32);
+#endif
+ pInfo->size_low = (Uint32)statbuf.st_size;
+
+#ifdef NO_ACCESS
+ /* Just look at read/write access for owner. */
+
+ pInfo->access = ((statbuf.st_mode >> 6) & 07) >> 1;
+
+#else
+ pInfo->access = FA_NONE;
+ if (access(name, R_OK) == 0)
+ pInfo->access |= FA_READ;
+ if (access(name, W_OK) == 0)
+ pInfo->access |= FA_WRITE;
+
+#endif
+
+ if (ISDEV(statbuf))
+ pInfo->type = FT_DEVICE;
+ else if (ISDIR(statbuf))
+ pInfo->type = FT_DIRECTORY;
+ else if (ISREG(statbuf))
+ pInfo->type = FT_REGULAR;
+ else if (ISLNK(statbuf))
+ pInfo->type = FT_SYMLINK;
+ else
+ pInfo->type = FT_OTHER;
+
+ pInfo->accessTime = statbuf.st_atime;
+ pInfo->modifyTime = statbuf.st_mtime;
+ pInfo->cTime = statbuf.st_ctime;
+
+ pInfo->mode = statbuf.st_mode;
+ pInfo->links = statbuf.st_nlink;
+ pInfo->major_device = statbuf.st_dev;
+ pInfo->inode = statbuf.st_ino;
+ pInfo->uid = statbuf.st_uid;
+ pInfo->gid = statbuf.st_gid;
+
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_write_info(Efile_error *errInfo, Efile_info *pInfo, char *name)
+{
+ /*
+ * On some systems chown will always fail for a non-root user unless
+ * POSIX_CHOWN_RESTRICTED is not set. Others will succeed as long as
+ * you don't try to chown a file to someone besides youself.
+ */
+ if (pInfo->mode != -1) {
+ mode_t newMode = pInfo->mode & (S_ISUID | S_ISGID |
+ S_IRWXU | S_IRWXG | S_IRWXO);
+ if (chmod(name, newMode)) {
+ newMode &= ~(S_ISUID | S_ISGID);
+ if (chmod(name, newMode)) {
+ return check_error(-1, errInfo);
+ }
+ }
+ }
+
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_write(Efile_error* errInfo, /* Where to return error codes. */
+ int flags, /* Flags given when file was
+ opened. */
+ int fd, /* File descriptor to write to. */
+ char* buf, /* Buffer to write. */
+ size_t count) /* Number of bytes to write. */
+{
+ ssize_t written; /* Bytes written in last operation. */
+ struct fd_data *fd_data;
+
+ if ((fd_data = l_find_local_fd(fd)) != NULL) {
+ if (L_FD_IS_VALID(fd_data)) {
+ /* we are beyond eof and need to pad*/
+ if (l_pad_file(fd_data, L_FD_CUR(fd_data)) < 0) {
+ return check_error(-1, errInfo);
+ }
+ }
+ }
+
+ while (count > 0) {
+ if ((written = write(fd, buf, count)) < 0) {
+ if (errno != EINTR) {
+ return check_error(-1, errInfo);
+ }
+ else {
+ written = 0;
+ }
+ }
+ ASSERT(written <= count);
+ buf += written;
+ count -= written;
+ }
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_writev(Efile_error* errInfo, /* Where to return error codes */
+ int flags, /* Flags given when file was
+ * opened */
+ int fd, /* File descriptor to write to */
+ SysIOVec* iov, /* Vector of buffer structs.
+ * The structs may be changed i.e.
+ * due to incomplete writes */
+ int iovcnt) /* Number of structs in vector */
+{
+ struct fd_data *fd_data;
+ int cnt = 0; /* Buffers so far written */
+
+ ASSERT(iovcnt >= 0);
+ if ((fd_data = l_find_local_fd(fd)) != NULL) {
+ if (L_FD_IS_VALID(fd_data)) {
+ /* we are beyond eof and need to pad*/
+ if (l_pad_file(fd_data, L_FD_CUR(fd_data)) < 0) {
+ return check_error(-1, errInfo);
+ }
+ }
+ }
+ while (cnt < iovcnt) {
+ if ((! iov[cnt].iov_base) || (iov[cnt].iov_len <= 0)) {
+ /* Empty buffer - skip */
+ cnt++;
+ }
+ else { /* Non-empty buffer */
+ ssize_t w; /* Bytes written in this call */
+ do {
+ w = write(fd, iov[cnt].iov_base, iov[cnt].iov_len);
+ } while (w < 0 && errno == EINTR);
+
+ ASSERT(w <= iov[cnt].iov_len || w == -1);
+
+ if (w < 0) {
+ return check_error(-1, errInfo);
+ }
+ /* Move forward to next buffer to write */
+ for (; cnt < iovcnt && w > 0; cnt++) {
+ if (iov[cnt].iov_base && iov[cnt].iov_len > 0) {
+ if (w < iov[cnt].iov_len) {
+ /* Adjust the buffer for next write */
+ iov[cnt].iov_len -= w;
+ iov[cnt].iov_base += w;
+ w = 0;
+ break;
+ }
+ else {
+ w -= iov[cnt].iov_len;
+ }
+ }
+ }
+ ASSERT(w == 0);
+ } /* else Non-empty buffer */
+ } /* while (cnt< iovcnt) */
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_read(Efile_error* errInfo, /* Where to return error codes. */
+ int flags, /* Flags given when file was opened. */
+ int fd, /* File descriptor to read from. */
+ char* buf, /* Buffer to read into. */
+ size_t count, /* Number of bytes to read. */
+ size_t *pBytesRead) /* Where to return number of
+ bytes read. */
+{
+ ssize_t n;
+ struct fd_data *fd_data;
+
+ if ((fd_data = l_find_local_fd(fd)) != NULL) {
+ if (L_FD_IS_VALID(fd_data)) {
+ *pBytesRead = 0;
+ return 1;
+ }
+ }
+ for (;;) {
+ if ((n = read(fd, buf, count)) >= 0) {
+ break;
+ }
+ else if (errno != EINTR) {
+ return check_error(-1, errInfo);
+ }
+ }
+ if (fd_data != NULL && L_FD_IS_VALID(fd_data)) {
+ L_FD_INVALIDATE(fd_data);
+ }
+ *pBytesRead = (size_t) n;
+ return 1;
+}
+
+/* pread() and pwrite() */
+/* Some unix systems, notably Solaris has these syscalls */
+/* It is especially nice for i.e. the dets module to have support */
+/* for this, even if the underlying OS dosn't support it, it is */
+/* reasonably easy to work around by first calling seek, and then */
+/* calling read(). */
+/* This later strategy however changes the file pointer, which pread() */
+/* does not do. We choose to ignore this and say that the location */
+/* of the file pointer is undefined after a call to any of the p functions*/
+
+
+int
+efile_pread(Efile_error* errInfo, /* Where to return error codes. */
+ int fd, /* File descriptor to read from. */
+ Sint64 offset, /* Offset in bytes from BOF. */
+ char* buf, /* Buffer to read into. */
+ size_t count, /* Number of bytes to read. */
+ size_t *pBytesRead) /* Where to return
+ number of bytes read. */
+{
+ int res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
+ if (res) {
+ return efile_read(errInfo, 0, fd, buf, count, pBytesRead);
+ } else {
+ return res;
+ }
+}
+
+
+/***************************************************************************/
+
+int
+efile_pwrite(Efile_error* errInfo, /* Where to return error codes. */
+ int fd, /* File descriptor to write to. */
+ char* buf, /* Buffer to write. */
+ size_t count, /* Number of bytes to write. */
+ Sint64 offset) /* where to write it */
+{
+ int res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
+
+ if (res) {
+ return efile_write(errInfo, 0, fd, buf, count);
+ } else {
+ return res;
+ }
+}
+
+/***************************************************************************/
+
+int
+efile_seek(Efile_error* errInfo, /* Where to return error codes. */
+ int fd, /* File descriptor to do the seek on. */
+ Sint64 offset, /* Offset in bytes from the given
+ origin. */
+ int origin, /* Origin of seek (SEEK_SET, SEEK_CUR,
+ SEEK_END). */
+ Sint64 *new_location) /* Resulting new location in file. */
+{
+ off_t off, result;
+ off = (off_t) offset;
+
+ switch (origin) {
+ case EFILE_SEEK_SET:
+ origin = SEEK_SET;
+ break;
+ case EFILE_SEEK_CUR:
+ origin = SEEK_CUR;
+ break;
+ case EFILE_SEEK_END:
+ origin = SEEK_END;
+ break;
+ default:
+ errno = EINVAL;
+ return check_error(-1, errInfo);
+ }
+
+ if (off != offset) {
+ errno = EINVAL;
+ return check_error(-1, errInfo);
+ }
+
+ errno = 0;
+ result = lseek(fd, off, origin);
+
+ if (result >= 0) {
+ l_invalidate_local_fd(fd);
+ }
+
+ if (result < 0)
+ {
+ if (errno == ENOSYS) {
+ int size, cur_pos;
+
+ if (off < 0) {
+ errno = EINVAL;
+ return check_error(-1, errInfo);
+ }
+
+ cur_pos = lseek(fd, 0, SEEK_CUR);
+ size = lseek(fd, 0, SEEK_END);
+
+ if (origin == SEEK_SET) {
+ result = offset;
+ }
+ else if (origin == SEEK_CUR) {
+ result = offset + cur_pos;
+ }
+ else if (origin == SEEK_END) {
+ result = size + offset;
+ }
+
+ /* sanity check our result */
+ if (size > result) {
+ return check_error(-1, errInfo);
+ }
+
+ /* store the data localy */
+ l_update_local_fd(fd, result, size);
+
+ /* reset the original file position */
+ if (origin != SEEK_END) {
+ lseek(fd, cur_pos, SEEK_SET);
+ }
+ }
+ else if (errno == 0) {
+ errno = EINVAL;
+ }
+ }
+
+ if (new_location) {
+ *new_location = result;
+ }
+
+ return 1;
+}
+
+/***************************************************************************/
+
+int
+efile_truncate_file(Efile_error* errInfo, int *fd, int flags)
+{
+ off_t offset;
+ struct fd_data *fd_data;
+
+ if ((fd_data = l_find_local_fd(*fd)) != NULL && L_FD_IS_VALID(fd_data)) {
+ offset = L_FD_CUR(fd_data);
+ }
+ else {
+ offset = lseek(*fd, 0, SEEK_CUR);
+ }
+
+ return check_error(((offset >= 0) &&
+ (ftruncate(*fd, offset) == 0)) ? 1 : -1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
+{
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_altname(Efile_error* errInfo, char* name, char* buffer, size_t size)
+{
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_link(Efile_error* errInfo, char* old, char* new)
+{
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_symlink(Efile_error* errInfo, char* old, char* new)
+{
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+}
+
+/***************************************************************************/
+
+int
+efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset,
+ Sint64 length, int advise)
+{
+ return check_error(posix_fadvise(fd, offset, length, advise), errInfo);
+}
+
+/***************************************************************************/
+
+static int
+call_posix_fallocate(int fd, Sint64 offset, Sint64 length)
+{
+ int ret;
+
+ /*
+ * On Linux and Solaris for example, posix_fallocate() returns
+ * a positive error number on error and it does not set errno.
+ * On FreeBSD however (9.0 at least), it returns -1 on error
+ * and it sets errno.
+ */
+ do {
+ ret = posix_fallocate(fd, (off_t) offset, (off_t) length);
+ if (ret > 0) {
+ errno = ret;
+ ret = -1;
+ }
+ } while (ret != 0 && errno == EINTR);
+
+ return ret;
+}
+
+/***************************************************************************/
+
+int
+efile_fallocate(Efile_error* errInfo, int fd, Sint64 offset, Sint64 length)
+{
+ return check_error(call_posix_fallocate(fd, offset, length), errInfo);
+}
diff --git a/erts/emulator/drivers/ose/ose_signal_drv.c b/erts/emulator/drivers/ose/ose_signal_drv.c
new file mode 100644
index 0000000000..4929b53856
--- /dev/null
+++ b/erts/emulator/drivers/ose/ose_signal_drv.c
@@ -0,0 +1,896 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "errno.h"
+#include "stdio.h"
+#include "string.h"
+#include "stddef.h"
+
+#include "sys.h"
+#include "erl_driver.h"
+#include "ose.h"
+
+
+#ifdef HAVE_OSE_SPI_H
+#include "ose_spi/ose_spi.h"
+#endif
+
+#define DEBUG_ATTACH 0
+#define DEBUG_HUNT 0
+#define DEBUG_SEND 0
+#define DEBUG_LISTEN 0
+
+#if 0
+#define DEBUGP(FMT,...) printf(FMT, __VA_ARGS__)
+#else
+#define DEBUGP(FMT,...)
+#endif
+
+#if DEBUG_ATTACH
+#define DEBUGP_ATTACH(...) DEBUGP( __VA_ARGS__)
+#else
+#define DEBUGP_ATTACH(...)
+#endif
+
+#if DEBUG_HUNT
+#define DEBUGP_HUNT(...) DEBUGP( __VA_ARGS__)
+#else
+#define DEBUGP_HUNT(...)
+#endif
+
+#if DEBUG_LISTEN
+#define DEBUGP_LISTEN(...) DEBUGP( __VA_ARGS__)
+#else
+#define DEBUGP_LISTEN(...)
+#endif
+
+#if DEBUG_SEND
+#define DEBUGP_SEND(...) DEBUGP( __VA_ARGS__)
+#else
+#define DEBUGP_SEND(...)
+#endif
+
+
+#define DRIVER_NAME "ose_signal_drv"
+#define GET_SPID 1
+#define GET_NAME 2
+#define HUNT 100
+#define DEHUNT 101
+#define ATTACH 102
+#define DETACH 103
+#define SEND 104
+#define SEND_W_S 105
+#define LISTEN 106
+#define OPEN 200
+
+#define REF_SEGMENT_SIZE 8
+
+struct async {
+ SIGSELECT signo;
+ ErlDrvTermData port;
+ ErlDrvTermData proc;
+ PROCESS spid;
+ PROCESS target;
+ Uint32 ref;
+};
+
+/**
+ * OSE signals
+ **/
+union SIGNAL {
+ SIGSELECT signo;
+ struct async async;
+};
+
+/**
+ * The driver's context
+ **/
+typedef struct _driver_context {
+ ErlDrvPort port;
+ PROCESS spid;
+ ErlDrvEvent perm_events[2];
+ ErlDrvEvent *events;
+ Uint32 event_cnt;
+ Uint32 ref;
+ Uint32 *outstanding_refs;
+ Uint32 outstanding_refs_max;
+ Uint32 outstanding_refs_cnt;
+} driver_context_t;
+
+/**
+ * Global variables
+ **/
+static ErlDrvTermData a_ok;
+static ErlDrvTermData a_error;
+static ErlDrvTermData a_enomem;
+static ErlDrvTermData a_enoent;
+static ErlDrvTermData a_badarg;
+static ErlDrvTermData a_mailbox_up;
+static ErlDrvTermData a_mailbox_down;
+static ErlDrvTermData a_ose_drv_reply;
+static ErlDrvTermData a_message;
+static PROCESS proxy_proc;
+
+
+/**
+ * Serialize/unserialize unsigned 32-bit values
+ **/
+static char *put_u32(unsigned int value, char *ptr) {
+ *ptr++ = (value & 0xff000000) >> 24;
+ *ptr++ = (value & 0x00ff0000) >> 16;
+ *ptr++ = (value & 0x0000ff00) >> 8;
+ *ptr++ = (value & 0xff);
+
+ return ptr;
+}
+
+static unsigned int get_u32(char *ptr) {
+ unsigned int result = 0;
+ result += (ptr[0] & 0xff) << 24;
+ result += (ptr[1] & 0xff) << 16;
+ result += (ptr[2] & 0xff) << 8;
+ result += (ptr[3] & 0xff);
+
+ return result;
+}
+
+
+/* Stolen from efile_drv.c */
+
+/* char EV_CHAR_P(ErlIOVec *ev, int p, int q) */
+#define EV_CHAR_P(ev, p, q) \
+ (((char *)(ev)->iov[(q)].iov_base) + (p))
+
+/* int EV_GET_CHAR(ErlIOVec *ev, char *p, int *pp, int *qp) */
+#define EV_GET_CHAR(ev, p, pp, qp) ev_get_char(ev, p ,pp, qp)
+static int
+ev_get_char(ErlIOVec *ev, char *p, int *pp, int *qp) {
+ if (*(pp)+1 <= (ev)->iov[*(qp)].iov_len) {
+ *(p) = *EV_CHAR_P(ev, *(pp), *(qp));
+ if (*(pp)+1 < (ev)->iov[*(qp)].iov_len)
+ *(pp) = *(pp)+1;
+ else {
+ (*(qp))++;
+ *pp = 0;
+ }
+ return !0;
+ }
+ return 0;
+}
+
+/* Uint32 EV_UINT32(ErlIOVec *ev, int p, int q)*/
+#define EV_UINT32(ev, p, q) \
+ ((Uint32) *(((unsigned char *)(ev)->iov[(q)].iov_base) + (p)))
+
+/* int EV_GET_UINT32(ErlIOVec *ev, Uint32 *p, int *pp, int *qp) */
+#define EV_GET_UINT32(ev, p, pp, qp) ev_get_uint32(ev,(Uint32*)(p),pp,qp)
+static int
+ev_get_uint32(ErlIOVec *ev, Uint32 *p, int *pp, int *qp) {
+ if (*(pp)+4 <= (ev)->iov[*(qp)].iov_len) {
+ *(p) = (EV_UINT32(ev, *(pp), *(qp)) << 24)
+ | (EV_UINT32(ev, *(pp)+1, *(qp)) << 16)
+ | (EV_UINT32(ev, *(pp)+2, *(qp)) << 8)
+ | (EV_UINT32(ev, *(pp)+3, *(qp)));
+ if (*(pp)+4 < (ev)->iov[*(qp)].iov_len)
+ *(pp) = *(pp)+4;
+ else {
+ (*(qp))++;
+ *pp = 0;
+ }
+ return !0;
+ }
+ return 0;
+}
+
+/**
+ * Convinience macros
+ **/
+#define send_response(port,output) erl_drv_send_term(driver_mk_port(port),\
+ driver_caller(port), output, sizeof(output) / sizeof(output[0]));
+
+void iov_memcpy(void *dest,ErlIOVec *ev,int ind,int off);
+void iov_memcpy(void *dest,ErlIOVec *ev,int ind,int off) {
+ int i;
+ memcpy(dest,ev->iov[ind].iov_base+off,ev->iov[ind].iov_len-off);
+ for (i = ind+1; i < ev->vsize; i++)
+ memcpy(dest,ev->iov[i].iov_base,ev->iov[i].iov_len);
+}
+
+/**
+ * Reference handling
+ **/
+
+static int add_reference(driver_context_t *ctxt, Uint32 ref) {
+
+ /*
+ * Premature optimizations may be evil, but they sure are fun.
+ */
+
+ if (ctxt->outstanding_refs == NULL) {
+ /* First ref to be ignored */
+ ctxt->outstanding_refs = driver_alloc(REF_SEGMENT_SIZE*sizeof(Uint32));
+ if (!ctxt->outstanding_refs)
+ return 1;
+
+ memset(ctxt->outstanding_refs,0,REF_SEGMENT_SIZE*sizeof(Uint32));
+ ctxt->outstanding_refs_max += REF_SEGMENT_SIZE;
+ ctxt->outstanding_refs[ctxt->outstanding_refs_cnt++] = ref;
+ } else if (ctxt->outstanding_refs_cnt == ctxt->outstanding_refs_max) {
+ /* Expand ref array */
+ Uint32 *new_array;
+ ctxt->outstanding_refs_max += REF_SEGMENT_SIZE;
+ new_array = driver_realloc(ctxt->outstanding_refs,
+ ctxt->outstanding_refs_max*sizeof(Uint32));
+
+ if (!new_array) {
+ ctxt->outstanding_refs_max -= REF_SEGMENT_SIZE;
+ return 1;
+ }
+
+ ctxt->outstanding_refs = new_array;
+
+ memset(ctxt->outstanding_refs+ctxt->outstanding_refs_cnt,0,
+ REF_SEGMENT_SIZE*sizeof(Uint32));
+ ctxt->outstanding_refs[ctxt->outstanding_refs_cnt++] = ref;
+
+ } else {
+ /* Find an empty slot:
+ * First we try current index,
+ * then we scan for a slot.
+ */
+ if (!ctxt->outstanding_refs[ctxt->outstanding_refs_cnt]) {
+ ctxt->outstanding_refs[ctxt->outstanding_refs_cnt++] = ref;
+ } else {
+ int i;
+ ASSERT(ctxt->outstanding_refs_cnt < ctxt->outstanding_refs_max);
+ for (i = 0; i < ctxt->outstanding_refs_max; i++)
+ if (!ctxt->outstanding_refs[i])
+ break;
+ ASSERT(ctxt->outstanding_refs[i] == 0);
+ ctxt->outstanding_refs[i] = ref;
+ ctxt->outstanding_refs_cnt++;
+ }
+ }
+ return 0;
+}
+
+/* Return 0 if removed, 1 if does not exist, */
+static int remove_reference(driver_context_t *ctxt, Uint32 ref) {
+ int i,j;
+
+ if (ctxt->outstanding_refs_max == 0 && ctxt->outstanding_refs_cnt == 0) {
+ ASSERT(ctxt->outstanding_refs == NULL);
+ return 1;
+ }
+
+ for (i = 0; i < ctxt->outstanding_refs_max; i++) {
+ if (ctxt->outstanding_refs[i] == ref) {
+ ctxt->outstanding_refs[i] = 0;
+ ctxt->outstanding_refs_cnt--;
+ i = -1;
+ break;
+ }
+ }
+
+ if (i != -1)
+ return 1;
+
+ if (ctxt->outstanding_refs_cnt == 0) {
+ driver_free(ctxt->outstanding_refs);
+ ctxt->outstanding_refs = NULL;
+ ctxt->outstanding_refs_max = 0;
+ } else if (ctxt->outstanding_refs_cnt == (ctxt->outstanding_refs_max - REF_SEGMENT_SIZE)) {
+ Uint32 *new_array;
+ for (i = 0, j = 0; i < ctxt->outstanding_refs_cnt; i++) {
+ if (ctxt->outstanding_refs[i] == 0) {
+ for (j = i+1; j < ctxt->outstanding_refs_max; j++)
+ if (ctxt->outstanding_refs[j]) {
+ ctxt->outstanding_refs[i] = ctxt->outstanding_refs[j];
+ ctxt->outstanding_refs[j] = 0;
+ break;
+ }
+ }
+ }
+ ctxt->outstanding_refs_max -= REF_SEGMENT_SIZE;
+ new_array = driver_realloc(ctxt->outstanding_refs,
+ ctxt->outstanding_refs_max*sizeof(Uint32));
+ if (!new_array) {
+ ctxt->outstanding_refs_max += REF_SEGMENT_SIZE;
+ return 2;
+ }
+
+ ctxt->outstanding_refs = new_array;
+
+ }
+
+ return 0;
+}
+
+/**
+ * The OSE proxy process. This only handles ERTS_SIGNAL_OSE_DRV_ATTACH.
+ * The process is needed because signals triggered by attach ignore
+ * redir tables.
+ *
+ * We have one global proxy process to save memory. An attempt to make each
+ * port phantom into a proxy was made, but that used way to much memory.
+ */
+static OS_PROCESS(driver_proxy_process) {
+ SIGSELECT sigs[] = {1,ERTS_SIGNAL_OSE_DRV_ATTACH};
+ PROCESS master = 0;
+
+ while (1) {
+ union SIGNAL *sig = receive(sigs);
+
+ if (sig->signo == ERTS_SIGNAL_OSE_DRV_ATTACH) {
+
+ /* The first message is used to determine who to send messages to. */
+ if (master == 0)
+ master = sender(&sig);
+
+ if (sig->async.target == 0) {
+ PROCESS from = sender(&sig);
+ restore(sig);
+ DEBUGP_ATTACH("0x%x: got attach 0x%x, sending to 0x%x\n",
+ current_process(),from,master);
+ sig->async.target = from;
+ send(&sig,master);
+ } else {
+ PROCESS target = sig->async.target;
+ restore(sig);
+ sig->async.target = 0;
+ DEBUGP_ATTACH("0x%x: doing attach on 0x%x\n",current_process(),target);
+ attach(&sig,target);
+ }
+ }
+ }
+}
+
+
+/**
+ * Init routine for the driver
+ **/
+static int drv_init(void) {
+
+ a_ok = driver_mk_atom("ok");
+ a_error = driver_mk_atom("error");
+ a_enomem = driver_mk_atom("enomem");
+ a_enoent = driver_mk_atom("enoent");
+ a_badarg = driver_mk_atom("badarg");
+ a_mailbox_up = driver_mk_atom("mailbox_up");
+ a_mailbox_down = driver_mk_atom("mailbox_down");
+ a_ose_drv_reply = driver_mk_atom("ose_drv_reply");
+ a_message = driver_mk_atom("message");
+
+ proxy_proc = create_process(get_ptype(current_process()),
+ "ose_signal_driver_proxy",
+ driver_proxy_process, 10000,
+ get_pri(current_process()),
+ 0, 0, NULL, 0, 0);
+
+#ifdef DEBUG
+ efs_clone(proxy_proc);
+#endif
+ start(proxy_proc);
+
+ return 0;
+}
+
+/* Signal resolution callback */
+static ErlDrvOseEventId resolve_signal(union SIGNAL* osig) {
+ union SIGNAL *sig = osig;
+ if (sig->signo == ERTS_SIGNAL_OSE_DRV_HUNT ||
+ sig->signo == ERTS_SIGNAL_OSE_DRV_ATTACH) {
+ return sig->async.spid;
+ }
+ DEBUGP("%p: Got signal %d sent to %p from 0x%p\n",
+ current_process(),sig->signo,addressee(&sig),sender(&sig));
+ return addressee(&sig);
+}
+
+
+/**
+ * Start routine for the driver
+ **/
+static ErlDrvData drv_start(ErlDrvPort port, char *command)
+{
+ driver_context_t *ctxt = driver_alloc(sizeof(driver_context_t));
+
+ ctxt->perm_events[0] = NULL;
+ ctxt->perm_events[1] = NULL;
+
+ ctxt->spid = 0;
+ ctxt->port = port;
+ ctxt->event_cnt = 0;
+ ctxt->events = NULL;
+ ctxt->ref = 0;
+ ctxt->outstanding_refs = NULL;
+ ctxt->outstanding_refs_max = 0;
+ ctxt->outstanding_refs_cnt = 0;
+
+
+ /* Set the communication protocol to Erlang to be binary */
+ set_port_control_flags(port, PORT_CONTROL_FLAG_BINARY);
+
+ /* Everything ok */
+ return (ErlDrvData)ctxt;
+}
+
+/**
+ * Stop routine for the driver
+ **/
+static void drv_stop(ErlDrvData driver_data)
+{
+ driver_context_t *ctxt = (driver_context_t *)driver_data;
+ int i;
+
+ /* HUNT + ATTACH */
+ if (ctxt->perm_events[0])
+ driver_select(ctxt->port, ctxt->perm_events[0],
+ ERL_DRV_USE|ERL_DRV_READ, 0);
+ if (ctxt->perm_events[1])
+ driver_select(ctxt->port, ctxt->perm_events[1],
+ ERL_DRV_USE|ERL_DRV_READ, 0);
+
+ for (i = 0; i < ctxt->event_cnt; i++) {
+ driver_select(ctxt->port, ctxt->events[i], ERL_DRV_USE|ERL_DRV_READ, 0);
+ }
+
+ if (ctxt->spid != 0)
+ kill_proc(ctxt->spid);
+ DEBUGP("0x%x: stopped\n",ctxt->spid);
+ if (ctxt->events)
+ driver_free(ctxt->events);
+ if (ctxt->outstanding_refs)
+ driver_free(ctxt->outstanding_refs);
+
+ driver_free(ctxt);
+}
+
+/**
+ * Output from Erlang
+ **/
+static void outputv(ErlDrvData driver_data, ErlIOVec *ev)
+{
+ driver_context_t *ctxt = (driver_context_t *)driver_data;
+ int p = 0, q = 1;
+ char cmd;
+
+ if (! EV_GET_CHAR(ev,&cmd,&p,&q)) {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_badarg,
+ ERL_DRV_TUPLE, 3};
+ send_response(ctxt->port, output);
+ return;
+ }
+
+ /* Command is in the buffer's first byte */
+ switch(cmd) {
+
+ case OPEN: {
+ char *name = driver_alloc(ev->size - 1+1);
+ struct OS_redir_entry redir[2];
+
+ redir[0].sig = 1;
+ redir[0].pid = current_process();
+
+ iov_memcpy(name,ev,q,p);
+ name[ev->size-1] = '\0';
+
+ ctxt->spid = create_process(OS_PHANTOM, name, NULL, 0,
+ 0, 0, 0, redir, 0, 0);
+
+ DEBUGP("0x%x: open\n",ctxt->spid);
+
+ ctxt->perm_events[1] =
+ erl_drv_ose_event_alloc(ERTS_SIGNAL_OSE_DRV_ATTACH,(int)ctxt->spid,
+ resolve_signal, NULL);
+ driver_select(ctxt->port,ctxt->perm_events[1],ERL_DRV_READ|ERL_DRV_USE,1);
+
+ ctxt->perm_events[0] =
+ erl_drv_ose_event_alloc(ERTS_SIGNAL_OSE_DRV_HUNT,(int)ctxt->spid,
+ resolve_signal, NULL);
+ driver_select(ctxt->port,ctxt->perm_events[0],ERL_DRV_READ|ERL_DRV_USE,1);
+
+ start(ctxt->spid);
+
+ {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_ok,
+ ERL_DRV_TUPLE, 3};
+
+ send_response(ctxt->port, output);
+ }
+
+ break;
+
+ }
+
+ case ATTACH:
+ case HUNT:
+ {
+ union SIGNAL *sig = alloc(sizeof(union SIGNAL),
+ cmd == HUNT ? ERTS_SIGNAL_OSE_DRV_HUNT:ERTS_SIGNAL_OSE_DRV_ATTACH);
+
+ sig->async.port = driver_mk_port(ctxt->port);
+ sig->async.proc = driver_caller(ctxt->port);
+ sig->async.spid = ctxt->spid;
+ sig->async.ref = ++ctxt->ref;
+
+ if (add_reference(ctxt,ctxt->ref)) {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_enomem,
+ ERL_DRV_TUPLE, 3};
+ send_response(ctxt->port, output);
+ free_buf(&sig);
+ } else {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_INT, (ErlDrvUInt)ctxt->ref,
+ ERL_DRV_TUPLE, 2,
+ ERL_DRV_TUPLE, 3};
+ send_response(ctxt->port, output);
+
+ if (cmd == HUNT) {
+ char *huntname = driver_alloc(sizeof(char)*((ev->size-1)+1));
+
+ iov_memcpy(huntname,ev,q,p);
+ huntname[ev->size-1] = '\0';
+
+ DEBUGP_HUNT("0x%x: hunt %s -> %u (%u,%u)\n",
+ ctxt->spid,huntname,ctxt->ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+
+ hunt(huntname, 0, NULL, &sig);
+
+ driver_free(huntname);
+ } else {
+ EV_GET_UINT32(ev,&sig->async.target,&p,&q);
+ DEBUGP_ATTACH("0x%x: attach %u -> %u (%u,%u)\n",
+ ctxt->spid,sig->async.target,
+ ctxt->ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+
+ send(&sig,proxy_proc);
+ }
+
+ }
+
+ break;
+ }
+
+ case DETACH:
+ case DEHUNT:
+ {
+
+ Uint32 ref;
+
+ EV_GET_UINT32(ev,&ref,&p,&q);
+ if (cmd == DETACH) {
+ DEBUGP_ATTACH("0x%x: detach %u (%u,%u)\n",ctxt->spid,ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ } else {
+ DEBUGP_HUNT("0x%x: dehunt %u (%u,%u)\n",ctxt->spid,ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ }
+
+ if (remove_reference(ctxt,ref)) {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_error,
+ ERL_DRV_ATOM, a_enoent,
+ ERL_DRV_TUPLE, 2,
+ ERL_DRV_TUPLE, 3};
+
+ send_response(ctxt->port, output);
+ } else {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_ok,
+ ERL_DRV_TUPLE, 3};
+
+ send_response(ctxt->port, output);
+ }
+
+ break;
+ }
+
+ case SEND:
+ case SEND_W_S:
+ {
+ PROCESS spid;
+ PROCESS sender;
+ SIGSELECT signo;
+ OSBUFSIZE size = ev->size-9;
+ union SIGNAL *sig;
+
+ EV_GET_UINT32(ev,&spid,&p,&q);
+
+ if (cmd == SEND_W_S) {
+ EV_GET_UINT32(ev,&sender,&p,&q);
+ size -= 4;
+ } else {
+ sender = ctxt->spid;
+ }
+
+ EV_GET_UINT32(ev,&signo,&p,&q);
+
+ sig = alloc(size + sizeof(SIGSELECT),signo);
+
+ if (cmd == SEND_W_S) {
+ DEBUGP_SEND("0x%x: send_w_s(%u,%u,%u)\n",ctxt->spid,spid,signo,sender);
+ } else {
+ DEBUGP_SEND("0x%x: send(%u,%u)\n",ctxt->spid,spid,signo);
+ }
+
+ iov_memcpy(((char *)&sig->signo) + sizeof(SIGSELECT),ev,q,p);
+
+ send_w_s(&sig, sender, spid);
+
+ break;
+ }
+
+ case LISTEN:
+ {
+ int i,j,event_cnt = (ev->size - 1)/4;
+ ErlDrvEvent *events = NULL;
+ SIGSELECT signo,tmp_signo;
+
+ if (event_cnt == 0) {
+ for (i = 0; i < ctxt->event_cnt; i++)
+ driver_select(ctxt->port,ctxt->events[i],ERL_DRV_READ|ERL_DRV_USE,0);
+ if (ctxt->events)
+ driver_free(ctxt->events);
+ } else {
+ events = driver_alloc(sizeof(ErlDrvEvent)*event_cnt);
+ EV_GET_UINT32(ev,&signo,&p,&q);
+ for (i = 0, j = 0; i < event_cnt || j < ctxt->event_cnt; ) {
+
+ if (ctxt->events)
+ erl_drv_ose_event_fetch(ctxt->events[j],&tmp_signo,NULL,NULL);
+
+ if (signo == tmp_signo) {
+ events[i++] = ctxt->events[j++];
+ EV_GET_UINT32(ev,&signo,&p,&q);
+ } else if (signo < tmp_signo || !ctxt->events) {
+ /* New signal to select on */
+ events[i] = erl_drv_ose_event_alloc(signo,(int)ctxt->spid,
+ resolve_signal, NULL);
+ driver_select(ctxt->port,events[i++],ERL_DRV_READ|ERL_DRV_USE,1);
+ EV_GET_UINT32(ev,&signo,&p,&q);
+ } else {
+ /* Remove old signal to select on */
+ driver_select(ctxt->port,ctxt->events[j++],ERL_DRV_READ|ERL_DRV_USE,0);
+ }
+ }
+ if (ctxt->events)
+ driver_free(ctxt->events);
+ }
+ ctxt->events = events;
+ ctxt->event_cnt = event_cnt;
+
+ {
+ ErlDrvTermData output[] = {
+ ERL_DRV_ATOM, a_ose_drv_reply,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_ATOM, a_ok,
+ ERL_DRV_TUPLE, 3};
+ send_response(ctxt->port, output);
+ }
+ break;
+ }
+
+ default:
+ {
+ DEBUGP("Warning: 'ose_signal_drv' unknown command '%d'\n", cmd);
+ break;
+ }
+ }
+}
+
+/**
+ * Handler for when OSE signal arrives
+ **/
+static void ready_input(ErlDrvData driver_data, ErlDrvEvent event)
+{
+ driver_context_t *ctxt = (driver_context_t *)driver_data;
+ union SIGNAL *sig = erl_drv_ose_get_signal(event);
+
+ while (sig != NULL) {
+
+ switch(sig->signo)
+ {
+ /* Remote process is available */
+ case ERTS_SIGNAL_OSE_DRV_HUNT:
+ {
+ const PROCESS spid = sender(&sig);
+
+ if (remove_reference(ctxt,sig->async.ref)) {
+ DEBUGP_HUNT("0x%x: Got hunt from 0x%x -> %u (CANCELLED) (%u,%u)\n",
+ ctxt->spid,spid,sig->async.ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ /* Already removed by dehunt */
+ } else {
+ ErlDrvTermData reply[] = {
+ ERL_DRV_ATOM, a_mailbox_up,
+ ERL_DRV_PORT, sig->async.port,
+ ERL_DRV_PORT, sig->async.port,
+ ERL_DRV_UINT, (ErlDrvUInt)sig->async.ref,
+ ERL_DRV_TUPLE, 2,
+ ERL_DRV_UINT, (ErlDrvUInt)spid,
+ ERL_DRV_TUPLE, 4};
+ DEBUGP_HUNT("0x%x: Got hunt from 0x%x -> %u (%u,%u)\n",
+ ctxt->spid,spid,sig->async.ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ erl_drv_send_term(sig->async.port, sig->async.proc, reply,
+ sizeof(reply) / sizeof(reply[0]));
+ }
+ break;
+ }
+
+ /* Remote process is down */
+ case ERTS_SIGNAL_OSE_DRV_ATTACH:
+ {
+ PROCESS spid = sig->async.target;
+
+ if (remove_reference(ctxt,sig->async.ref)) {
+ DEBUGP_ATTACH("0x%x: Got attach from 0x%x -> %u (CANCELLED) (%u,%u)\n",
+ ctxt->spid,spid,sig->async.ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ /* Already removed by detach */
+ } else {
+ ErlDrvTermData reply[] = {
+ ERL_DRV_ATOM, a_mailbox_down,
+ ERL_DRV_PORT, sig->async.port,
+ ERL_DRV_PORT, sig->async.port,
+ ERL_DRV_UINT, sig->async.ref,
+ ERL_DRV_TUPLE, 2,
+ ERL_DRV_UINT, (ErlDrvUInt)spid,
+ ERL_DRV_TUPLE, 4};
+ DEBUGP_ATTACH("0x%x: Got attach from 0x%x -> %u (%u,%u)\n",
+ ctxt->spid,spid,sig->async.ref,
+ ctxt->outstanding_refs_cnt,
+ ctxt->outstanding_refs_max);
+ erl_drv_send_term(sig->async.port, sig->async.proc, reply,
+ sizeof(reply) / sizeof(reply[0]));
+ }
+ break;
+ }
+
+ /* Received user defined signal */
+ default:
+ {
+ const PROCESS spid = sender(&sig);
+ const OSBUFSIZE size = sigsize(&sig) - sizeof(SIGSELECT);
+ const char *sig_data = ((char *)&sig->signo) + sizeof(SIGSELECT);
+
+ ErlDrvTermData reply[] = {
+ ERL_DRV_ATOM, a_message,
+ ERL_DRV_PORT, driver_mk_port(ctxt->port),
+ ERL_DRV_UINT, (ErlDrvUInt)spid,
+ ERL_DRV_UINT, (ErlDrvUInt)ctxt->spid,
+ ERL_DRV_UINT, (ErlDrvUInt)sig->signo,
+ ERL_DRV_BUF2BINARY, (ErlDrvTermData)sig_data, (ErlDrvUInt)size,
+ ERL_DRV_TUPLE, 4,
+ ERL_DRV_TUPLE, 3};
+
+ DEBUGP_SEND("0x%x: Got 0x%u\r\n", spid, sig->signo);
+
+ erl_drv_output_term(driver_mk_port(ctxt->port), reply,
+ sizeof(reply) / sizeof(reply[0]));
+ break;
+ }
+ }
+
+ free_buf(&sig);
+ sig = erl_drv_ose_get_signal(event);
+ }
+}
+
+/**
+ * Handler for 'port_control'
+ **/
+static ErlDrvSSizeT control(ErlDrvData driver_data, unsigned int cmd,
+ char *buf, ErlDrvSizeT len,
+ char **rbuf, ErlDrvSizeT rlen)
+{
+ driver_context_t *ctxt = (driver_context_t *)driver_data;
+
+ switch(cmd)
+ {
+ case GET_SPID:
+ {
+ const PROCESS spid = ctxt->spid;
+ put_u32(spid, *rbuf);
+ return sizeof(PROCESS);
+ }
+
+#ifdef HAVE_OSE_SPI_H
+ case GET_NAME:
+ {
+ const PROCESS spid = get_u32(buf);
+ char *name = (char*)get_pid_info(spid,OSE_PI_NAME);
+ int n;
+ if (!name) {
+ *rbuf = NULL;
+ return 0;
+ }
+
+ if (rlen < (n = strlen(name))) {
+ ErlDrvBinary *bin = driver_alloc_binary(n);
+ strncpy(bin->orig_bytes,name,n);
+ *rbuf = (char*)bin;
+ } else
+ strncpy(*rbuf,name,n);
+ free_buf((union SIGNAL**)&name);
+
+ return n;
+ }
+#endif
+ default:
+ {
+ /* Unknown command */
+ return (ErlDrvSSizeT)ERL_DRV_ERROR_GENERAL;
+ break;
+ }
+ }
+}
+
+static void stop_select(ErlDrvEvent event, void *reserved)
+{
+ erl_drv_ose_event_free(event);
+}
+
+/**
+ * Setup the driver entry for the Erlang runtime
+ **/
+ErlDrvEntry ose_signal_driver_entry = {
+ .init = drv_init,
+ .start = drv_start,
+ .stop = drv_stop,
+ .outputv = outputv,
+ .ready_input = ready_input,
+ .driver_name = DRIVER_NAME,
+ .control = control,
+ .extended_marker = ERL_DRV_EXTENDED_MARKER,
+ .major_version = ERL_DRV_EXTENDED_MAJOR_VERSION,
+ .minor_version = ERL_DRV_EXTENDED_MINOR_VERSION,
+ .driver_flags = ERL_DRV_FLAG_USE_PORT_LOCKING,
+ .stop_select = stop_select
+};
+
diff --git a/erts/emulator/drivers/ose/ttsl_drv.c b/erts/emulator/drivers/ose/ttsl_drv.c
new file mode 100644
index 0000000000..8af2ce6af3
--- /dev/null
+++ b/erts/emulator/drivers/ose/ttsl_drv.c
@@ -0,0 +1,68 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Stub tty driver because group/user depend on this.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "erl_driver.h"
+
+static int ttysl_init(void);
+static ErlDrvData ttysl_start(ErlDrvPort, char*);
+
+/* Define the driver table entry. */
+struct erl_drv_entry ttsl_driver_entry = {
+ ttysl_init,
+ ttysl_start,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "tty_sl",
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* timeout */
+ NULL, /* outputv */
+ NULL, /* ready_async */
+ NULL, /* flush */
+ NULL, /* call */
+ NULL, /* event */
+ ERL_DRV_EXTENDED_MARKER,
+ ERL_DRV_EXTENDED_MAJOR_VERSION,
+ ERL_DRV_EXTENDED_MINOR_VERSION,
+ 0, /* ERL_DRV_FLAGs */
+ NULL,
+ NULL, /* process_exit */
+ NULL
+};
+
+
+static int ttysl_init(void)
+{
+ return 0;
+}
+
+static ErlDrvData ttysl_start(ErlDrvPort port, char* buf)
+{
+ return ERL_DRV_ERROR_GENERAL;
+}
diff --git a/erts/emulator/drivers/unix/multi_drv.c b/erts/emulator/drivers/unix/multi_drv.c
index 822c96730c..724d325ed5 100644
--- a/erts/emulator/drivers/unix/multi_drv.c
+++ b/erts/emulator/drivers/unix/multi_drv.c
@@ -20,7 +20,7 @@
/* Purpose: Multidriver interface
This is an example of a driver which allows multiple instances of itself.
I.e have one erlang process execute open_port(multi......) and
- at the same time have an other erlang process open an other port
+ at the same time have another erlang process open another port
running multi there as well.
*/
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 55539b44dd..878beb055b 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -102,6 +102,11 @@ check_error(int result, Efile_error *errInfo)
}
int
+efile_init() {
+ return 1;
+}
+
+int
efile_mkdir(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of directory to create. */
{
@@ -355,7 +360,12 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
int fd;
int mode; /* Open mode. */
- if (stat(name, &statbuf) >= 0 && !ISREG(statbuf)) {
+ if (stat(name, &statbuf) < 0) {
+ /* statbuf is undefined: if the caller depends on it,
+ i.e. invoke_read_file(), fail the call immediately */
+ if (pSize && flags == EFILE_MODE_READ)
+ return check_error(-1, errInfo);
+ } else if (!ISREG(statbuf)) {
/*
* For UNIX only, here is some ugly code to allow
* /dev/null to be opened as a file.
@@ -405,6 +415,15 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
mode |= O_EXCL;
}
+ if (flags & EFILE_MODE_SYNC) {
+#ifdef O_SYNC
+ mode |= O_SYNC;
+#else
+ errno = ENOTSUP;
+ return check_error(-1, errInfo);
+#endif
+ }
+
fd = open(name, mode, FILE_MODE);
if (!check_error(fd, errInfo))
@@ -620,7 +639,8 @@ efile_writev(Efile_error* errInfo, /* Where to return error codes */
do {
w = write(fd, iov[cnt].iov_base, iov[cnt].iov_len);
} while (w < 0 && errno == EINTR);
- ASSERT(w <= iov[cnt].iov_len);
+ ASSERT(w <= iov[cnt].iov_len ||
+ (w == -1 && errno != EINTR));
}
if (w < 0) return check_error(-1, errInfo);
/* Move forward to next buffer to write */
diff --git a/erts/emulator/drivers/win32/win_efile.c b/erts/emulator/drivers/win32/win_efile.c
index 319065f57b..7e4043fc1b 100644
--- a/erts/emulator/drivers/win32/win_efile.c
+++ b/erts/emulator/drivers/win32/win_efile.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1997-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1997-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -29,12 +29,27 @@
#include <wchar.h>
#include "erl_efile.h"
+#define DBG_TRACE_MASK 0
+/* 1 = file name ops
+ * 2 = file descr ops
+ * 4 = errors
+ * 8 = path name conversion
+ */
+#if !DBG_TRACE_MASK
+# define DBG_TRACE(M,S)
+# define DBG_TRACE1(M,FMT,A)
+# define DBG_TRACE2(M,FMT,A,B)
+#else
+# define DBG_TRACE(M,S) do { if ((M)&DBG_TRACE_MASK) fwprintf(stderr, L"DBG_TRACE %d: %s\r\n", __LINE__, (WCHAR*)(S)); }while(0)
+# define DBG_TRACE1(M,FMT,A) do { if ((M)&DBG_TRACE_MASK) fwprintf(stderr, L"DBG_TRACE %d: " L##FMT L"\r\n", __LINE__, (A)); }while(0)
+# define DBG_TRACE2(M,FMT,A,B) do { if ((M)&DBG_TRACE_MASK) fwprintf(stderr, L"DBG_TRACE %d: " L##FMT L"\r\n", __LINE__, (A), (B)); }while(0)
+#endif
+
/*
* Microsoft-specific function to map a WIN32 error code to a Posix errno.
*/
#define ISSLASH(a) ((a) == L'\\' || (a) == L'/')
-
#define ISDIR(st) (((st).st_mode&S_IFMT) == S_IFDIR)
#define ISREG(st) (((st).st_mode&S_IFMT) == S_IFREG)
@@ -69,10 +84,92 @@
static int check_error(int result, Efile_error* errInfo);
static int set_error(Efile_error* errInfo);
+static int set_os_errno(Efile_error* errInfo, DWORD os_errno);
static int is_root_unc_name(const WCHAR *path);
static int extract_root(WCHAR *name);
static unsigned short dos_to_posix_mode(int attr, const WCHAR *name);
+
+struct wpath_tmp_buffer {
+ struct wpath_tmp_buffer* next;
+ WCHAR buffer[1];
+};
+
+typedef struct {
+ Efile_error* errInfo;
+ struct wpath_tmp_buffer* buf_list;
+}Efile_call_state;
+
+static void call_state_init(Efile_call_state* state, Efile_error* errInfo)
+{
+ state->errInfo = errInfo;
+ state->buf_list = NULL;
+}
+static WCHAR* wpath_tmp_alloc(Efile_call_state* state, size_t len)
+{
+ size_t sz = offsetof(struct wpath_tmp_buffer, buffer)
+ + (len+1)*sizeof(WCHAR);
+ struct wpath_tmp_buffer* p = driver_alloc(sz);
+ p->next = state->buf_list;
+ state->buf_list = p;
+ return p->buffer;
+}
+static void call_state_free(Efile_call_state* state)
+{
+ while(state->buf_list) {
+ struct wpath_tmp_buffer* next = state->buf_list->next;
+ driver_free(state->buf_list);
+ state->buf_list = next;
+ }
+}
+static WCHAR* get_cwd_wpath_tmp(Efile_call_state* state)
+{
+ WCHAR dummy;
+ DWORD size = GetCurrentDirectoryW(0, &dummy);
+ WCHAR* ret = NULL;
+
+ if (size) {
+ ret = wpath_tmp_alloc(state, size);
+ if (!GetCurrentDirectoryW(size, ret)) {
+ ret = NULL;
+ }
+ }
+ return ret;
+}
+static WCHAR* get_full_wpath_tmp(Efile_call_state* state,
+ const WCHAR* file,
+ WCHAR** file_part,
+ DWORD extra)
+{
+ WCHAR dummy;
+ DWORD size = GetFullPathNameW(file, 0, &dummy, NULL);
+ WCHAR* ret = NULL;
+
+ if (size) {
+ int ok;
+ ret = wpath_tmp_alloc(state, size + extra);
+ if (file_part) {
+ ok = (GetFullPathNameW(file, size, ret, file_part) != 0);
+ }
+ else {
+ ok = (_wfullpath(ret, file, size) != NULL);
+ }
+ if (!ok) {
+ ret = NULL;
+ }
+ }
+ return ret;
+}
+
+static void ensure_wpath_max(Efile_call_state* state, WCHAR** pathp, size_t max);
+static int do_rmdir(Efile_call_state*, char* name);
+static int do_rename(Efile_call_state*, char* src, char* dst);
+static int do_readdir(Efile_call_state*, char* name, EFILE_DIR_HANDLE*, char* buffer, size_t *size);
+static int do_fileinfo(Efile_call_state*, Efile_info*, char* orig_name, int info_for_link);
+static char* do_readlink(Efile_call_state*, char* name, char* buffer, size_t size);
+static int do_altname(Efile_call_state*, char* orig_name, char* buffer, size_t size);
+
+
static int errno_map(DWORD last_error) {
switch (last_error) {
@@ -154,6 +251,8 @@ static int errno_map(DWORD last_error) {
return EAGAIN;
case ERROR_CANT_RESOLVE_FILENAME:
return EMLINK;
+ case ERROR_PRIVILEGE_NOT_HELD:
+ return EPERM;
case ERROR_ARENA_TRASHED:
case ERROR_INVALID_BLOCK:
case ERROR_BAD_ENVIRONMENT:
@@ -176,11 +275,23 @@ check_error(int result, Efile_error* errInfo)
if (result < 0) {
errInfo->posix_errno = errno;
errInfo->os_errno = GetLastError();
+ DBG_TRACE2(4, "ERROR os_error=%d errno=%d @@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+ errInfo->os_errno, errInfo->posix_errno);
return 0;
}
return 1;
}
+static void
+save_last_error(Efile_error* errInfo)
+{
+ errInfo->posix_errno = errno;
+ errInfo->os_errno = GetLastError();
+ DBG_TRACE2(4, "ERROR os_error=%d errno=%d $$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
+ errInfo->os_errno, errInfo->posix_errno);
+}
+
+
/*
* Fills the provided error information structure with information
* with the error code given by GetLastError() and its corresponding
@@ -192,10 +303,26 @@ check_error(int result, Efile_error* errInfo)
static int
set_error(Efile_error* errInfo)
{
- errInfo->posix_errno = errno_map(errInfo->os_errno = GetLastError());
+ set_os_errno(errInfo, GetLastError());
return 0;
}
+
+static int
+set_os_errno(Efile_error* errInfo, DWORD os_errno)
+{
+ errInfo->os_errno = os_errno;
+ errInfo->posix_errno = errno_map(os_errno);
+ DBG_TRACE2(4, "ERROR os_error=%d errno=%d ############################",
+ errInfo->os_errno, errInfo->posix_errno);
+ return 0;
+}
+
+int
+efile_init() {
+ return 1;
+}
+
/*
* A writev with Unix semantics, but with Windows arguments
*/
@@ -221,21 +348,151 @@ win_writev(Efile_error* errInfo,
}
+/* Check '*pathp' and convert it if needed to something that windows will accept.
+ * Typically use UNC path with \\?\ prefix if absolute path is longer than 260.
+ */
+static void ensure_wpath(Efile_call_state* state, WCHAR** pathp)
+{
+ ensure_wpath_max(state, pathp, MAX_PATH);
+}
+
+static void ensure_wpath_max(Efile_call_state* state, WCHAR** pathp, size_t max)
+{
+ WCHAR* path = *pathp;
+ WCHAR* p;
+ size_t len = wcslen(path);
+ int unc_fixup = 0;
+
+ if (path[0] == 0) {
+ DBG_TRACE(8, L"Let empty path pass through");
+ return;
+ }
+
+ DBG_TRACE1(8,"IN: %s", path);
+
+ if (path[1] == L':' && ISSLASH(path[2])) { /* absolute path */
+ if (len >= max) {
+ WCHAR *src, *dst;
+
+ *pathp = wpath_tmp_alloc(state, 4+len+1);
+ dst = *pathp;
+ wcscpy(dst, L"\\\\?\\");
+ for (src=path,dst+=4; *src; src++) {
+ if (*src == L'/') {
+ if (dst[-1] != L'\\') {
+ *dst++ = L'\\';
+ }
+ /*else ignore redundant slashes */
+ }
+ else
+ *dst++ = *src;
+ }
+ *dst = 0;
+ unc_fixup = 1;
+ }
+ }
+ else if (!(ISSLASH(path[0]) && ISSLASH(path[1]))) { /* relative path */
+ DWORD cwdLen = GetCurrentDirectoryW(0, NULL);
+ DWORD absLen = cwdLen + 1 + len;
+ if (absLen >= max) {
+ WCHAR *fullPath = wpath_tmp_alloc(state, 4+4+absLen);
+ DWORD fullLen;
+
+ fullLen = GetFullPathNameW(path, 4 + absLen, fullPath+4, NULL);
+ if (fullLen >= 4+absLen) {
+ *pathp = path;
+ DBG_TRACE2(8,"ensure_wpath FAILED absLen=%u %s", (int)absLen, path);
+ return;
+ }
+ /* GetFullPathNameW can return paths longer than MAX_PATH without the \\?\ prefix.
+ * At least seen on Windows 7. Go figure...
+ */
+ if (fullLen >= max && wcsncmp(fullPath+4, L"\\\\?\\", 4) != 0) {
+ wcsncpy(fullPath, L"\\\\?\\", 4);
+ *pathp = fullPath;
+ }
+ else {
+ *pathp = fullPath + 4;
+ }
+ }
+ }
+
+ if (unc_fixup) {
+ WCHAR* endp;
+
+ p = *pathp;
+ len = wcslen(p);
+ endp = p + len;
+ if (len > 4) {
+ p += 4;
+ while (*p) {
+ if (p[0] == L'\\' && p[1] == L'.') {
+ if (p[2] == L'\\' || !p[2]) { /* single dot */
+ wmemmove(p, p+2, (&endp[1] - &p[2]));
+ endp -= 2;
+ }
+ else if (p[2] == L'.' && (p[3] == L'\\' || !p[3])) { /* double dot */
+ WCHAR* r;
+ for (r=p-1; *r == L'\\'; --r)
+ /*skip redundant slashes*/;
+ for (; *r != L'\\'; --r)
+ /*find start of prev directory*/;
+ if (r < *pathp + 6)
+ break;
+ wmemmove(r, p+3, (&endp[1] - &p[3]));
+ p = r;
+ }
+ else p += 3;
+ }
+ else ++p;
+ }
+ }
+ }
+ DBG_TRACE1(8,"OUT: %s", *pathp);
+}
int
efile_mkdir(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of directory to create. */
{
- return check_error(_wmkdir((WCHAR *) name), errInfo);
+ Efile_call_state state;
+ WCHAR* wname = (WCHAR*)name;
+ int ret;
+
+ DBG_TRACE(1, name);
+ call_state_init(&state, errInfo);
+ ensure_wpath_max(&state, &wname, 248); /* Yes, 248 limit for normal paths */
+
+ ret = (int) CreateDirectoryW(wname, NULL);
+ if (!ret)
+ set_error(errInfo);
+
+ call_state_free(&state);
+ return ret;
}
int
efile_rmdir(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of directory to delete. */
{
+ Efile_call_state state;
+ int ret;
+
+ DBG_TRACE(1, name);
+ call_state_init(&state, errInfo);
+ ret = do_rmdir(&state, name);
+ call_state_free(&state);
+ return ret;
+}
+
+static int do_rmdir(Efile_call_state* state, char* name)
+{
OSVERSIONINFO os;
DWORD attr;
WCHAR *wname = (WCHAR *) name;
+ WCHAR *buffer = NULL;
+
+ ensure_wpath(state, &wname);
if (RemoveDirectoryW(wname) != FALSE) {
return 1;
@@ -265,10 +522,9 @@ efile_rmdir(Efile_error* errInfo, /* Where to return error codes. */
if (os.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
HANDLE handle;
WIN32_FIND_DATAW data;
- WCHAR buffer[2*MAX_PATH];
- int len;
+ int len = wcslen(wname);
- len = wcslen(wname);
+ buffer = wpath_tmp_alloc(state, len + 4);
wcscpy(buffer, wname);
if (buffer[0] && buffer[len-1] != L'\\' && buffer[len-1] != L'/') {
wcscat(buffer, L"\\");
@@ -306,16 +562,30 @@ efile_rmdir(Efile_error* errInfo, /* Where to return error codes. */
}
end:
- return check_error(-1, errInfo);
+ save_last_error(state->errInfo);
+ return 0;
}
int
efile_delete_file(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of file to delete. */
{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(1, name);
+ call_state_init(&state, errInfo);
+ ret = do_delete_file(&state, name);
+ call_state_free(&state);
+ return ret;
+}
+
+static int do_delete_file(Efile_call_state* state, char* name)
+{
DWORD attr;
WCHAR *wname = (WCHAR *) name;
+ ensure_wpath(state, &wname);
+
if (DeleteFileW(wname) != FALSE) {
return 1;
}
@@ -354,7 +624,7 @@ efile_delete_file(Efile_error* errInfo, /* Where to return error codes. */
errno = EACCES;
}
- return check_error(-1, errInfo);
+ return check_error(-1, state->errInfo);
}
/*
@@ -388,14 +658,29 @@ efile_delete_file(Efile_error* errInfo, /* Where to return error codes. */
*/
int
-efile_rename(Efile_error* errInfo, /* Where to return error codes. */
- char* src, /* Original name. */
- char* dst) /* New name. */
+efile_rename(Efile_error* errInfo, char* src, char* dst)
+{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(1, src);
+ call_state_init(&state, errInfo);
+ ret = do_rename(&state, src, dst);
+ call_state_free(&state);
+ return ret;
+}
+
+static int
+do_rename(Efile_call_state* state,
+ char* src, /* Original name. */
+ char* dst) /* New name. */
{
DWORD srcAttr, dstAttr;
WCHAR *wsrc = (WCHAR *) src;
WCHAR *wdst = (WCHAR *) dst;
-
+
+ ensure_wpath(state, &wsrc);
+ ensure_wpath(state, &wdst);
+
if (MoveFileW(wsrc, wdst) != FALSE) {
return 1;
}
@@ -412,23 +697,27 @@ efile_rename(Efile_error* errInfo, /* Where to return error codes. */
if (errno == EBADF) {
errno = EACCES;
- return check_error(-1, errInfo);
+ return check_error(-1, state->errInfo);
}
if (errno == EACCES) {
decode:
if (srcAttr & FILE_ATTRIBUTE_DIRECTORY) {
- WCHAR srcPath[MAX_PATH], dstPath[MAX_PATH];
+ WCHAR *srcPath, *dstPath;
WCHAR *srcRest, *dstRest;
int size;
- size = GetFullPathNameW(wsrc, MAX_PATH, srcPath, &srcRest);
- if ((size == 0) || (size > MAX_PATH)) {
- return check_error(-1, errInfo);
+ srcPath = get_full_wpath_tmp(state, wsrc, &srcRest, 0);
+ if (!srcPath) {
+ save_last_error(state->errInfo);
+ return 0;
}
- size = GetFullPathNameW(wdst, MAX_PATH, dstPath, &dstRest);
- if ((size == 0) || (size > MAX_PATH)) {
- return check_error(-1, errInfo);
+
+ dstPath = get_full_wpath_tmp(state, wdst, &dstRest, 0);
+ if (!dstPath) {
+ save_last_error(state->errInfo);
+ return 0;
}
+
if (srcRest == NULL) {
srcRest = srcPath + wcslen(srcPath);
}
@@ -533,14 +822,16 @@ efile_rename(Efile_error* errInfo, /* Where to return error codes. */
* put temp file back to old name.
*/
- WCHAR tempName[MAX_PATH];
- int result, size;
+ WCHAR *tempName;
+ int result;
WCHAR *rest;
- size = GetFullPathNameW(wdst, MAX_PATH, tempName, &rest);
- if ((size == 0) || (size > MAX_PATH) || (rest == NULL)) {
- return check_error(-1, errInfo);
+ tempName = get_full_wpath_tmp(state, wdst, &rest, 14);
+ if (!tempName || !rest) {
+ save_last_error(state->errInfo);
+ return 0;
}
+
*rest = L'\0';
result = -1;
if (GetTempFileNameW(tempName, L"erlr", 0, tempName) != 0) {
@@ -573,7 +864,6 @@ efile_rename(Efile_error* errInfo, /* Where to return error codes. */
/*
* Decode the EACCES to a more meaningful error.
*/
-
goto decode;
}
}
@@ -581,16 +871,20 @@ efile_rename(Efile_error* errInfo, /* Where to return error codes. */
}
}
}
- return check_error(-1, errInfo);
+ return check_error(-1, state->errInfo);
}
int
efile_chdir(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of directory to make current. */
-{
- int success = check_error(_wchdir((WCHAR *) name), errInfo);
- if (!success && errInfo->posix_errno == EINVAL)
- /* POSIXification of errno */
+{
+ /* We don't even try to handle long paths here
+ * as current working directory is always limited to MAX_PATH
+ * even if we use UNC paths and SetCurrentDirectoryW()
+ */
+ int success = check_error(_wchdir((WCHAR *) name), errInfo);
+ if (!success && errInfo->posix_errno == EINVAL)
+ /* POSIXification of errno */
errInfo->posix_errno = ENOENT;
return success;
}
@@ -603,28 +897,45 @@ efile_getdcwd(Efile_error* errInfo, /* Where to return error codes. */
{
WCHAR *wbuffer = (WCHAR *) buffer;
size_t wbuffer_size = size / 2;
- if (_wgetdcwd(drive, wbuffer, wbuffer_size) == NULL)
+ DBG_TRACE(1, L"#getdcwd#");
+ if (_wgetdcwd(drive, wbuffer, wbuffer_size) == NULL) {
return check_error(-1, errInfo);
+ }
+ DBG_TRACE1(8, "getdcwd OS=%s", wbuffer);
+ if (wcsncmp(wbuffer, L"\\\\?\\", 4) == 0) {
+ wmemmove(wbuffer, wbuffer+4, wcslen(wbuffer+4)+1);
+ }
for ( ; *wbuffer; wbuffer++)
if (*wbuffer == L'\\')
*wbuffer = L'/';
+ DBG_TRACE1(8, "getdcwd ERLANG=%s", (WCHAR*)buffer);
return 1;
}
int
-efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
- char* name, /* Name of directory to list */
- EFILE_DIR_HANDLE* dir_handle, /* Handle of opened directory or NULL */
- char* buffer, /* Buffer to put one filename in */
- size_t *size) /* in-out size of buffer/size of filename excluding zero
- termination in bytes*/
+efile_readdir(Efile_error* errInfo, char* name, EFILE_DIR_HANDLE* dir_handle,
+ char* buffer, size_t *size)
+{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(dir_handle?2:1, name);
+ call_state_init(&state, errInfo);
+ ret = do_readdir(&state, name, dir_handle, buffer, size);
+ call_state_free(&state);
+ return ret;
+}
+
+static int do_readdir(Efile_call_state* state,
+ char* name, /* Name of directory to list */
+ EFILE_DIR_HANDLE* dir_handle, /* Handle of opened directory or NULL */
+ char* buffer, /* Buffer to put one filename in */
+ size_t *size) /* in-out size of buffer/size of filename excluding zero
+ termination in bytes*/
{
HANDLE dir; /* Handle to directory. */
- WCHAR wildcard[MAX_PATH]; /* Wildcard to search for. */
WIN32_FIND_DATAW findData; /* Data found by FindFirstFile() or FindNext(). */
/* Alignment is not honored, this works on x86 because of alignment fixup by processor.
Not perfect, but faster than alinging by hand (really) */
- WCHAR *wname = (WCHAR *) name;
WCHAR *wbuffer = (WCHAR *) buffer;
/*
@@ -632,13 +943,15 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
*/
if (*dir_handle == NULL) {
- int length = wcslen(wname);
+ WCHAR *wname = (WCHAR *) name;
+ WCHAR* wildcard;
+ int length;
WCHAR* s;
- if (length+3 >= MAX_PATH) {
- errno = ENAMETOOLONG;
- return check_error(-1, errInfo);
- }
+ ensure_wpath_max(state, &wname, MAX_PATH-2);
+ length = wcslen(wname);
+
+ wildcard = wpath_tmp_alloc(state, length+3);
wcscpy(wildcard, wname);
s = wildcard+length-1;
@@ -648,8 +961,10 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
*++s = L'\0';
DEBUGF(("Reading %ws\n", wildcard));
dir = FindFirstFileW(wildcard, &findData);
- if (dir == INVALID_HANDLE_VALUE)
- return set_error(errInfo);
+ if (dir == INVALID_HANDLE_VALUE) {
+ set_error(state->errInfo);
+ return 0;
+ }
*dir_handle = (EFILE_DIR_HANDLE) dir;
if (!IS_DOT_OR_DOTDOT(findData.cFileName)) {
@@ -659,7 +974,6 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
}
}
-
/*
* Retrieve the name of the next file using the directory handle.
*/
@@ -676,28 +990,41 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
}
if (GetLastError() == ERROR_NO_MORE_FILES) {
- FindClose(dir);
- errInfo->posix_errno = errInfo->os_errno = 0;
- return 0;
+ state->errInfo->posix_errno = state->errInfo->os_errno = 0;
+ }
+ else {
+ set_error(state->errInfo);
}
-
- set_error(errInfo);
FindClose(dir);
return 0;
}
}
int
-efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
- char* name, /* Name of directory to open. */
- int flags, /* Flags to use for opening. */
- int* pfd, /* Where to store the file descriptor. */
- Sint64* pSize) /* Where to store the size of the file. */
+efile_openfile(Efile_error* errInfo, char* name, int flags, int* pfd, Sint64* pSize)
+{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE1(1, "openfile(%s)", name);
+ call_state_init(&state, errInfo);
+ ret = do_openfile(&state, name, flags, pfd, pSize);
+ call_state_free(&state);
+ return ret;
+}
+
+static
+int do_openfile(Efile_call_state* state, /* Where to return error codes. */
+ char* name, /* Name of directory to open. */
+ int flags, /* Flags to use for opening. */
+ int* pfd, /* Where to store the file descriptor. */
+ Sint64* pSize) /* Where to store the size of the file. */
{
+ Efile_error* errInfo = state->errInfo;
BY_HANDLE_FILE_INFORMATION fileInfo; /* File information from a handle. */
HANDLE fd; /* Handle to open file. */
DWORD access; /* Access mode: GENERIC_READ, GENERIC_WRITE. */
DWORD crFlags;
+ DWORD flagsAndAttrs = FILE_ATTRIBUTE_NORMAL;
WCHAR *wname = (WCHAR *) name;
switch (flags & (EFILE_MODE_READ|EFILE_MODE_WRITE)) {
@@ -719,15 +1046,20 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
return 0;
}
+ if (flags & EFILE_MODE_SYNC) {
+ flagsAndAttrs = FILE_FLAG_WRITE_THROUGH;
+ }
+
if (flags & EFILE_MODE_APPEND) {
crFlags = OPEN_ALWAYS;
}
if (flags & EFILE_MODE_EXCL) {
crFlags = CREATE_NEW;
}
+ ensure_wpath(state, &wname);
fd = CreateFileW(wname, access,
FILE_SHARE_FLAGS,
- NULL, crFlags, FILE_ATTRIBUTE_NORMAL, NULL);
+ NULL, crFlags, flagsAndAttrs, NULL);
/*
* Check for errors.
@@ -767,34 +1099,56 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */
}
int
-efile_may_openfile(Efile_error* errInfo, char *name) {
+efile_may_openfile(Efile_error* errInfo, char *name)
+{
+ Efile_call_state state;
WCHAR *wname = (WCHAR *) name;
DWORD attr;
+ int ret;
+ DBG_TRACE(1, name);
+ call_state_init(&state, errInfo);
+ ensure_wpath(&state, &wname);
if ((attr = GetFileAttributesW(wname)) == INVALID_FILE_ATTRIBUTES) {
errno = ENOENT;
- return check_error(-1, errInfo);
+ ret = check_error(-1, errInfo);
}
-
- if (attr & FILE_ATTRIBUTE_DIRECTORY) {
+ else if (attr & FILE_ATTRIBUTE_DIRECTORY) {
errno = EISDIR;
- return check_error(-1, errInfo);
+ ret = check_error(-1, errInfo);
}
- return 1;
+ else ret = 1;
+
+ call_state_free(&state);
+ return ret;
}
void
efile_closefile(fd)
int fd; /* File descriptor for file to close. */
{
+ DBG_TRACE(2, L"");
CloseHandle((HANDLE) fd);
}
+FILE* efile_wfopen(const WCHAR* name, const WCHAR* mode)
+{
+ Efile_call_state state;
+ Efile_error dummy;
+ FILE* f;
+ call_state_init(&state, &dummy);
+ ensure_wpath(&state, (WCHAR**)&name);
+ f = _wfopen(name, mode);
+ call_state_free(&state);
+ return f;
+}
+
int
efile_fdatasync(errInfo, fd)
Efile_error* errInfo; /* Where to return error codes. */
int fd; /* File descriptor for file to sync. */
{
+ DBG_TRACE(2, L"");
/* Not available in Windows, just call regular fsync */
return efile_fsync(errInfo, fd);
}
@@ -804,6 +1158,7 @@ efile_fsync(errInfo, fd)
Efile_error* errInfo; /* Where to return error codes. */
int fd; /* File descriptor for file to sync. */
{
+ DBG_TRACE(2, L"");
if (!FlushFileBuffers((HANDLE) fd)) {
return check_error(-1, errInfo);
}
@@ -814,64 +1169,87 @@ int
efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
char* orig_name, int info_for_link)
{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(1, L"");
+ call_state_init(&state, errInfo);
+ ret = do_fileinfo(&state, pInfo, orig_name, info_for_link);
+ call_state_free(&state);
+ return ret;
+}
+
+static int
+do_fileinfo(Efile_call_state* state, Efile_info* pInfo,
+ char* orig_name, int info_for_link)
+{
+ Efile_error* errInfo = state->errInfo;
HANDLE findhandle; /* Handle returned by FindFirstFile(). */
WIN32_FIND_DATAW findbuf; /* Data return by FindFirstFile(). */
- WCHAR name[_MAX_PATH];
+ WCHAR* name = NULL;
+ WCHAR* win_path;
int name_len;
- WCHAR *path;
- WCHAR pathbuf[_MAX_PATH];
int drive; /* Drive for filename (1 = A:, 2 = B: etc). */
- WCHAR *worig_name = (WCHAR *) orig_name;
+ WCHAR *worig_name = (WCHAR *) orig_name;
+ ensure_wpath(state, &worig_name);
/* Don't allow wildcards to be interpreted by system */
- if (wcspbrk(worig_name, L"?*")) {
- enoent:
- errInfo->posix_errno = ENOENT;
- errInfo->os_errno = ERROR_FILE_NOT_FOUND;
- return 0;
- }
/*
* Move the name to a buffer and make sure to remove a trailing
* slash, because it causes FindFirstFile() to fail on Win95.
*/
- if ((name_len = wcslen(worig_name)) >= _MAX_PATH) {
- goto enoent;
- } else {
- wcscpy(name, worig_name);
- if (name_len > 2 && ISSLASH(name[name_len-1]) &&
- name[name_len-2] != L':') {
- name[name_len-1] = L'\0';
- }
+ name_len = wcslen(worig_name);
+
+ name = wpath_tmp_alloc(state, name_len+1);
+ wcscpy(name, worig_name);
+ if (name_len > 2 && ISSLASH(name[name_len-1]) &&
+ name[name_len-2] != L':') {
+ name[name_len-1] = L'\0';
}
-
+
+ win_path = name;
+ if (wcsncmp(name, L"\\\\?\\", 4) == 0) {
+ win_path += 4;
+ }
+
+ if (wcspbrk(win_path, L"?*")) {
+ enoent:
+ errInfo->posix_errno = ENOENT;
+ errInfo->os_errno = ERROR_FILE_NOT_FOUND;
+ return 0;
+ }
+
/* Try to get disk from name. If none, get current disk. */
- if (name[1] != L':') {
+ if (win_path[1] != L':') {
+ WCHAR* cwd_path = get_cwd_wpath_tmp(state);
drive = 0;
- if (GetCurrentDirectoryW(_MAX_PATH, pathbuf) &&
- pathbuf[1] == L':') {
- drive = towlower(pathbuf[0]) - L'a' + 1;
+ if (cwd_path[1] == L':') {
+ drive = towlower(cwd_path[0]) - L'a' + 1;
}
- } else if (*name && name[2] == L'\0') {
+ } else if (*win_path && win_path[2] == L'\0') {
/*
* X: and nothing more is an error.
*/
errInfo->posix_errno = ENOENT;
errInfo->os_errno = ERROR_FILE_NOT_FOUND;
return 0;
- } else
- drive = towlower(*name) - L'a' + 1;
+ } else {
+ drive = towlower(*win_path) - L'a' + 1;
+ }
findhandle = FindFirstFileW(name, &findbuf);
if (findhandle == INVALID_HANDLE_VALUE) {
+ WCHAR* path = NULL;
+
if (!(wcspbrk(name, L"./\\") &&
- (path = _wfullpath(pathbuf, name, _MAX_PATH)) &&
+ (path = get_full_wpath_tmp(state, name, NULL, 0)) &&
/* root dir. ('C:\') or UNC root dir. ('\\server\share\') */
((wcslen(path) == 3) || is_root_unc_name(path)) &&
(GetDriveTypeW(path) > 1) ) ) {
+
errInfo->posix_errno = ENOENT;
errInfo->os_errno = ERROR_FILE_NOT_FOUND;
return 0;
@@ -898,13 +1276,11 @@ efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
/*
* given that we know this is a symlink,
we should be able to find its target */
- WCHAR target_name[_MAX_PATH];
- if (efile_readlink(errInfo, (char *) name,
- (char *) target_name,
- _MAX_PATH * sizeof(WCHAR)) == 1) {
+ WCHAR* target_name = (WCHAR*) do_readlink(state, (char *) name, NULL, 0);
+ if (target_name) {
FindClose(findhandle);
- return efile_fileinfo(errInfo, pInfo,
- (char *) target_name, info_for_link);
+ return do_fileinfo(state, pInfo,
+ (char *) target_name, info_for_link);
}
}
@@ -912,6 +1288,10 @@ efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
{
HANDLE handle; /* Handle returned by CreateFile() */
BY_HANDLE_FILE_INFORMATION fileInfo; /* from CreateFile() */
+
+ /* We initialise nNumberOfLinks as GetFileInformationByHandle
+ does not always initialise this field */
+ fileInfo.nNumberOfLinks = 1;
if (handle = CreateFileW(name, GENERIC_READ, FILE_SHARE_FLAGS, NULL,
OPEN_EXISTING, 0, NULL)) {
GetFileInformationByHandle(handle, &fileInfo);
@@ -971,6 +1351,20 @@ efile_write_info(Efile_error* errInfo,
Efile_info* pInfo,
char* name)
{
+ Efile_call_state state;
+ int ret;
+ call_state_init(&state, errInfo);
+ ret = do_write_info(&state, pInfo, name);
+ call_state_free(&state);
+ return ret;
+}
+
+static int
+do_write_info(Efile_call_state* state,
+ Efile_info* pInfo,
+ char* name)
+{
+ Efile_error* errInfo = state->errInfo;
SYSTEMTIME timebuf;
FILETIME ModifyFileTime;
FILETIME AccessFileTime;
@@ -980,6 +1374,10 @@ efile_write_info(Efile_error* errInfo,
DWORD tempAttr;
WCHAR *wname = (WCHAR *) name;
+ DBG_TRACE(1, name);
+
+ ensure_wpath(state, &wname);
+
/*
* Get the attributes for the file.
*/
@@ -1056,7 +1454,9 @@ char* buf; /* Buffer to write. */
size_t count; /* Number of bytes to write. */
Sint64 offset; /* where to write it */
{
- int res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
+ int res;
+ DBG_TRACE(2, L"");
+ res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
if (res) {
return efile_write(errInfo, EFILE_MODE_WRITE, fd, buf, count);
} else {
@@ -1074,7 +1474,9 @@ char* buf; /* Buffer to read into. */
size_t count; /* Number of bytes to read. */
size_t* pBytesRead; /* Where to return number of bytes read. */
{
- int res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
+ int res;
+ DBG_TRACE(2, L"");
+ res = efile_seek(errInfo, fd, offset, EFILE_SEEK_SET, NULL);
if (res) {
return efile_read(errInfo, EFILE_MODE_READ, fd, buf, count, pBytesRead);
} else {
@@ -1096,6 +1498,7 @@ size_t count; /* Number of bytes to write. */
OVERLAPPED overlapped;
OVERLAPPED* pOverlapped = NULL;
+ DBG_TRACE(2, L"");
if (flags & EFILE_MODE_APPEND) {
memset(&overlapped, 0, sizeof(overlapped));
overlapped.Offset = 0xffffffff;
@@ -1125,6 +1528,7 @@ efile_writev(Efile_error* errInfo, /* Where to return error codes */
OVERLAPPED overlapped;
OVERLAPPED* pOverlapped = NULL;
+ DBG_TRACE(2, L"");
ASSERT(iovcnt >= 0);
if (flags & EFILE_MODE_APPEND) {
@@ -1161,6 +1565,8 @@ size_t count; /* Number of bytes to read. */
size_t* pBytesRead; /* Where to return number of bytes read. */
{
DWORD nbytes = 0;
+
+ DBG_TRACE(2, L"");
if (!ReadFile((HANDLE) fd, buf, count, &nbytes, NULL))
return set_error(errInfo);
@@ -1180,6 +1586,7 @@ Sint64* new_location; /* Resulting new location in file. */
{
LARGE_INTEGER off, new_loc;
+ DBG_TRACE(2, L"");
switch (origin) {
case EFILE_SEEK_SET: origin = FILE_BEGIN; break;
case EFILE_SEEK_CUR: origin = FILE_CURRENT; break;
@@ -1211,6 +1618,7 @@ Efile_error* errInfo; /* Where to return error codes. */
int *fd; /* File descriptor for file to truncate. */
int flags;
{
+ DBG_TRACE(2, L"");
if (!SetEndOfFile((HANDLE) (*fd)))
return set_error(errInfo);
return 1;
@@ -1363,9 +1771,24 @@ dos_to_posix_mode(int attr, const WCHAR *name)
return uxmode;
}
+
int
efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(1, name);
+ call_state_init(&state, errInfo);
+ ret = !!do_readlink(&state, name, buffer, size);
+ call_state_free(&state);
+ return ret;
+}
+
+/* If buffer==0, return buffer allocated by wpath_tmp_allocate
+*/
+static char*
+do_readlink(Efile_call_state* state, char* name, char* buffer, size_t size)
+{
/*
* load dll and see if we have CreateSymbolicLink at runtime:
* (Vista only)
@@ -1373,6 +1796,9 @@ efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
HINSTANCE hModule = NULL;
WCHAR *wname = (WCHAR *) name;
WCHAR *wbuffer = (WCHAR *) buffer;
+ DWORD wsize = size / sizeof(WCHAR);
+ char* ret = NULL;
+
if ((hModule = LoadLibrary("kernel32.dll")) != NULL) {
typedef DWORD (WINAPI * GETFINALPATHNAMEBYHANDLEPTR)(
HANDLE hFile,
@@ -1383,58 +1809,84 @@ efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
GETFINALPATHNAMEBYHANDLEPTR pGetFinalPathNameByHandle =
(GETFINALPATHNAMEBYHANDLEPTR)GetProcAddress(hModule, "GetFinalPathNameByHandleW");
- if (pGetFinalPathNameByHandle == NULL) {
- FreeLibrary(hModule);
- } else {
+ if (pGetFinalPathNameByHandle != NULL) {
+ DWORD fileAttributes;
+ ensure_wpath(state, &wname);
/* first check if file is a symlink; {error, einval} otherwise */
- DWORD fileAttributes = GetFileAttributesW(wname);
+ fileAttributes = GetFileAttributesW(wname);
if ((fileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
- BOOLEAN success = 0;
+ DWORD success = 0;
HANDLE h = CreateFileW(wname, GENERIC_READ, FILE_SHARE_FLAGS, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
int len;
if(h != INVALID_HANDLE_VALUE) {
- success = pGetFinalPathNameByHandle(h, wbuffer, size / sizeof(WCHAR),0);
- /* GetFinalPathNameByHandle prepends path with "\\?\": */
- len = wcslen(wbuffer);
- wmemmove(wbuffer,wbuffer+4,len-3);
- if (len - 4 >= 2 && wbuffer[1] == L':' && wbuffer[0] >= L'A' &&
- wbuffer[0] <= L'Z') {
- wbuffer[0] = wbuffer[0] + L'a' - L'A';
+ if (!wbuffer) { /* dynamic allocation */
+ WCHAR dummy;
+ wsize = pGetFinalPathNameByHandle(h, &dummy, 0, 0);
+ if (wsize) {
+ wbuffer = wpath_tmp_alloc(state, wsize);
+ }
}
+ if (wbuffer
+ && (success = pGetFinalPathNameByHandle(h, wbuffer, wsize, 0))
+ && success < wsize) {
+ WCHAR* wp;
+
+ /* GetFinalPathNameByHandle prepends path with "\\?\": */
+ len = wcslen(wbuffer);
+ wmemmove(wbuffer,wbuffer+4,len-3);
+ if (len - 4 >= 2 && wbuffer[1] == L':' && wbuffer[0] >= L'A' &&
+ wbuffer[0] <= L'Z') {
+ wbuffer[0] = wbuffer[0] + L'a' - L'A';
+ }
- for ( ; *wbuffer; wbuffer++)
- if (*wbuffer == L'\\')
- *wbuffer = L'/';
+ for (wp=wbuffer ; *wp; wp++)
+ if (*wp == L'\\')
+ *wp = L'/';
+ }
CloseHandle(h);
- }
- FreeLibrary(hModule);
+ }
if (success) {
- return 1;
+ ret = (char*) wbuffer;
} else {
- return set_error(errInfo);
+ set_error(state->errInfo);
}
} else {
- FreeLibrary(hModule);
errno = EINVAL;
- return check_error(-1, errInfo);
+ save_last_error(state->errInfo);
}
+ goto done;
}
}
errno = ENOTSUP;
- return check_error(-1, errInfo);
+ save_last_error(state->errInfo);
+
+done:
+ if (hModule)
+ FreeLibrary(hModule);
+ return ret;
}
int
efile_altname(Efile_error* errInfo, char* orig_name, char* buffer, size_t size)
{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE(1, orig_name);
+ call_state_init(&state, errInfo);
+ ret = do_altname(&state, orig_name, buffer, size);
+ call_state_free(&state);
+ return ret;
+}
+
+static int
+do_altname(Efile_call_state* state, char* orig_name, char* buffer, size_t size)
+{
WIN32_FIND_DATAW wfd;
HANDLE fh;
- WCHAR name[_MAX_PATH+1];
+ WCHAR* name;
int name_len;
- WCHAR* path;
- WCHAR pathbuf[_MAX_PATH+1]; /* Unclear weather GetCurrentDirectory will access one char after
- _MAX_PATH */
+ WCHAR* full_path = NULL;
WCHAR *worig_name = (WCHAR *) orig_name;
WCHAR *wbuffer = (WCHAR *) buffer;
int drive; /* Drive for filename (1 = A:, 2 = B: etc). */
@@ -1443,8 +1895,8 @@ efile_altname(Efile_error* errInfo, char* orig_name, char* buffer, size_t size)
if (wcspbrk(worig_name, L"?*")) {
enoent:
- errInfo->posix_errno = ENOENT;
- errInfo->os_errno = ERROR_FILE_NOT_FOUND;
+ state->errInfo->posix_errno = ENOENT;
+ state->errInfo->os_errno = ERROR_FILE_NOT_FOUND;
return 0;
}
@@ -1452,24 +1904,23 @@ efile_altname(Efile_error* errInfo, char* orig_name, char* buffer, size_t size)
* Move the name to a buffer and make sure to remove a trailing
* slash, because it causes FindFirstFile() to fail on Win95.
*/
-
- if ((name_len = wcslen(worig_name)) >= _MAX_PATH) {
- goto enoent;
- } else {
- wcscpy(name, worig_name);
- if (name_len > 2 && ISSLASH(name[name_len-1]) &&
- name[name_len-2] != L':') {
- name[name_len-1] = L'\0';
- }
+ ensure_wpath(state, &worig_name);
+ name_len = wcslen(worig_name);
+
+ name = wpath_tmp_alloc(state, name_len + 1);
+ wcscpy(name, worig_name);
+ if (name_len > 2 && ISSLASH(name[name_len-1]) &&
+ name[name_len-2] != L':') {
+ name[name_len-1] = L'\0';
}
/* Try to get disk from name. If none, get current disk. */
if (name[1] != L':') {
+ WCHAR* cwd_path = get_cwd_wpath_tmp(state);
drive = 0;
- if (GetCurrentDirectoryW(_MAX_PATH, pathbuf) &&
- pathbuf[1] == L':') {
- drive = towlower(pathbuf[0]) - L'a' + 1;
+ if (cwd_path[1] == L':') {
+ drive = towlower(cwd_path[0]) - L'a' + 1;
}
} else if (*name && name[2] == L'\0') {
/*
@@ -1481,13 +1932,15 @@ efile_altname(Efile_error* errInfo, char* orig_name, char* buffer, size_t size)
}
fh = FindFirstFileW(name,&wfd);
if (fh == INVALID_HANDLE_VALUE) {
+ DWORD fff_error = GetLastError();
if (!(wcspbrk(name, L"./\\") &&
- (path = _wfullpath(pathbuf, name, _MAX_PATH)) &&
+ (full_path = get_full_wpath_tmp(state, name, NULL, 0)) &&
/* root dir. ('C:\') or UNC root dir. ('\\server\share\') */
- ((wcslen(path) == 3) || is_root_unc_name(path)) &&
- (GetDriveTypeW(path) > 1) ) ) {
- errno = errno_map(GetLastError());
- return check_error(-1, errInfo);
+ ((wcslen(full_path) == 3) || is_root_unc_name(full_path)) &&
+ (GetDriveTypeW(full_path) > 1) ) ) {
+
+ set_os_errno(state->errInfo, fff_error);
+ return 0;
}
/*
* Root directories (such as C:\ or \\server\share\ are fabricated.
@@ -1508,17 +1961,37 @@ efile_altname(Efile_error* errInfo, char* orig_name, char* buffer, size_t size)
int
efile_link(Efile_error* errInfo, char* old, char* new)
{
+ Efile_call_state state;
WCHAR *wold = (WCHAR *) old;
WCHAR *wnew = (WCHAR *) new;
+ int ret;
+ DBG_TRACE(1, old);
+ call_state_init(&state, errInfo);
+ ensure_wpath(&state, &wold);
+ ensure_wpath(&state, &wnew);
if(!CreateHardLinkW(wnew, wold, NULL)) {
- return set_error(errInfo);
+ ret = set_error(errInfo);
}
- return 1;
+ else ret =1;
+ call_state_free(&state);
+ return ret;
}
int
efile_symlink(Efile_error* errInfo, char* old, char* new)
{
+ Efile_call_state state;
+ int ret;
+ DBG_TRACE2(1, "symlink(%s <- %s)", old, new);
+ call_state_init(&state, errInfo);
+ ret = do_symlink(&state, old, new);
+ call_state_free(&state);
+ return ret;
+}
+
+static int
+do_symlink(Efile_call_state* state, char* old, char* new)
+{
/*
* Load dll and see if we have CreateSymbolicLink at runtime:
* (Vista only)
@@ -1526,6 +1999,8 @@ efile_symlink(Efile_error* errInfo, char* old, char* new)
HINSTANCE hModule = NULL;
WCHAR *wold = (WCHAR *) old;
WCHAR *wnew = (WCHAR *) new;
+
+ DBG_TRACE(1, old);
if ((hModule = LoadLibrary("kernel32.dll")) != NULL) {
typedef BOOLEAN (WINAPI * CREATESYMBOLICLINKFUNCPTR) (
LPCWSTR lpSymlinkFileName,
@@ -1537,6 +2012,9 @@ efile_symlink(Efile_error* errInfo, char* old, char* new)
"CreateSymbolicLinkW");
/* A for MBCS, W for UNICODE... char* above implies 'W'! */
if (pCreateSymbolicLink != NULL) {
+ ensure_wpath(state, &wold);
+ ensure_wpath(state, &wnew);
+ {
DWORD attr = GetFileAttributesW(wold);
int flag = (attr != INVALID_FILE_ATTRIBUTES &&
attr & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0;
@@ -1547,19 +2025,21 @@ efile_symlink(Efile_error* errInfo, char* old, char* new)
if (success) {
return 1;
} else {
- return set_error(errInfo);
+ return set_error(state->errInfo);
}
+ }
} else
FreeLibrary(hModule);
}
errno = ENOTSUP;
- return check_error(-1, errInfo);
+ return check_error(-1, state->errInfo);
}
int
efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset,
Sint64 length, int advise)
{
+ DBG_TRACE(2, L"");
/* posix_fadvise is not available on Windows, do nothing */
errno = ERROR_SUCCESS;
return check_error(0, errInfo);
@@ -1568,6 +2048,7 @@ efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset,
int
efile_fallocate(Efile_error* errInfo, int fd, Sint64 offset, Sint64 length)
{
+ DBG_TRACE(2, L"");
/* No file preallocation method available in Windows. */
errno = errno_map(ERROR_NOT_SUPPORTED);
SetLastError(ERROR_NOT_SUPPORTED);
diff --git a/erts/emulator/hipe/hipe_amd64_bifs.m4 b/erts/emulator/hipe/hipe_amd64_bifs.m4
index 0de69a617f..a3219c7586 100644
--- a/erts/emulator/hipe/hipe_amd64_bifs.m4
+++ b/erts/emulator/hipe/hipe_amd64_bifs.m4
@@ -39,7 +39,10 @@ define(HANDLE_GOT_MBUF,`
jmp 2b')
`#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP)
-# define CALL_BIF(F) movq $CSYM(F), P_BIF_CALLEE(P); call CSYM(hipe_debug_bif_wrapper)
+# define CALL_BIF(F) \
+ movq CSYM(F)@GOTPCREL(%rip), %r11; \
+ movq %r11, P_BIF_CALLEE(P); \
+ call CSYM(hipe_debug_bif_wrapper)
#else
# define CALL_BIF(F) call CSYM(F)
#endif'
diff --git a/erts/emulator/hipe/hipe_arm_bifs.m4 b/erts/emulator/hipe/hipe_arm_bifs.m4
index bd8bc5ab6b..3ca9a1bcdb 100644
--- a/erts/emulator/hipe/hipe_arm_bifs.m4
+++ b/erts/emulator/hipe/hipe_arm_bifs.m4
@@ -25,6 +25,7 @@ include(`hipe/hipe_arm_asm.m4')
.text
.p2align 2
+ .arm
`#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP)
# define CALL_BIF(F) ldr r14, =F; str r14, [r0, #P_BIF_CALLEE]; bl hipe_debug_bif_wrapper
@@ -391,7 +392,14 @@ $1:
mov r0, P
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(0)
+#else
QUICK_CALL_RET($2,0)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -407,7 +415,14 @@ $1:
NBIF_ARG(r1,1,0)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(1)
+#else
QUICK_CALL_RET($2,1)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -424,7 +439,14 @@ $1:
NBIF_ARG(r2,2,1)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(2)
+#else
QUICK_CALL_RET($2,2)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -442,7 +464,14 @@ $1:
NBIF_ARG(r3,3,2)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(3)
+#else
QUICK_CALL_RET($2,3)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -466,7 +495,14 @@ $1:
NBIF_ARG(r3,5,2)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(5)
+#else
QUICK_CALL_RET($2,5)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -488,9 +524,16 @@ define(noproc_primop_interface_0,
#`define' HAVE_$1
.global $1
$1:
- /* XXX: this case is always trivial; how to suppress the branch? */
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(0)
+#else
+ /* XXX: this case is always trivial; how to suppress the branch? */
QUICK_CALL_RET($2,0)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -505,7 +548,14 @@ $1:
NBIF_ARG(r0,1,0)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(1)
+#else
QUICK_CALL_RET($2,1)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -521,7 +571,14 @@ $1:
NBIF_ARG(r1,2,1)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(2)
+#else
QUICK_CALL_RET($2,2)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -538,7 +595,14 @@ $1:
NBIF_ARG(r2,3,2)
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(3)
+#else
QUICK_CALL_RET($2,3)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
@@ -558,7 +622,14 @@ $1:
str r4, [sp, #0]
/* Perform a quick save;call;restore;ret sequence. */
+#ifdef __thumb__
+ SAVE_CONTEXT_QUICK
+ bl $2
+ RESTORE_CONTEXT_QUICK
+ NBIF_RET(5)
+#else
QUICK_CALL_RET($2,5)
+#endif
.size $1, .-$1
.type $1, %function
#endif')
diff --git a/erts/emulator/hipe/hipe_arm_glue.S b/erts/emulator/hipe/hipe_arm_glue.S
index 2e2b8604a6..5723afac12 100644
--- a/erts/emulator/hipe/hipe_arm_glue.S
+++ b/erts/emulator/hipe/hipe_arm_glue.S
@@ -25,6 +25,7 @@
.text
.p2align 2
+ .arm
/*
* Enter Erlang from C.
@@ -70,6 +71,7 @@
* Emulated code recursively calls native code.
*/
.global hipe_arm_call_to_native
+ .type hipe_arm_call_to_native, %function
hipe_arm_call_to_native:
ENTER_FROM_C
/* get argument registers */
@@ -85,6 +87,7 @@ hipe_arm_call_to_native:
* This is where native code returns to emulated code.
*/
.global nbif_return
+ .type nbif_return, %function
nbif_return:
str r0, [P, #P_ARG0] /* save retval */
mov r0, #HIPE_MODE_SWITCH_RES_RETURN
@@ -95,6 +98,7 @@ nbif_return:
* Emulated code returns to its native code caller.
*/
.global hipe_arm_return_to_native
+ .type hipe_arm_return_to_native, %function
hipe_arm_return_to_native:
ENTER_FROM_C
/* get return value */
@@ -111,6 +115,7 @@ hipe_arm_return_to_native:
* Emulated code tailcalls native code.
*/
.global hipe_arm_tailcall_to_native
+ .type hipe_arm_tailcall_to_native, %function
hipe_arm_tailcall_to_native:
ENTER_FROM_C
/* get argument registers */
@@ -125,6 +130,7 @@ hipe_arm_tailcall_to_native:
* Emulated code throws an exception to its native code caller.
*/
.global hipe_arm_throw_to_native
+ .type hipe_arm_throw_to_native, %function
hipe_arm_throw_to_native:
ENTER_FROM_C
/* invoke the handler */
@@ -142,6 +148,7 @@ hipe_arm_throw_to_native:
* XXX: Different stubs for different number of register parameters?
*/
.global nbif_callemu
+ .type nbif_callemu, %function
nbif_callemu:
str r8, [P, #P_BEAM_IP]
str r0, [P, #P_ARITY]
@@ -153,6 +160,7 @@ nbif_callemu:
* nbif_apply
*/
.global nbif_apply
+ .type nbif_apply, %function
nbif_apply:
STORE_ARG_REGS
mov r0, #HIPE_MODE_SWITCH_RES_APPLY
@@ -169,6 +177,7 @@ nbif_apply:
*/
#if NR_ARG_REGS >= 6
.global nbif_ccallemu6
+ .type nbif_ccallemu6, %function
nbif_ccallemu6:
str ARG5, [P, #P_ARG5]
#if NR_ARG_REGS > 6
@@ -181,6 +190,7 @@ nbif_ccallemu6:
#if NR_ARG_REGS >= 5
.global nbif_ccallemu5
+ .type nbif_ccallemu5, %function
nbif_ccallemu5:
str ARG4, [P, #P_ARG4]
#if NR_ARG_REGS > 5
@@ -193,6 +203,7 @@ nbif_ccallemu5:
#if NR_ARG_REGS >= 4
.global nbif_ccallemu4
+ .type nbif_ccallemu4, %function
nbif_ccallemu4:
str ARG3, [P, #P_ARG3]
#if NR_ARG_REGS > 4
@@ -205,6 +216,7 @@ nbif_ccallemu4:
#if NR_ARG_REGS >= 3
.global nbif_ccallemu3
+ .type nbif_ccallemu3, %function
nbif_ccallemu3:
str ARG2, [P, #P_ARG2]
#if NR_ARG_REGS > 3
@@ -217,6 +229,7 @@ nbif_ccallemu3:
#if NR_ARG_REGS >= 2
.global nbif_ccallemu2
+ .type nbif_ccallemu2, %function
nbif_ccallemu2:
str ARG1, [P, #P_ARG1]
#if NR_ARG_REGS > 2
@@ -229,6 +242,7 @@ nbif_ccallemu2:
#if NR_ARG_REGS >= 1
.global nbif_ccallemu1
+ .type nbif_ccallemu1, %function
nbif_ccallemu1:
str ARG0, [P, #P_ARG0]
#if NR_ARG_REGS > 1
@@ -240,6 +254,7 @@ nbif_ccallemu1:
#endif
.global nbif_ccallemu0
+ .type nbif_ccallemu0, %function
nbif_ccallemu0:
/* We use r1 not ARG0 here because ARG0 is not
defined when NR_ARG_REGS == 0. */
@@ -254,6 +269,7 @@ nbif_ccallemu0:
* This is where native code suspends.
*/
.global nbif_suspend_0
+ .type nbif_suspend_0, %function
nbif_suspend_0:
mov r0, #HIPE_MODE_SWITCH_RES_SUSPEND
b .suspend_exit
@@ -262,6 +278,7 @@ nbif_suspend_0:
* Suspend from a receive (waiting for a message)
*/
.global nbif_suspend_msg
+ .type nbif_suspend_msg, %function
nbif_suspend_msg:
mov r0, #HIPE_MODE_SWITCH_RES_WAIT
b .suspend_exit
@@ -272,6 +289,7 @@ nbif_suspend_msg:
* else { return 0; }
*/
.global nbif_suspend_msg_timeout
+ .type nbif_suspend_msg_timeout, %function
nbif_suspend_msg_timeout:
ldr r1, [P, #P_FLAGS]
mov r0, #HIPE_MODE_SWITCH_RES_WAIT_TIMEOUT
@@ -286,23 +304,31 @@ nbif_suspend_msg_timeout:
* This is the default exception handler for native code.
*/
.global nbif_fail
+ .type nbif_fail, %function
nbif_fail:
mov r0, #HIPE_MODE_SWITCH_RES_THROW
b .flush_exit /* no need to save RA */
.global nbif_0_gc_after_bif
- .global nbif_1_gc_after_bif
- .global nbif_2_gc_after_bif
- .global nbif_3_gc_after_bif
+ .type nbif_0_gc_after_bif, %function
nbif_0_gc_after_bif:
mov r1, #0
b .gc_after_bif
+
+ .global nbif_1_gc_after_bif
+ .type nbif_1_gc_after_bif, %function
nbif_1_gc_after_bif:
mov r1, #1
b .gc_after_bif
+
+ .global nbif_2_gc_after_bif
+ .type nbif_2_gc_after_bif, %function
nbif_2_gc_after_bif:
mov r1, #2
b .gc_after_bif
+
+ .global nbif_3_gc_after_bif
+ .type nbif_3_gc_after_bif, %function
nbif_3_gc_after_bif:
mov r1, #3
/*FALLTHROUGH*/
@@ -330,18 +356,25 @@ nbif_3_gc_after_bif:
* TEMP_LR contains a copy of LR
*/
.global nbif_0_simple_exception
+ .type nbif_0_simple_exception, %function
nbif_0_simple_exception:
mov r1, #0
b .nbif_simple_exception
+
.global nbif_1_simple_exception
+ .type nbif_1_simple_exception, %function
nbif_1_simple_exception:
mov r1, #1
b .nbif_simple_exception
+
.global nbif_2_simple_exception
+ .type nbif_2_simple_exception, %function
nbif_2_simple_exception:
mov r1, #2
b .nbif_simple_exception
+
.global nbif_3_simple_exception
+ .type nbif_3_simple_exception, %function
nbif_3_simple_exception:
mov r1, #3
/*FALLTHROUGH*/
@@ -385,6 +418,7 @@ nbif_3_simple_exception:
* the gray/white stack boundary
*/
.global nbif_stack_trap_ra
+ .type nbif_stack_trap_ra, %function
nbif_stack_trap_ra: /* a return address, not a function */
# This only handles a single return value.
# If we have more, we need to save them in the PCB.
@@ -401,6 +435,7 @@ nbif_stack_trap_ra: /* a return address, not a function */
* Caller saved its LR in TEMP_LR (== TEMP1) before calling us.
*/
.global hipe_arm_inc_stack
+ .type hipe_arm_inc_stack, %function
hipe_arm_inc_stack:
STORE_ARG_REGS
mov TEMP_ARG0, lr
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index fa99c817f0..8af174170d 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -1022,7 +1022,7 @@ BIF_RETTYPE hipe_conv_big_to_float(BIF_ALIST_1)
*/
void hipe_emulate_fpe(Process* p)
{
- if (!finite(p->hipe.float_result)) {
+ if (!isfinite(p->hipe.float_result)) {
p->fp_exception = 1;
}
}
@@ -1101,9 +1101,9 @@ BIF_RETTYPE hipe_bifs_make_fun_3(BIF_ALIST_3)
#endif
/*
- * args: Nativecodeaddress, Module, {Uniq, Index, BeamAddress}
+ * args: Module, {Uniq, Index, BeamAddress}
*/
-BIF_RETTYPE hipe_bifs_make_fe_3(BIF_ALIST_3)
+BIF_RETTYPE hipe_bifs_get_fe_2(BIF_ALIST_2)
{
Eterm mod;
Uint index;
@@ -1111,20 +1111,15 @@ BIF_RETTYPE hipe_bifs_make_fe_3(BIF_ALIST_3)
void *beam_address;
ErlFunEntry *fe;
Eterm *tp;
- void *native_address;
- native_address = term_to_address(BIF_ARG_1);
- if (!native_address)
+ if (is_not_atom(BIF_ARG_1))
BIF_ERROR(BIF_P, BADARG);
+ mod = BIF_ARG_1;
- if (is_not_atom(BIF_ARG_2))
+ if (is_not_tuple(BIF_ARG_2) ||
+ (arityval(*tuple_val(BIF_ARG_2)) != 3))
BIF_ERROR(BIF_P, BADARG);
- mod = BIF_ARG_2;
-
- if (is_not_tuple(BIF_ARG_3) ||
- (arityval(*tuple_val(BIF_ARG_3)) != 3))
- BIF_ERROR(BIF_P, BADARG);
- tp = tuple_val(BIF_ARG_3);
+ tp = tuple_val(BIF_ARG_2);
if (term_to_Uint(tp[1], &uniq) == 0)
BIF_ERROR(BIF_P, BADARG);
if (term_to_Uint(tp[2], &index) == 0)
@@ -1144,10 +1139,28 @@ BIF_RETTYPE hipe_bifs_make_fe_3(BIF_ALIST_3)
printf("no fun entry for %s %ld:%ld\n", atom_buf, uniq, index);
BIF_ERROR(BIF_P, BADARG);
}
+ BIF_RET(address_to_term((void *)fe, BIF_P));
+}
+
+/*
+ * args: FE, Nativecodeaddress
+ */
+BIF_RETTYPE hipe_bifs_set_native_address_in_fe_2(BIF_ALIST_2)
+{
+ ErlFunEntry *fe;
+ void *native_address;
+
+ fe = (ErlFunEntry *)term_to_address(BIF_ARG_1);
+ if (!fe)
+ BIF_ERROR(BIF_P, BADARG);
+ native_address = term_to_address(BIF_ARG_2);
+ if (!native_address)
+ BIF_ERROR(BIF_P, BADARG);
+
fe->native_address = native_address;
if (erts_refc_dectest(&fe->refc, 0) == 0)
erts_erase_fun_entry(fe);
- BIF_RET(address_to_term((void *)fe, BIF_P));
+ BIF_RET(am_true);
}
#if 0 /* XXX: unused */
@@ -1204,22 +1217,32 @@ static struct {
* they create a new stub for the mfa, which forces locking.
* XXX: Redesign apply et al to avoid those updates.
*/
- erts_smp_mtx_t lock;
+ erts_smp_rwmtx_t lock;
} hipe_mfa_info_table;
static inline void hipe_mfa_info_table_init_lock(void)
{
- erts_smp_mtx_init(&hipe_mfa_info_table.lock, "hipe_mfait_lock");
+ erts_smp_rwmtx_init(&hipe_mfa_info_table.lock, "hipe_mfait_lock");
+}
+
+static inline void hipe_mfa_info_table_rlock(void)
+{
+ erts_smp_rwmtx_rlock(&hipe_mfa_info_table.lock);
+}
+
+static inline void hipe_mfa_info_table_runlock(void)
+{
+ erts_smp_rwmtx_runlock(&hipe_mfa_info_table.lock);
}
-static inline void hipe_mfa_info_table_lock(void)
+static inline void hipe_mfa_info_table_rwlock(void)
{
- erts_smp_mtx_lock(&hipe_mfa_info_table.lock);
+ erts_smp_rwmtx_rwlock(&hipe_mfa_info_table.lock);
}
-static inline void hipe_mfa_info_table_unlock(void)
+static inline void hipe_mfa_info_table_rwunlock(void)
{
- erts_smp_mtx_unlock(&hipe_mfa_info_table.lock);
+ erts_smp_rwmtx_rwunlock(&hipe_mfa_info_table.lock);
}
#define HIPE_MFA_HASH(M,F,A) ((M) * (F) + (A))
@@ -1320,7 +1343,7 @@ void *hipe_mfa_find_na(Eterm m, Eterm f, unsigned int arity)
}
#endif
-static struct hipe_mfa_info *hipe_mfa_info_table_put_locked(Eterm m, Eterm f, unsigned int arity)
+static struct hipe_mfa_info *hipe_mfa_info_table_put_rwlocked(Eterm m, Eterm f, unsigned int arity)
{
unsigned long h;
unsigned int i;
@@ -1349,8 +1372,8 @@ static void hipe_mfa_set_na(Eterm m, Eterm f, unsigned int arity, void *address,
{
struct hipe_mfa_info *p;
- hipe_mfa_info_table_lock();
- p = hipe_mfa_info_table_put_locked(m, f, arity);
+ hipe_mfa_info_table_rwlock();
+ p = hipe_mfa_info_table_put_rwlocked(m, f, arity);
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
print_mfa(m, f, arity);
@@ -1359,7 +1382,7 @@ static void hipe_mfa_set_na(Eterm m, Eterm f, unsigned int arity, void *address,
p->local_address = address;
if (is_exported)
p->remote_address = address;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
}
#if defined(__powerpc__) || defined(__ppc__) || defined(__powerpc64__) || defined(__arm__)
@@ -1368,10 +1391,10 @@ void *hipe_mfa_get_trampoline(Eterm m, Eterm f, unsigned int arity)
struct hipe_mfa_info *p;
void *trampoline;
- hipe_mfa_info_table_lock();
- p = hipe_mfa_info_table_put_locked(m, f, arity);
- trampoline = p->trampoline;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rlock();
+ p = hipe_mfa_info_table_get_locked(m, f, arity);
+ trampoline = p ? p->trampoline : NULL;
+ hipe_mfa_info_table_runlock();
return trampoline;
}
@@ -1379,10 +1402,10 @@ void hipe_mfa_set_trampoline(Eterm m, Eterm f, unsigned int arity, void *trampol
{
struct hipe_mfa_info *p;
- hipe_mfa_info_table_lock();
- p = hipe_mfa_info_table_put_locked(m, f, arity);
+ hipe_mfa_info_table_rwlock();
+ p = hipe_mfa_info_table_put_rwlocked(m, f, arity);
p->trampoline = trampoline;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
}
#endif
@@ -1413,7 +1436,7 @@ BIF_RETTYPE hipe_bifs_invalidate_funinfo_native_addresses_1(BIF_ALIST_1)
struct mfa mfa;
struct hipe_mfa_info *p;
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rwlock();
lst = BIF_ARG_1;
while (is_list(lst)) {
if (!term_to_mfa(CAR(list_val(lst)), &mfa))
@@ -1442,7 +1465,7 @@ BIF_RETTYPE hipe_bifs_invalidate_funinfo_native_addresses_1(BIF_ALIST_1)
}
}
}
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
if (is_not_nil(lst))
BIF_ERROR(BIF_P, BADARG);
BIF_RET(NIL);
@@ -1456,8 +1479,8 @@ void hipe_mfa_save_orig_beam_op(Eterm mod, Eterm fun, unsigned int ari, Eterm *p
orig_beam_op = pc[0];
if (orig_beam_op != BeamOpCode(op_hipe_trap_call_closure) &&
orig_beam_op != BeamOpCode(op_hipe_trap_call)) {
- hipe_mfa_info_table_lock();
- p = hipe_mfa_info_table_put_locked(mod, fun, ari);
+ hipe_mfa_info_table_rwlock();
+ p = hipe_mfa_info_table_put_rwlocked(mod, fun, ari);
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
print_mfa(mod, fun, ari);
@@ -1465,7 +1488,7 @@ void hipe_mfa_save_orig_beam_op(Eterm mod, Eterm fun, unsigned int ari, Eterm *p
#endif
p->beam_code = pc;
p->orig_beam_op = orig_beam_op;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
} else {
#ifdef DEBUG_LINKER
printf("%s: ", __FUNCTION__);
@@ -1492,7 +1515,7 @@ static void *hipe_make_stub(Eterm m, Eterm f, unsigned int arity, int is_remote)
return StubAddress;
}
-static void *hipe_get_na_nofail_locked(Eterm m, Eterm f, unsigned int a, int is_remote)
+static void *hipe_get_na_try_locked(Eterm m, Eterm f, unsigned int a, int is_remote, struct hipe_mfa_info **pp)
{
struct hipe_mfa_info *p;
void *address;
@@ -1510,22 +1533,53 @@ static void *hipe_get_na_nofail_locked(Eterm m, Eterm f, unsigned int a, int is_
address = p->remote_address;
if (address)
return address;
- } else
- p = hipe_mfa_info_table_put_locked(m, f, a);
+ }
+ /* Caller must take the slow path with the write lock held, but allow
+ it to avoid some work if it already holds the write lock. */
+ if (pp)
+ *pp = p;
+ return NULL;
+}
+
+static void *hipe_get_na_slow_rwlocked(Eterm m, Eterm f, unsigned int a, int is_remote, struct hipe_mfa_info *p)
+{
+ void *address;
+
+ if (!p)
+ p = hipe_mfa_info_table_put_rwlocked(m, f, a);
address = hipe_make_stub(m, f, a, is_remote);
/* XXX: how to tell if a BEAM MFA is exported or not? */
p->remote_address = address;
return address;
}
+static void *hipe_get_na_nofail_rwlocked(Eterm m, Eterm f, unsigned int a, int is_remote)
+{
+ struct hipe_mfa_info *p;
+ void *address;
+
+ address = hipe_get_na_try_locked(m, f, a, is_remote, &p);
+ if (address)
+ return address;
+
+ address = hipe_get_na_slow_rwlocked(m, f, a, is_remote, p);
+ return address;
+}
+
static void *hipe_get_na_nofail(Eterm m, Eterm f, unsigned int a, int is_remote)
{
- void *p;
+ void *address;
- hipe_mfa_info_table_lock();
- p = hipe_get_na_nofail_locked(m, f, a, is_remote);
- hipe_mfa_info_table_unlock();
- return p;
+ hipe_mfa_info_table_rlock();
+ address = hipe_get_na_try_locked(m, f, a, is_remote, NULL);
+ hipe_mfa_info_table_runlock();
+ if (address)
+ return address;
+
+ hipe_mfa_info_table_rwlock();
+ address = hipe_get_na_slow_rwlocked(m, f, a, is_remote, NULL);
+ hipe_mfa_info_table_rwunlock();
+ return address;
}
/* used for apply/3 in hipe_mode_switch */
@@ -1604,7 +1658,7 @@ int hipe_find_mfa_from_ra(const void *ra, Eterm *m, Eterm *f, unsigned int *a)
/* Note about locking: the table is only updated from the
loader, which runs with the rest of the system suspended. */
/* XXX: alas not true; see comment at hipe_mfa_info_table.lock */
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rlock();
bucket = hipe_mfa_info_table.bucket;
nrbuckets = 1 << hipe_mfa_info_table.log2size;
mfa = NULL;
@@ -1625,7 +1679,7 @@ int hipe_find_mfa_from_ra(const void *ra, Eterm *m, Eterm *f, unsigned int *a)
*f = mfa->f;
*a = mfa->a;
}
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_runlock();
return mfa ? 1 : 0;
}
@@ -1702,9 +1756,9 @@ BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
default:
goto badarg;
}
- hipe_mfa_info_table_lock();
- callee_mfa = hipe_mfa_info_table_put_locked(callee.mod, callee.fun, callee.ari);
- caller_mfa = hipe_mfa_info_table_put_locked(caller.mod, caller.fun, caller.ari);
+ hipe_mfa_info_table_rwlock();
+ callee_mfa = hipe_mfa_info_table_put_rwlocked(callee.mod, callee.fun, callee.ari);
+ caller_mfa = hipe_mfa_info_table_put_rwlocked(caller.mod, caller.fun, caller.ari);
refers_to = erts_alloc(ERTS_ALC_T_HIPE, sizeof(*refers_to));
refers_to->mfa = callee_mfa;
@@ -1718,7 +1772,7 @@ BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
ref->flags = flags;
ref->next = callee_mfa->referred_from;
callee_mfa->referred_from = ref;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
BIF_RET(NIL);
@@ -1738,12 +1792,12 @@ BIF_RETTYPE hipe_bifs_mark_referred_from_1(BIF_ALIST_1) /* get_refs_from */
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rwlock();
p = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (p)
for (ref = p->referred_from; ref != NULL; ref = ref->next)
ref->flags |= REF_FLAG_PENDING_REDIRECT;
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
BIF_RET(NIL);
}
@@ -1757,7 +1811,7 @@ static void hipe_purge_all_refs(void)
struct hipe_mfa_info **bucket;
unsigned int i, nrbuckets;
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rwlock();
bucket = hipe_mfa_info_table.bucket;
nrbuckets = 1 << hipe_mfa_info_table.log2size;
@@ -1779,7 +1833,7 @@ static void hipe_purge_all_refs(void)
erts_free(ERTS_ALC_T_HIPE, mfa);
}
}
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
}
BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
@@ -1796,7 +1850,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rwlock();
caller_mfa = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (caller_mfa) {
refers_to = caller_mfa->refers_to;
@@ -1827,7 +1881,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
}
caller_mfa->refers_to = NULL;
}
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
BIF_RET(am_ok);
}
@@ -1846,7 +1900,7 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
- hipe_mfa_info_table_lock();
+ hipe_mfa_info_table_rwlock();
p = hipe_mfa_info_table_get_locked(mfa.mod, mfa.fun, mfa.ari);
if (p) {
prev = &p->referred_from;
@@ -1854,7 +1908,7 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
while (ref) {
if (ref->flags & REF_FLAG_PENDING_REDIRECT) {
is_remote = ref->flags & REF_FLAG_IS_REMOTE;
- new_address = hipe_get_na_nofail_locked(p->m, p->f, p->a, is_remote);
+ new_address = hipe_get_na_nofail_rwlocked(p->m, p->f, p->a, is_remote);
if (ref->flags & REF_FLAG_IS_LOAD_MFA)
res = hipe_patch_insn(ref->address, (Uint)new_address, am_load_mfa);
else
@@ -1877,7 +1931,7 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
}
}
}
- hipe_mfa_info_table_unlock();
+ hipe_mfa_info_table_rwunlock();
BIF_RET(NIL);
}
diff --git a/erts/emulator/hipe/hipe_bif0.tab b/erts/emulator/hipe/hipe_bif0.tab
index ce641365e9..2514b1c3a5 100644
--- a/erts/emulator/hipe/hipe_bif0.tab
+++ b/erts/emulator/hipe/hipe_bif0.tab
@@ -69,7 +69,8 @@ bif hipe_bifs:atom_to_word/1
bif hipe_bifs:term_to_word/1
#bif hipe_bifs:make_fun/3
-bif hipe_bifs:make_fe/3
+bif hipe_bifs:get_fe/2
+bif hipe_bifs:set_native_address_in_fe/2
#bif hipe_bifs:make_native_stub/2
bif hipe_bifs:find_na_or_make_stub/2
diff --git a/erts/emulator/hipe/hipe_bif2.c b/erts/emulator/hipe/hipe_bif2.c
index e09988e2c5..054911e822 100644
--- a/erts/emulator/hipe/hipe_bif2.c
+++ b/erts/emulator/hipe/hipe_bif2.c
@@ -31,6 +31,7 @@
#include "erl_process.h"
#include "bif.h"
#include "big.h"
+#include "erl_map.h"
#include "hipe_debug.h"
#include "hipe_mode_switch.h"
#include "hipe_arch.h"
@@ -156,7 +157,8 @@ BIF_RETTYPE hipe_bifs_modeswitch_debug_off_0(BIF_ALIST_0)
BIF_RETTYPE hipe_debug_bif_wrapper(BIF_ALIST_1);
# define ERTS_SMP_REQ_PROC_MAIN_LOCK(P) \
- if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN)
+ if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN,\
+ __FILE__, __LINE__)
# define ERTS_SMP_UNREQ_PROC_MAIN_LOCK(P) \
if ((P)) erts_proc_lc_unrequire_lock((P), ERTS_PROC_LOCK_MAIN)
@@ -180,3 +182,10 @@ BIF_RETTYPE hipe_bifs_debug_native_called_2(BIF_ALIST_2)
BIF_RET(am_ok);
}
+/* Stub-BIF for LLVM:
+ * Reloads BP, SP (in llvm unwind label) */
+
+BIF_RETTYPE hipe_bifs_llvm_fix_pinned_regs_0(BIF_ALIST_0)
+{
+ BIF_RET(am_ok);
+}
diff --git a/erts/emulator/hipe/hipe_bif2.tab b/erts/emulator/hipe/hipe_bif2.tab
index 45a395bf57..1b659cfa90 100644
--- a/erts/emulator/hipe/hipe_bif2.tab
+++ b/erts/emulator/hipe/hipe_bif2.tab
@@ -30,3 +30,4 @@ bif hipe_bifs:in_native/0
bif hipe_bifs:modeswitch_debug_on/0
bif hipe_bifs:modeswitch_debug_off/0
bif hipe_bifs:debug_native_called/2
+bif hipe_bifs:llvm_fix_pinned_regs/0
diff --git a/erts/emulator/hipe/hipe_bif_list.m4 b/erts/emulator/hipe/hipe_bif_list.m4
index 764b8d180c..5f92b6bac4 100644
--- a/erts/emulator/hipe/hipe_bif_list.m4
+++ b/erts/emulator/hipe/hipe_bif_list.m4
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2004-2012. All Rights Reserved.
+ * Copyright Ericsson AB 2004-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -151,10 +151,9 @@ standard_bif_interface_0(nbif_ports_0, ports_0)
* BIFs and primops that may do a GC (change heap limit and walk the native stack).
* XXX: erase/1 and put/2 cannot fail
*/
-gc_bif_interface_2(nbif_check_process_code_2, hipe_check_process_code_2)
+gc_bif_interface_2(nbif_erts_internal_check_process_code_2, hipe_erts_internal_check_process_code_2)
gc_bif_interface_1(nbif_erase_1, erase_1)
gc_bif_interface_0(nbif_garbage_collect_0, garbage_collect_0)
-gc_bif_interface_1(nbif_garbage_collect_1, hipe_garbage_collect_1)
gc_nofail_primop_interface_1(nbif_gc_1, hipe_gc)
gc_bif_interface_2(nbif_put_2, put_2)
@@ -263,7 +262,24 @@ noproc_primop_interface_1(nbif_atomic_inc, hipe_atomic_inc)
* Standard BIFs.
* BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index)
*/
-define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)')
+
+/* BIFs that disable GC while trapping are called via a wrapper
+ * to reserve stack space for the "trap frame".
+ */
+define(CFUN,`ifelse($1,term_to_binary_1,hipe_wrapper_term_to_binary_1,
+ifelse($1,term_to_binary_2,hipe_wrapper_term_to_binary_2,
+ifelse($1,binary_to_term_1,hipe_wrapper_binary_to_term_1,
+ifelse($1,binary_to_term_2,hipe_wrapper_binary_to_term_2,
+ifelse($1,binary_to_list_1,hipe_wrapper_binary_to_list_1,
+ifelse($1,binary_to_list_3,hipe_wrapper_binary_to_list_3,
+ifelse($1,bitstring_to_list_1,hipe_wrapper_bitstring_to_list_1,
+ifelse($1,list_to_binary_1,hipe_wrapper_list_to_binary_1,
+ifelse($1,iolist_to_binary_1,hipe_wrapper_iolist_to_binary_1,
+ifelse($1,binary_list_to_bin_1,hipe_wrapper_binary_list_to_bin_1,
+ifelse($1,list_to_bitstring_1,hipe_wrapper_list_to_bitstring_1,
+$1)))))))))))')
+
+define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, CFUN($4))')
include(TARGET/`erl_bif_list.h')
/*
diff --git a/erts/emulator/hipe/hipe_debug.c b/erts/emulator/hipe/hipe_debug.c
index bf25ba82af..32694a8f97 100644
--- a/erts/emulator/hipe/hipe_debug.c
+++ b/erts/emulator/hipe/hipe_debug.c
@@ -36,6 +36,7 @@
#include "beam_load.h"
#include "hipe_mode_switch.h"
#include "hipe_debug.h"
+#include "erl_map.h"
static const char dashes[2*sizeof(long)+5] = {
[0 ... 2*sizeof(long)+3] = '-'
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index adc8793469..1ae1d17b7f 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -2,7 +2,7 @@
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -37,7 +37,8 @@
#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP)
# define ERTS_SMP_REQ_PROC_MAIN_LOCK(P) \
- if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN)
+ if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN, \
+ __FILE__, __LINE__)
# define ERTS_SMP_UNREQ_PROC_MAIN_LOCK(P) \
if ((P)) erts_proc_lc_unrequire_lock((P), ERTS_PROC_LOCK_MAIN)
#else
@@ -184,23 +185,56 @@ void hipe_set_call_trap(Uint *bfun, void *nfun, int is_closure)
bfun[-4] = (Uint)nfun;
}
-static __inline__ void
-hipe_push_beam_trap_frame(Process *p, Eterm reg[], unsigned arity)
+void hipe_reserve_beam_trap_frame(Process *p, Eterm reg[], unsigned arity)
{
+ if (!hipe_bifcall_from_native_is_recursive(p))
+ return;
+
/* ensure that at least 2 words are available on the BEAM stack */
if ((p->stop - 2) < p->htop) {
- DPRINTF("calling gc to increase BEAM stack size");
+ DPRINTF("calling gc to reserve BEAM stack size");
p->fcalls -= erts_garbage_collect(p, 2, reg, arity);
+ ASSERT(!((p->stop - 2) < p->htop));
}
p->stop -= 2;
+ p->stop[0] = NIL;
p->stop[1] = hipe_beam_catch_throw;
+}
+
+static __inline__ void
+hipe_push_beam_trap_frame(Process *p, Eterm reg[], unsigned arity)
+{
+ if (&p->stop[1] < p->hend && p->stop[1] == hipe_beam_catch_throw) {
+ /* Trap frame already reserved */
+ ASSERT(p->stop[0] == NIL);
+ }
+ else {
+ ASSERT(!(p->flags & F_DISABLE_GC));
+ if ((p->stop - 2) < p->htop) {
+ DPRINTF("calling gc to increase BEAM stack size");
+ p->fcalls -= erts_garbage_collect(p, 2, reg, arity);
+ ASSERT(!((p->stop - 2) < p->htop));
+ }
+ p->stop -= 2;
+ p->stop[1] = hipe_beam_catch_throw;
+ }
p->stop[0] = make_cp(p->cp);
++p->catches;
p->cp = hipe_beam_pc_return;
}
+void hipe_unreserve_beam_trap_frame(Process *p)
+{
+ if (!hipe_bifcall_from_native_is_recursive(p))
+ return;
+
+ ASSERT(p->stop[0] == NIL && p->stop[1] == hipe_beam_catch_throw);
+ p->stop += 2;
+}
+
static __inline__ void hipe_pop_beam_trap_frame(Process *p)
{
+ ASSERT(p->stop[1] == hipe_beam_catch_throw);
p->cp = cp_val(p->stop[0]);
--p->catches;
p->stop += 2;
diff --git a/erts/emulator/hipe/hipe_mode_switch.h b/erts/emulator/hipe/hipe_mode_switch.h
index a3e908a3b3..06721e3c04 100644
--- a/erts/emulator/hipe/hipe_mode_switch.h
+++ b/erts/emulator/hipe/hipe_mode_switch.h
@@ -59,6 +59,9 @@ void hipe_empty_nstack(Process *p);
void hipe_set_closure_stub(ErlFunEntry *fe, unsigned num_free);
Eterm hipe_build_stacktrace(Process *p, struct StackTrace *s);
+void hipe_reserve_beam_trap_frame(Process*, Eterm reg[], unsigned arity);
+void hipe_unreserve_beam_trap_frame(Process*);
+
extern Uint hipe_beam_pc_return[];
extern Uint hipe_beam_pc_throw[];
extern Uint hipe_beam_pc_resume[];
diff --git a/erts/emulator/hipe/hipe_native_bif.c b/erts/emulator/hipe/hipe_native_bif.c
index 1f76268934..7d343dd91e 100644
--- a/erts/emulator/hipe/hipe_native_bif.c
+++ b/erts/emulator/hipe/hipe_native_bif.c
@@ -41,8 +41,7 @@
*/
/* for -Wmissing-prototypes :-( */
-extern Eterm hipe_check_process_code_2(BIF_ALIST_2);
-extern Eterm hipe_garbage_collect_1(BIF_ALIST_1);
+extern Eterm hipe_erts_internal_check_process_code_2(BIF_ALIST_2);
extern Eterm hipe_show_nstack_1(BIF_ALIST_1);
/* Used when a BIF can trigger a stack walk. */
@@ -51,22 +50,12 @@ static __inline__ void hipe_set_narity(Process *p, unsigned int arity)
p->hipe.narity = arity;
}
-Eterm hipe_check_process_code_2(BIF_ALIST_2)
+Eterm hipe_erts_internal_check_process_code_2(BIF_ALIST_2)
{
Eterm ret;
hipe_set_narity(BIF_P, 2);
- ret = check_process_code_2(BIF_P, BIF__ARGS);
- hipe_set_narity(BIF_P, 0);
- return ret;
-}
-
-Eterm hipe_garbage_collect_1(BIF_ALIST_1)
-{
- Eterm ret;
-
- hipe_set_narity(BIF_P, 1);
- ret = garbage_collect_1(BIF_P, BIF__ARGS);
+ ret = erts_internal_check_process_code_2(BIF_P, BIF__ARGS);
hipe_set_narity(BIF_P, 0);
return ret;
}
diff --git a/erts/emulator/hipe/hipe_risc_glue.h b/erts/emulator/hipe/hipe_risc_glue.h
index cc2671c016..dbb7086dae 100644
--- a/erts/emulator/hipe/hipe_risc_glue.h
+++ b/erts/emulator/hipe/hipe_risc_glue.h
@@ -214,6 +214,14 @@ hipe_trap_from_native_is_recursive(Process *p)
return 0;
}
+/* Native called BIF. Is it a recursive call?
+ i.e should we return back to native when BIF is done? */
+static __inline__ int
+hipe_bifcall_from_native_is_recursive(Process *p)
+{
+ return (p->hipe.nra != (void(*)(void))&nbif_return);
+}
+
/* Native makes a call which needs to unload the parameters.
This differs from hipe_call_from_native_is_recursive() in
diff --git a/erts/emulator/hipe/hipe_x86_glue.h b/erts/emulator/hipe/hipe_x86_glue.h
index 63ad250d60..4b6e495b9a 100644
--- a/erts/emulator/hipe/hipe_x86_glue.h
+++ b/erts/emulator/hipe/hipe_x86_glue.h
@@ -207,6 +207,14 @@ hipe_trap_from_native_is_recursive(Process *p)
return 0;
}
+/* Native called BIF. Is it a recursive call?
+ i.e should we return back to native when BIF is done? */
+static __inline__ int
+hipe_bifcall_from_native_is_recursive(Process *p)
+{
+ return (*p->hipe.nsp != (Eterm)nbif_return);
+}
+
/* Native makes a call which needs to unload the parameters.
This differs from hipe_call_from_native_is_recursive() in
diff --git a/erts/emulator/hipe/hipe_x86_signal.c b/erts/emulator/hipe/hipe_x86_signal.c
index 8f997aafab..f5668013e2 100644
--- a/erts/emulator/hipe/hipe_x86_signal.c
+++ b/erts/emulator/hipe/hipe_x86_signal.c
@@ -2,7 +2,7 @@
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -304,7 +304,9 @@ static void hipe_sigaltstack(void *ss_sp)
*/
void hipe_thread_signal_init(void)
{
- hipe_sigaltstack(erts_alloc(ERTS_ALC_T_HIPE, SIGSTKSZ));
+ /* Stack don't really need to be cache aligned.
+ We use it to suppress false leak report from valgrind */
+ hipe_sigaltstack(erts_alloc_permanent_cache_aligned(ERTS_ALC_T_HIPE, SIGSTKSZ));
}
#endif
diff --git a/erts/emulator/internal_doc/CarrierMigration.md b/erts/emulator/internal_doc/CarrierMigration.md
new file mode 100644
index 0000000000..2a9594db25
--- /dev/null
+++ b/erts/emulator/internal_doc/CarrierMigration.md
@@ -0,0 +1,285 @@
+Carrier Migration
+=================
+
+The ERTS memory allocators manage memory blocks in two types of raw
+memory chunks. We call these chunks of raw memory
+*carriers*. Singleblock carriers which only contain one large block,
+and multiblock carriers which contain multiple blocks. A carrier is
+typically created using `mmap()` on unix systems. However, how a
+carrier is created is of minor importance. An allocator instance
+typically manages a mixture of single- and multiblock carriers.
+
+Problem
+-------
+
+When a carrier is empty, i.e. contains only one large free block, it
+is deallocated. Since multiblock carriers can contain both allocated
+blocks and free blocks at the same time, an allocator instance might
+be stuck with a large amount of poorly utilized carriers if the memory
+load decreases. After a peak in memory usage it is expected that not
+all memory can be returned since the blocks still allocated are likely
+to be dispersed over multiple carriers. Such poorly utilized carriers
+can usually be reused if the memory load increases again. However,
+since each scheduler thread manages its own set of allocator
+instances, and memory load is not necessarily correlated to CPU load, we
+might get into a situation where there are lots of poorly utilized
+multiblock carriers on some allocator instances while we need to
+allocate new multiblock carriers on other allocator instances. In
+scenarios like this, the demand for multiblock carriers in the system
+might increase at the same time as the actual memory demand in the
+system has decreased which is both unwanted and quite unexpected for
+the end user.
+
+Solution
+--------
+
+In order to prevent scenarios like this we've implemented support for
+migration of multiblock carriers between allocator instances of the
+same type.
+
+### Management of Free Blocks ###
+
+In order to be able to remove a carrier from one allocator instance
+and add it to another we need to be able to move references to the
+free blocks of the carrier between the allocator instances. The
+allocator instance specific data structure referring to the free
+blocks it manages often refers to the same carrier from multiple
+places. For example, when the address order bestfit strategy is used
+this data structure is a binary search tree spanning all carriers that
+the allocator instance manages. Free blocks in one specific carrier
+can be referred to from potentially every other carrier that is
+managed, and the amount of such references can be huge. That is, the
+work of removing the free blocks of such a carrier from the search
+tree will be huge. One way of solving this could be not to migrate
+carriers that contain lots of free blocks, but this would prevent us
+from migrating carriers that potentially need to be migrated in order
+to solve the problem we set out to solve.
+
+By using one data structure of free blocks in each carrier and an
+allocator instance-wide data structure of carriers managed by the
+allocator instance, the work needed in order to remove and add
+carriers can be kept to a minimum. When migration of carriers is
+enabled on a specific allocator type, we require that an allocation
+strategy with such an implementation is used. Currently we've
+implemented this for three different allocation strategies. All of
+these strategies use a search tree of carriers sorted so that we can
+find the carrier with the lowest address that can satisfy the
+request. Internally in carriers we use yet another search tree that
+either implement address order first fit, address order best fit,
+or best fit. The abbreviations used for these different allocation
+strategies are `aoff`, and `aoffcaobf`, `aoffcbf`.
+
+### Carrier Pool ###
+
+In order to migrate carriers between allocator instances we move them
+through a pool of carriers. In order for a carrier migration to
+complete, one scheduler needs to move the carrier into the pool, and
+another scheduler needs to take the carrier out of the pool.
+
+The pool is implemented as a lock-free, circular, double linked,
+list. The list contains a sentinel which is used as the starting point
+when inserting to, or fetching from, the pool. Carriers in the pool are
+elements in this list.
+
+The list can be modified by all scheduler threads
+simultaneously. During modifications the double linked list is allowed
+to get a bit "out of shape". For example, following the `next` pointer
+to the next element and then following the `prev` pointer does not
+always take you back to were you started. The following is however
+always true:
+
+* Repeatedly following `next` pointers will eventually take you to the
+ sentinel.
+* Repeatedly following `prev` pointers will eventually take you to the
+ sentinel.
+* Following a `next` or a `prev` pointer will take you to either an
+ element in the pool, or an element that used to be in the pool.
+
+When inserting a new element we search for a place to insert the
+element by only following `next` pointers, and we always begin by
+skipping the first element encountered. When trying to fetch an
+element we do the same thing, but instead only follow `prev` pointers.
+
+By going different directions when inserting and fetching, we avoid
+contention between threads inserting and threads fetching as much as
+possible. By skipping one element when we begin searching, we preserve
+the sentinel unmodified as much as possible. This is beneficial since
+all search operations need to read the content of the sentinel. If we
+were to modify the sentinel, the cache line containing the sentinel
+would unnecessarily be bounced between processors.
+
+The `prev` and `next` fields in the elements of the list contain the
+value of the pointer, a modification marker, and a deleted
+marker. Memory operations on these fields are done using atomic memory
+operations. When a thread has set the modification marker in a field,
+no-one except the thread that set the marker is allowed to modify the
+field. If multiple modification markers need to be set, we always
+begin with `next` fields followed by `prev` fields in the order
+following the actual pointers. This guarantees that no deadlocks will
+occur.
+
+When a carrier is being removed from a pool, we mark it with a thread
+progress value that needs to be reached before we are allowed to
+modify the `next` and `prev` fields. That is, until we reach this
+thread progress we are not allowed to insert the carrier into the pool
+again, and we are not allowed to deallocate the carrier. This ensures
+that threads inspecting the pool always will be able to traverse the
+pool and reach valid elements. Once we have reached the thread
+progress value that the carrier was tagged with, we know that no
+threads may have references to it via the pool.
+
+### Migration ###
+
+There exists one pool for each allocator type enabling migration of
+carriers between scheduler specific allocator instances of the same
+allocator type.
+
+Each allocator instance keeps track of the current utilization of its
+multiblock carriers. When the total utilization falls below the "abandon
+carrier utilization limit" it starts to inspect the utilization of the
+current carrier when deallocations are made. If also the utilization
+of the carrier falls below the "abandon carrier utilization limit" it
+unlinks the carrier from its data structure of available free blocks
+and inserts the carrier into the pool.
+
+Since the carrier has been unlinked from the data structure of
+available free blocks, no more allocations will be made in the
+carrier. The allocator instance putting the carrier into the pool,
+however, still has the responsibility of performing deallocations in
+it while it remains in the pool. The allocator instance with this
+deallocation responsibility is here called the **employer**.
+
+Each carrier has a flag field containing information about the
+employing allocator instance, a flag indicating if the carrier is in
+the pool or not, and a flag indicating if it is busy or not. When the
+carrier is in the pool, the employing allocator instance needs to mark it
+as busy while operating on it. If another thread inspects it in order
+to try to fetch it from the pool, it will skip it if it is busy. When
+fetching the carrier from the pool, employment will change and further
+deallocations in the carrier will be redirected to the new
+employer using the delayed dealloc functionality.
+
+If a carrier in the pool becomes empty, it will be withdrawn from the
+pool. All carriers that become empty are also always passed to its
+**owning** allocator instance for deallocation using the delayed
+dealloc functionality. Since carriers this way always will be
+deallocated by the owner that allocated the carrier, the
+underlying functionality of allocating and deallocating carriers can
+remain simple and doesn't have to bother about multiple threads. In a
+NUMA system we will also not mix carriers originating from multiple
+NUMA nodes.
+
+In short:
+
+* The allocator instance that created a carrier **owns** it.
+* An empty carrier is always deallocated by its **owner**.
+* **Ownership** never changes.
+* The allocator instance that uses a carrier **employs** it.
+* An **employer** can abandon a carrier into the pool.
+* Pooled carriers are not allocated from.
+* Deallocation in a pooled carrier is still performed by its **employer**.
+* **Employment** can only change when a carrier is fetched from the pool.
+
+### Searching the pool ###
+
+To harbor real time characteristics, searching the pool is
+limited. We only inspect a limited number of carriers. If none of
+those carriers had a free block large enough to satisfy the allocation
+request, the search will fail. A carrier in the pool can also be busy
+if another thread is currently doing block deallocation work on the
+carrier. A busy carrier will also be skipped by the search as it can
+not satisfy the request. The pool is lock-free and we do not want to
+block, waiting for the other thread to finish.
+
+#### Before OTP 17.4 ####
+
+When an allocator instance needs more carrier space, it always begins
+by inspecting its own carriers that are waiting for thread progress
+before they can be deallocated. If no such carrier could be found, it
+then inspects the pool. If no carrier could be fetched from the pool,
+it will allocate a new carrier. Regardless of where the allocator
+instance gets the carrier from it the just links in the carrier into
+its data structure of free blocks.
+
+#### After OTP 17.4 ####
+
+The old search algorithm had a problem as the search always started at
+the same position in the pool, the sentinel. This could lead to
+contention from concurrent searching processes. But even worse, it
+could lead to a "bad" state when searches fail with a high rate
+leading to new carriers instead being allocated. These new carriers
+may later be inserted into the pool due to bad utilization. If the
+frequency of insertions into the pool is higher than successful
+fetching from the pool, memory will eventually get exhausted.
+
+This "bad" state consists of a cluster of small and/or highly
+fragmented carriers located at the sentinel in the pool. The largest free
+block in such a "bad" carrier is rather small, making it unable to satisfy
+most allocation requests. As the search always started at the
+sentinel, any such "bad" carriers that had been left in the pool would
+eventually cluster together at the sentinel. All searches first
+have to skip past this cluster of "bad" carriers to reach a "good"
+carrier. When the cluster gets to the same size as the search limit,
+all searches will essentially fail.
+
+To counter the "bad cluster" problem and also ease the contention, the
+search will now always start by first looking at the allocators **own**
+carriers. That is, carriers that were initially created by the
+allocator itself and later had been abandoned to the pool. If none of
+our own abandoned carrier would do, then the search continues into the
+pool, as before, to look for carriers created by other
+allocators. However, if we have at least one abandoned carrier of our
+own that could not satisfy the request, we can use that as entry point
+into the pool.
+
+The result is that we prefer carriers created by the thread itself,
+which is good for NUMA performance. And we get more entry points when
+searching the pool, which will ease contention and clustering.
+
+To do the first search among own carriers, every allocator instance
+has two new lists: `pooled_list` and `traitor_list`. These lists are only
+accessed by the allocator itself and they only contain the allocator's
+own carriers. When an owned carrier is abandoned and put in the
+pool, it is also linked into `pooled_list`. When we search our
+`pooled_list` and find a carrier that is no longer in the pool, we
+move that carrier from `pooled_list` to `traitor_list` as it is now
+employed by another allocator. If searching `pooled_list` fails, we
+also do a limited search of `traitor_list`. When finding an abandoned
+carrier in `traitor_list` it is either employed or moved back to
+`pooled_list` if it could not satisfy the allocation request.
+
+When searching `pooled_list` and `traitor_list` we always start at the
+point where the last search ended. This to avoid clustering
+problems and increase the probability to find a "good" carrier. As
+`pooled_list` and `traitor_list` are only accessed by the owning
+allocator instance, they need no thread synchronization at all.
+
+Furthermore, the search for own carriers that are scheduled
+for deallocation is now done as the last search option. The idea is
+that it is better to reuse a poorly utilized carrier than to
+resurrect an empty carrier that was just about to be released back to
+the OS.
+
+### Result ###
+
+The use of this strategy of abandoning carriers with poor utilization
+and reusing them in allocator instances with an increased carrier
+demand is extremely effective and completely eliminates the problems
+that otherwise sometimes occurred when CPU load dropped while memory
+load did not.
+
+When using the `aoffcaobf` or `aoff` strategies compared to `gf` or
+`bf`, we loose some performance since we get more modifications in the
+data structure of free blocks. This performance penalty is however
+reduced using the `aoffcbf` strategy. A tradeoff between memory
+consumption and performance is however inevitable, and it is up to
+the user to decide what is most important.
+
+Further work
+------------
+
+It would be quite easy to extend this to allow migration of multiblock
+carriers between all allocator types. More or less the only obstacle
+is maintenance of the statistics information.
+
+
diff --git a/erts/emulator/internal_doc/CodeLoading.md b/erts/emulator/internal_doc/CodeLoading.md
new file mode 100644
index 0000000000..151b9cd57c
--- /dev/null
+++ b/erts/emulator/internal_doc/CodeLoading.md
@@ -0,0 +1,186 @@
+Non-Blocking Code Loading
+=========================
+
+Introduction
+------------
+
+Before OTP R16 when an Erlang code module was loaded, all other
+execution in the VM were halted while the load operation was carried
+out in single threaded mode. This might not be a big problem for
+initial loading of modules during VM boot, but it can be a severe
+problem for availability when upgrading modules or adding new code on
+a VM with running payload. This problem grows with the number of cores
+as both the time it takes to wait for all schedulers to stop increases
+as well as the potential amount of halted ongoing work.
+
+In OTP R16, modules are loaded without blocking the VM.
+Erlang processes may continue executing undisturbed in parallel during
+the entire load operation. The code loading is carried out by a normal
+Erlang process that is scheduled like all the others. The load
+operation is completed by making the loaded code visible to all
+processes in a consistent way with one single atomic
+instruction. Non-blocking code loading will improve real-time
+characteristics when modules are loaded/upgraded on a running SMP
+system.
+
+
+The Load Phases
+---------------
+
+The loading of a module is divided into two phases; a *prepare phase*
+and a *finishing phase*. The prepare phase contains reading the BEAM
+file format and all the preparations of the loaded code that can
+easily be done without interference with the running code. The
+finishing phase will make the loaded (and prepared) code accessible
+from the running code. Old module versions (replaced or deleted) will
+also be made inaccessible by the finishing phase.
+
+The prepare phase is designed to allow several "loader" processes to
+prepare separate modules in parallel while the finishing phase can
+only be done by one loader process at a time. A second loader process
+trying to enter finishing phase will be suspended until the first
+loader is done. This will only block the process, the scheduler is
+free to schedule other work while the second loader is waiting. (See
+`erts_try_seize_code_write_permission` and
+`erts_release_code_write_permission`).
+
+The ability to prepare several modules in parallel is not currently
+used as almost all code loading is serialized by the code_server
+process. The BIF interface is however prepared for this.
+
+ erlang:prepare_loading(Module, Code) -> LoaderState
+ erlang:finish_loading([LoaderState])
+
+The idea is that `prepare_loading` could be called in parallel for
+different modules and returns a "magic binary" containing the internal
+state of each prepared module. Function `finish_loading` could take a
+list of such states and do the finishing of all of them in one go.
+
+Currenlty we use the legacy BIF `erlang:load_module` which is now
+implemented in Erlang by calling the above two functions in
+sequence. Function `finish_loading` is limited to only accepts a list
+with one module state as we do not yet use the multi module loading
+feature.
+
+
+The Finishing Sequence
+----------------------
+
+During VM execution, code is accessed through a number of data
+structures. These *code access structures* are
+
+* Export table. One entry for every exported function.
+* Module table. One entry for each loaded module.
+* "beam_catches". Identifies jump destinations for catch instructions.
+* "beam_ranges". Map code address to function and line in source file.
+
+The most frequently used of these structures is the export table that
+is accessed in run time for every executed external function call to
+get the address of the callee. For performance reasons, we want to
+access all these structures without any overhead from thread
+synchronization. Earlier this was solved with an emergency break. Stop
+the entire VM to mutate these code access structures, otherwise treat
+them as read-only.
+
+The solution in R16 is instead to *replicate* the code access
+structures. We have one set of active structures read by the running
+code. When new code is loaded the active structures are copied, the
+copy is updated to include the newly loaded module and then a switch
+is made to make the updated copy the new active set. The active set is
+identified by a single global atomic variable
+`the_active_code_index`. The switch can thus be made by a single
+atomic write operation. The running code have to read this atomic
+variable when using the active access structures, which means one
+atomic read operation per external function call for example. The
+performance penalty from this extra atomic read is however very small
+as it can be done without any memory barriers at all (as described
+below). With this solution we also preserve the transactional feature
+of a load operation. Running code will never see the intermediate
+result of a half loaded module.
+
+The finishing phase is carried out in the following sequence by the
+BIF `erlang:finish_loading`:
+
+1. Seize exclusive code write permission (suspend process if needed
+ until we get it).
+
+2. Make a full copy of all the active access structures. This copy is
+ called the staging area and is identified by the global atomic
+ variable `the_staging_code_index`.
+
+3. Update all access structures in the staging area to include the
+ newly prepared module.
+
+4. Schedule a thread progress event. That is a time in the future when
+ all schedulers have yielded and executed a full memory barrier.
+
+5. Suspend the loader process.
+
+6. After thread progress, commit the staging area by assigning
+ `the_staging_code_index` to `the_active_code_index`.
+
+7. Release the code write permission allowing other processes to stage
+ new code.
+
+8. Resume the loader process allowing it to return from
+ `erlang:finish_loading`.
+
+
+### Thread Progress
+
+The waiting for thread progress in 4-6 is necessary in order for
+processes to read `the_active_code_index` atomic during normal
+execution without any expensive memory barriers. When we write a new
+value into `the_active_code_index` in step 6, we know that all
+schedulers will see an updated and consistent view of all the new
+active access structures once they become reachable through
+`the_active_code_index`.
+
+The total lack of memory barrier when reading `the_active_code_index`
+has one interesting consequence however. Different processes may see
+the new code at different point in time depending on when different
+cores happen to refresh their hardware caches. This may sound unsafe
+but it actually does not matter. The only property we must guarantee
+is that the ability to see the new code must spread with process
+communication. After receiving a message that was triggered by new
+code, the receiver must be guaranteed to also see the new code. This
+will be guaranteed as all types of process communication involves
+memory barriers in order for the receiver to be sure to read what the
+sender has written. This implicit memory barrier will then also make
+sure that the receiver reads the new value of `the_active_code_index`
+and thereby also sees the new code. This is true for all kinds of
+inter process communication (TCP, ETS, process name registering,
+tracing, drivers, NIFs, etc) not just Erlang messages.
+
+### Code Index Reuse
+
+To optimize the copy operation in step 2, code access structures are
+reused. In current solution we have three sets of code access
+structures, identified by a code index of 0, 1 and 2. These indexes
+are used in a round robin fashion. Instead of having to initialize a
+completely new copy of all access structures for every load operation
+we just have to update with the changes that have happened since the
+last two code load operations. We could get by with only two code
+indexes (0 and 1), but that would require yet another round of waiting
+for thread progress before step 2 in the `finish_loading` sequence. We
+cannot start reusing a code index as staging area until we know that
+no lingering scheduler thread is still using it as the active code
+index. With three generations of code indexes, the waiting for thread
+progress in step 4-6 will give this guarantee for us. Thread progress
+will wait for all running schedulers to reschedule at least one
+time. No ongoing execution reading code access structures reached from
+an old value of `the_active_code_index` can exist after a second round
+of thread progress.
+
+The design choice between two or three generations of code access
+structures is a trade-off between memory consumption and code loading
+latency.
+
+### A Consistent Code View
+
+Some native BIFs may need to get a consistent snapshot view of the
+active code. To do this it is important to only read
+`the_active_code_index` one time and then use that index value for all
+code accessing during the BIF. If a load operation is executed in
+parallel, reading `the_active_code_index` a second time might result
+in a different value, and thereby a different view of the code.
diff --git a/erts/emulator/internal_doc/DelayedDealloc.md b/erts/emulator/internal_doc/DelayedDealloc.md
new file mode 100644
index 0000000000..b7d87b839f
--- /dev/null
+++ b/erts/emulator/internal_doc/DelayedDealloc.md
@@ -0,0 +1,175 @@
+Delayed Dealloc
+===============
+
+Problem
+-------
+
+An easy way to handle memory allocation in a multi-threaded
+environment is to protect the memory allocator with a global lock
+which threads performing memory allocations or deallocations have to
+have locked during the whole operation. This solution of course scales
+very poorly, due to heavy lock contention. An improved solution of
+this scheme is to use multiple thread specific instances of such an
+allocator. That is, each thread allocates in its own allocator
+instance which is protected by a lock. In the general case references
+to memory need to be passed between threads. In the case where a
+thread that needs to deallocate memory that originates from another
+threads allocator instance a lock conflict is possible. In a system as
+the Erlang VM where memory allocation/deallocation is frequent and
+references to memory also are passed around between threads this
+solution will also scale poorly due to lock contention.
+
+Functionality Used to Adress This problem
+-----------------------------------------
+
+In order to reduce contention due to locking of allocator instances we
+introduced completely lock free instances tied to each scheduler
+thread, and an extra locked instance for other threads. The scheduler
+threads in the system is expected to do the major part of the
+work. Other threads may still be needed but should not perform any
+major and/or time critical work. The limited amount of contention that
+appears on the locked allocator instance can more or less be
+disregarded.
+
+Since we still need to be able to pass references to memory between
+scheduler threads we need some way to manage this. An allocator
+instance belonging to one scheduler thread is only allowed to be
+manipulated by that scheduler thread. When other threads need to
+deallocate memory originating from a foreign allocator instance, they
+only pass the memory block to a "message box" containing deallocation
+jobs attached to the originating allocator instance. When a scheduler
+thread detects such deallocation job it performs the actual
+deallocation.
+
+The "message box" is implemented using a lock free single linked list
+through the memory blocks to deallocate. The order of the elements in
+this list is not important. Insertion of new free blocks will be made
+somewhere near the end of this list. Requirering that the new blocks
+need to be inserted at the end would cause unnecessary contention when
+large amount of memory blocks are inserted simultaneous by multiple
+threads.
+
+The data structure refering to this single linked list cover two cache
+lines. One cache line containing information about the head of the
+list, and one cache line containing information about the tail of the
+list. This in order to reduce cache line ping ponging of this data
+structure. The head of the list will only be manipulated by the thread
+owning the allocator instance, and the tail will be manipulated by
+other threads inserting deallocation jobs.
+
+### Tail ###
+
+In the tail part of the data structure we find a pointer to the last
+element of the list, or at least something that is near the end of the
+list. In the uncontended case it will point to the end of the list,
+but when simultaneous insert operations are performed it will point to
+something near the end of the list.
+
+When insterting an element one will try to write a pointer to the new
+element in the next pointer of the element pointed to by the last
+pointer. This is done using an atomic compare and swap that expects
+the next pointer to be `NULL`. If this succeds the thread performing
+this operation moves the last pointer to point to the newly inserted
+element.
+
+If the atomic compare and swap described above failed, the last
+pointer didn't point to the last element. In this case we need to
+insert the new element somewhere inbetween the element that the last
+pointer pointed to and the actual last element. If we do it this way
+the last pointer will eventually end up at the last element when
+threads stop adding new elements. When trying to insert somewhere near
+the end and failing to do so, the inserting thread sometimes moves to
+the next element and somtimes tries with the same element again. This
+in order to spread the inserted elements during heavy contention. That
+is, we try to spread the modifications of memory to different
+locations instead of letting all threads continue to try to modify the
+same location in memory.
+
+### Head ###
+
+The head contains pointers to begining of the list (`head.first`), and
+to the first block which other threads may refer to
+(`head.unref_end`). Blocks between these pointers are only refered to
+by the head part of the data structure which is only used by the
+thread owning the allocator instance. When these two pointers are not
+equal the thread owning the allocator instance deallocate block after
+block until `head.first` reach `head.unref_end`.
+
+We of course periodically need to move the `head.unref_end` closer to
+the end in order to be able to continue deallocating memory
+blocks. Since all threads inserting new elements in the linked list
+will enter the list using the last pointer we can use this
+knowledge. If we call `erts_thr_progress_later()` and wait until we
+have reached that thread progress we know that no managed threads can
+refer the elements up to the element pointed to by the last pointer at
+the time when we called `erts_thr_progress_later()`. This since, all
+managed threads must have left the code implementing this at least
+once, and they always enters into the list via the last pointer. The
+`tail.next` field contains information about next `head.unref_end`
+pointer and thread progress that needs to be reached before we can
+move `head.unref_end`.
+
+Unfortunately not only threads managed by the thread progress
+functionality may insert memory blocks. Other threads also needs to be
+taken care of. Other threads will not be as frequent users of this
+functionality as managed threads, so using a less efficient scheme for
+them is not that big of a problem. In order to handle unmanaged
+threads we use two reference counters. When an unmanaged thread enters
+this implementation it increments the reference counter currently
+used, and when it leaves this implementation it decrements the same
+reference counter. When the consumer thread calls
+`erts_thr_progress_later()` in order to determine when it is safe to
+move `head.unref_end`, it also swaps reference counters for unmanaged
+threads. The previous current represents outstanding references from
+the time up to this point. The new current represents future reference
+following this point. When the consumer thread detects that we have
+both reached the desired thread progress and when the previous current
+reference counter reach zero it is safe to move the `head.unref_end`.
+
+The reason for using two reference counters is that we need to know
+that the reference counter eventually will reach zero. If we only used
+one reference counter it would potentially be held above zero for ever
+by different unmanaged threads.
+
+### Empty List ###
+
+If no new memory blocks are inserted into the list, it should
+eventually be emptied. All pointers to the list however expect to
+always point to something. This is solved by inserting an empty
+"marker" element, which only has to purpose of being there in the
+absense of other elements. That is when the list is empty it only
+contains this "marker" element.
+
+### Contention ###
+
+When elements are continously inserted by threads not owning the
+allocator instance, the thread owning the allocator instance will be
+able to work more or less undisturbed by other threads at the head end
+of the list. At the tail end large amounts of simultaneous inserts may
+cause contention, but we reduce such contention by spreading inserts
+of new elements near the end instead of requiring all new elements to
+be inserted at the end.
+
+### Schedulers and The Locked Allocator Instance ###
+
+Also the locked allocator instance for use by non-scheduler threads
+have a message box for deallocation jobs just as all the other
+allocator instances. The reason for this is that other threads may
+allocate memory pass it to a scheduler that then needs to deallocate
+it. We do not want the scheduler to have to wait for the lock on this
+locked instance. Since also locked instances has message boxes for
+deallocation jobs, the scheduler can just insert the job and avoid the
+locking.
+
+
+### A Benchmark Result ###
+
+When running the ehb benchmark, large amount of messages are passed
+around between schedulers. All message passing will in some way or the
+other cause memory allocation and deallocation. Since messages are
+passed between different schedulers we will get contention on the
+allocator instances where messages were allocated. By the introduction
+of the delayed dealloc feature, we got a speedup of between 25-45%,
+depending on configuration of the benchmark, when running on a
+relatively new machine with an Intel i7 quad core processor with
+hyper-threading using 8 schedulers. \ No newline at end of file
diff --git a/erts/emulator/internal_doc/PTables.md b/erts/emulator/internal_doc/PTables.md
new file mode 100644
index 0000000000..6fe0e7665d
--- /dev/null
+++ b/erts/emulator/internal_doc/PTables.md
@@ -0,0 +1,356 @@
+Process and Port Tables
+=======================
+
+Problems
+--------
+
+The process table is a mapping from process identifiers to process
+structure pointers. The process structure contains miscellaneous
+information about a process, as for example pointers to its heap,
+message queue, etc. When the runtime system needs to operate on a
+process, it looks up the process structure in the process table using
+the process identifier. An example of this is when passing a message
+to a process.
+
+The process table has for a very long time just been an array of
+pointers to process structures. Since process identifiers internally
+in the runtime system are 28-bit integers it is quite easy to map a
+process identifier to index into the array. The 28-bits were divided
+into two sets. The least significant set of bits was used as index
+into the array. The most significant set of bits was only used to be
+able to distinguish between a number of identifiers with which map to
+the same index in the array. As long as process table sizes of a power
+of two was used we had 2^28 unique process identifiers.
+
+When the first SMP support was implemented, the table still was kept
+more or less the same way, but protected by two types of locks. One
+lock that protected the whole table against modifications and an array
+of locks protecting different parts of the table. The exact locking
+strategy previously used isn't interesting. What is interesting is
+that it suffered from heavy lock contention especially when lots of
+modifications was being made, but also when only performing lookups.
+
+In order to be able to detect when it is safe to deallocate a
+previously used process structure, reference counting of the structure
+was used. Also this was problematic, since simultaneous lookups needed
+to modify the reference counter which also caused contention on the
+cache line where the reference counter was located. This since all
+modifications needs to be communicated between all involved
+processors.
+
+The port table is very similar to the process table. The major
+difference, at least in concept, is that it is a mapping from port
+identifiers to port structures. It had a similar implementation, but
+with some differences. Instead of being an array of pointers it was an
+array of structures, and instead of being protected by two types of
+locks it was only protected by one global lock. This table also
+suffered from lock contention in various situations.
+
+Solution
+--------
+
+The process table was the major problem to address since processes are
+much more frequently used than ports. The first implementation only
+implemented this for processes, but since the port table is very
+similar and very similar problems occur on the port table, the process
+table implementation was later generalized so that it could also be
+used implementing the port table. For simplicity I will only talk
+about the process table in the following text, but the same will apply
+to the port table unless otherwise stated.
+
+If we disregard the locking issues, the original solution is very
+appealing. The mapping from process identifier to index into the array
+is very fast, and this property is something we would like to
+keep. The vast majority of operations on these tables are lookups so
+optimizing for lookups is what we want to do.
+
+### Lookup ###
+
+Using a set of bits in the process identifier as index into an array
+seems hard to beat. By replacing the array of pointers with an array
+of our pointer sized atomic data type, a lookup will consist of the
+following:
+
+1. Mapping the 28-bit integer to an index into the array.
+
+ More about this mapping later.
+
+2. Read the pointer using an atomic memory operation at determined
+ index in array.
+
+ On all platforms that we provide atomic memory operations, this is
+ just a `volatile` read, preventing the compiler to use values in
+ registers, forcing the a read from memory.
+
+3. Depending on use, issue appropriate memory barrier.
+
+ A common barrier used is a barrier with acquire semantics. On
+ x86/x86_64 this maps to a compiler barrier preventing the compiler
+ to reorder instructions, but on other hardware often some kind of
+ light weight hardware memory barrier is also needed.
+
+ When comparing with a locked approach, at least one heavy weight
+ memory barrier will be issued when locking the lock on most, if
+ not all, hardware architectures (including x86/x86_64), and often
+ some kind of light weight memory barrier will be issued when
+ unlocking the lock.
+
+When looking at this very simple solution with very little overhead
+you might wonder why we didn't implement it this way from the
+beginning. It all boils down to the read operation of the pointer. We
+need some way to know that it is safe to access the memory pointed
+to. One way of doing this is to place a reference counter in the
+process structure. Increment of the reference counter at lookup needs
+to be done atomically with the lookup. A lock can typically provide
+this service for us, which was the approach we previously
+used. Another approach could be to co-locate the reference counter
+with the pointer in the table. The major problem with this approach is
+the modifications of the reference counter. This since these
+modification would have to be communicated between all involved
+processor cause contention on the cache line containing the reference
+counter. The new lookup approach above is possible since we can use
+the "thread progress" functionality in order to determine when it is
+safe to deallocate the process structure. We'll get back to this when
+describing deletion in the table.
+
+Using this new lookup approach we wont modify any memory at all which
+is important. A lookup conceptually only read memory, now this is true
+in the implementation also which is important from a scalability
+perspective. The previous implementation modified the cache line
+containing the reference counter two times, and the cache line
+containing the corresponding lock two times at each lookup.
+
+### Modifications of the Table ###
+
+A lightweight lookup in the table was the most important feature, but
+we also wanted to improve modifications of the table. The process
+table is modified when a new process is spawned, i.e. a new pointer is
+inserted into the table, and when a process terminates, i.e. a pointer
+is deleted in the table.
+
+Assuming that we spawn fewer processes than the maximum amount of
+unique process identifiers in the system, one has always been able to
+determine the order of process creation just by comparing process
+identifiers. If PidX is larger than PidY, then PidX was created after
+PidY assuming both identifiers originates from the same node. However,
+since we have a quite limited amount of unique identifiers today
+(2^28), this property cannot be relied upon if we create large amount
+of processes. But never the less, this is a property the system always
+have had.
+
+If we would have had a huge amount of unique identifiers available, it
+would have tempting to drop or modify this ordering property as
+described above. The ordering property could for example be based on
+the scheduler performing the spawn operation. It would have been
+possible to reserve large ranges of identifiers exclusive for each
+scheduler thread which could be used minimizing the need for
+communication when allocating identifiers. The amount of identifiers
+we got to work with today is, however, not even close to be enough for
+such an approach.
+
+Since we have a limited amount of unique identifiers, we need to be
+careful not to waste them. If previously used identifiers are reused
+too quick, identifiers originating from terminated processes will
+refer to newly created processes, and mixups will occur. The
+previously used approach was quite good at not wasting
+identifiers. Using a modified version of the same approach also lets
+us keep the ordering property that we have always had.
+
+#### Insert ####
+
+The original approach is more or less to search for next free index or
+slot in the array. The search starts from the last slot allocated. If
+we reach the end of the array we increase a "wrapped counter" and then
+continue the search. The process identifier is constructed by writing
+the index to the least significant set of bits, and the "wrapped
+counter" to the most significant set of bits. The amount of bits in
+each set of bits is decided at boot time, so that maximum index will
+just fit into the least significant set of bits.
+
+In the modified lock free version of this approach we more or less do
+it the same way, but with some important modifications trying to avoid
+unnecessary contention when multiple schedulers create processes
+simultaneously. Since multiple threads might be trying to search for
+the next free slot at the same time from the same starting point we
+want subsequent slots to be located in different cache lines. Multiple
+schedulers simultaneously writing new pointers into the table are
+therefore very likely to write into adjacent slots. If adjacent slots
+are located in the same cache line all modification of this cache line
+needs to be communicated between all involved processors which will be
+very expensive and scale very poor. By locating adjacent slots in
+different cache lines only true conflicts will trigger communication
+between involved processors, i.e., avoiding false sharing.
+
+A cache line is larger than a pointer, typically 8 or 16 times larger,
+so using one cache line for each slot only containing one pointer
+would be a waste of space. Each cache line will be able to hold a
+fixed amount of slots. The first slot of the table will be the first
+slot of the first cache line, the second slot of the table will be the
+first slot of the second cache line until we reach the end of the
+array. The next slot after that will be the second slot of the first
+cache line, etc, moving forward one cache line internal slot each time
+we wrap. This way we will be able to fit the same amount of pointers
+into an array of the same size while always keeping adjacent slots in
+different cache lines.
+
+The mapping from identifier to slot or index into the array gets a bit
+more complicated than before. Instead of a `shift` and a bitwise
+`and`, we get two `shift`s, two bitwise `and`s, and an `add` (see
+implementation of `erts_ptab_data2pix()` in `erl_ptab.h`). However, by
+storing this information optimized for lookup we only need a `shift`
+and a bitwise `and` on 32-bit platforms. On 64-bit platforms we got
+enough room for the 28-bit identifier in the least significant
+halfword, and the index in the most significant halfword, in other
+words, we just need to read the most significant halfword to get the
+index. That is, this operation is as fast, or faster than before. The
+downside is that on 32-bit platforms we need to convert this
+information into the 28-bit identifier number when printing, or when
+ordering identifiers from the same node. These operations are,
+however, extremely infrequent compared to lookups.
+
+When we insert a new element in the table we do the following:
+
+1. We begin by reserving space in the table by atomically
+ incrementing a counter of processes in the table. If our increment
+ brings the counter above the maximum size of the table, the
+ operation fail and a `system_limit` exception is raised.
+
+2. The table contains a 64-bit atomic variable of the last identifier
+ used. Only the least significant bits will be used when actually
+ creating the identifier. This identifier is where the search
+ begin.
+
+3. We increment last identifier value used. In order determine the
+ slot that corresponds to this identifier we call
+ `erts_ptab_data2pix()` that maps identifier to slot. We read the
+ content of the slot. If the slot is free we try to write a
+ reservation marker using an atomic compare and swap. If this fails
+ we repeat this step until it succeeds.
+
+4. Change the table variable of last identifier used. Since multiple
+ writes might occur at the same time this value may already have
+ been changed by to an identifier larger that the one we got. In
+ this case we can continue; otherwise, we need to change it to the
+ identifier we got.
+
+5. We now do some initializations of the process structure that
+ cannot be done before we know the process identifier, and have to
+ be done before we publish the structure in the table. This, for
+ example, includes storing the identifier in the process structure.
+
+6. Now we can publish the structure in the table by writing the the
+ pointer to the process structure in the slot previously reserved
+ in 3.
+
+Using this approach we keep the properties like identifier ordering,
+and identifier reuse while improving performance and scalability. It
+has one flaw, though. There is no guarantee that the operation will
+terminate. This can quite easily be fixed though, and will be fixed in
+the next release. We will get back to this below.
+
+#### Delete ####
+
+When a process terminates, we mark the process as terminated in the
+process structure, the counter of number of processes in the table is
+decreased, and the reference to the process structure is removed by
+writing a `NULL` pointer into the corresponding slot. The scheduler
+thread performing this then schedule a thread progress later job which
+will do the final cleanup and deallocate the process structure. The
+thread progress functionality will make sure that this job will not
+execute until it is certain that all managed threads have dropped all
+references to the process structure.
+
+### BIF Iterating Over the Table ###
+
+The `erlang:processes/1` and `erlang:port/1` BIFs iterate over the
+tables and return corresponding identifiers. These BIF should return a
+consistent snapshot of the table content during some time when the BIF
+is executing. In order to implement this we use locking in a strange
+way. We use an "inverted rwlock".
+
+When performing lookups in the table we do not need to bother about
+the locking at all, but when modifying the table we read lock the
+rwlock protecting the table which allows for multiple writers during
+normal operation. When the BIF that iterates over the table need
+access to the table it write locks the rwlock and reads content of the
+table. The BIF do not read the whole table in one go but instead read
+small chunks at time only write locking while reading. The actual
+implementation of the BIFs is out of the scope of this document.
+
+An out of the box rwlock will typically suffer from contention on the
+single cache line containing the state of the rwlock even in the case
+we are only read locking. Instead of using such an rwlock, we have our
+own implementation of reader optimized rwlocks which keeps track of
+reader threads in separate thread specific cache lines. This in order
+to avoid contention on a singe cache line. As long as we only do read
+lock operations, threads only need to read a global cache line and
+modify its own cache line, and by this minimize communication between
+involved processors. The iterating BIFs are normally very infrequently
+used, so in the normal case we will only do read lock operations on
+the table global rwlock.
+
+### Future Improvements ###
+
+The first improvement is to fix the guarantee so that insert
+operations will be guaranteed to terminate. When the operation starts
+we verify that there actually exist a free slot that we can use. The
+problem is that we might not find it since it may move when multiple
+threads modify the table at the same time as we are trying to find the
+slot. The easy fix is to abort the operation if an empty slot could
+not be found in a finite number operation, and then restart the
+operation under a write lock. This will be implemented in next
+release, but furter work should be made trying to find a better
+solution.
+
+This and also previous implementation do not work well when the table
+is nearly full. We will both get long search times for free slots, and
+we will reuse identifiers more frequently since we more frequently
+wrap during the search. These tables works best when the table is much
+larger than the amount of simultaneous existing processes. One easy
+improvement is to always have room for more processes than we allow in
+the table. This will also be implemented in the next release, but this
+should probably also be worked more on trying to find an even better
+solution.
+
+It would also be nice to get rid of the rwlock all together. The use
+of a reader optimized rwlock makes sure we do not any contention on
+the lock, but unnecessary memory barriers will be issued due to the
+lock. The main issue here is to modify iterating BIFs so that they do
+not require exclusive access to the table while reading a sequence of
+slots. In principle this should be rather easy, the code can handle
+sequences of variable sizes, so shrinking the sequence size of slots
+to one would solv the problem. This will, however, need some tweeks
+and modifications of not trival code, but is something that should be
+looked at in the future.
+
+By increasing the size of identifiers, at least on 64-bit machines
+(which isn't as easy as it first might seem) we get further room for
+improvement. Besides the obvious improvement of not reusing
+identifiers as fast as we currently do, it makes it possible to
+further avoid contention when inserting elements in the table. At
+least if we drop this ordering property, which isn't that useful
+anyway.
+
+### Some Benchmark Results ###
+
+In order to test modifications of the process table we ran a couple of
+benchmarks where lots of processes are spawned and terminated
+simultaneously, and got a speedup of between 150-200%. Running a
+similar benchmark but with ports we got a speedup of about 130%.
+
+The BIF `erlang:is_process_alive/1` is the closest you can get to a
+process table lookup only. The BIF looks up the process corresponding
+to the process identifier passed as argument, and then checks if it is
+alive. By running multiple processes looping over this BIF checking
+the same process, we get a speedup between 20000-23000%. Conceptually
+this operation only involve read operations. In the implementation
+used in R16B also only read operation are performed, while the
+previous implementation need to lock structures in order to read the
+data, suffering from both lock contention and contention due to
+modifications of cache lines used by lock internal data structures and
+the reference counter on the process being looked up.
+
+The benchmarks were run on a relatively new machine with an Intel i7
+quad core processor with hyper-threading using 8 schedulers. On a
+machine with more communication overhead and/or larger amount of
+logical processors the speedups are expected to be even larger.
diff --git a/erts/emulator/internal_doc/PortSignals.md b/erts/emulator/internal_doc/PortSignals.md
new file mode 100644
index 0000000000..b1afb7c5cb
--- /dev/null
+++ b/erts/emulator/internal_doc/PortSignals.md
@@ -0,0 +1,267 @@
+Port Signals
+============
+
+Problems
+--------
+
+Erlang ports conceptually are very similar to Erlang processes. Erlang
+processes execute Erlang code in the virtual machine, while an Erlang
+port execute native code typically used for communication with the
+outside world. For example, when an Erlang process wants to
+communicate using TCP over the network, it communicates via an Erlang
+port implementing the TCP socket interface in native code. Both Erlang
+Processes and Ports communicate using asynchronous signaling. The
+native code executed by an Erlang port is a collection of callback
+functions, called a driver. Each callback more or less implements the
+code of a signal to, or from the port.
+
+Even though processes and ports conceptually always have been very
+similar, the implementations have been very different. Originally,
+more or less all port signals were handled synchronously at the time
+they occurred. Very early in the development of the SMP support for
+the runtime system we recognized that this was a huge problem for
+signals between ports and the outside world. That is, I/O events to
+and from the outside world, or I/O signals. This was one of the first
+things that had to be rewritten in order to be able to do I/O in
+parallel at all. The solution was to implement scheduling of these
+signals. I/O signals corresponding to different ports could then be
+executed in parallel on different scheduler threads. Signals from
+processes to ports was not as big of a problem as the I/O signals, and
+the implementation of those was left as they were.
+
+Each port is protected by its own lock to protect against simultaneous
+execution in multiple threads. Previously when a process, executing on
+a scheduler thread, sent a port a signal, it locked the port lock and
+synchronously executed the code corresponding to the signal. If the
+lock was busy, the scheduler thread blocked waiting until it could
+lock the lock. If multiple processes executing simultaneously on
+different scheduler threads, sent signals to the same port, schedulers
+suffered from heavy lock contention. Such contention could also occur
+between I/O signals for the port executing on one scheduler thread,
+and a signal from a process to the port executing on another scheduler
+thread. Beside the contention issues, we also loose potential work to
+execute in parallel on different scheduler threads. This since the
+process sending the *asynchronous* signal is blocked while the code
+implementing the signal is executed synchronously.
+
+Solution
+--------
+
+In order to prevent multiple schedulers from trying to execute signals
+to/from the same port simultaneously, we need to be able to ensure
+that all signals to/from a port are executed in sequence on one
+scheduler. More or less, the only way to do this is to schedule all
+types of signals. Signals corresponding to a port can then be executed
+in sequence by one single scheduler thread. If only one thread tries
+to execute the port, no contention will appear on the port
+lock. Besides getting rid of the contention, processes sending signals
+to the port can also continue execution of their own Erlang code on
+other schedulers at the same time as the signaling code is executing
+on another scheduler.
+
+When implementing this there are a couple of important properties that
+we either need, or want to preserve:
+
+* Signal ordering guarantee. Signals from process `X` to port `Y`,
+ *must* be delivered to `Y` in the same order as sent from `X`.
+
+* Signal latency. Due to the previous synchronous implementation,
+ latency of signals sent from processes to ports have usually been
+ very low. During contention the latency has of course
+ increased. Users expect latency of these signals to be low, a
+ sudden increase in latency would not be appreciated by our users.
+
+* Compatible flow control. Ports have for a very long time had the
+ possibility to use the busy port functionality when implementing
+ flow control. One may argue that this functionality fits very bad
+ with the conceptually completely asynchronous signaling, but the
+ functionality has been there for ages and is expected to be
+ there. When a port sets itself into a busy state, `command`
+ signals should not be delivered, and senders of such signals
+ should suspend until the port sets itself in a not busy state.
+
+### Scheduling of Port Signals ###
+
+A run queue has four queues for processes of different priority and
+one queue for ports. The scheduler thread associated with the run
+queue switch evenly between execution of processes and execution of
+ports while both processes and ports exist in the queue. This is not
+completely true, but not important for this discussion. A port that is
+in a run queue also has a queue of tasks to execute. Each task
+corresponds to an in- or outgoing signal. When the port is selected
+for execution each task will be executed in sequence. The run queue
+locks not only protected the queues of ports, but also the queues of
+port tasks.
+
+Since we go from a state where I/O signals are the only port related
+signals scheduled, to a state where potentially all port related
+signals may be scheduled we may drastically increase the load on the
+run queue lock. The amount of scheduled port tasks very much depend on
+the Erlang application executing, which we do not control, and we do
+not want to get increased contention on the run queue locks. We
+therefore need another approach of protecting the port task queue.
+
+#### Task Queue ####
+
+We chose a "semi locked" approach, with one public locked task queue,
+and a private, lock free, queue like, task data structure. This "semi
+locked" approach is similar to how the message boxes of processes are
+managed. The lock is port specific and only used for protection of
+port tasks, so the run queue lock is now needed in more or less the
+same way for ports as for processes. This ensures that we wont see an
+increased lock contention on run queue locks due to this rewrite of
+the port functionality.
+
+When an executing port runs out of work to execute in the private task
+data structure, it moves the public task queue into the private task
+data structure while holding the lock. Once tasks has been moved to
+the private data structure no lock protects them. This way the port
+can continue working on tasks in the private data structure without
+having to fight for the lock.
+
+I/O signals may however be aborted. This could be solved by letting
+the port specific scheduling lock also protect the private task data
+structure, but then the port very frequently would have to fight with
+others enqueueing new tasks. In order to handle this while keeping the
+private task data structure lock free, we use a similar "non
+aggressive" approach as we use when handling processes that gets
+suspended while in the run queue. Instead of removing the aborted port
+task, we just mark it as aborted using an atomic memory
+operation. When a task is selected for execution, we first verify that
+it has not been aborted. If aborted we, just drop the task.
+
+A task that can be aborted is referred via another data structure from
+other parts of the system, so that a thread that needs to abort the
+task can reach it. In order to be sure to safely deallocate a task
+that is no longer used, we first clear this reference and then use the
+thread progress functionality in order to make sure no references can
+exist to the task. Unfortunately, also unmanaged threads might abort
+tasks. This is very infrequent, but might occur. This could be handled
+locally for each port, but would require extra information in each
+port structure which very infrequently would be used. Instead of
+implementing this in each port, we implemented general functionality
+that can be used from unmanaged threads to delay thread progress.
+
+The private "queue like" task data structure could have been an
+ordinary queue if it wasn't for the busy port functionality. When the
+port has flagged itself as busy, `command` signals are not allowed to
+be delivered and need to be blocked. Other signals sent from the same
+sender following a `command` signal that has been blocked also have to
+be blocked; otherwise, we would violate the ordering guarantee. At the
+same time, other signals that have no dependencies to blocked
+`command` signals are expected to be delivered.
+
+The above requirements makes the private task data structure a rather
+complex data structure. It has a queue of unprocessed tasks, and a
+busy queue. The busy queue contains blocked tasks corresponding to
+`command` signals, and tasks with dependencies to such tasks. The busy
+queue is accompanied by a table over blocked tasks based on sender
+with a references into last task in the busy queue from a specific
+sender. This since we need check for dependencies when new tasks are
+processed in the queue of unprocessed tasks. When a new task is
+processed that needs to be blocked it isn't enqueued at the end of the
+busy queue, but instead directly after the last task with the same
+sender. This in order to easily be able to detect when we have tasks
+that no longer have any dependencies to tasks corresponding to
+`command` signals which should be moved out of the busy queue. When
+the port executes, it switches between processing tasks from the busy
+queue, and processing directly from the unprocessed queue based on its
+busy state. When processing directly from the unprocessed queue it
+might, of course, have to move a task into the busy queue instead of
+executing it.
+
+#### Busy Port Queue ####
+
+Since it is the port itself which decides when it is time to enter a
+busy state, it needs to be executing in order to enter the busy
+state. As a result of `command` signals being scheduled, we may get
+into a situation where the port gets flooded by a huge amount of
+`command` signals before it even gets a chance to set itself into a
+busy state. This since it has not been scheduled for execution
+yet. That is, under these circumstances the busy port functionality
+loose the flow control properties it was intended to provide.
+
+In order to solve this, we introduced a new busy feature, namely "busy
+port queue". The port has a limit of `command` data that is allowed to
+be enqueued in the task queue. When this limit is reached, the port
+will automatically enter a busy port queue state. When in this state,
+senders of `command` signals will be suspended, but `command` signals
+will still be delivered to the port unless it is also in a busy port
+state. This limit is known as the high limit.
+
+There is also a low limit. When the amount of queued `command` data
+falls below this limit and the port is in a busy port queue state, the
+busy port queue state is automatically disabled. The low limit should
+typically be significantly lower than the high limit in order to
+prevent frequent oscillation around the busy port queue state.
+
+By introduction of this new busy state we still can provide the flow
+control. Old driver do not even have to be changed. The limits can,
+however, be configured and even disabled by the port. By default the
+high limit is 8 KB and the low limit is 4 KB.
+
+### Preparation of Signal Send ###
+
+Previously all operations sending signals to ports began by acquiring
+the port lock, then performed preparations for sending the signal, and
+then finaly sent the signal. The preparations typically included
+inspecting the state of the port, and preparing the data to pass along
+with the signal. The preparation of data is frequently quite time
+consuming, and did not really depend on the port. That is we would
+like to do this without having the port lock locked.
+
+In order to improve this, state information was re-organized in the
+port structer, so that we can access it using atomic memory
+operations. This together with the new port table implementation,
+enabled us to lookup the port and inspect the state before acquiring
+the port lock, which in turn made it possible to perform preparations
+of signal data before acquiring the port lock.
+
+### Preserving Low Latency ###
+
+If we disregard the contended cases, we will inevitably get a higher
+latency when scheduling signals for execution at a later time than by
+executing the signal immediately. In order to preserve the low latency
+we now first check if this is a contended case or not. If it is, we
+schedule the signal for later execution; otherwise, we execute the
+signal immediately. It is a contended case if other signals already
+are scheduled on the port, or if we fail to acquire the port
+lock. That is we will not block waiting for the lock.
+
+Doing it this way we will preserve the low latency at the expense of
+lost potential parallel execution of the signal and other code in the
+process sending the signal. This default behaviour can however be
+changed on port basis or system wide, forcing scheduling of all
+signals from processes to ports that are not part of a synchronous
+communication. That is, an unconditional request/response pair of
+asynchronous signals. In this case it is no potential for parallelism,
+and by that no point forcing scheduling of the request signal.
+
+The immediate execution of signals may also cause a scheduler that is
+about to execute scheduled tasks to block waiting for the port
+lock. This is however more or less the only scenario where a scheduler
+needs to wait for the port lock. The maximum time it has to wait is
+the time it takes to execute one signal, since we always schedule
+signals when contention occurs.
+
+### Signal Operations ###
+
+Besides implementing the functionality enabling the scheduling,
+preparation of signal data without port lock, etc, each operation
+sending signals to ports had to be quite extensively re-written. This
+in order to move all sub-operations that can be done without the lock
+to a place before we have acquired the lock, and also since signals
+now sometimes are executed immediately and sometimes scheduled for
+execution at a later time which put different requirements on the data
+to pass along with the signal.
+
+### Some Benchmark Results ###
+
+When running some simple benchmarks where contention only occur due to
+I/O signals contending with signals from one single process we got a
+speedup of 5-15%. When multiple processes send signals to one single
+port the improvements can be much larger, but the scenario with one
+process contending with I/O is the most common one.
+
+The benchmarks were run on a relatively new machine with an Intel i7
+quad core processor with hyper-threading using 8 schedulers. \ No newline at end of file
diff --git a/erts/emulator/internal_doc/ProcessManagementOptimizations.md b/erts/emulator/internal_doc/ProcessManagementOptimizations.md
new file mode 100644
index 0000000000..9e83633bef
--- /dev/null
+++ b/erts/emulator/internal_doc/ProcessManagementOptimizations.md
@@ -0,0 +1,172 @@
+Process Management Optimizations
+================================
+
+Problems
+--------
+
+Early versions of the SMP support for the runtime system completely
+relied on locking in order to protect data accesses from multiple
+threads. In some cases this isn't that problematic, but in some cases
+it really is. It complicates the code, ensuring all locks needed are
+actually held, and ensuring that all locks are acquired in such an
+order that no deadlock occur. Acquiring locks in the right order often
+also involve releasing locks held, forcing threads to reread data
+already read. A good recipe for creation of bugs. Trying to use more
+fine-grained locking in order to increase possible parallelism in the
+system makes the complexity situation even worse. Having to acquire a
+bunch of locks when doing operations also often cause heavy lock
+contention which cause poor scalability.
+
+Management of processes internally in the runtime system suffered from
+these problems. When changing state on a process, for example from
+`waiting` to `runnable`, a lock on the process needed to be
+locked. When inserting a process into a run queue also a lock
+protecting the run queue had to be locked. When migrating a process
+from one run queue to another run queue, locks on both run queues and
+on the process had to be locked.
+
+This last example is a quite common case in during normal
+operation. For example, when a scheduler thread runs out of work it
+tries to steal work from another scheduler threads run queue. When
+searching for a victim to steal from there was a lot of juggling of
+run queue locks involved, and during the actual theft finalized by
+having to lock both run queues and the process. When one scheduler
+runs out of work, often others also do, causing lots of lock
+contention.
+
+Solution
+--------
+
+### Process ###
+
+In order to avoid these situations we wanted to be able to do most of
+the fundamental operations on a process without having to acquire a
+lock on the process. Some examples of such fundamental operations are,
+moving a process between run queues, detecting if we need to insert it
+into a run queue or not, detecting if it is alive or not.
+
+All of this information in the process structure that was needed by
+these operations was protected by the process `status` lock, but the
+information was spread across a number of fields. The fields used was
+typically state fields that could contain a small number of different
+states. By reordering this information a bit we could *easily* fit
+this information into a 32-bit wide field of bit flags (only 12-flags
+were needed). By moving this information we could remove five 32-bit
+wide fields and one pointer field from the process structure! The move
+also enabled us to easily read and change the state using atomic
+memory operations.
+
+### Run Queue ###
+
+As with processes we wanted to be able to do the most fundamental
+operations without having to acquire a lock on it. The most important
+being able to determine if we should enqueue a process in a specific
+run queue or not. This involves being able to read actual load, and
+load balancing information.
+
+The load balancing functionality is triggered at repeated fixed
+intervals. The load balancing more or less strives to even out run
+queue lengths over the system. When balancing is triggered,
+information about every run queue is gathered, migrations paths and
+run queue length limits are set up. Migration paths and limits are
+fixed until the next balancing has been done. The most important
+information about each run queue is the maximum run queue length since
+last balancing. All of this information were previously stored in the
+run queues themselves.
+
+When a process has become runnable, for example due to reception of a
+message, we need to determine which run queue to enqueue it
+in. Previously this at least involved locking the run queue that the
+process currently was assigned to while holding the status lock on the
+process. Depending on load we sometimes also had to acquire a lock on
+another run queue in order to be able to determine if it should be
+migrated to that run queue or not.
+
+In order to be able to decide which run queue to use without having to
+lock any run queues, we moved all fixed balancing information out of
+the run queues into a global memory block. That is, migration paths
+and run queue limits. Information that need to be frequently updated,
+like for example maximum run queue length, were kept in the run queue,
+but instead of operating on this information under locks we now use
+atomic memory operations when accessing this information. This made it
+possible to first determine which run queue to use, without locking
+any run queues, and when decided, lock the chosen run queue and insert
+the process.
+
+#### Fixed Balancing Information ####
+
+When determining which run queue to choose we need to read the fixed
+balancing information that we moved out of the run queues. This
+information is global, read only between load balancing operations,
+but will be changed during a load balancing. We do not want to
+introduce a global lock that needs to be acquired when accessing this
+information. A reader optimized rwlock could avoid some of the
+overhead since the data is most frequently read, but it would
+unavoidably cause disruption during load balancing, since this
+information is very frequently read. The likelihood of a large
+disruption due to this also increase as number of schedulers grows.
+
+Instead of using a global lock protecting modifications of this
+information, we write a completely new version of it at each load
+balancing. The new version is written in another memory block than the
+previous one, and published by issuing a write memory barrier and then
+storing a pointer to the new memory block in a global variable using
+an atomic write operation.
+
+When schedulers need to read this information, they read the pointer
+to currently used information using an atomic read operation, and then
+issue a data dependency read barrier, which on most architectures is a
+no-op. That is, it is very little overhead getting access to this
+information.
+
+Instead of allocating and deallocating memory blocks for the different
+versions of the balancing information we keep old memory blocks and
+reuse them when it is safe to do so. In order to be able to determine
+when it is safe to reuse a block we use the thread progress
+functionality, ensuring that no threads have any references to the
+memory block when we reuse it.
+
+#### Be Less Aggressive ####
+
+We implemented a test version using lock free run queues. This
+implementation did however not perform as good as the version using
+one lock per run queue. The reason for this was not investigated
+enough to say why this was. Since the locked version performed better
+we kept it, at least for now. The lock free version, however, forced
+us to use other solutions, some of them we kept.
+
+Previously when a process that was in a run queue got suspended, we
+removed it from the queue straight away. This involved locking the
+process, locking the run queue, and then unlinking it from the double
+linked list implementing the queue. Removing a process from a lock
+free queue gets really complicated. Instead, of removing it from the
+queue, we just leave it in the queue and mark it as suspended. When
+later selected for execution we check if the process is suspended, if
+so just dropped it. During its time in the queue, it might also get
+resumed again, if so execute it when it get selected for execution.
+
+By keeping this part when reverting back to a locked implementation,
+we could remove a pointer field in each process structure, and avoid
+unnecessary operations on the process and the queue which might cause
+contention.
+
+### Combined Modifications ###
+
+By combining the modifications of the process state management and the
+run queue management, we can do large parts of the work involved when
+managing processes with regards to scheduling and migration without
+having any locks locked at all. In these situations we previously had
+to have multiple locks locked. This of course caused a lot of rewrites
+across large parts of the runtime system, but the rewrite both
+simplified code and eliminated locking at a number of places. The
+major benefit is, of course, reduced contention.
+
+### A Benchmark Result ###
+
+When running the chameneosredux benchmark, schedulers frequently run
+out of work trying to steal work from each other. That is, either
+succeeding in migrating, or trying to migrate processes which is a
+scenario which we wanted to optimize. By the introduction of these
+improvements, we got a speedup of 25-35% when running this benchmark
+on a relatively new machine with an Intel i7 quad core processor with
+hyper-threading using 8 schedulers. \ No newline at end of file
diff --git a/erts/emulator/internal_doc/SuperCarrier.md b/erts/emulator/internal_doc/SuperCarrier.md
new file mode 100644
index 0000000000..0ad6af41de
--- /dev/null
+++ b/erts/emulator/internal_doc/SuperCarrier.md
@@ -0,0 +1,191 @@
+Super Carrier
+=============
+
+A super carrier is large memory area, allocated at VM start, which can
+be used during runtime to allocate normal carriers from.
+
+The super carrier feature was introduced in OTP R16B03. It is
+enabled with command line option +MMscs <size in Mb>
+and can be configured with other options.
+
+Problem
+-------
+
+The initial motivation for this feature was customers asking for a way
+to pre-allocate physcial memory at VM start for it to use.
+
+Other problems were different experienced limitations of the OS
+implementation of mmap:
+
+* Increasingly bad performance of mmap/munmap as the number of mmap'ed areas grow.
+* Fragmentation problem between mmap'ed areas.
+
+A third problem was management of low memory in the halfword
+emulator. The implementation used a naive linear search structure to
+hold free segments which would lead to poor performance when
+fragmentation increased.
+
+
+Solution
+--------
+
+Allocate one large continious area of address space at VM start and
+then use that area to satisfy our dynamic memory need during
+runtime. In other words: implement our own mmap.
+
+### Use cases ###
+
+If command line option +MMscrpm (Reserve Physical Memory) is set to
+false, only virtual space is allocated for the super carrier from
+start. The super carrier then acts as an "alternative mmap" implementation
+without changing the consumption of physical memory pages. Physical
+pages will be reserved on demand when an allocation is done from the super
+carrier and be unreserved when the memory is released back to the
+super carrier.
+
+If +MMscrpm is set to true, which is default, the initial allocation
+will reserve physical memory for the entire super carrier. This can be
+used by users that want to ensure a certain *minimum* amount of
+physical memory for the VM.
+
+However, what reservation of physical memory actually means highly
+depends on the operating system, and how it is configured. For
+example, different memory overcommit settings on Linux drastically
+change the behaviour.
+
+A third feature is to have the super carrier limit the *maximum*
+amount of memory used by the VM. If +MMsco (Super Carrier Only) is set
+to true, which is default, allocations will only be done from the
+super carrier. When the super carrier gets full, the VM will fail due
+to out of memory.
+If +MMsco is false, allocations will use mmap directly if the super
+carrier is full.
+
+
+
+### Implementation ###
+
+The entire super carrier implementation is kept in erl_mmap.c. The
+name suggest that it can be viewed as our own mmap implementation.
+
+A super carrier needs to satisfy two slightly different kinds of
+allocation requests; multi block carriers (MBC) and single block
+carriers (SBC). They are both rather large blocks of continious
+memory, but MBCs and SBCs have different demands on alignment and
+size.
+
+SBCs can have arbitrary size and do only need minimum 8-byte
+alignment.
+
+MBCs are more restricted. They can only have a number of fixed
+sizes that are powers of 2. The start address need to have a very
+large aligment (currently 256 kb, called "super alignment"). This is a
+design choice that allows very low overhead per allocated block in the
+MBC.
+
+To reduce fragmentation within the super carrier, it is good to keep SBCs
+and MBCs apart. MBCs with their uniform alignment and sizes can be
+packed very efficiently together. SBCs without demand for aligment can
+also be allocated quite efficiently together. But mixing them can lead
+to a lot of memory wasted when we need to create large holes of
+padding to the next alignment limit.
+
+The super carrier thus contains two areas. One area for MBCs growing from
+the bottom and up. And one area for SBCs growing from the top and
+down. Like a process with a heap and a stack growing towards each
+other.
+
+
+### Data structures ###
+
+The MBC area is called **sa** as in super aligned and the SBC area is
+called **sua** as in super un-aligned.
+
+Note that the "super" in super alignment and the "super" in super
+carrier has nothing to do with each other. We could have choosen
+another naming to avoid confusion, such as "meta" carrier or "giant"
+aligment.
+
+ +-------+ <---- sua.top
+ | sua |
+ | |
+ |-------| <---- sua.bot
+ | |
+ | |
+ | |
+ |-------| <---- sa.top
+ | |
+ | sa |
+ | |
+ +-------+ <---- sa.bot
+
+
+When a carrier is deallocated a free memory segment will be created
+inside the corresponding area, unless the carrier was at the very top
+(in `sa`) or bottom (in `sua`) in which case the area will just shrink
+down or up.
+
+We need to keep track of all the free segments in order to reuse them
+for new carrier allocations. One initial idea was to use the same
+mechanism that is used to keep track of free blocks within MBCs
+(alloc_util and the different strategies). However, that would not be
+as straight forward as one can think and can also waste quite a lot of
+memory as it uses prepended block headers. The granularity of the
+super carrier is one memory page (usually 4kb). We want to allocate
+and free entire pages and we don't want to waste an entire page just
+to hold the block header of the following pages.
+
+Instead we store the meta information about all the free segments in a
+dedicated area apart from the `sa` and `sua` areas. Every free segment is
+represented by a descriptor struct (`ErtsFreeSegDesc`).
+
+ typedef struct {
+ RBTNode snode; /* node in 'stree' */
+ RBTNode anode; /* node in 'atree' */
+ char* start;
+ char* end;
+ }ErtsFreeSegDesc;
+
+To find the smallest free segment that will satisfy a carrier allocation
+(best fit), the free segments are organized in a tree sorted by
+size (`stree`). We search in this tree at allocation. If no free segment of
+sufficient size was found, the area (`sa` or `sua`) is instead expanded.
+If two or more free segments with equal size exist, the one at lowest
+address is choosen for `sa` and highest address for `sua`.
+
+At carrier deallocation, we want to coalesce with any adjacent free
+segments, to form one large free segment. To do that, all free
+segments are also organized in a tree sorted in address order (`atree`).
+
+So, in total we keep four trees of free descriptors for the super
+carrier; two for `sa` and two for `sua`. They all use the same
+red-black-tree implementation that support the different sorting
+orders used.
+
+When allocating a new MBC we first search after a free segment in `sa`,
+then try to raise `sa.top`, and then as a fallback try to search after a
+free segment in `sua`. When an MBC is allocated in `sua`, a larger segment
+is allocated which is then trimmed to obtain the right
+alignment. Allocation search for an SBC is done in reverse order. When
+an SBC is allocated in `sa`, the size is aligned up to super aligned
+size.
+
+### The free descriptor area ###
+
+As mentioned above, the descriptors for the free segments are
+allocated in a separate area. This area has a constant configurable
+size (+MMscrfsd) that defaults to 65536 descriptors. This should be
+more than enough in most cases. If the descriptors area should fill up,
+new descriptor areas will be allocated first directly from the OS, and
+then from `sua` and `sa` in the super carrier, and lastly from the memory
+segment itself which is being deallocated. Allocating free descriptor
+areas from the super carrier is only a last resort, and should be
+avoided, as it creates fragmentation.
+
+### Halfword emulator ###
+
+The halfword emulator uses the super carrier implementation to manage
+its low memory mappings thar are needed for all term storage. The
+super carrier can here not be configured by command line options. One
+could imagine a second configurable instance of the super carrier used
+by high memory allocation, but that has not been implemented.
diff --git a/erts/emulator/internal_doc/ThreadProgress.md b/erts/emulator/internal_doc/ThreadProgress.md
new file mode 100644
index 0000000000..6118bcf0f6
--- /dev/null
+++ b/erts/emulator/internal_doc/ThreadProgress.md
@@ -0,0 +1,308 @@
+Thread Progress
+===============
+
+Problems
+--------
+
+### Knowing When Threads Have Completed Accesses to a Data Structure ###
+
+When multiple threads access the same data structure you often need to
+know when all threads have completed their accesses. For example, in
+order to know when it is safe to deallocate the data structure. One
+simple way to accomplish this is to reference count all accesses to
+the data structure. The problem with this approach is that the cache
+line where the reference counter is located needs to be communicated
+between all involved processors. Such communication can become
+extremely expensive and will scale poorly if the reference counter is
+frequently accessed. That is, we want to use some other approach of
+keeping track of threads than reference counting.
+
+### Knowing That Modifications of Memory is Consistently Observed ###
+
+Different hardware architectures have different memory models. Some
+architectures allows very aggressive reordering of memory accesses
+while other architectures only reorder a few specific cases. Common to
+all modern hardware is, however, that some type of reordering will
+occur. When using locks to protect all memory accesses made from
+multiple threads such reorderings will not be visible. The locking
+primitives will ensure that the memory accesses will be ordered. When
+using lock free algorithms one do however have to take this reordering
+made by the hardware into account.
+
+Hardware memory barriers or memory fences are instructions that can be
+used to enforce order between memory accesses. Different hardware
+architectures provide different memory barriers. Lock free algorithms
+need to use memory barriers in order to ensure that memory accesses
+are not reordered in such ways that the algorithm breaks down. Memory
+barriers are also expensive instructions, so you typically want to
+minimize the use of these instructions.
+
+Functionality Used to Address These Problems
+-------------------------------------------
+
+The "thread progress" functionality in the Erlang VM is used to
+address these problems. The name "thread progress" was chosen since we
+want to use it to determine when all threads in a set of threads have
+made such progress so that two specific events have taken place for
+all them.
+
+The set of threads that we are interested in we call managed
+threads. The managed threads are the only threads that we get any
+information about. These threads *have* to frequently report
+progress. Not all threads in the system are able to frequently report
+progress. Such threads cannot be allowed in the set of managed threads
+and are called unmanaged threads. An example of unmanaged threads are
+threads in the async thread pool. Async threads can be blocked for
+very long times and by this be prevented from frequently reporting
+progress. Currently only scheduler threads and a couple of other
+threads are managed threads.
+
+### Thread Progress Events ###
+
+Any thread in the system may use the thread progress functionality in
+order to determine when the following events have occured at least
+once in all managed threads:
+
+1. The thread has returned from other code to a known state in the
+ thread progress functionality, which is independent of any other
+ code.
+2. The thread has executed a full memory barrier.
+
+These events, of course, need to occur ordered to other memory
+operations. The operation of determining this begins by initiating the
+thread progress operation. The thread that initiated the thread
+progress operation after this poll for the completion of the
+operation. Both of these events must occur at least once *after* the
+thread progress operation has been initiated, and at least once
+*before* the operation has completed in each managed thread. This is
+ordered using communication via memory which makes it possible to draw
+conclusion about the memory state after the thread progress operation
+has completed. Lets call the progress made from initiation to
+comletion for "thread progress".
+
+Assuming that the thread progress functionality is efficient, a lot of
+algorithms can both be simplified and made more efficient than using
+the first approach that comes to mind. A couple of examples follows.
+
+By being able to determine when the first event above has occurred we
+can easily know when all managed threads have completed accesses to a
+data structure. This can be determined the following way. We have an
+implementation of some functionality `F` using a data structure
+`D`. The reference to `D` is always looked up before `D` is being
+accessed, and the references to `D` is always dropped before we leave
+the code implementing `F`. If we remove the possibility to look up `D`
+and then wait until the first event has occurred in all managed
+threads, no managed threads can have any references to the data
+structure `D`. This could for example have been achieved by using
+reference counting, but the cache line containing the reference
+counter would in this case be ping ponged between all processors
+accessing `D` at every access.
+
+By being able to determine when the second event has occurred it is
+quite easy to do complex modifications of memory that needs to be seen
+consistently by other threads without having to resort to locking. By
+doing the modifications, then issuing a full memory barrier, then wait
+until the second event has occurred in all managed threads, and then
+publish the modifications, we know that all managed threads reading
+this memory will get a consistent view of the modifications. Managed
+threads reading this will not have to issue any extra memory barriers
+at all.
+
+Implementation of the Thread Progress Functionality
+---------------------------------------------------
+
+### Requirement on the Implementation ###
+
+In order to be able to determine when all managed threads have reached
+the states that we are interested in we need to communicate between
+all involved threads. We of course want to minimize this
+communication.
+
+We also want threads to be able to determine when thread progress has
+been made relatively fast. That is we need to have some balance
+between comunication overhead and time to complete the operation.
+
+### API ###
+
+I will only present the most important functions in the API here.
+
+* `ErtsThrPrgrVal erts_thr_progress_later(void)` - Initiation of the
+ operation. The thread progress value returned can be used testing
+ for completion of the operation.
+* `int erts_thr_progress_has_reached(ErtsThrPrgrVal val)` - Returns
+ a non zero value when we have reached the thread progress value
+ passed as argument. That is, when a non zero value is returned the
+ operation has completed.
+
+When a thread calls `my_val = erts_thr_progress_later()` and waits for
+`erts_thr_progress_has_reached(my_val)` to return a non zero value it
+knows that thread progress has been made.
+
+While waiting for `erts_thr_progress_has_reached()` to return a non
+zero value we typically do not want to block waiting, but instead want
+to continue working with other stuff. If we run out of other stuff to
+work on we typically do want to block waiting until we have reached
+the thread progress value that we are waiting for. In order to be able
+to do this we provide functionality for waking up a thread when a
+certain thread progress value has been reached:
+
+* `void erts_thr_progress_wakeup(ErtsSchedulerData *esdp,
+ ErtsThrPrgrVal val)` - Request wake up. The calling thread will be
+ woken when thread progress has reached val.
+
+Managed threads frequently need to update their thread progress by
+calling the following functions:
+
+* `int erts_thr_progress_update(ErtsSchedulerData *esdp)` - Update
+ thread progress. If a non zero value is returned
+ `erts_thr_progress_leader_update()` has to be called without any
+ locks held.
+* `int erts_thr_progress_leader_update(ErtsSchedulerData *esdp)` -
+ Leader update thread progress.
+
+Unmanaged threads can delay thread progress beeing made:
+
+* `ErtsThrPrgrDelayHandle erts_thr_progress_unmanaged_delay(void)` -
+ Delay thread progress.
+* `void erts_thr_progress_unmanaged_continue(ErtsThrPrgrDelayHandle
+ handle)` - Let thread progress continue.
+
+Scheduler threads can schedule an operation to be executed by the
+scheduler itself when thread progress has been made:
+
+* `void erts_schedule_thr_prgr_later_op(void (*funcp)(void *), void
+ *argp, ErtsThrPrgrLaterOp *memp)` - Schedule a call to `funcp`. The
+ call `(*funcp)(argp)` will be executed when thread progress has been
+ made since the call to `erts_schedule_thr_prgr_later_op()` was
+ made.
+
+### Implementation ###
+
+In order to determine when the events has happened we use a global
+counter that is incremented when all managed threads have called
+`erts_thr_progress_update()` (or `erts_thr_progress_leader_update()`).
+This could naively be implemented using a "thread confirmed" counter.
+This would however cause an explosion of communication where all
+involved processors would need to communicate with each other at each
+update.
+
+Instead of confirming at a global location each thread confirms that
+it accepts in increment of the global counter in its own cache
+line. These confirmation cache lines are located in sequence in an
+array, and each confirmation cache line will only be written by one
+and only one thread. One of the managed threads always have the leader
+responsibility. This responsibility may jump between threads, but as
+long as there are some activity in the system always one of them will
+have the leader responsibility. The thread with the leader
+responsibility will call `erts_thr_progress_leader_update()` which
+will check that all other threads have confirmed an increment of the
+global counter before doing the increment of the global counter. The
+leader thread is the only thread reading the confirmation cache
+lines.
+
+Doing it this way we will get a communication pattern of information
+going from the leader thread out to all other managed threads and then
+back from the other threads to the leader thread. This since only the
+leader thread will write to the global counter and all other threads
+will only read it, and since each confirmation cache lines will only
+be written by one specific thread and only read by the leader
+thread. When each managed thread is distributed over different
+processors, the communication between processors will be a reflection
+of this communication pattern between threads.
+
+The value returned from `erts_thr_progress_later()` equals the, by
+this thread, latest confirmed value plus two. The global value may be
+latest confirmed value or latest confirmed value minus one. In order
+to be certain that all other managed threads actually will call
+`erts_thr_progress_update()` at least once before we reach the value
+returned from `erts_thr_progress_later()`, the global counter plus one
+is not enough. This since all other threads may already have confirmed
+current global value plus one at the time when we call
+`erts_thr_progress_later()`. They are however guaranteed not to have
+confirmed global value plus two at this time.
+
+The above described implementation more or less minimizes the
+comunication needed before we can increment the global counter. The
+amount of communication in the system due to the thread progress
+functionality however also depend on the frequency with which managed
+threads call `erts_thr_progress_update()`. Today each scheduler thread
+calls `erts_thr_progress_update()` more or less each time an Erlang
+process is scheduled out. One way of further reducing communication
+due to the thread progress functionality is to only call
+`erts_thr_progress_update()` every second, or third time an Erlang
+process is scheduled out, or even less frequently than that. However,
+by doing updates of thread progress less frequently all operations
+depending on the thread progress functionality will also take a longer
+time.
+
+#### Delay of Thread Progress by Unmanaged Threads ####
+
+In order to implement delay of thread progress from unmanaged threads
+we use two reference counters. One being `current` and one being
+`waiting`. When an unmanaged thread wants to delay thread progress it
+increments `current` and gets a handle back to the reference counter
+it incremented. When it later wants to enable continuation of thread
+progress it uses the handle to decrement the reference counter it
+previously incremented.
+
+When the leader threads is about to increment the global thread
+progress counter it verifies that the `waiting` counter is zero before
+doing so. If not zero, the leader isn't allowed to increment the
+global counter, and needs to wait before it can do this. When it is
+zero, it swaps the `waiting` and `current` counters before increasing
+the global counter. From now on the new `waiting` counter will
+decrease, so that it eventualy will reach zero, making it possible to
+increment the global counter the next time. If we only used one
+reference counter it would potentially be held above zero for ever by
+different unmanaged threads.
+
+When an unmanaged thread increment the `current` counter it will not
+prevent the next increment of the global counter, but instead the
+increment after that. This is sufficient since the global counter
+needs to be incremented two times before thread progress has been
+made. It is also desirable not to prevent the first increment, since
+the likelyhood increases that the delay is withdrawn before any
+increment of the global counter is delayed. That is, the operation
+will cause as little disruption as possible.
+
+However, this feature of delaying thread progress from unmanaged
+threads should preferably be used as little as possible, since heavy
+use of it will cause contention on the reference counter cache
+lines. The functionality is however very useful in code which normally
+only executes in managed threads, but which may under some infrequent
+circumstances be executed in other threads.
+
+#### Overhead ####
+
+The overhead caused by the thread progress functionality is more or
+less fixed using the same amount of schedulers regardless of the
+number of uses of the functionality. Already today quite a lot of
+functionality use it, and we plan to use it even more. When rewriting
+old implementations of ERTS internal functionality to use the thread
+progress functionality, this implies removing communication in the old
+implementation. Otherwise it is simply no point rewriting the old
+implementation to use the thread progress functionality. Since the
+thread progress overhead is more or less fixed, the rewrite will cause
+a reduction of the total communication in the system.
+
+##### An Example #####
+
+The main structure of an ETS table was originally managed using
+reference counting. Already a long time ago we replaced this strategy
+since the reference counter caused contention on each access of the
+table. The solution used was to schedule "confirm deletion" jobs on
+each scheduler in order to know when it was safe to deallocate the
+table structure of a removed table. These confirm deletion jobs needed
+to be allocated. That is, we had to allocate and deallocate as many
+blocks as schedulers in order to deallocate one block. This of course
+was a quite an expensive operation, but we only needed to do this once
+when removing a table. It was more important to get rid of the
+contention on the reference counter which was present on every
+operation on the table.
+
+When the thread progress functionality had been introduced, we could
+remove the code implementing the "confirm deletion" jobs, and then
+just schedule a thread progress later operation which deallocates the
+structure. Besides simplifying the code a lot, we got an increase of
+more than 10% of the number of transactions per second handled on a
+mnesia tpcb benchmark executing on a quad core machine.
diff --git a/erts/emulator/internal_doc/Tracing.md b/erts/emulator/internal_doc/Tracing.md
new file mode 100644
index 0000000000..30bc5327a7
--- /dev/null
+++ b/erts/emulator/internal_doc/Tracing.md
@@ -0,0 +1,220 @@
+Non-blocking trace setting
+==========================
+
+Introduction
+------------
+
+Before OTP R16 when trace settings were changed by `erlang:trace_pattern`,
+all other execution in the VM were halted while the trace operation
+was carried out in single threaded mode. Similar to code loading, this
+can impose a severe problem for availability that grows with the
+number of cores.
+
+In OTP R16, trace breakpoints are set in the code without blocking the
+VM. Erlang processes may continue executing undisturbed in parallel
+during the entire operation. The same base technique is used as for
+code loading. A staging area of breakpoints is prepared and then made
+active with a single atomic operation.
+
+
+Redesign of Breakpoint Wheel
+----------------------------
+
+To make it easier to manage breakpoints without single threaded mode a
+redesign of the breakpoint mechanism has been made. The old
+"breakpoint wheel" data structure was a circular double-linked list of
+breakpoints for each instrumented function. It was invented before the
+SMP emulator. To support it in the SMP emulator, is was essentially
+expanded to one breakpoint wheel per scheduler. As more breakpoint
+types have been added, the implementation have become messy and hard
+to understand and maintain.
+
+In the new design the old wheel was dropped and instead replaced by
+one struct (`GenericBp`) to hold the data for all types of breakpoints
+for each instrumented function. A bit-flag field is used to indicate
+what different type of break actions that are enabled.
+
+
+Same Same but Different
+-----------------------
+Even though `trace_pattern` use the same technique as the non-blocking
+code loading with replicated generations of data structures and an
+atomic switch, the implementations are quite separate from each
+other. One initial idea was to use the existing mechanism of code
+loading to do a dummy load operation that would make a copy of the
+affected modules. That copy could then be instrumented with
+breakpoints before making it reachable with the same atomic switch as
+done for code loading. This approach seems straight forward but has a
+number of shortcomings, one being the large memory footprint when many
+modules are instrumented. Another problem is how execution will reach
+the new instrumented code. Normally loaded code can only be reached
+through external functions calls. Trace settings must be activated
+instantaneously without the need of external function calls.
+
+The choosen solution is instead for tracing to use the technique of
+replication applied on the data structures for breakpoints. Two
+generations of breakpoints are kept and indentified by index of 0 and
+1. The global atomic variables `erts_active_bp_index` will determine
+which generation of breakpoints running code will use.
+
+### Atomicy Without Atomic Operations
+
+Not using the code loading generations (or any other code duplication)
+means that `trace_pattern` must at some point write to the active beam
+code in order for running processes to reach the staged breakpoints
+structures. This can be done with one single atomic write operation
+per instrumented function. The beam instruction words are however read
+with normal memory loads and not through the atomic API. The only
+guarantee we need is that the written instruction word is seen as
+atomic. Either fully written or not at all. This is true for word
+aligned write operation on all hardware architectures we use.
+
+
+Adding a new Breakpoint
+-----------------------
+This is a simplified sequence describing what `trace_pattern` goes
+through when adding a new breakpoint.
+
+1. Seize exclusive code write permission (suspend process until we get it).
+
+2. Allocate breakpoint structure `GenericBp` including both generations.
+ Set the active part as disabled with a zeroed flagfield. Save the original
+ instruction word in the breakpoint.
+
+3. Write a pointer to the breakpoint at offset -4 from the first
+ instruction "func_info" header.
+
+4. Set the staging part of the breakpoint as enabled with specified
+ breakpoint data.
+
+5. Wait for thread progress.
+
+6. Write a `op_i_generic_breakpoint` as the first instruction for the function.
+ This instruction will execute the breakpoint that it finds at offset -4.
+
+7. Wait for thread progress.
+
+8. Commit the breadpoint by switching `erts_active_bp_index`.
+
+9. Wait for thread progress.
+
+10. Prepare for next call to `trace_pattern` by updating the new staging part
+ (the old active) of the breakpoint to be identic to the the new active part.
+
+11. Release code write permission and return from `trace_pattern`.
+
+
+The code write permission "lock" seized in step 1 is the same as used
+by code loading. This will ensure that only one process at a time can
+stage new trace settings but it will also prevent concurrent code
+loading and make sure we see a consistent view of the beam code during
+the entire sequence.
+
+Between step 6 and 8, runninng processes might execute the written
+`op_i_generic_breakpoint` instruction. They will get the breakpoint
+structure written in step 3, read `erts_active_bp_index` and execute
+the corresponding part of the breakpoint. Before the switch in step 8
+becomes visible they will however execute the disabled part of the
+breakpoint structure and do nothing other than executing the saved
+original instruction.
+
+
+To Updating and Remove Breakpoints
+----------------------------------
+
+The above sequence did only describe adding a new breakpoint. We do
+basically the same sequence to update the settings of an existing
+breakpoint except step 2,3 and 6 can be skipped as it has already been
+done.
+
+To remove a breakpoint some more steps are needed. The idea is to
+first stage the breakpoint as disabled, do the switch, wait for thread
+progress and then remove the disabled breakpoint by restoring the
+original beam instruction.
+
+Here is a more complete sequence that contains both adding, updating
+and removing breakpoints.
+
+1. Seize exclusive code write permission (suspend process until we get it).
+
+2. Allocate new breakpoint structures with a disabled active part and
+ the original beam instruction. Write a pointer to the breakpoint in
+ "func_info" header at offset -4.
+
+3. Update the staging part of all affected breakpoints. Disable
+ breakpoints that are to be removed.
+
+4. Wait for thread progress.
+
+5. Write a `op_i_generic_breakpoint` as the first instruction for all
+ functions with new breakpoints.
+
+6. Wait for thread progress.
+
+7. Commit all staged breadpoints by switching `erts_active_bp_index`.
+
+8. Wait for thread progress.
+
+
+9. Restore original beam instruction for disabled breakpoints.
+
+10. Wait for thread progress.
+
+11. Prepare for next call to `trace_pattern` by updating the new
+ staging area (the old active) for all enabled breakpoints.
+
+12. Deallocate disabled breakpoint structures.
+
+13. Release code write permission and return from `trace_pattern`.
+
+
+### All that Waiting for Thread Progress
+
+There are four rounds of waiting for thread progress in the above
+sequence. In the code loading sequence we sacrificed memory overhead
+of three generations to avoid a second round of thread progress. The
+latency of `trace_pattern` should not be such a big problem for
+however, as it is normally not called in a rapid sequence.
+
+The waiting in step 4 is to make sure all threads will see an updated
+view of the breakpoint structures once they become reachable through
+the `op_i_generic_breakpoint` instruction written in step 5.
+
+The waiting in step 6 is to make the activation of the new trace
+settings "as atomic as possible". Different cores might see the new
+value of `erts_active_bp_index` at different times as it is read
+without any memory barrier. But this is the best we can do without
+more expensive thread synchronization.
+
+The waiting in step 8 is to make sure we dont't restore the original
+bream instructions for disabled breakpoints until we know that no
+thread is still accessing the old enabled part of a disabled
+breakpoint.
+
+The waiting in step 10 is to make sure no lingering thread is still
+accessing disabled breakpoint structures to be deallocated in step
+12.
+
+
+Global Tracing
+--------------
+
+Call tracing with `global` option only affects external function
+calls. This was earlier handled by inserting a special trace
+instruction in export entries without the use of breakpoints. With the
+new non-blocking tracing we want to avoid special handling for global
+tracing and make use of the staging and atomic switching within the
+breakpoint mechanism. The solution was to create the same type of
+breakpoint structure for a global call trace. The difference to local
+tracing is that we insert the `op_i_generic_breakpoint` instruction
+(with its pointer at offset -4) in the export entry rather than in the
+code.
+
+
+Future work
+-----------
+
+We still go to single threaded mode when new code is loaded for a
+module that is traced, or when loading code when there is a default
+trace pattern set. That is not impossible to fix, but that requires
+much closer cooperation between tracing BIFs and the loader BIFs.
diff --git a/erts/emulator/internal_doc/dec.erl b/erts/emulator/internal_doc/dec.erl
index bb69e6e81b..dc995989fb 100644
--- a/erts/emulator/internal_doc/dec.erl
+++ b/erts/emulator/internal_doc/dec.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/erts/emulator/pcre/README.pcre_update.md b/erts/emulator/pcre/README.pcre_update.md
new file mode 100644
index 0000000000..5f2414f0d9
--- /dev/null
+++ b/erts/emulator/pcre/README.pcre_update.md
@@ -0,0 +1,733 @@
+# How to update the PCRE version used by Erlang
+
+## The basic changes to the PCRE library
+
+To work with the Erlang VM, PCRE has been changed in two important ways:
+
+1. The main execution machine in pcre\_exec has been modified so that
+matching can be interrupted and restarted. This functionality utilizes
+the code that implements recursion by allocating explicit
+"stack-frames" in heap space, which basically means that all local
+variables in the loop are part of a struct which is kept in "malloced"
+memory on the heap and there are no real stack variables that need to
+be pushed on the C stack in the case of recursive calls. This is a
+technique we also use inside the VM to avoid building large C
+stacks. In PCRE this is enabled by the NO\_RECURSE define, so that is a
+prerequisite for the ERLANG\_INTEGRATION define which also adds labels
+at restart points and counts "reductions".
+
+2. All visible symbols in PCRE gets the erts_ prefix, so that NIF's
+and such using a "real" pcre library does not get confused (or 're'
+gets confused when a "real" pcre library get's loaded into the VM
+process).
+
+3. All irrelevant functionality has been stripped from the library,
+which means for example UTF16 support, jit, DFA execution
+etc. Basically the source files handling this are removed, together
+with any build support from the PCRE project. We have our own
+makefiles etc.
+
+## Setting up an environment for the work
+
+I work with four temporary directories when doing this (the examples
+are from the updating of pcre-7.6 to pcre-8.33);
+
+ ~/tmp/pcre> ls
+ epcre-7.6 epcre-8.33 pcre-7.6 pcre-8.33
+
+I've unpacked the plain pcre sources in pcre-* and will work with our
+patched sources in the epcre-* directories.
+
+Make sure your ERL_TOP contains a *built* version of Erlang (and you have made a branch)
+
+First unpack the pcre libraries (which will create the pcre-*
+directories) and then copy our code to the old epcre directory:
+
+ ~/tmp/pcre> tar jxf $ERL_TOP/erts/emulator/pcre/pcre-7.6.tar.bz2
+ ~/tmp/pcre> tar jxf ~/Downloads/pcre-8.33.tar.bz2
+ ~/tmp/pcre> mkdir epcre-7.6 epcre-8.33
+ ~/tmp/pcre> cd epcre-7.6/
+ ~/tmp/pcre/epcre-7.6> cp -r $ERL_TOP/erts/emulator/pcre/* .
+ ~/tmp/pcre/epcre-7.6> rm pcre-7.6.tar.bz2
+
+Leave the obj directory, you may need the libepcre.a file...
+
+If you find it easier, you can revert the commit in GIT that adds the
+erts_ prefix to the previous version before continuing work, but as
+that is a quite small diff in newer versions of PCRE, it is probably
+not worth it. Still, you will find the erts_ prefix being a separate
+commit when integrating 8.33, so if you're nice, you will do the same
+for the person coming after you...
+
+## Generating a diff for our changes to PCRE
+
+Before you generate a diff (that, in an ideal world, would be used to
+automatically patch the newer version of pcre, which will probably
+only work for minor PCRE updates), we need to configure the old pcre.
+
+ ~/tmp/pcre/epcre-7.6> cd ../pcre-7.6
+ ~/tmp/pcre/pcre-7.6> ./configure --enable-utf8 --enable-unicode-properties --disable-shared --disable-stack-for-recursion
+
+Note that for newer versions, the configure flag '--enable-utf8'
+should be replaced with '--enable-utf'
+
+So we now generate a diff:
+
+ ~/tmp/pcre/pcre-7.6> cd ../epcre-7.6
+ ~/tmp/pcre/epcre-7.6> (for x in *.[ch]; do if [ -f ../pcre-7.6/$x ]; then diff -c ../pcre-7.6/$x $x; fi; done ) > ../epcre-7.6_clean.diff
+
+### What the diff means
+
+Let's now walk through the relevant parts of the diff. Some of the
+differences might come from patches that probably are already in the
+new version, For example in out 7.6, we had a security patch which
+added the define WORK_SIZE_CHECK and used it in some places. Those can
+probably safely be ignored, but to be on the safe side, check what's
+already integrated in the new version.
+
+The interesting part is in pcre_exec.c. You will see things like
+
+ #ifdef ERLANG_INTEGRATION
+ ...
+ #endif
+
+or
+
+ #if defined(ERLANG_INTEGRATION)
+ ...
+ #endif
+
+and a lot of
+
+ COST_CHK(1);
+
+or
+
+ COST(min);
+
+and
+
+ /* LOOP_COUNT: Ok */
+ /* LOOP_COUNT: CHK */
+ /* LOOP_COUNT: COST */
+
+
+scattered over the main loop. Those mean the following:
+
+* COST(int x) - consume reductions proportional to the integer
+ parameter, but no need for interruption here (it's like
+ bump_reductions without trapping). The loop they apply to also has a
+ 'LOOP_COUNT: COST' comment at it's head.
+
+* COST\_CHK(int x) - like COST(x), but also check that the reduction
+counter does not reach zero. If it does, leave the execution loop to
+be restarted at a later point. No real stack variables can be live
+here. Note that variables like 'max' and 'min' are *not* real stack
+variables, the NO\_RECURSION setting has taken care of that. 'i' is a
+stack variable that's explicitly saved when trapping, so that will
+also be correct when returning from a trap. So will 'c', 'rrc' and
+flags like 'utf8', 'minimize' and 'posessive'. Those can also be
+regarded as "non C-stack variables". The loop where they reside also
+has a 'LOOP\_COUNT: CHK' comment.
+
+* /* LOOP_COUNT: Ok */ - means that I have checked the loop and it
+ only runs a deterministic set of iterations regardless of input, or
+ it has a call to RRECURSE in it's body, why we need not add more
+ cost than the normal reduction counting that will occur for each
+ instruction demands.
+
+The thing is that each loop in the function 'match' should be marked
+with one of these comments. If no comment is present after you patched
+the new release (if you successfully manage to do it automatically),
+it may be a new regexp instruction that is added since the last
+release.
+
+You will need to manually go through the main 'match' loop after
+upgrading to verify that there are no unhandled loops in the regexp
+machine loop (!).
+
+The COST\_CHK macro works like this:
+
+1. Add to the loop count.
+2. If loop count > limit:
+ 1. Store the line (+100) in the Xwhere member of the frame structure
+ 2. Goto LOOP\_COUNT\_BREAK, which ultimately returns from the function
+3. Insert a label, which is named L\_LOOP\_COUNT\_&lt;line number&gt;
+
+LOOP\_COUNT\_BREAK code will create an extra "stack frame" on the heap
+allocated stack used if NO\_RECURSION is set, and will store the few
+locals that are not already in the ordinary stack frame there (like
+'c' and 'i').
+
+When we continue execution (after a trap up to the main Erlang
+scheduler), we will jump to LOOP\_COUNT\_RETURN, which will restore
+the local variables and will jump to the labels. The jump code looks
+like this in the C source:
+
+ switch (frame->Xwhere)
+ {
+ #include "pcre_exec_loop_break_cases.inc"
+ default:
+ DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
+ return PCRE_ERROR_INTERNAL;
+ }
+
+When building, pcre\_exec\_loop\_break\_cases.inc will be generated
+during build by pcre.mk, it will look like:
+
+ case 791: goto L_LOOP_COUNT_691;
+ case 1892: goto L_LOOP_COUNT_1792;
+ case 1999: goto L_LOOP_COUNT_1899;
+
+etc
+
+So, simply put, all C-stack variables are saved when we have consumed
+our reductions, we return from the function and, as there is no real
+recursion we immediately fall out into the re:run BIF, which with the
+help of a magic binary keeps track of the heap allocated stack for the
+regexp machine. When we return from trapping out to the scheduler, all
+vital data is restored and we continue from exactly the same state as
+we left. What's needed is to patch this into the new pcre_exec and
+check all new instructions to determine what might need updating in
+terms of COST, COST\_CHK etc.
+
+Well, that's *almost* everything, because there is of course more...
+
+The actual interface function, 'pcre\_exec', needs the same treatment
+as the actual regexp machine loop, that is we need to store all local
+variables between restarts. Unfortunately the NO\_RECURSE setting does
+not do this, we need to do it ourselves. So there's quite a diff in
+that function too, where a big struct is declared, containing every
+local variable in that function, together with either local copies
+that are swapped in and out, or macros that directly access the heap
+allocated struct. The struct is called `PcreExecContext`.
+
+If a context is present, we are restarting and therefore restore
+everything. If we are restarting we can also skip all initialization
+code in the function and jump more or less directly to the
+RESTART_INTERRUPTED label and the call to 'match', which is the actual
+regexp machine loop.
+
+There are a few places in the pcre_exec we need to do some housekeeping, you will see code like:
+
+ if ((extra_data->flags & PCRE_EXTRA_LOOP_LIMIT) != 0)
+ {
+ *extra_data->loop_counter_return =
+ (extra_data->loop_limit - md->loop_limit);
+ }
+
+Make sure, after updating, that this housekeeping is done whenever we
+do not reach the call to 'match'.
+
+So, now we in theory know what to do, so let's do it:
+
+But...
+
+## File changes in the new version of PCRE
+
+First we need to go through what's changed in the new library
+version. Files may have new names, functions may have moved and so on.
+
+Start by building the new library:
+
+ ~/tmp/pcre> cd pcre-8.33/
+ ~/tmp/pcre/pcre-8.33> ./configure --enable-utf --enable-unicode-properties --disable-shared --disable-stack-for-recursion
+ ~/tmp/pcre/pcre-8.33> make
+
+In the make process, you will probably notice most files that are
+used, but you can bet that's not all not all...
+
+To begin with you will need a default table for Latin-1 characters, so:
+
+ ~/tmp/pcre/pcre-8.33> cc -DHAVE_CONFIG_H -o dftables dftables.c
+ ~/tmp/pcre/pcre-8.33> LANG=sv_SE ./dftables -L ../epcre-8.33/pcre_latin_1_table.c
+
+Compare it to the pcre\_latin\_1\_table.c in the old version, they
+should not differ in any significant way.
+
+A good starting point is then to try to find all files in the new
+version of the library that have (probably) the same names as the
+one's in our distribution:
+
+ ~/tmp/pcre/pcre-8.33> cd ../epcre-7.6/
+ ~/tmp/pcre/epcre-7.6> for x in *.[ch]; do if [ '!' -f ../pcre-8.33/$x ]; then echo $x; else cp ../pcre-8.33/$x ../epcre-8.33/; fi; done
+
+This will output a list of files not found in the new distro. Let's
+look at the list from the example upgrade:
+
+ local_config.h
+ make_latin1_table.c
+ pcre_info.c
+ pcre_latin_1_table.c
+ pcre_make_latin1_default.c
+ pcre_try_flipped.c
+ pcre_ucp_searchfuncs.c
+ ucpinternal.h
+ ucptable.h
+
+* local\_config.h - OK, that's our child, it contains PCRE-specific
+ configure-results (i.e. the #defines that are results from out
+ parameters to configure, like NO\_RECURSE etc). Just copy it and
+ edit it according to what specific settings you can find in the
+ generated config.h from the real library build. In our example case,
+ the #define SUPPORT\_UTF8 should be renamed to #define SUPPORT\_UTF
+ and #define VERSION "7.6" should be changed to #define VERSION
+ "8.33"...
+
+* make\_latin1\_table.c - it was renamed to dftables.c, so we copy
+ that instead.
+
+* pcre\_info.c - It was simply removed from the library. Good, because
+ it was useless... So just ignore.
+
+* pcre\_latin\_1\_table.c - No problem, we generated a new one in the
+ earlier stage.
+
+* pcre\_make\_latin1\_default.c - No longer used, a hack that's not
+ needed with dftables. Ignored
+
+* pcre\_try\_flipped.c - This functionality has been removed from
+ pcre\_exec, you cannot compile on one endianess and execute on
+ another any more :( Ignored.
+
+* pcre\_ucp\_searchfuncs.c, ucpinternal.h, ucptable.h - this
+ functionality is moved to pcre\_ucd.c, copy that one instead.
+
+OK, now go the other way and look at what was actually built for the new version of pcre:
+
+ ~/tmp/pcre/epcre-7.6> cd ../pcre-8.33/
+ ~/tmp/pcre/pcre-8.33> nm ./.libs/libpcre.a | egrep 'lib.*.o:'
+
+The output for this release was:
+
+ libpcre_la-pcre_byte_order.o:
+ libpcre_la-pcre_compile.o:
+ libpcre_la-pcre_config.o:
+ libpcre_la-pcre_dfa_exec.o:
+ libpcre_la-pcre_exec.o:
+ libpcre_la-pcre_fullinfo.o:
+ libpcre_la-pcre_get.o:
+ libpcre_la-pcre_globals.o:
+ libpcre_la-pcre_jit_compile.o:
+ libpcre_la-pcre_maketables.o:
+ libpcre_la-pcre_newline.o:
+ libpcre_la-pcre_ord2utf8.o:
+ libpcre_la-pcre_refcount.o:
+ libpcre_la-pcre_string_utils.o:
+ libpcre_la-pcre_study.o:
+ libpcre_la-pcre_tables.o:
+ libpcre_la-pcre_ucd.o:
+ libpcre_la-pcre_valid_utf8.o:
+ libpcre_la-pcre_version.o:
+ libpcre_la-pcre_xclass.o:
+ libpcre_la-pcre_chartables.o:
+
+Libtool has changed the object names, but we can fix that and see what
+sources we have already decided should exist:
+
+ ~/tmp/pcre/pcre-8.33> NAMES=`nm ./.libs/libpcre.a | egrep 'lib.*.o:'| sed 's,libpcre_la-,,' | sed 's,.o:$,,'`
+ ~/tmp/pcre/pcre-8.33> for x in $NAMES; do if [ '!' -f ../epcre-8.33/$x.c ]; then echo $x; fi; done
+
+And the list contained:
+
+ pcre_byte_order
+ pcre_jit_compile
+ pcre_string_utils
+
+pcre\_jit\_compile is actually needed, even though we have not enabled
+jit, and the other two contain functionality needed, so just copy the
+sources...
+
+ ~/tmp/pcre/pcre-8.33> for x in $NAMES; do if [ '!' -f ../epcre-8.33/$x.c ]; then cp $x.c ../epcre-8.33/; fi; done
+
+## Test build of stripped down version of new PCRE
+
+Time to do a test build. Copy and edit the pcre.mk makefile and try to
+get something that builds...
+
+I made a wrapper Makefile, hacked pcre.mk a little and did a few
+changes to a few files, namely added:
+
+ #ifdef ERLANG_INTEGRATION
+ #include "local_config.h"
+ #endif
+
+to pcre\_config.c and pcre\_internal.h. Also pcre.mk needs to get the
+new files added and the old files removed, directory names need to be
+changed and the wrapper can define most. My wrapper Makefile looked
+like this:
+
+ EPCRE_LIB = ./obj/libepcre.a
+ PCRE_GENINC = ./pcre_exec_loop_break_cases.inc
+ PCRE_OBJDIR = ./obj
+ V_AR = ar
+ V_CC = gcc
+ CFLAGS = -g -O2 -DHAVE_CONFIG_H -I/ldisk/pan/git/otp/erts/x86_64-unknown-linux-gnu
+ gen_verbose =
+ PCRE_DIR=.
+ include pcre.mk
+
+And the according variables were removed together with dependencies
+from pcre.mk. Note that you will need to put things back in order in
+pcre.mk after all testing is done. Once a 'make' is successful, you
+can generate new dependencies:
+
+ ~/tmp/pcre/epcre-8.33> gcc -MM -c -g -O2 -DHAVE_CONFIG_H -I/ldisk/pan/git/otp/erts/x86_64-unknown-linux-gnu -DERLANG_INTEGRATION *.c | grep -v $ERL_TOP
+
+Well, then you have to add $(PCRE\_OBJDIR)/ to each object and
+$(PCRE\_DIR)/ to each header. I did it manually, it's just a couple of
+files. Now your pcre.mk is fairly up to date and it's time to start
+patching in the changes...
+
+## Actually patching in the changes to the C code
+
+### Fixing the functionality (interruptable pcre\_run etc)
+
+Begin with only pcre\_exec.c, that's the important part:
+
+ ~/tmp/pcre/epcre-8.33> cd ../epcre-7.6/
+ ~/tmp/pcre/epcre-7.6> diff -c ../pcre-7.6/pcre_exec.c ./pcre_exec.c > ../epcre_exec.c_7.6.diff
+ ~/tmp/pcre/epcre-7.6> cd ../epcre-8.33
+
+Now - if you are lucky, you can patch the new pcre\_exec with the
+patch command from the diff, but that may not be the case... Even if:
+
+ ~/tmp/pcre/epcre-8.33> patch -p0 < ../epcre_exec.c_7.6.diff
+
+works like a charm, you still have to go through the main loop and see
+that all do, while and for loops in the code contains COST\_CHK or at
+least COST, or, if it's a small loop (over, say one UTF character),
+mark it as OK with a comment.
+
+You should also check for other changes, like new local variables in
+the pcre\_exec code etc.
+
+What will probably happen, is that the majority of chunks
+fail. pcre\_exec is the main file for PCRE, one that is constantly
+optimized and where every new feature ends up. You will probably see
+so many failed HUNK's that you feel like giving up, but do not
+despair, it's just a matter of patience and hard work:
+
+* First, fix the 'pcre\_exec' function.
+
+ * Change the struct PcreExecContext to reflect the local variables
+ in this version of the code.
+
+ * Add/update the defines that makes local variables in the code
+ actually stay in an allocated "exec\_context" and be sure to
+ initialize the "pseudo-stack-variables" in the same way as in
+ the declarations for the original version of the code.
+
+ * The macros SWAPIN and SWAPOUT should be for variables that are
+ used a lot and we do not want to always access through the
+ struct. Also a few parameters are saved by SWAPIN and SWAPOUT.
+
+ * What might be tricky is to get things deallocated in a proper
+ way, there is a function that's called from the BIF code to
+ clean up an exec\_context, be especially observant about how the
+ stack in the 'match' function is allocated! The first frame is
+ supposed to be on the C stack, but in our case is allocated in
+ the exec\_context. The rest of the frames are allocated but
+ never freed, not until the match is done.
+
+ The variable 'frame' in the 'match' function is stored in our
+ additional field of the 'md' structure, that is the stack top,
+ but not necessarily the uppermost frame (due to reuse of old
+ frames, which is supposed to be an optimization...).
+
+ * The housekeeping of the "reduction counter" in the extra\_data
+ struct needs to be added to all places where we break out of the
+ main loop of pcre\_exec. Look for 'break' and you will see the
+ places. Make sure to update
+ '*extra\_data->loop\_counter\_return' whenever you leave this
+ function. It all boils down to some code that loops over the
+ call for match and returns PCRE\_ERROR\_LOOP\_LIMIT and get's
+ jumped back to when the BIF is restarted. You will see it in
+ your diff and you will find a similar place in the new version
+ where you put basically the same code.
+
+ * Fixing pcre\_exec takes about an hour of concentrated work, it
+ could be worse...
+
+* Next, go for the match function. It's simpler in some ways but
+ harder in other. The elimination of the C stack is already there,
+ you just need to modify it a little:
+
+ * In the RRETURN macro for NO\_RECURSE, add updating of
+ md->loop\_limit before returning. You can see how it's done in
+ the diff.
+
+ * RMATCH can be left as it is, at least it could in earlier
+ versions. Note however that you should mimic the allocation
+ strategies of RMATCH and RRETURN in the code at another place
+ later... The principle of the labels HEAP\_RECURSE and
+ HEAP\_RETURN are mimicked by our code in LOOP\_COUNT\_BREAK and
+ LOOP\_COUNT\_RETURN. You'll see later...
+
+ * COST and COST\_CHK, together with the jump to
+ LOOP\_COUNT\_RETURN label are in the beginning of the function
+ 'match'. It's a block of macros and declaration of our local
+ variables loop\_count and loop\_limit. We patch in the code for
+ that, but may need to adopt it to new variable names etc. It's
+ important to handle the 'frames' variable correctly, dig it out
+ of the 'md' struct when we are restarting, but initialize it as
+ is done in normal NO\_RECURSE code otherwise. Note that the
+ COST\_CHK macro reuses the Xwhere field of the frame struct, it
+ is not needed when trapping.
+
+ * The LOOP\_COUNT\_BREAK and the LOOP\_COUNT\_RETURN code can now
+ be added. Make sure to check both how a new stack frame should be
+ properly allocated by mimicking the code in RMATCH, and how (if)
+ it should be freed by mimicking RRETURN. Also check which
+ variables need to be saved. They are properly pointed out in
+ 8.33 with the comment 'These variables do not need to be
+ preserved over recursion' and appear in the beginning of the
+ function. Find variables of similar type in the frame structure
+ and reuse them. In 8.33 there are eight such variables. They are
+ placed at the end of the function 'match'. If You are reading
+ the diff, you need to scroll past all the COST\_CHK calls,
+ i.e. past the whole regexp machine loop.
+
+ * Now take the time to add things like debug macros to the top of
+ the file and one single COST\_CHK (preferably the one right
+ after for(;;) in 'match'), and see if you can compile. You will
+ probably need to add some fields in the structures in pcre.h,
+ see from a larger diff what you need there and iterate until you
+ can compile.
+
+ * So, what's left is to add all the COST and COST\_CHK macros,
+ plus marking all harmless loops as OK. There are a few rules
+ here:
+
+ * Mark *every* loop with the comment 'LOOP\_COUNT: xxxx',
+ where xxxx is either 'Ok', 'COST' or 'CHK'. There are 175
+ 'LOOP\_COUNT:' comments in 8.33.
+
+ * Loops marked 'Ok' need no macro, either because they are so
+ short (like over an UTF character) or because they contain
+ an RMATCH macro, in which case they will be accounted for
+ anyway.
+
+ * Loops marked 'COST' will have an associated 'COST(N)' macro,
+ either before, if we know the amount of iterations, or
+ within. Reductions are counted, but we will not
+ interrupt. This is typically in what is expected to be
+ medium long loops or at places where interruption is hard
+ (like where we have local variables that are alive. The
+ selection between 'COST' and 'COST\_CHK' is hard. 'COST' is
+ much cheaper and usually enough, but when in doubt about the
+ loop length, try to use 'COST\_CHK', while making very sure
+ there are no live block-local variables that need to be
+ saved over the trap. There are 49 'COST' macros in 8.33.
+
+ * Loops marked 'CHK' shall contain a 'COST\_CHK(N)'
+ macro. This macro both counts reductions and may result in
+ an interrupt and a return to Erlang space. It is expensive
+ and it is vital to ensure that there are no unexpected local
+ variables that live past the macro. Most variables are in
+ the pseudo stack frame, but some regexp instructions declare
+ temporaries inside blocks. Make sure they are not expected
+ to be alive after a COST\_CHK if they are not in the
+ 'heapframe' structure. If they are, you need to
+ conditionally move them to the 'heapframe' #if
+ defined(ERLANG\_INTEGRATION). in 8.33 the variables 'lgb'
+ and 'rgb' are preserved in this way. There are 54
+ 'COST\_CHK's in 8.33.
+
+ * I've marked a few block-local variables with warnings, but
+ look thoroughly through the main loop to detect any new
+ ones.
+
+ * Be careful when it comes to freeing the context from Erlang
+ (the function erts\_pcre\_free\_restart\_data), Whatever is
+ done there has to work *both* when the context is freed in
+ the middle of an operation (because of trapping) and when
+ some things have been freed by a successful
+ return. Specifically, make sure to set md->offset\_vector to
+ NULL whenever it's freed (in the rest of the code) and
+ construct release\_match\_heapframes so that it can be
+ called multiple times for the same heapframe (set the next
+ pointer in the "static" frame, i.e. the one allocated in the
+ md to NULL after freeing).
+
+ * To add the costs to the main loop takes less than one work day,
+ keep calm and continue...
+
+OK, now you are done with the pcre\_exec (or at least, you think
+so). The rest is simpler. You have probably already handled 'pcre.h'
+and 'pcre\_internal.h' to add fields to the structures etc. Looking at
+a diff from an earlier version, you will see what's left. In upgrading
+to 8.33, the following things was left to do after pcre\_exec was
+fixed, remember you could generate a diff with:
+
+ ~/tmp/pcre/epcre-8.33> cd ../epcre-7.6/
+ ~/tmp/pcre/epcre-7.6> (for x in *.[ch]; do if [ -f ../pcre-7.6/$x ]; then diff -c ../pcre-7.6/$x $x; fi; done) > ../epcre-7.6.diff
+
+Open the diff in your favorite editor and remove whatever changes you
+have already made, like everything that has to do with pcre\_exec.c
+and probably a large part of pcre.h/pcre\_internal.h.
+
+The expected result is a diff that either contains only the
+'%ExternalCopyright%' comments or contains them and the addition of
+the erts\_ prefix, depending on if you reverted the prefix change
+(using 'git revert') before starting to work. With a little luck, the
+patch of the remaining stuff should be possible to apply
+automatically. If anything fails, just add it manually.
+
+### Fixing the erts\_prefix
+
+The erts\_ prefix is mostly implemented by adding '#if
+defined(ERLANG\_INTEGRATION)' to a lot of function headers, inside the
+COMPILE\_UTF8 part. If you then also change the PRIV and PUBL macros
+in pcre\_internal.h. Typical diffs look like:
+
+ #if defined COMPILE_PCRE8
+ + #if defined(ERLANG_INTEGRATION)
+ + #ifndef PUBL
+ + #define PUBL(name) erts_pcre_##name
+ + #endif
+ + #ifndef PRIV
+ + #define PRIV(name) _erts_pcre_##name
+ + #endif
+ + #else
+ #ifndef PUBL
+ #define PUBL(name) pcre_##name
+ #endif
+ #ifndef PRIV
+ #define PRIV(name) _pcre_##name
+ #endif
+ + #endif
+
+and
+
+ #if defined COMPILE_PCRE8
+ + #if defined(ERLANG_INTEGRATION)
+ + PCRE_EXP_DECL int erts_pcre_pattern_to_host_byte_order(pcre *argument_re,
+ + erts_pcre_extra *extra_data, const unsigned char *tables)
+ + #else
+ PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *argument_re,
+ pcre_extra *extra_data, const unsigned char *tables)
+ + #endif
+
+Note that some data types, like pcre\_extra are accessed with the PUBL
+macro, so they need to explicitly get the prefix added. pcre.h is a
+pig, as it declares prototypes for all functions regardless of
+compilation ode, so there is quite a lot of '#if
+defined(ERLANG\_INTEGRATION)' to add there.
+
+Anyway, now try to patch, using a diff where you have removed the
+changes you made manually (probably to pcre\_exec.c) but make sure to
+save your work (temporary git repository?) before, so you can revert
+any disasters...
+
+ ~/tmp/pcre/epcre-7.6> cd ../epcre-8.33/
+ ~/tmp/pcre/epcre-8.33> patch -p0 < ../epcre-7.6_clean2.diff
+
+Some hunks may certainly still fail, read through the .rej file and fix it.
+
+### ExternalCopyright
+
+Now you should check that the 'ExternalCopyright' comment is present
+in all source files:
+
+ ~/tmp/pcre/epcre-8.33> for x in *.[ch]; do if grep ExternalCopyright $x > /dev/null; then true; else echo $x; fi; done
+
+In this upgrade (from 7.6 to 8.33) we certainly had some new and
+renamed files:
+
+ dftables.c
+ pcre_byte_order.c
+ pcre_chartables.c
+ pcre_jit_compile.c
+ pcre_latin_1_table.c
+ pcre_string_utils.c
+ pcre_ucd.c
+
+Go through them manually and add the 'ExternalCopyright' comment.
+
+## Integrate with Erlang
+
+Now you are done with most of the tedious work. It's time to move this
+into your branch of the Erlang source tree, remove old files and add
+new ones, plus add the tar file with the original pcre dist. Remember
+to fix your hacked version of pcre.mk and then try to build
+Erlang. You might need to update 'erl\_bif\_re.c' to reflect any
+changes in the PCRE library. When it builds, run the test suites.
+
+Make sure to rename any files that has new names and remove any files
+that are no longer present before copying in the new versions from
+your temporary directory. In our example we remove 'pcre\_info.c',
+'pcre\_make\_latin1\_default.c', 'pcre\_try\_flipped.c',
+'ucpinternal.h' and 'ucptable.h'. We rename 'make\_latin1\_table.c' to
+'dftables.c' and 'pcre\_ucp\_searchfuncs.c' to 'pcre\_ucd.c'.
+
+After copying in the sources, we can try to build. Do not forget to
+fix whatever you did in pcre.mk to make it build locally.
+
+## Update test suites
+
+The next step is to integrate the updated PCRE tests into our test suites.
+
+Copy testoutput[1-9] from the testdata directory of your new version
+of pcre, to the re\_SUITE\_data in stdlib's test suites. Run the
+test suites and remove any bugs. Usually the bugs come from the fact
+that the PCRE test suites get better and from our implementation of
+global matching, which may have bugs outside of the PCRE library. The
+test suite 'pcre' is the one that runs these tests. Also copy
+testoutput11-8 to testoutput10, the testoutput10 file in pcre is
+nowadays for the DFA, which we do not use.
+
+The next step is to regenerate re\_testoutput1\_replacement\_test. How
+to do that is in a comment in the beginning of the file. The key
+module is run\_pcre\_tests.erl, which both driver the pcre test and
+generate re\_testoutput1\_replacement\_test.erl. Watch during the
+generation that you do not get to many of the "Fishy character"
+messages, if they are more than, say 20, you will probably need to
+address the UTF8 issues in the Perl execution. As it is now, we skip
+non latin1 characters in this test. You will need to run iconv on the
+generated module to make it UTF-8 before running tests.
+
+The exact same procedure goes for the re\_testoutput1\_split\_test.erl.
+
+Also add copyright headers to the files after converting them to UTF-8.
+
+After ironing out the rest of the bugs, you should be done with the
+code.
+
+## Update documentation
+
+Now it's time for the documentation, which is fairly
+straightforward. Diff the pcrepattern man pages from the old and new
+PCRE distros and update the re.xml file accordingly. It may help to
+have the generated HTML file from the new version to cut and paste
+from, but as you will notice, it's quite a few changes from HTML to
+XML. All lists are reformatted, the &lt;pre&gt; tags are made into
+either &lt;code&gt; or &lt;quite&gt; etc. Also the &lt;P&gt; tags are
+converted to lowercase and all mentioned options and function calls
+are converted to their Erlang counterpart. Really awesome work that
+requires thorough reading of all new text. For the upgrade from 7.6
+to 8.33, the update of the pcrepattern part of our manual page took
+about eight hours.
+
+## Add new relevant options to re
+
+Then, when all this is done, you should add any new relevant options
+from the PCRE library to both the code (erl\_bif\_re.c), the specs and
+the Erlang function 'copt/1' (re.erl) and the manual page
+(re.xml). Make sure the options are really relevant to add to the
+Erlang API, check if they are compile or run-time options (or both) and
+add them to the 'parse\_options' function of erl\_bif\_re.c. Adding an
+option that is just passed through to PCRE is pretty simple, at least
+"code wise".
+
+Now you are done. Run all test suites on all machines and you will be happy.
+
+## Final notes
+
+To avoid the work of a major upgrade, it is probably worth it to keep
+in pace with the changes to PCRE. The upgrade from 7.6 to 8.33,
+including tracking down bugs etc, took me a total of two weeks. If
+smaller diffs from the PCRE development were integrated in a more
+incremental fashion, it will be much easier each time and you will
+have the PCRE library up to date. PCRE should probably be updated for
+each major release, instead of every five years... \ No newline at end of file
diff --git a/erts/emulator/pcre/make_latin1_table.c b/erts/emulator/pcre/dftables.c
index cec4524d18..bff2930824 100644
--- a/erts/emulator/pcre/make_latin1_table.c
+++ b/erts/emulator/pcre/dftables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,13 +37,12 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-/* %ExternalCopyright% */
/* This is a freestanding support program to generate a file containing
character tables for PCRE. The tables are built according to the current
locale. Now that pcre_maketables is a function visible to the outside world, we
make use of its code from here in order to be consistent. */
-
+/* %ExternalCopyright% */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -55,14 +54,8 @@ make use of its code from here in order to be consistent. */
#include "pcre_internal.h"
-extern const unsigned char *pcre_make_latin1_tables(void);
-
-static int my_isprint(int x) {
- if (x < 160)
- return isprint(x);
- else
- return 1;
-}
+#define DFTABLES /* pcre_maketables.c notices this */
+#include "pcre_maketables.c"
int main(int argc, char **argv)
@@ -75,21 +68,26 @@ const unsigned char *base_of_tables;
/* By default, the default C locale is used rather than what the building user
happens to have set. However, if the -L option is given, set the locale from
the LC_xxx environment variables. */
-setlocale(LC_ALL, "C");
+
+if (argc > 1 && strcmp(argv[1], "-L") == 0)
+ {
+ setlocale(LC_ALL, ""); /* Set from environment variables */
+ i++;
+ }
if (argc < i + 1)
{
- fprintf(stderr, "make_latin1_table: one filename argument is required\n");
+ fprintf(stderr, "dftables: one filename argument is required\n");
return 1;
}
-tables = pcre_make_latin1_tables();
+tables = pcre_maketables();
base_of_tables = tables;
f = fopen(argv[i], "wb");
if (f == NULL)
{
- fprintf(stderr, "make_latin1_table: failed to open %s for writing\n", argv[1]);
+ fprintf(stderr, "dftables: failed to open %s for writing\n", argv[1]);
return 1;
}
@@ -100,7 +98,7 @@ fprintf(f,
"/*************************************************\n"
"* Perl-Compatible Regular Expressions *\n"
"*************************************************/\n\n"
- "/* This file was automatically written by the make_latin1_table auxiliary\n"
+ "/* This file was automatically written by the dftables auxiliary\n"
"program. It contains character tables that are used when no external\n"
"tables are passed to PCRE by the application that calls it. The tables\n"
"are used only for characters whose code values are less than 256.\n\n");
@@ -110,13 +108,26 @@ fprintf(f,
"library and dead code stripping is activated. This leads to link errors.\n"
"Pulling in the header ensures that the array gets flagged as \"someone\n"
"outside this compilation unit might reference this\" and so it will always\n"
- "be supplied to the linker. */\n\n"
+ "be supplied to the linker. */\n\n");
+
+/* Force config.h in z/OS */
+
+#if defined NATIVE_ZOS
+fprintf(f,
+ "/* For z/OS, config.h is forced */\n"
+ "#ifndef HAVE_CONFIG_H\n"
+ "#define HAVE_CONFIG_H 1\n"
+ "#endif\n\n");
+#endif
+
+fprintf(f,
"#ifdef HAVE_CONFIG_H\n"
"#include \"config.h\"\n"
"#endif\n\n"
"#include \"pcre_internal.h\"\n\n");
+
fprintf(f,
- "const unsigned char _erts_pcre_default_tables[] = {\n\n"
+ "const pcre_uint8 PRIV(default_tables)[] = {\n\n"
"/* This table is a lower casing table. */\n\n");
fprintf(f, " ");
@@ -176,9 +187,9 @@ for (i = 0; i < 256; i++)
if ((i & 7) == 0 && i != 0)
{
fprintf(f, " /* ");
- if (my_isprint(i-8)) fprintf(f, " %c -", i-8);
+ if (isprint(i-8)) fprintf(f, " %c -", i-8);
else fprintf(f, "%3d-", i-8);
- if (my_isprint(i-1)) fprintf(f, " %c ", i-1);
+ if (isprint(i-1)) fprintf(f, " %c ", i-1);
else fprintf(f, "%3d", i-1);
fprintf(f, " */\n ");
}
@@ -187,9 +198,9 @@ for (i = 0; i < 256; i++)
}
fprintf(f, "};/* ");
-if (my_isprint(i-8)) fprintf(f, " %c -", i-8);
+if (isprint(i-8)) fprintf(f, " %c -", i-8);
else fprintf(f, "%3d-", i-8);
-if (my_isprint(i-1)) fprintf(f, " %c ", i-1);
+if (isprint(i-1)) fprintf(f, " %c ", i-1);
else fprintf(f, "%3d", i-1);
fprintf(f, " */\n\n/* End of pcre_chartables.c */\n");
@@ -198,4 +209,4 @@ free((void *)base_of_tables);
return 0;
}
-/* End of make_latin1_table.c */
+/* End of dftables.c */
diff --git a/erts/emulator/pcre/local_config.h b/erts/emulator/pcre/local_config.h
index 0c85410363..791d7f5a6b 100644
--- a/erts/emulator/pcre/local_config.h
+++ b/erts/emulator/pcre/local_config.h
@@ -75,7 +75,7 @@
#define SUPPORT_UCP
/* Define to enable support for the UTF-8 Unicode encoding. */
-#define SUPPORT_UTF8
+#define SUPPORT_UTF
/* Version number of package */
-#define VERSION "7.6"
+#define VERSION "8.33"
diff --git a/erts/emulator/pcre/pcre-7.6.tar.bz2 b/erts/emulator/pcre/pcre-7.6.tar.bz2
deleted file mode 100644
index 66b11115fc..0000000000
--- a/erts/emulator/pcre/pcre-7.6.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/erts/emulator/pcre/pcre-8.33.tar.bz2 b/erts/emulator/pcre/pcre-8.33.tar.bz2
new file mode 100644
index 0000000000..0cea71c8b6
--- /dev/null
+++ b/erts/emulator/pcre/pcre-8.33.tar.bz2
Binary files differ
diff --git a/erts/emulator/pcre/pcre-8.33_1370.diff b/erts/emulator/pcre/pcre-8.33_1370.diff
new file mode 100644
index 0000000000..d62398985d
--- /dev/null
+++ b/erts/emulator/pcre/pcre-8.33_1370.diff
@@ -0,0 +1,60 @@
+--- code/trunk/pcre_exec.c 2013/07/02 18:37:36 1346
++++ code/trunk/pcre_exec.c 2013/07/26 10:03:38 1350
+@@ -5637,7 +5637,7 @@
+ }
+ }
+
+- /* Match extended Unicode sequences. We will get here only if the
++ /* Match extended Unicode grapheme clusters. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+@@ -5670,21 +5670,41 @@
+ /* eptr is now past the end of the maximum run */
+
+ if (possessive) continue; /* No backtracking */
++
+ for(;;)
+ {
+- if (eptr == pp) goto TAIL_RECURSE;
++ int lgb, rgb;
++ PCRE_PUCHAR fptr;
++
++ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
++
++ /* Backtracking over an extended grapheme cluster involves inspecting
++ the previous two characters (if present) to see if a break is
++ permitted between them. */
++
+ eptr--;
+- for (;;) /* Move back over one extended */
++ if (!utf) c = *eptr; else
++ {
++ BACKCHAR(eptr);
++ GETCHAR(c, eptr);
++ }
++ rgb = UCD_GRAPHBREAK(c);
++
++ for (;;)
+ {
+- if (!utf) c = *eptr; else
++ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */
++ fptr = eptr - 1;
++ if (!utf) c = *fptr; else
+ {
+- BACKCHAR(eptr);
+- GETCHAR(c, eptr);
++ BACKCHAR(fptr);
++ GETCHAR(c, fptr);
+ }
+- if (UCD_CATEGORY(c) != ucp_M) break;
+- eptr--;
++ lgb = UCD_GRAPHBREAK(c);
++ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
++ eptr = fptr;
++ rgb = lgb;
+ }
+ }
+ }
diff --git a/erts/emulator/pcre/pcre.h b/erts/emulator/pcre/pcre.h
index 1701bd112b..57efdd01f5 100644
--- a/erts/emulator/pcre/pcre.h
+++ b/erts/emulator/pcre/pcre.h
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,10 +42,10 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
-#define PCRE_MAJOR 7
-#define PCRE_MINOR 6
+#define PCRE_MAJOR 8
+#define PCRE_MINOR 33
#define PCRE_PRERELEASE
-#define PCRE_DATE 2008-01-28
+#define PCRE_DATE 2013-05-28
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
@@ -96,66 +96,163 @@ it is needed here for malloc. */
extern "C" {
#endif
-/* Options */
-
-#define PCRE_CASELESS 0x00000001
-#define PCRE_MULTILINE 0x00000002
-#define PCRE_DOTALL 0x00000004
-#define PCRE_EXTENDED 0x00000008
-#define PCRE_ANCHORED 0x00000010
-#define PCRE_DOLLAR_ENDONLY 0x00000020
-#define PCRE_EXTRA 0x00000040
-#define PCRE_NOTBOL 0x00000080
-#define PCRE_NOTEOL 0x00000100
-#define PCRE_UNGREEDY 0x00000200
-#define PCRE_NOTEMPTY 0x00000400
-#define PCRE_UTF8 0x00000800
-#define PCRE_NO_AUTO_CAPTURE 0x00001000
-#define PCRE_NO_UTF8_CHECK 0x00002000
-#define PCRE_AUTO_CALLOUT 0x00004000
-#define PCRE_PARTIAL 0x00008000
-#define PCRE_DFA_SHORTEST 0x00010000
-#define PCRE_DFA_RESTART 0x00020000
-#define PCRE_FIRSTLINE 0x00040000
-#define PCRE_DUPNAMES 0x00080000
-#define PCRE_NEWLINE_CR 0x00100000
-#define PCRE_NEWLINE_LF 0x00200000
-#define PCRE_NEWLINE_CRLF 0x00300000
-#define PCRE_NEWLINE_ANY 0x00400000
-#define PCRE_NEWLINE_ANYCRLF 0x00500000
-#define PCRE_BSR_ANYCRLF 0x00800000
-#define PCRE_BSR_UNICODE 0x01000000
+/* Public options. Some are compile-time only, some are run-time only, and some
+are both. Most of the compile-time options are saved with the compiled regex so
+that they can be inspected during studying (and therefore JIT compiling). Note
+that pcre_study() has its own set of options. Originally, all the options
+defined here used distinct bits. However, almost all the bits in a 32-bit word
+are now used, so in order to conserve them, option bits that were previously
+only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may
+also be used for compile-time options that affect only compiling and are not
+relevant for studying or JIT compiling.
+
+Some options for pcre_compile() change its behaviour but do not affect the
+behaviour of the execution functions. Other options are passed through to the
+execution functions and affect their behaviour, with or without affecting the
+behaviour of pcre_compile().
+
+Options that can be passed to pcre_compile() are tagged Cx below, with these
+variants:
+
+C1 Affects compile only
+C2 Does not affect compile; affects exec, dfa_exec
+C3 Affects compile, exec, dfa_exec
+C4 Affects compile, exec, dfa_exec, study
+C5 Affects compile, exec, study
+
+Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
+E and D, respectively. They take precedence over C3, C4, and C5 settings passed
+from pcre_compile(). Those that are compatible with JIT execution are flagged
+with J. */
+
+#define PCRE_CASELESS 0x00000001 /* C1 */
+#define PCRE_MULTILINE 0x00000002 /* C1 */
+#define PCRE_DOTALL 0x00000004 /* C1 */
+#define PCRE_EXTENDED 0x00000008 /* C1 */
+#define PCRE_ANCHORED 0x00000010 /* C4 E D */
+#define PCRE_DOLLAR_ENDONLY 0x00000020 /* C2 */
+#define PCRE_EXTRA 0x00000040 /* C1 */
+#define PCRE_NOTBOL 0x00000080 /* E D J */
+#define PCRE_NOTEOL 0x00000100 /* E D J */
+#define PCRE_UNGREEDY 0x00000200 /* C1 */
+#define PCRE_NOTEMPTY 0x00000400 /* E D J */
+#define PCRE_UTF8 0x00000800 /* C4 ) */
+#define PCRE_UTF16 0x00000800 /* C4 ) Synonyms */
+#define PCRE_UTF32 0x00000800 /* C4 ) */
+#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* C1 */
+#define PCRE_NO_UTF8_CHECK 0x00002000 /* C1 E D J ) */
+#define PCRE_NO_UTF16_CHECK 0x00002000 /* C1 E D J ) Synonyms */
+#define PCRE_NO_UTF32_CHECK 0x00002000 /* C1 E D J ) */
+#define PCRE_AUTO_CALLOUT 0x00004000 /* C1 */
+#define PCRE_PARTIAL_SOFT 0x00008000 /* E D J ) Synonyms */
+#define PCRE_PARTIAL 0x00008000 /* E D J ) */
+
+/* This pair use the same bit. */
+#define PCRE_NEVER_UTF 0x00010000 /* C1 ) Overlaid */
+#define PCRE_DFA_SHORTEST 0x00010000 /* D ) Overlaid */
+
+#define PCRE_DFA_RESTART 0x00020000 /* D */
+#define PCRE_FIRSTLINE 0x00040000 /* C3 */
+#define PCRE_DUPNAMES 0x00080000 /* C1 */
+#define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */
+#define PCRE_NEWLINE_LF 0x00200000 /* C3 E D */
+#define PCRE_NEWLINE_CRLF 0x00300000 /* C3 E D */
+#define PCRE_NEWLINE_ANY 0x00400000 /* C3 E D */
+#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* C3 E D */
+#define PCRE_BSR_ANYCRLF 0x00800000 /* C3 E D */
+#define PCRE_BSR_UNICODE 0x01000000 /* C3 E D */
+#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* C5 */
+#define PCRE_NO_START_OPTIMIZE 0x04000000 /* C2 E D ) Synonyms */
+#define PCRE_NO_START_OPTIMISE 0x04000000 /* C2 E D ) */
+#define PCRE_PARTIAL_HARD 0x08000000 /* E D J */
+#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* E D J */
+#define PCRE_UCP 0x20000000 /* C3 */
/* Exec-time and get/set-time error codes */
-#define PCRE_ERROR_NOMATCH (-1)
-#define PCRE_ERROR_NULL (-2)
-#define PCRE_ERROR_BADOPTION (-3)
-#define PCRE_ERROR_BADMAGIC (-4)
-#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
-#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
-#define PCRE_ERROR_NOMEMORY (-6)
-#define PCRE_ERROR_NOSUBSTRING (-7)
-#define PCRE_ERROR_MATCHLIMIT (-8)
-#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
-#define PCRE_ERROR_BADUTF8 (-10)
-#define PCRE_ERROR_BADUTF8_OFFSET (-11)
-#define PCRE_ERROR_PARTIAL (-12)
-#define PCRE_ERROR_BADPARTIAL (-13)
-#define PCRE_ERROR_INTERNAL (-14)
-#define PCRE_ERROR_BADCOUNT (-15)
-#define PCRE_ERROR_DFA_UITEM (-16)
-#define PCRE_ERROR_DFA_UCOND (-17)
-#define PCRE_ERROR_DFA_UMLIMIT (-18)
-#define PCRE_ERROR_DFA_WSSIZE (-19)
-#define PCRE_ERROR_DFA_RECURSE (-20)
-#define PCRE_ERROR_RECURSIONLIMIT (-21)
-#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
-#define PCRE_ERROR_BADNEWLINE (-23)
-#ifdef ERLANG_INTEGRATION
-#define PCRE_ERROR_LOOP_LIMIT (-24)
+#define PCRE_ERROR_NOMATCH (-1)
+#define PCRE_ERROR_NULL (-2)
+#define PCRE_ERROR_BADOPTION (-3)
+#define PCRE_ERROR_BADMAGIC (-4)
+#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
+#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
+#define PCRE_ERROR_NOMEMORY (-6)
+#define PCRE_ERROR_NOSUBSTRING (-7)
+#define PCRE_ERROR_MATCHLIMIT (-8)
+#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
+#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16/32 */
+#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16/32 */
+#define PCRE_ERROR_BADUTF32 (-10) /* Same for 8/16/32 */
+#define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
+#define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
+#define PCRE_ERROR_PARTIAL (-12)
+#define PCRE_ERROR_BADPARTIAL (-13)
+#define PCRE_ERROR_INTERNAL (-14)
+#define PCRE_ERROR_BADCOUNT (-15)
+#define PCRE_ERROR_DFA_UITEM (-16)
+#define PCRE_ERROR_DFA_UCOND (-17)
+#define PCRE_ERROR_DFA_UMLIMIT (-18)
+#define PCRE_ERROR_DFA_WSSIZE (-19)
+#define PCRE_ERROR_DFA_RECURSE (-20)
+#define PCRE_ERROR_RECURSIONLIMIT (-21)
+#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
+#define PCRE_ERROR_BADNEWLINE (-23)
+#define PCRE_ERROR_BADOFFSET (-24)
+#define PCRE_ERROR_SHORTUTF8 (-25)
+#define PCRE_ERROR_SHORTUTF16 (-25) /* Same for 8/16 */
+#define PCRE_ERROR_RECURSELOOP (-26)
+#define PCRE_ERROR_JIT_STACKLIMIT (-27)
+#define PCRE_ERROR_BADMODE (-28)
+#define PCRE_ERROR_BADENDIANNESS (-29)
+#define PCRE_ERROR_DFA_BADRESTART (-30)
+#define PCRE_ERROR_JIT_BADOPTION (-31)
+#define PCRE_ERROR_BADLENGTH (-32)
+#define PCRE_ERROR_UNSET (-33)
+#if defined(ERLANG_INTEGRATION)
+#define PCRE_ERROR_LOOP_LIMIT (-34)
#endif
+/* Specific error codes for UTF-8 validity checks */
+
+#define PCRE_UTF8_ERR0 0
+#define PCRE_UTF8_ERR1 1
+#define PCRE_UTF8_ERR2 2
+#define PCRE_UTF8_ERR3 3
+#define PCRE_UTF8_ERR4 4
+#define PCRE_UTF8_ERR5 5
+#define PCRE_UTF8_ERR6 6
+#define PCRE_UTF8_ERR7 7
+#define PCRE_UTF8_ERR8 8
+#define PCRE_UTF8_ERR9 9
+#define PCRE_UTF8_ERR10 10
+#define PCRE_UTF8_ERR11 11
+#define PCRE_UTF8_ERR12 12
+#define PCRE_UTF8_ERR13 13
+#define PCRE_UTF8_ERR14 14
+#define PCRE_UTF8_ERR15 15
+#define PCRE_UTF8_ERR16 16
+#define PCRE_UTF8_ERR17 17
+#define PCRE_UTF8_ERR18 18
+#define PCRE_UTF8_ERR19 19
+#define PCRE_UTF8_ERR20 20
+#define PCRE_UTF8_ERR21 21
+#define PCRE_UTF8_ERR22 22 /* Unused (was non-character) */
+
+/* Specific error codes for UTF-16 validity checks */
+
+#define PCRE_UTF16_ERR0 0
+#define PCRE_UTF16_ERR1 1
+#define PCRE_UTF16_ERR2 2
+#define PCRE_UTF16_ERR3 3
+#define PCRE_UTF16_ERR4 4 /* Unused (was non-character) */
+
+/* Specific error codes for UTF-32 validity checks */
+
+#define PCRE_UTF32_ERR0 0
+#define PCRE_UTF32_ERR1 1
+#define PCRE_UTF32_ERR2 2 /* Unused (was non-character) */
+#define PCRE_UTF32_ERR3 3
+
/* Request types for pcre_fullinfo() */
#define PCRE_INFO_OPTIONS 0
@@ -174,8 +271,18 @@ extern "C" {
#define PCRE_INFO_OKPARTIAL 12
#define PCRE_INFO_JCHANGED 13
#define PCRE_INFO_HASCRORLF 14
-
-/* Request types for erts_pcre_config(). Do not re-arrange, in order to remain
+#define PCRE_INFO_MINLENGTH 15
+#define PCRE_INFO_JIT 16
+#define PCRE_INFO_JITSIZE 17
+#define PCRE_INFO_MAXLOOKBEHIND 18
+#define PCRE_INFO_FIRSTCHARACTER 19
+#define PCRE_INFO_FIRSTCHARACTERFLAGS 20
+#define PCRE_INFO_REQUIREDCHAR 21
+#define PCRE_INFO_REQUIREDCHARFLAGS 22
+#define PCRE_INFO_MATCHLIMIT 23
+#define PCRE_INFO_RECURSIONLIMIT 24
+
+/* Request types for pcre_config(). Do not re-arrange, in order to remain
compatible. */
#define PCRE_CONFIG_UTF8 0
@@ -187,8 +294,20 @@ compatible. */
#define PCRE_CONFIG_UNICODE_PROPERTIES 6
#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
#define PCRE_CONFIG_BSR 8
+#define PCRE_CONFIG_JIT 9
+#define PCRE_CONFIG_UTF16 10
+#define PCRE_CONFIG_JITTARGET 11
+#define PCRE_CONFIG_UTF32 12
+
+/* Request types for pcre_study(). Do not re-arrange, in order to remain
+compatible. */
+
+#define PCRE_STUDY_JIT_COMPILE 0x0001
+#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002
+#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004
+#define PCRE_STUDY_EXTRA_NEEDED 0x0008
-/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
+/* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_STUDY_DATA 0x0001
@@ -196,8 +315,10 @@ these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_CALLOUT_DATA 0x0004
#define PCRE_EXTRA_TABLES 0x0008
#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
-#ifdef ERLANG_INTEGRATION
-#define PCRE_EXTRA_LOOP_LIMIT 0x0020
+#define PCRE_EXTRA_MARK 0x0020
+#define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
+#if defined(ERLANG_INTEGRATION)
+#define PCRE_EXTRA_LOOP_LIMIT 0x0080
#endif
/* Types */
@@ -205,6 +326,43 @@ these bits, just add new ones on the end, in order to remain compatible. */
struct real_pcre; /* declaration; the definition is private */
typedef struct real_pcre pcre;
+struct real_pcre16; /* declaration; the definition is private */
+typedef struct real_pcre16 pcre16;
+
+struct real_pcre32; /* declaration; the definition is private */
+typedef struct real_pcre32 pcre32;
+
+struct real_pcre_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre_jit_stack pcre_jit_stack;
+
+struct real_pcre16_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre16_jit_stack pcre16_jit_stack;
+
+struct real_pcre32_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre32_jit_stack pcre32_jit_stack;
+
+/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
+a 16 bit wide signed data type. Otherwise it can be a dummy data type since
+pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
+#ifndef PCRE_UCHAR16
+#define PCRE_UCHAR16 unsigned short
+#endif
+
+#ifndef PCRE_SPTR16
+#define PCRE_SPTR16 const PCRE_UCHAR16 *
+#endif
+
+/* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain
+a 32 bit wide signed data type. Otherwise it can be a dummy data type since
+pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */
+#ifndef PCRE_UCHAR32
+#define PCRE_UCHAR32 unsigned int
+#endif
+
+#ifndef PCRE_SPTR32
+#define PCRE_SPTR32 const PCRE_UCHAR32 *
+#endif
+
/* When PCRE is compiled as a C++ library, the subject pointer type can be
replaced with a custom type. For conventional use, the public interface is a
const char *. */
@@ -217,27 +375,65 @@ const char *. */
such as way as to be extensible. Always add new fields at the end, in order to
remain compatible. */
+#if defined(ERLANG_INTEGRATION)
+typedef struct erts_pcre_extra {
+#else
typedef struct pcre_extra {
+#endif
unsigned long int flags; /* Bits for which fields are set */
void *study_data; /* Opaque data from pcre_study() */
unsigned long int match_limit; /* Maximum number of calls to match() */
void *callout_data; /* Data passed back in callouts */
const unsigned char *tables; /* Pointer to character tables */
unsigned long int match_limit_recursion; /* Max recursive calls to match() */
-#ifdef ERLANG_INTEGRATION
+ unsigned char **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
+#if defined(ERLANG_INTEGRATION)
unsigned long int loop_limit;
unsigned long *loop_counter_return;
void **restart_data; /* in/out */
int restart_flags;
-#endif
+} erts_pcre_extra;
+#else
} pcre_extra;
+#endif
+
+/* Same structure as above, but with 16 bit char pointers. */
+
+typedef struct pcre16_extra {
+ unsigned long int flags; /* Bits for which fields are set */
+ void *study_data; /* Opaque data from pcre_study() */
+ unsigned long int match_limit; /* Maximum number of calls to match() */
+ void *callout_data; /* Data passed back in callouts */
+ const unsigned char *tables; /* Pointer to character tables */
+ unsigned long int match_limit_recursion; /* Max recursive calls to match() */
+ PCRE_UCHAR16 **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
+} pcre16_extra;
+
+/* Same structure as above, but with 32 bit char pointers. */
+
+typedef struct pcre32_extra {
+ unsigned long int flags; /* Bits for which fields are set */
+ void *study_data; /* Opaque data from pcre_study() */
+ unsigned long int match_limit; /* Maximum number of calls to match() */
+ void *callout_data; /* Data passed back in callouts */
+ const unsigned char *tables; /* Pointer to character tables */
+ unsigned long int match_limit_recursion; /* Max recursive calls to match() */
+ PCRE_UCHAR32 **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
+} pcre32_extra;
/* The structure for passing out data via the pcre_callout_function. We use a
structure so that new fields can be added on the end in future versions,
without changing the API of the function, thereby allowing old clients to work
without modification. */
+#if defined(ERLANG_INTEGRATION)
+typedef struct erts_pcre_callout_block {
+#else
typedef struct pcre_callout_block {
+#endif
int version; /* Identifies version of block */
/* ------------------------ Version 0 ------------------------------- */
int callout_number; /* Number compiled into pattern */
@@ -252,8 +448,57 @@ typedef struct pcre_callout_block {
/* ------------------- Added for Version 1 -------------------------- */
int pattern_position; /* Offset to next item in the pattern */
int next_item_length; /* Length of next item in the pattern */
+ /* ------------------- Added for Version 2 -------------------------- */
+ const unsigned char *mark; /* Pointer to current mark or NULL */
/* ------------------------------------------------------------------ */
+#if defined(ERLANG_INTEGRATION)
+} erts_pcre_callout_block;
+#else
} pcre_callout_block;
+#endif
+/* Same structure as above, but with 16 bit char pointers. */
+
+typedef struct pcre16_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ PCRE_SPTR16 subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are in the subject */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ void *callout_data; /* Data passed in with the call */
+ /* ------------------- Added for Version 1 -------------------------- */
+ int pattern_position; /* Offset to next item in the pattern */
+ int next_item_length; /* Length of next item in the pattern */
+ /* ------------------- Added for Version 2 -------------------------- */
+ const PCRE_UCHAR16 *mark; /* Pointer to current mark or NULL */
+ /* ------------------------------------------------------------------ */
+} pcre16_callout_block;
+
+/* Same structure as above, but with 32 bit char pointers. */
+
+typedef struct pcre32_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ PCRE_SPTR32 subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are in the subject */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ void *callout_data; /* Data passed in with the call */
+ /* ------------------- Added for Version 1 -------------------------- */
+ int pattern_position; /* Offset to next item in the pattern */
+ int next_item_length; /* Length of next item in the pattern */
+ /* ------------------- Added for Version 2 -------------------------- */
+ const PCRE_UCHAR32 *mark; /* Pointer to current mark or NULL */
+ /* ------------------------------------------------------------------ */
+} pcre32_callout_block;
/* Indirection for store get and free functions. These can be set to
alternative malloc/free functions if required. Special ones are used in the
@@ -262,52 +507,310 @@ that is triggered by the (?) regex item. For Virtual Pascal, these definitions
have to take another form. */
#ifndef VPCOMPAT
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL void *(*erts_pcre_malloc)(size_t);
PCRE_EXP_DECL void (*erts_pcre_free)(void *);
PCRE_EXP_DECL void *(*erts_pcre_stack_malloc)(size_t);
PCRE_EXP_DECL void (*erts_pcre_stack_free)(void *);
-PCRE_EXP_DECL int (*erts_pcre_callout)(pcre_callout_block *);
+PCRE_EXP_DECL int (*erts_pcre_callout)(erts_pcre_callout_block *);
+#else
+PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre_free)(void *);
+PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre_stack_free)(void *);
+PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
+#endif
+PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre16_free)(void *);
+PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
+PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
+
+PCRE_EXP_DECL void *(*pcre32_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre32_free)(void *);
+PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t);
+PCRE_EXP_DECL void (*pcre32_stack_free)(void *);
+PCRE_EXP_DECL int (*pcre32_callout)(pcre32_callout_block *);
#else /* VPCOMPAT */
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL void *erts_pcre_malloc(size_t);
PCRE_EXP_DECL void erts_pcre_free(void *);
PCRE_EXP_DECL void *erts_pcre_stack_malloc(size_t);
PCRE_EXP_DECL void erts_pcre_stack_free(void *);
-PCRE_EXP_DECL int erts_pcre_callout(pcre_callout_block *);
+PCRE_EXP_DECL int erts_pcre_callout(erts_pcre_callout_block *);
+#else
+PCRE_EXP_DECL void *pcre_malloc(size_t);
+PCRE_EXP_DECL void pcre_free(void *);
+PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
+PCRE_EXP_DECL void pcre_stack_free(void *);
+PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
+#endif
+
+PCRE_EXP_DECL void *pcre16_malloc(size_t);
+PCRE_EXP_DECL void pcre16_free(void *);
+PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
+PCRE_EXP_DECL void pcre16_stack_free(void *);
+PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
+
+PCRE_EXP_DECL void *pcre32_malloc(size_t);
+PCRE_EXP_DECL void pcre32_free(void *);
+PCRE_EXP_DECL void *pcre32_stack_malloc(size_t);
+PCRE_EXP_DECL void pcre32_stack_free(void *);
+PCRE_EXP_DECL int pcre32_callout(pcre32_callout_block *);
#endif /* VPCOMPAT */
+/* User defined callback which provides a stack just before the match starts. */
+
+typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
+typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
+typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *);
+
/* Exported PCRE functions */
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL pcre *erts_pcre_compile(const char *, int, const char **, int *,
const unsigned char *);
+#else
+PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
+ const unsigned char *);
+#endif
+PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
+ const unsigned char *);
+PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *,
+ const unsigned char *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL pcre *erts_pcre_compile2(const char *, int, int *, const char **,
int *, const unsigned char *);
+#else
+PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
+ int *, const unsigned char *);
+#endif
+PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
+ int *, const unsigned char *);
+PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **,
+ int *, const unsigned char *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_config(int, void *);
+#else
+PCRE_EXP_DECL int pcre_config(int, void *);
+#endif
+PCRE_EXP_DECL int pcre16_config(int, void *);
+PCRE_EXP_DECL int pcre32_config(int, void *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_copy_named_substring(const pcre *, const char *,
int *, int, const char *, char *, int);
-PCRE_EXP_DECL int erts_pcre_copy_substring(const char *, int *, int, int, char *,
- int);
-PCRE_EXP_DECL int erts_pcre_dfa_exec(const pcre *, const pcre_extra *,
+#else
+PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
+ int *, int, const char *, char *, int);
+#endif
+PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
+ int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
+PCRE_EXP_DECL int pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32,
+ int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_copy_substring(const char *, int *, int, int,
+ char *, int);
+#else
+PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
+ char *, int);
+#endif
+PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
+ PCRE_UCHAR16 *, int);
+PCRE_EXP_DECL int pcre32_copy_substring(PCRE_SPTR32, int *, int, int,
+ PCRE_UCHAR32 *, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_dfa_exec(const pcre *, const erts_pcre_extra *,
+ const char *, int, int, int, int *, int , int *, int);
+#else
+PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
const char *, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int erts_pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
+#endif
+PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
+ PCRE_SPTR16, int, int, int, int *, int , int *, int);
+PCRE_EXP_DECL int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *,
+ PCRE_SPTR32, int, int, int, int *, int , int *, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_exec(const pcre *, const erts_pcre_extra *, PCRE_SPTR,
+ int, int, int, int *, int);
+#else
+PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
int, int, int, int *, int);
+#endif
+PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
+ PCRE_SPTR16, int, int, int, int *, int);
+PCRE_EXP_DECL int pcre32_exec(const pcre32 *, const pcre32_extra *,
+ PCRE_SPTR32, int, int, int, int *, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_jit_exec(const pcre *, const erts_pcre_extra *,
+ PCRE_SPTR, int, int, int, int *, int,
+ pcre_jit_stack *);
+#else
+PCRE_EXP_DECL int pcre_jit_exec(const pcre *, const pcre_extra *,
+ PCRE_SPTR, int, int, int, int *, int,
+ pcre_jit_stack *);
+#endif
+PCRE_EXP_DECL int pcre16_jit_exec(const pcre16 *, const pcre16_extra *,
+ PCRE_SPTR16, int, int, int, int *, int,
+ pcre16_jit_stack *);
+PCRE_EXP_DECL int pcre32_jit_exec(const pcre32 *, const pcre32_extra *,
+ PCRE_SPTR32, int, int, int, int *, int,
+ pcre32_jit_stack *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL void erts_pcre_free_substring(const char *);
+#else
+PCRE_EXP_DECL void pcre_free_substring(const char *);
+#endif
+PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
+PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL void erts_pcre_free_substring_list(const char **);
-PCRE_EXP_DECL int erts_pcre_fullinfo(const pcre *, const pcre_extra *, int,
+#else
+PCRE_EXP_DECL void pcre_free_substring_list(const char **);
+#endif
+PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
+PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_fullinfo(const pcre *, const erts_pcre_extra *, int,
+ void *);
+#else
+PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
+ void *);
+#endif
+PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
+ void *);
+PCRE_EXP_DECL int pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int,
void *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_get_named_substring(const pcre *, const char *,
int *, int, const char *, const char **);
+#else
+PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
+ int *, int, const char *, const char **);
+#endif
+PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
+ int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
+PCRE_EXP_DECL int pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32,
+ int *, int, PCRE_SPTR32, PCRE_SPTR32 *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_get_stringnumber(const pcre *, const char *);
+#else
+PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
+#endif
+PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
+PCRE_EXP_DECL int pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_get_stringtable_entries(const pcre *, const char *,
char **, char **);
+#else
+PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
+ char **, char **);
+#endif
+PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
+ PCRE_UCHAR16 **, PCRE_UCHAR16 **);
+PCRE_EXP_DECL int pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32,
+ PCRE_UCHAR32 **, PCRE_UCHAR32 **);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_get_substring(const char *, int *, int, int,
const char **);
+#else
+PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
+ const char **);
+#endif
+PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
+ PCRE_SPTR16 *);
+PCRE_EXP_DECL int pcre32_get_substring(PCRE_SPTR32, int *, int, int,
+ PCRE_SPTR32 *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_get_substring_list(const char *, int *, int,
const char ***);
-PCRE_EXP_DECL int erts_pcre_info(const pcre *, int *, int *);
+#else
+PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
+ const char ***);
+#endif
+PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
+ PCRE_SPTR16 **);
+PCRE_EXP_DECL int pcre32_get_substring_list(PCRE_SPTR32, int *, int,
+ PCRE_SPTR32 **);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL const unsigned char *erts_pcre_maketables(void);
+#else
+PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
+#endif
+PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
+PCRE_EXP_DECL const unsigned char *pcre32_maketables(void);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL int erts_pcre_refcount(pcre *, int);
-PCRE_EXP_DECL pcre_extra *erts_pcre_study(const pcre *, int, const char **);
+#else
+PCRE_EXP_DECL int pcre_refcount(pcre *, int);
+#endif
+PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
+PCRE_EXP_DECL int pcre32_refcount(pcre32 *, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL erts_pcre_extra *erts_pcre_study(const pcre *, int, const char **);
+#else
+PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
+#endif
+PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
+PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void erts_pcre_free_study(erts_pcre_extra *);
+#else
+PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
+#endif
+PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
+PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *);
+#if defined(ERLANG_INTEGRATION)
PCRE_EXP_DECL const char *erts_pcre_version(void);
+#else
+PCRE_EXP_DECL const char *pcre_version(void);
+#endif
+PCRE_EXP_DECL const char *pcre16_version(void);
+PCRE_EXP_DECL const char *pcre32_version(void);
+
+/* Utility functions for byte order swaps. */
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_pattern_to_host_byte_order(pcre *, erts_pcre_extra *,
+ const unsigned char *);
+#else
+PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
+ const unsigned char *);
+#endif
+PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
+ const unsigned char *);
+PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *,
+ const unsigned char *);
+PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
+ PCRE_SPTR16, int, int *, int);
+PCRE_EXP_DECL int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *,
+ PCRE_SPTR32, int, int *, int);
+
+/* JIT compiler related functions. */
+
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL pcre_jit_stack *erts_pcre_jit_stack_alloc(int, int);
+#else
+PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
+#endif
+PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
+PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void erts_pcre_jit_stack_free(pcre_jit_stack *);
+#else
+PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
+#endif
+PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
+PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *);
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void erts_pcre_assign_jit_stack(erts_pcre_extra *,
+ pcre_jit_callback, void *);
+#else
+PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
+ pcre_jit_callback, void *);
+#endif
+PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
+ pcre16_jit_callback, void *);
+PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *,
+ pcre32_jit_callback, void *);
#ifdef ERLANG_INTEGRATION
PCRE_EXP_DECL void erts_pcre_free_restart_data(void *restart_data);
diff --git a/erts/emulator/pcre/pcre.mk b/erts/emulator/pcre/pcre.mk
index 57bf5de2fb..54412f6b1d 100644
--- a/erts/emulator/pcre/pcre.mk
+++ b/erts/emulator/pcre/pcre.mk
@@ -26,17 +26,18 @@ pcre_exec.o \
pcre_fullinfo.o \
pcre_get.o \
pcre_globals.o \
-pcre_info.o \
pcre_maketables.o \
pcre_newline.o \
pcre_ord2utf8.o \
pcre_refcount.o \
pcre_study.o \
pcre_tables.o \
-pcre_try_flipped.o \
-pcre_ucp_searchfuncs.o \
pcre_valid_utf8.o \
pcre_version.o \
+pcre_byte_order.o \
+pcre_jit_compile.o \
+pcre_string_utils.o \
+pcre_ucd.o \
pcre_xclass.o
PCRE_OBJS = $(PCRE_O:%=$(PCRE_OBJDIR)/%)
@@ -45,6 +46,8 @@ PCRE_GENINC = $(ERL_TOP)/erts/emulator/pcre/pcre_exec_loop_break_cases.inc
PCRE_OBJDIR = $(ERL_TOP)/erts/emulator/pcre/obj/$(TARGET)/$(TYPE)
+PCRE_DIR = $(ERL_TOP)/erts/emulator/pcre
+
PCRE_CFLAGS = $(filter-out -DDEBUG,$(CFLAGS)) -DERLANG_INTEGRATION
ifeq ($(TARGET), win32)
@@ -56,11 +59,11 @@ $(EPCRE_LIB): $(PCRE_OBJS)
-@ ($(RANLIB) $@ || true) 2>/dev/null
endif
-$(PCRE_OBJDIR)/%.o: pcre/%.c
+$(PCRE_OBJDIR)/%.o: $(PCRE_DIR)/%.c
$(V_CC) -c $(PCRE_CFLAGS) -o $@ $<
-$(PCRE_GENINC): pcre/pcre_exec.c
- $(gen_verbose)for x in `grep -n COST_CHK pcre/pcre_exec.c | grep -v 'COST_CHK(N)' | awk -F: '{print $$1}'`; \
+$(PCRE_GENINC): $(PCRE_DIR)/pcre_exec.c
+ $(gen_verbose)for x in `grep -n COST_CHK $(PCRE_DIR)/pcre_exec.c | grep -v 'COST_CHK(N)' | awk -F: '{print $$1}'`; \
do \
N=`expr $$x + 100`; \
echo "case $$N: goto L_LOOP_COUNT_$${x};"; \
@@ -68,44 +71,66 @@ $(PCRE_GENINC): pcre/pcre_exec.c
# Dependencies.
-$(PCRE_OBJDIR)/pcre_chartables.o: pcre/pcre_chartables.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_compile.o: pcre/pcre_compile.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_config.o: pcre/pcre_config.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_dfa_exec.o: pcre/pcre_dfa_exec.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_exec.o: pcre/pcre_exec.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h $(PCRE_GENINC)
-$(PCRE_OBJDIR)/pcre_fullinfo.o: pcre/pcre_fullinfo.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_get.o: pcre/pcre_get.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_globals.o: pcre/pcre_globals.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_info.o: pcre/pcre_info.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_maketables.o: pcre/pcre_maketables.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_newline.o: pcre/pcre_newline.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_ord2utf8.o: pcre/pcre_ord2utf8.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre/pcre_refcount.o: pcre/pcre_refcount.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_study.o: pcre/pcre_study.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_tables.o: pcre/pcre_tables.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_try_flipped.o: pcre/pcre_try_flipped.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre_ucp_searchfuncs.o: pcre/pcre_ucp_searchfuncs.c \
- pcre/pcre_internal.h pcre/local_config.h pcre/pcre.h pcre/ucp.h \
- pcre/ucpinternal.h pcre/ucptable.h
-$(PCRE_OBJDIR)/pcre_valid_utf8.o: pcre/pcre_valid_utf8.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
-pcre_version.o: pcre/pcre_version.c pcre/pcre_internal.h pcre/local_config.h \
- pcre/pcre.h pcre/ucp.h
-$(PCRE_OBJDIR)/pcre/pcre_xclass.o: pcre/pcre_xclass.c pcre/pcre_internal.h \
- pcre/local_config.h pcre/pcre.h pcre/ucp.h
+$(PCRE_OBJDIR)/pcre_byte_order.o: $(PCRE_DIR)/pcre_byte_order.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h \
+ $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_compile.o: $(PCRE_DIR)/pcre_compile.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_config.o: $(PCRE_DIR)/pcre_config.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_dfa_exec.o: $(PCRE_DIR)/pcre_dfa_exec.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_exec.o: $(PCRE_DIR)/pcre_exec.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h $(PCRE_GENINC)
+$(PCRE_OBJDIR)/pcre_fullinfo.o: $(PCRE_DIR)/pcre_fullinfo.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_get.o: $(PCRE_DIR)/pcre_get.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_globals.o: $(PCRE_DIR)/pcre_globals.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_jit_compile.o: $(PCRE_DIR)/pcre_jit_compile.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_latin_1_table.o: $(PCRE_DIR)/pcre_latin_1_table.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_maketables.o: $(PCRE_DIR)/pcre_maketables.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_newline.o: $(PCRE_DIR)/pcre_newline.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_ord2utf8.o: $(PCRE_DIR)/pcre_ord2utf8.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_refcount.o: $(PCRE_DIR)/pcre_refcount.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_string_utils.o: $(PCRE_DIR)/pcre_string_utils.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_study.o: $(PCRE_DIR)/pcre_study.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_tables.o: $(PCRE_DIR)/pcre_tables.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_ucd.o: $(PCRE_DIR)/pcre_ucd.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_valid_utf8.o: $(PCRE_DIR)/pcre_valid_utf8.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_version.o: $(PCRE_DIR)/pcre_version.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
+$(PCRE_OBJDIR)/pcre_xclass.o: $(PCRE_DIR)/pcre_xclass.c \
+ $(PCRE_DIR)/pcre_internal.h $(PCRE_DIR)/local_config.h \
+ $(PCRE_DIR)/pcre.h $(PCRE_DIR)/ucp.h
diff --git a/erts/emulator/pcre/pcre_byte_order.c b/erts/emulator/pcre/pcre_byte_order.c
new file mode 100644
index 0000000000..710676988f
--- /dev/null
+++ b/erts/emulator/pcre/pcre_byte_order.c
@@ -0,0 +1,324 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Copyright (c) 1997-2013 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains an internal function that tests a compiled pattern to
+see if it was compiled with the opposite endianness. If so, it uses an
+auxiliary local function to flip the appropriate bytes. */
+/* %ExternalCopyright% */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre_internal.h"
+
+
+/*************************************************
+* Swap byte functions *
+*************************************************/
+
+/* The following functions swap the bytes of a pcre_uint16
+and pcre_uint32 value.
+
+Arguments:
+ value any number
+
+Returns: the byte swapped value
+*/
+
+static pcre_uint32
+swap_uint32(pcre_uint32 value)
+{
+return ((value & 0x000000ff) << 24) |
+ ((value & 0x0000ff00) << 8) |
+ ((value & 0x00ff0000) >> 8) |
+ (value >> 24);
+}
+
+static pcre_uint16
+swap_uint16(pcre_uint16 value)
+{
+return (value >> 8) | (value << 8);
+}
+
+
+/*************************************************
+* Test for a byte-flipped compiled regex *
+*************************************************/
+
+/* This function swaps the bytes of a compiled pattern usually
+loaded form the disk. It also sets the tables pointer, which
+is likely an invalid pointer after reload.
+
+Arguments:
+ argument_re points to the compiled expression
+ extra_data points to extra data or is NULL
+ tables points to the character tables or NULL
+
+Returns: 0 if the swap is successful, negative on error
+*/
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL int erts_pcre_pattern_to_host_byte_order(pcre *argument_re,
+ erts_pcre_extra *extra_data, const unsigned char *tables)
+#else
+PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *argument_re,
+ pcre_extra *extra_data, const unsigned char *tables)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *argument_re,
+ pcre16_extra *extra_data, const unsigned char *tables)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *argument_re,
+ pcre32_extra *extra_data, const unsigned char *tables)
+#endif
+{
+REAL_PCRE *re = (REAL_PCRE *)argument_re;
+pcre_study_data *study;
+#ifndef COMPILE_PCRE8
+pcre_uchar *ptr;
+int length;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE16
+BOOL utf;
+BOOL utf16_char;
+#endif /* SUPPORT_UTF && COMPILE_PCRE16 */
+#endif /* !COMPILE_PCRE8 */
+
+if (re == NULL) return PCRE_ERROR_NULL;
+if (re->magic_number == MAGIC_NUMBER)
+ {
+ if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
+ re->tables = tables;
+ return 0;
+ }
+
+if (re->magic_number != REVERSED_MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+if ((swap_uint32(re->flags) & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
+
+re->magic_number = MAGIC_NUMBER;
+re->size = swap_uint32(re->size);
+re->options = swap_uint32(re->options);
+re->flags = swap_uint32(re->flags);
+re->limit_match = swap_uint32(re->limit_match);
+re->limit_recursion = swap_uint32(re->limit_recursion);
+
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+re->first_char = swap_uint16(re->first_char);
+re->req_char = swap_uint16(re->req_char);
+#elif defined COMPILE_PCRE32
+re->first_char = swap_uint32(re->first_char);
+re->req_char = swap_uint32(re->req_char);
+#endif
+
+re->max_lookbehind = swap_uint16(re->max_lookbehind);
+re->top_bracket = swap_uint16(re->top_bracket);
+re->top_backref = swap_uint16(re->top_backref);
+re->name_table_offset = swap_uint16(re->name_table_offset);
+re->name_entry_size = swap_uint16(re->name_entry_size);
+re->name_count = swap_uint16(re->name_count);
+re->ref_count = swap_uint16(re->ref_count);
+re->tables = tables;
+
+if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
+ {
+ study = (pcre_study_data *)extra_data->study_data;
+ study->size = swap_uint32(study->size);
+ study->flags = swap_uint32(study->flags);
+ study->minlength = swap_uint32(study->minlength);
+ }
+
+#ifndef COMPILE_PCRE8
+ptr = (pcre_uchar *)re + re->name_table_offset;
+length = re->name_count * re->name_entry_size;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE16
+utf = (re->options & PCRE_UTF16) != 0;
+utf16_char = FALSE;
+#endif /* SUPPORT_UTF && COMPILE_PCRE16 */
+
+while(TRUE)
+ {
+ /* Swap previous characters. */
+ while (length-- > 0)
+ {
+#if defined COMPILE_PCRE16
+ *ptr = swap_uint16(*ptr);
+#elif defined COMPILE_PCRE32
+ *ptr = swap_uint32(*ptr);
+#endif
+ ptr++;
+ }
+#if defined SUPPORT_UTF && defined COMPILE_PCRE16
+ if (utf16_char)
+ {
+ if (HAS_EXTRALEN(ptr[-1]))
+ {
+ /* We know that there is only one extra character in UTF-16. */
+ *ptr = swap_uint16(*ptr);
+ ptr++;
+ }
+ }
+ utf16_char = FALSE;
+#endif /* SUPPORT_UTF */
+
+ /* Get next opcode. */
+ length = 0;
+#if defined COMPILE_PCRE16
+ *ptr = swap_uint16(*ptr);
+#elif defined COMPILE_PCRE32
+ *ptr = swap_uint32(*ptr);
+#endif
+ switch (*ptr)
+ {
+ case OP_END:
+ return 0;
+
+#if defined SUPPORT_UTF && defined COMPILE_PCRE16
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ if (utf) utf16_char = TRUE;
+#endif
+ /* Fall through. */
+
+ default:
+ length = PRIV(OP_lengths)[*ptr] - 1;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ /* Skip the character bit map. */
+ ptr += 32/sizeof(pcre_uchar);
+ length = 0;
+ break;
+
+ case OP_XCLASS:
+ /* Reverse the size of the XCLASS instance. */
+ ptr++;
+#if defined COMPILE_PCRE16
+ *ptr = swap_uint16(*ptr);
+#elif defined COMPILE_PCRE32
+ *ptr = swap_uint32(*ptr);
+#endif
+#ifndef COMPILE_PCRE32
+ if (LINK_SIZE > 1)
+ {
+ /* LINK_SIZE can be 1 or 2 in 16 bit mode. */
+ ptr++;
+ *ptr = swap_uint16(*ptr);
+ }
+#endif
+ ptr++;
+ length = (GET(ptr, -LINK_SIZE)) - (1 + LINK_SIZE + 1);
+#if defined COMPILE_PCRE16
+ *ptr = swap_uint16(*ptr);
+#elif defined COMPILE_PCRE32
+ *ptr = swap_uint32(*ptr);
+#endif
+ if ((*ptr & XCL_MAP) != 0)
+ {
+ /* Skip the character bit map. */
+ ptr += 32/sizeof(pcre_uchar);
+ length -= 32/sizeof(pcre_uchar);
+ }
+ break;
+ }
+ ptr++;
+ }
+/* Control should never reach here in 16/32 bit mode. */
+#endif /* !COMPILE_PCRE8 */
+
+return 0;
+}
+
+/* End of pcre_byte_order.c */
diff --git a/erts/emulator/pcre/pcre_chartables.c b/erts/emulator/pcre/pcre_chartables.c
index f851b1b261..0d7ecd5261 100644
--- a/erts/emulator/pcre/pcre_chartables.c
+++ b/erts/emulator/pcre/pcre_chartables.c
@@ -14,12 +14,11 @@ example ISO-8859-1. When dftables is run, it creates these tables in the
current locale. If PCRE is configured with --enable-rebuild-chartables, this
happens automatically.
-The following #includes are present because without the gcc 4.x may remove the
+The following #includes are present because without them gcc 4.x may remove the
array definition from the final binary if PCRE is built into a static library
and dead code stripping is activated. This leads to link errors. Pulling in the
header ensures that the array gets flagged as "someone outside this compilation
unit might reference this" and so it will always be supplied to the linker. */
-
/* %ExternalCopyright% */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,7 +26,7 @@ unit might reference this" and so it will always be supplied to the linker. */
#include "pcre_internal.h"
-const unsigned char _erts_pcre_default_tables[] = {
+const pcre_uint8 PRIV(default_tables)[] = {
/* This table is a lower casing table. */
diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
index 9508c5a697..d48126a55d 100644
--- a/erts/emulator/pcre/pcre_compile.c
+++ b/erts/emulator/pcre/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_compile(), along with
+/* This module contains the external function pcre_compile(), along with
supporting internal functions that are not used by other modules. */
/* %ExternalCopyright% */
@@ -54,17 +54,22 @@ supporting internal functions that are not used by other modules. */
#include "pcre_internal.h"
-/* When DEBUG is defined, we need the pcre_printint() function, which is also
-used by pcretest. DEBUG is not defined when building a production library. */
+/* When PCRE_DEBUG is defined, we need the pcre(16|32)_printint() function, which
+is also used by pcretest. PCRE_DEBUG is not defined when building a production
+library. We do not need to select pcre16_printint.c specially, because the
+COMPILE_PCREx macro will already be appropriately set. */
-#ifdef DEBUG
-#include "pcre_printint.src"
+#ifdef PCRE_DEBUG
+/* pcre_printint.c should not include any headers */
+#define PCRE_INCLUDED
+#include "pcre_printint.c"
+#undef PCRE_INCLUDED
#endif
/* Macro for setting individual bits in class bitmaps. */
-#define SETBIT(a,b) a[b/8] |= (1 << (b%8))
+#define SETBIT(a,b) a[(b)/8] |= (1 << ((b)&7))
/* Maximum length value to check against when making sure that the integer that
holds the compiled pattern length does not overflow. We make it a bit less than
@@ -73,6 +78,18 @@ to check them every time. */
#define OFLOW_MAX (INT_MAX - 20)
+/* Definitions to allow mutual recursion */
+
+static int
+ add_list_to_class(pcre_uint8 *, pcre_uchar **, int, compile_data *,
+ const pcre_uint32 *, unsigned int);
+
+static BOOL
+ compile_regex(int, pcre_uchar **, const pcre_uchar **, int *, BOOL, BOOL, int, int,
+ pcre_uint32 *, pcre_int32 *, pcre_uint32 *, pcre_int32 *, branch_chain *,
+ compile_data *, int *);
+
+
/*************************************************
* Code parameters and static tables *
@@ -88,36 +105,89 @@ so this number is very generous.
The same workspace is used during the second, actual compile phase for
remembering forward references to groups so that they can be filled in at the
end. Each entry in this list occupies LINK_SIZE bytes, so even when LINK_SIZE
-is 4 there is plenty of room. */
+is 4 there is plenty of room for most patterns. However, the memory can get
+filled up by repetitions of forward references, for example patterns like
+/(?1){0,1999}(b)/, and one user did hit the limit. The code has been changed so
+that the workspace is expanded using malloc() in this situation. The value
+below is therefore a minimum, and we put a maximum on it for safety. The
+minimum is now also defined in terms of LINK_SIZE so that the use of malloc()
+kicks in at the same number of forward references in all cases. */
-#define COMPILE_WORK_SIZE (4096)
+#define COMPILE_WORK_SIZE (2048*LINK_SIZE)
+#define COMPILE_WORK_SIZE_MAX (100*COMPILE_WORK_SIZE)
/* The overrun tests check for a slightly smaller size so that they detect the
overrun before it actually does run off the end of the data block. */
-#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100)
+#define WORK_SIZE_SAFETY_MARGIN (100)
+/* Private flags added to firstchar and reqchar. */
+
+#define REQ_CASELESS (1 << 0) /* Indicates caselessness */
+#define REQ_VARY (1 << 1) /* Reqchar followed non-literal item */
+/* Negative values for the firstchar and reqchar flags */
+#define REQ_UNSET (-2)
+#define REQ_NONE (-1)
+
+/* Repeated character flags. */
+
+#define UTF_LENGTH 0x10000000l /* The char contains its length. */
/* Table for handling escaped characters in the range '0'-'z'. Positive returns
are simple data values; negative values are for special things like \d and so
on. Zero means further processing is needed (for things like \x), or the escape
is invalid. */
-#ifndef EBCDIC /* This is the "normal" table for ASCII systems */
+#ifndef EBCDIC
+
+/* This is the "normal" table for ASCII systems or for EBCDIC systems running
+in UTF-8 mode. */
+
static const short int escapes[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */
- 0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */
- '@', -ESC_A, -ESC_B, -ESC_C, -ESC_D, -ESC_E, 0, -ESC_G, /* @ - G */
--ESC_H, 0, 0, -ESC_K, 0, 0, 0, 0, /* H - O */
--ESC_P, -ESC_Q, -ESC_R, -ESC_S, 0, 0, -ESC_V, -ESC_W, /* P - W */
--ESC_X, 0, -ESC_Z, '[', '\\', ']', '^', '_', /* X - _ */
- '`', 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0, /* ` - g */
--ESC_h, 0, 0, -ESC_k, 0, 0, ESC_n, 0, /* h - o */
--ESC_p, 0, ESC_r, -ESC_s, ESC_tee, 0, -ESC_v, -ESC_w, /* p - w */
- 0, 0, -ESC_z /* x - z */
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ CHAR_COLON, CHAR_SEMICOLON,
+ CHAR_LESS_THAN_SIGN, CHAR_EQUALS_SIGN,
+ CHAR_GREATER_THAN_SIGN, CHAR_QUESTION_MARK,
+ CHAR_COMMERCIAL_AT, -ESC_A,
+ -ESC_B, -ESC_C,
+ -ESC_D, -ESC_E,
+ 0, -ESC_G,
+ -ESC_H, 0,
+ 0, -ESC_K,
+ 0, 0,
+ -ESC_N, 0,
+ -ESC_P, -ESC_Q,
+ -ESC_R, -ESC_S,
+ 0, 0,
+ -ESC_V, -ESC_W,
+ -ESC_X, 0,
+ -ESC_Z, CHAR_LEFT_SQUARE_BRACKET,
+ CHAR_BACKSLASH, CHAR_RIGHT_SQUARE_BRACKET,
+ CHAR_CIRCUMFLEX_ACCENT, CHAR_UNDERSCORE,
+ CHAR_GRAVE_ACCENT, 7,
+ -ESC_b, 0,
+ -ESC_d, ESC_e,
+ ESC_f, 0,
+ -ESC_h, 0,
+ 0, -ESC_k,
+ 0, 0,
+ ESC_n, 0,
+ -ESC_p, 0,
+ ESC_r, -ESC_s,
+ ESC_tee, 0,
+ -ESC_v, -ESC_w,
+ 0, 0,
+ -ESC_z
};
-#else /* This is the "abnormal" table for EBCDIC systems */
+#else
+
+/* This is the "abnormal" table for EBCDIC systems without UTF-8 support. */
+
static const short int escapes[] = {
/* 48 */ 0, 0, 0, '.', '<', '(', '+', '|',
/* 50 */ '&', 0, 0, 0, 0, 0, 0, 0,
@@ -136,7 +206,7 @@ static const short int escapes[] = {
/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G,
/* C8 */-ESC_H, 0, 0, 0, 0, 0, 0, 0,
-/* D0 */ '}', 0, -ESC_K, 0, 0, 0, 0, -ESC_P,
+/* D0 */ '}', 0, -ESC_K, 0, 0,-ESC_N, 0, -ESC_P,
/* D8 */-ESC_Q,-ESC_R, 0, 0, 0, 0, 0, 0,
/* E0 */ '\\', 0, -ESC_S, 0, 0,-ESC_V, -ESC_W, -ESC_X,
/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0,
@@ -148,33 +218,40 @@ static const short int escapes[] = {
/* Table of special "verbs" like (*PRUNE). This is a short table, so it is
searched linearly. Put all the names into a single string, in order to reduce
-the number of relocations when a shared library is dynamically linked. */
+the number of relocations when a shared library is dynamically linked. The
+string is built from string macros so that it works in UTF-8 mode on EBCDIC
+platforms. */
typedef struct verbitem {
- int len;
- int op;
+ int len; /* Length of verb name */
+ int op; /* Op when no arg, or -1 if arg mandatory */
+ int op_arg; /* Op when arg present, or -1 if not allowed */
} verbitem;
static const char verbnames[] =
- "ACCEPT\0"
- "COMMIT\0"
- "F\0"
- "FAIL\0"
- "PRUNE\0"
- "SKIP\0"
- "THEN";
-
-static verbitem verbs[] = {
- { 6, OP_ACCEPT },
- { 6, OP_COMMIT },
- { 1, OP_FAIL },
- { 4, OP_FAIL },
- { 5, OP_PRUNE },
- { 4, OP_SKIP },
- { 4, OP_THEN }
+ "\0" /* Empty name is a shorthand for MARK */
+ STRING_MARK0
+ STRING_ACCEPT0
+ STRING_COMMIT0
+ STRING_F0
+ STRING_FAIL0
+ STRING_PRUNE0
+ STRING_SKIP0
+ STRING_THEN;
+
+static const verbitem verbs[] = {
+ { 0, -1, OP_MARK },
+ { 4, -1, OP_MARK },
+ { 6, OP_ACCEPT, -1 },
+ { 6, OP_COMMIT, -1 },
+ { 1, OP_FAIL, -1 },
+ { 4, OP_FAIL, -1 },
+ { 5, OP_PRUNE, OP_PRUNE_ARG },
+ { 4, OP_SKIP, OP_SKIP_ARG },
+ { 4, OP_THEN, OP_THEN_ARG }
};
-static int verbcount = sizeof(verbs)/sizeof(verbitem);
+static const int verbcount = sizeof(verbs)/sizeof(verbitem);
/* Tables of names of POSIX character classes and their lengths. The names are
@@ -184,11 +261,12 @@ length entry. The first three must be alpha, lower, upper, as this is assumed
for handling case independence. */
static const char posix_names[] =
- "alpha\0" "lower\0" "upper\0" "alnum\0" "ascii\0" "blank\0"
- "cntrl\0" "digit\0" "graph\0" "print\0" "punct\0" "space\0"
- "word\0" "xdigit";
+ STRING_alpha0 STRING_lower0 STRING_upper0 STRING_alnum0
+ STRING_ascii0 STRING_blank0 STRING_cntrl0 STRING_digit0
+ STRING_graph0 STRING_print0 STRING_punct0 STRING_space0
+ STRING_word0 STRING_xdigit;
-static const uschar posix_name_lengths[] = {
+static const pcre_uint8 posix_name_lengths[] = {
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
/* Table of class bit maps for each POSIX class. Each class is formed from a
@@ -218,6 +296,107 @@ static const int posix_class_maps[] = {
cbit_xdigit,-1, 0 /* xdigit */
};
+/* Table of substitutes for \d etc when PCRE_UCP is set. The POSIX class
+substitutes must be in the order of the names, defined above, and there are
+both positive and negative cases. NULL means no substitute. */
+
+#ifdef SUPPORT_UCP
+static const pcre_uchar string_PNd[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pNd[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXsp[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXsp[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXwd[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXwd[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+
+static const pcre_uchar *substitutes[] = {
+ string_PNd, /* \D */
+ string_pNd, /* \d */
+ string_PXsp, /* \S */ /* NOTE: Xsp is Perl space */
+ string_pXsp, /* \s */
+ string_PXwd, /* \W */
+ string_pXwd /* \w */
+};
+
+static const pcre_uchar string_pL[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pLl[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pLu[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_pXan[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_h[] = {
+ CHAR_BACKSLASH, CHAR_h, '\0' };
+static const pcre_uchar string_pXps[] = {
+ CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PL[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PLl[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PLu[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_PXan[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+static const pcre_uchar string_H[] = {
+ CHAR_BACKSLASH, CHAR_H, '\0' };
+static const pcre_uchar string_PXps[] = {
+ CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
+ CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
+
+static const pcre_uchar *posix_substitutes[] = {
+ string_pL, /* alpha */
+ string_pLl, /* lower */
+ string_pLu, /* upper */
+ string_pXan, /* alnum */
+ NULL, /* ascii */
+ string_h, /* blank */
+ NULL, /* cntrl */
+ string_pNd, /* digit */
+ NULL, /* graph */
+ NULL, /* print */
+ NULL, /* punct */
+ string_pXps, /* space */ /* NOTE: Xps is POSIX space */
+ string_pXwd, /* word */
+ NULL, /* xdigit */
+ /* Negated cases */
+ string_PL, /* ^alpha */
+ string_PLl, /* ^lower */
+ string_PLu, /* ^upper */
+ string_PXan, /* ^alnum */
+ NULL, /* ^ascii */
+ string_H, /* ^blank */
+ NULL, /* ^cntrl */
+ string_PNd, /* ^digit */
+ NULL, /* ^graph */
+ NULL, /* ^print */
+ NULL, /* ^punct */
+ string_PXps, /* ^space */ /* NOTE: Xps is POSIX space */
+ string_PXwd, /* ^word */
+ NULL /* ^xdigit */
+};
+#define POSIX_SUBSIZE (sizeof(posix_substitutes) / sizeof(pcre_uchar *))
+#endif
#define STRING(a) # a
#define XSTRING(s) STRING(s)
@@ -230,7 +409,11 @@ the number of relocations needed when a shared library is loaded dynamically,
it is now one long string. We cannot use a table of offsets, because the
lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead, we
simply count through to the one we want - this isn't a performance issue
-because these strings are used only when there is a compilation error. */
+because these strings are used only when there is a compilation error.
+
+Each substring ends with \0 to insert a null character. This includes the final
+substring, so that the whole string ends with \0\0, which can be detected when
+counting through. */
static const char error_texts[] =
"no error\0"
@@ -271,13 +454,13 @@ static const char error_texts[] =
/* 30 */
"unknown POSIX class name\0"
"POSIX collating elements are not supported\0"
- "this version of PCRE is not compiled with PCRE_UTF8 support\0"
+ "this version of PCRE is compiled without UTF support\0"
"spare error\0" /** DEAD **/
"character value in \\x{...} sequence is too large\0"
/* 35 */
"invalid condition (?(0)\0"
"\\C not allowed in lookbehind assertion\0"
- "PCRE does not support \\L, \\l, \\N, \\U, or \\u\0"
+ "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0"
"number after (?C is > 255\0"
"closing ) for (?C expected\0"
/* 40 */
@@ -294,22 +477,40 @@ static const char error_texts[] =
"too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0"
/* 50 */
"repeated subpattern is too long\0" /** DEAD **/
- "octal value is greater than \\377 (not in UTF-8 mode)\0"
+ "octal value is greater than \\377 in 8-bit non-UTF-8 mode\0"
"internal error: overran compiling workspace\0"
"internal error: previously-checked referenced subpattern not found\0"
"DEFINE group contains more than one branch\0"
/* 55 */
- "repeating a DEFINE group is not allowed\0"
+ "repeating a DEFINE group is not allowed\0" /** DEAD **/
"inconsistent NEWLINE options\0"
- "\\g is not followed by a braced name or an optionally braced non-zero number\0"
- "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number\0"
- "(*VERB) with an argument is not supported\0"
+ "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
+ "a numbered reference must not be zero\0"
+ "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0"
/* 60 */
- "(*VERB) not recognized\0"
+ "(*VERB) not recognized or malformed\0"
"number is too big\0"
"subpattern name expected\0"
- "digit expected after (?+";
-
+ "digit expected after (?+\0"
+ "] is an invalid data character in JavaScript compatibility mode\0"
+ /* 65 */
+ "different names for subpatterns of the same number are not allowed\0"
+ "(*MARK) must have an argument\0"
+ "this version of PCRE is not compiled with Unicode property support\0"
+ "\\c must be followed by an ASCII character\0"
+ "\\k is not followed by a braced, angle-bracketed, or quoted name\0"
+ /* 70 */
+ "internal error: unknown opcode in find_fixedlength()\0"
+ "\\N is not supported in a class\0"
+ "too many forward references\0"
+ "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
+ "invalid UTF-16 string\0"
+ /* 75 */
+ "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
+ "character value in \\u.... sequence is too large\0"
+ "invalid UTF-32 string\0"
+ "setting UTF is disabled by the application\0"
+ ;
/* Table to identify digits and hex digits. This is used when compiling
patterns. Note that the tables in chartables are dependent on the locale, and
@@ -327,8 +528,18 @@ For convenience, we use the same bit definitions as in chartables:
Then we can use ctype_digit and ctype_xdigit in the code. */
-#ifndef EBCDIC /* This is the "normal" case, for ASCII systems */
-static const unsigned char digitab[] =
+/* Using a simple comparison for decimal numbers rather than a memory read
+is much faster, and the resulting code is simpler (the compiler turns it
+into a subtraction and unsigned comparison). */
+
+#define IS_DIGIT(x) ((x) >= CHAR_0 && (x) <= CHAR_9)
+
+#ifndef EBCDIC
+
+/* This is the "normal" case, for ASCII systems, and EBCDIC systems running in
+UTF-8 mode. */
+
+static const pcre_uint8 digitab[] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
@@ -363,8 +574,11 @@ static const unsigned char digitab[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
-#else /* This is the "abnormal" case, for EBCDIC systems */
-static const unsigned char digitab[] =
+#else
+
+/* This is the "abnormal" case, for EBCDIC systems not running in UTF-8 mode. */
+
+static const pcre_uint8 digitab[] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 0 */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
@@ -399,7 +613,7 @@ static const unsigned char digitab[] =
0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 F0 */
0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */
-static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */
+static const pcre_uint8 ebcdic_chartab[] = { /* chartable partial dup */
0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 0- 7 */
0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 16- 23 */
@@ -435,13 +649,6 @@ static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */
#endif
-/* Definition to allow mutual recursion */
-
-static BOOL
- compile_regex(int, int, uschar **, const uschar **, int *, BOOL, BOOL, int,
- int *, int *, branch_chain *, compile_data *, int *);
-
-
/*************************************************
* Find an error text *
@@ -460,98 +667,245 @@ static const char *
find_error_text(int n)
{
const char *s = error_texts;
-for (; n > 0; n--) while (*s++ != 0);
+for (; n > 0; n--)
+ {
+ while (*s++ != CHAR_NULL) {};
+ if (*s == CHAR_NULL) return "Error text not found (please report)";
+ }
return s;
}
/*************************************************
+* Expand the workspace *
+*************************************************/
+
+/* This function is called during the second compiling phase, if the number of
+forward references fills the existing workspace, which is originally a block on
+the stack. A larger block is obtained from malloc() unless the ultimate limit
+has been reached or the increase will be rather small.
+
+Argument: pointer to the compile data block
+Returns: 0 if all went well, else an error number
+*/
+
+static int
+expand_workspace(compile_data *cd)
+{
+pcre_uchar *newspace;
+int newsize = cd->workspace_size * 2;
+
+if (newsize > COMPILE_WORK_SIZE_MAX) newsize = COMPILE_WORK_SIZE_MAX;
+if (cd->workspace_size >= COMPILE_WORK_SIZE_MAX ||
+ newsize - cd->workspace_size < WORK_SIZE_SAFETY_MARGIN)
+ return ERR72;
+
+newspace = (PUBL(malloc))(IN_UCHARS(newsize));
+if (newspace == NULL) return ERR21;
+memcpy(newspace, cd->start_workspace, cd->workspace_size * sizeof(pcre_uchar));
+cd->hwm = (pcre_uchar *)newspace + (cd->hwm - cd->start_workspace);
+if (cd->workspace_size > COMPILE_WORK_SIZE)
+ (PUBL(free))((void *)cd->start_workspace);
+cd->start_workspace = newspace;
+cd->workspace_size = newsize;
+return 0;
+}
+
+
+
+/*************************************************
+* Check for counted repeat *
+*************************************************/
+
+/* This function is called when a '{' is encountered in a place where it might
+start a quantifier. It looks ahead to see if it really is a quantifier or not.
+It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
+where the ddds are digits.
+
+Arguments:
+ p pointer to the first char after '{'
+
+Returns: TRUE or FALSE
+*/
+
+static BOOL
+is_counted_repeat(const pcre_uchar *p)
+{
+if (!IS_DIGIT(*p)) return FALSE;
+p++;
+while (IS_DIGIT(*p)) p++;
+if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
+
+if (*p++ != CHAR_COMMA) return FALSE;
+if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
+
+if (!IS_DIGIT(*p)) return FALSE;
+p++;
+while (IS_DIGIT(*p)) p++;
+
+return (*p == CHAR_RIGHT_CURLY_BRACKET);
+}
+
+
+
+/*************************************************
* Handle escapes *
*************************************************/
/* This function is called when a \ has been encountered. It either returns a
-positive value for a simple escape such as \n, or a negative value which
-encodes one of the more complicated things such as \d. A backreference to group
-n is returned as -(ESC_REF + n); ESC_REF is the highest ESC_xxx macro. When
-UTF-8 is enabled, a positive value greater than 255 may be returned. On entry,
-ptr is pointing at the \. On exit, it is on the final character of the escape
-sequence.
+positive value for a simple escape such as \n, or 0 for a data character
+which will be placed in chptr. A backreference to group n is returned as
+negative n. When UTF-8 is enabled, a positive value greater than 255 may
+be returned in chptr.
+On entry,ptr is pointing at the \. On exit, it is on the final character of the
+escape sequence.
Arguments:
ptrptr points to the pattern position pointer
+ chptr points to the data character
errorcodeptr points to the errorcode variable
bracount number of previous extracting brackets
options the options bits
isclass TRUE if inside a character class
-Returns: zero or positive => a data character
- negative => a special escape sequence
+Returns: zero => a data character
+ positive => a special escape sequence
+ negative => a back reference
on error, errorcodeptr is set
*/
static int
-check_escape(const uschar **ptrptr, int *errorcodeptr, int bracount,
- int options, BOOL isclass)
+check_escape(const pcre_uchar **ptrptr, pcre_uint32 *chptr, int *errorcodeptr,
+ int bracount, int options, BOOL isclass)
{
-BOOL utf8 = (options & PCRE_UTF8) != 0;
-const uschar *ptr = *ptrptr + 1;
-int c, i;
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
+const pcre_uchar *ptr = *ptrptr + 1;
+pcre_uint32 c;
+int escape = 0;
+int i;
GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
ptr--; /* Set pointer back to the last byte */
/* If backslash is at the end of the pattern, it's an error. */
-if (c == 0) *errorcodeptr = ERR1;
+
+if (c == CHAR_NULL) *errorcodeptr = ERR1;
/* Non-alphanumerics are literals. For digits or letters, do an initial lookup
in a table. A non-zero result is something that can be returned immediately.
Otherwise further processing may be required. */
-#ifndef EBCDIC /* ASCII coding */
-else if (c < '0' || c > 'z') {} /* Not alphanumeric */
-else if ((i = escapes[c - '0']) != 0) c = i;
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+/* Not alphanumeric */
+else if (c < CHAR_0 || c > CHAR_z) {}
+else if ((i = escapes[c - CHAR_0]) != 0)
+ { if (i > 0) c = (pcre_uint32)i; else escape = -i; }
#else /* EBCDIC coding */
-else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphanumeric */
-else if ((i = escapes[c - 0x48]) != 0) c = i;
+/* Not alphanumeric */
+else if (c < CHAR_a || (!MAX_255(c) || (ebcdic_chartab[c] & 0x0E) == 0)) {}
+else if ((i = escapes[c - 0x48]) != 0) { if (i > 0) c = (pcre_uint32)i; else escape = -i; }
#endif
/* Escapes that need further processing, or are illegal. */
else
{
- const uschar *oldptr;
- BOOL braced, negated;
+ const pcre_uchar *oldptr;
+ BOOL braced, negated, overflow;
+ int s;
switch (c)
{
/* A number of Perl escapes are not handled by PCRE. We give an explicit
error. */
- case 'l':
- case 'L':
- case 'N':
- case 'u':
- case 'U':
+ case CHAR_l:
+ case CHAR_L:
*errorcodeptr = ERR37;
break;
- /* \g must be followed by a number, either plain or braced. If positive, it
- is an absolute backreference. If negative, it is a relative backreference.
- This is a Perl 5.10 feature. Perl 5.10 also supports \g{name} as a
- reference to a named group. This is part of Perl's movement towards a
- unified syntax for back references. As this is synonymous with \k{name}, we
- fudge it up by pretending it really was \k. */
+ case CHAR_u:
+ if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ /* In JavaScript, \u must be followed by four hexadecimal numbers.
+ Otherwise it is a lowercase u letter. */
+ if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
+ && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0
+ && MAX_255(ptr[3]) && (digitab[ptr[3]] & ctype_xdigit) != 0
+ && MAX_255(ptr[4]) && (digitab[ptr[4]] & ctype_xdigit) != 0)
+ {
+ c = 0;
+ for (i = 0; i < 4; ++i)
+ {
+ register pcre_uint32 cc = *(++ptr);
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
+#else /* EBCDIC coding */
+ if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
+#endif
+ }
- case 'g':
- if (ptr[1] == '{')
+#if defined COMPILE_PCRE8
+ if (c > (utf ? 0x10ffffU : 0xffU))
+#elif defined COMPILE_PCRE16
+ if (c > (utf ? 0x10ffffU : 0xffffU))
+#elif defined COMPILE_PCRE32
+ if (utf && c > 0x10ffffU)
+#endif
+ {
+ *errorcodeptr = ERR76;
+ }
+ else if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
+ }
+ }
+ else
+ *errorcodeptr = ERR37;
+ break;
+
+ case CHAR_U:
+ /* In JavaScript, \U is an uppercase U letter. */
+ if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) *errorcodeptr = ERR37;
+ break;
+
+ /* In a character class, \g is just a literal "g". Outside a character
+ class, \g must be followed by one of a number of specific things:
+
+ (1) A number, either plain or braced. If positive, it is an absolute
+ backreference. If negative, it is a relative backreference. This is a Perl
+ 5.10 feature.
+
+ (2) Perl 5.10 also supports \g{name} as a reference to a named group. This
+ is part of Perl's movement towards a unified syntax for back references. As
+ this is synonymous with \k{name}, we fudge it up by pretending it really
+ was \k.
+
+ (3) For Oniguruma compatibility we also support \g followed by a name or a
+ number either in angle brackets or in single quotes. However, these are
+ (possibly recursive) subroutine calls, _not_ backreferences. Just return
+ the ESC_g code (cf \k). */
+
+ case CHAR_g:
+ if (isclass) break;
+ if (ptr[1] == CHAR_LESS_THAN_SIGN || ptr[1] == CHAR_APOSTROPHE)
{
- const uschar *p;
- for (p = ptr+2; *p != 0 && *p != '}'; p++)
- if (*p != '-' && (digitab[*p] & ctype_digit) == 0) break;
- if (*p != 0 && *p != '}')
+ escape = ESC_g;
+ break;
+ }
+
+ /* Handle the Perl-compatible cases */
+
+ if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
+ {
+ const pcre_uchar *p;
+ for (p = ptr+2; *p != CHAR_NULL && *p != CHAR_RIGHT_CURLY_BRACKET; p++)
+ if (*p != CHAR_MINUS && !IS_DIGIT(*p)) break;
+ if (*p != CHAR_NULL && *p != CHAR_RIGHT_CURLY_BRACKET)
{
- c = -ESC_k;
+ escape = ESC_k;
break;
}
braced = TRUE;
@@ -559,40 +913,56 @@ else
}
else braced = FALSE;
- if (ptr[1] == '-')
+ if (ptr[1] == CHAR_MINUS)
{
negated = TRUE;
ptr++;
}
else negated = FALSE;
- c = 0;
- while ((digitab[ptr[1]] & ctype_digit) != 0)
- c = c * 10 + *(++ptr) - '0';
-
- if (c < 0)
+ /* The integer range is limited by the machine's int representation. */
+ s = 0;
+ overflow = FALSE;
+ while (IS_DIGIT(ptr[1]))
{
+ if (s > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ overflow = TRUE;
+ break;
+ }
+ s = s * 10 + (int)(*(++ptr) - CHAR_0);
+ }
+ if (overflow) /* Integer overflow */
+ {
+ while (IS_DIGIT(ptr[1]))
+ ptr++;
*errorcodeptr = ERR61;
break;
}
- if (c == 0 || (braced && *(++ptr) != '}'))
+ if (braced && *(++ptr) != CHAR_RIGHT_CURLY_BRACKET)
{
*errorcodeptr = ERR57;
break;
}
+ if (s == 0)
+ {
+ *errorcodeptr = ERR58;
+ break;
+ }
+
if (negated)
{
- if (c > bracount)
+ if (s > bracount)
{
*errorcodeptr = ERR15;
break;
}
- c = bracount - (c - 1);
+ s = bracount - (s - 1);
}
- c = -(ESC_REF + c);
+ escape = -s;
break;
/* The handling of escape sequences consisting of a string of digits
@@ -607,23 +977,34 @@ else
value is greater than 377, the least significant 8 bits are taken. Inside a
character class, \ followed by a digit is always an octal number. */
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
+ case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4: case CHAR_5:
+ case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
if (!isclass)
{
oldptr = ptr;
- c -= '0';
- while ((digitab[ptr[1]] & ctype_digit) != 0)
- c = c * 10 + *(++ptr) - '0';
- if (c < 0)
+ /* The integer range is limited by the machine's int representation. */
+ s = (int)(c -CHAR_0);
+ overflow = FALSE;
+ while (IS_DIGIT(ptr[1]))
+ {
+ if (s > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ overflow = TRUE;
+ break;
+ }
+ s = s * 10 + (int)(*(++ptr) - CHAR_0);
+ }
+ if (overflow) /* Integer overflow */
{
+ while (IS_DIGIT(ptr[1]))
+ ptr++;
*errorcodeptr = ERR61;
break;
}
- if (c < 10 || c <= bracount)
+ if (s < 10 || s <= bracount)
{
- c = -(ESC_REF + c);
+ escape = -s;
break;
}
ptr = oldptr; /* Put the pointer back and fall through */
@@ -633,7 +1014,7 @@ else
generates a binary zero byte and treats the digit as a following literal.
Thus we have to pull back the pointer by one. */
- if ((c = *ptr) >= '8')
+ if ((c = *ptr) >= CHAR_8)
{
ptr--;
c = 0;
@@ -643,45 +1024,87 @@ else
/* \0 always starts an octal number, but we may drop through to here with a
larger first octal digit. The original code used just to take the least
significant 8 bits of octal numbers (I think this is what early Perls used
- to do). Nowadays we allow for larger numbers in UTF-8 mode, but no more
- than 3 octal digits. */
-
- case '0':
- c -= '0';
- while(i++ < 2 && ptr[1] >= '0' && ptr[1] <= '7')
- c = c * 8 + *(++ptr) - '0';
- if (!utf8 && c > 255) *errorcodeptr = ERR51;
+ to do). Nowadays we allow for larger numbers in UTF-8 mode and 16-bit mode,
+ but no more than 3 octal digits. */
+
+ case CHAR_0:
+ c -= CHAR_0;
+ while(i++ < 2 && ptr[1] >= CHAR_0 && ptr[1] <= CHAR_7)
+ c = c * 8 + *(++ptr) - CHAR_0;
+#ifdef COMPILE_PCRE8
+ if (!utf && c > 0xff) *errorcodeptr = ERR51;
+#endif
break;
/* \x is complicated. \x{ddd} is a character number which can be greater
- than 0xff in utf8 mode, but only if the ddd are hex digits. If not, { is
- treated as a data character. */
+ than 0xff in utf or non-8bit mode, but only if the ddd are hex digits.
+ If not, { is treated as a data character. */
+
+ case CHAR_x:
+ if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ /* In JavaScript, \x must be followed by two hexadecimal numbers.
+ Otherwise it is a lowercase x letter. */
+ if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
+ && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0)
+ {
+ c = 0;
+ for (i = 0; i < 2; ++i)
+ {
+ register pcre_uint32 cc = *(++ptr);
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
+#else /* EBCDIC coding */
+ if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
+#endif
+ }
+ }
+ break;
+ }
- case 'x':
- if (ptr[1] == '{')
+ if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
{
- const uschar *pt = ptr + 2;
- int count = 0;
+ const pcre_uchar *pt = ptr + 2;
c = 0;
- while ((digitab[*pt] & ctype_xdigit) != 0)
+ overflow = FALSE;
+ while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0)
{
- register int cc = *pt++;
- if (c == 0 && cc == '0') continue; /* Leading zeroes */
- count++;
+ register pcre_uint32 cc = *pt++;
+ if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */
-#ifndef EBCDIC /* ASCII coding */
- if (cc >= 'a') cc -= 32; /* Convert to upper case */
- c = (c << 4) + cc - ((cc < 'A')? '0' : ('A' - 10));
+#ifdef COMPILE_PCRE32
+ if (c >= 0x10000000l) { overflow = TRUE; break; }
+#endif
+
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
#else /* EBCDIC coding */
- if (cc >= 'a' && cc <= 'z') cc += 64; /* Convert to upper case */
- c = (c << 4) + cc - ((cc >= '0')? '0' : ('A' - 10));
+ if (cc >= CHAR_a && cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
+#endif
+
+#if defined COMPILE_PCRE8
+ if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; }
+#elif defined COMPILE_PCRE16
+ if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; }
+#elif defined COMPILE_PCRE32
+ if (utf && c > 0x10ffffU) { overflow = TRUE; break; }
#endif
}
- if (*pt == '}')
+ if (overflow)
{
- if (c < 0 || count > (utf8? 8 : 2)) *errorcodeptr = ERR34;
+ while (MAX_255(*pt) && (digitab[*pt] & ctype_xdigit) != 0) pt++;
+ *errorcodeptr = ERR34;
+ }
+
+ if (*pt == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
ptr = pt;
break;
}
@@ -693,37 +1116,42 @@ else
/* Read just a single-byte hex-defined char */
c = 0;
- while (i++ < 2 && (digitab[ptr[1]] & ctype_xdigit) != 0)
+ while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0)
{
- int cc; /* Some compilers don't like ++ */
- cc = *(++ptr); /* in initializers */
-#ifndef EBCDIC /* ASCII coding */
- if (cc >= 'a') cc -= 32; /* Convert to upper case */
- c = c * 16 + cc - ((cc < 'A')? '0' : ('A' - 10));
+ pcre_uint32 cc; /* Some compilers don't like */
+ cc = *(++ptr); /* ++ in initializers */
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (cc >= CHAR_a) cc -= 32; /* Convert to upper case */
+ c = c * 16 + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
#else /* EBCDIC coding */
- if (cc <= 'z') cc += 64; /* Convert to upper case */
- c = c * 16 + cc - ((cc >= '0')? '0' : ('A' - 10));
+ if (cc <= CHAR_z) cc += 64; /* Convert to upper case */
+ c = c * 16 + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
#endif
}
break;
/* For \c, a following letter is upper-cased; then the 0x40 bit is flipped.
- This coding is ASCII-specific, but then the whole concept of \cx is
+ An error is given if the byte following \c is not an ASCII character. This
+ coding is ASCII-specific, but then the whole concept of \cx is
ASCII-specific. (However, an EBCDIC equivalent has now been added.) */
- case 'c':
+ case CHAR_c:
c = *(++ptr);
- if (c == 0)
+ if (c == CHAR_NULL)
{
*errorcodeptr = ERR2;
break;
}
-
-#ifndef EBCDIC /* ASCII coding */
- if (c >= 'a' && c <= 'z') c -= 32;
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (c > 127) /* Excludes all non-ASCII in either mode */
+ {
+ *errorcodeptr = ERR68;
+ break;
+ }
+ if (c >= CHAR_a && c <= CHAR_z) c -= 32;
c ^= 0x40;
-#else /* EBCDIC coding */
- if (c >= 'a' && c <= 'z') c += 64;
+#else /* EBCDIC coding */
+ if (c >= CHAR_a && c <= CHAR_z) c += 64;
c ^= 0xC0;
#endif
break;
@@ -745,11 +1173,25 @@ else
}
}
-*ptrptr = ptr;
-return c;
-}
+/* Perl supports \N{name} for character names, as well as plain \N for "not
+newline". PCRE does not support \N{name}. However, it does support
+quantification such as \N{2,3}. */
+
+if (escape == ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET &&
+ !is_counted_repeat(ptr+2))
+ *errorcodeptr = ERR37;
+/* If PCRE_UCP is set, we change the values for \d etc. */
+if ((options & PCRE_UCP) != 0 && escape >= ESC_D && escape <= ESC_w)
+ escape += (ESC_DU - ESC_D);
+
+/* Set the pointer to the final character before returning. */
+
+*ptrptr = ptr;
+*chptr = c;
+return escape;
+}
#ifdef SUPPORT_UCP
/*************************************************
@@ -764,42 +1206,45 @@ escape sequence.
Argument:
ptrptr points to the pattern position pointer
negptr points to a boolean that is set TRUE for negation else FALSE
- dptr points to an int that is set to the detailed property value
+ ptypeptr points to an unsigned int that is set to the type value
+ pdataptr points to an unsigned int that is set to the detailed property value
errorcodeptr points to the error code variable
-Returns: type value from ucp_type_table, or -1 for an invalid type
+Returns: TRUE if the type value was found, or FALSE for an invalid type
*/
-static int
-get_ucp(const uschar **ptrptr, BOOL *negptr, int *dptr, int *errorcodeptr)
+static BOOL
+get_ucp(const pcre_uchar **ptrptr, BOOL *negptr, unsigned int *ptypeptr,
+ unsigned int *pdataptr, int *errorcodeptr)
{
-int c, i, bot, top;
-const uschar *ptr = *ptrptr;
-char name[32];
+pcre_uchar c;
+int i, bot, top;
+const pcre_uchar *ptr = *ptrptr;
+pcre_uchar name[32];
c = *(++ptr);
-if (c == 0) goto ERROR_RETURN;
+if (c == CHAR_NULL) goto ERROR_RETURN;
*negptr = FALSE;
/* \P or \p can be followed by a name in {}, optionally preceded by ^ for
negation. */
-if (c == '{')
+if (c == CHAR_LEFT_CURLY_BRACKET)
{
- if (ptr[1] == '^')
+ if (ptr[1] == CHAR_CIRCUMFLEX_ACCENT)
{
*negptr = TRUE;
ptr++;
}
- for (i = 0; i < (int)sizeof(name) - 1; i++)
+ for (i = 0; i < (int)(sizeof(name) / sizeof(pcre_uchar)) - 1; i++)
{
c = *(++ptr);
- if (c == 0) goto ERROR_RETURN;
- if (c == '}') break;
+ if (c == CHAR_NULL) goto ERROR_RETURN;
+ if (c == CHAR_RIGHT_CURLY_BRACKET) break;
name[i] = c;
}
- if (c !='}') goto ERROR_RETURN;
+ if (c != CHAR_RIGHT_CURLY_BRACKET) goto ERROR_RETURN;
name[i] = 0;
}
@@ -816,28 +1261,30 @@ else
/* Search for a recognized property name using binary chop */
bot = 0;
-top = _erts_pcre_utt_size;
+top = PRIV(utt_size);
while (bot < top)
{
+ int r;
i = (bot + top) >> 1;
- c = strcmp(name, _erts_pcre_utt_names + _erts_pcre_utt[i].name_offset);
- if (c == 0)
+ r = STRCMP_UC_C8(name, PRIV(utt_names) + PRIV(utt)[i].name_offset);
+ if (r == 0)
{
- *dptr = _erts_pcre_utt[i].value;
- return _erts_pcre_utt[i].type;
+ *ptypeptr = PRIV(utt)[i].type;
+ *pdataptr = PRIV(utt)[i].value;
+ return TRUE;
}
- if (c > 0) bot = i + 1; else top = i;
+ if (r > 0) bot = i + 1; else top = i;
}
*errorcodeptr = ERR47;
*ptrptr = ptr;
-return -1;
+return FALSE;
ERROR_RETURN:
*errorcodeptr = ERR46;
*ptrptr = ptr;
-return -1;
+return FALSE;
}
#endif
@@ -845,39 +1292,6 @@ return -1;
/*************************************************
-* Check for counted repeat *
-*************************************************/
-
-/* This function is called when a '{' is encountered in a place where it might
-start a quantifier. It looks ahead to see if it really is a quantifier or not.
-It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
-where the ddds are digits.
-
-Arguments:
- p pointer to the first char after '{'
-
-Returns: TRUE or FALSE
-*/
-
-static BOOL
-is_counted_repeat(const uschar *p)
-{
-if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
-while ((digitab[*p] & ctype_digit) != 0) p++;
-if (*p == '}') return TRUE;
-
-if (*p++ != ',') return FALSE;
-if (*p == '}') return TRUE;
-
-if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
-while ((digitab[*p] & ctype_digit) != 0) p++;
-
-return (*p == '}');
-}
-
-
-
-/*************************************************
* Read repeat counts *
*************************************************/
@@ -896,8 +1310,8 @@ Returns: pointer to '}' on success;
current ptr on error, with errorcodeptr set non-zero
*/
-static const uschar *
-read_repeat_counts(const uschar *p, int *minp, int *maxp, int *errorcodeptr)
+static const pcre_uchar *
+read_repeat_counts(const pcre_uchar *p, int *minp, int *maxp, int *errorcodeptr)
{
int min = 0;
int max = -1;
@@ -905,7 +1319,7 @@ int max = -1;
/* Read the minimum value and do a paranoid check: a negative value indicates
an integer overflow. */
-while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';
+while (IS_DIGIT(*p)) min = min * 10 + (int)(*p++ - CHAR_0);
if (min < 0 || min > 65535)
{
*errorcodeptr = ERR5;
@@ -915,12 +1329,12 @@ if (min < 0 || min > 65535)
/* Read the maximum value if there is one, and again do a paranoid on its size.
Also, max must not be less than min. */
-if (*p == '}') max = min; else
+if (*p == CHAR_RIGHT_CURLY_BRACKET) max = min; else
{
- if (*(++p) != '}')
+ if (*(++p) != CHAR_RIGHT_CURLY_BRACKET)
{
max = 0;
- while((digitab[*p] & ctype_digit) != 0) max = max * 10 + *p++ - '0';
+ while(IS_DIGIT(*p)) max = max * 10 + (int)(*p++ - CHAR_0);
if (max < 0 || max > 65535)
{
*errorcodeptr = ERR5;
@@ -945,65 +1359,201 @@ return p;
/*************************************************
-* Find forward referenced subpattern *
+* Subroutine for finding forward reference *
*************************************************/
-/* This function scans along a pattern's text looking for capturing
+/* This recursive function is called only from find_parens() below. The
+top-level call starts at the beginning of the pattern. All other calls must
+start at a parenthesis. It scans along a pattern's text looking for capturing
subpatterns, and counting them. If it finds a named pattern that matches the
name it is given, it returns its number. Alternatively, if the name is NULL, it
-returns when it reaches a given numbered subpattern. This is used for forward
-references to subpatterns. We know that if (?P< is encountered, the name will
-be terminated by '>' because that is checked in the first pass.
+returns when it reaches a given numbered subpattern. Recursion is used to keep
+track of subpatterns that reset the capturing group numbers - the (?| feature.
+
+This function was originally called only from the second pass, in which we know
+that if (?< or (?' or (?P< is encountered, the name will be correctly
+terminated because that is checked in the first pass. There is now one call to
+this function in the first pass, to check for a recursive back reference by
+name (so that we can make the whole group atomic). In this case, we need check
+only up to the current position in the pattern, and that is still OK because
+and previous occurrences will have been checked. To make this work, the test
+for "end of pattern" is a check against cd->end_pattern in the main loop,
+instead of looking for a binary zero. This means that the special first-pass
+call can adjust cd->end_pattern temporarily. (Checks for binary zero while
+processing items within the loop are OK, because afterwards the main loop will
+terminate.)
Arguments:
- ptr current position in the pattern
- count current count of capturing parens so far encountered
+ ptrptr address of the current character pointer (updated)
+ cd compile background data
name name to seek, or NULL if seeking a numbered subpattern
lorn name length, or subpattern number if name is NULL
xmode TRUE if we are in /x mode
+ utf TRUE if we are in UTF-8 / UTF-16 / UTF-32 mode
+ count pointer to the current capturing subpattern number (updated)
Returns: the number of the named subpattern, or -1 if not found
*/
static int
-find_parens(const uschar *ptr, int count, const uschar *name, int lorn,
- BOOL xmode)
+find_parens_sub(pcre_uchar **ptrptr, compile_data *cd, const pcre_uchar *name, int lorn,
+ BOOL xmode, BOOL utf, int *count)
{
-const uschar *thisname;
+pcre_uchar *ptr = *ptrptr;
+int start_count = *count;
+int hwm_count = start_count;
+BOOL dup_parens = FALSE;
-for (; *ptr != 0; ptr++)
+/* If the first character is a parenthesis, check on the type of group we are
+dealing with. The very first call may not start with a parenthesis. */
+
+if (ptr[0] == CHAR_LEFT_PARENTHESIS)
{
- int term;
+ /* Handle specials such as (*SKIP) or (*UTF8) etc. */
+
+ if (ptr[1] == CHAR_ASTERISK)
+ {
+ ptr += 2;
+ while (ptr < cd->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ }
+
+ /* Handle a normal, unnamed capturing parenthesis. */
+ else if (ptr[1] != CHAR_QUESTION_MARK)
+ {
+ *count += 1;
+ if (name == NULL && *count == lorn) return *count;
+ ptr++;
+ }
+
+ /* All cases now have (? at the start. Remember when we are in a group
+ where the parenthesis numbers are duplicated. */
+
+ else if (ptr[2] == CHAR_VERTICAL_LINE)
+ {
+ ptr += 3;
+ dup_parens = TRUE;
+ }
+
+ /* Handle comments; all characters are allowed until a ket is reached. */
+
+ else if (ptr[2] == CHAR_NUMBER_SIGN)
+ {
+ for (ptr += 3; *ptr != CHAR_NULL; ptr++)
+ if (*ptr == CHAR_RIGHT_PARENTHESIS) break;
+ goto FAIL_EXIT;
+ }
+
+ /* Handle a condition. If it is an assertion, just carry on so that it
+ is processed as normal. If not, skip to the closing parenthesis of the
+ condition (there can't be any nested parens). */
+
+ else if (ptr[2] == CHAR_LEFT_PARENTHESIS)
+ {
+ ptr += 2;
+ if (ptr[1] != CHAR_QUESTION_MARK)
+ {
+ while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ if (*ptr != CHAR_NULL) ptr++;
+ }
+ }
+
+ /* Start with (? but not a condition. */
+
+ else
+ {
+ ptr += 2;
+ if (*ptr == CHAR_P) ptr++; /* Allow optional P */
+
+ /* We have to disambiguate (?<! and (?<= from (?<name> for named groups */
+
+ if ((*ptr == CHAR_LESS_THAN_SIGN && ptr[1] != CHAR_EXCLAMATION_MARK &&
+ ptr[1] != CHAR_EQUALS_SIGN) || *ptr == CHAR_APOSTROPHE)
+ {
+ pcre_uchar term;
+ const pcre_uchar *thisname;
+ *count += 1;
+ if (name == NULL && *count == lorn) return *count;
+ term = *ptr++;
+ if (term == CHAR_LESS_THAN_SIGN) term = CHAR_GREATER_THAN_SIGN;
+ thisname = ptr;
+ while (*ptr != term) ptr++;
+ if (name != NULL && lorn == (int)(ptr - thisname) &&
+ STRNCMP_UC_UC(name, thisname, (unsigned int)lorn) == 0)
+ return *count;
+ term++;
+ }
+ }
+ }
+
+/* Past any initial parenthesis handling, scan for parentheses or vertical
+bars. Stop if we get to cd->end_pattern. Note that this is important for the
+first-pass call when this value is temporarily adjusted to stop at the current
+position. So DO NOT change this to a test for binary zero. */
+
+for (; ptr < cd->end_pattern; ptr++)
+ {
/* Skip over backslashed characters and also entire \Q...\E */
- if (*ptr == '\\')
+ if (*ptr == CHAR_BACKSLASH)
{
- if (*(++ptr) == 0) return -1;
- if (*ptr == 'Q') for (;;)
+ if (*(++ptr) == CHAR_NULL) goto FAIL_EXIT;
+ if (*ptr == CHAR_Q) for (;;)
{
- while (*(++ptr) != 0 && *ptr != '\\');
- if (*ptr == 0) return -1;
- if (*(++ptr) == 'E') break;
+ while (*(++ptr) != CHAR_NULL && *ptr != CHAR_BACKSLASH) {};
+ if (*ptr == CHAR_NULL) goto FAIL_EXIT;
+ if (*(++ptr) == CHAR_E) break;
}
continue;
}
- /* Skip over character classes */
+ /* Skip over character classes; this logic must be similar to the way they
+ are handled for real. If the first character is '^', skip it. Also, if the
+ first few characters (either before or after ^) are \Q\E or \E we skip them
+ too. This makes for compatibility with Perl. Note the use of STR macros to
+ encode "Q\\E" so that it works in UTF-8 on EBCDIC platforms. */
- if (*ptr == '[')
+ if (*ptr == CHAR_LEFT_SQUARE_BRACKET)
{
- while (*(++ptr) != ']')
+ BOOL negate_class = FALSE;
+ for (;;)
{
- if (*ptr == 0) return -1;
- if (*ptr == '\\')
+ if (ptr[1] == CHAR_BACKSLASH)
{
- if (*(++ptr) == 0) return -1;
- if (*ptr == 'Q') for (;;)
+ if (ptr[2] == CHAR_E)
+ ptr+= 2;
+ else if (STRNCMP_UC_C8(ptr + 2,
+ STR_Q STR_BACKSLASH STR_E, 3) == 0)
+ ptr += 4;
+ else
+ break;
+ }
+ else if (!negate_class && ptr[1] == CHAR_CIRCUMFLEX_ACCENT)
+ {
+ negate_class = TRUE;
+ ptr++;
+ }
+ else break;
+ }
+
+ /* If the next character is ']', it is a data character that must be
+ skipped, except in JavaScript compatibility mode. */
+
+ if (ptr[1] == CHAR_RIGHT_SQUARE_BRACKET &&
+ (cd->external_options & PCRE_JAVASCRIPT_COMPAT) == 0)
+ ptr++;
+
+ while (*(++ptr) != CHAR_RIGHT_SQUARE_BRACKET)
+ {
+ if (*ptr == CHAR_NULL) return -1;
+ if (*ptr == CHAR_BACKSLASH)
+ {
+ if (*(++ptr) == CHAR_NULL) goto FAIL_EXIT;
+ if (*ptr == CHAR_Q) for (;;)
{
- while (*(++ptr) != 0 && *ptr != '\\');
- if (*ptr == 0) return -1;
- if (*(++ptr) == 'E') break;
+ while (*(++ptr) != CHAR_NULL && *ptr != CHAR_BACKSLASH) {};
+ if (*ptr == CHAR_NULL) goto FAIL_EXIT;
+ if (*(++ptr) == CHAR_E) break;
}
continue;
}
@@ -1013,89 +1563,131 @@ for (; *ptr != 0; ptr++)
/* Skip comments in /x mode */
- if (xmode && *ptr == '#')
+ if (xmode && *ptr == CHAR_NUMBER_SIGN)
{
- while (*(++ptr) != 0 && *ptr != '\n');
- if (*ptr == 0) return -1;
+ ptr++;
+ while (*ptr != CHAR_NULL)
+ {
+ if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; }
+ ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
+#endif
+ }
+ if (*ptr == CHAR_NULL) goto FAIL_EXIT;
continue;
}
- /* An opening parens must now be a real metacharacter */
+ /* Check for the special metacharacters */
- if (*ptr != '(') continue;
- if (ptr[1] != '?' && ptr[1] != '*')
+ if (*ptr == CHAR_LEFT_PARENTHESIS)
{
- count++;
- if (name == NULL && count == lorn) return count;
- continue;
+ int rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, count);
+ if (rc > 0) return rc;
+ if (*ptr == CHAR_NULL) goto FAIL_EXIT;
}
- ptr += 2;
- if (*ptr == 'P') ptr++; /* Allow optional P */
+ else if (*ptr == CHAR_RIGHT_PARENTHESIS)
+ {
+ if (dup_parens && *count < hwm_count) *count = hwm_count;
+ goto FAIL_EXIT;
+ }
+
+ else if (*ptr == CHAR_VERTICAL_LINE && dup_parens)
+ {
+ if (*count > hwm_count) hwm_count = *count;
+ *count = start_count;
+ }
+ }
- /* We have to disambiguate (?<! and (?<= from (?<name> */
+FAIL_EXIT:
+*ptrptr = ptr;
+return -1;
+}
- if ((*ptr != '<' || ptr[1] == '!' || ptr[1] == '=') &&
- *ptr != '\'')
- continue;
- count++;
- if (name == NULL && count == lorn) return count;
- term = *ptr++;
- if (term == '<') term = '>';
- thisname = ptr;
- while (*ptr != term) ptr++;
- if (name != NULL && lorn == ptr - thisname &&
- strncmp((const char *)name, (const char *)thisname, lorn) == 0)
- return count;
+
+/*************************************************
+* Find forward referenced subpattern *
+*************************************************/
+
+/* This function scans along a pattern's text looking for capturing
+subpatterns, and counting them. If it finds a named pattern that matches the
+name it is given, it returns its number. Alternatively, if the name is NULL, it
+returns when it reaches a given numbered subpattern. This is used for forward
+references to subpatterns. We used to be able to start this scan from the
+current compiling point, using the current count value from cd->bracount, and
+do it all in a single loop, but the addition of the possibility of duplicate
+subpattern numbers means that we have to scan from the very start, in order to
+take account of such duplicates, and to use a recursive function to keep track
+of the different types of group.
+
+Arguments:
+ cd compile background data
+ name name to seek, or NULL if seeking a numbered subpattern
+ lorn name length, or subpattern number if name is NULL
+ xmode TRUE if we are in /x mode
+ utf TRUE if we are in UTF-8 / UTF-16 / UTF-32 mode
+
+Returns: the number of the found subpattern, or -1 if not found
+*/
+
+static int
+find_parens(compile_data *cd, const pcre_uchar *name, int lorn, BOOL xmode,
+ BOOL utf)
+{
+pcre_uchar *ptr = (pcre_uchar *)cd->start_pattern;
+int count = 0;
+int rc;
+
+/* If the pattern does not start with an opening parenthesis, the first call
+to find_parens_sub() will scan right to the end (if necessary). However, if it
+does start with a parenthesis, find_parens_sub() will return when it hits the
+matching closing parens. That is why we have to have a loop. */
+
+for (;;)
+ {
+ rc = find_parens_sub(&ptr, cd, name, lorn, xmode, utf, &count);
+ if (rc > 0 || *ptr++ == CHAR_NULL) break;
}
-return -1;
+return rc;
}
+
/*************************************************
* Find first significant op code *
*************************************************/
/* This is called by several functions that scan a compiled expression looking
for a fixed first character, or an anchoring op code etc. It skips over things
-that do not influence this. For some calls, a change of option is important.
-For some calls, it makes sense to skip negative forward and all backward
-assertions, and also the \b assertion; for others it does not.
+that do not influence this. For some calls, it makes sense to skip negative
+forward and all backward assertions, and also the \b assertion; for others it
+does not.
Arguments:
code pointer to the start of the group
- options pointer to external options
- optbit the option bit whose changing is significant, or
- zero if none are
skipassert TRUE if certain assertions are to be skipped
Returns: pointer to the first significant opcode
*/
-static const uschar*
-first_significant_code(const uschar *code, int *options, int optbit,
- BOOL skipassert)
+static const pcre_uchar*
+first_significant_code(const pcre_uchar *code, BOOL skipassert)
{
for (;;)
{
switch ((int)*code)
{
- case OP_OPT:
- if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit))
- *options = (int)code[1];
- code += 2;
- break;
-
case OP_ASSERT_NOT:
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
if (!skipassert) return code;
do code += GET(code, 1); while (*code == OP_ALT);
- code += _erts_pcre_OP_lengths[*code];
+ code += PRIV(OP_lengths)[*code];
break;
case OP_WORD_BOUNDARY:
@@ -1105,9 +1697,11 @@ for (;;)
case OP_CALLOUT:
case OP_CREF:
+ case OP_NCREF:
case OP_RREF:
+ case OP_NRREF:
case OP_DEF:
- code += _erts_pcre_OP_lengths[*code];
+ code += PRIV(OP_lengths)[*code];
break;
default:
@@ -1121,28 +1715,40 @@ for (;;)
/*************************************************
-* Find the fixed length of a pattern *
+* Find the fixed length of a branch *
*************************************************/
-/* Scan a pattern and compute the fixed length of subject that will match it,
+/* Scan a branch and compute the fixed length of subject that will match it,
if the length is fixed. This is needed for dealing with backward assertions.
-In UTF8 mode, the result is in characters rather than bytes.
+In UTF8 mode, the result is in characters rather than bytes. The branch is
+temporarily terminated with OP_END when this function is called.
+
+This function is called when a backward assertion is encountered, so that if it
+fails, the error message can point to the correct place in the pattern.
+However, we cannot do this when the assertion contains subroutine calls,
+because they can be forward references. We solve this by remembering this case
+and doing the check at the end; a flag specifies which mode we are running in.
Arguments:
code points to the start of the pattern (the bracket)
- options the compiling options
-
-Returns: the fixed length, or -1 if there is no fixed length,
- or -2 if \C was encountered
+ utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
+ atend TRUE if called when the pattern is complete
+ cd the "compile data" structure
+
+Returns: the fixed length,
+ or -1 if there is no fixed length,
+ or -2 if \C was encountered (in UTF-8 mode only)
+ or -3 if an OP_RECURSE item was encountered and atend is FALSE
+ or -4 if an unknown opcode was encountered (internal error)
*/
static int
-find_fixedlength(uschar *code, int options)
+find_fixedlength(pcre_uchar *code, BOOL utf, BOOL atend, compile_data *cd)
{
int length = -1;
register int branchlength = 0;
-register uschar *cc = code + 1 + LINK_SIZE;
+register pcre_uchar *cc = code + 1 + LINK_SIZE;
/* Scan along the opcodes for this branch. If we get to the end of the
branch, check the length against that of the other branches. */
@@ -1150,29 +1756,39 @@ branch, check the length against that of the other branches. */
for (;;)
{
int d;
- register int op = *cc;
+ pcre_uchar *ce, *cs;
+ register pcre_uchar op = *cc;
+
switch (op)
{
+ /* We only need to continue for OP_CBRA (normal capturing bracket) and
+ OP_BRA (normal non-capturing bracket) because the other variants of these
+ opcodes are all concerned with unlimited repeated groups, which of course
+ are not of fixed length. */
+
case OP_CBRA:
case OP_BRA:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_COND:
- d = find_fixedlength(cc + ((op == OP_CBRA)? 2:0), options);
+ d = find_fixedlength(cc + ((op == OP_CBRA)? IMM2_SIZE : 0), utf, atend, cd);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
cc += 1 + LINK_SIZE;
break;
- /* Reached end of a branch; if it's a ket it is the end of a nested
- call. If it's ALT it is an alternation in a nested call. If it is
- END it's the end of the outer call. All can be handled by the same code. */
+ /* Reached end of a branch; if it's a ket it is the end of a nested call.
+ If it's ALT it is an alternation in a nested call. An ACCEPT is effectively
+ an ALT. If it is END it's the end of the outer call. All can be handled by
+ the same code. Note that we must not include the OP_KETRxxx opcodes here,
+ because they all imply an unlimited repeat. */
case OP_ALT:
case OP_KET:
- case OP_KETRMAX:
- case OP_KETRMIN:
case OP_END:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
if (length < 0) length = branchlength;
else if (length != branchlength) return -1;
if (*cc != OP_ALT) return length;
@@ -1180,6 +1796,21 @@ for (;;)
branchlength = 0;
break;
+ /* A true recursion implies not fixed length, but a subroutine call may
+ be OK. If the subroutine is a forward reference, we can't deal with
+ it until the end of the pattern, so return -3. */
+
+ case OP_RECURSE:
+ if (!atend) return -3;
+ cs = ce = (pcre_uchar *)cd->start_code + GET(cc, 1); /* Start subpattern */
+ do ce += GET(ce, 1); while (*ce == OP_ALT); /* End subpattern */
+ if (cc > cs && cc < ce) return -1; /* Recursion */
+ d = find_fixedlength(cs + IMM2_SIZE, utf, atend, cd);
+ if (d < 0) return d;
+ branchlength += d;
+ cc += 1 + LINK_SIZE;
+ break;
+
/* Skip over assertive subpatterns */
case OP_ASSERT:
@@ -1187,39 +1818,55 @@ for (;;)
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
do cc += GET(cc, 1); while (*cc == OP_ALT);
- /* Fall through */
+ cc += PRIV(OP_lengths)[*cc];
+ break;
/* Skip over things that don't match chars */
- case OP_REVERSE:
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ cc += cc[1] + PRIV(OP_lengths)[*cc];
+ break;
+
+ case OP_CALLOUT:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_CLOSE:
+ case OP_COMMIT:
case OP_CREF:
- case OP_RREF:
case OP_DEF:
- case OP_OPT:
- case OP_CALLOUT:
- case OP_SOD:
- case OP_SOM:
+ case OP_DOLL:
+ case OP_DOLLM:
case OP_EOD:
case OP_EODN:
- case OP_CIRC:
- case OP_DOLL:
+ case OP_FAIL:
+ case OP_NCREF:
+ case OP_NRREF:
case OP_NOT_WORD_BOUNDARY:
+ case OP_PRUNE:
+ case OP_REVERSE:
+ case OP_RREF:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_THEN:
case OP_WORD_BOUNDARY:
- cc += _erts_pcre_OP_lengths[*cc];
+ cc += PRIV(OP_lengths)[*cc];
break;
/* Handle literal characters */
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_NOT:
+ case OP_NOTI:
branchlength++;
cc += 2;
-#ifdef SUPPORT_UTF8
- if ((options & PCRE_UTF8) != 0)
- {
- while ((*cc & 0xc0) == 0x80) cc++;
- }
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
@@ -1227,20 +1874,21 @@ for (;;)
need to skip over a multibyte character in UTF8 mode. */
case OP_EXACT:
- branchlength += GET2(cc,1);
- cc += 4;
-#ifdef SUPPORT_UTF8
- if ((options & PCRE_UTF8) != 0)
- {
- while((*cc & 0x80) == 0x80) cc++;
- }
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ branchlength += (int)GET2(cc,1);
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
#endif
break;
case OP_TYPEEXACT:
branchlength += GET2(cc,1);
- if (cc[3] == OP_PROP || cc[3] == OP_NOTPROP) cc += 2;
- cc += 4;
+ if (cc[1 + IMM2_SIZE] == OP_PROP || cc[1 + IMM2_SIZE] == OP_NOTPROP)
+ cc += 2;
+ cc += 1 + IMM2_SIZE + 1;
break;
/* Handle single-char matchers */
@@ -1250,6 +1898,10 @@ for (;;)
cc += 2;
/* Fall through */
+ case OP_HSPACE:
+ case OP_VSPACE:
+ case OP_NOT_HSPACE:
+ case OP_NOT_VSPACE:
case OP_NOT_DIGIT:
case OP_DIGIT:
case OP_NOT_WHITESPACE:
@@ -1257,29 +1909,37 @@ for (;;)
case OP_NOT_WORDCHAR:
case OP_WORDCHAR:
case OP_ANY:
+ case OP_ALLANY:
branchlength++;
cc++;
break;
- /* The single-byte matcher isn't allowed */
+ /* The single-byte matcher isn't allowed. This only happens in UTF-8 mode;
+ otherwise \C is coded as OP_ALLANY. */
case OP_ANYBYTE:
return -2;
/* Check a class for variable quantification */
-#ifdef SUPPORT_UTF8
- case OP_XCLASS:
- cc += GET(cc, 1) - 33;
- /* Fall through */
-#endif
-
case OP_CLASS:
case OP_NCLASS:
- cc += 33;
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case OP_XCLASS:
+ /* The original code caused an unsigned overflow in 64 bit systems,
+ so now we use a conditional statement. */
+ if (op == OP_XCLASS)
+ cc += GET(cc, 1);
+ else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#endif
switch (*cc)
{
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
case OP_CRSTAR:
case OP_CRMINSTAR:
case OP_CRQUERY:
@@ -1288,9 +1948,9 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
- if (GET2(cc,1) != GET2(cc,3)) return -1;
- branchlength += GET2(cc,1);
- cc += 5;
+ if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) return -1;
+ branchlength += (int)GET2(cc,1);
+ cc += 1 + 2 * IMM2_SIZE;
break;
default:
@@ -1300,8 +1960,91 @@ for (;;)
/* Anything else is variable length */
- default:
+ case OP_ANYNL:
+ case OP_BRAMINZERO:
+ case OP_BRAPOS:
+ case OP_BRAPOSZERO:
+ case OP_BRAZERO:
+ case OP_CBRAPOS:
+ case OP_EXTUNI:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_REF:
+ case OP_REFI:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ case OP_SCOND:
+ case OP_SKIPZERO:
+ case OP_STAR:
+ case OP_STARI:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPLUS:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSUPTO:
+ case OP_TYPEQUERY:
+ case OP_TYPESTAR:
+ case OP_TYPEUPTO:
+ case OP_UPTO:
+ case OP_UPTOI:
return -1;
+
+ /* Catch unrecognized opcodes so that when new ones are added they
+ are not forgotten, as has happened in the past. */
+
+ default:
+ return -4;
}
}
/* Control never gets here */
@@ -1311,26 +2054,30 @@ for (;;)
/*************************************************
-* Scan compiled regex for numbered bracket *
+* Scan compiled regex for specific bracket *
*************************************************/
/* This little function scans through a compiled pattern until it finds a
-capturing bracket with the given number.
+capturing bracket with the given number, or, if the number is negative, an
+instance of OP_REVERSE for a lookbehind. The function is global in the C sense
+so that it can be called from pcre_study() when finding the minimum matching
+length.
Arguments:
code points to start of expression
- utf8 TRUE in UTF-8 mode
- number the required bracket number
+ utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
+ number the required bracket number or negative to find a lookbehind
Returns: pointer to the opcode for the bracket, or NULL if not found
*/
-static const uschar *
-find_bracket(const uschar *code, BOOL utf8, int number)
+const pcre_uchar *
+PRIV(find_bracket)(const pcre_uchar *code, BOOL utf, int number)
{
for (;;)
{
- register int c = *code;
+ register pcre_uchar c = *code;
+
if (c == OP_END) return NULL;
/* XCLASS is used for classes that cannot be represented just by a bit
@@ -1339,18 +2086,28 @@ for (;;)
if (c == OP_XCLASS) code += GET(code, 1);
+ /* Handle recursion */
+
+ else if (c == OP_REVERSE)
+ {
+ if (number < 0) return (pcre_uchar *)code;
+ code += PRIV(OP_lengths)[c];
+ }
+
/* Handle capturing bracket */
- else if (c == OP_CBRA)
+ else if (c == OP_CBRA || c == OP_SCBRA ||
+ c == OP_CBRAPOS || c == OP_SCBRAPOS)
{
- int n = GET2(code, 1+LINK_SIZE);
- if (n == number) return (uschar *)code;
- code += _erts_pcre_OP_lengths[c];
+ int n = (int)GET2(code, 1+LINK_SIZE);
+ if (n == number) return (pcre_uchar *)code;
+ code += PRIV(OP_lengths)[c];
}
/* Otherwise, we can get the item's length from the table, except that for
repeated character types, we have to test for \p and \P, which have an extra
- two bytes of parameters. */
+ two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
+ must add in its length. */
else
{
@@ -1372,39 +2129,62 @@ for (;;)
case OP_TYPEMINUPTO:
case OP_TYPEEXACT:
case OP_TYPEPOSUPTO:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
break;
}
/* Add in the fixed length from the table */
- code += _erts_pcre_OP_lengths[c];
+ code += PRIV(OP_lengths)[c];
/* In UTF-8 mode, opcodes that are followed by a character may be followed by
a multi-byte character. The length in the table is a minimum, so we have to
arrange to skip the extra bytes. */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(c)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf) switch(c)
{
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_EXACT:
+ case OP_EXACTI:
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
case OP_POSUPTO:
+ case OP_POSUPTOI:
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
case OP_PLUS:
+ case OP_PLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
case OP_POSPLUS:
+ case OP_POSPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
case OP_POSQUERY:
- if (code[-1] >= 0xc0) code += _erts_pcre_utf8_table4[code[-1] & 0x3f];
+ case OP_POSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
break;
}
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
#endif
}
}
@@ -1421,17 +2201,17 @@ instance of OP_RECURSE.
Arguments:
code points to start of expression
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
Returns: pointer to the opcode for OP_RECURSE, or NULL if not found
*/
-static const uschar *
-find_recurse(const uschar *code, BOOL utf8)
+static const pcre_uchar *
+find_recurse(const pcre_uchar *code, BOOL utf)
{
for (;;)
{
- register int c = *code;
+ register pcre_uchar c = *code;
if (c == OP_END) return NULL;
if (c == OP_RECURSE) return code;
@@ -1443,7 +2223,8 @@ for (;;)
/* Otherwise, we can get the item's length from the table, except that for
repeated character types, we have to test for \p and \P, which have an extra
- two bytes of parameters. */
+ two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
+ must add in its length. */
else
{
@@ -1465,39 +2246,90 @@ for (;;)
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEEXACT:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
break;
}
/* Add in the fixed length from the table */
- code += _erts_pcre_OP_lengths[c];
+ code += PRIV(OP_lengths)[c];
/* In UTF-8 mode, opcodes that are followed by a character may be followed
by a multi-byte character. The length in the table is a minimum, so we have
to arrange to skip the extra bytes. */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(c)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf) switch(c)
{
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
case OP_PLUS:
+ case OP_PLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
case OP_POSQUERY:
- if (code[-1] >= 0xc0) code += _erts_pcre_utf8_table4[code[-1] & 0x3f];
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
break;
}
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
#endif
}
}
@@ -1520,20 +2352,22 @@ bracket whose current branch will already have been scanned.
Arguments:
code points to start of search
endcode points to where to stop
- utf8 TRUE if in UTF8 mode
+ utf TRUE if in UTF-8 / UTF-16 / UTF-32 mode
+ cd contains pointers to tables etc.
Returns: TRUE if what is matched could be empty
*/
static BOOL
-could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8)
+could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode,
+ BOOL utf, compile_data *cd)
{
-register int c;
-for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0, TRUE);
+register pcre_uchar c;
+for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
code < endcode;
- code = first_significant_code(code + _erts_pcre_OP_lengths[c], NULL, 0, TRUE))
+ code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))
{
- const uschar *ccode;
+ const pcre_uchar *ccode;
c = *code;
@@ -1547,11 +2381,63 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
continue;
}
+ /* For a recursion/subroutine call, if its end has been reached, which
+ implies a backward reference subroutine call, we can scan it. If it's a
+ forward reference subroutine call, we can't. To detect forward reference
+ we have to scan up the list that is kept in the workspace. This function is
+ called only when doing the real compile, not during the pre-compile that
+ measures the size of the compiled pattern. */
+
+ if (c == OP_RECURSE)
+ {
+ const pcre_uchar *scode;
+ BOOL empty_branch;
+
+ /* Test for forward reference */
+
+ for (scode = cd->start_workspace; scode < cd->hwm; scode += LINK_SIZE)
+ if ((int)GET(scode, 0) == (int)(code + 1 - cd->start_code)) return TRUE;
+
+ /* Not a forward reference, test for completed backward reference */
+
+ empty_branch = FALSE;
+ scode = cd->start_code + GET(code, 1);
+ if (GET(scode, 1) == 0) return TRUE; /* Unclosed */
+
+ /* Completed backwards reference */
+
+ do
+ {
+ if (could_be_empty_branch(scode, endcode, utf, cd))
+ {
+ empty_branch = TRUE;
+ break;
+ }
+ scode += GET(scode, 1);
+ }
+ while (*scode == OP_ALT);
+
+ if (!empty_branch) return FALSE; /* All branches are non-empty */
+ continue;
+ }
+
/* Groups with zero repeats can of course be empty; skip them. */
- if (c == OP_BRAZERO || c == OP_BRAMINZERO)
+ if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO ||
+ c == OP_BRAPOSZERO)
+ {
+ code += PRIV(OP_lengths)[c];
+ do code += GET(code, 1); while (*code == OP_ALT);
+ c = *code;
+ continue;
+ }
+
+ /* A nested group that is already marked as "could be empty" can just be
+ skipped. */
+
+ if (c == OP_SBRA || c == OP_SBRAPOS ||
+ c == OP_SCBRA || c == OP_SCBRAPOS)
{
- code += _erts_pcre_OP_lengths[c];
do code += GET(code, 1); while (*code == OP_ALT);
c = *code;
continue;
@@ -1559,22 +2445,33 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
/* For other groups, scan the branches. */
- if (c == OP_BRA || c == OP_CBRA || c == OP_ONCE || c == OP_COND)
+ if (c == OP_BRA || c == OP_BRAPOS ||
+ c == OP_CBRA || c == OP_CBRAPOS ||
+ c == OP_ONCE || c == OP_ONCE_NC ||
+ c == OP_COND)
{
BOOL empty_branch;
if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */
- /* Scan a closed bracket */
+ /* If a conditional group has only one branch, there is a second, implied,
+ empty branch, so just skip over the conditional, because it could be empty.
+ Otherwise, scan the individual branches of the group. */
- empty_branch = FALSE;
- do
- {
- if (!empty_branch && could_be_empty_branch(code, endcode, utf8))
- empty_branch = TRUE;
+ if (c == OP_COND && code[GET(code, 1)] != OP_ALT)
code += GET(code, 1);
+ else
+ {
+ empty_branch = FALSE;
+ do
+ {
+ if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd))
+ empty_branch = TRUE;
+ code += GET(code, 1);
+ }
+ while (*code == OP_ALT);
+ if (!empty_branch) return FALSE; /* All branches are non-empty */
}
- while (*code == OP_ALT);
- if (!empty_branch) return FALSE; /* All branches are non-empty */
+
c = *code;
continue;
}
@@ -1585,11 +2482,11 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
{
/* Check for quantifiers after a class. XCLASS is used for classes that
cannot be represented just by a bit map. This includes negated single
- high-valued characters. The length in _erts_pcre_OP_lengths[] is zero; the
+ high-valued characters. The length in PRIV(OP_lengths)[] is zero; the
actual length is stored in the compiled code, so we must update "code"
here. */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
case OP_XCLASS:
ccode = code += GET(code, 1);
goto CHECK_CLASS_REPEAT;
@@ -1597,9 +2494,9 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
case OP_CLASS:
case OP_NCLASS:
- ccode = code + 33;
+ ccode = code + PRIV(OP_lengths)[OP_CLASS];
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
CHECK_CLASS_REPEAT:
#endif
@@ -1635,10 +2532,12 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
case OP_NOT_WORDCHAR:
case OP_WORDCHAR:
case OP_ANY:
+ case OP_ALLANY:
case OP_ANYBYTE:
case OP_CHAR:
- case OP_CHARNC:
+ case OP_CHARI:
case OP_NOT:
+ case OP_NOTI:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
@@ -1670,7 +2569,8 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
break;
/* End of branch */
@@ -1678,25 +2578,53 @@ for (code = first_significant_code(code + _erts_pcre_OP_lengths[*code], NULL, 0,
case OP_KET:
case OP_KETRMAX:
case OP_KETRMIN:
+ case OP_KETRPOS:
case OP_ALT:
return TRUE;
/* In UTF-8 mode, STAR, MINSTAR, POSSTAR, QUERY, MINQUERY, POSQUERY, UPTO,
MINUPTO, and POSUPTO may be followed by a multibyte character */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_POSSTAR:
+ case OP_POSSTARI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
+ case OP_MINQUERYI:
case OP_POSQUERY:
+ case OP_POSQUERYI:
+ if (utf && HAS_EXTRALEN(code[1])) code += GET_EXTRALEN(code[1]);
+ break;
+
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
case OP_POSUPTO:
- if (utf8) while ((code[2] & 0xc0) == 0x80) code++;
+ case OP_POSUPTOI:
+ if (utf && HAS_EXTRALEN(code[1 + IMM2_SIZE])) code += GET_EXTRALEN(code[1 + IMM2_SIZE]);
break;
#endif
+
+ /* MARK, and PRUNE/SKIP/THEN with an argument must skip over the argument
+ string. */
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
+ break;
+
+ /* None of the remaining opcodes are required to match a character. */
+
+ default:
+ break;
}
}
@@ -1713,23 +2641,27 @@ return TRUE;
the current branch of the current pattern to see if it could match the empty
string. If it could, we must look outwards for branches at other levels,
stopping when we pass beyond the bracket which is the subject of the recursion.
+This function is called only during the real compile, not during the
+pre-compile.
Arguments:
code points to start of the recursion
endcode points to where to stop (current RECURSE item)
bcptr points to the chain of current (unclosed) branch starts
- utf8 TRUE if in UTF-8 mode
+ utf TRUE if in UTF-8 / UTF-16 / UTF-32 mode
+ cd pointers to tables etc
Returns: TRUE if what is matched could be empty
*/
static BOOL
-could_be_empty(const uschar *code, const uschar *endcode, branch_chain *bcptr,
- BOOL utf8)
+could_be_empty(const pcre_uchar *code, const pcre_uchar *endcode,
+ branch_chain *bcptr, BOOL utf, compile_data *cd)
{
-while (bcptr != NULL && bcptr->current >= code)
+while (bcptr != NULL && bcptr->current_branch >= code)
{
- if (!could_be_empty_branch(bcptr->current, endcode, utf8)) return FALSE;
+ if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd))
+ return FALSE;
bcptr = bcptr->outer;
}
return TRUE;
@@ -1761,6 +2693,17 @@ where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
"l\ower". This is a lesser evil that not diagnosing bad classes when Perl does,
I think.
+A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
+It seems that the appearance of a nested POSIX class supersedes an apparent
+external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
+a digit.
+
+In Perl, unescaped square brackets may also appear as part of class names. For
+example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
+[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
+seem right at all. PCRE does not allow closing square brackets in POSIX class
+names.
+
Arguments:
ptr pointer to the initial [
endptr where to return the end pointer
@@ -1769,20 +2712,27 @@ Returns: TRUE or FALSE
*/
static BOOL
-check_posix_syntax(const uschar *ptr, const uschar **endptr)
+check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)
{
-int terminator; /* Don't combine these lines; the Solaris cc */
+pcre_uchar terminator; /* Don't combine these lines; the Solaris cc */
terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
-for (++ptr; *ptr != 0; ptr++)
+for (++ptr; *ptr != CHAR_NULL; ptr++)
{
- if (*ptr == '\\' && ptr[1] == ']') ptr++; else
+ if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ ptr++;
+ else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
+ else
{
- if (*ptr == ']') return FALSE;
- if (*ptr == terminator && ptr[1] == ']')
+ if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
*endptr = ptr;
return TRUE;
}
+ if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
+ (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
+ ptr[1] == CHAR_EQUALS_SIGN) &&
+ check_posix_syntax(ptr, endptr))
+ return FALSE;
}
}
return FALSE;
@@ -1806,14 +2756,14 @@ Returns: a value representing the name, or -1 if unknown
*/
static int
-check_posix_name(const uschar *ptr, int len)
+check_posix_name(const pcre_uchar *ptr, int len)
{
const char *pn = posix_names;
register int yield = 0;
while (posix_name_lengths[yield] != 0)
{
if (len == posix_name_lengths[yield] &&
- strncmp((const char *)ptr, pn, len) == 0) return yield;
+ STRNCMP_UC_C8(ptr, pn, (unsigned int)len) == 0) return yield;
pn += posix_name_lengths[yield] + 1;
yield++;
}
@@ -1829,11 +2779,12 @@ return -1;
that is referenced. This means that groups can be replicated for fixed
repetition simply by copying (because the recursion is allowed to refer to
earlier groups that are outside the current group). However, when a group is
-optional (i.e. the minimum quantifier is zero), OP_BRAZERO is inserted before
-it, after it has been compiled. This means that any OP_RECURSE items within it
-that refer to the group itself or any contained groups have to have their
-offsets adjusted. That one of the jobs of this function. Before it is called,
-the partially compiled regex must be temporarily terminated with OP_END.
+optional (i.e. the minimum quantifier is zero), OP_BRAZERO or OP_SKIPZERO is
+inserted before it, after it has been compiled. This means that any OP_RECURSE
+items within it that refer to the group itself or any contained groups have to
+have their offsets adjusted. That one of the jobs of this function. Before it
+is called, the partially compiled regex must be temporarily terminated with
+OP_END.
This function has been extended with the possibility of forward references for
recursions and subroutine calls. It must also check the list of such references
@@ -1844,7 +2795,7 @@ value in the reference (which is a group number).
Arguments:
group points to the start of the group
adjust the amount by which the group is to be moved
- utf8 TRUE in UTF-8 mode
+ utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
cd contains pointers to tables etc.
save_hwm the hwm forward reference pointer at the start of the group
@@ -1852,22 +2803,22 @@ Returns: nothing
*/
static void
-adjust_recurse(uschar *group, int adjust, BOOL utf8, compile_data *cd,
- uschar *save_hwm)
+adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd,
+ pcre_uchar *save_hwm)
{
-uschar *ptr = group;
+pcre_uchar *ptr = group;
-while ((ptr = (uschar *)find_recurse(ptr, utf8)) != NULL)
+while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
{
int offset;
- uschar *hc;
+ pcre_uchar *hc;
/* See if this recursion is on the forward reference list. If so, adjust the
reference. */
for (hc = save_hwm; hc < cd->hwm; hc += LINK_SIZE)
{
- offset = GET(hc, 0);
+ offset = (int)GET(hc, 0);
if (cd->start_code + offset == ptr + 1)
{
PUT(hc, 0, offset + adjust);
@@ -1880,7 +2831,7 @@ while ((ptr = (uschar *)find_recurse(ptr, utf8)) != NULL)
if (hc >= cd->hwm)
{
- offset = GET(ptr, 1);
+ offset = (int)GET(ptr, 1);
if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
}
@@ -1905,14 +2856,14 @@ Arguments:
Returns: new code pointer
*/
-static uschar *
-auto_callout(uschar *code, const uschar *ptr, compile_data *cd)
+static pcre_uchar *
+auto_callout(pcre_uchar *code, const pcre_uchar *ptr, compile_data *cd)
{
*code++ = OP_CALLOUT;
*code++ = 255;
-PUT(code, 0, ptr - cd->start_pattern); /* Pattern offset */
-PUT(code, LINK_SIZE, 0); /* Default length */
-return code + 2*LINK_SIZE;
+PUT(code, 0, (int)(ptr - cd->start_pattern)); /* Pattern offset */
+PUT(code, LINK_SIZE, 0); /* Default length */
+return code + 2 * LINK_SIZE;
}
@@ -1934,9 +2885,9 @@ Returns: nothing
*/
static void
-complete_callout(uschar *previous_callout, const uschar *ptr, compile_data *cd)
+complete_callout(pcre_uchar *previous_callout, const pcre_uchar *ptr, compile_data *cd)
{
-int length = ptr - cd->start_pattern - GET(previous_callout, 2);
+int length = (int)(ptr - cd->start_pattern - GET(previous_callout, 2));
PUT(previous_callout, 2 + LINK_SIZE, length);
}
@@ -1948,9 +2899,10 @@ PUT(previous_callout, 2 + LINK_SIZE, length);
*************************************************/
/* This function is passed the start and end of a class range, in UTF-8 mode
-with UCP support. It searches up the characters, looking for internal ranges of
+with UCP support. It searches up the characters, looking for ranges of
characters in the "other" case. Each call returns the next one, updating the
-start address.
+start address. A character with multiple other cases is returned on its own
+with a special return value.
Arguments:
cptr points to starting character value; updated
@@ -1958,33 +2910,127 @@ Arguments:
ocptr where to put start of othercase range
odptr where to put end of othercase range
-Yield: TRUE when range returned; FALSE when no more
+Yield: -1 when no more
+ 0 when a range is returned
+ >0 the CASESET offset for char with multiple other cases
+ in this case, ocptr contains the original
*/
-static BOOL
-get_othercase_range(unsigned int *cptr, unsigned int d, unsigned int *ocptr,
- unsigned int *odptr)
+static int
+get_othercase_range(pcre_uint32 *cptr, pcre_uint32 d, pcre_uint32 *ocptr,
+ pcre_uint32 *odptr)
{
-unsigned int c, othercase, next;
+pcre_uint32 c, othercase, next;
+unsigned int co;
+
+/* Find the first character that has an other case. If it has multiple other
+cases, return its case offset value. */
for (c = *cptr; c <= d; c++)
- { if ((othercase = _erts_pcre_ucp_othercase(c)) != NOTACHAR) break; }
+ {
+ if ((co = UCD_CASESET(c)) != 0)
+ {
+ *ocptr = c++; /* Character that has the set */
+ *cptr = c; /* Rest of input range */
+ return (int)co;
+ }
+ if ((othercase = UCD_OTHERCASE(c)) != c) break;
+ }
-if (c > d) return FALSE;
+if (c > d) return -1; /* Reached end of range */
*ocptr = othercase;
next = othercase + 1;
for (++c; c <= d; c++)
{
- if (_erts_pcre_ucp_othercase(c) != next) break;
+ if (UCD_OTHERCASE(c) != next) break;
next++;
}
-*odptr = next - 1;
-*cptr = c;
+*odptr = next - 1; /* End of othercase range */
+*cptr = c; /* Rest of input range */
+return 0;
+}
-return TRUE;
+
+
+/*************************************************
+* Check a character and a property *
+*************************************************/
+
+/* This function is called by check_auto_possessive() when a property item
+is adjacent to a fixed character.
+
+Arguments:
+ c the character
+ ptype the property type
+ pdata the data for the type
+ negated TRUE if it's a negated property (\P or \p{^)
+
+Returns: TRUE if auto-possessifying is OK
+*/
+
+static BOOL
+check_char_prop(pcre_uint32 c, unsigned int ptype, unsigned int pdata, BOOL negated)
+{
+#ifdef SUPPORT_UCP
+const pcre_uint32 *p;
+#endif
+
+const ucd_record *prop = GET_UCD(c);
+
+switch(ptype)
+ {
+ case PT_LAMP:
+ return (prop->chartype == ucp_Lu ||
+ prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == negated;
+
+ case PT_GC:
+ return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated;
+
+ case PT_PC:
+ return (pdata == prop->chartype) == negated;
+
+ case PT_SC:
+ return (pdata == prop->script) == negated;
+
+ /* These are specials */
+
+ case PT_ALNUM:
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated;
+
+ case PT_SPACE: /* Perl space */
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
+ == negated;
+
+ case PT_PXSPACE: /* POSIX space */
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR)
+ == negated;
+
+ case PT_WORD:
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE) == negated;
+
+#ifdef SUPPORT_UCP
+ case PT_CLIST:
+ p = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *p) return !negated;
+ if (c == *p++) return negated;
+ }
+ break; /* Control never reaches here */
+#endif
+ }
+
+return FALSE;
}
#endif /* SUPPORT_UCP */
@@ -1999,10 +3045,8 @@ whether the next thing could possibly match the repeated item. If not, it makes
sense to automatically possessify the repeated item.
Arguments:
- op_code the repeated op code
- this data for this item, depends on the opcode
- utf8 TRUE in UTF-8 mode
- utf8_char used for utf8 character bytes, NULL if not relevant
+ previous pointer to the repeated opcode
+ utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
ptr next character in pattern
options options bits
cd contains pointers to tables etc.
@@ -2011,10 +3055,13 @@ Returns: TRUE if possessifying is wanted
*/
static BOOL
-check_auto_possessive(int op_code, int item, BOOL utf8, uschar *utf8_char,
- const uschar *ptr, int options, compile_data *cd)
+check_auto_possessive(const pcre_uchar *previous, BOOL utf,
+ const pcre_uchar *ptr, int options, compile_data *cd)
{
-int next;
+pcre_uint32 c = NOTACHAR;
+pcre_uint32 next;
+int escape;
+pcre_uchar op_code = *previous++;
/* Skip whitespace and comments in extended mode */
@@ -2022,11 +3069,18 @@ if ((options & PCRE_EXTENDED) != 0)
{
for (;;)
{
- while ((cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
- if (*ptr == '#')
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
+ if (*ptr == CHAR_NUMBER_SIGN)
{
- while (*(++ptr) != 0)
+ ptr++;
+ while (*ptr != CHAR_NULL)
+ {
if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; }
+ ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
+#endif
+ }
}
else break;
}
@@ -2035,22 +3089,22 @@ if ((options & PCRE_EXTENDED) != 0)
/* If the next item is one that we can handle, get its value. A non-negative
value is a character, a negative value is an escape value. */
-if (*ptr == '\\')
+if (*ptr == CHAR_BACKSLASH)
{
int temperrorcode = 0;
- next = check_escape(&ptr, &temperrorcode, cd->bracount, options, FALSE);
+ escape = check_escape(&ptr, &next, &temperrorcode, cd->bracount, options,
+ FALSE);
if (temperrorcode != 0) return FALSE;
ptr++; /* Point after the escape sequence */
}
-
-else if ((cd->ctypes[*ptr] & ctype_meta) == 0)
+else if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_meta) == 0)
{
-#ifdef SUPPORT_UTF8
- if (utf8) { GETCHARINC(next, ptr); } else
+ escape = 0;
+#ifdef SUPPORT_UTF
+ if (utf) { GETCHARINC(next, ptr); } else
#endif
next = *ptr++;
}
-
else return FALSE;
/* Skip whitespace and comments in extended mode */
@@ -2059,11 +3113,18 @@ if ((options & PCRE_EXTENDED) != 0)
{
for (;;)
{
- while ((cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
- if (*ptr == '#')
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_space) != 0) ptr++;
+ if (*ptr == CHAR_NUMBER_SIGN)
{
- while (*(++ptr) != 0)
+ ptr++;
+ while (*ptr != CHAR_NULL)
+ {
if (IS_NEWLINE(ptr)) { ptr += cd->nllen; break; }
+ ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
+#endif
+ }
}
else break;
}
@@ -2071,247 +3132,286 @@ if ((options & PCRE_EXTENDED) != 0)
/* If the next thing is itself optional, we have to give up. */
-if (*ptr == '*' || *ptr == '?' || strncmp((char *)ptr, "{0,", 3) == 0)
- return FALSE;
-
-/* Now compare the next item with the previous opcode. If the previous is a
-positive single character match, "item" either contains the character or, if
-"item" is greater than 127 in utf8 mode, the character's bytes are in
-utf8_char. */
-
+if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK ||
+ STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
+ return FALSE;
-/* Handle cases when the next item is a character. */
+/* If the previous item is a character, get its value. */
-if (next >= 0) switch(op_code)
+if (op_code == OP_CHAR || op_code == OP_CHARI ||
+ op_code == OP_NOT || op_code == OP_NOTI)
{
- case OP_CHAR:
-#ifdef SUPPORT_UTF8
- if (utf8 && item > 127) { GETCHAR(item, utf8_char); }
+#ifdef SUPPORT_UTF
+ GETCHARTEST(c, previous);
+#else
+ c = *previous;
#endif
- return item != next;
+ }
- /* For CHARNC (caseless character) we must check the other case. If we have
- Unicode property support, we can use it to test the other case of
- high-valued characters. */
+/* Now compare the next item with the previous opcode. First, handle cases when
+the next item is a character. */
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
- if (utf8 && item > 127) { GETCHAR(item, utf8_char); }
+if (escape == 0)
+ {
+ /* For a caseless UTF match, the next character may have more than one other
+ case, which maps to the special PT_CLIST property. Check this first. */
+
+#ifdef SUPPORT_UCP
+ if (utf && c != NOTACHAR && (options & PCRE_CASELESS) != 0)
+ {
+ unsigned int ocs = UCD_CASESET(next);
+ if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT);
+ }
#endif
- if (item == next) return FALSE;
-#ifdef SUPPORT_UTF8
- if (utf8)
+
+ switch(op_code)
{
- unsigned int othercase;
- if (next < 128) othercase = cd->fcc[next]; else
+ case OP_CHAR:
+ return c != next;
+
+ /* For CHARI (caseless character) we must check the other case. If we have
+ Unicode property support, we can use it to test the other case of
+ high-valued characters. We know that next can have only one other case,
+ because multi-other-case characters are dealt with above. */
+
+ case OP_CHARI:
+ if (c == next) return FALSE;
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ pcre_uint32 othercase;
+ if (next < 128) othercase = cd->fcc[next]; else
#ifdef SUPPORT_UCP
- othercase = _erts_pcre_ucp_othercase((unsigned int)next);
+ othercase = UCD_OTHERCASE(next);
#else
- othercase = NOTACHAR;
+ othercase = NOTACHAR;
#endif
- return (unsigned int)item != othercase;
- }
- else
-#endif /* SUPPORT_UTF8 */
- return (item != cd->fcc[next]); /* Non-UTF-8 mode */
+ return c != othercase;
+ }
+ else
+#endif /* SUPPORT_UTF */
+ return (c != TABLE_GET(next, cd->fcc, next)); /* Not UTF */
- /* For OP_NOT, "item" must be a single-byte character. */
+ case OP_NOT:
+ return c == next;
- case OP_NOT:
- if (next < 0) return FALSE; /* Not a character */
- if (item == next) return TRUE;
- if ((options & PCRE_CASELESS) == 0) return FALSE;
-#ifdef SUPPORT_UTF8
- if (utf8)
- {
- unsigned int othercase;
- if (next < 128) othercase = cd->fcc[next]; else
+ case OP_NOTI:
+ if (c == next) return TRUE;
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ pcre_uint32 othercase;
+ if (next < 128) othercase = cd->fcc[next]; else
#ifdef SUPPORT_UCP
- othercase = _erts_pcre_ucp_othercase(next);
+ othercase = UCD_OTHERCASE(next);
#else
- othercase = NOTACHAR;
+ othercase = NOTACHAR;
#endif
- return (unsigned int)item == othercase;
- }
- else
-#endif /* SUPPORT_UTF8 */
- return (item == cd->fcc[next]); /* Non-UTF-8 mode */
+ return c == othercase;
+ }
+ else
+#endif /* SUPPORT_UTF */
+ return (c == TABLE_GET(next, cd->fcc, next)); /* Not UTF */
- case OP_DIGIT:
- return next > 127 || (cd->ctypes[next] & ctype_digit) == 0;
+ /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set.
+ When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
- case OP_NOT_DIGIT:
- return next <= 127 && (cd->ctypes[next] & ctype_digit) != 0;
+ case OP_DIGIT:
+ return next > 255 || (cd->ctypes[next] & ctype_digit) == 0;
- case OP_WHITESPACE:
- return next > 127 || (cd->ctypes[next] & ctype_space) == 0;
+ case OP_NOT_DIGIT:
+ return next <= 255 && (cd->ctypes[next] & ctype_digit) != 0;
- case OP_NOT_WHITESPACE:
- return next <= 127 && (cd->ctypes[next] & ctype_space) != 0;
+ case OP_WHITESPACE:
+ return next > 255 || (cd->ctypes[next] & ctype_space) == 0;
- case OP_WORDCHAR:
- return next > 127 || (cd->ctypes[next] & ctype_word) == 0;
+ case OP_NOT_WHITESPACE:
+ return next <= 255 && (cd->ctypes[next] & ctype_space) != 0;
- case OP_NOT_WORDCHAR:
- return next <= 127 && (cd->ctypes[next] & ctype_word) != 0;
+ case OP_WORDCHAR:
+ return next > 255 || (cd->ctypes[next] & ctype_word) == 0;
- case OP_HSPACE:
- case OP_NOT_HSPACE:
- switch(next)
- {
- case 0x09:
- case 0x20:
- case 0xa0:
- case 0x1680:
- case 0x180e:
- case 0x2000:
- case 0x2001:
- case 0x2002:
- case 0x2003:
- case 0x2004:
- case 0x2005:
- case 0x2006:
- case 0x2007:
- case 0x2008:
- case 0x2009:
- case 0x200A:
- case 0x202f:
- case 0x205f:
- case 0x3000:
- return op_code != OP_HSPACE;
- default:
- return op_code == OP_HSPACE;
- }
+ case OP_NOT_WORDCHAR:
+ return next <= 255 && (cd->ctypes[next] & ctype_word) != 0;
+
+ case OP_HSPACE:
+ case OP_NOT_HSPACE:
+ switch(next)
+ {
+ HSPACE_CASES:
+ return op_code == OP_NOT_HSPACE;
+
+ default:
+ return op_code != OP_NOT_HSPACE;
+ }
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ case OP_NOT_VSPACE:
+ switch(next)
+ {
+ VSPACE_CASES:
+ return op_code == OP_NOT_VSPACE;
+
+ default:
+ return op_code != OP_NOT_VSPACE;
+ }
+
+#ifdef SUPPORT_UCP
+ case OP_PROP:
+ return check_char_prop(next, previous[0], previous[1], FALSE);
+
+ case OP_NOTPROP:
+ return check_char_prop(next, previous[0], previous[1], TRUE);
+#endif
- case OP_VSPACE:
- case OP_NOT_VSPACE:
- switch(next)
- {
- case 0x0a:
- case 0x0b:
- case 0x0c:
- case 0x0d:
- case 0x85:
- case 0x2028:
- case 0x2029:
- return op_code != OP_VSPACE;
default:
- return op_code == OP_VSPACE;
+ return FALSE;
}
-
- default:
- return FALSE;
}
-
-/* Handle the case when the next item is \d, \s, etc. */
+/* Handle the case when the next item is \d, \s, etc. Note that when PCRE_UCP
+is set, \d turns into ESC_du rather than ESC_d, etc., so ESC_d etc. are
+generated only when PCRE_UCP is *not* set, that is, when only ASCII
+characteristics are recognized. Similarly, the opcodes OP_DIGIT etc. are
+replaced by OP_PROP codes when PCRE_UCP is set. */
switch(op_code)
{
case OP_CHAR:
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
- if (utf8 && item > 127) { GETCHAR(item, utf8_char); }
-#endif
- switch(-next)
+ case OP_CHARI:
+ switch(escape)
{
case ESC_d:
- return item > 127 || (cd->ctypes[item] & ctype_digit) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_digit) == 0;
case ESC_D:
- return item <= 127 && (cd->ctypes[item] & ctype_digit) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_digit) != 0;
case ESC_s:
- return item > 127 || (cd->ctypes[item] & ctype_space) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_space) == 0;
case ESC_S:
- return item <= 127 && (cd->ctypes[item] & ctype_space) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_space) != 0;
case ESC_w:
- return item > 127 || (cd->ctypes[item] & ctype_word) == 0;
+ return c > 255 || (cd->ctypes[c] & ctype_word) == 0;
case ESC_W:
- return item <= 127 && (cd->ctypes[item] & ctype_word) != 0;
+ return c <= 255 && (cd->ctypes[c] & ctype_word) != 0;
case ESC_h:
case ESC_H:
- switch(item)
+ switch(c)
{
- case 0x09:
- case 0x20:
- case 0xa0:
- case 0x1680:
- case 0x180e:
- case 0x2000:
- case 0x2001:
- case 0x2002:
- case 0x2003:
- case 0x2004:
- case 0x2005:
- case 0x2006:
- case 0x2007:
- case 0x2008:
- case 0x2009:
- case 0x200A:
- case 0x202f:
- case 0x205f:
- case 0x3000:
- return -next != ESC_h;
+ HSPACE_CASES:
+ return escape != ESC_h;
+
default:
- return -next == ESC_h;
+ return escape == ESC_h;
}
case ESC_v:
case ESC_V:
- switch(item)
+ switch(c)
{
- case 0x0a:
- case 0x0b:
- case 0x0c:
- case 0x0d:
- case 0x85:
- case 0x2028:
- case 0x2029:
- return -next != ESC_v;
+ VSPACE_CASES:
+ return escape != ESC_v;
+
default:
- return -next == ESC_v;
+ return escape == ESC_v;
}
+ /* When PCRE_UCP is set, these values get generated for \d etc. Find
+ their substitutions and process them. The result will always be either
+ ESC_p or ESC_P. Then fall through to process those values. */
+
+#ifdef SUPPORT_UCP
+ case ESC_du:
+ case ESC_DU:
+ case ESC_wu:
+ case ESC_WU:
+ case ESC_su:
+ case ESC_SU:
+ {
+ int temperrorcode = 0;
+ ptr = substitutes[escape - ESC_DU];
+ escape = check_escape(&ptr, &next, &temperrorcode, 0, options, FALSE);
+ if (temperrorcode != 0) return FALSE;
+ ptr++; /* For compatibility */
+ }
+ /* Fall through */
+
+ case ESC_p:
+ case ESC_P:
+ {
+ unsigned int ptype = 0, pdata = 0;
+ int errorcodeptr;
+ BOOL negated;
+
+ ptr--; /* Make ptr point at the p or P */
+ if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcodeptr))
+ return FALSE;
+ ptr++; /* Point past the final curly ket */
+
+ /* If the property item is optional, we have to give up. (When generated
+ from \d etc by PCRE_UCP, this test will have been applied much earlier,
+ to the original \d etc. At this point, ptr will point to a zero byte. */
+
+ if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK ||
+ STRNCMP_UC_C8(ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0)
+ return FALSE;
+
+ /* Do the property check. */
+
+ return check_char_prop(c, ptype, pdata, (escape == ESC_P) != negated);
+ }
+#endif
+
default:
return FALSE;
}
+ /* In principle, support for Unicode properties should be integrated here as
+ well. It means re-organizing the above code so as to get hold of the property
+ values before switching on the op-code. However, I wonder how many patterns
+ combine ASCII \d etc with Unicode properties? (Note that if PCRE_UCP is set,
+ these op-codes are never generated.) */
+
case OP_DIGIT:
- return next == -ESC_D || next == -ESC_s || next == -ESC_W ||
- next == -ESC_h || next == -ESC_v;
+ return escape == ESC_D || escape == ESC_s || escape == ESC_W ||
+ escape == ESC_h || escape == ESC_v || escape == ESC_R;
case OP_NOT_DIGIT:
- return next == -ESC_d;
+ return escape == ESC_d;
case OP_WHITESPACE:
- return next == -ESC_S || next == -ESC_d || next == -ESC_w;
+ return escape == ESC_S || escape == ESC_d || escape == ESC_w;
case OP_NOT_WHITESPACE:
- return next == -ESC_s || next == -ESC_h || next == -ESC_v;
+ return escape == ESC_s || escape == ESC_h || escape == ESC_v || escape == ESC_R;
case OP_HSPACE:
- return next == -ESC_S || next == -ESC_H || next == -ESC_d || next == -ESC_w;
+ return escape == ESC_S || escape == ESC_H || escape == ESC_d ||
+ escape == ESC_w || escape == ESC_v || escape == ESC_R;
case OP_NOT_HSPACE:
- return next == -ESC_h;
+ return escape == ESC_h;
/* Can't have \S in here because VT matches \S (Perl anomaly) */
+ case OP_ANYNL:
case OP_VSPACE:
- return next == -ESC_V || next == -ESC_d || next == -ESC_w;
+ return escape == ESC_V || escape == ESC_d || escape == ESC_w;
case OP_NOT_VSPACE:
- return next == -ESC_v;
+ return escape == ESC_v || escape == ESC_R;
case OP_WORDCHAR:
- return next == -ESC_W || next == -ESC_s || next == -ESC_h || next == -ESC_v;
+ return escape == ESC_W || escape == ESC_s || escape == ESC_h ||
+ escape == ESC_v || escape == ESC_R;
case OP_NOT_WORDCHAR:
- return next == -ESC_w || next == -ESC_d;
+ return escape == ESC_w || escape == ESC_d;
default:
return FALSE;
@@ -2323,6 +3423,244 @@ switch(op_code)
/*************************************************
+* Add a character or range to a class *
+*************************************************/
+
+/* This function packages up the logic of adding a character or range of
+characters to a class. The character values in the arguments will be within the
+valid values for the current mode (8-bit, 16-bit, UTF, etc). This function is
+mutually recursive with the function immediately below.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cd contains pointers to tables etc.
+ start start of range character
+ end end of range character
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static int
+add_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,
+ compile_data *cd, pcre_uint32 start, pcre_uint32 end)
+{
+pcre_uint32 c;
+int n8 = 0;
+
+/* If caseless matching is required, scan the range and process alternate
+cases. In Unicode, there are 8-bit characters that have alternate cases that
+are greater than 255 and vice-versa. Sometimes we can just extend the original
+range. */
+
+if ((options & PCRE_CASELESS) != 0)
+ {
+#ifdef SUPPORT_UCP
+ if ((options & PCRE_UTF8) != 0)
+ {
+ int rc;
+ pcre_uint32 oc, od;
+
+ options &= ~PCRE_CASELESS; /* Remove for recursive calls */
+ c = start;
+
+ while ((rc = get_othercase_range(&c, end, &oc, &od)) >= 0)
+ {
+ /* Handle a single character that has more than one other case. */
+
+ if (rc > 0) n8 += add_list_to_class(classbits, uchardptr, options, cd,
+ PRIV(ucd_caseless_sets) + rc, oc);
+
+ /* Do nothing if the other case range is within the original range. */
+
+ else if (oc >= start && od <= end) continue;
+
+ /* Extend the original range if there is overlap, noting that if oc < c, we
+ can't have od > end because a subrange is always shorter than the basic
+ range. Otherwise, use a recursive call to add the additional range. */
+
+ else if (oc < start && od >= start - 1) start = oc; /* Extend downwards */
+ else if (od > end && oc <= end + 1) end = od; /* Extend upwards */
+ else n8 += add_to_class(classbits, uchardptr, options, cd, oc, od);
+ }
+ }
+ else
+#endif /* SUPPORT_UCP */
+
+ /* Not UTF-mode, or no UCP */
+
+ for (c = start; c <= end && c < 256; c++)
+ {
+ SETBIT(classbits, cd->fcc[c]);
+ n8++;
+ }
+ }
+
+/* Now handle the original range. Adjust the final value according to the bit
+length - this means that the same lists of (e.g.) horizontal spaces can be used
+in all cases. */
+
+#if defined COMPILE_PCRE8
+#ifdef SUPPORT_UTF
+ if ((options & PCRE_UTF8) == 0)
+#endif
+ if (end > 0xff) end = 0xff;
+
+#elif defined COMPILE_PCRE16
+#ifdef SUPPORT_UTF
+ if ((options & PCRE_UTF16) == 0)
+#endif
+ if (end > 0xffff) end = 0xffff;
+
+#endif /* COMPILE_PCRE[8|16] */
+
+/* If all characters are less than 256, use the bit map. Otherwise use extra
+data. */
+
+if (end < 0x100)
+ {
+ for (c = start; c <= end; c++)
+ {
+ n8++;
+ SETBIT(classbits, c);
+ }
+ }
+
+else
+ {
+ pcre_uchar *uchardata = *uchardptr;
+
+#ifdef SUPPORT_UTF
+ if ((options & PCRE_UTF8) != 0) /* All UTFs use the same flag bit */
+ {
+ if (start < end)
+ {
+ *uchardata++ = XCL_RANGE;
+ uchardata += PRIV(ord2utf)(start, uchardata);
+ uchardata += PRIV(ord2utf)(end, uchardata);
+ }
+ else if (start == end)
+ {
+ *uchardata++ = XCL_SINGLE;
+ uchardata += PRIV(ord2utf)(start, uchardata);
+ }
+ }
+ else
+#endif /* SUPPORT_UTF */
+
+ /* Without UTF support, character values are constrained by the bit length,
+ and can only be > 256 for 16-bit and 32-bit libraries. */
+
+#ifdef COMPILE_PCRE8
+ {}
+#else
+ if (start < end)
+ {
+ *uchardata++ = XCL_RANGE;
+ *uchardata++ = start;
+ *uchardata++ = end;
+ }
+ else if (start == end)
+ {
+ *uchardata++ = XCL_SINGLE;
+ *uchardata++ = start;
+ }
+#endif
+
+ *uchardptr = uchardata; /* Updata extra data pointer */
+ }
+
+return n8; /* Number of 8-bit characters */
+}
+
+
+
+
+/*************************************************
+* Add a list of characters to a class *
+*************************************************/
+
+/* This function is used for adding a list of case-equivalent characters to a
+class, and also for adding a list of horizontal or vertical whitespace. If the
+list is in order (which it should be), ranges of characters are detected and
+handled appropriately. This function is mutually recursive with the function
+above.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cd contains pointers to tables etc.
+ p points to row of 32-bit values, terminated by NOTACHAR
+ except character to omit; this is used when adding lists of
+ case-equivalent characters to avoid including the one we
+ already know about
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static int
+add_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,
+ compile_data *cd, const pcre_uint32 *p, unsigned int except)
+{
+int n8 = 0;
+while (p[0] < NOTACHAR)
+ {
+ int n = 0;
+ if (p[0] != except)
+ {
+ while(p[n+1] == p[0] + n + 1) n++;
+ n8 += add_to_class(classbits, uchardptr, options, cd, p[0], p[n]);
+ }
+ p += n + 1;
+ }
+return n8;
+}
+
+
+
+/*************************************************
+* Add characters not in a list to a class *
+*************************************************/
+
+/* This function is used for adding the complement of a list of horizontal or
+vertical whitespace to a class. The list must be in order.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cd contains pointers to tables etc.
+ p points to row of 32-bit values, terminated by NOTACHAR
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static int
+add_not_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr,
+ int options, compile_data *cd, const pcre_uint32 *p)
+{
+BOOL utf = (options & PCRE_UTF8) != 0;
+int n8 = 0;
+if (p[0] > 0)
+ n8 += add_to_class(classbits, uchardptr, options, cd, 0, p[0] - 1);
+while (p[0] < NOTACHAR)
+ {
+ while (p[1] == p[0] + 1) p++;
+ n8 += add_to_class(classbits, uchardptr, options, cd, p[0] + 1,
+ (p[1] == NOTACHAR) ? (utf ? 0x10ffffu : 0xffffffffu) : p[1] - 1);
+ p++;
+ }
+return n8;
+}
+
+
+
+/*************************************************
* Compile one branch *
*************************************************/
@@ -2337,9 +3675,12 @@ Arguments:
codeptr points to the pointer to the current code point
ptrptr points to the current pattern pointer
errorcodeptr points to error code variable
- firstbyteptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE)
- reqbyteptr set to the last literal character required, else < 0
+ firstcharptr place to put the first required character
+ firstcharflagsptr place to put the first character flags, or a negative number
+ reqcharptr place to put the last required character
+ reqcharflagsptr place to put the last required character flags, or a negative number
bcptr points to current branch chain
+ cond_depth conditional nesting depth
cd contains pointers to tables etc.
lengthptr NULL during the real compile phase
points to length accumulator during pre-compile phase
@@ -2349,46 +3690,67 @@ Returns: TRUE on success
*/
static BOOL
-compile_branch(int *optionsptr, uschar **codeptr, const uschar **ptrptr,
- int *errorcodeptr, int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr,
+compile_branch(int *optionsptr, pcre_uchar **codeptr,
+ const pcre_uchar **ptrptr, int *errorcodeptr,
+ pcre_uint32 *firstcharptr, pcre_int32 *firstcharflagsptr,
+ pcre_uint32 *reqcharptr, pcre_int32 *reqcharflagsptr,
+ branch_chain *bcptr, int cond_depth,
compile_data *cd, int *lengthptr)
{
int repeat_type, op_type;
int repeat_min = 0, repeat_max = 0; /* To please picky compilers */
int bravalue = 0;
int greedy_default, greedy_non_default;
-int firstbyte, reqbyte;
-int zeroreqbyte, zerofirstbyte;
-int req_caseopt, reqvary, tempreqvary;
-int options = *optionsptr;
+pcre_uint32 firstchar, reqchar;
+pcre_int32 firstcharflags, reqcharflags;
+pcre_uint32 zeroreqchar, zerofirstchar;
+pcre_int32 zeroreqcharflags, zerofirstcharflags;
+pcre_int32 req_caseopt, reqvary, tempreqvary;
+int options = *optionsptr; /* May change dynamically */
int after_manual_callout = 0;
int length_prevgroup = 0;
-register int c;
-register uschar *code = *codeptr;
-uschar *last_code = code;
-uschar *orig_code = code;
-uschar *tempcode;
+register pcre_uint32 c;
+int escape;
+register pcre_uchar *code = *codeptr;
+pcre_uchar *last_code = code;
+pcre_uchar *orig_code = code;
+pcre_uchar *tempcode;
BOOL inescq = FALSE;
-BOOL groupsetfirstbyte = FALSE;
-const uschar *ptr = *ptrptr;
-const uschar *tempptr;
-uschar *previous = NULL;
-uschar *previous_callout = NULL;
-uschar *save_hwm = NULL;
-uschar classbits[32];
-
-#ifdef SUPPORT_UTF8
-BOOL class_utf8;
-BOOL utf8 = (options & PCRE_UTF8) != 0;
-uschar *class_utf8data;
-uschar *class_utf8data_base;
-uschar utf8_char[6];
+BOOL groupsetfirstchar = FALSE;
+const pcre_uchar *ptr = *ptrptr;
+const pcre_uchar *tempptr;
+const pcre_uchar *nestptr = NULL;
+pcre_uchar *previous = NULL;
+pcre_uchar *previous_callout = NULL;
+pcre_uchar *save_hwm = NULL;
+pcre_uint8 classbits[32];
+
+/* We can fish out the UTF-8 setting once and for all into a BOOL, but we
+must not do this for other options (e.g. PCRE_EXTENDED) because they may change
+dynamically as we process the pattern. */
+
+#ifdef SUPPORT_UTF
+/* PCRE_UTF[16|32] have the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
+#ifndef COMPILE_PCRE32
+pcre_uchar utf_chars[6];
+#endif
#else
-BOOL utf8 = FALSE;
-uschar *utf8_char = NULL;
+BOOL utf = FALSE;
+#endif
+
+/* Helper variables for OP_XCLASS opcode (for characters > 255). We define
+class_uchardata always so that it can be passed to add_to_class() always,
+though it will not be used in non-UTF 8-bit cases. This avoids having to supply
+alternative calls for the different cases. */
+
+pcre_uchar *class_uchardata;
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+BOOL xclass;
+pcre_uchar *class_uchardata_base;
#endif
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
if (lengthptr != NULL) DPRINTF((">> start branch\n"));
#endif
@@ -2399,22 +3761,24 @@ greedy_non_default = greedy_default ^ 1;
/* Initialize no first byte, no required byte. REQ_UNSET means "no char
matching encountered yet". It gets changed to REQ_NONE if we hit something that
-matches a non-fixed char first char; reqbyte just remains unset if we never
+matches a non-fixed char first char; reqchar just remains unset if we never
find one.
When we hit a repeat whose minimum is zero, we may have to adjust these values
to take the zero repeat into account. This is implemented by setting them to
-zerofirstbyte and zeroreqbyte when such a repeat is encountered. The individual
+zerofirstbyte and zeroreqchar when such a repeat is encountered. The individual
item types that can be repeated set these backoff variables appropriately. */
-firstbyte = reqbyte = zerofirstbyte = zeroreqbyte = REQ_UNSET;
+firstchar = reqchar = zerofirstchar = zeroreqchar = 0;
+firstcharflags = reqcharflags = zerofirstcharflags = zeroreqcharflags = REQ_UNSET;
-/* The variable req_caseopt contains either the REQ_CASELESS value or zero,
-according to the current setting of the caseless flag. REQ_CASELESS is a bit
-value > 255. It is added into the firstbyte or reqbyte variables to record the
-case status of the value. This is used only for ASCII characters. */
+/* The variable req_caseopt contains either the REQ_CASELESS value
+or zero, according to the current setting of the caseless flag. The
+REQ_CASELESS leaves the lower 28 bit empty. It is added into the
+firstchar or reqchar variables to record the case status of the
+value. This is used only for ASCII characters. */
-req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
+req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
/* Switch on next character until the end of the branch */
@@ -2426,31 +3790,44 @@ for (;; ptr++)
BOOL is_quantifier;
BOOL is_recurse;
BOOL reset_bracount;
- int class_charcount;
- int class_lastchar;
+ int class_has_8bitchar;
+ int class_one_char;
int newoptions;
int recno;
int refsign;
int skipbytes;
- int subreqbyte;
- int subfirstbyte;
+ pcre_uint32 subreqchar, subfirstchar;
+ pcre_int32 subreqcharflags, subfirstcharflags;
int terminator;
- int mclength;
- uschar mcbuffer[8];
+ unsigned int mclength;
+ unsigned int tempbracount;
+ pcre_uint32 ec;
+ pcre_uchar mcbuffer[8];
- /* Get next byte in the pattern */
+ /* Get next character in the pattern */
c = *ptr;
+ /* If we are at the end of a nested substitution, revert to the outer level
+ string. Nesting only happens one level deep. */
+
+ if (c == CHAR_NULL && nestptr != NULL)
+ {
+ ptr = nestptr;
+ nestptr = NULL;
+ c = *ptr;
+ }
+
/* If we are in the pre-compile phase, accumulate the length used for the
previous cycle of this loop. */
if (lengthptr != NULL)
{
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
if (code > cd->hwm) cd->hwm = code; /* High water info */
#endif
- if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */
+ if (code > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
{
*errorcodeptr = ERR52;
goto FAILED;
@@ -2472,8 +3849,9 @@ for (;; ptr++)
goto FAILED;
}
- *lengthptr += code - last_code;
- DPRINTF(("length=%d added %d c=%c\n", *lengthptr, code - last_code, c));
+ *lengthptr += (int)(code - last_code);
+ DPRINTF(("length=%d added %d c=%c (0x%x)\n", *lengthptr,
+ (int)(code - last_code), c, c));
/* If "previous" is set and it is not at the start of the work space, move
it back to there, in order to avoid filling up the work space. Otherwise,
@@ -2483,7 +3861,7 @@ for (;; ptr++)
{
if (previous > orig_code)
{
- memmove(orig_code, previous, code - previous);
+ memmove(orig_code, previous, IN_UCHARS(code - previous));
code -= previous - orig_code;
previous = orig_code;
}
@@ -2499,7 +3877,8 @@ for (;; ptr++)
/* In the real compile phase, just check the workspace used by the forward
reference list. */
- else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK)
+ else if (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN)
{
*errorcodeptr = ERR52;
goto FAILED;
@@ -2507,9 +3886,9 @@ for (;; ptr++)
/* If in \Q...\E, check for the end; if not, we have a literal */
- if (inescq && c != 0)
+ if (inescq && c != CHAR_NULL)
{
- if (c == '\\' && ptr[1] == 'E')
+ if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
{
inescq = FALSE;
ptr++;
@@ -2535,8 +3914,9 @@ for (;; ptr++)
/* Fill in length of a previous callout, except when the next thing is
a quantifier. */
- is_quantifier = c == '*' || c == '+' || c == '?' ||
- (c == '{' && is_counted_repeat(ptr+1));
+ is_quantifier =
+ c == CHAR_ASTERISK || c == CHAR_PLUS || c == CHAR_QUESTION_MARK ||
+ (c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1));
if (!is_quantifier && previous_callout != NULL &&
after_manual_callout-- <= 0)
@@ -2546,18 +3926,23 @@ for (;; ptr++)
previous_callout = NULL;
}
- /* In extended mode, skip white space and comments */
+ /* In extended mode, skip white space and comments. */
if ((options & PCRE_EXTENDED) != 0)
{
- if ((cd->ctypes[c] & ctype_space) != 0) continue;
- if (c == '#')
+ if (MAX_255(*ptr) && (cd->ctypes[c] & ctype_space) != 0) continue;
+ if (c == CHAR_NUMBER_SIGN)
{
- while (*(++ptr) != 0)
+ ptr++;
+ while (*ptr != CHAR_NULL)
{
if (IS_NEWLINE(ptr)) { ptr += cd->nllen - 1; break; }
+ ptr++;
+#ifdef SUPPORT_UTF
+ if (utf) FORWARDCHAR(ptr);
+#endif
}
- if (*ptr != 0) continue;
+ if (*ptr != CHAR_NULL) continue;
/* Else fall through to handle end of string */
c = 0;
@@ -2576,10 +3961,12 @@ for (;; ptr++)
{
/* ===================================================================*/
case 0: /* The branch terminates at string end */
- case '|': /* or | or ) */
- case ')':
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
+ case CHAR_VERTICAL_LINE: /* or | or ) */
+ case CHAR_RIGHT_PARENTHESIS:
+ *firstcharptr = firstchar;
+ *firstcharflagsptr = firstcharflags;
+ *reqcharptr = reqchar;
+ *reqcharflagsptr = reqcharflags;
*codeptr = code;
*ptrptr = ptr;
if (lengthptr != NULL)
@@ -2589,7 +3976,7 @@ for (;; ptr++)
*errorcodeptr = ERR20;
goto FAILED;
}
- *lengthptr += code - last_code; /* To include callout length */
+ *lengthptr += (int)(code - last_code); /* To include callout length */
DPRINTF((">> end branch\n"));
}
return TRUE;
@@ -2599,29 +3986,32 @@ for (;; ptr++)
/* Handle single-character metacharacters. In multiline mode, ^ disables
the setting of any following char as a first character. */
- case '^':
+ case CHAR_CIRCUMFLEX_ACCENT:
+ previous = NULL;
if ((options & PCRE_MULTILINE) != 0)
{
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ *code++ = OP_CIRCM;
}
- previous = NULL;
- *code++ = OP_CIRC;
+ else *code++ = OP_CIRC;
break;
- case '$':
+ case CHAR_DOLLAR_SIGN:
previous = NULL;
- *code++ = OP_DOLL;
+ *code++ = ((options & PCRE_MULTILINE) != 0)? OP_DOLLM : OP_DOLL;
break;
/* There can never be a first char if '.' is first, whatever happens about
- repeats. The value of reqbyte doesn't change either. */
-
- case '.':
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ repeats. The value of reqchar doesn't change either. */
+
+ case CHAR_DOT:
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
previous = code;
- *code++ = OP_ANY;
+ *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
break;
@@ -2636,18 +4026,29 @@ for (;; ptr++)
opcode is compiled. It may optionally have a bit map for characters < 256,
but those above are are explicitly listed afterwards. A flag byte tells
whether the bitmap is present, and whether this is a negated class or not.
- */
- case '[':
+ In JavaScript compatibility mode, an isolated ']' causes an error. In
+ default (Perl) mode, it is treated as a data character. */
+
+ case CHAR_RIGHT_SQUARE_BRACKET:
+ if ((cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ *errorcodeptr = ERR64;
+ goto FAILED;
+ }
+ goto NORMAL_CHAR;
+
+ case CHAR_LEFT_SQUARE_BRACKET:
previous = code;
/* PCRE supports POSIX class stuff inside a class. Perl gives an error if
they are encountered at the top level, so we'll do that too. */
- if ((ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
+ if ((ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
+ ptr[1] == CHAR_EQUALS_SIGN) &&
check_posix_syntax(ptr, &tempptr))
{
- *errorcodeptr = (ptr[1] == ':')? ERR13 : ERR31;
+ *errorcodeptr = (ptr[1] == CHAR_COLON)? ERR13 : ERR31;
goto FAILED;
}
@@ -2659,75 +4060,97 @@ for (;; ptr++)
for (;;)
{
c = *(++ptr);
- if (c == '\\')
+ if (c == CHAR_BACKSLASH)
{
- if (ptr[1] == 'E') ptr++;
- else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3;
- else break;
+ if (ptr[1] == CHAR_E)
+ ptr++;
+ else if (STRNCMP_UC_C8(ptr + 1, STR_Q STR_BACKSLASH STR_E, 3) == 0)
+ ptr += 3;
+ else
+ break;
}
- else if (!negate_class && c == '^')
+ else if (!negate_class && c == CHAR_CIRCUMFLEX_ACCENT)
negate_class = TRUE;
else break;
}
+ /* Empty classes are allowed in JavaScript compatibility mode. Otherwise,
+ an initial ']' is taken as a data character -- the code below handles
+ that. In JS mode, [] must always fail, so generate OP_FAIL, whereas
+ [^] must match any character, so generate OP_ALLANY. */
+
+ if (c == CHAR_RIGHT_SQUARE_BRACKET &&
+ (cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
+ {
+ *code++ = negate_class? OP_ALLANY : OP_FAIL;
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ break;
+ }
+
/* If a class contains a negative special such as \S, we need to flip the
negation flag at the end, so that support for characters > 255 works
correctly (they are all included in the class). */
should_flip_negation = FALSE;
- /* Keep a count of chars with values < 256 so that we can optimize the case
- of just a single character (as long as it's < 256). However, For higher
- valued UTF-8 characters, we don't yet do any optimization. */
+ /* For optimization purposes, we track some properties of the class:
+ class_has_8bitchar will be non-zero if the class contains at least one <
+ 256 character; class_one_char will be 1 if the class contains just one
+ character. */
- class_charcount = 0;
- class_lastchar = -1;
+ class_has_8bitchar = 0;
+ class_one_char = 0;
/* Initialize the 32-char bit map to all zeros. We build the map in a
- temporary bit of memory, in case the class contains only 1 character (less
- than 256), because in that case the compiled code doesn't use the bit map.
- */
+ temporary bit of memory, in case the class contains fewer than two
+ 8-bit characters because in that case the compiled code doesn't use the bit
+ map. */
- memset(classbits, 0, 32 * sizeof(uschar));
+ memset(classbits, 0, 32 * sizeof(pcre_uint8));
-#ifdef SUPPORT_UTF8
- class_utf8 = FALSE; /* No chars >= 256 */
- class_utf8data = code + LINK_SIZE + 2; /* For UTF-8 items */
- class_utf8data_base = class_utf8data; /* For resetting in pass 1 */
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ xclass = FALSE;
+ class_uchardata = code + LINK_SIZE + 2; /* For XCLASS items */
+ class_uchardata_base = class_uchardata; /* Save the start */
#endif
/* Process characters until ] is reached. By writing this as a "do" it
means that an initial ] is taken as a data character. At the start of the
loop, c contains the first byte of the character. */
- if (c != 0) do
+ if (c != CHAR_NULL) do
{
- const uschar *oldptr;
+ const pcre_uchar *oldptr;
-#ifdef SUPPORT_UTF8
- if (utf8 && c > 127)
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(c))
{ /* Braces are required because the */
GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */
}
+#endif
- /* In the pre-compile phase, accumulate the length of any UTF-8 extra
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ /* In the pre-compile phase, accumulate the length of any extra
data and reset the pointer. This is so that very large classes that
- contain a zillion UTF-8 characters no longer overwrite the work space
- (which is on the stack). */
+ contain a zillion > 255 characters no longer overwrite the work space
+ (which is on the stack). We have to remember that there was XCLASS data,
+ however. */
- if (lengthptr != NULL)
+ if (lengthptr != NULL && class_uchardata > class_uchardata_base)
{
- *lengthptr += class_utf8data - class_utf8data_base;
- class_utf8data = class_utf8data_base;
+ xclass = TRUE;
+ *lengthptr += class_uchardata - class_uchardata_base;
+ class_uchardata = class_uchardata_base;
}
-
#endif
/* Inside \Q...\E everything is literal except \E */
if (inescq)
{
- if (c == '\\' && ptr[1] == 'E') /* If we are at \E */
+ if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E) /* If we are at \E */
{
inescq = FALSE; /* Reset literal state */
ptr++; /* Skip the 'E' */
@@ -2742,30 +4165,30 @@ for (;; ptr++)
[.ch.] and [=ch=] ("collating elements") and fault them, as Perl
5.6 and 5.8 do. */
- if (c == '[' &&
- (ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
- check_posix_syntax(ptr, &tempptr))
+ if (c == CHAR_LEFT_SQUARE_BRACKET &&
+ (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
+ ptr[1] == CHAR_EQUALS_SIGN) && check_posix_syntax(ptr, &tempptr))
{
BOOL local_negate = FALSE;
int posix_class, taboffset, tabopt;
- register const uschar *cbits = cd->cbits;
- uschar pbits[32];
+ register const pcre_uint8 *cbits = cd->cbits;
+ pcre_uint8 pbits[32];
- if (ptr[1] != ':')
+ if (ptr[1] != CHAR_COLON)
{
*errorcodeptr = ERR31;
goto FAILED;
}
ptr += 2;
- if (*ptr == '^')
+ if (*ptr == CHAR_CIRCUMFLEX_ACCENT)
{
local_negate = TRUE;
should_flip_negation = TRUE; /* Note negative special */
ptr++;
}
- posix_class = check_posix_name(ptr, tempptr - ptr);
+ posix_class = check_posix_name(ptr, (int)(tempptr - ptr));
if (posix_class < 0)
{
*errorcodeptr = ERR30;
@@ -2779,17 +4202,32 @@ for (;; ptr++)
if ((options & PCRE_CASELESS) != 0 && posix_class <= 2)
posix_class = 0;
- /* We build the bit map for the POSIX class in a chunk of local store
- because we may be adding and subtracting from it, and we don't want to
- subtract bits that may be in the main map already. At the end we or the
- result into the bit map that is being built. */
+ /* When PCRE_UCP is set, some of the POSIX classes are converted to
+ different escape sequences that use Unicode properties. */
+
+#ifdef SUPPORT_UCP
+ if ((options & PCRE_UCP) != 0)
+ {
+ int pc = posix_class + ((local_negate)? POSIX_SUBSIZE/2 : 0);
+ if (posix_substitutes[pc] != NULL)
+ {
+ nestptr = tempptr + 1;
+ ptr = posix_substitutes[pc] - 1;
+ continue;
+ }
+ }
+#endif
+ /* In the non-UCP case, we build the bit map for the POSIX class in a
+ chunk of local store because we may be adding and subtracting from it,
+ and we don't want to subtract bits that may be in the main map already.
+ At the end we or the result into the bit map that is being built. */
posix_class *= 3;
/* Copy in the first table (always present) */
memcpy(pbits, cbits + posix_class_maps[posix_class],
- 32 * sizeof(uschar));
+ 32 * sizeof(pcre_uint8));
/* If there is a second table, add or remove it as required. */
@@ -2804,7 +4242,7 @@ for (;; ptr++)
for (c = 0; c < 32; c++) pbits[c] &= ~cbits[c + taboffset];
}
- /* Not see if we need to remove any special characters. An option
+ /* Now see if we need to remove any special characters. An option
value of 1 removes vertical space and 2 removes underscore. */
if (tabopt < 0) tabopt = -tabopt;
@@ -2820,45 +4258,67 @@ for (;; ptr++)
for (c = 0; c < 32; c++) classbits[c] |= pbits[c];
ptr = tempptr + 1;
- class_charcount = 10; /* Set > 1; assumes more than 1 per class */
+ /* Every class contains at least one < 256 character. */
+ class_has_8bitchar = 1;
+ /* Every class contains at least two characters. */
+ class_one_char = 2;
continue; /* End of POSIX syntax handling */
}
/* Backslash may introduce a single character, or it may introduce one
of the specials, which just set a flag. The sequence \b is a special
- case. Inside a class (and only there) it is treated as backspace.
- Elsewhere it marks a word boundary. Other escapes have preset maps ready
- to 'or' into the one we are building. We assume they have more than one
- character in them, so set class_charcount bigger than one. */
-
- if (c == '\\')
+ case. Inside a class (and only there) it is treated as backspace. We
+ assume that other escapes have more than one character in them, so
+ speculatively set both class_has_8bitchar and class_one_char bigger
+ than one. Unrecognized escapes fall through and are either treated
+ as literal characters (by default), or are faulted if
+ PCRE_EXTRA is set. */
+
+ if (c == CHAR_BACKSLASH)
{
- c = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE);
+ escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options,
+ TRUE);
if (*errorcodeptr != 0) goto FAILED;
-
- if (-c == ESC_b) c = '\b'; /* \b is backspace in a class */
- else if (-c == ESC_X) c = 'X'; /* \X is literal X in a class */
- else if (-c == ESC_R) c = 'R'; /* \R is literal R in a class */
- else if (-c == ESC_Q) /* Handle start of quoted string */
+ if (escape == 0) c = ec;
+ else if (escape == ESC_b) c = CHAR_BS; /* \b is backspace in a class */
+ else if (escape == ESC_N) /* \N is not supported in a class */
{
- if (ptr[1] == '\\' && ptr[2] == 'E')
+ *errorcodeptr = ERR71;
+ goto FAILED;
+ }
+ else if (escape == ESC_Q) /* Handle start of quoted string */
+ {
+ if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
{
ptr += 2; /* avoid empty string */
}
else inescq = TRUE;
continue;
}
- else if (-c == ESC_E) continue; /* Ignore orphan \E */
+ else if (escape == ESC_E) continue; /* Ignore orphan \E */
- if (c < 0)
+ else
{
- register const uschar *cbits = cd->cbits;
- class_charcount += 2; /* Greater than 1 is what matters */
-
- /* Save time by not doing this in the pre-compile phase. */
+ register const pcre_uint8 *cbits = cd->cbits;
+ /* Every class contains at least two < 256 characters. */
+ class_has_8bitchar++;
+ /* Every class contains at least two characters. */
+ class_one_char += 2;
- if (lengthptr == NULL) switch (-c)
+ switch (escape)
{
+#ifdef SUPPORT_UCP
+ case ESC_du: /* These are the values given for \d etc */
+ case ESC_DU: /* when PCRE_UCP is set. We replace the */
+ case ESC_wu: /* escape sequence with an appropriate \p */
+ case ESC_WU: /* or \P to test Unicode properties instead */
+ case ESC_su: /* of the default ASCII testing. */
+ case ESC_SU:
+ nestptr = ptr;
+ ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
+ class_has_8bitchar--; /* Undo! */
+ continue;
+#endif
case ESC_d:
for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_digit];
continue;
@@ -2877,9 +4337,15 @@ for (;; ptr++)
for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word];
continue;
+ /* Perl 5.004 onwards omits VT from \s, but we must preserve it
+ if it was previously set by something earlier in the character
+ class. Luckily, the value of CHAR_VT is 0x0b in both ASCII and
+ EBCDIC, so we lazily just adjust the appropriate bit. */
+
case ESC_s:
- for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_space];
- classbits[1] &= ~0x08; /* Perl 5.004 onwards omits VT from \s */
+ classbits[0] |= cbits[cbit_space];
+ classbits[1] |= cbits[cbit_space+1] & ~0x08;
+ for (c = 2; c < 32; c++) classbits[c] |= cbits[c+cbit_space];
continue;
case ESC_S:
@@ -2888,224 +4354,118 @@ for (;; ptr++)
classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */
continue;
- default: /* Not recognized; fall through */
- break; /* Need "default" setting to stop compiler warning. */
- }
+ /* The rest apply in both UCP and non-UCP cases. */
- /* In the pre-compile phase, just do the recognition. */
-
- else if (c == -ESC_d || c == -ESC_D || c == -ESC_w ||
- c == -ESC_W || c == -ESC_s || c == -ESC_S) continue;
-
- /* We need to deal with \H, \h, \V, and \v in both phases because
- they use extra memory. */
-
- if (-c == ESC_h)
- {
- SETBIT(classbits, 0x09); /* VT */
- SETBIT(classbits, 0x20); /* SPACE */
- SETBIT(classbits, 0xa0); /* NSBP */
-#ifdef SUPPORT_UTF8
- if (utf8)
- {
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(0x1680, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(0x180e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x2000, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x200A, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(0x202f, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(0x205f, class_utf8data);
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(0x3000, class_utf8data);
- }
-#endif
+ case ESC_h:
+ (void)add_list_to_class(classbits, &class_uchardata, options, cd,
+ PRIV(hspace_list), NOTACHAR);
continue;
- }
- if (-c == ESC_H)
- {
- for (c = 0; c < 32; c++)
- {
- int x = 0xff;
- switch (c)
- {
- case 0x09/8: x ^= 1 << (0x09%8); break;
- case 0x20/8: x ^= 1 << (0x20%8); break;
- case 0xa0/8: x ^= 1 << (0xa0%8); break;
- default: break;
- }
- classbits[c] |= x;
- }
+ case ESC_H:
+ (void)add_not_list_to_class(classbits, &class_uchardata, options,
+ cd, PRIV(hspace_list));
+ continue;
-#ifdef SUPPORT_UTF8
- if (utf8)
- {
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x0100, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x167f, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x1681, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x180d, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x180f, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x1fff, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x200B, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x202e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x2030, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x205e, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x2060, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x2fff, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x3001, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x7fffffff, class_utf8data);
- }
-#endif
+ case ESC_v:
+ (void)add_list_to_class(classbits, &class_uchardata, options, cd,
+ PRIV(vspace_list), NOTACHAR);
continue;
- }
- if (-c == ESC_v)
- {
- SETBIT(classbits, 0x0a); /* LF */
- SETBIT(classbits, 0x0b); /* VT */
- SETBIT(classbits, 0x0c); /* FF */
- SETBIT(classbits, 0x0d); /* CR */
- SETBIT(classbits, 0x85); /* NEL */
-#ifdef SUPPORT_UTF8
- if (utf8)
- {
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x2028, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x2029, class_utf8data);
- }
-#endif
+ case ESC_V:
+ (void)add_not_list_to_class(classbits, &class_uchardata, options,
+ cd, PRIV(vspace_list));
continue;
- }
- if (-c == ESC_V)
- {
- for (c = 0; c < 32; c++)
+#ifdef SUPPORT_UCP
+ case ESC_p:
+ case ESC_P:
{
- int x = 0xff;
- switch (c)
- {
- case 0x0a/8: x ^= 1 << (0x0a%8);
- x ^= 1 << (0x0b%8);
- x ^= 1 << (0x0c%8);
- x ^= 1 << (0x0d%8);
- break;
- case 0x85/8: x ^= 1 << (0x85%8); break;
- default: break;
- }
- classbits[c] |= x;
+ BOOL negated;
+ unsigned int ptype = 0, pdata = 0;
+ if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
+ goto FAILED;
+ *class_uchardata++ = ((escape == ESC_p) != negated)?
+ XCL_PROP : XCL_NOTPROP;
+ *class_uchardata++ = ptype;
+ *class_uchardata++ = pdata;
+ class_has_8bitchar--; /* Undo! */
+ continue;
}
+#endif
+ /* Unrecognized escapes are faulted if PCRE is running in its
+ strict mode. By default, for compatibility with Perl, they are
+ treated as literals. */
-#ifdef SUPPORT_UTF8
- if (utf8)
+ default:
+ if ((options & PCRE_EXTRA) != 0)
{
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x0100, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x2027, class_utf8data);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(0x2029, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(0x7fffffff, class_utf8data);
+ *errorcodeptr = ERR7;
+ goto FAILED;
}
-#endif
- continue;
- }
-
- /* We need to deal with \P and \p in both phases. */
-
-#ifdef SUPPORT_UCP
- if (-c == ESC_p || -c == ESC_P)
- {
- BOOL negated;
- int pdata;
- int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr);
- if (ptype < 0) goto FAILED;
- class_utf8 = TRUE;
- *class_utf8data++ = ((-c == ESC_p) != negated)?
- XCL_PROP : XCL_NOTPROP;
- *class_utf8data++ = ptype;
- *class_utf8data++ = pdata;
- class_charcount -= 2; /* Not a < 256 character */
- continue;
- }
-#endif
- /* Unrecognized escapes are faulted if PCRE is running in its
- strict mode. By default, for compatibility with Perl, they are
- treated as literals. */
-
- if ((options & PCRE_EXTRA) != 0)
- {
- *errorcodeptr = ERR7;
- goto FAILED;
+ class_has_8bitchar--; /* Undo the speculative increase. */
+ class_one_char -= 2; /* Undo the speculative increase. */
+ c = *ptr; /* Get the final character and fall through */
+ break;
}
-
- class_charcount -= 2; /* Undo the default count from above */
- c = *ptr; /* Get the final character and fall through */
}
- /* Fall through if we have a single character (c >= 0). This may be
- greater than 256 in UTF-8 mode. */
+ /* Fall through if the escape just defined a single character (c >= 0).
+ This may be greater than 256. */
+
+ escape = 0;
} /* End of backslash handling */
- /* A single character may be followed by '-' to form a range. However,
- Perl does not permit ']' to be the end of the range. A '-' character
- at the end is treated as a literal. Perl ignores orphaned \E sequences
- entirely. The code for handling \Q and \E is messy. */
+ /* A character may be followed by '-' to form a range. However, Perl does
+ not permit ']' to be the end of the range. A '-' character at the end is
+ treated as a literal. Perl ignores orphaned \E sequences entirely. The
+ code for handling \Q and \E is messy. */
CHECK_RANGE:
- while (ptr[1] == '\\' && ptr[2] == 'E')
+ while (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
{
inescq = FALSE;
ptr += 2;
}
-
oldptr = ptr;
- /* Remember \r or \n */
+ /* Remember if \r or \n were explicitly used */
- if (c == '\r' || c == '\n') cd->external_flags |= PCRE_HASCRORLF;
+ if (c == CHAR_CR || c == CHAR_NL) cd->external_flags |= PCRE_HASCRORLF;
/* Check for range */
- if (!inescq && ptr[1] == '-')
+ if (!inescq && ptr[1] == CHAR_MINUS)
{
- int d;
+ pcre_uint32 d;
ptr += 2;
- while (*ptr == '\\' && ptr[1] == 'E') ptr += 2;
+ while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E) ptr += 2;
/* If we hit \Q (not followed by \E) at this point, go into escaped
mode. */
- while (*ptr == '\\' && ptr[1] == 'Q')
+ while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
{
ptr += 2;
- if (*ptr == '\\' && ptr[1] == 'E') { ptr += 2; continue; }
+ if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E)
+ { ptr += 2; continue; }
inescq = TRUE;
break;
}
- if (*ptr == 0 || (!inescq && *ptr == ']'))
+ /* Minus (hyphen) at the end of a class is treated as a literal, so put
+ back the pointer and jump to handle the character that preceded it. */
+
+ if (*ptr == CHAR_NULL || (!inescq && *ptr == CHAR_RIGHT_SQUARE_BRACKET))
{
ptr = oldptr;
- goto LONE_SINGLE_CHARACTER;
+ goto CLASS_SINGLE_CHARACTER;
}
-#ifdef SUPPORT_UTF8
- if (utf8)
+ /* Otherwise, we have a potential range; pick up the next character */
+
+#ifdef SUPPORT_UTF
+ if (utf)
{ /* Braces are required because the */
GETCHARLEN(d, ptr, ptr); /* macro generates multiple statements */
}
@@ -3117,324 +4477,231 @@ for (;; ptr++)
not any of the other escapes. Perl 5.6 treats a hyphen as a literal
in such circumstances. */
- if (!inescq && d == '\\')
+ if (!inescq && d == CHAR_BACKSLASH)
{
- d = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE);
+ int descape;
+ descape = check_escape(&ptr, &d, errorcodeptr, cd->bracount, options, TRUE);
if (*errorcodeptr != 0) goto FAILED;
- /* \b is backspace; \X is literal X; \R is literal R; any other
- special means the '-' was literal */
+ /* \b is backspace; any other special means the '-' was literal. */
- if (d < 0)
+ if (descape != 0)
{
- if (d == -ESC_b) d = '\b';
- else if (d == -ESC_X) d = 'X';
- else if (d == -ESC_R) d = 'R'; else
+ if (descape == ESC_b) d = CHAR_BS; else
{
ptr = oldptr;
- goto LONE_SINGLE_CHARACTER; /* A few lines below */
+ goto CLASS_SINGLE_CHARACTER; /* A few lines below */
}
}
}
/* Check that the two values are in the correct order. Optimize
- one-character ranges */
+ one-character ranges. */
if (d < c)
{
*errorcodeptr = ERR8;
goto FAILED;
}
+ if (d == c) goto CLASS_SINGLE_CHARACTER; /* A few lines below */
- if (d == c) goto LONE_SINGLE_CHARACTER; /* A few lines below */
-
- /* Remember \r or \n */
-
- if (d == '\r' || d == '\n') cd->external_flags |= PCRE_HASCRORLF;
+ /* We have found a character range, so single character optimizations
+ cannot be done anymore. Any value greater than 1 indicates that there
+ is more than one character. */
- /* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless
- matching, we have to use an XCLASS with extra data items. Caseless
- matching for characters > 127 is available only if UCP support is
- available. */
+ class_one_char = 2;
-#ifdef SUPPORT_UTF8
- if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
- {
- class_utf8 = TRUE;
-
- /* With UCP support, we can find the other case equivalents of
- the relevant characters. There may be several ranges. Optimize how
- they fit with the basic range. */
-
-#ifdef SUPPORT_UCP
- if ((options & PCRE_CASELESS) != 0)
- {
- unsigned int occ, ocd;
- unsigned int cc = c;
- unsigned int origd = d;
- while (get_othercase_range(&cc, origd, &occ, &ocd))
- {
- if (occ >= (unsigned int)c &&
- ocd <= (unsigned int)d)
- continue; /* Skip embedded ranges */
-
- if (occ < (unsigned int)c &&
- ocd >= (unsigned int)c - 1) /* Extend the basic range */
- { /* if there is overlap, */
- c = occ; /* noting that if occ < c */
- continue; /* we can't have ocd > d */
- } /* because a subrange is */
- if (ocd > (unsigned int)d &&
- occ <= (unsigned int)d + 1) /* always shorter than */
- { /* the basic range. */
- d = ocd;
- continue;
- }
+ /* Remember an explicit \r or \n, and add the range to the class. */
- if (occ == ocd)
- {
- *class_utf8data++ = XCL_SINGLE;
- }
- else
- {
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(occ, class_utf8data);
- }
- class_utf8data += _erts_pcre_ord2utf8(ocd, class_utf8data);
- }
- }
-#endif /* SUPPORT_UCP */
+ if (d == CHAR_CR || d == CHAR_NL) cd->external_flags |= PCRE_HASCRORLF;
- /* Now record the original range, possibly modified for UCP caseless
- overlapping ranges. */
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cd, c, d);
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += _erts_pcre_ord2utf8(c, class_utf8data);
- class_utf8data += _erts_pcre_ord2utf8(d, class_utf8data);
+ continue; /* Go get the next char in the class */
+ }
- /* With UCP support, we are done. Without UCP support, there is no
- caseless matching for UTF-8 characters > 127; we can use the bit map
- for the smaller ones. */
+ /* Handle a single character - we can get here for a normal non-escape
+ char, or after \ that introduces a single character or for an apparent
+ range that isn't. Only the value 1 matters for class_one_char, so don't
+ increase it if it is already 2 or more ... just in case there's a class
+ with a zillion characters in it. */
+
+ CLASS_SINGLE_CHARACTER:
+ if (class_one_char < 2) class_one_char++;
+
+ /* If class_one_char is 1, we have the first single character in the
+ class, and there have been no prior ranges, or XCLASS items generated by
+ escapes. If this is the final character in the class, we can optimize by
+ turning the item into a 1-character OP_CHAR[I] if it's positive, or
+ OP_NOT[I] if it's negative. In the positive case, it can cause firstchar
+ to be set. Otherwise, there can be no first char if this item is first,
+ whatever repeat count may follow. In the case of reqchar, save the
+ previous value for reinstating. */
+
+ if (class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ {
+ ptr++;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
+ if (negate_class)
+ {
#ifdef SUPPORT_UCP
- continue; /* With next character in the class */
-#else
- if ((options & PCRE_CASELESS) == 0 || c > 127) continue;
-
- /* Adjust upper limit and fall through to set up the map */
-
- d = 127;
-
-#endif /* SUPPORT_UCP */
- }
-#endif /* SUPPORT_UTF8 */
-
- /* We use the bit map for all cases when not in UTF-8 mode; else
- ranges that lie entirely within 0-127 when there is UCP support; else
- for partial ranges without UCP support. */
-
- class_charcount += d - c + 1;
- class_lastchar = d;
+ int d;
+#endif
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
- /* We can save a bit of time by skipping this in the pre-compile. */
+ /* For caseless UTF-8 mode when UCP support is available, check
+ whether this character has more than one other case. If so, generate
+ a special OP_NOTPROP item instead of OP_NOTI. */
- if (lengthptr == NULL) for (; c <= d; c++)
- {
- classbits[c/8] |= (1 << (c&7));
- if ((options & PCRE_CASELESS) != 0)
+#ifdef SUPPORT_UCP
+ if (utf && (options & PCRE_CASELESS) != 0 &&
+ (d = UCD_CASESET(c)) != 0)
{
- int uc = cd->fcc[c]; /* flip case */
- classbits[uc/8] |= (1 << (uc&7));
+ *code++ = OP_NOTPROP;
+ *code++ = PT_CLIST;
+ *code++ = d;
}
- }
-
- continue; /* Go get the next char in the class */
- }
-
- /* Handle a lone single character - we can get here for a normal
- non-escape char, or after \ that introduces a single character or for an
- apparent range that isn't. */
-
- LONE_SINGLE_CHARACTER:
-
- /* Handle a character that cannot go in the bit map */
-
-#ifdef SUPPORT_UTF8
- if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
- {
- class_utf8 = TRUE;
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(c, class_utf8data);
+ else
+#endif
+ /* Char has only one other case, or UCP not available */
-#ifdef SUPPORT_UCP
- if ((options & PCRE_CASELESS) != 0)
- {
- unsigned int othercase;
- if ((othercase = _erts_pcre_ucp_othercase(c)) != NOTACHAR)
{
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += _erts_pcre_ord2utf8(othercase, class_utf8data);
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_NOTI: OP_NOT;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ code += PRIV(ord2utf)(c, code);
+ else
+#endif
+ *code++ = c;
}
+
+ /* We are finished with this character class */
+
+ goto END_CLASS;
}
-#endif /* SUPPORT_UCP */
- }
- else
-#endif /* SUPPORT_UTF8 */
+ /* For a single, positive character, get the value into mcbuffer, and
+ then we can handle this with the normal one-character code. */
- /* Handle a single-byte character */
- {
- classbits[c/8] |= (1 << (c&7));
- if ((options & PCRE_CASELESS) != 0)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ mclength = PRIV(ord2utf)(c, mcbuffer);
+ else
+#endif
{
- c = cd->fcc[c]; /* flip case */
- classbits[c/8] |= (1 << (c&7));
+ mcbuffer[0] = c;
+ mclength = 1;
}
- class_charcount++;
- class_lastchar = c;
- }
- }
+ goto ONE_CHAR;
+ } /* End of 1-char optimization */
- /* Loop until ']' reached. This "while" is the end of the "do" above. */
+ /* There is more than one character in the class, or an XCLASS item
+ has been generated. Add this character to the class. */
- while ((c = *(++ptr)) != 0 && (c != ']' || inescq));
-
- if (c == 0) /* Missing terminating ']' */
- {
- *errorcodeptr = ERR6;
- goto FAILED;
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cd, c, c);
}
+ /* Loop until ']' reached. This "while" is the end of the "do" far above.
+ If we are at the end of an internal nested string, revert to the outer
+ string. */
-/* This code has been disabled because it would mean that \s counts as
-an explicit \r or \n reference, and that's not really what is wanted. Now
-we set the flag only if there is a literal "\r" or "\n" in the class. */
+ while (((c = *(++ptr)) != CHAR_NULL ||
+ (nestptr != NULL &&
+ (ptr = nestptr, nestptr = NULL, c = *(++ptr)) != CHAR_NULL)) &&
+ (c != CHAR_RIGHT_SQUARE_BRACKET || inescq));
-#if 0
- /* Remember whether \r or \n are in this class */
+ /* Check for missing terminating ']' */
- if (negate_class)
+ if (c == CHAR_NULL)
{
- if ((classbits[1] & 0x24) != 0x24) cd->external_flags |= PCRE_HASCRORLF;
- }
- else
- {
- if ((classbits[1] & 0x24) != 0) cd->external_flags |= PCRE_HASCRORLF;
+ *errorcodeptr = ERR6;
+ goto FAILED;
}
-#endif
-
-
- /* If class_charcount is 1, we saw precisely one character whose value is
- less than 256. As long as there were no characters >= 128 and there was no
- use of \p or \P, in other words, no use of any XCLASS features, we can
- optimize.
-
- In UTF-8 mode, we can optimize the negative case only if there were no
- characters >= 128 because OP_NOT and the related opcodes like OP_NOTSTAR
- operate on single-bytes only. This is an historical hangover. Maybe one day
- we can tidy these opcodes to handle multi-byte characters.
-
- The optimization throws away the bit map. We turn the item into a
- 1-character OP_CHAR[NC] if it's positive, or OP_NOT if it's negative. Note
- that OP_NOT does not support multibyte characters. In the positive case, it
- can cause firstbyte to be set. Otherwise, there can be no first char if
- this item is first, whatever repeat count may follow. In the case of
- reqbyte, save the previous value for reinstating. */
-
-#ifdef SUPPORT_UTF8
- if (class_charcount == 1 && !class_utf8 &&
- (!utf8 || !negate_class || class_lastchar < 128))
-#else
- if (class_charcount == 1)
-#endif
- {
- zeroreqbyte = reqbyte;
- /* The OP_NOT opcode works on one-byte characters only. */
+ /* We will need an XCLASS if data has been placed in class_uchardata. In
+ the second phase this is a sufficient test. However, in the pre-compile
+ phase, class_uchardata gets emptied to prevent workspace overflow, so it
+ only if the very last character in the class needs XCLASS will it contain
+ anything at this point. For this reason, xclass gets set TRUE above when
+ uchar_classdata is emptied, and that's why this code is the way it is here
+ instead of just doing a test on class_uchardata below. */
- if (negate_class)
- {
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- *code++ = OP_NOT;
- *code++ = class_lastchar;
- break;
- }
-
- /* For a single, positive character, get the value into mcbuffer, and
- then we can handle this with the normal one-character code. */
-
-#ifdef SUPPORT_UTF8
- if (utf8 && class_lastchar > 127)
- mclength = _erts_pcre_ord2utf8(class_lastchar, mcbuffer);
- else
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ if (class_uchardata > class_uchardata_base) xclass = TRUE;
#endif
- {
- mcbuffer[0] = class_lastchar;
- mclength = 1;
- }
- goto ONE_CHAR;
- } /* End of 1-char optimization */
- /* The general case - not the one-char optimization. If this is the first
- thing in the branch, there can be no first char setting, whatever the
- repeat count. Any reqbyte setting must remain unchanged after any kind of
- repeat. */
+ /* If this is the first thing in the branch, there can be no first char
+ setting, whatever the repeat count. Any reqchar setting must remain
+ unchanged after any kind of repeat. */
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
/* If there are characters with values > 255, we have to compile an
extended class, with its own opcode, unless there was a negated special
- such as \S in the class, because in that case all characters > 255 are in
- the class, so any that were explicitly given as well can be ignored. If
- (when there are explicit characters > 255 that must be listed) there are no
- characters < 256, we can omit the bitmap in the actual compiled code. */
-
-#ifdef SUPPORT_UTF8
- if (class_utf8 && !should_flip_negation)
+ such as \S in the class, and PCRE_UCP is not set, because in that case all
+ characters > 255 are in the class, so any that were explicitly given as
+ well can be ignored. If (when there are explicit characters > 255 that must
+ be listed) there are no characters < 256, we can omit the bitmap in the
+ actual compiled code. */
+
+#ifdef SUPPORT_UTF
+ if (xclass && (!should_flip_negation || (options & PCRE_UCP) != 0))
+#elif !defined COMPILE_PCRE8
+ if (xclass && !should_flip_negation)
+#endif
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
{
- *class_utf8data++ = XCL_END; /* Marks the end of extra data */
+ *class_uchardata++ = XCL_END; /* Marks the end of extra data */
*code++ = OP_XCLASS;
code += LINK_SIZE;
- *code = negate_class? XCL_NOT : 0;
+ *code = negate_class? XCL_NOT:0;
/* If the map is required, move up the extra data to make room for it;
otherwise just move the code pointer to the end of the extra data. */
- if (class_charcount > 0)
+ if (class_has_8bitchar > 0)
{
*code++ |= XCL_MAP;
- memmove(code + 32, code, class_utf8data - code);
+ memmove(code + (32 / sizeof(pcre_uchar)), code,
+ IN_UCHARS(class_uchardata - code));
memcpy(code, classbits, 32);
- code = class_utf8data + 32;
+ code = class_uchardata + (32 / sizeof(pcre_uchar));
}
- else code = class_utf8data;
+ else code = class_uchardata;
/* Now fill in the complete length of the item */
- PUT(previous, 1, code - previous);
+ PUT(previous, 1, (int)(code - previous));
break; /* End of class handling */
}
#endif
- /* If there are no characters > 255, set the opcode to OP_CLASS or
- OP_NCLASS, depending on whether the whole class was negated and whether
- there were negative specials such as \S in the class. Then copy the 32-byte
- map into the code vector, negating it if necessary. */
+ /* If there are no characters > 255, or they are all to be included or
+ excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the
+ whole class was negated and whether there were negative specials such as \S
+ (non-UCP) in the class. Then copy the 32-byte map into the code vector,
+ negating it if necessary. */
*code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
- if (negate_class)
- {
- if (lengthptr == NULL) /* Save time in the pre-compile phase */
- for (c = 0; c < 32; c++) code[c] = ~classbits[c];
- }
- else
+ if (lengthptr == NULL) /* Save time in the pre-compile phase */
{
+ if (negate_class)
+ for (c = 0; c < 32; c++) classbits[c] = ~classbits[c];
memcpy(code, classbits, 32);
}
- code += 32;
+ code += 32 / sizeof(pcre_uchar);
+
+ END_CLASS:
break;
@@ -3442,23 +4709,23 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Various kinds of repeat; '{' is not necessarily a quantifier, but this
has been tested above. */
- case '{':
+ case CHAR_LEFT_CURLY_BRACKET:
if (!is_quantifier) goto NORMAL_CHAR;
ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorcodeptr);
if (*errorcodeptr != 0) goto FAILED;
goto REPEAT;
- case '*':
+ case CHAR_ASTERISK:
repeat_min = 0;
repeat_max = -1;
goto REPEAT;
- case '+':
+ case CHAR_PLUS:
repeat_min = 1;
repeat_max = -1;
goto REPEAT;
- case '?':
+ case CHAR_QUESTION_MARK:
repeat_min = 0;
repeat_max = 1;
@@ -3471,8 +4738,10 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (repeat_min == 0)
{
- firstbyte = zerofirstbyte; /* Adjust for zero repeat */
- reqbyte = zeroreqbyte; /* Ditto */
+ firstchar = zerofirstchar; /* Adjust for zero repeat */
+ firstcharflags = zerofirstcharflags;
+ reqchar = zeroreqchar; /* Ditto */
+ reqcharflags = zeroreqcharflags;
}
/* Remember whether this is a variable length repeat */
@@ -3482,8 +4751,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
op_type = 0; /* Default single-char op codes */
possessive_quantifier = FALSE; /* Default not possessive quantifier */
- /* Save start of previous item, in case we have to move it up to make space
- for an inserted OP_ONCE for the additional '+' extension. */
+ /* Save start of previous item, in case we have to move it up in order to
+ insert something before it. */
tempcode = previous;
@@ -3493,50 +4762,92 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
but if PCRE_UNGREEDY is set, it works the other way round. We change the
repeat type to the non-default. */
- if (ptr[1] == '+')
+ if (ptr[1] == CHAR_PLUS)
{
repeat_type = 0; /* Force greedy */
possessive_quantifier = TRUE;
ptr++;
}
- else if (ptr[1] == '?')
+ else if (ptr[1] == CHAR_QUESTION_MARK)
{
repeat_type = greedy_non_default;
ptr++;
}
else repeat_type = greedy_default;
- /* If previous was a character match, abolish the item and generate a
- repeat item instead. If a char item has a minumum of more than one, ensure
- that it is set in reqbyte - it might not be if a sequence such as x{3} is
- the first thing in a branch because the x will have gone into firstbyte
- instead. */
+ /* If previous was a recursion call, wrap it in atomic brackets so that
+ previous becomes the atomic group. All recursions were so wrapped in the
+ past, but it no longer happens for non-repeated recursions. In fact, the
+ repeated ones could be re-implemented independently so as not to need this,
+ but for the moment we rely on the code for repeating groups. */
- if (*previous == OP_CHAR || *previous == OP_CHARNC)
+ if (*previous == OP_RECURSE)
{
- /* Deal with UTF-8 characters that take up more than one byte. It's
+ memmove(previous + 1 + LINK_SIZE, previous, IN_UCHARS(1 + LINK_SIZE));
+ *previous = OP_ONCE;
+ PUT(previous, 1, 2 + 2*LINK_SIZE);
+ previous[2 + 2*LINK_SIZE] = OP_KET;
+ PUT(previous, 3 + 2*LINK_SIZE, 2 + 2*LINK_SIZE);
+ code += 2 + 2 * LINK_SIZE;
+ length_prevgroup = 3 + 3*LINK_SIZE;
+
+ /* When actually compiling, we need to check whether this was a forward
+ reference, and if so, adjust the offset. */
+
+ if (lengthptr == NULL && cd->hwm >= cd->start_workspace + LINK_SIZE)
+ {
+ int offset = GET(cd->hwm, -LINK_SIZE);
+ if (offset == previous + 1 - cd->start_code)
+ PUT(cd->hwm, -LINK_SIZE, offset + 1 + LINK_SIZE);
+ }
+ }
+
+ /* Now handle repetition for the different types of item. */
+
+ /* If previous was a character or negated character match, abolish the item
+ and generate a repeat item instead. If a char item has a minimum of more
+ than one, ensure that it is set in reqchar - it might not be if a sequence
+ such as x{3} is the first thing in a branch because the x will have gone
+ into firstchar instead. */
+
+ if (*previous == OP_CHAR || *previous == OP_CHARI
+ || *previous == OP_NOT || *previous == OP_NOTI)
+ {
+ switch (*previous)
+ {
+ default: /* Make compiler happy. */
+ case OP_CHAR: op_type = OP_STAR - OP_STAR; break;
+ case OP_CHARI: op_type = OP_STARI - OP_STAR; break;
+ case OP_NOT: op_type = OP_NOTSTAR - OP_STAR; break;
+ case OP_NOTI: op_type = OP_NOTSTARI - OP_STAR; break;
+ }
+
+ /* Deal with UTF characters that take up more than one character. It's
easier to write this out separately than try to macrify it. Use c to
- hold the length of the character in bytes, plus 0x80 to flag that it's a
- length rather than a small character. */
+ hold the length of the character in bytes, plus UTF_LENGTH to flag that
+ it's a length rather than a small character. */
-#ifdef SUPPORT_UTF8
- if (utf8 && (code[-1] & 0x80) != 0)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && NOT_FIRSTCHAR(code[-1]))
{
- uschar *lastchar = code - 1;
- while((*lastchar & 0xc0) == 0x80) lastchar--;
- c = code - lastchar; /* Length of UTF-8 character */
- memcpy(utf8_char, lastchar, c); /* Save the char */
- c |= 0x80; /* Flag c as a length */
+ pcre_uchar *lastchar = code - 1;
+ BACKCHAR(lastchar);
+ c = (int)(code - lastchar); /* Length of UTF-8 character */
+ memcpy(utf_chars, lastchar, IN_UCHARS(c)); /* Save the char */
+ c |= UTF_LENGTH; /* Flag c as a length */
}
else
-#endif
-
- /* Handle the case of a single byte - either with no UTF8 support, or
- with UTF-8 disabled, or for a UTF-8 character < 128. */
+#endif /* SUPPORT_UTF */
+ /* Handle the case of a single charater - either with no UTF support, or
+ with UTF disabled, or for a single character UTF character. */
{
c = code[-1];
- if (repeat_min > 1) reqbyte = c | req_caseopt | cd->req_varyopt;
+ if (*previous <= OP_CHARI && repeat_min > 1)
+ {
+ reqchar = c;
+ reqcharflags = req_caseopt | cd->req_varyopt;
+ }
}
/* If the repetition is unlimited, it pays to see if the next thing on
@@ -3546,8 +4857,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (!possessive_quantifier &&
repeat_max < 0 &&
- check_auto_possessive(*previous, c, utf8, utf8_char, ptr + 1,
- options, cd))
+ check_auto_possessive(previous, utf, ptr + 1, options, cd))
{
repeat_type = 0; /* Force greedy */
possessive_quantifier = TRUE;
@@ -3556,26 +4866,6 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */
}
- /* If previous was a single negated character ([^a] or similar), we use
- one of the special opcodes, replacing it. The code is shared with single-
- character repeats by setting opt_type to add a suitable offset into
- repeat_type. We can also test for auto-possessification. OP_NOT is
- currently used only for single-byte chars. */
-
- else if (*previous == OP_NOT)
- {
- op_type = OP_NOTSTAR - OP_STAR; /* Use "not" opcodes */
- c = previous[1];
- if (!possessive_quantifier &&
- repeat_max < 0 &&
- check_auto_possessive(OP_NOT, c, utf8, NULL, ptr + 1, options, cd))
- {
- repeat_type = 0; /* Force greedy */
- possessive_quantifier = TRUE;
- }
- goto OUTPUT_SINGLE_REPEAT;
- }
-
/* If previous was a character type match (\d or similar), abolish it and
create a suitable repeat item. The code is shared with single-character
repeats by setting op_type to add a suitable offset into repeat_type. Note
@@ -3585,14 +4875,14 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
else if (*previous < OP_EODN)
{
- uschar *oldcode;
+ pcre_uchar *oldcode;
int prop_type, prop_value;
op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */
c = *previous;
if (!possessive_quantifier &&
repeat_max < 0 &&
- check_auto_possessive(c, 0, utf8, NULL, ptr + 1, options, cd))
+ check_auto_possessive(previous, utf, ptr + 1, options, cd))
{
repeat_type = 0; /* Force greedy */
possessive_quantifier = TRUE;
@@ -3614,11 +4904,6 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (repeat_max == 0) goto END_REPEAT;
- /* All real repeats make it impossible to handle partial matching (maybe
- one day we will be able to remove this restriction). */
-
- if (repeat_max != 1) cd->external_flags |= PCRE_NOPARTIAL;
-
/* Combine the op_type with the repeat_type */
repeat_type += op_type;
@@ -3667,14 +4952,14 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
we have to insert the character for the previous code. For a repeated
Unicode property match, there are two extra bytes that define the
required property. In UTF-8 mode, long characters have their length in
- c, with the 0x80 bit as a flag. */
+ c, with the UTF_LENGTH bit as a flag. */
if (repeat_max < 0)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -3696,10 +4981,10 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
else if (repeat_max != repeat_min)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -3726,10 +5011,10 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* The character or character type itself comes last in all cases. */
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 128)
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && (c & UTF_LENGTH) != 0)
{
- memcpy(code, utf8_char, c & 7);
+ memcpy(code, utf_chars, IN_UCHARS(c & 7));
code += c & 7;
}
else
@@ -3753,10 +5038,11 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
else if (*previous == OP_CLASS ||
*previous == OP_NCLASS ||
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
*previous == OP_XCLASS ||
#endif
- *previous == OP_REF)
+ *previous == OP_REF ||
+ *previous == OP_REFI)
{
if (repeat_max == 0)
{
@@ -3764,11 +5050,6 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
goto END_REPEAT;
}
- /* All real repeats make it impossible to handle partial matching (maybe
- one day we will be able to remove this restriction). */
-
- if (repeat_max != 1) cd->external_flags |= PCRE_NOPARTIAL;
-
if (repeat_min == 0 && repeat_max == -1)
*code++ = OP_CRSTAR + repeat_type;
else if (repeat_min == 1 && repeat_max == -1)
@@ -3785,35 +5066,35 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
/* If previous was a bracket group, we may have to replicate it in certain
- cases. */
-
- else if (*previous == OP_BRA || *previous == OP_CBRA ||
- *previous == OP_ONCE || *previous == OP_COND)
+ cases. Note that at this point we can encounter only the "basic" bracket
+ opcodes such as BRA and CBRA, as this is the place where they get converted
+ into the more special varieties such as BRAPOS and SBRA. A test for >=
+ OP_ASSERT and <= OP_COND includes ASSERT, ASSERT_NOT, ASSERTBACK,
+ ASSERTBACK_NOT, ONCE, BRA, CBRA, and COND. Originally, PCRE did not allow
+ repetition of assertions, but now it does, for Perl compatibility. */
+
+ else if (*previous >= OP_ASSERT && *previous <= OP_COND)
{
register int i;
- int ketoffset = 0;
- int len = code - previous;
- uschar *bralink = NULL;
+ int len = (int)(code - previous);
+ pcre_uchar *bralink = NULL;
+ pcre_uchar *brazeroptr = NULL;
- /* Repeating a DEFINE group is pointless */
+ /* Repeating a DEFINE group is pointless, but Perl allows the syntax, so
+ we just ignore the repeat. */
if (*previous == OP_COND && previous[LINK_SIZE+1] == OP_DEF)
- {
- *errorcodeptr = ERR55;
- goto FAILED;
- }
+ goto END_REPEAT;
- /* If the maximum repeat count is unlimited, find the end of the bracket
- by scanning through from the start, and compute the offset back to it
- from the current code pointer. There may be an OP_OPT setting following
- the final KET, so we can't find the end just by going back from the code
- pointer. */
+ /* There is no sense in actually repeating assertions. The only potential
+ use of repetition is in cases when the assertion is optional. Therefore,
+ if the minimum is greater than zero, just ignore the repeat. If the
+ maximum is not not zero or one, set it to 1. */
- if (repeat_max == -1)
+ if (*previous < OP_ONCE) /* Assertion */
{
- register uschar *ket = previous;
- do ket += GET(ket, 1); while (*ket != OP_KET);
- ketoffset = code - ket;
+ if (repeat_min > 0) goto END_REPEAT;
+ if (repeat_max < 0 || repeat_max > 1) repeat_max = 1;
}
/* The case of a zero minimum is special because of the need to stick
@@ -3825,28 +5106,40 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (repeat_min == 0)
{
- /* If the maximum is also zero, we just omit the group from the output
- altogether. */
-
- if (repeat_max == 0)
- {
- code = previous;
- goto END_REPEAT;
- }
-
- /* If the maximum is 1 or unlimited, we just have to stick in the
- BRAZERO and do no more at this point. However, we do need to adjust
- any OP_RECURSE calls inside the group that refer to the group itself or
- any internal or forward referenced group, because the offset is from
- the start of the whole regex. Temporarily terminate the pattern while
- doing this. */
-
- if (repeat_max <= 1)
+ /* If the maximum is also zero, we used to just omit the group from the
+ output altogether, like this:
+
+ ** if (repeat_max == 0)
+ ** {
+ ** code = previous;
+ ** goto END_REPEAT;
+ ** }
+
+ However, that fails when a group or a subgroup within it is referenced
+ as a subroutine from elsewhere in the pattern, so now we stick in
+ OP_SKIPZERO in front of it so that it is skipped on execution. As we
+ don't have a list of which groups are referenced, we cannot do this
+ selectively.
+
+ If the maximum is 1 or unlimited, we just have to stick in the BRAZERO
+ and do no more at this point. However, we do need to adjust any
+ OP_RECURSE calls inside the group that refer to the group itself or any
+ internal or forward referenced group, because the offset is from the
+ start of the whole regex. Temporarily terminate the pattern while doing
+ this. */
+
+ if (repeat_max <= 1) /* Covers 0, 1, and unlimited */
{
*code = OP_END;
- adjust_recurse(previous, 1, utf8, cd, save_hwm);
- memmove(previous+1, previous, len);
+ adjust_recurse(previous, 1, utf, cd, save_hwm);
+ memmove(previous + 1, previous, IN_UCHARS(len));
code++;
+ if (repeat_max == 0)
+ {
+ *previous++ = OP_SKIPZERO;
+ goto END_REPEAT;
+ }
+ brazeroptr = previous; /* Save for possessive optimizing */
*previous++ = OP_BRAZERO + repeat_type;
}
@@ -3862,8 +5155,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
{
int offset;
*code = OP_END;
- adjust_recurse(previous, 2 + LINK_SIZE, utf8, cd, save_hwm);
- memmove(previous + 2 + LINK_SIZE, previous, len);
+ adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(previous + 2 + LINK_SIZE, previous, IN_UCHARS(len));
code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
*previous++ = OP_BRA;
@@ -3871,7 +5164,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* We chain together the bracket offset fields that have to be
filled in later when the ends of the brackets are reached. */
- offset = (bralink == NULL)? 0 : previous - bralink;
+ offset = (bralink == NULL)? 0 : (int)(previous - bralink);
bralink = previous;
PUTINC(previous, 0, offset);
}
@@ -3892,13 +5185,15 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
{
/* In the pre-compile phase, we don't actually do the replication. We
just adjust the length as if we had. Do some paranoid checks for
- potential integer overflow. */
+ potential integer overflow. The INT64_OR_DOUBLE type is a 64-bit
+ integer type when available, otherwise double. */
if (lengthptr != NULL)
{
int delta = (repeat_min - 1)*length_prevgroup;
- if ((double)(repeat_min - 1)*(double)length_prevgroup >
- (double)INT_MAX ||
+ if ((INT64_OR_DOUBLE)(repeat_min - 1)*
+ (INT64_OR_DOUBLE)length_prevgroup >
+ (INT64_OR_DOUBLE)INT_MAX ||
OFLOW_MAX - *lengthptr < delta)
{
*errorcodeptr = ERR20;
@@ -3907,16 +5202,36 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
*lengthptr += delta;
}
- /* This is compiling for real */
+ /* This is compiling for real. If there is a set first byte for
+ the group, and we have not yet set a "required byte", set it. Make
+ sure there is enough workspace for copying forward references before
+ doing the copy. */
else
{
- if (groupsetfirstbyte && reqbyte < 0) reqbyte = firstbyte;
+ if (groupsetfirstchar && reqcharflags < 0)
+ {
+ reqchar = firstchar;
+ reqcharflags = firstcharflags;
+ }
+
for (i = 1; i < repeat_min; i++)
{
- uschar *hc;
- uschar *this_hwm = cd->hwm;
- memcpy(code, previous, len);
+ pcre_uchar *hc;
+ pcre_uchar *this_hwm = cd->hwm;
+ memcpy(code, previous, IN_UCHARS(len));
+
+ while (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
+ {
+ int save_offset = save_hwm - cd->start_workspace;
+ int this_offset = this_hwm - cd->start_workspace;
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
+ this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
+ }
+
for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
{
PUT(cd->hwm, 0, GET(hc, 0) + len);
@@ -3944,15 +5259,16 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
just adjust the length as if we had. For each repetition we must add 1
to the length for BRAZERO and for all but the last repetition we must
add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some
- paranoid checks to avoid integer overflow. */
+ paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is
+ a 64-bit integer type when available, otherwise double. */
if (lengthptr != NULL && repeat_max > 0)
{
int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) -
2 - 2*LINK_SIZE; /* Last one doesn't nest */
- if ((double)repeat_max *
- (double)(length_prevgroup + 1 + 2 + 2*LINK_SIZE)
- > (double)INT_MAX ||
+ if ((INT64_OR_DOUBLE)repeat_max *
+ (INT64_OR_DOUBLE)(length_prevgroup + 1 + 2 + 2*LINK_SIZE)
+ > (INT64_OR_DOUBLE)INT_MAX ||
OFLOW_MAX - *lengthptr < delta)
{
*errorcodeptr = ERR20;
@@ -3965,8 +5281,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
else for (i = repeat_max - 1; i >= 0; i--)
{
- uschar *hc;
- uschar *this_hwm = cd->hwm;
+ pcre_uchar *hc;
+ pcre_uchar *this_hwm = cd->hwm;
*code++ = OP_BRAZERO + repeat_type;
@@ -3977,12 +5293,27 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
{
int offset;
*code++ = OP_BRA;
- offset = (bralink == NULL)? 0 : code - bralink;
+ offset = (bralink == NULL)? 0 : (int)(code - bralink);
bralink = code;
PUTINC(code, 0, offset);
}
- memcpy(code, previous, len);
+ memcpy(code, previous, IN_UCHARS(len));
+
+ /* Ensure there is enough workspace for forward references before
+ copying them. */
+
+ while (cd->hwm > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
+ {
+ int save_offset = save_hwm - cd->start_workspace;
+ int this_offset = this_hwm - cd->start_workspace;
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
+ this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
+ }
+
for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
{
PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));
@@ -3998,8 +5329,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
while (bralink != NULL)
{
int oldlinkoffset;
- int offset = code - bralink + 1;
- uschar *bra = code - offset;
+ int offset = (int)(code - bralink + 1);
+ pcre_uchar *bra = code - offset;
oldlinkoffset = GET(bra, 1);
bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;
*code++ = OP_KET;
@@ -4008,39 +5339,121 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
}
- /* If the maximum is unlimited, set a repeater in the final copy. We
- can't just offset backwards from the current code point, because we
- don't know if there's been an options resetting after the ket. The
- correct offset was computed above.
+ /* If the maximum is unlimited, set a repeater in the final copy. For
+ ONCE brackets, that's all we need to do. However, possessively repeated
+ ONCE brackets can be converted into non-capturing brackets, as the
+ behaviour of (?:xx)++ is the same as (?>xx)++ and this saves having to
+ deal with possessive ONCEs specially.
- Then, when we are doing the actual compile phase, check to see whether
- this group is a non-atomic one that could match an empty string. If so,
+ Otherwise, when we are doing the actual compile phase, check to see
+ whether this group is one that could match an empty string. If so,
convert the initial operator to the S form (e.g. OP_BRA -> OP_SBRA) so
- that runtime checking can be done. [This check is also applied to
- atomic groups at runtime, but in a different way.] */
+ that runtime checking can be done. [This check is also applied to ONCE
+ groups at runtime, but in a different way.]
+
+ Then, if the quantifier was possessive and the bracket is not a
+ conditional, we convert the BRA code to the POS form, and the KET code to
+ KETRPOS. (It turns out to be convenient at runtime to detect this kind of
+ subpattern at both the start and at the end.) The use of special opcodes
+ makes it possible to reduce greatly the stack usage in pcre_exec(). If
+ the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO.
+
+ Then, if the minimum number of matches is 1 or 0, cancel the possessive
+ flag so that the default action below, of wrapping everything inside
+ atomic brackets, does not happen. When the minimum is greater than 1,
+ there will be earlier copies of the group, and so we still have to wrap
+ the whole thing. */
else
{
- uschar *ketcode = code - ketoffset;
- uschar *bracode = ketcode - GET(ketcode, 1);
- *ketcode = OP_KETRMAX + repeat_type;
- if (lengthptr == NULL && *bracode != OP_ONCE)
+ pcre_uchar *ketcode = code - 1 - LINK_SIZE;
+ pcre_uchar *bracode = ketcode - GET(ketcode, 1);
+
+ /* Convert possessive ONCE brackets to non-capturing */
+
+ if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&
+ possessive_quantifier) *bracode = OP_BRA;
+
+ /* For non-possessive ONCE brackets, all we need to do is to
+ set the KET. */
+
+ if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)
+ *ketcode = OP_KETRMAX + repeat_type;
+
+ /* Handle non-ONCE brackets and possessive ONCEs (which have been
+ converted to non-capturing above). */
+
+ else
{
- uschar *scode = bracode;
- do
+ /* In the compile phase, check for empty string matching. */
+
+ if (lengthptr == NULL)
{
- if (could_be_empty_branch(scode, ketcode, utf8))
+ pcre_uchar *scode = bracode;
+ do
{
- *bracode += OP_SBRA - OP_BRA;
- break;
+ if (could_be_empty_branch(scode, ketcode, utf, cd))
+ {
+ *bracode += OP_SBRA - OP_BRA;
+ break;
+ }
+ scode += GET(scode, 1);
}
- scode += GET(scode, 1);
+ while (*scode == OP_ALT);
}
- while (*scode == OP_ALT);
+
+ /* Handle possessive quantifiers. */
+
+ if (possessive_quantifier)
+ {
+ /* For COND brackets, we wrap the whole thing in a possessively
+ repeated non-capturing bracket, because we have not invented POS
+ versions of the COND opcodes. Because we are moving code along, we
+ must ensure that any pending recursive references are updated. */
+
+ if (*bracode == OP_COND || *bracode == OP_SCOND)
+ {
+ int nlen = (int)(code - bracode);
+ *code = OP_END;
+ adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(bracode + 1 + LINK_SIZE, bracode, IN_UCHARS(nlen));
+ code += 1 + LINK_SIZE;
+ nlen += 1 + LINK_SIZE;
+ *bracode = OP_BRAPOS;
+ *code++ = OP_KETRPOS;
+ PUTINC(code, 0, nlen);
+ PUT(bracode, 1, nlen);
+ }
+
+ /* For non-COND brackets, we modify the BRA code and use KETRPOS. */
+
+ else
+ {
+ *bracode += 1; /* Switch to xxxPOS opcodes */
+ *ketcode = OP_KETRPOS;
+ }
+
+ /* If the minimum is zero, mark it as possessive, then unset the
+ possessive flag when the minimum is 0 or 1. */
+
+ if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO;
+ if (repeat_min < 2) possessive_quantifier = FALSE;
+ }
+
+ /* Non-possessive quantifier */
+
+ else *ketcode = OP_KETRMAX + repeat_type;
}
}
}
+ /* If previous is OP_FAIL, it was generated by an empty class [] in
+ JavaScript mode. The other ways in which OP_FAIL can be generated, that is
+ by (*FAIL) or (?!) set previous to NULL, which gives a "nothing to repeat"
+ error above. We can just ignore the repeat in JS case. */
+
+ else if (*previous == OP_FAIL) goto END_REPEAT;
+
/* Else there's some kind of shambles */
else
@@ -4050,13 +5463,18 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
/* If the character following a repeat is '+', or if certain optimization
- tests above succeeded, possessive_quantifier is TRUE. For some of the
- simpler opcodes, there is an special alternative opcode for this. For
- anything else, we wrap the entire repeated item inside OP_ONCE brackets.
- The '+' notation is just syntactic sugar, taken from Sun's Java package,
- but the special opcodes can optimize it a bit. The repeated item starts at
- tempcode, not at previous, which might be the first part of a string whose
- (former) last char we repeated.
+ tests above succeeded, possessive_quantifier is TRUE. For some opcodes,
+ there are special alternative opcodes for this case. For anything else, we
+ wrap the entire repeated item inside OP_ONCE brackets. Logically, the '+'
+ notation is just syntactic sugar, taken from Sun's Java package, but the
+ special opcodes can optimize it.
+
+ Some (but not all) possessively repeated subpatterns have already been
+ completely handled in the code just above. For them, possessive_quantifier
+ is always FALSE at this stage.
+
+ Note that the repeated item starts at tempcode, not at previous, which
+ might be the first part of a string whose (former) last char we repeated.
Possessifying an 'exact' quantifier has no effect, so we can ignore it. But
an 'upto' may follow. We skip over an 'exact' item, and then test the
@@ -4065,12 +5483,22 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (possessive_quantifier)
{
int len;
- if (*tempcode == OP_EXACT || *tempcode == OP_TYPEEXACT ||
- *tempcode == OP_NOTEXACT)
- tempcode += _erts_pcre_OP_lengths[*tempcode] +
- ((*tempcode == OP_TYPEEXACT &&
- (tempcode[3] == OP_PROP || tempcode[3] == OP_NOTPROP))? 2:0);
- len = code - tempcode;
+
+ if (*tempcode == OP_TYPEEXACT)
+ tempcode += PRIV(OP_lengths)[*tempcode] +
+ ((tempcode[1 + IMM2_SIZE] == OP_PROP
+ || tempcode[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
+
+ else if (*tempcode == OP_EXACT || *tempcode == OP_NOTEXACT)
+ {
+ tempcode += PRIV(OP_lengths)[*tempcode];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(tempcode[-1]))
+ tempcode += GET_EXTRALEN(tempcode[-1]);
+#endif
+ }
+
+ len = (int)(code - tempcode);
if (len > 0) switch (*tempcode)
{
case OP_STAR: *tempcode = OP_POSSTAR; break;
@@ -4078,18 +5506,33 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
case OP_QUERY: *tempcode = OP_POSQUERY; break;
case OP_UPTO: *tempcode = OP_POSUPTO; break;
- case OP_TYPESTAR: *tempcode = OP_TYPEPOSSTAR; break;
- case OP_TYPEPLUS: *tempcode = OP_TYPEPOSPLUS; break;
- case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break;
- case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break;
+ case OP_STARI: *tempcode = OP_POSSTARI; break;
+ case OP_PLUSI: *tempcode = OP_POSPLUSI; break;
+ case OP_QUERYI: *tempcode = OP_POSQUERYI; break;
+ case OP_UPTOI: *tempcode = OP_POSUPTOI; break;
case OP_NOTSTAR: *tempcode = OP_NOTPOSSTAR; break;
case OP_NOTPLUS: *tempcode = OP_NOTPOSPLUS; break;
case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break;
case OP_NOTUPTO: *tempcode = OP_NOTPOSUPTO; break;
+ case OP_NOTSTARI: *tempcode = OP_NOTPOSSTARI; break;
+ case OP_NOTPLUSI: *tempcode = OP_NOTPOSPLUSI; break;
+ case OP_NOTQUERYI: *tempcode = OP_NOTPOSQUERYI; break;
+ case OP_NOTUPTOI: *tempcode = OP_NOTPOSUPTOI; break;
+
+ case OP_TYPESTAR: *tempcode = OP_TYPEPOSSTAR; break;
+ case OP_TYPEPLUS: *tempcode = OP_TYPEPOSPLUS; break;
+ case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break;
+ case OP_TYPEUPTO: *tempcode = OP_TYPEPOSUPTO; break;
+
+ /* Because we are moving code along, we must ensure that any
+ pending recursive references are updated. */
+
default:
- memmove(tempcode + 1+LINK_SIZE, tempcode, len);
+ *code = OP_END;
+ adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm);
+ memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
tempcode[0] = OP_ONCE;
@@ -4101,7 +5544,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
/* In all case we no longer have a previous item. We also set the
- "follows varying string" flag for subsequently encountered reqbytes if
+ "follows varying string" flag for subsequently encountered reqchars if
it isn't already set and we have just passed a varying length item. */
END_REPEAT:
@@ -4115,7 +5558,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
lookbehind or option setting or condition or all the other extended
parenthesis forms. */
- case '(':
+ case CHAR_LEFT_PARENTHESIS:
newoptions = options;
skipbytes = 0;
bravalue = OP_CBRA;
@@ -4124,56 +5567,143 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* First deal with various "verbs" that can be introduced by '*'. */
- if (*(++ptr) == '*' && (cd->ctypes[ptr[1]] & ctype_letter) != 0)
+ ptr++;
+ if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
+ || (MAX_255(ptr[1]) && ((cd->ctypes[ptr[1]] & ctype_letter) != 0))))
{
int i, namelen;
+ int arglen = 0;
const char *vn = verbnames;
- const uschar *name = ++ptr;
+ const pcre_uchar *name = ptr + 1;
+ const pcre_uchar *arg = NULL;
previous = NULL;
- while ((cd->ctypes[*++ptr] & ctype_letter) != 0);
- if (*ptr == ':')
+ ptr++;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
+ namelen = (int)(ptr - name);
+
+ /* It appears that Perl allows any characters whatsoever, other than
+ a closing parenthesis, to appear in arguments, so we no longer insist on
+ letters, digits, and underscores. */
+
+ if (*ptr == CHAR_COLON)
{
- *errorcodeptr = ERR59; /* Not supported */
- goto FAILED;
+ arg = ++ptr;
+ while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ arglen = (int)(ptr - arg);
+ if ((unsigned int)arglen > MAX_MARK)
+ {
+ *errorcodeptr = ERR75;
+ goto FAILED;
+ }
}
- if (*ptr != ')')
+
+ if (*ptr != CHAR_RIGHT_PARENTHESIS)
{
*errorcodeptr = ERR60;
goto FAILED;
}
- namelen = ptr - name;
+
+ /* Scan the table of verb names */
+
for (i = 0; i < verbcount; i++)
{
if (namelen == verbs[i].len &&
- strncmp((char *)name, vn, namelen) == 0)
+ STRNCMP_UC_C8(name, vn, namelen) == 0)
{
- *code = verbs[i].op;
- if (*code++ == OP_ACCEPT) cd->had_accept = TRUE;
- break;
+ int setverb;
+
+ /* Check for open captures before ACCEPT and convert it to
+ ASSERT_ACCEPT if in an assertion. */
+
+ if (verbs[i].op == OP_ACCEPT)
+ {
+ open_capitem *oc;
+ if (arglen != 0)
+ {
+ *errorcodeptr = ERR59;
+ goto FAILED;
+ }
+ cd->had_accept = TRUE;
+ for (oc = cd->open_caps; oc != NULL; oc = oc->next)
+ {
+ *code++ = OP_CLOSE;
+ PUT2INC(code, 0, oc->number);
+ }
+ setverb = *code++ =
+ (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
+
+ /* Do not set firstchar after *ACCEPT */
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ }
+
+ /* Handle other cases with/without an argument */
+
+ else if (arglen == 0)
+ {
+ if (verbs[i].op < 0) /* Argument is mandatory */
+ {
+ *errorcodeptr = ERR66;
+ goto FAILED;
+ }
+ setverb = *code++ = verbs[i].op;
+ }
+
+ else
+ {
+ if (verbs[i].op_arg < 0) /* Argument is forbidden */
+ {
+ *errorcodeptr = ERR59;
+ goto FAILED;
+ }
+ setverb = *code++ = verbs[i].op_arg;
+ *code++ = arglen;
+ memcpy(code, arg, IN_UCHARS(arglen));
+ code += arglen;
+ *code++ = 0;
+ }
+
+ switch (setverb)
+ {
+ case OP_THEN:
+ case OP_THEN_ARG:
+ cd->external_flags |= PCRE_HASTHEN;
+ break;
+
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ cd->had_pruneorskip = TRUE;
+ break;
+ }
+
+ break; /* Found verb, exit loop */
}
+
vn += verbs[i].len + 1;
}
- if (i < verbcount) continue;
- *errorcodeptr = ERR60;
+
+ if (i < verbcount) continue; /* Successfully handled a verb */
+ *errorcodeptr = ERR60; /* Verb not recognized */
goto FAILED;
}
/* Deal with the extended parentheses; all are introduced by '?', and the
appearance of any of them means that this is not a capturing group. */
- else if (*ptr == '?')
+ else if (*ptr == CHAR_QUESTION_MARK)
{
int i, set, unset, namelen;
int *optset;
- const uschar *name;
- uschar *slot;
+ const pcre_uchar *name;
+ pcre_uchar *slot;
switch (*(++ptr))
{
- case '#': /* Comment; skip to ket */
+ case CHAR_NUMBER_SIGN: /* Comment; skip to ket */
ptr++;
- while (*ptr != 0 && *ptr != ')') ptr++;
- if (*ptr == 0)
+ while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ if (*ptr == CHAR_NULL)
{
*errorcodeptr = ERR18;
goto FAILED;
@@ -4182,20 +5712,21 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
- case '|': /* Reset capture count for each branch */
+ case CHAR_VERTICAL_LINE: /* Reset capture count for each branch */
reset_bracount = TRUE;
/* Fall through */
/* ------------------------------------------------------------ */
- case ':': /* Non-capturing bracket */
+ case CHAR_COLON: /* Non-capturing bracket */
bravalue = OP_BRA;
ptr++;
break;
/* ------------------------------------------------------------ */
- case '(':
+ case CHAR_LEFT_PARENTHESIS:
bravalue = OP_COND; /* Conditional group */
+ tempptr = ptr;
/* A condition can be an assertion, a number (referring to a numbered
group), a name (referring to a named group), or 'R', referring to
@@ -4208,25 +5739,40 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
be the recursive thing or the name 'R' (and similarly for 'R' followed
by digits), and (b) a number could be a name that consists of digits.
In both cases, we look for a name first; if not found, we try the other
- cases. */
+ cases.
+
+ For compatibility with auto-callouts, we allow a callout to be
+ specified before a condition that is an assertion. First, check for the
+ syntax of a callout; if found, adjust the temporary pointer that is
+ used to check for an assertion condition. That's all that is needed! */
+
+ if (ptr[1] == CHAR_QUESTION_MARK && ptr[2] == CHAR_C)
+ {
+ for (i = 3;; i++) if (!IS_DIGIT(ptr[i])) break;
+ if (ptr[i] == CHAR_RIGHT_PARENTHESIS)
+ tempptr += i + 1;
+ }
/* For conditions that are assertions, check the syntax, and then exit
the switch. This will take control down to where bracketed groups,
including assertions, are processed. */
- if (ptr[1] == '?' && (ptr[2] == '=' || ptr[2] == '!' || ptr[2] == '<'))
+ if (tempptr[1] == CHAR_QUESTION_MARK &&
+ (tempptr[2] == CHAR_EQUALS_SIGN ||
+ tempptr[2] == CHAR_EXCLAMATION_MARK ||
+ tempptr[2] == CHAR_LESS_THAN_SIGN))
break;
/* Most other conditions use OP_CREF (a couple change to OP_RREF
- below), and all need to skip 3 bytes at the start of the group. */
+ below), and all need to skip 1+IMM2_SIZE bytes at the start of the group. */
code[1+LINK_SIZE] = OP_CREF;
- skipbytes = 3;
+ skipbytes = 1+IMM2_SIZE;
refsign = -1;
/* Check for a test for recursion in a named group. */
- if (ptr[1] == 'R' && ptr[2] == '&')
+ if (ptr[1] == CHAR_R && ptr[2] == CHAR_AMPERSAND)
{
terminator = -1;
ptr += 2;
@@ -4236,25 +5782,25 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Check for a test for a named group's having been set, using the Perl
syntax (?(<name>) or (?('name') */
- else if (ptr[1] == '<')
+ else if (ptr[1] == CHAR_LESS_THAN_SIGN)
{
- terminator = '>';
+ terminator = CHAR_GREATER_THAN_SIGN;
ptr++;
}
- else if (ptr[1] == '\'')
+ else if (ptr[1] == CHAR_APOSTROPHE)
{
- terminator = '\'';
+ terminator = CHAR_APOSTROPHE;
ptr++;
}
else
{
- terminator = 0;
- if (ptr[1] == '-' || ptr[1] == '+') refsign = *(++ptr);
+ terminator = CHAR_NULL;
+ if (ptr[1] == CHAR_MINUS || ptr[1] == CHAR_PLUS) refsign = *(++ptr);
}
/* We now expect to read a name; any thing else is an error */
- if ((cd->ctypes[ptr[1]] & ctype_word) == 0)
+ if (!MAX_255(ptr[1]) || (cd->ctypes[ptr[1]] & ctype_word) == 0)
{
ptr += 1; /* To get the right offset */
*errorcodeptr = ERR28;
@@ -4265,16 +5811,16 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
recno = 0;
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0)
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0)
{
if (recno >= 0)
- recno = ((digitab[*ptr] & ctype_digit) != 0)?
- recno * 10 + *ptr - '0' : -1;
+ recno = (IS_DIGIT(*ptr))? recno * 10 + (int)(*ptr - CHAR_0) : -1;
ptr++;
}
- namelen = ptr - name;
+ namelen = (int)(ptr - name);
- if ((terminator > 0 && *ptr++ != terminator) || *ptr++ != ')')
+ if ((terminator > 0 && *ptr++ != (pcre_uchar)terminator) ||
+ *ptr++ != CHAR_RIGHT_PARENTHESIS)
{
ptr--; /* Error offset */
*errorcodeptr = ERR26;
@@ -4296,7 +5842,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
*errorcodeptr = ERR58;
goto FAILED;
}
- recno = (refsign == '-')?
+ recno = (refsign == CHAR_MINUS)?
cd->bracount - recno + 1 : recno +cd->bracount;
if (recno <= 0 || recno > cd->final_bracount)
{
@@ -4308,12 +5854,15 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
/* Otherwise (did not start with "+" or "-"), start by looking for the
- name. */
+ name. If we find a name, add one to the opcode to change OP_CREF or
+ OP_RREF into OP_NCREF or OP_NRREF. These behave exactly the same,
+ except they record that the reference was originally to a name. The
+ information is used to check duplicate names. */
slot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
- if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break;
+ if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0) break;
slot += cd->name_entry_size;
}
@@ -4323,23 +5872,25 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
{
recno = GET2(slot, 0);
PUT2(code, 2+LINK_SIZE, recno);
+ code[1+LINK_SIZE]++;
}
/* Search the pattern for a forward reference */
- else if ((i = find_parens(ptr, cd->bracount, name, namelen,
- (options & PCRE_EXTENDED) != 0)) > 0)
+ else if ((i = find_parens(cd, name, namelen,
+ (options & PCRE_EXTENDED) != 0, utf)) > 0)
{
PUT2(code, 2+LINK_SIZE, i);
+ code[1+LINK_SIZE]++;
}
- /* If terminator == 0 it means that the name followed directly after
- the opening parenthesis [e.g. (?(abc)...] and in this case there are
- some further alternatives to try. For the cases where terminator != 0
- [things like (?(<name>... or (?('name')... or (?(R&name)... ] we have
+ /* If terminator == CHAR_NULL it means that the name followed directly
+ after the opening parenthesis [e.g. (?(abc)...] and in this case there
+ are some further alternatives to try. For the cases where terminator !=
+ 0 [things like (?(<name>... or (?('name')... or (?(R&name)... ] we have
now checked all the possibilities, so give an error. */
- else if (terminator != 0)
+ else if (terminator != CHAR_NULL)
{
*errorcodeptr = ERR15;
goto FAILED;
@@ -4348,17 +5899,17 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Check for (?(R) for recursion. Allow digits after R to specify a
specific group number. */
- else if (*name == 'R')
+ else if (*name == CHAR_R)
{
recno = 0;
for (i = 1; i < namelen; i++)
{
- if ((digitab[name[i]] & ctype_digit) == 0)
+ if (!IS_DIGIT(name[i]))
{
*errorcodeptr = ERR15;
goto FAILED;
}
- recno = recno * 10 + name[i] - '0';
+ recno = recno * 10 + name[i] - CHAR_0;
}
if (recno == 0) recno = RREF_ANY;
code[1+LINK_SIZE] = OP_RREF; /* Change test type */
@@ -4368,7 +5919,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Similarly, check for the (?(DEFINE) "condition", which is always
false. */
- else if (namelen == 6 && strncmp((char *)name, "DEFINE", 6) == 0)
+ else if (namelen == 6 && STRNCMP_UC_C8(name, STRING_DEFINE, 6) == 0)
{
code[1+LINK_SIZE] = OP_DEF;
skipbytes = 1;
@@ -4393,41 +5944,46 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
- case '=': /* Positive lookahead */
+ case CHAR_EQUALS_SIGN: /* Positive lookahead */
bravalue = OP_ASSERT;
+ cd->assert_depth += 1;
ptr++;
break;
/* ------------------------------------------------------------ */
- case '!': /* Negative lookahead */
+ case CHAR_EXCLAMATION_MARK: /* Negative lookahead */
ptr++;
- if (*ptr == ')') /* Optimize (?!) */
+ if (*ptr == CHAR_RIGHT_PARENTHESIS) /* Optimize (?!) */
{
*code++ = OP_FAIL;
previous = NULL;
continue;
}
bravalue = OP_ASSERT_NOT;
+ cd->assert_depth += 1;
break;
/* ------------------------------------------------------------ */
- case '<': /* Lookbehind or named define */
+ case CHAR_LESS_THAN_SIGN: /* Lookbehind or named define */
switch (ptr[1])
{
- case '=': /* Positive lookbehind */
+ case CHAR_EQUALS_SIGN: /* Positive lookbehind */
bravalue = OP_ASSERTBACK;
+ cd->assert_depth += 1;
ptr += 2;
break;
- case '!': /* Negative lookbehind */
+ case CHAR_EXCLAMATION_MARK: /* Negative lookbehind */
bravalue = OP_ASSERTBACK_NOT;
+ cd->assert_depth += 1;
ptr += 2;
break;
default: /* Could be name define, else bad */
- if ((cd->ctypes[ptr[1]] & ctype_word) != 0) goto DEFINE_NAME;
+ if (MAX_255(ptr[1]) && (cd->ctypes[ptr[1]] & ctype_word) != 0)
+ goto DEFINE_NAME;
ptr++; /* Correct offset for error */
*errorcodeptr = ERR24;
goto FAILED;
@@ -4436,22 +5992,23 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
- case '>': /* One-time brackets */
+ case CHAR_GREATER_THAN_SIGN: /* One-time brackets */
bravalue = OP_ONCE;
ptr++;
break;
/* ------------------------------------------------------------ */
- case 'C': /* Callout - may be followed by digits; */
- previous_callout = code; /* Save for later completion */
- after_manual_callout = 1; /* Skip one item before completing */
+ case CHAR_C: /* Callout - may be followed by digits; */
+ previous_callout = code; /* Save for later completion */
+ after_manual_callout = 1; /* Skip one item before completing */
*code++ = OP_CALLOUT;
{
int n = 0;
- while ((digitab[*(++ptr)] & ctype_digit) != 0)
- n = n * 10 + *ptr - '0';
- if (*ptr != ')')
+ ptr++;
+ while(IS_DIGIT(*ptr))
+ n = n * 10 + *ptr++ - CHAR_0;
+ if (*ptr != CHAR_RIGHT_PARENTHESIS)
{
*errorcodeptr = ERR39;
goto FAILED;
@@ -4462,8 +6019,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
goto FAILED;
}
*code++ = n;
- PUT(code, 0, ptr - cd->start_pattern + 1); /* Pattern offset */
- PUT(code, LINK_SIZE, 0); /* Default length */
+ PUT(code, 0, (int)(ptr - cd->start_pattern + 1)); /* Pattern offset */
+ PUT(code, LINK_SIZE, 0); /* Default length */
code += 2 * LINK_SIZE;
}
previous = NULL;
@@ -4471,14 +6028,15 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
- case 'P': /* Python-style named subpattern handling */
- if (*(++ptr) == '=' || *ptr == '>') /* Reference or recursion */
+ case CHAR_P: /* Python-style named subpattern handling */
+ if (*(++ptr) == CHAR_EQUALS_SIGN ||
+ *ptr == CHAR_GREATER_THAN_SIGN) /* Reference or recursion */
{
- is_recurse = *ptr == '>';
- terminator = ')';
+ is_recurse = *ptr == CHAR_GREATER_THAN_SIGN;
+ terminator = CHAR_RIGHT_PARENTHESIS;
goto NAMED_REF_OR_RECURSE;
}
- else if (*ptr != '<') /* Test for Python-style definition */
+ else if (*ptr != CHAR_LESS_THAN_SIGN) /* Test for Python-style defn */
{
*errorcodeptr = ERR41;
goto FAILED;
@@ -4488,19 +6046,20 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
DEFINE_NAME: /* Come here from (?< handling */
- case '\'':
+ case CHAR_APOSTROPHE:
{
- terminator = (*ptr == '<')? '>' : '\'';
+ terminator = (*ptr == CHAR_LESS_THAN_SIGN)?
+ CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
- namelen = ptr - name;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
+ namelen = (int)(ptr - name);
/* In the pre-compile phase, just do a syntax check. */
if (lengthptr != NULL)
{
- if (*ptr != terminator)
+ if (*ptr != (pcre_uchar)terminator)
{
*errorcodeptr = ERR42;
goto FAILED;
@@ -4510,9 +6069,9 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
*errorcodeptr = ERR49;
goto FAILED;
}
- if (namelen + 3 > cd->name_entry_size)
+ if (namelen + IMM2_SIZE + 1 > cd->name_entry_size)
{
- cd->name_entry_size = namelen + 3;
+ cd->name_entry_size = namelen + IMM2_SIZE + 1;
if (namelen > MAX_NAME_SIZE)
{
*errorcodeptr = ERR48;
@@ -4521,51 +6080,97 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
}
- /* In the real compile, create the entry in the table */
+ /* In the real compile, create the entry in the table, maintaining
+ alphabetical order. Duplicate names for different numbers are
+ permitted only if PCRE_DUPNAMES is set. Duplicate names for the same
+ number are always OK. (An existing number can be re-used if (?|
+ appears in the pattern.) In either event, a duplicate name results in
+ a duplicate entry in the table, even if the number is the same. This
+ is because the number of names, and hence the table size, is computed
+ in the pre-compile, and it affects various numbers and pointers which
+ would all have to be modified, and the compiled code moved down, if
+ duplicates with the same number were omitted from the table. This
+ doesn't seem worth the hassle. However, *different* names for the
+ same number are not permitted. */
else
{
+ BOOL dupname = FALSE;
slot = cd->name_table;
+
for (i = 0; i < cd->names_found; i++)
{
- int crc = memcmp(name, slot+2, namelen);
+ int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(namelen));
if (crc == 0)
{
- if (slot[2+namelen] == 0)
+ if (slot[IMM2_SIZE+namelen] == 0)
{
- if ((options & PCRE_DUPNAMES) == 0)
+ if (GET2(slot, 0) != cd->bracount + 1 &&
+ (options & PCRE_DUPNAMES) == 0)
{
*errorcodeptr = ERR43;
goto FAILED;
}
+ else dupname = TRUE;
}
- else crc = -1; /* Current name is substring */
+ else crc = -1; /* Current name is a substring */
}
+
+ /* Make space in the table and break the loop for an earlier
+ name. For a duplicate or later name, carry on. We do this for
+ duplicates so that in the simple case (when ?(| is not used) they
+ are in order of their numbers. */
+
if (crc < 0)
{
memmove(slot + cd->name_entry_size, slot,
- (cd->names_found - i) * cd->name_entry_size);
+ IN_UCHARS((cd->names_found - i) * cd->name_entry_size));
break;
}
+
+ /* Continue the loop for a later or duplicate name */
+
slot += cd->name_entry_size;
}
+ /* For non-duplicate names, check for a duplicate number before
+ adding the new name. */
+
+ if (!dupname)
+ {
+ pcre_uchar *cslot = cd->name_table;
+ for (i = 0; i < cd->names_found; i++)
+ {
+ if (cslot != slot)
+ {
+ if (GET2(cslot, 0) == cd->bracount + 1)
+ {
+ *errorcodeptr = ERR65;
+ goto FAILED;
+ }
+ }
+ else i--;
+ cslot += cd->name_entry_size;
+ }
+ }
+
PUT2(slot, 0, cd->bracount + 1);
- memcpy(slot + 2, name, namelen);
- slot[2+namelen] = 0;
+ memcpy(slot + IMM2_SIZE, name, IN_UCHARS(namelen));
+ slot[IMM2_SIZE + namelen] = 0;
}
}
- /* In both cases, count the number of names we've encountered. */
+ /* In both pre-compile and compile, count the number of names we've
+ encountered. */
- ptr++; /* Move past > or ' */
cd->names_found++;
+ ptr++; /* Move past > or ' */
goto NUMBERED_GROUP;
/* ------------------------------------------------------------ */
- case '&': /* Perl recursion/subroutine syntax */
- terminator = ')';
+ case CHAR_AMPERSAND: /* Perl recursion/subroutine syntax */
+ terminator = CHAR_RIGHT_PARENTHESIS;
is_recurse = TRUE;
/* Fall through */
@@ -4573,24 +6178,30 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
references (?P=name) and recursion (?P>name), as well as falling
through from the Perl recursion syntax (?&name). We also come here from
the Perl \k<name> or \k'name' back reference syntax and the \k{name}
- .NET syntax. */
+ .NET syntax, and the Oniguruma \g<...> and \g'...' subroutine syntax. */
NAMED_REF_OR_RECURSE:
name = ++ptr;
- while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
- namelen = ptr - name;
+ while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
+ namelen = (int)(ptr - name);
- /* In the pre-compile phase, do a syntax check and set a dummy
- reference number. */
+ /* In the pre-compile phase, do a syntax check. We used to just set
+ a dummy reference number, because it was not used in the first pass.
+ However, with the change of recursive back references to be atomic,
+ we have to look for the number so that this state can be identified, as
+ otherwise the incorrect length is computed. If it's not a backwards
+ reference, the dummy number will do. */
if (lengthptr != NULL)
{
+ const pcre_uchar *temp;
+
if (namelen == 0)
{
*errorcodeptr = ERR62;
goto FAILED;
}
- if (*ptr != terminator)
+ if (*ptr != (pcre_uchar)terminator)
{
*errorcodeptr = ERR42;
goto FAILED;
@@ -4600,7 +6211,22 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
*errorcodeptr = ERR48;
goto FAILED;
}
- recno = 0;
+
+ /* The name table does not exist in the first pass, so we cannot
+ do a simple search as in the code below. Instead, we have to scan the
+ pattern to find the number. It is important that we scan it only as
+ far as we have got because the syntax of named subpatterns has not
+ been checked for the rest of the pattern, and find_parens() assumes
+ correct syntax. In any case, it's a waste of resources to scan
+ further. We stop the scan at the current point by temporarily
+ adjusting the value of cd->endpattern. */
+
+ temp = cd->end_pattern;
+ cd->end_pattern = ptr;
+ recno = find_parens(cd, name, namelen,
+ (options & PCRE_EXTENDED) != 0, utf);
+ cd->end_pattern = temp;
+ if (recno < 0) recno = 0; /* Forward ref; set dummy number */
}
/* In the real compile, seek the name in the table. We check the name
@@ -4613,8 +6239,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
slot = cd->name_table;
for (i = 0; i < cd->names_found; i++)
{
- if (strncmp((char *)name, (char *)slot+2, namelen) == 0 &&
- slot[2+namelen] == 0)
+ if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0 &&
+ slot[IMM2_SIZE+namelen] == 0)
break;
slot += cd->name_entry_size;
}
@@ -4624,8 +6250,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
recno = GET2(slot, 0);
}
else if ((recno = /* Forward back reference */
- find_parens(ptr, cd->bracount, name, namelen,
- (options & PCRE_EXTENDED) != 0)) <= 0)
+ find_parens(cd, name, namelen,
+ (options & PCRE_EXTENDED) != 0, utf)) <= 0)
{
*errorcodeptr = ERR15;
goto FAILED;
@@ -4640,45 +6266,54 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* ------------------------------------------------------------ */
- case 'R': /* Recursion */
+ case CHAR_R: /* Recursion */
ptr++; /* Same as (?0) */
/* Fall through */
/* ------------------------------------------------------------ */
- case '-': case '+':
- case '0': case '1': case '2': case '3': case '4': /* Recursion or */
- case '5': case '6': case '7': case '8': case '9': /* subroutine */
+ case CHAR_MINUS: case CHAR_PLUS: /* Recursion or subroutine */
+ case CHAR_0: case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4:
+ case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
{
- const uschar *called;
+ const pcre_uchar *called;
+ terminator = CHAR_RIGHT_PARENTHESIS;
- if ((refsign = *ptr) == '+')
+ /* Come here from the \g<...> and \g'...' code (Oniguruma
+ compatibility). However, the syntax has been checked to ensure that
+ the ... are a (signed) number, so that neither ERR63 nor ERR29 will
+ be called on this path, nor with the jump to OTHER_CHAR_AFTER_QUERY
+ ever be taken. */
+
+ HANDLE_NUMERICAL_RECURSION:
+
+ if ((refsign = *ptr) == CHAR_PLUS)
{
ptr++;
- if ((digitab[*ptr] & ctype_digit) == 0)
+ if (!IS_DIGIT(*ptr))
{
*errorcodeptr = ERR63;
goto FAILED;
}
}
- else if (refsign == '-')
+ else if (refsign == CHAR_MINUS)
{
- if ((digitab[ptr[1]] & ctype_digit) == 0)
+ if (!IS_DIGIT(ptr[1]))
goto OTHER_CHAR_AFTER_QUERY;
ptr++;
}
recno = 0;
- while((digitab[*ptr] & ctype_digit) != 0)
- recno = recno * 10 + *ptr++ - '0';
+ while(IS_DIGIT(*ptr))
+ recno = recno * 10 + *ptr++ - CHAR_0;
- if (*ptr != ')')
+ if (*ptr != (pcre_uchar)terminator)
{
*errorcodeptr = ERR29;
goto FAILED;
}
- if (refsign == '-')
+ if (refsign == CHAR_MINUS)
{
if (recno == 0)
{
@@ -4692,7 +6327,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
goto FAILED;
}
}
- else if (refsign == '+')
+ else if (refsign == CHAR_PLUS)
{
if (recno == 0)
{
@@ -4719,56 +6354,64 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
if (lengthptr == NULL)
{
*code = OP_END;
- if (recno != 0) called = find_bracket(cd->start_code, utf8, recno);
+ if (recno != 0)
+ called = PRIV(find_bracket)(cd->start_code, utf, recno);
/* Forward reference */
if (called == NULL)
{
- if (find_parens(ptr, cd->bracount, NULL, recno,
- (options & PCRE_EXTENDED) != 0) < 0)
+ if (find_parens(cd, NULL, recno,
+ (options & PCRE_EXTENDED) != 0, utf) < 0)
{
*errorcodeptr = ERR15;
goto FAILED;
}
+
+ /* Fudge the value of "called" so that when it is inserted as an
+ offset below, what it actually inserted is the reference number
+ of the group. Then remember the forward reference. */
+
called = cd->start_code + recno;
- PUTINC(cd->hwm, 0, code + 2 + LINK_SIZE - cd->start_code);
+ if (cd->hwm >= cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN)
+ {
+ *errorcodeptr = expand_workspace(cd);
+ if (*errorcodeptr != 0) goto FAILED;
+ }
+ PUTINC(cd->hwm, 0, (int)(code + 1 - cd->start_code));
}
/* If not a forward reference, and the subpattern is still open,
this is a recursive call. We check to see if this is a left
- recursion that could loop for ever, and diagnose that case. */
-
- else if (GET(called, 1) == 0 &&
- could_be_empty(called, code, bcptr, utf8))
+ recursion that could loop for ever, and diagnose that case. We
+ must not, however, do this check if we are in a conditional
+ subpattern because the condition might be testing for recursion in
+ a pattern such as /(?(R)a+|(?R)b)/, which is perfectly valid.
+ Forever loops are also detected at runtime, so those that occur in
+ conditional subpatterns will be picked up then. */
+
+ else if (GET(called, 1) == 0 && cond_depth <= 0 &&
+ could_be_empty(called, code, bcptr, utf, cd))
{
*errorcodeptr = ERR40;
goto FAILED;
}
}
- /* Insert the recursion/subroutine item, automatically wrapped inside
- "once" brackets. Set up a "previous group" length so that a
- subsequent quantifier will work. */
-
- *code = OP_ONCE;
- PUT(code, 1, 2 + 2*LINK_SIZE);
- code += 1 + LINK_SIZE;
+ /* Insert the recursion/subroutine item. It does not have a set first
+ character (relevant if it is repeated, because it will then be
+ wrapped with ONCE brackets). */
*code = OP_RECURSE;
- PUT(code, 1, called - cd->start_code);
- code += 1 + LINK_SIZE;
-
- *code = OP_KET;
- PUT(code, 1, 2 + 2*LINK_SIZE);
+ PUT(code, 1, (int)(called - cd->start_code));
code += 1 + LINK_SIZE;
-
- length_prevgroup = 3 + 3*LINK_SIZE;
+ groupsetfirstchar = FALSE;
}
/* Can't determine a first byte now */
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
continue;
@@ -4778,23 +6421,23 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
set = unset = 0;
optset = &set;
- while (*ptr != ')' && *ptr != ':')
+ while (*ptr != CHAR_RIGHT_PARENTHESIS && *ptr != CHAR_COLON)
{
switch (*ptr++)
{
- case '-': optset = &unset; break;
+ case CHAR_MINUS: optset = &unset; break;
- case 'J': /* Record that it changed in the external options */
+ case CHAR_J: /* Record that it changed in the external options */
*optset |= PCRE_DUPNAMES;
cd->external_flags |= PCRE_JCHANGED;
break;
- case 'i': *optset |= PCRE_CASELESS; break;
- case 'm': *optset |= PCRE_MULTILINE; break;
- case 's': *optset |= PCRE_DOTALL; break;
- case 'x': *optset |= PCRE_EXTENDED; break;
- case 'U': *optset |= PCRE_UNGREEDY; break;
- case 'X': *optset |= PCRE_EXTRA; break;
+ case CHAR_i: *optset |= PCRE_CASELESS; break;
+ case CHAR_m: *optset |= PCRE_MULTILINE; break;
+ case CHAR_s: *optset |= PCRE_DOTALL; break;
+ case CHAR_x: *optset |= PCRE_EXTENDED; break;
+ case CHAR_U: *optset |= PCRE_UNGREEDY; break;
+ case CHAR_X: *optset |= PCRE_EXTRA; break;
default: *errorcodeptr = ERR12;
ptr--; /* Correct the offset */
@@ -4824,33 +6467,25 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
is necessary to ensure we correctly detect the start of the pattern in
both phases.
- If we are not at the pattern start, compile code to change the ims
- options if this setting actually changes any of them, and reset the
- greedy defaults and the case value for firstbyte and reqbyte. */
+ If we are not at the pattern start, reset the greedy defaults and the
+ case value for firstchar and reqchar. */
- if (*ptr == ')')
+ if (*ptr == CHAR_RIGHT_PARENTHESIS)
{
if (code == cd->start_code + 1 + LINK_SIZE &&
(lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
{
cd->external_options = newoptions;
}
- else
+ else
{
- if ((options & PCRE_IMS) != (newoptions & PCRE_IMS))
- {
- *code++ = OP_OPT;
- *code++ = newoptions & PCRE_IMS;
- }
greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
greedy_non_default = greedy_default ^ 1;
- req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
+ req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
}
/* Change options at this level, and pass them back for use
- in subsequent branches. When not at the start of the pattern, this
- information is also necessary so that a resetting item can be
- compiled at the end of a group (if we are in a group). */
+ in subsequent branches. */
*optionsptr = options = newoptions;
previous = NULL; /* This item can't be repeated */
@@ -4867,8 +6502,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
} /* End of switch for character following (? */
} /* End of (? handling */
- /* Opening parenthesis not followed by '?'. If PCRE_NO_AUTO_CAPTURE is set,
- all unadorned brackets become non-capturing and behave like (?:...)
+ /* Opening parenthesis not followed by '*' or '?'. If PCRE_NO_AUTO_CAPTURE
+ is set, all unadorned brackets become non-capturing and behave like (?:...)
brackets. */
else if ((options & PCRE_NO_AUTO_CAPTURE) != 0)
@@ -4883,53 +6518,64 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
NUMBERED_GROUP:
cd->bracount += 1;
PUT2(code, 1+LINK_SIZE, cd->bracount);
- skipbytes = 2;
+ skipbytes = IMM2_SIZE;
}
- /* Process nested bracketed regex. Assertions may not be repeated, but
- other kinds can be. All their opcodes are >= OP_ONCE. We copy code into a
- non-register variable in order to be able to pass its address because some
- compilers complain otherwise. Pass in a new setting for the ims options if
- they have changed. */
+ /* Process nested bracketed regex. Assertions used not to be repeatable,
+ but this was changed for Perl compatibility, so all kinds can now be
+ repeated. We copy code into a non-register variable (tempcode) in order to
+ be able to pass its address because some compilers complain otherwise. */
- previous = (bravalue >= OP_ONCE)? code : NULL;
+ previous = code; /* For handling repetition */
*code = bravalue;
tempcode = code;
- tempreqvary = cd->req_varyopt; /* Save value before bracket */
- length_prevgroup = 0; /* Initialize for pre-compile phase */
+ tempreqvary = cd->req_varyopt; /* Save value before bracket */
+ tempbracount = cd->bracount; /* Save value before bracket */
+ length_prevgroup = 0; /* Initialize for pre-compile phase */
if (!compile_regex(
- newoptions, /* The complete new option state */
- options & PCRE_IMS, /* The previous ims option state */
- &tempcode, /* Where to put code (updated) */
- &ptr, /* Input pointer (updated) */
- errorcodeptr, /* Where to put an error message */
+ newoptions, /* The complete new option state */
+ &tempcode, /* Where to put code (updated) */
+ &ptr, /* Input pointer (updated) */
+ errorcodeptr, /* Where to put an error message */
(bravalue == OP_ASSERTBACK ||
bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */
- reset_bracount, /* True if (?| group */
- skipbytes, /* Skip over bracket number */
- &subfirstbyte, /* For possible first char */
- &subreqbyte, /* For possible last char */
- bcptr, /* Current branch chain */
- cd, /* Tables block */
- (lengthptr == NULL)? NULL : /* Actual compile phase */
- &length_prevgroup /* Pre-compile phase */
+ reset_bracount, /* True if (?| group */
+ skipbytes, /* Skip over bracket number */
+ cond_depth +
+ ((bravalue == OP_COND)?1:0), /* Depth of condition subpatterns */
+ &subfirstchar, /* For possible first char */
+ &subfirstcharflags,
+ &subreqchar, /* For possible last char */
+ &subreqcharflags,
+ bcptr, /* Current branch chain */
+ cd, /* Tables block */
+ (lengthptr == NULL)? NULL : /* Actual compile phase */
+ &length_prevgroup /* Pre-compile phase */
))
goto FAILED;
+ /* If this was an atomic group and there are no capturing groups within it,
+ generate OP_ONCE_NC instead of OP_ONCE. */
+
+ if (bravalue == OP_ONCE && cd->bracount <= tempbracount)
+ *code = OP_ONCE_NC;
+
+ if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
+ cd->assert_depth -= 1;
+
/* At the end of compiling, code is still pointing to the start of the
- group, while tempcode has been updated to point past the end of the group
- and any option resetting that may follow it. The pattern pointer (ptr)
- is on the bracket. */
+ group, while tempcode has been updated to point past the end of the group.
+ The pattern pointer (ptr) is on the bracket.
- /* If this is a conditional bracket, check that there are no more than
+ If this is a conditional bracket, check that there are no more than
two branches in the group, or just one if it's a DEFINE group. We do this
in the real compile phase, not in the pre-pass, where the whole group may
not be available. */
if (bravalue == OP_COND && lengthptr == NULL)
{
- uschar *tc = code;
+ pcre_uchar *tc = code;
int condcount = 0;
do {
@@ -4952,7 +6598,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
}
/* A "normal" conditional group. If there is just one branch, we must not
- make use of its firstbyte or reqbyte, because this is equivalent to an
+ make use of its firstchar or reqchar, because this is equivalent to an
empty second branch. */
else
@@ -4962,13 +6608,13 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
*errorcodeptr = ERR27;
goto FAILED;
}
- if (condcount == 1) subfirstbyte = subreqbyte = REQ_NONE;
+ if (condcount == 1) subfirstcharflags = subreqcharflags = REQ_NONE;
}
}
/* Error if hit end of pattern */
- if (*ptr != ')')
+ if (*ptr != CHAR_RIGHT_PARENTHESIS)
{
*errorcodeptr = ERR14;
goto FAILED;
@@ -4987,7 +6633,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
goto FAILED;
}
*lengthptr += length_prevgroup - 2 - 2*LINK_SIZE;
- *code++ = OP_BRA;
+ code++; /* This already contains bravalue */
PUTINC(code, 0, 1 + LINK_SIZE);
*code++ = OP_KET;
PUTINC(code, 0, 1 + LINK_SIZE);
@@ -5006,131 +6652,233 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* Handle updating of the required and first characters for other types of
group. Update for normal brackets of all kinds, and conditions with two
branches (see code above). If the bracket is followed by a quantifier with
- zero repeat, we have to back off. Hence the definition of zeroreqbyte and
- zerofirstbyte outside the main loop so that they can be accessed for the
+ zero repeat, we have to back off. Hence the definition of zeroreqchar and
+ zerofirstchar outside the main loop so that they can be accessed for the
back off. */
- zeroreqbyte = reqbyte;
- zerofirstbyte = firstbyte;
- groupsetfirstbyte = FALSE;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ groupsetfirstchar = FALSE;
if (bravalue >= OP_ONCE)
{
- /* If we have not yet set a firstbyte in this branch, take it from the
+ /* If we have not yet set a firstchar in this branch, take it from the
subpattern, remembering that it was set here so that a repeat of more
- than one can replicate it as reqbyte if necessary. If the subpattern has
- no firstbyte, set "none" for the whole branch. In both cases, a zero
- repeat forces firstbyte to "none". */
+ than one can replicate it as reqchar if necessary. If the subpattern has
+ no firstchar, set "none" for the whole branch. In both cases, a zero
+ repeat forces firstchar to "none". */
- if (firstbyte == REQ_UNSET)
+ if (firstcharflags == REQ_UNSET)
{
- if (subfirstbyte >= 0)
+ if (subfirstcharflags >= 0)
{
- firstbyte = subfirstbyte;
- groupsetfirstbyte = TRUE;
+ firstchar = subfirstchar;
+ firstcharflags = subfirstcharflags;
+ groupsetfirstchar = TRUE;
}
- else firstbyte = REQ_NONE;
- zerofirstbyte = REQ_NONE;
+ else firstcharflags = REQ_NONE;
+ zerofirstcharflags = REQ_NONE;
}
- /* If firstbyte was previously set, convert the subpattern's firstbyte
- into reqbyte if there wasn't one, using the vary flag that was in
+ /* If firstchar was previously set, convert the subpattern's firstchar
+ into reqchar if there wasn't one, using the vary flag that was in
existence beforehand. */
- else if (subfirstbyte >= 0 && subreqbyte < 0)
- subreqbyte = subfirstbyte | tempreqvary;
+ else if (subfirstcharflags >= 0 && subreqcharflags < 0)
+ {
+ subreqchar = subfirstchar;
+ subreqcharflags = subfirstcharflags | tempreqvary;
+ }
/* If the subpattern set a required byte (or set a first byte that isn't
really the first byte - see above), set it. */
- if (subreqbyte >= 0) reqbyte = subreqbyte;
+ if (subreqcharflags >= 0)
+ {
+ reqchar = subreqchar;
+ reqcharflags = subreqcharflags;
+ }
}
- /* For a forward assertion, we take the reqbyte, if set. This can be
+ /* For a forward assertion, we take the reqchar, if set. This can be
helpful if the pattern that follows the assertion doesn't set a different
- char. For example, it's useful for /(?=abcde).+/. We can't set firstbyte
+ char. For example, it's useful for /(?=abcde).+/. We can't set firstchar
for an assertion, however because it leads to incorrect effect for patterns
- such as /(?=a)a.+/ when the "real" "a" would then become a reqbyte instead
- of a firstbyte. This is overcome by a scan at the end if there's no
- firstbyte, looking for an asserted first char. */
+ such as /(?=a)a.+/ when the "real" "a" would then become a reqchar instead
+ of a firstchar. This is overcome by a scan at the end if there's no
+ firstchar, looking for an asserted first char. */
- else if (bravalue == OP_ASSERT && subreqbyte >= 0) reqbyte = subreqbyte;
+ else if (bravalue == OP_ASSERT && subreqcharflags >= 0)
+ {
+ reqchar = subreqchar;
+ reqcharflags = subreqcharflags;
+ }
break; /* End of processing '(' */
/* ===================================================================*/
/* Handle metasequences introduced by \. For ones like \d, the ESC_ values
- are arranged to be the negation of the corresponding OP_values. For the
- back references, the values are ESC_REF plus the reference number. Only
- back references and those types that consume a character may be repeated.
- We can test for values between ESC_b and ESC_Z for the latter; this may
- have to change if any new ones are ever created. */
-
- case '\\':
+ are arranged to be the negation of the corresponding OP_values in the
+ default case when PCRE_UCP is not set. For the back references, the values
+ are negative the reference number. Only back references and those types
+ that consume a character may be repeated. We can test for values between
+ ESC_b and ESC_Z for the latter; this may have to change if any new ones are
+ ever created. */
+
+ case CHAR_BACKSLASH:
tempptr = ptr;
- c = check_escape(&ptr, errorcodeptr, cd->bracount, options, FALSE);
+ escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, FALSE);
if (*errorcodeptr != 0) goto FAILED;
- if (c < 0)
+ if (escape == 0) /* The escape coded a single character */
+ c = ec;
+ else
{
- if (-c == ESC_Q) /* Handle start of quoted string */
+ if (escape == ESC_Q) /* Handle start of quoted string */
{
- if (ptr[1] == '\\' && ptr[2] == 'E') ptr += 2; /* avoid empty string */
- else inescq = TRUE;
+ if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
+ ptr += 2; /* avoid empty string */
+ else inescq = TRUE;
continue;
}
- if (-c == ESC_E) continue; /* Perl ignores an orphan \E */
+ if (escape == ESC_E) continue; /* Perl ignores an orphan \E */
/* For metasequences that actually match a character, we disable the
setting of a first character if it hasn't already been set. */
- if (firstbyte == REQ_UNSET && -c > ESC_b && -c < ESC_Z)
- firstbyte = REQ_NONE;
+ if (firstcharflags == REQ_UNSET && escape > ESC_b && escape < ESC_Z)
+ firstcharflags = REQ_NONE;
/* Set values to reset to if this is followed by a zero repeat. */
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
+
+ /* \g<name> or \g'name' is a subroutine call by name and \g<n> or \g'n'
+ is a subroutine call by number (Oniguruma syntax). In fact, the value
+ ESC_g is returned only for these cases. So we don't need to check for <
+ or ' if the value is ESC_g. For the Perl syntax \g{n} the value is
+ -n, and for the Perl syntax \g{name} the result is ESC_k (as
+ that is a synonym for a named back reference). */
+
+ if (escape == ESC_g)
+ {
+ const pcre_uchar *p;
+ save_hwm = cd->hwm; /* Normally this is set when '(' is read */
+ terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
+ CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
+
+ /* These two statements stop the compiler for warning about possibly
+ unset variables caused by the jump to HANDLE_NUMERICAL_RECURSION. In
+ fact, because we actually check for a number below, the paths that
+ would actually be in error are never taken. */
+
+ skipbytes = 0;
+ reset_bracount = FALSE;
+
+ /* Test for a name */
+
+ if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS)
+ {
+ BOOL is_a_number = TRUE;
+ for (p = ptr + 1; *p != CHAR_NULL && *p != (pcre_uchar)terminator; p++)
+ {
+ if (!MAX_255(*p)) { is_a_number = FALSE; break; }
+ if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE;
+ if ((cd->ctypes[*p] & ctype_word) == 0) break;
+ }
+ if (*p != (pcre_uchar)terminator)
+ {
+ *errorcodeptr = ERR57;
+ break;
+ }
+ if (is_a_number)
+ {
+ ptr++;
+ goto HANDLE_NUMERICAL_RECURSION;
+ }
+ is_recurse = TRUE;
+ goto NAMED_REF_OR_RECURSE;
+ }
+
+ /* Test a signed number in angle brackets or quotes. */
+
+ p = ptr + 2;
+ while (IS_DIGIT(*p)) p++;
+ if (*p != (pcre_uchar)terminator)
+ {
+ *errorcodeptr = ERR57;
+ break;
+ }
+ ptr++;
+ goto HANDLE_NUMERICAL_RECURSION;
+ }
/* \k<name> or \k'name' is a back reference by name (Perl syntax).
- We also support \k{name} (.NET syntax) */
+ We also support \k{name} (.NET syntax). */
- if (-c == ESC_k && (ptr[1] == '<' || ptr[1] == '\'' || ptr[1] == '{'))
+ if (escape == ESC_k)
{
+ if ((ptr[1] != CHAR_LESS_THAN_SIGN &&
+ ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
+ {
+ *errorcodeptr = ERR69;
+ break;
+ }
is_recurse = FALSE;
- terminator = (*(++ptr) == '<')? '>' : (*ptr == '\'')? '\'' : '}';
+ terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
+ CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
+ CHAR_APOSTROPHE : CHAR_RIGHT_CURLY_BRACKET;
goto NAMED_REF_OR_RECURSE;
}
- /* Back references are handled specially; must disable firstbyte if
+ /* Back references are handled specially; must disable firstchar if
not set to cope with cases like (?=(\w+))\1: which would otherwise set
':' later. */
- if (-c >= ESC_REF)
+ if (escape < 0)
{
- recno = -c - ESC_REF;
+ open_capitem *oc;
+ recno = -escape;
HANDLE_REFERENCE: /* Come here from named backref handling */
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
previous = code;
- *code++ = OP_REF;
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
PUT2INC(code, 0, recno);
cd->backref_map |= (recno < 32)? (1 << recno) : 1;
if (recno > cd->top_backref) cd->top_backref = recno;
+
+ /* Check to see if this back reference is recursive, that it, it
+ is inside the group that it references. A flag is set so that the
+ group can be made atomic. */
+
+ for (oc = cd->open_caps; oc != NULL; oc = oc->next)
+ {
+ if (oc->number == recno)
+ {
+ oc->flag = TRUE;
+ break;
+ }
+ }
}
/* So are Unicode property matches, if supported. */
#ifdef SUPPORT_UCP
- else if (-c == ESC_P || -c == ESC_p)
+ else if (escape == ESC_P || escape == ESC_p)
{
BOOL negated;
- int pdata;
- int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr);
- if (ptype < 0) goto FAILED;
+ unsigned int ptype = 0, pdata = 0;
+ if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
+ goto FAILED;
previous = code;
- *code++ = ((-c == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
+ *code++ = ((escape == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
*code++ = ptype;
*code++ = pdata;
}
@@ -5139,7 +6887,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
/* If Unicode properties are not supported, \X, \P, and \p are not
allowed. */
- else if (-c == ESC_X || -c == ESC_P || -c == ESC_p)
+ else if (escape == ESC_X || escape == ESC_P || escape == ESC_p)
{
*errorcodeptr = ERR45;
goto FAILED;
@@ -5147,12 +6895,31 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
#endif
/* For the rest (including \X when Unicode properties are supported), we
- can obtain the OP value by negating the escape value. */
+ can obtain the OP value by negating the escape value in the default
+ situation when PCRE_UCP is not set. When it *is* set, we substitute
+ Unicode property tests. Note that \b and \B do a one-character
+ lookbehind, and \A also behaves as if it does. */
else
{
- previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;
- *code++ = -c;
+ if ((escape == ESC_b || escape == ESC_B || escape == ESC_A) &&
+ cd->max_lookbehind == 0)
+ cd->max_lookbehind = 1;
+#ifdef SUPPORT_UCP
+ if (escape >= ESC_DU && escape <= ESC_wu)
+ {
+ nestptr = ptr + 1; /* Where to resume */
+ ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
+ }
+ else
+#endif
+ /* In non-UTF-8 mode, we turn \C into OP_ALLANY instead of OP_ANYBYTE
+ so that it works in DFA mode and in lookbehinds. */
+
+ {
+ previous = (escape > ESC_b && escape < ESC_Z)? code : NULL;
+ *code++ = (!utf && escape == ESC_C)? OP_ALLANY : escape;
+ }
}
continue;
}
@@ -5161,9 +6928,9 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
a value > 127. We set its representation in the length/buffer, and then
handle it as a data character. */
-#ifdef SUPPORT_UTF8
- if (utf8 && c > 127)
- mclength = _erts_pcre_ord2utf8(c, mcbuffer);
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
+ mclength = PRIV(ord2utf)(c, mcbuffer);
else
#endif
@@ -5184,12 +6951,9 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
mclength = 1;
mcbuffer[0] = c;
-#ifdef SUPPORT_UTF8
- if (utf8 && c >= 0xc0)
- {
- while ((ptr[1] & 0xc0) == 0x80)
- mcbuffer[mclength++] = *(++ptr);
- }
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(c))
+ ACROSSCHAR(TRUE, ptr[1], mcbuffer[mclength++] = *(++ptr));
#endif
/* At this point we have the character's bytes in mcbuffer, and the length
@@ -5197,44 +6961,79 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */
ONE_CHAR:
previous = code;
- *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARNC : OP_CHAR;
+
+ /* For caseless UTF-8 mode when UCP support is available, check whether
+ this character has more than one other case. If so, generate a special
+ OP_PROP item instead of OP_CHARI. */
+
+#ifdef SUPPORT_UCP
+ if (utf && (options & PCRE_CASELESS) != 0)
+ {
+ GETCHAR(c, mcbuffer);
+ if ((c = UCD_CASESET(c)) != 0)
+ {
+ *code++ = OP_PROP;
+ *code++ = PT_CLIST;
+ *code++ = c;
+ if (firstcharflags == REQ_UNSET) firstcharflags = zerofirstcharflags = REQ_NONE;
+ break;
+ }
+ }
+#endif
+
+ /* Caseful matches, or not one of the multicase characters. */
+
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARI : OP_CHAR;
for (c = 0; c < mclength; c++) *code++ = mcbuffer[c];
/* Remember if \r or \n were seen */
- if (mcbuffer[0] == '\r' || mcbuffer[0] == '\n')
+ if (mcbuffer[0] == CHAR_CR || mcbuffer[0] == CHAR_NL)
cd->external_flags |= PCRE_HASCRORLF;
/* Set the first and required bytes appropriately. If no previous first
byte, set it from this character, but revert to none on a zero repeat.
- Otherwise, leave the firstbyte value alone, and don't change it on a zero
+ Otherwise, leave the firstchar value alone, and don't change it on a zero
repeat. */
- if (firstbyte == REQ_UNSET)
+ if (firstcharflags == REQ_UNSET)
{
- zerofirstbyte = REQ_NONE;
- zeroreqbyte = reqbyte;
+ zerofirstcharflags = REQ_NONE;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
- /* If the character is more than one byte long, we can set firstbyte
+ /* If the character is more than one byte long, we can set firstchar
only if it is not to be matched caselessly. */
if (mclength == 1 || req_caseopt == 0)
{
- firstbyte = mcbuffer[0] | req_caseopt;
- if (mclength != 1) reqbyte = code[-1] | cd->req_varyopt;
+ firstchar = mcbuffer[0] | req_caseopt;
+ firstchar = mcbuffer[0];
+ firstcharflags = req_caseopt;
+
+ if (mclength != 1)
+ {
+ reqchar = code[-1];
+ reqcharflags = cd->req_varyopt;
+ }
}
- else firstbyte = reqbyte = REQ_NONE;
+ else firstcharflags = reqcharflags = REQ_NONE;
}
- /* firstbyte was previously set; we can set reqbyte only the length is
+ /* firstchar was previously set; we can set reqchar only if the length is
1 or the matching is caseful. */
else
{
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
+ zeroreqchar = reqchar;
+ zeroreqcharflags = reqcharflags;
if (mclength == 1 || req_caseopt == 0)
- reqbyte = code[-1] | req_caseopt | cd->req_varyopt;
+ {
+ reqchar = code[-1];
+ reqcharflags = req_caseopt | cd->req_varyopt;
+ }
}
break; /* End of literal character handling */
@@ -5253,7 +7052,6 @@ return FALSE;
-
/*************************************************
* Compile sequence of alternatives *
*************************************************/
@@ -5261,26 +7059,23 @@ return FALSE;
/* On entry, ptr is pointing past the bracket character, but on return it
points to the closing bracket, or vertical bar, or end of string. The code
variable is pointing at the byte into which the BRA operator has been stored.
-If the ims options are changed at the start (for a (?ims: group) or during any
-branch, we need to insert an OP_OPT item at the start of every following branch
-to ensure they get set correctly at run time, and also pass the new options
-into every subsequent branch compile.
-
This function is used during the pre-compile phase when we are trying to find
out the amount of memory needed, as well as during the real compile phase. The
value of lengthptr distinguishes the two phases.
Arguments:
options option bits, including any changes for this subpattern
- oldims previous settings of ims option bits
codeptr -> the address of the current code pointer
ptrptr -> the address of the current pattern pointer
errorcodeptr -> pointer to error code variable
lookbehind TRUE if this is a lookbehind assertion
reset_bracount TRUE to reset the count for each branch
skipbytes skip this many bytes at start (for brackets and OP_COND)
- firstbyteptr place to put the first required character, or a negative number
- reqbyteptr place to put the last required character, or a negative number
+ cond_depth depth of nesting for conditional subpatterns
+ firstcharptr place to put the first required character
+ firstcharflagsptr place to put the first character flags, or a negative number
+ reqcharptr place to put the last required character
+ reqcharflagsptr place to put the last required character flags, or a negative number
bcptr pointer to the chain of currently open branches
cd points to the data block with tables pointers etc.
lengthptr NULL during the real compile phase
@@ -5290,27 +7085,34 @@ Returns: TRUE on success
*/
static BOOL
-compile_regex(int options, int oldims, uschar **codeptr, const uschar **ptrptr,
+compile_regex(int options, pcre_uchar **codeptr, const pcre_uchar **ptrptr,
int *errorcodeptr, BOOL lookbehind, BOOL reset_bracount, int skipbytes,
- int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr, compile_data *cd,
- int *lengthptr)
+ int cond_depth,
+ pcre_uint32 *firstcharptr, pcre_int32 *firstcharflagsptr,
+ pcre_uint32 *reqcharptr, pcre_int32 *reqcharflagsptr,
+ branch_chain *bcptr, compile_data *cd, int *lengthptr)
{
-const uschar *ptr = *ptrptr;
-uschar *code = *codeptr;
-uschar *last_branch = code;
-uschar *start_bracket = code;
-uschar *reverse_count = NULL;
-int firstbyte, reqbyte;
-int branchfirstbyte, branchreqbyte;
+const pcre_uchar *ptr = *ptrptr;
+pcre_uchar *code = *codeptr;
+pcre_uchar *last_branch = code;
+pcre_uchar *start_bracket = code;
+pcre_uchar *reverse_count = NULL;
+open_capitem capitem;
+int capnumber = 0;
+pcre_uint32 firstchar, reqchar;
+pcre_int32 firstcharflags, reqcharflags;
+pcre_uint32 branchfirstchar, branchreqchar;
+pcre_int32 branchfirstcharflags, branchreqcharflags;
int length;
-int orig_bracount;
-int max_bracount;
+unsigned int orig_bracount;
+unsigned int max_bracount;
branch_chain bc;
bc.outer = bcptr;
-bc.current = code;
+bc.current_branch = code;
-firstbyte = reqbyte = REQ_UNSET;
+firstchar = reqchar = 0;
+firstcharflags = reqcharflags = REQ_UNSET;
/* Accumulate the length for use in the pre-compile phase. Start with the
length of the BRA and KET and any extra bytes that are required at the
@@ -5326,6 +7128,21 @@ the code that abstracts option settings at the start of the pattern and makes
them global. It tests the value of length for (2 + 2*LINK_SIZE) in the
pre-compile phase to find out whether anything has yet been compiled or not. */
+/* If this is a capturing subpattern, add to the chain of open capturing items
+so that we can detect them if (*ACCEPT) is encountered. This is also used to
+detect groups that contain recursive back references to themselves. Note that
+only OP_CBRA need be tested here; changing this opcode to one of its variants,
+e.g. OP_SCBRAPOS, happens later, after the group has been compiled. */
+
+if (*code == OP_CBRA)
+ {
+ capnumber = GET2(code, 1 + LINK_SIZE);
+ capitem.number = capnumber;
+ capitem.next = cd->open_caps;
+ capitem.flag = FALSE;
+ cd->open_caps = &capitem;
+ }
+
/* Offset is set zero to mark that this bracket is still open */
PUT(code, 1, 0);
@@ -5341,15 +7158,6 @@ for (;;)
if (reset_bracount) cd->bracount = orig_bracount;
- /* Handle a change of ims options at the start of the branch */
-
- if ((options & PCRE_IMS) != oldims)
- {
- *code++ = OP_OPT;
- *code++ = options & PCRE_IMS;
- length += 2;
- }
-
/* Set up dummy OP_REVERSE if lookbehind assertion */
if (lookbehind)
@@ -5363,8 +7171,9 @@ for (;;)
/* Now compile the branch; in the pre-compile phase its length gets added
into the length. */
- if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstbyte,
- &branchreqbyte, &bc, cd, (lengthptr == NULL)? NULL : &length))
+ if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar,
+ &branchfirstcharflags, &branchreqchar, &branchreqcharflags, &bc,
+ cond_depth, cd, (lengthptr == NULL)? NULL : &length))
{
*ptrptr = ptr;
return FALSE;
@@ -5379,62 +7188,92 @@ for (;;)
if (lengthptr == NULL)
{
- /* If this is the first branch, the firstbyte and reqbyte values for the
+ /* If this is the first branch, the firstchar and reqchar values for the
branch become the values for the regex. */
if (*last_branch != OP_ALT)
{
- firstbyte = branchfirstbyte;
- reqbyte = branchreqbyte;
+ firstchar = branchfirstchar;
+ firstcharflags = branchfirstcharflags;
+ reqchar = branchreqchar;
+ reqcharflags = branchreqcharflags;
}
- /* If this is not the first branch, the first char and reqbyte have to
+ /* If this is not the first branch, the first char and reqchar have to
match the values from all the previous branches, except that if the
- previous value for reqbyte didn't have REQ_VARY set, it can still match,
+ previous value for reqchar didn't have REQ_VARY set, it can still match,
and we set REQ_VARY for the regex. */
else
{
- /* If we previously had a firstbyte, but it doesn't match the new branch,
- we have to abandon the firstbyte for the regex, but if there was
- previously no reqbyte, it takes on the value of the old firstbyte. */
+ /* If we previously had a firstchar, but it doesn't match the new branch,
+ we have to abandon the firstchar for the regex, but if there was
+ previously no reqchar, it takes on the value of the old firstchar. */
- if (firstbyte >= 0 && firstbyte != branchfirstbyte)
+ if (firstcharflags >= 0 &&
+ (firstcharflags != branchfirstcharflags || firstchar != branchfirstchar))
{
- if (reqbyte < 0) reqbyte = firstbyte;
- firstbyte = REQ_NONE;
+ if (reqcharflags < 0)
+ {
+ reqchar = firstchar;
+ reqcharflags = firstcharflags;
+ }
+ firstcharflags = REQ_NONE;
}
- /* If we (now or from before) have no firstbyte, a firstbyte from the
- branch becomes a reqbyte if there isn't a branch reqbyte. */
+ /* If we (now or from before) have no firstchar, a firstchar from the
+ branch becomes a reqchar if there isn't a branch reqchar. */
- if (firstbyte < 0 && branchfirstbyte >= 0 && branchreqbyte < 0)
- branchreqbyte = branchfirstbyte;
+ if (firstcharflags < 0 && branchfirstcharflags >= 0 && branchreqcharflags < 0)
+ {
+ branchreqchar = branchfirstchar;
+ branchreqcharflags = branchfirstcharflags;
+ }
- /* Now ensure that the reqbytes match */
+ /* Now ensure that the reqchars match */
- if ((reqbyte & ~REQ_VARY) != (branchreqbyte & ~REQ_VARY))
- reqbyte = REQ_NONE;
- else reqbyte |= branchreqbyte; /* To "or" REQ_VARY */
+ if (((reqcharflags & ~REQ_VARY) != (branchreqcharflags & ~REQ_VARY)) ||
+ reqchar != branchreqchar)
+ reqcharflags = REQ_NONE;
+ else
+ {
+ reqchar = branchreqchar;
+ reqcharflags |= branchreqcharflags; /* To "or" REQ_VARY */
+ }
}
/* If lookbehind, check that this branch matches a fixed-length string, and
put the length into the OP_REVERSE item. Temporarily mark the end of the
- branch with OP_END. */
+ branch with OP_END. If the branch contains OP_RECURSE, the result is -3
+ because there may be forward references that we can't check here. Set a
+ flag to cause another lookbehind check at the end. Why not do it all at the
+ end? Because common, erroneous checks are picked up here and the offset of
+ the problem can be shown. */
if (lookbehind)
{
int fixed_length;
*code = OP_END;
- fixed_length = find_fixedlength(last_branch, options);
+ fixed_length = find_fixedlength(last_branch, (options & PCRE_UTF8) != 0,
+ FALSE, cd);
DPRINTF(("fixed length = %d\n", fixed_length));
- if (fixed_length < 0)
+ if (fixed_length == -3)
{
- *errorcodeptr = (fixed_length == -2)? ERR36 : ERR25;
+ cd->check_lookbehind = TRUE;
+ }
+ else if (fixed_length < 0)
+ {
+ *errorcodeptr = (fixed_length == -2)? ERR36 :
+ (fixed_length == -4)? ERR70: ERR25;
*ptrptr = ptr;
return FALSE;
}
- PUT(reverse_count, 0, fixed_length);
+ else
+ {
+ if (fixed_length > cd->max_lookbehind)
+ cd->max_lookbehind = fixed_length;
+ PUT(reverse_count, 0, fixed_length);
+ }
}
}
@@ -5443,15 +7282,13 @@ for (;;)
of offsets, with the field in the BRA item now becoming an offset to the
first alternative. If there are no alternatives, it points to the end of the
group. The length in the terminating ket is always the length of the whole
- bracketed item. If any of the ims options were changed inside the group,
- compile a resetting op-code following, except at the very end of the pattern.
- Return leaving the pointer at the terminating char. */
+ bracketed item. Return leaving the pointer at the terminating char. */
- if (*ptr != '|')
+ if (*ptr != CHAR_VERTICAL_LINE)
{
if (lengthptr == NULL)
{
- int branch_length = code - last_branch;
+ int branch_length = (int)(code - last_branch);
do
{
int prev_length = GET(last_branch, 1);
@@ -5465,16 +7302,28 @@ for (;;)
/* Fill in the ket */
*code = OP_KET;
- PUT(code, 1, code - start_bracket);
+ PUT(code, 1, (int)(code - start_bracket));
code += 1 + LINK_SIZE;
- /* Resetting option if needed */
+ /* If it was a capturing subpattern, check to see if it contained any
+ recursive back references. If so, we must wrap it in atomic brackets.
+ In any event, remove the block from the chain. */
- if ((options & PCRE_IMS) != oldims && *ptr == ')')
+ if (capnumber > 0)
{
- *code++ = OP_OPT;
- *code++ = oldims;
- length += 2;
+ if (cd->open_caps->flag)
+ {
+ memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
+ IN_UCHARS(code - start_bracket));
+ *start_bracket = OP_ONCE;
+ code += 1 + LINK_SIZE;
+ PUT(start_bracket, 1, (int)(code - start_bracket));
+ *code = OP_KET;
+ PUT(code, 1, (int)(code - start_bracket));
+ code += 1 + LINK_SIZE;
+ length += 2 + 2*LINK_SIZE;
+ }
+ cd->open_caps = cd->open_caps->next;
}
/* Retain the highest bracket number, in case resetting was used. */
@@ -5485,8 +7334,10 @@ for (;;)
*codeptr = code;
*ptrptr = ptr;
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
+ *firstcharptr = firstchar;
+ *firstcharflagsptr = firstcharflags;
+ *reqcharptr = reqchar;
+ *reqcharflagsptr = reqcharflags;
if (lengthptr != NULL)
{
if (OFLOW_MAX - *lengthptr < length)
@@ -5516,8 +7367,8 @@ for (;;)
else
{
*code = OP_ALT;
- PUT(code, 1, code - last_branch);
- bc.current = last_branch = code;
+ PUT(code, 1, (int)(code - last_branch));
+ bc.current_branch = last_branch = code;
code += 1 + LINK_SIZE;
}
@@ -5536,8 +7387,8 @@ for (;;)
/* Try to find out if this is an anchored regular expression. Consider each
alternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket
all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then
-it's anchored. However, if this is a multiline pattern, then only OP_SOD
-counts, since OP_CIRC can match in the middle.
+it's anchored. However, if this is a multiline pattern, then only OP_SOD will
+be found, because ^ generates OP_CIRCM in that mode.
We can also consider a regex to be anchored if OP_SOM starts all its branches.
This is the code for \G, which means "match at start of match position, taking
@@ -5556,64 +7407,78 @@ and the highest back reference was greater than or equal to that level.
However, by keeping a bitmap of the first 31 back references, we can catch some
of the more common cases more precisely.
+... A second exception is when the .* appears inside an atomic group, because
+this prevents the number of characters it matches from being adjusted.
+
Arguments:
code points to start of expression (the bracket)
- options points to the options setting
bracket_map a bitmap of which brackets we are inside while testing; this
handles up to substring 31; after that we just have to take
the less precise approach
- backref_map the back reference bitmap
+ cd points to the compile data block
+ atomcount atomic group level
Returns: TRUE or FALSE
*/
static BOOL
-is_anchored(register const uschar *code, int *options, unsigned int bracket_map,
- unsigned int backref_map)
+is_anchored(register const pcre_uchar *code, unsigned int bracket_map,
+ compile_data *cd, int atomcount)
{
do {
- const uschar *scode = first_significant_code(code + _erts_pcre_OP_lengths[*code],
- options, PCRE_MULTILINE, FALSE);
+ const pcre_uchar *scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
register int op = *scode;
/* Non-capturing brackets */
- if (op == OP_BRA)
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
{
- if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
}
/* Capturing brackets */
- else if (op == OP_CBRA)
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
{
int n = GET2(scode, 1+LINK_SIZE);
int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
- if (!is_anchored(scode, options, new_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
+ }
+
+ /* Positive forward assertions and conditions */
+
+ else if (op == OP_ASSERT || op == OP_COND)
+ {
+ if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
}
- /* Other brackets */
+ /* Atomic groups */
- else if (op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
+ else if (op == OP_ONCE || op == OP_ONCE_NC)
{
- if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE;
+ if (!is_anchored(scode, bracket_map, cd, atomcount + 1))
+ return FALSE;
}
- /* .* is not anchored unless DOTALL is set and it isn't in brackets that
- are or may be referenced. */
+ /* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and
+ it isn't in brackets that are or may be referenced or inside an atomic
+ group. */
else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR ||
- op == OP_TYPEPOSSTAR) &&
- (*options & PCRE_DOTALL) != 0)
+ op == OP_TYPEPOSSTAR))
{
- if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE;
+ if (scode[1] != OP_ALLANY || (bracket_map & cd->backref_map) != 0 ||
+ atomcount > 0 || cd->had_pruneorskip)
+ return FALSE;
}
/* Check for explicit anchoring */
- else if (op != OP_SOD && op != OP_SOM &&
- ((*options & PCRE_MULTILINE) != 0 || op != OP_CIRC))
- return FALSE;
+ else if (op != OP_SOD && op != OP_SOM && op != OP_CIRC) return FALSE;
+
code += GET(code, 1);
}
while (*code == OP_ALT); /* Loop for each alternative */
@@ -5631,59 +7496,109 @@ return TRUE;
matching and for non-DOTALL patterns that start with .* (which must start at
the beginning or after \n). As in the case of is_anchored() (see above), we
have to take account of back references to capturing brackets that contain .*
-because in that case we can't make the assumption.
+because in that case we can't make the assumption. Also, the appearance of .*
+inside atomic brackets or in a pattern that contains *PRUNE or *SKIP does not
+count, because once again the assumption no longer holds.
Arguments:
code points to start of expression (the bracket)
bracket_map a bitmap of which brackets we are inside while testing; this
handles up to substring 31; after that we just have to take
the less precise approach
- backref_map the back reference bitmap
+ cd points to the compile data
+ atomcount atomic group level
Returns: TRUE or FALSE
*/
static BOOL
-is_startline(const uschar *code, unsigned int bracket_map,
- unsigned int backref_map)
+is_startline(const pcre_uchar *code, unsigned int bracket_map,
+ compile_data *cd, int atomcount)
{
do {
- const uschar *scode = first_significant_code(code + _erts_pcre_OP_lengths[*code],
- NULL, 0, FALSE);
+ const pcre_uchar *scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
register int op = *scode;
+ /* If we are at the start of a conditional assertion group, *both* the
+ conditional assertion *and* what follows the condition must satisfy the test
+ for start of line. Other kinds of condition fail. Note that there may be an
+ auto-callout at the start of a condition. */
+
+ if (op == OP_COND)
+ {
+ scode += 1 + LINK_SIZE;
+ if (*scode == OP_CALLOUT) scode += PRIV(OP_lengths)[OP_CALLOUT];
+ switch (*scode)
+ {
+ case OP_CREF:
+ case OP_NCREF:
+ case OP_RREF:
+ case OP_NRREF:
+ case OP_DEF:
+ return FALSE;
+
+ default: /* Assertion */
+ if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
+ do scode += GET(scode, 1); while (*scode == OP_ALT);
+ scode += 1 + LINK_SIZE;
+ break;
+ }
+ scode = first_significant_code(scode, FALSE);
+ op = *scode;
+ }
+
/* Non-capturing brackets */
- if (op == OP_BRA)
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
{
- if (!is_startline(scode, bracket_map, backref_map)) return FALSE;
+ if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
}
/* Capturing brackets */
- else if (op == OP_CBRA)
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
{
int n = GET2(scode, 1+LINK_SIZE);
int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
- if (!is_startline(scode, new_map, backref_map)) return FALSE;
+ if (!is_startline(scode, new_map, cd, atomcount)) return FALSE;
}
- /* Other brackets */
+ /* Positive forward assertions */
- else if (op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
- { if (!is_startline(scode, bracket_map, backref_map)) return FALSE; }
+ else if (op == OP_ASSERT)
+ {
+ if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
+ }
- /* .* means "start at start or after \n" if it isn't in brackets that
- may be referenced. */
+ /* Atomic brackets */
+
+ else if (op == OP_ONCE || op == OP_ONCE_NC)
+ {
+ if (!is_startline(scode, bracket_map, cd, atomcount + 1)) return FALSE;
+ }
+
+ /* .* means "start at start or after \n" if it isn't in atomic brackets or
+ brackets that may be referenced, as long as the pattern does not contain
+ *PRUNE or *SKIP, because these break the feature. Consider, for example,
+ /.*?a(*PRUNE)b/ with the subject "aab", which matches "ab", i.e. not at the
+ start of a line. */
else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR || op == OP_TYPEPOSSTAR)
{
- if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE;
+ if (scode[1] != OP_ANY || (bracket_map & cd->backref_map) != 0 ||
+ atomcount > 0 || cd->had_pruneorskip)
+ return FALSE;
}
- /* Check for explicit circumflex */
+ /* Check for explicit circumflex; anything else gives a FALSE result. Note
+ in particular that this includes atomic brackets OP_ONCE and OP_ONCE_NC
+ because the number of characters matched by .* cannot be adjusted inside
+ them. */
- else if (op != OP_CIRC) return FALSE;
+ else if (op != OP_CIRC && op != OP_CIRCM) return FALSE;
/* Move on to the next alternative */
@@ -5709,58 +7624,82 @@ we return that char, otherwise -1.
Arguments:
code points to start of expression (the bracket)
- options pointer to the options (used to check casing changes)
+ flags points to the first char flags, or to REQ_NONE
inassert TRUE if in an assertion
-Returns: -1 or the fixed first char
+Returns: the fixed first char, or 0 with REQ_NONE in flags
*/
-static int
-find_firstassertedchar(const uschar *code, int *options, BOOL inassert)
+static pcre_uint32
+find_firstassertedchar(const pcre_uchar *code, pcre_int32 *flags,
+ BOOL inassert)
{
-register int c = -1;
+register pcre_uint32 c = 0;
+int cflags = REQ_NONE;
+
+*flags = REQ_NONE;
do {
- int d;
- const uschar *scode =
- first_significant_code(code + 1+LINK_SIZE, options, PCRE_CASELESS, TRUE);
- register int op = *scode;
+ pcre_uint32 d;
+ int dflags;
+ int xl = (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? IMM2_SIZE:0;
+ const pcre_uchar *scode = first_significant_code(code + 1+LINK_SIZE + xl,
+ TRUE);
+ register pcre_uchar op = *scode;
switch(op)
{
default:
- return -1;
+ return 0;
case OP_BRA:
+ case OP_BRAPOS:
case OP_CBRA:
+ case OP_SCBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
case OP_ASSERT:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_COND:
- if ((d = find_firstassertedchar(scode, options, op == OP_ASSERT)) < 0)
- return -1;
- if (c < 0) c = d; else if (c != d) return -1;
+ d = find_firstassertedchar(scode, &dflags, op == OP_ASSERT);
+ if (dflags < 0)
+ return 0;
+ if (cflags < 0) { c = d; cflags = dflags; } else if (c != d || cflags != dflags) return 0;
break;
- case OP_EXACT: /* Fall through */
- scode += 2;
+ case OP_EXACT:
+ scode += IMM2_SIZE;
+ /* Fall through */
case OP_CHAR:
- case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
- if (!inassert) return -1;
- if (c < 0)
- {
- c = scode[1];
- if ((*options & PCRE_CASELESS) != 0) c |= REQ_CASELESS;
- }
- else if (c != scode[1]) return -1;
+ if (!inassert) return 0;
+ if (cflags < 0) { c = scode[1]; cflags = 0; }
+ else if (c != scode[1]) return 0;
+ break;
+
+ case OP_EXACTI:
+ scode += IMM2_SIZE;
+ /* Fall through */
+
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ if (!inassert) return 0;
+ if (cflags < 0) { c = scode[1]; cflags = REQ_CASELESS; }
+ else if (c != scode[1]) return 0;
break;
}
code += GET(code, 1);
}
while (*code == OP_ALT);
+
+*flags = cflags;
return c;
}
@@ -5778,7 +7717,7 @@ compatibility. The new function is given a new name.
Arguments:
pattern the regular expression
options various option bits
- errorcodeptr pointer to error code variable (erts_pcre_compile2() only)
+ errorcodeptr pointer to error code variable (pcre_compile2() only)
can be NULL if you don't want a code value
errorptr pointer to pointer to error text
erroroffset ptr offset in pattern where error was detected
@@ -5788,30 +7727,76 @@ Returns: pointer to compiled data block, or NULL on error,
with errorptr and erroroffset set
*/
-PCRE_EXP_DEFN pcre *
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
erts_pcre_compile(const char *pattern, int options, const char **errorptr,
+ int *erroroffset, const unsigned char *tables)
+#else
+PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
+pcre_compile(const char *pattern, int options, const char **errorptr,
+ int *erroroffset, const unsigned char *tables)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
+pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errorptr,
+ int *erroroffset, const unsigned char *tables)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN pcre32 * PCRE_CALL_CONVENTION
+pcre32_compile(PCRE_SPTR32 pattern, int options, const char **errorptr,
int *erroroffset, const unsigned char *tables)
+#endif
{
-return erts_pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+return erts_pcre_compile2(pattern, options, NULL, errorptr,
+ erroroffset, tables);
+#else
+return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#endif
+#elif defined COMPILE_PCRE16
+return pcre16_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#elif defined COMPILE_PCRE32
+return pcre32_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
+#endif
}
-PCRE_EXP_DEFN pcre *
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
erts_pcre_compile2(const char *pattern, int options, int *errorcodeptr,
const char **errorptr, int *erroroffset, const unsigned char *tables)
+#else
+PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
+pcre_compile2(const char *pattern, int options, int *errorcodeptr,
+ const char **errorptr, int *erroroffset, const unsigned char *tables)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
+pcre16_compile2(PCRE_SPTR16 pattern, int options, int *errorcodeptr,
+ const char **errorptr, int *erroroffset, const unsigned char *tables)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN pcre32 * PCRE_CALL_CONVENTION
+pcre32_compile2(PCRE_SPTR32 pattern, int options, int *errorcodeptr,
+ const char **errorptr, int *erroroffset, const unsigned char *tables)
+#endif
{
-real_pcre *re;
+REAL_PCRE *re;
int length = 1; /* For final END opcode */
-int firstbyte, reqbyte, newline;
+pcre_int32 firstcharflags, reqcharflags;
+pcre_uint32 firstchar, reqchar;
+pcre_uint32 limit_match = PCRE_UINT32_MAX;
+pcre_uint32 limit_recursion = PCRE_UINT32_MAX;
+int newline;
int errorcode = 0;
int skipatstart = 0;
-#ifdef SUPPORT_UTF8
-BOOL utf8;
-#endif
+BOOL utf;
+BOOL never_utf = FALSE;
size_t size;
-uschar *code;
-const uschar *codestart;
-const uschar *ptr;
+pcre_uchar *code;
+const pcre_uchar *codestart;
+const pcre_uchar *ptr;
compile_data compile_block;
compile_data *cd = &compile_block;
@@ -5819,13 +7804,14 @@ compile_data *cd = &compile_block;
computing the amount of memory that is needed. Compiled items are thrown away
as soon as possible, so that a fairly large buffer should be sufficient for
this purpose. The same space is used in the second phase for remembering where
-to fill in forward references to subpatterns. */
+to fill in forward references to subpatterns. That may overflow, in which case
+new memory is obtained from malloc(). */
-uschar cworkspace[COMPILE_WORK_SIZE];
+pcre_uchar cworkspace[COMPILE_WORK_SIZE];
/* Set this early so that early errors get offset 0. */
-ptr = (const uschar *)pattern;
+ptr = (const pcre_uchar *)pattern;
/* We can't pass back an error message if errorptr is NULL; I guess the best we
can do is just return NULL, but we can set a code value if there is a code
@@ -5850,60 +7836,113 @@ if (erroroffset == NULL)
*erroroffset = 0;
-/* Can't support UTF8 unless PCRE has been compiled to include the code. */
+/* Set up pointers to the individual character tables */
-#ifdef SUPPORT_UTF8
-utf8 = (options & PCRE_UTF8) != 0;
-if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&
- (*erroroffset = _erts_pcre_valid_utf8((uschar *)pattern, -1)) >= 0)
- {
- errorcode = ERR44;
- goto PCRE_EARLY_ERROR_RETURN2;
- }
-#else
-if ((options & PCRE_UTF8) != 0)
- {
- errorcode = ERR32;
- goto PCRE_EARLY_ERROR_RETURN;
- }
-#endif
+if (tables == NULL) tables = PRIV(default_tables);
+cd->lcc = tables + lcc_offset;
+cd->fcc = tables + fcc_offset;
+cd->cbits = tables + cbits_offset;
+cd->ctypes = tables + ctypes_offset;
+
+/* Check that all undefined public option bits are zero */
-if ((options & ~PUBLIC_OPTIONS) != 0)
+if ((options & ~PUBLIC_COMPILE_OPTIONS) != 0)
{
errorcode = ERR17;
goto PCRE_EARLY_ERROR_RETURN;
}
-/* Set up pointers to the individual character tables */
+/* If PCRE_NEVER_UTF is set, remember it. */
-if (tables == NULL) tables = _erts_pcre_default_tables;
-cd->lcc = tables + lcc_offset;
-cd->fcc = tables + fcc_offset;
-cd->cbits = tables + cbits_offset;
-cd->ctypes = tables + ctypes_offset;
+if ((options & PCRE_NEVER_UTF) != 0) never_utf = TRUE;
/* Check for global one-time settings at the start of the pattern, and remember
the offset for later. */
-while (ptr[skipatstart] == '(' && ptr[skipatstart+1] == '*')
+cd->external_flags = 0; /* Initialize here for LIMIT_MATCH/RECURSION */
+
+while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
+ ptr[skipatstart+1] == CHAR_ASTERISK)
{
int newnl = 0;
int newbsr = 0;
- if (strncmp((char *)(ptr+skipatstart+2), "CR)", 3) == 0)
+/* For completeness and backward compatibility, (*UTFn) is supported in the
+relevant libraries, but (*UTF) is generic and always supported. Note that
+PCRE_UTF8 == PCRE_UTF16 == PCRE_UTF32. */
+
+#ifdef COMPILE_PCRE8
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF8_RIGHTPAR, 5) == 0)
+ { skipatstart += 7; options |= PCRE_UTF8; continue; }
+#endif
+#ifdef COMPILE_PCRE16
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF16_RIGHTPAR, 6) == 0)
+ { skipatstart += 8; options |= PCRE_UTF16; continue; }
+#endif
+#ifdef COMPILE_PCRE32
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF32_RIGHTPAR, 6) == 0)
+ { skipatstart += 8; options |= PCRE_UTF32; continue; }
+#endif
+
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 4) == 0)
+ { skipatstart += 6; options |= PCRE_UTF8; continue; }
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)
+ { skipatstart += 6; options |= PCRE_UCP; continue; }
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)
+ { skipatstart += 15; options |= PCRE_NO_START_OPTIMIZE; continue; }
+
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_MATCH_EQ, 12) == 0)
+ {
+ pcre_uint32 c = 0;
+ int p = skipatstart + 14;
+ while (isdigit(ptr[p]))
+ {
+ if (c > PCRE_UINT32_MAX / 10 - 1) break; /* Integer overflow */
+ c = c*10 + ptr[p++] - CHAR_0;
+ }
+ if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
+ if (c < limit_match)
+ {
+ limit_match = c;
+ cd->external_flags |= PCRE_MLSET;
+ }
+ skipatstart = p;
+ continue;
+ }
+
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_RECURSION_EQ, 16) == 0)
+ {
+ pcre_uint32 c = 0;
+ int p = skipatstart + 18;
+ while (isdigit(ptr[p]))
+ {
+ if (c > PCRE_UINT32_MAX / 10 - 1) break; /* Integer overflow check */
+ c = c*10 + ptr[p++] - CHAR_0;
+ }
+ if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
+ if (c < limit_recursion)
+ {
+ limit_recursion = c;
+ cd->external_flags |= PCRE_RLSET;
+ }
+ skipatstart = p;
+ continue;
+ }
+
+ if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CR_RIGHTPAR, 3) == 0)
{ skipatstart += 5; newnl = PCRE_NEWLINE_CR; }
- else if (strncmp((char *)(ptr+skipatstart+2), "LF)", 3) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LF_RIGHTPAR, 3) == 0)
{ skipatstart += 5; newnl = PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+skipatstart+2), "CRLF)", 5) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CRLF_RIGHTPAR, 5) == 0)
{ skipatstart += 7; newnl = PCRE_NEWLINE_CR + PCRE_NEWLINE_LF; }
- else if (strncmp((char *)(ptr+skipatstart+2), "ANY)", 4) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANY_RIGHTPAR, 4) == 0)
{ skipatstart += 6; newnl = PCRE_NEWLINE_ANY; }
- else if (strncmp((char *)(ptr+skipatstart+2), "ANYCRLF)", 8) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANYCRLF_RIGHTPAR, 8) == 0)
{ skipatstart += 10; newnl = PCRE_NEWLINE_ANYCRLF; }
- else if (strncmp((char *)(ptr+skipatstart+2), "BSR_ANYCRLF)", 12) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_ANYCRLF_RIGHTPAR, 12) == 0)
{ skipatstart += 14; newbsr = PCRE_BSR_ANYCRLF; }
- else if (strncmp((char *)(ptr+skipatstart+2), "BSR_UNICODE)", 12) == 0)
+ else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_UNICODE_RIGHTPAR, 12) == 0)
{ skipatstart += 14; newbsr = PCRE_BSR_UNICODE; }
if (newnl != 0)
@@ -5913,15 +7952,57 @@ while (ptr[skipatstart] == '(' && ptr[skipatstart+1] == '*')
else break;
}
+/* PCRE_UTF(16|32) have the same value as PCRE_UTF8. */
+utf = (options & PCRE_UTF8) != 0;
+if (utf && never_utf)
+ {
+ errorcode = ERR78;
+ goto PCRE_EARLY_ERROR_RETURN2;
+ }
+
+/* Can't support UTF unless PCRE has been compiled to include the code. The
+return of an error code from PRIV(valid_utf)() is a new feature, introduced in
+release 8.13. It is passed back from pcre_[dfa_]exec(), but at the moment is
+not used here. */
+
+#ifdef SUPPORT_UTF
+if (utf && (options & PCRE_NO_UTF8_CHECK) == 0 &&
+ (errorcode = PRIV(valid_utf)((PCRE_PUCHAR)pattern, -1, erroroffset)) != 0)
+ {
+#if defined COMPILE_PCRE8
+ errorcode = ERR44;
+#elif defined COMPILE_PCRE16
+ errorcode = ERR74;
+#elif defined COMPILE_PCRE32
+ errorcode = ERR77;
+#endif
+ goto PCRE_EARLY_ERROR_RETURN2;
+ }
+#else
+if (utf)
+ {
+ errorcode = ERR32;
+ goto PCRE_EARLY_ERROR_RETURN;
+ }
+#endif
+
+/* Can't support UCP unless PCRE has been compiled to include the code. */
+
+#ifndef SUPPORT_UCP
+if ((options & PCRE_UCP) != 0)
+ {
+ errorcode = ERR67;
+ goto PCRE_EARLY_ERROR_RETURN;
+ }
+#endif
+
/* Check validity of \R options. */
-switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
+if ((options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) ==
+ (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
{
- case 0:
- case PCRE_BSR_ANYCRLF:
- case PCRE_BSR_UNICODE:
- break;
- default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
+ errorcode = ERR56;
+ goto PCRE_EARLY_ERROR_RETURN;
}
/* Handle different types of newline. The three bits give seven cases. The
@@ -5931,10 +8012,10 @@ current code allows for fixed one- or two-byte sequences, plus "any" and
switch (options & PCRE_NEWLINE_BITS)
{
case 0: newline = NEWLINE; break; /* Build-time default */
- case PCRE_NEWLINE_CR: newline = '\r'; break;
- case PCRE_NEWLINE_LF: newline = '\n'; break;
+ case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
+ case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
case PCRE_NEWLINE_CR+
- PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;
+ PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
case PCRE_NEWLINE_ANY: newline = -1; break;
case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
@@ -5974,7 +8055,10 @@ cd->backref_map = 0;
/* Reflect pattern for debugging output */
DPRINTF(("------------------------------------------------------------------\n"));
-DPRINTF(("%s\n", pattern));
+#ifdef PCRE_DEBUG
+print_puchar(stdout, (PCRE_PUCHAR)pattern);
+#endif
+DPRINTF(("\n"));
/* Pretend to compile the pattern while actually just accumulating the length
of memory required. This behaviour is triggered by passing a non-NULL final
@@ -5987,14 +8071,17 @@ cd->bracount = cd->final_bracount = 0;
cd->names_found = 0;
cd->name_entry_size = 0;
cd->name_table = NULL;
-cd->start_workspace = cworkspace;
cd->start_code = cworkspace;
cd->hwm = cworkspace;
-cd->start_pattern = (const uschar *)pattern;
-cd->end_pattern = (const uschar *)(pattern + strlen(pattern));
+cd->start_workspace = cworkspace;
+cd->workspace_size = COMPILE_WORK_SIZE;
+cd->start_pattern = (const pcre_uchar *)pattern;
+cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
cd->req_varyopt = 0;
+cd->assert_depth = 0;
+cd->max_lookbehind = 0;
cd->external_options = options;
-cd->external_flags = 0;
+cd->open_caps = NULL;
/* Now do the pre-compile. On error, errorcode will be set non-zero, so we
don't need to look at the result of the function here. The initial options have
@@ -6005,13 +8092,13 @@ outside can help speed up starting point checks. */
ptr += skipatstart;
code = cworkspace;
*code = OP_BRA;
-(void)compile_regex(cd->external_options, cd->external_options & PCRE_IMS,
- &code, &ptr, &errorcode, FALSE, FALSE, 0, &firstbyte, &reqbyte, NULL, cd,
- &length);
+(void)compile_regex(cd->external_options, &code, &ptr, &errorcode, FALSE,
+ FALSE, 0, 0, &firstchar, &firstcharflags, &reqchar, &reqcharflags, NULL,
+ cd, &length);
if (errorcode != 0) goto PCRE_EARLY_ERROR_RETURN;
DPRINTF(("end pre-compile: length=%d workspace=%d\n", length,
- cd->hwm - cworkspace));
+ (int)(cd->hwm - cworkspace)));
if (length > MAX_PATTERN_SIZE)
{
@@ -6024,8 +8111,8 @@ externally provided function. Integer overflow should no longer be possible
because nowadays we limit the maximum value of cd->names_found and
cd->name_entry_size. */
-size = length + sizeof(real_pcre) + cd->names_found * (cd->name_entry_size + 3);
-re = (real_pcre *)(erts_pcre_malloc)(size);
+size = sizeof(REAL_PCRE) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);
+re = (REAL_PCRE *)(PUBL(malloc))(size);
if (re == NULL)
{
@@ -6040,18 +8127,24 @@ regex compiled on a system with 4-byte pointers is run on another with 8-byte
pointers. */
re->magic_number = MAGIC_NUMBER;
-re->size = size;
+re->size = (int)size;
re->options = cd->external_options;
re->flags = cd->external_flags;
-re->dummy1 = 0;
-re->first_byte = 0;
-re->req_byte = 0;
-re->name_table_offset = sizeof(real_pcre);
+re->limit_match = limit_match;
+re->limit_recursion = limit_recursion;
+re->first_char = 0;
+re->req_char = 0;
+re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);
re->name_entry_size = cd->name_entry_size;
re->name_count = cd->names_found;
re->ref_count = 0;
-re->tables = (tables == _erts_pcre_default_tables)? NULL : tables;
+re->tables = (tables == PRIV(default_tables))? NULL : tables;
re->nullpad = NULL;
+#ifdef COMPILE_PCRE32
+re->dummy = 0;
+#else
+re->dummy1 = re->dummy2 = re->dummy3 = 0;
+#endif
/* The starting points of the name/number translation table and of the code are
passed around in the compile data block. The start/end pattern and initial
@@ -6061,69 +8154,144 @@ field; this time it's used for remembering forward references to subpatterns.
*/
cd->final_bracount = cd->bracount; /* Save for checking forward references */
+cd->assert_depth = 0;
cd->bracount = 0;
+cd->max_lookbehind = 0;
cd->names_found = 0;
-cd->name_table = (uschar *)re + re->name_table_offset;
+cd->name_table = (pcre_uchar *)re + re->name_table_offset;
codestart = cd->name_table + re->name_entry_size * re->name_count;
cd->start_code = codestart;
-cd->hwm = cworkspace;
+cd->hwm = (pcre_uchar *)(cd->start_workspace);
cd->req_varyopt = 0;
cd->had_accept = FALSE;
+cd->had_pruneorskip = FALSE;
+cd->check_lookbehind = FALSE;
+cd->open_caps = NULL;
/* Set up a starting, non-extracting bracket, then compile the expression. On
error, errorcode will be set non-zero, so we don't need to look at the result
of the function here. */
-ptr = (const uschar *)pattern + skipatstart;
-code = (uschar *)codestart;
+ptr = (const pcre_uchar *)pattern + skipatstart;
+code = (pcre_uchar *)codestart;
*code = OP_BRA;
-(void)compile_regex(re->options, re->options & PCRE_IMS, &code, &ptr,
- &errorcode, FALSE, FALSE, 0, &firstbyte, &reqbyte, NULL, cd, NULL);
+(void)compile_regex(re->options, &code, &ptr, &errorcode, FALSE, FALSE, 0, 0,
+ &firstchar, &firstcharflags, &reqchar, &reqcharflags, NULL, cd, NULL);
re->top_bracket = cd->bracount;
re->top_backref = cd->top_backref;
-re->flags = cd->external_flags;
+re->max_lookbehind = cd->max_lookbehind;
+re->flags = cd->external_flags | PCRE_MODE;
-if (cd->had_accept) reqbyte = -1; /* Must disable after (*ACCEPT) */
+if (cd->had_accept)
+ {
+ reqchar = 0; /* Must disable after (*ACCEPT) */
+ reqcharflags = REQ_NONE;
+ }
/* If not reached end of pattern on success, there's an excess bracket. */
-if (errorcode == 0 && *ptr != 0) errorcode = ERR22;
+if (errorcode == 0 && *ptr != CHAR_NULL) errorcode = ERR22;
/* Fill in the terminating state and check for disastrous overflow, but
if debugging, leave the test till after things are printed out. */
*code++ = OP_END;
-#ifndef DEBUG
+#ifndef PCRE_DEBUG
if (code - codestart > length) errorcode = ERR23;
#endif
-/* Fill in any forward references that are required. */
+#ifdef SUPPORT_VALGRIND
+/* If the estimated length exceeds the really used length, mark the extra
+allocated memory as unaddressable, so that any out-of-bound reads can be
+detected. */
+VALGRIND_MAKE_MEM_NOACCESS(code, (length - (code - codestart)) * sizeof(pcre_uchar));
+#endif
+
+/* Fill in any forward references that are required. There may be repeated
+references; optimize for them, as searching a large regex takes time. */
-while (errorcode == 0 && cd->hwm > cworkspace)
+if (cd->hwm > cd->start_workspace)
{
- int offset, recno;
- const uschar *groupptr;
- cd->hwm -= LINK_SIZE;
- offset = GET(cd->hwm, 0);
- recno = GET(codestart, offset);
- groupptr = find_bracket(codestart, (re->options & PCRE_UTF8) != 0, recno);
- if (groupptr == NULL) errorcode = ERR53;
- else PUT(((uschar *)codestart), offset, groupptr - codestart);
+ int prev_recno = -1;
+ const pcre_uchar *groupptr = NULL;
+ while (errorcode == 0 && cd->hwm > cd->start_workspace)
+ {
+ int offset, recno;
+ cd->hwm -= LINK_SIZE;
+ offset = GET(cd->hwm, 0);
+ recno = GET(codestart, offset);
+ if (recno != prev_recno)
+ {
+ groupptr = PRIV(find_bracket)(codestart, utf, recno);
+ prev_recno = recno;
+ }
+ if (groupptr == NULL) errorcode = ERR53;
+ else PUT(((pcre_uchar *)codestart), offset, (int)(groupptr - codestart));
+ }
}
+/* If the workspace had to be expanded, free the new memory. */
+
+if (cd->workspace_size > COMPILE_WORK_SIZE)
+ (PUBL(free))((void *)cd->start_workspace);
+
/* Give an error if there's back reference to a non-existent capturing
subpattern. */
if (errorcode == 0 && re->top_backref > re->top_bracket) errorcode = ERR15;
+/* If there were any lookbehind assertions that contained OP_RECURSE
+(recursions or subroutine calls), a flag is set for them to be checked here,
+because they may contain forward references. Actual recursions cannot be fixed
+length, but subroutine calls can. It is done like this so that those without
+OP_RECURSE that are not fixed length get a diagnosic with a useful offset. The
+exceptional ones forgo this. We scan the pattern to check that they are fixed
+length, and set their lengths. */
+
+if (cd->check_lookbehind)
+ {
+ pcre_uchar *cc = (pcre_uchar *)codestart;
+
+ /* Loop, searching for OP_REVERSE items, and process those that do not have
+ their length set. (Actually, it will also re-process any that have a length
+ of zero, but that is a pathological case, and it does no harm.) When we find
+ one, we temporarily terminate the branch it is in while we scan it. */
+
+ for (cc = (pcre_uchar *)PRIV(find_bracket)(codestart, utf, -1);
+ cc != NULL;
+ cc = (pcre_uchar *)PRIV(find_bracket)(cc, utf, -1))
+ {
+ if (GET(cc, 1) == 0)
+ {
+ int fixed_length;
+ pcre_uchar *be = cc - 1 - LINK_SIZE + GET(cc, -LINK_SIZE);
+ int end_op = *be;
+ *be = OP_END;
+ fixed_length = find_fixedlength(cc, (re->options & PCRE_UTF8) != 0, TRUE,
+ cd);
+ *be = end_op;
+ DPRINTF(("fixed length = %d\n", fixed_length));
+ if (fixed_length < 0)
+ {
+ errorcode = (fixed_length == -2)? ERR36 :
+ (fixed_length == -4)? ERR70 : ERR25;
+ break;
+ }
+ if (fixed_length > cd->max_lookbehind) cd->max_lookbehind = fixed_length;
+ PUT(cc, 1, fixed_length);
+ }
+ cc += 1 + LINK_SIZE;
+ }
+ }
+
/* Failed to compile, or error while post-processing */
if (errorcode != 0)
{
- (erts_pcre_free)(re);
+ (PUBL(free))(re);
PCRE_EARLY_ERROR_RETURN:
- *erroroffset = ptr - (const uschar *)pattern;
+ *erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
PCRE_EARLY_ERROR_RETURN2:
*errorptr = find_error_text(errorcode);
if (errorcodeptr != NULL) *errorcodeptr = errorcode;
@@ -6131,33 +8299,57 @@ if (errorcode != 0)
}
/* If the anchored option was not passed, set the flag if we can determine that
-the pattern is anchored by virtue of ^ characters or \A or anything else (such
-as starting with .* when DOTALL is set).
+the pattern is anchored by virtue of ^ characters or \A or anything else, such
+as starting with non-atomic .* when DOTALL is set and there are no occurrences
+of *PRUNE or *SKIP.
Otherwise, if we know what the first byte has to be, save it, because that
speeds up unanchored matches no end. If not, see if we can set the
PCRE_STARTLINE flag. This is helpful for multiline matches when all branches
-start with ^. and also when all branches start with .* for non-DOTALL matches.
-*/
+start with ^. and also when all branches start with non-atomic .* for
+non-DOTALL matches when *PRUNE and SKIP are not present. */
if ((re->options & PCRE_ANCHORED) == 0)
{
- int temp_options = re->options; /* May get changed during these scans */
- if (is_anchored(codestart, &temp_options, 0, cd->backref_map))
- re->options |= PCRE_ANCHORED;
+ if (is_anchored(codestart, 0, cd, 0)) re->options |= PCRE_ANCHORED;
else
{
- if (firstbyte < 0)
- firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE);
- if (firstbyte >= 0) /* Remove caseless flag for non-caseable chars */
+ if (firstcharflags < 0)
+ firstchar = find_firstassertedchar(codestart, &firstcharflags, FALSE);
+ if (firstcharflags >= 0) /* Remove caseless flag for non-caseable chars */
{
- int ch = firstbyte & 255;
- re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
- cd->fcc[ch] == ch)? ch : firstbyte;
+#if defined COMPILE_PCRE8
+ re->first_char = firstchar & 0xff;
+#elif defined COMPILE_PCRE16
+ re->first_char = firstchar & 0xffff;
+#elif defined COMPILE_PCRE32
+ re->first_char = firstchar;
+#endif
+ if ((firstcharflags & REQ_CASELESS) != 0)
+ {
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ /* We ignore non-ASCII first chars in 8 bit mode. */
+ if (utf)
+ {
+ if (re->first_char < 128)
+ {
+ if (cd->fcc[re->first_char] != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+ else if (UCD_OTHERCASE(re->first_char) != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+ else
+#endif
+ if (MAX_255(re->first_char)
+ && cd->fcc[re->first_char] != re->first_char)
+ re->flags |= PCRE_FCH_CASELESS;
+ }
+
re->flags |= PCRE_FIRSTSET;
}
- else if (is_startline(codestart, 0, cd->backref_map))
- re->flags |= PCRE_STARTLINE;
+
+ else if (is_startline(codestart, 0, cd, 0)) re->flags |= PCRE_STARTLINE;
}
}
@@ -6165,20 +8357,43 @@ if ((re->options & PCRE_ANCHORED) == 0)
variable length item in the regex. Remove the caseless flag for non-caseable
bytes. */
-if (reqbyte >= 0 &&
- ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))
+if (reqcharflags >= 0 &&
+ ((re->options & PCRE_ANCHORED) == 0 || (reqcharflags & REQ_VARY) != 0))
{
- int ch = reqbyte & 255;
- re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
- cd->fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
+#if defined COMPILE_PCRE8
+ re->req_char = reqchar & 0xff;
+#elif defined COMPILE_PCRE16
+ re->req_char = reqchar & 0xffff;
+#elif defined COMPILE_PCRE32
+ re->req_char = reqchar;
+#endif
+ if ((reqcharflags & REQ_CASELESS) != 0)
+ {
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ /* We ignore non-ASCII first chars in 8 bit mode. */
+ if (utf)
+ {
+ if (re->req_char < 128)
+ {
+ if (cd->fcc[re->req_char] != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+ else if (UCD_OTHERCASE(re->req_char) != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+ else
+#endif
+ if (MAX_255(re->req_char) && cd->fcc[re->req_char] != re->req_char)
+ re->flags |= PCRE_RCH_CASELESS;
+ }
+
re->flags |= PCRE_REQCHSET;
}
/* Print out the compiled data if debugging is enabled. This is never the
case when building a production library. */
-#ifdef DEBUG
-
+#ifdef PCRE_DEBUG
printf("Length = %d top_bracket = %d top_backref = %d\n",
length, re->top_bracket, re->top_backref);
@@ -6186,38 +8401,50 @@ printf("Options=%08x\n", re->options);
if ((re->flags & PCRE_FIRSTSET) != 0)
{
- int ch = re->first_byte & 255;
- const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)?
- "" : " (caseless)";
- if (isprint(ch)) printf("First char = %c%s\n", ch, caseless);
+ pcre_uchar ch = re->first_char;
+ const char *caseless =
+ ((re->flags & PCRE_FCH_CASELESS) == 0)? "" : " (caseless)";
+ if (PRINTABLE(ch)) printf("First char = %c%s\n", ch, caseless);
else printf("First char = \\x%02x%s\n", ch, caseless);
}
if ((re->flags & PCRE_REQCHSET) != 0)
{
- int ch = re->req_byte & 255;
- const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)?
- "" : " (caseless)";
- if (isprint(ch)) printf("Req char = %c%s\n", ch, caseless);
+ pcre_uchar ch = re->req_char;
+ const char *caseless =
+ ((re->flags & PCRE_RCH_CASELESS) == 0)? "" : " (caseless)";
+ if (PRINTABLE(ch)) printf("Req char = %c%s\n", ch, caseless);
else printf("Req char = \\x%02x%s\n", ch, caseless);
}
-pcre_printint(re, stdout, TRUE);
+#if defined COMPILE_PCRE8
+pcre_printint((pcre *)re, stdout, TRUE);
+#elif defined COMPILE_PCRE16
+pcre16_printint((pcre *)re, stdout, TRUE);
+#elif defined COMPILE_PCRE32
+pcre32_printint((pcre *)re, stdout, TRUE);
+#endif
/* This check is done here in the debugging case so that the code that
was compiled can be seen. */
if (code - codestart > length)
{
- (erts_pcre_free)(re);
+ (PUBL(free))(re);
*errorptr = find_error_text(ERR23);
- *erroroffset = ptr - (uschar *)pattern;
+ *erroroffset = ptr - (pcre_uchar *)pattern;
if (errorcodeptr != NULL) *errorcodeptr = ERR23;
return NULL;
}
-#endif /* DEBUG */
+#endif /* PCRE_DEBUG */
+#if defined COMPILE_PCRE8
return (pcre *)re;
+#elif defined COMPILE_PCRE16
+return (pcre16 *)re;
+#elif defined COMPILE_PCRE32
+return (pcre32 *)re;
+#endif
}
/* End of pcre_compile.c */
diff --git a/erts/emulator/pcre/pcre_config.c b/erts/emulator/pcre/pcre_config.c
index 122327d67d..06fa3d324f 100644
--- a/erts/emulator/pcre/pcre_config.c
+++ b/erts/emulator/pcre/pcre_config.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_config(). */
+/* This module contains the external function pcre_config(). */
/* %ExternalCopyright% */
@@ -46,6 +46,13 @@ POSSIBILITY OF SUCH DAMAGE.
#include "config.h"
#endif
+#ifdef ERLANG_INTEGRATION
+#include "local_config.h"
+#endif
+
+/* Keep the original link size. */
+static int real_link_size = LINK_SIZE;
+
#include "pcre_internal.h"
@@ -63,18 +70,62 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
-PCRE_EXP_DEFN int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_config(int what, void *where)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_config(int what, void *where)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_config(int what, void *where)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_config(int what, void *where)
+#endif
{
switch (what)
{
case PCRE_CONFIG_UTF8:
-#ifdef SUPPORT_UTF8
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ *((int *)where) = 0;
+ return PCRE_ERROR_BADOPTION;
+#else
+#if defined SUPPORT_UTF
*((int *)where) = 1;
#else
*((int *)where) = 0;
#endif
break;
+#endif
+
+ case PCRE_CONFIG_UTF16:
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32
+ *((int *)where) = 0;
+ return PCRE_ERROR_BADOPTION;
+#else
+#if defined SUPPORT_UTF
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+#endif
+
+ case PCRE_CONFIG_UTF32:
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+ *((int *)where) = 0;
+ return PCRE_ERROR_BADOPTION;
+#else
+#if defined SUPPORT_UTF
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+#endif
case PCRE_CONFIG_UNICODE_PROPERTIES:
#ifdef SUPPORT_UCP
@@ -84,6 +135,22 @@ switch (what)
#endif
break;
+ case PCRE_CONFIG_JIT:
+#ifdef SUPPORT_JIT
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+
+ case PCRE_CONFIG_JITTARGET:
+#ifdef SUPPORT_JIT
+ *((const char **)where) = PRIV(jit_get_target)();
+#else
+ *((const char **)where) = NULL;
+#endif
+ break;
+
case PCRE_CONFIG_NEWLINE:
*((int *)where) = NEWLINE;
break;
@@ -97,7 +164,7 @@ switch (what)
break;
case PCRE_CONFIG_LINK_SIZE:
- *((int *)where) = LINK_SIZE;
+ *((int *)where) = real_link_size;
break;
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD:
@@ -105,11 +172,11 @@ switch (what)
break;
case PCRE_CONFIG_MATCH_LIMIT:
- *((unsigned int *)where) = MATCH_LIMIT;
+ *((unsigned long int *)where) = MATCH_LIMIT;
break;
case PCRE_CONFIG_MATCH_LIMIT_RECURSION:
- *((unsigned int *)where) = MATCH_LIMIT_RECURSION;
+ *((unsigned long int *)where) = MATCH_LIMIT_RECURSION;
break;
case PCRE_CONFIG_STACKRECURSE:
diff --git a/erts/emulator/pcre/pcre_dfa_exec.c b/erts/emulator/pcre/pcre_dfa_exec.c
index a6e501317f..f5718a3b33 100644
--- a/erts/emulator/pcre/pcre_dfa_exec.c
+++ b/erts/emulator/pcre/pcre_dfa_exec.c
@@ -3,10 +3,11 @@
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
+and semantics are as close as possible to those of the Perl 5 language (but see
+below for why this module is different).
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,14 +38,41 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
-
-/* This module contains the external function erts_pcre_dfa_exec(), which is an
+/* This module contains the external function pcre_dfa_exec(), which is an
alternative matching function that uses a sort of DFA algorithm (not a true
-FSM). This is NOT Perl- compatible, but it has advantages in certain
+FSM). This is NOT Perl-compatible, but it has advantages in certain
applications. */
/* %ExternalCopyright% */
+/* NOTE ABOUT PERFORMANCE: A user of this function sent some code that improved
+the performance of his patterns greatly. I could not use it as it stood, as it
+was not thread safe, and made assumptions about pattern sizes. Also, it caused
+test 7 to loop, and test 9 to crash with a segfault.
+
+The issue is the check for duplicate states, which is done by a simple linear
+search up the state list. (Grep for "duplicate" below to find the code.) For
+many patterns, there will never be many states active at one time, so a simple
+linear search is fine. In patterns that have many active states, it might be a
+bottleneck. The suggested code used an indexing scheme to remember which states
+had previously been used for each character, and avoided the linear search when
+it knew there was no chance of a duplicate. This was implemented when adding
+states to the state lists.
+
+I wrote some thread-safe, not-limited code to try something similar at the time
+of checking for duplicates (instead of when adding states), using index vectors
+on the stack. It did give a 13% improvement with one specially constructed
+pattern for certain subject strings, but on other strings and on many of the
+simpler patterns in the test suite it did worse. The major problem, I think,
+was the extra time to initialize the index. This had to be done for each call
+of internal_dfa_exec(). (The supplied patch used a static vector, initialized
+only once - I suspect this was the cause of the problems with the tests.)
+
+Overall, I concluded that the gains in some cases did not outweigh the losses
+in others, so I abandoned this code. */
+
+
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -61,7 +89,6 @@ applications. */
#define SP " "
-
/*************************************************
* Code parameters and static tables *
*************************************************/
@@ -79,35 +106,49 @@ never stored, so we push them well clear of the normal opcodes. */
/* This table identifies those opcodes that are followed immediately by a
-character that is to be tested in some way. This makes is possible to
+character that is to be tested in some way. This makes it possible to
centralize the loading of these characters. In the case of Type * etc, the
"character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a
-small value. ***NOTE*** If the start of this table is modified, the two tables
-that follow must also be modified. */
+small value. Non-zero values in the table are the offsets from the opcode where
+the character is to be found. ***NOTE*** If the start of this table is
+modified, the three tables that follow must also be modified. */
-static uschar coptable[] = {
+static const pcre_uint8 coptable[] = {
0, /* End */
0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */
0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */
- 0, 0, /* Any, Anybyte */
- 0, 0, 0, /* NOTPROP, PROP, EXTUNI */
+ 0, 0, 0, /* Any, AllAny, Anybyte */
+ 0, 0, /* \P, \p */
0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */
- 0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */
+ 0, /* \X */
+ 0, 0, 0, 0, 0, 0, /* \Z, \z, ^, ^M, $, $M */
1, /* Char */
- 1, /* Charnc */
+ 1, /* Chari */
1, /* not */
+ 1, /* noti */
/* Positive single-char repeats */
1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
- 3, 3, 3, /* upto, minupto, exact */
- 1, 1, 1, 3, /* *+, ++, ?+, upto+ */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* upto, minupto */
+ 1+IMM2_SIZE, /* exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* *I, *?I, +I, +?I, ?I, ??I */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* upto I, minupto I */
+ 1+IMM2_SIZE, /* exact I */
+ 1, 1, 1, 1+IMM2_SIZE, /* *+I, ++I, ?+I, upto+I */
/* Negative single-char repeats - only for chars < 256 */
1, 1, 1, 1, 1, 1, /* NOT *, *?, +, +?, ?, ?? */
- 3, 3, 3, /* NOT upto, minupto, exact */
- 1, 1, 1, 3, /* NOT *+, ++, ?+, updo+ */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* NOT upto, minupto */
+ 1+IMM2_SIZE, /* NOT exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* NOT *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* NOT *I, *?I, +I, +?I, ?I, ??I */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* NOT upto I, minupto I */
+ 1+IMM2_SIZE, /* NOT exact I */
+ 1, 1, 1, 1+IMM2_SIZE, /* NOT *+I, ++I, ?+I, upto+I */
/* Positive type repeats */
1, 1, 1, 1, 1, 1, /* Type *, *?, +, +?, ?, ?? */
- 3, 3, 3, /* Type upto, minupto, exact */
- 1, 1, 1, 3, /* Type *+, ++, ?+, upto+ */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* Type upto, minupto */
+ 1+IMM2_SIZE, /* Type exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* Type *+, ++, ?+, upto+ */
/* Character class & ref repeats */
0, 0, 0, 0, 0, 0, /* *, *?, +, +?, ?, ?? */
0, 0, /* CRRANGE, CRMINRANGE */
@@ -115,44 +156,118 @@ static uschar coptable[] = {
0, /* NCLASS */
0, /* XCLASS - variable length */
0, /* REF */
+ 0, /* REFI */
0, /* RECURSE */
0, /* CALLOUT */
0, /* Alt */
0, /* Ket */
0, /* KetRmax */
0, /* KetRmin */
+ 0, /* KetRpos */
+ 0, /* Reverse */
0, /* Assert */
0, /* Assert not */
0, /* Assert behind */
0, /* Assert behind not */
+ 0, 0, /* ONCE, ONCE_NC */
+ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
+ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */
+ 0, 0, /* CREF, NCREF */
+ 0, 0, /* RREF, NRREF */
+ 0, /* DEF */
+ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
+ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
+ 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
+ 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0 /* CLOSE, SKIPZERO */
+};
+
+/* This table identifies those opcodes that inspect a character. It is used to
+remember the fact that a character could have been inspected when the end of
+the subject is reached. ***NOTE*** If the start of this table is modified, the
+two tables that follow must also be modified. */
+
+static const pcre_uint8 poptable[] = {
+ 0, /* End */
+ 0, 0, 0, 1, 1, /* \A, \G, \K, \B, \b */
+ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */
+ 1, 1, 1, /* Any, AllAny, Anybyte */
+ 1, 1, /* \P, \p */
+ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */
+ 1, /* \X */
+ 0, 0, 0, 0, 0, 0, /* \Z, \z, ^, ^M, $, $M */
+ 1, /* Char */
+ 1, /* Chari */
+ 1, /* not */
+ 1, /* noti */
+ /* Positive single-char repeats */
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* upto, minupto, exact */
+ 1, 1, 1, 1, /* *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* *I, *?I, +I, +?I, ?I, ??I */
+ 1, 1, 1, /* upto I, minupto I, exact I */
+ 1, 1, 1, 1, /* *+I, ++I, ?+I, upto+I */
+ /* Negative single-char repeats - only for chars < 256 */
+ 1, 1, 1, 1, 1, 1, /* NOT *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* NOT upto, minupto, exact */
+ 1, 1, 1, 1, /* NOT *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* NOT *I, *?I, +I, +?I, ?I, ??I */
+ 1, 1, 1, /* NOT upto I, minupto I, exact I */
+ 1, 1, 1, 1, /* NOT *+I, ++I, ?+I, upto+I */
+ /* Positive type repeats */
+ 1, 1, 1, 1, 1, 1, /* Type *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* Type upto, minupto, exact */
+ 1, 1, 1, 1, /* Type *+, ++, ?+, upto+ */
+ /* Character class & ref repeats */
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
+ 1, 1, /* CRRANGE, CRMINRANGE */
+ 1, /* CLASS */
+ 1, /* NCLASS */
+ 1, /* XCLASS - variable length */
+ 0, /* REF */
+ 0, /* REFI */
+ 0, /* RECURSE */
+ 0, /* CALLOUT */
+ 0, /* Alt */
+ 0, /* Ket */
+ 0, /* KetRmax */
+ 0, /* KetRmin */
+ 0, /* KetRpos */
0, /* Reverse */
- 0, 0, 0, 0, /* ONCE, BRA, CBRA, COND */
- 0, 0, 0, /* SBRA, SCBRA, SCOND */
- 0, /* CREF */
- 0, /* RREF */
+ 0, /* Assert */
+ 0, /* Assert not */
+ 0, /* Assert behind */
+ 0, /* Assert behind not */
+ 0, 0, /* ONCE, ONCE_NC */
+ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
+ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */
+ 0, 0, /* CREF, NCREF */
+ 0, 0, /* RREF, NRREF */
0, /* DEF */
- 0, 0, /* BRAZERO, BRAMINZERO */
- 0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */
- 0, 0 /* FAIL, ACCEPT */
+ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
+ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
+ 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
+ 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0 /* CLOSE, SKIPZERO */
};
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,
and \w */
-static uschar toptable1[] = {
+static const pcre_uint8 toptable1[] = {
0, 0, 0, 0, 0, 0,
ctype_digit, ctype_digit,
ctype_space, ctype_space,
ctype_word, ctype_word,
- 0 /* OP_ANY */
+ 0, 0 /* OP_ANY, OP_ALLANY */
};
-static uschar toptable2[] = {
+static const pcre_uint8 toptable2[] = {
0, 0, 0, 0, 0, 0,
ctype_digit, 0,
ctype_space, 0,
ctype_word, 0,
- 1 /* OP_ANY */
+ 1, 1 /* OP_ANY, OP_ALLANY */
};
@@ -164,14 +279,13 @@ these structures in, is a vector of ints. */
typedef struct stateblock {
int offset; /* Offset to opcode */
int count; /* Count for repeats */
- int ims; /* ims flag bits */
int data; /* Some use extra data */
} stateblock;
-#define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int))
+#define INTS_PER_STATEBLOCK (int)(sizeof(stateblock)/sizeof(int))
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
/*************************************************
* Print character string *
*************************************************/
@@ -187,15 +301,15 @@ Returns: nothing
*/
static void
-pchars(unsigned char *p, int length, FILE *f)
+pchars(const pcre_uchar *p, int length, FILE *f)
{
-int c;
+pcre_uint32 c;
while (length-- > 0)
{
if (isprint(c = *(p++)))
fprintf(f, "%c", c);
else
- fprintf(f, "\\x%02x", c);
+ fprintf(f, "\\x{%02x}", c);
}
}
#endif
@@ -220,12 +334,10 @@ Arguments:
offsetcount size of same
workspace vector of workspace
wscount size of same
- ims the current ims flags
rlevel function call recursion level
- recursing regex recursive call level
-Returns: > 0 =>
- = 0 =>
+Returns: > 0 => number of match offset pairs placed in offsets
+ = 0 => offsets overflowed; longest matches are present
-1 => failed to match
< -1 => some kind of unexpected problem
@@ -237,7 +349,6 @@ for the current character, one for the following character). */
{ \
next_active_state->offset = (x); \
next_active_state->count = (y); \
- next_active_state->ims = ims; \
next_active_state++; \
DPRINTF(("%.*sADD_ACTIVE(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
} \
@@ -248,7 +359,6 @@ for the current character, one for the following character). */
{ \
next_active_state->offset = (x); \
next_active_state->count = (y); \
- next_active_state->ims = ims; \
next_active_state->data = (z); \
next_active_state++; \
DPRINTF(("%.*sADD_ACTIVE_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \
@@ -260,7 +370,6 @@ for the current character, one for the following character). */
{ \
next_new_state->offset = (x); \
next_new_state->count = (y); \
- next_new_state->ims = ims; \
next_new_state++; \
DPRINTF(("%.*sADD_NEW(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
} \
@@ -271,10 +380,10 @@ for the current character, one for the following character). */
{ \
next_new_state->offset = (x); \
next_new_state->count = (y); \
- next_new_state->ims = ims; \
next_new_state->data = (z); \
next_new_state++; \
- DPRINTF(("%.*sADD_NEW_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \
+ DPRINTF(("%.*sADD_NEW_DATA(%d,%d,%d) line %d\n", rlevel*2-2, SP, \
+ (x), (y), (z), __LINE__)); \
} \
else return PCRE_ERROR_DFA_WSSIZE
@@ -283,39 +392,41 @@ for the current character, one for the following character). */
static int
internal_dfa_exec(
dfa_match_data *md,
- const uschar *this_start_code,
- const uschar *current_subject,
+ const pcre_uchar *this_start_code,
+ const pcre_uchar *current_subject,
int start_offset,
int *offsets,
int offsetcount,
int *workspace,
int wscount,
- int ims,
- int rlevel,
- int recursing)
+ int rlevel)
{
stateblock *active_states, *new_states, *temp_states;
stateblock *next_active_state, *next_new_state;
-const uschar *ctypes, *lcc, *fcc;
-const uschar *ptr;
-const uschar *end_code, *first_op;
+const pcre_uint8 *ctypes, *lcc, *fcc;
+const pcre_uchar *ptr;
+const pcre_uchar *end_code, *first_op;
+
+dfa_recursion_info new_recursive;
int active_count, new_count, match_count;
/* Some fields in the md block are frequently referenced, so we load them into
independent variables in the hope that this will perform better. */
-const uschar *start_subject = md->start_subject;
-const uschar *end_subject = md->end_subject;
-const uschar *start_code = md->start_code;
+const pcre_uchar *start_subject = md->start_subject;
+const pcre_uchar *end_subject = md->end_subject;
+const pcre_uchar *start_code = md->start_code;
-#ifdef SUPPORT_UTF8
-BOOL utf8 = (md->poptions & PCRE_UTF8) != 0;
+#ifdef SUPPORT_UTF
+BOOL utf = (md->poptions & PCRE_UTF8) != 0;
#else
-BOOL utf8 = FALSE;
+BOOL utf = FALSE;
#endif
+BOOL reset_could_continue = FALSE;
+
rlevel++;
offsetcount &= (-2);
@@ -324,8 +435,8 @@ wscount = (wscount - (wscount % (INTS_PER_STATEBLOCK * 2))) /
(2 * INTS_PER_STATEBLOCK);
DPRINTF(("\n%.*s---------------------\n"
- "%.*sCall to internal_dfa_exec f=%d r=%d\n",
- rlevel*2-2, SP, rlevel*2-2, SP, rlevel, recursing));
+ "%.*sCall to internal_dfa_exec f=%d\n",
+ rlevel*2-2, SP, rlevel*2-2, SP, rlevel));
ctypes = md->tables + ctypes_offset;
lcc = md->tables + lcc_offset;
@@ -338,7 +449,9 @@ next_new_state = new_states = active_states + wscount;
new_count = 0;
first_op = this_start_code + 1 + LINK_SIZE +
- ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA)? 2:0);
+ ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA ||
+ *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS)
+ ? IMM2_SIZE:0);
/* The first thing in any (sub) pattern is a bracket of some sort. Push all
the alternative states onto the list, and find out where the end is. This
@@ -366,18 +479,16 @@ if (*first_op == OP_REVERSE)
/* If we can't go back the amount required for the longest lookbehind
pattern, go back as far as we can; some alternatives may still be viable. */
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
/* In character mode we have to step back character by character */
- if (utf8)
+ if (utf)
{
for (gone_back = 0; gone_back < max_back; gone_back++)
{
if (current_subject <= start_subject) break;
current_subject--;
- while (current_subject > start_subject &&
- (*current_subject & 0xc0) == 0x80)
- current_subject--;
+ ACROSSCHAR(current_subject > start_subject, *current_subject, current_subject--);
}
}
else
@@ -387,10 +498,15 @@ if (*first_op == OP_REVERSE)
{
gone_back = (current_subject - max_back < start_subject)?
- current_subject - start_subject : max_back;
+ (int)(current_subject - start_subject) : max_back;
current_subject -= gone_back;
}
+ /* Save the earliest consulted character */
+
+ if (current_subject < md->start_used_ptr)
+ md->start_used_ptr = current_subject;
+
/* Now we can process the individual branches. */
end_code = this_start_code;
@@ -399,7 +515,7 @@ if (*first_op == OP_REVERSE)
int back = GET(end_code, 2+LINK_SIZE);
if (back <= gone_back)
{
- int bstate = end_code - start_code + 2 + 2*LINK_SIZE;
+ int bstate = (int)(end_code - start_code + 2 + 2*LINK_SIZE);
ADD_NEW_DATA(-bstate, 0, gone_back - back);
}
end_code += GET(end_code, 1);
@@ -432,10 +548,12 @@ else
else
{
int length = 1 + LINK_SIZE +
- ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA)? 2:0);
+ ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA ||
+ *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS)
+ ? IMM2_SIZE:0);
do
{
- ADD_NEW(end_code - start_code + length, 0);
+ ADD_NEW((int)(end_code - start_code + length), 0);
end_code += GET(end_code, 1);
length = 1 + LINK_SIZE;
}
@@ -445,7 +563,7 @@ else
workspace[0] = 0; /* Bit indicating which vector is current */
-DPRINTF(("%.*sEnd state = %d\n", rlevel*2-2, SP, end_code - start_code));
+DPRINTF(("%.*sEnd state = %d\n", rlevel*2-2, SP, (int)(end_code - start_code)));
/* Loop for scanning the subject */
@@ -454,7 +572,11 @@ for (;;)
{
int i, j;
int clen, dlen;
- unsigned int c, d;
+ pcre_uint32 c, d;
+ int forced_fail = 0;
+ BOOL partial_newline = FALSE;
+ BOOL could_continue = reset_could_continue;
+ reset_could_continue = FALSE;
/* Make the new state list into the active state list and empty the
new state list. */
@@ -468,9 +590,9 @@ for (;;)
workspace[0] ^= 1; /* Remember for the restarting feature */
workspace[1] = active_count;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP);
- pchars((uschar *)ptr, strlen((char *)ptr), stdout);
+ pchars(ptr, STRLEN_UC(ptr), stdout);
printf("\"\n");
printf("%.*sActive states: ", rlevel*2-2, SP);
@@ -490,11 +612,12 @@ for (;;)
if (ptr < end_subject)
{
- clen = 1; /* Number of bytes in the character */
-#ifdef SUPPORT_UTF8
- if (utf8) { GETCHARLEN(c, ptr, clen); } else
-#endif /* SUPPORT_UTF8 */
+ clen = 1; /* Number of data items in the character */
+#ifdef SUPPORT_UTF
+ GETCHARLENTEST(c, ptr, clen);
+#else
c = *ptr;
+#endif /* SUPPORT_UTF */
}
else
{
@@ -510,27 +633,23 @@ for (;;)
for (i = 0; i < active_count; i++)
{
stateblock *current_state = active_states + i;
- const uschar *code;
+ BOOL caseless = FALSE;
+ const pcre_uchar *code;
int state_offset = current_state->offset;
- int count, codevalue;
-#ifdef SUPPORT_UCP
- int chartype, script;
-#endif
+ int codevalue, rrc;
+ int count;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset);
if (clen == 0) printf("EOL\n");
else if (c > 32 && c < 127) printf("'%c'\n", c);
else printf("0x%02x\n", c);
#endif
- /* This variable is referred to implicity in the ADD_xxx macros. */
-
- ims = current_state->ims;
-
/* A negative offset is a special case meaning "hold off going to this
(negated) state until the number of characters in the data field have
- been skipped". */
+ been skipped". If the could_continue flag was passed over from a previous
+ state, arrange for it to passed on. */
if (state_offset < 0)
{
@@ -539,6 +658,7 @@ for (;;)
DPRINTF(("%.*sSkipping this character\n", rlevel*2-2, SP));
ADD_NEW_DATA(state_offset, current_state->count,
current_state->data - 1);
+ if (could_continue) reset_could_continue = TRUE;
continue;
}
else
@@ -547,7 +667,9 @@ for (;;)
}
}
- /* Check for a duplicate state with the same count, and skip if found. */
+ /* Check for a duplicate state with the same count, and skip if found.
+ See the note at the head of this module about the possibility of improving
+ performance here. */
for (j = 0; j < i; j++)
{
@@ -564,23 +686,29 @@ for (;;)
code = start_code + state_offset;
codevalue = *code;
+ /* If this opcode inspects a character, but we are at the end of the
+ subject, remember the fact for use when testing for a partial match. */
+
+ if (clen == 0 && poptable[codevalue] != 0)
+ could_continue = TRUE;
+
/* If this opcode is followed by an inline character, load it. It is
tempting to test for the presence of a subject character here, but that
is wrong, because sometimes zero repetitions of the subject are
permitted.
We also use this mechanism for opcodes such as OP_TYPEPLUS that take an
- argument that is not a data character - but is always one byte long. We
- have to take special action to deal with \P, \p, \H, \h, \V, \v and \X in
- this case. To keep the other cases fast, convert these ones to new opcodes.
- */
+ argument that is not a data character - but is always one byte long because
+ the values are small. We have to take special action to deal with \P, \p,
+ \H, \h, \V, \v and \X in this case. To keep the other cases fast, convert
+ these ones to new opcodes. */
if (coptable[codevalue] > 0)
{
dlen = 1;
-#ifdef SUPPORT_UTF8
- if (utf8) { GETCHARLEN(d, (code + coptable[codevalue]), dlen); } else
-#endif /* SUPPORT_UTF8 */
+#ifdef SUPPORT_UTF
+ if (utf) { GETCHARLEN(d, (code + coptable[codevalue]), dlen); } else
+#endif /* SUPPORT_UTF */
d = code[coptable[codevalue]];
if (codevalue >= OP_TYPESTAR)
{
@@ -610,16 +738,35 @@ for (;;)
switch (codevalue)
{
+/* ========================================================================== */
+ /* These cases are never obeyed. This is a fudge that causes a compile-
+ time error if the vectors coptable or poptable, which are indexed by
+ opcode, are not the correct length. It seems to be the only way to do
+ such a check at compile time, as the sizeof() operator does not work
+ in the C preprocessor. */
+
+ case OP_TABLE_LENGTH:
+ case OP_TABLE_LENGTH +
+ ((sizeof(coptable) == OP_TABLE_LENGTH) &&
+ (sizeof(poptable) == OP_TABLE_LENGTH)):
+ break;
/* ========================================================================== */
/* Reached a closing bracket. If not at the end of the pattern, carry
- on with the next opcode. Otherwise, unless we have an empty string and
- PCRE_NOTEMPTY is set, save the match data, shifting up all previous
+ on with the next opcode. For repeating opcodes, also add the repeat
+ state. Note that KETRPOS will always be encountered at the end of the
+ subpattern, because the possessive subpattern repeats are always handled
+ using recursive calls. Thus, it never adds any new states.
+
+ At the end of the (sub)pattern, unless we have an empty string and
+ PCRE_NOTEMPTY is set, or PCRE_NOTEMPTY_ATSTART is set and we are at the
+ start of the subject, save the match data, shifting up all previous
matches so we always have the longest first. */
case OP_KET:
case OP_KETRMIN:
case OP_KETRMAX:
+ case OP_KETRPOS:
if (code != end_code)
{
ADD_ACTIVE(state_offset + 1 + LINK_SIZE, 0);
@@ -628,26 +775,32 @@ for (;;)
ADD_ACTIVE(state_offset - GET(code, 1), 0);
}
}
- else if (ptr > current_subject || (md->moptions & PCRE_NOTEMPTY) == 0)
+ else
{
- if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
- else if (match_count > 0 && ++match_count * 2 >= offsetcount)
- match_count = 0;
- count = ((match_count == 0)? offsetcount : match_count * 2) - 2;
- if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int));
- if (offsetcount >= 2)
+ if (ptr > current_subject ||
+ ((md->moptions & PCRE_NOTEMPTY) == 0 &&
+ ((md->moptions & PCRE_NOTEMPTY_ATSTART) == 0 ||
+ current_subject > start_subject + md->start_offset)))
{
- offsets[0] = current_subject - start_subject;
- offsets[1] = ptr - start_subject;
- DPRINTF(("%.*sSet matched string = \"%.*s\"\n", rlevel*2-2, SP,
- offsets[1] - offsets[0], current_subject));
- }
- if ((md->moptions & PCRE_DFA_SHORTEST) != 0)
- {
- DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"
- "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel,
- match_count, rlevel*2-2, SP));
- return match_count;
+ if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
+ else if (match_count > 0 && ++match_count * 2 > offsetcount)
+ match_count = 0;
+ count = ((match_count == 0)? offsetcount : match_count * 2) - 2;
+ if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int));
+ if (offsetcount >= 2)
+ {
+ offsets[0] = (int)(current_subject - start_subject);
+ offsets[1] = (int)(ptr - start_subject);
+ DPRINTF(("%.*sSet matched string = \"%.*s\"\n", rlevel*2-2, SP,
+ offsets[1] - offsets[0], (char *)current_subject));
+ }
+ if ((md->moptions & PCRE_DFA_SHORTEST) != 0)
+ {
+ DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"
+ "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel,
+ match_count, rlevel*2-2, SP));
+ return match_count;
+ }
}
}
break;
@@ -659,7 +812,7 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_ALT:
do { code += GET(code, 1); } while (*code == OP_ALT);
- ADD_ACTIVE(code - start_code, 0);
+ ADD_ACTIVE((int)(code - start_code), 0);
break;
/*-----------------------------------------------------------------*/
@@ -667,7 +820,7 @@ for (;;)
case OP_SBRA:
do
{
- ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
code += GET(code, 1);
}
while (*code == OP_ALT);
@@ -676,11 +829,11 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_CBRA:
case OP_SCBRA:
- ADD_ACTIVE(code - start_code + 3 + LINK_SIZE, 0);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE + IMM2_SIZE), 0);
code += GET(code, 1);
while (*code == OP_ALT)
{
- ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
code += GET(code, 1);
}
break;
@@ -691,27 +844,37 @@ for (;;)
ADD_ACTIVE(state_offset + 1, 0);
code += 1 + GET(code, 2);
while (*code == OP_ALT) code += GET(code, 1);
- ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_SKIPZERO:
+ code += 1 + GET(code, 2);
+ while (*code == OP_ALT) code += GET(code, 1);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
break;
/*-----------------------------------------------------------------*/
case OP_CIRC:
- if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) ||
- ((ims & PCRE_MULTILINE) != 0 &&
- ptr != end_subject &&
- WAS_NEWLINE(ptr)))
+ if (ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0)
{ ADD_ACTIVE(state_offset + 1, 0); }
break;
/*-----------------------------------------------------------------*/
- case OP_EOD:
- if (ptr >= end_subject) { ADD_ACTIVE(state_offset + 1, 0); }
+ case OP_CIRCM:
+ if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) ||
+ (ptr != end_subject && WAS_NEWLINE(ptr)))
+ { ADD_ACTIVE(state_offset + 1, 0); }
break;
/*-----------------------------------------------------------------*/
- case OP_OPT:
- ims = code[1];
- ADD_ACTIVE(state_offset + 2, 0);
+ case OP_EOD:
+ if (ptr >= end_subject)
+ {
+ if ((md->moptions & PCRE_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else { ADD_ACTIVE(state_offset + 1, 0); }
+ }
break;
/*-----------------------------------------------------------------*/
@@ -733,13 +896,34 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_ANY:
- if (clen > 0 && ((ims & PCRE_DOTALL) != 0 || !IS_NEWLINE(ptr)))
+ if (clen > 0 && !IS_NEWLINE(ptr))
+ {
+ if (ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else
+ {
+ ADD_NEW(state_offset + 1, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_ALLANY:
+ if (clen > 0)
{ ADD_NEW(state_offset + 1, 0); }
break;
/*-----------------------------------------------------------------*/
case OP_EODN:
- if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - md->nllen))
+ if (clen == 0 && (md->moptions & PCRE_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - md->nllen))
{ ADD_ACTIVE(state_offset + 1, 0); }
break;
@@ -747,13 +931,53 @@ for (;;)
case OP_DOLL:
if ((md->moptions & PCRE_NOTEOL) == 0)
{
- if (clen == 0 ||
- (IS_NEWLINE(ptr) &&
- ((ims & PCRE_MULTILINE) != 0 || ptr == end_subject - md->nllen)
+ if (clen == 0 && (md->moptions & PCRE_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 ||
+ ((md->poptions & PCRE_DOLLAR_ENDONLY) == 0 && IS_NEWLINE(ptr) &&
+ (ptr == end_subject - md->nllen)
))
{ ADD_ACTIVE(state_offset + 1, 0); }
+ else if (ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ if ((md->moptions & PCRE_PARTIAL_HARD) != 0)
+ {
+ reset_could_continue = TRUE;
+ ADD_NEW_DATA(-(state_offset + 1), 0, 1);
+ }
+ else could_continue = partial_newline = TRUE;
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_DOLLM:
+ if ((md->moptions & PCRE_NOTEOL) == 0)
+ {
+ if (clen == 0 && (md->moptions & PCRE_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 ||
+ ((md->poptions & PCRE_DOLLAR_ENDONLY) == 0 && IS_NEWLINE(ptr)))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ else if (ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ if ((md->moptions & PCRE_PARTIAL_HARD) != 0)
+ {
+ reset_could_continue = TRUE;
+ ADD_NEW_DATA(-(state_offset + 1), 0, 1);
+ }
+ else could_continue = partial_newline = TRUE;
+ }
}
- else if ((ims & PCRE_MULTILINE) != 0 && IS_NEWLINE(ptr))
+ else if (IS_NEWLINE(ptr))
{ ADD_ACTIVE(state_offset + 1, 0); }
break;
@@ -784,17 +1008,43 @@ for (;;)
if (ptr > start_subject)
{
- const uschar *temp = ptr - 1;
-#ifdef SUPPORT_UTF8
- if (utf8) BACKCHAR(temp);
+ const pcre_uchar *temp = ptr - 1;
+ if (temp < md->start_used_ptr) md->start_used_ptr = temp;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf) { BACKCHAR(temp); }
#endif
GETCHARTEST(d, temp);
+#ifdef SUPPORT_UCP
+ if ((md->poptions & PCRE_UCP) != 0)
+ {
+ if (d == '_') left_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(d);
+ left_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
left_word = d < 256 && (ctypes[d] & ctype_word) != 0;
}
- else left_word = 0;
+ else left_word = FALSE;
- if (clen > 0) right_word = c < 256 && (ctypes[c] & ctype_word) != 0;
- else right_word = 0;
+ if (clen > 0)
+ {
+#ifdef SUPPORT_UCP
+ if ((md->poptions & PCRE_UCP) != 0)
+ {
+ if (c == '_') right_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ right_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ right_word = c < 256 && (ctypes[c] & ctype_word) != 0;
+ }
+ else right_word = FALSE;
if ((left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY))
{ ADD_ACTIVE(state_offset + 1, 0); }
@@ -813,7 +1063,8 @@ for (;;)
if (clen > 0)
{
BOOL OK;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
+ const pcre_uint32 *cp;
+ const ucd_record * prop = GET_UCD(c);
switch(code[1])
{
case PT_ANY:
@@ -821,19 +1072,59 @@ for (;;)
break;
case PT_LAMP:
- OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
break;
case PT_GC:
- OK = category == code[2];
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[2];
break;
case PT_PC:
- OK = chartype == code[2];
+ OK = prop->chartype == code[2];
break;
case PT_SC:
- OK = script == code[2];
+ OK = prop->script == code[2];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ case PT_SPACE: /* Perl space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[2];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
break;
/* Should never occur, but keep compilers from grumbling. */
@@ -853,8 +1144,8 @@ for (;;)
/* ========================================================================== */
/* These opcodes likewise inspect the subject character, but have an
argument that is not a data character. It is one of these opcodes:
- OP_ANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, OP_WORDCHAR,
- OP_NOT_WORDCHAR. The value is loaded into d. */
+ OP_ANY, OP_ALLANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE,
+ OP_WORDCHAR, OP_NOT_WORDCHAR. The value is loaded into d. */
case OP_TYPEPLUS:
case OP_TYPEMINPLUS:
@@ -863,12 +1154,17 @@ for (;;)
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
if (clen > 0)
{
- if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ if (d == OP_ANY && ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
(c < 256 &&
- (d != OP_ANY ||
- (ims & PCRE_DOTALL) != 0 ||
- !IS_NEWLINE(ptr)
- ) &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
{
if (count > 0 && codevalue == OP_TYPEPOSPLUS)
@@ -889,12 +1185,17 @@ for (;;)
ADD_ACTIVE(state_offset + 2, 0);
if (clen > 0)
{
- if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ if (d == OP_ANY && ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
(c < 256 &&
- (d != OP_ANY ||
- (ims & PCRE_DOTALL) != 0 ||
- !IS_NEWLINE(ptr)
- ) &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
{
if (codevalue == OP_TYPEPOSQUERY)
@@ -914,12 +1215,17 @@ for (;;)
ADD_ACTIVE(state_offset + 2, 0);
if (clen > 0)
{
- if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ if (d == OP_ANY && ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
(c < 256 &&
- (d != OP_ANY ||
- (ims & PCRE_DOTALL) != 0 ||
- !IS_NEWLINE(ptr)
- ) &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
{
if (codevalue == OP_TYPEPOSSTAR)
@@ -937,16 +1243,21 @@ for (;;)
count = current_state->count; /* Number already matched */
if (clen > 0)
{
- if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ if (d == OP_ANY && ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
(c < 256 &&
- (d != OP_ANY ||
- (ims & PCRE_DOTALL) != 0 ||
- !IS_NEWLINE(ptr)
- ) &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
{
- if (++count >= GET2(code, 1))
- { ADD_NEW(state_offset + 4, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 1 + IMM2_SIZE + 1, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -957,16 +1268,21 @@ for (;;)
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- ADD_ACTIVE(state_offset + 4, 0);
+ ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0);
count = current_state->count; /* Number already matched */
if (clen > 0)
{
- if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ if (d == OP_ANY && ptr + 1 >= md->end_subject &&
+ (md->moptions & (PCRE_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
(c < 256 &&
- (d != OP_ANY ||
- (ims & PCRE_DOTALL) != 0 ||
- !IS_NEWLINE(ptr)
- ) &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
{
if (codevalue == OP_TYPEPOSUPTO)
@@ -974,8 +1290,8 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW(state_offset + 4, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 2 + IMM2_SIZE, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -997,7 +1313,8 @@ for (;;)
if (clen > 0)
{
BOOL OK;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
+ const pcre_uint32 *cp;
+ const ucd_record * prop = GET_UCD(c);
switch(code[2])
{
case PT_ANY:
@@ -1005,19 +1322,59 @@ for (;;)
break;
case PT_LAMP:
- OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
break;
case PT_GC:
- OK = category == code[3];
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
break;
case PT_PC:
- OK = chartype == code[3];
+ OK = prop->chartype == code[3];
break;
case PT_SC:
- OK = script == code[3];
+ OK = prop->script == code[3];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ case PT_SPACE: /* Perl space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[3];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
break;
/* Should never occur, but keep compilers from grumbling. */
@@ -1046,23 +1403,26 @@ for (;;)
case OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS:
count = current_state->count; /* Already matched */
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
- if (clen > 0 && _erts_pcre_ucp_findprop(c, &chartype, &script) != ucp_M)
+ if (clen > 0)
{
- const uschar *nptr = ptr + clen;
+ int lgb, rgb;
+ const pcre_uchar *nptr = ptr + clen;
int ncount = 0;
if (count > 0 && codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS)
{
active_count--; /* Remove non-match possibility */
next_active_state--;
}
+ lgb = UCD_GRAPHBREAK(c);
while (nptr < end_subject)
{
- int nd;
- int ndlen = 1;
- GETCHARLEN(nd, nptr, ndlen);
- if (_erts_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break;
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
ncount++;
- nptr += ndlen;
+ lgb = rgb;
+ nptr += dlen;
}
count++;
ADD_NEW_DATA(-state_offset, count, ncount);
@@ -1081,20 +1441,22 @@ for (;;)
int ncount = 0;
switch (c)
{
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
goto ANYNL01;
- case 0x000d:
- if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1;
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;
/* Fall through */
ANYNL01:
- case 0x000a:
+ case CHAR_LF:
if (count > 0 && codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSPLUS)
{
active_count--; /* Remove non-match possibility */
@@ -1121,13 +1483,7 @@ for (;;)
BOOL OK;
switch (c)
{
- case 0x000a:
- case 0x000b:
- case 0x000c:
- case 0x000d:
- case 0x0085:
- case 0x2028:
- case 0x2029:
+ VSPACE_CASES:
OK = TRUE;
break;
@@ -1160,25 +1516,7 @@ for (;;)
BOOL OK;
switch (c)
{
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
+ HSPACE_CASES:
OK = TRUE;
break;
@@ -1219,7 +1557,8 @@ for (;;)
if (clen > 0)
{
BOOL OK;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
+ const pcre_uint32 *cp;
+ const ucd_record * prop = GET_UCD(c);
switch(code[2])
{
case PT_ANY:
@@ -1227,19 +1566,59 @@ for (;;)
break;
case PT_LAMP:
- OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
break;
case PT_GC:
- OK = category == code[3];
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
break;
case PT_PC:
- OK = chartype == code[3];
+ OK = prop->chartype == code[3];
break;
case PT_SC:
- OK = script == code[3];
+ OK = prop->script == code[3];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ case PT_SPACE: /* Perl space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[3];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
break;
/* Should never occur, but keep compilers from grumbling. */
@@ -1277,9 +1656,10 @@ for (;;)
QS2:
ADD_ACTIVE(state_offset + 2, 0);
- if (clen > 0 && _erts_pcre_ucp_findprop(c, &chartype, &script) != ucp_M)
+ if (clen > 0)
{
- const uschar *nptr = ptr + clen;
+ int lgb, rgb;
+ const pcre_uchar *nptr = ptr + clen;
int ncount = 0;
if (codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSSTAR ||
codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSQUERY)
@@ -1287,14 +1667,16 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
+ lgb = UCD_GRAPHBREAK(c);
while (nptr < end_subject)
{
- int nd;
- int ndlen = 1;
- GETCHARLEN(nd, nptr, ndlen);
- if (_erts_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break;
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
ncount++;
- nptr += ndlen;
+ lgb = rgb;
+ nptr += dlen;
}
ADD_NEW_DATA(-(state_offset + count), 0, ncount);
}
@@ -1320,27 +1702,29 @@ for (;;)
int ncount = 0;
switch (c)
{
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
goto ANYNL02;
- case 0x000d:
- if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1;
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;
/* Fall through */
ANYNL02:
- case 0x000a:
+ case CHAR_LF:
if (codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSSTAR ||
codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSQUERY)
{
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- ADD_NEW_DATA(-(state_offset + count), 0, ncount);
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, ncount);
break;
default:
@@ -1368,13 +1752,7 @@ for (;;)
BOOL OK;
switch (c)
{
- case 0x000a:
- case 0x000b:
- case 0x000c:
- case 0x000d:
- case 0x0085:
- case 0x2028:
- case 0x2029:
+ VSPACE_CASES:
OK = TRUE;
break;
@@ -1390,7 +1768,7 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- ADD_NEW_DATA(-(state_offset + count), 0, 0);
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, 0);
}
}
break;
@@ -1414,25 +1792,7 @@ for (;;)
BOOL OK;
switch (c)
{
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
+ HSPACE_CASES:
OK = TRUE;
break;
@@ -1449,7 +1809,7 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- ADD_NEW_DATA(-(state_offset + count), 0, 0);
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, 0);
}
}
break;
@@ -1461,32 +1821,73 @@ for (;;)
case OP_PROP_EXTRA + OP_TYPEMINUPTO:
case OP_PROP_EXTRA + OP_TYPEPOSUPTO:
if (codevalue != OP_PROP_EXTRA + OP_TYPEEXACT)
- { ADD_ACTIVE(state_offset + 6, 0); }
+ { ADD_ACTIVE(state_offset + 1 + IMM2_SIZE + 3, 0); }
count = current_state->count; /* Number already matched */
if (clen > 0)
{
BOOL OK;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
- switch(code[4])
+ const pcre_uint32 *cp;
+ const ucd_record * prop = GET_UCD(c);
+ switch(code[1 + IMM2_SIZE + 1])
{
case PT_ANY:
OK = TRUE;
break;
case PT_LAMP:
- OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
break;
case PT_GC:
- OK = category == code[5];
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[1 + IMM2_SIZE + 2];
break;
case PT_PC:
- OK = chartype == code[5];
+ OK = prop->chartype == code[1 + IMM2_SIZE + 2];
break;
case PT_SC:
- OK = script == code[5];
+ OK = prop->script == code[1 + IMM2_SIZE + 2];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ case PT_SPACE: /* Perl space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR;
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[1 + IMM2_SIZE + 2];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
break;
/* Should never occur, but keep compilers from grumbling. */
@@ -1503,8 +1904,8 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW(state_offset + 6, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 1 + IMM2_SIZE + 3, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -1517,28 +1918,33 @@ for (;;)
case OP_EXTUNI_EXTRA + OP_TYPEMINUPTO:
case OP_EXTUNI_EXTRA + OP_TYPEPOSUPTO:
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT)
- { ADD_ACTIVE(state_offset + 4, 0); }
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
count = current_state->count; /* Number already matched */
- if (clen > 0 && _erts_pcre_ucp_findprop(c, &chartype, &script) != ucp_M)
+ if (clen > 0)
{
- const uschar *nptr = ptr + clen;
+ int lgb, rgb;
+ const pcre_uchar *nptr = ptr + clen;
int ncount = 0;
if (codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSUPTO)
{
active_count--; /* Remove non-match possibility */
next_active_state--;
}
+ lgb = UCD_GRAPHBREAK(c);
while (nptr < end_subject)
{
- int nd;
- int ndlen = 1;
- GETCHARLEN(nd, nptr, ndlen);
- if (_erts_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break;
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
ncount++;
- nptr += ndlen;
+ lgb = rgb;
+ nptr += dlen;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW_DATA(-(state_offset + 4), 0, ncount); }
+ if (nptr >= end_subject && (md->moptions & PCRE_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); }
else
{ ADD_NEW_DATA(-state_offset, count, ncount); }
}
@@ -1551,34 +1957,36 @@ for (;;)
case OP_ANYNL_EXTRA + OP_TYPEMINUPTO:
case OP_ANYNL_EXTRA + OP_TYPEPOSUPTO:
if (codevalue != OP_ANYNL_EXTRA + OP_TYPEEXACT)
- { ADD_ACTIVE(state_offset + 4, 0); }
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
count = current_state->count; /* Number already matched */
if (clen > 0)
{
int ncount = 0;
switch (c)
{
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
goto ANYNL03;
- case 0x000d:
- if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1;
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;
/* Fall through */
ANYNL03:
- case 0x000a:
+ case CHAR_LF:
if (codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSUPTO)
{
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW_DATA(-(state_offset + 4), 0, ncount); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); }
else
{ ADD_NEW_DATA(-state_offset, count, ncount); }
break;
@@ -1595,20 +2003,14 @@ for (;;)
case OP_VSPACE_EXTRA + OP_TYPEMINUPTO:
case OP_VSPACE_EXTRA + OP_TYPEPOSUPTO:
if (codevalue != OP_VSPACE_EXTRA + OP_TYPEEXACT)
- { ADD_ACTIVE(state_offset + 4, 0); }
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
count = current_state->count; /* Number already matched */
if (clen > 0)
{
BOOL OK;
switch (c)
{
- case 0x000a:
- case 0x000b:
- case 0x000c:
- case 0x000d:
- case 0x0085:
- case 0x2028:
- case 0x2029:
+ VSPACE_CASES:
OK = TRUE;
break;
@@ -1623,8 +2025,8 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW_DATA(-(state_offset + 4), 0, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); }
else
{ ADD_NEW_DATA(-state_offset, count, 0); }
}
@@ -1637,32 +2039,14 @@ for (;;)
case OP_HSPACE_EXTRA + OP_TYPEMINUPTO:
case OP_HSPACE_EXTRA + OP_TYPEPOSUPTO:
if (codevalue != OP_HSPACE_EXTRA + OP_TYPEEXACT)
- { ADD_ACTIVE(state_offset + 4, 0); }
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
count = current_state->count; /* Number already matched */
if (clen > 0)
{
BOOL OK;
switch (c)
{
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
+ HSPACE_CASES:
OK = TRUE;
break;
@@ -1678,8 +2062,8 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW_DATA(-(state_offset + 4), 0, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); }
else
{ ADD_NEW_DATA(-state_offset, count, 0); }
}
@@ -1698,35 +2082,35 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
- case OP_CHARNC:
+ case OP_CHARI:
if (clen == 0) break;
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
if (c == d) { ADD_NEW(state_offset + dlen + 1, 0); } else
{
unsigned int othercase;
- if (c < 128) othercase = fcc[c]; else
-
- /* If we have Unicode property support, we can use it to test the
- other case of the character. */
-
+ if (c < 128)
+ othercase = fcc[c];
+ else
+ /* If we have Unicode property support, we can use it to test the
+ other case of the character. */
#ifdef SUPPORT_UCP
- othercase = _erts_pcre_ucp_othercase(c);
+ othercase = UCD_OTHERCASE(c);
#else
- othercase = NOTACHAR;
+ othercase = NOTACHAR;
#endif
if (d == othercase) { ADD_NEW(state_offset + dlen + 1, 0); }
}
}
else
-#endif /* SUPPORT_UTF8 */
-
- /* Non-UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ /* Not UTF mode */
{
- if (lcc[c] == lcc[d]) { ADD_NEW(state_offset + 2, 0); }
+ if (TABLE_GET(c, lcc, c) == TABLE_GET(d, lcc, d))
+ { ADD_NEW(state_offset + 2, 0); }
}
break;
@@ -1738,18 +2122,24 @@ for (;;)
to wait for them to pass before continuing. */
case OP_EXTUNI:
- if (clen > 0 && _erts_pcre_ucp_findprop(c, &chartype, &script) != ucp_M)
+ if (clen > 0)
{
- const uschar *nptr = ptr + clen;
+ int lgb, rgb;
+ const pcre_uchar *nptr = ptr + clen;
int ncount = 0;
+ lgb = UCD_GRAPHBREAK(c);
while (nptr < end_subject)
{
- int nclen = 1;
- GETCHARLEN(c, nptr, nclen);
- if (_erts_pcre_ucp_findprop(c, &chartype, &script) != ucp_M) break;
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
ncount++;
- nptr += nclen;
+ lgb = rgb;
+ nptr += dlen;
}
+ if (nptr >= end_subject && (md->moptions & PCRE_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
ADD_NEW_DATA(-(state_offset + 1), 0, ncount);
}
break;
@@ -1763,19 +2153,27 @@ for (;;)
case OP_ANYNL:
if (clen > 0) switch(c)
{
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if ((md->moptions & PCRE_BSR_ANYCRLF) != 0) break;
- case 0x000a:
+ case CHAR_LF:
ADD_NEW(state_offset + 1, 0);
break;
- case 0x000d:
- if (ptr + 1 < end_subject && ptr[1] == 0x0a)
+ case CHAR_CR:
+ if (ptr + 1 >= end_subject)
+ {
+ ADD_NEW(state_offset + 1, 0);
+ if ((md->moptions & PCRE_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
+ }
+ else if (RAWUCHARTEST(ptr + 1) == CHAR_LF)
{
ADD_NEW_DATA(-(state_offset + 1), 0, 1);
}
@@ -1791,13 +2189,7 @@ for (;;)
case OP_NOT_VSPACE:
if (clen > 0) switch(c)
{
- case 0x000a:
- case 0x000b:
- case 0x000c:
- case 0x000d:
- case 0x0085:
- case 0x2028:
- case 0x2029:
+ VSPACE_CASES:
break;
default:
@@ -1810,17 +2202,12 @@ for (;;)
case OP_VSPACE:
if (clen > 0) switch(c)
{
- case 0x000a:
- case 0x000b:
- case 0x000c:
- case 0x000d:
- case 0x0085:
- case 0x2028:
- case 0x2029:
+ VSPACE_CASES:
ADD_NEW(state_offset + 1, 0);
break;
- default: break;
+ default:
+ break;
}
break;
@@ -1828,25 +2215,7 @@ for (;;)
case OP_NOT_HSPACE:
if (clen > 0) switch(c)
{
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
+ HSPACE_CASES:
break;
default:
@@ -1859,44 +2228,55 @@ for (;;)
case OP_HSPACE:
if (clen > 0) switch(c)
{
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
+ HSPACE_CASES:
ADD_NEW(state_offset + 1, 0);
break;
+
+ default:
+ break;
}
break;
/*-----------------------------------------------------------------*/
- /* Match a negated single character. This is only used for one-byte
- characters, that is, we know that d < 256. The character we are
- checking (c) can be multibyte. */
+ /* Match a negated single character casefully. */
case OP_NOT:
+ if (clen > 0 && c != d) { ADD_NEW(state_offset + dlen + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ /* Match a negated single character caselessly. */
+
+ case OP_NOTI:
if (clen > 0)
{
- unsigned int otherd = ((ims & PCRE_CASELESS) != 0)? fcc[d] : d;
- if (c != d && c != otherd) { ADD_NEW(state_offset + dlen + 1, 0); }
+ unsigned int otherd;
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
+ {
+#ifdef SUPPORT_UCP
+ otherd = UCD_OTHERCASE(d);
+#endif /* SUPPORT_UCP */
+ }
+ else
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
+ if (c != d && c != otherd)
+ { ADD_NEW(state_offset + dlen + 1, 0); }
}
break;
/*-----------------------------------------------------------------*/
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSPLUSI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+
+ /* Fall through */
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
@@ -1907,19 +2287,19 @@ for (;;)
if (count > 0) { ADD_ACTIVE(state_offset + dlen + 1, 0); }
if (clen > 0)
{
- unsigned int otherd = NOTACHAR;
- if ((ims & PCRE_CASELESS) != 0)
+ pcre_uint32 otherd = NOTACHAR;
+ if (caseless)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && d >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
- otherd = _erts_pcre_ucp_othercase(d);
+ otherd = UCD_OTHERCASE(d);
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
- otherd = fcc[d];
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
}
if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
{
@@ -1936,6 +2316,15 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTPOSQUERYI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
case OP_QUERY:
case OP_MINQUERY:
case OP_POSQUERY:
@@ -1945,19 +2334,19 @@ for (;;)
ADD_ACTIVE(state_offset + dlen + 1, 0);
if (clen > 0)
{
- unsigned int otherd = NOTACHAR;
- if ((ims & PCRE_CASELESS) != 0)
+ pcre_uint32 otherd = NOTACHAR;
+ if (caseless)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && d >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
- otherd = _erts_pcre_ucp_othercase(d);
+ otherd = UCD_OTHERCASE(d);
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
- otherd = fcc[d];
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
}
if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
{
@@ -1972,6 +2361,15 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPOSSTARI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
case OP_STAR:
case OP_MINSTAR:
case OP_POSSTAR:
@@ -1981,19 +2379,19 @@ for (;;)
ADD_ACTIVE(state_offset + dlen + 1, 0);
if (clen > 0)
{
- unsigned int otherd = NOTACHAR;
- if ((ims & PCRE_CASELESS) != 0)
+ pcre_uint32 otherd = NOTACHAR;
+ if (caseless)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && d >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
- otherd = _erts_pcre_ucp_othercase(d);
+ otherd = UCD_OTHERCASE(d);
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
- otherd = fcc[d];
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
}
if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
{
@@ -2008,29 +2406,34 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
+ case OP_EXACTI:
+ case OP_NOTEXACTI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
case OP_EXACT:
case OP_NOTEXACT:
count = current_state->count; /* Number already matched */
if (clen > 0)
{
- unsigned int otherd = NOTACHAR;
- if ((ims & PCRE_CASELESS) != 0)
+ pcre_uint32 otherd = NOTACHAR;
+ if (caseless)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && d >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
- otherd = _erts_pcre_ucp_othercase(d);
+ otherd = UCD_OTHERCASE(d);
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
- otherd = fcc[d];
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
}
if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
{
- if (++count >= GET2(code, 1))
- { ADD_NEW(state_offset + dlen + 3, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -2038,29 +2441,38 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPOSUPTOI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
case OP_UPTO:
case OP_MINUPTO:
case OP_POSUPTO:
case OP_NOTUPTO:
case OP_NOTMINUPTO:
case OP_NOTPOSUPTO:
- ADD_ACTIVE(state_offset + dlen + 3, 0);
+ ADD_ACTIVE(state_offset + dlen + 1 + IMM2_SIZE, 0);
count = current_state->count; /* Number already matched */
if (clen > 0)
{
- unsigned int otherd = NOTACHAR;
- if ((ims & PCRE_CASELESS) != 0)
+ pcre_uint32 otherd = NOTACHAR;
+ if (caseless)
{
-#ifdef SUPPORT_UTF8
- if (utf8 && d >= 128)
+#ifdef SUPPORT_UTF
+ if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
- otherd = _erts_pcre_ucp_othercase(d);
+ otherd = UCD_OTHERCASE(d);
#endif /* SUPPORT_UCP */
}
else
-#endif /* SUPPORT_UTF8 */
- otherd = fcc[d];
+#endif /* SUPPORT_UTF */
+ otherd = TABLE_GET(d, fcc, d);
}
if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
{
@@ -2069,8 +2481,8 @@ for (;;)
active_count--; /* Remove non-match possibility */
next_active_state--;
}
- if (++count >= GET2(code, 1))
- { ADD_NEW(state_offset + dlen + 3, 0); }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -2087,18 +2499,18 @@ for (;;)
{
BOOL isinclass = FALSE;
int next_state_offset;
- const uschar *ecode;
+ const pcre_uchar *ecode;
/* For a simple class, there is always just a 32-byte table, and we
can set isinclass from it. */
if (codevalue != OP_XCLASS)
{
- ecode = code + 33;
+ ecode = code + 1 + (32 / sizeof(pcre_uchar));
if (clen > 0)
{
isinclass = (c > 255)? (codevalue == OP_NCLASS) :
- ((code[1 + c/8] & (1 << (c&7))) != 0);
+ ((((pcre_uint8 *)(code + 1))[c/8] & (1 << (c&7))) != 0);
}
}
@@ -2109,14 +2521,14 @@ for (;;)
else
{
ecode = code + GET(code, 1);
- if (clen > 0) isinclass = _erts_pcre_xclass(c, code + 1 + LINK_SIZE);
+ if (clen > 0) isinclass = PRIV(xclass)(c, code + 1 + LINK_SIZE, utf);
}
/* At this point, isinclass is set for all kinds of class, and ecode
points to the byte after the end of the class. If there is a
quantifier, this is where it will be. */
- next_state_offset = ecode - start_code;
+ next_state_offset = (int)(ecode - start_code);
switch (*ecode)
{
@@ -2142,13 +2554,13 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
count = current_state->count; /* Already matched */
- if (count >= GET2(ecode, 1))
- { ADD_ACTIVE(next_state_offset + 5, 0); }
+ if (count >= (int)GET2(ecode, 1))
+ { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
if (isinclass)
{
- int max = GET2(ecode, 3);
+ int max = (int)GET2(ecode, 1 + IMM2_SIZE);
if (++count >= max && max != 0) /* Max 0 => no limit */
- { ADD_NEW(next_state_offset + 5, 0); }
+ { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
else
{ ADD_NEW(state_offset, count); }
}
@@ -2163,7 +2575,13 @@ for (;;)
/* ========================================================================== */
/* These are the opcodes for fancy brackets of various kinds. We have
- to use recursion in order to handle them. */
+ to use recursion in order to handle them. The "always failing" assertion
+ (?!) is optimised to OP_FAIL when compiling, so we have to support that,
+ though the other "backtracking verbs" are not supported. */
+
+ case OP_FAIL:
+ forced_fail++; /* Count FAILs for multiple states */
+ break;
case OP_ASSERT:
case OP_ASSERT_NOT:
@@ -2173,7 +2591,7 @@ for (;;)
int rc;
int local_offsets[2];
int local_workspace[1000];
- const uschar *endasscode = code + GET(code, 1);
+ const pcre_uchar *endasscode = code + GET(code, 1);
while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
@@ -2181,17 +2599,16 @@ for (;;)
md, /* static match data */
code, /* this subexpression's code */
ptr, /* where we currently are */
- ptr - start_subject, /* start offset */
+ (int)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
sizeof(local_offsets)/sizeof(int), /* size of same */
local_workspace, /* workspace vector */
sizeof(local_workspace)/sizeof(int), /* size of same */
- ims, /* the current ims flags */
- rlevel, /* function recursion level */
- recursing); /* pass on regex recursion */
+ rlevel); /* function recursion level */
+ if (rc == PCRE_ERROR_DFA_UITEM) return rc;
if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK))
- { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); }
+ { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); }
}
break;
@@ -2201,29 +2618,67 @@ for (;;)
{
int local_offsets[1000];
int local_workspace[1000];
- int condcode = code[LINK_SIZE+1];
+ int codelink = GET(code, 1);
+ int condcode;
+
+ /* Because of the way auto-callout works during compile, a callout item
+ is inserted between OP_COND and an assertion condition. This does not
+ happen for the other conditions. */
+
+ if (code[LINK_SIZE+1] == OP_CALLOUT)
+ {
+ rrc = 0;
+ if (PUBL(callout) != NULL)
+ {
+ PUBL(callout_block) cb;
+ cb.version = 1; /* Version 1 of the callout block */
+ cb.callout_number = code[LINK_SIZE+2];
+ cb.offset_vector = offsets;
+#if defined COMPILE_PCRE8
+ cb.subject = (PCRE_SPTR)start_subject;
+#elif defined COMPILE_PCRE16
+ cb.subject = (PCRE_SPTR16)start_subject;
+#elif defined COMPILE_PCRE32
+ cb.subject = (PCRE_SPTR32)start_subject;
+#endif
+ cb.subject_length = (int)(end_subject - start_subject);
+ cb.start_match = (int)(current_subject - start_subject);
+ cb.current_position = (int)(ptr - start_subject);
+ cb.pattern_position = GET(code, LINK_SIZE + 3);
+ cb.next_item_length = GET(code, 3 + 2*LINK_SIZE);
+ cb.capture_top = 1;
+ cb.capture_last = -1;
+ cb.callout_data = md->callout_data;
+ cb.mark = NULL; /* No (*MARK) support */
+ if ((rrc = (*PUBL(callout))(&cb)) < 0) return rrc; /* Abandon */
+ }
+ if (rrc > 0) break; /* Fail this thread */
+ code += PRIV(OP_lengths)[OP_CALLOUT]; /* Skip callout data */
+ }
+
+ condcode = code[LINK_SIZE+1];
/* Back reference conditions are not supported */
- if (condcode == OP_CREF) return PCRE_ERROR_DFA_UCOND;
+ if (condcode == OP_CREF || condcode == OP_NCREF)
+ return PCRE_ERROR_DFA_UCOND;
/* The DEFINE condition is always false */
if (condcode == OP_DEF)
- {
- ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0);
- }
+ { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
/* The only supported version of OP_RREF is for the value RREF_ANY,
which means "test if in any recursion". We can't test for specifically
recursed groups. */
- else if (condcode == OP_RREF)
+ else if (condcode == OP_RREF || condcode == OP_NRREF)
{
- int value = GET2(code, LINK_SIZE+2);
+ int value = GET2(code, LINK_SIZE + 2);
if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND;
- if (recursing > 0) { ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); }
- else { ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); }
+ if (md->recursive != NULL)
+ { ADD_ACTIVE(state_offset + LINK_SIZE + 2 + IMM2_SIZE, 0); }
+ else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
}
/* Otherwise, the condition is an assertion */
@@ -2231,8 +2686,8 @@ for (;;)
else
{
int rc;
- const uschar *asscode = code + LINK_SIZE + 1;
- const uschar *endasscode = asscode + GET(asscode, 1);
+ const pcre_uchar *asscode = code + LINK_SIZE + 1;
+ const pcre_uchar *endasscode = asscode + GET(asscode, 1);
while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
@@ -2240,20 +2695,19 @@ for (;;)
md, /* fixed match data */
asscode, /* this subexpression's code */
ptr, /* where we currently are */
- ptr - start_subject, /* start offset */
+ (int)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
sizeof(local_offsets)/sizeof(int), /* size of same */
local_workspace, /* workspace vector */
sizeof(local_workspace)/sizeof(int), /* size of same */
- ims, /* the current ims flags */
- rlevel, /* function recursion level */
- recursing); /* pass on regex recursion */
+ rlevel); /* function recursion level */
+ if (rc == PCRE_ERROR_DFA_UITEM) return rc;
if ((rc >= 0) ==
(condcode == OP_ASSERT || condcode == OP_ASSERTBACK))
- { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); }
+ { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); }
else
- { ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); }
+ { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
}
}
break;
@@ -2261,28 +2715,47 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_RECURSE:
{
+ dfa_recursion_info *ri;
int local_offsets[1000];
int local_workspace[1000];
+ const pcre_uchar *callpat = start_code + GET(code, 1);
+ int recno = (callpat == md->start_code)? 0 :
+ GET2(callpat, 1 + LINK_SIZE);
int rc;
- DPRINTF(("%.*sStarting regex recursion %d\n", rlevel*2-2, SP,
- recursing + 1));
+ DPRINTF(("%.*sStarting regex recursion\n", rlevel*2-2, SP));
+
+ /* Check for repeating a recursion without advancing the subject
+ pointer. This should catch convoluted mutual recursions. (Some simple
+ cases are caught at compile time.) */
+
+ for (ri = md->recursive; ri != NULL; ri = ri->prevrec)
+ if (recno == ri->group_num && ptr == ri->subject_position)
+ return PCRE_ERROR_RECURSELOOP;
+
+ /* Remember this recursion and where we started it so as to
+ catch infinite loops. */
+
+ new_recursive.group_num = recno;
+ new_recursive.subject_position = ptr;
+ new_recursive.prevrec = md->recursive;
+ md->recursive = &new_recursive;
rc = internal_dfa_exec(
md, /* fixed match data */
- start_code + GET(code, 1), /* this subexpression's code */
+ callpat, /* this subexpression's code */
ptr, /* where we currently are */
- ptr - start_subject, /* start offset */
+ (int)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
sizeof(local_offsets)/sizeof(int), /* size of same */
local_workspace, /* workspace vector */
sizeof(local_workspace)/sizeof(int), /* size of same */
- ims, /* the current ims flags */
- rlevel, /* function recursion level */
- recursing + 1); /* regex recurse level */
+ rlevel); /* function recursion level */
+
+ md->recursive = new_recursive.prevrec; /* Done this recursion */
- DPRINTF(("%.*sReturn from regex recursion %d: rc=%d\n", rlevel*2-2, SP,
- recursing + 1, rc));
+ DPRINTF(("%.*sReturn from regex recursion: rc=%d\n", rlevel*2-2, SP,
+ rc));
/* Ran out of internal offsets */
@@ -2296,10 +2769,15 @@ for (;;)
{
for (rc = rc*2 - 2; rc >= 0; rc -= 2)
{
- const uschar *p = start_subject + local_offsets[rc];
- const uschar *pp = start_subject + local_offsets[rc+1];
int charcount = local_offsets[rc+1] - local_offsets[rc];
- while (p < pp) if ((*p++ & 0xc0) == 0x80) charcount--;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf)
+ {
+ const pcre_uchar *p = start_subject + local_offsets[rc];
+ const pcre_uchar *pp = start_subject + local_offsets[rc+1];
+ while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+ }
+#endif
if (charcount > 0)
{
ADD_NEW_DATA(-(state_offset + LINK_SIZE + 1), 0, (charcount - 1));
@@ -2315,7 +2793,99 @@ for (;;)
break;
/*-----------------------------------------------------------------*/
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ {
+ int charcount, matched_count;
+ const pcre_uchar *local_ptr = ptr;
+ BOOL allow_zero;
+
+ if (codevalue == OP_BRAPOSZERO)
+ {
+ allow_zero = TRUE;
+ codevalue = *(++code); /* Codevalue will be one of above BRAs */
+ }
+ else allow_zero = FALSE;
+
+ /* Loop to match the subpattern as many times as possible as if it were
+ a complete pattern. */
+
+ for (matched_count = 0;; matched_count++)
+ {
+ int local_offsets[2];
+ int local_workspace[1000];
+
+ int rc = internal_dfa_exec(
+ md, /* fixed match data */
+ code, /* this subexpression's code */
+ local_ptr, /* where we currently are */
+ (int)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(int), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ /* Failed to match */
+
+ if (rc < 0)
+ {
+ if (rc != PCRE_ERROR_NOMATCH) return rc;
+ break;
+ }
+
+ /* Matched: break the loop if zero characters matched. */
+
+ charcount = local_offsets[1] - local_offsets[0];
+ if (charcount == 0) break;
+ local_ptr += charcount; /* Advance temporary position ptr */
+ }
+
+ /* At this point we have matched the subpattern matched_count
+ times, and local_ptr is pointing to the character after the end of the
+ last match. */
+
+ if (matched_count > 0 || allow_zero)
+ {
+ const pcre_uchar *end_subpattern = code;
+ int next_state_offset;
+
+ do { end_subpattern += GET(end_subpattern, 1); }
+ while (*end_subpattern == OP_ALT);
+ next_state_offset =
+ (int)(end_subpattern - start_code + LINK_SIZE + 1);
+
+ /* Optimization: if there are no more active states, and there
+ are no new states yet set up, then skip over the subject string
+ right here, to save looping. Otherwise, set up the new state to swing
+ into action when the end of the matched substring is reached. */
+
+ if (i + 1 >= active_count && new_count == 0)
+ {
+ ptr = local_ptr;
+ clen = 0;
+ ADD_NEW(next_state_offset, 0);
+ }
+ else
+ {
+ const pcre_uchar *p = ptr;
+ const pcre_uchar *pp = local_ptr;
+ charcount = (int)(pp - p);
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf) while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+#endif
+ ADD_NEW_DATA(-next_state_offset, 0, (charcount - 1));
+ }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
case OP_ONCE:
+ case OP_ONCE_NC:
{
int local_offsets[2];
int local_workspace[1000];
@@ -2324,24 +2894,23 @@ for (;;)
md, /* fixed match data */
code, /* this subexpression's code */
ptr, /* where we currently are */
- ptr - start_subject, /* start offset */
+ (int)(ptr - start_subject), /* start offset */
local_offsets, /* offset vector */
sizeof(local_offsets)/sizeof(int), /* size of same */
local_workspace, /* workspace vector */
sizeof(local_workspace)/sizeof(int), /* size of same */
- ims, /* the current ims flags */
- rlevel, /* function recursion level */
- recursing); /* pass on regex recursion */
+ rlevel); /* function recursion level */
if (rc >= 0)
{
- const uschar *end_subpattern = code;
+ const pcre_uchar *end_subpattern = code;
int charcount = local_offsets[1] - local_offsets[0];
int next_state_offset, repeat_state_offset;
do { end_subpattern += GET(end_subpattern, 1); }
while (*end_subpattern == OP_ALT);
- next_state_offset = end_subpattern - start_code + LINK_SIZE + 1;
+ next_state_offset =
+ (int)(end_subpattern - start_code + LINK_SIZE + 1);
/* If the end of this subpattern is KETRMAX or KETRMIN, we must
arrange for the repeat state also to be added to the relevant list.
@@ -2349,7 +2918,7 @@ for (;;)
repeat_state_offset = (*end_subpattern == OP_KETRMAX ||
*end_subpattern == OP_KETRMIN)?
- end_subpattern - start_code - GET(end_subpattern, 1) : -1;
+ (int)(end_subpattern - start_code - GET(end_subpattern, 1)) : -1;
/* If we have matched an empty string, add the next state at the
current character pointer. This is important so that the duplicate
@@ -2364,7 +2933,7 @@ for (;;)
/* Optimization: if there are no more active states, and there
are no new states yet set up, then skip over the subject string
right here, to save looping. Otherwise, set up the new state to swing
- into action when the end of the substring is reached. */
+ into action when the end of the matched substring is reached. */
else if (i + 1 >= active_count && new_count == 0)
{
@@ -2387,14 +2956,18 @@ for (;;)
}
else
{
- const uschar *p = start_subject + local_offsets[0];
- const uschar *pp = start_subject + local_offsets[1];
- while (p < pp) if ((*p++ & 0xc0) == 0x80) charcount--;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+ if (utf)
+ {
+ const pcre_uchar *p = start_subject + local_offsets[0];
+ const pcre_uchar *pp = start_subject + local_offsets[1];
+ while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+ }
+#endif
ADD_NEW_DATA(-next_state_offset, 0, (charcount - 1));
if (repeat_state_offset >= 0)
{ ADD_NEW_DATA(-repeat_state_offset, 0, (charcount - 1)); }
}
-
}
else if (rc != PCRE_ERROR_NOMATCH) return rc;
}
@@ -2405,25 +2978,33 @@ for (;;)
/* Handle callouts */
case OP_CALLOUT:
- if (erts_pcre_callout != NULL)
+ rrc = 0;
+ if (PUBL(callout) != NULL)
{
- int rrc;
- pcre_callout_block cb;
+ PUBL(callout_block) cb;
cb.version = 1; /* Version 1 of the callout block */
cb.callout_number = code[1];
cb.offset_vector = offsets;
+#if defined COMPILE_PCRE8
cb.subject = (PCRE_SPTR)start_subject;
- cb.subject_length = end_subject - start_subject;
- cb.start_match = current_subject - start_subject;
- cb.current_position = ptr - start_subject;
+#elif defined COMPILE_PCRE16
+ cb.subject = (PCRE_SPTR16)start_subject;
+#elif defined COMPILE_PCRE32
+ cb.subject = (PCRE_SPTR32)start_subject;
+#endif
+ cb.subject_length = (int)(end_subject - start_subject);
+ cb.start_match = (int)(current_subject - start_subject);
+ cb.current_position = (int)(ptr - start_subject);
cb.pattern_position = GET(code, 2);
cb.next_item_length = GET(code, 2 + LINK_SIZE);
cb.capture_top = 1;
cb.capture_last = -1;
cb.callout_data = md->callout_data;
- if ((rrc = (*erts_pcre_callout)(&cb)) < 0) return rrc; /* Abandon */
- if (rrc == 0) { ADD_ACTIVE(state_offset + 2 + 2*LINK_SIZE, 0); }
+ cb.mark = NULL; /* No (*MARK) support */
+ if ((rrc = (*PUBL(callout))(&cb)) < 0) return rrc; /* Abandon */
}
+ if (rrc == 0)
+ { ADD_ACTIVE(state_offset + PRIV(OP_lengths)[OP_CALLOUT], 0); }
break;
@@ -2439,24 +3020,35 @@ for (;;)
/* We have finished the processing at the current subject character. If no
new states have been set for the next character, we have found all the
matches that we are going to find. If we are at the top level and partial
- matching has been requested, check for appropriate conditions. */
+ matching has been requested, check for appropriate conditions.
+
+ The "forced_ fail" variable counts the number of (*F) encountered for the
+ character. If it is equal to the original active_count (saved in
+ workspace[1]) it means that (*F) was found on every active state. In this
+ case we don't want to give a partial match.
+
+ The "could_continue" variable is true if a state could have continued but
+ for the fact that the end of the subject was reached. */
if (new_count <= 0)
{
- if (match_count < 0 && /* No matches found */
- rlevel == 1 && /* Top level match function */
- (md->moptions & PCRE_PARTIAL) != 0 && /* Want partial matching */
- ptr >= end_subject && /* Reached end of subject */
- ptr > current_subject) /* Matched non-empty string */
- {
- if (offsetcount >= 2)
- {
- offsets[0] = current_subject - start_subject;
- offsets[1] = end_subject - start_subject;
- }
+ if (rlevel == 1 && /* Top level, and */
+ could_continue && /* Some could go on, and */
+ forced_fail != workspace[1] && /* Not all forced fail & */
+ ( /* either... */
+ (md->moptions & PCRE_PARTIAL_HARD) != 0 /* Hard partial */
+ || /* or... */
+ ((md->moptions & PCRE_PARTIAL_SOFT) != 0 && /* Soft partial and */
+ match_count < 0) /* no matches */
+ ) && /* And... */
+ (
+ partial_newline || /* Either partial NL */
+ ( /* or ... */
+ ptr >= end_subject && /* End of subject and */
+ ptr > md->start_used_ptr) /* Inspected non-empty string */
+ )
+ )
match_count = PCRE_ERROR_PARTIAL;
- }
-
DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"
"%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count,
rlevel*2-2, SP));
@@ -2506,28 +3098,45 @@ Returns: > 0 => number of match offset pairs placed in offsets
< -1 => some kind of unexpected problem
*/
-PCRE_EXP_DEFN int
-erts_pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data,
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_dfa_exec(const pcre *argument_re, const erts_pcre_extra *extra_data,
const char *subject, int length, int start_offset, int options, int *offsets,
int offsetcount, int *workspace, int wscount)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data,
+ const char *subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount, int *workspace, int wscount)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_dfa_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount, int *workspace, int wscount)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_dfa_exec(const pcre32 *argument_re, const pcre32_extra *extra_data,
+ PCRE_SPTR32 subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount, int *workspace, int wscount)
+#endif
{
-real_pcre *re = (real_pcre *)argument_re;
+REAL_PCRE *re = (REAL_PCRE *)argument_re;
dfa_match_data match_block;
dfa_match_data *md = &match_block;
-BOOL utf8, anchored, startline, firstline;
-const uschar *current_subject, *end_subject, *lcc;
-
-pcre_study_data internal_study;
+BOOL utf, anchored, startline, firstline;
+const pcre_uchar *current_subject, *end_subject;
const pcre_study_data *study = NULL;
-real_pcre internal_re;
-
-const uschar *req_byte_ptr;
-const uschar *start_bits = NULL;
-BOOL first_byte_caseless = FALSE;
-BOOL req_byte_caseless = FALSE;
-int first_byte = -1;
-int req_byte = -1;
-int req_byte2 = -1;
+
+const pcre_uchar *req_char_ptr;
+const pcre_uint8 *start_bits = NULL;
+BOOL has_first_char = FALSE;
+BOOL has_req_char = FALSE;
+pcre_uchar first_char = 0;
+pcre_uchar first_char2 = 0;
+pcre_uchar req_char = 0;
+pcre_uchar req_char2 = 0;
int newline;
/* Plausibility checks */
@@ -2537,11 +3146,30 @@ if (re == NULL || subject == NULL || workspace == NULL ||
(offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL;
if (offsetcount < 0) return PCRE_ERROR_BADCOUNT;
if (wscount < 20) return PCRE_ERROR_DFA_WSSIZE;
+if (length < 0) return PCRE_ERROR_BADLENGTH;
+if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET;
-/* We need to find the pointer to any study data before we test for byte
-flipping, so we scan the extra_data block first. This may set two fields in the
-match block, so we must initialize them beforehand. However, the other fields
-in the match block must not be set until after the byte flipping. */
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
+REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
+means that the pattern is likely compiled with different endianness. */
+
+if (re->magic_number != MAGIC_NUMBER)
+ return re->magic_number == REVERSED_MAGIC_NUMBER?
+ PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
+
+/* If restarting after a partial match, do some sanity checks on the contents
+of the workspace. */
+
+if ((options & PCRE_DFA_RESTART) != 0)
+ {
+ if ((workspace[0] & (-2)) != 0 || workspace[1] < 1 ||
+ workspace[1] > (wscount - 2)/INTS_PER_STATEBLOCK)
+ return PCRE_ERROR_DFA_BADRESTART;
+ }
+
+/* Set up study, callout, and table data */
md->tables = re->tables;
md->callout_data = NULL;
@@ -2560,28 +3188,17 @@ if (extra_data != NULL)
md->tables = extra_data->tables;
}
-/* Check that the first field in the block is the magic number. If it is not,
-test for a regex that was compiled on a host of opposite endianness. If this is
-the case, flipped values are put in internal_re and internal_study if there was
-study data too. */
-
-if (re->magic_number != MAGIC_NUMBER)
- {
- re = _erts_pcre_try_flipped(re, &internal_re, study, &internal_study);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- if (study != NULL) study = &internal_study;
- }
-
/* Set some local values */
-current_subject = (const unsigned char *)subject + start_offset;
-end_subject = (const unsigned char *)subject + length;
-req_byte_ptr = current_subject - 1;
+current_subject = (const pcre_uchar *)subject + start_offset;
+end_subject = (const pcre_uchar *)subject + length;
+req_char_ptr = current_subject - 1;
-#ifdef SUPPORT_UTF8
-utf8 = (re->options & PCRE_UTF8) != 0;
+#ifdef SUPPORT_UTF
+/* PCRE_UTF(16|32) have the same value as PCRE_UTF8. */
+utf = (re->options & PCRE_UTF8) != 0;
#else
-utf8 = FALSE;
+utf = FALSE;
#endif
anchored = (options & (PCRE_ANCHORED|PCRE_DFA_RESTART)) != 0 ||
@@ -2589,10 +3206,11 @@ anchored = (options & (PCRE_ANCHORED|PCRE_DFA_RESTART)) != 0 ||
/* The remaining fixed data for passing around. */
-md->start_code = (const uschar *)argument_re +
+md->start_code = (const pcre_uchar *)argument_re +
re->name_table_offset + re->name_count * re->name_entry_size;
-md->start_subject = (const unsigned char *)subject;
+md->start_subject = (const pcre_uchar *)subject;
md->end_subject = end_subject;
+md->start_offset = start_offset;
md->moptions = options;
md->poptions = re->options;
@@ -2615,10 +3233,10 @@ switch ((((options & PCRE_NEWLINE_BITS) == 0)? re->options : (pcre_uint32)option
PCRE_NEWLINE_BITS)
{
case 0: newline = NEWLINE; break; /* Compile-time default */
- case PCRE_NEWLINE_CR: newline = '\r'; break;
- case PCRE_NEWLINE_LF: newline = '\n'; break;
+ case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
+ case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
case PCRE_NEWLINE_CR+
- PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;
+ PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
case PCRE_NEWLINE_ANY: newline = -1; break;
case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
default: return PCRE_ERROR_BADNEWLINE;
@@ -2651,20 +3269,33 @@ else
/* Check a UTF-8 string if required. Unfortunately there's no way of passing
back the character offset. */
-#ifdef SUPPORT_UTF8
-if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
+#ifdef SUPPORT_UTF
+if (utf && (options & PCRE_NO_UTF8_CHECK) == 0)
{
- if (_erts_pcre_valid_utf8((uschar *)subject, length) >= 0)
- return PCRE_ERROR_BADUTF8;
- if (start_offset > 0 && start_offset < length)
+ int erroroffset;
+ int errorcode = PRIV(valid_utf)((pcre_uchar *)subject, length, &erroroffset);
+ if (errorcode != 0)
{
- int tb = ((uschar *)subject)[start_offset];
- if (tb > 127)
+ if (offsetcount >= 2)
{
- tb &= 0xc0;
- if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET;
+ offsets[0] = erroroffset;
+ offsets[1] = errorcode;
}
+#if defined COMPILE_PCRE8
+ return (errorcode <= PCRE_UTF8_ERR5 && (options & PCRE_PARTIAL_HARD) != 0) ?
+ PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
+#elif defined COMPILE_PCRE16
+ return (errorcode <= PCRE_UTF16_ERR1 && (options & PCRE_PARTIAL_HARD) != 0) ?
+ PCRE_ERROR_SHORTUTF16 : PCRE_ERROR_BADUTF16;
+#elif defined COMPILE_PCRE32
+ return PCRE_ERROR_BADUTF32;
+#endif
}
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+ if (start_offset > 0 && start_offset < length &&
+ NOT_FIRSTCHAR(((PCRE_PUCHAR)subject)[start_offset]))
+ return PCRE_ERROR_BADUTF8_OFFSET;
+#endif
}
#endif
@@ -2672,12 +3303,11 @@ if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
is a feature that makes it possible to save compiled regex and re-use them
in other programs later. */
-if (md->tables == NULL) md->tables = _erts_pcre_default_tables;
+if (md->tables == NULL) md->tables = PRIV(default_tables);
-/* The lower casing table and the "must be at the start of a line" flag are
-used in a loop when finding where to start. */
+/* The "must be at the start of a line" flags are used in a loop when finding
+where to start. */
-lcc = md->tables + lcc_offset;
startline = (re->flags & PCRE_STARTLINE) != 0;
firstline = (re->options & PCRE_FIRSTLINE) != 0;
@@ -2691,14 +3321,21 @@ if (!anchored)
{
if ((re->flags & PCRE_FIRSTSET) != 0)
{
- first_byte = re->first_byte & 255;
- if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE)
- first_byte = lcc[first_byte];
+ has_first_char = TRUE;
+ first_char = first_char2 = (pcre_uchar)(re->first_char);
+ if ((re->flags & PCRE_FCH_CASELESS) != 0)
+ {
+ first_char2 = TABLE_GET(first_char, md->tables + fcc_offset, first_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && first_char > 127)
+ first_char2 = UCD_OTHERCASE(first_char);
+#endif
+ }
}
else
{
- if (startline && study != NULL &&
- (study->options & PCRE_STUDY_MAPPED) != 0)
+ if (!startline && study != NULL &&
+ (study->flags & PCRE_STUDY_MAPPED) != 0)
start_bits = study->start_bits;
}
}
@@ -2708,15 +3345,21 @@ character" set. */
if ((re->flags & PCRE_REQCHSET) != 0)
{
- req_byte = re->req_byte & 255;
- req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0;
- req_byte2 = (md->tables + fcc_offset)[req_byte]; /* case flipped */
+ has_req_char = TRUE;
+ req_char = req_char2 = (pcre_uchar)(re->req_char);
+ if ((re->flags & PCRE_RCH_CASELESS) != 0)
+ {
+ req_char2 = TABLE_GET(req_char, md->tables + fcc_offset, req_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && req_char > 127)
+ req_char2 = UCD_OTHERCASE(req_char);
+#endif
+ }
}
/* Call the main matching function, looping for a non-anchored regex after a
-failed match. Unless restarting, optimize by moving to the first match
-character if possible, when not anchored. Then unless wanting a partial match,
-check for a required later character. */
+failed match. If not restarting, perform certain optimizations at the start of
+a match. */
for (;;)
{
@@ -2724,128 +3367,194 @@ for (;;)
if ((options & PCRE_DFA_RESTART) == 0)
{
- const uschar *save_end_subject = end_subject;
+ const pcre_uchar *save_end_subject = end_subject;
- /* Advance to a unique first char if possible. If firstline is TRUE, the
- start of the match is constrained to the first line of a multiline string.
- Implement this by temporarily adjusting end_subject so that we stop
- scanning at a newline. If the match fails at the newline, later code breaks
- this loop. */
+ /* If firstline is TRUE, the start of the match is constrained to the first
+ line of a multiline string. Implement this by temporarily adjusting
+ end_subject so that we stop scanning at a newline. If the match fails at
+ the newline, later code breaks this loop. */
if (firstline)
{
- const uschar *t = current_subject;
+ PCRE_PUCHAR t = current_subject;
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ while (t < md->end_subject && !IS_NEWLINE(t))
+ {
+ t++;
+ ACROSSCHAR(t < end_subject, *t, t++);
+ }
+ }
+ else
+#endif
while (t < md->end_subject && !IS_NEWLINE(t)) t++;
end_subject = t;
}
- if (first_byte >= 0)
+ /* There are some optimizations that avoid running the match if a known
+ starting point is not found. However, there is an option that disables
+ these, for testing and for ensuring that all callouts do actually occur.
+ The option can be set in the regex by (*NO_START_OPT) or passed in
+ match-time options. */
+
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0)
{
- if (first_byte_caseless)
- while (current_subject < end_subject &&
- lcc[*current_subject] != first_byte)
- current_subject++;
- else
- while (current_subject < end_subject && *current_subject != first_byte)
- current_subject++;
- }
+ /* Advance to a known first char. */
- /* Or to just after a linebreak for a multiline match if possible */
+ if (has_first_char)
+ {
+ if (first_char != first_char2)
+ {
+ pcre_uchar csc;
+ while (current_subject < end_subject &&
+ (csc = RAWUCHARTEST(current_subject)) != first_char && csc != first_char2)
+ current_subject++;
+ }
+ else
+ while (current_subject < end_subject &&
+ RAWUCHARTEST(current_subject) != first_char)
+ current_subject++;
+ }
- else if (startline)
- {
- if (current_subject > md->start_subject + start_offset)
+ /* Or to just after a linebreak for a multiline match if possible */
+
+ else if (startline)
{
- while (current_subject <= end_subject && !WAS_NEWLINE(current_subject))
- current_subject++;
-
- /* If we have just passed a CR and the newline option is ANY or
- ANYCRLF, and we are now at a LF, advance the match position by one more
- character. */
-
- if (current_subject[-1] == '\r' &&
- (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
- current_subject < end_subject &&
- *current_subject == '\n')
- current_subject++;
+ if (current_subject > md->start_subject + start_offset)
+ {
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ while (current_subject < end_subject &&
+ !WAS_NEWLINE(current_subject))
+ {
+ current_subject++;
+ ACROSSCHAR(current_subject < end_subject, *current_subject,
+ current_subject++);
+ }
+ }
+ else
+#endif
+ while (current_subject < end_subject && !WAS_NEWLINE(current_subject))
+ current_subject++;
+
+ /* If we have just passed a CR and the newline option is ANY or
+ ANYCRLF, and we are now at a LF, advance the match position by one
+ more character. */
+
+ if (RAWUCHARTEST(current_subject - 1) == CHAR_CR &&
+ (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
+ current_subject < end_subject &&
+ RAWUCHARTEST(current_subject) == CHAR_NL)
+ current_subject++;
+ }
}
- }
- /* Or to a non-unique first char after study */
+ /* Or to a non-unique first char after study */
- else if (start_bits != NULL)
- {
- while (current_subject < end_subject)
+ else if (start_bits != NULL)
{
- register unsigned int c = *current_subject;
- if ((start_bits[c/8] & (1 << (c&7))) == 0) current_subject++;
+ while (current_subject < end_subject)
+ {
+ register pcre_uint32 c = RAWUCHARTEST(current_subject);
+#ifndef COMPILE_PCRE8
+ if (c > 255) c = 255;
+#endif
+ if ((start_bits[c/8] & (1 << (c&7))) == 0)
+ {
+ current_subject++;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ /* In non 8-bit mode, the iteration will stop for
+ characters > 255 at the beginning or not stop at all. */
+ if (utf)
+ ACROSSCHAR(current_subject < end_subject, *current_subject,
+ current_subject++);
+#endif
+ }
else break;
+ }
}
}
/* Restore fudged end_subject */
end_subject = save_end_subject;
- }
-
- /* If req_byte is set, we know that that character must appear in the subject
- for the match to succeed. If the first character is set, req_byte must be
- later in the subject; otherwise the test starts at the match point. This
- optimization can save a huge amount of work in patterns with nested unlimited
- repeats that aren't going to match. Writing separate code for cased/caseless
- versions makes it go faster, as does using an autoincrement and backing off
- on a match.
-
- HOWEVER: when the subject string is very, very long, searching to its end can
- take a long time, and give bad performance on quite ordinary patterns. This
- showed up when somebody was matching /^C/ on a 32-megabyte string... so we
- don't do this when the string is sufficiently long.
-
- ALSO: this processing is disabled when partial matching is requested.
- */
-
- if (req_byte >= 0 &&
- end_subject - current_subject < REQ_BYTE_MAX &&
- (options & PCRE_PARTIAL) == 0)
- {
- register const uschar *p = current_subject + ((first_byte >= 0)? 1 : 0);
- /* We don't need to repeat the search if we haven't yet reached the
- place we found it at last time. */
+ /* The following two optimizations are disabled for partial matching or if
+ disabling is explicitly requested (and of course, by the test above, this
+ code is not obeyed when restarting after a partial match). */
- if (p > req_byte_ptr)
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 &&
+ (options & (PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT)) == 0)
{
- if (req_byte_caseless)
- {
- while (p < end_subject)
- {
- register int pp = *p++;
- if (pp == req_byte || pp == req_byte2) { p--; break; }
- }
- }
- else
+ /* If the pattern was studied, a minimum subject length may be set. This
+ is a lower bound; no actual string of that length may actually match the
+ pattern. Although the value is, strictly, in characters, we treat it as
+ bytes to avoid spending too much time in this optimization. */
+
+ if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 &&
+ (pcre_uint32)(end_subject - current_subject) < study->minlength)
+ return PCRE_ERROR_NOMATCH;
+
+ /* If req_char is set, we know that that character must appear in the
+ subject for the match to succeed. If the first character is set, req_char
+ must be later in the subject; otherwise the test starts at the match
+ point. This optimization can save a huge amount of work in patterns with
+ nested unlimited repeats that aren't going to match. Writing separate
+ code for cased/caseless versions makes it go faster, as does using an
+ autoincrement and backing off on a match.
+
+ HOWEVER: when the subject string is very, very long, searching to its end
+ can take a long time, and give bad performance on quite ordinary
+ patterns. This showed up when somebody was matching /^C/ on a 32-megabyte
+ string... so we don't do this when the string is sufficiently long. */
+
+ if (has_req_char && end_subject - current_subject < REQ_BYTE_MAX)
{
- while (p < end_subject)
+ register PCRE_PUCHAR p = current_subject + (has_first_char? 1:0);
+
+ /* We don't need to repeat the search if we haven't yet reached the
+ place we found it at last time. */
+
+ if (p > req_char_ptr)
{
- if (*p++ == req_byte) { p--; break; }
- }
- }
+ if (req_char != req_char2)
+ {
+ while (p < end_subject)
+ {
+ register pcre_uint32 pp = RAWUCHARINCTEST(p);
+ if (pp == req_char || pp == req_char2) { p--; break; }
+ }
+ }
+ else
+ {
+ while (p < end_subject)
+ {
+ if (RAWUCHARINCTEST(p) == req_char) { p--; break; }
+ }
+ }
- /* If we can't find the required character, break the matching loop,
- which will cause a return or PCRE_ERROR_NOMATCH. */
+ /* If we can't find the required character, break the matching loop,
+ which will cause a return or PCRE_ERROR_NOMATCH. */
- if (p >= end_subject) break;
+ if (p >= end_subject) break;
- /* If we have found the required character, save the point where we
- found it, so that we don't search again next time round the loop if
- the start hasn't passed this character yet. */
+ /* If we have found the required character, save the point where we
+ found it, so that we don't search again next time round the loop if
+ the start hasn't passed this character yet. */
- req_byte_ptr = p;
+ req_char_ptr = p;
+ }
+ }
}
- }
+ } /* End of optimizations that are done when not restarting */
/* OK, now we can do the business */
+ md->start_used_ptr = current_subject;
+ md->recursive = NULL;
+
rc = internal_dfa_exec(
md, /* fixed match data */
md->start_code, /* this subexpression's code */
@@ -2855,34 +3564,44 @@ for (;;)
offsetcount, /* size of same */
workspace, /* workspace vector */
wscount, /* size of same */
- re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL), /* ims flags */
- 0, /* function recurse level */
- 0); /* regex recurse level */
+ 0); /* function recurse level */
/* Anything other than "no match" means we are done, always; otherwise, carry
on only if not anchored. */
- if (rc != PCRE_ERROR_NOMATCH || anchored) return rc;
+ if (rc != PCRE_ERROR_NOMATCH || anchored)
+ {
+ if (rc == PCRE_ERROR_PARTIAL && offsetcount >= 2)
+ {
+ offsets[0] = (int)(md->start_used_ptr - (PCRE_PUCHAR)subject);
+ offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
+ if (offsetcount > 2)
+ offsets[2] = (int)(current_subject - (PCRE_PUCHAR)subject);
+ }
+ return rc;
+ }
/* Advance to the next subject character unless we are at the end of a line
and firstline is set. */
if (firstline && IS_NEWLINE(current_subject)) break;
current_subject++;
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- while (current_subject < end_subject && (*current_subject & 0xc0) == 0x80)
- current_subject++;
+ ACROSSCHAR(current_subject < end_subject, *current_subject,
+ current_subject++);
}
+#endif
if (current_subject > end_subject) break;
/* If we have just passed a CR and we are now at a LF, and the pattern does
not contain any explicit matches for \r or \n, and the newline option is CRLF
or ANY or ANYCRLF, advance the match position by one more character. */
- if (current_subject[-1] == '\r' &&
+ if (RAWUCHARTEST(current_subject - 1) == CHAR_CR &&
current_subject < end_subject &&
- *current_subject == '\n' &&
+ RAWUCHARTEST(current_subject) == CHAR_NL &&
(re->flags & PCRE_HASCRORLF) == 0 &&
(md->nltype == NLTYPE_ANY ||
md->nltype == NLTYPE_ANYCRLF ||
diff --git a/erts/emulator/pcre/pcre_exec.c b/erts/emulator/pcre/pcre_exec.c
index 26cb219ef1..1cab78cdd8 100644
--- a/erts/emulator/pcre/pcre_exec.c
+++ b/erts/emulator/pcre/pcre_exec.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -36,9 +36,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
+
/* #define ERLANG_DEBUG 1 */
-/* This module contains erts_pcre_exec(), the externally visible function that does
+/* This module contains pcre_exec(), the externally visible function that does
pattern matching using an NFA algorithm, trying to mimic Perl as closely as
possible. There are also some static supporting functions. */
@@ -59,10 +60,26 @@ possible. There are also some static supporting functions. */
#undef min
#undef max
-/* Flag bits for the match() function */
+/* The md->capture_last field uses the lower 16 bits for the last captured
+substring (which can never be greater than 65535) and a bit in the top half
+to mean "capture vector overflowed". This odd way of doing things was
+implemented when it was realized that preserving and restoring the overflow bit
+whenever the last capture number was saved/restored made for a neater
+interface, and doing it this way saved on (a) another variable, which would
+have increased the stack frame size (a big NO-NO in PCRE) and (b) another
+separate set of save/restore instructions. The following defines are used in
+implementing this. */
+
+#define CAPLMASK 0x0000ffff /* The bits used for last_capture */
+#define OVFLMASK 0xffff0000 /* The bits used for the overflow flag */
+#define OVFLBIT 0x00010000 /* The bit that is set for overflow */
-#define match_condassert 0x01 /* Called to check a condition assertion */
-#define match_cbegroup 0x02 /* Could-be-empty unlimited repeat group */
+/* Values for setting in md->match_function_type to indicate two special types
+of call to match(). We do it this way to save on using another stack variable,
+as stack usage is to be discouraged. */
+
+#define MATCH_CONDASSERT 1 /* Called to check a condition assertion */
+#define MATCH_CBEGROUP 2 /* Could-be-empty unlimited repeat group */
/* Non-error returns from the match() function. Error returns are externally
defined PCRE_ERROR_xxx codes, which are all negative. */
@@ -73,10 +90,18 @@ defined PCRE_ERROR_xxx codes, which are all negative. */
/* Special internal returns from the match() function. Make them sufficiently
negative to avoid the external error codes. */
-#define MATCH_COMMIT (-999)
-#define MATCH_PRUNE (-998)
-#define MATCH_SKIP (-997)
-#define MATCH_THEN (-996)
+#define MATCH_ACCEPT (-999)
+#define MATCH_KETRPOS (-998)
+#define MATCH_ONCE (-997)
+/* The next 5 must be kept together and in sequence so that a test that checks
+for any one of them can use a range. */
+#define MATCH_COMMIT (-996)
+#define MATCH_PRUNE (-995)
+#define MATCH_SKIP (-994)
+#define MATCH_SKIP_ARG (-993)
+#define MATCH_THEN (-992)
+#define MATCH_BACKTRACK_MAX MATCH_THEN
+#define MATCH_BACKTRACK_MIN MATCH_COMMIT
/* Maximum number of ints of offset to save on the stack for recursive calls.
If the offset vector is bigger, malloc is used. This should be a multiple of 3,
@@ -89,9 +114,7 @@ because the offset vector is always a multiple of 3 long. */
static const char rep_min[] = { 0, 0, 1, 1, 0, 0 };
static const char rep_max[] = { 0, 0, 0, 0, 1, 1 };
-
-
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
/*************************************************
* Debugging function to print chars *
*************************************************/
@@ -109,12 +132,13 @@ Returns: nothing
*/
static void
-pchars(const uschar *p, int length, BOOL is_subject, match_data *md)
+pchars(const pcre_uchar *p, int length, BOOL is_subject, match_data *md)
{
-unsigned int c;
+pcre_uint32 c;
+BOOL utf = md->utf;
if (is_subject && length > md->end_subject - p) length = md->end_subject - p;
while (length-- > 0)
- if (isprint(c = *(p++))) printf("%c", c); else printf("\\x%02x", c);
+ if (isprint(c = RAWUCHARINCTEST(p))) printf("%c", (char)c); else printf("\\x{%02x}", c);
}
#endif
@@ -135,30 +159,39 @@ edebug_printf(const char *format, ...)
#endif
#endif
+
/*************************************************
* Match a back-reference *
*************************************************/
-/* If a back reference hasn't been set, the length that is passed is greater
-than the number of characters left in the string, so the match fails.
+/* Normally, if a back reference hasn't been set, the length that is passed is
+negative, so the match always fails. However, in JavaScript compatibility mode,
+the length passed is zero. Note that in caseless UTF-8 mode, the number of
+subject bytes matched may be different to the number of reference bytes.
Arguments:
offset index into the offset vector
- eptr points into the subject
- length length to be matched
+ eptr pointer into the subject
+ length length of reference to be matched (number of bytes)
md points to match data block
- ims the ims flags
+ caseless TRUE if caseless
-Returns: TRUE if matched
+Returns: >= 0 the number of subject bytes matched
+ -1 no match
+ -2 partial match; always given if at end subject
*/
-static BOOL
-match_ref(int offset, register USPTR eptr, int length, match_data *md,
- unsigned long int ims)
+static int
+match_ref(int offset, register PCRE_PUCHAR eptr, int length, match_data *md,
+ BOOL caseless)
{
-USPTR p = md->start_subject + md->offset_vector[offset];
+PCRE_PUCHAR eptr_start = eptr;
+register PCRE_PUCHAR p = md->start_subject + md->offset_vector[offset];
+#ifdef SUPPORT_UTF
+BOOL utf = md->utf;
+#endif
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
if (eptr >= md->end_subject)
printf("matching subject <null>");
else
@@ -171,21 +204,83 @@ pchars(p, length, FALSE, md);
printf("\n");
#endif
-/* Always fail if not enough characters left */
+/* Always fail if reference not set (and not JavaScript compatible - in that
+case the length is passed as zero). */
-if (length > md->end_subject - eptr) return FALSE;
+if (length < 0) return -1;
-/* Separate the caselesss case for speed */
+/* Separate the caseless case for speed. In UTF-8 mode we can only do this
+properly if Unicode properties are supported. Otherwise, we can check only
+ASCII characters. */
-if ((ims & PCRE_CASELESS) != 0)
+if (caseless)
{
- while (length-- > 0)
- if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE;
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ if (utf)
+ {
+ /* Match characters up to the end of the reference. NOTE: the number of
+ data units matched may differ, because in UTF-8 there are some characters
+ whose upper and lower case versions code have different numbers of bytes.
+ For example, U+023A (2 bytes in UTF-8) is the upper case version of U+2C65
+ (3 bytes in UTF-8); a sequence of 3 of the former uses 6 bytes, as does a
+ sequence of two of the latter. It is important, therefore, to check the
+ length along the reference, not along the subject (earlier code did this
+ wrong). */
+
+ PCRE_PUCHAR endptr = p + length;
+ while (p < endptr)
+ {
+ pcre_uint32 c, d;
+ const ucd_record *ur;
+ if (eptr >= md->end_subject) return -2; /* Partial match */
+ GETCHARINC(c, eptr);
+ GETCHARINC(d, p);
+ ur = GET_UCD(d);
+ if (c != d && c != d + ur->other_case)
+ {
+ const pcre_uint32 *pp = PRIV(ucd_caseless_sets) + ur->caseset;
+ for (;;)
+ {
+ if (c < *pp) return -1;
+ if (c == *pp++) break;
+ }
+ }
+ }
+ }
+ else
+#endif
+#endif
+
+ /* The same code works when not in UTF-8 mode and in UTF-8 mode when there
+ is no UCP support. */
+ {
+ while (length-- > 0)
+ {
+ pcre_uint32 cc, cp;
+ if (eptr >= md->end_subject) return -2; /* Partial match */
+ cc = RAWUCHARTEST(eptr);
+ cp = RAWUCHARTEST(p);
+ if (TABLE_GET(cp, md->lcc, cp) != TABLE_GET(cc, md->lcc, cc)) return -1;
+ p++;
+ eptr++;
+ }
+ }
}
+
+/* In the caseful case, we can just compare the bytes, whether or not we
+are in UTF-8 mode. */
+
else
- { while (length-- > 0) if (*p++ != *eptr++) return FALSE; }
+ {
+ while (length-- > 0)
+ {
+ if (eptr >= md->end_subject) return -2; /* Partial match */
+ if (RAWUCHARINCTEST(p) != RAWUCHARINCTEST(eptr)) return -1;
+ }
+ }
-return TRUE;
+return (int)(eptr - eptr_start);
}
@@ -236,11 +331,13 @@ enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10,
RM21, RM22, RM23, RM24, RM25, RM26, RM27, RM28, RM29, RM30,
RM31, RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40,
RM41, RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50,
- RM51, RM52, RM53, RM54
+ RM51, RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60,
+ RM61, RM62, RM63, RM64, RM65, RM66, RM67, RM68
};
+
/* These versions of the macros use the stack, as normal. There are debugging
versions and production versions. Note that the "rw" argument of RMATCH isn't
-actuall used in this definition. */
+actually used in this definition. */
#ifndef NO_RECURSE
#ifdef ERLANG_INTEGRATION
@@ -248,21 +345,21 @@ actuall used in this definition. */
#endif
#define REGISTER register
-#ifdef DEBUG
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \
+#ifdef PCRE_DEBUG
+#define RMATCH(ra,rb,rc,rd,re,rw) \
{ \
printf("match() called in line %d\n", __LINE__); \
- rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1); \
+ rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \
printf("to line %d\n", __LINE__); \
}
#define RRETURN(ra) \
{ \
- printf("match() returned %d from line %d ", ra, __LINE__); \
+ printf("match() returned %d from line %d\n", ra, __LINE__); \
return ra; \
}
#else
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \
- rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1)
+#define RMATCH(ra,rb,rc,rd,re,rw) \
+ rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1)
#define RRETURN(ra) return ra
#endif
@@ -275,17 +372,22 @@ argument of match(), which never changes. */
#define REGISTER
-#define RMATCH(ra,rb,rc,rd,re,rf,rg,rw)\
+#define RMATCH(ra,rb,rc,rd,re,rw)\
{\
- heapframe *newframe = (erts_pcre_stack_malloc)(sizeof(heapframe));\
- frame->Xwhere = rw; \
+ heapframe *newframe = frame->Xnextframe;\
+ if (newframe == NULL)\
+ {\
+ newframe = (heapframe *)(PUBL(stack_malloc))(sizeof(heapframe));\
+ if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\
+ newframe->Xnextframe = NULL;\
+ frame->Xnextframe = newframe;\
+ }\
+ frame->Xwhere = rw;\
newframe->Xeptr = ra;\
newframe->Xecode = rb;\
newframe->Xmstart = mstart;\
newframe->Xoffset_top = rc;\
- newframe->Xims = re;\
- newframe->Xeptrb = rf;\
- newframe->Xflags = rg;\
+ newframe->Xeptrb = re;\
newframe->Xrdepth = frame->Xrdepth + 1;\
newframe->Xprevframe = frame;\
frame = newframe;\
@@ -298,9 +400,8 @@ argument of match(), which never changes. */
#ifdef ERLANG_INTEGRATION
#define RRETURN(ra)\
{\
- heapframe *newframe = frame;\
- frame = newframe->Xprevframe;\
- (erts_pcre_stack_free)(newframe);\
+ heapframe *oldframe = frame;\
+ frame = oldframe->Xprevframe;\
if (frame != NULL)\
{\
rrc = ra;\
@@ -315,9 +416,8 @@ argument of match(), which never changes. */
#else
#define RRETURN(ra)\
{\
- heapframe *newframe = frame;\
- frame = newframe->Xprevframe;\
- (erts_pcre_stack_free)(newframe);\
+ heapframe *oldframe = frame;\
+ frame = oldframe->Xprevframe;\
if (frame != NULL)\
{\
rrc = ra;\
@@ -327,32 +427,32 @@ argument of match(), which never changes. */
}
#endif
-
/* Structure for remembering the local variables in a private frame */
typedef struct heapframe {
struct heapframe *Xprevframe;
+ struct heapframe *Xnextframe;
/* Function arguments that may change */
- const uschar *Xeptr;
- const uschar *Xecode;
- const uschar *Xmstart;
+ PCRE_PUCHAR Xeptr;
+ const pcre_uchar *Xecode;
+ PCRE_PUCHAR Xmstart;
int Xoffset_top;
- long int Xims;
eptrblock *Xeptrb;
- int Xflags;
unsigned int Xrdepth;
/* Function local variables */
- const uschar *Xcallpat;
- const uschar *Xcharptr;
- const uschar *Xdata;
- const uschar *Xnext;
- const uschar *Xpp;
- const uschar *Xprev;
- const uschar *Xsaved_eptr;
+ PCRE_PUCHAR Xcallpat;
+#ifdef SUPPORT_UTF
+ PCRE_PUCHAR Xcharptr;
+#endif
+ PCRE_PUCHAR Xdata;
+ PCRE_PUCHAR Xnext;
+ PCRE_PUCHAR Xpp;
+ PCRE_PUCHAR Xprev;
+ PCRE_PUCHAR Xsaved_eptr;
recursion_info Xnew_recursive;
@@ -360,29 +460,25 @@ typedef struct heapframe {
BOOL Xcondition;
BOOL Xprev_is_word;
- unsigned long int Xoriginal_ims;
-
#ifdef SUPPORT_UCP
int Xprop_type;
- int Xprop_value;
+ unsigned int Xprop_value;
int Xprop_fail_result;
- int Xprop_category;
- int Xprop_chartype;
- int Xprop_script;
int Xoclength;
- uschar Xocchars[8];
+ pcre_uchar Xocchars[6];
#endif
+ int Xcodelink;
int Xctype;
unsigned int Xfc;
int Xfi;
int Xlength;
int Xmax;
int Xmin;
- int Xnumber;
+ unsigned int Xnumber;
int Xoffset;
- int Xop;
- int Xsave_capture_last;
+ unsigned int Xop;
+ pcre_int32 Xsave_capture_last;
int Xsave_offset1, Xsave_offset2, Xsave_offset3;
int Xstacksave[REC_STACK_SAVE_MAX];
@@ -391,7 +487,10 @@ typedef struct heapframe {
/* Where to jump back to */
int Xwhere;
-
+#if defined(ERLANG_INTEGRATION)
+ int Xlgb;
+ int Xrgb;
+#endif
} heapframe;
#endif
@@ -408,10 +507,33 @@ typedef struct heapframe {
/* This function is called recursively in many circumstances. Whenever it
returns a negative (error) response, the outer incarnation must also return the
-same response.
+same response. */
+
+/* These macros pack up tests that are used for partial matching, and which
+appear several times in the code. We set the "hit end" flag if the pointer is
+at the end of the subject and also past the start of the subject (i.e.
+something has been matched). For hard partial matching, we then return
+immediately. The second one is used when we already know we are past the end of
+the subject. */
+
+#define CHECK_PARTIAL()\
+ if (md->partial != 0 && eptr >= md->end_subject && \
+ eptr > md->start_used_ptr) \
+ { \
+ md->hitend = TRUE; \
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
+ }
+
+#define SCHECK_PARTIAL()\
+ if (md->partial != 0 && eptr > md->start_used_ptr) \
+ { \
+ md->hitend = TRUE; \
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
+ }
-Performance note: It might be tempting to extract commonly used fields from the
-md structure (e.g. utf8, end_subject) into individual variables to improve
+
+/* Performance note: It might be tempting to extract commonly used fields from
+the md structure (e.g. utf, end_subject) into individual variables to improve
performance. Tests using gcc on a SPARC disproved this; in the first case, it
made performance worse.
@@ -422,25 +544,21 @@ Arguments:
by encountering \K)
offset_top current top pointer
md pointer to "static" info for the match
- ims current /i, /m, and /s options
eptrb pointer to chain of blocks containing eptr at start of
brackets - for testing for empty matches
- flags can contain
- match_condassert - this is an assertion condition
- match_cbegroup - this is the start of an unlimited repeat
- group that can match an empty string
rdepth the recursion depth
Returns: MATCH_MATCH if matched ) these values are >= 0
MATCH_NOMATCH if failed to match )
+ a negative MATCH_xxx value for PRUNE, SKIP, etc
a negative PCRE_ERROR_xxx value if aborted by an error condition
(e.g. stopped by repeated call or recursion limit)
*/
static int
-match(REGISTER USPTR eptr, REGISTER const uschar *ecode, const uschar *mstart,
- int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb,
- int flags, unsigned int rdepth)
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
+ unsigned int rdepth)
{
/* These variables do not need to be preserved over recursion in this function,
so they can be ordinary variables in all cases. Mark some of them with
@@ -448,17 +566,22 @@ so they can be ordinary variables in all cases. Mark some of them with
register int rrc; /* Returns from recursive calls */
register int i; /* Used for loops not involving calls to RMATCH() */
-register unsigned int c; /* Character values not kept over RMATCH() calls */
-register BOOL utf8; /* Local copy of UTF-8 flag for speed */
+register pcre_uint32 c; /* Character values not kept over RMATCH() calls */
+register BOOL utf; /* Local copy of UTF flag for speed */
BOOL minimize, possessive; /* Quantifier options */
+BOOL caseless;
+int condcode;
/* When recursion is not being used, all "local" variables that have to be
-preserved over calls to RMATCH() are part of a "frame" which is obtained from
-heap storage. Set up the top-level frame here; others are obtained from the
-heap whenever RMATCH() does a "recursion". See the macro definitions above. */
+preserved over calls to RMATCH() are part of a "frame". We set up the top-level
+frame on the stack here; subsequent instantiations are obtained from the heap
+whenever RMATCH() does a "recursion". See the macro definitions above. Putting
+the top-level on the stack rather than malloc-ing them all gives a performance
+boost in many cases where there is not much "recursion". */
#ifdef NO_RECURSE
+
#ifdef ERLANG_INTEGRATION
#define LOOP_COUNT loop_count
#define LOOP_LIMIT loop_limit
@@ -489,18 +612,16 @@ register int loop_limit = md->loop_limit;
heapframe *frame;
if (md->state_save) {
frame = md->state_save;
- /* ASSERT(frame != NULL); */
EDEBUGF(("Break restore!"));
goto LOOP_COUNT_RETURN;
}
-frame = (erts_pcre_stack_malloc)(sizeof(heapframe));
+frame = (heapframe *)md->match_frames_base;
#else
#define COST(N)
#define COST_CHK(N)
-heapframe *frame = (erts_pcre_stack_malloc)(sizeof(heapframe));
+heapframe *frame = (heapframe *)md->match_frames_base;
#endif
-
-frame->Xprevframe = NULL; /* Marks the top level */
+
/* Copy in the original argument variables */
@@ -508,9 +629,7 @@ frame->Xeptr = eptr;
frame->Xecode = ecode;
frame->Xmstart = mstart;
frame->Xoffset_top = offset_top;
-frame->Xims = ims;
frame->Xeptrb = eptrb;
-frame->Xflags = flags;
frame->Xrdepth = rdepth;
/* This is where control jumps back to to effect "recursion" */
@@ -523,17 +642,16 @@ HEAP_RECURSE:
#define ecode frame->Xecode
#define mstart frame->Xmstart
#define offset_top frame->Xoffset_top
-#define ims frame->Xims
#define eptrb frame->Xeptrb
-#define flags frame->Xflags
#define rdepth frame->Xrdepth
/* Ditto for the local variables */
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
#define charptr frame->Xcharptr
#endif
#define callpat frame->Xcallpat
+#define codelink frame->Xcodelink
#define data frame->Xdata
#define next frame->Xnext
#define pp frame->Xpp
@@ -546,15 +664,10 @@ HEAP_RECURSE:
#define condition frame->Xcondition
#define prev_is_word frame->Xprev_is_word
-#define original_ims frame->Xoriginal_ims
-
#ifdef SUPPORT_UCP
#define prop_type frame->Xprop_type
#define prop_value frame->Xprop_value
#define prop_fail_result frame->Xprop_fail_result
-#define prop_category frame->Xprop_category
-#define prop_chartype frame->Xprop_chartype
-#define prop_script frame->Xprop_script
#define oclength frame->Xoclength
#define occhars frame->Xocchars
#endif
@@ -573,6 +686,10 @@ HEAP_RECURSE:
#define save_offset2 frame->Xsave_offset2
#define save_offset3 frame->Xsave_offset3
#define stacksave frame->Xstacksave
+#if defined(ERLANG_INTEGRATION)
+#define lgb frame->Xlgb
+#define rgb frame->Xrgb
+#endif
#define newptrb frame->Xnewptrb
@@ -586,50 +703,83 @@ i, and fc and c, can be the same variables. */
#define fi i
#define fc c
+/* Many of the following variables are used only in small blocks of the code.
+My normal style of coding would have declared them within each of those blocks.
+However, in order to accommodate the version of this code that uses an external
+"stack" implemented on the heap, it is easier to declare them all here, so the
+declarations can be cut out in a block. The only declarations within blocks
+below are for variables that do not have to be preserved over a recursive call
+to RMATCH(). */
+
+#ifdef SUPPORT_UTF
+const pcre_uchar *charptr;
+#endif
+const pcre_uchar *callpat;
+const pcre_uchar *data;
+const pcre_uchar *next;
+PCRE_PUCHAR pp;
+const pcre_uchar *prev;
+PCRE_PUCHAR saved_eptr;
+
+recursion_info new_recursive;
-#ifdef SUPPORT_UTF8 /* Many of these variables are used only */
-const uschar *charptr; /* in small blocks of the code. My normal */
-#endif /* style of coding would have declared */
-const uschar *callpat; /* them within each of those blocks. */
-const uschar *data; /* However, in order to accommodate the */
-const uschar *next; /* version of this code that uses an */
-USPTR pp; /* external "stack" implemented on the */
-const uschar *prev; /* heap, it is easier to declare them all */
-USPTR saved_eptr; /* here, so the declarations can be cut */
- /* out in a block. The only declarations */
-recursion_info new_recursive; /* within blocks below are for variables */
- /* that do not have to be preserved over */
-BOOL cur_is_word; /* a recursive call to RMATCH(). */
+BOOL cur_is_word;
BOOL condition;
BOOL prev_is_word;
-unsigned long int original_ims;
-
#ifdef SUPPORT_UCP
int prop_type;
-int prop_value;
+unsigned int prop_value;
int prop_fail_result;
-int prop_category;
-int prop_chartype;
-int prop_script;
int oclength;
-uschar occhars[8];
+pcre_uchar occhars[6];
#endif
+int codelink;
int ctype;
int length;
int max;
int min;
-int number;
+unsigned int number;
int offset;
-int op;
-int save_capture_last;
+unsigned int op;
+pcre_int32 save_capture_last;
int save_offset1, save_offset2, save_offset3;
int stacksave[REC_STACK_SAVE_MAX];
eptrblock newptrb;
+
+/* There is a special fudge for calling match() in a way that causes it to
+measure the size of its basic stack frame when the stack is being used for
+recursion. The second argument (ecode) being NULL triggers this behaviour. It
+cannot normally ever be NULL. The return is the negated value of the frame
+size. */
+
+if (ecode == NULL)
+ {
+ if (rdepth == 0)
+ return match((PCRE_PUCHAR)&rdepth, NULL, NULL, 0, NULL, NULL, 1);
+ else
+ {
+ int len = (char *)&rdepth - (char *)eptr;
+ return (len > 0)? -len : len;
+ }
+ }
#endif /* NO_RECURSE */
+/* To save space on the stack and in the heap frame, I have doubled up on some
+of the local variables that are used only in localised parts of the code, but
+still need to be preserved over recursive calls of match(). These macros define
+the alternative names that are used. */
+
+#define allow_zero cur_is_word
+#define cbegroup condition
+#define code_offset codelink
+#define condassert condition
+#define matched_once prev_is_word
+#define foc number
+#define save_mark data
+
/* These statements are here to stop the compiler complaining about unitialized
variables. */
@@ -649,15 +799,15 @@ TAIL_RECURSE:
/* OK, now we can get on with the real code of the function. Recursive calls
are specified by the macro RMATCH and RRETURN is used to return. When
NO_RECURSE is *not* defined, these just turn into a recursive call to match()
-and a "return", respectively (possibly with some debugging if DEBUG is
+and a "return", respectively (possibly with some debugging if PCRE_DEBUG is
defined). However, RMATCH isn't like a function call because it's quite a
complicated macro. It has to be used in one particular way. This shouldn't,
however, impact performance when true recursion is being used. */
-#ifdef SUPPORT_UTF8
-utf8 = md->utf8; /* Local copy of the flag */
+#ifdef SUPPORT_UTF
+utf = md->utf; /* Local copy of the flag */
#else
-utf8 = FALSE;
+utf = FALSE;
#endif
/* First check that we haven't called match() too many times, or that we
@@ -666,22 +816,24 @@ haven't exceeded the recursive call limit. */
if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT);
if (rdepth >= md->match_limit_recursion) RRETURN(PCRE_ERROR_RECURSIONLIMIT);
-original_ims = ims; /* Save for resetting on ')' */
-
/* At the start of a group with an unlimited repeat that may match an empty
-string, the match_cbegroup flag is set. When this is the case, add the current
-subject pointer to the chain of such remembered pointers, to be checked when we
-hit the closing ket, in order to break infinite loops that match no characters.
-When match() is called in other circumstances, don't add to the chain. The
-match_cbegroup flag must NOT be used with tail recursion, because the memory
-block that is used is on the stack, so a new one may be required for each
-match(). */
-
-if ((flags & match_cbegroup) != 0)
+string, the variable md->match_function_type is set to MATCH_CBEGROUP. It is
+done this way to save having to use another function argument, which would take
+up space on the stack. See also MATCH_CONDASSERT below.
+
+When MATCH_CBEGROUP is set, add the current subject pointer to the chain of
+such remembered pointers, to be checked when we hit the closing ket, in order
+to break infinite loops that match no characters. When match() is called in
+other circumstances, don't add to the chain. The MATCH_CBEGROUP feature must
+NOT be used with tail recursion, because the memory block that is used is on
+the stack, so a new one may be required for each match(). */
+
+if (md->match_function_type == MATCH_CBEGROUP)
{
newptrb.epb_saved_eptr = eptr;
newptrb.epb_prev = eptrb;
eptrb = &newptrb;
+ md->match_function_type = 0;
}
/* Now start processing the opcodes. */
@@ -693,53 +845,203 @@ for (;;)
op = *ecode;
EDEBUGF(("Op = %d",op));
- /* For partial matching, remember if we ever hit the end of the subject after
- matching at least one subject character. */
-
- if (md->partial &&
- eptr >= md->end_subject &&
- eptr > mstart)
- md->hitend = TRUE;
-
switch(op)
{
+ case OP_MARK:
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM55);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
+
+ /* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an
+ argument, and we must check whether that argument matches this MARK's
+ argument. It is passed back in md->start_match_ptr (an overloading of that
+ variable). If it does match, we reset that variable to the current subject
+ position and return MATCH_SKIP. Otherwise, pass back the return code
+ unaltered. */
+
+ else if (rrc == MATCH_SKIP_ARG &&
+ STRCMP_UC_UC_TEST(ecode + 2, md->start_match_ptr) == 0)
+ {
+ md->start_match_ptr = eptr;
+ RRETURN(MATCH_SKIP);
+ }
+ RRETURN(rrc);
+
case OP_FAIL:
RRETURN(MATCH_NOMATCH);
+ case OP_COMMIT:
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM52);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RRETURN(MATCH_COMMIT);
+
case OP_PRUNE:
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM51);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM51);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
RRETURN(MATCH_PRUNE);
- case OP_COMMIT:
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM52);
+ case OP_PRUNE_ARG:
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM56);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- RRETURN(MATCH_COMMIT);
+ RRETURN(MATCH_PRUNE);
case OP_SKIP:
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM53);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM53);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
md->start_match_ptr = eptr; /* Pass back current position */
RRETURN(MATCH_SKIP);
+ /* Note that, for Perl compatibility, SKIP with an argument does NOT set
+ nomatch_mark. When a pattern match ends with a SKIP_ARG for which there was
+ not a matching mark, we have to re-run the match, ignoring the SKIP_ARG
+ that failed and any that precede it (either they also failed, or were not
+ triggered). To do this, we maintain a count of executed SKIP_ARGs. If a
+ SKIP_ARG gets to top level, the match is re-run with md->ignore_skip_arg
+ set to the count of the one that failed. */
+
+ case OP_SKIP_ARG:
+ md->skip_arg_count++;
+ if (md->skip_arg_count <= md->ignore_skip_arg)
+ {
+ ecode += PRIV(OP_lengths)[*ecode] + ecode[1];
+ break;
+ }
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
+ eptrb, RM57);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+
+ /* Pass back the current skip name by overloading md->start_match_ptr and
+ returning the special MATCH_SKIP_ARG return code. This will either be
+ caught by a matching MARK, or get to the top, where it causes a rematch
+ with md->ignore_skip_arg set to the value of md->skip_arg_count. */
+
+ md->start_match_ptr = ecode + 2;
+ RRETURN(MATCH_SKIP_ARG);
+
+ /* For THEN (and THEN_ARG) we pass back the address of the opcode, so that
+ the branch in which it occurs can be determined. Overload the start of
+ match pointer to do this. */
+
case OP_THEN:
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM54);
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM54);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->start_match_ptr = ecode;
RRETURN(MATCH_THEN);
- /* Handle a capturing bracket. If there is space in the offset vector, save
- the current subject position in the working slot at the top of the vector.
- We mustn't change the current values of the data slot, because they may be
- set from a previous iteration of this group, and be referred to by a
- reference inside the group.
+ case OP_THEN_ARG:
+ md->nomatch_mark = ecode + 2;
+ md->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top,
+ md, eptrb, RM58);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ md->mark == NULL) md->mark = ecode + 2;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->start_match_ptr = ecode;
+ RRETURN(MATCH_THEN);
+
+ /* Handle an atomic group that does not contain any capturing parentheses.
+ This can be handled like an assertion. Prior to 8.13, all atomic groups
+ were handled this way. In 8.13, the code was changed as below for ONCE, so
+ that backups pass through the group and thereby reset captured values.
+ However, this uses a lot more stack, so in 8.20, atomic groups that do not
+ contain any captures generate OP_ONCE_NC, which can be handled in the old,
+ less stack intensive way.
+
+ Check the alternative branches in turn - the matching won't pass the KET
+ for this kind of subpattern. If any one branch matches, we carry on as at
+ the end of a normal bracket, leaving the subject pointer, but resetting
+ the start-of-match value in case it was changed by \K. */
+
+ case OP_ONCE_NC:
+ prev = ecode;
+ saved_eptr = eptr;
+ save_mark = md->mark;
+ do /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM64);
+ if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */
+ {
+ mstart = md->start_match_ptr;
+ break;
+ }
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode,1);
+ md->mark = save_mark;
+ }
+ while (*ecode == OP_ALT);
+
+ /* If hit the end of the group (which could be repeated), fail */
+
+ if (*ecode != OP_ONCE_NC && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
+
+ /* Continue as from after the group, updating the offsets high water
+ mark, since extracts may have been taken. */
+
+ do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
+
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+
+ /* For a non-repeating ket, just continue at this level. This also
+ happens for a repeating ket if no characters were matched in the group.
+ This is the forcible breaking of infinite loops as implemented in Perl
+ 5.005. */
+
+ if (*ecode == OP_KET || eptr == saved_eptr)
+ {
+ ecode += 1+LINK_SIZE;
+ break;
+ }
- If the bracket fails to match, we need to restore this value and also the
- values of the final offsets, in case they were set by a previous iteration
- of the same bracket.
+ /* The repeating kets try the rest of the pattern or restart from the
+ preceding bracket, in the appropriate order. The second "call" of match()
+ uses tail recursion, to avoid using another stack frame. */
+
+ if (*ecode == OP_KETRMIN)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM65);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode = prev;
+ goto TAIL_RECURSE;
+ }
+ else /* OP_KETRMAX */
+ {
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM66);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += 1 + LINK_SIZE;
+ goto TAIL_RECURSE;
+ }
+ /* Control never gets here */
+
+ /* Handle a capturing bracket, other than those that are possessive with an
+ unlimited repeat. If there is space in the offset vector, save the current
+ subject position in the working slot at the top of the vector. We mustn't
+ change the current values of the data slot, because they may be set from a
+ previous iteration of this group, and be referred to by a reference inside
+ the group. A failure to match might occur after the group has succeeded,
+ if something later on doesn't match. For this reason, we need to restore
+ the working value and also the values of the final offsets, in case they
+ were set by a previous iteration of the same bracket.
If there isn't enough space in the offset vector, treat this as if it were
a non-capturing bracket. Don't worry about setting the flag for the error
@@ -750,7 +1052,7 @@ for (;;)
number = GET2(ecode, 1+LINK_SIZE);
offset = number << 1;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("start bracket %d\n", number);
printf("subject=");
pchars(eptr, 16, TRUE, md);
@@ -763,28 +1065,55 @@ for (;;)
save_offset2 = md->offset_vector[offset+1];
save_offset3 = md->offset_vector[md->offset_end - number];
save_capture_last = md->capture_last;
+ save_mark = md->mark;
DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
- md->offset_vector[md->offset_end - number] = eptr - md->start_subject;
+ md->offset_vector[md->offset_end - number] =
+ (int)(eptr - md->start_subject);
- flags = (op == OP_SCBRA)? match_cbegroup : 0;
- do /* PaN: OK */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md,
- ims, eptrb, flags, RM1);
- if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM1);
+ if (rrc == MATCH_ONCE) break; /* Backing up through an atomic group */
+
+ /* If we backed up to a THEN, check whether it is within the current
+ branch by comparing the address of the THEN that is passed back with
+ the end of the branch. If it is within the current branch, and the
+ branch is one of two or more alternatives (it either starts or ends
+ with OP_ALT), we have reached the limit of THEN's action, so convert
+ the return code to NOMATCH, which will cause normal backtracking to
+ happen from now on. Otherwise, THEN is passed back to an outer
+ alternative. This implements Perl's treatment of parenthesized groups,
+ where a group not containing | does not affect the current alternative,
+ that is, (X) is NOT the same as (X|(*F)). */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ /* Anything other than NOMATCH is passed back. */
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
md->capture_last = save_capture_last;
ecode += GET(ecode, 1);
+ md->mark = save_mark;
+ if (*ecode != OP_ALT) break;
}
- while (*ecode == OP_ALT);
DPRINTF(("bracket %d failed\n", number));
-
md->offset_vector[offset] = save_offset1;
md->offset_vector[offset+1] = save_offset2;
md->offset_vector[md->offset_end - number] = save_offset3;
- RRETURN(MATCH_NOMATCH);
+ /* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */
+
+ RRETURN(rrc);
}
/* FALL THROUGH ... Insufficient room for saving captured contents. Treat
@@ -798,87 +1127,462 @@ for (;;)
/* VVVVVVVVVVVVVVVVVVVVVVVVV */
/* VVVVVVVVVVVVVVVVVVVVVVVVV */
- /* Non-capturing bracket. Loop for all the alternatives. When we get to the
- final alternative within the brackets, we would return the result of a
- recursive call to match() whatever happened. We can reduce stack usage by
- turning this into a tail recursion, except in the case when match_cbegroup
- is set.*/
+ /* Non-capturing or atomic group, except for possessive with unlimited
+ repeat and ONCE group with no captures. Loop for all the alternatives.
+
+ When we get to the final alternative within the brackets, we used to return
+ the result of a recursive call to match() whatever happened so it was
+ possible to reduce stack usage by turning this into a tail recursion,
+ except in the case of a possibly empty group. However, now that there is
+ the possiblity of (*THEN) occurring in the final alternative, this
+ optimization is no longer always possible.
+ We can optimize if we know there are no (*THEN)s in the pattern; at present
+ this is the best that can be done.
+
+ MATCH_ONCE is returned when the end of an atomic group is successfully
+ reached, but subsequent matching fails. It passes back up the tree (causing
+ captured values to be reset) until the original atomic group level is
+ reached. This is tested by comparing md->once_target with the start of the
+ group. At this point, the return is converted into MATCH_NOMATCH so that
+ previous backup points can be taken. */
+
+ case OP_ONCE:
case OP_BRA:
case OP_SBRA:
DPRINTF(("start non-capturing bracket\n"));
- flags = (op >= OP_SBRA)? match_cbegroup : 0;
- for (;;) /* PaN: OK */
+
+ for (;;) /* LOOP_COUNT: Ok */
+ {
+ if (op >= OP_SBRA || op == OP_ONCE)
+ md->match_function_type = MATCH_CBEGROUP;
+
+ /* If this is not a possibly empty group, and there are no (*THEN)s in
+ the pattern, and this is the final alternative, optimize as described
+ above. */
+
+ else if (!md->hasthen && ecode[GET(ecode, 1)] != OP_ALT)
+ {
+ ecode += PRIV(OP_lengths)[*ecode];
+ goto TAIL_RECURSE;
+ }
+
+ /* In all other cases, we have to make another call to match(). */
+
+ save_mark = md->mark;
+ save_capture_last = md->capture_last;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, eptrb,
+ RM2);
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH)
+ {
+ if (rrc == MATCH_ONCE)
+ {
+ const pcre_uchar *scode = ecode;
+ if (*scode != OP_ONCE) /* If not at start, find it */
+ {
+ while (*scode == OP_ALT) scode += GET(scode, 1);
+ scode -= GET(scode, 1);
+ }
+ if (md->once_target == scode) rrc = MATCH_NOMATCH;
+ }
+ RRETURN(rrc);
+ }
+ ecode += GET(ecode, 1);
+ md->mark = save_mark;
+ if (*ecode != OP_ALT) break;
+ md->capture_last = save_capture_last;
+ }
+
+ RRETURN(MATCH_NOMATCH);
+
+ /* Handle possessive capturing brackets with an unlimited repeat. We come
+ here from BRAZERO with allow_zero set TRUE. The offset_vector values are
+ handled similarly to the normal case above. However, the matching is
+ different. The end of these brackets will always be OP_KETRPOS, which
+ returns MATCH_KETRPOS without going further in the pattern. By this means
+ we can handle the group by iteration rather than recursion, thereby
+ reducing the amount of stack needed. */
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_CAPTURE:
+ number = GET2(ecode, 1+LINK_SIZE);
+ offset = number << 1;
+
+#ifdef PCRE_DEBUG
+ printf("start possessive bracket %d\n", number);
+ printf("subject=");
+ pchars(eptr, 16, TRUE, md);
+ printf("\n");
+#endif
+
+ if (offset < md->offset_max)
{
- if (ecode[GET(ecode, 1)] != OP_ALT) /* Final alternative */
+ matched_once = FALSE;
+ code_offset = (int)(ecode - md->start_code);
+
+ save_offset1 = md->offset_vector[offset];
+ save_offset2 = md->offset_vector[offset+1];
+ save_offset3 = md->offset_vector[md->offset_end - number];
+ save_capture_last = md->capture_last;
+
+ DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
+
+ /* Each time round the loop, save the current subject position for use
+ when the group matches. For MATCH_MATCH, the group has matched, so we
+ restart it with a new subject starting position, remembering that we had
+ at least one match. For MATCH_NOMATCH, carry on with the alternatives, as
+ usual. If we haven't matched any alternatives in any iteration, check to
+ see if a previous iteration matched. If so, the group has matched;
+ continue from afterwards. Otherwise it has failed; restore the previous
+ capture values before returning NOMATCH. */
+
+ for (;;) /* LOOP_COUNT: Ok */
{
- if (flags == 0) /* Not a possibly empty group */
+ md->offset_vector[md->offset_end - number] =
+ (int)(eptr - md->start_subject);
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM63);
+ if (rrc == MATCH_KETRPOS)
{
- ecode += _erts_pcre_OP_lengths[*ecode];
- DPRINTF(("bracket 0 tail recursion\n"));
- goto TAIL_RECURSE;
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+ ecode = md->start_code + code_offset;
+ save_capture_last = md->capture_last;
+ matched_once = TRUE;
+ continue;
}
- /* Possibly empty group; can't use tail recursion. */
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md, ims,
- eptrb, flags, RM48);
- RRETURN(rrc);
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->capture_last = save_capture_last;
+ ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
}
- /* For non-final alternatives, continue the loop for a NOMATCH result;
- otherwise return. */
+ if (!matched_once)
+ {
+ md->offset_vector[offset] = save_offset1;
+ md->offset_vector[offset+1] = save_offset2;
+ md->offset_vector[md->offset_end - number] = save_offset3;
+ }
+
+ if (allow_zero || matched_once)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
+ }
+
+ RRETURN(MATCH_NOMATCH);
+ }
+
+ /* FALL THROUGH ... Insufficient room for saving captured contents. Treat
+ as a non-capturing bracket. */
+
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
- RMATCH(eptr, ecode + _erts_pcre_OP_lengths[*ecode], offset_top, md, ims,
- eptrb, flags, RM2);
- if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
+ DPRINTF(("insufficient capture room: treat as non-capturing\n"));
+
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+
+ /* Non-capturing possessive bracket with unlimited repeat. We come here
+ from BRAZERO with allow_zero = TRUE. The code is similar to the above,
+ without the capturing complication. It is written out separately for speed
+ and cleanliness. */
+
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_NON_CAPTURE:
+ matched_once = FALSE;
+ code_offset = (int)(ecode - md->start_code);
+ save_capture_last = md->capture_last;
+
+ for (;;) /* LOOP_COUNT: Ok */
+ {
+ if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
+ eptrb, RM48);
+ if (rrc == MATCH_KETRPOS)
+ {
+ offset_top = md->end_offset_top;
+ eptr = md->end_match_ptr;
+ ecode = md->start_code + code_offset;
+ matched_once = TRUE;
+ continue;
+ }
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
+ md->capture_last = save_capture_last;
+ }
+
+ if (matched_once || allow_zero)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
}
+ RRETURN(MATCH_NOMATCH);
+
/* Control never reaches here. */
/* Conditional group: compilation checked that there are no more than
two branches. If the condition is false, skipping the first branch takes us
past the end if there is only one branch, but that's OK because that is
- exactly what going to the ket would do. As there is only one branch to be
- obeyed, we can use tail recursion to avoid using another stack frame. */
+ exactly what going to the ket would do. */
case OP_COND:
case OP_SCOND:
- if (ecode[LINK_SIZE+1] == OP_RREF) /* Recursion test */
+ codelink = GET(ecode, 1);
+
+ /* Because of the way auto-callout works during compile, a callout item is
+ inserted between OP_COND and an assertion condition. */
+
+ if (ecode[LINK_SIZE+1] == OP_CALLOUT)
{
- offset = GET2(ecode, LINK_SIZE + 2); /* Recursion group number*/
- condition = md->recursive != NULL &&
- (offset == RREF_ANY || offset == md->recursive->group_num);
- ecode += condition? 3 : GET(ecode, 1);
+ if (PUBL(callout) != NULL)
+ {
+ PUBL(callout_block) cb;
+ cb.version = 2; /* Version 1 of the callout block */
+ cb.callout_number = ecode[LINK_SIZE+2];
+ cb.offset_vector = md->offset_vector;
+#if defined COMPILE_PCRE8
+ cb.subject = (PCRE_SPTR)md->start_subject;
+#elif defined COMPILE_PCRE16
+ cb.subject = (PCRE_SPTR16)md->start_subject;
+#elif defined COMPILE_PCRE32
+ cb.subject = (PCRE_SPTR32)md->start_subject;
+#endif
+ cb.subject_length = (int)(md->end_subject - md->start_subject);
+ cb.start_match = (int)(mstart - md->start_subject);
+ cb.current_position = (int)(eptr - md->start_subject);
+ cb.pattern_position = GET(ecode, LINK_SIZE + 3);
+ cb.next_item_length = GET(ecode, 3 + 2*LINK_SIZE);
+ cb.capture_top = offset_top/2;
+ cb.capture_last = md->capture_last & CAPLMASK;
+ /* Internal change requires this for API compatibility. */
+ if (cb.capture_last == 0) cb.capture_last = -1;
+ cb.callout_data = md->callout_data;
+ cb.mark = md->nomatch_mark;
+ if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
+ if (rrc < 0) RRETURN(rrc);
+ }
+ ecode += PRIV(OP_lengths)[OP_CALLOUT];
+ codelink -= PRIV(OP_lengths)[OP_CALLOUT];
+ }
+
+ condcode = ecode[LINK_SIZE+1];
+
+ /* Now see what the actual condition is */
+
+ if (condcode == OP_RREF || condcode == OP_NRREF) /* Recursion test */
+ {
+ if (md->recursive == NULL) /* Not recursing => FALSE */
+ {
+ condition = FALSE;
+ ecode += GET(ecode, 1);
+ }
+ else
+ { /* LOOP_COUNT: Warning, No CHK in this block */
+ unsigned int recno = GET2(ecode, LINK_SIZE + 2); /* Recursion group number*/
+ condition = (recno == RREF_ANY || recno == md->recursive->group_num);
+
+ /* If the test is for recursion into a specific subpattern, and it is
+ false, but the test was set up by name, scan the table to see if the
+ name refers to any other numbers, and test them. The condition is true
+ if any one is set. */
+
+ if (!condition && condcode == OP_NRREF)
+ {
+ pcre_uchar *slotA = md->name_table;
+ for (i = 0; i < md->name_count; i++)/* LOOP_COUNT: COST */
+ {
+ if (GET2(slotA, 0) == recno) break;
+ slotA += md->name_entry_size;
+ COST(1);
+ }
+
+ /* Found a name for the number - there can be only one; duplicate
+ names for different numbers are allowed, but not vice versa. First
+ scan down for duplicates. */
+
+ if (i < md->name_count)
+ {
+ pcre_uchar *slotB = slotA;
+ while (slotB > md->name_table) /* LOOP_COUNT: COST */
+ {
+ slotB -= md->name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = GET2(slotB, 0) == md->recursive->group_num;
+ if (condition) break;
+ }
+ else break;
+ COST(1);
+ }
+
+ /* Scan up for duplicates */
+
+ if (!condition)
+ {
+ slotB = slotA;
+ for (i++; i < md->name_count; i++)/* LOOP_COUNT: COST */
+ {
+ slotB += md->name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = GET2(slotB, 0) == md->recursive->group_num;
+ if (condition) break;
+ }
+ else break;
+ COST(1);
+ }
+ }
+ }
+ }
+
+ /* Chose branch according to the condition */
+
+ ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
+ }
}
- else if (ecode[LINK_SIZE+1] == OP_CREF) /* Group used test */
+ else if (condcode == OP_CREF || condcode == OP_NCREF) /* Group used test */
{
offset = GET2(ecode, LINK_SIZE+2) << 1; /* Doubled ref number */
condition = offset < offset_top && md->offset_vector[offset] >= 0;
- ecode += condition? 3 : GET(ecode, 1);
+
+ /* If the numbered capture is unset, but the reference was by name,
+ scan the table to see if the name refers to any other numbers, and test
+ them. The condition is true if any one is set. This is tediously similar
+ to the code above, but not close enough to try to amalgamate. */
+
+ if (!condition && condcode == OP_NCREF)
+ {
+ unsigned int refno = offset >> 1;
+ pcre_uchar *slotA = md->name_table;/* LOOP_COUNT: Warning, no CHK in this block */
+
+ for (i = 0; i < md->name_count; i++) /* LOOP_COUNT: COST */
+ {
+ if (GET2(slotA, 0) == refno) break;
+ slotA += md->name_entry_size;
+ COST(1);
+ }
+
+ /* Found a name for the number - there can be only one; duplicate names
+ for different numbers are allowed, but not vice versa. First scan down
+ for duplicates. */
+
+ if (i < md->name_count)
+ {
+ pcre_uchar *slotB = slotA;
+ while (slotB > md->name_table) /* LOOP_COUNT: COST */
+ {
+ slotB -= md->name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ offset = GET2(slotB, 0) << 1;
+ condition = offset < offset_top &&
+ md->offset_vector[offset] >= 0;
+ if (condition) break;
+ }
+ else break;
+ COST(1);
+ }
+
+ /* Scan up for duplicates */
+
+ if (!condition)
+ {
+ slotB = slotA;
+ for (i++; i < md->name_count; i++) /* LOOP_COUNT: COST */
+ {
+ slotB += md->name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ offset = GET2(slotB, 0) << 1;
+ condition = offset < offset_top &&
+ md->offset_vector[offset] >= 0;
+ if (condition) break;
+ }
+ else break;
+ COST(1);
+ }
+ }
+ }
+ }
+
+ /* Chose branch according to the condition */
+
+ ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
}
- else if (ecode[LINK_SIZE+1] == OP_DEF) /* DEFINE - always false */
+ else if (condcode == OP_DEF) /* DEFINE - always false */
{
condition = FALSE;
ecode += GET(ecode, 1);
}
/* The condition is an assertion. Call match() to evaluate it - setting
- the final argument match_condassert causes it to stop at the end of an
- assertion. */
+ md->match_function_type to MATCH_CONDASSERT causes it to stop at the end of
+ an assertion. */
else
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL,
- match_condassert, RM3);
+ md->match_function_type = MATCH_CONDASSERT;
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM3);
if (rrc == MATCH_MATCH)
{
+ if (md->end_offset_top > offset_top)
+ offset_top = md->end_offset_top; /* Captures may have happened */
condition = TRUE;
ecode += 1 + LINK_SIZE + GET(ecode, LINK_SIZE + 2);
- while (*ecode == OP_ALT) ecode += GET(ecode, 1); /* PaN: Check */
+ while (*ecode == OP_ALT) ecode += GET(ecode, 1); /* LOOP_COUNT: Ok */
}
+
+ /* PCRE doesn't allow the effect of (*THEN) to escape beyond an
+ assertion; it is therefore treated as NOMATCH. */
+
else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
{
RRETURN(rrc); /* Need braces because of following else */
@@ -886,120 +1590,246 @@ for (;;)
else
{
condition = FALSE;
- ecode += GET(ecode, 1);
+ ecode += codelink;
}
}
- /* We are now at the branch that is to be obeyed. As there is only one,
- we can use tail recursion to avoid using another stack frame, except when
- match_cbegroup is required for an unlimited repeat of a possibly empty
- group. If the second alternative doesn't exist, we can just plough on. */
+ /* We are now at the branch that is to be obeyed. As there is only one, can
+ use tail recursion to avoid using another stack frame, except when there is
+ unlimited repeat of a possibly empty group. In the latter case, a recursive
+ call to match() is always required, unless the second alternative doesn't
+ exist, in which case we can just plough on. Note that, for compatibility
+ with Perl, the | in a conditional group is NOT treated as creating two
+ alternatives. If a THEN is encountered in the branch, it propagates out to
+ the enclosing alternative (unless nested in a deeper set of alternatives,
+ of course). */
if (condition || *ecode == OP_ALT)
{
- ecode += 1 + LINK_SIZE;
- if (op == OP_SCOND) /* Possibly empty group */
+ if (op != OP_SCOND)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, match_cbegroup, RM49);
- RRETURN(rrc);
- }
- else /* Group must match something */
- {
- flags = 0;
+ ecode += 1 + LINK_SIZE;
goto TAIL_RECURSE;
}
+
+ md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);
+ RRETURN(rrc);
}
- else /* Condition false & no 2nd alternative */
+
+ /* Condition false & no alternative; continue after the group. */
+
+ else
{
ecode += 1 + LINK_SIZE;
}
break;
- /* End of the pattern, either real or forced. If we are in a top-level
- recursion, we should restore the offsets appropriately and continue from
- after the call. */
+ /* Before OP_ACCEPT there may be any number of OP_CLOSE opcodes,
+ to close any currently open capturing brackets. */
- case OP_ACCEPT:
- case OP_END:
- if (md->recursive != NULL && md->recursive->group_num == 0)
+ case OP_CLOSE:
+ number = GET2(ecode, 1); /* Must be less than 65536 */
+ offset = number << 1;
+
+#ifdef PCRE_DEBUG
+ printf("end bracket %d at *ACCEPT", number);
+ printf("\n");
+#endif
+
+ md->capture_last = (md->capture_last & OVFLMASK) | number;
+ if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else
{
- recursion_info *rec = md->recursive;
- DPRINTF(("End of pattern in a (?0) recursion\n"));
- md->recursive = rec->prevrec;
- memmove(md->offset_vector, rec->offset_save,
- rec->saved_max * sizeof(int));
- mstart = rec->save_start;
- ims = original_ims;
- ecode = rec->after_call;
- break;
+ md->offset_vector[offset] =
+ md->offset_vector[md->offset_end - number];
+ md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
+ if (offset_top <= offset) offset_top = offset + 2;
}
+ ecode += 1 + IMM2_SIZE;
+ break;
+
- /* Otherwise, if PCRE_NOTEMPTY is set, fail if we have matched an empty
- string - backtracking will then try other alternatives, if any. */
+ /* End of the pattern, either real or forced. */
+
+ case OP_END:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+
+ /* If we have matched an empty string, fail if not in an assertion and not
+ in a recursion if either PCRE_NOTEMPTY is set, or if PCRE_NOTEMPTY_ATSTART
+ is set and we have matched at the start of the subject. In both cases,
+ backtracking will then try other alternatives, if any. */
+
+ if (eptr == mstart && op != OP_ASSERT_ACCEPT &&
+ md->recursive == NULL &&
+ (md->notempty ||
+ (md->notempty_atstart &&
+ mstart == md->start_subject + md->start_offset)))
+ RRETURN(MATCH_NOMATCH);
+
+ /* Otherwise, we have a match. */
- if (md->notempty && eptr == mstart) RRETURN(MATCH_NOMATCH);
md->end_match_ptr = eptr; /* Record where we ended */
md->end_offset_top = offset_top; /* and how many extracts were taken */
md->start_match_ptr = mstart; /* and the start (\K can modify) */
- RRETURN(MATCH_MATCH);
- /* Change option settings */
+ /* For some reason, the macros don't work properly if an expression is
+ given as the argument to RRETURN when the heap is in use. */
- case OP_OPT:
- ims = ecode[1];
- ecode += 2;
- DPRINTF(("ims set to %02lx\n", ims));
- break;
+ rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT;
+ RRETURN(rrc);
/* Assertion brackets. Check the alternative branches in turn - the
matching won't pass the KET for an assertion. If any one branch matches,
the assertion is true. Lookbehind assertions have an OP_REVERSE item at the
start of each branch to move the current point backwards, so the code at
- this level is identical to the lookahead case. */
+ this level is identical to the lookahead case. When the assertion is part
+ of a condition, we want to return immediately afterwards. The caller of
+ this incarnation of the match() function will have set MATCH_CONDASSERT in
+ md->match_function type, and one of these opcodes will be the first opcode
+ that is processed. We use a local variable that is preserved over calls to
+ match() to remember this case. */
case OP_ASSERT:
case OP_ASSERTBACK:
- do /* PaN: OK */
+ save_mark = md->mark;
+ if (md->match_function_type == MATCH_CONDASSERT)
+ {
+ condassert = TRUE;
+ md->match_function_type = 0;
+ }
+ else condassert = FALSE;
+
+ /* Loop for each branch */
+
+ do /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
- RM4);
- if (rrc == MATCH_MATCH) break;
- if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM4);
+
+ /* A match means that the assertion is true; break out of the loop
+ that matches its alternatives. */
+
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
+ {
+ mstart = md->start_match_ptr; /* In case \K reset it */
+ break;
+ }
+
+ /* If not matched, restore the previous mark setting. */
+
+ md->mark = save_mark;
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ /* Anything other than NOMATCH causes the entire assertion to fail,
+ passing back the return code. This includes COMMIT, SKIP, PRUNE and an
+ uncaptured THEN, which means they take their normal effect. This
+ consistent approach does not always have exactly the same effect as in
+ Perl. */
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
ecode += GET(ecode, 1);
}
- while (*ecode == OP_ALT);
+ while (*ecode == OP_ALT); /* Continue for next alternative */ /* LOOP_COUNT: Ok */
+
+ /* If we have tried all the alternative branches, the assertion has
+ failed. If not, we broke out after a match. */
+
if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH);
/* If checking an assertion for a condition, return MATCH_MATCH. */
- if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
+ if (condassert) RRETURN(MATCH_MATCH);
- /* Continue from after the assertion, updating the offsets high water
- mark, since extracts may have been taken during the assertion. */
+ /* Continue from after a successful assertion, updating the offsets high
+ water mark, since extracts may have been taken during the assertion. */
- do ecode += GET(ecode,1); while (*ecode == OP_ALT); /* PaN: OK */
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT); /* LOOP_COUNT: Ok */
ecode += 1 + LINK_SIZE;
offset_top = md->end_offset_top;
continue;
- /* Negative assertion: all branches must fail to match */
+ /* Negative assertion: all branches must fail to match for the assertion to
+ succeed. */
case OP_ASSERT_NOT:
case OP_ASSERTBACK_NOT:
- do /* PaN: OK */
+ save_mark = md->mark;
+ if (md->match_function_type == MATCH_CONDASSERT)
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
- RM5);
- if (rrc == MATCH_MATCH) RRETURN(MATCH_NOMATCH);
- if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
+ condassert = TRUE;
+ md->match_function_type = 0;
+ }
+ else condassert = FALSE;
+
+ /* Loop for each alternative branch. */
+
+ do /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5);
+ md->mark = save_mark; /* Always restore the mark setting */
+
+ switch(rrc)
+ {
+ case MATCH_MATCH: /* A successful match means */
+ case MATCH_ACCEPT: /* the assertion has failed. */
+ RRETURN(MATCH_NOMATCH);
+
+ case MATCH_NOMATCH: /* Carry on with next branch */
+ break;
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ case MATCH_THEN:
+ next = ecode + GET(ecode,1);
+ if (md->start_match_ptr < next &&
+ (*ecode == OP_ALT || *next == OP_ALT))
+ {
+ rrc = MATCH_NOMATCH;
+ break;
+ }
+ /* Otherwise fall through. */
+
+ /* COMMIT, SKIP, PRUNE, and an uncaptured THEN cause the whole
+ assertion to fail to match, without considering any more alternatives.
+ Failing to match means the assertion is true. This is a consistent
+ approach, but does not always have the same effect as in Perl. */
+
+ case MATCH_COMMIT:
+ case MATCH_SKIP:
+ case MATCH_SKIP_ARG:
+ case MATCH_PRUNE:
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT); /* LOOP_COUNT: Ok */
+ goto NEG_ASSERT_TRUE; /* Break out of alternation loop */
+
+ /* Anything else is an error */
+
+ default:
+ RRETURN(rrc);
+ }
+
+ /* Continue with next branch */
+
ecode += GET(ecode,1);
}
while (*ecode == OP_ALT);
- if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
+ /* All branches in the assertion failed to match. */
- ecode += 1 + LINK_SIZE;
+ NEG_ASSERT_TRUE:
+ if (condassert) RRETURN(MATCH_MATCH); /* Condition assertion */
+ ecode += 1 + LINK_SIZE; /* Continue with current branch */
continue;
/* Move the subject pointer back. This occurs only at the start of
@@ -1008,12 +1838,12 @@ for (;;)
back a number of characters, not bytes. */
case OP_REVERSE:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
i = GET(ecode, 1);
COST(i);
- while (i-- > 0) /* PaN: OK */
+ while (i-- > 0) /* LOOP_COUNT: COST */
{
eptr--;
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
@@ -1030,8 +1860,9 @@ for (;;)
if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
}
- /* Skip to next op code */
+ /* Save the earliest consulted character, then skip to next op code */
+ if (eptr < md->start_used_ptr) md->start_used_ptr = eptr;
ecode += 1 + LINK_SIZE;
break;
@@ -1040,22 +1871,31 @@ for (;;)
function is able to force a failure. */
case OP_CALLOUT:
- if (erts_pcre_callout != NULL)
+ if (PUBL(callout) != NULL)
{
- pcre_callout_block cb;
- cb.version = 1; /* Version 1 of the callout block */
+ PUBL(callout_block) cb;
+ cb.version = 2; /* Version 1 of the callout block */
cb.callout_number = ecode[1];
cb.offset_vector = md->offset_vector;
+#if defined COMPILE_PCRE8
cb.subject = (PCRE_SPTR)md->start_subject;
- cb.subject_length = md->end_subject - md->start_subject;
- cb.start_match = mstart - md->start_subject;
- cb.current_position = eptr - md->start_subject;
+#elif defined COMPILE_PCRE16
+ cb.subject = (PCRE_SPTR16)md->start_subject;
+#elif defined COMPILE_PCRE32
+ cb.subject = (PCRE_SPTR32)md->start_subject;
+#endif
+ cb.subject_length = (int)(md->end_subject - md->start_subject);
+ cb.start_match = (int)(mstart - md->start_subject);
+ cb.current_position = (int)(eptr - md->start_subject);
cb.pattern_position = GET(ecode, 2);
cb.next_item_length = GET(ecode, 2 + LINK_SIZE);
cb.capture_top = offset_top/2;
- cb.capture_last = md->capture_last;
+ cb.capture_last = md->capture_last & CAPLMASK;
+ /* Internal change requires this for API compatibility. */
+ if (cb.capture_last == 0) cb.capture_last = -1;
cb.callout_data = md->callout_data;
- if ((rrc = (*erts_pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH);
+ cb.mark = md->nomatch_mark;
+ if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
if (rrc < 0) RRETURN(rrc);
}
ecode += 2 + 2*LINK_SIZE;
@@ -1065,38 +1905,52 @@ for (;;)
offset data is the offset to the starting bracket from the start of the
whole pattern. (This is so that it works from duplicated subpatterns.)
- If there are any capturing brackets started but not finished, we have to
- save their starting points and reinstate them after the recursion. However,
- we don't know how many such there are (offset_top records the completed
- total) so we just have to save all the potential data. There may be up to
- 65535 such values, which is too large to put on the stack, but using malloc
- for small numbers seems expensive. As a compromise, the stack is used when
- there are no more than REC_STACK_SAVE_MAX values to store; otherwise malloc
- is used. A problem is what to do if the malloc fails ... there is no way of
- returning to the top level with an error. Save the top REC_STACK_SAVE_MAX
- values on the stack, and accept that the rest may be wrong.
+ The state of the capturing groups is preserved over recursion, and
+ re-instated afterwards. We don't know how many are started and not yet
+ finished (offset_top records the completed total) so we just have to save
+ all the potential data. There may be up to 65535 such values, which is too
+ large to put on the stack, but using malloc for small numbers seems
+ expensive. As a compromise, the stack is used when there are no more than
+ REC_STACK_SAVE_MAX values to store; otherwise malloc is used.
There are also other values that have to be saved. We use a chained
sequence of blocks that actually live on the stack. Thanks to Robin Houston
- for the original version of this logic. */
+ for the original version of this logic. It has, however, been hacked around
+ a lot, so he is not to blame for the current way it works. */
case OP_RECURSE:
{
+ recursion_info *ri;
+ unsigned int recno; /* LOOP_COUNT: Warning, no CHK until after Marker1 */
+
callpat = md->start_code + GET(ecode, 1);
- new_recursive.group_num = (callpat == md->start_code)? 0 :
+ recno = (callpat == md->start_code)? 0 :
GET2(callpat, 1 + LINK_SIZE);
+ /* Check for repeating a recursion without advancing the subject pointer.
+ This should catch convoluted mutual recursions. (Some simple cases are
+ caught at compile time.) */
+
+ for (ri = md->recursive; ri != NULL; ri = ri->prevrec) /* LOOP_COUNT: COST */
+ {
+ if (recno == ri->group_num && eptr == ri->subject_position)
+ RRETURN(PCRE_ERROR_RECURSELOOP);
+ COST(1);
+ }
+
/* Add to "recursing stack" */
+ new_recursive.group_num = recno; /* LOOP_COUNT: Marker1 */
+ new_recursive.saved_capture_last = md->capture_last;
+ new_recursive.subject_position = eptr;
new_recursive.prevrec = md->recursive;
md->recursive = &new_recursive;
- /* Find where to continue from afterwards */
+ /* Where to continue from afterwards */
ecode += 1 + LINK_SIZE;
- new_recursive.after_call = ecode;
- /* Now save the offset data. */
+ /* Now save the offset data */
new_recursive.saved_max = md->offset_end;
if (new_recursive.saved_max <= REC_STACK_SAVE_MAX)
@@ -1104,41 +1958,61 @@ for (;;)
else
{
new_recursive.offset_save =
- (int *)(erts_pcre_malloc)(new_recursive.saved_max * sizeof(int));
+ (int *)(PUBL(malloc))(new_recursive.saved_max * sizeof(int));
if (new_recursive.offset_save == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
}
-
memcpy(new_recursive.offset_save, md->offset_vector,
new_recursive.saved_max * sizeof(int));
- new_recursive.save_start = mstart;
- mstart = eptr;
- /* OK, now we can do the recursion. For each top-level alternative we
- restore the offset and recursion data. */
+ /* OK, now we can do the recursion. After processing each alternative,
+ restore the offset data and the last captured value. If there were nested
+ recursions, md->recursive might be changed, so reset it before looping.
+ */
DPRINTF(("Recursing into group %d\n", new_recursive.group_num));
- flags = (*callpat >= OP_SBRA)? match_cbegroup : 0;
- do /* PaN: OK */
+ cbegroup = (*callpat >= OP_SBRA);
+ do /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, callpat + _erts_pcre_OP_lengths[*callpat], offset_top,
- md, ims, eptrb, flags, RM6);
- if (rrc == MATCH_MATCH)
+ if (cbegroup) md->match_function_type = MATCH_CBEGROUP;
+ RMATCH(eptr, callpat + PRIV(OP_lengths)[*callpat], offset_top,
+ md, eptrb, RM6);
+ memcpy(md->offset_vector, new_recursive.offset_save,
+ new_recursive.saved_max * sizeof(int));
+ md->capture_last = new_recursive.saved_capture_last;
+ md->recursive = new_recursive.prevrec;
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
{
DPRINTF(("Recursion matched\n"));
- md->recursive = new_recursive.prevrec;
if (new_recursive.offset_save != stacksave)
- (erts_pcre_free)(new_recursive.offset_save);
- RRETURN(MATCH_MATCH);
+ (PUBL(free))(new_recursive.offset_save);
+
+ /* Set where we got to in the subject, and reset the start in case
+ it was changed by \K. This *is* propagated back out of a recursion,
+ for Perl compatibility. */
+
+ eptr = md->end_match_ptr;
+ mstart = md->start_match_ptr;
+ goto RECURSION_MATCHED; /* Exit loop; end processing */
}
- else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
+
+ /* PCRE does not allow THEN, SKIP, PRUNE or COMMIT to escape beyond a
+ recursion; they cause a NOMATCH for the entire recursion. These codes
+ are defined in a range that can be tested for. */
+
+ if (rrc >= MATCH_BACKTRACK_MIN && rrc <= MATCH_BACKTRACK_MAX)
+ RRETURN(MATCH_NOMATCH);
+
+ /* Any return code other than NOMATCH is an error. */
+
+ if (rrc != MATCH_NOMATCH)
{
DPRINTF(("Recursion gave error %d\n", rrc));
+ if (new_recursive.offset_save != stacksave)
+ (PUBL(free))(new_recursive.offset_save);
RRETURN(rrc);
}
md->recursive = &new_recursive;
- memcpy(md->offset_vector, new_recursive.offset_save,
- new_recursive.saved_max * sizeof(int));
callpat += GET(callpat, 1);
}
while (*callpat == OP_ALT);
@@ -1146,223 +2020,202 @@ for (;;)
DPRINTF(("Recursion didn't match\n"));
md->recursive = new_recursive.prevrec;
if (new_recursive.offset_save != stacksave)
- (erts_pcre_free)(new_recursive.offset_save);
+ (PUBL(free))(new_recursive.offset_save);
RRETURN(MATCH_NOMATCH);
}
- /* Control never reaches here */
-
- /* "Once" brackets are like assertion brackets except that after a match,
- the point in the subject string is not moved back. Thus there can never be
- a move back into the brackets. Friedl calls these "atomic" subpatterns.
- Check the alternative branches in turn - the matching won't pass the KET
- for this kind of subpattern. If any one branch matches, we carry on as at
- the end of a normal bracket, leaving the subject pointer. */
-
- case OP_ONCE:
- prev = ecode;
- saved_eptr = eptr;
-
- do /* PaN: OK */
- {
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7);
- if (rrc == MATCH_MATCH) break;
- if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
- ecode += GET(ecode,1);
- }
- while (*ecode == OP_ALT);
-
- /* If hit the end of the group (which could be repeated), fail */
-
- if (*ecode != OP_ONCE && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
-
- /* Continue as from after the assertion, updating the offsets high water
- mark, since extracts may have been taken. */
-
- do ecode += GET(ecode, 1); while (*ecode == OP_ALT); /* PaN: OK */
-
- offset_top = md->end_offset_top;
- eptr = md->end_match_ptr;
-
- /* For a non-repeating ket, just continue at this level. This also
- happens for a repeating ket if no characters were matched in the group.
- This is the forcible breaking of infinite loops as implemented in Perl
- 5.005. If there is an options reset, it will get obeyed in the normal
- course of events. */
-
- if (*ecode == OP_KET || eptr == saved_eptr)
- {
- ecode += 1+LINK_SIZE;
- break;
- }
- /* The repeating kets try the rest of the pattern or restart from the
- preceding bracket, in the appropriate order. The second "call" of match()
- uses tail recursion, to avoid using another stack frame. We need to reset
- any options that changed within the bracket before re-running it, so
- check the next opcode. */
-
- if (ecode[1+LINK_SIZE] == OP_OPT)
- {
- ims = (ims & ~PCRE_IMS) | ecode[4];
- DPRINTF(("ims set to %02lx at group repeat\n", ims));
- }
-
- if (*ecode == OP_KETRMIN)
- {
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM8);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode = prev;
- flags = 0;
- goto TAIL_RECURSE;
- }
- else /* OP_KETRMAX */
- {
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, match_cbegroup, RM9);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode += 1 + LINK_SIZE;
- flags = 0;
- goto TAIL_RECURSE;
- }
- /* Control never gets here */
+ RECURSION_MATCHED:
+ break;
/* An alternation is the end of a branch; scan along to find the end of the
bracketed group and go to there. */
case OP_ALT:
- do ecode += GET(ecode,1); while (*ecode == OP_ALT); /* PaN: OK */
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT); /* LOOP_COUNT: Ok */
break;
- /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating
- that it may occur zero times. It may repeat infinitely, or not at all -
- i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper
- repeat limits are compiled as a number of copies, with the optional ones
- preceded by BRAZERO or BRAMINZERO. */
+ /* BRAZERO, BRAMINZERO and SKIPZERO occur just before a bracket group,
+ indicating that it may occur zero times. It may repeat infinitely, or not
+ at all - i.e. it could be ()* or ()? or even (){0} in the pattern. Brackets
+ with fixed upper repeat limits are compiled as a number of copies, with the
+ optional ones preceded by BRAZERO or BRAMINZERO. */
case OP_BRAZERO:
- {
- next = ecode+1;
- RMATCH(eptr, next, offset_top, md, ims, eptrb, 0, RM10);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- do next += GET(next,1); while (*next == OP_ALT); /* PaN: OK */
- ecode = next + 1 + LINK_SIZE;
- }
+ next = ecode + 1;
+ RMATCH(eptr, next, offset_top, md, eptrb, RM10);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ do next += GET(next, 1); while (*next == OP_ALT); /* LOOP_COUNT: Ok */
+ ecode = next + 1 + LINK_SIZE;
break;
case OP_BRAMINZERO:
- {
- next = ecode+1;
- do next += GET(next, 1); while (*next == OP_ALT); /* PaN: OK */
- RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0, RM11);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- ecode++;
- }
+ next = ecode + 1;
+ do next += GET(next, 1); while (*next == OP_ALT); /* LOOP_COUNT: Ok */
+ RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, eptrb, RM11);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode++;
+ break;
+
+ case OP_SKIPZERO:
+ next = ecode+1;
+ do next += GET(next,1); while (*next == OP_ALT); /* LOOP_COUNT: Ok */
+ ecode = next + 1 + LINK_SIZE;
break;
+ /* BRAPOSZERO occurs before a possessive bracket group. Don't do anything
+ here; just jump to the group, with allow_zero set TRUE. */
+
+ case OP_BRAPOSZERO:
+ op = *(++ecode);
+ allow_zero = TRUE;
+ if (op == OP_CBRAPOS || op == OP_SCBRAPOS) goto POSSESSIVE_CAPTURE;
+ goto POSSESSIVE_NON_CAPTURE;
+
/* End of a group, repeated or non-repeating. */
case OP_KET:
case OP_KETRMIN:
case OP_KETRMAX:
+ case OP_KETRPOS:
prev = ecode - GET(ecode, 1);
/* If this was a group that remembered the subject start, in order to break
infinite repeats of empty string matches, retrieve the subject start from
the chain. Otherwise, set it NULL. */
- if (*prev >= OP_SBRA)
+ if (*prev >= OP_SBRA || *prev == OP_ONCE)
{
saved_eptr = eptrb->epb_saved_eptr; /* Value at start of group */
eptrb = eptrb->epb_prev; /* Backup to previous group */
}
else saved_eptr = NULL;
- /* If we are at the end of an assertion group, stop matching and return
- MATCH_MATCH, but record the current high water mark for use by positive
- assertions. Do this also for the "once" (atomic) groups. */
+ /* If we are at the end of an assertion group or a non-capturing atomic
+ group, stop matching and return MATCH_MATCH, but record the current high
+ water mark for use by positive assertions. We also need to record the match
+ start in case it was changed by \K. */
- if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT ||
- *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT ||
- *prev == OP_ONCE)
+ if ((*prev >= OP_ASSERT && *prev <= OP_ASSERTBACK_NOT) ||
+ *prev == OP_ONCE_NC)
{
- md->end_match_ptr = eptr; /* For ONCE */
+ md->end_match_ptr = eptr; /* For ONCE_NC */
md->end_offset_top = offset_top;
- RRETURN(MATCH_MATCH);
+ md->start_match_ptr = mstart;
+ RRETURN(MATCH_MATCH); /* Sets md->mark */
}
/* For capturing groups we have to check the group number back at the start
and if necessary complete handling an extraction by setting the offsets and
- bumping the high water mark. Note that whole-pattern recursion is coded as
- a recurse into group 0, so it won't be picked up here. Instead, we catch it
- when the OP_END is reached. Other recursion is handled here. */
-
- if (*prev == OP_CBRA || *prev == OP_SCBRA)
+ bumping the high water mark. Whole-pattern recursion is coded as a recurse
+ into group 0, so it won't be picked up here. Instead, we catch it when the
+ OP_END is reached. Other recursion is handled here. We just have to record
+ the current subject position and start match pointer and give a MATCH
+ return. */
+
+ if (*prev == OP_CBRA || *prev == OP_SCBRA ||
+ *prev == OP_CBRAPOS || *prev == OP_SCBRAPOS)
{
number = GET2(prev, 1+LINK_SIZE);
offset = number << 1;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("end bracket %d", number);
printf("\n");
#endif
- md->capture_last = number;
- if (offset >= md->offset_max) md->offset_overflow = TRUE; else
+ /* Handle a recursively called group. */
+
+ if (md->recursive != NULL && md->recursive->group_num == number)
{
- md->offset_vector[offset] =
- md->offset_vector[md->offset_end - number];
- md->offset_vector[offset+1] = eptr - md->start_subject;
- if (offset_top <= offset) offset_top = offset + 2;
+ md->end_match_ptr = eptr;
+ md->start_match_ptr = mstart;
+ RRETURN(MATCH_MATCH);
}
- /* Handle a recursively called group. Restore the offsets
- appropriately and continue from after the call. */
+ /* Deal with capturing */
- if (md->recursive != NULL && md->recursive->group_num == number)
+ md->capture_last = (md->capture_last & OVFLMASK) | number;
+ if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else
{
- recursion_info *rec = md->recursive;
- DPRINTF(("Recursion (%d) succeeded - continuing\n", number));
- md->recursive = rec->prevrec;
- mstart = rec->save_start;
- memcpy(md->offset_vector, rec->offset_save,
- rec->saved_max * sizeof(int));
- ecode = rec->after_call;
- ims = original_ims;
- break;
+ /* If offset is greater than offset_top, it means that we are
+ "skipping" a capturing group, and that group's offsets must be marked
+ unset. In earlier versions of PCRE, all the offsets were unset at the
+ start of matching, but this doesn't work because atomic groups and
+ assertions can cause a value to be set that should later be unset.
+ Example: matching /(?>(a))b|(a)c/ against "ac". This sets group 1 as
+ part of the atomic group, but this is not on the final matching path,
+ so must be unset when 2 is set. (If there is no group 2, there is no
+ problem, because offset_top will then be 2, indicating no capture.) */
+
+ if (offset > offset_top)
+ {
+ register int *iptr = md->offset_vector + offset_top;
+ register int *iend = md->offset_vector + offset;
+ while (iptr < iend) *iptr++ = -1; /* LOOP_COUNT: CHK */
+ }
+
+ /* Now make the extraction */
+
+ md->offset_vector[offset] =
+ md->offset_vector[md->offset_end - number];
+ md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
+ if (offset_top <= offset) offset_top = offset + 2;
}
}
- /* For both capturing and non-capturing groups, reset the value of the ims
- flags, in case they got changed during the group. */
-
- ims = original_ims;
- DPRINTF(("ims reset to %02lx\n", ims));
-
- /* For a non-repeating ket, just continue at this level. This also
- happens for a repeating ket if no characters were matched in the group.
- This is the forcible breaking of infinite loops as implemented in Perl
- 5.005. If there is an options reset, it will get obeyed in the normal
- course of events. */
+ /* For an ordinary non-repeating ket, just continue at this level. This
+ also happens for a repeating ket if no characters were matched in the
+ group. This is the forcible breaking of infinite loops as implemented in
+ Perl 5.005. For a non-repeating atomic group that includes captures,
+ establish a backup point by processing the rest of the pattern at a lower
+ level. If this results in a NOMATCH return, pass MATCH_ONCE back to the
+ original OP_ONCE level, thereby bypassing intermediate backup points, but
+ resetting any captures that happened along the way. */
if (*ecode == OP_KET || eptr == saved_eptr)
{
- ecode += 1 + LINK_SIZE;
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM12);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
+ }
+ ecode += 1 + LINK_SIZE; /* Carry on at this level */
break;
}
- /* The repeating kets try the rest of the pattern or restart from the
- preceding bracket, in the appropriate order. In the second case, we can use
- tail recursion to avoid using another stack frame, unless we have an
- unlimited repeat of a group that can match an empty string. */
+ /* OP_KETRPOS is a possessive repeating ket. Remember the current position,
+ and return the MATCH_KETRPOS. This makes it possible to do the repeats one
+ at a time from the outer level, thus saving stack. */
- flags = (*prev >= OP_SBRA)? match_cbegroup : 0;
+ if (*ecode == OP_KETRPOS)
+ {
+ md->end_match_ptr = eptr;
+ md->end_offset_top = offset_top;
+ RRETURN(MATCH_KETRPOS);
+ }
+
+ /* The normal repeating kets try the rest of the pattern or restart from
+ the preceding bracket, in the appropriate order. In the second case, we can
+ use tail recursion to avoid using another stack frame, unless we have an
+ an atomic group or an unlimited repeat of a group that can match an empty
+ string. */
if (*ecode == OP_KETRMIN)
{
- RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM12);
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM7);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (flags != 0) /* Could match an empty string */
+ if (*prev == OP_ONCE)
{
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, flags, RM50);
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM8);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
+ }
+ if (*prev >= OP_SBRA) /* Could match an empty string */
+ {
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM50);
RRETURN(rrc);
}
ecode = prev;
@@ -1370,27 +2223,25 @@ for (;;)
}
else /* OP_KETRMAX */
{
- RMATCH(eptr, prev, offset_top, md, ims, eptrb, flags, RM13);
+ RMATCH(eptr, prev, offset_top, md, eptrb, RM13);
+ if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM9);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->once_target = prev;
+ RRETURN(MATCH_ONCE);
+ }
ecode += 1 + LINK_SIZE;
- flags = 0;
goto TAIL_RECURSE;
}
/* Control never gets here */
- /* Start of subject unless notbol, or after internal newline if multiline */
+ /* Not multiline mode: start of subject assertion, unless notbol. */
case OP_CIRC:
if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
- if ((ims & PCRE_MULTILINE) != 0)
- {
- if (eptr != md->start_subject &&
- (eptr >= md->end_subject || !WAS_NEWLINE(eptr)))
- RRETURN(MATCH_NOMATCH);
- ecode++;
- break;
- }
- /* ... else fall through */
/* Start of subject assertion */
@@ -1399,6 +2250,16 @@ for (;;)
ecode++;
break;
+ /* Multiline mode: start of subject unless notbol, or after any newline. */
+
+ case OP_CIRCM:
+ if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr != md->start_subject &&
+ (eptr == md->end_subject || !WAS_NEWLINE(eptr)))
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
/* Start of match assertion */
case OP_SOM:
@@ -1413,46 +2274,73 @@ for (;;)
ecode++;
break;
- /* Assert before internal newline if multiline, or before a terminating
- newline unless endonly is set, else end of subject unless noteol is set. */
+ /* Multiline mode: assert before any newline, or before end of subject
+ unless noteol is set. */
- case OP_DOLL:
- if ((ims & PCRE_MULTILINE) != 0)
+ case OP_DOLLM:
+ if (eptr < md->end_subject)
{
- if (eptr < md->end_subject)
- { if (!IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); }
- else
- { if (md->noteol) RRETURN(MATCH_NOMATCH); }
- ecode++;
- break;
+ if (!IS_NEWLINE(eptr))
+ {
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHARTEST(eptr) == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
}
else
{
if (md->noteol) RRETURN(MATCH_NOMATCH);
- if (!md->endonly)
- {
- if (eptr != md->end_subject &&
- (!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen))
- RRETURN(MATCH_NOMATCH);
- ecode++;
- break;
- }
+ SCHECK_PARTIAL();
}
+ ecode++;
+ break;
+
+ /* Not multiline mode: assert before a terminating newline or before end of
+ subject unless noteol is set. */
+
+ case OP_DOLL:
+ if (md->noteol) RRETURN(MATCH_NOMATCH);
+ if (!md->endonly) goto ASSERT_NL_OR_EOS;
+
/* ... else fall through for endonly */
/* End of subject assertion (\z) */
case OP_EOD:
if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH);
+ SCHECK_PARTIAL();
ecode++;
break;
/* End of subject or ending \n assertion (\Z) */
case OP_EODN:
- if (eptr != md->end_subject &&
+ ASSERT_NL_OR_EOS:
+ if (eptr < md->end_subject &&
(!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen))
+ {
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHARTEST(eptr) == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
RRETURN(MATCH_NOMATCH);
+ }
+
+ /* Either at end of string or \n before end. */
+
+ SCHECK_PARTIAL();
ecode++;
break;
@@ -1464,34 +2352,108 @@ for (;;)
/* Find out if the previous and current characters are "word" characters.
It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to
- be "non-word" characters. */
+ be "non-word" characters. Remember the earliest consulted character for
+ partial matching. */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
+ /* Get status of previous character */
+
if (eptr == md->start_subject) prev_is_word = FALSE; else
{
- const uschar *lastptr = eptr - 1;
- while((*lastptr & 0xc0) == 0x80) lastptr--; /* PaN: OK */
+ PCRE_PUCHAR lastptr = eptr - 1;
+ BACKCHAR(lastptr);
+ if (lastptr < md->start_used_ptr) md->start_used_ptr = lastptr;
GETCHAR(c, lastptr);
+#ifdef SUPPORT_UCP
+ if (md->use_ucp)
+ {
+ if (c == '_') prev_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ prev_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
}
- if (eptr >= md->end_subject) cur_is_word = FALSE; else
+
+ /* Get status of next character */
+
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ cur_is_word = FALSE;
+ }
+ else
{
GETCHAR(c, eptr);
+#ifdef SUPPORT_UCP
+ if (md->use_ucp)
+ {
+ if (c == '_') cur_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ cur_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
}
}
else
#endif
- /* More streamlined when not in UTF-8 mode */
+ /* Not in UTF-8 mode, but we may still have PCRE_UCP set, and for
+ consistency with the behaviour of \w we do use it in this case. */
{
- prev_is_word = (eptr != md->start_subject) &&
- ((md->ctypes[eptr[-1]] & ctype_word) != 0);
- cur_is_word = (eptr < md->end_subject) &&
- ((md->ctypes[*eptr] & ctype_word) != 0);
+ /* Get status of previous character */
+
+ if (eptr == md->start_subject) prev_is_word = FALSE; else
+ {
+ if (eptr <= md->start_used_ptr) md->start_used_ptr = eptr - 1;
+#ifdef SUPPORT_UCP
+ if (md->use_ucp)
+ {
+ c = eptr[-1];
+ if (c == '_') prev_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ prev_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ prev_is_word = MAX_255(eptr[-1])
+ && ((md->ctypes[eptr[-1]] & ctype_word) != 0);
+ }
+
+ /* Get status of next character */
+
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ cur_is_word = FALSE;
+ }
+ else
+#ifdef SUPPORT_UCP
+ if (md->use_ucp)
+ {
+ c = *eptr;
+ if (c == '_') cur_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ cur_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ cur_is_word = MAX_255(*eptr)
+ && ((md->ctypes[*eptr] & ctype_word) != 0);
}
/* Now see if the situation is what we want */
@@ -1502,16 +2464,35 @@ for (;;)
}
break;
- /* Match a single character type; inline for speed */
+ /* Match any single character type except newline; have to take care with
+ CRLF newlines and partial matching. */
case OP_ANY:
- if ((ims & PCRE_DOTALL) == 0)
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHARTEST(eptr) == NLBLOCK->nl[0])
{
- if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
- if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH);
- if (utf8)
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; /* PaN: OK */
+
+ /* Fall through */
+
+ /* Match any single character whatsoever. */
+
+ case OP_ALLANY:
+ if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
+#ifdef SUPPORT_UTF
+ if (utf) ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+#endif
ecode++;
break;
@@ -1519,15 +2500,24 @@ for (;;)
any byte, even newline, independent of the setting of PCRE_DOTALL. */
case OP_ANYBYTE:
- if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
ecode++;
break;
case OP_NOT_DIGIT:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_digit) != 0
@@ -1537,11 +2527,15 @@ for (;;)
break;
case OP_DIGIT:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_digit) == 0
)
@@ -1550,10 +2544,14 @@ for (;;)
break;
case OP_NOT_WHITESPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_space) != 0
@@ -1563,11 +2561,15 @@ for (;;)
break;
case OP_WHITESPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_space) == 0
)
@@ -1576,10 +2578,14 @@ for (;;)
break;
case OP_NOT_WORDCHAR:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
c < 256 &&
#endif
(md->ctypes[c] & ctype_word) != 0
@@ -1589,11 +2595,15 @@ for (;;)
break;
case OP_WORDCHAR:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
if (
-#ifdef SUPPORT_UTF8
- c >= 256 ||
+#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
+ c > 255 ||
#endif
(md->ctypes[c] & ctype_word) == 0
)
@@ -1602,23 +2612,34 @@ for (;;)
break;
case OP_ANYNL:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+
+ case CHAR_CR:
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ }
+ else if (RAWUCHARTEST(eptr) == CHAR_LF) eptr++;
break;
- case 0x000a:
+ case CHAR_LF:
break;
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
@@ -1626,97 +2647,61 @@ for (;;)
break;
case OP_NOT_HSPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
switch(c)
{
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH); /* Byte and multibyte cases */
default: break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- RRETURN(MATCH_NOMATCH);
}
ecode++;
break;
case OP_HSPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
switch(c)
{
+ HSPACE_CASES: break; /* Byte and multibyte cases */
default: RRETURN(MATCH_NOMATCH);
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- break;
}
ecode++;
break;
case OP_NOT_VSPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
switch(c)
{
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
default: break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- RRETURN(MATCH_NOMATCH);
}
ecode++;
break;
case OP_VSPACE:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
switch(c)
{
+ VSPACE_CASES: break;
default: RRETURN(MATCH_NOMATCH);
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- break;
}
ecode++;
break;
@@ -1727,11 +2712,15 @@ for (;;)
case OP_PROP:
case OP_NOTPROP:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
{
- int chartype, script;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
+ const pcre_uint32 *cp;
+ const ucd_record *prop = GET_UCD(c); /* LOOP_COUNT: Warning, no CHK in this block! */
switch(ecode[1])
{
@@ -1740,27 +2729,78 @@ for (;;)
break;
case PT_LAMP:
- if ((chartype == ucp_Lu ||
- chartype == ucp_Ll ||
- chartype == ucp_Lt) == (op == OP_NOTPROP))
+ if ((prop->chartype == ucp_Lu ||
+ prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == (op == OP_NOTPROP))
RRETURN(MATCH_NOMATCH);
- break;
+ break;
case PT_GC:
- if ((ecode[2] != category) == (op == OP_PROP))
+ if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP))
RRETURN(MATCH_NOMATCH);
break;
case PT_PC:
- if ((ecode[2] != chartype) == (op == OP_PROP))
+ if ((ecode[2] != prop->chartype) == (op == OP_PROP))
RRETURN(MATCH_NOMATCH);
break;
case PT_SC:
- if ((ecode[2] != script) == (op == OP_PROP))
+ if ((ecode[2] != prop->script) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ /* These are specials */
+
+ case PT_ALNUM:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_SPACE: /* Perl space */
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
+ == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR)
+ == (op == OP_NOTPROP))
RRETURN(MATCH_NOMATCH);
break;
+ case PT_WORD:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + ecode[2];
+ for (;;) /* LOOP_COUNT: COST */
+ {
+ if (c < *cp)
+ { if (op == OP_PROP) { RRETURN(MATCH_NOMATCH); } else break; }
+ if (c == *cp++)
+ { if (op == OP_PROP) break; else { RRETURN(MATCH_NOMATCH); } }
+ COST(1);
+ }
+ break;
+
+ case PT_UCNC:
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ /* This should never occur */
+
default:
RRETURN(PCRE_ERROR_INTERNAL);
}
@@ -1773,28 +2813,33 @@ for (;;)
is in the binary; otherwise a compile-time error occurs. */
case OP_EXTUNI:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINCTEST(c, eptr);
+ if (eptr >= md->end_subject)
{
- int chartype, script;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
- if (category == ucp_M) RRETURN(MATCH_NOMATCH);
- while (eptr < md->end_subject) /* PaN: OK */
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+#ifndef ERLANG_INTEGRATION
+ int lgb, rgb;
+#endif
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < md->end_subject) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (!utf8) c = *eptr; else
- {
- GETCHARLEN(c, eptr, len);
- }
- category = _erts_pcre_ucp_findprop(c, &chartype, &script);
- if (category != ucp_M) break;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
eptr += len;
COST_CHK(1);
}
}
+ CHECK_PARTIAL();
ecode++;
break;
-#endif
+#endif /* SUPPORT_UCP */
/* Match a back reference, possibly repeatedly. Look past the end of the
@@ -1806,111 +2851,151 @@ for (;;)
loops). */
case OP_REF:
- {
- offset = GET2(ecode, 1) << 1; /* Doubled ref number */
- ecode += 3; /* Advance past item */
+ case OP_REFI:
+ caseless = op == OP_REFI;
+ offset = GET2(ecode, 1) << 1; /* Doubled ref number */
+ ecode += 1 + IMM2_SIZE;
- /* If the reference is unset, set the length to be longer than the amount
- of subject left; this ensures that every attempt at a match fails. We
- can't just fail here, because of the possibility of quantifiers with zero
- minima. */
+ /* If the reference is unset, there are two possibilities:
- length = (offset >= offset_top || md->offset_vector[offset] < 0)?
- md->end_subject - eptr + 1 :
- md->offset_vector[offset+1] - md->offset_vector[offset];
+ (a) In the default, Perl-compatible state, set the length negative;
+ this ensures that every attempt at a match fails. We can't just fail
+ here, because of the possibility of quantifiers with zero minima.
- /* Set up for repetition, or handle the non-repeated case */
+ (b) If the JavaScript compatibility flag is set, set the length to zero
+ so that the back reference matches an empty string.
- switch (*ecode)
- {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- c = *ecode++ - OP_CRSTAR;
- minimize = (c & 1) != 0;
- min = rep_min[c]; /* Pick up values from tables; */
- max = rep_max[c]; /* zero for max => infinity */
- if (max == 0) max = INT_MAX;
- break;
+ Otherwise, set the length to the length of what was matched by the
+ referenced subpattern. */
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- minimize = (*ecode == OP_CRMINRANGE);
- min = GET2(ecode, 1);
- max = GET2(ecode, 3);
- if (max == 0) max = INT_MAX;
- ecode += 5;
- break;
+ if (offset >= offset_top || md->offset_vector[offset] < 0)
+ length = (md->jscript_compat)? 0 : -1;
+ else
+ length = md->offset_vector[offset+1] - md->offset_vector[offset];
- default: /* No repeat follows */
- if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH);
- eptr += length;
- continue; /* With the main loop */
- }
+ /* Set up for repetition, or handle the non-repeated case */
- /* If the length of the reference is zero, just continue with the
- main loop. */
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
- if (length == 0) continue;
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 1 + IMM2_SIZE);
+ if (max == 0) max = INT_MAX;
+ ecode += 1 + 2 * IMM2_SIZE;
+ break;
- /* First, ensure the minimum number of matches are present. We get back
- the length of the reference string explicitly rather than passing the
- address of eptr, so that eptr can be a register variable. */
+ default: /* No repeat follows */
+ if ((length = match_ref(offset, eptr, length, md, caseless)) < 0)
+ {
+ if (length == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += length;
+ continue; /* With the main loop */
+ }
- COST(min);
- for (i = 1; i <= min; i++)
+ /* Handle repeated back references. If the length of the reference is
+ zero, just continue with the main loop. If the length is negative, it
+ means the reference is unset in non-Java-compatible mode. If the minimum is
+ zero, we can continue at the same level without recursion. For any other
+ minimum, carrying on will result in NOMATCH. */
+
+ if (length == 0) continue;
+ if (length < 0 && min == 0) continue;
+
+ /* First, ensure the minimum number of matches are present. We get back
+ the length of the reference string explicitly rather than passing the
+ address of eptr, so that eptr can be a register variable. */
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ int slength;
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
{
- if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH);
- eptr += length;
+ if (slength == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
+ eptr += slength;
+ }
- /* If min = max, continue at the same level without recursion.
- They are not both allowed to be zero. */
+ /* If min = max, continue at the same level without recursion.
+ They are not both allowed to be zero. */
- if (min == max) continue;
+ if (min == max) continue;
- /* If minimizing, keep trying and advancing the pointer */
+ /* If minimizing, keep trying and advancing the pointer */
- if (minimize)
+ if (minimize)
+ {
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- for (fi = min;; fi++) /* PaN: OK */
+ int slength;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM14);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM14);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || !match_ref(offset, eptr, length, md, ims))
- RRETURN(MATCH_NOMATCH);
- eptr += length;
+ if (slength == -2) eptr = md->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
- /* Control never gets here */
+ eptr += slength;
}
+ /* Control never gets here */
+ }
- /* If maximizing, find the longest string and work backwards */
+ /* If maximizing, find the longest string and work backwards */
- else
+ else
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
{
- pp = eptr;
- for (i = min; i < max; i++) /* PaN: OK */
- {
- if (!match_ref(offset, eptr, length, md, ims)) break;
- eptr += length;
- COST_CHK(1);
- }
- while (eptr >= pp) /* PaN: OK */
+ int slength;
+ if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0) /* LOOP_COUNT: CHK */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM15);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- eptr -= length;
+ /* Can't use CHECK_PARTIAL because we don't want to update eptr in
+ the soft partial matching case. */
+
+ if (slength == -2 && md->partial != 0 &&
+ md->end_subject > md->start_used_ptr)
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ break;
}
- RRETURN(MATCH_NOMATCH);
+ eptr += slength;
+ COST_CHK(1);
}
+
+ while (eptr >= pp) /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM15);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr -= length;
+ }
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
-
-
/* Match a bit-mapped character class, possibly repeatedly. This op code is
used when all the characters in the class have values in the range 0-255,
and either the matching is caseful, or the characters are in the range
@@ -1925,10 +3010,13 @@ for (;;)
case OP_NCLASS:
case OP_CLASS:
{
+ /* The data variable is saved across frames, so the byte map needs to
+ be stored there. */
+#define BYTE_MAP ((pcre_uint8 *)data)
data = ecode + 1; /* Save for matching */
- ecode += 33; /* Advance past the item */
+ ecode += 1 + (32 / sizeof(pcre_uchar)); /* Advance past the item */
#ifdef ERLANG_INTEGRATION
- EDEBUGF(("OP_(N)CLASS (%d)...",*ecode));
+ EDEBUGF(("OP_(N)CLASS (%d)...",*ecode));
#endif
switch (*ecode)
@@ -1950,9 +3038,9 @@ for (;;)
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
min = GET2(ecode, 1);
- max = GET2(ecode, 3);
+ max = GET2(ecode, 1 + IMM2_SIZE);
if (max == 0) max = INT_MAX;
- ecode += 5;
+ ecode += 1 + 2 * IMM2_SIZE;
break;
default: /* No repeat follows */
@@ -1962,35 +3050,47 @@ for (;;)
/* First, ensure the minimum number of matches are present. */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
if (c > 255)
{
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
c = *eptr++;
- if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
@@ -2004,37 +3104,51 @@ for (;;)
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM16);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM16);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
if (c > 255)
{
if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM17);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM17);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
c = *eptr++;
- if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -2046,29 +3160,30 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- for (i = min; i < max; i++) /* PaN: OK */
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c > 255)
{
if (op == OP_CLASS) break;
}
else
- {
- if ((data[c/8] & (1 << (c&7))) == 0) break;
- }
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
eptr += len;
COST_CHK(1);
}
- for (;;) /* PaN: OK */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM18);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM18);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
@@ -2076,19 +3191,30 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
- for (i = min; i < max; i++) /* PaN: OK */
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
c = *eptr;
- if ((data[c/8] & (1 << (c&7))) == 0) break;
- eptr++;
+#ifndef COMPILE_PCRE8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) break;
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
COST_CHK(1);
+ eptr++;
}
- while (eptr >= pp) /* PaN: OK */
+ while (eptr >= pp) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM19);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM19);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
@@ -2096,14 +3222,16 @@ for (;;)
RRETURN(MATCH_NOMATCH);
}
+#undef BYTE_MAP
}
/* Control never gets here */
/* Match an extended character class. This opcode is encountered only
- in UTF-8 mode, because that's the only time it is compiled. */
+ when UTF-8 mode mode is supported. Nevertheless, we may not be in UTF-8
+ mode, because Unicode properties are supported in non-UTF-8 mode. */
-#ifdef SUPPORT_UTF8
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
case OP_XCLASS:
{
data = ecode + 1 + LINK_SIZE; /* Save for matching */
@@ -2128,9 +3256,9 @@ for (;;)
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
min = GET2(ecode, 1);
- max = GET2(ecode, 3);
+ max = GET2(ecode, 1 + IMM2_SIZE);
if (max == 0) max = INT_MAX;
- ecode += 5;
+ ecode += 1 + 2 * IMM2_SIZE;
break;
default: /* No repeat follows */
@@ -2139,13 +3267,16 @@ for (;;)
}
/* First, ensure the minimum number of matches are present. */
-
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- if (!_erts_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
}
/* If max == min we can continue with the main loop without the
@@ -2158,13 +3289,18 @@ for (;;)
if (minimize)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM20);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM20);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- if (!_erts_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -2174,21 +3310,31 @@ for (;;)
else
{
pp = eptr;
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
- if (!_erts_pcre_xclass(c, data)) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+#ifdef SUPPORT_UTF
+ GETCHARLENTEST(c, eptr, len);
+#else
+ c = *eptr;
+#endif
+ if (!PRIV(xclass)(c, data, utf)) break;
eptr += len;
COST_CHK(1);
}
- for(;;) /* PaN: OK */
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM21);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM21);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (eptr-- == pp) break; /* Stop if tried at original pos */
- if (utf8) BACKCHAR(eptr);
+#ifdef SUPPORT_UTF
+ if (utf) BACKCHAR(eptr);
+#endif
}
RRETURN(MATCH_NOMATCH);
}
@@ -2200,52 +3346,71 @@ for (;;)
/* Match a single character, casefully */
case OP_CHAR:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
ecode++;
GETCHARLEN(fc, ecode, length);
- if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
- while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH); /* PaN: OK */
+ if (length > md->end_subject - eptr)
+ {
+ CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */
+ RRETURN(MATCH_NOMATCH);
+ }
+ while (length-- > 0) if (*ecode++ != RAWUCHARINC(eptr)) RRETURN(MATCH_NOMATCH); /* LOOP_COUNT: Ok */
}
else
#endif
-
- /* Non-UTF-8 mode */
+ /* Not UTF mode */
{
- if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH);
+ if (md->end_subject - eptr < 1)
+ {
+ SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */
+ RRETURN(MATCH_NOMATCH);
+ }
EDEBUGF(("code to match:%d, code is:%d",ecode[1],*eptr));
if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH);
ecode += 2;
}
break;
- /* Match a single character, caselessly */
+ /* Match a single character, caselessly. If we are at the end of the
+ subject, give up immediately. */
- case OP_CHARNC:
-#ifdef SUPPORT_UTF8
- if (utf8)
+ case OP_CHARI:
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
ecode++;
GETCHARLEN(fc, ecode, length);
- if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
-
/* If the pattern character's value is < 128, we have only one byte, and
- can use the fast lookup table. */
+ we know that its other case must also be one byte long, so we can use the
+ fast lookup table. We know that there is at least one byte left in the
+ subject. */
if (fc < 128)
{
- if (md->lcc[*ecode++] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+ pcre_uint32 cc = RAWUCHAR(eptr);
+ if (md->lcc[fc] != TABLE_GET(cc, md->lcc, cc)) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ eptr++;
}
- /* Otherwise we must pick up the subject character */
+ /* Otherwise we must pick up the subject character. Note that we cannot
+ use the value of "length" to check for sufficient bytes left, because the
+ other case of the character may have more or fewer bytes. */
else
{
- unsigned int dc;
+ pcre_uint32 dc;
GETCHARINC(dc, eptr);
ecode += length;
@@ -2255,19 +3420,20 @@ for (;;)
if (fc != dc)
{
#ifdef SUPPORT_UCP
- if (dc != _erts_pcre_ucp_othercase(fc))
+ if (dc != UCD_OTHERCASE(fc))
#endif
RRETURN(MATCH_NOMATCH);
}
}
}
else
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
- /* Non-UTF-8 mode */
+ /* Not UTF mode */
{
- if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH);
- if (md->lcc[ecode[1]] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+ if (TABLE_GET(ecode[1], md->lcc, ecode[1])
+ != TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH);
+ eptr++;
ecode += 2;
}
break;
@@ -2275,23 +3441,28 @@ for (;;)
/* Match a single character repeatedly. */
case OP_EXACT:
+ case OP_EXACTI:
min = max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATCHAR;
case OP_POSUPTO:
+ case OP_POSUPTOI:
possessive = TRUE;
/* Fall through */
case OP_UPTO:
+ case OP_UPTOI:
case OP_MINUPTO:
+ case OP_MINUPTOI:
min = 0;
max = GET2(ecode, 1);
- minimize = *ecode == OP_MINUPTO;
- ecode += 3;
+ minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;
+ ecode += 1 + IMM2_SIZE;
goto REPEATCHAR;
case OP_POSSTAR:
+ case OP_POSSTARI:
possessive = TRUE;
min = 0;
max = INT_MAX;
@@ -2299,6 +3470,7 @@ for (;;)
goto REPEATCHAR;
case OP_POSPLUS:
+ case OP_POSPLUSI:
possessive = TRUE;
min = 1;
max = INT_MAX;
@@ -2306,6 +3478,7 @@ for (;;)
goto REPEATCHAR;
case OP_POSQUERY:
+ case OP_POSQUERYI:
possessive = TRUE;
min = 0;
max = 1;
@@ -2313,29 +3486,47 @@ for (;;)
goto REPEATCHAR;
case OP_STAR:
+ case OP_STARI:
case OP_MINSTAR:
+ case OP_MINSTARI:
case OP_PLUS:
+ case OP_PLUSI:
case OP_MINPLUS:
+ case OP_MINPLUSI:
case OP_QUERY:
+ case OP_QUERYI:
case OP_MINQUERY:
- c = *ecode++ - OP_STAR;
+ case OP_MINQUERYI:
+ c = *ecode++ - ((op < OP_STARI)? OP_STAR : OP_STARI);
minimize = (c & 1) != 0;
min = rep_min[c]; /* Pick up values from tables; */
max = rep_max[c]; /* zero for max => infinity */
if (max == 0) max = INT_MAX;
- /* Common code for all repeated single-character matches. We can give
- up quickly if there are fewer than the minimum number of characters left in
- the subject. */
+ /* Common code for all repeated single-character matches. We first check
+ for the minimum number of characters. If the minimum equals the maximum, we
+ are done. Otherwise, if minimizing, check the rest of the pattern for a
+ match; if there isn't one, advance up to the maximum, one character at a
+ time.
+
+ If maximizing, advance up to the maximum number of matching characters,
+ until eptr is past the end of the maximum run. If possessive, we are
+ then done (no backing up). Otherwise, match at this position; anything
+ other than no match is immediately returned. For nomatch, back up one
+ character, unless we are matching \R and the last thing matched was
+ \r\n, in which case, back up two bytes. When we reach the first optional
+ character position, we can save stack by doing a tail recurse.
+
+ The various UTF/non-UTF and caseful/caseless cases are handled separately,
+ for speed. */
REPEATCHAR:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
length = 1;
charptr = ecode;
GETCHARLEN(fc, ecode, length);
- if (min * length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
ecode += length;
/* Handle multibyte character matching specially here. There is
@@ -2344,50 +3535,50 @@ for (;;)
if (length > 1)
{
#ifdef SUPPORT_UCP
- unsigned int othercase;
- if ((ims & PCRE_CASELESS) != 0 &&
- (othercase = _erts_pcre_ucp_othercase(fc)) != NOTACHAR)
- oclength = _erts_pcre_ord2utf8(othercase, occhars);
+ pcre_uint32 othercase;
+ if (op >= OP_STARI && /* Caseless */
+ (othercase = UCD_OTHERCASE(fc)) != fc)
+ oclength = PRIV(ord2utf)(othercase, occhars);
else oclength = 0;
#endif /* SUPPORT_UCP */
COST(min);
- for (i = 1; i <= min; i++) /* PaN: Cost min (?) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ if (eptr <= md->end_subject - length &&
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
- /* Need braces because of following else */
- else if (oclength == 0) { RRETURN(MATCH_NOMATCH); }
+ else if (oclength > 0 &&
+ eptr <= md->end_subject - oclength &&
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
+#endif /* SUPPORT_UCP */
else
{
- if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH);
- eptr += oclength;
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
-#else /* without SUPPORT_UCP */
- else { RRETURN(MATCH_NOMATCH); }
-#endif /* SUPPORT_UCP */
}
if (min == max) continue;
if (minimize)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM22);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM22);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr <= md->end_subject - length &&
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
- /* Need braces because of following else */
- else if (oclength == 0) { RRETURN(MATCH_NOMATCH); }
+ else if (oclength > 0 &&
+ eptr <= md->end_subject - oclength &&
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
+#endif /* SUPPORT_UCP */
else
{
- if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH);
- eptr += oclength;
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
}
-#else /* without SUPPORT_UCP */
- else { RRETURN (MATCH_NOMATCH); }
-#endif /* SUPPORT_UCP */
}
/* Control never gets here */
}
@@ -2395,36 +3586,36 @@ for (;;)
else /* Maximize */
{
pp = eptr;
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr > md->end_subject - length) break;
- if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ if (eptr <= md->end_subject - length &&
+ memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
#ifdef SUPPORT_UCP
- else if (oclength == 0) break;
+ else if (oclength > 0 &&
+ eptr <= md->end_subject - oclength &&
+ memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
+#endif /* SUPPORT_UCP */
else
{
- if (memcmp(eptr, occhars, oclength) != 0) break;
- eptr += oclength;
+ CHECK_PARTIAL();
+ break;
}
-#else /* without SUPPORT_UCP */
- else break;
-#endif /* SUPPORT_UCP */
COST_CHK(1);
}
- if (possessive) continue;
- for(;;) /* PaN: OK */
- {
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM23);
- if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr == pp) RRETURN(MATCH_NOMATCH);
+ if (possessive) continue; /* No backtracking */
+ for(;;) /* LOOP_COUNT: Ok */
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM23);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
#ifdef SUPPORT_UCP
- eptr--;
- BACKCHAR(eptr);
+ eptr--;
+ BACKCHAR(eptr);
#else /* without SUPPORT_UCP */
- eptr -= length;
+ eptr -= length;
#endif /* SUPPORT_UCP */
- }
+ }
}
/* Control never gets here */
}
@@ -2434,16 +3625,12 @@ for (;;)
value of fc will always be < 128. */
}
else
-#endif /* SUPPORT_UTF8 */
-
- /* When not in UTF-8 mode, load a single-byte character. */
- {
- if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+#endif /* SUPPORT_UTF */
+ /* When not in UTF-8 mode, load a single-byte character. */
fc = *ecode++;
- }
- /* The value of fc at this point is always less than 256, though we may or
- may not be in UTF-8 mode. The code is duplicated for the caseless and
+ /* The value of fc at this point is always one character, though we may
+ or may not be in UTF mode. The code is duplicated for the caseless and
caseful cases, for speed, since matching characters is likely to be quite
common. First, ensure the minimum number of matches are present. If min =
max, continue at the same level without recursing. Otherwise, if
@@ -2452,40 +3639,82 @@ for (;;)
maximizing, find the maximum number of characters and work backwards. */
DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,
- max, eptr));
+ max, (char *)eptr));
- if ((ims & PCRE_CASELESS) != 0)
+ if (op >= OP_STARI) /* Caseless */
{
- fc = md->lcc[fc];
- COST(min);
- for (i = 1; i <= min; i++)
- if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+#ifdef COMPILE_PCRE8
+ /* fc must be < 128 if UTF is enabled. */
+ foc = md->fcc[fc];
+#else
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+#else
+ if (utf && fc > 127)
+ foc = fc;
+#endif /* SUPPORT_UCP */
+ else
+#endif /* SUPPORT_UTF */
+ foc = TABLE_GET(fc, md->fcc, fc);
+#endif /* COMPILE_PCRE8 */
+
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: CHK */
+ {
+ pcre_uint32 cc; /* Faster than pcre_uchar */
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHARTEST(eptr);
+ if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ COST_CHK(1);
+ }
if (min == max) continue;
if (minimize)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM24);
+ pcre_uint32 cc; /* Faster than pcre_uchar */
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM24);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject ||
- fc != md->lcc[*eptr++])
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHARTEST(eptr);
+ if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
/* Control never gets here */
}
else /* Maximize */
{
pp = eptr;
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || fc != md->lcc[*eptr]) break;
+ pcre_uint32 cc; /* Faster than pcre_uchar */
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ cc = RAWUCHARTEST(eptr);
+ if (fc != cc && foc != cc) break;
eptr++;
COST_CHK(1);
}
- if (possessive) continue;
- while (eptr >= pp) /* PaN: OK */
+
+ if (possessive) continue; /* No backtracking */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM25);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM25);
eptr--;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
@@ -2499,32 +3728,53 @@ for (;;)
else
{
COST(min);
- for (i = 1; i <= min; i++) if (fc != *eptr++) RRETURN(MATCH_NOMATCH);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc != RAWUCHARINCTEST(eptr)) RRETURN(MATCH_NOMATCH);
+ }
+
if (min == max) continue;
+
if (minimize)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM26);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM26);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject || fc != *eptr++)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (fc != RAWUCHARINCTEST(eptr)) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
else /* Maximize */
{
pp = eptr;
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || fc != *eptr) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc != RAWUCHARTEST(eptr)) break;
eptr++;
COST_CHK(1);
}
- if (possessive) continue;
- while (eptr >= pp) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM27);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM27);
eptr--;
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
@@ -2537,20 +3787,47 @@ for (;;)
checking can be multibyte. */
case OP_NOT:
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- ecode++;
- GETCHARINCTEST(c, eptr);
- if ((ims & PCRE_CASELESS) != 0)
+ case OP_NOTI:
+ if (eptr >= md->end_subject)
{
-#ifdef SUPPORT_UTF8
- if (c < 256)
-#endif
- c = md->lcc[c];
- if (md->lcc[*ecode++] == c) RRETURN(MATCH_NOMATCH);
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ register pcre_uint32 ch, och;
+
+ ecode++;
+ GETCHARINC(ch, ecode);
+ GETCHARINC(c, eptr);
+
+ if (op == OP_NOT)
+ {
+ if (ch == c) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+#ifdef SUPPORT_UCP
+ if (ch > 127)
+ och = UCD_OTHERCASE(ch);
+#else
+ if (ch > 127)
+ och = ch;
+#endif /* SUPPORT_UCP */
+ else
+ och = TABLE_GET(ch, md->fcc, ch);
+ if (ch == c || och == c) RRETURN(MATCH_NOMATCH);
+ }
}
else
+#endif
{
- if (*ecode++ == c) RRETURN(MATCH_NOMATCH);
+ register pcre_uint32 ch = ecode[1];
+ c = *eptr++;
+ if (ch == c || (op == OP_NOTI && TABLE_GET(ch, md->fcc, ch) == c))
+ RRETURN(MATCH_NOMATCH);
+ ecode += 2;
}
break;
@@ -2562,19 +3839,23 @@ for (;;)
about... */
case OP_NOTEXACT:
+ case OP_NOTEXACTI:
min = max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTUPTO:
+ case OP_NOTUPTOI:
case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
min = 0;
max = GET2(ecode, 1);
- minimize = *ecode == OP_NOTMINUPTO;
- ecode += 3;
+ minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
possessive = TRUE;
min = 0;
max = INT_MAX;
@@ -2582,6 +3863,7 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
possessive = TRUE;
min = 1;
max = INT_MAX;
@@ -2589,6 +3871,7 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
possessive = TRUE;
min = 0;
max = 1;
@@ -2596,31 +3879,35 @@ for (;;)
goto REPEATNOTCHAR;
case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
possessive = TRUE;
min = 0;
max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATNOTCHAR;
case OP_NOTSTAR:
+ case OP_NOTSTARI:
case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
case OP_NOTPLUS:
+ case OP_NOTPLUSI:
case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
case OP_NOTQUERY:
+ case OP_NOTQUERYI:
case OP_NOTMINQUERY:
- c = *ecode++ - OP_NOTSTAR;
+ case OP_NOTMINQUERYI:
+ c = *ecode++ - ((op >= OP_NOTSTARI)? OP_NOTSTARI: OP_NOTSTAR);
minimize = (c & 1) != 0;
min = rep_min[c]; /* Pick up values from tables; */
max = rep_max[c]; /* zero for max => infinity */
if (max == 0) max = INT_MAX;
- /* Common code for all repeated single-byte matches. We can give up quickly
- if there are fewer than the minimum number of bytes left in the
- subject. */
+ /* Common code for all repeated single-byte matches. */
REPEATNOTCHAR:
- if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
- fc = *ecode++;
+ GETCHARINCTEST(fc, ecode);
/* The code is duplicated for the caseless and caseful cases, for speed,
since matching characters is likely to be quite common. First, ensure the
@@ -2631,64 +3918,93 @@ for (;;)
characters and work backwards. */
DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,
- max, eptr));
+ max, (char *)eptr));
- if ((ims & PCRE_CASELESS) != 0)
+ if (op >= OP_NOTSTARI) /* Caseless */
{
- fc = md->lcc[fc];
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+#else
+ if (utf && fc > 127)
+ foc = fc;
+#endif /* SUPPORT_UCP */
+ else
+#endif /* SUPPORT_UTF */
+ foc = TABLE_GET(fc, md->fcc, fc);
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
+ register pcre_uint32 d;
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(d, eptr);
- if (d < 256) d = md->lcc[d];
- if (fc == d) RRETURN(MATCH_NOMATCH);
+ if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
}
}
else
-#endif
-
- /* Not UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ /* Not UTF mode */
{
COST(min);
- for (i = 1; i <= min; i++)
- if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
}
if (min == max) continue;
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
- for (fi = min;; fi++) /* PaN: OK */
+ register pcre_uint32 d;
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM28);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM28);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- GETCHARINC(d, eptr);
- if (d < 256) d = md->lcc[d];
- if (fi >= max || eptr >= md->end_subject || fc == d)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
}
}
else
-#endif
- /* Not UTF-8 mode */
+#endif /*SUPPORT_UTF */
+ /* Not UTF mode */
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM29);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM29);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject || fc == md->lcc[*eptr++])
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
}
}
/* Control never gets here */
@@ -2700,44 +4016,53 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
- for (i = min; i < max; i++)
+ register pcre_uint32 d;
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(d, eptr, len);
- if (d < 256) d = md->lcc[d];
- if (fc == d) break;
+ if (fc == d || (unsigned int)foc == d) break;
eptr += len;
- COST_CHK(1);
+ COST_CHK(1); /* 'd' is not alive */
}
- if (possessive) continue;
- for(;;) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM30);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM30);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
+ eptr--;
BACKCHAR(eptr);
}
}
else
-#endif
- /* Not UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ /* Not UTF mode */
{
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || fc == md->lcc[*eptr]) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc == *eptr || foc == *eptr) break;
eptr++;
COST_CHK(1);
}
- if (possessive) continue;
- while (eptr >= pp) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM31);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM31);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
@@ -2752,55 +4077,75 @@ for (;;)
else
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
- COST(min);
- for (i = 1; i <= min; i++)
+ register pcre_uint32 d;
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: CHK */
{
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(d, eptr);
if (fc == d) RRETURN(MATCH_NOMATCH);
+ COST_CHK(1);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: Ok */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
+ }
}
if (min == max) continue;
if (minimize)
{
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
- for (fi = min;; fi++) /* PaN: OK */
+ register pcre_uint32 d;
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM32);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM32);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- GETCHARINC(d, eptr);
- if (fi >= max || eptr >= md->end_subject || fc == d)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM33);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM33);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject || fc == *eptr++)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -2812,43 +4157,53 @@ for (;;)
{
pp = eptr;
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- register unsigned int d;
- COST(min);
- for (i = min; i < max; i++)
+ register pcre_uint32 d;
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(d, eptr, len);
if (fc == d) break;
eptr += len;
+ COST_CHK(1);
}
- if (possessive) continue;
- for(;;) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM34);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM34);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
+ eptr--;
BACKCHAR(eptr);
}
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || fc == *eptr) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc == *eptr) break;
eptr++;
COST_CHK(1);
}
- if (possessive) continue;
- while (eptr >= pp) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM35);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM35);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr--;
}
@@ -2866,7 +4221,7 @@ for (;;)
case OP_TYPEEXACT:
min = max = GET2(ecode, 1);
minimize = TRUE;
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPEUPTO:
@@ -2874,7 +4229,7 @@ for (;;)
min = 0;
max = GET2(ecode, 1);
minimize = *ecode == OP_TYPEMINUPTO;
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPEPOSSTAR:
@@ -2902,7 +4257,7 @@ for (;;)
possessive = TRUE;
min = 0;
max = GET2(ecode, 1);
- ecode += 3;
+ ecode += 1 + IMM2_SIZE;
goto REPEATTYPE;
case OP_TYPESTAR:
@@ -2936,13 +4291,10 @@ for (;;)
/* First, ensure the minimum number of matches are present. Use inline
code for maximizing the speed, and do the type test once at the start
- (i.e. keep it out of the loop). Also we can test that there are at least
- the minimum number of bytes before we start. This isn't as effective in
- UTF-8 mode, but it does no harm. Separate the UTF-8 code completely as that
+ (i.e. keep it out of the loop). Separate the UTF-8 code completely as that
is tidier. Also separate the UCP code, which can be the same for both UTF-8
and single-bytes. */
- if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
if (min > 0)
{
#ifdef SUPPORT_UCP
@@ -2953,59 +4305,182 @@ for (;;)
{
case PT_ANY:
if (prop_fail_result) RRETURN(MATCH_NOMATCH);
- for (i = 1; i <= min; i++) /* PaN: OK (cost above) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
}
break;
case PT_LAMP:
- for (i = 1; i <= min; i++) /* PaN: OK (cost above) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ int chartype;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
break;
case PT_GC:
- for (i = 1; i <= min; i++) /* PaN: OK (cost above) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_category == prop_value) == prop_fail_result)
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
break;
case PT_PC:
- for (i = 1; i <= min; i++) /* PaN: OK (cost above) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == prop_value) == prop_fail_result)
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
break;
case PT_SC:
- for (i = 1; i <= min; i++) /* PaN: OK (cost above) */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_ALNUM: /* LOOP_COUNT: COST (above) */
+ for (i = 1; i <= min; i++)
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ int category;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_script == prop_value) == prop_fail_result)
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
break;
+ case PT_SPACE: /* Perl space */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_WORD:
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ int category;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_CLIST:
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ const pcre_uint32 *cp;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;) /* LOOP_COUNT: COST */
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
+ if (c == *cp++)
+ { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
+ COST(1);
+ }
+ }
+ break;
+
+ case PT_UCNC:
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST (above) */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ /* This should not occur */
+
default:
RRETURN(PCRE_ERROR_INTERNAL);
}
@@ -3014,26 +4489,35 @@ for (;;)
/* Match extended Unicode sequences. We will get here only if the
support is in the binary; otherwise a compile-time error occurs. */
- else if (ctype == OP_EXTUNI)
+ else if (ctype == OP_EXTUNI)
{
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
- while (eptr < md->end_subject)
+ if (eptr >= md->end_subject)
{
- int len = 1;
- if (!utf8) c = *eptr; else
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+#ifndef ERLANG_INTEGRATION
+ int lgb, rgb;
+#endif
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < md->end_subject) /* LOOP_COUNT: CHK */
{
- GETCHARLEN(c, eptr, len);
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ COST_CHK(1);
}
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category != ucp_M) break;
- eptr += len;
- COST_CHK(1);
}
+ CHECK_PARTIAL();
}
}
@@ -3042,46 +4526,80 @@ for (;;)
/* Handle all other cases when the coding is UTF-8 */
-#ifdef SUPPORT_UTF8
- if (utf8) switch(ctype)
+#ifdef SUPPORT_UTF
+ if (utf) switch(ctype)
{
case OP_ANY:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr)))
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHAR(eptr) == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_ALLANY:
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
case OP_ANYBYTE:
+ if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH);
eptr += min;
break;
case OP_ANYNL:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+
+ case CHAR_CR:
+ if (eptr < md->end_subject && RAWUCHAR(eptr) == CHAR_LF) eptr++;
break;
- case 0x000a:
+ case CHAR_LF:
break;
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
@@ -3090,117 +4608,85 @@ for (;;)
case OP_NOT_HSPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
switch(c)
{
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH); /* Byte and multibyte cases */
default: break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- RRETURN(MATCH_NOMATCH);
}
}
break;
case OP_HSPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
switch(c)
{
+ HSPACE_CASES: break; /* Byte and multibyte cases */
default: RRETURN(MATCH_NOMATCH);
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- break;
}
}
break;
case OP_NOT_VSPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
switch(c)
{
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
default: break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- RRETURN(MATCH_NOMATCH);
}
}
break;
case OP_VSPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
switch(c)
{
+ VSPACE_CASES: break;
default: RRETURN(MATCH_NOMATCH);
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- break;
}
}
break;
case OP_NOT_DIGIT:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
GETCHARINC(c, eptr);
if (c < 128 && (md->ctypes[c] & ctype_digit) != 0)
RRETURN(MATCH_NOMATCH);
@@ -3209,55 +4695,90 @@ for (;;)
case OP_DIGIT:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- *eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0)
+ pcre_uint32 cc;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHAR(eptr);
+ if (cc >= 128 || (md->ctypes[cc] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
case OP_NOT_WHITESPACE:
- COST(min);
- for (i = 1; i <= min; i++)
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0))
+ pcre_uint32 cc;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHAR(eptr);
+ if (cc < 128 && (md->ctypes[cc] & ctype_space) != 0)
RRETURN(MATCH_NOMATCH);
- while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); /* PaN: Check */
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
case OP_WHITESPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- *eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0)
+ pcre_uint32 cc;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHAR(eptr);
+ if (cc >= 128 || (md->ctypes[cc] & ctype_space) == 0)
RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
- case OP_NOT_WORDCHAR:
+ case OP_NOT_WORDCHAR:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0))
+ pcre_uint32 cc;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHAR(eptr);
+ if (cc < 128 && (md->ctypes[cc] & ctype_word) != 0)
RRETURN(MATCH_NOMATCH);
- while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); /* PaN: Check */
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
}
break;
case OP_WORDCHAR:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject ||
- *eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0)
+ pcre_uint32 cc;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = RAWUCHAR(eptr);
+ if (cc >= 128 || (md->ctypes[cc] & ctype_word) == 0)
RRETURN(MATCH_NOMATCH);
+ eptr++;
/* No need to skip more bytes - we know it's a 1-byte character */
}
break;
@@ -3267,51 +4788,81 @@ for (;;)
} /* End switch(ctype) */
else
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
/* Code for the non-UTF-8 case for minimum matching of operators other
- than OP_PROP and OP_NOTPROP. We can assume that there are the minimum
- number of bytes present, as this was tested above. */
+ than OP_PROP and OP_NOTPROP. */
switch(ctype)
{
case OP_ANY:
- if ((ims & PCRE_DOTALL) == 0)
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- COST(min);
- for (i = 1; i <= min; i++)
+ if (eptr >= md->end_subject)
{
- if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
- eptr++;
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (md->partial != 0 &&
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
+ eptr++;
}
- else eptr += min;
break;
- case OP_ANYBYTE:
+ case OP_ALLANY:
+ if (eptr > md->end_subject - min)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
eptr += min;
break;
- /* Because of the CRLF case, we can't assume the minimum number of
- bytes are present in this case. */
+ case OP_ANYBYTE:
+ if (eptr > md->end_subject - min)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += min;
+ break;
case OP_ANYNL:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
switch(*eptr++)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+
+ case CHAR_CR:
+ if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++;
break;
- case 0x000a:
+
+ case CHAR_LF:
break;
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case 0x2028:
+ case 0x2029:
+#endif
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
@@ -3320,15 +4871,20 @@ for (;;)
case OP_NOT_HSPACE:
COST(min);
- for (i = 1; i <= min; i++) /* PaN: Check */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
switch(*eptr++)
{
default: break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
RRETURN(MATCH_NOMATCH);
}
}
@@ -3336,15 +4892,20 @@ for (;;)
case OP_HSPACE:
COST(min);
- for (i = 1; i <= min; i++) /* PaN: Check */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
switch(*eptr++)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
break;
}
}
@@ -3352,35 +4913,41 @@ for (;;)
case OP_NOT_VSPACE:
COST(min);
- for (i = 1; i <= min; i++) /* PaN: Check */
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
switch(*eptr++)
{
- default: break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
RRETURN(MATCH_NOMATCH);
+ default: break;
}
}
break;
case OP_VSPACE:
COST(min);
- for (i = 1; i <= min; i++)
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
{
- if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
switch(*eptr++)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
break;
}
}
@@ -3388,40 +4955,92 @@ for (;;)
case OP_NOT_DIGIT:
COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
case OP_DIGIT:
- COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
case OP_NOT_WHITESPACE:
- COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
case OP_WHITESPACE:
- COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
case OP_NOT_WORDCHAR:
- COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_word) != 0)
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
case OP_WORDCHAR:
- COST(min);
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_word) == 0)
+ COST(min);
+ for (i = 1; i <= min; i++) /* LOOP_COUNT: COST */
+ {
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
break;
default:
@@ -3445,70 +5064,217 @@ for (;;)
switch(prop_type)
{
case PT_ANY:
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM36);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM36);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
if (prop_fail_result) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_LAMP:
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM37);
+ int chartype;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM37);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_GC:
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM38);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM38);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_category == prop_value) == prop_fail_result)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_PC:
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM39);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM39);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == prop_value) == prop_fail_result)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
case PT_SC:
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM40);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM40);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINC(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_script == prop_value) == prop_fail_result)
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
+ case PT_ALNUM:
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ int category;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM59);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_SPACE: /* Perl space */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM60);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_PXSPACE: /* POSIX space */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM61);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_WORD:
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ int category;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM62);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L ||
+ category == ucp_N ||
+ c == CHAR_UNDERSCORE)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_CLIST:
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ const pcre_uint32 *cp;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM67);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;) /* LOOP_COUNT: COST */
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
+ if (c == *cp++)
+ { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
+ COST(1);
+ }
+ }
+ /* Control never gets here */
+
+ case PT_UCNC:
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
+ {
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM68);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ /* This should never occur */
default:
RRETURN(PCRE_ERROR_INTERNAL);
}
@@ -3519,50 +5285,71 @@ for (;;)
else if (ctype == OP_EXTUNI)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM41);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM41);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
- GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
- while (eptr < md->end_subject) /* PaN: Check */
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
{
- int len = 1;
- if (!utf8) c = *eptr; else
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+#ifndef ERLANG_INTEGRATION
+ int lgb, rgb;
+#endif
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < md->end_subject) /* LOOP_COUNT: CHK */
{
- GETCHARLEN(c, eptr, len);
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ COST_CHK(1);
}
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category != ucp_M) break;
- eptr += len;
}
+ CHECK_PARTIAL();
}
}
-
else
#endif /* SUPPORT_UCP */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM42);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject ||
- (ctype == OP_ANY && (ims & PCRE_DOTALL) == 0 &&
- IS_NEWLINE(eptr)))
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (ctype == OP_ANY && IS_NEWLINE(eptr))
RRETURN(MATCH_NOMATCH);
-
GETCHARINC(c, eptr);
switch(ctype)
{
- case OP_ANY: /* This is the DOTALL case */
+ case OP_ANY: /* This is the non-NL case */
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
break;
+ case OP_ALLANY:
case OP_ANYBYTE:
break;
@@ -3570,17 +5357,20 @@ for (;;)
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+ case CHAR_CR:
+ if (eptr < md->end_subject && RAWUCHAR(eptr) == CHAR_LF) eptr++;
break;
- case 0x000a:
+
+ case CHAR_LF:
break;
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
case 0x2028:
case 0x2029:
+#endif /* Not EBCDIC */
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
@@ -3589,84 +5379,32 @@ for (;;)
case OP_NOT_HSPACE:
switch(c)
{
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH);
default: break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- RRETURN(MATCH_NOMATCH);
}
break;
case OP_HSPACE:
switch(c)
{
+ HSPACE_CASES: break;
default: RRETURN(MATCH_NOMATCH);
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- break;
}
break;
case OP_NOT_VSPACE:
switch(c)
{
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
default: break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- RRETURN(MATCH_NOMATCH);
}
break;
case OP_VSPACE:
switch(c)
{
+ VSPACE_CASES: break;
default: RRETURN(MATCH_NOMATCH);
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- break;
}
break;
@@ -3686,7 +5424,7 @@ for (;;)
break;
case OP_WHITESPACE:
- if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
+ if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
RRETURN(MATCH_NOMATCH);
break;
@@ -3707,22 +5445,36 @@ for (;;)
}
else
#endif
- /* Not UTF-8 mode */
+ /* Not UTF mode */
{
- for (fi = min;; fi++) /* PaN: OK */
+ for (fi = min;; fi++) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43);
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM43);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (fi >= max || eptr >= md->end_subject ||
- ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr)))
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (ctype == OP_ANY && IS_NEWLINE(eptr))
RRETURN(MATCH_NOMATCH);
-
c = *eptr++;
switch(ctype)
{
- case OP_ANY: /* This is the DOTALL case */
+ case OP_ANY: /* This is the non-NL case */
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
break;
+ case OP_ALLANY:
case OP_ANYBYTE:
break;
@@ -3730,16 +5482,20 @@ for (;;)
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x000d:
- if (eptr < md->end_subject && *eptr == 0x0a) eptr++;
+ case CHAR_CR:
+ if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++;
break;
- case 0x000a:
+ case CHAR_LF:
break;
- case 0x000b:
- case 0x000c:
- case 0x0085:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case 0x2028:
+ case 0x2029:
+#endif
if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
break;
}
@@ -3749,9 +5505,10 @@ for (;;)
switch(c)
{
default: break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
RRETURN(MATCH_NOMATCH);
}
break;
@@ -3760,9 +5517,10 @@ for (;;)
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
break;
}
break;
@@ -3771,11 +5529,10 @@ for (;;)
switch(c)
{
default: break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
RRETURN(MATCH_NOMATCH);
}
break;
@@ -3784,37 +5541,36 @@ for (;;)
switch(c)
{
default: RRETURN(MATCH_NOMATCH);
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
break;
}
break;
case OP_NOT_DIGIT:
- if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_DIGIT:
- if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
break;
case OP_NOT_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
+ if (MAX_255(c) && (md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
break;
case OP_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
+ if (!MAX_255(c) || (md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
break;
default:
@@ -3839,11 +5595,15 @@ for (;;)
switch(prop_type)
{
case PT_ANY:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
if (prop_fail_result) break;
eptr+= len;
COST_CHK(1);
@@ -3851,15 +5611,20 @@ for (;;)
break;
case PT_LAMP:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
+ int chartype;
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == ucp_Lu ||
- prop_chartype == ucp_Ll ||
- prop_chartype == ucp_Lt) == prop_fail_result)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
break;
eptr+= len;
COST_CHK(1);
@@ -3867,105 +5632,267 @@ for (;;)
break;
case PT_GC:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_category == prop_value) == prop_fail_result)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) break;
eptr+= len;
COST_CHK(1);
}
break;
case PT_PC:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_chartype == prop_value) == prop_fail_result)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) break;
eptr+= len;
COST_CHK(1);
}
break;
case PT_SC:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if ((prop_script == prop_value) == prop_fail_result)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) break;
+ eptr+= len;
+ COST_CHK(1);
+ }
+ break;
+
+ case PT_ALNUM:
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ int category;
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ break;
+ eptr+= len;
+ COST_CHK(1);
+ }
+ break;
+
+ case PT_SPACE: /* Perl space */
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
+ break;
+ eptr+= len;
+ COST_CHK(1);
+ }
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CATEGORY(c) == ucp_Z || c == CHAR_HT || c == CHAR_NL ||
+ c == CHAR_VT || c == CHAR_FF || c == CHAR_CR)
+ == prop_fail_result)
break;
eptr+= len;
COST_CHK(1);
}
break;
+
+ case PT_WORD:
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ int category;
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N ||
+ c == CHAR_UNDERSCORE) == prop_fail_result)
+ break;
+ eptr+= len;
+ COST_CHK(1);
+ }
+ break;
+
+ case PT_CLIST:
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ const pcre_uint32 *cp;
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;) /* LOOP_COUNT: COST */
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else goto GOT_MAX; }
+ if (c == *cp++)
+ { if (prop_fail_result) goto GOT_MAX; else break; }
+ COST(1);
+ }
+ eptr += len;
+ COST_CHK(1);
+ }
+ GOT_MAX:
+ break;
+
+ case PT_UCNC:
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
+ {
+ int len = 1;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ break;
+ eptr += len;
+ COST_CHK(1);
+ }
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
}
/* eptr is now past the end of the maximum run */
- if (possessive) continue;
- for(;;) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM44);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM44);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
- if (utf8) BACKCHAR(eptr);
+ eptr--;
+ if (utf) BACKCHAR(eptr);
}
}
- /* Match extended Unicode sequences. We will get here only if the
+ /* Match extended Unicode grapheme clusters. We will get here only if the
support is in the binary; otherwise a compile-time error occurs. */
else if (ctype == OP_EXTUNI)
{
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
- GETCHARINCTEST(c, eptr);
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category == ucp_M) break;
- while (eptr < md->end_subject)
+ if (eptr >= md->end_subject)
{
- int len = 1;
- if (!utf8) c = *eptr; else
+ SCHECK_PARTIAL();
+ break;
+ }
+ else
+ {
+#ifndef ERLANG_INTEGRATION
+ int lgb, rgb;
+#endif
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < md->end_subject) /* LOOP_COUNT: CHK */
{
- GETCHARLEN(c, eptr, len);
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ COST_CHK(1);
}
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category != ucp_M) break;
- eptr += len;
COST_CHK(1);
}
- COST_CHK(1);
+ CHECK_PARTIAL();
}
/* eptr is now past the end of the maximum run */
- if (possessive) continue;
- for(;;) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM45);
+#ifndef ERLANG_INTEGRATION
+ int lgb, rgb;
+#endif
+ PCRE_PUCHAR fptr;
+
+ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
- for (;;) /* Move back over one extended */ /* PaN: Check */
+
+ /* Backtracking over an extended grapheme cluster involves inspecting
+ the previous two characters (if present) to see if a break is
+ permitted between them. */
+
+ eptr--;
+ if (!utf) c = *eptr; else
{
- int len = 1;
- if (!utf8) c = *eptr; else
+ BACKCHAR(eptr);
+ GETCHAR(c, eptr);
+ }
+ rgb = UCD_GRAPHBREAK(c);
+
+ for (;;) /* LOOP_COUNT: COST */
+ {
+ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */
+ fptr = eptr - 1;
+ if (!utf) c = *fptr; else
{
- BACKCHAR(eptr);
- GETCHARLEN(c, eptr, len);
+ BACKCHAR(fptr);
+ GETCHAR(c, fptr);
}
- prop_category = _erts_pcre_ucp_findprop(c, &prop_chartype, &prop_script);
- if (prop_category != ucp_M) break;
- eptr--;
+ lgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ eptr = fptr;
+ rgb = lgb;
+ COST(1);
}
}
}
@@ -3973,35 +5900,34 @@ for (;;)
else
#endif /* SUPPORT_UCP */
-#ifdef SUPPORT_UTF8
- /* UTF-8 mode */
-
- if (utf8)
+#ifdef SUPPORT_UTF
+ if (utf)
{
switch(ctype)
{
case OP_ANY:
if (max < INT_MAX)
{
- if ((ims & PCRE_DOTALL) == 0)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- for (i = min; i < max; i++)
+ if (eptr >= md->end_subject)
{
- if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
- eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
- COST_CHK(1);
+ SCHECK_PARTIAL();
+ break;
}
- }
- else
- {
- for (i = min; i < max; i++)
+ if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHAR(eptr) == NLBLOCK->nl[0])
{
- if (eptr >= md->end_subject) break;
- eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; /* PaN: Check */
- COST_CHK(1);
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+ COST_CHK(1);
}
}
@@ -4009,21 +5935,50 @@ for (;;)
else
{
- if ((ims & PCRE_DOTALL) == 0)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- for (i = min; i < max; i++)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ RAWUCHAR(eptr) == NLBLOCK->nl[0])
{
- if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
- eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
- COST_CHK(1);
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
}
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+ COST_CHK(1);
}
- else
+ }
+ break;
+
+ case OP_ALLANY:
+ if (max < INT_MAX)
+ {
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- eptr = md->end_subject;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ eptr++;
+ ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
+ COST_CHK(1);
}
}
+ else
+ {
+ eptr = md->end_subject; /* Unlimited UTF-8 repeat */
+ SCHECK_PARTIAL();
+ }
break;
/* The byte case is the same as non-UTF8 */
@@ -4031,27 +5986,37 @@ for (;;)
case OP_ANYBYTE:
c = max - min;
if (c > (unsigned int)(md->end_subject - eptr))
- c = md->end_subject - eptr;
- eptr += c;
+ {
+ eptr = md->end_subject;
+ SCHECK_PARTIAL();
+ }
+ else eptr += c;
break;
case OP_ANYNL:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
- if (c == 0x000d)
+ if (c == CHAR_CR)
{
if (++eptr >= md->end_subject) break;
- if (*eptr == 0x000a) eptr++;
+ if (RAWUCHAR(eptr) == CHAR_LF) eptr++;
}
else
{
- if (c != 0x000a &&
+ if (c != CHAR_LF &&
(md->bsr_anycrlf ||
- (c != 0x000b && c != 0x000c &&
- c != 0x0085 && c != 0x2028 && c != 0x2029)))
+ (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
+#ifndef EBCDIC
+ && c != 0x2028 && c != 0x2029
+#endif /* Not EBCDIC */
+ )))
break;
eptr += len;
}
@@ -4061,36 +6026,20 @@ for (;;)
case OP_NOT_HSPACE:
case OP_HSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
BOOL gotspace;
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
switch(c)
{
+ HSPACE_CASES: gotspace = TRUE; break;
default: gotspace = FALSE; break;
- case 0x09: /* HT */
- case 0x20: /* SPACE */
- case 0xa0: /* NBSP */
- case 0x1680: /* OGHAM SPACE MARK */
- case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */
- case 0x2000: /* EN QUAD */
- case 0x2001: /* EM QUAD */
- case 0x2002: /* EN SPACE */
- case 0x2003: /* EM SPACE */
- case 0x2004: /* THREE-PER-EM SPACE */
- case 0x2005: /* FOUR-PER-EM SPACE */
- case 0x2006: /* SIX-PER-EM SPACE */
- case 0x2007: /* FIGURE SPACE */
- case 0x2008: /* PUNCTUATION SPACE */
- case 0x2009: /* THIN SPACE */
- case 0x200A: /* HAIR SPACE */
- case 0x202f: /* NARROW NO-BREAK SPACE */
- case 0x205f: /* MEDIUM MATHEMATICAL SPACE */
- case 0x3000: /* IDEOGRAPHIC SPACE */
- gotspace = TRUE;
- break;
}
if (gotspace == (ctype == OP_NOT_HSPACE)) break;
eptr += len;
@@ -4100,24 +6049,20 @@ for (;;)
case OP_NOT_VSPACE:
case OP_VSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
BOOL gotspace;
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
switch(c)
{
+ VSPACE_CASES: gotspace = TRUE; break;
default: gotspace = FALSE; break;
- case 0x0a: /* LF */
- case 0x0b: /* VT */
- case 0x0c: /* FF */
- case 0x0d: /* CR */
- case 0x85: /* NEL */
- case 0x2028: /* LINE SEPARATOR */
- case 0x2029: /* PARAGRAPH SEPARATOR */
- gotspace = TRUE;
- break;
}
if (gotspace == (ctype == OP_NOT_VSPACE)) break;
eptr += len;
@@ -4126,10 +6071,14 @@ for (;;)
break;
case OP_NOT_DIGIT:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) break;
eptr+= len;
@@ -4138,10 +6087,14 @@ for (;;)
break;
case OP_DIGIT:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c >= 256 ||(md->ctypes[c] & ctype_digit) == 0) break;
eptr+= len;
@@ -4150,10 +6103,14 @@ for (;;)
break;
case OP_NOT_WHITESPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c < 256 && (md->ctypes[c] & ctype_space) != 0) break;
eptr+= len;
@@ -4162,10 +6119,14 @@ for (;;)
break;
case OP_WHITESPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c >= 256 ||(md->ctypes[c] & ctype_space) == 0) break;
eptr+= len;
@@ -4174,10 +6135,14 @@ for (;;)
break;
case OP_NOT_WORDCHAR:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c < 256 && (md->ctypes[c] & ctype_word) != 0) break;
eptr+= len;
@@ -4186,10 +6151,14 @@ for (;;)
break;
case OP_WORDCHAR:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
int len = 1;
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
GETCHARLEN(c, eptr, len);
if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) break;
eptr+= len;
@@ -4201,60 +6170,80 @@ for (;;)
RRETURN(PCRE_ERROR_INTERNAL);
}
- /* eptr is now past the end of the maximum run */
-
- if (possessive) continue;
- for(;;) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for(;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM46);
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM46);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
+ eptr--;
BACKCHAR(eptr);
+ if (ctype == OP_ANYNL && eptr > pp && RAWUCHAR(eptr) == CHAR_NL &&
+ RAWUCHAR(eptr - 1) == CHAR_CR) eptr--;
}
}
else
-#endif /* SUPPORT_UTF8 */
-
- /* Not UTF-8 mode */
+#endif /* SUPPORT_UTF */
+ /* Not UTF mode */
{
switch(ctype)
{
case OP_ANY:
- if ((ims & PCRE_DOTALL) == 0)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- for (i = min; i < max; i++)
+ if (eptr >= md->end_subject)
{
- if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break;
- eptr++;
- COST_CHK(1);
+ SCHECK_PARTIAL();
+ break;
}
- break;
+ if (IS_NEWLINE(eptr)) break;
+ if (md->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= md->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ md->hitend = TRUE;
+ if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
+ }
+ eptr++;
+ COST_CHK(1);
}
- /* For DOTALL case, fall through and treat as \C */
+ break;
+ case OP_ALLANY:
case OP_ANYBYTE:
c = max - min;
if (c > (unsigned int)(md->end_subject - eptr))
- c = md->end_subject - eptr;
- eptr += c;
+ {
+ eptr = md->end_subject;
+ SCHECK_PARTIAL();
+ }
+ else eptr += c;
break;
case OP_ANYNL:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
c = *eptr;
- if (c == 0x000d)
+ if (c == CHAR_CR)
{
if (++eptr >= md->end_subject) break;
- if (*eptr == 0x000a) eptr++;
+ if (*eptr == CHAR_LF) eptr++;
}
else
{
- if (c != 0x000a &&
- (md->bsr_anycrlf ||
- (c != 0x000b && c != 0x000c && c != 0x0085)))
- break;
+ if (c != CHAR_LF && (md->bsr_anycrlf ||
+ (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ && c != 0x2028 && c != 0x2029
+#endif
+ ))) break;
eptr++;
}
COST_CHK(1);
@@ -4262,106 +6251,172 @@ for (;;)
break;
case OP_NOT_HSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
- c = *eptr;
- if (c == 0x09 || c == 0x20 || c == 0xa0) break;
- eptr++;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: eptr++; break;
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ goto ENDLOOP00;
+ }
COST_CHK(1);
}
+ ENDLOOP00:
break;
case OP_HSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
- c = *eptr;
- if (c != 0x09 && c != 0x20 && c != 0xa0) break;
- eptr++;
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: goto ENDLOOP01;
+ HSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ eptr++; break;
+ }
COST_CHK(1);
}
+ ENDLOOP01:
break;
case OP_NOT_VSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
- c = *eptr;
- if (c == 0x0a || c == 0x0b || c == 0x0c || c == 0x0d || c == 0x85)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
- eptr++;
+ }
+ switch(*eptr)
+ {
+ default: eptr++; break;
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ goto ENDLOOP02;
+ }
COST_CHK(1);
}
+ ENDLOOP02:
break;
case OP_VSPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject) break;
- c = *eptr;
- if (c != 0x0a && c != 0x0b && c != 0x0c && c != 0x0d && c != 0x85)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
- eptr++;
+ }
+ switch(*eptr)
+ {
+ default: goto ENDLOOP03;
+ VSPACE_BYTE_CASES:
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ eptr++; break;
+ }
COST_CHK(1);
}
+ ENDLOOP03:
break;
case OP_NOT_DIGIT:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) != 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0) break;
eptr++;
COST_CHK(1);
}
break;
case OP_DIGIT:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) == 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0) break;
eptr++;
COST_CHK(1);
}
break;
case OP_NOT_WHITESPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) != 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0) break;
eptr++;
COST_CHK(1);
}
break;
case OP_WHITESPACE:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) == 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0) break;
eptr++;
COST_CHK(1);
}
break;
case OP_NOT_WORDCHAR:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) != 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0) break;
eptr++;
COST_CHK(1);
}
break;
case OP_WORDCHAR:
- for (i = min; i < max; i++)
+ for (i = min; i < max; i++) /* LOOP_COUNT: CHK */
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) == 0)
+ if (eptr >= md->end_subject)
+ {
+ SCHECK_PARTIAL();
break;
+ }
+ if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0) break;
eptr++;
COST_CHK(1);
}
@@ -4371,14 +6426,15 @@ for (;;)
RRETURN(PCRE_ERROR_INTERNAL);
}
- /* eptr is now past the end of the maximum run */
-
- if (possessive) continue;
- while (eptr >= pp) /* PaN: OK */
+ if (possessive) continue; /* No backtracking */
+ for (;;) /* LOOP_COUNT: Ok */
{
- RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM47);
- eptr--;
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, md, eptrb, RM47);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ if (ctype == OP_ANYNL && eptr > pp && *eptr == CHAR_LF &&
+ eptr[-1] == CHAR_CR) eptr--;
}
}
@@ -4417,21 +6473,25 @@ switch (frame->Xwhere)
LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
- LBL(53) LBL(54)
-#ifdef SUPPORT_UTF8
- LBL(16) LBL(18) LBL(20) LBL(21) LBL(22) LBL(23) LBL(28) LBL(30)
+ LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)
+ LBL(65) LBL(66)
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ LBL(21)
+#endif
+#ifdef SUPPORT_UTF
+ LBL(16) LBL(18) LBL(20)
+ LBL(22) LBL(23) LBL(28) LBL(30)
LBL(32) LBL(34) LBL(42) LBL(46)
#ifdef SUPPORT_UCP
LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
+ LBL(59) LBL(60) LBL(61) LBL(62) LBL(67) LBL(68)
#endif /* SUPPORT_UCP */
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
default:
DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
return PCRE_ERROR_INTERNAL;
}
#undef LBL
-
-
#ifdef ERLANG_INTEGRATION
LOOP_COUNT_RETURN:
/* Restore the saved register variables in the upper dummy frame, description below */
@@ -4440,11 +6500,14 @@ LOOP_COUNT_RETURN:
frame = newframe->Xprevframe;
rrc = newframe->Xop;
i = newframe->Xfi;
- c = newframe->Xfc;
- utf8 = newframe->Xcur_is_word;
+ c = (pcre_uint32) newframe->Xfc;
+ utf = newframe->Xcur_is_word;
minimize = newframe->Xcondition;
possessive = newframe->Xprev_is_word;
- (erts_pcre_stack_free)(newframe);
+ caseless = (BOOL) newframe->Xcodelink;
+ condcode = newframe->Xctype;
+ /* Note, the frame is not freed until the whole match is done,
+ the function release_match_heapframes takes care of that */
EDEBUGF(("LOOP_COUNT_RETURN: %d",frame->Xwhere));
switch (frame->Xwhere)
{
@@ -4463,40 +6526,40 @@ LOOP_COUNT_BREAK:
* ------------------------------ --------------
* rrc Xop
* i Xfi
- * c Xfc
- * utf8 Xcur_is_word
+ * c Xfc (cast)
+ * utf Xcur_is_word
* minimize Xcondition
* possessive Xprev_is_word
+ * caseless Xcodelink (cast)
+ * condcode Xctype
*/
{
- heapframe *newframe = (erts_pcre_stack_malloc)(sizeof(heapframe));
+ heapframe *newframe = frame->Xnextframe;
+ if (newframe == NULL)
+ {
+ newframe = (heapframe *)(PUBL(stack_malloc))(sizeof(heapframe));
+ if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
+ newframe->Xnextframe = NULL;
+ frame->Xnextframe = newframe;
+ }
newframe->Xprevframe = frame;
newframe->Xop = rrc;
newframe->Xfi = i;
- newframe->Xfc = c;
- newframe->Xcur_is_word = utf8;
+ newframe->Xfc = (unsigned int) c;
+ newframe->Xcur_is_word = utf;
newframe->Xcondition = minimize;
newframe->Xprev_is_word = possessive;
+ newframe->Xcodelink = (int) caseless;
+ newframe->Xctype = condcode;
md->state_save = newframe;
md->loop_limit = 0;
EDEBUGF(("Break loop!"));
return PCRE_ERROR_LOOP_LIMIT;
}
#endif
-
#endif /* NO_RECURSE */
}
-#ifdef ERLANG_INTEGRATION
-static void free_saved_match_state(heapframe *top) {
- while (top != NULL) {
- heapframe *nxt = top->Xprevframe;
- (erts_pcre_stack_free)(top);
- top = nxt;
- }
-}
-#endif
-
/***************************************************************************
****************************************************************************
@@ -4509,7 +6572,6 @@ Undefine all the macros that were defined above to handle this. */
#undef ecode
#undef mstart
#undef offset_top
-#undef ims
#undef eptrb
#undef flags
@@ -4527,8 +6589,6 @@ Undefine all the macros that were defined above to handle this. */
#undef condition
#undef prev_is_word
-#undef original_ims
-
#undef ctype
#undef length
#undef max
@@ -4555,6 +6615,34 @@ Undefine all the macros that were defined above to handle this. */
***************************************************************************/
+#ifdef NO_RECURSE
+/*************************************************
+* Release allocated heap frames *
+*************************************************/
+
+/* This function releases all the allocated frames. The base frame is on the
+machine stack, and so must not be freed.
+
+Argument: the address of the base frame
+Returns: nothing
+*/
+
+static void
+release_match_heapframes (heapframe *frame_base)
+{
+heapframe *nextframe = frame_base->Xnextframe;
+#ifdef ERLANG_INTEGRATION
+frame_base->Xnextframe = NULL; /* Protect against multiple free */
+#endif
+while (nextframe != NULL)
+ {
+ heapframe *oldframe = nextframe;
+ nextframe = nextframe->Xnextframe;
+ (PUBL(stack_free))(oldframe);
+ }
+}
+#endif
+
/*************************************************
* Execute a Regular Expression *
@@ -4581,118 +6669,136 @@ Returns: > 0 => success; value is the number of elements filled in
*/
#ifdef ERLANG_INTEGRATION
typedef struct {
- int Xresetcount;
- int Xfirst_byte;
- BOOL Xfirst_byte_caseless;
- int Xreq_byte;
- int Xreq_byte2;
- unsigned long int Xims;
- BOOL Xreq_byte_caseless;
- BOOL Xusing_temporary_offsets;
- BOOL Xanchored;
- BOOL Xstartline;
- BOOL Xfirstline;
- BOOL Xutf8;
- match_data Xmatch_block;
- match_data *Xmd;
- const uschar *Xtables; /* may point to extra_data->tables, so the tables cannot be relocated
- between restarts */
- const uschar *Xstart_bits; /* Points into study, so if studies are used, *they*
- cannot be relocated between restarts */
- /* The following points into the subject, so the sublect needs to stay put too */
- USPTR Xstart_match;
- USPTR Xend_subject;
- USPTR Xreq_byte_ptr;
- /* We'll handle internal studies and re's although this will not happen
- in the erlang emulator in current implementation */
- pcre_study_data Xinternal_study;
- const pcre_study_data *Xstudy;
-
- real_pcre Xinternal_re;
- const real_pcre *Xexternal_re;
- const real_pcre *Xre;
- /* Original function parameters that need be saved */
- int Xstart_offset;
- int Xoffsetcount;
- int *Xoffsets;
+ int Xarg_offset_max;
+ BOOL Xusing_temporary_offsets;
+ BOOL Xanchored;
+ BOOL Xstartline;
+ BOOL Xfirstline;
+ BOOL Xutf;
+ BOOL Xhas_first_char;
+ BOOL Xhas_req_char;
+ pcre_uchar Xfirst_char;
+ pcre_uchar Xfirst_char2;
+ pcre_uchar Xreq_char;
+ pcre_uchar Xreq_char2;
+ match_data Xmatch_block;
+ match_data *Xmd;
+ const pcre_uint8 *Xtables;
+ const pcre_uint8 *Xstart_bits;
+ PCRE_PUCHAR Xstart_match;
+ PCRE_PUCHAR Xend_subject;
+ PCRE_PUCHAR Xstart_partial;
+ PCRE_PUCHAR Xmatch_partial;
+ PCRE_PUCHAR Xreq_char_ptr;
+ const pcre_study_data *Xstudy;
+ REAL_PCRE *Xre;
+ heapframe Xframe_zero; /* Always NO_RECURSE */
+
+ /* Original function parameters that need be saved */
+ int Xstart_offset;
+ int Xoffsetcount;
+ int *Xoffsets;
} PcreExecContext;
#endif
-
-PCRE_EXP_DEFN int
-erts_pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
+
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_exec(const pcre *argument_re, const erts_pcre_extra *extra_data,
PCRE_SPTR subject, int length, int start_offset, int options, int *offsets,
int offsetcount)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
+ PCRE_SPTR subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_exec(const pcre32 *argument_re, const pcre32_extra *extra_data,
+ PCRE_SPTR32 subject, int length, int start_offset, int options, int *offsets,
+ int offsetcount)
+#endif
{
#ifndef ERLANG_INTEGRATION
-int rc, resetcount, ocount;
-int first_byte = -1;
-int req_byte = -1;
-int req_byte2 = -1;
+int rc, ocount, arg_offset_max;
int newline;
-unsigned long int ims;
BOOL using_temporary_offsets = FALSE;
BOOL anchored;
BOOL startline;
BOOL firstline;
-BOOL first_byte_caseless = FALSE;
-BOOL req_byte_caseless = FALSE;
-BOOL utf8;
+BOOL utf;
+BOOL has_first_char = FALSE;
+BOOL has_req_char = FALSE;
+pcre_uchar first_char = 0;
+pcre_uchar first_char2 = 0;
+pcre_uchar req_char = 0;
+pcre_uchar req_char2 = 0;
match_data match_block;
match_data *md = &match_block;
-const uschar *tables;
-const uschar *start_bits = NULL;
-USPTR start_match = (USPTR)subject + start_offset;
-USPTR end_subject;
-USPTR req_byte_ptr = start_match - 1;
+const pcre_uint8 *tables;
+const pcre_uint8 *start_bits = NULL;
+PCRE_PUCHAR start_match = (PCRE_PUCHAR)subject + start_offset;
+PCRE_PUCHAR end_subject;
+PCRE_PUCHAR start_partial = NULL;
+PCRE_PUCHAR match_partial;
+PCRE_PUCHAR req_char_ptr = start_match - 1;
-pcre_study_data internal_study;
const pcre_study_data *study;
-
-real_pcre internal_re;
-const real_pcre *external_re = (const real_pcre *)argument_re;
-const real_pcre *re = external_re;
-
+const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
+#ifdef NO_RECURSE
+heapframe frame_zero;
+#endif
#else
/* "local" variables in faked stackframe instead */
-#define resetcount (exec_context->Xresetcount)
-#define req_byte2 (exec_context->Xreq_byte2)
+#define arg_offset_max (exec_context->Xarg_offset_max)
#define using_temporary_offsets (exec_context->Xusing_temporary_offsets)
#define anchored (exec_context->Xanchored)
#define startline (exec_context->Xstartline)
#define firstline (exec_context->Xfirstline)
-#define first_byte_caseless (exec_context->Xfirst_byte_caseless)
-#define req_byte_caseless (exec_context->Xreq_byte_caseless)
+#define has_first_char (exec_context->Xhas_first_char)
+#define has_req_char (exec_context->Xhas_req_char)
+#define first_char2 (exec_context->Xfirst_char2)
+#define req_char2 (exec_context->Xreq_char2)
#define match_block (exec_context->Xmatch_block)
#define md (exec_context->Xmd)
-#define start_match (exec_context->Xstart_match)
-#define req_byte_ptr (exec_context->Xreq_byte_ptr)
-#define internal_study (exec_context->Xinternal_study)
+#define start_match (exec_context->Xstart_match)
+#define start_partial (exec_context->Xstart_partial)
+#define match_partial (exec_context->Xmatch_partial)
#define study (exec_context->Xstudy)
-#define internal_re (exec_context->Xinternal_re)
-#define external_re (exec_context->Xexternal_re)
#define re (exec_context->Xre)
-#define ims (exec_context->Xims)
+#define frame_zero (exec_context->Xframe_zero)
#define SWAPIN() do { \
- utf8 = exec_context->Xutf8; \
- first_byte = exec_context->Xfirst_byte; \
+ utf = exec_context->Xutf; \
+ first_char = exec_context->Xfirst_char; \
tables = exec_context->Xtables; \
start_bits = exec_context->Xstart_bits; \
end_subject = exec_context->Xend_subject; \
- req_byte = exec_context->Xreq_byte; \
+ req_char_ptr = exec_context->Xreq_char_ptr; \
+ req_char = exec_context->Xreq_char; \
+ /* Parameters */ \
start_offset = exec_context->Xstart_offset; \
offsetcount = exec_context->Xoffsetcount; \
offsets = exec_context->Xoffsets; \
} while (0)
#define SWAPOUT() do { \
- exec_context->Xutf8 = utf8; \
- exec_context->Xfirst_byte = first_byte; \
+ exec_context->Xutf = utf; \
+ exec_context->Xfirst_char = first_char; \
exec_context->Xtables = tables; \
exec_context->Xstart_bits = start_bits; \
exec_context->Xend_subject = end_subject; \
- exec_context->Xreq_byte = req_byte; \
+ exec_context->Xreq_char_ptr = req_char_ptr; \
+ exec_context->Xreq_char = req_char; \
+ /* Parameters */ \
exec_context->Xstart_offset = start_offset; \
exec_context->Xoffsetcount = offsetcount; \
exec_context->Xoffsets = offsets; \
@@ -4701,16 +6807,19 @@ const real_pcre *re = external_re;
PcreExecContext *exec_context;
PcreExecContext internal_context;
+/* Locals that need never be saved */
int rc, ocount;
int newline;
-/* special variables follow, swapped in and out */
-BOOL utf8;
-int first_byte;
-const uschar *tables;
-const uschar *start_bits;
-USPTR end_subject;
-int req_byte;
+/* Variables that we swap in and out */
+BOOL utf;
+pcre_uchar first_char;
+const pcre_uint8 *tables;
+const pcre_uint8 *start_bits;
+PCRE_PUCHAR end_subject;
+PCRE_PUCHAR req_char_ptr;
+pcre_uchar req_char;
+
/* End special swapped variables */
if (extra_data != NULL &&
@@ -4719,6 +6828,7 @@ int req_byte;
/* we are restarting, every initialization is skipped and we jump directly into the loop */
exec_context = (PcreExecContext *) *(extra_data->restart_data);
SWAPIN();
+
goto RESTART_INTERRUPTED;
} else {
if (extra_data != NULL &&
@@ -4731,32 +6841,136 @@ int req_byte;
}
/* OK, no restart here, initialize variables instead */
- first_byte = -1;
- req_byte = -1;
- req_byte2 = -1;
using_temporary_offsets = FALSE;
- first_byte_caseless = FALSE;
- req_byte_caseless = FALSE;
+ has_first_char = FALSE;
+ has_req_char = FALSE;
+ first_char = 0;
+ first_char2 = 0;
+ req_char = 0;
+ req_char2 = 0;
md = &match_block;
start_bits = NULL;
- start_match = (USPTR)subject + start_offset;
- req_byte_ptr = start_match - 1;
- external_re = (const real_pcre *)argument_re;
- re = external_re;
+ start_match = (PCRE_PUCHAR)subject + start_offset;
+ start_partial = NULL;
+ req_char_ptr = start_match - 1;
+ re = (REAL_PCRE *)argument_re;
md->state_save = NULL;
-
}
#endif /* ERLANG_INTEGRATION */
+#ifdef NO_RECURSE
+frame_zero.Xprevframe = NULL; /* Marks the top level */
+frame_zero.Xnextframe = NULL; /* None are allocated yet */
+md->match_frames_base = &frame_zero;
+#endif
+
+/* Check for the special magic call that measures the size of the stack used
+per recursive call of match(). Without the funny casting for sizeof, a Windows
+compiler gave this error: "unary minus operator applied to unsigned type,
+result still unsigned". Hopefully the cast fixes that. */
+
+if (re == NULL && extra_data == NULL && subject == NULL && length == -999 &&
+ start_offset == -999)
+#ifdef NO_RECURSE
+ return -((int)sizeof(heapframe));
+#else
+ return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
+#endif
+
/* Plausibility checks */
if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
-if (re == NULL || subject == NULL ||
- (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL;
+if (re == NULL || subject == NULL || (offsets == NULL && offsetcount > 0))
+ return PCRE_ERROR_NULL;
if (offsetcount < 0) return PCRE_ERROR_BADCOUNT;
+if (length < 0) return PCRE_ERROR_BADLENGTH;
+if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET;
+
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
+REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
+means that the pattern is likely compiled with different endianness. */
+
+if (re->magic_number != MAGIC_NUMBER)
+ return re->magic_number == REVERSED_MAGIC_NUMBER?
+ PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
+
+/* These two settings are used in the code for checking a UTF-8 string that
+follows immediately afterwards. Other values in the md block are used only
+during "normal" pcre_exec() processing, not when the JIT support is in use,
+so they are set up later. */
+
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+utf = md->utf = (re->options & PCRE_UTF8) != 0;
+md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :
+ ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;
+
+/* Check a UTF-8 string if required. Pass back the character offset and error
+code for an invalid string if a results vector is available. */
+
+#ifdef SUPPORT_UTF
+if (utf && (options & PCRE_NO_UTF8_CHECK) == 0)
+ {
+ int erroroffset;
+ int errorcode = PRIV(valid_utf)((PCRE_PUCHAR)subject, length, &erroroffset);
+ if (errorcode != 0)
+ {
+ if (offsetcount >= 2)
+ {
+ offsets[0] = erroroffset;
+ offsets[1] = errorcode;
+ }
+#if defined COMPILE_PCRE8
+ return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)?
+ PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
+#elif defined COMPILE_PCRE16
+ return (errorcode <= PCRE_UTF16_ERR1 && md->partial > 1)?
+ PCRE_ERROR_SHORTUTF16 : PCRE_ERROR_BADUTF16;
+#elif defined COMPILE_PCRE32
+ return PCRE_ERROR_BADUTF32;
+#endif
+ }
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+ /* Check that a start_offset points to the start of a UTF character. */
+ if (start_offset > 0 && start_offset < length &&
+ NOT_FIRSTCHAR(((PCRE_PUCHAR)subject)[start_offset]))
+ return PCRE_ERROR_BADUTF8_OFFSET;
+#endif
+ }
+#endif
+
+/* If the pattern was successfully studied with JIT support, run the JIT
+executable instead of the rest of this function. Most options must be set at
+compile time for the JIT code to be usable. Fallback to the normal code path if
+an unsupported flag is set. */
+
+#ifdef SUPPORT_JIT
+if (extra_data != NULL
+ && (extra_data->flags & (PCRE_EXTRA_EXECUTABLE_JIT |
+ PCRE_EXTRA_TABLES)) == PCRE_EXTRA_EXECUTABLE_JIT
+ && extra_data->executable_jit != NULL
+ && (options & ~PUBLIC_JIT_EXEC_OPTIONS) == 0)
+ {
+ rc = PRIV(jit_exec)(extra_data, (const pcre_uchar *)subject, length,
+ start_offset, options, offsets, offsetcount);
+
+ /* PCRE_ERROR_NULL means that the selected normal or partial matching
+ mode is not compiled. In this case we simply fallback to interpreter. */
+
+ if (rc != PCRE_ERROR_JIT_BADOPTION) return rc;
+ }
+#endif
+
+/* Carry on with non-JIT matching. This information is for finding all the
+numbers associated with a given name, for condition testing. */
+
+md->name_table = (pcre_uchar *)re + re->name_table_offset;
+md->name_count = re->name_count;
+md->name_entry_size = re->name_entry_size;
/* Fish out the optional data from the extra_data structure, first setting
the default values. */
@@ -4768,7 +6982,9 @@ md->callout_data = NULL;
/* The table pointer is always in native byte order. */
-tables = external_re->tables;
+tables = re->tables;
+
+/* The two limit values override the defaults, whatever their value. */
if (extra_data != NULL)
{
@@ -4790,23 +7006,20 @@ if (extra_data != NULL)
#endif
}
+/* Limits in the regex override only if they are smaller. */
+
+if ((re->flags & PCRE_MLSET) != 0 && re->limit_match < md->match_limit)
+ md->match_limit = re->limit_match;
+
+if ((re->flags & PCRE_RLSET) != 0 &&
+ re->limit_recursion < md->match_limit_recursion)
+ md->match_limit_recursion = re->limit_recursion;
+
/* If the exec call supplied NULL for tables, use the inbuilt ones. This
is a feature that makes it possible to save compiled regex and re-use them
in other programs later. */
-if (tables == NULL) tables = _erts_pcre_default_tables;
-
-/* Check that the first field in the block is the magic number. If it is not,
-test for a regex that was compiled on a host of opposite endianness. If this is
-the case, flipped values are put in internal_re and internal_study if there was
-study data too. */
-
-if (re->magic_number != MAGIC_NUMBER)
- {
- re = _erts_pcre_try_flipped(re, &internal_re, study, &internal_study);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- if (study != NULL) study = &internal_study;
- }
+if (tables == NULL) tables = PRIV(default_tables);
/* Set up other data */
@@ -4816,26 +7029,35 @@ firstline = (re->options & PCRE_FIRSTLINE) != 0;
/* The code starts after the real_pcre block and the capture name table. */
-md->start_code = (const uschar *)external_re + re->name_table_offset +
+md->start_code = (const pcre_uchar *)re + re->name_table_offset +
re->name_count * re->name_entry_size;
-md->start_subject = (USPTR)subject;
+md->start_subject = (PCRE_PUCHAR)subject;
md->start_offset = start_offset;
md->end_subject = md->start_subject + length;
end_subject = md->end_subject;
md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
-utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0;
+md->use_ucp = (re->options & PCRE_UCP) != 0;
+md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
+md->ignore_skip_arg = 0;
+
+/* Some options are unpacked into BOOL variables in the hope that testing
+them will be faster than individual option bits. */
md->notbol = (options & PCRE_NOTBOL) != 0;
md->noteol = (options & PCRE_NOTEOL) != 0;
md->notempty = (options & PCRE_NOTEMPTY) != 0;
-md->partial = (options & PCRE_PARTIAL) != 0;
+md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
+
md->hitend = FALSE;
+md->mark = md->nomatch_mark = NULL; /* In case never set */
md->recursive = NULL; /* No recursion at top level */
+md->hasthen = (re->flags & PCRE_HASTHEN) != 0;
md->lcc = tables + lcc_offset;
+md->fcc = tables + fcc_offset;
md->ctypes = tables + ctypes_offset;
/* Handle different \R options. */
@@ -4871,10 +7093,10 @@ switch ((((options & PCRE_NEWLINE_BITS) == 0)? re->options :
(pcre_uint32)options) & PCRE_NEWLINE_BITS)
{
case 0: newline = NEWLINE; break; /* Compile-time default */
- case PCRE_NEWLINE_CR: newline = '\r'; break;
- case PCRE_NEWLINE_LF: newline = '\n'; break;
+ case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
+ case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
case PCRE_NEWLINE_CR+
- PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;
+ PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
case PCRE_NEWLINE_ANY: newline = -1; break;
case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
default: return PCRE_ERROR_BADNEWLINE;
@@ -4904,79 +7126,50 @@ else
}
}
-/* Partial matching is supported only for a restricted set of regexes at the
-moment. */
+/* Partial matching was originally supported only for a restricted set of
+regexes; from release 8.00 there are no restrictions, but the bits are still
+defined (though never set). So there's no harm in leaving this code. */
if (md->partial && (re->flags & PCRE_NOPARTIAL) != 0)
return PCRE_ERROR_BADPARTIAL;
-/* Check a UTF-8 string if required. Unfortunately there's no way of passing
-back the character offset. */
-
-#ifdef SUPPORT_UTF8
-if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
- {
- if (_erts_pcre_valid_utf8((uschar *)subject, length) >= 0)
- return PCRE_ERROR_BADUTF8;
- if (start_offset > 0 && start_offset < length)
- {
- int tb = ((uschar *)subject)[start_offset];
- if (tb > 127)
- {
- tb &= 0xc0;
- if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET;
- }
- }
- }
-#endif
-
-/* The ims options can vary during the matching as a result of the presence
-of (?ims) items in the pattern. They are kept in a local variable so that
-restoring at the exit of a group is easy. */
-
-ims = re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL);
-
/* If the expression has got more back references than the offsets supplied can
hold, we get a temporary chunk of working store to use during the matching.
Otherwise, we can use the vector supplied, rounding down its size to a multiple
of 3. */
ocount = offsetcount - (offsetcount % 3);
+arg_offset_max = (2*ocount)/3;
if (re->top_backref > 0 && re->top_backref >= ocount/3)
{
ocount = re->top_backref * 3 + 3;
- md->offset_vector = (int *)(erts_pcre_malloc)(ocount * sizeof(int));
+ md->offset_vector = (int *)(PUBL(malloc))(ocount * sizeof(int));
if (md->offset_vector == NULL) return PCRE_ERROR_NOMEMORY;
using_temporary_offsets = TRUE;
DPRINTF(("Got memory to hold back references\n"));
}
else md->offset_vector = offsets;
-
md->offset_end = ocount;
md->offset_max = (2*ocount)/3;
-md->offset_overflow = FALSE;
-md->capture_last = -1;
-
-/* Compute the minimum number of offsets that we need to reset each time. Doing
-this makes a huge difference to execution time when there aren't many brackets
-in the pattern. */
-
-resetcount = 2 + re->top_bracket * 2;
-if (resetcount > offsetcount) resetcount = ocount;
+md->capture_last = 0;
/* Reset the working variable associated with each extraction. These should
never be used unless previously set, but they get saved and restored, and so we
-initialize them to avoid reading uninitialized locations. */
+initialize them to avoid reading uninitialized locations. Also, unset the
+offsets for the matched string. This is really just for tidiness with callouts,
+in case they inspect these fields. */
if (md->offset_vector != NULL)
{
register int *iptr = md->offset_vector + ocount;
- register int *iend = iptr - resetcount/2 + 1;
+ register int *iend = iptr - re->top_bracket;
+ if (iend < md->offset_vector + 2) iend = md->offset_vector + 2;
while (--iptr >= iend) *iptr = -1;
+ md->offset_vector[0] = md->offset_vector[1] = -1;
}
-/* Set up the first character to match, if available. The first_byte value is
+/* Set up the first character to match, if available. The first_char value is
never set for an anchored regular expression, but the anchoring may be forced
at run time, so we have to test for anchoring. The first char may be unset for
an unanchored pattern, of course. If there's no first char and the pattern was
@@ -4986,13 +7179,20 @@ if (!anchored)
{
if ((re->flags & PCRE_FIRSTSET) != 0)
{
- first_byte = re->first_byte & 255;
- if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE)
- first_byte = md->lcc[first_byte];
+ has_first_char = TRUE;
+ first_char = first_char2 = (pcre_uchar)(re->first_char);
+ if ((re->flags & PCRE_FCH_CASELESS) != 0)
+ {
+ first_char2 = TABLE_GET(first_char, md->fcc, first_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && first_char > 127)
+ first_char2 = UCD_OTHERCASE(first_char);
+#endif
+ }
}
else
if (!startline && study != NULL &&
- (study->options & PCRE_STUDY_MAPPED) != 0)
+ (study->flags & PCRE_STUDY_MAPPED) != 0)
start_bits = study->start_bits;
}
@@ -5001,9 +7201,16 @@ character" set. */
if ((re->flags & PCRE_REQCHSET) != 0)
{
- req_byte = re->req_byte & 255;
- req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0;
- req_byte2 = (tables + fcc_offset)[req_byte]; /* case flipped */
+ has_req_char = TRUE;
+ req_char = req_char2 = (pcre_uchar)(re->req_char);
+ if ((re->flags & PCRE_RCH_CASELESS) != 0)
+ {
+ req_char2 = TABLE_GET(req_char, md->fcc, req_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (utf && req_char > 127)
+ req_char2 = UCD_OTHERCASE(req_char);
+#endif
+ }
}
@@ -5014,148 +7221,199 @@ the loop runs just once. */
for(;;)
{
- USPTR save_end_subject = end_subject;
- USPTR new_start_match;
+ PCRE_PUCHAR save_end_subject = end_subject;
+ PCRE_PUCHAR new_start_match;
- /* Reset the maximum number of extractions we might see. */
-
- if (md->offset_vector != NULL)
- {
- register int *iptr = md->offset_vector;
- register int *iend = iptr + resetcount;
- while (iptr < iend) *iptr++ = -1;
- }
-
- /* Advance to a unique first char if possible. If firstline is TRUE, the
- start of the match is constrained to the first line of a multiline string.
- That is, the match must be before or at the first newline. Implement this by
- temporarily adjusting end_subject so that we stop scanning at a newline. If
- the match fails at the newline, later code breaks this loop. */
+ /* If firstline is TRUE, the start of the match is constrained to the first
+ line of a multiline string. That is, the match must be before or at the first
+ newline. Implement this by temporarily adjusting end_subject so that we stop
+ scanning at a newline. If the match fails at the newline, later code breaks
+ this loop. */
if (firstline)
{
- USPTR t = start_match;
+ PCRE_PUCHAR t = start_match;
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ while (t < md->end_subject && !IS_NEWLINE(t))
+ {
+ t++;
+ ACROSSCHAR(t < end_subject, *t, t++);
+ }
+ }
+ else
+#endif
while (t < md->end_subject && !IS_NEWLINE(t)) t++;
end_subject = t;
}
- /* Now test for a unique first byte */
+ /* There are some optimizations that avoid running the match if a known
+ starting point is not found, or if a known later character is not present.
+ However, there is an option that disables these, for testing and for ensuring
+ that all callouts do actually occur. The option can be set in the regex by
+ (*NO_START_OPT) or passed in match-time options. */
- if (first_byte >= 0)
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0)
{
- if (first_byte_caseless)
- while (start_match < end_subject &&
- md->lcc[*start_match] != first_byte)
- { NEXTCHAR(start_match,end_subject); }
- else
- while (start_match < end_subject && *start_match != first_byte)
- { NEXTCHAR(start_match,end_subject); }
- }
-
- /* Or to just after a linebreak for a multiline match if possible */
+ /* Advance to a unique first char if there is one. */
- else if (startline)
- {
- if (start_match > md->start_subject + start_offset)
+ if (has_first_char)
{
- while (start_match <= end_subject && !WAS_NEWLINE(start_match))
- { NEXTCHAR(start_match,end_subject); }
+ pcre_uchar smc;
- /* If we have just passed a CR and the newline option is ANY or ANYCRLF,
- and we are now at a LF, advance the match position by one more character.
- */
+ if (first_char != first_char2)
+ while (start_match < end_subject &&
+ (smc = RAWUCHARTEST(start_match)) != first_char && smc != first_char2)
+ start_match++;
+ else
+ while (start_match < end_subject && RAWUCHARTEST(start_match) != first_char)
+ start_match++;
+ }
+
+ /* Or to just after a linebreak for a multiline match */
- if (start_match <= end_subject && start_match[-1] == '\r' &&
- (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
- start_match < end_subject &&
- *start_match == '\n')
- start_match++;
+ else if (startline)
+ {
+ if (start_match > md->start_subject + start_offset)
+ {
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ {
+ start_match++;
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
+ }
+ }
+ else
+#endif
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ start_match++;
+
+ /* If we have just passed a CR and the newline option is ANY or ANYCRLF,
+ and we are now at a LF, advance the match position by one more character.
+ */
+
+ if (start_match[-1] == CHAR_CR &&
+ (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
+ start_match < end_subject &&
+ RAWUCHARTEST(start_match) == CHAR_NL)
+ start_match++;
+ }
}
- }
- /* Or to a non-unique first char after study */
+ /* Or to a non-unique first byte after study */
- else if (start_bits != NULL)
- {
- while (start_match < end_subject)
+ else if (start_bits != NULL)
{
- register unsigned int c = *start_match;
- if ((start_bits[c/8] & (1 << (c&7))) == 0)
- { NEXTCHAR(start_match,end_subject); }
+ while (start_match < end_subject)
+ {
+ register pcre_uint32 c = RAWUCHARTEST(start_match);
+#ifndef COMPILE_PCRE8
+ if (c > 255) c = 255;
+#endif
+ if ((start_bits[c/8] & (1 << (c&7))) == 0)
+ {
+ start_match++;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ /* In non 8-bit mode, the iteration will stop for
+ characters > 255 at the beginning or not stop at all. */
+ if (utf)
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
+#endif
+ }
#ifdef ERLANG_INTEGRATION
- else {
+ else {
if ((extra_data->flags & PCRE_EXTRA_LOOP_LIMIT) != 0)
{
*extra_data->loop_counter_return =
(extra_data->loop_limit - md->loop_limit);
}
break;
- }
+ }
#else
- else break;
+ else break;
#endif
+ }
}
- }
+ } /* Starting optimizations */
/* Restore fudged end_subject */
end_subject = save_end_subject;
-#ifdef DEBUG /* Sigh. Some compilers never learn. */
- printf(">>>> Match against: ");
- pchars(start_match, end_subject - start_match, TRUE, md);
- printf("\n");
-#endif
+ /* The following two optimizations are disabled for partial matching or if
+ disabling is explicitly requested. */
- /* If req_byte is set, we know that that character must appear in the subject
- for the match to succeed. If the first character is set, req_byte must be
- later in the subject; otherwise the test starts at the match point. This
- optimization can save a huge amount of backtracking in patterns with nested
- unlimited repeats that aren't going to match. Writing separate code for
- cased/caseless versions makes it go faster, as does using an autoincrement
- and backing off on a match.
-
- HOWEVER: when the subject string is very, very long, searching to its end can
- take a long time, and give bad performance on quite ordinary patterns. This
- showed up when somebody was matching something like /^\d+C/ on a 32-megabyte
- string... so we don't do this when the string is sufficiently long.
-
- ALSO: this processing is disabled when partial matching is requested.
- */
-
- if (req_byte >= 0 &&
- end_subject - start_match < REQ_BYTE_MAX &&
- !md->partial)
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
{
- register USPTR p = start_match + ((first_byte >= 0)? 1 : 0);
+ /* If the pattern was studied, a minimum subject length may be set. This is
+ a lower bound; no actual string of that length may actually match the
+ pattern. Although the value is, strictly, in characters, we treat it as
+ bytes to avoid spending too much time in this optimization. */
- /* We don't need to repeat the search if we haven't yet reached the
- place we found it at last time. */
+ if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 &&
+ (pcre_uint32)(end_subject - start_match) < study->minlength)
+ {
+ rc = MATCH_NOMATCH;
+#ifdef ERLANG_INTEGRATION
+ if ((extra_data->flags & PCRE_EXTRA_LOOP_LIMIT) != 0)
+ {
+ *extra_data->loop_counter_return =
+ (extra_data->loop_limit - md->loop_limit);
+ }
+#endif
+ break;
+ }
- if (p > req_byte_ptr)
+ /* If req_char is set, we know that that character must appear in the
+ subject for the match to succeed. If the first character is set, req_char
+ must be later in the subject; otherwise the test starts at the match point.
+ This optimization can save a huge amount of backtracking in patterns with
+ nested unlimited repeats that aren't going to match. Writing separate code
+ for cased/caseless versions makes it go faster, as does using an
+ autoincrement and backing off on a match.
+
+ HOWEVER: when the subject string is very, very long, searching to its end
+ can take a long time, and give bad performance on quite ordinary patterns.
+ This showed up when somebody was matching something like /^\d+C/ on a
+ 32-megabyte string... so we don't do this when the string is sufficiently
+ long. */
+
+ if (has_req_char && end_subject - start_match < REQ_BYTE_MAX)
{
- if (req_byte_caseless)
+ register PCRE_PUCHAR p = start_match + (has_first_char? 1:0);
+
+ /* We don't need to repeat the search if we haven't yet reached the
+ place we found it at last time. */
+
+ if (p > req_char_ptr)
{
- while (p < end_subject)
+ if (req_char != req_char2)
{
- register int pp = *p++;
- if (pp == req_byte || pp == req_byte2) { p--; break; }
+ while (p < end_subject)
+ {
+ register pcre_uint32 pp = RAWUCHARINCTEST(p);
+ if (pp == req_char || pp == req_char2) { p--; break; }
+ }
}
- }
- else
- {
- while (p < end_subject)
+ else
{
- if (*p++ == req_byte) { p--; break; }
+ while (p < end_subject)
+ {
+ if (RAWUCHARINCTEST(p) == req_char) { p--; break; }
+ }
}
- }
- /* If we can't find the required character, break the matching loop,
- forcing a match failure. */
+ /* If we can't find the required character, break the matching loop,
+ forcing a match failure. */
- if (p >= end_subject)
- {
- rc = MATCH_NOMATCH;
+ if (p >= end_subject)
+ {
+ rc = MATCH_NOMATCH;
#ifdef ERLANG_INTEGRATION
if ((extra_data->flags & PCRE_EXTRA_LOOP_LIMIT) != 0)
{
@@ -5163,23 +7421,35 @@ for(;;)
(extra_data->loop_limit - md->loop_limit);
}
#endif
- break;
- }
+ break;
+ }
- /* If we have found the required character, save the point where we
- found it, so that we don't search again next time round the loop if
- the start hasn't passed this character yet. */
+ /* If we have found the required character, save the point where we
+ found it, so that we don't search again next time round the loop if
+ the start hasn't passed this character yet. */
- req_byte_ptr = p;
+ req_char_ptr = p;
+ }
}
}
- /* OK, we can now run the match. */
+#ifdef PCRE_DEBUG /* Sigh. Some compilers never learn. */
+ printf(">>>> Match against: ");
+ pchars(start_match, end_subject - start_match, TRUE, md);
+ printf("\n");
+#endif
+
+ /* OK, we can now run the match. If "hitend" is set afterwards, remember the
+ first starting point for which a partial match was found. */
md->start_match_ptr = start_match;
+ md->start_used_ptr = start_match;
md->match_call_count = 0;
+ md->match_function_type = 0;
+ md->end_offset_top = 0;
+ md->skip_arg_count = 0;
EDEBUGF(("Calling match..."));
- rc = match(start_match, md->start_code, start_match, 2, md, ims, NULL, 0, 0);
+ rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0);
#ifdef ERLANG_INTEGRATION
if ((extra_data->flags & PCRE_EXTRA_LOOP_LIMIT) != 0)
{
@@ -5192,42 +7462,65 @@ for(;;)
return PCRE_ERROR_LOOP_LIMIT;
RESTART_INTERRUPTED:
md->loop_limit = extra_data->loop_limit;
- rc = match(NULL,NULL,NULL,0,md,0,NULL,0,0);
+ rc = match(NULL,NULL,NULL,0,md,NULL,0);
*extra_data->loop_counter_return =
(extra_data->loop_limit - md->loop_limit);
}
md->state_save = NULL; /* So that next call to free_saved... does not crash */
#endif
+ if (md->hitend && start_partial == NULL)
+ {
+ start_partial = md->start_used_ptr;
+ match_partial = start_match;
+ }
switch(rc)
{
+ /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched
+ the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP
+ entirely. The only way we can do that is to re-do the match at the same
+ point, with a flag to force SKIP with an argument to be ignored. Just
+ treating this case as NOMATCH does not work because it does not check other
+ alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */
+
+ case MATCH_SKIP_ARG:
+ new_start_match = start_match;
+ md->ignore_skip_arg = md->skip_arg_count;
+ break;
+
+ /* SKIP passes back the next starting point explicitly, but if it is no
+ greater than the match we have just done, treat it as NOMATCH. */
+
+ case MATCH_SKIP:
+ if (md->start_match_ptr > start_match)
+ {
+ new_start_match = md->start_match_ptr;
+ break;
+ }
+ /* Fall through */
+
/* NOMATCH and PRUNE advance by one character. THEN at this level acts
- exactly like PRUNE. */
+ exactly like PRUNE. Unset ignore SKIP-with-argument. */
case MATCH_NOMATCH:
case MATCH_PRUNE:
case MATCH_THEN:
+ md->ignore_skip_arg = 0;
new_start_match = start_match + 1;
-#ifdef SUPPORT_UTF8
- if (utf8)
- while(new_start_match < end_subject && (*new_start_match & 0xc0) == 0x80)
- new_start_match++;
+#ifdef SUPPORT_UTF
+ if (utf)
+ ACROSSCHAR(new_start_match < end_subject, *new_start_match,
+ new_start_match++);
#endif
break;
- /* SKIP passes back the next starting point explicitly. */
-
- case MATCH_SKIP:
- new_start_match = md->start_match_ptr;
- break;
-
/* COMMIT disables the bumpalong, but otherwise behaves as NOMATCH. */
case MATCH_COMMIT:
rc = MATCH_NOMATCH;
goto ENDLOOP;
- /* Any other return is some kind of error. */
+ /* Any other return is either a match, or some kind of error. */
default:
goto ENDLOOP;
@@ -5255,18 +7548,23 @@ for(;;)
/* If we have just passed a CR and we are now at a LF, and the pattern does
not contain any explicit matches for \r or \n, and the newline option is CRLF
- or ANY or ANYCRLF, advance the match position by one more character. */
+ or ANY or ANYCRLF, advance the match position by one more character. In
+ normal matching start_match will aways be greater than the first position at
+ this stage, but a failed *SKIP can cause a return at the same point, which is
+ why the first test exists. */
- if (start_match[-1] == '\r' &&
+ if (start_match > (PCRE_PUCHAR)subject + start_offset &&
+ start_match[-1] == CHAR_CR &&
start_match < end_subject &&
- *start_match == '\n' &&
+ *start_match == CHAR_NL &&
(re->flags & PCRE_HASCRORLF) == 0 &&
(md->nltype == NLTYPE_ANY ||
md->nltype == NLTYPE_ANYCRLF ||
md->nllen == 2))
start_match++;
- } /* End of for(;;) "bumpalong" loop */
+ md->mark = NULL; /* Reset for start of next match attempt */
+ } /* End of for(;;) "bumpalong" loop */
/* ==========================================================================*/
@@ -5290,32 +7588,49 @@ capturing parentheses than vector slots. */
ENDLOOP:
-if (rc == MATCH_MATCH)
+if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
{
if (using_temporary_offsets)
{
- if (offsetcount >= 4)
+ if (arg_offset_max >= 4)
{
memcpy(offsets + 2, md->offset_vector + 2,
- (offsetcount - 2) * sizeof(int));
+ (arg_offset_max - 2) * sizeof(int));
DPRINTF(("Copied offsets from temporary memory\n"));
}
- if (md->end_offset_top > offsetcount) md->offset_overflow = TRUE;
+ if (md->end_offset_top > arg_offset_max) md->capture_last |= OVFLBIT;
DPRINTF(("Freeing temporary memory\n"));
+ (PUBL(free))(md->offset_vector);
#ifdef ERLANG_INTEGRATION
- if (extra_data == NULL ||
- !(extra_data->flags & PCRE_EXTRA_LOOP_LIMIT)) {
- (erts_pcre_free)(md->offset_vector);
- }
-#else
- (erts_pcre_free)(md->offset_vector);
+ md->offset_vector = NULL;
#endif
}
- /* Set the return code to the number of captured strings, or 0 if there are
+ /* Set the return code to the number of captured strings, or 0 if there were
too many to fit into the vector. */
- rc = md->offset_overflow? 0 : md->end_offset_top/2;
+ rc = ((md->capture_last & OVFLBIT) != 0 &&
+ md->end_offset_top >= arg_offset_max)?
+ 0 : md->end_offset_top/2;
+
+ /* If there is space in the offset vector, set any unused pairs at the end of
+ the pattern to -1 for backwards compatibility. It is documented that this
+ happens. In earlier versions, the whole set of potential capturing offsets
+ was set to -1 each time round the loop, but this is handled differently now.
+ "Gaps" are set to -1 dynamically instead (this fixes a bug). Thus, it is only
+ those at the end that need unsetting here. We can't just unset them all at
+ the start of the whole thing because they may get set in one branch that is
+ not the final matching branch. */
+
+ if (md->end_offset_top/2 <= re->top_bracket && offsets != NULL)
+ {
+ register int *iptr, *iend;
+ int resetcount = 2 + re->top_bracket * 2;
+ if (resetcount > offsetcount) resetcount = offsetcount;
+ iptr = offsets + md->end_offset_top;
+ iend = offsets + resetcount;
+ while (iptr < iend) *iptr++ = -1;
+ }
/* If there is space, set up the whole thing as substring 0. The value of
md->start_match_ptr might be modified if \K was encountered on the success
@@ -5323,11 +7638,18 @@ if (rc == MATCH_MATCH)
if (offsetcount < 2) rc = 0; else
{
- offsets[0] = md->start_match_ptr - md->start_subject;
- offsets[1] = md->end_match_ptr - md->start_subject;
+ offsets[0] = (int)(md->start_match_ptr - md->start_subject);
+ offsets[1] = (int)(md->end_match_ptr - md->start_subject);
}
+ /* Return MARK data if requested */
+
+ if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
+ *(extra_data->mark) = (pcre_uchar *)md->mark;
DPRINTF((">>>> returning %d\n", rc));
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
return rc;
}
@@ -5337,44 +7659,82 @@ attempt has failed at all permitted starting positions. */
if (using_temporary_offsets)
{
DPRINTF(("Freeing temporary memory\n"));
- (erts_pcre_free)(md->offset_vector);
+#ifdef ERLANG_INTEGRATION
+ if (extra_data == NULL ||
+ !(extra_data->flags & PCRE_EXTRA_LOOP_LIMIT))
+ {
+ (PUBL(free))(md->offset_vector);
+ md->offset_vector = NULL;
+ }
+#else
+ (PUBL(free))(md->offset_vector);
+#endif
}
-if (rc != MATCH_NOMATCH)
+/* For anything other than nomatch or partial match, just return the code. */
+
+if (rc != MATCH_NOMATCH && rc != PCRE_ERROR_PARTIAL)
{
DPRINTF((">>>> error: returning %d\n", rc));
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
return rc;
}
-else if (md->partial && md->hitend)
+
+/* Handle partial matches - disable any mark data */
+
+if (start_partial != NULL)
{
DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n"));
- return PCRE_ERROR_PARTIAL;
+ md->mark = NULL;
+ if (offsetcount > 1)
+ {
+ offsets[0] = (int)(start_partial - (PCRE_PUCHAR)subject);
+ offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
+ if (offsetcount > 2)
+ offsets[2] = (int)(match_partial - (PCRE_PUCHAR)subject);
+ }
+ rc = PCRE_ERROR_PARTIAL;
}
+
+/* This is the classic nomatch case */
+
else
{
DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n"));
- return PCRE_ERROR_NOMATCH;
+ rc = PCRE_ERROR_NOMATCH;
}
+
+/* Return the MARK data if it has been requested. */
+
+if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
+ *(extra_data->mark) = (pcre_uchar *)md->nomatch_mark;
+#ifdef NO_RECURSE
+ release_match_heapframes(&frame_zero);
+#endif
+return rc;
}
-#ifdef ERLANG_INTEGRATION
-#undef resetcount
-#undef req_byte2
-#undef using_temporary_offsets
-#undef anchored
-#undef startline
-#undef firstline
-#undef first_byte_caseless
-#undef req_byte_caseless
-#undef match_block
-#undef md
-#undef start_match
-#undef req_byte_ptr
-#undef internal_study
-#undef study
-#undef internal_re
-#undef external_re
-#undef re
-#undef ims
+
+#if defined(ERLANG_INTEGRATION)
+#undef arg_offset_max
+#undef using_temporary_offsets
+#undef anchored
+#undef startline
+#undef firstline
+#undef has_first_char
+#undef has_req_char
+#undef first_char2
+#undef req_char
+#undef req_char2
+#undef match_block
+#undef md
+#undef start_match
+#undef start_partial
+#undef match_partial
+#undef study
+#undef re
+#undef frame_zero
void erts_pcre_free_restart_data(void *restart_data) {
PcreExecContext *top = (PcreExecContext *) restart_data;
@@ -5382,12 +7742,11 @@ void erts_pcre_free_restart_data(void *restart_data) {
if (top != NULL) {
match_data *md = top->Xmd;
if (top->Xusing_temporary_offsets && md->offset_vector != NULL) {
- (erts_pcre_free)(md->offset_vector);
+ (PUBL(free))(md->offset_vector);
}
- free_saved_match_state(top->Xmd->state_save);
- (erts_pcre_free)(top);
+ release_match_heapframes(&(top->Xframe_zero));
+ (PUBL(free))(top);
}
}
#endif
-
/* End of pcre_exec.c */
diff --git a/erts/emulator/pcre/pcre_fullinfo.c b/erts/emulator/pcre/pcre_fullinfo.c
index 559c4e27b4..1636c5978f 100644
--- a/erts/emulator/pcre/pcre_fullinfo.c
+++ b/erts/emulator/pcre/pcre_fullinfo.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_fullinfo(), which returns
+/* This module contains the external function pcre_fullinfo(), which returns
information about a compiled pattern. */
/* %ExternalCopyright% */
@@ -66,13 +66,27 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
-PCRE_EXP_DEFN int
-erts_pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
- void *where)
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_fullinfo(const pcre *argument_re, const erts_pcre_extra *extra_data,
+ int what, void *where)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data,
+ int what, void *where)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_fullinfo(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ int what, void *where)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_fullinfo(const pcre32 *argument_re, const pcre32_extra *extra_data,
+ int what, void *where)
+#endif
{
-real_pcre internal_re;
-pcre_study_data internal_study;
-const real_pcre *re = (const real_pcre *)argument_re;
+const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
const pcre_study_data *study = NULL;
if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
@@ -80,17 +94,23 @@ if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
study = (const pcre_study_data *)extra_data->study_data;
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
+REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
+means that the pattern is likely compiled with different endianness. */
+
if (re->magic_number != MAGIC_NUMBER)
- {
- re = _erts_pcre_try_flipped(re, &internal_re, study, &internal_study);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- if (study != NULL) study = &internal_study;
- }
+ return re->magic_number == REVERSED_MAGIC_NUMBER?
+ PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+
+/* Check that this pattern was compiled in the correct bit mode */
+
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
switch (what)
{
case PCRE_INFO_OPTIONS:
- *((unsigned long int *)where) = re->options & PUBLIC_OPTIONS;
+ *((unsigned long int *)where) = re->options & PUBLIC_COMPILE_OPTIONS;
break;
case PCRE_INFO_SIZE:
@@ -101,6 +121,18 @@ switch (what)
*((size_t *)where) = (study == NULL)? 0 : study->size;
break;
+ case PCRE_INFO_JITSIZE:
+#ifdef SUPPORT_JIT
+ *((size_t *)where) =
+ (extra_data != NULL &&
+ (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra_data->executable_jit != NULL)?
+ PRIV(jit_get_size)(extra_data->executable_jit) : 0;
+#else
+ *((size_t *)where) = 0;
+#endif
+ break;
+
case PCRE_INFO_CAPTURECOUNT:
*((int *)where) = re->top_bracket;
break;
@@ -111,24 +143,57 @@ switch (what)
case PCRE_INFO_FIRSTBYTE:
*((int *)where) =
- ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
+ ((re->flags & PCRE_FIRSTSET) != 0)? (int)re->first_char :
((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
break;
+ case PCRE_INFO_FIRSTCHARACTER:
+ *((pcre_uint32 *)where) =
+ (re->flags & PCRE_FIRSTSET) != 0 ? re->first_char : 0;
+ break;
+
+ case PCRE_INFO_FIRSTCHARACTERFLAGS:
+ *((int *)where) =
+ ((re->flags & PCRE_FIRSTSET) != 0) ? 1 :
+ ((re->flags & PCRE_STARTLINE) != 0) ? 2 : 0;
+ break;
+
/* Make sure we pass back the pointer to the bit vector in the external
block, not the internal copy (with flipped integer fields). */
case PCRE_INFO_FIRSTTABLE:
- *((const uschar **)where) =
- (study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)?
+ *((const pcre_uint8 **)where) =
+ (study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)?
((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
break;
+ case PCRE_INFO_MINLENGTH:
+ *((int *)where) =
+ (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)?
+ (int)(study->minlength) : -1;
+ break;
+
+ case PCRE_INFO_JIT:
+ *((int *)where) = extra_data != NULL &&
+ (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra_data->executable_jit != NULL;
+ break;
+
case PCRE_INFO_LASTLITERAL:
*((int *)where) =
- ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;
+ ((re->flags & PCRE_REQCHSET) != 0)? (int)re->req_char : -1;
break;
+ case PCRE_INFO_REQUIREDCHAR:
+ *((pcre_uint32 *)where) =
+ ((re->flags & PCRE_REQCHSET) != 0) ? re->req_char : 0;
+ break;
+
+ case PCRE_INFO_REQUIREDCHARFLAGS:
+ *((int *)where) =
+ ((re->flags & PCRE_REQCHSET) != 0);
+ break;
+
case PCRE_INFO_NAMEENTRYSIZE:
*((int *)where) = re->name_entry_size;
break;
@@ -138,13 +203,16 @@ switch (what)
break;
case PCRE_INFO_NAMETABLE:
- *((const uschar **)where) = (const uschar *)re + re->name_table_offset;
+ *((const pcre_uchar **)where) = (const pcre_uchar *)re + re->name_table_offset;
break;
case PCRE_INFO_DEFAULT_TABLES:
- *((const uschar **)where) = (const uschar *)(_erts_pcre_default_tables);
+ *((const pcre_uint8 **)where) = (const pcre_uint8 *)(PRIV(default_tables));
break;
+ /* From release 8.00 this will always return TRUE because NOPARTIAL is
+ no longer ever set (the restrictions have been removed). */
+
case PCRE_INFO_OKPARTIAL:
*((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
break;
@@ -157,6 +225,20 @@ switch (what)
*((int *)where) = (re->flags & PCRE_HASCRORLF) != 0;
break;
+ case PCRE_INFO_MAXLOOKBEHIND:
+ *((int *)where) = re->max_lookbehind;
+ break;
+
+ case PCRE_INFO_MATCHLIMIT:
+ if ((re->flags & PCRE_MLSET) == 0) return PCRE_ERROR_UNSET;
+ *((pcre_uint32 *)where) = re->limit_match;
+ break;
+
+ case PCRE_INFO_RECURSIONLIMIT:
+ if ((re->flags & PCRE_RLSET) == 0) return PCRE_ERROR_UNSET;
+ *((pcre_uint32 *)where) = re->limit_recursion;
+ break;
+
default: return PCRE_ERROR_BADOPTION;
}
diff --git a/erts/emulator/pcre/pcre_get.c b/erts/emulator/pcre/pcre_get.c
index 0bfd2e19a3..c0bb21bbbf 100644
--- a/erts/emulator/pcre/pcre_get.c
+++ b/erts/emulator/pcre/pcre_get.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -66,14 +66,29 @@ Returns: the number of the named parentheses, or a negative number
(PCRE_ERROR_NOSUBSTRING) if not found
*/
-int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_get_stringnumber(const pcre *code, const char *stringname)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_get_stringnumber(const pcre *code, const char *stringname)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_stringnumber(const pcre16 *code, PCRE_SPTR16 stringname)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_get_stringnumber(const pcre32 *code, PCRE_SPTR32 stringname)
+#endif
{
int rc;
int entrysize;
int top, bot;
-uschar *nametable;
+pcre_uchar *nametable;
+#ifdef COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
return rc;
if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
@@ -82,14 +97,46 @@ if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) !
return rc;
if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
return rc;
+#else
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
+#endif
+#ifdef COMPILE_PCRE16
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
+#ifdef COMPILE_PCRE32
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
bot = 0;
while (top > bot)
{
int mid = (top + bot) / 2;
- uschar *entry = nametable + entrysize*mid;
- int c = strcmp(stringname, (char *)(entry + 2));
- if (c == 0) return (entry[0] << 8) + entry[1];
+ pcre_uchar *entry = nametable + entrysize*mid;
+ int c = STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(entry + IMM2_SIZE));
+ if (c == 0) return GET2(entry, 0);
if (c > 0) bot = mid + 1; else top = mid;
}
@@ -115,15 +162,33 @@ Returns: the length of each entry, or a negative number
(PCRE_ERROR_NOSUBSTRING) if not found
*/
-int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_get_stringtable_entries(const pcre *code, const char *stringname,
char **firstptr, char **lastptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_get_stringtable_entries(const pcre *code, const char *stringname,
+ char **firstptr, char **lastptr)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_stringtable_entries(const pcre16 *code, PCRE_SPTR16 stringname,
+ PCRE_UCHAR16 **firstptr, PCRE_UCHAR16 **lastptr)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_get_stringtable_entries(const pcre32 *code, PCRE_SPTR32 stringname,
+ PCRE_UCHAR32 **firstptr, PCRE_UCHAR32 **lastptr)
+#endif
{
int rc;
int entrysize;
int top, bot;
-uschar *nametable, *lastentry;
+pcre_uchar *nametable, *lastentry;
+#ifdef COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
return rc;
if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
@@ -132,30 +197,72 @@ if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) !
return rc;
if ((rc = erts_pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
return rc;
+#else
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
+#endif
+#ifdef COMPILE_PCRE16
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
+#ifdef COMPILE_PCRE32
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+#endif
lastentry = nametable + entrysize * (top - 1);
bot = 0;
while (top > bot)
{
int mid = (top + bot) / 2;
- uschar *entry = nametable + entrysize*mid;
- int c = strcmp(stringname, (char *)(entry + 2));
+ pcre_uchar *entry = nametable + entrysize*mid;
+ int c = STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(entry + IMM2_SIZE));
if (c == 0)
{
- uschar *first = entry;
- uschar *last = entry;
+ pcre_uchar *first = entry;
+ pcre_uchar *last = entry;
while (first > nametable)
{
- if (strcmp(stringname, (char *)(first - entrysize + 2)) != 0) break;
+ if (STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(first - entrysize + IMM2_SIZE)) != 0) break;
first -= entrysize;
}
while (last < lastentry)
{
- if (strcmp(stringname, (char *)(last + entrysize + 2)) != 0) break;
+ if (STRCMP_UC_UC((pcre_uchar *)stringname,
+ (pcre_uchar *)(last + entrysize + IMM2_SIZE)) != 0) break;
last += entrysize;
}
+#if defined COMPILE_PCRE8
*firstptr = (char *)first;
*lastptr = (char *)last;
+#elif defined COMPILE_PCRE16
+ *firstptr = (PCRE_UCHAR16 *)first;
+ *lastptr = (PCRE_UCHAR16 *)last;
+#elif defined COMPILE_PCRE32
+ *firstptr = (PCRE_UCHAR32 *)first;
+ *lastptr = (PCRE_UCHAR32 *)last;
+#endif
return entrysize;
}
if (c > 0) bot = mid + 1; else top = mid;
@@ -183,23 +290,54 @@ Returns: the number of the first that is set,
or a negative number on error
*/
+#if defined COMPILE_PCRE8
static int
get_first_set(const pcre *code, const char *stringname, int *ovector)
+#elif defined COMPILE_PCRE16
+static int
+get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
+#elif defined COMPILE_PCRE32
+static int
+get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector)
+#endif
{
-const real_pcre *re = (const real_pcre *)code;
+const REAL_PCRE *re = (const REAL_PCRE *)code;
int entrysize;
+pcre_uchar *entry;
+#if defined COMPILE_PCRE8
char *first, *last;
-uschar *entry;
+#elif defined COMPILE_PCRE16
+PCRE_UCHAR16 *first, *last;
+#elif defined COMPILE_PCRE32
+PCRE_UCHAR32 *first, *last;
+#endif
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
return erts_pcre_get_stringnumber(code, stringname);
entrysize = erts_pcre_get_stringtable_entries(code, stringname, &first, &last);
+#else
+if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
+ return pcre_get_stringnumber(code, stringname);
+entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
+#endif
+#elif defined COMPILE_PCRE16
+if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
+ return pcre16_get_stringnumber(code, stringname);
+entrysize = pcre16_get_stringtable_entries(code, stringname, &first, &last);
+#elif defined COMPILE_PCRE32
+if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
+ return pcre32_get_stringnumber(code, stringname);
+entrysize = pcre32_get_stringtable_entries(code, stringname, &first, &last);
+#endif
if (entrysize <= 0) return entrysize;
-for (entry = (uschar *)first; entry <= (uschar *)last; entry += entrysize)
+for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
{
- int n = (entry[0] << 8) + entry[1];
+ int n = GET2(entry, 0);
if (ovector[n*2] >= 0) return n;
}
-return (first[0] << 8) + first[1];
+return GET2(entry, 0);
}
@@ -232,9 +370,25 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
-int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_copy_substring(const char *subject, int *ovector, int stringcount,
int stringnumber, char *buffer, int size)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_copy_substring(const char *subject, int *ovector, int stringcount,
+ int stringnumber, char *buffer, int size)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_UCHAR16 *buffer, int size)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_copy_substring(PCRE_SPTR32 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_UCHAR32 *buffer, int size)
+#endif
{
int yield;
if (stringnumber < 0 || stringnumber >= stringcount)
@@ -242,7 +396,7 @@ if (stringnumber < 0 || stringnumber >= stringcount)
stringnumber *= 2;
yield = ovector[stringnumber+1] - ovector[stringnumber];
if (size < yield + 1) return PCRE_ERROR_NOMEMORY;
-memcpy(buffer, subject + ovector[stringnumber], yield);
+memcpy(buffer, subject + ovector[stringnumber], IN_UCHARS(yield));
buffer[yield] = 0;
return yield;
}
@@ -277,13 +431,43 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
-int
-erts_pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector,
- int stringcount, const char *stringname, char *buffer, int size)
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_copy_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ char *buffer, int size)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_copy_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ char *buffer, int size)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_copy_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
+ int *ovector, int stringcount, PCRE_SPTR16 stringname,
+ PCRE_UCHAR16 *buffer, int size)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_copy_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+ int *ovector, int stringcount, PCRE_SPTR32 stringname,
+ PCRE_UCHAR32 *buffer, int size)
+#endif
{
int n = get_first_set(code, stringname, ovector);
if (n <= 0) return n;
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
return erts_pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#else
+return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#endif
+#elif defined COMPILE_PCRE16
+return pcre16_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#elif defined COMPILE_PCRE32
+return pcre32_copy_substring(subject, ovector, stringcount, n, buffer, size);
+#endif
}
@@ -309,29 +493,51 @@ Returns: if successful: 0
PCRE_ERROR_NOMEMORY (-6) failed to get store
*/
-int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
const char ***listptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
+ const char ***listptr)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_substring_list(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ PCRE_SPTR16 **listptr)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_get_substring_list(PCRE_SPTR32 subject, int *ovector, int stringcount,
+ PCRE_SPTR32 **listptr)
+#endif
{
int i;
-int size = sizeof(char *);
+int size = sizeof(pcre_uchar *);
int double_count = stringcount * 2;
-char **stringlist;
-char *p;
+pcre_uchar **stringlist;
+pcre_uchar *p;
for (i = 0; i < double_count; i += 2)
- size += sizeof(char *) + ovector[i+1] - ovector[i] + 1;
+ size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
-stringlist = (char **)(erts_pcre_malloc)(size);
+stringlist = (pcre_uchar **)(PUBL(malloc))(size);
if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
+#if defined COMPILE_PCRE8
*listptr = (const char **)stringlist;
-p = (char *)(stringlist + stringcount + 1);
+#elif defined COMPILE_PCRE16
+*listptr = (PCRE_SPTR16 *)stringlist;
+#elif defined COMPILE_PCRE32
+*listptr = (PCRE_SPTR32 *)stringlist;
+#endif
+p = (pcre_uchar *)(stringlist + stringcount + 1);
for (i = 0; i < double_count; i += 2)
{
int len = ovector[i+1] - ovector[i];
- memcpy(p, subject + ovector[i], len);
+ memcpy(p, subject + ovector[i], IN_UCHARS(len));
*stringlist++ = p;
p += len;
*p++ = 0;
@@ -348,16 +554,30 @@ return 0;
*************************************************/
/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (erts_pcre_free)() directly.
+programs that can call its functions, but not free() or (PUBL(free))()
+directly.
-Argument: the result of a previous erts_pcre_get_substring_list()
+Argument: the result of a previous pcre_get_substring_list()
Returns: nothing
*/
-void
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
erts_pcre_free_substring_list(const char **pointer)
+#else
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre_free_substring_list(const char **pointer)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre16_free_substring_list(PCRE_SPTR16 *pointer)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre32_free_substring_list(PCRE_SPTR32 *pointer)
+#endif
{
-(erts_pcre_free)((void *)pointer);
+(PUBL(free))((void *)pointer);
}
@@ -387,21 +607,43 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) substring not present
*/
-int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_get_substring(const char *subject, int *ovector, int stringcount,
int stringnumber, const char **stringptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_get_substring(const char *subject, int *ovector, int stringcount,
+ int stringnumber, const char **stringptr)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_SPTR16 *stringptr)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_get_substring(PCRE_SPTR32 subject, int *ovector, int stringcount,
+ int stringnumber, PCRE_SPTR32 *stringptr)
+#endif
{
int yield;
-char *substring;
+pcre_uchar *substring;
if (stringnumber < 0 || stringnumber >= stringcount)
return PCRE_ERROR_NOSUBSTRING;
stringnumber *= 2;
yield = ovector[stringnumber+1] - ovector[stringnumber];
-substring = (char *)(erts_pcre_malloc)(yield + 1);
+substring = (pcre_uchar *)(PUBL(malloc))(IN_UCHARS(yield + 1));
if (substring == NULL) return PCRE_ERROR_NOMEMORY;
-memcpy(substring, subject + ovector[stringnumber], yield);
+memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield));
substring[yield] = 0;
-*stringptr = substring;
+#if defined COMPILE_PCRE8
+*stringptr = (const char *)substring;
+#elif defined COMPILE_PCRE16
+*stringptr = (PCRE_SPTR16)substring;
+#elif defined COMPILE_PCRE32
+*stringptr = (PCRE_SPTR32)substring;
+#endif
return yield;
}
@@ -434,13 +676,43 @@ Returns: if successful:
PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
*/
-int
-erts_pcre_get_named_substring(const pcre *code, const char *subject, int *ovector,
- int stringcount, const char *stringname, const char **stringptr)
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_get_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ const char **stringptr)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_get_named_substring(const pcre *code, const char *subject,
+ int *ovector, int stringcount, const char *stringname,
+ const char **stringptr)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_get_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
+ int *ovector, int stringcount, PCRE_SPTR16 stringname,
+ PCRE_SPTR16 *stringptr)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_get_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+ int *ovector, int stringcount, PCRE_SPTR32 stringname,
+ PCRE_SPTR32 *stringptr)
+#endif
{
int n = get_first_set(code, stringname, ovector);
if (n <= 0) return n;
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
return erts_pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+#else
+return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+#endif
+#elif defined COMPILE_PCRE16
+return pcre16_get_substring(subject, ovector, stringcount, n, stringptr);
+#elif defined COMPILE_PCRE32
+return pcre32_get_substring(subject, ovector, stringcount, n, stringptr);
+#endif
}
@@ -451,16 +723,30 @@ return erts_pcre_get_substring(subject, ovector, stringcount, n, stringptr);
*************************************************/
/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (erts_pcre_free)() directly.
+programs that can call its functions, but not free() or (PUBL(free))()
+directly.
-Argument: the result of a previous erts_pcre_get_substring()
+Argument: the result of a previous pcre_get_substring()
Returns: nothing
*/
-void
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
erts_pcre_free_substring(const char *pointer)
+#else
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre_free_substring(const char *pointer)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre16_free_substring(PCRE_SPTR16 pointer)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
+pcre32_free_substring(PCRE_SPTR32 pointer)
+#endif
{
-(erts_pcre_free)((void *)pointer);
+(PUBL(free))((void *)pointer);
}
/* End of pcre_get.c */
diff --git a/erts/emulator/pcre/pcre_globals.c b/erts/emulator/pcre/pcre_globals.c
index 1dd8d81714..ce143b8c21 100644
--- a/erts/emulator/pcre/pcre_globals.c
+++ b/erts/emulator/pcre/pcre_globals.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -43,8 +43,14 @@ PCRE is thread-clean and doesn't use any global variables in the normal sense.
However, it calls memory allocation and freeing functions via the four
indirections below, and it can optionally do callouts, using the fifth
indirection. These values can be changed by the caller, but are shared between
-all threads. However, when compiling for Virtual Pascal, things are done
-differently, and global variables are not used (see pcre.in). */
+all threads.
+
+For MS Visual Studio and Symbian OS, there are problems in initializing these
+variables to non-local functions. In these cases, therefore, an indirection via
+a local function is used.
+
+Also, when compiling for Virtual Pascal, things are done differently, and
+global variables are not used. */
/* %ExternalCopyright% */
@@ -54,12 +60,27 @@ differently, and global variables are not used (see pcre.in). */
#include "pcre_internal.h"
-#ifndef VPCOMPAT
-PCRE_EXP_DATA_DEFN void *(*erts_pcre_malloc)(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void (*erts_pcre_free)(void *) = free;
-PCRE_EXP_DATA_DEFN void *(*erts_pcre_stack_malloc)(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void (*erts_pcre_stack_free)(void *) = free;
-PCRE_EXP_DATA_DEFN int (*erts_pcre_callout)(pcre_callout_block *) = NULL;
+#if defined _MSC_VER || defined __SYMBIAN32__
+static void* LocalPcreMalloc(size_t aSize)
+ {
+ return malloc(aSize);
+ }
+static void LocalPcreFree(void* aPtr)
+ {
+ free(aPtr);
+ }
+PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = LocalPcreMalloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = LocalPcreFree;
+PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree;
+PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
+
+#elif !defined VPCOMPAT
+PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = free;
+PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc;
+PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free;
+PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
#endif
/* End of pcre_globals.c */
diff --git a/erts/emulator/pcre/pcre_info.c b/erts/emulator/pcre/pcre_info.c
deleted file mode 100644
index 86e957b0cc..0000000000
--- a/erts/emulator/pcre/pcre_info.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function erts_pcre_info(), which gives some
-information about a compiled pattern. However, use of this function is now
-deprecated, as it has been superseded by pcre_fullinfo(). */
-
-/* %ExternalCopyright% */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-* (Obsolete) Return info about compiled pattern *
-*************************************************/
-
-/* This is the original "info" function. It picks potentially useful data out
-of the private structure, but its interface was too rigid. It remains for
-backwards compatibility. The public options are passed back in an int - though
-the re->options field has been expanded to a long int, all the public options
-at the low end of it, and so even on 16-bit systems this will still be OK.
-Therefore, I haven't changed the API for erts_pcre_info().
-
-Arguments:
- argument_re points to compiled code
- optptr where to pass back the options
- first_byte where to pass back the first character,
- or -1 if multiline and all branches start ^,
- or -2 otherwise
-
-Returns: number of capturing subpatterns
- or negative values on error
-*/
-
-PCRE_EXP_DEFN int
-erts_pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
-{
-real_pcre internal_re;
-const real_pcre *re = (const real_pcre *)argument_re;
-if (re == NULL) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER)
- {
- re = _erts_pcre_try_flipped(re, &internal_re, NULL, NULL);
- if (re == NULL) return PCRE_ERROR_BADMAGIC;
- }
-if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);
-if (first_byte != NULL)
- *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
- ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
-return re->top_bracket;
-}
-
-/* End of pcre_info.c */
diff --git a/erts/emulator/pcre/pcre_internal.h b/erts/emulator/pcre/pcre_internal.h
index 6aafabb0c9..af436bd99b 100644
--- a/erts/emulator/pcre/pcre_internal.h
+++ b/erts/emulator/pcre/pcre_internal.h
@@ -7,7 +7,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,8 @@ POSSIBILITY OF SUCH DAMAGE.
/* This header contains definitions that are shared between the different
modules, but which are not relevant to the exported API. This includes some
-functions whose names all begin with "_erts_pcre_". */
+functions whose names all begin with "_pcre_", "_pcre16_" or "_pcre32_"
+depending on the PRIV macro. */
/* %ExternalCopyright% */
@@ -51,10 +52,44 @@ functions whose names all begin with "_erts_pcre_". */
#include "local_config.h"
#endif
-/* Define DEBUG to get debugging output on stdout. */
+/* Define PCRE_DEBUG to get debugging output on stdout. */
#if 0
-#define DEBUG
+#define PCRE_DEBUG
+#endif
+
+/* PCRE is compiled as an 8 bit library if it is not requested otherwise. */
+
+#if !defined COMPILE_PCRE16 && !defined COMPILE_PCRE32
+#define COMPILE_PCRE8
+#endif
+
+/* If SUPPORT_UCP is defined, SUPPORT_UTF must also be defined. The
+"configure" script ensures this, but not everybody uses "configure". */
+
+#if defined SUPPORT_UCP && !(defined SUPPORT_UTF)
+#define SUPPORT_UTF 1
+#endif
+
+/* We define SUPPORT_UTF if SUPPORT_UTF8 is enabled for compatibility
+reasons with existing code. */
+
+#if defined SUPPORT_UTF8 && !(defined SUPPORT_UTF)
+#define SUPPORT_UTF 1
+#endif
+
+/* Fixme: SUPPORT_UTF8 should be eventually disappear from the code.
+Until then we define it if SUPPORT_UTF is defined. */
+
+#if defined SUPPORT_UTF && !(defined SUPPORT_UTF8)
+#define SUPPORT_UTF8 1
+#endif
+
+/* We do not support both EBCDIC and UTF-8/16/32 at the same time. The "configure"
+script prevents both being selected, but not everybody uses "configure". */
+
+#if defined EBCDIC && defined SUPPORT_UTF
+#error The use of both EBCDIC and SUPPORT_UTF is not supported.
#endif
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
@@ -66,7 +101,7 @@ It turns out that the Mac Debugging.h header also defines the macro DPRINTF, so
be absolutely sure we get our version. */
#undef DPRINTF
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
#define DPRINTF(p) printf p
#else
#define DPRINTF(p) /* Nothing */
@@ -78,13 +113,17 @@ setjmp and stdarg are used is when NO_RECURSE is set. */
#include <ctype.h>
#include <limits.h>
-#include <setjmp.h>
-#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+/* Valgrind (memcheck) support */
+
+#ifdef SUPPORT_VALGRIND
+#include <valgrind/memcheck.h>
+#endif
+
/* When compiling a DLL for Windows, the exported symbols have to be declared
using some MS magic. I found some useful information on this web page:
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
@@ -138,36 +177,125 @@ PCRE_EXP_DATA_DEFN only if they are not already set. */
# endif
#endif
-/* We need to have types that specify unsigned 16-bit and 32-bit integers. We
+/* When compiling with the MSVC compiler, it is sometimes necessary to include
+a "calling convention" before exported function names. (This is secondhand
+information; I know nothing about MSVC myself). For example, something like
+
+ void __cdecl function(....)
+
+might be needed. In order so make this easy, all the exported functions have
+PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not
+set, we ensure here that it has no effect. */
+
+#ifndef PCRE_CALL_CONVENTION
+#define PCRE_CALL_CONVENTION
+#endif
+
+/* We need to have types that specify unsigned 8, 16 and 32-bit integers. We
cannot determine these outside the compilation (e.g. by running a program as
part of "configure") because PCRE is often cross-compiled for use on other
systems. Instead we make use of the maximum sizes that are available at
preprocessor time in standard C environments. */
+typedef unsigned char pcre_uint8;
+
#if USHRT_MAX == 65535
- typedef unsigned short pcre_uint16;
+typedef unsigned short pcre_uint16;
+typedef short pcre_int16;
+#define PCRE_UINT16_MAX USHRT_MAX
+#define PCRE_INT16_MAX SHRT_MAX
#elif UINT_MAX == 65535
- typedef unsigned int pcre_uint16;
+typedef unsigned int pcre_uint16;
+typedef int pcre_int16;
+#define PCRE_UINT16_MAX UINT_MAX
+#define PCRE_INT16_MAX INT_MAX
+#else
+#error Cannot determine a type for 16-bit integers
+#endif
+
+#if UINT_MAX == 4294967295U
+typedef unsigned int pcre_uint32;
+typedef int pcre_int32;
+#define PCRE_UINT32_MAX UINT_MAX
+#define PCRE_INT32_MAX INT_MAX
+#elif ULONG_MAX == 4294967295UL
+typedef unsigned long int pcre_uint32;
+typedef long int pcre_int32;
+#define PCRE_UINT32_MAX ULONG_MAX
+#define PCRE_INT32_MAX LONG_MAX
#else
- #error Cannot determine a type for 16-bit unsigned integers
+#error Cannot determine a type for 32-bit integers
+#endif
+
+/* When checking for integer overflow in pcre_compile(), we need to handle
+large integers. If a 64-bit integer type is available, we can use that.
+Otherwise we have to cast to double, which of course requires floating point
+arithmetic. Handle this by defining a macro for the appropriate type. If
+stdint.h is available, include it; it may define INT64_MAX. Systems that do not
+have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
+by "configure". */
+
+#if defined HAVE_STDINT_H
+#include <stdint.h>
+#elif defined HAVE_INTTYPES_H
+#include <inttypes.h>
#endif
-#if UINT_MAX == 4294967295
- typedef unsigned int pcre_uint32;
-#elif ULONG_MAX == 4294967295
- typedef unsigned long int pcre_uint32;
+#if defined INT64_MAX || defined int64_t
+#define INT64_OR_DOUBLE int64_t
#else
- #error Cannot determine a type for 32-bit unsigned integers
+#define INT64_OR_DOUBLE double
#endif
/* All character handling must be done as unsigned characters. Otherwise there
are problems with top-bit-set characters and functions such as isspace().
-However, we leave the interface to the outside world as char *, because that
-should make things easier for callers. We define a short type for unsigned char
-to save lots of typing. I tried "uchar", but it causes problems on Digital
-Unix, where it is defined in sys/types, so use "uschar" instead. */
+However, we leave the interface to the outside world as char * or short *,
+because that should make things easier for callers. This character type is
+called pcre_uchar.
+
+The IN_UCHARS macro multiply its argument with the byte size of the current
+pcre_uchar type. Useful for memcpy and such operations, whose require the
+byte size of their input/output buffers.
+
+The MAX_255 macro checks whether its pcre_uchar input is less than 256.
+
+The TABLE_GET macro is designed for accessing elements of tables whose contain
+exactly 256 items. When the character is able to contain more than 256
+items, some check is needed before accessing these tables.
+*/
+
+#if defined COMPILE_PCRE8
+
+typedef unsigned char pcre_uchar;
+#define IN_UCHARS(x) (x)
+#define MAX_255(c) 1
+#define TABLE_GET(c, table, default) ((table)[c])
+
+#elif defined COMPILE_PCRE16
+
+#if USHRT_MAX != 65535
+/* This is a warning message. Change PCRE_UCHAR16 to a 16 bit data type in
+pcre.h(.in) and disable (comment out) this message. */
+#error Warning: PCRE_UCHAR16 is not a 16 bit data type.
+#endif
+
+typedef pcre_uint16 pcre_uchar;
+#define UCHAR_SHIFT (1)
+#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
+#define MAX_255(c) ((c) <= 255u)
+#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
+
+#elif defined COMPILE_PCRE32
+
+typedef pcre_uint32 pcre_uchar;
+#define UCHAR_SHIFT (2)
+#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
+#define MAX_255(c) ((c) <= 255u)
+#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
-typedef unsigned char uschar;
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE[8|16|32] */
/* This is an unsigned int value that no character can ever have. UTF-8
characters only go up to 0x7fffffff (though Unicode doesn't go beyond
@@ -190,12 +318,12 @@ start/end of string field names are. */
#define IS_NEWLINE(p) \
((NLBLOCK->nltype != NLTYPE_FIXED)? \
((p) < NLBLOCK->PSEND && \
- _erts_pcre_is_newline((p), NLBLOCK->nltype, NLBLOCK->PSEND, &(NLBLOCK->nllen),\
- utf8)) \
+ PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, \
+ &(NLBLOCK->nllen), utf)) \
: \
((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
- (p)[0] == NLBLOCK->nl[0] && \
- (NLBLOCK->nllen == 1 || (p)[1] == NLBLOCK->nl[1]) \
+ RAWUCHARTEST(p) == NLBLOCK->nl[0] && \
+ (NLBLOCK->nllen == 1 || RAWUCHARTEST(p+1) == NLBLOCK->nl[1]) \
) \
)
@@ -204,12 +332,12 @@ start/end of string field names are. */
#define WAS_NEWLINE(p) \
((NLBLOCK->nltype != NLTYPE_FIXED)? \
((p) > NLBLOCK->PSSTART && \
- _erts_pcre_was_newline((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
- &(NLBLOCK->nllen), utf8)) \
+ PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
+ &(NLBLOCK->nllen), utf)) \
: \
((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
- (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \
- (NLBLOCK->nllen == 1 || (p)[-NLBLOCK->nllen+1] == NLBLOCK->nl[1]) \
+ RAWUCHARTEST(p - NLBLOCK->nllen) == NLBLOCK->nl[0] && \
+ (NLBLOCK->nllen == 1 || RAWUCHARTEST(p - NLBLOCK->nllen + 1) == NLBLOCK->nl[1]) \
) \
)
@@ -223,21 +351,22 @@ used for the external interface and appears in pcre.h, which is why its name
must begin with PCRE_. */
#ifdef CUSTOM_SUBJECT_PTR
-#define PCRE_SPTR CUSTOM_SUBJECT_PTR
-#define USPTR CUSTOM_SUBJECT_PTR
+#define PCRE_PUCHAR CUSTOM_SUBJECT_PTR
#else
-#define PCRE_SPTR const char *
-#define USPTR const unsigned char *
+#define PCRE_PUCHAR const pcre_uchar *
#endif
-
-
/* Include the public PCRE header and the definitions of UCP character property
values. */
#include "pcre.h"
#include "ucp.h"
+#ifdef COMPILE_PCRE32
+/* Assert that the public PCRE_UCHAR32 is a 32-bit type */
+typedef int __assert_pcre_uchar32_size[sizeof(PCRE_UCHAR32) == 4 ? 1 : -1];
+#endif
+
/* When compiling for use with the Virtual Pascal compiler, these functions
need to have their names changed. PCRE must be compiled with the -DVPCOMPAT
option on the command line. */
@@ -299,6 +428,8 @@ The macros are controlled by the value of LINK_SIZE. This defaults to 2 in
the config.h file, but can be overridden by using -D on the command line. This
is automated on Unix systems via the "configure" command. */
+#if defined COMPILE_PCRE8
+
#if LINK_SIZE == 2
#define PUT(a,n,d) \
@@ -335,13 +466,68 @@ is automated on Unix systems via the "configure" command. */
#define GET(a,n) \
(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
-#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+/* Keep it positive */
+#define MAX_PATTERN_SIZE (1 << 30)
+
+#else
+#error LINK_SIZE must be either 2, 3, or 4
+#endif
+
+#elif defined COMPILE_PCRE16
+
+#if LINK_SIZE == 2
+
+/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
+#undef LINK_SIZE
+#define LINK_SIZE 1
+
+#define PUT(a,n,d) \
+ (a[n] = (d))
+
+#define GET(a,n) \
+ (a[n])
+
+#define MAX_PATTERN_SIZE (1 << 16)
+
+#elif LINK_SIZE == 3 || LINK_SIZE == 4
+/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
+#undef LINK_SIZE
+#define LINK_SIZE 2
+
+#define PUT(a,n,d) \
+ (a[n] = (d) >> 16), \
+ (a[(n)+1] = (d) & 65535)
+
+#define GET(a,n) \
+ (((a)[n] << 16) | (a)[(n)+1])
+
+/* Keep it positive */
+#define MAX_PATTERN_SIZE (1 << 30)
#else
#error LINK_SIZE must be either 2, 3, or 4
#endif
+#elif defined COMPILE_PCRE32
+
+/* Only supported LINK_SIZE is 4 */
+/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
+#undef LINK_SIZE
+#define LINK_SIZE 1
+
+#define PUT(a,n,d) \
+ (a[n] = (d))
+
+#define GET(a,n) \
+ (a[n])
+
+/* Keep it positive */
+#define MAX_PATTERN_SIZE (1 << 30)
+
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE[8|16|32] */
/* Convenience macro defined in terms of the others */
@@ -352,106 +538,232 @@ is automated on Unix systems via the "configure" command. */
offsets changes. There are used for repeat counts and for other things such as
capturing parenthesis numbers in back references. */
+#if defined COMPILE_PCRE8
+
+#define IMM2_SIZE 2
+
#define PUT2(a,n,d) \
a[n] = (d) >> 8; \
a[(n)+1] = (d) & 255
+/* For reasons that I do not understand, the expression in this GET2 macro is
+treated by gcc as a signed expression, even when a is declared as unsigned. It
+seems that any kind of arithmetic results in a signed value. */
+
#define GET2(a,n) \
- (((a)[n] << 8) | (a)[(n)+1])
+ (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
-#define PUT2INC(a,n,d) PUT2(a,n,d), a += 2
+#elif defined COMPILE_PCRE16
+#define IMM2_SIZE 1
-/* When UTF-8 encoding is being used, a character is no longer just a single
+#define PUT2(a,n,d) \
+ a[n] = d
+
+#define GET2(a,n) \
+ a[n]
+
+#elif defined COMPILE_PCRE32
+
+#define IMM2_SIZE 1
+
+#define PUT2(a,n,d) \
+ a[n] = d
+
+#define GET2(a,n) \
+ a[n]
+
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE[8|16|32] */
+
+#define PUT2INC(a,n,d) PUT2(a,n,d), a += IMM2_SIZE
+
+/* The maximum length of a MARK name is currently one data unit; it may be
+changed in future to be a fixed number of bytes or to depend on LINK_SIZE. */
+
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+#define MAX_MARK ((1u << 16) - 1)
+#else
+#define MAX_MARK ((1u << 8) - 1)
+#endif
+
+/* When UTF encoding is being used, a character is no longer just a single
byte. The macros for character handling generate simple sequences when used in
-byte-mode, and more complicated ones for UTF-8 characters. BACKCHAR should
-never be called in byte mode. To make sure it can never even appear when UTF-8
-support is omitted, we don't even define it. */
+character-mode, and more complicated ones for UTF characters. GETCHARLENTEST
+and other macros are not used when UTF is not supported, so they are not
+defined. To make sure they can never even appear when UTF support is omitted,
+we don't even define them. */
-#ifndef SUPPORT_UTF8
-#define NEXTCHAR(p,end) p++;
+#ifndef SUPPORT_UTF
+
+/* #define MAX_VALUE_FOR_SINGLE_CHAR */
+/* #define HAS_EXTRALEN(c) */
+/* #define GET_EXTRALEN(c) */
+/* #define NOT_FIRSTCHAR(c) */
#define GETCHAR(c, eptr) c = *eptr;
#define GETCHARTEST(c, eptr) c = *eptr;
#define GETCHARINC(c, eptr) c = *eptr++;
#define GETCHARINCTEST(c, eptr) c = *eptr++;
#define GETCHARLEN(c, eptr, len) c = *eptr;
+#define RAWUCHAR(eptr) (*(eptr))
+#define RAWUCHARINC(eptr) (*(eptr)++)
+#define RAWUCHARTEST(eptr) (*(eptr))
+#define RAWUCHARINCTEST(eptr) (*(eptr)++)
+/* #define GETCHARLENTEST(c, eptr, len) */
/* #define BACKCHAR(eptr) */
+/* #define FORWARDCHAR(eptr) */
+/* #define ACROSSCHAR(condition, eptr, action) */
-#else /* SUPPORT_UTF8 */
+#else /* SUPPORT_UTF */
-/* Advance a character pointer one byte in non-UTF-8 mode and by one character
-in UTF-8 mode. */
+/* Tests whether the code point needs extra characters to decode. */
-#define NEXTCHAR(p,end) \
- p++; \
- if (utf8) { while(p < end && (*p & 0xc0) == 0x80) p++; }
+#define HASUTF8EXTRALEN(c) ((c) >= 0xc0)
-/* Get the next UTF-8 character, not advancing the pointer. This is called when
-we know we are in UTF-8 mode. */
+/* Base macro to pick up the remaining bytes of a UTF-8 character, not
+advancing the pointer. */
-#define GETCHAR(c, eptr) \
- c = *eptr; \
- if (c >= 0xc0) \
+#define GETUTF8(c, eptr) \
{ \
- int gcii; \
- int gcaa = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int gcss = 6*gcaa; \
- c = (c & _erts_pcre_utf8_table3[gcaa]) << gcss; \
- for (gcii = 1; gcii <= gcaa; gcii++) \
+ if ((c & 0x20) == 0) \
+ c = ((c & 0x1f) << 6) | (eptr[1] & 0x3f); \
+ else if ((c & 0x10) == 0) \
+ c = ((c & 0x0f) << 12) | ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
+ else if ((c & 0x08) == 0) \
+ c = ((c & 0x07) << 18) | ((eptr[1] & 0x3f) << 12) | \
+ ((eptr[2] & 0x3f) << 6) | (eptr[3] & 0x3f); \
+ else if ((c & 0x04) == 0) \
+ c = ((c & 0x03) << 24) | ((eptr[1] & 0x3f) << 18) | \
+ ((eptr[2] & 0x3f) << 12) | ((eptr[3] & 0x3f) << 6) | \
+ (eptr[4] & 0x3f); \
+ else \
+ c = ((c & 0x01) << 30) | ((eptr[1] & 0x3f) << 24) | \
+ ((eptr[2] & 0x3f) << 18) | ((eptr[3] & 0x3f) << 12) | \
+ ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \
+ }
+
+/* Base macro to pick up the remaining bytes of a UTF-8 character, advancing
+the pointer. */
+
+#define GETUTF8INC(c, eptr) \
+ { \
+ if ((c & 0x20) == 0) \
+ c = ((c & 0x1f) << 6) | (*eptr++ & 0x3f); \
+ else if ((c & 0x10) == 0) \
+ { \
+ c = ((c & 0x0f) << 12) | ((*eptr & 0x3f) << 6) | (eptr[1] & 0x3f); \
+ eptr += 2; \
+ } \
+ else if ((c & 0x08) == 0) \
+ { \
+ c = ((c & 0x07) << 18) | ((*eptr & 0x3f) << 12) | \
+ ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
+ eptr += 3; \
+ } \
+ else if ((c & 0x04) == 0) \
+ { \
+ c = ((c & 0x03) << 24) | ((*eptr & 0x3f) << 18) | \
+ ((eptr[1] & 0x3f) << 12) | ((eptr[2] & 0x3f) << 6) | \
+ (eptr[3] & 0x3f); \
+ eptr += 4; \
+ } \
+ else \
{ \
- gcss -= 6; \
- c |= (eptr[gcii] & 0x3f) << gcss; \
+ c = ((c & 0x01) << 30) | ((*eptr & 0x3f) << 24) | \
+ ((eptr[1] & 0x3f) << 18) | ((eptr[2] & 0x3f) << 12) | \
+ ((eptr[3] & 0x3f) << 6) | (eptr[4] & 0x3f); \
+ eptr += 5; \
} \
}
+#if defined COMPILE_PCRE8
+
+/* These macros were originally written in the form of loops that used data
+from the tables whose names start with PRIV(utf8_table). They were rewritten by
+a user so as not to use loops, because in some environments this gives a
+significant performance advantage, and it seems never to do any harm. */
+
+/* Tells the biggest code point which can be encoded as a single character. */
+
+#define MAX_VALUE_FOR_SINGLE_CHAR 127
+
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) ((c) >= 0xc0)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])
+
+/* Returns TRUE, if the given character is not the first character
+of a UTF sequence. */
+
+#define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)
+
+/* Get the next UTF-8 character, not advancing the pointer. This is called when
+we know we are in UTF-8 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if (c >= 0xc0) GETUTF8(c, eptr);
+
/* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the
pointer. */
#define GETCHARTEST(c, eptr) \
c = *eptr; \
- if (utf8 && c >= 0xc0) \
- { \
- int gcii; \
- int gcaa = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int gcss = 6*gcaa; \
- c = (c & _erts_pcre_utf8_table3[gcaa]) << gcss; \
- for (gcii = 1; gcii <= gcaa; gcii++) \
- { \
- gcss -= 6; \
- c |= (eptr[gcii] & 0x3f) << gcss; \
- } \
- }
+ if (utf && c >= 0xc0) GETUTF8(c, eptr);
/* Get the next UTF-8 character, advancing the pointer. This is called when we
know we are in UTF-8 mode. */
#define GETCHARINC(c, eptr) \
c = *eptr++; \
- if (c >= 0xc0) \
- { \
- int gcaa = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int gcss = 6*gcaa; \
- c = (c & _erts_pcre_utf8_table3[gcaa]) << gcss; \
- while (gcaa-- > 0) \
- { \
- gcss -= 6; \
- c |= (*eptr++ & 0x3f) << gcss; \
- } \
- }
+ if (c >= 0xc0) GETUTF8INC(c, eptr);
-/* Get the next character, testing for UTF-8 mode, and advancing the pointer */
+/* Get the next character, testing for UTF-8 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-8 mode. */
#define GETCHARINCTEST(c, eptr) \
c = *eptr++; \
- if (utf8 && c >= 0xc0) \
+ if (utf && c >= 0xc0) GETUTF8INC(c, eptr);
+
+/* Base macro to pick up the remaining bytes of a UTF-8 character, not
+advancing the pointer, incrementing the length. */
+
+#define GETUTF8LEN(c, eptr, len) \
{ \
- int gcaa = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int gcss = 6*gcaa; \
- c = (c & _erts_pcre_utf8_table3[gcaa]) << gcss; \
- while (gcaa-- > 0) \
+ if ((c & 0x20) == 0) \
+ { \
+ c = ((c & 0x1f) << 6) | (eptr[1] & 0x3f); \
+ len++; \
+ } \
+ else if ((c & 0x10) == 0) \
{ \
- gcss -= 6; \
- c |= (*eptr++ & 0x3f) << gcss; \
+ c = ((c & 0x0f) << 12) | ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
+ len += 2; \
+ } \
+ else if ((c & 0x08) == 0) \
+ {\
+ c = ((c & 0x07) << 18) | ((eptr[1] & 0x3f) << 12) | \
+ ((eptr[2] & 0x3f) << 6) | (eptr[3] & 0x3f); \
+ len += 3; \
+ } \
+ else if ((c & 0x04) == 0) \
+ { \
+ c = ((c & 0x03) << 24) | ((eptr[1] & 0x3f) << 18) | \
+ ((eptr[2] & 0x3f) << 12) | ((eptr[3] & 0x3f) << 6) | \
+ (eptr[4] & 0x3f); \
+ len += 4; \
+ } \
+ else \
+ {\
+ c = ((c & 0x01) << 30) | ((eptr[1] & 0x3f) << 24) | \
+ ((eptr[2] & 0x3f) << 18) | ((eptr[3] & 0x3f) << 12) | \
+ ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \
+ len += 5; \
} \
}
@@ -460,19 +772,39 @@ if there are extra bytes. This is called when we know we are in UTF-8 mode. */
#define GETCHARLEN(c, eptr, len) \
c = *eptr; \
- if (c >= 0xc0) \
- { \
- int gcii; \
- int gcaa = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int gcss = 6*gcaa; \
- c = (c & _erts_pcre_utf8_table3[gcaa]) << gcss; \
- for (gcii = 1; gcii <= gcaa; gcii++) \
- { \
- gcss -= 6; \
- c |= (eptr[gcii] & 0x3f) << gcss; \
- } \
- len += gcaa; \
- }
+ if (c >= 0xc0) GETUTF8LEN(c, eptr, len);
+
+/* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
+pointer, incrementing length if there are extra bytes. This is called when we
+do not know if we are in UTF-8 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ c = *eptr; \
+ if (utf && c >= 0xc0) GETUTF8LEN(c, eptr, len);
+
+/* Returns the next uchar, not advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHAR(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHARINC(eptr) \
+ (*((eptr)++))
+
+/* Returns the next uchar, testing for UTF mode, and not advancing the
+pointer. */
+
+#define RAWUCHARTEST(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, testing for UTF mode, advancing the
+pointer. */
+
+#define RAWUCHARINCTEST(eptr) \
+ (*((eptr)++))
/* If the pointer is not at the start of a character, move it back until
it is. This is called only in UTF-8 mode - we don't put a test within the macro
@@ -480,35 +812,363 @@ because almost all calls are already within a block of UTF-8 only code. */
#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--
-#endif
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ while((condition) && ((eptr) & 0xc0) == 0x80) action
+
+#elif defined COMPILE_PCRE16
+/* Tells the biggest code point which can be encoded as a single character. */
-/* In case there is no definition of offsetof() provided - though any proper
-Standard C system should have one. */
+#define MAX_VALUE_FOR_SINGLE_CHAR 65535
-#ifndef offsetof
-#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) (((c) & 0xfc00) == 0xd800)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) 1
+
+/* Returns TRUE, if the given character is not the first character
+of a UTF sequence. */
+
+#define NOT_FIRSTCHAR(c) (((c) & 0xfc00) == 0xdc00)
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer. */
+
+#define GETUTF16(c, eptr) \
+ { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; }
+
+/* Get the next UTF-16 character, not advancing the pointer. This is called when
+we know we are in UTF-16 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
+
+/* Get the next UTF-16 character, testing for UTF-16 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, advancing
+the pointer. */
+
+#define GETUTF16INC(c, eptr) \
+ { c = (((c & 0x3ff) << 10) | (*eptr++ & 0x3ff)) + 0x10000; }
+
+/* Get the next UTF-16 character, advancing the pointer. This is called when we
+know we are in UTF-16 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *eptr++; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
+
+/* Get the next character, testing for UTF-16 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-16 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *eptr++; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer, incrementing the length. */
+
+#define GETUTF16LEN(c, eptr, len) \
+ { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; len++; }
+
+/* Get the next UTF-16 character, not advancing the pointer, incrementing
+length if there is a low surrogate. This is called when we know we are in
+UTF-16 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ c = *eptr; \
+ if ((c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
+
+/* Get the next UTF-816character, testing for UTF-16 mode, not advancing the
+pointer, incrementing length if there is a low surrogate. This is called when
+we do not know if we are in UTF-16 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
+
+/* Returns the next uchar, not advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHAR(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHARINC(eptr) \
+ (*((eptr)++))
+
+/* Returns the next uchar, testing for UTF mode, and not advancing the
+pointer. */
+
+#define RAWUCHARTEST(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, testing for UTF mode, advancing the
+pointer. */
+
+#define RAWUCHARINCTEST(eptr) \
+ (*((eptr)++))
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-16 mode - we don't put a test within the
+macro because almost all calls are already within a block of UTF-16 only
+code. */
+
+#define BACKCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr--
+
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ if ((condition) && ((eptr) & 0xfc00) == 0xdc00) action
+
+#elif defined COMPILE_PCRE32
+
+/* These are trivial for the 32-bit library, since all UTF-32 characters fit
+into one pcre_uchar unit. */
+#define MAX_VALUE_FOR_SINGLE_CHAR (0x10ffffu)
+#define HAS_EXTRALEN(c) (0)
+#define GET_EXTRALEN(c) (0)
+#define NOT_FIRSTCHAR(c) (0)
+
+/* Get the next UTF-32 character, not advancing the pointer. This is called when
+we know we are in UTF-32 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *(eptr);
+
+/* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *(eptr);
+
+/* Get the next UTF-32 character, advancing the pointer. This is called when we
+know we are in UTF-32 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *((eptr)++);
+
+/* Get the next character, testing for UTF-32 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-32 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *((eptr)++);
+
+/* Get the next UTF-32 character, not advancing the pointer, not incrementing
+length (since all UTF-32 is of length 1). This is called when we know we are in
+UTF-32 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ GETCHAR(c, eptr)
+
+/* Get the next UTF-32character, testing for UTF-32 mode, not advancing the
+pointer, not incrementing the length (since all UTF-32 is of length 1).
+This is called when we do not know if we are in UTF-32 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ GETCHARTEST(c, eptr)
+
+/* Returns the next uchar, not advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHAR(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, advancing the pointer. This is called when
+we know we are in UTF mode. */
+
+#define RAWUCHARINC(eptr) \
+ (*((eptr)++))
+
+/* Returns the next uchar, testing for UTF mode, and not advancing the
+pointer. */
+
+#define RAWUCHARTEST(eptr) \
+ (*(eptr))
+
+/* Returns the next uchar, testing for UTF mode, advancing the
+pointer. */
+
+#define RAWUCHARINCTEST(eptr) \
+ (*((eptr)++))
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-32 mode - we don't put a test within the
+macro because almost all calls are already within a block of UTF-32 only
+code.
+These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */
+
+#define BACKCHAR(eptr) do { } while (0)
+
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) do { } while (0)
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) do { } while (0)
+
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE[8|16|32] */
+
+#endif /* SUPPORT_UTF */
+
+/* Tests for Unicode horizontal and vertical whitespace characters must check a
+number of different values. Using a switch statement for this generates the
+fastest code (no loop, no memory access), and there are several places in the
+interpreter code where this happens. In order to ensure that all the case lists
+remain in step, we use macros so that there is only one place where the lists
+are defined.
+
+These values are also required as lists in pcre_compile.c when processing \h,
+\H, \v and \V in a character class. The lists are defined in pcre_tables.c, but
+macros that define the values are here so that all the definitions are
+together. The lists must be in ascending character order, terminated by
+NOTACHAR (which is 0xffffffff).
+
+Any changes should ensure that the various macros are kept in step with each
+other. NOTE: The values also appear in pcre_jit_compile.c. */
+
+/* ------ ASCII/Unicode environments ------ */
+
+#ifndef EBCDIC
+
+#define HSPACE_LIST \
+ CHAR_HT, CHAR_SPACE, 0xa0, \
+ 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, \
+ 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202f, 0x205f, 0x3000, \
+ NOTACHAR
+
+#define HSPACE_MULTIBYTE_CASES \
+ case 0x1680: /* OGHAM SPACE MARK */ \
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */ \
+ case 0x2000: /* EN QUAD */ \
+ case 0x2001: /* EM QUAD */ \
+ case 0x2002: /* EN SPACE */ \
+ case 0x2003: /* EM SPACE */ \
+ case 0x2004: /* THREE-PER-EM SPACE */ \
+ case 0x2005: /* FOUR-PER-EM SPACE */ \
+ case 0x2006: /* SIX-PER-EM SPACE */ \
+ case 0x2007: /* FIGURE SPACE */ \
+ case 0x2008: /* PUNCTUATION SPACE */ \
+ case 0x2009: /* THIN SPACE */ \
+ case 0x200A: /* HAIR SPACE */ \
+ case 0x202f: /* NARROW NO-BREAK SPACE */ \
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ \
+ case 0x3000 /* IDEOGRAPHIC SPACE */
+
+#define HSPACE_BYTE_CASES \
+ case CHAR_HT: \
+ case CHAR_SPACE: \
+ case 0xa0 /* NBSP */
+
+#define HSPACE_CASES \
+ HSPACE_BYTE_CASES: \
+ HSPACE_MULTIBYTE_CASES
+
+#define VSPACE_LIST \
+ CHAR_LF, CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, 0x2028, 0x2029, NOTACHAR
+
+#define VSPACE_MULTIBYTE_CASES \
+ case 0x2028: /* LINE SEPARATOR */ \
+ case 0x2029 /* PARAGRAPH SEPARATOR */
+
+#define VSPACE_BYTE_CASES \
+ case CHAR_LF: \
+ case CHAR_VT: \
+ case CHAR_FF: \
+ case CHAR_CR: \
+ case CHAR_NEL
+
+#define VSPACE_CASES \
+ VSPACE_BYTE_CASES: \
+ VSPACE_MULTIBYTE_CASES
+
+/* ------ EBCDIC environments ------ */
+
+#else
+#define HSPACE_LIST CHAR_HT, CHAR_SPACE
+
+#define HSPACE_BYTE_CASES \
+ case CHAR_HT: \
+ case CHAR_SPACE
+
+#define HSPACE_CASES HSPACE_BYTE_CASES
+
+#ifdef EBCDIC_NL25
+#define VSPACE_LIST \
+ CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, CHAR_LF, NOTACHAR
+#else
+#define VSPACE_LIST \
+ CHAR_VT, CHAR_FF, CHAR_CR, CHAR_LF, CHAR_NEL, NOTACHAR
#endif
+#define VSPACE_BYTE_CASES \
+ case CHAR_LF: \
+ case CHAR_VT: \
+ case CHAR_FF: \
+ case CHAR_CR: \
+ case CHAR_NEL
-/* These are the public options that can change during matching. */
+#define VSPACE_CASES VSPACE_BYTE_CASES
+#endif /* EBCDIC */
+
+/* ------ End of whitespace macros ------ */
-#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
-/* Private flags containing information about the compiled regex. They used to
-live at the top end of the options word, but that got almost full, so now they
-are in a 16-bit flags word. */
-#define PCRE_NOPARTIAL 0x0001 /* can't use partial with this regex */
-#define PCRE_FIRSTSET 0x0002 /* first_byte is set */
-#define PCRE_REQCHSET 0x0004 /* req_byte is set */
-#define PCRE_STARTLINE 0x0008 /* start after \n for multiline */
-#define PCRE_JCHANGED 0x0010 /* j option used in regex */
-#define PCRE_HASCRORLF 0x0020 /* explicit \r or \n in pattern */
+/* Private flags containing information about the compiled regex. They used to
+live at the top end of the options word, but that got almost full, so they were
+moved to a 16-bit flags word - which got almost full, so now they are in a
+32-bit flags word. From release 8.00, PCRE_NOPARTIAL is unused, as the
+restrictions on partial matching have been lifted. It remains for backwards
+compatibility. */
+
+#define PCRE_MODE8 0x00000001 /* compiled in 8 bit mode */
+#define PCRE_MODE16 0x00000002 /* compiled in 16 bit mode */
+#define PCRE_MODE32 0x00000004 /* compiled in 32 bit mode */
+#define PCRE_FIRSTSET 0x00000010 /* first_char is set */
+#define PCRE_FCH_CASELESS 0x00000020 /* caseless first char */
+#define PCRE_REQCHSET 0x00000040 /* req_byte is set */
+#define PCRE_RCH_CASELESS 0x00000080 /* caseless requested char */
+#define PCRE_STARTLINE 0x00000100 /* start after \n for multiline */
+#define PCRE_NOPARTIAL 0x00000200 /* can't use partial with this regex */
+#define PCRE_JCHANGED 0x00000400 /* j option used in regex */
+#define PCRE_HASCRORLF 0x00000800 /* explicit \r or \n in pattern */
+#define PCRE_HASTHEN 0x00001000 /* pattern contains (*THEN) */
+#define PCRE_MLSET 0x00002000 /* match limit set by regex */
+#define PCRE_RLSET 0x00004000 /* recursion limit set by regex */
+
+#if defined COMPILE_PCRE8
+#define PCRE_MODE PCRE_MODE8
+#elif defined COMPILE_PCRE16
+#define PCRE_MODE PCRE_MODE16
+#elif defined COMPILE_PCRE32
+#define PCRE_MODE PCRE_MODE32
+#endif
+#define PCRE_MODE_MASK (PCRE_MODE8 | PCRE_MODE16 | PCRE_MODE32)
-/* Options for the "extra" block produced by pcre_study(). */
+/* Flags for the "extra" block produced by pcre_study(). */
-#define PCRE_STUDY_MAPPED 0x01 /* a map of starting chars exists */
+#define PCRE_STUDY_MAPPED 0x0001 /* a map of starting chars exists */
+#define PCRE_STUDY_MINLEN 0x0002 /* a minimum length field exists */
/* Masks for identifying the public options that are permitted at compile
time, run time, or study time, respectively. */
@@ -516,86 +1176,690 @@ time, run time, or study time, respectively. */
#define PCRE_NEWLINE_BITS (PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_ANY| \
PCRE_NEWLINE_ANYCRLF)
-#define PUBLIC_OPTIONS \
+#define PUBLIC_COMPILE_OPTIONS \
(PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
- PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
+ PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
+ PCRE_JAVASCRIPT_COMPAT|PCRE_UCP|PCRE_NO_START_OPTIMIZE|PCRE_NEVER_UTF)
#define PUBLIC_EXEC_OPTIONS \
- (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
- PCRE_PARTIAL|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
+ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
+ PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_NEWLINE_BITS| \
+ PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE|PCRE_NO_START_OPTIMIZE)
#define PUBLIC_DFA_EXEC_OPTIONS \
- (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
- PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART|PCRE_NEWLINE_BITS| \
- PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)
+ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
+ PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_DFA_SHORTEST| \
+ PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
+ PCRE_NO_START_OPTIMIZE)
-#define PUBLIC_STUDY_OPTIONS 0 /* None defined */
+#define PUBLIC_STUDY_OPTIONS \
+ (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE|PCRE_STUDY_EXTRA_NEEDED)
-/* Magic number to provide a small check against being handed junk. Also used
-to detect whether a pattern was compiled on a host of different endianness. */
+#define PUBLIC_JIT_EXEC_OPTIONS \
+ (PCRE_NO_UTF8_CHECK|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|\
+ PCRE_NOTEMPTY_ATSTART|PCRE_PARTIAL_SOFT|PCRE_PARTIAL_HARD)
+
+/* Magic number to provide a small check against being handed junk. */
#define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */
-/* Negative values for the firstchar and reqchar variables */
+/* This variable is used to detect a loaded regular expression
+in different endianness. */
-#define REQ_UNSET (-2)
-#define REQ_NONE (-1)
+#define REVERSED_MAGIC_NUMBER 0x45524350UL /* 'ERCP' */
/* The maximum remaining length of subject we are prepared to search for a
req_byte match. */
#define REQ_BYTE_MAX 1000
-/* Flags added to firstbyte or reqbyte; a "non-literal" item is either a
-variable-length repeat, or a anything other than literal characters. */
-
-#define REQ_CASELESS 0x0100 /* indicates caselessness */
-#define REQ_VARY 0x0200 /* reqbyte followed non-literal item */
-
-/* Miscellaneous definitions */
+/* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in
+environments where these macros are defined elsewhere. Unfortunately, there
+is no way to do the same for the typedef. */
typedef int BOOL;
+#ifndef FALSE
#define FALSE 0
#define TRUE 1
+#endif
+
+/* If PCRE is to support UTF-8 on EBCDIC platforms, we cannot use normal
+character constants like '*' because the compiler would emit their EBCDIC code,
+which is different from their ASCII/UTF-8 code. Instead we define macros for
+the characters so that they always use the ASCII/UTF-8 code when UTF-8 support
+is enabled. When UTF-8 support is not enabled, the definitions use character
+literals. Both character and string versions of each character are needed, and
+there are some longer strings as well.
+
+This means that, on EBCDIC platforms, the PCRE library can handle either
+EBCDIC, or UTF-8, but not both. To support both in the same compiled library
+would need different lookups depending on whether PCRE_UTF8 was set or not.
+This would make it impossible to use characters in switch/case statements,
+which would reduce performance. For a theoretical use (which nobody has asked
+for) in a minority area (EBCDIC platforms), this is not sensible. Any
+application that did need both could compile two versions of the library, using
+macros to give the functions distinct names. */
+
+#ifndef SUPPORT_UTF
+
+/* UTF-8 support is not enabled; use the platform-dependent character literals
+so that PCRE works in both ASCII and EBCDIC environments, but only in non-UTF
+mode. Newline characters are problematic in EBCDIC. Though it has CR and LF
+characters, a common practice has been to use its NL (0x15) character as the
+line terminator in C-like processing environments. However, sometimes the LF
+(0x25) character is used instead, according to this Unicode document:
+
+http://unicode.org/standard/reports/tr13/tr13-5.html
+
+PCRE defaults EBCDIC NL to 0x15, but has a build-time option to select 0x25
+instead. Whichever is *not* chosen is defined as NEL.
+
+In both ASCII and EBCDIC environments, CHAR_NL and CHAR_LF are synonyms for the
+same code point. */
+
+#ifdef EBCDIC
+
+#ifndef EBCDIC_NL25
+#define CHAR_NL '\x15'
+#define CHAR_NEL '\x25'
+#define STR_NL "\x15"
+#define STR_NEL "\x25"
+#else
+#define CHAR_NL '\x25'
+#define CHAR_NEL '\x15'
+#define STR_NL "\x25"
+#define STR_NEL "\x15"
+#endif
+
+#define CHAR_LF CHAR_NL
+#define STR_LF STR_NL
+
+#define CHAR_ESC '\047'
+#define CHAR_DEL '\007'
+#define STR_ESC "\047"
+#define STR_DEL "\007"
+
+#else /* Not EBCDIC */
+
+/* In ASCII/Unicode, linefeed is '\n' and we equate this to NL for
+compatibility. NEL is the Unicode newline character; make sure it is
+a positive value. */
+
+#define CHAR_LF '\n'
+#define CHAR_NL CHAR_LF
+#define CHAR_NEL ((unsigned char)'\x85')
+#define CHAR_ESC '\033'
+#define CHAR_DEL '\177'
+
+#define STR_LF "\n"
+#define STR_NL STR_LF
+#define STR_NEL "\x85"
+#define STR_ESC "\033"
+#define STR_DEL "\177"
+
+#endif /* EBCDIC */
+
+/* The remaining definitions work in both environments. */
+
+#define CHAR_NULL '\0'
+#define CHAR_HT '\t'
+#define CHAR_VT '\v'
+#define CHAR_FF '\f'
+#define CHAR_CR '\r'
+#define CHAR_BS '\b'
+#define CHAR_BEL '\a'
+
+#define CHAR_SPACE ' '
+#define CHAR_EXCLAMATION_MARK '!'
+#define CHAR_QUOTATION_MARK '"'
+#define CHAR_NUMBER_SIGN '#'
+#define CHAR_DOLLAR_SIGN '$'
+#define CHAR_PERCENT_SIGN '%'
+#define CHAR_AMPERSAND '&'
+#define CHAR_APOSTROPHE '\''
+#define CHAR_LEFT_PARENTHESIS '('
+#define CHAR_RIGHT_PARENTHESIS ')'
+#define CHAR_ASTERISK '*'
+#define CHAR_PLUS '+'
+#define CHAR_COMMA ','
+#define CHAR_MINUS '-'
+#define CHAR_DOT '.'
+#define CHAR_SLASH '/'
+#define CHAR_0 '0'
+#define CHAR_1 '1'
+#define CHAR_2 '2'
+#define CHAR_3 '3'
+#define CHAR_4 '4'
+#define CHAR_5 '5'
+#define CHAR_6 '6'
+#define CHAR_7 '7'
+#define CHAR_8 '8'
+#define CHAR_9 '9'
+#define CHAR_COLON ':'
+#define CHAR_SEMICOLON ';'
+#define CHAR_LESS_THAN_SIGN '<'
+#define CHAR_EQUALS_SIGN '='
+#define CHAR_GREATER_THAN_SIGN '>'
+#define CHAR_QUESTION_MARK '?'
+#define CHAR_COMMERCIAL_AT '@'
+#define CHAR_A 'A'
+#define CHAR_B 'B'
+#define CHAR_C 'C'
+#define CHAR_D 'D'
+#define CHAR_E 'E'
+#define CHAR_F 'F'
+#define CHAR_G 'G'
+#define CHAR_H 'H'
+#define CHAR_I 'I'
+#define CHAR_J 'J'
+#define CHAR_K 'K'
+#define CHAR_L 'L'
+#define CHAR_M 'M'
+#define CHAR_N 'N'
+#define CHAR_O 'O'
+#define CHAR_P 'P'
+#define CHAR_Q 'Q'
+#define CHAR_R 'R'
+#define CHAR_S 'S'
+#define CHAR_T 'T'
+#define CHAR_U 'U'
+#define CHAR_V 'V'
+#define CHAR_W 'W'
+#define CHAR_X 'X'
+#define CHAR_Y 'Y'
+#define CHAR_Z 'Z'
+#define CHAR_LEFT_SQUARE_BRACKET '['
+#define CHAR_BACKSLASH '\\'
+#define CHAR_RIGHT_SQUARE_BRACKET ']'
+#define CHAR_CIRCUMFLEX_ACCENT '^'
+#define CHAR_UNDERSCORE '_'
+#define CHAR_GRAVE_ACCENT '`'
+#define CHAR_a 'a'
+#define CHAR_b 'b'
+#define CHAR_c 'c'
+#define CHAR_d 'd'
+#define CHAR_e 'e'
+#define CHAR_f 'f'
+#define CHAR_g 'g'
+#define CHAR_h 'h'
+#define CHAR_i 'i'
+#define CHAR_j 'j'
+#define CHAR_k 'k'
+#define CHAR_l 'l'
+#define CHAR_m 'm'
+#define CHAR_n 'n'
+#define CHAR_o 'o'
+#define CHAR_p 'p'
+#define CHAR_q 'q'
+#define CHAR_r 'r'
+#define CHAR_s 's'
+#define CHAR_t 't'
+#define CHAR_u 'u'
+#define CHAR_v 'v'
+#define CHAR_w 'w'
+#define CHAR_x 'x'
+#define CHAR_y 'y'
+#define CHAR_z 'z'
+#define CHAR_LEFT_CURLY_BRACKET '{'
+#define CHAR_VERTICAL_LINE '|'
+#define CHAR_RIGHT_CURLY_BRACKET '}'
+#define CHAR_TILDE '~'
+
+#define STR_HT "\t"
+#define STR_VT "\v"
+#define STR_FF "\f"
+#define STR_CR "\r"
+#define STR_BS "\b"
+#define STR_BEL "\a"
+
+#define STR_SPACE " "
+#define STR_EXCLAMATION_MARK "!"
+#define STR_QUOTATION_MARK "\""
+#define STR_NUMBER_SIGN "#"
+#define STR_DOLLAR_SIGN "$"
+#define STR_PERCENT_SIGN "%"
+#define STR_AMPERSAND "&"
+#define STR_APOSTROPHE "'"
+#define STR_LEFT_PARENTHESIS "("
+#define STR_RIGHT_PARENTHESIS ")"
+#define STR_ASTERISK "*"
+#define STR_PLUS "+"
+#define STR_COMMA ","
+#define STR_MINUS "-"
+#define STR_DOT "."
+#define STR_SLASH "/"
+#define STR_0 "0"
+#define STR_1 "1"
+#define STR_2 "2"
+#define STR_3 "3"
+#define STR_4 "4"
+#define STR_5 "5"
+#define STR_6 "6"
+#define STR_7 "7"
+#define STR_8 "8"
+#define STR_9 "9"
+#define STR_COLON ":"
+#define STR_SEMICOLON ";"
+#define STR_LESS_THAN_SIGN "<"
+#define STR_EQUALS_SIGN "="
+#define STR_GREATER_THAN_SIGN ">"
+#define STR_QUESTION_MARK "?"
+#define STR_COMMERCIAL_AT "@"
+#define STR_A "A"
+#define STR_B "B"
+#define STR_C "C"
+#define STR_D "D"
+#define STR_E "E"
+#define STR_F "F"
+#define STR_G "G"
+#define STR_H "H"
+#define STR_I "I"
+#define STR_J "J"
+#define STR_K "K"
+#define STR_L "L"
+#define STR_M "M"
+#define STR_N "N"
+#define STR_O "O"
+#define STR_P "P"
+#define STR_Q "Q"
+#define STR_R "R"
+#define STR_S "S"
+#define STR_T "T"
+#define STR_U "U"
+#define STR_V "V"
+#define STR_W "W"
+#define STR_X "X"
+#define STR_Y "Y"
+#define STR_Z "Z"
+#define STR_LEFT_SQUARE_BRACKET "["
+#define STR_BACKSLASH "\\"
+#define STR_RIGHT_SQUARE_BRACKET "]"
+#define STR_CIRCUMFLEX_ACCENT "^"
+#define STR_UNDERSCORE "_"
+#define STR_GRAVE_ACCENT "`"
+#define STR_a "a"
+#define STR_b "b"
+#define STR_c "c"
+#define STR_d "d"
+#define STR_e "e"
+#define STR_f "f"
+#define STR_g "g"
+#define STR_h "h"
+#define STR_i "i"
+#define STR_j "j"
+#define STR_k "k"
+#define STR_l "l"
+#define STR_m "m"
+#define STR_n "n"
+#define STR_o "o"
+#define STR_p "p"
+#define STR_q "q"
+#define STR_r "r"
+#define STR_s "s"
+#define STR_t "t"
+#define STR_u "u"
+#define STR_v "v"
+#define STR_w "w"
+#define STR_x "x"
+#define STR_y "y"
+#define STR_z "z"
+#define STR_LEFT_CURLY_BRACKET "{"
+#define STR_VERTICAL_LINE "|"
+#define STR_RIGHT_CURLY_BRACKET "}"
+#define STR_TILDE "~"
+
+#define STRING_ACCEPT0 "ACCEPT\0"
+#define STRING_COMMIT0 "COMMIT\0"
+#define STRING_F0 "F\0"
+#define STRING_FAIL0 "FAIL\0"
+#define STRING_MARK0 "MARK\0"
+#define STRING_PRUNE0 "PRUNE\0"
+#define STRING_SKIP0 "SKIP\0"
+#define STRING_THEN "THEN"
+
+#define STRING_alpha0 "alpha\0"
+#define STRING_lower0 "lower\0"
+#define STRING_upper0 "upper\0"
+#define STRING_alnum0 "alnum\0"
+#define STRING_ascii0 "ascii\0"
+#define STRING_blank0 "blank\0"
+#define STRING_cntrl0 "cntrl\0"
+#define STRING_digit0 "digit\0"
+#define STRING_graph0 "graph\0"
+#define STRING_print0 "print\0"
+#define STRING_punct0 "punct\0"
+#define STRING_space0 "space\0"
+#define STRING_word0 "word\0"
+#define STRING_xdigit "xdigit"
+
+#define STRING_DEFINE "DEFINE"
+
+#define STRING_CR_RIGHTPAR "CR)"
+#define STRING_LF_RIGHTPAR "LF)"
+#define STRING_CRLF_RIGHTPAR "CRLF)"
+#define STRING_ANY_RIGHTPAR "ANY)"
+#define STRING_ANYCRLF_RIGHTPAR "ANYCRLF)"
+#define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)"
+#define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)"
+#define STRING_UTF8_RIGHTPAR "UTF8)"
+#define STRING_UTF16_RIGHTPAR "UTF16)"
+#define STRING_UTF32_RIGHTPAR "UTF32)"
+#define STRING_UTF_RIGHTPAR "UTF)"
+#define STRING_UCP_RIGHTPAR "UCP)"
+#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)"
+#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH="
+#define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION="
+
+#else /* SUPPORT_UTF */
+
+/* UTF-8 support is enabled; always use UTF-8 (=ASCII) character codes. This
+works in both modes non-EBCDIC platforms, and on EBCDIC platforms in UTF-8 mode
+only. */
+
+#define CHAR_HT '\011'
+#define CHAR_VT '\013'
+#define CHAR_FF '\014'
+#define CHAR_CR '\015'
+#define CHAR_LF '\012'
+#define CHAR_NL CHAR_LF
+#define CHAR_NEL ((unsigned char)'\x85')
+#define CHAR_BS '\010'
+#define CHAR_BEL '\007'
+#define CHAR_ESC '\033'
+#define CHAR_DEL '\177'
+
+#define CHAR_NULL '\0'
+#define CHAR_SPACE '\040'
+#define CHAR_EXCLAMATION_MARK '\041'
+#define CHAR_QUOTATION_MARK '\042'
+#define CHAR_NUMBER_SIGN '\043'
+#define CHAR_DOLLAR_SIGN '\044'
+#define CHAR_PERCENT_SIGN '\045'
+#define CHAR_AMPERSAND '\046'
+#define CHAR_APOSTROPHE '\047'
+#define CHAR_LEFT_PARENTHESIS '\050'
+#define CHAR_RIGHT_PARENTHESIS '\051'
+#define CHAR_ASTERISK '\052'
+#define CHAR_PLUS '\053'
+#define CHAR_COMMA '\054'
+#define CHAR_MINUS '\055'
+#define CHAR_DOT '\056'
+#define CHAR_SLASH '\057'
+#define CHAR_0 '\060'
+#define CHAR_1 '\061'
+#define CHAR_2 '\062'
+#define CHAR_3 '\063'
+#define CHAR_4 '\064'
+#define CHAR_5 '\065'
+#define CHAR_6 '\066'
+#define CHAR_7 '\067'
+#define CHAR_8 '\070'
+#define CHAR_9 '\071'
+#define CHAR_COLON '\072'
+#define CHAR_SEMICOLON '\073'
+#define CHAR_LESS_THAN_SIGN '\074'
+#define CHAR_EQUALS_SIGN '\075'
+#define CHAR_GREATER_THAN_SIGN '\076'
+#define CHAR_QUESTION_MARK '\077'
+#define CHAR_COMMERCIAL_AT '\100'
+#define CHAR_A '\101'
+#define CHAR_B '\102'
+#define CHAR_C '\103'
+#define CHAR_D '\104'
+#define CHAR_E '\105'
+#define CHAR_F '\106'
+#define CHAR_G '\107'
+#define CHAR_H '\110'
+#define CHAR_I '\111'
+#define CHAR_J '\112'
+#define CHAR_K '\113'
+#define CHAR_L '\114'
+#define CHAR_M '\115'
+#define CHAR_N '\116'
+#define CHAR_O '\117'
+#define CHAR_P '\120'
+#define CHAR_Q '\121'
+#define CHAR_R '\122'
+#define CHAR_S '\123'
+#define CHAR_T '\124'
+#define CHAR_U '\125'
+#define CHAR_V '\126'
+#define CHAR_W '\127'
+#define CHAR_X '\130'
+#define CHAR_Y '\131'
+#define CHAR_Z '\132'
+#define CHAR_LEFT_SQUARE_BRACKET '\133'
+#define CHAR_BACKSLASH '\134'
+#define CHAR_RIGHT_SQUARE_BRACKET '\135'
+#define CHAR_CIRCUMFLEX_ACCENT '\136'
+#define CHAR_UNDERSCORE '\137'
+#define CHAR_GRAVE_ACCENT '\140'
+#define CHAR_a '\141'
+#define CHAR_b '\142'
+#define CHAR_c '\143'
+#define CHAR_d '\144'
+#define CHAR_e '\145'
+#define CHAR_f '\146'
+#define CHAR_g '\147'
+#define CHAR_h '\150'
+#define CHAR_i '\151'
+#define CHAR_j '\152'
+#define CHAR_k '\153'
+#define CHAR_l '\154'
+#define CHAR_m '\155'
+#define CHAR_n '\156'
+#define CHAR_o '\157'
+#define CHAR_p '\160'
+#define CHAR_q '\161'
+#define CHAR_r '\162'
+#define CHAR_s '\163'
+#define CHAR_t '\164'
+#define CHAR_u '\165'
+#define CHAR_v '\166'
+#define CHAR_w '\167'
+#define CHAR_x '\170'
+#define CHAR_y '\171'
+#define CHAR_z '\172'
+#define CHAR_LEFT_CURLY_BRACKET '\173'
+#define CHAR_VERTICAL_LINE '\174'
+#define CHAR_RIGHT_CURLY_BRACKET '\175'
+#define CHAR_TILDE '\176'
+
+#define STR_HT "\011"
+#define STR_VT "\013"
+#define STR_FF "\014"
+#define STR_CR "\015"
+#define STR_NL "\012"
+#define STR_BS "\010"
+#define STR_BEL "\007"
+#define STR_ESC "\033"
+#define STR_DEL "\177"
+
+#define STR_SPACE "\040"
+#define STR_EXCLAMATION_MARK "\041"
+#define STR_QUOTATION_MARK "\042"
+#define STR_NUMBER_SIGN "\043"
+#define STR_DOLLAR_SIGN "\044"
+#define STR_PERCENT_SIGN "\045"
+#define STR_AMPERSAND "\046"
+#define STR_APOSTROPHE "\047"
+#define STR_LEFT_PARENTHESIS "\050"
+#define STR_RIGHT_PARENTHESIS "\051"
+#define STR_ASTERISK "\052"
+#define STR_PLUS "\053"
+#define STR_COMMA "\054"
+#define STR_MINUS "\055"
+#define STR_DOT "\056"
+#define STR_SLASH "\057"
+#define STR_0 "\060"
+#define STR_1 "\061"
+#define STR_2 "\062"
+#define STR_3 "\063"
+#define STR_4 "\064"
+#define STR_5 "\065"
+#define STR_6 "\066"
+#define STR_7 "\067"
+#define STR_8 "\070"
+#define STR_9 "\071"
+#define STR_COLON "\072"
+#define STR_SEMICOLON "\073"
+#define STR_LESS_THAN_SIGN "\074"
+#define STR_EQUALS_SIGN "\075"
+#define STR_GREATER_THAN_SIGN "\076"
+#define STR_QUESTION_MARK "\077"
+#define STR_COMMERCIAL_AT "\100"
+#define STR_A "\101"
+#define STR_B "\102"
+#define STR_C "\103"
+#define STR_D "\104"
+#define STR_E "\105"
+#define STR_F "\106"
+#define STR_G "\107"
+#define STR_H "\110"
+#define STR_I "\111"
+#define STR_J "\112"
+#define STR_K "\113"
+#define STR_L "\114"
+#define STR_M "\115"
+#define STR_N "\116"
+#define STR_O "\117"
+#define STR_P "\120"
+#define STR_Q "\121"
+#define STR_R "\122"
+#define STR_S "\123"
+#define STR_T "\124"
+#define STR_U "\125"
+#define STR_V "\126"
+#define STR_W "\127"
+#define STR_X "\130"
+#define STR_Y "\131"
+#define STR_Z "\132"
+#define STR_LEFT_SQUARE_BRACKET "\133"
+#define STR_BACKSLASH "\134"
+#define STR_RIGHT_SQUARE_BRACKET "\135"
+#define STR_CIRCUMFLEX_ACCENT "\136"
+#define STR_UNDERSCORE "\137"
+#define STR_GRAVE_ACCENT "\140"
+#define STR_a "\141"
+#define STR_b "\142"
+#define STR_c "\143"
+#define STR_d "\144"
+#define STR_e "\145"
+#define STR_f "\146"
+#define STR_g "\147"
+#define STR_h "\150"
+#define STR_i "\151"
+#define STR_j "\152"
+#define STR_k "\153"
+#define STR_l "\154"
+#define STR_m "\155"
+#define STR_n "\156"
+#define STR_o "\157"
+#define STR_p "\160"
+#define STR_q "\161"
+#define STR_r "\162"
+#define STR_s "\163"
+#define STR_t "\164"
+#define STR_u "\165"
+#define STR_v "\166"
+#define STR_w "\167"
+#define STR_x "\170"
+#define STR_y "\171"
+#define STR_z "\172"
+#define STR_LEFT_CURLY_BRACKET "\173"
+#define STR_VERTICAL_LINE "\174"
+#define STR_RIGHT_CURLY_BRACKET "\175"
+#define STR_TILDE "\176"
+
+#define STRING_ACCEPT0 STR_A STR_C STR_C STR_E STR_P STR_T "\0"
+#define STRING_COMMIT0 STR_C STR_O STR_M STR_M STR_I STR_T "\0"
+#define STRING_F0 STR_F "\0"
+#define STRING_FAIL0 STR_F STR_A STR_I STR_L "\0"
+#define STRING_MARK0 STR_M STR_A STR_R STR_K "\0"
+#define STRING_PRUNE0 STR_P STR_R STR_U STR_N STR_E "\0"
+#define STRING_SKIP0 STR_S STR_K STR_I STR_P "\0"
+#define STRING_THEN STR_T STR_H STR_E STR_N
+
+#define STRING_alpha0 STR_a STR_l STR_p STR_h STR_a "\0"
+#define STRING_lower0 STR_l STR_o STR_w STR_e STR_r "\0"
+#define STRING_upper0 STR_u STR_p STR_p STR_e STR_r "\0"
+#define STRING_alnum0 STR_a STR_l STR_n STR_u STR_m "\0"
+#define STRING_ascii0 STR_a STR_s STR_c STR_i STR_i "\0"
+#define STRING_blank0 STR_b STR_l STR_a STR_n STR_k "\0"
+#define STRING_cntrl0 STR_c STR_n STR_t STR_r STR_l "\0"
+#define STRING_digit0 STR_d STR_i STR_g STR_i STR_t "\0"
+#define STRING_graph0 STR_g STR_r STR_a STR_p STR_h "\0"
+#define STRING_print0 STR_p STR_r STR_i STR_n STR_t "\0"
+#define STRING_punct0 STR_p STR_u STR_n STR_c STR_t "\0"
+#define STRING_space0 STR_s STR_p STR_a STR_c STR_e "\0"
+#define STRING_word0 STR_w STR_o STR_r STR_d "\0"
+#define STRING_xdigit STR_x STR_d STR_i STR_g STR_i STR_t
+
+#define STRING_DEFINE STR_D STR_E STR_F STR_I STR_N STR_E
+
+#define STRING_CR_RIGHTPAR STR_C STR_R STR_RIGHT_PARENTHESIS
+#define STRING_LF_RIGHTPAR STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_CRLF_RIGHTPAR STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_ANY_RIGHTPAR STR_A STR_N STR_Y STR_RIGHT_PARENTHESIS
+#define STRING_ANYCRLF_RIGHTPAR STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS
+#define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS
+#define STRING_UTF16_RIGHTPAR STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS
+#define STRING_UTF32_RIGHTPAR STR_U STR_T STR_F STR_3 STR_2 STR_RIGHT_PARENTHESIS
+#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_RIGHT_PARENTHESIS
+#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS
+#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS
+#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN
+#define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN
+
+#endif /* SUPPORT_UTF */
/* Escape items that are just an encoding of a particular data value. */
#ifndef ESC_e
-#define ESC_e 27
+#define ESC_e CHAR_ESC
#endif
#ifndef ESC_f
-#define ESC_f '\f'
+#define ESC_f CHAR_FF
#endif
#ifndef ESC_n
-#define ESC_n '\n'
+#define ESC_n CHAR_LF
#endif
#ifndef ESC_r
-#define ESC_r '\r'
+#define ESC_r CHAR_CR
#endif
/* We can't officially use ESC_t because it is a POSIX reserved identifier
(presumably because of all the others like size_t). */
#ifndef ESC_tee
-#define ESC_tee '\t'
+#define ESC_tee CHAR_HT
#endif
/* Codes for different types of Unicode property */
#define PT_ANY 0 /* Any property - matches all chars */
#define PT_LAMP 1 /* L& - the union of Lu, Ll, Lt */
-#define PT_GC 2 /* General characteristic (e.g. L) */
-#define PT_PC 3 /* Particular characteristic (e.g. Lu) */
+#define PT_GC 2 /* Specified general characteristic (e.g. L) */
+#define PT_PC 3 /* Specified particular characteristic (e.g. Lu) */
#define PT_SC 4 /* Script (e.g. Han) */
+#define PT_ALNUM 5 /* Alphanumeric - the union of L and N */
+#define PT_SPACE 6 /* Perl space - Z plus 9,10,12,13 */
+#define PT_PXSPACE 7 /* POSIX space - Z plus 9,10,11,12,13 */
+#define PT_WORD 8 /* Word - L plus N plus underscore */
+#define PT_CLIST 9 /* Pseudo-property: match character list */
+#define PT_UCNC 10 /* Universal Character nameable character */
/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
-contain UTF-8 characters with values greater than 255. */
+contain characters with values greater than 255. */
#define XCL_NOT 0x01 /* Flag: this is a negative class */
#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */
@@ -608,26 +1872,36 @@ contain UTF-8 characters with values greater than 255. */
/* These are escaped items that aren't just an encoding of a particular data
value such as \n. They must have non-zero values, as check_escape() returns
-their negation. Also, they must appear in the same order as in the opcode
-definitions below, up to ESC_z. There's a dummy for OP_ANY because it
-corresponds to "." rather than an escape sequence. The final one must be
-ESC_REF as subsequent values are used for backreferences (\1, \2, \3, etc).
-There are two tests in the code for an escape greater than ESC_b and less than
-ESC_Z to detect the types that may be repeated. These are the types that
-consume characters. If any new escapes are put in between that don't consume a
-character, that code will have to change. */
+0 for a data character. Also, they must appear in the same order as in the opcode
+definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it
+corresponds to "." in DOTALL mode rather than an escape sequence. It is also
+used for [^] in JavaScript compatibility mode, and for \C in non-utf mode. In
+non-DOTALL mode, "." behaves like \N.
+
+The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc.
+when PCRE_UCP is set and replacement of \d etc by \p sequences is required.
+They must be contiguous, and remain in order so that the replacements can be
+looked up from a table.
+
+Negative numbers are used to encode a backreference (\1, \2, \3, etc.) in
+check_escape(). There are two tests in the code for an escape
+greater than ESC_b and less than ESC_Z to detect the types that may be
+repeated. These are the types that consume characters. If any new escapes are
+put in between that don't consume a character, that code will have to change.
+*/
enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,
- ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, ESC_h,
- ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_k, ESC_REF };
-
+ ESC_W, ESC_w, ESC_N, ESC_dum, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H,
+ ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z,
+ ESC_E, ESC_Q, ESC_g, ESC_k,
+ ESC_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu };
/* Opcode table: Starting from 1 (i.e. after OP_END), the values up to
OP_EOD must correspond in order to the list of escapes immediately above.
*** NOTE NOTE NOTE *** Whenever this list is updated, the two macro definitions
-that follow must also be updated to match. There is also a table called
-"coptable" in pcre_dfa_exec.c that must be updated. */
+that follow must also be updated to match. There are also tables called
+"coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */
enum {
OP_END, /* 0 End of pattern */
@@ -645,166 +1919,274 @@ enum {
OP_WHITESPACE, /* 9 \s */
OP_NOT_WORDCHAR, /* 10 \W */
OP_WORDCHAR, /* 11 \w */
- OP_ANY, /* 12 Match any character */
- OP_ANYBYTE, /* 13 Match any byte (\C); different to OP_ANY for UTF-8 */
- OP_NOTPROP, /* 14 \P (not Unicode property) */
- OP_PROP, /* 15 \p (Unicode property) */
- OP_ANYNL, /* 16 \R (any newline sequence) */
- OP_NOT_HSPACE, /* 17 \H (not horizontal whitespace) */
- OP_HSPACE, /* 18 \h (horizontal whitespace) */
- OP_NOT_VSPACE, /* 19 \V (not vertical whitespace) */
- OP_VSPACE, /* 20 \v (vertical whitespace) */
- OP_EXTUNI, /* 21 \X (extended Unicode sequence */
- OP_EODN, /* 22 End of data or \n at end of data: \Z. */
- OP_EOD, /* 23 End of data: \z */
-
- OP_OPT, /* 24 Set runtime options */
- OP_CIRC, /* 25 Start of line - varies with multiline switch */
- OP_DOLL, /* 26 End of line - varies with multiline switch */
- OP_CHAR, /* 27 Match one character, casefully */
- OP_CHARNC, /* 28 Match one character, caselessly */
- OP_NOT, /* 29 Match one character, not the following one */
-
- OP_STAR, /* 30 The maximizing and minimizing versions of */
- OP_MINSTAR, /* 31 these six opcodes must come in pairs, with */
- OP_PLUS, /* 32 the minimizing one second. */
- OP_MINPLUS, /* 33 This first set applies to single characters.*/
- OP_QUERY, /* 34 */
- OP_MINQUERY, /* 35 */
-
- OP_UPTO, /* 36 From 0 to n matches */
- OP_MINUPTO, /* 37 */
- OP_EXACT, /* 38 Exactly n matches */
-
- OP_POSSTAR, /* 39 Possessified star */
- OP_POSPLUS, /* 40 Possessified plus */
- OP_POSQUERY, /* 41 Posesssified query */
- OP_POSUPTO, /* 42 Possessified upto */
-
- OP_NOTSTAR, /* 43 The maximizing and minimizing versions of */
- OP_NOTMINSTAR, /* 44 these six opcodes must come in pairs, with */
- OP_NOTPLUS, /* 45 the minimizing one second. They must be in */
- OP_NOTMINPLUS, /* 46 exactly the same order as those above. */
- OP_NOTQUERY, /* 47 This set applies to "not" single characters. */
- OP_NOTMINQUERY, /* 48 */
-
- OP_NOTUPTO, /* 49 From 0 to n matches */
- OP_NOTMINUPTO, /* 50 */
- OP_NOTEXACT, /* 51 Exactly n matches */
-
- OP_NOTPOSSTAR, /* 52 Possessified versions */
- OP_NOTPOSPLUS, /* 53 */
- OP_NOTPOSQUERY, /* 54 */
- OP_NOTPOSUPTO, /* 55 */
-
- OP_TYPESTAR, /* 56 The maximizing and minimizing versions of */
- OP_TYPEMINSTAR, /* 57 these six opcodes must come in pairs, with */
- OP_TYPEPLUS, /* 58 the minimizing one second. These codes must */
- OP_TYPEMINPLUS, /* 59 be in exactly the same order as those above. */
- OP_TYPEQUERY, /* 60 This set applies to character types such as \d */
- OP_TYPEMINQUERY, /* 61 */
-
- OP_TYPEUPTO, /* 62 From 0 to n matches */
- OP_TYPEMINUPTO, /* 63 */
- OP_TYPEEXACT, /* 64 Exactly n matches */
-
- OP_TYPEPOSSTAR, /* 65 Possessified versions */
- OP_TYPEPOSPLUS, /* 66 */
- OP_TYPEPOSQUERY, /* 67 */
- OP_TYPEPOSUPTO, /* 68 */
-
- OP_CRSTAR, /* 69 The maximizing and minimizing versions of */
- OP_CRMINSTAR, /* 70 all these opcodes must come in pairs, with */
- OP_CRPLUS, /* 71 the minimizing one second. These codes must */
- OP_CRMINPLUS, /* 72 be in exactly the same order as those above. */
- OP_CRQUERY, /* 73 These are for character classes and back refs */
- OP_CRMINQUERY, /* 74 */
- OP_CRRANGE, /* 75 These are different to the three sets above. */
- OP_CRMINRANGE, /* 76 */
-
- OP_CLASS, /* 77 Match a character class, chars < 256 only */
- OP_NCLASS, /* 78 Same, but the bitmap was created from a negative
- class - the difference is relevant only when a UTF-8
- character > 255 is encountered. */
-
- OP_XCLASS, /* 79 Extended class for handling UTF-8 chars within the
- class. This does both positive and negative. */
-
- OP_REF, /* 80 Match a back reference */
- OP_RECURSE, /* 81 Match a numbered subpattern (possibly recursive) */
- OP_CALLOUT, /* 82 Call out to external function if provided */
-
- OP_ALT, /* 83 Start of alternation */
- OP_KET, /* 84 End of group that doesn't have an unbounded repeat */
- OP_KETRMAX, /* 85 These two must remain together and in this */
- OP_KETRMIN, /* 86 order. They are for groups the repeat for ever. */
-
- /* The assertions must come before BRA, CBRA, ONCE, and COND.*/
-
- OP_ASSERT, /* 87 Positive lookahead */
- OP_ASSERT_NOT, /* 88 Negative lookahead */
- OP_ASSERTBACK, /* 89 Positive lookbehind */
- OP_ASSERTBACK_NOT, /* 90 Negative lookbehind */
- OP_REVERSE, /* 91 Move pointer back - used in lookbehind assertions */
-
- /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first,
- as there's a test for >= ONCE for a subpattern that isn't an assertion. */
-
- OP_ONCE, /* 92 Atomic group */
- OP_BRA, /* 93 Start of non-capturing bracket */
- OP_CBRA, /* 94 Start of capturing bracket */
- OP_COND, /* 95 Conditional group */
-
- /* These three must follow the previous three, in the same order. There's a
+
+ OP_ANY, /* 12 Match any character except newline (\N) */
+ OP_ALLANY, /* 13 Match any character */
+ OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
+ OP_NOTPROP, /* 15 \P (not Unicode property) */
+ OP_PROP, /* 16 \p (Unicode property) */
+ OP_ANYNL, /* 17 \R (any newline sequence) */
+ OP_NOT_HSPACE, /* 18 \H (not horizontal whitespace) */
+ OP_HSPACE, /* 19 \h (horizontal whitespace) */
+ OP_NOT_VSPACE, /* 20 \V (not vertical whitespace) */
+ OP_VSPACE, /* 21 \v (vertical whitespace) */
+ OP_EXTUNI, /* 22 \X (extended Unicode sequence */
+ OP_EODN, /* 23 End of data or \n at end of data (\Z) */
+ OP_EOD, /* 24 End of data (\z) */
+
+ OP_CIRC, /* 25 Start of line - not multiline */
+ OP_CIRCM, /* 26 Start of line - multiline */
+ OP_DOLL, /* 27 End of line - not multiline */
+ OP_DOLLM, /* 28 End of line - multiline */
+ OP_CHAR, /* 29 Match one character, casefully */
+ OP_CHARI, /* 30 Match one character, caselessly */
+ OP_NOT, /* 31 Match one character, not the given one, casefully */
+ OP_NOTI, /* 32 Match one character, not the given one, caselessly */
+
+ /* The following sets of 13 opcodes must always be kept in step because
+ the offset from the first one is used to generate the others. */
+
+ /**** Single characters, caseful, must precede the caseless ones ****/
+
+ OP_STAR, /* 33 The maximizing and minimizing versions of */
+ OP_MINSTAR, /* 34 these six opcodes must come in pairs, with */
+ OP_PLUS, /* 35 the minimizing one second. */
+ OP_MINPLUS, /* 36 */
+ OP_QUERY, /* 37 */
+ OP_MINQUERY, /* 38 */
+
+ OP_UPTO, /* 39 From 0 to n matches of one character, caseful*/
+ OP_MINUPTO, /* 40 */
+ OP_EXACT, /* 41 Exactly n matches */
+
+ OP_POSSTAR, /* 42 Possessified star, caseful */
+ OP_POSPLUS, /* 43 Possessified plus, caseful */
+ OP_POSQUERY, /* 44 Posesssified query, caseful */
+ OP_POSUPTO, /* 45 Possessified upto, caseful */
+
+ /**** Single characters, caseless, must follow the caseful ones */
+
+ OP_STARI, /* 46 */
+ OP_MINSTARI, /* 47 */
+ OP_PLUSI, /* 48 */
+ OP_MINPLUSI, /* 49 */
+ OP_QUERYI, /* 50 */
+ OP_MINQUERYI, /* 51 */
+
+ OP_UPTOI, /* 52 From 0 to n matches of one character, caseless */
+ OP_MINUPTOI, /* 53 */
+ OP_EXACTI, /* 54 */
+
+ OP_POSSTARI, /* 55 Possessified star, caseless */
+ OP_POSPLUSI, /* 56 Possessified plus, caseless */
+ OP_POSQUERYI, /* 57 Posesssified query, caseless */
+ OP_POSUPTOI, /* 58 Possessified upto, caseless */
+
+ /**** The negated ones must follow the non-negated ones, and match them ****/
+ /**** Negated single character, caseful; must precede the caseless ones ****/
+
+ OP_NOTSTAR, /* 59 The maximizing and minimizing versions of */
+ OP_NOTMINSTAR, /* 60 these six opcodes must come in pairs, with */
+ OP_NOTPLUS, /* 61 the minimizing one second. They must be in */
+ OP_NOTMINPLUS, /* 62 exactly the same order as those above. */
+ OP_NOTQUERY, /* 63 */
+ OP_NOTMINQUERY, /* 64 */
+
+ OP_NOTUPTO, /* 65 From 0 to n matches, caseful */
+ OP_NOTMINUPTO, /* 66 */
+ OP_NOTEXACT, /* 67 Exactly n matches */
+
+ OP_NOTPOSSTAR, /* 68 Possessified versions, caseful */
+ OP_NOTPOSPLUS, /* 69 */
+ OP_NOTPOSQUERY, /* 70 */
+ OP_NOTPOSUPTO, /* 71 */
+
+ /**** Negated single character, caseless; must follow the caseful ones ****/
+
+ OP_NOTSTARI, /* 72 */
+ OP_NOTMINSTARI, /* 73 */
+ OP_NOTPLUSI, /* 74 */
+ OP_NOTMINPLUSI, /* 75 */
+ OP_NOTQUERYI, /* 76 */
+ OP_NOTMINQUERYI, /* 77 */
+
+ OP_NOTUPTOI, /* 78 From 0 to n matches, caseless */
+ OP_NOTMINUPTOI, /* 79 */
+ OP_NOTEXACTI, /* 80 Exactly n matches */
+
+ OP_NOTPOSSTARI, /* 81 Possessified versions, caseless */
+ OP_NOTPOSPLUSI, /* 82 */
+ OP_NOTPOSQUERYI, /* 83 */
+ OP_NOTPOSUPTOI, /* 84 */
+
+ /**** Character types ****/
+
+ OP_TYPESTAR, /* 85 The maximizing and minimizing versions of */
+ OP_TYPEMINSTAR, /* 86 these six opcodes must come in pairs, with */
+ OP_TYPEPLUS, /* 87 the minimizing one second. These codes must */
+ OP_TYPEMINPLUS, /* 88 be in exactly the same order as those above. */
+ OP_TYPEQUERY, /* 89 */
+ OP_TYPEMINQUERY, /* 90 */
+
+ OP_TYPEUPTO, /* 91 From 0 to n matches */
+ OP_TYPEMINUPTO, /* 92 */
+ OP_TYPEEXACT, /* 93 Exactly n matches */
+
+ OP_TYPEPOSSTAR, /* 94 Possessified versions */
+ OP_TYPEPOSPLUS, /* 95 */
+ OP_TYPEPOSQUERY, /* 96 */
+ OP_TYPEPOSUPTO, /* 97 */
+
+ /* These are used for character classes and back references; only the
+ first six are the same as the sets above. */
+
+ OP_CRSTAR, /* 98 The maximizing and minimizing versions of */
+ OP_CRMINSTAR, /* 99 all these opcodes must come in pairs, with */
+ OP_CRPLUS, /* 100 the minimizing one second. These codes must */
+ OP_CRMINPLUS, /* 101 be in exactly the same order as those above. */
+ OP_CRQUERY, /* 102 */
+ OP_CRMINQUERY, /* 103 */
+
+ OP_CRRANGE, /* 104 These are different to the three sets above. */
+ OP_CRMINRANGE, /* 105 */
+
+ /* End of quantifier opcodes */
+
+ OP_CLASS, /* 106 Match a character class, chars < 256 only */
+ OP_NCLASS, /* 107 Same, but the bitmap was created from a negative
+ class - the difference is relevant only when a
+ character > 255 is encountered. */
+ OP_XCLASS, /* 108 Extended class for handling > 255 chars within the
+ class. This does both positive and negative. */
+ OP_REF, /* 109 Match a back reference, casefully */
+ OP_REFI, /* 110 Match a back reference, caselessly */
+ OP_RECURSE, /* 111 Match a numbered subpattern (possibly recursive) */
+ OP_CALLOUT, /* 112 Call out to external function if provided */
+
+ OP_ALT, /* 113 Start of alternation */
+ OP_KET, /* 114 End of group that doesn't have an unbounded repeat */
+ OP_KETRMAX, /* 115 These two must remain together and in this */
+ OP_KETRMIN, /* 116 order. They are for groups the repeat for ever. */
+ OP_KETRPOS, /* 117 Possessive unlimited repeat. */
+
+ /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four
+ asserts must remain in order. */
+
+ OP_REVERSE, /* 118 Move pointer back - used in lookbehind assertions */
+ OP_ASSERT, /* 119 Positive lookahead */
+ OP_ASSERT_NOT, /* 120 Negative lookahead */
+ OP_ASSERTBACK, /* 121 Positive lookbehind */
+ OP_ASSERTBACK_NOT, /* 122 Negative lookbehind */
+
+ /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately
+ after the assertions, with ONCE first, as there's a test for >= ONCE for a
+ subpattern that isn't an assertion. The POS versions must immediately follow
+ the non-POS versions in each case. */
+
+ OP_ONCE, /* 123 Atomic group, contains captures */
+ OP_ONCE_NC, /* 124 Atomic group containing no captures */
+ OP_BRA, /* 125 Start of non-capturing bracket */
+ OP_BRAPOS, /* 126 Ditto, with unlimited, possessive repeat */
+ OP_CBRA, /* 127 Start of capturing bracket */
+ OP_CBRAPOS, /* 128 Ditto, with unlimited, possessive repeat */
+ OP_COND, /* 129 Conditional group */
+
+ /* These five must follow the previous five, in the same order. There's a
check for >= SBRA to distinguish the two sets. */
- OP_SBRA, /* 96 Start of non-capturing bracket, check empty */
- OP_SCBRA, /* 97 Start of capturing bracket, check empty */
- OP_SCOND, /* 98 Conditional group, check empty */
+ OP_SBRA, /* 130 Start of non-capturing bracket, check empty */
+ OP_SBRAPOS, /* 131 Ditto, with unlimited, possessive repeat */
+ OP_SCBRA, /* 132 Start of capturing bracket, check empty */
+ OP_SCBRAPOS, /* 133 Ditto, with unlimited, possessive repeat */
+ OP_SCOND, /* 134 Conditional group, check empty */
+
+ /* The next two pairs must (respectively) be kept together. */
- OP_CREF, /* 99 Used to hold a capture number as condition */
- OP_RREF, /* 100 Used to hold a recursion number as condition */
- OP_DEF, /* 101 The DEFINE condition */
+ OP_CREF, /* 135 Used to hold a capture number as condition */
+ OP_NCREF, /* 136 Same, but generated by a name reference*/
+ OP_RREF, /* 137 Used to hold a recursion number as condition */
+ OP_NRREF, /* 138 Same, but generated by a name reference*/
+ OP_DEF, /* 139 The DEFINE condition */
- OP_BRAZERO, /* 102 These two must remain together and in this */
- OP_BRAMINZERO, /* 103 order. */
+ OP_BRAZERO, /* 140 These two must remain together and in this */
+ OP_BRAMINZERO, /* 141 order. */
+ OP_BRAPOSZERO, /* 142 */
/* These are backtracking control verbs */
- OP_PRUNE, /* 104 */
- OP_SKIP, /* 105 */
- OP_THEN, /* 106 */
- OP_COMMIT, /* 107 */
+ OP_MARK, /* 143 always has an argument */
+ OP_PRUNE, /* 144 */
+ OP_PRUNE_ARG, /* 145 same, but with argument */
+ OP_SKIP, /* 146 */
+ OP_SKIP_ARG, /* 147 same, but with argument */
+ OP_THEN, /* 148 */
+ OP_THEN_ARG, /* 149 same, but with argument */
+ OP_COMMIT, /* 150 */
/* These are forced failure and success verbs */
- OP_FAIL, /* 108 */
- OP_ACCEPT /* 109 */
+ OP_FAIL, /* 151 */
+ OP_ACCEPT, /* 152 */
+ OP_ASSERT_ACCEPT, /* 153 Used inside assertions */
+ OP_CLOSE, /* 154 Used before OP_ACCEPT to close open captures */
+
+ /* This is used to skip a subpattern with a {0} quantifier */
+
+ OP_SKIPZERO, /* 155 */
+
+ /* This is not an opcode, but is used to check that tables indexed by opcode
+ are the correct length, in order to catch updating errors - there have been
+ some in the past. */
+
+ OP_TABLE_LENGTH
};
+/* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro
+definitions that follow must also be updated to match. There are also tables
+called "coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */
+
/* This macro defines textual names for all the opcodes. These are used only
-for debugging. The macro is referenced only in pcre_printint.c. */
+for debugging, and some of them are only partial names. The macro is referenced
+only in pcre_printint.c, which fills out the full names in many cases (and in
+some cases doesn't actually use these names at all). */
#define OP_NAME_LIST \
"End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d", \
- "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte", \
+ "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \
"notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \
"extuni", "\\Z", "\\z", \
- "Opt", "^", "$", "char", "charnc", "not", \
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "^", "^", "$", "$", "char", "chari", "not", "noti", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
"*+","++", "?+", "{", \
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
"*+","++", "?+", "{", \
"*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
"*+","++", "?+", "{", \
"*", "*?", "+", "+?", "?", "??", "{", "{", \
- "class", "nclass", "xclass", "Ref", "Recurse", "Callout", \
- "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not", \
- "AssertB", "AssertB not", "Reverse", \
- "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond", \
- "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero", \
- "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT"
+ "class", "nclass", "xclass", "Ref", "Refi", \
+ "Recurse", "Callout", \
+ "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \
+ "Reverse", "Assert", "Assert not", "AssertB", "AssertB not", \
+ "Once", "Once_NC", \
+ "Bra", "BraPos", "CBra", "CBraPos", \
+ "Cond", \
+ "SBra", "SBraPos", "SCBra", "SCBraPos", \
+ "SCond", \
+ "Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def", \
+ "Brazero", "Braminzero", "Braposzero", \
+ "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \
+ "*THEN", "*THEN", "*COMMIT", "*FAIL", \
+ "*ACCEPT", "*ASSERT_ACCEPT", \
+ "Close", "Skip zero"
/* This macro defines the length of fixed length operations in the compiled
@@ -820,64 +2202,88 @@ in UTF-8 mode. The code that uses this table must know about such things. */
1, /* End */ \
1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \
1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \
- 1, 1, /* Any, Anybyte */ \
- 3, 3, 1, /* NOTPROP, PROP, EXTUNI */ \
+ 1, 1, 1, /* Any, AllAny, Anybyte */ \
+ 3, 3, /* \P, \p */ \
1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \
- 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \
+ 1, /* \X */ \
+ 1, 1, 1, 1, 1, 1, /* \Z, \z, ^, ^M, $, $M */ \
2, /* Char - the minimum length */ \
- 2, /* Charnc - the minimum length */ \
+ 2, /* Chari - the minimum length */ \
2, /* not */ \
- /* Positive single-char repeats ** These are */ \
- 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
- 4, 4, 4, /* upto, minupto, exact ** UTF-8 mode */ \
- 2, 2, 2, 4, /* *+, ++, ?+, upto+ */ \
+ 2, /* noti */ \
+ /* Positive single-char repeats ** These are */ \
+ 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto, minupto ** mode */ \
+ 2+IMM2_SIZE, /* exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+, ++, ?+, upto+ */ \
+ 2, 2, 2, 2, 2, 2, /* *I, *?I, +I, +?I, ?I, ??I ** UTF-8 */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto I, minupto I */ \
+ 2+IMM2_SIZE, /* exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+I, ++I, ?+I, upto+I */ \
/* Negative single-char repeats - only for chars < 256 */ \
2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \
- 4, 4, 4, /* NOT upto, minupto, exact */ \
- 2, 2, 2, 4, /* Possessive *, +, ?, upto */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto, minupto */ \
+ 2+IMM2_SIZE, /* NOT exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *, +, ?, upto */ \
+ 2, 2, 2, 2, 2, 2, /* NOT *I, *?I, +I, +?I, ?I, ??I */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto I, minupto I */ \
+ 2+IMM2_SIZE, /* NOT exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *I, +I, ?I, upto I */ \
/* Positive type repeats */ \
2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \
- 4, 4, 4, /* Type upto, minupto, exact */ \
- 2, 2, 2, 4, /* Possessive *+, ++, ?+, upto+ */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* Type upto, minupto */ \
+ 2+IMM2_SIZE, /* Type exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive *+, ++, ?+, upto+ */ \
/* Character class & ref repeats */ \
1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \
- 5, 5, /* CRRANGE, CRMINRANGE */ \
- 33, /* CLASS */ \
- 33, /* NCLASS */ \
+ 1+2*IMM2_SIZE, 1+2*IMM2_SIZE, /* CRRANGE, CRMINRANGE */ \
+ 1+(32/sizeof(pcre_uchar)), /* CLASS */ \
+ 1+(32/sizeof(pcre_uchar)), /* NCLASS */ \
0, /* XCLASS - variable length */ \
- 3, /* REF */ \
+ 1+IMM2_SIZE, /* REF */ \
+ 1+IMM2_SIZE, /* REFI */ \
1+LINK_SIZE, /* RECURSE */ \
2+2*LINK_SIZE, /* CALLOUT */ \
1+LINK_SIZE, /* Alt */ \
1+LINK_SIZE, /* Ket */ \
1+LINK_SIZE, /* KetRmax */ \
1+LINK_SIZE, /* KetRmin */ \
+ 1+LINK_SIZE, /* KetRpos */ \
+ 1+LINK_SIZE, /* Reverse */ \
1+LINK_SIZE, /* Assert */ \
1+LINK_SIZE, /* Assert not */ \
1+LINK_SIZE, /* Assert behind */ \
1+LINK_SIZE, /* Assert behind not */ \
- 1+LINK_SIZE, /* Reverse */ \
1+LINK_SIZE, /* ONCE */ \
+ 1+LINK_SIZE, /* ONCE_NC */ \
1+LINK_SIZE, /* BRA */ \
- 3+LINK_SIZE, /* CBRA */ \
+ 1+LINK_SIZE, /* BRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRAPOS */ \
1+LINK_SIZE, /* COND */ \
1+LINK_SIZE, /* SBRA */ \
- 3+LINK_SIZE, /* SCBRA */ \
+ 1+LINK_SIZE, /* SBRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRAPOS */ \
1+LINK_SIZE, /* SCOND */ \
- 3, /* CREF */ \
- 3, /* RREF */ \
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* CREF, NCREF */ \
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* RREF, NRREF */ \
1, /* DEF */ \
- 1, 1, /* BRAZERO, BRAMINZERO */ \
- 1, 1, 1, 1, /* PRUNE, SKIP, THEN, COMMIT, */ \
- 1, 1 /* FAIL, ACCEPT */
+ 1, 1, 1, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ \
+ 3, 1, 3, /* MARK, PRUNE, PRUNE_ARG */ \
+ 1, 3, /* SKIP, SKIP_ARG */ \
+ 1, 3, /* THEN, THEN_ARG */ \
+ 1, 1, 1, 1, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */ \
+ 1+IMM2_SIZE, 1 /* CLOSE, SKIPZERO */
-
-/* A magic value for OP_RREF to indicate the "any recursion" condition. */
+/* A magic value for OP_RREF and OP_NRREF to indicate the "any recursion"
+condition. */
#define RREF_ANY 0xffff
-/* Error code numbers. They are given names so that they can more easily be
-tracked. */
+/* Compile time error code numbers. They are given names so that they can more
+easily be tracked. When a new number is added, the table called eint in
+pcreposix.c must be updated. */
enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19,
@@ -885,109 +2291,198 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
- ERR60, ERR61, ERR62, ERR63 };
+ ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
+ ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERRCOUNT };
+
+/* JIT compiling modes. The function list is indexed by them. */
+enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
+ JIT_NUMBER_OF_COMPILE_MODES };
/* The real format of the start of the pcre block; the index of names and the
code vector run on as long as necessary after the end. We store an explicit
offset to the name table so that if a regex is compiled on one host, saved, and
then run on another where the size of pointers is different, all might still
-be well. For the case of compiled-on-4 and run-on-8, we include an extra
-pointer that is always NULL. For future-proofing, a few dummy fields were
-originally included - even though you can never get this planning right - but
-there is only one left now.
-
-NOTE NOTE NOTE:
-Because people can now save and re-use compiled patterns, any additions to this
-structure should be made at the end, and something earlier (e.g. a new
-flag in the options or one of the dummy fields) should indicate that the new
-fields are present. Currently PCRE always sets the dummy fields to zero.
-NOTE NOTE NOTE:
+be well.
+
+The size of the structure must be a multiple of 8 bytes. For the case of
+compiled-on-4 and run-on-8, we include an extra pointer that is always NULL so
+that there are an even number of pointers which therefore are a multiple of 8
+bytes.
+
+It is necessary to fork the struct for the 32 bit library, since it needs to
+use pcre_uint32 for first_char and req_char. We can't put an ifdef inside the
+typedef because pcretest needs access to the struct of the 8-, 16- and 32-bit
+variants.
+
+*** WARNING ***
+When new fields are added to these structures, remember to adjust the code in
+pcre_byte_order.c that is concerned with swapping the byte order of the fields
+when a compiled regex is reloaded on a host with different endianness.
+*** WARNING ***
+There is also similar byte-flipping code in pcretest.c, which is used for
+testing the byte-flipping features. It must also be kept in step.
+*** WARNING ***
*/
-typedef struct real_pcre {
+typedef struct real_pcre8_or_16 {
pcre_uint32 magic_number;
pcre_uint32 size; /* Total that was malloced */
pcre_uint32 options; /* Public options */
- pcre_uint16 flags; /* Private flags */
- pcre_uint16 dummy1; /* For future use */
- pcre_uint16 top_bracket;
- pcre_uint16 top_backref;
- pcre_uint16 first_byte;
- pcre_uint16 req_byte;
+ pcre_uint32 flags; /* Private flags */
+ pcre_uint32 limit_match; /* Limit set from regex */
+ pcre_uint32 limit_recursion; /* Limit set from regex */
+ pcre_uint16 first_char; /* Starting character */
+ pcre_uint16 req_char; /* This character must be seen */
+ pcre_uint16 max_lookbehind; /* Longest lookbehind (characters) */
+ pcre_uint16 top_bracket; /* Highest numbered group */
+ pcre_uint16 top_backref; /* Highest numbered back reference */
pcre_uint16 name_table_offset; /* Offset to name table that follows */
pcre_uint16 name_entry_size; /* Size of any name items */
pcre_uint16 name_count; /* Number of name items */
pcre_uint16 ref_count; /* Reference count */
+ pcre_uint16 dummy1; /* To ensure size is a multiple of 8 */
+ pcre_uint16 dummy2; /* To ensure size is a multiple of 8 */
+ pcre_uint16 dummy3; /* To ensure size is a multiple of 8 */
+ const pcre_uint8 *tables; /* Pointer to tables or NULL for std */
+ void *nullpad; /* NULL padding */
+} real_pcre8_or_16;
- const unsigned char *tables; /* Pointer to tables or NULL for std */
- const unsigned char *nullpad; /* NULL padding */
-} real_pcre;
+typedef struct real_pcre8_or_16 real_pcre;
+typedef struct real_pcre8_or_16 real_pcre16;
+
+typedef struct real_pcre32 {
+ pcre_uint32 magic_number;
+ pcre_uint32 size; /* Total that was malloced */
+ pcre_uint32 options; /* Public options */
+ pcre_uint32 flags; /* Private flags */
+ pcre_uint32 limit_match; /* Limit set from regex */
+ pcre_uint32 limit_recursion; /* Limit set from regex */
+ pcre_uint32 first_char; /* Starting character */
+ pcre_uint32 req_char; /* This character must be seen */
+ pcre_uint16 max_lookbehind; /* Longest lookbehind (characters) */
+ pcre_uint16 top_bracket; /* Highest numbered group */
+ pcre_uint16 top_backref; /* Highest numbered back reference */
+ pcre_uint16 name_table_offset; /* Offset to name table that follows */
+ pcre_uint16 name_entry_size; /* Size of any name items */
+ pcre_uint16 name_count; /* Number of name items */
+ pcre_uint16 ref_count; /* Reference count */
+ pcre_uint16 dummy; /* To ensure size is a multiple of 8 */
+ const pcre_uint8 *tables; /* Pointer to tables or NULL for std */
+ void *nullpad; /* NULL padding */
+} real_pcre32;
+
+#if defined COMPILE_PCRE8
+#define REAL_PCRE real_pcre
+#elif defined COMPILE_PCRE16
+#define REAL_PCRE real_pcre16
+#elif defined COMPILE_PCRE32
+#define REAL_PCRE real_pcre32
+#endif
+
+/* Assert that the size of REAL_PCRE is divisible by 8 */
+typedef int __assert_real_pcre_size_divisible_8[(sizeof(REAL_PCRE) % 8) == 0 ? 1 : -1];
+
+/* Needed in pcretest to access some fields in the real_pcre* structures
+ * directly. They're unified for 8/16/32 bits since the structs only differ
+ * after these fields; if that ever changes, need to fork those defines into
+ * 8/16 and 32 bit versions. */
+#define REAL_PCRE_MAGIC(re) (((REAL_PCRE*)re)->magic_number)
+#define REAL_PCRE_SIZE(re) (((REAL_PCRE*)re)->size)
+#define REAL_PCRE_OPTIONS(re) (((REAL_PCRE*)re)->options)
+#define REAL_PCRE_FLAGS(re) (((REAL_PCRE*)re)->flags)
/* The format of the block used to store data from pcre_study(). The same
remark (see NOTE above) about extending this structure applies. */
typedef struct pcre_study_data {
pcre_uint32 size; /* Total that was malloced */
- pcre_uint32 options;
- uschar start_bits[32];
+ pcre_uint32 flags; /* Private flags */
+ pcre_uint8 start_bits[32]; /* Starting char bits */
+ pcre_uint32 minlength; /* Minimum subject length */
} pcre_study_data;
+/* Structure for building a chain of open capturing subpatterns during
+compiling, so that instructions to close them can be compiled when (*ACCEPT) is
+encountered. This is also used to identify subpatterns that contain recursive
+back references to themselves, so that they can be made atomic. */
+
+typedef struct open_capitem {
+ struct open_capitem *next; /* Chain link */
+ pcre_uint16 number; /* Capture number */
+ pcre_uint16 flag; /* Set TRUE if recursive back ref */
+} open_capitem;
+
/* Structure for passing "static" information around between the functions
doing the compiling, so that they are thread-safe. */
typedef struct compile_data {
- const uschar *lcc; /* Points to lower casing table */
- const uschar *fcc; /* Points to case-flipping table */
- const uschar *cbits; /* Points to character type table */
- const uschar *ctypes; /* Points to table of type maps */
- const uschar *start_workspace;/* The start of working space */
- const uschar *start_code; /* The start of the compiled code */
- const uschar *start_pattern; /* The start of the pattern */
- const uschar *end_pattern; /* The end of the pattern */
- uschar *hwm; /* High watermark of workspace */
- uschar *name_table; /* The name/number table */
- int names_found; /* Number of entries so far */
- int name_entry_size; /* Size of each entry */
- int bracount; /* Count of capturing parens as we compile */
- int final_bracount; /* Saved value after first pass */
- int top_backref; /* Maximum back reference */
- unsigned int backref_map; /* Bitmap of low back refs */
- int external_options; /* External (initial) options */
- int external_flags; /* External flag bits to be set */
- int req_varyopt; /* "After variable item" flag for reqbyte */
- BOOL had_accept; /* (*ACCEPT) encountered */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- uschar nl[4]; /* Newline string when fixed length */
+ const pcre_uint8 *lcc; /* Points to lower casing table */
+ const pcre_uint8 *fcc; /* Points to case-flipping table */
+ const pcre_uint8 *cbits; /* Points to character type table */
+ const pcre_uint8 *ctypes; /* Points to table of type maps */
+ const pcre_uchar *start_workspace;/* The start of working space */
+ const pcre_uchar *start_code; /* The start of the compiled code */
+ const pcre_uchar *start_pattern; /* The start of the pattern */
+ const pcre_uchar *end_pattern; /* The end of the pattern */
+ open_capitem *open_caps; /* Chain of open capture items */
+ pcre_uchar *hwm; /* High watermark of workspace */
+ pcre_uchar *name_table; /* The name/number table */
+ int names_found; /* Number of entries so far */
+ int name_entry_size; /* Size of each entry */
+ int workspace_size; /* Size of workspace */
+ unsigned int bracount; /* Count of capturing parens as we compile */
+ int final_bracount; /* Saved value after first pass */
+ int max_lookbehind; /* Maximum lookbehind (characters) */
+ int top_backref; /* Maximum back reference */
+ unsigned int backref_map; /* Bitmap of low back refs */
+ int assert_depth; /* Depth of nested assertions */
+ pcre_uint32 external_options; /* External (initial) options */
+ pcre_uint32 external_flags; /* External flag bits to be set */
+ int req_varyopt; /* "After variable item" flag for reqbyte */
+ BOOL had_accept; /* (*ACCEPT) encountered */
+ BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
+ BOOL check_lookbehind; /* Lookbehinds need later checking */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ pcre_uchar nl[4]; /* Newline string when fixed length */
} compile_data;
/* Structure for maintaining a chain of pointers to the currently incomplete
-branches, for testing for left recursion. */
+branches, for testing for left recursion while compiling. */
typedef struct branch_chain {
struct branch_chain *outer;
- uschar *current;
+ pcre_uchar *current_branch;
} branch_chain;
/* Structure for items in a linked list that represents an explicit recursive
-call within the pattern. */
+call within the pattern; used by pcre_exec(). */
typedef struct recursion_info {
struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
- int group_num; /* Number of group that was called */
- const uschar *after_call; /* "Return value": points after the call in the expr */
- USPTR save_start; /* Old value of mstart */
- int *offset_save; /* Pointer to start of saved offsets */
- int saved_max; /* Number of saved offsets */
+ unsigned int group_num; /* Number of group that was called */
+ int *offset_save; /* Pointer to start of saved offsets */
+ int saved_max; /* Number of saved offsets */
+ int saved_capture_last; /* Last capture number */
+ PCRE_PUCHAR subject_position; /* Position at start of recursion */
} recursion_info;
+/* A similar structure for pcre_dfa_exec(). */
+
+typedef struct dfa_recursion_info {
+ struct dfa_recursion_info *prevrec;
+ int group_num;
+ PCRE_PUCHAR subject_position;
+} dfa_recursion_info;
+
/* Structure for building a chain of data for holding the values of the subject
pointer at the start of each subpattern, so as to detect when an empty string
-has been matched by a subpattern - to break infinite loops. */
+has been matched by a subpattern - to break infinite loops; used by
+pcre_exec(). */
typedef struct eptrblock {
struct eptrblock *epb_prev;
- USPTR epb_saved_eptr;
+ PCRE_PUCHAR epb_saved_eptr;
} eptrblock;
@@ -995,58 +2490,78 @@ typedef struct eptrblock {
doing traditional NFA matching, so that they are thread-safe. */
typedef struct match_data {
-#ifdef ERLANG_INTEGRATION
+#if defined(ERLANG_INTEGRATION)
unsigned long int loop_limit;
void *state_save;
#endif
unsigned long int match_call_count; /* As it says */
unsigned long int match_limit; /* As it says */
unsigned long int match_limit_recursion; /* As it says */
- int *offset_vector; /* Offset vector */
- int offset_end; /* One past the end */
- int offset_max; /* The maximum usable for return data */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- uschar nl[4]; /* Newline string when fixed */
- const uschar *lcc; /* Points to lower casing table */
- const uschar *ctypes; /* Points to table of type maps */
- BOOL offset_overflow; /* Set if too many extractions */
- BOOL notbol; /* NOTBOL flag */
- BOOL noteol; /* NOTEOL flag */
- BOOL utf8; /* UTF8 flag */
- BOOL endonly; /* Dollar not before final \n */
- BOOL notempty; /* Empty string match not wanted */
- BOOL partial; /* PARTIAL flag */
- BOOL hitend; /* Hit the end of the subject at some point */
- BOOL bsr_anycrlf; /* \R is just any CRLF, not full Unicode */
- const uschar *start_code; /* For use when recursing */
- USPTR start_subject; /* Start of the subject string */
- USPTR end_subject; /* End of the subject string */
- USPTR start_match_ptr; /* Start of matched string */
- USPTR end_match_ptr; /* Subject position at end match */
- int end_offset_top; /* Highwater mark at end of match */
- int capture_last; /* Most recent capture number */
- int start_offset; /* The start offset value */
- eptrblock *eptrchain; /* Chain of eptrblocks for tail recursions */
- int eptrn; /* Next free eptrblock */
- recursion_info *recursive; /* Linked list of recursion data */
- void *callout_data; /* To pass back to callouts */
+ int *offset_vector; /* Offset vector */
+ int offset_end; /* One past the end */
+ int offset_max; /* The maximum usable for return data */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ int name_count; /* Number of names in name table */
+ int name_entry_size; /* Size of entry in names table */
+ unsigned int skip_arg_count; /* For counting SKIP_ARGs */
+ unsigned int ignore_skip_arg; /* For re-run when SKIP arg name not found */
+ pcre_uchar *name_table; /* Table of names */
+ pcre_uchar nl[4]; /* Newline string when fixed */
+ const pcre_uint8 *lcc; /* Points to lower casing table */
+ const pcre_uint8 *fcc; /* Points to case-flipping table */
+ const pcre_uint8 *ctypes; /* Points to table of type maps */
+ BOOL notbol; /* NOTBOL flag */
+ BOOL noteol; /* NOTEOL flag */
+ BOOL utf; /* UTF-8 / UTF-16 flag */
+ BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */
+ BOOL use_ucp; /* PCRE_UCP flag */
+ BOOL endonly; /* Dollar not before final \n */
+ BOOL notempty; /* Empty string match not wanted */
+ BOOL notempty_atstart; /* Empty string match at start not wanted */
+ BOOL hitend; /* Hit the end of the subject at some point */
+ BOOL bsr_anycrlf; /* \R is just any CRLF, not full Unicode */
+ BOOL hasthen; /* Pattern contains (*THEN) */
+ const pcre_uchar *start_code; /* For use when recursing */
+ PCRE_PUCHAR start_subject; /* Start of the subject string */
+ PCRE_PUCHAR end_subject; /* End of the subject string */
+ PCRE_PUCHAR start_match_ptr; /* Start of matched string */
+ PCRE_PUCHAR end_match_ptr; /* Subject position at end match */
+ PCRE_PUCHAR start_used_ptr; /* Earliest consulted character */
+ int partial; /* PARTIAL options */
+ int end_offset_top; /* Highwater mark at end of match */
+ pcre_int32 capture_last; /* Most recent capture number + overflow flag */
+ int start_offset; /* The start offset value */
+ int match_function_type; /* Set for certain special calls of MATCH() */
+ eptrblock *eptrchain; /* Chain of eptrblocks for tail recursions */
+ int eptrn; /* Next free eptrblock */
+ recursion_info *recursive; /* Linked list of recursion data */
+ void *callout_data; /* To pass back to callouts */
+ const pcre_uchar *mark; /* Mark pointer to pass back on success */
+ const pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
+ const pcre_uchar *once_target; /* Where to back up to for atomic groups */
+#ifdef NO_RECURSE
+ void *match_frames_base; /* For remembering malloc'd frames */
+#endif
} match_data;
/* A similar structure is used for the same purpose by the DFA matching
functions. */
typedef struct dfa_match_data {
- const uschar *start_code; /* Start of the compiled pattern */
- const uschar *start_subject; /* Start of the subject string */
- const uschar *end_subject; /* End of subject string */
- const uschar *tables; /* Character tables */
- int moptions; /* Match options */
- int poptions; /* Pattern options */
- int nltype; /* Newline type */
- int nllen; /* Newline string length */
- uschar nl[4]; /* Newline string when fixed */
- void *callout_data; /* To pass back to callouts */
+ const pcre_uchar *start_code; /* Start of the compiled pattern */
+ const pcre_uchar *start_subject ; /* Start of the subject string */
+ const pcre_uchar *end_subject; /* End of subject string */
+ const pcre_uchar *start_used_ptr; /* Earliest consulted character */
+ const pcre_uint8 *tables; /* Character tables */
+ int start_offset; /* The start offset value */
+ int moptions; /* Match options */
+ int poptions; /* Pattern options */
+ int nltype; /* Newline type */
+ int nllen; /* Newline string length */
+ pcre_uchar nl[4]; /* Newline string when fixed */
+ void *callout_data; /* To pass back to callouts */
+ dfa_recursion_info *recursive; /* Linked list of recursion data */
} dfa_match_data;
/* Bit definitions for entries in the pcre_ctypes table. */
@@ -1082,6 +2597,42 @@ total length. */
#define ctypes_offset (cbits_offset + cbit_length)
#define tables_length (ctypes_offset + 256)
+/* Internal function and data prefixes. */
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+#ifndef PUBL
+#define PUBL(name) erts_pcre_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _erts_pcre_##name
+#endif
+#else
+#ifndef PUBL
+#define PUBL(name) pcre_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _pcre_##name
+#endif
+#endif
+#elif defined COMPILE_PCRE16
+#ifndef PUBL
+#define PUBL(name) pcre16_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _pcre16_##name
+#endif
+#elif defined COMPILE_PCRE32
+#ifndef PUBL
+#define PUBL(name) pcre32_##name
+#endif
+#ifndef PRIV
+#define PRIV(name) _pcre32_##name
+#endif
+#else
+#error Unsupported compiling mode
+#endif /* COMPILE_PCRE[8|16|32] */
+
/* Layout of the UCP type table that translates property names into types and
codes. Each entry used to point directly to a name, but to reduce the number of
relocations in shared libraries, it now has an offset into a single string
@@ -1099,37 +2650,140 @@ of the exported public functions. They have to be "external" in the C sense,
but are not part of the PCRE public API. The data for these tables is in the
pcre_tables.c module. */
-extern const int _erts_pcre_utf8_table1[];
-extern const int _erts_pcre_utf8_table2[];
-extern const int _erts_pcre_utf8_table3[];
-extern const uschar _erts_pcre_utf8_table4[];
+#ifdef COMPILE_PCRE8
+extern const int PRIV(utf8_table1)[];
+extern const int PRIV(utf8_table1_size);
+extern const int PRIV(utf8_table2)[];
+extern const int PRIV(utf8_table3)[];
+extern const pcre_uint8 PRIV(utf8_table4)[];
+#endif /* COMPILE_PCRE8 */
-extern const int _erts_pcre_utf8_table1_size;
+extern const char PRIV(utt_names)[];
+extern const ucp_type_table PRIV(utt)[];
+extern const int PRIV(utt_size);
-extern const char _erts_pcre_utt_names[];
-extern const ucp_type_table _erts_pcre_utt[];
-extern const int _erts_pcre_utt_size;
+extern const pcre_uint8 PRIV(OP_lengths)[];
+extern const pcre_uint8 PRIV(default_tables)[];
-extern const uschar _erts_pcre_default_tables[];
-
-extern const uschar _erts_pcre_OP_lengths[];
+extern const pcre_uint32 PRIV(hspace_list)[];
+extern const pcre_uint32 PRIV(vspace_list)[];
/* Internal shared functions. These are functions that are used by more than
one of the exported public functions. They have to be "external" in the C
sense, but are not part of the PCRE public API. */
-extern BOOL _erts_pcre_is_newline(const uschar *, int, const uschar *,
- int *, BOOL);
-extern int _erts_pcre_ord2utf8(int, uschar *);
-extern real_pcre *_erts_pcre_try_flipped(const real_pcre *, real_pcre *,
- const pcre_study_data *, pcre_study_data *);
-extern int _erts_pcre_ucp_findprop(const unsigned int, int *, int *);
-extern unsigned int _erts_pcre_ucp_othercase(const unsigned int);
-extern int _erts_pcre_valid_utf8(const uschar *, int);
-extern BOOL _erts_pcre_was_newline(const uschar *, int, const uschar *,
- int *, BOOL);
-extern BOOL _erts_pcre_xclass(int, const uschar *);
+/* String comparison functions. */
+#if defined COMPILE_PCRE8
+
+#define STRCMP_UC_UC(str1, str2) \
+ strcmp((char *)(str1), (char *)(str2))
+#define STRCMP_UC_C8(str1, str2) \
+ strcmp((char *)(str1), (str2))
+#define STRNCMP_UC_UC(str1, str2, num) \
+ strncmp((char *)(str1), (char *)(str2), (num))
+#define STRNCMP_UC_C8(str1, str2, num) \
+ strncmp((char *)(str1), (str2), (num))
+#define STRLEN_UC(str) strlen((const char *)str)
+
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+
+extern int PRIV(strcmp_uc_uc)(const pcre_uchar *,
+ const pcre_uchar *);
+extern int PRIV(strcmp_uc_c8)(const pcre_uchar *,
+ const char *);
+extern int PRIV(strncmp_uc_uc)(const pcre_uchar *,
+ const pcre_uchar *, unsigned int num);
+extern int PRIV(strncmp_uc_c8)(const pcre_uchar *,
+ const char *, unsigned int num);
+extern unsigned int PRIV(strlen_uc)(const pcre_uchar *str);
+
+#define STRCMP_UC_UC(str1, str2) \
+ PRIV(strcmp_uc_uc)((str1), (str2))
+#define STRCMP_UC_C8(str1, str2) \
+ PRIV(strcmp_uc_c8)((str1), (str2))
+#define STRNCMP_UC_UC(str1, str2, num) \
+ PRIV(strncmp_uc_uc)((str1), (str2), (num))
+#define STRNCMP_UC_C8(str1, str2, num) \
+ PRIV(strncmp_uc_c8)((str1), (str2), (num))
+#define STRLEN_UC(str) PRIV(strlen_uc)(str)
+
+#endif /* COMPILE_PCRE[8|16|32] */
+
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+
+#define STRCMP_UC_UC_TEST(str1, str2) STRCMP_UC_UC(str1, str2)
+#define STRCMP_UC_C8_TEST(str1, str2) STRCMP_UC_C8(str1, str2)
+
+#elif defined COMPILE_PCRE32
+
+extern int PRIV(strcmp_uc_uc_utf)(const pcre_uchar *,
+ const pcre_uchar *);
+extern int PRIV(strcmp_uc_c8_utf)(const pcre_uchar *,
+ const char *);
+
+#define STRCMP_UC_UC_TEST(str1, str2) \
+ (utf ? PRIV(strcmp_uc_uc_utf)((str1), (str2)) : PRIV(strcmp_uc_uc)((str1), (str2)))
+#define STRCMP_UC_C8_TEST(str1, str2) \
+ (utf ? PRIV(strcmp_uc_c8_utf)((str1), (str2)) : PRIV(strcmp_uc_c8)((str1), (str2)))
+
+#endif /* COMPILE_PCRE[8|16|32] */
+
+extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
+extern BOOL PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
+ int *, BOOL);
+extern unsigned int PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
+extern int PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
+extern BOOL PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
+ int *, BOOL);
+extern BOOL PRIV(xclass)(pcre_uint32, const pcre_uchar *, BOOL);
+
+#ifdef SUPPORT_JIT
+extern void PRIV(jit_compile)(const REAL_PCRE *,
+ PUBL(extra) *, int);
+extern int PRIV(jit_exec)(const PUBL(extra) *,
+ const pcre_uchar *, int, int, int, int *, int);
+extern void PRIV(jit_free)(void *);
+extern int PRIV(jit_get_size)(void *);
+extern const char* PRIV(jit_get_target)(void);
+#endif
+
+/* Unicode character database (UCD) */
+
+typedef struct {
+ pcre_uint8 script; /* ucp_Arabic, etc. */
+ pcre_uint8 chartype; /* ucp_Cc, etc. (general categories) */
+ pcre_uint8 gbprop; /* ucp_gbControl, etc. (grapheme break property) */
+ pcre_uint8 caseset; /* offset to multichar other cases or zero */
+ pcre_int32 other_case; /* offset to other case, or zero if none */
+} ucd_record;
+
+extern const pcre_uint32 PRIV(ucd_caseless_sets)[];
+extern const ucd_record PRIV(ucd_records)[];
+extern const pcre_uint8 PRIV(ucd_stage1)[];
+extern const pcre_uint16 PRIV(ucd_stage2)[];
+extern const pcre_uint32 PRIV(ucp_gentype)[];
+extern const pcre_uint32 PRIV(ucp_gbtable)[];
+#ifdef SUPPORT_JIT
+extern const int PRIV(ucp_typerange)[];
+#endif
+
+#ifdef SUPPORT_UCP
+/* UCD access macros */
+
+#define UCD_BLOCK_SIZE 128
+#define GET_UCD(ch) (PRIV(ucd_records) + \
+ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
+ UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
+
+#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
+#define UCD_SCRIPT(ch) GET_UCD(ch)->script
+#define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
+#define UCD_GRAPHBREAK(ch) GET_UCD(ch)->gbprop
+#define UCD_CASESET(ch) GET_UCD(ch)->caseset
+#define UCD_OTHERCASE(ch) ((pcre_uint32)((int)ch + (int)(GET_UCD(ch)->other_case)))
+
+#endif /* SUPPORT_UCP */
#endif
diff --git a/erts/emulator/pcre/pcre_jit_compile.c b/erts/emulator/pcre/pcre_jit_compile.c
new file mode 100644
index 0000000000..fb26c62817
--- /dev/null
+++ b/erts/emulator/pcre/pcre_jit_compile.c
@@ -0,0 +1,9789 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Copyright (c) 1997-2013 University of Cambridge
+
+ The machine code generator part (this module) was written by Zoltan Herczeg
+ Copyright (c) 2010-2013
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+/* %ExternalCopyright% */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre_internal.h"
+
+#if defined SUPPORT_JIT
+
+/* All-in-one: Since we use the JIT compiler only from here,
+we just include it. This way we don't need to touch the build
+system files. */
+
+#define SLJIT_MALLOC(size) (PUBL(malloc))(size)
+#define SLJIT_FREE(ptr) (PUBL(free))(ptr)
+#define SLJIT_CONFIG_AUTO 1
+#define SLJIT_CONFIG_STATIC 1
+#define SLJIT_VERBOSE 0
+#define SLJIT_DEBUG 0
+
+#include "sljit/sljitLir.c"
+
+#if defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED
+#error Unsupported architecture
+#endif
+
+/* Defines for debugging purposes. */
+
+/* 1 - Use unoptimized capturing brackets.
+ 2 - Enable capture_last_ptr (includes option 1). */
+/* #define DEBUG_FORCE_UNOPTIMIZED_CBRAS 2 */
+
+/* 1 - Always have a control head. */
+/* #define DEBUG_FORCE_CONTROL_HEAD 1 */
+
+/* Allocate memory for the regex stack on the real machine stack.
+Fast, but limited size. */
+#define MACHINE_STACK_SIZE 32768
+
+/* Growth rate for stack allocated by the OS. Should be the multiply
+of page size. */
+#define STACK_GROWTH_RATE 8192
+
+/* Enable to check that the allocation could destroy temporaries. */
+#if defined SLJIT_DEBUG && SLJIT_DEBUG
+#define DESTROY_REGISTERS 1
+#endif
+
+/*
+Short summary about the backtracking mechanism empolyed by the jit code generator:
+
+The code generator follows the recursive nature of the PERL compatible regular
+expressions. The basic blocks of regular expressions are condition checkers
+whose execute different commands depending on the result of the condition check.
+The relationship between the operators can be horizontal (concatenation) and
+vertical (sub-expression) (See struct backtrack_common for more details).
+
+ 'ab' - 'a' and 'b' regexps are concatenated
+ 'a+' - 'a' is the sub-expression of the '+' operator
+
+The condition checkers are boolean (true/false) checkers. Machine code is generated
+for the checker itself and for the actions depending on the result of the checker.
+The 'true' case is called as the matching path (expected path), and the other is called as
+the 'backtrack' path. Branch instructions are expesive for all CPUs, so we avoid taken
+branches on the matching path.
+
+ Greedy star operator (*) :
+ Matching path: match happens.
+ Backtrack path: match failed.
+ Non-greedy star operator (*?) :
+ Matching path: no need to perform a match.
+ Backtrack path: match is required.
+
+The following example shows how the code generated for a capturing bracket
+with two alternatives. Let A, B, C, D are arbirary regular expressions, and
+we have the following regular expression:
+
+ A(B|C)D
+
+The generated code will be the following:
+
+ A matching path
+ '(' matching path (pushing arguments to the stack)
+ B matching path
+ ')' matching path (pushing arguments to the stack)
+ D matching path
+ return with successful match
+
+ D backtrack path
+ ')' backtrack path (If we arrived from "C" jump to the backtrack of "C")
+ B backtrack path
+ C expected path
+ jump to D matching path
+ C backtrack path
+ A backtrack path
+
+ Notice, that the order of backtrack code paths are the opposite of the fast
+ code paths. In this way the topmost value on the stack is always belong
+ to the current backtrack code path. The backtrack path must check
+ whether there is a next alternative. If so, it needs to jump back to
+ the matching path eventually. Otherwise it needs to clear out its own stack
+ frame and continue the execution on the backtrack code paths.
+*/
+
+/*
+Saved stack frames:
+
+Atomic blocks and asserts require reloading the values of private data
+when the backtrack mechanism performed. Because of OP_RECURSE, the data
+are not necessarly known in compile time, thus we need a dynamic restore
+mechanism.
+
+The stack frames are stored in a chain list, and have the following format:
+([ capturing bracket offset ][ start value ][ end value ])+ ... [ 0 ] [ previous head ]
+
+Thus we can restore the private data to a particular point in the stack.
+*/
+
+typedef struct jit_arguments {
+ /* Pointers first. */
+ struct sljit_stack *stack;
+ const pcre_uchar *str;
+ const pcre_uchar *begin;
+ const pcre_uchar *end;
+ int *offsets;
+ pcre_uchar *uchar_ptr;
+ pcre_uchar *mark_ptr;
+ void *callout_data;
+ /* Everything else after. */
+ pcre_uint32 limit_match;
+ int real_offset_count;
+ int offset_count;
+ pcre_uint8 notbol;
+ pcre_uint8 noteol;
+ pcre_uint8 notempty;
+ pcre_uint8 notempty_atstart;
+} jit_arguments;
+
+typedef struct executable_functions {
+ void *executable_funcs[JIT_NUMBER_OF_COMPILE_MODES];
+ PUBL(jit_callback) callback;
+ void *userdata;
+ pcre_uint32 top_bracket;
+ pcre_uint32 limit_match;
+ sljit_uw executable_sizes[JIT_NUMBER_OF_COMPILE_MODES];
+} executable_functions;
+
+typedef struct jump_list {
+ struct sljit_jump *jump;
+ struct jump_list *next;
+} jump_list;
+
+typedef struct stub_list {
+ struct sljit_jump *start;
+ struct sljit_label *quit;
+ struct stub_list *next;
+} stub_list;
+
+enum frame_types {
+ no_frame = -1,
+ no_stack = -2
+};
+
+enum control_types {
+ type_mark = 0,
+ type_then_trap = 1
+};
+
+typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);
+
+/* The following structure is the key data type for the recursive
+code generator. It is allocated by compile_matchingpath, and contains
+the arguments for compile_backtrackingpath. Must be the first member
+of its descendants. */
+typedef struct backtrack_common {
+ /* Concatenation stack. */
+ struct backtrack_common *prev;
+ jump_list *nextbacktracks;
+ /* Internal stack (for component operators). */
+ struct backtrack_common *top;
+ jump_list *topbacktracks;
+ /* Opcode pointer. */
+ pcre_uchar *cc;
+} backtrack_common;
+
+typedef struct assert_backtrack {
+ backtrack_common common;
+ jump_list *condfailed;
+ /* Less than 0 if a frame is not needed. */
+ int framesize;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+ /* For iterators. */
+ struct sljit_label *matchingpath;
+} assert_backtrack;
+
+typedef struct bracket_backtrack {
+ backtrack_common common;
+ /* Where to coninue if an alternative is successfully matched. */
+ struct sljit_label *alternative_matchingpath;
+ /* For rmin and rmax iterators. */
+ struct sljit_label *recursive_matchingpath;
+ /* For greedy ? operator. */
+ struct sljit_label *zero_matchingpath;
+ /* Contains the branches of a failed condition. */
+ union {
+ /* Both for OP_COND, OP_SCOND. */
+ jump_list *condfailed;
+ assert_backtrack *assert;
+ /* For OP_ONCE. Less than 0 if not needed. */
+ int framesize;
+ } u;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+} bracket_backtrack;
+
+typedef struct bracketpos_backtrack {
+ backtrack_common common;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+ /* Reverting stack is needed. */
+ int framesize;
+ /* Allocated stack size. */
+ int stacksize;
+} bracketpos_backtrack;
+
+typedef struct braminzero_backtrack {
+ backtrack_common common;
+ struct sljit_label *matchingpath;
+} braminzero_backtrack;
+
+typedef struct iterator_backtrack {
+ backtrack_common common;
+ /* Next iteration. */
+ struct sljit_label *matchingpath;
+} iterator_backtrack;
+
+typedef struct recurse_entry {
+ struct recurse_entry *next;
+ /* Contains the function entry. */
+ struct sljit_label *entry;
+ /* Collects the calls until the function is not created. */
+ jump_list *calls;
+ /* Points to the starting opcode. */
+ sljit_sw start;
+} recurse_entry;
+
+typedef struct recurse_backtrack {
+ backtrack_common common;
+ BOOL inlined_pattern;
+} recurse_backtrack;
+
+#define OP_THEN_TRAP OP_TABLE_LENGTH
+
+typedef struct then_trap_backtrack {
+ backtrack_common common;
+ /* If then_trap is not NULL, this structure contains the real
+ then_trap for the backtracking path. */
+ struct then_trap_backtrack *then_trap;
+ /* Points to the starting opcode. */
+ sljit_sw start;
+ /* Exit point for the then opcodes of this alternative. */
+ jump_list *quit;
+ /* Frame size of the current alternative. */
+ int framesize;
+} then_trap_backtrack;
+
+#define MAX_RANGE_SIZE 6
+
+typedef struct compiler_common {
+ /* The sljit ceneric compiler. */
+ struct sljit_compiler *compiler;
+ /* First byte code. */
+ pcre_uchar *start;
+ /* Maps private data offset to each opcode. */
+ sljit_si *private_data_ptrs;
+ /* Tells whether the capturing bracket is optimized. */
+ pcre_uint8 *optimized_cbracket;
+ /* Tells whether the starting offset is a target of then. */
+ pcre_uint8 *then_offsets;
+ /* Current position where a THEN must jump. */
+ then_trap_backtrack *then_trap;
+ /* Starting offset of private data for capturing brackets. */
+ int cbra_ptr;
+ /* Output vector starting point. Must be divisible by 2. */
+ int ovector_start;
+ /* Last known position of the requested byte. */
+ int req_char_ptr;
+ /* Head of the last recursion. */
+ int recursive_head_ptr;
+ /* First inspected character for partial matching. */
+ int start_used_ptr;
+ /* Starting pointer for partial soft matches. */
+ int hit_start;
+ /* End pointer of the first line. */
+ int first_line_end;
+ /* Points to the marked string. */
+ int mark_ptr;
+ /* Recursive control verb management chain. */
+ int control_head_ptr;
+ /* Points to the last matched capture block index. */
+ int capture_last_ptr;
+ /* Points to the starting position of the current match. */
+ int start_ptr;
+
+ /* Flipped and lower case tables. */
+ const pcre_uint8 *fcc;
+ sljit_sw lcc;
+ /* Mode can be PCRE_STUDY_JIT_COMPILE and others. */
+ int mode;
+ /* \K is found in the pattern. */
+ BOOL has_set_som;
+ /* (*SKIP:arg) is found in the pattern. */
+ BOOL has_skip_arg;
+ /* (*THEN) is found in the pattern. */
+ BOOL has_then;
+ /* Needs to know the start position anytime. */
+ BOOL needs_start_ptr;
+ /* Currently in recurse or negative assert. */
+ BOOL local_exit;
+ /* Currently in a positive assert. */
+ BOOL positive_assert;
+ /* Newline control. */
+ int nltype;
+ int newline;
+ int bsr_nltype;
+ /* Dollar endonly. */
+ int endonly;
+ /* Tables. */
+ sljit_sw ctypes;
+ int digits[2 + MAX_RANGE_SIZE];
+ /* Named capturing brackets. */
+ sljit_uw name_table;
+ sljit_sw name_count;
+ sljit_sw name_entry_size;
+
+ /* Labels and jump lists. */
+ struct sljit_label *partialmatchlabel;
+ struct sljit_label *quit_label;
+ struct sljit_label *forced_quit_label;
+ struct sljit_label *accept_label;
+ stub_list *stubs;
+ recurse_entry *entries;
+ recurse_entry *currententry;
+ jump_list *partialmatch;
+ jump_list *quit;
+ jump_list *positive_assert_quit;
+ jump_list *forced_quit;
+ jump_list *accept;
+ jump_list *calllimit;
+ jump_list *stackalloc;
+ jump_list *revertframes;
+ jump_list *wordboundary;
+ jump_list *anynewline;
+ jump_list *hspace;
+ jump_list *vspace;
+ jump_list *casefulcmp;
+ jump_list *caselesscmp;
+ jump_list *reset_match;
+ BOOL jscript_compat;
+#ifdef SUPPORT_UTF
+ BOOL utf;
+#ifdef SUPPORT_UCP
+ BOOL use_ucp;
+#endif
+#ifndef COMPILE_PCRE32
+ jump_list *utfreadchar;
+#endif
+#ifdef COMPILE_PCRE8
+ jump_list *utfreadtype8;
+#endif
+#endif /* SUPPORT_UTF */
+#ifdef SUPPORT_UCP
+ jump_list *getucd;
+#endif
+} compiler_common;
+
+/* For byte_sequence_compare. */
+
+typedef struct compare_context {
+ int length;
+ int sourcereg;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ int ucharptr;
+ union {
+ sljit_si asint;
+ sljit_uh asushort;
+#if defined COMPILE_PCRE8
+ sljit_ub asbyte;
+ sljit_ub asuchars[4];
+#elif defined COMPILE_PCRE16
+ sljit_uh asuchars[2];
+#elif defined COMPILE_PCRE32
+ sljit_ui asuchars[1];
+#endif
+ } c;
+ union {
+ sljit_si asint;
+ sljit_uh asushort;
+#if defined COMPILE_PCRE8
+ sljit_ub asbyte;
+ sljit_ub asuchars[4];
+#elif defined COMPILE_PCRE16
+ sljit_uh asuchars[2];
+#elif defined COMPILE_PCRE32
+ sljit_ui asuchars[1];
+#endif
+ } oc;
+#endif
+} compare_context;
+
+/* Undefine sljit macros. */
+#undef CMP
+
+/* Used for accessing the elements of the stack. */
+#define STACK(i) ((-(i) - 1) * (int)sizeof(sljit_sw))
+
+#define TMP1 SLJIT_SCRATCH_REG1
+#define TMP2 SLJIT_SCRATCH_REG3
+#define TMP3 SLJIT_TEMPORARY_EREG2
+#define STR_PTR SLJIT_SAVED_REG1
+#define STR_END SLJIT_SAVED_REG2
+#define STACK_TOP SLJIT_SCRATCH_REG2
+#define STACK_LIMIT SLJIT_SAVED_REG3
+#define ARGUMENTS SLJIT_SAVED_EREG1
+#define COUNT_MATCH SLJIT_SAVED_EREG2
+#define RETURN_ADDR SLJIT_TEMPORARY_EREG1
+
+/* Local space layout. */
+/* These two locals can be used by the current opcode. */
+#define LOCALS0 (0 * sizeof(sljit_sw))
+#define LOCALS1 (1 * sizeof(sljit_sw))
+/* Two local variables for possessive quantifiers (char1 cannot use them). */
+#define POSSESSIVE0 (2 * sizeof(sljit_sw))
+#define POSSESSIVE1 (3 * sizeof(sljit_sw))
+/* Max limit of recursions. */
+#define LIMIT_MATCH (4 * sizeof(sljit_sw))
+/* The output vector is stored on the stack, and contains pointers
+to characters. The vector data is divided into two groups: the first
+group contains the start / end character pointers, and the second is
+the start pointers when the end of the capturing group has not yet reached. */
+#define OVECTOR_START (common->ovector_start)
+#define OVECTOR(i) (OVECTOR_START + (i) * sizeof(sljit_sw))
+#define OVECTOR_PRIV(i) (common->cbra_ptr + (i) * sizeof(sljit_sw))
+#define PRIVATE_DATA(cc) (common->private_data_ptrs[(cc) - common->start])
+
+#if defined COMPILE_PCRE8
+#define MOV_UCHAR SLJIT_MOV_UB
+#define MOVU_UCHAR SLJIT_MOVU_UB
+#elif defined COMPILE_PCRE16
+#define MOV_UCHAR SLJIT_MOV_UH
+#define MOVU_UCHAR SLJIT_MOVU_UH
+#elif defined COMPILE_PCRE32
+#define MOV_UCHAR SLJIT_MOV_UI
+#define MOVU_UCHAR SLJIT_MOVU_UI
+#else
+#error Unsupported compiling mode
+#endif
+
+/* Shortcuts. */
+#define DEFINE_COMPILER \
+ struct sljit_compiler *compiler = common->compiler
+#define OP1(op, dst, dstw, src, srcw) \
+ sljit_emit_op1(compiler, (op), (dst), (dstw), (src), (srcw))
+#define OP2(op, dst, dstw, src1, src1w, src2, src2w) \
+ sljit_emit_op2(compiler, (op), (dst), (dstw), (src1), (src1w), (src2), (src2w))
+#define LABEL() \
+ sljit_emit_label(compiler)
+#define JUMP(type) \
+ sljit_emit_jump(compiler, (type))
+#define JUMPTO(type, label) \
+ sljit_set_label(sljit_emit_jump(compiler, (type)), (label))
+#define JUMPHERE(jump) \
+ sljit_set_label((jump), sljit_emit_label(compiler))
+#define SET_LABEL(jump, label) \
+ sljit_set_label((jump), (label))
+#define CMP(type, src1, src1w, src2, src2w) \
+ sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w))
+#define CMPTO(type, src1, src1w, src2, src2w, label) \
+ sljit_set_label(sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w)), (label))
+#define OP_FLAGS(op, dst, dstw, src, srcw, type) \
+ sljit_emit_op_flags(compiler, (op), (dst), (dstw), (src), (srcw), (type))
+#define GET_LOCAL_BASE(dst, dstw, offset) \
+ sljit_get_local_base(compiler, (dst), (dstw), (offset))
+
+static pcre_uchar* bracketend(pcre_uchar* cc)
+{
+SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND));
+do cc += GET(cc, 1); while (*cc == OP_ALT);
+SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
+cc += 1 + LINK_SIZE;
+return cc;
+}
+
+/* Functions whose might need modification for all new supported opcodes:
+ next_opcode
+ check_opcode_types
+ set_private_data_ptrs
+ get_framesize
+ init_frame
+ get_private_data_copy_length
+ copy_private_data
+ compile_matchingpath
+ compile_backtrackingpath
+*/
+
+static pcre_uchar *next_opcode(compiler_common *common, pcre_uchar *cc)
+{
+SLJIT_UNUSED_ARG(common);
+switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_REF:
+ case OP_REFI:
+ case OP_RECURSE:
+ case OP_CALLOUT:
+ case OP_ALT:
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_REVERSE:
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_BRAPOS:
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ case OP_SCOND:
+ case OP_CREF:
+ case OP_NCREF:
+ case OP_RREF:
+ case OP_NRREF:
+ case OP_DEF:
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ case OP_PRUNE:
+ case OP_SKIP:
+ case OP_THEN:
+ case OP_COMMIT:
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ case OP_CLOSE:
+ case OP_SKIPZERO:
+ return cc + PRIV(OP_lengths)[*cc];
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ cc += PRIV(OP_lengths)[*cc];
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ return cc;
+
+ /* Special cases. */
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ return cc + PRIV(OP_lengths)[*cc] - 1;
+
+ case OP_ANYBYTE:
+#ifdef SUPPORT_UTF
+ if (common->utf) return NULL;
+#endif
+ return cc + 1;
+
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+ return cc + GET(cc, 1);
+#endif
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ return cc + 1 + 2 + cc[1];
+
+ default:
+ /* All opcodes are supported now! */
+ SLJIT_ASSERT_STOP();
+ return NULL;
+ }
+}
+
+static BOOL check_opcode_types(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend)
+{
+pcre_uchar *name;
+pcre_uchar *name2;
+unsigned int cbra_index;
+int i;
+
+/* Calculate important variables (like stack size) and checks whether all opcodes are supported. */
+while (cc < ccend)
+ {
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ common->has_set_som = TRUE;
+ cc += 1;
+ break;
+
+ case OP_REF:
+ case OP_REFI:
+ common->optimized_cbracket[GET2(cc, 1)] = 0;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] = 0;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ case OP_SCOND:
+ /* Only AUTO_CALLOUT can insert this opcode. We do
+ not intend to support this case. */
+ if (cc[1 + LINK_SIZE] == OP_CALLOUT)
+ return FALSE;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CREF:
+ i = GET2(cc, 1);
+ common->optimized_cbracket[i] = 0;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_NCREF:
+ cbra_index = GET2(cc, 1);
+ name = (pcre_uchar *)common->name_table;
+ name2 = name;
+ for (i = 0; i < common->name_count; i++)
+ {
+ if (GET2(name, 0) == cbra_index) break;
+ name += common->name_entry_size;
+ }
+ SLJIT_ASSERT(i != common->name_count);
+
+ for (i = 0; i < common->name_count; i++)
+ {
+ if (STRCMP_UC_UC(name2 + IMM2_SIZE, name + IMM2_SIZE) == 0)
+ common->optimized_cbracket[GET2(name2, 0)] = 0;
+ name2 += common->name_entry_size;
+ }
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_RECURSE:
+ /* Set its value only once. */
+ if (common->recursive_head_ptr == 0)
+ {
+ common->recursive_head_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CALLOUT:
+ if (common->capture_last_ptr == 0)
+ {
+ common->capture_last_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += 2 + 2 * LINK_SIZE;
+ break;
+
+ case OP_THEN_ARG:
+ common->has_then = TRUE;
+ common->control_head_ptr = 1;
+ /* Fall through. */
+
+ case OP_PRUNE_ARG:
+ common->needs_start_ptr = TRUE;
+ /* Fall through. */
+
+ case OP_MARK:
+ if (common->mark_ptr == 0)
+ {
+ common->mark_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_THEN:
+ common->has_then = TRUE;
+ common->control_head_ptr = 1;
+ /* Fall through. */
+
+ case OP_PRUNE:
+ case OP_SKIP:
+ common->needs_start_ptr = TRUE;
+ cc += 1;
+ break;
+
+ case OP_SKIP_ARG:
+ common->control_head_ptr = 1;
+ common->has_skip_arg = TRUE;
+ cc += 1 + 2 + cc[1];
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ if (cc == NULL)
+ return FALSE;
+ break;
+ }
+ }
+return TRUE;
+}
+
+static int get_class_iterator_size(pcre_uchar *cc)
+{
+switch(*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRPLUS:
+ return 2;
+
+ case OP_CRMINSTAR:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ return 1;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ if (GET2(cc, 1) == GET2(cc, 1 + IMM2_SIZE))
+ return 0;
+ return 2;
+
+ default:
+ return 0;
+ }
+}
+
+static BOOL detect_repeat(compiler_common *common, pcre_uchar *begin)
+{
+pcre_uchar *end = bracketend(begin);
+pcre_uchar *next;
+pcre_uchar *next_end;
+pcre_uchar *max_end;
+pcre_uchar type;
+sljit_sw length = end - begin;
+int min, max, i;
+
+/* Detect fixed iterations first. */
+if (end[-(1 + LINK_SIZE)] != OP_KET)
+ return FALSE;
+
+/* Already detected repeat. */
+if (common->private_data_ptrs[end - common->start - LINK_SIZE] != 0)
+ return TRUE;
+
+next = end;
+min = 1;
+while (1)
+ {
+ if (*next != *begin)
+ break;
+ next_end = bracketend(next);
+ if (next_end - next != length || memcmp(begin, next, IN_UCHARS(length)) != 0)
+ break;
+ next = next_end;
+ min++;
+ }
+
+if (min == 2)
+ return FALSE;
+
+max = 0;
+max_end = next;
+if (*next == OP_BRAZERO || *next == OP_BRAMINZERO)
+ {
+ type = *next;
+ while (1)
+ {
+ if (next[0] != type || next[1] != OP_BRA || next[2 + LINK_SIZE] != *begin)
+ break;
+ next_end = bracketend(next + 2 + LINK_SIZE);
+ if (next_end - next != (length + 2 + LINK_SIZE) || memcmp(begin, next + 2 + LINK_SIZE, IN_UCHARS(length)) != 0)
+ break;
+ next = next_end;
+ max++;
+ }
+
+ if (next[0] == type && next[1] == *begin && max >= 1)
+ {
+ next_end = bracketend(next + 1);
+ if (next_end - next == (length + 1) && memcmp(begin, next + 1, IN_UCHARS(length)) == 0)
+ {
+ for (i = 0; i < max; i++, next_end += 1 + LINK_SIZE)
+ if (*next_end != OP_KET)
+ break;
+
+ if (i == max)
+ {
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE] = next_end - max_end;
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE + 1] = (type == OP_BRAZERO) ? OP_UPTO : OP_MINUPTO;
+ /* +2 the original and the last. */
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE + 2] = max + 2;
+ if (min == 1)
+ return TRUE;
+ min--;
+ max_end -= (1 + LINK_SIZE) + GET(max_end, -LINK_SIZE);
+ }
+ }
+ }
+ }
+
+if (min >= 3)
+ {
+ common->private_data_ptrs[end - common->start - LINK_SIZE] = max_end - end;
+ common->private_data_ptrs[end - common->start - LINK_SIZE + 1] = OP_EXACT;
+ common->private_data_ptrs[end - common->start - LINK_SIZE + 2] = min;
+ return TRUE;
+ }
+
+return FALSE;
+}
+
+#define CASE_ITERATOR_PRIVATE_DATA_1 \
+ case OP_MINSTAR: \
+ case OP_MINPLUS: \
+ case OP_QUERY: \
+ case OP_MINQUERY: \
+ case OP_MINSTARI: \
+ case OP_MINPLUSI: \
+ case OP_QUERYI: \
+ case OP_MINQUERYI: \
+ case OP_NOTMINSTAR: \
+ case OP_NOTMINPLUS: \
+ case OP_NOTQUERY: \
+ case OP_NOTMINQUERY: \
+ case OP_NOTMINSTARI: \
+ case OP_NOTMINPLUSI: \
+ case OP_NOTQUERYI: \
+ case OP_NOTMINQUERYI:
+
+#define CASE_ITERATOR_PRIVATE_DATA_2A \
+ case OP_STAR: \
+ case OP_PLUS: \
+ case OP_STARI: \
+ case OP_PLUSI: \
+ case OP_NOTSTAR: \
+ case OP_NOTPLUS: \
+ case OP_NOTSTARI: \
+ case OP_NOTPLUSI:
+
+#define CASE_ITERATOR_PRIVATE_DATA_2B \
+ case OP_UPTO: \
+ case OP_MINUPTO: \
+ case OP_UPTOI: \
+ case OP_MINUPTOI: \
+ case OP_NOTUPTO: \
+ case OP_NOTMINUPTO: \
+ case OP_NOTUPTOI: \
+ case OP_NOTMINUPTOI:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_1 \
+ case OP_TYPEMINSTAR: \
+ case OP_TYPEMINPLUS: \
+ case OP_TYPEQUERY: \
+ case OP_TYPEMINQUERY:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2A \
+ case OP_TYPESTAR: \
+ case OP_TYPEPLUS:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2B \
+ case OP_TYPEUPTO: \
+ case OP_TYPEMINUPTO:
+
+static void set_private_data_ptrs(compiler_common *common, int *private_data_start, pcre_uchar *ccend)
+{
+pcre_uchar *cc = common->start;
+pcre_uchar *alternative;
+pcre_uchar *end = NULL;
+int private_data_ptr = *private_data_start;
+int space, size, bracketlen;
+
+while (cc < ccend)
+ {
+ space = 0;
+ size = 0;
+ bracketlen = 0;
+ if (private_data_ptr > SLJIT_MAX_LOCAL_SIZE)
+ return;
+
+ if (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND)
+ if (detect_repeat(common, cc))
+ {
+ /* These brackets are converted to repeats, so no global
+ based single character repeat is allowed. */
+ if (cc >= end)
+ end = bracketend(cc);
+ }
+
+ switch(*cc)
+ {
+ case OP_KET:
+ if (common->private_data_ptrs[cc + 1 - common->start] != 0)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ cc += common->private_data_ptrs[cc + 1 - common->start];
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ }
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_BRA:
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ space = 1;
+ size = -2;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ space = 2;
+ size = -2;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ space = 2;
+ size = -(2 + IMM2_SIZE);
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ space = 1;
+ size = 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI)
+ space = 2;
+ size = 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI)
+ space = 2;
+ size = 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ size += 1 + 32 / sizeof(pcre_uchar);
+ space = get_class_iterator_size(cc + size);
+ break;
+
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+ size = GET(cc, 1);
+ space = get_class_iterator_size(cc + size);
+ break;
+#endif
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+ /* Character iterators, which are not inside a repeated bracket,
+ gets a private slot instead of allocating it on the stack. */
+ if (space > 0 && cc >= end)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw) * space;
+ }
+
+ if (size != 0)
+ {
+ if (size < 0)
+ {
+ cc += -size;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ }
+ else
+ cc += size;
+ }
+
+ if (bracketlen > 0)
+ {
+ if (cc >= end)
+ {
+ end = bracketend(cc);
+ if (end[-1 - LINK_SIZE] == OP_KET)
+ end = NULL;
+ }
+ cc += bracketlen;
+ }
+ }
+*private_data_start = private_data_ptr;
+}
+
+/* Returns with a frame_types (always < 0) if no need for frame. */
+static int get_framesize(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, BOOL recursive, BOOL* needs_control_head)
+{
+int length = 0;
+int possessive = 0;
+BOOL stack_restore = FALSE;
+BOOL setsom_found = recursive;
+BOOL setmark_found = recursive;
+/* The last capture is a local variable even for recursions. */
+BOOL capture_last_found = FALSE;
+
+#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
+SLJIT_ASSERT(common->control_head_ptr != 0);
+*needs_control_head = TRUE;
+#else
+*needs_control_head = FALSE;
+#endif
+
+if (ccend == NULL)
+ {
+ ccend = bracketend(cc) - (1 + LINK_SIZE);
+ if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS))
+ {
+ possessive = length = (common->capture_last_ptr != 0) ? 5 : 3;
+ /* This is correct regardless of common->capture_last_ptr. */
+ capture_last_found = TRUE;
+ }
+ cc = next_opcode(common, cc);
+ }
+
+SLJIT_ASSERT(cc != NULL);
+while (cc < ccend)
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ SLJIT_ASSERT(common->has_set_som);
+ stack_restore = TRUE;
+ if (!setsom_found)
+ {
+ length += 2;
+ setsom_found = TRUE;
+ }
+ cc += 1;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_THEN_ARG:
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ stack_restore = TRUE;
+ if (!setmark_found)
+ {
+ length += 2;
+ setmark_found = TRUE;
+ }
+ if (common->control_head_ptr != 0)
+ *needs_control_head = TRUE;
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_RECURSE:
+ stack_restore = TRUE;
+ if (common->has_set_som && !setsom_found)
+ {
+ length += 2;
+ setsom_found = TRUE;
+ }
+ if (common->mark_ptr != 0 && !setmark_found)
+ {
+ length += 2;
+ setmark_found = TRUE;
+ }
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ length += 2;
+ capture_last_found = TRUE;
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ stack_restore = TRUE;
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ length += 2;
+ capture_last_found = TRUE;
+ }
+ length += 3;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ default:
+ stack_restore = TRUE;
+ /* Fall through. */
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_XCLASS:
+
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+/* Possessive quantifiers can use a special case. */
+if (SLJIT_UNLIKELY(possessive == length))
+ return stack_restore ? no_frame : no_stack;
+
+if (length > 0)
+ return length + 1;
+return stack_restore ? no_frame : no_stack;
+}
+
+static void init_frame(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, int stackpos, int stacktop, BOOL recursive)
+{
+DEFINE_COMPILER;
+BOOL setsom_found = recursive;
+BOOL setmark_found = recursive;
+/* The last capture is a local variable even for recursions. */
+BOOL capture_last_found = FALSE;
+int offset;
+
+/* >= 1 + shortest item size (2) */
+SLJIT_UNUSED_ARG(stacktop);
+SLJIT_ASSERT(stackpos >= stacktop + 2);
+
+stackpos = STACK(stackpos);
+if (ccend == NULL)
+ {
+ ccend = bracketend(cc) - (1 + LINK_SIZE);
+ if (recursive || (*cc != OP_CBRAPOS && *cc != OP_SCBRAPOS))
+ cc = next_opcode(common, cc);
+ }
+
+SLJIT_ASSERT(cc != NULL);
+while (cc < ccend)
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ SLJIT_ASSERT(common->has_set_som);
+ if (!setsom_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setsom_found = TRUE;
+ }
+ cc += 1;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_THEN_ARG:
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ if (!setmark_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setmark_found = TRUE;
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_RECURSE:
+ if (common->has_set_som && !setsom_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setsom_found = TRUE;
+ }
+ if (common->mark_ptr != 0 && !setmark_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setmark_found = TRUE;
+ }
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ capture_last_found = TRUE;
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ capture_last_found = TRUE;
+ }
+ offset = (GET2(cc, 1 + LINK_SIZE)) << 1;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, OVECTOR(offset));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP2, 0);
+ stackpos += (int)sizeof(sljit_sw);
+
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, 0);
+SLJIT_ASSERT(stackpos == STACK(stacktop));
+}
+
+static SLJIT_INLINE int get_private_data_copy_length(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, BOOL needs_control_head)
+{
+int private_data_length = needs_control_head ? 3 : 2;
+int size;
+pcre_uchar *alternative;
+/* Calculate the sum of the private machine words. */
+while (cc < ccend)
+ {
+ size = 0;
+ switch(*cc)
+ {
+ case OP_KET:
+ if (PRIVATE_DATA(cc) != 0)
+ private_data_length++;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ private_data_length++;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ private_data_length++;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ private_data_length += 2;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ private_data_length++;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ private_data_length++;
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ private_data_length++;
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+ size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(pcre_uchar);
+#else
+ size = 1 + 32 / (int)sizeof(pcre_uchar);
+#endif
+ if (PRIVATE_DATA(cc))
+ private_data_length += get_class_iterator_size(cc + size);
+ cc += size;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+ }
+SLJIT_ASSERT(cc == ccend);
+return private_data_length;
+}
+
+static void copy_private_data(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend,
+ BOOL save, int stackptr, int stacktop, BOOL needs_control_head)
+{
+DEFINE_COMPILER;
+int srcw[2];
+int count, size;
+BOOL tmp1next = TRUE;
+BOOL tmp1empty = TRUE;
+BOOL tmp2empty = TRUE;
+pcre_uchar *alternative;
+enum {
+ start,
+ loop,
+ end
+} status;
+
+status = save ? start : loop;
+stackptr = STACK(stackptr - 2);
+stacktop = STACK(stacktop - 1);
+
+if (!save)
+ {
+ stackptr += (needs_control_head ? 2 : 1) * sizeof(sljit_sw);
+ if (stackptr < stacktop)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ tmp1empty = FALSE;
+ }
+ if (stackptr < stacktop)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ tmp2empty = FALSE;
+ }
+ /* The tmp1next must be TRUE in either way. */
+ }
+
+do
+ {
+ count = 0;
+ switch(status)
+ {
+ case start:
+ SLJIT_ASSERT(save && common->recursive_head_ptr != 0);
+ count = 1;
+ srcw[0] = common->recursive_head_ptr;
+ if (needs_control_head)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+ count = 2;
+ srcw[1] = common->control_head_ptr;
+ }
+ status = loop;
+ break;
+
+ case loop:
+ if (cc >= ccend)
+ {
+ status = end;
+ break;
+ }
+
+ switch(*cc)
+ {
+ case OP_KET:
+ if (PRIVATE_DATA(cc) != 0)
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ SLJIT_ASSERT(srcw[0] != 0);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ {
+ count = 1;
+ srcw[0] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
+ }
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
+ SLJIT_ASSERT(srcw[0] != 0 && srcw[1] != 0);
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ SLJIT_ASSERT(srcw[0] != 0);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ }
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
+ }
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
+ }
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ }
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ }
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ }
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+ size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(pcre_uchar);
+#else
+ size = 1 + 32 / (int)sizeof(pcre_uchar);
+#endif
+ if (PRIVATE_DATA(cc))
+ switch(get_class_iterator_size(cc + size))
+ {
+ case 1:
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ break;
+
+ case 2:
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ cc += size;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+ break;
+
+ case end:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+ while (count > 0)
+ {
+ count--;
+ if (save)
+ {
+ if (tmp1next)
+ {
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count]);
+ tmp1empty = FALSE;
+ tmp1next = FALSE;
+ }
+ else
+ {
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count]);
+ tmp2empty = FALSE;
+ tmp1next = TRUE;
+ }
+ }
+ else
+ {
+ if (tmp1next)
+ {
+ SLJIT_ASSERT(!tmp1empty);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count], TMP1, 0);
+ tmp1empty = stackptr >= stacktop;
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ }
+ tmp1next = FALSE;
+ }
+ else
+ {
+ SLJIT_ASSERT(!tmp2empty);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count], TMP2, 0);
+ tmp2empty = stackptr >= stacktop;
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ }
+ tmp1next = TRUE;
+ }
+ }
+ }
+ }
+while (status != end);
+
+if (save)
+ {
+ if (tmp1next)
+ {
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ }
+ else
+ {
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ }
+ }
+SLJIT_ASSERT(cc == ccend && stackptr == stacktop && (save || (tmp1empty && tmp2empty)));
+}
+
+static SLJIT_INLINE pcre_uchar *set_then_offsets(compiler_common *common, pcre_uchar *cc, pcre_uint8 *current_offset)
+{
+pcre_uchar *end = bracketend(cc);
+BOOL has_alternatives = cc[GET(cc, 1)] == OP_ALT;
+
+/* Assert captures then. */
+if (*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT)
+ current_offset = NULL;
+/* Conditional block does not. */
+if (*cc == OP_COND || *cc == OP_SCOND)
+ has_alternatives = FALSE;
+
+cc = next_opcode(common, cc);
+if (has_alternatives)
+ current_offset = common->then_offsets + (cc - common->start);
+
+while (cc < end)
+ {
+ if ((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND))
+ cc = set_then_offsets(common, cc, current_offset);
+ else
+ {
+ if (*cc == OP_ALT && has_alternatives)
+ current_offset = common->then_offsets + (cc + 1 + LINK_SIZE - common->start);
+ if (*cc >= OP_THEN && *cc <= OP_THEN_ARG && current_offset != NULL)
+ *current_offset = 1;
+ cc = next_opcode(common, cc);
+ }
+ }
+
+return end;
+}
+
+#undef CASE_ITERATOR_PRIVATE_DATA_1
+#undef CASE_ITERATOR_PRIVATE_DATA_2A
+#undef CASE_ITERATOR_PRIVATE_DATA_2B
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+
+static SLJIT_INLINE BOOL is_powerof2(unsigned int value)
+{
+return (value & (value - 1)) == 0;
+}
+
+static SLJIT_INLINE void set_jumps(jump_list *list, struct sljit_label *label)
+{
+while (list)
+ {
+ /* sljit_set_label is clever enough to do nothing
+ if either the jump or the label is NULL. */
+ SET_LABEL(list->jump, label);
+ list = list->next;
+ }
+}
+
+static SLJIT_INLINE void add_jump(struct sljit_compiler *compiler, jump_list **list, struct sljit_jump* jump)
+{
+jump_list *list_item = sljit_alloc_memory(compiler, sizeof(jump_list));
+if (list_item)
+ {
+ list_item->next = *list;
+ list_item->jump = jump;
+ *list = list_item;
+ }
+}
+
+static void add_stub(compiler_common *common, struct sljit_jump *start)
+{
+DEFINE_COMPILER;
+stub_list* list_item = sljit_alloc_memory(compiler, sizeof(stub_list));
+
+if (list_item)
+ {
+ list_item->start = start;
+ list_item->quit = LABEL();
+ list_item->next = common->stubs;
+ common->stubs = list_item;
+ }
+}
+
+static void flush_stubs(compiler_common *common)
+{
+DEFINE_COMPILER;
+stub_list* list_item = common->stubs;
+
+while (list_item)
+ {
+ JUMPHERE(list_item->start);
+ add_jump(compiler, &common->stackalloc, JUMP(SLJIT_FAST_CALL));
+ JUMPTO(SLJIT_JUMP, list_item->quit);
+ list_item = list_item->next;
+ }
+common->stubs = NULL;
+}
+
+static SLJIT_INLINE void count_match(compiler_common *common)
+{
+DEFINE_COMPILER;
+
+OP2(SLJIT_SUB | SLJIT_SET_E, COUNT_MATCH, 0, COUNT_MATCH, 0, SLJIT_IMM, 1);
+add_jump(compiler, &common->calllimit, JUMP(SLJIT_C_ZERO));
+}
+
+static SLJIT_INLINE void allocate_stack(compiler_common *common, int size)
+{
+/* May destroy all locals and registers except TMP2. */
+DEFINE_COMPILER;
+
+OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
+#ifdef DESTROY_REGISTERS
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 12345);
+OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, TMP1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP1, 0);
+#endif
+add_stub(common, CMP(SLJIT_C_GREATER, STACK_TOP, 0, STACK_LIMIT, 0));
+}
+
+static SLJIT_INLINE void free_stack(compiler_common *common, int size)
+{
+DEFINE_COMPILER;
+OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
+}
+
+static SLJIT_INLINE void reset_ovector(compiler_common *common, int length)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+int i;
+
+/* At this point we can freely use all temporary registers. */
+SLJIT_ASSERT(length > 1);
+/* TMP1 returns with begin - 1. */
+OP2(SLJIT_SUB, SLJIT_SCRATCH_REG1, 0, SLJIT_MEM1(SLJIT_SAVED_REG1), SLJIT_OFFSETOF(jit_arguments, begin), SLJIT_IMM, IN_UCHARS(1));
+if (length < 8)
+ {
+ for (i = 1; i < length; i++)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(i), SLJIT_SCRATCH_REG1, 0);
+ }
+else
+ {
+ GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, OVECTOR_START);
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, length - 1);
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_MEM1(SLJIT_SCRATCH_REG2), sizeof(sljit_sw), SLJIT_SCRATCH_REG1, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, loop);
+ }
+}
+
+static SLJIT_INLINE void do_reset_match(compiler_common *common, int length)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+int i;
+
+SLJIT_ASSERT(length > 1);
+/* OVECTOR(1) contains the "string begin - 1" constant. */
+if (length > 2)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
+if (length < 8)
+ {
+ for (i = 2; i < length; i++)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(i), TMP1, 0);
+ }
+else
+ {
+ GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, loop);
+ }
+
+OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, SLJIT_IMM, 0);
+if (common->control_head_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));
+}
+
+static sljit_sw SLJIT_CALL do_search_mark(sljit_sw *current, const pcre_uchar *skip_arg)
+{
+while (current != NULL)
+ {
+ switch (current[-2])
+ {
+ case type_then_trap:
+ break;
+
+ case type_mark:
+ if (STRCMP_UC_UC(skip_arg, (pcre_uchar *)current[-3]) == 0)
+ return current[-4];
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ current = (sljit_sw*)current[-1];
+ }
+return -1;
+}
+
+static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+struct sljit_jump *early_quit;
+
+/* At this point we can freely use all registers. */
+OP1(SLJIT_MOV, SLJIT_SAVED_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1), STR_PTR, 0);
+
+OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, ARGUMENTS, 0);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
+OP1(SLJIT_MOV_SI, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, offset_count));
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_SCRATCH_REG3, 0);
+OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, offsets), SLJIT_IMM, sizeof(int));
+OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, begin));
+GET_LOCAL_BASE(SLJIT_SAVED_REG1, 0, OVECTOR_START);
+/* Unlikely, but possible */
+early_quit = CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 0);
+loop = LABEL();
+OP2(SLJIT_SUB, SLJIT_SAVED_REG2, 0, SLJIT_MEM1(SLJIT_SAVED_REG1), 0, SLJIT_SCRATCH_REG1, 0);
+OP2(SLJIT_ADD, SLJIT_SAVED_REG1, 0, SLJIT_SAVED_REG1, 0, SLJIT_IMM, sizeof(sljit_sw));
+/* Copy the integer value to the output buffer */
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+OP2(SLJIT_ASHR, SLJIT_SAVED_REG2, 0, SLJIT_SAVED_REG2, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(SLJIT_MOVU_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG3), sizeof(int), SLJIT_SAVED_REG2, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_SCRATCH_REG2, 0, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 1);
+JUMPTO(SLJIT_C_NOT_ZERO, loop);
+JUMPHERE(early_quit);
+
+/* Calculate the return value, which is the maximum ovector value. */
+if (topbracket > 1)
+ {
+ GET_LOCAL_BASE(SLJIT_SCRATCH_REG1, 0, OVECTOR_START + topbracket * 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, topbracket + 1);
+
+ /* OVECTOR(0) is never equal to SLJIT_SAVED_REG3. */
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), -(2 * (sljit_sw)sizeof(sljit_sw)));
+ OP2(SLJIT_SUB, SLJIT_SCRATCH_REG2, 0, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 1);
+ CMPTO(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG3, 0, SLJIT_SAVED_REG3, 0, loop);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_SCRATCH_REG2, 0);
+ }
+else
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+}
+
+static SLJIT_INLINE void return_with_partial_match(compiler_common *common, struct sljit_label *quit)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+SLJIT_COMPILE_ASSERT(STR_END == SLJIT_SAVED_REG2, str_end_must_be_saved_reg2);
+SLJIT_ASSERT(common->start_used_ptr != 0 && common->start_ptr != 0
+ && (common->mode == JIT_PARTIAL_SOFT_COMPILE ? common->hit_start != 0 : common->hit_start == 0));
+
+OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_PARTIAL);
+OP1(SLJIT_MOV_SI, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, real_offset_count));
+CMPTO(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 2, quit);
+
+/* Store match begin and end. */
+OP1(SLJIT_MOV, SLJIT_SAVED_REG1, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, begin));
+OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, offsets));
+
+jump = CMP(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 3);
+OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_ptr : (common->hit_start + (int)sizeof(sljit_sw)), SLJIT_SAVED_REG1, 0);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), 2 * sizeof(int), SLJIT_SCRATCH_REG3, 0);
+JUMPHERE(jump);
+
+OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_used_ptr : common->hit_start);
+OP2(SLJIT_SUB, SLJIT_SAVED_REG2, 0, STR_END, 0, SLJIT_SAVED_REG1, 0);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+OP2(SLJIT_ASHR, SLJIT_SAVED_REG2, 0, SLJIT_SAVED_REG2, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), sizeof(int), SLJIT_SAVED_REG2, 0);
+
+OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_SAVED_REG1, 0);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), 0, SLJIT_SCRATCH_REG3, 0);
+
+JUMPTO(SLJIT_JUMP, quit);
+}
+
+static SLJIT_INLINE void check_start_used_ptr(compiler_common *common)
+{
+/* May destroy TMP1. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ /* The value of -1 must be kept for start_used_ptr! */
+ OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, 1);
+ /* Jumps if start_used_ptr < STR_PTR, or start_used_ptr == -1. Although overwriting
+ is not necessary if start_used_ptr == STR_PTR, it does not hurt as well. */
+ jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+else if (common->mode == JIT_PARTIAL_HARD_COMPILE)
+ {
+ jump = CMP(SLJIT_C_LESS_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+}
+
+static SLJIT_INLINE BOOL char_has_othercase(compiler_common *common, pcre_uchar* cc)
+{
+/* Detects if the character has an othercase. */
+unsigned int c;
+
+#ifdef SUPPORT_UTF
+if (common->utf)
+ {
+ GETCHAR(c, cc);
+ if (c > 127)
+ {
+#ifdef SUPPORT_UCP
+ return c != UCD_OTHERCASE(c);
+#else
+ return FALSE;
+#endif
+ }
+#ifndef COMPILE_PCRE8
+ return common->fcc[c] != c;
+#endif
+ }
+else
+#endif
+ c = *cc;
+return MAX_255(c) ? common->fcc[c] != c : FALSE;
+}
+
+static SLJIT_INLINE unsigned int char_othercase(compiler_common *common, unsigned int c)
+{
+/* Returns with the othercase. */
+#ifdef SUPPORT_UTF
+if (common->utf && c > 127)
+ {
+#ifdef SUPPORT_UCP
+ return UCD_OTHERCASE(c);
+#else
+ return c;
+#endif
+ }
+#endif
+return TABLE_GET(c, common->fcc, c);
+}
+
+static unsigned int char_get_othercase_bit(compiler_common *common, pcre_uchar* cc)
+{
+/* Detects if the character and its othercase has only 1 bit difference. */
+unsigned int c, oc, bit;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+int n;
+#endif
+
+#ifdef SUPPORT_UTF
+if (common->utf)
+ {
+ GETCHAR(c, cc);
+ if (c <= 127)
+ oc = common->fcc[c];
+ else
+ {
+#ifdef SUPPORT_UCP
+ oc = UCD_OTHERCASE(c);
+#else
+ oc = c;
+#endif
+ }
+ }
+else
+ {
+ c = *cc;
+ oc = TABLE_GET(c, common->fcc, c);
+ }
+#else
+c = *cc;
+oc = TABLE_GET(c, common->fcc, c);
+#endif
+
+SLJIT_ASSERT(c != oc);
+
+bit = c ^ oc;
+/* Optimized for English alphabet. */
+if (c <= 127 && bit == 0x20)
+ return (0 << 8) | 0x20;
+
+/* Since c != oc, they must have at least 1 bit difference. */
+if (!is_powerof2(bit))
+ return 0;
+
+#if defined COMPILE_PCRE8
+
+#ifdef SUPPORT_UTF
+if (common->utf && c > 127)
+ {
+ n = GET_EXTRALEN(*cc);
+ while ((bit & 0x3f) == 0)
+ {
+ n--;
+ bit >>= 6;
+ }
+ return (n << 8) | bit;
+ }
+#endif /* SUPPORT_UTF */
+return (0 << 8) | bit;
+
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+
+#ifdef SUPPORT_UTF
+if (common->utf && c > 65535)
+ {
+ if (bit >= (1 << 10))
+ bit >>= 10;
+ else
+ return (bit < 256) ? ((2 << 8) | bit) : ((3 << 8) | (bit >> 8));
+ }
+#endif /* SUPPORT_UTF */
+return (bit < 256) ? ((0 << 8) | bit) : ((1 << 8) | (bit >> 8));
+
+#endif /* COMPILE_PCRE[8|16|32] */
+}
+
+static void check_partial(compiler_common *common, BOOL force)
+{
+/* Checks whether a partial matching is occurred. Does not modify registers. */
+DEFINE_COMPILER;
+struct sljit_jump *jump = NULL;
+
+SLJIT_ASSERT(!force || common->mode != JIT_COMPILE);
+
+if (common->mode == JIT_COMPILE)
+ return;
+
+if (!force)
+ jump = CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+else if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
+ jump = CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, -1);
+
+if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
+else
+ {
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+
+if (jump != NULL)
+ JUMPHERE(jump);
+}
+
+static void check_str_end(compiler_common *common, jump_list **end_reached)
+{
+/* Does not affect registers. Usually used in a tight spot. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == JIT_COMPILE)
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ return;
+ }
+
+jump = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
+if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
+ add_jump(compiler, end_reached, JUMP(SLJIT_JUMP));
+ }
+else
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+JUMPHERE(jump);
+}
+
+static void detect_partial_match(compiler_common *common, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == JIT_COMPILE)
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ return;
+ }
+
+/* Partial matching mode. */
+jump = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
+add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
+if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ }
+else
+ {
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+JUMPHERE(jump);
+}
+
+static void read_char(compiler_common *common)
+{
+/* Reads the character into TMP1, updates STR_PTR.
+Does not check STR_END. TMP2 Destroyed. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+struct sljit_jump *jump;
+#endif
+
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+if (common->utf)
+ {
+#if defined COMPILE_PCRE8
+ jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+#elif defined COMPILE_PCRE16
+ jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+#endif /* COMPILE_PCRE[8|16] */
+ add_jump(compiler, &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
+ JUMPHERE(jump);
+ }
+#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+}
+
+static void peek_char(compiler_common *common)
+{
+/* Reads the character into TMP1, keeps STR_PTR.
+Does not check STR_END. TMP2 Destroyed. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+struct sljit_jump *jump;
+#endif
+
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+if (common->utf)
+ {
+#if defined COMPILE_PCRE8
+ jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+#elif defined COMPILE_PCRE16
+ jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+#endif /* COMPILE_PCRE[8|16] */
+ add_jump(compiler, &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ JUMPHERE(jump);
+ }
+#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
+}
+
+static void read_char8_type(compiler_common *common)
+{
+/* Reads the character type into TMP1, updates STR_PTR. Does not check STR_END. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+struct sljit_jump *jump;
+#endif
+
+#ifdef SUPPORT_UTF
+if (common->utf)
+ {
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if defined COMPILE_PCRE8
+ /* This can be an extra read in some situations, but hopefully
+ it is needed in most cases. */
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+ jump = CMP(SLJIT_C_LESS, TMP2, 0, SLJIT_IMM, 0xc0);
+ add_jump(compiler, &common->utfreadtype8, JUMP(SLJIT_FAST_CALL));
+ JUMPHERE(jump);
+#elif defined COMPILE_PCRE16
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+ JUMPHERE(jump);
+ /* Skip low surrogate if necessary. */
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+#elif defined COMPILE_PCRE32
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+ JUMPHERE(jump);
+#endif /* COMPILE_PCRE[8|16|32] */
+ return;
+ }
+#endif /* SUPPORT_UTF */
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+/* The ctypes array contains only 256 values. */
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+JUMPHERE(jump);
+#endif
+}
+
+static void skip_char_back(compiler_common *common)
+{
+/* Goes one character back. Affects STR_PTR and TMP1. Does not check begin. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+#if defined COMPILE_PCRE8
+struct sljit_label *label;
+
+if (common->utf)
+ {
+ label = LABEL();
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, label);
+ return;
+ }
+#elif defined COMPILE_PCRE16
+if (common->utf)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ /* Skip low surrogate if necessary. */
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xdc00);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ return;
+ }
+#endif /* COMPILE_PCRE[8|16] */
+#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+}
+
+static void check_newlinechar(compiler_common *common, int nltype, jump_list **backtracks, BOOL jumpiftrue)
+{
+/* Character comes in TMP1. Checks if it is a newline. TMP2 may be destroyed. */
+DEFINE_COMPILER;
+
+if (nltype == NLTYPE_ANY)
+ {
+ add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(jumpiftrue ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
+ }
+else if (nltype == NLTYPE_ANYCRLF)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ add_jump(compiler, backtracks, JUMP(jumpiftrue ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
+ }
+else
+ {
+ SLJIT_ASSERT(nltype == NLTYPE_FIXED && common->newline < 256);
+ add_jump(compiler, backtracks, CMP(jumpiftrue ? SLJIT_C_EQUAL : SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
+ }
+}
+
+#ifdef SUPPORT_UTF
+
+#if defined COMPILE_PCRE8
+static void do_utfreadchar(compiler_common *common)
+{
+/* Fast decoding a UTF-8 character. TMP1 contains the first byte
+of the character (>= 0xc0). Return char value in TMP1, length - 1 in TMP2. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+/* Searching for the first zero. */
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x20);
+jump = JUMP(SLJIT_C_NOT_ZERO);
+/* Two byte sequence. */
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1f);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+JUMPHERE(jump);
+
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x10);
+jump = JUMP(SLJIT_C_NOT_ZERO);
+/* Three byte sequence. */
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0f);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 12);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(2));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+JUMPHERE(jump);
+
+/* Four byte sequence. */
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x07);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 18);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 12);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(3));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(3));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(3));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void do_utfreadtype8(compiler_common *common)
+{
+/* Fast decoding a UTF-8 character type. TMP2 contains the first byte
+of the character (>= 0xc0). Return value in TMP1. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_jump *compare;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x20);
+jump = JUMP(SLJIT_C_NOT_ZERO);
+/* Two byte sequence. */
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x1f);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP2, 0, TMP2, 0, TMP1, 0);
+compare = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(compare);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+JUMPHERE(jump);
+
+/* We only have types for characters less than 256. */
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#elif defined COMPILE_PCRE16
+
+static void do_utfreadchar(compiler_common *common)
+{
+/* Fast decoding a UTF-16 character. TMP1 contains the first 16 bit char
+of the character (>= 0xd800). Return char value in TMP1, length - 1 in TMP2. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xdc00);
+/* Do nothing, only return. */
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(jump);
+/* Combine two 16 bit characters. */
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3ff);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 10);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3ff);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x10000);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#endif /* COMPILE_PCRE[8|16] */
+
+#endif /* SUPPORT_UTF */
+
+#ifdef SUPPORT_UCP
+
+/* UCD_BLOCK_SIZE must be 128 (see the assert below). */
+#define UCD_BLOCK_MASK 127
+#define UCD_BLOCK_SHIFT 7
+
+static void do_getucd(compiler_common *common)
+{
+/* Search the UCD record for the character comes in TMP1.
+Returns chartype in TMP1 and UCD offset in TMP2. */
+DEFINE_COMPILER;
+
+SLJIT_ASSERT(UCD_BLOCK_SIZE == 128 && sizeof(ucd_record) == 8);
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2));
+OP1(SLJIT_MOV_UH, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+#endif
+
+static SLJIT_INLINE struct sljit_label *mainloop_entry(compiler_common *common, BOOL hascrorlf, BOOL firstline)
+{
+DEFINE_COMPILER;
+struct sljit_label *mainloop;
+struct sljit_label *newlinelabel = NULL;
+struct sljit_jump *start;
+struct sljit_jump *end = NULL;
+struct sljit_jump *nl = NULL;
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+struct sljit_jump *singlechar;
+#endif
+jump_list *newline = NULL;
+BOOL newlinecheck = FALSE;
+BOOL readuchar = FALSE;
+
+if (!(hascrorlf || firstline) && (common->nltype == NLTYPE_ANY ||
+ common->nltype == NLTYPE_ANYCRLF || common->newline > 255))
+ newlinecheck = TRUE;
+
+if (firstline)
+ {
+ /* Search for the end of the first line. */
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
+
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ mainloop = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, mainloop);
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, mainloop);
+ JUMPHERE(end);
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+ else
+ {
+ end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ mainloop = LABEL();
+ /* Continual stores does not cause data dependency. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0);
+ read_char(common);
+ check_newlinechar(common, common->nltype, &newline, TRUE);
+ CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop);
+ JUMPHERE(end);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0);
+ set_jumps(newline, LABEL());
+ }
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
+ }
+
+start = JUMP(SLJIT_JUMP);
+
+if (newlinecheck)
+ {
+ newlinelabel = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, common->newline & 0xff);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ nl = JUMP(SLJIT_JUMP);
+ }
+
+mainloop = LABEL();
+
+/* Increasing the STR_PTR here requires one less jump in the most common case. */
+#ifdef SUPPORT_UTF
+if (common->utf) readuchar = TRUE;
+#endif
+if (newlinecheck) readuchar = TRUE;
+
+if (readuchar)
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+
+if (newlinecheck)
+ CMPTO(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, newlinelabel);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
+#if defined COMPILE_PCRE8
+if (common->utf)
+ {
+ singlechar = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(singlechar);
+ }
+#elif defined COMPILE_PCRE16
+if (common->utf)
+ {
+ singlechar = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(singlechar);
+ }
+#endif /* COMPILE_PCRE[8|16] */
+#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
+JUMPHERE(start);
+
+if (newlinecheck)
+ {
+ JUMPHERE(end);
+ JUMPHERE(nl);
+ }
+
+return mainloop;
+}
+
+#define MAX_N_CHARS 3
+
+static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common, BOOL firstline)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+pcre_uint32 chars[MAX_N_CHARS * 2];
+pcre_uchar *cc = common->start + 1 + LINK_SIZE;
+int location = 0;
+pcre_int32 len, c, bit, caseless;
+int must_stop;
+
+/* We do not support alternatives now. */
+if (*(common->start + GET(common->start, 1)) == OP_ALT)
+ return FALSE;
+
+while (TRUE)
+ {
+ caseless = 0;
+ must_stop = 1;
+ switch(*cc)
+ {
+ case OP_CHAR:
+ must_stop = 0;
+ cc++;
+ break;
+
+ case OP_CHARI:
+ caseless = 1;
+ must_stop = 0;
+ cc++;
+ break;
+
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ cc++;
+ break;
+
+ case OP_EXACT:
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ caseless = 1;
+ cc++;
+ break;
+
+ case OP_EXACTI:
+ caseless = 1;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ default:
+ must_stop = 2;
+ break;
+ }
+
+ if (must_stop == 2)
+ break;
+
+ len = 1;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[0])) len += GET_EXTRALEN(cc[0]);
+#endif
+
+ if (caseless && char_has_othercase(common, cc))
+ {
+ caseless = char_get_othercase_bit(common, cc);
+ if (caseless == 0)
+ return FALSE;
+#ifdef COMPILE_PCRE8
+ caseless = ((caseless & 0xff) << 8) | (len - (caseless >> 8));
+#else
+ if ((caseless & 0x100) != 0)
+ caseless = ((caseless & 0xff) << 16) | (len - (caseless >> 9));
+ else
+ caseless = ((caseless & 0xff) << 8) | (len - (caseless >> 9));
+#endif
+ }
+ else
+ caseless = 0;
+
+ while (len > 0 && location < MAX_N_CHARS * 2)
+ {
+ c = *cc;
+ bit = 0;
+ if (len == (caseless & 0xff))
+ {
+ bit = caseless >> 8;
+ c |= bit;
+ }
+
+ chars[location] = c;
+ chars[location + 1] = bit;
+
+ len--;
+ location += 2;
+ cc++;
+ }
+
+ if (location >= MAX_N_CHARS * 2 || must_stop != 0)
+ break;
+ }
+
+/* At least two characters are required. */
+if (location < 2 * 2)
+ return FALSE;
+
+if (firstline)
+ {
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP2(SLJIT_SUB, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
+ }
+else
+ OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
+
+start = LABEL();
+quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+if (chars[1] != 0)
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[1]);
+CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[0], start);
+if (location > 2 * 2)
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+if (chars[3] != 0)
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, chars[3]);
+CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, chars[2], start);
+if (location > 2 * 2)
+ {
+ if (chars[5] != 0)
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[5]);
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[4], start);
+ }
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+JUMPHERE(quit);
+
+if (firstline)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+else
+ OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1));
+return TRUE;
+}
+
+#undef MAX_N_CHARS
+
+static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, pcre_uchar first_char, BOOL caseless, BOOL firstline)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *found;
+pcre_uchar oc, bit;
+
+if (firstline)
+ {
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
+ }
+
+start = LABEL();
+quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+
+oc = first_char;
+if (caseless)
+ {
+ oc = TABLE_GET(first_char, common->fcc, first_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (first_char > 127 && common->utf)
+ oc = UCD_OTHERCASE(first_char);
+#endif
+ }
+if (first_char == oc)
+ found = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, first_char);
+else
+ {
+ bit = first_char ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, bit);
+ found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, first_char | bit);
+ }
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, first_char);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, oc);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ found = JUMP(SLJIT_C_NOT_ZERO);
+ }
+ }
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_JUMP, start);
+JUMPHERE(found);
+JUMPHERE(quit);
+
+if (firstline)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+}
+
+static SLJIT_INLINE void fast_forward_newline(compiler_common *common, BOOL firstline)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+struct sljit_jump *lastchar;
+struct sljit_jump *firstchar;
+struct sljit_jump *quit;
+struct sljit_jump *foundcr = NULL;
+struct sljit_jump *notfoundnl;
+jump_list *newline = NULL;
+
+if (firstline)
+ {
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
+ }
+
+if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
+
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_PTR, 0, TMP1, 0);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER_EQUAL);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+
+ loop = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, loop);
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, loop);
+
+ JUMPHERE(quit);
+ JUMPHERE(firstchar);
+ JUMPHERE(lastchar);
+
+ if (firstline)
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);
+ return;
+ }
+
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
+skip_char_back(common);
+
+loop = LABEL();
+read_char(common);
+lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
+ foundcr = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+check_newlinechar(common, common->nltype, &newline, FALSE);
+set_jumps(newline, loop);
+
+if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
+ {
+ quit = JUMP(SLJIT_JUMP);
+ JUMPHERE(foundcr);
+ notfoundnl = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(notfoundnl);
+ JUMPHERE(quit);
+ }
+JUMPHERE(lastchar);
+JUMPHERE(firstchar);
+
+if (firstline)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+}
+
+static BOOL check_class_ranges(compiler_common *common, const pcre_uint8 *bits, BOOL nclass, jump_list **backtracks);
+
+static SLJIT_INLINE void fast_forward_start_bits(compiler_common *common, sljit_uw start_bits, BOOL firstline)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *found = NULL;
+jump_list *matches = NULL;
+pcre_uint8 inverted_start_bits[32];
+int i;
+#ifndef COMPILE_PCRE8
+struct sljit_jump *jump;
+#endif
+
+for (i = 0; i < 32; ++i)
+ inverted_start_bits[i] = ~(((pcre_uint8*)start_bits)[i]);
+
+if (firstline)
+ {
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
+ }
+
+start = LABEL();
+quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+#ifdef SUPPORT_UTF
+if (common->utf)
+ OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+#endif
+
+if (!check_class_ranges(common, inverted_start_bits, (inverted_start_bits[31] & 0x80) != 0, &matches))
+ {
+#ifndef COMPILE_PCRE8
+ jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 255);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 255);
+ JUMPHERE(jump);
+#endif
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), start_bits);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ found = JUMP(SLJIT_C_NOT_ZERO);
+ }
+
+#ifdef SUPPORT_UTF
+if (common->utf)
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+#endif
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#ifdef SUPPORT_UTF
+#if defined COMPILE_PCRE8
+if (common->utf)
+ {
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0, start);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ }
+#elif defined COMPILE_PCRE16
+if (common->utf)
+ {
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800, start);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ }
+#endif /* COMPILE_PCRE[8|16] */
+#endif /* SUPPORT_UTF */
+JUMPTO(SLJIT_JUMP, start);
+if (found != NULL)
+ JUMPHERE(found);
+if (matches != NULL)
+ set_jumps(matches, LABEL());
+JUMPHERE(quit);
+
+if (firstline)
+ OP1(SLJIT_MOV, STR_END, 0, RETURN_ADDR, 0);
+}
+
+static SLJIT_INLINE struct sljit_jump *search_requested_char(compiler_common *common, pcre_uchar req_char, BOOL caseless, BOOL has_firstchar)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+struct sljit_jump *toolong;
+struct sljit_jump *alreadyfound;
+struct sljit_jump *found;
+struct sljit_jump *foundoc = NULL;
+struct sljit_jump *notfound;
+pcre_uint32 oc, bit;
+
+SLJIT_ASSERT(common->req_char_ptr != 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr);
+OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, REQ_BYTE_MAX);
+toolong = CMP(SLJIT_C_LESS, TMP1, 0, STR_END, 0);
+alreadyfound = CMP(SLJIT_C_LESS, STR_PTR, 0, TMP2, 0);
+
+if (has_firstchar)
+ OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+else
+ OP1(SLJIT_MOV, TMP1, 0, STR_PTR, 0);
+
+loop = LABEL();
+notfound = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, STR_END, 0);
+
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(TMP1), 0);
+oc = req_char;
+if (caseless)
+ {
+ oc = TABLE_GET(req_char, common->fcc, req_char);
+#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
+ if (req_char > 127 && common->utf)
+ oc = UCD_OTHERCASE(req_char);
+#endif
+ }
+if (req_char == oc)
+ found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
+else
+ {
+ bit = req_char ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, bit);
+ found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char | bit);
+ }
+ else
+ {
+ found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
+ foundoc = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, oc);
+ }
+ }
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_JUMP, loop);
+
+JUMPHERE(found);
+if (foundoc)
+ JUMPHERE(foundoc);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, TMP1, 0);
+JUMPHERE(alreadyfound);
+JUMPHERE(toolong);
+return notfound;
+}
+
+static void do_revertframes(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *mainloop;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP1(SLJIT_MOV, TMP1, 0, STACK_TOP, 0);
+GET_LOCAL_BASE(TMP3, 0, 0);
+
+/* Drop frames until we reach STACK_TOP. */
+mainloop = LABEL();
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), 0);
+OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0);
+jump = JUMP(SLJIT_C_SIG_LESS_EQUAL);
+
+OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), sizeof(sljit_sw), SLJIT_MEM1(TMP1), 2 * sizeof(sljit_sw));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_sw));
+JUMPTO(SLJIT_JUMP, mainloop);
+
+JUMPHERE(jump);
+jump = JUMP(SLJIT_C_SIG_LESS);
+/* End of dropping frames. */
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(jump);
+OP1(SLJIT_NEG, TMP2, 0, TMP2, 0);
+OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_sw));
+JUMPTO(SLJIT_JUMP, mainloop);
+}
+
+static void check_wordboundary(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *skipread;
+jump_list *skipread_list = NULL;
+#if !(defined COMPILE_PCRE8) || defined SUPPORT_UTF
+struct sljit_jump *jump;
+#endif
+
+SLJIT_COMPILE_ASSERT(ctype_word == 0x10, ctype_word_must_be_16);
+
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+/* Get type of the previous char, and put it to LOCALS1. */
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, 0);
+skipread = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP1, 0);
+skip_char_back(common);
+check_start_used_ptr(common);
+read_char(common);
+
+/* Testing char type. */
+#ifdef SUPPORT_UCP
+if (common->use_ucp)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
+ jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ JUMPHERE(jump);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP2, 0);
+ }
+else
+#endif
+ {
+#ifndef COMPILE_PCRE8
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#elif defined SUPPORT_UTF
+ /* Here LOCALS1 has already been zeroed. */
+ jump = NULL;
+ if (common->utf)
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#endif /* COMPILE_PCRE8 */
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), common->ctypes);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 4 /* ctype_word */);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP1, 0);
+#ifndef COMPILE_PCRE8
+ JUMPHERE(jump);
+#elif defined SUPPORT_UTF
+ if (jump != NULL)
+ JUMPHERE(jump);
+#endif /* COMPILE_PCRE8 */
+ }
+JUMPHERE(skipread);
+
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+check_str_end(common, &skipread_list);
+peek_char(common);
+
+/* Testing char type. This is a code duplication. */
+#ifdef SUPPORT_UCP
+if (common->use_ucp)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
+ jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ JUMPHERE(jump);
+ }
+else
+#endif
+ {
+#ifndef COMPILE_PCRE8
+ /* TMP2 may be destroyed by peek_char. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#elif defined SUPPORT_UTF
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+ jump = NULL;
+ if (common->utf)
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#endif
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), common->ctypes);
+ OP2(SLJIT_LSHR, TMP2, 0, TMP2, 0, SLJIT_IMM, 4 /* ctype_word */);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+#ifndef COMPILE_PCRE8
+ JUMPHERE(jump);
+#elif defined SUPPORT_UTF
+ if (jump != NULL)
+ JUMPHERE(jump);
+#endif /* COMPILE_PCRE8 */
+ }
+set_jumps(skipread_list, LABEL());
+
+OP2(SLJIT_XOR | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
+sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+}
+
+/*
+ range format:
+
+ ranges[0] = length of the range (max MAX_RANGE_SIZE, -1 means invalid range).
+ ranges[1] = first bit (0 or 1)
+ ranges[2-length] = position of the bit change (when the current bit is not equal to the previous)
+*/
+
+static BOOL check_ranges(compiler_common *common, int *ranges, jump_list **backtracks, BOOL readch)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (ranges[0] < 0)
+ return FALSE;
+
+switch(ranges[0])
+ {
+ case 1:
+ if (readch)
+ read_char(common);
+ add_jump(compiler, backtracks, CMP(ranges[1] == 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
+ return TRUE;
+
+ case 2:
+ if (readch)
+ read_char(common);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2]);
+ add_jump(compiler, backtracks, CMP(ranges[1] != 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[2]));
+ return TRUE;
+
+ case 4:
+ if (ranges[2] + 1 == ranges[3] && ranges[4] + 1 == ranges[5])
+ {
+ if (readch)
+ read_char(common);
+ if (ranges[1] != 0)
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[4]));
+ }
+ else
+ {
+ jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[4]));
+ JUMPHERE(jump);
+ }
+ return TRUE;
+ }
+ if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) && is_powerof2(ranges[4] - ranges[2]))
+ {
+ if (readch)
+ read_char(common);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[4] - ranges[2]);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[4]);
+ add_jump(compiler, backtracks, CMP(ranges[1] != 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[5] - ranges[4]));
+ return TRUE;
+ }
+ return FALSE;
+
+ default:
+ return FALSE;
+ }
+}
+
+static void get_ctype_ranges(compiler_common *common, int flag, int *ranges)
+{
+int i, bit, length;
+const pcre_uint8 *ctypes = (const pcre_uint8*)common->ctypes;
+
+bit = ctypes[0] & flag;
+ranges[0] = -1;
+ranges[1] = bit != 0 ? 1 : 0;
+length = 0;
+
+for (i = 1; i < 256; i++)
+ if ((ctypes[i] & flag) != bit)
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return;
+ ranges[2 + length] = i;
+ length++;
+ bit ^= flag;
+ }
+
+if (bit != 0)
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return;
+ ranges[2 + length] = 256;
+ length++;
+ }
+ranges[0] = length;
+}
+
+static BOOL check_class_ranges(compiler_common *common, const pcre_uint8 *bits, BOOL nclass, jump_list **backtracks)
+{
+int ranges[2 + MAX_RANGE_SIZE];
+pcre_uint8 bit, cbit, all;
+int i, byte, length = 0;
+
+bit = bits[0] & 0x1;
+ranges[1] = bit;
+/* Can be 0 or 255. */
+all = -bit;
+
+for (i = 0; i < 256; )
+ {
+ byte = i >> 3;
+ if ((i & 0x7) == 0 && bits[byte] == all)
+ i += 8;
+ else
+ {
+ cbit = (bits[byte] >> (i & 0x7)) & 0x1;
+ if (cbit != bit)
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return FALSE;
+ ranges[2 + length] = i;
+ length++;
+ bit = cbit;
+ all = -cbit;
+ }
+ i++;
+ }
+ }
+
+if (((bit == 0) && nclass) || ((bit == 1) && !nclass))
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return FALSE;
+ ranges[2 + length] = 256;
+ length++;
+ }
+ranges[0] = length;
+
+return check_ranges(common, ranges, backtracks, FALSE);
+}
+
+static void check_anynewline(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
+OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+#ifdef COMPILE_PCRE8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
+#ifdef COMPILE_PCRE8
+ }
+#endif
+#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void check_hspace(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x09);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x20);
+OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xa0);
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+#ifdef COMPILE_PCRE8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x1680);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x2000);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x200A - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x202f - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x205f - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x3000 - 0x2000);
+#ifdef COMPILE_PCRE8
+ }
+#endif
+#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void check_vspace(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
+OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+#ifdef COMPILE_PCRE8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
+#ifdef COMPILE_PCRE8
+ }
+#endif
+#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#define CHAR1 STR_END
+#define CHAR2 STACK_TOP
+
+static void do_casefulcmp(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *label;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP3, 0, CHAR1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, CHAR2, 0);
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+label = LABEL();
+OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+jump = CMP(SLJIT_C_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_C_NOT_ZERO, label);
+
+JUMPHERE(jump);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, CHAR1, 0, TMP3, 0);
+OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#define LCC_TABLE STACK_LIMIT
+
+static void do_caselesscmp(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *label;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+
+OP1(SLJIT_MOV, TMP3, 0, LCC_TABLE, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, CHAR1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, CHAR2, 0);
+OP1(SLJIT_MOV, LCC_TABLE, 0, SLJIT_IMM, common->lcc);
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+label = LABEL();
+OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+#ifndef COMPILE_PCRE8
+jump = CMP(SLJIT_C_GREATER, CHAR1, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_UB, CHAR1, 0, SLJIT_MEM2(LCC_TABLE, CHAR1), 0);
+#ifndef COMPILE_PCRE8
+JUMPHERE(jump);
+jump = CMP(SLJIT_C_GREATER, CHAR2, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_UB, CHAR2, 0, SLJIT_MEM2(LCC_TABLE, CHAR2), 0);
+#ifndef COMPILE_PCRE8
+JUMPHERE(jump);
+#endif
+jump = CMP(SLJIT_C_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_C_NOT_ZERO, label);
+
+JUMPHERE(jump);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, LCC_TABLE, 0, TMP3, 0);
+OP1(SLJIT_MOV, CHAR1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#undef LCC_TABLE
+#undef CHAR1
+#undef CHAR2
+
+#if defined SUPPORT_UTF && defined SUPPORT_UCP
+
+static const pcre_uchar * SLJIT_CALL do_utf_caselesscmp(pcre_uchar *src1, jit_arguments *args, pcre_uchar *end1)
+{
+/* This function would be ineffective to do in JIT level. */
+pcre_uint32 c1, c2;
+const pcre_uchar *src2 = args->uchar_ptr;
+const pcre_uchar *end2 = args->end;
+const ucd_record *ur;
+const pcre_uint32 *pp;
+
+while (src1 < end1)
+ {
+ if (src2 >= end2)
+ return (pcre_uchar*)1;
+ GETCHARINC(c1, src1);
+ GETCHARINC(c2, src2);
+ ur = GET_UCD(c2);
+ if (c1 != c2 && c1 != c2 + ur->other_case)
+ {
+ pp = PRIV(ucd_caseless_sets) + ur->caseset;
+ for (;;)
+ {
+ if (c1 < *pp) return NULL;
+ if (c1 == *pp++) break;
+ }
+ }
+ }
+return src2;
+}
+
+#endif /* SUPPORT_UTF && SUPPORT_UCP */
+
+static pcre_uchar *byte_sequence_compare(compiler_common *common, BOOL caseless, pcre_uchar *cc,
+ compare_context* context, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+unsigned int othercasebit = 0;
+pcre_uchar *othercasechar = NULL;
+#ifdef SUPPORT_UTF
+int utflength;
+#endif
+
+if (caseless && char_has_othercase(common, cc))
+ {
+ othercasebit = char_get_othercase_bit(common, cc);
+ SLJIT_ASSERT(othercasebit);
+ /* Extracting bit difference info. */
+#if defined COMPILE_PCRE8
+ othercasechar = cc + (othercasebit >> 8);
+ othercasebit &= 0xff;
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ /* Note that this code only handles characters in the BMP. If there
+ ever are characters outside the BMP whose othercase differs in only one
+ bit from itself (there currently are none), this code will need to be
+ revised for COMPILE_PCRE32. */
+ othercasechar = cc + (othercasebit >> 9);
+ if ((othercasebit & 0x100) != 0)
+ othercasebit = (othercasebit & 0xff) << 8;
+ else
+ othercasebit &= 0xff;
+#endif /* COMPILE_PCRE[8|16|32] */
+ }
+
+if (context->sourcereg == -1)
+ {
+#if defined COMPILE_PCRE8
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else if (context->length >= 2)
+ OP1(SLJIT_MOV_UH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else
+#endif
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#elif defined COMPILE_PCRE16
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else
+#endif
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#elif defined COMPILE_PCRE32
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#endif /* COMPILE_PCRE[8|16|32] */
+ context->sourcereg = TMP2;
+ }
+
+#ifdef SUPPORT_UTF
+utflength = 1;
+if (common->utf && HAS_EXTRALEN(*cc))
+ utflength += GET_EXTRALEN(*cc);
+
+do
+ {
+#endif
+
+ context->length -= IN_UCHARS(1);
+#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) && (defined COMPILE_PCRE8 || defined COMPILE_PCRE16)
+
+ /* Unaligned read is supported. */
+ if (othercasebit != 0 && othercasechar == cc)
+ {
+ context->c.asuchars[context->ucharptr] = *cc | othercasebit;
+ context->oc.asuchars[context->ucharptr] = othercasebit;
+ }
+ else
+ {
+ context->c.asuchars[context->ucharptr] = *cc;
+ context->oc.asuchars[context->ucharptr] = 0;
+ }
+ context->ucharptr++;
+
+#if defined COMPILE_PCRE8
+ if (context->ucharptr >= 4 || context->length == 0 || (context->ucharptr == 2 && context->length == 1))
+#else
+ if (context->ucharptr >= 2 || context->length == 0)
+#endif
+ {
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else if (context->length >= 2)
+ OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#if defined COMPILE_PCRE8
+ else if (context->length >= 1)
+ OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#endif /* COMPILE_PCRE8 */
+ context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
+
+ switch(context->ucharptr)
+ {
+ case 4 / sizeof(pcre_uchar):
+ if (context->oc.asint != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asint);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asint | context->oc.asint));
+ break;
+
+ case 2 / sizeof(pcre_uchar):
+ if (context->oc.asushort != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asushort | context->oc.asushort));
+ break;
+
+#ifdef COMPILE_PCRE8
+ case 1:
+ if (context->oc.asbyte != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asbyte);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asbyte | context->oc.asbyte));
+ break;
+#endif
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ context->ucharptr = 0;
+ }
+
+#else
+
+ /* Unaligned read is unsupported or in 32 bit mode. */
+ if (context->length >= 1)
+ OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+
+ context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
+
+ if (othercasebit != 0 && othercasechar == cc)
+ {
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, othercasebit);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc | othercasebit));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc));
+
+#endif
+
+ cc++;
+#ifdef SUPPORT_UTF
+ utflength--;
+ }
+while (utflength > 0);
+#endif
+
+return cc;
+}
+
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+
+#define SET_TYPE_OFFSET(value) \
+ if ((value) != typeoffset) \
+ { \
+ if ((value) > typeoffset) \
+ OP2(SLJIT_SUB, typereg, 0, typereg, 0, SLJIT_IMM, (value) - typeoffset); \
+ else \
+ OP2(SLJIT_ADD, typereg, 0, typereg, 0, SLJIT_IMM, typeoffset - (value)); \
+ } \
+ typeoffset = (value);
+
+#define SET_CHAR_OFFSET(value) \
+ if ((value) != charoffset) \
+ { \
+ if ((value) > charoffset) \
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, (value) - charoffset); \
+ else \
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, charoffset - (value)); \
+ } \
+ charoffset = (value);
+
+static void compile_xclass_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+jump_list *found = NULL;
+jump_list **list = (*cc & XCL_NOT) == 0 ? &found : backtracks;
+pcre_int32 c, charoffset;
+const pcre_uint32 *other_cases;
+struct sljit_jump *jump = NULL;
+pcre_uchar *ccbegin;
+int compares, invertcmp, numberofcmps;
+#ifdef SUPPORT_UCP
+BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE;
+BOOL charsaved = FALSE;
+int typereg = TMP1, scriptreg = TMP1;
+pcre_int32 typeoffset;
+#endif
+
+/* Although SUPPORT_UTF must be defined, we are
+ not necessary in utf mode even in 8 bit mode. */
+detect_partial_match(common, backtracks);
+read_char(common);
+
+if ((*cc++ & XCL_MAP) != 0)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+#ifndef COMPILE_PCRE8
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#elif defined SUPPORT_UTF
+ if (common->utf)
+ jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#endif
+
+ if (!check_class_ranges(common, (const pcre_uint8 *)cc, TRUE, list))
+ {
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ add_jump(compiler, list, JUMP(SLJIT_C_NOT_ZERO));
+ }
+
+#ifndef COMPILE_PCRE8
+ JUMPHERE(jump);
+#elif defined SUPPORT_UTF
+ if (common->utf)
+ JUMPHERE(jump);
+#endif
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+#ifdef SUPPORT_UCP
+ charsaved = TRUE;
+#endif
+ cc += 32 / sizeof(pcre_uchar);
+ }
+
+/* Scanning the necessary info. */
+ccbegin = cc;
+compares = 0;
+while (*cc != XCL_END)
+ {
+ compares++;
+ if (*cc == XCL_SINGLE)
+ {
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+#ifdef SUPPORT_UCP
+ needschar = TRUE;
+#endif
+ }
+ else if (*cc == XCL_RANGE)
+ {
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ cc++;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+#ifdef SUPPORT_UCP
+ needschar = TRUE;
+#endif
+ }
+#ifdef SUPPORT_UCP
+ else
+ {
+ SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP);
+ cc++;
+ switch(*cc)
+ {
+ case PT_ANY:
+ break;
+
+ case PT_LAMP:
+ case PT_GC:
+ case PT_PC:
+ case PT_ALNUM:
+ needstype = TRUE;
+ break;
+
+ case PT_SC:
+ needsscript = TRUE;
+ break;
+
+ case PT_SPACE:
+ case PT_PXSPACE:
+ case PT_WORD:
+ needstype = TRUE;
+ needschar = TRUE;
+ break;
+
+ case PT_CLIST:
+ case PT_UCNC:
+ needschar = TRUE;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ cc += 2;
+ }
+#endif
+ }
+
+#ifdef SUPPORT_UCP
+/* Simple register allocation. TMP1 is preferred if possible. */
+if (needstype || needsscript)
+ {
+ if (needschar && !charsaved)
+ OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ if (needschar)
+ {
+ if (needstype)
+ {
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
+ typereg = RETURN_ADDR;
+ }
+
+ if (needsscript)
+ scriptreg = TMP3;
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+ }
+ else if (needstype && needsscript)
+ scriptreg = TMP3;
+ /* In all other cases only one of them was specified, and that can goes to TMP1. */
+
+ if (needsscript)
+ {
+ if (scriptreg == TMP1)
+ {
+ OP1(SLJIT_MOV, scriptreg, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
+ OP1(SLJIT_MOV_UB, scriptreg, 0, SLJIT_MEM2(scriptreg, TMP2), 3);
+ }
+ else
+ {
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
+ OP1(SLJIT_MOV_UB, scriptreg, 0, SLJIT_MEM1(TMP2), 0);
+ }
+ }
+ }
+#endif
+
+/* Generating code. */
+cc = ccbegin;
+charoffset = 0;
+numberofcmps = 0;
+#ifdef SUPPORT_UCP
+typeoffset = 0;
+#endif
+
+while (*cc != XCL_END)
+ {
+ compares--;
+ invertcmp = (compares == 0 && list != backtracks);
+ jump = NULL;
+
+ if (*cc == XCL_SINGLE)
+ {
+ cc ++;
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ GETCHARINC(c, cc);
+ }
+ else
+#endif
+ c = *cc++;
+
+ if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, c - charoffset);
+ OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_EQUAL);
+ numberofcmps++;
+ }
+ else if (numberofcmps > 0)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, c - charoffset);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ numberofcmps = 0;
+ }
+ else
+ {
+ jump = CMP(SLJIT_C_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, c - charoffset);
+ numberofcmps = 0;
+ }
+ }
+ else if (*cc == XCL_RANGE)
+ {
+ cc ++;
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ GETCHARINC(c, cc);
+ }
+ else
+#endif
+ c = *cc++;
+ SET_CHAR_OFFSET(c);
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ GETCHARINC(c, cc);
+ }
+ else
+#endif
+ c = *cc++;
+ if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, c - charoffset);
+ OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_LESS_EQUAL);
+ numberofcmps++;
+ }
+ else if (numberofcmps > 0)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, c - charoffset);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ numberofcmps = 0;
+ }
+ else
+ {
+ jump = CMP(SLJIT_C_LESS_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, c - charoffset);
+ numberofcmps = 0;
+ }
+ }
+#ifdef SUPPORT_UCP
+ else
+ {
+ if (*cc == XCL_NOTPROP)
+ invertcmp ^= 0x1;
+ cc++;
+ switch(*cc)
+ {
+ case PT_ANY:
+ if (list != backtracks)
+ {
+ if ((cc[-1] == XCL_NOTPROP && compares > 0) || (cc[-1] == XCL_PROP && compares == 0))
+ continue;
+ }
+ else if (cc[-1] == XCL_NOTPROP)
+ continue;
+ jump = JUMP(SLJIT_JUMP);
+ break;
+
+ case PT_LAMP:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - typeoffset);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ll - typeoffset);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lt - typeoffset);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_GC:
+ c = PRIV(ucp_typerange)[(int)cc[1] * 2];
+ SET_TYPE_OFFSET(c);
+ jump = CMP(SLJIT_C_LESS_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, PRIV(ucp_typerange)[(int)cc[1] * 2 + 1] - c);
+ break;
+
+ case PT_PC:
+ jump = CMP(SLJIT_C_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, (int)cc[1] - typeoffset);
+ break;
+
+ case PT_SC:
+ jump = CMP(SLJIT_C_EQUAL ^ invertcmp, scriptreg, 0, SLJIT_IMM, (int)cc[1]);
+ break;
+
+ case PT_SPACE:
+ case PT_PXSPACE:
+ if (*cc == PT_SPACE)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 11 - charoffset);
+ }
+ SET_CHAR_OFFSET(9);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 13 - 9);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
+ if (*cc == PT_SPACE)
+ JUMPHERE(jump);
+
+ SET_TYPE_OFFSET(ucp_Zl);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_WORD:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE - charoffset);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ /* Fall through. */
+
+ case PT_ALNUM:
+ SET_TYPE_OFFSET(ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS((*cc == PT_ALNUM) ? SLJIT_MOV : SLJIT_OR, TMP2, 0, (*cc == PT_ALNUM) ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_LESS_EQUAL);
+ SET_TYPE_OFFSET(ucp_Nd);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_CLIST:
+ other_cases = PRIV(ucd_caseless_sets) + cc[1];
+
+ /* At least three characters are required.
+ Otherwise this case would be handled by the normal code path. */
+ SLJIT_ASSERT(other_cases[0] != NOTACHAR && other_cases[1] != NOTACHAR && other_cases[2] != NOTACHAR);
+ SLJIT_ASSERT(other_cases[0] < other_cases[1] && other_cases[1] < other_cases[2]);
+
+ /* Optimizing character pairs, if their difference is power of 2. */
+ if (is_powerof2(other_cases[1] ^ other_cases[0]))
+ {
+ if (charoffset == 0)
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ else
+ {
+ OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ }
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[1]);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ other_cases += 2;
+ }
+ else if (is_powerof2(other_cases[2] ^ other_cases[1]))
+ {
+ if (charoffset == 0)
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[2] ^ other_cases[1]);
+ else
+ {
+ OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ }
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[2]);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, other_cases[0] - charoffset);
+ OP_FLAGS(SLJIT_OR | ((other_cases[3] == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+
+ other_cases += 3;
+ }
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, *other_cases++ - charoffset);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ }
+
+ while (*other_cases != NOTACHAR)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, *other_cases++ - charoffset);
+ OP_FLAGS(SLJIT_OR | ((*other_cases == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ }
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_UCNC:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_DOLLAR_SIGN - charoffset);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_COMMERCIAL_AT - charoffset);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_GRAVE_ACCENT - charoffset);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+
+ SET_CHAR_OFFSET(0xa0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd7ff - charoffset);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
+ SET_CHAR_OFFSET(0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xe000 - 0);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_GREATER_EQUAL);
+ jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
+ break;
+ }
+ cc += 2;
+ }
+#endif
+
+ if (jump != NULL)
+ add_jump(compiler, compares > 0 ? list : backtracks, jump);
+ }
+
+if (found != NULL)
+ set_jumps(found, LABEL());
+}
+
+#undef SET_TYPE_OFFSET
+#undef SET_CHAR_OFFSET
+
+#endif
+
+static pcre_uchar *compile_char1_matchingpath(compiler_common *common, pcre_uchar type, pcre_uchar *cc, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+int length;
+unsigned int c, oc, bit;
+compare_context context;
+struct sljit_jump *jump[4];
+jump_list *end_list;
+#ifdef SUPPORT_UTF
+struct sljit_label *label;
+#ifdef SUPPORT_UCP
+pcre_uchar propdata[5];
+#endif
+#endif
+
+switch(type)
+ {
+ case OP_SOD:
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
+ return cc;
+
+ case OP_SOM:
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
+ return cc;
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ add_jump(compiler, &common->wordboundary, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_WORD_BOUNDARY ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
+ return cc;
+
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ /* Digits are usually 0-9, so it is worth to optimize them. */
+ if (common->digits[0] == -2)
+ get_ctype_ranges(common, ctype_digit, common->digits);
+ detect_partial_match(common, backtracks);
+ /* Flip the starting bit in the negative case. */
+ if (type == OP_NOT_DIGIT)
+ common->digits[1] ^= 1;
+ if (!check_ranges(common, common->digits, backtracks, TRUE))
+ {
+ read_char8_type(common);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_digit);
+ add_jump(compiler, backtracks, JUMP(type == OP_DIGIT ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
+ }
+ if (type == OP_NOT_DIGIT)
+ common->digits[1] ^= 1;
+ return cc;
+
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ detect_partial_match(common, backtracks);
+ read_char8_type(common);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_space);
+ add_jump(compiler, backtracks, JUMP(type == OP_WHITESPACE ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
+ return cc;
+
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ detect_partial_match(common, backtracks);
+ read_char8_type(common);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_word);
+ add_jump(compiler, backtracks, JUMP(type == OP_WORDCHAR ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
+ return cc;
+
+ case OP_ANY:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ jump[0] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
+ end_list = NULL;
+ if (common->mode != JIT_PARTIAL_HARD_COMPILE)
+ add_jump(compiler, &end_list, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ else
+ check_str_end(common, &end_list);
+
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, common->newline & 0xff));
+ set_jumps(end_list, LABEL());
+ JUMPHERE(jump[0]);
+ }
+ else
+ check_newlinechar(common, common->nltype, backtracks, TRUE);
+ return cc;
+
+ case OP_ALLANY:
+ detect_partial_match(common, backtracks);
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
+#if defined COMPILE_PCRE8
+ jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+#elif defined COMPILE_PCRE16
+ jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+#endif
+ JUMPHERE(jump[0]);
+#endif /* COMPILE_PCRE[8|16] */
+ return cc;
+ }
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ return cc;
+
+ case OP_ANYBYTE:
+ detect_partial_match(common, backtracks);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ return cc;
+
+#ifdef SUPPORT_UTF
+#ifdef SUPPORT_UCP
+ case OP_NOTPROP:
+ case OP_PROP:
+ propdata[0] = 0;
+ propdata[1] = type == OP_NOTPROP ? XCL_NOTPROP : XCL_PROP;
+ propdata[2] = cc[0];
+ propdata[3] = cc[1];
+ propdata[4] = XCL_END;
+ compile_xclass_matchingpath(common, propdata, backtracks);
+ return cc + 2;
+#endif
+#endif
+
+ case OP_ANYNL:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ jump[0] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ /* We don't need to handle soft partial matching case. */
+ end_list = NULL;
+ if (common->mode != JIT_PARTIAL_HARD_COMPILE)
+ add_jump(compiler, &end_list, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ else
+ check_str_end(common, &end_list);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ jump[1] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ jump[2] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[0]);
+ check_newlinechar(common, common->bsr_nltype, backtracks, FALSE);
+ set_jumps(end_list, LABEL());
+ JUMPHERE(jump[1]);
+ JUMPHERE(jump[2]);
+ return cc;
+
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ add_jump(compiler, &common->hspace, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_HSPACE ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
+ return cc;
+
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ add_jump(compiler, &common->vspace, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_VSPACE ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
+ return cc;
+
+#ifdef SUPPORT_UCP
+ case OP_EXTUNI:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
+ /* Optimize register allocation: use a real register. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV_UB, STACK_TOP, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+
+ label = LABEL();
+ jump[0] = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
+ read_char(common);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+
+ OP2(SLJIT_SHL, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 2);
+ OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(STACK_TOP), (sljit_sw)PRIV(ucp_gbtable));
+ OP1(SLJIT_MOV, STACK_TOP, 0, TMP2, 0);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ JUMPTO(SLJIT_C_NOT_ZERO, label);
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
+ JUMPHERE(jump[0]);
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+
+ if (common->mode == JIT_PARTIAL_HARD_COMPILE)
+ {
+ jump[0] = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
+ /* Since we successfully read a char above, partial matching must occure. */
+ check_partial(common, TRUE);
+ JUMPHERE(jump[0]);
+ }
+ return cc;
+#endif
+
+ case OP_EODN:
+ /* Requires rather complex checks. */
+ jump[0] = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (common->mode == JIT_COMPILE)
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_END, 0));
+ else
+ {
+ jump[1] = CMP(SLJIT_C_EQUAL, TMP2, 0, STR_END, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_NOT_EQUAL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_C_NOT_EQUAL));
+ check_partial(common, TRUE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(jump[1]);
+ }
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else if (common->nltype == NLTYPE_FIXED)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_END, 0));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
+ }
+ else
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ jump[1] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
+ jump[2] = JUMP(SLJIT_C_GREATER);
+ add_jump(compiler, backtracks, JUMP(SLJIT_C_LESS));
+ /* Equal. */
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ jump[3] = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+
+ JUMPHERE(jump[1]);
+ if (common->nltype == NLTYPE_ANYCRLF)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP2, 0, STR_END, 0));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
+ }
+ else
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, STR_PTR, 0);
+ read_char(common);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, STR_END, 0));
+ add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(SLJIT_C_ZERO));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
+ }
+ JUMPHERE(jump[2]);
+ JUMPHERE(jump[3]);
+ }
+ JUMPHERE(jump[0]);
+ check_partial(common, FALSE);
+ return cc;
+
+ case OP_EOD:
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0));
+ check_partial(common, FALSE);
+ return cc;
+
+ case OP_CIRC:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0));
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, notbol));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+ return cc;
+
+ case OP_CIRCM:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ jump[1] = CMP(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0);
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, notbol));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+ jump[0] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[1]);
+
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_SUB, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP2, 0, TMP1, 0));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else
+ {
+ skip_char_back(common);
+ read_char(common);
+ check_newlinechar(common, common->nltype, backtracks, FALSE);
+ }
+ JUMPHERE(jump[0]);
+ return cc;
+
+ case OP_DOLL:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, noteol));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+
+ if (!common->endonly)
+ compile_char1_matchingpath(common, OP_EODN, cc, backtracks);
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0));
+ check_partial(common, FALSE);
+ }
+ return cc;
+
+ case OP_DOLLM:
+ jump[1] = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, noteol));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+ check_partial(common, FALSE);
+ jump[0] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[1]);
+
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (common->mode == JIT_COMPILE)
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, TMP2, 0, STR_END, 0));
+ else
+ {
+ jump[1] = CMP(SLJIT_C_LESS_EQUAL, TMP2, 0, STR_END, 0);
+ /* STR_PTR = STR_END - IN_UCHARS(1) */
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ check_partial(common, TRUE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(jump[1]);
+ }
+
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else
+ {
+ peek_char(common);
+ check_newlinechar(common, common->nltype, backtracks, FALSE);
+ }
+ JUMPHERE(jump[0]);
+ return cc;
+
+ case OP_CHAR:
+ case OP_CHARI:
+ length = 1;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(*cc)) length += GET_EXTRALEN(*cc);
+#endif
+ if (common->mode == JIT_COMPILE && (type == OP_CHAR || !char_has_othercase(common, cc) || char_get_othercase_bit(common, cc) != 0))
+ {
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0));
+
+ context.length = IN_UCHARS(length);
+ context.sourcereg = -1;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ context.ucharptr = 0;
+#endif
+ return byte_sequence_compare(common, type == OP_CHARI, cc, &context, backtracks);
+ }
+ detect_partial_match(common, backtracks);
+ read_char(common);
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ GETCHAR(c, cc);
+ }
+ else
+#endif
+ c = *cc;
+ if (type == OP_CHAR || !char_has_othercase(common, cc))
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ return cc + length;
+ }
+ oc = char_othercase(common, c);
+ bit = c ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
+ return cc + length;
+ }
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, c);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, oc);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_C_ZERO));
+ return cc + length;
+
+ case OP_NOT:
+ case OP_NOTI:
+ detect_partial_match(common, backtracks);
+ length = 1;
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+#ifdef COMPILE_PCRE8
+ c = *cc;
+ if (c < 128)
+ {
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ if (type == OP_NOT || !char_has_othercase(common, cc))
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ else
+ {
+ /* Since UTF8 code page is fixed, we know that c is in [a-z] or [A-Z] range. */
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x20);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, c | 0x20));
+ }
+ /* Skip the variable-length character. */
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(jump[0]);
+ return cc + 1;
+ }
+ else
+#endif /* COMPILE_PCRE8 */
+ {
+ GETCHARLEN(c, cc, length);
+ read_char(common);
+ }
+ }
+ else
+#endif /* SUPPORT_UTF */
+ {
+ read_char(common);
+ c = *cc;
+ }
+
+ if (type == OP_NOT || !char_has_othercase(common, cc))
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ else
+ {
+ oc = char_othercase(common, c);
+ bit = c ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
+ }
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, oc));
+ }
+ }
+ return cc + length;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ if (check_class_ranges(common, (const pcre_uint8 *)cc, type == OP_NCLASS, backtracks))
+ return cc + 32 / sizeof(pcre_uchar);
+
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ jump[0] = NULL;
+#ifdef COMPILE_PCRE8
+ /* This check only affects 8 bit mode. In other modes, we
+ always need to compare the value with 255. */
+ if (common->utf)
+#endif /* COMPILE_PCRE8 */
+ {
+ jump[0] = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
+ if (type == OP_CLASS)
+ {
+ add_jump(compiler, backtracks, jump[0]);
+ jump[0] = NULL;
+ }
+ }
+#endif /* SUPPORT_UTF || !COMPILE_PCRE8 */
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ add_jump(compiler, backtracks, JUMP(SLJIT_C_ZERO));
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ if (jump[0] != NULL)
+ JUMPHERE(jump[0]);
+#endif /* SUPPORT_UTF || !COMPILE_PCRE8 */
+ return cc + 32 / sizeof(pcre_uchar);
+
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case OP_XCLASS:
+ compile_xclass_matchingpath(common, cc + LINK_SIZE, backtracks);
+ return cc + GET(cc, 0) - 1;
+#endif
+
+ case OP_REVERSE:
+ length = GET(cc, 0);
+ if (length == 0)
+ return cc + LINK_SIZE;
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, length);
+ label = LABEL();
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP3, 0));
+ skip_char_back(common);
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, label);
+ }
+ else
+#endif
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0));
+ }
+ check_start_used_ptr(common);
+ return cc + LINK_SIZE;
+ }
+SLJIT_ASSERT_STOP();
+return cc;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_charn_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, jump_list **backtracks)
+{
+/* This function consumes at least one input character. */
+/* To decrease the number of length checks, we try to concatenate the fixed length character sequences. */
+DEFINE_COMPILER;
+pcre_uchar *ccbegin = cc;
+compare_context context;
+int size;
+
+context.length = 0;
+do
+ {
+ if (cc >= ccend)
+ break;
+
+ if (*cc == OP_CHAR)
+ {
+ size = 1;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(cc[1]))
+ size += GET_EXTRALEN(cc[1]);
+#endif
+ }
+ else if (*cc == OP_CHARI)
+ {
+ size = 1;
+#ifdef SUPPORT_UTF
+ if (common->utf)
+ {
+ if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
+ size = 0;
+ else if (HAS_EXTRALEN(cc[1]))
+ size += GET_EXTRALEN(cc[1]);
+ }
+ else
+#endif
+ if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
+ size = 0;
+ }
+ else
+ size = 0;
+
+ cc += 1 + size;
+ context.length += IN_UCHARS(size);
+ }
+while (size > 0 && context.length <= 128);
+
+cc = ccbegin;
+if (context.length > 0)
+ {
+ /* We have a fixed-length byte sequence. */
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, context.length);
+ add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0));
+
+ context.sourcereg = -1;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ context.ucharptr = 0;
+#endif
+ do cc = byte_sequence_compare(common, *cc == OP_CHARI, cc + 1, &context, backtracks); while (context.length > 0);
+ return cc;
+ }
+
+/* A non-fixed length character will be checked if length == 0. */
+return compile_char1_matchingpath(common, *cc, cc + 1, backtracks);
+}
+
+static struct sljit_jump *compile_ref_checks(compiler_common *common, pcre_uchar *cc, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+int offset = GET2(cc, 1) << 1;
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
+if (!common->jscript_compat)
+ {
+ if (backtracks == NULL)
+ {
+ /* OVECTOR(1) contains the "string begin - 1" constant. */
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
+ return JUMP(SLJIT_C_NOT_ZERO);
+ }
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
+ }
+return CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+}
+
+/* Forward definitions. */
+static void compile_matchingpath(compiler_common *, pcre_uchar *, pcre_uchar *, backtrack_common *);
+static void compile_backtrackingpath(compiler_common *, struct backtrack_common *);
+
+#define PUSH_BACKTRACK(size, ccstart, error) \
+ do \
+ { \
+ backtrack = sljit_alloc_memory(compiler, (size)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return error; \
+ memset(backtrack, 0, size); \
+ backtrack->prev = parent->top; \
+ backtrack->cc = (ccstart); \
+ parent->top = backtrack; \
+ } \
+ while (0)
+
+#define PUSH_BACKTRACK_NOVALUE(size, ccstart) \
+ do \
+ { \
+ backtrack = sljit_alloc_memory(compiler, (size)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return; \
+ memset(backtrack, 0, size); \
+ backtrack->prev = parent->top; \
+ backtrack->cc = (ccstart); \
+ parent->top = backtrack; \
+ } \
+ while (0)
+
+#define BACKTRACK_AS(type) ((type *)backtrack)
+
+static pcre_uchar *compile_ref_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks, BOOL withchecks, BOOL emptyfail)
+{
+DEFINE_COMPILER;
+int offset = GET2(cc, 1) << 1;
+struct sljit_jump *jump = NULL;
+struct sljit_jump *partial;
+struct sljit_jump *nopartial;
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
+/* OVECTOR(1) contains the "string begin - 1" constant. */
+if (withchecks && !common->jscript_compat)
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
+
+#if defined SUPPORT_UTF && defined SUPPORT_UCP
+if (common->utf && *cc == OP_REFI)
+ {
+ SLJIT_ASSERT(TMP1 == SLJIT_SCRATCH_REG1 && STACK_TOP == SLJIT_SCRATCH_REG2 && TMP2 == SLJIT_SCRATCH_REG3);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+ if (withchecks)
+ jump = CMP(SLJIT_C_EQUAL, TMP1, 0, TMP2, 0);
+
+ /* Needed to save important temporary registers. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, uchar_ptr), STR_PTR, 0);
+ sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_utf_caselesscmp));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+ if (common->mode == JIT_COMPILE)
+ add_jump(compiler, backtracks, CMP(SLJIT_C_LESS_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1));
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0));
+ nopartial = CMP(SLJIT_C_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+ check_partial(common, FALSE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(nopartial);
+ }
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);
+ }
+else
+#endif /* SUPPORT_UTF && SUPPORT_UCP */
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0);
+ if (withchecks)
+ jump = JUMP(SLJIT_C_ZERO);
+
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ partial = CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0);
+ if (common->mode == JIT_COMPILE)
+ add_jump(compiler, backtracks, partial);
+
+ add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+
+ if (common->mode != JIT_COMPILE)
+ {
+ nopartial = JUMP(SLJIT_JUMP);
+ JUMPHERE(partial);
+ /* TMP2 -= STR_END - STR_PTR */
+ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, STR_PTR, 0);
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, STR_END, 0);
+ partial = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0);
+ add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+ JUMPHERE(partial);
+ check_partial(common, FALSE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(nopartial);
+ }
+ }
+
+if (jump != NULL)
+ {
+ if (emptyfail)
+ add_jump(compiler, backtracks, jump);
+ else
+ JUMPHERE(jump);
+ }
+return cc + 1 + IMM2_SIZE;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_ref_iterator_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+pcre_uchar type;
+struct sljit_label *label;
+struct sljit_jump *zerolength;
+struct sljit_jump *jump = NULL;
+pcre_uchar *ccbegin = cc;
+int min = 0, max = 0;
+BOOL minimize;
+
+PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL);
+
+type = cc[1 + IMM2_SIZE];
+minimize = (type & 0x1) != 0;
+switch(type)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ min = 0;
+ max = 0;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ min = 1;
+ max = 0;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ min = 0;
+ max = 1;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ min = GET2(cc, 1 + IMM2_SIZE + 1);
+ max = GET2(cc, 1 + IMM2_SIZE + 1 + IMM2_SIZE);
+ cc += 1 + IMM2_SIZE + 1 + 2 * IMM2_SIZE;
+ break;
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+if (!minimize)
+ {
+ if (min == 0)
+ {
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+ /* Temporary release of STR_PTR. */
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ zerolength = compile_ref_checks(common, ccbegin, NULL);
+ /* Restore if not zero length. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ }
+ else
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ zerolength = compile_ref_checks(common, ccbegin, &backtrack->topbacktracks);
+ }
+
+ if (min > 1 || max > 1)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, 0);
+
+ label = LABEL();
+ compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, FALSE, FALSE);
+
+ if (min > 1 || max > 1)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, TMP1, 0);
+ if (min > 1)
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, label);
+ if (max > 1)
+ {
+ jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, max);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ JUMPHERE(jump);
+ }
+ }
+
+ if (max == 0)
+ {
+ /* Includes min > 1 case as well. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ }
+
+ JUMPHERE(zerolength);
+ BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+
+ count_match(common);
+ return cc;
+ }
+
+allocate_stack(common, 2);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+if (type != OP_CRMINSTAR)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+
+if (min == 0)
+ {
+ zerolength = compile_ref_checks(common, ccbegin, NULL);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ jump = JUMP(SLJIT_JUMP);
+ }
+else
+ zerolength = compile_ref_checks(common, ccbegin, &backtrack->topbacktracks);
+
+BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+if (max > 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, max));
+
+compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, TRUE, TRUE);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+if (min > 1)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, BACKTRACK_AS(iterator_backtrack)->matchingpath);
+ }
+else if (max > 0)
+ OP2(SLJIT_ADD, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1);
+
+if (jump != NULL)
+ JUMPHERE(jump);
+JUMPHERE(zerolength);
+
+count_match(common);
+return cc;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_recurse_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+recurse_entry *entry = common->entries;
+recurse_entry *prev = NULL;
+sljit_sw start = GET(cc, 1);
+pcre_uchar *start_cc;
+BOOL needs_control_head;
+
+PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL);
+
+/* Inlining simple patterns. */
+if (get_framesize(common, common->start + start, NULL, TRUE, &needs_control_head) == no_stack)
+ {
+ start_cc = common->start + start;
+ compile_matchingpath(common, next_opcode(common, start_cc), bracketend(start_cc) - (1 + LINK_SIZE), backtrack);
+ BACKTRACK_AS(recurse_backtrack)->inlined_pattern = TRUE;
+ return cc + 1 + LINK_SIZE;
+ }
+
+while (entry != NULL)
+ {
+ if (entry->start == start)
+ break;
+ prev = entry;
+ entry = entry->next;
+ }
+
+if (entry == NULL)
+ {
+ entry = sljit_alloc_memory(compiler, sizeof(recurse_entry));
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ entry->next = NULL;
+ entry->entry = NULL;
+ entry->calls = NULL;
+ entry->start = start;
+
+ if (prev != NULL)
+ prev->next = entry;
+ else
+ common->entries = entry;
+ }
+
+if (common->has_set_som && common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ }
+else if (common->has_set_som || common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+if (entry->entry == NULL)
+ add_jump(compiler, &entry->calls, JUMP(SLJIT_FAST_CALL));
+else
+ JUMPTO(SLJIT_FAST_CALL, entry->entry);
+/* Leave if the match is failed. */
+add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0));
+return cc + 1 + LINK_SIZE;
+}
+
+static int SLJIT_CALL do_callout(struct jit_arguments* arguments, PUBL(callout_block) *callout_block, pcre_uchar **jit_ovector)
+{
+const pcre_uchar *begin = arguments->begin;
+int *offset_vector = arguments->offsets;
+int offset_count = arguments->offset_count;
+int i;
+
+if (PUBL(callout) == NULL)
+ return 0;
+
+callout_block->version = 2;
+callout_block->callout_data = arguments->callout_data;
+
+/* Offsets in subject. */
+callout_block->subject_length = arguments->end - arguments->begin;
+callout_block->start_match = (pcre_uchar*)callout_block->subject - arguments->begin;
+callout_block->current_position = (pcre_uchar*)callout_block->offset_vector - arguments->begin;
+#if defined COMPILE_PCRE8
+callout_block->subject = (PCRE_SPTR)begin;
+#elif defined COMPILE_PCRE16
+callout_block->subject = (PCRE_SPTR16)begin;
+#elif defined COMPILE_PCRE32
+callout_block->subject = (PCRE_SPTR32)begin;
+#endif
+
+/* Convert and copy the JIT offset vector to the offset_vector array. */
+callout_block->capture_top = 0;
+callout_block->offset_vector = offset_vector;
+for (i = 2; i < offset_count; i += 2)
+ {
+ offset_vector[i] = jit_ovector[i] - begin;
+ offset_vector[i + 1] = jit_ovector[i + 1] - begin;
+ if (jit_ovector[i] >= begin)
+ callout_block->capture_top = i;
+ }
+
+callout_block->capture_top = (callout_block->capture_top >> 1) + 1;
+if (offset_count > 0)
+ offset_vector[0] = -1;
+if (offset_count > 1)
+ offset_vector[1] = -1;
+return (*PUBL(callout))(callout_block);
+}
+
+/* Aligning to 8 byte. */
+#define CALLOUT_ARG_SIZE \
+ (((int)sizeof(PUBL(callout_block)) + 7) & ~7)
+
+#define CALLOUT_ARG_OFFSET(arg) \
+ (-CALLOUT_ARG_SIZE + SLJIT_OFFSETOF(PUBL(callout_block), arg))
+
+static SLJIT_INLINE pcre_uchar *compile_callout_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+allocate_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
+
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+SLJIT_ASSERT(common->capture_last_ptr != 0);
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_number), SLJIT_IMM, cc[1]);
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(capture_last), TMP2, 0);
+
+/* These pointer sized fields temporarly stores internal variables. */
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(offset_vector), STR_PTR, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(subject), TMP2, 0);
+
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr));
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(pattern_position), SLJIT_IMM, GET(cc, 2));
+OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(next_item_length), SLJIT_IMM, GET(cc, 2 + LINK_SIZE));
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(mark), (common->mark_ptr != 0) ? TMP2 : SLJIT_IMM, 0);
+
+/* Needed to save important temporary registers. */
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
+OP2(SLJIT_SUB, SLJIT_SCRATCH_REG2, 0, STACK_TOP, 0, SLJIT_IMM, CALLOUT_ARG_SIZE);
+GET_LOCAL_BASE(SLJIT_SCRATCH_REG3, 0, OVECTOR_START);
+sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout));
+OP1(SLJIT_MOV_SI, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+free_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
+
+/* Check return value. */
+OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_C_SIG_GREATER));
+if (common->forced_quit_label == NULL)
+ add_jump(compiler, &common->forced_quit, JUMP(SLJIT_C_SIG_LESS));
+else
+ JUMPTO(SLJIT_C_SIG_LESS, common->forced_quit_label);
+return cc + 2 + 2 * LINK_SIZE;
+}
+
+#undef CALLOUT_ARG_SIZE
+#undef CALLOUT_ARG_OFFSET
+
+static pcre_uchar *compile_assert_matchingpath(compiler_common *common, pcre_uchar *cc, assert_backtrack *backtrack, BOOL conditional)
+{
+DEFINE_COMPILER;
+int framesize;
+int extrasize;
+BOOL needs_control_head;
+int private_data_ptr;
+backtrack_common altbacktrack;
+pcre_uchar *ccbegin;
+pcre_uchar opcode;
+pcre_uchar bra = OP_BRA;
+jump_list *tmp = NULL;
+jump_list **target = (conditional) ? &backtrack->condfailed : &backtrack->common.topbacktracks;
+jump_list **found;
+/* Saving previous accept variables. */
+BOOL save_local_exit = common->local_exit;
+BOOL save_positive_assert = common->positive_assert;
+then_trap_backtrack *save_then_trap = common->then_trap;
+struct sljit_label *save_quit_label = common->quit_label;
+struct sljit_label *save_accept_label = common->accept_label;
+jump_list *save_quit = common->quit;
+jump_list *save_positive_assert_quit = common->positive_assert_quit;
+jump_list *save_accept = common->accept;
+struct sljit_jump *jump;
+struct sljit_jump *brajump = NULL;
+
+/* Assert captures then. */
+common->then_trap = NULL;
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ SLJIT_ASSERT(!conditional);
+ bra = *cc;
+ cc++;
+ }
+private_data_ptr = PRIVATE_DATA(cc);
+SLJIT_ASSERT(private_data_ptr != 0);
+framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
+backtrack->framesize = framesize;
+backtrack->private_data_ptr = private_data_ptr;
+opcode = *cc;
+SLJIT_ASSERT(opcode >= OP_ASSERT && opcode <= OP_ASSERTBACK_NOT);
+found = (opcode == OP_ASSERT || opcode == OP_ASSERTBACK) ? &tmp : target;
+ccbegin = cc;
+cc += GET(cc, 1);
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a braminzero backtrack path. */
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brajump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+
+if (framesize < 0)
+ {
+ extrasize = needs_control_head ? 2 : 1;
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
+ allocate_stack(common, extrasize);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ }
+ }
+else
+ {
+ extrasize = needs_control_head ? 3 : 2;
+ allocate_stack(common, framesize + extrasize);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
+ }
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ init_frame(common, ccbegin, NULL, framesize + extrasize - 1, extrasize, FALSE);
+ }
+
+memset(&altbacktrack, 0, sizeof(backtrack_common));
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ /* Negative assert is stronger than positive assert. */
+ common->local_exit = TRUE;
+ common->quit_label = NULL;
+ common->quit = NULL;
+ common->positive_assert = FALSE;
+ }
+else
+ common->positive_assert = TRUE;
+common->positive_assert_quit = NULL;
+
+while (1)
+ {
+ common->accept_label = NULL;
+ common->accept = NULL;
+ altbacktrack.top = NULL;
+ altbacktrack.topbacktracks = NULL;
+
+ if (*ccbegin == OP_ALT)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ altbacktrack.cc = ccbegin;
+ compile_matchingpath(common, ccbegin + 1 + LINK_SIZE, cc, &altbacktrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+ common->positive_assert = save_positive_assert;
+ common->then_trap = save_then_trap;
+ common->accept_label = save_accept_label;
+ common->positive_assert_quit = save_positive_assert_quit;
+ common->accept = save_accept;
+ return NULL;
+ }
+ common->accept_label = LABEL();
+ if (common->accept != NULL)
+ set_jumps(common->accept, common->accept_label);
+
+ /* Reset stack. */
+ if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ else
+ free_stack(common, extrasize);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ else
+ {
+ if ((opcode != OP_ASSERT_NOT && opcode != OP_ASSERTBACK_NOT) || conditional)
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), (framesize + 1) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ }
+
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ /* We know that STR_PTR was stored on the top of the stack. */
+ if (conditional)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), needs_control_head ? sizeof(sljit_sw) : 0);
+ else if (bra == OP_BRAZERO)
+ {
+ if (framesize < 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (framesize + extrasize - 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
+ }
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else if (framesize >= 0)
+ {
+ /* For OP_BRA and OP_BRAMINZERO. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ }
+ }
+ add_jump(compiler, found, JUMP(SLJIT_JUMP));
+
+ compile_backtrackingpath(common, altbacktrack.top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+ common->positive_assert = save_positive_assert;
+ common->then_trap = save_then_trap;
+ common->accept_label = save_accept_label;
+ common->positive_assert_quit = save_positive_assert_quit;
+ common->accept = save_accept;
+ return NULL;
+ }
+ set_jumps(altbacktrack.topbacktracks, LABEL());
+
+ if (*cc != OP_ALT)
+ break;
+
+ ccbegin = cc;
+ cc += GET(cc, 1);
+ }
+
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ SLJIT_ASSERT(common->positive_assert_quit == NULL);
+ /* Makes the check less complicated below. */
+ common->positive_assert_quit = common->quit;
+ }
+
+/* None of them matched. */
+if (common->positive_assert_quit != NULL)
+ {
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(common->positive_assert_quit, LABEL());
+ SLJIT_ASSERT(framesize != no_stack);
+ if (framesize < 0)
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, extrasize * sizeof(sljit_sw));
+ else
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
+ }
+ JUMPHERE(jump);
+ }
+
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(1));
+
+if (opcode == OP_ASSERT || opcode == OP_ASSERTBACK)
+ {
+ /* Assert is failed. */
+ if (conditional || bra == OP_BRAZERO)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ if (framesize < 0)
+ {
+ /* The topmost item should be 0. */
+ if (bra == OP_BRAZERO)
+ {
+ if (extrasize == 2)
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, extrasize);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
+ /* The topmost item should be 0. */
+ if (bra == OP_BRAZERO)
+ {
+ free_stack(common, framesize + extrasize - 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, framesize + extrasize);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
+ }
+ jump = JUMP(SLJIT_JUMP);
+ if (bra != OP_BRAZERO)
+ add_jump(compiler, target, jump);
+
+ /* Assert is successful. */
+ set_jumps(tmp, LABEL());
+ if (framesize < 0)
+ {
+ /* We know that STR_PTR was stored on the top of the stack. */
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
+ /* Keep the STR_PTR on the top of the stack. */
+ if (bra == OP_BRAZERO)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ if (extrasize == 2)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+ else if (bra == OP_BRAMINZERO)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ }
+ else
+ {
+ if (bra == OP_BRA)
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 2) * sizeof(sljit_sw));
+ }
+ else
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 2) * sizeof(sljit_sw));
+ if (extrasize == 2)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (bra == OP_BRAMINZERO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), bra == OP_BRAZERO ? STR_PTR : SLJIT_IMM, 0);
+ }
+ }
+ }
+
+ if (bra == OP_BRAZERO)
+ {
+ backtrack->matchingpath = LABEL();
+ SET_LABEL(jump, backtrack->matchingpath);
+ }
+ else if (bra == OP_BRAMINZERO)
+ {
+ JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
+ JUMPHERE(brajump);
+ if (framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ }
+ set_jumps(backtrack->common.topbacktracks, LABEL());
+ }
+ }
+else
+ {
+ /* AssertNot is successful. */
+ if (framesize < 0)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (bra != OP_BRA)
+ {
+ if (extrasize == 2)
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, extrasize);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
+ /* The topmost item should be 0. */
+ if (bra != OP_BRA)
+ {
+ free_stack(common, framesize + extrasize - 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, framesize + extrasize);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
+ }
+
+ if (bra == OP_BRAZERO)
+ backtrack->matchingpath = LABEL();
+ else if (bra == OP_BRAMINZERO)
+ {
+ JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
+ JUMPHERE(brajump);
+ }
+
+ if (bra != OP_BRA)
+ {
+ SLJIT_ASSERT(found == &backtrack->common.topbacktracks);
+ set_jumps(backtrack->common.topbacktracks, LABEL());
+ backtrack->common.topbacktracks = NULL;
+ }
+ }
+
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+common->positive_assert = save_positive_assert;
+common->then_trap = save_then_trap;
+common->accept_label = save_accept_label;
+common->positive_assert_quit = save_positive_assert_quit;
+common->accept = save_accept;
+return cc + 1 + LINK_SIZE;
+}
+
+static sljit_sw SLJIT_CALL do_searchovector(sljit_uw refno, sljit_sw* locals, pcre_uchar *name_table)
+{
+int condition = FALSE;
+pcre_uchar *slotA = name_table;
+pcre_uchar *slotB;
+sljit_sw name_count = locals[LOCALS0 / sizeof(sljit_sw)];
+sljit_sw name_entry_size = locals[LOCALS1 / sizeof(sljit_sw)];
+sljit_sw no_capture;
+int i;
+
+locals += refno & 0xff;
+refno >>= 8;
+no_capture = locals[1];
+
+for (i = 0; i < name_count; i++)
+ {
+ if (GET2(slotA, 0) == refno) break;
+ slotA += name_entry_size;
+ }
+
+if (i < name_count)
+ {
+ /* Found a name for the number - there can be only one; duplicate names
+ for different numbers are allowed, but not vice versa. First scan down
+ for duplicates. */
+
+ slotB = slotA;
+ while (slotB > name_table)
+ {
+ slotB -= name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = locals[GET2(slotB, 0) << 1] != no_capture;
+ if (condition) break;
+ }
+ else break;
+ }
+
+ /* Scan up for duplicates */
+ if (!condition)
+ {
+ slotB = slotA;
+ for (i++; i < name_count; i++)
+ {
+ slotB += name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = locals[GET2(slotB, 0) << 1] != no_capture;
+ if (condition) break;
+ }
+ else break;
+ }
+ }
+ }
+return condition;
+}
+
+static sljit_sw SLJIT_CALL do_searchgroups(sljit_uw recno, sljit_uw* locals, pcre_uchar *name_table)
+{
+int condition = FALSE;
+pcre_uchar *slotA = name_table;
+pcre_uchar *slotB;
+sljit_uw name_count = locals[LOCALS0 / sizeof(sljit_sw)];
+sljit_uw name_entry_size = locals[LOCALS1 / sizeof(sljit_sw)];
+sljit_uw group_num = locals[POSSESSIVE0 / sizeof(sljit_sw)];
+sljit_uw i;
+
+for (i = 0; i < name_count; i++)
+ {
+ if (GET2(slotA, 0) == recno) break;
+ slotA += name_entry_size;
+ }
+
+if (i < name_count)
+ {
+ /* Found a name for the number - there can be only one; duplicate
+ names for different numbers are allowed, but not vice versa. First
+ scan down for duplicates. */
+
+ slotB = slotA;
+ while (slotB > name_table)
+ {
+ slotB -= name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = GET2(slotB, 0) == group_num;
+ if (condition) break;
+ }
+ else break;
+ }
+
+ /* Scan up for duplicates */
+ if (!condition)
+ {
+ slotB = slotA;
+ for (i++; i < name_count; i++)
+ {
+ slotB += name_entry_size;
+ if (STRCMP_UC_UC(slotA + IMM2_SIZE, slotB + IMM2_SIZE) == 0)
+ {
+ condition = GET2(slotB, 0) == group_num;
+ if (condition) break;
+ }
+ else break;
+ }
+ }
+ }
+return condition;
+}
+
+static SLJIT_INLINE void match_once_common(compiler_common *common, pcre_uchar ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head)
+{
+DEFINE_COMPILER;
+int stacksize;
+
+if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ else
+ {
+ stacksize = needs_control_head ? 1 : 0;
+ if (ket != OP_KET || has_alternatives)
+ stacksize++;
+ free_stack(common, stacksize);
+ }
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), (ket != OP_KET || has_alternatives) ? sizeof(sljit_sw) : 0);
+
+ /* TMP2 which is set here used by OP_KETRMAX below. */
+ if (ket == OP_KETRMAX)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);
+ else if (ket == OP_KETRMIN)
+ {
+ /* Move the STR_PTR to the private_data_ptr. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ }
+else
+ {
+ stacksize = (ket != OP_KET || has_alternatives) ? 2 : 1;
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + stacksize) * sizeof(sljit_sw));
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 0);
+
+ if (ket == OP_KETRMAX)
+ {
+ /* TMP2 which is set here used by OP_KETRMAX below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ }
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
+}
+
+static SLJIT_INLINE int match_capture_common(compiler_common *common, int stacksize, int offset, int private_data_ptr)
+{
+DEFINE_COMPILER;
+
+if (common->capture_last_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ stacksize++;
+ }
+if (common->optimized_cbracket[offset >> 1] == 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ stacksize += 2;
+ }
+return stacksize;
+}
+
+/*
+ Handling bracketed expressions is probably the most complex part.
+
+ Stack layout naming characters:
+ S - Push the current STR_PTR
+ 0 - Push a 0 (NULL)
+ A - Push the current STR_PTR. Needed for restoring the STR_PTR
+ before the next alternative. Not pushed if there are no alternatives.
+ M - Any values pushed by the current alternative. Can be empty, or anything.
+ C - Push the previous OVECTOR(i), OVECTOR(i+1) and OVECTOR_PRIV(i) to the stack.
+ L - Push the previous local (pointed by localptr) to the stack
+ () - opional values stored on the stack
+ ()* - optonal, can be stored multiple times
+
+ The following list shows the regular expression templates, their PCRE byte codes
+ and stack layout supported by pcre-sljit.
+
+ (?:) OP_BRA | OP_KET A M
+ () OP_CBRA | OP_KET C M
+ (?:)+ OP_BRA | OP_KETRMAX 0 A M S ( A M S )*
+ OP_SBRA | OP_KETRMAX 0 L M S ( L M S )*
+ (?:)+? OP_BRA | OP_KETRMIN 0 A M S ( A M S )*
+ OP_SBRA | OP_KETRMIN 0 L M S ( L M S )*
+ ()+ OP_CBRA | OP_KETRMAX 0 C M S ( C M S )*
+ OP_SCBRA | OP_KETRMAX 0 C M S ( C M S )*
+ ()+? OP_CBRA | OP_KETRMIN 0 C M S ( C M S )*
+ OP_SCBRA | OP_KETRMIN 0 C M S ( C M S )*
+ (?:)? OP_BRAZERO | OP_BRA | OP_KET S ( A M 0 )
+ (?:)?? OP_BRAMINZERO | OP_BRA | OP_KET S ( A M 0 )
+ ()? OP_BRAZERO | OP_CBRA | OP_KET S ( C M 0 )
+ ()?? OP_BRAMINZERO | OP_CBRA | OP_KET S ( C M 0 )
+ (?:)* OP_BRAZERO | OP_BRA | OP_KETRMAX S 0 ( A M S )*
+ OP_BRAZERO | OP_SBRA | OP_KETRMAX S 0 ( L M S )*
+ (?:)*? OP_BRAMINZERO | OP_BRA | OP_KETRMIN S 0 ( A M S )*
+ OP_BRAMINZERO | OP_SBRA | OP_KETRMIN S 0 ( L M S )*
+ ()* OP_BRAZERO | OP_CBRA | OP_KETRMAX S 0 ( C M S )*
+ OP_BRAZERO | OP_SCBRA | OP_KETRMAX S 0 ( C M S )*
+ ()*? OP_BRAMINZERO | OP_CBRA | OP_KETRMIN S 0 ( C M S )*
+ OP_BRAMINZERO | OP_SCBRA | OP_KETRMIN S 0 ( C M S )*
+
+
+ Stack layout naming characters:
+ A - Push the alternative index (starting from 0) on the stack.
+ Not pushed if there is no alternatives.
+ M - Any values pushed by the current alternative. Can be empty, or anything.
+
+ The next list shows the possible content of a bracket:
+ (|) OP_*BRA | OP_ALT ... M A
+ (?()|) OP_*COND | OP_ALT M A
+ (?>|) OP_ONCE | OP_ALT ... [stack trace] M A
+ (?>|) OP_ONCE_NC | OP_ALT ... [stack trace] M A
+ Or nothing, if trace is unnecessary
+*/
+
+static pcre_uchar *compile_bracket_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+pcre_uchar opcode;
+int private_data_ptr = 0;
+int offset = 0;
+int stacksize;
+int repeat_ptr = 0, repeat_length = 0;
+int repeat_type = 0, repeat_count = 0;
+pcre_uchar *ccbegin;
+pcre_uchar *matchingpath;
+pcre_uchar bra = OP_BRA;
+pcre_uchar ket;
+assert_backtrack *assert;
+BOOL has_alternatives;
+BOOL needs_control_head = FALSE;
+struct sljit_jump *jump;
+struct sljit_jump *skip;
+struct sljit_label *rmax_label = NULL;
+struct sljit_jump *braminzero = NULL;
+
+PUSH_BACKTRACK(sizeof(bracket_backtrack), cc, NULL);
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ bra = *cc;
+ cc++;
+ opcode = *cc;
+ }
+
+opcode = *cc;
+ccbegin = cc;
+matchingpath = bracketend(cc) - 1 - LINK_SIZE;
+ket = *matchingpath;
+if (ket == OP_KET && PRIVATE_DATA(matchingpath) != 0)
+ {
+ repeat_ptr = PRIVATE_DATA(matchingpath);
+ repeat_length = PRIVATE_DATA(matchingpath + 1);
+ repeat_type = PRIVATE_DATA(matchingpath + 2);
+ repeat_count = PRIVATE_DATA(matchingpath + 3);
+ SLJIT_ASSERT(repeat_length != 0 && repeat_type != 0 && repeat_count != 0);
+ if (repeat_type == OP_UPTO)
+ ket = OP_KETRMAX;
+ if (repeat_type == OP_MINUPTO)
+ ket = OP_KETRMIN;
+ }
+
+if ((opcode == OP_COND || opcode == OP_SCOND) && cc[1 + LINK_SIZE] == OP_DEF)
+ {
+ /* Drop this bracket_backtrack. */
+ parent->top = backtrack->prev;
+ return matchingpath + 1 + LINK_SIZE + repeat_length;
+ }
+
+matchingpath = ccbegin + 1 + LINK_SIZE;
+SLJIT_ASSERT(ket == OP_KET || ket == OP_KETRMAX || ket == OP_KETRMIN);
+SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO && ket == OP_KETRMAX)));
+cc += GET(cc, 1);
+
+has_alternatives = *cc == OP_ALT;
+if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ {
+ has_alternatives = (*matchingpath == OP_RREF) ? FALSE : TRUE;
+ if (*matchingpath == OP_NRREF)
+ {
+ stacksize = GET2(matchingpath, 1);
+ if (common->currententry == NULL || stacksize == RREF_ANY)
+ has_alternatives = FALSE;
+ else if (common->currententry->start == 0)
+ has_alternatives = stacksize != 0;
+ else
+ has_alternatives = stacksize != (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
+ }
+ }
+
+if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
+ opcode = OP_SCOND;
+if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
+ opcode = OP_ONCE;
+
+if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ {
+ /* Capturing brackets has a pre-allocated space. */
+ offset = GET2(ccbegin, 1 + LINK_SIZE);
+ if (common->optimized_cbracket[offset] == 0)
+ {
+ private_data_ptr = OVECTOR_PRIV(offset);
+ offset <<= 1;
+ }
+ else
+ {
+ offset <<= 1;
+ private_data_ptr = OVECTOR(offset);
+ }
+ BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
+ matchingpath += IMM2_SIZE;
+ }
+else if (opcode == OP_ONCE || opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ /* Other brackets simply allocate the next entry. */
+ private_data_ptr = PRIVATE_DATA(ccbegin);
+ SLJIT_ASSERT(private_data_ptr != 0);
+ BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
+ if (opcode == OP_ONCE)
+ BACKTRACK_AS(bracket_backtrack)->u.framesize = get_framesize(common, ccbegin, NULL, FALSE, &needs_control_head);
+ }
+
+/* Instructions before the first alternative. */
+stacksize = 0;
+if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
+ stacksize++;
+if (bra == OP_BRAZERO)
+ stacksize++;
+
+if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+stacksize = 0;
+if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+if (bra == OP_BRAZERO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a backtrack path! (Since the try-path of OP_BRAMINZERO matches to the empty string) */
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (ket != OP_KETRMIN)
+ {
+ free_stack(common, 1);
+ braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+ else
+ {
+ if (opcode == OP_ONCE || opcode >= OP_SBRA)
+ {
+ jump = CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ /* Nothing stored during the first run. */
+ skip = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump);
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE || BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
+ {
+ /* When we come from outside, private_data_ptr contains the previous STR_PTR. */
+ braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ }
+ else
+ {
+ /* Except when the whole stack frame must be saved. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (BACKTRACK_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw));
+ }
+ JUMPHERE(skip);
+ }
+ else
+ {
+ jump = CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ JUMPHERE(jump);
+ }
+ }
+ }
+
+if (repeat_type != 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, repeat_count);
+ if (repeat_type == OP_EXACT)
+ rmax_label = LABEL();
+ }
+
+if (ket == OP_KETRMIN)
+ BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
+
+if (ket == OP_KETRMAX)
+ {
+ rmax_label = LABEL();
+ if (has_alternatives && opcode != OP_ONCE && opcode < OP_SBRA && repeat_type == 0)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = rmax_label;
+ }
+
+/* Handling capturing brackets and alternatives. */
+if (opcode == OP_ONCE)
+ {
+ stacksize = 0;
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ stacksize++;
+ }
+
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
+ {
+ /* Neither capturing brackets nor recursions are found in the block. */
+ if (ket == OP_KETRMIN)
+ {
+ stacksize += 2;
+ if (!needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ }
+ else
+ {
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
+ if (ket == OP_KETRMAX || has_alternatives)
+ stacksize++;
+ }
+
+ if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+ stacksize = 0;
+ if (needs_control_head)
+ {
+ stacksize++;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+ if (ket == OP_KETRMIN)
+ {
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, needs_control_head ? (2 * sizeof(sljit_sw)) : sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
+ }
+ else if (ket == OP_KETRMAX || has_alternatives)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ }
+ else
+ {
+ if (ket != OP_KET || has_alternatives)
+ stacksize++;
+
+ stacksize += BACKTRACK_AS(bracket_backtrack)->u.framesize + 1;
+ allocate_stack(common, stacksize);
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+
+ stacksize = needs_control_head ? 1 : 0;
+ if (ket != OP_KET || has_alternatives)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
+ stacksize++;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ }
+ init_frame(common, ccbegin, NULL, BACKTRACK_AS(bracket_backtrack)->u.framesize + stacksize, stacksize + 1, FALSE);
+ }
+ }
+else if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ {
+ /* Saving the previous values. */
+ if (common->optimized_cbracket[offset >> 1] != 0)
+ {
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset));
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+ }
+else if (opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ /* Saving the previous value. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+else if (has_alternatives)
+ {
+ /* Pushing the starting string pointer. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+
+/* Generating code for the first alternative. */
+if (opcode == OP_COND || opcode == OP_SCOND)
+ {
+ if (*matchingpath == OP_CREF)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed),
+ CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(matchingpath, 1) << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
+ matchingpath += 1 + IMM2_SIZE;
+ }
+ else if (*matchingpath == OP_NCREF)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ stacksize = GET2(matchingpath, 1);
+ jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(stacksize << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
+
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size);
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, (stacksize << 8) | (common->ovector_start / sizeof(sljit_sw)));
+ GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, 0);
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, common->name_table);
+ sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchovector));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1);
+ add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, 0));
+
+ JUMPHERE(jump);
+ matchingpath += 1 + IMM2_SIZE;
+ }
+ else if (*matchingpath == OP_RREF || *matchingpath == OP_NRREF)
+ {
+ /* Never has other case. */
+ BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL;
+
+ stacksize = GET2(matchingpath, 1);
+ if (common->currententry == NULL)
+ stacksize = 0;
+ else if (stacksize == RREF_ANY)
+ stacksize = 1;
+ else if (common->currententry->start == 0)
+ stacksize = stacksize == 0;
+ else
+ stacksize = stacksize == (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
+
+ if (*matchingpath == OP_RREF || stacksize || common->currententry == NULL)
+ {
+ SLJIT_ASSERT(!has_alternatives);
+ if (stacksize != 0)
+ matchingpath += 1 + IMM2_SIZE;
+ else
+ {
+ if (*cc == OP_ALT)
+ {
+ matchingpath = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ }
+ else
+ matchingpath = cc;
+ }
+ }
+ else
+ {
+ SLJIT_ASSERT(has_alternatives);
+
+ stacksize = GET2(matchingpath, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, GET2(common->start, common->currententry->start + 1 + LINK_SIZE));
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, stacksize);
+ GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, 0);
+ OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, common->name_table);
+ sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchgroups));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1);
+ add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG1, 0, SLJIT_IMM, 0));
+ matchingpath += 1 + IMM2_SIZE;
+ }
+ }
+ else
+ {
+ SLJIT_ASSERT(has_alternatives && *matchingpath >= OP_ASSERT && *matchingpath <= OP_ASSERTBACK_NOT);
+ /* Similar code as PUSH_BACKTRACK macro. */
+ assert = sljit_alloc_memory(compiler, sizeof(assert_backtrack));
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ memset(assert, 0, sizeof(assert_backtrack));
+ assert->common.cc = matchingpath;
+ BACKTRACK_AS(bracket_backtrack)->u.assert = assert;
+ matchingpath = compile_assert_matchingpath(common, matchingpath, assert, TRUE);
+ }
+ }
+
+compile_matchingpath(common, matchingpath, cc, backtrack);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+
+if (opcode == OP_ONCE)
+ match_once_common(common, ket, BACKTRACK_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
+
+stacksize = 0;
+if (repeat_type == OP_MINUPTO)
+ {
+ /* We need to preserve the counter. TMP2 will be used below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
+ stacksize++;
+ }
+if (ket != OP_KET || bra != OP_BRA)
+ stacksize++;
+if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ if (common->optimized_cbracket[offset >> 1] == 0)
+ stacksize += 2;
+ }
+if (has_alternatives && opcode != OP_ONCE)
+ stacksize++;
+
+if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+stacksize = 0;
+if (repeat_type == OP_MINUPTO)
+ {
+ /* TMP2 was set above. */
+ OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
+ stacksize++;
+ }
+
+if (ket != OP_KET || bra != OP_BRA)
+ {
+ if (ket != OP_KET)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+if (offset != 0)
+ stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
+
+if (has_alternatives)
+ {
+ if (opcode != OP_ONCE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ if (ket != OP_KETRMAX)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ }
+
+/* Must be after the matchingpath label. */
+if (offset != 0 && common->optimized_cbracket[offset >> 1] != 0)
+ {
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+ }
+
+if (ket == OP_KETRMAX)
+ {
+ if (repeat_type != 0)
+ {
+ if (has_alternatives)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, rmax_label);
+ /* Drop STR_PTR for greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else if (opcode == OP_ONCE || opcode >= OP_SBRA)
+ {
+ if (has_alternatives)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE)
+ {
+ CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0, rmax_label);
+ /* Drop STR_PTR for greedy plus quantifier. */
+ if (bra != OP_BRAZERO)
+ free_stack(common, 1);
+ }
+ else
+ /* TMP2 must contain the starting STR_PTR. */
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, rmax_label);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, rmax_label);
+ BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
+ }
+
+if (repeat_type == OP_EXACT)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, rmax_label);
+ }
+else if (repeat_type == OP_UPTO)
+ {
+ /* We need to preserve the counter. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+if (bra == OP_BRAZERO)
+ BACKTRACK_AS(bracket_backtrack)->zero_matchingpath = LABEL();
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a backtrack path! (From the viewpoint of OP_BRAMINZERO) */
+ JUMPTO(SLJIT_JUMP, ((braminzero_backtrack *)parent)->matchingpath);
+ if (braminzero != NULL)
+ {
+ JUMPHERE(braminzero);
+ /* We need to release the end pointer to perform the
+ backtrack for the zero-length iteration. When
+ framesize is < 0, OP_ONCE will do the release itself. */
+ if (opcode == OP_ONCE && BACKTRACK_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ else if (ket == OP_KETRMIN && opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ /* Continue to the normal backtrack. */
+ }
+
+if ((ket != OP_KET && bra != OP_BRAMINZERO) || bra == OP_BRAZERO)
+ count_match(common);
+
+/* Skip the other alternatives. */
+while (*cc == OP_ALT)
+ cc += GET(cc, 1);
+cc += 1 + LINK_SIZE;
+
+/* Temporarily encoding the needs_control_head in framesize. */
+if (opcode == OP_ONCE)
+ BACKTRACK_AS(bracket_backtrack)->u.framesize = (BACKTRACK_AS(bracket_backtrack)->u.framesize << 1) | (needs_control_head ? 1 : 0);
+return cc + repeat_length;
+}
+
+static pcre_uchar *compile_bracketpos_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+pcre_uchar opcode;
+int private_data_ptr;
+int cbraprivptr = 0;
+BOOL needs_control_head;
+int framesize;
+int stacksize;
+int offset = 0;
+BOOL zero = FALSE;
+pcre_uchar *ccbegin = NULL;
+int stack; /* Also contains the offset of control head. */
+struct sljit_label *loop = NULL;
+struct jump_list *emptymatch = NULL;
+
+PUSH_BACKTRACK(sizeof(bracketpos_backtrack), cc, NULL);
+if (*cc == OP_BRAPOSZERO)
+ {
+ zero = TRUE;
+ cc++;
+ }
+
+opcode = *cc;
+private_data_ptr = PRIVATE_DATA(cc);
+SLJIT_ASSERT(private_data_ptr != 0);
+BACKTRACK_AS(bracketpos_backtrack)->private_data_ptr = private_data_ptr;
+switch(opcode)
+ {
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ ccbegin = cc + 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ offset = GET2(cc, 1 + LINK_SIZE);
+ /* This case cannot be optimized in the same was as
+ normal capturing brackets. */
+ SLJIT_ASSERT(common->optimized_cbracket[offset] == 0);
+ cbraprivptr = OVECTOR_PRIV(offset);
+ offset <<= 1;
+ ccbegin = cc + 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
+BACKTRACK_AS(bracketpos_backtrack)->framesize = framesize;
+if (framesize < 0)
+ {
+ if (offset != 0)
+ {
+ stacksize = 2;
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ }
+ else
+ stacksize = 1;
+
+ if (needs_control_head)
+ stacksize++;
+ if (!zero)
+ stacksize++;
+
+ BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
+ allocate_stack(common, stacksize);
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
+
+ stack = 0;
+ if (offset != 0)
+ {
+ stack = 2;
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ if (common->capture_last_ptr != 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
+ stack = 3;
+ }
+ }
+ else
+ {
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ stack = 1;
+ }
+
+ if (needs_control_head)
+ stack++;
+ if (!zero)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), SLJIT_IMM, 1);
+ if (needs_control_head)
+ {
+ stack--;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
+ }
+ }
+else
+ {
+ stacksize = framesize + 1;
+ if (!zero)
+ stacksize++;
+ if (needs_control_head)
+ stacksize++;
+ if (offset == 0)
+ stacksize++;
+ BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
+
+ allocate_stack(common, stacksize);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, -STACK(stacksize - 1));
+
+ stack = 0;
+ if (!zero)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 1);
+ stack = 1;
+ }
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
+ stack++;
+ }
+ if (offset == 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), STR_PTR, 0);
+ stack++;
+ }
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP1, 0);
+ init_frame(common, cc, NULL, stacksize - 1, stacksize - framesize, FALSE);
+ stack -= 1 + (offset == 0);
+ }
+
+if (offset != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
+
+loop = LABEL();
+while (*cc != OP_KETRPOS)
+ {
+ backtrack->top = NULL;
+ backtrack->topbacktracks = NULL;
+ cc += GET(cc, 1);
+
+ compile_matchingpath(common, ccbegin, cc, backtrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+
+ if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+
+ if (offset != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ }
+ else
+ {
+ if (opcode == OP_SBRAPOS)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+
+ if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
+ add_jump(compiler, &emptymatch, CMP(SLJIT_C_EQUAL, TMP1, 0, STR_PTR, 0));
+
+ if (!zero)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
+ }
+ else
+ {
+ if (offset != 0)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP2(SLJIT_ADD, STACK_TOP, 0, TMP2, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+ if (opcode == OP_SBRAPOS)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw), STR_PTR, 0);
+ }
+
+ if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
+ add_jump(compiler, &emptymatch, CMP(SLJIT_C_EQUAL, TMP1, 0, STR_PTR, 0));
+
+ if (!zero)
+ {
+ if (framesize < 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ }
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
+ JUMPTO(SLJIT_JUMP, loop);
+ flush_stubs(common);
+
+ compile_backtrackingpath(common, backtrack->top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ set_jumps(backtrack->topbacktracks, LABEL());
+
+ if (framesize < 0)
+ {
+ if (offset != 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ else
+ {
+ if (offset != 0)
+ {
+ /* Last alternative. */
+ if (*cc == OP_KETRPOS)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
+ }
+ }
+
+ if (*cc == OP_KETRPOS)
+ break;
+ ccbegin = cc + 1 + LINK_SIZE;
+ }
+
+/* We don't have to restore the control head in case of a failed match. */
+
+backtrack->topbacktracks = NULL;
+if (!zero)
+ {
+ if (framesize < 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0));
+ else /* TMP2 is set to [private_data_ptr] above. */
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(TMP2), (stacksize - 1) * sizeof(sljit_sw), SLJIT_IMM, 0));
+ }
+
+/* None of them matched. */
+set_jumps(emptymatch, LABEL());
+count_match(common);
+return cc + 1 + LINK_SIZE;
+}
+
+static SLJIT_INLINE pcre_uchar *get_iterator_parameters(compiler_common *common, pcre_uchar *cc, pcre_uchar *opcode, pcre_uchar *type, int *arg1, int *arg2, pcre_uchar **end)
+{
+int class_len;
+
+*opcode = *cc;
+if (*opcode >= OP_STAR && *opcode <= OP_POSUPTO)
+ {
+ cc++;
+ *type = OP_CHAR;
+ }
+else if (*opcode >= OP_STARI && *opcode <= OP_POSUPTOI)
+ {
+ cc++;
+ *type = OP_CHARI;
+ *opcode -= OP_STARI - OP_STAR;
+ }
+else if (*opcode >= OP_NOTSTAR && *opcode <= OP_NOTPOSUPTO)
+ {
+ cc++;
+ *type = OP_NOT;
+ *opcode -= OP_NOTSTAR - OP_STAR;
+ }
+else if (*opcode >= OP_NOTSTARI && *opcode <= OP_NOTPOSUPTOI)
+ {
+ cc++;
+ *type = OP_NOTI;
+ *opcode -= OP_NOTSTARI - OP_STAR;
+ }
+else if (*opcode >= OP_TYPESTAR && *opcode <= OP_TYPEPOSUPTO)
+ {
+ cc++;
+ *opcode -= OP_TYPESTAR - OP_STAR;
+ *type = 0;
+ }
+else
+ {
+ SLJIT_ASSERT(*opcode >= OP_CLASS || *opcode <= OP_XCLASS);
+ *type = *opcode;
+ cc++;
+ class_len = (*type < OP_XCLASS) ? (int)(1 + (32 / sizeof(pcre_uchar))) : GET(cc, 0);
+ *opcode = cc[class_len - 1];
+ if (*opcode >= OP_CRSTAR && *opcode <= OP_CRMINQUERY)
+ {
+ *opcode -= OP_CRSTAR - OP_STAR;
+ if (end != NULL)
+ *end = cc + class_len;
+ }
+ else
+ {
+ SLJIT_ASSERT(*opcode == OP_CRRANGE || *opcode == OP_CRMINRANGE);
+ *arg1 = GET2(cc, (class_len + IMM2_SIZE));
+ *arg2 = GET2(cc, class_len);
+
+ if (*arg2 == 0)
+ {
+ SLJIT_ASSERT(*arg1 != 0);
+ *opcode = (*opcode == OP_CRRANGE) ? OP_UPTO : OP_MINUPTO;
+ }
+ if (*arg1 == *arg2)
+ *opcode = OP_EXACT;
+
+ if (end != NULL)
+ *end = cc + class_len + 2 * IMM2_SIZE;
+ }
+ return cc;
+ }
+
+if (*opcode == OP_UPTO || *opcode == OP_MINUPTO || *opcode == OP_EXACT || *opcode == OP_POSUPTO)
+ {
+ *arg1 = GET2(cc, 0);
+ cc += IMM2_SIZE;
+ }
+
+if (*type == 0)
+ {
+ *type = *cc;
+ if (end != NULL)
+ *end = next_opcode(common, cc);
+ cc++;
+ return cc;
+ }
+
+if (end != NULL)
+ {
+ *end = cc + 1;
+#ifdef SUPPORT_UTF
+ if (common->utf && HAS_EXTRALEN(*cc)) *end += GET_EXTRALEN(*cc);
+#endif
+ }
+return cc;
+}
+
+static pcre_uchar *compile_iterator_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+pcre_uchar opcode;
+pcre_uchar type;
+int arg1 = -1, arg2 = -1;
+pcre_uchar* end;
+jump_list *nomatch = NULL;
+struct sljit_jump *jump = NULL;
+struct sljit_label *label;
+int private_data_ptr = PRIVATE_DATA(cc);
+int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_LOCALS_REG);
+int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
+int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
+int tmp_base, tmp_offset;
+
+PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL);
+
+cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, &end);
+
+switch(type)
+ {
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_CLASS:
+ case OP_NCLASS:
+ tmp_base = TMP3;
+ tmp_offset = 0;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ /* Fall through. */
+
+ case OP_EXTUNI:
+ case OP_XCLASS:
+ case OP_NOTPROP:
+ case OP_PROP:
+ tmp_base = SLJIT_MEM1(SLJIT_LOCALS_REG);
+ tmp_offset = POSSESSIVE0;
+ break;
+ }
+
+switch(opcode)
+ {
+ case OP_STAR:
+ case OP_PLUS:
+ case OP_UPTO:
+ case OP_CRRANGE:
+ if (type == OP_ANYNL || type == OP_EXTUNI)
+ {
+ SLJIT_ASSERT(private_data_ptr == 0);
+ if (opcode == OP_STAR || opcode == OP_UPTO)
+ {
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+ }
+ else
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+
+ if (opcode == OP_UPTO || opcode == OP_CRRANGE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, 0);
+
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ if (opcode == OP_UPTO || opcode == OP_CRRANGE)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ if (opcode == OP_CRRANGE && arg2 > 0)
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg2, label);
+ if (opcode == OP_UPTO || (opcode == OP_CRRANGE && arg1 > 0))
+ jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, arg1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, TMP1, 0);
+ }
+
+ /* We cannot use TMP3 because of this allocate_stack. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ if (jump != NULL)
+ JUMPHERE(jump);
+ }
+ else
+ {
+ if (opcode == OP_PLUS)
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (opcode <= OP_PLUS)
+ OP1(SLJIT_MOV, base, offset1, STR_PTR, 0);
+ else
+ OP1(SLJIT_MOV, base, offset1, SLJIT_IMM, 1);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &nomatch);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (opcode <= OP_PLUS)
+ JUMPTO(SLJIT_JUMP, label);
+ else if (opcode == OP_CRRANGE && arg1 == 0)
+ {
+ OP2(SLJIT_ADD, base, offset1, base, offset1, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_JUMP, label);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, base, offset1);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, base, offset1, TMP1, 0);
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 1, label);
+ }
+ set_jumps(nomatch, LABEL());
+ if (opcode == OP_CRRANGE)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_LESS, base, offset1, SLJIT_IMM, arg2 + 1));
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ }
+ BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_MINSTAR:
+ case OP_MINPLUS:
+ if (opcode == OP_MINPLUS)
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ if (private_data_ptr == 0)
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_MINUPTO:
+ case OP_CRMINRANGE:
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ OP1(SLJIT_MOV, base, offset1, SLJIT_IMM, 1);
+ if (opcode == OP_CRMINRANGE)
+ add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
+ BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_QUERY:
+ case OP_MINQUERY:
+ if (private_data_ptr == 0)
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (opcode == OP_QUERY)
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_EXACT:
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, arg1);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, label);
+ break;
+
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSUPTO:
+ if (opcode == OP_POSPLUS)
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
+ if (opcode == OP_POSUPTO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, arg1);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &nomatch);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ if (opcode != OP_POSUPTO)
+ JUMPTO(SLJIT_JUMP, label);
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_C_NOT_ZERO, label);
+ }
+ set_jumps(nomatch, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
+ break;
+
+ case OP_POSQUERY:
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ compile_char1_matchingpath(common, type, cc, &nomatch);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ set_jumps(nomatch, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+count_match(common);
+return end;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_fail_accept_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+if (*cc == OP_FAIL)
+ {
+ add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
+ return cc + 1;
+ }
+
+if (*cc == OP_ASSERT_ACCEPT || common->currententry != NULL)
+ {
+ /* No need to check notempty conditions. */
+ if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->accept_label);
+ return cc + 1;
+ }
+
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0)));
+else
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), common->accept_label);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty));
+add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty_atstart));
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+else
+ CMPTO(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0, common->accept_label);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0));
+else
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, common->accept_label);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
+return cc + 1;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_close_matchingpath(compiler_common *common, pcre_uchar *cc)
+{
+DEFINE_COMPILER;
+int offset = GET2(cc, 1);
+BOOL optimized_cbracket = common->optimized_cbracket[offset] != 0;
+
+/* Data will be discarded anyway... */
+if (common->currententry != NULL)
+ return cc + 1 + IMM2_SIZE;
+
+if (!optimized_cbracket)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR_PRIV(offset));
+offset <<= 1;
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+if (!optimized_cbracket)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+return cc + 1 + IMM2_SIZE;
+}
+
+static SLJIT_INLINE pcre_uchar *compile_control_verb_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+pcre_uchar opcode = *cc;
+pcre_uchar *ccend = cc + 1;
+
+if (opcode == OP_PRUNE_ARG || opcode == OP_SKIP_ARG || opcode == OP_THEN_ARG)
+ ccend += 2 + cc[1];
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+if (opcode == OP_SKIP)
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ return ccend;
+ }
+
+if (opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
+ }
+
+return ccend;
+}
+
+static pcre_uchar then_trap_opcode[1] = { OP_THEN_TRAP };
+
+static SLJIT_INLINE void compile_then_trap_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+BOOL needs_control_head;
+int size;
+
+PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
+common->then_trap = BACKTRACK_AS(then_trap_backtrack);
+BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
+BACKTRACK_AS(then_trap_backtrack)->start = (sljit_sw)(cc - common->start);
+BACKTRACK_AS(then_trap_backtrack)->framesize = get_framesize(common, cc, ccend, FALSE, &needs_control_head);
+
+size = BACKTRACK_AS(then_trap_backtrack)->framesize;
+size = 3 + (size < 0 ? 0 : size);
+
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+allocate_stack(common, size);
+if (size > 3)
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0, SLJIT_IMM, (size - 3) * sizeof(sljit_sw));
+else
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 1), SLJIT_IMM, BACKTRACK_AS(then_trap_backtrack)->start);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 2), SLJIT_IMM, type_then_trap);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 3), TMP2, 0);
+
+size = BACKTRACK_AS(then_trap_backtrack)->framesize;
+if (size >= 0)
+ init_frame(common, cc, ccend, size - 1, 0, FALSE);
+}
+
+static void compile_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+BOOL has_then_trap = FALSE;
+then_trap_backtrack *save_then_trap = NULL;
+
+SLJIT_ASSERT(*ccend == OP_END || (*ccend >= OP_ALT && *ccend <= OP_KETRPOS));
+
+if (common->has_then && common->then_offsets[cc - common->start] != 0)
+ {
+ SLJIT_ASSERT(*ccend != OP_END && common->control_head_ptr != 0);
+ has_then_trap = TRUE;
+ save_then_trap = common->then_trap;
+ /* Tail item on backtrack. */
+ compile_then_trap_matchingpath(common, cc, ccend, parent);
+ }
+
+while (cc < ccend)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_REVERSE:
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ break;
+
+ case OP_SET_SOM:
+ PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ cc++;
+ break;
+
+ case OP_CHAR:
+ case OP_CHARI:
+ if (common->mode == JIT_COMPILE)
+ cc = compile_charn_matchingpath(common, cc, ccend, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ break;
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ if (cc[1 + (32 / sizeof(pcre_uchar))] >= OP_CRSTAR && cc[1 + (32 / sizeof(pcre_uchar))] <= OP_CRMINRANGE)
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ break;
+
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case OP_XCLASS:
+ if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRMINRANGE)
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ break;
+#endif
+
+ case OP_REF:
+ case OP_REFI:
+ if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRMINRANGE)
+ cc = compile_ref_iterator_matchingpath(common, cc, parent);
+ else
+ cc = compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE);
+ break;
+
+ case OP_RECURSE:
+ cc = compile_recurse_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CALLOUT:
+ cc = compile_callout_matchingpath(common, cc, parent);
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
+ cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
+ break;
+
+ case OP_BRAMINZERO:
+ PUSH_BACKTRACK_NOVALUE(sizeof(braminzero_backtrack), cc);
+ cc = bracketend(cc + 1);
+ if (*(cc - 1 - LINK_SIZE) != OP_KETRMIN)
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+ else
+ {
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
+ }
+ BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
+ if (cc[1] > OP_ASSERTBACK_NOT)
+ count_match(common);
+ break;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SCBRA:
+ case OP_SCOND:
+ cc = compile_bracket_matchingpath(common, cc, parent);
+ break;
+
+ case OP_BRAZERO:
+ if (cc[1] > OP_ASSERTBACK_NOT)
+ cc = compile_bracket_matchingpath(common, cc, parent);
+ else
+ {
+ PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
+ cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
+ }
+ break;
+
+ case OP_BRAPOS:
+ case OP_CBRAPOS:
+ case OP_SBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ cc = compile_bracketpos_matchingpath(common, cc, parent);
+ break;
+
+ case OP_MARK:
+ PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
+ allocate_stack(common, common->has_skip_arg ? 5 : 1);
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0), TMP2, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
+ if (common->has_skip_arg)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, type_mark);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(3), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ case OP_THEN:
+ case OP_THEN_ARG:
+ case OP_COMMIT:
+ cc = compile_control_verb_matchingpath(common, cc, parent);
+ break;
+
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ cc = compile_fail_accept_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CLOSE:
+ cc = compile_close_matchingpath(common, cc);
+ break;
+
+ case OP_SKIPZERO:
+ cc = bracketend(cc + 1);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ return;
+ }
+ if (cc == NULL)
+ return;
+ }
+
+if (has_then_trap)
+ {
+ /* Head item on backtrack. */
+ PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
+ BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
+ BACKTRACK_AS(then_trap_backtrack)->then_trap = common->then_trap;
+ common->then_trap = save_then_trap;
+ }
+SLJIT_ASSERT(cc == ccend);
+}
+
+#undef PUSH_BACKTRACK
+#undef PUSH_BACKTRACK_NOVALUE
+#undef BACKTRACK_AS
+
+#define COMPILE_BACKTRACKINGPATH(current) \
+ do \
+ { \
+ compile_backtrackingpath(common, (current)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return; \
+ } \
+ while (0)
+
+#define CURRENT_AS(type) ((type *)current)
+
+static void compile_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+pcre_uchar *cc = current->cc;
+pcre_uchar opcode;
+pcre_uchar type;
+int arg1 = -1, arg2 = -1;
+struct sljit_label *label = NULL;
+struct sljit_jump *jump = NULL;
+jump_list *jumplist = NULL;
+int private_data_ptr = PRIVATE_DATA(cc);
+int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_LOCALS_REG);
+int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
+int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
+
+cc = get_iterator_parameters(common, cc, &opcode, &type, &arg1, &arg2, NULL);
+
+switch(opcode)
+ {
+ case OP_STAR:
+ case OP_PLUS:
+ case OP_UPTO:
+ case OP_CRRANGE:
+ if (type == OP_ANYNL || type == OP_EXTUNI)
+ {
+ SLJIT_ASSERT(private_data_ptr == 0);
+ set_jumps(current->topbacktracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
+ }
+ else
+ {
+ if (opcode == OP_UPTO)
+ arg2 = 0;
+ if (opcode <= OP_PLUS)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ jump = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, base, offset1);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, base, offset1);
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, arg2 + 1);
+ OP2(SLJIT_SUB, base, offset1, TMP1, 0, SLJIT_IMM, 1);
+ }
+ skip_char_back(common);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
+ if (opcode == OP_CRRANGE)
+ set_jumps(current->topbacktracks, LABEL());
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 2);
+ if (opcode == OP_PLUS)
+ set_jumps(current->topbacktracks, LABEL());
+ }
+ break;
+
+ case OP_MINSTAR:
+ case OP_MINPLUS:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ compile_char1_matchingpath(common, type, cc, &jumplist);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
+ set_jumps(jumplist, LABEL());
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ if (opcode == OP_MINPLUS)
+ set_jumps(current->topbacktracks, LABEL());
+ break;
+
+ case OP_MINUPTO:
+ case OP_CRMINRANGE:
+ if (opcode == OP_CRMINRANGE)
+ {
+ label = LABEL();
+ set_jumps(current->topbacktracks, label);
+ }
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ compile_char1_matchingpath(common, type, cc, &jumplist);
+
+ OP1(SLJIT_MOV, TMP1, 0, base, offset1);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, base, offset1, TMP1, 0);
+
+ if (opcode == OP_CRMINRANGE)
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg2 + 1, label);
+
+ if (opcode == OP_CRMINRANGE && arg1 == 0)
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
+ else
+ CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, arg1 + 2, CURRENT_AS(iterator_backtrack)->matchingpath);
+
+ set_jumps(jumplist, LABEL());
+ if (private_data_ptr == 0)
+ free_stack(common, 2);
+ break;
+
+ case OP_QUERY:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(current->topbacktracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ break;
+
+ case OP_MINQUERY:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ compile_char1_matchingpath(common, type, cc, &jumplist);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
+ set_jumps(jumplist, LABEL());
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ break;
+
+ case OP_EXACT:
+ case OP_POSPLUS:
+ set_jumps(current->topbacktracks, LABEL());
+ break;
+
+ case OP_POSSTAR:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+}
+
+static SLJIT_INLINE void compile_ref_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+pcre_uchar *cc = current->cc;
+pcre_uchar type;
+
+type = cc[1 + IMM2_SIZE];
+if ((type & 0x1) == 0)
+ {
+ set_jumps(current->topbacktracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
+ return;
+ }
+
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
+set_jumps(current->topbacktracks, LABEL());
+free_stack(common, 2);
+}
+
+static SLJIT_INLINE void compile_recurse_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+
+if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
+ compile_backtrackingpath(common, current->top);
+set_jumps(current->topbacktracks, LABEL());
+if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
+ return;
+
+if (common->has_set_som && common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);
+ }
+else if (common->has_set_som || common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr, TMP2, 0);
+ }
+}
+
+static void compile_assert_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+pcre_uchar *cc = current->cc;
+pcre_uchar bra = OP_BRA;
+struct sljit_jump *brajump = NULL;
+
+SLJIT_ASSERT(*cc != OP_BRAMINZERO);
+if (*cc == OP_BRAZERO)
+ {
+ bra = *cc;
+ cc++;
+ }
+
+if (bra == OP_BRAZERO)
+ {
+ SLJIT_ASSERT(current->topbacktracks == NULL);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+
+if (CURRENT_AS(assert_backtrack)->framesize < 0)
+ {
+ set_jumps(current->topbacktracks, LABEL());
+
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
+ free_stack(common, 1);
+ }
+ return;
+ }
+
+if (bra == OP_BRAZERO)
+ {
+ if (*cc == OP_ASSERT_NOT || *cc == OP_ASSERTBACK_NOT)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
+ free_stack(common, 1);
+ return;
+ }
+ free_stack(common, 1);
+ brajump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+
+if (*cc == OP_ASSERT || *cc == OP_ASSERTBACK)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(assert_backtrack)->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(assert_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(assert_backtrack)->framesize * sizeof(sljit_sw));
+
+ set_jumps(current->topbacktracks, LABEL());
+ }
+else
+ set_jumps(current->topbacktracks, LABEL());
+
+if (bra == OP_BRAZERO)
+ {
+ /* We know there is enough place on the stack. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(assert_backtrack)->matchingpath);
+ JUMPHERE(brajump);
+ }
+}
+
+static void compile_bracket_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+int opcode, stacksize, count;
+int offset = 0;
+int private_data_ptr = CURRENT_AS(bracket_backtrack)->private_data_ptr;
+int repeat_ptr = 0, repeat_type = 0, repeat_count = 0;
+pcre_uchar *cc = current->cc;
+pcre_uchar *ccbegin;
+pcre_uchar *ccprev;
+jump_list *jumplist = NULL;
+jump_list *jumplistitem = NULL;
+pcre_uchar bra = OP_BRA;
+pcre_uchar ket;
+assert_backtrack *assert;
+BOOL has_alternatives;
+BOOL needs_control_head = FALSE;
+struct sljit_jump *brazero = NULL;
+struct sljit_jump *once = NULL;
+struct sljit_jump *cond = NULL;
+struct sljit_label *rmin_label = NULL;
+struct sljit_label *exact_label = NULL;
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ bra = *cc;
+ cc++;
+ }
+
+opcode = *cc;
+ccbegin = bracketend(cc) - 1 - LINK_SIZE;
+ket = *ccbegin;
+if (ket == OP_KET && PRIVATE_DATA(ccbegin) != 0)
+ {
+ repeat_ptr = PRIVATE_DATA(ccbegin);
+ repeat_type = PRIVATE_DATA(ccbegin + 2);
+ repeat_count = PRIVATE_DATA(ccbegin + 3);
+ SLJIT_ASSERT(repeat_type != 0 && repeat_count != 0);
+ if (repeat_type == OP_UPTO)
+ ket = OP_KETRMAX;
+ if (repeat_type == OP_MINUPTO)
+ ket = OP_KETRMIN;
+ }
+ccbegin = cc;
+cc += GET(cc, 1);
+has_alternatives = *cc == OP_ALT;
+if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ has_alternatives = (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT) || CURRENT_AS(bracket_backtrack)->u.condfailed != NULL;
+if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ offset = (GET2(ccbegin, 1 + LINK_SIZE)) << 1;
+if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
+ opcode = OP_SCOND;
+if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
+ opcode = OP_ONCE;
+
+/* Decoding the needs_control_head in framesize. */
+if (opcode == OP_ONCE)
+ {
+ needs_control_head = (CURRENT_AS(bracket_backtrack)->u.framesize & 0x1) != 0;
+ CURRENT_AS(bracket_backtrack)->u.framesize >>= 1;
+ }
+
+if (ket != OP_KET && repeat_type != 0)
+ {
+ /* TMP1 is used in OP_KETRMIN below. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ if (repeat_type == OP_UPTO)
+ OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0, SLJIT_IMM, 1);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0);
+ }
+
+if (ket == OP_KETRMAX)
+ {
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brazero = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0);
+ }
+ }
+else if (ket == OP_KETRMIN)
+ {
+ if (bra != OP_BRAMINZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (repeat_type != 0)
+ {
+ /* TMP1 was set a few lines above. */
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ /* Drop STR_PTR for non-greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else if (opcode >= OP_SBRA || opcode == OP_ONCE)
+ {
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE || CURRENT_AS(bracket_backtrack)->u.framesize < 0)
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (CURRENT_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw), CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ }
+ /* Drop STR_PTR for non-greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ }
+ rmin_label = LABEL();
+ if (repeat_type != 0)
+ OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
+ }
+else if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brazero = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0);
+ }
+else if (repeat_type == OP_EXACT)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
+ exact_label = LABEL();
+ }
+
+if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ {
+ SLJIT_ASSERT(common->optimized_cbracket[offset >> 1] == 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
+ free_stack(common, 3);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0);
+ }
+ else if (common->optimized_cbracket[offset >> 1] == 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
+ }
+ }
+
+if (SLJIT_UNLIKELY(opcode == OP_ONCE))
+ {
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ once = JUMP(SLJIT_JUMP);
+ }
+else if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ {
+ if (has_alternatives)
+ {
+ /* Always exactly one alternative. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+
+ jumplistitem = sljit_alloc_memory(compiler, sizeof(jump_list));
+ if (SLJIT_UNLIKELY(!jumplistitem))
+ return;
+ jumplist = jumplistitem;
+ jumplistitem->next = NULL;
+ jumplistitem->jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 1);
+ }
+ }
+else if (*cc == OP_ALT)
+ {
+ /* Build a jump list. Get the last successfully matched branch index. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ count = 1;
+ do
+ {
+ /* Append as the last item. */
+ if (jumplist != NULL)
+ {
+ jumplistitem->next = sljit_alloc_memory(compiler, sizeof(jump_list));
+ jumplistitem = jumplistitem->next;
+ }
+ else
+ {
+ jumplistitem = sljit_alloc_memory(compiler, sizeof(jump_list));
+ jumplist = jumplistitem;
+ }
+
+ if (SLJIT_UNLIKELY(!jumplistitem))
+ return;
+
+ jumplistitem->next = NULL;
+ jumplistitem->jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, count++);
+ cc += GET(cc, 1);
+ }
+ while (*cc == OP_ALT);
+
+ cc = ccbegin + GET(ccbegin, 1);
+ }
+
+COMPILE_BACKTRACKINGPATH(current->top);
+if (current->topbacktracks)
+ set_jumps(current->topbacktracks, LABEL());
+
+if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ {
+ /* Conditional block always has at most one alternative. */
+ if (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ assert = CURRENT_AS(bracket_backtrack)->u.assert;
+ if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK))
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
+ }
+ cond = JUMP(SLJIT_JUMP);
+ set_jumps(CURRENT_AS(bracket_backtrack)->u.assert->condfailed, LABEL());
+ }
+ else if (CURRENT_AS(bracket_backtrack)->u.condfailed != NULL)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ cond = JUMP(SLJIT_JUMP);
+ set_jumps(CURRENT_AS(bracket_backtrack)->u.condfailed, LABEL());
+ }
+ else
+ SLJIT_ASSERT(!has_alternatives);
+ }
+
+if (has_alternatives)
+ {
+ count = 1;
+ do
+ {
+ current->top = NULL;
+ current->topbacktracks = NULL;
+ current->nextbacktracks = NULL;
+ /* Conditional blocks always have an additional alternative, even if it is empty. */
+ if (*cc == OP_ALT)
+ {
+ ccprev = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ if (opcode != OP_COND && opcode != OP_SCOND)
+ {
+ if (opcode != OP_ONCE)
+ {
+ if (private_data_ptr != 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(needs_control_head ? 1 : 0));
+ }
+ compile_matchingpath(common, ccprev, cc, current);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+ }
+
+ /* Instructions after the current alternative is successfully matched. */
+ /* There is a similar code in compile_bracket_matchingpath. */
+ if (opcode == OP_ONCE)
+ match_once_common(common, ket, CURRENT_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
+
+ stacksize = 0;
+ if (repeat_type == OP_MINUPTO)
+ {
+ /* We need to preserve the counter. TMP2 will be used below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
+ stacksize++;
+ }
+ if (ket != OP_KET || bra != OP_BRA)
+ stacksize++;
+ if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ if (common->optimized_cbracket[offset >> 1] == 0)
+ stacksize += 2;
+ }
+ if (opcode != OP_ONCE)
+ stacksize++;
+
+ if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+ stacksize = 0;
+ if (repeat_type == OP_MINUPTO)
+ {
+ /* TMP2 was set above. */
+ OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
+ stacksize++;
+ }
+
+ if (ket != OP_KET || bra != OP_BRA)
+ {
+ if (ket != OP_KET)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+ if (offset != 0)
+ stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
+
+ if (opcode != OP_ONCE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, count++);
+
+ if (offset != 0 && ket == OP_KETRMAX && common->optimized_cbracket[offset >> 1] != 0)
+ {
+ /* If ket is not OP_KETRMAX, this code path is executed after the jump to alternative_matchingpath. */
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
+ }
+
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->alternative_matchingpath);
+
+ if (opcode != OP_ONCE)
+ {
+ SLJIT_ASSERT(jumplist);
+ JUMPHERE(jumplist->jump);
+ jumplist = jumplist->next;
+ }
+
+ COMPILE_BACKTRACKINGPATH(current->top);
+ if (current->topbacktracks)
+ set_jumps(current->topbacktracks, LABEL());
+ SLJIT_ASSERT(!current->nextbacktracks);
+ }
+ while (*cc == OP_ALT);
+ SLJIT_ASSERT(!jumplist);
+
+ if (cond != NULL)
+ {
+ SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);
+ assert = CURRENT_AS(bracket_backtrack)->u.assert;
+ if ((ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT) && assert->framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
+ }
+ JUMPHERE(cond);
+ }
+
+ /* Free the STR_PTR. */
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ }
+
+if (offset != 0)
+ {
+ /* Using both tmp register is better for instruction scheduling. */
+ if (common->optimized_cbracket[offset >> 1] != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
+ }
+ }
+else if (opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ }
+else if (opcode == OP_ONCE)
+ {
+ cc = ccbegin + GET(ccbegin, 1);
+ stacksize = needs_control_head ? 1 : 0;
+
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ /* Reset head and drop saved frame. */
+ stacksize += CURRENT_AS(bracket_backtrack)->u.framesize + ((ket != OP_KET || *cc == OP_ALT) ? 2 : 1);
+ }
+ else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN))
+ {
+ /* The STR_PTR must be released. */
+ stacksize++;
+ }
+ free_stack(common, stacksize);
+
+ JUMPHERE(once);
+ /* Restore previous private_data_ptr */
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracket_backtrack)->u.framesize * sizeof(sljit_sw));
+ else if (ket == OP_KETRMIN)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ /* See the comment below. */
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
+ }
+ }
+
+if (repeat_type == OP_EXACT)
+ {
+ OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0);
+ CMPTO(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, repeat_count, exact_label);
+ }
+else if (ket == OP_KETRMAX)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (bra != OP_BRAZERO)
+ free_stack(common, 1);
+
+ CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
+ JUMPHERE(brazero);
+ free_stack(common, 1);
+ }
+ }
+else if (ket == OP_KETRMIN)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ /* OP_ONCE removes everything in case of a backtrack, so we don't
+ need to explicitly release the STR_PTR. The extra release would
+ affect badly the free_stack(2) above. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, rmin_label);
+ if (opcode == OP_ONCE)
+ free_stack(common, bra == OP_BRAMINZERO ? 2 : 1);
+ else if (bra == OP_BRAMINZERO)
+ free_stack(common, 1);
+ }
+else if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
+ JUMPHERE(brazero);
+ }
+}
+
+static SLJIT_INLINE void compile_bracketpos_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+int offset;
+struct sljit_jump *jump;
+
+if (CURRENT_AS(bracketpos_backtrack)->framesize < 0)
+ {
+ if (*current->cc == OP_CBRAPOS || *current->cc == OP_SCBRAPOS)
+ {
+ offset = (GET2(current->cc, 1 + LINK_SIZE)) << 1;
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, TMP1, 0);
+ }
+ set_jumps(current->topbacktracks, LABEL());
+ free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
+ return;
+ }
+
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(bracketpos_backtrack)->private_data_ptr);
+add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+
+if (current->topbacktracks)
+ {
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(current->topbacktracks, LABEL());
+ /* Drop the stack frame. */
+ free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
+ JUMPHERE(jump);
+ }
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(bracketpos_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracketpos_backtrack)->framesize * sizeof(sljit_sw));
+}
+
+static SLJIT_INLINE void compile_braminzero_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+assert_backtrack backtrack;
+
+current->top = NULL;
+current->topbacktracks = NULL;
+current->nextbacktracks = NULL;
+if (current->cc[1] > OP_ASSERTBACK_NOT)
+ {
+ /* Manual call of compile_bracket_matchingpath and compile_bracket_backtrackingpath. */
+ compile_bracket_matchingpath(common, current->cc, current);
+ compile_bracket_backtrackingpath(common, current->top);
+ }
+else
+ {
+ memset(&backtrack, 0, sizeof(backtrack));
+ backtrack.common.cc = current->cc;
+ backtrack.matchingpath = CURRENT_AS(braminzero_backtrack)->matchingpath;
+ /* Manual call of compile_assert_matchingpath. */
+ compile_assert_matchingpath(common, current->cc, &backtrack, FALSE);
+ }
+SLJIT_ASSERT(!current->nextbacktracks && !current->topbacktracks);
+}
+
+static SLJIT_INLINE void compile_control_verb_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+pcre_uchar opcode = *current->cc;
+struct sljit_label *loop;
+struct sljit_jump *jump;
+
+if (opcode == OP_THEN || opcode == OP_THEN_ARG)
+ {
+ if (common->then_trap != NULL)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, type_then_trap);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, common->then_trap->start);
+ jump = JUMP(SLJIT_JUMP);
+
+ loop = LABEL();
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), -(int)sizeof(sljit_sw));
+ JUMPHERE(jump);
+ CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(2 * sizeof(sljit_sw)), TMP1, 0, loop);
+ CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(3 * sizeof(sljit_sw)), TMP2, 0, loop);
+ add_jump(compiler, &common->then_trap->quit, JUMP(SLJIT_JUMP));
+ return;
+ }
+ else if (common->positive_assert)
+ {
+ add_jump(compiler, &common->positive_assert_quit, JUMP(SLJIT_JUMP));
+ return;
+ }
+ }
+
+if (common->local_exit)
+ {
+ if (common->quit_label == NULL)
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->quit_label);
+ return;
+ }
+
+if (opcode == OP_SKIP_ARG)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2));
+ sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
+ add_jump(compiler, &common->reset_match, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, -1));
+ return;
+ }
+
+if (opcode == OP_SKIP)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_IMM, 0);
+add_jump(compiler, &common->reset_match, JUMP(SLJIT_JUMP));
+}
+
+static SLJIT_INLINE void compile_then_trap_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+int size;
+
+if (CURRENT_AS(then_trap_backtrack)->then_trap)
+ {
+ common->then_trap = CURRENT_AS(then_trap_backtrack)->then_trap;
+ return;
+ }
+
+size = CURRENT_AS(then_trap_backtrack)->framesize;
+size = 3 + (size < 0 ? 0 : size);
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(size - 3));
+free_stack(common, size);
+jump = JUMP(SLJIT_JUMP);
+
+set_jumps(CURRENT_AS(then_trap_backtrack)->quit, LABEL());
+/* STACK_TOP is set by THEN. */
+if (CURRENT_AS(then_trap_backtrack)->framesize >= 0)
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+free_stack(common, 3);
+
+JUMPHERE(jump);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
+}
+
+static void compile_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+then_trap_backtrack *save_then_trap = common->then_trap;
+
+while (current)
+ {
+ if (current->nextbacktracks != NULL)
+ set_jumps(current->nextbacktracks, LABEL());
+ switch(*current->cc)
+ {
+ case OP_SET_SOM:
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), TMP1, 0);
+ break;
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+#endif
+ compile_iterator_backtrackingpath(common, current);
+ break;
+
+ case OP_REF:
+ case OP_REFI:
+ compile_ref_iterator_backtrackingpath(common, current);
+ break;
+
+ case OP_RECURSE:
+ compile_recurse_backtrackingpath(common, current);
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ compile_assert_backtrackingpath(common, current);
+ break;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SCBRA:
+ case OP_SCOND:
+ compile_bracket_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAZERO:
+ if (current->cc[1] > OP_ASSERTBACK_NOT)
+ compile_bracket_backtrackingpath(common, current);
+ else
+ compile_assert_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAPOS:
+ case OP_CBRAPOS:
+ case OP_SBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ compile_bracketpos_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAMINZERO:
+ compile_braminzero_backtrackingpath(common, current);
+ break;
+
+ case OP_MARK:
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0));
+ if (common->has_skip_arg)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, common->has_skip_arg ? 5 : 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);
+ if (common->has_skip_arg)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP2, 0);
+ break;
+
+ case OP_THEN:
+ case OP_THEN_ARG:
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ compile_control_verb_backtrackingpath(common, current);
+ break;
+
+ case OP_COMMIT:
+ if (!common->local_exit)
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
+ if (common->quit_label == NULL)
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->quit_label);
+ break;
+
+ case OP_CALLOUT:
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ set_jumps(current->topbacktracks, LABEL());
+ break;
+
+ case OP_THEN_TRAP:
+ /* A virtual opcode for then traps. */
+ compile_then_trap_backtrackingpath(common, current);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ current = current->prev;
+ }
+common->then_trap = save_then_trap;
+}
+
+static SLJIT_INLINE void compile_recurse(compiler_common *common)
+{
+DEFINE_COMPILER;
+pcre_uchar *cc = common->start + common->currententry->start;
+pcre_uchar *ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
+pcre_uchar *ccend = bracketend(cc);
+BOOL needs_control_head;
+int framesize = get_framesize(common, cc, NULL, TRUE, &needs_control_head);
+int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
+int alternativesize;
+BOOL needs_frame;
+backtrack_common altbacktrack;
+struct sljit_jump *jump;
+
+/* Recurse captures then. */
+common->then_trap = NULL;
+
+SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA || *cc == OP_CBRAPOS || *cc == OP_SCBRA || *cc == OP_SCBRAPOS);
+needs_frame = framesize >= 0;
+if (!needs_frame)
+ framesize = 0;
+alternativesize = *(cc + GET(cc, 1)) == OP_ALT ? 1 : 0;
+
+SLJIT_ASSERT(common->currententry->entry == NULL && common->recursive_head_ptr != 0);
+common->currententry->entry = LABEL();
+set_jumps(common->currententry->calls, common->currententry->entry);
+
+sljit_emit_fast_enter(compiler, TMP2, 0);
+allocate_stack(common, private_data_size + framesize + alternativesize);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
+copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, STACK_TOP, 0);
+if (needs_frame)
+ init_frame(common, cc, NULL, framesize + alternativesize - 1, alternativesize, TRUE);
+
+if (alternativesize > 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+memset(&altbacktrack, 0, sizeof(backtrack_common));
+common->quit_label = NULL;
+common->accept_label = NULL;
+common->quit = NULL;
+common->accept = NULL;
+altbacktrack.cc = ccbegin;
+cc += GET(cc, 1);
+while (1)
+ {
+ altbacktrack.top = NULL;
+ altbacktrack.topbacktracks = NULL;
+
+ if (altbacktrack.cc != ccbegin)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ compile_matchingpath(common, altbacktrack.cc, cc, &altbacktrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+
+ add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
+
+ compile_backtrackingpath(common, altbacktrack.top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+ set_jumps(altbacktrack.topbacktracks, LABEL());
+
+ if (*cc != OP_ALT)
+ break;
+
+ altbacktrack.cc = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ }
+
+/* None of them matched. */
+OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
+jump = JUMP(SLJIT_JUMP);
+
+if (common->quit != NULL)
+ {
+ set_jumps(common->quit, LABEL());
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr);
+ if (needs_frame)
+ {
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ }
+ OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
+ common->quit = NULL;
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ }
+
+set_jumps(common->accept, LABEL());
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr);
+if (needs_frame)
+ {
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ }
+OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 1);
+
+JUMPHERE(jump);
+if (common->quit != NULL)
+ set_jumps(common->quit, LABEL());
+copy_private_data(common, ccbegin, ccend, FALSE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
+free_stack(common, private_data_size + framesize + alternativesize);
+if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP2, 0);
+ }
+else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, TMP2, 0);
+ }
+sljit_emit_fast_return(compiler, SLJIT_MEM1(STACK_TOP), 0);
+}
+
+#undef COMPILE_BACKTRACKINGPATH
+#undef CURRENT_AS
+
+void
+PRIV(jit_compile)(const REAL_PCRE *re, PUBL(extra) *extra, int mode)
+{
+struct sljit_compiler *compiler;
+backtrack_common rootbacktrack;
+compiler_common common_data;
+compiler_common *common = &common_data;
+const pcre_uint8 *tables = re->tables;
+pcre_study_data *study;
+int private_data_size;
+pcre_uchar *ccend;
+executable_functions *functions;
+void *executable_func;
+sljit_uw executable_size;
+struct sljit_label *mainloop_label = NULL;
+struct sljit_label *continue_match_label;
+struct sljit_label *empty_match_found_label;
+struct sljit_label *empty_match_backtrack_label;
+struct sljit_label *reset_match_label;
+struct sljit_jump *jump;
+struct sljit_jump *minlength_check_failed = NULL;
+struct sljit_jump *reqbyte_notfound = NULL;
+struct sljit_jump *empty_match;
+struct sljit_label *quit_label;
+
+SLJIT_ASSERT((extra->flags & PCRE_EXTRA_STUDY_DATA) != 0);
+study = extra->study_data;
+
+if (!tables)
+ tables = PRIV(default_tables);
+
+memset(&rootbacktrack, 0, sizeof(backtrack_common));
+memset(common, 0, sizeof(compiler_common));
+rootbacktrack.cc = (pcre_uchar *)re + re->name_table_offset + re->name_count * re->name_entry_size;
+
+common->start = rootbacktrack.cc;
+common->fcc = tables + fcc_offset;
+common->lcc = (sljit_sw)(tables + lcc_offset);
+common->mode = mode;
+common->nltype = NLTYPE_FIXED;
+switch(re->options & PCRE_NEWLINE_BITS)
+ {
+ case 0:
+ /* Compile-time default */
+ switch(NEWLINE)
+ {
+ case -1: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
+ case -2: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
+ default: common->newline = NEWLINE; break;
+ }
+ break;
+ case PCRE_NEWLINE_CR: common->newline = CHAR_CR; break;
+ case PCRE_NEWLINE_LF: common->newline = CHAR_NL; break;
+ case PCRE_NEWLINE_CR+
+ PCRE_NEWLINE_LF: common->newline = (CHAR_CR << 8) | CHAR_NL; break;
+ case PCRE_NEWLINE_ANY: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
+ case PCRE_NEWLINE_ANYCRLF: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
+ default: return;
+ }
+if ((re->options & PCRE_BSR_ANYCRLF) != 0)
+ common->bsr_nltype = NLTYPE_ANYCRLF;
+else if ((re->options & PCRE_BSR_UNICODE) != 0)
+ common->bsr_nltype = NLTYPE_ANY;
+else
+ {
+#ifdef BSR_ANYCRLF
+ common->bsr_nltype = NLTYPE_ANYCRLF;
+#else
+ common->bsr_nltype = NLTYPE_ANY;
+#endif
+ }
+common->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
+common->ctypes = (sljit_sw)(tables + ctypes_offset);
+common->digits[0] = -2;
+common->name_table = (sljit_sw)((pcre_uchar *)re + re->name_table_offset);
+common->name_count = re->name_count;
+common->name_entry_size = re->name_entry_size;
+common->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
+#ifdef SUPPORT_UTF
+/* PCRE_UTF[16|32] have the same value as PCRE_UTF8. */
+common->utf = (re->options & PCRE_UTF8) != 0;
+#ifdef SUPPORT_UCP
+common->use_ucp = (re->options & PCRE_UCP) != 0;
+#endif
+#endif /* SUPPORT_UTF */
+ccend = bracketend(rootbacktrack.cc);
+
+/* Calculate the local space size on the stack. */
+common->ovector_start = LIMIT_MATCH + sizeof(sljit_sw);
+common->optimized_cbracket = (pcre_uint8 *)SLJIT_MALLOC(re->top_bracket + 1);
+if (!common->optimized_cbracket)
+ return;
+#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 1
+memset(common->optimized_cbracket, 0, re->top_bracket + 1);
+#else
+memset(common->optimized_cbracket, 1, re->top_bracket + 1);
+#endif
+
+SLJIT_ASSERT(*rootbacktrack.cc == OP_BRA && ccend[-(1 + LINK_SIZE)] == OP_KET);
+#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 2
+common->capture_last_ptr = common->ovector_start;
+common->ovector_start += sizeof(sljit_sw);
+#endif
+if (!check_opcode_types(common, rootbacktrack.cc, ccend))
+ {
+ SLJIT_FREE(common->optimized_cbracket);
+ return;
+ }
+
+/* Checking flags and updating ovector_start. */
+if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
+ {
+ common->req_char_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+if (mode != JIT_COMPILE)
+ {
+ common->start_used_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ if (mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ common->hit_start = common->ovector_start;
+ common->ovector_start += 2 * sizeof(sljit_sw);
+ }
+ else
+ {
+ SLJIT_ASSERT(mode == JIT_PARTIAL_HARD_COMPILE);
+ common->needs_start_ptr = TRUE;
+ }
+ }
+if ((re->options & PCRE_FIRSTLINE) != 0)
+ {
+ common->first_line_end = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
+common->control_head_ptr = 1;
+#endif
+if (common->control_head_ptr != 0)
+ {
+ common->control_head_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+if (common->needs_start_ptr && common->has_set_som)
+ {
+ /* Saving the real start pointer is necessary. */
+ common->start_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+else
+ common->needs_start_ptr = FALSE;
+
+/* Aligning ovector to even number of sljit words. */
+if ((common->ovector_start & sizeof(sljit_sw)) != 0)
+ common->ovector_start += sizeof(sljit_sw);
+
+if (common->start_ptr == 0)
+ common->start_ptr = OVECTOR(0);
+
+/* Capturing brackets cannot be optimized if callouts are allowed. */
+if (common->capture_last_ptr != 0)
+ memset(common->optimized_cbracket, 0, re->top_bracket + 1);
+
+SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0));
+common->cbra_ptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_sw);
+
+common->private_data_ptrs = (int *)SLJIT_MALLOC((ccend - rootbacktrack.cc) * sizeof(sljit_si));
+if (!common->private_data_ptrs)
+ {
+ SLJIT_FREE(common->optimized_cbracket);
+ return;
+ }
+memset(common->private_data_ptrs, 0, (ccend - rootbacktrack.cc) * sizeof(int));
+
+private_data_size = common->cbra_ptr + (re->top_bracket + 1) * sizeof(sljit_sw);
+set_private_data_ptrs(common, &private_data_size, ccend);
+if (private_data_size > SLJIT_MAX_LOCAL_SIZE)
+ {
+ SLJIT_FREE(common->private_data_ptrs);
+ SLJIT_FREE(common->optimized_cbracket);
+ return;
+ }
+
+if (common->has_then)
+ {
+ common->then_offsets = (pcre_uint8 *)SLJIT_MALLOC(ccend - rootbacktrack.cc);
+ if (!common->then_offsets)
+ {
+ SLJIT_FREE(common->optimized_cbracket);
+ SLJIT_FREE(common->private_data_ptrs);
+ return;
+ }
+ memset(common->then_offsets, 0, ccend - rootbacktrack.cc);
+ set_then_offsets(common, rootbacktrack.cc, NULL);
+ }
+
+compiler = sljit_create_compiler();
+if (!compiler)
+ {
+ SLJIT_FREE(common->optimized_cbracket);
+ SLJIT_FREE(common->private_data_ptrs);
+ if (common->has_then)
+ SLJIT_FREE(common->then_offsets);
+ return;
+ }
+common->compiler = compiler;
+
+/* Main pcre_jit_exec entry. */
+sljit_emit_enter(compiler, 1, 5, 5, private_data_size);
+
+/* Register init. */
+reset_ovector(common, (re->top_bracket + 1) * 2);
+if (common->req_char_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, SLJIT_SCRATCH_REG1, 0);
+
+OP1(SLJIT_MOV, ARGUMENTS, 0, SLJIT_SAVED_REG1, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_SAVED_REG1, 0);
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, end));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LIMIT_MATCH, TMP1, 0);
+
+if (mode == JIT_PARTIAL_SOFT_COMPILE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, SLJIT_IMM, 0);
+if (common->control_head_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
+
+/* Main part of the matching */
+if ((re->options & PCRE_ANCHORED) == 0)
+ {
+ mainloop_label = mainloop_entry(common, (re->flags & PCRE_HASCRORLF) != 0, (re->options & PCRE_FIRSTLINE) != 0);
+ continue_match_label = LABEL();
+ /* Forward search if possible. */
+ if ((re->options & PCRE_NO_START_OPTIMIZE) == 0)
+ {
+ if (mode == JIT_COMPILE && fast_forward_first_n_chars(common, (re->options & PCRE_FIRSTLINE) != 0))
+ { /* Do nothing */ }
+ else if ((re->flags & PCRE_FIRSTSET) != 0)
+ fast_forward_first_char(common, (pcre_uchar)re->first_char, (re->flags & PCRE_FCH_CASELESS) != 0, (re->options & PCRE_FIRSTLINE) != 0);
+ else if ((re->flags & PCRE_STARTLINE) != 0)
+ fast_forward_newline(common, (re->options & PCRE_FIRSTLINE) != 0);
+ else if ((re->flags & PCRE_STARTLINE) == 0 && study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)
+ fast_forward_start_bits(common, (sljit_uw)study->start_bits, (re->options & PCRE_FIRSTLINE) != 0);
+ }
+ }
+else
+ continue_match_label = LABEL();
+
+if (mode == JIT_COMPILE && study->minlength > 0 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength));
+ minlength_check_failed = CMP(SLJIT_C_GREATER, TMP2, 0, STR_END, 0);
+ }
+if (common->req_char_ptr != 0)
+ reqbyte_notfound = search_requested_char(common, (pcre_uchar)re->req_char, (re->flags & PCRE_RCH_CASELESS) != 0, (re->flags & PCRE_FIRSTSET) != 0);
+
+/* Store the current STR_PTR in OVECTOR(0). */
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), STR_PTR, 0);
+/* Copy the limit of allowed recursions. */
+OP1(SLJIT_MOV, COUNT_MATCH, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LIMIT_MATCH);
+if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, -1);
+
+if (common->needs_start_ptr)
+ {
+ SLJIT_ASSERT(common->start_ptr != OVECTOR(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr, STR_PTR, 0);
+ }
+else
+ SLJIT_ASSERT(common->start_ptr == OVECTOR(0));
+
+/* Copy the beginning of the string. */
+if (mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start + sizeof(sljit_sw), STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+else if (mode == JIT_PARTIAL_HARD_COMPILE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
+
+compile_matchingpath(common, rootbacktrack.cc, ccend, &rootbacktrack);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket);
+ SLJIT_FREE(common->private_data_ptrs);
+ if (common->has_then)
+ SLJIT_FREE(common->then_offsets);
+ return;
+ }
+
+empty_match = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
+empty_match_found_label = LABEL();
+
+common->accept_label = LABEL();
+if (common->accept != NULL)
+ set_jumps(common->accept, common->accept_label);
+
+/* This means we have a match. Update the ovector. */
+copy_ovector(common, re->top_bracket + 1);
+common->quit_label = common->forced_quit_label = LABEL();
+if (common->quit != NULL)
+ set_jumps(common->quit, common->quit_label);
+if (common->forced_quit != NULL)
+ set_jumps(common->forced_quit, common->forced_quit_label);
+if (minlength_check_failed != NULL)
+ SET_LABEL(minlength_check_failed, common->forced_quit_label);
+sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);
+
+if (mode != JIT_COMPILE)
+ {
+ common->partialmatchlabel = LABEL();
+ set_jumps(common->partialmatch, common->partialmatchlabel);
+ return_with_partial_match(common, common->quit_label);
+ }
+
+empty_match_backtrack_label = LABEL();
+compile_backtrackingpath(common, rootbacktrack.top);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket);
+ SLJIT_FREE(common->private_data_ptrs);
+ if (common->has_then)
+ SLJIT_FREE(common->then_offsets);
+ return;
+ }
+
+SLJIT_ASSERT(rootbacktrack.prev == NULL);
+reset_match_label = LABEL();
+
+if (mode == JIT_PARTIAL_SOFT_COMPILE)
+ {
+ /* Update hit_start only in the first time. */
+ jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, -1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, TMP1, 0);
+ JUMPHERE(jump);
+ }
+
+/* Check we have remaining characters. */
+if ((re->options & PCRE_ANCHORED) == 0 && (re->options & PCRE_FIRSTLINE) != 0)
+ {
+ SLJIT_ASSERT(common->first_line_end != 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
+ }
+
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr);
+
+if ((re->options & PCRE_ANCHORED) == 0)
+ {
+ if ((re->options & PCRE_FIRSTLINE) == 0)
+ CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop_label);
+ else
+ CMPTO(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0, mainloop_label);
+ }
+
+/* No more remaining characters. */
+if (reqbyte_notfound != NULL)
+ JUMPHERE(reqbyte_notfound);
+
+if (mode == JIT_PARTIAL_SOFT_COMPILE)
+ CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1, common->partialmatchlabel);
+
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+flush_stubs(common);
+
+JUMPHERE(empty_match);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty));
+CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0, empty_match_backtrack_label);
+OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty_atstart));
+CMPTO(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0, empty_match_found_label);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, empty_match_found_label);
+JUMPTO(SLJIT_JUMP, empty_match_backtrack_label);
+
+common->currententry = common->entries;
+common->local_exit = TRUE;
+quit_label = common->quit_label;
+while (common->currententry != NULL)
+ {
+ /* Might add new entries. */
+ compile_recurse(common);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket);
+ SLJIT_FREE(common->private_data_ptrs);
+ if (common->has_then)
+ SLJIT_FREE(common->then_offsets);
+ return;
+ }
+ flush_stubs(common);
+ common->currententry = common->currententry->next;
+ }
+common->local_exit = FALSE;
+common->quit_label = quit_label;
+
+/* Allocating stack, returns with PCRE_ERROR_JIT_STACKLIMIT if fails. */
+/* This is a (really) rare case. */
+set_jumps(common->stackalloc, LABEL());
+/* RETURN_ADDR is not a saved register. */
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP2, 0);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top), STACK_TOP, 0);
+OP2(SLJIT_ADD, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit), SLJIT_IMM, STACK_GROWTH_RATE);
+
+sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
+jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
+sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
+
+/* Allocation failed. */
+JUMPHERE(jump);
+/* We break the return address cache here, but this is a really rare case. */
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_JIT_STACKLIMIT);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+/* Call limit reached. */
+set_jumps(common->calllimit, LABEL());
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_MATCHLIMIT);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+if (common->revertframes != NULL)
+ {
+ set_jumps(common->revertframes, LABEL());
+ do_revertframes(common);
+ }
+if (common->wordboundary != NULL)
+ {
+ set_jumps(common->wordboundary, LABEL());
+ check_wordboundary(common);
+ }
+if (common->anynewline != NULL)
+ {
+ set_jumps(common->anynewline, LABEL());
+ check_anynewline(common);
+ }
+if (common->hspace != NULL)
+ {
+ set_jumps(common->hspace, LABEL());
+ check_hspace(common);
+ }
+if (common->vspace != NULL)
+ {
+ set_jumps(common->vspace, LABEL());
+ check_vspace(common);
+ }
+if (common->casefulcmp != NULL)
+ {
+ set_jumps(common->casefulcmp, LABEL());
+ do_casefulcmp(common);
+ }
+if (common->caselesscmp != NULL)
+ {
+ set_jumps(common->caselesscmp, LABEL());
+ do_caselesscmp(common);
+ }
+if (common->reset_match != NULL)
+ {
+ set_jumps(common->reset_match, LABEL());
+ do_reset_match(common, (re->top_bracket + 1) * 2);
+ CMPTO(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0, continue_match_label);
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
+ JUMPTO(SLJIT_JUMP, reset_match_label);
+ }
+#ifdef SUPPORT_UTF
+#ifndef COMPILE_PCRE32
+if (common->utfreadchar != NULL)
+ {
+ set_jumps(common->utfreadchar, LABEL());
+ do_utfreadchar(common);
+ }
+#endif /* !COMPILE_PCRE32 */
+#ifdef COMPILE_PCRE8
+if (common->utfreadtype8 != NULL)
+ {
+ set_jumps(common->utfreadtype8, LABEL());
+ do_utfreadtype8(common);
+ }
+#endif /* COMPILE_PCRE8 */
+#endif /* SUPPORT_UTF */
+#ifdef SUPPORT_UCP
+if (common->getucd != NULL)
+ {
+ set_jumps(common->getucd, LABEL());
+ do_getucd(common);
+ }
+#endif
+
+SLJIT_FREE(common->optimized_cbracket);
+SLJIT_FREE(common->private_data_ptrs);
+if (common->has_then)
+ SLJIT_FREE(common->then_offsets);
+
+executable_func = sljit_generate_code(compiler);
+executable_size = sljit_get_generated_code_size(compiler);
+sljit_free_compiler(compiler);
+if (executable_func == NULL)
+ return;
+
+/* Reuse the function descriptor if possible. */
+if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 && extra->executable_jit != NULL)
+ functions = (executable_functions *)extra->executable_jit;
+else
+ {
+ /* Note: If your memory-checker has flagged the allocation below as a
+ * memory leak, it is probably because you either forgot to call
+ * pcre_free_study() (or pcre16_free_study()) on the pcre_extra (or
+ * pcre16_extra) object, or you called said function after having
+ * cleared the PCRE_EXTRA_EXECUTABLE_JIT bit from the "flags" field
+ * of the object. (The function will only free the JIT data if the
+ * bit remains set, as the bit indicates that the pointer to the data
+ * is valid.)
+ */
+ functions = SLJIT_MALLOC(sizeof(executable_functions));
+ if (functions == NULL)
+ {
+ /* This case is highly unlikely since we just recently
+ freed a lot of memory. Although not impossible. */
+ sljit_free_code(executable_func);
+ return;
+ }
+ memset(functions, 0, sizeof(executable_functions));
+ functions->top_bracket = (re->top_bracket + 1) * 2;
+ functions->limit_match = (re->flags & PCRE_MLSET) != 0 ? re->limit_match : 0;
+ extra->executable_jit = functions;
+ extra->flags |= PCRE_EXTRA_EXECUTABLE_JIT;
+ }
+
+functions->executable_funcs[mode] = executable_func;
+functions->executable_sizes[mode] = executable_size;
+}
+
+static int jit_machine_stack_exec(jit_arguments *arguments, void* executable_func)
+{
+union {
+ void* executable_func;
+ jit_function call_executable_func;
+} convert_executable_func;
+pcre_uint8 local_space[MACHINE_STACK_SIZE];
+struct sljit_stack local_stack;
+
+local_stack.top = (sljit_sw)&local_space;
+local_stack.base = local_stack.top;
+local_stack.limit = local_stack.base + MACHINE_STACK_SIZE;
+local_stack.max_limit = local_stack.limit;
+arguments->stack = &local_stack;
+convert_executable_func.executable_func = executable_func;
+return convert_executable_func.call_executable_func(arguments);
+}
+
+int
+PRIV(jit_exec)(const PUBL(extra) *extra_data, const pcre_uchar *subject,
+ int length, int start_offset, int options, int *offsets, int offset_count)
+{
+executable_functions *functions = (executable_functions *)extra_data->executable_jit;
+union {
+ void* executable_func;
+ jit_function call_executable_func;
+} convert_executable_func;
+jit_arguments arguments;
+int max_offset_count;
+int retval;
+int mode = JIT_COMPILE;
+
+if ((options & PCRE_PARTIAL_HARD) != 0)
+ mode = JIT_PARTIAL_HARD_COMPILE;
+else if ((options & PCRE_PARTIAL_SOFT) != 0)
+ mode = JIT_PARTIAL_SOFT_COMPILE;
+
+if (functions->executable_funcs[mode] == NULL)
+ return PCRE_ERROR_JIT_BADOPTION;
+
+/* Sanity checks should be handled by pcre_exec. */
+arguments.str = subject + start_offset;
+arguments.begin = subject;
+arguments.end = subject + length;
+arguments.mark_ptr = NULL;
+/* JIT decreases this value less frequently than the interpreter. */
+arguments.limit_match = ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0) ? MATCH_LIMIT : (pcre_uint32)(extra_data->match_limit);
+if (functions->limit_match != 0 && functions->limit_match < arguments.limit_match)
+ arguments.limit_match = functions->limit_match;
+arguments.notbol = (options & PCRE_NOTBOL) != 0;
+arguments.noteol = (options & PCRE_NOTEOL) != 0;
+arguments.notempty = (options & PCRE_NOTEMPTY) != 0;
+arguments.notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
+arguments.offsets = offsets;
+arguments.callout_data = (extra_data->flags & PCRE_EXTRA_CALLOUT_DATA) != 0 ? extra_data->callout_data : NULL;
+arguments.real_offset_count = offset_count;
+
+/* pcre_exec() rounds offset_count to a multiple of 3, and then uses only 2/3 of
+the output vector for storing captured strings, with the remainder used as
+workspace. We don't need the workspace here. For compatibility, we limit the
+number of captured strings in the same way as pcre_exec(), so that the user
+gets the same result with and without JIT. */
+
+if (offset_count != 2)
+ offset_count = ((offset_count - (offset_count % 3)) * 2) / 3;
+max_offset_count = functions->top_bracket;
+if (offset_count > max_offset_count)
+ offset_count = max_offset_count;
+arguments.offset_count = offset_count;
+
+if (functions->callback)
+ arguments.stack = (struct sljit_stack *)functions->callback(functions->userdata);
+else
+ arguments.stack = (struct sljit_stack *)functions->userdata;
+
+if (arguments.stack == NULL)
+ retval = jit_machine_stack_exec(&arguments, functions->executable_funcs[mode]);
+else
+ {
+ convert_executable_func.executable_func = functions->executable_funcs[mode];
+ retval = convert_executable_func.call_executable_func(&arguments);
+ }
+
+if (retval * 2 > offset_count)
+ retval = 0;
+if ((extra_data->flags & PCRE_EXTRA_MARK) != 0)
+ *(extra_data->mark) = arguments.mark_ptr;
+
+return retval;
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+erts_pcre_jit_exec(const pcre *argument_re, const pcre_extra *extra_data,
+ PCRE_SPTR subject, int length, int start_offset, int options,
+ int *offsets, int offset_count, pcre_jit_stack *stack)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_jit_exec(const pcre *argument_re, const pcre_extra *extra_data,
+ PCRE_SPTR subject, int length, int start_offset, int options,
+ int *offsets, int offset_count, pcre_jit_stack *stack)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_jit_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
+ PCRE_SPTR16 subject, int length, int start_offset, int options,
+ int *offsets, int offset_count, pcre16_jit_stack *stack)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_jit_exec(const pcre32 *argument_re, const pcre32_extra *extra_data,
+ PCRE_SPTR32 subject, int length, int start_offset, int options,
+ int *offsets, int offset_count, pcre32_jit_stack *stack)
+#endif
+{
+pcre_uchar *subject_ptr = (pcre_uchar *)subject;
+executable_functions *functions = (executable_functions *)extra_data->executable_jit;
+union {
+ void* executable_func;
+ jit_function call_executable_func;
+} convert_executable_func;
+jit_arguments arguments;
+int max_offset_count;
+int retval;
+int mode = JIT_COMPILE;
+
+SLJIT_UNUSED_ARG(argument_re);
+
+/* Plausibility checks */
+if ((options & ~PUBLIC_JIT_EXEC_OPTIONS) != 0) return PCRE_ERROR_JIT_BADOPTION;
+
+if ((options & PCRE_PARTIAL_HARD) != 0)
+ mode = JIT_PARTIAL_HARD_COMPILE;
+else if ((options & PCRE_PARTIAL_SOFT) != 0)
+ mode = JIT_PARTIAL_SOFT_COMPILE;
+
+if (functions->executable_funcs[mode] == NULL)
+ return PCRE_ERROR_JIT_BADOPTION;
+
+/* Sanity checks should be handled by pcre_exec. */
+arguments.stack = (struct sljit_stack *)stack;
+arguments.str = subject_ptr + start_offset;
+arguments.begin = subject_ptr;
+arguments.end = subject_ptr + length;
+arguments.mark_ptr = NULL;
+/* JIT decreases this value less frequently than the interpreter. */
+arguments.limit_match = ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0) ? MATCH_LIMIT : (pcre_uint32)(extra_data->match_limit);
+if (functions->limit_match != 0 && functions->limit_match < arguments.limit_match)
+ arguments.limit_match = functions->limit_match;
+arguments.notbol = (options & PCRE_NOTBOL) != 0;
+arguments.noteol = (options & PCRE_NOTEOL) != 0;
+arguments.notempty = (options & PCRE_NOTEMPTY) != 0;
+arguments.notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
+arguments.offsets = offsets;
+arguments.callout_data = (extra_data->flags & PCRE_EXTRA_CALLOUT_DATA) != 0 ? extra_data->callout_data : NULL;
+arguments.real_offset_count = offset_count;
+
+/* pcre_exec() rounds offset_count to a multiple of 3, and then uses only 2/3 of
+the output vector for storing captured strings, with the remainder used as
+workspace. We don't need the workspace here. For compatibility, we limit the
+number of captured strings in the same way as pcre_exec(), so that the user
+gets the same result with and without JIT. */
+
+if (offset_count != 2)
+ offset_count = ((offset_count - (offset_count % 3)) * 2) / 3;
+max_offset_count = functions->top_bracket;
+if (offset_count > max_offset_count)
+ offset_count = max_offset_count;
+arguments.offset_count = offset_count;
+
+convert_executable_func.executable_func = functions->executable_funcs[mode];
+retval = convert_executable_func.call_executable_func(&arguments);
+
+if (retval * 2 > offset_count)
+ retval = 0;
+if ((extra_data->flags & PCRE_EXTRA_MARK) != 0)
+ *(extra_data->mark) = arguments.mark_ptr;
+
+return retval;
+}
+
+void
+PRIV(jit_free)(void *executable_funcs)
+{
+int i;
+executable_functions *functions = (executable_functions *)executable_funcs;
+for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
+ {
+ if (functions->executable_funcs[i] != NULL)
+ sljit_free_code(functions->executable_funcs[i]);
+ }
+SLJIT_FREE(functions);
+}
+
+int
+PRIV(jit_get_size)(void *executable_funcs)
+{
+int i;
+sljit_uw size = 0;
+sljit_uw *executable_sizes = ((executable_functions *)executable_funcs)->executable_sizes;
+for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
+ size += executable_sizes[i];
+return (int)size;
+}
+
+const char*
+PRIV(jit_get_target)(void)
+{
+return sljit_get_platform_name();
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL pcre_jit_stack *
+erts_pcre_jit_stack_alloc(int startsize, int maxsize)
+#else
+PCRE_EXP_DECL pcre_jit_stack *
+pcre_jit_stack_alloc(int startsize, int maxsize)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL pcre16_jit_stack *
+pcre16_jit_stack_alloc(int startsize, int maxsize)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL pcre32_jit_stack *
+pcre32_jit_stack_alloc(int startsize, int maxsize)
+#endif
+{
+if (startsize < 1 || maxsize < 1)
+ return NULL;
+if (startsize > maxsize)
+ startsize = maxsize;
+startsize = (startsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
+maxsize = (maxsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
+return (PUBL(jit_stack)*)sljit_allocate_stack(startsize, maxsize);
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void
+erts_pcre_jit_stack_free(pcre_jit_stack *stack)
+#else
+PCRE_EXP_DECL void
+pcre_jit_stack_free(pcre_jit_stack *stack)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL void
+pcre16_jit_stack_free(pcre16_jit_stack *stack)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL void
+pcre32_jit_stack_free(pcre32_jit_stack *stack)
+#endif
+{
+sljit_free_stack((struct sljit_stack *)stack);
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void
+erts_pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
+#else
+PCRE_EXP_DECL void
+pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL void
+pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL void
+pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void *userdata)
+#endif
+{
+executable_functions *functions;
+if (extra != NULL &&
+ (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra->executable_jit != NULL)
+ {
+ functions = (executable_functions *)extra->executable_jit;
+ functions->callback = callback;
+ functions->userdata = userdata;
+ }
+}
+
+#else /* SUPPORT_JIT */
+
+/* These are dummy functions to avoid linking errors when JIT support is not
+being compiled. */
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL pcre_jit_stack *
+erts_pcre_jit_stack_alloc(int startsize, int maxsize)
+#else
+PCRE_EXP_DECL pcre_jit_stack *
+pcre_jit_stack_alloc(int startsize, int maxsize)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL pcre16_jit_stack *
+pcre16_jit_stack_alloc(int startsize, int maxsize)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL pcre32_jit_stack *
+pcre32_jit_stack_alloc(int startsize, int maxsize)
+#endif
+{
+(void)startsize;
+(void)maxsize;
+return NULL;
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void
+erts_pcre_jit_stack_free(pcre_jit_stack *stack)
+#else
+PCRE_EXP_DECL void
+pcre_jit_stack_free(pcre_jit_stack *stack)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL void
+pcre16_jit_stack_free(pcre16_jit_stack *stack)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL void
+pcre32_jit_stack_free(pcre32_jit_stack *stack)
+#endif
+{
+(void)stack;
+}
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DECL void
+erts_pcre_assign_jit_stack(erts_pcre_extra *extra, pcre_jit_callback callback, void *userdata)
+#else
+PCRE_EXP_DECL void
+pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DECL void
+pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DECL void
+pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void *userdata)
+#endif
+{
+(void)extra;
+(void)callback;
+(void)userdata;
+}
+
+#endif
+
+/* End of pcre_jit_compile.c */
diff --git a/erts/emulator/pcre/pcre_latin_1_table.c b/erts/emulator/pcre/pcre_latin_1_table.c
index 69d888026b..599540723b 100644
--- a/erts/emulator/pcre/pcre_latin_1_table.c
+++ b/erts/emulator/pcre/pcre_latin_1_table.c
@@ -2,7 +2,7 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/* This file was automatically written by the make_latin1_table auxiliary
+/* This file was automatically written by the dftables auxiliary
program. It contains character tables that are used when no external
tables are passed to PCRE by the application that calls it. The tables
are used only for characters whose code values are less than 256.
@@ -13,14 +13,14 @@ library and dead code stripping is activated. This leads to link errors.
Pulling in the header ensures that the array gets flagged as "someone
outside this compilation unit might reference this" and so it will always
be supplied to the linker. */
-
+/* %ExternalCopyright% */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcre_internal.h"
-const unsigned char _erts_pcre_default_tables[] = {
+const pcre_uint8 PRIV(default_tables)[] = {
/* This table is a lower casing table. */
diff --git a/erts/emulator/pcre/pcre_make_latin1_default.c b/erts/emulator/pcre/pcre_make_latin1_default.c
deleted file mode 100644
index b8a8062764..0000000000
--- a/erts/emulator/pcre/pcre_make_latin1_default.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-/* This is a "hacked" version of pcre_maketables that
- * will generate an acceptable character table for any
- * iso-latin-1 language when running in 8-bit mode.
- */
-
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-/* %ExternalCopyright% */
-
-/* This module contains the external function pcre_maketables(), which builds
-character tables for PCRE in the current locale. The file is compiled on its
-own as part of the PCRE library. However, it is also included in the
-compilation of dftables.c, in which case the macro DFTABLES is defined. */
-
-
-#ifndef DFTABLES
-# ifdef HAVE_CONFIG_H
-# include "config.h"
-# endif
-# include "pcre_internal.h"
-#endif
-
-
-/*************************************************
-* Create PCRE character tables *
-*************************************************/
-
-/* This function builds a set of character tables for use by PCRE and returns
-a pointer to them. They are build using the ctype functions, and consequently
-their contents will depend upon the current locale setting. When compiled as
-part of the library, the store is obtained via pcre_malloc(), but when compiled
-inside dftables, use malloc().
-
-Arguments: none
-Returns: pointer to the contiguous block of data
-*/
-
-typedef struct {
- int is_alpha,is_upper,is_lower,is_alnum,is_space,is_xdigit,is_graph,is_punct,is_cntrl;
- int upcase;
- int lowcase;
-} HiCharProp;
-
-static HiCharProp hicharprop[] = {
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 160 NO-BREAK SPACE */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 161 � INVERTED EXCLAMATION MARK */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 162 � CENT SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 163 � POUND SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 164 � CURRENCY SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 165 � YEN SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 166 � BROKEN BAR */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 167 � SECTION SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 168 � DIAERESIS */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 169 � COPYRIGHT SIGN */
- {1,0,0,1,0,0,1,0,0, 0,0}, /* 170 � FEMININE ORDINAL INDICATOR */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 171 � LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 172 � NOT SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 173 � SOFT HYPHEN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 174 � REGISTERED SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 175 � MACRON */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 176 � DEGREE SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 177 � PLUS-MINUS SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 178 � SUPERSCRIPT TWO */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 179 � SUPERSCRIPT THREE */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 180 � ACUTE ACCENT */
- {1,0,1,1,0,0,1,0,0, 0,0}, /* 181 � MICRO SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 182 � PILCROW SIGN */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 183 � MIDDLE DOT */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 184 � CEDILLA */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 185 � SUPERSCRIPT ONE */
- {1,0,0,1,0,0,1,0,0, 0,0}, /* 186 � MASCULINE ORDINAL INDICATOR */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 187 � RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 188 � VULGAR FRACTION ONE QUARTER */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 189 � VULGAR FRACTION ONE HALF */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 190 � VULGAR FRACTION THREE QUARTERS */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 191 � INVERTED QUESTION MARK */
- {1,1,0,1,0,0,1,0,0, 0,224}, /* 192 � LATIN CAPITAL LETTER A WITH GRAVE */
- {1,1,0,1,0,0,1,0,0, 0,225}, /* 193 � LATIN CAPITAL LETTER A WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,226}, /* 194 � LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
- {1,1,0,1,0,0,1,0,0, 0,227}, /* 195 � LATIN CAPITAL LETTER A WITH TILDE */
- {1,1,0,1,0,0,1,0,0, 0,228}, /* 196 � LATIN CAPITAL LETTER A WITH DIAERESIS */
- {1,1,0,1,0,0,1,0,0, 0,229}, /* 197 � LATIN CAPITAL LETTER A WITH RING ABOVE */
- {1,1,0,1,0,0,1,0,0, 0,230}, /* 198 � LATIN CAPITAL LETTER AE */
- {1,1,0,1,0,0,1,0,0, 0,231}, /* 199 � LATIN CAPITAL LETTER C WITH CEDILLA */
- {1,1,0,1,0,0,1,0,0, 0,232}, /* 200 � LATIN CAPITAL LETTER E WITH GRAVE */
- {1,1,0,1,0,0,1,0,0, 0,233}, /* 201 � LATIN CAPITAL LETTER E WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,234}, /* 202 � LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
- {1,1,0,1,0,0,1,0,0, 0,235}, /* 203 � LATIN CAPITAL LETTER E WITH DIAERESIS */
- {1,1,0,1,0,0,1,0,0, 0,236}, /* 204 � LATIN CAPITAL LETTER I WITH GRAVE */
- {1,1,0,1,0,0,1,0,0, 0,237}, /* 205 � LATIN CAPITAL LETTER I WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,238}, /* 206 � LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
- {1,1,0,1,0,0,1,0,0, 0,239}, /* 207 � LATIN CAPITAL LETTER I WITH DIAERESIS */
- {1,1,0,1,0,0,1,0,0, 0,240}, /* 208 � LATIN CAPITAL LETTER ETH */
- {1,1,0,1,0,0,1,0,0, 0,241}, /* 209 � LATIN CAPITAL LETTER N WITH TILDE */
- {1,1,0,1,0,0,1,0,0, 0,242}, /* 210 � LATIN CAPITAL LETTER O WITH GRAVE */
- {1,1,0,1,0,0,1,0,0, 0,243}, /* 211 � LATIN CAPITAL LETTER O WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,244}, /* 212 � LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
- {1,1,0,1,0,0,1,0,0, 0,245}, /* 213 � LATIN CAPITAL LETTER O WITH TILDE */
- {1,1,0,1,0,0,1,0,0, 0,246}, /* 214 � LATIN CAPITAL LETTER O WITH DIAERESIS */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 215 � MULTIPLICATION SIGN */
- {1,1,0,1,0,0,1,0,0, 0,248}, /* 216 � LATIN CAPITAL LETTER O WITH STROKE */
- {1,1,0,1,0,0,1,0,0, 0,249}, /* 217 � LATIN CAPITAL LETTER U WITH GRAVE */
- {1,1,0,1,0,0,1,0,0, 0,250}, /* 218 � LATIN CAPITAL LETTER U WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,251}, /* 219 � LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
- {1,1,0,1,0,0,1,0,0, 0,252}, /* 220 � LATIN CAPITAL LETTER U WITH DIAERESIS */
- {1,1,0,1,0,0,1,0,0, 0,253}, /* 221 � LATIN CAPITAL LETTER Y WITH ACUTE */
- {1,1,0,1,0,0,1,0,0, 0,254}, /* 222 � LATIN CAPITAL LETTER THORN */
- {1,0,1,1,0,0,1,0,0, 223,0}, /* 223 � LATIN SMALL LETTER SHARP S Ouch! */
- {1,0,1,1,0,0,1,0,0, 192,0}, /* 224 � LATIN SMALL LETTER A WITH GRAVE */
- {1,0,1,1,0,0,1,0,0, 193,0}, /* 225 � LATIN SMALL LETTER A WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 194,0}, /* 226 � LATIN SMALL LETTER A WITH CIRCUMFLEX */
- {1,0,1,1,0,0,1,0,0, 195,0}, /* 227 � LATIN SMALL LETTER A WITH TILDE */
- {1,0,1,1,0,0,1,0,0, 196,0}, /* 228 � LATIN SMALL LETTER A WITH DIAERESIS */
- {1,0,1,1,0,0,1,0,0, 197,0}, /* 229 � LATIN SMALL LETTER A WITH RING ABOVE */
- {1,0,1,1,0,0,1,0,0, 198,0}, /* 230 � LATIN SMALL LETTER AE */
- {1,0,1,1,0,0,1,0,0, 199,0}, /* 231 � LATIN SMALL LETTER C WITH CEDILLA */
- {1,0,1,1,0,0,1,0,0, 200,0}, /* 232 � LATIN SMALL LETTER E WITH GRAVE */
- {1,0,1,1,0,0,1,0,0, 201,0}, /* 233 � LATIN SMALL LETTER E WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 202,0}, /* 234 � LATIN SMALL LETTER E WITH CIRCUMFLEX */
- {1,0,1,1,0,0,1,0,0, 203,0}, /* 235 � LATIN SMALL LETTER E WITH DIAERESIS */
- {1,0,1,1,0,0,1,0,0, 204,0}, /* 236 � LATIN SMALL LETTER I WITH GRAVE */
- {1,0,1,1,0,0,1,0,0, 205,0}, /* 237 � LATIN SMALL LETTER I WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 206,0}, /* 238 � LATIN SMALL LETTER I WITH CIRCUMFLEX */
- {1,0,1,1,0,0,1,0,0, 207,0}, /* 239 � LATIN SMALL LETTER I WITH DIAERESIS */
- {1,0,1,1,0,0,1,0,0, 208,0}, /* 240 � LATIN SMALL LETTER ETH */
- {1,0,1,1,0,0,1,0,0, 209,0}, /* 241 � LATIN SMALL LETTER N WITH TILDE */
- {1,0,1,1,0,0,1,0,0, 210,0}, /* 242 � LATIN SMALL LETTER O WITH GRAVE */
- {1,0,1,1,0,0,1,0,0, 211,0}, /* 243 � LATIN SMALL LETTER O WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 212,0}, /* 244 � LATIN SMALL LETTER O WITH CIRCUMFLEX */
- {1,0,1,1,0,0,1,0,0, 213,0}, /* 245 � LATIN SMALL LETTER O WITH TILDE */
- {1,0,1,1,0,0,1,0,0, 214,0}, /* 246 � LATIN SMALL LETTER O WITH DIAERESIS */
- {0,0,0,0,0,0,1,1,0, 0,0}, /* 247 � DIVISION SIGN */
- {1,0,1,1,0,0,1,0,0, 216,0}, /* 248 � LATIN SMALL LETTER O WITH STROKE */
- {1,0,1,1,0,0,1,0,0, 217,0}, /* 249 � LATIN SMALL LETTER U WITH GRAVE */
- {1,0,1,1,0,0,1,0,0, 218,0}, /* 250 � LATIN SMALL LETTER U WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 219,0}, /* 251 � LATIN SMALL LETTER U WITH CIRCUMFLEX */
- {1,0,1,1,0,0,1,0,0, 220,0}, /* 252 � LATIN SMALL LETTER U WITH DIAERESIS */
- {1,0,1,1,0,0,1,0,0, 221,0}, /* 253 � LATIN SMALL LETTER Y WITH ACUTE */
- {1,0,1,1,0,0,1,0,0, 222,0}, /* 254 � LATIN SMALL LETTER THORN */
- {1,0,1,1,0,0,1,0,0, 255,0}}; /* 255 � LATIN SMALL LETTER Y WITH DIAERESIS */
-
-
-static int my_tolower(int x) {
- if (x < 128)
- return tolower(x);
- else if (x < 160)
- return x;
- else if (hicharprop[x - 160].lowcase == 0)
- return x;
- else
- return hicharprop[x - 160].lowcase;
-}
-
-static int my_toupper(int x) {
- if (x < 128)
- return toupper(x);
- else if (x < 160)
- return x;
- else if (hicharprop[x - 160].upcase == 0)
- return x;
- else
- return hicharprop[x - 160].upcase;
-}
-
-static int my_islower(int x) {
- if (x < 128)
- return islower(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_lower;
-}
-
-static int my_isupper(int x) {
- if (x < 128)
- return isupper(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_upper;
-}
-
-static int my_isdigit(int x) {
- if (x < 128)
- return isdigit(x);
- else
- return 0;
-}
-
-static int my_isalpha(int x) {
- if (x < 128)
- return isalpha(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_alpha;
-}
-
-static int my_isalnum(int x) {
- if (x < 128)
- return isalnum(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_alnum;
-}
-
-static int my_isspace(int x) {
- if (x < 128)
- return isspace(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_space;
-}
-
-static int my_isxdigit(int x) {
- if (x < 128)
- return isxdigit(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_xdigit;
-}
-static int my_isgraph(int x) {
- if (x < 128)
- return isgraph(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_graph;
-}
-static int my_isprint(int x) {
- if (x < 128)
- return isprint(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_graph | hicharprop[x - 160].is_space ;
-}
-
-static int my_ispunct(int x) {
- if (x < 128)
- return ispunct(x);
- else if (x < 160)
- return 0;
- else
- return hicharprop[x - 160].is_punct;
-}
-
-
-static int my_iscntrl(int x) {
- if (x < 128)
- return iscntrl(x);
- else if (x < 160)
- return 1;
- else
- return hicharprop[x - 160].is_cntrl;
-}
-const unsigned char *
-pcre_make_latin1_tables(void)
-{
-unsigned char *yield, *p;
-int i;
-
-yield = (unsigned char*)malloc(tables_length);
-
-if (yield == NULL) return NULL;
-p = yield;
-
-/* First comes the lower casing table */
-
-for (i = 0; i < 256; i++) *p++ = my_tolower(i);
-
-/* Next the case-flipping table */
-
-for (i = 0; i < 256; i++) *p++ = my_islower(i)? my_toupper(i) : my_tolower(i);
-
-/* Then the character class tables. Don't try to be clever and save effort on
-exclusive ones - in some locales things may be different. Note that the table
-for "space" includes everything "isspace" gives, including VT in the default
-locale. This makes it work for the POSIX class [:space:]. Note also that it is
-possible for a character to be alnum or alpha without being lower or upper,
-such as "male and female ordinals" (\xAA and \xBA) in the fr_FR locale (at
-least under Debian Linux's locales as of 12/2005). So we must test for alnum
-specially. */
-
-memset(p, 0, cbit_length);
-for (i = 0; i < 256; i++)
- {
- if (my_isdigit(i)) p[cbit_digit + i/8] |= 1 << (i&7);
- if (my_isupper(i)) p[cbit_upper + i/8] |= 1 << (i&7);
- if (my_islower(i)) p[cbit_lower + i/8] |= 1 << (i&7);
- if (my_isalnum(i)) p[cbit_word + i/8] |= 1 << (i&7);
- if (i == '_') p[cbit_word + i/8] |= 1 << (i&7);
- if (my_isspace(i)) p[cbit_space + i/8] |= 1 << (i&7);
- if (my_isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
- if (my_isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7);
- if (my_isprint(i)) p[cbit_print + i/8] |= 1 << (i&7);
- if (my_ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7);
- if (my_iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7);
- }
-p += cbit_length;
-
-/* Finally, the character type table. In this, we exclude VT from the white
-space chars, because Perl doesn't recognize it as such for \s and for comments
-within regexes. */
-
-for (i = 0; i < 256; i++)
- {
- int x = 0;
- if (i != 0x0b && my_isspace(i)) x += ctype_space;
- if (my_isalpha(i)) x += ctype_letter;
- if (my_isdigit(i)) x += ctype_digit;
- if (my_isxdigit(i)) x += ctype_xdigit;
- if (my_isalnum(i) || i == '_') x += ctype_word;
-
- /* Note: strchr includes the terminating zero in the characters it considers.
- In this instance, that is ok because we want binary zero to be flagged as a
- meta-character, which in this sense is any character that terminates a run
- of data characters. */
-
- if (strchr("\\*+?{^.$|()[", i) != 0) x += ctype_meta;
- *p++ = x;
- }
-
-return yield;
-}
-
-/* End of pcre_maketables.c */
diff --git a/erts/emulator/pcre/pcre_maketables.c b/erts/emulator/pcre/pcre_maketables.c
index a695bb26ad..9310d886fa 100644
--- a/erts/emulator/pcre/pcre_maketables.c
+++ b/erts/emulator/pcre/pcre_maketables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_maketables(), which builds
+/* This module contains the external function pcre_maketables(), which builds
character tables for PCRE in the current locale. The file is compiled on its
own as part of the PCRE library. However, it is also included in the
compilation of dftables.c, in which case the macro DFTABLES is defined. */
@@ -60,21 +60,34 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
/* This function builds a set of character tables for use by PCRE and returns
a pointer to them. They are build using the ctype functions, and consequently
their contents will depend upon the current locale setting. When compiled as
-part of the library, the store is obtained via erts_pcre_malloc(), but when compiled
-inside dftables, use malloc().
+part of the library, the store is obtained via PUBL(malloc)(), but when
+compiled inside dftables, use malloc().
Arguments: none
Returns: pointer to the contiguous block of data
*/
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
const unsigned char *
erts_pcre_maketables(void)
+#else
+const unsigned char *
+pcre_maketables(void)
+#endif
+#elif defined COMPILE_PCRE16
+const unsigned char *
+pcre16_maketables(void)
+#elif defined COMPILE_PCRE32
+const unsigned char *
+pcre32_maketables(void)
+#endif
{
unsigned char *yield, *p;
int i;
#ifndef DFTABLES
-yield = (unsigned char*)(erts_pcre_malloc)(tables_length);
+yield = (unsigned char*)(PUBL(malloc))(tables_length);
#else
yield = (unsigned char*)malloc(tables_length);
#endif
@@ -123,7 +136,7 @@ within regexes. */
for (i = 0; i < 256; i++)
{
int x = 0;
- if (i != 0x0b && isspace(i)) x += ctype_space;
+ if (i != CHAR_VT && isspace(i)) x += ctype_space;
if (isalpha(i)) x += ctype_letter;
if (isdigit(i)) x += ctype_digit;
if (isxdigit(i)) x += ctype_xdigit;
diff --git a/erts/emulator/pcre/pcre_newline.c b/erts/emulator/pcre/pcre_newline.c
index 7dbda88aff..02394078d5 100644
--- a/erts/emulator/pcre/pcre_newline.c
+++ b/erts/emulator/pcre/pcre_newline.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -68,23 +68,33 @@ Arguments:
type the newline type
endptr pointer to the end of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
-_erts_pcre_is_newline(const uschar *ptr, int type, const uschar *endptr,
- int *lenptr, BOOL utf8)
+PRIV(is_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR endptr, int *lenptr,
+ BOOL utf)
{
-int c;
-if (utf8) { GETCHAR(c, ptr); } else c = *ptr;
+pcre_uint32 c;
+(void)utf;
+#ifdef SUPPORT_UTF
+if (utf)
+ {
+ GETCHAR(c, ptr);
+ }
+else
+#endif /* SUPPORT_UTF */
+ c = *ptr;
+
+/* Note that this function is called only for ANY or ANYCRLF. */
if (type == NLTYPE_ANYCRLF) switch(c)
{
- case 0x000a: *lenptr = 1; return TRUE; /* LF */
- case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
- return TRUE; /* CR */
+ case CHAR_LF: *lenptr = 1; return TRUE;
+ case CHAR_CR: *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
+ return TRUE;
default: return FALSE;
}
@@ -92,14 +102,29 @@ if (type == NLTYPE_ANYCRLF) switch(c)
else switch(c)
{
- case 0x000a: /* LF */
- case 0x000b: /* VT */
- case 0x000c: *lenptr = 1; return TRUE; /* FF */
- case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
- return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
+#ifdef EBCDIC
+ case CHAR_NEL:
+#endif
+ case CHAR_LF:
+ case CHAR_VT:
+ case CHAR_FF: *lenptr = 1; return TRUE;
+
+ case CHAR_CR:
+ *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
+ return TRUE;
+
+#ifndef EBCDIC
+#ifdef COMPILE_PCRE8
+ case CHAR_NEL: *lenptr = utf? 2 : 1; return TRUE;
case 0x2028: /* LS */
case 0x2029: *lenptr = 3; return TRUE; /* PS */
+#else /* COMPILE_PCRE16 || COMPILE_PCRE32 */
+ case CHAR_NEL:
+ case 0x2028: /* LS */
+ case 0x2029: *lenptr = 1; return TRUE; /* PS */
+#endif /* COMPILE_PCRE8 */
+#endif /* Not EBCDIC */
+
default: return FALSE;
}
}
@@ -118,46 +143,67 @@ Arguments:
type the newline type
startptr pointer to the start of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
-_erts_pcre_was_newline(const uschar *ptr, int type, const uschar *startptr,
- int *lenptr, BOOL utf8)
+PRIV(was_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR startptr, int *lenptr,
+ BOOL utf)
{
-int c;
+pcre_uint32 c;
+(void)utf;
ptr--;
-#ifdef SUPPORT_UTF8
-if (utf8)
+#ifdef SUPPORT_UTF
+if (utf)
{
BACKCHAR(ptr);
GETCHAR(c, ptr);
}
-else c = *ptr;
-#else /* no UTF-8 support */
-c = *ptr;
-#endif /* SUPPORT_UTF8 */
+else
+#endif /* SUPPORT_UTF */
+ c = *ptr;
+
+/* Note that this function is called only for ANY or ANYCRLF. */
if (type == NLTYPE_ANYCRLF) switch(c)
{
- case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1;
- return TRUE; /* LF */
- case 0x000d: *lenptr = 1; return TRUE; /* CR */
+ case CHAR_LF:
+ *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
+ return TRUE;
+
+ case CHAR_CR: *lenptr = 1; return TRUE;
default: return FALSE;
}
+/* NLTYPE_ANY */
+
else switch(c)
{
- case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1;
- return TRUE; /* LF */
- case 0x000b: /* VT */
- case 0x000c: /* FF */
- case 0x000d: *lenptr = 1; return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
- case 0x2028: /* LS */
- case 0x2029: *lenptr = 3; return TRUE; /* PS */
+ case CHAR_LF:
+ *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
+ return TRUE;
+
+#ifdef EBCDIC
+ case CHAR_NEL:
+#endif
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_CR: *lenptr = 1; return TRUE;
+
+#ifndef EBCDIC
+#ifdef COMPILE_PCRE8
+ case CHAR_NEL: *lenptr = utf? 2 : 1; return TRUE;
+ case 0x2028: /* LS */
+ case 0x2029: *lenptr = 3; return TRUE; /* PS */
+#else /* COMPILE_PCRE16 || COMPILE_PCRE32 */
+ case CHAR_NEL:
+ case 0x2028: /* LS */
+ case 0x2029: *lenptr = 1; return TRUE; /* PS */
+#endif /* COMPILE_PCRE8 */
+#endif /* NotEBCDIC */
+
default: return FALSE;
}
}
diff --git a/erts/emulator/pcre/pcre_ord2utf8.c b/erts/emulator/pcre/pcre_ord2utf8.c
index dd9c934e20..a134fca635 100644
--- a/erts/emulator/pcre/pcre_ord2utf8.c
+++ b/erts/emulator/pcre/pcre_ord2utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -47,41 +47,50 @@ character value into a UTF8 string. */
#include "config.h"
#endif
-#include "pcre_internal.h"
+#define COMPILE_PCRE8
+#include "pcre_internal.h"
/*************************************************
* Convert character value to UTF-8 *
*************************************************/
-/* This function takes an integer value in the range 0 - 0x7fffffff
-and encodes it as a UTF-8 character in 0 to 6 bytes.
+/* This function takes an integer value in the range 0 - 0x10ffff
+and encodes it as a UTF-8 character in 1 to 4 pcre_uchars.
Arguments:
cvalue the character value
- buffer pointer to buffer for result - at least 6 bytes long
+ buffer pointer to buffer for result - at least 6 pcre_uchars long
Returns: number of characters placed in the buffer
*/
+unsigned
int
-_erts_pcre_ord2utf8(int cvalue, uschar *buffer)
+PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
{
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
+
register int i, j;
-for (i = 0; i < _erts_pcre_utf8_table1_size; i++)
- if (cvalue <= _erts_pcre_utf8_table1[i]) break;
+
+for (i = 0; i < PRIV(utf8_table1_size); i++)
+ if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
buffer += i;
for (j = i; j > 0; j--)
{
*buffer-- = 0x80 | (cvalue & 0x3f);
cvalue >>= 6;
}
-*buffer = _erts_pcre_utf8_table2[i] | cvalue;
+*buffer = PRIV(utf8_table2)[i] | cvalue;
return i + 1;
+
#else
-return 0; /* Keep compiler happy; this function won't ever be */
-#endif /* called when SUPPORT_UTF8 is not defined. */
+
+(void)(cvalue); /* Keep compiler happy; this function won't ever be */
+(void)(buffer); /* called when SUPPORT_UTF is not defined. */
+return 0;
+
+#endif
}
/* End of pcre_ord2utf8.c */
diff --git a/erts/emulator/pcre/pcre_refcount.c b/erts/emulator/pcre/pcre_refcount.c
index a2077b9d52..33d5a528af 100644
--- a/erts/emulator/pcre/pcre_refcount.c
+++ b/erts/emulator/pcre/pcre_refcount.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_refcount(), which is an
+/* This module contains the external function pcre_refcount(), which is an
auxiliary function that can be used to maintain a reference count in a compiled
pattern data block. This might be helpful in applications where the block is
shared by different users. */
@@ -69,11 +69,26 @@ Returns: the (possibly updated) count value (a non-negative number), or
a negative error number
*/
-PCRE_EXP_DEFN int
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
erts_pcre_refcount(pcre *argument_re, int adjust)
+#else
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre_refcount(pcre *argument_re, int adjust)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre16_refcount(pcre16 *argument_re, int adjust)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
+pcre32_refcount(pcre32 *argument_re, int adjust)
+#endif
{
-real_pcre *re = (real_pcre *)argument_re;
+REAL_PCRE *re = (REAL_PCRE *)argument_re;
if (re == NULL) return PCRE_ERROR_NULL;
+if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
re->ref_count = (-adjust > re->ref_count)? 0 :
(adjust + re->ref_count > 65535)? 65535 :
re->ref_count + adjust;
diff --git a/erts/emulator/pcre/pcre_string_utils.c b/erts/emulator/pcre/pcre_string_utils.c
new file mode 100644
index 0000000000..274070469f
--- /dev/null
+++ b/erts/emulator/pcre/pcre_string_utils.c
@@ -0,0 +1,211 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Copyright (c) 1997-2013 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains internal functions for comparing and finding the length
+of strings for different data item sizes. */
+/* %ExternalCopyright% */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre_internal.h"
+
+#ifndef COMPILE_PCRE8
+
+/*************************************************
+* Compare string utilities *
+*************************************************/
+
+/* The following two functions compares two strings. Basically a strcmp
+for non 8 bit characters.
+
+Arguments:
+ str1 first string
+ str2 second string
+
+Returns: 0 if both string are equal (like strcmp), 1 otherwise
+*/
+
+int
+PRIV(strcmp_uc_uc)(const pcre_uchar *str1, const pcre_uchar *str2)
+{
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (*str1 != '\0' || *str2 != '\0')
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+#ifdef COMPILE_PCRE32
+
+int
+PRIV(strcmp_uc_uc_utf)(const pcre_uchar *str1, const pcre_uchar *str2)
+{
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (*str1 != '\0' || *str2 != '\0')
+ {
+ c1 = RAWUCHARINC(str1);
+ c2 = RAWUCHARINC(str2);
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+#endif /* COMPILE_PCRE32 */
+
+int
+PRIV(strcmp_uc_c8)(const pcre_uchar *str1, const char *str2)
+{
+const pcre_uint8 *ustr2 = (pcre_uint8 *)str2;
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (*str1 != '\0' || *ustr2 != '\0')
+ {
+ c1 = *str1++;
+ c2 = (pcre_uchar)*ustr2++;
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+#ifdef COMPILE_PCRE32
+
+int
+PRIV(strcmp_uc_c8_utf)(const pcre_uchar *str1, const char *str2)
+{
+const pcre_uint8 *ustr2 = (pcre_uint8 *)str2;
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (*str1 != '\0' || *ustr2 != '\0')
+ {
+ c1 = RAWUCHARINC(str1);
+ c2 = (pcre_uchar)*ustr2++;
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+#endif /* COMPILE_PCRE32 */
+
+/* The following two functions compares two, fixed length
+strings. Basically an strncmp for non 8 bit characters.
+
+Arguments:
+ str1 first string
+ str2 second string
+ num size of the string
+
+Returns: 0 if both string are equal (like strcmp), 1 otherwise
+*/
+
+int
+PRIV(strncmp_uc_uc)(const pcre_uchar *str1, const pcre_uchar *str2, unsigned int num)
+{
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (num-- > 0)
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+int
+PRIV(strncmp_uc_c8)(const pcre_uchar *str1, const char *str2, unsigned int num)
+{
+const pcre_uint8 *ustr2 = (pcre_uint8 *)str2;
+pcre_uchar c1;
+pcre_uchar c2;
+
+while (num-- > 0)
+ {
+ c1 = *str1++;
+ c2 = (pcre_uchar)*ustr2++;
+ if (c1 != c2)
+ return ((c1 > c2) << 1) - 1;
+ }
+/* Both length and characters must be equal. */
+return 0;
+}
+
+/* The following function returns with the length of
+a zero terminated string. Basically an strlen for non 8 bit characters.
+
+Arguments:
+ str string
+
+Returns: length of the string
+*/
+
+unsigned int
+PRIV(strlen_uc)(const pcre_uchar *str)
+{
+unsigned int len = 0;
+while (*str++ != 0)
+ len++;
+return len;
+}
+
+#endif /* !COMPILE_PCRE8 */
+
+/* End of pcre_string_utils.c */
diff --git a/erts/emulator/pcre/pcre_study.c b/erts/emulator/pcre/pcre_study.c
index 25bd6bde07..3d8961ffb0 100644
--- a/erts/emulator/pcre/pcre_study.c
+++ b/erts/emulator/pcre/pcre_study.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_study(), along with local
+/* This module contains the external function pcre_study(), along with local
supporting functions. */
/* %ExternalCopyright% */
@@ -49,34 +49,644 @@ supporting functions. */
#include "pcre_internal.h"
+#define SET_BIT(c) start_bits[c/8] |= (1 << (c&7))
/* Returns from set_start_bits() */
-enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE };
+enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
+
+
+
+/*************************************************
+* Find the minimum subject length for a group *
+*************************************************/
+
+/* Scan a parenthesized group and compute the minimum length of subject that
+is needed to match it. This is a lower bound; it does not mean there is a
+string of that length that matches. In UTF8 mode, the result is in characters
+rather than bytes.
+
+Arguments:
+ code pointer to start of group (the bracket)
+ startcode pointer to start of the whole pattern
+ options the compiling options
+ int RECURSE depth
+
+Returns: the minimum length
+ -1 if \C in UTF-8 mode or (*ACCEPT) was encountered
+ -2 internal error (missing capturing bracket)
+ -3 internal error (opcode not listed)
+*/
+
+static int
+find_minlength(const pcre_uchar *code, const pcre_uchar *startcode, int options,
+ int recurse_depth)
+{
+int length = -1;
+/* PCRE_UTF16 has the same value as PCRE_UTF8. */
+BOOL utf = (options & PCRE_UTF8) != 0;
+BOOL had_recurse = FALSE;
+register int branchlength = 0;
+register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
+
+if (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
+
+/* Scan along the opcodes for this branch. If we get to the end of the
+branch, check the length against that of the other branches. */
+
+for (;;)
+ {
+ int d, min;
+ pcre_uchar *cs, *ce;
+ register pcre_uchar op = *cc;
+
+ switch (op)
+ {
+ case OP_COND:
+ case OP_SCOND:
+
+ /* If there is only one branch in a condition, the implied branch has zero
+ length, so we don't add anything. This covers the DEFINE "condition"
+ automatically. */
+
+ cs = cc + GET(cc, 1);
+ if (*cs != OP_ALT)
+ {
+ cc = cs + 1 + LINK_SIZE;
+ break;
+ }
+
+ /* Otherwise we can fall through and treat it the same as any other
+ subpattern. */
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ case OP_BRA:
+ case OP_SBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ d = find_minlength(cc, startcode, options, recurse_depth);
+ if (d < 0) return d;
+ branchlength += d;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* ACCEPT makes things far too complicated; we have to give up. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ return -1;
+
+ /* Reached end of a branch; if it's a ket it is the end of a nested
+ call. If it's ALT it is an alternation in a nested call. If it is END it's
+ the end of the outer call. All can be handled by the same code. If an
+ ACCEPT was previously encountered, use the length that was in force at that
+ time, and pass back the shortest ACCEPT length. */
+
+ case OP_ALT:
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_END:
+ if (length < 0 || (!had_recurse && branchlength < length))
+ length = branchlength;
+ if (op != OP_ALT) return length;
+ cc += 1 + LINK_SIZE;
+ branchlength = 0;
+ had_recurse = FALSE;
+ break;
+
+ /* Skip over assertive subpatterns */
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ /* Fall through */
+
+ /* Skip over things that don't match chars */
+
+ case OP_REVERSE:
+ case OP_CREF:
+ case OP_NCREF:
+ case OP_RREF:
+ case OP_NRREF:
+ case OP_DEF:
+ case OP_CALLOUT:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_EOD:
+ case OP_EODN:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ cc += PRIV(OP_lengths)[*cc];
+ break;
+
+ /* Skip over a subpattern that has a {0} or {0,x} quantifier */
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ case OP_SKIPZERO:
+ cc += PRIV(OP_lengths)[*cc];
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* Handle literal characters and + repetitions */
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ branchlength++;
+ cc += 2;
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
+ branchlength++;
+ cc += (cc[1] == OP_PROP || cc[1] == OP_NOTPROP)? 4 : 2;
+ break;
+
+ /* Handle exact repetitions. The count is already in characters, but we
+ need to skip over a multibyte character in UTF8 mode. */
+
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ branchlength += GET2(cc,1);
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ case OP_TYPEEXACT:
+ branchlength += GET2(cc,1);
+ cc += 2 + IMM2_SIZE + ((cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
+ break;
+
+ /* Handle single-char non-literal matchers */
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ cc += 2;
+ /* Fall through */
+
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_EXTUNI:
+ case OP_HSPACE:
+ case OP_NOT_HSPACE:
+ case OP_VSPACE:
+ case OP_NOT_VSPACE:
+ branchlength++;
+ cc++;
+ break;
+
+ /* "Any newline" might match two characters, but it also might match just
+ one. */
+
+ case OP_ANYNL:
+ branchlength += 1;
+ cc++;
+ break;
+
+ /* The single-byte matcher means we can't proceed in UTF-8 mode. (In
+ non-UTF-8 mode \C will actually be turned into OP_ALLANY, so won't ever
+ appear, but leave the code, just in case.) */
+
+ case OP_ANYBYTE:
+#ifdef SUPPORT_UTF
+ if (utf) return -1;
+#endif
+ branchlength++;
+ cc++;
+ break;
+
+ /* For repeated character types, we have to test for \p and \P, which have
+ an extra two bytes of parameters. */
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSQUERY:
+ if (cc[1] == OP_PROP || cc[1] == OP_NOTPROP) cc += 2;
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPOSUPTO:
+ if (cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP) cc += 2;
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ /* Check a class for variable quantification */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ case OP_XCLASS:
+ /* The original code caused an unsigned overflow in 64 bit systems,
+ so now we use a conditional statement. */
+ if (op == OP_XCLASS)
+ cc += GET(cc, 1);
+ else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#endif
+
+ switch (*cc)
+ {
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ branchlength++;
+ /* Fall through */
+
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ branchlength += GET2(cc,1);
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default:
+ branchlength++;
+ break;
+ }
+ break;
+
+ /* Backreferences and subroutine calls are treated in the same way: we find
+ the minimum length for the subpattern. A recursion, however, causes an
+ a flag to be set that causes the length of this branch to be ignored. The
+ logic is that a recursion can only make sense if there is another
+ alternation that stops the recursing. That will provide the minimum length
+ (when no recursion happens). A backreference within the group that it is
+ referencing behaves in the same way.
+
+ If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket
+ matches an empty string (by default it causes a matching failure), so in
+ that case we must set the minimum length to zero. */
+
+ case OP_REF:
+ case OP_REFI:
+ if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)
+ {
+ ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
+ if (cs == NULL) return -2;
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if (cc > cs && cc < ce)
+ {
+ d = 0;
+ had_recurse = TRUE;
+ }
+ else
+ {
+ d = find_minlength(cs, startcode, options, recurse_depth);
+ }
+ }
+ else d = 0;
+ cc += 1 + IMM2_SIZE;
+
+ /* Handle repeated back references */
+
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ min = 0;
+ cc++;
+ break;
+
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ min = 1;
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ min = GET2(cc, 1);
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default:
+ min = 1;
+ break;
+ }
+
+ branchlength += min * d;
+ break;
+
+ /* We can easily detect direct recursion, but not mutual recursion. This is
+ caught by a recursion depth count. */
+
+ case OP_RECURSE:
+ cs = ce = (pcre_uchar *)startcode + GET(cc, 1);
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if ((cc > cs && cc < ce) || recurse_depth > 10)
+ had_recurse = TRUE;
+ else
+ {
+ branchlength += find_minlength(cs, startcode, options, recurse_depth + 1);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* Anything else does not or need not match a character. We can get the
+ item's length from the table, but for those that can match zero occurrences
+ of a character, we must take special action for UTF-8 characters. As it
+ happens, the "NOT" versions of these opcodes are used at present only for
+ ASCII characters, so they could be omitted from this list. However, in
+ future that may change, so we include them here so as not to leave a
+ gotcha for a future maintainer. */
+
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+
+ case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+
+ cc += PRIV(OP_lengths)[op];
+#ifdef SUPPORT_UTF
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ /* Skip these, but we need to add in the name length. */
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ cc += PRIV(OP_lengths)[op] + cc[1];
+ break;
+
+ /* The remaining opcodes are just skipped over. */
+
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_FAIL:
+ case OP_PRUNE:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_THEN:
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ /* This should not occur: we list all opcodes explicitly so that when
+ new ones get added they are properly considered. */
+
+ default:
+ return -3;
+ }
+ }
+/* Control never gets here */
+}
+
/*************************************************
* Set a bit and maybe its alternate case *
*************************************************/
-/* Given a character, set its bit in the table, and also the bit for the other
-version of a letter if we are caseless.
+/* Given a character, set its first byte's bit in the table, and also the
+corresponding bit for the other version of a letter if we are caseless. In
+UTF-8 mode, for characters greater than 127, we can only do the caseless thing
+when Unicode property support is available.
Arguments:
start_bits points to the bit map
- c is the character
+ p points to the character
caseless the caseless flag
cd the block with char table pointers
+ utf TRUE for UTF-8 / UTF-16 / UTF-32 mode
-Returns: nothing
+Returns: pointer after the character
+*/
+
+static const pcre_uchar *
+set_table_bit(pcre_uint8 *start_bits, const pcre_uchar *p, BOOL caseless,
+ compile_data *cd, BOOL utf)
+{
+pcre_uint32 c = *p;
+
+#ifdef COMPILE_PCRE8
+SET_BIT(c);
+
+#ifdef SUPPORT_UTF
+if (utf && c > 127)
+ {
+ GETCHARINC(c, p);
+#ifdef SUPPORT_UCP
+ if (caseless)
+ {
+ pcre_uchar buff[6];
+ c = UCD_OTHERCASE(c);
+ (void)PRIV(ord2utf)(c, buff);
+ SET_BIT(buff[0]);
+ }
+#endif /* Not SUPPORT_UCP */
+ return p;
+ }
+#else /* Not SUPPORT_UTF */
+(void)(utf); /* Stops warning for unused parameter */
+#endif /* SUPPORT_UTF */
+
+/* Not UTF-8 mode, or character is less than 127. */
+
+if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
+return p + 1;
+#endif /* COMPILE_PCRE8 */
+
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+if (c > 0xff)
+ {
+ c = 0xff;
+ caseless = FALSE;
+ }
+SET_BIT(c);
+
+#ifdef SUPPORT_UTF
+if (utf && c > 127)
+ {
+ GETCHARINC(c, p);
+#ifdef SUPPORT_UCP
+ if (caseless)
+ {
+ c = UCD_OTHERCASE(c);
+ if (c > 0xff)
+ c = 0xff;
+ SET_BIT(c);
+ }
+#endif /* SUPPORT_UCP */
+ return p;
+ }
+#else /* Not SUPPORT_UTF */
+(void)(utf); /* Stops warning for unused parameter */
+#endif /* SUPPORT_UTF */
+
+if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
+return p + 1;
+#endif
+}
+
+
+
+/*************************************************
+* Set bits for a positive character type *
+*************************************************/
+
+/* This function sets starting bits for a character type. In UTF-8 mode, we can
+only do a direct setting for bytes less than 128, as otherwise there can be
+confusion with bytes in the middle of UTF-8 characters. In a "traditional"
+environment, the tables will only recognize ASCII characters anyway, but in at
+least one Windows environment, some higher bytes bits were set in the tables.
+So we deal with that case by considering the UTF-8 encoding.
+
+Arguments:
+ start_bits the starting bitmap
+ cbit type the type of character wanted
+ table_limit 32 for non-UTF-8; 16 for UTF-8
+ cd the block with char table pointers
+
+Returns: nothing
+*/
+
+static void
+set_type_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
+ compile_data *cd)
+{
+register pcre_uint32 c;
+for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type];
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+if (table_limit == 32) return;
+for (c = 128; c < 256; c++)
+ {
+ if ((cd->cbits[c/8] & (1 << (c&7))) != 0)
+ {
+ pcre_uchar buff[6];
+ (void)PRIV(ord2utf)(c, buff);
+ SET_BIT(buff[0]);
+ }
+ }
+#endif
+}
+
+
+/*************************************************
+* Set bits for a negative character type *
+*************************************************/
+
+/* This function sets starting bits for a negative character type such as \D.
+In UTF-8 mode, we can only do a direct setting for bytes less than 128, as
+otherwise there can be confusion with bytes in the middle of UTF-8 characters.
+Unlike in the positive case, where we can set appropriate starting bits for
+specific high-valued UTF-8 characters, in this case we have to set the bits for
+all high-valued characters. The lowest is 0xc2, but we overkill by starting at
+0xc0 (192) for simplicity.
+
+Arguments:
+ start_bits the starting bitmap
+ cbit type the type of character wanted
+ table_limit 32 for non-UTF-8; 16 for UTF-8
+ cd the block with char table pointers
+
+Returns: nothing
*/
static void
-set_bit(uschar *start_bits, unsigned int c, BOOL caseless, compile_data *cd)
+set_nottype_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
+ compile_data *cd)
{
-start_bits[c/8] |= (1 << (c&7));
-if (caseless && (cd->ctypes[c] & ctype_letter) != 0)
- start_bits[cd->fcc[c]/8] |= (1 << (cd->fcc[c]&7));
+register pcre_uint32 c;
+for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type];
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff;
+#endif
}
@@ -96,21 +706,26 @@ function fails unless the result is SSB_DONE.
Arguments:
code points to an expression
start_bits points to a 32-byte table, initialized to 0
- caseless the current state of the caseless flag
- utf8 TRUE if in UTF-8 mode
+ utf TRUE if in UTF-8 / UTF-16 / UTF-32 mode
cd the block with char table pointers
Returns: SSB_FAIL => Failed to find any starting bytes
SSB_DONE => Found mandatory starting bytes
SSB_CONTINUE => Found optional starting bytes
+ SSB_UNKNOWN => Hit an unrecognized opcode
*/
static int
-set_start_bits(const uschar *code, uschar *start_bits, BOOL caseless,
- BOOL utf8, compile_data *cd)
+set_start_bits(const pcre_uchar *code, pcre_uint8 *start_bits, BOOL utf,
+ compile_data *cd)
{
-register int c;
+register pcre_uint32 c;
int yield = SSB_DONE;
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+int table_limit = utf? 16:32;
+#else
+int table_limit = 32;
+#endif
#if 0
/* ========================================================================= */
@@ -131,19 +746,108 @@ volatile int dummy;
do
{
- const uschar *tcode = code + (((int)*code == OP_CBRA)? 3:1) + LINK_SIZE;
BOOL try_next = TRUE;
+ const pcre_uchar *tcode = code + 1 + LINK_SIZE;
+
+ if (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS) tcode += IMM2_SIZE;
while (try_next) /* Loop for items in this branch */
{
int rc;
+
switch(*tcode)
{
- /* Fail if we reach something we don't understand */
+ /* If we reach something we don't understand, it means a new opcode has
+ been created that hasn't been added to this code. Hopefully this problem
+ will be discovered during testing. */
default:
+ return SSB_UNKNOWN;
+
+ /* Fail for a valid opcode that implies no starting bits. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ case OP_ALLANY:
+ case OP_ANY:
+ case OP_ANYBYTE:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_COND:
+ case OP_CREF:
+ case OP_DEF:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_END:
+ case OP_EOD:
+ case OP_EODN:
+ case OP_EXTUNI:
+ case OP_FAIL:
+ case OP_MARK:
+ case OP_NCREF:
+ case OP_NOT:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_NOTI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_NOTPROP:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_NOT_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_NRREF:
+ case OP_PROP:
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_RECURSE:
+ case OP_REF:
+ case OP_REFI:
+ case OP_REVERSE:
+ case OP_RREF:
+ case OP_SCOND:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_THEN:
+ case OP_THEN_ARG:
+#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
+ case OP_XCLASS:
+#endif
return SSB_FAIL;
+ /* We can ignore word boundary tests. */
+
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ tcode++;
+ break;
+
/* If we hit a bracket or a positive lookahead assertion, recurse to set
bits from within the subpattern. If it can't find anything, we have to
give up. If it finds some mandatory character(s), we are done for this
@@ -153,10 +857,15 @@ do
case OP_SBRA:
case OP_CBRA:
case OP_SCBRA:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
case OP_ONCE:
+ case OP_ONCE_NC:
case OP_ASSERT:
- rc = set_start_bits(tcode, start_bits, caseless, utf8, cd);
- if (rc == SSB_FAIL) return SSB_FAIL;
+ rc = set_start_bits(tcode, start_bits, utf, cd);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
if (rc == SSB_DONE) try_next = FALSE; else
{
do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
@@ -179,6 +888,7 @@ do
case OP_KET:
case OP_KETRMAX:
case OP_KETRMIN:
+ case OP_KETRPOS:
return SSB_CONTINUE;
/* Skip over callout */
@@ -196,19 +906,13 @@ do
tcode += 1 + LINK_SIZE;
break;
- /* Skip over an option setting, changing the caseless flag */
-
- case OP_OPT:
- caseless = (tcode[1] & PCRE_CASELESS) != 0;
- tcode += 2;
- break;
-
/* BRAZERO does the bracket, but carries on. */
case OP_BRAZERO:
case OP_BRAMINZERO:
- if (set_start_bits(++tcode, start_bits, caseless, utf8, cd) == SSB_FAIL)
- return SSB_FAIL;
+ case OP_BRAPOSZERO:
+ rc = set_start_bits(++tcode, start_bits, utf, cd);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
/* =========================================================================
See the comment at the head of this function concerning the next line,
which was an old fudge for the benefit of OS/2.
@@ -218,6 +922,14 @@ do
tcode += 1 + LINK_SIZE;
break;
+ /* SKIPZERO skips the bracket. */
+
+ case OP_SKIPZERO:
+ tcode++;
+ do tcode += GET(tcode,1); while (*tcode == OP_ALT);
+ tcode += 1 + LINK_SIZE;
+ break;
+
/* Single-char * or ? sets the bit and tries the next item */
case OP_STAR:
@@ -226,12 +938,16 @@ do
case OP_QUERY:
case OP_MINQUERY:
case OP_POSQUERY:
- set_bit(start_bits, tcode[1], caseless, cd);
- tcode += 2;
-#ifdef SUPPORT_UTF8
- if (utf8 && tcode[-1] >= 0xc0)
- tcode += _erts_pcre_utf8_table4[tcode[-1] & 0x3f];
-#endif
+ tcode = set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
+ break;
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ tcode = set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
break;
/* Single-char upto sets the bit and tries the next */
@@ -239,77 +955,145 @@ do
case OP_UPTO:
case OP_MINUPTO:
case OP_POSUPTO:
- set_bit(start_bits, tcode[3], caseless, cd);
- tcode += 4;
-#ifdef SUPPORT_UTF8
- if (utf8 && tcode[-1] >= 0xc0)
- tcode += _erts_pcre_utf8_table4[tcode[-1] & 0x3f];
-#endif
+ tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, FALSE, cd, utf);
break;
- /* At least one single char sets the bit and stops */
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, TRUE, cd, utf);
+ break;
- case OP_EXACT: /* Fall through */
- tcode += 2;
+ /* At least one single char sets the bit and stops */
+ case OP_EXACT:
+ tcode += IMM2_SIZE;
+ /* Fall through */
case OP_CHAR:
- case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
case OP_POSPLUS:
- set_bit(start_bits, tcode[1], caseless, cd);
+ (void)set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
try_next = FALSE;
break;
- /* Single character type sets the bits and stops */
+ case OP_EXACTI:
+ tcode += IMM2_SIZE;
+ /* Fall through */
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ (void)set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
+ try_next = FALSE;
+ break;
+
+ /* Special spacing and line-terminating items. These recognize specific
+ lists of characters. The difference between VSPACE and ANYNL is that the
+ latter can match the two-character CRLF sequence, but that is not
+ relevant for finding the first character, so their code here is
+ identical. */
+
+ case OP_HSPACE:
+ SET_BIT(CHAR_HT);
+ SET_BIT(CHAR_SPACE);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+#ifdef COMPILE_PCRE8
+ SET_BIT(0xC2); /* For U+00A0 */
+ SET_BIT(0xE1); /* For U+1680, U+180E */
+ SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
+ SET_BIT(0xE3); /* For U+3000 */
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(0xA0);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif /* COMPILE_PCRE[8|16|32] */
+ }
+ else
+#endif /* SUPPORT_UTF */
+ {
+#ifndef EBCDIC
+ SET_BIT(0xA0);
+#endif /* Not EBCDIC */
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif /* COMPILE_PCRE[16|32] */
+ }
+ try_next = FALSE;
+ break;
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ SET_BIT(CHAR_LF);
+ SET_BIT(CHAR_VT);
+ SET_BIT(CHAR_FF);
+ SET_BIT(CHAR_CR);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+#ifdef COMPILE_PCRE8
+ SET_BIT(0xC2); /* For U+0085 */
+ SET_BIT(0xE2); /* For U+2028, U+2029 */
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(CHAR_NEL);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif /* COMPILE_PCRE[8|16|32] */
+ }
+ else
+#endif /* SUPPORT_UTF */
+ {
+ SET_BIT(CHAR_NEL);
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
+ }
+ try_next = FALSE;
+ break;
+
+ /* Single character types set the bits and stop. Note that if PCRE_UCP
+ is set, we do not see these op codes because \d etc are converted to
+ properties. Therefore, these apply in the case when only characters less
+ than 256 are recognized to match the types. */
case OP_NOT_DIGIT:
- for (c = 0; c < 32; c++)
- start_bits[c] |= ~cd->cbits[c+cbit_digit];
+ set_nottype_bits(start_bits, cbit_digit, table_limit, cd);
try_next = FALSE;
break;
case OP_DIGIT:
- for (c = 0; c < 32; c++)
- start_bits[c] |= cd->cbits[c+cbit_digit];
+ set_type_bits(start_bits, cbit_digit, table_limit, cd);
try_next = FALSE;
break;
/* The cbit_space table has vertical tab as whitespace; we have to
- discard it. */
+ ensure it is set as not whitespace. Luckily, the code value is the same
+ (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate bit. */
case OP_NOT_WHITESPACE:
- for (c = 0; c < 32; c++)
- {
- int d = cd->cbits[c+cbit_space];
- if (c == 1) d &= ~0x08;
- start_bits[c] |= ~d;
- }
+ set_nottype_bits(start_bits, cbit_space, table_limit, cd);
+ start_bits[1] |= 0x08;
try_next = FALSE;
break;
- /* The cbit_space table has vertical tab as whitespace; we have to
- discard it. */
+ /* The cbit_space table has vertical tab as whitespace; we have to not
+ set it from the table. Luckily, the code value is the same (0x0b) in
+ ASCII and EBCDIC, so we can just adjust the appropriate bit. */
case OP_WHITESPACE:
- for (c = 0; c < 32; c++)
- {
- int d = cd->cbits[c+cbit_space];
- if (c == 1) d &= ~0x08;
- start_bits[c] |= d;
- }
+ c = start_bits[1]; /* Save in case it was already set */
+ set_type_bits(start_bits, cbit_space, table_limit, cd);
+ start_bits[1] = (start_bits[1] & ~0x08) | c;
try_next = FALSE;
break;
case OP_NOT_WORDCHAR:
- for (c = 0; c < 32; c++)
- start_bits[c] |= ~cd->cbits[c+cbit_word];
+ set_nottype_bits(start_bits, cbit_word, table_limit, cd);
try_next = FALSE;
break;
case OP_WORDCHAR:
- for (c = 0; c < 32; c++)
- start_bits[c] |= cd->cbits[c+cbit_word];
+ set_type_bits(start_bits, cbit_word, table_limit, cd);
try_next = FALSE;
break;
@@ -318,11 +1102,12 @@ do
case OP_TYPEPLUS:
case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
tcode++;
break;
case OP_TYPEEXACT:
- tcode += 3;
+ tcode += 1 + IMM2_SIZE;
break;
/* Zero or more repeats of character types set the bits and then
@@ -331,7 +1116,7 @@ do
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
case OP_TYPEPOSUPTO:
- tcode += 2; /* Fall through */
+ tcode += IMM2_SIZE; /* Fall through */
case OP_TYPESTAR:
case OP_TYPEMINSTAR:
@@ -341,51 +1126,90 @@ do
case OP_TYPEPOSQUERY:
switch(tcode[1])
{
+ default:
case OP_ANY:
+ case OP_ALLANY:
return SSB_FAIL;
+ case OP_HSPACE:
+ SET_BIT(CHAR_HT);
+ SET_BIT(CHAR_SPACE);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+#ifdef COMPILE_PCRE8
+ SET_BIT(0xC2); /* For U+00A0 */
+ SET_BIT(0xE1); /* For U+1680, U+180E */
+ SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
+ SET_BIT(0xE3); /* For U+3000 */
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(0xA0);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif /* COMPILE_PCRE[8|16|32] */
+ }
+ else
+#endif /* SUPPORT_UTF */
+#ifndef EBCDIC
+ SET_BIT(0xA0);
+#endif /* Not EBCDIC */
+ break;
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ SET_BIT(CHAR_LF);
+ SET_BIT(CHAR_VT);
+ SET_BIT(CHAR_FF);
+ SET_BIT(CHAR_CR);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+#ifdef COMPILE_PCRE8
+ SET_BIT(0xC2); /* For U+0085 */
+ SET_BIT(0xE2); /* For U+2028, U+2029 */
+#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(CHAR_NEL);
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif /* COMPILE_PCRE16 */
+ }
+ else
+#endif /* SUPPORT_UTF */
+ SET_BIT(CHAR_NEL);
+ break;
+
case OP_NOT_DIGIT:
- for (c = 0; c < 32; c++)
- start_bits[c] |= ~cd->cbits[c+cbit_digit];
+ set_nottype_bits(start_bits, cbit_digit, table_limit, cd);
break;
case OP_DIGIT:
- for (c = 0; c < 32; c++)
- start_bits[c] |= cd->cbits[c+cbit_digit];
+ set_type_bits(start_bits, cbit_digit, table_limit, cd);
break;
/* The cbit_space table has vertical tab as whitespace; we have to
- discard it. */
+ ensure it gets set as not whitespace. Luckily, the code value is the
+ same (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate
+ bit. */
case OP_NOT_WHITESPACE:
- for (c = 0; c < 32; c++)
- {
- int d = cd->cbits[c+cbit_space];
- if (c == 1) d &= ~0x08;
- start_bits[c] |= ~d;
- }
+ set_nottype_bits(start_bits, cbit_space, table_limit, cd);
+ start_bits[1] |= 0x08;
break;
/* The cbit_space table has vertical tab as whitespace; we have to
- discard it. */
+ avoid setting it. Luckily, the code value is the same (0x0b) in ASCII
+ and EBCDIC, so we can just adjust the appropriate bit. */
case OP_WHITESPACE:
- for (c = 0; c < 32; c++)
- {
- int d = cd->cbits[c+cbit_space];
- if (c == 1) d &= ~0x08;
- start_bits[c] |= d;
- }
+ c = start_bits[1]; /* Save in case it was already set */
+ set_type_bits(start_bits, cbit_space, table_limit, cd);
+ start_bits[1] = (start_bits[1] & ~0x08) | c;
break;
case OP_NOT_WORDCHAR:
- for (c = 0; c < 32; c++)
- start_bits[c] |= ~cd->cbits[c+cbit_word];
+ set_nottype_bits(start_bits, cbit_word, table_limit, cd);
break;
case OP_WORDCHAR:
- for (c = 0; c < 32; c++)
- start_bits[c] |= cd->cbits[c+cbit_word];
+ set_type_bits(start_bits, cbit_word, table_limit, cd);
break;
}
@@ -399,18 +1223,23 @@ do
character with a value > 255. */
case OP_NCLASS:
-#ifdef SUPPORT_UTF8
- if (utf8)
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ if (utf)
{
start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */
memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */
}
#endif
+#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
+ SET_BIT(0xFF); /* For characters > 255 */
+#endif
/* Fall through */
case OP_CLASS:
{
+ pcre_uint8 *map;
tcode++;
+ map = (pcre_uint8 *)tcode;
/* In UTF-8 mode, the bits in a bit map correspond to character
values, not to byte values. However, the bit map we are constructing is
@@ -418,13 +1247,13 @@ do
value is > 127. In fact, there are only two possible starting bytes for
characters in the range 128 - 255. */
-#ifdef SUPPORT_UTF8
- if (utf8)
+#if defined SUPPORT_UTF && defined COMPILE_PCRE8
+ if (utf)
{
- for (c = 0; c < 16; c++) start_bits[c] |= tcode[c];
+ for (c = 0; c < 16; c++) start_bits[c] |= map[c];
for (c = 128; c < 256; c++)
{
- if ((tcode[c/8] && (1 << (c&7))) != 0)
+ if ((map[c/8] && (1 << (c&7))) != 0)
{
int d = (c >> 6) | 0xc0; /* Set bit for this starter */
start_bits[d/8] |= (1 << (d&7)); /* and then skip on to the */
@@ -432,18 +1261,17 @@ do
}
}
}
-
- /* In non-UTF-8 mode, the two bit maps are completely compatible. */
-
else
#endif
{
- for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];
+ /* In non-UTF-8 mode, the two bit maps are completely compatible. */
+ for (c = 0; c < 32; c++) start_bits[c] |= map[c];
}
- /* Advance past the bit map, and act on what follows */
+ /* Advance past the bit map, and act on what follows. For a zero
+ minimum repeat, continue; otherwise stop processing. */
- tcode += 32;
+ tcode += 32 / sizeof(pcre_uchar);
switch (*tcode)
{
case OP_CRSTAR:
@@ -455,7 +1283,7 @@ do
case OP_CRRANGE:
case OP_CRMINRANGE:
- if (((tcode[1] << 8) + tcode[2]) == 0) tcode += 5;
+ if (GET2(tcode, 1) == 0) tcode += 1 + 2 * IMM2_SIZE;
else try_next = FALSE;
break;
@@ -477,12 +1305,14 @@ return yield;
+
+
/*************************************************
* Study a compiled expression *
*************************************************/
/* This function is handed a compiled expression that it must study to produce
-information that will speed up the matching. It returns a pcre_extra block
+information that will speed up the matching. It returns a pcre[16]_extra block
which then gets handed back to pcre_exec().
Arguments:
@@ -491,21 +1321,36 @@ Arguments:
errorptr points to where to place error messages;
set NULL unless error
-Returns: pointer to a pcre_extra block, with study_data filled in and the
- appropriate flag set;
+Returns: pointer to a pcre[16]_extra block, with study_data filled in and
+ the appropriate flags set;
NULL on error or if no optimization possible
*/
-PCRE_EXP_DEFN pcre_extra *
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN erts_pcre_extra * PCRE_CALL_CONVENTION
erts_pcre_study(const pcre *external_re, int options, const char **errorptr)
+#else
+PCRE_EXP_DEFN pcre_extra * PCRE_CALL_CONVENTION
+pcre_study(const pcre *external_re, int options, const char **errorptr)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN pcre16_extra * PCRE_CALL_CONVENTION
+pcre16_study(const pcre16 *external_re, int options, const char **errorptr)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN pcre32_extra * PCRE_CALL_CONVENTION
+pcre32_study(const pcre32 *external_re, int options, const char **errorptr)
+#endif
{
-uschar start_bits[32];
-pcre_extra *extra;
+int min;
+BOOL bits_set = FALSE;
+pcre_uint8 start_bits[32];
+PUBL(extra) *extra = NULL;
pcre_study_data *study;
-const uschar *tables;
-uschar *code;
+const pcre_uint8 *tables;
+pcre_uchar *code;
compile_data compile_block;
-const real_pcre *re = (const real_pcre *)external_re;
+const REAL_PCRE *re = (const REAL_PCRE *)external_re;
*errorptr = NULL;
@@ -515,66 +1360,224 @@ if (re == NULL || re->magic_number != MAGIC_NUMBER)
return NULL;
}
+if ((re->flags & PCRE_MODE) == 0)
+ {
+#if defined COMPILE_PCRE8
+ *errorptr = "argument not compiled in 8 bit mode";
+#elif defined COMPILE_PCRE16
+ *errorptr = "argument not compiled in 16 bit mode";
+#elif defined COMPILE_PCRE32
+ *errorptr = "argument not compiled in 32 bit mode";
+#endif
+ return NULL;
+ }
+
if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)
{
*errorptr = "unknown or incorrect option bit(s) set";
return NULL;
}
-code = (uschar *)re + re->name_table_offset +
+code = (pcre_uchar *)re + re->name_table_offset +
(re->name_count * re->name_entry_size);
/* For an anchored pattern, or an unanchored pattern that has a first char, or
-a multiline pattern that matches only at "line starts", no further processing
-at present. */
+a multiline pattern that matches only at "line starts", there is no point in
+seeking a list of starting bytes. */
-if ((re->options & PCRE_ANCHORED) != 0 ||
- (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)
- return NULL;
+if ((re->options & PCRE_ANCHORED) == 0 &&
+ (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) == 0)
+ {
+ int rc;
-/* Set the character tables in the block that is passed around */
+ /* Set the character tables in the block that is passed around */
-tables = re->tables;
-if (tables == NULL)
- (void)erts_pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
- (void *)(&tables));
+ tables = re->tables;
-compile_block.lcc = tables + lcc_offset;
-compile_block.fcc = tables + fcc_offset;
-compile_block.cbits = tables + cbits_offset;
-compile_block.ctypes = tables + ctypes_offset;
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+ if (tables == NULL)
+ (void)erts_pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
+ (void *)(&tables));
+#else
+ if (tables == NULL)
+ (void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
+ (void *)(&tables));
+#endif
+#elif defined COMPILE_PCRE16
+ if (tables == NULL)
+ (void)pcre16_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
+ (void *)(&tables));
+#elif defined COMPILE_PCRE32
+ if (tables == NULL)
+ (void)pcre32_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
+ (void *)(&tables));
+#endif
-/* See if we can find a fixed set of initial characters for the pattern. */
+ compile_block.lcc = tables + lcc_offset;
+ compile_block.fcc = tables + fcc_offset;
+ compile_block.cbits = tables + cbits_offset;
+ compile_block.ctypes = tables + ctypes_offset;
-memset(start_bits, 0, 32 * sizeof(uschar));
-if (set_start_bits(code, start_bits, (re->options & PCRE_CASELESS) != 0,
- (re->options & PCRE_UTF8) != 0, &compile_block) != SSB_DONE) return NULL;
+ /* See if we can find a fixed set of initial characters for the pattern. */
-/* Get a pcre_extra block and a pcre_study_data block. The study data is put in
-the latter, which is pointed to by the former, which may also get additional
-data set later by the calling program. At the moment, the size of
-pcre_study_data is fixed. We nevertheless save it in a field for returning via
-the erts_pcre_fullinfo() function so that if it becomes variable in the future, we
-don't have to change that code. */
+ memset(start_bits, 0, 32 * sizeof(pcre_uint8));
+ rc = set_start_bits(code, start_bits, (re->options & PCRE_UTF8) != 0,
+ &compile_block);
+ bits_set = rc == SSB_DONE;
+ if (rc == SSB_UNKNOWN)
+ {
+ *errorptr = "internal error: opcode not recognized";
+ return NULL;
+ }
+ }
-extra = (pcre_extra *)(erts_pcre_malloc)
- (sizeof(pcre_extra) + sizeof(pcre_study_data));
+/* Find the minimum length of subject string. */
-if (extra == NULL)
+switch(min = find_minlength(code, code, re->options, 0))
{
- *errorptr = "failed to get memory";
- return NULL;
+ case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
+ case -3: *errorptr = "internal error: opcode not recognized"; return NULL;
+ default: break;
}
-study = (pcre_study_data *)((char *)extra + sizeof(pcre_extra));
-extra->flags = PCRE_EXTRA_STUDY_DATA;
-extra->study_data = study;
+/* If a set of starting bytes has been identified, or if the minimum length is
+greater than zero, or if JIT optimization has been requested, or if
+PCRE_STUDY_EXTRA_NEEDED is set, get a pcre[16]_extra block and a
+pcre_study_data block. The study data is put in the latter, which is pointed to
+by the former, which may also get additional data set later by the calling
+program. At the moment, the size of pcre_study_data is fixed. We nevertheless
+save it in a field for returning via the pcre_fullinfo() function so that if it
+becomes variable in the future, we don't have to change that code. */
+
+if (bits_set || min > 0 || (options & (
+#ifdef SUPPORT_JIT
+ PCRE_STUDY_JIT_COMPILE | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |
+ PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |
+#endif
+ PCRE_STUDY_EXTRA_NEEDED)) != 0)
+ {
+ extra = (PUBL(extra) *)(PUBL(malloc))
+ (sizeof(PUBL(extra)) + sizeof(pcre_study_data));
+ if (extra == NULL)
+ {
+ *errorptr = "failed to get memory";
+ return NULL;
+ }
+
+ study = (pcre_study_data *)((char *)extra + sizeof(PUBL(extra)));
+ extra->flags = PCRE_EXTRA_STUDY_DATA;
+ extra->study_data = study;
+
+ study->size = sizeof(pcre_study_data);
+ study->flags = 0;
-study->size = sizeof(pcre_study_data);
-study->options = PCRE_STUDY_MAPPED;
-memcpy(study->start_bits, start_bits, sizeof(start_bits));
+ /* Set the start bits always, to avoid unset memory errors if the
+ study data is written to a file, but set the flag only if any of the bits
+ are set, to save time looking when none are. */
+
+ if (bits_set)
+ {
+ study->flags |= PCRE_STUDY_MAPPED;
+ memcpy(study->start_bits, start_bits, sizeof(start_bits));
+ }
+ else memset(study->start_bits, 0, 32 * sizeof(pcre_uint8));
+
+#ifdef PCRE_DEBUG
+ if (bits_set)
+ {
+ pcre_uint8 *ptr = start_bits;
+ int i;
+
+ printf("Start bits:\n");
+ for (i = 0; i < 32; i++)
+ printf("%3d: %02x%s", i * 8, *ptr++, ((i + 1) & 0x7) != 0? " " : "\n");
+ }
+#endif
+
+ /* Always set the minlength value in the block, because the JIT compiler
+ makes use of it. However, don't set the bit unless the length is greater than
+ zero - the interpretive pcre_exec() and pcre_dfa_exec() needn't waste time
+ checking the zero case. */
+
+ if (min > 0)
+ {
+ study->flags |= PCRE_STUDY_MINLEN;
+ study->minlength = min;
+ }
+ else study->minlength = 0;
+
+ /* If JIT support was compiled and requested, attempt the JIT compilation.
+ If no starting bytes were found, and the minimum length is zero, and JIT
+ compilation fails, abandon the extra block and return NULL, unless
+ PCRE_STUDY_EXTRA_NEEDED is set. */
+
+#ifdef SUPPORT_JIT
+ extra->executable_jit = NULL;
+ if ((options & PCRE_STUDY_JIT_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_COMPILE);
+ if ((options & PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_PARTIAL_SOFT_COMPILE);
+ if ((options & PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE) != 0)
+ PRIV(jit_compile)(re, extra, JIT_PARTIAL_HARD_COMPILE);
+
+ if (study->flags == 0 && (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) == 0 &&
+ (options & PCRE_STUDY_EXTRA_NEEDED) == 0)
+ {
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+ erts_pcre_free_study(extra);
+#else
+ pcre_free_study(extra);
+#endif
+#elif defined COMPILE_PCRE16
+ pcre16_free_study(extra);
+#elif defined COMPILE_PCRE32
+ pcre32_free_study(extra);
+#endif
+ extra = NULL;
+ }
+#endif
+ }
return extra;
}
+
+/*************************************************
+* Free the study data *
+*************************************************/
+
+/* This function frees the memory that was obtained by pcre_study().
+
+Argument: a pointer to the pcre[16]_extra block
+Returns: nothing
+*/
+
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN void
+erts_pcre_free_study(erts_pcre_extra *extra)
+#else
+PCRE_EXP_DEFN void
+pcre_free_study(pcre_extra *extra)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN void
+pcre16_free_study(pcre16_extra *extra)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN void
+pcre32_free_study(pcre32_extra *extra)
+#endif
+{
+if (extra == NULL)
+ return;
+#ifdef SUPPORT_JIT
+if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
+ extra->executable_jit != NULL)
+ PRIV(jit_free)(extra->executable_jit);
+#endif
+PUBL(free)(extra);
+}
+
/* End of pcre_study.c */
diff --git a/erts/emulator/pcre/pcre_tables.c b/erts/emulator/pcre/pcre_tables.c
index 72772de1dc..7be23babe0 100644
--- a/erts/emulator/pcre/pcre_tables.c
+++ b/erts/emulator/pcre/pcre_tables.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -37,10 +37,11 @@ POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
+#ifndef PCRE_INCLUDED
/* This module contains some fixed tables that are used by more than one of the
PCRE code modules. The tables are also #included by the pcretest program, which
-uses macros to change their names from _erts_pcre_xxx to xxxx, thereby avoiding name
+uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
clashes with the library. */
/* %ExternalCopyright% */
@@ -51,11 +52,18 @@ clashes with the library. */
#include "pcre_internal.h"
+#endif /* PCRE_INCLUDED */
/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
the definition is next to the definition of the opcodes in pcre_internal.h. */
-const uschar _erts_pcre_OP_lengths[] = { OP_LENGTHS };
+const pcre_uint8 PRIV(OP_lengths)[] = { OP_LENGTHS };
+
+/* Tables of horizontal and vertical whitespace characters, suitable for
+adding to classes. */
+
+const pcre_uint32 PRIV(hspace_list)[] = { HSPACE_LIST };
+const pcre_uint32 PRIV(vspace_list)[] = { VSPACE_LIST };
@@ -66,28 +74,123 @@ const uschar _erts_pcre_OP_lengths[] = { OP_LENGTHS };
/* These are the breakpoints for different numbers of bytes in a UTF-8
character. */
-#ifdef SUPPORT_UTF8
+#if (defined SUPPORT_UTF && defined COMPILE_PCRE8) \
+ || (defined PCRE_INCLUDED && (defined SUPPORT_PCRE16 || defined SUPPORT_PCRE32))
-const int _erts_pcre_utf8_table1[] =
+/* These tables are also required by pcretest in 16- or 32-bit mode. */
+
+const int PRIV(utf8_table1)[] =
{ 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
-const int _erts_pcre_utf8_table1_size = sizeof(_erts_pcre_utf8_table1)/sizeof(int);
+const int PRIV(utf8_table1_size) = sizeof(PRIV(utf8_table1)) / sizeof(int);
/* These are the indicator bits and the mask for the data bits to set in the
first byte of a character, indexed by the number of additional bytes. */
-const int _erts_pcre_utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
-const int _erts_pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+const int PRIV(utf8_table2)[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
+const int PRIV(utf8_table3)[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
/* Table of the number of extra bytes, indexed by the first byte masked with
0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
-const uschar _erts_pcre_utf8_table4[] = {
+const pcre_uint8 PRIV(utf8_table4)[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
+#endif /* (SUPPORT_UTF && COMPILE_PCRE8) || (PCRE_INCLUDED && SUPPORT_PCRE[16|32])*/
+
+#ifdef SUPPORT_UTF
+
+/* Table to translate from particular type value to the general value. */
+
+const pcre_uint32 PRIV(ucp_gentype)[] = {
+ ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */
+ ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */
+ ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */
+ ucp_N, ucp_N, ucp_N, /* Nd, Nl, No */
+ ucp_P, ucp_P, ucp_P, ucp_P, ucp_P, /* Pc, Pd, Pe, Pf, Pi */
+ ucp_P, ucp_P, /* Ps, Po */
+ ucp_S, ucp_S, ucp_S, ucp_S, /* Sc, Sk, Sm, So */
+ ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */
+};
+
+/* This table encodes the rules for finding the end of an extended grapheme
+cluster. Every code point has a grapheme break property which is one of the
+ucp_gbXX values defined in ucp.h. The 2-dimensional table is indexed by the
+properties of two adjacent code points. The left property selects a word from
+the table, and the right property selects a bit from that word like this:
+
+ ucp_gbtable[left-property] & (1 << right-property)
+
+The value is non-zero if a grapheme break is NOT permitted between the relevant
+two code points. The breaking rules are as follows:
+
+1. Break at the start and end of text (pretty obviously).
+
+2. Do not break between a CR and LF; otherwise, break before and after
+ controls.
+
+3. Do not break Hangul syllable sequences, the rules for which are:
+
+ L may be followed by L, V, LV or LVT
+ LV or V may be followed by V or T
+ LVT or T may be followed by T
+
+4. Do not break before extending characters.
+
+The next two rules are only for extended grapheme clusters (but that's what we
+are implementing).
+
+5. Do not break before SpacingMarks.
+
+6. Do not break after Prepend characters.
+
+7. Otherwise, break everywhere.
+*/
+
+const pcre_uint32 PRIV(ucp_gbtable[]) = {
+ (1<<ucp_gbLF), /* 0 CR */
+ 0, /* 1 LF */
+ 0, /* 2 Control */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark), /* 3 Extend */
+ (1<<ucp_gbExtend)|(1<<ucp_gbPrepend)| /* 4 Prepend */
+ (1<<ucp_gbSpacingMark)|(1<<ucp_gbL)|
+ (1<<ucp_gbV)|(1<<ucp_gbT)|(1<<ucp_gbLV)|
+ (1<<ucp_gbLVT)|(1<<ucp_gbOther),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark), /* 5 SpacingMark */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbL)| /* 6 L */
+ (1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbLV)|(1<<ucp_gbLVT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)| /* 7 V */
+ (1<<ucp_gbT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT), /* 8 T */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)| /* 9 LV */
+ (1<<ucp_gbT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT), /* 10 LVT */
+ (1<<ucp_gbRegionalIndicator), /* 11 RegionalIndicator */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark) /* 12 Other */
+};
+
+#ifdef SUPPORT_JIT
+/* This table reverses PRIV(ucp_gentype). We can save the cost
+of a memory load. */
+
+const int PRIV(ucp_typerange)[] = {
+ ucp_Cc, ucp_Cs,
+ ucp_Ll, ucp_Lu,
+ ucp_Mc, ucp_Mn,
+ ucp_Nd, ucp_No,
+ ucp_Pc, ucp_Ps,
+ ucp_Sc, ucp_So,
+ ucp_Zl, ucp_Zs,
+};
+#endif /* SUPPORT_JIT */
+
/* The pcre_utt[] table below translates Unicode property names into type and
code values. It is searched by binary chop, so must be in collating sequence of
name. Originally, the table contained pointers to the name strings in the first
@@ -95,225 +198,462 @@ field of each entry. However, that leads to a large number of relocations when
a shared library is dynamically loaded. A significant reduction is made by
putting all the names into a single, large string and then using offsets in the
table itself. Maintenance is more error-prone, but frequent changes to this
-data is unlikely. */
-
-const char _erts_pcre_utt_names[] =
- "Any\0"
- "Arabic\0"
- "Armenian\0"
- "Balinese\0"
- "Bengali\0"
- "Bopomofo\0"
- "Braille\0"
- "Buginese\0"
- "Buhid\0"
- "C\0"
- "Canadian_Aboriginal\0"
- "Cc\0"
- "Cf\0"
- "Cherokee\0"
- "Cn\0"
- "Co\0"
- "Common\0"
- "Coptic\0"
- "Cs\0"
- "Cuneiform\0"
- "Cypriot\0"
- "Cyrillic\0"
- "Deseret\0"
- "Devanagari\0"
- "Ethiopic\0"
- "Georgian\0"
- "Glagolitic\0"
- "Gothic\0"
- "Greek\0"
- "Gujarati\0"
- "Gurmukhi\0"
- "Han\0"
- "Hangul\0"
- "Hanunoo\0"
- "Hebrew\0"
- "Hiragana\0"
- "Inherited\0"
- "Kannada\0"
- "Katakana\0"
- "Kharoshthi\0"
- "Khmer\0"
- "L\0"
- "L&\0"
- "Lao\0"
- "Latin\0"
- "Limbu\0"
- "Linear_B\0"
- "Ll\0"
- "Lm\0"
- "Lo\0"
- "Lt\0"
- "Lu\0"
- "M\0"
- "Malayalam\0"
- "Mc\0"
- "Me\0"
- "Mn\0"
- "Mongolian\0"
- "Myanmar\0"
- "N\0"
- "Nd\0"
- "New_Tai_Lue\0"
- "Nko\0"
- "Nl\0"
- "No\0"
- "Ogham\0"
- "Old_Italic\0"
- "Old_Persian\0"
- "Oriya\0"
- "Osmanya\0"
- "P\0"
- "Pc\0"
- "Pd\0"
- "Pe\0"
- "Pf\0"
- "Phags_Pa\0"
- "Phoenician\0"
- "Pi\0"
- "Po\0"
- "Ps\0"
- "Runic\0"
- "S\0"
- "Sc\0"
- "Shavian\0"
- "Sinhala\0"
- "Sk\0"
- "Sm\0"
- "So\0"
- "Syloti_Nagri\0"
- "Syriac\0"
- "Tagalog\0"
- "Tagbanwa\0"
- "Tai_Le\0"
- "Tamil\0"
- "Telugu\0"
- "Thaana\0"
- "Thai\0"
- "Tibetan\0"
- "Tifinagh\0"
- "Ugaritic\0"
- "Yi\0"
- "Z\0"
- "Zl\0"
- "Zp\0"
- "Zs\0";
-
-const ucp_type_table _erts_pcre_utt[] = {
- { 0, PT_ANY, 0 },
- { 4, PT_SC, ucp_Arabic },
- { 11, PT_SC, ucp_Armenian },
- { 20, PT_SC, ucp_Balinese },
- { 29, PT_SC, ucp_Bengali },
- { 37, PT_SC, ucp_Bopomofo },
- { 46, PT_SC, ucp_Braille },
- { 54, PT_SC, ucp_Buginese },
- { 63, PT_SC, ucp_Buhid },
- { 69, PT_GC, ucp_C },
- { 71, PT_SC, ucp_Canadian_Aboriginal },
- { 91, PT_PC, ucp_Cc },
- { 94, PT_PC, ucp_Cf },
- { 97, PT_SC, ucp_Cherokee },
- { 106, PT_PC, ucp_Cn },
- { 109, PT_PC, ucp_Co },
- { 112, PT_SC, ucp_Common },
- { 119, PT_SC, ucp_Coptic },
- { 126, PT_PC, ucp_Cs },
- { 129, PT_SC, ucp_Cuneiform },
- { 139, PT_SC, ucp_Cypriot },
- { 147, PT_SC, ucp_Cyrillic },
- { 156, PT_SC, ucp_Deseret },
- { 164, PT_SC, ucp_Devanagari },
- { 175, PT_SC, ucp_Ethiopic },
- { 184, PT_SC, ucp_Georgian },
- { 193, PT_SC, ucp_Glagolitic },
- { 204, PT_SC, ucp_Gothic },
- { 211, PT_SC, ucp_Greek },
- { 217, PT_SC, ucp_Gujarati },
- { 226, PT_SC, ucp_Gurmukhi },
- { 235, PT_SC, ucp_Han },
- { 239, PT_SC, ucp_Hangul },
- { 246, PT_SC, ucp_Hanunoo },
- { 254, PT_SC, ucp_Hebrew },
- { 261, PT_SC, ucp_Hiragana },
- { 270, PT_SC, ucp_Inherited },
- { 280, PT_SC, ucp_Kannada },
- { 288, PT_SC, ucp_Katakana },
- { 297, PT_SC, ucp_Kharoshthi },
- { 308, PT_SC, ucp_Khmer },
- { 314, PT_GC, ucp_L },
- { 316, PT_LAMP, 0 },
- { 319, PT_SC, ucp_Lao },
- { 323, PT_SC, ucp_Latin },
- { 329, PT_SC, ucp_Limbu },
- { 335, PT_SC, ucp_Linear_B },
- { 344, PT_PC, ucp_Ll },
- { 347, PT_PC, ucp_Lm },
- { 350, PT_PC, ucp_Lo },
- { 353, PT_PC, ucp_Lt },
- { 356, PT_PC, ucp_Lu },
- { 359, PT_GC, ucp_M },
- { 361, PT_SC, ucp_Malayalam },
- { 371, PT_PC, ucp_Mc },
- { 374, PT_PC, ucp_Me },
- { 377, PT_PC, ucp_Mn },
- { 380, PT_SC, ucp_Mongolian },
- { 390, PT_SC, ucp_Myanmar },
- { 398, PT_GC, ucp_N },
- { 400, PT_PC, ucp_Nd },
- { 403, PT_SC, ucp_New_Tai_Lue },
- { 415, PT_SC, ucp_Nko },
- { 419, PT_PC, ucp_Nl },
- { 422, PT_PC, ucp_No },
- { 425, PT_SC, ucp_Ogham },
- { 431, PT_SC, ucp_Old_Italic },
- { 442, PT_SC, ucp_Old_Persian },
- { 454, PT_SC, ucp_Oriya },
- { 460, PT_SC, ucp_Osmanya },
- { 468, PT_GC, ucp_P },
- { 470, PT_PC, ucp_Pc },
- { 473, PT_PC, ucp_Pd },
- { 476, PT_PC, ucp_Pe },
- { 479, PT_PC, ucp_Pf },
- { 482, PT_SC, ucp_Phags_Pa },
- { 491, PT_SC, ucp_Phoenician },
- { 502, PT_PC, ucp_Pi },
- { 505, PT_PC, ucp_Po },
- { 508, PT_PC, ucp_Ps },
- { 511, PT_SC, ucp_Runic },
- { 517, PT_GC, ucp_S },
- { 519, PT_PC, ucp_Sc },
- { 522, PT_SC, ucp_Shavian },
- { 530, PT_SC, ucp_Sinhala },
- { 538, PT_PC, ucp_Sk },
- { 541, PT_PC, ucp_Sm },
- { 544, PT_PC, ucp_So },
- { 547, PT_SC, ucp_Syloti_Nagri },
- { 560, PT_SC, ucp_Syriac },
- { 567, PT_SC, ucp_Tagalog },
- { 575, PT_SC, ucp_Tagbanwa },
- { 584, PT_SC, ucp_Tai_Le },
- { 591, PT_SC, ucp_Tamil },
- { 597, PT_SC, ucp_Telugu },
- { 604, PT_SC, ucp_Thaana },
- { 611, PT_SC, ucp_Thai },
- { 616, PT_SC, ucp_Tibetan },
- { 624, PT_SC, ucp_Tifinagh },
- { 633, PT_SC, ucp_Ugaritic },
- { 642, PT_SC, ucp_Yi },
- { 645, PT_GC, ucp_Z },
- { 647, PT_PC, ucp_Zl },
- { 650, PT_PC, ucp_Zp },
- { 653, PT_PC, ucp_Zs }
+data are unlikely.
+
+July 2008: There is now a script called maint/GenerateUtt.py that can be used
+to generate this data automatically instead of maintaining it by hand.
+
+The script was updated in March 2009 to generate a new EBCDIC-compliant
+version. Like all other character and string literals that are compared against
+the regular expression pattern, we must use STR_ macros instead of literal
+strings to make sure that UTF-8 support works on EBCDIC platforms. */
+
+#define STRING_Any0 STR_A STR_n STR_y "\0"
+#define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0"
+#define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0"
+#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0"
+#define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0"
+#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0"
+#define STRING_Batak0 STR_B STR_a STR_t STR_a STR_k "\0"
+#define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0"
+#define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0"
+#define STRING_Brahmi0 STR_B STR_r STR_a STR_h STR_m STR_i "\0"
+#define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0"
+#define STRING_Buginese0 STR_B STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0"
+#define STRING_Buhid0 STR_B STR_u STR_h STR_i STR_d "\0"
+#define STRING_C0 STR_C "\0"
+#define STRING_Canadian_Aboriginal0 STR_C STR_a STR_n STR_a STR_d STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_b STR_o STR_r STR_i STR_g STR_i STR_n STR_a STR_l "\0"
+#define STRING_Carian0 STR_C STR_a STR_r STR_i STR_a STR_n "\0"
+#define STRING_Cc0 STR_C STR_c "\0"
+#define STRING_Cf0 STR_C STR_f "\0"
+#define STRING_Chakma0 STR_C STR_h STR_a STR_k STR_m STR_a "\0"
+#define STRING_Cham0 STR_C STR_h STR_a STR_m "\0"
+#define STRING_Cherokee0 STR_C STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0"
+#define STRING_Cn0 STR_C STR_n "\0"
+#define STRING_Co0 STR_C STR_o "\0"
+#define STRING_Common0 STR_C STR_o STR_m STR_m STR_o STR_n "\0"
+#define STRING_Coptic0 STR_C STR_o STR_p STR_t STR_i STR_c "\0"
+#define STRING_Cs0 STR_C STR_s "\0"
+#define STRING_Cuneiform0 STR_C STR_u STR_n STR_e STR_i STR_f STR_o STR_r STR_m "\0"
+#define STRING_Cypriot0 STR_C STR_y STR_p STR_r STR_i STR_o STR_t "\0"
+#define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0"
+#define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0"
+#define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0"
+#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0"
+#define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0"
+#define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0"
+#define STRING_Gothic0 STR_G STR_o STR_t STR_h STR_i STR_c "\0"
+#define STRING_Greek0 STR_G STR_r STR_e STR_e STR_k "\0"
+#define STRING_Gujarati0 STR_G STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0"
+#define STRING_Gurmukhi0 STR_G STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0"
+#define STRING_Han0 STR_H STR_a STR_n "\0"
+#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0"
+#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0"
+#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0"
+#define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0"
+#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0"
+#define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0"
+#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0"
+#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0"
+#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0"
+#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0"
+#define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0"
+#define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0"
+#define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0"
+#define STRING_Kharoshthi0 STR_K STR_h STR_a STR_r STR_o STR_s STR_h STR_t STR_h STR_i "\0"
+#define STRING_Khmer0 STR_K STR_h STR_m STR_e STR_r "\0"
+#define STRING_L0 STR_L "\0"
+#define STRING_L_AMPERSAND0 STR_L STR_AMPERSAND "\0"
+#define STRING_Lao0 STR_L STR_a STR_o "\0"
+#define STRING_Latin0 STR_L STR_a STR_t STR_i STR_n "\0"
+#define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0"
+#define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0"
+#define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0"
+#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0"
+#define STRING_Ll0 STR_L STR_l "\0"
+#define STRING_Lm0 STR_L STR_m "\0"
+#define STRING_Lo0 STR_L STR_o "\0"
+#define STRING_Lt0 STR_L STR_t "\0"
+#define STRING_Lu0 STR_L STR_u "\0"
+#define STRING_Lycian0 STR_L STR_y STR_c STR_i STR_a STR_n "\0"
+#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0"
+#define STRING_M0 STR_M "\0"
+#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0"
+#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0"
+#define STRING_Mc0 STR_M STR_c "\0"
+#define STRING_Me0 STR_M STR_e "\0"
+#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0"
+#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0"
+#define STRING_Meroitic_Hieroglyphs0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Miao0 STR_M STR_i STR_a STR_o "\0"
+#define STRING_Mn0 STR_M STR_n "\0"
+#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
+#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0"
+#define STRING_N0 STR_N "\0"
+#define STRING_Nd0 STR_N STR_d "\0"
+#define STRING_New_Tai_Lue0 STR_N STR_e STR_w STR_UNDERSCORE STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_u STR_e "\0"
+#define STRING_Nko0 STR_N STR_k STR_o "\0"
+#define STRING_Nl0 STR_N STR_l "\0"
+#define STRING_No0 STR_N STR_o "\0"
+#define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0"
+#define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0"
+#define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0"
+#define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0"
+#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
+#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0"
+#define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0"
+#define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0"
+#define STRING_P0 STR_P "\0"
+#define STRING_Pc0 STR_P STR_c "\0"
+#define STRING_Pd0 STR_P STR_d "\0"
+#define STRING_Pe0 STR_P STR_e "\0"
+#define STRING_Pf0 STR_P STR_f "\0"
+#define STRING_Phags_Pa0 STR_P STR_h STR_a STR_g STR_s STR_UNDERSCORE STR_P STR_a "\0"
+#define STRING_Phoenician0 STR_P STR_h STR_o STR_e STR_n STR_i STR_c STR_i STR_a STR_n "\0"
+#define STRING_Pi0 STR_P STR_i "\0"
+#define STRING_Po0 STR_P STR_o "\0"
+#define STRING_Ps0 STR_P STR_s "\0"
+#define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0"
+#define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0"
+#define STRING_S0 STR_S "\0"
+#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0"
+#define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0"
+#define STRING_Sc0 STR_S STR_c "\0"
+#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0"
+#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0"
+#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0"
+#define STRING_Sk0 STR_S STR_k "\0"
+#define STRING_Sm0 STR_S STR_m "\0"
+#define STRING_So0 STR_S STR_o "\0"
+#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0"
+#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
+#define STRING_Syloti_Nagri0 STR_S STR_y STR_l STR_o STR_t STR_i STR_UNDERSCORE STR_N STR_a STR_g STR_r STR_i "\0"
+#define STRING_Syriac0 STR_S STR_y STR_r STR_i STR_a STR_c "\0"
+#define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0"
+#define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0"
+#define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0"
+#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0"
+#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0"
+#define STRING_Takri0 STR_T STR_a STR_k STR_r STR_i "\0"
+#define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0"
+#define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0"
+#define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0"
+#define STRING_Thai0 STR_T STR_h STR_a STR_i "\0"
+#define STRING_Tibetan0 STR_T STR_i STR_b STR_e STR_t STR_a STR_n "\0"
+#define STRING_Tifinagh0 STR_T STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0"
+#define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0"
+#define STRING_Vai0 STR_V STR_a STR_i "\0"
+#define STRING_Xan0 STR_X STR_a STR_n "\0"
+#define STRING_Xps0 STR_X STR_p STR_s "\0"
+#define STRING_Xsp0 STR_X STR_s STR_p "\0"
+#define STRING_Xuc0 STR_X STR_u STR_c "\0"
+#define STRING_Xwd0 STR_X STR_w STR_d "\0"
+#define STRING_Yi0 STR_Y STR_i "\0"
+#define STRING_Z0 STR_Z "\0"
+#define STRING_Zl0 STR_Z STR_l "\0"
+#define STRING_Zp0 STR_Z STR_p "\0"
+#define STRING_Zs0 STR_Z STR_s "\0"
+
+const char PRIV(utt_names)[] =
+ STRING_Any0
+ STRING_Arabic0
+ STRING_Armenian0
+ STRING_Avestan0
+ STRING_Balinese0
+ STRING_Bamum0
+ STRING_Batak0
+ STRING_Bengali0
+ STRING_Bopomofo0
+ STRING_Brahmi0
+ STRING_Braille0
+ STRING_Buginese0
+ STRING_Buhid0
+ STRING_C0
+ STRING_Canadian_Aboriginal0
+ STRING_Carian0
+ STRING_Cc0
+ STRING_Cf0
+ STRING_Chakma0
+ STRING_Cham0
+ STRING_Cherokee0
+ STRING_Cn0
+ STRING_Co0
+ STRING_Common0
+ STRING_Coptic0
+ STRING_Cs0
+ STRING_Cuneiform0
+ STRING_Cypriot0
+ STRING_Cyrillic0
+ STRING_Deseret0
+ STRING_Devanagari0
+ STRING_Egyptian_Hieroglyphs0
+ STRING_Ethiopic0
+ STRING_Georgian0
+ STRING_Glagolitic0
+ STRING_Gothic0
+ STRING_Greek0
+ STRING_Gujarati0
+ STRING_Gurmukhi0
+ STRING_Han0
+ STRING_Hangul0
+ STRING_Hanunoo0
+ STRING_Hebrew0
+ STRING_Hiragana0
+ STRING_Imperial_Aramaic0
+ STRING_Inherited0
+ STRING_Inscriptional_Pahlavi0
+ STRING_Inscriptional_Parthian0
+ STRING_Javanese0
+ STRING_Kaithi0
+ STRING_Kannada0
+ STRING_Katakana0
+ STRING_Kayah_Li0
+ STRING_Kharoshthi0
+ STRING_Khmer0
+ STRING_L0
+ STRING_L_AMPERSAND0
+ STRING_Lao0
+ STRING_Latin0
+ STRING_Lepcha0
+ STRING_Limbu0
+ STRING_Linear_B0
+ STRING_Lisu0
+ STRING_Ll0
+ STRING_Lm0
+ STRING_Lo0
+ STRING_Lt0
+ STRING_Lu0
+ STRING_Lycian0
+ STRING_Lydian0
+ STRING_M0
+ STRING_Malayalam0
+ STRING_Mandaic0
+ STRING_Mc0
+ STRING_Me0
+ STRING_Meetei_Mayek0
+ STRING_Meroitic_Cursive0
+ STRING_Meroitic_Hieroglyphs0
+ STRING_Miao0
+ STRING_Mn0
+ STRING_Mongolian0
+ STRING_Myanmar0
+ STRING_N0
+ STRING_Nd0
+ STRING_New_Tai_Lue0
+ STRING_Nko0
+ STRING_Nl0
+ STRING_No0
+ STRING_Ogham0
+ STRING_Ol_Chiki0
+ STRING_Old_Italic0
+ STRING_Old_Persian0
+ STRING_Old_South_Arabian0
+ STRING_Old_Turkic0
+ STRING_Oriya0
+ STRING_Osmanya0
+ STRING_P0
+ STRING_Pc0
+ STRING_Pd0
+ STRING_Pe0
+ STRING_Pf0
+ STRING_Phags_Pa0
+ STRING_Phoenician0
+ STRING_Pi0
+ STRING_Po0
+ STRING_Ps0
+ STRING_Rejang0
+ STRING_Runic0
+ STRING_S0
+ STRING_Samaritan0
+ STRING_Saurashtra0
+ STRING_Sc0
+ STRING_Sharada0
+ STRING_Shavian0
+ STRING_Sinhala0
+ STRING_Sk0
+ STRING_Sm0
+ STRING_So0
+ STRING_Sora_Sompeng0
+ STRING_Sundanese0
+ STRING_Syloti_Nagri0
+ STRING_Syriac0
+ STRING_Tagalog0
+ STRING_Tagbanwa0
+ STRING_Tai_Le0
+ STRING_Tai_Tham0
+ STRING_Tai_Viet0
+ STRING_Takri0
+ STRING_Tamil0
+ STRING_Telugu0
+ STRING_Thaana0
+ STRING_Thai0
+ STRING_Tibetan0
+ STRING_Tifinagh0
+ STRING_Ugaritic0
+ STRING_Vai0
+ STRING_Xan0
+ STRING_Xps0
+ STRING_Xsp0
+ STRING_Xuc0
+ STRING_Xwd0
+ STRING_Yi0
+ STRING_Z0
+ STRING_Zl0
+ STRING_Zp0
+ STRING_Zs0;
+
+const ucp_type_table PRIV(utt)[] = {
+ { 0, PT_ANY, 0 },
+ { 4, PT_SC, ucp_Arabic },
+ { 11, PT_SC, ucp_Armenian },
+ { 20, PT_SC, ucp_Avestan },
+ { 28, PT_SC, ucp_Balinese },
+ { 37, PT_SC, ucp_Bamum },
+ { 43, PT_SC, ucp_Batak },
+ { 49, PT_SC, ucp_Bengali },
+ { 57, PT_SC, ucp_Bopomofo },
+ { 66, PT_SC, ucp_Brahmi },
+ { 73, PT_SC, ucp_Braille },
+ { 81, PT_SC, ucp_Buginese },
+ { 90, PT_SC, ucp_Buhid },
+ { 96, PT_GC, ucp_C },
+ { 98, PT_SC, ucp_Canadian_Aboriginal },
+ { 118, PT_SC, ucp_Carian },
+ { 125, PT_PC, ucp_Cc },
+ { 128, PT_PC, ucp_Cf },
+ { 131, PT_SC, ucp_Chakma },
+ { 138, PT_SC, ucp_Cham },
+ { 143, PT_SC, ucp_Cherokee },
+ { 152, PT_PC, ucp_Cn },
+ { 155, PT_PC, ucp_Co },
+ { 158, PT_SC, ucp_Common },
+ { 165, PT_SC, ucp_Coptic },
+ { 172, PT_PC, ucp_Cs },
+ { 175, PT_SC, ucp_Cuneiform },
+ { 185, PT_SC, ucp_Cypriot },
+ { 193, PT_SC, ucp_Cyrillic },
+ { 202, PT_SC, ucp_Deseret },
+ { 210, PT_SC, ucp_Devanagari },
+ { 221, PT_SC, ucp_Egyptian_Hieroglyphs },
+ { 242, PT_SC, ucp_Ethiopic },
+ { 251, PT_SC, ucp_Georgian },
+ { 260, PT_SC, ucp_Glagolitic },
+ { 271, PT_SC, ucp_Gothic },
+ { 278, PT_SC, ucp_Greek },
+ { 284, PT_SC, ucp_Gujarati },
+ { 293, PT_SC, ucp_Gurmukhi },
+ { 302, PT_SC, ucp_Han },
+ { 306, PT_SC, ucp_Hangul },
+ { 313, PT_SC, ucp_Hanunoo },
+ { 321, PT_SC, ucp_Hebrew },
+ { 328, PT_SC, ucp_Hiragana },
+ { 337, PT_SC, ucp_Imperial_Aramaic },
+ { 354, PT_SC, ucp_Inherited },
+ { 364, PT_SC, ucp_Inscriptional_Pahlavi },
+ { 386, PT_SC, ucp_Inscriptional_Parthian },
+ { 409, PT_SC, ucp_Javanese },
+ { 418, PT_SC, ucp_Kaithi },
+ { 425, PT_SC, ucp_Kannada },
+ { 433, PT_SC, ucp_Katakana },
+ { 442, PT_SC, ucp_Kayah_Li },
+ { 451, PT_SC, ucp_Kharoshthi },
+ { 462, PT_SC, ucp_Khmer },
+ { 468, PT_GC, ucp_L },
+ { 470, PT_LAMP, 0 },
+ { 473, PT_SC, ucp_Lao },
+ { 477, PT_SC, ucp_Latin },
+ { 483, PT_SC, ucp_Lepcha },
+ { 490, PT_SC, ucp_Limbu },
+ { 496, PT_SC, ucp_Linear_B },
+ { 505, PT_SC, ucp_Lisu },
+ { 510, PT_PC, ucp_Ll },
+ { 513, PT_PC, ucp_Lm },
+ { 516, PT_PC, ucp_Lo },
+ { 519, PT_PC, ucp_Lt },
+ { 522, PT_PC, ucp_Lu },
+ { 525, PT_SC, ucp_Lycian },
+ { 532, PT_SC, ucp_Lydian },
+ { 539, PT_GC, ucp_M },
+ { 541, PT_SC, ucp_Malayalam },
+ { 551, PT_SC, ucp_Mandaic },
+ { 559, PT_PC, ucp_Mc },
+ { 562, PT_PC, ucp_Me },
+ { 565, PT_SC, ucp_Meetei_Mayek },
+ { 578, PT_SC, ucp_Meroitic_Cursive },
+ { 595, PT_SC, ucp_Meroitic_Hieroglyphs },
+ { 616, PT_SC, ucp_Miao },
+ { 621, PT_PC, ucp_Mn },
+ { 624, PT_SC, ucp_Mongolian },
+ { 634, PT_SC, ucp_Myanmar },
+ { 642, PT_GC, ucp_N },
+ { 644, PT_PC, ucp_Nd },
+ { 647, PT_SC, ucp_New_Tai_Lue },
+ { 659, PT_SC, ucp_Nko },
+ { 663, PT_PC, ucp_Nl },
+ { 666, PT_PC, ucp_No },
+ { 669, PT_SC, ucp_Ogham },
+ { 675, PT_SC, ucp_Ol_Chiki },
+ { 684, PT_SC, ucp_Old_Italic },
+ { 695, PT_SC, ucp_Old_Persian },
+ { 707, PT_SC, ucp_Old_South_Arabian },
+ { 725, PT_SC, ucp_Old_Turkic },
+ { 736, PT_SC, ucp_Oriya },
+ { 742, PT_SC, ucp_Osmanya },
+ { 750, PT_GC, ucp_P },
+ { 752, PT_PC, ucp_Pc },
+ { 755, PT_PC, ucp_Pd },
+ { 758, PT_PC, ucp_Pe },
+ { 761, PT_PC, ucp_Pf },
+ { 764, PT_SC, ucp_Phags_Pa },
+ { 773, PT_SC, ucp_Phoenician },
+ { 784, PT_PC, ucp_Pi },
+ { 787, PT_PC, ucp_Po },
+ { 790, PT_PC, ucp_Ps },
+ { 793, PT_SC, ucp_Rejang },
+ { 800, PT_SC, ucp_Runic },
+ { 806, PT_GC, ucp_S },
+ { 808, PT_SC, ucp_Samaritan },
+ { 818, PT_SC, ucp_Saurashtra },
+ { 829, PT_PC, ucp_Sc },
+ { 832, PT_SC, ucp_Sharada },
+ { 840, PT_SC, ucp_Shavian },
+ { 848, PT_SC, ucp_Sinhala },
+ { 856, PT_PC, ucp_Sk },
+ { 859, PT_PC, ucp_Sm },
+ { 862, PT_PC, ucp_So },
+ { 865, PT_SC, ucp_Sora_Sompeng },
+ { 878, PT_SC, ucp_Sundanese },
+ { 888, PT_SC, ucp_Syloti_Nagri },
+ { 901, PT_SC, ucp_Syriac },
+ { 908, PT_SC, ucp_Tagalog },
+ { 916, PT_SC, ucp_Tagbanwa },
+ { 925, PT_SC, ucp_Tai_Le },
+ { 932, PT_SC, ucp_Tai_Tham },
+ { 941, PT_SC, ucp_Tai_Viet },
+ { 950, PT_SC, ucp_Takri },
+ { 956, PT_SC, ucp_Tamil },
+ { 962, PT_SC, ucp_Telugu },
+ { 969, PT_SC, ucp_Thaana },
+ { 976, PT_SC, ucp_Thai },
+ { 981, PT_SC, ucp_Tibetan },
+ { 989, PT_SC, ucp_Tifinagh },
+ { 998, PT_SC, ucp_Ugaritic },
+ { 1007, PT_SC, ucp_Vai },
+ { 1011, PT_ALNUM, 0 },
+ { 1015, PT_PXSPACE, 0 },
+ { 1019, PT_SPACE, 0 },
+ { 1023, PT_UCNC, 0 },
+ { 1027, PT_WORD, 0 },
+ { 1031, PT_SC, ucp_Yi },
+ { 1034, PT_GC, ucp_Z },
+ { 1036, PT_PC, ucp_Zl },
+ { 1039, PT_PC, ucp_Zp },
+ { 1042, PT_PC, ucp_Zs }
};
-const int _erts_pcre_utt_size = sizeof(_erts_pcre_utt)/sizeof(ucp_type_table);
+const int PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
-#endif /* SUPPORT_UTF8 */
+#endif /* SUPPORT_UTF */
/* End of pcre_tables.c */
diff --git a/erts/emulator/pcre/pcre_try_flipped.c b/erts/emulator/pcre/pcre_try_flipped.c
deleted file mode 100644
index 7b6c85cb26..0000000000
--- a/erts/emulator/pcre/pcre_try_flipped.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains an internal function that tests a compiled pattern to
-see if it was compiled with the opposite endianness. If so, it uses an
-auxiliary local function to flip the appropriate bytes. */
-
-/* %ExternalCopyright% */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-* Flip bytes in an integer *
-*************************************************/
-
-/* This function is called when the magic number in a regex doesn't match, in
-order to flip its bytes to see if we are dealing with a pattern that was
-compiled on a host of different endianness. If so, this function is used to
-flip other byte values.
-
-Arguments:
- value the number to flip
- n the number of bytes to flip (assumed to be 2 or 4)
-
-Returns: the flipped value
-*/
-
-static unsigned long int
-byteflip(unsigned long int value, int n)
-{
-if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8);
-return ((value & 0x000000ff) << 24) |
- ((value & 0x0000ff00) << 8) |
- ((value & 0x00ff0000) >> 8) |
- ((value & 0xff000000) >> 24);
-}
-
-
-
-/*************************************************
-* Test for a byte-flipped compiled regex *
-*************************************************/
-
-/* This function is called from pcre_exec(), pcre_dfa_exec(), and also from
-pcre_fullinfo(). Its job is to test whether the regex is byte-flipped - that
-is, it was compiled on a system of opposite endianness. The function is called
-only when the native MAGIC_NUMBER test fails. If the regex is indeed flipped,
-we flip all the relevant values into a different data block, and return it.
-
-Arguments:
- re points to the regex
- study points to study data, or NULL
- internal_re points to a new regex block
- internal_study points to a new study block
-
-Returns: the new block if is is indeed a byte-flipped regex
- NULL if it is not
-*/
-
-real_pcre *
-_erts_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,
- const pcre_study_data *study, pcre_study_data *internal_study)
-{
-if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
- return NULL;
-
-*internal_re = *re; /* To copy other fields */
-internal_re->size = byteflip(re->size, sizeof(re->size));
-internal_re->options = byteflip(re->options, sizeof(re->options));
-internal_re->flags = (pcre_uint16)byteflip(re->flags, sizeof(re->flags));
-internal_re->top_bracket =
- (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));
-internal_re->top_backref =
- (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref));
-internal_re->first_byte =
- (pcre_uint16)byteflip(re->first_byte, sizeof(re->first_byte));
-internal_re->req_byte =
- (pcre_uint16)byteflip(re->req_byte, sizeof(re->req_byte));
-internal_re->name_table_offset =
- (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset));
-internal_re->name_entry_size =
- (pcre_uint16)byteflip(re->name_entry_size, sizeof(re->name_entry_size));
-internal_re->name_count =
- (pcre_uint16)byteflip(re->name_count, sizeof(re->name_count));
-
-if (study != NULL)
- {
- *internal_study = *study; /* To copy other fields */
- internal_study->size = byteflip(study->size, sizeof(study->size));
- internal_study->options = byteflip(study->options, sizeof(study->options));
- }
-
-return internal_re;
-}
-
-/* End of pcre_tryflipped.c */
diff --git a/erts/emulator/pcre/pcre_ucd.c b/erts/emulator/pcre/pcre_ucd.c
new file mode 100644
index 0000000000..bdbc73c245
--- /dev/null
+++ b/erts/emulator/pcre/pcre_ucd.c
@@ -0,0 +1,3298 @@
+/* This module is generated by the maint/MultiStage2.py script.
+Do not modify it by hand. Instead modify the script and run it
+to regenerate this code.
+
+As well as being part of the PCRE library, this module is #included
+by the pcretest program, which redefines the PRIV macro to change
+table names from _pcre_xxx to xxxx, thereby avoiding name clashes
+with the library. At present, just one of these tables is actually
+needed. */
+/* %ExternalCopyright% */
+#ifndef PCRE_INCLUDED
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre_internal.h"
+
+#endif /* PCRE_INCLUDED */
+
+/* Unicode character database. */
+/* This file was autogenerated by the MultiStage2.py script. */
+/* Total size: 65696 bytes, block size: 128. */
+
+/* The tables herein are needed only when UCP support is built
+into PCRE. This module should not be referenced otherwise, so
+it should not matter whether it is compiled or not. However
+a comment was received about space saving - maybe the guy linked
+all the modules rather than using a library - so we include a
+condition to cut out the tables when not needed. But don't leave
+a totally empty module because some compilers barf at that.
+Instead, just supply small dummy tables. */
+
+#ifndef SUPPORT_UCP
+const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0 }};
+const pcre_uint8 PRIV(ucd_stage1)[] = {0};
+const pcre_uint16 PRIV(ucd_stage2)[] = {0};
+const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0};
+#else
+
+/* When recompiling tables with a new Unicode version, please check the
+types in this structure definition from pcre_internal.h (the actual
+field names will be different):
+
+typedef struct {
+pcre_uint8 property_0;
+pcre_uint8 property_1;
+pcre_uint8 property_2;
+pcre_uint8 property_3;
+pcre_int32 property_4;
+} ucd_record;
+*/
+
+
+const pcre_uint32 PRIV(ucd_caseless_sets)[] = {
+ NOTACHAR,
+ 0x0053, 0x0073, 0x017f, NOTACHAR,
+ 0x01c4, 0x01c5, 0x01c6, NOTACHAR,
+ 0x01c7, 0x01c8, 0x01c9, NOTACHAR,
+ 0x01ca, 0x01cb, 0x01cc, NOTACHAR,
+ 0x01f1, 0x01f2, 0x01f3, NOTACHAR,
+ 0x0345, 0x0399, 0x03b9, 0x1fbe, NOTACHAR,
+ 0x00b5, 0x039c, 0x03bc, NOTACHAR,
+ 0x03a3, 0x03c2, 0x03c3, NOTACHAR,
+ 0x0392, 0x03b2, 0x03d0, NOTACHAR,
+ 0x0398, 0x03b8, 0x03d1, 0x03f4, NOTACHAR,
+ 0x03a6, 0x03c6, 0x03d5, NOTACHAR,
+ 0x03a0, 0x03c0, 0x03d6, NOTACHAR,
+ 0x039a, 0x03ba, 0x03f0, NOTACHAR,
+ 0x03a1, 0x03c1, 0x03f1, NOTACHAR,
+ 0x0395, 0x03b5, 0x03f5, NOTACHAR,
+ 0x1e60, 0x1e61, 0x1e9b, NOTACHAR,
+ 0x03a9, 0x03c9, 0x2126, NOTACHAR,
+ 0x004b, 0x006b, 0x212a, NOTACHAR,
+ 0x00c5, 0x00e5, 0x212b, NOTACHAR,
+};
+
+/* When #included in pcretest, we don't need this large table. */
+
+#ifndef PCRE_INCLUDED
+
+const ucd_record PRIV(ucd_records)[] = { /* 5024 bytes, record size 8 */
+ { 9, 0, 2, 0, 0, }, /* 0 */
+ { 9, 0, 1, 0, 0, }, /* 1 */
+ { 9, 0, 0, 0, 0, }, /* 2 */
+ { 9, 29, 12, 0, 0, }, /* 3 */
+ { 9, 21, 12, 0, 0, }, /* 4 */
+ { 9, 23, 12, 0, 0, }, /* 5 */
+ { 9, 22, 12, 0, 0, }, /* 6 */
+ { 9, 18, 12, 0, 0, }, /* 7 */
+ { 9, 25, 12, 0, 0, }, /* 8 */
+ { 9, 17, 12, 0, 0, }, /* 9 */
+ { 9, 13, 12, 0, 0, }, /* 10 */
+ { 33, 9, 12, 0, 32, }, /* 11 */
+ { 33, 9, 12, 71, 32, }, /* 12 */
+ { 33, 9, 12, 1, 32, }, /* 13 */
+ { 9, 24, 12, 0, 0, }, /* 14 */
+ { 9, 16, 12, 0, 0, }, /* 15 */
+ { 33, 5, 12, 0, -32, }, /* 16 */
+ { 33, 5, 12, 71, -32, }, /* 17 */
+ { 33, 5, 12, 1, -32, }, /* 18 */
+ { 9, 26, 12, 0, 0, }, /* 19 */
+ { 33, 7, 12, 0, 0, }, /* 20 */
+ { 9, 20, 12, 0, 0, }, /* 21 */
+ { 9, 1, 2, 0, 0, }, /* 22 */
+ { 9, 15, 12, 0, 0, }, /* 23 */
+ { 9, 5, 12, 26, 775, }, /* 24 */
+ { 9, 19, 12, 0, 0, }, /* 25 */
+ { 33, 9, 12, 75, 32, }, /* 26 */
+ { 33, 5, 12, 0, 7615, }, /* 27 */
+ { 33, 5, 12, 75, -32, }, /* 28 */
+ { 33, 5, 12, 0, 121, }, /* 29 */
+ { 33, 9, 12, 0, 1, }, /* 30 */
+ { 33, 5, 12, 0, -1, }, /* 31 */
+ { 33, 9, 12, 0, 0, }, /* 32 */
+ { 33, 5, 12, 0, 0, }, /* 33 */
+ { 33, 9, 12, 0, -121, }, /* 34 */
+ { 33, 5, 12, 1, -268, }, /* 35 */
+ { 33, 5, 12, 0, 195, }, /* 36 */
+ { 33, 9, 12, 0, 210, }, /* 37 */
+ { 33, 9, 12, 0, 206, }, /* 38 */
+ { 33, 9, 12, 0, 205, }, /* 39 */
+ { 33, 9, 12, 0, 79, }, /* 40 */
+ { 33, 9, 12, 0, 202, }, /* 41 */
+ { 33, 9, 12, 0, 203, }, /* 42 */
+ { 33, 9, 12, 0, 207, }, /* 43 */
+ { 33, 5, 12, 0, 97, }, /* 44 */
+ { 33, 9, 12, 0, 211, }, /* 45 */
+ { 33, 9, 12, 0, 209, }, /* 46 */
+ { 33, 5, 12, 0, 163, }, /* 47 */
+ { 33, 9, 12, 0, 213, }, /* 48 */
+ { 33, 5, 12, 0, 130, }, /* 49 */
+ { 33, 9, 12, 0, 214, }, /* 50 */
+ { 33, 9, 12, 0, 218, }, /* 51 */
+ { 33, 9, 12, 0, 217, }, /* 52 */
+ { 33, 9, 12, 0, 219, }, /* 53 */
+ { 33, 5, 12, 0, 56, }, /* 54 */
+ { 33, 9, 12, 5, 2, }, /* 55 */
+ { 33, 8, 12, 5, 1, }, /* 56 */
+ { 33, 5, 12, 5, -2, }, /* 57 */
+ { 33, 9, 12, 9, 2, }, /* 58 */
+ { 33, 8, 12, 9, 1, }, /* 59 */
+ { 33, 5, 12, 9, -2, }, /* 60 */
+ { 33, 9, 12, 13, 2, }, /* 61 */
+ { 33, 8, 12, 13, 1, }, /* 62 */
+ { 33, 5, 12, 13, -2, }, /* 63 */
+ { 33, 5, 12, 0, -79, }, /* 64 */
+ { 33, 9, 12, 17, 2, }, /* 65 */
+ { 33, 8, 12, 17, 1, }, /* 66 */
+ { 33, 5, 12, 17, -2, }, /* 67 */
+ { 33, 9, 12, 0, -97, }, /* 68 */
+ { 33, 9, 12, 0, -56, }, /* 69 */
+ { 33, 9, 12, 0, -130, }, /* 70 */
+ { 33, 9, 12, 0, 10795, }, /* 71 */
+ { 33, 9, 12, 0, -163, }, /* 72 */
+ { 33, 9, 12, 0, 10792, }, /* 73 */
+ { 33, 5, 12, 0, 10815, }, /* 74 */
+ { 33, 9, 12, 0, -195, }, /* 75 */
+ { 33, 9, 12, 0, 69, }, /* 76 */
+ { 33, 9, 12, 0, 71, }, /* 77 */
+ { 33, 5, 12, 0, 10783, }, /* 78 */
+ { 33, 5, 12, 0, 10780, }, /* 79 */
+ { 33, 5, 12, 0, 10782, }, /* 80 */
+ { 33, 5, 12, 0, -210, }, /* 81 */
+ { 33, 5, 12, 0, -206, }, /* 82 */
+ { 33, 5, 12, 0, -205, }, /* 83 */
+ { 33, 5, 12, 0, -202, }, /* 84 */
+ { 33, 5, 12, 0, -203, }, /* 85 */
+ { 33, 5, 12, 0, -207, }, /* 86 */
+ { 33, 5, 12, 0, 42280, }, /* 87 */
+ { 33, 5, 12, 0, 42308, }, /* 88 */
+ { 33, 5, 12, 0, -209, }, /* 89 */
+ { 33, 5, 12, 0, -211, }, /* 90 */
+ { 33, 5, 12, 0, 10743, }, /* 91 */
+ { 33, 5, 12, 0, 10749, }, /* 92 */
+ { 33, 5, 12, 0, -213, }, /* 93 */
+ { 33, 5, 12, 0, -214, }, /* 94 */
+ { 33, 5, 12, 0, 10727, }, /* 95 */
+ { 33, 5, 12, 0, -218, }, /* 96 */
+ { 33, 5, 12, 0, -69, }, /* 97 */
+ { 33, 5, 12, 0, -217, }, /* 98 */
+ { 33, 5, 12, 0, -71, }, /* 99 */
+ { 33, 5, 12, 0, -219, }, /* 100 */
+ { 33, 6, 12, 0, 0, }, /* 101 */
+ { 9, 6, 12, 0, 0, }, /* 102 */
+ { 3, 24, 12, 0, 0, }, /* 103 */
+ { 27, 12, 3, 0, 0, }, /* 104 */
+ { 27, 12, 3, 21, 116, }, /* 105 */
+ { 19, 9, 12, 0, 1, }, /* 106 */
+ { 19, 5, 12, 0, -1, }, /* 107 */
+ { 19, 24, 12, 0, 0, }, /* 108 */
+ { 9, 2, 12, 0, 0, }, /* 109 */
+ { 19, 6, 12, 0, 0, }, /* 110 */
+ { 19, 5, 12, 0, 130, }, /* 111 */
+ { 19, 9, 12, 0, 38, }, /* 112 */
+ { 19, 9, 12, 0, 37, }, /* 113 */
+ { 19, 9, 12, 0, 64, }, /* 114 */
+ { 19, 9, 12, 0, 63, }, /* 115 */
+ { 19, 5, 12, 0, 0, }, /* 116 */
+ { 19, 9, 12, 0, 32, }, /* 117 */
+ { 19, 9, 12, 34, 32, }, /* 118 */
+ { 19, 9, 12, 59, 32, }, /* 119 */
+ { 19, 9, 12, 38, 32, }, /* 120 */
+ { 19, 9, 12, 21, 32, }, /* 121 */
+ { 19, 9, 12, 51, 32, }, /* 122 */
+ { 19, 9, 12, 26, 32, }, /* 123 */
+ { 19, 9, 12, 47, 32, }, /* 124 */
+ { 19, 9, 12, 55, 32, }, /* 125 */
+ { 19, 9, 12, 30, 32, }, /* 126 */
+ { 19, 9, 12, 43, 32, }, /* 127 */
+ { 19, 9, 12, 67, 32, }, /* 128 */
+ { 19, 5, 12, 0, -38, }, /* 129 */
+ { 19, 5, 12, 0, -37, }, /* 130 */
+ { 19, 5, 12, 0, -32, }, /* 131 */
+ { 19, 5, 12, 34, -32, }, /* 132 */
+ { 19, 5, 12, 59, -32, }, /* 133 */
+ { 19, 5, 12, 38, -32, }, /* 134 */
+ { 19, 5, 12, 21, -116, }, /* 135 */
+ { 19, 5, 12, 51, -32, }, /* 136 */
+ { 19, 5, 12, 26, -775, }, /* 137 */
+ { 19, 5, 12, 47, -32, }, /* 138 */
+ { 19, 5, 12, 55, -32, }, /* 139 */
+ { 19, 5, 12, 30, 1, }, /* 140 */
+ { 19, 5, 12, 30, -32, }, /* 141 */
+ { 19, 5, 12, 43, -32, }, /* 142 */
+ { 19, 5, 12, 67, -32, }, /* 143 */
+ { 19, 5, 12, 0, -64, }, /* 144 */
+ { 19, 5, 12, 0, -63, }, /* 145 */
+ { 19, 9, 12, 0, 8, }, /* 146 */
+ { 19, 5, 12, 34, -30, }, /* 147 */
+ { 19, 5, 12, 38, -25, }, /* 148 */
+ { 19, 9, 12, 0, 0, }, /* 149 */
+ { 19, 5, 12, 43, -15, }, /* 150 */
+ { 19, 5, 12, 47, -22, }, /* 151 */
+ { 19, 5, 12, 0, -8, }, /* 152 */
+ { 10, 9, 12, 0, 1, }, /* 153 */
+ { 10, 5, 12, 0, -1, }, /* 154 */
+ { 19, 5, 12, 51, -54, }, /* 155 */
+ { 19, 5, 12, 55, -48, }, /* 156 */
+ { 19, 5, 12, 0, 7, }, /* 157 */
+ { 19, 9, 12, 38, -60, }, /* 158 */
+ { 19, 5, 12, 59, -64, }, /* 159 */
+ { 19, 25, 12, 0, 0, }, /* 160 */
+ { 19, 9, 12, 0, -7, }, /* 161 */
+ { 19, 9, 12, 0, -130, }, /* 162 */
+ { 12, 9, 12, 0, 80, }, /* 163 */
+ { 12, 9, 12, 0, 32, }, /* 164 */
+ { 12, 5, 12, 0, -32, }, /* 165 */
+ { 12, 5, 12, 0, -80, }, /* 166 */
+ { 12, 9, 12, 0, 1, }, /* 167 */
+ { 12, 5, 12, 0, -1, }, /* 168 */
+ { 12, 26, 12, 0, 0, }, /* 169 */
+ { 12, 12, 3, 0, 0, }, /* 170 */
+ { 12, 11, 3, 0, 0, }, /* 171 */
+ { 12, 9, 12, 0, 15, }, /* 172 */
+ { 12, 5, 12, 0, -15, }, /* 173 */
+ { 1, 9, 12, 0, 48, }, /* 174 */
+ { 1, 6, 12, 0, 0, }, /* 175 */
+ { 1, 21, 12, 0, 0, }, /* 176 */
+ { 1, 5, 12, 0, -48, }, /* 177 */
+ { 1, 5, 12, 0, 0, }, /* 178 */
+ { 1, 17, 12, 0, 0, }, /* 179 */
+ { 1, 23, 12, 0, 0, }, /* 180 */
+ { 25, 12, 3, 0, 0, }, /* 181 */
+ { 25, 17, 12, 0, 0, }, /* 182 */
+ { 25, 21, 12, 0, 0, }, /* 183 */
+ { 25, 7, 12, 0, 0, }, /* 184 */
+ { 0, 1, 2, 0, 0, }, /* 185 */
+ { 0, 25, 12, 0, 0, }, /* 186 */
+ { 0, 21, 12, 0, 0, }, /* 187 */
+ { 0, 23, 12, 0, 0, }, /* 188 */
+ { 0, 26, 12, 0, 0, }, /* 189 */
+ { 0, 12, 3, 0, 0, }, /* 190 */
+ { 0, 7, 12, 0, 0, }, /* 191 */
+ { 0, 6, 12, 0, 0, }, /* 192 */
+ { 0, 13, 12, 0, 0, }, /* 193 */
+ { 49, 21, 12, 0, 0, }, /* 194 */
+ { 49, 1, 2, 0, 0, }, /* 195 */
+ { 49, 7, 12, 0, 0, }, /* 196 */
+ { 49, 12, 3, 0, 0, }, /* 197 */
+ { 55, 7, 12, 0, 0, }, /* 198 */
+ { 55, 12, 3, 0, 0, }, /* 199 */
+ { 63, 13, 12, 0, 0, }, /* 200 */
+ { 63, 7, 12, 0, 0, }, /* 201 */
+ { 63, 12, 3, 0, 0, }, /* 202 */
+ { 63, 6, 12, 0, 0, }, /* 203 */
+ { 63, 26, 12, 0, 0, }, /* 204 */
+ { 63, 21, 12, 0, 0, }, /* 205 */
+ { 89, 7, 12, 0, 0, }, /* 206 */
+ { 89, 12, 3, 0, 0, }, /* 207 */
+ { 89, 6, 12, 0, 0, }, /* 208 */
+ { 89, 21, 12, 0, 0, }, /* 209 */
+ { 94, 7, 12, 0, 0, }, /* 210 */
+ { 94, 12, 3, 0, 0, }, /* 211 */
+ { 94, 21, 12, 0, 0, }, /* 212 */
+ { 14, 12, 3, 0, 0, }, /* 213 */
+ { 14, 10, 5, 0, 0, }, /* 214 */
+ { 14, 7, 12, 0, 0, }, /* 215 */
+ { 14, 13, 12, 0, 0, }, /* 216 */
+ { 14, 21, 12, 0, 0, }, /* 217 */
+ { 14, 6, 12, 0, 0, }, /* 218 */
+ { 2, 12, 3, 0, 0, }, /* 219 */
+ { 2, 10, 5, 0, 0, }, /* 220 */
+ { 2, 7, 12, 0, 0, }, /* 221 */
+ { 2, 10, 3, 0, 0, }, /* 222 */
+ { 2, 13, 12, 0, 0, }, /* 223 */
+ { 2, 23, 12, 0, 0, }, /* 224 */
+ { 2, 15, 12, 0, 0, }, /* 225 */
+ { 2, 26, 12, 0, 0, }, /* 226 */
+ { 21, 12, 3, 0, 0, }, /* 227 */
+ { 21, 10, 5, 0, 0, }, /* 228 */
+ { 21, 7, 12, 0, 0, }, /* 229 */
+ { 21, 13, 12, 0, 0, }, /* 230 */
+ { 20, 12, 3, 0, 0, }, /* 231 */
+ { 20, 10, 5, 0, 0, }, /* 232 */
+ { 20, 7, 12, 0, 0, }, /* 233 */
+ { 20, 13, 12, 0, 0, }, /* 234 */
+ { 20, 21, 12, 0, 0, }, /* 235 */
+ { 20, 23, 12, 0, 0, }, /* 236 */
+ { 43, 12, 3, 0, 0, }, /* 237 */
+ { 43, 10, 5, 0, 0, }, /* 238 */
+ { 43, 7, 12, 0, 0, }, /* 239 */
+ { 43, 10, 3, 0, 0, }, /* 240 */
+ { 43, 13, 12, 0, 0, }, /* 241 */
+ { 43, 26, 12, 0, 0, }, /* 242 */
+ { 43, 15, 12, 0, 0, }, /* 243 */
+ { 53, 12, 3, 0, 0, }, /* 244 */
+ { 53, 7, 12, 0, 0, }, /* 245 */
+ { 53, 10, 3, 0, 0, }, /* 246 */
+ { 53, 10, 5, 0, 0, }, /* 247 */
+ { 53, 13, 12, 0, 0, }, /* 248 */
+ { 53, 15, 12, 0, 0, }, /* 249 */
+ { 53, 26, 12, 0, 0, }, /* 250 */
+ { 53, 23, 12, 0, 0, }, /* 251 */
+ { 54, 10, 5, 0, 0, }, /* 252 */
+ { 54, 7, 12, 0, 0, }, /* 253 */
+ { 54, 12, 3, 0, 0, }, /* 254 */
+ { 54, 13, 12, 0, 0, }, /* 255 */
+ { 54, 15, 12, 0, 0, }, /* 256 */
+ { 54, 26, 12, 0, 0, }, /* 257 */
+ { 28, 10, 5, 0, 0, }, /* 258 */
+ { 28, 7, 12, 0, 0, }, /* 259 */
+ { 28, 12, 3, 0, 0, }, /* 260 */
+ { 28, 10, 3, 0, 0, }, /* 261 */
+ { 28, 13, 12, 0, 0, }, /* 262 */
+ { 36, 10, 5, 0, 0, }, /* 263 */
+ { 36, 7, 12, 0, 0, }, /* 264 */
+ { 36, 10, 3, 0, 0, }, /* 265 */
+ { 36, 12, 3, 0, 0, }, /* 266 */
+ { 36, 13, 12, 0, 0, }, /* 267 */
+ { 36, 15, 12, 0, 0, }, /* 268 */
+ { 36, 26, 12, 0, 0, }, /* 269 */
+ { 47, 10, 5, 0, 0, }, /* 270 */
+ { 47, 7, 12, 0, 0, }, /* 271 */
+ { 47, 12, 3, 0, 0, }, /* 272 */
+ { 47, 10, 3, 0, 0, }, /* 273 */
+ { 47, 21, 12, 0, 0, }, /* 274 */
+ { 56, 7, 12, 0, 0, }, /* 275 */
+ { 56, 12, 3, 0, 0, }, /* 276 */
+ { 56, 7, 5, 0, 0, }, /* 277 */
+ { 56, 6, 12, 0, 0, }, /* 278 */
+ { 56, 21, 12, 0, 0, }, /* 279 */
+ { 56, 13, 12, 0, 0, }, /* 280 */
+ { 32, 7, 12, 0, 0, }, /* 281 */
+ { 32, 12, 3, 0, 0, }, /* 282 */
+ { 32, 7, 5, 0, 0, }, /* 283 */
+ { 32, 6, 12, 0, 0, }, /* 284 */
+ { 32, 13, 12, 0, 0, }, /* 285 */
+ { 57, 7, 12, 0, 0, }, /* 286 */
+ { 57, 26, 12, 0, 0, }, /* 287 */
+ { 57, 21, 12, 0, 0, }, /* 288 */
+ { 57, 12, 3, 0, 0, }, /* 289 */
+ { 57, 13, 12, 0, 0, }, /* 290 */
+ { 57, 15, 12, 0, 0, }, /* 291 */
+ { 57, 22, 12, 0, 0, }, /* 292 */
+ { 57, 18, 12, 0, 0, }, /* 293 */
+ { 57, 10, 5, 0, 0, }, /* 294 */
+ { 38, 7, 12, 0, 0, }, /* 295 */
+ { 38, 10, 12, 0, 0, }, /* 296 */
+ { 38, 12, 3, 0, 0, }, /* 297 */
+ { 38, 10, 5, 0, 0, }, /* 298 */
+ { 38, 13, 12, 0, 0, }, /* 299 */
+ { 38, 21, 12, 0, 0, }, /* 300 */
+ { 38, 26, 12, 0, 0, }, /* 301 */
+ { 16, 9, 12, 0, 7264, }, /* 302 */
+ { 16, 7, 12, 0, 0, }, /* 303 */
+ { 16, 6, 12, 0, 0, }, /* 304 */
+ { 23, 7, 6, 0, 0, }, /* 305 */
+ { 23, 7, 7, 0, 0, }, /* 306 */
+ { 23, 7, 8, 0, 0, }, /* 307 */
+ { 15, 7, 12, 0, 0, }, /* 308 */
+ { 15, 12, 3, 0, 0, }, /* 309 */
+ { 15, 21, 12, 0, 0, }, /* 310 */
+ { 15, 15, 12, 0, 0, }, /* 311 */
+ { 15, 26, 12, 0, 0, }, /* 312 */
+ { 8, 7, 12, 0, 0, }, /* 313 */
+ { 7, 17, 12, 0, 0, }, /* 314 */
+ { 7, 7, 12, 0, 0, }, /* 315 */
+ { 7, 21, 12, 0, 0, }, /* 316 */
+ { 40, 29, 12, 0, 0, }, /* 317 */
+ { 40, 7, 12, 0, 0, }, /* 318 */
+ { 40, 22, 12, 0, 0, }, /* 319 */
+ { 40, 18, 12, 0, 0, }, /* 320 */
+ { 45, 7, 12, 0, 0, }, /* 321 */
+ { 45, 14, 12, 0, 0, }, /* 322 */
+ { 50, 7, 12, 0, 0, }, /* 323 */
+ { 50, 12, 3, 0, 0, }, /* 324 */
+ { 24, 7, 12, 0, 0, }, /* 325 */
+ { 24, 12, 3, 0, 0, }, /* 326 */
+ { 6, 7, 12, 0, 0, }, /* 327 */
+ { 6, 12, 3, 0, 0, }, /* 328 */
+ { 51, 7, 12, 0, 0, }, /* 329 */
+ { 51, 12, 3, 0, 0, }, /* 330 */
+ { 31, 7, 12, 0, 0, }, /* 331 */
+ { 31, 12, 3, 0, 0, }, /* 332 */
+ { 31, 10, 5, 0, 0, }, /* 333 */
+ { 31, 21, 12, 0, 0, }, /* 334 */
+ { 31, 6, 12, 0, 0, }, /* 335 */
+ { 31, 23, 12, 0, 0, }, /* 336 */
+ { 31, 13, 12, 0, 0, }, /* 337 */
+ { 31, 15, 12, 0, 0, }, /* 338 */
+ { 37, 21, 12, 0, 0, }, /* 339 */
+ { 37, 17, 12, 0, 0, }, /* 340 */
+ { 37, 12, 3, 0, 0, }, /* 341 */
+ { 37, 29, 12, 0, 0, }, /* 342 */
+ { 37, 13, 12, 0, 0, }, /* 343 */
+ { 37, 7, 12, 0, 0, }, /* 344 */
+ { 37, 6, 12, 0, 0, }, /* 345 */
+ { 34, 7, 12, 0, 0, }, /* 346 */
+ { 34, 12, 3, 0, 0, }, /* 347 */
+ { 34, 10, 5, 0, 0, }, /* 348 */
+ { 34, 26, 12, 0, 0, }, /* 349 */
+ { 34, 21, 12, 0, 0, }, /* 350 */
+ { 34, 13, 12, 0, 0, }, /* 351 */
+ { 52, 7, 12, 0, 0, }, /* 352 */
+ { 39, 7, 12, 0, 0, }, /* 353 */
+ { 39, 10, 12, 0, 0, }, /* 354 */
+ { 39, 10, 5, 0, 0, }, /* 355 */
+ { 39, 13, 12, 0, 0, }, /* 356 */
+ { 39, 15, 12, 0, 0, }, /* 357 */
+ { 39, 26, 12, 0, 0, }, /* 358 */
+ { 31, 26, 12, 0, 0, }, /* 359 */
+ { 5, 7, 12, 0, 0, }, /* 360 */
+ { 5, 12, 3, 0, 0, }, /* 361 */
+ { 5, 10, 5, 0, 0, }, /* 362 */
+ { 5, 21, 12, 0, 0, }, /* 363 */
+ { 90, 7, 12, 0, 0, }, /* 364 */
+ { 90, 10, 5, 0, 0, }, /* 365 */
+ { 90, 12, 3, 0, 0, }, /* 366 */
+ { 90, 10, 12, 0, 0, }, /* 367 */
+ { 90, 13, 12, 0, 0, }, /* 368 */
+ { 90, 21, 12, 0, 0, }, /* 369 */
+ { 90, 6, 12, 0, 0, }, /* 370 */
+ { 61, 12, 3, 0, 0, }, /* 371 */
+ { 61, 10, 5, 0, 0, }, /* 372 */
+ { 61, 7, 12, 0, 0, }, /* 373 */
+ { 61, 13, 12, 0, 0, }, /* 374 */
+ { 61, 21, 12, 0, 0, }, /* 375 */
+ { 61, 26, 12, 0, 0, }, /* 376 */
+ { 75, 12, 3, 0, 0, }, /* 377 */
+ { 75, 10, 5, 0, 0, }, /* 378 */
+ { 75, 7, 12, 0, 0, }, /* 379 */
+ { 75, 13, 12, 0, 0, }, /* 380 */
+ { 92, 7, 12, 0, 0, }, /* 381 */
+ { 92, 12, 3, 0, 0, }, /* 382 */
+ { 92, 10, 5, 0, 0, }, /* 383 */
+ { 92, 21, 12, 0, 0, }, /* 384 */
+ { 69, 7, 12, 0, 0, }, /* 385 */
+ { 69, 10, 5, 0, 0, }, /* 386 */
+ { 69, 12, 3, 0, 0, }, /* 387 */
+ { 69, 21, 12, 0, 0, }, /* 388 */
+ { 69, 13, 12, 0, 0, }, /* 389 */
+ { 72, 13, 12, 0, 0, }, /* 390 */
+ { 72, 7, 12, 0, 0, }, /* 391 */
+ { 72, 6, 12, 0, 0, }, /* 392 */
+ { 72, 21, 12, 0, 0, }, /* 393 */
+ { 75, 21, 12, 0, 0, }, /* 394 */
+ { 9, 10, 5, 0, 0, }, /* 395 */
+ { 9, 7, 12, 0, 0, }, /* 396 */
+ { 12, 5, 12, 0, 0, }, /* 397 */
+ { 12, 6, 12, 0, 0, }, /* 398 */
+ { 33, 5, 12, 0, 35332, }, /* 399 */
+ { 33, 5, 12, 0, 3814, }, /* 400 */
+ { 33, 9, 12, 63, 1, }, /* 401 */
+ { 33, 5, 12, 63, -1, }, /* 402 */
+ { 33, 5, 12, 63, -58, }, /* 403 */
+ { 33, 9, 12, 0, -7615, }, /* 404 */
+ { 19, 5, 12, 0, 8, }, /* 405 */
+ { 19, 9, 12, 0, -8, }, /* 406 */
+ { 19, 5, 12, 0, 74, }, /* 407 */
+ { 19, 5, 12, 0, 86, }, /* 408 */
+ { 19, 5, 12, 0, 100, }, /* 409 */
+ { 19, 5, 12, 0, 128, }, /* 410 */
+ { 19, 5, 12, 0, 112, }, /* 411 */
+ { 19, 5, 12, 0, 126, }, /* 412 */
+ { 19, 8, 12, 0, -8, }, /* 413 */
+ { 19, 5, 12, 0, 9, }, /* 414 */
+ { 19, 9, 12, 0, -74, }, /* 415 */
+ { 19, 8, 12, 0, -9, }, /* 416 */
+ { 19, 5, 12, 21, -7173, }, /* 417 */
+ { 19, 9, 12, 0, -86, }, /* 418 */
+ { 19, 9, 12, 0, -100, }, /* 419 */
+ { 19, 9, 12, 0, -112, }, /* 420 */
+ { 19, 9, 12, 0, -128, }, /* 421 */
+ { 19, 9, 12, 0, -126, }, /* 422 */
+ { 27, 1, 3, 0, 0, }, /* 423 */
+ { 9, 27, 2, 0, 0, }, /* 424 */
+ { 9, 28, 2, 0, 0, }, /* 425 */
+ { 9, 2, 2, 0, 0, }, /* 426 */
+ { 27, 11, 3, 0, 0, }, /* 427 */
+ { 9, 9, 12, 0, 0, }, /* 428 */
+ { 9, 5, 12, 0, 0, }, /* 429 */
+ { 19, 9, 12, 67, -7517, }, /* 430 */
+ { 33, 9, 12, 71, -8383, }, /* 431 */
+ { 33, 9, 12, 75, -8262, }, /* 432 */
+ { 33, 9, 12, 0, 28, }, /* 433 */
+ { 33, 5, 12, 0, -28, }, /* 434 */
+ { 33, 14, 12, 0, 16, }, /* 435 */
+ { 33, 14, 12, 0, -16, }, /* 436 */
+ { 33, 14, 12, 0, 0, }, /* 437 */
+ { 9, 26, 12, 0, 26, }, /* 438 */
+ { 9, 26, 12, 0, -26, }, /* 439 */
+ { 4, 26, 12, 0, 0, }, /* 440 */
+ { 17, 9, 12, 0, 48, }, /* 441 */
+ { 17, 5, 12, 0, -48, }, /* 442 */
+ { 33, 9, 12, 0, -10743, }, /* 443 */
+ { 33, 9, 12, 0, -3814, }, /* 444 */
+ { 33, 9, 12, 0, -10727, }, /* 445 */
+ { 33, 5, 12, 0, -10795, }, /* 446 */
+ { 33, 5, 12, 0, -10792, }, /* 447 */
+ { 33, 9, 12, 0, -10780, }, /* 448 */
+ { 33, 9, 12, 0, -10749, }, /* 449 */
+ { 33, 9, 12, 0, -10783, }, /* 450 */
+ { 33, 9, 12, 0, -10782, }, /* 451 */
+ { 33, 9, 12, 0, -10815, }, /* 452 */
+ { 10, 5, 12, 0, 0, }, /* 453 */
+ { 10, 26, 12, 0, 0, }, /* 454 */
+ { 10, 12, 3, 0, 0, }, /* 455 */
+ { 10, 21, 12, 0, 0, }, /* 456 */
+ { 10, 15, 12, 0, 0, }, /* 457 */
+ { 16, 5, 12, 0, -7264, }, /* 458 */
+ { 58, 7, 12, 0, 0, }, /* 459 */
+ { 58, 6, 12, 0, 0, }, /* 460 */
+ { 58, 21, 12, 0, 0, }, /* 461 */
+ { 58, 12, 3, 0, 0, }, /* 462 */
+ { 22, 26, 12, 0, 0, }, /* 463 */
+ { 22, 6, 12, 0, 0, }, /* 464 */
+ { 22, 14, 12, 0, 0, }, /* 465 */
+ { 23, 10, 3, 0, 0, }, /* 466 */
+ { 26, 7, 12, 0, 0, }, /* 467 */
+ { 26, 6, 12, 0, 0, }, /* 468 */
+ { 29, 7, 12, 0, 0, }, /* 469 */
+ { 29, 6, 12, 0, 0, }, /* 470 */
+ { 3, 7, 12, 0, 0, }, /* 471 */
+ { 23, 7, 12, 0, 0, }, /* 472 */
+ { 23, 26, 12, 0, 0, }, /* 473 */
+ { 29, 26, 12, 0, 0, }, /* 474 */
+ { 22, 7, 12, 0, 0, }, /* 475 */
+ { 60, 7, 12, 0, 0, }, /* 476 */
+ { 60, 6, 12, 0, 0, }, /* 477 */
+ { 60, 26, 12, 0, 0, }, /* 478 */
+ { 85, 7, 12, 0, 0, }, /* 479 */
+ { 85, 6, 12, 0, 0, }, /* 480 */
+ { 85, 21, 12, 0, 0, }, /* 481 */
+ { 76, 7, 12, 0, 0, }, /* 482 */
+ { 76, 6, 12, 0, 0, }, /* 483 */
+ { 76, 21, 12, 0, 0, }, /* 484 */
+ { 76, 13, 12, 0, 0, }, /* 485 */
+ { 12, 7, 12, 0, 0, }, /* 486 */
+ { 12, 21, 12, 0, 0, }, /* 487 */
+ { 78, 7, 12, 0, 0, }, /* 488 */
+ { 78, 14, 12, 0, 0, }, /* 489 */
+ { 78, 12, 3, 0, 0, }, /* 490 */
+ { 78, 21, 12, 0, 0, }, /* 491 */
+ { 33, 9, 12, 0, -35332, }, /* 492 */
+ { 33, 9, 12, 0, -42280, }, /* 493 */
+ { 33, 9, 12, 0, -42308, }, /* 494 */
+ { 48, 7, 12, 0, 0, }, /* 495 */
+ { 48, 12, 3, 0, 0, }, /* 496 */
+ { 48, 10, 5, 0, 0, }, /* 497 */
+ { 48, 26, 12, 0, 0, }, /* 498 */
+ { 64, 7, 12, 0, 0, }, /* 499 */
+ { 64, 21, 12, 0, 0, }, /* 500 */
+ { 74, 10, 5, 0, 0, }, /* 501 */
+ { 74, 7, 12, 0, 0, }, /* 502 */
+ { 74, 12, 3, 0, 0, }, /* 503 */
+ { 74, 21, 12, 0, 0, }, /* 504 */
+ { 74, 13, 12, 0, 0, }, /* 505 */
+ { 68, 13, 12, 0, 0, }, /* 506 */
+ { 68, 7, 12, 0, 0, }, /* 507 */
+ { 68, 12, 3, 0, 0, }, /* 508 */
+ { 68, 21, 12, 0, 0, }, /* 509 */
+ { 73, 7, 12, 0, 0, }, /* 510 */
+ { 73, 12, 3, 0, 0, }, /* 511 */
+ { 73, 10, 5, 0, 0, }, /* 512 */
+ { 73, 21, 12, 0, 0, }, /* 513 */
+ { 83, 12, 3, 0, 0, }, /* 514 */
+ { 83, 10, 5, 0, 0, }, /* 515 */
+ { 83, 7, 12, 0, 0, }, /* 516 */
+ { 83, 21, 12, 0, 0, }, /* 517 */
+ { 83, 6, 12, 0, 0, }, /* 518 */
+ { 83, 13, 12, 0, 0, }, /* 519 */
+ { 67, 7, 12, 0, 0, }, /* 520 */
+ { 67, 12, 3, 0, 0, }, /* 521 */
+ { 67, 10, 5, 0, 0, }, /* 522 */
+ { 67, 13, 12, 0, 0, }, /* 523 */
+ { 67, 21, 12, 0, 0, }, /* 524 */
+ { 38, 6, 12, 0, 0, }, /* 525 */
+ { 91, 7, 12, 0, 0, }, /* 526 */
+ { 91, 12, 3, 0, 0, }, /* 527 */
+ { 91, 6, 12, 0, 0, }, /* 528 */
+ { 91, 21, 12, 0, 0, }, /* 529 */
+ { 86, 7, 12, 0, 0, }, /* 530 */
+ { 86, 10, 5, 0, 0, }, /* 531 */
+ { 86, 12, 3, 0, 0, }, /* 532 */
+ { 86, 21, 12, 0, 0, }, /* 533 */
+ { 86, 6, 12, 0, 0, }, /* 534 */
+ { 86, 13, 12, 0, 0, }, /* 535 */
+ { 23, 7, 9, 0, 0, }, /* 536 */
+ { 23, 7, 10, 0, 0, }, /* 537 */
+ { 9, 4, 2, 0, 0, }, /* 538 */
+ { 9, 3, 12, 0, 0, }, /* 539 */
+ { 25, 25, 12, 0, 0, }, /* 540 */
+ { 0, 24, 12, 0, 0, }, /* 541 */
+ { 9, 6, 3, 0, 0, }, /* 542 */
+ { 35, 7, 12, 0, 0, }, /* 543 */
+ { 19, 14, 12, 0, 0, }, /* 544 */
+ { 19, 15, 12, 0, 0, }, /* 545 */
+ { 19, 26, 12, 0, 0, }, /* 546 */
+ { 70, 7, 12, 0, 0, }, /* 547 */
+ { 66, 7, 12, 0, 0, }, /* 548 */
+ { 41, 7, 12, 0, 0, }, /* 549 */
+ { 41, 15, 12, 0, 0, }, /* 550 */
+ { 18, 7, 12, 0, 0, }, /* 551 */
+ { 18, 14, 12, 0, 0, }, /* 552 */
+ { 59, 7, 12, 0, 0, }, /* 553 */
+ { 59, 21, 12, 0, 0, }, /* 554 */
+ { 42, 7, 12, 0, 0, }, /* 555 */
+ { 42, 21, 12, 0, 0, }, /* 556 */
+ { 42, 14, 12, 0, 0, }, /* 557 */
+ { 13, 9, 12, 0, 40, }, /* 558 */
+ { 13, 5, 12, 0, -40, }, /* 559 */
+ { 46, 7, 12, 0, 0, }, /* 560 */
+ { 44, 7, 12, 0, 0, }, /* 561 */
+ { 44, 13, 12, 0, 0, }, /* 562 */
+ { 11, 7, 12, 0, 0, }, /* 563 */
+ { 80, 7, 12, 0, 0, }, /* 564 */
+ { 80, 21, 12, 0, 0, }, /* 565 */
+ { 80, 15, 12, 0, 0, }, /* 566 */
+ { 65, 7, 12, 0, 0, }, /* 567 */
+ { 65, 15, 12, 0, 0, }, /* 568 */
+ { 65, 21, 12, 0, 0, }, /* 569 */
+ { 71, 7, 12, 0, 0, }, /* 570 */
+ { 71, 21, 12, 0, 0, }, /* 571 */
+ { 97, 7, 12, 0, 0, }, /* 572 */
+ { 96, 7, 12, 0, 0, }, /* 573 */
+ { 30, 7, 12, 0, 0, }, /* 574 */
+ { 30, 12, 3, 0, 0, }, /* 575 */
+ { 30, 15, 12, 0, 0, }, /* 576 */
+ { 30, 21, 12, 0, 0, }, /* 577 */
+ { 87, 7, 12, 0, 0, }, /* 578 */
+ { 87, 15, 12, 0, 0, }, /* 579 */
+ { 87, 21, 12, 0, 0, }, /* 580 */
+ { 77, 7, 12, 0, 0, }, /* 581 */
+ { 77, 21, 12, 0, 0, }, /* 582 */
+ { 82, 7, 12, 0, 0, }, /* 583 */
+ { 82, 15, 12, 0, 0, }, /* 584 */
+ { 81, 7, 12, 0, 0, }, /* 585 */
+ { 81, 15, 12, 0, 0, }, /* 586 */
+ { 88, 7, 12, 0, 0, }, /* 587 */
+ { 0, 15, 12, 0, 0, }, /* 588 */
+ { 93, 10, 5, 0, 0, }, /* 589 */
+ { 93, 12, 3, 0, 0, }, /* 590 */
+ { 93, 7, 12, 0, 0, }, /* 591 */
+ { 93, 21, 12, 0, 0, }, /* 592 */
+ { 93, 15, 12, 0, 0, }, /* 593 */
+ { 93, 13, 12, 0, 0, }, /* 594 */
+ { 84, 12, 3, 0, 0, }, /* 595 */
+ { 84, 10, 5, 0, 0, }, /* 596 */
+ { 84, 7, 12, 0, 0, }, /* 597 */
+ { 84, 21, 12, 0, 0, }, /* 598 */
+ { 84, 1, 2, 0, 0, }, /* 599 */
+ { 100, 7, 12, 0, 0, }, /* 600 */
+ { 100, 13, 12, 0, 0, }, /* 601 */
+ { 95, 12, 3, 0, 0, }, /* 602 */
+ { 95, 7, 12, 0, 0, }, /* 603 */
+ { 95, 10, 5, 0, 0, }, /* 604 */
+ { 95, 13, 12, 0, 0, }, /* 605 */
+ { 95, 21, 12, 0, 0, }, /* 606 */
+ { 99, 12, 3, 0, 0, }, /* 607 */
+ { 99, 10, 5, 0, 0, }, /* 608 */
+ { 99, 7, 12, 0, 0, }, /* 609 */
+ { 99, 21, 12, 0, 0, }, /* 610 */
+ { 99, 13, 12, 0, 0, }, /* 611 */
+ { 101, 7, 12, 0, 0, }, /* 612 */
+ { 101, 12, 3, 0, 0, }, /* 613 */
+ { 101, 10, 5, 0, 0, }, /* 614 */
+ { 101, 13, 12, 0, 0, }, /* 615 */
+ { 62, 7, 12, 0, 0, }, /* 616 */
+ { 62, 14, 12, 0, 0, }, /* 617 */
+ { 62, 21, 12, 0, 0, }, /* 618 */
+ { 79, 7, 12, 0, 0, }, /* 619 */
+ { 98, 7, 12, 0, 0, }, /* 620 */
+ { 98, 10, 5, 0, 0, }, /* 621 */
+ { 98, 12, 3, 0, 0, }, /* 622 */
+ { 98, 6, 12, 0, 0, }, /* 623 */
+ { 9, 10, 3, 0, 0, }, /* 624 */
+ { 19, 12, 3, 0, 0, }, /* 625 */
+ { 9, 26, 11, 0, 0, }, /* 626 */
+ { 26, 26, 12, 0, 0, }, /* 627 */
+};
+
+const pcre_uint8 PRIV(ucd_stage1)[] = { /* 8704 bytes */
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 42, 43, 44, 45, /* U+1000 */
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, /* U+1800 */
+ 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 71, 74, 75, /* U+2000 */
+ 76, 76, 66, 77, 66, 66, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, /* U+2800 */
+ 88, 89, 90, 91, 92, 93, 94, 71, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+4000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 95, 95, 95, 95, /* U+4800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+9000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 97, /* U+9800 */
+ 98, 99, 99, 99, 99, 99, 99, 99, 99,100,101,101,102,103,104,105, /* U+A000 */
+106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,114, /* U+A800 */
+115,116,117,118,119,120,114,115,116,117,118,119,120,114,115,116, /* U+B000 */
+117,118,119,120,114,115,116,117,118,119,120,114,115,116,117,118, /* U+B800 */
+119,120,114,115,116,117,118,119,120,114,115,116,117,118,119,120, /* U+C000 */
+114,115,116,117,118,119,120,114,115,116,117,118,119,120,114,115, /* U+C800 */
+116,117,118,119,120,114,115,116,117,118,119,120,114,115,116,121, /* U+D000 */
+122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, /* U+D800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F000 */
+123,123, 95, 95,124,125,126,127,128,128,129,130,131,132,133,134, /* U+F800 */
+135,136,137,138, 79,139,140,141,142,143, 79, 79, 79, 79, 79, 79, /* U+10000 */
+144, 79,145,146,147, 79,148, 79,149, 79, 79, 79,150, 79, 79, 79, /* U+10800 */
+151,152,153,154, 79, 79, 79, 79, 79, 79, 79, 79, 79,155, 79, 79, /* U+11000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+11800 */
+156,156,156,156,156,156,157, 79,158, 79, 79, 79, 79, 79, 79, 79, /* U+12000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+12800 */
+159,159,159,159,159,159,159,159,160, 79, 79, 79, 79, 79, 79, 79, /* U+13000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+13800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+14000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+14800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+15000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+15800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+16000 */
+161,161,161,161,162, 79, 79, 79, 79, 79, 79, 79, 79, 79,163,164, /* U+16800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+17000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+17800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+18000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+18800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+19000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+19800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1A800 */
+165, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1C800 */
+ 71,166,167,168,169, 79,170, 79,171,172,173,174,175,176,177,178, /* U+1D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,179,180, 79, 79, /* U+1E800 */
+181,182,183,184,185, 79,186,187,188,189,190,191,192,193,194, 79, /* U+1F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1F800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,195, 95, 95, /* U+2A000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2A800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,196, 95, /* U+2B000 */
+197, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2F000 */
+ 95, 95, 95, 95,197, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+30000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+30800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+31000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+31800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+32000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+32800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+33000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+33800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+34000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+34800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+35000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+35800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+36000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+36800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+37000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+37800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+38000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+38800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+39000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+39800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+40000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+40800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+41000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+41800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+42000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+42800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+43000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+43800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+44000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+44800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+45000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+45800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+46000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+46800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+47000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+47800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+48000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+48800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+49000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+49800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+50000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+50800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+51000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+51800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+52000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+52800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+53000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+53800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+54000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+54800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+55000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+55800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+56000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+56800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+57000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+57800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+58000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+58800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+59000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+59800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+60000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+60800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+61000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+61800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+62000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+62800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+63000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+63800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+64000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+64800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+65000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+65800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+66000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+66800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+67000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+67800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+68000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+68800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+69000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+69800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+70000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+70800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+71000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+71800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+72000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+72800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+73000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+73800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+74000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+74800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+75000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+75800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+76000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+76800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+77000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+77800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+78000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+78800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+79000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+79800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+80000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+80800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+81000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+81800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+82000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+82800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+83000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+83800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+84000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+84800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+85000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+85800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+86000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+86800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+87000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+87800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+88000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+88800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+89000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+89800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+90000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+90800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+91000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+91800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+92000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+92800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+93000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+93800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+94000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+94800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+95000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+95800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+96000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+96800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+97000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+97800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+98000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+98800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+99000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+99800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9A000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9A800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9B000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9B800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9C000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9C800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9D000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9D800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9E000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9E800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9F000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9F800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A0000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A0800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A1000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A1800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A2000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A2800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A3000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A3800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A4000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A4800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A5000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A5800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A6000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A6800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A7000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A7800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A8000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A8800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A9000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A9800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AA000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AA800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AB000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AB800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AC000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AC800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AD000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AD800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AE000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AE800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AF000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AF800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B0000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B0800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B1000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B1800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B2000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B2800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B3000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B3800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B4000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B4800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B5000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B5800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B6000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B6800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B7000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B7800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B8000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B8800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B9000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B9800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BA000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BA800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BB000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BB800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BC000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BC800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BD000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BD800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BE000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BE800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BF000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BF800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C0000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C0800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C1000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C1800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C2000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C2800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C3000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C3800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C4000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C4800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C5000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C5800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C6000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C6800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C7000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C7800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C8000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C8800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C9000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C9800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CA000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CA800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CB000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CB800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CC000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CC800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CD000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CD800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CE000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CE800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CF000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CF800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D0000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D0800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D1000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D1800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D2000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D2800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D3000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D3800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D4000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D4800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D5000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D5800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D6000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D6800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D7000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D7800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D8000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D8800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D9000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D9800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DA000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DA800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DB000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DB800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DC000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DC800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DD000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DD800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DE000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DE800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DF000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DF800 */
+198,199,200,201,199,199,199,199,199,199,199,199,199,199,199,199, /* U+E0000 */
+199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199, /* U+E0800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E1000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E1800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E2000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E2800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E3000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E3800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E4000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E4800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E5000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E5800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E6000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E6800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E7000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E7800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E8000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E8800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E9000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E9800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EA000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EA800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EB000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EB800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EC000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EC800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+ED000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+ED800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EE000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EE800 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EF000 */
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EF800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FF000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,202, /* U+FF800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10F000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,202, /* U+10F800 */
+};
+
+const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */
+/* block 0 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
+ 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11,
+ 11, 11, 11, 13, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
+ 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 16, 16, 16, 16,
+ 16, 16, 16, 18, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 0,
+
+/* block 1 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 4, 5, 5, 5, 5, 19, 4, 14, 19, 20, 21, 8, 22, 19, 14,
+ 19, 8, 23, 23, 14, 24, 4, 4, 14, 23, 20, 25, 23, 23, 23, 4,
+ 11, 11, 11, 11, 11, 26, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 8, 11, 11, 11, 11, 11, 11, 11, 27,
+ 16, 16, 16, 16, 16, 28, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 16, 16, 16, 16, 29,
+
+/* block 2 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 32, 33, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 34, 30, 31, 30, 31, 30, 31, 35,
+
+/* block 3 */
+ 36, 37, 30, 31, 30, 31, 38, 30, 31, 39, 39, 30, 31, 33, 40, 41,
+ 42, 30, 31, 39, 43, 44, 45, 46, 30, 31, 47, 33, 45, 48, 49, 50,
+ 30, 31, 30, 31, 30, 31, 51, 30, 31, 51, 33, 33, 30, 31, 51, 30,
+ 31, 52, 52, 30, 31, 30, 31, 53, 30, 31, 33, 20, 30, 31, 33, 54,
+ 20, 20, 20, 20, 55, 56, 57, 58, 59, 60, 61, 62, 63, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 64, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 33, 65, 66, 67, 30, 31, 68, 69, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 4 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 70, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 33, 33, 33, 33, 33, 33, 71, 30, 31, 72, 73, 74,
+ 74, 30, 31, 75, 76, 77, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 78, 79, 80, 81, 82, 33, 83, 83, 33, 84, 33, 85, 33, 33, 33, 33,
+ 83, 33, 33, 86, 33, 87, 88, 33, 89, 90, 33, 91, 33, 33, 33, 90,
+ 33, 92, 93, 33, 33, 94, 33, 33, 33, 33, 33, 33, 33, 95, 33, 33,
+
+/* block 5 */
+ 96, 33, 33, 96, 33, 33, 33, 33, 96, 97, 98, 98, 99, 33, 33, 33,
+ 33, 33,100, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+101,101,101,101,101,101,101,101,101,102,102,102,102,102,102,102,
+102,102, 14, 14, 14, 14,102,102,102,102,102,102,102,102,102,102,
+102,102, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+101,101,101,101,101, 14, 14, 14, 14, 14,103,103,102, 14,102, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+
+/* block 6 */
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,105,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+106,107,106,107,102,108,106,107,109,109,110,111,111,111, 4,109,
+
+/* block 7 */
+109,109,109,109,108, 14,112, 4,113,113,113,109,114,109,115,115,
+116,117,118,117,117,119,117,117,120,121,122,117,123,117,117,117,
+124,125,109,126,117,117,127,117,117,128,117,117,129,130,130,130,
+116,131,132,131,131,133,131,131,134,135,136,131,137,131,131,131,
+138,139,140,141,131,131,142,131,131,143,131,131,144,145,145,146,
+147,148,149,149,149,150,151,152,106,107,106,107,106,107,106,107,
+106,107,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+155,156,157,116,158,159,160,106,107,161,106,107,116,162,162,162,
+
+/* block 8 */
+163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+
+/* block 9 */
+167,168,169,170,170,104,104,170,171,171,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+172,167,168,167,168,167,168,167,168,167,168,167,168,167,168,173,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+
+/* block 10 */
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,109,109,109,109,109,109,109,109,
+109,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+174,174,174,174,174,174,174,109,109,175,176,176,176,176,176,176,
+109,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+
+/* block 11 */
+177,177,177,177,177,177,177,178,109, 4,179,109,109,109,109,180,
+109,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+181,181,181,181,181,181,181,181,181,181,181,181,181,181,182,181,
+183,181,181,183,181,181,183,181,109,109,109,109,109,109,109,109,
+184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+184,184,184,184,184,184,184,184,184,184,184,109,109,109,109,109,
+184,184,184,183,183,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 12 */
+185,185,185,185,185,109,186,186,186,187,187,188, 4,187,189,189,
+190,190,190,190,190,190,190,190,190,190,190, 4,109,109,187, 4,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+102,191,191,191,191,191,191,191,191,191,191,104,104,104,104,104,
+104,104,104,104,104,104,190,190,190,190,190,190,190,190,190,190,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,187,187,187,187,191,191,
+104,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 13 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,187,191,190,190,190,190,190,190,190, 22,189,190,
+190,190,190,190,190,192,192,190,190,189,190,190,190,190,191,191,
+193,193,193,193,193,193,193,193,193,193,191,191,191,189,189,191,
+
+/* block 14 */
+194,194,194,194,194,194,194,194,194,194,194,194,194,194,109,195,
+196,197,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
+196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
+197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,
+197,197,197,197,197,197,197,197,197,197,197,109,109,196,196,196,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 15 */
+198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
+198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
+198,198,198,198,198,198,199,199,199,199,199,199,199,199,199,199,
+199,198,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+200,200,200,200,200,200,200,200,200,200,201,201,201,201,201,201,
+201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
+201,201,201,201,201,201,201,201,201,201,201,202,202,202,202,202,
+202,202,202,202,203,203,204,205,205,205,203,109,109,109,109,109,
+
+/* block 16 */
+206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
+206,206,206,206,206,206,207,207,207,207,208,207,207,207,207,207,
+207,207,207,207,208,207,207,207,208,207,207,207,207,207,109,109,
+209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,109,
+210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
+210,210,210,210,210,210,210,210,210,211,211,211,109,109,212,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 17 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+191,109,191,191,191,191,191,191,191,191,191,191,191,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,190,190,190,190,190,190,190,190,190,190,190,190,
+190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,109,
+
+/* block 18 */
+213,213,213,214,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,215,215,215,215,213,214,213,215,214,214,
+214,213,213,213,213,213,213,213,213,214,214,214,214,213,214,214,
+215,104,104,213,213,213,213,213,215,215,215,215,215,215,215,215,
+215,215,213,213, 4, 4,216,216,216,216,216,216,216,216,216,216,
+217,218,215,215,215,215,215,215,109,215,215,215,215,215,215,215,
+
+/* block 19 */
+109,219,220,220,109,221,221,221,221,221,221,221,221,109,109,221,
+221,109,109,221,221,221,221,221,221,221,221,221,221,221,221,221,
+221,221,221,221,221,221,221,221,221,109,221,221,221,221,221,221,
+221,109,221,109,109,109,221,221,221,221,109,109,219,221,222,220,
+220,219,219,219,219,109,109,220,220,109,109,220,220,219,221,109,
+109,109,109,109,109,109,109,222,109,109,109,109,221,221,109,221,
+221,221,219,219,109,109,223,223,223,223,223,223,223,223,223,223,
+221,221,224,224,225,225,225,225,225,225,226,224,109,109,109,109,
+
+/* block 20 */
+109,227,227,228,109,229,229,229,229,229,229,109,109,109,109,229,
+229,109,109,229,229,229,229,229,229,229,229,229,229,229,229,229,
+229,229,229,229,229,229,229,229,229,109,229,229,229,229,229,229,
+229,109,229,229,109,229,229,109,229,229,109,109,227,109,228,228,
+228,227,227,109,109,109,109,227,227,109,109,227,227,227,109,109,
+109,227,109,109,109,109,109,109,109,229,229,229,229,109,229,109,
+109,109,109,109,109,109,230,230,230,230,230,230,230,230,230,230,
+227,227,229,229,229,227,109,109,109,109,109,109,109,109,109,109,
+
+/* block 21 */
+109,231,231,232,109,233,233,233,233,233,233,233,233,233,109,233,
+233,233,109,233,233,233,233,233,233,233,233,233,233,233,233,233,
+233,233,233,233,233,233,233,233,233,109,233,233,233,233,233,233,
+233,109,233,233,109,233,233,233,233,233,109,109,231,233,232,232,
+232,231,231,231,231,231,109,231,231,232,109,232,232,231,109,109,
+233,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+233,233,231,231,109,109,234,234,234,234,234,234,234,234,234,234,
+235,236,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 22 */
+109,237,238,238,109,239,239,239,239,239,239,239,239,109,109,239,
+239,109,109,239,239,239,239,239,239,239,239,239,239,239,239,239,
+239,239,239,239,239,239,239,239,239,109,239,239,239,239,239,239,
+239,109,239,239,109,239,239,239,239,239,109,109,237,239,240,237,
+238,237,237,237,237,109,109,238,238,109,109,238,238,237,109,109,
+109,109,109,109,109,109,237,240,109,109,109,109,239,239,109,239,
+239,239,237,237,109,109,241,241,241,241,241,241,241,241,241,241,
+242,239,243,243,243,243,243,243,109,109,109,109,109,109,109,109,
+
+/* block 23 */
+109,109,244,245,109,245,245,245,245,245,245,109,109,109,245,245,
+245,109,245,245,245,245,109,109,109,245,245,109,245,109,245,245,
+109,109,109,245,245,109,109,109,245,245,245,109,109,109,245,245,
+245,245,245,245,245,245,245,245,245,245,109,109,109,109,246,247,
+244,247,247,109,109,109,247,247,247,109,247,247,247,244,109,109,
+245,109,109,109,109,109,109,246,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,248,248,248,248,248,248,248,248,248,248,
+249,249,249,250,250,250,250,250,250,251,250,109,109,109,109,109,
+
+/* block 24 */
+109,252,252,252,109,253,253,253,253,253,253,253,253,109,253,253,
+253,109,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
+253,253,253,253,253,253,253,253,253,109,253,253,253,253,253,253,
+253,253,253,253,109,253,253,253,253,253,109,109,109,253,254,254,
+254,252,252,252,252,109,254,254,254,109,254,254,254,254,109,109,
+109,109,109,109,109,254,254,109,253,253,109,109,109,109,109,109,
+253,253,254,254,109,109,255,255,255,255,255,255,255,255,255,255,
+109,109,109,109,109,109,109,109,256,256,256,256,256,256,256,257,
+
+/* block 25 */
+109,109,258,258,109,259,259,259,259,259,259,259,259,109,259,259,
+259,109,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
+259,259,259,259,259,259,259,259,259,109,259,259,259,259,259,259,
+259,259,259,259,109,259,259,259,259,259,109,109,260,259,258,260,
+258,258,261,258,258,109,260,258,258,109,258,258,260,260,109,109,
+109,109,109,109,109,261,261,109,109,109,109,109,109,109,259,109,
+259,259,260,260,109,109,262,262,262,262,262,262,262,262,262,262,
+109,259,259,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 26 */
+109,109,263,263,109,264,264,264,264,264,264,264,264,109,264,264,
+264,109,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
+264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
+264,264,264,264,264,264,264,264,264,264,264,109,109,264,265,263,
+263,266,266,266,266,109,263,263,263,109,263,263,263,266,264,109,
+109,109,109,109,109,109,109,265,109,109,109,109,109,109,109,109,
+264,264,266,266,109,109,267,267,267,267,267,267,267,267,267,267,
+268,268,268,268,268,268,109,109,109,269,264,264,264,264,264,264,
+
+/* block 27 */
+109,109,270,270,109,271,271,271,271,271,271,271,271,271,271,271,
+271,271,271,271,271,271,271,109,109,109,271,271,271,271,271,271,
+271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
+271,271,109,271,271,271,271,271,271,271,271,271,109,271,109,109,
+271,271,271,271,271,271,271,109,109,109,272,109,109,109,109,273,
+270,270,272,272,272,109,272,109,270,270,270,270,270,270,270,273,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,270,270,274,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 28 */
+109,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
+275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
+275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
+275,276,275,277,276,276,276,276,276,276,276,109,109,109,109, 5,
+275,275,275,275,275,275,278,276,276,276,276,276,276,276,276,279,
+280,280,280,280,280,280,280,280,280,280,279,279,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 29 */
+109,281,281,109,281,109,109,281,281,109,281,109,109,281,109,109,
+109,109,109,109,281,281,281,281,109,281,281,281,281,281,281,281,
+109,281,281,281,109,281,109,281,109,109,281,281,109,281,281,281,
+281,282,281,283,282,282,282,282,282,282,109,282,282,281,109,109,
+281,281,281,281,281,109,284,109,282,282,282,282,282,282,109,109,
+285,285,285,285,285,285,285,285,285,285,109,109,281,281,281,281,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 30 */
+286,287,287,287,288,288,288,288,288,288,288,288,288,288,288,288,
+288,288,288,287,288,287,287,287,289,289,287,287,287,287,287,287,
+290,290,290,290,290,290,290,290,290,290,291,291,291,291,291,291,
+291,291,291,291,287,289,287,289,287,289,292,293,292,293,294,294,
+286,286,286,286,286,286,286,286,109,286,286,286,286,286,286,286,
+286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
+286,286,286,286,286,286,286,286,286,286,286,286,286,109,109,109,
+109,289,289,289,289,289,289,289,289,289,289,289,289,289,289,294,
+
+/* block 31 */
+289,289,289,289,289,288,289,289,286,286,286,286,286,289,289,289,
+289,289,289,289,289,289,289,289,109,289,289,289,289,289,289,289,
+289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
+289,289,289,289,289,289,289,289,289,289,289,289,289,109,287,287,
+287,287,287,287,287,287,289,287,287,287,287,287,287,109,287,287,
+288,288,288,288,288, 19, 19, 19, 19,288,288,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 32 */
+295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
+295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
+295,295,295,295,295,295,295,295,295,295,295,296,296,297,297,297,
+297,298,297,297,297,297,297,297,296,297,297,298,298,297,297,295,
+299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300,
+295,295,295,295,295,295,298,298,297,297,295,295,295,295,297,297,
+297,295,296,296,296,295,295,296,296,296,296,296,296,296,295,295,
+295,297,297,297,297,295,295,295,295,295,295,295,295,295,295,295,
+
+/* block 33 */
+295,295,297,296,298,297,297,296,296,296,296,296,296,297,295,296,
+299,299,299,299,299,299,299,299,299,299,296,296,296,297,301,301,
+302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
+302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
+302,302,302,302,302,302,109,302,109,109,109,109,109,302,109,109,
+303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
+303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
+303,303,303,303,303,303,303,303,303,303,303, 4,304,303,303,303,
+
+/* block 34 */
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
+306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
+
+/* block 35 */
+306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
+306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
+306,306,306,306,306,306,306,306,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+
+/* block 36 */
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,109,308,308,308,308,109,109,
+308,308,308,308,308,308,308,109,308,109,308,308,308,308,109,109,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+
+/* block 37 */
+308,308,308,308,308,308,308,308,308,109,308,308,308,308,109,109,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,109,
+308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+
+/* block 38 */
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,308,308,308,308,109,109,309,309,309,
+310,310,310,310,310,310,310,310,310,311,311,311,311,311,311,311,
+311,311,311,311,311,311,311,311,311,311,311,311,311,109,109,109,
+
+/* block 39 */
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+312,312,312,312,312,312,312,312,312,312,109,109,109,109,109,109,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 40 */
+314,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+
+/* block 41 */
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+
+/* block 42 */
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,316,316,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+
+/* block 43 */
+317,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,319,320,109,109,109,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321, 4, 4, 4,322,322,
+322,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 44 */
+323,323,323,323,323,323,323,323,323,323,323,323,323,109,323,323,
+323,323,324,324,324,109,109,109,109,109,109,109,109,109,109,109,
+325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,
+325,325,326,326,326, 4, 4,109,109,109,109,109,109,109,109,109,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,328,328,109,109,109,109,109,109,109,109,109,109,109,109,
+329,329,329,329,329,329,329,329,329,329,329,329,329,109,329,329,
+329,109,330,330,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 45 */
+331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
+331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
+331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
+331,331,331,331,332,332,333,332,332,332,332,332,332,332,333,333,
+333,333,333,333,333,333,332,333,333,332,332,332,332,332,332,332,
+332,332,332,332,334,334,334,335,334,334,334,336,331,332,109,109,
+337,337,337,337,337,337,337,337,337,337,109,109,109,109,109,109,
+338,338,338,338,338,338,338,338,338,338,109,109,109,109,109,109,
+
+/* block 46 */
+339,339, 4, 4,339, 4,340,339,339,339,339,341,341,341,342,109,
+343,343,343,343,343,343,343,343,343,343,109,109,109,109,109,109,
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,345,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,109,109,109,109,109,109,109,109,
+
+/* block 47 */
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
+344,344,344,344,344,344,344,344,344,341,344,109,109,109,109,109,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,109,109,109,109,109,109,109,109,109,109,
+
+/* block 48 */
+346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,
+346,346,346,346,346,346,346,346,346,346,346,346,346,109,109,109,
+347,347,347,348,348,348,348,347,347,348,348,348,109,109,109,109,
+348,348,347,348,348,348,348,348,348,347,347,347,109,109,109,109,
+349,109,109,109,350,350,351,351,351,351,351,351,351,351,351,351,
+352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,
+352,352,352,352,352,352,352,352,352,352,352,352,352,352,109,109,
+352,352,352,352,352,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 49 */
+353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
+353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
+353,353,353,353,353,353,353,353,353,353,353,353,109,109,109,109,
+354,354,354,354,354,355,355,355,354,354,355,354,354,354,354,354,
+354,353,353,353,353,353,353,353,354,354,109,109,109,109,109,109,
+356,356,356,356,356,356,356,356,356,356,357,109,109,109,358,358,
+359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
+
+/* block 50 */
+360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,
+360,360,360,360,360,360,360,361,361,362,362,362,109,109,363,363,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
+364,364,364,364,364,365,366,365,366,366,366,366,366,366,366,109,
+366,367,366,367,367,366,366,366,366,366,366,366,366,365,365,365,
+365,365,365,366,366,366,366,366,366,366,366,366,366,109,109,366,
+
+/* block 51 */
+368,368,368,368,368,368,368,368,368,368,109,109,109,109,109,109,
+368,368,368,368,368,368,368,368,368,368,109,109,109,109,109,109,
+369,369,369,369,369,369,369,370,369,369,369,369,369,369,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 52 */
+371,371,371,371,372,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
+373,373,373,373,371,372,371,371,371,371,371,372,371,372,372,372,
+372,372,371,372,372,373,373,373,373,373,373,373,109,109,109,109,
+374,374,374,374,374,374,374,374,374,374,375,375,375,375,375,375,
+375,376,376,376,376,376,376,376,376,376,376,371,371,371,371,371,
+371,371,371,371,376,376,376,376,376,376,376,376,376,109,109,109,
+
+/* block 53 */
+377,377,378,379,379,379,379,379,379,379,379,379,379,379,379,379,
+379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,
+379,378,377,377,377,377,378,378,377,377,378,377,378,378,379,379,
+380,380,380,380,380,380,380,380,380,380,379,379,379,379,379,379,
+381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,
+381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,
+381,381,381,381,381,381,382,383,382,382,383,383,383,382,383,382,
+382,382,383,383,109,109,109,109,109,109,109,109,384,384,384,384,
+
+/* block 54 */
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
+385,385,385,385,386,386,386,386,386,386,386,386,387,387,387,387,
+387,387,387,387,386,386,387,387,109,109,109,388,388,388,388,388,
+389,389,389,389,389,389,389,389,389,389,109,109,109,385,385,385,
+390,390,390,390,390,390,390,390,390,390,391,391,391,391,391,391,
+391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
+391,391,391,391,391,391,391,391,392,392,392,392,392,392,393,393,
+
+/* block 55 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+394,394,394,394,394,394,394,394,109,109,109,109,109,109,109,109,
+104,104,104, 4,104,104,104,104,104,104,104,104,104,104,104,104,
+104,395,104,104,104,104,104,104,104,396,396,396,396,104,396,396,
+396,396,395,395,104,396,396,109,109,109,109,109,109,109,109,109,
+
+/* block 56 */
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33,116,116,116,116,116,397,101,101,101,101,
+101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
+101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
+101,101,101,101,101,101,101,101,101,101,101,101,101,110,110,110,
+110,110,101,101,101,101,110,110,110,110,110, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,398,399, 33, 33, 33,400, 33, 33,
+
+/* block 57 */
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,101,101,101,101,101,
+101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
+101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,110,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,104,104,104,104,
+
+/* block 58 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+401,402, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 59 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,403, 33, 33,404, 33,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 60 */
+405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
+405,405,405,405,405,405,109,109,406,406,406,406,406,406,109,109,
+405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
+405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
+405,405,405,405,405,405,109,109,406,406,406,406,406,406,109,109,
+116,405,116,405,116,405,116,405,109,406,109,406,109,406,109,406,
+405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
+407,407,408,408,408,408,409,409,410,410,411,411,412,412,109,109,
+
+/* block 61 */
+405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
+405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
+405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
+405,405,116,414,116,109,116,116,406,406,415,415,416,108,417,108,
+108,108,116,414,116,109,116,116,418,418,418,418,416,108,108,108,
+405,405,116,116,109,109,116,116,406,406,419,419,109,108,108,108,
+405,405,116,116,116,157,116,116,406,406,420,420,161,108,108,108,
+109,109,116,414,116,109,116,116,421,421,422,422,416,108,108,109,
+
+/* block 62 */
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22,423,423, 22, 22,
+ 9, 9, 9, 9, 9, 9, 4, 4, 21, 25, 6, 21, 21, 25, 6, 21,
+ 4, 4, 4, 4, 4, 4, 4, 4,424,425, 22, 22, 22, 22, 22, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 21, 25, 4, 4, 4, 4, 15,
+ 15, 4, 4, 4, 8, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 8, 4, 15, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3,
+ 22, 22, 22, 22, 22,426,426,426,426,426, 22, 22, 22, 22, 22, 22,
+ 23,101,109,109, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,101,
+
+/* block 63 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,109,
+101,101,101,101,101,101,101,101,101,101,101,101,101,109,109,109,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+104,104,104,104,104,104,104,104,104,104,104,104,104,427,427,427,
+427,104,427,427,427,104,104,104,104,104,104,104,104,104,104,104,
+104,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 64 */
+ 19, 19,428, 19, 19, 19, 19,428, 19, 19,429,428,428,428,429,429,
+428,428,428,429, 19,428, 19, 19, 8,428,428,428,428,428, 19, 19,
+ 19, 19, 19, 19,428, 19,430, 19,428, 19,431,432,428,428, 19,429,
+428,428,433,428,429,396,396,396,396,429, 19, 19,429,429,428,428,
+ 8, 8, 8, 8, 8,428,429,429,429,429, 19, 8, 19, 19,434, 19,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,
+436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
+
+/* block 65 */
+437,437,437, 30, 31,437,437,437,437, 23,109,109,109,109,109,109,
+ 8, 8, 8, 8, 8, 19, 19, 19, 19, 19, 8, 8, 19, 19, 19, 19,
+ 8, 19, 19, 8, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 8, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8,
+ 19, 19, 8, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 66 */
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 67 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 19, 19, 19, 19, 19, 19, 19, 6, 7, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19,
+
+/* block 68 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8,
+ 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 69 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 70 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 71 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 72 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 73 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 74 */
+109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 6, 7, 6, 7, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 75 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 8, 8, 8, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 76 */
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
+
+/* block 77 */
+ 8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+ 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 6, 7, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 8,
+
+/* block 78 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 19, 19, 8, 8, 8, 8, 8, 8,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 79 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 80 */
+441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
+441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
+441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,109,
+442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,
+442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,
+442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,109,
+ 30, 31,443,444,445,446,447, 30, 31, 30, 31, 30, 31,448,449,450,
+451, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,101,101,452,452,
+
+/* block 81 */
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
+153,154,153,154,453,454,454,454,454,454,454,153,154,153,154,455,
+455,455,153,154,109,109,109,109,109,456,456,456,456,457,456,456,
+
+/* block 82 */
+458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,
+458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,
+458,458,458,458,458,458,109,458,109,109,109,109,109,458,109,109,
+459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
+459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
+459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
+459,459,459,459,459,459,459,459,109,109,109,109,109,109,109,460,
+461,109,109,109,109,109,109,109,109,109,109,109,109,109,109,462,
+
+/* block 83 */
+308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
+308,308,308,308,308,308,308,109,109,109,109,109,109,109,109,109,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
+170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+
+/* block 84 */
+ 4, 4, 21, 25, 21, 25, 4, 4, 4, 21, 25, 4, 21, 25, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 9, 4, 21, 25, 4, 4,
+ 21, 25, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,102,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 85 */
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,109,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 86 */
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+
+/* block 87 */
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
+463,463,463,463,463,463,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
+
+/* block 88 */
+ 3, 4, 4, 4, 19,464,396,465, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7, 9, 6, 7, 7,
+ 19,465,465,465,465,465,465,465,465,465,104,104,104,104,466,466,
+ 9,102,102,102,102,102, 19, 19,465,465,465,464,396, 4, 19, 19,
+109,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+
+/* block 89 */
+467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
+467,467,467,467,467,467,467,109,109,104,104, 14, 14,468,468,467,
+ 9,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469, 4,102,470,470,469,
+
+/* block 90 */
+109,109,109,109,109,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,109,109,
+109,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+
+/* block 91 */
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,109,
+ 19, 19, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
+471,471,471,471,471,471,471,471,471,471,471,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+
+/* block 92 */
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,109,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473, 19,
+
+/* block 93 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,109,
+
+/* block 94 */
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
+474,474,474,474,474,474,474,474, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 95 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+
+/* block 96 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 97 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 98 */
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,477,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+
+/* block 99 */
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+
+/* block 100 */
+476,476,476,476,476,476,476,476,476,476,476,476,476,109,109,109,
+478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
+478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
+478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
+478,478,478,478,478,478,478,109,109,109,109,109,109,109,109,109,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,480,480,480,480,480,480,481,481,
+
+/* block 101 */
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+
+/* block 102 */
+482,482,482,482,482,482,482,482,482,482,482,482,483,484,484,484,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+485,485,485,485,485,485,485,485,485,485,482,482,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,486,170,
+171,171,171,487,170,170,170,170,170,170,170,170,170,170,487,398,
+
+/* block 103 */
+167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
+167,168,167,168,167,168,167,168,109,109,109,109,109,109,109,170,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,489,489,489,489,489,489,489,489,489,489,
+490,490,491,491,491,491,491,491,109,109,109,109,109,109,109,109,
+
+/* block 104 */
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14,102,102,102,102,102,102,102,102,102,
+ 14, 14, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+101, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,492, 30, 31,
+
+/* block 105 */
+ 30, 31, 30, 31, 30, 31, 30, 31,102, 14, 14, 30, 31,493, 33,109,
+ 30, 31, 30, 31,109,109,109,109,109,109,109,109,109,109,109,109,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,494,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,101,101, 33, 20, 20, 20, 20, 20,
+
+/* block 106 */
+495,495,496,495,495,495,496,495,495,495,495,496,495,495,495,495,
+495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,
+495,495,495,497,497,496,496,497,498,498,498,498,109,109,109,109,
+ 23, 23, 23, 23, 23, 23, 19, 19, 5, 19,109,109,109,109,109,109,
+499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
+499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
+499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
+499,499,499,499,500,500,500,500,109,109,109,109,109,109,109,109,
+
+/* block 107 */
+501,501,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
+502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
+502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
+502,502,502,502,501,501,501,501,501,501,501,501,501,501,501,501,
+501,501,501,501,503,109,109,109,109,109,109,109,109,109,504,504,
+505,505,505,505,505,505,505,505,505,505,109,109,109,109,109,109,
+213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
+213,213,215,215,215,215,215,215,217,217,217,215,109,109,109,109,
+
+/* block 108 */
+506,506,506,506,506,506,506,506,506,506,507,507,507,507,507,507,
+507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
+507,507,507,507,507,507,508,508,508,508,508,508,508,508,509,509,
+510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
+510,510,510,510,510,510,510,511,511,511,511,511,511,511,511,511,
+511,511,512,512,109,109,109,109,109,109,109,109,109,109,109,513,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,109,109,109,
+
+/* block 109 */
+514,514,514,515,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,514,515,515,514,514,514,514,515,515,514,515,515,515,
+515,517,517,517,517,517,517,517,517,517,517,517,517,517,109,518,
+519,519,519,519,519,519,519,519,519,519,109,109,109,109,517,517,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 110 */
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
+520,520,520,520,520,520,520,520,520,521,521,521,521,521,521,522,
+522,521,521,522,522,521,521,109,109,109,109,109,109,109,109,109,
+520,520,520,521,520,520,520,520,520,520,520,520,521,522,109,109,
+523,523,523,523,523,523,523,523,523,523,109,109,524,524,524,524,
+295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
+525,295,295,295,295,295,295,301,301,301,295,296,109,109,109,109,
+
+/* block 111 */
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
+527,526,527,527,527,526,526,527,527,526,526,526,526,526,527,527,
+526,527,526,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,526,526,528,529,529,
+530,530,530,530,530,530,530,530,530,530,530,531,532,532,531,531,
+533,533,530,534,534,531,532,109,109,109,109,109,109,109,109,109,
+
+/* block 112 */
+109,308,308,308,308,308,308,109,109,308,308,308,308,308,308,109,
+109,308,308,308,308,308,308,109,109,109,109,109,109,109,109,109,
+308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 113 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
+530,530,530,531,531,532,531,531,532,531,531,533,531,532,109,109,
+535,535,535,535,535,535,535,535,535,535,109,109,109,109,109,109,
+
+/* block 114 */
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+
+/* block 115 */
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+
+/* block 116 */
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+
+/* block 117 */
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+
+/* block 118 */
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+
+/* block 119 */
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+
+/* block 120 */
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,536,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,536,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+
+/* block 121 */
+537,537,537,537,537,537,537,537,536,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,109,109,109,109,109,109,109,109,109,109,109,109,
+306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
+306,306,306,306,306,306,306,109,109,109,109,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
+307,307,307,307,307,307,307,307,307,307,307,307,109,109,109,109,
+
+/* block 122 */
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
+
+/* block 123 */
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+
+/* block 124 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+
+/* block 125 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 126 */
+ 33, 33, 33, 33, 33, 33, 33,109,109,109,109,109,109,109,109,109,
+109,109,109,178,178,178,178,178,109,109,109,109,109,184,181,184,
+184,184,184,184,184,184,184,184,184,540,184,184,184,184,184,184,
+184,184,184,184,184,184,184,109,184,184,184,184,184,109,184,109,
+184,184,109,184,184,109,184,184,184,184,184,184,184,184,184,184,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 127 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,541,541,541,541,541,541,541,541,541,541,541,541,541,541,
+541,541,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 128 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 129 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191, 6, 7,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+
+/* block 130 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+109,109,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+191,191,191,191,191,191,191,191,191,191,191,191,188, 19,109,109,
+
+/* block 131 */
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+ 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,109,109,109,109,109,109,
+104,104,104,104,104,104,104,109,109,109,109,109,109,109,109,109,
+ 4, 9, 9, 15, 15, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+ 7, 6, 7, 6, 7, 4, 4, 6, 7, 4, 4, 4, 4, 15, 15, 15,
+ 4, 4, 4,109, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
+ 4, 4, 8, 9, 8, 8, 8,109, 4, 5, 4, 4,109,109,109,109,
+191,191,191,191,191,109,191,191,191,191,191,191,191,191,191,191,
+
+/* block 132 */
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,109,109, 22,
+
+/* block 133 */
+109, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
+ 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
+ 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 6,
+ 7, 4, 6, 7, 4, 4,469,469,469,469,469,469,469,469,469,469,
+102,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+
+/* block 134 */
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,542,542,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,109,
+109,109,472,472,472,472,472,472,109,109,472,472,472,472,472,472,
+109,109,472,472,472,472,472,472,109,109,472,472,472,109,109,109,
+ 5, 5, 8, 14, 19, 5, 5,109, 19, 8, 8, 8, 8, 19, 19,109,
+426,426,426,426,426,426,426,426,426, 22, 22, 22, 19, 19,109,109,
+
+/* block 135 */
+543,543,543,543,543,543,543,543,543,543,543,543,109,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,109,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,109,543,543,109,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,109,109,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 136 */
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
+543,543,543,543,543,543,543,543,543,543,543,109,109,109,109,109,
+
+/* block 137 */
+ 4, 4, 4,109,109,109,109, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
+544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
+544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
+544,544,544,544,544,545,545,545,545,546,546,546,546,546,546,546,
+
+/* block 138 */
+546,546,546,546,546,546,546,546,546,546,545,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,104,109,109,
+
+/* block 139 */
+547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,
+547,547,547,547,547,547,547,547,547,547,547,547,547,109,109,109,
+548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
+548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
+548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
+548,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 140 */
+549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,
+549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,109,
+550,550,550,550,109,109,109,109,109,109,109,109,109,109,109,109,
+551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
+551,552,551,551,551,551,551,551,551,551,552,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 141 */
+553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,
+553,553,553,553,553,553,553,553,553,553,553,553,553,553,109,554,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,109,109,109,109,555,555,555,555,555,555,555,555,
+556,557,557,557,557,557,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 142 */
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
+558,558,558,558,558,558,558,558,559,559,559,559,559,559,559,559,
+559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
+559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
+
+/* block 143 */
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,109,109,
+562,562,562,562,562,562,562,562,562,562,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 144 */
+563,563,563,563,563,563,109,109,563,109,563,563,563,563,563,563,
+563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,
+563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,
+563,563,563,563,563,563,109,563,563,109,109,109,563,109,109,563,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,109,565,566,566,566,566,566,566,566,566,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 145 */
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+567,567,567,567,567,567,568,568,568,568,568,568,109,109,109,569,
+570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
+570,570,570,570,570,570,570,570,570,570,109,109,109,109,109,571,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 146 */
+572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,
+572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
+573,573,573,573,573,573,573,573,109,109,109,109,109,109,573,573,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 147 */
+574,575,575,575,109,575,575,109,109,109,109,109,575,575,575,575,
+574,574,574,574,109,574,574,574,109,574,574,574,574,574,574,574,
+574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
+574,574,574,574,109,109,109,109,575,575,575,109,109,109,109,575,
+576,576,576,576,576,576,576,576,109,109,109,109,109,109,109,109,
+577,577,577,577,577,577,577,577,577,109,109,109,109,109,109,109,
+578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
+578,578,578,578,578,578,578,578,578,578,578,578,578,579,579,580,
+
+/* block 148 */
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+581,581,581,581,581,581,109,109,109,582,582,582,582,582,582,582,
+583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
+583,583,583,583,583,583,109,109,584,584,584,584,584,584,584,584,
+585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,
+585,585,585,109,109,109,109,109,586,586,586,586,586,586,586,586,
+
+/* block 149 */
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 150 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
+588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,109,
+
+/* block 151 */
+589,590,589,591,591,591,591,591,591,591,591,591,591,591,591,591,
+591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
+591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
+591,591,591,591,591,591,591,591,590,590,590,590,590,590,590,590,
+590,590,590,590,590,590,590,592,592,592,592,592,592,592,109,109,
+109,109,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
+593,593,593,593,593,593,594,594,594,594,594,594,594,594,594,594,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 152 */
+595,595,596,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
+596,596,596,595,595,595,595,596,596,595,595,598,598,599,598,598,
+598,598,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,
+600,600,600,600,600,600,600,600,600,109,109,109,109,109,109,109,
+601,601,601,601,601,601,601,601,601,601,109,109,109,109,109,109,
+
+/* block 153 */
+602,602,602,603,603,603,603,603,603,603,603,603,603,603,603,603,
+603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
+603,603,603,603,603,603,603,602,602,602,602,602,604,602,602,602,
+602,602,602,602,602,109,605,605,605,605,605,605,605,605,605,605,
+606,606,606,606,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 154 */
+607,607,608,609,609,609,609,609,609,609,609,609,609,609,609,609,
+609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
+609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
+609,609,609,608,608,608,607,607,607,607,607,607,607,607,607,608,
+608,609,609,609,609,610,610,610,610,109,109,109,109,109,109,109,
+611,611,611,611,611,611,611,611,611,611,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 155 */
+612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
+612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
+612,612,612,612,612,612,612,612,612,612,612,613,614,613,614,614,
+613,613,613,613,613,613,614,613,109,109,109,109,109,109,109,109,
+615,615,615,615,615,615,615,615,615,615,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 156 */
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+
+/* block 157 */
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
+616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 158 */
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
+617,617,617,109,109,109,109,109,109,109,109,109,109,109,109,109,
+618,618,618,618,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 159 */
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+
+/* block 160 */
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
+619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 161 */
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+
+/* block 162 */
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 163 */
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,109,109,109,109,109,109,109,109,109,109,109,
+620,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
+621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
+621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,109,
+
+/* block 164 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,622,
+622,622,622,623,623,623,623,623,623,623,623,623,623,623,623,623,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 165 */
+469,467,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 166 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,
+
+/* block 167 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,109,109, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19,624,395,104,104,104, 19, 19, 19,395,624,624,
+624,624,624, 22, 22, 22, 22, 22, 22, 22, 22,104,104,104,104,104,
+
+/* block 168 */
+104,104,104, 19, 19,104,104,104,104,104,104,104, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,104,104,104,104, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 169 */
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,625,625,625,546,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 170 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 171 */
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,429,429,
+429,429,429,429,429,109,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+
+/* block 172 */
+428,428,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,428,109,428,428,
+109,109,428,109,109,428,428,109,109,428,428,428,428,109,428,428,
+428,428,428,428,428,428,429,429,429,429,109,429,109,429,429,429,
+429,429,429,429,109,429,429,429,429,429,429,429,429,429,429,429,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+
+/* block 173 */
+429,429,429,429,428,428,109,428,428,428,428,109,109,428,428,428,
+428,428,428,428,428,109,428,428,428,428,428,428,428,109,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,428,428,109,428,428,428,428,109,
+428,428,428,428,428,109,428,109,109,109,428,428,428,428,428,428,
+428,109,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+
+/* block 174 */
+428,428,428,428,428,428,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+
+/* block 175 */
+429,429,429,429,429,429,429,429,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+
+/* block 176 */
+428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,109,109,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428, 8,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429, 8,429,429,429,429,
+429,429,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428, 8,429,429,429,429,
+
+/* block 177 */
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429, 8,429,429,429,429,429,429,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428, 8,429,429,429,429,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429, 8,
+429,429,429,429,429,429,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428, 8,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+
+/* block 178 */
+429,429,429,429,429,429,429,429,429, 8,429,429,429,429,429,429,
+428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
+428,428,428,428,428,428,428,428,428, 8,429,429,429,429,429,429,
+429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
+429,429,429, 8,429,429,429,429,429,429,428,429,109,109, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+
+/* block 179 */
+191,191,191,191,109,191,191,191,191,191,191,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+109,191,191,109,191,109,109,191,109,191,191,191,191,191,191,191,
+191,191,191,109,191,191,191,191,109,191,109,191,109,109,109,109,
+109,109,191,109,109,109,109,191,109,191,109,191,109,191,191,191,
+109,191,191,109,191,109,109,191,109,191,109,191,109,191,109,191,
+109,191,191,109,191,109,109,191,191,191,191,109,191,191,191,191,
+191,191,191,109,191,191,191,191,109,191,191,191,191,109,191,109,
+
+/* block 180 */
+191,191,191,191,191,191,191,191,191,191,109,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,109,109,109,109,
+109,191,191,191,109,191,191,191,191,191,109,191,191,191,191,191,
+191,191,191,191,191,191,191,191,191,191,191,191,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+186,186,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 181 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 182 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
+109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
+109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 183 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 184 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,626,626,626,626,626,626,626,626,626,626,
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+
+/* block 185 */
+627, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,
+ 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 186 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19,109, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,
+
+/* block 187 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19,109, 19, 19, 19, 19, 19,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 188 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
+ 19,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 189 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,109, 19, 19, 19, 19,109,109,109,
+
+/* block 190 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 191 */
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109, 19, 19, 19, 19, 19,
+
+/* block 192 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19,109,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 193 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 194 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 195 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 196 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,109,109,109,109,109,109,109,109,109,109,109,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+
+/* block 197 */
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
+475,475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+
+/* block 198 */
+426, 22,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+
+/* block 199 */
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+
+/* block 200 */
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+
+/* block 201 */
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
+426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
+
+/* block 202 */
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
+539,539,539,539,539,539,539,539,539,539,539,539,539,539,109,109,
+
+};
+
+#if UCD_BLOCK_SIZE != 128
+#error Please correct UCD_BLOCK_SIZE in pcre_internal.h
+#endif
+#endif /* SUPPORT_UCP */
+
+#endif /* PCRE_INCLUDED */
diff --git a/erts/emulator/pcre/pcre_ucp_searchfuncs.c b/erts/emulator/pcre/pcre_ucp_searchfuncs.c
deleted file mode 100644
index 6a20c227cf..0000000000
--- a/erts/emulator/pcre/pcre_ucp_searchfuncs.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains code for searching the table of Unicode character
-properties. */
-
-/* %ExternalCopyright% */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#include "ucp.h" /* Category definitions */
-#include "ucpinternal.h" /* Internal table details */
-#include "ucptable.h" /* The table itself */
-
-
-/* Table to translate from particular type value to the general value. */
-
-static const int ucp_gentype[] = {
- ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */
- ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */
- ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */
- ucp_N, ucp_N, ucp_N, /* Nd, Nl, No */
- ucp_P, ucp_P, ucp_P, ucp_P, ucp_P, /* Pc, Pd, Pe, Pf, Pi */
- ucp_P, ucp_P, /* Ps, Po */
- ucp_S, ucp_S, ucp_S, ucp_S, /* Sc, Sk, Sm, So */
- ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */
-};
-
-
-
-/*************************************************
-* Search table and return type *
-*************************************************/
-
-/* Three values are returned: the category is ucp_C, ucp_L, etc. The detailed
-character type is ucp_Lu, ucp_Nd, etc. The script is ucp_Latin, etc.
-
-Arguments:
- c the character value
- type_ptr the detailed character type is returned here
- script_ptr the script is returned here
-
-Returns: the character type category
-*/
-
-int
-_erts_pcre_ucp_findprop(const unsigned int c, int *type_ptr, int *script_ptr)
-{
-int bot = 0;
-int top = sizeof(ucp_table)/sizeof(cnode);
-int mid;
-
-/* The table is searched using a binary chop. You might think that using
-intermediate variables to hold some of the common expressions would speed
-things up, but tests with gcc 3.4.4 on Linux showed that, on the contrary, it
-makes things a lot slower. */
-
-for (;;)
- {
- if (top <= bot)
- {
- *type_ptr = ucp_Cn;
- *script_ptr = ucp_Common;
- return ucp_C;
- }
- mid = (bot + top) >> 1;
- if (c == (ucp_table[mid].f0 & f0_charmask)) break;
- if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid;
- else
- {
- if ((ucp_table[mid].f0 & f0_rangeflag) != 0 &&
- c <= (ucp_table[mid].f0 & f0_charmask) +
- (ucp_table[mid].f1 & f1_rangemask)) break;
- bot = mid + 1;
- }
- }
-
-/* Found an entry in the table. Set the script and detailed type values, and
-return the general type. */
-
-*script_ptr = (ucp_table[mid].f0 & f0_scriptmask) >> f0_scriptshift;
-*type_ptr = (ucp_table[mid].f1 & f1_typemask) >> f1_typeshift;
-
-return ucp_gentype[*type_ptr];
-}
-
-
-
-/*************************************************
-* Search table and return other case *
-*************************************************/
-
-/* If the given character is a letter, and there is another case for the
-letter, return the other case. Otherwise, return -1.
-
-Arguments:
- c the character value
-
-Returns: the other case or NOTACHAR if none
-*/
-
-unsigned int
-_erts_pcre_ucp_othercase(const unsigned int c)
-{
-int bot = 0;
-int top = sizeof(ucp_table)/sizeof(cnode);
-int mid, offset;
-
-/* The table is searched using a binary chop. You might think that using
-intermediate variables to hold some of the common expressions would speed
-things up, but tests with gcc 3.4.4 on Linux showed that, on the contrary, it
-makes things a lot slower. */
-
-for (;;)
- {
- if (top <= bot) return -1;
- mid = (bot + top) >> 1;
- if (c == (ucp_table[mid].f0 & f0_charmask)) break;
- if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid;
- else
- {
- if ((ucp_table[mid].f0 & f0_rangeflag) != 0 &&
- c <= (ucp_table[mid].f0 & f0_charmask) +
- (ucp_table[mid].f1 & f1_rangemask)) break;
- bot = mid + 1;
- }
- }
-
-/* Found an entry in the table. Return NOTACHAR for a range entry. Otherwise
-return the other case if there is one, else NOTACHAR. */
-
-if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return NOTACHAR;
-
-offset = ucp_table[mid].f1 & f1_casemask;
-if ((offset & f1_caseneg) != 0) offset |= f1_caseneg;
-return (offset == 0)? NOTACHAR : c + offset;
-}
-
-
-/* End of pcre_ucp_searchfuncs.c */
diff --git a/erts/emulator/pcre/pcre_valid_utf8.c b/erts/emulator/pcre/pcre_valid_utf8.c
index 30af207ae3..516d8f4725 100644
--- a/erts/emulator/pcre/pcre_valid_utf8.c
+++ b/erts/emulator/pcre/pcre_valid_utf8.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -55,109 +55,248 @@ strings. */
*************************************************/
/* This function is called (optionally) at the start of compile or match, to
-validate that a supposed UTF-8 string is actually valid. The early check means
+check that a supposed UTF-8 string is actually valid. The early check means
that subsequent code can assume it is dealing with a valid string. The check
-can be turned off for maximum performance, but the consequences of supplying
-an invalid string are then undefined.
+can be turned off for maximum performance, but the consequences of supplying an
+invalid string are then undefined.
Originally, this function checked according to RFC 2279, allowing for values in
the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in
the canonical format. Once somebody had pointed out RFC 3629 to me (it
obsoletes 2279), additional restrictions were applied. The values are now
limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the
-subrange 0xd000 to 0xdfff is excluded.
+subrange 0xd000 to 0xdfff is excluded. However, the format of 5-byte and 6-byte
+characters is still checked.
+
+From release 8.13 more information about the details of the error are passed
+back in the returned value:
+
+PCRE_UTF8_ERR0 No error
+PCRE_UTF8_ERR1 Missing 1 byte at the end of the string
+PCRE_UTF8_ERR2 Missing 2 bytes at the end of the string
+PCRE_UTF8_ERR3 Missing 3 bytes at the end of the string
+PCRE_UTF8_ERR4 Missing 4 bytes at the end of the string
+PCRE_UTF8_ERR5 Missing 5 bytes at the end of the string
+PCRE_UTF8_ERR6 2nd-byte's two top bits are not 0x80
+PCRE_UTF8_ERR7 3rd-byte's two top bits are not 0x80
+PCRE_UTF8_ERR8 4th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR9 5th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR10 6th-byte's two top bits are not 0x80
+PCRE_UTF8_ERR11 5-byte character is not permitted by RFC 3629
+PCRE_UTF8_ERR12 6-byte character is not permitted by RFC 3629
+PCRE_UTF8_ERR13 4-byte character with value > 0x10ffff is not permitted
+PCRE_UTF8_ERR14 3-byte character with value 0xd000-0xdfff is not permitted
+PCRE_UTF8_ERR15 Overlong 2-byte sequence
+PCRE_UTF8_ERR16 Overlong 3-byte sequence
+PCRE_UTF8_ERR17 Overlong 4-byte sequence
+PCRE_UTF8_ERR18 Overlong 5-byte sequence (won't ever occur)
+PCRE_UTF8_ERR19 Overlong 6-byte sequence (won't ever occur)
+PCRE_UTF8_ERR20 Isolated 0x80 byte (not within UTF-8 character)
+PCRE_UTF8_ERR21 Byte with the illegal value 0xfe or 0xff
+PCRE_UTF8_ERR22 Unused (was non-character)
Arguments:
string points to the string
length length of string, or -1 if the string is zero-terminated
+ errp pointer to an error position offset variable
-Returns: < 0 if the string is a valid UTF-8 string
- >= 0 otherwise; the value is the offset of the bad byte
+Returns: = 0 if the string is a valid UTF-8 string
+ > 0 otherwise, setting the offset of the bad character
*/
int
-_erts_pcre_valid_utf8(const uschar *string, int length)
+PRIV(valid_utf)(PCRE_PUCHAR string, int length, int *erroroffset)
{
-#ifdef SUPPORT_UTF8
-register const uschar *p;
+#ifdef SUPPORT_UTF
+register PCRE_PUCHAR p;
if (length < 0)
{
for (p = string; *p != 0; p++);
- length = p - string;
+ length = (int)(p - string);
}
for (p = string; length-- > 0; p++)
{
- register int ab;
- register int c = *p;
- if (c < 128) continue;
- if (c < 0xc0) return p - string;
- ab = _erts_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */
- if (length < ab || ab > 3) return p - string;
- length -= ab;
+ register pcre_uchar ab, c, d;
+
+ c = *p;
+ if (c < 128) continue; /* ASCII character */
+
+ if (c < 0xc0) /* Isolated 10xx xxxx byte */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE_UTF8_ERR20;
+ }
+
+ if (c >= 0xfe) /* Invalid 0xfe or 0xff bytes */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE_UTF8_ERR21;
+ }
+
+ ab = PRIV(utf8_table4)[c & 0x3f]; /* Number of additional bytes */
+ if (length < ab)
+ {
+ *erroroffset = (int)(p - string); /* Missing bytes */
+ return ab - length; /* Codes ERR1 to ERR5 */
+ }
+ length -= ab; /* Length remaining */
/* Check top bits in the second byte */
- if ((*(++p) & 0xc0) != 0x80) return p - string;
- /* Check for overlong sequences for each different length, and for the
- excluded range 0xd000 to 0xdfff. */
+ if (((d = *(++p)) & 0xc0) != 0x80)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE_UTF8_ERR6;
+ }
+
+ /* For each length, check that the remaining bytes start with the 0x80 bit
+ set and not the 0x40 bit. Then check for an overlong sequence, and for the
+ excluded range 0xd800 to 0xdfff. */
switch (ab)
{
- /* Check for xx00 000x (overlong sequence) */
-
- case 1:
- if ((c & 0x3e) == 0) return p - string;
- continue; /* We know there aren't any more bytes to check */
+ /* 2-byte character. No further bytes to check for 0x80. Check first byte
+ for for xx00 000x (overlong sequence). */
+
+ case 1: if ((c & 0x3e) == 0)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE_UTF8_ERR15;
+ }
+ break;
- /* Check for 1110 0000, xx0x xxxx (overlong sequence) or
- 1110 1101, 1010 xxxx (0xd000 - 0xdfff) */
+ /* 3-byte character. Check third byte for 0x80. Then check first 2 bytes
+ for 1110 0000, xx0x xxxx (overlong sequence) or
+ 1110 1101, 1010 xxxx (0xd800 - 0xdfff) */
case 2:
- if ((c == 0xe0 && (*p & 0x20) == 0) ||
- (c == 0xed && *p >= 0xa0))
- return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if (c == 0xe0 && (d & 0x20) == 0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR16;
+ }
+ if (c == 0xed && d >= 0xa0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR14;
+ }
break;
- /* Check for 1111 0000, xx00 xxxx (overlong sequence) or
- greater than 0x0010ffff (f4 8f bf bf) */
+ /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2
+ bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a
+ character greater than 0x0010ffff (f4 8f bf bf) */
case 3:
- if ((c == 0xf0 && (*p & 0x30) == 0) ||
- (c > 0xf4 ) ||
- (c == 0xf4 && *p > 0x8f))
- return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if (c == 0xf0 && (d & 0x30) == 0)
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR17;
+ }
+ if (c > 0xf4 || (c == 0xf4 && d > 0x8f))
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR13;
+ }
break;
-#if 0
- /* These cases can no longer occur, as we restrict to a maximum of four
- bytes nowadays. Leave the code here in case we ever want to add an option
- for longer sequences. */
+ /* 5-byte and 6-byte characters are not allowed by RFC 3629, and will be
+ rejected by the length test below. However, we do the appropriate tests
+ here so that overlong sequences get diagnosed, and also in case there is
+ ever an option for handling these larger code points. */
+
+ /* 5-byte character. Check 3rd, 4th, and 5th bytes for 0x80. Then check for
+ 1111 1000, xx00 0xxx */
- /* Check for 1111 1000, xx00 0xxx */
case 4:
- if (c == 0xf8 && (*p & 0x38) == 0) return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR9;
+ }
+ if (c == 0xf8 && (d & 0x38) == 0)
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR18;
+ }
break;
- /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */
+ /* 6-byte character. Check 3rd-6th bytes for 0x80. Then check for
+ 1111 1100, xx00 00xx. */
+
case 5:
- if (c == 0xfe || c == 0xff ||
- (c == 0xfc && (*p & 0x3c) == 0)) return p - string;
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE_UTF8_ERR9;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Sixth byte */
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE_UTF8_ERR10;
+ }
+ if (c == 0xfc && (d & 0x3c) == 0)
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE_UTF8_ERR19;
+ }
break;
-#endif
-
}
- /* Check for valid bytes after the 2nd, if any; all must start 10 */
- while (--ab > 0)
+ /* Character is valid under RFC 2279, but 4-byte and 5-byte characters are
+ excluded by RFC 3629. The pointer p is currently at the last byte of the
+ character. */
+
+ if (ab > 3)
{
- if ((*(++p) & 0xc0) != 0x80) return p - string;
+ *erroroffset = (int)(p - string) - ab;
+ return (ab == 4)? PCRE_UTF8_ERR11 : PCRE_UTF8_ERR12;
}
}
+
+#else /* Not SUPPORT_UTF */
+(void)(string); /* Keep picky compilers happy */
+(void)(length);
+(void)(erroroffset);
#endif
-return -1;
+return PCRE_UTF8_ERR0; /* This indicates success */
}
/* End of pcre_valid_utf8.c */
diff --git a/erts/emulator/pcre/pcre_version.c b/erts/emulator/pcre/pcre_version.c
index b8a5b555ef..cc4485e41f 100644
--- a/erts/emulator/pcre/pcre_version.c
+++ b/erts/emulator/pcre/pcre_version.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-/* This module contains the external function erts_pcre_version(), which returns a
+/* This module contains the external function pcre_version(), which returns a
string that identifies the PCRE version that is in use. */
/* %ExternalCopyright% */
@@ -80,8 +80,21 @@ I could find no way of detecting that a macro is defined as an empty string at
pre-processor time. This hack uses a standard trick for avoiding calling
the STRING macro with an empty argument when doing the test. */
-PCRE_EXP_DEFN const char *
+#if defined COMPILE_PCRE8
+#if defined(ERLANG_INTEGRATION)
+PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
erts_pcre_version(void)
+#else
+PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
+pcre_version(void)
+#endif
+#elif defined COMPILE_PCRE16
+PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
+pcre16_version(void)
+#elif defined COMPILE_PCRE32
+PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
+pcre32_version(void)
+#endif
{
return (XSTRING(Z PCRE_PRERELEASE)[1] == 0)?
XSTRING(PCRE_MAJOR.PCRE_MINOR PCRE_DATE) :
diff --git a/erts/emulator/pcre/pcre_xclass.c b/erts/emulator/pcre/pcre_xclass.c
index 1172cd17ac..cf07451a10 100644
--- a/erts/emulator/pcre/pcre_xclass.c
+++ b/erts/emulator/pcre/pcre_xclass.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2008 University of Cambridge
+ Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -39,8 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains an internal function that is used to match an extended
-class (one that contains characters whose values are > 255). It is used by both
-pcre_exec() and pcre_def_exec(). */
+class. It is used by both pcre_exec() and pcre_def_exec(). */
/* %ExternalCopyright% */
@@ -56,7 +55,7 @@ pcre_exec() and pcre_def_exec(). */
*************************************************/
/* This function is called to match a character against an extended class that
-might contain values > 255.
+might contain values > 255 and/or Unicode properties.
Arguments:
c the character
@@ -66,47 +65,70 @@ Returns: TRUE if character matches, else FALSE
*/
BOOL
-_erts_pcre_xclass(int c, const uschar *data)
+PRIV(xclass)(pcre_uint32 c, const pcre_uchar *data, BOOL utf)
{
-int t;
+pcre_uchar t;
BOOL negated = (*data & XCL_NOT) != 0;
+(void)utf;
+#ifdef COMPILE_PCRE8
+/* In 8 bit mode, this must always be TRUE. Help the compiler to know that. */
+utf = TRUE;
+#endif
+
/* Character values < 256 are matched against a bitmap, if one is present. If
not, we still carry on, because there may be ranges that start below 256 in the
additional data. */
if (c < 256)
{
- if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0)
- return !negated; /* char found */
+ if ((*data & XCL_MAP) != 0 &&
+ (((pcre_uint8 *)(data + 1))[c/8] & (1 << (c&7))) != 0)
+ return !negated; /* char found */
}
/* First skip the bit map if present. Then match against the list of Unicode
properties or large chars or ranges that end with a large char. We won't ever
encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */
-if ((*data++ & XCL_MAP) != 0) data += 32;
+if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre_uchar);
while ((t = *data++) != XCL_END)
{
- int x, y;
+ pcre_uint32 x, y;
if (t == XCL_SINGLE)
{
- GETCHARINC(x, data);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ x = *data++;
if (c == x) return !negated;
}
else if (t == XCL_RANGE)
{
- GETCHARINC(x, data);
- GETCHARINC(y, data);
+#ifdef SUPPORT_UTF
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ GETCHARINC(y, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ {
+ x = *data++;
+ y = *data++;
+ }
if (c >= x && c <= y) return !negated;
}
#ifdef SUPPORT_UCP
else /* XCL_PROP & XCL_NOTPROP */
{
- int chartype, script;
- int category = _erts_pcre_ucp_findprop(c, &chartype, &script);
+ const ucd_record *prop = GET_UCD(c);
switch(*data)
{
@@ -115,20 +137,62 @@ while ((t = *data++) != XCL_END)
break;
case PT_LAMP:
- if ((chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt) ==
- (t == XCL_PROP)) return !negated;
+ if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == (t == XCL_PROP)) return !negated;
break;
case PT_GC:
- if ((data[1] == category) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == (t == XCL_PROP))
+ return !negated;
break;
case PT_PC:
- if ((data[1] == chartype) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated;
break;
case PT_SC:
- if ((data[1] == script) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated;
+ break;
+
+ case PT_ALNUM:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (t == XCL_PROP))
+ return !negated;
+ break;
+
+ case PT_SPACE: /* Perl space */
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
+ == (t == XCL_PROP))
+ return !negated;
+ break;
+
+ case PT_PXSPACE: /* POSIX space */
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
+ c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
+ c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))
+ return !negated;
+ break;
+
+ case PT_WORD:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
+ == (t == XCL_PROP))
+ return !negated;
+ break;
+
+ case PT_UCNC:
+ if (c < 0xa0)
+ {
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT) == (t == XCL_PROP))
+ return !negated;
+ }
+ else
+ {
+ if ((c < 0xd800 || c > 0xdfff) == (t == XCL_PROP))
+ return !negated;
+ }
break;
/* This should never occur, but compilers may mutter if there is no
diff --git a/erts/emulator/pcre/ucp.h b/erts/emulator/pcre/ucp.h
index 52f91f1a65..bbfe0f3ecb 100644
--- a/erts/emulator/pcre/ucp.h
+++ b/erts/emulator/pcre/ucp.h
@@ -8,9 +8,12 @@
#define _UCP_H
/* This file contains definitions of the property values that are returned by
-the function _erts_pcre_ucp_findprop(). New values that are added for new releases
-of Unicode should always be at the end of each enum, for backwards
-compatibility. */
+the UCD access macros. New values that are added for new releases of Unicode
+should always be at the end of each enum, for backwards compatibility.
+
+IMPORTANT: Note also that the specific numeric values of the enums have to be
+the same as the values that are generated by the maint/MultiStage2.py script,
+where the equivalent property descriptive names are listed in vectors. */
/* These are the general character categories. */
@@ -24,7 +27,7 @@ enum {
ucp_Z /* Separator */
};
-/* These are the particular character types. */
+/* These are the particular character categories. */
enum {
ucp_Cc, /* Control */
@@ -59,6 +62,26 @@ enum {
ucp_Zs /* Space separator */
};
+/* These are grapheme break properties. Note that the code for processing them
+assumes that the values are less than 16. If more values are added that take
+the number to 16 or more, the code will have to be rewritten. */
+
+enum {
+ ucp_gbCR, /* 0 */
+ ucp_gbLF, /* 1 */
+ ucp_gbControl, /* 2 */
+ ucp_gbExtend, /* 3 */
+ ucp_gbPrepend, /* 4 */
+ ucp_gbSpacingMark, /* 5 */
+ ucp_gbL, /* 6 Hangul syllable type L */
+ ucp_gbV, /* 7 Hangul syllable type V */
+ ucp_gbT, /* 8 Hangul syllable type T */
+ ucp_gbLV, /* 9 Hangul syllable type LV */
+ ucp_gbLVT, /* 10 Hangul syllable type LVT */
+ ucp_gbRegionalIndicator, /* 11 */
+ ucp_gbOther /* 12 */
+};
+
/* These are the script identifications. */
enum {
@@ -123,11 +146,52 @@ enum {
ucp_Tifinagh,
ucp_Ugaritic,
ucp_Yi,
- ucp_Balinese, /* New for Unicode 5.0.0 */
- ucp_Cuneiform, /* New for Unicode 5.0.0 */
- ucp_Nko, /* New for Unicode 5.0.0 */
- ucp_Phags_Pa, /* New for Unicode 5.0.0 */
- ucp_Phoenician /* New for Unicode 5.0.0 */
+ /* New for Unicode 5.0: */
+ ucp_Balinese,
+ ucp_Cuneiform,
+ ucp_Nko,
+ ucp_Phags_Pa,
+ ucp_Phoenician,
+ /* New for Unicode 5.1: */
+ ucp_Carian,
+ ucp_Cham,
+ ucp_Kayah_Li,
+ ucp_Lepcha,
+ ucp_Lycian,
+ ucp_Lydian,
+ ucp_Ol_Chiki,
+ ucp_Rejang,
+ ucp_Saurashtra,
+ ucp_Sundanese,
+ ucp_Vai,
+ /* New for Unicode 5.2: */
+ ucp_Avestan,
+ ucp_Bamum,
+ ucp_Egyptian_Hieroglyphs,
+ ucp_Imperial_Aramaic,
+ ucp_Inscriptional_Pahlavi,
+ ucp_Inscriptional_Parthian,
+ ucp_Javanese,
+ ucp_Kaithi,
+ ucp_Lisu,
+ ucp_Meetei_Mayek,
+ ucp_Old_South_Arabian,
+ ucp_Old_Turkic,
+ ucp_Samaritan,
+ ucp_Tai_Tham,
+ ucp_Tai_Viet,
+ /* New for Unicode 6.0.0: */
+ ucp_Batak,
+ ucp_Brahmi,
+ ucp_Mandaic,
+ /* New for Unicode 6.1.0: */
+ ucp_Chakma,
+ ucp_Meroitic_Cursive,
+ ucp_Meroitic_Hieroglyphs,
+ ucp_Miao,
+ ucp_Sharada,
+ ucp_Sora_Sompeng,
+ ucp_Takri
};
#endif
diff --git a/erts/emulator/pcre/ucpinternal.h b/erts/emulator/pcre/ucpinternal.h
deleted file mode 100644
index 9893d39672..0000000000
--- a/erts/emulator/pcre/ucpinternal.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************
-* Unicode Property Table handler *
-*************************************************/
-
-/* %ExternalCopyright% */
-
-#ifndef _UCPINTERNAL_H
-#define _UCPINTERNAL_H
-
-/* Internal header file defining the layout of the bits in each pair of 32-bit
-words that form a data item in the table. */
-
-typedef struct cnode {
- pcre_uint32 f0;
- pcre_uint32 f1;
-} cnode;
-
-/* Things for the f0 field */
-
-#define f0_scriptmask 0xff000000 /* Mask for script field */
-#define f0_scriptshift 24 /* Shift for script value */
-#define f0_rangeflag 0x00f00000 /* Flag for a range item */
-#define f0_charmask 0x001fffff /* Mask for code point value */
-
-/* Things for the f1 field */
-
-#define f1_typemask 0xfc000000 /* Mask for char type field */
-#define f1_typeshift 26 /* Shift for the type field */
-#define f1_rangemask 0x0000ffff /* Mask for a range offset */
-#define f1_casemask 0x0000ffff /* Mask for a case offset */
-#define f1_caseneg 0xffff8000 /* Bits for negation */
-
-/* The data consists of a vector of structures of type cnode. The two unsigned
-32-bit integers are used as follows:
-
-(f0) (1) The most significant byte holds the script number. The numbers are
- defined by the enum in ucp.h.
-
- (2) The 0x00800000 bit is set if this entry defines a range of characters.
- It is not set if this entry defines a single character
-
- (3) The 0x00600000 bits are spare.
-
- (4) The 0x001fffff bits contain the code point. No Unicode code point will
- ever be greater than 0x0010ffff, so this should be OK for ever.
-
-(f1) (1) The 0xfc000000 bits contain the character type number. The numbers are
- defined by an enum in ucp.h.
-
- (2) The 0x03ff0000 bits are spare.
-
- (3) The 0x0000ffff bits contain EITHER the unsigned offset to the top of
- range if this entry defines a range, OR the *signed* offset to the
- character's "other case" partner if this entry defines a single
- character. There is no partner if the value is zero.
-
--------------------------------------------------------------------------------
-| script (8) |.|.|.| codepoint (21) || type (6) |.|.| spare (8) | offset (16) |
--------------------------------------------------------------------------------
- | | | | |
- | | |-> spare | |-> spare
- | | |
- | |-> spare |-> spare
- |
- |-> range flag
-
-The upper/lower casing information is set only for characters that come in
-pairs. The non-one-to-one mappings in the Unicode data are ignored.
-
-When searching the data, proceed as follows:
-
-(1) Set up for a binary chop search.
-
-(2) If the top is not greater than the bottom, the character is not in the
- table. Its type must therefore be "Cn" ("Undefined").
-
-(3) Find the middle vector element.
-
-(4) Extract the code point and compare. If equal, we are done.
-
-(5) If the test character is smaller, set the top to the current point, and
- goto (2).
-
-(6) If the current entry defines a range, compute the last character by adding
- the offset, and see if the test character is within the range. If it is,
- we are done.
-
-(7) Otherwise, set the bottom to one element past the current point and goto
- (2).
-*/
-
-#endif /* _UCPINTERNAL_H */
-
-/* End of ucpinternal.h */
diff --git a/erts/emulator/pcre/ucptable.h b/erts/emulator/pcre/ucptable.h
deleted file mode 100644
index a274d443ee..0000000000
--- a/erts/emulator/pcre/ucptable.h
+++ /dev/null
@@ -1,3088 +0,0 @@
-/* This source module is automatically generated from the Unicode
-property table. See ucpinternal.h for a description of the layout.
-This version was made from the Unicode 5.0.0 tables. */
-
-static const cnode ucp_table[] = {
- { 0x09800000, 0x0000001f },
- { 0x09000020, 0x74000000 },
- { 0x09800021, 0x54000002 },
- { 0x09000024, 0x5c000000 },
- { 0x09800025, 0x54000002 },
- { 0x09000028, 0x58000000 },
- { 0x09000029, 0x48000000 },
- { 0x0900002a, 0x54000000 },
- { 0x0900002b, 0x64000000 },
- { 0x0900002c, 0x54000000 },
- { 0x0900002d, 0x44000000 },
- { 0x0980002e, 0x54000001 },
- { 0x09800030, 0x34000009 },
- { 0x0980003a, 0x54000001 },
- { 0x0980003c, 0x64000002 },
- { 0x0980003f, 0x54000001 },
- { 0x21000041, 0x24000020 },
- { 0x21000042, 0x24000020 },
- { 0x21000043, 0x24000020 },
- { 0x21000044, 0x24000020 },
- { 0x21000045, 0x24000020 },
- { 0x21000046, 0x24000020 },
- { 0x21000047, 0x24000020 },
- { 0x21000048, 0x24000020 },
- { 0x21000049, 0x24000020 },
- { 0x2100004a, 0x24000020 },
- { 0x2100004b, 0x24000020 },
- { 0x2100004c, 0x24000020 },
- { 0x2100004d, 0x24000020 },
- { 0x2100004e, 0x24000020 },
- { 0x2100004f, 0x24000020 },
- { 0x21000050, 0x24000020 },
- { 0x21000051, 0x24000020 },
- { 0x21000052, 0x24000020 },
- { 0x21000053, 0x24000020 },
- { 0x21000054, 0x24000020 },
- { 0x21000055, 0x24000020 },
- { 0x21000056, 0x24000020 },
- { 0x21000057, 0x24000020 },
- { 0x21000058, 0x24000020 },
- { 0x21000059, 0x24000020 },
- { 0x2100005a, 0x24000020 },
- { 0x0900005b, 0x58000000 },
- { 0x0900005c, 0x54000000 },
- { 0x0900005d, 0x48000000 },
- { 0x0900005e, 0x60000000 },
- { 0x0900005f, 0x40000000 },
- { 0x09000060, 0x60000000 },
- { 0x21000061, 0x1400ffe0 },
- { 0x21000062, 0x1400ffe0 },
- { 0x21000063, 0x1400ffe0 },
- { 0x21000064, 0x1400ffe0 },
- { 0x21000065, 0x1400ffe0 },
- { 0x21000066, 0x1400ffe0 },
- { 0x21000067, 0x1400ffe0 },
- { 0x21000068, 0x1400ffe0 },
- { 0x21000069, 0x1400ffe0 },
- { 0x2100006a, 0x1400ffe0 },
- { 0x2100006b, 0x1400ffe0 },
- { 0x2100006c, 0x1400ffe0 },
- { 0x2100006d, 0x1400ffe0 },
- { 0x2100006e, 0x1400ffe0 },
- { 0x2100006f, 0x1400ffe0 },
- { 0x21000070, 0x1400ffe0 },
- { 0x21000071, 0x1400ffe0 },
- { 0x21000072, 0x1400ffe0 },
- { 0x21000073, 0x1400ffe0 },
- { 0x21000074, 0x1400ffe0 },
- { 0x21000075, 0x1400ffe0 },
- { 0x21000076, 0x1400ffe0 },
- { 0x21000077, 0x1400ffe0 },
- { 0x21000078, 0x1400ffe0 },
- { 0x21000079, 0x1400ffe0 },
- { 0x2100007a, 0x1400ffe0 },
- { 0x0900007b, 0x58000000 },
- { 0x0900007c, 0x64000000 },
- { 0x0900007d, 0x48000000 },
- { 0x0900007e, 0x64000000 },
- { 0x0980007f, 0x00000020 },
- { 0x090000a0, 0x74000000 },
- { 0x090000a1, 0x54000000 },
- { 0x098000a2, 0x5c000003 },
- { 0x098000a6, 0x68000001 },
- { 0x090000a8, 0x60000000 },
- { 0x090000a9, 0x68000000 },
- { 0x210000aa, 0x14000000 },
- { 0x090000ab, 0x50000000 },
- { 0x090000ac, 0x64000000 },
- { 0x090000ad, 0x04000000 },
- { 0x090000ae, 0x68000000 },
- { 0x090000af, 0x60000000 },
- { 0x090000b0, 0x68000000 },
- { 0x090000b1, 0x64000000 },
- { 0x098000b2, 0x3c000001 },
- { 0x090000b4, 0x60000000 },
- { 0x090000b5, 0x140002e7 },
- { 0x090000b6, 0x68000000 },
- { 0x090000b7, 0x54000000 },
- { 0x090000b8, 0x60000000 },
- { 0x090000b9, 0x3c000000 },
- { 0x210000ba, 0x14000000 },
- { 0x090000bb, 0x4c000000 },
- { 0x098000bc, 0x3c000002 },
- { 0x090000bf, 0x54000000 },
- { 0x210000c0, 0x24000020 },
- { 0x210000c1, 0x24000020 },
- { 0x210000c2, 0x24000020 },
- { 0x210000c3, 0x24000020 },
- { 0x210000c4, 0x24000020 },
- { 0x210000c5, 0x24000020 },
- { 0x210000c6, 0x24000020 },
- { 0x210000c7, 0x24000020 },
- { 0x210000c8, 0x24000020 },
- { 0x210000c9, 0x24000020 },
- { 0x210000ca, 0x24000020 },
- { 0x210000cb, 0x24000020 },
- { 0x210000cc, 0x24000020 },
- { 0x210000cd, 0x24000020 },
- { 0x210000ce, 0x24000020 },
- { 0x210000cf, 0x24000020 },
- { 0x210000d0, 0x24000020 },
- { 0x210000d1, 0x24000020 },
- { 0x210000d2, 0x24000020 },
- { 0x210000d3, 0x24000020 },
- { 0x210000d4, 0x24000020 },
- { 0x210000d5, 0x24000020 },
- { 0x210000d6, 0x24000020 },
- { 0x090000d7, 0x64000000 },
- { 0x210000d8, 0x24000020 },
- { 0x210000d9, 0x24000020 },
- { 0x210000da, 0x24000020 },
- { 0x210000db, 0x24000020 },
- { 0x210000dc, 0x24000020 },
- { 0x210000dd, 0x24000020 },
- { 0x210000de, 0x24000020 },
- { 0x210000df, 0x14000000 },
- { 0x210000e0, 0x1400ffe0 },
- { 0x210000e1, 0x1400ffe0 },
- { 0x210000e2, 0x1400ffe0 },
- { 0x210000e3, 0x1400ffe0 },
- { 0x210000e4, 0x1400ffe0 },
- { 0x210000e5, 0x1400ffe0 },
- { 0x210000e6, 0x1400ffe0 },
- { 0x210000e7, 0x1400ffe0 },
- { 0x210000e8, 0x1400ffe0 },
- { 0x210000e9, 0x1400ffe0 },
- { 0x210000ea, 0x1400ffe0 },
- { 0x210000eb, 0x1400ffe0 },
- { 0x210000ec, 0x1400ffe0 },
- { 0x210000ed, 0x1400ffe0 },
- { 0x210000ee, 0x1400ffe0 },
- { 0x210000ef, 0x1400ffe0 },
- { 0x210000f0, 0x1400ffe0 },
- { 0x210000f1, 0x1400ffe0 },
- { 0x210000f2, 0x1400ffe0 },
- { 0x210000f3, 0x1400ffe0 },
- { 0x210000f4, 0x1400ffe0 },
- { 0x210000f5, 0x1400ffe0 },
- { 0x210000f6, 0x1400ffe0 },
- { 0x090000f7, 0x64000000 },
- { 0x210000f8, 0x1400ffe0 },
- { 0x210000f9, 0x1400ffe0 },
- { 0x210000fa, 0x1400ffe0 },
- { 0x210000fb, 0x1400ffe0 },
- { 0x210000fc, 0x1400ffe0 },
- { 0x210000fd, 0x1400ffe0 },
- { 0x210000fe, 0x1400ffe0 },
- { 0x210000ff, 0x14000079 },
- { 0x21000100, 0x24000001 },
- { 0x21000101, 0x1400ffff },
- { 0x21000102, 0x24000001 },
- { 0x21000103, 0x1400ffff },
- { 0x21000104, 0x24000001 },
- { 0x21000105, 0x1400ffff },
- { 0x21000106, 0x24000001 },
- { 0x21000107, 0x1400ffff },
- { 0x21000108, 0x24000001 },
- { 0x21000109, 0x1400ffff },
- { 0x2100010a, 0x24000001 },
- { 0x2100010b, 0x1400ffff },
- { 0x2100010c, 0x24000001 },
- { 0x2100010d, 0x1400ffff },
- { 0x2100010e, 0x24000001 },
- { 0x2100010f, 0x1400ffff },
- { 0x21000110, 0x24000001 },
- { 0x21000111, 0x1400ffff },
- { 0x21000112, 0x24000001 },
- { 0x21000113, 0x1400ffff },
- { 0x21000114, 0x24000001 },
- { 0x21000115, 0x1400ffff },
- { 0x21000116, 0x24000001 },
- { 0x21000117, 0x1400ffff },
- { 0x21000118, 0x24000001 },
- { 0x21000119, 0x1400ffff },
- { 0x2100011a, 0x24000001 },
- { 0x2100011b, 0x1400ffff },
- { 0x2100011c, 0x24000001 },
- { 0x2100011d, 0x1400ffff },
- { 0x2100011e, 0x24000001 },
- { 0x2100011f, 0x1400ffff },
- { 0x21000120, 0x24000001 },
- { 0x21000121, 0x1400ffff },
- { 0x21000122, 0x24000001 },
- { 0x21000123, 0x1400ffff },
- { 0x21000124, 0x24000001 },
- { 0x21000125, 0x1400ffff },
- { 0x21000126, 0x24000001 },
- { 0x21000127, 0x1400ffff },
- { 0x21000128, 0x24000001 },
- { 0x21000129, 0x1400ffff },
- { 0x2100012a, 0x24000001 },
- { 0x2100012b, 0x1400ffff },
- { 0x2100012c, 0x24000001 },
- { 0x2100012d, 0x1400ffff },
- { 0x2100012e, 0x24000001 },
- { 0x2100012f, 0x1400ffff },
- { 0x21000130, 0x2400ff39 },
- { 0x21000131, 0x1400ff18 },
- { 0x21000132, 0x24000001 },
- { 0x21000133, 0x1400ffff },
- { 0x21000134, 0x24000001 },
- { 0x21000135, 0x1400ffff },
- { 0x21000136, 0x24000001 },
- { 0x21000137, 0x1400ffff },
- { 0x21000138, 0x14000000 },
- { 0x21000139, 0x24000001 },
- { 0x2100013a, 0x1400ffff },
- { 0x2100013b, 0x24000001 },
- { 0x2100013c, 0x1400ffff },
- { 0x2100013d, 0x24000001 },
- { 0x2100013e, 0x1400ffff },
- { 0x2100013f, 0x24000001 },
- { 0x21000140, 0x1400ffff },
- { 0x21000141, 0x24000001 },
- { 0x21000142, 0x1400ffff },
- { 0x21000143, 0x24000001 },
- { 0x21000144, 0x1400ffff },
- { 0x21000145, 0x24000001 },
- { 0x21000146, 0x1400ffff },
- { 0x21000147, 0x24000001 },
- { 0x21000148, 0x1400ffff },
- { 0x21000149, 0x14000000 },
- { 0x2100014a, 0x24000001 },
- { 0x2100014b, 0x1400ffff },
- { 0x2100014c, 0x24000001 },
- { 0x2100014d, 0x1400ffff },
- { 0x2100014e, 0x24000001 },
- { 0x2100014f, 0x1400ffff },
- { 0x21000150, 0x24000001 },
- { 0x21000151, 0x1400ffff },
- { 0x21000152, 0x24000001 },
- { 0x21000153, 0x1400ffff },
- { 0x21000154, 0x24000001 },
- { 0x21000155, 0x1400ffff },
- { 0x21000156, 0x24000001 },
- { 0x21000157, 0x1400ffff },
- { 0x21000158, 0x24000001 },
- { 0x21000159, 0x1400ffff },
- { 0x2100015a, 0x24000001 },
- { 0x2100015b, 0x1400ffff },
- { 0x2100015c, 0x24000001 },
- { 0x2100015d, 0x1400ffff },
- { 0x2100015e, 0x24000001 },
- { 0x2100015f, 0x1400ffff },
- { 0x21000160, 0x24000001 },
- { 0x21000161, 0x1400ffff },
- { 0x21000162, 0x24000001 },
- { 0x21000163, 0x1400ffff },
- { 0x21000164, 0x24000001 },
- { 0x21000165, 0x1400ffff },
- { 0x21000166, 0x24000001 },
- { 0x21000167, 0x1400ffff },
- { 0x21000168, 0x24000001 },
- { 0x21000169, 0x1400ffff },
- { 0x2100016a, 0x24000001 },
- { 0x2100016b, 0x1400ffff },
- { 0x2100016c, 0x24000001 },
- { 0x2100016d, 0x1400ffff },
- { 0x2100016e, 0x24000001 },
- { 0x2100016f, 0x1400ffff },
- { 0x21000170, 0x24000001 },
- { 0x21000171, 0x1400ffff },
- { 0x21000172, 0x24000001 },
- { 0x21000173, 0x1400ffff },
- { 0x21000174, 0x24000001 },
- { 0x21000175, 0x1400ffff },
- { 0x21000176, 0x24000001 },
- { 0x21000177, 0x1400ffff },
- { 0x21000178, 0x2400ff87 },
- { 0x21000179, 0x24000001 },
- { 0x2100017a, 0x1400ffff },
- { 0x2100017b, 0x24000001 },
- { 0x2100017c, 0x1400ffff },
- { 0x2100017d, 0x24000001 },
- { 0x2100017e, 0x1400ffff },
- { 0x2100017f, 0x1400fed4 },
- { 0x21000180, 0x140000c3 },
- { 0x21000181, 0x240000d2 },
- { 0x21000182, 0x24000001 },
- { 0x21000183, 0x1400ffff },
- { 0x21000184, 0x24000001 },
- { 0x21000185, 0x1400ffff },
- { 0x21000186, 0x240000ce },
- { 0x21000187, 0x24000001 },
- { 0x21000188, 0x1400ffff },
- { 0x21000189, 0x240000cd },
- { 0x2100018a, 0x240000cd },
- { 0x2100018b, 0x24000001 },
- { 0x2100018c, 0x1400ffff },
- { 0x2100018d, 0x14000000 },
- { 0x2100018e, 0x2400004f },
- { 0x2100018f, 0x240000ca },
- { 0x21000190, 0x240000cb },
- { 0x21000191, 0x24000001 },
- { 0x21000192, 0x1400ffff },
- { 0x21000193, 0x240000cd },
- { 0x21000194, 0x240000cf },
- { 0x21000195, 0x14000061 },
- { 0x21000196, 0x240000d3 },
- { 0x21000197, 0x240000d1 },
- { 0x21000198, 0x24000001 },
- { 0x21000199, 0x1400ffff },
- { 0x2100019a, 0x140000a3 },
- { 0x2100019b, 0x14000000 },
- { 0x2100019c, 0x240000d3 },
- { 0x2100019d, 0x240000d5 },
- { 0x2100019e, 0x14000082 },
- { 0x2100019f, 0x240000d6 },
- { 0x210001a0, 0x24000001 },
- { 0x210001a1, 0x1400ffff },
- { 0x210001a2, 0x24000001 },
- { 0x210001a3, 0x1400ffff },
- { 0x210001a4, 0x24000001 },
- { 0x210001a5, 0x1400ffff },
- { 0x210001a6, 0x240000da },
- { 0x210001a7, 0x24000001 },
- { 0x210001a8, 0x1400ffff },
- { 0x210001a9, 0x240000da },
- { 0x218001aa, 0x14000001 },
- { 0x210001ac, 0x24000001 },
- { 0x210001ad, 0x1400ffff },
- { 0x210001ae, 0x240000da },
- { 0x210001af, 0x24000001 },
- { 0x210001b0, 0x1400ffff },
- { 0x210001b1, 0x240000d9 },
- { 0x210001b2, 0x240000d9 },
- { 0x210001b3, 0x24000001 },
- { 0x210001b4, 0x1400ffff },
- { 0x210001b5, 0x24000001 },
- { 0x210001b6, 0x1400ffff },
- { 0x210001b7, 0x240000db },
- { 0x210001b8, 0x24000001 },
- { 0x210001b9, 0x1400ffff },
- { 0x210001ba, 0x14000000 },
- { 0x210001bb, 0x1c000000 },
- { 0x210001bc, 0x24000001 },
- { 0x210001bd, 0x1400ffff },
- { 0x210001be, 0x14000000 },
- { 0x210001bf, 0x14000038 },
- { 0x218001c0, 0x1c000003 },
- { 0x210001c4, 0x24000002 },
- { 0x210001c5, 0x2000ffff },
- { 0x210001c6, 0x1400fffe },
- { 0x210001c7, 0x24000002 },
- { 0x210001c8, 0x2000ffff },
- { 0x210001c9, 0x1400fffe },
- { 0x210001ca, 0x24000002 },
- { 0x210001cb, 0x2000ffff },
- { 0x210001cc, 0x1400fffe },
- { 0x210001cd, 0x24000001 },
- { 0x210001ce, 0x1400ffff },
- { 0x210001cf, 0x24000001 },
- { 0x210001d0, 0x1400ffff },
- { 0x210001d1, 0x24000001 },
- { 0x210001d2, 0x1400ffff },
- { 0x210001d3, 0x24000001 },
- { 0x210001d4, 0x1400ffff },
- { 0x210001d5, 0x24000001 },
- { 0x210001d6, 0x1400ffff },
- { 0x210001d7, 0x24000001 },
- { 0x210001d8, 0x1400ffff },
- { 0x210001d9, 0x24000001 },
- { 0x210001da, 0x1400ffff },
- { 0x210001db, 0x24000001 },
- { 0x210001dc, 0x1400ffff },
- { 0x210001dd, 0x1400ffb1 },
- { 0x210001de, 0x24000001 },
- { 0x210001df, 0x1400ffff },
- { 0x210001e0, 0x24000001 },
- { 0x210001e1, 0x1400ffff },
- { 0x210001e2, 0x24000001 },
- { 0x210001e3, 0x1400ffff },
- { 0x210001e4, 0x24000001 },
- { 0x210001e5, 0x1400ffff },
- { 0x210001e6, 0x24000001 },
- { 0x210001e7, 0x1400ffff },
- { 0x210001e8, 0x24000001 },
- { 0x210001e9, 0x1400ffff },
- { 0x210001ea, 0x24000001 },
- { 0x210001eb, 0x1400ffff },
- { 0x210001ec, 0x24000001 },
- { 0x210001ed, 0x1400ffff },
- { 0x210001ee, 0x24000001 },
- { 0x210001ef, 0x1400ffff },
- { 0x210001f0, 0x14000000 },
- { 0x210001f1, 0x24000002 },
- { 0x210001f2, 0x2000ffff },
- { 0x210001f3, 0x1400fffe },
- { 0x210001f4, 0x24000001 },
- { 0x210001f5, 0x1400ffff },
- { 0x210001f6, 0x2400ff9f },
- { 0x210001f7, 0x2400ffc8 },
- { 0x210001f8, 0x24000001 },
- { 0x210001f9, 0x1400ffff },
- { 0x210001fa, 0x24000001 },
- { 0x210001fb, 0x1400ffff },
- { 0x210001fc, 0x24000001 },
- { 0x210001fd, 0x1400ffff },
- { 0x210001fe, 0x24000001 },
- { 0x210001ff, 0x1400ffff },
- { 0x21000200, 0x24000001 },
- { 0x21000201, 0x1400ffff },
- { 0x21000202, 0x24000001 },
- { 0x21000203, 0x1400ffff },
- { 0x21000204, 0x24000001 },
- { 0x21000205, 0x1400ffff },
- { 0x21000206, 0x24000001 },
- { 0x21000207, 0x1400ffff },
- { 0x21000208, 0x24000001 },
- { 0x21000209, 0x1400ffff },
- { 0x2100020a, 0x24000001 },
- { 0x2100020b, 0x1400ffff },
- { 0x2100020c, 0x24000001 },
- { 0x2100020d, 0x1400ffff },
- { 0x2100020e, 0x24000001 },
- { 0x2100020f, 0x1400ffff },
- { 0x21000210, 0x24000001 },
- { 0x21000211, 0x1400ffff },
- { 0x21000212, 0x24000001 },
- { 0x21000213, 0x1400ffff },
- { 0x21000214, 0x24000001 },
- { 0x21000215, 0x1400ffff },
- { 0x21000216, 0x24000001 },
- { 0x21000217, 0x1400ffff },
- { 0x21000218, 0x24000001 },
- { 0x21000219, 0x1400ffff },
- { 0x2100021a, 0x24000001 },
- { 0x2100021b, 0x1400ffff },
- { 0x2100021c, 0x24000001 },
- { 0x2100021d, 0x1400ffff },
- { 0x2100021e, 0x24000001 },
- { 0x2100021f, 0x1400ffff },
- { 0x21000220, 0x2400ff7e },
- { 0x21000221, 0x14000000 },
- { 0x21000222, 0x24000001 },
- { 0x21000223, 0x1400ffff },
- { 0x21000224, 0x24000001 },
- { 0x21000225, 0x1400ffff },
- { 0x21000226, 0x24000001 },
- { 0x21000227, 0x1400ffff },
- { 0x21000228, 0x24000001 },
- { 0x21000229, 0x1400ffff },
- { 0x2100022a, 0x24000001 },
- { 0x2100022b, 0x1400ffff },
- { 0x2100022c, 0x24000001 },
- { 0x2100022d, 0x1400ffff },
- { 0x2100022e, 0x24000001 },
- { 0x2100022f, 0x1400ffff },
- { 0x21000230, 0x24000001 },
- { 0x21000231, 0x1400ffff },
- { 0x21000232, 0x24000001 },
- { 0x21000233, 0x1400ffff },
- { 0x21800234, 0x14000005 },
- { 0x2100023a, 0x24002a2b },
- { 0x2100023b, 0x24000001 },
- { 0x2100023c, 0x1400ffff },
- { 0x2100023d, 0x2400ff5d },
- { 0x2100023e, 0x24002a28 },
- { 0x2180023f, 0x14000001 },
- { 0x21000241, 0x24000001 },
- { 0x21000242, 0x1400ffff },
- { 0x21000243, 0x2400ff3d },
- { 0x21000244, 0x24000045 },
- { 0x21000245, 0x24000047 },
- { 0x21000246, 0x24000001 },
- { 0x21000247, 0x1400ffff },
- { 0x21000248, 0x24000001 },
- { 0x21000249, 0x1400ffff },
- { 0x2100024a, 0x24000001 },
- { 0x2100024b, 0x1400ffff },
- { 0x2100024c, 0x24000001 },
- { 0x2100024d, 0x1400ffff },
- { 0x2100024e, 0x24000001 },
- { 0x2100024f, 0x1400ffff },
- { 0x21800250, 0x14000002 },
- { 0x21000253, 0x1400ff2e },
- { 0x21000254, 0x1400ff32 },
- { 0x21000255, 0x14000000 },
- { 0x21000256, 0x1400ff33 },
- { 0x21000257, 0x1400ff33 },
- { 0x21000258, 0x14000000 },
- { 0x21000259, 0x1400ff36 },
- { 0x2100025a, 0x14000000 },
- { 0x2100025b, 0x1400ff35 },
- { 0x2180025c, 0x14000003 },
- { 0x21000260, 0x1400ff33 },
- { 0x21800261, 0x14000001 },
- { 0x21000263, 0x1400ff31 },
- { 0x21800264, 0x14000003 },
- { 0x21000268, 0x1400ff2f },
- { 0x21000269, 0x1400ff2d },
- { 0x2100026a, 0x14000000 },
- { 0x2100026b, 0x140029f7 },
- { 0x2180026c, 0x14000002 },
- { 0x2100026f, 0x1400ff2d },
- { 0x21800270, 0x14000001 },
- { 0x21000272, 0x1400ff2b },
- { 0x21800273, 0x14000001 },
- { 0x21000275, 0x1400ff2a },
- { 0x21800276, 0x14000006 },
- { 0x2100027d, 0x140029e7 },
- { 0x2180027e, 0x14000001 },
- { 0x21000280, 0x1400ff26 },
- { 0x21800281, 0x14000001 },
- { 0x21000283, 0x1400ff26 },
- { 0x21800284, 0x14000003 },
- { 0x21000288, 0x1400ff26 },
- { 0x21000289, 0x1400ffbb },
- { 0x2100028a, 0x1400ff27 },
- { 0x2100028b, 0x1400ff27 },
- { 0x2100028c, 0x1400ffb9 },
- { 0x2180028d, 0x14000004 },
- { 0x21000292, 0x1400ff25 },
- { 0x21000293, 0x14000000 },
- { 0x21000294, 0x1c000000 },
- { 0x21800295, 0x1400001a },
- { 0x218002b0, 0x18000008 },
- { 0x098002b9, 0x18000008 },
- { 0x098002c2, 0x60000003 },
- { 0x098002c6, 0x1800000b },
- { 0x098002d2, 0x6000000d },
- { 0x218002e0, 0x18000004 },
- { 0x098002e5, 0x60000008 },
- { 0x090002ee, 0x18000000 },
- { 0x098002ef, 0x60000010 },
- { 0x1b800300, 0x30000044 },
- { 0x1b000345, 0x30000054 },
- { 0x1b800346, 0x30000029 },
- { 0x13800374, 0x60000001 },
- { 0x1300037a, 0x18000000 },
- { 0x1300037b, 0x14000082 },
- { 0x1300037c, 0x14000082 },
- { 0x1300037d, 0x14000082 },
- { 0x0900037e, 0x54000000 },
- { 0x13800384, 0x60000001 },
- { 0x13000386, 0x24000026 },
- { 0x09000387, 0x54000000 },
- { 0x13000388, 0x24000025 },
- { 0x13000389, 0x24000025 },
- { 0x1300038a, 0x24000025 },
- { 0x1300038c, 0x24000040 },
- { 0x1300038e, 0x2400003f },
- { 0x1300038f, 0x2400003f },
- { 0x13000390, 0x14000000 },
- { 0x13000391, 0x24000020 },
- { 0x13000392, 0x24000020 },
- { 0x13000393, 0x24000020 },
- { 0x13000394, 0x24000020 },
- { 0x13000395, 0x24000020 },
- { 0x13000396, 0x24000020 },
- { 0x13000397, 0x24000020 },
- { 0x13000398, 0x24000020 },
- { 0x13000399, 0x24000020 },
- { 0x1300039a, 0x24000020 },
- { 0x1300039b, 0x24000020 },
- { 0x1300039c, 0x24000020 },
- { 0x1300039d, 0x24000020 },
- { 0x1300039e, 0x24000020 },
- { 0x1300039f, 0x24000020 },
- { 0x130003a0, 0x24000020 },
- { 0x130003a1, 0x24000020 },
- { 0x130003a3, 0x24000020 },
- { 0x130003a4, 0x24000020 },
- { 0x130003a5, 0x24000020 },
- { 0x130003a6, 0x24000020 },
- { 0x130003a7, 0x24000020 },
- { 0x130003a8, 0x24000020 },
- { 0x130003a9, 0x24000020 },
- { 0x130003aa, 0x24000020 },
- { 0x130003ab, 0x24000020 },
- { 0x130003ac, 0x1400ffda },
- { 0x130003ad, 0x1400ffdb },
- { 0x130003ae, 0x1400ffdb },
- { 0x130003af, 0x1400ffdb },
- { 0x130003b0, 0x14000000 },
- { 0x130003b1, 0x1400ffe0 },
- { 0x130003b2, 0x1400ffe0 },
- { 0x130003b3, 0x1400ffe0 },
- { 0x130003b4, 0x1400ffe0 },
- { 0x130003b5, 0x1400ffe0 },
- { 0x130003b6, 0x1400ffe0 },
- { 0x130003b7, 0x1400ffe0 },
- { 0x130003b8, 0x1400ffe0 },
- { 0x130003b9, 0x1400ffe0 },
- { 0x130003ba, 0x1400ffe0 },
- { 0x130003bb, 0x1400ffe0 },
- { 0x130003bc, 0x1400ffe0 },
- { 0x130003bd, 0x1400ffe0 },
- { 0x130003be, 0x1400ffe0 },
- { 0x130003bf, 0x1400ffe0 },
- { 0x130003c0, 0x1400ffe0 },
- { 0x130003c1, 0x1400ffe0 },
- { 0x130003c2, 0x1400ffe1 },
- { 0x130003c3, 0x1400ffe0 },
- { 0x130003c4, 0x1400ffe0 },
- { 0x130003c5, 0x1400ffe0 },
- { 0x130003c6, 0x1400ffe0 },
- { 0x130003c7, 0x1400ffe0 },
- { 0x130003c8, 0x1400ffe0 },
- { 0x130003c9, 0x1400ffe0 },
- { 0x130003ca, 0x1400ffe0 },
- { 0x130003cb, 0x1400ffe0 },
- { 0x130003cc, 0x1400ffc0 },
- { 0x130003cd, 0x1400ffc1 },
- { 0x130003ce, 0x1400ffc1 },
- { 0x130003d0, 0x1400ffc2 },
- { 0x130003d1, 0x1400ffc7 },
- { 0x138003d2, 0x24000002 },
- { 0x130003d5, 0x1400ffd1 },
- { 0x130003d6, 0x1400ffca },
- { 0x130003d7, 0x14000000 },
- { 0x130003d8, 0x24000001 },
- { 0x130003d9, 0x1400ffff },
- { 0x130003da, 0x24000001 },
- { 0x130003db, 0x1400ffff },
- { 0x130003dc, 0x24000001 },
- { 0x130003dd, 0x1400ffff },
- { 0x130003de, 0x24000001 },
- { 0x130003df, 0x1400ffff },
- { 0x130003e0, 0x24000001 },
- { 0x130003e1, 0x1400ffff },
- { 0x0a0003e2, 0x24000001 },
- { 0x0a0003e3, 0x1400ffff },
- { 0x0a0003e4, 0x24000001 },
- { 0x0a0003e5, 0x1400ffff },
- { 0x0a0003e6, 0x24000001 },
- { 0x0a0003e7, 0x1400ffff },
- { 0x0a0003e8, 0x24000001 },
- { 0x0a0003e9, 0x1400ffff },
- { 0x0a0003ea, 0x24000001 },
- { 0x0a0003eb, 0x1400ffff },
- { 0x0a0003ec, 0x24000001 },
- { 0x0a0003ed, 0x1400ffff },
- { 0x0a0003ee, 0x24000001 },
- { 0x0a0003ef, 0x1400ffff },
- { 0x130003f0, 0x1400ffaa },
- { 0x130003f1, 0x1400ffb0 },
- { 0x130003f2, 0x14000007 },
- { 0x130003f3, 0x14000000 },
- { 0x130003f4, 0x2400ffc4 },
- { 0x130003f5, 0x1400ffa0 },
- { 0x130003f6, 0x64000000 },
- { 0x130003f7, 0x24000001 },
- { 0x130003f8, 0x1400ffff },
- { 0x130003f9, 0x2400fff9 },
- { 0x130003fa, 0x24000001 },
- { 0x130003fb, 0x1400ffff },
- { 0x130003fc, 0x14000000 },
- { 0x130003fd, 0x2400ff7e },
- { 0x130003fe, 0x2400ff7e },
- { 0x130003ff, 0x2400ff7e },
- { 0x0c000400, 0x24000050 },
- { 0x0c000401, 0x24000050 },
- { 0x0c000402, 0x24000050 },
- { 0x0c000403, 0x24000050 },
- { 0x0c000404, 0x24000050 },
- { 0x0c000405, 0x24000050 },
- { 0x0c000406, 0x24000050 },
- { 0x0c000407, 0x24000050 },
- { 0x0c000408, 0x24000050 },
- { 0x0c000409, 0x24000050 },
- { 0x0c00040a, 0x24000050 },
- { 0x0c00040b, 0x24000050 },
- { 0x0c00040c, 0x24000050 },
- { 0x0c00040d, 0x24000050 },
- { 0x0c00040e, 0x24000050 },
- { 0x0c00040f, 0x24000050 },
- { 0x0c000410, 0x24000020 },
- { 0x0c000411, 0x24000020 },
- { 0x0c000412, 0x24000020 },
- { 0x0c000413, 0x24000020 },
- { 0x0c000414, 0x24000020 },
- { 0x0c000415, 0x24000020 },
- { 0x0c000416, 0x24000020 },
- { 0x0c000417, 0x24000020 },
- { 0x0c000418, 0x24000020 },
- { 0x0c000419, 0x24000020 },
- { 0x0c00041a, 0x24000020 },
- { 0x0c00041b, 0x24000020 },
- { 0x0c00041c, 0x24000020 },
- { 0x0c00041d, 0x24000020 },
- { 0x0c00041e, 0x24000020 },
- { 0x0c00041f, 0x24000020 },
- { 0x0c000420, 0x24000020 },
- { 0x0c000421, 0x24000020 },
- { 0x0c000422, 0x24000020 },
- { 0x0c000423, 0x24000020 },
- { 0x0c000424, 0x24000020 },
- { 0x0c000425, 0x24000020 },
- { 0x0c000426, 0x24000020 },
- { 0x0c000427, 0x24000020 },
- { 0x0c000428, 0x24000020 },
- { 0x0c000429, 0x24000020 },
- { 0x0c00042a, 0x24000020 },
- { 0x0c00042b, 0x24000020 },
- { 0x0c00042c, 0x24000020 },
- { 0x0c00042d, 0x24000020 },
- { 0x0c00042e, 0x24000020 },
- { 0x0c00042f, 0x24000020 },
- { 0x0c000430, 0x1400ffe0 },
- { 0x0c000431, 0x1400ffe0 },
- { 0x0c000432, 0x1400ffe0 },
- { 0x0c000433, 0x1400ffe0 },
- { 0x0c000434, 0x1400ffe0 },
- { 0x0c000435, 0x1400ffe0 },
- { 0x0c000436, 0x1400ffe0 },
- { 0x0c000437, 0x1400ffe0 },
- { 0x0c000438, 0x1400ffe0 },
- { 0x0c000439, 0x1400ffe0 },
- { 0x0c00043a, 0x1400ffe0 },
- { 0x0c00043b, 0x1400ffe0 },
- { 0x0c00043c, 0x1400ffe0 },
- { 0x0c00043d, 0x1400ffe0 },
- { 0x0c00043e, 0x1400ffe0 },
- { 0x0c00043f, 0x1400ffe0 },
- { 0x0c000440, 0x1400ffe0 },
- { 0x0c000441, 0x1400ffe0 },
- { 0x0c000442, 0x1400ffe0 },
- { 0x0c000443, 0x1400ffe0 },
- { 0x0c000444, 0x1400ffe0 },
- { 0x0c000445, 0x1400ffe0 },
- { 0x0c000446, 0x1400ffe0 },
- { 0x0c000447, 0x1400ffe0 },
- { 0x0c000448, 0x1400ffe0 },
- { 0x0c000449, 0x1400ffe0 },
- { 0x0c00044a, 0x1400ffe0 },
- { 0x0c00044b, 0x1400ffe0 },
- { 0x0c00044c, 0x1400ffe0 },
- { 0x0c00044d, 0x1400ffe0 },
- { 0x0c00044e, 0x1400ffe0 },
- { 0x0c00044f, 0x1400ffe0 },
- { 0x0c000450, 0x1400ffb0 },
- { 0x0c000451, 0x1400ffb0 },
- { 0x0c000452, 0x1400ffb0 },
- { 0x0c000453, 0x1400ffb0 },
- { 0x0c000454, 0x1400ffb0 },
- { 0x0c000455, 0x1400ffb0 },
- { 0x0c000456, 0x1400ffb0 },
- { 0x0c000457, 0x1400ffb0 },
- { 0x0c000458, 0x1400ffb0 },
- { 0x0c000459, 0x1400ffb0 },
- { 0x0c00045a, 0x1400ffb0 },
- { 0x0c00045b, 0x1400ffb0 },
- { 0x0c00045c, 0x1400ffb0 },
- { 0x0c00045d, 0x1400ffb0 },
- { 0x0c00045e, 0x1400ffb0 },
- { 0x0c00045f, 0x1400ffb0 },
- { 0x0c000460, 0x24000001 },
- { 0x0c000461, 0x1400ffff },
- { 0x0c000462, 0x24000001 },
- { 0x0c000463, 0x1400ffff },
- { 0x0c000464, 0x24000001 },
- { 0x0c000465, 0x1400ffff },
- { 0x0c000466, 0x24000001 },
- { 0x0c000467, 0x1400ffff },
- { 0x0c000468, 0x24000001 },
- { 0x0c000469, 0x1400ffff },
- { 0x0c00046a, 0x24000001 },
- { 0x0c00046b, 0x1400ffff },
- { 0x0c00046c, 0x24000001 },
- { 0x0c00046d, 0x1400ffff },
- { 0x0c00046e, 0x24000001 },
- { 0x0c00046f, 0x1400ffff },
- { 0x0c000470, 0x24000001 },
- { 0x0c000471, 0x1400ffff },
- { 0x0c000472, 0x24000001 },
- { 0x0c000473, 0x1400ffff },
- { 0x0c000474, 0x24000001 },
- { 0x0c000475, 0x1400ffff },
- { 0x0c000476, 0x24000001 },
- { 0x0c000477, 0x1400ffff },
- { 0x0c000478, 0x24000001 },
- { 0x0c000479, 0x1400ffff },
- { 0x0c00047a, 0x24000001 },
- { 0x0c00047b, 0x1400ffff },
- { 0x0c00047c, 0x24000001 },
- { 0x0c00047d, 0x1400ffff },
- { 0x0c00047e, 0x24000001 },
- { 0x0c00047f, 0x1400ffff },
- { 0x0c000480, 0x24000001 },
- { 0x0c000481, 0x1400ffff },
- { 0x0c000482, 0x68000000 },
- { 0x0c800483, 0x30000003 },
- { 0x0c800488, 0x2c000001 },
- { 0x0c00048a, 0x24000001 },
- { 0x0c00048b, 0x1400ffff },
- { 0x0c00048c, 0x24000001 },
- { 0x0c00048d, 0x1400ffff },
- { 0x0c00048e, 0x24000001 },
- { 0x0c00048f, 0x1400ffff },
- { 0x0c000490, 0x24000001 },
- { 0x0c000491, 0x1400ffff },
- { 0x0c000492, 0x24000001 },
- { 0x0c000493, 0x1400ffff },
- { 0x0c000494, 0x24000001 },
- { 0x0c000495, 0x1400ffff },
- { 0x0c000496, 0x24000001 },
- { 0x0c000497, 0x1400ffff },
- { 0x0c000498, 0x24000001 },
- { 0x0c000499, 0x1400ffff },
- { 0x0c00049a, 0x24000001 },
- { 0x0c00049b, 0x1400ffff },
- { 0x0c00049c, 0x24000001 },
- { 0x0c00049d, 0x1400ffff },
- { 0x0c00049e, 0x24000001 },
- { 0x0c00049f, 0x1400ffff },
- { 0x0c0004a0, 0x24000001 },
- { 0x0c0004a1, 0x1400ffff },
- { 0x0c0004a2, 0x24000001 },
- { 0x0c0004a3, 0x1400ffff },
- { 0x0c0004a4, 0x24000001 },
- { 0x0c0004a5, 0x1400ffff },
- { 0x0c0004a6, 0x24000001 },
- { 0x0c0004a7, 0x1400ffff },
- { 0x0c0004a8, 0x24000001 },
- { 0x0c0004a9, 0x1400ffff },
- { 0x0c0004aa, 0x24000001 },
- { 0x0c0004ab, 0x1400ffff },
- { 0x0c0004ac, 0x24000001 },
- { 0x0c0004ad, 0x1400ffff },
- { 0x0c0004ae, 0x24000001 },
- { 0x0c0004af, 0x1400ffff },
- { 0x0c0004b0, 0x24000001 },
- { 0x0c0004b1, 0x1400ffff },
- { 0x0c0004b2, 0x24000001 },
- { 0x0c0004b3, 0x1400ffff },
- { 0x0c0004b4, 0x24000001 },
- { 0x0c0004b5, 0x1400ffff },
- { 0x0c0004b6, 0x24000001 },
- { 0x0c0004b7, 0x1400ffff },
- { 0x0c0004b8, 0x24000001 },
- { 0x0c0004b9, 0x1400ffff },
- { 0x0c0004ba, 0x24000001 },
- { 0x0c0004bb, 0x1400ffff },
- { 0x0c0004bc, 0x24000001 },
- { 0x0c0004bd, 0x1400ffff },
- { 0x0c0004be, 0x24000001 },
- { 0x0c0004bf, 0x1400ffff },
- { 0x0c0004c0, 0x2400000f },
- { 0x0c0004c1, 0x24000001 },
- { 0x0c0004c2, 0x1400ffff },
- { 0x0c0004c3, 0x24000001 },
- { 0x0c0004c4, 0x1400ffff },
- { 0x0c0004c5, 0x24000001 },
- { 0x0c0004c6, 0x1400ffff },
- { 0x0c0004c7, 0x24000001 },
- { 0x0c0004c8, 0x1400ffff },
- { 0x0c0004c9, 0x24000001 },
- { 0x0c0004ca, 0x1400ffff },
- { 0x0c0004cb, 0x24000001 },
- { 0x0c0004cc, 0x1400ffff },
- { 0x0c0004cd, 0x24000001 },
- { 0x0c0004ce, 0x1400ffff },
- { 0x0c0004cf, 0x1400fff1 },
- { 0x0c0004d0, 0x24000001 },
- { 0x0c0004d1, 0x1400ffff },
- { 0x0c0004d2, 0x24000001 },
- { 0x0c0004d3, 0x1400ffff },
- { 0x0c0004d4, 0x24000001 },
- { 0x0c0004d5, 0x1400ffff },
- { 0x0c0004d6, 0x24000001 },
- { 0x0c0004d7, 0x1400ffff },
- { 0x0c0004d8, 0x24000001 },
- { 0x0c0004d9, 0x1400ffff },
- { 0x0c0004da, 0x24000001 },
- { 0x0c0004db, 0x1400ffff },
- { 0x0c0004dc, 0x24000001 },
- { 0x0c0004dd, 0x1400ffff },
- { 0x0c0004de, 0x24000001 },
- { 0x0c0004df, 0x1400ffff },
- { 0x0c0004e0, 0x24000001 },
- { 0x0c0004e1, 0x1400ffff },
- { 0x0c0004e2, 0x24000001 },
- { 0x0c0004e3, 0x1400ffff },
- { 0x0c0004e4, 0x24000001 },
- { 0x0c0004e5, 0x1400ffff },
- { 0x0c0004e6, 0x24000001 },
- { 0x0c0004e7, 0x1400ffff },
- { 0x0c0004e8, 0x24000001 },
- { 0x0c0004e9, 0x1400ffff },
- { 0x0c0004ea, 0x24000001 },
- { 0x0c0004eb, 0x1400ffff },
- { 0x0c0004ec, 0x24000001 },
- { 0x0c0004ed, 0x1400ffff },
- { 0x0c0004ee, 0x24000001 },
- { 0x0c0004ef, 0x1400ffff },
- { 0x0c0004f0, 0x24000001 },
- { 0x0c0004f1, 0x1400ffff },
- { 0x0c0004f2, 0x24000001 },
- { 0x0c0004f3, 0x1400ffff },
- { 0x0c0004f4, 0x24000001 },
- { 0x0c0004f5, 0x1400ffff },
- { 0x0c0004f6, 0x24000001 },
- { 0x0c0004f7, 0x1400ffff },
- { 0x0c0004f8, 0x24000001 },
- { 0x0c0004f9, 0x1400ffff },
- { 0x0c0004fa, 0x24000001 },
- { 0x0c0004fb, 0x1400ffff },
- { 0x0c0004fc, 0x24000001 },
- { 0x0c0004fd, 0x1400ffff },
- { 0x0c0004fe, 0x24000001 },
- { 0x0c0004ff, 0x1400ffff },
- { 0x0c000500, 0x24000001 },
- { 0x0c000501, 0x1400ffff },
- { 0x0c000502, 0x24000001 },
- { 0x0c000503, 0x1400ffff },
- { 0x0c000504, 0x24000001 },
- { 0x0c000505, 0x1400ffff },
- { 0x0c000506, 0x24000001 },
- { 0x0c000507, 0x1400ffff },
- { 0x0c000508, 0x24000001 },
- { 0x0c000509, 0x1400ffff },
- { 0x0c00050a, 0x24000001 },
- { 0x0c00050b, 0x1400ffff },
- { 0x0c00050c, 0x24000001 },
- { 0x0c00050d, 0x1400ffff },
- { 0x0c00050e, 0x24000001 },
- { 0x0c00050f, 0x1400ffff },
- { 0x0c000510, 0x24000001 },
- { 0x0c000511, 0x1400ffff },
- { 0x0c000512, 0x24000001 },
- { 0x0c000513, 0x1400ffff },
- { 0x01000531, 0x24000030 },
- { 0x01000532, 0x24000030 },
- { 0x01000533, 0x24000030 },
- { 0x01000534, 0x24000030 },
- { 0x01000535, 0x24000030 },
- { 0x01000536, 0x24000030 },
- { 0x01000537, 0x24000030 },
- { 0x01000538, 0x24000030 },
- { 0x01000539, 0x24000030 },
- { 0x0100053a, 0x24000030 },
- { 0x0100053b, 0x24000030 },
- { 0x0100053c, 0x24000030 },
- { 0x0100053d, 0x24000030 },
- { 0x0100053e, 0x24000030 },
- { 0x0100053f, 0x24000030 },
- { 0x01000540, 0x24000030 },
- { 0x01000541, 0x24000030 },
- { 0x01000542, 0x24000030 },
- { 0x01000543, 0x24000030 },
- { 0x01000544, 0x24000030 },
- { 0x01000545, 0x24000030 },
- { 0x01000546, 0x24000030 },
- { 0x01000547, 0x24000030 },
- { 0x01000548, 0x24000030 },
- { 0x01000549, 0x24000030 },
- { 0x0100054a, 0x24000030 },
- { 0x0100054b, 0x24000030 },
- { 0x0100054c, 0x24000030 },
- { 0x0100054d, 0x24000030 },
- { 0x0100054e, 0x24000030 },
- { 0x0100054f, 0x24000030 },
- { 0x01000550, 0x24000030 },
- { 0x01000551, 0x24000030 },
- { 0x01000552, 0x24000030 },
- { 0x01000553, 0x24000030 },
- { 0x01000554, 0x24000030 },
- { 0x01000555, 0x24000030 },
- { 0x01000556, 0x24000030 },
- { 0x01000559, 0x18000000 },
- { 0x0180055a, 0x54000005 },
- { 0x01000561, 0x1400ffd0 },
- { 0x01000562, 0x1400ffd0 },
- { 0x01000563, 0x1400ffd0 },
- { 0x01000564, 0x1400ffd0 },
- { 0x01000565, 0x1400ffd0 },
- { 0x01000566, 0x1400ffd0 },
- { 0x01000567, 0x1400ffd0 },
- { 0x01000568, 0x1400ffd0 },
- { 0x01000569, 0x1400ffd0 },
- { 0x0100056a, 0x1400ffd0 },
- { 0x0100056b, 0x1400ffd0 },
- { 0x0100056c, 0x1400ffd0 },
- { 0x0100056d, 0x1400ffd0 },
- { 0x0100056e, 0x1400ffd0 },
- { 0x0100056f, 0x1400ffd0 },
- { 0x01000570, 0x1400ffd0 },
- { 0x01000571, 0x1400ffd0 },
- { 0x01000572, 0x1400ffd0 },
- { 0x01000573, 0x1400ffd0 },
- { 0x01000574, 0x1400ffd0 },
- { 0x01000575, 0x1400ffd0 },
- { 0x01000576, 0x1400ffd0 },
- { 0x01000577, 0x1400ffd0 },
- { 0x01000578, 0x1400ffd0 },
- { 0x01000579, 0x1400ffd0 },
- { 0x0100057a, 0x1400ffd0 },
- { 0x0100057b, 0x1400ffd0 },
- { 0x0100057c, 0x1400ffd0 },
- { 0x0100057d, 0x1400ffd0 },
- { 0x0100057e, 0x1400ffd0 },
- { 0x0100057f, 0x1400ffd0 },
- { 0x01000580, 0x1400ffd0 },
- { 0x01000581, 0x1400ffd0 },
- { 0x01000582, 0x1400ffd0 },
- { 0x01000583, 0x1400ffd0 },
- { 0x01000584, 0x1400ffd0 },
- { 0x01000585, 0x1400ffd0 },
- { 0x01000586, 0x1400ffd0 },
- { 0x01000587, 0x14000000 },
- { 0x09000589, 0x54000000 },
- { 0x0100058a, 0x44000000 },
- { 0x19800591, 0x3000002c },
- { 0x190005be, 0x54000000 },
- { 0x190005bf, 0x30000000 },
- { 0x190005c0, 0x54000000 },
- { 0x198005c1, 0x30000001 },
- { 0x190005c3, 0x54000000 },
- { 0x198005c4, 0x30000001 },
- { 0x190005c6, 0x54000000 },
- { 0x190005c7, 0x30000000 },
- { 0x198005d0, 0x1c00001a },
- { 0x198005f0, 0x1c000002 },
- { 0x198005f3, 0x54000001 },
- { 0x09800600, 0x04000003 },
- { 0x0000060b, 0x5c000000 },
- { 0x0900060c, 0x54000000 },
- { 0x0000060d, 0x54000000 },
- { 0x0080060e, 0x68000001 },
- { 0x00800610, 0x30000005 },
- { 0x0900061b, 0x54000000 },
- { 0x0000061e, 0x54000000 },
- { 0x0900061f, 0x54000000 },
- { 0x00800621, 0x1c000019 },
- { 0x09000640, 0x18000000 },
- { 0x00800641, 0x1c000009 },
- { 0x1b80064b, 0x3000000a },
- { 0x00800656, 0x30000008 },
- { 0x09800660, 0x34000009 },
- { 0x0080066a, 0x54000003 },
- { 0x0080066e, 0x1c000001 },
- { 0x1b000670, 0x30000000 },
- { 0x00800671, 0x1c000062 },
- { 0x000006d4, 0x54000000 },
- { 0x000006d5, 0x1c000000 },
- { 0x008006d6, 0x30000006 },
- { 0x090006dd, 0x04000000 },
- { 0x000006de, 0x2c000000 },
- { 0x008006df, 0x30000005 },
- { 0x008006e5, 0x18000001 },
- { 0x008006e7, 0x30000001 },
- { 0x000006e9, 0x68000000 },
- { 0x008006ea, 0x30000003 },
- { 0x008006ee, 0x1c000001 },
- { 0x008006f0, 0x34000009 },
- { 0x008006fa, 0x1c000002 },
- { 0x008006fd, 0x68000001 },
- { 0x000006ff, 0x1c000000 },
- { 0x31800700, 0x5400000d },
- { 0x3100070f, 0x04000000 },
- { 0x31000710, 0x1c000000 },
- { 0x31000711, 0x30000000 },
- { 0x31800712, 0x1c00001d },
- { 0x31800730, 0x3000001a },
- { 0x3180074d, 0x1c000002 },
- { 0x00800750, 0x1c00001d },
- { 0x37800780, 0x1c000025 },
- { 0x378007a6, 0x3000000a },
- { 0x370007b1, 0x1c000000 },
- { 0x3f8007c0, 0x34000009 },
- { 0x3f8007ca, 0x1c000020 },
- { 0x3f8007eb, 0x30000008 },
- { 0x3f8007f4, 0x18000001 },
- { 0x3f0007f6, 0x68000000 },
- { 0x3f8007f7, 0x54000002 },
- { 0x3f0007fa, 0x18000000 },
- { 0x0e800901, 0x30000001 },
- { 0x0e000903, 0x28000000 },
- { 0x0e800904, 0x1c000035 },
- { 0x0e00093c, 0x30000000 },
- { 0x0e00093d, 0x1c000000 },
- { 0x0e80093e, 0x28000002 },
- { 0x0e800941, 0x30000007 },
- { 0x0e800949, 0x28000003 },
- { 0x0e00094d, 0x30000000 },
- { 0x0e000950, 0x1c000000 },
- { 0x0e800951, 0x30000003 },
- { 0x0e800958, 0x1c000009 },
- { 0x0e800962, 0x30000001 },
- { 0x09800964, 0x54000001 },
- { 0x0e800966, 0x34000009 },
- { 0x09000970, 0x54000000 },
- { 0x0e80097b, 0x1c000004 },
- { 0x02000981, 0x30000000 },
- { 0x02800982, 0x28000001 },
- { 0x02800985, 0x1c000007 },
- { 0x0280098f, 0x1c000001 },
- { 0x02800993, 0x1c000015 },
- { 0x028009aa, 0x1c000006 },
- { 0x020009b2, 0x1c000000 },
- { 0x028009b6, 0x1c000003 },
- { 0x020009bc, 0x30000000 },
- { 0x020009bd, 0x1c000000 },
- { 0x028009be, 0x28000002 },
- { 0x028009c1, 0x30000003 },
- { 0x028009c7, 0x28000001 },
- { 0x028009cb, 0x28000001 },
- { 0x020009cd, 0x30000000 },
- { 0x020009ce, 0x1c000000 },
- { 0x020009d7, 0x28000000 },
- { 0x028009dc, 0x1c000001 },
- { 0x028009df, 0x1c000002 },
- { 0x028009e2, 0x30000001 },
- { 0x028009e6, 0x34000009 },
- { 0x028009f0, 0x1c000001 },
- { 0x028009f2, 0x5c000001 },
- { 0x028009f4, 0x3c000005 },
- { 0x020009fa, 0x68000000 },
- { 0x15800a01, 0x30000001 },
- { 0x15000a03, 0x28000000 },
- { 0x15800a05, 0x1c000005 },
- { 0x15800a0f, 0x1c000001 },
- { 0x15800a13, 0x1c000015 },
- { 0x15800a2a, 0x1c000006 },
- { 0x15800a32, 0x1c000001 },
- { 0x15800a35, 0x1c000001 },
- { 0x15800a38, 0x1c000001 },
- { 0x15000a3c, 0x30000000 },
- { 0x15800a3e, 0x28000002 },
- { 0x15800a41, 0x30000001 },
- { 0x15800a47, 0x30000001 },
- { 0x15800a4b, 0x30000002 },
- { 0x15800a59, 0x1c000003 },
- { 0x15000a5e, 0x1c000000 },
- { 0x15800a66, 0x34000009 },
- { 0x15800a70, 0x30000001 },
- { 0x15800a72, 0x1c000002 },
- { 0x14800a81, 0x30000001 },
- { 0x14000a83, 0x28000000 },
- { 0x14800a85, 0x1c000008 },
- { 0x14800a8f, 0x1c000002 },
- { 0x14800a93, 0x1c000015 },
- { 0x14800aaa, 0x1c000006 },
- { 0x14800ab2, 0x1c000001 },
- { 0x14800ab5, 0x1c000004 },
- { 0x14000abc, 0x30000000 },
- { 0x14000abd, 0x1c000000 },
- { 0x14800abe, 0x28000002 },
- { 0x14800ac1, 0x30000004 },
- { 0x14800ac7, 0x30000001 },
- { 0x14000ac9, 0x28000000 },
- { 0x14800acb, 0x28000001 },
- { 0x14000acd, 0x30000000 },
- { 0x14000ad0, 0x1c000000 },
- { 0x14800ae0, 0x1c000001 },
- { 0x14800ae2, 0x30000001 },
- { 0x14800ae6, 0x34000009 },
- { 0x14000af1, 0x5c000000 },
- { 0x2b000b01, 0x30000000 },
- { 0x2b800b02, 0x28000001 },
- { 0x2b800b05, 0x1c000007 },
- { 0x2b800b0f, 0x1c000001 },
- { 0x2b800b13, 0x1c000015 },
- { 0x2b800b2a, 0x1c000006 },
- { 0x2b800b32, 0x1c000001 },
- { 0x2b800b35, 0x1c000004 },
- { 0x2b000b3c, 0x30000000 },
- { 0x2b000b3d, 0x1c000000 },
- { 0x2b000b3e, 0x28000000 },
- { 0x2b000b3f, 0x30000000 },
- { 0x2b000b40, 0x28000000 },
- { 0x2b800b41, 0x30000002 },
- { 0x2b800b47, 0x28000001 },
- { 0x2b800b4b, 0x28000001 },
- { 0x2b000b4d, 0x30000000 },
- { 0x2b000b56, 0x30000000 },
- { 0x2b000b57, 0x28000000 },
- { 0x2b800b5c, 0x1c000001 },
- { 0x2b800b5f, 0x1c000002 },
- { 0x2b800b66, 0x34000009 },
- { 0x2b000b70, 0x68000000 },
- { 0x2b000b71, 0x1c000000 },
- { 0x35000b82, 0x30000000 },
- { 0x35000b83, 0x1c000000 },
- { 0x35800b85, 0x1c000005 },
- { 0x35800b8e, 0x1c000002 },
- { 0x35800b92, 0x1c000003 },
- { 0x35800b99, 0x1c000001 },
- { 0x35000b9c, 0x1c000000 },
- { 0x35800b9e, 0x1c000001 },
- { 0x35800ba3, 0x1c000001 },
- { 0x35800ba8, 0x1c000002 },
- { 0x35800bae, 0x1c00000b },
- { 0x35800bbe, 0x28000001 },
- { 0x35000bc0, 0x30000000 },
- { 0x35800bc1, 0x28000001 },
- { 0x35800bc6, 0x28000002 },
- { 0x35800bca, 0x28000002 },
- { 0x35000bcd, 0x30000000 },
- { 0x35000bd7, 0x28000000 },
- { 0x35800be6, 0x34000009 },
- { 0x35800bf0, 0x3c000002 },
- { 0x35800bf3, 0x68000005 },
- { 0x35000bf9, 0x5c000000 },
- { 0x35000bfa, 0x68000000 },
- { 0x36800c01, 0x28000002 },
- { 0x36800c05, 0x1c000007 },
- { 0x36800c0e, 0x1c000002 },
- { 0x36800c12, 0x1c000016 },
- { 0x36800c2a, 0x1c000009 },
- { 0x36800c35, 0x1c000004 },
- { 0x36800c3e, 0x30000002 },
- { 0x36800c41, 0x28000003 },
- { 0x36800c46, 0x30000002 },
- { 0x36800c4a, 0x30000003 },
- { 0x36800c55, 0x30000001 },
- { 0x36800c60, 0x1c000001 },
- { 0x36800c66, 0x34000009 },
- { 0x1c800c82, 0x28000001 },
- { 0x1c800c85, 0x1c000007 },
- { 0x1c800c8e, 0x1c000002 },
- { 0x1c800c92, 0x1c000016 },
- { 0x1c800caa, 0x1c000009 },
- { 0x1c800cb5, 0x1c000004 },
- { 0x1c000cbc, 0x30000000 },
- { 0x1c000cbd, 0x1c000000 },
- { 0x1c000cbe, 0x28000000 },
- { 0x1c000cbf, 0x30000000 },
- { 0x1c800cc0, 0x28000004 },
- { 0x1c000cc6, 0x30000000 },
- { 0x1c800cc7, 0x28000001 },
- { 0x1c800cca, 0x28000001 },
- { 0x1c800ccc, 0x30000001 },
- { 0x1c800cd5, 0x28000001 },
- { 0x1c000cde, 0x1c000000 },
- { 0x1c800ce0, 0x1c000001 },
- { 0x1c800ce2, 0x30000001 },
- { 0x1c800ce6, 0x34000009 },
- { 0x1c800cf1, 0x68000001 },
- { 0x24800d02, 0x28000001 },
- { 0x24800d05, 0x1c000007 },
- { 0x24800d0e, 0x1c000002 },
- { 0x24800d12, 0x1c000016 },
- { 0x24800d2a, 0x1c00000f },
- { 0x24800d3e, 0x28000002 },
- { 0x24800d41, 0x30000002 },
- { 0x24800d46, 0x28000002 },
- { 0x24800d4a, 0x28000002 },
- { 0x24000d4d, 0x30000000 },
- { 0x24000d57, 0x28000000 },
- { 0x24800d60, 0x1c000001 },
- { 0x24800d66, 0x34000009 },
- { 0x2f800d82, 0x28000001 },
- { 0x2f800d85, 0x1c000011 },
- { 0x2f800d9a, 0x1c000017 },
- { 0x2f800db3, 0x1c000008 },
- { 0x2f000dbd, 0x1c000000 },
- { 0x2f800dc0, 0x1c000006 },
- { 0x2f000dca, 0x30000000 },
- { 0x2f800dcf, 0x28000002 },
- { 0x2f800dd2, 0x30000002 },
- { 0x2f000dd6, 0x30000000 },
- { 0x2f800dd8, 0x28000007 },
- { 0x2f800df2, 0x28000001 },
- { 0x2f000df4, 0x54000000 },
- { 0x38800e01, 0x1c00002f },
- { 0x38000e31, 0x30000000 },
- { 0x38800e32, 0x1c000001 },
- { 0x38800e34, 0x30000006 },
- { 0x09000e3f, 0x5c000000 },
- { 0x38800e40, 0x1c000005 },
- { 0x38000e46, 0x18000000 },
- { 0x38800e47, 0x30000007 },
- { 0x38000e4f, 0x54000000 },
- { 0x38800e50, 0x34000009 },
- { 0x38800e5a, 0x54000001 },
- { 0x20800e81, 0x1c000001 },
- { 0x20000e84, 0x1c000000 },
- { 0x20800e87, 0x1c000001 },
- { 0x20000e8a, 0x1c000000 },
- { 0x20000e8d, 0x1c000000 },
- { 0x20800e94, 0x1c000003 },
- { 0x20800e99, 0x1c000006 },
- { 0x20800ea1, 0x1c000002 },
- { 0x20000ea5, 0x1c000000 },
- { 0x20000ea7, 0x1c000000 },
- { 0x20800eaa, 0x1c000001 },
- { 0x20800ead, 0x1c000003 },
- { 0x20000eb1, 0x30000000 },
- { 0x20800eb2, 0x1c000001 },
- { 0x20800eb4, 0x30000005 },
- { 0x20800ebb, 0x30000001 },
- { 0x20000ebd, 0x1c000000 },
- { 0x20800ec0, 0x1c000004 },
- { 0x20000ec6, 0x18000000 },
- { 0x20800ec8, 0x30000005 },
- { 0x20800ed0, 0x34000009 },
- { 0x20800edc, 0x1c000001 },
- { 0x39000f00, 0x1c000000 },
- { 0x39800f01, 0x68000002 },
- { 0x39800f04, 0x5400000e },
- { 0x39800f13, 0x68000004 },
- { 0x39800f18, 0x30000001 },
- { 0x39800f1a, 0x68000005 },
- { 0x39800f20, 0x34000009 },
- { 0x39800f2a, 0x3c000009 },
- { 0x39000f34, 0x68000000 },
- { 0x39000f35, 0x30000000 },
- { 0x39000f36, 0x68000000 },
- { 0x39000f37, 0x30000000 },
- { 0x39000f38, 0x68000000 },
- { 0x39000f39, 0x30000000 },
- { 0x39000f3a, 0x58000000 },
- { 0x39000f3b, 0x48000000 },
- { 0x39000f3c, 0x58000000 },
- { 0x39000f3d, 0x48000000 },
- { 0x39800f3e, 0x28000001 },
- { 0x39800f40, 0x1c000007 },
- { 0x39800f49, 0x1c000021 },
- { 0x39800f71, 0x3000000d },
- { 0x39000f7f, 0x28000000 },
- { 0x39800f80, 0x30000004 },
- { 0x39000f85, 0x54000000 },
- { 0x39800f86, 0x30000001 },
- { 0x39800f88, 0x1c000003 },
- { 0x39800f90, 0x30000007 },
- { 0x39800f99, 0x30000023 },
- { 0x39800fbe, 0x68000007 },
- { 0x39000fc6, 0x30000000 },
- { 0x39800fc7, 0x68000005 },
- { 0x39000fcf, 0x68000000 },
- { 0x39800fd0, 0x54000001 },
- { 0x26801000, 0x1c000021 },
- { 0x26801023, 0x1c000004 },
- { 0x26801029, 0x1c000001 },
- { 0x2600102c, 0x28000000 },
- { 0x2680102d, 0x30000003 },
- { 0x26001031, 0x28000000 },
- { 0x26001032, 0x30000000 },
- { 0x26801036, 0x30000001 },
- { 0x26001038, 0x28000000 },
- { 0x26001039, 0x30000000 },
- { 0x26801040, 0x34000009 },
- { 0x2680104a, 0x54000005 },
- { 0x26801050, 0x1c000005 },
- { 0x26801056, 0x28000001 },
- { 0x26801058, 0x30000001 },
- { 0x100010a0, 0x24001c60 },
- { 0x100010a1, 0x24001c60 },
- { 0x100010a2, 0x24001c60 },
- { 0x100010a3, 0x24001c60 },
- { 0x100010a4, 0x24001c60 },
- { 0x100010a5, 0x24001c60 },
- { 0x100010a6, 0x24001c60 },
- { 0x100010a7, 0x24001c60 },
- { 0x100010a8, 0x24001c60 },
- { 0x100010a9, 0x24001c60 },
- { 0x100010aa, 0x24001c60 },
- { 0x100010ab, 0x24001c60 },
- { 0x100010ac, 0x24001c60 },
- { 0x100010ad, 0x24001c60 },
- { 0x100010ae, 0x24001c60 },
- { 0x100010af, 0x24001c60 },
- { 0x100010b0, 0x24001c60 },
- { 0x100010b1, 0x24001c60 },
- { 0x100010b2, 0x24001c60 },
- { 0x100010b3, 0x24001c60 },
- { 0x100010b4, 0x24001c60 },
- { 0x100010b5, 0x24001c60 },
- { 0x100010b6, 0x24001c60 },
- { 0x100010b7, 0x24001c60 },
- { 0x100010b8, 0x24001c60 },
- { 0x100010b9, 0x24001c60 },
- { 0x100010ba, 0x24001c60 },
- { 0x100010bb, 0x24001c60 },
- { 0x100010bc, 0x24001c60 },
- { 0x100010bd, 0x24001c60 },
- { 0x100010be, 0x24001c60 },
- { 0x100010bf, 0x24001c60 },
- { 0x100010c0, 0x24001c60 },
- { 0x100010c1, 0x24001c60 },
- { 0x100010c2, 0x24001c60 },
- { 0x100010c3, 0x24001c60 },
- { 0x100010c4, 0x24001c60 },
- { 0x100010c5, 0x24001c60 },
- { 0x108010d0, 0x1c00002a },
- { 0x090010fb, 0x54000000 },
- { 0x100010fc, 0x18000000 },
- { 0x17801100, 0x1c000059 },
- { 0x1780115f, 0x1c000043 },
- { 0x178011a8, 0x1c000051 },
- { 0x0f801200, 0x1c000048 },
- { 0x0f80124a, 0x1c000003 },
- { 0x0f801250, 0x1c000006 },
- { 0x0f001258, 0x1c000000 },
- { 0x0f80125a, 0x1c000003 },
- { 0x0f801260, 0x1c000028 },
- { 0x0f80128a, 0x1c000003 },
- { 0x0f801290, 0x1c000020 },
- { 0x0f8012b2, 0x1c000003 },
- { 0x0f8012b8, 0x1c000006 },
- { 0x0f0012c0, 0x1c000000 },
- { 0x0f8012c2, 0x1c000003 },
- { 0x0f8012c8, 0x1c00000e },
- { 0x0f8012d8, 0x1c000038 },
- { 0x0f801312, 0x1c000003 },
- { 0x0f801318, 0x1c000042 },
- { 0x0f00135f, 0x30000000 },
- { 0x0f001360, 0x68000000 },
- { 0x0f801361, 0x54000007 },
- { 0x0f801369, 0x3c000013 },
- { 0x0f801380, 0x1c00000f },
- { 0x0f801390, 0x68000009 },
- { 0x088013a0, 0x1c000054 },
- { 0x07801401, 0x1c00026b },
- { 0x0780166d, 0x54000001 },
- { 0x0780166f, 0x1c000007 },
- { 0x28001680, 0x74000000 },
- { 0x28801681, 0x1c000019 },
- { 0x2800169b, 0x58000000 },
- { 0x2800169c, 0x48000000 },
- { 0x2d8016a0, 0x1c00004a },
- { 0x098016eb, 0x54000002 },
- { 0x2d8016ee, 0x38000002 },
- { 0x32801700, 0x1c00000c },
- { 0x3280170e, 0x1c000003 },
- { 0x32801712, 0x30000002 },
- { 0x18801720, 0x1c000011 },
- { 0x18801732, 0x30000002 },
- { 0x09801735, 0x54000001 },
- { 0x06801740, 0x1c000011 },
- { 0x06801752, 0x30000001 },
- { 0x33801760, 0x1c00000c },
- { 0x3380176e, 0x1c000002 },
- { 0x33801772, 0x30000001 },
- { 0x1f801780, 0x1c000033 },
- { 0x1f8017b4, 0x04000001 },
- { 0x1f0017b6, 0x28000000 },
- { 0x1f8017b7, 0x30000006 },
- { 0x1f8017be, 0x28000007 },
- { 0x1f0017c6, 0x30000000 },
- { 0x1f8017c7, 0x28000001 },
- { 0x1f8017c9, 0x3000000a },
- { 0x1f8017d4, 0x54000002 },
- { 0x1f0017d7, 0x18000000 },
- { 0x1f8017d8, 0x54000002 },
- { 0x1f0017db, 0x5c000000 },
- { 0x1f0017dc, 0x1c000000 },
- { 0x1f0017dd, 0x30000000 },
- { 0x1f8017e0, 0x34000009 },
- { 0x1f8017f0, 0x3c000009 },
- { 0x25801800, 0x54000001 },
- { 0x09801802, 0x54000001 },
- { 0x25001804, 0x54000000 },
- { 0x09001805, 0x54000000 },
- { 0x25001806, 0x44000000 },
- { 0x25801807, 0x54000003 },
- { 0x2580180b, 0x30000002 },
- { 0x2500180e, 0x74000000 },
- { 0x25801810, 0x34000009 },
- { 0x25801820, 0x1c000022 },
- { 0x25001843, 0x18000000 },
- { 0x25801844, 0x1c000033 },
- { 0x25801880, 0x1c000028 },
- { 0x250018a9, 0x30000000 },
- { 0x22801900, 0x1c00001c },
- { 0x22801920, 0x30000002 },
- { 0x22801923, 0x28000003 },
- { 0x22801927, 0x30000001 },
- { 0x22801929, 0x28000002 },
- { 0x22801930, 0x28000001 },
- { 0x22001932, 0x30000000 },
- { 0x22801933, 0x28000005 },
- { 0x22801939, 0x30000002 },
- { 0x22001940, 0x68000000 },
- { 0x22801944, 0x54000001 },
- { 0x22801946, 0x34000009 },
- { 0x34801950, 0x1c00001d },
- { 0x34801970, 0x1c000004 },
- { 0x27801980, 0x1c000029 },
- { 0x278019b0, 0x28000010 },
- { 0x278019c1, 0x1c000006 },
- { 0x278019c8, 0x28000001 },
- { 0x278019d0, 0x34000009 },
- { 0x278019de, 0x54000001 },
- { 0x1f8019e0, 0x6800001f },
- { 0x05801a00, 0x1c000016 },
- { 0x05801a17, 0x30000001 },
- { 0x05801a19, 0x28000002 },
- { 0x05801a1e, 0x54000001 },
- { 0x3d801b00, 0x30000003 },
- { 0x3d001b04, 0x28000000 },
- { 0x3d801b05, 0x1c00002e },
- { 0x3d001b34, 0x30000000 },
- { 0x3d001b35, 0x28000000 },
- { 0x3d801b36, 0x30000004 },
- { 0x3d001b3b, 0x28000000 },
- { 0x3d001b3c, 0x30000000 },
- { 0x3d801b3d, 0x28000004 },
- { 0x3d001b42, 0x30000000 },
- { 0x3d801b43, 0x28000001 },
- { 0x3d801b45, 0x1c000006 },
- { 0x3d801b50, 0x34000009 },
- { 0x3d801b5a, 0x54000006 },
- { 0x3d801b61, 0x68000009 },
- { 0x3d801b6b, 0x30000008 },
- { 0x3d801b74, 0x68000008 },
- { 0x21801d00, 0x14000025 },
- { 0x13801d26, 0x14000004 },
- { 0x0c001d2b, 0x14000000 },
- { 0x21801d2c, 0x18000030 },
- { 0x13801d5d, 0x18000004 },
- { 0x21801d62, 0x14000003 },
- { 0x13801d66, 0x14000004 },
- { 0x21801d6b, 0x1400000c },
- { 0x0c001d78, 0x18000000 },
- { 0x21801d79, 0x14000003 },
- { 0x21001d7d, 0x14000ee6 },
- { 0x21801d7e, 0x1400001c },
- { 0x21801d9b, 0x18000023 },
- { 0x13001dbf, 0x18000000 },
- { 0x1b801dc0, 0x3000000a },
- { 0x1b801dfe, 0x30000001 },
- { 0x21001e00, 0x24000001 },
- { 0x21001e01, 0x1400ffff },
- { 0x21001e02, 0x24000001 },
- { 0x21001e03, 0x1400ffff },
- { 0x21001e04, 0x24000001 },
- { 0x21001e05, 0x1400ffff },
- { 0x21001e06, 0x24000001 },
- { 0x21001e07, 0x1400ffff },
- { 0x21001e08, 0x24000001 },
- { 0x21001e09, 0x1400ffff },
- { 0x21001e0a, 0x24000001 },
- { 0x21001e0b, 0x1400ffff },
- { 0x21001e0c, 0x24000001 },
- { 0x21001e0d, 0x1400ffff },
- { 0x21001e0e, 0x24000001 },
- { 0x21001e0f, 0x1400ffff },
- { 0x21001e10, 0x24000001 },
- { 0x21001e11, 0x1400ffff },
- { 0x21001e12, 0x24000001 },
- { 0x21001e13, 0x1400ffff },
- { 0x21001e14, 0x24000001 },
- { 0x21001e15, 0x1400ffff },
- { 0x21001e16, 0x24000001 },
- { 0x21001e17, 0x1400ffff },
- { 0x21001e18, 0x24000001 },
- { 0x21001e19, 0x1400ffff },
- { 0x21001e1a, 0x24000001 },
- { 0x21001e1b, 0x1400ffff },
- { 0x21001e1c, 0x24000001 },
- { 0x21001e1d, 0x1400ffff },
- { 0x21001e1e, 0x24000001 },
- { 0x21001e1f, 0x1400ffff },
- { 0x21001e20, 0x24000001 },
- { 0x21001e21, 0x1400ffff },
- { 0x21001e22, 0x24000001 },
- { 0x21001e23, 0x1400ffff },
- { 0x21001e24, 0x24000001 },
- { 0x21001e25, 0x1400ffff },
- { 0x21001e26, 0x24000001 },
- { 0x21001e27, 0x1400ffff },
- { 0x21001e28, 0x24000001 },
- { 0x21001e29, 0x1400ffff },
- { 0x21001e2a, 0x24000001 },
- { 0x21001e2b, 0x1400ffff },
- { 0x21001e2c, 0x24000001 },
- { 0x21001e2d, 0x1400ffff },
- { 0x21001e2e, 0x24000001 },
- { 0x21001e2f, 0x1400ffff },
- { 0x21001e30, 0x24000001 },
- { 0x21001e31, 0x1400ffff },
- { 0x21001e32, 0x24000001 },
- { 0x21001e33, 0x1400ffff },
- { 0x21001e34, 0x24000001 },
- { 0x21001e35, 0x1400ffff },
- { 0x21001e36, 0x24000001 },
- { 0x21001e37, 0x1400ffff },
- { 0x21001e38, 0x24000001 },
- { 0x21001e39, 0x1400ffff },
- { 0x21001e3a, 0x24000001 },
- { 0x21001e3b, 0x1400ffff },
- { 0x21001e3c, 0x24000001 },
- { 0x21001e3d, 0x1400ffff },
- { 0x21001e3e, 0x24000001 },
- { 0x21001e3f, 0x1400ffff },
- { 0x21001e40, 0x24000001 },
- { 0x21001e41, 0x1400ffff },
- { 0x21001e42, 0x24000001 },
- { 0x21001e43, 0x1400ffff },
- { 0x21001e44, 0x24000001 },
- { 0x21001e45, 0x1400ffff },
- { 0x21001e46, 0x24000001 },
- { 0x21001e47, 0x1400ffff },
- { 0x21001e48, 0x24000001 },
- { 0x21001e49, 0x1400ffff },
- { 0x21001e4a, 0x24000001 },
- { 0x21001e4b, 0x1400ffff },
- { 0x21001e4c, 0x24000001 },
- { 0x21001e4d, 0x1400ffff },
- { 0x21001e4e, 0x24000001 },
- { 0x21001e4f, 0x1400ffff },
- { 0x21001e50, 0x24000001 },
- { 0x21001e51, 0x1400ffff },
- { 0x21001e52, 0x24000001 },
- { 0x21001e53, 0x1400ffff },
- { 0x21001e54, 0x24000001 },
- { 0x21001e55, 0x1400ffff },
- { 0x21001e56, 0x24000001 },
- { 0x21001e57, 0x1400ffff },
- { 0x21001e58, 0x24000001 },
- { 0x21001e59, 0x1400ffff },
- { 0x21001e5a, 0x24000001 },
- { 0x21001e5b, 0x1400ffff },
- { 0x21001e5c, 0x24000001 },
- { 0x21001e5d, 0x1400ffff },
- { 0x21001e5e, 0x24000001 },
- { 0x21001e5f, 0x1400ffff },
- { 0x21001e60, 0x24000001 },
- { 0x21001e61, 0x1400ffff },
- { 0x21001e62, 0x24000001 },
- { 0x21001e63, 0x1400ffff },
- { 0x21001e64, 0x24000001 },
- { 0x21001e65, 0x1400ffff },
- { 0x21001e66, 0x24000001 },
- { 0x21001e67, 0x1400ffff },
- { 0x21001e68, 0x24000001 },
- { 0x21001e69, 0x1400ffff },
- { 0x21001e6a, 0x24000001 },
- { 0x21001e6b, 0x1400ffff },
- { 0x21001e6c, 0x24000001 },
- { 0x21001e6d, 0x1400ffff },
- { 0x21001e6e, 0x24000001 },
- { 0x21001e6f, 0x1400ffff },
- { 0x21001e70, 0x24000001 },
- { 0x21001e71, 0x1400ffff },
- { 0x21001e72, 0x24000001 },
- { 0x21001e73, 0x1400ffff },
- { 0x21001e74, 0x24000001 },
- { 0x21001e75, 0x1400ffff },
- { 0x21001e76, 0x24000001 },
- { 0x21001e77, 0x1400ffff },
- { 0x21001e78, 0x24000001 },
- { 0x21001e79, 0x1400ffff },
- { 0x21001e7a, 0x24000001 },
- { 0x21001e7b, 0x1400ffff },
- { 0x21001e7c, 0x24000001 },
- { 0x21001e7d, 0x1400ffff },
- { 0x21001e7e, 0x24000001 },
- { 0x21001e7f, 0x1400ffff },
- { 0x21001e80, 0x24000001 },
- { 0x21001e81, 0x1400ffff },
- { 0x21001e82, 0x24000001 },
- { 0x21001e83, 0x1400ffff },
- { 0x21001e84, 0x24000001 },
- { 0x21001e85, 0x1400ffff },
- { 0x21001e86, 0x24000001 },
- { 0x21001e87, 0x1400ffff },
- { 0x21001e88, 0x24000001 },
- { 0x21001e89, 0x1400ffff },
- { 0x21001e8a, 0x24000001 },
- { 0x21001e8b, 0x1400ffff },
- { 0x21001e8c, 0x24000001 },
- { 0x21001e8d, 0x1400ffff },
- { 0x21001e8e, 0x24000001 },
- { 0x21001e8f, 0x1400ffff },
- { 0x21001e90, 0x24000001 },
- { 0x21001e91, 0x1400ffff },
- { 0x21001e92, 0x24000001 },
- { 0x21001e93, 0x1400ffff },
- { 0x21001e94, 0x24000001 },
- { 0x21001e95, 0x1400ffff },
- { 0x21801e96, 0x14000004 },
- { 0x21001e9b, 0x1400ffc5 },
- { 0x21001ea0, 0x24000001 },
- { 0x21001ea1, 0x1400ffff },
- { 0x21001ea2, 0x24000001 },
- { 0x21001ea3, 0x1400ffff },
- { 0x21001ea4, 0x24000001 },
- { 0x21001ea5, 0x1400ffff },
- { 0x21001ea6, 0x24000001 },
- { 0x21001ea7, 0x1400ffff },
- { 0x21001ea8, 0x24000001 },
- { 0x21001ea9, 0x1400ffff },
- { 0x21001eaa, 0x24000001 },
- { 0x21001eab, 0x1400ffff },
- { 0x21001eac, 0x24000001 },
- { 0x21001ead, 0x1400ffff },
- { 0x21001eae, 0x24000001 },
- { 0x21001eaf, 0x1400ffff },
- { 0x21001eb0, 0x24000001 },
- { 0x21001eb1, 0x1400ffff },
- { 0x21001eb2, 0x24000001 },
- { 0x21001eb3, 0x1400ffff },
- { 0x21001eb4, 0x24000001 },
- { 0x21001eb5, 0x1400ffff },
- { 0x21001eb6, 0x24000001 },
- { 0x21001eb7, 0x1400ffff },
- { 0x21001eb8, 0x24000001 },
- { 0x21001eb9, 0x1400ffff },
- { 0x21001eba, 0x24000001 },
- { 0x21001ebb, 0x1400ffff },
- { 0x21001ebc, 0x24000001 },
- { 0x21001ebd, 0x1400ffff },
- { 0x21001ebe, 0x24000001 },
- { 0x21001ebf, 0x1400ffff },
- { 0x21001ec0, 0x24000001 },
- { 0x21001ec1, 0x1400ffff },
- { 0x21001ec2, 0x24000001 },
- { 0x21001ec3, 0x1400ffff },
- { 0x21001ec4, 0x24000001 },
- { 0x21001ec5, 0x1400ffff },
- { 0x21001ec6, 0x24000001 },
- { 0x21001ec7, 0x1400ffff },
- { 0x21001ec8, 0x24000001 },
- { 0x21001ec9, 0x1400ffff },
- { 0x21001eca, 0x24000001 },
- { 0x21001ecb, 0x1400ffff },
- { 0x21001ecc, 0x24000001 },
- { 0x21001ecd, 0x1400ffff },
- { 0x21001ece, 0x24000001 },
- { 0x21001ecf, 0x1400ffff },
- { 0x21001ed0, 0x24000001 },
- { 0x21001ed1, 0x1400ffff },
- { 0x21001ed2, 0x24000001 },
- { 0x21001ed3, 0x1400ffff },
- { 0x21001ed4, 0x24000001 },
- { 0x21001ed5, 0x1400ffff },
- { 0x21001ed6, 0x24000001 },
- { 0x21001ed7, 0x1400ffff },
- { 0x21001ed8, 0x24000001 },
- { 0x21001ed9, 0x1400ffff },
- { 0x21001eda, 0x24000001 },
- { 0x21001edb, 0x1400ffff },
- { 0x21001edc, 0x24000001 },
- { 0x21001edd, 0x1400ffff },
- { 0x21001ede, 0x24000001 },
- { 0x21001edf, 0x1400ffff },
- { 0x21001ee0, 0x24000001 },
- { 0x21001ee1, 0x1400ffff },
- { 0x21001ee2, 0x24000001 },
- { 0x21001ee3, 0x1400ffff },
- { 0x21001ee4, 0x24000001 },
- { 0x21001ee5, 0x1400ffff },
- { 0x21001ee6, 0x24000001 },
- { 0x21001ee7, 0x1400ffff },
- { 0x21001ee8, 0x24000001 },
- { 0x21001ee9, 0x1400ffff },
- { 0x21001eea, 0x24000001 },
- { 0x21001eeb, 0x1400ffff },
- { 0x21001eec, 0x24000001 },
- { 0x21001eed, 0x1400ffff },
- { 0x21001eee, 0x24000001 },
- { 0x21001eef, 0x1400ffff },
- { 0x21001ef0, 0x24000001 },
- { 0x21001ef1, 0x1400ffff },
- { 0x21001ef2, 0x24000001 },
- { 0x21001ef3, 0x1400ffff },
- { 0x21001ef4, 0x24000001 },
- { 0x21001ef5, 0x1400ffff },
- { 0x21001ef6, 0x24000001 },
- { 0x21001ef7, 0x1400ffff },
- { 0x21001ef8, 0x24000001 },
- { 0x21001ef9, 0x1400ffff },
- { 0x13001f00, 0x14000008 },
- { 0x13001f01, 0x14000008 },
- { 0x13001f02, 0x14000008 },
- { 0x13001f03, 0x14000008 },
- { 0x13001f04, 0x14000008 },
- { 0x13001f05, 0x14000008 },
- { 0x13001f06, 0x14000008 },
- { 0x13001f07, 0x14000008 },
- { 0x13001f08, 0x2400fff8 },
- { 0x13001f09, 0x2400fff8 },
- { 0x13001f0a, 0x2400fff8 },
- { 0x13001f0b, 0x2400fff8 },
- { 0x13001f0c, 0x2400fff8 },
- { 0x13001f0d, 0x2400fff8 },
- { 0x13001f0e, 0x2400fff8 },
- { 0x13001f0f, 0x2400fff8 },
- { 0x13001f10, 0x14000008 },
- { 0x13001f11, 0x14000008 },
- { 0x13001f12, 0x14000008 },
- { 0x13001f13, 0x14000008 },
- { 0x13001f14, 0x14000008 },
- { 0x13001f15, 0x14000008 },
- { 0x13001f18, 0x2400fff8 },
- { 0x13001f19, 0x2400fff8 },
- { 0x13001f1a, 0x2400fff8 },
- { 0x13001f1b, 0x2400fff8 },
- { 0x13001f1c, 0x2400fff8 },
- { 0x13001f1d, 0x2400fff8 },
- { 0x13001f20, 0x14000008 },
- { 0x13001f21, 0x14000008 },
- { 0x13001f22, 0x14000008 },
- { 0x13001f23, 0x14000008 },
- { 0x13001f24, 0x14000008 },
- { 0x13001f25, 0x14000008 },
- { 0x13001f26, 0x14000008 },
- { 0x13001f27, 0x14000008 },
- { 0x13001f28, 0x2400fff8 },
- { 0x13001f29, 0x2400fff8 },
- { 0x13001f2a, 0x2400fff8 },
- { 0x13001f2b, 0x2400fff8 },
- { 0x13001f2c, 0x2400fff8 },
- { 0x13001f2d, 0x2400fff8 },
- { 0x13001f2e, 0x2400fff8 },
- { 0x13001f2f, 0x2400fff8 },
- { 0x13001f30, 0x14000008 },
- { 0x13001f31, 0x14000008 },
- { 0x13001f32, 0x14000008 },
- { 0x13001f33, 0x14000008 },
- { 0x13001f34, 0x14000008 },
- { 0x13001f35, 0x14000008 },
- { 0x13001f36, 0x14000008 },
- { 0x13001f37, 0x14000008 },
- { 0x13001f38, 0x2400fff8 },
- { 0x13001f39, 0x2400fff8 },
- { 0x13001f3a, 0x2400fff8 },
- { 0x13001f3b, 0x2400fff8 },
- { 0x13001f3c, 0x2400fff8 },
- { 0x13001f3d, 0x2400fff8 },
- { 0x13001f3e, 0x2400fff8 },
- { 0x13001f3f, 0x2400fff8 },
- { 0x13001f40, 0x14000008 },
- { 0x13001f41, 0x14000008 },
- { 0x13001f42, 0x14000008 },
- { 0x13001f43, 0x14000008 },
- { 0x13001f44, 0x14000008 },
- { 0x13001f45, 0x14000008 },
- { 0x13001f48, 0x2400fff8 },
- { 0x13001f49, 0x2400fff8 },
- { 0x13001f4a, 0x2400fff8 },
- { 0x13001f4b, 0x2400fff8 },
- { 0x13001f4c, 0x2400fff8 },
- { 0x13001f4d, 0x2400fff8 },
- { 0x13001f50, 0x14000000 },
- { 0x13001f51, 0x14000008 },
- { 0x13001f52, 0x14000000 },
- { 0x13001f53, 0x14000008 },
- { 0x13001f54, 0x14000000 },
- { 0x13001f55, 0x14000008 },
- { 0x13001f56, 0x14000000 },
- { 0x13001f57, 0x14000008 },
- { 0x13001f59, 0x2400fff8 },
- { 0x13001f5b, 0x2400fff8 },
- { 0x13001f5d, 0x2400fff8 },
- { 0x13001f5f, 0x2400fff8 },
- { 0x13001f60, 0x14000008 },
- { 0x13001f61, 0x14000008 },
- { 0x13001f62, 0x14000008 },
- { 0x13001f63, 0x14000008 },
- { 0x13001f64, 0x14000008 },
- { 0x13001f65, 0x14000008 },
- { 0x13001f66, 0x14000008 },
- { 0x13001f67, 0x14000008 },
- { 0x13001f68, 0x2400fff8 },
- { 0x13001f69, 0x2400fff8 },
- { 0x13001f6a, 0x2400fff8 },
- { 0x13001f6b, 0x2400fff8 },
- { 0x13001f6c, 0x2400fff8 },
- { 0x13001f6d, 0x2400fff8 },
- { 0x13001f6e, 0x2400fff8 },
- { 0x13001f6f, 0x2400fff8 },
- { 0x13001f70, 0x1400004a },
- { 0x13001f71, 0x1400004a },
- { 0x13001f72, 0x14000056 },
- { 0x13001f73, 0x14000056 },
- { 0x13001f74, 0x14000056 },
- { 0x13001f75, 0x14000056 },
- { 0x13001f76, 0x14000064 },
- { 0x13001f77, 0x14000064 },
- { 0x13001f78, 0x14000080 },
- { 0x13001f79, 0x14000080 },
- { 0x13001f7a, 0x14000070 },
- { 0x13001f7b, 0x14000070 },
- { 0x13001f7c, 0x1400007e },
- { 0x13001f7d, 0x1400007e },
- { 0x13001f80, 0x14000008 },
- { 0x13001f81, 0x14000008 },
- { 0x13001f82, 0x14000008 },
- { 0x13001f83, 0x14000008 },
- { 0x13001f84, 0x14000008 },
- { 0x13001f85, 0x14000008 },
- { 0x13001f86, 0x14000008 },
- { 0x13001f87, 0x14000008 },
- { 0x13001f88, 0x2000fff8 },
- { 0x13001f89, 0x2000fff8 },
- { 0x13001f8a, 0x2000fff8 },
- { 0x13001f8b, 0x2000fff8 },
- { 0x13001f8c, 0x2000fff8 },
- { 0x13001f8d, 0x2000fff8 },
- { 0x13001f8e, 0x2000fff8 },
- { 0x13001f8f, 0x2000fff8 },
- { 0x13001f90, 0x14000008 },
- { 0x13001f91, 0x14000008 },
- { 0x13001f92, 0x14000008 },
- { 0x13001f93, 0x14000008 },
- { 0x13001f94, 0x14000008 },
- { 0x13001f95, 0x14000008 },
- { 0x13001f96, 0x14000008 },
- { 0x13001f97, 0x14000008 },
- { 0x13001f98, 0x2000fff8 },
- { 0x13001f99, 0x2000fff8 },
- { 0x13001f9a, 0x2000fff8 },
- { 0x13001f9b, 0x2000fff8 },
- { 0x13001f9c, 0x2000fff8 },
- { 0x13001f9d, 0x2000fff8 },
- { 0x13001f9e, 0x2000fff8 },
- { 0x13001f9f, 0x2000fff8 },
- { 0x13001fa0, 0x14000008 },
- { 0x13001fa1, 0x14000008 },
- { 0x13001fa2, 0x14000008 },
- { 0x13001fa3, 0x14000008 },
- { 0x13001fa4, 0x14000008 },
- { 0x13001fa5, 0x14000008 },
- { 0x13001fa6, 0x14000008 },
- { 0x13001fa7, 0x14000008 },
- { 0x13001fa8, 0x2000fff8 },
- { 0x13001fa9, 0x2000fff8 },
- { 0x13001faa, 0x2000fff8 },
- { 0x13001fab, 0x2000fff8 },
- { 0x13001fac, 0x2000fff8 },
- { 0x13001fad, 0x2000fff8 },
- { 0x13001fae, 0x2000fff8 },
- { 0x13001faf, 0x2000fff8 },
- { 0x13001fb0, 0x14000008 },
- { 0x13001fb1, 0x14000008 },
- { 0x13001fb2, 0x14000000 },
- { 0x13001fb3, 0x14000009 },
- { 0x13001fb4, 0x14000000 },
- { 0x13801fb6, 0x14000001 },
- { 0x13001fb8, 0x2400fff8 },
- { 0x13001fb9, 0x2400fff8 },
- { 0x13001fba, 0x2400ffb6 },
- { 0x13001fbb, 0x2400ffb6 },
- { 0x13001fbc, 0x2000fff7 },
- { 0x13001fbd, 0x60000000 },
- { 0x13001fbe, 0x1400e3db },
- { 0x13801fbf, 0x60000002 },
- { 0x13001fc2, 0x14000000 },
- { 0x13001fc3, 0x14000009 },
- { 0x13001fc4, 0x14000000 },
- { 0x13801fc6, 0x14000001 },
- { 0x13001fc8, 0x2400ffaa },
- { 0x13001fc9, 0x2400ffaa },
- { 0x13001fca, 0x2400ffaa },
- { 0x13001fcb, 0x2400ffaa },
- { 0x13001fcc, 0x2000fff7 },
- { 0x13801fcd, 0x60000002 },
- { 0x13001fd0, 0x14000008 },
- { 0x13001fd1, 0x14000008 },
- { 0x13801fd2, 0x14000001 },
- { 0x13801fd6, 0x14000001 },
- { 0x13001fd8, 0x2400fff8 },
- { 0x13001fd9, 0x2400fff8 },
- { 0x13001fda, 0x2400ff9c },
- { 0x13001fdb, 0x2400ff9c },
- { 0x13801fdd, 0x60000002 },
- { 0x13001fe0, 0x14000008 },
- { 0x13001fe1, 0x14000008 },
- { 0x13801fe2, 0x14000002 },
- { 0x13001fe5, 0x14000007 },
- { 0x13801fe6, 0x14000001 },
- { 0x13001fe8, 0x2400fff8 },
- { 0x13001fe9, 0x2400fff8 },
- { 0x13001fea, 0x2400ff90 },
- { 0x13001feb, 0x2400ff90 },
- { 0x13001fec, 0x2400fff9 },
- { 0x13801fed, 0x60000002 },
- { 0x13001ff2, 0x14000000 },
- { 0x13001ff3, 0x14000009 },
- { 0x13001ff4, 0x14000000 },
- { 0x13801ff6, 0x14000001 },
- { 0x13001ff8, 0x2400ff80 },
- { 0x13001ff9, 0x2400ff80 },
- { 0x13001ffa, 0x2400ff82 },
- { 0x13001ffb, 0x2400ff82 },
- { 0x13001ffc, 0x2000fff7 },
- { 0x13801ffd, 0x60000001 },
- { 0x09802000, 0x7400000a },
- { 0x0900200b, 0x04000000 },
- { 0x1b80200c, 0x04000001 },
- { 0x0980200e, 0x04000001 },
- { 0x09802010, 0x44000005 },
- { 0x09802016, 0x54000001 },
- { 0x09002018, 0x50000000 },
- { 0x09002019, 0x4c000000 },
- { 0x0900201a, 0x58000000 },
- { 0x0980201b, 0x50000001 },
- { 0x0900201d, 0x4c000000 },
- { 0x0900201e, 0x58000000 },
- { 0x0900201f, 0x50000000 },
- { 0x09802020, 0x54000007 },
- { 0x09002028, 0x6c000000 },
- { 0x09002029, 0x70000000 },
- { 0x0980202a, 0x04000004 },
- { 0x0900202f, 0x74000000 },
- { 0x09802030, 0x54000008 },
- { 0x09002039, 0x50000000 },
- { 0x0900203a, 0x4c000000 },
- { 0x0980203b, 0x54000003 },
- { 0x0980203f, 0x40000001 },
- { 0x09802041, 0x54000002 },
- { 0x09002044, 0x64000000 },
- { 0x09002045, 0x58000000 },
- { 0x09002046, 0x48000000 },
- { 0x09802047, 0x5400000a },
- { 0x09002052, 0x64000000 },
- { 0x09002053, 0x54000000 },
- { 0x09002054, 0x40000000 },
- { 0x09802055, 0x54000009 },
- { 0x0900205f, 0x74000000 },
- { 0x09802060, 0x04000003 },
- { 0x0980206a, 0x04000005 },
- { 0x09002070, 0x3c000000 },
- { 0x21002071, 0x14000000 },
- { 0x09802074, 0x3c000005 },
- { 0x0980207a, 0x64000002 },
- { 0x0900207d, 0x58000000 },
- { 0x0900207e, 0x48000000 },
- { 0x2100207f, 0x14000000 },
- { 0x09802080, 0x3c000009 },
- { 0x0980208a, 0x64000002 },
- { 0x0900208d, 0x58000000 },
- { 0x0900208e, 0x48000000 },
- { 0x21802090, 0x18000004 },
- { 0x098020a0, 0x5c000015 },
- { 0x1b8020d0, 0x3000000c },
- { 0x1b8020dd, 0x2c000003 },
- { 0x1b0020e1, 0x30000000 },
- { 0x1b8020e2, 0x2c000002 },
- { 0x1b8020e5, 0x3000000a },
- { 0x09802100, 0x68000001 },
- { 0x09002102, 0x24000000 },
- { 0x09802103, 0x68000003 },
- { 0x09002107, 0x24000000 },
- { 0x09802108, 0x68000001 },
- { 0x0900210a, 0x14000000 },
- { 0x0980210b, 0x24000002 },
- { 0x0980210e, 0x14000001 },
- { 0x09802110, 0x24000002 },
- { 0x09002113, 0x14000000 },
- { 0x09002114, 0x68000000 },
- { 0x09002115, 0x24000000 },
- { 0x09802116, 0x68000002 },
- { 0x09802119, 0x24000004 },
- { 0x0980211e, 0x68000005 },
- { 0x09002124, 0x24000000 },
- { 0x09002125, 0x68000000 },
- { 0x13002126, 0x2400e2a3 },
- { 0x09002127, 0x68000000 },
- { 0x09002128, 0x24000000 },
- { 0x09002129, 0x68000000 },
- { 0x2100212a, 0x2400df41 },
- { 0x2100212b, 0x2400dfba },
- { 0x0980212c, 0x24000001 },
- { 0x0900212e, 0x68000000 },
- { 0x0900212f, 0x14000000 },
- { 0x09802130, 0x24000001 },
- { 0x21002132, 0x2400001c },
- { 0x09002133, 0x24000000 },
- { 0x09002134, 0x14000000 },
- { 0x09802135, 0x1c000003 },
- { 0x09002139, 0x14000000 },
- { 0x0980213a, 0x68000001 },
- { 0x0980213c, 0x14000001 },
- { 0x0980213e, 0x24000001 },
- { 0x09802140, 0x64000004 },
- { 0x09002145, 0x24000000 },
- { 0x09802146, 0x14000003 },
- { 0x0900214a, 0x68000000 },
- { 0x0900214b, 0x64000000 },
- { 0x0980214c, 0x68000001 },
- { 0x2100214e, 0x1400ffe4 },
- { 0x09802153, 0x3c00000c },
- { 0x09002160, 0x38000010 },
- { 0x09002161, 0x38000010 },
- { 0x09002162, 0x38000010 },
- { 0x09002163, 0x38000010 },
- { 0x09002164, 0x38000010 },
- { 0x09002165, 0x38000010 },
- { 0x09002166, 0x38000010 },
- { 0x09002167, 0x38000010 },
- { 0x09002168, 0x38000010 },
- { 0x09002169, 0x38000010 },
- { 0x0900216a, 0x38000010 },
- { 0x0900216b, 0x38000010 },
- { 0x0900216c, 0x38000010 },
- { 0x0900216d, 0x38000010 },
- { 0x0900216e, 0x38000010 },
- { 0x0900216f, 0x38000010 },
- { 0x09002170, 0x3800fff0 },
- { 0x09002171, 0x3800fff0 },
- { 0x09002172, 0x3800fff0 },
- { 0x09002173, 0x3800fff0 },
- { 0x09002174, 0x3800fff0 },
- { 0x09002175, 0x3800fff0 },
- { 0x09002176, 0x3800fff0 },
- { 0x09002177, 0x3800fff0 },
- { 0x09002178, 0x3800fff0 },
- { 0x09002179, 0x3800fff0 },
- { 0x0900217a, 0x3800fff0 },
- { 0x0900217b, 0x3800fff0 },
- { 0x0900217c, 0x3800fff0 },
- { 0x0900217d, 0x3800fff0 },
- { 0x0900217e, 0x3800fff0 },
- { 0x0900217f, 0x3800fff0 },
- { 0x09802180, 0x38000002 },
- { 0x09002183, 0x24000001 },
- { 0x21002184, 0x1400ffff },
- { 0x09802190, 0x64000004 },
- { 0x09802195, 0x68000004 },
- { 0x0980219a, 0x64000001 },
- { 0x0980219c, 0x68000003 },
- { 0x090021a0, 0x64000000 },
- { 0x098021a1, 0x68000001 },
- { 0x090021a3, 0x64000000 },
- { 0x098021a4, 0x68000001 },
- { 0x090021a6, 0x64000000 },
- { 0x098021a7, 0x68000006 },
- { 0x090021ae, 0x64000000 },
- { 0x098021af, 0x6800001e },
- { 0x098021ce, 0x64000001 },
- { 0x098021d0, 0x68000001 },
- { 0x090021d2, 0x64000000 },
- { 0x090021d3, 0x68000000 },
- { 0x090021d4, 0x64000000 },
- { 0x098021d5, 0x6800001e },
- { 0x098021f4, 0x6400010b },
- { 0x09802300, 0x68000007 },
- { 0x09802308, 0x64000003 },
- { 0x0980230c, 0x68000013 },
- { 0x09802320, 0x64000001 },
- { 0x09802322, 0x68000006 },
- { 0x09002329, 0x58000000 },
- { 0x0900232a, 0x48000000 },
- { 0x0980232b, 0x68000050 },
- { 0x0900237c, 0x64000000 },
- { 0x0980237d, 0x6800001d },
- { 0x0980239b, 0x64000018 },
- { 0x098023b4, 0x68000027 },
- { 0x098023dc, 0x64000005 },
- { 0x098023e2, 0x68000005 },
- { 0x09802400, 0x68000026 },
- { 0x09802440, 0x6800000a },
- { 0x09802460, 0x3c00003b },
- { 0x0980249c, 0x68000019 },
- { 0x090024b6, 0x6800001a },
- { 0x090024b7, 0x6800001a },
- { 0x090024b8, 0x6800001a },
- { 0x090024b9, 0x6800001a },
- { 0x090024ba, 0x6800001a },
- { 0x090024bb, 0x6800001a },
- { 0x090024bc, 0x6800001a },
- { 0x090024bd, 0x6800001a },
- { 0x090024be, 0x6800001a },
- { 0x090024bf, 0x6800001a },
- { 0x090024c0, 0x6800001a },
- { 0x090024c1, 0x6800001a },
- { 0x090024c2, 0x6800001a },
- { 0x090024c3, 0x6800001a },
- { 0x090024c4, 0x6800001a },
- { 0x090024c5, 0x6800001a },
- { 0x090024c6, 0x6800001a },
- { 0x090024c7, 0x6800001a },
- { 0x090024c8, 0x6800001a },
- { 0x090024c9, 0x6800001a },
- { 0x090024ca, 0x6800001a },
- { 0x090024cb, 0x6800001a },
- { 0x090024cc, 0x6800001a },
- { 0x090024cd, 0x6800001a },
- { 0x090024ce, 0x6800001a },
- { 0x090024cf, 0x6800001a },
- { 0x090024d0, 0x6800ffe6 },
- { 0x090024d1, 0x6800ffe6 },
- { 0x090024d2, 0x6800ffe6 },
- { 0x090024d3, 0x6800ffe6 },
- { 0x090024d4, 0x6800ffe6 },
- { 0x090024d5, 0x6800ffe6 },
- { 0x090024d6, 0x6800ffe6 },
- { 0x090024d7, 0x6800ffe6 },
- { 0x090024d8, 0x6800ffe6 },
- { 0x090024d9, 0x6800ffe6 },
- { 0x090024da, 0x6800ffe6 },
- { 0x090024db, 0x6800ffe6 },
- { 0x090024dc, 0x6800ffe6 },
- { 0x090024dd, 0x6800ffe6 },
- { 0x090024de, 0x6800ffe6 },
- { 0x090024df, 0x6800ffe6 },
- { 0x090024e0, 0x6800ffe6 },
- { 0x090024e1, 0x6800ffe6 },
- { 0x090024e2, 0x6800ffe6 },
- { 0x090024e3, 0x6800ffe6 },
- { 0x090024e4, 0x6800ffe6 },
- { 0x090024e5, 0x6800ffe6 },
- { 0x090024e6, 0x6800ffe6 },
- { 0x090024e7, 0x6800ffe6 },
- { 0x090024e8, 0x6800ffe6 },
- { 0x090024e9, 0x6800ffe6 },
- { 0x098024ea, 0x3c000015 },
- { 0x09802500, 0x680000b6 },
- { 0x090025b7, 0x64000000 },
- { 0x098025b8, 0x68000008 },
- { 0x090025c1, 0x64000000 },
- { 0x098025c2, 0x68000035 },
- { 0x098025f8, 0x64000007 },
- { 0x09802600, 0x6800006e },
- { 0x0900266f, 0x64000000 },
- { 0x09802670, 0x6800002c },
- { 0x098026a0, 0x68000012 },
- { 0x09802701, 0x68000003 },
- { 0x09802706, 0x68000003 },
- { 0x0980270c, 0x6800001b },
- { 0x09802729, 0x68000022 },
- { 0x0900274d, 0x68000000 },
- { 0x0980274f, 0x68000003 },
- { 0x09002756, 0x68000000 },
- { 0x09802758, 0x68000006 },
- { 0x09802761, 0x68000006 },
- { 0x09002768, 0x58000000 },
- { 0x09002769, 0x48000000 },
- { 0x0900276a, 0x58000000 },
- { 0x0900276b, 0x48000000 },
- { 0x0900276c, 0x58000000 },
- { 0x0900276d, 0x48000000 },
- { 0x0900276e, 0x58000000 },
- { 0x0900276f, 0x48000000 },
- { 0x09002770, 0x58000000 },
- { 0x09002771, 0x48000000 },
- { 0x09002772, 0x58000000 },
- { 0x09002773, 0x48000000 },
- { 0x09002774, 0x58000000 },
- { 0x09002775, 0x48000000 },
- { 0x09802776, 0x3c00001d },
- { 0x09002794, 0x68000000 },
- { 0x09802798, 0x68000017 },
- { 0x098027b1, 0x6800000d },
- { 0x098027c0, 0x64000004 },
- { 0x090027c5, 0x58000000 },
- { 0x090027c6, 0x48000000 },
- { 0x098027c7, 0x64000003 },
- { 0x098027d0, 0x64000015 },
- { 0x090027e6, 0x58000000 },
- { 0x090027e7, 0x48000000 },
- { 0x090027e8, 0x58000000 },
- { 0x090027e9, 0x48000000 },
- { 0x090027ea, 0x58000000 },
- { 0x090027eb, 0x48000000 },
- { 0x098027f0, 0x6400000f },
- { 0x04802800, 0x680000ff },
- { 0x09802900, 0x64000082 },
- { 0x09002983, 0x58000000 },
- { 0x09002984, 0x48000000 },
- { 0x09002985, 0x58000000 },
- { 0x09002986, 0x48000000 },
- { 0x09002987, 0x58000000 },
- { 0x09002988, 0x48000000 },
- { 0x09002989, 0x58000000 },
- { 0x0900298a, 0x48000000 },
- { 0x0900298b, 0x58000000 },
- { 0x0900298c, 0x48000000 },
- { 0x0900298d, 0x58000000 },
- { 0x0900298e, 0x48000000 },
- { 0x0900298f, 0x58000000 },
- { 0x09002990, 0x48000000 },
- { 0x09002991, 0x58000000 },
- { 0x09002992, 0x48000000 },
- { 0x09002993, 0x58000000 },
- { 0x09002994, 0x48000000 },
- { 0x09002995, 0x58000000 },
- { 0x09002996, 0x48000000 },
- { 0x09002997, 0x58000000 },
- { 0x09002998, 0x48000000 },
- { 0x09802999, 0x6400003e },
- { 0x090029d8, 0x58000000 },
- { 0x090029d9, 0x48000000 },
- { 0x090029da, 0x58000000 },
- { 0x090029db, 0x48000000 },
- { 0x098029dc, 0x6400001f },
- { 0x090029fc, 0x58000000 },
- { 0x090029fd, 0x48000000 },
- { 0x098029fe, 0x64000101 },
- { 0x09802b00, 0x6800001a },
- { 0x09802b20, 0x68000003 },
- { 0x11002c00, 0x24000030 },
- { 0x11002c01, 0x24000030 },
- { 0x11002c02, 0x24000030 },
- { 0x11002c03, 0x24000030 },
- { 0x11002c04, 0x24000030 },
- { 0x11002c05, 0x24000030 },
- { 0x11002c06, 0x24000030 },
- { 0x11002c07, 0x24000030 },
- { 0x11002c08, 0x24000030 },
- { 0x11002c09, 0x24000030 },
- { 0x11002c0a, 0x24000030 },
- { 0x11002c0b, 0x24000030 },
- { 0x11002c0c, 0x24000030 },
- { 0x11002c0d, 0x24000030 },
- { 0x11002c0e, 0x24000030 },
- { 0x11002c0f, 0x24000030 },
- { 0x11002c10, 0x24000030 },
- { 0x11002c11, 0x24000030 },
- { 0x11002c12, 0x24000030 },
- { 0x11002c13, 0x24000030 },
- { 0x11002c14, 0x24000030 },
- { 0x11002c15, 0x24000030 },
- { 0x11002c16, 0x24000030 },
- { 0x11002c17, 0x24000030 },
- { 0x11002c18, 0x24000030 },
- { 0x11002c19, 0x24000030 },
- { 0x11002c1a, 0x24000030 },
- { 0x11002c1b, 0x24000030 },
- { 0x11002c1c, 0x24000030 },
- { 0x11002c1d, 0x24000030 },
- { 0x11002c1e, 0x24000030 },
- { 0x11002c1f, 0x24000030 },
- { 0x11002c20, 0x24000030 },
- { 0x11002c21, 0x24000030 },
- { 0x11002c22, 0x24000030 },
- { 0x11002c23, 0x24000030 },
- { 0x11002c24, 0x24000030 },
- { 0x11002c25, 0x24000030 },
- { 0x11002c26, 0x24000030 },
- { 0x11002c27, 0x24000030 },
- { 0x11002c28, 0x24000030 },
- { 0x11002c29, 0x24000030 },
- { 0x11002c2a, 0x24000030 },
- { 0x11002c2b, 0x24000030 },
- { 0x11002c2c, 0x24000030 },
- { 0x11002c2d, 0x24000030 },
- { 0x11002c2e, 0x24000030 },
- { 0x11002c30, 0x1400ffd0 },
- { 0x11002c31, 0x1400ffd0 },
- { 0x11002c32, 0x1400ffd0 },
- { 0x11002c33, 0x1400ffd0 },
- { 0x11002c34, 0x1400ffd0 },
- { 0x11002c35, 0x1400ffd0 },
- { 0x11002c36, 0x1400ffd0 },
- { 0x11002c37, 0x1400ffd0 },
- { 0x11002c38, 0x1400ffd0 },
- { 0x11002c39, 0x1400ffd0 },
- { 0x11002c3a, 0x1400ffd0 },
- { 0x11002c3b, 0x1400ffd0 },
- { 0x11002c3c, 0x1400ffd0 },
- { 0x11002c3d, 0x1400ffd0 },
- { 0x11002c3e, 0x1400ffd0 },
- { 0x11002c3f, 0x1400ffd0 },
- { 0x11002c40, 0x1400ffd0 },
- { 0x11002c41, 0x1400ffd0 },
- { 0x11002c42, 0x1400ffd0 },
- { 0x11002c43, 0x1400ffd0 },
- { 0x11002c44, 0x1400ffd0 },
- { 0x11002c45, 0x1400ffd0 },
- { 0x11002c46, 0x1400ffd0 },
- { 0x11002c47, 0x1400ffd0 },
- { 0x11002c48, 0x1400ffd0 },
- { 0x11002c49, 0x1400ffd0 },
- { 0x11002c4a, 0x1400ffd0 },
- { 0x11002c4b, 0x1400ffd0 },
- { 0x11002c4c, 0x1400ffd0 },
- { 0x11002c4d, 0x1400ffd0 },
- { 0x11002c4e, 0x1400ffd0 },
- { 0x11002c4f, 0x1400ffd0 },
- { 0x11002c50, 0x1400ffd0 },
- { 0x11002c51, 0x1400ffd0 },
- { 0x11002c52, 0x1400ffd0 },
- { 0x11002c53, 0x1400ffd0 },
- { 0x11002c54, 0x1400ffd0 },
- { 0x11002c55, 0x1400ffd0 },
- { 0x11002c56, 0x1400ffd0 },
- { 0x11002c57, 0x1400ffd0 },
- { 0x11002c58, 0x1400ffd0 },
- { 0x11002c59, 0x1400ffd0 },
- { 0x11002c5a, 0x1400ffd0 },
- { 0x11002c5b, 0x1400ffd0 },
- { 0x11002c5c, 0x1400ffd0 },
- { 0x11002c5d, 0x1400ffd0 },
- { 0x11002c5e, 0x1400ffd0 },
- { 0x21002c60, 0x24000001 },
- { 0x21002c61, 0x1400ffff },
- { 0x21002c62, 0x2400d609 },
- { 0x21002c63, 0x2400f11a },
- { 0x21002c64, 0x2400d619 },
- { 0x21002c65, 0x1400d5d5 },
- { 0x21002c66, 0x1400d5d8 },
- { 0x21002c67, 0x24000001 },
- { 0x21002c68, 0x1400ffff },
- { 0x21002c69, 0x24000001 },
- { 0x21002c6a, 0x1400ffff },
- { 0x21002c6b, 0x24000001 },
- { 0x21002c6c, 0x1400ffff },
- { 0x21002c74, 0x14000000 },
- { 0x21002c75, 0x24000001 },
- { 0x21002c76, 0x1400ffff },
- { 0x21002c77, 0x14000000 },
- { 0x0a002c80, 0x24000001 },
- { 0x0a002c81, 0x1400ffff },
- { 0x0a002c82, 0x24000001 },
- { 0x0a002c83, 0x1400ffff },
- { 0x0a002c84, 0x24000001 },
- { 0x0a002c85, 0x1400ffff },
- { 0x0a002c86, 0x24000001 },
- { 0x0a002c87, 0x1400ffff },
- { 0x0a002c88, 0x24000001 },
- { 0x0a002c89, 0x1400ffff },
- { 0x0a002c8a, 0x24000001 },
- { 0x0a002c8b, 0x1400ffff },
- { 0x0a002c8c, 0x24000001 },
- { 0x0a002c8d, 0x1400ffff },
- { 0x0a002c8e, 0x24000001 },
- { 0x0a002c8f, 0x1400ffff },
- { 0x0a002c90, 0x24000001 },
- { 0x0a002c91, 0x1400ffff },
- { 0x0a002c92, 0x24000001 },
- { 0x0a002c93, 0x1400ffff },
- { 0x0a002c94, 0x24000001 },
- { 0x0a002c95, 0x1400ffff },
- { 0x0a002c96, 0x24000001 },
- { 0x0a002c97, 0x1400ffff },
- { 0x0a002c98, 0x24000001 },
- { 0x0a002c99, 0x1400ffff },
- { 0x0a002c9a, 0x24000001 },
- { 0x0a002c9b, 0x1400ffff },
- { 0x0a002c9c, 0x24000001 },
- { 0x0a002c9d, 0x1400ffff },
- { 0x0a002c9e, 0x24000001 },
- { 0x0a002c9f, 0x1400ffff },
- { 0x0a002ca0, 0x24000001 },
- { 0x0a002ca1, 0x1400ffff },
- { 0x0a002ca2, 0x24000001 },
- { 0x0a002ca3, 0x1400ffff },
- { 0x0a002ca4, 0x24000001 },
- { 0x0a002ca5, 0x1400ffff },
- { 0x0a002ca6, 0x24000001 },
- { 0x0a002ca7, 0x1400ffff },
- { 0x0a002ca8, 0x24000001 },
- { 0x0a002ca9, 0x1400ffff },
- { 0x0a002caa, 0x24000001 },
- { 0x0a002cab, 0x1400ffff },
- { 0x0a002cac, 0x24000001 },
- { 0x0a002cad, 0x1400ffff },
- { 0x0a002cae, 0x24000001 },
- { 0x0a002caf, 0x1400ffff },
- { 0x0a002cb0, 0x24000001 },
- { 0x0a002cb1, 0x1400ffff },
- { 0x0a002cb2, 0x24000001 },
- { 0x0a002cb3, 0x1400ffff },
- { 0x0a002cb4, 0x24000001 },
- { 0x0a002cb5, 0x1400ffff },
- { 0x0a002cb6, 0x24000001 },
- { 0x0a002cb7, 0x1400ffff },
- { 0x0a002cb8, 0x24000001 },
- { 0x0a002cb9, 0x1400ffff },
- { 0x0a002cba, 0x24000001 },
- { 0x0a002cbb, 0x1400ffff },
- { 0x0a002cbc, 0x24000001 },
- { 0x0a002cbd, 0x1400ffff },
- { 0x0a002cbe, 0x24000001 },
- { 0x0a002cbf, 0x1400ffff },
- { 0x0a002cc0, 0x24000001 },
- { 0x0a002cc1, 0x1400ffff },
- { 0x0a002cc2, 0x24000001 },
- { 0x0a002cc3, 0x1400ffff },
- { 0x0a002cc4, 0x24000001 },
- { 0x0a002cc5, 0x1400ffff },
- { 0x0a002cc6, 0x24000001 },
- { 0x0a002cc7, 0x1400ffff },
- { 0x0a002cc8, 0x24000001 },
- { 0x0a002cc9, 0x1400ffff },
- { 0x0a002cca, 0x24000001 },
- { 0x0a002ccb, 0x1400ffff },
- { 0x0a002ccc, 0x24000001 },
- { 0x0a002ccd, 0x1400ffff },
- { 0x0a002cce, 0x24000001 },
- { 0x0a002ccf, 0x1400ffff },
- { 0x0a002cd0, 0x24000001 },
- { 0x0a002cd1, 0x1400ffff },
- { 0x0a002cd2, 0x24000001 },
- { 0x0a002cd3, 0x1400ffff },
- { 0x0a002cd4, 0x24000001 },
- { 0x0a002cd5, 0x1400ffff },
- { 0x0a002cd6, 0x24000001 },
- { 0x0a002cd7, 0x1400ffff },
- { 0x0a002cd8, 0x24000001 },
- { 0x0a002cd9, 0x1400ffff },
- { 0x0a002cda, 0x24000001 },
- { 0x0a002cdb, 0x1400ffff },
- { 0x0a002cdc, 0x24000001 },
- { 0x0a002cdd, 0x1400ffff },
- { 0x0a002cde, 0x24000001 },
- { 0x0a002cdf, 0x1400ffff },
- { 0x0a002ce0, 0x24000001 },
- { 0x0a002ce1, 0x1400ffff },
- { 0x0a002ce2, 0x24000001 },
- { 0x0a002ce3, 0x1400ffff },
- { 0x0a002ce4, 0x14000000 },
- { 0x0a802ce5, 0x68000005 },
- { 0x0a802cf9, 0x54000003 },
- { 0x0a002cfd, 0x3c000000 },
- { 0x0a802cfe, 0x54000001 },
- { 0x10002d00, 0x1400e3a0 },
- { 0x10002d01, 0x1400e3a0 },
- { 0x10002d02, 0x1400e3a0 },
- { 0x10002d03, 0x1400e3a0 },
- { 0x10002d04, 0x1400e3a0 },
- { 0x10002d05, 0x1400e3a0 },
- { 0x10002d06, 0x1400e3a0 },
- { 0x10002d07, 0x1400e3a0 },
- { 0x10002d08, 0x1400e3a0 },
- { 0x10002d09, 0x1400e3a0 },
- { 0x10002d0a, 0x1400e3a0 },
- { 0x10002d0b, 0x1400e3a0 },
- { 0x10002d0c, 0x1400e3a0 },
- { 0x10002d0d, 0x1400e3a0 },
- { 0x10002d0e, 0x1400e3a0 },
- { 0x10002d0f, 0x1400e3a0 },
- { 0x10002d10, 0x1400e3a0 },
- { 0x10002d11, 0x1400e3a0 },
- { 0x10002d12, 0x1400e3a0 },
- { 0x10002d13, 0x1400e3a0 },
- { 0x10002d14, 0x1400e3a0 },
- { 0x10002d15, 0x1400e3a0 },
- { 0x10002d16, 0x1400e3a0 },
- { 0x10002d17, 0x1400e3a0 },
- { 0x10002d18, 0x1400e3a0 },
- { 0x10002d19, 0x1400e3a0 },
- { 0x10002d1a, 0x1400e3a0 },
- { 0x10002d1b, 0x1400e3a0 },
- { 0x10002d1c, 0x1400e3a0 },
- { 0x10002d1d, 0x1400e3a0 },
- { 0x10002d1e, 0x1400e3a0 },
- { 0x10002d1f, 0x1400e3a0 },
- { 0x10002d20, 0x1400e3a0 },
- { 0x10002d21, 0x1400e3a0 },
- { 0x10002d22, 0x1400e3a0 },
- { 0x10002d23, 0x1400e3a0 },
- { 0x10002d24, 0x1400e3a0 },
- { 0x10002d25, 0x1400e3a0 },
- { 0x3a802d30, 0x1c000035 },
- { 0x3a002d6f, 0x18000000 },
- { 0x0f802d80, 0x1c000016 },
- { 0x0f802da0, 0x1c000006 },
- { 0x0f802da8, 0x1c000006 },
- { 0x0f802db0, 0x1c000006 },
- { 0x0f802db8, 0x1c000006 },
- { 0x0f802dc0, 0x1c000006 },
- { 0x0f802dc8, 0x1c000006 },
- { 0x0f802dd0, 0x1c000006 },
- { 0x0f802dd8, 0x1c000006 },
- { 0x09802e00, 0x54000001 },
- { 0x09002e02, 0x50000000 },
- { 0x09002e03, 0x4c000000 },
- { 0x09002e04, 0x50000000 },
- { 0x09002e05, 0x4c000000 },
- { 0x09802e06, 0x54000002 },
- { 0x09002e09, 0x50000000 },
- { 0x09002e0a, 0x4c000000 },
- { 0x09002e0b, 0x54000000 },
- { 0x09002e0c, 0x50000000 },
- { 0x09002e0d, 0x4c000000 },
- { 0x09802e0e, 0x54000008 },
- { 0x09002e17, 0x44000000 },
- { 0x09002e1c, 0x50000000 },
- { 0x09002e1d, 0x4c000000 },
- { 0x16802e80, 0x68000019 },
- { 0x16802e9b, 0x68000058 },
- { 0x16802f00, 0x680000d5 },
- { 0x09802ff0, 0x6800000b },
- { 0x09003000, 0x74000000 },
- { 0x09803001, 0x54000002 },
- { 0x09003004, 0x68000000 },
- { 0x16003005, 0x18000000 },
- { 0x09003006, 0x1c000000 },
- { 0x16003007, 0x38000000 },
- { 0x09003008, 0x58000000 },
- { 0x09003009, 0x48000000 },
- { 0x0900300a, 0x58000000 },
- { 0x0900300b, 0x48000000 },
- { 0x0900300c, 0x58000000 },
- { 0x0900300d, 0x48000000 },
- { 0x0900300e, 0x58000000 },
- { 0x0900300f, 0x48000000 },
- { 0x09003010, 0x58000000 },
- { 0x09003011, 0x48000000 },
- { 0x09803012, 0x68000001 },
- { 0x09003014, 0x58000000 },
- { 0x09003015, 0x48000000 },
- { 0x09003016, 0x58000000 },
- { 0x09003017, 0x48000000 },
- { 0x09003018, 0x58000000 },
- { 0x09003019, 0x48000000 },
- { 0x0900301a, 0x58000000 },
- { 0x0900301b, 0x48000000 },
- { 0x0900301c, 0x44000000 },
- { 0x0900301d, 0x58000000 },
- { 0x0980301e, 0x48000001 },
- { 0x09003020, 0x68000000 },
- { 0x16803021, 0x38000008 },
- { 0x1b80302a, 0x30000005 },
- { 0x09003030, 0x44000000 },
- { 0x09803031, 0x18000004 },
- { 0x09803036, 0x68000001 },
- { 0x16803038, 0x38000002 },
- { 0x1600303b, 0x18000000 },
- { 0x0900303c, 0x1c000000 },
- { 0x0900303d, 0x54000000 },
- { 0x0980303e, 0x68000001 },
- { 0x1a803041, 0x1c000055 },
- { 0x1b803099, 0x30000001 },
- { 0x0980309b, 0x60000001 },
- { 0x1a80309d, 0x18000001 },
- { 0x1a00309f, 0x1c000000 },
- { 0x090030a0, 0x44000000 },
- { 0x1d8030a1, 0x1c000059 },
- { 0x090030fb, 0x54000000 },
- { 0x090030fc, 0x18000000 },
- { 0x1d8030fd, 0x18000001 },
- { 0x1d0030ff, 0x1c000000 },
- { 0x03803105, 0x1c000027 },
- { 0x17803131, 0x1c00005d },
- { 0x09803190, 0x68000001 },
- { 0x09803192, 0x3c000003 },
- { 0x09803196, 0x68000009 },
- { 0x038031a0, 0x1c000017 },
- { 0x098031c0, 0x6800000f },
- { 0x1d8031f0, 0x1c00000f },
- { 0x17803200, 0x6800001e },
- { 0x09803220, 0x3c000009 },
- { 0x0980322a, 0x68000019 },
- { 0x09003250, 0x68000000 },
- { 0x09803251, 0x3c00000e },
- { 0x17803260, 0x6800001d },
- { 0x0980327e, 0x68000001 },
- { 0x09803280, 0x3c000009 },
- { 0x0980328a, 0x68000026 },
- { 0x098032b1, 0x3c00000e },
- { 0x098032c0, 0x6800003e },
- { 0x09803300, 0x680000ff },
- { 0x16803400, 0x1c0019b5 },
- { 0x09804dc0, 0x6800003f },
- { 0x16804e00, 0x1c0051bb },
- { 0x3c80a000, 0x1c000014 },
- { 0x3c00a015, 0x18000000 },
- { 0x3c80a016, 0x1c000476 },
- { 0x3c80a490, 0x68000036 },
- { 0x0980a700, 0x60000016 },
- { 0x0980a717, 0x18000003 },
- { 0x0980a720, 0x60000001 },
- { 0x3080a800, 0x1c000001 },
- { 0x3000a802, 0x28000000 },
- { 0x3080a803, 0x1c000002 },
- { 0x3000a806, 0x30000000 },
- { 0x3080a807, 0x1c000003 },
- { 0x3000a80b, 0x30000000 },
- { 0x3080a80c, 0x1c000016 },
- { 0x3080a823, 0x28000001 },
- { 0x3080a825, 0x30000001 },
- { 0x3000a827, 0x28000000 },
- { 0x3080a828, 0x68000003 },
- { 0x4080a840, 0x1c000033 },
- { 0x4080a874, 0x54000003 },
- { 0x1780ac00, 0x1c002ba3 },
- { 0x0980d800, 0x1000037f },
- { 0x0980db80, 0x1000007f },
- { 0x0980dc00, 0x100003ff },
- { 0x0980e000, 0x0c0018ff },
- { 0x1680f900, 0x1c00012d },
- { 0x1680fa30, 0x1c00003a },
- { 0x1680fa70, 0x1c000069 },
- { 0x2180fb00, 0x14000006 },
- { 0x0180fb13, 0x14000004 },
- { 0x1900fb1d, 0x1c000000 },
- { 0x1900fb1e, 0x30000000 },
- { 0x1980fb1f, 0x1c000009 },
- { 0x1900fb29, 0x64000000 },
- { 0x1980fb2a, 0x1c00000c },
- { 0x1980fb38, 0x1c000004 },
- { 0x1900fb3e, 0x1c000000 },
- { 0x1980fb40, 0x1c000001 },
- { 0x1980fb43, 0x1c000001 },
- { 0x1980fb46, 0x1c000009 },
- { 0x0080fb50, 0x1c000061 },
- { 0x0080fbd3, 0x1c00016a },
- { 0x0900fd3e, 0x58000000 },
- { 0x0900fd3f, 0x48000000 },
- { 0x0080fd50, 0x1c00003f },
- { 0x0080fd92, 0x1c000035 },
- { 0x0080fdf0, 0x1c00000b },
- { 0x0000fdfc, 0x5c000000 },
- { 0x0900fdfd, 0x68000000 },
- { 0x1b80fe00, 0x3000000f },
- { 0x0980fe10, 0x54000006 },
- { 0x0900fe17, 0x58000000 },
- { 0x0900fe18, 0x48000000 },
- { 0x0900fe19, 0x54000000 },
- { 0x1b80fe20, 0x30000003 },
- { 0x0900fe30, 0x54000000 },
- { 0x0980fe31, 0x44000001 },
- { 0x0980fe33, 0x40000001 },
- { 0x0900fe35, 0x58000000 },
- { 0x0900fe36, 0x48000000 },
- { 0x0900fe37, 0x58000000 },
- { 0x0900fe38, 0x48000000 },
- { 0x0900fe39, 0x58000000 },
- { 0x0900fe3a, 0x48000000 },
- { 0x0900fe3b, 0x58000000 },
- { 0x0900fe3c, 0x48000000 },
- { 0x0900fe3d, 0x58000000 },
- { 0x0900fe3e, 0x48000000 },
- { 0x0900fe3f, 0x58000000 },
- { 0x0900fe40, 0x48000000 },
- { 0x0900fe41, 0x58000000 },
- { 0x0900fe42, 0x48000000 },
- { 0x0900fe43, 0x58000000 },
- { 0x0900fe44, 0x48000000 },
- { 0x0980fe45, 0x54000001 },
- { 0x0900fe47, 0x58000000 },
- { 0x0900fe48, 0x48000000 },
- { 0x0980fe49, 0x54000003 },
- { 0x0980fe4d, 0x40000002 },
- { 0x0980fe50, 0x54000002 },
- { 0x0980fe54, 0x54000003 },
- { 0x0900fe58, 0x44000000 },
- { 0x0900fe59, 0x58000000 },
- { 0x0900fe5a, 0x48000000 },
- { 0x0900fe5b, 0x58000000 },
- { 0x0900fe5c, 0x48000000 },
- { 0x0900fe5d, 0x58000000 },
- { 0x0900fe5e, 0x48000000 },
- { 0x0980fe5f, 0x54000002 },
- { 0x0900fe62, 0x64000000 },
- { 0x0900fe63, 0x44000000 },
- { 0x0980fe64, 0x64000002 },
- { 0x0900fe68, 0x54000000 },
- { 0x0900fe69, 0x5c000000 },
- { 0x0980fe6a, 0x54000001 },
- { 0x0080fe70, 0x1c000004 },
- { 0x0080fe76, 0x1c000086 },
- { 0x0900feff, 0x04000000 },
- { 0x0980ff01, 0x54000002 },
- { 0x0900ff04, 0x5c000000 },
- { 0x0980ff05, 0x54000002 },
- { 0x0900ff08, 0x58000000 },
- { 0x0900ff09, 0x48000000 },
- { 0x0900ff0a, 0x54000000 },
- { 0x0900ff0b, 0x64000000 },
- { 0x0900ff0c, 0x54000000 },
- { 0x0900ff0d, 0x44000000 },
- { 0x0980ff0e, 0x54000001 },
- { 0x0980ff10, 0x34000009 },
- { 0x0980ff1a, 0x54000001 },
- { 0x0980ff1c, 0x64000002 },
- { 0x0980ff1f, 0x54000001 },
- { 0x2100ff21, 0x24000020 },
- { 0x2100ff22, 0x24000020 },
- { 0x2100ff23, 0x24000020 },
- { 0x2100ff24, 0x24000020 },
- { 0x2100ff25, 0x24000020 },
- { 0x2100ff26, 0x24000020 },
- { 0x2100ff27, 0x24000020 },
- { 0x2100ff28, 0x24000020 },
- { 0x2100ff29, 0x24000020 },
- { 0x2100ff2a, 0x24000020 },
- { 0x2100ff2b, 0x24000020 },
- { 0x2100ff2c, 0x24000020 },
- { 0x2100ff2d, 0x24000020 },
- { 0x2100ff2e, 0x24000020 },
- { 0x2100ff2f, 0x24000020 },
- { 0x2100ff30, 0x24000020 },
- { 0x2100ff31, 0x24000020 },
- { 0x2100ff32, 0x24000020 },
- { 0x2100ff33, 0x24000020 },
- { 0x2100ff34, 0x24000020 },
- { 0x2100ff35, 0x24000020 },
- { 0x2100ff36, 0x24000020 },
- { 0x2100ff37, 0x24000020 },
- { 0x2100ff38, 0x24000020 },
- { 0x2100ff39, 0x24000020 },
- { 0x2100ff3a, 0x24000020 },
- { 0x0900ff3b, 0x58000000 },
- { 0x0900ff3c, 0x54000000 },
- { 0x0900ff3d, 0x48000000 },
- { 0x0900ff3e, 0x60000000 },
- { 0x0900ff3f, 0x40000000 },
- { 0x0900ff40, 0x60000000 },
- { 0x2100ff41, 0x1400ffe0 },
- { 0x2100ff42, 0x1400ffe0 },
- { 0x2100ff43, 0x1400ffe0 },
- { 0x2100ff44, 0x1400ffe0 },
- { 0x2100ff45, 0x1400ffe0 },
- { 0x2100ff46, 0x1400ffe0 },
- { 0x2100ff47, 0x1400ffe0 },
- { 0x2100ff48, 0x1400ffe0 },
- { 0x2100ff49, 0x1400ffe0 },
- { 0x2100ff4a, 0x1400ffe0 },
- { 0x2100ff4b, 0x1400ffe0 },
- { 0x2100ff4c, 0x1400ffe0 },
- { 0x2100ff4d, 0x1400ffe0 },
- { 0x2100ff4e, 0x1400ffe0 },
- { 0x2100ff4f, 0x1400ffe0 },
- { 0x2100ff50, 0x1400ffe0 },
- { 0x2100ff51, 0x1400ffe0 },
- { 0x2100ff52, 0x1400ffe0 },
- { 0x2100ff53, 0x1400ffe0 },
- { 0x2100ff54, 0x1400ffe0 },
- { 0x2100ff55, 0x1400ffe0 },
- { 0x2100ff56, 0x1400ffe0 },
- { 0x2100ff57, 0x1400ffe0 },
- { 0x2100ff58, 0x1400ffe0 },
- { 0x2100ff59, 0x1400ffe0 },
- { 0x2100ff5a, 0x1400ffe0 },
- { 0x0900ff5b, 0x58000000 },
- { 0x0900ff5c, 0x64000000 },
- { 0x0900ff5d, 0x48000000 },
- { 0x0900ff5e, 0x64000000 },
- { 0x0900ff5f, 0x58000000 },
- { 0x0900ff60, 0x48000000 },
- { 0x0900ff61, 0x54000000 },
- { 0x0900ff62, 0x58000000 },
- { 0x0900ff63, 0x48000000 },
- { 0x0980ff64, 0x54000001 },
- { 0x1d80ff66, 0x1c000009 },
- { 0x0900ff70, 0x18000000 },
- { 0x1d80ff71, 0x1c00002c },
- { 0x0980ff9e, 0x18000001 },
- { 0x1780ffa0, 0x1c00001e },
- { 0x1780ffc2, 0x1c000005 },
- { 0x1780ffca, 0x1c000005 },
- { 0x1780ffd2, 0x1c000005 },
- { 0x1780ffda, 0x1c000002 },
- { 0x0980ffe0, 0x5c000001 },
- { 0x0900ffe2, 0x64000000 },
- { 0x0900ffe3, 0x60000000 },
- { 0x0900ffe4, 0x68000000 },
- { 0x0980ffe5, 0x5c000001 },
- { 0x0900ffe8, 0x68000000 },
- { 0x0980ffe9, 0x64000003 },
- { 0x0980ffed, 0x68000001 },
- { 0x0980fff9, 0x04000002 },
- { 0x0980fffc, 0x68000001 },
- { 0x23810000, 0x1c00000b },
- { 0x2381000d, 0x1c000019 },
- { 0x23810028, 0x1c000012 },
- { 0x2381003c, 0x1c000001 },
- { 0x2381003f, 0x1c00000e },
- { 0x23810050, 0x1c00000d },
- { 0x23810080, 0x1c00007a },
- { 0x09810100, 0x54000001 },
- { 0x09010102, 0x68000000 },
- { 0x09810107, 0x3c00002c },
- { 0x09810137, 0x68000008 },
- { 0x13810140, 0x38000034 },
- { 0x13810175, 0x3c000003 },
- { 0x13810179, 0x68000010 },
- { 0x1301018a, 0x3c000000 },
- { 0x29810300, 0x1c00001e },
- { 0x29810320, 0x3c000003 },
- { 0x12810330, 0x1c000010 },
- { 0x12010341, 0x38000000 },
- { 0x12810342, 0x1c000007 },
- { 0x1201034a, 0x38000000 },
- { 0x3b810380, 0x1c00001d },
- { 0x3b01039f, 0x54000000 },
- { 0x2a8103a0, 0x1c000023 },
- { 0x2a8103c8, 0x1c000007 },
- { 0x2a0103d0, 0x54000000 },
- { 0x2a8103d1, 0x38000004 },
- { 0x0d010400, 0x24000028 },
- { 0x0d010401, 0x24000028 },
- { 0x0d010402, 0x24000028 },
- { 0x0d010403, 0x24000028 },
- { 0x0d010404, 0x24000028 },
- { 0x0d010405, 0x24000028 },
- { 0x0d010406, 0x24000028 },
- { 0x0d010407, 0x24000028 },
- { 0x0d010408, 0x24000028 },
- { 0x0d010409, 0x24000028 },
- { 0x0d01040a, 0x24000028 },
- { 0x0d01040b, 0x24000028 },
- { 0x0d01040c, 0x24000028 },
- { 0x0d01040d, 0x24000028 },
- { 0x0d01040e, 0x24000028 },
- { 0x0d01040f, 0x24000028 },
- { 0x0d010410, 0x24000028 },
- { 0x0d010411, 0x24000028 },
- { 0x0d010412, 0x24000028 },
- { 0x0d010413, 0x24000028 },
- { 0x0d010414, 0x24000028 },
- { 0x0d010415, 0x24000028 },
- { 0x0d010416, 0x24000028 },
- { 0x0d010417, 0x24000028 },
- { 0x0d010418, 0x24000028 },
- { 0x0d010419, 0x24000028 },
- { 0x0d01041a, 0x24000028 },
- { 0x0d01041b, 0x24000028 },
- { 0x0d01041c, 0x24000028 },
- { 0x0d01041d, 0x24000028 },
- { 0x0d01041e, 0x24000028 },
- { 0x0d01041f, 0x24000028 },
- { 0x0d010420, 0x24000028 },
- { 0x0d010421, 0x24000028 },
- { 0x0d010422, 0x24000028 },
- { 0x0d010423, 0x24000028 },
- { 0x0d010424, 0x24000028 },
- { 0x0d010425, 0x24000028 },
- { 0x0d010426, 0x24000028 },
- { 0x0d010427, 0x24000028 },
- { 0x0d010428, 0x1400ffd8 },
- { 0x0d010429, 0x1400ffd8 },
- { 0x0d01042a, 0x1400ffd8 },
- { 0x0d01042b, 0x1400ffd8 },
- { 0x0d01042c, 0x1400ffd8 },
- { 0x0d01042d, 0x1400ffd8 },
- { 0x0d01042e, 0x1400ffd8 },
- { 0x0d01042f, 0x1400ffd8 },
- { 0x0d010430, 0x1400ffd8 },
- { 0x0d010431, 0x1400ffd8 },
- { 0x0d010432, 0x1400ffd8 },
- { 0x0d010433, 0x1400ffd8 },
- { 0x0d010434, 0x1400ffd8 },
- { 0x0d010435, 0x1400ffd8 },
- { 0x0d010436, 0x1400ffd8 },
- { 0x0d010437, 0x1400ffd8 },
- { 0x0d010438, 0x1400ffd8 },
- { 0x0d010439, 0x1400ffd8 },
- { 0x0d01043a, 0x1400ffd8 },
- { 0x0d01043b, 0x1400ffd8 },
- { 0x0d01043c, 0x1400ffd8 },
- { 0x0d01043d, 0x1400ffd8 },
- { 0x0d01043e, 0x1400ffd8 },
- { 0x0d01043f, 0x1400ffd8 },
- { 0x0d010440, 0x1400ffd8 },
- { 0x0d010441, 0x1400ffd8 },
- { 0x0d010442, 0x1400ffd8 },
- { 0x0d010443, 0x1400ffd8 },
- { 0x0d010444, 0x1400ffd8 },
- { 0x0d010445, 0x1400ffd8 },
- { 0x0d010446, 0x1400ffd8 },
- { 0x0d010447, 0x1400ffd8 },
- { 0x0d010448, 0x1400ffd8 },
- { 0x0d010449, 0x1400ffd8 },
- { 0x0d01044a, 0x1400ffd8 },
- { 0x0d01044b, 0x1400ffd8 },
- { 0x0d01044c, 0x1400ffd8 },
- { 0x0d01044d, 0x1400ffd8 },
- { 0x0d01044e, 0x1400ffd8 },
- { 0x0d01044f, 0x1400ffd8 },
- { 0x2e810450, 0x1c00002f },
- { 0x2c810480, 0x1c00001d },
- { 0x2c8104a0, 0x34000009 },
- { 0x0b810800, 0x1c000005 },
- { 0x0b010808, 0x1c000000 },
- { 0x0b81080a, 0x1c00002b },
- { 0x0b810837, 0x1c000001 },
- { 0x0b01083c, 0x1c000000 },
- { 0x0b01083f, 0x1c000000 },
- { 0x41810900, 0x1c000015 },
- { 0x41810916, 0x3c000003 },
- { 0x4101091f, 0x54000000 },
- { 0x1e010a00, 0x1c000000 },
- { 0x1e810a01, 0x30000002 },
- { 0x1e810a05, 0x30000001 },
- { 0x1e810a0c, 0x30000003 },
- { 0x1e810a10, 0x1c000003 },
- { 0x1e810a15, 0x1c000002 },
- { 0x1e810a19, 0x1c00001a },
- { 0x1e810a38, 0x30000002 },
- { 0x1e010a3f, 0x30000000 },
- { 0x1e810a40, 0x3c000007 },
- { 0x1e810a50, 0x54000008 },
- { 0x3e812000, 0x1c00036e },
- { 0x3e812400, 0x38000062 },
- { 0x3e812470, 0x54000003 },
- { 0x0981d000, 0x680000f5 },
- { 0x0981d100, 0x68000026 },
- { 0x0981d12a, 0x6800003a },
- { 0x0981d165, 0x28000001 },
- { 0x1b81d167, 0x30000002 },
- { 0x0981d16a, 0x68000002 },
- { 0x0981d16d, 0x28000005 },
- { 0x0981d173, 0x04000007 },
- { 0x1b81d17b, 0x30000007 },
- { 0x0981d183, 0x68000001 },
- { 0x1b81d185, 0x30000006 },
- { 0x0981d18c, 0x6800001d },
- { 0x1b81d1aa, 0x30000003 },
- { 0x0981d1ae, 0x6800002f },
- { 0x1381d200, 0x68000041 },
- { 0x1381d242, 0x30000002 },
- { 0x1301d245, 0x68000000 },
- { 0x0981d300, 0x68000056 },
- { 0x0981d360, 0x3c000011 },
- { 0x0981d400, 0x24000019 },
- { 0x0981d41a, 0x14000019 },
- { 0x0981d434, 0x24000019 },
- { 0x0981d44e, 0x14000006 },
- { 0x0981d456, 0x14000011 },
- { 0x0981d468, 0x24000019 },
- { 0x0981d482, 0x14000019 },
- { 0x0901d49c, 0x24000000 },
- { 0x0981d49e, 0x24000001 },
- { 0x0901d4a2, 0x24000000 },
- { 0x0981d4a5, 0x24000001 },
- { 0x0981d4a9, 0x24000003 },
- { 0x0981d4ae, 0x24000007 },
- { 0x0981d4b6, 0x14000003 },
- { 0x0901d4bb, 0x14000000 },
- { 0x0981d4bd, 0x14000006 },
- { 0x0981d4c5, 0x1400000a },
- { 0x0981d4d0, 0x24000019 },
- { 0x0981d4ea, 0x14000019 },
- { 0x0981d504, 0x24000001 },
- { 0x0981d507, 0x24000003 },
- { 0x0981d50d, 0x24000007 },
- { 0x0981d516, 0x24000006 },
- { 0x0981d51e, 0x14000019 },
- { 0x0981d538, 0x24000001 },
- { 0x0981d53b, 0x24000003 },
- { 0x0981d540, 0x24000004 },
- { 0x0901d546, 0x24000000 },
- { 0x0981d54a, 0x24000006 },
- { 0x0981d552, 0x14000019 },
- { 0x0981d56c, 0x24000019 },
- { 0x0981d586, 0x14000019 },
- { 0x0981d5a0, 0x24000019 },
- { 0x0981d5ba, 0x14000019 },
- { 0x0981d5d4, 0x24000019 },
- { 0x0981d5ee, 0x14000019 },
- { 0x0981d608, 0x24000019 },
- { 0x0981d622, 0x14000019 },
- { 0x0981d63c, 0x24000019 },
- { 0x0981d656, 0x14000019 },
- { 0x0981d670, 0x24000019 },
- { 0x0981d68a, 0x1400001b },
- { 0x0981d6a8, 0x24000018 },
- { 0x0901d6c1, 0x64000000 },
- { 0x0981d6c2, 0x14000018 },
- { 0x0901d6db, 0x64000000 },
- { 0x0981d6dc, 0x14000005 },
- { 0x0981d6e2, 0x24000018 },
- { 0x0901d6fb, 0x64000000 },
- { 0x0981d6fc, 0x14000018 },
- { 0x0901d715, 0x64000000 },
- { 0x0981d716, 0x14000005 },
- { 0x0981d71c, 0x24000018 },
- { 0x0901d735, 0x64000000 },
- { 0x0981d736, 0x14000018 },
- { 0x0901d74f, 0x64000000 },
- { 0x0981d750, 0x14000005 },
- { 0x0981d756, 0x24000018 },
- { 0x0901d76f, 0x64000000 },
- { 0x0981d770, 0x14000018 },
- { 0x0901d789, 0x64000000 },
- { 0x0981d78a, 0x14000005 },
- { 0x0981d790, 0x24000018 },
- { 0x0901d7a9, 0x64000000 },
- { 0x0981d7aa, 0x14000018 },
- { 0x0901d7c3, 0x64000000 },
- { 0x0981d7c4, 0x14000005 },
- { 0x0901d7ca, 0x24000000 },
- { 0x0901d7cb, 0x14000000 },
- { 0x0981d7ce, 0x34000031 },
- { 0x16820000, 0x1c00a6d6 },
- { 0x1682f800, 0x1c00021d },
- { 0x090e0001, 0x04000000 },
- { 0x098e0020, 0x0400005f },
- { 0x1b8e0100, 0x300000ef },
- { 0x098f0000, 0x0c00fffd },
- { 0x09900000, 0x0c00fffd },
-};
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index 7035dc77df..0051b45b31 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -34,6 +34,7 @@
#endif
#include "sys.h"
#include "global.h"
+#include "erl_port.h"
#include "erl_check_io.h"
#include "erl_thr_progress.h"
#include "dtrace-wrapper.h"
@@ -51,8 +52,17 @@ typedef char EventStateType;
#define ERTS_EV_TYPE_STOP_USE ((EventStateType) 3) /* pending stop_select */
typedef char EventStateFlags;
-#define ERTS_EV_FLAG_USED ((EventStateFlags) 1) /* ERL_DRV_USE has been turned on */
+#define ERTS_EV_FLAG_USED ((EventStateFlags) 1) /* ERL_DRV_USE has been turned on */
+#define ERTS_EV_FLAG_DEFER_IN_EV ((EventStateFlags) 2)
+#define ERTS_EV_FLAG_DEFER_OUT_EV ((EventStateFlags) 4)
+#ifdef DEBUG
+# define ERTS_ACTIVE_FD_INC 2
+#else
+# define ERTS_ACTIVE_FD_INC 128
+#endif
+
+#define ERTS_CHECK_IO_POLL_RES_LEN 512
#if defined(ERTS_KERNEL_POLL_VERSION)
# define ERTS_CIO_EXPORT(FUNC) FUNC ## _kp
@@ -66,6 +76,7 @@ typedef char EventStateFlags;
(ERTS_POLL_USE_POLL && !ERTS_POLL_USE_KERNEL_POLL)
#define ERTS_CIO_POLL_CTL ERTS_POLL_EXPORT(erts_poll_control)
+#define ERTS_CIO_POLL_CTLV ERTS_POLL_EXPORT(erts_poll_controlv)
#define ERTS_CIO_POLL_WAIT ERTS_POLL_EXPORT(erts_poll_wait)
#ifdef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
#define ERTS_CIO_POLL_AS_INTR ERTS_POLL_EXPORT(erts_poll_async_sig_interrupt)
@@ -78,10 +89,19 @@ typedef char EventStateFlags;
#define ERTS_CIO_POLL_INIT ERTS_POLL_EXPORT(erts_poll_init)
#define ERTS_CIO_POLL_INFO ERTS_POLL_EXPORT(erts_poll_info)
+#define GET_FD(fd) fd
+
static struct pollset_info
{
ErtsPollSet ps;
erts_smp_atomic_t in_poll_wait; /* set while doing poll */
+ struct {
+ int six; /* start index */
+ int eix; /* end index */
+ erts_smp_atomic32_t no;
+ int size;
+ ErtsSysFdType *array;
+ } active_fd;
#ifdef ERTS_SMP
struct removed_fd* removed_list; /* list of deselected fd's*/
erts_smp_spinlock_t removed_list_lock;
@@ -94,9 +114,11 @@ typedef struct {
SafeHashBucket hb;
#endif
ErtsSysFdType fd;
- union {
- ErtsDrvEventDataState *event; /* ERTS_EV_TYPE_DRV_EV */
+ struct {
ErtsDrvSelectDataState *select; /* ERTS_EV_TYPE_DRV_SEL */
+#if ERTS_CIO_HAVE_DRV_EVENT
+ ErtsDrvEventDataState *event; /* ERTS_EV_TYPE_DRV_EV */
+#endif
erts_driver_t* drv_ptr; /* ERTS_EV_TYPE_STOP_USE */
} driver;
ErtsPollEvents events;
@@ -166,6 +188,10 @@ static ERTS_INLINE ErtsDrvEventState* hash_new_drv_ev_state(ErtsSysFdType fd)
ErtsDrvEventState tmpl;
tmpl.fd = fd;
tmpl.driver.select = NULL;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ tmpl.driver.event = NULL;
+#endif
+ tmpl.driver.drv_ptr = NULL;
tmpl.events = 0;
tmpl.remove_cnt = 0;
tmpl.type = ERTS_EV_TYPE_NONE;
@@ -206,6 +232,69 @@ ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(removed_fd, struct removed_fd, 64, ERTS_ALC_T_F
#endif
static ERTS_INLINE void
+init_iotask(ErtsIoTask *io_task)
+{
+ erts_port_task_handle_init(&io_task->task);
+ erts_smp_atomic_init_nob(&io_task->executed_time, ~((erts_aint_t) 0));
+}
+
+static ERTS_INLINE int
+is_iotask_active(ErtsIoTask *io_task, erts_aint_t current_cio_time)
+{
+ if (erts_port_task_is_scheduled(&io_task->task))
+ return 1;
+ if (erts_smp_atomic_read_nob(&io_task->executed_time) == current_cio_time)
+ return 1;
+ return 0;
+}
+
+static ERTS_INLINE ErtsDrvSelectDataState *
+alloc_drv_select_data(void)
+{
+ ErtsDrvSelectDataState *dsp = erts_alloc(ERTS_ALC_T_DRV_SEL_D_STATE,
+ sizeof(ErtsDrvSelectDataState));
+ dsp->inport = NIL;
+ dsp->outport = NIL;
+ init_iotask(&dsp->iniotask);
+ init_iotask(&dsp->outiotask);
+ return dsp;
+}
+
+static ERTS_INLINE void
+free_drv_select_data(ErtsDrvSelectDataState *dsp)
+{
+ ASSERT(!erts_port_task_is_scheduled(&dsp->iniotask.task));
+ ASSERT(!erts_port_task_is_scheduled(&dsp->outiotask.task));
+ erts_free(ERTS_ALC_T_DRV_SEL_D_STATE, dsp);
+}
+
+#if ERTS_CIO_HAVE_DRV_EVENT
+
+static ERTS_INLINE ErtsDrvEventDataState *
+alloc_drv_event_data(void)
+{
+ ErtsDrvEventDataState *dep = erts_alloc(ERTS_ALC_T_DRV_EV_D_STATE,
+ sizeof(ErtsDrvEventDataState));
+ dep->port = NIL;
+ dep->data = NULL;
+ dep->removed_events = 0;
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ dep->deferred_events = 0;
+#endif
+ init_iotask(&dep->iotask);
+ return dep;
+}
+
+static ERTS_INLINE void
+free_drv_event_data(ErtsDrvEventDataState *dep)
+{
+ ASSERT(!erts_port_task_is_scheduled(&dep->iotask.task));
+ erts_free(ERTS_ALC_T_DRV_EV_D_STATE, dep);
+}
+
+#endif /* ERTS_CIO_HAVE_DRV_EVENT */
+
+static ERTS_INLINE void
remember_removed(ErtsDrvEventState *state, struct pollset_info* psi)
{
#ifdef ERTS_SMP
@@ -285,7 +374,7 @@ forget_removed(struct pollset_info* psi)
drv_ptr = state->driver.drv_ptr;
ASSERT(drv_ptr);
state->type = ERTS_EV_TYPE_NONE;
- state->flags = 0;
+ state->flags &= ~ERTS_EV_FLAG_USED;
state->driver.drv_ptr = NULL;
/* Fall through */
case ERTS_EV_TYPE_NONE:
@@ -342,6 +431,10 @@ grow_drv_ev_state(int min_ix)
for (i = erts_smp_atomic_read_nob(&drv_ev_state_len); i < new_len; i++) {
drv_ev_state[i].fd = (ErtsSysFdType) i;
drv_ev_state[i].driver.select = NULL;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ drv_ev_state[i].driver.event = NULL;
+#endif
+ drv_ev_state[i].driver.drv_ptr = NULL;
drv_ev_state[i].events = 0;
drv_ev_state[i].remove_cnt = 0;
drv_ev_state[i].type = ERTS_EV_TYPE_NONE;
@@ -362,11 +455,7 @@ grow_drv_ev_state(int min_ix)
static ERTS_INLINE void
abort_task(Eterm id, ErtsPortTaskHandle *pthp, EventStateType type)
{
- if (is_nil(id)) {
- ASSERT(type == ERTS_EV_TYPE_NONE
- || !erts_port_task_is_scheduled(pthp));
- }
- else if (erts_port_task_is_scheduled(pthp)) {
+ if (is_not_nil(id) && erts_port_task_is_scheduled(pthp)) {
erts_port_task_abort(pthp);
ASSERT(erts_is_port_alive(id));
}
@@ -381,7 +470,7 @@ abort_tasks(ErtsDrvEventState *state, int mode)
#if ERTS_CIO_HAVE_DRV_EVENT
case ERTS_EV_TYPE_DRV_EV:
abort_task(state->driver.event->port,
- &state->driver.event->task,
+ &state->driver.event->iotask.task,
ERTS_EV_TYPE_DRV_EV);
return;
#endif
@@ -395,14 +484,14 @@ abort_tasks(ErtsDrvEventState *state, int mode)
case ERL_DRV_WRITE:
ASSERT(state->type == ERTS_EV_TYPE_DRV_SEL);
abort_task(state->driver.select->outport,
- &state->driver.select->outtask,
+ &state->driver.select->outiotask.task,
state->type);
if (mode == ERL_DRV_WRITE)
break;
case ERL_DRV_READ:
ASSERT(state->type == ERTS_EV_TYPE_DRV_SEL);
abort_task(state->driver.select->inport,
- &state->driver.select->intask,
+ &state->driver.select->iniotask.task,
state->type);
break;
default:
@@ -440,16 +529,14 @@ deselect(ErtsDrvEventState *state, int mode)
if (!(state->events)) {
switch (state->type) {
case ERTS_EV_TYPE_DRV_SEL:
- ASSERT(!erts_port_task_is_scheduled(&state->driver.select->intask));
- ASSERT(!erts_port_task_is_scheduled(&state->driver.select->outtask));
- erts_free(ERTS_ALC_T_DRV_SEL_D_STATE,
- state->driver.select);
+ state->driver.select->inport = NIL;
+ state->driver.select->outport = NIL;
break;
#if ERTS_CIO_HAVE_DRV_EVENT
case ERTS_EV_TYPE_DRV_EV:
- ASSERT(!erts_port_task_is_scheduled(&state->driver.event->task));
- erts_free(ERTS_ALC_T_DRV_EV_D_STATE,
- state->driver.event);
+ state->driver.event->port = NIL;
+ state->driver.event->data = NULL;
+ state->driver.event->removed_events = (ErtsPollEvents) 0;
break;
#endif
case ERTS_EV_TYPE_NONE:
@@ -459,20 +546,297 @@ deselect(ErtsDrvEventState *state, int mode)
break;
}
- state->driver.select = NULL;
state->type = ERTS_EV_TYPE_NONE;
- state->flags = 0;
+ state->flags &= ~ERTS_EV_FLAG_USED;
remember_removed(state, &pollset);
}
}
-
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
# define IS_FD_UNKNOWN(state) ((state)->type == ERTS_EV_TYPE_NONE && (state)->remove_cnt == 0)
#else
# define IS_FD_UNKNOWN(state) ((state) == NULL)
#endif
+static ERTS_INLINE void
+check_fd_cleanup(ErtsDrvEventState *state,
+#if ERTS_CIO_HAVE_DRV_EVENT
+ ErtsDrvEventDataState **free_event,
+#endif
+ ErtsDrvSelectDataState **free_select)
+{
+ erts_aint_t current_cio_time;
+
+ ERTS_SMP_LC_ASSERT(erts_smp_lc_mtx_is_locked(fd_mtx(state->fd)));
+
+ current_cio_time = erts_smp_atomic_read_acqb(&erts_check_io_time);
+ *free_select = NULL;
+ if (state->driver.select
+ && (state->type != ERTS_EV_TYPE_DRV_SEL)
+ && !is_iotask_active(&state->driver.select->iniotask, current_cio_time)
+ && !is_iotask_active(&state->driver.select->outiotask, current_cio_time)) {
+
+ *free_select = state->driver.select;
+ state->driver.select = NULL;
+ }
+
+#if ERTS_CIO_HAVE_DRV_EVENT
+ *free_event = NULL;
+ if (state->driver.event
+ && (state->type != ERTS_EV_TYPE_DRV_EV)
+ && !is_iotask_active(&state->driver.event->iotask, current_cio_time)) {
+
+ *free_event = state->driver.event;
+ state->driver.event = NULL;
+ }
+#endif
+
+#ifndef ERTS_SYS_CONTINOUS_FD_NUMBERS
+ if (((state->type != ERTS_EV_TYPE_NONE)
+ | state->remove_cnt
+#if ERTS_CIO_HAVE_DRV_EVENT
+ | (state->driver.event != NULL)
+#endif
+ | (state->driver.select != NULL)) == 0) {
+
+ hash_erase_drv_ev_state(state);
+
+ }
+#endif
+}
+
+static ERTS_INLINE int
+check_cleanup_active_fd(ErtsSysFdType fd,
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ ErtsPollControlEntry *pce,
+ int *pce_ix,
+#endif
+ erts_aint_t current_cio_time)
+{
+ ErtsDrvEventState *state;
+ int active = 0;
+ erts_smp_mtx_t *mtx = fd_mtx(fd);
+ void *free_select = NULL;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ void *free_event = NULL;
+#endif
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ ErtsPollEvents evon = 0, evoff = 0;
+#endif
+
+ erts_smp_mtx_lock(mtx);
+
+#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
+ state = &drv_ev_state[(int) fd];
+#else
+ state = hash_get_drv_ev_state(fd); /* may be NULL! */
+ if (state)
+#endif
+ {
+ if (state->driver.select) {
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ if (is_iotask_active(&state->driver.select->iniotask, current_cio_time)) {
+ active = 1;
+ if ((state->events & ERTS_POLL_EV_IN)
+ && !(state->flags & ERTS_EV_FLAG_DEFER_IN_EV)) {
+ evoff |= ERTS_POLL_EV_IN;
+ state->flags |= ERTS_EV_FLAG_DEFER_IN_EV;
+ }
+ }
+ else if (state->flags & ERTS_EV_FLAG_DEFER_IN_EV) {
+ if (state->events & ERTS_POLL_EV_IN)
+ evon |= ERTS_POLL_EV_IN;
+ state->flags &= ~ERTS_EV_FLAG_DEFER_IN_EV;
+ }
+ if (is_iotask_active(&state->driver.select->outiotask, current_cio_time)) {
+ active = 1;
+ if ((state->events & ERTS_POLL_EV_OUT)
+ && !(state->flags & ERTS_EV_FLAG_DEFER_OUT_EV)) {
+ evoff |= ERTS_POLL_EV_OUT;
+ state->flags |= ERTS_EV_FLAG_DEFER_OUT_EV;
+ }
+ }
+ else if (state->flags & ERTS_EV_FLAG_DEFER_OUT_EV) {
+ if (state->events & ERTS_POLL_EV_OUT)
+ evon |= ERTS_POLL_EV_OUT;
+ state->flags &= ~ERTS_EV_FLAG_DEFER_OUT_EV;
+ }
+ if (active)
+ (void) 0;
+ else
+#else
+ if (is_iotask_active(&state->driver.select->iniotask, current_cio_time)
+ || is_iotask_active(&state->driver.select->outiotask, current_cio_time))
+ active = 1;
+ else
+#endif
+ if (state->type != ERTS_EV_TYPE_DRV_SEL) {
+ free_select = state->driver.select;
+ state->driver.select = NULL;
+ }
+ }
+
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (state->driver.event) {
+ if (is_iotask_active(&state->driver.event->iotask, current_cio_time)) {
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ ErtsPollEvents evs = state->events & ~state->driver.event->deferred_events;
+ if (evs) {
+ evoff |= evs;
+ state->driver.event->deferred_events |= evs;
+ }
+#endif
+ active = 1;
+ }
+ else if (state->type != ERTS_EV_TYPE_DRV_EV) {
+ free_event = state->driver.event;
+ state->driver.event = NULL;
+ }
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ else {
+ ErtsPollEvents evs = state->events & state->driver.event->deferred_events;
+ if (evs) {
+ evon |= evs;
+ state->driver.event->deferred_events = 0;
+ }
+ }
+#endif
+
+ }
+#endif
+
+#ifndef ERTS_SYS_CONTINOUS_FD_NUMBERS
+ if (((state->type != ERTS_EV_TYPE_NONE) | state->remove_cnt | active) == 0)
+ hash_erase_drv_ev_state(state);
+#endif
+
+ }
+
+ erts_smp_mtx_unlock(mtx);
+
+ if (free_select)
+ free_drv_select_data(free_select);
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (free_event)
+ free_drv_event_data(free_event);
+#endif
+
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ if (evoff) {
+ ErtsPollControlEntry *pcep = &pce[(*pce_ix)++];
+ pcep->fd = fd;
+ pcep->events = evoff;
+ pcep->on = 0;
+ }
+ if (evon) {
+ ErtsPollControlEntry *pcep = &pce[(*pce_ix)++];
+ pcep->fd = fd;
+ pcep->events = evon;
+ pcep->on = 1;
+ }
+#endif
+
+ return active;
+}
+
+static void
+check_cleanup_active_fds(erts_aint_t current_cio_time)
+{
+ int six = pollset.active_fd.six;
+ int eix = pollset.active_fd.eix;
+ erts_aint32_t no = erts_smp_atomic32_read_dirty(&pollset.active_fd.no);
+ int size = pollset.active_fd.size;
+ int ix = six;
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ /* every fd might add two entries */
+ Uint pce_sz = 2*sizeof(ErtsPollControlEntry)*no;
+ ErtsPollControlEntry *pctrl_entries = (pce_sz
+ ? erts_alloc(ERTS_ALC_T_TMP, pce_sz)
+ : NULL);
+ int pctrl_ix = 0;
+#endif
+
+ while (ix != eix) {
+ ErtsSysFdType fd = pollset.active_fd.array[ix];
+ int nix = ix + 1;
+ if (nix >= size)
+ nix = 0;
+ ASSERT(fd != ERTS_SYS_FD_INVALID);
+ if (!check_cleanup_active_fd(fd,
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ pctrl_entries,
+ &pctrl_ix,
+#endif
+ current_cio_time)) {
+ no--;
+ if (ix == six) {
+#ifdef DEBUG
+ pollset.active_fd.array[ix] = ERTS_SYS_FD_INVALID;
+#endif
+ six = nix;
+ }
+ else {
+ pollset.active_fd.array[ix] = pollset.active_fd.array[six];
+#ifdef DEBUG
+ pollset.active_fd.array[six] = ERTS_SYS_FD_INVALID;
+#endif
+ six++;
+ if (six >= size)
+ six = 0;
+ }
+ }
+ ix = nix;
+ }
+
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ ASSERT(pctrl_ix <= pce_sz/sizeof(ErtsPollControlEntry));
+ if (pctrl_ix)
+ ERTS_CIO_POLL_CTLV(pollset.ps, pctrl_entries, pctrl_ix);
+ if (pctrl_entries)
+ erts_free(ERTS_ALC_T_TMP, pctrl_entries);
+#endif
+
+ pollset.active_fd.six = six;
+ pollset.active_fd.eix = eix;
+ erts_smp_atomic32_set_relb(&pollset.active_fd.no, no);
+}
+
+static ERTS_INLINE void
+add_active_fd(ErtsSysFdType fd)
+{
+ int eix = pollset.active_fd.eix;
+ int size = pollset.active_fd.size;
+
+
+ pollset.active_fd.array[eix] = fd;
+
+ erts_smp_atomic32_set_relb(&pollset.active_fd.no,
+ (erts_smp_atomic32_read_dirty(&pollset.active_fd.no)
+ + 1));
+
+ eix++;
+ if (eix >= size)
+ eix = 0;
+ if (pollset.active_fd.six == eix) {
+ pollset.active_fd.six = 0;
+ eix = size;
+ size += ERTS_ACTIVE_FD_INC;
+ pollset.active_fd.array = erts_realloc(ERTS_ALC_T_ACTIVE_FD_ARR,
+ pollset.active_fd.array,
+ sizeof(ErtsSysFdType)*size);
+ pollset.active_fd.size = size;
+#ifdef DEBUG
+ {
+ int i;
+ for (i = eix + 1; i < size; i++)
+ pollset.active_fd.array[i] = ERTS_SYS_FD_INVALID;
+ }
+#endif
+
+ }
+
+ pollset.active_fd.eix = eix;
+}
int
ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
@@ -489,6 +853,10 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
ErtsDrvEventState *state;
int wake_poller;
int ret;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ ErtsDrvEventDataState *free_event = NULL;
+#endif
+ ErtsDrvSelectDataState *free_select = NULL;
#ifdef USE_VM_PROBES
DTRACE_CHARBUF(name, 64);
#endif
@@ -524,7 +892,8 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
/* fast track to stop_select callback */
stop_select_fn = prt->drv_ptr->stop_select;
#ifdef USE_VM_PROBES
- strncpy(name, prt->drv_ptr->name, sizeof(name)-1);
+ strncpy(name, prt->drv_ptr->name,
+ sizeof(DTRACE_CHARBUF_NAME(name))-1);
name[sizeof(name)-1] = '\0';
#endif
ret = 0;
@@ -589,9 +958,9 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
if (new_events & (ERTS_POLL_EV_ERR|ERTS_POLL_EV_NVAL)) {
if (state->type == ERTS_EV_TYPE_DRV_SEL && !state->events) {
state->type = ERTS_EV_TYPE_NONE;
- state->flags = 0;
- erts_free(ERTS_ALC_T_DRV_SEL_D_STATE, state->driver.select);
- state->driver.select = NULL;
+ state->flags &= ~ERTS_EV_FLAG_USED;
+ state->driver.select->inport = NIL;
+ state->driver.select->outport = NIL;
}
ret = -1;
goto done;
@@ -609,18 +978,10 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
state->events = new_events;
if (ctl_events) {
if (on) {
- if (state->type == ERTS_EV_TYPE_NONE) {
- ErtsDrvSelectDataState *dsdsp
- = erts_alloc(ERTS_ALC_T_DRV_SEL_D_STATE,
- sizeof(ErtsDrvSelectDataState));
- dsdsp->inport = NIL;
- dsdsp->outport = NIL;
- erts_port_task_handle_init(&dsdsp->intask);
- erts_port_task_handle_init(&dsdsp->outtask);
- ASSERT(state->driver.select == NULL);
- state->driver.select = dsdsp;
+ if (!state->driver.select)
+ state->driver.select = alloc_drv_select_data();
+ if (state->type == ERTS_EV_TYPE_NONE)
state->type = ERTS_EV_TYPE_DRV_SEL;
- }
ASSERT(state->type == ERTS_EV_TYPE_DRV_SEL);
if (ctl_events & ERTS_POLL_EV_IN)
state->driver.select->inport = id;
@@ -641,17 +1002,12 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
state->driver.select->outport = NIL;
}
if (new_events == 0) {
- ASSERT(!erts_port_task_is_scheduled(&state->driver.select->intask));
- ASSERT(!erts_port_task_is_scheduled(&state->driver.select->outtask));
if (old_events != 0) {
remember_removed(state, &pollset);
}
if ((mode & ERL_DRV_USE) || !(state->flags & ERTS_EV_FLAG_USED)) {
state->type = ERTS_EV_TYPE_NONE;
- state->flags = 0;
- erts_free(ERTS_ALC_T_DRV_SEL_D_STATE,
- state->driver.select);
- state->driver.select = NULL;
+ state->flags &= ~ERTS_EV_FLAG_USED;
}
/*else keep it, as fd will probably be selected upon again */
}
@@ -682,13 +1038,15 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix,
ret = 0;
-done:;
-#ifndef ERTS_SYS_CONTINOUS_FD_NUMBERS
- if (state->type == ERTS_EV_TYPE_NONE && state->remove_cnt == 0) {
- hash_erase_drv_ev_state(state);
- }
+done:
+
+ check_fd_cleanup(state,
+#if ERTS_CIO_HAVE_DRV_EVENT
+ &free_event,
#endif
-done_unknown:
+ &free_select);
+
+done_unknown:
erts_smp_mtx_unlock(fd_mtx(fd));
if (stop_select_fn) {
int was_unmasked = erts_block_fpe();
@@ -696,6 +1054,12 @@ done_unknown:
(*stop_select_fn)(e, NULL);
erts_unblock_fpe(was_unmasked);
}
+ if (free_select)
+ free_drv_select_data(free_select);
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (free_event)
+ free_drv_event_data(free_event);
+#endif
return ret;
}
@@ -715,6 +1079,10 @@ ERTS_CIO_EXPORT(driver_event)(ErlDrvPort ix,
ErtsDrvEventState *state;
int do_wake = 0;
int ret;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ ErtsDrvEventDataState *free_event;
+#endif
+ ErtsDrvSelectDataState *free_select;
Port *prt = erts_drvport2port(ix);
if (prt == ERTS_INVALID_ERL_DRV_PORT)
@@ -795,10 +1163,8 @@ ERTS_CIO_EXPORT(driver_event)(ErlDrvPort ix,
state->driver.event->removed_events |= remove_events;
}
else {
- state->driver.event
- = erts_alloc(ERTS_ALC_T_DRV_EV_D_STATE,
- sizeof(ErtsDrvEventDataState));
- erts_port_task_handle_init(&state->driver.event->task);
+ if (!state->driver.event)
+ state->driver.event = alloc_drv_event_data();
state->driver.event->port = id;
state->driver.event->removed_events = (ErtsPollEvents) 0;
state->type = ERTS_EV_TYPE_DRV_EV;
@@ -808,10 +1174,10 @@ ERTS_CIO_EXPORT(driver_event)(ErlDrvPort ix,
else {
if (state->type == ERTS_EV_TYPE_DRV_EV) {
abort_tasks(state, 0);
- erts_free(ERTS_ALC_T_DRV_EV_D_STATE,
- state->driver.event);
+ state->driver.event->port = NIL;
+ state->driver.event->data = NULL;
+ state->driver.event->removed_events = (ErtsPollEvents) 0;
}
- state->driver.select = NULL;
state->type = ERTS_EV_TYPE_NONE;
remember_removed(state, &pollset);
}
@@ -821,12 +1187,22 @@ ERTS_CIO_EXPORT(driver_event)(ErlDrvPort ix,
ret = 0;
done:
-#ifndef ERTS_SYS_CONTINOUS_FD_NUMBERS
- if (state->type == ERTS_EV_TYPE_NONE && state->remove_cnt == 0) {
- hash_erase_drv_ev_state(state);
- }
+
+ check_fd_cleanup(state,
+#if ERTS_CIO_HAVE_DRV_EVENT
+ &free_event,
#endif
+ &free_select);
+
erts_smp_mtx_unlock(fd_mtx(fd));
+
+ if (free_select)
+ free_drv_select_data(free_select);
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (free_event)
+ free_drv_event_data(free_event);
+#endif
+
return ret;
#endif
}
@@ -894,7 +1270,7 @@ print_driver_name(erts_dsprintf_buf_t *dsbufp, Eterm id)
static void
steal(erts_dsprintf_buf_t *dsbufp, ErtsDrvEventState *state, int mode)
{
- erts_dsprintf(dsbufp, "stealing control of fd=%d from ", (int) state->fd);
+ erts_dsprintf(dsbufp, "stealing control of fd=%d from ", (int) GET_FD(state->fd));
switch (state->type) {
case ERTS_EV_TYPE_DRV_SEL: {
int deselect_mode = 0;
@@ -918,7 +1294,7 @@ steal(erts_dsprintf_buf_t *dsbufp, ErtsDrvEventState *state, int mode)
if (deselect_mode)
deselect(state, deselect_mode);
else {
- erts_dsprintf(dsbufp, "no one", (int) state->fd);
+ erts_dsprintf(dsbufp, "no one", (int) GET_FD(state->fd));
ASSERT(0);
}
erts_dsprintf(dsbufp, "\n");
@@ -946,7 +1322,7 @@ steal(erts_dsprintf_buf_t *dsbufp, ErtsDrvEventState *state, int mode)
break;
}
default:
- erts_dsprintf(dsbufp, "no one\n", (int) state->fd);
+ erts_dsprintf(dsbufp, "no one\n", (int) GET_FD(state->fd));
ASSERT(0);
}
}
@@ -957,10 +1333,14 @@ print_select_op(erts_dsprintf_buf_t *dsbufp,
{
Port *pp = erts_drvport2port(ix);
erts_dsprintf(dsbufp,
+#ifdef __OSE__
+ "driver_select(%p, %d,%s%s%s%s | %d, %d) "
+#else
"driver_select(%p, %d,%s%s%s%s, %d) "
+#endif
"by ",
ix,
- (int) fd,
+ (int) GET_FD(fd),
mode & ERL_DRV_READ ? " ERL_DRV_READ" : "",
mode & ERL_DRV_WRITE ? " ERL_DRV_WRITE" : "",
mode & ERL_DRV_USE ? " ERL_DRV_USE" : "",
@@ -1010,7 +1390,7 @@ steal_pending_stop_select(erts_dsprintf_buf_t *dsbufp, ErlDrvPort ix,
ASSERT(state->type == ERTS_EV_TYPE_STOP_USE);
erts_dsprintf(dsbufp, "failed: fd=%d (re)selected before stop_select "
"was called for driver %s\n",
- (int) state->fd, state->driver.drv_ptr->name);
+ (int) GET_FD(state->fd), state->driver.drv_ptr->name);
erts_send_error_to_logger_nogl(dsbufp);
if (on) {
@@ -1019,7 +1399,7 @@ steal_pending_stop_select(erts_dsprintf_buf_t *dsbufp, ErlDrvPort ix,
* In either case stop_select should not be called.
*/
state->type = ERTS_EV_TYPE_NONE;
- state->flags = 0;
+ state->flags &= ~ERTS_EV_FLAG_USED;
if (state->driver.drv_ptr->handle) {
erts_ddll_dereference_driver(state->driver.drv_ptr->handle);
}
@@ -1091,38 +1471,103 @@ event_large_fd_error(ErlDrvPort ix, ErtsSysFdType fd, ErlDrvEventData event_data
#endif
#endif
+static ERTS_INLINE int
+io_task_schedule_allowed(ErtsDrvEventState *state,
+ ErtsPortTaskType type,
+ erts_aint_t current_cio_time)
+{
+ ErtsIoTask *io_task;
+
+ switch (type) {
+ case ERTS_PORT_TASK_INPUT:
+ if (!state->driver.select)
+ return 0;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (state->driver.event)
+ return 0;
+#endif
+ io_task = &state->driver.select->iniotask;
+ break;
+ case ERTS_PORT_TASK_OUTPUT:
+ if (!state->driver.select)
+ return 0;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (state->driver.event)
+ return 0;
+#endif
+ io_task = &state->driver.select->outiotask;
+ break;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ case ERTS_PORT_TASK_EVENT:
+ if (!state->driver.event)
+ return 0;
+ if (state->driver.select)
+ return 0;
+ io_task = &state->driver.event->iotask;
+ break;
+#endif
+ default:
+ ERTS_INTERNAL_ERROR("Invalid I/O-task type");
+ return 0;
+ }
+
+ return !is_iotask_active(io_task, current_cio_time);
+}
+
static ERTS_INLINE void
-iready(Eterm id, ErtsDrvEventState *state)
+iready(Eterm id, ErtsDrvEventState *state, erts_aint_t current_cio_time)
{
- if (erts_port_task_schedule(id,
- &state->driver.select->intask,
- ERTS_PORT_TASK_INPUT,
- (ErlDrvEvent) state->fd) != 0) {
- stale_drv_select(id, state, ERL_DRV_READ);
+ if (io_task_schedule_allowed(state,
+ ERTS_PORT_TASK_INPUT,
+ current_cio_time)) {
+ ErtsIoTask *iotask = &state->driver.select->iniotask;
+ erts_smp_atomic_set_nob(&iotask->executed_time, current_cio_time);
+ if (erts_port_task_schedule(id,
+ &iotask->task,
+ ERTS_PORT_TASK_INPUT,
+ (ErlDrvEvent) state->fd) != 0) {
+ stale_drv_select(id, state, ERL_DRV_READ);
+ }
+ add_active_fd(state->fd);
}
}
static ERTS_INLINE void
-oready(Eterm id, ErtsDrvEventState *state)
+oready(Eterm id, ErtsDrvEventState *state, erts_aint_t current_cio_time)
{
- if (erts_port_task_schedule(id,
- &state->driver.select->outtask,
- ERTS_PORT_TASK_OUTPUT,
- (ErlDrvEvent) state->fd) != 0) {
- stale_drv_select(id, state, ERL_DRV_WRITE);
+ if (io_task_schedule_allowed(state,
+ ERTS_PORT_TASK_OUTPUT,
+ current_cio_time)) {
+ ErtsIoTask *iotask = &state->driver.select->outiotask;
+ erts_smp_atomic_set_nob(&iotask->executed_time, current_cio_time);
+ if (erts_port_task_schedule(id,
+ &iotask->task,
+ ERTS_PORT_TASK_OUTPUT,
+ (ErlDrvEvent) state->fd) != 0) {
+ stale_drv_select(id, state, ERL_DRV_WRITE);
+ }
+ add_active_fd(state->fd);
}
}
#if ERTS_CIO_HAVE_DRV_EVENT
static ERTS_INLINE void
-eready(Eterm id, ErtsDrvEventState *state, ErlDrvEventData event_data)
+eready(Eterm id, ErtsDrvEventState *state, ErlDrvEventData event_data,
+ erts_aint_t current_cio_time)
{
- if (erts_port_task_schedule(id,
- &state->driver.event->task,
- ERTS_PORT_TASK_EVENT,
- (ErlDrvEvent) state->fd,
- event_data) != 0) {
- stale_drv_select(id, state, 0);
+ if (io_task_schedule_allowed(state,
+ ERTS_PORT_TASK_EVENT,
+ current_cio_time)) {
+ ErtsIoTask *iotask = &state->driver.event->iotask;
+ erts_smp_atomic_set_nob(&iotask->executed_time, current_cio_time);
+ if (erts_port_task_schedule(id,
+ &iotask->task,
+ ERTS_PORT_TASK_EVENT,
+ (ErlDrvEvent) state->fd,
+ event_data) != 0) {
+ stale_drv_select(id, state, 0);
+ }
+ add_active_fd(state->fd);
}
}
#endif
@@ -1153,10 +1598,11 @@ ERTS_CIO_EXPORT(erts_check_io_interrupt_timed)(int set,
void
ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
{
- ErtsPollResFd pollres[256];
+ ErtsPollResFd *pollres;
int pollres_len;
SysTimeval wait_time;
int poll_ret, i;
+ erts_aint_t current_cio_time;
restart:
@@ -1173,10 +1619,24 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
wait_time.tv_usec = 0;
}
+ /*
+ * No need for an atomic inc op when incrementing
+ * erts_check_io_time, since only one thread can
+ * check io at a time.
+ */
+ current_cio_time = erts_smp_atomic_read_dirty(&erts_check_io_time);
+ current_cio_time++;
+ erts_smp_atomic_set_relb(&erts_check_io_time, current_cio_time);
+
+ check_cleanup_active_fds(current_cio_time);
+
#ifdef ERTS_ENABLE_LOCK_CHECK
erts_lc_check_exact(NULL, 0); /* No locks should be locked */
#endif
- pollres_len = sizeof(pollres)/sizeof(ErtsPollResFd);
+
+ pollres_len = erts_smp_atomic32_read_dirty(&pollset.active_fd.no) + ERTS_CHECK_IO_POLL_RES_LEN;
+
+ pollres = erts_alloc(ERTS_ALC_T_TMP, sizeof(ErtsPollResFd)*pollres_len);
erts_smp_atomic_set_nob(&pollset.in_poll_wait, 1);
@@ -1196,6 +1656,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
if (poll_ret != 0) {
erts_smp_atomic_set_nob(&pollset.in_poll_wait, 0);
forget_removed(&pollset);
+ erts_free(ERTS_ALC_T_TMP, pollres);
if (poll_ret == EAGAIN) {
goto restart;
}
@@ -1255,15 +1716,15 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
if ((revents & ERTS_POLL_EV_IN)
|| (!(revents & ERTS_POLL_EV_OUT)
&& state->events & ERTS_POLL_EV_IN)) {
- iready(state->driver.select->inport, state);
+ iready(state->driver.select->inport, state, current_cio_time);
}
else if (state->events & ERTS_POLL_EV_OUT) {
- oready(state->driver.select->outport, state);
+ oready(state->driver.select->outport, state, current_cio_time);
}
}
else if (revents & (ERTS_POLL_EV_IN|ERTS_POLL_EV_OUT)) {
if (revents & ERTS_POLL_EV_OUT) {
- oready(state->driver.select->outport, state);
+ oready(state->driver.select->outport, state, current_cio_time);
}
/* Someone might have deselected input since revents
was read (true also on the non-smp emulator since
@@ -1271,7 +1732,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
revents... */
revents &= ~(~state->events & ERTS_POLL_EV_IN);
if (revents & ERTS_POLL_EV_IN) {
- iready(state->driver.select->inport, state);
+ iready(state->driver.select->inport, state, current_cio_time);
}
}
else if (revents & ERTS_POLL_EV_NVAL) {
@@ -1279,6 +1740,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
state->driver.select->inport,
state->driver.select->outport,
state->events);
+ add_active_fd(state->fd);
}
break;
}
@@ -1296,8 +1758,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
if (revents) {
event_data->events = state->events;
event_data->revents = revents;
-
- eready(state->driver.event->port, state, event_data);
+ eready(state->driver.event->port, state, event_data, current_cio_time);
}
break;
}
@@ -1315,6 +1776,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
(int) state->type);
ASSERT(0);
deselect(state, 0);
+ add_active_fd(state->fd);
break;
}
}
@@ -1326,6 +1788,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
}
erts_smp_atomic_set_nob(&pollset.in_poll_wait, 0);
+ erts_free(ERTS_ALC_T_TMP, pollres);
forget_removed(&pollset);
}
@@ -1395,6 +1858,26 @@ stale_drv_select(Eterm id, ErtsDrvEventState *state, int mode)
}
#ifndef ERTS_SYS_CONTINOUS_FD_NUMBERS
+
+#ifdef __OSE__
+static SafeHashValue drv_ev_state_hash(void *des)
+{
+ ErtsSysFdType fd = ((ErtsDrvEventState *) des)->fd;
+ /* We use hash on signo ^ id in order for steal to happen when the
+ same signo + fd is selected on by two different ports */
+ SafeHashValue val = (SafeHashValue)(fd->signo ^ fd->id);
+ return val ^ (val >> 8);
+}
+
+static int drv_ev_state_cmp(void *des1, void *des2)
+{
+ ErtsSysFdType fd1 = ((ErtsDrvEventState *) des1)->fd;
+ ErtsSysFdType fd2 = ((ErtsDrvEventState *) des2)->fd;
+ if (fd1->signo == fd2->signo && fd1->id == fd2->id)
+ return 0;
+ return 1;
+}
+#else /* !__OSE__ && !ERTS_SYS_CONTINOUS_FD_NUMBERS i.e. probably windows */
static SafeHashValue drv_ev_state_hash(void *des)
{
SafeHashValue val = (SafeHashValue) ((ErtsDrvEventState *) des)->fd;
@@ -1406,6 +1889,7 @@ static int drv_ev_state_cmp(void *des1, void *des2)
return ( ((ErtsDrvEventState *) des1)->fd == ((ErtsDrvEventState *) des2)->fd
? 0 : 1);
}
+#endif
static void *drv_ev_state_alloc(void *des_tmpl)
{
@@ -1440,10 +1924,27 @@ static void drv_ev_state_free(void *des)
void
ERTS_CIO_EXPORT(erts_init_check_io)(void)
{
+ erts_smp_atomic_init_nob(&erts_check_io_time, 0);
erts_smp_atomic_init_nob(&pollset.in_poll_wait, 0);
+
ERTS_CIO_POLL_INIT();
pollset.ps = ERTS_CIO_NEW_POLLSET();
+ pollset.active_fd.six = 0;
+ pollset.active_fd.eix = 0;
+ erts_smp_atomic32_init_nob(&pollset.active_fd.no, 0);
+ pollset.active_fd.size = ERTS_ACTIVE_FD_INC;
+ pollset.active_fd.array = erts_alloc(ERTS_ALC_T_ACTIVE_FD_ARR,
+ sizeof(ErtsSysFdType)*ERTS_ACTIVE_FD_INC);
+#ifdef DEBUG
+ {
+ int i;
+ for (i = 0; i < ERTS_ACTIVE_FD_INC; i++)
+ pollset.active_fd.array[i] = ERTS_SYS_FD_INVALID;
+ }
+#endif
+
+
#ifdef ERTS_SMP
init_removed_fd_alloc();
pollset.removed_list = NULL;
@@ -1519,12 +2020,27 @@ Eterm
ERTS_CIO_EXPORT(erts_check_io_info)(void *proc)
{
Process *p = (Process *) proc;
- Eterm tags[15], values[15], res;
+ Eterm tags[16], values[16], res;
Uint sz, *szp, *hp, **hpp, memory_size;
Sint i;
ErtsPollInfo pi;
-
- ERTS_CIO_POLL_INFO(pollset.ps, &pi);
+ erts_aint_t cio_time = erts_smp_atomic_read_acqb(&erts_check_io_time);
+ int active_fds = (int) erts_smp_atomic32_read_acqb(&pollset.active_fd.no);
+
+ while (1) {
+ erts_aint_t post_cio_time;
+ int post_active_fds;
+
+ ERTS_CIO_POLL_INFO(pollset.ps, &pi);
+
+ post_cio_time = erts_smp_atomic_read_mb(&erts_check_io_time);
+ post_active_fds = (int) erts_smp_atomic32_read_acqb(&pollset.active_fd.no);
+ if (cio_time == post_cio_time && active_fds == post_active_fds)
+ break;
+ cio_time = post_cio_time;
+ active_fds = post_active_fds;
+ }
+
memory_size = pi.memory_size;
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
memory_size += sizeof(ErtsDrvEventState) * erts_smp_atomic_read_nob(&drv_ev_state_len);
@@ -1588,6 +2104,9 @@ ERTS_CIO_EXPORT(erts_check_io_info)(void *proc)
tags[i] = erts_bld_atom(hpp, szp, "max_fds");
values[i++] = erts_bld_uint(hpp, szp, (Uint) pi.max_fds);
+ tags[i] = erts_bld_atom(hpp, szp, "active_fds");
+ values[i++] = erts_bld_uint(hpp, szp, (Uint) active_fds);
+
#ifdef ERTS_POLL_COUNT_AVOIDED_WAKEUPS
tags[i] = erts_bld_atom(hpp, szp, "no_avoided_wakeups");
values[i++] = erts_bld_uint(hpp, szp, (Uint) pi.no_avoided_wakeups);
@@ -1642,6 +2161,8 @@ print_events(ErtsPollEvents ev)
typedef struct {
int used_fds;
int num_errors;
+ int no_driver_select_structs;
+ int no_driver_event_structs;
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
int internal_fds;
ErtsPollEvents *epep;
@@ -1664,6 +2185,13 @@ static void doit_erts_check_io_debug(void *vstate, void *vcounters)
struct stat stat_buf;
#endif
+ if (state->driver.select)
+ counters->no_driver_select_structs++;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ if (state->driver.event)
+ counters->no_driver_event_structs++;
+#endif
+
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
if (state->events || ep_events) {
if (ep_events & ERTS_POLL_EV_NVAL) {
@@ -1802,6 +2330,7 @@ static void doit_erts_check_io_debug(void *vstate, void *vcounters)
}
}
}
+#if ERTS_CIO_HAVE_DRV_EVENT
else if (state->type == ERTS_EV_TYPE_DRV_EV) {
Eterm id;
erts_printf("driver_event ");
@@ -1837,6 +2366,7 @@ static void doit_erts_check_io_debug(void *vstate, void *vcounters)
erts_free_port_names(pnp);
}
}
+#endif
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
else if (internal) {
erts_printf("internal ");
@@ -1876,18 +2406,24 @@ static void doit_erts_check_io_debug(void *vstate, void *vcounters)
}
int
-ERTS_CIO_EXPORT(erts_check_io_debug)(void)
+ERTS_CIO_EXPORT(erts_check_io_debug)(ErtsCheckIoDebugInfo *ciodip)
{
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
int fd, len;
#endif
IterDebugCounters counters;
+#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
ErtsDrvEventState null_des;
null_des.driver.select = NULL;
+#if ERTS_CIO_HAVE_DRV_EVENT
+ null_des.driver.event = NULL;
+#endif
+ null_des.driver.drv_ptr = NULL;
null_des.events = 0;
null_des.remove_cnt = 0;
null_des.type = ERTS_EV_TYPE_NONE;
+#endif
erts_printf("--- fds in pollset --------------------------------------\n");
@@ -1904,6 +2440,8 @@ ERTS_CIO_EXPORT(erts_check_io_debug)(void)
#endif
counters.used_fds = 0;
counters.num_errors = 0;
+ counters.no_driver_select_structs = 0;
+ counters.no_driver_event_structs = 0;
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
len = erts_smp_atomic_read_nob(&drv_ev_state_len);
@@ -1920,8 +2458,16 @@ ERTS_CIO_EXPORT(erts_check_io_debug)(void)
erts_smp_thr_progress_unblock();
+ ciodip->no_used_fds = counters.used_fds;
+ ciodip->no_driver_select_structs = counters.no_driver_select_structs;
+ ciodip->no_driver_event_structs = counters.no_driver_event_structs;
+
erts_printf("\n");
erts_printf("used fds=%d\n", counters.used_fds);
+ erts_printf("Number of driver_select() structures=%d\n", counters.no_driver_select_structs);
+#if ERTS_CIO_HAVE_DRV_EVENT
+ erts_printf("Number of driver_event() structures=%d\n", counters.no_driver_event_structs);
+#endif
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
erts_printf("internal fds=%d\n", counters.internal_fds);
#endif
@@ -1930,6 +2476,7 @@ ERTS_CIO_EXPORT(erts_check_io_debug)(void)
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
erts_free(ERTS_ALC_T_TMP, (void *) counters.epep);
#endif
+
return counters.num_errors;
}
diff --git a/erts/emulator/sys/common/erl_check_io.h b/erts/emulator/sys/common/erl_check_io.h
index edab7947ba..d01297d55c 100644
--- a/erts/emulator/sys/common/erl_check_io.h
+++ b/erts/emulator/sys/common/erl_check_io.h
@@ -26,6 +26,7 @@
#ifndef ERL_CHECK_IO_H__
#define ERL_CHECK_IO_H__
+#include "sys.h"
#include "erl_sys_driver.h"
#ifdef ERTS_ENABLE_KERNEL_POLL
@@ -52,8 +53,8 @@ void erts_check_io_kp(int);
void erts_check_io_nkp(int);
void erts_init_check_io_kp(void);
void erts_init_check_io_nkp(void);
-int erts_check_io_debug_kp(void);
-int erts_check_io_debug_nkp(void);
+int erts_check_io_debug_kp(ErtsCheckIoDebugInfo *);
+int erts_check_io_debug_nkp(ErtsCheckIoDebugInfo *);
#else /* !ERTS_ENABLE_KERNEL_POLL */
@@ -70,6 +71,27 @@ void erts_init_check_io(void);
#endif
+extern erts_smp_atomic_t erts_check_io_time;
+
+typedef struct {
+ ErtsPortTaskHandle task;
+ erts_smp_atomic_t executed_time;
+} ErtsIoTask;
+
+ERTS_GLB_INLINE void erts_io_notify_port_task_executed(ErtsPortTaskHandle *pthp);
+
+#if ERTS_GLB_INLINE_INCL_FUNC_DEF
+
+ERTS_GLB_INLINE void
+erts_io_notify_port_task_executed(ErtsPortTaskHandle *pthp)
+{
+ ErtsIoTask *itp = (ErtsIoTask *) (((char *) pthp) - offsetof(ErtsIoTask, task));
+ erts_aint_t ci_time = erts_smp_atomic_read_acqb(&erts_check_io_time);
+ erts_smp_atomic_set_relb(&itp->executed_time, ci_time);
+}
+
+#endif
+
#endif /* ERL_CHECK_IO_H__ */
#if !defined(ERL_CHECK_IO_C__) && !defined(ERTS_ALLOC_C__)
@@ -81,6 +103,16 @@ void erts_init_check_io(void);
#include "erl_poll.h"
#include "erl_port_task.h"
+#ifdef __WIN32__
+/*
+ * Current erts_poll implementation for Windows cannot handle
+ * active events in the set of events polled.
+ */
+# define ERTS_CIO_DEFER_ACTIVE_EVENTS 1
+#else
+# define ERTS_CIO_DEFER_ACTIVE_EVENTS 0
+#endif
+
/*
* ErtsDrvEventDataState is used by driver_event() which is almost never
* used. We allocate ErtsDrvEventDataState separate since we dont wan't
@@ -91,13 +123,16 @@ typedef struct {
Eterm port;
ErlDrvEventData data;
ErtsPollEvents removed_events;
- ErtsPortTaskHandle task;
+#if ERTS_CIO_DEFER_ACTIVE_EVENTS
+ ErtsPollEvents deferred_events;
+#endif
+ ErtsIoTask iotask;
} ErtsDrvEventDataState;
typedef struct {
Eterm inport;
Eterm outport;
- ErtsPortTaskHandle intask;
- ErtsPortTaskHandle outtask;
+ ErtsIoTask iniotask;
+ ErtsIoTask outiotask;
} ErtsDrvSelectDataState;
#endif /* #ifndef ERL_CHECK_IO_INTERNAL__ */
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c
index 4ac02d21d3..e798dc11b9 100644
--- a/erts/emulator/sys/common/erl_poll.c
+++ b/erts/emulator/sys/common/erl_poll.c
@@ -2152,7 +2152,7 @@ ERTS_POLL_EXPORT(erts_poll_wait)(ErtsPollSet ps,
#ifdef ERTS_POLL_DEBUG_PRINT
erts_printf("Entering erts_poll_wait(), timeout=%d\n",
- (int) tv->tv_sec*1000 + tv->tv_usec/1000);
+ (int) tvp->tv_sec*1000 + tvp->tv_usec/1000);
#endif
if (ERTS_POLLSET_SET_POLLED_CHK(ps)) {
diff --git a/erts/emulator/sys/common/erl_poll.h b/erts/emulator/sys/common/erl_poll.h
index 09ed9f41af..2f1c05f401 100644
--- a/erts/emulator/sys/common/erl_poll.h
+++ b/erts/emulator/sys/common/erl_poll.h
@@ -90,7 +90,7 @@
# if defined(ERTS_USE_POLL)
# undef ERTS_POLL_USE_POLL
# define ERTS_POLL_USE_POLL 1
-# elif !defined(__WIN32__)
+# elif !defined(__WIN32__) && !defined(__OSE__)
# undef ERTS_POLL_USE_SELECT
# define ERTS_POLL_USE_SELECT 1
# endif
@@ -99,13 +99,31 @@
typedef Uint32 ErtsPollEvents;
#undef ERTS_POLL_EV_E2N
-#if defined(__WIN32__) /* --- win32 ------------------------------- */
+#if defined(__WIN32__) || defined(__OSE__) /* --- win32 or ose -------- */
#define ERTS_POLL_EV_IN 1
#define ERTS_POLL_EV_OUT 2
#define ERTS_POLL_EV_ERR 4
#define ERTS_POLL_EV_NVAL 8
+#ifdef __OSE__
+
+typedef struct ErtsPollOseMsgList_ {
+ struct ErtsPollOseMsgList_ *next;
+ union SIGNAL *data;
+} ErtsPollOseMsgList;
+
+struct erts_sys_fd_type {
+ SIGSELECT signo;
+ ErlDrvOseEventId id;
+ ErtsPollOseMsgList *msgs;
+ ErlDrvOseEventId (*resolve_signal)(union SIGNAL *sig);
+ ethr_mutex mtx;
+ void *extra;
+};
+
+#endif
+
#elif ERTS_POLL_USE_EPOLL /* --- epoll ------------------------------- */
#include <sys/epoll.h>
@@ -228,7 +246,8 @@ ErtsPollEvents ERTS_POLL_EXPORT(erts_poll_control)(ErtsPollSet,
ErtsSysFdType,
ErtsPollEvents,
int on,
- int* wake_poller);
+ int* wake_poller
+ );
void ERTS_POLL_EXPORT(erts_poll_controlv)(ErtsPollSet,
ErtsPollControlEntry [],
int on);
diff --git a/erts/emulator/sys/common/erl_sys_common_misc.c b/erts/emulator/sys/common/erl_sys_common_misc.c
index 31ad3b82d5..e63f0bda54 100644
--- a/erts/emulator/sys/common/erl_sys_common_misc.c
+++ b/erts/emulator/sys/common/erl_sys_common_misc.c
@@ -44,6 +44,14 @@
#endif
#endif
+/*
+ * erts_check_io_time is used by the erl_check_io implementation. The
+ * global erts_check_io_time variable is declared here since there
+ * (often) exist two versions of erl_check_io (kernel-poll and
+ * non-kernel-poll), and we dont want two versions of this variable.
+ */
+erts_smp_atomic_t erts_check_io_time;
+
/* Written once and only once */
static int filename_encoding = ERL_FILENAME_UNKNOWN;
@@ -52,7 +60,7 @@ static int filename_warning = ERL_FILENAME_WARNING_WARNING;
/* Default unicode on windows and MacOS X */
static int user_filename_encoding = ERL_FILENAME_UTF8;
#else
-static int user_filename_encoding = ERL_FILENAME_LATIN1;
+static int user_filename_encoding = ERL_FILENAME_UNKNOWN;
#endif
/* This controls the heuristic in printing characters in shell and w/
io:format("~tp", ...) etc. */
diff --git a/erts/emulator/sys/ose/beam.lmconf b/erts/emulator/sys/ose/beam.lmconf
new file mode 100644
index 0000000000..4ad46b01d9
--- /dev/null
+++ b/erts/emulator/sys/ose/beam.lmconf
@@ -0,0 +1,26 @@
+OSE_LM_STACK_SIZES=256,512,1024,2048,4096,8192,16384,65536
+OSE_LM_SIGNAL_SIZES=31,63,127,255,1023,4095,16383,65535
+OSE_LM_POOL_SIZE=0x200000
+OSE_LM_MAIN_NAME=main
+OSE_LM_MAIN_STACK_SIZE=0xF000
+OSE_LM_MAIN_PRIORITY=20
+## Has to be of a type that allows MAM
+OSE_LM_PROGRAM_TYPE=APP_RAM
+OSE_LM_DATA_INIT=YES
+OSE_LM_BSS_INIT=YES
+OSE_LM_EXEC_MODEL=SHARED
+HEAP_MAX_SIZE=1000000000
+HEAP_SMALL_BUF_INIT_SIZE=20971520
+HEAP_LARGE_BUF_THRESHOLD=16000000
+HEAP_LOCK_TYPE=2
+
+ERTS_DEFAULT_PRIO=24
+ERTS_SCHEDULER_PRIO=24
+ERTS_ASYNC_PRIO=22
+ERTS_AUX_PRIO=24
+ERTS_SYS_MSG_DISPATCHER_PRIO=21
+
+# Setting the environment variable EFS_RESOLVE_TMO on the block to 0.
+# This will eliminiate delays when trying to open files on not mounted
+# volumes.
+EFS_RESOLVE_TMO=0
diff --git a/erts/emulator/sys/ose/driver_int.h b/erts/emulator/sys/ose/driver_int.h
new file mode 100644
index 0000000000..2c9ac955d8
--- /dev/null
+++ b/erts/emulator/sys/ose/driver_int.h
@@ -0,0 +1,41 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1997-2009. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * System dependant driver declarations
+ */
+
+#ifndef __DRIVER_INT_H__
+#define __DRIVER_INT_H__
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/types.h>
+#include <sys/uio.h>
+
+typedef struct iovec SysIOVec;
+
+#else
+
+typedef struct {
+ char* iov_base;
+ int iov_len;
+} SysIOVec;
+
+#endif
+
+#endif
diff --git a/erts/emulator/sys/ose/erl_main.c b/erts/emulator/sys/ose/erl_main.c
new file mode 100644
index 0000000000..23a9bc93a4
--- /dev/null
+++ b/erts/emulator/sys/ose/erl_main.c
@@ -0,0 +1,53 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2000-2009. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <stdlib.h>
+
+#include "sys.h"
+#include "erl_vm.h"
+#include "global.h"
+#include "ose.h"
+
+int
+main(int argc, char **argv) {
+
+ (void)stdin;(void)stdout;(void)stderr;
+
+ /* When starting using pm_create -c ARGV="-- -root ..", argv[0] is the first
+ part of ARGV and not the name of the executable. So we shuffle some
+ pointers here to make erl_start happy. */
+ if (argv[0][0] == '-') {
+ int i;
+ char **tmp_argv = malloc(sizeof(char*)*(argc+1));
+ for (i = 0; i < argc; i++)
+ tmp_argv[i+1] = argv[i];
+ tmp_argv[0] = "beam";
+ erl_start(argc+1,tmp_argv);
+ free(tmp_argv);
+ } else {
+ erl_start(argc,argv);
+ }
+
+ stop(current_process());
+
+ return 0;
+}
diff --git a/erts/emulator/sys/ose/erl_ose_sys.h b/erts/emulator/sys/ose/erl_ose_sys.h
new file mode 100644
index 0000000000..cd66d95c26
--- /dev/null
+++ b/erts/emulator/sys/ose/erl_ose_sys.h
@@ -0,0 +1,353 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1997-2011. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ *
+ * This file handles differences between different Unix systems.
+ * This should be the only place with conditional compilation
+ * depending on the type of OS.
+ */
+
+#ifndef _ERL_OSE_SYS_H
+#define _ERL_OSE_SYS_H
+
+#include "ose.h"
+#undef NIL
+#include "ramlog.h"
+#include "erts.sig"
+
+#include "fcntl.h"
+#include "math.h"
+#include "stdio.h"
+#include "stdlib.h"
+#include "string.h"
+#include "sys/param.h"
+#include "sys/time.h"
+#include "time.h"
+#include "dirent.h"
+#include "ethread.h"
+
+/* FIXME: configuration options */
+#define ERTS_SCHED_MIN_SPIN 1
+#define ERTS_SCHED_ONLY_POLL_SCHED_1 1
+#define ERTS_SCHED_FAIR 1
+#define NO_SYSCONF 1
+#define OPEN_MAX FOPEN_MAX
+
+#define MAP_ANON MAP_ANONYMOUS
+
+#ifndef HAVE_MMAP
+# define HAVE_MMAP 0
+#endif
+
+#if HAVE_MMAP
+# include "sys/mman.h"
+#endif
+
+/*
+ * Min number of async threads
+ */
+#define ERTS_MIN_NO_OF_ASYNC_THREADS 1
+
+/*
+ * Our own type of "FD's"
+ */
+#define ERTS_SYS_FD_TYPE struct erts_sys_fd_type*
+#define NO_FSTAT_ON_SYS_FD_TYPE 1 /* They are signals, not files */
+
+#include "sys/stat.h"
+
+/* FIXME mremap is not defined in OSE - POSIX issue */
+extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
+ int __flags, ...);
+
+/* FIXME: mremap constants */
+#define MREMAP_MAYMOVE 1
+#define MREMAP_FIXED 2
+
+typedef void *GETENV_STATE;
+
+/*
+** For the erl_timer_sup module.
+*/
+#define HAVE_GETHRTIME
+
+typedef long long SysHrTime;
+extern SysHrTime sys_gethrtime(void);
+
+void sys_init_hrtime(void);
+
+typedef time_t erts_time_t;
+
+typedef struct timeval SysTimeval;
+
+#define sys_gettimeofday(Arg) ((void) gettimeofday((Arg), NULL))
+
+typedef struct {
+ clock_t tms_utime;
+ clock_t tms_stime;
+ clock_t tms_cutime;
+ clock_t tms_cstime;
+} SysTimes;
+
+extern int erts_ticks_per_sec;
+
+#define SYS_CLK_TCK (erts_ticks_per_sec)
+
+extern clock_t sys_times(SysTimes *buffer);
+
+/* No use in having other resolutions than 1 Ms. */
+#define SYS_CLOCK_RESOLUTION 1
+
+#ifdef NO_FPE_SIGNALS
+
+#define erts_get_current_fp_exception() NULL
+#ifdef ERTS_SMP
+#define erts_thread_init_fp_exception() do{}while(0)
+#endif
+# define __ERTS_FP_CHECK_INIT(fpexnp) do {} while (0)
+# define __ERTS_FP_ERROR(fpexnp, f, Action) if (!finite(f)) { Action; } else {}
+# define __ERTS_FP_ERROR_THOROUGH(fpexnp, f, Action) __ERTS_FP_ERROR(fpexnp, f, Action)
+# define __ERTS_SAVE_FP_EXCEPTION(fpexnp)
+# define __ERTS_RESTORE_FP_EXCEPTION(fpexnp)
+
+#define erts_sys_block_fpe() 0
+#define erts_sys_unblock_fpe(x) do{}while(0)
+
+#else /* !NO_FPE_SIGNALS */
+
+extern volatile unsigned long *erts_get_current_fp_exception(void);
+#ifdef ERTS_SMP
+extern void erts_thread_init_fp_exception(void);
+#endif
+# if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
+# define erts_fwait(fpexnp,f) \
+ __asm__ __volatile__("fwait" : "=m"(*(fpexnp)) : "m"(f))
+# elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
+# define erts_fwait(fpexnp,f) \
+ __asm__ __volatile__("" : "=m"(*(fpexnp)) : "fm"(f))
+# elif defined(__sparc__) && defined(__linux__) && defined(__GNUC__)
+# define erts_fwait(fpexnp,f) \
+ __asm__ __volatile__("" : "=m"(*(fpexnp)) : "em"(f))
+# else
+# define erts_fwait(fpexnp,f) \
+ __asm__ __volatile__("" : "=m"(*(fpexnp)) : "g"(f))
+# endif
+# if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
+ extern void erts_restore_fpu(void);
+# else
+# define erts_restore_fpu() /*empty*/
+# endif
+# if (!defined(__GNUC__) || \
+ (__GNUC__ < 2) || \
+ (__GNUC__ == 2 && __GNUC_MINOR < 96)) && \
+ !defined(__builtin_expect)
+# define __builtin_expect(x, expected_value) (x)
+# endif
+static __inline__ int erts_check_fpe(volatile unsigned long *fp_exception, double f)
+{
+ erts_fwait(fp_exception, f);
+ if (__builtin_expect(*fp_exception == 0, 1))
+ return 0;
+ *fp_exception = 0;
+ erts_restore_fpu();
+ return 1;
+}
+# undef erts_fwait
+# undef erts_restore_fpu
+extern void erts_fp_check_init_error(volatile unsigned long *fp_exception);
+static __inline__ void __ERTS_FP_CHECK_INIT(volatile unsigned long *fp_exception)
+{
+ if (__builtin_expect(*fp_exception == 0, 1))
+ return;
+ erts_fp_check_init_error(fp_exception);
+}
+# define __ERTS_FP_ERROR(fpexnp, f, Action) do { if (erts_check_fpe((fpexnp),(f))) { Action; } } while (0)
+# define __ERTS_SAVE_FP_EXCEPTION(fpexnp) unsigned long old_erl_fp_exception = *(fpexnp)
+# define __ERTS_RESTORE_FP_EXCEPTION(fpexnp) \
+ do { *(fpexnp) = old_erl_fp_exception; } while (0)
+ /* This is for library calls where we don't trust the external
+ code to always throw floating-point exceptions on errors. */
+static __inline__ int erts_check_fpe_thorough(volatile unsigned long *fp_exception, double f)
+{
+ return erts_check_fpe(fp_exception, f) || !finite(f);
+}
+# define __ERTS_FP_ERROR_THOROUGH(fpexnp, f, Action) \
+ do { if (erts_check_fpe_thorough((fpexnp),(f))) { Action; } } while (0)
+
+int erts_sys_block_fpe(void);
+void erts_sys_unblock_fpe(int);
+
+#endif /* !NO_FPE_SIGNALS */
+
+#define ERTS_FP_CHECK_INIT(p) __ERTS_FP_CHECK_INIT(&(p)->fp_exception)
+#define ERTS_FP_ERROR(p, f, A) __ERTS_FP_ERROR(&(p)->fp_exception, f, A)
+#define ERTS_FP_ERROR_THOROUGH(p, f, A) __ERTS_FP_ERROR_THOROUGH(&(p)->fp_exception, f, A)
+
+/* FIXME: force HAVE_GETPAGESIZE and stub getpagesize */
+#ifndef HAVE_GETPAGESIZE
+#define HAVE_GETPAGESIZE 1
+#endif
+
+extern int getpagesize(void);
+
+#ifndef HZ
+#define HZ 60
+#endif
+
+/* OSE5 doesn't provide limits.h so a number of macros should be
+ * added manually */
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+/* Minimum and maximum values a `signed int' can hold. */
+#ifndef INT_MAX
+#define INT_MAX 2147483647
+#endif
+
+#ifndef INT_MIN
+#define INT_MIN (-INT_MAX - 1)
+#endif
+
+#ifndef UINT_MAX
+# define UINT_MAX 4294967295U
+#endif
+
+/*
+static void erts_ose_sys_send(union SIGNAL **signal,PROCESS dst,
+ char* file,int line) {
+ SIGSELECT **ziggy = (SIGSELECT**)signal;
+ printf("%s:%d 0x%x Send signal 0x%x(0x%x) to 0x%x\r\n",
+ file,line,current_process(),ziggy[0][0],*ziggy,dst);
+ send(signal,dst);
+}
+#define send(signal,dst) erts_ose_sys_send(signal,dst,__FILE__,__LINE__)
+
+static void erts_ose_sys_send_w_sender(union SIGNAL **signal,
+ PROCESS sender,PROCESS dst,
+ char* file,int line) {
+ SIGSELECT **ziggy = (SIGSELECT**)signal;
+ printf("%s:%d 0x%x Send signal 0x%x(0x%x) to 0x%x as 0x%x\r\n",
+ file,line,current_process(),ziggy[0][0],*ziggy,dst,sender);
+ send_w_sender(signal,sender,dst);
+}
+#define send_w_sender(signal,sender,dst) \
+ erts_ose_sys_send_w_sender(signal,sender,dst,__FILE__,__LINE__)
+
+
+static union SIGNAL *erts_ose_sys_receive(SIGSELECT *sigsel,
+ char *file,
+ int line) {
+ SIGSELECT *sig;
+ int i;
+
+ printf("%s:%d 0x%x receive({%d,",file,line,current_process(),sigsel[0]);
+ for (i = 1; i < sigsel[0]; i++)
+ printf("0x%x, ",sigsel[i]);
+ if (sigsel[0] != 0)
+ printf("0x%x",sigsel[i]);
+ printf("})\n");
+ sig = (SIGSELECT*)receive(sigsel);
+ printf("%s:%d 0x%x got 0x%x from 0x%x\n",file,line,current_process(),
+ *sig,sender((union SIGNAL**)(&sig)));
+ return (union SIGNAL*)sig;
+}
+#define receive(SIGSEL) erts_ose_sys_receive(SIGSEL,__FILE__,__LINE__)
+
+static union SIGNAL *erts_ose_sys_receive_w_tmo(OSTIME tmo,SIGSELECT *sigsel,
+ char *file,int line) {
+ SIGSELECT *sig;
+ int i;
+ if (tmo == 0) {
+ sig = (SIGSELECT*)receive_w_tmo(tmo,sigsel);
+ if (sig != NULL) {
+ printf("%s:%d 0x%x receive_w_tmo(0,{%d,",file,line,current_process(),
+ sigsel[0]);
+ for (i = 1; i < sigsel[0]; i++)
+ printf("0x%x, ",sigsel[i]);
+ if (sigsel[0] != 0)
+ printf("0x%x",sigsel[i]);
+ printf("})\n");
+ printf("%s:%d 0x%x got 0x%x from 0x%x\n",file,line,current_process(),
+ *sig,sender((union SIGNAL**)(&sig)));
+ }
+ } else {
+ printf("%s:%d 0x%x receive_w_tmo(%u,{%d,",file,line,current_process(),tmo,
+ sigsel[0]);
+ for (i = 1; i < sigsel[0]; i++)
+ printf("0x%x, ",sigsel[i]);
+ if (sigsel[0] != 0)
+ printf("0x%x",sigsel[i]);
+ printf("})\n");
+ sig = (SIGSELECT*)receive_w_tmo(tmo,sigsel);
+ printf("%s:%d 0x%x got ",file,line,current_process());
+ if (sig == NULL)
+ printf("TIMEOUT\n");
+ else
+ printf("0x%x from 0x%x\n",*sig,sender((union SIGNAL**)(&sig)));
+ }
+
+ return (union SIGNAL*)sig;
+}
+
+#define receive_w_tmo(tmo,sigsel) erts_ose_sys_receive_w_tmo(tmo,sigsel, \
+ __FILE__,__LINE__)
+
+static union SIGNAL *erts_ose_sys_receive_fsem(OSTIME tmo,SIGSELECT *sigsel,
+ OSFSEMVAL fsem,
+ char *file,int line) {
+ SIGSELECT *sig;
+ int i;
+ if (tmo == 0) {
+ sig = (SIGSELECT*)receive_fsem(tmo,sigsel,fsem);
+ if (sig != NULL && sig != OS_RCV_FSEM) {
+ printf("%s:%d 0x%x receive_fsem(0,{%d,",file,line,current_process(),
+ sigsel[0]);
+ for (i = 1; i < sigsel[0]; i++)
+ printf("0x%x, ",sigsel[i]);
+ if (sigsel[0] != 0)
+ printf("0x%x",sigsel[i]);
+ printf("},%d)\n",fsem);
+ printf("%s:%d 0x%x got 0x%x from 0x%x\n",file,line,current_process(),
+ *sig,sender((union SIGNAL**)(&sig)));
+ }
+ } else {
+ printf("%s:%d 0x%x receive_fsem(%u,{%d,",file,line,current_process(),tmo,
+ sigsel[0]);
+ for (i = 1; i < sigsel[0]; i++)
+ printf("0x%x, ",sigsel[i]);
+ if (sigsel[0] != 0)
+ printf("0x%x",sigsel[i]);
+ printf("},%d)\n",fsem);
+ sig = (SIGSELECT*)receive_fsem(tmo,sigsel,fsem);
+ printf("%s:%d 0x%x got ",file,line,current_process());
+ if (sig == NULL)
+ printf("TIMEOUT\n");
+ else if (sig == OS_RCV_FSEM)
+ printf("FSEM\n");
+ else
+ printf("0x%x from 0x%x\n",*sig,sender((union SIGNAL**)(&sig)));
+ }
+
+ return (union SIGNAL*)sig;
+}
+
+#define receive_fsem(tmo,sigsel,fsem) \
+ erts_ose_sys_receive_fsem(tmo,sigsel,fsem,__FILE__,__LINE__)
+*/
+#endif /* _ERL_OSE_SYS_H */
diff --git a/erts/emulator/sys/ose/erl_ose_sys_ddll.c b/erts/emulator/sys/ose/erl_ose_sys_ddll.c
new file mode 100644
index 0000000000..ebd80deeaf
--- /dev/null
+++ b/erts/emulator/sys/ose/erl_ose_sys_ddll.c
@@ -0,0 +1,126 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2006-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Interface functions to the dynamic linker using dl* functions.
+ * (No support in OSE, we use static linkage instead)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "sys.h"
+#include "erl_vm.h"
+#include "global.h"
+
+
+void erl_sys_ddll_init(void) {
+}
+
+/*
+ * Open a shared object
+ */
+int erts_sys_ddll_open(const char *full_name, void **handle, ErtsSysDdllError* err)
+{
+ return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
+}
+
+int erts_sys_ddll_open_noext(char *dlname, void **handle, ErtsSysDdllError* err)
+{
+ return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
+}
+
+/*
+ * Find a symbol in the shared object
+ */
+int erts_sys_ddll_sym2(void *handle, const char *func_name, void **function,
+ ErtsSysDdllError* err)
+{
+ return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
+}
+
+/* XXX:PaN These two will be changed with new driver interface! */
+
+/*
+ * Load the driver init function, might appear under different names depending on object arch...
+ */
+
+int erts_sys_ddll_load_driver_init(void *handle, void **function)
+{
+ void *fn;
+ int res;
+ if ((res = erts_sys_ddll_sym2(handle, "driver_init", &fn, NULL)) != ERL_DE_NO_ERROR) {
+ res = erts_sys_ddll_sym2(handle, "_driver_init", &fn, NULL);
+ }
+ if (res == ERL_DE_NO_ERROR) {
+ *function = fn;
+ }
+ return res;
+}
+
+int erts_sys_ddll_load_nif_init(void *handle, void **function, ErtsSysDdllError* err)
+{
+ void *fn;
+ int res;
+ if ((res = erts_sys_ddll_sym2(handle, "nif_init", &fn, err)) != ERL_DE_NO_ERROR) {
+ res = erts_sys_ddll_sym2(handle, "_nif_init", &fn, err);
+ }
+ if (res == ERL_DE_NO_ERROR) {
+ *function = fn;
+ }
+ return res;
+}
+
+/*
+ * Call the driver_init function, whatever it's really called, simple on unix...
+*/
+void *erts_sys_ddll_call_init(void *function) {
+ void *(*initfn)(void) = function;
+ return (*initfn)();
+}
+void *erts_sys_ddll_call_nif_init(void *function) {
+ return erts_sys_ddll_call_init(function);
+}
+
+
+
+/*
+ * Close a chared object
+ */
+int erts_sys_ddll_close2(void *handle, ErtsSysDdllError* err)
+{
+ return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
+}
+
+
+/*
+ * Return string that describes the (current) error
+ */
+char *erts_sys_ddll_error(int code)
+{
+ return "Unspecified error";
+}
+
+void erts_sys_ddll_free_error(ErtsSysDdllError* err)
+{
+ if (err->str != NULL) {
+ erts_free(ERTS_ALC_T_DDLL_TMP_BUF, err->str);
+ }
+}
diff --git a/erts/emulator/sys/ose/erl_poll.c b/erts/emulator/sys/ose/erl_poll.c
new file mode 100644
index 0000000000..7d2a3d1e0b
--- /dev/null
+++ b/erts/emulator/sys/ose/erl_poll.c
@@ -0,0 +1,780 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2006-2012. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Description: Poll interface suitable for ERTS on OSE with or without
+ * SMP support.
+ *
+ * The interface is currently implemented using:
+ * - receive + receive_fsem
+ *
+ * Author: Lukas Larsson
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "erl_thr_progress.h"
+#include "erl_driver.h"
+#include "erl_alloc.h"
+#include "erl_poll.h"
+
+#define NOFILE 4096
+
+/*
+ * Some debug macros
+ */
+
+/* #define HARDDEBUG
+#define HARDTRACE*/
+#ifdef HARDDEBUG
+#ifdef HARDTRACE
+#define HARDTRACEF(X, ...) { fprintf(stderr, X, __VA_ARGS__); fprintf(stderr,"\r\n"); }
+#else
+#define HARDTRACEF(...)
+#endif
+
+#else
+#define HARDTRACEF(X,...)
+#define HARDDEBUGF(...)
+#endif
+
+#if 0
+#define ERTS_POLL_DEBUG_PRINT
+#endif
+
+#if defined(DEBUG) && 0
+#define HARD_DEBUG
+#endif
+
+# define SEL_ALLOC erts_alloc
+# define SEL_REALLOC realloc_wrap
+# define SEL_FREE erts_free
+
+#ifdef ERTS_SMP
+
+#define ERTS_POLLSET_LOCK(PS) \
+ erts_smp_mtx_lock(&(PS)->mtx)
+#define ERTS_POLLSET_UNLOCK(PS) \
+ erts_smp_mtx_unlock(&(PS)->mtx)
+
+#else
+
+#define ERTS_POLLSET_LOCK(PS)
+#define ERTS_POLLSET_UNLOCK(PS)
+
+#endif
+
+/*
+ * --- Data types ------------------------------------------------------------
+ */
+
+union SIGNAL {
+ SIGSELECT sig_no;
+};
+
+typedef struct erts_sigsel_item_ ErtsSigSelItem;
+
+struct erts_sigsel_item_ {
+ ErtsSigSelItem *next;
+ ErtsSysFdType fd;
+ ErtsPollEvents events;
+};
+
+typedef struct erts_sigsel_info_ ErtsSigSelInfo;
+
+struct erts_sigsel_info_ {
+ ErtsSigSelInfo *next;
+ SIGSELECT signo;
+ ErlDrvOseEventId (*decode)(union SIGNAL* sig);
+ ErtsSigSelItem *fds;
+};
+
+struct ErtsPollSet_ {
+ SIGSELECT *sigs;
+ ErtsSigSelInfo *info;
+ Uint sig_count;
+ Uint item_count;
+ PROCESS interrupt;
+ erts_atomic32_t wakeup_state;
+ erts_smp_atomic32_t timeout;
+#ifdef ERTS_SMP
+ erts_smp_mtx_t mtx;
+#endif
+};
+
+static int max_fds = -1;
+
+#define ERTS_POLL_NOT_WOKEN ((erts_aint32_t) (1 << 0))
+#define ERTS_POLL_WOKEN_INTR ((erts_aint32_t) (1 << 1))
+#define ERTS_POLL_WOKEN_TIMEDOUT ((erts_aint32_t) (1 << 2))
+#define ERTS_POLL_WOKEN_IO_READY ((erts_aint32_t) (1 << 3))
+#define ERTS_POLL_SLEEPING ((erts_aint32_t) (1 << 4))
+
+/* signal list prototypes */
+static ErtsSigSelInfo *get_sigsel_info(ErtsPollSet ps, SIGSELECT signo);
+static ErtsSigSelItem *get_sigsel_item(ErtsPollSet ps, ErtsSysFdType fd);
+static ErtsSigSelInfo *add_sigsel_info(ErtsPollSet ps, ErtsSysFdType fd,
+ ErlDrvOseEventId (*decode)(union SIGNAL* sig));
+static ErtsSigSelItem *add_sigsel_item(ErtsPollSet ps, ErtsSysFdType fd,
+ ErlDrvOseEventId (*decode)(union SIGNAL* sig));
+static int del_sigsel_info(ErtsPollSet ps, ErtsSigSelInfo *info);
+static int del_sigsel_item(ErtsPollSet ps, ErtsSigSelItem *item);
+static int update_sigsel(ErtsPollSet ps);
+
+static ErtsSigSelInfo *
+get_sigsel_info(ErtsPollSet ps, SIGSELECT signo) {
+ ErtsSigSelInfo *curr = ps->info;
+ while (curr != NULL) {
+ if (curr->signo == signo)
+ return curr;
+ curr = curr->next;
+ }
+ return NULL;
+}
+
+static ErtsSigSelItem *
+get_sigsel_item(ErtsPollSet ps, ErtsSysFdType fd) {
+ ErtsSigSelInfo *info = get_sigsel_info(ps,fd->signo);
+ ErtsSigSelItem *curr;
+
+ if (info == NULL)
+ return NULL;
+
+ curr = info->fds;
+
+ while (curr != NULL) {
+ if (curr->fd->id == fd->id) {
+ ASSERT(curr->fd->signo == fd->signo);
+ return curr;
+ }
+ curr = curr->next;
+ }
+ return NULL;
+}
+
+static ErtsSigSelInfo *
+add_sigsel_info(ErtsPollSet ps, ErtsSysFdType fd,
+ ErlDrvOseEventId (*decode)(union SIGNAL* sig)) {
+ ErtsSigSelInfo *info = SEL_ALLOC(ERTS_ALC_T_POLLSET,
+ sizeof(ErtsSigSelInfo));
+ info->next = ps->info;
+ info->fds = NULL;
+ info->signo = fd->signo;
+ info->decode = decode;
+ ps->info = info;
+ ps->sig_count++;
+ return info;
+}
+
+static ErtsSigSelItem *
+add_sigsel_item(ErtsPollSet ps, ErtsSysFdType fd,
+ ErlDrvOseEventId (*decode)(union SIGNAL* sig)) {
+ ErtsSigSelInfo *info = get_sigsel_info(ps,fd->signo);
+ ErtsSigSelItem *item = SEL_ALLOC(ERTS_ALC_T_POLLSET,
+ sizeof(ErtsSigSelItem));
+ if (info == NULL)
+ info = add_sigsel_info(ps, fd, decode);
+ if (info->decode != decode) {
+ erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
+ erts_dsprintf(dsbufp, "erts_poll_control() inconsistency: multiple resolve_signal functions for same signal (%d)\n",
+ fd->signo);
+ erts_send_error_to_logger_nogl(dsbufp);
+ }
+ ASSERT(info->decode == decode);
+ item->next = info->fds;
+ item->fd = fd;
+ item->events = 0;
+ info->fds = item;
+ ps->item_count++;
+ return item;
+}
+
+static int del_sigsel_info(ErtsPollSet ps, ErtsSigSelInfo *info) {
+ ErtsSigSelInfo *curr, *prev;
+
+ if (ps->info == info) {
+ ps->info = ps->info->next;
+ } else {
+ curr = ps->info->next;
+ prev = ps->info;
+
+ while (curr != info) {
+ if (curr == NULL)
+ return 1;
+ prev = curr;
+ curr = curr->next;
+ }
+ prev->next = curr->next;
+ }
+
+ ps->sig_count--;
+ SEL_FREE(ERTS_ALC_T_POLLSET, info);
+ return 0;
+}
+
+static int del_sigsel_item(ErtsPollSet ps, ErtsSigSelItem *item) {
+ ErtsSigSelInfo *info = get_sigsel_info(ps,item->fd->signo);
+ ErtsSigSelItem *curr, *prev;
+
+ ps->item_count--;
+ ASSERT(ps->item_count >= 0);
+
+ if (info->fds == item) {
+ info->fds = info->fds->next;
+ SEL_FREE(ERTS_ALC_T_POLLSET,item);
+ if (info->fds == NULL)
+ return del_sigsel_info(ps,info);
+ return 0;
+ }
+
+ curr = info->fds->next;
+ prev = info->fds;
+
+ while (curr != item) {
+ if (curr == NULL) {
+ /* We did not find an item to delete so we have to
+ * increment item count again.
+ */
+ ps->item_count++;
+ return 1;
+ }
+ prev = curr;
+ curr = curr->next;
+ }
+ prev->next = curr->next;
+ SEL_FREE(ERTS_ALC_T_POLLSET,item);
+ return 0;
+}
+
+#ifdef ERTS_SMP
+
+static void update_redir_tables(ErtsPollSet ps) {
+ struct OS_redir_entry *redir_table;
+ PROCESS sched_1 = ERTS_SCHEDULER_IX(0)->tid.id;
+ int i;
+ redir_table = SEL_ALLOC(ERTS_ALC_T_POLLSET,
+ sizeof(struct OS_redir_entry)*(ps->sig_count+1));
+
+ redir_table[0].sig = ps->sig_count+1;
+ redir_table[0].pid = 0;
+
+ for (i = 1; i < ps->sig_count+1; i++) {
+ redir_table[i].sig = ps->sigs[i];
+ redir_table[i].pid = sched_1;
+ }
+
+ for (i = 1; i < erts_no_schedulers; i++) {
+ ErtsSchedulerData *esdp = ERTS_SCHEDULER_IX(i);
+ set_redirection(esdp->tid.id,redir_table);
+ }
+
+ SEL_FREE(ERTS_ALC_T_POLLSET,redir_table);
+}
+
+#endif
+
+static int update_sigsel(ErtsPollSet ps) {
+ ErtsSigSelInfo *info = ps->info;
+
+ int i;
+
+ if (ps->sigs != NULL)
+ SEL_FREE(ERTS_ALC_T_POLLSET,ps->sigs);
+
+ if (ps->sig_count == 0) {
+ /* If there are no signals we place a non-valid signal to make sure that
+ * we do not trigger on a any unrelated signals which are sent to the
+ * process.
+ */
+ ps->sigs = SEL_ALLOC(ERTS_ALC_T_POLLSET,sizeof(SIGSELECT)*(2));
+ ps->sigs[0] = 1;
+ ps->sigs[1] = ERTS_SIGNAL_INVALID;
+ return 0;
+ }
+
+ ps->sigs = SEL_ALLOC(ERTS_ALC_T_POLLSET,sizeof(SIGSELECT)*(ps->sig_count+1));
+ ps->sigs[0] = ps->sig_count;
+
+ for (i = 1; info != NULL; i++, info = info->next)
+ ps->sigs[i] = info->signo;
+
+#ifdef ERTS_SMP
+ update_redir_tables(ps);
+#endif
+
+ return 0;
+}
+
+static ERTS_INLINE void
+wake_poller(ErtsPollSet ps)
+{
+ erts_aint32_t wakeup_state;
+
+ ERTS_THR_MEMORY_BARRIER;
+ wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
+ while (wakeup_state != ERTS_POLL_WOKEN_IO_READY
+ && wakeup_state != ERTS_POLL_WOKEN_INTR) {
+ erts_aint32_t act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_INTR,
+ wakeup_state);
+ if (act == wakeup_state) {
+ wakeup_state = act;
+ break;
+ }
+ wakeup_state = act;
+ }
+ if (wakeup_state == ERTS_POLL_SLEEPING) {
+ /*
+ * Since we don't know the internals of signal_fsem() we issue
+ * a memory barrier as a safety precaution ensuring that
+ * the store we just made to wakeup_state wont be reordered
+ * with loads in signal_fsem().
+ */
+ ERTS_THR_MEMORY_BARRIER;
+ signal_fsem(ps->interrupt);
+ }
+}
+
+static ERTS_INLINE void
+reset_interrupt(ErtsPollSet ps)
+{
+ /* We need to keep io-ready if set */
+ erts_aint32_t wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
+ while (wakeup_state != ERTS_POLL_NOT_WOKEN &&
+ wakeup_state != ERTS_POLL_SLEEPING) {
+ erts_aint32_t act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_NOT_WOKEN,
+ wakeup_state);
+ if (wakeup_state == act)
+ break;
+ wakeup_state = act;
+ }
+ ERTS_THR_MEMORY_BARRIER;
+}
+
+static ERTS_INLINE void
+set_interrupt(ErtsPollSet ps)
+{
+ wake_poller(ps);
+}
+
+void erts_poll_interrupt(ErtsPollSet ps,int set) {
+ HARDTRACEF("erts_poll_interrupt called!\n");
+
+ if (!set)
+ reset_interrupt(ps);
+ else
+ set_interrupt(ps);
+
+}
+
+void erts_poll_interrupt_timed(ErtsPollSet ps,int set,erts_short_time_t msec) {
+ HARDTRACEF("erts_poll_interrupt_timed called!\n");
+
+ if (!set)
+ reset_interrupt(ps);
+ else if (erts_smp_atomic32_read_acqb(&ps->timeout) > (erts_aint32_t) msec)
+ set_interrupt(ps);
+}
+
+ErtsPollEvents erts_poll_control(ErtsPollSet ps, ErtsSysFdType fd,
+ ErtsPollEvents pe, int on, int* do_wake) {
+ ErtsSigSelItem *curr;
+ ErtsPollEvents new_events;
+ int old_sig_count;
+
+ HARDTRACEF(
+ "%ux: In erts_poll_control, fd = %d, pe = %d, on = %d, *do_wake = %d, curr = 0x%xu",
+ ps, fd, pe, on, do_wake, curr);
+
+ ERTS_POLLSET_LOCK(ps);
+
+ if (on && (pe & ERTS_POLL_EV_IN) && (pe & ERTS_POLL_EV_OUT)) {
+ /* Check to make sure both in and out are not used at the same time */
+ new_events = ERTS_POLL_EV_NVAL;
+ goto done;
+ }
+
+ curr = get_sigsel_item(ps, fd);
+ old_sig_count = ps->sig_count;
+
+ if (curr == NULL && on) {
+ curr = add_sigsel_item(ps, fd, fd->resolve_signal);
+ } else if (curr == NULL && !on) {
+ new_events = ERTS_POLL_EV_NVAL;
+ goto done;
+ }
+
+ new_events = curr->events;
+
+ if (pe == 0) {
+ *do_wake = 0;
+ goto done;
+ }
+
+ if (on) {
+ new_events |= pe;
+ curr->events = new_events;
+ } else {
+ new_events &= ~pe;
+ curr->events = new_events;
+ if (new_events == 0 && del_sigsel_item(ps, curr)) {
+ new_events = ERTS_POLL_EV_NVAL;
+ goto done;
+ }
+ }
+
+ if (ps->sig_count != old_sig_count) {
+ if (update_sigsel(ps))
+ new_events = ERTS_POLL_EV_NVAL;
+ }
+done:
+ ERTS_POLLSET_UNLOCK(ps);
+ HARDTRACEF("%ux: Out erts_poll_control", ps);
+ return new_events;
+}
+
+int erts_poll_wait(ErtsPollSet ps,
+ ErtsPollResFd pr[],
+ int *len,
+ SysTimeval *utvp) {
+ int res = ETIMEDOUT, no_fds, currid = 0;
+ OSTIME timeout;
+ union SIGNAL *sig;
+ // HARDTRACEF("%ux: In erts_poll_wait",ps);
+ if (ps->interrupt == (PROCESS)0)
+ ps->interrupt = current_process();
+
+ ASSERT(current_process() == ps->interrupt);
+ ASSERT(get_fsem(current_process()) == 0);
+ ASSERT(erts_atomic32_read_nob(&ps->wakeup_state) &
+ (ERTS_POLL_NOT_WOKEN | ERTS_POLL_WOKEN_INTR));
+ /* Max no of spots avable in pr */
+ no_fds = *len;
+
+ *len = 0;
+
+ ASSERT(utvp);
+
+ /* erts_printf("Entering erts_poll_wait(), timeout=%d\n",
+ (int) utvp->tv_sec*1000 + utvp->tv_usec/1000); */
+
+ timeout = utvp->tv_sec*1000 + utvp->tv_usec/1000;
+
+ if (timeout > ((time_t) ERTS_AINT32_T_MAX))
+ timeout = ERTS_AINT32_T_MAX;
+ erts_smp_atomic32_set_relb(&ps->timeout, (erts_aint32_t) timeout);
+
+ while (currid < no_fds) {
+ if (timeout > 0) {
+ erts_aint32_t act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_SLEEPING,
+ ERTS_POLL_NOT_WOKEN);
+ if (act == ERTS_POLL_NOT_WOKEN) {
+#ifdef ERTS_SMP
+ erts_thr_progress_prepare_wait(NULL);
+#endif
+ sig = receive_fsem(timeout, ps->sigs, 1);
+#ifdef ERTS_SMP
+ erts_thr_progress_finalize_wait(NULL);
+#endif
+ } else {
+ ASSERT(act == ERTS_POLL_WOKEN_INTR);
+ sig = OS_RCV_FSEM;
+ }
+ } else
+ sig = receive_w_tmo(0, ps->sigs);
+
+ if (sig == NULL) {
+ if (timeout > 0) {
+ erts_aint32_t act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_TIMEDOUT,
+ ERTS_POLL_SLEEPING);
+ if (act == ERTS_POLL_WOKEN_INTR)
+ /* Restore fsem as it was signaled but we got a timeout */
+ wait_fsem(1);
+ } else
+ erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_TIMEDOUT,
+ ERTS_POLL_NOT_WOKEN);
+ break;
+ } else if (sig == OS_RCV_FSEM) {
+ ASSERT(erts_atomic32_read_nob(&ps->wakeup_state) == ERTS_POLL_WOKEN_INTR);
+ break;
+ }
+ {
+ ErtsSigSelInfo *info = get_sigsel_info(ps, sig->sig_no);
+ struct erts_sys_fd_type fd = { sig->sig_no, info->decode(sig) };
+ ErtsSigSelItem *item = get_sigsel_item(ps, &fd);
+
+ ASSERT(sig);
+ if (currid == 0 && timeout > 0) {
+ erts_aint32_t act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_IO_READY,
+ ERTS_POLL_SLEEPING);
+ if (act == ERTS_POLL_WOKEN_INTR) {
+ /* Restore fsem as it was signaled but we got a msg */
+ wait_fsem(1);
+ act = erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_IO_READY,
+ ERTS_POLL_WOKEN_INTR);
+ }
+ } else if (currid == 0) {
+ erts_atomic32_set_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_IO_READY);
+ }
+
+ if (item == NULL) {
+ erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
+ erts_dsprintf(
+ dsbufp,
+ "erts_poll_wait() failed: found unkown signal id %d (signo %u) "
+ "(curr_proc 0x%x)\n",
+ fd.id, fd.signo, current_process());
+ erts_send_error_to_logger_nogl(dsbufp);
+ timeout = 0;
+ /* Under normal circumstances the signal is deallocated by the
+ * driver that issued the select operation. But in this case
+ * there's no driver waiting for such signal so we have to
+ * deallocate it here */
+ if (sig)
+ free_buf(&sig);
+ } else {
+ int i;
+ struct erts_sys_fd_type *fd = NULL;
+ ErtsPollOseMsgList *tl,*new;
+
+ /* Check if this fd has already been triggered by a previous signal */
+ for (i = 0; i < currid;i++) {
+ if (pr[i].fd == item->fd) {
+ fd = pr[i].fd;
+ pr[i].events |= item->events;
+ break;
+ }
+ }
+
+ /* First time this fd is triggered */
+ if (fd == NULL) {
+ pr[currid].fd = item->fd;
+ pr[currid].events = item->events;
+ fd = item->fd;
+ timeout = 0;
+ currid++;
+ }
+
+ /* Insert new signal in approriate list */
+ new = erts_alloc(ERTS_ALC_T_FD_SIG_LIST,sizeof(ErtsPollOseMsgList));
+ new->next = NULL;
+ new->data = sig;
+
+ ethr_mutex_lock(&fd->mtx);
+ tl = fd->msgs;
+
+ if (tl == NULL) {
+ fd->msgs = new;
+ } else {
+ while (tl->next != NULL)
+ tl = tl->next;
+ tl->next = new;
+ }
+ ethr_mutex_unlock(&fd->mtx);
+ }
+
+ }
+ }
+
+ {
+ erts_aint32_t wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
+
+ switch (wakeup_state) {
+ case ERTS_POLL_WOKEN_IO_READY:
+ res = 0;
+ break;
+ case ERTS_POLL_WOKEN_INTR:
+ res = EINTR;
+ break;
+ case ERTS_POLL_WOKEN_TIMEDOUT:
+ res = ETIMEDOUT;
+ break;
+ case ERTS_POLL_NOT_WOKEN:
+ /* This happens when we get an invalid signal only */
+ res = EINVAL;
+ break;
+ default:
+ res = 0;
+ erl_exit(ERTS_ABORT_EXIT,
+ "%s:%d: Internal error: Invalid wakeup_state=%d\n",
+ __FILE__, __LINE__, (int) wakeup_state);
+ }
+ }
+
+ erts_atomic32_set_nob(&ps->wakeup_state, ERTS_POLL_NOT_WOKEN);
+ erts_smp_atomic32_set_nob(&ps->timeout, ERTS_AINT32_T_MAX);
+
+ *len = currid;
+
+ // HARDTRACEF("%ux: Out erts_poll_wait",ps);
+ return res;
+}
+
+int erts_poll_max_fds(void)
+{
+
+ HARDTRACEF("In/Out erts_poll_max_fds -> %d",max_fds);
+ return max_fds;
+}
+
+void erts_poll_info(ErtsPollSet ps,
+ ErtsPollInfo *pip)
+{
+ Uint size = 0;
+ Uint num_events = 0;
+
+ size += sizeof(struct ErtsPollSet_);
+ size += sizeof(ErtsSigSelInfo)*ps->sig_count;
+ size += sizeof(ErtsSigSelItem)*ps->item_count;
+ size += sizeof(SIGSELECT)*(ps->sig_count+1);
+
+ pip->primary = "receive_fsem";
+
+ pip->fallback = NULL;
+
+ pip->kernel_poll = NULL;
+
+ pip->memory_size = size;
+
+ pip->poll_set_size = num_events;
+
+ pip->fallback_poll_set_size = 0;
+
+ pip->lazy_updates = 0;
+
+ pip->pending_updates = 0;
+
+ pip->batch_updates = 0;
+
+ pip->concurrent_updates = 0;
+
+
+ pip->max_fds = erts_poll_max_fds();
+ HARDTRACEF("%ux: Out erts_poll_info",ps);
+
+}
+
+ErtsPollSet erts_poll_create_pollset(void)
+{
+ ErtsPollSet ps = SEL_ALLOC(ERTS_ALC_T_POLLSET,
+ sizeof(struct ErtsPollSet_));
+
+ ps->sigs = NULL;
+ ps->sig_count = 0;
+ ps->item_count = 0;
+ ps->info = NULL;
+ ps->interrupt = (PROCESS)0;
+ erts_atomic32_init_nob(&ps->wakeup_state, ERTS_POLL_NOT_WOKEN);
+ erts_smp_atomic32_init_nob(&ps->timeout, ERTS_AINT32_T_MAX);
+#ifdef ERTS_SMP
+ erts_smp_mtx_init(&ps->mtx, "pollset");
+#endif
+ update_sigsel(ps);
+ HARDTRACEF("%ux: Out erts_poll_create_pollset",ps);
+ return ps;
+}
+
+void erts_poll_destroy_pollset(ErtsPollSet ps)
+{
+ ErtsSigSelInfo *info;
+ for (info = ps->info; ps->info != NULL; info = ps->info, ps->info = ps->info->next) {
+ ErtsSigSelItem *item;
+ for (item = info->fds; info->fds != NULL; item = info->fds, info->fds = info->fds->next)
+ SEL_FREE(ERTS_ALC_T_POLLSET, item);
+ SEL_FREE(ERTS_ALC_T_POLLSET, info);
+ }
+
+ SEL_FREE(ERTS_ALC_T_POLLSET,ps->sigs);
+
+#ifdef ERTS_SMP
+ erts_smp_mtx_destroy(&ps->mtx);
+#endif
+
+ SEL_FREE(ERTS_ALC_T_POLLSET,ps);
+}
+
+void erts_poll_init(void)
+{
+ HARDTRACEF("In %s", __FUNCTION__);
+ max_fds = 256;
+
+ HARDTRACEF("Out %s", __FUNCTION__);
+}
+
+
+/* OSE driver functions */
+
+union SIGNAL *erl_drv_ose_get_signal(ErlDrvEvent drv_ev) {
+ struct erts_sys_fd_type *ev = (struct erts_sys_fd_type *)drv_ev;
+ ethr_mutex_lock(&ev->mtx);
+ if (ev->msgs == NULL) {
+ ethr_mutex_unlock(&ev->mtx);
+ return NULL;
+ } else {
+ ErtsPollOseMsgList *msg = ev->msgs;
+ union SIGNAL *sig = (union SIGNAL*)msg->data;
+ ASSERT(msg->data);
+ ev->msgs = msg->next;
+ ethr_mutex_unlock(&ev->mtx);
+ erts_free(ERTS_ALC_T_FD_SIG_LIST,msg);
+ restore(sig);
+ return sig;
+ }
+}
+
+ErlDrvEvent
+erl_drv_ose_event_alloc(SIGSELECT signo, ErlDrvOseEventId id,
+ ErlDrvOseEventId (*resolve_signal)(union SIGNAL *sig), void *extra) {
+ struct erts_sys_fd_type *ev = erts_alloc(ERTS_ALC_T_DRV_EV,
+ sizeof(struct erts_sys_fd_type));
+ ev->signo = signo;
+ ev->extra = extra;
+ ev->id = id;
+ ev->msgs = NULL;
+ ev->resolve_signal = resolve_signal;
+ ethr_mutex_init(&ev->mtx);
+ return (ErlDrvEvent)ev;
+}
+
+void erl_drv_ose_event_free(ErlDrvEvent drv_ev) {
+ struct erts_sys_fd_type *ev = (struct erts_sys_fd_type *)drv_ev;
+ ASSERT(ev->msgs == NULL);
+ ethr_mutex_destroy(&ev->mtx);
+ erts_free(ERTS_ALC_T_DRV_EV,ev);
+}
+
+void erl_drv_ose_event_fetch(ErlDrvEvent drv_ev, SIGSELECT *signo,
+ ErlDrvOseEventId *id, void **extra) {
+ struct erts_sys_fd_type *ev = (struct erts_sys_fd_type *)drv_ev;
+ if (signo)
+ *signo = ev->signo;
+ if (extra)
+ *extra = ev->extra;
+ if (id)
+ *id = ev->id;
+}
diff --git a/erts/emulator/sys/ose/erts.sig b/erts/emulator/sys/ose/erts.sig
new file mode 100644
index 0000000000..78b883ee6c
--- /dev/null
+++ b/erts/emulator/sys/ose/erts.sig
@@ -0,0 +1,17 @@
+#ifndef ERTS_OSE_SIGNALS
+#define ERTS_OSE_SIGNALS
+
+#ifndef ERTS_OSE_SIGNAL_BASE
+#define ERTS_OSE_SIGNAL_BASE 0x01900280
+#endif
+
+#define ERTS_SIGNAL_INVALID ERTS_OSE_SIGNAL_BASE
+#define ERTS_SIGNAL_FD_DRV_CONFIG ERTS_OSE_SIGNAL_BASE+1
+#define ERTS_SIGNAL_FD_DRV_ASYNC ERTS_OSE_SIGNAL_BASE+2
+#define ERTS_SIGNAL_OSE_DRV_ATTACH ERTS_OSE_SIGNAL_BASE+3
+#define ERTS_SIGNAL_OSE_DRV_HUNT ERTS_OSE_SIGNAL_BASE+4
+
+#define ERTS_SIGNAL_RUN_ERL_SETUP ERTS_OSE_SIGNAL_BASE+100
+#define ERTS_SIGNAL_RUN_ERL_DAEMON ERTS_OSE_SIGNAL_BASE+101
+
+#endif
diff --git a/erts/emulator/sys/ose/gcc_4.4.3_lm_ppc.lcf b/erts/emulator/sys/ose/gcc_4.4.3_lm_ppc.lcf
new file mode 100644
index 0000000000..a19d23facf
--- /dev/null
+++ b/erts/emulator/sys/ose/gcc_4.4.3_lm_ppc.lcf
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (C) 2013-2014 by Enea Software AB,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ ******************************************************************************/
+
+OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
+OUTPUT_ARCH("powerpc")
+ENTRY("crt0_lm")
+MEMORY
+{
+ rom : ORIGIN = 0x01000000, LENGTH = 0x01000000
+ ram : ORIGIN = 0x02000000, LENGTH = 0x01000000
+}
+PHDRS
+{
+ ph_conf PT_LOAD ;
+ ph_rom PT_LOAD ;
+ ph_ram PT_LOAD ;
+}
+SECTIONS
+{
+ .text :
+ {
+ *(.text_first)
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ *(oscode)
+ *(.init*)
+ *(.fini*)
+ *(.gnu.warning)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t)
+ *(.glue_7)
+ } > rom :ph_rom = 0
+ .ose_sfk_biosentry :
+ {
+ *(.ose_sfk_biosentry)
+ } > rom :ph_rom
+ .ctors :
+ {
+ __CTOR_LIST__ = .;
+ *(.ctors)
+ *(SORT(.ctors.*))
+ __CTOR_END__ = .;
+ } > rom :ph_rom
+ .dtors :
+ {
+ __DTOR_LIST__ = .;
+ *(.dtors)
+ *(SORT(.dtors.*))
+ __DTOR_END__ = .;
+ } > rom :ph_rom
+ OSESYMS :
+ {
+ *(.osesyms)
+ } > rom :ph_rom
+ .rodata :
+ {
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ } > rom :ph_rom
+ .eh_frame_hdr :
+ {
+ *(.eh_frame_hdr)
+ } > rom :ph_rom
+ .eh_frame :
+ {
+ __EH_FRAME_BEGIN__ = .;
+ *(.eh_frame)
+ LONG(0)
+ __EH_FRAME_END__ = .;
+ } > rom :ph_rom
+ .gcc_except_table :
+ {
+ *(.gcc_except_table .gcc_except_table.*)
+ } > rom :ph_rom
+ .sdata2 :
+ {
+ PROVIDE (_SDA2_BASE_ = .);
+ *(.sdata2)
+ *(.sdata2.*)
+ *(.gnu.linkonce.s2.*)
+ } > rom :ph_rom
+ .sbss2 :
+ {
+ *(.sbss2)
+ *(.sbss2.*)
+ *(.gnu.linkonce.sb2.*)
+ } > rom :ph_rom
+ LMCONF :
+ {
+ obj/?*?/ose_confd.o(.rodata)
+ *(LMCONF)
+ } > rom :ph_conf
+ .data :
+ {
+ LONG(0xDEADBABE)
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(0x10);
+ } > ram :ph_ram = 0
+ .sdata2 :
+ {
+ _SDA2_BASE_ = .;
+ *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
+ }> ram :ph_ram
+ .sdata :
+ {
+ PROVIDE (_SDA_BASE_ = .);
+ *(.sdata)
+ *(.sdata.*)
+ *(.gnu.linkonce.s.*)
+ } > ram :ph_ram
+ .sbss :
+ {
+ *(.sbss)
+ *(.sbss.*)
+ *(.scommon)
+ *(.gnu.linkonce.sb.*)
+ } > ram :ph_ram
+ .bss (NOLOAD) :
+ {
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ *(.gnu.linkonce.b.*)
+ *(.osvars)
+ } > ram :ph_ram
+ .ignore (NOLOAD) :
+ {
+ *(.rel.dyn)
+ } > ram :ph_ram
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+__OSESYMS_START = ADDR(OSESYMS);
+__OSESYMS_END = ADDR(OSESYMS) + SIZEOF(OSESYMS);
diff --git a/erts/emulator/sys/ose/gcc_4.6.3_lm_ppc.lcf b/erts/emulator/sys/ose/gcc_4.6.3_lm_ppc.lcf
new file mode 100644
index 0000000000..3440c2961b
--- /dev/null
+++ b/erts/emulator/sys/ose/gcc_4.6.3_lm_ppc.lcf
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (C) 2013-2014 by Enea Software AB,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ ******************************************************************************/
+
+OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
+OUTPUT_ARCH("powerpc")
+
+ENTRY("crt0_lm")
+
+/* Note:
+ * You may have to increase the length of the "rom" memory region and the
+ * origin and length of the "ram" memory region below depending on the size
+ * of the code and data in your load module.
+ */
+
+MEMORY
+{
+ conf : ORIGIN = 0x00100000, LENGTH = 0x00030000
+ rom : ORIGIN = 0x01000000, LENGTH = 0x01000000
+ ram : ORIGIN = 0x03000000, LENGTH = 0x01000000
+}
+
+PHDRS
+{
+ ph_conf PT_LOAD ;
+ ph_rom PT_LOAD ;
+ ph_ram PT_LOAD ;
+}
+
+SECTIONS
+{
+/*---------------------------------------------------------------------------
+ * Load module configuration area
+ *-------------------------------------------------------------------------*/
+
+ /* Load module configuration section. */
+ LMCONF :
+ {
+ obj/?*?/ose_confd.o(.rodata)
+ *(LMCONF)
+ } > conf :ph_conf
+
+/*---------------------------------------------------------------------------
+ * Read-only area
+ *-------------------------------------------------------------------------*/
+
+ /* Code section. */
+ .text :
+ {
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ *(oscode)
+ *(.init*)
+ *(.fini*)
+ *(.gnu.warning)
+ *(.gnu.linkonce.t.*)
+ } > rom :ph_rom = 0
+
+ /* OSE symbols section. */
+ OSESYMS :
+ {
+ *(.osesyms)
+ } > rom :ph_rom
+
+ /* Read-only data section. */
+ .rodata :
+ {
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ } > rom :ph_rom
+
+ /* C++ exception handling section. */
+ .eh_frame :
+ {
+ __EH_FRAME_BEGIN__ = .;
+ *(.eh_frame)
+ LONG(0)
+ __EH_FRAME_END__ = .;
+ } > rom :ph_rom
+
+ /* C++ exception handling section. */
+ .gcc_except_table :
+ {
+ *(.gcc_except_table .gcc_except_table.*)
+ } > rom :ph_rom
+
+ /* PowerPC EABI initialized read-only data section. */
+ .sdata2 :
+ {
+ PROVIDE (_SDA2_BASE_ = .);
+ *(.sdata2)
+ *(.sdata2.*)
+ *(.gnu.linkonce.s2.*)
+ } > rom :ph_rom
+
+ /* PowerPC EABI uninitialized read-only data section. */
+ .sbss2 :
+ {
+ *(.sbss2)
+ *(.sbss2.*)
+ *(.gnu.linkonce.sb2.*)
+ } > rom :ph_rom
+
+/*---------------------------------------------------------------------------
+ * Read-write area
+ *-------------------------------------------------------------------------*/
+
+ /*-------------------------------------------------------------------
+ * Initialized data (copied by PM)
+ *-----------------------------------------------------------------*/
+
+ /* Data section. */
+ .data :
+ {
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } > ram :ph_ram
+
+ /* C++ constructor section. */
+ .ctors :
+ {
+ __CTOR_LIST__ = .;
+ *(.ctors)
+ *(SORT(.ctors.*))
+ __CTOR_END__ = .;
+ } > ram :ph_ram
+
+ /* C++ destructor section. */
+ .dtors :
+ {
+ __DTOR_LIST__ = .;
+ *(.dtors)
+ *(SORT(.dtors.*))
+ __DTOR_END__ = .;
+ } > ram :ph_ram
+
+
+ /* Small data section. */
+ .sdata ALIGN(0x10) :
+ {
+ PROVIDE (_SDA_BASE_ = .);
+ *(.sdata)
+ *(.sdata.*)
+ *(.gnu.linkonce.s.*)
+ } > ram :ph_ram
+
+ /*-------------------------------------------------------------------
+ * Uninitialized data (cleared by PM)
+ *-----------------------------------------------------------------*/
+
+ /* Small bss section. */
+ .sbss :
+ {
+ *(.sbss)
+ *(.sbss.*)
+ *(.scommon)
+ *(.gnu.linkonce.sb.*)
+ } > ram :ph_ram
+
+ /* Bss section. */
+ .bss :
+ {
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ *(.gnu.linkonce.b.*)
+ } > ram :ph_ram
+
+/*---------------------------------------------------------------------------
+ * Debug information
+ *-------------------------------------------------------------------------*/
+
+ /*
+ * Stabs debug sections.
+ */
+
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ /*
+ * DWARF debug sections.
+ */
+
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
diff --git a/erts/emulator/sys/ose/sys.c b/erts/emulator/sys/ose/sys.c
new file mode 100644
index 0000000000..5b950a7dae
--- /dev/null
+++ b/erts/emulator/sys/ose/sys.c
@@ -0,0 +1,1846 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include "sys/time.h"
+#include "time.h"
+#include "sys/uio.h"
+#include "termios.h"
+#include "ctype.h"
+#include "termios.h"
+
+#ifdef HAVE_FCNTL_H
+#include "fcntl.h"
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include "sys/ioctl.h"
+#endif
+
+#define ERTS_WANT_BREAK_HANDLING
+#define WANT_NONBLOCKING
+#include "sys.h"
+#include "erl_thr_progress.h"
+
+#ifdef USE_THREADS
+#include "erl_threads.h"
+#endif
+
+#include "erl_mseg.h"
+
+#include "unistd.h"
+#include "efs.h"
+#include "erl_printf.h"
+#include "aio.h"
+#include "pm.h"
+#include "fcntl.h"
+
+/* Set the define to 1 to get some logging */
+#if 0
+#include "ramlog.h"
+#define LOG(output) ramlog_printf output
+#else
+#define LOG(output)
+#endif
+
+extern char **environ;
+static erts_smp_rwmtx_t environ_rwmtx;
+static PROCESS sig_proxy_pid = 0;
+
+#define MAX_VSIZE 16 /* Max number of entries allowed in an I/O
+ * vector sock_sendv().
+ */
+/*
+ * Don't need global.h, but bif_table.h (included by bif.h),
+ * won't compile otherwise
+ */
+#include "global.h"
+#include "bif.h"
+
+#include "erl_sys_driver.h"
+#include "erl_check_io.h"
+#include "erl_cpu_topology.h"
+
+/* The priority for reader/writer processes */
+#define FD_PROC_PRI get_pri(current_process())
+
+typedef struct ErtsSysReportExit_ ErtsSysReportExit;
+struct ErtsSysReportExit_ {
+ ErtsSysReportExit *next;
+ Eterm port;
+ int pid;
+ int ifd;
+ int ofd;
+ ErlDrvEvent attach_event;
+ ErlDrvEvent input_event;
+ ErlDrvEvent output_event;
+};
+
+/* This data is shared by these drivers - initialized by spawn_init() */
+static struct driver_data {
+ ErlDrvPort port_num;
+ int ofd;
+ int ifd;
+ int packet_bytes;
+ ErtsSysReportExit *report_exit;
+ int pid;
+ int alive;
+ int status;
+ ErlDrvEvent input_event;
+ ErlDrvEvent output_event;
+ struct aiocb aiocb;
+ FmHandle handle;
+ char *install_handle;
+} *driver_data; /* indexed by fd */
+
+struct async {
+ SIGSELECT signo;
+ ErlDrvTermData port;
+ ErlDrvTermData proc;
+ PROCESS spid;
+ PROCESS target;
+ Uint32 ref;
+};
+
+static ErtsSysReportExit *report_exit_list;
+static ERTS_INLINE void report_exit_status(ErtsSysReportExit *rep, int status);
+
+extern int driver_interrupt(int, int);
+extern void do_break(void);
+
+extern void erl_sys_args(int*, char**);
+
+/* The following two defs should probably be moved somewhere else */
+
+extern void erts_sys_init_float(void);
+
+extern void erl_crash_dump(char* file, int line, char* fmt, ...);
+
+#define DIR_SEPARATOR_CHAR '/'
+
+#if defined(DEBUG)
+#define ERL_BUILD_TYPE_MARKER ".debug"
+#else /* opt */
+#define ERL_BUILD_TYPE_MARKER
+#endif
+
+#define CHILD_SETUP_PROG_NAME "child_setup" ERL_BUILD_TYPE_MARKER
+
+#ifdef DEBUG
+static int debug_log = 0;
+#endif
+
+#ifdef ERTS_SMP
+static erts_smp_atomic32_t have_prepared_crash_dump;
+#define ERTS_PREPARED_CRASH_DUMP \
+ ((int) erts_smp_atomic32_xchg_nob(&have_prepared_crash_dump, 1))
+#else
+static volatile int have_prepared_crash_dump;
+#define ERTS_PREPARED_CRASH_DUMP \
+ (have_prepared_crash_dump++)
+#endif
+
+static erts_smp_atomic_t sys_misc_mem_sz;
+
+#if defined(ERTS_SMP)
+erts_mtx_t chld_stat_mtx;
+#endif
+
+#if defined(ERTS_SMP) /* ------------------------------------------------- */
+#define CHLD_STAT_LOCK erts_mtx_lock(&chld_stat_mtx)
+#define CHLD_STAT_UNLOCK erts_mtx_unlock(&chld_stat_mtx)
+
+#else /* ------------------------------------------------------------------- */
+#define CHLD_STAT_LOCK
+#define CHLD_STAT_UNLOCK
+static volatile int children_died;
+#endif
+
+#define SET_AIO(REQ,FD,SIZE,BUFF) \
+ memset(&(REQ),0,sizeof(REQ)); \
+ (REQ).aio_fildes = FD; \
+ (REQ).aio_offset = FM_POSITION_CURRENT; \
+ (REQ).aio_nbytes = SIZE; \
+ (REQ).aio_buf = BUFF; \
+ (REQ).aio_sigevent.sigev_notify = SIGEV_NONE
+
+/* the first sizeof(struct aiocb *) bytes of the write buffer
+ * will contain the pointer to the aiocb struct, this needs
+ * to be freed between asynchronous writes.
+ * A write of 0 bytes is ignored. */
+#define WRITE_AIO(FD,SIZE,BUFF) do { \
+ if (SIZE > 0) { \
+ struct aiocb *write_req = driver_alloc(sizeof(struct aiocb)); \
+ char *write_buff = driver_alloc((sizeof(char)*SIZE)+1+ \
+ (sizeof(struct aiocb *))); \
+ *(struct aiocb **)write_buff = (struct aiocb *)write_req; \
+ write_buff += sizeof(struct aiocb *); \
+ memcpy(write_buff,BUFF,SIZE+1); \
+ SET_AIO(*write_req,FD,SIZE,write_buff); \
+ if (aio_write(write_req)) \
+ ramlog_printf("%s:%d: write failed with %d\n", \
+ __FILE__,__LINE__,errno); \
+ } \
+} while(0)
+
+/* free the write_buffer and write_req
+ * created in the WRITE_AIO() request macro */
+#define FREE_AIO(ptr) do { \
+ struct aiocb *aiocb_ptr; \
+ char *buffer_ptr; \
+ aiocb_ptr = *(struct aiocb **)((ptr)-sizeof(struct aiocb *)); \
+ buffer_ptr = (((char*)ptr)-sizeof(struct aiocb *)); \
+ driver_free(aiocb_ptr); \
+ driver_free(buffer_ptr); \
+} while(0)
+
+#define DISPATCH_AIO(sig) do { \
+ if (aio_dispatch(sig)) \
+ ramlog_printf("%s:%d: dispatch failed with %d\n", \
+ __FILE__,__LINE__,errno); \
+ } while(0)
+
+#define AIO_PIPE_SIZE 1024
+
+/* debug print macros */
+#define DEBUG_RES 0
+
+#ifdef DEBUG_RES
+#define DEBUG_CHECK_RES(actual, expected) \
+ do { \
+ if (actual != expected ) { \
+ ramlog_printf("Result check failed" \
+ " got: 0x%08x expected:0x%08x\nat: %s:%d\n", \
+ actual, expected, __FILE__, __LINE__); \
+ abort(); /* This might perhaps be too harsh? */ \
+ } \
+ } while(0)
+#else
+#define DEBUG_CHECK_RES
+#endif
+
+static struct fd_data {
+ char pbuf[4]; /* hold partial packet bytes */
+ int psz; /* size of pbuf */
+ char *buf;
+ char *cpos;
+ int sz;
+ int remain; /* for input on fd */
+} *fd_data; /* indexed by fd */
+
+/********************* General functions ****************************/
+
+/* This is used by both the drivers and general I/O, must be set early */
+static int max_files = -1;
+
+/*
+ * a few variables used by the break handler
+ */
+#ifdef ERTS_SMP
+erts_smp_atomic32_t erts_break_requested;
+#define ERTS_SET_BREAK_REQUESTED \
+ erts_smp_atomic32_set_nob(&erts_break_requested, (erts_aint32_t) 1)
+#define ERTS_UNSET_BREAK_REQUESTED \
+ erts_smp_atomic32_set_nob(&erts_break_requested, (erts_aint32_t) 0)
+#else
+volatile int erts_break_requested = 0;
+#define ERTS_SET_BREAK_REQUESTED (erts_break_requested = 1)
+#define ERTS_UNSET_BREAK_REQUESTED (erts_break_requested = 0)
+#endif
+/* set early so the break handler has access to initial mode */
+static struct termios initial_tty_mode;
+static int replace_intr = 0;
+/* assume yes initially, ttsl_init will clear it */
+int using_oldshell = 1;
+static PROCESS get_signal_proxy_pid(void);
+
+static void
+init_check_io(void)
+{
+ erts_init_check_io();
+ max_files = erts_check_io_max_files();
+}
+
+#ifdef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
+#define ERTS_CHK_IO_AS_INTR() erts_check_io_async_sig_interrupt()
+#else
+#define ERTS_CHK_IO_AS_INTR() erts_check_io_interrupt(1)
+#endif
+#define ERTS_CHK_IO_INTR erts_check_io_interrupt
+#define ERTS_CHK_IO_INTR_TMD erts_check_io_interrupt_timed
+#define ERTS_CHK_IO erts_check_io
+#define ERTS_CHK_IO_SZ erts_check_io_size
+
+
+void
+erts_sys_schedule_interrupt(int set)
+{
+ ERTS_CHK_IO_INTR(set);
+}
+
+#ifdef ERTS_SMP
+void
+erts_sys_schedule_interrupt_timed(int set, erts_short_time_t msec)
+{
+ ERTS_CHK_IO_INTR_TMD(set, msec);
+}
+#endif
+
+Uint
+erts_sys_misc_mem_sz(void)
+{
+ Uint res = ERTS_CHK_IO_SZ();
+ res += erts_smp_atomic_read_mb(&sys_misc_mem_sz);
+ return res;
+}
+
+/*
+ * reset the terminal to the original settings on exit
+ */
+void sys_tty_reset(int exit_code)
+{
+ if (using_oldshell && !replace_intr) {
+ SET_BLOCKING(0);
+ }
+ else if (isatty(0)) {
+ tcsetattr(0,TCSANOW,&initial_tty_mode);
+ }
+}
+
+#ifdef USE_THREADS
+
+typedef struct {
+ int sched_bind_data;
+} erts_thr_create_data_t;
+
+/*
+ * thr_create_prepare() is called in parent thread before thread creation.
+ * Returned value is passed as argument to thr_create_cleanup().
+ */
+static void *
+thr_create_prepare(void)
+{
+ erts_thr_create_data_t *tcdp;
+
+ tcdp = erts_alloc(ERTS_ALC_T_TMP, sizeof(erts_thr_create_data_t));
+
+ tcdp->sched_bind_data = erts_sched_bind_atthrcreate_prepare();
+
+ return (void *) tcdp;
+}
+
+
+/* thr_create_cleanup() is called in parent thread after thread creation. */
+static void
+thr_create_cleanup(void *vtcdp)
+{
+ erts_thr_create_data_t *tcdp = (erts_thr_create_data_t *) vtcdp;
+
+ erts_sched_bind_atthrcreate_parent(tcdp->sched_bind_data);
+
+ erts_free(ERTS_ALC_T_TMP, tcdp);
+}
+
+static void
+thr_create_prepare_child(void *vtcdp)
+{
+ erts_thr_create_data_t *tcdp = (erts_thr_create_data_t *) vtcdp;
+
+#ifdef ERTS_ENABLE_LOCK_COUNT
+ erts_lcnt_thread_setup();
+#endif
+
+ erts_sched_bind_atthrcreate_child(tcdp->sched_bind_data);
+}
+
+#endif /* #ifdef USE_THREADS */
+
+/* The two functions below are stolen from win_con.c
+ They have to use malloc/free/realloc directly becasue
+ we want to do able to do erts_printf very early on.
+ */
+#define VPRINTF_BUF_INC_SIZE 128
+static erts_dsprintf_buf_t *
+grow_vprintf_buf(erts_dsprintf_buf_t *dsbufp, size_t need)
+{
+ char *buf;
+ size_t size;
+
+ ASSERT(dsbufp);
+
+ if (!dsbufp->str) {
+ size = (((need + VPRINTF_BUF_INC_SIZE - 1)
+ / VPRINTF_BUF_INC_SIZE)
+ * VPRINTF_BUF_INC_SIZE);
+ buf = (char *) malloc(size * sizeof(char));
+ }
+ else {
+ size_t free_size = dsbufp->size - dsbufp->str_len;
+
+ if (need <= free_size)
+ return dsbufp;
+
+ size = need - free_size + VPRINTF_BUF_INC_SIZE;
+ size = (((size + VPRINTF_BUF_INC_SIZE - 1)
+ / VPRINTF_BUF_INC_SIZE)
+ * VPRINTF_BUF_INC_SIZE);
+ size += dsbufp->size;
+ buf = (char *) realloc((void *) dsbufp->str,
+ size * sizeof(char));
+ }
+ if (!buf)
+ return NULL;
+ if (buf != dsbufp->str)
+ dsbufp->str = buf;
+ dsbufp->size = size;
+ return dsbufp;
+}
+
+static int erts_sys_ramlog_printf(char *format, va_list arg_list)
+{
+ int res,i;
+ erts_dsprintf_buf_t dsbuf = ERTS_DSPRINTF_BUF_INITER(grow_vprintf_buf);
+ res = erts_vdsprintf(&dsbuf, format, arg_list);
+ if (res >= 0) {
+ for (i = 0; i < dsbuf.str_len; i+= 50)
+ /* We print 50 characters at a time because otherwise
+ the ramlog looks broken */
+ ramlog_printf("%.*s",dsbuf.str_len-50 < 0?dsbuf.str_len:50,dsbuf.str+i);
+ }
+ if (dsbuf.str)
+ free((void *) dsbuf.str);
+ return res;
+}
+
+void
+erts_sys_pre_init(void)
+{
+ erts_printf_add_cr_to_stdout = 1;
+ erts_printf_add_cr_to_stderr = 1;
+#ifdef USE_THREADS
+ {
+ erts_thr_init_data_t eid = ERTS_THR_INIT_DATA_DEF_INITER;
+
+ eid.thread_create_child_func = thr_create_prepare_child;
+ /* Before creation in parent */
+ eid.thread_create_prepare_func = thr_create_prepare;
+ /* After creation in parent */
+ eid.thread_create_parent_func = thr_create_cleanup,
+
+ erts_thr_init(&eid);
+
+ report_exit_list = NULL;
+
+#ifdef ERTS_ENABLE_LOCK_COUNT
+ erts_lcnt_init();
+#endif
+
+#if defined(ERTS_SMP)
+ erts_mtx_init(&chld_stat_mtx, "child_status");
+#endif
+ }
+#ifdef ERTS_SMP
+ erts_smp_atomic32_init_nob(&erts_break_requested, 0);
+ erts_smp_atomic32_init_nob(&have_prepared_crash_dump, 0);
+#else
+ erts_break_requested = 0;
+ have_prepared_crash_dump = 0;
+#endif
+#if !defined(ERTS_SMP)
+ children_died = 0;
+#endif
+#endif /* USE_THREADS */
+
+ erts_printf_stdout_func = erts_sys_ramlog_printf;
+
+ erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0);
+}
+
+void
+erl_sys_init(void)
+{
+
+#ifdef USE_SETLINEBUF
+ setlinebuf(stdout);
+#else
+ setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
+#endif
+
+ erts_sys_init_float();
+
+ /* we save this so the break handler can set and reset it properly */
+ /* also so that we can reset on exit (break handler or not) */
+ if (isatty(0)) {
+ tcgetattr(0,&initial_tty_mode);
+ }
+ tzset(); /* Required at least for NetBSD with localtime_r() */
+}
+
+static ERTS_INLINE int
+prepare_crash_dump(int secs)
+{
+#define NUFBUF (3)
+ int i, max;
+ char env[21]; /* enough to hold any 64-bit integer */
+ size_t envsz;
+ /*DeclareTmpHeapNoproc(heap,NUFBUF);*/
+ /*Eterm *hp = heap;*/
+ /*Eterm list = NIL;*/
+ int has_heart = 0;
+
+ UseTmpHeapNoproc(NUFBUF);
+
+ if (ERTS_PREPARED_CRASH_DUMP)
+ return 0; /* We have already been called */
+
+
+ /* Positive secs means an alarm must be set
+ * 0 or negative means no alarm
+ *
+ * Set alarm before we try to write to a port
+ * we don't want to hang on a port write with
+ * no alarm.
+ *
+ */
+
+#if 0 /*ose TBD!!!*/
+ if (secs >= 0) {
+ alarm((unsigned int)secs);
+ }
+#endif
+
+ /* Make sure we unregister at epmd (unknown fd) and get at least
+ one free filedescriptor (for erl_crash.dump) */
+
+ max = max_files;
+ if (max < 1024)
+ max = 1024;
+ for (i = 3; i < max; i++) {
+ close(i);
+ }
+
+ envsz = sizeof(env);
+ i = erts_sys_getenv__("ERL_CRASH_DUMP_NICE", env, &envsz);
+ if (i >= 0) {
+ int nice_val;
+ nice_val = i != 0 ? 0 : atoi(env);
+ if (nice_val > 39) {
+ nice_val = 39;
+ }
+ set_pri(nice_val);
+ }
+
+ UnUseTmpHeapNoproc(NUFBUF);
+#undef NUFBUF
+ return has_heart;
+}
+
+int erts_sys_prepare_crash_dump(int secs)
+{
+ return prepare_crash_dump(secs);
+}
+
+static ERTS_INLINE void
+break_requested(void)
+{
+ /*
+ * just set a flag - checked for and handled by
+ * scheduler threads erts_check_io() (not signal handler).
+ */
+#ifdef DEBUG
+ fprintf(stderr,"break!\n");
+#endif
+ if (ERTS_BREAK_REQUESTED)
+ erl_exit(ERTS_INTR_EXIT, "");
+
+ ERTS_SET_BREAK_REQUESTED;
+ ERTS_CHK_IO_AS_INTR(); /* Make sure we don't sleep in poll */
+}
+
+/* Disable break */
+void erts_set_ignore_break(void) {
+
+}
+
+/* Don't use ctrl-c for break handler but let it be
+ used by the shell instead (see user_drv.erl) */
+void erts_replace_intr(void) {
+ struct termios mode;
+
+ if (isatty(0)) {
+ tcgetattr(0, &mode);
+
+ /* here's an example of how to replace ctrl-c with ctrl-u */
+ /* mode.c_cc[VKILL] = 0;
+ mode.c_cc[VINTR] = CKILL; */
+
+ mode.c_cc[VINTR] = 0; /* disable ctrl-c */
+ tcsetattr(0, TCSANOW, &mode);
+ replace_intr = 1;
+ }
+}
+
+void init_break_handler(void)
+{
+
+}
+
+int sys_max_files(void)
+{
+ return(max_files);
+}
+
+
+/************************** OS info *******************************/
+
+/* Used by erlang:info/1. */
+/* (This code was formerly in drv.XXX/XXX_os_drv.c) */
+
+char os_type[] = "ose";
+
+void
+os_flavor(char* namebuf, /* Where to return the name. */
+ unsigned size) /* Size of name buffer. */
+{
+#if 0
+ struct utsname uts; /* Information about the system. */
+ char* s;
+
+ (void) uname(&uts);
+ for (s = uts.sysname; *s; s++) {
+ if (isupper((int) *s)) {
+ *s = tolower((int) *s);
+ }
+ }
+ strcpy(namebuf, uts.sysname);
+#else
+ strncpy(namebuf, "release", size);
+#endif
+}
+
+void
+os_version(pMajor, pMinor, pBuild)
+int* pMajor; /* Pointer to major version. */
+int* pMinor; /* Pointer to minor version. */
+int* pBuild; /* Pointer to build number. */
+{
+ *pMajor = 5;
+ *pMinor = 7;
+ *pBuild = 0;
+}
+
+void init_getenv_state(GETENV_STATE *state)
+{
+ erts_smp_rwmtx_rlock(&environ_rwmtx);
+ *state = NULL;
+}
+
+char **environ; /*ose - needs replacement*/
+
+char *getenv_string(GETENV_STATE *state0)
+{
+ char **state = (char **) *state0;
+ char *cp;
+
+ ERTS_SMP_LC_ASSERT(erts_smp_lc_rwmtx_is_rlocked(&environ_rwmtx));
+
+ if (state == NULL)
+ state = environ;
+
+ cp = *state++;
+ *state0 = (GETENV_STATE) state;
+
+ return cp;
+}
+
+void fini_getenv_state(GETENV_STATE *state)
+{
+ *state = NULL;
+ erts_smp_rwmtx_runlock(&environ_rwmtx);
+}
+
+
+/************************** Port I/O *******************************/
+
+/* I. Common stuff */
+
+union SIGNAL {
+ SIGSELECT sig_no;
+ struct FmReadPtr fm_read_reply;
+ struct FmWritePtr fm_write_reply;
+ struct async async;
+};
+
+/* II. The spawn/fd drivers */
+
+/*
+ * Decreasing the size of it below 16384 is not allowed.
+ */
+#define ERTS_SYS_READ_BUF_SZ (64*1024)
+
+/* Driver interfaces */
+static ErlDrvData spawn_start(ErlDrvPort, char*, SysDriverOpts*);
+static ErlDrvData fd_start(ErlDrvPort, char*, SysDriverOpts*);
+static ErlDrvSSizeT fd_control(ErlDrvData, unsigned int, char *, ErlDrvSizeT,
+ char **, ErlDrvSizeT);
+static int spawn_init(void);
+static void fd_stop(ErlDrvData);
+static void erl_stop(ErlDrvData);
+static void ready_input(ErlDrvData, ErlDrvEvent);
+static void ready_output(ErlDrvData, ErlDrvEvent);
+static void output(ErlDrvData, char*, ErlDrvSizeT);
+static void stop_select(ErlDrvEvent, void*);
+
+static PROCESS
+get_signal_proxy_pid(void) {
+ union SIGNAL *sig;
+ SIGSELECT any_sig[] = {1,ERTS_SIGNAL_OSE_DRV_ATTACH};
+
+ if (!sig_proxy_pid) {
+ sig = alloc(sizeof(union SIGNAL), ERTS_SIGNAL_OSE_DRV_ATTACH);
+ hunt("ose_signal_driver_proxy", 0, NULL, &sig);
+ sig = receive(any_sig);
+ sig_proxy_pid = sender(&sig);
+ free_buf(&sig);
+ }
+ ASSERT(sig_proxy_pid);
+ return sig_proxy_pid;
+}
+
+static ErlDrvOseEventId
+resolve_signal(union SIGNAL* sig) {
+ switch(sig->sig_no) {
+
+ case FM_READ_PTR_REPLY:
+ return (ErlDrvOseEventId)sig->fm_read_reply.handle;
+
+ case FM_WRITE_PTR_REPLY:
+ return (ErlDrvOseEventId)sig->fm_write_reply.handle;
+
+ case ERTS_SIGNAL_OSE_DRV_ATTACH:
+ return (ErlDrvOseEventId)sig->async.target;
+
+ default:
+ break;
+ }
+ return (ErlDrvOseEventId)-1;
+}
+
+struct erl_drv_entry spawn_driver_entry = {
+ spawn_init,
+ spawn_start,
+ NULL, /* erl_stop, */
+ output,
+ ready_input,
+ ready_output,
+ "spawn",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ ERL_DRV_EXTENDED_MARKER,
+ ERL_DRV_EXTENDED_MAJOR_VERSION,
+ ERL_DRV_EXTENDED_MINOR_VERSION,
+ ERL_DRV_FLAG_USE_PORT_LOCKING,
+ NULL, NULL,
+ stop_select
+};
+struct erl_drv_entry fd_driver_entry = {
+ NULL,
+ fd_start,
+ fd_stop,
+ output,
+ ready_input,
+ ready_output,
+ "fd",
+ NULL,
+ NULL,
+ fd_control,
+ NULL,
+ NULL,
+ NULL, /* ready_async */
+ NULL, /* flush */
+ NULL, /* call */
+ NULL, /* event */
+ ERL_DRV_EXTENDED_MARKER,
+ ERL_DRV_EXTENDED_MAJOR_VERSION,
+ ERL_DRV_EXTENDED_MINOR_VERSION,
+ 0, /* ERL_DRV_FLAGs */
+ NULL, /* handle2 */
+ NULL, /* process_exit */
+ stop_select
+};
+
+static void
+set_spawn_fd(int local_fd, int remote_fd, PROCESS remote_pid) {
+ PROCESS vm_pid;
+ FmHandle handle;
+ char env_val[55];
+ char env_name[10];
+ EfsStatus efs_res;
+
+ /* get pid of pipevm and handle of chosen fd */
+ efs_res = efs_examine_fd(local_fd, FLIB_FD_VMPID, &vm_pid, 0);
+ DEBUG_CHECK_RES(efs_res, EFS_SUCCESS);
+
+ /* setup the file descriptor to buffer per line */
+ efs_res = efs_config_fd(local_fd, FLIB_FD_BUFMODE, FM_BUFF_LINE,
+ FLIB_FD_BUFSIZE, 80, 0);
+ DEBUG_CHECK_RES(efs_res, EFS_SUCCESS);
+
+ /* duplicate handle and set spawn pid owner */
+ efs_res = efs_dup_to(local_fd, remote_pid, &handle);
+ DEBUG_CHECK_RES(efs_res, EFS_SUCCESS);
+
+ sprintf(env_name, "FD%d", remote_fd);
+
+ /* Syntax of the environment variable:
+ * "FD#" "<pid of pipevm>,<handle>,<buffer mode>,<buff size>,<omode>" */
+ sprintf(env_val, "0x%lx,0x%lx,%lu,%lu,0x%x",
+ vm_pid, handle,
+ FM_BUFF_LINE, 80,
+ O_APPEND);
+
+ set_env(remote_pid, env_name, env_val);
+}
+
+static ErlDrvData
+set_driver_data(ErlDrvPort port_num,
+ int ifd,
+ int ofd,
+ int packet_bytes,
+ int read_write,
+ int exit_status,
+ PROCESS pid)
+{
+ Port *prt;
+ ErtsSysReportExit *report_exit;
+
+ prt = erts_drvport2port(port_num);
+ if (prt != ERTS_INVALID_ERL_DRV_PORT) {
+ prt->os_pid = pid;
+ }
+
+ /* READ */
+ if (read_write & DO_READ) {
+ EfsStatus res = efs_examine_fd(ifd, FLIB_FD_HANDLE,
+ &driver_data[ifd].handle, 0);
+ if (res != EFS_SUCCESS)
+ ramlog_printf("%s:%d: efs_examine_fd(%d) failed with %d\n",
+ __FILE__,__LINE__,ifd,errno);
+ driver_data[ifd].ifd = ifd;
+ driver_data[ifd].packet_bytes = packet_bytes;
+ driver_data[ifd].port_num = port_num;
+ driver_data[ifd].pid = pid;
+
+ /* async read struct */
+ memset(&driver_data[ifd].aiocb, 0, sizeof(struct aiocb));
+ driver_data[ifd].aiocb.aio_buf = driver_alloc(AIO_PIPE_SIZE);
+ driver_data[ifd].aiocb.aio_fildes = ifd;
+ driver_data[ifd].aiocb.aio_nbytes = (packet_bytes?packet_bytes:AIO_PIPE_SIZE);
+ driver_data[ifd].alive = 1;
+ driver_data[ifd].status = 0;
+ driver_data[ifd].input_event =
+ erl_drv_ose_event_alloc(FM_READ_PTR_REPLY,
+ driver_data[ifd].handle, resolve_signal,
+ &driver_data[ifd].ifd);
+
+ /* READ & WRITE */
+ if (read_write & DO_WRITE) {
+ driver_data[ifd].ofd = ofd;
+ efs_examine_fd(ofd, FLIB_FD_HANDLE, &driver_data[ofd].handle, 0);
+
+ driver_data[ifd].output_event =
+ erl_drv_ose_event_alloc(FM_WRITE_PTR_REPLY,
+ driver_data[ofd].handle, resolve_signal,
+ &driver_data[ofd].ofd);
+ driver_data[ofd].pid = pid;
+ if (ifd != ofd) {
+ driver_data[ofd] = driver_data[ifd];
+ driver_data[ofd].aiocb.aio_buf = NULL;
+ }
+ }
+ else { /* READ ONLY */
+ driver_data[ifd].ofd = -1;
+ }
+
+ /* enable input event */
+ (void) driver_select(port_num, driver_data[ifd].input_event,
+ (ERL_DRV_READ | ERL_DRV_USE), 1);
+
+ if (aio_read(&driver_data[ifd].aiocb))
+ ramlog_printf("%s:%d: aio_read(%d) failed with %d\n",
+ __FILE__,__LINE__,ifd,errno);
+ }
+ else { /* WRITE ONLY */
+ efs_examine_fd(ofd, FLIB_FD_HANDLE, &driver_data[ofd].handle, 0);
+ driver_data[ofd].packet_bytes = packet_bytes;
+ driver_data[ofd].port_num = port_num;
+ driver_data[ofd].ofd = ofd;
+ driver_data[ofd].pid = pid;
+ driver_data[ofd].alive = 1;
+ driver_data[ofd].status = 0;
+ driver_data[ofd].output_event =
+ erl_drv_ose_event_alloc(FM_WRITE_PTR_REPLY, driver_data[ofd].handle,
+ resolve_signal, &driver_data[ofd].ofd);
+ driver_data[ofd].input_event = driver_data[ofd].output_event;
+ }
+
+ /* this is used for spawned load modules, and is needed
+ * to properly uninstall them */
+ if (exit_status) {
+ struct PmProgramInfo *info;
+ int install_handle_size;
+ union SIGNAL *sig;
+ PmStatus pm_status;
+ report_exit = erts_alloc(ERTS_ALC_T_PRT_REP_EXIT,
+ sizeof(ErtsSysReportExit));
+ report_exit->next = report_exit_list;
+ report_exit->port = erts_drvport2id(port_num);
+ report_exit->pid = pid;
+ report_exit->ifd = (read_write & DO_READ) ? ifd : -1;
+ report_exit->ofd = (read_write & DO_WRITE) ? ofd : -1;
+ report_exit_list = report_exit;
+ report_exit->attach_event =
+ erl_drv_ose_event_alloc(ERTS_SIGNAL_OSE_DRV_ATTACH, pid,
+ resolve_signal, &driver_data[ifd].ifd);
+
+ /* setup ifd and ofd report exit */
+ driver_data[ifd].report_exit = report_exit;
+ driver_data[ofd].report_exit = report_exit;
+
+ pm_status = ose_pm_program_info(pid, &info);
+ DEBUG_CHECK_RES(pm_status, PM_SUCCESS);
+
+ install_handle_size = strlen(info->install_handle)+1;
+ driver_data[ifd].install_handle = driver_alloc(install_handle_size);
+ strcpy(driver_data[ifd].install_handle,
+ info->install_handle);
+
+ free_buf((union SIGNAL **)&info);
+
+ sig = alloc(sizeof(struct async), ERTS_SIGNAL_OSE_DRV_ATTACH);
+ sig->async.target = pid;
+ send(&sig, get_signal_proxy_pid());
+
+ /* this event will trigger when we receive an attach signal
+ * from the recently dead load module */
+ (void)driver_select(port_num,report_exit->attach_event, DO_READ, 1);
+ }
+ else {
+ report_exit = NULL;
+ }
+
+ /* the return value is the pointer to the driver_data struct we created
+ * in this function, it will be used in the drivers input
+ * and output functions */
+ return (ErlDrvData)((!(read_write & DO_READ) && read_write & DO_WRITE)
+ ? &driver_data[ofd]
+ : &driver_data[ifd]);
+}
+
+static int spawn_init()
+{
+ int i;
+
+ driver_data = (struct driver_data *)
+ erts_alloc(ERTS_ALC_T_DRV_TAB, max_files * sizeof(struct driver_data));
+ erts_smp_atomic_add_nob(&sys_misc_mem_sz,
+ max_files * sizeof(struct driver_data));
+
+ for (i = 0; i < max_files; i++)
+ driver_data[i].pid = -1;
+
+ return 1;
+}
+
+static void
+init_fd_data(int fd, ErlDrvPort port_num)
+{
+ fd_data[fd].buf = NULL;
+ fd_data[fd].cpos = NULL;
+ fd_data[fd].remain = 0;
+ fd_data[fd].sz = 0;
+ fd_data[fd].psz = 0;
+}
+
+/* FIXME write a decent text on pipes on ose */
+static ErlDrvData
+spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* opts)
+{
+ int ifd[2];
+ int ofd[2];
+ static uint32_t ticker = 1;
+ PmStatus pm_status;
+ OSDOMAIN domain = PM_NEW_DOMAIN;
+ PROCESS progpid, mainbid, mainpid;
+ char *handle = NULL;
+ struct PmProgramInfo *info;
+ char *args = NULL;
+ char *tmp_handle;
+ ErlDrvData res = (ErlDrvData)-1;
+ int handle_size;
+ char *ptr;
+
+
+ args = driver_alloc(strlen(name)+1);
+ strcpy(args, name);
+ /* We need to handle name in three parts
+ * - install handle (must be unique)
+ * - install binary (needed for ose_pm_install_load_module())
+ * - full path (as argument to the spawned applications env.var
+ */
+
+ /* full path including arguments */
+ args = driver_alloc(strlen(name)+1);
+ strcpy(args, name);
+
+ /* handle path */
+ tmp_handle = strrchr(name, '/');
+ if (tmp_handle == NULL) {
+ tmp_handle = name;
+ }
+ else {
+ tmp_handle++;
+ }
+
+ /* handle args */
+ ptr = strchr(tmp_handle, ' ');
+ if (ptr != NULL) {
+ *ptr = '\0';
+ handle_size = ptr - tmp_handle;
+ }
+ else {
+ handle_size = strlen(name)+1;
+ }
+
+ /* make room for ticker */
+ handle_size += (ticker<10)?3:((ticker<100)?4:5);
+ handle = driver_alloc(handle_size);
+
+ do {
+ snprintf(handle, handle_size, "%s_%d", tmp_handle, ticker);
+ pm_status = ose_pm_install_load_module(0, "ELF", name, handle,
+ 0, 0, NULL);
+ ticker++;
+ } while (pm_status == PM_EINSTALL_HANDLE_ALREADY_INSTALLED);
+
+ if (pm_status != PM_SUCCESS) {
+ errno = ENOSYS; /* FIXME add comment */
+ return ERL_DRV_ERROR_ERRNO;
+ }
+
+ /* Create Program */
+ pm_status = ose_pm_create_program(&domain, handle, 0, 0,
+ NULL, &progpid, &mainbid);
+ DEBUG_CHECK_RES(pm_status, PM_SUCCESS);
+
+ /* Get the mainpid from the newly created program */
+ pm_status = ose_pm_program_info(progpid, &info);
+ DEBUG_CHECK_RES(pm_status, PM_SUCCESS);
+
+ mainpid = info->main_process;
+ free_buf ((union SIGNAL **)&info);
+
+ /* pipevm needs to be started
+ * pipe will return 0 if success, -1 if not,
+ * errno will be set */
+ if (pipe(ifd) != 0 || pipe(ofd) != 0) {
+ DEBUG_CHECK_RES(0, -1);
+ ASSERT(0);
+ }
+
+ /* setup driver data */
+ res = set_driver_data(port_num, ofd[0], ifd[1], opts->packet_bytes,
+ opts->read_write, 1 /* opts->exit_status */, progpid);
+
+ /* init the fd_data array for read/write */
+ init_fd_data(ofd[0], port_num);
+ init_fd_data(ifd[1], port_num);
+
+ /* setup additional configurations
+ * for the spawned applications environment */
+ if (args != NULL) {
+ set_env(progpid, "ARGV", args);
+ }
+ set_env(mainbid, "EFS_RESOLVE_TMO", 0);
+ set_spawn_fd(ifd[0], 0, mainpid);
+ set_spawn_fd(ofd[1], 1, mainpid);
+ set_spawn_fd(ofd[1], 2, mainpid);
+
+ /* start the spawned program */
+ pm_status = ose_pm_start_program(mainbid);
+ DEBUG_CHECK_RES(pm_status, PM_SUCCESS);
+
+ /* close unused fd's */
+ close(ifd[0]);
+ close(ofd[1]);
+
+ if (handle) {
+ driver_free(handle);
+ }
+
+ return (ErlDrvData)res;
+}
+
+#define FD_DEF_HEIGHT 24
+#define FD_DEF_WIDTH 80
+/* Control op */
+#define FD_CTRL_OP_GET_WINSIZE 100
+
+static int fd_get_window_size(int fd, Uint32 *width, Uint32 *height)
+{
+#ifdef TIOCGWINSZ
+ struct winsize ws;
+ if (ioctl(fd,TIOCGWINSZ,&ws) == 0) {
+ *width = (Uint32) ws.ws_col;
+ *height = (Uint32) ws.ws_row;
+ return 0;
+ }
+#endif
+ return -1;
+}
+
+static ErlDrvSSizeT fd_control(ErlDrvData drv_data,
+ unsigned int command,
+ char *buf, ErlDrvSizeT len,
+ char **rbuf, ErlDrvSizeT rlen)
+{
+ struct driver_data *data = (struct driver_data *)drv_data;
+ char resbuff[2*sizeof(Uint32)];
+ switch (command) {
+ case FD_CTRL_OP_GET_WINSIZE:
+ {
+ Uint32 w,h;
+ if (fd_get_window_size(data->ifd,&w,&h))
+ return 0;
+ memcpy(resbuff,&w,sizeof(Uint32));
+ memcpy(resbuff+sizeof(Uint32),&h,sizeof(Uint32));
+ }
+ break;
+ default:
+ return 0;
+ }
+ if (rlen < 2*sizeof(Uint32)) {
+ *rbuf = driver_alloc(2*sizeof(Uint32));
+ }
+ memcpy(*rbuf,resbuff,2*sizeof(Uint32));
+ return 2*sizeof(Uint32);
+}
+
+static ErlDrvData fd_start(ErlDrvPort port_num, char* name,
+ SysDriverOpts* opts)
+{
+ ErlDrvData res;
+
+ CHLD_STAT_LOCK;
+ if (opts->read_write & DO_READ) {
+ init_fd_data(opts->ifd, port_num);
+ }
+ if (opts->read_write & DO_WRITE) {
+ init_fd_data(opts->ofd, port_num);
+ }
+ res = set_driver_data(port_num, opts->ifd, opts->ofd,
+ opts->packet_bytes,
+ opts->read_write, 0, -1);
+ CHLD_STAT_UNLOCK;
+ return res;
+}
+
+static void clear_fd_data(int fd)
+{
+ if (fd_data[fd].sz > 0) {
+ erts_free(ERTS_ALC_T_FD_ENTRY_BUF, (void *) fd_data[fd].buf);
+ ASSERT(erts_smp_atomic_read_nob(&sys_misc_mem_sz) >= fd_data[fd].sz);
+ erts_smp_atomic_add_nob(&sys_misc_mem_sz, -1*fd_data[fd].sz);
+ }
+ fd_data[fd].buf = NULL;
+ fd_data[fd].sz = 0;
+ fd_data[fd].remain = 0;
+ fd_data[fd].cpos = NULL;
+ fd_data[fd].psz = 0;
+}
+
+static void nbio_stop_fd(ErlDrvPort prt, ErlDrvEvent ev)
+{
+ int *fd;
+ driver_select(prt,ev,DO_READ|DO_WRITE,0);
+ erl_drv_ose_event_fetch(ev, NULL, NULL, (void **)&fd);
+ clear_fd_data(*fd);
+ SET_BLOCKING(*fd);
+}
+
+static void fd_stop(ErlDrvData drv_data) /* Does not close the fds */
+{
+ struct driver_data *data = (struct driver_data *)drv_data;
+
+ if (data->ofd != -1) {
+ if (data->ifd != data->ofd) { /* read and write */
+ nbio_stop_fd(data->port_num, data->input_event);
+ nbio_stop_fd(data->port_num, data->output_event);
+ }
+ else { /* write only */
+ nbio_stop_fd(data->port_num, data->output_event);
+ }
+ }
+ else { /* read only */
+ nbio_stop_fd(data->port_num, data->input_event);
+ }
+}
+
+
+static void erl_stop(ErlDrvData drv_data)
+{
+ struct driver_data *data = (struct driver_data *)drv_data;
+
+ CHLD_STAT_LOCK;
+ data->pid = -1;
+ CHLD_STAT_UNLOCK;
+
+ if (data->ofd != -1) {
+ if (data->ifd != data->ofd) { /* read and write */
+ nbio_stop_fd(data->port_num, data->input_event);
+ nbio_stop_fd(data->port_num, data->output_event);
+ }
+ else { /* write only */
+ nbio_stop_fd(data->port_num, data->output_event);
+ }
+ }
+ else { /* read only */
+ nbio_stop_fd(data->port_num, data->input_event);
+ }
+ close(data->ifd);
+ close(data->ofd);
+}
+
+/* The parameter e is a pointer to the driver_data structure
+ * related to the fd to be used as output */
+static void output(ErlDrvData drv_data, char* buf, ErlDrvSizeT len)
+{
+ ErlDrvSizeT sz;
+ char lb[4];
+ char* lbp;
+ struct driver_data *data = (struct driver_data *)drv_data;
+
+ if (((data->packet_bytes == 2) &&
+ (len > 0xffff)) || (data->packet_bytes == 1 && len > 0xff)) {
+ driver_failure_posix(data->port_num, EINVAL);
+ return; /* -1; */
+ }
+ put_int32(len, lb);
+ lbp = lb + (4-(data->packet_bytes));
+
+ if ((sz = driver_sizeq(data->port_num)) > 0) {
+ if (data->packet_bytes != 0) {
+ driver_enq(data->port_num, lbp, data->packet_bytes);
+ }
+ driver_enq(data->port_num, buf, len);
+
+ if (sz + len + data->packet_bytes >= (1 << 13))
+ set_busy_port(data->port_num, 1);
+ }
+ else {
+ char *pbbuf;
+ if (data->packet_bytes != 0) {
+ pbbuf = malloc(len + data->packet_bytes);
+ int i;
+ for (i = 0; i < data->packet_bytes; i++) {
+ *pbbuf++ = *lbp++;
+ }
+ strncpy(pbbuf, buf, len);
+ pbbuf -= data->packet_bytes;
+ }
+ driver_select(data->port_num, data->output_event,
+ ERL_DRV_WRITE|ERL_DRV_USE, 1);
+ WRITE_AIO(data->ofd,
+ (data->packet_bytes ? len+data->packet_bytes : len),
+ (data->packet_bytes ? pbbuf : buf));
+ if (data->packet_bytes != 0) free(pbbuf);
+ }
+ return; /* 0; */
+}
+
+/* This function is being run when we in recieve
+ * either a read of 0 bytes, or the attach signal from a dying
+ * spawned load module */
+static int port_inp_failure(ErlDrvPort port_num, ErlDrvEvent ready_fd, int res)
+ /* Result: 0 (eof) or -1 (error) */
+{
+ int *fd;
+ SIGSELECT sig_no;
+ ASSERT(res <= 0);
+
+ erl_drv_ose_event_fetch(ready_fd,&sig_no, NULL, (void **)&fd);
+ /* As we need to handle two signals, we do this in two steps */
+ if (driver_data[*fd].alive) {
+ report_exit_status(driver_data[*fd].report_exit, 0); /* status? */
+ }
+ else {
+ driver_select(port_num,ready_fd,DO_READ|DO_WRITE,0);
+ clear_fd_data(*fd);
+ driver_report_exit(driver_data[*fd].port_num, driver_data[*fd].status);
+ /* As we do not really know if the spawn has crashed or exited nicely
+ * we do not check the result status of the following call.. FIXME
+ * can we handle this in a better way? */
+ ose_pm_uninstall_load_module(driver_data[*fd].install_handle);
+ driver_free(driver_data[*fd].install_handle);
+ driver_free((void *)driver_data[*fd].aiocb.aio_buf);
+
+ close(*fd);
+ }
+
+ return 0;
+}
+
+/* The parameter e is a pointer to the driver_data structure
+ * related to the fd to be used as output.
+ * ready_fd is the event that triggered this call to ready_input */
+static void ready_input(ErlDrvData drv_data, ErlDrvEvent ready_fd)
+{
+ int res;
+ Uint h;
+ char *buf;
+ union SIGNAL *sig;
+ struct driver_data *data = (struct driver_data *)drv_data;
+
+ sig = erl_drv_ose_get_signal(ready_fd);
+ ASSERT(sig);
+
+
+ while (sig) {
+ /* If we've recieved an attach signal, we need to handle
+ * it in port_inp_failure */
+ if (sig->sig_no == ERTS_SIGNAL_OSE_DRV_ATTACH) {
+ port_inp_failure(data->port_num, ready_fd, 0);
+ }
+ else {
+ res = sig->fm_read_reply.actual;
+ if (res == 0) {
+ port_inp_failure(data->port_num, ready_fd, res);
+ break;
+ }
+
+ if (data->packet_bytes == 0) {
+ if (res < 0) {
+ if ((errno != EINTR) && (errno != ERRNO_BLOCK)) {
+ port_inp_failure(data->port_num, ready_fd, res);
+ }
+ }
+ else if (res == 0) {
+ /* read of 0 bytes, eof, otherside of pipe is assumed dead */
+ port_inp_failure(data->port_num, ready_fd, res);
+ break;
+ }
+ else {
+ buf = driver_alloc(res);
+ memcpy(buf, (void *)data->aiocb.aio_buf, res);
+ driver_select(data->port_num, data->output_event,
+ ERL_DRV_WRITE|ERL_DRV_USE, 1);
+ driver_output(data->port_num, (char*) buf, res);
+ driver_free(buf);
+ }
+ /* clear the previous read */
+ memset(data->aiocb.aio_buf, 0, res);
+
+ /* issue a new read */
+ DISPATCH_AIO(sig);
+ aio_read(&data->aiocb);
+ }
+ else if (data->packet_bytes && fd_data[data->ifd].remain > 0) {
+ /* we've read a partial package, or a header */
+
+ if (res == fd_data[data->ifd].remain) { /* we are done! */
+ char *buf = data->aiocb.aio_buf;
+ int i;
+
+ /* do we have anything buffered? */
+ if (fd_data[data->ifd].buf != NULL) {
+ memcpy(fd_data[data->ifd].buf + fd_data[data->ifd].sz,
+ buf, res);
+ buf = fd_data[data->ifd].buf;
+ }
+
+ fd_data[data->ifd].sz += res;
+ driver_output(data->port_num, buf, (fd_data[data->ifd].sz>0?fd_data[data->ifd].sz:res));
+ clear_fd_data(data->ifd);
+
+ /* clear the previous read */
+ memset(data->aiocb.aio_buf, 0, res);
+
+ /* issue a new read */
+ DISPATCH_AIO(sig);
+ data->aiocb.aio_nbytes = data->packet_bytes;
+
+ if (data->aiocb.aio_buf == NULL) {
+ port_inp_failure(data->port_num, ready_fd, -1);
+ }
+ aio_read(&data->aiocb);
+ }
+ else if(res < fd_data[data->ifd].remain) { /* received part of a package */
+ if (fd_data[data->ifd].sz == 0) {
+
+ fd_data[data->ifd].sz += res;
+ memcpy(fd_data[data->ifd].buf, data->aiocb.aio_buf, res);
+ fd_data[data->ifd].remain -= res;
+ }
+ else {
+ memcpy(fd_data[data->ifd].buf + fd_data[data->ifd].sz,
+ data->aiocb.aio_buf, res);
+ fd_data[data->ifd].sz += res;
+ fd_data[data->ifd].remain -= res;
+ }
+ /* clear the previous read */
+ memset(data->aiocb.aio_buf, 0, res);
+
+ /* issue a new read */
+ DISPATCH_AIO(sig);
+ data->aiocb.aio_nbytes = fd_data[data->ifd].remain;
+
+ if (data->aiocb.aio_buf == NULL) {
+ port_inp_failure(data->port_num, ready_fd, -1);
+ }
+ aio_read(&data->aiocb);
+ }
+ }
+ else if (data->packet_bytes && fd_data[data->ifd].remain == 0) { /* we've recieved a header */
+
+ /* analyze the header FIXME */
+ switch (data->packet_bytes) {
+ case 1: h = get_int8(data->aiocb.aio_buf); break;
+ case 2: h = get_int16(data->aiocb.aio_buf); break;
+ case 4: h = get_int32(data->aiocb.aio_buf); break;
+ }
+
+ fd_data[data->ifd].buf = erts_alloc_fnf(ERTS_ALC_T_FD_ENTRY_BUF, h + data->packet_bytes);
+ fd_data[data->ifd].remain = ((h + data->packet_bytes) - res);
+
+ /* clear the previous read */
+ memset(data->aiocb.aio_buf, 0, data->packet_bytes);
+
+ /* issue a new read */
+ DISPATCH_AIO(sig);
+ data->aiocb.aio_nbytes = h;
+
+ if (data->aiocb.aio_buf == NULL) {
+ port_inp_failure(data->port_num, ready_fd, -1);
+ }
+ aio_read(&data->aiocb);
+ }
+ }
+ sig = erl_drv_ose_get_signal(ready_fd);
+ }
+}
+
+
+/* The parameter e is a pointer to the driver_data structure
+ * related to the fd to be used as output.
+ * ready_fd is the event that triggered this call to ready_input */
+static void ready_output(ErlDrvData drv_data, ErlDrvEvent ready_fd)
+{
+ SysIOVec *iov;
+ int vlen;
+ int res;
+ union SIGNAL *sig;
+ struct driver_data *data = (struct driver_data *)drv_data;
+
+ sig = erl_drv_ose_get_signal(ready_fd);
+ ASSERT(sig);
+
+ while (sig != NULL) {
+ if (sig->fm_write_reply.actual <= 0) {
+ int status;
+
+ status = efs_status_to_errno(sig->fm_write_reply.status);
+ driver_select(data->port_num, ready_fd, ERL_DRV_WRITE, 0);
+ DISPATCH_AIO(sig);
+ FREE_AIO(sig->fm_write_reply.buffer);
+
+ driver_failure_posix(data->port_num, status);
+ }
+ else { /* written bytes > 0 */
+ iov = driver_peekq(data->port_num, &vlen);
+ if (vlen > 0) {
+ DISPATCH_AIO(sig);
+ FREE_AIO(sig->fm_write_reply.buffer);
+ res = driver_deq(data->port_num, iov[0].iov_len);
+ if (res > 0) {
+ iov = driver_peekq(data->port_num, &vlen);
+ WRITE_AIO(data->ofd, iov[0].iov_len, iov[0].iov_base);
+ }
+ }
+ else if (vlen == 0) {
+ DISPATCH_AIO(sig);
+ FREE_AIO(sig->fm_write_reply.buffer);
+ }
+
+ }
+ sig = erl_drv_ose_get_signal(ready_fd);
+ }
+}
+
+static void stop_select(ErlDrvEvent ready_fd, void* _)
+{
+ int *fd;
+ erl_drv_ose_event_fetch(ready_fd, NULL, NULL, (void **)&fd);
+ erl_drv_ose_event_free(ready_fd);
+ close(*fd);
+}
+
+
+void erts_do_break_handling(void)
+{
+ struct termios temp_mode;
+ int saved = 0;
+
+ /*
+ * Most functions that do_break() calls are intentionally not thread safe;
+ * therefore, make sure that all threads but this one are blocked before
+ * proceeding!
+ */
+ erts_smp_thr_progress_block();
+
+ /* during break we revert to initial settings */
+ /* this is done differently for oldshell */
+ if (using_oldshell && !replace_intr) {
+ SET_BLOCKING(1);
+ }
+ else if (isatty(0)) {
+ tcgetattr(0,&temp_mode);
+ tcsetattr(0,TCSANOW,&initial_tty_mode);
+ saved = 1;
+ }
+
+ /* call the break handling function, reset the flag */
+ do_break();
+
+ fflush(stdout);
+
+ /* after break we go back to saved settings */
+ if (using_oldshell && !replace_intr) {
+ SET_NONBLOCKING(1);
+ }
+ else if (saved) {
+ tcsetattr(0,TCSANOW,&temp_mode);
+ }
+
+ erts_smp_thr_progress_unblock();
+}
+
+static pid_t
+getpid(void)
+{
+ return get_bid(current_process());
+}
+
+int getpagesize(void)
+{
+ return 1024;
+}
+
+
+/* Fills in the systems representation of the jam/beam process identifier.
+** The Pid is put in STRING representation in the supplied buffer,
+** no interpretatione of this should be done by the rest of the
+** emulator. The buffer should be at least 21 bytes long.
+*/
+void sys_get_pid(char *buffer, size_t buffer_size){
+ pid_t p = getpid();
+ /* Assume the pid is scalar and can rest in an unsigned long... */
+ erts_snprintf(buffer, buffer_size, "%lu",(unsigned long) p);
+}
+
+int
+erts_sys_putenv_raw(char *key, char *value) {
+ return erts_sys_putenv(key, value);
+}
+int
+erts_sys_putenv(char *key, char *value)
+{
+ int res;
+
+ erts_smp_rwmtx_rwlock(&environ_rwmtx);
+ res = set_env(get_bid(current_process()), key,
+ value);
+ erts_smp_rwmtx_rwunlock(&environ_rwmtx);
+ return res;
+}
+
+
+int
+erts_sys_unsetenv(char *key)
+{
+ int res;
+
+ erts_smp_rwmtx_rwlock(&environ_rwmtx);
+ res = set_env(get_bid(current_process()),key,NULL);
+ erts_smp_rwmtx_rwunlock(&environ_rwmtx);
+
+ return res;
+}
+
+int
+erts_sys_getenv__(char *key, char *value, size_t *size)
+{
+ int res;
+ char *orig_value = get_env(get_bid(current_process()), key);
+ if (!orig_value)
+ res = -1;
+ else {
+ size_t len = sys_strlen(orig_value);
+ if (len >= *size) {
+ *size = len + 1;
+ res = 1;
+ }
+ else {
+ *size = len;
+ sys_memcpy((void *) value, (void *) orig_value, len+1);
+ res = 0;
+ }
+ free_buf((union SIGNAL **)&orig_value);
+ }
+ return res;
+}
+
+int
+erts_sys_getenv_raw(char *key, char *value, size_t *size) {
+ return erts_sys_getenv(key, value, size);
+}
+
+/*
+ * erts_sys_getenv
+ * returns:
+ * -1, if environment key is not set with a value
+ * 0, if environment key is set and value fits into buffer res
+ * 1, if environment key is set but does not fit into buffer res
+ * res is set with the needed buffer res value
+ */
+
+int
+erts_sys_getenv(char *key, char *value, size_t *size)
+{
+ int res;
+ erts_smp_rwmtx_rlock(&environ_rwmtx);
+ res = erts_sys_getenv__(key, value, size);
+ erts_smp_rwmtx_runlock(&environ_rwmtx);
+ return res;
+}
+
+void
+sys_init_io(void)
+{
+ fd_data = (struct fd_data *)
+ erts_alloc(ERTS_ALC_T_FD_TAB, max_files * sizeof(struct fd_data));
+ erts_smp_atomic_add_nob(&sys_misc_mem_sz,
+ max_files * sizeof(struct fd_data));
+}
+
+extern const char pre_loaded_code[];
+extern Preload pre_loaded[];
+
+void erts_sys_alloc_init(void)
+{
+}
+
+void *erts_sys_alloc(ErtsAlcType_t t, void *x, Uint sz)
+{
+ void *res = malloc((size_t) sz);
+#if HAVE_ERTS_MSEG
+ if (!res) {
+ erts_mseg_clear_cache();
+ return malloc((size_t) sz);
+ }
+#endif
+ return res;
+}
+
+void *erts_sys_realloc(ErtsAlcType_t t, void *x, void *p, Uint sz)
+{
+ void *res = realloc(p, (size_t) sz);
+#if HAVE_ERTS_MSEG
+ if (!res) {
+ erts_mseg_clear_cache();
+ return realloc(p, (size_t) sz);
+ }
+#endif
+ return res;
+}
+
+void erts_sys_free(ErtsAlcType_t t, void *x, void *p)
+{
+ free(p);
+}
+
+/* Return a pointer to a vector of names of preloaded modules */
+
+Preload*
+sys_preloaded(void)
+{
+ return pre_loaded;
+}
+
+/* Return a pointer to preloaded code for module "module" */
+unsigned char*
+sys_preload_begin(Preload* p)
+{
+ return p->code;
+}
+
+/* Clean up if allocated */
+void sys_preload_end(Preload* p)
+{
+ /* Nothing */
+}
+
+/* Read a key from console (?) */
+
+int sys_get_key(fd)
+int fd;
+{
+ int c;
+ unsigned char rbuf[64];
+
+ fflush(stdout); /* Flush query ??? */
+
+ if ((c = read(fd,rbuf,64)) <= 0) {
+ return c;
+ }
+
+ return rbuf[0];
+}
+
+
+#ifdef DEBUG
+
+extern int erts_initialized;
+void
+erl_assert_error(const char* expr, const char* func,
+ const char* file, int line)
+{
+ fflush(stdout);
+ fprintf(stderr, "%s:%d:%s() Assertion failed: %s\n",
+ file, line, func, expr);
+ fflush(stderr);
+ ramlog_printf("%s:%d:%s() Assertion failed: %s\n",
+ file, line, func, expr);
+
+ abort();
+}
+
+void
+erl_debug(char* fmt, ...)
+{
+ char sbuf[1024]; /* Temporary buffer. */
+ va_list va;
+
+ if (debug_log) {
+ va_start(va, fmt);
+ vsprintf(sbuf, fmt, va);
+ va_end(va);
+ fprintf(stderr, "%s", sbuf);
+ }
+}
+
+#endif /* DEBUG */
+
+static ERTS_INLINE void
+report_exit_status(ErtsSysReportExit *rep, int status)
+{
+ if (rep->ifd >= 0) {
+ driver_data[rep->ifd].alive = 0;
+ driver_data[rep->ifd].status = status;
+ }
+ if (rep->ofd >= 0) {
+ driver_data[rep->ofd].alive = 0;
+ driver_data[rep->ofd].status = status;
+ }
+
+ erts_free(ERTS_ALC_T_PRT_REP_EXIT, rep);
+}
+
+#define ERTS_REPORT_EXIT_STATUS report_exit_status
+
+/*
+ * Called from schedule() when it runs out of runnable processes,
+ * or when Erlang code has performed INPUT_REDUCTIONS reduction
+ * steps. runnable == 0 iff there are no runnable Erlang processes.
+ */
+void
+erl_sys_schedule(int runnable)
+{
+ ASSERT(get_fsem(current_process()) == 0);
+#ifdef ERTS_SMP
+ ASSERT(erts_get_scheduler_data()->no == 1);
+ ERTS_CHK_IO(!runnable);
+#else
+ ERTS_CHK_IO( 1 );
+#endif
+ ASSERT(get_fsem(current_process()) == 0);
+ ERTS_SMP_LC_ASSERT(!erts_thr_progress_is_blocking());
+}
+
+
+#ifdef ERTS_SMP
+
+void
+erts_sys_main_thread(void)
+{
+ erts_thread_disable_fpe();
+
+ /* Become signal receiver thread... */
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ erts_lc_set_thread_name("signal_receiver");
+#endif
+
+ while (1) {
+ static const SIGSELECT sigsel[] = {0};
+ union SIGNAL *msg = receive(sigsel);
+
+ fprintf(stderr,"Main thread got message %d from 0x%x!!\r\n",
+ msg->sig_no, sender(&msg));
+ free_buf(&msg);
+ }
+}
+
+#endif /* ERTS_SMP */
+
+void
+erl_sys_args(int* argc, char** argv)
+{
+ int i, j;
+
+ erts_smp_rwmtx_init(&environ_rwmtx, "environ");
+
+ init_check_io();
+
+ /* Handled arguments have been marked with NULL. Slide arguments
+ not handled towards the beginning of argv. */
+ for (i = 0, j = 0; i < *argc; i++) {
+ if (argv[i])
+ argv[j++] = argv[i];
+ }
+ *argc = j;
+
+}
diff --git a/erts/emulator/sys/ose/sys_float.c b/erts/emulator/sys/ose/sys_float.c
new file mode 100644
index 0000000000..d9d6bb7c04
--- /dev/null
+++ b/erts/emulator/sys/ose/sys_float.c
@@ -0,0 +1,844 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "sys.h"
+#include "global.h"
+#include "erl_process.h"
+
+
+#ifdef NO_FPE_SIGNALS
+
+void
+erts_sys_init_float(void)
+{
+# ifdef SIGFPE
+ sys_sigset(SIGFPE, SIG_IGN); /* Ignore so we can test for NaN and Inf */
+# endif
+}
+
+#else /* !NO_FPE_SIGNALS */
+
+#ifdef ERTS_SMP
+static erts_tsd_key_t fpe_key;
+
+/* once-only initialisation early in the main thread (via erts_sys_init_float()) */
+static void erts_init_fp_exception(void)
+{
+ /* XXX: the wrappers prevent using a pthread destructor to
+ deallocate the key's value; so when/where do we do that? */
+ erts_tsd_key_create(&fpe_key);
+}
+
+void erts_thread_init_fp_exception(void)
+{
+ unsigned long *fpe = erts_alloc(ERTS_ALC_T_FP_EXCEPTION, sizeof(*fpe));
+ *fpe = 0L;
+ erts_tsd_set(fpe_key, fpe);
+}
+
+static ERTS_INLINE volatile unsigned long *erts_thread_get_fp_exception(void)
+{
+ return (volatile unsigned long*)erts_tsd_get(fpe_key);
+}
+#else /* !SMP */
+#define erts_init_fp_exception() /*empty*/
+static volatile unsigned long fp_exception;
+#define erts_thread_get_fp_exception() (&fp_exception)
+#endif /* SMP */
+
+volatile unsigned long *erts_get_current_fp_exception(void)
+{
+ Process *c_p;
+
+ c_p = erts_get_current_process();
+ if (c_p)
+ return &c_p->fp_exception;
+ return erts_thread_get_fp_exception();
+}
+
+static void set_current_fp_exception(unsigned long pc)
+{
+ volatile unsigned long *fpexnp = erts_get_current_fp_exception();
+ ASSERT(fpexnp != NULL);
+ *fpexnp = pc;
+}
+
+void erts_fp_check_init_error(volatile unsigned long *fpexnp)
+{
+ char buf[64];
+ snprintf(buf, sizeof buf, "ERTS_FP_CHECK_INIT at %p: detected unhandled FPE at %p\r\n",
+ __builtin_return_address(0), (void*)*fpexnp);
+ if (write(2, buf, strlen(buf)) <= 0)
+ erl_exit(ERTS_ABORT_EXIT, "%s", buf);
+ *fpexnp = 0;
+#if defined(__i386__) || defined(__x86_64__)
+ erts_restore_fpu();
+#endif
+}
+
+/* Is there no standard identifier for Darwin/MacOSX ? */
+#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
+#define __DARWIN__ 1
+#endif
+
+#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
+
+static void unmask_x87(void)
+{
+ unsigned short cw;
+
+ __asm__ __volatile__("fstcw %0" : "=m"(cw));
+ cw &= ~(0x01|0x04|0x08); /* unmask IM, ZM, OM */
+ __asm__ __volatile__("fldcw %0" : : "m"(cw));
+}
+
+/* mask x87 FPE, return true if the previous state was unmasked */
+static int mask_x87(void)
+{
+ unsigned short cw;
+ int unmasked;
+
+ __asm__ __volatile__("fstcw %0" : "=m"(cw));
+ unmasked = (cw & (0x01|0x04|0x08)) == 0;
+ /* or just set cw = 0x37f */
+ cw |= (0x01|0x04|0x08); /* mask IM, ZM, OM */
+ __asm__ __volatile__("fldcw %0" : : "m"(cw));
+ return unmasked;
+}
+
+static void unmask_sse2(void)
+{
+ unsigned int mxcsr;
+
+ __asm__ __volatile__("stmxcsr %0" : "=m"(mxcsr));
+ mxcsr &= ~(0x003F|0x0680); /* clear exn flags, unmask OM, ZM, IM (not PM, UM, DM) */
+ __asm__ __volatile__("ldmxcsr %0" : : "m"(mxcsr));
+}
+
+/* mask SSE2 FPE, return true if the previous state was unmasked */
+static int mask_sse2(void)
+{
+ unsigned int mxcsr;
+ int unmasked;
+
+ __asm__ __volatile__("stmxcsr %0" : "=m"(mxcsr));
+ unmasked = (mxcsr & 0x0680) == 0;
+ /* or just set mxcsr = 0x1f80 */
+ mxcsr &= ~0x003F; /* clear exn flags */
+ mxcsr |= 0x0680; /* mask OM, ZM, IM (not PM, UM, DM) */
+ __asm__ __volatile__("ldmxcsr %0" : : "m"(mxcsr));
+ return unmasked;
+}
+
+#if defined(__x86_64__)
+
+static inline int cpu_has_sse2(void) { return 1; }
+
+#else /* !__x86_64__ */
+
+/*
+ * Check if an x86-32 processor has SSE2.
+ */
+static unsigned int xor_eflags(unsigned int mask)
+{
+ unsigned int eax, edx;
+
+ eax = mask; /* eax = mask */
+ __asm__("pushfl\n\t"
+ "popl %0\n\t" /* edx = original EFLAGS */
+ "xorl %0, %1\n\t" /* eax = mask ^ EFLAGS */
+ "pushl %1\n\t"
+ "popfl\n\t" /* new EFLAGS = mask ^ original EFLAGS */
+ "pushfl\n\t"
+ "popl %1\n\t" /* eax = new EFLAGS */
+ "xorl %0, %1\n\t" /* eax = new EFLAGS ^ old EFLAGS */
+ "pushl %0\n\t"
+ "popfl" /* restore original EFLAGS */
+ : "=d"(edx), "=a"(eax)
+ : "1"(eax));
+ return eax;
+}
+
+static __inline__ unsigned int cpuid_eax(unsigned int op)
+{
+ unsigned int eax, save_ebx;
+
+ /* In PIC mode i386 reserves EBX. So we must save
+ and restore it ourselves to not upset gcc. */
+ __asm__(
+ "movl %%ebx, %1\n\t"
+ "cpuid\n\t"
+ "movl %1, %%ebx"
+ : "=a"(eax), "=m"(save_ebx)
+ : "0"(op)
+ : "cx", "dx");
+ return eax;
+}
+
+static __inline__ unsigned int cpuid_edx(unsigned int op)
+{
+ unsigned int eax, edx, save_ebx;
+
+ /* In PIC mode i386 reserves EBX. So we must save
+ and restore it ourselves to not upset gcc. */
+ __asm__(
+ "movl %%ebx, %2\n\t"
+ "cpuid\n\t"
+ "movl %2, %%ebx"
+ : "=a"(eax), "=d"(edx), "=m"(save_ebx)
+ : "0"(op)
+ : "cx");
+ return edx;
+}
+
+/* The AC bit, bit #18, is a new bit introduced in the EFLAGS
+ * register on the Intel486 processor to generate alignment
+ * faults. This bit cannot be set on the Intel386 processor.
+ */
+static __inline__ int is_386(void)
+{
+ return ((xor_eflags(1<<18) >> 18) & 1) == 0;
+}
+
+/* Newer x86 processors have a CPUID instruction, as indicated by
+ * the ID bit (#21) in EFLAGS being modifiable.
+ */
+static __inline__ int has_CPUID(void)
+{
+ return (xor_eflags(1<<21) >> 21) & 1;
+}
+
+static int cpu_has_sse2(void)
+{
+ unsigned int maxlev, features;
+ static int has_sse2 = -1;
+
+ if (has_sse2 >= 0)
+ return has_sse2;
+ has_sse2 = 0;
+
+ if (is_386())
+ return 0;
+ if (!has_CPUID())
+ return 0;
+ maxlev = cpuid_eax(0);
+ /* Intel A-step Pentium had a preliminary version of CPUID.
+ It also didn't have SSE2. */
+ if ((maxlev & 0xFFFFFF00) == 0x0500)
+ return 0;
+ /* If max level is zero then CPUID cannot report any features. */
+ if (maxlev == 0)
+ return 0;
+ features = cpuid_edx(1);
+ has_sse2 = (features & (1 << 26)) != 0;
+
+ return has_sse2;
+}
+#endif /* !__x86_64__ */
+
+static void unmask_fpe(void)
+{
+ __asm__ __volatile__("fnclex");
+ unmask_x87();
+ if (cpu_has_sse2())
+ unmask_sse2();
+}
+
+static void unmask_fpe_conditional(int unmasked)
+{
+ if (unmasked)
+ unmask_fpe();
+}
+
+/* mask x86 FPE, return true if the previous state was unmasked */
+static int mask_fpe(void)
+{
+ int unmasked;
+
+ unmasked = mask_x87();
+ if (cpu_has_sse2())
+ unmasked |= mask_sse2();
+ return unmasked;
+}
+
+void erts_restore_fpu(void)
+{
+ __asm__ __volatile__("fninit");
+ unmask_x87();
+ if (cpu_has_sse2())
+ unmask_sse2();
+}
+
+#elif defined(__sparc__) && defined(__linux__)
+
+#if defined(__arch64__)
+#define LDX "ldx"
+#define STX "stx"
+#else
+#define LDX "ld"
+#define STX "st"
+#endif
+
+static void unmask_fpe(void)
+{
+ unsigned long fsr;
+
+ __asm__(STX " %%fsr, %0" : "=m"(fsr));
+ fsr &= ~(0x1FUL << 23); /* clear FSR[TEM] field */
+ fsr |= (0x1AUL << 23); /* enable NV, OF, DZ exceptions */
+ __asm__ __volatile__(LDX " %0, %%fsr" : : "m"(fsr));
+}
+
+static void unmask_fpe_conditional(int unmasked)
+{
+ if (unmasked)
+ unmask_fpe();
+}
+
+/* mask SPARC FPE, return true if the previous state was unmasked */
+static int mask_fpe(void)
+{
+ unsigned long fsr;
+ int unmasked;
+
+ __asm__(STX " %%fsr, %0" : "=m"(fsr));
+ unmasked = ((fsr >> 23) & 0x1A) == 0x1A;
+ fsr &= ~(0x1FUL << 23); /* clear FSR[TEM] field */
+ __asm__ __volatile__(LDX " %0, %%fsr" : : "m"(fsr));
+ return unmasked;
+}
+
+#elif (defined(__powerpc__) && defined(__linux__)) || (defined(__ppc__) && defined(__DARWIN__))
+
+#if defined(__linux__)
+#include <sys/prctl.h>
+
+static void set_fpexc_precise(void)
+{
+ if (prctl(PR_SET_FPEXC, PR_FP_EXC_PRECISE) < 0) {
+ perror("PR_SET_FPEXC");
+ exit(1);
+ }
+}
+
+#elif defined(__DARWIN__)
+
+#include <mach/mach.h>
+#include <pthread.h>
+
+/*
+ * FE0 FE1 MSR bits
+ * 0 0 floating-point exceptions disabled
+ * 0 1 floating-point imprecise nonrecoverable
+ * 1 0 floating-point imprecise recoverable
+ * 1 1 floating-point precise mode
+ *
+ * Apparently:
+ * - Darwin 5.5 (MacOS X <= 10.1) starts with FE0 == FE1 == 0,
+ * and resets FE0 and FE1 to 0 after each SIGFPE.
+ * - Darwin 6.0 (MacOS X 10.2) starts with FE0 == FE1 == 1,
+ * and does not reset FE0 or FE1 after a SIGFPE.
+ */
+#define FE0_MASK (1<<11)
+#define FE1_MASK (1<<8)
+
+/* a thread cannot get or set its own MSR bits */
+static void *fpu_fpe_enable(void *arg)
+{
+ thread_t t = *(thread_t*)arg;
+ struct ppc_thread_state state;
+ unsigned int state_size = PPC_THREAD_STATE_COUNT;
+
+ if (thread_get_state(t, PPC_THREAD_STATE, (natural_t*)&state, &state_size) != KERN_SUCCESS) {
+ perror("thread_get_state");
+ exit(1);
+ }
+ if ((state.srr1 & (FE1_MASK|FE0_MASK)) != (FE1_MASK|FE0_MASK)) {
+#if 1
+ /* This would also have to be performed in the SIGFPE handler
+ to work around the MSR reset older Darwin releases do. */
+ state.srr1 |= (FE1_MASK|FE0_MASK);
+ thread_set_state(t, PPC_THREAD_STATE, (natural_t*)&state, state_size);
+#else
+ fprintf(stderr, "srr1 == 0x%08x, your Darwin is too old\n", state.srr1);
+ exit(1);
+#endif
+ }
+ return NULL; /* Ok, we appear to be on Darwin 6.0 or later */
+}
+
+static void set_fpexc_precise(void)
+{
+ thread_t self = mach_thread_self();
+ pthread_t enabler;
+
+ if (pthread_create(&enabler, NULL, fpu_fpe_enable, &self)) {
+ perror("pthread_create");
+ } else if (pthread_join(enabler, NULL)) {
+ perror("pthread_join");
+ }
+}
+
+#endif
+
+static void set_fpscr(unsigned int fpscr)
+{
+ union {
+ double d;
+ unsigned int fpscr[2];
+ } u;
+
+ u.fpscr[0] = 0xFFF80000;
+ u.fpscr[1] = fpscr;
+ __asm__ __volatile__("mtfsf 255,%0" : : "f"(u.d));
+}
+
+static unsigned int get_fpscr(void)
+{
+ union {
+ double d;
+ unsigned int fpscr[2];
+ } u;
+
+ __asm__("mffs %0" : "=f"(u.d));
+ return u.fpscr[1];
+}
+
+static void unmask_fpe(void)
+{
+ set_fpexc_precise();
+ set_fpscr(0x80|0x40|0x10); /* VE, OE, ZE; not UE or XE */
+}
+
+static void unmask_fpe_conditional(int unmasked)
+{
+ if (unmasked)
+ unmask_fpe();
+}
+
+/* mask PowerPC FPE, return true if the previous state was unmasked */
+static int mask_fpe(void)
+{
+ int unmasked;
+
+ unmasked = (get_fpscr() & (0x80|0x40|0x10)) == (0x80|0x40|0x10);
+ set_fpscr(0x00);
+ return unmasked;
+}
+
+#else
+
+static void unmask_fpe(void)
+{
+ fpsetmask(FP_X_INV | FP_X_OFL | FP_X_DZ);
+}
+
+static void unmask_fpe_conditional(int unmasked)
+{
+ if (unmasked)
+ unmask_fpe();
+}
+
+/* mask IEEE FPE, return true if previous state was unmasked */
+static int mask_fpe(void)
+{
+ const fp_except unmasked_mask = FP_X_INV | FP_X_OFL | FP_X_DZ;
+ fp_except old_mask;
+
+ old_mask = fpsetmask(0);
+ return (old_mask & unmasked_mask) == unmasked_mask;
+}
+
+#endif
+
+#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))) || (defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__x86_64__) || defined(__i386__))) || ((defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__x86_64__)) || (defined(__sun__) && defined(__x86_64__))
+
+#if defined(__linux__) && defined(__i386__)
+#if !defined(X86_FXSR_MAGIC)
+#define X86_FXSR_MAGIC 0x0000
+#endif
+#elif defined(__FreeBSD__) && defined(__x86_64__)
+#include <sys/types.h>
+#include <machine/fpu.h>
+#elif defined(__FreeBSD__) && defined(__i386__)
+#include <sys/types.h>
+#include <machine/npx.h>
+#elif defined(__DARWIN__)
+#include <machine/signal.h>
+#elif defined(__OpenBSD__) && defined(__x86_64__)
+#include <sys/types.h>
+#include <machine/fpu.h>
+#endif
+#if !(defined(__OpenBSD__) && defined(__x86_64__))
+#include <ucontext.h>
+#endif
+#include <string.h>
+
+#if defined(__linux__) && defined(__x86_64__)
+#define mc_pc(mc) ((mc)->gregs[REG_RIP])
+#elif defined(__linux__) && defined(__i386__)
+#define mc_pc(mc) ((mc)->gregs[REG_EIP])
+#elif defined(__DARWIN__) && defined(__i386__)
+#ifdef DARWIN_MODERN_MCONTEXT
+#define mc_pc(mc) ((mc)->__ss.__eip)
+#else
+#define mc_pc(mc) ((mc)->ss.eip)
+#endif
+#elif defined(__DARWIN__) && defined(__x86_64__)
+#ifdef DARWIN_MODERN_MCONTEXT
+#define mc_pc(mc) ((mc)->__ss.__rip)
+#else
+#define mc_pc(mc) ((mc)->ss.rip)
+#endif
+#elif defined(__FreeBSD__) && defined(__x86_64__)
+#define mc_pc(mc) ((mc)->mc_rip)
+#elif defined(__FreeBSD__) && defined(__i386__)
+#define mc_pc(mc) ((mc)->mc_eip)
+#elif defined(__NetBSD__) && defined(__x86_64__)
+#define mc_pc(mc) ((mc)->__gregs[_REG_RIP])
+#elif defined(__NetBSD__) && defined(__i386__)
+#define mc_pc(mc) ((mc)->__gregs[_REG_EIP])
+#elif defined(__OpenBSD__) && defined(__x86_64__)
+#define mc_pc(mc) ((mc)->sc_rip)
+#elif defined(__sun__) && defined(__x86_64__)
+#define mc_pc(mc) ((mc)->gregs[REG_RIP])
+#endif
+
+static void fpe_sig_action(int sig, siginfo_t *si, void *puc)
+{
+ ucontext_t *uc = puc;
+ unsigned long pc;
+
+#if defined(__linux__)
+#if defined(__x86_64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ fpregset_t fpstate = mc->fpregs;
+ pc = mc_pc(mc);
+ /* A failed SSE2 instruction will restart. To avoid
+ looping we mask SSE2 exceptions now and unmask them
+ again later in erts_check_fpe()/erts_restore_fpu().
+ On RISCs we update PC to skip the failed instruction,
+ but the ever increasing complexity of the x86 instruction
+ set encoding makes that a poor solution here. */
+ fpstate->mxcsr = 0x1F80;
+ fpstate->swd &= ~0xFF;
+#elif defined(__i386__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ fpregset_t fpstate = mc->fpregs;
+ pc = mc_pc(mc);
+ if ((fpstate->status >> 16) == X86_FXSR_MAGIC)
+ ((struct _fpstate*)fpstate)->mxcsr = 0x1F80;
+ fpstate->sw &= ~0xFF;
+#elif defined(__sparc__) && defined(__arch64__)
+ /* on SPARC the 3rd parameter points to a sigcontext not a ucontext */
+ struct sigcontext *sc = (struct sigcontext*)puc;
+ pc = sc->sigc_regs.tpc;
+ sc->sigc_regs.tpc = sc->sigc_regs.tnpc;
+ sc->sigc_regs.tnpc += 4;
+#elif defined(__sparc__)
+ /* on SPARC the 3rd parameter points to a sigcontext not a ucontext */
+ struct sigcontext *sc = (struct sigcontext*)puc;
+ pc = sc->si_regs.pc;
+ sc->si_regs.pc = sc->si_regs.npc;
+ sc->si_regs.npc = (unsigned long)sc->si_regs.npc + 4;
+#elif defined(__powerpc__)
+#if defined(__powerpc64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ unsigned long *regs = &mc->gp_regs[0];
+#else
+ mcontext_t *mc = uc->uc_mcontext.uc_regs;
+ unsigned long *regs = &mc->gregs[0];
+#endif
+ pc = regs[PT_NIP];
+ regs[PT_NIP] += 4;
+ regs[PT_FPSCR] = 0x80|0x40|0x10; /* VE, OE, ZE; not UE or XE */
+#endif
+#elif defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__))
+#ifdef DARWIN_MODERN_MCONTEXT
+ mcontext_t mc = uc->uc_mcontext;
+ pc = mc_pc(mc);
+ mc->__fs.__fpu_mxcsr = 0x1F80;
+ *(unsigned short *)&mc->__fs.__fpu_fsw &= ~0xFF;
+#else
+ mcontext_t mc = uc->uc_mcontext;
+ pc = mc_pc(mc);
+ mc->fs.fpu_mxcsr = 0x1F80;
+ *(unsigned short *)&mc->fs.fpu_fsw &= ~0xFF;
+#endif /* DARWIN_MODERN_MCONTEXT */
+#elif defined(__DARWIN__) && defined(__ppc__)
+ mcontext_t mc = uc->uc_mcontext;
+ pc = mc->ss.srr0;
+ mc->ss.srr0 += 4;
+ mc->fs.fpscr = 0x80|0x40|0x10;
+#elif defined(__FreeBSD__) && defined(__x86_64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ struct savefpu *savefpu = (struct savefpu*)&mc->mc_fpstate;
+ struct envxmm *envxmm = &savefpu->sv_env;
+ pc = mc_pc(mc);
+ envxmm->en_mxcsr = 0x1F80;
+ envxmm->en_sw &= ~0xFF;
+#elif defined(__FreeBSD__) && defined(__i386__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ union savefpu *savefpu = (union savefpu*)&mc->mc_fpstate;
+ pc = mc_pc(mc);
+ if (mc->mc_fpformat == _MC_FPFMT_XMM) {
+ struct envxmm *envxmm = &savefpu->sv_xmm.sv_env;
+ envxmm->en_mxcsr = 0x1F80;
+ envxmm->en_sw &= ~0xFF;
+ } else {
+ struct env87 *env87 = &savefpu->sv_87.sv_env;
+ env87->en_sw &= ~0xFF;
+ }
+#elif defined(__NetBSD__) && defined(__x86_64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ struct fxsave64 *fxsave = (struct fxsave64 *)&mc->__fpregs;
+ pc = mc_pc(mc);
+ fxsave->fx_mxcsr = 0x1F80;
+ fxsave->fx_fsw &= ~0xFF;
+#elif defined(__NetBSD__) && defined(__i386__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ pc = mc_pc(mc);
+ if (uc->uc_flags & _UC_FXSAVE) {
+ struct envxmm *envxmm = (struct envxmm *)&mc->__fpregs;
+ envxmm->en_mxcsr = 0x1F80;
+ envxmm->en_sw &= ~0xFF;
+ } else {
+ struct env87 *env87 = (struct env87 *)&mc->__fpregs;
+ env87->en_sw &= ~0xFF;
+ }
+#elif defined(__OpenBSD__) && defined(__x86_64__)
+ struct fxsave64 *fxsave = uc->sc_fpstate;
+ pc = mc_pc(uc);
+ fxsave->fx_mxcsr = 0x1F80;
+ fxsave->fx_fsw &= ~0xFF;
+#elif defined(__sun__) && defined(__x86_64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ struct fpchip_state *fpstate = &mc->fpregs.fp_reg_set.fpchip_state;
+ pc = mc_pc(mc);
+ fpstate->mxcsr = 0x1F80;
+ fpstate->sw &= ~0xFF;
+#endif
+#if 0
+ {
+ char buf[64];
+ snprintf(buf, sizeof buf, "%s: FPE at %p\r\n", __FUNCTION__, (void*)pc);
+ write(2, buf, strlen(buf));
+ }
+#endif
+ set_current_fp_exception(pc);
+}
+
+static void erts_thread_catch_fp_exceptions(void)
+{
+ struct sigaction act;
+ memset(&act, 0, sizeof act);
+ act.sa_sigaction = fpe_sig_action;
+ act.sa_flags = SA_SIGINFO;
+ sigaction(SIGFPE, &act, NULL);
+ unmask_fpe();
+}
+
+#else /* !((__linux__ && (__i386__ || __x86_64__ || __powerpc__)) || (__DARWIN__ && (__i386__ || __x86_64__ || __ppc__))) */
+
+static void fpe_sig_handler(int sig)
+{
+ set_current_fp_exception(1); /* XXX: convert to sigaction so we can get the trap PC */
+}
+
+static void erts_thread_catch_fp_exceptions(void)
+{
+ sys_sigset(SIGFPE, fpe_sig_handler);
+ unmask_fpe();
+}
+
+#endif /* (__linux__ && (__i386__ || __x86_64__ || __powerpc__)) || (__DARWIN__ && (__i386__ || __x86_64__ || __ppc__))) */
+
+/* once-only initialisation early in the main thread */
+void erts_sys_init_float(void)
+{
+ erts_init_fp_exception();
+ erts_thread_catch_fp_exceptions();
+ erts_printf_block_fpe = erts_sys_block_fpe;
+ erts_printf_unblock_fpe = erts_sys_unblock_fpe;
+}
+
+#endif /* NO_FPE_SIGNALS */
+
+void erts_thread_init_float(void)
+{
+#ifdef ERTS_SMP
+ /* This allows Erlang schedulers to leave Erlang-process context
+ and still have working FP exceptions. XXX: is this needed? */
+ erts_thread_init_fp_exception();
+#endif
+
+#ifndef NO_FPE_SIGNALS
+ /* NOTE:
+ * erts_thread_disable_fpe() is called in all threads at
+ * creation. We at least need to call unmask_fpe()
+ */
+#if defined(__DARWIN__) || defined(__FreeBSD__)
+ /* Darwin (7.9.0) does not appear to propagate FP exception settings
+ to a new thread from its parent. So if we want FP exceptions, we
+ must manually re-enable them in each new thread.
+ FreeBSD 6.1 appears to suffer from a similar issue. */
+ erts_thread_catch_fp_exceptions();
+#else
+ unmask_fpe();
+#endif
+
+#endif
+}
+
+void erts_thread_disable_fpe(void)
+{
+#if !defined(NO_FPE_SIGNALS)
+ (void)mask_fpe();
+#endif
+}
+
+#if !defined(NO_FPE_SIGNALS)
+int erts_sys_block_fpe(void)
+{
+ return mask_fpe();
+}
+
+void erts_sys_unblock_fpe(int unmasked)
+{
+ unmask_fpe_conditional(unmasked);
+}
+#endif
+
+/* The following check is incorporated from the Vee machine */
+
+#define ISDIGIT(d) ((d) >= '0' && (d) <= '9')
+
+/*
+ ** Convert a double to ascii format 0.dddde[+|-]ddd
+ ** return number of characters converted or -1 if error.
+ **
+ ** These two functions should maybe use localeconv() to pick up
+ ** the current radix character, but since it is uncertain how
+ ** expensive such a system call is, and since no-one has heard
+ ** of other radix characters than '.' and ',' an ad-hoc
+ ** low execution time solution is used instead.
+ */
+
+int
+sys_double_to_chars_ext(double fp, char *buffer, size_t buffer_size, size_t decimals)
+{
+ char *s = buffer;
+
+ if (erts_snprintf(buffer, buffer_size, "%.*e", decimals, fp) >= buffer_size)
+ return -1;
+ /* Search upto decimal point */
+ if (*s == '+' || *s == '-') s++;
+ while (ISDIGIT(*s)) s++;
+ if (*s == ',') *s++ = '.'; /* Replace ',' with '.' */
+ /* Scan to end of string */
+ while (*s) s++;
+ return s-buffer; /* i.e strlen(buffer) */
+}
+
+/* Float conversion */
+
+int
+sys_chars_to_double(char* buf, double* fp)
+{
+#ifndef NO_FPE_SIGNALS
+ volatile unsigned long *fpexnp = erts_get_current_fp_exception();
+#endif
+ char *s = buf, *t, *dp;
+
+ /* Robert says that something like this is what he really wanted:
+ * (The [.,] radix test is NOT what Robert wanted - it was added later)
+ *
+ * 7 == sscanf(Tbuf, "%[+-]%[0-9][.,]%[0-9]%[eE]%[+-]%[0-9]%s", ....);
+ * if (*s2 == 0 || *s3 == 0 || *s4 == 0 || *s6 == 0 || *s7)
+ * break;
+ */
+
+ /* Scan string to check syntax. */
+ if (*s == '+' || *s == '-') s++;
+ if (!ISDIGIT(*s)) /* Leading digits. */
+ return -1;
+ while (ISDIGIT(*s)) s++;
+ if (*s != '.' && *s != ',') /* Decimal part. */
+ return -1;
+ dp = s++; /* Remember decimal point pos just in case */
+ if (!ISDIGIT(*s))
+ return -1;
+ while (ISDIGIT(*s)) s++;
+ if (*s == 'e' || *s == 'E') {
+ /* There is an exponent. */
+ s++;
+ if (*s == '+' || *s == '-') s++;
+ if (!ISDIGIT(*s))
+ return -1;
+ while (ISDIGIT(*s)) s++;
+ }
+ if (*s) /* That should be it */
+ return -1;
+
+#ifdef NO_FPE_SIGNALS
+ errno = 0;
+#endif
+ __ERTS_FP_CHECK_INIT(fpexnp);
+ *fp = strtod(buf, &t);
+ __ERTS_FP_ERROR_THOROUGH(fpexnp, *fp, return -1);
+ if (t != s) { /* Whole string not scanned */
+ /* Try again with other radix char */
+ *dp = (*dp == '.') ? ',' : '.';
+ errno = 0;
+ __ERTS_FP_CHECK_INIT(fpexnp);
+ *fp = strtod(buf, &t);
+ __ERTS_FP_ERROR_THOROUGH(fpexnp, *fp, return -1);
+ }
+
+#ifdef NO_FPE_SIGNALS
+ if (errno == ERANGE) {
+ if (*fp == HUGE_VAL || *fp == -HUGE_VAL) {
+ /* overflow, should give error */
+ return -1;
+ } else if (t == s && *fp == 0.0) {
+ /* This should give 0.0 - OTP-7178 */
+ errno = 0;
+
+ } else if (*fp == 0.0) {
+ return -1;
+ }
+ }
+#endif
+ return 0;
+}
+
+int
+matherr(struct exception *exc)
+{
+#if !defined(NO_FPE_SIGNALS)
+ volatile unsigned long *fpexnp = erts_get_current_fp_exception();
+ if (fpexnp != NULL)
+ *fpexnp = (unsigned long)__builtin_return_address(0);
+#endif
+ return 1;
+}
diff --git a/erts/emulator/sys/ose/sys_time.c b/erts/emulator/sys/ose/sys_time.c
new file mode 100644
index 0000000000..7e96f68424
--- /dev/null
+++ b/erts/emulator/sys/ose/sys_time.c
@@ -0,0 +1,56 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2005-2009. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "sys.h"
+#include "global.h"
+
+/******************* Routines for time measurement *********************/
+
+int erts_ticks_per_sec = 0; /* Will be SYS_CLK_TCK in erl_unix_sys.h */
+
+int sys_init_time(void)
+{
+ return SYS_CLOCK_RESOLUTION;
+}
+
+clock_t sys_times(SysTimes *now) {
+ now->tms_utime = now->tms_stime = now->tms_cutime = now->tms_cstime = 0;
+ return 0;
+}
+
+static OSTICK last_tick_count = 0;
+static SysHrTime wrap = 0;
+static OSTICK us_per_tick;
+
+void sys_init_hrtime() {
+ us_per_tick = system_tick();
+}
+
+SysHrTime sys_gethrtime() {
+ OSTICK ticks = get_ticks();
+ if (ticks < (SysHrTime) last_tick_count) {
+ wrap += 1ULL << 32;
+ }
+ last_tick_count = ticks;
+ return ((((SysHrTime) ticks) + wrap) * 1000*us_per_tick);
+}
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 7c6e4a2f37..5ad92dad02 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -54,6 +54,17 @@ void sys_sigrelease(int sig)
#endif /* !SIG_SIGNAL */
#endif /* !SIG_SIGSET */
+#if defined(__ANDROID__)
+int __system_properties_fd(void);
+#endif /* __ANDROID__ */
+
+#if defined(__ANDROID__)
+#define SHELL "/system/bin/sh"
+#else
+#define SHELL "/bin/sh"
+#endif /* __ANDROID__ */
+
+
int
main(int argc, char *argv[])
{
@@ -89,8 +100,18 @@ main(int argc, char *argv[])
if (sscanf(argv[CS_ARGV_FD_CR_IX], "%d:%d", &from, &to) != 2)
return 1;
+
+#if defined(HAVE_CLOSEFROM)
+ closefrom(from);
+#elif defined(__ANDROID__)
+ for (i = from; i <= to; i++) {
+ if (i!=__system_properties_fd)
+ (void) close(i);
+ }
+#else
for (i = from; i <= to; i++)
(void) close(i);
+#endif
if (!(argv[CS_ARGV_WD_IX][0] == '.' && argv[CS_ARGV_WD_IX][1] == '\0')
&& chdir(argv[CS_ARGV_WD_IX]) < 0)
@@ -116,7 +137,23 @@ main(int argc, char *argv[])
execv(argv[CS_ARGV_NO_OF_ARGS],&(argv[CS_ARGV_NO_OF_ARGS + 1]));
}
} else {
- execl("/bin/sh", "sh", "-c", argv[CS_ARGV_CMD_IX], (char *) NULL);
+ execl(SHELL, "sh", "-c", argv[CS_ARGV_CMD_IX], (char *) NULL);
}
return 1;
}
+
+#if defined(__ANDROID__)
+int __system_properties_fd(void)
+{
+ int s, fd;
+ char *env;
+
+ env = getenv("ANDROID_PROPERTY_WORKSPACE");
+ if (!env) {
+ return -1;
+ }
+ fd = atoi(env);
+ return fd;
+}
+#endif /* __ANDROID__ */
+
diff --git a/erts/emulator/sys/unix/erl_unix_sys.h b/erts/emulator/sys/unix/erl_unix_sys.h
index 2c47aa06c2..26ed2fb558 100644
--- a/erts/emulator/sys/unix/erl_unix_sys.h
+++ b/erts/emulator/sys/unix/erl_unix_sys.h
@@ -127,12 +127,14 @@
# endif
#endif
+/*
+ * Min number of async threads
+ */
+#define ERTS_MIN_NO_OF_ASYNC_THREADS 0
+
/* File descriptors are numbers anc consecutively allocated on Unix */
#define ERTS_SYS_CONTINOUS_FD_NUMBERS
-#define HAVE_ERTS_CHECK_IO_DEBUG
-int erts_check_io_debug(void);
-
#ifndef ERTS_SMP
# undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
# define ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
@@ -225,8 +227,24 @@ extern void sys_stop_cat(void);
*/
#ifdef USE_ISINF_ISNAN /* simulate finite() */
-# define finite(f) (!isinf(f) && !isnan(f))
-# define HAVE_FINITE
+# define isfinite(f) (!isinf(f) && !isnan(f))
+# define HAVE_ISFINITE
+#elif (defined(__GNUC__) && !defined(__llvm__)) && defined(HAVE_FINITE)
+/* We use finite in gcc as it emits assembler instead of
+ the function call that isfinite emits. The assembler is
+ significantly faster. */
+# ifdef isfinite
+# undef isfinite
+# endif
+# define isfinite finite
+# ifndef HAVE_ISFINITE
+# define HAVE_ISFINITE
+# endif
+#elif defined(isfinite) && !defined(HAVE_ISFINITE)
+# define HAVE_ISFINITE
+#elif !defined(HAVE_ISFINITE) && defined(HAVE_FINITE)
+# define isfinite finite
+# define HAVE_ISFINITE
#endif
#ifdef NO_FPE_SIGNALS
@@ -236,7 +254,7 @@ extern void sys_stop_cat(void);
#define erts_thread_init_fp_exception() do{}while(0)
#endif
# define __ERTS_FP_CHECK_INIT(fpexnp) do {} while (0)
-# define __ERTS_FP_ERROR(fpexnp, f, Action) if (!finite(f)) { Action; } else {}
+# define __ERTS_FP_ERROR(fpexnp, f, Action) if (!isfinite(f)) { Action; } else {}
# define __ERTS_FP_ERROR_THOROUGH(fpexnp, f, Action) __ERTS_FP_ERROR(fpexnp, f, Action)
# define __ERTS_SAVE_FP_EXCEPTION(fpexnp)
# define __ERTS_RESTORE_FP_EXCEPTION(fpexnp)
@@ -300,7 +318,7 @@ static __inline__ void __ERTS_FP_CHECK_INIT(volatile unsigned long *fp_exception
code to always throw floating-point exceptions on errors. */
static __inline__ int erts_check_fpe_thorough(volatile unsigned long *fp_exception, double f)
{
- return erts_check_fpe(fp_exception, f) || !finite(f);
+ return erts_check_fpe(fp_exception, f) || !isfinite(f);
}
# define __ERTS_FP_ERROR_THOROUGH(fpexnp, f, Action) \
do { if (erts_check_fpe_thorough((fpexnp),(f))) { Action; } } while (0)
diff --git a/erts/emulator/sys/unix/erl_unix_sys_ddll.c b/erts/emulator/sys/unix/erl_unix_sys_ddll.c
index 12c47d0088..2659d623c7 100644
--- a/erts/emulator/sys/unix/erl_unix_sys_ddll.c
+++ b/erts/emulator/sys/unix/erl_unix_sys_ddll.c
@@ -101,7 +101,7 @@ void erl_sys_ddll_init(void) {
/*
* Open a shared object
*/
-int erts_sys_ddll_open2(const char *full_name, void **handle, ErtsSysDdllError* err)
+int erts_sys_ddll_open(const char *full_name, void **handle, ErtsSysDdllError* err)
{
#if defined(HAVE_DLOPEN)
char* dlname;
@@ -123,6 +123,7 @@ int erts_sys_ddll_open2(const char *full_name, void **handle, ErtsSysDdllError*
int erts_sys_ddll_open_noext(char *dlname, void **handle, ErtsSysDdllError* err)
{
+#if defined(HAVE_DLOPEN)
int ret = ERL_DE_NO_ERROR;
char *str;
dlerror();
@@ -148,6 +149,9 @@ int erts_sys_ddll_open_noext(char *dlname, void **handle, ErtsSysDdllError* err)
ret = ERL_DE_DYNAMIC_ERROR_OFFSET - find_errcode(str, err);
}
return ret;
+#else
+ return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
+#endif
}
/*
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 61f9f6a59a..cd87b320e2 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -149,6 +149,13 @@ extern void erl_crash_dump(char* file, int line, char* fmt, ...);
#define DIR_SEPARATOR_CHAR '/'
+#if defined(__ANDROID__)
+#define SHELL "/system/bin/sh"
+#else
+#define SHELL "/bin/sh"
+#endif /* __ANDROID__ */
+
+
#if defined(DEBUG)
#define ERL_BUILD_TYPE_MARKER ".debug"
#elif defined(PURIFY)
@@ -195,8 +202,6 @@ static erts_smp_atomic_t sys_misc_mem_sz;
#if defined(ERTS_SMP)
static void smp_sig_notify(char c);
static int sig_notify_fds[2] = {-1, -1};
-#elif defined(USE_THREADS)
-static int async_fd[2];
#endif
#if CHLDWTHR || defined(ERTS_SMP)
@@ -239,6 +244,8 @@ static void note_child_death(int, int);
static void* child_waiter(void *);
#endif
+static int crashdump_companion_cube_fd = -1;
+
/********************* General functions ****************************/
/* This is used by both the drivers and general I/O, must be set early */
@@ -277,7 +284,7 @@ struct {
void (*check_io)(int);
Uint (*size)(void);
Eterm (*info)(void *);
- int (*check_io_debug)(void);
+ int (*check_io_debug)(ErtsCheckIoDebugInfo *);
} io_func = {0};
@@ -299,9 +306,9 @@ Eterm erts_check_io_info(void *p)
}
int
-erts_check_io_debug(void)
+erts_check_io_debug(ErtsCheckIoDebugInfo *ip)
{
- return (*io_func.check_io_debug)();
+ return (*io_func.check_io_debug)(ip);
}
@@ -409,8 +416,10 @@ void sys_tty_reset(int exit_code)
#ifdef __tile__
/* Direct malloc to spread memory around the caches of multiple tiles. */
#include <malloc.h>
+#if defined(MALLOC_USE_HASH)
MALLOC_USE_HASH(1);
#endif
+#endif
#ifdef USE_THREADS
@@ -547,6 +556,33 @@ erts_sys_pre_init(void)
#endif
#endif /* USE_THREADS */
erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0);
+
+ {
+ /*
+ * Unfortunately we depend on fd 0,1,2 in the old shell code.
+ * So if for some reason we do not have those open when we start
+ * we have to open them here. Not doing this can cause the emulator
+ * to deadlock when reaping the fd_driver ports :(
+ */
+ int fd;
+ /* Make sure fd 0 is open */
+ if ((fd = open("/dev/null", O_RDONLY)) != 0)
+ close(fd);
+ /* Make sure fds 1 and 2 are open */
+ while (fd < 3) {
+ fd = open("/dev/null", O_WRONLY);
+ }
+ close(fd);
+ }
+
+ /* We need a file descriptor to close in the crashdump creation.
+ * We close this one to be sure we can get a fd for our real file ...
+ * so, we create one here ... a stone to carry all the way home.
+ */
+
+ crashdump_companion_cube_fd = open("/dev/null", O_RDONLY);
+
+ /* don't lose it, there will be cake */
}
void
@@ -691,14 +727,13 @@ static ERTS_INLINE int
prepare_crash_dump(int secs)
{
#define NUFBUF (3)
- int i, max;
+ int i;
char env[21]; /* enough to hold any 64-bit integer */
size_t envsz;
DeclareTmpHeapNoproc(heap,NUFBUF);
Port *heart_port;
Eterm *hp = heap;
Eterm list = NIL;
- int heart_fd[2] = {-1,-1};
int has_heart = 0;
UseTmpHeapNoproc(NUFBUF);
@@ -721,43 +756,22 @@ prepare_crash_dump(int secs)
alarm((unsigned int)secs);
}
- if (heart_port) {
- /* hearts input fd
- * We "know" drv_data is the in_fd since the port is started with read|write
- */
- heart_fd[0] = (int)heart_port->drv_data;
- heart_fd[1] = (int)driver_data[heart_fd[0]].ofd;
- has_heart = 1;
+ /* close all viable sockets via emergency close callbacks.
+ * Specifically we want to close epmd sockets.
+ */
- list = CONS(hp, make_small(8), list); hp += 2;
+ erts_emergency_close_ports();
+ if (heart_port) {
+ has_heart = 1;
+ list = CONS(hp, make_small(8), list); hp += 2;
/* send to heart port, CMD = 8, i.e. prepare crash dump =o */
erts_port_output(NULL, ERTS_PORT_SIG_FLG_FORCE_IMM_CALL, heart_port,
heart_port->common.id, list, NULL);
}
- /* Make sure we unregister at epmd (unknown fd) and get at least
- one free filedescriptor (for erl_crash.dump) */
-
- max = max_files;
- if (max < 1024)
- max = 1024;
- for (i = 3; i < max; i++) {
-#if defined(ERTS_SMP)
- /* We don't want to close the signal notification pipe... */
- if (i == sig_notify_fds[0] || i == sig_notify_fds[1])
- continue;
-#elif defined(USE_THREADS)
- /* We don't want to close the async notification pipe... */
- if (i == async_fd[0] || i == async_fd[1])
- continue;
-#endif
- /* We don't want to close our heart yet ... */
- if (i == heart_fd[0] || i == heart_fd[1])
- continue;
-
- close(i);
- }
+ /* Make sure we have a fd for our crashdump file. */
+ close(crashdump_companion_cube_fd);
envsz = sizeof(env);
i = erts_sys_getenv__("ERL_CRASH_DUMP_NICE", env, &envsz);
@@ -1546,9 +1560,13 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* op
goto child_error;
}
+#if defined(HAVE_CLOSEFROM)
+ closefrom(opts->use_stdio ? 3 : 5);
+#else
for (i = opts->use_stdio ? 3 : 5; i < max_files; i++)
(void) close(i);
-
+#endif
+
if (opts->wd && chdir(opts->wd) < 0)
goto child_error;
@@ -1575,7 +1593,7 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* op
}
}
} else {
- execle("/bin/sh", "sh", "-c", cmd_line, (char *) NULL, new_environ);
+ execle(SHELL, "sh", "-c", cmd_line, (char *) NULL, new_environ);
}
child_error:
_exit(1);
@@ -1696,7 +1714,7 @@ static ErlDrvData spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* op
fcntl(i, F_SETFD, 1);
qnx_spawn_options.flags = _SPAWN_SETSID;
- if ((pid = spawnl(P_NOWAIT, "/bin/sh", "/bin/sh", "-c", cmd_line,
+ if ((pid = spawnl(P_NOWAIT, SHELL, SHELL, "-c", cmd_line,
(char *) 0)) < 0) {
erts_free(ERTS_ALC_T_TMP, (void *) cmd_line);
reset_qnx_spawn();
@@ -2540,7 +2558,7 @@ void *erts_sys_aligned_alloc(UWord alignment, UWord size)
#ifdef HAVE_POSIX_MEMALIGN
void *ptr = NULL;
int error;
- ASSERT(alignment && (alignment & ~alignment) == 0); /* power of 2 */
+ ASSERT(alignment && (alignment & (alignment-1)) == 0); /* power of 2 */
error = posix_memalign(&ptr, (size_t) alignment, (size_t) size);
#if HAVE_ERTS_MSEG
if (error || !ptr) {
@@ -2563,7 +2581,7 @@ void *erts_sys_aligned_alloc(UWord alignment, UWord size)
void erts_sys_aligned_free(UWord alignment, void *ptr)
{
- ASSERT(alignment && (alignment & ~alignment) == 0); /* power of 2 */
+ ASSERT(alignment && (alignment & (alignment-1)) == 0); /* power of 2 */
free(ptr);
}
diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c
index 689be98969..cafeab547e 100644
--- a/erts/emulator/sys/unix/sys_float.c
+++ b/erts/emulator/sys/unix/sys_float.c
@@ -46,7 +46,7 @@ static void erts_init_fp_exception(void)
{
/* XXX: the wrappers prevent using a pthread destructor to
deallocate the key's value; so when/where do we do that? */
- erts_tsd_key_create(&fpe_key);
+ erts_tsd_key_create(&fpe_key,"fp_exception");
}
void erts_thread_init_fp_exception(void)
diff --git a/erts/emulator/sys/win32/erl_poll.c b/erts/emulator/sys/win32/erl_poll.c
index 7a1d129cd5..972170d465 100644
--- a/erts/emulator/sys/win32/erl_poll.c
+++ b/erts/emulator/sys/win32/erl_poll.c
@@ -1085,7 +1085,7 @@ void erts_poll_controlv(ErtsPollSet ps,
pcev[i].events,
pcev[i].on);
}
- ERTS_POLLSET_LOCK(ps);
+ ERTS_POLLSET_UNLOCK(ps);
HARDTRACEF(("Out erts_poll_controlv"));
}
diff --git a/erts/emulator/sys/win32/erl_win32_sys_ddll.c b/erts/emulator/sys/win32/erl_win32_sys_ddll.c
index 4c8d83ab16..338f0d7386 100644
--- a/erts/emulator/sys/win32/erl_win32_sys_ddll.c
+++ b/erts/emulator/sys/win32/erl_win32_sys_ddll.c
@@ -38,7 +38,7 @@
#include "erl_nif.h"
#define EXT_LEN 4
-#define FILE_EXT ".dll"
+#define FILE_EXT_WCHAR L".dll"
static DWORD tls_index = 0;
static TWinDynDriverCallbacks wddc;
@@ -57,11 +57,15 @@ void erl_sys_ddll_init(void) {
/*
* Open a shared object
+ * Expecting 'full_name' as an UTF-8 string.
*/
-int erts_sys_ddll_open2(const char *full_name, void **handle, ErtsSysDdllError* err)
+int erts_sys_ddll_open(const char *full_name, void **handle, ErtsSysDdllError* err)
{
+ HINSTANCE hinstance;
int len;
- char dlname[MAXPATHLEN + 1];
+ wchar_t* wcp;
+ Sint used;
+ int code;
if ((len = sys_strlen(full_name)) >= MAXPATHLEN - EXT_LEN) {
if (err != NULL) {
@@ -69,10 +73,26 @@ int erts_sys_ddll_open2(const char *full_name, void **handle, ErtsSysDdllError*
}
return ERL_DE_LOAD_ERROR_NAME_TO_LONG;
}
- sys_strcpy(dlname, full_name);
- sys_strcpy(dlname+len, FILE_EXT);
- return erts_sys_ddll_open_noext(dlname, handle, err);
+
+ wcp = (wchar_t*)erts_convert_filename_to_wchar((byte*)full_name, len,
+ NULL, 0,
+ ERTS_ALC_T_TMP, &used, EXT_LEN);
+ wcscpy(&wcp[used/2 - 1], FILE_EXT_WCHAR);
+
+ if ((hinstance = LoadLibraryW(wcp)) == NULL) {
+ code = ERL_DE_DYNAMIC_ERROR_OFFSET - GetLastError();
+ if (err != NULL) {
+ err->str = erts_sys_ddll_error(code);
+ }
+ }
+ else {
+ code = ERL_DE_NO_ERROR;
+ *handle = (void *) hinstance;
+ }
+ erts_free(ERTS_ALC_T_TMP, wcp);
+ return code;
}
+
int erts_sys_ddll_open_noext(char *dlname, void **handle, ErtsSysDdllError* err)
{
HINSTANCE hinstance;
diff --git a/erts/emulator/sys/win32/erl_win_dyn_driver.h b/erts/emulator/sys/win32/erl_win_dyn_driver.h
index b9a9838a36..4010d939e5 100644
--- a/erts/emulator/sys/win32/erl_win_dyn_driver.h
+++ b/erts/emulator/sys/win32/erl_win_dyn_driver.h
@@ -82,7 +82,6 @@ WDD_TYPEDEF(int, erl_drv_send_term, (ErlDrvTermData, ErlDrvTermData, ErlDrvTermD
WDD_TYPEDEF(int, driver_send_term, (ErlDrvPort, ErlDrvTermData, ErlDrvTermData*, int));
WDD_TYPEDEF(unsigned int, driver_async_port_key, (ErlDrvPort));
WDD_TYPEDEF(long, driver_async, (ErlDrvPort,unsigned int*,void (*)(void*),void*,void (*)(void*)));
-WDD_TYPEDEF(int, driver_async_cancel, (unsigned int));
WDD_TYPEDEF(int, driver_lock_driver, (ErlDrvPort));
WDD_TYPEDEF(void *, driver_dl_open, (char *));
WDD_TYPEDEF(void *, driver_dl_sym, (void *, char *));
@@ -200,7 +199,6 @@ typedef struct {
WDD_FTYPE(driver_send_term) *driver_send_term;
WDD_FTYPE(driver_async_port_key) *driver_async_port_key;
WDD_FTYPE(driver_async) *driver_async;
- WDD_FTYPE(driver_async_cancel) *driver_async_cancel;
WDD_FTYPE(driver_lock_driver) *driver_lock_driver;
WDD_FTYPE(driver_dl_open) *driver_dl_open;
WDD_FTYPE(driver_dl_sym) *driver_dl_sym;
@@ -312,7 +310,6 @@ extern TWinDynDriverCallbacks WinDynDriverCallbacks;
#define driver_send_term (WinDynDriverCallbacks.driver_send_term)
#define driver_async_port_key (WinDynDriverCallbacks.driver_async_port_key)
#define driver_async (WinDynDriverCallbacks.driver_async)
-#define driver_async_cancel (WinDynDriverCallbacks.driver_async_cancel)
#define driver_lock_driver (WinDynDriverCallbacks.driver_lock_driver)
#define driver_dl_open (WinDynDriverCallbacks.driver_dl_open)
#define driver_dl_sym (WinDynDriverCallbacks.driver_dl_sym)
@@ -448,7 +445,6 @@ do { \
((W).driver_send_term) = driver_send_term; \
((W).driver_async_port_key) = driver_async_port_key; \
((W).driver_async) = driver_async; \
-((W).driver_async_cancel) = driver_async_cancel; \
((W).driver_lock_driver) = driver_lock_driver; \
((W).driver_dl_open) = driver_dl_open; \
((W).driver_dl_sym) = driver_dl_sym; \
diff --git a/erts/emulator/sys/win32/erl_win_sys.h b/erts/emulator/sys/win32/erl_win_sys.h
index 0deb097b1a..838f0c61eb 100644
--- a/erts/emulator/sys/win32/erl_win_sys.h
+++ b/erts/emulator/sys/win32/erl_win_sys.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1997-2012. All Rights Reserved.
+ * Copyright Ericsson AB 1997-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -60,16 +60,18 @@
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-/*
- * Define MAXPATHLEN in terms of MAXPATH if available.
- */
-
-#ifndef MAXPATH
-#define MAXPATH MAX_PATH
-#endif /* MAXPATH */
#ifndef MAXPATHLEN
-#define MAXPATHLEN MAXPATH
+#define MAXPATHLEN 4096
+/*
+ erts-6.0 (OTP 17.0):
+ We now accept windows paths longer than 260 (MAX_PATH) by conversion to
+ UNC path format. In order to also return long paths from the driver we
+ increased MAXPATHLEN from 260 to larger (but arbitrary) value 4096.
+ It would of course be nicer to instead dynamically allocate large enough
+ tmp buffers when efile_drv needs to return really long paths, and do that
+ for unix as well.
+ */
#endif /* MAXPATHLEN */
/*
@@ -103,16 +105,18 @@
#define CreateAutoEvent(state) CreateEvent(NULL, FALSE, state, NULL)
#define CreateManualEvent(state) CreateEvent(NULL, TRUE, state, NULL)
+/*
+ * Min number of async threads
+ */
+#define ERTS_MIN_NO_OF_ASYNC_THREADS 0
/*
* Our own type of "FD's"
*/
+#define ERTS_SYS_FD_INVALID INVALID_HANDLE_VALUE
#define ERTS_SYS_FD_TYPE HANDLE
#define NO_FSTAT_ON_SYS_FD_TYPE 1 /* They are events, not files */
-#define HAVE_ERTS_CHECK_IO_DEBUG
-int erts_check_io_debug(void);
-
/*
* For erl_time_sup
*/
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c
index 99951bb45e..0ded6b274e 100755..100644
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -69,17 +69,14 @@ static void async_read_file(struct async_io* aio, LPVOID buf, DWORD numToRead);
static int async_write_file(struct async_io* aio, LPVOID buf, DWORD numToWrite);
static int get_overlapped_result(struct async_io* aio,
LPDWORD pBytesRead, BOOL wait);
-static BOOL create_child_process(char *, HANDLE, HANDLE,
+static BOOL create_child_process(wchar_t *, HANDLE, HANDLE,
HANDLE, LPHANDLE, LPDWORD, BOOL,
- LPVOID, LPTSTR, unsigned,
- char **, int *);
+ LPVOID, wchar_t*, unsigned,
+ wchar_t **, int *);
static int create_pipe(LPHANDLE, LPHANDLE, BOOL, BOOL);
-static int application_type(const char* originalName, char fullPath[MAX_PATH],
+static int application_type(const wchar_t* originalName, wchar_t fullPath[MAX_PATH],
BOOL search_in_path, BOOL handle_quotes,
int *error_return);
-static int application_type_w(const WCHAR *originalName, WCHAR fullPath[MAX_PATH],
- BOOL search_in_path, BOOL handle_quotes,
- int *error_return);
HANDLE erts_service_event;
@@ -1173,7 +1170,7 @@ spawn_init(void)
}
static ErlDrvData
-spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* opts)
+spawn_start(ErlDrvPort port_num, char* utf8_name, SysDriverOpts* opts)
{
HANDLE hToChild = INVALID_HANDLE_VALUE; /* Write handle to child. */
HANDLE hFromChild = INVALID_HANDLE_VALUE; /* Read handle from child. */
@@ -1189,7 +1186,9 @@ spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* opts)
SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
char* envir = opts->envir;
int errno_return = -1;
-
+ wchar_t *name;
+ int len;
+
if (opts->read_write & DO_READ)
neededSelects++;
if (opts->read_write & DO_WRITE)
@@ -1247,26 +1246,40 @@ spawn_start(ErlDrvPort port_num, char* name, SysDriverOpts* opts)
* Spawn the port program.
*/
- DEBUGF(("Spawning \"%s\"\n", name));
+ if ((len = MultiByteToWideChar(CP_UTF8, 0, utf8_name, -1, NULL, 0)) > 0) {
+ name = erts_alloc(ERTS_ALC_T_TMP, len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8_name, -1, name, len);
+ } else { /* Not valid utf-8, just convert byte to wchar */
+ int i;
+ len = strlen(utf8_name);
+ name = erts_alloc(ERTS_ALC_T_TMP, (1+len)*sizeof(wchar_t));
+ for(i=0; i<len; i++) {
+ name[i] = (wchar_t) utf8_name[i];
+ }
+ name[i] = L'\0';
+ }
+ DEBUGF(("Spawning \"%S\"\n", name));
envir = win_build_environment(envir); /* Always a unicode environment */
- ok = create_child_process(name,
- hChildStdin,
- hChildStdout,
- hChildStderr,
- &dp->port_pid,
- &pid,
- opts->hide_window,
- (LPVOID) envir,
- (LPTSTR) opts->wd,
- opts->spawn_type,
- opts->argv,
- &errno_return);
+ ok = create_child_process(name,
+ hChildStdin,
+ hChildStdout,
+ hChildStderr,
+ &dp->port_pid,
+ &pid,
+ opts->hide_window,
+ (LPVOID) envir,
+ (wchar_t *) opts->wd,
+ opts->spawn_type,
+ (wchar_t **) opts->argv,
+ &errno_return);
CloseHandle(hChildStdin);
CloseHandle(hChildStdout);
if (close_child_stderr && hChildStderr != INVALID_HANDLE_VALUE &&
hChildStderr != 0) {
CloseHandle(hChildStderr);
}
+ erts_free(ERTS_ALC_T_TMP, name);
+
if (envir != NULL) {
erts_free(ERTS_ALC_T_ENVIRONMENT, envir);
}
@@ -1344,9 +1357,9 @@ create_file_thread(AsyncIo* aio, int mode)
* Example: input = "\"Program Files\"\\erl arg1 arg2"
* gives 19 as result.
* The length returned is equivalent with length(argv[0]) if the
- * comman line should have been prepared by _setargv for the main function
+ * command line should have been prepared by _setargv for the main function
*/
-int parse_command(char* cmd){
+int parse_command(wchar_t* cmd){
#define NORMAL 2
#define STRING 1
#define STOP 0
@@ -1354,17 +1367,17 @@ int parse_command(char* cmd){
int state = NORMAL;
while (cmd[i]) {
switch (cmd[i]) {
- case '"':
+ case L'"':
if (state == NORMAL)
state = STRING;
else
state = NORMAL;
break;
- case '\\':
- if ((state == STRING) && (cmd[i+1]=='"'))
+ case L'\\':
+ if ((state == STRING) && (cmd[i+1]==L'"'))
i++;
break;
- case ' ':
+ case L' ':
if (state == NORMAL)
state = STOP;
break;
@@ -1379,7 +1392,7 @@ int parse_command(char* cmd){
return i;
}
-static BOOL need_quotes(WCHAR *str)
+static BOOL need_quotes(wchar_t *str)
{
int in_quote = 0;
int backslashed = 0;
@@ -1443,7 +1456,7 @@ static BOOL need_quotes(WCHAR *str)
static BOOL
create_child_process
(
- char *origcmd, /* Command line for child process (including
+ wchar_t *origcmd, /* Command line for child process (including
* name of executable). Or whole executable if st is
* ERTS_SPAWN_EXECUTABLE
*/
@@ -1454,57 +1467,53 @@ create_child_process
LPDWORD pdwID, /* Pointer to variable to received Process ID */
BOOL hide, /* Hide the window unconditionally. */
LPVOID env, /* Environment for the child */
- LPTSTR wd, /* Working dir for the child */
+ wchar_t *wd, /* Working dir for the child */
unsigned st, /* Flags for spawn, tells us how to interpret origcmd */
- char **argv, /* Argument vector if given. */
+ wchar_t **argv, /* Argument vector if given. */
int *errno_return /* Place to put an errno in in case of failure */
)
-{
+{
PROCESS_INFORMATION piProcInfo = {0};
BOOL ok = FALSE;
int applType;
/* Not to be changed for different types of executables */
int staticCreateFlags = GetPriorityClass(GetCurrentProcess());
int createFlags = DETACHED_PROCESS;
- char *newcmdline = NULL;
+ wchar_t *newcmdline = NULL;
int cmdlength;
- char* thecommand;
- LPTSTR appname = NULL;
+ wchar_t* thecommand;
+ wchar_t* appname = NULL;
HANDLE hProcess = GetCurrentProcess();
-
- *errno_return = -1;
+ STARTUPINFOW siStartInfo = {0};
+ wchar_t execPath[MAX_PATH];
+ *errno_return = -1;
+ siStartInfo.cb = sizeof(STARTUPINFOW);
+ siStartInfo.dwFlags = STARTF_USESTDHANDLES;
+ siStartInfo.hStdInput = hStdin;
+ siStartInfo.hStdOutput = hStdout;
+ siStartInfo.hStdError = hStderr;
if (st != ERTS_SPAWN_EXECUTABLE) {
- STARTUPINFO siStartInfo = {0};
- char execPath[MAX_PATH];
-
- siStartInfo.cb = sizeof(STARTUPINFO);
- siStartInfo.dwFlags = STARTF_USESTDHANDLES;
- siStartInfo.hStdInput = hStdin;
- siStartInfo.hStdOutput = hStdout;
- siStartInfo.hStdError = hStderr;
-
/*
* Parse out the program name from the command line (it can be quoted and
* contain spaces).
*/
- newcmdline = erts_alloc(ERTS_ALC_T_TMP, 2048);
+ newcmdline = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP, 2048*sizeof(wchar_t));
cmdlength = parse_command(origcmd);
- thecommand = (char *) erts_alloc(ERTS_ALC_T_TMP, cmdlength+1);
- strncpy(thecommand, origcmd, cmdlength);
- thecommand[cmdlength] = '\0';
- DEBUGF(("spawn command: %s\n", thecommand));
-
- applType = application_type(thecommand, execPath, TRUE,
- TRUE, errno_return);
- DEBUGF(("application_type returned for (%s) is %d\n", thecommand, applType));
+ thecommand = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP, (cmdlength+1)*sizeof(wchar_t));
+ wcsncpy(thecommand, origcmd, cmdlength);
+ thecommand[cmdlength] = L'\0';
+ DEBUGF(("spawn command: %S\n", thecommand));
+
+ applType = application_type(thecommand, execPath, TRUE, TRUE, errno_return);
+ DEBUGF(("application_type returned for (%S) is %d\n", thecommand, applType));
erts_free(ERTS_ALC_T_TMP, (void *) thecommand);
if (applType == APPL_NONE) {
erts_free(ERTS_ALC_T_TMP,newcmdline);
return FALSE;
}
- newcmdline[0] = '\0';
+ newcmdline[0] = L'\0';
if (applType == APPL_DOS) {
/*
@@ -1513,11 +1522,11 @@ create_child_process
* a normal process inside of a hidden console application,
* and then run that hidden console as a detached process.
*/
-
+
siStartInfo.wShowWindow = SW_HIDE;
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
createFlags = CREATE_NEW_CONSOLE;
- strcat(newcmdline, "cmd.exe /c ");
+ wcscat(newcmdline, L"cmd.exe /c ");
} else if (hide) {
DEBUGF(("hiding window\n"));
siStartInfo.wShowWindow = SW_HIDE;
@@ -1525,35 +1534,25 @@ create_child_process
createFlags = 0;
}
- strcat(newcmdline, execPath);
- strcat(newcmdline, origcmd+cmdlength);
- DEBUGF(("Creating child process: %s, createFlags = %d\n", newcmdline, createFlags));
- ok = CreateProcessA(appname,
- newcmdline,
- NULL,
- NULL,
- TRUE,
- createFlags | staticCreateFlags |
- CREATE_UNICODE_ENVIRONMENT,
- env,
- wd,
- &siStartInfo,
+ wcscat(newcmdline, execPath);
+ wcscat(newcmdline, origcmd+cmdlength);
+ DEBUGF(("Creating child process: %S, createFlags = %d\n", newcmdline, createFlags));
+ ok = CreateProcessW(appname,
+ newcmdline,
+ NULL,
+ NULL,
+ TRUE,
+ createFlags | staticCreateFlags |
+ CREATE_UNICODE_ENVIRONMENT,
+ env,
+ wd,
+ &siStartInfo,
&piProcInfo);
} else { /* ERTS_SPAWN_EXECUTABLE, filename and args are in unicode ({utf16,little}) */
int run_cmd = 0;
- STARTUPINFOW siStartInfo = {0};
- WCHAR execPath[MAX_PATH];
-
- siStartInfo.cb = sizeof(STARTUPINFOW);
- siStartInfo.dwFlags = STARTF_USESTDHANDLES;
- siStartInfo.hStdInput = hStdin;
- siStartInfo.hStdOutput = hStdout;
- siStartInfo.hStdError = hStderr;
-
- applType = application_type_w((WCHAR *) origcmd, execPath, FALSE, FALSE,
- errno_return);
+ applType = application_type(origcmd, execPath, FALSE, FALSE, errno_return);
if (applType == APPL_NONE) {
return FALSE;
}
@@ -1573,37 +1572,37 @@ create_child_process
createFlags = 0;
}
if (run_cmd) {
- WCHAR cmdPath[MAX_PATH];
+ wchar_t cmdPath[MAX_PATH];
int cmdType;
- cmdType = application_type_w(L"cmd.exe", cmdPath, TRUE, FALSE, errno_return);
+ cmdType = application_type(L"cmd.exe", cmdPath, TRUE, FALSE, errno_return);
if (cmdType == APPL_NONE || cmdType == APPL_DOS) {
return FALSE;
}
- appname = (char *) erts_alloc(ERTS_ALC_T_TMP, (wcslen(cmdPath)+1)*sizeof(WCHAR));
- wcscpy((WCHAR *) appname,cmdPath);
+ appname = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP, (wcslen(cmdPath)+1)*sizeof(wchar_t));
+ wcscpy(appname,cmdPath);
} else {
- appname = (char *) erts_alloc(ERTS_ALC_T_TMP, (wcslen(execPath)+1)*sizeof(WCHAR));
- wcscpy((WCHAR *) appname, execPath);
+ appname = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP, (wcslen(execPath)+1)*sizeof(wchar_t));
+ wcscpy(appname, execPath);
}
if (argv == NULL) {
BOOL orig_need_q = need_quotes(execPath);
- WCHAR *ptr;
+ wchar_t *ptr;
int ocl = wcslen(execPath);
if (run_cmd) {
- newcmdline = (char *) erts_alloc(ERTS_ALC_T_TMP,
- (ocl + ((orig_need_q) ? 3 : 1)
- + 11)*sizeof(WCHAR));
- memcpy(newcmdline,L"cmd.exe /c ",11*sizeof(WCHAR));
- ptr = (WCHAR *) (newcmdline + (11*sizeof(WCHAR)));
+ newcmdline = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP,
+ (ocl + ((orig_need_q) ? 3 : 1)
+ + 11)*sizeof(wchar_t));
+ memcpy(newcmdline,L"cmd.exe /c ",11*sizeof(wchar_t));
+ ptr = newcmdline + 11;
} else {
- newcmdline = (char *) erts_alloc(ERTS_ALC_T_TMP,
- (ocl + ((orig_need_q) ? 3 : 1))*sizeof(WCHAR));
- ptr = (WCHAR *) newcmdline;
+ newcmdline = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP,
+ (ocl + ((orig_need_q) ? 3 : 1))*sizeof(wchar_t));
+ ptr = (wchar_t *) newcmdline;
}
if (orig_need_q) {
*ptr++ = L'"';
}
- memcpy(ptr,execPath,ocl*sizeof(WCHAR));
+ memcpy(ptr,execPath,ocl*sizeof(wchar_t));
ptr += ocl;
if (orig_need_q) {
*ptr++ = L'"';
@@ -1611,12 +1610,12 @@ create_child_process
*ptr = L'\0';
} else {
int sum = 1; /* '\0' */
- WCHAR **ar = (WCHAR **) argv;
- WCHAR *n;
- char *save_arg0 = NULL;
- if (argv[0] == erts_default_arg0 || run_cmd) {
+ wchar_t **ar = argv;
+ wchar_t *n;
+ wchar_t *save_arg0 = NULL;
+ if (argv[0] == (wchar_t *) erts_default_arg0 || run_cmd) {
save_arg0 = argv[0];
- argv[0] = (char *) execPath;
+ argv[0] = execPath;
}
if (run_cmd) {
sum += 11; /* cmd.exe /c */
@@ -1629,11 +1628,11 @@ create_child_process
sum++; /* space */
++ar;
}
- ar = (WCHAR **) argv;
- newcmdline = erts_alloc(ERTS_ALC_T_TMP, sum*sizeof(WCHAR));
- n = (WCHAR *) newcmdline;
+ ar = argv;
+ newcmdline = (wchar_t *) erts_alloc(ERTS_ALC_T_TMP, sum*sizeof(wchar_t));
+ n = newcmdline;
if (run_cmd) {
- memcpy(n,L"cmd.exe /c ",11*sizeof(WCHAR));
+ memcpy(n,L"cmd.exe /c ",11*sizeof(wchar_t));
n += 11;
}
while (*ar != NULL) {
@@ -1642,7 +1641,7 @@ create_child_process
if (q) {
*n++ = L'"';
}
- memcpy(n,*ar,sum*sizeof(WCHAR));
+ memcpy(n,*ar,sum*sizeof(wchar_t));
n += sum;
if (q) {
*n++ = L'"';
@@ -1657,16 +1656,16 @@ create_child_process
}
DEBUGF(("Creating child process: %s, createFlags = %d\n", newcmdline, createFlags));
- ok = CreateProcessW((WCHAR *) appname,
- (WCHAR *) newcmdline,
- NULL,
- NULL,
- TRUE,
- createFlags | staticCreateFlags |
- CREATE_UNICODE_ENVIRONMENT,
- env,
- (WCHAR *) wd,
- &siStartInfo,
+ ok = CreateProcessW((wchar_t *) appname,
+ (wchar_t *) newcmdline,
+ NULL,
+ NULL,
+ TRUE,
+ createFlags | staticCreateFlags |
+ CREATE_UNICODE_ENVIRONMENT,
+ env,
+ wd,
+ &siStartInfo,
&piProcInfo);
} /* end SPAWN_EXECUTABLE */
@@ -1775,180 +1774,23 @@ static int create_pipe(HANDLE *phRead, HANDLE *phWrite, BOOL inheritRead, BOOL o
return TRUE;
}
-
-
-
-static int application_type
-(
- const char *originalName, /* Name of the application to find. */
- char fullPath[MAX_PATH], /* Filled with complete path to
- * application. */
- BOOL search_in_path, /* If we should search the system wide path */
- BOOL handle_quotes, /* If we should handle quotes around executable */
- int *error_return /* A place to put an error code */
- )
-{
- int applType, i;
- HANDLE hFile;
- char *ext, *rest;
- char buf[2];
- DWORD read;
- IMAGE_DOS_HEADER header;
- static char extensions[][5] = {"", ".com", ".exe", ".bat"};
- int is_quoted;
- int len;
-
- /* Look for the program as an external program. First try the name
- * as it is, then try adding .com, .exe, and .bat, in that order, to
- * the name, looking for an executable.
- * NOTE! that we does not support execution of .com programs on Windows NT
- *
- *
- * Using the raw SearchPath() procedure doesn't do quite what is
- * necessary. If the name of the executable already contains a '.'
- * character, it will not try appending the specified extension when
- * searching (in other words, SearchPath will not find the program
- * "a.b.exe" if the arguments specified "a.b" and ".exe").
- * So, first look for the file as it is named. Then manually append
- * the extensions, looking for a match. (')
- */
-
- len = strlen(originalName);
- is_quoted = handle_quotes && len > 0 && originalName[0] == '"' &&
- originalName[len-1] == '"';
-
- applType = APPL_NONE;
- *error_return = ENOENT;
- for (i = 0; i < (int) (sizeof(extensions) / sizeof(extensions[0])); i++) {
- if(is_quoted) {
- lstrcpyn(fullPath, originalName+1, MAX_PATH - 7);
- len = strlen(fullPath);
- if(len > 0) {
- fullPath[len-1] = '\0';
- }
- } else {
- lstrcpyn(fullPath, originalName, MAX_PATH - 5);
- }
- lstrcat(fullPath, extensions[i]);
- SearchPath((search_in_path) ? NULL : ".", fullPath, NULL, MAX_PATH, fullPath, &rest);
-
- /*
- * Ignore matches on directories or data files, return if identified
- * a known type.
- */
-
- if (GetFileAttributes(fullPath) & FILE_ATTRIBUTE_DIRECTORY) {
- continue;
- }
-
- ext = strrchr(fullPath, '.');
- if ((ext != NULL) && (strcmpi(ext, ".bat") == 0)) {
- *error_return = EACCES;
- applType = APPL_DOS;
- break;
- }
-
- hFile = CreateFile(fullPath, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (hFile == INVALID_HANDLE_VALUE) {
- continue;
- }
-
- *error_return = EACCES; /* If considered an error,
- it's an access error */
- header.e_magic = 0;
- ReadFile(hFile, (void *) &header, sizeof(header), &read, NULL);
- if (header.e_magic != IMAGE_DOS_SIGNATURE) {
- /*
- * Doesn't have the magic number for relocatable executables. If
- * filename ends with .com, assume it's a DOS application anyhow.
- * Note that we didn't make this assumption at first, because some
- * supposed .com files are really 32-bit executables with all the
- * magic numbers and everything.
- */
-
- CloseHandle(hFile);
- if ((ext != NULL) && (strcmpi(ext, ".com") == 0)) {
- applType = APPL_DOS;
- break;
- }
- continue;
- }
- if (header.e_lfarlc != sizeof(header)) {
- /*
- * All Windows 3.X and Win32 and some DOS programs have this value
- * set here. If it doesn't, assume that since it already had the
- * other magic number it was a DOS application.
- */
-
- CloseHandle(hFile);
- applType = APPL_DOS;
- break;
- }
-
- /*
- * The DWORD at header.e_lfanew points to yet another magic number.
- */
-
- buf[0] = '\0';
- SetFilePointer(hFile, header.e_lfanew, NULL, FILE_BEGIN);
- ReadFile(hFile, (void *) buf, 2, &read, NULL);
- CloseHandle(hFile);
-
- if ((buf[0] == 'L') && (buf[1] == 'E')) {
- applType = APPL_DOS;
- } else if ((buf[0] == 'N') && (buf[1] == 'E')) {
- applType = APPL_WIN3X;
- } else if ((buf[0] == 'P') && (buf[1] == 'E')) {
- applType = APPL_WIN32;
- } else {
- continue;
- }
- break;
- }
-
- if (applType == APPL_NONE) {
- return APPL_NONE;
- }
-
- if ((applType == APPL_DOS) || (applType == APPL_WIN3X)) {
- /*
- * Replace long path name of executable with short path name for
- * 16-bit applications. Otherwise the application may not be able
- * to correctly parse its own command line to separate off the
- * application name from the arguments.
- */
-
- GetShortPathName(fullPath, fullPath, MAX_PATH);
- }
- if (is_quoted) {
- /* restore quotes on quoted program name */
- len = strlen(fullPath);
- memmove(fullPath+1,fullPath,len);
- fullPath[0]='"';
- fullPath[len+1]='"';
- fullPath[len+2]='\0';
- }
- return applType;
-}
-
-static int application_type_w (const WCHAR *originalName, /* Name of the application to find. */
- WCHAR wfullpath[MAX_PATH],/* Filled with complete path to
+static int application_type (const wchar_t *originalName, /* Name of the application to find. */
+ wchar_t wfullpath[MAX_PATH],/* Filled with complete path to
* application. */
- BOOL search_in_path, /* If we should search the system wide path */
- BOOL handle_quotes, /* If we should handle quotes around executable */
- int *error_return) /* A place to put an error code */
+ BOOL search_in_path, /* If we should search the system wide path */
+ BOOL handle_quotes, /* If we should handle quotes around executable */
+ int *error_return) /* A place to put an error code */
{
int applType, i;
HANDLE hFile;
- WCHAR *ext, *rest;
+ wchar_t *ext, *rest;
char buf[2];
DWORD read;
IMAGE_DOS_HEADER header;
- static WCHAR extensions[][5] = {L"", L".com", L".exe", L".bat"};
+ static wchar_t extensions[][5] = {L"", L".com", L".exe", L".bat"};
int is_quoted;
int len;
- WCHAR xfullpath[MAX_PATH];
+ wchar_t xfullpath[MAX_PATH];
len = wcslen(originalName);
is_quoted = handle_quotes && len > 0 && originalName[0] == L'"' &&
@@ -2063,7 +1905,7 @@ static int application_type_w (const WCHAR *originalName, /* Name of the applica
if (is_quoted) {
/* restore quotes on quoted program name */
len = wcslen(wfullpath);
- memmove(wfullpath+1,wfullpath,len*sizeof(WCHAR));
+ memmove(wfullpath+1,wfullpath,len*sizeof(wchar_t));
wfullpath[0]=L'"';
wfullpath[len+1]=L'"';
wfullpath[len+2]=L'\0';
@@ -2915,7 +2757,7 @@ void erts_sys_free(ErtsAlcType_t t, void *x, void *p)
void *erts_sys_aligned_alloc(UWord alignment, UWord size)
{
void *ptr;
- ASSERT(alignment && (alignment & ~alignment) == 0); /* power of 2 */
+ ASSERT(alignment && (alignment & (alignment-1)) == 0); /* power of 2 */
ptr = _aligned_malloc((size_t) size, (size_t) alignment);
ASSERT(!ptr || (((UWord) ptr) & (alignment - 1)) == 0);
return ptr;
@@ -2923,14 +2765,14 @@ void *erts_sys_aligned_alloc(UWord alignment, UWord size)
void erts_sys_aligned_free(UWord alignment, void *ptr)
{
- ASSERT(alignment && (alignment & ~alignment) == 0); /* power of 2 */
+ ASSERT(alignment && (alignment & (alignment-1)) == 0); /* power of 2 */
_aligned_free(ptr);
}
void *erts_sys_aligned_realloc(UWord alignment, void *ptr, UWord size, UWord old_size)
{
void *new_ptr;
- ASSERT(alignment && (alignment & ~alignment) == 0); /* power of 2 */
+ ASSERT(alignment && (alignment & (alignment-1)) == 0); /* power of 2 */
new_ptr = _aligned_realloc(ptr, (size_t) size, (size_t) alignment);
ASSERT(!new_ptr || (((UWord) new_ptr) & (alignment - 1)) == 0);
return new_ptr;
@@ -3355,7 +3197,7 @@ void erl_sys_init(void)
noinherit_std_handle(STD_ERROR_HANDLE);
#ifdef ERTS_SMP
- erts_smp_tsd_key_create(&win32_errstr_key);
+ erts_smp_tsd_key_create(&win32_errstr_key,"win32_errstr_key");
InitializeCriticalSection(&htbc_lock);
#endif
erts_smp_atomic_init_nob(&pipe_creation_counter,0);
diff --git a/erts/emulator/test/Makefile b/erts/emulator/test/Makefile
index f02ca3cb98..dfbe47786a 100644
--- a/erts/emulator/test/Makefile
+++ b/erts/emulator/test/Makefile
@@ -31,6 +31,7 @@ MODULES= \
a_SUITE \
after_SUITE \
alloc_SUITE \
+ async_ports_SUITE \
beam_SUITE \
beam_literals_SUITE \
bif_SUITE \
@@ -68,6 +69,7 @@ MODULES= \
hash_SUITE \
hibernate_SUITE \
list_bif_SUITE \
+ map_SUITE \
match_spec_SUITE \
module_info_SUITE \
monitor_SUITE \
diff --git a/erts/emulator/test/a_SUITE.erl b/erts/emulator/test/a_SUITE.erl
index 195c9c0a5f..17579be416 100644
--- a/erts/emulator/test/a_SUITE.erl
+++ b/erts/emulator/test/a_SUITE.erl
@@ -97,23 +97,13 @@ display_check_io(ChkIo) ->
catch erlang:display('--- CHECK IO INFO ---'),
catch erlang:display(ChkIo),
catch erts_debug:set_internal_state(available_internal_state, true),
- NoOfErrorFds = (catch erts_debug:get_internal_state(check_io_debug)),
+ NoOfErrorFds = (catch element(1, erts_debug:get_internal_state(check_io_debug))),
catch erlang:display({'NoOfErrorFds', NoOfErrorFds}),
catch erts_debug:set_internal_state(available_internal_state, false),
catch erlang:display('--- CHECK IO INFO ---'),
ok.
get_check_io_info() ->
- ChkIo = erlang:system_info(check_io),
- case lists:keysearch(pending_updates, 1, ChkIo) of
- {value, {pending_updates, 0}} ->
- display_check_io(ChkIo),
- ChkIo;
- false ->
- ChkIo;
- _ ->
- receive after 10 -> ok end,
- get_check_io_info()
- end.
+ z_SUITE:get_check_io_info().
diff --git a/erts/emulator/test/async_ports_SUITE.erl b/erts/emulator/test/async_ports_SUITE.erl
new file mode 100644
index 0000000000..c89b3655ff
--- /dev/null
+++ b/erts/emulator/test/async_ports_SUITE.erl
@@ -0,0 +1,118 @@
+-module(async_ports_SUITE).
+
+-include_lib("common_test/include/ct.hrl").
+
+-compile(export_all).
+
+-define(PACKET_SIZE, (10 * 1024 * 8)).
+-define(CPORT_DELAY, 100).
+-define(TEST_LOOPS_COUNT, 100000).
+-define(SLEEP_BEFORE_CHECK, 1000).
+-define(TEST_PROCS_COUNT, 2).
+-define(TC_TIMETRAP_SECONDS, 10).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ permanent_busy_test
+ ].
+
+permanent_busy_test(Config) ->
+ ct:timetrap({seconds, ?TC_TIMETRAP_SECONDS}),
+ ExePath = filename:join(?config(data_dir, Config), "cport"),
+
+ Self = self(),
+ spawn_link(
+ fun() ->
+ Block = <<0:?PACKET_SIZE>>,
+
+ Port = open_port(ExePath),
+
+ Testers =
+ lists:map(
+ fun(_) ->
+ erlang:spawn_link(?MODULE, run_loop,
+ [Self,
+ Port,
+ Block,
+ ?TEST_LOOPS_COUNT,
+ 0])
+ end,
+ lists:seq(1, ?TEST_PROCS_COUNT)),
+ Self ! {test_info, Port, Testers},
+ endless_flush(Port)
+ end),
+
+ receive
+ {test_info, Port, Testers} ->
+ MaxWaitTime = round(0.7 * ?TC_TIMETRAP_SECONDS * 1000),
+ ct:log("wait testers, maximum ~w mcsec~n", [MaxWaitTime]),
+ ok = wait_testers(MaxWaitTime, Testers),
+ timer:sleep(?SLEEP_BEFORE_CHECK),
+ case erlang:port_command(Port, <<"test">>, [nosuspend]) of
+ false ->
+ exit(port_dead);
+ true ->
+ ok
+ end
+ end.
+
+wait_testers(Timeout, Testers) ->
+ lists:foldl(
+ fun(Pid, AccIn) ->
+ StartWait = os:timestamp(),
+ receive
+ {Pid, port_dead} ->
+ recalc_timeout(AccIn, StartWait)
+ after AccIn ->
+ Pid ! stop,
+ recalc_timeout(AccIn, StartWait)
+ end
+ end, Timeout, Testers),
+ ok.
+
+recalc_timeout(TimeoutIn, WaitStart) ->
+ erlang:max(0, TimeoutIn - round(timer:now_diff(os:timestamp(), WaitStart)) div 1000).
+
+open_port(ExePath) ->
+ erlang:open_port({spawn, ExePath ++ " 100"}, [{packet, 4}, eof, exit_status, use_stdio, binary]).
+
+run_loop(RootProc, Port, Block, CheckLimit, BusyCnt) ->
+ receive
+ stop ->
+ ok
+ after 0 ->
+ case erlang:port_command(Port, Block, [nosuspend]) of
+ true ->
+ run_loop(RootProc, Port, Block, CheckLimit, 0);
+ false ->
+ if
+ BusyCnt + 1 > CheckLimit ->
+ check_dead(RootProc, Port, Block, CheckLimit);
+ true ->
+ run_loop(RootProc, Port, Block, CheckLimit, BusyCnt + 1)
+ end
+ end
+ end.
+
+check_dead(RootProc, Port, Block, CheckLimit) ->
+ ct:log("~p: check port dead~n", [self()]),
+ timer:sleep(?SLEEP_BEFORE_CHECK),
+ case erlang:port_command(Port, Block, [nosuspend]) of
+ true ->
+ ct:log("not dead~n"),
+ run_loop(RootProc, Port, Block, CheckLimit, 0);
+ false ->
+ ct:log("port dead: ~p~n", [Port]),
+ RootProc ! {self(), port_dead},
+ ok
+ end.
+
+endless_flush(Port) ->
+ receive
+ {Port, {data, _}} ->
+ endless_flush(Port);
+ {Port, SomethingWrong} ->
+ erlang:error({someting_wrong, SomethingWrong})
+ end.
diff --git a/erts/emulator/test/async_ports_SUITE_data/Makefile.src b/erts/emulator/test/async_ports_SUITE_data/Makefile.src
new file mode 100644
index 0000000000..56da3fbe12
--- /dev/null
+++ b/erts/emulator/test/async_ports_SUITE_data/Makefile.src
@@ -0,0 +1,15 @@
+CC = @CC@
+LD = @LD@
+CFLAGS = @CFLAGS@ @DEFS@
+CROSSLDFLAGS = @CROSSLDFLAGS@
+
+PROGS = cport@exe@
+
+
+all: $(PROGS)
+
+cport@exe@: cport@obj@
+ $(LD) $(CROSSLDFLAGS) -o cport cport@obj@ @LIBS@
+
+cport@obj@: cport.c
+ $(CC) -c -o cport@obj@ $(CFLAGS) cport.c
diff --git a/erts/emulator/test/async_ports_SUITE_data/cport.c b/erts/emulator/test/async_ports_SUITE_data/cport.c
new file mode 100644
index 0000000000..033aff382a
--- /dev/null
+++ b/erts/emulator/test/async_ports_SUITE_data/cport.c
@@ -0,0 +1,81 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#ifdef __WIN32__
+# include "windows.h"
+# include "winbase.h"
+#else
+# include <unistd.h>
+#endif
+
+typedef unsigned char byte;
+
+int read_cmd(byte *buf)
+{
+ int len;
+ if (read_exact(buf, 4) != 4)
+ return(-1);
+
+ len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+ return read_exact(buf, len);
+}
+
+int write_cmd(byte *buf, int len)
+{
+ byte li[4];
+ li[0] = (len >> 24) & 0xff;
+ li[1] = (len >> 16) & 0xff;
+ li[2] = (len >> 8) & 0xff;
+ li[3] = len & 0xff;
+ write_exact(&li, 4);
+
+ return write_exact(buf, len);
+}
+
+int read_exact(byte *buf, int len)
+{
+ int i, got=0;
+ do {
+ if ((i = read(0, buf+got, len-got)) <= 0)
+ {
+ return(i);
+ }
+ got += i;
+ } while (got<len);
+ return len;
+}
+
+int write_exact(byte *buf, int len)
+{
+ int i, wrote = 0;
+ do {
+ if ((i = write(1, buf+wrote, len-wrote)) < 0)
+ return (i);
+ wrote += i;
+ } while (wrote<len);
+ return len;
+}
+
+byte static_buf[31457280]; // 30 mb
+
+int main(int argc, char **argv) {
+ int sleep_time = atoi(argv[1]);
+ int fn, arg, res;
+ byte *buf = &static_buf[0];
+ int len = 0;
+ if (sleep_time <= 0)
+ sleep_time = 0;
+#ifdef __WIN32__
+ else
+ sleep_time = ((sleep_time - 1) / 1000) + 1; /* Milli seconds */
+#endif
+ while ((len = read_cmd(buf)) > 0) {
+#ifdef __WIN32__
+ Sleep((DWORD) sleep_time);
+#else
+ usleep(sleep_time);
+#endif
+ write_cmd(buf, len);
+ }
+}
diff --git a/erts/emulator/test/big_SUITE.erl b/erts/emulator/test/big_SUITE.erl
index 413bd3bcae..3193d56e2a 100644
--- a/erts/emulator/test/big_SUITE.erl
+++ b/erts/emulator/test/big_SUITE.erl
@@ -23,7 +23,7 @@
init_per_group/2,end_per_group/2]).
-export([t_div/1, eq_28/1, eq_32/1, eq_big/1, eq_math/1, big_literals/1,
borders/1, negative/1, big_float_1/1, big_float_2/1,
- shift_limit_1/1, powmod/1, system_limit/1, otp_6692/1]).
+ shift_limit_1/1, powmod/1, system_limit/1, toobig/1, otp_6692/1]).
%% Internal exports.
-export([eval/1]).
@@ -40,7 +40,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[t_div, eq_28, eq_32, eq_big, eq_math, big_literals,
borders, negative, {group, big_float}, shift_limit_1,
- powmod, system_limit, otp_6692].
+ powmod, system_limit, toobig, otp_6692].
groups() ->
[{big_float, [], [big_float_1, big_float_2]}].
@@ -370,6 +370,16 @@ maxbig() ->
id(I) -> I.
+toobig(Config) when is_list(Config) ->
+ ?line {'EXIT',{{badmatch,_},_}} = (catch toobig()),
+ ok.
+
+toobig() ->
+ A = erlang:term_to_binary(lists:seq(1000000, 2200000)),
+ ASize = erlang:bit_size(A),
+ <<ANr:ASize>> = A, % should fail
+ ANr band ANr.
+
otp_6692(suite) ->
[];
otp_6692(doc) ->
diff --git a/erts/emulator/test/binary_SUITE.erl b/erts/emulator/test/binary_SUITE.erl
index a340a805b5..44e9e4f243 100644
--- a/erts/emulator/test/binary_SUITE.erl
+++ b/erts/emulator/test/binary_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -58,13 +58,14 @@
ordering/1,unaligned_order/1,gc_test/1,
bit_sized_binary_sizes/1,
otp_6817/1,deep/1,obsolete_funs/1,robustness/1,otp_8117/1,
- otp_8180/1, ttb_trap/1]).
+ otp_8180/1, trapping/1, large/1,
+ error_after_yield/1, cmp_old_impl/1]).
%% Internal exports.
--export([sleeper/0,ttb_loop/2]).
+-export([sleeper/0,trapping_loop/4]).
suite() -> [{ct_hooks,[ts_install_cth]},
- {timetrap,{minutes,2}}].
+ {timetrap,{minutes,4}}].
all() ->
[copy_terms, conversions, deep_lists, deep_bitstr_lists,
@@ -76,7 +77,8 @@ all() ->
bad_term_to_binary, more_bad_terms, otp_5484, otp_5933,
ordering, unaligned_order, gc_test,
bit_sized_binary_sizes, otp_6817, otp_8117, deep,
- obsolete_funs, robustness, otp_8180, ttb_trap].
+ obsolete_funs, robustness, otp_8180, trapping, large,
+ error_after_yield, cmp_old_impl].
groups() ->
[].
@@ -447,26 +449,26 @@ terms(Config) when is_list(Config) ->
Sz1 when is_integer(Sz1), size(Bin1) =< Sz1 ->
ok
end,
- Term = binary_to_term(Bin),
- Term = binary_to_term(Bin, [safe]),
+ Term = binary_to_term_stress(Bin),
+ Term = binary_to_term_stress(Bin, [safe]),
Unaligned = make_unaligned_sub_binary(Bin),
- Term = binary_to_term(Unaligned),
- Term = binary_to_term(Unaligned, []),
- Term = binary_to_term(Bin, [safe]),
+ Term = binary_to_term_stress(Unaligned),
+ Term = binary_to_term_stress(Unaligned, []),
+ Term = binary_to_term_stress(Bin, [safe]),
BinC = erlang:term_to_binary(Term, [compressed]),
- Term = binary_to_term(BinC),
+ Term = binary_to_term_stress(BinC),
true = size(BinC) =< size(Bin),
Bin = term_to_binary(Term, [{compressed,0}]),
terms_compression_levels(Term, size(Bin), 1),
UnalignedC = make_unaligned_sub_binary(BinC),
- Term = binary_to_term(UnalignedC)
+ Term = binary_to_term_stress(UnalignedC)
end,
?line test_terms(TestFun),
ok.
terms_compression_levels(Term, UncompressedSz, Level) when Level < 10 ->
BinC = erlang:term_to_binary(Term, [{compressed,Level}]),
- Term = binary_to_term(BinC),
+ Term = binary_to_term_stress(BinC),
Sz = byte_size(BinC),
true = Sz =< UncompressedSz,
terms_compression_levels(Term, UncompressedSz, Level+1);
@@ -474,23 +476,23 @@ terms_compression_levels(_, _, _) -> ok.
terms_float(Config) when is_list(Config) ->
?line test_floats(fun(Term) ->
- Bin0 = term_to_binary(Term),
Bin0 = term_to_binary(Term, [{minor_version,0}]),
- Term = binary_to_term(Bin0),
+ Term = binary_to_term_stress(Bin0),
+ Bin1 = term_to_binary(Term),
Bin1 = term_to_binary(Term, [{minor_version,1}]),
- Term = binary_to_term(Bin1),
+ Term = binary_to_term_stress(Bin1),
true = size(Bin1) < size(Bin0),
- Size0 = erlang:external_size(Term),
- Size00 = erlang:external_size(Term, [{minor_version, 0}]),
- Size1 = erlang:external_size(Term, [{minor_version, 1}]),
- true = (Size0 =:= Size00),
+ Size0 = erlang:external_size(Term, [{minor_version, 0}]),
+ Size1 = erlang:external_size(Term),
+ Size11 = erlang:external_size(Term, [{minor_version, 1}]),
+ true = (Size1 =:= Size11),
true = Size1 < Size0
end).
float_middle_endian(Config) when is_list(Config) ->
%% Testing for roundtrip is not enough.
?line <<131,70,63,240,0,0,0,0,0,0>> = term_to_binary(1.0, [{minor_version,1}]),
- ?line 1.0 = binary_to_term(<<131,70,63,240,0,0,0,0,0,0>>).
+ ?line 1.0 = binary_to_term_stress(<<131,70,63,240,0,0,0,0,0,0>>).
external_size(Config) when is_list(Config) ->
%% Build a term whose external size only fits in a big num (on 32-bit CPU).
@@ -506,8 +508,8 @@ external_size(Config) when is_list(Config) ->
io:format("Unaligned size: ~p\n", [Sz2]),
?line ?t:fail()
end,
- ?line erlang:external_size(Bin) =:= erlang:external_size(Bin, [{minor_version, 1}]),
- ?line erlang:external_size(Unaligned) =:= erlang:external_size(Unaligned, [{minor_version, 1}]).
+ true = (erlang:external_size(Bin) =:= erlang:external_size(Bin, [{minor_version, 1}])),
+ true = (erlang:external_size(Unaligned) =:= erlang:external_size(Unaligned, [{minor_version, 1}])).
external_size_1(Term, Size0, Limit) when Size0 < Limit ->
case erlang:external_size(Term) of
@@ -608,10 +610,10 @@ bad_binary_to_term(Config) when is_list(Config) ->
ok.
bad_bin_to_term(BadBin) ->
- {'EXIT',{badarg,_}} = (catch binary_to_term(BadBin)).
+ {'EXIT',{badarg,_}} = (catch binary_to_term_stress(BadBin)).
bad_bin_to_term(BadBin,Opts) ->
- {'EXIT',{badarg,_}} = (catch binary_to_term(BadBin,Opts)).
+ {'EXIT',{badarg,_}} = (catch binary_to_term_stress(BadBin,Opts)).
safe_binary_to_term2(doc) -> "Test safety options for binary_to_term/2";
safe_binary_to_term2(Config) when is_list(Config) ->
@@ -622,7 +624,7 @@ safe_binary_to_term2(Config) when is_list(Config) ->
BadRef = <<131,114,0,3,BadHostAtom/binary,0,<<0,0,0,255>>/binary,
Empty/binary,Empty/binary>>,
?line bad_bin_to_term(BadRef, [safe]), % good ref, with a bad atom
- ?line fullsweep_after = binary_to_term(<<131,100,0,15,"fullsweep_after">>, [safe]), % should be a good atom
+ ?line fullsweep_after = binary_to_term_stress(<<131,100,0,15,"fullsweep_after">>, [safe]), % should be a good atom
BadExtFun = <<131,113,100,0,4,98,108,117,101,100,0,4,109,111,111,110,97,3>>,
?line bad_bin_to_term(BadExtFun, [safe]),
ok.
@@ -679,14 +681,14 @@ corrupter0(Term) ->
corrupter(Bin, Pos) when Pos >= 0 ->
?line {ShorterBin, Rest} = split_binary(Bin, Pos),
- ?line catch binary_to_term(ShorterBin), %% emulator shouldn't crash
+ ?line catch binary_to_term_stress(ShorterBin), %% emulator shouldn't crash
?line MovedBin = list_to_binary([ShorterBin]),
- ?line catch binary_to_term(MovedBin), %% emulator shouldn't crash
+ ?line catch binary_to_term_stress(MovedBin), %% emulator shouldn't crash
%% Bit faults, shouldn't crash
<<Byte,Tail/binary>> = Rest,
Fun = fun(M) -> FaultyByte = Byte bxor M,
- catch binary_to_term(<<ShorterBin/binary,
+ catch binary_to_term_stress(<<ShorterBin/binary,
FaultyByte, Tail/binary>>) end,
?line lists:foreach(Fun,[1,2,4,8,16,32,64,128,255]),
?line corrupter(Bin, Pos-1);
@@ -700,7 +702,7 @@ more_bad_terms(Config) when is_list(Config) ->
?line ok = io:format("File: ~s\n", [BadFile]),
?line case file:read_file(BadFile) of
{ok,Bin} ->
- ?line {'EXIT',{badarg,_}} = (catch binary_to_term(Bin)),
+ ?line {'EXIT',{badarg,_}} = (catch binary_to_term_stress(Bin)),
ok;
Other ->
?line ?t:fail(Other)
@@ -709,7 +711,7 @@ more_bad_terms(Config) when is_list(Config) ->
otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
<<131,
104,2, %Tuple, 2 elements
103, %Pid
@@ -722,7 +724,7 @@ otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
<<131,
104,2, %Tuple, 2 elements
103, %Pid
@@ -734,13 +736,13 @@ otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
%% A old-type fun in a list containing a bad creator pid.
<<131,108,0,0,0,1,117,0,0,0,0,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,255,255,0,25,255,0,0,0,0,100,0,1,116,97,0,98,6,142,121,72,106>>)),
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
%% A new-type fun in a list containing a bad creator pid.
%%
<<131,
@@ -752,7 +754,7 @@ otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
%% A new-type fun in a list containing a bad module.
<<131,
108,0,0,0,1, %List, 1 element
@@ -763,7 +765,7 @@ otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
%% A new-type fun in a list containing a bad index.
<<131,
108,0,0,0,1, %List, 1 element
@@ -775,7 +777,7 @@ otp_5484(Config) when is_list(Config) ->
?line {'EXIT',_} =
(catch
- binary_to_term(
+ binary_to_term_stress(
%% A new-type fun in a list containing a bad unique value.
<<131,
108,0,0,0,1, %List, 1 element
@@ -788,46 +790,46 @@ otp_5484(Config) when is_list(Config) ->
%% An absurdly large atom.
?line {'EXIT',_} =
- (catch binary_to_term(iolist_to_binary([<<131,100,65000:16>>|
+ (catch binary_to_term_stress(iolist_to_binary([<<131,100,65000:16>>|
lists:duplicate(65000, 42)]))),
%% Longer than 255 characters.
?line {'EXIT',_} =
- (catch binary_to_term(iolist_to_binary([<<131,100,256:16>>|
+ (catch binary_to_term_stress(iolist_to_binary([<<131,100,256:16>>|
lists:duplicate(256, 42)]))),
%% OTP-7218. Thanks to Matthew Dempsky. Also make sure that we
%% cover the other error cases for external funs (EXPORT_EXT).
?line {'EXIT',_} =
- (catch binary_to_term(
+ (catch binary_to_term_stress(
<<131,
113, %EXPORT_EXP
97,13, %Integer: 13
97,13, %Integer: 13
97,13>>)), %Integer: 13
?line {'EXIT',_} =
- (catch binary_to_term(
+ (catch binary_to_term_stress(
<<131,
113, %EXPORT_EXP
100,0,1,64, %Atom: '@'
97,13, %Integer: 13
97,13>>)), %Integer: 13
?line {'EXIT',_} =
- (catch binary_to_term(
+ (catch binary_to_term_stress(
<<131,
113, %EXPORT_EXP
100,0,1,64, %Atom: '@'
100,0,1,64, %Atom: '@'
106>>)), %NIL
?line {'EXIT',_} =
- (catch binary_to_term(
+ (catch binary_to_term_stress(
<<131,
113, %EXPORT_EXP
100,0,1,64, %Atom: '@'
100,0,1,64, %Atom: '@'
98,255,255,255,255>>)), %Integer: -1
?line {'EXIT',_} =
- (catch binary_to_term(
+ (catch binary_to_term_stress(
<<131,
113, %EXPORT_EXP
100,0,1,64, %Atom: '@'
@@ -835,7 +837,7 @@ otp_5484(Config) when is_list(Config) ->
113,97,13,97,13,97,13>>)), %fun 13:13/13
%% Bad funs.
- ?line {'EXIT',_} = (catch binary_to_term(fake_fun(0, lists:seq(0, 256)))),
+ ?line {'EXIT',_} = (catch binary_to_term_stress(fake_fun(0, lists:seq(0, 256)))),
ok.
fake_fun(Arity, Env0) ->
@@ -869,7 +871,7 @@ try_bad_lengths(B) ->
try_bad_lengths(B, L) when L > 16#FFFFFFF0 ->
Bin = <<B/binary,L:32>>,
io:format("~p\n", [Bin]),
- {'EXIT',_} = (catch binary_to_term(Bin)),
+ {'EXIT',_} = (catch binary_to_term_stress(Bin)),
try_bad_lengths(B, L-1);
try_bad_lengths(_, _) -> ok.
@@ -923,7 +925,7 @@ otp_6817_try_bin(Bin) ->
%% If the bug is present, the heap pointer will moved when the invalid term
%% is found and we will have a linked list passing through the limbo area
%% between the heap top and the stack pointer.
- catch binary_to_term(Bin),
+ catch binary_to_term_stress(Bin),
%% If the bug is present, we will overwrite the pointers in the limbo area.
Filler = erlang:make_tuple(1024, 16#3FA),
@@ -935,7 +937,7 @@ otp_6817_try_bin(Bin) ->
otp_8117(doc) -> "Some bugs in binary_to_term when 32-bit integers are negative.";
otp_8117(suite) -> [];
otp_8117(Config) when is_list(Config) ->
- [otp_8117_do(Op,-(1 bsl N)) || Op <- ['fun',list,tuple],
+ [otp_8117_do(Op,-(1 bsl N)) || Op <- ['fun',named_fun,list,tuple],
N <- lists:seq(0,31)],
ok.
@@ -944,6 +946,11 @@ otp_8117_do('fun',Neg) ->
FunBin = term_to_binary(fun() -> ok end),
?line <<B1:27/binary,_NumFree:32,Rest/binary>> = FunBin,
?line bad_bin_to_term(<<B1/binary,Neg:32,Rest/binary>>);
+otp_8117_do(named_fun,Neg) ->
+ % Named fun with negative num_free
+ FunBin = term_to_binary(fun F() -> F end),
+ ?line <<B1:27/binary,_NumFree:32,Rest/binary>> = FunBin,
+ ?line bad_bin_to_term(<<B1/binary,Neg:32,Rest/binary>>);
otp_8117_do(list,Neg) ->
%% List with negative length
?line bad_bin_to_term(<<131,104,2,108,Neg:32,97,11,104,1,97,12,97,13,106,97,14>>);
@@ -1233,19 +1240,30 @@ bit_sized_binary_sizes(Config) when is_list(Config) ->
bsbs_1(A) ->
BinSize = 32+A,
io:format("A: ~p BinSize: ~p", [A,BinSize]),
- Bin = binary_to_term(<<131,$M,5:32,A,0,0,0,0,0>>),
+ Bin = binary_to_term_stress(<<131,$M,5:32,A,0,0,0,0,0>>),
BinSize = bit_size(Bin).
+%% lists:foldl(_,_,lists:seq(_,_)) with less heap consumption
+lists_foldl_seq(Fun, Acc0, N, To) when N =< To ->
+ Acc1 = Fun(N, Acc0),
+ lists_foldl_seq(Fun, Acc1, N+1, To);
+
+lists_foldl_seq(_, Acc, _, _) ->
+ Acc.
+
deep(Config) when is_list(Config) ->
- ?line deep_roundtrip(lists:foldl(fun(E, A) ->
- [E,A]
- end, [], lists:seq(1, 1000000))),
- ?line deep_roundtrip(lists:foldl(fun(E, A) ->
- {E,A}
- end, [], lists:seq(1, 1000000))),
- ?line deep_roundtrip(lists:foldl(fun(E, A) ->
- fun() -> {E,A} end
- end, [], lists:seq(1, 1000000))),
+ deep_roundtrip(lists_foldl_seq(fun(E, A) ->
+ [E,A]
+ end, [], 1, 1000000)),
+ erlang:garbage_collect(),
+ deep_roundtrip(lists_foldl_seq(fun(E, A) ->
+ {E,A}
+ end, [], 1, 1000000)),
+ erlang:garbage_collect(),
+ deep_roundtrip(lists_foldl_seq(fun(E, A) ->
+ fun() -> {E,A} end
+ end, [], 1, 1000000)),
+ erlang:garbage_collect(),
ok.
deep_roundtrip(T) ->
@@ -1285,29 +1303,29 @@ obsolete_fun(Fun) ->
Tuple = no_fun_roundtrip(Fun).
no_fun_roundtrip(Term) ->
- binary_to_term(erts_debug:get_internal_state({term_to_binary_no_funs,Term})).
+ binary_to_term_stress(erts_debug:get_internal_state({term_to_binary_no_funs,Term})).
%% Test non-standard encodings never generated by term_to_binary/1
%% but recognized by binary_to_term/1.
robustness(Config) when is_list(Config) ->
- ?line [] = binary_to_term(<<131,107,0,0>>), %Empty string.
- ?line [] = binary_to_term(<<131,108,0,0,0,0,106>>), %Zero-length list.
+ ?line [] = binary_to_term_stress(<<131,107,0,0>>), %Empty string.
+ ?line [] = binary_to_term_stress(<<131,108,0,0,0,0,106>>), %Zero-length list.
%% {[],a} where [] is a zero-length list.
- ?line {[],a} = binary_to_term(<<131,104,2,108,0,0,0,0,106,100,0,1,97>>),
+ ?line {[],a} = binary_to_term_stress(<<131,104,2,108,0,0,0,0,106,100,0,1,97>>),
%% {42,a} where 42 is a zero-length list with 42 in the tail.
- ?line {42,a} = binary_to_term(<<131,104,2,108,0,0,0,0,97,42,100,0,1,97>>),
+ ?line {42,a} = binary_to_term_stress(<<131,104,2,108,0,0,0,0,97,42,100,0,1,97>>),
%% {{x,y},a} where {x,y} is a zero-length list with {x,y} in the tail.
- ?line {{x,y},a} = binary_to_term(<<131,104,2,108,0,0,0,0,
+ ?line {{x,y},a} = binary_to_term_stress(<<131,104,2,108,0,0,0,0,
104,2,100,0,1,120,100,0,1,
121,100,0,1,97>>),
%% Bignums fitting in 32 bits.
- ?line 16#7FFFFFFF = binary_to_term(<<131,98,127,255,255,255>>),
- ?line -1 = binary_to_term(<<131,98,255,255,255,255>>),
+ ?line 16#7FFFFFFF = binary_to_term_stress(<<131,98,127,255,255,255>>),
+ ?line -1 = binary_to_term_stress(<<131,98,255,255,255,255>>),
ok.
@@ -1325,44 +1343,241 @@ run_otp_8180(Name) ->
?line {ok,Bins} = file:consult(Name),
[begin
io:format("~p\n", [Bin]),
- ?line {'EXIT',{badarg,_}} = (catch binary_to_term(Bin))
+ ?line {'EXIT',{badarg,_}} = (catch binary_to_term_stress(Bin))
end || Bin <- Bins],
ok.
-%% Test that exit and GC during term_to_binary trap does not crash.
-ttb_trap(Config) when is_list(Config)->
- case erlang:system_info(wordsize) of
- N when N < 8 ->
- {skipped, "Only on 64bit machines"};
- _ ->
- do_ttb_trap(5)
- end.
-
-do_ttb_trap(0) ->
+%% Test that exit and GC during trapping term_to_binary and binary_to_term
+%% does not crash.
+trapping(Config) when is_list(Config)->
+ do_trapping(5, term_to_binary,
+ fun() -> [lists:duplicate(2000000,2000000)] end),
+ do_trapping(5, binary_to_term,
+ fun() -> [term_to_binary(lists:duplicate(2000000,2000000))] end),
+ do_trapping(5, binary_to_list,
+ fun() -> [list_to_binary(lists:duplicate(2000000,$x))] end),
+ do_trapping(5, list_to_binary,
+ fun() -> [lists:duplicate(2000000,$x)] end),
+ do_trapping(5, bitstring_to_list,
+ fun() -> [list_to_bitstring([lists:duplicate(2000000,$x),<<7:4>>])] end),
+ do_trapping(5, list_to_bitstring,
+ fun() -> [[lists:duplicate(2000000,$x),<<7:4>>]] end)
+ .
+
+do_trapping(0, _, _) ->
ok;
-do_ttb_trap(N) ->
- Pid = spawn(?MODULE,ttb_loop,[1000,self()]),
+do_trapping(N, Bif, ArgFun) ->
+ io:format("N=~p: Do ~p ~s gc.\n", [N, Bif, case N rem 2 of 0 -> "with"; 1 -> "without" end]),
+ Pid = spawn(?MODULE,trapping_loop,[Bif, ArgFun, 1000, self()]),
receive ok -> ok end,
receive after 100 -> ok end,
- erlang:garbage_collect(Pid),
- receive after 100 -> ok end,
+ Ref = make_ref(),
+ case N rem 2 of
+ 0 -> erlang:garbage_collect(Pid, [{async,Ref}]),
+ receive after 100 -> ok end;
+ 1 -> void
+ end,
exit(Pid,kill),
+ case N rem 2 of
+ 0 -> receive {garbage_collect, Ref, _} -> ok end;
+ 1 -> void
+ end,
receive after 1 -> ok end,
- do_ttb_trap(N-1).
+ do_trapping(N-1, Bif, ArgFun).
-ttb_loop(N,Pid) ->
- Term = lists:duplicate(2000000,2000000),
+trapping_loop(Bif, ArgFun, N, Pid) ->
+ Args = ArgFun(),
Pid ! ok,
- ttb_loop2(N,Term).
-ttb_loop2(0,_T) ->
+ trapping_loop2(Bif,Args,N).
+trapping_loop2(_,_,0) ->
ok;
-ttb_loop2(N,T) ->
- apply(erlang,term_to_binary,[T]),
- ttb_loop2(N-1,T).
+trapping_loop2(Bif,Args,N) ->
+ apply(erlang,Bif,Args),
+ trapping_loop2(Bif, Args, N-1).
+
+large(Config) when is_list(Config) ->
+ List = lists:flatten(lists:map(fun (_) ->
+ [0,1,2,3,4,5,6,7,8]
+ end,
+ lists:seq(1, 131072))),
+ Bin = list_to_binary(List),
+ List = binary_to_list(Bin),
+ PartList = lists:reverse(tl(tl(lists:reverse(tl(tl(List)))))),
+ PartList = binary_to_list(Bin, 3, length(List)-2),
+ ListBS = List ++ [<<7:4>>],
+ ListBS = bitstring_to_list(list_to_bitstring(ListBS)),
+ BitStr1 = list_to_bitstring(lists:duplicate(1024*1024, [<<1,5:3>>])),
+ BitStr1 = list_to_bitstring(bitstring_to_list(BitStr1)),
+ BitStr2 = list_to_bitstring([lists:duplicate(512*1024, [<<1,5:3>>]),
+ Bin]),
+ BitStr2 = list_to_bitstring(bitstring_to_list(BitStr2)),
+ ok.
+
+error_after_yield(Config) when is_list(Config) ->
+ L2BTrap = {erts_internal, list_to_binary_continue, 1},
+ error_after_yield(badarg, erlang, list_to_binary, 1, fun () -> [[mk_list(1000000), oops]] end, L2BTrap),
+ error_after_yield(badarg, erlang, iolist_to_binary, 1, fun () -> [[list2iolist(mk_list(1000000)), oops]] end, L2BTrap),
+ error_after_yield(badarg, erlang, list_to_bitstring, 1, fun () -> [[list2bitstrlist(mk_list(1000000)), oops]] end, L2BTrap),
+ error_after_yield(badarg, binary, list_to_bin, 1, fun () -> [[mk_list(1000000), oops]] end, L2BTrap),
+ B2TTrap = {erts_internal, binary_to_term_trap, 1},
+
+ error_after_yield(badarg, erlang, binary_to_term, 1, fun () -> [error_after_yield_bad_ext_term()] end, B2TTrap),
+ error_after_yield(badarg, erlang, binary_to_term, 2, fun () -> [error_after_yield_bad_ext_term(), [safe]] end, B2TTrap),
+
+ case erlang:system_info(wordsize) of
+ 4 ->
+ SysLimitSz = 1 bsl 32,
+ error_after_yield(system_limit, erlang, list_to_binary, 1, fun () -> [[huge_iolist(SysLimitSz), $x]] end, L2BTrap),
+ error_after_yield(system_limit, erlang, iolist_to_binary, 1, fun () -> [[huge_iolist(SysLimitSz), $x]] end, L2BTrap),
+ error_after_yield(system_limit, erlang, list_to_bitstring, 1, fun () -> [[huge_iolist(SysLimitSz), $x]] end, L2BTrap),
+ error_after_yield(system_limit, binary, list_to_bin, 1, fun () -> [[huge_iolist(SysLimitSz), $x]] end, L2BTrap);
+ 8 ->
+ % Takes waaaay to long time to test system_limit on 64-bit archs...
+ ok
+ end,
+ ok.
+
+error_after_yield(Type, M, F, AN, AFun, TrapFunc) ->
+ io:format("Testing ~p for ~p:~p/~p~n", [Type, M, F, AN]),
+ Tracer = self(),
+ {Pid, Mon} = spawn_monitor(fun () ->
+ A = AFun(),
+ try
+ erlang:yield(),
+ erlang:trace(self(),true,[running,{tracer,Tracer}]),
+ apply(M, F, A),
+ exit({unexpected_success, {M, F, A}})
+ catch
+ error:Type ->
+ erlang:trace(self(),false,[running,{tracer,Tracer}]),
+ %% We threw the exception from the native
+ %% function we trapped to, but we want
+ %% the BIF that originally was called
+ %% to appear in the stack trace.
+ [{M, F, A, _} | _] = erlang:get_stacktrace()
+ end
+ end),
+ receive
+ {'DOWN', Mon, process, Pid, Reason} ->
+ normal = Reason
+ end,
+ TD = erlang:trace_delivered(Pid),
+ receive
+ {trace_delivered, Pid, TD} ->
+ NoYields = error_after_yield_sched(Pid, TrapFunc, 0),
+ io:format("No of yields: ~p~n", [NoYields]),
+ true = NoYields > 2
+ end,
+ ok.
+
+error_after_yield_sched(P, TrapFunc, N) ->
+ receive
+ {trace, P, out, TrapFunc} ->
+ receive
+ {trace, P, in, TrapFunc} ->
+ error_after_yield_sched(P, TrapFunc, N+1)
+ after 0 ->
+ exit(trap_sched_mismatch)
+ end;
+ {trace, P, out, Func} ->
+ receive
+ {trace, P, in, Func} ->
+ error_after_yield_sched(P, TrapFunc, N)
+ after 0 ->
+ exit(other_sched_mismatch)
+ end
+ after 0 ->
+ N
+ end.
+
+error_after_yield_bad_ext_term() ->
+ TupleSz = 2000000,
+ <<131, % Version magic
+ AtomExt/binary>> = term_to_binary(an_atom_we_use_for_this),
+ BadAtomExt = [100, %% ATOM_EXT
+ 255, 255, % Invalid size of 65535 bytes
+ "oops"],
+
+ %% Produce a large tuple where the last element is invalid
+ list_to_binary([131, %% Version magic
+ 105, %% LARGE_TUPLE_EXT
+ <<TupleSz:32/big>>, %% Tuple size
+ lists:duplicate(TupleSz-1, AtomExt), %% Valid atoms
+ BadAtomExt]). %% Invalid atom at the end
+
+cmp_old_impl(Config) when is_list(Config) ->
+ %% Compare results from new yielding implementations with
+ %% old non yielding implementations
+ Cookie = atom_to_list(erlang:get_cookie()),
+ Rel = "r16b_latest",
+ case test_server:is_release_available(Rel) of
+ false ->
+ {skipped, "No "++Rel++" available"};
+ true ->
+ {ok, Node} = ?t:start_node(list_to_atom(atom_to_list(?MODULE)++"_"++Rel),
+ peer,
+ [{args, " -setcookie "++Cookie},
+ {erl, [{release, Rel}]}]),
+
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(1))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(10))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(100))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(1000))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(10000))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(100000))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(1000000))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list(10000000))]}),
+ cmp_node(Node, {erlang, list_to_binary, [list2iolist(mk_list_lb(10000000))]}),
+
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(1))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(10))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(100))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(1000))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(10000))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(100000))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(1000000))]}),
+ cmp_node(Node, {erlang, binary_to_list, [list_to_binary(mk_list(10000000))]}),
+
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(1))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(10))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(100))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(1000))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(10000))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(100000))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(1000000))]}),
+ cmp_node(Node, {erlang, list_to_bitstring, [list2bitstrlist(mk_list(10000000))]}),
+
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(1)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(10)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(100)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(1000)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(10000)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(100000)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(1000000)))]}),
+ cmp_node(Node, {erlang, bitstring_to_list, [list_to_bitstring(list2bitstrlist(mk_list(10000000)))]}),
+
+ ?t:stop_node(Node),
+
+ ok
+ end.
%% Utilities.
+huge_iolist(Lim) ->
+ Sz = 1024,
+ huge_iolist(list_to_binary(mk_list(Sz)), Sz, Lim).
+
+huge_iolist(X, Sz, Lim) when Sz >= Lim ->
+ X;
+huge_iolist(X, Sz, Lim) ->
+ huge_iolist([X, X], Sz*2, Lim).
+
+cmp_node(Node, {M, F, A}) ->
+ Res = rpc:call(Node, M, F, A),
+ Res = apply(M, F, A),
+ ok.
+
make_sub_binary(Bin) when is_binary(Bin) ->
{_,B} = split_binary(list_to_binary([0,1,3,Bin]), 3),
B;
@@ -1394,3 +1609,127 @@ unaligned_sub_bin(Bin0, Offs) ->
Bin.
id(I) -> I.
+
+
+%% Stress binary_to_term with different initial reductions
+binary_to_term_stress(Bin) ->
+ binary_to_term_stress(Bin, no_opts).
+
+binary_to_term_stress(Bin, Opts) ->
+ Reds = get_reds(),
+ T = b2t(erlang:system_info(context_reductions),
+ Bin, Opts, catch_binary_to_term(Bin, Opts)),
+ set_reds(Reds),
+ T = case Opts of
+ no_opts -> binary_to_term(Bin);
+ _ -> binary_to_term(Bin,Opts)
+ end.
+
+catch_binary_to_term(Bin, no_opts) ->
+ try binary_to_term(Bin)
+ catch
+ error:badarg -> binary_to_term_throws_badarg
+ end;
+catch_binary_to_term(Bin, Opts) ->
+ try binary_to_term(Bin, Opts)
+ catch
+ error:badarg -> binary_to_term_throws_badarg
+ end.
+
+b2t(0, _Bin, _Opts, Term) ->
+ Term;
+b2t(Reds, Bin, Opts, Term) ->
+ set_reds(Reds),
+ Term = catch_binary_to_term(Bin,Opts),
+ b2t(Reds div 3, Bin, Opts, Term).
+
+set_reds(Reds) ->
+ try erts_debug:set_internal_state(reds_left, Reds)
+ catch
+ error:undef ->
+ erts_debug:set_internal_state(available_internal_state, true),
+ set_reds(Reds)
+ end.
+
+get_reds() ->
+ try erts_debug:get_internal_state(reds_left)
+ catch
+ error:undef ->
+ erts_debug:set_internal_state(available_internal_state, true),
+ get_reds()
+ end.
+
+-define(LARGE_BIN, (512*1024+10)).
+-define(LARGE_BIN_LIM, (1024*1024)).
+
+mk_list(0, Acc) ->
+ Acc;
+mk_list(Sz, Acc) ->
+ mk_list(Sz-1, [$A+(Sz band 63) | Acc]).
+
+mk_list(Sz) when Sz >= ?LARGE_BIN_LIM ->
+ SzLeft = Sz - ?LARGE_BIN,
+ SzHd = SzLeft div 2,
+ SzTl = SzLeft - SzHd,
+ [mk_list(SzHd, []), erlang:list_to_binary(mk_list(?LARGE_BIN, [])), mk_list(SzTl, [])];
+mk_list(Sz) ->
+ mk_list(Sz, []).
+
+mk_list_lb(Sz) when Sz >= ?LARGE_BIN_LIM ->
+ SzLeft = Sz - ?LARGE_BIN,
+ SzHd = SzLeft div 2,
+ SzTl = SzLeft - SzHd,
+ [mk_list(SzHd, []), erlang:list_to_binary(mk_list(?LARGE_BIN, [])), mk_list(SzTl, [])];
+mk_list_lb(Sz) ->
+ mk_list(Sz, []).
+
+
+list2iolist(List) ->
+ list2iolist(List, []).
+
+list2iolist([], Acc) ->
+ Acc;
+list2iolist([X0, X1, X2, X3, X4, X5 | Xs], Acc) when is_integer(X0), 0 =< X0, X0 < 256,
+ is_integer(X1), 0 =< X1, X1 < 256,
+ is_integer(X2), 0 =< X2, X2 < 256,
+ is_integer(X3), 0 =< X3, X3 < 256,
+ is_integer(X4), 0 =< X4, X4 < 256,
+ is_integer(X5), 0 =< X5, X5 < 256 ->
+ NewAcc = case (X0+X1+X2+X3+X4+X5) band 3 of
+ 0 ->
+ [Acc, [[[[[[[[[[[[X0,[],<<"">>,X1]]]]]]]]],[X2,X3]],[],[],[],[],X4],X5]];
+ 1 ->
+ [Acc, [], erlang:list_to_binary([X0, X1, X2, X3, X4, X5])];
+ 2 ->
+ [Acc, [[[[X0|erlang:list_to_binary([X1])],[X2|erlang:list_to_binary([X3])],[X4|erlang:list_to_binary([X5])]]]|<<"">>]];
+ 3 ->
+ [Acc, X0, X1, X2, <<"">>, [], X3, X4 | erlang:list_to_binary([X5])]
+ end,
+ list2iolist(Xs, NewAcc);
+list2iolist([X | Xs], Acc) ->
+ list2iolist(Xs, [Acc,X]).
+
+list2bitstrlist(List) ->
+ [list2bitstrlist(List, []), <<4:7>>].
+
+list2bitstrlist([], Acc) ->
+ Acc;
+list2bitstrlist([X0, X1, X2, X3, X4, X5 | Xs], Acc) when is_integer(X0), 0 =< X0, X0 < 256,
+ is_integer(X1), 0 =< X1, X1 < 256,
+ is_integer(X2), 0 =< X2, X2 < 256,
+ is_integer(X3), 0 =< X3, X3 < 256,
+ is_integer(X4), 0 =< X4, X4 < 256,
+ is_integer(X5), 0 =< X5, X5 < 256 ->
+ NewAcc = case (X0+X1+X2+X3+X4+X5) band 3 of
+ 0 ->
+ [Acc, [[[[[[[[[[[[X0,[],<<"">>,X1]]]]]]]]],[X2,X3]],[],[],[],[],X4],X5]];
+ 1 ->
+ [Acc, [], <<X0:X1>>, <<X2:X3>>, <<X4:X5>>];
+ 2 ->
+ [Acc, [[[[X0|<<X1:X2>>],X3]],[X4|erlang:list_to_binary([X5])]|<<"">>]];
+ 3 ->
+ [Acc, X0, X1, X2, <<"">>, [], X3, X4 | erlang:list_to_binary([X5])]
+ end,
+ list2bitstrlist(Xs, NewAcc);
+list2bitstrlist([X | Xs], Acc) ->
+ list2bitstrlist(Xs, [Acc,X]).
diff --git a/erts/emulator/test/busy_port_SUITE.erl b/erts/emulator/test/busy_port_SUITE.erl
index 4b4af0babe..2ed5aaa0d0 100644
--- a/erts/emulator/test/busy_port_SUITE.erl
+++ b/erts/emulator/test/busy_port_SUITE.erl
@@ -98,8 +98,10 @@ generator(0, Writer, _Data) ->
%% Calling process_info(Pid, current_function) on a suspended process
%% used to crash Beam.
- {current_function, {erlang, send, 2}} =
- process_info(Writer, current_function),
+ case process_info(Writer, [status,current_function]) of
+ [{status,suspended},{current_function,{erlang,send,2}}] -> ok;
+ [{status,suspended},{current_function,{erlang,bif_return_trap,_}}] -> ok
+ end,
unlock_slave();
generator(N, Writer, Data) ->
Writer ! {exec, Data},
diff --git a/erts/emulator/test/code_parallel_load_SUITE.erl b/erts/emulator/test/code_parallel_load_SUITE.erl
index 1cfe015ea6..428f1242ab 100644
--- a/erts/emulator/test/code_parallel_load_SUITE.erl
+++ b/erts/emulator/test/code_parallel_load_SUITE.erl
@@ -159,22 +159,34 @@ setup_checkers(_,0) -> [];
setup_checkers(T,N) -> [spawn_link(fun() -> ?model:check(T) end) | setup_checkers(T, N-1)].
check_and_purge_processes_code(Pids, M) ->
- check_and_purge_processes_code(Pids, M, []).
-check_and_purge_processes_code([], M, []) ->
+ Tag = make_ref(),
+ N = request_cpc(Pids, M, Tag),
+ ok = handle_cpc_responses(N, Tag, M),
erlang:purge_module(M),
+ ok.
+
+request_cpc(Pid, M, Tag) when is_pid(Pid) ->
+ erlang:check_process_code(Pid, M, [{async, {Tag, Pid}}]),
+ 1;
+request_cpc(Pids, M, Tag) when is_list(Pids) ->
+ request_cpc(Pids, M, Tag, 0).
+
+request_cpc([], _M, _Tag, N) ->
+ N;
+request_cpc([Pid|Pids], M, Tag, N) ->
+ request_cpc(Pids, M, Tag, N + request_cpc(Pid, M, Tag)).
+
+handle_cpc_responses(0, _Tag, _Module) ->
ok;
-check_and_purge_processes_code([], M, Pending) ->
- io:format("Processes ~w are still executing old code - retrying.~n", [Pending]),
- check_and_purge_processes_code(Pending, M, []);
-check_and_purge_processes_code([Pid|Pids], M, Pending) ->
- case erlang:check_process_code(Pid, M) of
- false ->
- check_and_purge_processes_code(Pids, M, Pending);
- true ->
- check_and_purge_processes_code(Pids, M, [Pid|Pending])
+handle_cpc_responses(N, Tag, Module) ->
+ receive
+ {check_process_code, {Tag, _Pid}, false} ->
+ handle_cpc_responses(N-1, Tag, Module);
+ {check_process_code, {Tag, Pid}, true} ->
+ 1 = request_cpc(Pid, Module, Tag),
+ handle_cpc_responses(N, Tag, Module)
end.
-
generate(Module, Attributes, FunStrings) ->
FunForms = function_forms(FunStrings),
Forms = [
diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl
index 7087542899..623d62f876 100644
--- a/erts/emulator/test/driver_SUITE.erl
+++ b/erts/emulator/test/driver_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,8 +31,9 @@
end_per_suite/1, init_per_group/2,end_per_group/2,
init_per_testcase/2,
end_per_testcase/2,
+
+ a_test/1,
outputv_echo/1,
-
timer_measure/1,
timer_cancel/1,
timer_change/1,
@@ -79,7 +80,8 @@
thr_free_drv/1,
async_blast/1,
thr_msg_blast/1,
- consume_timeslice/1]).
+ consume_timeslice/1,
+ z_test/1]).
-export([bin_prefix/2]).
@@ -122,19 +124,19 @@ init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
_ -> erts_debug:set_internal_state(available_internal_state, true)
end,
erlang:display({init_per_testcase, Case}),
- ?line 0 = erts_debug:get_internal_state(check_io_debug),
+ ?line 0 = element(1, erts_debug:get_internal_state(check_io_debug)),
[{watchdog, Dog},{testcase, Case}|Config].
end_per_testcase(Case, Config) ->
Dog = ?config(watchdog, Config),
erlang:display({end_per_testcase, Case}),
- ?line 0 = erts_debug:get_internal_state(check_io_debug),
+ ?line 0 = element(1, erts_debug:get_internal_state(check_io_debug)),
?t:timetrap_cancel(Dog).
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
- [outputv_errors, outputv_echo, queue_echo, {group, timer},
+all() -> %% Keep a_test first and z_test last...
+ [a_test, outputv_errors, outputv_echo, queue_echo, {group, timer},
driver_unloaded, io_ready_exit, use_fallback_pollset,
bad_fd_in_pollset, driver_event, fd_change,
steal_control, otp_6602, driver_system_info_base_ver,
@@ -151,7 +153,8 @@ all() ->
thr_free_drv,
async_blast,
thr_msg_blast,
- consume_timeslice].
+ consume_timeslice,
+ z_test].
groups() ->
[{timer, [],
@@ -917,8 +920,7 @@ steal_control_test(Hndl = {erts_poll_info, Before}) ->
end.
chkio_test_init(Config) when is_list(Config) ->
- ?line wait_until_no_pending_updates(),
- ?line ChkIo = erlang:system_info(check_io),
+ ?line ChkIo = get_stable_check_io_info(),
?line case catch lists:keysearch(name, 1, ChkIo) of
{value, {name, erts_poll}} ->
?line ?t:format("Before test: ~p~n", [ChkIo]),
@@ -937,8 +939,7 @@ chkio_test_fini({skipped, _} = Res) ->
chkio_test_fini({chkio_test_result, Res, Before}) ->
?line ok = erl_ddll:unload_driver('chkio_drv'),
?line ok = erl_ddll:stop(),
- ?line wait_until_no_pending_updates(),
- ?line After = erlang:system_info(check_io),
+ ?line After = get_stable_check_io_info(),
?line ?t:format("After test: ~p~n", [After]),
?line verify_chkio_state(Before, After),
?line Res.
@@ -985,7 +986,7 @@ chkio_test({erts_poll_info, Before},
?line Fun(),
?line During = erlang:system_info(check_io),
?line erlang:display(During),
- ?line 0 = erts_debug:get_internal_state(check_io_debug),
+ ?line 0 = element(1, erts_debug:get_internal_state(check_io_debug)),
?line ?t:format("During test: ~p~n", [During]),
?line chk_chkio_port(Port),
?line case erlang:port_control(Port, ?CHKIO_STOP, "") of
@@ -1034,18 +1035,22 @@ verify_chkio_state(Before, After) ->
After)
end,
?line ok.
-
-
-wait_until_no_pending_updates() ->
- case lists:keysearch(pending_updates, 1, erlang:system_info(check_io)) of
- {value, {pending_updates, 0}} ->
- ok;
- false ->
- ok;
+get_stable_check_io_info() ->
+ ChkIo = erlang:system_info(check_io),
+ PendUpdNo = case lists:keysearch(pending_updates, 1, ChkIo) of
+ {value, {pending_updates, PendNo}} ->
+ PendNo;
+ false ->
+ 0
+ end,
+ {value, {active_fds, ActFds}} = lists:keysearch(active_fds, 1, ChkIo),
+ case {PendUpdNo, ActFds} of
+ {0, 0} ->
+ ChkIo;
_ ->
receive after 10 -> ok end,
- wait_until_no_pending_updates()
+ get_stable_check_io_info()
end.
otp_6602(doc) -> ["Missed port lock when stealing control of fd from a "
@@ -1062,10 +1067,9 @@ otp_6602(Config) when is_list(Config) ->
%% Inet driver use port locking...
{ok, S} = gen_udp:open(0),
{ok, Fd} = inet:getfd(S),
- {ok, Port} = inet:port(S),
%% Steal fd (lock checker used to
%% trigger here).
- {ok, _S2} = gen_udp:open(Port,[{fd,Fd}]),
+ {ok, _S2} = gen_udp:open(0,[{fd,Fd}]),
Parent ! Done
end),
?line receive Done -> ok end,
@@ -1085,7 +1089,15 @@ otp_6602(Config) when is_list(Config) ->
["async_thrs",
"sched_thrs"])).
--define(EXPECTED_SYSTEM_INFO_NAMES, ?EXPECTED_SYSTEM_INFO_NAMES2).
+-define(EXPECTED_SYSTEM_INFO_NAMES3,
+ (?EXPECTED_SYSTEM_INFO_NAMES2 ++
+ ["emu_nif_vsn"])).
+
+-define(EXPECTED_SYSTEM_INFO_NAMES4,
+ (?EXPECTED_SYSTEM_INFO_NAMES3 ++
+ ["dirty_sched"])).
+
+-define(EXPECTED_SYSTEM_INFO_NAMES, ?EXPECTED_SYSTEM_INFO_NAMES4).
'driver_system_info_base_ver'(doc) ->
[];
@@ -1133,16 +1145,18 @@ check_driver_system_info_result(Result) ->
drv_vsn_str2tup(erlang:system_info(driver_version))} of
{DDVSN, DDVSN} ->
?line [] = Ns;
- {{1, 0}, _} ->
- ?line ExpNs = lists:sort(?EXPECTED_SYSTEM_INFO_NAMES
- -- ?EXPECTED_SYSTEM_INFO_NAMES1),
- ?line ExpNs = lists:sort(Ns);
- {{1, 1}, _} ->
+ %% {{1, 0}, _} ->
+ %% ?line ExpNs = lists:sort(?EXPECTED_SYSTEM_INFO_NAMES
+ %% -- ?EXPECTED_SYSTEM_INFO_NAMES1),
+ %% ?line ExpNs = lists:sort(Ns);
+ %% {{1, 1}, _} ->
+ %% ?line ExpNs = lists:sort(?EXPECTED_SYSTEM_INFO_NAMES
+ %% -- ?EXPECTED_SYSTEM_INFO_NAMES2),
+ %% ?line ExpNs = lists:sort(Ns);
+ {{3, 0}, _} ->
?line ExpNs = lists:sort(?EXPECTED_SYSTEM_INFO_NAMES
- -- ?EXPECTED_SYSTEM_INFO_NAMES2),
- ?line ExpNs = lists:sort(Ns);
- {{2, 0}, _} ->
- ?line [] = Ns
+ -- ?EXPECTED_SYSTEM_INFO_NAMES3),
+ ?line ExpNs = lists:sort(Ns)
end.
chk_sis(SIs, Ns) ->
@@ -1189,6 +1203,14 @@ check_si_res(["async_thrs", Value]) ->
check_si_res(["sched_thrs", Value]) ->
?line Value = integer_to_list(erlang:system_info(schedulers));
+%% Data added in 3rd version of driver_system_info() (driver version 1.5)
+check_si_res(["emu_nif_vsn", Value]) ->
+ ?line Value = erlang:system_info(nif_version);
+
+%% Data added in 4th version of driver_system_info() (driver version 3.1)
+check_si_res(["dirty_sched", _Value]) ->
+ true;
+
check_si_res(Unexpected) ->
?line ?t:fail({unexpected_result, Unexpected}).
@@ -1945,6 +1967,14 @@ otp_9302(Config) when is_list(Config) ->
end.
thr_free_drv(Config) when is_list(Config) ->
+ case erlang:system_info(threads) of
+ false ->
+ {skipped, "No thread support"};
+ true ->
+ thr_free_drv_do(Config)
+ end.
+
+thr_free_drv_do(Config) ->
?line Path = ?config(data_dir, Config),
?line erl_ddll:start(),
?line ok = load_driver(Path, thr_free_drv),
@@ -2075,6 +2105,21 @@ thr_msg_blast(Config) when is_list(Config) ->
Res
end.
+-define(IN_RANGE(LoW_, VaLuE_, HiGh_),
+ case in_range(LoW_, VaLuE_, HiGh_) of
+ true -> ok;
+ false ->
+ case erlang:system_info(lock_checking) of
+ true ->
+ ?t:format("~p:~p: Ignore bad sched count due to "
+ "lock checking~n",
+ [?MODULE,?LINE]);
+ false ->
+ ?t:fail({unexpected_sched_counts, VaLuE_})
+ end
+ end).
+
+
consume_timeslice(Config) when is_list(Config) ->
%%
%% Verify that erl_drv_consume_timeslice() works.
@@ -2131,15 +2176,8 @@ consume_timeslice(Config) when is_list(Config) ->
Proc1 ! Go,
wait_command_msgs(Port, 10),
[{Port, Sprt1}, {Proc1, Sproc1}] = count_pp_sched_stop([Port, Proc1]),
- case Sprt1 of
- 10 ->
- true = in_range(5, Sproc1-10, 7);
- _ ->
- case erlang:system_info(lock_checking) of
- true -> ?t:format("Ignore bad sched count due to lock checking", []);
- false -> ?t:fail({unexpected_sched_counts, Sprt1, Sproc1})
- end
- end,
+ ?IN_RANGE(10, Sprt1, 10),
+ ?IN_RANGE(5, Sproc1-10, 7),
"disabled" = port_control(Port, $D, ""),
Proc2 = spawn_link(fun () ->
@@ -2160,15 +2198,8 @@ consume_timeslice(Config) when is_list(Config) ->
Proc2 ! Go,
wait_command_msgs(Port, 10),
[{Port, Sprt2}, {Proc2, Sproc2}] = count_pp_sched_stop([Port, Proc2]),
- case Sprt2 of
- 10 ->
- true = in_range(1, Sproc2-10, 2);
- _ ->
- case erlang:system_info(lock_checking) of
- true -> ?t:format("Ignore bad sched count due to lock checking", []);
- false -> ?t:fail({unexpected_sched_counts, Sprt2, Sproc2})
- end
- end,
+ ?IN_RANGE(10, Sprt2, 10),
+ ?IN_RANGE(1, Sproc2-10, 2),
"enabled" = port_control(Port, $E, ""),
Proc3 = spawn_link(fun () ->
@@ -2188,15 +2219,8 @@ consume_timeslice(Config) when is_list(Config) ->
Proc3 ! Go,
wait_command_msgs(Port, 10),
[{Port, Sprt3}, {Proc3, Sproc3}] = count_pp_sched_stop([Port, Proc3]),
- case Sprt3 of
- 10 ->
- true = in_range(5, Sproc3-10, 7);
- _ ->
- case erlang:system_info(lock_checking) of
- true -> ?t:format("Ignore bad sched count due to lock checking", []);
- false -> ?t:fail({unexpected_sched_counts, Sprt3, Sproc3})
- end
- end,
+ ?IN_RANGE(10, Sprt3, 10),
+ ?IN_RANGE(5, Sproc3-10, 7),
"disabled" = port_control(Port, $D, ""),
Proc4 = spawn_link(fun () ->
@@ -2216,15 +2240,8 @@ consume_timeslice(Config) when is_list(Config) ->
Proc4 ! Go,
wait_command_msgs(Port, 10),
[{Port, Sprt4}, {Proc4, Sproc4}] = count_pp_sched_stop([Port, Proc4]),
- case Sprt4 of
- 10 ->
- true = in_range(1, Sproc4-10, 2);
- _ ->
- case erlang:system_info(lock_checking) of
- true -> ?t:format("Ignore bad sched count due to lock checking", []);
- false -> ?t:fail({unexpected_sched_counts, Sprt4, Sproc4})
- end
- end,
+ ?IN_RANGE(10, Sprt4, 10),
+ ?IN_RANGE(1, Sproc4-10, 2),
SOnl = erlang:system_info(schedulers_online),
%% If only one scheduler use port with parallelism set to true,
@@ -2272,8 +2289,8 @@ consume_timeslice(Config) when is_list(Config) ->
wait_procs_exit([W5, Proc5]),
wait_command_msgs(Port2, 10),
[{Port2, Sprt5}, {Proc5, Sproc5}] = count_pp_sched_stop([Port2, Proc5]),
- true = in_range(2, Sproc5, 3),
- true = in_range(7, Sprt5, 20),
+ ?IN_RANGE(2, Sproc5, 3),
+ ?IN_RANGE(6, Sprt5, 20),
count_pp_sched_start(),
"disabled" = port_control(Port2, $D, ""),
@@ -2307,8 +2324,8 @@ consume_timeslice(Config) when is_list(Config) ->
wait_procs_exit([W6, Proc6]),
wait_command_msgs(Port2, 10),
[{Port2, Sprt6}, {Proc6, Sproc6}] = count_pp_sched_stop([Port2, Proc6]),
- true = in_range(2, Sproc6, 3),
- true = in_range(3, Sprt6, 6),
+ ?IN_RANGE(2, Sproc6, 3),
+ ?IN_RANGE(2, Sprt6, 6),
process_flag(scheduler, 0),
@@ -2316,6 +2333,7 @@ consume_timeslice(Config) when is_list(Config) ->
receive {Port2, closed} -> ok end,
ok.
+
wait_command_msgs(_, 0) ->
ok;
wait_command_msgs(Port, N) ->
@@ -2374,10 +2392,25 @@ count_proc_sched(Ps, PNs) ->
PNs
end.
+a_test(Config) when is_list(Config) ->
+ check_io_debug().
+
+z_test(Config) when is_list(Config) ->
+ check_io_debug().
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Utilities
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+check_io_debug() ->
+ get_stable_check_io_info(),
+ {NoErrorFds, NoUsedFds, NoDrvSelStructs, NoDrvEvStructs}
+ = erts_debug:get_internal_state(check_io_debug),
+ 0 = NoErrorFds,
+ NoUsedFds = NoDrvSelStructs,
+ 0 = NoDrvEvStructs,
+ ok.
+
%flush_msgs() ->
% receive
% M ->
diff --git a/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c b/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c
index 9d8bbac231..e2b338f801 100644
--- a/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c
@@ -277,10 +277,6 @@ static void stop(ErlDrvData drv_data)
case IOQ_EXIT_TIMEOUT_ASYNC:
driver_cancel_timer(ddp->port);
break;
- case IOQ_EXIT_READY_ASYNC:
- if (ddp->outstanding_async_task)
- driver_async_cancel(ddp->async_task);
- break;
default:
break;
}
diff --git a/erts/emulator/test/driver_SUITE_data/otp_9302_drv.c b/erts/emulator/test/driver_SUITE_data/otp_9302_drv.c
index 88df73f696..ad29d17f06 100644
--- a/erts/emulator/test/driver_SUITE_data/otp_9302_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/otp_9302_drv.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2011-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2011-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -94,7 +94,7 @@ DRIVER_INIT(otp_9302_drv)
static void stop(ErlDrvData drv_data)
{
Otp9302Data *data = (Otp9302Data *) drv_data;
- if (!data->smp)
+ if (data->msgq.mtx)
erl_drv_mutex_destroy(data->msgq.mtx);
driver_free(data);
}
@@ -114,13 +114,16 @@ static ErlDrvData start(ErlDrvPort port,
driver_system_info(&sys_info, sizeof(ErlDrvSysInfo));
data->smp = sys_info.smp_support;
+ data->msgq.mtx = NULL;
if (!data->smp) {
data->msgq.start = NULL;
data->msgq.end = NULL;
- data->msgq.mtx = erl_drv_mutex_create("");
- if (!data->msgq.mtx) {
- driver_free(data);
- return ERL_DRV_ERROR_GENERAL;
+ if (sys_info.thread_support) {
+ data->msgq.mtx = erl_drv_mutex_create("");
+ if (!data->msgq.mtx) {
+ driver_free(data);
+ return ERL_DRV_ERROR_GENERAL;
+ }
}
}
@@ -143,19 +146,22 @@ static void enqueue_reply(Otp9302AsyncData *adata)
Otp9302MsgQ *msgq = adata->msgq;
adata->next = NULL;
adata->refc++;
- erl_drv_mutex_lock(msgq->mtx);
+ if (msgq->mtx)
+ erl_drv_mutex_lock(msgq->mtx);
if (msgq->end)
msgq->end->next = adata;
else
msgq->end = msgq->start = adata;
msgq->end = adata;
- erl_drv_mutex_unlock(msgq->mtx);
+ if (msgq->mtx)
+ erl_drv_mutex_unlock(msgq->mtx);
}
static void dequeue_replies(Otp9302AsyncData *adata)
{
Otp9302MsgQ *msgq = adata->msgq;
- erl_drv_mutex_lock(msgq->mtx);
+ if (msgq->mtx)
+ erl_drv_mutex_lock(msgq->mtx);
if (--adata->refc == 0)
driver_free(adata);
while (msgq->start) {
@@ -166,7 +172,8 @@ static void dequeue_replies(Otp9302AsyncData *adata)
driver_free(adata);
}
msgq->start = msgq->end = NULL;
- erl_drv_mutex_unlock(msgq->mtx);
+ if (msgq->mtx)
+ erl_drv_mutex_unlock(msgq->mtx);
}
static void async_invoke(void *data)
@@ -227,6 +234,4 @@ static void output(ErlDrvData drv_data,
ad[4]->term_data.msg = driver_mk_atom("end_of_jobs");
for (i = 0; i < sizeof(id)/sizeof(id[0]); i++)
id[i] = driver_async(data->port, &key, async_invoke, ad[i], driver_free);
- if (id[2] > 0)
- driver_async_cancel(id[2]);
}
diff --git a/erts/emulator/test/driver_SUITE_data/smaller_major_vsn_drv.c b/erts/emulator/test/driver_SUITE_data/smaller_major_vsn_drv.c
index a1299fe807..6b9d4745ba 100644
--- a/erts/emulator/test/driver_SUITE_data/smaller_major_vsn_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/smaller_major_vsn_drv.c
@@ -20,12 +20,12 @@
* Author: Rickard Green
*
* Description: Implementation of a driver with a smaller major
- * driver version than the current system.
+ * driver version than allowed on load.
*/
#define VSN_MISMATCH_DRV_NAME_STR "smaller_major_vsn_drv"
#define VSN_MISMATCH_DRV_NAME smaller_major_vsn_drv
-#define VSN_MISMATCH_DRV_MAJOR_VSN_DIFF (-1)
+#define VSN_MISMATCH_DRV_MAJOR_VSN_DIFF (ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD - ERL_DRV_EXTENDED_MAJOR_VERSION - 1)
#define VSN_MISMATCH_DRV_MINOR_VSN_DIFF 0
#include "vsn_mismatch_drv_impl.c"
diff --git a/erts/emulator/test/driver_SUITE_data/sys_info_base_drv.c b/erts/emulator/test/driver_SUITE_data/sys_info_base_drv.c
index c22a415c59..964034f5a6 100644
--- a/erts/emulator/test/driver_SUITE_data/sys_info_base_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/sys_info_base_drv.c
@@ -19,14 +19,14 @@
/*
* Author: Rickard Green
*
- * Description: Driver that fakes driver version 2.0 and tests
+ * Description: Driver that fakes driver version 3.0 and tests
* driver_system_info().
*
*/
#include "sys_info_drv_impl.h"
-#define SYS_INFO_DRV_MAJOR_VSN 2
+#define SYS_INFO_DRV_MAJOR_VSN 3
#define SYS_INFO_DRV_MINOR_VSN 0
#define SYS_INFO_DRV_NAME_STR "sys_info_base_drv"
#define SYS_INFO_DRV_NAME sys_info_base_drv
@@ -41,7 +41,9 @@
"thread=%s " \
"smp=%s " \
"async_thrs=%d " \
- "sched_thrs=%d"
+ "sched_thrs=%d " \
+ "emu_nif_vsn=%d.%d"
+
static size_t
sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
@@ -55,6 +57,7 @@ sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
slen += 5; /* smp */
slen += 20; /* async_thrs */
slen += 20; /* sched_thrs */
+ slen += 2*20; /* emu_nif_vsn */
return slen;
}
@@ -72,7 +75,9 @@ sys_info_drv_sprintf_sys_info(ErlDrvSysInfo *sip, char *str)
sip->thread_support ? "true" : "false",
sip->smp_support ? "true" : "false",
sip->async_threads,
- sip->scheduler_threads);
+ sip->scheduler_threads,
+ sip->nif_major_version,
+ sip->nif_minor_version);
}
#include "sys_info_drv_impl.c"
diff --git a/erts/emulator/test/driver_SUITE_data/sys_info_curr_drv.c b/erts/emulator/test/driver_SUITE_data/sys_info_curr_drv.c
index 5bbc966932..6d2c47fdaf 100644
--- a/erts/emulator/test/driver_SUITE_data/sys_info_curr_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/sys_info_curr_drv.c
@@ -40,7 +40,9 @@
"thread=%s " \
"smp=%s " \
"async_thrs=%d " \
- "sched_thrs=%d"
+ "sched_thrs=%d " \
+ "emu_nif_vsn=%d.%d " \
+ "dirty_sched=%s"
static size_t
sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
@@ -54,6 +56,8 @@ sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
slen += 5; /* smp */
slen += 20; /* async_thrs */
slen += 20; /* sched_thrs */
+ slen += 2*20; /* emu_nif_vsn */
+ slen += 5; /* dirty_sched */
return slen;
}
@@ -71,7 +75,10 @@ sys_info_drv_sprintf_sys_info(ErlDrvSysInfo *sip, char *str)
sip->thread_support ? "true" : "false",
sip->smp_support ? "true" : "false",
sip->async_threads,
- sip->scheduler_threads);
+ sip->scheduler_threads,
+ sip->nif_major_version,
+ sip->nif_minor_version,
+ sip->dirty_scheduler_support ? "true" : "false");
}
#include "sys_info_drv_impl.c"
diff --git a/erts/emulator/test/driver_SUITE_data/sys_info_prev_drv.c b/erts/emulator/test/driver_SUITE_data/sys_info_prev_drv.c
index 815d96cc97..2271d7027b 100644
--- a/erts/emulator/test/driver_SUITE_data/sys_info_prev_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/sys_info_prev_drv.c
@@ -19,14 +19,14 @@
/*
* Author: Rickard Green
*
- * Description: Driver that fakes driver version 2.0 and tests
+ * Description: Driver that fakes driver version 3.0 and tests
* driver_system_info().
*
*/
#include "sys_info_drv_impl.h"
-#define SYS_INFO_DRV_MAJOR_VSN 2
+#define SYS_INFO_DRV_MAJOR_VSN 3
#define SYS_INFO_DRV_MINOR_VSN 0
#define SYS_INFO_DRV_NAME_STR "sys_info_prev_drv"
#define SYS_INFO_DRV_NAME sys_info_prev_drv
@@ -41,7 +41,9 @@
"thread=%s " \
"smp=%s " \
"async_thrs=%d " \
- "sched_thrs=%d"
+ "sched_thrs=%d " \
+ "emu_nif_vsn=%d.%d"
+
static size_t
sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
@@ -55,6 +57,7 @@ sys_info_drv_max_res_len(ErlDrvSysInfo *sip)
slen += 5; /* smp */
slen += 20; /* async_thrs */
slen += 20; /* sched_thrs */
+ slen += 2*20; /* emu_nif_vsn */
return slen;
}
@@ -72,7 +75,9 @@ sys_info_drv_sprintf_sys_info(ErlDrvSysInfo *sip, char *str)
sip->thread_support ? "true" : "false",
sip->smp_support ? "true" : "false",
sip->async_threads,
- sip->scheduler_threads);
+ sip->scheduler_threads,
+ sip->nif_major_version,
+ sip->nif_minor_version);
}
#include "sys_info_drv_impl.c"
diff --git a/erts/emulator/test/erts_debug_SUITE.erl b/erts/emulator/test/erts_debug_SUITE.erl
index 87778dd0c2..e5c904cfb9 100644
--- a/erts/emulator/test/erts_debug_SUITE.erl
+++ b/erts/emulator/test/erts_debug_SUITE.erl
@@ -67,6 +67,9 @@ test_size(Config) when is_list(Config) ->
2 = do_test_size({[]}),
3 = do_test_size({a,b}),
7 = do_test_size({a,[b,c]}),
+ 8 = do_test_size(#{b => 2,c => 3}),
+ 4 = do_test_size(#{}),
+ 32 = do_test_size(#{b => 2,c => 3,txt => "hello world"}),
%% Test internal consistency of sizes, but without testing
%% exact sizes.
@@ -97,6 +100,9 @@ test_size(Config) when is_list(Config) ->
do_test_size({SimplestFun,SimplestFun},
2*FunSz0+do_test_size({a,b}),
FunSz0+do_test_size({a,b})),
+
+ M = id(#{ "atom" => first, i => 0}),
+ do_test_size([M,M#{ "atom" := other },M#{i := 42}],54,32),
ok.
do_test_size(Term) ->
diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl
index 109cec25cb..09a7a87a9a 100644
--- a/erts/emulator/test/exception_SUITE.erl
+++ b/erts/emulator/test/exception_SUITE.erl
@@ -589,6 +589,13 @@ line_numbers(Config) when is_list(Config) ->
[{file,ModFile},{line,_}]}|_]}} =
(catch build_binary2(8, bad_binary)),
+ <<"abc",357:16>> = build_binary3(<<"abc">>),
+ {'EXIT',{badarg,[{?MODULE,build_binary3,1,
+ [{file,"bit_syntax.erl"},{line,72511}]},
+ {?MODULE,line_numbers,1,
+ [{file,ModFile},{line,_}]}|_]}} =
+ (catch build_binary3(no_binary)),
+
{'EXIT',{function_clause,
[{?MODULE,do_call_abs,[y,y],
[{file,"gc_bif.erl"},{line,18}]},
@@ -691,6 +698,10 @@ build_binary2(Size, Bin) -> %Line 72505
id(0), %Line 72506
<<7:Size,Bin/binary>>. %Line 72507
+build_binary3(Bin) -> %Line 72509
+ id(0), %Line 72510
+ <<Bin/binary,357:16>>. %Line 72511
+
-file("gc_bif.erl", 17).
do_call_abs(x, Arg) -> %Line 18
abs(Arg). %Line 19
diff --git a/erts/emulator/test/float_SUITE_data/fp_drv.c b/erts/emulator/test/float_SUITE_data/fp_drv.c
index b80385c3f9..82d18d6440 100644
--- a/erts/emulator/test/float_SUITE_data/fp_drv.c
+++ b/erts/emulator/test/float_SUITE_data/fp_drv.c
@@ -29,9 +29,14 @@
#if defined (__GNUC__)
int _finite(double x);
#endif
-#ifndef finite
-#define finite _finite
+#ifndef isfinite
+#define isfinite _finite
#endif
+#elif !defined(HAVE_ISFINITE) && defined(HAVE_FINITE)
+/* If not windows and we do not have isfinite */
+#define isfinite finite
+#elif !defined(HAVE_ISFINITE)
+# error "No finite function found!"
#endif
#include "erl_driver.h"
@@ -79,21 +84,21 @@ do_test(void *unused)
x = 3.23e133;
y = 3.57e257;
z = x*y;
- if (finite(z))
+ if (isfinite(z))
return "is finite (1)";
x = 5.0;
y = 0.0;
z = x/y;
- if (finite(z))
+ if (isfinite(z))
return "is finite (2)";
z = log(-1.0);
- if (finite(z))
+ if (isfinite(z))
return "is finite (3)";
z = log(0.0);
- if (finite(z))
+ if (isfinite(z))
return "is finite (4)";
return "ok";
diff --git a/erts/emulator/test/fun_SUITE.erl b/erts/emulator/test/fun_SUITE.erl
index 36ba4e0f48..2968f5bebb 100644
--- a/erts/emulator/test/fun_SUITE.erl
+++ b/erts/emulator/test/fun_SUITE.erl
@@ -30,7 +30,7 @@
fun_to_port/1,t_hash/1,t_phash/1,t_phash2/1,md5/1,
refc/1,refc_ets/1,refc_dist/1,
const_propagation/1,t_arity/1,t_is_function2/1,
- t_fun_info/1]).
+ t_fun_info/1,t_fun_info_mfa/1]).
-export([nothing/0]).
@@ -42,7 +42,8 @@ all() ->
[bad_apply, bad_fun_call, badarity, ext_badarity,
equality, ordering, fun_to_port, t_hash, t_phash,
t_phash2, md5, refc, refc_ets, refc_dist,
- const_propagation, t_arity, t_is_function2, t_fun_info].
+ const_propagation, t_arity, t_is_function2, t_fun_info,
+ t_fun_info_mfa].
groups() ->
[].
@@ -262,6 +263,16 @@ equality(Config) when is_list(Config) ->
?line false = eq(FF2, FF4),
?line false = eq(FF3, FF4),
+ %% EEP37
+ H1 = fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end,
+ H2 = fun Pow(N, M) when M > 0 -> N * Pow(N, M - 1); Pow(_, 0) -> 1 end,
+ H1_copy = copy_term(H1),
+
+ true = eq(H1, H1),
+ true = eq(H1, H1_copy),
+ true = eq(H2, H2),
+ false = eq(H1, H2),
+
ok.
eq(X, X) -> true;
@@ -814,6 +825,24 @@ t_fun_info(Config) when is_list(Config) ->
?line bad_info(<<1,2>>),
ok.
+t_fun_info_mfa(Config) when is_list(Config) ->
+ Fun1 = fun spawn_call/2,
+ {module,M1} = erlang:fun_info(Fun1, module),
+ {name,F1} = erlang:fun_info(Fun1, name),
+ {arity,A1} = erlang:fun_info(Fun1, arity),
+ {M1,F1,A1=2} = erlang:fun_info_mfa(Fun1),
+ %% Module fun.
+ Fun2 = fun ?MODULE:t_fun_info/1,
+ {module,M2} = erlang:fun_info(Fun2, module),
+ {name,F2} = erlang:fun_info(Fun2, name),
+ {arity,A2} = erlang:fun_info(Fun2, arity),
+ {M2,F2,A2=1} = erlang:fun_info_mfa(Fun2),
+
+ %% Not fun.
+ {'EXIT',_} = (catch erlang:fun_info_mfa(id(d))),
+ ok.
+
+
bad_info(Term) ->
try erlang:fun_info(Term, module) of
Any ->
diff --git a/erts/emulator/test/hash_SUITE.erl b/erts/emulator/test/hash_SUITE.erl
index 738c9c8b16..647bb45049 100644
--- a/erts/emulator/test/hash_SUITE.erl
+++ b/erts/emulator/test/hash_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl
new file mode 100644
index 0000000000..e877f7a240
--- /dev/null
+++ b/erts/emulator/test/map_SUITE.erl
@@ -0,0 +1,1135 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(map_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([
+ t_build_and_match_literals/1,
+ t_update_literals/1,t_match_and_update_literals/1,
+ t_update_map_expressions/1,
+ t_update_assoc/1,t_update_exact/1,
+ t_guard_bifs/1, t_guard_sequence/1, t_guard_update/1,
+ t_guard_receive/1, t_guard_fun/1,
+ t_list_comprehension/1,
+ t_map_sort_literals/1,
+ t_map_equal/1,
+ %t_size/1,
+ t_map_size/1,
+
+ %% Specific Map BIFs
+ t_bif_map_get/1,
+ t_bif_map_find/1,
+ t_bif_map_is_key/1,
+ t_bif_map_keys/1,
+ t_bif_map_merge/1,
+ t_bif_map_new/1,
+ t_bif_map_put/1,
+ t_bif_map_remove/1,
+ t_bif_map_update/1,
+ t_bif_map_values/1,
+ t_bif_map_to_list/1,
+ t_bif_map_from_list/1,
+
+ %% erlang
+ t_erlang_hash/1,
+ t_map_encode_decode/1,
+
+ %% maps module not bifs
+ t_maps_fold/1,
+ t_maps_map/1,
+ t_maps_size/1,
+ t_maps_without/1,
+
+ %% misc
+ t_erts_internal_order/1,
+ t_pdict/1,
+ t_ets/1,
+ t_dets/1,
+ t_tracing/1
+ ]).
+
+-include_lib("stdlib/include/ms_transform.hrl").
+
+suite() -> [].
+
+all() -> [
+ t_build_and_match_literals,
+ t_update_literals, t_match_and_update_literals,
+ t_update_map_expressions,
+ t_update_assoc,t_update_exact,
+ t_guard_bifs, t_guard_sequence, t_guard_update,
+ t_guard_receive,t_guard_fun, t_list_comprehension,
+ t_map_equal,
+ t_map_sort_literals,
+
+ %% Specific Map BIFs
+ t_bif_map_get,t_bif_map_find,t_bif_map_is_key,
+ t_bif_map_keys, t_bif_map_merge, t_bif_map_new,
+ t_bif_map_put,
+ t_bif_map_remove, t_bif_map_update,
+ t_bif_map_values,
+ t_bif_map_to_list, t_bif_map_from_list,
+
+ %% erlang
+ t_erlang_hash, t_map_encode_decode,
+ t_map_size,
+
+ %% maps module
+ t_maps_fold, t_maps_map,
+ t_maps_size, t_maps_without,
+
+
+ %% Other functions
+ t_erts_internal_order,
+ t_pdict,
+ t_ets,
+ t_tracing
+ ].
+
+groups() -> [].
+
+init_per_suite(Config) -> Config.
+end_per_suite(_Config) -> ok.
+
+init_per_group(_GroupName, Config) -> Config.
+end_per_group(_GroupName, Config) -> Config.
+
+%% tests
+
+t_build_and_match_literals(Config) when is_list(Config) ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% error case
+ %V = 32,
+ %{'EXIT',{{badmatch,_},_}} = (catch (#{<<"hi all">> => 1} = id(#{<<"hi",V,"all">> => 1}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ ok.
+
+
+%% Tests size(Map).
+%% not implemented, perhaps it shouldn't be either
+
+%t_size(Config) when is_list(Config) ->
+% 0 = size(#{}),
+% 1 = size(#{a=>1}),
+% 1 = size(#{a=>#{a=>1}}),
+% 2 = size(#{a=>1, b=>2}),
+% 3 = size(#{a=>1, b=>2, b=>"3"}),
+% ok.
+
+t_map_size(Config) when is_list(Config) ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+% test map updates without matching
+t_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
+
+% test map updates with matching
+t_match_and_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+
+t_update_map_expressions(Config) when is_list(Config) ->
+ M = maps:new(),
+ #{ a := 1 } = M#{a => 1},
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{badarg,_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{badarg,_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+
+t_update_assoc(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{badarg,_}} = (catch BadMap#{nonexisting=>val}),
+
+ ok.
+
+t_update_exact(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+
+ ok.
+
+t_guard_bifs(Config) when is_list(Config) ->
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ ok.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+t_guard_sequence(Config) when is_list(Config) ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+
+t_guard_update(Config) when is_list(Config) ->
+ error = map_guard_update(#{},#{}),
+ first = map_guard_update(#{}, #{x=>first}),
+ second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
+map_guard_update(_, _) -> error.
+
+t_guard_receive(Config) when is_list(Config) ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
+
+
+t_list_comprehension(Config) when is_list(Config) ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
+
+t_guard_fun(Config) when is_list(Config) ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} = (catch F1(#{s=>none,v=>none})),
+ ok.
+
+
+t_map_sort_literals(Config) when is_list(Config) ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = #{ a => 1 } < id(#{ b => 1}),
+ false = #{ b => 1 } < id(#{ a => 1}),
+ true = #{ a => 1, b => 1, c => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ b => 1, c => 1, d => 1 } > id(#{ a => 1, b => 1, c => 1}),
+ true = #{ c => 1, b => 1, a => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ "a" => 1 } < id(#{ <<"a">> => 1}),
+ false = #{ <<"a">> => 1 } < id(#{ "a" => 1}),
+ false = #{ 1 => 1 } < id(#{ 1.0 => 1}),
+ false = #{ 1.0 => 1 } < id(#{ 1 => 1}),
+
+ %% value order
+ true = #{ a => 1 } < id(#{ a => 2}),
+ false = #{ a => 2 } < id(#{ a => 1}),
+ false = #{ a => 2, b => 1 } < id(#{ a => 1, b => 3}),
+ true = #{ a => 1, b => 1 } < id(#{ a => 1, b => 3}),
+
+ true = #{ "a" => "hi", b => 134 } == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+t_map_equal(Config) when is_list(Config) ->
+ true = id(#{}) =:= id(#{}),
+ false = id(#{}) =:= id(#{a=>1}),
+ false = id(#{a=>1}) =:= id(#{}),
+ true = id(#{ "a" => "hi", b => 134 }) =:= id(#{ b => 134,"a" => "hi"}),
+
+ false = id(#{ a => 1 }) =:= id(#{ a => 2}),
+ false = id(#{ a => 2 }) =:= id(#{ a => 1}),
+ false = id(#{ a => 2, b => 1 }) =:= id(#{ a => 1, b => 3}),
+ false = id(#{ a => 1, b => 1 }) =:= id(#{ a => 1, b => 3}),
+
+ true = id(#{ a => 1 }) =:= id(#{ a => 1}),
+ true = id(#{ "a" => 2 }) =:= id(#{ "a" => 2}),
+ true = id(#{ "a" => 2, b => 3 }) =:= id(#{ "a" => 2, b => 3}),
+ true = id(#{ a => 1, b => 3, c => <<"wat">> }) =:= id(#{ a => 1, b => 3, c=><<"wat">>}),
+ ok.
+
+%% BIFs
+t_bif_map_get(Config) when is_list(Config) ->
+
+ 1 = maps:get(a, #{ a=> 1}),
+ 2 = maps:get(b, #{ a=> 1, b => 2}),
+ "hi" = maps:get("hello", #{ a=>1, "hello" => "hi"}),
+ "tuple hi" = maps:get({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ "v4" = maps:get(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,[])),
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,<<>>)),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get({1,1}, #{{1,1.0} => "tuple"})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{ b=>1, c=>2})),
+ ok.
+
+t_bif_map_find(Config) when is_list(Config) ->
+
+ {ok, 1} = maps:find(a, #{ a=> 1}),
+ {ok, 2} = maps:find(b, #{ a=> 1, b => 2}),
+ {ok, "int"} = maps:find(1, #{ 1 => "int"}),
+ {ok, "float"} = maps:find(1.0, #{ 1.0=> "float"}),
+
+ {ok, "hi"} = maps:find("hello", #{ a=>1, "hello" => "hi"}),
+ {ok, "tuple hi"} = maps:find({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ {ok, "v4"} = maps:find(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ error = maps:find(a,#{}),
+ error = maps:find(a,#{b=>1, c=>2}),
+ error = maps:find(1.0, #{ 1 => "int"}),
+ error = maps:find(1, #{ 1.0 => "float"}),
+ error = maps:find({1.0,1}, #{ a=>a, {1,1.0} => "tuple hi"}), % reverse types in tuple key
+
+
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id([]))),
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id(<<>>))),
+ ok.
+
+
+t_bif_map_is_key(Config) when is_list(Config) ->
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(int, M1),
+ true = maps:is_key(<<"key">>, M1),
+ true = maps:is_key(4, M1),
+
+ false = maps:is_key(5, M1),
+ false = maps:is_key(<<"key2">>, M1),
+ false = maps:is_key("h", M1),
+ false = maps:is_key("hello", M1),
+ false = maps:is_key(atom, M1),
+ false = maps:is_key(any, id(#{})),
+
+ false = maps:is_key("hi", maps:remove("hi", M1)),
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(1, maps:put(1, "number", M1)),
+ false = maps:is_key(1.0, maps:put(1, "number", M1)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id([]))),
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id(<<>>))),
+ ok.
+
+t_bif_map_keys(Config) when is_list(Config) ->
+ [] = maps:keys(#{}),
+
+ [1,2,3,4,5] = maps:keys(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [1,2,3,4,5] = maps:keys(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ [4,int,"hi",<<"key">>] = maps:keys(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(154)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(atom)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys([])),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(<<>>)),
+ ok.
+
+t_bif_map_new(Config) when is_list(Config) ->
+ #{} = maps:new(),
+ 0 = erlang:map_size(maps:new()),
+ ok.
+
+t_bif_map_merge(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:merge(#{},#{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(#{}, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(M0, #{}),
+
+ M1 = #{ "hi" => "hello again", float => 3.3, {1,2} => "tuple", 4 => integer },
+
+ #{4 := number, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello", <<"key">> := <<"value">>} = maps:merge(M1,M0),
+
+ #{4 := integer, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello again", <<"key">> := <<"value">>} = maps:merge(M0,M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge((1 bsl 65 + 3), <<>>)),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(<<>>, id(#{ a => 1}))),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(id(#{ a => 2}), <<>> )),
+
+ ok.
+
+
+t_bif_map_put(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = #{ "hi" := "hello"} = maps:put("hi", "hello", #{}),
+
+ ["hi"] = maps:keys(M1),
+ ["hello"] = maps:values(M1),
+
+ M2 = #{ int := 3 } = maps:put(int, 3, M1),
+
+ [int,"hi"] = maps:keys(M2),
+ [3,"hello"] = maps:values(M2),
+
+ M3 = #{ <<"key">> := <<"value">> } = maps:put(<<"key">>, <<"value">>, M2),
+
+ [int,"hi",<<"key">>] = maps:keys(M3),
+ [3,"hello",<<"value">>] = maps:values(M3),
+
+ M4 = #{ 18446744073709551629 := wat } = maps:put(18446744073709551629, wat, M3),
+
+ [18446744073709551629,int,"hi",<<"key">>] = maps:keys(M4),
+ [wat,3,"hello",<<"value">>] = maps:values(M4),
+
+ M0 = #{ 4 := number } = M5 = maps:put(4, number, M4),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M5),
+ [number,wat,3,"hello",<<"value">>] = maps:values(M5),
+
+ M6 = #{ <<"key">> := <<"other value">> } = maps:put(<<"key">>, <<"other value">>, M5),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M6),
+ [number,wat,3,"hello",<<"other value">>] = maps:values(M6),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,154)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,atom)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,[])),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,<<>>)),
+ ok.
+
+t_bif_map_remove(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:remove(some_key, #{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = maps:remove("hi", M0),
+ [4,18446744073709551629,int,<<"key">>] = maps:keys(M1),
+ [number,wat,3,<<"value">>] = maps:values(M1),
+
+ M2 = maps:remove(int, M1),
+ [4,18446744073709551629,<<"key">>] = maps:keys(M2),
+ [number,wat,<<"value">>] = maps:values(M2),
+
+ M3 = maps:remove(<<"key">>, M2),
+ [4,18446744073709551629] = maps:keys(M3),
+ [number,wat] = maps:values(M3),
+
+ M4 = maps:remove(18446744073709551629, M3),
+ [4] = maps:keys(M4),
+ [number] = maps:values(M4),
+
+ M5 = maps:remove(4, M4),
+ [] = maps:keys(M5),
+ [] = maps:values(M5),
+
+ M0 = maps:remove(5,M0),
+ M0 = maps:remove("hi there",M0),
+
+ #{ "hi" := "hello", int := 3, 4 := number} = maps:remove(18446744073709551629,maps:remove(<<"key">>,M0)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,154)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,atom)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,[])),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,<<>>)),
+ ok.
+
+t_bif_map_update(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello again", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update("hi", "hello again", M0),
+
+ #{ "hi" := "hello", int := 1337, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(int, 1337, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"new value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(<<"key">>, <<"new value">>, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := integer, 18446744073709551629 := wat} = maps:update(4, integer, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wazzup} = maps:update(18446744073709551629, wazzup, M0),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,{})),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,<<"value">>)),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(5,none,M0)),
+
+ ok.
+
+
+
+t_bif_map_values(Config) when is_list(Config) ->
+
+ [] = maps:values(#{}),
+
+ [a,b,c,d,e] = maps:values(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [a,b,c,d,e] = maps:values(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ M2 = M1#{ "hi" => "hello2", <<"key">> => <<"value2">> },
+ [number,3,"hello2",<<"value2">>] = maps:values(M2),
+ [number,3,"hello",<<"value">>] = maps:values(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(atom)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values([])),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(<<>>)),
+ ok.
+
+t_erlang_hash(Config) when is_list(Config) ->
+
+ ok = t_bif_erlang_phash2(),
+ ok = t_bif_erlang_phash(),
+ ok = t_bif_erlang_hash(),
+
+ ok.
+
+t_bif_erlang_phash2() ->
+
+ 39679005 = erlang:phash2(#{}),
+ 78942764 = erlang:phash2(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 }),
+ 37338230 = erlang:phash2(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} }),
+ 14363616 = erlang:phash2(#{ 1 => a }),
+ 51612236 = erlang:phash2(#{ a => 1 }),
+
+ 37468437 = erlang:phash2(#{{} => <<>>}),
+ 44049159 = erlang:phash2(#{<<>> => {}}),
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 118679416 = erlang:phash2(M0),
+ 51612236 = erlang:phash2(M1),
+ 118679416 = erlang:phash2(M2),
+ ok.
+
+t_bif_erlang_phash() ->
+ Sz = 1 bsl 32,
+ 268440612 = erlang:phash(#{},Sz),
+ 1196461908 = erlang:phash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 3944426064 = erlang:phash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 1394238263 = erlang:phash(#{ 1 => a },Sz),
+ 4066388227 = erlang:phash(#{ a => 1 },Sz),
+
+ 1578050717 = erlang:phash(#{{} => <<>>},Sz),
+ 1578050717 = erlang:phash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 3590546636 = erlang:phash(M0,Sz),
+ 4066388227 = erlang:phash(M1,Sz),
+ 3590546636 = erlang:phash(M2,Sz),
+ ok.
+
+t_bif_erlang_hash() ->
+ Sz = 1 bsl 27 - 1,
+ 5158 = erlang:hash(#{},Sz),
+ 71555838 = erlang:hash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 5497225 = erlang:hash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 126071654 = erlang:hash(#{ 1 => a },Sz),
+ 126426236 = erlang:hash(#{ a => 1 },Sz),
+
+ 101655720 = erlang:hash(#{{} => <<>>},Sz),
+ 101655720 = erlang:hash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 38260486 = erlang:hash(M0,Sz),
+ 126426236 = erlang:hash(M1,Sz),
+ 38260486 = erlang:hash(M2,Sz),
+ ok.
+
+
+t_map_encode_decode(Config) when is_list(Config) ->
+ <<131,116,0,0,0,0>> = erlang:term_to_binary(#{}),
+ Pairs = [
+ {a,b},{"key","values"},{<<"key">>,<<"value">>},
+ {1,b},{[atom,1],{<<"wat">>,1,2,3}},
+ {aa,"values"},
+ {1 bsl 64 + (1 bsl 50 - 1), sc1},
+ {99, sc2},
+ {1 bsl 65 + (1 bsl 51 - 1), sc3},
+ {88, sc4},
+ {1 bsl 66 + (1 bsl 52 - 1), sc5},
+ {77, sc6},
+ {1 bsl 67 + (1 bsl 53 - 1), sc3},
+ {75, sc6}, {-10,sc8},
+ {<<>>, sc9}, {3.14158, sc10},
+ {[3.14158], sc11}, {more_atoms, sc12},
+ {{more_tuples}, sc13}, {self(), sc14},
+ {{},{}},{[],[]}
+ ],
+ ok = map_encode_decode_and_match(Pairs,[],#{}),
+
+ %% check sorting
+
+ %% literally #{ b=>2, a=>1 } in the internal order
+ #{ a:=1, b:=2 } =
+ erlang:binary_to_term(<<131,116,0,0,0,2,100,0,1,98,97,2,100,0,1,97,97,1>>),
+
+
+ %% literally #{ "hi" => "value", a=>33, b=>55 } in the internal order
+ #{ a:=33, b:=55, "hi" := "value"} = erlang:binary_to_term(<<131,116,0,0,0,3,
+ 107,0,2,104,105, % "hi" :: list()
+ 107,0,5,118,97,108,117,101, % "value" :: list()
+ 100,0,1,97, % a :: atom()
+ 97,33, % 33 :: integer()
+ 100,0,1,98, % b :: atom()
+ 97,55 % 55 :: integer()
+ >>),
+
+
+ %% error cases
+ %% template: <<131,116,0,0,0,2,100,0,1,97,100,0,1,98,97,1,97,1>>
+ %% which is: #{ a=>1, b=>1 }
+
+ %% uniqueness violation
+ %% literally #{ a=>1, "hi"=>"value", a=>2 }
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,3,
+ 100,0,1,97,
+ 97,1,
+ 107,0,2,104,105,
+ 107,0,5,118,97,108,117,101,
+ 100,0,1,97,
+ 97,2>>)),
+
+ %% bad size (too large)
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,12,100,0,1,97,97,1,100,0,1,98,97,1>>)),
+
+ %% bad size (too small) .. should fail just truncate it .. weird.
+ %% possibly change external format so truncated will be #{a:=1}
+ #{ a:=b } =
+ erlang:binary_to_term(<<131,116,0,0,0,1,100,0,1,97,100,0,1,98,97,1,97,1>>),
+
+ ok.
+
+map_encode_decode_and_match([{K,V}|Pairs], EncodedPairs, M0) ->
+ M1 = maps:put(K,V,M0),
+ B0 = erlang:term_to_binary(M1),
+ Ls = lists:sort(fun(A,B) -> erts_internal:cmp_term(A,B) < 0 end, [{K, erlang:term_to_binary(K), erlang:term_to_binary(V)}|EncodedPairs]),
+ %% sort Ks and Vs according to term spec, then match it
+ KVbins = lists:foldr(fun({_,Kbin,Vbin}, Acc) -> [Kbin,Vbin | Acc] end, [], Ls),
+ ok = match_encoded_map(B0, length(Ls), KVbins),
+ %% decode and match it
+ M1 = erlang:binary_to_term(B0),
+ map_encode_decode_and_match(Pairs,Ls,M1);
+map_encode_decode_and_match([],_,_) -> ok.
+
+match_encoded_map(<<131,116,Size:32,Encoded/binary>>,Size,Items) ->
+ match_encoded_map(Encoded,Items);
+match_encoded_map(_,_,_) -> no_match_size.
+
+match_encoded_map(<<>>,[]) -> ok;
+match_encoded_map(Bin,[<<131,Item/binary>>|Items]) ->
+ Size = erlang:byte_size(Item),
+ <<EncodedTerm:Size/binary, Bin1/binary>> = Bin,
+ EncodedTerm = Item, %% Asssert
+ match_encoded_map(Bin1,Items).
+
+
+t_bif_map_to_list(Config) when is_list(Config) ->
+ [] = maps:to_list(#{}),
+ [{a,1},{b,2}] = maps:to_list(#{a=>1,b=>2}),
+ [{a,1},{b,2},{c,3}] = maps:to_list(#{c=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3}] = maps:to_list(#{g=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3},{"c",4}] = maps:to_list(#{g=>3,a=>1,b=>2,"c"=>4}),
+ [{3,v2},{hi,v4},{{hi,3},v5},{"hi",v3},{<<"hi">>,v1}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5}),
+
+ [{3,v7},{hi,v9},{{hi,3},v10},{"hi",v8},{<<"hi">>,v6}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5,
+ <<"hi">>=>v6,3=>v7,"hi"=>v8,hi=>v9,{hi,3}=>v10}),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(42))),
+ ok.
+
+
+t_bif_map_from_list(Config) when is_list(Config) ->
+ #{} = maps:from_list([]),
+ A = maps:from_list([]),
+ 0 = erlang:map_size(A),
+
+ #{a:=1,b:=2} = maps:from_list([{a,1},{b,2}]),
+ #{c:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{c,3}]),
+ #{g:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{g,3}]),
+
+ #{a:=2} = maps:from_list([{a,1},{a,3},{a,2}]),
+
+ #{ <<"hi">>:=v1,3:=v3,"hi":=v6,hi:=v4,{hi,3}:=v5} =
+ maps:from_list([{3,v3},{"hi",v6},{hi,v4},{{hi,3},v5},{<<"hi">>,v1}]),
+
+ #{<<"hi">>:=v6,3:=v8,"hi":=v11,hi:=v9,{hi,3}:=v10} =
+ maps:from_list([ {{hi,3},v3}, {"hi",v0},{3,v1}, {<<"hi">>,v4}, {hi,v2},
+ {<<"hi">>,v6}, {{hi,3},v10},{"hi",v11}, {hi,v9}, {3,v8}]),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},b]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},{b,b,3}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},<<>>]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b}|{b,a}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(42))),
+ ok.
+
+%% Maps module, not BIFs
+t_maps_fold(_Config) ->
+ Vs = lists:seq(1,100),
+ M = maps:from_list([{{k,I},{v,I}}||I<-Vs]),
+
+ %% fold
+ 5050 = maps:fold(fun({k,_},{v,V},A) -> V + A end, 0, M),
+
+ ok.
+
+t_maps_map(_Config) ->
+ Vs = lists:seq(1,100),
+ M1 = maps:from_list([{I,I}||I<-Vs]),
+ M2 = maps:from_list([{I,{token,I}}||I<-Vs]),
+
+ M2 = maps:map(fun(_K,V) -> {token,V} end, M1),
+ ok.
+
+t_maps_size(_Config) ->
+ Vs = lists:seq(1,100),
+ lists:foldl(fun(I,M) ->
+ M1 = maps:put(I,I,M),
+ I = maps:size(M1),
+ M1
+ end, #{}, Vs),
+ ok.
+
+
+t_maps_without(_Config) ->
+ Ki = [11,22,33,44,55,66,77,88,99],
+ M0 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100)]),
+ M1 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100) -- Ki]),
+ M1 = maps:without([{k,I}||I <- Ki],M0),
+ ok.
+
+
+%% MISC
+
+t_erts_internal_order(_Config) when is_list(_Config) ->
+
+ -1 = erts_internal:cmp_term(1,2),
+ 1 = erts_internal:cmp_term(2,1),
+ 0 = erts_internal:cmp_term(2,2),
+
+
+ -1 = erts_internal:cmp_term(1,a),
+ 1 = erts_internal:cmp_term(a,1),
+ 0 = erts_internal:cmp_term(a,a),
+
+ -1 = erts_internal:cmp_term(1,1.0),
+ 1 = erts_internal:cmp_term(1.0,1),
+ 0 = erts_internal:cmp_term(1.0,1.0),
+
+ -1 = erts_internal:cmp_term(1,1 bsl 65),
+ 1 = erts_internal:cmp_term(1 bsl 65,1),
+ 0 = erts_internal:cmp_term(1 bsl 65, 1 bsl 65),
+
+ -1 = erts_internal:cmp_term(1 bsl 65,float(1)),
+ 1 = erts_internal:cmp_term(float(1),1 bsl 65),
+ -1 = erts_internal:cmp_term(1,float(1 bsl 65)),
+ 1 = erts_internal:cmp_term(float(1 bsl 65),1),
+ 0 = erts_internal:cmp_term(float(1 bsl 65), float(1 bsl 65)),
+
+ %% reported errors
+ -1 = erts_internal:cmp_term(0,2147483648),
+ 0 = erts_internal:cmp_term(2147483648,2147483648),
+ 1 = erts_internal:cmp_term(2147483648,0),
+
+ M = #{0 => 0,2147483648 => 0},
+ true = M =:= binary_to_term(term_to_binary(M)),
+
+ F1 = fun(_, _) -> 0 end,
+ F2 = fun(_, _) -> 1 end,
+ M0 = maps:from_list( [{-2147483649, 0}, {0,0}, {97, 0}, {false, 0}, {flower, 0}, {F1, 0}, {F2, 0}, {<<>>, 0}]),
+ M1 = maps:merge(M0, #{0 => 1}),
+ 8 = maps:size(M1),
+ 1 = maps:get(0,M1),
+ ok.
+
+
+t_pdict(_Config) ->
+
+ put(#{ a => b, b => a},#{ c => d}),
+ put(get(#{ a => b, b => a}),1),
+ 1 = get(#{ c => d}),
+ #{ c := d } = get(#{ a => b, b => a}).
+
+t_ets(_Config) ->
+
+ Tid = ets:new(map_table,[]),
+
+ [ets:insert(Tid,{maps:from_list([{I,-I}]),I}) || I <- lists:seq(1,100)],
+
+
+ [{#{ 2 := -2},2}] = ets:lookup(Tid,#{ 2 => -2 }),
+
+ %% Test equal
+ [3,4] = lists:sort(
+ ets:select(Tid,[{{'$1','$2'},
+ [{'or',{'==','$1',#{ 3 => -3 }},
+ {'==','$1',#{ 4 => -4 }}}],
+ ['$2']}])),
+ %% Test match
+ [30,50] = lists:sort(
+ ets:select(Tid,
+ [{{#{ 30 => -30}, '$1'},[],['$1']},
+ {{#{ 50 => -50}, '$1'},[],['$1']}]
+ )),
+
+ ets:insert(Tid,{#{ a => b, b => c, c => a},transitivity}),
+
+ %% Test equal with map of different size
+ [] = ets:select(Tid,[{{'$1','_'},[{'==','$1',#{ b => c }}],['$_']}]),
+
+ %% Test match with map of different size
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => c },'_'},[],['$_']}]),
+
+ %%% Test match with don't care value
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => '_' },'_'},[],['$_']}]),
+
+ %% Test is_map bif
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{not_a_map,2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{{nope,a,tuple},2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+
+ %% Test map_size bif
+ [3] = ets:select(Tid,[{{'$1','_'},[{'==',{map_size,'$1'},3}],
+ [{map_size,'$1'}]}]),
+
+ true = ets:delete(Tid,#{50 => -50}),
+ [] = ets:lookup(Tid,#{50 => -50}),
+
+ ets:delete(Tid),
+ ok.
+
+t_dets(_Config) ->
+ ok.
+
+t_tracing(_Config) ->
+
+ dbg:stop_clear(),
+ {ok,Tracer} = dbg:tracer(process,{fun trace_collector/2, self()}),
+ dbg:p(self(),c),
+
+ %% Test basic map call
+ {ok,_} = dbg:tpl(?MODULE,id,x),
+ id(#{ a => b }),
+ {trace,_,call,{?MODULE,id,[#{ a := b }]}} = getmsg(Tracer),
+ {trace,_,return_from,{?MODULE,id,1},#{ a := b }} = getmsg(Tracer),
+ dbg:ctpl(),
+
+ %% Test equals in argument list
+ {ok,_} = dbg:tpl(?MODULE,id,[{['$1'],[{'==','$1',#{ b => c}}],
+ [{return_trace}]}]),
+ id(#{ a => b }),
+ id(#{ b => c }),
+ {trace,_,call,{?MODULE,id,[#{ b := c }]}} = getmsg(Tracer),
+ {trace,_,return_from,{?MODULE,id,1},#{ b := c }} = getmsg(Tracer),
+ dbg:ctpl(),
+
+ %% Test match in head
+ {ok,_} = dbg:tpl(?MODULE,id,[{[#{b => c}],[],[]}]),
+ id(#{ a => b }),
+ id(#{ b => c }),
+ {trace,_,call,{?MODULE,id,[#{ b := c }]}} = getmsg(Tracer),
+ dbg:ctpl(),
+
+ % Test map guard bifs
+ {ok,_} = dbg:tpl(?MODULE,id,[{['$1'],[{is_map,{element,1,'$1'}}],[]}]),
+ id(#{ a => b }),
+ id({1,2}),
+ id({#{ a => b},2}),
+ {trace,_,call,{?MODULE,id,[{#{ a := b },2}]}} = getmsg(Tracer),
+ dbg:ctpl(),
+
+ {ok,_} = dbg:tpl(?MODULE,id,[{['$1'],[{'==',{map_size,{element,1,'$1'}},2}],[]}]),
+ id(#{ a => b }),
+ id({1,2}),
+ id({#{ a => b},2}),
+ id({#{ a => b, b => c},atom}),
+ {trace,_,call,{?MODULE,id,[{#{ a := b, b := c },atom}]}} = getmsg(Tracer),
+ dbg:ctpl(),
+
+ %MS = dbg:fun2ms(fun([A]) when A == #{ a => b} -> ok end),
+ %dbg:tpl(?MODULE,id,MS),
+ %id(#{ a => b }),
+ %id(#{ b => c }),
+ %{trace,_,call,{?MODULE,id,[#{ a := b }]}} = getmsg(Tracer),
+ %dbg:ctpl(),
+
+ %% Check to extra messages
+ timeout = getmsg(Tracer),
+
+ dbg:stop_clear(),
+ ok.
+
+getmsg(_Tracer) ->
+ receive V -> V after 100 -> timeout end.
+
+trace_collector(Msg,Parent) ->
+ io:format("~p~n",[Msg]),
+ Parent ! Msg,
+ Parent.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/erts/emulator/test/match_spec_SUITE.erl b/erts/emulator/test/match_spec_SUITE.erl
index bcc46d78ba..fdce157abc 100644
--- a/erts/emulator/test/match_spec_SUITE.erl
+++ b/erts/emulator/test/match_spec_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,6 +25,7 @@
trace_control_word/1, silent/1, silent_no_ms/1, silent_test/1,
ms_trace2/1, ms_trace3/1, boxed_and_small/1,
destructive_in_test_bif/1, guard_exceptions/1,
+ empty_list/1,
unary_plus/1, unary_minus/1, moving_labels/1]).
-export([fpe/1]).
-export([otp_9422/1]).
@@ -41,7 +42,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
init_per_testcase(Func, Config) when is_atom(Func), is_list(Config) ->
- Dog=?t:timetrap(?t:seconds(10)),
+ Dog=?t:timetrap(?t:seconds(30)),
[{watchdog, Dog}|Config].
end_per_testcase(_Func, Config) ->
@@ -60,6 +61,7 @@ all() ->
guard_exceptions, unary_plus, unary_minus, fpe,
moving_labels,
faulty_seq_trace,
+ empty_list,
otp_9422];
true -> [not_run]
end.
@@ -897,6 +899,11 @@ fpe(Config) when is_list(Config) ->
_ -> ok
end.
+empty_list(Config) when is_list(Config) ->
+ Val=[{'$1',[], [{message,'$1'},{message,{caller}},{return_trace}]}],
+ %% Did crash debug VM in faulty assert:
+ erlang:match_spec_test([],Val,trace).
+
moving_labels(Config) when is_list(Config) ->
%% Force an andalso/orelse construction to be moved by placing it
%% in a tuple followed by a constant term. Labels should still
@@ -1002,12 +1009,14 @@ loop_runner(Collector, Fun, Laps) ->
end,
loop_runner_cont(Collector, Fun, 0, Laps).
-loop_runner_cont(_Collector, _Fun, Laps, Laps) ->
+loop_runner_cont(Collector, _Fun, Laps, Laps) ->
receive
- {done, Collector} ->
- io:format("loop_runner ~p exit after ~p laps\n", [self(), Laps]),
- Collector ! {gone, self()}
- end;
+ {done, Collector} -> ok;
+ {abort, Collector} -> ok
+ end,
+ io:format("loop_runner ~p exit after ~p laps\n", [self(), Laps]),
+ Collector ! {gone, self()};
+
loop_runner_cont(Collector, Fun, N, Laps) ->
Fun(),
receive
diff --git a/erts/emulator/test/mtx_SUITE_data/Makefile.src b/erts/emulator/test/mtx_SUITE_data/Makefile.src
index e65d99e968..04412280c0 100644
--- a/erts/emulator/test/mtx_SUITE_data/Makefile.src
+++ b/erts/emulator/test/mtx_SUITE_data/Makefile.src
@@ -17,8 +17,8 @@
# %CopyrightEnd%
#
-include @erts_lib_include_internal_generated@@[email protected]
-include @erts_lib_include_internal_generated@@DS@erts_internal.mk
+include @erts_lib_make_ethread@
+include @erts_lib_make_internal@
NIF_LIBS = mtx_SUITE@dll@
diff --git a/erts/emulator/test/nif_SUITE.erl b/erts/emulator/test/nif_SUITE.erl
index 9a70e8646a..4560077a51 100644
--- a/erts/emulator/test/nif_SUITE.erl
+++ b/erts/emulator/test/nif_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,14 +29,17 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,
end_per_testcase/2, basic/1, reload/1, upgrade/1, heap_frag/1,
- types/1, many_args/1, binaries/1, get_string/1, get_atom/1,
+ types/1, many_args/1, binaries/1, get_string/1, get_atom/1,
+ maps/1,
api_macros/1,
from_array/1, iolist_as_binary/1, resource/1, resource_binary/1,
resource_takeover/1,
threading/1, send/1, send2/1, send3/1, send_threaded/1, neg/1,
is_checks/1,
get_length/1, make_atom/1, make_string/1, reverse_list_test/1,
- otp_9668/1, consume_timeslice/1
+ otp_9828/1,
+ otp_9668/1, consume_timeslice/1, dirty_nif/1, dirty_nif_send/1,
+ dirty_nif_exception/1, nif_schedule/1
]).
-export([many_args_100/100]).
@@ -58,12 +61,14 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[basic, reload, upgrade, heap_frag, types, many_args,
- binaries, get_string, get_atom, api_macros, from_array,
+ binaries, get_string, get_atom, maps, api_macros, from_array,
iolist_as_binary, resource, resource_binary,
resource_takeover, threading, send, send2, send3,
send_threaded, neg, is_checks, get_length, make_atom,
make_string,reverse_list_test,
- otp_9668, consume_timeslice
+ otp_9828,
+ otp_9668, consume_timeslice,
+ nif_schedule, dirty_nif, dirty_nif_send, dirty_nif_exception
].
groups() ->
@@ -435,6 +440,54 @@ get_atom(Config) when is_list(Config) ->
?line {0, <<>>} = atom_to_bin('',0),
ok.
+maps(doc) -> ["Test NIF maps handling."];
+maps(suite) -> [];
+maps(Config) when is_list(Config) ->
+ TmpMem = tmpmem(),
+ Pairs = [{adam, "bert"}] ++
+ [{I,I}||I <- lists:seq(1,10)] ++
+ [{a,value},{"a","value"},{<<"a">>,<<"value">>}],
+ ok = ensure_lib_loaded(Config, 1),
+ M = maps_from_list_nif(Pairs),
+ R = {RIs,Is} = sorted_list_from_maps_nif(M),
+ io:format("Pairs: ~p~nMap: ~p~nReturned: ~p~n", [lists:sort(Pairs),M,R]),
+ Is = lists:sort(Pairs),
+ Is = lists:reverse(RIs),
+
+ #{} = maps_from_list_nif([]),
+ {[],[]} = sorted_list_from_maps_nif(#{}),
+
+ 1 = is_map_nif(M),
+ 0 = is_map_nif("no map"),
+
+ Msz = map_size(M),
+ {1,Msz} = get_map_size_nif(M),
+ {1,0} = get_map_size_nif(#{}),
+ {0,-123} = get_map_size_nif({#{}}),
+
+ #{} = M0 = make_new_map_nif(),
+
+ {1, #{key := value}=M1} = make_map_put_nif(M0, key, value),
+ {1, #{key := value, "key2" := "value2"}=M2} = make_map_put_nif(M1, "key2", "value2"),
+ {1, #{key := "value", "key2" := "value2"}=M3} = make_map_put_nif(M2, key, "value"),
+ {0, undefined} = make_map_put_nif(666, key, value),
+
+ {1, "value2"} = get_map_value_nif(M3,"key2"),
+ {0, undefined} = get_map_value_nif(M3,"key3"),
+ {0, undefined} = get_map_value_nif(false,key),
+
+ {0, undefined} = make_map_update_nif(M0, key, value),
+ {0, undefined} = make_map_update_nif(M1, "key2", "value2"),
+ {1, #{key := "value", "key2" := "value2"}} = make_map_update_nif(M2, key, "value"),
+ {0, undefined} = make_map_update_nif(666, key, value),
+
+ {1, #{}} = make_map_remove_nif(M1, key),
+ {1, M1} = make_map_remove_nif(M2, "key2"),
+ {1, M2} = make_map_remove_nif(M2, "key3"),
+ {0, undefined} = make_map_remove_nif(self(), key),
+
+ ok.
+
api_macros(doc) -> ["Test macros enif_make_list<N> and enif_make_tuple<N>"];
api_macros(suite) -> [];
api_macros(Config) when is_list(Config) ->
@@ -801,6 +854,138 @@ resource_takeover(Config) when is_list(Config) ->
?line ok = forget_resource(AN4),
?line [] = nif_mod_call_history(),
+
+ %%
+ %% Test rollback after failed upgrade of same lib-version
+ %%
+
+ {A5,BinA5} = make_resource(2, Holder, "A5"),
+ {NA5,BinNA5} = make_resource(0, Holder, "NA5"),
+ {AN5,_BinAN5} = make_resource(1, Holder, "AN5"),
+
+ {A6,BinA6} = make_resource(2, Holder, "A6"),
+ {NA6,BinNA6} = make_resource(0, Holder, "NA6"),
+ {AN6,_BinAN6} = make_resource(1, Holder, "AN6"),
+
+ {module,nif_mod} = erlang:load_module(nif_mod,ModBin),
+ undefined = nif_mod:lib_version(),
+ {error,{upgrade,_}} =
+ nif_mod:load_nif_lib(Config, 1,
+ [{resource_type, 4, ?RT_TAKEOVER, "resource_type_A",resource_dtor_B,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_TAKEOVER bor ?RT_CREATE, "resource_type_null_A",null,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_TAKEOVER, "resource_type_A_null",resource_dtor_A,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_CREATE, "Mr Pink", resource_dtor_A,
+ ?RT_CREATE},
+
+ {return, 1} % FAIL
+ ]),
+
+ undefined = nif_mod:lib_version(),
+ [{upgrade,1,5,105}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not changed (from A to B)
+ ok = forget_resource(A5),
+ [{{resource_dtor_A_v1,BinA5},1,6,106}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not nullified (from A to null)
+ ok = forget_resource(NA5),
+ [{{resource_dtor_A_v1,BinNA5},1,7,107}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not added (from null to A)
+ ok = forget_resource(AN5),
+ [] = nif_mod_call_history(),
+
+ %%
+ %% Test rollback after failed upgrade of other lib-version
+ %%
+
+ {error,{upgrade,_}} =
+ nif_mod:load_nif_lib(Config, 2,
+ [{resource_type, 4, ?RT_TAKEOVER, "resource_type_A",resource_dtor_B,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_TAKEOVER bor ?RT_CREATE, "resource_type_null_A",null,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_TAKEOVER, "resource_type_A_null",resource_dtor_A,
+ ?RT_TAKEOVER},
+ {resource_type, null, ?RT_TAKEOVER, "Mr Pink", resource_dtor_A,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_CREATE, "Mr Pink", resource_dtor_A,
+ ?RT_CREATE},
+
+ {return, 1} % FAIL
+ ]),
+
+ undefined = nif_mod:lib_version(),
+ [{upgrade,2,_,_}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not changed (from A to B)
+ ok = forget_resource(A6),
+ [{{resource_dtor_A_v1,BinA6},1,_,_}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not nullified (from A to null)
+ ok = forget_resource(NA6),
+ [{{resource_dtor_A_v1,BinNA6},1,_,_}] = nif_mod_call_history(),
+
+ %% Make sure dtor was not added (from null to A)
+ ok = forget_resource(AN6),
+ [] = nif_mod_call_history(),
+
+ %%
+ %% Test rolback after failed initial load
+ %%
+ false = code:purge(nif_mod),
+ [{unload,1,_,_}] = nif_mod_call_history(),
+ true = code:delete(nif_mod),
+ false = code:purge(nif_mod),
+ [] = nif_mod_call_history(),
+
+
+ {module,nif_mod} = erlang:load_module(nif_mod,ModBin),
+ undefined = nif_mod:lib_version(),
+ {error,{load,_}} =
+ nif_mod:load_nif_lib(Config, 1,
+ [{resource_type, null, ?RT_TAKEOVER, "resource_type_A",resource_dtor_A,
+ ?RT_TAKEOVER},
+ {resource_type, 4, ?RT_TAKEOVER bor ?RT_CREATE, "resource_type_null_A",null,
+ ?RT_CREATE},
+ {resource_type, 4, ?RT_CREATE, "resource_type_A_null",resource_dtor_A,
+ ?RT_CREATE},
+ {resource_type, 4, ?RT_CREATE, "Mr Pink", resource_dtor_A,
+ ?RT_CREATE},
+
+ {return, 1} % FAIL
+ ]),
+
+ undefined = nif_mod:lib_version(),
+ ok = nif_mod:load_nif_lib(Config, 1,
+ [{resource_type, null, ?RT_TAKEOVER, "resource_type_A",resource_dtor_A,
+ ?RT_TAKEOVER},
+ {resource_type, 0, ?RT_TAKEOVER bor ?RT_CREATE, "resource_type_null_A",
+ resource_dtor_A, ?RT_CREATE},
+
+ {resource_type, 1, ?RT_CREATE, "resource_type_A_null", null,
+ ?RT_CREATE},
+ {resource_type, null, ?RT_TAKEOVER, "Mr Pink", resource_dtor_A,
+ ?RT_TAKEOVER},
+
+ {return, 0} % SUCCESS
+ ]),
+
+ ?line hold_nif_mod_priv_data(nif_mod:get_priv_data_ptr()),
+ ?line [{load,1,1,101},{get_priv_data_ptr,1,2,102}] = nif_mod_call_history(),
+
+ {NA7,BinNA7} = make_resource(0, Holder, "NA7"),
+ {AN7,BinAN7} = make_resource(1, Holder, "AN7"),
+
+ ok = forget_resource(NA7),
+ [{{resource_dtor_A_v1,BinNA7},1,_,_}] = nif_mod_call_history(),
+
+ ok = forget_resource(AN7),
+ [] = nif_mod_call_history(),
+
?line true = lists:member(?MODULE, erlang:system_info(taints)),
?line true = lists:member(nif_mod, erlang:system_info(taints)),
?line verify_tmpmem(TmpMem),
@@ -1259,6 +1444,20 @@ otp_9668(Config) ->
?line verify_tmpmem(TmpMem),
ok.
+otp_9828(doc) -> ["Copy of writable binary"];
+otp_9828(Config) ->
+ ensure_lib_loaded(Config, 1),
+
+ otp_9828_loop(<<"I'm alive!">>, 1000).
+
+otp_9828_loop(Bin, 0) ->
+ ok;
+otp_9828_loop(Bin, Val) ->
+ WrtBin = <<Bin/binary, Val:32>>,
+ ok = otp_9828_nif(WrtBin),
+ otp_9828_loop(WrtBin, Val-1).
+
+
consume_timeslice(Config) when is_list(Config) ->
CONTEXT_REDS = 2000,
Me = self(),
@@ -1343,7 +1542,73 @@ consume_timeslice(Config) when is_list(Config) ->
ok.
-next_msg(Pid) ->
+nif_schedule(Config) when is_list(Config) ->
+ ensure_lib_loaded(Config),
+ A = "this is a string",
+ B = {this,is,a,tuple},
+ {B,A} = call_nif_schedule(A, B),
+ ok = try call_nif_schedule(1, 2)
+ catch
+ error:badarg ->
+ [{?MODULE,call_nif_schedule,[1,2],_}|_] =
+ erlang:get_stacktrace(),
+ ok
+ end,
+ ok.
+
+dirty_nif(Config) when is_list(Config) ->
+ try erlang:system_info(dirty_cpu_schedulers) of
+ N when is_integer(N) ->
+ ensure_lib_loaded(Config),
+ Val1 = 42,
+ Val2 = "Erlang",
+ Val3 = list_to_binary([Val2, 0]),
+ {Val1, Val2, Val3} = call_dirty_nif(Val1, Val2, Val3),
+ LargeArray = lists:duplicate(1000, ok),
+ LargeArray = call_dirty_nif_zero_args(),
+ ok
+ catch
+ error:badarg ->
+ {skipped,"No dirty scheduler support"}
+ end.
+
+dirty_nif_send(Config) when is_list(Config) ->
+ try erlang:system_info(dirty_cpu_schedulers) of
+ N when is_integer(N) ->
+ ensure_lib_loaded(Config),
+ Parent = self(),
+ Pid = spawn_link(fun() ->
+ Self = self(),
+ {ok, Self} = receive_any(),
+ Parent ! {ok, Self}
+ end),
+ {ok, Pid} = send_from_dirty_nif(Pid),
+ {ok, Pid} = receive_any(),
+ ok
+ catch
+ error:badarg ->
+ {skipped,"No dirty scheduler support"}
+ end.
+
+dirty_nif_exception(Config) when is_list(Config) ->
+ try erlang:system_info(dirty_cpu_schedulers) of
+ N when is_integer(N) ->
+ ensure_lib_loaded(Config),
+ try
+ call_dirty_nif_exception(),
+ ?t:fail(expected_badarg)
+ catch
+ error:badarg ->
+ [{?MODULE,call_dirty_nif_exception,[],_}|_] =
+ erlang:get_stacktrace(),
+ ok
+ end
+ catch
+ error:badarg ->
+ {skipped,"No dirty scheduler support"}
+ end.
+
+next_msg(_Pid) ->
receive
M -> M
after 100 ->
@@ -1471,7 +1736,25 @@ reverse_list(_) -> ?nif_stub.
echo_int(_) -> ?nif_stub.
type_sizes() -> ?nif_stub.
otp_9668_nif(_) -> ?nif_stub.
+otp_9828_nif(_) -> ?nif_stub.
consume_timeslice_nif(_,_) -> ?nif_stub.
+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.
+
+%% maps
+is_map_nif(_) -> ?nif_stub.
+get_map_size_nif(_) -> ?nif_stub.
+make_new_map_nif() -> ?nif_stub.
+make_map_put_nif(_,_,_) -> ?nif_stub.
+get_map_value_nif(_,_) -> ?nif_stub.
+make_map_update_nif(_,_,_) -> ?nif_stub.
+make_map_remove_nif(_,_) -> ?nif_stub.
+maps_from_list_nif(_) -> ?nif_stub.
+sorted_list_from_maps_nif(_) -> ?nif_stub.
+
nif_stub_error(Line) ->
exit({nif_not_loaded,module,?MODULE,line,Line}).
diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
index 0c4a9f7e5c..85544db2ab 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
+++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -1473,11 +1473,30 @@ static ERL_NIF_TERM otp_9668_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
return atom_ok;
}
+static ERL_NIF_TERM otp_9828_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ /* copy a writable binary could reallocate it due to "emasculation"
+ and thereby render a previous inspection invalid.
+ */
+ ErlNifBinary bin1;
+ ErlNifEnv* myenv;
+
+ if (!enif_inspect_binary(env, argv[0], &bin1)) {
+ return enif_make_badarg(env);
+ }
+
+ myenv = enif_alloc_env();
+ enif_make_copy(myenv, argv[0]);
+ enif_free_env(myenv);
+
+ return memcmp(bin1.data, "I'm alive!", 10)==0 ? atom_ok : atom_false;
+}
+
+
static ERL_NIF_TERM consume_timeslice_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
int percent;
char atom[10];
- int do_repeat;
if (!enif_get_int(env, argv[0], &percent) ||
!enif_get_atom(env, argv[1], atom, sizeof(atom), ERL_NIF_LATIN1)) {
@@ -1494,6 +1513,256 @@ static ERL_NIF_TERM consume_timeslice_nif(ErlNifEnv* env, int argc, const ERL_NI
}
}
+static ERL_NIF_TERM nif_sched2(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ char s[64];
+ if (!enif_get_string(env, argv[2], s, sizeof s, ERL_NIF_LATIN1))
+ return enif_make_badarg(env);
+ return enif_make_tuple2(env, argv[3], argv[2]);
+}
+
+static ERL_NIF_TERM nif_sched1(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM new_argv[4];
+ new_argv[0] = enif_make_atom(env, "garbage0");
+ new_argv[1] = enif_make_atom(env, "garbage1");
+ new_argv[2] = argv[0];
+ new_argv[3] = argv[1];
+ return enif_schedule_nif(env, "nif_sched2", 0, nif_sched2, 4, new_argv);
+}
+
+static ERL_NIF_TERM call_nif_schedule(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ if (argc != 2)
+ return enif_make_atom(env, "false");
+ return enif_schedule_nif(env, "nif_sched1", 0, nif_sched1, argc, argv);
+}
+
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+
+static int have_dirty_schedulers(void)
+{
+ ErlNifSysInfo si;
+ enif_system_info(&si, sizeof(si));
+ return si.dirty_scheduler_support;
+}
+
+static ERL_NIF_TERM dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ int n;
+ char s[10];
+ ErlNifBinary b;
+ ERL_NIF_TERM result;
+ if (have_dirty_schedulers()) {
+ assert(enif_is_on_dirty_scheduler(env));
+ }
+ assert(argc == 3);
+ enif_get_int(env, argv[0], &n);
+ enif_get_string(env, argv[1], s, sizeof s, ERL_NIF_LATIN1);
+ enif_inspect_binary(env, argv[2], &b);
+ return enif_make_tuple3(env,
+ enif_make_int(env, n),
+ enif_make_string(env, s, ERL_NIF_LATIN1),
+ enif_make_binary(env, &b));
+}
+
+static ERL_NIF_TERM call_dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ int n;
+ char s[10];
+ ErlNifBinary b;
+ assert(!enif_is_on_dirty_scheduler(env));
+ if (argc != 3)
+ return enif_make_badarg(env);
+ if (have_dirty_schedulers()) {
+ if (enif_get_int(env, argv[0], &n) &&
+ enif_get_string(env, argv[1], s, sizeof s, ERL_NIF_LATIN1) &&
+ enif_inspect_binary(env, argv[2], &b))
+ return enif_schedule_nif(env, "call_dirty_nif", ERL_NIF_DIRTY_JOB_CPU_BOUND, dirty_nif, argc, argv);
+ else
+ return enif_make_badarg(env);
+ } else {
+ return dirty_nif(env, argc, argv);
+ }
+}
+
+static ERL_NIF_TERM send_from_dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM result;
+ ErlNifPid pid;
+ ErlNifEnv* menv;
+ int res;
+
+ if (!enif_get_local_pid(env, argv[0], &pid))
+ return enif_make_badarg(env);
+ result = enif_make_tuple2(env, enif_make_atom(env, "ok"), enif_make_pid(env, &pid));
+ menv = enif_alloc_env();
+ res = enif_send(env, &pid, menv, result);
+ enif_free_env(menv);
+ if (!res)
+ return enif_make_badarg(env);
+ else
+ return result;
+}
+
+static ERL_NIF_TERM call_dirty_nif_exception(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ switch (argc) {
+ case 0: {
+ ERL_NIF_TERM args[255];
+ int i;
+ for (i = 0; i < 255; i++)
+ args[i] = enif_make_int(env, i);
+ return enif_schedule_nif(env, "call_dirty_nif_exception", ERL_NIF_DIRTY_JOB_CPU_BOUND,
+ call_dirty_nif_exception, 255, argv);
+ }
+ case 1:
+ return enif_make_badarg(env);
+ default:
+ return enif_schedule_nif(env, "call_dirty_nif_exception", ERL_NIF_DIRTY_JOB_CPU_BOUND,
+ call_dirty_nif_exception, argc-1, argv);
+ }
+}
+
+static ERL_NIF_TERM call_dirty_nif_zero_args(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ int i;
+ ERL_NIF_TERM result[1000];
+ ERL_NIF_TERM ok = enif_make_atom(env, "ok");
+ assert(argc == 0);
+ for (i = 0; i < sizeof(result)/sizeof(*result); i++) {
+ result[i] = ok;
+ }
+ return enif_make_list_from_array(env, result, i);
+}
+#endif
+
+static ERL_NIF_TERM is_map_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ return enif_make_int(env, enif_is_map(env,argv[0]));
+}
+static ERL_NIF_TERM get_map_size_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ size_t size = (size_t)-123;
+ int ret = enif_get_map_size(env, argv[0], &size);
+ return enif_make_tuple2(env, enif_make_int(env, ret), enif_make_int(env, (int)size));
+}
+static ERL_NIF_TERM make_new_map_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ return enif_make_new_map(env);
+}
+static ERL_NIF_TERM make_map_put_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM map_out = enif_make_atom(env, "undefined");
+ int ret = enif_make_map_put(env, argv[0], argv[1], argv[2], &map_out);
+ return enif_make_tuple2(env, enif_make_int(env,ret), map_out);
+}
+static ERL_NIF_TERM get_map_value_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM value = enif_make_atom(env, "undefined");
+ int ret = enif_get_map_value(env, argv[0], argv[1], &value);
+ return enif_make_tuple2(env, enif_make_int(env,ret), value);
+
+}
+static ERL_NIF_TERM make_map_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM map_out = enif_make_atom(env, "undefined");
+ int ret = enif_make_map_update(env, argv[0], argv[1], argv[2], &map_out);
+ return enif_make_tuple2(env, enif_make_int(env,ret), map_out);
+}
+static ERL_NIF_TERM make_map_remove_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM map_out = enif_make_atom(env, "undefined");
+ int ret = enif_make_map_remove(env, argv[0], argv[1], &map_out);
+ return enif_make_tuple2(env, enif_make_int(env,ret), map_out);
+}
+
+/* maps */
+static ERL_NIF_TERM maps_from_list_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ERL_NIF_TERM cell = argv[0];
+ ERL_NIF_TERM map = enif_make_new_map(env);
+ ERL_NIF_TERM tuple;
+ const ERL_NIF_TERM *pair;
+ int arity = -1;
+
+ if (argc != 1 && !enif_is_list(env, cell)) return enif_make_badarg(env);
+
+ /* assume sorted keys */
+
+ while (!enif_is_empty_list(env,cell)) {
+ if (!enif_get_list_cell(env, cell, &tuple, &cell)) return enif_make_badarg(env);
+ if (enif_get_tuple(env,tuple,&arity,&pair)) {
+ enif_make_map_put(env, map, pair[0], pair[1], &map);
+ }
+ }
+
+ return map;
+}
+
+static ERL_NIF_TERM sorted_list_from_maps_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {
+
+ ERL_NIF_TERM map = argv[0];
+ ERL_NIF_TERM list_f = enif_make_list(env, 0); /* NIL */
+ ERL_NIF_TERM list_b = enif_make_list(env, 0); /* NIL */
+ ERL_NIF_TERM key, value, k2, v2;
+ ErlNifMapIterator iter_f;
+ ErlNifMapIterator iter_b;
+ int cnt, next_ret, prev_ret;
+
+ if (argc != 1 && !enif_is_map(env, map))
+ return enif_make_int(env, __LINE__);
+
+ if(!enif_map_iterator_create(env, map, &iter_f, ERL_NIF_MAP_ITERATOR_HEAD))
+ return enif_make_int(env, __LINE__);
+
+ cnt = 0;
+ while(enif_map_iterator_get_pair(env,&iter_f,&key,&value)) {
+ if (cnt && !next_ret)
+ return enif_make_int(env, __LINE__);
+ list_f = enif_make_list_cell(env, enif_make_tuple2(env, key, value), list_f);
+ next_ret = enif_map_iterator_next(env,&iter_f);
+ cnt++;
+ }
+ if (cnt && next_ret)
+ return enif_make_int(env, __LINE__);
+
+ if(!enif_map_iterator_create(env, map, &iter_b, ERL_NIF_MAP_ITERATOR_TAIL))
+ return enif_make_int(env, __LINE__);
+
+ cnt = 0;
+ while(enif_map_iterator_get_pair(env,&iter_b,&key,&value)) {
+ if (cnt && !prev_ret)
+ return enif_make_int(env, __LINE__);
+
+ /* Test that iter_f can step "backwards" */
+ if (!enif_map_iterator_prev(env,&iter_f)
+ || !enif_map_iterator_get_pair(env,&iter_f,&k2,&v2)
+ || k2 != key || v2 != value) {
+ return enif_make_int(env, __LINE__);
+ }
+
+ list_b = enif_make_list_cell(env, enif_make_tuple2(env, key, value), list_b);
+ prev_ret = enif_map_iterator_prev(env,&iter_b);
+ }
+
+ if (cnt) {
+ if (prev_ret || enif_map_iterator_prev(env,&iter_f))
+ return enif_make_int(env, __LINE__);
+
+ /* Test that iter_b can step "backwards" one step */
+ if (!enif_map_iterator_next(env, &iter_b)
+ || !enif_map_iterator_get_pair(env,&iter_b,&k2,&v2)
+ || k2 != key || v2 != value)
+ return enif_make_int(env, __LINE__);
+ }
+
+ enif_map_iterator_destroy(env, &iter_f);
+ enif_map_iterator_destroy(env, &iter_b);
+
+ return enif_make_tuple2(env, list_f, list_b);
+}
+
static ErlNifFunc nif_funcs[] =
{
{"lib_version", 0, lib_version},
@@ -1543,7 +1812,24 @@ static ErlNifFunc nif_funcs[] =
{"echo_int", 1, echo_int},
{"type_sizes", 0, type_sizes},
{"otp_9668_nif", 1, otp_9668_nif},
- {"consume_timeslice_nif", 2, consume_timeslice_nif}
+ {"otp_9828_nif", 1, otp_9828_nif},
+ {"consume_timeslice_nif", 2, consume_timeslice_nif},
+ {"call_nif_schedule", 2, call_nif_schedule},
+#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
+ {"call_dirty_nif", 3, call_dirty_nif},
+ {"send_from_dirty_nif", 1, send_from_dirty_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND},
+ {"call_dirty_nif_exception", 0, 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},
+#endif
+ {"is_map_nif", 1, is_map_nif},
+ {"get_map_size_nif", 1, get_map_size_nif},
+ {"make_new_map_nif", 0, make_new_map_nif},
+ {"make_map_put_nif", 3, make_map_put_nif},
+ {"get_map_value_nif", 2, get_map_value_nif},
+ {"make_map_update_nif", 3, make_map_update_nif},
+ {"make_map_remove_nif", 2, make_map_remove_nif},
+ {"maps_from_list_nif", 1, maps_from_list_nif},
+ {"sorted_list_from_maps_nif", 1, sorted_list_from_maps_nif}
};
ERL_NIF_INIT(nif_SUITE,nif_funcs,load,reload,upgrade,unload)
diff --git a/erts/emulator/test/nif_SUITE_data/nif_mod.c b/erts/emulator/test/nif_SUITE_data/nif_mod.c
index e32d10057c..11b5d0cc35 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_mod.c
+++ b/erts/emulator/test/nif_SUITE_data/nif_mod.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2010. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -41,6 +41,7 @@ static ERL_NIF_TERM am_null;
static ERL_NIF_TERM am_resource_type;
static ERL_NIF_TERM am_resource_dtor_A;
static ERL_NIF_TERM am_resource_dtor_B;
+static ERL_NIF_TERM am_return;
static NifModPrivData* priv_data(ErlNifEnv* env)
{
@@ -54,6 +55,7 @@ static void init(ErlNifEnv* env)
am_resource_type = enif_make_atom(env, "resource_type");
am_resource_dtor_A = enif_make_atom(env, "resource_dtor_A");
am_resource_dtor_B = enif_make_atom(env, "resource_dtor_B");
+ am_return = enif_make_atom(env, "return");
}
static void add_call_with_arg(ErlNifEnv* env, NifModPrivData* data, const char* func_name,
@@ -105,19 +107,15 @@ static void resource_dtor_B(ErlNifEnv* env, void* a)
}
/* {resource_type, Ix|null, ErlNifResourceFlags in, "TypeName", dtor(A|B|null), ErlNifResourceFlags out}*/
-static void open_resource_type(ErlNifEnv* env, ERL_NIF_TERM op_tpl)
+static void open_resource_type(ErlNifEnv* env, const ERL_NIF_TERM* arr)
{
NifModPrivData* data = priv_data(env);
- const ERL_NIF_TERM* arr;
- int arity;
char rt_name[30];
union { ErlNifResourceFlags e; int i; } flags, exp_res, got_res;
unsigned ix;
ErlNifResourceDtor* dtor;
ErlNifResourceType* got_ptr;
- CHECK(enif_get_tuple(env, op_tpl, &arity, &arr));
- CHECK(arity == 6);
CHECK(enif_is_identical(arr[0], am_resource_type));
CHECK(enif_get_int(env, arr[2], &flags.i));
CHECK(enif_get_string(env, arr[3], rt_name, sizeof(rt_name), ERL_NIF_LATIN1) > 0);
@@ -147,18 +145,32 @@ static void open_resource_type(ErlNifEnv* env, ERL_NIF_TERM op_tpl)
CHECK(got_res.e == exp_res.e);
}
-static void do_load_info(ErlNifEnv* env, ERL_NIF_TERM load_info)
+static void do_load_info(ErlNifEnv* env, ERL_NIF_TERM load_info, int* retvalp)
{
NifModPrivData* data = priv_data(env);
ERL_NIF_TERM head, tail;
unsigned ix;
+
for (ix=0; ix<RT_MAX; ix++) {
data->rt_arr[ix] = NULL;
}
for (head = load_info; enif_get_list_cell(env, head, &head, &tail);
head = tail) {
-
- open_resource_type(env, head);
+ const ERL_NIF_TERM* arr;
+ int arity;
+
+ CHECK(enif_get_tuple(env, head, &arity, &arr));
+ switch (arity) {
+ case 6:
+ open_resource_type(env, arr);
+ break;
+ case 2:
+ CHECK(arr[0] == am_return);
+ CHECK(enif_get_int(env, arr[1], retvalp));
+ break;
+ default:
+ CHECK(0);
+ }
}
CHECK(enif_is_empty_list(env, head));
}
@@ -166,6 +178,7 @@ static void do_load_info(ErlNifEnv* env, ERL_NIF_TERM load_info)
static int load(ErlNifEnv* env, void** priv, ERL_NIF_TERM load_info)
{
NifModPrivData* data;
+ int retval = 0;
init(env);
data = (NifModPrivData*) enif_alloc(sizeof(NifModPrivData));
@@ -177,38 +190,42 @@ static int load(ErlNifEnv* env, void** priv, ERL_NIF_TERM load_info)
add_call(env, data, "load");
- do_load_info(env, load_info);
- data->calls = 0;
- return 0;
+ do_load_info(env, load_info, &retval);
+ if (retval)
+ NifModPrivData_release(data);
+ return retval;
}
static int reload(ErlNifEnv* env, void** priv, ERL_NIF_TERM load_info)
{
NifModPrivData* data = (NifModPrivData*) *priv;
+ int retval = 0;
init(env);
add_call(env, data, "reload");
- do_load_info(env, load_info);
- return 0;
+ do_load_info(env, load_info, &retval);
+ return retval;
}
static int upgrade(ErlNifEnv* env, void** priv, void** old_priv_data, ERL_NIF_TERM load_info)
{
NifModPrivData* data = (NifModPrivData*) *old_priv_data;
+ int retval = 0;
init(env);
add_call(env, data, "upgrade");
data->ref_cnt++;
*priv = *old_priv_data;
- do_load_info(env, load_info);
-
- return 0;
+ do_load_info(env, load_info, &retval);
+ if (retval)
+ NifModPrivData_release(data);
+ return retval;
}
static void unload(ErlNifEnv* env, void* priv)
{
NifModPrivData* data = (NifModPrivData*) priv;
- int is_last;
+
add_call(env, data, "unload");
NifModPrivData_release(data);
}
diff --git a/erts/emulator/test/nif_SUITE_data/nif_mod.h b/erts/emulator/test/nif_SUITE_data/nif_mod.h
index cd0ecf4b54..fb14fee815 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_mod.h
+++ b/erts/emulator/test/nif_SUITE_data/nif_mod.h
@@ -14,7 +14,6 @@ typedef struct call_info_t
typedef struct
{
ErlNifMutex* mtx;
- int calls;
int ref_cnt;
CallInfo* call_history;
ErlNifResourceType* rt_arr[RT_MAX];
@@ -28,6 +27,11 @@ typedef struct
enif_mutex_unlock((NMPD)->mtx); \
if (is_last) { \
enif_mutex_destroy((NMPD)->mtx); \
+ while ((NMPD)->call_history) { \
+ CallInfo* next = (NMPD)->call_history->next; \
+ enif_free((NMPD)->call_history); \
+ (NMPD)->call_history = next; \
+ } \
enif_free((NMPD)); \
} \
}while (0)
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl
index ff8d18eef8..abe5b8eb91 100644
--- a/erts/emulator/test/num_bif_SUITE.erl
+++ b/erts/emulator/test/num_bif_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -394,18 +394,15 @@ t_string_to_integer(Config) when is_list(Config) ->
test_sti(268435455),
test_sti(-268435455),
- %% 1 bsl 28 - 1, just before 32 bit bignum
- test_sti(1 bsl 28 - 1),
- %% 1 bsl 28, just beyond 32 bit small
- test_sti(1 bsl 28),
- %% 1 bsl 33, just beyond 32 bit
- test_sti(1 bsl 33),
- %% 1 bsl 60 - 1, just before 64 bit bignum
- test_sti(1 bsl 60 - 1),
- %% 1 bsl 60, just beyond 64 bit small
- test_sti(1 bsl 60),
- %% 1 bsl 65, just beyond 64 bit
- test_sti(1 bsl 65),
+ % Interesting values around 2-pows, such as MIN_SMALL and MAX_SMALL.
+ lists:foreach(fun(Bits) ->
+ N = 1 bsl Bits,
+ test_sti(N - 1),
+ test_sti(N),
+ test_sti(N + 1)
+ end,
+ lists:seq(16, 130)),
+
%% Bignums.
test_sti(123456932798748738738,16),
test_sti(list_to_integer(lists:duplicate(2000, $1))),
@@ -444,7 +441,11 @@ t_string_to_integer(Config) when is_list(Config) ->
{"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111z",16},
{"1z111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",16},
{"111z11111111",16}]),
-
+
+ %% log2 calculation overflow bug in do_integer_to_list (OTP-12624)
+ %% Would crash with segv
+ 0 = list_to_integer(lists:duplicate(10000000,$0)),
+
ok.
test_sti(Num) ->
@@ -454,10 +455,11 @@ test_sti(Num) ->
end|| Base <- lists:seq(2,36)].
test_sti(Num,Base) ->
- Num = list_to_integer(int2list(Num,Base),Base),
- Num = -1*list_to_integer(int2list(Num*-1,Base),Base),
- Num = binary_to_integer(int2bin(Num,Base),Base),
- Num = -1*binary_to_integer(int2bin(Num*-1,Base),Base).
+ Neg = -Num,
+ Num = list_to_integer(int2list(Num,Base),Base),
+ Neg = list_to_integer(int2list(Num*-1,Base),Base),
+ Num = binary_to_integer(int2bin(Num,Base),Base),
+ Neg = binary_to_integer(int2bin(Num*-1,Base),Base).
% Calling this function (which is not supposed to be inlined) prevents
% the compiler from calculating the answer, so we don't test the compiler
diff --git a/erts/emulator/test/port_SUITE.erl b/erts/emulator/test/port_SUITE.erl
index fcd4457c34..9083545060 100644
--- a/erts/emulator/test/port_SUITE.erl
+++ b/erts/emulator/test/port_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -90,6 +90,7 @@
mix_up_ports/1, otp_5112/1, otp_5119/1, otp_6224/1,
exit_status_multi_scheduling_block/1, ports/1,
spawn_driver/1, spawn_executable/1, close_deaf_port/1,
+ port_setget_data/1,
unregister_name/1, parallelism_option/1]).
-export([do_iter_max_ports/2]).
@@ -115,6 +116,7 @@ all() ->
mix_up_ports, otp_5112, otp_5119,
exit_status_multi_scheduling_block, ports, spawn_driver,
spawn_executable, close_deaf_port, unregister_name,
+ port_setget_data,
parallelism_option].
groups() ->
@@ -949,6 +951,20 @@ cd(Config) when is_list(Config) ->
Other2 ->
test_server:fail({env, Other2})
end,
+ _ = open_port({spawn, Cmd},
+ [{cd, unicode:characters_to_binary(TestDir)},
+ {line, 256}]),
+ receive
+ {_, {data, {eol, String2}}} ->
+ case filename_equal(String2, TestDir) of
+ true ->
+ ok;
+ false ->
+ test_server:fail({cd, String2})
+ end;
+ Other3 ->
+ test_server:fail({env, Other3})
+ end,
test_server:timetrap_cancel(Dog),
ok.
@@ -1353,19 +1369,28 @@ spawn_executable(Config) when is_list(Config) ->
EchoArgs1 = filename:join([DataDir,"echo_args"]),
ExactFile1 = filename:nativename(os:find_executable(EchoArgs1)),
[ExactFile1] = run_echo_args(DataDir,[]),
+ [ExactFile1] = run_echo_args(DataDir,[binary]),
["echo_args"] = run_echo_args(DataDir,["echo_args"]),
+ ["echo_args"] = run_echo_args(DataDir,[binary, "echo_args"]),
["echo_arguments"] = run_echo_args(DataDir,["echo_arguments"]),
+ ["echo_arguments"] = run_echo_args(DataDir,[binary, "echo_arguments"]),
[ExactFile1,"hello world","dlrow olleh"] =
run_echo_args(DataDir,[ExactFile1,"hello world","dlrow olleh"]),
[ExactFile1] = run_echo_args(DataDir,[default]),
+ [ExactFile1] = run_echo_args(DataDir,[binary, default]),
[ExactFile1,"hello world","dlrow olleh"] =
run_echo_args(DataDir,[switch_order,ExactFile1,"hello world",
"dlrow olleh"]),
[ExactFile1,"hello world","dlrow olleh"] =
+ run_echo_args(DataDir,[binary,switch_order,ExactFile1,"hello world",
+ "dlrow olleh"]),
+ [ExactFile1,"hello world","dlrow olleh"] =
run_echo_args(DataDir,[default,"hello world","dlrow olleh"]),
[ExactFile1,"hello world","dlrow olleh"] =
run_echo_args_2("\""++ExactFile1++"\" "++"\"hello world\" \"dlrow olleh\""),
+ [ExactFile1,"hello world","dlrow olleh"] =
+ run_echo_args_2(unicode:characters_to_binary("\""++ExactFile1++"\" "++"\"hello world\" \"dlrow olleh\"")),
PrivDir = ?config(priv_dir, Config),
SpaceDir =filename:join([PrivDir,"With Spaces"]),
@@ -1380,6 +1405,8 @@ spawn_executable(Config) when is_list(Config) ->
["echo_arguments"] = run_echo_args(SpaceDir,["echo_arguments"]),
[ExactFile2,"hello world","dlrow olleh"] =
run_echo_args(SpaceDir,[ExactFile2,"hello world","dlrow olleh"]),
+ [ExactFile2,"hello world","dlrow olleh"] =
+ run_echo_args(SpaceDir,[binary, ExactFile2,"hello world","dlrow olleh"]),
[ExactFile2] = run_echo_args(SpaceDir,[default]),
[ExactFile2,"hello world","dlrow olleh"] =
run_echo_args(SpaceDir,[switch_order,ExactFile2,"hello world",
@@ -1388,6 +1415,8 @@ spawn_executable(Config) when is_list(Config) ->
run_echo_args(SpaceDir,[default,"hello world","dlrow olleh"]),
[ExactFile2,"hello world","dlrow olleh"] =
run_echo_args_2("\""++ExactFile2++"\" "++"\"hello world\" \"dlrow olleh\""),
+ [ExactFile2,"hello world","dlrow olleh"] =
+ run_echo_args_2(unicode:characters_to_binary("\""++ExactFile2++"\" "++"\"hello world\" \"dlrow olleh\"")),
ExeExt =
case string:to_lower(lists:last(string:tokens(ExactFile2,"."))) of
@@ -1415,9 +1444,12 @@ spawn_executable(Config) when is_list(Config) ->
[default,"hello world","dlrow olleh"]),
[ExactFile3,"hello world","dlrow olleh"] =
run_echo_args_2("\""++ExactFile3++"\" "++"\"hello world\" \"dlrow olleh\""),
+ [ExactFile3,"hello world","dlrow olleh"] =
+ run_echo_args_2(unicode:characters_to_binary("\""++ExactFile3++"\" "++"\"hello world\" \"dlrow olleh\"")),
{'EXIT',{enoent,_}} = (catch run_echo_args(SpaceDir,"fnurflmonfi",
[default,"hello world",
"dlrow olleh"])),
+
NonExec = "kronxfrt"++ExeExt,
file:write_file(filename:join([SpaceDir,NonExec]),
<<"Not an executable">>),
@@ -1518,25 +1550,40 @@ run_echo_args_2(FullnameAndArgs) ->
run_echo_args(Where,Args) ->
- run_echo_args(Where,"echo_args",Args).
+ run_echo_args(Where,"echo_args",Args).
run_echo_args(Where,Prog,Args) ->
- ArgvArg = case Args of
- [] ->
- [];
- [default|T] ->
- [{args,T}];
- [switch_order,H|T] ->
- [{args,T},{arg0,H}];
- [H|T] ->
- [{arg0,H},{args,T}]
+ {Binary, ArgvArg} = pack_argv(Args),
+ Command0 = filename:join([Where,Prog]),
+ Command = case Binary of
+ true -> unicode:characters_to_binary(Command0);
+ false -> Command0
end,
- Command = filename:join([Where,Prog]),
Port = open_port({spawn_executable,Command},ArgvArg++[eof]),
Data = collect_data(Port),
Port ! {self(), close},
receive {Port, closed} -> ok end,
parse_echo_args_output(Data).
-
+
+pack_argv([binary|Args]) ->
+ {true, pack_argv(Args, true)};
+pack_argv(Args) ->
+ {false, pack_argv(Args, false)}.
+
+pack_argv(Args, Binary) ->
+ case Args of
+ [] ->
+ [];
+ [default|T] ->
+ [{args,[make_bin(Arg,Binary) || Arg <- T]}];
+ [switch_order,H|T] ->
+ [{args,[make_bin(Arg,Binary) || Arg <- T]},{arg0,make_bin(H,Binary)}];
+ [H|T] ->
+ [{arg0,make_bin(H,Binary)},{args,[make_bin(Arg,Binary) || Arg <- T]}]
+ end.
+
+make_bin(Str, false) -> Str;
+make_bin(Str, true) -> unicode:characters_to_binary(Str).
+
collect_data(Port) ->
receive
{Port, {data, Data}} ->
@@ -1653,12 +1700,13 @@ otp_5119(Config) when is_list(Config) ->
Path = ?config(data_dir, Config),
ok = load_driver(Path, "exit_drv"),
PI1 = port_ix(otp_5119_fill_empty_port_tab([])),
- PI2 = port_ix(erlang:open_port({spawn, "exit_drv"}, [])),
+ Port2 = erlang:open_port({spawn, "exit_drv"}, []),
+ PI2 = port_ix(Port2),
{PortIx1, PortIx2} = case PI2 > PI1 of
true ->
{PI1, PI2};
false ->
- {port_ix(otp_5119_fill_empty_port_tab([PI2])),
+ {port_ix(otp_5119_fill_empty_port_tab([Port2])),
port_ix(erlang:open_port({spawn, "exit_drv"}, []))}
end,
MaxPorts = max_ports(),
@@ -2273,7 +2321,7 @@ close_deaf_port(Config) when is_list(Config) ->
test_server:timetrap_cancel(Dog),
Res.
-close_deaf_port_1(1000, _) ->
+close_deaf_port_1(200, _) ->
ok;
close_deaf_port_1(N, Cmd) ->
Timeout = integer_to_list(random:uniform(5*1000)),
@@ -2287,6 +2335,61 @@ close_deaf_port_1(N, Cmd) ->
{comment, "Could not spawn more than " ++ integer_to_list(N) ++ " OS processes."}
end.
+%% Test undocumented port_set_data/2 and port_get_data/1
+%% Hammer from multiple processes a while
+%% and then abrubtly close the port (OTP-12208).
+port_setget_data(Config) when is_list(Config) ->
+ ok = load_driver(?config(data_dir, Config), "echo_drv"),
+ Port = erlang:open_port({spawn_driver, "echo_drv"}, []),
+
+ NSched = erlang:system_info(schedulers_online),
+ HeapData = {1,2,3,<<"A heap binary">>,fun()->"This is fun"end,
+ list_to_binary(lists:seq(1,100))},
+ PRs = lists:map(fun(I) ->
+ spawn_opt(fun() -> port_setget_data_hammer(Port,HeapData,false,1) end,
+ [monitor, {scheduler, I rem NSched}])
+ end,
+ lists:seq(1,10)),
+ receive after 100 -> ok end,
+ Papa = self(),
+ lists:foreach(fun({Pid,_}) -> Pid ! {Papa,prepare_for_close} end, PRs),
+ lists:foreach(fun({Pid,_}) ->
+ receive {Pid,prepare_for_close} -> ok end
+ end,
+ PRs),
+ port_close(Port),
+ lists:foreach(fun({Pid,Ref}) ->
+ receive {'DOWN', Ref, process, Pid, normal} -> ok end
+ end,
+ PRs),
+ ok.
+
+port_setget_data_hammer(Port, HeapData, IsSet0, N) ->
+ Rand = random:uniform(3),
+ IsSet1 = try case Rand of
+ 1 -> true = erlang:port_set_data(Port, atom), true;
+ 2 -> true = erlang:port_set_data(Port, HeapData), true;
+ 3 -> case erlang:port_get_data(Port) of
+ atom -> true;
+ HeapData -> true;
+ undefined -> false=IsSet0
+ end
+ end
+ catch
+ error:badarg ->
+ true = get(prepare_for_close),
+ io:format("~p did ~p rounds before port closed\n", [self(), N]),
+ exit(normal)
+ end,
+ receive {Papa, prepare_for_close} ->
+ put(prepare_for_close, true),
+ Papa ! {self(),prepare_for_close}
+ after 0 ->
+ ok
+ end,
+ port_setget_data_hammer(Port, HeapData, IsSet1, N+1).
+
+
wait_until(Fun) ->
case catch Fun() of
true ->
diff --git a/erts/emulator/test/port_bif_SUITE.erl b/erts/emulator/test/port_bif_SUITE.erl
index f439867e9c..0c5b09d45a 100644
--- a/erts/emulator/test/port_bif_SUITE.erl
+++ b/erts/emulator/test/port_bif_SUITE.erl
@@ -24,7 +24,7 @@
init_per_group/2,end_per_group/2, command/1,
command_e_1/1, command_e_2/1, command_e_3/1, command_e_4/1,
port_info1/1, port_info2/1,
- port_info_os_pid/1,
+ port_info_os_pid/1, port_info_race/1,
connect/1, control/1, echo_to_busy/1]).
-export([do_command_e_1/1, do_command_e_2/1, do_command_e_4/1]).
@@ -42,7 +42,8 @@ all() ->
groups() ->
[{command_e, [],
[command_e_1, command_e_2, command_e_3, command_e_4]},
- {port_info, [], [port_info1, port_info2, port_info_os_pid]}].
+ {port_info, [],
+ [port_info1, port_info2, port_info_os_pid, port_info_race]}].
init_per_suite(Config) ->
Config.
@@ -254,6 +255,28 @@ do_port_info_os_pid() ->
true = erlang:port_close(P),
ok.
+port_info_race(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Program = filename:join(DataDir, "port_test"),
+ Top = self(),
+ P1 = open_port({spawn,Program}, [{packet,1}]),
+ P2 = open_port({spawn,Program}, [{packet,1}]),
+ Info1 = erlang:port_info(P1),
+ Info2 = erlang:port_info(P2),
+ F = fun Loop(Port, _, 0) ->
+ Top ! {ok,Port};
+ Loop(Port, Info, N) ->
+ Info = erlang:port_info(Port),
+ Loop(Port, Info, N - 1)
+ end,
+ spawn_link(fun () -> F(P1, Info1, 1000) end),
+ spawn_link(fun () -> F(P2, Info2, 1000) end),
+ receive {ok,P1} -> ok end,
+ receive {ok,P2} -> ok end,
+ true = erlang:port_close(P1),
+ true = erlang:port_close(P2),
+ ok.
+
output_test(_, _, Input, Output) when Output > 16#1fffffff ->
io:format("~p bytes received\n", [Input]);
output_test(P, Bin, Input0, Output0) ->
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index e3aae17df4..bf31655066 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -51,7 +51,13 @@
processes_term_proc_list/1,
otp_7738_waiting/1, otp_7738_suspended/1,
otp_7738_resume/1,
- garb_other_running/1]).
+ garb_other_running/1,
+ no_priority_inversion/1,
+ no_priority_inversion2/1,
+ system_task_blast/1,
+ system_task_on_suspended/1,
+ gc_request_when_gc_disabled/1,
+ gc_request_blast_when_gc_disabled/1]).
-export([prio_server/2, prio_client/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -73,7 +79,8 @@ all() ->
bad_register, garbage_collect, process_info_messages,
process_flag_badarg, process_flag_heap_size,
spawn_opt_heap_size, otp_6237, {group, processes_bif},
- {group, otp_7738}, garb_other_running].
+ {group, otp_7738}, garb_other_running,
+ {group, system_task}].
groups() ->
[{t_exit_2, [],
@@ -87,7 +94,11 @@ groups() ->
processes_gc_trap, processes_term_proc_list]},
{otp_7738, [],
[otp_7738_waiting, otp_7738_suspended,
- otp_7738_resume]}].
+ otp_7738_resume]},
+ {system_task, [],
+ [no_priority_inversion, no_priority_inversion2,
+ system_task_blast, system_task_on_suspended,
+ gc_request_when_gc_disabled, gc_request_blast_when_gc_disabled]}].
init_per_suite(Config) ->
A0 = case application:start(sasl) of
@@ -2214,6 +2225,208 @@ garb_other_running(Config) when is_list(Config) ->
receive {'DOWN', Mon, process, Pid, normal} -> ok end,
ok.
+no_priority_inversion(Config) when is_list(Config) ->
+ Prio = process_flag(priority, max),
+ HTLs = lists:map(fun (_) ->
+ spawn_opt(fun () ->
+ tok_loop()
+ end,
+ [{priority, high}, monitor, link])
+ end,
+ lists:seq(1, 2*erlang:system_info(schedulers))),
+ receive after 500 -> ok end,
+ LTL = spawn_opt(fun () ->
+ tok_loop()
+ end,
+ [{priority, low}, monitor, link]),
+ false = erlang:check_process_code(element(1, LTL), nonexisting_module),
+ true = erlang:garbage_collect(element(1, LTL)),
+ lists:foreach(fun ({P, _}) ->
+ unlink(P),
+ exit(P, kill)
+ end, [LTL | HTLs]),
+ lists:foreach(fun ({P, M}) ->
+ receive
+ {'DOWN', M, process, P, killed} ->
+ ok
+ end
+ end, [LTL | HTLs]),
+ process_flag(priority, Prio),
+ ok.
+
+no_priority_inversion2(Config) when is_list(Config) ->
+ Prio = process_flag(priority, max),
+ MTLs = lists:map(fun (_) ->
+ spawn_opt(fun () ->
+ tok_loop()
+ end,
+ [{priority, max}, monitor, link])
+ end,
+ lists:seq(1, 2*erlang:system_info(schedulers))),
+ receive after 500 -> ok end,
+ {PL, ML} = spawn_opt(fun () ->
+ tok_loop()
+ end,
+ [{priority, low}, monitor, link]),
+ RL = request_gc(PL, low),
+ RN = request_gc(PL, normal),
+ RH = request_gc(PL, high),
+ receive
+ {garbage_collect, _, _} ->
+ ?t:fail(unexpected_gc)
+ after 1000 ->
+ ok
+ end,
+ RM = request_gc(PL, max),
+ receive
+ {garbage_collect, RM, true} ->
+ ok
+ end,
+ lists:foreach(fun ({P, _}) ->
+ unlink(P),
+ exit(P, kill)
+ end, MTLs),
+ lists:foreach(fun ({P, M}) ->
+ receive
+ {'DOWN', M, process, P, killed} ->
+ ok
+ end
+ end, MTLs),
+ receive
+ {garbage_collect, RH, true} ->
+ ok
+ end,
+ receive
+ {garbage_collect, RN, true} ->
+ ok
+ end,
+ receive
+ {garbage_collect, RL, true} ->
+ ok
+ end,
+ unlink(PL),
+ exit(PL, kill),
+ receive
+ {'DOWN', ML, process, PL, killed} ->
+ ok
+ end,
+ process_flag(priority, Prio),
+ ok.
+
+request_gc(Pid, Prio) ->
+ Ref = make_ref(),
+ erts_internal:request_system_task(Pid, Prio, {garbage_collect, Ref}),
+ Ref.
+
+system_task_blast(Config) when is_list(Config) ->
+ Me = self(),
+ GCReq = fun () ->
+ RL = gc_req(Me, 100),
+ lists:foreach(fun (R) ->
+ receive
+ {garbage_collect, R, true} ->
+ ok
+ end
+ end, RL),
+ exit(it_worked)
+ end,
+ HTLs = lists:map(fun (_) -> spawn_monitor(GCReq) end, lists:seq(1, 1000)),
+ lists:foreach(fun ({P, M}) ->
+ receive
+ {'DOWN', M, process, P, it_worked} ->
+ ok
+ end
+ end, HTLs),
+ ok.
+
+gc_req(_Pid, 0) ->
+ [];
+gc_req(Pid, N) ->
+ R0 = request_gc(Pid, low),
+ R1 = request_gc(Pid, normal),
+ R2 = request_gc(Pid, high),
+ R3 = request_gc(Pid, max),
+ [R0, R1, R2, R3 | gc_req(Pid, N-1)].
+
+system_task_on_suspended(Config) when is_list(Config) ->
+ {P, M} = spawn_monitor(fun () ->
+ tok_loop()
+ end),
+ true = erlang:suspend_process(P),
+ {status, suspended} = process_info(P, status),
+ true = erlang:garbage_collect(P),
+ {status, suspended} = process_info(P, status),
+ true = erlang:resume_process(P),
+ false = ({status, suspended} == process_info(P, status)),
+ exit(P, kill),
+ receive
+ {'DOWN', M, process, P, killed} ->
+ ok
+ end.
+
+gc_request_when_gc_disabled(Config) when is_list(Config) ->
+ Master = self(),
+ AIS = erts_debug:set_internal_state(available_internal_state, true),
+ {P, M} = spawn_opt(fun () ->
+ true = erts_debug:set_internal_state(gc_state,
+ false),
+ Master ! {self(), gc_state, false},
+ receive after 1000 -> ok end,
+ Master ! {self(), gc_state, true},
+ false = erts_debug:set_internal_state(gc_state,
+ true),
+ receive after 100 -> ok end
+ end, [monitor, link]),
+ receive {P, gc_state, false} -> ok end,
+ ReqId = make_ref(),
+ async = garbage_collect(P, [{async, ReqId}]),
+ receive
+ {garbage_collect, ReqId, Result} ->
+ ?t:fail({unexpected_gc, Result});
+ {P, gc_state, true} ->
+ ok
+ end,
+ receive {garbage_collect, ReqId, true} -> ok end,
+ erts_debug:set_internal_state(available_internal_state, AIS),
+ receive {'DOWN', M, process, P, _Reason} -> ok end,
+ ok.
+
+gc_request_blast_when_gc_disabled(Config) when is_list(Config) ->
+ Master = self(),
+ AIS = erts_debug:set_internal_state(available_internal_state, true),
+ {P, M} = spawn_opt(fun () ->
+ true = erts_debug:set_internal_state(gc_state,
+ false),
+ Master ! {self(), gc_state, false},
+ receive after 1000 -> ok end,
+ false = erts_debug:set_internal_state(gc_state,
+ true),
+ receive after 100 -> ok end
+ end, [monitor, link]),
+ receive {P, gc_state, false} -> ok end,
+ PMs = lists:map(fun (N) ->
+ Prio = case N rem 4 of
+ 0 -> max;
+ 1 -> high;
+ 2 -> normal;
+ 3 -> low
+ end,
+ spawn_opt(fun () ->
+ erlang:garbage_collect(P)
+ end, [monitor, link, {priority, Prio}])
+ end, lists:seq(1, 10000)),
+ lists:foreach(fun ({Proc, Mon}) ->
+ receive
+ {'DOWN', Mon, process, Proc, normal} ->
+ ok
+ end
+ end,
+ PMs),
+ erts_debug:set_internal_state(available_internal_state, AIS),
+ receive {'DOWN', M, process, P, _Reason} -> ok end,
+ ok.
+
+
%% Internal functions
wait_until(Fun) ->
diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl
index 81539faa09..3906471f87 100644
--- a/erts/emulator/test/scheduler_SUITE.erl
+++ b/erts/emulator/test/scheduler_SUITE.erl
@@ -54,6 +54,7 @@
sbt_cmd/1,
scheduler_threads/1,
scheduler_suspend/1,
+ dirty_scheduler_threads/1,
reader_groups/1]).
-define(DEFAULT_TIMEOUT, ?t:minutes(15)).
@@ -68,6 +69,7 @@ all() ->
equal_and_high_with_part_time_max, equal_with_high,
equal_with_high_max, bound_process,
{group, scheduler_bind}, scheduler_threads, scheduler_suspend,
+ dirty_scheduler_threads,
reader_groups].
groups() ->
@@ -1092,6 +1094,55 @@ scheduler_threads(Config) when is_list(Config) ->
end,
ok.
+dirty_scheduler_threads(Config) when is_list(Config) ->
+ SmpSupport = erlang:system_info(smp_support),
+ try
+ erlang:system_info(dirty_cpu_schedulers),
+ dirty_scheduler_threads_test(Config, SmpSupport)
+ catch
+ error:badarg ->
+ {skipped, "No dirty scheduler support"}
+ end.
+
+dirty_scheduler_threads_test(Config, SmpSupport) ->
+ {Sched, SchedOnln, _} = get_dsstate(Config, ""),
+ {HalfSched, HalfSchedOnln} = case SmpSupport of
+ false -> {1,1};
+ true ->
+ {Sched div 2,
+ SchedOnln div 2}
+ end,
+ Cmd1 = "+SDcpu "++integer_to_list(HalfSched)++":"++
+ integer_to_list(HalfSchedOnln),
+ {HalfSched, HalfSchedOnln, _} = get_dsstate(Config, Cmd1),
+ {HalfSched, HalfSchedOnln, _} = get_dsstate(Config, "+SDPcpu 50:50"),
+ IOSched = 20,
+ {_, _, IOSched} = get_dsstate(Config, "+SDio "++integer_to_list(IOSched)),
+ {ok, Node} = start_node(Config, ""),
+ [ok] = mcall(Node, [fun() -> dirty_schedulers_online_test() end]),
+ ok.
+
+dirty_schedulers_online_test() ->
+ dirty_schedulers_online_test(erlang:system_info(smp_support)).
+dirty_schedulers_online_test(false) -> ok;
+dirty_schedulers_online_test(true) ->
+ dirty_schedulers_online_smp_test(erlang:system_info(schedulers_online)).
+dirty_schedulers_online_smp_test(SchedOnln) when SchedOnln < 4 -> ok;
+dirty_schedulers_online_smp_test(SchedOnln) ->
+ DirtyCPUSchedOnln = erlang:system_info(dirty_cpu_schedulers_online),
+ SchedOnln = DirtyCPUSchedOnln,
+ HalfSchedOnln = SchedOnln div 2,
+ SchedOnln = erlang:system_flag(schedulers_online, HalfSchedOnln),
+ HalfDirtyCPUSchedOnln = DirtyCPUSchedOnln div 2,
+ HalfDirtyCPUSchedOnln = erlang:system_flag(schedulers_online, SchedOnln),
+ DirtyCPUSchedOnln = erlang:system_flag(dirty_cpu_schedulers_online,
+ HalfDirtyCPUSchedOnln),
+ HalfDirtyCPUSchedOnln = erlang:system_info(dirty_cpu_schedulers_online),
+ QrtrDirtyCPUSchedOnln = HalfDirtyCPUSchedOnln div 2,
+ SchedOnln = erlang:system_flag(schedulers_online, HalfSchedOnln),
+ QrtrDirtyCPUSchedOnln = erlang:system_info(dirty_cpu_schedulers_online),
+ ok.
+
get_sstate(Config, Cmd) ->
{ok, Node} = start_node(Config, Cmd),
[SState] = mcall(Node, [fun () ->
@@ -1100,6 +1151,20 @@ get_sstate(Config, Cmd) ->
stop_node(Node),
SState.
+get_dsstate(Config, Cmd) ->
+ {ok, Node} = start_node(Config, Cmd),
+ [DSCPU] = mcall(Node, [fun () ->
+ erlang:system_info(dirty_cpu_schedulers)
+ end]),
+ [DSCPUOnln] = mcall(Node, [fun () ->
+ erlang:system_info(dirty_cpu_schedulers_online)
+ end]),
+ [DSIO] = mcall(Node, [fun () ->
+ erlang:system_info(dirty_io_schedulers)
+ end]),
+ stop_node(Node),
+ {DSCPU, DSCPUOnln, DSIO}.
+
scheduler_suspend(Config) when is_list(Config) ->
?line Dog = ?t:timetrap(?t:minutes(5)),
?line lists:foreach(fun (S) -> scheduler_suspend_test(Config, S) end,
@@ -1171,16 +1236,40 @@ sst2_loop(N) ->
erlang:system_flag(multi_scheduling, unblock),
sst2_loop(N-1).
-sst3_loop(_S, 0) ->
- ok;
sst3_loop(S, N) ->
+ try erlang:system_info(dirty_cpu_schedulers) of
+ DS ->
+ sst3_loop_with_dirty_schedulers(S, DS, N)
+ catch
+ error:badarg ->
+ sst3_loop_normal_schedulers_only(S, N)
+ end.
+
+sst3_loop_normal_schedulers_only(_S, 0) ->
+ ok;
+sst3_loop_normal_schedulers_only(S, N) ->
+ erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(schedulers_online, 1),
+ erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(schedulers_online, S),
+ erlang:system_flag(schedulers_online, 1),
+ erlang:system_flag(schedulers_online, S),
+ sst3_loop_normal_schedulers_only(S, N-1).
+
+sst3_loop_with_dirty_schedulers(_S, _DS, 0) ->
+ ok;
+sst3_loop_with_dirty_schedulers(S, DS, N) ->
erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(dirty_cpu_schedulers_online, (DS div 2)+1),
erlang:system_flag(schedulers_online, 1),
erlang:system_flag(schedulers_online, (S div 2)+1),
+ erlang:system_flag(dirty_cpu_schedulers_online, 1),
erlang:system_flag(schedulers_online, S),
+ erlang:system_flag(dirty_cpu_schedulers_online, DS),
erlang:system_flag(schedulers_online, 1),
erlang:system_flag(schedulers_online, S),
- sst3_loop(S, N-1).
+ erlang:system_flag(dirty_cpu_schedulers_online, DS),
+ sst3_loop_with_dirty_schedulers(S, DS, N-1).
reader_groups(Config) when is_list(Config) ->
%% White box testing. These results are correct, but other results
@@ -1495,7 +1584,7 @@ mcall(Node, Funs) ->
end, Refs).
erl_rel_flag_var() ->
- "ERL_"++erlang:system_info(otp_release)++"_FLAGS".
+ "ERL_OTP"++erlang:system_info(otp_release)++"_FLAGS".
clear_erl_rel_flags() ->
EnvVar = erl_rel_flag_var(),
diff --git a/erts/emulator/test/send_term_SUITE.erl b/erts/emulator/test/send_term_SUITE.erl
index b631f55a03..8e1f8df43a 100644
--- a/erts/emulator/test/send_term_SUITE.erl
+++ b/erts/emulator/test/send_term_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -62,7 +62,19 @@ basic(Config) when is_list(Config) ->
?line [] = term(P, 0),
?line Self = self(),
- ?line {blurf,42,[],[-42,{}|"abc"++P],"kalle",3.1416,Self} = term(P, 1),
+ {blurf,42,[],[-42,{}|"abc"++P],"kalle",3.1416,Self,#{}} = term(P, 1),
+
+ Map41 = maps:from_list([{blurf, 42},
+ {[], [-42,{}|"abc"++P]},
+ {"kalle", 3.1416},
+ {Self, #{}}]),
+ Map41 = term(P, 41),
+
+ Map42 = maps:from_list([{42, []},
+ {[-42,{}|"abc"++P], "kalle"},
+ {3.1416, Self},
+ {#{}, blurf}]),
+ Map42 = term(P, 42),
?line Deep = lists:seq(0, 199),
?line Deep = term(P, 2),
?line {B1,B2} = term(P, 3),
@@ -125,7 +137,8 @@ basic(Config) when is_list(Config) ->
{-1, 36}, % ERL_DRV_INT64
{-4711, 37}, % ERL_DRV_INT64
{-20233590931456, 38}, % ERL_DRV_INT64
- {-9223372036854775808, 39}], % ERL_DRV_INT64
+ {-9223372036854775808, 39},
+ {#{}, 40}], % ERL_DRV_MAP
?line {Terms, Ops} = lists:unzip(Singles),
?line Terms = term(P,Ops),
diff --git a/erts/emulator/test/send_term_SUITE_data/send_term_drv.c b/erts/emulator/test/send_term_SUITE_data/send_term_drv.c
index f8613487b0..381a4f20d5 100644
--- a/erts/emulator/test/send_term_SUITE_data/send_term_drv.c
+++ b/erts/emulator/test/send_term_SUITE_data/send_term_drv.c
@@ -104,7 +104,7 @@ static void send_term_drv_run(ErlDrvData port, char *buf, ErlDrvSizeT count)
double f = 3.1416;
msg[0] = ERL_DRV_ATOM;
- msg[1] = driver_mk_atom("blurf"),
+ msg[1] = driver_mk_atom("blurf");
msg[2] = ERL_DRV_INT;
msg[3] = (ErlDrvTermData) 42;
msg[4] = ERL_DRV_NIL;
@@ -126,9 +126,11 @@ static void send_term_drv_run(ErlDrvData port, char *buf, ErlDrvSizeT count)
msg[20] = (ErlDrvTermData) &f;
msg[21] = ERL_DRV_PID;
msg[22] = driver_connected(erlang_port);
- msg[23] = ERL_DRV_TUPLE;
- msg[24] = (ErlDrvTermData) 7;
- msg += 25;
+ msg[23] = ERL_DRV_MAP;
+ msg[24] = (ErlDrvTermData) 0;
+ msg[25] = ERL_DRV_TUPLE;
+ msg[26] = (ErlDrvTermData) 8;
+ msg += 27;
}
break;
@@ -481,6 +483,52 @@ static void send_term_drv_run(ErlDrvData port, char *buf, ErlDrvSizeT count)
break;
}
+ case 40: {
+ msg[0] = ERL_DRV_MAP;
+ msg[1] = (ErlDrvTermData) 0;
+ msg += 2;
+ break;
+ }
+
+ case 41: /* Most term types inside a map */
+ case 42: {
+ double f = 3.1416;
+
+ if (buf[i] == 41) {
+ *msg++ = ERL_DRV_ATOM;
+ *msg++ = driver_mk_atom("blurf");
+ }
+ *msg++ = ERL_DRV_INT;
+ *msg++ = (ErlDrvTermData)42;
+ *msg++ = ERL_DRV_NIL;
+ *msg++ = ERL_DRV_INT;
+ *msg++ = (ErlDrvTermData)-42;
+ *msg++ = ERL_DRV_TUPLE;
+ *msg++ = (ErlDrvTermData)0;
+ *msg++ = ERL_DRV_PORT;
+ *msg++ = driver_mk_port(erlang_port);
+ *msg++ = ERL_DRV_STRING_CONS;
+ *msg++ = (ErlDrvTermData)"abc";
+ *msg++ = (ErlDrvTermData)3;
+ *msg++ = ERL_DRV_LIST;
+ *msg++ = (ErlDrvTermData)3;
+ *msg++ = ERL_DRV_STRING;
+ *msg++ = (ErlDrvTermData)"kalle";
+ *msg++ = (ErlDrvTermData)5;
+ *msg++ = ERL_DRV_FLOAT;
+ *msg++ = (ErlDrvTermData)&f;
+ *msg++ = ERL_DRV_PID;
+ *msg++ = driver_connected(erlang_port);
+ *msg++ = ERL_DRV_MAP;
+ *msg++ = (ErlDrvTermData)0;
+ if (buf[i] == 42) {
+ *msg++ = ERL_DRV_ATOM;
+ *msg++ = driver_mk_atom("blurf");
+ }
+ *msg++ = ERL_DRV_MAP;
+ *msg++ = (ErlDrvTermData)4;
+ break;
+ }
case 127: /* Error cases */
{
@@ -662,6 +710,22 @@ static void send_term_drv_run(ErlDrvData port, char *buf, ErlDrvSizeT count)
FAIL_TERM(msg, 2);
}
+ msg[0] = ERL_DRV_MAP;
+ msg[1] = (ErlDrvTermData) 0;
+ FAIL_TERM(msg, 1);
+
+ /* map with duplicate key */
+ msg[0] = ERL_DRV_ATOM;
+ msg[1] = driver_mk_atom("key");
+ msg[2] = ERL_DRV_NIL;
+ msg[3] = ERL_DRV_ATOM;
+ msg[4] = driver_mk_atom("key");
+ msg[5] = ERL_DRV_INT;
+ msg[6] = (ErlDrvTermData) -4711;
+ msg[7] = ERL_DRV_MAP;
+ msg[8] = 2;
+ FAIL_TERM(msg, 9);
+
/* Signal end of test case */
msg[0] = ERL_DRV_NIL;
erl_drv_output_term(driver_mk_port(erlang_port), msg, 1);
diff --git a/erts/emulator/test/system_info_SUITE.erl b/erts/emulator/test/system_info_SUITE.erl
index ceb4afb5cf..f959714be7 100644
--- a/erts/emulator/test/system_info_SUITE.erl
+++ b/erts/emulator/test/system_info_SUITE.erl
@@ -155,6 +155,7 @@ misc_smoke_tests(Config) when is_list(Config) ->
?line true = is_binary(erlang:system_info(loaded)),
?line true = is_binary(erlang:system_info(dist)),
?line ok = try erlang:system_info({cpu_topology,erts_get_cpu_topology_error_case}), fail catch error:badarg -> ok end,
+ true = lists:member(erlang:system_info(tolerant_timeofday), [enabled, disabled]),
?line ok.
diff --git a/erts/emulator/test/trace_SUITE.erl b/erts/emulator/test/trace_SUITE.erl
index 2251575e5a..4d7598cf1f 100644
--- a/erts/emulator/test/trace_SUITE.erl
+++ b/erts/emulator/test/trace_SUITE.erl
@@ -181,6 +181,13 @@ send_trace(Config) when is_list(Config) ->
?line {trace, Sender, send, to_receiver, Receiver} = receive_first(),
?line receive_nothing(),
+ %% Check that a message sent to another registered process is traced.
+ register(?MODULE,Receiver),
+ Sender ! {send_please, ?MODULE, to_receiver},
+ {trace, Sender, send, to_receiver, ?MODULE} = receive_first(),
+ receive_nothing(),
+ unregister(?MODULE),
+
%% Check that a message sent to this process is traced.
?line Sender ! {send_please, self(), to_myself},
?line receive to_myself -> ok end,
@@ -188,6 +195,21 @@ send_trace(Config) when is_list(Config) ->
?line {trace, Sender, send, to_myself, Self} = receive_first(),
?line receive_nothing(),
+ %% Check that a message sent to dead process is traced.
+ {Pid,Ref} = spawn_monitor(fun() -> ok end),
+ receive {'DOWN',Ref,_,_,_} -> ok end,
+ Sender ! {send_please, Pid, to_dead},
+ {trace, Sender, send_to_non_existing_process, to_dead, Pid} = receive_first(),
+ receive_nothing(),
+
+ %% Check that a message sent to unknown registrated process is traced.
+ BadargSender = fun_spawn(fun sender/0),
+ 1 = erlang:trace(BadargSender, true, [send]),
+ unlink(BadargSender),
+ BadargSender ! {send_please, not_registered, to_unknown},
+ {trace, BadargSender, send, to_unknown, not_registered} = receive_first(),
+ receive_nothing(),
+
%% Another process should not be able to trace Sender.
?line Intruder = fun_spawn(fun() -> erlang:trace(Sender, true, [send]) end),
?line {'EXIT', Intruder, {badarg, _}} = receive_first(),
diff --git a/erts/emulator/test/trace_call_time_SUITE.erl b/erts/emulator/test/trace_call_time_SUITE.erl
index 5dfa87bbee..3036d2957b 100644
--- a/erts/emulator/test/trace_call_time_SUITE.erl
+++ b/erts/emulator/test/trace_call_time_SUITE.erl
@@ -33,7 +33,7 @@
%% Exported end user tests
-export([seq/3, seq_r/3]).
--export([loaded/1, a_function/1, a_called_function/1, dec/1, nif_dec/1]).
+-export([loaded/1, a_function/1, a_called_function/1, dec/1, nif_dec/1, dead_tracer/1]).
-define(US_ERROR, 10000).
-define(R_ERROR, 0.8).
@@ -89,7 +89,7 @@ all() ->
true -> [not_run];
false ->
[basic, on_and_off, info, pause_and_restart, scheduling,
- combo, bif, nif, called_function]
+ combo, bif, nif, called_function, dead_tracer]
end.
groups() ->
@@ -470,6 +470,92 @@ called_function(Config) when is_list(Config) ->
?line P = erlang:trace_pattern({'_','_','_'}, false, [call_time]),
ok.
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+dead_tracer(Config) when is_list(Config) ->
+ Self = self(),
+ FirstTracer = tracer(),
+ StartTracing = fun() -> turn_on_tracing(Self) end,
+ tell_tracer(FirstTracer, StartTracing),
+ [1,2,3,4,5,6,7,8] = seq(1, 8, fun(I) -> I + 1 end),
+ Ref = erlang:monitor(process, FirstTracer),
+ FirstTracer ! quit,
+ receive
+ {'DOWN',Ref,process,FirstTracer,normal} ->
+ ok
+ end,
+ erlang:yield(),
+
+ %% Collect and check that we only get call_time info for the current process.
+ Info1 = collect_all_info(),
+ [] = other_than_self(Info1),
+ io:format("~p\n", [Info1]),
+
+ %% Note that we have not turned off tracing for the current process,
+ %% but that the tracer has terminated. No more call_time information should be recorded.
+ [1,2,3] = seq(1, 3, fun(I) -> I + 1 end),
+ [] = collect_all_info(),
+
+ %% When we start a second tracer process, that tracer process must
+ %% not inherit the tracing flags and the dead tracer (even though
+ %% we used set_on_spawn).
+ SecondTracer = tracer(),
+ tell_tracer(SecondTracer, StartTracing),
+ Seq20 = lists:seq(1, 20),
+ Seq20 = seq(1, 20, fun(I) -> I + 1 end),
+ Info2 = collect_all_info(),
+ io:format("~p\n", [Info2]),
+ [] = other_than_self(Info2),
+ SecondTracer ! quit,
+
+ ok.
+
+other_than_self(Info) ->
+ [{Pid,MFA} || {MFA,[{Pid,_,_,_}]} <- Info,
+ Pid =/= self()].
+
+tell_tracer(Tracer, Fun) ->
+ Tracer ! {execute,self(),Fun},
+ receive
+ {Tracer,executed} ->
+ ok
+ end.
+
+tracer() ->
+ spawn_link(fun Loop() ->
+ receive
+ quit ->
+ ok;
+ {execute,From,Fun} ->
+ Fun(),
+ From ! {self(),executed},
+ Loop()
+ end
+ end).
+
+turn_on_tracing(Pid) ->
+ _ = erlang:trace(Pid, true, [call,set_on_spawn]),
+ _ = erlang:trace_pattern({?MODULE,'_','_'}, true, [call_time]),
+ _ = now(),
+ ok.
+
+collect_all_info() ->
+ collect_all_info([{?MODULE,F,A} || {F,A} <- module_info(functions)] ++
+ erlang:system_info(snifs)).
+
+collect_all_info([MFA|T]) ->
+ CallTime = erlang:trace_info(MFA, call_time),
+ erlang:trace_pattern(MFA, restart, [call_time]),
+ case CallTime of
+ {call_time,false} ->
+ collect_all_info(T);
+ {call_time,[]} ->
+ collect_all_info(T);
+ {call_time,[_|_]=List} ->
+ [{MFA,List}|collect_all_info(T)]
+ end;
+collect_all_info([]) -> [].
+
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The Tests
%%%
@@ -478,7 +564,6 @@ called_function(Config) when is_list(Config) ->
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Local helpers
-
load_nif(Config) ->
?line Path = ?config(data_dir, Config),
?line ok = erlang:load_nif(filename:join(Path,"trace_nif"), 0).
@@ -602,8 +687,11 @@ collect(A, Ref) ->
end.
setup() ->
+ setup([]).
+
+setup(Opts) ->
Pid = spawn_link(fun() -> loop() end),
- ?line 1 = erlang:trace(Pid, true, [call]),
+ 1 = erlang:trace(Pid, true, [call|Opts]),
Pid.
execute(Pids, Mfa) when is_list(Pids) ->
diff --git a/erts/emulator/test/tuple_SUITE.erl b/erts/emulator/test/tuple_SUITE.erl
index 46ece41096..f627eea07f 100644
--- a/erts/emulator/test/tuple_SUITE.erl
+++ b/erts/emulator/test/tuple_SUITE.erl
@@ -21,8 +21,9 @@
init_per_group/2,end_per_group/2,
t_size/1, t_tuple_size/1, t_element/1, t_setelement/1,
t_insert_element/1, t_delete_element/1,
- t_list_to_tuple/1, t_tuple_to_list/1,
- t_make_tuple_2/1, t_make_tuple_3/1, t_append_element/1,
+ t_list_to_tuple/1, t_list_to_upper_boundry_tuple/1, t_tuple_to_list/1,
+ t_make_tuple_2/1, t_make_upper_boundry_tuple_2/1, t_make_tuple_3/1,
+ t_append_element/1, t_append_element_upper_boundry/1,
build_and_match/1, tuple_with_case/1, tuple_in_guard/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -40,8 +41,10 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[build_and_match, t_size, t_tuple_size, t_list_to_tuple,
+ t_list_to_upper_boundry_tuple,
t_tuple_to_list, t_element, t_setelement,
- t_make_tuple_2, t_make_tuple_3, t_append_element,
+ t_make_tuple_2, t_make_upper_boundry_tuple_2, t_make_tuple_3,
+ t_append_element, t_append_element_upper_boundry,
t_insert_element, t_delete_element,
tuple_with_case, tuple_in_guard].
@@ -49,11 +52,21 @@ groups() ->
[].
init_per_suite(Config) ->
+ A0 = case application:start(sasl) of
+ ok -> [sasl];
+ _ -> []
+ end,
+ A = case application:start(os_mon) of
+ ok -> [os_mon|A0];
+ _ -> A0
+ end,
+ [{started_apps, A}|Config].
+
+end_per_suite(Config) ->
+ As = ?config(started_apps, Config),
+ lists:foreach(fun (A) -> application:stop(A) end, As),
Config.
-end_per_suite(_Config) ->
- ok.
-
init_per_group(_GroupName, Config) ->
Config.
@@ -176,14 +189,19 @@ t_list_to_tuple(Config) when is_list(Config) ->
{'EXIT', {badarg, _}} = (catch list_to_tuple(id([a|b]))),
{'EXIT', {badarg, _}} = (catch list_to_tuple(id([a|b]))),
- % test upper boundry, 16777215 elements
- MaxSize = 1 bsl 24 - 1,
- MaxTuple = list_to_tuple(lists:seq(1, MaxSize)),
- MaxSize = size(MaxTuple),
-
{'EXIT', {badarg,_}} = (catch list_to_tuple(lists:seq(1, 1 bsl 24))),
ok.
+t_list_to_upper_boundry_tuple(Config) when is_list(Config) ->
+ sys_mem_cond_run(2048,
+ fun () ->
+ %% test upper boundry, 16777215 elements
+ MaxSize = 1 bsl 24 - 1,
+ MaxTuple = list_to_tuple(lists:seq(1, MaxSize)),
+ MaxSize = size(MaxTuple),
+ ok
+ end).
+
%% Tests tuple_to_list/1.
t_tuple_to_list(Config) when is_list(Config) ->
@@ -214,8 +232,6 @@ t_make_tuple_2(Config) when is_list(Config) ->
t_make_tuple1({a}),
t_make_tuple1(erlang:make_tuple(400, [])),
- % test upper boundry, 16777215 elements
- t_make_tuple(1 bsl 24 - 1, a),
{'EXIT', {badarg,_}} = (catch erlang:make_tuple(1 bsl 24, a)),
{'EXIT', {badarg,_}} = (catch erlang:make_tuple(-1, a)),
@@ -225,6 +241,13 @@ t_make_tuple_2(Config) when is_list(Config) ->
{'EXIT', {badarg,_}} = (catch erlang:make_tuple(1 bsl 65 + 3, a)),
ok.
+t_make_upper_boundry_tuple_2(Config) when is_list(Config) ->
+ sys_mem_cond_run(2048,
+ fun () ->
+ %% test upper boundry, 16777215 elements
+ t_make_tuple(1 bsl 24 - 1, a)
+ end).
+
t_make_tuple1(Element) ->
lists:foreach(fun(Size) -> t_make_tuple(Size, Element) end,
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 255, 256, 511, 512, 999,
@@ -309,13 +332,17 @@ t_delete_element(Config) when is_list(Config) ->
%% Tests the append_element/2 BIF.
t_append_element(Config) when is_list(Config) ->
- ok = t_append_element({}, 2048, 2048),
-
- % test upper boundry, 16777215 elements
- MaxSize = 1 bsl 24 - 1,
- MaxTuple = list_to_tuple(lists:seq(1, MaxSize)),
- {'EXIT',{badarg,_}} = (catch erlang:append_element(MaxTuple, a)),
- ok.
+ ok = t_append_element({}, 2048, 2048).
+
+t_append_element_upper_boundry(Config) when is_list(Config) ->
+ sys_mem_cond_run(2048,
+ fun () ->
+ %% test upper boundry, 16777215 elements
+ MaxSize = 1 bsl 24 - 1,
+ MaxTuple = list_to_tuple(lists:seq(1, MaxSize)),
+ {'EXIT',{badarg,_}} = (catch erlang:append_element(MaxTuple, a)),
+ ok
+ end).
t_append_element(_Tuple, 0, _High) -> ok;
t_append_element(Tuple, N, High) ->
@@ -371,3 +398,31 @@ tuple_in_guard(Config) when is_list(Config) ->
%% Use this function to avoid compile-time evaluation of an expression.
id(I) -> I.
+
+sys_mem_cond_run(ReqSizeMB, TestFun) when is_integer(ReqSizeMB) ->
+ case total_memory() of
+ TotMem when is_integer(TotMem), TotMem >= ReqSizeMB ->
+ TestFun();
+ TotMem when is_integer(TotMem) ->
+ {skipped, "Not enough memory ("++integer_to_list(TotMem)++" MB)"};
+ undefined ->
+ {skipped, "Could not retrieve memory information"}
+ end.
+
+
+total_memory() ->
+ %% Totat memory in MB.
+ try
+ MemoryData = memsup:get_system_memory_data(),
+ case lists:keysearch(total_memory, 1, MemoryData) of
+ {value, {total_memory, TM}} ->
+ TM div (1024*1024);
+ false ->
+ {value, {system_total_memory, STM}} =
+ lists:keysearch(system_total_memory, 1, MemoryData),
+ STM div (1024*1024)
+ end
+ catch
+ _ : _ ->
+ undefined
+ end.
diff --git a/erts/emulator/test/z_SUITE.erl b/erts/emulator/test/z_SUITE.erl
index 4b3075a164..b0c6224dfe 100644
--- a/erts/emulator/test/z_SUITE.erl
+++ b/erts/emulator/test/z_SUITE.erl
@@ -38,7 +38,7 @@
-export([schedulers_alive/1, node_container_refc_check/1,
long_timers/1, pollset_size/1,
- check_io_debug/1]).
+ check_io_debug/1, get_check_io_info/0]).
-define(DEFAULT_TIMEOUT, ?t:minutes(5)).
@@ -288,11 +288,14 @@ check_io_debug(Config) when is_list(Config) ->
end.
check_io_debug_test() ->
+ ?line erlang:display(get_check_io_info()),
?line erts_debug:set_internal_state(available_internal_state, true),
- ?line erlang:display(erlang:system_info(check_io)),
- ?line NoOfErrorFds = erts_debug:get_internal_state(check_io_debug),
+ ?line {NoErrorFds, NoUsedFds, NoDrvSelStructs, NoDrvEvStructs}
+ = erts_debug:get_internal_state(check_io_debug),
?line erts_debug:set_internal_state(available_internal_state, false),
- ?line 0 = NoOfErrorFds,
+ ?line 0 = NoErrorFds,
+ ?line NoUsedFds = NoDrvSelStructs,
+ ?line 0 = NoDrvEvStructs,
?line ok.
@@ -305,7 +308,7 @@ display_check_io(ChkIo) ->
catch erlang:display('--- CHECK IO INFO ---'),
catch erlang:display(ChkIo),
catch erts_debug:set_internal_state(available_internal_state, true),
- NoOfErrorFds = (catch erts_debug:get_internal_state(check_io_debug)),
+ NoOfErrorFds = (catch element(1, erts_debug:get_internal_state(check_io_debug))),
catch erlang:display({'NoOfErrorFds', NoOfErrorFds}),
catch erts_debug:set_internal_state(available_internal_state, false),
catch erlang:display('--- CHECK IO INFO ---'),
@@ -313,14 +316,19 @@ display_check_io(ChkIo) ->
get_check_io_info() ->
ChkIo = erlang:system_info(check_io),
- case lists:keysearch(pending_updates, 1, ChkIo) of
- {value, {pending_updates, 0}} ->
+ PendUpdNo = case lists:keysearch(pending_updates, 1, ChkIo) of
+ {value, {pending_updates, PendNo}} ->
+ PendNo;
+ false ->
+ 0
+ end,
+ {value, {active_fds, ActFds}} = lists:keysearch(active_fds, 1, ChkIo),
+ case {PendUpdNo, ActFds} of
+ {0, 0} ->
display_check_io(ChkIo),
ChkIo;
- false ->
- ChkIo;
_ ->
- receive after 10 -> ok end,
+ receive after 100 -> ok end,
get_check_io_info()
end.
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops
index 16a949c2a6..0b7c16f606 100755
--- a/erts/emulator/utils/beam_makeops
+++ b/erts/emulator/utils/beam_makeops
@@ -1202,6 +1202,7 @@ sub parse_transformation {
my($from, $to) = split(/\s*=>\s*/);
my(@op);
+ my $rest_var;
# The source instructions.
@@ -1212,7 +1213,7 @@ sub parse_transformation {
$_ = (&compile_transform_function($name, split(/\s*,\s*/, $arglist)));
} else {
(@op) = split;
- $_ = &compile_transform(1, @op);
+ ($rest_var,$_) = compile_transform(1, $rest_var, @op);
}
}
@@ -1230,7 +1231,7 @@ sub parse_transformation {
@to = split(/\s*\|\s*/, $to);
foreach (@to) {
(@op) = split;
- $_ = &compile_transform(0, @op);
+ (undef,$_) = compile_transform(0, $rest_var, @op);
}
}
push(@transformations, [$., $orig, [@from], [reverse @to]]);
@@ -1243,12 +1244,18 @@ sub compile_transform_function {
}
sub compile_transform {
- my($src, $name, @ops) = @_;
+ my($src, $rest_var, $name, @ops) = @_;
my $arity = 0;
-
+
foreach (@ops) {
my(@list) = &tr_parse_op($src, $_);
- $arity++ unless $list[1] eq '*';
+ if ($list[1] eq '*') {
+ $rest_var = $list[0];
+ } elsif (defined $rest_var and $list[0] eq $rest_var) {
+ $list[1] = '*';
+ } else {
+ $arity++;
+ }
$_ = [ @list ];
}
@@ -1260,7 +1267,7 @@ sub compile_transform {
$is_transformed{$name,$arity} = 1;
}
- [$name,$arity,@ops];
+ ($rest_var,[$name,$arity,@ops]);
}
sub tr_parse_op {
@@ -1681,7 +1688,9 @@ sub tr_gen_to {
foreach $op (@ops) {
my($var, $type, $type_val) = @$op;
- if ($var ne '') {
+ if ($type eq '*') {
+ push(@code, make_op($var, 'store_rest_args', $var{$var}));
+ } elsif ($var ne '') {
&error($where, "variable '$var' unbound")
unless defined $var{$var};
push(@code, &make_op($var, 'store_var_next_arg', $var{$var}));
diff --git a/erts/emulator/utils/gen_git_version b/erts/emulator/utils/gen_git_version
index ef06a4b8e2..9faf015b62 100755
--- a/erts/emulator/utils/gen_git_version
+++ b/erts/emulator/utils/gen_git_version
@@ -5,9 +5,9 @@ OUTPUT_FILE=$1
if command -v git 2>&1 >/dev/null &&
test -d $ERL_TOP/.git -o -f $ERL_TOP/.git
then
- VSN=`git describe --match "OTP_R[0-9][0-9][A-B]*" HEAD`
+ VSN=`git describe --match "OTP-[0-9]*" HEAD`
case "$VSN" in
- OTP_R*-g*)
+ OTP-*-g*)
VSN=`echo $VSN | sed -e 's/.*-g\\(.*\\)/\\1/g'` ;;
*) VSN="na" ;;
esac
@@ -36,4 +36,4 @@ then
fi
exit 0
fi
-exit 1 \ No newline at end of file
+exit 1
diff --git a/erts/emulator/utils/make_compiler_flags b/erts/emulator/utils/make_compiler_flags
index cebe8cd0c5..ca1bc47113 100755
--- a/erts/emulator/utils/make_compiler_flags
+++ b/erts/emulator/utils/make_compiler_flags
@@ -70,7 +70,7 @@ my($prog) = $prog[$#prog];
print "/* Warning: Do not edit this file.\n";
print " Auto-generated by '$prog'.*/\n";
-foreach(keys %constants) {
+foreach (sort(keys %constants)) {
print "const char* erts_build_flags_$_ = \"$constants{$_}\";\n"
}
diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab
index fbbfa3e49e..5c68143d58 100755
--- a/erts/emulator/utils/make_driver_tab
+++ b/erts/emulator/utils/make_driver_tab
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
+# Copyright Ericsson AB 1999-2013. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -27,7 +27,11 @@ use File::Basename;
# usage: make_driver_tab [-o filename] drivers...
my $file = "";
-my @drivers = ();
+my $nif = "";
+my @emu_drivers = ();
+my @static_drivers = ();
+my @nifs = ();
+my $mode = 1;
while (@ARGV) {
my $d = shift;
@@ -35,9 +39,28 @@ while (@ARGV) {
$file = shift or die("-o requires argument");
next;
}
+ if ( $d =~ /^-nifs$/ ) {
+ $mode = 2;
+ next;
+ }
+ if ( $d =~ /^-drivers$/ ) {
+ $mode = 1;
+ next;
+ }
+ if ( $d =~ /^.*\.a$/ ) {
+ $d = basename $d;
+ $d =~ s/\.a$//; # strip .a
+ if ($mode == 1) {
+ push(@static_drivers, $d);
+ }
+ if ($mode == 2) {
+ push(@nifs, $d);
+ }
+ next;
+ }
$d = basename $d;
$d =~ s/drv(\..*|)$//; # strip drv.* or just drv
- push(@drivers, $d);
+ push(@emu_drivers, $d);
}
# Did we want output to a file?
@@ -52,20 +75,84 @@ print <<EOF;
#include <stdio.h>
#include "global.h"
+
EOF
# "extern" declarations
-foreach (@drivers) {
+foreach (@emu_drivers) {
print "extern ErlDrvEntry ${_}driver_entry;\n";
}
+foreach (@static_drivers) {
+ print "ErlDrvEntry *${_}_driver_init(void);\n";
+}
+
# The array itself
-print "\nErlDrvEntry *driver_tab[DRIVER_TAB_SIZE] =\n{\n";
+print "\nErlDrvEntry *driver_tab[] =\n{\n";
-foreach (@drivers) {
+foreach (@emu_drivers) {
print " &${_}driver_entry,\n";
}
+foreach (@static_drivers) {
+ print " NULL, /* ${_} */\n";
+}
print " NULL\n};\n";
+print "void erts_init_static_drivers() {\n";
+
+my $index = 0;
+foreach (@static_drivers) {
+ print " driver_tab[".(scalar @emu_drivers+$index)."] = ${_}_driver_init();\n";
+ $index++;
+}
+
+print "}\n";
+
+print <<EOF;
+
+typedef struct ErtsStaticNifEntry_ {
+ const char *nif_name;
+ ErtsStaticNifInitFPtr nif_init;
+} ErtsStaticNifEntry;
+
+EOF
+
+# prototypes
+foreach (@nifs) {
+ my $d = ${_};
+ $d =~ s/\.debug//; # strip .debug
+ print "void *".$d."_nif_init(void);\n";
+}
+
+# The array itself
+print "static ErtsStaticNifEntry static_nif_tab[] =\n{\n";
+
+foreach (@nifs) {
+ my $d = ${_};
+ $d =~ s/\.debug//; # strip .debug
+ print "{\"${_}\",&".$d."_nif_init},\n";
+}
+
+print " {NULL,NULL}\n};\n";
+
+print <<EOF;
+ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name, int len) {
+ ErtsStaticNifEntry* p;
+ for (p = static_nif_tab; p->nif_name != NULL; p++)
+ if (strncmp(p->nif_name, name, len) == 0 && p->nif_name[len] == 0)
+ return p->nif_init;
+ return NULL;
+}
+
+int erts_is_static_nif(void *handle) {
+ ErtsStaticNifEntry* p;
+ for (p = static_nif_tab; p->nif_name != NULL; p++)
+ if (((void*)p->nif_init) == handle)
+ return 1;
+ return 0;
+}
+
+EOF
+
# That's it
diff --git a/erts/emulator/utils/make_version b/erts/emulator/utils/make_version
index 7757fa8138..0ba1c77930 100755
--- a/erts/emulator/utils/make_version
+++ b/erts/emulator/utils/make_version
@@ -39,7 +39,10 @@ if ($ARGV[0] eq '-o') {
}
my $release = shift;
-defined $release or die "No release specified";
+defined $release or die "No otp release specified";
+
+my $otp_version = shift;
+defined $otp_version or die "No otp version specified";
my $version = shift;
defined $version or die "No version name specified";
@@ -53,6 +56,7 @@ open(FILE, ">$outputfile") or die "Can't create $outputfile: $!";
print FILE <<EOF;
/* This file was created by 'make_version' -- don't modify. */
#define ERLANG_OTP_RELEASE "$release"
+#define ERLANG_OTP_VERSION "$otp_version"
#define ERLANG_VERSION "$version"
#define ERLANG_COMPILE_DATE "$time_str"
#define ERLANG_ARCHITECTURE "$architecture"
diff --git a/erts/emulator/zlib/adler32.c b/erts/emulator/zlib/adler32.c
index 4368c31d70..c693a42b7c 100644
--- a/erts/emulator/zlib/adler32.c
+++ b/erts/emulator/zlib/adler32.c
@@ -1,19 +1,20 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#define ZLIB_INTERNAL
-#include "zlib.h"
+#include "zutil.h"
+
+#define local static
+
+local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-#define BASE 65521UL /* largest prime smaller than 65536 */
+#define BASE 65521 /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
@@ -23,39 +24,44 @@
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
#define DO16(buf) DO8(buf,0); DO8(buf,8);
-/* use NO_DIVIDE if your processor does not do division in hardware */
+/* use NO_DIVIDE if your processor does not do division in hardware --
+ try it both ways to see which is faster */
#ifdef NO_DIVIDE
-# define MOD(a) \
+/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
+ (thank you to John Reiser for pointing this out) */
+# define CHOP(a) \
+ do { \
+ unsigned long tmp = a >> 16; \
+ a &= 0xffffUL; \
+ a += (tmp << 4) - tmp; \
+ } while (0)
+# define MOD28(a) \
do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
if (a >= BASE) a -= BASE; \
} while (0)
-# define MOD4(a) \
+# define MOD(a) \
do { \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
+ MOD28(a); \
+ } while (0)
+# define MOD63(a) \
+ do { /* this assumes a is not negative */ \
+ z_off64_t tmp = a >> 32; \
+ a &= 0xffffffffL; \
+ a += (tmp << 8) - (tmp << 5) + tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
if (a >= BASE) a -= BASE; \
} while (0)
#else
# define MOD(a) a %= BASE
-# define MOD4(a) a %= BASE
+# define MOD28(a) a %= BASE
+# define MOD63(a) a %= BASE
#endif
/* ========================================================================= */
@@ -94,7 +100,7 @@ uLong ZEXPORT adler32(adler, buf, len)
}
if (adler >= BASE)
adler -= BASE;
- MOD4(sum2); /* only added so many BASE's */
+ MOD28(sum2); /* only added so many BASE's */
return adler | (sum2 << 16);
}
@@ -130,25 +136,47 @@ uLong ZEXPORT adler32(adler, buf, len)
}
/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+local uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
- z_off_t len2;
+ z_off64_t len2;
{
unsigned long sum1;
unsigned long sum2;
unsigned rem;
+ /* for negative len, return invalid adler32 as a clue for debugging */
+ if (len2 < 0)
+ return 0xffffffffUL;
+
/* the derivation of this formula is left as an exercise for the reader */
- rem = (unsigned)(len2 % BASE);
+ MOD63(len2); /* assumes len2 >= 0 */
+ rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
- if (sum2 > BASE) sum2 -= BASE;
+ if (sum1 >= BASE) sum1 -= BASE;
+ if (sum1 >= BASE) sum1 -= BASE;
+ if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
+ if (sum2 >= BASE) sum2 -= BASE;
return sum1 | (sum2 << 16);
}
+
+/* ========================================================================= */
+uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off_t len2;
+{
+ return adler32_combine_(adler1, adler2, len2);
+}
+
+uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off64_t len2;
+{
+ return adler32_combine_(adler1, adler2, len2);
+}
diff --git a/erts/emulator/zlib/compress.c b/erts/emulator/zlib/compress.c
index 28bceb15f8..8ecef0f790 100644
--- a/erts/emulator/zlib/compress.c
+++ b/erts/emulator/zlib/compress.c
@@ -1,10 +1,8 @@
/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
#ifdef HAVE_CONFIG_H
@@ -34,7 +32,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
#ifdef MAXSEG_64K
/* Check for source > 64K on 16-bit machine: */
@@ -80,5 +78,6 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
uLong ZEXPORT compressBound (sourceLen)
uLong sourceLen;
{
- return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
+ (sourceLen >> 25) + 13;
}
diff --git a/erts/emulator/zlib/crc32.c b/erts/emulator/zlib/crc32.c
index b9c10bb9b3..ba506d8dd3 100644
--- a/erts/emulator/zlib/crc32.c
+++ b/erts/emulator/zlib/crc32.c
@@ -1,19 +1,14 @@
/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Thanks to Rodney Brown <[email protected]> for his contribution of faster
* CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
* tables for updating the shift register in one step with three exclusive-ors
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
* instead of four steps with four exclusive-ors. This results in about a
* factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
/*
@@ -22,6 +17,8 @@
of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
first call get_crc_table() to initialize the tables before allowing more than
one thread to use crc32().
+
+ DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h.
*/
#ifdef MAKECRCH
@@ -31,35 +28,19 @@
# endif /* !DYNAMIC_CRC_TABLE */
#endif /* MAKECRCH */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "zutil.h" /* for STDC and FAR definitions */
#define local static
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-# ifdef STDC /* need ANSI C limits.h to determine sizes */
-# include <limits.h>
-# define BYFOUR
-# if (UINT_MAX == 0xffffffffUL)
- typedef unsigned int u4;
-# else
-# if (ULONG_MAX == 0xffffffffUL)
- typedef unsigned long u4;
-# else
-# if (USHRT_MAX == 0xffffffffUL)
- typedef unsigned short u4;
-# else
-# undef BYFOUR /* can't find a four-byte integer type! */
-# endif
-# endif
-# endif
-# endif /* STDC */
-#endif /* !NOBYFOUR */
-
/* Definitions for doing the crc four data bytes at a time. */
+#if !defined(NOBYFOUR) && defined(Z_U4)
+# define BYFOUR
+#endif
#ifdef BYFOUR
-# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
- (((w)&0xff00)<<8)+(((w)&0xff)<<24))
local unsigned long crc32_little OF((unsigned long,
const unsigned char FAR *, unsigned));
local unsigned long crc32_big OF((unsigned long,
@@ -73,14 +54,16 @@
local unsigned long gf2_matrix_times OF((unsigned long *mat,
unsigned long vec));
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
+local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2));
+
#ifdef DYNAMIC_CRC_TABLE
local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
+local z_crc_t FAR crc_table[TBLS][256];
local void make_crc_table OF((void));
#ifdef MAKECRCH
- local void write_table OF((FILE *, const unsigned long FAR *));
+ local void write_table OF((FILE *, const z_crc_t FAR *));
#endif /* MAKECRCH */
/*
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
@@ -110,9 +93,9 @@ local void make_crc_table OF((void));
*/
local void make_crc_table()
{
- unsigned long c;
+ z_crc_t c;
int n, k;
- unsigned long poly; /* polynomial exclusive-or pattern */
+ z_crc_t poly; /* polynomial exclusive-or pattern */
/* terms of polynomial defining this crc (except x^32): */
static volatile int first = 1; /* flag to limit concurrent making */
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
@@ -124,13 +107,13 @@ local void make_crc_table()
first = 0;
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
- poly = 0UL;
- for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
- poly |= 1UL << (31 - p[n]);
+ poly = 0;
+ for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++)
+ poly |= (z_crc_t)1 << (31 - p[n]);
/* generate a crc for every 8-bit value */
for (n = 0; n < 256; n++) {
- c = (unsigned long)n;
+ c = (z_crc_t)n;
for (k = 0; k < 8; k++)
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
crc_table[0][n] = c;
@@ -141,11 +124,11 @@ local void make_crc_table()
and then the byte reversal of those as well as the first table */
for (n = 0; n < 256; n++) {
c = crc_table[0][n];
- crc_table[4][n] = REV(c);
+ crc_table[4][n] = ZSWAP32(c);
for (k = 1; k < 4; k++) {
c = crc_table[0][c & 0xff] ^ (c >> 8);
crc_table[k][n] = c;
- crc_table[k + 4][n] = REV(c);
+ crc_table[k + 4][n] = ZSWAP32(c);
}
}
#endif /* BYFOUR */
@@ -167,7 +150,7 @@ local void make_crc_table()
if (out == NULL) return;
fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const unsigned long FAR ");
+ fprintf(out, "local const z_crc_t FAR ");
fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
write_table(out, crc_table[0]);
# ifdef BYFOUR
@@ -187,12 +170,13 @@ local void make_crc_table()
#ifdef MAKECRCH
local void write_table(out, table)
FILE *out;
- const unsigned long FAR *table;
+ const z_crc_t FAR *table;
{
int n;
for (n = 0; n < 256; n++)
- fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
+ fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ",
+ (unsigned long)(table[n]),
n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
}
#endif /* MAKECRCH */
@@ -207,13 +191,13 @@ local void write_table(out, table)
/* =========================================================================
* This function can be used by asm versions of crc32()
*/
-const unsigned long FAR * ZEXPORT get_crc_table()
+const z_crc_t FAR * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty)
make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */
- return (const unsigned long FAR *)crc_table;
+ return (const z_crc_t FAR *)crc_table;
}
/* ========================================================================= */
@@ -224,7 +208,7 @@ const unsigned long FAR * ZEXPORT get_crc_table()
unsigned long ZEXPORT crc32(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- unsigned len;
+ uInt len;
{
if (buf == Z_NULL) return 0UL;
@@ -235,7 +219,7 @@ unsigned long ZEXPORT crc32(crc, buf, len)
#ifdef BYFOUR
if (sizeof(void *) == sizeof(ptrdiff_t)) {
- u4 endian;
+ z_crc_t endian;
endian = 1;
if (*((unsigned char *)(&endian)))
@@ -269,17 +253,17 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = (u4)crc;
+ c = (z_crc_t)crc;
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
while (len >= 32) {
DOLIT32;
len -= 32;
@@ -309,17 +293,17 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = REV((u4)crc);
+ c = ZSWAP32((z_crc_t)crc);
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
buf4--;
while (len >= 32) {
DOBIG32;
@@ -336,7 +320,7 @@ local unsigned long crc32_big(crc, buf, len)
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
} while (--len);
c = ~c;
- return (unsigned long)(REV(c));
+ return (unsigned long)(ZSWAP32(c));
}
#endif /* BYFOUR */
@@ -372,22 +356,22 @@ local void gf2_matrix_square(square, mat)
}
/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+local uLong crc32_combine_(crc1, crc2, len2)
uLong crc1;
uLong crc2;
- z_off_t len2;
+ z_off64_t len2;
{
int n;
unsigned long row;
unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
- /* degenerate case */
- if (len2 == 0)
+ /* degenerate case (also disallow negative lengths) */
+ if (len2 <= 0)
return crc1;
/* put operator for one zero bit in odd */
- odd[0] = 0xedb88320L; /* CRC-32 polynomial */
+ odd[0] = 0xedb88320UL; /* CRC-32 polynomial */
row = 1;
for (n = 1; n < GF2_DIM; n++) {
odd[n] = row;
@@ -426,3 +410,20 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
crc1 ^= crc2;
return crc1;
}
+
+/* ========================================================================= */
+uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+ uLong crc1;
+ uLong crc2;
+ z_off_t len2;
+{
+ return crc32_combine_(crc1, crc2, len2);
+}
+
+uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
+ uLong crc1;
+ uLong crc2;
+ z_off64_t len2;
+{
+ return crc32_combine_(crc1, crc2, len2);
+}
diff --git a/erts/emulator/zlib/crc32.h b/erts/emulator/zlib/crc32.h
index 49cd69a4c2..9e0c778102 100644
--- a/erts/emulator/zlib/crc32.h
+++ b/erts/emulator/zlib/crc32.h
@@ -2,9 +2,7 @@
* Generated automatically by crc32.c
*/
-/* %ExternalCopyright% */
-
-local const unsigned long FAR crc_table[TBLS][256] =
+local const z_crc_t FAR crc_table[TBLS][256] =
{
{
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
diff --git a/erts/emulator/zlib/deflate.c b/erts/emulator/zlib/deflate.c
index 92f4be57c5..943c26dfb2 100644
--- a/erts/emulator/zlib/deflate.c
+++ b/erts/emulator/zlib/deflate.c
@@ -1,10 +1,8 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/*
* ALGORITHM
*
@@ -39,7 +37,7 @@
* REFERENCES
*
* Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- * Available in http://www.ietf.org/rfc/rfc1951.txt
+ * Available in http://tools.ietf.org/html/rfc1951
*
* A description of the Rabin and Karp algorithm is given in the book
* "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
@@ -57,7 +55,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
+ " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -84,19 +82,18 @@ local block_state deflate_fast OF((deflate_state *s, int flush));
#ifndef FASTEST
local block_state deflate_slow OF((deflate_state *s, int flush));
#endif
+local block_state deflate_rle OF((deflate_state *s, int flush));
+local block_state deflate_huff OF((deflate_state *s, int flush));
local void lm_init OF((deflate_state *s));
local void putShortMSB OF((deflate_state *s, uInt b));
local void flush_pending OF((z_streamp strm));
local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
#ifdef ASMV
void match_init OF((void)); /* asm code initialization */
uInt longest_match OF((deflate_state *s, IPos cur_match));
#else
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
#ifdef DEBUG
local void check_match OF((deflate_state *s, IPos start, IPos match,
@@ -115,11 +112,6 @@ local void check_match OF((deflate_state *s, IPos start, IPos match,
#endif
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
/* Values for max_lazy_match, good_match and max_chain_length, depending on
* the desired pack level (0..9). The values given below have been tuned to
* exclude worst case performance for pathological files. Better values may be
@@ -166,6 +158,9 @@ local const config configuration_table[10] = {
struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
#endif
+/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
+#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
+
/* ===========================================================================
* Update a hash value with the given input byte
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
@@ -246,10 +241,19 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
strm->msg = Z_NULL;
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
#ifdef FASTEST
if (level != 0) level = 1;
@@ -293,6 +297,8 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
+ s->high_water = 0; /* nothing written to s->window yet */
+
s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
@@ -302,7 +308,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
s->status = FINISH_STATE;
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ strm->msg = ERR_MSG(Z_MEM_ERROR);
deflateEnd (strm);
return Z_MEM_ERROR;
}
@@ -323,43 +329,70 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
uInt dictLength;
{
deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
+ uInt str, n;
+ int wrap;
+ unsigned avail;
+ z_const unsigned char *next;
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->wrap == 2 ||
- (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
return Z_STREAM_ERROR;
-
s = strm->state;
- if (s->wrap)
- strm->adler = adler32(strm->adler, dictionary, dictLength);
+ wrap = s->wrap;
+ if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
+ return Z_STREAM_ERROR;
- if (length < MIN_MATCH) return Z_OK;
- if (length > MAX_DIST(s)) {
- length = MAX_DIST(s);
- dictionary += dictLength - length; /* use the tail of the dictionary */
+ /* when using zlib wrappers, compute Adler-32 for provided dictionary */
+ if (wrap == 1)
+ strm->adler = adler32(strm->adler, dictionary, dictLength);
+ s->wrap = 0; /* avoid computing Adler-32 in read_buf */
+
+ /* if dictionary would fill window, just replace the history */
+ if (dictLength >= s->w_size) {
+ if (wrap == 0) { /* already empty otherwise */
+ CLEAR_HASH(s);
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->insert = 0;
+ }
+ dictionary += dictLength - s->w_size; /* use the tail */
+ dictLength = s->w_size;
}
- zmemcpy(s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
- /* Insert all strings in the hash table (except for the last two bytes).
- * s->lookahead stays null, so s->ins_h will be recomputed at the next
- * call of fill_window.
- */
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
+ /* insert dictionary into window and hash */
+ avail = strm->avail_in;
+ next = strm->next_in;
+ strm->avail_in = dictLength;
+ strm->next_in = (z_const Bytef *)dictionary;
+ fill_window(s);
+ while (s->lookahead >= MIN_MATCH) {
+ str = s->strstart;
+ n = s->lookahead - (MIN_MATCH-1);
+ do {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ } while (--n);
+ s->strstart = str;
+ s->lookahead = MIN_MATCH-1;
+ fill_window(s);
}
- if (hash_head) hash_head = 0; /* to make compiler happy */
+ s->strstart += s->lookahead;
+ s->block_start = (long)s->strstart;
+ s->insert = s->lookahead;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ strm->next_in = next;
+ strm->avail_in = avail;
+ s->wrap = wrap;
return Z_OK;
}
/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
+int ZEXPORT deflateResetKeep (strm)
z_streamp strm;
{
deflate_state *s;
@@ -389,12 +422,23 @@ int ZEXPORT deflateReset (strm)
s->last_flush = Z_NO_FLUSH;
_tr_init(s);
- lm_init(s);
return Z_OK;
}
/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ int ret;
+
+ ret = deflateResetKeep(strm);
+ if (ret == Z_OK)
+ lm_init(strm->state);
+ return ret;
+}
+
+/* ========================================================================= */
int ZEXPORT deflateSetHeader (strm, head)
z_streamp strm;
gz_headerp head;
@@ -406,14 +450,42 @@ int ZEXPORT deflateSetHeader (strm, head)
}
/* ========================================================================= */
+int ZEXPORT deflatePending (strm, pending, bits)
+ unsigned *pending;
+ int *bits;
+ z_streamp strm;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (pending != Z_NULL)
+ *pending = strm->state->pending;
+ if (bits != Z_NULL)
+ *bits = strm->state->bi_valid;
+ return Z_OK;
+}
+
+/* ========================================================================= */
int ZEXPORT deflatePrime (strm, bits, value)
z_streamp strm;
int bits;
int value;
{
+ deflate_state *s;
+ int put;
+
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- strm->state->bi_valid = bits;
- strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
+ s = strm->state;
+ if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
+ return Z_BUF_ERROR;
+ do {
+ put = Buf_size - s->bi_valid;
+ if (put > bits)
+ put = bits;
+ s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
+ s->bi_valid += put;
+ _tr_flush_bits(s);
+ value >>= put;
+ bits -= put;
+ } while (bits);
return Z_OK;
}
@@ -440,9 +512,12 @@ int ZEXPORT deflateParams(strm, level, strategy)
}
func = configuration_table[s->level].func;
- if (func != configuration_table[level].func && strm->total_in != 0) {
+ if ((strategy != s->strategy || func != configuration_table[level].func) &&
+ strm->total_in != 0) {
/* Flush the last buffer: */
- err = deflate(strm, Z_PARTIAL_FLUSH);
+ err = deflate(strm, Z_BLOCK);
+ if (err == Z_BUF_ERROR && s->pending == 0)
+ err = Z_OK;
}
if (s->level != level) {
s->level = level;
@@ -486,33 +561,66 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
* resulting from using fixed blocks instead of stored blocks, which deflate
* can emit on compressed data for some combinations of the parameters.
*
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
+ * This function could be more sophisticated to provide closer upper bounds for
+ * every combination of windowBits and memLevel. But even the conservative
+ * upper bound of about 14% expansion does not seem onerous for output buffer
+ * allocation.
*/
uLong ZEXPORT deflateBound(strm, sourceLen)
z_streamp strm;
uLong sourceLen;
{
deflate_state *s;
- uLong destLen;
+ uLong complen, wraplen;
+ Bytef *str;
- /* conservative upper bound */
- destLen = sourceLen +
- ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
+ /* conservative upper bound for compressed data */
+ complen = sourceLen +
+ ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;
- /* if can't get parameters, return conservative bound */
+ /* if can't get parameters, return conservative bound plus zlib wrapper */
if (strm == Z_NULL || strm->state == Z_NULL)
- return destLen;
+ return complen + 6;
- /* if not default parameters, return conservative bound */
+ /* compute wrapper length */
s = strm->state;
+ switch (s->wrap) {
+ case 0: /* raw deflate */
+ wraplen = 0;
+ break;
+ case 1: /* zlib wrapper */
+ wraplen = 6 + (s->strstart ? 4 : 0);
+ break;
+ case 2: /* gzip wrapper */
+ wraplen = 18;
+ if (s->gzhead != Z_NULL) { /* user-supplied gzip header */
+ if (s->gzhead->extra != Z_NULL)
+ wraplen += 2 + s->gzhead->extra_len;
+ str = s->gzhead->name;
+ if (str != Z_NULL)
+ do {
+ wraplen++;
+ } while (*str++);
+ str = s->gzhead->comment;
+ if (str != Z_NULL)
+ do {
+ wraplen++;
+ } while (*str++);
+ if (s->gzhead->hcrc)
+ wraplen += 2;
+ }
+ break;
+ default: /* for compiler happiness */
+ wraplen = 6;
+ }
+
+ /* if not default parameters, return conservative bound */
if (s->w_bits != 15 || s->hash_bits != 8 + 7)
- return destLen;
+ return complen + wraplen;
/* default settings: return tight bound for that case */
- return compressBound(sourceLen);
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
+ (sourceLen >> 25) + 13 - 6 + wraplen;
}
/* =========================================================================
@@ -537,19 +645,22 @@ local void putShortMSB (s, b)
local void flush_pending(strm)
z_streamp strm;
{
- unsigned len = strm->state->pending;
+ unsigned len;
+ deflate_state *s = strm->state;
+ _tr_flush_bits(s);
+ len = s->pending;
if (len > strm->avail_out) len = strm->avail_out;
if (len == 0) return;
- zmemcpy(strm->next_out, strm->state->pending_out, len);
+ zmemcpy(strm->next_out, s->pending_out, len);
strm->next_out += len;
- strm->state->pending_out += len;
+ s->pending_out += len;
strm->total_out += len;
strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
+ s->pending -= len;
+ if (s->pending == 0) {
+ s->pending_out = s->pending_buf;
}
}
@@ -562,7 +673,7 @@ int ZEXPORT deflate (strm, flush)
deflate_state *s;
if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_FINISH || flush < 0) {
+ flush > Z_BLOCK || flush < 0) {
return Z_STREAM_ERROR;
}
s = strm->state;
@@ -586,7 +697,7 @@ int ZEXPORT deflate (strm, flush)
put_byte(s, 31);
put_byte(s, 139);
put_byte(s, 8);
- if (s->gzhead == NULL) {
+ if (s->gzhead == Z_NULL) {
put_byte(s, 0);
put_byte(s, 0);
put_byte(s, 0);
@@ -613,7 +724,7 @@ int ZEXPORT deflate (strm, flush)
(s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
4 : 0));
put_byte(s, s->gzhead->os & 0xff);
- if (s->gzhead->extra != NULL) {
+ if (s->gzhead->extra != Z_NULL) {
put_byte(s, s->gzhead->extra_len & 0xff);
put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
}
@@ -655,7 +766,7 @@ int ZEXPORT deflate (strm, flush)
}
#ifdef GZIP
if (s->status == EXTRA_STATE) {
- if (s->gzhead->extra != NULL) {
+ if (s->gzhead->extra != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
@@ -683,7 +794,7 @@ int ZEXPORT deflate (strm, flush)
s->status = NAME_STATE;
}
if (s->status == NAME_STATE) {
- if (s->gzhead->name != NULL) {
+ if (s->gzhead->name != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
int val;
@@ -714,7 +825,7 @@ int ZEXPORT deflate (strm, flush)
s->status = COMMENT_STATE;
}
if (s->status == COMMENT_STATE) {
- if (s->gzhead->comment != NULL) {
+ if (s->gzhead->comment != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
int val;
@@ -776,7 +887,7 @@ int ZEXPORT deflate (strm, flush)
* flushes. For repeated and useless calls with Z_FINISH, we keep
* returning Z_STREAM_END instead of Z_BUF_ERROR.
*/
- } else if (strm->avail_in == 0 && flush <= old_flush &&
+ } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
flush != Z_FINISH) {
ERR_RETURN(strm, Z_BUF_ERROR);
}
@@ -792,7 +903,9 @@ int ZEXPORT deflate (strm, flush)
(flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
block_state bstate;
- bstate = (*(configuration_table[s->level].func))(s, flush);
+ bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
+ (s->strategy == Z_RLE ? deflate_rle(s, flush) :
+ (*(configuration_table[s->level].func))(s, flush));
if (bstate == finish_started || bstate == finish_done) {
s->status = FINISH_STATE;
@@ -813,13 +926,18 @@ int ZEXPORT deflate (strm, flush)
if (bstate == block_done) {
if (flush == Z_PARTIAL_FLUSH) {
_tr_align(s);
- } else { /* FULL_FLUSH or SYNC_FLUSH */
+ } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
_tr_stored_block(s, (char*)0, 0L, 0);
/* For a full flush, this empty block will be recognized
* as a special marker by inflate_sync().
*/
if (flush == Z_FULL_FLUSH) {
CLEAR_HASH(s); /* forget history */
+ if (s->lookahead == 0) {
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->insert = 0;
+ }
}
}
flush_pending(strm);
@@ -914,12 +1032,12 @@ int ZEXPORT deflateCopy (dest, source)
ss = source->state;
- zmemcpy(dest, source, sizeof(z_stream));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
if (ds == Z_NULL) return Z_MEM_ERROR;
dest->state = (struct internal_state FAR *) ds;
- zmemcpy(ds, ss, sizeof(deflate_state));
+ zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
ds->strm = dest;
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
@@ -935,8 +1053,8 @@ int ZEXPORT deflateCopy (dest, source)
}
/* following zmemcpy do not work for 16-bit MSDOS */
zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
- zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
- zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
@@ -970,15 +1088,15 @@ local int read_buf(strm, buf, size)
strm->avail_in -= len;
+ zmemcpy(buf, strm->next_in, len);
if (strm->state->wrap == 1) {
- strm->adler = adler32(strm->adler, strm->next_in, len);
+ strm->adler = adler32(strm->adler, buf, len);
}
#ifdef GZIP
else if (strm->state->wrap == 2) {
- strm->adler = crc32(strm->adler, strm->next_in, len);
+ strm->adler = crc32(strm->adler, buf, len);
}
#endif
- zmemcpy(buf, strm->next_in, len);
strm->next_in += len;
strm->total_in += len;
@@ -1005,6 +1123,7 @@ local void lm_init (s)
s->strstart = 0;
s->block_start = 0L;
s->lookahead = 0;
+ s->insert = 0;
s->match_length = s->prev_length = MIN_MATCH-1;
s->match_available = 0;
s->ins_h = 0;
@@ -1172,12 +1291,13 @@ local uInt longest_match(s, cur_match)
return s->lookahead;
}
#endif /* ASMV */
-#endif /* FASTEST */
+
+#else /* FASTEST */
/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
+ * Optimized version for FASTEST only
*/
-local uInt longest_match_fast(s, cur_match)
+local uInt longest_match(s, cur_match)
deflate_state *s;
IPos cur_match; /* current match */
{
@@ -1230,6 +1350,8 @@ local uInt longest_match_fast(s, cur_match)
return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
}
+#endif /* FASTEST */
+
#ifdef DEBUG
/* ===========================================================================
* Check that the match at match_start is indeed a match.
@@ -1276,6 +1398,8 @@ local void fill_window(s)
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
+ Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
do {
more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
@@ -1308,7 +1432,6 @@ local void fill_window(s)
later. (Using level 0 permanently is not an optimal usage of
zlib, so we don't care about this pathological case.)
*/
- /* %%% avoid this when Z_RLE */
n = s->hash_size;
p = &s->head[n];
do {
@@ -1329,7 +1452,7 @@ local void fill_window(s)
#endif
more += wsize;
}
- if (s->strm->avail_in == 0) return;
+ if (s->strm->avail_in == 0) break;
/* If there was no sliding:
* strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
@@ -1348,39 +1471,88 @@ local void fill_window(s)
s->lookahead += n;
/* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+ if (s->lookahead + s->insert >= MIN_MATCH) {
+ uInt str = s->strstart - s->insert;
+ s->ins_h = s->window[str];
+ UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
#if MIN_MATCH != 3
Call UPDATE_HASH() MIN_MATCH-3 more times
#endif
+ while (s->insert) {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ s->insert--;
+ if (s->lookahead + s->insert < MIN_MATCH)
+ break;
+ }
}
/* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
* but this is not important since only literal bytes will be emitted.
*/
} while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
+
+ /* If the WIN_INIT bytes after the end of the current data have never been
+ * written, then zero those bytes in order to avoid memory check reports of
+ * the use of uninitialized (or uninitialised as Julian writes) bytes by
+ * the longest match routines. Update the high water mark for the next
+ * time through here. WIN_INIT is set to MAX_MATCH since the longest match
+ * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+ */
+ if (s->high_water < s->window_size) {
+ ulg curr = s->strstart + (ulg)(s->lookahead);
+ ulg init;
+
+ if (s->high_water < curr) {
+ /* Previous high water mark below current data -- zero WIN_INIT
+ * bytes or up to end of window, whichever is less.
+ */
+ init = s->window_size - curr;
+ if (init > WIN_INIT)
+ init = WIN_INIT;
+ zmemzero(s->window + curr, (unsigned)init);
+ s->high_water = curr + init;
+ }
+ else if (s->high_water < (ulg)curr + WIN_INIT) {
+ /* High water mark at or above current data, but below current data
+ * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+ * to end of window, whichever is less.
+ */
+ init = (ulg)curr + WIN_INIT - s->high_water;
+ if (init > s->window_size - s->high_water)
+ init = s->window_size - s->high_water;
+ zmemzero(s->window + s->high_water, (unsigned)init);
+ s->high_water += init;
+ }
+ }
+
+ Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+ "not enough room for search");
}
/* ===========================================================================
* Flush the current block, with given end-of-file flag.
* IN assertion: strstart is set to the end of the current match.
*/
-#define FLUSH_BLOCK_ONLY(s, eof) { \
+#define FLUSH_BLOCK_ONLY(s, last) { \
_tr_flush_block(s, (s->block_start >= 0L ? \
(charf *)&s->window[(unsigned)s->block_start] : \
(charf *)Z_NULL), \
(ulg)((long)s->strstart - s->block_start), \
- (eof)); \
+ (last)); \
s->block_start = s->strstart; \
flush_pending(s->strm); \
Tracev((stderr,"[FLUSH]")); \
}
/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
- FLUSH_BLOCK_ONLY(s, eof); \
- if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+#define FLUSH_BLOCK(s, last) { \
+ FLUSH_BLOCK_ONLY(s, last); \
+ if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
}
/* ===========================================================================
@@ -1439,8 +1611,14 @@ local block_state deflate_stored(s, flush)
FLUSH_BLOCK(s, 0);
}
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if ((long)s->strstart > s->block_start)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
/* ===========================================================================
@@ -1454,7 +1632,7 @@ local block_state deflate_fast(s, flush)
deflate_state *s;
int flush;
{
- IPos hash_head = NIL; /* head of the hash chain */
+ IPos hash_head; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
for (;;) {
@@ -1474,6 +1652,7 @@ local block_state deflate_fast(s, flush)
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
+ hash_head = NIL;
if (s->lookahead >= MIN_MATCH) {
INSERT_STRING(s, s->strstart, hash_head);
}
@@ -1486,19 +1665,8 @@ local block_state deflate_fast(s, flush)
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
*/
-#ifdef FASTEST
- if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
- (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#else
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#endif
- /* longest_match() or longest_match_fast() sets match_start */
+ s->match_length = longest_match (s, hash_head);
+ /* longest_match() sets match_start */
}
if (s->match_length >= MIN_MATCH) {
check_match(s, s->strstart, s->match_start, s->match_length);
@@ -1546,8 +1714,14 @@ local block_state deflate_fast(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#ifndef FASTEST
@@ -1560,7 +1734,7 @@ local block_state deflate_slow(s, flush)
deflate_state *s;
int flush;
{
- IPos hash_head = NIL; /* head of hash chain */
+ IPos hash_head; /* head of hash chain */
int bflush; /* set if current block must be flushed */
/* Process the input block. */
@@ -1581,6 +1755,7 @@ local block_state deflate_slow(s, flush)
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
+ hash_head = NIL;
if (s->lookahead >= MIN_MATCH) {
INSERT_STRING(s, s->strstart, hash_head);
}
@@ -1596,12 +1771,8 @@ local block_state deflate_slow(s, flush)
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
*/
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
- /* longest_match() or longest_match_fast() sets match_start */
+ s->match_length = longest_match (s, hash_head);
+ /* longest_match() sets match_start */
if (s->match_length <= 5 && (s->strategy == Z_FILTERED
#if TOO_FAR <= 32767
@@ -1674,12 +1845,17 @@ local block_state deflate_slow(s, flush)
_tr_tally_lit(s, s->window[s->strstart-1], bflush);
s->match_available = 0;
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#endif /* FASTEST */
-#if 0
/* ===========================================================================
* For Z_RLE, simply look for runs of bytes, generate matches only of distance
* one. Do not maintain a hash table. (It will be regenerated if this run of
@@ -1689,43 +1865,52 @@ local block_state deflate_rle(s, flush)
deflate_state *s;
int flush;
{
- int bflush; /* set if current block must be flushed */
- uInt run; /* length of run */
- uInt max; /* maximum length of run */
- uInt prev; /* byte at distance one to match */
- Bytef *scan; /* scan for end of run */
+ int bflush; /* set if current block must be flushed */
+ uInt prev; /* byte at distance one to match */
+ Bytef *scan, *strend; /* scan goes up to strend for length of run */
for (;;) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
- * for the longest encodable run.
+ * for the longest run, plus one for the unrolled loop.
*/
- if (s->lookahead < MAX_MATCH) {
+ if (s->lookahead <= MAX_MATCH) {
fill_window(s);
- if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
+ if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
return need_more;
}
if (s->lookahead == 0) break; /* flush the current block */
}
/* See how many times the previous byte repeats */
- run = 0;
- if (s->strstart > 0) { /* if there is a previous byte, that is */
- max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
+ s->match_length = 0;
+ if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
scan = s->window + s->strstart - 1;
- prev = *scan++;
- do {
- if (*scan++ != prev)
- break;
- } while (++run < max);
+ prev = *scan;
+ if (prev == *++scan && prev == *++scan && prev == *++scan) {
+ strend = s->window + s->strstart + MAX_MATCH;
+ do {
+ } while (prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ scan < strend);
+ s->match_length = MAX_MATCH - (int)(strend - scan);
+ if (s->match_length > s->lookahead)
+ s->match_length = s->lookahead;
+ }
+ Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
}
/* Emit match if have run of MIN_MATCH or longer, else emit literal */
- if (run >= MIN_MATCH) {
- check_match(s, s->strstart, s->strstart - 1, run);
- _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
- s->lookahead -= run;
- s->strstart += run;
+ if (s->match_length >= MIN_MATCH) {
+ check_match(s, s->strstart, s->strstart - 1, s->match_length);
+
+ _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush);
+
+ s->lookahead -= s->match_length;
+ s->strstart += s->match_length;
+ s->match_length = 0;
} else {
/* No match, output a literal byte */
Tracevv((stderr,"%c", s->window[s->strstart]));
@@ -1735,7 +1920,51 @@ local block_state deflate_rle(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
+}
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+local block_state deflate_huff(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ int bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we have a literal to write. */
+ if (s->lookahead == 0) {
+ fill_window(s);
+ if (s->lookahead == 0) {
+ if (flush == Z_NO_FLUSH)
+ return need_more;
+ break; /* flush the current block */
+ }
+ }
+
+ /* Output a literal byte */
+ s->match_length = 0;
+ Tracevv((stderr,"%c", s->window[s->strstart]));
+ _tr_tally_lit (s, s->window[s->strstart], bflush);
+ s->lookahead--;
+ s->strstart++;
+ if (bflush) FLUSH_BLOCK(s, 0);
+ }
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
-#endif
diff --git a/erts/emulator/zlib/deflate.h b/erts/emulator/zlib/deflate.h
index 92b037c9d2..ce0299edd1 100644
--- a/erts/emulator/zlib/deflate.h
+++ b/erts/emulator/zlib/deflate.h
@@ -1,10 +1,8 @@
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2004 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
@@ -50,6 +48,9 @@
#define MAX_BITS 15
/* All codes must not exceed MAX_BITS bits */
+#define Buf_size 16
+/* size of bit buffer in bi_buf */
+
#define INIT_STATE 42
#define EXTRA_STATE 69
#define NAME_STATE 73
@@ -103,7 +104,7 @@ typedef struct internal_state {
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
gz_headerp gzhead; /* gzip header information to write */
uInt gzindex; /* where in extra, name, or comment */
- Byte method; /* STORED (for zip only) or DEFLATED */
+ Byte method; /* can only be DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
/* used by deflate.c: */
@@ -190,7 +191,7 @@ typedef struct internal_state {
int nice_match; /* Stop searching when current match exceeds this */
/* used by trees.c: */
- /* Didn't use ct_data typedef below to supress compiler warning */
+ /* Didn't use ct_data typedef below to suppress compiler warning */
struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
@@ -246,7 +247,7 @@ typedef struct internal_state {
ulg opt_len; /* bit length of current block with optimal trees */
ulg static_len; /* bit length of current block with static trees */
uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
+ uInt insert; /* bytes at end of window left to insert */
#ifdef DEBUG
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
@@ -262,6 +263,13 @@ typedef struct internal_state {
* are always zero.
*/
+ ulg high_water;
+ /* High water mark offset in window for initialized bytes -- bytes above
+ * this are set to zero in order to avoid memory check warnings when
+ * longest match routines access bytes past the input. This is then
+ * updated to the new high water mark.
+ */
+
} FAR deflate_state;
/* Output a byte on the stream.
@@ -280,14 +288,19 @@ typedef struct internal_state {
* distances are limited to MAX_DIST instead of WSIZE.
*/
+#define WIN_INIT MAX_MATCH
+/* Number of bytes after end of data in window to initialize in order to avoid
+ memory checker errors from longest match routines */
+
/* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
+void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
+int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
+ ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
+void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
+void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
+ ulg stored_len, int last));
#define d_code(dist) \
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
@@ -300,11 +313,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)
- extern uch _length_code[];
- extern uch _dist_code[];
+ extern uch ZLIB_INTERNAL _length_code[];
+ extern uch ZLIB_INTERNAL _dist_code[];
#else
- extern const uch _length_code[];
- extern const uch _dist_code[];
+ extern const uch ZLIB_INTERNAL _length_code[];
+ extern const uch ZLIB_INTERNAL _dist_code[];
#endif
# define _tr_tally_lit(s, c, flush) \
diff --git a/erts/emulator/zlib/example.c b/erts/emulator/zlib/example.c
deleted file mode 100644
index ebe828f72d..0000000000
--- a/erts/emulator/zlib/example.c
+++ /dev/null
@@ -1,570 +0,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2004 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* %ExternalCopyright% */
-
-/* @(#) $Id$ */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-# include <string.h>
-# include <stdlib.h>
-#endif
-
-#if defined(VMS) || defined(RISCOS)
-# define TESTFILE "foo-gz"
-#else
-# define TESTFILE "foo.gz"
-#endif
-
-#define CHECK_ERR(err, msg) { \
- if (err != Z_OK) { \
- fprintf(stderr, "%s error: %d\n", msg, err); \
- exit(1); \
- } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_gzio OF((const char *fname,
- Byte *uncompr, uLong uncomprLen));
-void test_deflate OF((Byte *compr, uLong comprLen));
-void test_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_flush OF((Byte *compr, uLong *comprLen));
-void test_sync OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate OF((Byte *compr, uLong comprLen));
-void test_dict_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-int main OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- uLong len = (uLong)strlen(hello)+1;
-
- err = compress(compr, &comprLen, (const Bytef*)hello, len);
- CHECK_ERR(err, "compress");
-
- strcpy((char*)uncompr, "garbage");
-
- err = uncompress(uncompr, &uncomprLen, compr, comprLen);
- CHECK_ERR(err, "uncompress");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad uncompress\n");
- exit(1);
- } else {
- printf("uncompress(): %s\n", (char *)uncompr);
- }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(fname, uncompr, uncomprLen)
- const char *fname; /* compressed file name */
- Byte *uncompr;
- uLong uncomprLen;
-{
-#ifdef NO_GZCOMPRESS
- fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
-#else
- int err;
- int len = (int)strlen(hello)+1;
- gzFile file;
- z_off_t pos;
-
- file = gzopen(fname, "wb");
- if (file == NULL) {
- fprintf(stderr, "gzopen error\n");
- exit(1);
- }
- gzputc(file, 'h');
- if (gzputs(file, "ello") != 4) {
- fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
- exit(1);
- }
- if (gzprintf(file, ", %s!", "hello") != 8) {
- fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
- exit(1);
- }
- gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
- gzclose(file);
-
- file = gzopen(fname, "rb");
- if (file == NULL) {
- fprintf(stderr, "gzopen error\n");
- exit(1);
- }
- strcpy((char*)uncompr, "garbage");
-
- if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
- fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
- exit(1);
- }
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
- exit(1);
- } else {
- printf("gzread(): %s\n", (char*)uncompr);
- }
-
- pos = gzseek(file, -8L, SEEK_CUR);
- if (pos != 6 || gztell(file) != pos) {
- fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
- (long)pos, (long)gztell(file));
- exit(1);
- }
-
- if (gzgetc(file) != ' ') {
- fprintf(stderr, "gzgetc error\n");
- exit(1);
- }
-
- if (gzungetc(' ', file) != ' ') {
- fprintf(stderr, "gzungetc error\n");
- exit(1);
- }
-
- gzgets(file, (char*)uncompr, (int)uncomprLen);
- if (strlen((char*)uncompr) != 7) { /* " hello!" */
- fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
- exit(1);
- }
- if (strcmp((char*)uncompr, hello + 6)) {
- fprintf(stderr, "bad gzgets after gzseek\n");
- exit(1);
- } else {
- printf("gzgets() after gzseek: %s\n", (char*)uncompr);
- }
-
- gzclose(file);
-#endif
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
- Byte *compr;
- uLong comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
- uLong len = (uLong)strlen(hello)+1;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.next_out = compr;
-
- while (c_stream.total_in != len && c_stream.total_out < comprLen) {
- c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
- }
- /* Finish the stream, still forcing small buffers: */
- for (;;) {
- c_stream.avail_out = 1;
- err = deflate(&c_stream, Z_FINISH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "deflate");
- }
-
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- d_stream.next_in = compr;
- d_stream.avail_in = 0;
- d_stream.next_out = uncompr;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
- d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "inflate");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad inflate\n");
- exit(1);
- } else {
- printf("inflate(): %s\n", (char *)uncompr);
- }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_BEST_SPEED);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_out = compr;
- c_stream.avail_out = (uInt)comprLen;
-
- /* At this point, uncompr is still mostly zeroes, so it should compress
- * very well:
- */
- c_stream.next_in = uncompr;
- c_stream.avail_in = (uInt)uncomprLen;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
- if (c_stream.avail_in != 0) {
- fprintf(stderr, "deflate not greedy\n");
- exit(1);
- }
-
- /* Feed in already compressed data and switch to no compression: */
- deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
- c_stream.next_in = compr;
- c_stream.avail_in = (uInt)comprLen/2;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
-
- /* Switch back to compressing mode: */
- deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
- c_stream.next_in = uncompr;
- c_stream.avail_in = (uInt)uncomprLen;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- fprintf(stderr, "deflate should report Z_STREAM_END\n");
- exit(1);
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- d_stream.next_in = compr;
- d_stream.avail_in = (uInt)comprLen;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- for (;;) {
- d_stream.next_out = uncompr; /* discard the output */
- d_stream.avail_out = (uInt)uncomprLen;
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "large inflate");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
- fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
- exit(1);
- } else {
- printf("large_inflate(): OK\n");
- }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
- Byte *compr;
- uLong *comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
- uInt len = (uInt)strlen(hello)+1;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.next_out = compr;
- c_stream.avail_in = 3;
- c_stream.avail_out = (uInt)*comprLen;
- err = deflate(&c_stream, Z_FULL_FLUSH);
- CHECK_ERR(err, "deflate");
-
- compr[3]++; /* force an error in first compressed block */
- c_stream.avail_in = len - 3;
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- CHECK_ERR(err, "deflate");
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-
- *comprLen = c_stream.total_out;
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- d_stream.next_in = compr;
- d_stream.avail_in = 2; /* just read the zlib header */
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_out = uncompr;
- d_stream.avail_out = (uInt)uncomprLen;
-
- inflate(&d_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "inflate");
-
- d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */
- err = inflateSync(&d_stream); /* but skip the damaged part */
- CHECK_ERR(err, "inflateSync");
-
- err = inflate(&d_stream, Z_FINISH);
- if (err != Z_DATA_ERROR) {
- fprintf(stderr, "inflate should report DATA_ERROR\n");
- /* Because of incorrect adler32 */
- exit(1);
- }
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- printf("after inflateSync(): hel%s\n", (char *)uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
- Byte *compr;
- uLong comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- err = deflateSetDictionary(&c_stream,
- (const Bytef*)dictionary, sizeof(dictionary));
- CHECK_ERR(err, "deflateSetDictionary");
-
- dictId = c_stream.adler;
- c_stream.next_out = compr;
- c_stream.avail_out = (uInt)comprLen;
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.avail_in = (uInt)strlen(hello)+1;
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- fprintf(stderr, "deflate should report Z_STREAM_END\n");
- exit(1);
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- d_stream.next_in = compr;
- d_stream.avail_in = (uInt)comprLen;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_out = uncompr;
- d_stream.avail_out = (uInt)uncomprLen;
-
- for (;;) {
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- if (err == Z_NEED_DICT) {
- if (d_stream.adler != dictId) {
- fprintf(stderr, "unexpected dictionary");
- exit(1);
- }
- err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
- sizeof(dictionary));
- }
- CHECK_ERR(err, "inflate with dict");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad inflate with dict\n");
- exit(1);
- } else {
- printf("inflate with dictionary: %s\n", (char *)uncompr);
- }
-}
-
-/* ===========================================================================
- * Usage: example [output.gz [input.gz]]
- */
-
-int main(argc, argv)
- int argc;
- char *argv[];
-{
- Byte *compr, *uncompr;
- uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
- uLong uncomprLen = comprLen;
- static const char* myVersion = ZLIB_VERSION;
-
- if (zlibVersion()[0] != myVersion[0]) {
- fprintf(stderr, "incompatible zlib version\n");
- exit(1);
-
- } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
- fprintf(stderr, "warning: different zlib version\n");
- }
-
- printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
- ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
-
- compr = (Byte*)calloc((uInt)comprLen, 1);
- uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
- /* compr and uncompr are cleared to avoid reading uninitialized
- * data and to ensure that uncompr compresses well.
- */
- if (compr == Z_NULL || uncompr == Z_NULL) {
- printf("out of memory\n");
- exit(1);
- }
- test_compress(compr, comprLen, uncompr, uncomprLen);
-
- test_gzio((argc > 1 ? argv[1] : TESTFILE),
- uncompr, uncomprLen);
-
- test_deflate(compr, comprLen);
- test_inflate(compr, comprLen, uncompr, uncomprLen);
-
- test_large_deflate(compr, comprLen, uncompr, uncomprLen);
- test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
- test_flush(compr, &comprLen);
- test_sync(compr, comprLen, uncompr, uncomprLen);
- comprLen = uncomprLen;
-
- test_dict_deflate(compr, comprLen);
- test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
- free(compr);
- free(uncompr);
-
- return 0;
-}
diff --git a/erts/emulator/zlib/gzguts.h b/erts/emulator/zlib/gzguts.h
new file mode 100644
index 0000000000..d87659d031
--- /dev/null
+++ b/erts/emulator/zlib/gzguts.h
@@ -0,0 +1,209 @@
+/* gzguts.h -- zlib internal header definitions for gz* operations
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifdef _LARGEFILE64_SOURCE
+# ifndef _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE 1
+# endif
+# ifdef _FILE_OFFSET_BITS
+# undef _FILE_OFFSET_BITS
+# endif
+#endif
+
+#ifdef HAVE_HIDDEN
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
+
+#include <stdio.h>
+#include "zlib.h"
+#ifdef STDC
+# include <string.h>
+# include <stdlib.h>
+# include <limits.h>
+#endif
+#include <fcntl.h>
+
+#ifdef _WIN32
+# include <stddef.h>
+#endif
+
+#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
+# include <io.h>
+#endif
+
+#ifdef WINAPI_FAMILY
+# define open _open
+# define read _read
+# define write _write
+# define close _close
+#endif
+
+#ifdef NO_DEFLATE /* for compatibility with old definition */
+# define NO_GZCOMPRESS
+#endif
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+# ifdef VMS
+# define NO_vsnprintf
+# endif
+# ifdef __OS400__
+# define NO_vsnprintf
+# endif
+# ifdef __MVS__
+# define NO_vsnprintf
+# endif
+#endif
+
+/* unlike snprintf (which is required in C99, yet still not supported by
+ Microsoft more than a decade later!), _snprintf does not guarantee null
+ termination of the result -- however this is only used in gzlib.c where
+ the result is assured to fit in the space provided */
+#ifdef _MSC_VER
+# define snprintf _snprintf
+#endif
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+/* gz* functions always use library allocation functions */
+#ifndef STDC
+ extern voidp malloc OF((uInt size));
+ extern void free OF((voidpf ptr));
+#endif
+
+/* get errno and strerror definition */
+#if defined UNDER_CE
+# include <windows.h>
+# define zstrerror() gz_strwinerror((DWORD)GetLastError())
+#else
+# ifndef NO_STRERROR
+# include <errno.h>
+# define zstrerror() strerror(errno)
+# else
+# define zstrerror() "stdio error (consult errno)"
+# endif
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+#endif
+
+/* default memLevel */
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+
+/* default i/o buffer size -- double this for output when reading (this and
+ twice this must be able to fit in an unsigned type) */
+#define GZBUFSIZE 8192
+
+/* gzip modes, also provide a little integrity check on the passed structure */
+#define GZ_NONE 0
+#define GZ_READ 7247
+#define GZ_WRITE 31153
+#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */
+
+/* values for gz_state how */
+#define LOOK 0 /* look for a gzip header */
+#define COPY 1 /* copy input directly */
+#define GZIP 2 /* decompress a gzip stream */
+
+/* internal gzip file state data structure */
+typedef struct {
+ /* exposed contents for gzgetc() macro */
+ struct gzFile_s x; /* "x" for exposed */
+ /* x.have: number of bytes available at x.next */
+ /* x.next: next output data to deliver or write */
+ /* x.pos: current position in uncompressed data */
+ /* used for both reading and writing */
+ int mode; /* see gzip modes above */
+ int fd; /* file descriptor */
+ char *path; /* path or fd for error messages */
+ unsigned size; /* buffer size, zero if not allocated yet */
+ unsigned want; /* requested buffer size, default is GZBUFSIZE */
+ unsigned char *in; /* input buffer */
+ unsigned char *out; /* output buffer (double-sized when reading) */
+ int direct; /* 0 if processing gzip, 1 if transparent */
+ /* just for reading */
+ int how; /* 0: get header, 1: copy, 2: decompress */
+ z_off64_t start; /* where the gzip data started, for rewinding */
+ int eof; /* true if end of input file reached */
+ int past; /* true if read requested past end */
+ /* just for writing */
+ int level; /* compression level */
+ int strategy; /* compression strategy */
+ /* seek request */
+ z_off64_t skip; /* amount to skip (already rewound if backwards) */
+ int seek; /* true if seek request pending */
+ /* error information */
+ int err; /* error code */
+ char *msg; /* error message */
+ /* zlib inflate or deflate stream */
+ z_stream strm; /* stream structure in-place (not a pointer) */
+} gz_state;
+typedef gz_state FAR *gz_statep;
+
+/* shared functions */
+void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+#if defined UNDER_CE
+char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
+#endif
+
+/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
+ value -- needed when comparing unsigned to z_off64_t, which is signed
+ (possible z_off64_t types off_t, off64_t, and long are all signed) */
+#ifdef INT_MAX
+# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
+#else
+unsigned ZLIB_INTERNAL gz_intmax OF((void));
+# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
+#endif
diff --git a/erts/emulator/zlib/inffast.c b/erts/emulator/zlib/inffast.c
index eb81884888..5187743fde 100644
--- a/erts/emulator/zlib/inffast.c
+++ b/erts/emulator/zlib/inffast.c
@@ -1,10 +1,8 @@
/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -69,13 +67,13 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
-void inflate_fast(strm, start)
+void ZLIB_INTERNAL inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
+ z_const unsigned char FAR *in; /* local strm->next_in */
+ z_const unsigned char FAR *last; /* have enough input while in < last */
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
@@ -84,7 +82,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
+ unsigned wnext; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
@@ -92,7 +90,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
code const FAR *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
- code this; /* retrieved table entry */
+ code here; /* retrieved table entry */
unsigned op; /* code bits, operation, extra bits, or */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
@@ -111,7 +109,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
wsize = state->wsize;
whave = state->whave;
- write = state->write;
+ wnext = state->wnext;
window = state->window;
hold = state->hold;
bits = state->bits;
@@ -129,20 +127,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = lcode[hold & lmask];
+ here = lcode[hold & lmask];
dolen:
- op = (unsigned)(this.bits);
+ op = (unsigned)(here.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(here.op);
if (op == 0) { /* literal */
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- PUP(out) = (unsigned char)(this.val);
+ "inflate: literal 0x%02x\n", here.val));
+ PUP(out) = (unsigned char)(here.val);
}
else if (op & 16) { /* length base */
- len = (unsigned)(this.val);
+ len = (unsigned)(here.val);
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
@@ -160,14 +158,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = dcode[hold & dmask];
+ here = dcode[hold & dmask];
dodist:
- op = (unsigned)(this.bits);
+ op = (unsigned)(here.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(here.op);
if (op & 16) { /* distance base */
- dist = (unsigned)(this.val);
+ dist = (unsigned)(here.val);
op &= 15; /* number of extra bits */
if (bits < op) {
hold += (unsigned long)(PUP(in)) << bits;
@@ -192,12 +190,34 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
if (dist > op) { /* see if copy from window */
op = dist - op; /* distance back in window */
if (op > whave) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
+ if (state->sane) {
+ strm->msg =
+ (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ if (len <= op - whave) {
+ do {
+ PUP(out) = 0;
+ } while (--len);
+ continue;
+ }
+ len -= op - whave;
+ do {
+ PUP(out) = 0;
+ } while (--op > whave);
+ if (op == 0) {
+ from = out - dist;
+ do {
+ PUP(out) = PUP(from);
+ } while (--len);
+ continue;
+ }
+#endif
}
from = window - OFF;
- if (write == 0) { /* very common case */
+ if (wnext == 0) { /* very common case */
from += wsize - op;
if (op < len) { /* some from window */
len -= op;
@@ -207,17 +227,17 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
from = out - dist; /* rest from output */
}
}
- else if (write < op) { /* wrap around window */
- from += wsize + write - op;
- op -= write;
+ else if (wnext < op) { /* wrap around window */
+ from += wsize + wnext - op;
+ op -= wnext;
if (op < len) { /* some from end of window */
len -= op;
do {
PUP(out) = PUP(from);
} while (--op);
from = window - OFF;
- if (write < len) { /* some from start of window */
- op = write;
+ if (wnext < len) { /* some from start of window */
+ op = wnext;
len -= op;
do {
PUP(out) = PUP(from);
@@ -227,7 +247,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else { /* contiguous in window */
- from += write - op;
+ from += wnext - op;
if (op < len) { /* some from window */
len -= op;
do {
@@ -264,7 +284,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
- this = dcode[this.val + (hold & ((1U << op) - 1))];
+ here = dcode[here.val + (hold & ((1U << op) - 1))];
goto dodist;
}
else {
@@ -274,7 +294,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level length code */
- this = lcode[this.val + (hold & ((1U << op) - 1))];
+ here = lcode[here.val + (hold & ((1U << op) - 1))];
goto dolen;
}
else if (op & 32) { /* end-of-block */
@@ -310,7 +330,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- Using bit fields for code structure
- Different op definition to avoid & for extra bits (do & for table bits)
- - Three separate decoding do-loops for direct, window, and write == 0
+ - Three separate decoding do-loops for direct, window, and wnext == 0
- Special case for distance > 1 copies to do overlapped load and store copy
- Explicit branch predictions (based on measured branch probabilities)
- Deferring match copy and interspersed it with decoding subsequent codes
diff --git a/erts/emulator/zlib/inffast.h b/erts/emulator/zlib/inffast.h
index 623ed83c08..e5c1aa4ca8 100644
--- a/erts/emulator/zlib/inffast.h
+++ b/erts/emulator/zlib/inffast.h
@@ -1,13 +1,11 @@
/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2003, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
*/
-void inflate_fast OF((z_streamp strm, unsigned start));
+void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/erts/emulator/zlib/inffixed.h b/erts/emulator/zlib/inffixed.h
index 75ed4b5978..d628327769 100644
--- a/erts/emulator/zlib/inffixed.h
+++ b/erts/emulator/zlib/inffixed.h
@@ -2,9 +2,9 @@
* Generated automatically by makefixed().
*/
- /* WARNING: this file should *not* be used by applications. It
- is part of the implementation of the compression library and
- is subject to change. Applications should only use zlib.h.
+ /* WARNING: this file should *not* be used by applications.
+ It is part of the implementation of this library and is
+ subject to change. Applications should only use zlib.h.
*/
static const code lenfix[512] = {
diff --git a/erts/emulator/zlib/inflate.c b/erts/emulator/zlib/inflate.c
index 1764447c66..532330b06b 100644
--- a/erts/emulator/zlib/inflate.c
+++ b/erts/emulator/zlib/inflate.c
@@ -1,13 +1,8 @@
/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
/*
* Change history:
*
@@ -50,7 +45,7 @@
* - Rearrange window copies in inflate_fast() for speed and simplification
* - Unroll last copy for window match in inflate_fast()
* - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
+ * - Pull out common wnext == 0 case for speed in inflate_fast()
* - Make op and len in inflate_fast() unsigned for consistency
* - Add FAR to lcode and dcode declarations in inflate_fast()
* - Simplified bad distance check in inflate_fast()
@@ -85,6 +80,9 @@
* The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
@@ -98,14 +96,15 @@
/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
+local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
+ unsigned copy));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
+int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
@@ -114,36 +113,71 @@ z_streamp strm;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
- strm->adler = 1; /* to support ill-conceived Java test suite */
+ if (state->wrap) /* to support ill-conceived Java test suite */
+ strm->adler = state->wrap & 1;
state->mode = HEAD;
state->last = 0;
state->havedict = 0;
state->dmax = 32768U;
state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
- state->write = 0;
state->hold = 0;
state->bits = 0;
state->lencode = state->distcode = state->next = state->codes;
+ state->sane = 1;
+ state->back = -1;
Tracev((stderr, "inflate: reset\n"));
return Z_OK;
}
-int ZEXPORT inflatePrime(strm, bits, value)
+int ZEXPORT inflateReset(strm)
z_streamp strm;
-int bits;
-int value;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
- if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
- value &= (1L << bits) - 1;
- state->hold += value << state->bits;
- state->bits += bits;
- return Z_OK;
+ state->wsize = 0;
+ state->whave = 0;
+ state->wnext = 0;
+ return inflateResetKeep(strm);
+}
+
+int ZEXPORT inflateReset2(strm, windowBits)
+z_streamp strm;
+int windowBits;
+{
+ int wrap;
+ struct inflate_state FAR *state;
+
+ /* get the state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* extract wrap request from windowBits parameter */
+ if (windowBits < 0) {
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ wrap = (windowBits >> 4) + 1;
+#ifdef GUNZIP
+ if (windowBits < 48)
+ windowBits &= 15;
+#endif
+ }
+
+ /* set number of window bits, free window if different */
+ if (windowBits && (windowBits < 8 || windowBits > 15))
+ return Z_STREAM_ERROR;
+ if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
+ ZFREE(strm, state->window);
+ state->window = Z_NULL;
+ }
+
+ /* update state and reset the rest of it */
+ state->wrap = wrap;
+ state->wbits = (unsigned)windowBits;
+ return inflateReset(strm);
}
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
@@ -152,6 +186,7 @@ int windowBits;
const char *version;
int stream_size;
{
+ int ret;
struct inflate_state FAR *state;
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
@@ -160,33 +195,31 @@ int stream_size;
if (strm == Z_NULL) return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)
ZALLOC(strm, 1, sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: allocated\n"));
strm->state = (struct internal_state FAR *)state;
- if (windowBits < 0) {
- state->wrap = 0;
- windowBits = -windowBits;
- }
- else {
- state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
- if (windowBits < 48) windowBits &= 15;
-#endif
- }
- if (windowBits < 8 || windowBits > 15) {
+ state->window = Z_NULL;
+ ret = inflateReset2(strm, windowBits);
+ if (ret != Z_OK) {
ZFREE(strm, state);
strm->state = Z_NULL;
- return Z_STREAM_ERROR;
}
- state->wbits = (unsigned)windowBits;
- state->window = Z_NULL;
- return inflateReset(strm);
+ return ret;
}
int ZEXPORT inflateInit_(strm, version, stream_size)
@@ -197,6 +230,27 @@ int stream_size;
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
}
+int ZEXPORT inflatePrime(strm, bits, value)
+z_streamp strm;
+int bits;
+int value;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (bits < 0) {
+ state->hold = 0;
+ state->bits = 0;
+ return Z_OK;
+ }
+ if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
+ value &= (1L << bits) - 1;
+ state->hold += value << state->bits;
+ state->bits += bits;
+ return Z_OK;
+}
+
/*
Return state with length and distance decoding tables and index sizes set to
fixed code decoding. Normally this returns fixed tables from inffixed.h.
@@ -291,8 +345,8 @@ void makefixed()
low = 0;
for (;;) {
if ((low % 7) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
- state.lencode[low].val);
+ printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op,
+ state.lencode[low].bits, state.lencode[low].val);
if (++low == size) break;
putchar(',');
}
@@ -325,12 +379,13 @@ void makefixed()
output will fall in the output data, making match copies simpler and faster.
The advantage may be dependent on the size of the processor's data caches.
*/
-local int updatewindow(strm, out)
+local int updatewindow(strm, end, copy)
z_streamp strm;
-unsigned out;
+const Bytef *end;
+unsigned copy;
{
struct inflate_state FAR *state;
- unsigned copy, dist;
+ unsigned dist;
state = (struct inflate_state FAR *)strm->state;
@@ -345,30 +400,29 @@ unsigned out;
/* if window not in use yet, initialize */
if (state->wsize == 0) {
state->wsize = 1U << state->wbits;
- state->write = 0;
+ state->wnext = 0;
state->whave = 0;
}
/* copy state->wsize or less output bytes into the circular window */
- copy = out - strm->avail_out;
if (copy >= state->wsize) {
- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
- state->write = 0;
+ zmemcpy(state->window, end - state->wsize, state->wsize);
+ state->wnext = 0;
state->whave = state->wsize;
}
else {
- dist = state->wsize - state->write;
+ dist = state->wsize - state->wnext;
if (dist > copy) dist = copy;
- zmemcpy(state->window + state->write, strm->next_out - copy, dist);
+ zmemcpy(state->window + state->wnext, end - copy, dist);
copy -= dist;
if (copy) {
- zmemcpy(state->window, strm->next_out - copy, copy);
- state->write = copy;
+ zmemcpy(state->window, end - copy, copy);
+ state->wnext = copy;
state->whave = state->wsize;
}
else {
- state->write += dist;
- if (state->write == state->wsize) state->write = 0;
+ state->wnext += dist;
+ if (state->wnext == state->wsize) state->wnext = 0;
if (state->whave < state->wsize) state->whave += dist;
}
}
@@ -469,11 +523,6 @@ unsigned out;
bits -= bits & 7; \
} while (0)
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
- ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
- (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
/*
inflate() uses a state machine to process as much input data and generate as
much output data as possible before returning. The state machine is
@@ -561,7 +610,7 @@ z_streamp strm;
int flush;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -569,7 +618,7 @@ int flush;
unsigned in, out; /* save starting available input and output */
unsigned copy; /* number of stored or match bytes to copy */
unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
+ code here; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
int ret; /* return code */
@@ -624,7 +673,9 @@ int flush;
}
DROPBITS(4);
len = BITS(4) + 8;
- if (len > state->wbits) {
+ if (state->wbits == 0)
+ state->wbits = len;
+ else if (len > state->wbits) {
strm->msg = (char *)"invalid window size";
state->mode = BAD;
break;
@@ -765,7 +816,7 @@ int flush;
#endif
case DICTID:
NEEDBITS(32);
- strm->adler = state->check = REVERSE(hold);
+ strm->adler = state->check = ZSWAP32(hold);
INITBITS();
state->mode = DICT;
case DICT:
@@ -776,7 +827,7 @@ int flush;
strm->adler = state->check = adler32(0L, Z_NULL, 0);
state->mode = TYPE;
case TYPE:
- if (flush == Z_BLOCK) goto inf_leave;
+ if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
case TYPEDO:
if (state->last) {
BYTEBITS();
@@ -796,7 +847,11 @@ int flush;
fixedtables(state);
Tracev((stderr, "inflate: fixed codes block%s\n",
state->last ? " (last)" : ""));
- state->mode = LEN; /* decode codes */
+ state->mode = LEN_; /* decode codes */
+ if (flush == Z_TREES) {
+ DROPBITS(2);
+ goto inf_leave;
+ }
break;
case 2: /* dynamic block */
Tracev((stderr, "inflate: dynamic codes block%s\n",
@@ -821,6 +876,9 @@ int flush;
Tracev((stderr, "inflate: stored length %u\n",
state->length));
INITBITS();
+ state->mode = COPY_;
+ if (flush == Z_TREES) goto inf_leave;
+ case COPY_:
state->mode = COPY;
case COPY:
copy = state->length;
@@ -866,7 +924,7 @@ int flush;
while (state->have < 19)
state->lens[order[state->have++]] = 0;
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 7;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
@@ -881,19 +939,18 @@ int flush;
case CODELENS:
while (state->have < state->nlen + state->ndist) {
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
+ if (here.val < 16) {
+ DROPBITS(here.bits);
+ state->lens[state->have++] = here.val;
}
else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
+ if (here.val == 16) {
+ NEEDBITS(here.bits + 2);
+ DROPBITS(here.bits);
if (state->have == 0) {
strm->msg = (char *)"invalid bit length repeat";
state->mode = BAD;
@@ -903,16 +960,16 @@ int flush;
copy = 3 + BITS(2);
DROPBITS(2);
}
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
+ else if (here.val == 17) {
+ NEEDBITS(here.bits + 3);
+ DROPBITS(here.bits);
len = 0;
copy = 3 + BITS(3);
DROPBITS(3);
}
else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
+ NEEDBITS(here.bits + 7);
+ DROPBITS(here.bits);
len = 0;
copy = 11 + BITS(7);
DROPBITS(7);
@@ -930,9 +987,18 @@ int flush;
/* handle error breaks in while */
if (state->mode == BAD) break;
- /* build code tables */
+ /* check for end-of-block code (better have one) */
+ if (state->lens[256] == 0) {
+ strm->msg = (char *)"invalid code -- missing end-of-block";
+ state->mode = BAD;
+ break;
+ }
+
+ /* build code tables -- note: do not change the lenbits or distbits
+ values here (9 and 6) without reading the comments in inftrees.h
+ concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 9;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
@@ -941,7 +1007,7 @@ int flush;
state->mode = BAD;
break;
}
- state->distcode = (code const FAR *)(state->next);
+ state->distcode = (const code FAR *)(state->next);
state->distbits = 6;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
@@ -951,88 +1017,102 @@ int flush;
break;
}
Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN_;
+ if (flush == Z_TREES) goto inf_leave;
+ case LEN_:
state->mode = LEN;
case LEN:
if (have >= 6 && left >= 258) {
RESTORE();
inflate_fast(strm, out);
LOAD();
+ if (state->mode == TYPE)
+ state->back = -1;
break;
}
+ state->back = 0;
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
+ if (here.op && (here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->lencode[last.val +
+ here = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
+ state->back += last.bits;
}
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
- if ((int)(this.op) == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ DROPBITS(here.bits);
+ state->back += here.bits;
+ state->length = (unsigned)here.val;
+ if ((int)(here.op) == 0) {
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
+ "inflate: literal 0x%02x\n", here.val));
state->mode = LIT;
break;
}
- if (this.op & 32) {
+ if (here.op & 32) {
Tracevv((stderr, "inflate: end of block\n"));
+ state->back = -1;
state->mode = TYPE;
break;
}
- if (this.op & 64) {
+ if (here.op & 64) {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(here.op) & 15;
state->mode = LENEXT;
case LENEXT:
if (state->extra) {
NEEDBITS(state->extra);
state->length += BITS(state->extra);
DROPBITS(state->extra);
+ state->back += state->extra;
}
Tracevv((stderr, "inflate: length %u\n", state->length));
+ state->was = state->length;
state->mode = DIST;
case DIST:
for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if ((this.op & 0xf0) == 0) {
- last = this;
+ if ((here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->distcode[last.val +
+ here = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
+ state->back += last.bits;
}
- DROPBITS(this.bits);
- if (this.op & 64) {
+ DROPBITS(here.bits);
+ state->back += here.bits;
+ if (here.op & 64) {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
- state->offset = (unsigned)this.val;
- state->extra = (unsigned)(this.op) & 15;
+ state->offset = (unsigned)here.val;
+ state->extra = (unsigned)(here.op) & 15;
state->mode = DISTEXT;
case DISTEXT:
if (state->extra) {
NEEDBITS(state->extra);
state->offset += BITS(state->extra);
DROPBITS(state->extra);
+ state->back += state->extra;
}
#ifdef INFLATE_STRICT
if (state->offset > state->dmax) {
@@ -1041,11 +1121,6 @@ int flush;
break;
}
#endif
- if (state->offset > state->whave + out - left) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
Tracevv((stderr, "inflate: distance %u\n", state->offset));
state->mode = MATCH;
case MATCH:
@@ -1053,12 +1128,32 @@ int flush;
copy = out - left;
if (state->offset > copy) { /* copy from window */
copy = state->offset - copy;
- if (copy > state->write) {
- copy -= state->write;
+ if (copy > state->whave) {
+ if (state->sane) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ Trace((stderr, "inflate.c too far\n"));
+ copy -= state->whave;
+ if (copy > state->length) copy = state->length;
+ if (copy > left) copy = left;
+ left -= copy;
+ state->length -= copy;
+ do {
+ *put++ = 0;
+ } while (--copy);
+ if (state->length == 0) state->mode = LEN;
+ break;
+#endif
+ }
+ if (copy > state->wnext) {
+ copy -= state->wnext;
from = state->window + (state->wsize - copy);
}
else
- from = state->window + (state->write - copy);
+ from = state->window + (state->wnext - copy);
if (copy > state->length) copy = state->length;
}
else { /* copy from output */
@@ -1093,7 +1188,7 @@ int flush;
#ifdef GUNZIP
state->flags ? hold :
#endif
- REVERSE(hold)) != state->check) {
+ ZSWAP32(hold)) != state->check) {
strm->msg = (char *)"incorrect data check";
state->mode = BAD;
break;
@@ -1137,8 +1232,9 @@ int flush;
*/
inf_leave:
RESTORE();
- if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
- if (updatewindow(strm, out)) {
+ if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
+ (state->mode < CHECK || flush != Z_FINISH)))
+ if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
state->mode = MEM;
return Z_MEM_ERROR;
}
@@ -1151,7 +1247,8 @@ int flush;
strm->adler = state->check =
UPDATE(state->check, strm->next_out - out, out);
strm->data_type = state->bits + (state->last ? 64 : 0) +
- (state->mode == TYPE ? 128 : 0);
+ (state->mode == TYPE ? 128 : 0) +
+ (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
ret = Z_BUF_ERROR;
return ret;
@@ -1171,13 +1268,37 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
+z_streamp strm;
+Bytef *dictionary;
+uInt *dictLength;
+{
+ struct inflate_state FAR *state;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* copy dictionary */
+ if (state->whave && dictionary != Z_NULL) {
+ zmemcpy(dictionary, state->window + state->wnext,
+ state->whave - state->wnext);
+ zmemcpy(dictionary + state->whave - state->wnext,
+ state->window, state->wnext);
+ }
+ if (dictLength != Z_NULL)
+ *dictLength = state->whave;
+ return Z_OK;
+}
+
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
z_streamp strm;
const Bytef *dictionary;
uInt dictLength;
{
struct inflate_state FAR *state;
- unsigned long id;
+ unsigned long dictid;
+ int ret;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
@@ -1185,29 +1306,21 @@ uInt dictLength;
if (state->wrap != 0 && state->mode != DICT)
return Z_STREAM_ERROR;
- /* check for correct dictionary id */
+ /* check for correct dictionary identifier */
if (state->mode == DICT) {
- id = adler32(0L, Z_NULL, 0);
- id = adler32(id, dictionary, dictLength);
- if (id != state->check)
+ dictid = adler32(0L, Z_NULL, 0);
+ dictid = adler32(dictid, dictionary, dictLength);
+ if (dictid != state->check)
return Z_DATA_ERROR;
}
- /* copy dictionary to window */
- if (updatewindow(strm, strm->avail_out)) {
+ /* copy dictionary to window using updatewindow(), which will amend the
+ existing dictionary if appropriate */
+ ret = updatewindow(strm, dictionary + dictLength, dictLength);
+ if (ret) {
state->mode = MEM;
return Z_MEM_ERROR;
}
- if (dictLength > state->wsize) {
- zmemcpy(state->window, dictionary + dictLength - state->wsize,
- state->wsize);
- state->whave = state->wsize;
- }
- else {
- zmemcpy(state->window + state->wsize - dictLength, dictionary,
- dictLength);
- state->whave = dictLength;
- }
state->havedict = 1;
Tracev((stderr, "inflate: dictionary set\n"));
return Z_OK;
@@ -1243,7 +1356,7 @@ gz_headerp head;
*/
local unsigned syncsearch(have, buf, len)
unsigned FAR *have;
-unsigned char FAR *buf;
+const unsigned char FAR *buf;
unsigned len;
{
unsigned got;
@@ -1355,8 +1468,8 @@ z_streamp source;
}
/* copy state */
- zmemcpy(dest, source, sizeof(z_stream));
- zmemcpy(copy, state, sizeof(struct inflate_state));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
+ zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
if (state->lencode >= state->codes &&
state->lencode <= state->codes + ENOUGH - 1) {
copy->lencode = copy->codes + (state->lencode - state->codes);
@@ -1371,3 +1484,32 @@ z_streamp source;
dest->state = (struct internal_state FAR *)copy;
return Z_OK;
}
+
+int ZEXPORT inflateUndermine(strm, subvert)
+z_streamp strm;
+int subvert;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ state->sane = !subvert;
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ return Z_OK;
+#else
+ state->sane = 1;
+ return Z_DATA_ERROR;
+#endif
+}
+
+long ZEXPORT inflateMark(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
+ state = (struct inflate_state FAR *)strm->state;
+ return ((long)(state->back) << 16) +
+ (state->mode == COPY ? state->length :
+ (state->mode == MATCH ? state->was - state->length : 0));
+}
diff --git a/erts/emulator/zlib/inflate.h b/erts/emulator/zlib/inflate.h
index 59164091c5..95f4986d40 100644
--- a/erts/emulator/zlib/inflate.h
+++ b/erts/emulator/zlib/inflate.h
@@ -1,10 +1,8 @@
/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2009 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
@@ -34,11 +32,13 @@ typedef enum {
TYPE, /* i: waiting for type bits, including last-flag bit */
TYPEDO, /* i: same, but skip check to exit inflate on new block */
STORED, /* i: waiting for stored size (length and complement) */
+ COPY_, /* i/o: same as COPY below, but only first time in */
COPY, /* i/o: waiting for input or output to copy stored block */
TABLE, /* i: waiting for dynamic block table lengths */
LENLENS, /* i: waiting for code length code lengths */
CODELENS, /* i: waiting for length/lit and distance code lengths */
- LEN, /* i: waiting for length/lit code */
+ LEN_, /* i: same as LEN below, but only first time in */
+ LEN, /* i: waiting for length/lit/eob code */
LENEXT, /* i: waiting for length extra bits */
DIST, /* i: waiting for distance code */
DISTEXT, /* i: waiting for distance extra bits */
@@ -55,19 +55,21 @@ typedef enum {
/*
State transitions between above modes -
- (most modes can go to the BAD or MEM mode -- not shown for clarity)
+ (most modes can go to BAD or MEM on error -- not shown for clarity)
Process header:
- HEAD -> (gzip) or (zlib)
- (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
- NAME -> COMMENT -> HCRC -> TYPE
+ HEAD -> (gzip) or (zlib) or (raw)
+ (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
+ HCRC -> TYPE
(zlib) -> DICTID or TYPE
DICTID -> DICT -> TYPE
+ (raw) -> TYPEDO
Read deflate blocks:
- TYPE -> STORED or TABLE or LEN or CHECK
- STORED -> COPY -> TYPE
- TABLE -> LENLENS -> CODELENS -> LEN
- Read deflate codes:
+ TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
+ STORED -> COPY_ -> COPY -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN_
+ LEN_ -> LEN
+ Read deflate codes in fixed or dynamic block:
LEN -> LENEXT or LIT or TYPE
LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
LIT -> LEN
@@ -75,7 +77,7 @@ typedef enum {
CHECK -> LENGTH -> DONE
*/
-/* state maintained between inflate() calls. Approximately 7K bytes. */
+/* state maintained between inflate() calls. Approximately 10K bytes. */
struct inflate_state {
inflate_mode mode; /* current inflate mode */
int last; /* true if processing last block */
@@ -90,7 +92,7 @@ struct inflate_state {
unsigned wbits; /* log base 2 of requested window size */
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
+ unsigned wnext; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if needed */
/* bit accumulator */
unsigned long hold; /* input bit accumulator */
@@ -114,4 +116,7 @@ struct inflate_state {
unsigned short lens[320]; /* temporary storage for code lengths */
unsigned short work[288]; /* work area for code table building */
code codes[ENOUGH]; /* space for code tables */
+ int sane; /* if false, allow invalid distance too far */
+ int back; /* bits back of last unprocessed length/lit */
+ unsigned was; /* initial length of match */
};
diff --git a/erts/emulator/zlib/inftrees.c b/erts/emulator/zlib/inftrees.c
index 832fe28668..3766fa2646 100644
--- a/erts/emulator/zlib/inftrees.c
+++ b/erts/emulator/zlib/inftrees.c
@@ -1,10 +1,8 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -14,7 +12,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
+ " inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -34,7 +32,7 @@ const char inflate_copyright[] =
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
*/
-int inflate_table(type, lens, codes, table, bits, work)
+int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
codetype type;
unsigned short FAR *lens;
unsigned codes;
@@ -55,7 +53,7 @@ unsigned short FAR *work;
unsigned fill; /* index for replicating entries */
unsigned low; /* low bits for current root entry */
unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
+ code here; /* table entry for duplication */
code FAR *next; /* next available space in table */
const unsigned short FAR *base; /* base value table to use */
const unsigned short FAR *extra; /* extra bits table to use */
@@ -67,7 +65,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -120,15 +118,15 @@ unsigned short FAR *work;
if (count[max] != 0) break;
if (root > max) root = max;
if (max == 0) { /* no symbols to code at all */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)1;
- this.val = (unsigned short)0;
- *(*table)++ = this; /* make a table to force an error */
- *(*table)++ = this;
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)1;
+ here.val = (unsigned short)0;
+ *(*table)++ = here; /* make a table to force an error */
+ *(*table)++ = here;
*bits = 1;
return 0; /* no symbols, but wait for decoding to report error */
}
- for (min = 1; min <= MAXBITS; min++)
+ for (min = 1; min < max; min++)
if (count[min] != 0) break;
if (root < min) root = min;
@@ -171,11 +169,10 @@ unsigned short FAR *work;
entered in the tables.
used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked when a LENS table is being made
- against the space in *table, ENOUGH, minus the maximum space needed by
- the worst case distance code, MAXD. This should never happen, but the
- sufficiency of ENOUGH has not been proven exhaustively, hence the check.
- This assumes that when type == LENS, bits == 9.
+ provided *table space. It is checked for LENS and DIST tables against
+ the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+ the initial root table size constants. See the comments in inftrees.h
+ for more information.
sym increments through all symbols, and the loop terminates when
all codes of length max, i.e. all codes, have been processed. This
@@ -214,24 +211,25 @@ unsigned short FAR *work;
mask = used - 1; /* mask for comparing low */
/* check available table space */
- if (type == LENS && used >= ENOUGH - MAXD)
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* process all codes and make table entries */
for (;;) {
/* create table entry */
- this.bits = (unsigned char)(len - drop);
+ here.bits = (unsigned char)(len - drop);
if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
+ here.op = (unsigned char)0;
+ here.val = work[sym];
}
else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
+ here.op = (unsigned char)(extra[work[sym]]);
+ here.val = base[work[sym]];
}
else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
+ here.op = (unsigned char)(32 + 64); /* end of block */
+ here.val = 0;
}
/* replicate for those indices with low len bits equal to huff */
@@ -240,7 +238,7 @@ unsigned short FAR *work;
min = fill; /* save offset to next table */
do {
fill -= incr;
- next[(huff >> drop) + fill] = this;
+ next[(huff >> drop) + fill] = here;
} while (fill != 0);
/* backwards increment the len-bit code huff */
@@ -282,7 +280,8 @@ unsigned short FAR *work;
/* check for enough space */
used += 1U << curr;
- if (type == LENS && used >= ENOUGH - MAXD)
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* point entry in root table to sub-table */
@@ -293,38 +292,14 @@ unsigned short FAR *work;
}
}
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- this.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = this;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
+ /* fill in remaining table entry if code is incomplete (guaranteed to have
+ at most one remaining entry, since if the code is incomplete, the
+ maximum code length that was allowed to get this far is one bit) */
+ if (huff != 0) {
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)(len - drop);
+ here.val = (unsigned short)0;
+ next[huff] = here;
}
/* set return parameters */
diff --git a/erts/emulator/zlib/inftrees.h b/erts/emulator/zlib/inftrees.h
index 808100f70a..baa53a0b1a 100644
--- a/erts/emulator/zlib/inftrees.h
+++ b/erts/emulator/zlib/inftrees.h
@@ -1,10 +1,8 @@
/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2005, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
@@ -37,21 +35,28 @@ typedef struct {
01000000 - invalid code
*/
-/* Maximum size of dynamic tree. The maximum found in a long but non-
- exhaustive search was 1444 code structures (852 for length/literals
- and 592 for distances, the latter actually the result of an
- exhaustive search). The true maximum is not known, but the value
- below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
+/* Maximum size of the dynamic table. The maximum number of code structures is
+ 1444, which is the sum of 852 for literal/length codes and 592 for distance
+ codes. These values were found by exhaustive searches using the program
+ examples/enough.c found in the zlib distribtution. The arguments to that
+ program are the number of symbols, the initial root table size, and the
+ maximum bit length of a code. "enough 286 9 15" for literal/length codes
+ returns returns 852, and "enough 30 6 15" for distance codes returns 592.
+ The initial root table size (9 or 6) is found in the fifth argument of the
+ inflate_table() calls in inflate.c and infback.c. If the root table size is
+ changed, then these maximum sizes would be need to be recalculated and
+ updated. */
+#define ENOUGH_LENS 852
+#define ENOUGH_DISTS 592
+#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
-/* Type of code to build for inftable() */
+/* Type of code to build for inflate_table() */
typedef enum {
CODES,
LENS,
DISTS
} codetype;
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
+int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
unsigned codes, code FAR * FAR *table,
unsigned FAR *bits, unsigned short FAR *work));
diff --git a/erts/emulator/zlib/trees.c b/erts/emulator/zlib/trees.c
index 7d9f77f451..465e944e5b 100644
--- a/erts/emulator/zlib/trees.c
+++ b/erts/emulator/zlib/trees.c
@@ -1,10 +1,9 @@
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2005 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
+ * detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/*
* ALGORITHM
*
@@ -78,11 +77,6 @@ local const uch bl_order[BL_CODES]
* probability, to avoid transmitting the lengths for unused bit length codes.
*/
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
/* ===========================================================================
* Local data. These are initialized only once.
*/
@@ -155,9 +149,9 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
local int build_bl_tree OF((deflate_state *s));
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
-local void set_data_type OF((deflate_state *s));
+local void compress_block OF((deflate_state *s, const ct_data *ltree,
+ const ct_data *dtree));
+local int detect_data_type OF((deflate_state *s));
local unsigned bi_reverse OF((unsigned value, int length));
local void bi_windup OF((deflate_state *s));
local void bi_flush OF((deflate_state *s));
@@ -208,12 +202,12 @@ local void send_bits(s, value, length)
* unused bits in value.
*/
if (s->bi_valid > (int)Buf_size - length) {
- s->bi_buf |= (value << s->bi_valid);
+ s->bi_buf |= (ush)value << s->bi_valid;
put_short(s, s->bi_buf);
s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
s->bi_valid += length - Buf_size;
} else {
- s->bi_buf |= value << s->bi_valid;
+ s->bi_buf |= (ush)value << s->bi_valid;
s->bi_valid += length;
}
}
@@ -223,12 +217,12 @@ local void send_bits(s, value, length)
{ int len = length;\
if (s->bi_valid > (int)Buf_size - len) {\
int val = value;\
- s->bi_buf |= (val << s->bi_valid);\
+ s->bi_buf |= (ush)val << s->bi_valid;\
put_short(s, s->bi_buf);\
s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
s->bi_valid += len - Buf_size;\
} else {\
- s->bi_buf |= (value) << s->bi_valid;\
+ s->bi_buf |= (ush)(value) << s->bi_valid;\
s->bi_valid += len;\
}\
}
@@ -255,11 +249,13 @@ local void tr_static_init()
if (static_init_done) return;
/* For some embedded targets, global variables are not initialized: */
+#ifdef NO_INIT_GLOBAL_POINTERS
static_l_desc.static_tree = static_ltree;
static_l_desc.extra_bits = extra_lbits;
static_d_desc.static_tree = static_dtree;
static_d_desc.extra_bits = extra_dbits;
static_bl_desc.extra_bits = extra_blbits;
+#endif
/* Initialize the mapping length (0..255) -> length code (0..28) */
length = 0;
@@ -353,13 +349,14 @@ void gen_trees_header()
static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
}
- fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
+ fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
for (i = 0; i < DIST_CODE_LEN; i++) {
fprintf(header, "%2u%s", _dist_code[i],
SEPARATOR(i, DIST_CODE_LEN-1, 20));
}
- fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
+ fprintf(header,
+ "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
fprintf(header, "%2u%s", _length_code[i],
SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
@@ -384,7 +381,7 @@ void gen_trees_header()
/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
*/
-void _tr_init(s)
+void ZLIB_INTERNAL _tr_init(s)
deflate_state *s;
{
tr_static_init();
@@ -400,7 +397,6 @@ void _tr_init(s)
s->bi_buf = 0;
s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
#ifdef DEBUG
s->compressed_len = 0L;
s->bits_sent = 0L;
@@ -869,13 +865,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
/* ===========================================================================
* Send a stored block
*/
-void _tr_stored_block(s, buf, stored_len, eof)
+void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
deflate_state *s;
charf *buf; /* input block */
ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+ int last; /* one if this is the last block for a file */
{
- send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
+ send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */
#ifdef DEBUG
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
s->compressed_len += (stored_len + 4) << 3;
@@ -884,17 +880,19 @@ void _tr_stored_block(s, buf, stored_len, eof)
}
/* ===========================================================================
+ * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
+ */
+void ZLIB_INTERNAL _tr_flush_bits(s)
+ deflate_state *s;
+{
+ bi_flush(s);
+}
+
+/* ===========================================================================
* Send one empty static block to give enough lookahead for inflate.
* This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
*/
-void _tr_align(s)
+void ZLIB_INTERNAL _tr_align(s)
deflate_state *s;
{
send_bits(s, STATIC_TREES<<1, 3);
@@ -903,31 +901,17 @@ void _tr_align(s)
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
bi_flush(s);
- /* Of the 10 bits for the empty block, we have already sent
- * (10 - bi_valid) bits. The lookahead for the last real code (before
- * the EOB of the previous block) was thus at least one plus the length
- * of the EOB plus what we have just sent of the empty static block.
- */
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L;
-#endif
- bi_flush(s);
- }
- s->last_eob_len = 7;
}
/* ===========================================================================
* Determine the best encoding for the current block: dynamic trees, static
* trees or store, and output the encoded block to the zip file.
*/
-void _tr_flush_block(s, buf, stored_len, eof)
+void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
deflate_state *s;
charf *buf; /* input block, or NULL if too old */
ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+ int last; /* one if this is the last block for a file */
{
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
int max_blindex = 0; /* index of last bit length code of non zero freq */
@@ -936,8 +920,8 @@ void _tr_flush_block(s, buf, stored_len, eof)
if (s->level > 0) {
/* Check if the file is binary or text */
- if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
- set_data_type(s);
+ if (s->strm->data_type == Z_UNKNOWN)
+ s->strm->data_type = detect_data_type(s);
/* Construct the literal and distance trees */
build_tree(s, (tree_desc *)(&(s->l_desc)));
@@ -983,23 +967,25 @@ void _tr_flush_block(s, buf, stored_len, eof)
* successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
* transform a block into a stored block.
*/
- _tr_stored_block(s, buf, stored_len, eof);
+ _tr_stored_block(s, buf, stored_len, last);
#ifdef FORCE_STATIC
} else if (static_lenb >= 0) { /* force static trees */
#else
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
#endif
- send_bits(s, (STATIC_TREES<<1)+eof, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+ send_bits(s, (STATIC_TREES<<1)+last, 3);
+ compress_block(s, (const ct_data *)static_ltree,
+ (const ct_data *)static_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->static_len;
#endif
} else {
- send_bits(s, (DYN_TREES<<1)+eof, 3);
+ send_bits(s, (DYN_TREES<<1)+last, 3);
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+ compress_block(s, (const ct_data *)s->dyn_ltree,
+ (const ct_data *)s->dyn_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->opt_len;
#endif
@@ -1010,21 +996,21 @@ void _tr_flush_block(s, buf, stored_len, eof)
*/
init_block(s);
- if (eof) {
+ if (last) {
bi_windup(s);
#ifdef DEBUG
s->compressed_len += 7; /* align on byte boundary */
#endif
}
Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- s->compressed_len-7*eof));
+ s->compressed_len-7*last));
}
/* ===========================================================================
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
*/
-int _tr_tally (s, dist, lc)
+int ZLIB_INTERNAL _tr_tally (s, dist, lc)
deflate_state *s;
unsigned dist; /* distance of matched string */
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
@@ -1076,8 +1062,8 @@ int _tr_tally (s, dist, lc)
*/
local void compress_block(s, ltree, dtree)
deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
+ const ct_data *ltree; /* literal tree */
+ const ct_data *dtree; /* distance tree */
{
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
@@ -1119,28 +1105,48 @@ local void compress_block(s, ltree, dtree)
} while (lx < s->last_lit);
send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
}
/* ===========================================================================
- * Set the data type to BINARY or TEXT, using a crude approximation:
- * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
- * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ * a) There are no non-portable control characters belonging to the
+ * "black list" (0..6, 14..25, 28..31).
+ * b) There is at least one printable character belonging to the
+ * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ * "gray list" that is ignored in this detection algorithm:
+ * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
* IN assertion: the fields Freq of dyn_ltree are set.
*/
-local void set_data_type(s)
+local int detect_data_type(s)
deflate_state *s;
{
+ /* black_mask is the bit mask of black-listed bytes
+ * set bits 0..6, 14..25, and 28..31
+ * 0xf3ffc07f = binary 11110011111111111100000001111111
+ */
+ unsigned long black_mask = 0xf3ffc07fUL;
int n;
- for (n = 0; n < 9; n++)
+ /* Check for non-textual ("black-listed") bytes. */
+ for (n = 0; n <= 31; n++, black_mask >>= 1)
+ if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
+ return Z_BINARY;
+
+ /* Check for textual ("white-listed") bytes. */
+ if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
+ || s->dyn_ltree[13].Freq != 0)
+ return Z_TEXT;
+ for (n = 32; n < LITERALS; n++)
if (s->dyn_ltree[n].Freq != 0)
- break;
- if (n == 9)
- for (n = 14; n < 32; n++)
- if (s->dyn_ltree[n].Freq != 0)
- break;
- s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
+ return Z_TEXT;
+
+ /* There are no "black-listed" or "white-listed" bytes:
+ * this stream either is empty or has tolerated ("gray-listed") bytes only.
+ */
+ return Z_BINARY;
}
/* ===========================================================================
@@ -1206,7 +1212,6 @@ local void copy_block(s, buf, len, header)
int header; /* true if block header must be written */
{
bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
if (header) {
put_short(s, (ush)len);
diff --git a/erts/emulator/zlib/trees.h b/erts/emulator/zlib/trees.h
index 72facf900f..d35639d82a 100644
--- a/erts/emulator/zlib/trees.h
+++ b/erts/emulator/zlib/trees.h
@@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = {
{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
};
-const uch _dist_code[DIST_CODE_LEN] = {
+const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = {
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
};
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
+const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
diff --git a/erts/emulator/zlib/uncompr.c b/erts/emulator/zlib/uncompr.c
index cbc93cb1eb..864d571719 100644
--- a/erts/emulator/zlib/uncompr.c
+++ b/erts/emulator/zlib/uncompr.c
@@ -1,10 +1,8 @@
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
#ifdef HAVE_CONFIG_H
@@ -21,8 +19,6 @@
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -37,7 +33,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
/* Check for source > 64K on 16-bit machine: */
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
diff --git a/erts/emulator/zlib/zconf.h b/erts/emulator/zlib/zconf.h
index b7979d48d3..9987a77553 100644
--- a/erts/emulator/zlib/zconf.h
+++ b/erts/emulator/zlib/zconf.h
@@ -1,10 +1,8 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
#ifndef ZCONF_H
@@ -13,52 +11,145 @@
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
*/
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+# define Z_PREFIX_SET
+
+/* all linked symbols */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_bits z__tr_flush_bits
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# ifndef Z_SOLO
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# endif
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
+# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
+# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateResetKeep z_deflateResetKeep
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# ifndef Z_SOLO
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgetc_ z_gzgetc_
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# ifdef _WIN32
+# define gzopen_w z_gzopen_w
+# endif
+# define gzprintf z_gzprintf
+# define gzvprintf z_gzvprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# endif
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
+# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
+# define inflateUndermine z_inflateUndermine
+# define inflateResetKeep z_inflateResetKeep
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
+# ifndef Z_SOLO
+# define uncompress z_uncompress
+# endif
# define zError z_zError
+# ifndef Z_SOLO
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# endif
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
# define alloc_func z_alloc_func
+# define charf z_charf
# define free_func z_free_func
+# ifndef Z_SOLO
+# define gzFile z_gzFile
+# endif
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
# define in_func z_in_func
+# define intf z_intf
# define out_func z_out_func
-# define Byte z_Byte
# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
# define uIntf z_uIntf
+# define uLong z_uLong
# define uLongf z_uLongf
-# define voidpf z_voidpf
# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
@@ -127,6 +218,12 @@
# endif
#endif
+#if defined(ZLIB_CONST) && !defined(z_const)
+# define z_const const
+#else
+# define z_const
+#endif
+
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
@@ -173,6 +270,14 @@
# endif
#endif
+#ifndef Z_ARG /* function prototypes for stdarg */
+# if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# define Z_ARG(args) args
+# else
+# define Z_ARG(args) ()
+# endif
+#endif
+
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
@@ -286,49 +391,121 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+# include <limits.h>
+# if (UINT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned
+# elif (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
+# endif
+#endif
+
+#ifdef Z_U4
+ typedef Z_U4 z_crc_t;
+#else
+ typedef unsigned long z_crc_t;
+#endif
+
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_STDARG_H
+#endif
+
+#ifdef STDC
+# ifndef Z_SOLO
+# include <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
# endif
-# define z_off_t off_t
#endif
-#ifndef SEEK_SET
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* for wchar_t */
+# endif
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+# define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
+# endif
+#endif
+
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+# define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+# define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+# define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
+
#ifndef z_off_t
# define z_off_t long
#endif
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
+#if !defined(_WIN32) && defined(Z_LARGE64)
+# define z_off64_t off64_t
+#else
+# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+# define z_off64_t __int64
+# else
+# define z_off64_t z_off_t
# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
diff --git a/erts/emulator/zlib/zlib.h b/erts/emulator/zlib/zlib.h
index 9209774383..3e0c7672ac 100644
--- a/erts/emulator/zlib/zlib.h
+++ b/erts/emulator/zlib/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.3, July 18th, 2005
+ version 1.2.8, April 28th, 2013
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -24,12 +24,10 @@
The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
-/* %ExternalCopyright% */
-
#ifndef ZLIB_H
#define ZLIB_H
@@ -39,41 +37,44 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
+#define ZLIB_VERSION "1.2.8"
+#define ZLIB_VERNUM 0x1280
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 8
+#define ZLIB_VER_SUBREVISION 0
/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed data.
+ This version of the library supports only one compression method (deflation)
+ but other algorithms will be added later and will have the same stream
+ interface.
+
+ Compression can be done in a single step if the buffers are large enough,
+ or can be done by repeated calls of the compression function. In the latter
+ case, the application must provide more input and/or consume the output
(providing more output space) before each call.
- The compressed data format used by default by the in-memory functions is
+ The compressed data format used by default by the in-memory functions is
the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
around a deflate stream, which is itself documented in RFC 1951.
- The library also supports reading and writing files in gzip (.gz) format
+ The library also supports reading and writing files in gzip (.gz) format
with an interface similar to that of stdio using the functions that start
with "gz". The gzip format is different from the zlib format. gzip is a
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
- This library can optionally read and write gzip streams in memory as well.
+ This library can optionally read and write gzip streams in memory as well.
- The zlib format was designed to be compact and fast for use in memory
+ The zlib format was designed to be compact and fast for use in memory
and on communications channels. The gzip format was designed for single-
file compression on file systems, has a larger header than zlib to maintain
directory information, and uses a different, slower check method than zlib.
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never crash
+ even in case of corrupted input.
*/
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
@@ -82,15 +83,15 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
struct internal_state;
typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
+ z_const Bytef *next_in; /* next input byte */
uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
+ uLong total_in; /* total number of input bytes read so far */
Bytef *next_out; /* next output byte should be put there */
uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
+ uLong total_out; /* total number of bytes output so far */
- char *msg; /* last error message, NULL if no error */
+ z_const char *msg; /* last error message, NULL if no error */
struct internal_state FAR *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
@@ -128,45 +129,45 @@ typedef struct gz_header_s {
typedef gz_header FAR *gz_headerp;
/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
+ The application must update next_in and avail_in when avail_in has dropped
+ to zero. It must update next_out and avail_out when avail_out has dropped
+ to zero. The application must initialize zalloc, zfree and opaque before
+ calling the init function. All other fields are set by the compression
+ library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
opaque value.
- zalloc must return Z_NULL if there is not enough memory for the object.
+ zalloc must return Z_NULL if there is not enough memory for the object.
If zlib is used in a multi-threaded application, zalloc and zfree must be
thread safe.
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this if
+ the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers
+ returned by zalloc for objects of exactly 65536 bytes *must* have their
+ offset normalized to zero. The default allocation function provided by this
+ library ensures this (see zutil.c). To reduce memory requirements and avoid
+ any allocation of 64K objects, at the expense of compression ratio, compile
+ the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or progress
+ reports. After compression, total_in holds the total size of the
+ uncompressed data and may be saved for use in the decompressor (particularly
+ if the decompressor wants to decompress everything in a single step).
*/
/* constants */
#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_PARTIAL_FLUSH 1
#define Z_SYNC_FLUSH 2
#define Z_FULL_FLUSH 3
#define Z_FINISH 4
#define Z_BLOCK 5
+#define Z_TREES 6
/* Allowed flush values; see deflate() and inflate() below for details */
#define Z_OK 0
@@ -178,8 +179,8 @@ typedef gz_header FAR *gz_headerp;
#define Z_MEM_ERROR (-4)
#define Z_BUF_ERROR (-5)
#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
*/
#define Z_NO_COMPRESSION 0
@@ -209,119 +210,141 @@ typedef gz_header FAR *gz_headerp;
#define zlib_version zlibVersion()
/* for compatibility with versions < 1.0.2 */
+
/* basic functions */
ZEXTERN const char * ZEXPORT zlibVersion OF((void));
/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
+ If the first character differs, the library code actually used is not
+ compatible with the zlib.h header file used by the application. This check
+ is automatically made by deflateInit and inflateInit.
*/
/*
ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller. If
+ zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+ allocation functions.
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at all
+ (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
+ requests a default compromise between speed and compression (currently
+ equivalent to level 6).
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if level is not a valid compression level, or
Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
+ with the version assumed by the caller (ZLIB_VERSION). msg is set to null
+ if there is no error message. deflateInit does not perform any compression:
+ this will be done by deflate().
*/
ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
/*
deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
forced to flush.
- The detailed semantics are as follows. deflate performs one or both of the
+ The detailed semantics are as follows. deflate performs one or both of the
following actions:
- Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
+ accordingly. If not all input can be processed (because there is not
enough room in the output buffer), next_in and avail_in are updated and
processing will resume at this point for the next call of deflate().
- Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
+ accordingly. This action is forced if the parameter flush is non zero.
Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
+ should be set only when necessary (in interactive applications). Some
+ output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating avail_in or avail_out accordingly; avail_out should
+ never be zero before the call. The application can consume the compressed
+ output when it wants, for example when the output buffer is full (avail_out
+ == 0), or after each call of deflate(). If deflate returns Z_OK and with
+ zero avail_out, it must be called again after making room in the output
+ buffer because there might be more output pending.
Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
- decide how much data to accumualte before producing output, in order to
+ decide how much data to accumulate before producing output, in order to
maximize compression.
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
+ that the decompressor can get all input data available so far. (In
+ particular avail_in is zero after the call if enough output space has been
+ provided before the call.) Flushing may degrade compression for some
+ compression algorithms and so it should be used only when necessary. This
+ completes the current deflate block and follows it with an empty stored block
+ that is three bits plus filler bits to the next byte, followed by four bytes
+ (00 00 ff ff).
+
+ If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+ output buffer, but the output is not aligned to a byte boundary. All of the
+ input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+ This completes the current deflate block and follows it with an empty fixed
+ codes block that is 10 bits long. This assures that enough bytes are output
+ in order for the decompressor to finish the block before the empty fixed code
+ block.
+
+ If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+ for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+ seven bits of the current block are held to be written as the next byte after
+ the next deflate block is completed. In this case, the decompressor may not
+ be provided enough bits at this point in order to complete decompression of
+ the data provided so far to the compressor. It may need to wait for the next
+ block to be emitted. This is for advanced applications that need to control
+ the emission of deflate blocks.
If flush is set to Z_FULL_FLUSH, all output is flushed as with
Z_SYNC_FLUSH, and the compression state is reset so that decompression can
restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
compression.
If deflate returns with avail_out == 0, this function must be called again
with the same value of the flush parameter and more output space (updated
avail_out), until the flush is complete (deflate returns with non-zero
- avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
avail_out is greater than six to avoid repeated flush markers due to
avail_out == 0 on return.
If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
+ pending output is flushed and deflate returns with Z_STREAM_END if there was
+ enough output space; if deflate returns with Z_OK, this function must be
called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the stream
+ are deflateReset or deflateEnd.
Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- the value returned by deflateBound (see below). If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
+ is to be done in a single step. In this case, avail_out must be at least the
+ value returned by deflateBound (see below). Then deflate is guaranteed to
+ return Z_STREAM_END. If not enough output space is provided, deflate will
+ not return Z_STREAM_END, and it must be called again as described above.
deflate() sets strm->adler to the adler32 checksum of all input read
so far (that is, total_in bytes).
deflate() may update strm->data_type if it can make a good guess about
- the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect the
+ compression algorithm in any manner.
deflate() returns Z_OK if some progress has been made (more input
processed or more output produced), Z_STREAM_END if all input has been
consumed and all output has been produced (only when flush is set to
Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
fatal, and deflate() can be called again with more input and more output
space to continue compressing.
*/
@@ -330,13 +353,13 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
+ This function discards any unprocessed input and does not flush any pending
+ output.
deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
+ prematurely (some input or output was discarded). In the error case, msg
+ may be set but then points to a static string (which must not be
deallocated).
*/
@@ -344,10 +367,10 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
/*
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
- Initializes the internal stream state for decompression. The fields
+ Initializes the internal stream state for decompression. The fields
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the
+ exact value depends on the compression method), inflateInit determines the
compression method from the zlib header and allocates all data structures
accordingly; otherwise the allocation will be deferred to the first call of
inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
@@ -355,95 +378,116 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit() does not process any header information -- that is deferred
+ until inflate() is called.
*/
ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
/*
inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
+ buffer becomes empty or the output buffer becomes full. It may introduce
some output latency (reading input without producing any output) except when
forced to flush.
- The detailed semantics are as follows. inflate performs one or both of the
+ The detailed semantics are as follows. inflate performs one or both of the
following actions:
- Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing will
+ resume at this point for the next call of inflate().
- Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
- Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
- output as possible to the output buffer. Z_BLOCK requests that inflate() stop
- if and when it gets to the next deflate block boundary. When decoding the
- zlib or gzip format, this will cause inflate() to return immediately after
- the header and before the first block. When doing a raw inflate, inflate()
- will go ahead and process the first block, and will return when it gets to
- the end of that block, or when it runs out of data.
+ accordingly. inflate() provides as much output as possible, until there is
+ no more input data or no more space in the output buffer (see below about
+ the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating the next_* and avail_* values accordingly. The
+ application can consume the uncompressed output when it wants, for example
+ when the output buffer is full (avail_out == 0), or after each call of
+ inflate(). If inflate returns Z_OK and with zero avail_out, it must be
+ called again after making room in the output buffer because there might be
+ more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+ Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate()
+ stop if and when it gets to the next deflate block boundary. When decoding
+ the zlib or gzip format, this will cause inflate() to return immediately
+ after the header and before the first block. When doing a raw inflate,
+ inflate() will go ahead and process the first block, and will return when it
+ gets to the end of that block, or when it runs out of data.
The Z_BLOCK option assists in appending to or combining deflate streams.
Also to assist in this, on return inflate() will set strm->data_type to the
- number of unused bits in the last byte taken from strm->next_in, plus 64
- if inflate() is currently decoding the last block in the deflate stream,
- plus 128 if inflate() returned immediately after decoding an end-of-block
- code or decoding the complete header up to just before the first byte of the
- deflate stream. The end-of-block will not be indicated until all of the
- uncompressed data from that block has been written to strm->next_out. The
- number of unused bits may in general be greater than seven, except when
- bit 7 of data_type is set, in which case the number of unused bits will be
- less than eight.
+ number of unused bits in the last byte taken from strm->next_in, plus 64 if
+ inflate() is currently decoding the last block in the deflate stream, plus
+ 128 if inflate() returned immediately after decoding an end-of-block code or
+ decoding the complete header up to just before the first byte of the deflate
+ stream. The end-of-block will not be indicated until all of the uncompressed
+ data from that block has been written to strm->next_out. The number of
+ unused bits may in general be greater than seven, except when bit 7 of
+ data_type is set, in which case the number of unused bits will be less than
+ eight. data_type is set as noted here every time inflate() returns for all
+ flush options, and so can be used to determine the amount of currently
+ consumed input in bits.
+
+ The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+ end of each deflate block header is reached, before any actual data in that
+ block is decoded. This allows the caller to determine the length of the
+ deflate block header for later use in random access within a deflate block.
+ 256 is added to the value of strm->data_type when inflate() returns
+ immediately after reaching the end of the deflate block header.
inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster approach
- may be used for the single inflate() call.
+ error. However if all decompression is to be performed in a single step (a
+ single call of inflate), the parameter flush should be set to Z_FINISH. In
+ this case all pending input is processed and all pending output is flushed;
+ avail_out must be large enough to hold all of the uncompressed data for the
+ operation to complete. (The size of the uncompressed data may have been
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
+ required to perform an inflation in one step. However it may be used to
+ inform inflate that a faster approach can be used for the single inflate()
+ call. Z_FINISH also informs inflate to not maintain a sliding window if the
+ stream completes, which reduces inflate's memory footprint. If the stream
+ does not complete, either because not all of the stream is provided or not
+ enough output space is provided, then a sliding window will be allocated and
+ inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+ been used.
In this implementation, inflate() always flushes as much output as
possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK is used.
+ first call. So the effects of the flush parameter in this implementation are
+ on the return value of inflate() as noted below, when inflate() returns early
+ when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+ memory for a sliding window when Z_FINISH is used.
If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
+ strm->adler to the Adler-32 checksum of all output produced so far (that is,
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
+ below. At the end of the stream, inflate() checks that its computed adler32
checksum is equal to that saved by the compressor and returns Z_STREAM_END
only if the checksum is correct.
- inflate() will decompress and check either zlib-wrapped or gzip-wrapped
- deflate data. The header type is detected automatically. Any information
- contained in the gzip header is not retained, so applications that need that
- information should instead use raw inflate, see inflateInit2() below, or
- inflateBack() and perform their own processing of the gzip header and
- trailer.
+ inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically, if requested when
+ initializing with inflateInit2(). Any information contained in the gzip
+ header is not retained, so applications that need that information should
+ instead use raw inflate, see inflateInit2() below, or inflateBack() and
+ perform their own processing of the gzip header and trailer. When processing
+ gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+ producted so far. The CRC-32 is checked against the gzip trailer.
inflate() returns Z_OK if some progress has been made (more input processed
or more output produced), Z_STREAM_END if the end of the compressed data has
@@ -451,27 +495,28 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
corrupted (input stream not conforming to the zlib format or incorrect check
value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
inflate() can be called again with more input and more output space to
- continue decompressing. If Z_DATA_ERROR is returned, the application may then
- call inflateSync() to look for a good compression block if a partial recovery
- of the data is desired.
+ continue decompressing. If Z_DATA_ERROR is returned, the application may
+ then call inflateSync() to look for a good compression block if a partial
+ recovery of the data is desired.
*/
ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
+ This function discards any unprocessed input and does not flush any pending
+ output.
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
+ was inconsistent. In the error case, msg may be set but then points to a
static string (which must not be deallocated).
*/
+
/* Advanced functions */
/*
@@ -486,55 +531,57 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
int memLevel,
int strategy));
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by the
+ caller.
- The method parameter is the compression method. It must be Z_DEFLATED in
+ The method parameter is the compression method. It must be Z_DEFLATED in
this version of the library.
The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
deflateInit is used instead.
- windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
- determines the window size. deflate() will then generate raw deflate data
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
with no zlib header or trailer, and will not compute an adler32 check value.
- windowBits can also be greater than 15 for optional gzip encoding. Add
+ windowBits can also be greater than 15 for optional gzip encoding. Add
16 to windowBits to write a simple gzip header and trailer around the
- compressed data instead of a zlib wrapper. The gzip header will have no
- file name, no extra data, no comment, no modification time (set to zero),
- no header crc, and the operating system will be set to 255 (unknown). If a
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero), no
+ header crc, and the operating system will be set to 255 (unknown). If a
gzip stream is being written, strm->adler is a crc32 instead of an adler32.
The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
+ for the internal compression state. memLevel=1 uses minimum memory but is
+ slow and reduces compression ratio; memLevel=9 uses maximum memory for
+ optimal speed. The default value is 8. See zconf.h for total memory usage
+ as a function of windowBits and memLevel.
- The strategy parameter is used to tune the compression algorithm. Use the
+ The strategy parameter is used to tune the compression algorithm. Use the
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
string match), or Z_RLE to limit match distances to one (run-length
- encoding). Filtered data consists mostly of small values with a somewhat
- random distribution. In this case, the compression algorithm is tuned to
- compress them better. The effect of Z_FILTERED is to force more Huffman
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
coding and less string matching; it is somewhat intermediate between
- Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
- Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
- parameter only affects the compression ratio but not the correctness of the
- compressed output even if it is not set appropriately. Z_FIXED prevents the
- use of dynamic Huffman codes, allowing for a simpler decoder for special
- applications.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
+ Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
+ fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
+ strategy parameter only affects the compression ratio but not the
+ correctness of the compressed output even if it is not set appropriately.
+ Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+ decoder for special applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+ method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+ incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
+ set to null if there is no error message. deflateInit2 does not perform any
+ compression: this will be done by deflate().
*/
ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
@@ -542,38 +589,43 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
uInt dictLength));
/*
Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
+ without producing any compressed output. When using the zlib format, this
+ function must be called immediately after deflateInit, deflateInit2 or
+ deflateReset, and before any call of deflate. When doing raw deflate, this
+ function must be called either before any call of deflate, or immediately
+ after the completion of a deflate block, i.e. after all input has been
+ consumed and all output has been delivered when using any of the flush
+ options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
+ compressor and decompressor must use exactly the same dictionary (see
+ inflateSetDictionary).
The dictionary should consist of strings (byte sequences) that are likely
to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
+ used strings preferably put towards the end of the dictionary. Using a
dictionary is most useful when the data to be compressed is short and can be
predicted with good accuracy; the data can then be compressed better than
with the default empty dictionary.
Depending on the size of the compression data structures selected by
deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front. In addition, the
- current implementation of deflate will use at most the window size minus
- 262 bytes of the provided dictionary.
+ discarded, for example if the dictionary is larger than the window size
+ provided in deflateInit or deflateInit2. Thus the strings most likely to be
+ useful should be put at the end of the dictionary, not at the front. In
+ addition, the current implementation of deflate will use at most the window
+ size minus 262 bytes of the provided dictionary.
Upon return of this function, strm->adler is set to the adler32 value
of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The adler32 value
+ which dictionary has been used by the compressor. (The adler32 value
applies to the whole dictionary even if only a subset of the dictionary is
actually used by the compressor.) If a raw deflate was requested, then the
adler32 value is not computed and strm->adler is not set.
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
+ or if not at a block boundary for raw deflate). deflateSetDictionary does
+ not perform any compression: this will be done by deflate().
*/
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
@@ -583,26 +635,26 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
This function can be useful when several compression strategies will be
tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
+ data with a filter. The streams that will be discarded should then be freed
by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
+ compression state which can be quite large, so this strategy is slow and can
+ consume lots of memory.
deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
destination.
*/
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
/*
This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
+ but does not free and reallocate all the internal compression state. The
+ stream will keep the same compression level and any other attributes that
+ may have been set by deflateInit2.
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
*/
ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
@@ -612,18 +664,18 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
Dynamically update the compression level and compression strategy. The
interpretation of level and strategy is as in deflateInit2. This can be
used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression level is changed, the input available so far is
+ compressed with the old level (and may be flushed); the new level will take
+ effect only at the next call of deflate().
Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
+ a call of deflate(), since the currently available input may have to be
+ compressed and flushed. In particular, strm->avail_out must be non-zero.
deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+ strm->avail_out was zero.
*/
ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
@@ -647,31 +699,53 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
uLong sourceLen));
/*
deflateBound() returns an upper bound on the compressed size after
- deflation of sourceLen bytes. It must be called after deflateInit()
- or deflateInit2(). This would be used to allocate an output buffer
- for deflation in a single pass, and so would be called before deflate().
+ deflation of sourceLen bytes. It must be called after deflateInit() or
+ deflateInit2(), and after deflateSetHeader(), if used. This would be used
+ to allocate an output buffer for deflation in a single pass, and so would be
+ called before deflate(). If that first deflate() call is provided the
+ sourceLen input bytes, an output buffer allocated to the size returned by
+ deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+ to return Z_STREAM_END. Note that it is possible for the compressed size to
+ be larger than the value returned by deflateBound() if flush options other
+ than Z_FINISH or Z_NO_FLUSH are used.
*/
+ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
+ unsigned *pending,
+ int *bits));
+/*
+ deflatePending() returns the number of bytes and bits of output that have
+ been generated, but not yet provided in the available output. The bytes not
+ provided would be due to the available output space having being consumed.
+ The number of bits of output not provided are between 0 and 7, where they
+ await more bits to join them in order to fill out a full byte. If pending
+ or bits are Z_NULL, then those values are not set.
+
+ deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+ */
+
ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
int bits,
int value));
/*
deflatePrime() inserts bits in the deflate output stream. The intent
- is that this function is used to start off the deflate output with the
- bits leftover from a previous deflate stream when appending to it. As such,
- this function can only be used for raw deflate, and must be used before the
- first deflate() call after a deflateInit2() or deflateReset(). bits must be
- less than or equal to 16, and that many of the least significant bits of
- value will be inserted in the output.
-
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
+ is that this function is used to start off the deflate output with the bits
+ leftover from a previous deflate stream when appending to it. As such, this
+ function can only be used for raw deflate, and must be used before the first
+ deflate() call after a deflateInit2() or deflateReset(). bits must be less
+ than or equal to 16, and that many of the least significant bits of value
+ will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+ room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+ source stream state was inconsistent.
*/
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
gz_headerp head));
/*
- deflateSetHeader() provides gzip header information for when a gzip
+ deflateSetHeader() provides gzip header information for when a gzip
stream is requested by deflateInit2(). deflateSetHeader() may be called
after deflateInit2() or deflateReset() and before the first call of
deflate(). The text, time, os, extra field, name, and comment information
@@ -684,11 +758,11 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
1.3.x) do not support header crc's, and will report that it is a "multi-part
gzip file" and give up.
- If deflateSetHeader is not used, the default gzip header has text false,
+ If deflateSetHeader is not used, the default gzip header has text false,
the time set to zero, and os set to 255, with no extra, name, or comment
fields. The gzip header is returned to the default state by deflateReset().
- deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
@@ -696,43 +770,50 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
int windowBits));
- This is another version of inflateInit with an extra parameter. The
+ This is another version of inflateInit with an extra parameter. The
fields next_in, avail_in, zalloc, zfree and opaque must be initialized
before by the caller.
The windowBits parameter is the base two logarithm of the maximum window
size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. windowBits must be greater than or equal to the windowBits value
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
provided to deflateInit2() while compressing, or it must be equal to 15 if
- deflateInit2() was not used. If a compressed stream with a larger window
+ deflateInit2() was not used. If a compressed stream with a larger window
size is given as input, inflate() will return with the error code
Z_DATA_ERROR instead of trying to allocate a larger window.
- windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
- determines the window size. inflate() will then process raw deflate data,
+ windowBits can also be zero to request that inflate use the window size in
+ the zlib header of the compressed stream.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
not looking for a zlib or gzip header, not generating a check value, and not
- looking for any check values for comparison at the end of the stream. This
+ looking for any check values for comparison at the end of the stream. This
is for use with other formats that use the deflate compressed data format
- such as zip. Those formats provide their own check values. If a custom
+ such as zip. Those formats provide their own check values. If a custom
format is developed using the raw deflate format for compressed data, it is
recommended that a check value such as an adler32 or a crc32 be applied to
the uncompressed data as is done in the zlib, gzip, and zip formats. For
- most applications, the zlib format should be used as is. Note that comments
+ most applications, the zlib format should be used as is. Note that comments
above on the use in deflateInit2() applies to the magnitude of windowBits.
- windowBits can also be greater than 15 for optional gzip decoding. Add
+ windowBits can also be greater than 15 for optional gzip decoding. Add
32 to windowBits to enable zlib and gzip decoding with automatic header
detection, or add 16 to decode only the gzip format (the zlib format will
- return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
- a crc32 instead of an adler32.
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
+ crc32 instead of an adler32.
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
- is set to null if there is no error message. inflateInit2 does not perform
- any decompression apart from reading the zlib header if present: this will
- be done by inflate(). (So next_in and avail_in may be modified, but next_out
- and avail_out are unchanged.)
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit2 does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit2() does not process any header information -- that is
+ deferred until inflate() is called.
*/
ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
@@ -740,36 +821,56 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
uInt dictLength));
/*
Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate,
- if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
can be determined from the adler32 value returned by that call of inflate.
The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
+ deflateSetDictionary). For raw inflate, this function can be called at any
+ time to set the dictionary. If the provided dictionary is smaller than the
+ window and there is already data in the window, then the provided dictionary
+ will amend what's there. The application must insure that the dictionary
+ that was used for compression is provided.
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
+ expected one (incorrect adler32 value). inflateSetDictionary does not
perform any decompression: this will be done by subsequent calls of
inflate().
*/
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength));
/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
+ Returns the sliding dictionary being maintained by inflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If inflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similary, if dictLength is Z_NULL, then it is not set.
+
+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a possible full flush point (see above
+ for the description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+ All full flush points have this pattern, but not all occurrences of this
+ pattern are full flush points.
+
+ inflateSync returns Z_OK if a possible full flush point has been found,
+ Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+ has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+ In the success case, the application may save the current current value of
+ total_in which indicates where valid compressed data was found. In the
+ error case, the application may repeatedly call inflateSync, providing more
+ input each time, until success or end of the input data.
*/
ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
@@ -784,18 +885,30 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
destination.
*/
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
/*
This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
+ but does not free and reallocate all the internal decompression state. The
+ stream will keep attributes that may have been set by inflateInit2.
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+ int windowBits));
+/*
+ This function is the same as inflateReset, but it also permits changing
+ the wrap and window size requests. The windowBits parameter is interpreted
+ the same as it is for inflateInit2.
+
+ inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+ the windowBits parameter is invalid.
*/
ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
@@ -803,54 +916,87 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
int value));
/*
This function inserts bits in the inflate input stream. The intent is
- that this function is used to start inflating at a bit position in the
- middle of a byte. The provided bits will be used before any bytes are used
- from next_in. This function should only be used with raw inflate, and
- should be used before the first inflate() call after inflateInit2() or
- inflateReset(). bits must be less than or equal to 16, and that many of the
- least significant bits of value will be inserted in the input.
-
- inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ If bits is negative, then the input stream bit buffer is emptied. Then
+ inflatePrime() can be called again to put bits in the buffer. This is used
+ to clear out bits leftover after feeding inflate a block description prior
+ to feeding inflate codes.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+ This function returns two values, one in the lower 16 bits of the return
+ value, and the other in the remaining upper bits, obtained by shifting the
+ return value down 16 bits. If the upper value is -1 and the lower value is
+ zero, then inflate() is currently decoding information outside of a block.
+ If the upper value is -1 and the lower value is non-zero, then inflate is in
+ the middle of a stored block, with the lower value equaling the number of
+ bytes from the input remaining to copy. If the upper value is not -1, then
+ it is the number of bits back from the current bit position in the input of
+ the code (literal or length/distance pair) currently being processed. In
+ that case the lower value is the number of bytes already emitted for that
+ code.
+
+ A code is being processed if inflate is waiting for more input to complete
+ decoding of the code, or if it has completed decoding but is waiting for
+ more output space to write the literal or match data.
+
+ inflateMark() is used to mark locations in the input data for random
+ access, which may be at bit positions, and to note those cases where the
+ output of a code may span boundaries of random access blocks. The current
+ location in the input stream can be determined from avail_in and data_type
+ as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+ inflateMark returns the value noted above or -1 << 16 if the provided
+ source stream state was inconsistent.
+*/
+
ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
gz_headerp head));
/*
- inflateGetHeader() requests that gzip header information be stored in the
+ inflateGetHeader() requests that gzip header information be stored in the
provided gz_header structure. inflateGetHeader() may be called after
inflateInit2() or inflateReset(), and before the first call of inflate().
As inflate() processes the gzip stream, head->done is zero until the header
is completed, at which time head->done is set to one. If a zlib stream is
being decoded, then head->done is set to -1 to indicate that there will be
- no gzip header information forthcoming. Note that Z_BLOCK can be used to
- force inflate() to return immediately after header processing is complete
- and before any actual data is decompressed.
+ no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be
+ used to force inflate() to return immediately after header processing is
+ complete and before any actual data is decompressed.
- The text, time, xflags, and os fields are filled in with the gzip header
+ The text, time, xflags, and os fields are filled in with the gzip header
contents. hcrc is set to true if there is a header CRC. (The header CRC
- was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
contains the maximum number of bytes to write to extra. Once done is true,
extra_len contains the actual extra field length, and extra contains the
extra field, or that field truncated if extra_max is less than extra_len.
If name is not Z_NULL, then up to name_max characters are written there,
terminated with a zero unless the length is greater than name_max. If
comment is not Z_NULL, then up to comm_max characters are written there,
- terminated with a zero unless the length is greater than comm_max. When
- any of extra, name, or comment are not Z_NULL and the respective field is
- not present in the header, then that field is set to Z_NULL to signal its
+ terminated with a zero unless the length is greater than comm_max. When any
+ of extra, name, or comment are not Z_NULL and the respective field is not
+ present in the header, then that field is set to Z_NULL to signal its
absence. This allows the use of deflateSetHeader() with the returned
structure to duplicate the header. However if those fields are set to
allocated memory, then the application will need to save those pointers
elsewhere so that they can be eventually freed.
- If inflateGetHeader is not used, then the header information is simply
+ If inflateGetHeader is not used, then the header information is simply
discarded. The header is always checked for validity, including the header
CRC if present. inflateReset() will reset the process to discard the header
information. The application would need to call inflateGetHeader() again to
retrieve the header from the next gzip stream.
- inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
@@ -871,12 +1017,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
See inflateBack() for the usage of these routines.
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not
- be allocated, or Z_VERSION_ERROR if the version of the library does not
- match the version of the header file.
+ the parameters are invalid, Z_MEM_ERROR if the internal state could not be
+ allocated, or Z_VERSION_ERROR if the version of the library does not match
+ the version of the header file.
*/
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef unsigned (*in_func) OF((void FAR *,
+ z_const unsigned char FAR * FAR *));
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
@@ -884,24 +1031,25 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
out_func out, void FAR *out_desc));
/*
inflateBack() does a raw inflate with a single call using a call-back
- interface for input and output. This is more efficient than inflate() for
- file i/o applications in that it avoids copying between the output and the
- sliding window by simply making the window itself the output buffer. This
- function trusts the application to not change the output buffer passed by
- the output function, at least until inflateBack() returns.
+ interface for input and output. This is potentially more efficient than
+ inflate() for file i/o applications, in that it avoids copying between the
+ output and the sliding window by simply making the window itself the output
+ buffer. inflate() can be faster on modern CPUs when used with large
+ buffers. inflateBack() trusts the application to not change the output
+ buffer passed by the output function, at least until inflateBack() returns.
inflateBackInit() must be called first to allocate the internal state
and to initialize the state with the user-provided window buffer.
inflateBack() may then be used multiple times to inflate a complete, raw
- deflate stream with each call. inflateBackEnd() is then called to free
- the allocated state.
+ deflate stream with each call. inflateBackEnd() is then called to free the
+ allocated state.
A raw deflate stream is one with no zlib or gzip header or trailer.
This routine would normally be used in a utility that reads zip or gzip
files and writes out uncompressed files. The utility would decode the
- header and process the trailer on its own, hence this routine expects
- only the raw deflate stream to decompress. This is different from the
- normal behavior of inflate(), which expects either a zlib or gzip header and
+ header and process the trailer on its own, hence this routine expects only
+ the raw deflate stream to decompress. This is different from the normal
+ behavior of inflate(), which expects either a zlib or gzip header and
trailer around the deflate stream.
inflateBack() uses two subroutines supplied by the caller that are then
@@ -927,7 +1075,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
must also be initialized, and then if strm->avail_in is not zero, input will
- initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
The in_desc and out_desc parameters of inflateBack() is passed as the
first parameter of in() and out() respectively when they are called. These
@@ -937,15 +1085,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
On return, inflateBack() will set strm->next_in and strm->avail_in to
pass back any unused input that was provided by the last in() call. The
return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
- if in() or out() returned an error, Z_DATA_ERROR if there was a format
- error in the deflate stream (in which case strm->msg is set to indicate the
- nature of the error), or Z_STREAM_ERROR if the stream was not properly
- initialized. In the case of Z_BUF_ERROR, an input or output error can be
- distinguished using strm->next_in which will be Z_NULL only if in() returned
- an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
- out() returning non-zero. (in() will always be called before out(), so
- strm->next_in is assured to be defined if out() returns non-zero.) Note
- that inflateBack() cannot return Z_OK.
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+ in the deflate stream (in which case strm->msg is set to indicate the nature
+ of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+ In the case of Z_BUF_ERROR, an input or output error can be distinguished
+ using strm->next_in which will be Z_NULL only if in() returned an error. If
+ strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+ non-zero. (in() will always be called before out(), so strm->next_in is
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
+ cannot return Z_OK.
*/
ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
@@ -997,27 +1145,27 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
27-31: 0 (reserved)
*/
+#ifndef Z_SOLO
/* utility functions */
/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level and memory usage,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
+ The following utility functions are implemented on top of the basic
+ stream-oriented functions. To simplify the interface, some default options
+ are assumed (compression level and memory usage, standard memory allocation
+ functions). The source code of these utility functions can be modified if
+ you need special options.
*/
ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least the value returned
- by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
+
compress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer.
@@ -1027,11 +1175,11 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen,
int level));
/*
- Compresses the source buffer into the destination buffer. The level
+ Compresses the source buffer into the destination buffer. The level
parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
+ length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least the value returned by
- compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
@@ -1042,159 +1190,255 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
/*
compressBound() returns an upper bound on the compressed size after
- compress() or compress2() on sourceLen bytes. It would be used before
- a compress() or compress2() call to allocate the destination buffer.
+ compress() or compress2() on sourceLen bytes. It would be used before a
+ compress() or compress2() call to allocate the destination buffer.
*/
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit, destLen
+ is the actual size of the uncompressed buffer.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
+ the case where there is not enough room, uncompress() will fill the output
+ buffer with the uncompressed data up to that point.
*/
+ /* gzip file access functions */
-typedef voidp gzFile;
+/*
+ This library supports reading and writing files in gzip (.gz) format with
+ an interface similar to that of stdio, using the functions that start with
+ "gz". The gzip format is different from the zlib format. gzip is a gzip
+ wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
- Huffman only compression as in "wb1h", or 'R' for run-length encoding
- as in "wb1R". (See the description of deflateInit2 for more information
- about the strategy parameter.)
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+ Opens a gzip (.gz) file for reading or writing. The mode parameter is as
+ in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+ a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+ compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+ for fixed code compression as in "wb9F". (See the description of
+ deflateInit2 for more information about the strategy parameter.) 'T' will
+ request transparent writing or appending with no compression and not using
+ the gzip format.
+
+ "a" can be used instead of "w" to request that the gzip stream that will
+ be written be appended to the file. "+" will result in an error, since
+ reading and writing to the same gzip file is not supported. The addition of
+ "x" when writing will create the file exclusively, which fails if the file
+ already exists. On systems that support it, the addition of "e" when
+ reading or writing will set the flag to close the file on an execve() call.
+
+ These functions, as well as gzip, will read and decode a sequence of gzip
+ streams in a file. The append function of gzopen() can be used to create
+ such a file. (Also see gzflush() for another way to do this.) When
+ appending, gzopen does not test whether the file begins with a gzip stream,
+ nor does it look for the end of the gzip streams to begin appending. gzopen
+ will simply append a gzip stream to the existing file.
gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
+ case gzread will directly read from the file without decompression. When
+ reading, this will be detected automatically by looking for the magic two-
+ byte gzip header.
+
+ gzopen returns NULL if the file could not be opened, if there was
+ insufficient memory to allocate the gzFile state, or if an invalid mode was
+ specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+ errno can be checked to determine if the reason gzopen failed was that the
+ file could not be opened.
+*/
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen associates a gzFile with the file descriptor fd. File descriptors
+ are obtained from calls like open, dup, creat, pipe or fileno (if the file
+ has been previously opened with fopen). The mode parameter is as in gzopen.
+
+ The next call of gzclose on the returned gzFile will also close the file
+ descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+ fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+ mode);. The duplicated descriptor should be saved to avoid a leak, since
+ gzdopen does not close fd if it fails. If you are using fileno() to get the
+ file descriptor from a FILE *, then you will have to use dup() to avoid
+ double-close()ing the file descriptor. Both gzclose() and fclose() will
+ close the associated file descriptor, so they need to have different file
+ descriptors.
+
+ gzdopen returns NULL if there was insufficient memory to allocate the
+ gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+ provided, or '+' was provided), or if fd is -1. The file descriptor is not
+ used until the next gz* read, write, seek, or close operation, so gzdopen
+ will not detect if fd is invalid (unless fd is -1).
+*/
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
+ Set the internal buffer size used by this library's functions. The
+ default buffer size is 8192 bytes. This function must be called after
+ gzopen() or gzdopen(), and before any other calls that read or write the
+ file. The buffer memory allocation is always deferred to the first read or
+ write. Two buffers are allocated, either both of the specified size when
+ writing, or one of the specified size and the other twice that size when
+ reading. A larger buffer size of, for example, 64K or 128K bytes will
+ noticeably increase the speed of decompression (reading).
+
+ The new buffer size also affects the maximum length for gzprintf().
+
+ gzbuffer() returns 0 on success, or -1 on failure, such as being called
+ too late.
*/
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
/*
- Dynamically update the compression level or strategy. See the description
+ Dynamically update the compression level or strategy. See the description
of deflateInit2 for the meaning of these parameters.
+
gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
opened for writing.
*/
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
+ Reads the given number of uncompressed bytes from the compressed file. If
+ the input file is not in gzip format, gzread copies the given number of
+ bytes into the buffer directly from the file.
+
+ After reaching the end of a gzip stream in the input, gzread will continue
+ to read, looking for another gzip stream. Any number of gzip streams may be
+ concatenated in the input file, and will all be decompressed by gzread().
+ If something other than a gzip stream is encountered after a gzip stream,
+ that remaining trailing garbage is ignored (and no error is returned).
+
+ gzread can be used to read a gzip file that is being concurrently written.
+ Upon reaching the end of the input, gzread will return with the available
+ data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+ gzclearerr can be used to clear the end of file indicator in order to permit
+ gzread to be tried again. Z_OK indicates that a gzip stream was completed
+ on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
+ middle of a gzip stream. Note that gzread does not return -1 in the event
+ of an incomplete gzip stream. This error is deferred until gzclose(), which
+ will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+ stream. Alternatively, gzerror can be used before gzclose to detect this
+ case.
+
+ gzread returns the number of uncompressed bytes actually read, less than
+ len for end of file, or -1 for error.
+*/
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
- voidpc buf, unsigned len));
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
/*
Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
+ gzwrite returns the number of uncompressed bytes written or 0 in case of
+ error.
*/
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
/*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error). The number of
- uncompressed bytes written is limited to 4095. The caller should assure that
- this limit is not exceeded. If it is exceeded, then gzprintf() will return
- return an error (0) with nothing written. In this case, there may also be a
- buffer overflow with unpredictable consequences, which is possible only if
- zlib was compiled with the insecure functions sprintf() or vsprintf()
- because the secure snprintf() or vsnprintf() functions were not available.
+ Converts, formats, and writes the arguments to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written, or 0 in case of error. The number of
+ uncompressed bytes written is limited to 8191, or one less than the buffer
+ size given to gzbuffer(). The caller should assure that this limit is not
+ exceeded. If it is exceeded, then gzprintf() will return an error (0) with
+ nothing written. In this case, there may also be a buffer overflow with
+ unpredictable consequences, which is possible only if zlib was compiled with
+ the insecure functions sprintf() or vsprintf() because the secure snprintf()
+ or vsnprintf() functions were not available. This can be determined using
+ zlibCompileFlags().
*/
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
/*
- Writes the given null-terminated string to the compressed file, excluding
+ Writes the given null-terminated string to the compressed file, excluding
the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
+
+ gzputs returns the number of characters written, or -1 in case of error.
*/
ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
/*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
- condition is encountered. The string is then terminated with a null
- character.
- gzgets returns buf, or Z_NULL in case of error.
+ Reads bytes from the compressed file until len-1 characters are read, or a
+ newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. If any characters are read or if len == 1, the
+ string is terminated with a null character. If no characters are read due
+ to an end-of-file or len < 1, then the buffer is left untouched.
+
+ gzgets returns buf which is a null-terminated string, or it returns NULL
+ for end-of-file or in case of error. If there was an error, the contents at
+ buf are indeterminate.
*/
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
/*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
+ Writes c, converted to an unsigned char, into the compressed file. gzputc
+ returns the value that was written, or -1 in case of error.
*/
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
/*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
+ Reads one byte from the compressed file. gzgetc returns this byte or -1
+ in case of end of file or error. This is implemented as a macro for speed.
+ As such, it does not do all of the checking the other functions do. I.e.
+ it does not check to see if file is NULL, nor whether the structure file
+ points to has been clobbered or not.
*/
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
/*
- Push one character back onto the stream to be read again later.
- Only one character of push-back is allowed. gzungetc() returns the
- character pushed, or -1 on failure. gzungetc() will fail if a
- character has been pushed but not read yet, or if c is -1. The pushed
- character will be discarded if the stream is repositioned with gzseek()
- or gzrewind().
+ Push one character back onto the stream to be read as the first character
+ on the next read. At least one character of push-back is allowed.
+ gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
+ fail if c is -1, and may fail if a character has been pushed but not read
+ yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
+ output buffer size of pushed characters is allowed. (See gzbuffer above.)
+ The pushed character will be discarded if the stream is repositioned with
+ gzseek() or gzrewind().
*/
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
+ Flushes all pending output into the compressed file. The parameter flush
+ is as in the deflate() function. The return value is the zlib error number
+ (see function gzerror below). gzflush is only permitted when writing.
+
+ If the flush parameter is Z_FINISH, the remaining data is written and the
+ gzip stream is completed in the output. If gzwrite() is called again, a new
+ gzip stream will be started in the output. gzread() is able to read such
+ concatented gzip streams.
+
+ gzflush should be called only when strictly necessary because it will
+ degrade compression if called too often.
*/
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
- z_off_t offset, int whence));
/*
- Sets the starting position for the next gzread or gzwrite on the
- given compressed file. The offset represents a number of bytes in the
- uncompressed data stream. The whence parameter is defined as in lseek(2);
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+
+ Sets the starting position for the next gzread or gzwrite on the given
+ compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
the value SEEK_END is not supported.
+
If the file is opened for reading, this function is emulated but can be
- extremely slow. If the file is opened for writing, only forward seeks are
+ extremely slow. If the file is opened for writing, only forward seeks are
supported; gzseek then compresses a sequence of zeroes up to the new
starting position.
- gzseek returns the resulting offset location as measured in bytes from
+ gzseek returns the resulting offset location as measured in bytes from
the beginning of the uncompressed stream, or -1 in case of error, in
particular if the file is opened for writing and the new starting position
would be before the current position.
@@ -1204,68 +1448,134 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
/*
Rewinds the given file. This function is supported only for reading.
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
*/
+/*
ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+
+ Returns the starting position for the next gzread or gzwrite on the given
+ compressed file. This position represents a number of bytes in the
+ uncompressed data stream, and is zero when starting, even if appending or
+ reading a gzip stream from the middle of a file using gzdopen().
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
/*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+ Returns the current offset in the file being read or written. This offset
+ includes the count of bytes that precede the gzip stream, for example when
+ appending or when using gzdopen() for reading. When reading, the offset
+ does not include as yet unused buffered input. This information can be used
+ for a progress indicator. On error, gzoffset() returns -1.
*/
ZEXTERN int ZEXPORT gzeof OF((gzFile file));
/*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
+ Returns true (1) if the end-of-file indicator has been set while reading,
+ false (0) otherwise. Note that the end-of-file indicator is set only if the
+ read tried to go past the end of the input, but came up short. Therefore,
+ just like feof(), gzeof() may return false even if there is no more data to
+ read, in the event that the last read request was for the exact number of
+ bytes remaining in the input file. This will happen if the input file size
+ is an exact multiple of the buffer size.
+
+ If gzeof() returns true, then the read functions will return no more data,
+ unless the end-of-file indicator is reset by gzclearerr() and the input file
+ has grown since the previous end of file was detected.
*/
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
/*
- Returns 1 if file is being read directly without decompression, otherwise
- zero.
+ Returns true (1) if file is being copied directly while reading, or false
+ (0) if file is a gzip stream being decompressed.
+
+ If the input file is empty, gzdirect() will return true, since the input
+ does not contain a gzip stream.
+
+ If gzdirect() is used immediately after gzopen() or gzdopen() it will
+ cause buffers to be allocated to allow reading the file to determine if it
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
+ gzdirect().
+
+ When writing, gzdirect() returns true (1) if transparent writing was
+ requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
+ gzdirect() is not needed when writing. Transparent writing must be
+ explicitly requested, so the application already knows the answer. When
+ linking statically, using gzdirect() will include all of the zlib code for
+ gzip file reading and decompression, which may not be desired.)
*/
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
+ Flushes all pending output if necessary, closes the compressed file and
+ deallocates the (de)compression state. Note that once file is closed, you
+ cannot call gzerror with file, since its structures have been deallocated.
+ gzclose must not be called more than once on the same file, just as free
+ must not be called more than once on the same allocation.
+
+ gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+ file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+ last read ended in the middle of a gzip stream, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+ Same as gzclose(), but gzclose_r() is only for use when reading, and
+ gzclose_w() is only for use when writing or appending. The advantage to
+ using these instead of gzclose() is that they avoid linking in zlib
+ compression or decompression code that is not used when only reading or only
+ writing respectively. If gzclose() is used, then both compression and
+ decompression code will be included the application when linking to a static
+ zlib library.
*/
ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
+ Returns the error message for the last error which occurred on the given
+ compressed file. errnum is set to zlib error number. If an error occurred
+ in the file system and not in the compression library, errnum is set to
+ Z_ERRNO and the application may consult errno to get the exact error code.
+
+ The application must not modify the returned string. Future calls to
+ this function may invalidate the previously returned string. If file is
+ closed, then the string previously returned by gzerror will no longer be
+ available.
+
+ gzerror() should be used to distinguish errors from end-of-file for those
+ functions above that do not distinguish those cases in their return values.
*/
ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
/*
- Clears the error and end-of-file flags for file. This is analogous to the
- clearerr() function in stdio. This is useful for continuing to read a gzip
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
file that is being written concurrently.
*/
+#endif /* !Z_SOLO */
+
/* checksum functions */
/*
These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
+ anyway because they might be useful in applications using the compression
+ library.
*/
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
/*
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
+ return the updated checksum. If buf is Z_NULL, this function returns the
+ required initial value for the checksum.
+
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster.
+
+ Usage example:
uLong adler = adler32(0L, Z_NULL, 0);
@@ -1275,21 +1585,25 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
if (adler != original_adler) error();
*/
+/*
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
z_off_t len2));
-/*
+
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
+ that the z_off_t type (like off_t) is a signed integer. If len2 is
+ negative, the result has no meaning or utility.
*/
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required initial
- value for the for the crc. Pre- and post-conditioning (one's complement) is
+ updated CRC-32. If buf is Z_NULL, this function returns the required
+ initial value for the crc. Pre- and post-conditioning (one's complement) is
performed within this function so it shouldn't be done by the application.
+
Usage example:
uLong crc = crc32(0L, Z_NULL, 0);
@@ -1300,9 +1614,9 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
if (crc != original_crc) error();
*/
+/*
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-/*
Combine two CRC-32 check values into one. For two sequences of bytes,
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
@@ -1331,26 +1645,121 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
const char *version,
int stream_size));
#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
#define inflateBackInit(strm, windowBits, window) \
inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
+ ZLIB_VERSION, (int)sizeof(z_stream))
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure. Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro. The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously. They can
+ * only be used by the gzgetc() macro. You have been warned.
+ */
+struct gzFile_s {
+ unsigned have;
+ unsigned char *next;
+ z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
+#ifdef Z_PREFIX_SET
+# undef z_gzgetc
+# define z_gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#else
+# define gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#endif
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#ifdef Z_LARGE64
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+# ifdef Z_PREFIX_SET
+# define z_gzopen z_gzopen64
+# define z_gzseek z_gzseek64
+# define z_gztell z_gztell64
+# define z_gzoffset z_gzoffset64
+# define z_adler32_combine z_adler32_combine64
+# define z_crc32_combine z_crc32_combine64
+# else
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# endif
+# ifndef Z_LARGE64
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+# endif
+#else
+ ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+#else /* Z_SOLO */
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+
+#endif /* !Z_SOLO */
+
+/* hack for buggy compilers */
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
+ struct internal_state {int dummy;};
#endif
+/* undocumented functions */
ZEXTERN const char * ZEXPORT zError OF((int));
-ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
+ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
+ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
+ const char *mode));
+#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
+ const char *format,
+ va_list va));
+# endif
+#endif
#ifdef __cplusplus
}
diff --git a/erts/emulator/zlib/zutil.c b/erts/emulator/zlib/zutil.c
index fa5b43126a..27a8af4a2b 100644
--- a/erts/emulator/zlib/zutil.c
+++ b/erts/emulator/zlib/zutil.c
@@ -1,22 +1,23 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* @(#) $Id$ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "zutil.h"
+#ifndef Z_SOLO
+# include "gzguts.h"
+#endif
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;}; /* for buggy compilers */
#endif
-const char * const z_errmsg[10] = {
+z_const char * const z_errmsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
@@ -39,25 +40,25 @@ uLong ZEXPORT zlibCompileFlags()
uLong flags;
flags = 0;
- switch (sizeof(uInt)) {
+ switch ((int)(sizeof(uInt))) {
case 2: break;
case 4: flags += 1; break;
case 8: flags += 2; break;
default: flags += 3;
}
- switch (sizeof(uLong)) {
+ switch ((int)(sizeof(uLong))) {
case 2: break;
case 4: flags += 1 << 2; break;
case 8: flags += 2 << 2; break;
default: flags += 3 << 2;
}
- switch (sizeof(voidpf)) {
+ switch ((int)(sizeof(voidpf))) {
case 2: break;
case 4: flags += 1 << 4; break;
case 8: flags += 2 << 4; break;
default: flags += 3 << 4;
}
- switch (sizeof(z_off_t)) {
+ switch ((int)(sizeof(z_off_t))) {
case 2: break;
case 4: flags += 1 << 6; break;
case 8: flags += 2 << 6; break;
@@ -90,27 +91,27 @@ uLong ZEXPORT zlibCompileFlags()
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifdef NO_vsnprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_vsprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#else
- flags += 1L << 24;
+ flags += 1L << 24;
# ifdef NO_snprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_sprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_snprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#endif
@@ -122,9 +123,9 @@ uLong ZEXPORT zlibCompileFlags()
# ifndef verbose
# define verbose 0
# endif
-int z_verbose = verbose;
+int ZLIB_INTERNAL z_verbose = verbose;
-void z_error (m)
+void ZLIB_INTERNAL z_error (m)
char *m;
{
fprintf(stderr, "%s\n", m);
@@ -151,7 +152,7 @@ const char * ZEXPORT zError(err)
#ifndef HAVE_MEMCPY
-void zmemcpy(dest, source, len)
+void ZLIB_INTERNAL zmemcpy(dest, source, len)
Bytef* dest;
const Bytef* source;
uInt len;
@@ -162,7 +163,7 @@ void zmemcpy(dest, source, len)
} while (--len != 0);
}
-int zmemcmp(s1, s2, len)
+int ZLIB_INTERNAL zmemcmp(s1, s2, len)
const Bytef* s1;
const Bytef* s2;
uInt len;
@@ -175,7 +176,7 @@ int zmemcmp(s1, s2, len)
return 0;
}
-void zmemzero(dest, len)
+void ZLIB_INTERNAL zmemzero(dest, len)
Bytef* dest;
uInt len;
{
@@ -186,6 +187,7 @@ void zmemzero(dest, len)
}
#endif
+#ifndef Z_SOLO
#ifdef SYS16BIT
@@ -218,7 +220,7 @@ local ptr_table table[MAX_PTR];
* a protected system like OS/2. Use Microsoft C instead.
*/
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
{
voidpf buf = opaque; /* just to make some compilers happy */
ulg bsize = (ulg)items*size;
@@ -242,7 +244,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
return buf;
}
-void zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
int n;
if (*(ush*)&ptr != 0) { /* object < 64K */
@@ -277,13 +279,13 @@ void zcfree (voidpf opaque, voidpf ptr)
# define _hfree hfree
#endif
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
{
if (opaque) opaque = 0; /* to make compiler happy */
return _halloc((long)items, size);
}
-void zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
if (opaque) opaque = 0; /* to make compiler happy */
_hfree(ptr);
@@ -302,26 +304,24 @@ extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
-extern void* sys_alloc(unsigned);
-extern void* sys_free(void *);
-
-voidpf zcalloc (opaque, items, size)
+voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
voidpf opaque;
unsigned items;
unsigned size;
{
- unsigned sz = items * size;
- voidpf* ptr = (voidpf) sys_alloc(sz);
if (opaque) items += size - size; /* make compiler happy */
- return ptr;
+ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
+ (voidpf)calloc(items, size);
}
-void zcfree (opaque, ptr)
+void ZLIB_INTERNAL zcfree (opaque, ptr)
voidpf opaque;
voidpf ptr;
{
- sys_free(ptr);
+ free(ptr);
if (opaque) return; /* make compiler happy */
}
#endif /* MY_ZCALLOC */
+
+#endif /* !Z_SOLO */
diff --git a/erts/emulator/zlib/zutil.h b/erts/emulator/zlib/zutil.h
index a8872e1c88..24ab06b1cf 100644
--- a/erts/emulator/zlib/zutil.h
+++ b/erts/emulator/zlib/zutil.h
@@ -1,10 +1,8 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-/* %ExternalCopyright% */
-
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
@@ -15,30 +13,24 @@
#ifndef ZUTIL_H
#define ZUTIL_H
-#define ZLIB_INTERNAL
+#ifdef HAVE_HIDDEN
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
+
#include "zlib.h"
-#ifdef STDC
-# ifndef _WIN32_WCE
+#if defined(STDC) && !defined(Z_SOLO)
+# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
# include <string.h>
# include <stdlib.h>
#endif
-#ifdef NO_ERRNO_H
-# ifdef _WIN32_WCE
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used. We rename it to
- * avoid conflict with other libraries that use the same workaround.
- */
-# define errno z_errno
-# endif
- extern int errno;
-#else
-# ifndef _WIN32_WCE
-# include <errno.h>
-# endif
+
+#ifdef Z_SOLO
+ typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
#endif
#ifndef local
@@ -52,13 +44,13 @@ typedef unsigned short ush;
typedef ush FAR ushf;
typedef unsigned long ulg;
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
+ return (strm->msg = ERR_MSG(err), (err))
/* To be used only when the state is known to be valid */
/* common constants */
@@ -90,16 +82,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
# define OS_CODE 0x00
-# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
- /* Allow compilation with ANSI keywords only enabled */
- void _Cdecl farfree( void *block );
- void *_Cdecl farmalloc( unsigned long nbytes );
-# else
-# include <alloc.h>
+# ifndef Z_SOLO
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
# endif
-# else /* MSC or DJGPP */
-# include <malloc.h>
# endif
#endif
@@ -119,18 +113,20 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#ifdef OS2
# define OS_CODE 0x06
-# ifdef M_I86
- #include <malloc.h>
+# if defined(M_I86) && !defined(Z_SOLO)
+# include <malloc.h>
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
# define OS_CODE 0x07
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef Z_SOLO
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
# endif
# endif
#endif
@@ -142,7 +138,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#ifdef WIN32
# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
# define OS_CODE 0x0b
-# define F_OPEN(name, mode) _wfopen((WCHAR *)(name), (WCHAR *)(mode)) /* Unicode */
# endif
#endif
@@ -154,7 +149,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define fdopen(fd,mode) NULL /* No fdopen() */
#endif
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
+#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
# if defined(_WIN32_WCE)
# define fdopen(fd,mode) NULL /* No fdopen() */
# ifndef _PTRDIFF_T_DEFINED
@@ -166,6 +161,19 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
+#if defined(__BORLANDC__) && !defined(MSDOS)
+ #pragma warn -8004
+ #pragma warn -8008
+ #pragma warn -8066
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_WIN32) && \
+ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#endif
+
/* common defaults */
#ifndef OS_CODE
@@ -178,40 +186,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* functions */
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#if defined(__CYGWIN__)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#ifndef HAVE_VSNPRINTF
-# ifdef MSDOS
- /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
- but for now we just assume it doesn't. */
-# define NO_vsnprintf
-# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# define vsnprintf _vsnprintf
-# endif
-# endif
-# ifdef __SASC
-# define NO_vsnprintf
-# endif
-#endif
-#ifdef VMS
-# define NO_vsnprintf
-#endif
-
-#if defined(pyr)
+#if defined(pyr) || defined(Z_SOLO)
# define NO_MEMCPY
#endif
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
@@ -235,16 +210,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemzero(dest, len) memset(dest, 0, len)
# endif
#else
- extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
- extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
- extern void zmemzero OF((Bytef* dest, uInt len));
+ void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
#endif
/* Diagnostic functions */
#ifdef DEBUG
# include <stdio.h>
- extern int z_verbose;
- extern void z_error OF((char *m));
+ extern int ZLIB_INTERNAL z_verbose;
+ extern void ZLIB_INTERNAL z_error OF((char *m));
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -260,13 +235,19 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define Tracecv(c,x)
#endif
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void zcfree OF((voidpf opaque, voidpf ptr));
+#ifndef Z_SOLO
+ voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+ unsigned size));
+ void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
+#endif
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+/* Reverse the bytes in a 32-bit value */
+#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
#endif /* ZUTIL_H */
diff --git a/erts/epmd/src/Makefile.in b/erts/epmd/src/Makefile.in
index e94674e6f4..0c7787a3b1 100644
--- a/erts/epmd/src/Makefile.in
+++ b/erts/epmd/src/Makefile.in
@@ -18,6 +18,9 @@
#
include $(ERL_TOP)/make/target.mk
+ifeq ($(findstring ose,$(TARGET)),ose)
+include $(ERL_TOP)/make/$(TARGET)/ose_lm.mk
+endif
ifeq ($(TYPE),debug)
PURIFY =
@@ -64,9 +67,13 @@ else
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
else
+ifeq ($(findstring ose,$(TARGET)),ose)
+ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
+else
ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@ -lm
endif
endif
+endif
ERTS_LIB = $(ERL_TOP)/erts/lib_src/obj/$(TARGET)/$(TYPE)/MADE
@@ -74,7 +81,11 @@ CC = @CC@
WFLAGS = @WFLAGS@
CFLAGS = @CFLAGS@ @DEFS@ $(TYPE_FLAGS) $(WFLAGS) $(ERTS_INCL)
LD = @LD@
-LIBS = @LIBS@ $(ERTS_INTERNAL_LIBS)
+ifeq ($(findstring ose,$(TARGET)),ose)
+LIBS = $(ERTS_INTERNAL_LIBS) @LIBS@
+else
+LIBS = @LIBS@ @SYSTEMD_DAEMON_LIBS@ $(ERTS_INTERNAL_LIBS)
+endif
LDFLAGS = @LDFLAGS@
@@ -123,12 +134,25 @@ clean:
rm -f *.o
rm -f *~ core
+ifeq ($(findstring ose,$(TARGET)),ose)
+$(OBJDIR)/ose_confd.o: $(OSE_CONFD)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+$(OBJDIR)/crt0_lm.o: $(CRT0_LM)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+OSE_LM_OBJS += $(OBJDIR)/ose_confd.o $(OBJDIR)/crt0_lm.o
+endif
+
#
# Objects & executables
#
+ifeq ($(findstring ose,$(TARGET)),ose)
+$(BINDIR)/$(EPMD): $(EPMD_OBJS) $(ERTS_LIB) $(OSE_LM_OBJS)
+ $(call build-ose-load-module, $@, $(EPMD_OBJS) $(OSE_LM_OBJS), $(LIBS), $(EPMD_LMCONF))
+else
$(BINDIR)/$(EPMD): $(EPMD_OBJS) $(ERTS_LIB)
$(ld_verbose)$(PURIFY) $(LD) $(LDFLAGS) -o $@ $(EPMD_OBJS) $(LIBS)
+endif
$(OBJDIR)/%.o: %.c epmd.h epmd_int.h
$(V_CC) $(CFLAGS) $(EPMD_FLAGS) -o $@ -c $<
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index 2d55b37ff3..9699491526 100644
--- a/erts/epmd/src/epmd.c
+++ b/erts/epmd/src/epmd.c
@@ -52,7 +52,7 @@ static int epmd_main(int, char **, int);
int epmd_dbg(int level,int port) /* Utility to debug epmd... */
{
- char* argv[MAX_DEBUG+2];
+ char* argv[MAX_DEBUG+4];
char ibuff[100];
int argc = 0;
@@ -175,6 +175,9 @@ int main(int argc, char** argv)
g->nodes.reg = g->nodes.unreg = g->nodes.unreg_tail = NULL;
g->nodes.unreg_count = 0;
g->active_conn = 0;
+#ifdef HAVE_SYSTEMD_DAEMON
+ g->is_systemd = 0;
+#endif /* HAVE_SYSTEMD_DAEMON */
for (i = 0; i < MAX_LISTEN_SOCKETS; i++)
g->listenfd[i] = -1;
@@ -248,8 +251,12 @@ int main(int argc, char** argv)
else
usage(g);
epmd_cleanup_exit(g,0);
- }
- else
+#ifdef HAVE_SYSTEMD_DAEMON
+ } else if (strcmp(argv[0], "-systemd") == 0) {
+ g->is_systemd = 1;
+ argv++; argc--;
+#endif /* HAVE_SYSTEMD_DAEMON */
+ } else
usage(g);
}
dbg_printf(g,1,"epmd running - daemon = %d",g->is_daemon);
@@ -389,7 +396,7 @@ static void run_daemon(EpmdVars *g)
}
#endif
-#if defined(VXWORKS)
+#if defined(VXWORKS) || defined(__OSE__)
static void run_daemon(EpmdVars *g)
{
run(g);
@@ -454,6 +461,11 @@ static void usage(EpmdVars *g)
fprintf(stderr, " Forcibly unregisters a name with epmd\n");
fprintf(stderr, " (only allowed if -relaxed_command_check was given when \n");
fprintf(stderr, " epmd was started).\n");
+#ifdef HAVE_SYSTEMD_DAEMON
+ fprintf(stderr, " -systemd\n");
+ fprintf(stderr, " Wait for socket from systemd. The option makes sense\n");
+ fprintf(stderr, " when started from .socket unit.\n");
+#endif /* HAVE_SYSTEMD_DAEMON */
epmd_cleanup_exit(g,1);
}
@@ -486,7 +498,11 @@ static void dbg_gen_printf(int onsyslog,int perr,int from_level,
#ifdef HAVE_SYSLOG_H
if (onsyslog)
{
- erts_vsnprintf(buf, DEBUG_BUFFER_SIZE, format, args);
+ int len;
+ len = erts_vsnprintf(buf, DEBUG_BUFFER_SIZE, format, args);
+ if (perr != 0 && len < sizeof(buf)) {
+ erts_snprintf(buf+len, sizeof(buf)-len, ": %s", strerror(perr));
+ }
syslog(LOG_ERR,"epmd: %s",buf);
}
#endif
@@ -577,9 +593,11 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval)
for(i=0; g->argv[i] != NULL; ++i)
free(g->argv[i]);
free(g->argv);
- }
-
-
+ }
+#ifdef HAVE_SYSTEMD_DAEMON
+ sd_notifyf(0, "STATUS=Exited.\n"
+ "ERRNO=%i", exitval);
+#endif /* HAVE_SYSTEMD_DAEMON */
exit(exitval);
}
diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c
index 8817bde8d7..bd30bc35d9 100644
--- a/erts/epmd/src/epmd_cli.c
+++ b/erts/epmd/src/epmd_cli.c
@@ -118,7 +118,7 @@ void epmd_call(EpmdVars *g,int what)
if (!g->silent) {
rval = erts_snprintf(buf, OUTBUF_SIZE,
"epmd: up and running on port %d with data:\n", j);
- write(1, buf, rval);
+ fwrite(buf, 1, rval, stdout);
}
while(1) {
if ((rval = read(fd,buf,OUTBUF_SIZE)) <= 0) {
@@ -126,7 +126,7 @@ void epmd_call(EpmdVars *g,int what)
epmd_cleanup_exit(g,0);
}
if (!g->silent)
- write(1, buf, rval); /* Potentially UTF-8 encoded */
+ fwrite(buf, 1, rval, stdout); /* Potentially UTF-8 encoded */
}
}
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index 656dbd1f45..52badd7086 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -36,6 +36,13 @@
#define DONT_USE_MAIN
#endif
+#ifdef __OSE__
+# define NO_DAEMON
+# define NO_SYSLOG
+# define NO_SYSCONF
+# define NO_FCNTL
+#endif
+
/* ************************************************************************ */
/* Standard includes */
@@ -92,7 +99,11 @@
#endif /* ! WIN32 */
#include <ctype.h>
-#include <signal.h>
+
+#if !defined(__OSE__)
+# include <signal.h>
+#endif
+
#include <errno.h>
@@ -110,6 +121,14 @@
#include <stdarg.h>
+#ifdef __OSE__
+# include "sys/select.h"
+#endif
+
+#ifdef HAVE_SYSTEMD_DAEMON
+# include <systemd/sd-daemon.h>
+#endif /* HAVE_SYSTEMD_DAEMON */
+
/* ************************************************************************ */
/* Replace some functions by others by making the function name a macro */
@@ -321,6 +340,9 @@ typedef struct {
int listenfd[MAX_LISTEN_SOCKETS];
char *addresses;
char **argv;
+#ifdef HAVE_SYSTEMD_DAEMON
+ int is_systemd;
+#endif /* HAVE_SYSTEMD_DAEMON */
} EpmdVars;
void dbg_printf(EpmdVars*,int,const char*,...);
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index 90df7cc25a..26e42adb19 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -29,6 +29,11 @@
# define INADDR_NONE 0xffffffff
#endif
+#if defined(__OSE__)
+# include "sys/ioctl.h"
+# define sleep(x) delay(x*1000)
+#endif
+
/*
*
* This server is a local name server for Erlang nodes. Erlang nodes can
@@ -208,6 +213,39 @@ void run(EpmdVars *g)
node_init(g);
g->conn = conn_init(g);
+#ifdef HAVE_SYSTEMD_DAEMON
+ if (g->is_systemd)
+ {
+ int n;
+
+ dbg_printf(g,2,"try to obtain sockets from systemd");
+
+ n = sd_listen_fds(0);
+ if (n < 0)
+ {
+ dbg_perror(g,"cannot obtain sockets from systemd");
+ epmd_cleanup_exit(g,1);
+ }
+ else if (n == 0)
+ {
+ dbg_tty_printf(g,0,"systemd provides no sockets");
+ epmd_cleanup_exit(g,1);
+ }
+ else if (n > MAX_LISTEN_SOCKETS)
+ {
+ dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses", MAX_LISTEN_SOCKETS);
+ epmd_cleanup_exit(g,1);
+ }
+ num_sockets = n;
+ for (i = 0; i < num_sockets; i++)
+ {
+ g->listenfd[i] = listensock[i] = SD_LISTEN_FDS_START + i;
+ }
+ }
+ else
+ {
+#endif /* HAVE_SYSTEMD_DAEMON */
+
dbg_printf(g,2,"try to initiate listening port %d", g->port);
if (g->addresses != NULL && /* String contains non-separator characters if: */
@@ -272,8 +310,11 @@ void run(EpmdVars *g)
SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport);
num_sockets = 1;
}
+#ifdef HAVE_SYSTEMD_DAEMON
+ }
+#endif /* HAVE_SYSTEMD_DAEMON */
-#if !defined(__WIN32__)
+#if !defined(__WIN32__) && !defined(__OSE__)
/* We ignore the SIGPIPE signal that is raised when we call write
twice on a socket closed by the other end. */
signal(SIGPIPE, SIG_IGN);
@@ -289,6 +330,13 @@ void run(EpmdVars *g)
FD_ZERO(&g->orig_read_mask);
g->select_fd_top = 0;
+#ifdef HAVE_SYSTEMD_DAEMON
+ if (g->is_systemd)
+ for (i = 0; i < num_sockets; i++)
+ select_fd_set(g, listensock[i]);
+ else
+ {
+#endif /* HAVE_SYSTEMD_DAEMON */
for (i = 0; i < num_sockets; i++)
{
if ((listensock[i] = socket(FAMILY,SOCK_STREAM,0)) < 0)
@@ -351,6 +399,12 @@ void run(EpmdVars *g)
}
select_fd_set(g, listensock[i]);
}
+#ifdef HAVE_SYSTEMD_DAEMON
+ }
+ sd_notifyf(0, "READY=1\n"
+ "STATUS=Processing port mapping requests...\n"
+ "MAINPID=%lu", (unsigned long) getpid());
+#endif /* HAVE_SYSTEMD_DAEMON */
dbg_tty_printf(g,2,"entering the main select() loop");
diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl
index cc24a556a3..a752abf33b 100644
--- a/erts/epmd/test/epmd_SUITE.erl
+++ b/erts/epmd/test/epmd_SUITE.erl
@@ -69,6 +69,8 @@
returns_valid_empty_extra/1,
returns_valid_populated_extra_with_nulls/1,
+ names_stdout/1,
+
buffer_overrun_1/1,
buffer_overrun_2/1,
no_nonlocal_register/1,
@@ -118,6 +120,7 @@ all() ->
too_large, alive_req_too_small_1, alive_req_too_small_2,
alive_req_too_large, returns_valid_empty_extra,
returns_valid_populated_extra_with_nulls,
+ names_stdout,
{group, buffer_overrun}, no_nonlocal_register,
no_nonlocal_kill, no_live_killing].
@@ -759,6 +762,24 @@ returns_valid_populated_extra_with_nulls(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+names_stdout(doc) ->
+ ["Test that epmd -names prints registered nodes to stdout"];
+names_stdout(suite) ->
+ [];
+names_stdout(Config) when is_list(Config) ->
+ ?line ok = epmdrun(),
+ ?line {ok,Sock} = register_node("foobar"),
+ ?line ok = epmdrun("-names"),
+ ?line {ok, Data} = receive {_Port, {data, D}} -> {ok, D}
+ after 10000 -> {error, timeout}
+ end,
+ ?line {match,_} = re:run(Data, "^epmd: up and running", [multiline]),
+ ?line {match,_} = re:run(Data, "^name foobar at port", [multiline]),
+ ?line ok = close(Sock),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
buffer_overrun_1(suite) ->
[];
buffer_overrun_1(doc) ->
@@ -968,7 +989,7 @@ epmdrun(Epmd,Args0) ->
O ->
" "++O
end,
- osrun("\"" ++ Epmd ++ "\"" ++ Args ++ " " ?EPMDARGS " -port " ++ integer_to_list(?PORT)).
+ osrun("\"" ++ Epmd ++ "\"" ++ " " ?EPMDARGS " -port " ++ integer_to_list(?PORT) ++ Args).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
index 5c1ce51644..0cf965f915 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
+# Copyright Ericsson AB 1996-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -20,6 +20,10 @@
include $(ERL_TOP)/make/output.mk
include $(ERL_TOP)/make/target.mk
+ifeq ($(findstring ose,$(TARGET)),ose)
+include $(ERL_TOP)/make/$(TARGET)/ose_lm.mk
+endif
+
ERTS_LIB_TYPEMARKER=.$(TYPE)
USING_MINGW=@MIXED_CYGWIN_MINGW@
@@ -62,7 +66,9 @@ LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
# For clock_gettime in heart
+ifneq ($(TARGET),arm-unknown-linux-androideabi)
RTLIBS = @LIBRT@
+endif
ifeq ($(TARGET),win32)
ifeq ($(TYPE),debug)
@@ -82,6 +88,16 @@ OSEETC = ../ose
WINETC = ../win32
ifeq ($(TARGET), win32)
+ETC = $(WINETC)
+else
+ifeq ($(findstring ose,$(TARGET)),ose)
+ETC = $(OSEETC)
+else
+ETC = $(UXETC)
+endif
+endif
+
+ifeq ($(TARGET), win32)
ERLEXEC = erlexec.dll
else
ERLEXEC = erlexec
@@ -147,7 +163,8 @@ INSTALL_TOP_BIN = $(BINDIR)/Install.exe
INSTALL_PROGS = \
$(INET_GETHOST) \
$(BINDIR)/heart.exe $(BINDIR)/erlsrv.exe \
- $(BINDIR)/erl.exe $(BINDIR)/werl.exe \
+ $(BINDIR)/erl.exe $(BINDIR)/erl_log.exe \
+ $(BINDIR)/werl.exe \
$(BINDIR)/$(ERLEXEC) \
$(INSTALL_EMBEDDED_PROGS)
@@ -161,7 +178,26 @@ endif
PORT_ENTRY_POINT=erl_port_entry
ENTRY_LDFLAGS=-entry:$(PORT_ENTRY_POINT)
-else # UNIX (!win32)
+else
+ifeq ($(findstring ose,$(TARGET)),ose)
+ENTRY_LDFLAGS=
+ENTRY_OBJ=
+ERLSRV_OBJECTS=
+MC_OUTPUTS=
+INET_GETHOST =
+INSTALL_EMBEDDED_PROGS = $(BINDIR)/run_erl_lm
+INSTALL_EMBEDDED_DATA =
+INSTALL_TOP = Install
+INSTALL_TOP_BIN =
+INSTALL_MISC =
+INSTALL_SRC =
+ERLEXECDIR = .
+INSTALL_LIBS =
+INSTALL_OBJS =
+INSTALL_INCLUDES =
+TEXTFILES = Install erl.src
+INSTALL_PROGS = $(INSTALL_EMBEDDED_PROGS)
+else # UNIX (!win32 && !ose)
ENTRY_LDFLAGS=
ENTRY_OBJ=
ERLSRV_OBJECTS=
@@ -170,11 +206,11 @@ INET_GETHOST = $(BINDIR)/inet_gethost@EXEEXT@
INSTALL_EMBEDDED_PROGS += $(BINDIR)/typer@EXEEXT@ $(BINDIR)/dialyzer@EXEEXT@ \
$(BINDIR)/erlc@EXEEXT@ $(BINDIR)/escript@EXEEXT@ $(BINDIR)/ct_run@EXEEXT@ \
$(BINDIR)/run_erl $(BINDIR)/to_erl $(BINDIR)/dyn_erl
-INSTALL_EMBEDDED_DATA = ../unix/start.src ../unix/start_erl.src
+INSTALL_EMBEDDED_DATA = $(UXETC)/start.src $(UXETC)/start_erl.src
INSTALL_TOP = Install
INSTALL_TOP_BIN =
-INSTALL_MISC = ../unix/format_man_pages ../unix/makewhatis
-INSTALL_SRC = ../unix/setuid_socket_wrap.c #delivered as an example
+INSTALL_MISC = $(UXETC)/format_man_pages $(UXETC)/makewhatis
+INSTALL_SRC = $(UXETC)/setuid_socket_wrap.c #delivered as an example
ERLEXECDIR = .
INSTALL_LIBS =
INSTALL_OBJS =
@@ -186,6 +222,7 @@ INSTALL_PROGS = \
$(BINDIR)/$(ERLEXEC) \
$(INSTALL_EMBEDDED_PROGS)
endif
+endif
.PHONY: etc
etc: $(ENTRY_OBJ) $(INSTALL_PROGS) $(INSTALL_LIBS) $(TEXTFILES) $(INSTALL_TOP_BIN)
@@ -230,11 +267,14 @@ endif
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/run_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/to_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/dyn_erl.o
- rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/safe_string.o
+ rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/safe_string.o
+ rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/run_erl_common.o
+ rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/to_erl_common.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/typer.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/ct_run.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/vxcall.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/erl.o
+ rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/erl_log.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/werl.o
rm -f $(TEXTFILES)
rm -f *~ core
@@ -258,6 +298,9 @@ $(BINDIR)/erl@EXEEXT@: $(OBJDIR)/erl.o $(OBJDIR)/init_file.o $(OBJDIR)/$(ERLRES_
$(BINDIR)/werl@EXEEXT@: $(OBJDIR)/werl.o $(OBJDIR)/init_file.o $(OBJDIR)/$(ERLRES_OBJ)
$(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/werl.o $(OBJDIR)/init_file.o $(OBJDIR)/$(ERLRES_OBJ)
+$(BINDIR)/erl_log@EXEEXT@: $(OBJDIR)/erl_log.o
+ $(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/erl_log.o
+
$(BINDIR)/start_erl@EXEEXT@: $(OBJDIR)/start_erl.o
$(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/start_erl.o
@@ -311,6 +354,10 @@ $(OBJDIR)/werl.o: $(WINETC)/erl.c $(WINETC)/init_file.h $(RC_GENERATED)
$(V_CC) $(CFLAGS) -DBUILD_TYPE=\"-$(TYPE)\" -DERL_RUN_SHARED_LIB=1 \
-DWIN32_WERL -o $@ -c $(WINETC)/erl.c
+$(OBJDIR)/erl_log.o: $(WINETC)/erl_log.c $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -DBUILD_TYPE=\"-$(TYPE)\" -DERL_RUN_SHARED_LIB=1 \
+ -o $@ -c $(WINETC)/erl_log.c
+
$(OBJDIR)/erl.o: $(WINETC)/erl.c $(WINETC)/init_file.h $(RC_GENERATED)
$(V_CC) $(CFLAGS) -DBUILD_TYPE=\"-$(TYPE)\" -DERL_RUN_SHARED_LIB=1 \
-o $@ -c $(WINETC)/erl.c
@@ -370,29 +417,33 @@ $(OBJDIR)/heart.o: heart.c $(RC_GENERATED)
$(OBJDIR)/inet_gethost.o: inet_gethost.c $(RC_GENERATED)
$(V_CC) $(CFLAGS) -o $@ -c inet_gethost.c
+# inet_gethost
$(BINDIR)/inet_gethost@EXEEXT@: $(OBJDIR)/inet_gethost.o $(ENTRY_OBJ) $(ERTS_LIB)
$(ld_verbose)$(PURIFY) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/inet_gethost.o $(ENTRY_OBJ) $(LIBS) $(ERTS_INTERNAL_LIBS)
-$(BINDIR)/run_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/run_erl.o
- $(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/safe_string.o $(OBJDIR)/run_erl.o $(LIBS)
-
-$(OBJDIR)/run_erl.o: ../unix/run_erl.c $(RC_GENERATED)
- $(V_CC) $(CFLAGS) -o $@ -c ../unix/run_erl.c
-
-$(BINDIR)/to_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/to_erl.o
- $(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/safe_string.o $(OBJDIR)/to_erl.o
-
-$(OBJDIR)/to_erl.o: ../unix/to_erl.c $(RC_GENERATED)
- $(V_CC) $(CFLAGS) -o $@ -c ../unix/to_erl.c
-
+# run_erl
+$(BINDIR)/run_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/run_erl.o $(OBJDIR)/run_erl_common.o
+ $(V_LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+$(OBJDIR)/run_erl.o: $(ETC)/run_erl.c ../common/run_erl_common.h $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -I ../common/ -o $@ -c $(ETC)/run_erl.c
+$(OBJDIR)/run_erl_common.o: ../common/run_erl_common.c ../common/run_erl_common.h $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+
+# to_erl
+$(BINDIR)/to_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/to_erl.o $(OBJDIR)/to_erl_common.o
+ $(V_LD) $(LDFLAGS) -o $@ $^
+$(OBJDIR)/to_erl.o: $(ETC)/to_erl.c ../common/safe_string.h $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -I ../common/ -o $@ -c $(ETC)/to_erl.c
+$(OBJDIR)/to_erl_common.o: ../common/to_erl_common.c ../common/to_erl_common.h $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+
+# dyn_erl
$(BINDIR)/dyn_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/dyn_erl.o
$(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/safe_string.o $(OBJDIR)/dyn_erl.o
-
-$(OBJDIR)/dyn_erl.o: ../unix/dyn_erl.c $(RC_GENERATED)
- $(V_CC) $(CFLAGS) -o $@ -c ../unix/dyn_erl.c
-
-$(OBJDIR)/safe_string.o: ../unix/safe_string.c $(RC_GENERATED)
- $(V_CC) $(CFLAGS) -o $@ -c ../unix/safe_string.c
+$(OBJDIR)/dyn_erl.o: $(UXETC)/dyn_erl.c $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -o $@ -c $(UXETC)/dyn_erl.c
+$(OBJDIR)/safe_string.o: ../common/safe_string.c $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -o $@ -c ../common/safe_string.c
ifneq ($(TARGET),win32)
$(BINDIR)/$(ERLEXEC): $(OBJDIR)/$(ERLEXEC).o $(ERTS_LIB)
@@ -401,6 +452,7 @@ $(BINDIR)/$(ERLEXEC): $(OBJDIR)/$(ERLEXEC).o $(ERTS_LIB)
$(OBJDIR)/$(ERLEXEC).o: $(ERLEXECDIR)/$(ERLEXEC).c $(RC_GENERATED)
$(V_CC) -I$(EMUDIR) $(CFLAGS) -o $@ -c $(ERLEXECDIR)/$(ERLEXEC).c
endif
+
$(BINDIR)/erlc@EXEEXT@: $(OBJDIR)/erlc.o $(ERTS_LIB)
$(ld_verbose)$(PURIFY) $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/erlc.o -L$(OBJDIR) $(LIBS) $(ERTS_INTERNAL_LIBS)
@@ -433,18 +485,42 @@ $(OBJDIR)/ct_run.o: ct_run.c $(RC_GENERATED)
-Install: ../unix/Install.src ../../vsn.mk $(TARGET)/Makefile
+Install: $(UXETC)/Install.src ../../vsn.mk $(TARGET)/Makefile
$(vsn_verbose)sed -e 's;%I_VSN%;$(VSN);' \
-e 's;%EMULATOR%;$(EMULATOR);' \
-e 's;%EMULATOR_NUMBER%;$(EMULATOR_NUMBER);' \
-e 's;%I_SYSTEM_VSN%;$(SYSTEM_VSN);' \
- ../unix/Install.src > Install
+ $(UXETC)/Install.src > Install
-erl.src: ../unix/erl.src.src ../../vsn.mk $(TARGET)/Makefile
+erl.src: $(UXETC)/erl.src.src ../../vsn.mk $(TARGET)/Makefile
$(vsn_verbose)sed -e 's;%EMULATOR%;$(EMULATOR);' \
-e 's;%EMULATOR_NUMBER%;$(EMULATOR_NUMBER);' \
-e 's;%VSN%;$(VSN);' \
- ../unix/erl.src.src > erl.src
+ $(UXETC)/erl.src.src > erl.src
+
+#---------------------------------------------------------
+# OSE specific targets
+#---------------------------------------------------------
+ifeq ($(findstring ose,$(TARGET)),ose)
+$(OBJDIR)/ose_confd.o: $(OSE_CONFD)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+$(OBJDIR)/crt0_lm.o: $(CRT0_LM)
+ $(V_CC) $(CFLAGS) -o $@ -c $<
+OSE_LM_OBJS += $(OBJDIR)/ose_confd.o $(OBJDIR)/crt0_lm.o
+
+$(BINDIR)/run_erl_lm: $(OBJDIR)/run_erl_main.o $(OBJDIR)/safe_string.o $(OBJDIR)/run_erl.o $(OBJDIR)/run_erl_common.o $(OBJDIR)/to_erl_common.o $(OSE_LM_OBJS)
+ $(call build-ose-load-module, $@, $^, $(LIBS), $(RUN_ERL_LMCONF))
+
+
+$(OBJDIR)/run_erl_main.o: $(OSEETC)/run_erl_main.c $(OSEETC)/run_erl.h ../common/to_erl_common.h $(RC_GENERATED)
+ $(V_CC) $(CFLAGS) -I ../common/ -o $@ -c $(OSEETC)/run_erl_main.c
+
+endif
+
+#---------------------------------------------------------
+# End of ose specific targets.
+#---------------------------------------------------------
+
# ----------------------------------------------------
# Release Target
@@ -478,17 +554,12 @@ ifneq ($(INSTALL_MISC),)
$(INSTALL_DIR) "$(RELEASE_PATH)/misc"
$(INSTALL_SCRIPT) $(INSTALL_MISC) "$(RELEASE_PATH)/misc"
endif
-ifneq ($(INSTALL_ERL_OSE),)
- $(INSTALL_DIR) "$(RELEASE_PATH)/build_erl_ose"
- cd $(OSEETC) && $(TAR) erl_ose_$(SYSTEM_VSN).tar $(INSTALL_ERL_OSE)
- cd $(OSEETC) && $(INSTALL_SCRIPT) erl_ose_$(SYSTEM_VSN).tar "$(RELEASE_PATH)/build_erl_ose"
-endif
ifneq ($(INSTALL_SRC),)
$(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/src"
$(INSTALL_DATA) $(INSTALL_SRC) "$(RELEASE_PATH)/erts-$(VSN)/src"
endif
ifneq ($(INSTALL_EMBEDDED_DATA),)
- $(INSTALL_DATA) $(INSTALL_EMBEDDED_DATA) "$(RELEASE_PATH)/erts-$(VSN)/bin"
+ $(INSTALL_SCRIPT) $(INSTALL_EMBEDDED_DATA) "$(RELEASE_PATH)/erts-$(VSN)/bin"
endif
ifneq ($(INSTALL_LIBS),)
$(INSTALL_DATA) $(INSTALL_LIBS) "$(RELEASE_PATH)/erts-$(VSN)/bin"
diff --git a/erts/etc/common/ct_run.c b/erts/etc/common/ct_run.c
index 853785dcd1..9e67b94f30 100644
--- a/erts/etc/common/ct_run.c
+++ b/erts/etc/common/ct_run.c
@@ -117,9 +117,14 @@ char *strerror(int errnum)
}
#endif /* !HAVE_STRERROR */
-int
-main(int argc, char** argv)
+#ifdef __WIN32__
+int wmain(int argc, wchar_t **wcargv)
+{
+ char** argv;
+#else
+int main(int argc, char** argv)
{
+#endif
int eargv_size;
int eargc_base; /* How many arguments in the base of eargv. */
char* emulator;
@@ -129,7 +134,21 @@ main(int argc, char** argv)
int dist_mode;
int cnt;
int erl_args;
- char** argv0 = argv;
+ char** argv0;
+
+#ifdef __WIN32__
+ int i;
+ int len;
+ /* Convert argv to utf8 */
+ argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, argv[i], len, NULL, NULL);
+ }
+ argv[argc] = NULL;
+#endif
+ argv0 = argv;
emulator = get_default_emulator(argv[0]);
@@ -220,7 +239,7 @@ main(int argc, char** argv)
*/
if (ct_mode == VTS_MODE) {
- PUSH4("-s", "webtool", "script_start", "vts");
+ PUSH4("-s", "ct_webtool", "script_start", "vts");
if (browser[0] != '\0') PUSH(browser);
PUSH3("-s", "ct_run", "script_start");
}
@@ -295,48 +314,50 @@ push_words(char* src)
PUSH(strsave(sbuf));
}
#ifdef __WIN32__
-char *make_commandline(char **argv)
+wchar_t *make_commandline(char **argv)
{
- static char *buff = NULL;
+ static wchar_t *buff = NULL;
static int siz = 0;
- int num = 0;
- char **arg, *p;
+ int num = 0, len;
+ char **arg;
+ wchar_t *p;
- if (*argv == NULL) {
- return "";
+ if (*argv == NULL) {
+ return L"";
}
for (arg = argv; *arg != NULL; ++arg) {
num += strlen(*arg)+1;
}
if (!siz) {
siz = num;
- buff = malloc(siz*sizeof(char));
+ buff = (wchar_t *) emalloc(siz*sizeof(wchar_t));
} else if (siz < num) {
siz = num;
- buff = realloc(buff,siz*sizeof(char));
+ buff = (wchar_t *) realloc(buff,siz*sizeof(wchar_t));
}
p = buff;
+ num=0;
for (arg = argv; *arg != NULL; ++arg) {
- strcpy(p,*arg);
- p+=strlen(*arg);
- *p++=' ';
+ len = MultiByteToWideChar(CP_UTF8, 0, *arg, -1, p, siz);
+ p+=(len-1);
+ *p++=L' ';
}
- *(--p) = '\0';
+ *(--p) = L'\0';
if (debug) {
- printf("Processed commandline:%s\n",buff);
+ printf("Processed command line:%S\n",buff);
}
return buff;
}
int my_spawnvp(char **argv)
{
- STARTUPINFO siStartInfo;
+ STARTUPINFOW siStartInfo;
PROCESS_INFORMATION piProcInfo;
DWORD ec;
- memset(&siStartInfo,0,sizeof(STARTUPINFO));
- siStartInfo.cb = sizeof(STARTUPINFO);
+ memset(&siStartInfo,0,sizeof(STARTUPINFOW));
+ siStartInfo.cb = sizeof(STARTUPINFOW);
siStartInfo.dwFlags = STARTF_USESTDHANDLES;
siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -345,7 +366,7 @@ int my_spawnvp(char **argv)
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
- if (!CreateProcess(NULL,
+ if (!CreateProcessW(NULL,
make_commandline(argv),
NULL,
NULL,
@@ -432,6 +453,18 @@ strsave(char* string)
return p;
}
+static int
+file_exists(char *progname)
+{
+#ifdef __WIN32__
+ wchar_t wcsbuf[MAXPATHLEN];
+ MultiByteToWideChar(CP_UTF8, 0, progname, -1, wcsbuf, MAXPATHLEN);
+ return (_waccess(wcsbuf, 0) != -1);
+#else
+ return (access(progname, 1) != -1);
+#endif
+}
+
static char*
get_default_emulator(char* progname)
{
@@ -445,15 +478,8 @@ get_default_emulator(char* progname)
for (s = sbuf+strlen(sbuf); s >= sbuf; s--) {
if (IS_DIRSEP(*s)) {
strcpy(s+1, ERL_NAME);
-#ifdef __WIN32__
- if (_access(sbuf, 0) != -1) {
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#else
- if (access(sbuf, 1) != -1) {
- return strsave(sbuf);
- }
-#endif
break;
}
}
diff --git a/erts/etc/common/dialyzer.c b/erts/etc/common/dialyzer.c
index b8a7a2bf03..09afb25182 100644
--- a/erts/etc/common/dialyzer.c
+++ b/erts/etc/common/dialyzer.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2006-2012. All Rights Reserved.
+ * Copyright Ericsson AB 2006-2013. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -104,20 +104,31 @@ get_env(char *key)
{
#ifdef __WIN32__
DWORD size = 32;
- char *value = NULL;
+ char *value=NULL;
+ wchar_t *wcvalue = NULL;
+ wchar_t wckey[256];
+ int len;
+
+ MultiByteToWideChar(CP_UTF8, 0, key, -1, wckey, 256);
+
while (1) {
DWORD nsz;
- if (value)
- free(value);
- value = emalloc(size);
+ if (wcvalue)
+ free(wcvalue);
+ wcvalue = (wchar_t*) emalloc(size*sizeof(wchar_t));
SetLastError(0);
- nsz = GetEnvironmentVariable((LPCTSTR) key, (LPTSTR) value, size);
+ nsz = GetEnvironmentVariableW(wckey, wcvalue, size);
if (nsz == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
- free(value);
+ free(wcvalue);
return NULL;
}
- if (nsz <= size)
+ if (nsz <= size) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, NULL, 0, NULL, NULL);
+ value = emalloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, value, len, NULL, NULL);
+ free(wcvalue);
return value;
+ }
size = nsz;
}
#else
@@ -134,9 +145,14 @@ free_env_val(char *value)
#endif
}
-int
-main(int argc, char** argv)
+#ifdef __WIN32__
+int wmain(int argc, wchar_t **wcargv)
+{
+ char** argv;
+#else
+int main(int argc, char** argv)
{
+#endif
int eargv_size;
int eargc_base; /* How many arguments in the base of eargv. */
char* emulator;
@@ -144,6 +160,18 @@ main(int argc, char** argv)
int i;
int need_shell = 0;
+#ifdef __WIN32__
+ int len;
+ /* Convert argv to utf8 */
+ argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, argv[i], len, NULL, NULL);
+ }
+ argv[argc] = NULL;
+#endif
+
env = get_env("DIALYZER_EMULATOR");
emulator = env ? env : get_default_emulator(argv[0]);
@@ -260,49 +288,52 @@ push_words(char* src)
if (sbuf[0])
PUSH(strsave(sbuf));
}
+
#ifdef __WIN32__
-char *make_commandline(char **argv)
+wchar_t *make_commandline(char **argv)
{
- static char *buff = NULL;
+ static wchar_t *buff = NULL;
static int siz = 0;
- int num = 0;
- char **arg, *p;
+ int num = 0, len;
+ char **arg;
+ wchar_t *p;
if (*argv == NULL) {
- return "";
+ return L"";
}
for (arg = argv; *arg != NULL; ++arg) {
num += strlen(*arg)+1;
}
if (!siz) {
siz = num;
- buff = malloc(siz*sizeof(char));
+ buff = (wchar_t *) emalloc(siz*sizeof(wchar_t));
} else if (siz < num) {
siz = num;
- buff = realloc(buff,siz*sizeof(char));
+ buff = (wchar_t *) realloc(buff,siz*sizeof(wchar_t));
}
p = buff;
+ num=0;
for (arg = argv; *arg != NULL; ++arg) {
- strcpy(p,*arg);
- p+=strlen(*arg);
- *p++=' ';
+ len = MultiByteToWideChar(CP_UTF8, 0, *arg, -1, p, siz);
+ p+=(len-1);
+ *p++=L' ';
}
- *(--p) = '\0';
+ *(--p) = L'\0';
if (debug) {
- printf("Processed commandline:%s\n",buff);
+ printf("Processed command line:%S\n",buff);
}
return buff;
}
int my_spawnvp(char **argv)
{
- STARTUPINFO siStartInfo;
+ STARTUPINFOW siStartInfo;
PROCESS_INFORMATION piProcInfo;
DWORD ec;
- memset(&siStartInfo,0,sizeof(STARTUPINFO));
- siStartInfo.cb = sizeof(STARTUPINFO);
+ memset(&siStartInfo,0,sizeof(STARTUPINFOW));
+ siStartInfo.cb = sizeof(STARTUPINFOW);
siStartInfo.dwFlags = STARTF_USESTDHANDLES;
siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -311,7 +342,7 @@ int my_spawnvp(char **argv)
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
- if (!CreateProcess(NULL,
+ if (!CreateProcessW(NULL,
make_commandline(argv),
NULL,
NULL,
@@ -398,6 +429,18 @@ strsave(char* string)
return p;
}
+static int
+file_exists(char *progname)
+{
+#ifdef __WIN32__
+ wchar_t wcsbuf[MAXPATHLEN];
+ MultiByteToWideChar(CP_UTF8, 0, progname, -1, wcsbuf, MAXPATHLEN);
+ return (_waccess(wcsbuf, 0) != -1);
+#else
+ return (access(progname, 1) != -1);
+#endif
+}
+
static char*
get_default_emulator(char* progname)
{
@@ -411,15 +454,8 @@ get_default_emulator(char* progname)
for (s = sbuf+strlen(sbuf); s >= sbuf; s--) {
if (IS_DIRSEP(*s)) {
strcpy(s+1, ERL_NAME);
-#ifdef __WIN32__
- if (_access(sbuf, 0) != -1) {
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#else
- if (access(sbuf, 1) != -1) {
- return strsave(sbuf);
- }
-#endif
break;
}
}
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c
index c2d7c7c76d..055064abc4 100644
--- a/erts/etc/common/erlc.c
+++ b/erts/etc/common/erlc.c
@@ -60,7 +60,6 @@ static int eargc; /* Number of arguments in eargv. */
#define PUSH2(s, t) PUSH(s); PUSH(t)
#define PUSH3(s, t, u) PUSH2(s, t); PUSH(u)
-static char* output_type = NULL; /* Type of output file. */
#ifdef __WIN32__
static int pause_after_execution = 0;
#endif
@@ -71,7 +70,6 @@ static int pause_after_execution = 0;
static char* process_opt(int* pArgc, char*** pArgv, int offset);
static void error(char* format, ...);
-static void usage(void);
static char* emalloc(size_t size);
static char* strsave(char* string);
static void push_words(char* src);
@@ -114,20 +112,31 @@ get_env(char *key)
{
#ifdef __WIN32__
DWORD size = 32;
- char *value = NULL;
+ char *value=NULL;
+ wchar_t *wcvalue = NULL;
+ wchar_t wckey[256];
+ int len;
+
+ MultiByteToWideChar(CP_UTF8, 0, key, -1, wckey, 256);
+
while (1) {
DWORD nsz;
- if (value)
- free(value);
- value = emalloc(size);
+ if (wcvalue)
+ free(wcvalue);
+ wcvalue = (wchar_t *) emalloc(size*sizeof(wchar_t));
SetLastError(0);
- nsz = GetEnvironmentVariable((LPCTSTR) key, (LPTSTR) value, size);
+ nsz = GetEnvironmentVariableW(wckey, wcvalue, size);
if (nsz == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
- free(value);
+ free(wcvalue);
return NULL;
}
- if (nsz <= size)
+ if (nsz <= size) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, NULL, 0, NULL, NULL);
+ value = emalloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, value, len, NULL, NULL);
+ free(wcvalue);
return value;
+ }
size = nsz;
}
#else
@@ -144,16 +153,32 @@ free_env_val(char *value)
#endif
}
-
-int
-main(int argc, char** argv)
+#ifdef __WIN32__
+int wmain(int argc, wchar_t **wcargv)
{
- char cwd[MAXPATHLEN]; /* Current working directory. */
+ char** argv;
+#else
+int main(int argc, char** argv)
+{
+#endif
int eargv_size;
int eargc_base; /* How many arguments in the base of eargv. */
char* emulator;
char *env;
+#ifdef __WIN32__
+ int i;
+ int len;
+ /* Convert argv to utf8 */
+ argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, argv[i], len, NULL, NULL);
+ }
+ argv[argc] = NULL;
+#endif
+
env = get_env("ERLC_EMULATOR");
emulator = env ? env : get_default_emulator(argv[0]);
@@ -191,176 +216,41 @@ main(int argc, char** argv)
PUSH2("-mode", "minimal");
PUSH2("-boot", "start_clean");
PUSH3("-s", "erl_compile", "compile_cmdline");
+ PUSH("-extra");
/*
* Push standard arguments to Erlang.
- *
- * The @cwd argument was once needed, but from on R13B02 is optional.
- * For maximum compatibility between erlc and erl of different versions,
- * still provide the @cwd argument, unless it is too long to be
- * represented as an atom.
*/
- if (getcwd(cwd, sizeof(cwd)) == NULL)
- error("Failed to get current working directory: %s", strerror(errno));
-#ifdef __WIN32__
- (void) GetShortPathName(cwd, cwd, sizeof(cwd));
-#endif
- if (strlen(cwd) < 256) {
- PUSH2("@cwd", cwd);
- }
/*
* Parse all command line switches.
*/
- while (argc > 1 && (argv[1][0] == '-' || argv[1][0] == '+')) {
+ while (argc > 1) {
/*
* Options starting with '+' are passed on to Erlang.
*/
- if (argv[1][0] == '+') {
- PUSH2("@option", argv[1]+1);
- } else {
- /*
- * Interpret options starting with '-'.
- */
-
+ switch (argv[1][0]) {
+ case '+':
+ PUSH(argv[1]);
+ break;
+ case '-':
switch (argv[1][1]) {
- case 'b':
- output_type = process_opt(&argc, &argv, 0);
- PUSH2("@output_type", output_type);
- break;
- case 'c': /* Allowed for compatibility with 'erl'. */
- if (strcmp(argv[1], "-compile") != 0)
- goto error;
- break;
case 'd':
- debug = 1;
- break;
- case 'D':
- {
- char* def = process_opt(&argc, &argv, 0);
- char* equals;
-
- def = strsave(def); /* Do not clobber original. */
- if ((equals = strchr(def, '=')) == NULL) {
- PUSH2("@d", def);
- } else {
- *equals = '\0';
- equals++;
- PUSH3("@dv", def, equals);
- }
- }
- break;
- case 'I':
- PUSH2("@i", process_opt(&argc, &argv, 0));
- break;
- case 'M':
- {
- char *buf, *key, *val;
- size_t buf_len;
-
- if (argv[1][2] == '\0') { /* -M */
- /* Push the following options:
- * o 'makedep'
- * o {makedep_output, standard_io}
- */
- buf = strsave("makedep");
- PUSH2("@option", buf);
-
- key = "makedep_output";
- val = "standard_io";
- buf_len = 1 + strlen(key) + 1 + strlen(val) + 1 + 1;
- buf = emalloc(buf_len);
- snprintf(buf, buf_len, "{%s,%s}", key, val);
- PUSH2("@option", buf);
- } else if (argv[1][3] == '\0') {
- switch(argv[1][2]) {
- case 'D': /* -MD */
- /* Push the following options:
- * o 'makedep'
- */
- buf = strsave("makedep");
- PUSH2("@option", buf);
- break;
- case 'F': /* -MF <file> */
- /* Push the following options:
- * o 'makedep'
- * o {makedep_output, <file>}
- */
- buf = strsave("makedep");
- PUSH2("@option", buf);
-
- key = "makedep_output";
- val = process_opt(&argc, &argv, 1);
- buf_len = 1 + strlen(key) + 2 + strlen(val) + 2 + 1;
- buf = emalloc(buf_len);
- snprintf(buf, buf_len, "{%s,\"%s\"}", key, val);
- PUSH2("@option", buf);
- break;
- case 'T': /* -MT <target> */
- /* Push the following options:
- * o {makedep_target, <target>}
- */
- key = "makedep_target";
- val = process_opt(&argc, &argv, 1);
- buf_len = 1 + strlen(key) + 2 + strlen(val) + 2 + 1;
- buf = emalloc(buf_len);
- snprintf(buf, buf_len, "{%s,\"%s\"}", key, val);
- PUSH2("@option", buf);
- break;
- case 'Q': /* -MQ <target> */
- /* Push the following options:
- * o {makedep_target, <target>}
- * o makedep_quote_target
- */
- key = "makedep_target";
- val = process_opt(&argc, &argv, 1);
- buf_len = 1 + strlen(key) + 2 + strlen(val) + 2 + 1;
- buf = emalloc(buf_len);
- snprintf(buf, buf_len, "{%s,\"%s\"}", key, val);
- PUSH2("@option", buf);
-
- buf = strsave("makedep_quote_target");
- PUSH2("@option", buf);
- break;
- case 'G': /* -MG */
- /* Push the following options:
- * o makedep_add_missing
- */
- buf = strsave("makedep_add_missing");
- PUSH2("@option", buf);
- break;
- case 'P': /* -MP */
- /* Push the following options:
- * o makedep_phony
- */
- buf = strsave("makedep_phony");
- PUSH2("@option", buf);
- break;
- default:
- goto error;
- }
- }
+ if (argv[1][2] == '\0') {
+ debug = 1;
+ } else {
+ PUSH(argv[1]);
}
break;
- case 'o':
- PUSH2("@outdir", process_opt(&argc, &argv, 0));
- break;
- case 'O':
- PUSH("@optimize");
- if (argv[1][2] == '\0')
- PUSH("1");
- else
- PUSH(argv[1]+2);
- break;
case 'p':
{
int c = argv[1][2];
if (c != 'a' && c != 'z') {
- goto error;
+ PUSH(argv[1]);
#ifdef __WIN32__
} else if (strcmp(argv[1], "-pause") == 0) {
pause_after_execution = 1;
@@ -381,81 +271,21 @@ main(int argc, char** argv)
if (strcmp(argv[1], "-smp") == 0) {
UNSHIFT(argv[1]);
} else {
- goto error;
- }
- break;
- case 'v': /* Verbose. */
- PUSH2("@verbose", "true");
- break;
- case 'V':
- /** XXX Version perhaps, but of what? **/
- break;
- case 'W': /* Enable warnings. */
- if (strcmp(argv[1]+2, "all") == 0) {
- PUSH2("@warn", "999");
- } else if (strcmp(argv[1]+2, "error") == 0) {
- PUSH2("@option", "warnings_as_errors");
- } else if (isdigit((int)argv[1][2])) {
- PUSH2("@warn", argv[1]+2);
- } else {
- PUSH2("@warn", "1");
- }
- break;
- case 'E':
- case 'S':
- case 'P':
- {
- char* buf;
-
- /*
- * From the given upper-case letter, construct
- * a quoted atom. This is a convenience for the
- * Erlang compiler, to avoid fighting with the shell's
- * quoting.
- */
-
- buf = emalloc(4);
- buf[0] = '\'';
- buf[1] = argv[1][1];
- buf[2] = '\'';
- buf[3] = '\0';
-
- PUSH2("@option", buf);
+ PUSH(argv[1]);
}
break;
-
- case '-':
- goto no_more_options;
-
default:
- error:
- usage();
+ PUSH(argv[1]);
break;
}
+ break;
+ default:
+ PUSH(argv[1]);
+ break;
}
argc--, argv++;
}
- no_more_options:
-
- if (argc <= 1) {
- /*
- * To avoid starting an Erlang system unless absolutely needed
- * exit if no files were specified on the command line.
- */
- exit(0);
- }
-
- /*
- * The rest of the command line must be filenames. Simply push them.
- */
-
- PUSH("@files");
- while (argc > 1) {
- PUSH(argv[1]);
- argc--, argv++;
- }
-
/*
* Move up the commands for invoking the emulator and adjust eargv
* accordingly.
@@ -520,48 +350,50 @@ push_words(char* src)
PUSH(strsave(sbuf));
}
#ifdef __WIN32__
-char *make_commandline(char **argv)
+wchar_t *make_commandline(char **argv)
{
- static char *buff = NULL;
+ static wchar_t *buff = NULL;
static int siz = 0;
- int num = 0;
- char **arg, *p;
+ int num = 0, len;
+ char **arg;
+ wchar_t *p;
if (*argv == NULL) {
- return "";
+ return L"";
}
for (arg = argv; *arg != NULL; ++arg) {
num += strlen(*arg)+1;
}
if (!siz) {
siz = num;
- buff = malloc(siz*sizeof(char));
+ buff = (wchar_t *) emalloc(siz*sizeof(wchar_t));
} else if (siz < num) {
siz = num;
- buff = realloc(buff,siz*sizeof(char));
+ buff = (wchar_t *) realloc(buff,siz*sizeof(wchar_t));
}
p = buff;
+ num=0;
for (arg = argv; *arg != NULL; ++arg) {
- strcpy(p,*arg);
- p+=strlen(*arg);
- *p++=' ';
+ len = MultiByteToWideChar(CP_UTF8, 0, *arg, -1, p, siz);
+ p+=(len-1);
+ *p++=L' ';
}
- *(--p) = '\0';
+ *(--p) = L'\0';
if (debug) {
- printf("Processed commandline:%s\n",buff);
+ printf("Processed command line:%S\n",buff);
}
return buff;
}
int my_spawnvp(char **argv)
{
- STARTUPINFO siStartInfo;
+ STARTUPINFOW siStartInfo;
PROCESS_INFORMATION piProcInfo;
DWORD ec;
- memset(&siStartInfo,0,sizeof(STARTUPINFO));
- siStartInfo.cb = sizeof(STARTUPINFO);
+ memset(&siStartInfo,0,sizeof(STARTUPINFOW));
+ siStartInfo.cb = sizeof(STARTUPINFOW);
siStartInfo.dwFlags = STARTF_USESTDHANDLES;
siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -570,7 +402,7 @@ int my_spawnvp(char **argv)
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
- if (!CreateProcess(NULL,
+ if (!CreateProcessW(NULL,
make_commandline(argv),
NULL,
NULL,
@@ -633,53 +465,6 @@ run_erlang(char* progname, char** argv)
}
static void
-usage(void)
-{
- static struct {
- char* name;
- char* desc;
- } options[] = {
- {"-b type", "type of output file (e.g. jam or beam)"},
- {"-d", "turn on debugging of erlc itself"},
- {"-Dname", "define name"},
- {"-Dname=value", "define name to have value"},
- {"-help", "shows this help text"},
- {"-I path", "where to search for include files"},
- {"-M", "generate a rule for make(1) describing the dependencies"},
- {"-MF file", "write the dependencies to 'file'"},
- {"-MT target", "change the target of the rule emitted by dependency "
- "generation"},
- {"-MQ target", "same as -MT but quote characters special to make(1)"},
- {"-MG", "consider missing headers as generated files and add them to "
- "the dependencies"},
- {"-MP", "add a phony target for each dependency"},
- {"-MD", "same as -M -MT file (with default 'file')"},
- {"-o name", "name output directory or file"},
- {"-pa path", "add path to the front of Erlang's code path"},
- {"-pz path", "add path to the end of Erlang's code path"},
- {"-smp", "compile using SMP emulator"},
- {"-v", "verbose compiler output"},
- {"-Werror", "make all warnings into errors"},
- {"-W0", "disable warnings"},
- {"-Wnumber", "set warning level to number"},
- {"-Wall", "enable all warnings"},
- {"-W", "enable warnings (default; same as -W1)"},
- {"-E", "generate listing of expanded code (Erlang compiler)"},
- {"-S", "generate assembly listing (Erlang compiler)"},
- {"-P", "generate listing of preprocessed code (Erlang compiler)"},
- {"+term", "pass the Erlang term unchanged to the compiler"},
- };
- int i;
-
- fprintf(stderr, "Usage:\terlc [options] file.ext ...\n");
- fprintf(stderr, "Options:\n");
- for (i = 0; i < sizeof(options)/sizeof(options[0]); i++) {
- fprintf(stderr, "%-14s %s\n", options[i].name, options[i].desc);
- }
- exit(1);
-}
-
-static void
error(char* format, ...)
{
char sbuf[1024];
@@ -709,6 +494,18 @@ strsave(char* string)
return p;
}
+static int
+file_exists(char *progname)
+{
+#ifdef __WIN32__
+ wchar_t wcsbuf[MAXPATHLEN];
+ MultiByteToWideChar(CP_UTF8, 0, progname, -1, wcsbuf, MAXPATHLEN);
+ return (_waccess(wcsbuf, 0) != -1);
+#else
+ return (access(progname, 1) != -1);
+#endif
+}
+
static char*
get_default_emulator(char* progname)
{
@@ -722,15 +519,8 @@ get_default_emulator(char* progname)
for (s = sbuf+strlen(sbuf); s >= sbuf; s--) {
if (IS_DIRSEP(*s)) {
strcpy(s+1, ERL_NAME);
-#ifdef __WIN32__
- if (_access(sbuf, 0) != -1) {
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#else
- if (access(sbuf, 1) != -1) {
- return strsave(sbuf);
- }
-#endif
break;
}
}
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index f098e56a2e..b68e109b43 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -42,7 +42,7 @@
#define DEFAULT_PROGNAME "erl"
#ifdef __WIN32__
-#define INI_FILENAME "erl.ini"
+#define INI_FILENAME L"erl.ini"
#define INI_SECTION "erlang"
#define DIRSEP "\\"
#define PATHSEP ";"
@@ -128,6 +128,7 @@ static char *pluss_val_switches[] = {
"bwt",
"cl",
"ct",
+ "ecio",
"fwi",
"tbt",
"wct",
@@ -135,12 +136,14 @@ static char *pluss_val_switches[] = {
"ws",
"ss",
"pp",
+ "ub",
NULL
};
/* +h arguments with values */
static char *plush_val_switches[] = {
"ms",
"mbs",
+ "pds",
"",
NULL
};
@@ -828,7 +831,21 @@ int main(int argc, char **argv)
if (argv[i][2] == 'P') {
if (argv[i][3] != '\0')
goto the_default;
- } else if (argv[i][2] != '\0')
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (argv[i][2] == 'D') {
+ char* type = argv[i]+3;
+ if (strncmp(type, "cpu", 3) != 0 &&
+ strncmp(type, "Pcpu", 4) != 0 &&
+ strncmp(type, "io", 2) != 0)
+ usage(argv[i]);
+ if ((argv[i][3] == 'c' && argv[i][6] != '\0') ||
+ (argv[i][3] == 'P' && argv[i][7] != '\0') ||
+ (argv[i][3] == 'i' && argv[i][5] != '\0'))
+ goto the_default;
+ }
+#endif
+ else if (argv[i][2] != '\0')
goto the_default;
if (i+1 >= argc)
usage(argv[i]);
@@ -1195,11 +1212,14 @@ start_epmd(char *epmd)
strcat(epmd, arg1);
}
{
- STARTUPINFO start;
+ wchar_t wcepmd[MAXPATHLEN+100];
+ STARTUPINFOW start;
PROCESS_INFORMATION pi;
memset(&start, 0, sizeof (start));
start.cb = sizeof (start);
- if (!CreateProcess(NULL, epmd, NULL, NULL, FALSE,
+ MultiByteToWideChar(CP_UTF8, 0, epmd, -1, wcepmd, MAXPATHLEN+100);
+
+ if (!CreateProcessW(NULL, wcepmd, NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE | DETACHED_PROCESS,
NULL, NULL, &start, &pi))
result = -1;
@@ -1393,53 +1413,49 @@ static void get_start_erl_data(char *file)
}
-static char *replace_filename(char *path, char *new_base)
+static wchar_t *replace_filename(wchar_t *path, wchar_t *new_base)
{
- int plen = strlen(path);
- char *res = emalloc((plen+strlen(new_base)+1)*sizeof(char));
- char *p;
+ int plen = wcslen(path);
+ wchar_t *res = (wchar_t *) emalloc((plen+wcslen(new_base)+1)*sizeof(wchar_t));
+ wchar_t *p;
- strcpy(res,path);
- for (p = res+plen-1 ;p >= res && *p != '\\'; --p)
+ wcscpy(res,path);
+ for (p = res+plen-1 ;p >= res && *p != L'\\'; --p)
;
- *(p+1) ='\0';
- strcat(res,new_base);
+ *(p+1) =L'\0';
+ wcscat(res,new_base);
return res;
}
-static char *path_massage(char *long_path)
+static char *path_massage(wchar_t *long_path)
{
char *p;
-
- p = emalloc(MAX_PATH+1);
- strcpy(p, long_path);
- GetShortPathName(p, p, MAX_PATH);
+ int len;
+ len = WideCharToMultiByte(CP_UTF8, 0, long_path, -1, NULL, 0, NULL, NULL);
+ p = emalloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, long_path, -1, p, len, NULL, NULL);
return p;
}
static char *do_lookup_in_section(InitSection *inis, char *name,
- char *section, char *filename, int is_path)
+ char *section, wchar_t *filename, int is_path)
{
char *p = lookup_init_entry(inis, name);
if (p == NULL) {
- error("Could not find key %s in section %s of file %s",
+ error("Could not find key %s in section %s of file %S",
name,section,filename);
}
- if (is_path) {
- return path_massage(p);
- } else {
- return strsave(p);
- }
+ return strsave(p);
}
-
+// Setup bindir, rootdir and progname as utf8 buffers
static void get_parameters(int argc, char** argv)
{
- char *p;
- char buffer[MAX_PATH];
- char *ini_filename;
+ wchar_t *p;
+ wchar_t buffer[MAX_PATH];
+ wchar_t *ini_filename;
HANDLE module = GetModuleHandle(NULL); /* This might look strange, but we want the erl.ini
that resides in the same dir as erl.exe, not
an erl.ini in our directory */
@@ -1450,34 +1466,35 @@ static void get_parameters(int argc, char** argv)
error("Cannot GetModuleHandle()");
}
- if (GetModuleFileName(module,buffer,MAX_PATH) == 0) {
+ if (GetModuleFileNameW(module,buffer,MAX_PATH) == 0) {
error("Could not GetModuleFileName");
}
ini_filename = replace_filename(buffer,INI_FILENAME);
if ((inif = load_init_file(ini_filename)) == NULL) {
+ wchar_t wbindir[MAX_PATH];
+ wchar_t wrootdir[MAX_PATH];
+
/* Assume that the path is absolute and that
it does not contain any symbolic link */
-
- char buffer[MAX_PATH];
-
+
/* Determine bindir */
- if (GetEnvironmentVariable("ERLEXEC_DIR", buffer, MAX_PATH) == 0) {
- strcpy(buffer, ini_filename);
- for (p = buffer+strlen(buffer)-1; p >= buffer && *p != '\\'; --p)
+ if (GetEnvironmentVariableW(L"ERLEXEC_DIR", buffer, MAX_PATH) == 0) {
+ wcscpy(buffer, ini_filename);
+ for (p = buffer+wcslen(buffer)-1; p >= buffer && *p != L'\\'; --p)
;
- *p ='\0';
+ *p = L'\0';
}
bindir = path_massage(buffer);
/* Determine rootdir */
- for (p = buffer+strlen(buffer)-1; p >= buffer && *p != '\\'; --p)
+ for (p = buffer+wcslen(buffer)-1; p >= buffer && *p != L'\\'; --p)
;
p--;
- for (;p >= buffer && *p != '\\'; --p)
+ for (;p >= buffer && *p != L'\\'; --p)
;
- *p ='\0';
+ *p =L'\0';
rootdir = path_massage(buffer);
/* Hardcoded progname */
@@ -1989,7 +2006,7 @@ initial_argv_massage(int *argc, char ***argv)
vix = 0;
- av = build_args_from_env("ERL_" OTP_SYSTEM_VERSION "_FLAGS");
+ av = build_args_from_env("ERL_OTP" OTP_SYSTEM_VERSION "_FLAGS");
if (av)
avv[vix++].argv = av;
diff --git a/erts/etc/common/escript.c b/erts/etc/common/escript.c
index 118bc6ef90..c92fedee4b 100644
--- a/erts/etc/common/escript.c
+++ b/erts/etc/common/escript.c
@@ -45,7 +45,8 @@ static int eargc; /* Number of arguments in eargv. */
# define QUOTE(s) possibly_quote(s)
# define IS_DIRSEP(c) ((c) == '/' || (c) == '\\')
# define DIRSEPSTR "\\"
-# define PATHSEPSTR ";"
+# define LDIRSEPSTR L"\\"
+# define LPATHSEPSTR L";"
# define PMAX MAX_PATH
# define ERL_NAME "erl.exe"
#else
@@ -112,20 +113,31 @@ get_env(char *key)
{
#ifdef __WIN32__
DWORD size = 32;
- char *value = NULL;
+ char *value=NULL;
+ wchar_t *wcvalue = NULL;
+ wchar_t wckey[256];
+ int len;
+
+ MultiByteToWideChar(CP_UTF8, 0, key, -1, wckey, 256);
+
while (1) {
DWORD nsz;
- if (value)
- efree(value);
- value = emalloc(size);
+ if (wcvalue)
+ efree(wcvalue);
+ wcvalue = (wchar_t *) emalloc(size*sizeof(wchar_t));
SetLastError(0);
- nsz = GetEnvironmentVariable((LPCTSTR) key, (LPTSTR) value, size);
+ nsz = GetEnvironmentVariableW(wckey, wcvalue, size);
if (nsz == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
- efree(value);
+ efree(wcvalue);
return NULL;
}
- if (nsz <= size)
+ if (nsz <= size) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, NULL, 0, NULL, NULL);
+ value = emalloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, value, len, NULL, NULL);
+ efree(wcvalue);
return value;
+ }
size = nsz;
}
#else
@@ -145,6 +157,88 @@ free_env_val(char *value)
* Find absolute path to this program
*/
+#ifdef __WIN32__
+static char *
+find_prog(char *origpath)
+{
+ wchar_t relpath[PMAX];
+ wchar_t abspath[PMAX];
+
+ if (strlen(origpath) >= PMAX)
+ error("Path too long");
+
+ MultiByteToWideChar(CP_UTF8, 0, origpath, -1, relpath, PMAX);
+
+ if (wcsstr(relpath, LDIRSEPSTR) == NULL) {
+ /* Just a base name */
+ int sz;
+ wchar_t *envpath;
+ sz = GetEnvironmentVariableW(L"PATH", NULL, 0);
+ if (sz) {
+ /* Try to find the executable in the path */
+ wchar_t dir[PMAX];
+ wchar_t *beg;
+ wchar_t *end;
+
+ HANDLE dir_handle; /* Handle to directory. */
+ wchar_t wildcard[PMAX]; /* Wildcard to search for. */
+ WIN32_FIND_DATAW find_data; /* Data found by FindFirstFile() or FindNext(). */
+
+ BOOL look_for_sep = TRUE;
+
+ envpath = (wchar_t *) emalloc(sz * sizeof(wchar_t*));
+ GetEnvironmentVariableW(L"PATH", envpath, sz);
+ beg = envpath;
+
+ while (look_for_sep) {
+ end = wcsstr(beg, LPATHSEPSTR);
+ if (end != NULL) {
+ sz = end - beg;
+ } else {
+ sz = wcslen(beg);
+ look_for_sep = FALSE;
+ }
+ if (sz >= PMAX) {
+ beg = end + 1;
+ continue;
+ }
+ wcsncpy(dir, beg, sz);
+ dir[sz] = L'\0';
+ beg = end + 1;
+
+ swprintf(wildcard, PMAX, L"%s" LDIRSEPSTR L"%s",
+ dir, relpath /* basename */);
+ dir_handle = FindFirstFileW(wildcard, &find_data);
+ if (dir_handle == INVALID_HANDLE_VALUE) {
+ /* Try next directory in path */
+ continue;
+ } else {
+ /* Wow we found the executable. */
+ wcscpy(relpath, wildcard);
+ FindClose(dir_handle);
+ look_for_sep = FALSE;
+ break;
+ }
+ }
+ efree(envpath);
+ }
+ }
+
+ {
+ DWORD size;
+ wchar_t *absrest;
+ size = GetFullPathNameW(relpath, PMAX, abspath, &absrest);
+ if ((size == 0) || (size > PMAX)) {
+ /* Cannot determine absolute path to escript. Try the origin. */
+ return strsave(origpath);
+ } else {
+ char utf8abs[PMAX];
+ WideCharToMultiByte(CP_UTF8, 0, abspath, -1, utf8abs, PMAX, NULL, NULL);
+ return strsave(utf8abs);
+ }
+ }
+}
+#else
static char *
find_prog(char *origpath)
{
@@ -168,14 +262,8 @@ find_prog(char *origpath)
char *end;
int sz;
-#ifdef __WIN32__
- HANDLE dir_handle; /* Handle to directory. */
- char wildcard[PMAX]; /* Wildcard to search for. */
- WIN32_FIND_DATA find_data; /* Data found by FindFirstFile() or FindNext(). */
-#else
DIR *dp; /* Pointer to directory structure. */
struct dirent* dirp; /* Pointer to directory entry. */
-#endif /* __WIN32__ */
BOOL look_for_sep = TRUE;
@@ -195,21 +283,6 @@ find_prog(char *origpath)
dir[sz] = '\0';
beg = end + 1;
-#ifdef __WIN32__
- erts_snprintf(wildcard, sizeof(wildcard), "%s" DIRSEPSTR "%s",
- dir, relpath /* basename */);
- dir_handle = FindFirstFile(wildcard, &find_data);
- if (dir_handle == INVALID_HANDLE_VALUE) {
- /* Try next directory in path */
- continue;
- } else {
- /* Wow we found the executable. */
- strcpy(relpath, wildcard);
- FindClose(dir_handle);
- look_for_sep = FALSE;
- break;
- }
-#else
dp = opendir(dir);
if (dp != NULL) {
while (TRUE) {
@@ -230,21 +303,12 @@ find_prog(char *origpath)
}
}
}
-#endif /* __WIN32__ */
}
}
}
{
-#ifdef __WIN32__
- DWORD size;
- char *absrest;
- size = GetFullPathName(relpath, PMAX, abspath, &absrest);
- if ((size == 0) || (size > PMAX)) {
-
-#else
if (!realpath(relpath, abspath)) {
-#endif /* __WIN32__ */
/* Cannot determine absolute path to escript. Try the origin. */
return strsave(origpath);
} else {
@@ -252,12 +316,21 @@ find_prog(char *origpath)
}
}
}
+#endif
static void
append_shebang_args(char* scriptname)
{
/* Open script file */
- FILE* fd = fopen (scriptname,"r");
+ FILE* fd;
+#ifdef __WIN32__
+ wchar_t wcscriptname[PMAX];
+
+ MultiByteToWideChar(CP_UTF8, 0, scriptname, -1, wcscriptname, PMAX);
+ fd = _wfopen(wcscriptname, L"r");
+#else
+ fd = fopen (scriptname,"r");
+#endif
if (fd != NULL) {
/* Read first line in script file */
@@ -321,9 +394,15 @@ append_shebang_args(char* scriptname)
}
}
+#ifdef __WIN32__
+int wmain(int argc, wchar_t **wcargv)
+{
+ char** argv;
+#else
int
main(int argc, char** argv)
{
+#endif
int eargv_size;
int eargc_base; /* How many arguments in the base of eargv. */
char* emulator;
@@ -333,6 +412,19 @@ main(int argc, char** argv)
char scriptname[PMAX];
char** last_opt;
char** first_opt;
+
+#ifdef __WIN32__
+ int i;
+ int len;
+ /* Convert argv to utf8 */
+ argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, argv[i], len, NULL, NULL);
+ }
+ argv[argc] = NULL;
+#endif
emulator = env = get_env("ESCRIPT_EMULATOR");
if (emulator == NULL) {
@@ -412,9 +504,8 @@ main(int argc, char** argv)
#endif
erts_snprintf(scriptname, sizeof(scriptname), "%s.escript",
- absname);
+ absname);
efree(absname);
-
}
/*
@@ -483,63 +574,65 @@ push_words(char* src)
PUSH(strsave(sbuf));
}
#ifdef __WIN32__
-char *make_commandline(char **argv)
+wchar_t *make_commandline(char **argv)
{
- static char *buff = NULL;
+ static wchar_t *buff = NULL;
static int siz = 0;
- int num = 0;
- char **arg, *p;
+ int num = 0, len;
+ char **arg;
+ wchar_t *p;
if (*argv == NULL) {
- return "";
+ return L"";
}
for (arg = argv; *arg != NULL; ++arg) {
num += strlen(*arg)+1;
}
if (!siz) {
siz = num;
- buff = emalloc(siz*sizeof(char));
+ buff = (wchar_t *) emalloc(siz*sizeof(wchar_t));
} else if (siz < num) {
siz = num;
- buff = realloc(buff,siz*sizeof(char));
+ buff = (wchar_t *) realloc(buff,siz*sizeof(wchar_t));
}
p = buff;
+ num=0;
for (arg = argv; *arg != NULL; ++arg) {
- strcpy(p,*arg);
- p+=strlen(*arg);
- *p++=' ';
+ len = MultiByteToWideChar(CP_UTF8, 0, *arg, -1, p, siz);
+ p+=(len-1);
+ *p++=L' ';
}
- *(--p) = '\0';
+ *(--p) = L'\0';
if (debug) {
- printf("Processed command line:%s\n",buff);
+ printf("Processed command line:%S\n",buff);
}
return buff;
}
int my_spawnvp(char **argv)
{
- STARTUPINFO siStartInfo;
+ STARTUPINFOW siStartInfo;
PROCESS_INFORMATION piProcInfo;
DWORD ec;
- memset(&siStartInfo,0,sizeof(STARTUPINFO));
- siStartInfo.cb = sizeof(STARTUPINFO);
+ memset(&siStartInfo,0,sizeof(STARTUPINFOW));
+ siStartInfo.cb = sizeof(STARTUPINFOW);
siStartInfo.dwFlags = STARTF_USESTDHANDLES;
siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
- if (!CreateProcess(NULL,
- make_commandline(argv),
- NULL,
- NULL,
- TRUE,
- 0,
- NULL,
- NULL,
- &siStartInfo,
- &piProcInfo)) {
+ if (!CreateProcessW(NULL,
+ make_commandline(argv),
+ NULL,
+ NULL,
+ TRUE,
+ 0,
+ NULL,
+ NULL,
+ &siStartInfo,
+ &piProcInfo)) {
return -1;
}
CloseHandle(piProcInfo.hThread);
@@ -623,6 +716,18 @@ strsave(char* string)
return p;
}
+static int
+file_exists(char *progname)
+{
+#ifdef __WIN32__
+ wchar_t wcsbuf[MAXPATHLEN];
+ MultiByteToWideChar(CP_UTF8, 0, progname, -1, wcsbuf, MAXPATHLEN);
+ return (_waccess(wcsbuf, 0) != -1);
+#else
+ return (access(progname, 1) != -1);
+#endif
+}
+
static char*
get_default_emulator(char* progname)
{
@@ -636,15 +741,11 @@ get_default_emulator(char* progname)
for (s = sbuf+strlen(sbuf); s >= sbuf; s--) {
if (IS_DIRSEP(*s)) {
strcpy(s+1, ERL_NAME);
-#ifdef __WIN32__
- if (_access(sbuf, 0) != -1) {
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#else
- if (access(sbuf, 1) != -1) {
+ strcpy(s+1, "bin" DIRSEPSTR ERL_NAME);
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#endif
break;
}
}
diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c
index 81d797dc7e..2830641802 100644
--- a/erts/etc/common/heart.c
+++ b/erts/etc/common/heart.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2012. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2013. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -201,7 +201,6 @@ static BOOL do_shutdown(int);
static void print_last_error(void);
static HANDLE start_reader_thread(void);
static DWORD WINAPI reader(LPVOID);
-static int test_win95(void);
#define read _read
#define write _write
#endif
@@ -239,24 +238,39 @@ get_env(char *key)
{
#ifdef __WIN32__
DWORD size = 32;
- char *value = NULL;
+ char *value=NULL;
+ wchar_t *wcvalue = NULL;
+ wchar_t wckey[256];
+ int len;
+
+ MultiByteToWideChar(CP_UTF8, 0, key, -1, wckey, 256);
+
while (1) {
DWORD nsz;
- if (value)
- free(value);
- value = malloc(size);
- if (!value) {
+ if (wcvalue)
+ free(wcvalue);
+ wcvalue = malloc(size*sizeof(wchar_t));
+ if (!wcvalue) {
print_error("Failed to allocate memory. Terminating...");
exit(1);
}
SetLastError(0);
- nsz = GetEnvironmentVariable((LPCTSTR) key, (LPTSTR) value, size);
+ nsz = GetEnvironmentVariableW(wckey, wcvalue, size);
if (nsz == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
- free(value);
+ free(wcvalue);
return NULL;
}
- if (nsz <= size)
+ if (nsz <= size) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, NULL, 0, NULL, NULL);
+ value = malloc(len*sizeof(char));
+ if (!value) {
+ print_error("Failed to allocate memory. Terminating...");
+ exit(1);
+ }
+ WideCharToMultiByte(CP_UTF8, 0, wcvalue, -1, value, len, NULL, NULL);
+ free(wcvalue);
return value;
+ }
size = nsz;
}
#else
@@ -564,13 +578,22 @@ void win_system(char *command)
char *comspec;
char * cmdbuff;
char * extra = " /C ";
+ wchar_t *wccmdbuff;
char *env;
- STARTUPINFO start;
+ STARTUPINFOW start;
SECURITY_ATTRIBUTES attr;
PROCESS_INFORMATION info;
+ int len;
- if (!debug_on || test_win95()) {
- system(command);
+ if (!debug_on) {
+ len = MultiByteToWideChar(CP_UTF8, 0, command, -1, NULL, 0);
+ wccmdbuff = malloc(len*sizeof(wchar_t));
+ if (!wccmdbuff) {
+ print_error("Failed to allocate memory. Terminating...");
+ exit(1);
+ }
+ MultiByteToWideChar(CP_UTF8, 0, command, -1, wccmdbuff, len);
+ _wsystem(wccmdbuff);
return;
}
comspec = env = get_env("COMSPEC");
@@ -602,20 +625,29 @@ void win_system(char *command)
fflush(stderr);
- if (!CreateProcess(NULL,
- cmdbuff,
- &attr,
- NULL,
- TRUE,
- 0,
- NULL,
- NULL,
- &start,
- &info)) {
+ len = MultiByteToWideChar(CP_UTF8, 0, cmdbuff, -1, NULL, 0);
+ wccmdbuff = malloc(len*sizeof(wchar_t));
+ if (!wccmdbuff) {
+ print_error("Failed to allocate memory. Terminating...");
+ exit(1);
+ }
+ MultiByteToWideChar(CP_UTF8, 0, cmdbuff, -1, wccmdbuff, len);
+
+ if (!CreateProcessW(NULL,
+ wccmdbuff,
+ &attr,
+ NULL,
+ TRUE,
+ 0,
+ NULL,
+ NULL,
+ &start,
+ &info)) {
debugf("Could not create process for the command %s.\r\n", cmdbuff);
}
WaitForSingleObject(info.hProcess,INFINITE);
free(cmdbuff);
+ free(wccmdbuff);
}
#endif /* defined(__WIN32__) */
@@ -966,16 +998,6 @@ void print_last_error() {
LocalFree( lpMsgBuf );
}
-static int test_win95(void)
-{
- OSVERSIONINFO osinfo;
- osinfo.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
- GetVersionEx(&osinfo);
- if (osinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
- return 1;
- else
- return 0;
-}
static BOOL enable_privilege() {
HANDLE ProcessHandle;
@@ -993,27 +1015,18 @@ static BOOL enable_privilege() {
}
static BOOL do_shutdown(int really_shutdown) {
- if (test_win95()) {
- if (ExitWindowsEx(EWX_REBOOT,0)) {
- return TRUE;
- } else {
- print_last_error();
- return FALSE;
- }
- } else {
- enable_privilege();
- if (really_shutdown) {
- if (InitiateSystemShutdown(NULL,"shutdown by HEART",10,TRUE,TRUE))
- return TRUE;
- } else if (InitiateSystemShutdown(NULL,
- "shutdown by HEART\n"
- "will be interrupted",
- 30,TRUE,TRUE)) {
- AbortSystemShutdown(NULL);
+ enable_privilege();
+ if (really_shutdown) {
+ if (InitiateSystemShutdown(NULL,"shutdown by HEART",10,TRUE,TRUE))
return TRUE;
- }
- return FALSE;
+ } else if (InitiateSystemShutdown(NULL,
+ "shutdown by HEART\n"
+ "will be interrupted",
+ 30,TRUE,TRUE)) {
+ AbortSystemShutdown(NULL);
+ return TRUE;
}
+ return FALSE;
}
DWORD WINAPI reader(LPVOID lpvParam) {
diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index bef97862a3..9ec4192667 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -1209,7 +1209,7 @@ static void start_que_request(Worker *w)
#endif
}
-#ifndef WIN32
+#ifndef WIN32
/* Signal utilities */
static RETSIGTYPE (*sys_sigset(int sig, RETSIGTYPE (*func)(int)))(int)
{
diff --git a/erts/etc/common/run_erl_common.c b/erts/etc/common/run_erl_common.c
new file mode 100644
index 0000000000..20b78eb05e
--- /dev/null
+++ b/erts/etc/common/run_erl_common.c
@@ -0,0 +1,691 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifdef HAVE_SYSLOG_H
+# include <syslog.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
+#ifdef __OSE__
+# include "ramlog.h"
+#endif
+
+#include "run_erl_common.h"
+#include "safe_string.h"
+
+#define DEFAULT_LOG_GENERATIONS 5
+#define LOG_MAX_GENERATIONS 1000 /* No more than 1000 log files */
+#define LOG_MIN_GENERATIONS 2 /* At least two to switch between */
+#define DEFAULT_LOG_MAXSIZE 100000
+#define LOG_MIN_MAXSIZE 1000 /* Smallast value for changing log file */
+#define LOG_STUBNAME "erlang.log."
+#define LOG_PERM 0664
+#define DEFAULT_LOG_ACTIVITY_MINUTES 5
+#define DEFAULT_LOG_ALIVE_MINUTES 15
+#define DEFAULT_LOG_ALIVE_FORMAT "%a %b %e %T %Z %Y"
+#define ALIVE_BUFFSIZ 1024
+
+#define STATUSFILENAME "/run_erl.log"
+
+#define PIPE_STUBNAME "erlang.pipe"
+#define PIPE_STUBLEN strlen(PIPE_STUBNAME)
+#define PERM (S_IWUSR | S_IRUSR | S_IWOTH | S_IROTH | S_IWGRP | S_IRGRP)
+
+/* OSE has defined O_SYNC but it is not recognized by open */
+#if !defined(O_SYNC) || defined(__OSE__)
+#undef O_SYNC
+#define O_SYNC 0
+#define USE_FSYNC 1
+#endif
+
+/* Global variable definitions
+ * We need this complex way of handling global variables because of how
+ * OSE works here. We want to make it possible to run the shell command
+ * run_erl multiple times with different global variables without them
+ * effecting eachother.
+ */
+
+#define STATUSFILE (RE_DATA->statusfile)
+#define LOG_DIR (RE_DATA->log_dir)
+#define STDSTATUS (RE_DATA->stdstatus)
+#define LOG_GENERATIONS (RE_DATA->log_generations)
+#define LOG_MAXSIZE (RE_DATA->log_maxsize)
+#define LOG_ACTIVITY_MINUTES (RE_DATA->log_activity_minutes)
+#define LOG_ALIVE_IN_GMT (RE_DATA->log_alive_in_gmt)
+#define LOG_ALIVE_FORMAT (RE_DATA->log_alive_format)
+#define RUN_DAEMON (RE_DATA->run_daemon)
+#define LOG_ALIVE_MINUTES (RE_DATA->log_alive_minutes)
+#define LOG_NUM (RE_DATA->log_num)
+#define LFD (RE_DATA->lfd)
+#define PROTOCOL_VER (RE_DATA->protocol_ver)
+
+struct run_erl_ {
+ /* constant config data */
+ char statusfile[FILENAME_BUFSIZ];
+ char log_dir[FILENAME_BUFSIZ];
+ FILE *stdstatus;
+ int log_generations;
+ int log_maxsize;
+ int log_activity_minutes;
+ int log_alive_in_gmt;
+ char log_alive_format[ALIVE_BUFFSIZ+1];
+ int run_daemon;
+ int log_alive_minutes;
+ /* Current log number and log fd */
+ int log_num;
+ int lfd;
+ unsigned protocol_ver;
+};
+
+typedef struct run_erl_ run_erl;
+
+#ifdef __OSE__
+static OSPPDKEY run_erl_pp_key;
+#define RE_DATA (*(run_erl**)ose_get_ppdata(run_erl_pp_key))
+#else
+static run_erl re;
+#define RE_DATA (&re)
+#endif
+
+/* prototypes */
+
+static int next_log(int log_num);
+static int prev_log(int log_num);
+static int find_next_log_num(void);
+static int open_log(int log_num, int flags);
+
+/*
+ * getenv_int:
+ */
+static char *getenv_int(const char *name) {
+#ifdef __OSE__
+ return get_env(get_bid(current_process()),name);
+#else
+ return getenv(name);
+#endif
+}
+
+/*
+ * next_log:
+ * Returns the index number that follows the given index number.
+ * (Wrapping after log_generations)
+ */
+static int next_log(int log_num) {
+ return log_num>=LOG_GENERATIONS?1:log_num+1;
+}
+
+/*
+ * prev_log:
+ * Returns the index number that precedes the given index number.
+ * (Wrapping after log_generations)
+ */
+static int prev_log(int log_num) {
+ return log_num<=1?LOG_GENERATIONS:log_num-1;
+}
+
+/*
+ * find_next_log_num()
+ * Searches through the log directory to check which logs that already
+ * exist. It finds the "hole" in the sequence, and returns the index
+ * number for the last log in the log sequence. If there is no hole, index
+ * 1 is returned.
+ */
+static int find_next_log_num(void) {
+ int i, next_gen, log_gen;
+ DIR *dirp;
+ struct dirent *direntp;
+ int log_exists[LOG_MAX_GENERATIONS+1];
+ int stub_len = strlen(LOG_STUBNAME);
+
+ /* Initialize exiting log table */
+
+ for(i=LOG_GENERATIONS; i>=0; i--)
+ log_exists[i] = 0;
+ dirp = opendir(LOG_DIR);
+ if(!dirp) {
+ ERRNO_ERR1(LOG_ERR,"Can't access log directory '%s'", LOG_DIR);
+ exit(1);
+ }
+
+ /* Check the directory for existing logs */
+
+ while((direntp=readdir(dirp)) != NULL) {
+ if(strncmp(direntp->d_name,LOG_STUBNAME,stub_len)==0) {
+ int num = atoi(direntp->d_name+stub_len);
+ if(num < 1 || num > LOG_GENERATIONS)
+ continue;
+ log_exists[num] = 1;
+ }
+ }
+ closedir(dirp);
+
+ /* Find out the next available log file number */
+
+ next_gen = 0;
+ for(i=LOG_GENERATIONS; i>=0; i--) {
+ if(log_exists[i])
+ if(next_gen)
+ break;
+ else
+ ;
+ else
+ next_gen = i;
+ }
+
+ /* Find out the current log file number */
+
+ if(next_gen)
+ log_gen = prev_log(next_gen);
+ else
+ log_gen = 1;
+
+ return log_gen;
+} /* find_next_log_num() */
+
+static int open_log(int log_num, int flags)
+{
+ char buf[FILENAME_MAX];
+ time_t now;
+ struct tm *tmptr;
+ char log_buffer[ALIVE_BUFFSIZ+1];
+
+ /* Remove the next log (to keep a "hole" in the log sequence) */
+ sn_printf(buf, sizeof(buf), "%s/%s%d",
+ LOG_DIR, LOG_STUBNAME, next_log(log_num));
+ unlink(buf);
+
+ /* Create or continue on the current log file */
+ sn_printf(buf, sizeof(buf), "%s/%s%d", LOG_DIR, LOG_STUBNAME, log_num);
+
+ LFD = sf_open(buf, flags, LOG_PERM);
+
+ if(LFD <0){
+ ERRNO_ERR1(LOG_ERR,"Can't open log file '%s'.", buf);
+ exit(1);
+ }
+
+ /* Write a LOGGING STARTED and time stamp into the log file */
+ time(&now);
+ if (LOG_ALIVE_IN_GMT) {
+ tmptr = gmtime(&now);
+ } else {
+ tmptr = localtime(&now);
+ }
+ if (!strftime(log_buffer, ALIVE_BUFFSIZ, LOG_ALIVE_FORMAT,
+ tmptr)) {
+ strn_cpy(log_buffer, sizeof(log_buffer),
+ "(could not format time in 256 positions "
+ "with current format string.)");
+ }
+ log_buffer[ALIVE_BUFFSIZ] = '\0';
+
+ sn_printf(buf, sizeof(buf), "\n=====\n===== LOGGING STARTED %s\n=====\n",
+ log_buffer);
+ if (erts_run_erl_write_all(LFD, buf, strlen(buf)) < 0)
+ erts_run_erl_log_status("Error in writing to log.\n");
+
+#if USE_FSYNC
+ fsync(LFD);
+#endif
+
+ return LFD;
+}
+
+/* Instead of making sure basename exists, we do our own */
+char *simple_basename(char *path)
+{
+ char *ptr;
+ for (ptr = path; *ptr != '\0'; ++ptr) {
+ if (*ptr == '/') {
+ path = ptr + 1;
+ }
+ }
+ return path;
+}
+
+ssize_t sf_read(int fd, void *buffer, size_t len) {
+ ssize_t n = 0;
+
+ do { n = read(fd, buffer, len); } while (n < 0 && errno == EINTR);
+
+ return n;
+}
+
+ssize_t sf_write(int fd, const void *buffer, size_t len) {
+ ssize_t n = 0;
+
+ do { n = write(fd, buffer, len); } while (n < 0 && errno == EINTR);
+
+ return n;
+}
+
+int sf_open(const char *path, int type, mode_t mode) {
+ int fd = 0;
+
+ do { fd = open(path, type, mode); } while(fd < 0 && errno == EINTR);
+
+ return fd;
+}
+
+int sf_close(int fd) {
+ int res = 0;
+
+ do { res = close(fd); } while(res < 0 && errno == EINTR);
+
+ return res;
+}
+
+/* Call write() until entire buffer has been written or error.
+ * Return len or -1.
+ */
+int erts_run_erl_write_all(int fd, const char* buf, int len)
+{
+ int left = len;
+ int written;
+ for (;;) {
+ do {
+ written = write(fd,buf,left);
+ } while (written < 0 && errno == EINTR);
+ if (written == left) {
+ return len;
+ }
+ if (written < 0) {
+ return -1;
+ }
+ left -= written;
+ buf += written;
+ }
+ return written;
+}
+
+/* erts_run_erl_log_status()
+ * Prints the arguments to a status file
+ * Works like printf (see vfrpintf)
+ */
+void erts_run_erl_log_status(const char *format,...)
+{
+ va_list args;
+ time_t now;
+
+ if (STDSTATUS == NULL)
+ STDSTATUS = fopen(STATUSFILE, "w");
+ if (STDSTATUS == NULL)
+ return;
+ now = time(NULL);
+ fprintf(STDSTATUS, "run_erl [%d] %s",
+#ifdef __OSE__
+ (int)current_process(),
+#else
+ (int)getpid(),
+#endif
+ ctime(&now));
+ va_start(args, format);
+ vfprintf(STDSTATUS, format, args);
+ va_end(args);
+ fflush(STDSTATUS);
+ return;
+}
+
+/* Fetch the current log alive minutes */
+int erts_run_erl_log_alive_minutes() {
+ return LOG_ALIVE_MINUTES;
+}
+
+/* error_logf()
+ * Prints the arguments to stderr or syslog
+ * Works like printf (see vfprintf)
+ */
+void erts_run_erl_log_error(int priority, int line, const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+
+#ifdef HAVE_SYSLOG_H
+ if (RUN_DAEMON) {
+ vsyslog(priority,format,args);
+ }
+ else
+#endif
+#ifdef __OSE__
+ if (RUN_DAEMON) {
+ char *buff = malloc(sizeof(char)*1024);
+ vsnprintf(buff,1024,format, args);
+ ramlog_printf(buff);
+ }
+ else
+#endif
+ {
+ time_t now = time(NULL);
+ fprintf(stderr, "run_erl:%d [%d] %s", line,
+#ifdef __OSE__
+ (int)current_process(),
+#else
+ (int)getpid(),
+#endif
+ ctime(&now));
+ vfprintf(stderr, format, args);
+ }
+ va_end(args);
+}
+
+/* erts_run_erl_log_write()
+ * Writes a message to lfd. If the current log file is full,
+ * a new log file is opened.
+ */
+int erts_run_erl_log_write(char* buf, size_t len)
+{
+ int size;
+ ssize_t res;
+ /* Decide if new logfile needed, and open if so */
+
+ size = lseek(LFD,0,SEEK_END);
+ if(size+len > LOG_MAXSIZE) {
+ int res;
+ do {
+ res = close(LFD);
+ } while (res < 0 && errno == EINTR);
+ LOG_NUM = next_log(LOG_NUM);
+ LFD = open_log(LOG_NUM, O_RDWR|O_CREAT|O_TRUNC|O_SYNC);
+ }
+
+ /* Write to log file */
+
+ if ((res = erts_run_erl_write_all(LFD, buf, len)) < 0) {
+ erts_run_erl_log_status("Error in writing to log.\n");
+ }
+
+#if USE_FSYNC
+ fsync(LFD);
+#endif
+ return res;
+}
+
+int erts_run_erl_log_activity(int timeout,time_t now,time_t last_activity) {
+ char log_alive_buffer[ALIVE_BUFFSIZ+1];
+ char buf[BUFSIZ];
+
+ if (timeout || now - last_activity > LOG_ACTIVITY_MINUTES*60) {
+ /* Either a time out: 15 minutes without action, */
+ /* or something is coming in right now, but it's a long time */
+ /* since last time, so let's write a time stamp this message */
+ struct tm *tmptr;
+ if (LOG_ALIVE_IN_GMT) {
+ tmptr = gmtime(&now);
+ } else {
+ tmptr = localtime(&now);
+ }
+ if (!strftime(log_alive_buffer, ALIVE_BUFFSIZ, LOG_ALIVE_FORMAT,
+ tmptr)) {
+ strn_cpy(log_alive_buffer, sizeof(log_alive_buffer),
+ "(could not format time in 256 positions "
+ "with current format string.)");
+ }
+ log_alive_buffer[ALIVE_BUFFSIZ] = '\0';
+
+ sn_printf(buf, sizeof(buf), "\n===== %s%s\n",
+ timeout?"ALIVE ":"", log_alive_buffer);
+ return erts_run_erl_log_write(buf, strlen(buf));
+ }
+ return 0;
+}
+
+int erts_run_erl_log_open() {
+
+ LOG_NUM = find_next_log_num();
+ LFD = open_log(LOG_NUM, O_RDWR|O_APPEND|O_CREAT|O_SYNC);
+ return 0;
+}
+
+int erts_run_erl_log_init(int daemon, char* logdir) {
+ char *p;
+
+#ifdef __OSE__
+ run_erl **re_pp;
+ if (!run_erl_pp_key)
+ ose_create_ppdata("run_erl_ppdata",&run_erl_pp_key);
+ re_pp = (run_erl **)ose_get_ppdata(run_erl_pp_key);
+ *re_pp = malloc(sizeof(run_erl));
+#endif
+
+ STDSTATUS = NULL;
+ LOG_GENERATIONS = DEFAULT_LOG_GENERATIONS;
+ LOG_MAXSIZE = DEFAULT_LOG_MAXSIZE;
+ LOG_ACTIVITY_MINUTES = DEFAULT_LOG_ACTIVITY_MINUTES;
+ LOG_ALIVE_IN_GMT = 0;
+ RUN_DAEMON = 0;
+ LOG_ALIVE_MINUTES = DEFAULT_LOG_ALIVE_MINUTES;
+ LFD = 0;
+ PROTOCOL_VER = RUN_ERL_LO_VER; /* assume lowest to begin with */
+
+ /* Get values for LOG file handling from the environment */
+ if ((p = getenv_int("RUN_ERL_LOG_ALIVE_MINUTES"))) {
+ LOG_ALIVE_MINUTES = atoi(p);
+ if (!LOG_ALIVE_MINUTES) {
+ ERROR1(LOG_ERR,"Minimum value for RUN_ERL_LOG_ALIVE_MINUTES is 1 "
+ "(current value is %s)",p);
+ }
+ LOG_ACTIVITY_MINUTES = LOG_ALIVE_MINUTES / 3;
+ if (!LOG_ACTIVITY_MINUTES) {
+ ++LOG_ACTIVITY_MINUTES;
+ }
+ }
+ if ((p = getenv_int(
+ "RUN_ERL_LOG_ACTIVITY_MINUTES"))) {
+ LOG_ACTIVITY_MINUTES = atoi(p);
+ if (!LOG_ACTIVITY_MINUTES) {
+ ERROR1(LOG_ERR,"Minimum value for RUN_ERL_LOG_ACTIVITY_MINUTES is 1 "
+ "(current value is %s)",p);
+ }
+ }
+ if ((p = getenv_int("RUN_ERL_LOG_ALIVE_FORMAT"))) {
+ if (strlen(p) > ALIVE_BUFFSIZ) {
+ ERROR1(LOG_ERR, "RUN_ERL_LOG_ALIVE_FORMAT can contain a maximum of "
+ "%d characters", ALIVE_BUFFSIZ);
+ }
+ strn_cpy(LOG_ALIVE_FORMAT, sizeof(LOG_ALIVE_FORMAT), p);
+ } else {
+ strn_cpy(LOG_ALIVE_FORMAT, sizeof(LOG_ALIVE_FORMAT),
+ DEFAULT_LOG_ALIVE_FORMAT);
+ }
+ if ((p = getenv_int("RUN_ERL_LOG_ALIVE_IN_UTC"))
+ && strcmp(p,"0")) {
+ ++LOG_ALIVE_IN_GMT;
+ }
+ if ((p = getenv_int("RUN_ERL_LOG_GENERATIONS"))) {
+ LOG_GENERATIONS = atoi(p);
+ if (LOG_GENERATIONS < LOG_MIN_GENERATIONS)
+ ERROR1(LOG_ERR,"Minimum RUN_ERL_LOG_GENERATIONS is %d",
+ LOG_MIN_GENERATIONS);
+ if (LOG_GENERATIONS > LOG_MAX_GENERATIONS)
+ ERROR1(LOG_ERR,"Maximum RUN_ERL_LOG_GENERATIONS is %d",
+ LOG_MAX_GENERATIONS);
+ }
+
+ if ((p = getenv_int("RUN_ERL_LOG_MAXSIZE"))) {
+ LOG_MAXSIZE = atoi(p);
+ if (LOG_MAXSIZE < LOG_MIN_MAXSIZE)
+ ERROR1(LOG_ERR,"Minimum RUN_ERL_LOG_MAXSIZE is %d", LOG_MIN_MAXSIZE);
+ }
+
+ RUN_DAEMON = daemon;
+
+ strn_cpy(LOG_DIR, sizeof(LOG_DIR), logdir);
+ strn_cpy(STATUSFILE, sizeof(STATUSFILE), LOG_DIR);
+ strn_cat(STATUSFILE, sizeof(STATUSFILE), STATUSFILENAME);
+
+ return 0;
+}
+
+/* create_fifo()
+ * Creates a new fifo with the given name and permission.
+ */
+static int create_fifo(char *name, int perm)
+{
+ if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
+ return -1;
+ return 0;
+}
+
+/*
+ * w- and r_pipename have to be pre-allocated of atleast FILENAME_MAX size
+ */
+int erts_run_erl_open_fifo(char *pipename,char *w_pipename,char *r_pipename) {
+ int calculated_pipename = 0;
+ int highest_pipe_num = 0;
+ int fd;
+
+ /*
+ * Create FIFOs and open them
+ */
+
+ if(*pipename && pipename[strlen(pipename)-1] == '/') {
+ /* The user wishes us to find a unique pipe name in the specified */
+ /* directory */
+ DIR *dirp;
+ struct dirent *direntp;
+
+ calculated_pipename = 1;
+ dirp = opendir(pipename);
+ if(!dirp) {
+ ERRNO_ERR1(LOG_ERR,"Can't access pipe directory '%s'.", pipename);
+ return 1;
+ }
+
+ /* Check the directory for existing pipes */
+
+ while((direntp=readdir(dirp)) != NULL) {
+ if(strncmp(direntp->d_name,PIPE_STUBNAME,PIPE_STUBLEN)==0) {
+ int num = atoi(direntp->d_name+PIPE_STUBLEN+1);
+ if(num > highest_pipe_num)
+ highest_pipe_num = num;
+ }
+ }
+ closedir(dirp);
+ strn_catf(pipename, BUFSIZ, "%s.%d",
+ PIPE_STUBNAME, highest_pipe_num+1);
+ } /* if */
+
+ for(;;) {
+ /* write FIFO - is read FIFO for `to_erl' program */
+ strn_cpy(w_pipename, BUFSIZ, pipename);
+ strn_cat(w_pipename, BUFSIZ, ".r");
+ if (create_fifo(w_pipename, PERM) < 0) {
+ ERRNO_ERR1(LOG_ERR,"Cannot create FIFO %s for writing.",
+ w_pipename);
+ return 1;
+ }
+
+ /* read FIFO - is write FIFO for `to_erl' program */
+ strn_cpy(r_pipename, BUFSIZ, pipename);
+ strn_cat(r_pipename, BUFSIZ, ".w");
+
+ /* Check that nobody is running run_erl already */
+ if ((fd = sf_open(r_pipename, O_WRONLY|DONT_BLOCK_PLEASE, 0)) >= 0) {
+ /* Open as client succeeded -- run_erl is already running! */
+ sf_close(fd);
+ if (calculated_pipename) {
+ ++highest_pipe_num;
+ strn_catf(pipename, BUFSIZ, "%s.%d",
+ PIPE_STUBNAME, highest_pipe_num+1);
+ continue;
+ }
+ ERROR1(LOG_ERR, "Erlang already running on pipe %s.\n", pipename);
+ unlink(w_pipename);
+ return 1;
+ }
+ if (create_fifo(r_pipename, PERM) < 0) {
+ unlink(w_pipename);
+ ERRNO_ERR1(LOG_ERR,"Cannot create FIFO %s for reading.",
+ r_pipename);
+ return 1;
+ }
+ break;
+ }
+ return 0;
+}
+
+/* Extract any control sequences that are ment only for run_erl
+ * and should not be forwarded to the pty.
+ */
+int erts_run_erl_extract_ctrl_seq(char* buf, int len, int mfd)
+{
+ static const char prefix[] = "\033_";
+ static const char suffix[] = "\033\\";
+ char* bufend = buf + len;
+ char* start = buf;
+ char* command;
+ char* end;
+
+ for (;;) {
+ start = find_str(start, bufend-start, prefix);
+ if (!start) break;
+
+ command = start + strlen(prefix);
+ end = find_str(command, bufend-command, suffix);
+ if (end) {
+ unsigned col, row;
+ if (sscanf(command,"version=%u", &PROTOCOL_VER)==1) {
+ /*fprintf(stderr,"to_erl v%u\n", protocol_ver);*/
+ }
+ else if (sscanf(command,"winsize=%u,%u", &col, &row)==2) {
+#ifdef TIOCSWINSZ
+ struct winsize ws;
+ ws.ws_col = col;
+ ws.ws_row = row;
+ if (ioctl(mfd, TIOCSWINSZ, &ws) < 0) {
+ ERRNO_ERR0(LOG_ERR,"Failed to set window size");
+ }
+#endif
+ }
+ else {
+ ERROR2(LOG_ERR, "Ignoring unknown ctrl command '%.*s'\n",
+ (int)(end-command), command);
+ }
+
+ /* Remove ctrl sequence from buf */
+ end += strlen(suffix);
+ memmove(start, end, bufend-end);
+ bufend -= end - start;
+ }
+ else {
+ ERROR2(LOG_ERR, "Missing suffix in ctrl sequence '%.*s'\n",
+ (int)(bufend-start), start);
+ break;
+ }
+ }
+ return bufend - buf;
+}
diff --git a/erts/etc/common/run_erl_common.h b/erts/etc/common/run_erl_common.h
new file mode 100644
index 0000000000..14207ee4de
--- /dev/null
+++ b/erts/etc/common/run_erl_common.h
@@ -0,0 +1,96 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Functions that are common to both OSE and unix implementations of run_erl
+ */
+#ifndef ERL_RUN_ERL_LOG_H
+#define ERL_RUN_ERL_LOG_H
+
+#include <stdio.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "run_erl_vsn.h"
+
+/* Log handling */
+int erts_run_erl_log_init(int run_daemon, char* logdir);
+int erts_run_erl_log_open(void);
+int erts_run_erl_log_close(void);
+int erts_run_erl_log_write(char *buff, size_t len);
+int erts_run_erl_log_activity(int timeout, time_t now, time_t last_activity);
+
+void erts_run_erl_log_status(const char *format,...);
+void erts_run_erl_log_error(int priority, int line, const char *format,...);
+
+int erts_run_erl_open_fifo(char *pipename,char *w_pipename,char *r_pipename);
+int erts_run_erl_log_alive_minutes(void);
+int erts_run_erl_extract_ctrl_seq(char* buf, int len, int mfd);
+
+/* File operations */
+ssize_t sf_read(int fd, void *buffer, size_t len);
+ssize_t sf_write(int fd, const void *buffer, size_t len);
+int sf_open(const char *path, int type, mode_t mode);
+int sf_close(int fd);
+int erts_run_erl_write_all(int fd, const char* buf, int len);
+char *simple_basename(char *path);
+
+#ifndef LOG_ERR
+#ifdef __OSE__
+#define LOG_ERR 0
+#else
+#define LOG_ERR NULL
+#endif
+#endif
+
+#define ERROR0(Prio,Format) erts_run_erl_log_error(Prio,__LINE__,Format"\n")
+#define ERROR1(Prio,Format,A1) erts_run_erl_log_error(Prio,__LINE__,Format"\n",A1)
+#define ERROR2(Prio,Format,A1,A2) erts_run_erl_log_error(Prio,__LINE__,Format"\n",A1,A2)
+
+#ifdef HAVE_STRERROR
+# define ADD_ERRNO(Format) "errno=%d '%s'\n"Format"\n",errno,strerror(errno)
+#else
+# define ADD_ERRNO(Format) "errno=%d\n"Format"\n",errno
+#endif
+#define ERRNO_ERR0(Prio,Format) erts_run_erl_log_error(Prio,__LINE__,ADD_ERRNO(Format))
+#define ERRNO_ERR1(Prio,Format,A1) erts_run_erl_log_error(Prio,__LINE__,ADD_ERRNO(Format),A1)
+#define ERRNO_ERR2(Prio,Format,A1,A2) erts_run_erl_log_error(Prio,__LINE__,ADD_ERRNO(Format),A1,A2)
+
+#define RUN_ERL_USAGE \
+ "%s (pipe_name|pipe_dir/) log_dir \"command [parameters ...]\"" \
+ "\n\nDESCRIPTION:\n" \
+ "You may also set the environment variables RUN_ERL_LOG_GENERATIONS\n" \
+ "and RUN_ERL_LOG_MAXSIZE to the number of log files to use and the\n" \
+ "size of the log file when to switch to the next log file\n"
+
+#ifndef FILENAME_MAX
+#define FILENAME_MAX 250
+#endif
+
+#define FILENAME_BUFSIZ FILENAME_MAX
+
+#ifdef O_NONBLOCK
+# define DONT_BLOCK_PLEASE O_NONBLOCK
+#else
+# define DONT_BLOCK_PLEASE O_NDELAY
+# ifndef EAGAIN
+# define EAGAIN -3898734
+# endif
+#endif
+
+#endif
diff --git a/erts/etc/unix/run_erl.h b/erts/etc/common/run_erl_vsn.h
index 843cda680c..f6ac753bde 100644
--- a/erts/etc/unix/run_erl.h
+++ b/erts/etc/common/run_erl_vsn.h
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
+ *
* Copyright Ericsson AB 2008-2009. All Rights Reserved.
- *
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -27,4 +27,3 @@
* 0: Older, without version handshake
* 1: R12B-3, version handshake + window size ctrl
*/
-
diff --git a/erts/etc/unix/safe_string.c b/erts/etc/common/safe_string.c
index a77d9c5456..b2f8814408 100644
--- a/erts/etc/unix/safe_string.c
+++ b/erts/etc/common/safe_string.c
@@ -1,24 +1,24 @@
/*
* %CopyrightBegin%
- *
+ *
* Copyright Ericsson AB 2008-2009. All Rights Reserved.
- *
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
-/*
+/*
* Module: safe_string.c
- *
+ *
* This is a bunch of generic string operation
* that are safe regarding buffer overflow.
*
@@ -120,4 +120,3 @@ void* memmove(void *dest, const void *src, size_t n)
return dest;
}
#endif /* HAVE_MEMMOVE */
-
diff --git a/erts/etc/unix/safe_string.h b/erts/etc/common/safe_string.h
index c70e528814..ff063fe641 100644
--- a/erts/etc/unix/safe_string.h
+++ b/erts/etc/common/safe_string.h
@@ -1,24 +1,24 @@
/*
* %CopyrightBegin%
- *
+ *
* Copyright Ericsson AB 2008-2009. All Rights Reserved.
- *
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
-/*
+/*
* Module: safe_string.h
- *
+ *
* This is an interface to a bunch of generic string operation
* that are safe regarding buffer overflow.
*
@@ -62,4 +62,3 @@ char* find_str(const char* haystack, int size, const char* needle);
#ifndef HAVE_MEMMOVE
void* memmove(void *dest, const void *src, size_t n);
#endif
-
diff --git a/erts/etc/common/to_erl_common.c b/erts/etc/common/to_erl_common.c
new file mode 100644
index 0000000000..ab706fffe0
--- /dev/null
+++ b/erts/etc/common/to_erl_common.c
@@ -0,0 +1,716 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Module: to_erl.c
+ *
+ * This module implements a process that opens two specified FIFOs, one
+ * for reading and one for writing; reads from its stdin, and writes what
+ * it has read to the write FIF0; reads from the read FIFO, and writes to
+ * its stdout.
+ *
+ ________ _________
+ | |--<-- pipe.r (fifo1) --<--| |
+ | to_erl | | run_erl | (parent)
+ |________|-->-- pipe.w (fifo2) -->--|_________|
+ ^ master pty
+ |
+ | slave pty
+ ____V____
+ | |
+ | "erl" | (child)
+ |_________|
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dirent.h>
+#include <errno.h>
+
+#ifdef __OSE__
+#include <aio.h>
+#include "ose.h"
+#include "efs.h"
+#include "ose_spi/fm.sig"
+#else /* __UNIX__ */
+#include <termios.h>
+#include <signal.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
+#include "to_erl_common.h"
+#include "run_erl_vsn.h"
+#include "safe_string.h" /* strn_cpy, strn_catf, sn_printf, etc. */
+
+#if defined(O_NONBLOCK)
+# define DONT_BLOCK_PLEASE O_NONBLOCK
+#else
+# define DONT_BLOCK_PLEASE O_NDELAY
+# if !defined(EAGAIN)
+# define EAGAIN -3898734
+# endif
+#endif
+
+#ifdef HAVE_STRERROR
+# define STRERROR(x) strerror(x)
+#else
+# define STRERROR(x) ""
+#endif
+
+#define noDEBUG
+
+#ifdef __OSE__
+#define PIPE_DIR "/pipe/"
+#else
+#define PIPE_DIR "/tmp/"
+#endif
+#define PIPE_STUBNAME "erlang.pipe"
+#define PIPE_STUBLEN strlen(PIPE_STUBNAME)
+
+#ifdef DEBUG
+#define STATUS(s) { fprintf(stderr, (s)); fflush(stderr); }
+#else
+#define STATUS(s)
+#endif
+
+#ifndef FILENAME_MAX
+#define FILENAME_MAX 250
+#endif
+
+static int tty_eof = 0;
+static int protocol_ver = RUN_ERL_LO_VER; /* assume lowest to begin with */
+
+static int write_all(int fd, const char* buf, int len);
+static int version_handshake(char* buf, int len, int wfd);
+
+
+#ifdef __OSE__
+
+#define SET_AIO(REQ,FD,SIZE,BUFF) \
+ /* Make sure to clean data structure of previous request */ \
+ memset(&(REQ),0,sizeof(REQ)); \
+ (REQ).aio_fildes = FD; \
+ (REQ).aio_offset = FM_POSITION_CURRENT; \
+ (REQ).aio_nbytes = SIZE; \
+ (REQ).aio_buf = BUFF; \
+ (REQ).aio_sigevent.sigev_notify = SIGEV_NONE
+
+#define READ_AIO(REQ,FD,SIZE,BUFF) \
+ SET_AIO(REQ,FD,SIZE,BUFF); \
+ if (aio_read(&(REQ)) != 0) \
+ fprintf(stderr,"aio_read of child_read_req(%d) failed" \
+ "with error %d\n",FD,errno)
+
+union SIGNAL {
+ SIGSELECT signo;
+ struct FmReadPtr fm_read_ptr;
+};
+
+#else /* __UNIX__ */
+static int recv_sig = 0;
+static struct termios tty_smode, tty_rmode;
+static int window_size_seq(char* buf, size_t bufsz);
+#ifdef DEBUG
+static void show_terminal_settings(struct termios *);
+#endif
+
+static void handle_ctrlc(int sig)
+{
+ /* Reinstall the handler, and signal break flag */
+ signal(SIGINT,handle_ctrlc);
+ recv_sig = SIGINT;
+}
+
+static void handle_sigwinch(int sig)
+{
+ recv_sig = SIGWINCH;
+}
+#endif
+
+static void usage(char *pname)
+{
+ fprintf(stderr, "Usage: ");
+ fprintf(stderr,TO_ERL_USAGE,pname);
+}
+
+int to_erl(int argc, char **argv)
+{
+ char FIFO1[FILENAME_MAX], FIFO2[FILENAME_MAX];
+ int i, len, wfd, rfd;
+ char pipename[FILENAME_MAX];
+ int pipeIx = 1;
+ int force_lock = 0;
+ int got_some = 0;
+
+#ifdef __OSE__
+ struct aiocb stdin_read_req, pipe_read_req;
+ FmHandle stdin_fh, pipe_fh;
+ char *stdin_buf, *pipe_buf;
+ char *buf;
+ union SIGNAL *sig;
+#else /* __UNIX__ */
+ char buf[BUFSIZ];
+ fd_set readfds;
+#endif
+
+ if (argc >= 2 && argv[1][0]=='-') {
+ switch (argv[1][1]) {
+ case 'h':
+ usage(argv[0]);
+ exit(1);
+ case 'F':
+ force_lock = 1;
+ break;
+ default:
+ fprintf(stderr,"Invalid option '%s'\n",argv[1]);
+ exit(1);
+ }
+ pipeIx = 2;
+ }
+
+#ifdef DEBUG
+ fprintf(stderr, "%s: pid is : %d\n", argv[0],(int)
+#ifdef __OSE__
+ current_process()
+#else /* __UNIX__ */
+ getpid()
+#endif
+ );
+#endif
+
+ strn_cpy(pipename, sizeof(pipename),
+ (argv[pipeIx] ? argv[pipeIx] : PIPE_DIR));
+
+ if(*pipename && pipename[strlen(pipename)-1] == '/') {
+ /* The user wishes us to find a pipe name in the specified */
+ /* directory */
+ int highest_pipe_num = 0;
+ DIR *dirp;
+ struct dirent *direntp;
+
+ dirp = opendir(pipename);
+ if(!dirp) {
+ fprintf(stderr, "Can't access pipe directory %s: %s\n", pipename, strerror(errno));
+ exit(1);
+ }
+
+ /* Check the directory for existing pipes */
+
+ while((direntp=readdir(dirp)) != NULL) {
+ if(strncmp(direntp->d_name,PIPE_STUBNAME,PIPE_STUBLEN)==0) {
+ int num = atoi(direntp->d_name+PIPE_STUBLEN+1);
+ if(num > highest_pipe_num)
+ highest_pipe_num = num;
+ }
+ }
+ closedir(dirp);
+ strn_catf(pipename, sizeof(pipename), (highest_pipe_num?"%s.%d":"%s"),
+ PIPE_STUBNAME, highest_pipe_num);
+ } /* if */
+
+ /* read FIFO */
+ sn_printf(FIFO1,sizeof(FIFO1),"%s.r",pipename);
+ /* write FIFO */
+ sn_printf(FIFO2,sizeof(FIFO2),"%s.w",pipename);
+
+#ifndef __OSE__
+ /* Check that nobody is running to_erl on this pipe already */
+ if ((wfd = open (FIFO1, O_WRONLY|DONT_BLOCK_PLEASE, 0)) >= 0) {
+ /* Open as server succeeded -- to_erl is already running! */
+ close(wfd);
+ fprintf(stderr, "Another to_erl process already attached to pipe "
+ "%s.\n", pipename);
+ if (force_lock) {
+ fprintf(stderr, "But we proceed anyway by force (-F).\n");
+ }
+ else {
+ exit(1);
+ }
+ }
+#endif
+
+ if ((rfd = open (FIFO1, O_RDONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
+#ifdef DEBUG
+ fprintf(stderr, "Could not open FIFO %s for reading.\n", FIFO1);
+#endif
+ fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno));
+ exit(1);
+ }
+#ifdef DEBUG
+ fprintf(stderr, "to_erl: %s opened for reading\n", FIFO1);
+#endif
+
+ if ((wfd = open (FIFO2, O_WRONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
+#ifdef DEBUG
+ fprintf(stderr, "Could not open FIFO %s for writing.\n", FIFO2);
+#endif
+ fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno));
+ close(rfd);
+ exit(1);
+ }
+#ifdef DEBUG
+ fprintf(stderr, "to_erl: %s opened for writing\n", FIFO2);
+#endif
+
+#ifndef __OSE__
+ fprintf(stderr, "Attaching to %s (^D to exit)\n\n", pipename);
+#else
+ fprintf(stderr, "Attaching to %s (^C to exit)\n\n", pipename);
+#endif
+
+#ifndef __OSE__
+ /* Set break handler to our handler */
+ signal(SIGINT,handle_ctrlc);
+
+ /*
+ * Save the current state of the terminal, and set raw mode.
+ */
+ if (tcgetattr(0, &tty_rmode) , 0) {
+ fprintf(stderr, "Cannot get terminals current mode\n");
+ exit(-1);
+ }
+ tty_smode = tty_rmode;
+ tty_eof = '\004'; /* Ctrl+D to exit */
+#ifdef DEBUG
+ show_terminal_settings(&tty_rmode);
+#endif
+ tty_smode.c_iflag =
+ 1*BRKINT |/*Signal interrupt on break.*/
+ 1*IGNPAR |/*Ignore characters with parity errors.*/
+ 1*ISTRIP |/*Strip character.*/
+ 0;
+
+#if 0
+0*IGNBRK |/*Ignore break condition.*/
+0*PARMRK |/*Mark parity errors.*/
+0*INPCK |/*Enable input parity check.*/
+0*INLCR |/*Map NL to CR on input.*/
+0*IGNCR |/*Ignore CR.*/
+0*ICRNL |/*Map CR to NL on input.*/
+0*IUCLC |/*Map upper-case to lower-case on input.*/
+0*IXON |/*Enable start/stop output control.*/
+0*IXANY |/*Enable any character to restart output.*/
+0*IXOFF |/*Enable start/stop input control.*/
+0*IMAXBEL|/*Echo BEL on input line too long.*/
+#endif
+
+ tty_smode.c_oflag =
+ 1*OPOST |/*Post-process output.*/
+ 1*ONLCR |/*Map NL to CR-NL on output.*/
+#ifdef XTABS
+ 1*XTABS |/*Expand tabs to spaces. (Linux)*/
+#endif
+#ifdef OXTABS
+ 1*OXTABS |/*Expand tabs to spaces. (FreeBSD)*/
+#endif
+#ifdef NL0
+ 1*NL0 |/*Select newline delays*/
+#endif
+#ifdef CR0
+ 1*CR0 |/*Select carriage-return delays*/
+#endif
+#ifdef TAB0
+ 1*TAB0 |/*Select horizontal tab delays*/
+#endif
+#ifdef BS0
+ 1*BS0 |/*Select backspace delays*/
+#endif
+#ifdef VT0
+ 1*VT0 |/*Select vertical tab delays*/
+#endif
+#ifdef FF0
+ 1*FF0 |/*Select form feed delays*/
+#endif
+ 0;
+
+#if 0
+0*OLCUC |/*Map lower case to upper on output.*/
+0*OCRNL |/*Map CR to NL on output.*/
+0*ONOCR |/*No CR output at column 0.*/
+0*ONLRET |/*NL performs CR function.*/
+0*OFILL |/*Use fill characters for delay.*/
+0*OFDEL |/*Fill is DEL, else NULL.*/
+0*NL1 |
+0*CR1 |
+0*CR2 |
+0*CR3 |
+0*TAB1 |
+0*TAB2 |
+0*TAB3 |/*Expand tabs to spaces.*/
+0*BS1 |
+0*VT1 |
+0*FF1 |
+#endif
+
+ /* JALI: removed setting the tty_smode.c_cflag flags, since this is not */
+ /* advisable if this is a *real* terminal, such as the console. In fact */
+ /* this may hang the entire machine, deep, deep down (signalling break */
+ /* or toggling the abort switch doesn't help) */
+
+ tty_smode.c_lflag =
+ 0;
+
+#if 0
+0*ISIG |/*Enable signals.*/
+0*ICANON |/*Canonical input (erase and kill processing).*/
+0*XCASE |/*Canonical upper/lower presentation.*/
+0*ECHO |/*Enable echo.*/
+0*ECHOE |/*Echo erase character as BS-SP-BS.*/
+0*ECHOK |/*Echo NL after kill character.*/
+0*ECHONL |/*Echo NL.*/
+0*NOFLSH |/*Disable flush after interrupt or quit.*/
+0*TOSTOP |/*Send SIGTTOU for background output.*/
+0*ECHOCTL|/*Echo control characters as ^char, delete as ^?.*/
+0*ECHOPRT|/*Echo erase character as character erased.*/
+0*ECHOKE |/*BS-SP-BS erase entire line on line kill.*/
+0*FLUSHO |/*Output is being flushed.*/
+0*PENDIN |/*Retype pending input at next read or input character.*/
+0*IEXTEN |/*Enable extended (implementation-defined) functions.*/
+#endif
+
+ tty_smode.c_cc[VMIN] =0;/* Note that VMIN is the same as VEOF! */
+ tty_smode.c_cc[VTIME] =0;/* Note that VTIME is the same as VEOL! */
+ tty_smode.c_cc[VINTR] =3;
+
+ tcsetattr(0, TCSADRAIN, &tty_smode);
+
+#ifdef DEBUG
+ show_terminal_settings(&tty_smode);
+#endif
+
+#endif /* !__OSE__ */
+ /*
+ * "Write a ^L to the FIFO which causes the other end to redisplay
+ * the input line."
+ * This does not seem to work as was intended in old comment above.
+ * However, this control character is now (R12B-3) used by run_erl
+ * to trigger the version handshaking between to_erl and run_erl
+ * at the start of every new to_erl-session.
+ */
+
+ if (write(wfd, "\014", 1) < 0) {
+ fprintf(stderr, "Error in writing ^L to FIFO.\n");
+ }
+
+#ifdef __OSE__
+ /* we have a tiny stack so we malloc the buffers */
+ stdin_buf = malloc(sizeof(char) * BUFSIZ);
+ pipe_buf = malloc(sizeof(char) * BUFSIZ);
+
+ efs_examine_fd(rfd,FLIB_FD_HANDLE,&pipe_fh);
+ efs_examine_fd(0,FLIB_FD_HANDLE,&stdin_fh);
+ READ_AIO(stdin_read_req,0,BUFSIZ,stdin_buf);
+ READ_AIO(pipe_read_req,rfd,BUFSIZ,pipe_buf);
+#endif
+
+ /*
+ * read and write
+ */
+ while (1) {
+#ifndef __OSE__
+ FD_ZERO(&readfds);
+ FD_SET(0, &readfds);
+ FD_SET(rfd, &readfds);
+ if (select(rfd + 1, &readfds, NULL, NULL, NULL) < 0) {
+ if (recv_sig) {
+ FD_ZERO(&readfds);
+ }
+ else {
+ fprintf(stderr, "Error in select.\n");
+ break;
+ }
+ }
+ len = 0;
+
+ /*
+ * Read from terminal and write to FIFO
+ */
+ if (recv_sig) {
+ switch (recv_sig) {
+ case SIGINT:
+ fprintf(stderr, "[Break]\n\r");
+ buf[0] = '\003';
+ len = 1;
+ break;
+ case SIGWINCH:
+ len = window_size_seq(buf,sizeof(buf));
+ break;
+ default:
+ fprintf(stderr,"Unexpected signal: %u\n",recv_sig);
+ }
+ recv_sig = 0;
+ }
+ else
+#else /* __OSE__ */
+ SIGSELECT sigsel[] = {0};
+ sig = receive(sigsel);
+ len = 0;
+#endif
+#ifndef __OSE__
+ if (FD_ISSET(0,&readfds)) {
+ len = read(0, buf, sizeof(buf));
+#else /* __OSE__ */
+ if (sig->signo == FM_READ_PTR_REPLY &&
+ sig->fm_read_ptr.handle == stdin_fh) {
+ len = sig->fm_read_ptr.status == EFS_SUCCESS ? sig->fm_read_ptr.actual : -1;
+ buf = sig->fm_read_ptr.buffer;
+#endif
+ if (len <= 0) {
+ close(rfd);
+ close(wfd);
+ if (len < 0) {
+ fprintf(stderr, "Error in reading from stdin.\n");
+ } else {
+ fprintf(stderr, "[EOF]\n\r");
+ }
+ break;
+ }
+ /* check if there is an eof character in input */
+ for (i = 0; i < len-1 && buf[i] != tty_eof; i++);
+ if (buf[i] == tty_eof) {
+ fprintf(stderr, "[Quit]\n\r");
+ break;
+ }
+ }
+
+ if (len) {
+#ifdef DEBUG
+ if(write(1, buf, len));
+#endif
+ if (write_all(wfd, buf, len) != len) {
+ fprintf(stderr, "Error in writing to FIFO.\n");
+ close(rfd);
+ close(wfd);
+ break;
+ }
+ STATUS("\" OK\r\n");
+#ifdef __OSE__
+ aio_dispatch(sig);
+ READ_AIO(stdin_read_req, 0, BUFSIZ, stdin_buf);
+#endif
+ }
+
+ /*
+ * Read from FIFO, write to terminal.
+ */
+#ifndef __OSE__
+ if (FD_ISSET(rfd, &readfds)) {
+ STATUS("FIFO read: ");
+ len = read(rfd, buf, BUFSIZ);
+#else /* __OSE__ */
+ if (sig->signo == FM_READ_PTR_REPLY &&
+ sig->fm_read_ptr.handle == pipe_fh) {
+ len = sig->fm_read_ptr.status == EFS_SUCCESS ? sig->fm_read_ptr.actual : -1;
+ buf = sig->fm_read_ptr.buffer;
+#endif
+ if (len < 0 && errno == EAGAIN) {
+ /*
+ * No data this time, but the writing end of the FIFO is still open.
+ * Do nothing.
+ */
+ ;
+ } else if (len <= 0) {
+ /*
+ * Either an error or end of file. In either case, break out
+ * of the loop.
+ */
+ close(rfd);
+ close(wfd);
+ if (len < 0) {
+ fprintf(stderr, "Error in reading from FIFO.\n");
+ } else
+ fprintf(stderr, "[End]\n\r");
+ break;
+ } else {
+ if (!got_some) {
+ if ((len=version_handshake(buf,len,wfd)) < 0) {
+ close(rfd);
+ close(wfd);
+ break;
+ }
+#ifndef __OSE__
+ if (protocol_ver >= 1) {
+ /* Tell run_erl size of terminal window */
+ signal(SIGWINCH, handle_sigwinch);
+ raise(SIGWINCH);
+ }
+#endif
+ got_some = 1;
+ }
+
+ /*
+ * We successfully read at least one character. Write what we got.
+ */
+ STATUS("Terminal write: \"");
+ if (write_all(1, buf, len) != len) {
+ fprintf(stderr, "Error in writing to terminal.\n");
+ close(rfd);
+ close(wfd);
+ break;
+ }
+ STATUS("\" OK\r\n");
+#ifdef __OSE__
+ aio_dispatch(sig);
+ READ_AIO(pipe_read_req, rfd, BUFSIZ, pipe_buf);
+#endif
+ }
+ }
+ }
+
+#ifndef __OSE__
+ /*
+ * Reset terminal characterstics
+ * XXX
+ */
+ tcsetattr(0, TCSADRAIN, &tty_rmode);
+#endif
+ return 0;
+}
+
+/* Call write() until entire buffer has been written or error.
+ * Return len or -1.
+ */
+static int write_all(int fd, const char* buf, int len)
+{
+ int left = len;
+ int written;
+ while (left) {
+ written = write(fd,buf,left);
+ if (written < 0) {
+ return -1;
+ }
+ left -= written;
+ buf += written;
+ }
+ return len;
+}
+
+#ifndef __OSE__
+static int window_size_seq(char* buf, size_t bufsz)
+{
+#ifdef TIOCGWINSZ
+ struct winsize ws;
+ static const char prefix[] = "\033_";
+ static const char suffix[] = "\033\\";
+ /* This Esc sequence is called "Application Program Command"
+ and seems suitable to use for our own customized stuff. */
+
+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == 0) {
+ int len = sn_printf(buf, bufsz, "%swinsize=%u,%u%s",
+ prefix, ws.ws_col, ws.ws_row, suffix);
+ return len;
+ }
+#endif /* TIOCGWINSZ */
+ return 0;
+}
+#endif /* !__OSE__ */
+
+/* to_erl run_erl
+ * | |
+ * |---------- '\014' -------->| (session start)
+ * | |
+ * |<---- "[run_erl v1-0]" ----| (version interval)
+ * | |
+ * |--- Esc_"version=1"Esc\ -->| (common version)
+ * | |
+ */
+static int version_handshake(char* buf, int len, int wfd)
+{
+ unsigned re_high=0, re_low;
+ char *end = find_str(buf,len,"]\n");
+
+ if (end && sscanf(buf,"[run_erl v%u-%u",&re_high,&re_low)==2) {
+ char wbuf[30];
+ int wlen;
+
+ if (re_low > RUN_ERL_HI_VER || re_high < RUN_ERL_LO_VER) {
+ fprintf(stderr,"Incompatible versions: to_erl=v%u-%u run_erl=v%u-%u\n",
+ RUN_ERL_HI_VER, RUN_ERL_LO_VER, re_high, re_low);
+ return -1;
+ }
+ /* Choose highest common version */
+ protocol_ver = re_high < RUN_ERL_HI_VER ? re_high : RUN_ERL_HI_VER;
+
+ wlen = sn_printf(wbuf, sizeof(wbuf), "\033_version=%u\033\\",
+ protocol_ver);
+ if (write_all(wfd, wbuf, wlen) < 0) {
+ fprintf(stderr,"Failed to send version handshake\n");
+ return -1;
+ }
+ end += 2;
+ len -= (end-buf);
+ memmove(buf,end,len);
+
+ }
+ else { /* we assume old run_erl without version handshake */
+ protocol_ver = 0;
+ }
+
+ if (re_high != RUN_ERL_HI_VER) {
+ fprintf(stderr,"run_erl has different version, "
+ "using common protocol level %u\n", protocol_ver);
+ }
+
+ return len;
+}
+
+
+#if defined(DEBUG) && !defined(__OSE__)
+#define S(x) ((x) > 0 ? 1 : 0)
+
+static void show_terminal_settings(struct termios *t)
+{
+ fprintf(stderr,"c_iflag:\n");
+ fprintf(stderr,"Signal interrupt on break: BRKINT %d\n", S(t->c_iflag & BRKINT));
+ fprintf(stderr,"Map CR to NL on input: ICRNL %d\n", S(t->c_iflag & ICRNL));
+ fprintf(stderr,"Ignore break condition: IGNBRK %d\n", S(t->c_iflag & IGNBRK));
+ fprintf(stderr,"Ignore CR: IGNCR %d\n", S(t->c_iflag & IGNCR));
+ fprintf(stderr,"Ignore char with par. err's: IGNPAR %d\n", S(t->c_iflag & IGNPAR));
+ fprintf(stderr,"Map NL to CR on input: INLCR %d\n", S(t->c_iflag & INLCR));
+ fprintf(stderr,"Enable input parity check: INPCK %d\n", S(t->c_iflag & INPCK));
+ fprintf(stderr,"Strip character ISTRIP %d\n", S(t->c_iflag & ISTRIP));
+ fprintf(stderr,"Enable start/stop input ctrl IXOFF %d\n", S(t->c_iflag & IXOFF));
+ fprintf(stderr,"ditto output ctrl IXON %d\n", S(t->c_iflag & IXON));
+ fprintf(stderr,"Mark parity errors PARMRK %d\n", S(t->c_iflag & PARMRK));
+ fprintf(stderr,"\n");
+ fprintf(stderr,"c_oflag:\n");
+ fprintf(stderr,"Perform output processing OPOST %d\n", S(t->c_oflag & OPOST));
+ fprintf(stderr,"\n");
+ fprintf(stderr,"c_cflag:\n");
+ fprintf(stderr,"Ignore modem status lines CLOCAL %d\n", S(t->c_cflag & CLOCAL));
+ fprintf(stderr,"\n");
+ fprintf(stderr,"c_local:\n");
+ fprintf(stderr,"Enable echo ECHO %d\n", S(t->c_lflag & ECHO));
+ fprintf(stderr,"\n");
+ fprintf(stderr,"c_cc:\n");
+ fprintf(stderr,"c_cc[VEOF] %d\n", t->c_cc[VEOF]);
+}
+#endif /* DEBUG && !__OSE__ */
diff --git a/erts/etc/common/to_erl_common.h b/erts/etc/common/to_erl_common.h
new file mode 100644
index 0000000000..9967db94b8
--- /dev/null
+++ b/erts/etc/common/to_erl_common.h
@@ -0,0 +1,28 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+#ifndef ERL_TO_ERL_H
+#define ERL_TO_ERL_H
+
+#define TO_ERL_USAGE "to_erl [-h|-F] %s\n" \
+ "\t-h\tThis help text.\n" \
+ "\t-f\tForce connection even though pipe is locked by other to_erl process."
+
+int to_erl(int argc, char **argv);
+
+#endif
diff --git a/erts/etc/common/typer.c b/erts/etc/common/typer.c
index c95959d52d..b45867f845 100644
--- a/erts/etc/common/typer.c
+++ b/erts/etc/common/typer.c
@@ -99,14 +99,33 @@ char *strerror(int errnum)
}
#endif /* !HAVE_STRERROR */
+#ifdef __WIN32__
+int wmain(int argc, wchar_t **wcargv)
+{
+ char** argv;
+#else
int
main(int argc, char** argv)
{
+#endif
int eargv_size;
int eargc_base; /* How many arguments in the base of eargv. */
char* emulator;
int need_shell = 0;
+#ifdef __WIN32__
+ int i;
+ int len;
+ /* Convert argv to utf8 */
+ argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, NULL, 0, NULL, NULL);
+ argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wcargv[i], -1, argv[i], len, NULL, NULL);
+ }
+ argv[argc] = NULL;
+#endif
+
emulator = get_default_emulator(argv[0]);
/*
@@ -193,66 +212,65 @@ push_words(char* src)
PUSH(strsave(sbuf));
}
#ifdef __WIN32__
-char *make_commandline(char **argv)
+wchar_t *make_commandline(char **argv)
{
- static char *buff = NULL;
+ static wchar_t *buff = NULL;
static int siz = 0;
- int num = 0;
- char **arg, *p;
+ int num = 0, len;
+ char **arg;
+ wchar_t *p;
if (*argv == NULL) {
- return "";
+ return L"";
}
for (arg = argv; *arg != NULL; ++arg) {
num += strlen(*arg)+1;
}
if (!siz) {
siz = num;
- buff = malloc(siz*sizeof(char));
+ buff = (wchar_t *) emalloc(siz*sizeof(wchar_t));
} else if (siz < num) {
siz = num;
- buff = realloc(buff,siz*sizeof(char));
+ buff = (wchar_t *) realloc(buff,siz*sizeof(wchar_t));
}
p = buff;
+ num=0;
for (arg = argv; *arg != NULL; ++arg) {
- strcpy(p,*arg);
- p+=strlen(*arg);
- *p++=' ';
+ len = MultiByteToWideChar(CP_UTF8, 0, *arg, -1, p, siz);
+ p+=(len-1);
+ *p++=L' ';
}
- *(--p) = '\0';
+ *(--p) = L'\0';
if (debug) {
- printf("Processed commandline:%s\n",buff);
+ printf("Processed command line:%S\n",buff);
}
return buff;
}
int my_spawnvp(char **argv)
{
- STARTUPINFO siStartInfo;
+ STARTUPINFOW siStartInfo;
PROCESS_INFORMATION piProcInfo;
DWORD ec;
- memset(&siStartInfo,0,sizeof(STARTUPINFO));
- siStartInfo.cb = sizeof(STARTUPINFO);
+ memset(&siStartInfo,0,sizeof(STARTUPINFOW));
+ siStartInfo.cb = sizeof(STARTUPINFOW);
siStartInfo.dwFlags = STARTF_USESTDHANDLES;
siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
- siStartInfo.wShowWindow = SW_HIDE;
- siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
-
-
- if (!CreateProcess(NULL,
- make_commandline(argv),
- NULL,
- NULL,
- TRUE,
- 0,
- NULL,
- NULL,
- &siStartInfo,
- &piProcInfo)) {
+
+ if (!CreateProcessW(NULL,
+ make_commandline(argv),
+ NULL,
+ NULL,
+ TRUE,
+ 0,
+ NULL,
+ NULL,
+ &siStartInfo,
+ &piProcInfo)) {
return -1;
}
CloseHandle(piProcInfo.hThread);
@@ -330,6 +348,18 @@ strsave(char* string)
return p;
}
+static int
+file_exists(char *progname)
+{
+#ifdef __WIN32__
+ wchar_t wcsbuf[MAXPATHLEN];
+ MultiByteToWideChar(CP_UTF8, 0, progname, -1, wcsbuf, MAXPATHLEN);
+ return (_waccess(wcsbuf, 0) != -1);
+#else
+ return (access(progname, 1) != -1);
+#endif
+}
+
static char*
get_default_emulator(char* progname)
{
@@ -343,15 +373,8 @@ get_default_emulator(char* progname)
for (s = sbuf+strlen(sbuf); s >= sbuf; s--) {
if (IS_DIRSEP(*s)) {
strcpy(s+1, ERL_NAME);
-#ifdef __WIN32__
- if (_access(sbuf, 0) != -1) {
- return strsave(sbuf);
- }
-#else
- if (access(sbuf, 1) != -1) {
+ if(file_exists(sbuf))
return strsave(sbuf);
- }
-#endif
break;
}
}
diff --git a/erts/etc/ose/etc.lmconf b/erts/etc/ose/etc.lmconf
new file mode 100644
index 0000000000..b402b325b1
--- /dev/null
+++ b/erts/etc/ose/etc.lmconf
@@ -0,0 +1,20 @@
+OSE_LM_STACK_SIZES=256,512,1024,2048,4096,8192,16384,65536
+OSE_LM_SIGNAL_SIZES=31,63,127,255,1023,4095,16383,65535
+OSE_LM_POOL_SIZE=0x200000
+OSE_LM_MAIN_NAME=main
+OSE_LM_MAIN_STACK_SIZE=0xF000
+OSE_LM_MAIN_PRIORITY=20
+## Has to be of a type that allows MAM
+OSE_LM_PROGRAM_TYPE=APP_RAM
+OSE_LM_DATA_INIT=YES
+OSE_LM_BSS_INIT=YES
+OSE_LM_EXEC_MODEL=SHARED
+HEAP_MAX_SIZE=1000000000
+HEAP_SMALL_BUF_INIT_SIZE=64000000
+HEAP_LARGE_BUF_THRESHOLD=16000000
+HEAP_LOCK_TYPE=2
+
+# Setting the environment variable EFS_RESOLVE_TMO on the block to 0.
+# This will eliminiate delays when trying to open files on not mounted
+# volumes.
+EFS_RESOLVE_TMO=0
diff --git a/erts/etc/ose/run_erl.c b/erts/etc/ose/run_erl.c
new file mode 100644
index 0000000000..8bc49a485e
--- /dev/null
+++ b/erts/etc/ose/run_erl.c
@@ -0,0 +1,663 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Module: run_erl.c
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* System includes */
+#include <aio.h>
+#include <errno.h>
+#include <dirent.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+/* OSE includes */
+#include "ose.h"
+#include "ose_spi/ose_spi.h"
+#include "efs.h"
+#include "pm.h"
+#include "ose_spi/fm.sig"
+
+/* erts includes */
+#include "run_erl.h"
+#include "run_erl_common.h"
+#include "safe_string.h" /* sn_printf, strn_cpy, strn_cat, etc */
+
+typedef struct RunErlSetup_ {
+ SIGSELECT signo;
+ int run_daemon;
+ char *logdir;
+ char *command;
+ char *pipename;
+ char *blockname;
+} RunErlSetup;
+
+typedef struct ProgramState_ {
+ /* child process */
+ int ifd, ofd;
+ OSDOMAIN domain;
+ PROCESS progpid, mainbid;
+ struct PmProgramInfo *info;
+ /* to_erl */
+ char w_pipe[FILENAME_BUFSIZ],
+ r_pipe[FILENAME_BUFSIZ];
+} ProgramState;
+
+union SIGNAL {
+ SIGSELECT signo;
+ RunErlSetup setup;
+ struct FmReadPtr fm_read_ptr;
+ struct FmWritePtr fm_write_ptr;
+};
+
+static OSBOOLEAN hunt_in_block(char *block_name,
+ char *process_name,
+ PROCESS *pid);
+static int create_child_process(char *command_string, char *blockname,
+ ProgramState *state);
+
+
+static OSBOOLEAN hunt_in_block(char *block_name,
+ char *process_name,
+ PROCESS *pid) {
+ struct OS_pid_list *list;
+ PROCESS block_id = OSE_ILLEGAL_PROCESS;
+ int i;
+ char *name;
+
+ *pid = OSE_ILLEGAL_PROCESS;
+
+ list = get_bid_list(0);
+
+ if (!list)
+ return 0;
+
+ for (i = 0; i < list->count; i++) {
+
+ if (list->list[i] == get_bid(current_process()))
+ continue;
+
+ name = (char*)get_pid_info(list->list[i], OSE_PI_NAME);
+ if (name) {
+ if (strcmp(name,block_name) == 0) {
+ block_id = list->list[i];
+ free_buf((union SIGNAL**)&name);
+ break;
+ }
+ free_buf((union SIGNAL**)&name);
+ }
+ }
+
+ free_buf((union SIGNAL**)&list);
+
+ if (block_id == OSE_ILLEGAL_PROCESS)
+ return 0;
+
+ list = get_pid_list(block_id);
+
+ if (!list)
+ return 0;
+
+ for (i = 0; i < list->count; i++) {
+ name = (char*)get_pid_info(list->list[i], OSE_PI_NAME);
+ if (name) {
+ if (strcmp(name,process_name) == 0) {
+ *pid = list->list[i];
+ free_buf((union SIGNAL**)&name);
+ break;
+ }
+ free_buf((union SIGNAL**)&name);
+ }
+ }
+
+ free_buf((union SIGNAL**)&list);
+
+ if (*pid == OSE_ILLEGAL_PROCESS)
+ return 0;
+
+ return 1;
+
+}
+
+
+static int create_child_process(char *command_string, char *blockname,
+ ProgramState *state) {
+ char *command = command_string;
+ char *argv;
+ int i = 0;
+ int ret_status;
+ PmStatus pm_status;
+ int tmp_io[2];
+ int fd_arr[3];
+ int ifd[2], ofd[2];
+ char *handle;
+ struct PmLoadModuleInfoReply *mod_info;
+
+ /* Parse out cmd and argv from the command string */
+ while (1) {
+ if (command[i] == ' ' || command[i] == '\0') {
+ if (command[i] == '\0')
+ argv = NULL;
+ else {
+ command[i] = '\0';
+ argv = command_string + i + 1;
+ }
+ break;
+ }
+ i++;
+ }
+
+ if (blockname)
+ handle = blockname;
+ else
+ handle = simple_basename(command);
+
+ if (ose_pm_load_module_info(handle,&mod_info) == PM_SUCCESS) {
+ /* Already installed */
+ free_buf((union SIGNAL**)&mod_info);
+ } else if ((pm_status = ose_pm_install_load_module(0,"ELF",command,handle,0,0,NULL))
+ != PM_SUCCESS) {
+ ERROR1(LOG_ERR,"ose_pm_install_load_module failed - pmstatus: 0x%08x\n",
+ pm_status);
+ return 0;
+ }
+
+ state->domain = PM_NEW_DOMAIN;
+
+ pm_status = ose_pm_create_program(&state->domain, handle, 0, 0 , NULL,
+ &state->progpid, &state->mainbid);
+
+ if (pm_status != PM_SUCCESS) {
+ if (pm_status == PM_EINSTALL_HANDLE_IN_USE)
+ ERROR1(LOG_ERR,"ose_pm_create_program failed - "
+ "install handle \"%s\" is in use. You can specify another "
+ "install handle by using the -block option to run_erl.\n",handle);
+ else
+ ERROR1(LOG_ERR,"ose_pm_create_program failed - pmstatus: 0x%08x\n",
+ pm_status);
+ return 0;
+ }
+
+ pm_status = ose_pm_program_info(state->progpid, &state->info);
+ /* FIXME don't forget to free this ((union SIGNAL **)&info) */
+ if (pm_status != PM_SUCCESS) {
+ ERROR1(LOG_ERR,"ose_pm_program_info failed - pmstatus: 0x%08x\n",
+ pm_status);
+ return 0;
+ }
+
+ /* We only clone stdin+stdout, what about stderr? */
+
+ /* create pipes */
+ if (pipe(ifd) < 0) {
+ if (errno == ENOENT)
+ ERRNO_ERR0(LOG_ERR,"The /pipe file system is not available\n");
+ else
+ ERRNO_ERR0(LOG_ERR,"pipe ifd failed\n");
+ return 0;
+ }
+
+ if (pipe(ofd) < 0) {
+ ERRNO_ERR0(LOG_ERR,"pipe ofd failed\n");
+ return 0;
+ }
+
+ /* FIXME Lock? */
+
+ /* backup our stdin stdout */
+ if ((tmp_io[0] = dup(0)) < 0) {
+ ERRNO_ERR0(LOG_ERR,"dup 0 failed\n");
+ return 0;
+ }
+
+ if ((tmp_io[1] = dup(1)) < 0) {
+ ERRNO_ERR0(LOG_ERR,"dup 1 failed\n");
+ return 0;
+ }
+
+ /* set new pipe to fd 0,1 */
+ if (dup2(ifd[1], 1) < 0) {
+ ERRNO_ERR0(LOG_ERR,"dup2 1 failed\n");
+ return 0;
+ }
+
+ if (dup2(ofd[0], 0) < 0) {
+ ERRNO_ERR0(LOG_ERR,"dup2 0 failed\n");
+ return 0;
+ }
+
+ /* clone array to newly created */
+ fd_arr[0] = 2; /* Number of fd's */
+ fd_arr[1] = 0;
+ fd_arr[2] = 1;
+
+ if ((ret_status = efs_clone_array(state->info->main_process, fd_arr))
+ != EFS_SUCCESS) {
+ ERROR1(LOG_ERR,"efs_close_array filed, errcode: %d\n", ret_status);
+ return 0;
+ }
+
+ if (dup2(tmp_io[1], 1) < 0) {
+ ERRNO_ERR0(LOG_ERR,"restoring dup2 1 failed\n");
+ return 0;
+ }
+
+ if (dup2(tmp_io[0], 0) < 0) {
+ ERRNO_ERR0(LOG_ERR,"restoring dup2 1 failed\n");
+ return 0;
+ }
+
+ /* close loose-ends */
+ sf_close(tmp_io[0]);
+ sf_close(tmp_io[1]);
+ sf_close(ifd[1]);
+ sf_close(ofd[0]);
+ state->ifd = ifd[0];
+ state->ofd = ofd[1];
+
+ if (argv && set_env(state->progpid, "ARGV", argv)) {
+ ERRNO_ERR0(LOG_ERR,"something went wrong with set_env\n");
+ }
+
+ /*
+ * Start the program.
+ */
+ pm_status = ose_pm_start_program(state->progpid);
+ if (pm_status != PM_SUCCESS) {
+ ERROR1(LOG_ERR,"ose_pm_install_load_module failed - pmstatus: 0x%08x\n",
+ pm_status);
+ return 0;
+ }
+
+ return 1;
+}
+
+#define SET_AIO(REQ,FD,SIZE,BUFF) \
+ /* Make sure to clean data structure of previous request */ \
+ memset(&(REQ),0,sizeof(REQ)); \
+ (REQ).aio_fildes = FD; \
+ (REQ).aio_offset = FM_POSITION_CURRENT; \
+ (REQ).aio_nbytes = SIZE; \
+ (REQ).aio_buf = BUFF; \
+ (REQ).aio_sigevent.sigev_notify = SIGEV_NONE
+
+#define READ_AIO(REQ,FD,SIZE,BUFF) do { \
+ SET_AIO(REQ,FD,SIZE,BUFF); \
+ if (aio_read(&(REQ)) != 0) \
+ ERRNO_ERR1(LOG_ERR,"aio_read of child_read_req(%d) failed\n",FD); \
+ } while (0)
+
+#define WRITE_AIO(FD,SIZE,BUFF) do { \
+ struct aiocb *write_req = malloc(sizeof(struct aiocb)); \
+ char *write_buff = malloc(sizeof(char)*SIZE); \
+ memcpy(write_buff,BUFF,SIZE); \
+ SET_AIO(*write_req,FD,SIZE,write_buff); \
+ if (aio_write(write_req) != 0) \
+ ERRNO_ERR1(LOG_ERR,"aio_write of write_req(%d) failed\n",FD); \
+ } while(0)
+
+int pass_on(ProgramState *state);
+int pass_on(ProgramState *s) {
+ SIGSELECT sigsel[] = {0,FM_READ_PTR_REPLY};
+ union SIGNAL *sig;
+ char child_read_buff[BUFSIZ], pipe_read_buff[BUFSIZ];
+ struct aiocb child_read_req, pipe_read_req;
+ int rfd, wfd = 0;
+ FmHandle rfh, child_rfh;
+ int outstanding_writes = 0, got_some = 0, child_done = 0;
+
+ if ((rfd = sf_open(s->r_pipe, O_RDONLY, 0)) < 0) {
+ ERRNO_ERR1(LOG_ERR,"Could not open FIFO '%s' for reading.\n", s->r_pipe);
+ rfd = 0;
+ return 1;
+ }
+
+ attach(NULL,s->progpid);
+
+ /* Open the log file */
+ erts_run_erl_log_open();
+
+ efs_examine_fd(rfd,FLIB_FD_HANDLE,&rfh);
+ efs_examine_fd(s->ifd,FLIB_FD_HANDLE,&child_rfh);
+
+ READ_AIO(child_read_req,s->ifd,BUFSIZ,child_read_buff);
+ READ_AIO(pipe_read_req,rfd,BUFSIZ,pipe_read_buff);
+
+ while (1) {
+ time_t now,last_activity;
+
+ time(&last_activity);
+ sig = receive_w_tmo(erts_run_erl_log_alive_minutes()*60000,sigsel);
+
+ time(&now);
+
+ if (sig) {
+ erts_run_erl_log_activity(0,now,last_activity);
+ } else {
+ /* timeout */
+ erts_run_erl_log_activity(1,now,last_activity);
+ continue;
+ }
+
+ switch (sig->signo) {
+ case OS_ATTACH_SIG: {
+ if (rfd) { sf_close(rfd); rfd = 0; }
+ free_buf(&sig);
+ child_done = 1;
+ /* Make sure to to let all outstanding write request finish */
+ if (outstanding_writes)
+ break;
+ if (wfd) sf_close(wfd);
+ return 0;
+ }
+ case FM_WRITE_PTR_REPLY: {
+ if (sig->fm_write_ptr.status == EFS_SUCCESS) {
+ if (sig->fm_write_ptr.actual < sig->fm_write_ptr.requested) {
+ WRITE_AIO(wfd, sig->fm_write_ptr.requested-sig->fm_write_ptr.actual,
+ sig->fm_write_ptr.buffer+sig->fm_write_ptr.actual);
+ }
+ } else {
+ /* Assume to_erl has terminated. */
+ sf_close(wfd);
+ wfd = 0;
+ }
+ free((char*)sig->fm_write_ptr.buffer);
+ aio_dispatch(sig);
+ if ((--outstanding_writes == 0) && child_done) {
+ if (wfd) sf_close(wfd);
+ return 0;
+ }
+ break;
+ }
+ case FM_READ_PTR_REPLY: {
+ /* Child fd */
+ if (sig->fm_read_ptr.handle == child_rfh) {
+
+ /* Child terminated */
+ if (sig->fm_read_ptr.status != EFS_SUCCESS ||
+ sig->fm_read_ptr.actual == 0) {
+
+ if (rfd) { sf_close(rfd); rfd = 0; }
+
+ if (sig->fm_read_ptr.status != EFS_SUCCESS) {
+ ERROR0(LOG_ERR,"Erlang closed the connection.");
+ aio_dispatch(sig);
+ return 1;
+ }
+
+ /* child closed connection gracefully */
+ aio_dispatch(sig);
+ if (outstanding_writes) {
+ child_done = 1;
+ break;
+ }
+
+ if (wfd) sf_close(wfd);
+
+ return 0;
+ } else {
+ erts_run_erl_log_write(sig->fm_read_ptr.buffer,
+ sig->fm_read_ptr.actual);
+ if (wfd) {
+ WRITE_AIO(wfd, sig->fm_read_ptr.actual, sig->fm_read_ptr.buffer);
+ outstanding_writes++;
+ }
+ aio_dispatch(sig);
+ READ_AIO(child_read_req, s->ifd,BUFSIZ, child_read_buff);
+ }
+ /* pipe fd */
+ } else if (sig->fm_read_ptr.handle == rfh) {
+ if (sig->fm_read_ptr.status != EFS_SUCCESS) {
+ if(rfd) sf_close(rfd);
+ if(wfd) sf_close(wfd);
+ aio_dispatch(sig);
+ ERRNO_ERR0(LOG_ERR,"Error in reading from FIFO.");
+ return 1;
+ }
+ if (sig->fm_read_ptr.actual == 0) {
+ /* to_erl closed its end of the pipe */
+ aio_dispatch(sig);
+ sf_close(rfd);
+ rfd = sf_open(s->r_pipe,O_RDONLY|DONT_BLOCK_PLEASE, 0);
+ if (rfd < 0) {
+ ERRNO_ERR1(LOG_ERR,"Could not open FIFO '%s' for reading.",
+ s->r_pipe);
+ rfd = 0;
+ } else {
+ READ_AIO(pipe_read_req,rfd,BUFSIZ,pipe_read_buff);
+ }
+ got_some = 0; /* reset for next session */
+ } else {
+ int len = sig->fm_read_ptr.actual;
+ char *buffer = sig->fm_read_ptr.buffer;
+ if (!wfd) {
+ /* Try to open the write pipe to to_erl. Now that we got some data
+ * from to_erl, to_erl should already be reading this pipe - open
+ * should succeed. But in case of error, we just ignore it.
+ */
+ if ((wfd = sf_open(s->w_pipe, O_WRONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
+ erts_run_erl_log_status("Client expected on FIFO %s, "
+ "but can't open (len=%d)\n",
+ s->w_pipe, sig->fm_read_ptr.actual);
+ sf_close(rfd);
+ rfd = sf_open(s->r_pipe, O_RDONLY|DONT_BLOCK_PLEASE, 0);
+ if (rfd < 0) {
+ ERRNO_ERR1(LOG_ERR,"Could not open FIFO '%s' for reading.",
+ s->r_pipe);
+ return 1;
+ }
+ wfd = 0;
+ } else {
+#ifdef DEBUG
+ erts_run_erl_log_status("run_erl: %s opened for writing\n",
+ s->w_pipe);
+#endif
+ }
+ }
+
+ if (!got_some && wfd && buffer[0] == '\014') {
+ char wbuf[30];
+ int wlen = sn_printf(wbuf,sizeof(wbuf),"[run_erl v%u-%u]\n",
+ RUN_ERL_HI_VER, RUN_ERL_LO_VER);
+ /* For some reason this, the first write aio seems to
+ not get an FM_WRITE_PTR_REPLY, so we do not do:
+ outstanding_writes++;
+ */
+ WRITE_AIO(wfd, wlen, wbuf);
+ }
+ got_some = 1;
+
+ /* Write the message */
+#ifdef DEBUG
+ erts_run_erl_log_status("Pty master write; ");
+#endif
+ len = erts_run_erl_extract_ctrl_seq(buffer,len, s->ofd);
+
+ if (len > 0) {
+ int wlen = erts_run_erl_write_all(s->ofd, buffer, len);
+ if (wlen != len) {
+ aio_dispatch(sig);
+ ERRNO_ERR0(LOG_ERR,"Error in writing to terminal.");
+ if(rfd) sf_close(rfd);
+ if(wfd) sf_close(wfd);
+ return 1;
+ }
+ }
+#ifdef DEBUG
+ erts_run_erl_log_status("OK\n");
+#endif
+ aio_dispatch(sig);
+ READ_AIO(pipe_read_req,rfd,BUFSIZ,pipe_read_buff);
+ }
+ }
+ break;
+ }
+ default: {
+ free_buf(&sig);
+ break;
+ }
+ }
+ }
+}
+
+OS_PROCESS(run_erl_process) {
+ char *logdir, *command, *blockname;
+ SIGSELECT sigsel[] = {1,ERTS_SIGNAL_RUN_ERL_SETUP};
+ union SIGNAL *sig = receive(sigsel);
+ ProgramState state;
+ char pipename[FILENAME_BUFSIZ];
+
+ state.info = NULL;
+
+ logdir = strdup(sig->setup.logdir);
+ command = strdup(sig->setup.command);
+ strn_cpy(pipename,sizeof(pipename),sig->setup.pipename);
+
+ if (sig->setup.blockname)
+ blockname = strdup(sig->setup.blockname);
+ else
+ blockname = NULL;
+
+ erts_run_erl_log_init(sig->setup.run_daemon, logdir);
+
+ free_buf(&sig);
+
+ if (erts_run_erl_open_fifo(pipename,state.w_pipe,state.r_pipe))
+ kill_proc(current_process());
+
+ if (create_child_process(command,blockname,&state))
+ pass_on(&state);
+
+ free(logdir);
+ free(command);
+ if (blockname)
+ free(blockname);
+
+ if (state.info)
+ free_buf(((union SIGNAL**)&state.info));
+
+ sf_close(state.ifd);
+ sf_close(state.ofd);
+
+ unlink(state.w_pipe);
+ unlink(state.r_pipe);
+
+ kill_proc(current_process());
+}
+
+int run_erl(int argc,char **argv) {
+ char *pipename, *logdir, *command, *blockname = NULL;
+ int pipename_len, logdir_len, command_len, blockname_len = 0;
+ int i = 1, run_daemon = 0;
+ PROCESS pid;
+ SIGSELECT sigsel[] = {0};
+ union SIGNAL *sig;
+
+ if(argc < 4) {
+ fprintf(stderr,RUN_ERL_USAGE,"run_erl");
+ return 1;
+ }
+
+ while (1) {
+ if (argv[i][0] != '-')
+ break;
+ if (!strcmp(argv[i],"-daemon")) {
+ run_daemon = 1;
+ i++;
+ continue;
+ }
+ if (!strcmp(argv[i],"-block")) {
+ blockname = argv[i+1];
+ blockname_len = strlen(argv[i+1]) + 1;
+ i+=2;
+ continue;
+ }
+ fprintf(stderr,RUN_ERL_USAGE,"run_erl");
+ return 1;
+ }
+
+ pipename = argv[i++];
+ logdir = argv[i++];
+ command = argv[i++];
+
+ /* + 1 to include NULL at end */
+ logdir_len = strlen(logdir) + 1;
+ command_len = strlen(command) + 1;
+ pipename_len = strlen(pipename) + 1;
+
+ if (run_daemon) {
+ /* We request that the run_erl_process should be started from the
+ main process so that it does not die when the shell command
+ returns */
+ PROCESS main_pid;
+ hunt_in_block("run_erl","main",&main_pid);
+ sig = alloc(sizeof(sig),ERTS_SIGNAL_RUN_ERL_DAEMON);
+ send(&sig,main_pid);
+ sig = receive(sigsel);
+ pid = sender(&sig);
+ free_buf(&sig);
+ } else {
+ pid = create_process(OS_BG_PROC,"run_erl_process",
+ run_erl_process, 0x800,
+ 0, 0, 0, NULL, 0, 0);
+ }
+
+ sig = alloc(sizeof(RunErlSetup)+
+ logdir_len+command_len+pipename_len+blockname_len,
+ ERTS_SIGNAL_RUN_ERL_SETUP);
+ sig->setup.run_daemon = run_daemon;
+ sig->setup.logdir = ((char*)sig)+sizeof(RunErlSetup);
+ sig->setup.command = ((char*)sig)+sizeof(RunErlSetup)+logdir_len;
+ sig->setup.pipename = ((char*)sig)+sizeof(RunErlSetup)+logdir_len+command_len;
+ if (blockname)
+ sig->setup.blockname = ((char*)sig)+sizeof(RunErlSetup)+
+ logdir_len+command_len+pipename_len;
+ else
+ sig->setup.blockname = NULL;
+
+ strcpy(sig->setup.logdir,logdir);
+ strcpy(sig->setup.command,command);
+ strcpy(sig->setup.pipename,pipename);
+ if (blockname) strcpy(sig->setup.blockname,blockname);
+
+ send(&sig,pid);
+
+ if (run_daemon) {
+ /* We are a daemon, error msgs will be sent to ramlog */
+ start(pid);
+ return 1;
+ }
+
+ /* We are not daemon, error msgs will be sent to stderr and we block here */
+ efs_clone(pid);
+ start(pid);
+
+ attach(NULL,pid);
+ sig = receive(sigsel);
+
+ return 1;
+}
diff --git a/erts/etc/ose/run_erl.h b/erts/etc/ose/run_erl.h
new file mode 100644
index 0000000000..128f551670
--- /dev/null
+++ b/erts/etc/ose/run_erl.h
@@ -0,0 +1,29 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+#ifndef ERL_RUN_ERL_H
+#define ERL_RUN_ERL_H
+
+#include "ose.h"
+
+#include "erts.sig"
+
+int run_erl(int argc, char **argv);
+OS_PROCESS(run_erl_process);
+
+#endif
diff --git a/erts/etc/ose/run_erl_main.c b/erts/etc/ose/run_erl_main.c
new file mode 100644
index 0000000000..2d92924ff2
--- /dev/null
+++ b/erts/etc/ose/run_erl_main.c
@@ -0,0 +1,79 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+/*
+ * Module: run_erl_main.c
+ *
+ * Container for load module that installs both run_erl and to_erl command.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "ose.h"
+#include "shell.h"
+
+#include "run_erl_common.h"
+#include "run_erl.h"
+#include "to_erl_common.h"
+
+union SIGNAL {
+ SIGSELECT signo;
+};
+
+int main(int argc, char **argv)
+{
+
+ char run_erl_usage[320],
+ to_erl_usage[120];
+
+ (void)stdin;(void)stdout;(void)stderr;
+
+ sprintf(run_erl_usage,RUN_ERL_USAGE,"run_erl [-daemon] [-block blockname]");
+ sprintf(to_erl_usage,TO_ERL_USAGE,"pipename");
+
+ shell_add_cmd_attrs(
+ "run_erl",run_erl_usage,
+ "Redirect Erlang input and output streams",
+ run_erl,DEFAULT_PROC_TYPE,DEFAULT_PRIORITY,DEFAULT_STACK_SIZE);
+
+ shell_add_cmd_attrs(
+ "to_erl",to_erl_usage,
+ "Attach to redirected Erlang input and output streams",
+ to_erl,DEFAULT_PROC_TYPE,DEFAULT_PRIORITY,DEFAULT_STACK_SIZE);
+
+ while (1) {
+ static const SIGSELECT sigsel[] = {0};
+ union SIGNAL *sig = receive(sigsel);
+
+ if (sig->signo == ERTS_SIGNAL_RUN_ERL_DAEMON) {
+ PROCESS pid = create_process(OS_BG_PROC,"run_erl_daemon",
+ run_erl_process, 0x800,
+ 0, 0, 0, NULL, 0, 0);
+ send_w_s(&sig,pid,sender(&sig));
+ } else {
+ printf("Got unexpected signal!");
+ free_buf(&sig);
+ }
+ }
+
+ return 1;
+}
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index be8343e87e..78fefbea55 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -86,6 +86,7 @@ run_valgrind=no
# Default rootdir
ROOTDIR=%SRC_ROOTDIR%
BINDIR="$ROOTDIR/bin/`$ROOTDIR/erts/autoconf/config.guess`"
+TARGET=%TARGET%
#BINDIR="$ROOTDIR/bin/%TARGET%"
PROGNAME=$ROOTDIR/bin/cerl
EMU=beam
@@ -248,6 +249,12 @@ while [ $# -gt 0 ]; do
done
+if [ ! -f $BINDIR/erlexec -a -f $ROOTDIR/bin/$TARGET/erlexec ]; then
+ # We are in a strange target (I'm looking at you openbsd) where
+ # TARGET != config.guess
+ BINDIR=$ROOTDIR/bin/$TARGET
+fi
+
PATH=$BINDIR:$ROOTDIR/bin:$PATH
EXEC=$BINDIR/erlexec
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index 54ff7b3e3a..141d51824f 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2005-2012. All Rights Reserved.
+# Copyright Ericsson AB 2005-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -54,13 +54,23 @@ document etp-help
% etp-mfa, etp-cp,
% etp-msgq, etpf-msgq,
% etp-stacktrace, etp-stackdump, etpf-stackdump, etp-dictdump
-% etp-offheapdump, etpf-offheapdump,
-% etp-print-procs, etp-search-heaps, etp-search-alloc,
+% etp-process-info, etp-process-memory-info
+% etp-port-info, etp-port-state, etp-port-sched-flags
+% etp-heapdump, etp-offheapdump, etpf-offheapdump,
+% etp-search-heaps, etp-search-alloc,
% etp-ets-tables, etp-ets-tabledump
%
% Complex commands that use the Erlang support module.
% etp-overlapped-heaps, etp-chart, etp-chart-start, etp-chart-end
-%
+%
+% System inspection
+% etp-system-info, etp-schedulers, etp-process, etp-ports, etp-lc-dump,
+% etp-migration-info, etp-processes-memory,
+% etp-compile-info, etp-config-h-info
+%
+% Platform specific (when gdb fails you)
+% etp-ppc-stacktrace
+%
% Erlang support module handling commands:
% etp-run
%
@@ -652,7 +662,7 @@ end
define etp-ct-atom-1
# Args: int
#
-# Determines if integer is a atom first character
+# Determines if integer is an atom first character
#
# Non-reentrant
# Returns: $etp_ct_atom
@@ -1055,7 +1065,9 @@ define etp-cp-1
set $etp_cp_mid = $etp_cp_low + ($etp_cp_high-$etp_cp_low)/2
end
if $etp_cp_p
- set $etp_cp_low = (Eterm**)($etp_cp_p->start + 8)
+ # 12 = MI_FUNCTIONS
+ set $etp_cp_low = (Eterm**)($etp_cp_p->start + 12)
+ # 0 = MI_NUM_FUNCTIONS
set $etp_cp_high = $etp_cp_low +$etp_cp_p->start[0]
set $etp_cp_p = 0
while $etp_cp_low < $etp_cp_high
@@ -1118,6 +1130,39 @@ document etp-cp
%---------------------------------------------------------------------------
end
+define etp-check-beam-ranges
+ set $etp_ci = 0
+ while $etp_ci < 3
+ printf "Checking code index %i...\n", $etp_ci
+ set $etp_j = 0
+ while $etp_j < r[$etp_ci].n
+ set $etp_p = &r[$etp_ci].modules[$etp_j]
+ if $etp_j > 0 && $etp_p->start < (Range*)$etp_p[-1].end.counter
+ printf "r[%i].modules[%i]: ERROR start < previous\n", $etp_ci, $etp_j
+ end
+ if $etp_p->start > (Range*)$etp_p->end.counter
+ printf "r[%i].modules[%i]: ERROR start > end\n", $etp_ci, $etp_j
+ else
+ if $etp_p->start == (Range*)$etp_p->end.counter
+ printf "r[%i].modules[%i]: Purged\n", $etp_ci, $etp_j
+ end
+ end
+ set $etp_j = $etp_j + 1
+ end
+ set $etp_ci = $etp_ci + 1
+ end
+end
+
+document etp-check-beam-ranges
+%---------------------------------------------------------------------------
+% etp-check-beam-ranges
+%
+% Do consistency check of beam_ranges data structure
+% and print errors and empty slots from purged modules.
+%---------------------------------------------------------------------------
+end
+
+
############################################################################
# Commands for special term bunches.
#
@@ -1278,6 +1323,250 @@ document etpf-stackdump
%---------------------------------------------------------------------------
end
+define etp-heapdump
+# Args: Process*
+#
+# Non-reentrant
+ etp-heapdump-1 ($arg0)->heap ($arg0)->htop
+end
+
+document etp-heapdump
+%---------------------------------------------------------------------------
+% etp-heapdump Process*
+%
+% Take an Process* and print a heapdump for the process heap.
+%---------------------------------------------------------------------------
+end
+
+define etp-heapdump-old
+# Args: Process*
+#
+# Non-reentrant
+ etp-heapdump-1 ($arg0)->old_heap ($arg0)->old_htop
+end
+
+document etp-heapdump
+%---------------------------------------------------------------------------
+% etp-heapdump-old Process*
+%
+% Take an Process* and print a heapdump for the process old heap (gen-heap).
+%---------------------------------------------------------------------------
+end
+
+
+define etp-heapdump-1
+# Args: Eterm* heap, Eterm* htop
+#
+# Non-reentrant
+ set $etp_heapdump_heap = (Eterm*)($arg0)
+ set $etp_heapdump_p = (Eterm*)($arg0)
+ set $etp_heapdump_end = (Eterm*)($arg1)
+ set $etp_heapdump_skips = 0
+ printf "%% heapdump (%u):\n", $etp_heapdump_end-$etp_heapdump_p
+ while $etp_heapdump_p < $etp_heapdump_end
+ set $etp_heapdump_ix = 0
+ printf " %p: ", $etp_heapdump_p
+ while $etp_heapdump_p < $etp_heapdump_end && $etp_heapdump_ix < 8
+ if ($etp_heapdump_skips > 0)
+ printf "| 0x%08x ", ($etp_heapdump_p)
+ set $etp_heapdump_skips--
+ else
+ etp-term-dump $etp_heapdump_p[0]
+ end
+ set $etp_heapdump_p++
+ set $etp_heapdump_ix++
+ end
+ printf "\n"
+ end
+end
+
+
+define etp-term-dump
+# Args: Eterm
+ if (($arg0) & 0x3) == 0
+ etp-term-dump-header ($arg0)
+ else
+ if (($arg0) & 0x3) == 1
+ # Cons pointer
+ set $etp_term_dump_cons_p = ((Eterm*)(($arg0) & ~0x3))
+ if $etp_term_dump_cons_p > $etp_heapdump_heap && $etp_term_dump_cons_p < $etp_heapdump_end
+ printf "| C:0x%08x ", $etp_term_dump_cons_p
+ #printf "| C: --> %5d ", $etp_heapdump_p - $etp_term_dump_cons_p - 1
+ else
+ printf "| C:0x%08x ", $etp_term_dump_cons_p
+ end
+ else
+ if (($arg0) & 0x3) == 2
+ # Box pointer
+ printf "| B:0x%08x ", ($arg0)
+ else
+ if (($arg0) & 0x3) == 3
+ # immediate
+ etp-term-dump-immediate ($arg0)
+ else
+ printf "| U:0x%08x ", ($arg0)
+ end
+ end
+ end
+ end
+end
+
+define etp-term-dump-immediate
+# Args: immediate term
+ if (($arg0) & 0xF) == 0xf
+ # Fixnum
+ etp-ct-printable-1 ((long)((Sint)($arg0)>>4))
+ if $etp_ct_printable
+ if $etp_ct_printable < 0
+ printf "| I: %c (%3ld) ", (long)((Sint)($arg0)>>4), (long)((Sint)($arg0)>>4)
+ else
+ printf "| I: \\%c (%3ld) ", (long)((Sint)($arg0)>>4), (long)((Sint)($arg0)>>4)
+ end
+ else
+ printf "| I:%10ld ", (long)((Sint)($arg0)>>4)
+ end
+ else
+ if (($arg0) & 0xF) == 0x3
+ etp-term-dump-pid ($arg0)
+ else
+ if (($arg0) & 0xF) == 0x7
+ printf "| port:0x%05x ", ($arg0)
+ else
+ # Immediate2 - 0xB
+ if (($arg0) & 0x3f) == 0x0b
+ etp-term-dump-atom ($arg0)
+ else
+ if (($arg0) & 0x3f) == 0x1b
+ printf "| #Catch<%06d> ", ($arg0)>>6
+ else
+ if (($arg0) == $etp_nil)
+ printf "| [] (NIL) "
+ else
+ printf "| I:0x%08x ", ($arg0)
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+define etp-term-dump-atom
+# Args: atom term
+ set $etp_atom_1_ap = (Atom*)erts_atom_table.seg_table[(Eterm)($arg0)>>16][((Eterm)($arg0)>>6)&0x3FF]
+ set $etp_atom_1_i = ($etp_atom_1_ap)->len
+ set $etp_atom_1_p = ($etp_atom_1_ap)->name
+ set $etp_atom_1_quote = 1
+ set $etp_atom_indent = 13
+
+ if ($etp_atom_1_i < 11)
+ if ($etp_atom_1_i > 0)
+ etp-ct-atom-1 (*$etp_atom_1_p)
+ if $etp_ct_atom
+ set $etp_atom_indent = 13
+ else
+ set $etp_atom_indent = 11
+ end
+ end
+ # perform indentation
+ printf "|"
+ while ($etp_atom_1_i < $etp_atom_indent)
+ printf " "
+ set $etp_atom_1_i++
+ end
+ set $etp_atom_1_i = ($etp_atom_1_ap)->len
+ # Check if atom has to be quoted
+ if ($etp_atom_1_i > 0)
+ etp-ct-atom-1 (*$etp_atom_1_p)
+ if $etp_ct_atom
+ # Atom start character
+ set $etp_atom_1_p++
+ set $etp_atom_1_i--
+ set $etp_atom_1_quote = 0
+ else
+ set $etp_atom_1_i = 0
+ end
+ end
+ while $etp_atom_1_i > 0
+ etp-ct-name-1 (*$etp_atom_1_p)
+ if $etp_ct_name
+ # Name character
+ set $etp_atom_1_p++
+ set $etp_atom_1_i--
+ else
+ set $etp_atom_1_quote = 1
+ set $etp_atom_1_i = 0
+ end
+ end
+ # Print the atom
+ if $etp_atom_1_quote
+ printf "'"
+ end
+ set $etp_atom_1_i = ($etp_atom_1_ap)->len
+ set $etp_atom_1_p = ($etp_atom_1_ap)->name
+ while $etp_atom_1_i > 0
+ etp-char-1 (*$etp_atom_1_p) '\''
+ set $etp_atom_1_p++
+ set $etp_atom_1_i--
+ end
+ if $etp_atom_1_quote
+ printf "'"
+ end
+ printf " "
+ else
+ printf "| A:0x%08x ", ($arg0)
+ end
+end
+
+define etp-term-dump-pid
+# Args: Eterm pid
+#
+# Non-reentrant
+#
+ set $etp_pid_1 = (Eterm)($arg0)
+ if ($etp_pid_1 & 0xF) == 0x3
+ if (etp_arch_bits == 64 && etp_halfword == 0)
+ if (etp_big_endian)
+ set $etp_pid_data = (unsigned) ((((Uint64) $etp_pid_1) >> 36) & 0x0fffffff)
+ else
+ set $etp_pid_data = (unsigned) ((((Uint64) $etp_pid_1) >> 4) & 0x0fffffff)
+ end
+ else
+ set $etp_pid_data = (unsigned) (((((Uint32) $etp_pid_1) >> 4) & ~erts_proc.r.o.pix_mask) | ((((Uint32) $etp_pid_1) >> (erts_proc.r.o.pix_cl_shift + 4)) & erts_proc.r.o.pix_cl_mask) | (((((Uint32) $etp_pid_1) >> 4) & erts_proc.r.o.pix_cli_mask) << erts_proc.r.o.pix_cli_shift))
+ end
+ # Internal pid
+ printf "| <0.%04u.%03u> ", $etp_pid_data & 0x7fff, ($etp_pid_data >> 15) & 0x1fff
+ else
+ printf "| #NotPid<%#x> ", ($arg0)
+ end
+end
+
+define etp-term-dump-header
+# Args: Header term
+ if (($arg0) & 0x3f) == 0
+ printf "| H:%4d-tuple ", ($arg0) >> 6
+ else
+ set $etp_heapdump_skips = ($arg0) >> 6
+ if ((($arg0) & 0x3f) == 0x18)
+ printf "| H: float %3d ", ($arg0) >> 6
+ else
+ if ((($arg0) & 0x3f) == 0x28)
+ # sub-binary
+ printf "| H: sub-bin "
+ else
+ if ((($arg0) & 0x3f) == 0x8)
+ # pos-bignum
+ printf "| H:bignum %3u ", ($arg0) >> 6
+ else
+ printf "| header %5d ", ($arg0) >> 6
+ end
+ end
+ end
+ end
+end
+
+
+
define etp-pid2pix-1
# Args: Eterm
#
@@ -1316,49 +1605,102 @@ end
define etp-proc-state-int
# Args: int
#
- if ($arg0 & 0xfffff000)
+ if ($arg0 & 0xff000000)
printf "GARBAGE | "
end
- if ($arg0 & 0x800)
+ if ($arg0 & 0x800000)
+ printf "delayed-sys | "
+ end
+ if ($arg0 & 0x400000)
+ printf "proxy | "
+ set $proxy_process = 1
+ else
+ set $proxy_process = 0
+ end
+ if ($arg0 & 0x200000)
+ printf "running-sys | "
+ end
+ if ($arg0 & 0x100000)
+ printf "active-sys | "
+ end
+ if ($arg0 & 0x80000)
printf "trapping-exit | "
end
- if ($arg0 & 0x400)
+ if ($arg0 & 0x40000)
printf "bound | "
end
- if ($arg0 & 0x200)
+ if ($arg0 & 0x20000)
printf "garbage-collecting | "
end
- if ($arg0 & 0x100)
+ if ($arg0 & 0x10000)
printf "suspended | "
end
- if ($arg0 & 0x80)
+ if ($arg0 & 0x8000)
printf "running | "
end
- if ($arg0 & 0x40)
+ if ($arg0 & 0x4000)
printf "in-run-queue | "
end
- if ($arg0 & 0x20)
+ if ($arg0 & 0x2000)
printf "active | "
end
- if ($arg0 & 0x10)
+ if ($arg0 & 0x1000)
printf "pending-exit | "
end
- if ($arg0 & 0x8)
+ if ($arg0 & 0x800)
printf "exiting | "
end
- if ($arg0 & 0x4)
+ if ($arg0 & 0x400)
printf "free | "
end
- if ($arg0 & 0x3) == 0
- printf "prio-max\n"
+ if ($arg0 & 0x200)
+ printf "in-prq-low | "
+ end
+ if ($arg0 & 0x100)
+ printf "in-prq-normal | "
+ end
+ if ($arg0 & 0x80)
+ printf "in-prq-high | "
+ end
+ if ($arg0 & 0x40)
+ printf "in-prq-max | "
+ end
+ if ($arg0 & 0x30) == 0x0
+ printf "prq-prio-max | "
else
- if ($arg0 & 0x3) == 1
- printf "prio-high\n"
+ if ($arg0 & 0x30) == 0x10
+ printf "prq-prio-high | "
else
- if ($arg0 & 0x3) == 2
- printf "prio-normal\n"
+ if ($arg0 & 0x30) == 0x20
+ printf "prq-prio-normal | "
else
- printf "prio-low\n"
+ printf "prq-prio-low | "
+ end
+ end
+ end
+ if ($arg0 & 0xc) == 0x0
+ printf "usr-prio-max | "
+ else
+ if ($arg0 & 0xc) == 0x4
+ printf "usr-prio-high | "
+ else
+ if ($arg0 & 0xc) == 0x8
+ printf "usr-prio-normal | "
+ else
+ printf "usr-prio-low | "
+ end
+ end
+ end
+ if ($arg0 & 0x3) == 0x0
+ printf "act-prio-max\n"
+ else
+ if ($arg0 & 0x3) == 0x1
+ printf "act-prio-high\n"
+ else
+ if ($arg0 & 0x3) == 0x2
+ printf "act-prio-normal\n"
+ else
+ printf "act-prio-low\n"
end
end
end
@@ -1392,9 +1734,15 @@ define etp-process-info
# Args: Process*
#
printf " Pid: "
- etp-1 $arg0->common.id
+ etp-1 ($arg0)->common.id
printf "\n State: "
etp-proc-state $arg0
+ if $proxy_process != 0
+ printf " Pointer: (Process *) %p\n", $arg0
+ printf " *** PROXY process struct *** refer to: \n"
+ etp-pid2proc-1 $arg0->common.id
+ etp-process-info $proc
+ else
if (*(((Uint32 *) &(((Process *) $arg0)->state))) & 0x4) == 0
if ($arg0->common.u.alive.reg)
printf " Registered name: "
@@ -1432,6 +1780,7 @@ define etp-process-info
printf " Parent: "
etp-1 $arg0->parent
printf "\n Pointer: (Process *) %p\n", $arg0
+ end
end
document etp-process-info
@@ -1463,11 +1812,104 @@ end
document etp-processes
%---------------------------------------------------------------------------
% etp-processes
-%
+%
% Print misc info about all processes
%---------------------------------------------------------------------------
end
+define etp-processes-memory
+ if (!erts_initialized)
+ printf "No processes, since system isn't initialized!\n"
+ else
+ set $proc_ix = 0
+ printf "--- (%ld processes in wheel)\n", erts_proc.r.o.max
+ while $proc_ix < erts_proc.r.o.max
+ set $proc = (Process *) *((UWord *) &erts_proc.r.o.tab[$proc_ix])
+ if ($proc != ((Process *) 0) && $proc != &erts_invalid_process)
+ etp-process-memory-info $proc
+ end
+ set $proc_ix++
+ end
+ printf "---\n",
+ end
+end
+
+document etp-processes-memory
+%---------------------------------------------------------------------------
+% etp-processes-memory
+%
+% Print memory info about all processes
+%---------------------------------------------------------------------------
+end
+
+define etp-process-memory-info
+# Args: Process*
+#
+ if ((*(((Uint32 *) &(((Process *) $arg0)->state)))) & 0x400000)
+ set $proxy_process = 1
+ else
+ set $proxy_process = 0
+ end
+ printf " "
+ etp-1 $arg0->common.id
+ printf ": (Process *) %p ", $arg0
+ if $proxy_process != 0
+ printf "(Process *) %p ", $arg0
+ printf " *** PROXY process struct *** refer to next: \n"
+ etp-pid2proc-1 $arg0->common.id
+ printf " -"
+ etp-process-memory-info $proc
+ else
+ printf " [Heap: %5ld", $arg0->heap_sz
+ if ($arg0->old_heap)
+ printf " | %5ld", $arg0->old_hend - $arg0->old_heap
+ else
+ printf " | none "
+ end
+ printf "] [Mbuf: %5ld", $arg0->mbuf_sz
+ if (etp_smp_compiled)
+ printf " | %3ld (%3ld | %3ld)", ($arg0->msg.len + $arg0->msg_inq.len), $arg0->msg.len, $arg0->msg_inq.len
+ else
+ printf " | %3ld", $arg0->msg.len
+ end
+ printf "] "
+ if ($arg0->i)
+ printf " I: "
+ etp-cp-1 $arg0->i
+ printf " "
+ end
+
+ if ($arg0->current)
+ etp-1 $arg0->current[0]
+ printf ":"
+ etp-1 $arg0->current[1]
+ printf "/%d ", $arg0->current[2]
+ end
+
+ if (*(((Uint32 *) &(((Process *) $arg0)->state))) & 0x4) == 0
+ if ($arg0->common.u.alive.reg)
+ etp-1 $arg0->common.u.alive.reg->name
+ printf " "
+ end
+ end
+
+ if ($arg0->cp)
+ printf " CP: "
+ etp-cp-1 $arg0->cp
+ printf " "
+ end
+ printf "\n"
+ end
+end
+
+document etp-process-memory-info
+%---------------------------------------------------------------------------
+% etp-process-memory-info Process*
+%
+% Print memory info about process
+%---------------------------------------------------------------------------
+end
+
define etp-port-id2pix-1
# Args: Eterm
#
@@ -1992,7 +2434,7 @@ define etp-system-info
printf "ERTS version: %s\n", etp_erts_version
printf "Compile date: %s\n", etp_compile_date
printf "Arch: %s\n", etp_arch
- printf "Endianess: "
+ printf "Endianness: "
if (etp_big_endian)
printf "Big\n"
else
@@ -2433,6 +2875,152 @@ document etp-search-alloc
end
+define etp-alloc-stats
+ printf "\nIx Name Inst. Blocks Bytes Carriers Crr.bytes Util\n"
+ set $etp_tot_block_no = 0
+ set $etp_tot_block_sz = 0
+ set $etp_tot_crr_no = 0
+ set $etp_tot_crr_sz = 0
+ set $etp_ERTS_ALC_A_MIN = 1
+ set $etp_ERTS_ALC_A_MAX = (sizeof(erts_allctrs) / sizeof(*erts_allctrs)) - 1
+
+ set $etp_ix = $etp_ERTS_ALC_A_MIN
+ while $etp_ix <= $etp_ERTS_ALC_A_MAX
+ set $etp_allctr = 0
+ set $etp_alloc = erts_allctrs[$etp_ix].alloc
+ if $etp_alloc != erts_sys_alloc
+ if $etp_alloc == erts_alcu_alloc_thr_spec || \
+ $etp_alloc == erts_alcu_alloc_thr_pref
+ set $etp_instance = 0
+ set $etp_block_no = 0
+ set $etp_block_sz = 0
+ set $etp_crr_no = 0
+ set $etp_crr_sz = 0
+ set $etp_tspec = (ErtsAllocatorThrSpec_t *) erts_allctrs[$etp_ix].extra
+ if $etp_tspec->enabled
+ while $etp_instance < $etp_tspec->size
+ set $etp_allctr = $etp_tspec->allctr[$etp_instance]
+ set $etp_block_no = $etp_block_no + $etp_allctr->mbcs.blocks.curr.no \
+ + $etp_allctr->sbcs.blocks.curr.no
+ set $etp_block_sz = $etp_block_sz + $etp_allctr->mbcs.blocks.curr.size \
+ + $etp_allctr->sbcs.blocks.curr.size
+ set $etp_crr_no = $etp_crr_no + $etp_allctr->mbcs.curr.norm.mseg.no \
+ + $etp_allctr->sbcs.curr.norm.mseg.no \
+ + $etp_allctr->mbcs.curr.norm.sys_alloc.no \
+ + $etp_allctr->sbcs.curr.norm.sys_alloc.no
+ set $etp_crr_sz = $etp_crr_sz + $etp_allctr->mbcs.curr.norm.mseg.size \
+ + $etp_allctr->sbcs.curr.norm.mseg.size \
+ + $etp_allctr->mbcs.curr.norm.sys_alloc.size \
+ + $etp_allctr->sbcs.curr.norm.sys_alloc.size
+ set $etp_instance = $etp_instance + 1
+ end
+ else
+ printf "erts_allctr[%d]: Disabled (thread specific)\n", $etp_ix
+ end
+ else
+ if $etp_alloc == erts_alcu_alloc_ts || $etp_alloc == erts_alcu_alloc
+ set $etp_allctr = (Allctr_t*) erts_allctrs[$etp_ix].extra
+ set $etp_block_no = $etp_allctr->mbcs.blocks.curr.no \
+ + $etp_allctr->sbcs.blocks.curr.no
+ set $etp_block_sz = $etp_allctr->mbcs.blocks.curr.size \
+ + $etp_allctr->sbcs.blocks.curr.size
+ set $etp_crr_no = $etp_allctr->mbcs.curr.norm.mseg.no \
+ + $etp_allctr->sbcs.curr.norm.mseg.no \
+ + $etp_allctr->mbcs.curr.norm.sys_alloc.no \
+ + $etp_allctr->sbcs.curr.norm.sys_alloc.no
+ set $etp_crr_sz = $etp_allctr->mbcs.curr.norm.mseg.size \
+ + $etp_allctr->sbcs.curr.norm.mseg.size \
+ + $etp_allctr->mbcs.curr.norm.sys_alloc.size \
+ + $etp_allctr->sbcs.curr.norm.sys_alloc.size
+ set $etp_instance = 1
+ else
+ printf "erts_allctr[%d]: Unknown allocation function: ", $etp_ix
+ p $etp_alloc
+ end
+ end
+ end
+ if $etp_allctr != 0
+ printf "%2d %-8s%2d%12lu%13lu%12lu%13lu", $etp_ix, $etp_allctr->name_prefix, \
+ $etp_instance, \
+ $etp_block_no, $etp_block_sz, $etp_crr_no, $etp_crr_sz
+ if $etp_crr_sz != 0
+ printf "%5lu%%", ($etp_block_sz * 100) / $etp_crr_sz
+ end
+ printf "\n"
+ set $etp_tot_block_no = $etp_tot_block_no + $etp_block_no
+ set $etp_tot_block_sz = $etp_tot_block_sz + $etp_block_sz
+ set $etp_tot_crr_no = $etp_tot_crr_no + $etp_crr_no
+ set $etp_tot_crr_sz = $etp_tot_crr_sz + $etp_crr_sz
+ end
+ set $etp_ix = $etp_ix + 1
+ end
+ printf "\nTotal: %12lu%13lu%12lu%13lu", $etp_tot_block_no, $etp_tot_block_sz, \
+ $etp_tot_crr_no, $etp_tot_crr_sz
+ if $etp_tot_crr_sz != 0
+ printf "%5lu%%", ($etp_tot_block_sz * 100) / $etp_tot_crr_sz
+ end
+ printf "\n"
+end
+
+document etp-alloc-stats
+%---------------------------------------------------------------------------
+% etp-alloc-stats
+%
+% Combine and print allocator statistics
+%---------------------------------------------------------------------------
+end
+
+
+define etp-alloc-instances
+ set $etp_ERTS_ALC_A_MIN = 1
+ set $etp_ERTS_ALC_A_MAX = (sizeof(erts_allctrs) / sizeof(*erts_allctrs)) - 1
+
+ set $etp_ix = $arg0
+ if $etp_ix >= $etp_ERTS_ALC_A_MIN && $etp_ix <= $etp_ERTS_ALC_A_MAX
+ set $etp_allctr = 0
+ set $etp_alloc = erts_allctrs[$etp_ix].alloc
+ if $etp_alloc == erts_sys_alloc
+ printf "Allocator %d is sys_alloc\n", $etp_ix
+ else
+ if $etp_alloc == erts_alcu_alloc_thr_spec || \
+ $etp_alloc == erts_alcu_alloc_thr_pref
+ set $etp_instance = 0
+ set $etp_tspec = (ErtsAllocatorThrSpec_t *) erts_allctrs[$etp_ix].extra
+ if $etp_tspec->enabled
+ printf "All instances for allocator '%s'\n", $etp_tspec->allctr[0]->name_prefix
+ while $etp_instance < $etp_tspec->size
+ p $etp_tspec->allctr[$etp_instance]
+ set $etp_instance = $etp_instance + 1
+ end
+ else
+ printf "erts_allctr[%d]: Disabled (thread specific)\n", $etp_ix
+ end
+ else
+ if $etp_alloc == erts_alcu_alloc_ts || $etp_alloc == erts_alcu_alloc
+ set $etp_allctr = (Allctr_t*) erts_allctrs[$etp_ix].extra
+ printf "Single instances for allocator '%s'\n", $etp_allctr->name_prefix
+ p $etp_allctr
+ else
+ printf "erts_allctr[%d]: Unknown allocation function: ", $etp_ix
+ p $etp_alloc
+ end
+ end
+ end
+ else
+ printf "Allocator type not between %d and %d\n", $etp_ERTS_ALC_A_MIN, $etp_ERTS_ALC_A_MAX
+ end
+end
+
+document etp-alloc-instances
+%---------------------------------------------------------------------------
+% etp-alloc-instances
+%
+% Print pointers to all allocator instances for a specific type (Ix)
+%---------------------------------------------------------------------------
+end
+
+
+
define etp-overlapped-heaps
# Args:
@@ -2736,6 +3324,95 @@ document etp-ets-tabledump
%---------------------------------------------------------------------------
end
+define etp-lc-dump
+# Non-reentrant
+ set $etp_lc_dump_thread = erts_locked_locks
+ while $etp_lc_dump_thread
+ printf "Thread %s\n", $etp_lc_dump_thread->thread_name
+ set $etp_lc_dump_thread_locked = $etp_lc_dump_thread->locked.first
+ while $etp_lc_dump_thread_locked
+ if 0 <= $etp_lc_dump_thread_locked->id && $etp_lc_dump_thread_locked->id < sizeof(erts_lock_order)/sizeof(erts_lc_lock_order_t)
+ printf " %s:", erts_lock_order[$etp_lc_dump_thread_locked->id].name
+ else
+ printf " unkown:"
+ end
+ if ($etp_lc_dump_thread_locked->extra & 0x3) == 0x3
+ etp-1 $etp_lc_dump_thread_locked->extra
+ else
+ printf "%p", $etp_lc_dump_thread_locked->extra
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x1f)) == (1 << 0)
+ printf "[spinlock]"
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x1f)) == (1 << 1)
+ printf "[rw(spin)lock]"
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x1f)) == (1 << 2)
+ printf "[mutex]"
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x1f)) == (1 << 3)
+ printf "[rwmutex]"
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x1f)) == (1 << 4)
+ printf "[proclock]"
+ end
+ printf "(%s:%d)", $etp_lc_dump_thread_locked->file, $etp_lc_dump_thread_locked->line
+ if ($etp_lc_dump_thread_locked->flags & (0x60)) == (1 << 5)
+ printf "(r)"
+ end
+ if ($etp_lc_dump_thread_locked->flags & (0x60)) == ((1 << 5) | (1 << 6))
+ printf "(rw)"
+ end
+ printf "\n"
+ set $etp_lc_dump_thread_locked = $etp_lc_dump_thread_locked->next
+ end
+ set $etp_lc_dump_thread = $etp_lc_dump_thread->next
+ end
+end
+
+document etp-lc-dump
+%---------------------------------------------------------------------------
+% etp-lc-dump
+%
+% Dump all info about locks in the lock checker
+%---------------------------------------------------------------------------
+end
+
+define etp-ppc-stacktrace
+# Args: R1
+# Non-reentrant
+ set $etp_ppc_st_fp = ($arg0)
+ while $etp_ppc_st_fp
+ info symbol ((void**)$etp_ppc_st_fp)[1]
+ set $etp_ppc_st_fp = ((void**)$etp_ppc_st_fp)[0]
+ end
+end
+
+document etp-ppc-stacktrace
+%---------------------------------------------------------------------------
+% etp-ppc-stacktrace R1
+%
+% Dump stacktrace from given $r1 frame pointer
+%---------------------------------------------------------------------------
+end
+
+############################################################################
+# OSE support
+#
+define etp-ose-attach
+ target ose $arg0:21768
+ attach block start_beam start_beam
+end
+
+document etp-ose-attach
+%---------------------------------------------------------------------------
+% etp-ose-attach Host
+%
+% Connect and attach to erlang vm at Host.
+%---------------------------------------------------------------------------
+end
+
+
############################################################################
# Erlang support module handling
#
@@ -2762,6 +3439,187 @@ define etp-thr
end
############################################################################
+# erl_alloc_util (blocks and carriers)
+#
+
+define etp-block-size-1
+#
+# In: (Block_t*) in $arg0
+# Out: Byte size in $etp_blk_sz
+#
+ if ($arg0)->bhdr & 1
+ # Free block
+ set $etp_blk_sz = ($arg0)->bhdr & ~7
+ else
+ # Allocated block
+ if !$etp_MBC_ABLK_SZ_MASK
+ if etp_arch_bits == 64
+ set $etp_MBC_ABLK_OFFSET_SHIFT = (64 - 24)
+ else
+ set $etp_MBC_ABLK_OFFSET_SHIFT = (32 - 9)
+ end
+ set $etp_MBC_ABLK_SZ_MASK = ((UWord)1 << $etp_MBC_ABLK_OFFSET_SHIFT) - 1 - 7
+ end
+ set $etp_blk_sz = ($arg0)->bhdr & $etp_MBC_ABLK_SZ_MASK
+ end
+end
+
+define etp-block2mbc-1
+#
+# In: (Block_t*) in $arg0
+# Out: (Carrier_t*) in $etp-mbc
+#
+ if (($arg0)->bhdr) & 1
+ # Free block
+ set $etp_mbc = ($arg0)->u.carrier
+ else
+ # Allocated block
+ if !$etp_MBC_ABLK_OFFSET_SHIFT
+ if etp_arch_bits == 64
+ set $etp_MBC_ABLK_OFFSET_SHIFT = (64 - 24)
+ else
+ set $etp_MBC_ABLK_OFFSET_SHIFT = (32 - 9)
+ end
+ end
+ set $etp_mbc = (Carrier_t*) ((((UWord)($arg0) >> 18) - (($arg0)->bhdr >> $etp_MBC_ABLK_OFFSET_SHIFT)) << 18)
+ end
+end
+
+define etp-block2mbc
+ etp-block2mbc-1 ((Block_t*)$arg0)
+ print $etp_mbc
+end
+
+document etp-block2mbc
+%---------------------------------------------------------------------------
+% Print pointer to multiblock carrier containing the argument (Block_t*)
+%---------------------------------------------------------------------------
+end
+
+define etp-block
+ etp-block-size-1 ((Block_t*)$arg0)
+ if ((Block_t*)$arg0)->bhdr & 1
+ printf "%#lx: FREE sz=%#x\n", ($arg0), $etp_blk_sz
+ else
+ printf "%#lx: ALLOCATED sz=%#x\n", ($arg0), $etp_blk_sz
+ end
+end
+
+document etp-block
+%---------------------------------------------------------------------------
+% Print memory block (Block_t*)
+%---------------------------------------------------------------------------
+end
+
+define etp-carrier-blocks
+ set $etp_crr = (Carrier_t*) $arg0
+ set $etp_alc = (Allctr_t*)($etp_crr->allctr.counter & ~7)
+ set $etp_blk = (Block_t*) ((char*)$etp_crr + $etp_alc->mbc_header_size)
+ set $etp_prev_blk = 0
+ set $etp_error_cnt = 0
+ set $etp_ablk_cnt = 0
+ set $etp_fblk_cnt = 0
+
+ if $argc == 2
+ set $etp_be_silent = $arg1
+ else
+ set $etp_be_silent = 0
+ end
+
+ while 1
+ if !$etp_be_silent
+ etp-block $etp_blk
+ else
+ etp-block-size-1 $etp_blk
+ end
+ etp-block2mbc-1 $etp_blk
+ if $etp_mbc != $etp_crr
+ printf "ERROR: Invalid carrier pointer %#lx in block at %#lx\n", $etp_mbc, $etp_blk
+ set $etp_error_cnt = $etp_error_cnt + 1
+ end
+ if $etp_prev_blk
+ if ($etp_prev_blk->bhdr & 1)
+ # Prev is FREE
+ if ($etp_blk->bhdr & 1)
+ printf "ERROR: Adjacent FREE blocks at %#lx and %#lx\n", $etp_prev_blk, $etp_blk
+ set $etp_error_cnt = $etp_error_cnt + 1
+ end
+ if !($etp_blk->bhdr & 2)
+ printf "ERROR: Missing PREV_FREE_BLK_HDR_FLG (2) in block at %#lx\n", $etp_blk
+ set $etp_error_cnt = $etp_error_cnt + 1
+ end
+ end
+ end
+ if $etp_blk->bhdr & 1
+ set $etp_fblk_cnt = $etp_fblk_cnt + 1
+ else
+ set $etp_ablk_cnt = $etp_ablk_cnt + 1
+ end
+ if $etp_blk->bhdr & 4
+ # Last block
+ loop_break
+ end
+ # All free blocks except the last have a footer
+ if ($etp_blk->bhdr & 1) && ((UWord*)((char*)$etp_blk + $etp_blk_sz))[-1] != $etp_blk_sz
+ printf "ERROR: Invalid footer of free block at %#lx\n", $etp_blk
+ end
+ set $etp_prev_blk = $etp_blk
+ set $etp_blk = (Block_t*) ((char*)$etp_blk + $etp_blk_sz)
+ end
+
+ if ((char*)$etp_blk + $etp_blk_sz) != ((char*)$etp_crr + ($etp_crr->chdr & ~7))
+ printf "ERROR: Last block not at end of carrier\n"
+ set $etp_error_cnt = $etp_error_cnt + 1
+ end
+ printf "Allocated blocks: %u\n", $etp_ablk_cnt
+ printf "Free blocks: %u\n", $etp_fblk_cnt
+ if $etp_error_cnt
+ printf "%u ERRORs reported above\n", $etp-error-cnt
+ end
+end
+
+document etp-carrier-blocks
+%---------------------------------------------------------------------------
+% Check and (maybe) print all memory blocks in carrier
+% Args: (Carrier_t*) [1=be_silent]
+%---------------------------------------------------------------------------
+end
+
+define etp-address-to-beam-opcode
+ set $etp_i = 0
+ set $etp_min_diff = ((UWord)1 << (sizeof(UWord)*8 - 1))
+ set $etp_min_opcode = -1
+ set $etp_addr = (UWord) ($arg0)
+
+ while $etp_i < num_instructions && $etp_min_diff > 0
+ if ($etp_addr - (UWord)beam_ops[$etp_i]) < $etp_min_diff
+ set $etp_min_diff = $etp_addr - (UWord)beam_ops[$etp_i]
+ set $etp_min_opcode = $etp_i
+ end
+ set $etp_i = $etp_i + 1
+ end
+ if $etp_min_diff == 0
+ printf "Address %p is start of '%s'\n", $etp_addr, opc[$etp_min_opcode].name
+ else
+ if $etp_min_opcode >= 0
+ printf "Address is %ld bytes into opcode '%s' at %p\n", $etp_min_diff, opc[$etp_min_opcode].name, beam_ops[$etp_min_opcode]
+ else
+ printf "Invalid opcode address\n"
+ end
+ end
+end
+
+document etp-address-to-beam-opcode
+%---------------------------------------------------------------------------
+% Get beam opcode from a native instruction address (within process_main())
+% Arg: Instructon pointer value
+%
+% Does not work with NO_JUMP_TABLE
+%---------------------------------------------------------------------------
+end
+
+
+############################################################################
# Toolbox parameter handling
#
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index 2018bc007c..049e83f9e4 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -40,9 +40,13 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+
#ifdef HAVE_WORKING_POSIX_OPENPT
+#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
+#endif
+
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
@@ -79,81 +83,25 @@
# include <stropts.h>
#endif
-#include "run_erl.h"
+#include "run_erl_common.h"
#include "safe_string.h" /* sn_printf, strn_cpy, strn_cat, etc */
-#ifdef O_NONBLOCK
-# define DONT_BLOCK_PLEASE O_NONBLOCK
-#else
-# define DONT_BLOCK_PLEASE O_NDELAY
-# ifndef EAGAIN
-# define EAGAIN -3898734
-# endif
-#endif
-
-#define noDEBUG
-
-#define DEFAULT_LOG_GENERATIONS 5
-#define LOG_MAX_GENERATIONS 1000 /* No more than 1000 log files */
-#define LOG_MIN_GENERATIONS 2 /* At least two to switch between */
-#define DEFAULT_LOG_MAXSIZE 100000
-#define LOG_MIN_MAXSIZE 1000 /* Smallast value for changing log file */
-#define LOG_STUBNAME "erlang.log."
-#define LOG_PERM 0664
-#define DEFAULT_LOG_ACTIVITY_MINUTES 5
-#define DEFAULT_LOG_ALIVE_MINUTES 15
-#define DEFAULT_LOG_ALIVE_FORMAT "%a %b %e %T %Z %Y"
-#define ALIVE_BUFFSIZ 256
-
-#define PERM 0600
-#define STATUSFILENAME "/run_erl.log"
-#define PIPE_STUBNAME "erlang.pipe"
-#define PIPE_STUBLEN strlen(PIPE_STUBNAME)
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 250
-#endif
-
-#ifndef O_SYNC
-#define O_SYNC 0
-#define USE_FSYNC 1
-#endif
-
#define MAX(x,y) ((x) > (y) ? (x) : (y))
-#define FILENAME_BUFSIZ FILENAME_MAX
-
/* prototypes */
static void usage(char *);
-static int create_fifo(char *name, int perm);
static int open_pty_master(char **name, int *sfd);
static int open_pty_slave(char *name);
static void pass_on(pid_t);
static void exec_shell(char **);
-static void status(const char *format,...);
-static void error_logf(int priority, int line, const char *format,...);
static void catch_sigchild(int);
-static int next_log(int log_num);
-static int prev_log(int log_num);
-static int find_next_log_num(void);
-static int open_log(int log_num, int flags);
-static void write_to_log(int* lfd, int* log_num, char* buf, int len);
static void daemon_init(void);
-static char *simple_basename(char *path);
static void init_outbuf(void);
static int outbuf_size(void);
static void clear_outbuf(void);
static char* outbuf_first(void);
static void outbuf_delete(int bytes);
static void outbuf_append(const char* bytes, int n);
-static int write_all(int fd, const char* buf, int len);
-static int extract_ctrl_seq(char* buf, int len);
-static void set_window_size(unsigned col, unsigned row);
-
-static ssize_t sf_write(int fd, const void *buffer, size_t len);
-static ssize_t sf_read(int fd, void *buffer, size_t len);
-static int sf_open(const char *path, int flags, mode_t mode);
-static int sf_close(int fd);
#ifdef DEBUG
static void show_terminal_settings(struct termios *t);
@@ -161,20 +109,11 @@ static void show_terminal_settings(struct termios *t);
/* static data */
static char fifo1[FILENAME_BUFSIZ], fifo2[FILENAME_BUFSIZ];
-static char statusfile[FILENAME_BUFSIZ];
-static char log_dir[FILENAME_BUFSIZ];
static char pipename[FILENAME_BUFSIZ];
static FILE *stdstatus = NULL;
-static int log_generations = DEFAULT_LOG_GENERATIONS;
-static int log_maxsize = DEFAULT_LOG_MAXSIZE;
-static int log_alive_minutes = DEFAULT_LOG_ALIVE_MINUTES;
-static int log_activity_minutes = DEFAULT_LOG_ACTIVITY_MINUTES;
-static int log_alive_in_gmt = 0;
-static char log_alive_format[ALIVE_BUFFSIZ+1];
static int run_daemon = 0;
static char *program_name;
static int mfd; /* master pty fd */
-static unsigned protocol_ver = RUN_ERL_LO_VER; /* assume lowest to begin with */
/*
* Output buffer.
@@ -205,29 +144,13 @@ static char* outbuf_in;
LOG_PID|LOG_CONS|LOG_NOWAIT,LOG_USER)
#endif
-#define ERROR0(Prio,Format) error_logf(Prio,__LINE__,Format"\n")
-#define ERROR1(Prio,Format,A1) error_logf(Prio,__LINE__,Format"\n",A1)
-#define ERROR2(Prio,Format,A1,A2) error_logf(Prio,__LINE__,Format"\n",A1,A2)
-
-#ifdef HAVE_STRERROR
-# define ADD_ERRNO(Format) "errno=%d '%s'\n"Format"\n",errno,strerror(errno)
-#else
-# define ADD_ERRNO(Format) "errno=%d\n"Format"\n",errno
-#endif
-#define ERRNO_ERR0(Prio,Format) error_logf(Prio,__LINE__,ADD_ERRNO(Format))
-#define ERRNO_ERR1(Prio,Format,A1) error_logf(Prio,__LINE__,ADD_ERRNO(Format),A1)
-
-
int main(int argc, char **argv)
{
int childpid;
int sfd = -1;
- int fd;
- char *p, *ptyslave=NULL;
+ char *ptyslave=NULL;
int i = 1;
int off_argv;
- int calculated_pipename = 0;
- int highest_pipe_num = 0;
program_name = argv[0];
@@ -245,122 +168,16 @@ int main(int argc, char **argv)
off_argv = i;
strn_cpy(pipename, sizeof(pipename), argv[i++]);
- strn_cpy(log_dir, sizeof(log_dir), argv[i]);
- strn_cpy(statusfile, sizeof(statusfile), log_dir);
- strn_cat(statusfile, sizeof(statusfile), STATUSFILENAME);
+
+ erts_run_erl_log_init(run_daemon,argv[i]);
#ifdef DEBUG
- status("%s: pid is : %d\n", argv[0], getpid());
+ erts_run_erl_log_status("%s: pid is : %d\n", argv[0], getpid());
#endif
- /* Get values for LOG file handling from the environment */
- if ((p = getenv("RUN_ERL_LOG_ALIVE_MINUTES"))) {
- log_alive_minutes = atoi(p);
- if (!log_alive_minutes) {
- ERROR1(LOG_ERR,"Minimum value for RUN_ERL_LOG_ALIVE_MINUTES is 1 "
- "(current value is %s)",p);
- }
- log_activity_minutes = log_alive_minutes / 3;
- if (!log_activity_minutes) {
- ++log_activity_minutes;
- }
- }
- if ((p = getenv("RUN_ERL_LOG_ACTIVITY_MINUTES"))) {
- log_activity_minutes = atoi(p);
- if (!log_activity_minutes) {
- ERROR1(LOG_ERR,"Minimum value for RUN_ERL_LOG_ACTIVITY_MINUTES is 1 "
- "(current value is %s)",p);
- }
- }
- if ((p = getenv("RUN_ERL_LOG_ALIVE_FORMAT"))) {
- if (strlen(p) > ALIVE_BUFFSIZ) {
- ERROR1(LOG_ERR, "RUN_ERL_LOG_ALIVE_FORMAT can contain a maximum of "
- "%d characters", ALIVE_BUFFSIZ);
- }
- strn_cpy(log_alive_format, sizeof(log_alive_format), p);
- } else {
- strn_cpy(log_alive_format, sizeof(log_alive_format), DEFAULT_LOG_ALIVE_FORMAT);
- }
- if ((p = getenv("RUN_ERL_LOG_ALIVE_IN_UTC")) && strcmp(p,"0")) {
- ++log_alive_in_gmt;
- }
- if ((p = getenv("RUN_ERL_LOG_GENERATIONS"))) {
- log_generations = atoi(p);
- if (log_generations < LOG_MIN_GENERATIONS)
- ERROR1(LOG_ERR,"Minimum RUN_ERL_LOG_GENERATIONS is %d", LOG_MIN_GENERATIONS);
- if (log_generations > LOG_MAX_GENERATIONS)
- ERROR1(LOG_ERR,"Maximum RUN_ERL_LOG_GENERATIONS is %d", LOG_MAX_GENERATIONS);
- }
-
- if ((p = getenv("RUN_ERL_LOG_MAXSIZE"))) {
- log_maxsize = atoi(p);
- if (log_maxsize < LOG_MIN_MAXSIZE)
- ERROR1(LOG_ERR,"Minimum RUN_ERL_LOG_MAXSIZE is %d", LOG_MIN_MAXSIZE);
- }
-
- /*
- * Create FIFOs and open them
- */
-
- if(*pipename && pipename[strlen(pipename)-1] == '/') {
- /* The user wishes us to find a unique pipe name in the specified */
- /* directory */
- DIR *dirp;
- struct dirent *direntp;
-
- calculated_pipename = 1;
- dirp = opendir(pipename);
- if(!dirp) {
- ERRNO_ERR1(LOG_ERR,"Can't access pipe directory '%s'.", pipename);
- exit(1);
- }
-
- /* Check the directory for existing pipes */
-
- while((direntp=readdir(dirp)) != NULL) {
- if(strncmp(direntp->d_name,PIPE_STUBNAME,PIPE_STUBLEN)==0) {
- int num = atoi(direntp->d_name+PIPE_STUBLEN+1);
- if(num > highest_pipe_num)
- highest_pipe_num = num;
- }
- }
- closedir(dirp);
- strn_catf(pipename, sizeof(pipename), "%s.%d",
- PIPE_STUBNAME, highest_pipe_num+1);
- } /* if */
-
- for(;;) {
- /* write FIFO - is read FIFO for `to_erl' program */
- strn_cpy(fifo1, sizeof(fifo1), pipename);
- strn_cat(fifo1, sizeof(fifo1), ".r");
- if (create_fifo(fifo1, PERM) < 0) {
- ERRNO_ERR1(LOG_ERR,"Cannot create FIFO %s for writing.", fifo1);
- exit(1);
- }
-
- /* read FIFO - is write FIFO for `to_erl' program */
- strn_cpy(fifo2, sizeof(fifo2), pipename);
- strn_cat(fifo2, sizeof(fifo2), ".w");
-
- /* Check that nobody is running run_erl already */
- if ((fd = sf_open(fifo2, O_WRONLY|DONT_BLOCK_PLEASE, 0)) >= 0) {
- /* Open as client succeeded -- run_erl is already running! */
- sf_close(fd);
- if (calculated_pipename) {
- ++highest_pipe_num;
- strn_catf(pipename, sizeof(pipename), "%s.%d",
- PIPE_STUBNAME, highest_pipe_num+1);
- continue;
- }
- fprintf(stderr, "Erlang already running on pipe %s.\n", pipename);
- exit(1);
- }
- if (create_fifo(fifo2, PERM) < 0) {
- ERRNO_ERR1(LOG_ERR,"Cannot create FIFO %s for reading.", fifo2);
- exit(1);
- }
- break;
- }
+ /* Open read and write fifo */
+ if (erts_run_erl_open_fifo(pipename,fifo1,fifo2))
+ exit(1);
/*
* Open master pseudo-terminal
@@ -432,7 +249,7 @@ int main(int argc, char **argv)
sf_close(2);
if (dup(sfd) != 0 || dup(sfd) != 1 || dup(sfd) != 2) {
- status("Cannot dup\n");
+ erts_run_erl_log_status("Cannot dup\n");
}
sf_close(sfd);
exec_shell(argv+off_argv); /* exec_shell expects argv[2] to be */
@@ -475,9 +292,7 @@ static void pass_on(pid_t childpid)
struct timeval timeout;
time_t last_activity;
char buf[BUFSIZ];
- char log_alive_buffer[ALIVE_BUFFSIZ+1];
- int lognum;
- int rfd, wfd=0, lfd=0;
+ int rfd, wfd=0;
int maxfd;
int ready;
int got_some = 0; /* from to_erl */
@@ -492,13 +307,12 @@ static void pass_on(pid_t childpid)
}
#ifdef DEBUG
- status("run_erl: %s opened for reading\n", fifo2);
+ erts_run_erl_log_status("run_erl: %s opened for reading\n", fifo2);
#endif
/* Open the log file */
- lognum = find_next_log_num();
- lfd = open_log(lognum, O_RDWR|O_APPEND|O_CREAT|O_SYNC);
+ erts_run_erl_log_open();
/* Enter the work loop */
@@ -517,7 +331,8 @@ static void pass_on(pid_t childpid)
writefds_ptr = &writefds;
}
time(&last_activity);
- timeout.tv_sec = log_alive_minutes*60; /* don't assume old BSD bug */
+ /* don't assume old BSD bug */
+ timeout.tv_sec = erts_run_erl_log_alive_minutes()*60;
timeout.tv_usec = 0;
ready = select(maxfd + 1, &readfds, writefds_ptr, NULL, &timeout);
if (ready < 0) {
@@ -547,28 +362,7 @@ static void pass_on(pid_t childpid)
/* Check how long time we've been inactive */
time(&now);
- if(!ready || now - last_activity > log_activity_minutes*60) {
- /* Either a time out: 15 minutes without action, */
- /* or something is coming in right now, but it's a long time */
- /* since last time, so let's write a time stamp this message */
- struct tm *tmptr;
- if (log_alive_in_gmt) {
- tmptr = gmtime(&now);
- } else {
- tmptr = localtime(&now);
- }
- if (!strftime(log_alive_buffer, ALIVE_BUFFSIZ, log_alive_format,
- tmptr)) {
- strn_cpy(log_alive_buffer, sizeof(log_alive_buffer),
- "(could not format time in 256 positions "
- "with current format string.)");
- }
- log_alive_buffer[ALIVE_BUFFSIZ] = '\0';
-
- sn_printf(buf, sizeof(buf), "\n===== %s%s\n",
- ready?"":"ALIVE ", log_alive_buffer);
- write_to_log(&lfd, &lognum, buf, strlen(buf));
- }
+ erts_run_erl_log_activity(!ready,now,last_activity);
}
/*
@@ -603,7 +397,7 @@ static void pass_on(pid_t childpid)
*/
if (FD_ISSET(mfd, &readfds)) {
#ifdef DEBUG
- status("Pty master read; ");
+ erts_run_erl_log_status("Pty master read; ");
#endif
if ((len = sf_read(mfd, buf, BUFSIZ)) <= 0) {
sf_close(rfd);
@@ -621,7 +415,7 @@ static void pass_on(pid_t childpid)
exit(0);
}
- write_to_log(&lfd, &lognum, buf, len);
+ erts_run_erl_log_write(buf, len);
/*
* Save in the output queue.
@@ -637,7 +431,7 @@ static void pass_on(pid_t childpid)
*/
if (FD_ISSET(rfd, &readfds)) {
#ifdef DEBUG
- status("FIFO read; ");
+ erts_run_erl_log_status("FIFO read; ");
#endif
if ((len = sf_read(rfd, buf, BUFSIZ)) < 0) {
sf_close(rfd);
@@ -666,7 +460,7 @@ static void pass_on(pid_t childpid)
* should succeed. But in case of error, we just ignore it.
*/
if ((wfd = sf_open(fifo1, O_WRONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
- status("Client expected on FIFO %s, but can't open (len=%d)\n",
+ erts_run_erl_log_status("Client expected on FIFO %s, but can't open (len=%d)\n",
fifo1, len);
sf_close(rfd);
rfd = sf_open(fifo2, O_RDONLY|DONT_BLOCK_PLEASE, 0);
@@ -678,7 +472,7 @@ static void pass_on(pid_t childpid)
}
else {
#ifdef DEBUG
- status("run_erl: %s opened for writing\n", fifo1);
+ erts_run_erl_log_status("run_erl: %s opened for writing\n", fifo1);
#endif
}
}
@@ -694,14 +488,15 @@ static void pass_on(pid_t childpid)
/* Write the message */
#ifdef DEBUG
- status("Pty master write; ");
+ erts_run_erl_log_status("Pty master write; ");
#endif
- len = extract_ctrl_seq(buf, len);
+ len = erts_run_erl_extract_ctrl_seq(buf, len, mfd);
if(len==1 && buf[0] == '\003') {
kill(childpid,SIGINT);
- }
- else if (len>0 && write_all(mfd, buf, len) != len) {
+ }
+ else if (len>0 && erts_run_erl_write_all(mfd, buf, len) != len)
+ {
ERRNO_ERR0(LOG_ERR,"Error in writing to terminal.");
sf_close(rfd);
if(wfd) sf_close(wfd);
@@ -710,7 +505,7 @@ static void pass_on(pid_t childpid)
}
}
#ifdef DEBUG
- status("OK\n");
+ erts_run_erl_log_status("OK\n");
#endif
}
}
@@ -720,173 +515,6 @@ static void catch_sigchild(int sig)
{
}
-/*
- * next_log:
- * Returns the index number that follows the given index number.
- * (Wrapping after log_generations)
- */
-static int next_log(int log_num) {
- return log_num>=log_generations?1:log_num+1;
-}
-
-/*
- * prev_log:
- * Returns the index number that precedes the given index number.
- * (Wrapping after log_generations)
- */
-static int prev_log(int log_num) {
- return log_num<=1?log_generations:log_num-1;
-}
-
-/*
- * find_next_log_num()
- * Searches through the log directory to check which logs that already
- * exist. It finds the "hole" in the sequence, and returns the index
- * number for the last log in the log sequence. If there is no hole, index
- * 1 is returned.
- */
-static int find_next_log_num(void) {
- int i, next_gen, log_gen;
- DIR *dirp;
- struct dirent *direntp;
- int log_exists[LOG_MAX_GENERATIONS+1];
- int stub_len = strlen(LOG_STUBNAME);
-
- /* Initialize exiting log table */
-
- for(i=log_generations; i>=0; i--)
- log_exists[i] = 0;
- dirp = opendir(log_dir);
- if(!dirp) {
- ERRNO_ERR1(LOG_ERR,"Can't access log directory '%s'", log_dir);
- exit(1);
- }
-
- /* Check the directory for existing logs */
-
- while((direntp=readdir(dirp)) != NULL) {
- if(strncmp(direntp->d_name,LOG_STUBNAME,stub_len)==0) {
- int num = atoi(direntp->d_name+stub_len);
- if(num < 1 || num > log_generations)
- continue;
- log_exists[num] = 1;
- }
- }
- closedir(dirp);
-
- /* Find out the next available log file number */
-
- next_gen = 0;
- for(i=log_generations; i>=0; i--) {
- if(log_exists[i])
- if(next_gen)
- break;
- else
- ;
- else
- next_gen = i;
- }
-
- /* Find out the current log file number */
-
- if(next_gen)
- log_gen = prev_log(next_gen);
- else
- log_gen = 1;
-
- return log_gen;
-} /* find_next_log_num() */
-
-/* open_log()
- * Opens a log file (with given index) for writing. Writing may be
- * at the end or a trucnating write, according to flags.
- * A LOGGING STARTED and time stamp message is inserted into the log file
- */
-static int open_log(int log_num, int flags)
-{
- char buf[FILENAME_MAX];
- time_t now;
- struct tm *tmptr;
- char log_buffer[ALIVE_BUFFSIZ+1];
- int lfd;
-
- /* Remove the next log (to keep a "hole" in the log sequence) */
- sn_printf(buf, sizeof(buf), "%s/%s%d",
- log_dir, LOG_STUBNAME, next_log(log_num));
- unlink(buf);
-
- /* Create or continue on the current log file */
- sn_printf(buf, sizeof(buf), "%s/%s%d", log_dir, LOG_STUBNAME, log_num);
- if((lfd = sf_open(buf, flags, LOG_PERM))<0){
- ERRNO_ERR1(LOG_ERR,"Can't open log file '%s'.", buf);
- exit(1);
- }
-
- /* Write a LOGGING STARTED and time stamp into the log file */
- time(&now);
- if (log_alive_in_gmt) {
- tmptr = gmtime(&now);
- } else {
- tmptr = localtime(&now);
- }
- if (!strftime(log_buffer, ALIVE_BUFFSIZ, log_alive_format,
- tmptr)) {
- strn_cpy(log_buffer, sizeof(log_buffer),
- "(could not format time in 256 positions "
- "with current format string.)");
- }
- log_buffer[ALIVE_BUFFSIZ] = '\0';
-
- sn_printf(buf, sizeof(buf), "\n=====\n===== LOGGING STARTED %s\n=====\n",
- log_buffer);
- if (write_all(lfd, buf, strlen(buf)) < 0)
- status("Error in writing to log.\n");
-
-#if USE_FSYNC
- fsync(lfd);
-#endif
-
- return lfd;
-}
-
-/* write_to_log()
- * Writes a message to a log file. If the current log file is full,
- * a new log file is opened.
- */
-static void write_to_log(int* lfd, int* log_num, char* buf, int len)
-{
- int size;
-
- /* Decide if new logfile needed, and open if so */
-
- size = lseek(*lfd,0,SEEK_END);
- if(size+len > log_maxsize) {
- sf_close(*lfd);
- *log_num = next_log(*log_num);
- *lfd = open_log(*log_num, O_RDWR|O_CREAT|O_TRUNC|O_SYNC);
- }
-
- /* Write to log file */
-
- if (write_all(*lfd, buf, len) < 0) {
- status("Error in writing to log.\n");
- }
-
-#if USE_FSYNC
- fsync(*lfd);
-#endif
-}
-
-/* create_fifo()
- * Creates a new fifo with the given name and permission.
- */
-static int create_fifo(char *name, int perm)
-{
- if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
- return -1;
- return 0;
-}
-
/* open_pty_master()
* Find a master device, open and return fd and slave device name.
@@ -1083,9 +711,9 @@ static void exec_shell(char **argv)
else
argv[0] = sh;
argv[1] = "-c";
- status("Args before exec of shell:\n");
+ erts_run_erl_log_status("Args before exec of shell:\n");
for (vp = argv, i = 0; *vp; vp++, i++)
- status("argv[%d] = %s\n", i, *vp);
+ erts_run_erl_log_status("argv[%d] = %s\n", i, *vp);
if (stdstatus) {
fclose(stdstatus);
}
@@ -1096,26 +724,6 @@ static void exec_shell(char **argv)
ERRNO_ERR0(LOG_ERR,"Could not execv");
}
-/* status()
- * Prints the arguments to a status file
- * Works like printf (see vfrpintf)
- */
-static void status(const char *format,...)
-{
- va_list args;
- time_t now;
-
- if (stdstatus == NULL)
- stdstatus = fopen(statusfile, "w");
- if (stdstatus == NULL)
- return;
- now = time(NULL);
- fprintf(stdstatus, "run_erl [%d] %s", (int)getpid(), ctime(&now));
- va_start(args, format);
- vfprintf(stdstatus, format, args);
- va_end(args);
- fflush(stdstatus);
-}
static void daemon_init(void)
/* As R Stevens wants it, to a certain extent anyway... */
@@ -1155,47 +763,10 @@ static void daemon_init(void)
run_daemon = 1;
}
-/* error_logf()
- * Prints the arguments to stderr or syslog
- * Works like printf (see vfprintf)
- */
-static void error_logf(int priority, int line, const char *format, ...)
-{
- va_list args;
- va_start(args, format);
-
-#ifdef HAVE_SYSLOG_H
- if (run_daemon) {
- vsyslog(priority,format,args);
- }
- else
-#endif
- {
- time_t now = time(NULL);
- fprintf(stderr, "run_erl:%d [%d] %s", line, (int)getpid(), ctime(&now));
- vfprintf(stderr, format, args);
- }
- va_end(args);
-}
-
static void usage(char *pname)
{
- fprintf(stderr, "Usage: %s (pipe_name|pipe_dir/) log_dir \"command [parameters ...]\"\n", pname);
- fprintf(stderr, "\nYou may also set the environment variables RUN_ERL_LOG_GENERATIONS\n");
- fprintf(stderr, "and RUN_ERL_LOG_MAXSIZE to the number of log files to use and the\n");
- fprintf(stderr, "size of the log file when to switch to the next log file\n");
-}
-
-/* Instead of making sure basename exists, we do our own */
-static char *simple_basename(char *path)
-{
- char *ptr;
- for (ptr = path; *ptr != '\0'; ++ptr) {
- if (*ptr == '/') {
- path = ptr + 1;
- }
- }
- return path;
+ fprintf(stderr, "Usage: ");
+ fprintf(stderr, RUN_ERL_USAGE, pname);
}
static void init_outbuf(void)
@@ -1266,114 +837,6 @@ static void outbuf_append(const char* buf, int n)
outbuf_in += n;
}
-/* Call write() until entire buffer has been written or error.
- * Return len or -1.
- */
-static int write_all(int fd, const char* buf, int len)
-{
- int left = len;
- int written;
- for (;;) {
- written = sf_write(fd,buf,left);
- if (written == left) {
- return len;
- }
- if (written < 0) {
- return -1;
- }
- left -= written;
- buf += written;
- }
-}
-
-static ssize_t sf_read(int fd, void *buffer, size_t len) {
- ssize_t n = 0;
-
- do { n = read(fd, buffer, len); } while (n < 0 && errno == EINTR);
-
- return n;
-}
-
-static ssize_t sf_write(int fd, const void *buffer, size_t len) {
- ssize_t n = 0;
-
- do { n = write(fd, buffer, len); } while (n < 0 && errno == EINTR);
-
- return n;
-}
-
-static int sf_open(const char *path, int type, mode_t mode) {
- int fd = 0;
-
- do { fd = open(path, type, mode); } while(fd < 0 && errno == EINTR);
-
- return fd;
-}
-static int sf_close(int fd) {
- int res = 0;
-
- do { res = close(fd); } while(fd < 0 && errno == EINTR);
-
- return res;
-}
-/* Extract any control sequences that are ment only for run_erl
- * and should not be forwarded to the pty.
- */
-static int extract_ctrl_seq(char* buf, int len)
-{
- static const char prefix[] = "\033_";
- static const char suffix[] = "\033\\";
- char* bufend = buf + len;
- char* start = buf;
- char* command;
- char* end;
-
- for (;;) {
- start = find_str(start, bufend-start, prefix);
- if (!start) break;
-
- command = start + strlen(prefix);
- end = find_str(command, bufend-command, suffix);
- if (end) {
- unsigned col, row;
- if (sscanf(command,"version=%u", &protocol_ver)==1) {
- /*fprintf(stderr,"to_erl v%u\n", protocol_ver);*/
- }
- else if (sscanf(command,"winsize=%u,%u", &col, &row)==2) {
- set_window_size(col,row);
- }
- else {
- ERROR2(LOG_ERR, "Ignoring unknown ctrl command '%.*s'\n",
- (int)(end-command), command);
- }
-
- /* Remove ctrl sequence from buf */
- end += strlen(suffix);
- memmove(start, end, bufend-end);
- bufend -= end - start;
- }
- else {
- ERROR2(LOG_ERR, "Missing suffix in ctrl sequence '%.*s'\n",
- (int)(bufend-start), start);
- break;
- }
- }
- return bufend - buf;
-}
-
-static void set_window_size(unsigned col, unsigned row)
-{
-#ifdef TIOCSWINSZ
- struct winsize ws;
- ws.ws_col = col;
- ws.ws_row = row;
- if (ioctl(mfd, TIOCSWINSZ, &ws) < 0) {
- ERRNO_ERR0(LOG_ERR,"Failed to set window size");
- }
-#endif
-}
-
-
#ifdef DEBUG
#define S(x) ((x) > 0 ? 1 : 0)
diff --git a/erts/etc/unix/to_erl.c b/erts/etc/unix/to_erl.c
index b9e397cbf2..38a94ed9c3 100644
--- a/erts/etc/unix/to_erl.c
+++ b/erts/etc/unix/to_erl.c
@@ -16,592 +16,9 @@
*
* %CopyrightEnd%
*/
-/*
- * Module: to_erl.c
- *
- * This module implements a process that opens two specified FIFOs, one
- * for reading and one for writing; reads from its stdin, and writes what
- * it has read to the write FIF0; reads from the read FIFO, and writes to
- * its stdout.
- *
- ________ _________
- | |--<-- pipe.r (fifo1) --<--| |
- | to_erl | | run_erl | (parent)
- |________|-->-- pipe.w (fifo2) -->--|_________|
- ^ master pty
- |
- | slave pty
- ____V____
- | |
- | "erl" | (child)
- |_________|
- */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <dirent.h>
-#include <signal.h>
-#include <errno.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-#include "run_erl.h"
-#include "safe_string.h" /* strn_cpy, strn_catf, sn_printf, etc. */
-
-#if defined(O_NONBLOCK)
-# define DONT_BLOCK_PLEASE O_NONBLOCK
-#else
-# define DONT_BLOCK_PLEASE O_NDELAY
-# if !defined(EAGAIN)
-# define EAGAIN -3898734
-# endif
-#endif
-
-#ifdef HAVE_STRERROR
-# define STRERROR(x) strerror(x)
-#else
-# define STRERROR(x) ""
-#endif
-
-#define noDEBUG
-
-#define PIPE_DIR "/tmp/"
-#define PIPE_STUBNAME "erlang.pipe"
-#define PIPE_STUBLEN strlen(PIPE_STUBNAME)
-
-#ifdef DEBUG
-#define STATUS(s) { fprintf(stderr, (s)); fflush(stderr); }
-#else
-#define STATUS(s)
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 250
-#endif
-
-static struct termios tty_smode, tty_rmode;
-static int tty_eof = 0;
-static int recv_sig = 0;
-static int protocol_ver = RUN_ERL_LO_VER; /* assume lowest to begin with */
-
-static int write_all(int fd, const char* buf, int len);
-static int window_size_seq(char* buf, size_t bufsz);
-static int version_handshake(char* buf, int len, int wfd);
-#ifdef DEBUG
-static void show_terminal_settings(struct termios *);
-#endif
-
-static void handle_ctrlc(int sig)
-{
- /* Reinstall the handler, and signal break flag */
- signal(SIGINT,handle_ctrlc);
- recv_sig = SIGINT;
-}
-
-static void handle_sigwinch(int sig)
-{
- recv_sig = SIGWINCH;
-}
-
-static void usage(char *pname)
-{
- fprintf(stderr, "Usage: %s [-h|-F] [pipe_name|pipe_dir/]\n", pname);
- fprintf(stderr, "\t-h\tThis help text.\n");
- fprintf(stderr, "\t-F\tForce connection even though pipe is locked by other to_erl process.\n");
-}
-
-int main(int argc, char **argv)
-{
- char FIFO1[FILENAME_MAX], FIFO2[FILENAME_MAX];
- int i, len, wfd, rfd;
- fd_set readfds;
- char buf[BUFSIZ];
- char pipename[FILENAME_MAX];
- int pipeIx = 1;
- int force_lock = 0;
- int got_some = 0;
-
- if (argc >= 2 && argv[1][0]=='-') {
- switch (argv[1][1]) {
- case 'h':
- usage(argv[0]);
- exit(1);
- case 'F':
- force_lock = 1;
- break;
- default:
- fprintf(stderr,"Invalid option '%s'\n",argv[1]);
- exit(1);
- }
- pipeIx = 2;
- }
-
-#ifdef DEBUG
- fprintf(stderr, "%s: pid is : %d\n", argv[0], (int)getpid());
-#endif
-
- strn_cpy(pipename, sizeof(pipename),
- (argv[pipeIx] ? argv[pipeIx] : PIPE_DIR));
-
- if(*pipename && pipename[strlen(pipename)-1] == '/') {
- /* The user wishes us to find a pipe name in the specified */
- /* directory */
- int highest_pipe_num = 0;
- DIR *dirp;
- struct dirent *direntp;
-
- dirp = opendir(pipename);
- if(!dirp) {
- fprintf(stderr, "Can't access pipe directory %s: %s\n", pipename, strerror(errno));
- exit(1);
- }
-
- /* Check the directory for existing pipes */
-
- while((direntp=readdir(dirp)) != NULL) {
- if(strncmp(direntp->d_name,PIPE_STUBNAME,PIPE_STUBLEN)==0) {
- int num = atoi(direntp->d_name+PIPE_STUBLEN+1);
- if(num > highest_pipe_num)
- highest_pipe_num = num;
- }
- }
- closedir(dirp);
- strn_catf(pipename, sizeof(pipename), (highest_pipe_num?"%s.%d":"%s"),
- PIPE_STUBNAME, highest_pipe_num);
- } /* if */
-
- /* read FIFO */
- sn_printf(FIFO1,sizeof(FIFO1),"%s.r",pipename);
- /* write FIFO */
- sn_printf(FIFO2,sizeof(FIFO2),"%s.w",pipename);
-
- /* Check that nobody is running to_erl on this pipe already */
- if ((wfd = open (FIFO1, O_WRONLY|DONT_BLOCK_PLEASE, 0)) >= 0) {
- /* Open as server succeeded -- to_erl is already running! */
- close(wfd);
- fprintf(stderr, "Another to_erl process already attached to pipe "
- "%s.\n", pipename);
- if (force_lock) {
- fprintf(stderr, "But we proceed anyway by force (-F).\n");
- }
- else {
- exit(1);
- }
- }
-
- if ((rfd = open (FIFO1, O_RDONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
-#ifdef DEBUG
- fprintf(stderr, "Could not open FIFO %s for reading.\n", FIFO1);
-#endif
- fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno));
- exit(1);
- }
-#ifdef DEBUG
- fprintf(stderr, "to_erl: %s opened for reading\n", FIFO1);
-#endif
-
- if ((wfd = open (FIFO2, O_WRONLY|DONT_BLOCK_PLEASE, 0)) < 0) {
-#ifdef DEBUG
- fprintf(stderr, "Could not open FIFO %s for writing.\n", FIFO2);
-#endif
- fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno));
- close(rfd);
- exit(1);
- }
-#ifdef DEBUG
- fprintf(stderr, "to_erl: %s opened for writing\n", FIFO2);
-#endif
-
- fprintf(stderr, "Attaching to %s (^D to exit)\n\n", pipename);
-
- /* Set break handler to our handler */
- signal(SIGINT,handle_ctrlc);
-
- /*
- * Save the current state of the terminal, and set raw mode.
- */
- if (tcgetattr(0, &tty_rmode) , 0) {
- fprintf(stderr, "Cannot get terminals current mode\n");
- exit(-1);
- }
- tty_smode = tty_rmode;
- tty_eof = '\004'; /* Ctrl+D to exit */
-#ifdef DEBUG
- show_terminal_settings(&tty_rmode);
-#endif
- tty_smode.c_iflag =
- 1*BRKINT |/*Signal interrupt on break.*/
- 1*IGNPAR |/*Ignore characters with parity errors.*/
- 1*ISTRIP |/*Strip character.*/
- 0;
-
-#if 0
-0*IGNBRK |/*Ignore break condition.*/
-0*PARMRK |/*Mark parity errors.*/
-0*INPCK |/*Enable input parity check.*/
-0*INLCR |/*Map NL to CR on input.*/
-0*IGNCR |/*Ignore CR.*/
-0*ICRNL |/*Map CR to NL on input.*/
-0*IUCLC |/*Map upper-case to lower-case on input.*/
-0*IXON |/*Enable start/stop output control.*/
-0*IXANY |/*Enable any character to restart output.*/
-0*IXOFF |/*Enable start/stop input control.*/
-0*IMAXBEL|/*Echo BEL on input line too long.*/
-#endif
-
- tty_smode.c_oflag =
- 1*OPOST |/*Post-process output.*/
- 1*ONLCR |/*Map NL to CR-NL on output.*/
-#ifdef XTABS
- 1*XTABS |/*Expand tabs to spaces. (Linux)*/
-#endif
-#ifdef OXTABS
- 1*OXTABS |/*Expand tabs to spaces. (FreeBSD)*/
-#endif
-#ifdef NL0
- 1*NL0 |/*Select newline delays*/
-#endif
-#ifdef CR0
- 1*CR0 |/*Select carriage-return delays*/
-#endif
-#ifdef TAB0
- 1*TAB0 |/*Select horizontal tab delays*/
-#endif
-#ifdef BS0
- 1*BS0 |/*Select backspace delays*/
-#endif
-#ifdef VT0
- 1*VT0 |/*Select vertical tab delays*/
-#endif
-#ifdef FF0
- 1*FF0 |/*Select form feed delays*/
-#endif
- 0;
-
-#if 0
-0*OLCUC |/*Map lower case to upper on output.*/
-0*OCRNL |/*Map CR to NL on output.*/
-0*ONOCR |/*No CR output at column 0.*/
-0*ONLRET |/*NL performs CR function.*/
-0*OFILL |/*Use fill characters for delay.*/
-0*OFDEL |/*Fill is DEL, else NULL.*/
-0*NL1 |
-0*CR1 |
-0*CR2 |
-0*CR3 |
-0*TAB1 |
-0*TAB2 |
-0*TAB3 |/*Expand tabs to spaces.*/
-0*BS1 |
-0*VT1 |
-0*FF1 |
-#endif
-
- /* JALI: removed setting the tty_smode.c_cflag flags, since this is not */
- /* advisable if this is a *real* terminal, such as the console. In fact */
- /* this may hang the entire machine, deep, deep down (signalling break */
- /* or toggling the abort switch doesn't help) */
-
- tty_smode.c_lflag =
- 0;
-
-#if 0
-0*ISIG |/*Enable signals.*/
-0*ICANON |/*Canonical input (erase and kill processing).*/
-0*XCASE |/*Canonical upper/lower presentation.*/
-0*ECHO |/*Enable echo.*/
-0*ECHOE |/*Echo erase character as BS-SP-BS.*/
-0*ECHOK |/*Echo NL after kill character.*/
-0*ECHONL |/*Echo NL.*/
-0*NOFLSH |/*Disable flush after interrupt or quit.*/
-0*TOSTOP |/*Send SIGTTOU for background output.*/
-0*ECHOCTL|/*Echo control characters as ^char, delete as ^?.*/
-0*ECHOPRT|/*Echo erase character as character erased.*/
-0*ECHOKE |/*BS-SP-BS erase entire line on line kill.*/
-0*FLUSHO |/*Output is being flushed.*/
-0*PENDIN |/*Retype pending input at next read or input character.*/
-0*IEXTEN |/*Enable extended (implementation-defined) functions.*/
-#endif
-
- tty_smode.c_cc[VMIN] =0;/* Note that VMIN is the same as VEOF! */
- tty_smode.c_cc[VTIME] =0;/* Note that VTIME is the same as VEOL! */
- tty_smode.c_cc[VINTR] =3;
-
- tcsetattr(0, TCSADRAIN, &tty_smode);
-
-#ifdef DEBUG
- show_terminal_settings(&tty_smode);
-#endif
- /*
- * "Write a ^R to the FIFO which causes the other end to redisplay
- * the input line."
- * This does not seem to work as was intended in old comment above.
- * However, this control character is now (R12B-3) used by run_erl
- * to trigger the version handshaking between to_erl and run_erl
- * at the start of every new to_erl-session.
- */
-
- if (write(wfd, "\014", 1) < 0) {
- fprintf(stderr, "Error in writing ^R to FIFO.\n");
- }
-
- /*
- * read and write
- */
- while (1) {
- FD_ZERO(&readfds);
- FD_SET(0, &readfds);
- FD_SET(rfd, &readfds);
- if (select(rfd + 1, &readfds, NULL, NULL, NULL) < 0) {
- if (recv_sig) {
- FD_ZERO(&readfds);
- }
- else {
- fprintf(stderr, "Error in select.\n");
- break;
- }
- }
- len = 0;
-
- /*
- * Read from terminal and write to FIFO
- */
- if (recv_sig) {
- switch (recv_sig) {
- case SIGINT:
- fprintf(stderr, "[Break]\n\r");
- buf[0] = '\003';
- len = 1;
- break;
- case SIGWINCH:
- len = window_size_seq(buf,sizeof(buf));
- break;
- default:
- fprintf(stderr,"Unexpected signal: %u\n",recv_sig);
- }
- recv_sig = 0;
- }
- else if (FD_ISSET(0, &readfds)) {
- len = read(0, buf, sizeof(buf));
- if (len <= 0) {
- close(rfd);
- close(wfd);
- if (len < 0) {
- fprintf(stderr, "Error in reading from stdin.\n");
- } else {
- fprintf(stderr, "[EOF]\n\r");
- }
- break;
- }
- /* check if there is an eof character in input */
- for (i = 0; i < len && buf[i] != tty_eof; i++);
- if (buf[i] == tty_eof) {
- fprintf(stderr, "[Quit]\n\r");
- break;
- }
- }
-
- if (len) {
-#ifdef DEBUG
- if(write(1, buf, len));
-#endif
- if (write_all(wfd, buf, len) != len) {
- fprintf(stderr, "Error in writing to FIFO.\n");
- close(rfd);
- close(wfd);
- break;
- }
- STATUS("\" OK\r\n");
- }
-
- /*
- * Read from FIFO, write to terminal.
- */
- if (FD_ISSET(rfd, &readfds)) {
- STATUS("FIFO read: ");
- len = read(rfd, buf, BUFSIZ);
- if (len < 0 && errno == EAGAIN) {
- /*
- * No data this time, but the writing end of the FIFO is still open.
- * Do nothing.
- */
- ;
- } else if (len <= 0) {
- /*
- * Either an error or end of file. In either case, break out
- * of the loop.
- */
- close(rfd);
- close(wfd);
- if (len < 0) {
- fprintf(stderr, "Error in reading from FIFO.\n");
- } else
- fprintf(stderr, "[End]\n\r");
- break;
- } else {
- if (!got_some) {
- if ((len=version_handshake(buf,len,wfd)) < 0) {
- close(rfd);
- close(wfd);
- break;
- }
- if (protocol_ver >= 1) {
- /* Tell run_erl size of terminal window */
- signal(SIGWINCH, handle_sigwinch);
- raise(SIGWINCH);
- }
- got_some = 1;
- }
-
- /*
- * We successfully read at least one character. Write what we got.
- */
- STATUS("Terminal write: \"");
- if (write_all(1, buf, len) != len) {
- fprintf(stderr, "Error in writing to terminal.\n");
- close(rfd);
- close(wfd);
- break;
- }
- STATUS("\" OK\r\n");
- }
- }
- }
-
- /*
- * Reset terminal characterstics
- * XXX
- */
- tcsetattr(0, TCSADRAIN, &tty_rmode);
- return 0;
-}
-
-/* Call write() until entire buffer has been written or error.
- * Return len or -1.
- */
-static int write_all(int fd, const char* buf, int len)
-{
- int left = len;
- int written;
- while (left) {
- written = write(fd,buf,left);
- if (written < 0) {
- return -1;
- }
- left -= written;
- buf += written;
- }
- return len;
-}
-
-static int window_size_seq(char* buf, size_t bufsz)
-{
-#ifdef TIOCGWINSZ
- struct winsize ws;
- static const char prefix[] = "\033_";
- static const char suffix[] = "\033\\";
- /* This Esc sequence is called "Application Program Command"
- and seems suitable to use for our own customized stuff. */
-
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == 0) {
- int len = sn_printf(buf, bufsz, "%swinsize=%u,%u%s",
- prefix, ws.ws_col, ws.ws_row, suffix);
- return len;
- }
-#endif /* TIOCGWINSZ */
- return 0;
-}
-
-/* to_erl run_erl
- * | |
- * |---------- '\022' -------->| (session start)
- * | |
- * |<---- "[run_erl v1-0]" ----| (version interval)
- * | |
- * |--- Esc_"version=1"Esc\ -->| (common version)
- * | |
- */
-static int version_handshake(char* buf, int len, int wfd)
-{
- unsigned re_high=0, re_low;
- char *end = find_str(buf,len,"]\n");
-
- if (end && sscanf(buf,"[run_erl v%u-%u",&re_high,&re_low)==2) {
- char wbuf[30];
- int wlen;
-
- if (re_low > RUN_ERL_HI_VER || re_high < RUN_ERL_LO_VER) {
- fprintf(stderr,"Incompatible versions: to_erl=v%u-%u run_erl=v%u-%u\n",
- RUN_ERL_HI_VER, RUN_ERL_LO_VER, re_high, re_low);
- return -1;
- }
- /* Choose highest common version */
- protocol_ver = re_high < RUN_ERL_HI_VER ? re_high : RUN_ERL_HI_VER;
-
- wlen = sn_printf(wbuf, sizeof(wbuf), "\033_version=%u\033\\",
- protocol_ver);
- if (write_all(wfd, wbuf, wlen) < 0) {
- fprintf(stderr,"Failed to send version handshake\n");
- return -1;
- }
- end += 2;
- len -= (end-buf);
- memmove(buf,end,len);
-
- }
- else { /* we assume old run_erl without version handshake */
- protocol_ver = 0;
- }
-
- if (re_high != RUN_ERL_HI_VER) {
- fprintf(stderr,"run_erl has different version, "
- "using common protocol level %u\n", protocol_ver);
- }
-
- return len;
-}
-
-#ifdef DEBUG
-#define S(x) ((x) > 0 ? 1 : 0)
+#include "to_erl_common.h"
-static void show_terminal_settings(struct termios *t)
-{
- fprintf(stderr,"c_iflag:\n");
- fprintf(stderr,"Signal interrupt on break: BRKINT %d\n", S(t->c_iflag & BRKINT));
- fprintf(stderr,"Map CR to NL on input: ICRNL %d\n", S(t->c_iflag & ICRNL));
- fprintf(stderr,"Ignore break condition: IGNBRK %d\n", S(t->c_iflag & IGNBRK));
- fprintf(stderr,"Ignore CR: IGNCR %d\n", S(t->c_iflag & IGNCR));
- fprintf(stderr,"Ignore char with par. err's: IGNPAR %d\n", S(t->c_iflag & IGNPAR));
- fprintf(stderr,"Map NL to CR on input: INLCR %d\n", S(t->c_iflag & INLCR));
- fprintf(stderr,"Enable input parity check: INPCK %d\n", S(t->c_iflag & INPCK));
- fprintf(stderr,"Strip character ISTRIP %d\n", S(t->c_iflag & ISTRIP));
- fprintf(stderr,"Enable start/stop input ctrl IXOFF %d\n", S(t->c_iflag & IXOFF));
- fprintf(stderr,"ditto output ctrl IXON %d\n", S(t->c_iflag & IXON));
- fprintf(stderr,"Mark parity errors PARMRK %d\n", S(t->c_iflag & PARMRK));
- fprintf(stderr,"\n");
- fprintf(stderr,"c_oflag:\n");
- fprintf(stderr,"Perform output processing OPOST %d\n", S(t->c_oflag & OPOST));
- fprintf(stderr,"\n");
- fprintf(stderr,"c_cflag:\n");
- fprintf(stderr,"Ignore modem status lines CLOCAL %d\n", S(t->c_cflag & CLOCAL));
- fprintf(stderr,"\n");
- fprintf(stderr,"c_local:\n");
- fprintf(stderr,"Enable echo ECHO %d\n", S(t->c_lflag & ECHO));
- fprintf(stderr,"\n");
- fprintf(stderr,"c_cc:\n");
- fprintf(stderr,"c_cc[VEOF] %d\n", t->c_cc[VEOF]);
+int main(int argc,char **argv) {
+ return to_erl(argc,argv);
}
-#endif
diff --git a/erts/etc/win32/Install.c b/erts/etc/win32/Install.c
index c46bb89f7c..9d85d642ab 100644
--- a/erts/etc/win32/Install.c
+++ b/erts/etc/win32/Install.c
@@ -21,80 +21,83 @@
* Dead simple installation program to set up init files etc after erlang is
* copied to its destination. Also to be used after a patch is applied.
*/
+
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "init_file.h"
-int main(int argc, char **argv)
+int wmain(int argc, wchar_t **argv)
{
int silent = 0;
int start_sasl = 0;
- char *root = NULL;
+ wchar_t *root = NULL;
int i;
- char buffer[MAX_PATH];
- char erts_dir[MAX_PATH];
- char release_dir[MAX_PATH];
- char bin_dir[MAX_PATH];
+ wchar_t buffer[MAX_PATH];
+ wchar_t erts_dir[MAX_PATH];
+ wchar_t release_dir[MAX_PATH];
+ wchar_t bin_dir[MAX_PATH];
char *tmp;
- char my_ini_filename[MAX_PATH];
+ char tmp_utf8[MAX_PATH*4];
+ wchar_t my_ini_filename[MAX_PATH];
InitFile *my_ini_file;
InitSection *my_ini_section;
- char version_string[MAX_PATH];
+ char erts_version[MAX_PATH];
InitFile *ini_file;
InitSection *ini_section;
HANDLE module = GetModuleHandle(NULL);
- char *binaries[] = { "erl.exe", "werl.exe", "erlc.exe",
- "dialyzer.exe", "typer.exe",
- "escript.exe", "ct_run.exe", NULL };
- char *scripts[] = { "start_clean.boot", "start_sasl.boot", "no_dot_erlang.boot", NULL };
- char fromname[MAX_PATH];
- char toname[MAX_PATH];
-
+ wchar_t *binaries[] = { L"erl.exe", L"werl.exe", L"erlc.exe",
+ L"dialyzer.exe", L"typer.exe",
+ L"escript.exe", L"ct_run.exe", NULL };
+ wchar_t *scripts[] = { L"start_clean.boot", L"start_sasl.boot", L"no_dot_erlang.boot", NULL };
+ wchar_t fromname[MAX_PATH];
+ wchar_t toname[MAX_PATH];
+ size_t converted;
for (i = 1; i < argc; ++i) {
switch(argv[i][0]) {
- case '-' :
+ case L'-' :
switch(argv[i][1]) {
- case 's' :
+ case L's' :
silent = 1;
break;
default:
- fprintf(stderr, "Unknown command switch %s\n",
+ fprintf(stderr, "Unknown command switch %S\n",
argv[i]);
exit(1);
}
break;
- default:
+ default: {
if (root != NULL) {
fprintf(stderr, "Only one root directory can be specified, "
- "parameter %s is illegal\n",
+ "parameter %S is illegal\n",
argv[i]);
exit(1);
- }
+ }
root = argv[i];
+ }
break;
}
}
if (root == NULL) {
- if (module = NULL) {
+ if (module == NULL) {
fprintf(stderr, "Cannot GetModuleHandle()\n");
exit(1);
}
- if (GetModuleFileName(module,buffer,MAX_PATH) == 0) {
+ if (GetModuleFileNameW(module,buffer,MAX_PATH) == 0) {
fprintf(stderr,"Could not GetModuleFileName()\n");
exit(1);
}
- i = strlen(buffer) - 1;
- while ( i >= 0 && buffer[i] != '\\') {
+ i = wcslen(buffer) - 1;
+ while ( i >= 0 && buffer[i] != L'\\') {
--i;
}
if (i < 0) {
fprintf(stderr,"GetModuleFileName returned broken path\n");
exit(1);
}
- buffer[i] = '\0';
+ buffer[i] = L'\0';
root = buffer;
}
@@ -122,79 +125,78 @@ int main(int argc, char **argv)
start_sasl = 0;
}
}
- sprintf(my_ini_filename,"%s\\Install.ini",root);
+ swprintf(my_ini_filename, MAX_PATH, L"%s\\Install.ini", root);
my_ini_file = load_init_file(my_ini_filename);
if (my_ini_file == NULL) {
- fprintf(stderr,"Cannot open init file %s\n",my_ini_filename);
+ fprintf(stderr,"Cannot open init file %S\n",my_ini_filename);
exit(1);
}
if ((my_ini_section = lookup_init_section(my_ini_file,"Install"))
== NULL) {
- fprintf(stderr,"No [Install] section in init file %s\n",
+ fprintf(stderr,"No [Install] section in init file %S\n",
my_ini_filename);
exit(1);
}
if ((tmp = lookup_init_entry(my_ini_section, "VSN")) == NULL) {
- fprintf(stderr,"No key VSN in init file %s\n",
+ fprintf(stderr,"No key VSN in init file %S\n",
my_ini_filename);
exit(1);
}
-
- strcpy(version_string,tmp);
+ strcpy(erts_version,tmp);
- sprintf(erts_dir,"%s\\erts-%s\\bin",root,tmp);
+ swprintf(erts_dir,MAX_PATH,L"%s\\erts-%S\\bin",root,erts_version);
if ((tmp = lookup_init_entry(my_ini_section, "SYSTEM_VSN")) == NULL) {
- fprintf(stderr,"No key SYSTEM_VSN in init file %s\n",
- my_ini_filename);
+ fprintf(stderr,"No key SYSTEM_VSN in init file %S\n",
+ my_ini_filename);
exit(1);
}
- sprintf(release_dir,"%s\\releases\\%s",root,tmp);
+ swprintf(release_dir,MAX_PATH,L"%s\\releases\\%S",root,tmp);
- sprintf(bin_dir,"%s\\bin",root);
- CreateDirectory(bin_dir,NULL);
+ swprintf(bin_dir,MAX_PATH,L"%s\\bin",root);
+ CreateDirectoryW(bin_dir,NULL);
free_init_file(my_ini_file);
for (i = 0; binaries[i] != NULL; ++i) {
- sprintf(fromname,"%s\\%s",erts_dir,binaries[i]);
- sprintf(toname,"%s\\%s",bin_dir,binaries[i]);
- if (GetFileAttributes(fromname) == 0xFFFFFFFF) {
- fprintf(stderr,"Could not find file %s\n",
+ swprintf(fromname,MAX_PATH,L"%s\\%s",erts_dir,binaries[i]);
+ swprintf(toname,MAX_PATH,L"%s\\%s",bin_dir,binaries[i]);
+ if (GetFileAttributesW(fromname) == 0xFFFFFFFF) {
+ fprintf(stderr,"Could not find file %S\n",
fromname);
exit(1);
}
- if (!CopyFile(fromname,toname,FALSE)) {
- fprintf(stderr,"Could not copy file %s to %s\n",
+ if (!CopyFileW(fromname,toname,FALSE)) {
+ fprintf(stderr,"Could not copy file %S to %S\n",
fromname,toname);
fprintf(stderr,"Continuing installation anyway...\n");
}
}
for (i = 0; scripts[i] != NULL; ++i) {
- sprintf(fromname,"%s\\%s",release_dir,scripts[i]);
- sprintf(toname,"%s\\%s",bin_dir,scripts[i]);
- if (GetFileAttributes(fromname) == 0xFFFFFFFF) {
- fprintf(stderr,"Could not find file %s\n",
+ swprintf(fromname,MAX_PATH,L"%s\\%s",release_dir,scripts[i]);
+ swprintf(toname,MAX_PATH,L"%s\\%s",bin_dir,scripts[i]);
+ if (GetFileAttributesW(fromname) == 0xFFFFFFFF) {
+ fprintf(stderr,"Could not find file %S\n",
fromname);
exit(1);
}
- if (!CopyFile(fromname,toname,FALSE)) {
- fprintf(stderr,"Could not copy file %s to %s\n",
+ if (!CopyFileW(fromname,toname,FALSE)) {
+ fprintf(stderr,"Could not copy file %S to %S\n",
fromname,toname);
fprintf(stderr,"Cannot continue installation, bailing out.\n");
exit(1);
}
}
if (start_sasl) {
- sprintf(fromname,"%s\\start_sasl.boot",bin_dir);
+ swprintf(fromname,MAX_PATH,L"%s\\start_sasl.boot",bin_dir);
} else {
- sprintf(fromname,"%s\\start_clean.boot",bin_dir);
+ swprintf(fromname,MAX_PATH,L"%s\\start_clean.boot",bin_dir);
}
- sprintf(toname,"%s\\start.boot",bin_dir);
- if (!CopyFile(fromname,toname,FALSE)) {
- fprintf(stderr,"Could not copy file %s to %s\n",
+ swprintf(toname,MAX_PATH,L"%s\\start.boot",bin_dir);
+ if (!CopyFileW(fromname,toname,FALSE)) {
+ fprintf(stderr,"Could not copy file %S to %S\n",
fromname,toname);
fprintf(stderr,"Cannot continue installation, bailing out.\n");
exit(1);
@@ -205,25 +207,27 @@ int main(int argc, char **argv)
ini_file = create_init_file();
ini_section = create_init_section("erlang");
add_init_section(ini_file,ini_section);
- add_init_entry(ini_section,"Bindir",erts_dir);
+ WideCharToMultiByte(CP_UTF8,0,erts_dir,-1,tmp_utf8,MAX_PATH*4,NULL,NULL);
+ add_init_entry(ini_section,"Bindir",tmp_utf8);
add_init_entry(ini_section,"Progname","erl");
- add_init_entry(ini_section,"Rootdir",root);
- sprintf(fromname,"%s\\erl.ini",erts_dir);
- sprintf(toname,"%s\\erl.ini",bin_dir);
+ WideCharToMultiByte(CP_UTF8,0,root,-1,tmp_utf8,MAX_PATH*4,NULL,NULL);
+ add_init_entry(ini_section,"Rootdir",tmp_utf8);
+ swprintf(fromname,MAX_PATH,L"%s\\erl.ini",erts_dir);
+ swprintf(toname,MAX_PATH,L"%s\\erl.ini",bin_dir);
if (store_init_file(ini_file,fromname) != 0) {
- fprintf(stderr,"Could not create file %s\n",
+ fprintf(stderr,"Could not create file %S\n",
fromname);
fprintf(stderr,"Cannot continue installation, bailing out.\n");
exit(1);
}
- if (!CopyFile(fromname,toname,FALSE)) {
- fprintf(stderr,"Could not copy file %s to %s\n",
- fromname,toname);
+ if (!CopyFileW(fromname,toname,FALSE)) {
+ fprintf(stderr,"Could not copy file %S to %S\n",
+ fromname,toname);
fprintf(stderr,"Cannot continue installation, bailing out.\n");
exit(1);
}
if (!silent) {
- printf("Erlang %s installed successfully\n", version_string);
+ printf("Erlang %s installed successfully\n", erts_version);
}
return 0;
}
diff --git a/erts/etc/win32/erl.c b/erts/etc/win32/erl.c
index d341153966..772b668586 100644
--- a/erts/etc/win32/erl.c
+++ b/erts/etc/win32/erl.c
@@ -27,96 +27,126 @@
typedef int ErlexecFunction(int, char **, HANDLE, int);
-#define INI_FILENAME "erl.ini"
+#define INI_FILENAME L"erl.ini"
#define INI_SECTION "erlang"
-#define ERLEXEC_BASENAME "erlexec.dll"
+#define ERLEXEC_BASENAME L"erlexec.dll"
static void get_parameters(void);
static void error(char* format, ...);
-static char *erlexec_name;
-static char *erlexec_dir;
+static wchar_t *erlexec_name;
+static wchar_t *erlexec_dir;
#ifdef WIN32_WERL
#define WERL 1
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
- PSTR szCmdLine, int iCmdShow)
+int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+ PWSTR szCmdLine, int iCmdShow)
{
int argc = __argc;
- char **argv = __argv;
+ wchar_t **argv = __wargv;
#else
#define WERL 0
-int main(int argc, char **argv)
+int wmain(int argc, wchar_t **argv)
{
#endif
HANDLE erlexec_handle; /* Instance */
ErlexecFunction *win_erlexec;
- char *path = malloc(100);
- char *npath;
+ wchar_t *path = malloc(100*sizeof(wchar_t));
+ wchar_t *npath;
int pathlen;
+ char ** utf8argv;
+ int i, len;
get_parameters();
- if ((pathlen = GetEnvironmentVariable("PATH",path,100)) == 0) {
+ if ((pathlen = GetEnvironmentVariableW(L"PATH",path,100)) == 0) {
error("No PATH variable (!)");
} else if (pathlen > 100) {
- path = realloc(path,pathlen);
- GetEnvironmentVariable("PATH",path,pathlen);
+ path = realloc(path,pathlen*sizeof(wchar_t));
+ GetEnvironmentVariableW(L"PATH",path,pathlen);
}
- npath = malloc(strlen(path) + strlen(erlexec_dir) + 2);
- sprintf(npath,"%s;%s",erlexec_dir,path);
- SetEnvironmentVariable("PATH",npath);
+ pathlen = (wcslen(path) + wcslen(erlexec_dir) + 2);
+ npath = (wchar_t *) malloc(pathlen*sizeof(wchar_t));
+ swprintf(npath,pathlen,L"%s;%s",erlexec_dir,path);
+ SetEnvironmentVariableW(L"PATH",npath);
- if ((erlexec_handle = LoadLibrary(erlexec_name)) == NULL) {
- error("Could not load module %s.",erlexec_name);
+ if ((erlexec_handle = LoadLibraryW(erlexec_name)) == NULL) {
+ error("Could not load module %S.",erlexec_name);
}
if ((win_erlexec = (ErlexecFunction *)
GetProcAddress(erlexec_handle,"win_erlexec")) == NULL) {
- error("Could not find entry point \"win_erlexec\" in %s.", erlexec_name);
+ error("Could not find entry point \"win_erlexec\" in %S.", erlexec_name);
}
- return (*win_erlexec)(argc,argv,erlexec_handle,WERL);
+ /* Convert argv to utf8 */
+ utf8argv = malloc((argc+1) * sizeof(char*));
+ for (i=0; i<argc; i++) {
+ len = WideCharToMultiByte(CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL);
+ utf8argv[i] = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, argv[i], -1, utf8argv[i], len, NULL, NULL);
+ }
+ utf8argv[argc] = NULL;
+
+#ifdef HARDDEBUG
+ {
+ wchar_t tempbuf[2048] = L"";
+ wchar_t *sbuf;
+ int i;
+ sbuf=tempbuf;
+ sbuf += swprintf(sbuf, 2048, L"utf16: %d\n", argc);
+ for (i = 0; i < argc; ++i) {
+ sbuf += swprintf(sbuf, 2048, L"|%s|", argv[i]);
+ };
+ sbuf += swprintf(sbuf, 2048, L"\nutf8: \n");
+ for (i = 0; i < argc; ++i) {
+ sbuf += swprintf(sbuf, 2048, L"|%S|", utf8argv[i]);
+ };
+ MessageBoxW(NULL, tempbuf, L"erl_exec args", MB_OK|MB_ICONERROR);
+ }
+#endif
+
+ return (*win_erlexec)(argc,utf8argv,erlexec_handle,WERL);
}
-static char *replace_filename(char *path, char *new_base)
+static wchar_t *replace_filename(wchar_t *path, wchar_t *new_base)
{
- int plen = strlen(path);
- char *res = malloc((plen+strlen(new_base)+1)*sizeof(char));
- char *p;
+ int plen = wcslen(path);
+ wchar_t *res = malloc((plen+wcslen(new_base)+1)*sizeof(wchar_t));
+ wchar_t *p;
- strcpy(res,path);
- for (p = res+plen-1 ;p >= res && *p != '\\'; --p)
+ wcscpy(res,path);
+ for (p = res+plen-1 ;p >= res && *p != L'\\'; --p)
;
- *(p+1) ='\0';
- strcat(res,new_base);
+ *(p+1) =L'\0';
+ wcscat(res,new_base);
return res;
}
static char *do_lookup_in_section(InitSection *inis, char *name,
- char *section, char *filename)
+ char *section, wchar_t *filename)
{
char *p = lookup_init_entry(inis, name);
if (p == NULL) {
- error("Could not find key %s in section %s of file %s",
+ error("Could not find key %s in section %s of file %S",
name,section,filename);
}
- return _strdup(p);
+ return p;
}
-static void copy_latest_vsn(char *latest_vsn, char *next_vsn)
+static void copy_latest_vsn(wchar_t *latest_vsn, wchar_t *next_vsn)
{
/* Copy */
- char *lp;
- char *np;
+ wchar_t *lp;
+ wchar_t *np;
/* Find vsn */
- for (lp = next_vsn+strlen(next_vsn)-1 ;lp >= next_vsn && *lp != '\\'; --lp)
+ for (lp = next_vsn+wcslen(next_vsn)-1 ;lp >= next_vsn && *lp != L'\\'; --lp)
;
/* lp =+ length("erts-"); */
- for (np = next_vsn+strlen(next_vsn)-1 ;np >= next_vsn && *np != '\\'; --np)
+ for (np = next_vsn+wcslen(next_vsn)-1 ;np >= next_vsn && *np != L'\\'; --np)
;
/* np =+ length("erts-"); */
@@ -124,95 +154,95 @@ static void copy_latest_vsn(char *latest_vsn, char *next_vsn)
if (*lp == *np) {
continue;
}
- if (*np == '.' || *np == '\0' || *np <= *lp) {
+ if (*np == L'.' || *np == L'\0' || *np <= *lp) {
/* */
return;
}
- if (*lp == '.' || *lp == '\0') {
- strcpy(latest_vsn, next_vsn);
+ if (*lp == L'.' || *lp == L'\0') {
+ wcscpy(latest_vsn, next_vsn);
return;
}
}
return;
}
-static char *find_erlexec_dir2(char *install_dir)
+static wchar_t *find_erlexec_dir2(wchar_t *install_dir)
{
/* List install dir and look for latest erts-vsn */
HANDLE dir_handle; /* Handle to directory. */
- char wildcard[MAX_PATH]; /* Wildcard to search for. */
- WIN32_FIND_DATA find_data; /* Data found by FindFirstFile() or FindNext(). */
- char latest_vsn[MAX_PATH];
+ wchar_t wildcard[MAX_PATH]; /* Wildcard to search for. */
+ WIN32_FIND_DATAW find_data; /* Data found by FindFirstFile() or FindNext(). */
+ wchar_t latest_vsn[MAX_PATH];
/* Setup wildcard */
- int length = strlen(install_dir);
- char *p;
+ int length = wcslen(install_dir);
+ wchar_t *p;
if (length+3 >= MAX_PATH) {
error("Cannot find erlexec.exe");
}
- strcpy(wildcard, install_dir);
+ wcscpy(wildcard, install_dir);
p = wildcard+length-1;
- if (*p != '/' && *p != '\\')
- *++p = '\\';
- strcpy(++p, "erts-*");
+ if (*p != L'/' && *p != L'\\')
+ *++p = L'\\';
+ wcscpy(++p, L"erts-*");
/* Find first dir */
- dir_handle = FindFirstFile(wildcard, &find_data);
+ dir_handle = FindFirstFileW(wildcard, &find_data);
if (dir_handle == INVALID_HANDLE_VALUE) {
/* No erts-vsn found*/
return NULL;
}
- strcpy(latest_vsn, find_data.cFileName);
+ wcscpy(latest_vsn, find_data.cFileName);
/* Find the rest */
- while(FindNextFile(dir_handle, &find_data)) {
+ while(FindNextFileW(dir_handle, &find_data)) {
copy_latest_vsn(latest_vsn, find_data.cFileName);
}
FindClose(dir_handle);
- p = malloc((strlen(install_dir)+1+strlen(latest_vsn)+4+1)*sizeof(char));
+ p = (wchar_t *) malloc((wcslen(install_dir)+1+wcslen(latest_vsn)+4+1)*sizeof(wchar_t));
- strcpy(p,install_dir);
- strcat(p,"\\");
- strcat(p,latest_vsn);
- strcat(p,"\\bin");
+ wcscpy(p,install_dir);
+ wcscat(p,L"\\");
+ wcscat(p,latest_vsn);
+ wcscat(p,L"\\bin");
return p;
}
-static char *find_erlexec_dir(char *erlpath)
+static wchar_t *find_erlexec_dir(wchar_t *erlpath)
{
/* Assume that the path to erl is absolute and
* that it is not a symbolic link*/
- char *dir =_strdup(erlpath);
- char *p;
- char *p2;
+ wchar_t *dir =_wcsdup(erlpath);
+ wchar_t *p;
+ wchar_t *p2;
/* Chop of base name*/
- for (p = dir+strlen(dir)-1 ;p >= dir && *p != '\\'; --p)
+ for (p = dir+wcslen(dir)-1 ;p >= dir && *p != L'\\'; --p)
;
- *p ='\0';
+ *p =L'\0';
p--;
/* Check if dir path is like ...\install_dir\erts-vsn\bin */
- for (;p >= dir && *p != '\\'; --p)
+ for (;p >= dir && *p != L'\\'; --p)
;
p--;
for (p2 = p;p2 >= dir && *p2 != '\\'; --p2)
;
p2++;
- if (strncmp(p2, "erts-", strlen("erts-")) == 0) {
- p = _strdup(dir);
+ if (wcsncmp(p2, L"erts-", wcslen(L"erts-")) == 0) {
+ p = _wcsdup(dir);
free(dir);
return p;
}
/* Assume that dir path is like ...\install_dir\bin */
- *++p ='\0'; /* chop off bin dir */
+ *++p =L'\0'; /* chop off bin dir */
p = find_erlexec_dir2(dir);
free(dir);
@@ -225,18 +255,20 @@ static char *find_erlexec_dir(char *erlpath)
static void get_parameters(void)
{
- char buffer[MAX_PATH];
- char *ini_filename;
+ wchar_t buffer[MAX_PATH];
+ wchar_t *ini_filename;
HANDLE module = GetModuleHandle(NULL);
InitFile *inif;
InitSection *inis;
- char *bindir;
+ char *utf8dir;
+ int len;
+
- if (module = NULL) {
+ if (module == NULL) {
error("Cannot GetModuleHandle()");
}
- if (GetModuleFileName(module,buffer,MAX_PATH) == 0) {
+ if (GetModuleFileNameW(module,buffer,MAX_PATH) == 0) {
error("Could not GetModuleFileName");
}
@@ -244,21 +276,28 @@ static void get_parameters(void)
if ((inif = load_init_file(ini_filename)) == NULL) {
erlexec_dir = find_erlexec_dir(ini_filename);
- SetEnvironmentVariable("ERLEXEC_DIR", erlexec_dir);
+ SetEnvironmentVariableW(L"ERLEXEC_DIR", erlexec_dir);
} else {
if ((inis = lookup_init_section(inif,INI_SECTION)) == NULL) {
- error("Could not find section %s in init file %s",
+ error("Could not find section %s in init file %S",
INI_SECTION, ini_filename);
}
- erlexec_dir = do_lookup_in_section(inis, "Bindir", INI_SECTION, ini_filename);
- free_init_file(inif);
+ utf8dir = do_lookup_in_section(inis, "Bindir", INI_SECTION, ini_filename);
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8dir, -1, NULL, 0);
+ erlexec_dir = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8dir, -1, erlexec_dir, len);
+ if(len == 0) {
+ error("Bindir is not a valid utf8 '%s' in init file %S",
+ utf8dir, ini_filename);
+ }
+ free_init_file(inif);
}
- erlexec_name = malloc(strlen(erlexec_dir) + strlen(ERLEXEC_BASENAME) + 2);
- strcpy(erlexec_name,erlexec_dir);
- strcat(erlexec_name, "\\" ERLEXEC_BASENAME);
+ erlexec_name = malloc((wcslen(erlexec_dir) + wcslen(ERLEXEC_BASENAME) + 2)*sizeof(wchar_t));
+ wcscpy(erlexec_name,erlexec_dir);
+ wcscat(erlexec_name, L"\\" ERLEXEC_BASENAME);
free(ini_filename);
}
diff --git a/erts/etc/win32/erlang.ico b/erts/etc/win32/erlang.ico
index cee8b58af9..7b62d31aa9 100644
--- a/erts/etc/win32/erlang.ico
+++ b/erts/etc/win32/erlang.ico
Binary files differ
diff --git a/erts/etc/win32/erlsrv/erlsrv_global.h b/erts/etc/win32/erlsrv/erlsrv_global.h
index d3922dc1e3..f25e09ea45 100644
--- a/erts/etc/win32/erlsrv/erlsrv_global.h
+++ b/erts/etc/win32/erlsrv/erlsrv_global.h
@@ -19,13 +19,13 @@
#ifndef _ERLSRV_GLOBAL_H
#define _ERLSRV_GLOBAL_H
-#define APP_NAME "ErlSrv"
+#define APP_NAME L"ErlSrv"
-#define ERLANG_MACHINE "erl.exe"
+#define ERLANG_MACHINE L"erl.exe"
-#define SERVICE_ENV "ERLSRV_SERVICE_NAME"
-#define EXECUTABLE_ENV "ERLSRV_EXECUTABLE"
-#define DEBUG_ENV "ERLSRV_DEBUG"
+#define SERVICE_ENV L"ERLSRV_SERVICE_NAME"
+#define EXECUTABLE_ENV L"ERLSRV_EXECUTABLE"
+#define DEBUG_ENV L"ERLSRV_DEBUG"
#ifdef _DEBUG
#define HARDDEBUG 1
diff --git a/erts/etc/win32/erlsrv/erlsrv_interactive.c b/erts/etc/win32/erlsrv/erlsrv_interactive.c
index e8d73ae047..260f0d9b97 100644
--- a/erts/etc/win32/erlsrv/erlsrv_interactive.c
+++ b/erts/etc/win32/erlsrv/erlsrv_interactive.c
@@ -27,54 +27,60 @@
#include "erlsrv_interactive.h"
#include "erlsrv_util.h" /* service_name */
-#define DBG fprintf(stderr,"argv[0]:%s line %d\n",argv[0],__LINE__)
+#define DBG fwprintf(stderr,L"argv[0]:%s line %d\n",argv[0],__LINE__)
+/* #define HARDDEBUG 1 */
+
+#include <fcntl.h>
/* Really HAS to correcpond to the enum in erlsrv_registry.h */
-static char *arg_tab[] = {
- "stopaction", "st",
- "onfail", "on",
- "machine", "m",
- "env", "e",
- "workdir", "w",
- "priority", "p",
- "sname", "sn",
- "name", "n",
- "args", "ar",
- "debugtype", "d",
- "internalservicename","i",
- "comment","c",
+static wchar_t *arg_tab[] = {
+ L"stopaction", L"st",
+ L"onfail", L"on",
+ L"machine", L"m",
+ L"env", L"e",
+ L"workdir", L"w",
+ L"priority", L"p",
+ L"sname", L"sn",
+ L"name", L"n",
+ L"args", L"ar",
+ L"debugtype", L"d",
+ L"internalservicename",L"i",
+ L"comment",L"c",
NULL, NULL
};
-static char *generate_real_service_name(char *display_name){
+static wchar_t *generate_real_service_name(wchar_t *display_name){
SYSTEMTIME systime;
FILETIME ftime;
- char *buff = malloc(strlen(display_name)+
- (8*2)+1);
- char *tmp = _strdup(display_name);
+ int len=(wcslen(display_name)+(8*2)+1);
+ wchar_t *buff;
+ wchar_t *tmp = _wcsdup(display_name);
int i;
+ buff = (wchar_t*) malloc(len*sizeof(wchar_t));
+
/* 2 Hex chars for each byte in a DWORD */
GetSystemTime(&systime);
SystemTimeToFileTime(&systime,&ftime);
/* Remove trailing version info to avoid user confusion */
- for(i = (strlen(tmp)-1);i > 0; --i)
- if(tmp[i] == '_'){
- tmp[i] = '\0';
+ for(i = (wcslen(tmp)-1);i > 0; --i)
+ if(tmp[i] == L'_'){
+ tmp[i] = L'\0';
break;
}
- sprintf(buff,"%s%08x%08x",tmp,ftime.dwHighDateTime,
- ftime.dwLowDateTime);
+ swprintf(buff,len,L"%s%08x%08x",tmp,
+ ftime.dwHighDateTime,
+ ftime.dwLowDateTime);
free(tmp);
return buff;
}
-static int lookup_arg(char *arg){
+static int lookup_arg(wchar_t *arg){
int i;
- if(*arg != '-' && *arg != '/')
+ if(*arg != L'-' && *arg != L'/')
return -1;
for(i=0; arg_tab[i] != NULL; i += 2){
- if(!_strnicmp(arg_tab[i],arg+1,strlen(arg+1)) &&
- !_strnicmp(arg_tab[i+1],arg+1,strlen(arg_tab[i+1])))
+ if(!_wcsnicmp(arg_tab[i],arg+1,wcslen(arg+1)) &&
+ !_wcsnicmp(arg_tab[i+1],arg+1,wcslen(arg_tab[i+1])))
return (i / 2);
}
return -1;
@@ -82,29 +88,29 @@ static int lookup_arg(char *arg){
-char *edit_env(char *edit, char *oldenv){
- char **arg;
- char *value;
- char *name = strdup(edit);
+wchar_t *edit_env(wchar_t *edit, wchar_t *oldenv){
+ wchar_t **arg;
+ wchar_t *value;
+ wchar_t *name = wcsdup(edit);
int i;
- char *tmp;
+ wchar_t *tmp;
arg = env_to_arg(oldenv);
- value = strchr(name,'=');
+ value = wcschr(name,L'=');
if(value){
- *(value++) = '\0';
- if(*value == '\0')
+ *(value++) = L'\0';
+ if(*value == L'\0')
value = NULL;
}
for(i=0;arg[i] != NULL; ++i){
- tmp = strchr(arg[i],'=');
- if(((int) strlen(name)) == (tmp - arg[i]) &&
- !_strnicmp(name,arg[i], tmp - arg[i]))
+ tmp = wcschr(arg[i],L'=');
+ if(((int) wcslen(name)) == (tmp - arg[i]) &&
+ !_wcsnicmp(name,arg[i], tmp - arg[i]))
break;
}
if(arg[i] != NULL){
free(arg[i]);
if(value){
- arg[i] = strdup(edit);
+ arg[i] = wcsdup(edit);
} else {
do {
arg[i] = arg[i+1];
@@ -113,7 +119,7 @@ char *edit_env(char *edit, char *oldenv){
}
} else if(value){ /* add to arg, which is always allocated
to hold one extra environment variable*/
- arg[i] = strdup(edit);
+ arg[i] = wcsdup(edit);
arg[i+1] = NULL;
}
free(name);
@@ -132,8 +138,8 @@ void print_last_error(void){
(LPTSTR) &mes,
0,
NULL );
- fprintf(stderr,"Error: %s",mes);
- LocalFree(mes);
+ fwprintf(stderr,L"Error: %S",mes);
+ LocalFree(mes);
}
static int get_last_error(void)
@@ -144,19 +150,19 @@ static int get_last_error(void)
static BOOL install_service(void){
SC_HANDLE scm;
SC_HANDLE service;
- char filename[MAX_PATH + 3];
+ wchar_t filename[MAX_PATH + 3];
DWORD fnsiz=MAX_PATH;
- char dependant[] = { 'L','a','n','m','a','n',
- 'W','o','r','k','s','t',
- 'a','t','i','o','n','\0','\0'};
+ wchar_t dependant[] = { L'L',L'a',L'n',L'm',L'a',L'n',
+ L'W',L'o',L'r',L'k',L's',L't',
+ L'a',L't',L'i',L'o',L'n',L'\0',L'\0'};
- if(!(fnsiz = GetModuleFileName(NULL, filename, fnsiz)))
+ if(!(fnsiz = GetModuleFileNameW(NULL, filename, fnsiz)))
return FALSE;
- if(strchr(filename,' ')){
- memmove(filename+1,filename,fnsiz);
- filename[0] ='\"'; /* " */
- filename[fnsiz+1] = '\"'; /* " */
- filename[fnsiz+2] = '\0';
+ if(wcschr(filename,L' ')){
+ memmove(filename+1,filename,fnsiz*sizeof(wchar_t));
+ filename[0] = L'\"'; /* " */
+ filename[fnsiz+1] = L'\"'; /* " */
+ filename[fnsiz+2] = L'\0';
}
if((scm = OpenSCManager(NULL,
NULL,
@@ -166,20 +172,20 @@ static BOOL install_service(void){
last_error = GetLastError();
return FALSE;
}
- service = CreateService(scm,
- real_service_name,
- service_name,
- SERVICE_ALL_ACCESS &
- ~(SERVICE_PAUSE_CONTINUE),
- SERVICE_WIN32_OWN_PROCESS,
- SERVICE_AUTO_START,
- SERVICE_ERROR_NORMAL,
- filename,
- NULL,
- NULL,
- dependant,
- NULL,
- NULL);
+ service = CreateServiceW(scm,
+ real_service_name,
+ service_name,
+ SERVICE_ALL_ACCESS &
+ ~(SERVICE_PAUSE_CONTINUE),
+ SERVICE_WIN32_OWN_PROCESS,
+ SERVICE_AUTO_START,
+ SERVICE_ERROR_NORMAL,
+ filename,
+ NULL,
+ NULL,
+ dependant,
+ NULL,
+ NULL);
if(service == NULL){
CloseServiceHandle(scm);
last_error = GetLastError();
@@ -198,9 +204,9 @@ static BOOL remove_service(void){
GENERIC_WRITE))
== NULL)
return FALSE;
- service = OpenService(scm,
- real_service_name,
- SERVICE_ALL_ACCESS);
+ service = OpenServiceW(scm,
+ real_service_name,
+ SERVICE_ALL_ACCESS);
if(service == NULL){
CloseServiceHandle(scm);
return FALSE;
@@ -220,9 +226,9 @@ static BOOL open_service_control(SC_HANDLE *scm, SC_HANDLE *service){
SC_MANAGER_ALL_ACCESS))
== NULL)
return FALSE;
- *service = OpenService(*scm,
- real_service_name,
- SERVICE_ALL_ACCESS);
+ *service = OpenServiceW(*scm,
+ real_service_name,
+ SERVICE_ALL_ACCESS);
if(service == NULL){
CloseServiceHandle(*scm);
return FALSE;
@@ -239,10 +245,10 @@ static BOOL open_service_config(SC_HANDLE *scm, SC_HANDLE *service){
last_error = GetLastError();
return FALSE;
}
- *service = OpenService(*scm,
- real_service_name,
- /*GENERIC_WRITE*/
- SERVICE_ALL_ACCESS);
+ *service = OpenServiceW(*scm,
+ real_service_name,
+ /*GENERIC_WRITE*/
+ SERVICE_ALL_ACCESS);
if(service == NULL){
last_error = GetLastError();
CloseServiceHandle(*scm);
@@ -251,16 +257,16 @@ static BOOL open_service_config(SC_HANDLE *scm, SC_HANDLE *service){
return TRUE;
}
-static BOOL set_service_comment(char *comment) {
+static BOOL set_service_comment(wchar_t *comment) {
SC_HANDLE scm;
SC_HANDLE service;
- SERVICE_DESCRIPTION sd;
+ SERVICE_DESCRIPTIONW sd;
BOOL ret = TRUE;
sd.lpDescription = comment;
if (!open_service_config(&scm,&service)) {
return FALSE;
}
- if (!ChangeServiceConfig2(service,SERVICE_CONFIG_DESCRIPTION,&sd)) {
+ if (!ChangeServiceConfig2W(service,SERVICE_CONFIG_DESCRIPTION,&sd)) {
last_error = GetLastError();
ret = FALSE;
}
@@ -325,7 +331,7 @@ static BOOL stop_service(void){
if(!open_service_control(&scm,&service)){
#ifdef HARDDEBUG
- fprintf(stderr,"Failed to open service.\n");
+ fwprintf(stderr,L"Failed to open service.\n");
#endif
return FALSE;
}
@@ -338,7 +344,7 @@ static BOOL stop_service(void){
#ifdef HARDDEBUG
if(!ret)
{
- fprintf(stderr,"Failed to control service.\n");
+ fwprintf(stderr,L"Failed to control service.\n");
print_last_error();
}
#endif
@@ -466,115 +472,114 @@ void cleanup_old(){
}
BOOL fill_in_defaults(RegEntry *new){
- char filename[MAX_PATH];
- char *ptr;
+ wchar_t filename[MAX_PATH];
+ wchar_t *ptr;
- if(!GetModuleFileName(NULL, filename, MAX_PATH))
+ if(!GetModuleFileNameW(NULL, filename, MAX_PATH))
return FALSE;
- for(ptr = filename + strlen(filename) - 1;
- ptr > filename && *ptr != '\\';
+ for(ptr = filename + wcslen(filename) - 1;
+ ptr > filename && *ptr != L'\\';
--ptr)
;
- if(*ptr == '\\')
+ if(*ptr == L'\\')
++ptr;
- *ptr = '\0';
+ *ptr = L'\0';
- ptr = malloc(strlen(filename)+strlen(ERLANG_MACHINE)+1);
- strcpy(ptr,filename);
- strcat(ptr,ERLANG_MACHINE);
+ ptr = (wchar_t*) malloc((wcslen(filename)+wcslen(ERLANG_MACHINE)+1)*sizeof(wchar_t));
+ wcscpy(ptr,filename);
+ wcscat(ptr,ERLANG_MACHINE);
- new[StopAction].data.bytes = "";
+ new[StopAction].data.string = L"";
new[OnFail].data.value = ON_FAIL_IGNORE;
- new[Machine].data.bytes = ptr;
- new[Machine].data.expand.unexpanded = ptr;
- new[Env].data.bytes = "\0";
- new[WorkDir].data.bytes = new[WorkDir].data.expand.unexpanded =
- "";
+ new[Machine].data.string = ptr;
+ new[Machine].data.expand.unexpanded = ptr;
+ new[Env].data.string = L"\0";
+ new[WorkDir].data.string = new[WorkDir].data.expand.unexpanded = L"";
new[Priority].data.value = NORMAL_PRIORITY_CLASS;
- new[SName].data.bytes = service_name;
- new[Name].data.bytes = "";
- new[Args].data.bytes = new[Args].data.expand.unexpanded = "";
+ new[SName].data.string = service_name;
+ new[Name].data.string = L"";
+ new[Args].data.string = new[Args].data.expand.unexpanded = L"";
new[DebugType].data.value = DEBUG_TYPE_NO_DEBUG;
- new[InternalServiceName].data.bytes = real_service_name;
- new[Comment].data.bytes = "";
+ new[InternalServiceName].data.string = real_service_name;
+ new[Comment].data.string = L"";
return TRUE;
}
-int do_usage(char *arg0){
- printf("Usage:\n");
- printf("%s {set | add} <servicename>\n"
- "\t[-st[opaction] [<erlang shell command>]]\n"
- "\t[-on[fail] [{reboot | restart | restart_always}]]\n"
- "\t[-m[achine] [<erl-command>]]\n"
- "\t[-e[nv] [<variable>[=<value>]]]\n"
- "\t[-w[orkdir] [<directory>]]\n"
- "\t[-p[riority] [{low|high|realtime}]]\n"
- "\t[{-sn[ame] | -n[ame]} [<nodename>]]\n"
- "\t[-d[ebugtype] [{new|reuse|console}]]\n"
- "\t[-ar[gs] [<limited erl arguments>]]\n\n"
- "%s {start | start_disabled | stop | disable | enable} <servicename>\n\n"
- "%s remove <servicename>\n\n"
- "%s rename <servicename> <servicename>\n\n"
- "%s list [<servicename>]\n\n"
- "%s help\n\n",
+int do_usage(wchar_t *arg0){
+ wprintf(L"Usage:\n");
+ wprintf(L"%s {set | add} <servicename>\n"
+ L"\t[-st[opaction] [<erlang shell command>]]\n"
+ L"\t[-on[fail] [{reboot | restart | restart_always}]]\n"
+ L"\t[-m[achine] [<erl-command>]]\n"
+ L"\t[-e[nv] [<variable>[=<value>]]]\n"
+ L"\t[-w[orkdir] [<directory>]]\n"
+ L"\t[-p[riority] [{low|high|realtime}]]\n"
+ L"\t[{-sn[ame] | -n[ame]} [<nodename>]]\n"
+ L"\t[-d[ebugtype] [{new|reuse|console}]]\n"
+ L"\t[-ar[gs] [<limited erl arguments>]]\n\n"
+ L"%s {start | start_disabled | stop | disable | enable} <servicename>\n\n"
+ L"%s remove <servicename>\n\n"
+ L"%s rename <servicename> <servicename>\n\n"
+ L"%s list [<servicename>]\n\n"
+ L"%s help\n\n",
arg0,arg0,arg0,arg0,arg0,arg0);
- printf("Manipulates Erlang system services on Windows NT.\n\n");
- printf("When no parameter to an option is specified, the option\n"
- "is reset to it's default value. To set an empty argument\n"
- "list, give option -args as last option on command line "
- "with\n"
- "no arguments.\n\n");
- printf("See Erlang documentation for full description.\n");
+ wprintf(L"Manipulates Erlang system services on Windows NT.\n\n");
+ wprintf(L"When no parameter to an option is specified, the option\n"
+ L"is reset to it's default value. To set an empty argument\n"
+ L"list, give option -args as last option on command line "
+ L"with\n"
+ L"no arguments.\n\n");
+ wprintf(L"See Erlang documentation for full description.\n");
return 0;
}
-int do_manage(int argc,char **argv){
- char *action = argv[1];
+int do_manage(int argc, wchar_t **argv){
+ wchar_t *action = argv[1];
RegEntry *current = empty_reg_tab();
if(argc < 3){
- fprintf(stderr,"%s: No servicename given!\n",argv[0]);
+ fwprintf(stderr,L"%s: No servicename given!\n",argv[0]);
do_usage(argv[0]);
return 1;
}
service_name = argv[2];
if(!fetch_current(current)){
- fprintf(stderr,"%s: The service %s is not an erlsrv controlled service.\n",
+ fwprintf(stderr,L"%s: The service %s is not an erlsrv controlled service.\n",
argv[0],service_name);
return 1;
}
- real_service_name = _strdup(current[InternalServiceName].data.bytes);
+ real_service_name = _wcsdup(current[InternalServiceName].data.string);
free_keys(current);
- if(!_stricmp(action,"start")){
+ if(!_wcsicmp(action,L"start")){
if(!start_service()){
- fprintf(stderr,"%s: Failed to start service %s.\n",
+ fwprintf(stderr,L"%s: Failed to start service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
} else {
if(!wait_service_trans(SERVICE_STOPPED, SERVICE_START_PENDING,
SERVICE_RUNNING, 60)){
- fprintf(stderr,"%s: Failed to start service %s.\n",
+ fwprintf(stderr,L"%s: Failed to start service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
}
- printf("%s: Service %s started.\n",
+ wprintf(L"%s: Service %s started.\n",
argv[0],service_name);
return 0;
}
}
- if(!_stricmp(action,"start_disabled")){
+ if(!_wcsicmp(action,L"start_disabled")){
if(!enable_service()){
- fprintf(stderr,"%s: Failed to enable service %s.\n",
+ fwprintf(stderr,L"%s: Failed to enable service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
}
if(!start_service() && get_last_error() != ERROR_SERVICE_ALREADY_RUNNING){
- fprintf(stderr,"%s: Failed to start service %s.\n",
+ fwprintf(stderr,L"%s: Failed to start service %s.\n",
argv[0],service_name);
print_last_error();
goto failure_starting;
@@ -582,84 +587,84 @@ int do_manage(int argc,char **argv){
if(!wait_service_trans(SERVICE_STOPPED, SERVICE_START_PENDING,
SERVICE_RUNNING, 60)){
- fprintf(stderr,"%s: Failed to start service %s.\n",
+ fwprintf(stderr,L"%s: Failed to start service %s.\n",
argv[0],service_name);
print_last_error();
goto failure_starting;
}
if(!disable_service()){
- fprintf(stderr,"%s: Failed to disable service %s.\n",
+ fwprintf(stderr,L"%s: Failed to disable service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
}
- printf("%s: Service %s started.\n",
+ wprintf(L"%s: Service %s started.\n",
argv[0],service_name);
return 0;
failure_starting:
if(!disable_service()){
- fprintf(stderr,"%s: Failed to disable service %s.\n",
+ fwprintf(stderr,L"%s: Failed to disable service %s.\n",
argv[0],service_name);
print_last_error();
}
return 1;
}
- if(!_stricmp(action,"stop")){
+ if(!_wcsicmp(action,L"stop")){
if(!stop_service()){
- fprintf(stderr,"%s: Failed to stop service %s.\n",
+ fwprintf(stderr,L"%s: Failed to stop service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
} else {
if(!wait_service_trans(SERVICE_RUNNING, SERVICE_STOP_PENDING,
SERVICE_STOPPED, 60)){
- fprintf(stderr,"%s: Failed to stop service %s.\n",
+ fwprintf(stderr,L"%s: Failed to stop service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
}
- printf("%s: Service %s stopped.\n",
+ wprintf(L"%s: Service %s stopped.\n",
argv[0],service_name);
return 0;
}
}
- if(!_stricmp(action,"disable")){
+ if(!_wcsicmp(action,L"disable")){
#if 0
if(stop_service()){
- printf("%s: Service %s stopped.\n",
+ wprintf(L"%s: Service %s stopped.\n",
argv[0],service_name);
}
#endif
if(!disable_service()){
- fprintf(stderr,"%s: Failed to disable service %s.\n",
+ fwprintf(stderr,L"%s: Failed to disable service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
} else {
- printf("%s: Service %s disabled.\n",
+ wprintf(L"%s: Service %s disabled.\n",
argv[0],service_name);
return 0;
}
}
- if(!_stricmp(action,"enable")){
+ if(!_wcsicmp(action,L"enable")){
if(!enable_service()){
- fprintf(stderr,"%s: Failed to enable service %s.\n",
+ fwprintf(stderr,L"%s: Failed to enable service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
} else {
- printf("%s: Service %s enabled.\n",
+ wprintf(L"%s: Service %s enabled.\n",
argv[0],service_name);
return 0;
}
}
- fprintf(stderr,"%s: Unrecignized argument %s.\n",
+ fwprintf(stderr,L"%s: Unrecignized argument %s.\n",
argv[0],action);
return 1;
}
-int do_add_or_set(int argc, char **argv){
+int do_add_or_set(int argc, wchar_t **argv){
RegEntry *new_entries;
RegEntry *default_entries;
int add = 0;
@@ -669,40 +674,40 @@ int do_add_or_set(int argc, char **argv){
new_entries = empty_reg_tab();
default_entries = empty_reg_tab();
if(argc < 3){
- fprintf(stderr,"%s: No servicename given!\n",argv[0]);
+ fwprintf(stderr,L"%s: No servicename given!\n",argv[0]);
do_usage(argv[0]);
return 1;
}
service_name = argv[2];
- if(!_stricmp(argv[1],"add")){
+ if(!_wcsicmp(argv[1],L"add")){
if(fetch_current(default_entries)){
- fprintf(stderr,"%s: A service with the name %s already "
- "exists.\n",
+ fwprintf(stderr,L"%s: A service with the name %s already "
+ L"exists.\n",
argv[0],service_name);
return 1;
}
real_service_name = generate_real_service_name(service_name);
if(!fill_in_defaults(new_entries)){
- fprintf(stderr,"%s: Internal error.\n", argv[0]);
+ fwprintf(stderr,L"%s: Internal error.\n", argv[0]);
return 1;
}
add = 1;
} else {
if(!fetch_current(new_entries)){
- fprintf(stderr,"%s: No service with the name %s exists.\n",
+ fwprintf(stderr,L"%s: No service with the name %s exists.\n",
argv[0], service_name);
return 1;
}
- real_service_name = new_entries[InternalServiceName].data.bytes;
+ real_service_name = new_entries[InternalServiceName].data.string;
}
if(!fill_in_defaults(default_entries)){
- fprintf(stderr,"%s: Internal error.\n", argv[0]);
+ fwprintf(stderr,L"%s: Internal error.\n", argv[0]);
return 1;
}
/* make sure env is malloced... */
- new_entries[Env].data.bytes = envdup(new_entries[Env].data.bytes);
+ new_entries[Env].data.string = envdup(new_entries[Env].data.string);
for(i = 3; i < argc; ++i){
switch((current = lookup_arg(argv[i]))){
@@ -712,43 +717,43 @@ int do_add_or_set(int argc, char **argv){
case WorkDir:
case Args:
if(i+1 >= argc){
- new_entries[current].data.bytes =
- default_entries[current].data.bytes;
+ new_entries[current].data.string =
+ default_entries[current].data.string;
new_entries[current].data.expand.unexpanded =
default_entries[current].data.expand.unexpanded;
} else {
new_entries[current].data.expand.unexpanded =
- new_entries[current].data.bytes = argv[i+1];
+ new_entries[current].data.string = argv[i+1];
++i;
}
break;
case SName:
- new_entries[Name].data.bytes = "";
+ new_entries[Name].data.string = L"";
case StopAction:
case Name:
if(i+1 >= argc ||
- *argv[i+1] == '-' || *argv[i+1] == '/'){
- new_entries[current].data.bytes =
- default_entries[current].data.bytes;
+ *argv[i+1] == L'-' || *argv[i+1] == L'/'){
+ new_entries[current].data.string =
+ default_entries[current].data.string;
} else {
- new_entries[current].data.bytes = argv[i+1];
+ new_entries[current].data.string = argv[i+1];
++i;
}
break;
case OnFail:
if(i+1 >= argc ||
- *argv[i+1] == '-' || *argv[i+1] == '/'){
+ *argv[i+1] == L'-' || *argv[i+1] == L'/'){
new_entries[current].data.value =
default_entries[current].data.value;
} else {
- if(!_stricmp(argv[i+1],"reboot"))
+ if(!_wcsicmp(argv[i+1],L"reboot"))
new_entries[current].data.value = ON_FAIL_REBOOT;
- else if(!_stricmp(argv[i+1],"restart"))
+ else if(!_wcsicmp(argv[i+1],L"restart"))
new_entries[current].data.value = ON_FAIL_RESTART;
- else if(!_stricmp(argv[i+1],"restart_always"))
+ else if(!_wcsicmp(argv[i+1],L"restart_always"))
new_entries[current].data.value = ON_FAIL_RESTART_ALWAYS;
else {
- fprintf(stderr,"%s: Unrecognized keyword value %s.\n",
+ fwprintf(stderr,L"%s: Unrecognized keyword value %s.\n",
argv[0],argv[i+1]);
return 1;
}
@@ -757,18 +762,18 @@ int do_add_or_set(int argc, char **argv){
break;
case DebugType:
if(i+1 >= argc ||
- *argv[i+1] == '-' || *argv[i+1] == '/'){
+ *argv[i+1] == L'-' || *argv[i+1] == L'/'){
new_entries[current].data.value =
default_entries[current].data.value;
} else {
- if(!_stricmp(argv[i+1],"new"))
+ if(!_wcsicmp(argv[i+1],L"new"))
new_entries[current].data.value = DEBUG_TYPE_NEW;
- else if(!_stricmp(argv[i+1],"reuse"))
+ else if(!_wcsicmp(argv[i+1],L"reuse"))
new_entries[current].data.value = DEBUG_TYPE_REUSE;
- else if(!_stricmp(argv[i+1],"console"))
+ else if(!_wcsicmp(argv[i+1],L"console"))
new_entries[current].data.value = DEBUG_TYPE_CONSOLE;
else {
- fprintf(stderr,"%s: Unrecognized keyword value %s.\n",
+ fwprintf(stderr,L"%s: Unrecognized keyword value %s.\n",
argv[0],argv[i+1]);
return 1;
}
@@ -777,18 +782,18 @@ int do_add_or_set(int argc, char **argv){
break;
case Priority:
if(i+1 >= argc ||
- *argv[i+1] == '-' || *argv[i+1] == '/'){
+ *argv[i+1] == L'-' || *argv[i+1] == L'/'){
new_entries[current].data.value =
default_entries[current].data.value;
} else {
- if(!_stricmp(argv[i+1],"high"))
+ if(!_wcsicmp(argv[i+1],L"high"))
new_entries[current].data.value = HIGH_PRIORITY_CLASS;
- else if(!_stricmp(argv[i+1],"low"))
+ else if(!_wcsicmp(argv[i+1],L"low"))
new_entries[current].data.value = IDLE_PRIORITY_CLASS;
- else if(!_stricmp(argv[i+1],"realtime"))
+ else if(!_wcsicmp(argv[i+1],L"realtime"))
new_entries[current].data.value = REALTIME_PRIORITY_CLASS;
else {
- fprintf(stderr,"%s: Unrecognized keyword value %s.\n",
+ fwprintf(stderr,L"%s: Unrecognized keyword value %s.\n",
argv[0],argv[i+1]);
return 1;
}
@@ -798,64 +803,64 @@ int do_add_or_set(int argc, char **argv){
case Env:
if(i+1 >= argc ||
- *argv[i+1] == '-' || *argv[i+1] == '/'){
- fprintf(stderr,"%s: %s requires a parameter.\n",
+ *argv[i+1] == L'-' || *argv[i+1] == L'/'){
+ fwprintf(stderr,L"%s: %s requires a parameter.\n",
argv[0],argv[i]);
return 1;
}
- new_entries[current].data.bytes =
- edit_env(argv[i+1],
- new_entries[current].data.bytes);
+ new_entries[current].data.string =
+ edit_env(argv[i+1], new_entries[current].data.string);
++i;
break;
case InternalServiceName:
if (!add) {
- fprintf(stderr,"%s: %s only allowed when adding a new service.\n",
+ fwprintf(stderr,L"%s: %s only allowed when adding a new service.\n",
argv[0],argv[i]);
return 1;
}
if(i+1 >= argc){
- fprintf(stderr,"%s: %s requires a parameter.\n",
+ fwprintf(stderr,L"%s: %s requires a parameter.\n",
argv[0],argv[i]);
return 1;
}
new_entries[InternalServiceName].data.expand.unexpanded =
- new_entries[InternalServiceName].data.bytes = argv[i+1];
+ new_entries[InternalServiceName].data.string = argv[i+1];
++i;
/* Discard old, should maybe be fred' but we'll exit anyway */
- real_service_name = new_entries[InternalServiceName].data.bytes;
+ real_service_name = new_entries[InternalServiceName].data.string;
break;
default:
- fprintf(stderr,"%s: Unrecognized option %s.\n", argv[0],
+ fwprintf(stderr,L"%s: Unrecognized option %s.\n", argv[0],
argv[i]);
return 1;
}
}
- if(*new_entries[SName].data.bytes &&
- *new_entries[Name].data.bytes){
+ if(*new_entries[SName].data.string &&
+ *new_entries[Name].data.string){
#if 0
- fprintf(stderr,"%s: Both -sname and -name specified.\n",
+ fwprintf(stderr,L"%s: Both -sname and -name specified.\n",
argv[0]);
return 1;
#else
- new_entries[SName].data.bytes = "";
+ new_entries[SName].data.string = L"";
#endif
}
- if(add && !(*new_entries[SName].data.bytes) &&
- !(*new_entries[Name].data.bytes)){
- fprintf(stderr,"%s: Neither -sname nor -name specified.\n",
+ if(add && !(*new_entries[SName].data.string) &&
+ !(*new_entries[Name].data.string)){
+ fwprintf(stderr,L"%s: Neither -sname nor -name specified.\n",
argv[0]);
return 1;
}
+
if(add && !install_service()){
- fprintf(stderr,"%s: Unable to register service with service manager.\n",
+ fwprintf(stderr,L"%s: Unable to register %s service with service manager.\n",
argv[0], service_name);
print_last_error();
return 1;
}
if(!set_interactive(new_entries[DebugType].data.value ==
DEBUG_TYPE_CONSOLE)){
- fprintf(stderr,"%s: Warning, could not set correct interactive mode.\n",
+ fwprintf(stderr,L"%s: Warning, could not set correct interactive mode. %s\n",
argv[0], service_name);
print_last_error();
/* Not severe or??? */
@@ -865,9 +870,9 @@ int do_add_or_set(int argc, char **argv){
set_keys(service_name, new_entries);
/* Update service comment if needed */
if(set_comment) {
- if (!set_service_comment(new_entries[Comment].data.bytes)) {
- fprintf(stderr,"%s: Warning, could not set correct "
- "service description (comment)",
+ if (!set_service_comment(new_entries[Comment].data.string)) {
+ fwprintf(stderr,L"%s: Warning, could not set correct "
+ L"service description (comment) %s",
argv[0], service_name);
print_last_error();
}
@@ -878,64 +883,64 @@ int do_add_or_set(int argc, char **argv){
malloced, but we'll exit anyway, so... */
cleanup_old();
if(add)
- printf("%s: Service %s added to system.\n",
+ wprintf(L"%s: Service %s added to system.\n",
argv[0], service_name);
else
- printf("%s: Service %s updated.\n",
+ wprintf(L"%s: Service %s updated.\n",
argv[0], service_name);
return 0;
}
-int do_rename(int argc, char **argv){
+int do_rename(int argc, wchar_t **argv){
RegEntry *current = empty_reg_tab();
RegEntry *dummy = empty_reg_tab();
SC_HANDLE scm;
SC_HANDLE service;
if(argc < 3){
- fprintf(stderr,"%s: No old servicename given!\n",argv[0]);
+ fwprintf(stderr,L"%s: No old servicename given!\n",argv[0]);
do_usage(argv[0]);
return 1;
}
if(argc < 4){
- fprintf(stderr,"%s: No new servicename given!\n",argv[0]);
+ fwprintf(stderr,L"%s: No new servicename given!\n",argv[0]);
do_usage(argv[0]);
return 1;
}
service_name = argv[3];
if(fetch_current(dummy)){
- fprintf(stderr,"%s: A service with the name %s already "
- "exists.\n",
+ fwprintf(stderr,L"%s: A service with the name %s already "
+ L"exists.\n",
argv[0],service_name);
return 1;
}
service_name = argv[2];
if(!fetch_current(current)){
- fprintf(stderr,"%s: Error, old service name %s does not exist.\n",
+ fwprintf(stderr,L"%s: Error, old service name %s does not exist.\n",
argv[0],service_name);
return 1;
}
- real_service_name = _strdup(current[InternalServiceName].data.bytes);
+ real_service_name = _wcsdup(current[InternalServiceName].data.string);
if(!open_service_config(&scm,&service)){
- fprintf(stderr,"%s: Error, unable to communicate with service control"
- " manager.\n",
+ fwprintf(stderr,L"%s: Error, unable to communicate with service control"
+ L" manager.\n",
argv[0]);
print_last_error();
return 1;
}
- if(!ChangeServiceConfig(service,
- SERVICE_NO_CHANGE,
- SERVICE_NO_CHANGE,
- SERVICE_NO_CHANGE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- argv[3])){
- fprintf(stderr,"%s: Error, unable to communicate with service control"
- " manager.\n",
+ if(!ChangeServiceConfigW(service,
+ SERVICE_NO_CHANGE,
+ SERVICE_NO_CHANGE,
+ SERVICE_NO_CHANGE,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ argv[3])){
+ fwprintf(stderr,L"%s: Error, unable to communicate with service control"
+ L" manager.\n",
argv[0]);
print_last_error();
CloseServiceHandle(scm);
@@ -946,154 +951,154 @@ int do_rename(int argc, char **argv){
CloseServiceHandle(service);
if(remove_keys(service_name) != 0)
- fprintf(stderr,"%s: Warning, old service parameter keys could not "
- "be removed, continuing.\n", argv[0]);
+ fwprintf(stderr,L"%s: Warning, old service parameter keys could not "
+ L"be removed, continuing.\n", argv[0]);
/* Update registry */
register_logkeys();
set_keys(argv[3], current);
- printf("%s: Service %s renamed to %s.\n",
+ wprintf(L"%s: Service %s renamed to %s.\n",
argv[0], service_name, argv[3]);
return 0;
}
-int do_remove(int argc, char **argv){
+int do_remove(int argc, wchar_t **argv){
RegEntry *current = empty_reg_tab();
int rem_res;
BOOL found;
if(argc < 3){
- fprintf(stderr,"%s: No servicename given!\n",argv[0]);
+ fwprintf(stderr,L"%s: No servicename given!\n",argv[0]);
do_usage(argv[0]);
return 1;
}
service_name = argv[2];
found = fetch_current(current);
if(found){
- real_service_name = _strdup(current[InternalServiceName].data.bytes);
+ real_service_name = _wcsdup(current[InternalServiceName].data.string);
} else {
- real_service_name = _strdup(service_name);
+ real_service_name = _wcsdup(service_name);
}
if(found)
free_keys(current);
if(stop_service() && !wait_service_trans(SERVICE_RUNNING,
SERVICE_STOP_PENDING,
SERVICE_STOPPED, 60)){
- fprintf(stderr,"%s: Failed to stop running service %s.\n",
+ fwprintf(stderr,L"%s: Failed to stop running service %s.\n",
argv[0],service_name);
print_last_error();
return 1;
}
if(!remove_service()){
- fprintf(stderr,"%s: Unable to remove service (not enough "
- "privileges?)\n",argv[0]);
+ fwprintf(stderr,L"%s: Unable to remove service (not enough "
+ L"privileges?)\n",argv[0]);
print_last_error();
return 1;
}
if((rem_res = remove_keys(service_name)) > 0){
- fprintf(stderr,"%s: Warning, service parameter keys belonged to old "
- "erlsrv version.\n", argv[0]);
+ fwprintf(stderr,L"%s: Warning, service parameter keys belonged to old "
+ L"erlsrv version.\n", argv[0]);
/* Backward compatibility... */
} else if(rem_res < 0) {
- fprintf(stderr,"%s: Error, service parameter keys nonexistent.\n",
+ fwprintf(stderr,L"%s: Error, service parameter keys nonexistent.\n",
argv[0]);
return 1;
}
- printf("%s: Service %s removed from system.\n",
+ wprintf(L"%s: Service %s removed from system.\n",
argv[0], service_name);
return 0;
}
-BOOL list_one(char *servicename, RegEntry *keys, BOOL longlist){
- char *onfail;
- char *prio;
- char *debugtype;
+BOOL list_one(wchar_t *servicename, RegEntry *keys, BOOL longlist){
+ wchar_t *onfail;
+ wchar_t *prio;
+ wchar_t *debugtype;
switch(keys[OnFail].data.value){
case ON_FAIL_RESTART:
- onfail = "restart";
+ onfail = L"restart";
break;
case ON_FAIL_RESTART_ALWAYS:
- onfail = "restart_always";
+ onfail = L"restart_always";
break;
case ON_FAIL_REBOOT:
- onfail = "reboot";
+ onfail = L"reboot";
break;
default:
- onfail = "ignore";
+ onfail = L"ignore";
}
switch(keys[DebugType].data.value){
case DEBUG_TYPE_NEW:
- debugtype = "new";
+ debugtype = L"new";
break;
case DEBUG_TYPE_REUSE:
- debugtype = "reuse";
+ debugtype = L"reuse";
break;
case DEBUG_TYPE_CONSOLE:
- debugtype = "console";
+ debugtype = L"console";
break;
default:
- debugtype = "none";
+ debugtype = L"none";
}
switch(keys[Priority].data.value){
case HIGH_PRIORITY_CLASS:
- prio = "high";
+ prio = L"high";
break;
case IDLE_PRIORITY_CLASS:
- prio = "low";
+ prio = L"low";
break;
case REALTIME_PRIORITY_CLASS:
- prio = "realtime";
+ prio = L"realtime";
break;
case NORMAL_PRIORITY_CLASS:
- prio = "default";
+ prio = L"default";
break;
default:
- prio = "unknown/faulty";
+ prio = L"unknown/faulty";
}
if(longlist){
- char *env = envdup(keys[Env].data.bytes);
- char **arg = env_to_arg(env);
- char **pek = arg;
- printf("Service name: %s\n",
+ wchar_t *env = envdup(keys[Env].data.string);
+ wchar_t **arg = env_to_arg(env);
+ wchar_t **pek = arg;
+ wprintf(L"Service name: %s\n",
servicename);
- printf("StopAction: %s\n",
- keys[StopAction].data.bytes);
- printf("OnFail: %s\n",onfail);
- printf("Machine: %s\n",
+ wprintf(L"StopAction: %s\n",
+ keys[StopAction].data.string);
+ wprintf(L"OnFail: %s\n",onfail);
+ wprintf(L"Machine: %s\n",
keys[Machine].data.expand.unexpanded);
- printf("WorkDir: %s\n",
+ wprintf(L"WorkDir: %s\n",
keys[WorkDir].data.expand.unexpanded);
- if(*keys[SName].data.bytes)
- printf("SName: %s\n",
- keys[SName].data.bytes);
+ if(*keys[SName].data.string)
+ wprintf(L"SName: %s\n",
+ keys[SName].data.string);
else
- printf("Name: %s\n",
- keys[Name].data.bytes);
- printf("Priority: %s\n",prio);
- printf("DebugType: %s\n",debugtype);
- printf("Args: %s\n",
+ wprintf(L"Name: %s\n",
+ keys[Name].data.string);
+ wprintf(L"Priority: %s\n",prio);
+ wprintf(L"DebugType: %s\n",debugtype);
+ wprintf(L"Args: %s\n",
keys[Args].data.expand.unexpanded);
- printf("InternalServiceName: %s\n",
- keys[InternalServiceName].data.bytes);
- printf("Comment: %s\n",
- keys[Comment].data.bytes);
- printf("Env:\n");
+ wprintf(L"InternalServiceName: %s\n",
+ keys[InternalServiceName].data.string);
+ wprintf(L"Comment: %s\n",
+ keys[Comment].data.string);
+ wprintf(L"Env:\n");
while(*pek){
- printf("\t%s\n",*pek);
+ wprintf(L"\t%s\n",*pek);
++pek;
}
/* env is easier to free...*/
env = arg_to_env(arg);
free(env);
} else {
- printf("%s\t%s\t%s\t%s\t%s\n",
+ wprintf(L"%s\t%s\t%s\t%s\t%s\n",
servicename,
- (*keys[Name].data.bytes) ?
- keys[Name].data.bytes :
- keys[SName].data.bytes,
+ (*keys[Name].data.string) ?
+ keys[Name].data.string :
+ keys[SName].data.string,
prio,
onfail,
keys[Args].data.expand.unexpanded);
@@ -1102,15 +1107,15 @@ BOOL list_one(char *servicename, RegEntry *keys, BOOL longlist){
}
-int do_list(int argc, char **argv){
+int do_list(int argc, wchar_t **argv){
if(argc < 3){
RegEntryDesc *all_keys = get_all_keys();
if(!all_keys){
- fprintf(stderr,"%s: No services found in registry.\n",
+ fwprintf(stderr,L"%s: No services found in registry.\n",
argv[0]);
return 0;
}
- printf("Service\t(S)Name\tPrio\tOnFail\tArgs\n");
+ wprintf(L"Service\t(S)Name\tPrio\tOnFail\tArgs\n");
while(all_keys->servicename){
list_one(all_keys->servicename,all_keys->entries,FALSE);
++all_keys;
@@ -1121,8 +1126,8 @@ int do_list(int argc, char **argv){
service_name = argv[2];
keys = get_keys(service_name);
if(!keys){
- fprintf(stderr,"%s: Could not retrieve any "
- "registered data for %s.\n",argv[0],service_name);
+ fwprintf(stderr,L"%s: Could not retrieve any "
+ L"registered data for %s.\n",argv[0],service_name);
return 1;
}
list_one(service_name, keys, TRUE);
@@ -1133,15 +1138,15 @@ int do_list(int argc, char **argv){
#define READ_CHUNK 100
#define ARGV_CHUNK 20
-char *safe_get_line(void){
+wchar_t *safe_get_line(void){
int lsize = READ_CHUNK;
- char *line = malloc(READ_CHUNK);
+ wchar_t *line = malloc(READ_CHUNK*sizeof(wchar_t));
int pos = 0;
int ch;
- while((ch = getchar()) != EOF && ch != '\n'){
+ while((ch = getwchar()) != EOF && ch != L'\n'){
if(pos + 1 >= lsize){
- line = realloc(line,(lsize += READ_CHUNK));
+ line = realloc(line,(lsize += READ_CHUNK)*sizeof(wchar_t));
assert(line);
}
line[pos++] = ch;
@@ -1150,22 +1155,22 @@ char *safe_get_line(void){
free(line);
return NULL;
}
- line[pos] = '\0';
+ line[pos] = L'\0';
return line;
}
-void read_arguments(int *pargc, char ***pargv){
+void read_arguments(int *pargc, wchar_t ***pargv){
int argc = 0;
int asize = ARGV_CHUNK;
- char **argv = malloc(ARGV_CHUNK*sizeof(char *));
- char *tmp;
+ wchar_t **argv = malloc(ARGV_CHUNK*sizeof(wchar_t *));
+ wchar_t *tmp;
argv[0] = (*pargv)[0];
argc = 1;
while((tmp = safe_get_line()) != NULL){
if(argc + 1 >= asize){
- argv = realloc(argv,(asize += ARGV_CHUNK)*sizeof(char *));
+ argv = realloc(argv,(asize += ARGV_CHUNK)*sizeof(wchar_t *));
assert(argv);
}
argv[argc++] = tmp;
@@ -1258,40 +1263,54 @@ void release_lock(void) {
-int interactive_main(int argc, char **argv){
- char *action = argv[1];
+int interactive_main(int argc, wchar_t **argv){
+ wchar_t *action = argv[1];
int res;
-
+
+ _setmode(_fileno(stdin), _O_U8TEXT); /* set stdin to UTF8 */
+ _setmode(_fileno(stdout), _O_U8TEXT); /* set stdout to UTF8 */
+ _setmode(_fileno(stderr), _O_U8TEXT); /* set stderr to UTF8 */
+
if (take_lock() != 0) {
- fprintf(stderr,"%s: unable to acquire global lock (%s).\n",argv[0],
+ fwprintf(stderr,L"%s: unable to acquire global lock (%s).\n",argv[0],
ERLSRV_INTERACTIVE_GLOBAL_SEMAPHORE);
return 1;
}
- if(!_stricmp(action,"readargs")){
+ if(!_wcsicmp(action,L"readargs")){
read_arguments(&argc,&argv);
action = argv[1];
}
- if(!_stricmp(action,"set") || !_stricmp(action,"add"))
+
+#ifdef HARDDEBUG
+ {int i;
+ for(i=0; i < argc; i++) {
+ fwprintf(stderr, L"%s ", argv[i]);
+ }
+ fwprintf(stderr, L"\n");
+ }
+#endif
+
+ if(!_wcsicmp(action,L"set") || !_wcsicmp(action,L"add"))
res = do_add_or_set(argc,argv);
- else if(!_stricmp(action,"rename"))
+ else if(!_wcsicmp(action,L"rename"))
res = do_rename(argc,argv);
- else if(!_stricmp(action,"remove"))
+ else if(!_wcsicmp(action,L"remove"))
res = do_remove(argc,argv);
- else if(!_stricmp(action,"list"))
+ else if(!_wcsicmp(action,L"list"))
res = do_list(argc,argv);
- else if(!_stricmp(action,"start") ||
- !_stricmp(action,"start_disabled") ||
- !_stricmp(action,"stop") ||
- !_stricmp(action,"enable") ||
- !_stricmp(action,"disable"))
+ else if(!_wcsicmp(action,L"start") ||
+ !_wcsicmp(action,L"start_disabled") ||
+ !_wcsicmp(action,L"stop") ||
+ !_wcsicmp(action,L"enable") ||
+ !_wcsicmp(action,L"disable"))
res = do_manage(argc,argv);
- else if(_stricmp(action,"?") &&
- _stricmp(action,"/?") &&
- _stricmp(action,"-?") &&
- *action != 'h' &&
- *action != 'H') {
- fprintf(stderr,"%s: action %s not implemented.\n",argv[0],action);
+ else if(_wcsicmp(action,L"?") &&
+ _wcsicmp(action,L"/?") &&
+ _wcsicmp(action,L"-?") &&
+ *action != L'h' &&
+ *action != L'H') {
+ fwprintf(stderr,L"%s: action %s not implemented.\n",argv[0],action);
do_usage(argv[0]);
res = 1;
} else {
diff --git a/erts/etc/win32/erlsrv/erlsrv_interactive.h b/erts/etc/win32/erlsrv/erlsrv_interactive.h
index 23e69e508d..bc6e55fdef 100644
--- a/erts/etc/win32/erlsrv/erlsrv_interactive.h
+++ b/erts/etc/win32/erlsrv/erlsrv_interactive.h
@@ -21,6 +21,6 @@
#define ERLSRV_INTERACTIVE_GLOBAL_SEMAPHORE "{468d6954-e355-415f-968f-d257cb0feef4}"
-int interactive_main(int argc, char **argv);
+int interactive_main(int argc, wchar_t **argv);
#endif /* _ERLSRV_INTERACTIVE_H */
diff --git a/erts/etc/win32/erlsrv/erlsrv_main.c b/erts/etc/win32/erlsrv/erlsrv_main.c
index 920a4a1827..6d8e208fc8 100644
--- a/erts/etc/win32/erlsrv/erlsrv_main.c
+++ b/erts/etc/win32/erlsrv/erlsrv_main.c
@@ -25,7 +25,7 @@
#include "erlsrv_interactive.h"
#include "erlsrv_service.h"
-int main(int argc, char **argv){
+int wmain(int argc, wchar_t **argv){
if(argc > 1)
return interactive_main(argc,argv);
else
diff --git a/erts/etc/win32/erlsrv/erlsrv_registry.c b/erts/etc/win32/erlsrv/erlsrv_registry.c
index c1aa9f2b67..ad50da89a4 100644
--- a/erts/etc/win32/erlsrv/erlsrv_registry.c
+++ b/erts/etc/win32/erlsrv/erlsrv_registry.c
@@ -24,38 +24,37 @@
#include "erlsrv_global.h"
#include "erlsrv_registry.h"
-#define LOG_TYPE "System"
-#define LOG_ROOT \
-"SYSTEM\\CurrentControlSet\\Services\\EventLog\\" LOG_TYPE "\\"
+#define LOG_TYPE L"System"
+#define LOG_ROOT L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\" LOG_TYPE L"\\"
#define LOG_APP_KEY APP_NAME
#define BASE_KEY HKEY_LOCAL_MACHINE
#define PRODUCT_NAME APP_NAME
-#define OLD_PRODUCT_VERSION "1.0"
-#define PRODUCT_VERSION "1.1"
-#define PROG_KEY "SOFTWARE\\Ericsson\\Erlang\\" PRODUCT_NAME "\\" PRODUCT_VERSION
-#define OLD_PROG_KEY "SOFTWARE\\Ericsson\\Erlang\\" PRODUCT_NAME "\\" OLD_PRODUCT_VERSION
+#define OLD_PRODUCT_VERSION L"1.0"
+#define PRODUCT_VERSION L"1.1"
+#define PROG_KEY L"SOFTWARE\\Ericsson\\Erlang\\" PRODUCT_NAME L"\\" PRODUCT_VERSION
+#define OLD_PROG_KEY L"SOFTWARE\\Ericsson\\Erlang\\" PRODUCT_NAME L"\\" OLD_PRODUCT_VERSION
#define MAX_KEY_LEN MAX_PATH
-static const char * const noString = "\0";
+static const wchar_t * const noString = L"\0";
#define MAX_MANDATORY_REG_ENTRY 10 /* InternalServiceName == reg_entries[10] */
static RegEntry reg_entries[] = {
- {"StopAction",REG_SZ,NULL},
- {"OnFail",REG_DWORD,NULL},
- {"Machine",REG_EXPAND_SZ,NULL},
- {"Env", REG_MULTI_SZ,NULL},
- {"WorkDir", REG_EXPAND_SZ,NULL},
- {"Priority",REG_DWORD,NULL},
- {"SName",REG_SZ,NULL},
- {"Name",REG_SZ,NULL},
- {"Args",REG_EXPAND_SZ,NULL},
- {"DebugType",REG_DWORD,NULL},
- {"InternalServiceName",REG_SZ,NULL},
+ {L"StopAction",REG_SZ,NULL},
+ {L"OnFail",REG_DWORD,NULL},
+ {L"Machine",REG_EXPAND_SZ,NULL},
+ {L"Env", REG_MULTI_SZ,NULL},
+ {L"WorkDir", REG_EXPAND_SZ,NULL},
+ {L"Priority",REG_DWORD,NULL},
+ {L"SName",REG_SZ,NULL},
+ {L"Name",REG_SZ,NULL},
+ {L"Args",REG_EXPAND_SZ,NULL},
+ {L"DebugType",REG_DWORD,NULL},
+ {L"InternalServiceName",REG_SZ,NULL},
/* Non mandatory follows */
- {"Comment",REG_SZ,NULL}
+ {L"Comment",REG_SZ,NULL}
};
@@ -73,8 +72,8 @@ void free_keys(RegEntry *keys){
for(i=0;i<num_reg_entries && keys[i].name != NULL;++i){
if((keys[i].type == REG_SZ || keys[i].type == REG_EXPAND_SZ ||
keys[i].type == REG_MULTI_SZ) &&
- keys[i].data.bytes != noString){
- free(keys[i].data.bytes);
+ keys[i].data.string != noString){
+ free(keys[i].data.string);
if(keys[i].type == REG_EXPAND_SZ &&
keys[i].data.expand.unexpanded != noString)
free(keys[i].data.expand.unexpanded);
@@ -92,32 +91,32 @@ void free_all_keys(RegEntryDesc *descs){
free(descs);
}
-RegEntry *get_keys(char *servicename){
+RegEntry *get_keys(wchar_t *servicename){
RegEntry *res = NULL;
HKEY prog_key;
int key_opened = 0;
int i;
DWORD ret;
- char *copy;
- char *tmpbuf;
+ wchar_t *copy;
+ wchar_t *tmpbuf;
DWORD tmpbuflen;
- char key_to_open[MAX_KEY_LEN];
+ wchar_t key_to_open[MAX_KEY_LEN];
DWORD val_type;
- char *val_data = malloc(MAX_KEY_LEN);
+ wchar_t *val_data = (wchar_t *)malloc(MAX_KEY_LEN * sizeof(wchar_t));
DWORD val_datalen;
DWORD val_datasiz = MAX_KEY_LEN;
- if(strlen(PROG_KEY) + strlen(servicename) + 2 > MAX_KEY_LEN)
+ if(wcslen(PROG_KEY) + wcslen(servicename) + 2 > MAX_KEY_LEN)
goto error;
- sprintf(key_to_open,"%s\\%s",PROG_KEY,servicename);
+ swprintf(key_to_open,MAX_KEY_LEN,L"%s\\%s",PROG_KEY,servicename);
- if(RegOpenKeyEx(BASE_KEY,
- key_to_open,
- 0,
- KEY_QUERY_VALUE,
- &prog_key) != ERROR_SUCCESS)
+ if(RegOpenKeyExW(BASE_KEY,
+ key_to_open,
+ 0,
+ KEY_QUERY_VALUE,
+ &prog_key) != ERROR_SUCCESS)
goto error;
key_opened = 1;
@@ -128,12 +127,12 @@ RegEntry *get_keys(char *servicename){
for(i=0;i<num_reg_entries;++i){
for(;;){
val_datalen = val_datasiz;
- ret = RegQueryValueEx(prog_key,
- reg_entries[i].name,
- NULL,
- &val_type,
- (BYTE *) val_data,
- &val_datalen);
+ ret = RegQueryValueExW(prog_key,
+ reg_entries[i].name,
+ NULL,
+ &val_type,
+ (BYTE *) val_data,
+ &val_datalen);
if(ret == ERROR_SUCCESS){
if(reg_entries[i].type == val_type)
break;
@@ -167,41 +166,41 @@ RegEntry *get_keys(char *servicename){
copy = NULL;
switch(reg_entries[i].type){
case REG_EXPAND_SZ:
- if(!val_datalen || val_data[0] == '\0'){
- copy = (char *) noString;
- res[i].data.expand.unexpanded = (char *) noString;
+ if(!val_datalen || val_data[0] == L'\0'){
+ copy = (wchar_t *) noString;
+ res[i].data.expand.unexpanded = (wchar_t *) noString;
} else {
- tmpbuf = malloc(MAX_KEY_LEN);
+ tmpbuf = (wchar_t *) malloc(MAX_KEY_LEN * sizeof(wchar_t));
tmpbuflen = (DWORD) MAX_KEY_LEN;
for(;;){
- ret = ExpandEnvironmentStrings(val_data,tmpbuf,tmpbuflen);
+ ret = ExpandEnvironmentStringsW(val_data,tmpbuf,tmpbuflen);
if(!ret){
free(tmpbuf);
goto error;
}else if(ret > tmpbuflen){
- tmpbuf=realloc(tmpbuf,tmpbuflen=ret);
+ tmpbuf=realloc(tmpbuf,(tmpbuflen=ret)*sizeof(wchar_t));
} else {
- copy = strdup(tmpbuf);
+ copy = wcsdup(tmpbuf);
free(tmpbuf);
break;
}
}
- res[i].data.expand.unexpanded = strdup(val_data);
+ res[i].data.expand.unexpanded = wcsdup(val_data);
}
case REG_MULTI_SZ:
case REG_SZ:
if(!copy){
if(!val_datalen ||
- ((val_datalen == 1 && val_data[0] == '\0') ||
- (val_datalen == 2 && val_data[0] == '\0' &&
- val_data[1] == '\0'))){
- copy = (char *) noString;
+ ((val_datalen == 2 && val_data[0] == L'\0') ||
+ (val_datalen == 4 && val_data[0] == L'\0' &&
+ val_data[1] == L'\0'))){
+ copy = (wchar_t *) noString;
} else {
- copy = malloc(val_datalen);
- memcpy(copy,val_data,val_datalen);
+ copy = malloc(val_datalen); /* val_datalen in bytes */
+ memcpy(copy,val_data,val_datalen);
}
}
- res[i].data.bytes = copy;
+ res[i].data.string = copy;
break;
case REG_DWORD:
memcpy(&res[i].data.value,val_data,sizeof(DWORD));
@@ -222,32 +221,32 @@ error:
return NULL;
}
-int set_keys(char *servicename, RegEntry *keys){
+int set_keys(wchar_t *servicename, RegEntry *keys){
HKEY prog_key;
int key_opened = 0;
int i;
- char key_to_open[MAX_KEY_LEN];
+ wchar_t key_to_open[MAX_KEY_LEN];
DWORD disposition;
- if(strlen(PROG_KEY) + strlen(servicename) + 2 > MAX_KEY_LEN)
+ if(wcslen(PROG_KEY) + wcslen(servicename) + 2 > MAX_KEY_LEN)
goto error;
- sprintf(key_to_open,"%s\\%s",PROG_KEY,servicename);
+ swprintf(key_to_open,MAX_KEY_LEN,L"%s\\%s",PROG_KEY,servicename);
- if(RegOpenKeyEx(BASE_KEY,
- key_to_open,
- 0,
- KEY_SET_VALUE,
- &prog_key) != ERROR_SUCCESS){
- if(RegCreateKeyEx(BASE_KEY,
- key_to_open,
- 0,
- NULL,
- REG_OPTION_NON_VOLATILE,
- KEY_SET_VALUE,
- NULL,
- &prog_key,
- &disposition) != ERROR_SUCCESS)
- goto error;
+ if(RegOpenKeyExW(BASE_KEY,
+ key_to_open,
+ 0,
+ KEY_SET_VALUE,
+ &prog_key) != ERROR_SUCCESS){
+ if(RegCreateKeyExW(BASE_KEY,
+ key_to_open,
+ 0,
+ NULL,
+ REG_OPTION_NON_VOLATILE,
+ KEY_SET_VALUE,
+ NULL,
+ &prog_key,
+ &disposition) != ERROR_SUCCESS)
+ goto error;
}
key_opened = 1;
@@ -258,19 +257,19 @@ int set_keys(char *servicename, RegEntry *keys){
int j;
switch(keys[i].type){
case REG_SZ:
- ptr = keys[i].data.bytes;
- siz = strlen(ptr)+1;
+ ptr = keys[i].data.string;
+ siz = (wcslen(ptr)+1)*sizeof(wchar_t);
break;
case REG_EXPAND_SZ:
ptr = keys[i].data.expand.unexpanded;
- siz = strlen(ptr)+1;
+ siz = (wcslen(ptr)+1)*sizeof(wchar_t);
break;
case REG_MULTI_SZ:
- ptr = keys[i].data.bytes;
- for(j=0;!(((char *)ptr)[j] == '\0' &&
- ((char *)ptr)[j+1] == '\0');++j)
+ ptr = keys[i].data.string;
+ for(j=0;!(((wchar_t *)ptr)[j] == L'\0' &&
+ ((wchar_t *)ptr)[j+1] == L'\0');++j)
;
- siz=(DWORD)j+2;
+ siz=(j+2)*sizeof(wchar_t);
break;
case REG_DWORD:
ptr = &keys[i].data.value;
@@ -280,15 +279,15 @@ int set_keys(char *servicename, RegEntry *keys){
goto error;
}
#ifdef HARDDEBUG
- fprintf(stderr,"%s %s:%d\n",keys[i].name,
- (keys[i].type == REG_DWORD) ? "(dword)" : ptr,siz);
+ fprintf(stderr,"%S %S:%d\n",keys[i].name,
+ (keys[i].type == REG_DWORD) ? L"(dword)" : ptr,siz);
#endif
- if(RegSetValueEx(prog_key,
- keys[i].name,
- 0,
- keys[i].type,
- ptr,
- siz) != ERROR_SUCCESS)
+ if(RegSetValueExW(prog_key,
+ keys[i].name,
+ 0,
+ keys[i].type,
+ ptr,
+ siz) != ERROR_SUCCESS)
goto error;
}
RegCloseKey(prog_key);
@@ -299,15 +298,15 @@ error:
return 1;
}
-static int do_remove_keys(char *servicename, const char *prog_key_name){
+static int do_remove_keys(wchar_t *servicename, const wchar_t *prog_key_name){
HKEY prog_key;
- if(RegOpenKeyEx(BASE_KEY,
- prog_key_name,
- 0,
- KEY_ALL_ACCESS,
- &prog_key) != ERROR_SUCCESS)
+ if(RegOpenKeyExW(BASE_KEY,
+ prog_key_name,
+ 0,
+ KEY_ALL_ACCESS,
+ &prog_key) != ERROR_SUCCESS)
return -1;
- if(RegDeleteKey(prog_key,servicename) != ERROR_SUCCESS){
+ if(RegDeleteKeyW(prog_key,servicename) != ERROR_SUCCESS){
RegCloseKey(prog_key);
return -1;
}
@@ -315,7 +314,7 @@ static int do_remove_keys(char *servicename, const char *prog_key_name){
return 0;
}
-int remove_keys(char *servicename){
+int remove_keys(wchar_t *servicename){
int ret;
if((ret = do_remove_keys(servicename, PROG_KEY)) < 0){
@@ -335,33 +334,33 @@ RegEntryDesc *get_all_keys(void){
HKEY prog_key;
int key_opened = 0;
DWORD enum_index;
- char name[MAX_KEY_LEN];
+ wchar_t name[MAX_KEY_LEN];
DWORD namelen;
- char class[MAX_KEY_LEN];
+ wchar_t class[MAX_KEY_LEN];
DWORD classlen;
FILETIME ft;
res[ndx].servicename = NULL;
- if(RegOpenKeyEx(BASE_KEY, PROG_KEY, 0,
- KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS,
- &prog_key) != ERROR_SUCCESS)
+ if(RegOpenKeyExW(BASE_KEY, PROG_KEY, 0,
+ KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS,
+ &prog_key) != ERROR_SUCCESS)
goto error;
key_opened = 1;
for(enum_index = 0, namelen = MAX_KEY_LEN, classlen = MAX_KEY_LEN;
- ERROR_SUCCESS == RegEnumKeyEx(prog_key,
- enum_index,
- name,
- &namelen,
- NULL,
- class,
- &classlen,
- &ft);
+ ERROR_SUCCESS == RegEnumKeyExW(prog_key,
+ enum_index,
+ name,
+ &namelen,
+ NULL,
+ class,
+ &classlen,
+ &ft);
++enum_index, namelen = MAX_KEY_LEN, classlen = MAX_KEY_LEN){
if(ndx >= res_siz - 1)
res = realloc(res, (res_siz += 10)*sizeof(RegEntryDesc));
if(!(res[ndx].entries = get_keys(name)))
- goto error;
- res[ndx].servicename = strdup(name);
+ goto error;
+ res[ndx].servicename = wcsdup(name);
res[++ndx].servicename = NULL;
}
RegCloseKey(prog_key);
@@ -380,24 +379,24 @@ int register_logkeys(void){
EVENTLOG_WARNING_TYPE |
EVENTLOG_INFORMATION_TYPE;
DWORD catcount=1;
- char filename[2048];
+ wchar_t filename[2048];
DWORD fnsiz=2048;
- if(RegCreateKeyEx(HKEY_LOCAL_MACHINE,
- LOG_ROOT LOG_APP_KEY, 0,
- NULL, REG_OPTION_NON_VOLATILE,
- KEY_SET_VALUE, NULL,
- &key, &disposition) != ERROR_SUCCESS)
+ if(RegCreateKeyExW(HKEY_LOCAL_MACHINE,
+ LOG_ROOT LOG_APP_KEY, 0,
+ NULL, REG_OPTION_NON_VOLATILE,
+ KEY_SET_VALUE, NULL,
+ &key, &disposition) != ERROR_SUCCESS)
return -1;
- if(!GetModuleFileName(NULL, filename, fnsiz))
+ if(!GetModuleFileNameW(NULL, filename, fnsiz))
return -1;
- if(RegSetValueEx(key, "EventMessageFile",
- 0, REG_EXPAND_SZ, (LPBYTE) filename,
- strlen(filename)+1) != ERROR_SUCCESS)
+ if(RegSetValueExW(key, L"EventMessageFile",
+ 0, REG_EXPAND_SZ, (LPBYTE) filename,
+ (wcslen(filename)+1)*sizeof(wchar_t)) != ERROR_SUCCESS)
return -1;
- if(RegSetValueEx(key, "TypesSupported",
- 0, REG_DWORD, (LPBYTE) &types,
- sizeof(DWORD)) != ERROR_SUCCESS)
+ if(RegSetValueExW(key, L"TypesSupported",
+ 0, REG_DWORD, (LPBYTE) &types,
+ sizeof(DWORD)) != ERROR_SUCCESS)
return -1;
return 0;
}
diff --git a/erts/etc/win32/erlsrv/erlsrv_registry.h b/erts/etc/win32/erlsrv/erlsrv_registry.h
index fbccc5416a..4be10e9ff2 100644
--- a/erts/etc/win32/erlsrv/erlsrv_registry.h
+++ b/erts/etc/win32/erlsrv/erlsrv_registry.h
@@ -20,20 +20,20 @@
#define _ERLSRV_REGISTRY_H
typedef struct _reg_entry {
- char *name;
+ wchar_t *name;
DWORD type;
union {
- char *bytes;
+ wchar_t *string;
DWORD value;
struct {
- char *bytes;
- char *unexpanded;
+ wchar_t *string;
+ wchar_t *unexpanded;
} expand;
} data;
} RegEntry;
typedef struct _reg_entry_desc {
- char *servicename;
+ wchar_t *servicename;
RegEntry *entries;
} RegEntryDesc;
@@ -67,10 +67,10 @@ extern int num_reg_entries;
RegEntry *empty_reg_tab(void);
void free_keys(RegEntry *keys);
void free_all_keys(RegEntryDesc *descs);
-RegEntry *get_keys(char *servicename);
-int set_keys(char *servicename, RegEntry *keys);
+RegEntry *get_keys(wchar_t *servicename);
+int set_keys(wchar_t *servicename, RegEntry *keys);
RegEntryDesc *get_all_keys(void);
-int remove_keys(char *servicename);
+int remove_keys(wchar_t *servicename);
int register_logkeys(void);
#endif /* _ERLSRV_REGISTRY_H */
diff --git a/erts/etc/win32/erlsrv/erlsrv_service.c b/erts/etc/win32/erlsrv/erlsrv_service.c
index 58738ee445..2e56c579a2 100644
--- a/erts/etc/win32/erlsrv/erlsrv_service.c
+++ b/erts/etc/win32/erlsrv/erlsrv_service.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2012. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2013. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -99,8 +99,8 @@ static BOOL reset_current(){
}
static VOID WINAPI handler(DWORD control){
- char buffer[1024];
- sprintf(buffer,"handler called with control = %d.",(int) control);
+ wchar_t buffer[1024];
+ swprintf(buffer,1024,L"handler called with control = %d.",(int) control);
log_debug(buffer);
switch(control){
case SERVICE_CONTROL_STOP:
@@ -119,7 +119,7 @@ typedef struct _server_info {
RegEntry *keys;
PROCESS_INFORMATION info;
HANDLE erl_stdin;
- char *event_name;
+ wchar_t *event_name;
} ServerInfo;
@@ -138,7 +138,7 @@ static BOOL reset_acl(SaveAclStruct *save_acl){
return FALSE;
if(!OpenProcessToken(GetCurrentProcess(),
TOKEN_READ|TOKEN_WRITE,&tokenh)){
- log_warning("Failed to open access token.");
+ log_warning(L"Failed to open access token.");
return FALSE;
}
save_acl->initialized = FALSE;
@@ -146,7 +146,7 @@ static BOOL reset_acl(SaveAclStruct *save_acl){
TokenDefaultDacl,
save_acl->defdacl,
sizeof(TOKEN_DEFAULT_DACL))){
- log_warning("Failed to get default ACL from token.");
+ log_warning(L"Failed to get default ACL from token.");
CloseHandle(tokenh);
LocalFree(save_acl->defdacl);
LocalFree(save_acl->newacl);
@@ -177,7 +177,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
save_acl->initialized = FALSE;
if(!OpenProcessToken(GetCurrentProcess(),
TOKEN_READ|TOKEN_WRITE,&tokenh)){
- log_warning("Failed to open access token.");
+ log_warning(L"Failed to open access token.");
return FALSE;
}
save_acl->defdacl = &dummy;
@@ -188,7 +188,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
sizeof(TOKEN_DEFAULT_DACL),
&required);
if(required == 0){
- log_warning("Failed to get any ACL info from token.");
+ log_warning(L"Failed to get any ACL info from token.");
CloseHandle(tokenh);
return FALSE;
}
@@ -200,7 +200,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
&required)){
#ifdef HARDDEBUG
{
- char *mes;
+ wchar_t *mes;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
@@ -213,7 +213,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
LocalFree(mes);
}
#endif
- log_warning("Failed to get default ACL from token.");
+ log_warning(L"Failed to get default ACL from token.");
CloseHandle(tokenh);
return FALSE;
}
@@ -221,7 +221,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
oldacl = save_acl->defdacl->DefaultDacl;
if(!GetAclInformation(oldacl, &si, sizeof(si),
AclSizeInformation)){
- log_warning("Failed to get size information for ACL");
+ log_warning(L"Failed to get size information for ACL");
CloseHandle(tokenh);
return FALSE;
}
@@ -237,7 +237,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
0,
0,
&extra_sid)){
- log_warning("Failed to initialize administrator SID.");
+ log_warning(L"Failed to initialize administrator SID.");
CloseHandle(tokenh);
return FALSE;
}
@@ -248,7 +248,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
newacl = LocalAlloc(LPTR,newsize);
if(!InitializeAcl(newacl, newsize, ACL_REVISION)){
- log_warning("Failed to initialize new ACL.");
+ log_warning(L"Failed to initialize new ACL.");
LocalFree(newacl);
FreeSid(extra_sid);
CloseHandle(tokenh);
@@ -258,7 +258,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
for(i=0;i<((int)si.AceCount);++i){
ACE_HEADER *ace_header;
if (!GetAce (oldacl, i, &ace_header)){
- log_warning("Failed to get ACE from old ACL.");
+ log_warning(L"Failed to get ACE from old ACL.");
LocalFree(newacl);
FreeSid(extra_sid);
CloseHandle(tokenh);
@@ -266,7 +266,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
}
if(!AddAce(newacl,ACL_REVISION,0xffffffff,ace_header,
ace_header->AceSize)){
- log_warning("Failed to set ACE in new ACL.");
+ log_warning(L"Failed to set ACE in new ACL.");
LocalFree(newacl);
FreeSid(extra_sid);
CloseHandle(tokenh);
@@ -277,7 +277,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
ACL_REVISION2,
PROCESS_ALL_ACCESS,
extra_sid)){
- log_warning("Failed to add system ACE to new ACL.");
+ log_warning(L"Failed to add system ACE to new ACL.");
LocalFree(newacl);
FreeSid(extra_sid);
return FALSE;
@@ -288,7 +288,7 @@ static BOOL new_acl(SaveAclStruct *save_acl){
TokenDefaultDacl,
&newdacl,
sizeof(newdacl))){
- log_warning("Failed to set token information");
+ log_warning(L"Failed to set token information");
LocalFree(newacl);
FreeSid(extra_sid);
CloseHandle(tokenh);
@@ -302,18 +302,18 @@ static BOOL new_acl(SaveAclStruct *save_acl){
return TRUE;
}
-static char **find_arg(char **arg, char *str){
- char *tmp;
+static wchar_t **find_arg(wchar_t **arg, wchar_t *str){
+ wchar_t *tmp;
int len;
- str = strdup(str);
- if((tmp = strchr(str,'=')) == NULL)
+ str = wcsdup(str);
+ if((tmp = wcschr(str,L'=')) == NULL)
goto fail;
tmp++;
- *tmp = '\0';
+ *tmp = L'\0';
len = tmp - str;
while(*arg != NULL){
- if(!_strnicmp(*arg,str,len)){
+ if(!_wcsnicmp(*arg,str,len)){
free(str);
return arg;
}
@@ -324,11 +324,11 @@ fail:
return NULL;
}
-static char **merge_environment(char *current, char *add){
- char **c_arg = env_to_arg(envdup(current));
- char **a_arg = env_to_arg(envdup(add));
- char **new;
- char **tmp;
+static wchar_t **merge_environment(wchar_t *current, wchar_t *add){
+ wchar_t **c_arg = env_to_arg(envdup(current));
+ wchar_t **a_arg = env_to_arg(envdup(add));
+ wchar_t **new;
+ wchar_t **tmp;
int i,j;
for(i=0;c_arg[i] != NULL;++i)
@@ -336,19 +336,19 @@ static char **merge_environment(char *current, char *add){
for(j=0;a_arg[j] != NULL;++j)
;
- new = malloc(sizeof(char *)*(i + j + 3));
+ new = malloc(sizeof(wchar_t *)*(i + j + 3));
for(i = 0; c_arg[i] != NULL; ++i)
- new[i] = strdup(c_arg[i]);
+ new[i] = wcsdup(c_arg[i]);
new[i] = NULL;
for(j = 0; a_arg[j] != NULL; ++j){
if((tmp = find_arg(new,a_arg[j])) != NULL){
free(*tmp);
- *tmp = strdup(a_arg[j]);
+ *tmp = wcsdup(a_arg[j]);
} else {
- new[i++] = strdup(a_arg[j]);
+ new[i++] = wcsdup(a_arg[j]);
new[i] = NULL;
}
}
@@ -358,12 +358,12 @@ static char **merge_environment(char *current, char *add){
}
-static char *get_next_debug_file(char *prefix){
- char *buffer = malloc(strlen(prefix)+12);
+static wchar_t *get_next_debug_file(wchar_t *prefix){
+ wchar_t *buffer = malloc((wcslen(prefix)+12)*sizeof(wchar_t));
int i;
for(i=1;i<100;++i){
- sprintf(buffer,"%s.%d",prefix,i);
- if(GetFileAttributes(buffer) == 0xFFFFFFFF)
+ swprintf(buffer,wcslen(prefix)+12,L"%s.%d",prefix,i);
+ if(GetFileAttributesW(buffer) == 0xFFFFFFFF)
return buffer;
}
return NULL;
@@ -372,56 +372,66 @@ static char *get_next_debug_file(char *prefix){
static BOOL start_a_service(ServerInfo *srvi){
- STARTUPINFO start;
- char execbuff[MAX_PATH*4]; /* FIXME: Can get overflow! */
- char namebuff[MAX_PATH];
- char errbuff[MAX_PATH*4]; /* hmmm.... */
+ STARTUPINFOW start;
+ wchar_t namebuff[MAX_PATH];
+ wchar_t *execbuff;
+ wchar_t *errbuff;
HANDLE write_pipe = NULL, read_pipe = NULL;
SECURITY_ATTRIBUTES pipe_security;
SECURITY_ATTRIBUTES attr;
HANDLE nul;
SaveAclStruct save_acl;
- char *my_environ;
+ wchar_t *my_environ;
BOOL console_allocated = FALSE;
+ int bufflen=0;
- if(!(*(srvi->keys[Env].data.bytes))){
+ if(!(*(srvi->keys[Env].data.string))){
my_environ = NULL;
} else {
- char *tmp;
- char **merged = merge_environment((tmp = GetEnvironmentStrings()),
- srvi->keys[Env].data.bytes);
- FreeEnvironmentStrings(tmp);
+ wchar_t *tmp;
+ wchar_t **merged = merge_environment((tmp = GetEnvironmentStringsW()),
+ srvi->keys[Env].data.string);
+ FreeEnvironmentStringsW(tmp);
my_environ = arg_to_env(merged);
}
- if(!*(srvi->keys[Machine].data.bytes) ||
- (!*(srvi->keys[SName].data.bytes) &&
- !*(srvi->keys[Name].data.bytes))){
- log_error("Not enough parameters for erlang service.");
+ if(!*(srvi->keys[Machine].data.string) ||
+ (!*(srvi->keys[SName].data.string) &&
+ !*(srvi->keys[Name].data.string))){
+ log_error(L"Not enough parameters for erlang service.");
if(my_environ)
free(my_environ);
return FALSE;
}
- if(*(srvi->keys[SName].data.bytes))
- sprintf(namebuff,"-nohup -sname %s",srvi->keys[SName].data.bytes);
+ if(*(srvi->keys[SName].data.string))
+ swprintf(namebuff,MAX_PATH,L"-nohup -sname %s",srvi->keys[SName].data.string);
else
- sprintf(namebuff,"-nohup -name %s",srvi->keys[Name].data.bytes);
+ swprintf(namebuff,MAX_PATH,L"-nohup -name %s",srvi->keys[Name].data.string);
if(srvi->keys[DebugType].data.value == DEBUG_TYPE_CONSOLE)
- strcat(namebuff," -keep_window");
+ wcscat(namebuff,L" -keep_window");
+
+ bufflen = MAX_PATH +
+ wcslen(srvi->keys[Machine].data.string) +
+ wcslen(srvi->event_name) +
+ wcslen(namebuff) +
+ wcslen(srvi->keys[Args].data.string);
+
+ execbuff = malloc(bufflen * sizeof(wchar_t));
+ errbuff = malloc((MAX_PATH + bufflen) * sizeof(wchar_t));
if (srvi->event_name != NULL) {
- sprintf(execbuff,"\"%s\" -service_event %s %s %s",
- srvi->keys[Machine].data.bytes,
- srvi->event_name,
- namebuff,
- srvi->keys[Args].data.bytes);
+ swprintf(execbuff,bufflen,L"\"%s\" -service_event %s %s %s",
+ srvi->keys[Machine].data.string,
+ srvi->event_name,
+ namebuff,
+ srvi->keys[Args].data.string);
} else {
- sprintf(execbuff,"\"%s\" %s %s",
- srvi->keys[Machine].data.bytes,
- namebuff,
- srvi->keys[Args].data.bytes);
+ swprintf(execbuff,bufflen,L"\"%s\" %s %s",
+ srvi->keys[Machine].data.string,
+ namebuff,
+ srvi->keys[Args].data.string);
}
memset (&start, 0, sizeof (start));
@@ -435,45 +445,49 @@ static BOOL start_a_service(ServerInfo *srvi){
if(console_allocated = AllocConsole())
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE),coord);
else
- log_warning("Unable to allocate debugging console!");
- } else if(*(srvi->keys[StopAction].data.bytes) ||
+ log_warning(L"Unable to allocate debugging console!");
+ } else if(*(srvi->keys[StopAction].data.string) ||
srvi->keys[DebugType].data.value != DEBUG_TYPE_NO_DEBUG){
pipe_security.nLength = sizeof(pipe_security);
pipe_security.lpSecurityDescriptor = NULL;
pipe_security.bInheritHandle = TRUE;
if(!CreatePipe(&read_pipe,&write_pipe,&pipe_security,0)){
- log_error("Could not create pipe for erlang service.");
+ log_error(L"Could not create pipe for erlang service.");
if(my_environ)
- free(my_environ);
+ free(my_environ);
+ free(execbuff);
+ free(errbuff);
return FALSE;
}
if(srvi->keys[DebugType].data.value != DEBUG_TYPE_NO_DEBUG){
- char *filename;
- if(*(srvi->keys[WorkDir].data.bytes)){
- filename = malloc(strlen(srvi->keys[WorkDir].data.bytes) + 1 +
- strlen(service_name)+strlen(".debug")+1);
- sprintf(filename,"%s\\%s.debug",
- srvi->keys[WorkDir].data.bytes,
- service_name);
+ wchar_t *filename;
+ if(*(srvi->keys[WorkDir].data.string)){
+ int filenamelen = (wcslen(srvi->keys[WorkDir].data.string) + 1 +
+ wcslen(service_name)+wcslen(L".debug")+1);
+ filename = malloc(filenamelen*sizeof(wchar_t));
+ swprintf(filename,filenamelen,L"%s\\%s.debug",
+ srvi->keys[WorkDir].data.string,
+ service_name);
} else {
- filename = malloc(strlen(service_name)+strlen(".debug")+1);
- sprintf(filename,"%s.debug",service_name);
+ int filenamelen = wcslen(service_name)+wcslen(L".debug")+1;
+ filename = malloc(filenamelen*sizeof(wchar_t));
+ swprintf(filename,filenamelen,L"%s.debug",service_name);
}
log_debug(filename);
if(srvi->keys[DebugType].data.value == DEBUG_TYPE_NEW){
- char *tmpfn = get_next_debug_file(filename);
+ wchar_t *tmpfn = get_next_debug_file(filename);
if(tmpfn){
free(filename);
filename = tmpfn;
} else {
- log_warning("Number of debug files exceeds system defined "
- "limit, reverting to DebugType: reuse. ");
+ log_warning(L"Number of debug files exceeds system defined "
+ L"limit, reverting to DebugType: reuse. ");
}
}
- nul = CreateFile(filename,
+ nul = CreateFileW(filename,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
&pipe_security,
@@ -492,9 +506,9 @@ static BOOL start_a_service(ServerInfo *srvi){
}
if(nul == NULL){
log_error((srvi->keys[DebugType].data.value != DEBUG_TYPE_NO_DEBUG)
- ? "Could not create debug file. "
- "(Working directory not valid?)"
- : "Cold not open NUL!");
+ ? L"Could not create debug file. "
+ L"(Working directory not valid?)"
+ : L"Cold not open NUL!");
start.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
start.hStdError = GetStdHandle(STD_ERROR_HANDLE);
}
@@ -510,23 +524,24 @@ static BOOL start_a_service(ServerInfo *srvi){
new_acl(&save_acl);
- if(!CreateProcess(NULL,
- execbuff,
- &attr,
- NULL,
- (read_pipe != NULL),
- CREATE_DEFAULT_ERROR_MODE |
- (srvi->keys[Priority].data.value),
- my_environ,
- (*(srvi->keys[WorkDir].data.bytes)) ?
- srvi->keys[WorkDir].data.bytes : NULL,
- &start,
- &(srvi->info))){
- sprintf(errbuff,"Could not start erlang service "
- "with commandline \"%s\".",
- service_name,
- execbuff
- );
+ if(!CreateProcessW(NULL,
+ execbuff,
+ &attr,
+ NULL,
+ (read_pipe != NULL),
+ CREATE_UNICODE_ENVIRONMENT |
+ CREATE_DEFAULT_ERROR_MODE |
+ (srvi->keys[Priority].data.value),
+ my_environ,
+ (*(srvi->keys[WorkDir].data.string)) ?
+ srvi->keys[WorkDir].data.string : NULL,
+ &start,
+ &(srvi->info))){
+ swprintf(errbuff,bufflen+MAX_PATH,L"Could not start erlang service \"%s\""
+ L"with commandline [%s].",
+ service_name,
+ execbuff
+ );
log_error(errbuff);
if(read_pipe != NULL){
CloseHandle(read_pipe);
@@ -539,14 +554,16 @@ static BOOL start_a_service(ServerInfo *srvi){
reset_acl(&save_acl);
if(my_environ)
free(my_environ);
+ free(execbuff);
+ free(errbuff);
return FALSE;
}
if(console_allocated)
FreeConsole();
#ifdef HARDDEBUG
- sprintf(errbuff,
- "Started %s with the following commandline: "
- "%s",service_name,execbuff);
+ swprintf(errbuff,bufflen+MAX_PATH,
+ L"Started %s with the following commandline: %s",
+ service_name,execbuff);
log_debug(errbuff);
#endif
if(read_pipe != NULL){
@@ -559,19 +576,21 @@ static BOOL start_a_service(ServerInfo *srvi){
reset_acl(&save_acl);
if(my_environ)
free(my_environ);
+ free(execbuff);
+ free(errbuff);
return TRUE;
}
-static HANDLE create_erlang_event(char *event_name)
+static HANDLE create_erlang_event(wchar_t *event_name)
{
HANDLE e;
- if ((e = OpenEvent(EVENT_ALL_ACCESS,FALSE,event_name)) == NULL) {
- if ((e = CreateEvent(NULL, TRUE, FALSE, event_name)) == NULL) {
- log_warning("Could not create or access erlang termination event");
+ if ((e = OpenEventW(EVENT_ALL_ACCESS,FALSE,event_name)) == NULL) {
+ if ((e = CreateEventW(NULL, TRUE, FALSE, event_name)) == NULL) {
+ log_warning(L"Could not create or access erlang termination event");
}
} else {
if (!ResetEvent(e)) {
- log_warning("Could not reset erlang termination event.");
+ log_warning(L"Could not reset erlang termination event.");
}
}
return e;
@@ -580,17 +599,18 @@ static HANDLE create_erlang_event(char *event_name)
static BOOL stop_erlang(ServerInfo *srvi, int waithint,
int *checkpoint){
DWORD written = 0;
- char *action = srvi->keys[StopAction].data.bytes;
- DWORD towrite = strlen(action)+1;
- char *toerl;
+ wchar_t *wc_action = srvi->keys[StopAction].data.string;
+ DWORD towrite = wcslen(wc_action);
+ char *toerl;
DWORD exitcode;
int i;
int kill;
if(towrite > 2 && srvi->erl_stdin != NULL){
- toerl = malloc(towrite+1);
- strcpy(toerl,action);
- strcat(toerl,"\n");
+ towrite = WideCharToMultiByte(CP_UTF8, 0, wc_action, -1, NULL, 0, NULL, NULL);
+ toerl = malloc((1+towrite)*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, wc_action, -1, toerl, towrite, NULL, NULL);
+ strcat(toerl, "\n");
WriteFile(srvi->erl_stdin, toerl, towrite, &written,0);
free(toerl);
/* Give it 45 seconds to terminate */
@@ -605,9 +625,9 @@ static BOOL stop_erlang(ServerInfo *srvi, int waithint,
++(*checkpoint);
set_stop_pending(waithint,*checkpoint);
}
- log_warning("StopAction did not terminate erlang. Trying forced kill.");
+ log_warning(L"StopAction did not terminate erlang. Trying forced kill.");
}
- log_debug("Terminating erlang...");
+ log_debug(L"Terminating erlang...");
kill = 1;
if(eventKillErlang != NULL && SetEvent(eventKillErlang) != 0){
for(i=0;i<10;++i){
@@ -621,25 +641,25 @@ static BOOL stop_erlang(ServerInfo *srvi, int waithint,
} else {
#ifdef HARDDEBUG
{
- char *mes;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &mes,
- 0,
- NULL );
+ wchar_t *mes;
+ FormatMessageW(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPWSTR) &mes,
+ 0,
+ NULL );
log_info(mes);
LocalFree(mes);
}
#endif
- log_debug("Could not send control event to Erlang process");
+ log_debug(L"Could not send control event to Erlang process");
}
if(kill){
- log_warning("Using TerminateProcess to kill erlang.");
+ log_warning(L"Using TerminateProcess to kill erlang.");
if(!TerminateProcess(srvi->info.hProcess,NO_ERROR))
- log_error("TerminateProcess failed");
+ log_error(L"TerminateProcess failed");
}
GetExitCodeProcess(srvi->info.hProcess,&exitcode);
CloseHandle(srvi->info.hProcess);
@@ -668,14 +688,14 @@ static BOOL enable_privilege(void) {
static BOOL pull_service_name(void){
SC_HANDLE scm;
DWORD sz = 1024;
- static char service_name_buff[1024];
+ static wchar_t service_name_buff[1024];
if((scm = OpenSCManager(NULL,
NULL,
GENERIC_READ))
== NULL){
return FALSE;
}
- if(!GetServiceDisplayName(scm,real_service_name,service_name_buff,&sz))
+ if(!GetServiceDisplayNameW(scm,real_service_name,service_name_buff,&sz))
return FALSE;
CloseServiceHandle(scm);
service_name = service_name_buff;
@@ -683,7 +703,7 @@ static BOOL pull_service_name(void){
}
-static VOID WINAPI service_main_loop(DWORD argc, char **argv){
+static VOID WINAPI service_main_loop(DWORD argc, wchar_t **argv){
int waithint = 30000;
int checkpoint = 1;
RegEntry *keys;
@@ -692,36 +712,35 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
HANDLE harr[2];
FILETIME creationt,exitt,kernelt,usert;
LONGLONG creationl,exitl,diffl;
- char event_name[MAX_PATH] = "ErlSrv_";
- char executable_name[MAX_PATH];
+ wchar_t event_name[MAX_PATH] = L"ErlSrv_";
+ wchar_t executable_name[MAX_PATH];
#ifdef DEBUG
- char errorbuff[2048]; /* FIXME... */
+ wchar_t errorbuff[2048]; /* FIXME... */
#endif
int success_wait = NO_SUCCESS_WAIT;
real_service_name = argv[0];
if(!pull_service_name()){
- log_error("Could not get Display name of erlang service.");
+ log_error(L"Could not get Display name of erlang service.");
set_stopped(ERROR_CANTREAD);
return;
}
- SetEnvironmentVariable((LPCTSTR) SERVICE_ENV, (LPCTSTR) service_name);
+ SetEnvironmentVariableW(SERVICE_ENV, service_name);
- strncat(event_name, service_name, MAX_PATH - strlen(event_name));
- event_name[MAX_PATH - 1] = '\0';
+ wcsncat(event_name, service_name, MAX_PATH - wcslen(event_name));
+ event_name[MAX_PATH - 1] = L'\0';
- if(!GetModuleFileName(NULL, executable_name, MAX_PATH)){
- log_error("Unable to retrieve module file name, " EXECUTABLE_ENV
- " will not be set.");
+ if(!GetModuleFileNameW(NULL, executable_name, MAX_PATH)){
+ log_error(L"Unable to retrieve module file name, " EXECUTABLE_ENV
+ L" will not be set.");
} else {
- char quoted_exe_name[MAX_PATH+4];
- sprintf(quoted_exe_name, "\"%s\"", executable_name);
- SetEnvironmentVariable((LPCTSTR) EXECUTABLE_ENV,
- (LPCTSTR) quoted_exe_name);
+ wchar_t quoted_exe_name[MAX_PATH+4];
+ swprintf(quoted_exe_name, MAX_PATH+4, L"\"%s\"", executable_name);
+ SetEnvironmentVariableW(EXECUTABLE_ENV, quoted_exe_name);
}
- log_debug("Here we go, service_main_loop...");
+ log_debug(L"Here we go, service_main_loop...");
currentState = SERVICE_START_PENDING;
InitializeCriticalSection(&crit);
eventStop = CreateEvent(NULL,FALSE,FALSE,NULL);
@@ -730,13 +749,13 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
} else {
srvi.event_name = NULL;
}
- statusHandle = RegisterServiceCtrlHandler(real_service_name, &handler);
+ statusHandle = RegisterServiceCtrlHandlerW(real_service_name, &handler);
if(!statusHandle)
return;
set_start_pending(waithint,checkpoint);
keys = get_keys(service_name);
if(!keys){
- log_error("Could not get registry keys for erlang service.");
+ log_error(L"Could not get registry keys for erlang service.");
set_stopped(ERROR_CANTREAD);
return;
}
@@ -745,7 +764,7 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
++checkpoint;
if(!start_a_service(&srvi)){
- log_error("Could not start erlang machine");
+ log_error(L"Could not start erlang machine");
set_stopped(ERROR_PROCESS_ABORTED);
if (eventKillErlang != NULL) {
CloseHandle(eventKillErlang);
@@ -769,16 +788,16 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
if(ret == WAIT_TIMEOUT){
/* Just do the "success reporting" and continue */
if(success_wait == INITIAL_SUCCESS_WAIT){
- log_info("Erlang service started successfully.");
+ log_info(L"Erlang service started successfully.");
} else {
- log_warning("Erlang service restarted");
+ log_warning(L"Erlang service restarted");
}
success_wait = NO_SUCCESS_WAIT;
continue;
}
if(ret == WAIT_FAILED || (int)(ret-WAIT_OBJECT_0) >= 2){
set_stopped(WAIT_FAILED);
- log_error("Internal error, could not wait for objects.");
+ log_error(L"Internal error, could not wait for objects.");
if (eventKillErlang != NULL) {
CloseHandle(eventKillErlang);
}
@@ -791,7 +810,7 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
checkpoint = 2; /* 1 is taken by the handler */
set_stop_pending(waithint,checkpoint);
if(stop_erlang(&srvi,waithint,&checkpoint)){
- log_debug("Erlang machine is stopped");
+ log_debug(L"Erlang machine is stopped");
CloseHandle(eventStop);
if (eventKillErlang != NULL) {
CloseHandle(eventKillErlang);
@@ -802,7 +821,7 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
free_keys(keys);
return;
} else {
- log_warning("Unable to stop erlang service.");
+ log_warning(L"Unable to stop erlang service.");
set_running();
continue;
}
@@ -811,12 +830,12 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
save_keys = keys;
keys = get_keys(service_name);
if(!keys){
- log_error("Could not reload registry keys.");
+ log_error(L"Could not reload registry keys.");
keys = srvi.keys = save_keys;
} else {
#ifdef HARDDEBUG
- sprintf(errorbuff,"Reloaded the registry keys because %s stopped.",
- service_name);
+ swprintf(errorbuff,2048,L"Reloaded the registry keys because %s stopped.",
+ service_name);
log_debug(errorbuff);
#endif /* HARDDEBUG */
free_keys(save_keys);
@@ -827,7 +846,7 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
if(!GetProcessTimes(srvi.info.hProcess,&creationt,
&exitt,&kernelt,&usert)){
DWORD rcode = GetLastError();
- log_error("Could not get process time of terminated process.");
+ log_error(L"Could not get process time of terminated process.");
CloseHandle(srvi.info.hProcess);
CloseHandle(srvi.info.hThread);
CloseHandle(eventStop);
@@ -850,15 +869,14 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
diffl = exitl - creationl;
diffl /= 10000000;
#ifdef DEBUG
- sprintf(errorbuff,"Process lived for %d seconds", (int) diffl);
+ swprintf(errorbuff,2048,L"Process lived for %d seconds", (int) diffl);
log_debug(errorbuff);
#endif
if(diffl > CYCLIC_RESTART_LIMIT ||
srvi.keys[OnFail].data.value == ON_FAIL_RESTART_ALWAYS){
if(!start_a_service(&srvi)){
- log_error("Unable to restart failed erlang service, "
- "aborting.");
+ log_error(L"Unable to restart failed erlang service, aborting.");
CloseHandle(eventStop);
set_stopped(ERROR_PROCESS_ABORTED);
if (eventKillErlang != NULL) {
@@ -867,19 +885,19 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
free_keys(keys);
return;
}
- log_warning("Restarted erlang machine.");
+ log_warning(L"Restarted erlang machine.");
if(diffl <= CYCLIC_RESTART_LIMIT)
- log_warning("Possible cyclic restarting of erlang machine.");
+ log_warning(L"Possible cyclic restarting of erlang machine.");
success_wait = RESTART_SUCCESS_WAIT;
harr[0] = srvi.info.hProcess;
} else {
if(success_wait == INITIAL_SUCCESS_WAIT){
- log_error("Erlang machine stopped instantly "
- "(distribution name conflict?). "
- "The service is not restarted, ignoring OnFail option.");
+ log_error(L"Erlang machine stopped instantly "
+ L"(distribution name conflict?). "
+ L"The service is not restarted, ignoring OnFail option.");
} else {
- log_error("Erlang machine seems to die "
- "continously, not restarted.");
+ log_error(L"Erlang machine seems to die "
+ L"continously, not restarted.");
}
CloseHandle(eventStop);
set_stopped(ERROR_PROCESS_ABORTED);
@@ -890,21 +908,21 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
return;
}
} else if(srvi.keys[OnFail].data.value == ON_FAIL_REBOOT){
- log_error("Rebooting because erlang machine stopped.");
+ log_error(L"Rebooting because erlang machine stopped.");
enable_privilege();
if(!InitiateSystemShutdown("",NULL,0,TRUE,TRUE)){
- log_error("Failed to reboot!");
+ log_error(L"Failed to reboot!");
#ifdef HARDDEBUG
{
- char *mes;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &mes,
- 0,
- NULL );
+ wchar_t *mes;
+ FormatMessageW(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPWSTR) &mes,
+ 0,
+ NULL );
log_debug(mes);
LocalFree(mes);
}
@@ -923,13 +941,13 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
} else {
DWORD ecode = NO_ERROR;
if(success_wait == NO_SUCCESS_WAIT){
- log_warning("Erlang machine voluntarily stopped. "
- "The service is not restarted as OnFail "
- "is set to ignore.");
+ log_warning(L"Erlang machine voluntarily stopped. "
+ L"The service is not restarted as OnFail "
+ L"is set to ignore.");
} else {
- log_error("Erlang machine stopped instantly "
- "(distribution name conflict?). "
- "The service is not restarted as OnFail is set to ignore.");
+ log_error(L"Erlang machine stopped instantly "
+ L"(distribution name conflict?). "
+ L"The service is not restarted as OnFail is set to ignore.");
ecode = ERROR_PROCESS_ABORTED;
}
CloseHandle(srvi.info.hProcess);
@@ -946,20 +964,19 @@ static VOID WINAPI service_main_loop(DWORD argc, char **argv){
}
}
-int service_main(int argc, char **argv){
- char dummy_name[] = "";
- SERVICE_TABLE_ENTRY serviceTable[] =
+int service_main(int argc, wchar_t **argv){
+ wchar_t dummy_name[] = L"";
+ SERVICE_TABLE_ENTRYW serviceTable[] =
{
{ dummy_name,
- (LPSERVICE_MAIN_FUNCTION) service_main_loop},
+ (LPSERVICE_MAIN_FUNCTIONW) service_main_loop},
{ NULL, NULL }
};
BOOL success;
- success =
- StartServiceCtrlDispatcher(serviceTable);
+ success = StartServiceCtrlDispatcherW(serviceTable);
if (!success)
- log_error("Could not initiate service");
- log_debug("service_main done its job");
+ log_error(L"Could not initiate service");
+ log_debug(L"service_main done its job");
return 0;
}
diff --git a/erts/etc/win32/erlsrv/erlsrv_service.h b/erts/etc/win32/erlsrv/erlsrv_service.h
index 3eab275836..c46689d83e 100644
--- a/erts/etc/win32/erlsrv/erlsrv_service.h
+++ b/erts/etc/win32/erlsrv/erlsrv_service.h
@@ -27,6 +27,6 @@
#define RESTART_SUCCESS_WAIT 2
-int service_main(int argc, char **argv);
+int service_main(int argc, wchar_t **argv);
#endif /* _ERLSRV_SERVICE_H */
diff --git a/erts/etc/win32/erlsrv/erlsrv_util.c b/erts/etc/win32/erlsrv/erlsrv_util.c
index da3c6f5ef7..4b1ba071e8 100644
--- a/erts/etc/win32/erlsrv/erlsrv_util.c
+++ b/erts/etc/win32/erlsrv/erlsrv_util.c
@@ -25,76 +25,76 @@
#include "erlsrv_util.h"
#include "erlsrv_logmess.h"
-char *service_name = "";
-char *real_service_name = "";
+wchar_t *service_name = L"";
+wchar_t *real_service_name = L"";
-void log_warning(char *mess){
+void log_warning(wchar_t *mess){
HANDLE logh;
- char *strings[] = {service_name, mess , NULL};
+ wchar_t *strings[] = {service_name, mess , NULL};
- if(!(logh = RegisterEventSource(NULL,APP_NAME)))
+ if(!(logh = RegisterEventSourceW(NULL,APP_NAME)))
return;
- ReportEvent(logh, EVENTLOG_WARNING_TYPE, 0, MSG_WARNING,
- NULL, 2, 0, strings, NULL);
+ ReportEventW(logh, EVENTLOG_WARNING_TYPE, 0, MSG_WARNING,
+ NULL, 2, 0, strings, NULL);
DeregisterEventSource(logh);
}
-void log_error(char *mess){
+void log_error(wchar_t *mess){
HANDLE logh;
- char *strings[] = {service_name, mess , NULL};
+ wchar_t *strings[] = {service_name, mess , NULL};
- if(!(logh = RegisterEventSource(NULL,APP_NAME)))
+ if(!(logh = RegisterEventSourceW(NULL,APP_NAME)))
return;
- ReportEvent(logh, EVENTLOG_ERROR_TYPE, 0, MSG_ERROR,
- NULL, 2, 0, strings, NULL);
+ ReportEventW(logh, EVENTLOG_ERROR_TYPE, 0, MSG_ERROR,
+ NULL, 2, 0, strings, NULL);
DeregisterEventSource(logh);
}
-void log_info(char *mess){
+void log_info(wchar_t *mess){
HANDLE logh;
- char *strings[] = {service_name, mess , NULL};
+ wchar_t *strings[] = {service_name, mess , NULL};
- if(!(logh = RegisterEventSource(NULL,APP_NAME)))
+ if(!(logh = RegisterEventSourceW(NULL,APP_NAME)))
return;
- ReportEvent(logh, EVENTLOG_INFORMATION_TYPE, 0, MSG_INFO,
- NULL, 2, 0, strings, NULL);
+ ReportEventW(logh, EVENTLOG_INFORMATION_TYPE, 0, MSG_INFO,
+ NULL, 2, 0, strings, NULL);
DeregisterEventSource(logh);
}
#ifndef NDEBUG
-void log_debug(char *mess){
- char *buff=malloc(strlen(mess)+100);
- sprintf(buff,"DEBUG! %s",mess);
+void log_debug(wchar_t *mess){
+ wchar_t *buff=malloc((wcslen(mess)+100)*sizeof(wchar_t));
+ swprintf(buff,wcslen(mess)+100,L"DEBUG! %s",mess);
log_info(buff);
free(buff);
}
#endif
-char *envdup(char *env){
- char *tmp;
+wchar_t *envdup(wchar_t *env){
+ wchar_t *tmp;
int len;
- for(tmp = env; *tmp != '\0'; tmp += strlen(tmp)+1)
+ for(tmp = env; *tmp != L'\0'; tmp += wcslen(tmp)+1)
;
len = (tmp - env) + 1;
if(len == 1)
++len;
- tmp = malloc(len);
- memcpy(tmp,env,len);
+ tmp = malloc(len*sizeof(wchar_t));
+ memcpy(tmp,env,len*sizeof(wchar_t));
return tmp;
}
-char **env_to_arg(char *env){
- char **ret;
- char *tmp;
+wchar_t **env_to_arg(wchar_t *env){
+ wchar_t **ret;
+ wchar_t *tmp;
int i;
int num_strings = 0;
- for(tmp = env; *tmp != '\0'; tmp += strlen(tmp)+1)
+ for(tmp = env; *tmp != L'\0'; tmp += wcslen(tmp)+1)
++num_strings;
/* malloc enough to insert ONE string */
- ret = malloc(sizeof(char *) * (num_strings + 2));
+ ret = malloc(sizeof(wchar_t *) * (num_strings + 2));
i = 0;
- for(tmp = env; *tmp != '\0'; tmp += strlen(tmp)+1){
- ret[i++] = strdup(tmp);
+ for(tmp = env; *tmp != L'\0'; tmp += wcslen(tmp)+1){
+ ret[i++] = wcsdup(tmp);
}
ret[i] = NULL;
free(env);
@@ -102,52 +102,52 @@ char **env_to_arg(char *env){
}
static int compare(const void *a, const void *b){
- char *s1 = *((char **) a);
- char *s2 = *((char **) b);
- char *e1 = strchr(s1,'=');
- char *e2 = strchr(s2,'=');
+ wchar_t *s1 = *((wchar_t **) a);
+ wchar_t *s2 = *((wchar_t **) b);
+ wchar_t *e1 = wcschr(s1,L'=');
+ wchar_t *e2 = wcschr(s2,L'=');
int ret;
int len;
if(!e1)
- e1 = s1 + strlen(s1);
+ e1 = s1 + wcslen(s1);
if(!e2)
- e2 = s2 + strlen(s2);
+ e2 = s2 + wcslen(s2);
if((e1 - s1) > (e2 - s2))
len = (e2 - s2);
else
len = (e1 - s1);
- ret = _strnicmp(s1,s2,len);
+ ret = _wcsnicmp(s1,s2,len);
if(ret == 0)
return ((e1 - s1) - (e2 - s2));
else
return ret;
}
-char *arg_to_env(char **arg){
- char *block;
- char *pek;
+wchar_t *arg_to_env(wchar_t **arg){
+ wchar_t *block;
+ wchar_t *pek;
int i;
int totlen = 1; /* extra '\0' */
for(i=0;arg[i] != NULL;++i)
- totlen += strlen(arg[i])+1;
+ totlen += wcslen(arg[i])+1;
/* sort the environment vector */
- qsort(arg,i,sizeof(char *),&compare);
+ qsort(arg,i,sizeof(wchar_t *),&compare);
if(totlen == 1){
- block = malloc(2);
- block[0] = block[1] = '\0';
+ block = malloc(2*sizeof(wchar_t));
+ block[0] = block[1] = L'\0';
} else {
- block = malloc(totlen);
+ block = malloc(totlen*sizeof(wchar_t));
pek = block;
for(i=0; arg[i] != NULL; ++i){
- strcpy(pek, arg[i]);
+ wcscpy(pek, arg[i]);
free(arg[i]);
- pek += strlen(pek)+1;
+ pek += wcslen(pek)+1;
}
- *pek = '\0';
+ *pek = L'\0';
}
free(arg);
return block;
diff --git a/erts/etc/win32/erlsrv/erlsrv_util.h b/erts/etc/win32/erlsrv/erlsrv_util.h
index b98a6cd3ef..6881906a52 100644
--- a/erts/etc/win32/erlsrv/erlsrv_util.h
+++ b/erts/etc/win32/erlsrv/erlsrv_util.h
@@ -19,30 +19,30 @@
#ifndef _ERLSRV_UTIL_H
#define _ERLSRV_UTIL_H
-extern char *service_name;
-extern char *real_service_name;
-void log_warning(char *mess);
-void log_error(char *mess);
-void log_info(char *mess);
+extern wchar_t *service_name;
+extern wchar_t *real_service_name;
+void log_warning(wchar_t *mess);
+void log_error(wchar_t *mess);
+void log_info(wchar_t *mess);
-char *envdup(char *env);
+wchar_t *envdup(wchar_t *env);
/*
** Call before env_to_arg to get a 'freeable' environment block.
*/
-char *arg_to_env(char **arg);
+wchar_t *arg_to_env(wchar_t **arg);
/*
** Frees the argument list before returning!
*/
-char **env_to_arg(char *env);
+wchar_t **env_to_arg(wchar_t *env);
/*
** Frees the environment block before returning!
*/
#ifndef NDEBUG
-void log_debug(char *mess);
+void log_debug(wchar_t *mess);
#else
#define log_debug(mess) /* Debug removed */
#endif
diff --git a/erts/etc/win32/init_file.c b/erts/etc/win32/init_file.c
index 52f6c41d1d..d452afa65c 100644
--- a/erts/etc/win32/init_file.c
+++ b/erts/etc/win32/init_file.c
@@ -173,7 +173,7 @@ static void digout_key_value(char *line, char **key, char **value)
}
}
-InitFile *load_init_file(char *filename)
+InitFile *load_init_file(wchar_t *filename)
{
HANDLE infile;
InitFile *inif;
@@ -187,13 +187,13 @@ InitFile *load_init_file(char *filename)
int i;
- if ( (infile = CreateFile(filename,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL)) == INVALID_HANDLE_VALUE) {
+ if ( (infile = CreateFileW(filename,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == INVALID_HANDLE_VALUE) {
return NULL;
}
@@ -280,7 +280,7 @@ InitFile *load_init_file(char *filename)
return inif;
}
-int store_init_file(InitFile *inif, char *filename)
+int store_init_file(InitFile *inif, wchar_t *filename)
{
char *buff;
int size = 10;
@@ -297,13 +297,13 @@ int store_init_file(InitFile *inif, char *filename)
buff[num++] = (Char); \
} while(0)
- if ( (outfile = CreateFile(filename,
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL,
- CREATE_ALWAYS,
- FILE_ATTRIBUTE_NORMAL,
- NULL)) == INVALID_HANDLE_VALUE) {
+ if ( (outfile = CreateFileW(filename,
+ GENERIC_WRITE,
+ FILE_SHARE_WRITE,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == INVALID_HANDLE_VALUE) {
return INIT_FILE_OPEN_ERROR;
}
buff = ALLOC(size);
diff --git a/erts/etc/win32/init_file.h b/erts/etc/win32/init_file.h
index 48d2d2df62..ae40e88520 100644
--- a/erts/etc/win32/init_file.h
+++ b/erts/etc/win32/init_file.h
@@ -36,10 +36,10 @@ typedef struct {
} InitFile;
/* Load a file structure from a disk file */
-InitFile *load_init_file(char *filename);
+InitFile *load_init_file(wchar_t *filename);
/* Stores a file structure into a disk file */
-int store_init_file(InitFile *inif, char *filename);
+int store_init_file(InitFile *inif, wchar_t *filename);
/* Create an empty file structure */
InitFile *create_init_file(void);
diff --git a/erts/etc/win32/start_erl.c b/erts/etc/win32/start_erl.c
index facf79e5ff..0ca12f09c9 100644
--- a/erts/etc/win32/start_erl.c
+++ b/erts/etc/win32/start_erl.c
@@ -30,7 +30,7 @@
#include <windows.h>
#include <assert.h>
-char *progname;
+wchar_t *progname;
/*
* If CASE_SENSITIVE_OPTIONS is specified, options are case sensitive
@@ -43,26 +43,26 @@ char *progname;
#define strnicmp _strnicmp
#endif
-#define RELEASE_SUBDIR "\\releases"
-#define ERTS_SUBDIR_PREFIX "\\erts-"
-#define BIN_SUBDIR "\\bin"
-#define REGISTRY_BASE "Software\\Ericsson\\Erlang\\"
-#define DEFAULT_DATAFILE "start_erl.data"
+#define RELEASE_SUBDIR L"\\releases"
+#define ERTS_SUBDIR_PREFIX L"\\erts-"
+#define BIN_SUBDIR L"\\bin"
+#define REGISTRY_BASE L"Software\\Ericsson\\Erlang\\"
+#define DEFAULT_DATAFILE L"start_erl.data"
/* Global variables holding option values and command lines */
-char *CommandLineStart = NULL;
-char *ErlCommandLine = NULL;
-char *MyCommandLine = NULL;
-char *DataFileName = NULL;
-char *RelDir = NULL;
-char *BootFlagsFile = NULL;
-char *BootFlags = NULL;
-char *RegistryKey = NULL;
-char *BinDir = NULL;
-char *RootDir = NULL;
-char *VsnDir = NULL;
-char *Version = NULL;
-char *Release = NULL;
+wchar_t *CommandLineStart = NULL;
+wchar_t *ErlCommandLine = NULL;
+wchar_t *MyCommandLine = NULL;
+wchar_t *DataFileName = NULL;
+wchar_t *RelDir = NULL;
+wchar_t *BootFlagsFile = NULL;
+wchar_t *BootFlags = NULL;
+wchar_t *RegistryKey = NULL;
+wchar_t *BinDir = NULL;
+wchar_t *RootDir = NULL;
+wchar_t *VsnDir = NULL;
+wchar_t *Version = NULL;
+wchar_t *Release = NULL;
BOOL NoConfig=FALSE;
PROCESS_INFORMATION ErlProcessInfo;
@@ -100,7 +100,7 @@ void exit_help(char *err)
ShowLastError();
fprintf(stderr, "** Error: %s\n", err);
- printf("Usage:\n%s\n"
+ printf("Usage:\n%S\n"
" [<erlang options>] ++\n"
" [-data <datafile>]\n"
" {-rootdir <erlang root directory> | \n"
@@ -119,56 +119,56 @@ void exit_help(char *err)
*/
void split_commandline(void)
{
- char *cmdline = CommandLineStart;
+ wchar_t *cmdline = CommandLineStart;
progname=cmdline;
/* Remove the first (quoted) string (our program name) */
- if(*cmdline == '"') {
+ if(*cmdline == L'"') {
cmdline++; /* Skip " */
- while( (*cmdline != '\0') && (*cmdline++) != '"' )
+ while( (*cmdline != L'\0') && (*cmdline++) != L'"' )
;
} else {
- while( (*cmdline != '\0') && (*cmdline++) != ' ' )
+ while( (*cmdline != L'\0') && (*cmdline++) != L' ' )
;
}
- while( (*cmdline) == ' ' )
+ while( (*cmdline) == L' ' )
cmdline++;
- if( *cmdline == '\0') {
- ErlCommandLine = "";
- MyCommandLine = "";
+ if( *cmdline == L'\0') {
+ ErlCommandLine = L"";
+ MyCommandLine = L"";
return;
}
- cmdline[-1] = '\0';
+ cmdline[-1] = L'\0';
/* Start from the end of the string and search for "++ "
(PLUS PLUS SPACE) */
ErlCommandLine = cmdline;
- if(strncmp(cmdline,"++ ",3))
- cmdline = strstr(cmdline," ++ ");
+ if(wcsncmp(cmdline,L"++ ",3))
+ cmdline = wcsstr(cmdline,L" ++ ");
if( cmdline == NULL ) {
- MyCommandLine = "";
+ MyCommandLine = L"";
return;
}
/* Terminate the ErlCommandLine where MyCommandLine starts */
*cmdline++ = '\0';
/* Skip 'whitespace--whitespace' (WHITESPACE MINUS MINUS WHITESPACE) */
- while( (*cmdline) == ' ' )
+ while( (*cmdline) == L' ' )
cmdline++;
- while( (*cmdline) == '+' )
+ while( (*cmdline) == L'+' )
cmdline++;
- while( (*cmdline) == ' ' )
+ while( (*cmdline) == L' ' )
cmdline++;
MyCommandLine = cmdline;
#ifdef _DEBUG
- fprintf(stderr, "ErlCommandLine: '%s'\n", ErlCommandLine);
- fprintf(stderr, "MyCommandLine: '%s'\n", MyCommandLine);
+ fprintf(stderr, "ErlCommandLine: '%S'\n", ErlCommandLine);
+ fprintf(stderr, "MyCommandLine: '%S'\n", MyCommandLine);
#endif
}
@@ -178,30 +178,30 @@ void split_commandline(void)
* Skips any leading spaces and parses up to NULL or end of quoted string.
* Calls exit_help() if an unterminated quote is detected.
*/
-char * unquote_optionarg(char *str, char **strp)
+wchar_t * unquote_optionarg(wchar_t *str, wchar_t **strp)
{
- char *newstr = (char *)malloc(strlen(str)+1); /* This one is
- realloc:ed later */
+ /* This one is realloc:ed later */
+ wchar_t *newstr = (wchar_t *)malloc((wcslen(str)+1)*sizeof(wchar_t));
int i = 0, inquote = 0;
assert(newstr);
assert(str);
/* Skip leading spaces */
- while( *str == ' ' )
+ while( *str == L' ' )
str++;
/* Loop while in quote or until EOS or unquoted space
*/
- while( (inquote==1) || ( (*str!=0) && (*str!=' ') ) ) {
+ while( (inquote==1) || ( (*str!=0) && (*str!=L' ') ) ) {
switch( *str ) {
- case '\\':
+ case L'\\':
/* If we are inside a quoted string we should convert \c to c */
- if( inquote && str[1] == '"' )
+ if( inquote && str[1] == L'"' )
str++;
newstr[i++]=*str++;
break;
- case '"':
+ case L'"':
inquote = 1-inquote;
*str++;
break;
@@ -220,7 +220,7 @@ char * unquote_optionarg(char *str, char **strp)
*strp = str;
/* Adjust memblock of newstr */
- newstr = (char *)realloc(newstr, i);
+ newstr = (wchar_t *)realloc(newstr, i*sizeof(wchar_t));
assert(newstr);
return(newstr);
}
@@ -232,34 +232,34 @@ char * unquote_optionarg(char *str, char **strp)
*/
void parse_commandline(void)
{
- char *cmdline = MyCommandLine;
+ wchar_t *cmdline = MyCommandLine;
- while( *cmdline != '\0' ) {
+ while( *cmdline != L'\0' ) {
switch( *cmdline ) {
case '-': /* Handle both -arg and /arg */
case '/':
*cmdline++;
- if( strnicmp(cmdline, "data", 4) == 0) {
+ if( _wcsnicmp(cmdline, L"data", 4) == 0) {
DataFileName = unquote_optionarg(cmdline+4, &cmdline);
- } else if( strnicmp(cmdline, "rootdir", 7) == 0) {
+ } else if( _wcsnicmp(cmdline, L"rootdir", 7) == 0) {
RootDir = unquote_optionarg(cmdline+7, &cmdline);
#ifdef _DEBUG
- fprintf(stderr, "RootDir: '%s'\n", RootDir);
+ fprintf(stderr, "RootDir: '%S'\n", RootDir);
#endif
- } else if( strnicmp(cmdline, "reldir", 6) == 0) {
+ } else if( _wcsnicmp(cmdline, L"reldir", 6) == 0) {
RelDir = unquote_optionarg(cmdline+6, &cmdline);
#ifdef _DEBUG
- fprintf(stderr, "RelDir: '%s'\n", RelDir);
+ fprintf(stderr, "RelDir: '%S'\n", RelDir);
#endif
- } else if( strnicmp(cmdline, "bootflags", 9) == 0) {
+ } else if( _wcsnicmp(cmdline, L"bootflags", 9) == 0) {
BootFlagsFile = unquote_optionarg(cmdline+9, &cmdline);
- } else if( strnicmp(cmdline, "noconfig", 8) == 0) {
+ } else if( _wcsnicmp(cmdline, L"noconfig", 8) == 0) {
NoConfig=TRUE;
#ifdef _DEBUG
fprintf(stderr, "NoConfig=TRUE\n");
#endif
} else {
- fprintf(stderr, "Unkown option: '%s'\n", cmdline);
+ fprintf(stderr, "Unkown option: '%S'\n", cmdline);
exit_help("Unknown command line option");
}
break;
@@ -281,32 +281,35 @@ void parse_commandline(void)
void read_datafile(void)
{
FILE *fp;
- char *newname;
+ wchar_t *newname;
long size;
+ char *ver;
+ char *rel;
- if(!DataFileName){
- DataFileName = malloc(strlen(DEFAULT_DATAFILE) + 1);
- strcpy(DataFileName,DEFAULT_DATAFILE);
+ if(!DataFileName){
+ DataFileName = malloc((wcslen(DEFAULT_DATAFILE) + 1)*sizeof(wchar_t));
+ wcscpy(DataFileName,DEFAULT_DATAFILE);
}
/* Is DataFileName relative or absolute ? */
- if( (DataFileName[0] != '\\') && (strncmp(DataFileName+1, ":\\", 2)!=0) ) {
+ if( (DataFileName[0] != L'\\') && (wcsncmp(DataFileName+1, L":\\", 2)!=0) ) {
/* Relative name, we have to prepend RelDir to it. */
if( !RelDir ) {
exit_help("Need -reldir when -data filename has relative path.");
} else {
- newname = (char *)malloc(strlen(DataFileName)+strlen(RelDir)+2);
+ size = (wcslen(DataFileName)+wcslen(RelDir)+2);
+ newname = (wchar_t *)malloc(size*sizeof(wchar_t));
assert(newname);
- sprintf(newname, "%s\\%s", RelDir, DataFileName);
+ swprintf(newname, size, L"%s\\%s", RelDir, DataFileName);
free(DataFileName);
DataFileName=newname;
}
}
#ifdef _DEBUG
- fprintf(stderr, "DataFileName: '%s'\n", DataFileName);
+ fprintf(stderr, "DataFileName: '%S'\n", DataFileName);
#endif
- if( (fp=fopen(DataFileName, "rb")) == NULL) {
+ if( (fp=_wfopen(DataFileName, L"rb")) == NULL) {
exit_help("Cannot find the datafile.");
}
@@ -314,21 +317,33 @@ void read_datafile(void)
size=ftell(fp);
fseek(fp, 0, SEEK_SET);
- Version = (char *)malloc(size+1);
- Release = (char *)malloc(size+1);
- assert(Version);
- assert(Release);
+ ver = (char *)malloc(size+1);
+ rel = (char *)malloc(size+1);
+ assert(ver);
+ assert(rel);
- if( (fscanf(fp, "%s %s", Version, Release)) == 0) {
+ if( (fscanf(fp, "%s %s", ver, rel)) == 0) {
fclose(fp);
exit_help("Format error in datafile.");
}
fclose(fp);
+ size = MultiByteToWideChar(CP_UTF8, 0, ver, -1, NULL, 0);
+ Version = malloc(size*sizeof(wchar_t));
+ assert(Version);
+ MultiByteToWideChar(CP_UTF8, 0, ver, -1, Version, size);
+ free(ver);
+
+ size = MultiByteToWideChar(CP_UTF8, 0, rel, -1, NULL, 0);
+ Release = malloc(size*sizeof(wchar_t));
+ assert(Release);
+ MultiByteToWideChar(CP_UTF8, 0, rel, -1, Release, size);
+ free(rel);
+
#ifdef _DEBUG
- fprintf(stderr, "DataFile version: '%s'\n", Version);
- fprintf(stderr, "DataFile release: '%s'\n", Release);
+ fprintf(stderr, "DataFile version: '%S'\n", Version);
+ fprintf(stderr, "DataFile release: '%S'\n", Release);
#endif
}
@@ -340,31 +355,33 @@ void read_bootflags(void)
{
FILE *fp;
long fsize;
- char *newname;
-
+ wchar_t *newname;
+ char *bootf;
+
if(BootFlagsFile) {
/* Is BootFlagsFile relative or absolute ? */
- if( (BootFlagsFile[0] != '\\') &&
- (strncmp(BootFlagsFile+1, ":\\", 2)!=0) ) {
+ if( (BootFlagsFile[0] != L'\\') &&
+ (wcsncmp(BootFlagsFile+1, L":\\", 2)!=0) ) {
/* Relative name, we have to prepend RelDir\\Version to it. */
if( !RelDir ) {
exit_help("Need -reldir when -bootflags "
"filename has relative path.");
} else {
- newname = (char *)malloc(strlen(BootFlagsFile)+
- strlen(RelDir)+strlen(Release)+3);
+ int len = wcslen(BootFlagsFile)+
+ wcslen(RelDir)+wcslen(Release)+3;
+ newname = (wchar_t *)malloc(len*sizeof(wchar_t));
assert(newname);
- sprintf(newname, "%s\\%s\\%s", RelDir, Release, BootFlagsFile);
+ swprintf(newname, len, L"%s\\%s\\%s", RelDir, Release, BootFlagsFile);
free(BootFlagsFile);
BootFlagsFile=newname;
}
}
#ifdef _DEBUG
- fprintf(stderr, "BootFlagsFile: '%s'\n", BootFlagsFile);
+ fprintf(stderr, "BootFlagsFile: '%S'\n", BootFlagsFile);
#endif
- if( (fp=fopen(BootFlagsFile, "rb")) == NULL) {
+ if( (fp=_wfopen(BootFlagsFile, L"rb")) == NULL) {
exit_help("Could not open BootFlags file.");
}
@@ -372,80 +389,86 @@ void read_bootflags(void)
fsize=ftell(fp);
fseek(fp, 0, SEEK_SET);
- BootFlags = (char *)malloc(fsize+1);
- assert(BootFlags);
- if( (fgets(BootFlags, fsize+1, fp)) == NULL) {
+ bootf = (char *)malloc(fsize+1);
+ assert(bootf);
+ if( (fgets(bootf, fsize+1, fp)) == NULL) {
exit_help("Error while reading BootFlags file");
}
fclose(fp);
/* Adjust buffer size */
- BootFlags = (char *)realloc(BootFlags, strlen(BootFlags)+1);
- assert(BootFlags);
+ bootf = (char *)realloc(bootf, strlen(bootf)+1);
+ assert(bootf);
/* Strip \r\n from BootFlags */
- fsize = strlen(BootFlags);
+ fsize = strlen(bootf);
while( fsize > 0 &&
- ( (BootFlags[fsize-1] == '\r') ||
- (BootFlags[fsize-1] == '\n') ) ) {
- BootFlags[--fsize]=0;
+ ( (bootf[fsize-1] == '\r') ||
+ (bootf[fsize-1] == '\n') ) ) {
+ bootf[--fsize]=0;
}
-
+ fsize = MultiByteToWideChar(CP_UTF8, 0, bootf, -1, NULL, 0);
+ BootFlags = malloc(fsize*sizeof(wchar_t));
+ assert(BootFlags);
+ MultiByteToWideChar(CP_UTF8, 0, bootf, -1, BootFlags, fsize);
+ free(bootf);
} else {
/* Set empty BootFlags */
- BootFlags = "";
+ BootFlags = L"";
}
#ifdef _DEBUG
- fprintf(stderr, "BootFlags: '%s'\n", BootFlags);
+ fprintf(stderr, "BootFlags: '%S'\n", BootFlags);
#endif
}
long start_new_node(void)
{
- char *CommandLine;
+ wchar_t *CommandLine;
unsigned long i;
- STARTUPINFO si;
- DWORD dwExitCode;
+ STARTUPINFOW si;
+ DWORD dwExitCode;
- i = strlen(RelDir) + strlen(Release) + 4;
- VsnDir = (char *)malloc(i);
+ i = wcslen(RelDir) + wcslen(Release) + 4;
+ VsnDir = (wchar_t *)malloc(i*sizeof(wchar_t));
assert(VsnDir);
- sprintf(VsnDir, "%s\\%s", RelDir, Release);
+ swprintf(VsnDir, i, L"%s\\%s", RelDir, Release);
if( NoConfig ) {
- i = strlen(BinDir) + strlen(ErlCommandLine) +
- strlen(BootFlags) + 64;
- CommandLine = (char *)malloc(i);
+ i = wcslen(BinDir) + wcslen(ErlCommandLine) +
+ wcslen(BootFlags) + 64;
+ CommandLine = (wchar_t *)malloc(i*sizeof(wchar_t));
assert(CommandLine);
- sprintf(CommandLine,
- "\"%s\\erl.exe\" -boot \"%s\\start\" %s %s",
- BinDir,
- VsnDir,
- ErlCommandLine,
- BootFlags);
+ swprintf(CommandLine,
+ i,
+ L"\"%s\\erl.exe\" -boot \"%s\\start\" %s %s",
+ BinDir,
+ VsnDir,
+ ErlCommandLine,
+ BootFlags);
} else {
- i = strlen(BinDir) + strlen(ErlCommandLine)
- + strlen(BootFlags) + strlen(VsnDir)*2 + 64;
- CommandLine = (char *)malloc(i);
+ i = wcslen(BinDir) + wcslen(ErlCommandLine)
+ + wcslen(BootFlags) + wcslen(VsnDir)*2 + 64;
+ CommandLine = (wchar_t *)malloc(i*sizeof(wchar_t));
assert(CommandLine);
- sprintf(CommandLine,
- "\"%s\\erl.exe\" -boot \"%s\\start\" -config \"%s\\sys\" %s %s",
- BinDir,
- VsnDir,
- VsnDir,
- ErlCommandLine,
- BootFlags);
+ swprintf(CommandLine,
+ i,
+ L"\"%s\\erl.exe\" -boot \"%s\\start\" -config \"%s\\sys\" %s %s",
+ BinDir,
+ VsnDir,
+ VsnDir,
+ ErlCommandLine,
+ BootFlags);
}
#ifdef _DEBUG
- fprintf(stderr, "CommandLine: '%s'\n", CommandLine);
+ fprintf(stderr, "CommandLine: '%S'\n", CommandLine);
#endif
/* Initialize the STARTUPINFO structure. */
- memset(&si, 0, sizeof(STARTUPINFO));
- si.cb = sizeof(STARTUPINFO);
+ memset(&si, 0, sizeof(STARTUPINFOW));
+ si.cb = sizeof(STARTUPINFOW);
si.lpTitle = NULL;
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
@@ -453,19 +476,19 @@ long start_new_node(void)
si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
/* Create the new Erlang process */
- if( (CreateProcess(
- NULL, /* pointer to name of executable module */
- CommandLine, /* pointer to command line string */
- NULL, /* pointer to process security attributes */
- NULL, /* pointer to thread security attributes */
- TRUE, /* handle inheritance flag */
- GetPriorityClass(GetCurrentProcess()),
- /* creation flags */
- NULL, /* pointer to new environment block */
- BinDir,/* pointer to current directory name */
- &si, /* pointer to STARTUPINFO */
- &ErlProcessInfo /* pointer to PROCESS_INFORMATION */
- )) == FALSE) {
+ if( (CreateProcessW(
+ NULL, /* pointer to name of executable module */
+ CommandLine, /* pointer to command line string */
+ NULL, /* pointer to process security attributes */
+ NULL, /* pointer to thread security attributes */
+ TRUE, /* handle inheritance flag */
+ GetPriorityClass(GetCurrentProcess()),
+ /* creation flags */
+ NULL, /* pointer to new environment block */
+ BinDir,/* pointer to current directory name */
+ &si, /* pointer to STARTUPINFO */
+ &ErlProcessInfo /* pointer to PROCESS_INFORMATION */
+ )) == FALSE) {
ShowLastError();
exit_help("Failed to start new node");
}
@@ -504,6 +527,7 @@ long start_new_node(void)
*/
void complete_options(void)
{
+ int len;
/* Try to find a descent RelDir */
if( !RelDir ) {
DWORD sz = 32;
@@ -511,15 +535,13 @@ void complete_options(void)
DWORD nsz;
if (RelDir)
free(RelDir);
- RelDir = malloc(sz);
+ RelDir = malloc(sz*sizeof(wchar_t));
if (!RelDir) {
fprintf(stderr, "** Error : failed to allocate memory\n");
exit(1);
}
SetLastError(0);
- nsz = GetEnvironmentVariable((LPCTSTR) "RELDIR",
- (LPTSTR) RelDir,
- sz);
+ nsz = GetEnvironmentVariableW(L"RELDIR", RelDir, sz);
if (nsz == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
free(RelDir);
RelDir = NULL;
@@ -536,9 +558,10 @@ void complete_options(void)
exit_help("Need either Root directory nor Release directory.");
}
/* Ok, construct our own RelDir from RootDir */
- RelDir = (char *) malloc(strlen(RootDir)+strlen(RELEASE_SUBDIR)+1);
+ sz = wcslen(RootDir)+wcslen(RELEASE_SUBDIR)+1;
+ RelDir = (wchar_t *) malloc(sz * sizeof(wchar_t));
assert(RelDir);
- sprintf(RelDir, "%s" RELEASE_SUBDIR, RootDir);
+ swprintf(RelDir, sz, L"%s" RELEASE_SUBDIR, RootDir);
read_datafile();
} else {
read_datafile();
@@ -548,32 +571,32 @@ void complete_options(void)
}
if( !RootDir ) {
/* Try to construct RootDir from RelDir */
- char *p;
- RootDir = malloc(strlen(RelDir)+1);
- strcpy(RootDir,RelDir);
- p = RootDir+strlen(RootDir)-1;
- if (p >= RootDir && (*p == '/' || *p == '\\'))
+ wchar_t *p;
+ RootDir = malloc((wcslen(RelDir)+1)*sizeof(wchar_t));
+ wcscpy(RootDir,RelDir);
+ p = RootDir+wcslen(RootDir)-1;
+ if (p >= RootDir && (*p == L'/' || *p == L'\\'))
--p;
- while (p >= RootDir && *p != '/' && *p != '\\')
+ while (p >= RootDir && *p != L'/' && *p != L'\\')
--p;
if (p <= RootDir) { /* Empty RootDir is also an error */
exit_help("Cannot determine Root directory from "
"Release directory.");
}
- *p = '\0';
+ *p = L'\0';
}
-
- BinDir = (char *) malloc(strlen(RootDir)+strlen(ERTS_SUBDIR_PREFIX)+
- strlen(Version)+strlen(BIN_SUBDIR)+1);
+ len = wcslen(RootDir)+wcslen(ERTS_SUBDIR_PREFIX)+
+ wcslen(Version)+wcslen(BIN_SUBDIR)+1;
+ BinDir = (wchar_t *) malloc(len * sizeof(wchar_t));
assert(BinDir);
- sprintf(BinDir, "%s" ERTS_SUBDIR_PREFIX "%s" BIN_SUBDIR, RootDir, Version);
+ swprintf(BinDir, len, L"%s" ERTS_SUBDIR_PREFIX L"%s" BIN_SUBDIR, RootDir, Version);
read_bootflags();
#ifdef _DEBUG
- fprintf(stderr, "RelDir: '%s'\n", RelDir);
- fprintf(stderr, "BinDir: '%s'\n", BinDir);
+ fprintf(stderr, "RelDir: '%S'\n", RelDir);
+ fprintf(stderr, "BinDir: '%S'\n", BinDir);
#endif
}
@@ -598,17 +621,17 @@ BOOL WINAPI LogoffHandlerRoutine( DWORD dwCtrlType )
int main(void)
{
DWORD dwExitCode;
- char *cmdline;
+ wchar_t *cmdline;
/* Make sure a logoff does not distrurb us. */
SetConsoleCtrlHandler(LogoffHandlerRoutine, TRUE);
- cmdline = GetCommandLine();
+ cmdline = GetCommandLineW();
assert(cmdline);
- CommandLineStart = (char *) malloc(strlen(cmdline) + 1);
+ CommandLineStart = (wchar_t *) malloc((wcslen(cmdline) + 1)*sizeof(wchar_t));
assert(CommandLineStart);
- strcpy(CommandLineStart,cmdline);
+ wcscpy(CommandLineStart,cmdline);
split_commandline();
parse_commandline();
diff --git a/erts/etc/win32/win_erlexec.c b/erts/etc/win32/win_erlexec.c
index 11cc6a30f7..c622e6eeee 100644
--- a/erts/etc/win32/win_erlexec.c
+++ b/erts/etc/win32/win_erlexec.c
@@ -62,12 +62,18 @@ static SysGetKeyFunction *sys_get_key_p;
static ErlStartFunction *erl_start_p;
static SysPrimitiveInitFunction *sys_primitive_init_p;
-static HMODULE load_win_beam_dll(char *name)
+/*
+ * To enable debugging of argument processing etc
+ * #define ARGS_HARDDEBUG 1
+ * #define HARDDEBUG 1
+ */
+
+static HMODULE load_win_beam_dll(wchar_t *name)
{
HMODULE beam_module;
- beam_module=LoadLibrary(name);
+ beam_module=LoadLibraryW(name);
if (beam_module == INVALID_HANDLE_VALUE || beam_module == NULL) {
- error("Unable to load emulator DLL\n(%s)",name);
+ error("Unable to load emulator DLL\n(%S)",name);
return NULL;
}
sys_get_key_p = (SysGetKeyFunction *)
@@ -83,9 +89,21 @@ static HMODULE load_win_beam_dll(char *name)
#define DLL_ENV "ERL_EMULATOR_DLL"
static void
-set_env(char *key, char *value)
+set_env(char *key, char *value) /* Both in UTF-8 encoding */
{
- if (!SetEnvironmentVariable((LPCTSTR) key, (LPCTSTR) value))
+ wchar_t *wkey=NULL;
+ wchar_t *wvalue=NULL;
+ int keylen;
+ int valuelen;
+
+
+ keylen = MultiByteToWideChar(CP_UTF8, 0, key, -1, NULL, 0);
+ valuelen = MultiByteToWideChar(CP_UTF8, 0, value, -1, NULL, 0);
+ wkey = malloc(keylen*sizeof(wchar_t));
+ wvalue = malloc(valuelen*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, key, -1, wkey, keylen);
+ MultiByteToWideChar(CP_UTF8, 0, value, -1, wvalue, valuelen);
+ if (!SetEnvironmentVariableW( wkey, wvalue))
error("SetEnvironmentVariable(\"%s\", \"%s\") failed!", key, value);
}
@@ -121,55 +139,97 @@ free_env_val(char *value)
int
-start_win_emulator(char* emu, char *start_prog, char** argv, int start_detached)
+start_win_emulator(char* utf8emu, char *utf8start_prog, char** utf8argv, int start_detached)
{
- int result;
+ int len;
+ int argc = 0;
windowed = 1;
+ while (utf8argv[argc] != NULL) {
+ ++argc;
+ }
+
if (start_detached) {
- char *buff;
+ wchar_t *start_prog=NULL;
+ int result;
+ int i;
+ wchar_t **argv;
close(0);
close(1);
close(2);
set_env("ERL_CONSOLE_MODE", "detached");
- set_env(DLL_ENV, emu);
+ set_env(DLL_ENV, utf8emu);
+
+ utf8argv[0] = utf8start_prog;
+ utf8argv = fnuttify_argv(utf8argv);
- argv[0] = start_prog;
- argv = fnuttify_argv(argv);
- result = spawnv(_P_DETACH, start_prog, argv);
- free_fnuttified(argv);
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8start_prog, -1, NULL, 0);
+ start_prog = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8start_prog, -1, start_prog, len);
+
+ /* Convert utf8argv to multibyte argv */
+ argv = malloc((argc+1) * sizeof(wchar_t*));
+ for (i=0; i<argc; i++) {
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8argv[i], -1, NULL, 0);
+ argv[i] = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8argv[i], -1, argv[i], len);
+ }
+ argv[argc] = NULL;
+
+#ifdef ARGS_HARDDEBUG
+ {
+ wchar_t tempbuf[2048] = L"";
+ wchar_t *sbuf;
+ int i;
+ sbuf=tempbuf;
+ sbuf += swprintf(sbuf, 2048, L"utf16: %s\n", start_prog);
+ for (i = 0; i < argc; ++i) {
+ sbuf += swprintf(sbuf, 2048, L"|%s|", argv[i]);
+ };
+ sbuf += swprintf(sbuf, 2048, L"\nutf8: \n");
+ for (i = 0; i < argc; ++i) {
+ sbuf += swprintf(sbuf, 2048, L"|%S|", utf8argv[i]);
+ };
+ MessageBoxW(NULL, tempbuf, L"respawn args", MB_OK|MB_ICONERROR);
+ }
+#endif
+
+ result = _wspawnv(_P_DETACH, start_prog, argv);
+ free_fnuttified(utf8argv);
+ if (result == -1) {
+ error("Failed to execute %S: %s", start_prog, win32_errorstr(_doserrno));
+ }
} else {
- int argc = 0;
+ wchar_t *emu=NULL;
#ifdef LOAD_BEAM_DYNAMICALLY
- HMODULE beam_module = load_win_beam_dll(emu);
-#endif
- set_env("ERL_CONSOLE_MODE", "window");
- while (argv[argc] != NULL) {
- ++argc;
- }
+ HMODULE beam_module = NULL;
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8emu, -1, NULL, 0);
+ emu = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8emu, -1, emu, len);
#ifdef ARGS_HARDDEBUG
{
char sbuf[2048] = "";
int i;
+ strcat(sbuf,utf8emu);
+ strcat(sbuf,":");
for (i = 0; i < argc; ++i) {
strcat(sbuf,"|");
- strcat(sbuf, argv[i]);
+ strcat(sbuf, utf8argv[i]);
strcat(sbuf,"| ");
}
- MessageBox(NULL, sbuf, "Werl", MB_OK|MB_ICONERROR);
+ MessageBox(NULL, sbuf, "erl_start args", MB_OK|MB_ICONERROR);
}
#endif
+ beam_module = load_win_beam_dll(emu);
+#endif
+ set_env("ERL_CONSOLE_MODE", "window");
#ifdef LOAD_BEAM_DYNAMICALLY
(*sys_primitive_init_p)(beam_module);
- (*erl_start_p)(argc,argv);
+ (*erl_start_p)(argc,utf8argv);
#else
- erl_start(argc, argv);
+ erl_start(argc,utf8argv);
#endif
- result = 0;
- }
- if (result == -1) {
- error("Failed to execute %s: %s", emu, win32_errorstr(_doserrno));
}
return 0;
}
@@ -186,61 +246,103 @@ do_keep_window(void)
}
int
-start_emulator(char* emu, char *start_prog, char** argv, int start_detached)
+start_emulator(char* utf8emu, char *utf8start_prog, char** utf8argv, int start_detached)
{
- int result;
static char console_mode[] = "tty:ccc";
char* fd_type;
char* title;
+ int len;
+ int argc = 0;
#ifdef HARDDEBUG
- fprintf(stderr,"emu = %s, start_prog = %s\n",emu, start_prog);
+ fprintf(stderr,"utf8emu = %s, start_prog = %s\n", utf8emu, utf8start_prog);
#endif
fd_type = strchr(console_mode, ':');
fd_type++;
_flushall();
-
+
+ while (utf8argv[argc] != NULL) {
+ ++argc;
+ }
+
/*
* If no console, we will spawn the emulator detached.
*/
if (start_detached) {
- char *buff;
+ int result;
+ int i;
+ wchar_t *start_prog=NULL;
+ wchar_t **argv;
close(0);
close(1);
close(2);
set_env("ERL_CONSOLE_MODE", "detached");
- set_env(DLL_ENV, emu);
+ set_env(DLL_ENV, utf8emu);
+
+ utf8argv[0] = utf8start_prog;
+ utf8argv = fnuttify_argv(utf8argv);
+
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8start_prog, -1, NULL, 0);
+ start_prog = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8start_prog, -1, start_prog, len);
+
+ /* Convert utf8argv to multibyte argv */
+ argv = malloc((argc+1) * sizeof(wchar_t*));
+ for (i=0; i<argc; i++) {
+ len = MultiByteToWideChar(CP_UTF8, 0,utf8argv[i], -1, NULL, 0);
+ argv[i] = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8argv[i], -1, argv[i], len);
+ }
+ argv[argc] = NULL;
- argv[0] = start_prog;
- argv = fnuttify_argv(argv);
#ifdef ARGS_HARDDEBUG
{
- char buffer[2048];
+ wchar_t buffer[2048];
int i;
- sprintf(buffer,"Start detached [%s]\n",start_prog);
+ wsprintfW(buffer,L"Start detached [%s]\n",start_prog);
for(i=0;argv[i] != NULL;++i) {
- strcat(buffer,"|");
- strcat(buffer,argv[i]);
- strcat(buffer,"|\n");
+ wcscat(buffer,L"|");
+ wcscat(buffer,argv[i]);
+ wcscat(buffer,L"|\n");
}
- MessageBox(NULL, buffer,"Start detached",MB_OK);
+ MessageBoxW(NULL, buffer, L"Start detached",MB_OK);
}
-#endif
- result = spawnv(_P_DETACH, start_prog, argv);
- free_fnuttified(argv);
+#endif
+ result = _wspawnv(_P_DETACH, start_prog, argv);
+ free_fnuttified(utf8argv);
+ free(start_prog);
+
if (result == -1) {
#ifdef ARGS_HARDDEBUG
- MessageBox(NULL, "_spawnv failed","Start detached",MB_OK);
+ MessageBox(NULL, "_wspawnv failed","Start detached",MB_OK);
#endif
return 1;
}
SetPriorityClass((HANDLE) result, GetPriorityClass(GetCurrentProcess()));
} else {
- int argc = 0;
+ wchar_t *emu=NULL;
#ifdef LOAD_BEAM_DYNAMICALLY
- HMODULE beam_module = load_win_beam_dll(emu);
+ HMODULE beam_module;
+ len = MultiByteToWideChar(CP_UTF8, 0, utf8emu, -1, NULL, 0);
+ emu = malloc(len*sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, utf8emu, -1, emu, len);
+#ifdef ARGS_HARDDEBUG
+ {
+ char sbuf[2048] = "";
+ int i;
+ strcat(sbuf,utf8emu);
+ strcat(sbuf,":");
+ for (i = 0; i < argc; ++i) {
+ strcat(sbuf,"|");
+ strcat(sbuf, utf8argv[i]);
+ strcat(sbuf,"| ");
+ }
+ MessageBox(NULL, sbuf, "erl_start args", MB_OK|MB_ICONERROR);
+ }
+#endif
+ beam_module = load_win_beam_dll(emu);
#endif
/*
@@ -254,9 +356,6 @@ start_emulator(char* emu, char *start_prog, char** argv, int start_detached)
free_env_val(title);
set_env("ERL_CONSOLE_MODE", console_mode);
- while (argv[argc] != NULL) {
- ++argc;
- }
if (keep_window) {
atexit(do_keep_window);
}
@@ -266,17 +365,17 @@ start_emulator(char* emu, char *start_prog, char** argv, int start_detached)
int i;
for (i = 0; i < argc; ++i) {
strcat(sbuf,"|");
- strcat(sbuf, argv[i]);
+ strcat(sbuf, utf8argv[i]);
strcat(sbuf,"|\n");
}
- MessageBox(NULL, sbuf, "erl", MB_OK);
+ MessageBox(NULL, sbuf, "erl_start", MB_OK);
}
#endif
#ifdef LOAD_BEAM_DYNAMICALLY
(*sys_primitive_init_p)(beam_module);
- (*erl_start_p)(argc,argv);
+ (*erl_start_p)(argc,utf8argv);
#else
- erl_start(argc, argv);
+ erl_start(argc, utf8argv);
#endif
}
return 0;
diff --git a/erts/include/erl_native_features_config.h.in b/erts/include/erl_native_features_config.h.in
new file mode 100644
index 0000000000..d1674cb256
--- /dev/null
+++ b/erts/include/erl_native_features_config.h.in
@@ -0,0 +1,21 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2004-2011. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/* Dirty scheduler support */
+#undef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
diff --git a/erts/include/internal/ethr_mutex.h b/erts/include/internal/ethr_mutex.h
index 86a1e9fbdf..6c931e0cd4 100644
--- a/erts/include/internal/ethr_mutex.h
+++ b/erts/include/internal/ethr_mutex.h
@@ -97,7 +97,7 @@ void LeaveCriticalSection(CRITICAL_SECTION *);
#if 0
# define ETHR_MTX_Q_LOCK_SPINLOCK__
# define ETHR_MTX_QLOCK_TYPE__ ethr_spinlock_t
-#elif defined(ETHR_PTHREADS)
+#elif defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)
# define ETHR_MTX_Q_LOCK_PTHREAD_MUTEX__
# define ETHR_MTX_QLOCK_TYPE__ pthread_mutex_t
#elif defined(ETHR_WIN32_THREADS)
@@ -210,7 +210,7 @@ struct ethr_cond_ {
#endif
};
-#elif defined(ETHR_PTHREADS) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
+#elif (defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
typedef struct ethr_mutex_ ethr_mutex;
struct ethr_mutex_ {
@@ -354,7 +354,7 @@ void ethr_rwmutex_rwunlock(ethr_rwmutex *);
#ifdef ETHR_MTX_HARD_DEBUG
#define ETHR_MTX_HARD_ASSERT(A) \
- ((void) ((A) ? 1 : ethr_assert_failed(__FILE__, __LINE__, #A)))
+ ((void) ((A) ? 1 : ethr_assert_failed(__FILE__, __LINE__, __func__,#A)))
#else
#define ETHR_MTX_HARD_ASSERT(A) ((void) 1)
#endif
@@ -633,7 +633,7 @@ ETHR_INLINE_MTX_FUNC_NAME_(ethr_mutex_unlock)(ethr_mutex *mtx)
#endif /* ETHR_TRY_INLINE_FUNCS */
-#elif defined(ETHR_PTHREADS) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
+#elif (defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_MUTEX_IMPL__)
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h
index 38b8e9e9b6..ad5d05704c 100644
--- a/erts/include/internal/ethread.h
+++ b/erts/include/internal/ethread.h
@@ -31,12 +31,18 @@
#endif
#include <stdlib.h>
+#include "ethread_inline.h"
#include "erl_errno.h"
#if defined(DEBUG)
# define ETHR_DEBUG
#endif
+#if defined(__PPC__) || defined (__POWERPC)
+/* OSE compiler should be fixed! */
+#define __ppc__
+#endif
+
#if defined(ETHR_DEBUG)
# undef ETHR_XCHK
# define ETHR_XCHK 1
@@ -46,21 +52,17 @@
# endif
#endif
-#undef ETHR_INLINE
-#if defined(__GNUC__)
-# define ETHR_INLINE __inline__
-#elif defined(__WIN32__)
-# define ETHR_INLINE __forceinline
-#endif
#if defined(ETHR_DEBUG) || !defined(ETHR_INLINE) || ETHR_XCHK \
|| (defined(__GNUC__) && defined(ERTS_MIXED_CYGWIN_VC))
# undef ETHR_INLINE
# define ETHR_INLINE
+# undef ETHR_FORCE_INLINE
+# define ETHR_FORCE_INLINE
# undef ETHR_TRY_INLINE_FUNCS
#endif
/* Assume 64-byte cache line size */
-#define ETHR_CACHE_LINE_SIZE 64
+#define ETHR_CACHE_LINE_SIZE ASSUMED_CACHE_LINE_SIZE
#define ETHR_CACHE_LINE_MASK (ETHR_CACHE_LINE_SIZE - 1)
#define ETHR_CACHE_LINE_ALIGN_SIZE(SZ) \
@@ -190,6 +192,30 @@ typedef DWORD ethr_tsd_key;
#define ETHR_YIELD() (Sleep(0), 0)
+#elif defined(ETHR_OSE_THREADS)
+
+#include "ose.h"
+#undef NIL
+
+#if defined(ETHR_HAVE_PTHREAD_H)
+#include <pthread.h>
+#endif
+
+typedef struct {
+ PROCESS id;
+ unsigned int tsd_key_index;
+ void *res;
+} ethr_tid;
+
+typedef OSPPDKEY ethr_tsd_key;
+
+#undef ETHR_HAVE_ETHR_SIG_FUNCS
+
+/* Out own RW mutexes are probably faster, but use OSEs mutexes */
+#define ETHR_USE_OWN_RWMTX_IMPL__
+
+#define ETHR_HAVE_THREAD_NAMES
+
#else /* No supported thread lib found */
#ifdef ETHR_NO_SUPP_THR_LIB_NOT_FATAL
@@ -256,19 +282,6 @@ ETHR_PROTO_NORETURN__ ethr_fatal_error__(const char *file,
const char *func,
int err);
-#if !defined(__GNUC__)
-# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) 0
-#elif !defined(__GNUC_MINOR__)
-# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
- ((__GNUC__ << 24) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
-#elif !defined(__GNUC_PATCHLEVEL__)
-# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
- (((__GNUC__ << 24) | (__GNUC_MINOR__ << 12)) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
-#else
-# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
- (((__GNUC__ << 24) | (__GNUC_MINOR__ << 12) | __GNUC_PATCHLEVEL__) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
-#endif
-
#if !ETHR_AT_LEAST_GCC_VSN__(2, 96, 0)
#define __builtin_expect(X, Y) (X)
#endif
@@ -351,8 +364,8 @@ extern ethr_runtime_t ethr_runtime__;
# include "sparc64/ethread.h"
# endif
# endif
-# include "gcc/ethread.h"
# include "libatomic_ops/ethread.h"
+# include "gcc/ethread.h"
# endif
# elif defined(ETHR_HAVE_LIBATOMIC_OPS)
# include "libatomic_ops/ethread.h"
@@ -367,7 +380,19 @@ extern ethr_runtime_t ethr_runtime__;
#include "ethr_atomics.h" /* The atomics API */
-#if defined(__GNUC__)
+#if defined (ETHR_OSE_THREADS)
+static ETHR_INLINE void
+ose_yield(void)
+{
+ if (get_ptype(current_process()) == OS_PRI_PROC) {
+ set_pri(get_pri(current_process()));
+ } else {
+ delay(1);
+ }
+}
+#endif
+
+#if defined(__GNUC__) && !defined(ETHR_OSE_THREADS)
# ifndef ETHR_SPIN_BODY
# if defined(__i386__) || defined(__x86_64__)
# define ETHR_SPIN_BODY __asm__ __volatile__("rep;nop" : : : "memory")
@@ -383,9 +408,20 @@ extern ethr_runtime_t ethr_runtime__;
# ifndef ETHR_SPIN_BODY
# define ETHR_SPIN_BODY do {YieldProcessor();ETHR_COMPILER_BARRIER;} while(0)
# endif
+#elif defined(ETHR_OSE_THREADS)
+# ifndef ETHR_SPIN_BODY
+# define ETHR_SPIN_BODY ose_yield()
+# else
+# error "OSE should use ose_yield()"
+# endif
#endif
+#ifndef ETHR_OSE_THREADS
#define ETHR_YIELD_AFTER_BUSY_LOOPS 50
+#else
+#define ETHR_YIELD_AFTER_BUSY_LOOPS 0
+#endif
+
#ifndef ETHR_SPIN_BODY
# define ETHR_SPIN_BODY ETHR_COMPILER_BARRIER
@@ -408,12 +444,18 @@ extern ethr_runtime_t ethr_runtime__;
# else
# define ETHR_YIELD() (pthread_yield(), 0)
# endif
+# elif defined(ETHR_OSE_THREADS)
+# define ETHR_YIELD() (ose_yield(), 0)
# else
# define ETHR_YIELD() (ethr_compiler_barrier(), 0)
# endif
#endif
-#ifdef VALGRIND /* mutex as fallback for spinlock for VALGRIND */
+#if defined(VALGRIND) || defined(ETHR_OSE_THREADS)
+/* mutex as fallback for spinlock for VALGRIND and OSE.
+ OSE cannot use spinlocks as processes working on the
+ same execution unit have a tendency to deadlock.
+ */
# undef ETHR_HAVE_NATIVE_SPINLOCKS
# undef ETHR_HAVE_NATIVE_RWSPINLOCKS
#else
@@ -459,9 +501,19 @@ typedef struct {
typedef struct {
int detached; /* boolean (default false) */
int suggested_stack_size; /* kilo words (default sys dependent) */
+#ifdef ETHR_OSE_THREADS
+ char *name;
+ U32 coreNo;
+#endif
} ethr_thr_opts;
+#if defined(ETHR_OSE_THREADS)
+/* Default ethr name is big as we want to be able to sprint stuff in there */
+#define ETHR_THR_OPTS_DEFAULT_INITER \
+ {0, -1, "ethread", 0}
+#else
#define ETHR_THR_OPTS_DEFAULT_INITER {0, -1}
+#endif
#if !defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_AUX_IMPL__)
@@ -479,7 +531,7 @@ void ethr_thr_exit(void *);
ethr_tid ethr_self(void);
int ethr_equal_tids(ethr_tid, ethr_tid);
-int ethr_tsd_key_create(ethr_tsd_key *);
+int ethr_tsd_key_create(ethr_tsd_key *,char *);
int ethr_tsd_key_delete(ethr_tsd_key);
int ethr_tsd_set(ethr_tsd_key, void *);
void *ethr_tsd_get(ethr_tsd_key);
@@ -571,8 +623,10 @@ typedef struct ethr_ts_event_ ethr_ts_event; /* Needed by ethr_mutex.h */
#if defined(ETHR_WIN32_THREADS)
# include "win/ethr_event.h"
-#else
+#elif defined(ETHR_PTHREADS)
# include "pthread/ethr_event.h"
+#elif defined(ETHR_OSE_THREADS)
+# include "ose/ethr_event.h"
#endif
int ethr_set_main_thr_status(int, int);
@@ -662,6 +716,37 @@ ETHR_INLINE_FUNC_NAME_(ethr_leave_ts_event)(ethr_ts_event *tsep)
#endif
+#elif defined (ETHR_OSE_THREADS)
+
+#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHREAD_IMPL__)
+
+extern ethr_tsd_key ethr_ts_event_key__;
+
+static ETHR_INLINE ethr_ts_event *
+ETHR_INLINE_FUNC_NAME_(ethr_get_ts_event)(void)
+{
+ ethr_ts_event *tsep = *(ethr_ts_event**)ose_get_ppdata(ethr_ts_event_key__);
+ if (!tsep) {
+ int res = ethr_get_tmp_ts_event__(&tsep);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ ETHR_ASSERT(tsep);
+ }
+ return tsep;
+}
+
+static ETHR_INLINE void
+ETHR_INLINE_FUNC_NAME_(ethr_leave_ts_event)(ethr_ts_event *tsep)
+{
+ if (tsep->iflgs & ETHR_TS_EV_TMP) {
+ int res = ethr_free_ts_event__(tsep);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ }
+}
+
+#endif
+
#endif
#include "ethr_mutex.h" /* Need atomic declarations and tse */
diff --git a/erts/include/internal/ethread_header_config.h.in b/erts/include/internal/ethread_header_config.h.in
index dd3599f86d..b36322490a 100644
--- a/erts/include/internal/ethread_header_config.h.in
+++ b/erts/include/internal/ethread_header_config.h.in
@@ -235,3 +235,5 @@
/* Define if you want to turn on extra sanity checking in the ethread library */
#undef ETHR_XCHK
+/* Assumed cache-line size (in bytes) */
+#undef ASSUMED_CACHE_LINE_SIZE
diff --git a/erts/include/internal/ethread_inline.h b/erts/include/internal/ethread_inline.h
new file mode 100644
index 0000000000..ffb756c84f
--- /dev/null
+++ b/erts/include/internal/ethread_inline.h
@@ -0,0 +1,49 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2004-2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifndef ETHREAD_INLINE_H__
+#define ETHREAD_INLINE_H__
+
+#if !defined(__GNUC__)
+# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) 0
+#elif !defined(__GNUC_MINOR__)
+# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
+ ((__GNUC__ << 24) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
+#elif !defined(__GNUC_PATCHLEVEL__)
+# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
+ (((__GNUC__ << 24) | (__GNUC_MINOR__ << 12)) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
+#else
+# define ETHR_AT_LEAST_GCC_VSN__(MAJ, MIN, PL) \
+ (((__GNUC__ << 24) | (__GNUC_MINOR__ << 12) | __GNUC_PATCHLEVEL__) >= (((MAJ) << 24) | ((MIN) << 12) | (PL)))
+#endif
+
+#undef ETHR_INLINE
+#if defined(__GNUC__)
+# define ETHR_INLINE __inline__
+# if ETHR_AT_LEAST_GCC_VSN__(3, 1, 1)
+# define ETHR_FORCE_INLINE __inline__ __attribute__((__always_inline__))
+# else
+# define ETHR_FORCE_INLINE __inline__
+# endif
+#elif defined(__WIN32__)
+# define ETHR_INLINE __forceinline
+# define ETHR_FORCE_INLINE __forceinline
+#endif
+
+#endif /* #ifndef ETHREAD_INLINE_H__ */
diff --git a/erts/include/internal/libatomic_ops/ethr_atomic.h b/erts/include/internal/libatomic_ops/ethr_atomic.h
index fb1288c330..734cdf0890 100644
--- a/erts/include/internal/libatomic_ops/ethr_atomic.h
+++ b/erts/include/internal/libatomic_ops/ethr_atomic.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2010-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2010-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -32,22 +32,23 @@
* These operations need to be defined by libatomic_ops;
* otherwise, we won't compile:
* - AO_nop_full()
- * - AO_load()
- * - AO_store()
- * - AO_compare_and_swap()
+ * - AO_load() || AO_load_aquire()
+ * - AO_store() || AO_store_release()
+ * - AO_compare_and_swap() || AO_compare_and_swap_acquire()
+ * || AO_compare_and_swap_release() || AO_compare_and_swap_full()
*
*/
#if ETHR_SIZEOF_AO_T == 4
#define ETHR_HAVE_NATIVE_ATOMIC32 1
-#define ETHR_NATIVE_ATOMIC32_IMPL "libatomic_ops"
+#define ETHR_NATIVE_ATOMIC32_IMPL ETHR_NATIVE_IMPL__
#define ETHR_NATMC_FUNC__(X) ethr_native_atomic32_ ## X
#define ETHR_ATMC_T__ ethr_native_atomic32_t
#define ETHR_AINT_T__ ethr_sint32_t
#define ETHR_AINT_SUFFIX__ "l"
#elif ETHR_SIZEOF_AO_T == 8
#define ETHR_HAVE_NATIVE_ATOMIC64 1
-#define ETHR_NATIVE_ATOMIC64_IMPL "libatomic_ops"
+#define ETHR_NATIVE_ATOMIC64_IMPL ETHR_NATIVE_IMPL__
#define ETHR_NATMC_FUNC__(X) ethr_native_atomic64_ ## X
#define ETHR_ATMC_T__ ethr_native_atomic64_t
#define ETHR_AINT_T__ ethr_sint64_t
@@ -74,6 +75,8 @@ ETHR_NATMC_FUNC__(addr)(ETHR_ATMC_T__ *var)
return (ETHR_AINT_T__ *) &var->counter;
}
+#ifdef AO_HAVE_store
+
#if ETHR_SIZEOF_AO_T == 4
# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_SET 1
#else
@@ -86,6 +89,24 @@ ETHR_NATMC_FUNC__(set)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ value)
AO_store(&var->counter, (AO_t) value);
}
+#endif
+
+#ifdef AO_HAVE_store_write
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_SET_WB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_SET_WB 1
+#endif
+
+static ETHR_INLINE void
+ETHR_NATMC_FUNC__(set_wb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ value)
+{
+ AO_store_write(&var->counter, (AO_t) value);
+}
+
+#endif
+
#ifdef AO_HAVE_store_release
#if ETHR_SIZEOF_AO_T == 4
@@ -102,6 +123,24 @@ ETHR_NATMC_FUNC__(set_relb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ value)
#endif
+#ifdef AO_HAVE_store_full
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_SET_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_SET_MB 1
+#endif
+
+static ETHR_INLINE void
+ETHR_NATMC_FUNC__(set_mb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ value)
+{
+ AO_store_full(&var->counter, (AO_t) value);
+}
+
+#endif
+
+#ifdef AO_HAVE_load
+
#if ETHR_SIZEOF_AO_T == 4
# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_READ 1
#else
@@ -114,6 +153,24 @@ ETHR_NATMC_FUNC__(read)(ETHR_ATMC_T__ *var)
return (ETHR_AINT_T__) AO_load(&var->counter);
}
+#endif
+
+#ifdef AO_HAVE_load_read
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_READ_RB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_READ_RB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(read_rb)(ETHR_ATMC_T__ *var)
+{
+ return (ETHR_AINT_T__) AO_load_read(&var->counter);
+}
+
+#endif
+
#ifdef AO_HAVE_load_acquire
#if ETHR_SIZEOF_AO_T == 4
@@ -130,6 +187,22 @@ ETHR_NATMC_FUNC__(read_acqb)(ETHR_ATMC_T__ *var)
#endif
+#ifdef AO_HAVE_load_full
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_READ_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_READ_MB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(read_mb)(ETHR_ATMC_T__ *var)
+{
+ return (ETHR_AINT_T__) AO_load_full(&var->counter);
+}
+
+#endif
+
#ifdef AO_HAVE_fetch_and_add
#if ETHR_SIZEOF_AO_T == 4
@@ -146,6 +219,54 @@ ETHR_NATMC_FUNC__(add_return)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ incr)
#endif
+#ifdef AO_HAVE_fetch_and_add_acquire
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_ADD_RETURN_ACQB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_ADD_RETURN_ACQB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(add_return_acqb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ incr)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_add_acquire(&var->counter, (AO_t) incr)) + incr;
+}
+
+#endif
+
+#ifdef AO_HAVE_fetch_and_add_release
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_ADD_RETURN_RELB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_ADD_RETURN_RELB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(add_return_relb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ incr)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_add_release(&var->counter, (AO_t) incr)) + incr;
+}
+
+#endif
+
+#ifdef AO_HAVE_fetch_and_add_full
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_ADD_RETURN_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_ADD_RETURN_MB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(add_return_mb)(ETHR_ATMC_T__ *var, ETHR_AINT_T__ incr)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_add_full(&var->counter, (AO_t) incr)) + incr;
+}
+
+#endif
+
#ifdef AO_HAVE_fetch_and_add1
#if ETHR_SIZEOF_AO_T == 4
@@ -178,6 +299,38 @@ ETHR_NATMC_FUNC__(inc_return_acqb)(ETHR_ATMC_T__ *var)
#endif
+#ifdef AO_HAVE_fetch_and_add1_release
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_INC_RETURN_RELB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_INC_RETURN_RELB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(inc_return_relb)(ETHR_ATMC_T__ *var)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_add1_release(&var->counter)) + 1;
+}
+
+#endif
+
+#ifdef AO_HAVE_fetch_and_add1_full
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_INC_RETURN_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_INC_RETURN_MB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(inc_return_mb)(ETHR_ATMC_T__ *var)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_add1_full(&var->counter)) + 1;
+}
+
+#endif
+
#ifdef AO_HAVE_fetch_and_sub1
#if ETHR_SIZEOF_AO_T == 4
@@ -194,6 +347,22 @@ ETHR_NATMC_FUNC__(dec_return)(ETHR_ATMC_T__ *var)
#endif
+#ifdef AO_HAVE_fetch_and_sub1_acquire
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_DEC_RETURN_ACQB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_DEC_RETURN_ACQB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(dec_return_acqb)(ETHR_ATMC_T__ *var)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_sub1_acquire(&var->counter)) - 1;
+}
+
+#endif
+
#ifdef AO_HAVE_fetch_and_sub1_release
#if ETHR_SIZEOF_AO_T == 4
@@ -210,7 +379,60 @@ ETHR_NATMC_FUNC__(dec_return_relb)(ETHR_ATMC_T__ *var)
#endif
-#ifdef AO_HAVE_compare_and_swap
+#ifdef AO_HAVE_fetch_and_sub1_full
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_DEC_RETURN_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_DEC_RETURN_MB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(dec_return_mb)(ETHR_ATMC_T__ *var)
+{
+ return ((ETHR_AINT_T__) AO_fetch_and_sub1_full(&var->counter)) - 1;
+}
+
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_full) || defined(AO_HAVE_fetch_compare_and_swap_full)
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_MB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_CMPXCHG_MB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(cmpxchg_mb)(ETHR_ATMC_T__ *var,
+ ETHR_AINT_T__ new,
+ ETHR_AINT_T__ exp)
+{
+#if defined(AO_HAVE_fetch_compare_and_swap_full)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap_full(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
+ ETHR_AINT_T__ act;
+ do {
+ if (AO_compare_and_swap_full(&var->counter, (AO_t) exp, (AO_t) new))
+ return exp;
+#ifdef AO_HAVE_load_acquire
+ act = (ETHR_AINT_T__) AO_load_acquire(&var->counter);
+#else
+ act = (ETHR_AINT_T__) AO_load(&var->counter);
+#endif
+ } while (act == exp);
+#ifndef AO_HAVE_load_acquire
+ AO_nop_full();
+#endif
+ return act;
+#endif
+}
+
+#endif
+
+#if defined(AO_HAVE_compare_and_swap) || defined(AO_HAVE_fetch_compare_and_swap)
#if ETHR_SIZEOF_AO_T == 4
# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG 1
@@ -223,18 +445,28 @@ ETHR_NATMC_FUNC__(cmpxchg)(ETHR_ATMC_T__ *var,
ETHR_AINT_T__ new,
ETHR_AINT_T__ exp)
{
+#if defined(AO_HAVE_fetch_compare_and_swap)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
ETHR_AINT_T__ act;
do {
if (AO_compare_and_swap(&var->counter, (AO_t) exp, (AO_t) new))
return exp;
+#ifdef AO_HAVE_load
act = (ETHR_AINT_T__) AO_load(&var->counter);
+#else
+ act = (ETHR_AINT_T__) AO_load_aquire(&var->counter);
+#endif
} while (act == exp);
return act;
+#endif
}
#endif
-#ifdef AO_HAVE_compare_and_swap_acquire
+#if defined(AO_HAVE_compare_and_swap_acquire) || defined(AO_HAVE_fetch_compare_and_swap_acquire)
#if ETHR_SIZEOF_AO_T == 4
# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_ACQB 1
@@ -247,6 +479,11 @@ ETHR_NATMC_FUNC__(cmpxchg_acqb)(ETHR_ATMC_T__ *var,
ETHR_AINT_T__ new,
ETHR_AINT_T__ exp)
{
+#if defined(AO_HAVE_fetch_compare_and_swap_acquire)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap_acquire(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
ETHR_AINT_T__ act;
do {
if (AO_compare_and_swap_acquire(&var->counter, (AO_t) exp, (AO_t) new))
@@ -261,11 +498,55 @@ ETHR_NATMC_FUNC__(cmpxchg_acqb)(ETHR_ATMC_T__ *var,
AO_nop_full();
#endif
return act;
+#endif
+}
+
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_read) || defined(AO_HAVE_fetch_compare_and_swap_read)
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_RB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_CMPXCHG_RB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(cmpxchg_rb)(ETHR_ATMC_T__ *var,
+ ETHR_AINT_T__ new,
+ ETHR_AINT_T__ exp)
+{
+#if defined(AO_HAVE_fetch_compare_and_swap_read)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap_read(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
+ ETHR_AINT_T__ act;
+ do {
+ if (AO_compare_and_swap_read(&var->counter, (AO_t) exp, (AO_t) new))
+ return exp;
+#if defined(AO_HAVE_load_read)
+ act = (ETHR_AINT_T__) AO_load_read(&var->counter);
+#elif defined(AO_HAVE_load)
+ act = (ETHR_AINT_T__) AO_load(&var->counter);
+#else
+ act = (ETHR_AINT_T__) AO_load_acquire(&var->counter);
+#endif
+ } while (act == exp);
+#ifndef AO_HAVE_load_read
+#ifdef AO_HAVE_nop_read
+ AO_nop_read();
+#else
+ AO_nop_full();
+#endif
+#endif
+ return act;
+#endif
}
#endif
-#ifdef AO_HAVE_compare_and_swap_release
+#if defined(AO_HAVE_compare_and_swap_release) || defined(AO_HAVE_fetch_compare_and_swap_release)
#if ETHR_SIZEOF_AO_T == 4
# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_RELB 1
@@ -278,13 +559,57 @@ ETHR_NATMC_FUNC__(cmpxchg_relb)(ETHR_ATMC_T__ *var,
ETHR_AINT_T__ new,
ETHR_AINT_T__ exp)
{
+#if defined(AO_HAVE_fetch_compare_and_swap_release)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap_release(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
ETHR_AINT_T__ act;
do {
if (AO_compare_and_swap_release(&var->counter, (AO_t) exp, (AO_t) new))
return exp;
+#ifdef AO_HAVE_load
act = (ETHR_AINT_T__) AO_load(&var->counter);
+#else
+ act = (ETHR_AINT_T__) AO_load_acquire(&var->counter);
+#endif
+ } while (act == exp);
+ return act;
+#endif
+}
+
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_write) || defined(AO_HAVE_fetch_compare_and_swap_write)
+
+#if ETHR_SIZEOF_AO_T == 4
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_WB 1
+#else
+# define ETHR_HAVE_ETHR_NATIVE_ATOMIC64_CMPXCHG_WB 1
+#endif
+
+static ETHR_INLINE ETHR_AINT_T__
+ETHR_NATMC_FUNC__(cmpxchg_wb)(ETHR_ATMC_T__ *var,
+ ETHR_AINT_T__ new,
+ ETHR_AINT_T__ exp)
+{
+#if defined(AO_HAVE_fetch_compare_and_swap_write)
+ return (ETHR_AINT_T__) AO_fetch_compare_and_swap_write(&var->counter,
+ (AO_t) exp,
+ (AO_t) new);
+#else
+ ETHR_AINT_T__ act;
+ do {
+ if (AO_compare_and_swap_write(&var->counter, (AO_t) exp, (AO_t) new))
+ return exp;
+#ifdef AO_HAVE_load
+ act = (ETHR_AINT_T__) AO_load(&var->counter);
+#else
+ act = (ETHR_AINT_T__) AO_load_acquire(&var->counter);
+#endif
} while (act == exp);
return act;
+#endif
}
#endif
diff --git a/erts/include/internal/libatomic_ops/ethr_dw_atomic.h b/erts/include/internal/libatomic_ops/ethr_dw_atomic.h
new file mode 100644
index 0000000000..4dd9f41e96
--- /dev/null
+++ b/erts/include/internal/libatomic_ops/ethr_dw_atomic.h
@@ -0,0 +1,567 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Description: Native double word atomics using libatomic_ops
+ * Author: Rickard Green
+ */
+
+#ifndef ETHR_LIBATOMIC_OPS_DW_ATOMIC_H__
+#define ETHR_LIBATOMIC_OPS_DW_ATOMIC_H__
+
+#if defined(AO_HAVE_double_t) \
+ && (defined(AO_HAVE_double_load_acquire) \
+ || defined(AO_HAVE_double_load)) \
+ && (defined(AO_HAVE_compare_double_and_swap_double) \
+ || defined(AO_HAVE_compare_double_and_swap_double_full) \
+ || defined(AO_HAVE_compare_double_and_swap_double_acquire) \
+ || defined(AO_HAVE_compare_double_and_swap_double_release) \
+ || defined(AO_HAVE_double_compare_and_swap) \
+ || defined(AO_HAVE_double_compare_and_swap_full) \
+ || defined(AO_HAVE_double_compare_and_swap_acquire) \
+ || defined(AO_HAVE_double_compare_and_swap_release))
+
+#if ETHR_SIZEOF_PTR == 4
+# define ETHR_NATIVE_SU_DW_SINT_T ethr_sint64_t
+#elif ETHR_SIZEOF_PTR == 8 && defined(ETHR_HAVE_INT128_T)
+# define ETHR_NATIVE_SU_DW_SINT_T ethr_sint128_t
+#endif
+
+typedef union {
+ volatile AO_double_t dw_mem;
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+ ETHR_NATIVE_SU_DW_SINT_T su_dw_sint;
+#endif
+} ethr_native_dw_atomic_t;
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_NATIVE_SU_DW_ATOMIC
+#else
+# define ETHR_HAVE_NATIVE_DW_ATOMIC
+#endif
+
+#define ETHR_NATIVE_DW_ATOMIC_IMPL ETHR_NATIVE_IMPL__
+
+#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_ATOMIC_IMPL__)
+
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_NDWA_FUNC__(Func) ethr_native_su_dw_atomic_ ## Func
+# define ETHR_NDWA_RET_3_TYPE__ ETHR_NATIVE_SU_DW_SINT_T
+# define ETHR_NDWA_RET_2_TYPE__ ETHR_NATIVE_SU_DW_SINT_T
+# define ETHR_NDWA_VAL_ARG_TYPE__ ETHR_NATIVE_SU_DW_SINT_T
+# define ETHR_NDWA_DECL_ARG__(Arg)
+# if defined(AO_HAVE_DOUBLE_PTR_STORAGE)
+# define ETHR_NDWA_VAL2AOVAL__(AOV, V) \
+ ((AOV).AO_whole = (double_ptr_storage) (V))
+# define ETHR_NDWA_AOVAL2VAL__(AOV, V) \
+ ((V) = (ETHR_NATIVE_SU_DW_SINT_T) (AOV).AO_whole)
+# define ETHR_NDWA_RETURN_VAL_3__(SUCCESS, AOVAL, VAL) \
+ do { \
+ return (ETHR_NATIVE_SU_DW_SINT_T) (AOVAL).AO_whole; \
+ } while (0)
+# define ETHR_NDWA_RETURN_VAL_2__(AOVAL, VAL) \
+ do { \
+ return (ETHR_NATIVE_SU_DW_SINT_T) (AOVAL).AO_whole; \
+ } while (0)
+# define ETHR_NDWA_AOVAL_EQ__(AOV1, AOV2) \
+ ((AOV1).AO_whole == (AOV2).AO_whole)
+# else
+typedef union {
+ ethr_sint_t sint[2];
+ ETHR_NATIVE_SU_DW_SINT_T dw_sint;
+} ethr_dw_splitter_t;
+# define ETHR_NDWA_VAL2AOVAL__(AOV, V) \
+ do { \
+ ethr_dw_splitter_t tmp__; \
+ tmp__.dw_sint = (V); \
+ (AOV).AO_val1 = (AO_t) tmp__.sint[0]; \
+ (AOV).AO_val2 = (AO_t) tmp__.sint[1]; \
+ } while (0)
+# define ETHR_NDWA_AOVAL2VAL__(AOV, V) \
+ do { \
+ ethr_dw_splitter_t tmp__; \
+ tmp__.sint[0] = (ethr_sint_t) (AOV).AO_val1; \
+ tmp__.sint[1] = (ethr_sint_t) (AOV).AO_val2; \
+ (V) = tmp__.dw_sint; \
+ } while (0)
+# define ETHR_NDWA_RETURN_VAL_3__(SUCCESS, AOVAL, VAL) \
+ do { \
+ ethr_dw_splitter_t tmp__; \
+ tmp__.sint[0] = (ethr_sint_t) (AOVAL).AO_val1; \
+ tmp__.sint[1] = (ethr_sint_t) (AOVAL).AO_val2; \
+ return tmp__.dw_sint; \
+ } while (0)
+# define ETHR_NDWA_AOVAL_EQ__(AOV1, AOV2) \
+ ((AOV1).AO_val1 == (AOV2).AO_val1 \
+ && (AOV1).AO_val2 == (AOV2).AO_val2)
+# endif
+#else
+# define ETHR_NDWA_FUNC__(Func) ethr_native_dw_atomic_ ## Func
+# define ETHR_NDWA_RET_3_TYPE__ int
+# define ETHR_NDWA_RET_2_TYPE__ void
+# define ETHR_NDWA_VAL_ARG_TYPE__ ethr_sint_t *
+# define ETHR_NDWA_DECL_ARG__(Arg) , ETHR_NDWA_VAL_ARG_TYPE__ Arg
+# define ETHR_NDWA_VAL2AOVAL__(AOV, V) \
+ do { \
+ (AOV).AO_val1 = (AO_t) (V)[0]; \
+ (AOV).AO_val2 = (AO_t) (V)[1]; \
+ } while (0)
+# define ETHR_NDWA_AOVAL2VAL__(AOV, V) \
+ do { \
+ ethr_dw_splitter_t tmp__; \
+ (V)[0] = (ethr_sint_t) (AOV).AO_val1; \
+ (V)[1] = (ethr_sint_t) (AOV).AO_val2; \
+ } while (0)
+# define ETHR_NDWA_RETURN_VAL_3__(SUCCESS, AOVAL, VAL) \
+ do { \
+ (VAL)[0] = (ethr_sint_t) (AOVAL).AO_val1; \
+ (VAL)[1] = (ethr_sint_t) (AOVAL).AO_val2; \
+ return (SUCCESS); \
+ } while (0)
+# define ETHR_NDWA_RETURN_VAL_2__(AOVAL, VAL) \
+ do { \
+ (VAL)[0] = (ethr_sint_t) (AOVAL).AO_val1; \
+ (VAL)[1] = (ethr_sint_t) (AOVAL).AO_val2; \
+ return; \
+ } while (0)
+# if defined(AO_HAVE_DOUBLE_PTR_STORAGE)
+# define ETHR_NDWA_AOVAL_EQ__(AOV1, AOV2) \
+ ((AOV1).AO_whole == (AOV2).AO_whole)
+# else
+# define ETHR_NDWA_AOVAL_EQ__(AOV1, AOV2) \
+ ((AOV1).AO_val1 == (AOV2).AO_val1 \
+ && (AOV1).AO_val2 == (AOV2).AO_val2)
+# endif
+#endif
+
+#define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_ADDR
+static ETHR_INLINE ethr_sint_t *
+ethr_native_dw_atomic_addr(ethr_native_dw_atomic_t *var)
+{
+ return (ethr_sint_t *) &var->dw_mem;
+}
+
+#ifdef AO_HAVE_double_load
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_READ
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_READ
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_2_TYPE__
+ETHR_NDWA_FUNC__(read)(ethr_native_dw_atomic_t *var
+ ETHR_NDWA_DECL_ARG__(val))
+{
+ AO_double_t act = AO_double_load(&var->dw_mem);
+ ETHR_NDWA_RETURN_VAL_2__(act, val);
+}
+
+#endif
+
+#ifdef AO_HAVE_double_load_read
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_READ_RB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_READ_RB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_2_TYPE__
+ETHR_NDWA_FUNC__(read_rb)(ethr_native_dw_atomic_t *var
+ ETHR_NDWA_DECL_ARG__(val))
+{
+ AO_double_t act = AO_double_load_read(&var->dw_mem);
+ ETHR_NDWA_RETURN_VAL_2__(act, val);
+}
+
+#endif
+
+#ifdef AO_HAVE_double_load_acquire
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_READ_ACQB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_READ_ACQB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_2_TYPE__
+ETHR_NDWA_FUNC__(read_acqb)(ethr_native_dw_atomic_t *var
+ ETHR_NDWA_DECL_ARG__(val))
+{
+ AO_double_t act = AO_double_load_acquire(&var->dw_mem);
+ ETHR_NDWA_RETURN_VAL_2__(act, val);
+}
+
+#endif
+
+#ifdef AO_HAVE_double_store
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_SET
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_SET
+#endif
+
+static ETHR_INLINE void
+ETHR_NDWA_FUNC__(set)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ val)
+{
+ AO_double_t new;
+ ETHR_NDWA_VAL2AOVAL__(new, val);
+ AO_double_store(&var->dw_mem, new);
+}
+
+#endif
+
+#ifdef AO_HAVE_double_store_write
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_SET_WB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_SET_WB
+#endif
+
+static ETHR_INLINE void
+ETHR_NDWA_FUNC__(set_wb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ val)
+{
+ AO_double_t new;
+ ETHR_NDWA_VAL2AOVAL__(new, val);
+ AO_double_store_write(&var->dw_mem, new);
+}
+
+#endif
+
+#ifdef AO_HAVE_double_store_release
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_SET_RELB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_SET_RELB
+#endif
+
+static ETHR_INLINE void
+ETHR_NDWA_FUNC__(set_relb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ val)
+{
+ AO_double_t new;
+ ETHR_NDWA_VAL2AOVAL__(new, val);
+ AO_double_store_release(&var->dw_mem, new);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap_full) || defined(AO_HAVE_compare_double_and_swap_double_full)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG_MB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_MB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg_mb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap_full)
+ xchgd = AO_double_compare_and_swap_full(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double_full)
+ xchgd = AO_compare_double_and_swap_double_full(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+#ifdef AO_HAVE_double_load_acquire
+ ao_act = AO_double_load_acquire(&var->dw_mem);
+#else
+ ao_act = AO_double_load(&var->dw_mem);
+#endif
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+#ifndef AO_HAVE_double_load_acquire
+ AO_nop_full();
+#endif
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap) || defined(AO_HAVE_compare_double_and_swap_double)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap)
+ xchgd = AO_double_compare_and_swap(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double)
+ xchgd = AO_compare_double_and_swap_double(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+#ifdef AO_HAVE_double_load
+ ao_act = AO_double_load(&var->dw_mem);
+#else
+ ao_act = AO_double_load_acquire(&var->dw_mem);
+#endif
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap_read) || defined(AO_HAVE_compare_double_and_swap_double_read)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG_RB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_RB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg_rb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap_read)
+ xchgd = AO_double_compare_and_swap_read(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double_read)
+ xchgd = AO_compare_double_and_swap_double_read(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+#if defined(AO_HAVE_double_load_read)
+ ao_act = AO_double_load_read(&var->dw_mem);
+#elif defined(AO_HAVE_double_load)
+ ao_act = AO_double_load(&var->dw_mem);
+#else
+ ao_act = AO_double_load_acquire(&var->dw_mem);
+#endif
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+#ifndef AO_HAVE_double_load_read
+#ifdef AO_HAVE_nop_read
+ AO_nop_read();
+#else
+ AO_nop_full();
+#endif
+#endif
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap_acquire) || defined(AO_HAVE_compare_double_and_swap_double_acquire)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG_ACQB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_ACQB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg_acqb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap_acquire)
+ xchgd = AO_double_compare_and_swap_acquire(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double_acquire)
+ xchgd = AO_compare_double_and_swap_double_acquire(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+#ifdef AO_HAVE_double_load_acquire
+ ao_act = AO_double_load_acquire(&var->dw_mem);
+#else
+ ao_act = AO_double_load(&var->dw_mem);
+#endif
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+#ifndef AO_HAVE_double_load_acquire
+ AO_nop_full();
+#endif
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap_write) || defined(AO_HAVE_compare_double_and_swap_double_write)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG_WB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_WB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg_wb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap_write)
+ xchgd = AO_double_compare_and_swap_write(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double_write)
+ xchgd = AO_compare_double_and_swap_double_write(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+#ifdef AO_HAVE_double_load
+ ao_act = AO_double_load(&var->dw_mem);
+#else
+ ao_act = AO_double_load_acquire(&var->dw_mem);
+#endif
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#if defined(AO_HAVE_double_compare_and_swap_release) || defined(AO_HAVE_compare_double_and_swap_double_release)
+
+#if defined(ETHR_NATIVE_SU_DW_SINT_T)
+# define ETHR_HAVE_ETHR_NATIVE_SU_DW_ATOMIC_CMPXCHG_RELB
+#else
+# define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_RELB
+#endif
+
+static ETHR_INLINE ETHR_NDWA_RET_3_TYPE__
+ETHR_NDWA_FUNC__(cmpxchg_relb)(ethr_native_dw_atomic_t *var,
+ ETHR_NDWA_VAL_ARG_TYPE__ new,
+ ETHR_NDWA_VAL_ARG_TYPE__ exp)
+{
+ AO_double_t ao_act, ao_new, ao_exp;
+
+ ETHR_NDWA_VAL2AOVAL__(ao_exp, exp);
+ ETHR_NDWA_VAL2AOVAL__(ao_new, new);
+
+ do {
+ int xchgd;
+#if defined(AO_HAVE_double_compare_and_swap_release)
+ xchgd = AO_double_compare_and_swap_release(&var->dw_mem, ao_exp, ao_new);
+#elif defined(AO_HAVE_compare_double_and_swap_double_release)
+ xchgd = AO_compare_double_and_swap_double_release(&var->dw_mem,
+ ao_exp.AO_val1,
+ ao_exp.AO_val2,
+ ao_new.AO_val1,
+ ao_new.AO_val2);
+#endif
+
+ if (xchgd)
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_exp, exp);
+
+ ao_act = AO_double_load(&var->dw_mem);
+
+ } while (ETHR_NDWA_AOVAL_EQ__(ao_exp, ao_act));
+
+ ETHR_NDWA_RETURN_VAL_3__(1, ao_act, exp);
+}
+
+#endif
+
+#endif /* defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_ATOMIC_IMPL__) */
+
+#endif /* Have AO double functionality ... */
+
+#endif /* ETHR_LIBATOMIC_OPS_DW_ATOMIC_H__ */
+
diff --git a/erts/include/internal/libatomic_ops/ethread.h b/erts/include/internal/libatomic_ops/ethread.h
index e1fdd588bb..d65ee19b04 100644
--- a/erts/include/internal/libatomic_ops/ethread.h
+++ b/erts/include/internal/libatomic_ops/ethread.h
@@ -33,9 +33,12 @@
#define AO_USE_PENTIUM4_INSTRS
#endif
+#define ETHR_NATIVE_IMPL__ "libatomic_ops"
+
#include "atomic_ops.h"
#include "ethr_membar.h"
#include "ethr_atomic.h"
+#include "ethr_dw_atomic.h"
#endif
diff --git a/erts/include/internal/ose/ethr_event.h b/erts/include/internal/ose/ethr_event.h
new file mode 100644
index 0000000000..000a600813
--- /dev/null
+++ b/erts/include/internal/ose/ethr_event.h
@@ -0,0 +1,113 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2009-2011. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Author: Rickard Green
+ */
+
+//#define USE_PTHREAD_API
+
+#define ETHR_EVENT_OFF_WAITER__ -1L
+#define ETHR_EVENT_OFF__ 1L
+#define ETHR_EVENT_ON__ 0L
+
+#ifdef USE_PTHREAD_API
+
+typedef struct {
+ ethr_atomic32_t state;
+ pthread_mutex_t mtx;
+ pthread_cond_t cnd;
+} ethr_event;
+
+#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_EVENT_IMPL__)
+
+static void ETHR_INLINE
+ETHR_INLINE_FUNC_NAME_(ethr_event_set)(ethr_event *e)
+{
+ ethr_sint32_t val;
+ val = ethr_atomic32_xchg_mb(&e->state, ETHR_EVENT_ON__);
+ if (val == ETHR_EVENT_OFF_WAITER__) {
+ int res = pthread_mutex_lock(&e->mtx);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ res = pthread_cond_signal(&e->cnd);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ res = pthread_mutex_unlock(&e->mtx);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ }
+}
+
+static void ETHR_INLINE
+ETHR_INLINE_FUNC_NAME_(ethr_event_reset)(ethr_event *e)
+{
+ ethr_atomic32_set(&e->state, ETHR_EVENT_OFF__);
+ ETHR_MEMORY_BARRIER;
+}
+
+#endif
+
+#else
+
+typedef struct {
+ ethr_atomic32_t state;
+ PROCESS proc;
+} ethr_event;
+
+#if defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_EVENT_IMPL__)
+
+static void ETHR_INLINE
+ETHR_INLINE_FUNC_NAME_(ethr_event_set)(ethr_event *e)
+{
+ ethr_sint32_t val = ethr_atomic32_xchg_mb(&e->state, ETHR_EVENT_ON__);
+ if (val == ETHR_EVENT_OFF_WAITER__) {
+#ifdef DEBUG
+ OSFSEMVAL fsem_val = get_fsem(e->proc);
+
+ /* There is a race in this assert.
+ This is because the state is set before the wait call in wait__.
+ We hope that a delay of 10 ms is enough */
+ if (fsem_val == 0)
+ delay(10);
+ ETHR_ASSERT(get_fsem(e->proc) == -1);
+#endif
+ signal_fsem(e->proc);
+ }
+}
+
+static void ETHR_INLINE
+ETHR_INLINE_FUNC_NAME_(ethr_event_reset)(ethr_event *e)
+{
+ ethr_atomic32_set(&e->state, ETHR_EVENT_OFF__);
+ ETHR_MEMORY_BARRIER;
+}
+
+#endif
+
+#endif
+
+int ethr_event_init(ethr_event *e);
+int ethr_event_destroy(ethr_event *e);
+int ethr_event_wait(ethr_event *e);
+int ethr_event_swait(ethr_event *e, int spincount);
+#if !defined(ETHR_TRY_INLINE_FUNCS) || defined(ETHR_EVENT_IMPL__)
+void ethr_event_set(ethr_event *e);
+void ethr_event_reset(ethr_event *e);
+#endif
diff --git a/erts/include/internal/ppc32/atomic.h b/erts/include/internal/ppc32/atomic.h
index 6001620677..b558626b09 100644
--- a/erts/include/internal/ppc32/atomic.h
+++ b/erts/include/internal/ppc32/atomic.h
@@ -91,6 +91,20 @@ ethr_native_atomic32_add_return_acqb(ethr_native_atomic32_t *var, ethr_sint32_t
return res;
}
+
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_ADD_RETURN_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_add_return_relb(ethr_native_atomic32_t *var, ethr_sint32_t incr)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_add_return(var, incr);
+}
+
+#endif
+
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_INC_RETURN 1
static ETHR_INLINE ethr_sint32_t
@@ -120,7 +134,19 @@ ethr_native_atomic32_inc_return_acqb(ethr_native_atomic32_t *var)
__asm__ __volatile("isync\n\t" : : : "memory");
return res;
}
-
+
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_INC_RETURN_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_inc_return_relb(ethr_native_atomic32_t *var)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_inc_return(var);
+}
+
+#endif
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_DEC_RETURN 1
@@ -152,6 +178,19 @@ ethr_native_atomic32_dec_return_acqb(ethr_native_atomic32_t *var)
return res;
}
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_DEC_RETURN_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_dec_return_relb(ethr_native_atomic32_t *var)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_dec_return(var);
+}
+
+#endif
+
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_AND_RETOLD 1
static ETHR_INLINE ethr_sint32_t
@@ -182,6 +221,19 @@ ethr_native_atomic32_and_retold_acqb(ethr_native_atomic32_t *var, ethr_sint32_t
return res;
}
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_AND_RETOLD_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_and_retold_relb(ethr_native_atomic32_t *var, ethr_sint32_t mask)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_and_retold(var, mask);
+}
+
+#endif
+
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_OR_RETOLD 1
static ETHR_INLINE ethr_sint32_t
@@ -212,6 +264,18 @@ ethr_native_atomic32_or_retold_acqb(ethr_native_atomic32_t *var, ethr_sint32_t m
return res;
}
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_OR_RETOLD_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_or_retold_relb(ethr_native_atomic32_t *var, ethr_sint32_t mask)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_or_retold(var, mask);
+}
+
+#endif
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_XCHG 1
@@ -242,6 +306,19 @@ ethr_native_atomic32_xchg_acqb(ethr_native_atomic32_t *var, ethr_sint32_t val)
return res;
}
+#ifndef ETHR_PPC_HAVE_NO_LWSYNC
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_XCHG_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_xchg_relb(ethr_native_atomic32_t *var, ethr_sint32_t val)
+{
+ ethr_lwsync__();
+ return ethr_native_atomic32_xchg(var, val);
+}
+
+#endif
+
#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG 1
static ETHR_INLINE ethr_sint32_t
@@ -291,6 +368,73 @@ ethr_native_atomic32_cmpxchg_acqb(ethr_native_atomic32_t *var,
return old;
}
+#if !defined(ETHR_DISABLE_LWSYNC_FOR_CMPXCHG_RELB) && !defined(ETHR_PPC_HAVE_NO_LWSYNC)
+
+#define ETHR_HAVE_ETHR_NATIVE_ATOMIC32_CMPXCHG_RELB 1
+
+static ETHR_INLINE ethr_sint32_t
+ethr_native_atomic32_cmpxchg_relb(ethr_native_atomic32_t *var,
+ ethr_sint32_t new,
+ ethr_sint32_t expected)
+{
+ ethr_sint32_t actual;
+
+ /*
+ * We want to implement the release barrier using the
+ * 'lwsync' instruction instead of using the more
+ * expensive 'sync' instruction.
+ *
+ * cmpxchg looks something like this:
+ *
+ * lwarx # Load
+ * ...
+ * if (fail)
+ * goto done;
+ * stwcx # Store
+ * if (fail)
+ * goto done;
+ * ...
+ *
+ * In the case we succeeded, 'lwsync' will have
+ * ordered all previously issued loads and stores
+ * against the successful store to this variable.
+ * That is everything is fine!
+ *
+ * In the case we did not succeed, we need to order
+ * all previously issued loads and stores against
+ * the load of this variable. 'lwsync' does not
+ * guarantee this. In order to solve this we issue
+ * a 'sync' and redo the load. If the value has
+ * changed to what the user passed as expected value
+ * we need to try the cmpxchg operation again, since
+ * this value indicates success.
+ */
+
+ ethr_lwsync__();
+
+ actual = ethr_native_atomic32_cmpxchg(var, new, expected);
+
+#ifndef ETHR_PPC_HAVE_LWSYNC
+ /* We checked for lwsync support in runtime... */
+ if (ETHR_PPC_RUNTIME_CONF_HAVE_NO_LWSYNC__)
+ return actual; /* No need to; ethr_lwsync__() issued a sync... */
+#endif
+
+ /* ethr_lwsync__() issued an lwsync... */
+ if (actual == expected)
+ return actual; /* Successful operation */
+
+ /* Failure... need to issue a sync... */
+ ethr_sync__();
+ actual = ethr_native_atomic32_read(var);
+ if (actual != expected)
+ return actual; /* Fail... */
+ /* Try again... */
+ return ethr_native_atomic32_cmpxchg(var, new, expected);
+}
+
+#endif
+
#endif /* ETHR_TRY_INLINE_FUNCS */
#endif /* ETHREAD_PPC_ATOMIC_H */
diff --git a/erts/include/internal/win/ethr_membar.h b/erts/include/internal/win/ethr_membar.h
index 8237660b2c..a17f2459fc 100644
--- a/erts/include/internal/win/ethr_membar.h
+++ b/erts/include/internal/win/ethr_membar.h
@@ -63,13 +63,13 @@ do { \
#pragma intrinsic(_mm_sfence)
#pragma intrinsic(_mm_lfence)
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_cfence__(void)
{
_ReadWriteBarrier();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_mfence__(void)
{
#if ETHR_SIZEOF_PTR == 4
@@ -80,7 +80,7 @@ ethr_mfence__(void)
_mm_mfence();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_sfence__(void)
{
#if ETHR_SIZEOF_PTR == 4
@@ -91,7 +91,7 @@ ethr_sfence__(void)
_mm_sfence();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_lfence__(void)
{
#if ETHR_SIZEOF_PTR == 4
diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in
index 4f0a5e5202..b680c03b1d 100644
--- a/erts/lib_src/Makefile.in
+++ b/erts/lib_src/Makefile.in
@@ -458,12 +458,14 @@ RELSYSDIR = $(RELEASE_PATH)/erts-$(VSN)
RELEASE_INCLUDES= \
$(ERTS_INCL)/erl_memory_trace_parser.h \
$(ERTS_INCL)/$(TARGET)/erl_int_sizes_config.h \
+ $(ERTS_INCL)/$(TARGET)/erl_native_features_config.h \
$(ERTS_INCL)/erl_fixed_size_int_types.h
RELEASE_LIBS=$(ERTS_LIBS)
INTERNAL_RELEASE_INCLUDES= \
$(ERTS_INCL_INT)/README \
$(ERTS_INCL_INT)/ethread.h \
+ $(ERTS_INCL_INT)/ethread_inline.h \
$(ERTS_INCL_INT)/ethr_mutex.h \
$(ERTS_INCL_INT)/ethr_optimized_fallbacks.h \
$(ERTS_INCL_INT)/ethr_atomics.h \
diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c
index b32681f40e..7833dd8219 100644
--- a/erts/lib_src/common/erl_misc_utils.c
+++ b/erts/lib_src/common/erl_misc_utils.c
@@ -25,6 +25,7 @@
# include <windows.h>
#endif
+#include "ethread_inline.h"
#include "erl_misc_utils.h"
#if defined(__WIN32__)
@@ -158,6 +159,8 @@ erts_milli_sleep(long ms)
if (ms > 0) {
#ifdef __WIN32__
Sleep((DWORD) ms);
+#elif defined(__OSE__)
+ delay(ms);
#else
struct timeval tv;
tv.tv_sec = ms / 1000;
@@ -189,7 +192,7 @@ struct erts_cpu_info_t_ {
#if defined(__WIN32__)
-static __forceinline int
+static ETHR_FORCE_INLINE int
get_proc_affinity(erts_cpu_info_t *cpuinfo, cpu_set_t *cpuset)
{
DWORD_PTR pamask;
@@ -204,7 +207,7 @@ get_proc_affinity(erts_cpu_info_t *cpuinfo, cpu_set_t *cpuset)
}
}
-static __forceinline int
+static ETHR_FORCE_INLINE int
set_thr_affinity(cpu_set_t *set)
{
if (*set == (cpu_set_t) 0)
@@ -316,6 +319,10 @@ erts_cpu_info_update(erts_cpu_info_t *cpuinfo)
online = 0;
#endif
}
+#elif defined(__OSE__)
+ online = ose_num_cpus();
+ configured = ose_num_cpus();
+ available = ose_num_cpus();
#endif
if (online > configured)
@@ -1151,7 +1158,7 @@ read_topology(erts_cpu_info_t *cpuinfo)
#define ERTS_MU_RELATION_CACHE 2 /* RelationCache */
#define ERTS_MU_RELATION_PROCESSOR_PACKAGE 3 /* RelationProcessorPackage */
-static __forceinline int
+static ETHR_FORCE_INLINE int
rel_cmp_val(int r)
{
switch (r) {
@@ -1508,7 +1515,7 @@ const char* parse_topology_spec_group(erts_cpu_info_t *cpuinfo, const char* xml,
if (is_thread_group) {
thread++;
} else {
- *core_p = (*core_p)++;
+ *core_p = (*core_p) + 1;
}
index_procs++;
}
@@ -1528,9 +1535,9 @@ const char* parse_topology_spec_group(erts_cpu_info_t *cpuinfo, const char* xml,
if (parentCacheLevel == 0) {
*core_p = 0;
- *processor_p = (*processor_p)++;
+ *processor_p = (*processor_p) + 1;
} else {
- *core_p = (*core_p)++;
+ *core_p = (*core_p) + 1;
}
if (error)
diff --git a/erts/lib_src/common/ethr_aux.c b/erts/lib_src/common/ethr_aux.c
index f4ff08d368..b77f2178f2 100644
--- a/erts/lib_src/common/ethr_aux.c
+++ b/erts/lib_src/common/ethr_aux.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2010-2012. All Rights Reserved.
+ * Copyright Ericsson AB 2010-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -204,7 +204,18 @@ ethr_init_common__(ethr_init_data *id)
ethr_min_stack_size__ = ETHR_B2KW(ethr_min_stack_size__);
+#ifdef __OSE__
+ /* For supervisor processes, OSE adds a number of bytes to the requested stack. With this
+ * addition, the resulting size must not exceed the largest available stack size. The number
+ * of bytes that will be added is configured in the monolith and can therefore not be
+ * specified here. We simply assume that it is less than 0x1000. The available stack sizes
+ * are configured in the .lmconf file and the largest one is usually 65536 bytes.
+ * Consequently, the requested stack size is limited to 0xF000.
+ */
+ ethr_max_stack_size__ = 0xF000;
+#else
ethr_max_stack_size__ = 32*1024*1024;
+#endif
#if SIZEOF_VOID_P == 8
ethr_max_stack_size__ *= 2;
#endif
@@ -349,10 +360,10 @@ static ethr_ts_event *ts_event_pool(int size, ethr_ts_event **endpp)
int i;
ethr_aligned_ts_event *atsev;
atsev = ethr_mem__.std.alloc(sizeof(ethr_aligned_ts_event) * size
- + ETHR_CACHE_LINE_SIZE);
+ + ETHR_CACHE_LINE_SIZE - 1);
if (!atsev)
return NULL;
- if ((((ethr_uint_t) atsev) & ETHR_CACHE_LINE_MASK) == 0)
+ if ((((ethr_uint_t) atsev) & ETHR_CACHE_LINE_MASK) != 0)
atsev = ((ethr_aligned_ts_event *)
((((ethr_uint_t) atsev) & ~ETHR_CACHE_LINE_MASK)
+ ETHR_CACHE_LINE_SIZE));
@@ -650,6 +661,10 @@ ETHR_IMPL_NORETURN__ ethr_fatal_error__(const char *file,
int ethr_assert_failed(const char *file, int line, const char *func, char *a)
{
fprintf(stderr, "%s:%d: %s(): Assertion failed: %s\n", file, line, func, a);
+#ifdef __OSE__
+ ramlog_printf("%d: %s:%d: %s(): Assertion failed: %s\n",
+ current_process(),file, line, func, a);
+#endif
ethr_abort__();
return 0;
}
diff --git a/erts/lib_src/common/ethr_mutex.c b/erts/lib_src/common/ethr_mutex.c
index 036914af7b..4e56efaf8b 100644
--- a/erts/lib_src/common/ethr_mutex.c
+++ b/erts/lib_src/common/ethr_mutex.c
@@ -1249,7 +1249,7 @@ ethr_cond_wait(ethr_cond *cnd, ethr_mutex *mtx)
return 0;
}
-#elif defined(ETHR_PTHREADS) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
+#elif (defined(ETHR_PTHREADS) || defined(ETHR_OSE_THREADS)) && !defined(ETHR_DBG_WIN_MTX_WITH_PTHREADS)
/* -- pthread mutex and condition variables -------------------------------- */
int
@@ -1433,7 +1433,7 @@ void LeaveCriticalSection(CRITICAL_SECTION *cs)
#define ETHR_CND_WAIT__ ((ethr_sint32_t) 0x11dead11)
#define ETHR_CND_WAKEUP__ ((ethr_sint32_t) 0x11beef11)
-static __forceinline void
+static ETHR_FORCE_INLINE void
cond_wakeup(ethr_ts_event *tse)
{
ETHR_ASSERT(ethr_atomic32_read(&tse->uaflgs) == ETHR_CND_WAIT__);
@@ -1574,7 +1574,7 @@ ethr_cond_wait(ethr_cond *cnd, ethr_mutex *mtx)
return 0;
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
posix_compliant_mtx_enqueue(ethr_mutex *mtx,
ethr_ts_event *tse_start,
ethr_ts_event *tse_end)
@@ -1614,7 +1614,7 @@ posix_compliant_mtx_enqueue(ethr_mutex *mtx,
}
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
enqueue_cond_wakeups(ethr_ts_event *queue, int posix_compliant)
{
if (queue) {
@@ -1752,6 +1752,8 @@ ethr_cond_destroy(ethr_cond *cnd)
return 0;
}
+#else
+#error "No mutex implementation found"
#endif
/* -- Exported symbols of inline functions --------------------------------- */
diff --git a/erts/lib_src/ose/ethr_event.c b/erts/lib_src/ose/ethr_event.c
new file mode 100644
index 0000000000..87294c98ea
--- /dev/null
+++ b/erts/lib_src/ose/ethr_event.c
@@ -0,0 +1,219 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2009-2010. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Author: Rickard Green
+ */
+
+#define ETHR_INLINE_FUNC_NAME_(X) X ## __
+#define ETHR_EVENT_IMPL__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ethread.h"
+
+#ifdef USE_PTHREAD_API
+
+int
+ethr_event_init(ethr_event *e)
+{
+ int res;
+ ethr_atomic32_init(&e->state, ETHR_EVENT_OFF__);
+ res = pthread_mutex_init(&e->mtx, NULL);
+ if (res != 0)
+ return res;
+ res = pthread_cond_init(&e->cnd, NULL);
+ if (res != 0) {
+ pthread_mutex_destroy(&e->mtx);
+ return res;
+ }
+ return 0;
+}
+
+int
+ethr_event_destroy(ethr_event *e)
+{
+ int res;
+ res = pthread_mutex_destroy(&e->mtx);
+ if (res != 0)
+ return res;
+ res = pthread_cond_destroy(&e->cnd);
+ if (res != 0)
+ return res;
+ return 0;
+}
+
+static ETHR_INLINE int
+wait__(ethr_event *e, int spincount)
+{
+ int sc = spincount;
+ ethr_sint32_t val;
+ int res, ulres;
+ int until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS;
+
+ if (spincount < 0)
+ ETHR_FATAL_ERROR__(EINVAL);
+
+ while (1) {
+ val = ethr_atomic32_read(&e->state);
+ if (val == ETHR_EVENT_ON__)
+ return 0;
+ if (sc == 0)
+ break;
+ sc--;
+ ETHR_SPIN_BODY;
+ if (--until_yield == 0) {
+ until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS;
+ res = ETHR_YIELD();
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ }
+ }
+
+ if (val != ETHR_EVENT_OFF_WAITER__) {
+ val = ethr_atomic32_cmpxchg(&e->state,
+ ETHR_EVENT_OFF_WAITER__,
+ ETHR_EVENT_OFF__);
+ if (val == ETHR_EVENT_ON__)
+ return 0;
+ ETHR_ASSERT(val == ETHR_EVENT_OFF__);
+ }
+
+ ETHR_ASSERT(val == ETHR_EVENT_OFF_WAITER__
+ || val == ETHR_EVENT_OFF__);
+
+ res = pthread_mutex_lock(&e->mtx);
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+
+ while (1) {
+
+ val = ethr_atomic32_read(&e->state);
+ if (val == ETHR_EVENT_ON__)
+ break;
+
+ res = pthread_cond_wait(&e->cnd, &e->mtx);
+ if (res == EINTR)
+ break;
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ }
+
+ ulres = pthread_mutex_unlock(&e->mtx);
+ if (ulres != 0)
+ ETHR_FATAL_ERROR__(ulres);
+
+ return res; /* 0 || EINTR */
+}
+
+#else
+/* --- OSE implementation of events ---------------------------- */
+
+#ifdef DEBUG
+union SIGNAL {
+ SIGSELECT signo;
+};
+#endif
+
+int
+ethr_event_init(ethr_event *e)
+{
+ ethr_atomic32_init(&e->state, ETHR_EVENT_OFF__);
+ e->proc = current_process();
+ return 0;
+}
+
+int
+ethr_event_destroy(ethr_event *e)
+{
+ return 0;
+}
+
+static ETHR_INLINE int
+wait__(ethr_event *e, int spincount)
+{
+ int sc = spincount;
+ int res;
+ int until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS;
+
+ if (spincount < 0)
+ ETHR_FATAL_ERROR__(EINVAL);
+
+ ETHR_ASSERT(e->proc == current_process());
+ ETHR_ASSERT(get_fsem(current_process()) == 0);
+
+ while (1) {
+ ethr_sint32_t val;
+ while (1) {
+ val = ethr_atomic32_read(&e->state);
+ if (val == ETHR_EVENT_ON__)
+ return 0;
+ if (sc == 0)
+ break;
+ sc--;
+ ETHR_SPIN_BODY;
+ if (--until_yield == 0) {
+ until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS;
+ res = ETHR_YIELD();
+ if (res != 0)
+ ETHR_FATAL_ERROR__(res);
+ }
+ }
+ if (val != ETHR_EVENT_OFF_WAITER__) {
+ val = ethr_atomic32_cmpxchg(&e->state,
+ ETHR_EVENT_OFF_WAITER__,
+ ETHR_EVENT_OFF__);
+ if (val == ETHR_EVENT_ON__)
+ return 0;
+ ETHR_ASSERT(val == ETHR_EVENT_OFF__);
+ }
+
+ wait_fsem(1);
+
+ ETHR_ASSERT(get_fsem(current_process()) == 0);
+ }
+}
+
+#endif
+
+void
+ethr_event_reset(ethr_event *e)
+{
+ ethr_event_reset__(e);
+}
+
+void
+ethr_event_set(ethr_event *e)
+{
+ ethr_event_set__(e);
+}
+
+int
+ethr_event_wait(ethr_event *e)
+{
+ return wait__(e, 0);
+}
+
+int
+ethr_event_swait(ethr_event *e, int spincount)
+{
+ return wait__(e, spincount);
+}
diff --git a/erts/lib_src/ose/ethread.c b/erts/lib_src/ose/ethread.c
new file mode 100644
index 0000000000..53628382b1
--- /dev/null
+++ b/erts/lib_src/ose/ethread.c
@@ -0,0 +1,832 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2010-2011. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+/*
+ * Description: OSE implementation of the ethread library
+ * Author: Lukas Larsson
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "stdio.h"
+#ifdef ETHR_TIME_WITH_SYS_TIME
+# include "time.h"
+# include "sys/time.h"
+#else
+# ifdef ETHR_HAVE_SYS_TIME_H
+# include "sys/time.h"
+# else
+# include "time.h"
+# endif
+#endif
+#include "sys/types.h"
+#include "unistd.h"
+
+#include "limits.h"
+
+#define ETHR_INLINE_FUNC_NAME_(X) X ## __
+#define ETHREAD_IMPL__
+
+#include "ethread.h"
+#include "ethr_internal.h"
+
+#include "erl_printf.h"
+#include "efs.h"
+#include "ose.h"
+
+#include "ose_spi.h"
+
+#include "string.h"
+#include "ctype.h"
+#include "stdlib.h"
+
+#ifndef ETHR_HAVE_ETHREAD_DEFINES
+#error Missing configure defines
+#endif
+
+#define ETHR_INVALID_TID_ID -1
+
+#define DEFAULT_PRIO_NAME "ERTS_ETHR_DEFAULT_PRIO"
+
+/* Set the define to 1 to get some logging */
+#if 0
+#include "ramlog.h"
+#define LOG(output) ramlog_printf output
+#else
+#define LOG(output)
+#endif
+
+static ethr_tid main_thr_tid;
+static const char* own_tid_key = "ethread_own_tid";
+ethr_tsd_key ethr_ts_event_key__;
+
+#define ETHREADWRAPDATASIG 1
+
+/* Init data sent to thr_wrapper() */
+typedef struct {
+ SIGSELECT sig_no;
+ ethr_ts_event *tse;
+ ethr_tid *tid;
+ ethr_sint32_t result;
+ void *(*thr_func)(void *);
+ void *arg;
+ void *prep_func_res;
+ const char *name;
+} ethr_thr_wrap_data__;
+
+union SIGNAL {
+ SIGSELECT sig_no;
+ ethr_thr_wrap_data__ data;
+};
+
+#define ETHR_GET_OWN_TID__ ((ethr_tid *) get_envp(current_process(),\
+ own_tid_key))
+
+/*
+ * --------------------------------------------------------------------------
+ * Static functions
+ * --------------------------------------------------------------------------
+ */
+
+/* Will retrive the instrinsic name by removing the 'prefix' and the
+ * suffix from 'name'.
+ * The 'prefix' is given as an inparameter. If NULL or an empty string no
+ * prefix will be removed.
+ * If 'strip_suffix' is 1 suffixes in the form of '_123' will be removed.
+ * Will return a pointer to a newly allocated buffer containing the intrinsic
+ * name in uppercase characters.
+ * The caller must remember to free this buffer when no lnger needed.
+ */
+static char *
+ethr_intrinsic_name(const char *name, const char *prefix, int strip_suffix)
+{
+ const char *start = name;
+ const char *end = name + strlen(name);
+ char *intrinsic_name = NULL;
+ int i;
+
+ if (name == NULL) {
+ LOG(("ERTS - ethr_intrinsic_namNo input name.\n"));
+ return NULL;
+ }
+
+ /* take care of the prefix */
+ if ((prefix != NULL) && (*prefix != '\0')) {
+ const char *found = strstr(name, prefix);
+
+ if (found == name) {
+ /* found the prefix at the beginning */
+ start += strlen(prefix);
+ }
+ }
+
+ /* take care of the suffix */
+ if (strip_suffix) {
+ const char *suffix_start = strrchr(start, '_');
+
+ if (suffix_start != NULL) {
+ const char *ch;
+ int only_numbers = 1;
+
+ for (ch = suffix_start + 1; *ch != '\0'; ch++) {
+ if (strchr("0123456789", *ch) == NULL) {
+ only_numbers = 0;
+ break;
+ }
+ }
+
+ if (only_numbers) {
+ end = suffix_start;
+ }
+ }
+ }
+
+ intrinsic_name = malloc(end - start + 1);
+ for (i = 0; (start + i) < end; i++) {
+ intrinsic_name[i] = toupper(start[i]);
+ }
+ intrinsic_name[i] = '\0';
+
+ return intrinsic_name;
+}
+
+static char *
+ethr_get_amended_env(const char *name, const char *prefix, const char *suffix)
+{
+ unsigned len;
+ char *env_name = NULL;
+ char *env_value = NULL;
+
+ if (name == NULL) {
+ return NULL;
+ }
+
+ len = strlen(name);
+
+ if (prefix != NULL) {
+ len += strlen(prefix);
+ }
+
+ if (suffix != NULL) {
+ len += strlen(suffix);
+ }
+
+ env_name = malloc(len + 1);
+ sprintf(env_name, "%s%s%s", (prefix != NULL) ? prefix : "",
+ name,
+ (suffix != NULL) ? suffix : "");
+ env_value = get_env(get_bid(current_process()), env_name);
+
+ if (env_value == NULL) {
+ LOG(("ERTS - ethr_get_amended_env(): %s environment variable not present\n", env_name));
+ } else {
+ LOG(("ERTS - ethr_get_amended_env(): Found %s environment variable: %s.\n", env_name, env_value));
+ }
+ free(env_name);
+
+ return env_value;
+}
+
+/* Reads the environment variable derived from 'name' and interprets it as as an
+ * OSE priority. If successfull it will update 'out_prio'.
+ * Returns: 0 if successfull
+ * -1 orherwise.
+ */
+static int
+ethr_get_prio(const char *name, OSPRIORITY *out_prio)
+{
+ int rc = -1;
+ char *intrinsic_name = NULL;
+ char *prio_env = NULL;
+ long prio;
+ char *endptr = NULL;
+
+ LOG(("ERTS - ethr_get_prio(): name: %s.\n", name));
+
+ intrinsic_name = ethr_intrinsic_name(name, NULL, 1);
+ LOG(("ERTS - ethr_get_prio(): Intrinsic name: %s.\n", intrinsic_name));
+
+ prio_env = ethr_get_amended_env(intrinsic_name, "ERTS_", "_PRIO");
+ if (prio_env == NULL) {
+ goto fini;
+ }
+
+ prio = efs_str_to_long(prio_env, (const char **)&endptr);
+ if (endptr != NULL) {
+ LOG(("ERTS - ethr_get_prio(): Environment varible for '%s' includes "
+ "non-numerical characters: '%s'.\n", intrinsic_name, prio_env));
+ goto fini;
+ }
+
+ if ((prio < 0) || (prio > 32)) {
+ LOG(("ERTS - ethr_get_prio(): prio for '%s' (%d) is out of bounds (0-32).\n",
+ intrinsic_name, prio));
+ goto fini;
+ }
+
+ /* Success */
+ *out_prio = (OSPRIORITY)prio;
+ rc = 0;
+
+fini:
+ if (intrinsic_name != NULL) {
+ free(intrinsic_name);
+ }
+ if (prio_env != NULL) {
+ free_buf((union SIGNAL **) &prio_env);
+ }
+
+ return rc;
+}
+
+static PROCESS blockId(void) {
+ static PROCESS bid = (PROCESS)0;
+
+ /* For now we only use the same block. */
+ /* if (bid == 0) {
+ bid = create_block("Erlang-VM", 0, 0, 0, 0);
+ }
+ return bid; */
+ return 0;
+}
+
+static void thr_exit_cleanup(ethr_tid *tid, void *res)
+{
+
+ ETHR_ASSERT(tid == ETHR_GET_OWN_TID__);
+
+ tid->res = res;
+
+ ethr_run_exit_handlers__();
+ ethr_ts_event_destructor__((void *) ethr_get_tse__());
+}
+
+//static OS_PROCESS(thr_wrapper);
+static OS_PROCESS(thr_wrapper)
+{
+ ethr_tid my_tid;
+ ethr_sint32_t result;
+ void *res;
+ void *(*thr_func)(void *);
+ void *arg;
+ ethr_ts_event *tsep = NULL;
+
+#ifdef DEBUG
+ {
+ PROCESS pid = current_process();
+
+ const char *execMode;
+
+ PROCESS bid = get_bid(pid);
+
+ /* In the call below, 16 is a secret number provided by frbr that makes
+ * the function return current domain. */
+ OSADDRESS domain = get_pid_info(current_process(), 16);
+
+#ifdef HAVE_OSE_SPI_H
+ execMode = get_pid_info(pid, OSE_PI_SUPERVISOR)
+ ? "Supervisor"
+ : "User";
+#else
+ execMode = "unknown";
+#endif
+
+ fprintf(stderr,"[0x%x] New process. Bid:0x%x, domain:%d, exec mode:%s\n",
+ current_process(), bid, domain, execMode);
+ }
+#endif
+
+ {
+ SIGSELECT sigsel[] = {1,ETHREADWRAPDATASIG};
+ union SIGNAL *init_msg = receive(sigsel);
+
+ thr_func = init_msg->data.thr_func;
+ arg = init_msg->data.arg;
+
+ result = (ethr_sint32_t) ethr_make_ts_event__(&tsep);
+
+ if (result == 0) {
+ tsep->iflgs |= ETHR_TS_EV_ETHREAD;
+ my_tid = *init_msg->data.tid;
+ set_envp(current_process(), own_tid_key, (OSADDRESS)&my_tid);
+ if (ethr_thr_child_func__)
+ ethr_thr_child_func__(init_msg->data.prep_func_res);
+ }
+
+ init_msg->data.result = result;
+
+ send(&init_msg,sender(&init_msg));
+ }
+
+ /* pthread mutex api says we have to do this */
+ signal_fsem(current_process());
+ ETHR_ASSERT(get_fsem(current_process()) == 0);
+
+ res = result == 0 ? (*thr_func)(arg) : NULL;
+
+ ethr_thr_exit(&res);
+}
+
+/* internal exports */
+
+int ethr_set_tse__(ethr_ts_event *tsep)
+{
+ return ethr_tsd_set(ethr_ts_event_key__,(void *) tsep);
+}
+
+ethr_ts_event *ethr_get_tse__(void)
+{
+ return (ethr_ts_event *) ethr_tsd_get(ethr_ts_event_key__);
+}
+
+#if defined(ETHR_PPC_RUNTIME_CONF__)
+
+static int
+ppc_init__(void)
+{
+ int pid;
+
+
+ ethr_runtime__.conf.have_lwsync = 0;
+
+ return 0;
+}
+
+#endif
+
+#if defined(ETHR_X86_RUNTIME_CONF__)
+
+void
+ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx)
+{
+#if ETHR_SIZEOF_PTR == 4
+ int have_cpuid;
+ /*
+ * If it is possible to toggle eflags bit 21,
+ * we have the cpuid instruction.
+ */
+ __asm__ ("pushf\n\t"
+ "popl %%eax\n\t"
+ "movl %%eax, %%ecx\n\t"
+ "xorl $0x200000, %%eax\n\t"
+ "pushl %%eax\n\t"
+ "popf\n\t"
+ "pushf\n\t"
+ "popl %%eax\n\t"
+ "movl $0x0, %0\n\t"
+ "xorl %%ecx, %%eax\n\t"
+ "jz no_cpuid\n\t"
+ "movl $0x1, %0\n\t"
+ "no_cpuid:\n\t"
+ : "=r"(have_cpuid)
+ :
+ : "%eax", "%ecx", "cc");
+ if (!have_cpuid) {
+ *eax = *ebx = *ecx = *edx = 0;
+ return;
+ }
+#endif
+#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
+ /*
+ * When position independet code is used in 32-bit mode, the B register
+ * is used for storage of global offset table address, and we may not
+ * use it as input or output in an asm. We need to save and restore the
+ * B register explicitly (for some reason gcc doesn't provide this
+ * service to us).
+ */
+ __asm__ ("pushl %%ebx\n\t"
+ "cpuid\n\t"
+ "movl %%ebx, %1\n\t"
+ "popl %%ebx\n\t"
+ : "=a"(*eax), "=r"(*ebx), "=c"(*ecx), "=d"(*edx)
+ : "0"(*eax)
+ : "cc");
+#else
+ __asm__ ("cpuid\n\t"
+ : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
+ : "0"(*eax)
+ : "cc");
+#endif
+}
+
+#endif /* ETHR_X86_RUNTIME_CONF__ */
+
+/*
+ * --------------------------------------------------------------------------
+ * Exported functions
+ * --------------------------------------------------------------------------
+ */
+
+int
+ethr_init(ethr_init_data *id)
+{
+ int res;
+
+ if (!ethr_not_inited__)
+ return EINVAL;
+
+
+#if defined(ETHR_PPC_RUNTIME_CONF__)
+ res = ppc_init__();
+ if (res != 0)
+ goto error;
+#endif
+
+ res = ethr_init_common__(id);
+ if (res != 0)
+ goto error;
+
+ main_thr_tid.id = current_process();
+ main_thr_tid.tsd_key_index = 0;
+
+ set_envp(current_process(),own_tid_key,(OSADDRESS)&main_thr_tid);
+ signal_fsem(current_process());
+
+
+ ETHR_ASSERT(&main_thr_tid == ETHR_GET_OWN_TID__);
+
+ ethr_not_inited__ = 0;
+
+ ethr_tsd_key_create(&ethr_ts_event_key__,"ethread_tse");
+
+ return 0;
+ error:
+ ethr_not_inited__ = 1;
+ return res;
+
+}
+
+int
+ethr_late_init(ethr_late_init_data *id)
+{
+ int res = ethr_late_init_common__(id);
+ if (res != 0)
+ return res;
+ ethr_not_completely_inited__ = 0;
+ return res;
+}
+
+int
+ethr_thr_create(ethr_tid *tid, void * (*func)(void *), void *arg,
+ ethr_thr_opts *opts)
+{
+ int res;
+ int use_stack_size = (opts && opts->suggested_stack_size >= 0
+ ? opts->suggested_stack_size
+ : 0x200 /* Use system default */);
+ OSPRIORITY use_prio;
+ char *use_name;
+ char default_thr_name[20];
+ static int no_of_thr = 0;
+ cpuid_t use_core;
+
+ union SIGNAL *init_msg;
+ SIGSELECT sigsel[] = {1,ETHREADWRAPDATASIG};
+ void *prep_func_res;
+
+
+ if (opts != NULL) {
+ LOG(("ERTS - ethr_thr_create(): opts supplied: name: %s, coreNo: %u.\n",
+ opts->name, opts->coreNo));
+ use_name = opts->name;
+ use_core = opts->coreNo;
+ if (0 != ethr_get_prio(use_name, &use_prio)) {
+ if (0 != ethr_get_prio("DEFAULT", &use_prio)) {
+ use_prio = get_pri(current_process());
+ LOG(("ERTS - ethr_thr_create(): Using current process' prio: %d.\n", use_prio));
+ } else {
+ LOG(("ERTS - ethr_thr_create(): Using default prio: %d.\n", use_prio));
+ }
+ } else {
+ LOG(("ERTS - ethr_thr_create(): Using configured prio: %d.\n", use_prio));
+ }
+ } else {
+ LOG(("ERTS - ethr_thr_create(): opts not supplied. Using defaults.\n"));
+ no_of_thr++;
+ sprintf(default_thr_name, "ethread_%d", no_of_thr);
+ use_name = default_thr_name;
+ use_core = ose_cpu_id();
+
+ if (0 != ethr_get_prio("DEFAULT", &use_prio)) {
+ use_prio = get_pri(current_process());
+ LOG(("ERTS - ethr_thr_create(): Using current process' prio: %d.\n", use_prio));
+ }
+ }
+
+#ifdef ETHR_MODIFIED_DEFAULT_STACK_SIZE
+ if (use_stack_size < 0)
+ use_stack_size = ETHR_MODIFIED_DEFAULT_STACK_SIZE;
+#endif
+
+#if ETHR_XCHK
+ if (ethr_not_completely_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+ if (!tid || !func) {
+ ETHR_ASSERT(0);
+ return EINVAL;
+ }
+#endif
+
+ if (use_stack_size >= 0) {
+ size_t suggested_stack_size = (size_t) use_stack_size;
+ size_t stack_size;
+#ifdef ETHR_DEBUG
+ suggested_stack_size /= 2; /* Make sure we got margin */
+#endif
+#ifdef ETHR_STACK_GUARD_SIZE
+ /* The guard is at least on some platforms included in the stack size
+ passed when creating threads */
+ suggested_stack_size += ETHR_B2KW(ETHR_STACK_GUARD_SIZE);
+#endif
+
+ if (suggested_stack_size < ethr_min_stack_size__)
+ stack_size = ETHR_KW2B(ethr_min_stack_size__);
+ else if (suggested_stack_size > ethr_max_stack_size__)
+ stack_size = ETHR_KW2B(ethr_max_stack_size__);
+ else
+ stack_size = ETHR_PAGE_ALIGN(ETHR_KW2B(suggested_stack_size));
+ use_stack_size = stack_size;
+ }
+
+ init_msg = alloc(sizeof(ethr_thr_wrap_data__), ETHREADWRAPDATASIG);
+
+ /* Call prepare func if it exist */
+ if (ethr_thr_prepare_func__)
+ init_msg->data.prep_func_res = ethr_thr_prepare_func__();
+ else
+ init_msg->data.prep_func_res = NULL;
+
+ LOG(("ERTS - ethr_thr_create(): Process [0x%x] is creating '%s', coreNo = %u, prio:%u\n",
+ current_process(), use_name, use_core, use_prio));
+
+ tid->id = create_process(OS_PRI_PROC, use_name, thr_wrapper,
+ use_stack_size, use_prio, 0,
+ get_bid(current_process()), NULL, 0, 0);
+ if (ose_bind_process(tid->id, use_core)) {
+ LOG(("ERTS - ethr_thr_create(): Bound pid 0x%x (%s) to core no %u.\n",
+ tid->id, use_name, use_core));
+ } else {
+ LOG(("ERTS - ethr_thr_create(): Failed binding pid 0x%x (%s) to core no %u.\n",
+ tid->id, use_name, use_core));
+ }
+
+ /*FIXME!!! Normally this shouldn't be used in shared mode. Still there is
+ * a problem with stdin fd in fd_ processes which should be further
+ * investigated */
+ efs_clone(tid->id);
+
+ tid->tsd_key_index = 0;
+ tid->res = NULL;
+
+ init_msg->data.tse = ethr_get_ts_event();
+ init_msg->data.thr_func = func;
+ init_msg->data.arg = arg;
+ init_msg->data.tid = tid;
+ init_msg->data.name = opts->name;
+
+ send(&init_msg, tid->id);
+
+ start(tid->id);
+ init_msg = receive(sigsel);
+
+ res = init_msg->data.result;
+ prep_func_res = init_msg->data.prep_func_res;
+
+ free_buf(&init_msg);
+ /* Cleanup... */
+
+ if (ethr_thr_parent_func__)
+ ethr_thr_parent_func__(prep_func_res);
+
+ LOG(("ERTS - ethr_thr_create(): Exiting.\n"));
+ return res;
+}
+
+int
+ethr_thr_join(ethr_tid tid, void **res)
+{
+ SIGSELECT sigsel[] = {1,OS_ATTACH_SIG};
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+#endif
+
+ if (tid.id == ETHR_INVALID_TID_ID)
+ return EINVAL;
+
+ attach(NULL,tid.id);
+ receive(sigsel);
+
+ if (res)
+ *res = tid.res;
+
+ return 0;
+}
+
+int
+ethr_thr_detach(ethr_tid tid)
+{
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+#endif
+ return 0;
+}
+
+void
+ethr_thr_exit(void *res)
+{
+ ethr_tid *tid;
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return;
+ }
+#endif
+ tid = ETHR_GET_OWN_TID__;
+ if (!tid) {
+ ETHR_ASSERT(0);
+ kill_proc(current_process());
+ }
+ thr_exit_cleanup(tid, res);
+ /* Harakiri possible? */
+ kill_proc(current_process());
+}
+
+ethr_tid
+ethr_self(void)
+{
+ ethr_tid *tid;
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ethr_tid dummy_tid = {ETHR_INVALID_TID_ID, 0, NULL};
+ ETHR_ASSERT(0);
+ return dummy_tid;
+ }
+#endif
+ tid = ETHR_GET_OWN_TID__;
+ if (!tid) {
+ ethr_tid dummy_tid = {ETHR_INVALID_TID_ID, 0, NULL};
+ return dummy_tid;
+ }
+ return *tid;
+}
+
+int
+ethr_equal_tids(ethr_tid tid1, ethr_tid tid2)
+{
+ return tid1.id == tid2.id && tid1.id != ETHR_INVALID_TID_ID;
+}
+
+
+/*
+ * Thread specific events
+ */
+
+ethr_ts_event *
+ethr_get_ts_event(void)
+{
+ return ethr_get_ts_event__();
+}
+
+void
+ethr_leave_ts_event(ethr_ts_event *tsep)
+{
+ ethr_leave_ts_event__(tsep);
+}
+
+/*
+ * Thread specific data
+ */
+
+int
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
+{
+
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+ if (!keyp) {
+ ETHR_ASSERT(0);
+ return EINVAL;
+ }
+#endif
+
+ ose_create_ppdata(keyname,keyp);
+
+ return 0;
+}
+
+int
+ethr_tsd_key_delete(ethr_tsd_key key)
+{
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+#endif
+ /* Not possible to delete ppdata */
+
+ return 0;
+}
+
+int
+ethr_tsd_set(ethr_tsd_key key, void *value)
+{
+ void **ppdp;
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+#endif
+ ppdp = (void **)ose_get_ppdata(key);
+ *ppdp = value;
+ return 0;
+}
+
+void *
+ethr_tsd_get(ethr_tsd_key key)
+{
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return NULL;
+ }
+#endif
+ return *(void**)ose_get_ppdata(key);
+}
+
+/*
+ * Signal functions
+ */
+
+#if ETHR_HAVE_ETHR_SIG_FUNCS
+
+int ethr_sigmask(int how, const sigset_t *set, sigset_t *oset)
+{
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+ if (!set && !oset) {
+ ETHR_ASSERT(0);
+ return EINVAL;
+ }
+#endif
+ return pthread_sigmask(how, set, oset);
+}
+
+int ethr_sigwait(const sigset_t *set, int *sig)
+{
+#if ETHR_XCHK
+ if (ethr_not_inited__) {
+ ETHR_ASSERT(0);
+ return EACCES;
+ }
+ if (!set || !sig) {
+ ETHR_ASSERT(0);
+ return EINVAL;
+ }
+#endif
+ if (sigwait(set, sig) < 0)
+ return errno;
+ return 0;
+}
+
+#endif /* #if ETHR_HAVE_ETHR_SIG_FUNCS */
+
+ETHR_IMPL_NORETURN__
+ethr_abort__(void)
+{
+ abort();
+}
diff --git a/erts/lib_src/pthread/ethread.c b/erts/lib_src/pthread/ethread.c
index fb7d135418..79784c5b84 100644
--- a/erts/lib_src/pthread/ethread.c
+++ b/erts/lib_src/pthread/ethread.c
@@ -472,7 +472,7 @@ ethr_leave_ts_event(ethr_ts_event *tsep)
*/
int
-ethr_tsd_key_create(ethr_tsd_key *keyp)
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
{
#if ETHR_XCHK
if (ethr_not_inited__) {
@@ -541,7 +541,11 @@ int ethr_sigmask(int how, const sigset_t *set, sigset_t *oset)
return EINVAL;
}
#endif
- return pthread_sigmask(how, set, oset);
+#if defined(__ANDROID__)
+ return sigprocmask(how, set, oset);
+#else
+ return pthread_sigmask(how, set, oset);
+#endif
}
int ethr_sigwait(const sigset_t *set, int *sig)
diff --git a/erts/lib_src/win/ethread.c b/erts/lib_src/win/ethread.c
index 3abda6de4c..14d0b6deff 100644
--- a/erts/lib_src/win/ethread.c
+++ b/erts/lib_src/win/ethread.c
@@ -520,7 +520,7 @@ ethr_equal_tids(ethr_tid tid1, ethr_tid tid2)
*/
int
-ethr_tsd_key_create(ethr_tsd_key *keyp)
+ethr_tsd_key_create(ethr_tsd_key *keyp, char *keyname)
{
DWORD key;
#if ETHR_XCHK
diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam
index 564dfbcf2b..10138cab22 100644
--- a/erts/preloaded/ebin/erl_prim_loader.beam
+++ b/erts/preloaded/ebin/erl_prim_loader.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 9dd826fa26..7a3d94dd16 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erts_internal.beam b/erts/preloaded/ebin/erts_internal.beam
index 1ef9b86a38..9b364d8b21 100644
--- a/erts/preloaded/ebin/erts_internal.beam
+++ b/erts/preloaded/ebin/erts_internal.beam
Binary files differ
diff --git a/erts/preloaded/ebin/init.beam b/erts/preloaded/ebin/init.beam
index 83b5b8f7dc..a190129b2c 100644
--- a/erts/preloaded/ebin/init.beam
+++ b/erts/preloaded/ebin/init.beam
Binary files differ
diff --git a/erts/preloaded/ebin/otp_ring0.beam b/erts/preloaded/ebin/otp_ring0.beam
index c8cc31503f..621f036f33 100644
--- a/erts/preloaded/ebin/otp_ring0.beam
+++ b/erts/preloaded/ebin/otp_ring0.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_eval.beam b/erts/preloaded/ebin/prim_eval.beam
index 4f9a963f60..6695f4cd15 100644
--- a/erts/preloaded/ebin/prim_eval.beam
+++ b/erts/preloaded/ebin/prim_eval.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index 2a187c23cb..5e9230826d 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index 656fbc6627..83230d42ae 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_zip.beam b/erts/preloaded/ebin/prim_zip.beam
index e1f4a06b40..b3abba3223 100644
--- a/erts/preloaded/ebin/prim_zip.beam
+++ b/erts/preloaded/ebin/prim_zip.beam
Binary files differ
diff --git a/erts/preloaded/ebin/zlib.beam b/erts/preloaded/ebin/zlib.beam
index cc45a8e6f1..7006764d96 100644
--- a/erts/preloaded/ebin/zlib.beam
+++ b/erts/preloaded/ebin/zlib.beam
Binary files differ
diff --git a/erts/preloaded/src/add_abstract_code b/erts/preloaded/src/add_abstract_code
index e670156d21..211a60c930 100644
--- a/erts/preloaded/src/add_abstract_code
+++ b/erts/preloaded/src/add_abstract_code
@@ -27,8 +27,18 @@
main([BeamFile,AbstrFile]) ->
{ok,_,Chunks0} = beam_lib:all_chunks(BeamFile),
{ok,Abstr} = file:consult(AbstrFile),
- Chunks = lists:keyreplace("Abst", 1, Chunks0,
- {"Abst",term_to_binary({raw_abstract_v1,Abstr})}),
+ Chunks1 = lists:keyreplace("Abst", 1, Chunks0,
+ {"Abst",term_to_binary({raw_abstract_v1,Abstr})}),
+ {"CInf",CInf0} = lists:keyfind("CInf", 1, Chunks1),
+ CInf = fix_options(CInf0),
+ Chunks = lists:keyreplace("CInf", 1, Chunks1, {"CInf",CInf}),
{ok,Module} = beam_lib:build_module(Chunks),
ok = file:write_file(BeamFile, Module),
init:stop().
+
+fix_options(CInf0) ->
+ CInf1 = binary_to_term(CInf0),
+ {options,Opts0} = lists:keyfind(options, 1, CInf1),
+ Opts = Opts0 -- [from_asm],
+ CInf = lists:keyreplace(options, 1, CInf1, {options,Opts}),
+ term_to_binary(CInf).
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index fc43d1d4fa..6b86a427ba 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -42,11 +42,11 @@
%% Public
-export([start/3, set_path/1, get_path/0, get_file/1, get_files/2,
- list_dir/1, read_file_info/1, get_cwd/0, get_cwd/1]).
+ list_dir/1, read_file_info/1, read_link_info/1, get_cwd/0, get_cwd/1]).
%% Used by erl_boot_server
-export([prim_init/0, prim_get_file/2, prim_list_dir/2,
- prim_read_file_info/2, prim_get_cwd/2]).
+ prim_read_file_info/3, prim_get_cwd/2]).
%% Used by escript and code
-export([set_primary_archive/4, release_archives/0]).
@@ -223,6 +223,12 @@ list_dir(Dir) ->
read_file_info(File) ->
check_file_result(read_file_info, File, request({read_file_info,File})).
+-spec read_link_info(Filename) -> {'ok', FileInfo} | 'error' when
+ Filename :: string(),
+ FileInfo :: file:file_info().
+read_link_info(File) ->
+ check_file_result(read_link_info, File, request({read_link_info,File})).
+
-spec get_cwd() -> {'ok', string()} | 'error'.
get_cwd() ->
check_file_result(get_cwd, [], request({get_cwd,[]})).
@@ -262,6 +268,8 @@ check_file_result(_, _, {error,enoent}) ->
error;
check_file_result(_, _, {error,enotdir}) ->
error;
+check_file_result(_, _, {error,einval}) ->
+ error;
check_file_result(Func, Target, {error,Reason}) ->
case (catch atom_to_list(Reason)) of
{'EXIT',_} -> % exit trapped
@@ -323,6 +331,9 @@ loop(State, Parent, Paths) ->
{read_file_info,File} ->
{Res,State1} = handle_read_file_info(State, File),
{Res,State1,Paths};
+ {read_link_info,File} ->
+ {Res,State1} = handle_read_link_info(State, File),
+ {Res,State1,Paths};
{get_cwd,[]} ->
{Res,State1} = handle_get_cwd(State, []),
{Res,State1,Paths};
@@ -385,10 +396,15 @@ handle_list_dir(State = #state{loader = inet}, Dir) ->
?SAFE2(inet_list_dir(State, Dir), State).
handle_read_file_info(State = #state{loader = efile}, File) ->
- ?SAFE2(efile_read_file_info(State, File), State);
+ ?SAFE2(efile_read_file_info(State, File, true), State);
handle_read_file_info(State = #state{loader = inet}, File) ->
?SAFE2(inet_read_file_info(State, File), State).
+handle_read_link_info(State = #state{loader = efile}, File) ->
+ ?SAFE2(efile_read_file_info(State, File, false), State);
+handle_read_link_info(State = #state{loader = inet}, File) ->
+ ?SAFE2(inet_read_link_info(State, File), State).
+
handle_get_cwd(State = #state{loader = efile}, Drive) ->
?SAFE2(efile_get_cwd(State, Drive), State);
handle_get_cwd(State = #state{loader = inet}, Drive) ->
@@ -512,8 +528,8 @@ efile_list_dir(#state{prim_state = PS} = State, Dir) ->
{Res, PS2} = prim_list_dir(PS, Dir),
{Res, State#state{prim_state = PS2}}.
-efile_read_file_info(#state{prim_state = PS} = State, File) ->
- {Res, PS2} = prim_read_file_info(PS, File),
+efile_read_file_info(#state{prim_state = PS} = State, File, FollowLinks) ->
+ {Res, PS2} = prim_read_file_info(PS, File, FollowLinks),
{Res, State#state{prim_state = PS2}}.
efile_get_cwd(#state{prim_state = PS} = State, Drive) ->
@@ -716,6 +732,10 @@ inet_list_dir(State, Dir) ->
inet_read_file_info(State, File) ->
inet_send_and_rcv({read_file_info,File}, read_file_info, State).
+%% -> {{ok,Info},State} | {{error,Reason},State}
+inet_read_link_info(State, File) ->
+ inet_send_and_rcv({read_link_info,File}, read_link_info, State).
+
%% -> {{ok,Cwd},State} | {{error,Reason},State}
inet_get_cwd(State, []) ->
inet_send_and_rcv(get_cwd, get_cwd, State);
@@ -949,16 +969,18 @@ prim_list_dir(PS, Dir) ->
debug(PS, {return, Res2}),
{Res2, PS3}.
--spec prim_read_file_info(prim_state(), file:filename()) ->
+-spec prim_read_file_info(prim_state(), file:filename(), boolean()) ->
{{'ok', #file_info{}}, prim_state()}
| {{'error', term()}, prim_state()}.
-prim_read_file_info(PS, File) ->
+prim_read_file_info(PS, File, FollowLinks) ->
debug(PS, {read_file_info, File}),
{Res2, PS2} =
case name_split(PS#prim_state.primary_archive, File) of
{file, PrimFile} ->
- Res = prim_file:read_file_info(PrimFile),
- {Res, PS};
+ case FollowLinks of
+ true -> {prim_file:read_file_info(PrimFile), PS};
+ false -> {prim_file:read_link_info(PrimFile), PS}
+ end;
{archive, ArchiveFile, []} ->
%% Fake top directory
debug(PS, {archive_read_file_info, ArchiveFile}),
@@ -1041,7 +1063,7 @@ apply_archive(PS, Fun, Acc, Archive) ->
apply_archive(PS, Fun, Acc, Archive);
Error ->
debug(PS, {cache, {clear, Error}}),
- clear_cache(Archive, {ok, PrimZip}),
+ ok = clear_cache(Archive, {ok, PrimZip}),
apply_archive(PS, Fun, Acc, Archive)
end;
{Cache, FI} ->
@@ -1392,6 +1414,8 @@ absname_vr([Drive, $\: | NameRest], _) ->
%% Assumes normalized name
pathtype(Name) when is_list(Name) ->
case erlang:system_info(os_type) of
+ {ose, _} ->
+ unix_pathtype(Name);
{unix, _} ->
unix_pathtype(Name);
{win32, _} ->
@@ -1483,7 +1507,14 @@ real_path(Name,[Path|Paths],Acc,Links) ->
[""|_] = LinkPaths ->
real_path(Name,LinkPaths++Paths,[],[ThisFile|Links]);
LinkPaths ->
- real_path(Name,LinkPaths++Paths,Acc,[ThisFile|Links])
+ % windows currently does not allow creation of relative symlinks
+ % across different drives
+ case erlang:system_info(os_type) of
+ {win32, _} ->
+ real_path(Name,LinkPaths++Paths,[],[ThisFile|Links]);
+ _ ->
+ real_path(Name,LinkPaths++Paths,Acc,[ThisFile|Links])
+ end
end;
_ ->
real_path(Name,Paths,This,Links)
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 291926578e..611a568014 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -79,9 +79,10 @@
-export([binary_to_integer/1,binary_to_integer/2]).
-export([binary_to_list/1]).
-export([binary_to_list/3, binary_to_term/1, binary_to_term/2]).
--export([bit_size/1, bitsize/1, bitstr_to_list/1, bitstring_to_list/1]).
+-export([bit_size/1, bitsize/1, bitstring_to_list/1]).
-export([bump_reductions/1, byte_size/1, call_on_load_function/1]).
--export([cancel_timer/1, check_old_code/1, check_process_code/2, crc32/1]).
+-export([cancel_timer/1, check_old_code/1, check_process_code/2,
+ check_process_code/3, crc32/1]).
-export([crc32/2, crc32_combine/3, date/0, decode_packet/3]).
-export([delete_element/2]).
-export([delete_module/1, demonitor/1, demonitor/2, display/1]).
@@ -90,8 +91,8 @@
-export([external_size/2, finish_after_on_load/2, finish_loading/1, float/1]).
-export([float_to_binary/1, float_to_binary/2,
float_to_list/1, float_to_list/2]).
--export([fun_info/2, fun_to_list/1, function_exported/3]).
--export([garbage_collect/0, garbage_collect/1]).
+-export([fun_info/2, fun_info_mfa/1, fun_to_list/1, function_exported/3]).
+-export([garbage_collect/0, garbage_collect/1, garbage_collect/2]).
-export([garbage_collect_message_area/0, get/0, get/1, get_keys/1]).
-export([get_module_info/1, get_stacktrace/0, group_leader/0]).
-export([group_leader/2, halt/0, halt/1, halt/2, hash/2, hibernate/3]).
@@ -99,14 +100,13 @@
-export([integer_to_binary/1, integer_to_list/1]).
-export([iolist_size/1, iolist_to_binary/1]).
-export([is_alive/0, is_builtin/3, is_process_alive/1, length/1, link/1]).
--export([list_to_atom/1, list_to_binary/1, list_to_bitstr/1]).
+-export([list_to_atom/1, list_to_binary/1]).
-export([list_to_bitstring/1, list_to_existing_atom/1, list_to_float/1]).
-export([list_to_integer/1, list_to_integer/2]).
-export([list_to_pid/1, list_to_tuple/1, loaded/0]).
--export([localtime/0, make_ref/0, match_spec_test/3, md5/1, md5_final/1]).
+-export([localtime/0, make_ref/0, map_size/1, match_spec_test/3, md5/1, md5_final/1]).
-export([md5_init/0, md5_update/2, module_loaded/1, monitor/2]).
--export([monitor_node/2, monitor_node/3, nif_error/1, nif_error/2
-]).
+-export([monitor_node/2, monitor_node/3, nif_error/1, nif_error/2]).
-export([node/0, node/1, now/0, phash/2, phash2/1, phash2/2]).
-export([pid_to_list/1, port_close/1, port_command/2, port_command/3]).
-export([port_connect/2, port_control/3, port_get_data/1]).
@@ -127,7 +127,7 @@
-export([abs/1, append/2, element/2, get_module_info/2, hd/1,
is_atom/1, is_binary/1, is_bitstring/1, is_boolean/1,
is_float/1, is_function/1, is_function/2, is_integer/1,
- is_list/1, is_number/1, is_pid/1, is_port/1, is_record/2,
+ is_list/1, is_map/1, is_number/1, is_pid/1, is_port/1, is_record/2,
is_record/3, is_reference/1, is_tuple/1, load_module/2,
load_nif/2, localtime_to_universaltime/2, make_fun/3,
make_tuple/2, make_tuple/3, nodes/1, open_port/2,
@@ -384,12 +384,6 @@ bit_size(_Bitstring) ->
bitsize(_P1) ->
erlang:nif_error(undefined).
-%% bitstr_to_list/1
--spec erlang:bitstr_to_list(P1) -> [byte() | bitstring()] when
- P1 :: bitstring().
-bitstr_to_list(_P1) ->
- erlang:nif_error(undefined).
-
%% bitstring_to_list/1
-spec bitstring_to_list(Bitstring) -> [byte() | bitstring()] when
Bitstring :: bitstring().
@@ -429,11 +423,71 @@ check_old_code(_Module) ->
erlang:nif_error(undefined).
%% check_process_code/2
--spec check_process_code(Pid, Module) -> boolean() when
+-spec check_process_code(Pid, Module) -> CheckResult when
Pid :: pid(),
- Module :: module().
-check_process_code(_Pid, _Module) ->
- erlang:nif_error(undefined).
+ Module :: module(),
+ CheckResult :: boolean().
+check_process_code(Pid, Module) ->
+ try
+ erlang:check_process_code(Pid, Module, [{allow_gc, true}])
+ catch
+ error:Error -> erlang:error(Error, [Pid, Module])
+ end.
+
+%% check_process_code/3
+-spec check_process_code(Pid, Module, OptionList) -> CheckResult | async when
+ Pid :: pid(),
+ Module :: module(),
+ RequestId :: term(),
+ Option :: {async, RequestId} | {allow_gc, boolean()},
+ OptionList :: [Option],
+ CheckResult :: boolean() | aborted.
+check_process_code(Pid, Module, OptionList) ->
+ try
+ {Async, AllowGC} = get_cpc_opts(OptionList, sync, true),
+ case Async of
+ {async, ReqId} ->
+ {priority, Prio} = erlang:process_info(erlang:self(),
+ priority),
+ erts_internal:request_system_task(Pid,
+ Prio,
+ {check_process_code,
+ ReqId,
+ Module,
+ AllowGC}),
+ async;
+ sync ->
+ case Pid == erlang:self() of
+ true ->
+ erts_internal:check_process_code(Module,
+ [{allow_gc, AllowGC}]);
+ false ->
+ {priority, Prio} = erlang:process_info(erlang:self(),
+ priority),
+ ReqId = erlang:make_ref(),
+ erts_internal:request_system_task(Pid,
+ Prio,
+ {check_process_code,
+ ReqId,
+ Module,
+ AllowGC}),
+ receive
+ {check_process_code, ReqId, CheckResult} ->
+ CheckResult
+ end
+ end
+ end
+ catch
+ error:Error -> erlang:error(Error, [Pid, Module, OptionList])
+ end.
+
+% gets async and allow_gc opts and verify valid option list
+get_cpc_opts([{async, _ReqId} = AsyncTuple | Options], _OldAsync, AllowGC) ->
+ get_cpc_opts(Options, AsyncTuple, AllowGC);
+get_cpc_opts([{allow_gc, AllowGC} | Options], Async, _OldAllowGC) ->
+ get_cpc_opts(Options, Async, AllowGC);
+get_cpc_opts([], Async, AllowGC) ->
+ {Async, AllowGC}.
%% crc32/1
-spec erlang:crc32(Data) -> non_neg_integer() when
@@ -773,6 +827,15 @@ float_to_list(_Float, _Options) ->
fun_info(_Fun, _Item) ->
erlang:nif_error(undefined).
+%% fun_info_mfa/1
+-spec erlang:fun_info_mfa(Fun) -> {Mod, Name, Arity} when
+ Fun :: function(),
+ Mod :: atom(),
+ Name :: atom(),
+ Arity :: non_neg_integer().
+fun_info_mfa(_Fun) ->
+ erlang:nif_error(undefined).
+
%% fun_to_list/1
-spec erlang:fun_to_list(Fun) -> string() when
Fun :: function().
@@ -793,10 +856,61 @@ garbage_collect() ->
erlang:nif_error(undefined).
%% garbage_collect/1
--spec garbage_collect(Pid) -> boolean() when
- Pid :: pid().
-garbage_collect(_Pid) ->
- erlang:nif_error(undefined).
+-spec garbage_collect(Pid) -> GCResult when
+ Pid :: pid(),
+ GCResult :: boolean().
+garbage_collect(Pid) ->
+ try
+ erlang:garbage_collect(Pid, [])
+ catch
+ error:Error -> erlang:error(Error, [Pid])
+ end.
+
+%% garbage_collect/2
+-spec garbage_collect(Pid, OptionList) -> GCResult | async when
+ Pid :: pid(),
+ RequestId :: term(),
+ Option :: {async, RequestId},
+ OptionList :: [Option],
+ GCResult :: boolean().
+garbage_collect(Pid, OptionList) ->
+ try
+ Async = get_gc_opts(OptionList, sync),
+ case Async of
+ {async, ReqId} ->
+ {priority, Prio} = erlang:process_info(erlang:self(),
+ priority),
+ erts_internal:request_system_task(Pid,
+ Prio,
+ {garbage_collect, ReqId}),
+ async;
+ sync ->
+ case Pid == erlang:self() of
+ true ->
+ erlang:garbage_collect();
+ false ->
+ {priority, Prio} = erlang:process_info(erlang:self(),
+ priority),
+ ReqId = erlang:make_ref(),
+ erts_internal:request_system_task(Pid,
+ Prio,
+ {garbage_collect,
+ ReqId}),
+ receive
+ {garbage_collect, ReqId, GCResult} ->
+ GCResult
+ end
+ end
+ end
+ catch
+ error:Error -> erlang:error(Error, [Pid, OptionList])
+ end.
+
+% gets async opt and verify valid option list
+get_gc_opts([{async, _ReqId} = AsyncTuple | Options], _OldAsync) ->
+ get_gc_opts(Options, AsyncTuple);
+get_gc_opts([], Async) ->
+ Async.
%% garbage_collect_message_area/0
-spec erlang:garbage_collect_message_area() -> boolean().
@@ -961,12 +1075,6 @@ list_to_atom(_String) ->
list_to_binary(_IoList) ->
erlang:nif_error(undefined).
-%% list_to_bitstr/1
--spec erlang:list_to_bitstr(P1) -> bitstring() when
- P1 :: bitstring_list().
-list_to_bitstr(_P1) ->
- erlang:nif_error(undefined).
-
%% list_to_bitstring/1
-spec list_to_bitstring(BitstringList) -> bitstring() when
BitstringList :: bitstring_list().
@@ -1027,6 +1135,12 @@ localtime() ->
make_ref() ->
erlang:nif_error(undefined).
+%% Shadowed by erl_bif_types: erlang:map_size/1
+-spec map_size(Map) -> non_neg_integer() when
+ Map :: map().
+map_size(_Map) ->
+ erlang:nif_error(undefined).
+
%% match_spec_test/3
-spec erlang:match_spec_test(P1, P2, P3) -> TestResult when
P1 :: [term()] | tuple(),
@@ -1617,6 +1731,12 @@ is_number(_Term) ->
is_pid(_Term) ->
erlang:nif_error(undefined).
+%% Shadowed by erl_bif_types: erlang:is_map/1
+-spec is_map(Term) -> boolean() when
+ Term :: term().
+is_map(_Term) ->
+ erlang:nif_error(undefined).
+
%% Shadowed by erl_bif_types: erlang:is_port/1
-spec is_port(Term) -> boolean() when
Term :: term().
@@ -1715,15 +1835,15 @@ nodes(_Arg) ->
erlang:nif_error(undefined).
-spec open_port(PortName, PortSettings) -> port() when
- PortName :: {spawn, Command :: string()} |
- {spawn_driver, Command :: [byte()]} |
+ PortName :: {spawn, Command :: string() | binary()} |
+ {spawn_driver, Command :: string() | binary()} |
{spawn_executable, FileName :: file:name() } |
{fd, In :: non_neg_integer(), Out :: non_neg_integer()},
PortSettings :: [Opt],
Opt :: {packet, N :: 1 | 2 | 4}
| stream
| {line, L :: non_neg_integer()}
- | {cd, Dir :: string()}
+ | {cd, Dir :: string() | binary()}
| {env, Env :: [{Name :: string(), Val :: string() | false}]}
| {args, [string() | binary()]}
| {arg0, string() | binary()}
@@ -1968,6 +2088,10 @@ subtract(_,_) ->
(cpu_topology, CpuTopology) -> OldCpuTopology when
CpuTopology :: cpu_topology(),
OldCpuTopology :: cpu_topology();
+ (dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline) ->
+ OldDirtyCPUSchedulersOnline when
+ DirtyCPUSchedulersOnline :: pos_integer(),
+ OldDirtyCPUSchedulersOnline :: pos_integer();
(fullsweep_after, Number) -> OldNumber when
Number :: non_neg_integer(),
OldNumber :: non_neg_integer();
@@ -2098,6 +2222,9 @@ tuple_to_list(_Tuple) ->
CpuTopology :: cpu_topology();
(creation) -> integer();
(debug_compiled) -> boolean();
+ (dirty_cpu_schedulers) -> non_neg_integer();
+ (dirty_cpu_schedulers_online) -> non_neg_integer();
+ (dirty_io_schedulers) -> non_neg_integer();
(dist) -> binary();
(dist_buf_busy_limit) -> non_neg_integer();
(dist_ctrl) -> {Node :: node(),
@@ -2106,6 +2233,7 @@ tuple_to_list(_Tuple) ->
(dynamic_trace) -> none | dtrace | systemtap;
(dynamic_trace_probes) -> boolean();
(elib_malloc) -> false;
+ (eager_check_io) -> boolean();
(ets_limit) -> pos_integer();
(fullsweep_after) -> {fullsweep_after, non_neg_integer()};
(garbage_collection) -> [{atom(), integer()}];
@@ -2124,6 +2252,7 @@ tuple_to_list(_Tuple) ->
(modified_timing_level) -> integer() | undefined;
(multi_scheduling) -> disabled | blocked | enabled;
(multi_scheduling_blockers) -> [PID :: pid()];
+ (nif_version) -> string();
(otp_release) -> string();
(port_count) -> non_neg_integer();
(port_limit) -> pos_integer();
@@ -2146,6 +2275,7 @@ tuple_to_list(_Tuple) ->
(system_architecture) -> string();
(threads) -> boolean();
(thread_pool_size) -> non_neg_integer();
+ (tolerant_timeofday) -> enabled | disabled;
(trace_control_word) -> non_neg_integer();
(update_cpu_info) -> changed | unchanged;
(version) -> string();
diff --git a/erts/preloaded/src/erts.app.src b/erts/preloaded/src/erts.app.src
index fd3e8cb692..345a6ae3be 100644
--- a/erts/preloaded/src/erts.app.src
+++ b/erts/preloaded/src/erts.app.src
@@ -35,7 +35,7 @@
{registered, []},
{applications, []},
{env, []},
- {mod, {erts, []}}
+ {runtime_dependencies, ["stdlib-2.0", "kernel-3.0", "sasl-2.4"]}
]}.
%% vim: ft=erlang
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 8a8cd52d64..2c5bd82cf0 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -29,10 +29,15 @@
-module(erts_internal).
-export([await_port_send_result/3]).
-
+-export([cmp_term/2]).
+-export([map_to_tuple_keys/1]).
-export([port_command/3, port_connect/2, port_close/1,
port_control/3, port_call/3, port_info/1, port_info/2]).
+-export([request_system_task/3]).
+
+-export([check_process_code/2]).
+
%%
%% Await result of send to port
%%
@@ -139,3 +144,37 @@ port_info(_Result) ->
port_info(_Result, _Item) ->
erlang:nif_error(undefined).
+
+-spec request_system_task(Pid, Prio, Request) -> 'ok' when
+ Prio :: 'max' | 'high' | 'normal' | 'low',
+ Request :: {'garbage_collect', term()}
+ | {'check_process_code', term(), module(), boolean()},
+ Pid :: pid().
+
+request_system_task(_Pid, _Prio, _Request) ->
+ erlang:nif_error(undefined).
+
+-spec check_process_code(Module, OptionList) -> boolean() when
+ Module :: module(),
+ Option :: {allow_gc, boolean()},
+ OptionList :: [Option].
+check_process_code(_Module, _OptionList) ->
+ erlang:nif_error(undefined).
+
+%% term compare where integer() < float() = true
+
+-spec cmp_term(A,B) -> Result when
+ A :: term(),
+ B :: term(),
+ Result :: -1 | 0 | 1.
+
+cmp_term(_A,_B) ->
+ erlang:nif_error(undefined).
+
+%% return the internal key tuple for map keys
+-spec map_to_tuple_keys(M) -> Keys when
+ M :: map(),
+ Keys :: tuple().
+
+map_to_tuple_keys(_M) ->
+ erlang:nif_error(undefined).
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl
index 61d8df2428..e95e11b3e6 100644
--- a/erts/preloaded/src/init.erl
+++ b/erts/preloaded/src/init.erl
@@ -465,7 +465,10 @@ make_permanent(Boot,Config,Flags0,State) ->
set_flag(_Flag,false,Flags) ->
{ok,Flags};
set_flag(Flag,Value,Flags) when is_list(Value) ->
- case catch list_to_binary(Value) of
+ %% The flag here can be -boot or -config, which means the value is
+ %% a file name! Thus the file name encoding is used when coverting.
+ Encoding = file:native_name_encoding(),
+ case catch unicode:characters_to_binary(Value,Encoding,Encoding) of
{'EXIT',_} ->
{error,badarg};
AValue ->
@@ -1038,14 +1041,14 @@ start_em([]) -> ok.
start_it([]) ->
ok;
start_it({eval,Bin}) ->
- Str = binary_to_list(Bin),
+ Str = b2s(Bin),
{ok,Ts,_} = erl_scan:string(Str),
Ts1 = case reverse(Ts) of
[{dot,_}|_] -> Ts;
TsR -> reverse([{dot,1} | TsR])
end,
{ok,Expr} = erl_parse:parse_exprs(Ts1),
- erl_eval:exprs(Expr, erl_eval:new_bindings()),
+ {value, _Value, _Bs} = erl_eval:exprs(Expr, erl_eval:new_bindings()),
ok;
start_it([_|_]=MFA) ->
Ref = make_ref(),
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index 489e8ca4ea..34679404a2 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -27,7 +27,7 @@
%% Generic file contents operations
-export([open/2, close/1, datasync/1, sync/1, advise/4, position/2, truncate/1,
write/2, pwrite/2, pwrite/3, read/2, read_line/1, pread/2, pread/3,
- copy/3, sendfile/10, allocate/3]).
+ copy/3, sendfile/8, allocate/3]).
%% Specialized file operations
-export([open/1, open/3]).
@@ -123,9 +123,11 @@
-define(EFILE_MODE_APPEND, 4).
-define(EFILE_COMPRESSED, 8).
-define(EFILE_MODE_EXCL, 16).
+%% Note: bit 5 (32) is used internally for VxWorks
+-define(EFILE_MODE_SYNC, 64).
%% Use this mask to get just the mode bits to be passed to the driver.
--define(EFILE_MODE_MASK, 31).
+-define(EFILE_MODE_MASK, 127).
%% Seek modes for the driver's seek function.
-define(EFILE_SEEK_SET, 0).
@@ -147,6 +149,9 @@
-define(POSIX_FADV_DONTNEED, 4).
-define(POSIX_FADV_NOREUSE, 5).
+%% Sendfile flags
+-define(EFILE_SENDFILE_USE_THREADS, 1).
+
%%% BIFs
@@ -580,13 +585,14 @@ write_file(_, _) ->
% {error, enotsup};
sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}},
Dest, Offset, Bytes, _ChunkSize, Headers, Trailers,
- _Nodiskio, _MNowait, _Sync) ->
+ Flags) ->
case erlang:port_get_data(Dest) of
Data when Data == inet_tcp; Data == inet6_tcp ->
ok = inet:lock_socket(Dest,true),
{ok, DestFD} = prim_inet:getfd(Dest),
+ IntFlags = translate_sendfile_flags(Flags),
try drv_command(Port, [<<?FILE_SENDFILE, DestFD:32,
- 0:8,
+ IntFlags:8,
Offset:64/unsigned,
Bytes:64/unsigned,
(iolist_size(Headers)):32/unsigned,
@@ -599,6 +605,13 @@ sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}},
{error,badarg}
end.
+translate_sendfile_flags([{use_threads,true}|T]) ->
+ ?EFILE_SENDFILE_USE_THREADS bor translate_sendfile_flags(T);
+translate_sendfile_flags([_|T]) ->
+ translate_sendfile_flags(T);
+translate_sendfile_flags([]) ->
+ 0.
+
%%%-----------------------------------------------------------------
%%% Functions operating on files without handle to the file. ?DRV.
@@ -1197,6 +1210,8 @@ open_mode([append|Rest], Mode, Portopts, Setopts) ->
Portopts, Setopts);
open_mode([exclusive|Rest], Mode, Portopts, Setopts) ->
open_mode(Rest, Mode bor ?EFILE_MODE_EXCL, Portopts, Setopts);
+open_mode([sync|Rest], Mode, Portopts, Setopts) ->
+ open_mode(Rest, Mode bor ?EFILE_MODE_SYNC, Portopts, Setopts);
open_mode([delayed_write|Rest], Mode, Portopts, Setopts) ->
open_mode([{delayed_write, 64*1024, 2000}|Rest], Mode,
Portopts, Setopts);
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index a9df75327c..79ff013c77 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -25,7 +25,7 @@
%% Primitive inet_drv interface
--export([open/3, open/4, fdopen/4, close/1]).
+-export([open/3, open/4, fdopen/4, fdopen/5, close/1]).
-export([bind/3, listen/1, listen/2, peeloff/2]).
-export([connect/3, connect/4, async_connect/4]).
-export([accept/1, accept/2, async_accept/2]).
@@ -70,7 +70,12 @@ open(Protocol, Family, Type, Opts) ->
open(Protocol, Family, Type, Opts, ?INET_REQ_OPEN, []).
fdopen(Protocol, Family, Type, Fd) when is_integer(Fd) ->
- open(Protocol, Family, Type, [], ?INET_REQ_FDOPEN, ?int32(Fd)).
+ fdopen(Protocol, Family, Type, Fd, true).
+
+fdopen(Protocol, Family, Type, Fd, Bound)
+ when is_integer(Fd), Bound == true orelse Bound == false ->
+ open(Protocol, Family, Type, [], ?INET_REQ_FDOPEN,
+ [?int32(Fd), enc_value_2(bool, Bound)]).
open(Protocol, Family, Type, Opts, Req, Data) ->
Drv = protocol2drv(Protocol),
@@ -1273,7 +1278,8 @@ type_opt_1(buffer) -> int;
type_opt_1(active) ->
{enum,[{false, ?INET_PASSIVE},
{true, ?INET_ACTIVE},
- {once, ?INET_ONCE}]};
+ {once, ?INET_ONCE},
+ {multi, ?INET_MULTI}]};
type_opt_1(packet) ->
{enum,[{0, ?TCP_PB_RAW},
{1, ?TCP_PB_1},
@@ -1752,11 +1758,14 @@ encode_opt_val(Opts) ->
Reason -> {error,Reason}
end.
+%% {active, once} and {active, N} are specially optimized because they will
+%% be used for every packet or every N packets, not only once when
+%% initializing the socket. Measurements show that this optimization is
+%% worthwhile.
enc_opt_val([{active,once}|Opts], Acc) ->
- %% Specially optimized because {active,once} will be used for
- %% every packet, not only once when initializing the socket.
- %% Measurements show that this optimization is worthwhile.
enc_opt_val(Opts, [<<?INET_LOPT_ACTIVE:8,?INET_ONCE:32>>|Acc]);
+enc_opt_val([{active,N}|Opts], Acc) when is_integer(N), N < 32768, N >= -32768 ->
+ enc_opt_val(Opts, [<<?INET_LOPT_ACTIVE:8,?INET_MULTI:32,N:16>>|Acc]);
enc_opt_val([{raw,P,O,B}|Opts], Acc) ->
enc_opt_val(Opts, Acc, raw, {P,O,B});
enc_opt_val([{Opt,Val}|Opts], Acc) ->
@@ -1846,6 +1855,14 @@ dec_opt_val([]) -> [].
dec_opt_val(Buf, raw, Type) ->
{{P,O,B},T} = dec_value(Type, Buf),
[{raw,P,O,B}|dec_opt_val(T)];
+dec_opt_val(Buf, active, Type) ->
+ case dec_value(Type, Buf) of
+ {multi,[M0,M1|T]} ->
+ <<N:16>> = list_to_binary([M0,M1]),
+ [{active,N}|dec_opt_val(T)];
+ {Val,T} ->
+ [{active,Val}|dec_opt_val(T)]
+ end;
dec_opt_val(Buf, Opt, Type) ->
{Val,T} = dec_value(Type, Buf),
[{Opt,Val}|dec_opt_val(T)].
diff --git a/erts/preloaded/src/prim_zip.erl b/erts/preloaded/src/prim_zip.erl
index d29f17ae56..1d5ab52a24 100644
--- a/erts/preloaded/src/prim_zip.erl
+++ b/erts/preloaded/src/prim_zip.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -89,7 +89,7 @@ do_open(FilterFun, FilterAcc, F) ->
{ok, PrimZip2, FilterAcc2}
catch
Class:Reason ->
- close(PrimZip),
+ _ = close(PrimZip),
erlang:error(erlang:raise(Class, Reason, erlang:get_stacktrace()))
end.
diff --git a/erts/preloaded/src/zlib.erl b/erts/preloaded/src/zlib.erl
index 54391bd945..df7b2e6198 100644
--- a/erts/preloaded/src/zlib.erl
+++ b/erts/preloaded/src/zlib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,6 +47,7 @@
%% compresssion strategy
-define(Z_FILTERED, 1).
-define(Z_HUFFMAN_ONLY, 2).
+-define(Z_RLE, 3).
-define(Z_DEFAULT_STRATEGY, 0).
%% deflate compression method
@@ -125,7 +126,7 @@
-type zmethod() :: 'deflated'.
-type zwindowbits() :: -15..-9 | 9..47.
-type zmemlevel() :: 1..9.
--type zstrategy() :: 'default' | 'filtered' | 'huffman_only'.
+-type zstrategy() :: 'default' | 'filtered' | 'huffman_only' | 'rle'.
%%------------------------------------------------------------------------
@@ -208,7 +209,7 @@ deflate(Z, Data) ->
deflate(Z, Data, Flush) ->
try port_command(Z, Data) of
true ->
- call(Z, ?DEFLATE, <<(arg_flush(Flush)):32>>),
+ _ = call(Z, ?DEFLATE, <<(arg_flush(Flush)):32>>),
collect(Z)
catch
error:_Err ->
@@ -254,7 +255,7 @@ inflateReset(Z) ->
inflate(Z, Data) ->
try port_command(Z, Data) of
true ->
- call(Z, ?INFLATE, <<?Z_NO_FLUSH:32>>),
+ _ = call(Z, ?INFLATE, <<?Z_NO_FLUSH:32>>),
collect(Z)
catch
error:_Err ->
@@ -486,6 +487,7 @@ arg_level(_) -> erlang:error(badarg).
arg_strategy(filtered) -> ?Z_FILTERED;
arg_strategy(huffman_only) -> ?Z_HUFFMAN_ONLY;
+arg_strategy(rle) -> ?Z_RLE;
arg_strategy(default) -> ?Z_DEFAULT_STRATEGY;
arg_strategy(_) -> erlang:error(badarg).
diff --git a/erts/start_scripts/Makefile b/erts/start_scripts/Makefile
index 32e65a227f..14d5d46195 100644
--- a/erts/start_scripts/Makefile
+++ b/erts/start_scripts/Makefile
@@ -52,7 +52,7 @@ endif
##############################################################################
# Get version numbers from the VSN files
-# VSN & SYSTEM_VSN
+# VSN
include ../vsn.mk
include $(LIBPATH)/kernel/vsn.mk
include $(LIBPATH)/stdlib/vsn.mk
diff --git a/erts/start_scripts/no_dot_erlang.rel.src b/erts/start_scripts/no_dot_erlang.rel.src
index 03b64ebf1a..6208572c00 100644
--- a/erts/start_scripts/no_dot_erlang.rel.src
+++ b/erts/start_scripts/no_dot_erlang.rel.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,6 +16,6 @@
%%
%% %CopyrightEnd%
%%
-{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+{release, {"Erlang/OTP","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
[{kernel,"%KERNEL_VSN%"},
{stdlib,"%STDLIB_VSN%"}]}.
diff --git a/erts/start_scripts/start_all_example.rel.src b/erts/start_scripts/start_all_example.rel.src
index 581eb2eb0b..2a1cabe7bb 100644
--- a/erts/start_scripts/start_all_example.rel.src
+++ b/erts/start_scripts/start_all_example.rel.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,7 +16,7 @@
%%
%% %CopyrightEnd%
%%
-{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+{release, {"Erlang/OTP","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
[{kernel,"%KERNEL_VSN%"},
{stdlib,"%STDLIB_VSN%"},
{sasl, "%SASL_VSN%"},
diff --git a/erts/start_scripts/start_clean.rel.src b/erts/start_scripts/start_clean.rel.src
index d2df422c51..e229721e36 100644
--- a/erts/start_scripts/start_clean.rel.src
+++ b/erts/start_scripts/start_clean.rel.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,6 +16,6 @@
%%
%% %CopyrightEnd%
%%
-{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+{release, {"Erlang/OTP","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
[{kernel,"%KERNEL_VSN%"},
{stdlib,"%STDLIB_VSN%"}]}.
diff --git a/erts/start_scripts/start_sasl.rel.src b/erts/start_scripts/start_sasl.rel.src
index e521e8df91..e68a34af76 100644
--- a/erts/start_scripts/start_sasl.rel.src
+++ b/erts/start_scripts/start_sasl.rel.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,7 +16,7 @@
%%
%% %CopyrightEnd%
%%
-{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+{release, {"Erlang/OTP","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
[{kernel,"%KERNEL_VSN%"},
{stdlib,"%STDLIB_VSN%"},
{sasl, "%SASL_VSN%"}]}.
diff --git a/erts/test/Makefile b/erts/test/Makefile
index 74a5bb1ccc..6fbc19fcae 100644
--- a/erts/test/Makefile
+++ b/erts/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -36,7 +36,8 @@ MODULES= \
erl_print_SUITE \
run_erl_SUITE \
erlexec_SUITE \
- z_SUITE
+ z_SUITE \
+ upgrade_SUITE
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/erts/test/erl_print_SUITE_data/Makefile.src b/erts/test/erl_print_SUITE_data/Makefile.src
index 3d58669c18..fdffed3b2d 100644
--- a/erts/test/erl_print_SUITE_data/Makefile.src
+++ b/erts/test/erl_print_SUITE_data/Makefile.src
@@ -17,7 +17,7 @@
# %CopyrightEnd%
#
-include @erts_lib_include_internal_generated@@[email protected]
+include @erts_lib_make_ethread@
CC = @CC@
CFLAGST = @ERTS_CFLAGS@
diff --git a/erts/test/erlc_SUITE.erl b/erts/test/erlc_SUITE.erl
index ed7a43c7e7..5002836954 100644
--- a/erts/test/erlc_SUITE.erl
+++ b/erts/test/erlc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -334,7 +334,7 @@ make_dep_options(Config) ->
run(Config, Cmd0, Name, Options, Expect) ->
Cmd = Cmd0 ++ " " ++ Options ++ " " ++ Name,
- io:format("~s", [Cmd]),
+ io:format("~ts", [Cmd]),
Result = run_command(Config, Cmd),
verify_result(Result, Expect).
@@ -356,7 +356,7 @@ split([], Current, Lines) ->
split([], [], [lists:reverse(Current)|Lines]).
match_messages([Msg|Rest1], [Regexp|Rest2]) ->
- case re:run(Msg, Regexp, [{capture,none}]) of
+ case re:run(Msg, Regexp, [{capture,none}, unicode]) of
match ->
ok;
nomatch ->
@@ -398,7 +398,7 @@ run_command(Config, Cmd) ->
TmpDir = filename:join(?config(priv_dir, Config), "tmp"),
file:make_dir(TmpDir),
{RunFile, Run, Script} = run_command(TmpDir, os:type(), Cmd),
- ok = file:write_file(filename:join(TmpDir, RunFile), Script),
+ ok = file:write_file(filename:join(TmpDir, RunFile), unicode:characters_to_binary(Script)),
os:cmd(Run).
run_command(Dir, {win32, _}, Cmd) ->
diff --git a/erts/test/erlexec_SUITE.erl b/erts/test/erlexec_SUITE.erl
index 0dfe6c2e5f..f5ea8f160a 100644
--- a/erts/test/erlexec_SUITE.erl
+++ b/erts/test/erlexec_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -433,10 +433,10 @@ verify_not_args(Xs, Ys) ->
Xs).
emu_args(CmdLineArgs) ->
- io:format("CmdLineArgs = ~s~n", [CmdLineArgs]),
+ io:format("CmdLineArgs = ~ts~n", [CmdLineArgs]),
{ok,[[Erl]]} = init:get_argument(progname),
EmuCL = os:cmd(Erl ++ " -emu_args_exit " ++ CmdLineArgs),
- io:format("EmuCL = ~s", [EmuCL]),
+ io:format("EmuCL = ~ts", [EmuCL]),
split_emu_clt(string:tokens(EmuCL, [$ ,$\t,$\n,$\r])).
split_emu_clt(EmuCLT) ->
diff --git a/erts/test/ethread_SUITE_data/Makefile.src b/erts/test/ethread_SUITE_data/Makefile.src
index bad133c467..ad2556f327 100644
--- a/erts/test/ethread_SUITE_data/Makefile.src
+++ b/erts/test/ethread_SUITE_data/Makefile.src
@@ -17,8 +17,8 @@
# %CopyrightEnd%
#
-include @erts_lib_include_internal_generated@@[email protected]
-include @erts_lib_include_internal_generated@@DS@erts_internal.mk
+include @erts_lib_make_ethread@
+include @erts_lib_make_internal@
CC = @CC@
CFLAGS = @ERTS_CFLAGS@
diff --git a/erts/test/ethread_SUITE_data/ethread_tests.c b/erts/test/ethread_SUITE_data/ethread_tests.c
index ed96ecdbd2..1d8083ef1f 100644
--- a/erts/test/ethread_SUITE_data/ethread_tests.c
+++ b/erts/test/ethread_SUITE_data/ethread_tests.c
@@ -976,7 +976,7 @@ tsd_test(void)
ethr_tid tid[TT_THREADS];
int values[TT_THREADS];
- res = ethr_tsd_key_create(&tt_key);
+ res = ethr_tsd_key_create(&tt_key,"tsd_test");
ASSERT(res == 0);
for (i = 1; i < TT_THREADS; i++) {
diff --git a/erts/test/nt_SUITE.erl b/erts/test/nt_SUITE.erl
index e440b9e5d9..b255195a00 100644
--- a/erts/test/nt_SUITE.erl
+++ b/erts/test/nt_SUITE.erl
@@ -74,7 +74,7 @@ end_per_testcase(_Func, Config) ->
ok.
erlsrv() ->
- os:find_executable(erlsrv).
+ "\"" ++ os:find_executable(erlsrv) ++ "\"".
recv_prog_output(Port) ->
@@ -542,7 +542,7 @@ get_current_procs(Config) ->
?line erl_parse:parse_term(Tok).
nt_info(Config) when is_list(Config) ->
- ?line filename:join(?config(data_dir, Config), "nt_info").
+ ?line "\"" ++ filename:join(?config(data_dir, Config), "nt_info") ++ "\"".
logdir(Config) ->
diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl
index 2317b4f6a4..2969383d66 100644
--- a/erts/test/otp_SUITE.erl
+++ b/erts/test/otp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,8 @@
init_per_suite/1,end_per_suite/1]).
-export([undefined_functions/1,deprecated_not_in_obsolete/1,
obsolete_but_not_deprecated/1,call_to_deprecated/1,
- call_to_size_1/1,strong_components/1]).
+ call_to_size_1/1,strong_components/1,
+ erl_file_encoding/1,xml_file_encoding/1,runtime_dependencies/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -34,7 +35,9 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[undefined_functions, deprecated_not_in_obsolete,
obsolete_but_not_deprecated, call_to_deprecated,
- call_to_size_1, strong_components].
+ call_to_size_1, strong_components,
+ erl_file_encoding, xml_file_encoding,
+ runtime_dependencies].
groups() ->
[].
@@ -91,7 +94,8 @@ undefined_functions(Config) when is_list(Config) ->
Undef4 = eunit_filter(Undef3),
Undef5 = dialyzer_filter(Undef4),
Undef6 = wx_filter(Undef5),
- Undef = gs_filter(Undef6),
+ Undef7 = gs_filter(Undef6),
+ Undef = diameter_filter(Undef7),
case Undef of
[] -> ok;
@@ -214,6 +218,19 @@ gs_filter(Undef) ->
_ -> Undef
end.
+diameter_filter(Undef) ->
+ %% Filter away function calls that are catched.
+ filter(fun({{diameter_lib,_,_},{erlang,convert_time_unit,3}}) ->
+ false;
+ ({{diameter_lib,_,_},{erlang,monotonic_time,0}}) ->
+ false;
+ ({{diameter_lib,_,_},{erlang,unique_integer,0}}) ->
+ false;
+ ({{diameter_lib,_,_},{erlang,time_offset,0}}) ->
+ false;
+ (_) -> true
+ end, Undef).
+
deprecated_not_in_obsolete(Config) when is_list(Config) ->
?line Server = ?config(xref_server, Config),
?line {ok,DeprecatedFunctions} = xref:q(Server, "DF"),
@@ -320,6 +337,189 @@ strong_components(Config) when is_list(Config) ->
io:format("\n\nStrong components:\n\n~p\n", [Cs]),
ok.
+erl_file_encoding(_Config) ->
+ Root = code:root_dir(),
+ Wc = filename:join([Root,"**","*.erl"]),
+ ErlFiles = ordsets:subtract(ordsets:from_list(filelib:wildcard(Wc)),
+ release_files(Root, "*.erl")),
+ {ok, MP} = re:compile(".*lib/(ic)|(orber)|(cos).*", [unicode]),
+ Fs = [F || F <- ErlFiles,
+ filter_use_latin1_coding(F, MP),
+ case epp:read_encoding(F) of
+ none -> false;
+ _ -> true
+ end],
+ case Fs of
+ [] ->
+ ok;
+ [_|_] ->
+ io:put_chars("Files with \"coding:\":\n"),
+ [io:put_chars(F) || F <- Fs],
+ ?t:fail()
+ end.
+
+filter_use_latin1_coding(F, MP) ->
+ case re:run(F, MP) of
+ nomatch ->
+ true;
+ {match, _} ->
+ false
+ end.
+
+xml_file_encoding(_Config) ->
+ XmlFiles = xml_files(),
+ Fs = [F || F <- XmlFiles, is_bad_encoding(F)],
+ case Fs of
+ [] ->
+ ok;
+ [_|_] ->
+ io:put_chars("Encoding should be \"utf-8\" or \"UTF-8\":\n"),
+ [io:put_chars(F) || F <- Fs],
+ ?t:fail()
+ end.
+
+xml_files() ->
+ Root = code:root_dir(),
+ AllWc = filename:join([Root,"**","*.xml"]),
+ AllXmlFiles = ordsets:from_list(filelib:wildcard(AllWc)),
+ TestsWc = filename:join([Root,"lib","*","test","**","*.xml"]),
+ TestXmlFiles = ordsets:from_list(filelib:wildcard(TestsWc)),
+ XmerlWc = filename:join([Root,"lib","xmerl","**","*.xml"]),
+ XmerlXmlFiles = ordsets:from_list(filelib:wildcard(XmerlWc)),
+ Ignore = ordsets:union([TestXmlFiles,XmerlXmlFiles,
+ release_files(Root, "*.xml")]),
+ ordsets:subtract(AllXmlFiles, Ignore).
+
+release_files(Root, Ext) ->
+ Wc = filename:join([Root,"release","**",Ext]),
+ filelib:wildcard(Wc).
+
+is_bad_encoding(File) ->
+ {ok,Bin} = file:read_file(File),
+ case Bin of
+ <<"<?xml version=\"1.0\" encoding=\"utf-8\"",_/binary>> ->
+ false;
+ <<"<?xml version=\"1.0\" encoding=\"UTF-8\"",_/binary>> ->
+ false;
+ _ ->
+ true
+ end.
+
+runtime_dependencies(Config) ->
+ %% Ignore applications intentionally not declaring dependencies
+ %% found by xref.
+ IgnoreApps = [diameter],
+
+
+ %% Verify that (at least) OTP application runtime dependencies found
+ %% by xref are listed in the runtime_dependencies field of the .app file
+ %% of each application.
+ Server = ?config(xref_server, Config),
+ {ok, AE} = xref:q(Server, "AE"),
+ SAE = lists:keysort(1, AE),
+ put(ignored_failures, []),
+ {AppDep, AppDeps} = lists:foldl(fun ({App, App}, Acc) ->
+ Acc;
+ ({App, Dep}, {undefined, []}) ->
+ {{App, [Dep]}, []};
+ ({App, Dep}, {{App, Deps}, AppDeps}) ->
+ {{App, [Dep|Deps]}, AppDeps};
+ ({App, Dep}, {AppDep, AppDeps}) ->
+ {{App, [Dep]}, [AppDep | AppDeps]}
+ end,
+ {undefined, []},
+ SAE),
+ [] = lists:filter(fun ({missing_runtime_dependency,
+ AppFile,
+ common_test}) ->
+ %% The test_server app is contaminated by
+ %% common_test when run in a source tree. It
+ %% should however *not* be contaminated
+ %% when run in an installation.
+ case {filename:basename(AppFile),
+ is_run_in_src_tree()} of
+ {"test_server.app", true} ->
+ false;
+ _ ->
+ true
+ end;
+ (_) ->
+ true
+ end,
+ check_apps_deps([AppDep|AppDeps], IgnoreApps)),
+ case IgnoreApps of
+ [] ->
+ ok;
+ _ ->
+ Comment = lists:flatten(io_lib:format("Ignored applications: ~p "
+ "Ignored failures: ~p",
+ [IgnoreApps,
+ get(ignored_failures)])),
+ {comment, Comment}
+ end.
+
+is_run_in_src_tree() ->
+ %% At least currently run_erl is not present in <code-root>/bin
+ %% in the source tree, but present in <code-root>/bin of an
+ %% ordinary installation.
+ case file:read_file_info(filename:join([code:root_dir(),
+ "bin",
+ "run_erl"])) of
+ {ok, _} -> false;
+ {error, _} -> true
+ end.
+
+have_rdep(_App, [], _Dep) ->
+ false;
+have_rdep(App, [RDep | RDeps], Dep) ->
+ [AppStr, _VsnStr] = string:tokens(RDep, "-"),
+ case Dep == list_to_atom(AppStr) of
+ true ->
+ io:format("~p -> ~s~n", [App, RDep]),
+ true;
+ false ->
+ have_rdep(App, RDeps, Dep)
+ end.
+
+check_app_deps(_App, _AppFile, _AFDeps, [], _IgnoreApps) ->
+ [];
+check_app_deps(App, AppFile, AFDeps, [XRDep | XRDeps], IgnoreApps) ->
+ ResOtherDeps = check_app_deps(App, AppFile, AFDeps, XRDeps, IgnoreApps),
+ case have_rdep(App, AFDeps, XRDep) of
+ true ->
+ ResOtherDeps;
+ false ->
+ Failure = {missing_runtime_dependency, AppFile, XRDep},
+ case lists:member(App, IgnoreApps) of
+ true ->
+ put(ignored_failures, [Failure | get(ignored_failures)]),
+ ResOtherDeps;
+ false ->
+ [Failure | ResOtherDeps]
+ end
+ end.
+
+check_apps_deps([], _IgnoreApps) ->
+ [];
+check_apps_deps([{App, Deps}|AppDeps], IgnoreApps) ->
+ ResOtherApps = check_apps_deps(AppDeps, IgnoreApps),
+ AppFile = code:where_is_file(atom_to_list(App) ++ ".app"),
+ {ok,[{application, App, Info}]} = file:consult(AppFile),
+ case lists:keyfind(runtime_dependencies, 1, Info) of
+ {runtime_dependencies, RDeps} ->
+ check_app_deps(App, AppFile, RDeps, Deps, IgnoreApps)
+ ++ ResOtherApps;
+ false ->
+ Failure = {missing_runtime_dependencies_key, AppFile},
+ case lists:member(App, IgnoreApps) of
+ true ->
+ put(ignored_failures, [Failure | get(ignored_failures)]),
+ ResOtherApps;
+ false ->
+ [Failure | ResOtherApps]
+ end
+ end.
+
%%%
%%% Common help functions.
%%%
diff --git a/erts/test/upgrade_SUITE.erl b/erts/test/upgrade_SUITE.erl
new file mode 100644
index 0000000000..217056971e
--- /dev/null
+++ b/erts/test/upgrade_SUITE.erl
@@ -0,0 +1,448 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(upgrade_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("kernel/include/file.hrl").
+
+-define(upgr_sname,otp_upgrade).
+
+%% Applications that are excluded from this test because they can not
+%% just be started in a new node with out specific configuration.
+-define(start_exclude,
+ [cosEvent,cosEventDomain,cosFileTransfer,cosNotification,
+ cosProperty,cosTime,cosTransactions,erts,ic,netconf,orber,
+ safe]).
+
+%% Applications that are excluded from this test because their appup
+%% file don't support the upgrade.
+%% In specific:
+%% - hipe does not support any upgrade at all
+%% - dialyzer requires hipe (in the .app file)
+%% - typer requires hipe (in the .app file)
+%% - erl_interface, jinterface support no upgrade
+-define(appup_exclude,
+ [dialyzer,hipe,typer,erl_interface,jinterface]).
+
+init_per_suite(Config) ->
+ %% Check that a real release is running, not e.g. cerl
+ ok = application:ensure_started(sasl),
+ case release_handler:which_releases() of
+ [{_,_,[],_}] ->
+ %% Fake release, no applications
+ {skip, "Need a real release running to create other releases"};
+ _ ->
+ rm_rf(filename:join([?config(data_dir,Config),priv_dir])),
+ Config
+ end.
+
+init_per_testcase(Case,Config) ->
+ PrivDir = filename:join([?config(data_dir,Config),priv_dir,Case]),
+ CreateDir = filename:join([PrivDir,create]),
+ InstallDir = filename:join([PrivDir,install]),
+ ok = filelib:ensure_dir(filename:join(CreateDir,"*")),
+ ok = filelib:ensure_dir(filename:join(InstallDir,"*")),
+ Config1 = lists:keyreplace(priv_dir,1,Config,{priv_dir,PrivDir}),
+ [{create_dir,CreateDir},{install_dir,InstallDir}|Config1].
+
+end_per_testcase(_Case,Config) ->
+ Nodes = nodes(),
+ [test_server:stop_node(Node) || Node <- Nodes],
+ case ?config(tc_status,Config) of
+ ok ->
+ %% Note that priv_dir here is per test case!
+ rm_rf(?config(priv_dir,Config));
+ _fail ->
+ %% Test case data can be found under DataDir/priv_dir/Case
+ ok
+ end,
+ ok.
+
+all() ->
+ [minor,major].
+
+%% If this is major release X, then this test performs an upgrade from
+%% major release X-1 to the current release.
+major(Config) ->
+ Current = erlang:system_info(otp_release),
+ PreviousMajor = previous_major(Current),
+ upgrade_test(PreviousMajor,Current,Config).
+
+%% If this is a patched version of major release X, then this test
+%% performs an upgrade from major release X to the current release.
+minor(Config) ->
+ CurrentMajor = erlang:system_info(otp_release),
+ Current = CurrentMajor++"_patched",
+ upgrade_test(CurrentMajor,Current,Config).
+
+%%%-----------------------------------------------------------------
+upgrade_test(FromVsn,ToVsn,Config) ->
+ OldRel =
+ case test_server:is_release_available(FromVsn) of
+ true ->
+ {release,FromVsn};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(FromVsn)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
+ end,
+ case OldRel of
+ false ->
+ %% Note that priv_dir here is per test case!
+ rm_rf(?config(priv_dir,Config)),
+ {skip, "no previous release available"};
+ _ ->
+ upgrade_test1(FromVsn,ToVsn,[{old_rel,OldRel}|Config])
+ end.
+
+upgrade_test1(FromVsn,ToVsn,Config) ->
+ CreateDir = ?config(create_dir,Config),
+ InstallDir = ?config(install_dir,Config),
+ FromRelName = "otp-"++FromVsn,
+ ToRelName = "otp-"++ToVsn,
+
+ {FromRel,FromApps} = target_system(FromRelName, FromVsn,
+ CreateDir, InstallDir,Config),
+ {ToRel,ToApps} = upgrade_system(FromRel, ToRelName, ToVsn,
+ CreateDir, InstallDir),
+ do_upgrade(FromVsn, FromApps, ToRel, ToApps, InstallDir).
+
+%%%-----------------------------------------------------------------
+%%% This is similar to sasl/examples/src/target_system.erl, but with
+%%% the following adjustments:
+%%% - add a log directory
+%%% - use an own 'start' script
+%%% - chmod 'start' and 'start_erl'
+target_system(RelName0,RelVsn,CreateDir,InstallDir,Config) ->
+ {ok,Node} = test_server:start_node(list_to_atom(RelName0),peer,
+ [{erl,[?config(old_rel,Config)]}]),
+
+ {RelName,Apps,ErtsVsn} = create_relfile(Node,CreateDir,RelName0,RelVsn),
+
+ %% Create .script and .boot
+ ok = rpc:call(Node,systools,make_script,[RelName]),
+
+ %% Create base tar file - i.e. erts and all apps
+ ok = rpc:call(Node,systools,make_tar,
+ [RelName,[{erts,rpc:call(Node,code,root_dir,[])}]]),
+
+ %% Unpack the tar to complete the installation
+ erl_tar:extract(RelName ++ ".tar.gz", [{cwd, InstallDir}, compressed]),
+
+ %% Add bin and log dirs
+ BinDir = filename:join([InstallDir, "bin"]),
+ file:make_dir(BinDir),
+ file:make_dir(filename:join(InstallDir,"log")),
+
+ %% Delete start scripts - they will be added later
+ ErtsBinDir = filename:join([InstallDir, "erts-" ++ ErtsVsn, "bin"]),
+ file:delete(filename:join([ErtsBinDir, "erl"])),
+ file:delete(filename:join([ErtsBinDir, "start"])),
+ file:delete(filename:join([ErtsBinDir, "start_erl"])),
+
+ %% Copy .boot to bin/start.boot
+ copy_file(RelName++".boot",filename:join([BinDir, "start.boot"])),
+
+ %% Copy scripts from erts-xxx/bin to bin
+ copy_file(filename:join([ErtsBinDir, "epmd"]),
+ filename:join([BinDir, "epmd"]), [preserve]),
+ copy_file(filename:join([ErtsBinDir, "run_erl"]),
+ filename:join([BinDir, "run_erl"]), [preserve]),
+ copy_file(filename:join([ErtsBinDir, "to_erl"]),
+ filename:join([BinDir, "to_erl"]), [preserve]),
+
+ %% create start_erl.data and sys.config
+ StartErlData = filename:join([InstallDir, "releases", "start_erl.data"]),
+ write_file(StartErlData, io_lib:fwrite("~s ~s~n", [ErtsVsn, RelVsn])),
+ SysConfig = filename:join([InstallDir, "releases", RelVsn, "sys.config"]),
+ write_file(SysConfig, "[]."),
+
+ %% Insert 'start' script from data_dir - modified to add sname and heart
+ copy_file(filename:join(?config(data_dir,Config),"start.src"),
+ filename:join(ErtsBinDir,"start.src")),
+ ok = file:change_mode(filename:join(ErtsBinDir,"start.src"),8#0755),
+
+ %% Make start_erl executable
+ %% (this has been fixed in OTP 17 - is is now installed with
+ %% $INSTALL_SCRIPT instead of $INSTALL_DATA and should therefore
+ %% be executable from the start)
+ ok = file:change_mode(filename:join(ErtsBinDir,"start_erl.src"),8#0755),
+
+ %% Substitute variables in erl.src, start.src and start_erl.src
+ %% (.src found in erts-xxx/bin - result stored in bin)
+ subst_src_scripts(["erl", "start", "start_erl"], ErtsBinDir, BinDir,
+ [{"FINAL_ROOTDIR", InstallDir}, {"EMU", "beam"}],
+ [preserve]),
+
+ %% Create RELEASES
+ RelFile = filename:join([InstallDir, "releases",
+ filename:basename(RelName) ++ ".rel"]),
+ release_handler:create_RELEASES(InstallDir, RelFile),
+
+ true = test_server:stop_node(Node),
+
+ {RelName,Apps}.
+
+%%%-----------------------------------------------------------------
+%%% Create a release containing the current (the test node) OTP
+%%% release, including relup to allow upgrade from an earlier OTP
+%%% release.
+upgrade_system(FromRel, ToRelName0, ToVsn,
+ CreateDir, InstallDir) ->
+
+ {RelName,Apps,_} = create_relfile(node(),CreateDir,ToRelName0,ToVsn),
+ FromPath = filename:join([InstallDir,lib,"*",ebin]),
+
+ ok = systools:make_script(RelName),
+ ok = systools:make_relup(RelName,[FromRel],[FromRel],
+ [{path,[FromPath]},
+ {outdir,CreateDir}]),
+ SysConfig = filename:join([CreateDir, "sys.config"]),
+ write_file(SysConfig, "[]."),
+
+ ok = systools:make_tar(RelName,[{erts,code:root_dir()}]),
+
+ {RelName,Apps}.
+
+%%%-----------------------------------------------------------------
+%%% Start a new node running the release from target_system/5
+%%% above. Then upgrade to the system from upgrade_system/5.
+do_upgrade(FromVsn,FromApps,ToRel,ToApps,InstallDir) ->
+ Start = filename:join([InstallDir,bin,start]),
+ {ok,Node} = start_node(Start,permanent,FromVsn,FromApps),
+
+ [{"OTP upgrade test",FromVsn,_,permanent}] =
+ rpc:call(Node,release_handler,which_releases,[]),
+ {ok,ToVsn} = rpc:call(Node,release_handler,unpack_release,[ToRel]),
+ [{"OTP upgrade test",ToVsn,_,unpacked},
+ {"OTP upgrade test",FromVsn,_,permanent}] =
+ rpc:call(Node,release_handler,which_releases,[]),
+ case rpc:call(Node,release_handler,install_release,[ToVsn]) of
+ {ok,FromVsn,_} ->
+ ok;
+ {continue_after_restart,FromVsn,_} ->
+ wait_node_up(current,ToVsn,ToApps)
+ end,
+ [{"OTP upgrade test",ToVsn,_,current},
+ {"OTP upgrade test",FromVsn,_,permanent}] =
+ rpc:call(Node,release_handler,which_releases,[]),
+ ok = rpc:call(Node,release_handler,make_permanent,[ToVsn]),
+ [{"OTP upgrade test",ToVsn,_,permanent},
+ {"OTP upgrade test",FromVsn,_,old}] =
+ rpc:call(Node,release_handler,which_releases,[]),
+
+ erlang:monitor_node(Node,true),
+ _ = rpc:call(Node,init,stop,[]),
+ receive {nodedown,Node} -> ok end,
+
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% Library functions
+previous_major("17") ->
+ "r16b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+create_relfile(Node,CreateDir,RelName0,RelVsn) ->
+ LibDir = rpc:call(Node,code,lib_dir,[]),
+ SplitLibDir = filename:split(LibDir),
+ Paths = rpc:call(Node,code,get_path,[]),
+ Exclude = ?start_exclude ++ ?appup_exclude,
+ Apps = lists:flatmap(
+ fun(Path) ->
+ case lists:prefix(LibDir,Path) of
+ true ->
+ case filename:split(Path) -- SplitLibDir of
+ [AppVsn,"ebin"] ->
+ case string:tokens(AppVsn,"-") of
+ [AppStr,Vsn] ->
+ App = list_to_atom(AppStr),
+ case lists:member(App,Exclude) of
+ true ->
+ [];
+ false ->
+ [{App,Vsn,restart_type(App)}]
+ end;
+ _ ->
+ []
+ end;
+ _ ->
+ []
+ end;
+ false ->
+ []
+ end
+ end,
+ Paths),
+
+ ErtsVsn = rpc:call(Node, erlang, system_info, [version]),
+
+ %% Create the .rel file
+ RelContent = {release, {"OTP upgrade test", RelVsn}, {erts, ErtsVsn}, Apps},
+ RelName = filename:join(CreateDir,RelName0),
+ RelFile = RelName++".rel",
+ {ok,Fd} = file:open(RelFile,[write,{encoding,utf8}]),
+ io:format(Fd,"~tp.~n",[RelContent]),
+ ok = file:close(Fd),
+ {RelName,Apps,ErtsVsn}.
+
+restart_type(App) when App==kernel; App==stdlib; App==sasl ->
+ permanent;
+restart_type(_) ->
+ temporary.
+
+copy_file(Src, Dest) ->
+ copy_file(Src, Dest, []).
+
+copy_file(Src, Dest, Opts) ->
+ {ok,_} = file:copy(Src, Dest),
+ case lists:member(preserve, Opts) of
+ true ->
+ {ok, FileInfo} = file:read_file_info(Src),
+ file:write_file_info(Dest, FileInfo);
+ false ->
+ ok
+ end.
+
+
+write_file(FName, Conts) ->
+ Enc = file:native_name_encoding(),
+ {ok, Fd} = file:open(FName, [write]),
+ file:write(Fd, unicode:characters_to_binary(Conts,Enc,Enc)),
+ file:close(Fd).
+
+
+subst_src_scripts(Scripts, SrcDir, DestDir, Vars, Opts) ->
+ lists:foreach(fun(Script) ->
+ subst_src_script(Script, SrcDir, DestDir,
+ Vars, Opts)
+ end, Scripts).
+
+subst_src_script(Script, SrcDir, DestDir, Vars, Opts) ->
+ subst_file(filename:join([SrcDir, Script ++ ".src"]),
+ filename:join([DestDir, Script]),
+ Vars, Opts).
+
+subst_file(Src, Dest, Vars, Opts) ->
+ {ok, Bin} = file:read_file(Src),
+ Conts = binary_to_list(Bin),
+ NConts = subst(Conts, Vars),
+ write_file(Dest, NConts),
+ case lists:member(preserve, Opts) of
+ true ->
+ {ok, FileInfo} = file:read_file_info(Src),
+ file:write_file_info(Dest, FileInfo);
+ false ->
+ ok
+ end.
+
+%% subst(Str, Vars)
+%% Vars = [{Var, Val}]
+%% Var = Val = string()
+%% Substitute all occurrences of %Var% for Val in Str, using the list
+%% of variables in Vars.
+%%
+subst(Str, Vars) ->
+ subst(Str, Vars, []).
+
+subst([$%, C| Rest], Vars, Result) when $A =< C, C =< $Z ->
+ subst_var([C| Rest], Vars, Result, []);
+subst([$%, C| Rest], Vars, Result) when $a =< C, C =< $z ->
+ subst_var([C| Rest], Vars, Result, []);
+subst([$%, C| Rest], Vars, Result) when C == $_ ->
+ subst_var([C| Rest], Vars, Result, []);
+subst([C| Rest], Vars, Result) ->
+ subst(Rest, Vars, [C| Result]);
+subst([], _Vars, Result) ->
+ lists:reverse(Result).
+
+subst_var([$%| Rest], Vars, Result, VarAcc) ->
+ Key = lists:reverse(VarAcc),
+ case lists:keysearch(Key, 1, Vars) of
+ {value, {Key, Value}} ->
+ subst(Rest, Vars, lists:reverse(Value, Result));
+ false ->
+ subst(Rest, Vars, [$%| VarAcc ++ [$%| Result]])
+ end;
+subst_var([C| Rest], Vars, Result, VarAcc) ->
+ subst_var(Rest, Vars, Result, [C| VarAcc]);
+subst_var([], Vars, Result, VarAcc) ->
+ subst([], Vars, [VarAcc ++ [$%| Result]]).
+
+
+%%%-----------------------------------------------------------------
+%%%
+start_node(Start,ExpStatus,ExpVsn,ExpApps) ->
+ case open_port({spawn_executable, Start}, []) of
+ Port when is_port(Port) ->
+ unlink(Port),
+ erlang:port_close(Port),
+ wait_node_up(ExpStatus,ExpVsn,ExpApps);
+ Error ->
+ Error
+ end.
+
+wait_node_up(ExpStatus,ExpVsn,ExpApps0) ->
+ ExpApps = [{A,V} || {A,V,_T} <- ExpApps0],
+ Node = node_name(?upgr_sname),
+ wait_node_up(Node,ExpStatus,ExpVsn,lists:keysort(1,ExpApps),60).
+
+wait_node_up(Node,ExpStatus,ExpVsn,ExpApps,0) ->
+ ct:fail({app_check_failed,ExpVsn,ExpApps,
+ rpc:call(Node,release_handler,which_releases,[ExpStatus]),
+ rpc:call(Node,application,which_applications,[])});
+wait_node_up(Node,ExpStatus,ExpVsn,ExpApps,N) ->
+ timer:sleep(2000),
+ case {rpc:call(Node,release_handler,which_releases,[ExpStatus]),
+ rpc:call(Node, application, which_applications, [])} of
+ {[{_,ExpVsn,_,_}],Apps} when is_list(Apps) ->
+ case [{A,V} || {A,_,V} <- lists:keysort(1,Apps)] of
+ ExpApps -> {ok,Node};
+ _ -> wait_node_up(Node,ExpStatus,ExpVsn,ExpApps,N-1)
+ end;
+ _ ->
+ wait_node_up(Node,ExpStatus,ExpVsn,ExpApps,N-1)
+ end.
+
+node_name(Sname) ->
+ {ok,Host} = inet:gethostname(),
+ list_to_atom(atom_to_list(Sname) ++ "@" ++ Host).
+
+rm_rf(Dir) ->
+ case file:read_file_info(Dir) of
+ {ok, #file_info{type = directory}} ->
+ {ok, Content} = file:list_dir_all(Dir),
+ [rm_rf(filename:join(Dir,C)) || C <- Content],
+ ok=file:del_dir(Dir),
+ ok;
+ {ok, #file_info{}} ->
+ ok=file:delete(Dir);
+ _ ->
+ ok
+ end.
diff --git a/erts/test/upgrade_SUITE_data/start.src b/erts/test/upgrade_SUITE_data/start.src
new file mode 100644
index 0000000000..70d1a322c9
--- /dev/null
+++ b/erts/test/upgrade_SUITE_data/start.src
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+# This program invokes the erlang emulator by calling run_erl.
+# It should only be used at an embedded target system.
+# It should be modified to give the correct flags to erl (via start_erl),
+# e.g -mode embedded -sname XXX
+#
+# Usage: start [Data]
+#
+ROOTDIR=%FINAL_ROOTDIR%
+
+if [ -z "$RELDIR" ]
+then
+ RELDIR=$ROOTDIR/releases
+fi
+
+START_ERL_DATA=${1:-$RELDIR/start_erl.data}
+
+$ROOTDIR/bin/run_erl -daemon /tmp/ $ROOTDIR/log "exec $ROOTDIR/bin/start_erl $ROOTDIR $RELDIR $START_ERL_DATA -sname otp_upgrade -heart"
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index da72b18f05..056561d3db 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.erl
@@ -116,7 +116,7 @@ find_cerl(false) ->
end;
find_cerl(DBTop) ->
case catch filelib:wildcard(filename:join([DBTop,
- "otp_src_R*",
+ "otp_src_*",
"bin",
"cerl"])) of
[Cerl | _ ] ->
@@ -242,7 +242,7 @@ dump_core(#core_search_conf{ cerl = Cerl }, Core) ->
_ ->
os:cmd(Cerl ++ " -dump " ++ Core)
end,
- ct:log("~s~n~n~s",[Core,Dump]).
+ ct:log("~ts~n~n~ts",[Core,Dump]).
format_core(Conf, {ignore, Core}) ->
diff --git a/erts/vsn.mk b/erts/vsn.mk
index 0355901877..9e5aa999e6 100644
--- a/erts/vsn.mk
+++ b/erts/vsn.mk
@@ -17,8 +17,7 @@
# %CopyrightEnd%
#
-VSN = 5.10.4
-SYSTEM_VSN = R16B03-1
+VSN = 6.4.1
# Port number 4365 in 4.2
# Port number 4366 in 4.3
diff --git a/lib/Makefile b/lib/Makefile
index 47a6d5f9aa..95170d8a56 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,16 +25,17 @@ ERTS_APPLICATIONS = stdlib sasl kernel compiler
# Then these have to be build
ERLANG_APPLICATIONS = tools test_server common_test runtime_tools \
- inets xmerl edoc erl_docgen
+ inets parsetools
# These are only build if -a is given to otp_build or make is used directly
-ALL_ERLANG_APPLICATIONS = snmp otp_mibs appmon erl_interface asn1 jinterface \
+ALL_ERLANG_APPLICATIONS = xmerl edoc erl_docgen snmp otp_mibs erl_interface \
+ asn1 jinterface \
wx debugger reltool gs \
- ic mnesia crypto orber os_mon parsetools syntax_tools \
- pman public_key ssl toolbar tv observer odbc diameter \
+ ic mnesia crypto orber os_mon syntax_tools \
+ public_key ssl observer odbc diameter \
cosTransactions cosEvent cosTime cosNotification \
cosProperty cosFileTransfer cosEventDomain et megaco webtool \
- eunit ssh typer percept eldap dialyzer hipe
+ eunit ssh typer percept eldap dialyzer hipe ose
ifdef BUILD_ALL
ERLANG_APPLICATIONS += $(ALL_ERLANG_APPLICATIONS)
@@ -47,19 +48,27 @@ ifdef BUILD_ALL
$(subst /,,$(wildcard */)))
endif
-ifdef BOOTSTRAP
- SUB_DIRECTORIES = \
- kernel stdlib compiler
+ifdef BUILD_STATIC_LIBS
+ SUB_DIRECTORIES = asn1 crypto
else
- ifdef SECONDARY_BOOTSTRAP
- SUB_DIRECTORIES = hipe parsetools asn1/src
+ ifdef BOOTSTRAP
+ SUB_DIRECTORIES = \
+ kernel stdlib compiler
else
- ifdef TERTIARY_BOOTSTRAP
- SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools wx
- else # Not bootstrap build
- SUB_DIRECTORIES = $(ERTS_APPLICATIONS) \
- $(ERLANG_APPLICATIONS) \
- $(EXTRA_APPLICATIONS)
+ ifdef SECONDARY_BOOTSTRAP
+ SUB_DIRECTORIES = hipe parsetools asn1/src
+ else
+ ifdef TERTIARY_BOOTSTRAP
+ SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools wx
+ else
+ ifdef DOC_BOOTSTRAP
+ SUB_DIRECTORIES = xmerl edoc erl_docgen
+ else # Not bootstrap build
+ SUB_DIRECTORIES = $(ERTS_APPLICATIONS) \
+ $(ERLANG_APPLICATIONS) \
+ $(EXTRA_APPLICATIONS)
+ endif
+ endif
endif
endif
endif
diff --git a/lib/appmon/AUTHORS b/lib/appmon/AUTHORS
deleted file mode 100644
index b727dae36d..0000000000
--- a/lib/appmon/AUTHORS
+++ /dev/null
@@ -1,5 +0,0 @@
-Original Authors and Contributors:
-
-Peter Lundell
-Stefan Anbratt
-Gunilla Arendt
diff --git a/lib/appmon/BUGS_AND_FIXES b/lib/appmon/BUGS_AND_FIXES
deleted file mode 100644
index fdac7f34c5..0000000000
--- a/lib/appmon/BUGS_AND_FIXES
+++ /dev/null
@@ -1,5 +0,0 @@
-
-***) reverse the list of children for a process, to match the starting
-order.
-
-***)
diff --git a/lib/appmon/doc/src/Makefile b/lib/appmon/doc/src/Makefile
deleted file mode 100644
index 7c93abe6d8..0000000000
--- a/lib/appmon/doc/src/Makefile
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../../vsn.mk
-VSN=$(APPMON_VSN)
-APPLICATION=appmon
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = appmon.xml
-
-XML_PART_FILES = \
- part.xml \
- part_notes.xml
-
-XML_CHAPTER_FILES = \
- appmon_chapter.xml \
- notes.xml
-
-BOOK_FILES = book.xml
-
-XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
- $(XML_PART_FILES) $(XML_CHAPTER_FILES)
-
-GIF_FILES = \
- app_win.gif \
- listbox_win.gif \
- main_win.gif \
- pinfo_win.gif \
- note.gif
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
- rm -f $(JD_HTML) $(JD_PACK)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
diff --git a/lib/appmon/doc/src/app_win.gif b/lib/appmon/doc/src/app_win.gif
deleted file mode 100644
index 06f21d04a9..0000000000
--- a/lib/appmon/doc/src/app_win.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/doc/src/app_win.ps b/lib/appmon/doc/src/app_win.ps
deleted file mode 100644
index 73d4cad278..0000000000
--- a/lib/appmon/doc/src/app_win.ps
+++ /dev/null
@@ -1,680 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./app_win.tmp.eps)
-%%CreationDate: (Tue Jun 12 17:59:02 2001)
-%%BoundingBox: 0 46 300 384
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 46 300 384
-userdict begin
-%%BeginData:
-DisplayImage
-0 46
-300.000000 338.000000
-12
-382 431
-1
-0
-0
-16
-ffffff
-000000
-e8e3dc
-708090
-b03060
-d9d9d9
-b3b3b3
-7f7f7f
-a3a3a3
-828282
-000000
-000000
-000000
-000000
-000000
-000000
-04ff04ff04ff04de05000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500041a050c04d1050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000408
-050c04050500040a0500040a050104030505040105050401050104040501040305030403
-050104020501044a05010400050104000501040005010411050104050504040205010404
-050104050501040005010409050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000407050004020500040205000402
-050004050500040a05000409050304020501040205010400050104020501040005010404
-050104020501040105010402050204010501044a05010403050104000501041105010403
-050104040500040805010408050104080500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004080500040205000402
-050004020500040505000403050204030500040905000401050004020501040205010400
-050104020501040005020402050204010501040305010401050204010501040105010404
-050004000502040005020401050104020501040105030401050104000501040105010400
-050104060503040105010400050104060501040005010400050104000501040005010400
-050104020503040105010400050504020500040605000400050104010501040005010400
-050104000503040005010409050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000407050004020500040205000402
-050004050500040205040402050004080501040105010401050104020501040005010402
-050104000502040205020401050104030501040105010400050004000501040105010404
-050104010501040105010400050104020501040005010401050104000502040005010400
-050204000501040405010401050104000502040005010404050104000502040005010400
-050104000502040005010400050104010501040005040400050104020500040205010400
-050004000500040005010400050104000502040005060400050104080500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004080504040205000402050004050500040105060401050004080501040105010401
-050504010505040105030400050304010501040305010401050104000500040005010408
-050104010501040105010401050104000501040505010400050104010501040005010401
-050104040501040105010400050104010501040405010401050104000501040005010400
-050104010501040005010401050104000502040205010402050004010500040105000401
-050004000501040005010401050104000502040105010400050104090500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004070500040605000402050004050500040105060401050004080505040105010405
-050104050501040005000400050004000501040105010403050104010501040105020408
-050104010501040105010401050104000501040205040400050104010501040005010401
-050104040501040105010400050104010501040405010401050104000501040005010400
-050104010501040005050400050104030501040205000400050004020500040105000400
-050104000501040105010400050104020501040005010408050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000408
-050004060500040205000405050004010506040105000407050104030501040005010405
-050104050501040005020400050104010501040305010401050104010502040805010401
-050104010501040205020402050104010501040005010401050104000501040105010404
-050104010501040005010401050104040501040105010400050104000501040005010401
-050104000501040405010403050104020500040005000401050104000500040105010400
-050104010501040005010402050104000501040905000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040705000406
-050004020500040505000402050404020500040705010403050104000501040505010405
-050104010500040105010402050104010501040205010402050104010501040405010401
-050104010501040205020402050104010501040005020400050104000502040005010404
-050104010501040005010401050104040501040005020400050104000501040005020400
-050104000501040105010400050104030501040005000400050004010501040005010402
-050104000501040005020400050104020501040005010408050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000408
-050804020500040505000403050204030500040705010403050104000501040505010405
-050104010500040105010403050304030501040205010401050104040501040105010401
-050104030501040305020400050304000501040105010400050104060503040105010401
-050104050501040005010400050104000501040005010400050104020503040105010404
-050104020500040805010401050104000501040005010402050104000501040905000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-05000400050004070500040a050004050500040a050004530500040a0501040405010442
-050404200500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004080500040a050004050500040a050004520501040a
-050104040501046905000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-05000400050004000500040005000400050004070500040a05000405050c04510501040b
-050104040501046805000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-0500040005000400050004000500040005000408050c04e5050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-050004000500040005000400050004000500040005000400050004000500040005000400
-0500040005000400050004000500040005000400050004000500040005000400050004ff
-04ff04ff041303ff03ff03fb00ff00ff00fa0900000105ff05790901000105ff05790901
-000105ff05790901000105ff05790901000105ff05790901000105040104050401000503
-010205120102050b01000506010005ff051801000502010005090102050c090100010504
-0100050f01000511010005020100050a010005ff0520010005020100050b0100050c0901
-000105040100050601020505010005030102050a01000502010005010100050001010502
-0104050201020503010205020100050001010503010205ff050301000502010005020102
-050501000502010005000101050509010001050401000508010005050100050201000502
-010005090100050201000501010105010100050301000506010005020100050201000501
-010105010100050101000502010005ff0502010005020100050101000502010005040100
-050201010501010005040901000105040103050501000505010005020100050201000509
-010005020100050101000502010005030100050601000502010005020100050101000502
-01000501010005ff05060104050101000502010005040100050201000502010005040901
-000105040100050801000505010005020104050901000502010005010100050201000503
-010005060100050201000502010005010100050201000502010205ff0503010005020100
-050101040504010005020100050201000504090100010504010005080100050501000502
-0100050d0100050201000501010005020100050301000506010005020100050201000501
-0100050201000505010005ff050201000502010005010100050801000502010005020100
-050409010001050401000508010005050100050201000502010005090100050201000501
-010105010100050301000506010005020100050201000501010005020100050101000502
-010005ff0502010005020100050101000502010005040100050201010501010005040901
-000105040100050801000505010005030102050b01020502010005000101050501010504
-01000503010205020100050201000502010205ff05030100050201000502010205050100
-0502010005000101050509010001052f010005ff053e0100050809010001052f010005ff
-053e0100050809010001052f010005ff053e010005080901000105ff05790901000105ff
-05790901000105ff05790901000109ff097b000009ff097c02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02730800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000020900450209004502090045024700000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000000080000000800
-000008000000080000000800000008000000080000000800000008000209004409000209
-004409000209004409000247080000000842010002090001054109010209000105410901
-020900010541090102470000084201000800020900010541090102090001054109010209
-000105410901024708000000084201000209000105410901020900010541090102090001
-054109010247000008420100080002090001054109010209000105410901020900010541
-090102470800000008120104080b0101081c010002090001051301020514010005140901
-02090001050e0104052d0901020900010512010005020100050401000503010205030102
-051509010247000008150100080c0100081d010008000209000105120100050201000513
-0100051409010209000105100100052f0901020900010512010005010100050c01000505
-010005150901024708000000081401000803010008000101080401000804010208160100
-020900010512010005060102050201000500010105030101050001000514090102090001
-051001000503010005000101050301020503010205030102051209010209000105120100
-050001000504010205050100050501000515090102470000081501000803010108010100
-080101040801010008020100081401000800020900010513010005040100050201000501
-010105010100050101000501010105140901020900010510010005030101050101000501
-010005020100050101000502010005010100050201000511090102090001051201010507
-010005050100050501000515090102470800000008140100080301000802010008030100
-080301000802010008150100020900010514010105020100050201000501010005020100
-050101000502010005140901020900010510010005030100050901000501010005050100
-050201000511090102090001051201000500010005060100050501000505010005150901
-024700000815010008030100080201000803010008030100080201000814010008000209
-000105160100050101040501010005020100050101000502010005140901020900010510
-010005030100050601030501010005050104051109010209000105120100050101000505
-010005050100050501000515090102470800000008140100080301000802010008030100
-080301000802010008150100020900010512010005020100050101000505010005020100
-050101000502010005140901020900010510010005030100050501000502010005010100
-050501000515090102090001051201000501010005050100050501000505010005150901
-024700000815010008030100080201000803010008030100080201000814010008000209
-000105120100050201000501010005020100050101000502010005010100050101010514
-090102090001051001000503010005050100050201000501010005020100050101000502
-010005110901020900010512010005020100050401000505010005050100051509010247
-080000000812010408010100080201000803010008040102081601000209000105130102
-050301020502010005020100050201010500010005140901020900010510010005030100
-050601030502010205030102051209010209000105120100050201000504010005050100
-050501000515090102470000084201000800020900010541090102090001054109010209
-000105410901024708000000084201000209000105410901020900010541090102090001
-054109010247000008420100080002090001054109010209000105410901020900010541
-090102470800000008420100020900010541090102090001054109010209000105410901
-024700000842010008000209000105410901020900010541090102090001054109010247
-080000000842010002090001054109010209000105410901020900010541090102470000
-084201000800020900010541090102090001054109010209000105410901024708000000
-084201000209000105410901020900010541090102090001054109010247000008000100
-080001000800010008000100080001000800010008000100080001000800010008000100
-080001000800010008000100080001000800010008000100080001000800010008000100
-080001000800010008000100080001000800010008000100080001000800010008000100
-080001000800010008000100080001000800010008000100080002090001094302090001
-094302090001094302470800010008000100080001000800010008000100080001000800
-010008000100080001000800010008000100080001000800010008000100080001000800
-010008000100080001000800010008000100080001000800010008000100080001000800
-010008000100080001000800010008000100080001000800010008000100080001000800
-01000800010002090000094402090000094402090000094402ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff022901ff017d05ff05ff05ff05ff05ff05ff
-05ff05ff05ff05ff05ff05ff05ff056d02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02d5014902ff023301000647010002ff023301000647010002ff02330100
-0647010002ff023301000647010002ff02330100060e0103060701010603010306020103
-060601030610010002ff02330100060d0101060101010604010306020101060101010600
-0101060101010604010106010101060f010002ff02330100060d01010601010106060101
-060201010601010106000101060101010604010106010101060f010002ff02330100060a
-010106000101060101010606010106020101060101010600010106010101060401010601
-010106010101060b010002ff023301000608010206010101060101010606010106020101
-0601010106000101060101010604010106010101060201020609010002ff023301000607
-010106030101060101010606010106020101060101010600010106010101060401010601
-0101060401010608010002ff023301000608010206010101060101010606010106020101
-0601010106000101060101010604010106010101060201020609010002ff02330100060a
-010106000101060101010601010106020101060201010601010106000101060101010601
-0101060001010601010106010101060b010002ff02330100060e01030602010106020101
-060301030602010306020101060101030610010002ff023301000647010002ff02330100
-0647010002ff023301000647010002ff023301000647010002ff023301000647010002ff
-023301000647010002ff023301220701012402ff0256070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff0258014902ff023301000647010002ff023301000647010002ff0233
-01000647010002ff023301000647010002ff02330100060e010306070101060301030603
-0101060701030610010002ff02330100060d010106010101060401030602010106010101
-060001030606010106010101060f010002ff02330100060d010106010101060601010602
-010106010101060201010606010106010101060f010002ff02330100060a010106000101
-0601010106060101060201010601010106020101060601010601010106010101060b0100
-02ff02330100060801020601010106010101060601010602010106010101060201010606
-010106010101060201020609010002ff0233010006070101060301010601010106060101
-0602010106010101060201010606010106010101060401010608010002ff023301000608
-010206010101060101010606010106020101060101010602010106060101060101010602
-01020609010002ff02330100060a01010600010106010101060101010602010106020101
-060101010602010106030101060001010601010106010101060b010002ff02330100060e
-01030602010106020101060301030603010106030101060101030610010002ff02330100
-0647010002ff023301000647010002ff023301000647010002ff023301000647010002ff
-023301000647010002ff023301000647010002ff023301220701012402ff0256070102ff
-027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff
-027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff
-027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff
-027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff
-027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff
-027b070102ff027b070102ff027b070102ff0258014902ff023301000647010002ff0233
-01000647010002ff023301000647010002ff023301000647010002ff0233010006470100
-02ff023301000647010002ff023301000600010006000102060001020601010106020101
-060101030601010106000101060101010600010106090103060101010601010106000101
-060001010604010002ff0233010006000101060101010601010106000101060201010600
-010106010101060001020600010106000102060001010607010106010101060001010601
-010106000102060001010603010002ff0233010006000101060101010601010106010101
-060001010605010106000101060101010600010106010101060701020603010106010101
-06000101060101010603010002ff02330100060001010601010106010101060101010600
-010106020104060001010601010106000101060101010609010206010101060101010600
-0101060101010603010002ff023301000600010106010101060101010602010206020101
-0601010106000101060101010600010106010101060a0102060001010601010106000101
-060101010603010002ff0233010006000101060101010601010106020102060201010601
-010106000102060001010600010206000101060701010601010106000101060001020600
-0102060001010603010002ff023301000600010106010101060101010603010106030102
-060001030600010106010101060001010609010306020101060001010600010106000101
-0604010002ff02330100060e0100060a010106040101061901010607010002ff02330100
-060d0101060a010106040101061901010607010002ff02330100060c0101060b01010604
-010106040106060d01010607010002ff023301000647010002ff023301000647010002ff
-023301000647010002ff023301220701012402ff0256070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b0701
-02ff0254074802ff0233074902ff023307010245070102ff023307010245070102ff0233
-07010245070102ff023307010245070102ff023307010245070102ff0233070102450701
-02ff023307010245070102ff023307010245070102ff023307010245070102ff02330701
-0245070102ff023307010245070102ff023307010245070102ff023307010245070102ff
-023307010245070102ff023307010245070102ff023307010245070102ff023307010245
-070102ff021e012d0212013b02ff02000100062b0100021201000639010002ff02000100
-062b0100021201000639010002ff02000100062b0100021201000639010002ff02000100
-062b0100021201000639010002ff02000100062b010002120100063201010604010002ff
-02000100062b010002120100063201010604010002ff0200010006000100060001020600
-010206010101060201010601010306010101060101010600010106000101060401000212
-010006010100060001020600010206010101060201010601010306010101060201010601
-01030601010106000101060101030603010002ff02000100060001010601010106010101
-060001010602010106000101060101010600010106010101060001020600010106030100
-021201000601010106010101060101010600010106020101060001010601010106000101
-0602010106000101060101010600010206000101060101010604010002ff020001000600
-010106010101060101010601010106000101060101020603010106010101060001010601
-010106030100021201000601010106010101060101010601010106000101060101010601
-0101060101010600010106010101060101010600010106010101060101010604010002ff
-020001000600010106010101060101010601010106000101060301020601010106010101
-060001010601010106030100021201000601010106010101060101010601010106000101
-060101050601010106000101060101050600010106010101060101010604010002ff0200
-010006000101060101010601010106020102060501020600010106010101060001010601
-010106030100021201000601010106010101060101010602010206020101060601020602
-01010604010106010101060101010604010002ff02000100060001010601010106010101
-060201020602010106010101060001010600010206000102060001010603010002120100
-060101010601010106010101060201020602010106010101060201020602010106010101
-060001010601010106010101060001000602010002ff0200010006000101060101010601
-010106030101060301030602010106000101060001010600010106040100021201000601
-010106010101060101010603010106030103060401000604010306010101060101010602
-01010603010002ff02000100060e0100061101010607010002120100060f010006280100
-02ff02000100060d0101061101010607010002120100060e01010628010002ff02000100
-060c0101061201010607010002120100060d01010629010002ff02000100062b01000212
-01000639010002ff02000100062b0100021201000639010002ff02000100062b01000212
-01000639010002ff02000114070101160212013b02ff0215070102ff027b070102ff027b
-070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b
-070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b070102ff027b
-070102ff025c074b02ff0230074c02ff023007010248070102ff023007010248070102ff
-023007010248070102ff023007010248070102ff023007010248070102ff023007010248
-070102ff023007010248070102ff023007010248070102ff023007010248070102ff0230
-07010248070102ff023007010248070102ff023007010248070102ff0230070102480701
-02ff023007010248070102ff023007010248070102ff023007010248070102ff02300701
-0248070102ff021001420212012d02f901000640010002120100062b010002f901000640
-010002120100062b010002f901000640010002120100062b010002f90100064001000212
-0100062b010002f901000640010002120100061401020613010002f90100064001000212
-0100061301010615010002f9010006020100060001020600010206010101060201010601
-010306020103060101010600010306020101060101030601010106000101060301000212
-010106000102060001020601010106020101060001030601010306010100060001020600
-01020603010002f901000602010106010101060101010600010106020101060001010601
-010106000101060101010600010606020101060001010601010106000104060301000212
-010206010101060101010600010106020101060101010601010106010101060001010601
-0101060101010602010002f9010006020101060101010601010106010101060001010601
-010206030101060101010600010206020101060001010601010106010101060001020605
-010002120102060101010601010106010101060001010602010106010102060301010601
-0101060101010602010002f9010006020101060101010601010106010101060001010603
-010206010105060001010603010106000101060101050600010106060100021201020601
-010106010101060101010600010106020101060301020601010106010101060101010602
-010002f90100060201010601010106010101060201020605010206000101060401010604
-010206020101060401010606010002120102060101010601010106020102060301010604
-01020600010106010101060101010602010002f901000602010106010101060101010602
-010206020101060101010600010106010101060001010604010206020101060101010600
-010106060100021201020601010106010101060201020603010106010101060101010600
-010106010101060101010602010002f90100060201010601010106010101060301010603
-010306020103060101010605010006040103060101010606010002120102060101010601
-01010603010106030101060201030601010106010101060101010602010002f901000610
-0100062e010002120100060d0100061c010002f90100060f0101062e010002120100060c
-0101061c010002f90100060e0101062f010002120100060b0101061d010002f901000640
-010002120100062b010002f901000640010002120100062b010002f90100064001000212
-0100062b010002f901420212012d02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff02ff
-02ff0236
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 46 300 384
-%%EOF
diff --git a/lib/appmon/doc/src/appmon.xml b/lib/appmon/doc/src/appmon.xml
deleted file mode 100644
index 6e04f8503f..0000000000
--- a/lib/appmon/doc/src/appmon.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE erlref SYSTEM "erlref.dtd">
-
-<erlref>
- <header>
- <copyright>
- <year>1996</year>
- <year>2012</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>appmon</title>
- <prepared></prepared>
- <docno></docno>
- <date></date>
- <rev></rev>
- </header>
- <module>appmon</module>
- <modulesummary>A graphical node and application process tree viewer.</modulesummary>
- <description>
- <warning>
- <p>
- The Appmon application has been superseded by the Observer application.
- Appmon will be removed in R16.
- </p>
- </warning>
- <p>The application monitor Appmon is a graphical utility used to
- supervise applications executing either locally or on remote nodes.
- The process tree of an application can furthermore be monitored.</p>
- </description>
- <funcs>
- <func>
- <name>start()</name>
- <fsummary>Start Appmon.</fsummary>
- <desc>
- <p>Starts Appmon.</p>
- </desc>
- </func>
- <func>
- <name>stop()</name>
- <fsummary>Stop Appmon.</fsummary>
- <desc>
- <p>Stops Appmon.</p>
- </desc>
- </func>
- </funcs>
-
- <section>
- <title>See Also</title>
- <p>Appmon User's Guide</p>
- </section>
-</erlref>
-
diff --git a/lib/appmon/doc/src/appmon_chapter.xml b/lib/appmon/doc/src/appmon_chapter.xml
deleted file mode 100644
index 7ce22caaad..0000000000
--- a/lib/appmon/doc/src/appmon_chapter.xml
+++ /dev/null
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2000</year><year>2012</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Appmon</title>
- <prepared></prepared>
- <docno></docno>
- <date></date>
- <rev></rev>
- <file>appmon_chapter.xml</file>
- </header>
-
- <section>
- <title>Introduction</title>
- <warning>
- <p>
- The Appmon application has been superseded by the Observer application.
- Appmon will be removed in R16.
- </p>
- </warning>
- <p>The application monitor Appmon is a graphical node and application viewer. The tool shows an overview of all applications on all known nodes, and it is possible to view the process tree for an application running on any of the nodes.</p>
- <note>
- <p>If the Appmon code is not available at a node, for example an
- embedded node, this node is ignored by Appmon and is not shown
- in the Appmon window.</p>
- </note>
- </section>
-
- <section>
- <title>Getting Started with Appmon</title>
- <p>Start Appmon by calling <c><![CDATA[appmon:start()]]></c>. It will start the <seealso marker="#main_win">main window</seealso> showing a load meter and the applications running at the current node. By clicking on one of the applications a window showing the process tree of the application will be opened, the <seealso marker="#app_win">application window</seealso>.</p>
- <p>The main window is equipped with a menubar from which it is possible to:</p>
- <list type="bulleted">
- <item>exit Appmon</item>
- <item>perform some operations on the node</item>
- <item>set how information should be displayed</item>
- <item>select which node to show</item>
- <item>open help (this document).</item>
- </list>
- <p>The application window shows the process tree for an application with each process displayed as a box. It is possible to view information about the processes, to send messages to them, and to trace and kill them.</p>
- </section>
-
- <section>
- <title>The Main Window</title>
- <marker id="main_win"></marker>
- <p>The main window shows a load meter and all applications running at the displayed node. Select which node to display in the window by choosing the node name from the Nodes menu. It is also possible to run Appmon in a many-window mode where a new instance of the main window is opened for each node to be displayed.</p>
- <image file="main_win.gif">
- <icaption>The Main Window.</icaption>
- </image>
- <p>The load meter shows load measured as processor time, or as the length of the ready queue.</p>
- <p>Every application running at the node is shown as a button. Clicking the button will open the application window showing the process tree for the application.</p>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Show List Box...</em></tag>
- <item>This will open the <seealso marker="#listbox_win">listbox window</seealso> which lists all nodes and applications. This window can be more easy to use than the normal, graphical user interface when the system consists of a large number of nodes and/or applications.</item>
- <tag><em>Close</em></tag>
- <item>Close the window. If no other instance of the main window exists, Appmon will be stopped.</item>
- <tag><em>Exit</em></tag>
- <item>Stop Appmon.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Actions Menu</title>
- <taglist>
- <tag><em>Reboot</em></tag>
- <item>Call <c><![CDATA[init:reboot()]]></c> at the currently displayed node. This will stop the node. If the <c><![CDATA[-heart]]></c> system flag was given, the heart program will try to reboot the system.</item>
- <tag><em>Restart</em></tag>
- <item>Call <c><![CDATA[init:restart()]]></c> at the currently displayed node. This will restart the node.</item>
- <tag><em>Stop</em></tag>
- <item>Call <c><![CDATA[init:stop()]]></c> at the currently displayed node. This will stop the node.</item>
- <tag><em>Ping</em></tag>
- <item>Call <c><![CDATA[net:ping(Node)]]></c> where <c><![CDATA[Node]]></c> is the currently displayed node. This can be useful when the connection to the node has been lost.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Options Menu</title>
- <taglist>
- <tag><em>One window/Many windows</em></tag>
- <item>Select one of these radio button to run Appmon in one-window or many-window mode. In many-windows mode, a new instance of the main window is opened for each node to be displayed. The default value is one-window mode.</item>
- <tag><em>Load: time/queue</em></tag>
- <item>Select one of these radio buttons to either calculate load as processor time or as the length of the ready queue, which is the number of processes ready to execute. By default, the load is calculated as processor time.</item>
- <tag><em>Load: progressive/linear</em></tag>
- <item>Select one of these radio buttons to show load either according to a progressive or a linear scale. By default, the load is shown according to a progressive scale. </item>
- </taglist>
- </section>
-
- <section>
- <title>The Nodes Menu</title>
- <p>The Nodes menu contains all currently and previously known nodes,
- where the Appmon code is available. Nodes where the Appmon code is
- not available, for example embedded nodes, are ignored by Appmon and
- are not shown.</p>
- <p>Selecting a node from the Nodes menu will cause that node to be displayed in either the same window, or in a new window, depending on if Appmon is run in one-window or many-windows mode. If the connection to the node has been lost, this will be shown in the window.</p>
- </section>
-
- <section>
- <title>The Help Menu</title>
- <taglist>
- <tag><em>Help</em></tag>
- <item>Selecting Help from the Help menu will cause the HTML version of the Appmon User's Guide (this document) to be displayed. Currently this function requires Netscape to be up and running.</item>
- </taglist>
- </section>
- </section>
-
- <section>
- <title>The Application Window</title>
- <marker id="app_win"></marker>
- <p>The application window shows the process tree for an application. The window title contains the application name and the node name. The window also contains a menubar and a toolbar.</p>
- <p>The application window can be opened from the main window by clicking on the button denoting the application, or from the listbox window by selecting the application and clicking on the <em>Load</em> button.
- </p>
- <image file="app_win.gif">
- <icaption>The Application Window.</icaption>
- </image>
- <p>The application can be shown either as a strict supervision tree, or as a process view with all linked processes. In supervision mode, the tree-gathering and -building algorithm assumes conformance to the OTP design principles.</p>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Close</em></tag>
- <item>Close the application window.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Options Menu</title>
- <taglist>
- <tag><em>Refresh</em></tag>
- <item>Refresh the application window.</item>
- <tag><em>Sup. view/ Proc. view</em></tag>
- <item>Select one of these radio buttons to show the application as a strict supervision tree, or as a process view with all linked processes. By default, the process view is used.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Toolbar</title>
- <p>The toolbar consists of four buttons: <em>Info</em>, <em>Send</em>, <em>Trace</em> and <em>Kill</em>. First select one of these buttons and then select to which process the action should apply by clicking on a process in the process tree. By default <em>Info</em> is selected which means that clicking on a process, without selecting <em>Send</em>, <em>Trace</em> or <em>Kill</em> first, will open the <seealso marker="#pinfo_win">process information window</seealso>.</p>
- <taglist>
- <tag><em>Info</em></tag>
- <item>Open the <seealso marker="#pinfo_win">process information window</seealso>, which displays the information about the process given by <c><![CDATA[process_info(Pid)]]></c>.</item>
- <tag><em>Send</em></tag>
- <item>Send a message to a process. A window is opened where the message can be specified. Click <em>Ok</em> to send the message or <em>Cancel</em> to cancel.</item>
- <tag><em>Trace</em></tag>
- <item>Switch on OTP tracing of a process. <c><![CDATA[sys:trace(Pid,true)]]></c> is called. Selecting <em>Trace</em> a second time for the same process will switch the tracing off instead.</item>
- <tag><em>Kill</em></tag>
- <item>Kill a process. <c><![CDATA[exit(Pid,kill)]]></c> is called.</item>
- </taglist>
- </section>
- </section>
-
- <section>
- <title>The Listbox Window</title>
- <marker id="listbox_win"></marker>
- <p>The listbox window lists all nodes and applications. This window can be more easy to use than the normal, graphical user interface when the system consists of a large number of nodes and/or applications.</p>
- <image file="listbox_win.gif">
- <icaption>The Listbox Window.</icaption>
- </image>
- <p>The window contains three buttons:</p>
- <taglist>
- <tag><em>Load</em></tag>
- <item>First selecting an application and then clicking the <em>Load</em> button will open the <seealso marker="#app_win">application window</seealso> for that application.</item>
- <tag><em>Clear</em></tag>
- <item>De-select any selected node or application name.</item>
- <tag><em>Close</em></tag>
- <item>Close the listbox window.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Process Information Window</title>
- <marker id="pinfo_win"></marker>
- <p>The process information window shows information about different processes as given by <c><![CDATA[process_info(Pid)]]></c>.</p>
- <image file="pinfo_win.gif">
- <icaption>The Process Information Window.</icaption>
- </image>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Close</em></tag>
- <item>Close the process information window.</item>
- </taglist>
- </section>
- </section>
-
- <section>
- <title>Using the Web Based version of Appmon</title>
-
- <section>
- <title>Introduction</title>
- <p>The web based version of Appmon is an alternative version of
- Appmon. The main difference between the web based version of
- Appmon and the original version of Appmon is that the web based
- version of Appmon can monitor nodes and applications on nodes where
- Appmon not is installed.</p>
- </section>
-
- <section>
- <title>Start the Web Based version of Appmon</title>
- <p>To start the web based user interface configure and start
- WebTool, see <em>WebTool User's Guide</em>. The web based
- version of Appmon is compatible with the browsers
- Netscape Navigator and Internet Explorer 4.0 and higher.</p>
- <p>When WebTool is started, start the Web based version of Appmon via
- WebTool. If WebTool succeeded to start the web based version of Appmon
- a link named WebAppmon will appear in the topmost frame. Click on the link and
- the main frame of the browser will show two frames.The left frame will
- show a combo box for node selection and a list of all applications on
- the currently selected node. </p>
- <p>In the left frame it is possible to:</p>
- <list type="bulleted">
- <item>Select which node to supervise.</item>
- <item>Select an application to view its process tree.</item>
- <item>Select an application to view its specification.</item>
- </list>
- <p>The right frame shows the selected information, either the application
- specification or the process tree and process information.</p>
- </section>
-
- <section>
- <title>Selecting a Different Node</title>
- <p>In the top of the left frame there is a combo box with all known
- nodes. The name of the node that is monitored is the node whose name
- is visible in the combo box. At startup the node on which the web
- based version of Appmon is running on will be monitored.</p>
- <p>To change node, select another node in the combo box, and
- the list of running applications will change to the applications
- that runs on the selected node.</p>
- </section>
-
- <section>
- <title>Viewing the Process Tree of an Application</title>
- <p>To view the process tree of an application click on the application
- name in the list of applications. The process tree of the selected
- application will then appear in the right frame.</p>
- <p>The processes in the process tree can have three different colors:</p>
- <taglist>
- <tag><em>Blue</em></tag>
- <item>The relation to the process above in the process hierarchy
- is a primary relation. That means that the process above is the
- only process that link to it or the process above is a supervisor. </item>
- <tag><em>Red</em></tag>
- <item>The relation to the process above in the process hierarchy is a secondary
- relation. This means that more than one process has a relation to it
- and the process above in the hierarchy is not a supervisor.</item>
- <tag><em>Black</em></tag>
- <item>The process isn't a regular process instead it's a Port. The name of
- the process will also begin with <em>Port:</em></item>
- </taglist>
- <p>If the process name begins with <em>Runs on another node:</em> The
- monitored application runs on more than one node and this process is
- the first process on a branch that runs on another node. </p>
- </section>
-
- <section>
- <title>Viewing the Application Specification</title>
- <p>After the application name in the list of applications there are a
- link named <em>Spec</em>, Click on this link and the application
- specification will appear in the right frame. The application
- specification is the data in the <em>.app</em> file of the selected
- application. </p>
- </section>
-
- <section>
- <title>Select Process View</title>
- <p>In the top of the page that shows the process tree, there are three
- radio buttons for selecting which processes that shall be included
- in the process tree. The default mode is that all processes
- that one process in the application tree has a relation to is
- included. It's possible to filter which of the processes
- in the process tree that will be included. To reduce the number
- of processes in the process tree select one of the radio buttons
- on the top of the page </p>
- <taglist>
- <tag><em>All processes</em></tag>
- <item>All processes that at least one process in the application
- tree has a link to.</item>
- <tag><em>Supervised processes</em></tag>
- <item>All processes that are supervised by one of the supervisors in
- the application</item>
- <tag><em>Supervisors only</em></tag>
- <item>Only the processes that actually are supervisors in the
- applications supervision tree is included</item>
- </taglist>
- </section>
-
- <section>
- <marker id="proc_info"></marker>
- <title>Process Information</title>
- <p>To see more information about a specific process click on the process
- name and more information will be loaded under the application tree.</p>
- <p>The Process information page shows information about a process as given
- by the <c><![CDATA[process_info(Pid)]]></c>, but formatted in a more human readable form.</p>
- </section>
-
- <section>
- <title>Trace a process</title>
- <p>If the link after the process name in the process tree is <em>start trace</em>
- the process is not traced. If the link is <em>stop trace</em> then the process
- id traced.</p>
- <p>To toggle the trace flag for a process click on the link <em>start trace</em> or
- <em>stop trace</em> after the process name in the process tree.</p>
- </section>
- </section>
-</chapter>
-
diff --git a/lib/appmon/doc/src/book.xml b/lib/appmon/doc/src/book.xml
deleted file mode 100644
index df6d57c077..0000000000
--- a/lib/appmon/doc/src/book.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE book SYSTEM "book.dtd">
-
-<book xmlns:xi="http://www.w3.org/2001/XInclude">
- <header titlestyle="normal">
- <copyright>
- <year>1997</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>appmon</title>
- <prepared></prepared>
- <docno></docno>
- <date></date>
- <rev>2.0</rev>
- </header>
- <insidecover>
- </insidecover>
- <pagetext>Appmon</pagetext>
- <preamble>
- </preamble>
- <parts lift="no">
- <xi:include href="part.xml"/>
- </parts>
- <applications>
- <xi:include href="ref_man.xml"/>
- </applications>
- <releasenotes>
- <xi:include href="notes.xml"/>
- </releasenotes>
- <listofterms></listofterms>
- <index></index>
-</book>
-
diff --git a/lib/appmon/doc/src/listbox_win.gif b/lib/appmon/doc/src/listbox_win.gif
deleted file mode 100644
index 38258b7552..0000000000
--- a/lib/appmon/doc/src/listbox_win.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/doc/src/listbox_win.ps b/lib/appmon/doc/src/listbox_win.ps
deleted file mode 100644
index 0f1e2eeda0..0000000000
--- a/lib/appmon/doc/src/listbox_win.ps
+++ /dev/null
@@ -1,741 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./listbox_win.tmp.eps)
-%%CreationDate: (Tue Jun 12 18:01:07 2001)
-%%BoundingBox: 0 85 200 356
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 85 200 356
-userdict begin
-%%BeginData:
-DisplayImage
-0 85
-200.000000 271.000000
-12
-325 441
-1
-0
-0
-8
-ffffff
-000000
-708090
-b03060
-d9d9d9
-808080
-c3c3c3
-000000
-03ff03ff03ff036704000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003000400031a040c03cc0400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000308040c03050400030a0400030a04010343040103240401031904010300
-0401030f040103010401031e040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003070400030204000302
-04000302040003050400030a040003090403034204010324040103190401031204010321
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003080400030204000302040003020400030504000303
-040203030400030904000301040003010401030004010301040103000401030104000300
-040203000402030204030301040103000401030204010304040103000401030204030302
-040103000401030104030302040303060403030104010300040103020401030004010305
-040303010401030004010301040103000401030104010300040103010403030204030301
-04030300040103010403030104010300040103020403030a040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003070400030204000302040003020400030504000302040403020400030804010301
-040103000402030004010300040203000401030004010301040103010401030004010301
-040103000402030004010301040103040402030004010300040103010401030004010300
-040203000401030104010300040103010401030404010301040103000402030004010300
-040103000402030404010301040103000402030004010300040203000401030004010300
-040103000401030104010300040103010401030104010301040103000401030104010300
-040203000401030004010301040103080400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030804040302
-040003020400030504000301040603010400030804010301040103000401030104010300
-040103010401030004010301040103010401030004010301040103000401030104010308
-04010301040103000401030104010300040103010401030004010301040103000402030b
-040103000401030104010300040103010401030804010300040103010401030004010301
-040103000401030004010300040103080401030104010301040103000401030104010300
-04010301040103000402030c040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003070400030604000302
-040003050400030104060301040003080405030004010301040103000401030104010300
-040103010401030104010300040103010401030004010301040103080401030104010300
-040103010401030004010301040103000405030204020306040403000401030104010300
-040103010401030504040300040103010401030004010301040103000401030004010300
-040103050404030104010301040103000401030104010300040103010401030204020309
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003080400030604000302040003050400030104060301
-040003070401030304030301040103000401030104010300040103010401030104010300
-040103010401030004010301040103080401030104010300040103010401030004010301
-040103000401030704020304040103010401030004010301040103000401030104010304
-040103010401030004010301040103000401030104010300040103000401030004010304
-040103010401030104010301040103000401030104010300040103010401030304020309
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070400030604000302040003050400030204040302
-040003070401030304040300040103000402030004010300040103010401030104010300
-040103010401030004010301040103010401030404010301040103000401030104010300
-040103000402030004010301040103000401030104010304040103010401030004010301
-040103000401030004020304040103010401030004020300040103000402030004010300
-040103000401030004010301040103000401030104010301040103000402030004010301
-040103000401030104010300040103010401030804000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000308
-040803020400030504000303040203030400030704010303040303000401030104010300
-040103010401030104010301040103010403030104010301040103010401030404010301
-040103010403030204010300040103010403030204030306040203000403030104010301
-040103000401030504020300040303000401030104010300040103010401030004010301
-04030302040203000401030104010300040103010403030104010301040103010403030a
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070400030a040003050400030a0400030f04010304
-0401036c040103040401033d040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003080400030a04000305
-0400030a0400030f040103040401036c040103040401033e040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003070400030a04000305040c030f040103040401036c040103040401033d04000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000308040c03e00400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003000400030004000300040003ff03ff03a1
-02ff02ff028904ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff046b0512
-04ff043105110000047e05b0040105010606050006060001047e05af0000040105010605
-0000050006060001047e050104ac00010401050106050000050106050001047e050104ac
-00010401050106040001050106050001047e0501043301000430010004260100041d0001
-04010501060400010400050106040001047e050104040100040401000403010204020100
-0415010004040100040001000405010004060100040b010004030102040b0100040b0102
-0405010004120100041c000104010501060300010401050106040001047e050104040100
-040b010004020100041501000403010004020100040c010004120100040b0100040d0100
-04190100041c000104010501060300010402050106030001047e05010401010104000100
-040201020405010004020100040001010403010204020100040001010402010404010100
-0400010204020102040301010400010004010100040001010403010204050100040a0100
-04050102040501000403010204020100040201000402010204050100041b000104010501
-060200010403050106030001047e05010400010004010101040401000405010004020101
-040101000401010004020100040101010401010004030100040301000400010004000100
-04040100040201000401010104010101040101000404010004050100040a010004040100
-0402010004040100040501000402010004020100040101000402010004040100041b0001
-04010501060200010404050106020001047e050104000100040201000404010004050100
-040201000402010004010100040201000401010004070100040301000400010004000100
-040401000402010004020100040101000408010004050100040a01000408010004040100
-040501000402010004020100040101000402010004040100041b00010401050106010001
-0405050106020001047e0501040001000402010004040100040501000402010004020100
-040101040401010004070100040301000400010204040100040201000402010004010100
-0408010004050100040a0100040501030404010004050100040301000400010004020104
-04040100041b000104010501060100010406050106010001047e05010400010004020100
-040401000405010004020100040201000401010004050100040701000403010004080100
-0402010004020100040101000408010004050100040a0100040401000402010004040100
-0405010004030100040001000402010004080100041b0001040105010600000104070501
-06010001047e050104000100040101010404010004050100040201010401010004010100
-040201000401010004070100040401000401010004040100040201000401010104010100
-0408010004050100040b0100040301000402010004040100040501000404010004030100
-0402010004030100041c000104010501060000010408050106000001047e050104010101
-040001000404010004050100040201000400010104030102040201000408010104030101
-040501000403010104000100040101000408010004050100040b01000404010304040100
-04050100040401000404010204040100041c0001040105010001050b06000001047e0501
-0465010004260100041d0001040105010000050d0001047e050104ac000104010501060e
-0001047e050104ac0001040105010010047e050104ac000104010501000d05000001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104160101040001000402010004020100040201020402
-010004000101040201000400010104750001040105010001040a05010001047e05010416
-010004000100040001000401010004020100040101000402010004010101040101000401
-01010401010004740001040105010001040a05010001047e050104160100040001000400
-010004020100040101000405010004010100040201000401010004020100047400010401
-05010001040a05010001047e050104160100040001000400010004020100040101000402
-01030401010004020100040101000402010004740001040105010001040a05010001047e
-050104160100040001000400010004030100040001000401010004020100040101000402
-0100040101000402010004740001040105010001040a05010001047e0501041601000400
-010004000100040301010402010004020100040101010401010004010101040101000474
-0001040105010001040a05010001047e0501041601000400010004000100040401000403
-01030401010004000101040201000400010104750001040105010001040a05010001047e
-050104200100040901000405010004780001040105010001040a05010001047e0501041d
-010004000100040a01000405010004780001040105010001040a05010001047e0501041e
-0100040b01000405010004780001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e05010416010004220102046e00010401
-05010001040a05010001047e05010416010004240100046e0001040105010001040a0501
-0001047e0501041601000401010004030102040201000400010104020100040001010403
-010204050100046e0001040105010001040a05010001047e050104160100040001000403
-01000402010004010101040101000401010104010100040101000402010004040100046e
-0001040105010001040a05010001047e0501041601010404010004020100040101000405
-010004020100040101000402010004040100046e0001040105010001040a05010001047e
-050104160101040401040401010004050100040201000401010404040100046e00010401
-05010001040a05010001047e050104160100040001000403010004050100040501000402
-01000401010004080100046e0001040105010001040a05010001047e0501041601000401
-01000402010004020100040101000405010004020100040101000402010004040100046e
-0001040105010001040a05010001047e0501041601000402010004020102040201000405
-0100040201000402010204050100046e0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e0501042c0102047c0001040105010001040a05010001047e
-0501042e0100047c0001040105010001040a05010001047e050104170102040301020403
-010204050100047c0001040105010001040a05010001047e050104160100040201000401
-010004020100040101000402010004040100047c0001040105010001040a05010001047e
-050104160100040901000401010004080100047c0001040105010001040a05010001047e
-050104170102040301030402010204050100047c0001040105010001040a05010001047e
-0501041a010004010100040201000405010004040100047c0001040105010001040a0501
-0001047e050104160100040201000401010004020100040101000402010004040100047c
-0001040105010001040a05010001047e050104170102040301030402010204050100047c
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e0501043301000430010004260100041d0001040105010001
-040a05010001047e050104040100040f0100041501000404010004000100040501000406
-0100040b010004030102040b0100040b01020405010004120100041c0001040105010001
-040a05010001047e050104040100040f0100041501000403010004020100040c01000412
-0100040b0100040d010004190100041c0001040105010001040a05010001047e05010401
-010104000100040201020403010104000100040101000400010104030102040201000400
-010104020104040101000400010204020102040301010400010004010100040001010403
-010204050100040a01000405010204050100040301020402010004020100040201020405
-0100041b0001040105010001040a05010001047e05010400010004010101040101000402
-010004010100040101010401010104010100040101000402010004010101040101000403
-010004030100040001000400010004040100040201000401010104010101040101000404
-010004050100040a01000404010004020100040401000405010004020100040201000401
-01000402010004040100041b0001040105010001040a05010001047e0501040001000402
-010004010100040201000401010004020100040101000402010004010100040201000401
-010004070100040301000400010004000100040401000402010004020100040101000408
-010004050100040a01000408010004040100040501000402010004020100040101000402
-010004040100041b0001040105010001040a05010001047e050104000100040201000401
-010004020100040101000402010004010100040201000401010404010100040701000403
-010004000102040401000402010004020100040101000408010004050100040a01000405
-0103040401000405010004030100040001000402010404040100041b0001040105010001
-040a05010001047e05010400010004020100040101000402010004010100040201000401
-010004020100040101000405010004070100040301000408010004020100040201000401
-01000408010004050100040a010004040100040201000404010004050100040301000400
-01000402010004080100041b0001040105010001040a05010001047e0501040001000401
-010104010100040201000401010004010101040101010401010004010100040201000401
-010004070100040401000401010004040100040201000401010104010100040801000405
-0100040b0100040301000402010004040100040501000404010004030100040201000403
-0100041c0001040105010001040a05010001047e05010401010104000100040201020403
-010104000100040101000400010104030102040201000408010104030101040501000403
-010104000100040101000408010004050100040b01000404010304040100040501000404
-01000404010204040100041c0001040105010001040a05010001047e0501041201000451
-010004260100041d0001040105010001040a05010001047e0501040e0100040201000498
-0001040105010001040a05010001047e0501040f010204990001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e05010416
-010004220102046e0001040105010001040a05010001047e05010416010004240100046e
-0001040105010001040a05010001047e0501041601000401010004030102040201000400
-010104020100040001010403010204050100046e0001040105010001040a05010001047e
-050104160100040001000403010004020100040101010401010004010101040101000401
-01000402010004040100046e0001040105010001040a05010001047e0501041601010404
-010004020100040101000405010004020100040101000402010004040100046e00010401
-05010001040a05010001047e050104160101040401040401010004050100040201000401
-010404040100046e0001040105010001040a05010001047e050104160100040001000403
-01000405010004050100040201000401010004080100046e0001040105010001040a0501
-0001047e0501041601000401010004020100040201000401010004050100040201000401
-01000402010004040100046e0001040105010001040a05010001047e0501041601000402
-0100040201020402010004050100040201000402010204050100046e0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001047e050104ac00010401
-05010001040a05010001047e050104ac0001040105010001040a05010001047e050104ac
-0001040105010001040a05010001047e050104ac0001040105010001040a05010001047e
-050104ac0001040105010001040a05010001047e050104ac0001040105010001040a0501
-0001047e050104ac0001040105010001040a05010001047e050104ac0001040105010001
-040a05010001047e050104ac0001040105010001040a05010001040900630410050104ac
-0001040105010001040a050100010409006205000410050104ac0001040105010001040a
-0501000104090001045f05010410050104ac0001040105010001040a0501000104090001
-045f05010410050104ac0001040105010001040a0501000104090001045f050104100501
-04ac0001040105010001040a0501000104090001045f05010410050104ac000104010501
-0001040a0501000104090001045f05010410050104ac0001040105010001040a05010001
-04090001045f05010410050104ac0001040105010001040a0501000104090001045f0501
-0410050104ac0001040105010001040a0501000104090001042101000417010004230501
-0410050104ac0001040105010001040a0501000104090001042101000417010004230501
-0410050104ac0001040105010001040a0501000104090001042101000406010204030102
-0403010104000100042305010410050104ac0001040105010001040a0501000104090001
-042101000405010004020100040101000402010004010100040101010423050104100501
-04ac0001040105010001040a050100010409000104210100040501000402010004050100
-0401010004020100042305010410050104ac0001040105010001040a0501000104090001
-042101000405010004020100040201030401010004020100042305010410050104ac0001
-040105010001040a05010001040900010421010004050100040201000401010004020100
-0401010004020100042305010410050104ac0001040105010001040a0501000104090001
-042101000405010004020100040101000402010004010100040101010423050104100501
-04ac0001040105010001040a050100010409000104210104040201020403010304020101
-04000100042305010410050104ac0001040105010001040a0501000104090001045f0501
-0410050104ac0001040105010001040a0501000104090001045f05010410050104ac0001
-040105010001040a0501000104090001045f05010410050104ac0001040105010001040a
-0501000104090001045f05010410050104ac0001040105010001040a0501000104090001
-045f05010410050104ac0001040105010001040a0501000104090001045f050104100501
-04ac0001040105010001040a0501000104090001045f05010410050104ac000104010501
-0001040a0501000104090001045f05010410050104ac0001040105010001040a05010001
-04090001045f05010410050104ac0001040105010001040a0501000104090001045f0501
-0410050104ac0001040105010001040a050100010409000105610410050104ac00010401
-05010001040a050100010409000005620410050104ac0001040105010001040a05010001
-047e050104ac0001040105010001040a05010001047e050104ac0001040105010001040a
-05010001047e050104ac0001040105010001040a05010001047e050104ac000104010501
-0001040a05010001047e050104ac0001040105010001040a05010001047e050104ac0001
-040105010001040a05010001047e050104ac0001040105010001040a05010001047e0501
-04ac0001040105010001040a05010001047e050104ac0001040105010001040a05010001
-047e050104ac0001040105010001040a05010001040900630410050104ac000104010501
-0001040a050100010409006205000410050104ac0001040105010001040a050100010409
-0001045f05010410050104ac0001040105010001040a0501000104090001045f05010410
-050104ac0001040105010001040a0501000104090001045f05010410050104ac00010401
-05010001040a0501000104090001045f05010410050104ac0001040105010001040a0501
-000104090001045f05010410050104ac0001040105010001040a0501000104090001045f
-05010410050104ac0001040105010001040a0501000104090001045f05010410050104ac
-0001040105010001040a0501000104090001041e010204030102043605010410050104ac
-0001040105010001040a0501000104090001041d01000402010004040100043605010410
-050104ac0001040105010001040a0501000104090001041d010004020100040401000403
-0102040301020402010004000101042105010410050104ac0001040105010001040a0501
-000104090001041d01000408010004020100040201000401010004020100040101010401
-0100042005010410050104ac0001040105010001040a0501000104090001041d01000408
-010004020100040201000405010004010100042405010410050104ac0001040105010001
-040a0501000104090001041d010004080100040201040402010304010100042405010410
-050104ac0001040105010001040a0501000104090001041d010004020100040401000402
-0100040501000402010004010100042405010410050104ac0001040105010001040a0501
-000104090001041d01000402010004040100040201000402010004010100040201000401
-0100042405010410050104ac0001040105010001040a0501000104090001041e01020405
-0100040301020403010304010100042405010410050104ac0001040105010001040a0501
-000104090001045f05010410050104ac0001040105010001040a0501000104090001045f
-05010410050104ac0001040105010001040a0501000104090001045f05010410050104ac
-0001040105010001040a0501000104090001045f05010410050104ac0001040105010001
-040a0501000104090001045f05010410050104ac0001040105010001040a050100010409
-0001045f05010410050104ac0001040105010001040a0501000104090001045f05010410
-050104ac0001040105010001040a0501000104090001045f05010410050104ac00010401
-05010001040a0501000104090001045f05010410050104ac0001040105010001040a0501
-000104090001045f05010410050104ac0001040105010001040a05010001040900010561
-0410050104ac0001040105010001040a050100010409000005620410050104ac00010401
-05010001040a05010001047e050104ac0001040105010001050c0001047e050104ac0001
-040105010000050d0001047e050104ac000104010501060e0001047e050104ac00010401
-05010010047e050104ac0001040105010600000c05000001047e050104ac000104010501
-060000010408050106000001047e050104ac000104010501060100010407050106000001
-047e050104ac000104010501060100010406050106010001047e050104ac000104010501
-060200010405050106010001047e050104ac000104010501060200010404050106020001
-040900630410050104ac0001040105010603000104030501060200010409006205000410
-050104ac00010401050106030001040205010603000104090001045f05010410050104ac
-00010401050106040001040105010603000104090001045f05010410050104ac00010401
-050106040001040005010604000104090001045f05010410050104ac0001040105010605
-000005020604000104090001045f05010410050104ac0001040105010605000005010605
-000104090001045f05010410050100ae04010501060605010605000104090001045f0501
-0410050000af04010501060605000606000104090001045f050104c30501001004090001
-041e0102040301020436050104c30500001104090001041d010004020100040401000436
-0501040e05b804180001041d010004020100040401000403010204030102040301020421
-0501040e05b7000004180001041d01000408010004020100040201000401010004020100
-040101000402010004200501040e0501060d00000600009406000001060c000104180001
-041d010004080100040201000402010004010100040501000402010004200501040e0501
-060b0001050006000093050006000003060a000104180001041d01000408010004020100
-04020100040201020402010404200501040e050106090002050106000001049005010600
-00050608000104180001041d010004020100040401000402010004020100040501000401
-010004240501040e05010607000304000501060000010490050106000001040100030606
-000104180001041d01000402010004040100040201000402010004010100040201000401
-01000402010004200501040e050106050003040205010600000104900501060000010403
-00030604000104180001041e01020405010004030102040301020403010204210501040e
-05010603000304040501060000010490050106000001040500030602000104180001045f
-0501040e0501060100030406050106000001049005010600000104070003060000010418
-0001045f0501040e05050408050106000001049005010600000104080503000104180001
-045f0501040e050106010503040605010600000104900501060000010407050306000001
-04180001045f0501040e0501060305030404050106000001049005010600000104050503
-0602000104180001045f0501040e05010605050304020501060000010490050106000001
-040305030604000104180001045f0501040e050106070503040005010600000104900501
-06000001040105030606000104180001045f0501040e0501060905040600000104900501
-0600000105030608000104180001045f0501040e0501060b050206000001059206000001
-0501060a000104180001045f0501040e0501060d0500060000000593060000000500060c
-000104180001045f0501040e050100b6041800010561040e050000b704180000056204ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04bb
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 85 200 356
-%%EOF
diff --git a/lib/appmon/doc/src/main_win.gif b/lib/appmon/doc/src/main_win.gif
deleted file mode 100644
index 36d742e91e..0000000000
--- a/lib/appmon/doc/src/main_win.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/doc/src/main_win.ps b/lib/appmon/doc/src/main_win.ps
deleted file mode 100644
index abb12d733b..0000000000
--- a/lib/appmon/doc/src/main_win.ps
+++ /dev/null
@@ -1,691 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./main_win.tmp.eps)
-%%CreationDate: (Tue Jun 12 17:57:00 2001)
-%%BoundingBox: 0 26 377 164
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 26 377 164
-userdict begin
-%%BeginData:
-DisplayImage
-0 26
-377.000000 138.000000
-12
-520 191
-1
-0
-0
-16
-ffffff
-000000
-708090
-b03060
-d9d9d9
-808080
-00ff00
-666666
-999999
-ececc5
-000000
-000000
-000000
-000000
-000000
-000000
-03ff03ff03ff03ff03ff0305040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400031b040c03e4040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000307040c03050400030a0400030a040103030405030104050301
-040103040401030304030303040103020401030b0403031e0401032c0401030004010300
-040103000401031104010305040403020401030404010305040103000401030904000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003080400030204000302
-04000302040003050400030a040003090403030204010302040103000401030204010300
-04010304040103020401030104010302040203010401030a040103010401034c04010303
-040103000401031104010303040103040400030804010308040103080400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003070400030204000302
-040003020400030504000303040203030400030904000301040003020401030204010300
-040103020401030004020302040203010401030304010301040203010401030104010305
-040103030401030004010302040103010403030104010300040303020401030004010301
-040303010401030104010301040103050403030104010300040103060401030004010300
-040103000401030004010300040103020403030104010300040503020400030604000300
-040103010401030004010300040103000403030004010309040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030804000302040003020400030204000305
-040003020404030204000308040103010401030104010302040103000401030204010300
-040203020402030104010303040103010401030004000300040103010401030504010303
-040103000401030204010300040103010401030004060302040103000401030004010301
-040103000401030104010301040103040401030104010300040203000401030404010300
-040203000401030004010300040203000401030004010301040103000404030004010302
-040003020401030004000300040003000401030004010300040203000406030004010308
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000307
-040403020400030204000305040003010406030104000308040103010401030104050301
-040503010403030004030301040103030401030104010300040003000401030904010303
-040103010401030004010301040103010401030004020302040103000401030104010300
-040103010401030104010300040103000401030504010301040103000401030104010304
-040103010401030004010300040103000401030104010300040103010401030004020302
-040103020400030104000301040003010400030004010300040103010401030004020301
-040103000401030904000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003080400030604000302040003050400030104060301040003080405030104010305
-040103050401030004000300040003000401030104010303040103010401030104020309
-040103030401030104010300040103010405030004010303040103000401030104010300
-040503010401030004010300040103050401030104010300040103010401030404010301
-040103000401030004010300040103010401030004050300040103030401030204000300
-040003020400030104000300040103000401030104010300040103020401030004010308
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000307
-040003060400030204000305040003010406030104000307040103030401030004010305
-040103050401030004020300040103010401030304010301040103010402030904010303
-040103020402030204010304040103040402030204010300040103050401030004010300
-040103050401030104010300040103010401030404010301040103000401030004010300
-040103010401030004010304040103030401030204000300040003010401030004000301
-040103000401030104010300040103020401030004010309040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030804000306040003020400030504000302
-040403020400030704010303040103000401030504010305040103010400030104010302
-040103010401030204010302040103010401030604010301040103030402030204010301
-040103000401030404020302040103000401030104010302040103010401030604010301
-040103000401030104010304040103000402030004010300040103000402030004010300
-040103010401030004010303040103000400030004000301040103000401030204010300
-040103000402030004010302040103000401030804000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030704080302040003050400030304020303
-040003070401030304010300040103050401030504010301040003010401030304030303
-040103020401030104010307040303050400030404030301040103050400030304010301
-040303030401030104010307040303010401030104010305040103000401030004010300
-040103000401030004010302040303010401030404010302040003080401030104010300
-040103000401030204010300040103090400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000300040003080400030a040003050400030a040003be0404032004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003000400030004000300040003070400030a
-040003050400030a040003e5040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003080400030a04000305040c03e404000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000300040003000400030004000307040c03f8040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003ff03ff03ff03ff032802ff02ff02ff02ff
-020f00ff00ff00ff00ff000e0500000104ff04ff04030501000104ff04ff040305010001
-04ff04ff04030501000104ff04ff04030501000104ff04ff040305010001040401040404
-01000403010204130100040c01000406010004200102040b010004060100041f01000402
-0100040c010004ff043601000402010004090102040c0501000104040100040f01000413
-0100040c01000427010004020100040a01000427010104010100040c010004ff04360100
-04020100040b0100040c0501000104040100040601020405010004030102040b01000400
-010004030102040201040402010204030102040201000400010104030102040a01000402
-01000401010004000101040201040402010204030102040201000400010104030102040a
-010104010100040201020403010104000100040201020403010204ff0429010004020100
-040201020405010004020100040001010405050100010404010004080100040501000402
-010004020100040a01000400010004020100040201000403010004060100040201000402
-010004010101040101000401010004020100040901000402010004010101040101000403
-010004060100040201000402010004010101040101000401010004020100040901000400
-010004000100040101000402010004010100040101010401010004020100040101000402
-010004ff0428010004020100040101000402010004040100040201010401010004040501
-00010404010304050100040501000402010004020100040a010004000100040201000407
-0100040601000402010004020100040101000402010004010100040d0100040201000401
-01000402010004030100040601000402010004020100040101000402010004010100040d
-010004000100040001000401010004020100040101000402010004010100040201000401
-010004ff042c010404010100040201000404010004020100040201000404050100010404
-010004080100040501000402010404090100040201000401010004070100040601000402
-010004020100040101000402010004020102040a01000402010004010100040201000403
-0100040601000402010004020100040101000402010004020102040a0100040101010401
-0100040201000401010004020100040101040402010204ff042901000402010004010104
-04040100040201000402010004040501000104040100040801000405010004020100040d
-010404010100040701000406010004020100040201000401010004020100040501000409
-010004020100040101000402010004030100040601000402010004020100040101000402
-010004050100040901000401010104010100040201000401010004020100040101000409
-010004ff0428010004020100040101000408010004020100040201000404050100010404
-010004080100040501000402010004020100040901000402010004010100040201000403
-010004060100040201000402010004010100040201000401010004020100040901000402
-010004010101040101000403010004060100040201000402010004010100040201000401
-010004020100040901000402010004010100040201000401010004010101040101000402
-0100040101000402010004ff042801000402010004010100040201000404010004020101
-0401010004040501000104040100040801000405010004030102040a0100040201000402
-0102040501010404010004030102040201000402010004020102040b0102040201000400
-0101040501010404010004030102040201000402010004020102040a0100040201000402
-01020403010104000100040201020403010204ff04290100040201000402010204050100
-04020100040001010405050100010468010004ff048f01000408050100010468010004ff
-048f01000408050100010468010004ff048f010004080501000104ff04ff040305010001
-04ff04ff04030501000104ff04ff04030501000105ff05ff0505000005ff05ff050604ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04cf01ff01ff
-010704ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff
-04ff044c01150400010104010100041a017204ff045d0100081201010400010104000101
-041a017204ff045d01000812010404010100041a017204ff045d01000812010104000101
-04010100041a017204ff045d0100081201010400010104010100041a017204ff045d0114
-04050100041a011909010100090101000901010009010111090101050904010209010104
-09010105090101000901011704ff045d0100081201000421011909010103090101000901
-0111090101030901010409000108090101080901011704ff045d01000812010004210116
-090101000901010009010100090101000901010009010102090301010901010009050102
-090001060900010009010101090101000901010009010100090301000901011704ff045d
-010008120100042101150901010009020100090101000901010009020100090101000901
-010109010100090401000901010209000102090101000900010009000100090101000901
-010009020100090601000901011704ff045d010008120100042101150901010109010100
-090101000901010009010101090101000901010109010100090201020901010209000101
-090001010900010109000100090101000901010109010100090201010901010009010117
-04ff045d0114042101150901010109010100090101000901010009010101090101000905
-010009010103090101020900010009000102090001010900010009010100090101010901
-010009010102090101000901011704ff045d010008120100042101150901010109010100
-090101000901010009010101090101000901010409010103090101020900010009000101
-090101000900010109010100090101010901010009010102090101000901011704ff045d
-010008120100042101150901010009020100090101000901010009020100090101000901
-010109010100090101030901010009000100090001010901010009010102090101000901
-01000902010009010102090101000901011704ff045d0100081201000421011609010100
-090101000901010009010100090101000901010209030101090101040901010209000108
-09010101090101000901010009010102090101000901011704ff045d0100081201000421
-013d0904012f04ff045d01140421017204ff045d0100081201000421017204ff045d0100
-081201000421017204ff045d0100081201000421017204ff045d01000812010004210172
-04ff045d01140421017204ff045d01000812010004ff04f201000812010004ff04f20100
-0812010004ff04f201000812010004ff04f2011404ff04f201000812010004ff04f20100
-0812010004ff04f201000812010004ff04f201000812010004ff04f201140444010004ff
-04ac0100081201000444010004ff04ac0100081201000444010004ff04ac010008120100
-0444010004ff04ac0100081201000444010004ff04ac01140444010004ff04ac01000812
-01000444010004ff04ac0100081201000444010004ff04ac0100081201000444010004ff
-04ac0100081201000444010004ff04ac01140444010004ff04ac01000812010004440100
-04ff04ac0100081201000444010004ff04ac0100081201000444010004ff04ac01000812
-01000444010004ff04ac01140444010004ff04ac0100081201000444010004ff04ac0100
-081201000444010004ff04ac0100081201000444010004ff04ac01000812010004440100
-04ff04ac0114044401a004ff040c01000812010004440100044e0100044e010004ff040c
-01000812010004440100044e0100044e010004ff040c01000812010004440100044e0100
-044e010004ff040c01000812010004440100044e0100044e010004ff040c011404440100
-044e0100044e010004ff040c01000812010004440100044e0100044e010004ff040c0100
-0812010004440100044e0100044e010004ff040c01000812010004440100044e0100044e
-010004ff040c01000812010004440100044e0100044e010004ff040c011404440100044e
-0100044e010004ff040c01000812010004440100044e0100044e010004ff040c01000812
-010004440100044e0100044e010004ff040c01000812010004440100044e0100044e0100
-04ff040c01000812010004440100044e0100044e010004ff040c011404440100044e0100
-044e010004ff040c01000812010004440100044e0100044e010004ff040c010008120100
-04440100044e0100044e010004ff040c01000812010004440100044e0100044e010004ff
-040c01000812010004210045040900450409004504ea0114042000450701040700450701
-04070045070104e901000812010004200001044307010407000104430701040700010443
-070104e901000812010004200001044307010407000104430701040700010443070104e9
-01000812010004200001044307010407000104430701040700010443070104e901000812
-010004200001044307010407000104430701040700010443070104e9011404200001040f
-0101041e01010410070104070001042a010104160701040700010443070104e901000612
-0101041f0001040f0101041e01010410070104070001042a010104160701040700010443
-070104e90100061201010403010204180001040f01010401010104010103040101010400
-010304000101040201030401010104100701040700010416010304020103040201030401
-01010416070104070001040d010004000102040001020401010104020101040101030401
-0101040001010401010104000101040f070104e901000612010104020101040001010417
-0001040f0101040001010401010104010101040001070400010104000101040101010400
-010104100701040700010415010104010101040001010401010104000101040101010400
-01010416070104070001040d010104010101040101010400010104020101040001010401
-010104000102040001010400010204000101040e070104e9010006120101040201010400
-010104170001040f01030402010104010101040001020401010104010101040001010401
-010104000101041007010407000104150102040701010400010204030101041607010407
-0001040d0101040101010401010104010101040001010405010104000101040101010400
-010104010101040e070104e901170401010204180001040f010304020105040001010402
-010104010101040001050400010104100701040700010417010204020104040201020401
-01010416070104070001040d010104010101040101010401010104000101040201040400
-0101040101010400010104010101040e070104e901010403010204010101040201030400
-01020402010004190001040f010104000101040101010404010104020101040101010400
-010104040101041007010407000104180102040001010401010104030102040001010416
-070104070001040d01010401010104010101040201020402010104010101040001010401
-01010400010104010101040e070104e90101040201010400010104000102040001010400
-010104210001040f01010401010104000101040101010400010104020101040101010400
-010104010101040001010410070104070001041501010401010104000101040101010400
-010104010101040001010416070104070001040d01010401010104010101040201020402
-01010401010104000102040001010400010204000101040e070104e90101040201010400
-010104000102040001010400010104210001040f01010402010104000103040101010402
-010104010101040101030401010104100701040700010416010304020102040001010400
-0103040101010416070104070001040d0101040101010401010104030101040301020400
-0103040001010401010104000101040f070104e901030401010204010102040101030421
-000104430701040700010443070104070001041b0100040a0101040401010412070104ea
-01020402010004030100040301000423000104430701040700010443070104070001041a
-0101040a0101040401010412070104ff041f000104430701040700010443070104070001
-04190101040b0101040401010412070104ff041f00010443070104070001044307010407
-00010443070104ff041f0001044307010407000104430701040700010443070104ff041f
-0000074604070000074604070000074604ff04200746040807460408074604ff04ff04ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff042c01ff
-01ff010704ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff
-04ff04ff0447
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 26 377 164
-%%EOF
diff --git a/lib/appmon/doc/src/note.gif b/lib/appmon/doc/src/note.gif
deleted file mode 100644
index 6fffe30419..0000000000
--- a/lib/appmon/doc/src/note.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/doc/src/notes.xml b/lib/appmon/doc/src/notes.xml
deleted file mode 100644
index 9987ca9278..0000000000
--- a/lib/appmon/doc/src/notes.xml
+++ /dev/null
@@ -1,300 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2004</year><year>2013</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Appmon Release Notes</title>
- <prepared></prepared>
- <docno>nil</docno>
- <date>nil</date>
- <rev>nil</rev>
- <file>notes.xml</file>
- </header>
- <p>This document describes the changes made to the Appmon application.</p>
-
-<section><title>Appmon 2.1.14.2</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Misc build updates</p>
- <p>
- Own Id: OTP-10784</p>
- </item>
- <item>
- <p>
- The backend module appmon_info.erl is moved from appmon
- application to runtime_tools. This allows appmon to be
- run from a remote erlang node towards a target node which
- does not have appmon (and its dependencies) installed, as
- long as runtime_tools is installed there.</p>
- <p>
- Own Id: OTP-10786</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.14.1</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The GS applications is now deprecated and will be
- removed in the R16 release. The following GS-based
- applications have been superseded by the Observer
- application and will removed in R16: Appmon, Pman,
- Tv.</p>
- <p>
- *** POTENTIAL INCOMPATIBILITY ***</p>
- <p>
- Own Id: OTP-9907</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.14</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Eliminate use of deprecated regexp module</p>
- <p>
- Own Id: OTP-9810</p>
- </item>
- <item>
- <p>
- Miscellaneous documentation build updates</p>
- <p>
- Own Id: OTP-9813</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.13</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- An obsolete compiler directive for native code generation
- was removed from a source file.</p>
- <p>
- Own Id: OTP-8839</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.12</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Warnings due to new autoimported BIFs removed</p>
- <p>
- Own Id: OTP-8674 Aux Id: OTP-8579 </p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.11</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The documentation is now possible to build in an open
- source environment after a number of bugs are fixed and
- some features are added in the documentation build
- process. </p>
- <p>- The arity calculation is updated.</p>
- <p>- The module prefix used in the function names for
- bif's are removed in the generated links so the links
- will look like
- "http://www.erlang.org/doc/man/erlang.html#append_element-2"
- instead of
- "http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2".</p>
- <p>- Enhanced the menu positioning in the html
- documentation when a new page is loaded.</p>
- <p>- A number of corrections in the generation of man
- pages (thanks to Sergei Golovan)</p>
- <p>- The legal notice is taken from the xml book file so
- OTP's build process can be used for non OTP
- applications.</p>
- <p>
- Own Id: OTP-8343</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Appmon 2.1.10.2</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- The documentation is now built with open source tools
- (xsltproc and fop) that exists on most platforms. One
- visible change is that the frames are removed.</p>
- <p>
- Own Id: OTP-8201</p>
- </item>
- </list>
- </section>
-
-</section>
-
- <section>
- <title>Appmon 2.1.10.1</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>
- Updated the application with new tags for automatic updates
- of copyright notices.
- </p>
- <p>Own Id: OTP-7851</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.9</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Fixed dialyzer warning in <c><![CDATA[appmon_info]]></c>.</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.8</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Removed some dead code from the <c><![CDATA[appmon_info]]></c> and
- <c><![CDATA[process_info]]></c> modules. Also rewritten large parts
- of <c><![CDATA[process_info]]></c> to make it easier to read and more
- efficient.</p>
- <p>Own Id: OTP-6534</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.7</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Appmon now handles a process name containing the
- character '@' correctly. (Thanks to Mikael Magnusson).</p>
- <p>Own Id: OTP-6308</p>
- </item>
- <item>
- <p>The "Send" button in the application window was broken,
- it always failed (silently).</p>
- <p>Own Id: OTP-6333</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.6</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Internal change only (using a private digraph instead of
- a public one).</p>
- <p>Own Id: OTP-5983</p>
- </item>
- <item>
- <p>Notification windows are now centered over the parent
- window (if possible).</p>
- <p>Own Id: OTP-6010 Aux Id: OTP-5987</p>
- </item>
- <item>
- <p>Removed some dead code from <c><![CDATA[appmon_info]]></c>,
- discovered by Dialyzer.</p>
- <p>Own Id: OTP-6040</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.5</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Eliminated 5 discrepancies found by Dialyzer in the
- Appmon application.</p>
- <p>Own Id: OTP-5633</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Appmon 2.1.4</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>The graphic applications now search for HTML
- documentation in the correct place.</p>
- <p>Own Id: OTP-5381</p>
- </item>
- </list>
- </section>
- </section>
-</chapter>
-
diff --git a/lib/appmon/doc/src/part_notes.xml b/lib/appmon/doc/src/part_notes.xml
deleted file mode 100644
index 8b19d57d64..0000000000
--- a/lib/appmon/doc/src/part_notes.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>2004</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Appmon Release Notes</title>
- <prepared>Ingela Anderton Andin</prepared>
- <docno></docno>
- <date>2004-09-07</date>
- <rev></rev>
- <file>part_notes.sgml</file>
- </header>
- <description>
- <p>The Application Monitor, <em>Appmon</em>, is a graphical utility
- used to supervise applications executing either locally or on
- remote nodes. The process tree of an application can furthermore
- be monitored.</p>
- </description>
- <include file="notes"></include>
-</part>
-
diff --git a/lib/appmon/doc/src/pinfo_win.gif b/lib/appmon/doc/src/pinfo_win.gif
deleted file mode 100644
index fda0900436..0000000000
--- a/lib/appmon/doc/src/pinfo_win.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/doc/src/pinfo_win.ps b/lib/appmon/doc/src/pinfo_win.ps
deleted file mode 100644
index d47d7d47a9..0000000000
--- a/lib/appmon/doc/src/pinfo_win.ps
+++ /dev/null
@@ -1,1353 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./pinfo_win.tmp.eps)
-%%CreationDate: (Tue Jun 12 18:01:56 2001)
-%%BoundingBox: 0 73 377 347
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 73 377 347
-userdict begin
-%%BeginData:
-DisplayImage
-0 73
-377.000000 274.000000
-12
-580 421
-1
-0
-0
-8
-ffffff
-000000
-708090
-b03060
-d9d9d9
-c3c3c3
-828282
-000000
-03ff03ff03ff03ff03ff035e040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400031a040c03c50400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000308040c03050400030a0400030a0401030304050301
-0405030104010304040103030403030304010302040103090405032d040103090402031e
-040103010401031704000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000307040003020400030204000302040003050400030a0400030904030302
-040103020401030004010302040103000401030404010302040103010401030204020301
-04010309040103020401032c04010308040103200401031a040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000308040003020400030204000302
-040003050400030304020303040003090400030104000302040103020401030004010302
-040103000402030204020301040103030401030104020301040103010401030504010302
-040303000401030004030302040303020403030204030302040303060401030004010300
-040103010403030104030301040103000402030004020300040203020403030104030300
-0401030104030301040103000401030a0400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070400030204000302040003020400030504000302
-040403020400030804010301040103010401030204010300040103020401030004020302
-040203010401030304010301040103000400030004010301040103050401030204080301
-040103000401030104010300040103010401030004010301040103000401030104010305
-040103000402030004010301040103010401030104010300040603010401030104010300
-040103010401030104010301040103000401030104010300040203000401030804000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030804040302
-040003020400030504000301040603010400030804010301040103010405030104050301
-040303000403030104010303040103010401030004000300040103090405030004020301
-040103010401030004010304040103010401030004020303040203080401030004010301
-040103010401030104010301040103000402030104010301040103010401030404010301
-040103010401030004010301040103000401030104010309040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000307040003060400030204000305
-040003010406030104000308040503010401030504010305040103000400030004000300
-040103010401030304010301040103010402030904010304040103020401030104010300
-040103040405030204020303040203060401030004010301040103010401030104010301
-040103000401030204010301040103010401030104040301040103010401030004010301
-040103000401030104010308040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000308040003060400030204000305040003010406030104000307
-040103030401030004010305040103050401030004020300040103010401030304010301
-040103010402030904010304040103020401030104010300040103040401030704020303
-040203050401030004010301040103010401030104010301040103000401030204010301
-040103010401030004010301040103010401030104010300040103010401030004010301
-040103090400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003070400030604000302040003050400030204040302040003070401030304010300
-040103050401030504010301040003010401030204010301040103020401030204010301
-040103050401030404010302040103010401030004010301040103000401030104010300
-040103010401030004010301040103050401030004010301040103010401030104010301
-040103000401030204010301040103010401030004010301040103010401030004020300
-040103010401030004010301040103080400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003080408030204000305040003030402030304000307
-040103030401030004010305040103050401030104000301040103030403030304010302
-040103010401030504010304040103030403030204030302040303020403030204030306
-040103000401030104010301040103020403030104010302040103010401030104010301
-040203000401030104010300040103010403030104010301040103090400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003070400030a04000305
-0400030a040003c504000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003080400030a040003050400030a040003c6040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000300040003000400030004000300040003070400030a04000305040c03c5
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000308
-040c03d90400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003ff03ff03ff03ff039f02ff02ff02ff02ff028700ff00ff00ff00ff008606000001
-04ff04ff043f0601000104ff04ff043f0601000104ff04ff043f0601000104ff04ff043f
-0601000104ff04ff043f0601000104040104040401000403010204ff04ff042806010001
-04040100040f010004ff04ff0428060100010404010004060102040501000403010204ff
-04ff042106010001040401000408010004050100040201000402010004ff04ff04200601
-0001040401030405010004050100040201000402010004ff04ff04200601000104040100
-04080100040501000402010404ff04ff0420060100010404010004080100040501000402
-010004ff04ff042406010001040401000408010004050100040201000402010004ff04ff
-0420060100010404010004080100040501000403010204ff04ff04210601000104ff04ff
-043f0601000104ff04ff043f0601000104ff04ff043f0601000104ff04ff043f06010001
-04ff04ff043f0601000104ff04ff043f0601000106ff06ff0641000006ff06ff064204ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff0484061204ff04ff04300611
-0000040106ff06ff062c040106010506060005060001040106ff06ff062b000004010601
-0505000006000506000104010601040a0101045f0101047801010404010104ff04370001
-0401060105050000060105050001040106010409010004600100047c01000405010004ff
-043600010401060105040001060105050001040106010409010004060100040c01000404
-010004060100040a01020418010204030102040b0100042701020405010004020100040f
-0100040c01000404010004180104040301000405010004ff043600010401060105040001
-04000601050400010401060104090100041a010004140100041a010004050100040b0100
-04290100040901000423010004180100040701000405010004ff04360001040106010503
-000104010601050400010401060104090100040401020402010004000101040301020402
-0104040201020403010204050100040a0102040301020405010004050100040b01000403
-01000400010104020100040001010403010204030102040c010004030102040201000400
-0101040a0102040201000400010104030102040201040408010004000101040901000407
-01000405010004ff04360001040106010503000104020601050300010401060104090100
-040601000402010104010100040401000404010004060100040201000402010004040100
-040901000402010004010100040201000404010004050100040b01000403010104010100
-040101010401010004010100040201000401010004020100040b01000405010004020101
-04010100040b010004020101040101000404010004040100040a01010401010004080103
-040401000405010004ff0436000104010601050200010403060105030001040106010407
-010104070100040201000402010004040100040401000406010004060100040401000409
-010004090100040401000405010004090101040401000402010004010100040501000402
-010004010100040f0100040501000402010004020100040b010004020100040201000404
-010004040100040a010004020100040c0100040401010404010104ff0434000104010601
-050200010404060105020001040106010409010004060100040201000402010004040100
-0404010004060100040301030404010004090100040601030404010004050100040b0100
-040301000402010004010100040501000402010004010100040f01000405010004020100
-04020100040b010004020100040201000404010004040100040a010004020100040c0100
-040301000405010004ff0436000104010601050100010405060105020001040106010409
-010004060100040201000402010004040100040401000406010004020100040201000404
-01000409010004050100040201000404010004050100040b010004030100040201000401
-0100040501000402010004010100040f0100040501000402010004020100040b01000402
-0100040201000404010004040100040a0100040201000408010004020100040301000405
-010004ff0436000104010601050100010406060105010001040106010409010004060100
-040201000402010004040100040401000406010004020100040201000404010004090100
-040201000401010004020100040401000405010004040101040401000403010104010100
-0401010004050100040201000401010004020100040b0100040501000402010104010100
-040301010405010004020100040201000404010004040100040a01010401010004030101
-040201000402010004030100040501000405010104ff042e000104010601050000010407
-060105010001040106010409010004060100040201000402010004040100040501010404
-01000403010304040100040a010204030103040401000405010004040101040401000403
-010004000101040201000406010204030102040c01000405010004020100040001010404
-010104050100040201000402010004040100040501010408010004000101040401010403
-010204040100040501000405010104ff042e000104010601050000010408060105000001
-0401060104090100043301050420010004040100040301000419010504190100041d0105
-0401010004080100040b0100040501000406010004ff042e0001040106010001060b0500
-000104010601040a0101045601010406010104010100043701010426010004060101040a
-0101040401010405010104ff042f0001040106010000060d000104010601047001000460
-010004ff0454000104010601050e000104010601040a01010463010104ff04b500010401
-0601050e000104010601040901000467010004ff04b4000104010601050e000104010601
-04090100040c0100040c01000429010004040100040601000412010004ff04b400010401
-0601050e00010401060104090100040c0100040c0100042f0100041a010004ff04b40001
-04010601050e000104010601040901000404010204020104040201020402010404010100
-040201000402010204090100040201000402010204030102040201040402010204020100
-0400010104030101040001000403010004ff04b4000104010601050e0001040106010409
-010004030100040201000403010004030100040201000403010004030100040201000401
-010004020100040801000402010004010100040201000404010004040100040601000402
-01010401010004010100040101010403010004ff04b4000104010601050e000104010601
-0407010104040100040701000407010004030100040301000402010004010100040c0100
-040001000400010004050100040401000404010004060100040201000402010004010100
-040201000404010104ff04b2000104010601050e00010401060104090100040401020404
-010004040103040301000403010004020100040201020409010004000100040001000402
-0103040401000404010004060100040201000402010004010100040201000403010004ff
-04b4000104010601050e0001040106010409010004070100040301000403010004020100
-040301000403010004020100040501000408010004000100040001000401010004020100
-040401000404010004060100040201000402010004010100040201000403010004ff04b4
-000104010601050e00010401060104090100040301000402010004030100040301000402
-010004030100040301000401010104010100040201000403010104020100040001000400
-010004010100040201000404010004040100040601000402010004020100040101000401
-0101040301000405010104ff04ac000104010601050e0001040106010409010004040102
-040501010402010304040101040201010400010004020102040401010403010004000100
-040301030404010004050101040401000402010004020100040201010400010004030100
-0405010104ff04ac000104010601050e0001040106010409010004300100043001000403
-01000406010004ff04ac000104010601050e000104010601040a0101042c0101042d0100
-04020100040101010405010104ff04ad000104010601050e000104010601046a010204ff
-04ba000104010601050e000104010601040a01010486010104ff0492000104010601050e
-00010401060104090100048a010004ff0491000104010601050e00010401060104090100
-04660102041901010404010004ff0491000104010601050e000104010601040901000468
-010004180100040101000403010004ff0491000104010601050e00010401060104090100
-040301010400010004030102040301020403010204030102040301010400010004020102
-040a010104000100040101000402010004020102040201000402010004020102040c0100
-040301020402010004000101040a0100040101000403010004ff0491000104010601050e
-000104010601040901000403010004000100040001000401010004020100040101000402
-010004010100040201000401010004020100040101000401010104010100040201000408
-010004010101040101000402010004010100040201000401010004020100040101000402
-0100040b01000402010004020100040101010401010004090100040101000403010004ff
-0491000104010601050e0001040106010407010104040100040001000400010004010100
-040201000401010004050100040901000401010004020100040101000402010004080100
-040201000401010004020100040101000402010004010100040201000401010004020100
-040b01000402010004020100040101000402010004090100040101000404010104ff048f
-000104010601050e00010401060104090100040301000400010004000100040101040402
-010204030102040301030401010004020100040101040408010004020100040101000402
-010004010104040101000402010004010104040b01000402010404010100040201000409
-0100040101000403010004ff0491000104010601050e0001040106010409010004030100
-040001000400010004010100040901000405010004010100040201000401010004020100
-04010100040c010004020100040101000402010004010100040501000402010004010100
-040f010004020100040501000402010004090100040101000403010004ff049100010401
-0601050e0001040106010409010004030100040001000400010004010100040201000401
-010004020100040101000402010004010100040201000401010004010101040101000402
-010004080100040101010401010004010101040101000402010004010100040101010401
-010004020100040b01000402010004020100040101000402010004030101040301000401
-0100040301000405010104ff0489000104010601050e0001040106010409010004030100
-040001000400010004020102040301020403010204030103040201010400010004020102
-040a010104000100040201010400010004020102040301010400010004020102040c0100
-0403010204020100040201000403010104040101040401000405010104ff048900010401
-0601050e00010401060104090100042a01000407010504050100041c010504190100040b
-01000406010004ff0489000104010601050e000104010601040a01010424010004020100
-04130100043a0101040a01010405010104ff048a000104010601050e0001040106010432
-01020414010004ff04dc000104010601050e000104010601040a0101044e010104ff04ca
-000104010601050e0001040106010409010004430103040101030404010004ff04c90001
-04010601050e0001040106010409010004430100040701000404010004ff04c900010401
-0601050e0001040106010409010004430100040701000404010004ff04c9000104010601
-050e00010401060104090100040301010400010004030102040301020403010204030102
-04030101040001000402010204030102040a0100040701000404010004ff04c900010401
-0601050e0001040106010409010004030100040001000400010004010100040201000401
-010004020100040101000402010004010100040201000401010004010101040101000402
-0100040101000402010004090100040701000404010004ff04c9000104010601050e0001
-040106010407010104040100040001000400010004010100040201000401010004050100
-040901000401010004020100040101000402010004010100040d01000407010004050101
-04ff04c70001040106010010040106010409010004030100040001000400010004010104
-04020102040301020403010304010100040201000401010404020102040a010004070100
-0404010004ff04c9000104010601000d0600000104010601040901000403010004000100
-040001000401010004090100040501000401010004020100040101000402010004010100
-0409010004090100040701000404010004ff04c90001040106010001040a060100010401
-060104090100040301000400010004000100040101000402010004010100040201000401
-010004020100040101000402010004010100040101010401010004020100040101000402
-0100040301010403010004070100040401000405010104ff04c10001040106010001040a
-060100010401060104090100040301000400010004000100040201020403010204030102
-040301030402010104000100040201020403010204040101040301000407010004040100
-0405010104ff04c10001040106010001040a060100010401060104090100042a01000412
-01000403010304010103040401000406010004ff04c10001040106010001040a06010001
-04010601040a0101042401000402010004100101041101010405010104ff04c200010401
-06010001040a06010001040106010432010204ff04f20001040106010001040a06010001
-04010601040a01010478010104ff04a00001040106010001040a06010001040106010409
-0100042e01030405010004310100040601030404010004ff049f0001040106010001040a
-060100010401060104090100040401020405010004090100041401000407010004040101
-040b01000405010104030102040b010104020100040801000404010004ff049f00010401
-06010001040a060100010401060104090100040601000410010004140100040601000404
-010004010100040901010404010004010100040101000402010004090100040101000402
-0100040701000404010004ff049f0001040106010001040a060100010401060104090100
-04060100040301020402010004000101040201000401010004030102040a010004050100
-040501000401010004080100040001000404010004010100040501000409010004010100
-04030100040601000404010004ff049f0001040106010001040a06010001040106010409
-010004060100040501000402010104010100040101000400010004030100040201000409
-0100040401000406010004010100040a0100040401000401010004050100040901000401
-010004040100040501000404010004ff049f0001040106010001040a0601000104010601
-04070101040701000405010004020100040201000401010104040100040d010004030100
-0407010004010100040a0100040401000401010004030101040a01000401010004050100
-040401000405010104ff049d0001040106010001040a0601000104010601040901000406
-01000405010004020100040201000401010104050102040a010004040100040601000401
-0100040a0100040401000401010004050100040901000401010004040100040501000404
-010004ff049f0001040106010001040a0601000104010601040901000406010004050100
-040201000402010004010100040001000407010004090100040501000405010004010100
-040a01000404010004010100040501000409010004010100040301000406010004040100
-04ff049f0001040106010001040a06010001040106010409010004060100040501000402
-010004020100040101000401010004020100040201000403010104030100040601000404
-010004010100040301010404010004040100040101000401010004020100040301010403
-0100040101000402010004070100040401000405010104ff04970001040106010001040a
-060100010401060104090100040601000405010004020100040201000401010004020100
-040201020404010104030100040701000404010104040101040201040403010104030102
-04040101040401010402010004080100040401000405010104ff04970001040106010001
-040a06010001040106010409010004290100040301030405010004310100040601030404
-01000406010004ff04970001040106010001040a0601000104010601040a010104250101
-045001010405010104ff04980001040106010001040a060100010401060104ff04ff0428
-0001040106010001040a0601000104010601040a01010458010104ff0419010104a40001
-040106010001040a06010001040106010409010004510103040301000406010004040100
-04450100040a01030475010004310100040601030404010004a30001040106010001040a
-0601000104010601040901000407010004040100040b010004060100042d010004060100
-040601000403010204270100041b0100040a01000477010004040101040b010004050101
-04040100040c010104020100040801000404010004a30001040106010001040a06010001
-040106010409010004070100041101000435010004060100040501000403010004000100
-0400010004260100041a0100040b01000476010004040100040101000409010104040100
-0401010004020101040b01000401010004020100040701000404010004a3000104010601
-0001040a0601000104010601040901000404010104000100040201020403010204020104
-040201020403010204020100040001010403010204020100040001010402010004020100
-040901000406010004040100040401000400010004040102040201000400010104030102
-0403010204030102040201040402010204020100040001010403010204030100040c0100
-040401010400010004020100040201000402010204020100040201000401010004000101
-040901010400010004020100040201000402010204020100040001010402010004000101
-040a010204020100040201000401010004000101040a0100040501000401010004080100
-0400010004040100040101000401010004000100040b0100040101000403010004060100
-0404010004a30001040106010001040a0601000104010601040901000403010004010101
-040401000402010004020100040301000406010004020100040201000401010104010100
-0401010004020100040101010401010004010100040201000409010004060100040a0100
-040001000403010004020100040101010401010004010100040201000401010004020100
-040101000402010004030100040301000402010004010101040101000401010004020100
-041001000404010004000100040001000401010004020100040101000402010004010100
-040201000401010104010100040801000400010004000100040101000402010004010100
-040201000401010104010100040101010401010004080100040201000401010004020100
-0401010104010100040801000406010004010100040a0100040401000401010004030100
-040b01000401010004040100040501000404010004a30001040106010001040a06010001
-040106010407010104040100040201000404010004020100040701000406010004020100
-040201000401010004020100040501000401010004060100040101000409010004040101
-040c01020406010004010100040201000401010004050100040201000401010004070100
-040301000402010004010100040501000414010004040100040001000400010004020100
-040101000401010004050100040201000401010004020100040801000400010004000100
-040201000401010004050100040101000402010004010100040201000408010004050100
-040201000401010004020100040701000407010004010100040a01000404010004010100
-04030100040b01000401010004050100040401000405010104a10001040106010001040a
-060100010401060104090100040301000402010004040100040201000407010004060100
-040201000402010004010100040201000402010304010100040601000401010004090100
-04060100040c010004000100040201030401010004020100040101000405010404020102
-040401000403010004020100040101000406010204110100040401000400010004000100
-040201000401010004020102040201000402010004010100040201000408010004000100
-040001000402010004010100040201030401010004020100040101000402010004090102
-04020100040201000401010004020100040801000406010004010100040a010004040100
-0401010004030100040b01000401010004040100040501000404010004a3000104010601
-0001040a0601000104010601040901000403010004020100040401000402010004070100
-040601000402010004020100040101000402010004010100040201000401010004070100
-040001000409010004060100040c01000400010004010100040201000401010004020100
-040101000405010004090100040301000403010004020100040101000409010004100100
-040401000400010004000100040301000400010004050100040101000402010004010100
-040201000408010004000100040001000403010004000100040101000402010004010100
-040201000401010004020100040c01000401010004020100040101000402010004090100
-0405010004010100040a0100040401000401010004030100040b01000401010004030100
-040601000404010004a30001040106010001040a06010001040106010409010004030100
-040101010404010004020100040201000403010004060100040201000402010004010100
-0402010004010100040201000401010004070101040401010403010004060100040a0100
-040001000400010004010100040201000401010004020100040101000402010004010100
-040201000401010004020100040301000403010004020100040101000405010004020100
-040a01010403010004040100040001000400010004030101040201000402010004010100
-040101010401010104010100040301010402010004000100040001000403010104020100
-040201000401010104010100040101010401010004080100040201000401010004010101
-040101010401010004030101040401000404010004010100040301010404010004040100
-040101000403010004050101040301000401010004020100040701000404010004050101
-049b0001040106010001040a060100010401060104090100040401010400010004040100
-040301020405010104040100040301020402010004020100040201030401010004080100
-040401010403010004060100040b01020403010304010100040201000402010204030102
-0403010204050101040201020402010004060102040b0101040301000404010004000100
-040001000404010004030102040301010400010004010100040001010404010104020100
-0400010004000100040401000403010304010100040001010402010004000101040a0102
-040301010400010004010100040001010404010104050100040401010404010104020104
-0403010104020104040301010404010104020100040801000404010004050101049b0001
-040106010001040a06010001040106010409010004450100040501000403010304030100
-040c0100044c010004030103040b01000410010004080100040c01000409010004050100
-04040105040f0100040801000406010004310100040601030404010004060100049b0001
-040106010001040a0601000104010601040a0101044001000400010004040101040d0101
-0456010104110100040001000411010004060101040a010004000100040a010004050100
-041a0100040601010449010104050101049c0001040106010001040a0601000104010601
-044e0100048301000412010004140100040b010004050100041a010004f9000104010601
-0001040a0601000104010601046501010474010104ff04490001040106010001040a0601
-000104010601046401000406010004040100045a0100040b010004ff044b000104010601
-0001040a060100010401060104640100040601000403010204050100040c010004040100
-04060100040a0102041801020403010204050100040b010004220100040c010004040100
-040d01000404010004fe0001040106010001040a06010001040106010464010004050100
-0403010004000100040001000418010004140100041a01000405010004040100040c0100
-043601000413010004fe0001040106010001040a06010001040106010464010004040100
-040401000400010004040102040201000400010104030102040201040402010204030102
-04050100040a010204030102040501000405010004030100040d01000404010104000100
-040201020402010004000101040a01020402010004000101040301020402010404090102
-0402010404fc0001040106010001040a060100010401060104640100040a010004000100
-040601000402010104010100040401000404010004060100040201000402010004040100
-040901000402010004010100040201000404010004050100041201000403010004010101
-04010100040201000401010104010100040b010004020101040101000404010004040100
-040d01000404010004fe0001040106010001040a060100010401060104620101040c0102
-040501000402010004020100040401000404010004060100040601000404010004090100
-040901000404010004050100041001010404010004020100040101000402010004010100
-04020100040b010004020100040201000404010004040100040d01000404010004fe0001
-040106010001040a060100010401060104640100040c0100040001000404010004020100
-040201000404010004040100040601000403010304040100040901000406010304040100
-04050100041201000403010004020100040101040401010004020100040b010004020100
-040201000404010004040100040d01000404010004fe0001040106010001040a06010001
-0401060104640100040c0100040001000404010004020100040201000404010004040100
-040601000402010004020100040401000409010004050100040201000404010004050100
-041201000403010004020100040101000405010004020100040b01000402010004020100
-0404010004040100040d01000404010004fe0001040106010001040a0601000104010601
-04640100040a010004000100040001000404010004020100040201000404010004040100
-040601000402010004020100040401000409010004020100040101000402010004040100
-04050100040b010104040100040301000401010104010100040201000401010004020100
-040301010405010004020100040201000404010004040100040d01000404010004050101
-04f60001040106010001040a060100010401060104640100040b01020405010004020100
-040201000404010004050101040401000403010304040100040a01020403010304040100
-04050100040b010104040100040401010400010004020102040201000402010004030101
-0405010004020100040201000404010004050101040b0100040501010403010104f60001
-040106010001040a060100010401060104640100040c0100043301050427010004040100
-0407010004120100041d01050412010004f60001040106010001040a0601000104010601
-04650101046b0101040601010401010004020100041001010435010104f7000104010601
-0001040a060100010401060104e1010204ff04430001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104fd010304ff04260001
-040106010001040a060100010401060104fd010004ff04290001040106010001040a0601
-00010401060104fd010004ff04290001040106010001040a060100010401060104fd0100
-0405010104000100040201020402010004000101040a0102040301020402010004000101
-040201000402010004020102040201000400010104e10001040106010001040a06010001
-0401060104fd010004040100040101010401010004020100040101010401010004080100
-040201000401010004020100040101010401010004010100040201000401010004020100
-040101010401010004e00001040106010001040a060100010401060104fd010004040100
-040201000401010004020100040101000402010004080100040501000402010004010100
-040501000402010004010100040201000401010004e40001040106010001040a06010001
-0401060104fd010004040100040201000401010404010100040201000409010204020104
-040101000406010004000100040201040401010004e40001040106010001040a06010001
-0401060104fd01000404010004020100040101000405010004020100040c010004010100
-040501000406010004000100040201000405010004e40001040106010001040a06010001
-0401060104fd010004040100040101010401010004020100040101000402010004080100
-040201000401010004020100040101000407010004030100040201000401010004070101
-04da0001040106010001040a060100010401060104fd0100040501010400010004020102
-040201000402010004090102040301020402010004070100040401020402010004070101
-04da0001040106010001040a060100010401060104fd010304050100040e0105042e0100
-04da0001040106010001040a060100010401060104ff04030100040201000441010104db
-0001040106010001040a060100010401060104ff0404010204ff04200001040106010001
-040a060100010401060104ff04ff04280001040106010001040a060100010401060104ff
-040701000431010004ec0001040106010001040a060100010401060104ff040601000404
-0101040b01000405010104030102040b01010402010004eb0001040106010001040a0601
-00010401060104ff04050100040401000401010004090101040401000401010004010100
-0402010004090100040101000402010004ea0001040106010001040a0601000104010601
-04ff04040100040501000401010004080100040001000404010004010100040501000409
-0100040101000403010004e90001040106010001040a060100010401060104ff04030100
-0406010004010100040a0100040401000401010004050100040901000401010004040100
-04e80001040106010001040a060100010401060104ff040201000407010004010100040a
-0100040401000401010004030101040a0100040101000405010004e70001040106010001
-040a060100010401060104ff040301000406010004010100040a01000404010004010100
-0405010004090100040101000404010004e80001040106010001040a0601000104010601
-04ff040401000405010004010100040a0100040401000401010004050100040901000401
-01000403010004e90001040106010001040a060100010401060104ff0405010004040100
-040101000403010104040100040401000401010004010100040201000403010104030100
-04010100040201000406010104e10001040106010001040a060100010401060104ff0406
-010004040101040401010402010404030101040301020404010104040101040201000407
-010104e10001040106010001040a060100010401060104ff040701000431010004090100
-04e10001040106010001040a060100010401060104ff0443010104e20001040106010001
-040a060100010401060104ff04ff04280001040106010001040a060100010401060104ff
-04ff04280001040106010001040a060100010401060104ff040701000431010004ec0001
-040106010001040a060100010401060104ff0406010004040101040b0100040501010403
-0102040b01010402010004eb0001040106010001040a060100010401060104ff04050100
-040401000401010004090101040401000401010004010100040201000409010004010100
-0402010004ea0001040106010001040a060100010401060104ff04040100040501000401
-0100040801000400010004040100040101000405010004090100040101000403010004e9
-0001040106010001040a060100010401060104ff040301000406010004010100040a0100
-04040100040101000405010004090100040101000404010004e80001040106010001040a
-060100010401060104ff040201000407010004010100040a010004040100040101000403
-0101040a0100040101000405010004e70001040106010001040a060100010401060104ff
-040301000406010004010100040a01000404010004010100040501000409010004010100
-0404010004e80001040106010001040a060100010401060104ff04040100040501000401
-0100040a010004040100040101000405010004090100040101000403010004e900010401
-06010001040a060100010401060104ff0405010004040100040101000403010104040100
-040401000401010004010100040201000403010104030100040101000402010004060101
-04e10001040106010001040a060100010401060104ff0406010004040101040401010402
-010404030101040301020404010104040101040201000407010104e10001040106010001
-040a060100010401060104ff04070100043101000409010004e10001040106010001040a
-060100010401060104ff0443010104e20001040106010001040a060100010401060104ff
-04ff04280001040106010001040a060100010401060104ff040601010463010104b90001
-040106010001040a060100010401060104ff040501000467010004b80001040106010001
-040a060100010401060104ff0405010004040102041801020443010004b8000104010601
-0001040a060100010401060104ff0405010004060100041a01000443010004b800010401
-06010001040a060100010401060104ff0405010004060100040301020403010204030102
-040501000409010104000100040201000402010004020102040301020402010004000101
-04020100040201000402010204020100040001010404010004b80001040106010001040a
-060100010401060104ff0405010004060100040201000402010004010100040201000401
-010004020100040401000409010004000100040001000401010004020100040101000402
-010004010100040201000401010104010100040101000402010004010100040201000401
-0101040101000403010004b80001040106010001040a060100010401060104ff04030101
-040701000402010004020100040101000409010004040100040901000400010004000100
-040201000401010004010100040501000402010004010100040501000402010004010100
-04020100040101000408010104b60001040106010001040a060100010401060104ff0405
-010004060100040201000402010004010100040601030404010004090100040001000400
-010004020100040101000402010204020104040101000406010004000100040201040401
-01000407010004b80001040106010001040a060100010401060104ff0405010004060100
-040201000402010004010100040501000402010004040100040901000400010004000100
-040301000400010004050100040101000405010004060100040001000402010004050100
-0407010004b80001040106010001040a060100010401060104ff04050100040601000402
-010004020100040101000402010004010100040201000404010004040101040201000400
-010004000100040301010402010004020100040101000402010004010100040701000403
-01000402010004010100040701000405010104b00001040106010001040a060100010401
-060104ff0405010004060100040301020403010204030103040401000404010104020100
-040001000400010004040100040301020403010204020100040701000404010204020100
-040701000405010104b00001040106010001040a060100010401060104ff040501000429
-0100040c0100042e01000406010004b00001040106010001040a060100010401060104ff
-0406010104250101040a010004000100042d01010405010104b10001040106010001040a
-060100010401060104ff043c010004ea0001040106010001040a060100010401060104ff
-04ff04280001040106010001040a060100010401060104ff04ff04280001040106010001
-040a060100010401060104ff04ff04280001040106010001040a060100010401060104ff
-04ff04280001040106010001040a060100010401060104ff040301010400010004020100
-040201000402010204030102040201000400010104020100040201000402010204020100
-0400010104ef0001040106010001040a060100010401060104ff04030100040001000400
-010004010100040201000401010004020100040101000402010004010101040101000401
-0100040201000401010004020100040101010401010004ee0001040106010001040a0601
-00010401060104ff04030100040001000400010004020100040101000401010004050100
-0402010004010100040501000402010004010100040201000401010004f2000104010601
-0001040a060100010401060104ff04030100040001000400010004020100040101000402
-010204020104040101000406010004000100040201040401010004f20001040106010001
-040a060100010401060104ff040301000400010004000100040301000400010004050100
-04010100040501000406010004000100040201000405010004f20001040106010001040a
-060100010401060104ff0403010004000100040001000403010104020100040201000401
-01000402010004010100040701000403010004020100040101000407010104e800010401
-06010001040a060100010401060104ff0403010004000100040001000404010004030102
-04030102040201000407010004040102040201000407010104e80001040106010001040a
-060100010401060104ff040d0100042f010004e80001040106010001040a060100010401
-060104ff040a010004000100042e010104e90001040106010001040a0601000104010601
-04ff040b010004ff041b0001040106010001040a060100010401060104ff04ff04280001
-040106010001040a060100010401060104ff040401030401010304ff0419000104010601
-0001040a060100010401060104ff040401000407010004ff04190001040106010001040a
-060100010401060104ff040401000407010004ff04190001040106010001040a06010001
-0401060104ff040401000407010004ff04190001040106010001040a0601000104010601
-04ff040401000407010004ff04190001040106010001040a060100010401060104ff0404
-01000407010004ff04190001040106010001040a060100010401060104ff040401000407
-010004ff04190001040106010001040a060100010401060104ff040401000407010004ff
-04190001040106010001040a060100010401060104ff04040100040701000404010104ff
-04120001040106010001040a060100010401060104ff04040100040701000404010104ff
-04120001040106010001040a060100010401060104ff04040103040101030405010004ff
-04120001040106010001040a060100010401060104ff0412010104ff0413000104010601
-0001040a060100010401060104ff04ff04280001040106010001040a0601000104010601
-04ff0418010104040101040b010104f80001040106010001040a060100010401060104ff
-0404010304010103040201030404010004050100040301030404010004f7000104010601
-0001040a060100010401060104ff04040100040701000405010004040100040501000406
-01000404010004f70001040106010001040a060100010401060104ff0404010004070100
-040501000404010004050100040601000404010004f70001040106010001040a06010001
-0401060104ff0404010004070100040501000404010004050100040601000404010004f7
-0001040106010001040a060100010401060104ff04040100040701000405010004040100
-04050100040601000404010004f70001040106010001040a060100010401060104ff0404
-010004070100040501000405010104040101040401000405010104f50001040106010001
-040a060100010401060104ff040401000407010004050100040401000405010004060100
-0404010004f70001040106010001040a060100010401060104ff04040100040701000405
-01000404010004050100040601000404010004f70001040106010001040a060100010401
-060104ff0404010004070100040501000404010004050100040601000404010004050101
-04ef0001040106010001040a060100010401060104ff0404010004070100040501000404
-01000405010004060100040401000405010104ef0001040106010001040a060100010401
-060104ff0404010304010103040201030404010004050100040301030404010004060100
-04ef0001040106010001040a060100010401060104ff0418010104040101040b01010405
-010104f00001040106010001040a060100010401060104ff04ff04280001040106010001
-040a0601000104010601040a0101046a010104ff04ae0001040106010001040a06010001
-0401060104090100046e010004ff04ad0001040106010001040a06010001040106010409
-0100040501000430010004040100040d0101040901020412010004ff04ad000104010601
-0001040a0601000104010601040901000405010004360100040c0100040d010004120100
-04ff04ad0001040106010001040a06010001040106010409010004030104040101000400
-0101040301020402010004000101040a010204020100040201000402010204020104040a
-0100040401020405010004030102040301020404010004ff04ad0001040106010001040a
-060100010401060104090100040501000403010104010100040101000402010004010101
-04010100040801000402010004010100040201000404010004040100040a010404010100
-0402010004040100040201000402010004010100040201000403010004ff04ad00010401
-06010001040a060100010401060104070101040601000403010004090100040101000402
-0100040801000402010004020100040001000405010004040100040c0100040701000404
-01000402010004050100040201000404010104ff04ab0001040106010001040a06010001
-040106010409010004050100040301000406010304010100040201000408010404030100
-0406010004040100040c0100040401030404010004030102040201040403010004ff04ad
-0001040106010001040a0601000104010601040901000405010004030100040501000402
-010004010100040201000408010004060100040001000405010004040100040c01000403
-0100040201000404010004060100040101000407010004ff04ad0001040106010001040a
-060100010401060104090100040501000403010004050100040201000401010104010100
-040801000402010004010100040201000404010004040100040501010404010004030100
-040201000404010004020100040201000401010004020100040301000405010104ff04a5
-0001040106010001040a0601000104010601040901000406010104010100040601030401
-010004000101040a01020402010004020100040401000405010104030101040401000404
-0103040401000403010204030102040401000405010104ff04a50001040106010001040a
-060100010401060104090100041801000404010504200100042701000406010004ff04a5
-0001040106010001040a0601000104010601040a01010416010004290101042601010405
-010104ff04a60001040106010001040a06010001040106010423010004ff04ff04030001
-040106010001040a0601000104010601040a010104be010104ff045a0001040106010001
-040a06010001040106010409010004c2010004ff04590001040106010001040a06010001
-0401060104090100042d0100041701000402010204410100041701000402010204120100
-04ff04590001040106010001040a060100010401060104090100042d0100041701000404
-01000441010004170100040401000412010004ff04590001040106010001040a06010001
-040106010409010004040102040201000400010104020100040001010403010204020100
-040001010409010004000101040301020402010004000101040301010400010004040100
-040301020402010004000101040a01020402010004000101040201000400010104030102
-040201000400010104090100040001010403010204020100040001010403010104000100
-040401000403010204020100040001010404010004ff04590001040106010001040a0601
-000104010601040901000403010004020100040101010401010004010101040101000401
-010004020100040101010401010004080101040101000401010004020100040101010401
-010004010100040101010404010004020100040201000401010104010100040801000402
-010004010101040101000401010104010100040101000402010004010101040101000408
-010104010100040101000402010004010101040101000401010004010101040401000402
-01000402010004010101040101000403010004ff04590001040106010001040a06010001
-040106010407010104040100040201000401010004050100040501000402010004010100
-040c01000402010004050100040101000402010004010100040201000404010004020100
-0402010004010100040c0100040201000401010004050100040501000402010004010100
-040c01000402010004050100040101000402010004010100040201000404010004020100
-04020100040101000408010104ff04570001040106010001040a06010001040106010409
-0100040301040401010004050100040501000402010004010100040c0100040201000402
-010304010100040201000401010004020100040401000402010404010100040c01040401
-010004050100040501000402010004010100040c01000402010004020103040101000402
-010004010100040201000404010004020104040101000407010004ff0459000104010601
-0001040a0601000104010601040901000403010004050100040501000405010004020100
-04010100040c010004020100040101000402010004010100040201000401010004020100
-040401000402010004050100040c01000405010004050100040501000402010004010100
-040c01000402010004010100040201000401010004020100040101000402010004040100
-04020100040501000407010004ff04590001040106010001040a06010001040106010409
-010004030100040201000401010004050100040501000402010004010100040c01000402
-010004010100040201000401010004020100040101000401010104040100040201000402
-010004010100040701010402010004020100040101000405010004050100040201000401
-0100040c0100040201000401010004020100040101000402010004010100040101010404
-0100040201000402010004010100040701000405010104ff04510001040106010001040a
-0601000104010601040901000404010204020100040501000406010204020100040c0100
-040201000402010304010100040201000402010104000100040401000403010204020100
-040701010403010204020100040501000406010204020100040c01000402010004020103
-040101000402010004020101040001000404010004030102040201000407010004050101
-04ff04510001040106010001040a06010001040106010409010004250105043501000424
-0105043401000406010004ff04510001040106010001040a0601000104010601040a0101
-045d0101045e01010405010104ff04520001040106010001040a060100010401060104ff
-04ff04280001040106010001040a0601000104010601040a0101046a010104ff04ae0001
-040106010001040a060100010401060104090100046e010004ff04ad0001040106010001
-040a060100010401060104090100041401000413010004040100043501020404010004ff
-04ad0001040106010001040a060100010401060104090100042f01000437010004040100
-04ff04ad0001040106010001040a06010001040106010409010004030100040001010402
-010004000101040301020403010204020100040001010403010204020104040101000402
-010004080100040001010403010204020100040001010402010104000100040301020405
-01000404010004ff04ad0001040106010001040a06010001040106010409010004030101
-040101000401010104010100040401000402010004020100040101010401010004040100
-040401000403010004020100040801010401010004010100040201000401010104010100
-0401010004000100040001000401010004020100040401000404010004ff04ad00010401
-06010001040a060100010401060104070101040401000402010004010100040801000402
-010004020100040101000408010004040100040401000401010004080100040201000401
-0100040201000401010004050100040001000400010004050100040401000405010104ff
-04ab0001040106010001040a060100010401060104090100040301000402010004010100
-040801000402010004020100040101000408010004040100040401000401010004080100
-040201000401010004020100040101000405010004000100040001000402010304040100
-0404010004ff04ad0001040106010001040a060100010401060104090100040301000402
-010004010100040801000402010004020100040101000408010004040100040501000400
-010004080100040201000401010004020100040101000405010004000100040001000401
-010004020100040401000404010004ff04ad0001040106010001040a0601000104010601
-040901000403010104010100040101000408010004020100040201000401010004080100
-040401000405010104040101040201000402010004010100040201000401010004050100
-0400010004000100040101000402010004040100040401000405010104ff04a500010401
-06010001040a060100010401060104090100040301000400010104020100040801000403
-010204020100040801000405010104040100040401010402010004020100040201020402
-01000405010004000100040001000402010304040100040401000405010104ff04a50001
-040106010001040a060100010401060104090100040301000432010004050100042e0100
-0406010004ff04a50001040106010001040a0601000104010601040a010104010100042f
-01000400010004040101042d01010405010104ff04a60001040106010001040a06010001
-04010601040e01000430010004ff04e60001040106010001040a0601000104010601040a
-0101049b010104ff047d0001040106010001040a06010001040106010409010004620100
-043101000408010004ff047c0001040106010001040a060100010401060104090100042e
-0102041401000419010004040101040b01000405010104040101040b0101040201000407
-010004ff047c0001040106010001040a0601000104010601040901000430010004140100
-041801000404010004010100040901010404010004010100040201000401010004090100
-04010100040201000406010004ff047c0001040106010001040a06010001040106010409
-010004040101040001000401010004000101040301020402010004020100040101000400
-0101040c010004030102040301020403010104000100040201020402010004000101040a
-010004050100040101000408010004000100040401000401010004020100040101000409
-010004010100040301000405010004ff047c0001040106010001040a0601000104010601
-040901000403010004010101040101010401010004010100040201000401010004020100
-0401010104010100040b0100040201000402010004010100040201000401010004010101
-04010100040201000401010104010100040801000406010004010100040a010004040100
-0401010004020100040101000409010004010100040401000404010004ff047c00010401
-06010001040a060100010401060104070101040401000402010004010100040501000402
-010004010100040201000401010004020100040b01000402010004020100040501000401
-010004020100040101000402010004010100040b01000407010004010100040a01000404
-01000401010004020100040101000409010004010100040501000404010104ff047a0001
-040106010001040a06010001040106010409010004030100040201000401010004050100
-0402010004010100040201000401010004020100040b0100040201040402010304010100
-040201000401010404010100040c01000406010004010100040a01000404010004010100
-04020100040101000409010004010100040401000404010004ff047c0001040106010001
-040a06010001040106010409010004030100040201000401010004050100040201000401
-0100040201000401010004020100040b0100040201000405010004020100040101000402
-01000401010004050100040d01000405010004010100040a010004040100040101000402
-0100040101000409010004010100040301000405010004ff047c0001040106010001040a
-060100010401060104090100040301000401010104010100040501000402010004010100
-040101010401010104010100040b01000402010004020100040101000402010004010100
-040101010401010004020100040101000407010104040100040401000401010004030101
-040401000404010004010100040201000401010004030101040301000401010004020100
-040601000405010104ff04740001040106010001040a0601000104010601040901000404
-010104000100040101000406010204030101040001000401010004000101040c01000403
-010204030103040201010400010004020102040201000407010104050100040401010404
-0101040201040403010104040101040401010404010104020100040701000405010104ff
-04740001040106010001040a060100010401060104090100040701000416010004040105
-042e01000406010004310100040801000406010004ff04740001040106010001040a0601
-000104010601040a010104010100040201000416010004370101044201010405010104ff
-04750001040106010001040a0601000104010601040f01020417010004ff04fc00010401
-06010001040a0601000104010601040a0101045c010104ff04bc0001040106010001040a
-0601000104010601040901000460010004ff04bb0001040106010001040a060100010401
-06010409010004030100042b01000418010204030102040301020404010004ff04bb0001
-040106010001040a06010001040106010409010004030100044401000402010004010100
-0402010004010100040201000403010004ff04bb0001040106010001040a060100010401
-060104090100040301000400010104030102040301020402010004000101040a01020403
-01020402010404020102040d010004050100040501000403010004ff04bb000104010601
-0001040a0601000104010601040901000403010104010100040101000402010004010100
-040201000401010104010100040801000402010004040100040601000401010004020100
-040c010004050100040501000403010004ff04bb0001040106010001040a060100010401
-060104070101040401000402010004010100040201000405010004010100040201000408
-010004080100040501000402010004020100040b010004040101040401010405010104ff
-04b90001040106010001040a060100010401060104090100040301000402010004010104
-04020103040101000402010004090102040501000404010004030104040a010004070100
-040501000403010004ff04bb0001040106010001040a0601000104010601040901000403
-0100040201000401010004050100040201000401010004020100040c0100040401000403
-010004040100040d010004080100040501000403010004ff04bb0001040106010001040a
-060100010401060104090100040301000402010004010100040201000401010004020100
-040101010401010004080100040201000404010004020100040501000402010004030101
-0402010004050100040201000401010004020100040301000405010104ff04b300010401
-06010001040a060100010401060104090100040301000402010004020102040301030401
-010004000101040a01020405010004020104040201020404010104020104040201020403
-0102040401000405010104ff04b30001040106010001040a060100010401060104090100
-041801000404010504200100041901000406010004ff04b30001040106010001040a0601
-000104010601040a01010416010004290101041801010405010104ff04b4000104010601
-0001040a06010001040106010423010004ff04ff04030001040106010001040a06010001
-04010601040a0101045c010104ff04bc0001040106010001040a06010001040106010409
-01000460010004ff04bb0001040106010001040a060100010401060104090100040c0100
-041101000416010004190100040401020404010004ff04bb0001040106010001040a0601
-00010401060104090100040c0100041101000430010104030100040201000403010004ff
-04bb0001040106010001040a060100010401060104090100040401020402010404020102
-040301020402010004010100040a01020403010204020104040201020409010004000100
-040701000403010004ff04bb0001040106010001040a0601000104010601040901000403
-01000402010004030100040301000402010004010100040201000401010004000100040a
-01000402010004040100040601000401010004020100040a0100040701000403010004ff
-04bb0001040106010001040a060100010401060104070101040401000407010004070100
-0401010004050101040b010004080100040501000402010004020100040a010004060100
-0405010104ff04b90001040106010001040a060100010401060104090100040401020404
-0100040401030401010004050101040c0102040501000404010004030104040a01000405
-01000405010004ff04bb0001040106010001040a06010001040106010409010004070100
-040301000403010004020100040101000405010004000100040e01000404010004030100
-04040100040e0100040401000406010004ff04bb0001040106010001040a060100010401
-060104090100040301000402010004030100040301000402010004010100040201000401
-010004010100040901000402010004040100040201000405010004020100040301010404
-010004030100040701000405010104ff04b30001040106010001040a0601000104010601
-040901000404010204050101040201030402010204020100040201000409010204050100
-0402010404020102040401010402010404010104040301000405010104ff04b300010401
-06010001040a0601000104010601040901000425010504200100041201000406010004ff
-04b30001040106010001040a0601000104010601040a0101044801010411010104050101
-04ff04b40001040106010001040a060100010401060104ff04ff04280001040106010001
-040a0601000104010601040a0101045c010104ff04bc0001040106010001040a06010001
-04010601040901000460010004ff04bb0001040106010001040a06010001040106010409
-0100041501000411010004060100041f0102040401010404010004ff04bb000104010601
-0001040a0601000104010601040901000415010004110100042601000402010004020100
-040101000403010004ff04bb0001040106010001040a0601000104010601040901000403
-010004000101040301020403010104000100040101000402010004020102040201040402
-010204030102040201000400010104030102040d010004020100040101000403010004ff
-04bb0001040106010001040a060100010401060104090100040301010401010004010100
-040201000401010004010101040101000402010004010100040201000403010004060100
-040201000402010004010101040101000401010004020100040c01000402010004010100
-0403010004ff04bb0001040106010001040a060100010401060104070101040401000405
-010004020100040101000402010004010100040201000401010004070100040601000402
-010004020100040101000402010004010100040e010104030100040101000404010104ff
-04b90001040106010001040a060100010401060104090100040301000405010404010100
-040201000401010004020100040101000407010004060100040201000402010004010100
-0402010004020102040d010004020100040101000403010004ff04bb0001040106010001
-040a06010001040106010409010004030100040501000405010004020100040101000402
-01000401010004070100040601000402010004020100040101000402010004050100040c
-010004020100040101000403010004ff04bb0001040106010001040a0601000104010601
-040901000403010004050100040201000401010004010101040101000401010104010100
-040201000403010004060100040201000402010004010100040201000401010004020100
-0403010104020100040201000402010004010100040301000405010104ff04b300010401
-06010001040a060100010401060104090100040301000406010204030101040001000402
-010104000100040201020405010104040100040301020402010004020100040201020404
-01010403010204040101040401000405010104ff04b30001040106010001040a06010001
-0401060104090100044c0100041201000406010004ff04b30001040106010001040a0601
-000104010601040a010104480101041101010405010104ff04b40001040106010001040a
-060100010401060104ff04ff04280001040106010001040a0601000104010601040a0101
-04890101049401010404010104f10001040106010001040a060100010401060104090100
-048a010004980100040501000403010304e80001040106010001040a0601000104010601
-040901000418010004300102040301020412010004060100041901000406010104090102
-040301020436010104030100041901020402010404010104040201020402010404030100
-040501000406010004e80001040106010001040a06010001040106010409010004180100
-0432010004050100041201000421010004050100040d0100040501000435010004050100
-041801000402010004010100040501000405010004020100040101000407010004050100
-0406010004e80001040106010001040a0601000104010601040901000404010104000100
-040201020402010004000101040201000400010104030102040301010400010004020102
-040a01020403010204050100040501000403010204030102040201040402010204030102
-0402010004000101040b0100040501000403010004020100040401000405010004030102
-040201000402010004020102040301020402010004000101040a01020404010004030104
-040201020402010004000101040901000405010004050100040901000401010004070100
-040501000406010004e80001040106010001040a06010001040106010409010004030100
-040101010401010004020100040101010401010004010101040101000401010004020100
-040101000401010104010100040201000408010004020100040101000402010004040100
-040501000402010004020100040101000402010004030100040601000402010004020100
-0401010104010100040a0100040301040401010004020100040401000405010004020100
-040201000401010004020100040101000402010004010100040201000401010104010100
-040801000402010004010104040301000403010004020100040101010401010004080100
-0405010304020103040601000401010304040100040501000406010004e8000104010601
-0001040a0601000104010601040701010404010004020100040501000401010004050100
-040201000405010004010100040201000401010004020100040801000405010004020100
-040401000405010004020100040201000401010004070100040601000402010004020100
-040101000402010004080101040601000403010004020100040401000405010004020100
-040501000400010004000100040101000402010004010100040201000401010004020100
-040c01000403010004050100040301000402010004010100040c01030406010004050100
-040301010406010004040101040401010404010004e80001040106010001040a06010001
-040106010409010004030100040201000402010304010100040501000402010004020103
-040101000402010004010104040801000405010004020100040401000405010004020104
-04010100040701000406010004020100040201000401010004020100040a010004050100
-040301000402010004040100040501000403010204020100040001000400010004010104
-0401010404010100040201000409010304030100040501000403010404010100040c0100
-040201000405010004050100040501000405010004030100040501000406010004e80001
-040106010001040a06010001040106010409010004030100040201000401010004020100
-0401010004050100040201000401010004020100040101000402010004010100040c0100
-040501000402010004040100040501000402010004050100040701000406010004020100
-040201000401010004020100040a01000405010004030100040201000404010004050100
-040601000401010004000100040001000401010004050100040501000402010004080100
-0402010004030100040501000403010004050100040c0100040201000401010004020100
-040101000402010004050100040101000402010004030100040501000406010004e80001
-040106010001040a06010001040106010409010004030100040101010401010004020100
-040101000405010104010100040101000402010004010100040101010401010004020100
-040801000402010004010100040201000404010004050100040201000402010004010100
-040201000403010004060100040201000402010004010100040201000403010104040100
-040501000403010004010101040401000405010004020100040201000401010004000100
-040001000401010004020100040101000402010004010101040101000408010004020100
-040301000405010004030100040201000401010004070101040201000402010004010100
-040201000401010004020100040101000402010004010100040201000403010004050100
-0406010004e80001040106010001040a0601000104010601040901000404010104000100
-0402010304010100040501000400010104030103040201010400010004020102040a0102
-040301020405010004050100040301020403010204050101040401000403010204020100
-040201000403010104040100040501000404010104000100040401000405010004030102
-040301000400010004030102040301020402010004000101040a01030403010004060101
-040201020402010004070101040301020403010204030102040301020403010204040100
-040501000406010004e80001040106010001040a06010001040106010409010004070100
-0421010004070105044a010004040100043b010004040105042701000427010004050100
-0403010304e80001040106010001040a0601000104010601040a01010401010004020100
-041d01000402010004560101040601010439010004300101042601010404010104f10001
-040106010001040a0601000104010601040f0102041f0102049c010004ff045400010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001040a060100010401
-060104ff04ff04280001040106010001040a060100010401060104ff04ff042800010401
-06010001040a060100010401060104ff04ff04280001040106010001060c000104010601
-04ff04ff04280001040106010000060d00010401060104ff04ff0428000104010601050e
-00010401060104ff04ff042800010401060100100401060104ff04ff0428000104010601
-0500000c060000010401060104ff04ff0428000104010601050000010408060105000001
-0401060104ff04ff04280001040106010501000104070601050000010401060104ff04ff
-04280001040106010501000104060601050100010401060104ff04ff0428000104010601
-0502000104050601050100010401060104ff04ff04280001040106010502000104040601
-050200010401060104ff04ff042800010401060105030001040306010502000104010601
-04ff04ff04280001040106010503000104020601050300010401060104ff04ff04280001
-040106010504000104010601050300010401060104ff04ff042800010401060105040001
-04000601050400010401060104ff04ff0428000104010601050500000602050400010401
-060104ff04ff0428000104010601050500000601050500010401060100ff00ff002a0401
-060105060601050500010401060000ff00ff002b04010601050606000506000104ff04ff
-04300601001004ff04ff04300600001104ff04ff04ff04ff04ff04ff04ff04ff04ff04ff
-04ff04ff04ff0498010204ff04ff044001000401010004ff04ff043f0100040201000402
-010204020100040001010403010204ff04ff042a01000402010004010100040201000401
-010104010100040101000402010004ff04ff042901000402010004010100040201000401
-010004020100040101000402010004ff04ff042901000402010004010100040201000401
-0100040201000401010404ff04ff04290100040201000401010004020100040101000402
-01000401010004ff04ff042d010004010100040201000402010004010100040201000401
-01000402010004ff04ff042901020404010204020100040201000402010204ff04ff04ff
-04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04ff04c1
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 73 377 347
-%%EOF
diff --git a/lib/appmon/doc/src/warning.gif b/lib/appmon/doc/src/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/lib/appmon/doc/src/warning.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/info b/lib/appmon/info
deleted file mode 100644
index c33a50d106..0000000000
--- a/lib/appmon/info
+++ /dev/null
@@ -1,5 +0,0 @@
-group: tools
-short: A utility used to supervise Applications executing on several
-short: Erlang nodes
-
-
diff --git a/lib/appmon/priv/Makefile b/lib/appmon/priv/Makefile
deleted file mode 100644
index 356fe9b842..0000000000
--- a/lib/appmon/priv/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-include ../vsn.mk
-VSN = $(APPMON_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/appmon-$(VSN)
-
-#
-# Macros
-#
-HELP_FILES = \
- appmon_help.txt
-
-TOOLBAR_FILES = \
- appmon.tool \
- appmon.gif \
- start_info.html \
- main_frame.html \
- info_frames.html \
- blank.html
-
-#
-# Rules
-#
-
-debug opt:
-
-docs:
-
-clean:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/priv"
- $(INSTALL_DATA) $(HELP_FILES) $(TOOLBAR_FILES) "$(RELSYSDIR)/priv"
-
-release_docs_spec:
-
-FORCE:
diff --git a/lib/appmon/priv/appmon.gif b/lib/appmon/priv/appmon.gif
deleted file mode 100644
index 583fcb8311..0000000000
--- a/lib/appmon/priv/appmon.gif
+++ /dev/null
Binary files differ
diff --git a/lib/appmon/priv/appmon.tool b/lib/appmon/priv/appmon.tool
deleted file mode 100644
index 93a469c6a4..0000000000
--- a/lib/appmon/priv/appmon.tool
+++ /dev/null
@@ -1,24 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-{version,"1.2"}.
-[{config_func,{appmon_web,configData,[]}},
-{tool,"Appmon"},
- {start,{appmon,start,[]}},
- {icon,"appmon.gif"},
- {message,"Application Monitor"},
- {html,"../doc/html/index.html"}].
diff --git a/lib/appmon/priv/appmon_help.txt b/lib/appmon/priv/appmon_help.txt
deleted file mode 100644
index f1685be4d8..0000000000
--- a/lib/appmon/priv/appmon_help.txt
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
- Help for the application monitor system
- ---------------------------------------
-
-
-
-
-
- The monitor system has two types of windows, the node window
- which opens when appmon:start() is evaluated, and the
- application window which opens when an application in the node
- window is clicked on.
-
- All nodes that are known to appmon is shown in the node
- window, normally this is all Erlang nodes visible with the
- nodes() command.
-
-
-The Node window
----------------
-
- The node window monitors nodes. At the top there is a menubar
- and below that, each known node is shown separated with a thin
- line from the others. A node is represented by its name as
- root of its application tree. The node name pictures the
- application controller on that node. The name itself is a menu
- where operations on the node can be performed (rebooting it
- for instance). To the far left is a load meter (like those on
- a tape deck) which measures the current load at the
- node. Below the node name (the application controller) is a
- tree with applications, clicking on these applications starts
- the application monitor.
-
-
- The top window menubar
- ----------------------
-
- File:Quit - Stop the monitor.
-
- Options:
- Load: time - Load is calculated (roughly) as processor time.
- Load: queue - Load is calculated as the length of the ready
- queue.
- Load: prog - A progressive scale is used for load values.
- Load: linear - A linear scale is used for load values.
-
- Help - Prints this message.
-
-
- The application controller menu
- -------------------------------
- Reboot - Reboot the node
- Restart - Restart the node
- Stop - Stop the node
-
-
- The load meter
- --------------
-
- Load can be measured as processor time / elapsed time or as
- the length of the runtime queue, depending on the setting in
- the Options menu.
-
-
-The Application window
-----------------------
-
- The application window monitors an application. It will
- automaticly update the window every other second or so if
- there are any changes in the process tree. At the top there is
- a menubar followed by a toolbar and then the application
- tree. Application trees come in two flavours: supervision
- view, where a strict supervision tree is shown, and process
- view, where all linked processes in the application is shown.
-
-
- The application window menubar
- ------------------------------
-
- File:Quit - Quit the application window.
-
- Options:Refresh - Update process information and refresh
- screen.
-
- Options:Sup. view
- - Show strict supervision tree only.
-
- Options:Proc. view
- - Show all linked processes.
-
- Help - Prints this message.
-
-
- The application window toolbar
- ------------------------------
-
- The application toolbar controls the actions of the mouse
- pointer. Clicking on a process in the application window have
- different meaning depending on which tool is selected. The
- procedure is to first press a button (T for trace for example)
- and then click on the process that should be traced.
-
- Info - Process information is printed in the shell. This mode
- is default and automaticly returned to after a mouse click.
-
- Send - Send a message to the clicked process. A window will
- pop up where the message can be written (and you can also
- change the destination pid). Double clicking on this button
- pops up a window where pid and message can be filled in.
-
- Trace - Toggle trace on/off on the process. Note that not all
- processes respond to the sys:trace call.
-
- Kill - Send a non-trappable exit signal to the process.
-
-
-Technical Detail
-----------------
-
- Files and distribution
- ----------------------
-
- Appmon is a distributed program but all graphics is handled on
- one node (the one it is started on) so GS need only to be
- loaded on that single node. All real monitoring is done in a
- single module (appmon_info) being run on each node which acts
- as an information centre. The various windows (node and
- application) then subscribe for information.
-
- In summary: only the appmon_info module must be accessible by
- the clients, the rest of the appmon files are only needed at
- the server.
-
- Trouble shooting
- ----------------
-
- Q. Why doesn't all my nodes show up in the node window?
-
- A 1. Are the nodes visible with the nodes() command in the
- shell? If not you must do net:ping(NodeName) to add nodes to
- the Erlang distribution.
-
- A 2. Is the appmin_info module loadable at the missing
- node(s)?
-
- Q. Why doesn't the application window show my application
- supervision structure?
-
- A. Does your application have a real application master? It is
- absolutely necessary that your top process behaves as a
- supervisor should (a program is not supervised just because it
- is started with application:start).
diff --git a/lib/appmon/priv/blank.html b/lib/appmon/priv/blank.html
deleted file mode 100644
index 44e86908a0..0000000000
--- a/lib/appmon/priv/blank.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<HTML>
-<HEAD></HEAD>
-<BODY BGCOLOR="#FFFFFF">
-&nbsp;
-</BODY>
-</HTML> \ No newline at end of file
diff --git a/lib/appmon/priv/info_frames.html b/lib/appmon/priv/info_frames.html
deleted file mode 100644
index 9320364883..0000000000
--- a/lib/appmon/priv/info_frames.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>WebAppmon </TITLE>
-</HEAD>
-<FRAMESET ROWS="85%,15%" BORDER="0">
-<FRAME NAME="main" SRC="./start_info.html">
-<FRAME NAME="proc_data" SRC="./blank.html">
-</FRAMESET>
-</HTML> \ No newline at end of file
diff --git a/lib/appmon/priv/main_frame.html b/lib/appmon/priv/main_frame.html
deleted file mode 100644
index 57e540a2c1..0000000000
--- a/lib/appmon/priv/main_frame.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>WebAppmon </TITLE>
-</HEAD>
-<FRAMESET COLS="15%,85%" >
- <FRAME NAME="left" SRC="../../erl/appmon_web/node_info">
- <FRAME NAME="base_frames" SRC="./info_frames.html">
-</FRAMESET>
-</HTML> \ No newline at end of file
diff --git a/lib/appmon/priv/start_info.html b/lib/appmon/priv/start_info.html
deleted file mode 100644
index 580319beb1..0000000000
--- a/lib/appmon/priv/start_info.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<HTML>
-<HEAD>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF">
-<TABLE WIDTH=100% HEIGHT=100%>
-<TR VALIGN="middle">
-<TD ALIGN="center">
-
-<TABLE WIDTH="60%">
-<TR>
-<TD ALIGN="center">
-<FONT SIZE=6>Welcome to the Web based User Interface to Appmon
-</FONT></TD>
-</TR>
-
-<TR>
-<TD><BR><BR><BR><BR>
-</TD>
-</TR>
-
-<TR>
-<TD ALIGN="center">&nbsp;
-</TD>
-</TR>
-</TABLE>
-
-</TD>
-</TR>
-</TABLE>
-</BODY>
-</HTML> \ No newline at end of file
diff --git a/lib/appmon/src/Makefile b/lib/appmon/src/Makefile
deleted file mode 100644
index c1620bc37a..0000000000
--- a/lib/appmon/src/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2013. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../vsn.mk
-VSN=$(APPMON_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/appmon-$(VSN)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-
-MODULES= \
- appmon \
- appmon_a \
- appmon_dg \
- appmon_place \
- appmon_txt \
- appmon_lb \
- process_info \
- appmon_web
-
-# appmon_info \ Moved to runtime tools where it belongs
-
-
-HRL_FILES= appmon_dg.hrl
-
-ERL_FILES= $(MODULES:%=%.erl)
-
-TARGET_FILES= $(MODULES:%=../ebin/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
-
-APP_FILE= appmon.app
-APPUP_FILE= appmon.appup
-
-APP_SRC= $(APP_FILE).src
-APPUP_SRC= $(APPUP_FILE).src
-
-APP_TARGET= ../ebin/$(APP_FILE)
-APPUP_TARGET= ../ebin/$(APPUP_FILE)
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-debug opt: $(TARGET_FILES)
-
-clean:
- rm -f $(TARGET_FILES)
- rm -f core
-
-docs:
-
-# ----------------------------------------------------
-# Special Build Targets
-# ----------------------------------------------------
-
-$(APP_TARGET): $(APP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
-
-$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
-
-release_docs_spec:
-
diff --git a/lib/appmon/src/appmon.app.src b/lib/appmon/src/appmon.app.src
deleted file mode 100644
index aa6a08772e..0000000000
--- a/lib/appmon/src/appmon.app.src
+++ /dev/null
@@ -1,24 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-{application, appmon,
- [{description, "DEVTOOLS CXC 138 16"},
- {vsn, "%VSN%"},
- {modules, [appmon, appmon_a, appmon_dg, %% appmon_info, moved to runtime tools
- appmon_lb, appmon_place, appmon_txt,process_info,appmon_web]},
- {registered,[appmon, appmon_info, appmon_txt,webappmon_server,proc_info]},
- {applications, [kernel, stdlib]}]}.
diff --git a/lib/appmon/src/appmon.appup.src b/lib/appmon/src/appmon.appup.src
deleted file mode 100644
index 0d918b6081..0000000000
--- a/lib/appmon/src/appmon.appup.src
+++ /dev/null
@@ -1,18 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-{"%VSN%",[],[]}.
diff --git a/lib/appmon/src/appmon.erl b/lib/appmon/src/appmon.erl
deleted file mode 100644
index ba98a24400..0000000000
--- a/lib/appmon/src/appmon.erl
+++ /dev/null
@@ -1,1081 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(appmon).
--behaviour(gen_server).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,1}}]).
-
-%%%---------------------------------------------------------------------
-%%% Appmon main module.
-%%% Creates the main window and receives load and application
-%%% information from all connected nodes.
-%%%---------------------------------------------------------------------
-
-%% External exports
--export([start/0, stop/0]).
-
-%% gen_server callbacks
--export([init/1, handle_cast/2, handle_info/2, terminate/2]).
--export([handle_call/3, code_change/3]). % not used
-
-%% Canvas button data
--record(canvasbutton, {text, ul, ll, rect, x, y, w, h}).
-
-%% Options - all the fields are GS radio buttons
--record(options, {single, many, time, queue, prog, linear}).
-
-%% Main window data
--record(win, {name, % atom() Monitored node
- window, % gsobj()
- wwindow, % int() Window width
- hwindow, % int() Window height
- options, % #options{}
- canvas, % gsobj()
- wcanvas, % int() Canvas width
- hcanvas, % int() Canvas height
- l1, l2, % gsobj() Canvas lines
- leds, % [gsobj()] Load meter
- nodelabel, % {gsobj(),gsobj()}
- appobjs=[], % [gsobj()] Buttons etc.
- nodemenu}). % gsobj() Node menu
-
-%% Node data
--record(mnode, {name, % atom() Node name
- status, % alive | dead
- pid, % pid()
- apps, % [{Pid,App,Descr}]
- load}). % {Old, New}
-
-%% Internal state data
--record(state, {gs, % pid()
- wins=[], % [#win()] GUIs
- window_mode, % single | many
- load_mode1, % time | queue
- load_mode2, % prog | linear
- lbpid, % pid()
- mnodes=[]}). % [#mnode{}]
-
-%%%---------------------------------------------------------------------
-%%% External exports
-%%%---------------------------------------------------------------------
-
-start() ->
- gen_server:start({local, appmon}, ?MODULE, [], []).
-
-stop() ->
- gen_server:cast(appmon, stop).
-
-
-%%%---------------------------------------------------------------------
-%%% gen_server callbacks
-%%%---------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% Func: init/1
-%% Returns: {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%%----------------------------------------------------------------------
-init([]) ->
- process_flag(trap_exit, true),
-
- %% Subscribe to {nodeup,Node} and {nodedown,Node} messages
- net_kernel:monitor_nodes(true),
-
- LbPid = appmon_lb:start(self ()),
-
- %% Check which remote nodes have appmon code available (OTP-4887)
- NodesOk = lists:filter(fun(Node) -> check_node(Node) end, nodes()),
- Nodes = [node()|NodesOk],
-
- %% Start monitoring the existing nodes
- MNodes = mk_mnodes(Nodes, LbPid),
-
- %% Draw the main window
- GS = gs:start([{kernel,true}]),
- GUI = draw_win(GS, node()),
-
- %% Update the Nodes menu with all known nodes
- lists:foreach(fun(Node) ->
- display_addnode(GUI, Node)
- end,
- Nodes),
-
- %% Mark the default options as selected in the Options menu
- display_setopt(GUI, single),
- display_setopt(GUI, time),
- display_setopt(GUI, prog),
-
- {ok, #state{gs=GS, wins=[GUI],
- window_mode=single, load_mode1=time, load_mode2=prog,
- lbpid=LbPid, mnodes=MNodes}}.
-
-check_node(Node) ->
- case rpc:call(Node, code, which, [appmon]) of
- File when is_list(File) ->
- true;
- _ -> % non_existing (| cover_compiled)
- false
- end.
-
-%%----------------------------------------------------------------------
-%% Func: handle_call/3
-%% Returns: {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} | (terminate/2 is called)
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-handle_call(norequest, _From, State) ->
- {reply, null, State}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_cast/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-handle_cast(stop, State) ->
- {stop, normal, State}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_info/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-%% Load information from a node
-handle_info({delivery, _Serv, load, Node, Load}, State) ->
-
- %% Update node information
- MNode = get_mnode(Node, State#state.mnodes),
- MNode1 = MNode#mnode{load=Load},
- MNodes = replace_mnode(Node, MNode1, State#state.mnodes),
-
- %% If Node is currently displayed, update graphics
- case get_win(Node, State#state.wins) of
- {ok, GUI} ->
- display_load(GUI, Load);
- false ->
- ignore
- end,
-
- {noreply, State#state{mnodes=MNodes}};
-
-%% Application information from a node
-handle_info({delivery, _Serv, app_ctrl, Node, Apps}, State) ->
-
- %% Update node information
- MNode = get_mnode(Node, State#state.mnodes),
- MNode1 = MNode#mnode{apps=Apps},
- MNodes = replace_mnode(Node, MNode1, State#state.mnodes),
-
- %% If Node is currently displayed, update graphics
- Wins = case get_win(Node, State#state.wins) of
- {ok, GUI} ->
- draw_clear(GUI),
- GUI1 = draw_apps(GUI, Apps),
- replace_win(Node, GUI1, State#state.wins);
- false ->
- State#state.wins
- end,
-
- appmon_lb:add_apps (State#state.lbpid, Apps, Node),
- {noreply, State#state{wins=Wins, mnodes=MNodes}};
-
-handle_info({nodeup, Node}, State) ->
-
- %% First, make sure appmon code is available at remode node,
- %% or the node should be ignored (OTP-3591)
- case check_node(Node) of
- true ->
-
- %% If this is a previously unknown node, update window's
- %% 'Nodes' menu
- case get_mnode(Node, State#state.mnodes) of
- false ->
- display_addnode(State#state.wins, Node);
- _OldMnode ->
- ignore
- end,
-
- %% Update node information (=> state is automatically
- %% changed to 'alive')
- MNode = mk_mnode(Node, State#state.lbpid),
- MNodes = replace_mnode(Node, MNode, State#state.mnodes),
-
- %% If Node is currently displayed, update graphics
- case get_win(Node, State#state.wins) of
- {ok, GUI} ->
- display_nodeup(GUI, Node);
- false ->
- ignore
- end,
-
- appmon_lb:update_status(State#state.lbpid, Node, alive),
- {noreply, State#state{mnodes=MNodes}};
-
- false ->
- {noreply, State}
- end;
-
-handle_info({nodedown, Node}, State) ->
-
- %% If this is a previously unknown node, ignore the message.
- %% (The situation occurs when failing to connect to another node).
- %% Otherwise, update the node information.
- case get_mnode(Node, State#state.mnodes) of
- false ->
- {noreply, State};
- MNode ->
- MNode1 = MNode#mnode{status=dead},
- MNodes = replace_mnode(Node, MNode1, State#state.mnodes),
-
- %% If Node is currently displayed, update graphics
- Wins = case get_win(Node, State#state.wins) of
- {ok, GUI} ->
- display_nodedown(GUI),
- GUI1 = draw_clear(GUI),
- replace_win(Node, GUI1, State#state.wins);
- false ->
- State#state.wins
- end,
-
- appmon_lb:remove_node(State#state.lbpid, Node),
- {noreply, State#state{wins=Wins, mnodes=MNodes}}
- end;
-
-%% Application 'button' events
-handle_info({gs, _Obj, buttonpress, Data, _Arg}, State) ->
- {canvasbutton, CBtn, _App} = Data,
- press(CBtn),
- {noreply, State};
-handle_info({gs, _Obj, buttonrelease, Data, [_,X,Y|_]}, State) ->
- {canvasbutton, CBtn, {application, App, Node}} = Data,
- release(CBtn),
-
- %% Check that mouse button was released over the button!
- L = CBtn#canvasbutton.x, R = L + CBtn#canvasbutton.w,
- T = CBtn#canvasbutton.y, B = T + CBtn#canvasbutton.h,
- if
- X>L, X<R, Y>T, Y<B ->
- MNode = get_mnode(Node, State#state.mnodes),
- {value, {Pid, _App, _Descr}} =
- lists:keysearch(App, 2, MNode#mnode.apps),
- appmon_a:start(Node, App, Pid);
- true ->
- ignore
- end,
- {noreply, State};
-
-handle_info({gs, _Button, click, Data, _Arg}, State) ->
- ThisNode = node(),
- case Data of
-
- %% File menu item
- listbox ->
- appmon_lb:open_win(State#state.lbpid,
- parse_nodes(State#state.mnodes)),
- {noreply, State};
- {close, WinObj} ->
- {ok, GUI} = get_win2(WinObj, State#state.wins),
- gs:destroy(WinObj),
-
- %% Terminate if this was the only open window
- case remove_win(GUI#win.name, State#state.wins) of
- [] ->
- {stop, normal, State};
- Wins ->
- {noreply, State#state{wins=Wins}}
- end;
- exit ->
- {stop, normal, State};
-
- %% Actions menu item
- {action, Action, WinObj} ->
- {ok, GUI} = get_win2(WinObj, State#state.wins),
- Node = GUI#win.name,
-
- if
- Node==ThisNode ->
- case Action of
- ping ->
- %% Ignore - makes no sense to ping yourself
- ignore;
- _ -> % reboot | restart | stop
- apply(init, Action, [])
- end;
-
- Node/=ThisNode ->
- case Action of
- ping ->
- net_adm:ping(Node);
- _ -> % reboot | restart | stop
- rpc:cast(Node, init, Action, [])
- end
- end,
- {noreply, State};
-
- %% Options menu item
- {window_mode, Mode} ->
-
- %% Update windows so they all show the same options
- lists:foreach(fun(GUI) ->
- display_setopt(GUI, Mode)
- end,
- State#state.wins),
- {noreply, State#state{window_mode=Mode}};
-
- {option, Tag, Option} ->
-
- %% Update windows so they all show the same options
- lists:foreach(fun(GUI) ->
- display_setopt(GUI, Tag)
- end,
- State#state.wins),
-
- %% Update all appmon_info processes about which kind of
- %% load data is desired
- lists:foreach(fun(MNode) ->
- appmon_info:load(MNode#mnode.pid,
- MNode#mnode.name,
- true,
- Option)
- end,
- State#state.mnodes),
-
- if
- Tag==time; Tag==queue ->
- {noreply, State#state{load_mode1=Tag}};
- Tag==prog; Tag==linear ->
- {noreply, State#state{load_mode2=Tag}}
- end;
-
- %% Nodes menu item
- {node, Node, WinObj} ->
-
- %% Check first if this window is already displayed
- case get_win(Node, State#state.wins) of
- {ok, GUI} ->
-
- %% Node is already displayed, raise its window
- gs:config(GUI#win.window, raise),
-
- {noreply, State};
-
- %% Node is not displayed
- false ->
-
- %% Redraw existing window or create a new window
- %% depending on window mode
- case State#state.window_mode of
-
- single ->
- {ok, GUI} =
- get_win2(WinObj, State#state.wins),
-
- %% Clear window and correct the node name
- draw_clear(GUI),
- GUI1 = draw_nodename(GUI, Node),
-
- %% Update window with the correct node name
- %% and the applications running at the node
- MNode = get_mnode(Node, State#state.mnodes),
- GUI2 = case MNode#mnode.status of
- dead ->
- display_nodedown(GUI1),
- GUI1;
- alive ->
- display_nodeup(GUI1, Node),
- draw_apps(GUI1,
- MNode#mnode.apps)
- end,
- Wins = replace_win(GUI#win.name, GUI2,
- State#state.wins),
-
- {noreply, State#state{wins=Wins}};
-
- many ->
- GUI = draw_win(State#state.gs, Node),
-
- %% Update Nodes menu with all known nodes -
- %% use MNodes to get them in the right order
- lists:foreach(fun(MNode) ->
- Name =
- MNode#mnode.name,
- display_addnode(GUI,
- Name)
- end,
- State#state.mnodes),
-
- %% Mark selected options in the Options menu
- display_setopt(GUI, many),
- display_setopt(GUI, State#state.load_mode1),
- display_setopt(GUI, State#state.load_mode2),
-
- %% Add the applications running at the node
- MNode = get_mnode(Node, State#state.mnodes),
-
- GUI1 = case MNode#mnode.status of
- dead ->
- display_nodedown(GUI),
- GUI;
- alive ->
- display_nodeup(GUI, Node),
- draw_apps(GUI,
- MNode#mnode.apps)
- end,
- Wins = [GUI1|State#state.wins],
-
- {noreply, State#state{wins=Wins}}
- end
- end;
-
- %% Help menu = Help button
- help ->
- HelpFile = filename:join([code:lib_dir(appmon),
- "doc", "html", "part_frame.html"]),
- case State#state.wins of
- [Win] ->
- tool_utils:open_help(Win#win.window, HelpFile);
- _ ->
- tool_utils:open_help(State#state.gs, HelpFile)
- end,
- {noreply, State};
-
- _Other ->
- {noreply, State}
- end;
-handle_info({gs, WinObj, configure, _, [WWindow, HWindow|_]}, State) ->
- {ok, GUI} = get_win2(WinObj, State#state.wins),
- GUI1 = draw_resize(GUI, WWindow, HWindow),
- display_scrollbar(GUI1),
- Wins = replace_win(GUI#win.name, GUI1, State#state.wins),
- {noreply, State#state{wins=Wins}};
-handle_info({gs, WinObj, destroy, _, _}, State) -> % OTP-1179
- {ok, GUI} = get_win2(WinObj, State#state.wins),
-
- %% Terminate if this was the only open window
- case remove_win(GUI#win.name, State#state.wins) of
- [] ->
- {stop, normal, State};
- Wins ->
- {noreply, State#state{wins=Wins}}
- end;
-
-handle_info(stop, State) ->
- {stop, normal, State};
-handle_info({'EXIT', Pid, Reason}, State) ->
- case Reason of
- shutdown ->
- %% Appmon is being asked to shut down, eg during reboot
- {stop, Reason, State};
- _ ->
- case State#state.gs of
-
- %% GS exited, kill appmon
- {0, Pid} ->
- {stop, normal, State};
-
- _ ->
- {noreply, State}
- end
- end;
-handle_info(_Info, State) ->
- {noreply, State}.
-
-%%----------------------------------------------------------------------
-%% Func: terminate/2
-%% Purpose: Shutdown the server
-%% Returns: any (ignored by gen_server)
-%%----------------------------------------------------------------------
-terminate(_Reason, State) ->
- bcast(State#state.mnodes, {kill}),
- appmon_lb:stop(State#state.lbpid),
- ok.
-
-%%----------------------------------------------------------------------
-%% Func: code_change/3
-%% Purpose: Convert process state when code is changed
-%% Returns: {ok, NewState}
-%%----------------------------------------------------------------------
-code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-
-%%%---------------------------------------------------------------------
-%%% Internal functions
-%%%---------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% MNode manipulating functions
-%%----------------------------------------------------------------------
-
-%% mk_mnodes(Nodes, LbPid) -> MNodes
-%% Nodes -> [atom()]
-%% LbPid -> pid()
-%% MNodes -> [#mnode{}]
-mk_mnodes([Node|Nodes], LbPid) ->
- [mk_mnode(Node, LbPid) | mk_mnodes(Nodes, LbPid)];
-mk_mnodes([], _LbPid) ->
- [].
-
-mk_mnode(Node, LbPid) ->
-
- %% Create an appmon process at the node
- {ok, Pid} = appmon_info:start_link(Node, self(), []),
-
- appmon_lb:add_node(LbPid, Node),
- appmon_info:load(Pid, Node, true, [{timeout,1000}]),
- appmon_info:app_ctrl(Pid, Node, true, []),
-
- #mnode{name=Node, status=alive, pid=Pid}.
-
-%% get_mnode(Node, MNodes) -> MNode | false
-%% Node -> atom()
-%% MNodes -> [#mnode{}]
-%% MNode -> #mnode{}
-get_mnode(Node, MNodes) ->
- case lists:keysearch(Node, #mnode.name, MNodes) of
- {value, MNode} ->
- MNode;
- false ->
- false
- end.
-
-%% replace_mnode(Node, MNode, MNodes1) -> Mnodes2
-%% Node -> atom()
-%% MNode -> #mnode{}
-%% MNodes1 -> MNodes2 -> [#mnode{}]
-%% Replaces, or adds if previously not included, the mnode with name
-%% Node in MNodes1 with MNode.
-replace_mnode(Node, MNode, [#mnode{name=Node} | MNodes]) ->
- [MNode | MNodes];
-replace_mnode(Node, MNode, [MNode2 | MNodes]) ->
- [MNode2 | replace_mnode(Node, MNode, MNodes)];
-replace_mnode(_Node, MNode, []) ->
- [MNode].
-
-
-%%----------------------------------------------------------------------
-%% GUI list manipulating functions
-%%----------------------------------------------------------------------
-
-%% get_win(Node, Wins) -> Win
-%% Node -> atom()
-%% Wins -> [#win{}]
-%% Win -> #win{}
-get_win(Node, Wins) ->
- case lists:keysearch(Node, #win.name, Wins) of
- {value, Win} ->
- {ok, Win};
- false ->
- false
- end.
-
-%% get_win2(WinObj, Wins) -> Win
-%% Window -> gsobj()
-%% Wins -> [#win{}]
-%% Win -> #win{}
-get_win2(WinObj, Wins) ->
- case lists:keysearch(WinObj, #win.window, Wins) of
- {value, Win} ->
- {ok, Win};
- false ->
- false
- end.
-
-%% replace_win(Node, Win, Wins) -> Wins2
-%% Node -> atom()
-%% Win -> #win{}
-%% Wins -> Wins2 -> [#win{}]
-replace_win(Node, Win, Wins) ->
- lists:keyreplace(Node, #win.name, Wins, Win).
-
-%% remove_win(Node, Wins) -> Wins2
-%% Node -> atom()
-%% Wins -> Wins2 -> [#win{}]
-remove_win(Node, Wins) ->
- lists:keydelete(Node, #win.name, Wins).
-
-
-
-
-%%----------------------------------------------------------------------
-%% GUI manipulating functions
-%%----------------------------------------------------------------------
--define(PAD, 10). % Pad between objects
--define(PAD2, 4*?PAD). % Pad betw. node lbl and app
-
--define(hMENUBAR, 25). % Note: Hardwired in Tcl/Tk
-
--define(xNODELBL, 60). % Node label
--define(yNODELBL, 35).
--define(hNODELBL, 20).
-
--define(xMETER, 5). % Meter
--define(yMETER, ?yNODELBL).
--define(wMETER, 20).
--define(hMETER, ?hNODELBL + ?PAD + ?PAD2 + ?hBTN).
--define(LEDCOUNT, 16).
-
--define(xBTN, ?xNODELBL). % Application buttons
--define(yBTN, ?yNODELBL + ?hNODELBL + ?PAD + ?PAD2).
--define(wBTN, 70). % min width
--define(hBTN, 20).
-
--define(wCANVAS, 470 + ?wMETER + 3*?PAD). % Canvas
--define(hCANVAS, ?yNODELBL + ?hNODELBL + ?PAD + ?PAD2 + ?hBTN + 2*?PAD).
-
--define(wWIN, ?wCANVAS). % Window
--define(hWIN, ?hMENUBAR + ?hCANVAS).
-
-%%--Main window---------------------------------------------------------
-
-draw_win(GS, Node) ->
-
- %% Main window
- NodeStr = atom_to_list(Node),
- Win = gs:create(window, GS, [{title,
- "APPMON: Overview on " ++ NodeStr},
- {width, ?wWIN}, {height, ?hWIN},
- {configure, true}]),
- Canvas = gs:create(canvas, Win, [{x, 0}, {y, ?hMENUBAR},
- {width, ?wCANVAS},
- {height, ?hCANVAS}]),
- L1 = gs:create(line, Canvas, [{coords,
- [{0,?yNODELBL-?PAD},
- {?wCANVAS,?yNODELBL-?PAD}]}]),
- L2 = gs:create(line, Canvas, [{coords,
- [{0,?hCANVAS-?PAD},
- {?wCANVAS,?hCANVAS-?PAD}]}]),
-
- %% Standard buttons
- MenuBar = gs:create(menubar, Win, [{height, ?hMENUBAR}]),
-
- FileMenuBtn = gs:create(menubutton, MenuBar,
- [{label, {text,"File"}}]),
- FileMenu = gs:create(menu, FileMenuBtn, []),
- gs:create(menuitem, FileMenu, [{label, {text,"Show List Box..."}},
- {data, listbox}]),
- gs:create(menuitem, FileMenu, [{label, {text, "Close"}},
- {data, {close, Win}}]),
- gs:create(menuitem, FileMenu, [{itemtype, separator}]),
- gs:create(menuitem, FileMenu, [{label, {text, "Exit"}},
- {data, exit}]),
-
- ActionMenuBtn = gs:create(menubutton, MenuBar,
- [{label,{text,"Actions"}}]),
- ActionMenu = gs:create(menu, ActionMenuBtn, []),
- gs:create(menuitem, ActionMenu, [{label, {text,"Reboot"}},
- {data, {action, reboot, Win}}]),
- gs:create(menuitem, ActionMenu, [{label, {text,"Restart"}},
- {data, {action, restart, Win}}]),
- gs:create(menuitem, ActionMenu, [{label, {text,"Stop"}},
- {data, {action, stop, Win}}]),
- gs:create(menuitem, ActionMenu, [{label, {text,"Ping"}},
- {data, {action, ping, Win}}]),
-
- OptMenuBtn = gs:create(menubutton, MenuBar,
- [{label, {text,"Options"}}]),
- OptMenu = gs:create(menu, OptMenuBtn, []),
- G0 = now(), % Group identity unique per window!
- SMI = gs:create(menuitem, OptMenu, [{label, {text,"One window"}},
- {itemtype, radio}, {group, G0},
- {data, {window_mode, single}}]),
- MMI = gs:create(menuitem, OptMenu, [{label, {text,"Many windows"}},
- {itemtype, radio}, {group, G0},
- {data, {window_mode, many}}]),
- gs:create(menuitem, OptMenu, [{itemtype, separator}]),
- G1 = now(),
- TMI = gs:create(menuitem, OptMenu, [{label, {text,"Load: time"}},
- {itemtype, radio}, {group, G1},
- {data,
- {option, time,
- [{load_method,time}]}}]),
- QMI = gs:create(menuitem, OptMenu, [{label, {text,"Load: queue"}},
- {itemtype, radio}, {group, G1},
- {data,
- {option, queue,
- [{load_method,queue}]}}]),
- G2 = now(),
- PMI = gs:create(menuitem, OptMenu,
- [{label, {text,"Load: progressive"}},
- {itemtype, radio}, {group, G2},
- {data, {option, prog, [{load_scale,prog}]}}]),
- LMI = gs:create(menuitem, OptMenu, [{label, {text,"Load: linear"}},
- {itemtype, radio}, {group, G2},
- {data,
- {option, linear,
- [{load_scale,linear}]}}]),
-
- NodeMenuBtn = gs:create(menubutton, MenuBar,
- [{label, {text,"Nodes"}}]),
- NodeMenu = gs:create(menu, NodeMenuBtn, []),
-
- HelpMenuBtn = gs:create(menubutton, MenuBar,
- [{label, {text,"Help"}}, {side, right}]),
- HelpMenu = gs:create(menu, HelpMenuBtn, []),
- gs:create(menuitem, HelpMenu, [{label, {text,"Help"}},
- {data, help}]),
-
- %% Meter
- HLed = trunc((?hMETER)/(?LEDCOUNT)),
- Leds = draw_leds(?LEDCOUNT, Canvas, ?yMETER, HLed, []),
- leds_down(Leds, ?LEDCOUNT, 0),
- gs:create(text, Canvas, [{coords,
- [{?xMETER, ?yMETER+HLed*?LEDCOUNT}]},
- {anchor, nw},
- {font, {screen,8}},
- {text, "Load"}]),
- gs:create(text, Canvas, [{coords, [{?xMETER+?wMETER, ?yMETER}]},
- {anchor, nw},
- {font, {screen,8}},
- {text, "Hi"}]),
- gs:create(text, Canvas, [{coords, [{?xMETER+?wMETER,
- ?yMETER+HLed*?LEDCOUNT}]},
- {anchor, w},
- {font, {screen,8}},
- {text, "Lo"}]),
-
- %% Node label
- WNodeLbl = 8*length(NodeStr)+10,
- NLRect = gs:create(rectangle, Canvas,
- [{coords, [{?xNODELBL,?yNODELBL},
- {?xNODELBL+WNodeLbl,
- ?yNODELBL+?hNODELBL}]},
- {fill, black}]),
- Xc = ?xNODELBL + round(WNodeLbl/2),
- Yc = ?yNODELBL + round(?hNODELBL/2),
- NLText = gs:create(text, Canvas, [{text, NodeStr},
- {fg, {250,235,215}},
- {coords, [{Xc,Yc}]},
- {anchor, c}]),
- NodeLbl = {NLRect, NLText},
-
- gs:config(Win, {map, true}),
- #win{name=Node,
- window=Win, wwindow=?wWIN, hwindow=?hCANVAS,
- options=#options{single=SMI, many=MMI,
- time=TMI, queue=QMI, prog=PMI, linear=LMI},
- canvas=Canvas, wcanvas=?wCANVAS, hcanvas=?hCANVAS,
- l1=L1, l2=L2, leds=Leds, nodelabel=NodeLbl, nodemenu=NodeMenu}.
-
-draw_leds(N, Canvas, Y, HLed, Leds) when N>0 ->
- Led = gs:create(rectangle, Canvas,
- [{coords,
- [{?xMETER,Y}, {?xMETER+?wMETER,Y+HLed}]}]),
- draw_leds(N-1, Canvas, Y+HLed, HLed, [Led | Leds]);
-draw_leds(0, _Canvas, _Y, _HLed, Leds) ->
- Leds.
-
-%%--Draw functions------------------------------------------------------
-%% Functions that modify the GUI and its data (win{})
-
-%% Display the node name in the window title
-%% (The name in the node label is changed by display_nodeup|nodedown)
-%% Used when a changing the node to display
-draw_nodename(GUI, Node) ->
- NodeStr = atom_to_list(Node),
- gs:config(GUI#win.window,
- {title, "APPMON: Overview on " ++ NodeStr}),
- GUI#win{name=Node}.
-
-%% Resize the canvas (when the window has been resized)
-draw_resize(GUI, W, H) ->
- Hc = H - ?hMENUBAR,
- gs:config(GUI#win.canvas, [{width, W}, {height, Hc}]),
- Yline1 = ?yNODELBL-?PAD,
- Yline2 = ?hCANVAS-?PAD,
- gs:config(GUI#win.l1, [{coords, [{0,Yline1},{W,Yline1}]}]),
- gs:config(GUI#win.l2, [{coords, [{0,Yline2},{W,Yline2}]}]),
- GUI#win{wwindow=W, hwindow=Hc}.
-
-%% Clear the GUI from applications and connecting lines
-draw_clear(GUI) ->
- draw_clear2(GUI#win.appobjs),
- gs:config(GUI#win.canvas, [{hscroll, false}]),
- GUI#win{appobjs=[]}.
-draw_clear2([CBtn | AppObjs]) when is_record(CBtn, canvasbutton) ->
- gs:destroy(CBtn#canvasbutton.text),
- gs:destroy(CBtn#canvasbutton.ul),
- gs:destroy(CBtn#canvasbutton.ll),
- gs:destroy(CBtn#canvasbutton.rect),
- draw_clear2(AppObjs);
-draw_clear2([GSObj | AppObjs]) ->
- gs:destroy(GSObj),
- draw_clear2(AppObjs);
-draw_clear2([]) ->
- ignore.
-
-%% Display the applications, which are a list of tuples: {Pid,App,Descr}
-%% Display them in the reversed order to get them chronologically
-%% from left to right.
-draw_apps(GUI, Apps) ->
- {AppObjs, WCanvas} = draw_apps(GUI, lists:reverse(Apps), ?xNODELBL,
- undefined, 0, []),
- NewGUI = GUI#win{wcanvas=WCanvas, appobjs=AppObjs},
- display_scrollbar(NewGUI),
- NewGUI.
-
-draw_apps(GUI, [App | Apps], X, Lx0, N, GSObjs) ->
-
- %% Some necessary data
- {_Pid, AppName, _Descr} = App,
- Text = atom_to_list(AppName),
- Width = erlang:max(8*length(Text)+10, ?wBTN),
-
- %% Connect the application to the node label with a line
- %% Lx0 = leftmost X coordinate (above previous application button)
- %% Lx = X coordinate, Ly1, Ly2 = top and bottom Y coordinates
- Lx = X + trunc(Width/2),
- Line = case N of
- %% First (leftmost application) - draw a vertical line
- %% between the node label and application button
- 0 ->
- Ly1 = ?yNODELBL + ?hNODELBL +?PAD,
- Ly2 = Ly1 + ?PAD2,
- gs:create(line, GUI#win.canvas,
- [{coords, [{Lx, Ly1}, {Lx, Ly2}]}]);
- %% Nth application, N>1 - draw a horizontal line from
- %% line connecting to the previous application button,
- %% to above this application button, then vertically down
- %% to the application button
- _ ->
- Ly1 = ?yNODELBL + ?hNODELBL + ?PAD + ?PAD2/2,
- Ly2 = Ly1 + ?PAD2/2,
- gs:create(line, GUI#win.canvas,
- [{coords, [{Lx0, Ly1}, {Lx, Ly1},
- {Lx, Ly2}]}])
- end,
-
- %% The application is represented using a 'canvasbutton'
- Data = {application, AppName, GUI#win.name},
- AppBtn = canvasbutton(GUI#win.canvas, Text, X, ?yBTN, Width, ?hBTN,
- Data),
-
- draw_apps(GUI, Apps, X+Width+?PAD, Lx, N+1, [AppBtn, Line|GSObjs]);
-draw_apps(_GUI, [], X, _N, _Lx0, GSObjs) ->
- {GSObjs, X}.
-
-%%--Display functions---------------------------------------------------
-%% Functions that modify the GUI but not its data
-
-%% Add a new node to the Nodes menu
-%% Used when a new node has connected
-display_addnode([GUI|GUIs], Node) ->
- display_addnode(GUI, Node),
- display_addnode(GUIs, Node);
-display_addnode([], _Node) ->
- ignore;
-display_addnode(GUI, Node) ->
- Txt = "Show " ++ atom_to_list(Node),
- gs:create(menuitem, GUI#win.nodemenu,
- [{label, {text,Txt}},
- {data, {node, Node, GUI#win.window}}]).
-
-%% Show that a node has come back up
-display_nodeup(GUI, Node) ->
- {Rect, Text} = GUI#win.nodelabel,
-
- %% Check coordinates for the rectangle and compute the new width
- [{L, T}, {_R, B}] = gs:read(Rect, coords),
- NodeStr = atom_to_list(Node),
- W = 8*length(NodeStr)+10,
-
- gs:config(Rect, [{coords, [{L, T}, {L+W, B}]}, {fill, black}]),
- gs:config(Text, [{text, NodeStr}, {fg, {250,235,215}},
- {coords,
- [{L+round(W/2), T+round((?hNODELBL)/2)}]}]).
-
-%% Show that a node has gone down
-display_nodedown(GUI) ->
- {Rect, Text} = GUI#win.nodelabel,
-
- [{L, T}, {_R, B}] = gs:read(Rect, coords),
- gs:config(Rect, [{coords, [{L, T}, {L+114, B}]}, {fill, gray}]),
- gs:config(Text, [{text, "No connection"}, {fg, black},
- {coords, [{L+57, T+round((?hNODELBL)/2)}]}]).
-
-%% Add/remove scrollbars as necessary
-display_scrollbar(GUI) ->
-
- WWindow = GUI#win.wwindow,
- HWindow = GUI#win.hwindow,
- WCanvas = GUI#win.wcanvas,
- HCanvas = GUI#win.hcanvas,
- if
- WCanvas>WWindow ->
- gs:config(GUI#win.canvas,
- [{hscroll, bottom},
- {scrollregion,{0,0,WCanvas,HCanvas}}]);
- true ->
- gs:config(GUI#win.canvas, [{hscroll, false}])
- end,
- if
- HCanvas>HWindow ->
- gs:config(GUI#win.canvas,
- [{vscroll, left},
- {scrollregion,{0,0,WCanvas,HCanvas}}]);
-
- true ->
- gs:config(GUI#win.canvas, [{vscroll, false}])
- end.
-
-%% Select option radio buttons
-display_setopt(GUI, Option) ->
- gs:config(radiobutton(GUI, Option), {select,true}).
-
-radiobutton(GUI, single) -> (GUI#win.options)#options.single;
-radiobutton(GUI, many) -> (GUI#win.options)#options.many;
-radiobutton(GUI, time) -> (GUI#win.options)#options.time;
-radiobutton(GUI, queue) -> (GUI#win.options)#options.queue;
-radiobutton(GUI, prog) -> (GUI#win.options)#options.prog;
-radiobutton(GUI, linear) -> (GUI#win.options)#options.linear.
-
-%% Display load
-%% Used when load information is received from the displayed node
--define(highloadfg, {255,99,71}).
--define(midloadfg, yellow).
--define(lowloadfg, green).
--define(highloadbg, {140,157,178}).
--define(midloadbg, ?highloadbg).
--define(lowloadbg, ?highloadbg).
-
-display_load(GUI, {Old, New}) ->
- if
- Old == New ->
- true;
- Old > New ->
- leds_down(GUI#win.leds, Old, New);
- true ->
- leds_up(GUI#win.leds, Old, New)
- end.
-
-leds_down(_Leds, Old, New) when Old == New ->
- done;
-leds_down(Leds, Old, New) when Old > New ->
- reset_led(Leds, Old),
- leds_down(Leds, Old-1, New).
-leds_up(_Leds, Old, New) when Old == New ->
- done;
-leds_up(Leds, Old, New) when Old < New ->
- set_led(Leds, Old),
- leds_up(Leds, Old+1, New).
-
-led_on_col(N) when N > 13 -> ?highloadfg;
-led_on_col(N) when N > 9 -> ?midloadfg;
-led_on_col(_) -> ?lowloadfg.
-
-led_off_col(N) when N > 13 -> ?highloadbg;
-led_off_col(N) when N > 9 -> ?midloadbg;
-led_off_col(_) -> ?lowloadbg.
-
-reset_led(_Leds, 0) -> ok;
-reset_led(Leds, N) ->
- gs:config(lists:nth(N, Leds), [{fill, led_off_col(N)}]).
-
-set_led(_Leds, 0) -> ok;
-set_led(Leds, N) ->
- gs:config(lists:nth(N, Leds), [{fill, led_on_col(N)}]).
-
-%%----------------------------------------------------------------------
-%% Utilities
-%%----------------------------------------------------------------------
-
-bcast(MNodes, Msg) ->
- lists:foreach(fun(MNode) ->
- case MNode#mnode.status of
- alive ->
- MNode#mnode.pid ! Msg;
- dead ->
- ignore
- end
- end,
- MNodes).
-
-%% parse_nodes(MNodes) -> NodeApps
-%% MNodes -> [#mnode{}]
-%% NodeApps -> [{Node, Status, Apps}]
-%% Node -> atom()
-%% Status -> alive | dead
-%% Apps -> [{Pid, App}]
-%% Pid -> pid()
-%% App -> atom()
-parse_nodes(MNodes) ->
- parse_nodes(MNodes, []).
-parse_nodes([MNode|MNodes], NodeApps) ->
- Apps = parse_apps(MNode#mnode.apps, []),
- parse_nodes(MNodes,
- [{MNode#mnode.name,MNode#mnode.status,Apps}|NodeApps]);
-parse_nodes([], NodeApps) ->
- NodeApps.
-
-parse_apps([{Pid, App, _Descr}|Rest], Apps) ->
- parse_apps(Rest, [{Pid, App}|Apps]);
-parse_apps([], Apps) ->
- Apps.
-
-%%----------------------------------------------------------------------
-%% Canvas buttons
-%%----------------------------------------------------------------------
-
-canvasbutton(Canvas, Text, X, Y, W, H, Data) ->
-
- %% Draw a rectangle (for event catching)
- Rect = gs:create(rectangle, Canvas, [{coords, [{X,Y}, {X+W,Y+H}]},
- {fill, gs:read(Canvas, bg)},
- {buttonpress, true},
- {buttonrelease, true}]),
-
- %% Make the rectangle area look like a 3D button by using lines
- Ul = gs:create(line, Canvas, [{coords, [{X,Y+H},{X,Y},{X+W,Y}]},
- {fg, white}, {width, 2}]),
- Ll = gs:create(line, Canvas, [{coords, [{X,Y+H},{X+W,Y+H},{X+W,Y}]},
- {fg, {87,87,87}}, {width, 2}]),
-
- %% Write the text in the middle
- Xc = X + round(W/2),
- Yc = Y + round(H/2),
- T = gs:create(text, Canvas, [{text, Text}, {coords, [{Xc,Yc}]},
- {anchor, c},
- {buttonpress, true},
- {buttonrelease, true}]),
-
- %% Create the canvasbutton object
- CBtn = #canvasbutton{text=T, ul=Ul, ll=Ll, rect=Rect,
- x=X, y=Y, w=W, h=H},
-
- %% Configure the data
- gs:config(T, {data, {canvasbutton, CBtn, Data}}),
- gs:config(Rect, {data, {canvasbutton, CBtn, Data}}),
-
- CBtn.
-
-press(Canvasbutton) ->
- gs:config(Canvasbutton#canvasbutton.ul, {fg, {87,87,87}}),
- gs:config(Canvasbutton#canvasbutton.ll, {fg, white}).
-
-release(Canvasbutton) ->
- gs:config(Canvasbutton#canvasbutton.ul, {fg, white}),
- gs:config(Canvasbutton#canvasbutton.ll, {fg, {87,87,87}}).
diff --git a/lib/appmon/src/appmon_a.erl b/lib/appmon/src/appmon_a.erl
deleted file mode 100644
index 6838a7a275..0000000000
--- a/lib/appmon/src/appmon_a.erl
+++ /dev/null
@@ -1,1122 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(appmon_a).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,1}}]).
-
-%%----------------------------------------------------------------------
-%%
-%% Monitors an application, i.e its supervision tree.
-%%
-%%----------------------------------------------------------------------
-%%
-%%
-%% INTRODUCTION
-%% ------------
-%%
-%% This file contains a description of the files involved
-%% and the communication between the appmon_a display
-%% manager and the appmon_a2 information gatherer. Further
-%% information on the placement algorithm can be found in
-%% the place.erl file.
-%%
-%%
-%% FILES
-%% -----
-%%
-%% The supervision tree graphical software consists of
-%% the following files:
-%%
-%% appmon_a Gen server driving the process display window.
-%% Responsible for assigning gs identifiers to all
-%% processes and process link
-%% appmon_a2 The process information gathering routines.
-%% Works by following the process links from application
-%% master once every second
-%% dg The process database is implemented as a shared
-%% digraph (see manual pages for digraph) and this is
-%% the routines handling this digraph. Since the digraph
-%% is shared appmon_a2 will put some info into it that the
-%% appmon_a later will modify. The structures used are
-%% described in dg.hrl
-%% place Places a tree, decides the x and y coordinates (not
-%% necessarily corresponding to window coordinates) of
-%% processes (or vertices to be specific). Note that
-%% special routines are used to transform the possibly
-%% cyclic digraph into a strict tree before trying to
-%% place it.
-%%
-%%
-%%
-%% IMPLEMENTATION DETAIL
-%% ---------------------
-%%
-%% The appmon_a module will follow links between processes,
-%% starting with the application master. A unique
-%% reference is used to prevent infinite recursion. Note
-%% that this process and link gathering is done in the
-%% live digraph so that already known processes are
-%% updated with the reference and new ones are added to
-%% the digraph. After all processes and links have been
-%% added or updated a search is made for those processes
-%% and links that have an old reference. These are those
-%% processes and links that are not present in the
-%% application any more. Those are extracted from the
-%% digraph and then deleted and the extracts are then
-%% used (by appmon_a) to delete the appropriate gs
-%% objects. The responsibilities of appmon_a is thus 1) add
-%% all new processes and links to the digraph and 2) make
-%% a list of all those objects from the digraph that have
-%% been deleted.
-%%
-%% When appmon_a2 has gathered all necessary information it
-%% notifies the appmon_a display manager. Note that this is
-%% implemented as a call (as opposed to a cast) to
-%% prevent appmon_a2 from changing the digraph while appmon_a
-%% uses it. appmon_a places all processes using the place
-%% module. place will place the processes in the x y
-%% planes, hopefully in a nice way, re-forming the
-%% digraph during the process into a strict tree using
-%% some simple heuristics, some links that makes the
-%% graph cyclic will be considered secondary and later
-%% coloured red. Note that the process links are not
-%% placed since their coordinates are those of the
-%% processes that they are links between. The place
-%% module is only concerned at a fairly high level of
-%% abstraction. Currently its x coordinates are used as
-%% real coordinates while the y coordinates must be
-%% scaled to correct values, thus the x plane is
-%% continous and the y plane is disctrete.
-%%
-%% Having placed processes the new ones are drawn on the
-%% display along with all new process links, then all
-%% processes and process links are moved to their
-%% possibly new positions. The place module is not
-%% sensitive to changes in position and therefore has no
-%% concept of which nodes will have to be moved. hence
-%% all nodes are moved (but most of them probably to the
-%% same position as before)
-%%
-%%
-%%
-%%
-%%----------------------------------------------------------------------
-
-
-
--export([start/2, start/3, stop/0]).
-
-
--record(astate, {app, name, client, digraph}).
-
--import(lists, [foreach/2]).
-
-%% gen server stuff
--behaviour(gen_server).
--export([init/1, handle_cast/2, handle_info/2, terminate/2]).
--export([handle_call/3, code_change/3]).
-
-
--define(APPSPACE, 10). % The space between apps
--define(NODEAREA_H, 90). % The height of a node
--define(BUTTAREA_H, 80). % The button area height
--define(APPBUTT_H, 20). % Height of appl button
--define(EDITORW, 260).
-
--define(MAXWIDTH, 800).
--define(MINWIDTH, 382).
--define(MAXHEIGHT, 450).
--define(MINHEIGHT, 325).
-
--define(SUPVIEWTXT, "Sup. view").
--define(PROCVIEWTXT, "Proc. view").
--define(CLOSETXT, "Close").
--define(REFRESHTXT, "Refresh").
--define(SAVEOPTSTXT, "Save options").
--define(HELPTXT, "Help").
-
--define(CHARWIDTH, 7). %Should use GS primitives
-
--define( darkkhaki, {189, 183, 107}).
--define( palegoldenrod, {238, 232, 170}).
--define( peachpuff4, {139, 119, 101}).
--define( red, red).
--define( darkgrey, {169, 169, 169}).
--define( lightgrey, {211, 211, 211}).
--define( royalblue, {65, 105, 225}).
--define( aquamarine4, {69, 139, 116}).
--define( palegreen4, {84, 139, 84}).
--define( darkseagreen, {105, 139, 105}).
--define( f_line_col, {150, 150, 255}).
-
-
--include("appmon_dg.hrl").
-
-
-%%------------------------------------------------------------
-%%------------------------------------------------------------
-
-
-start(NodeName, AppName) ->
- gen_server:start_link(?MODULE, {NodeName, AppName, AppName}, []).
-
-start(NodeName, AppName, AppId) ->
- gen_server:start_link(?MODULE, {NodeName, AppName, AppId}, []).
-
-
-stop() ->
- ok.
-
-
-
-%%------------------------------------------------------------
-%% Public interface
-
-
-%%------------------------------------------------------------
-%% Administration
-
-%% AppName is the name of the application, usually an atom like sasl
-%% or kernel, AppId is the application pid or the application name,
-%% either goes.
-init({NodeName, AppName, AppId}) ->
- process_flag(trap_exit, true),
- {ok, Client} = appmon_info:start_link(NodeName, self(), []),
- init_ref(),
- init_foreign_places(),
- DG = digraph:new([cyclic, private]),
- State = #astate{app=AppId, name=AppName, client=Client, digraph=DG},
- refresh(State),
- setup_base_win(NodeName, AppName),
- {ok, State}.
-
-terminate(_Reason, _State) ->
- ok.
-
-code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-handle_call(norequest, _From, State) ->
- {reply, null, State}.
-
-%%------------------------------------------------------------
-%% handle casts
-
-handle_cast({ping, _Node, _From}, State) ->
- {noreply, State};
-handle_cast(_Other, State) ->
- {noreply, State}.
-
-
-
-%%------------------------------------------------------------
-%% handle info
-
-handle_info({gs, _, click, _, [?CLOSETXT|_]}, State) ->
- {stop, normal, State};
-handle_info({gs, _, destroy, _, _}, State) ->
- {stop, normal, State};
-handle_info({gs, _, click, _, [?REFRESHTXT|_]}, State) ->
- refresh(State),
- {noreply, State};
-handle_info({gs, _, click, _, [?HELPTXT|_]}, State) ->
- HelpFile = filename:join([code:lib_dir(appmon),
- "doc", "html", "part_frame.html"]),
- tool_utils:open_help(win(), HelpFile),
- {noreply, State};
-handle_info({gs, Id, click, {mode, Mode}, _}, State) ->
- %%io:format("handle_info: Setting mode: ~p~n", [Mode]),
- set_mode(Id, Mode),
- {noreply, State};
-handle_info({gs, _, click, _, [?SUPVIEWTXT|_]}, State) ->
- refresh(State, [{info_type, sup}]),
- {noreply, State};
-handle_info({gs, _, click, _, [?PROCVIEWTXT|_]}, State) ->
- refresh(State, [{info_type, link}]),
- {noreply, State};
-handle_info({gs, Id, buttonpress, _,[1, X, Y|_]}, State) ->
- %%io:format("Id clicked: ~p~n", [gs:read(Id, {find, {X, Y}})]),
- catch find_pid(State, Id, X, Y),
- set_default_mode(),
- {noreply, State};
-handle_info({gs, Win, configure, _Data, [W, H|_]}, State) ->
- case win() of Win -> user_driven_resize(W, H);
- _-> ok
- end,
- {noreply, State};
-
-handle_info({delivery, _S, pinfo, _N, Res}, State) ->
- appmon_txt:print(Res),
- {noreply, State};
-handle_info({delivery, S, app, N, Res}, State) ->
- {delivery, _Serv, app, _Name, {Root, Vs, Ls, SecLs}} =
- flush({delivery, S, app, N, Res}),
- update2(Vs, Root, Ls, SecLs, State),
- {noreply, State};
-
-handle_info({kill}, State) ->
- {stop, normal, State};
-handle_info({state}, State) ->
- {noreply, State};
-handle_info({'EXIT', _Pid, _Reason}, State) ->
- {noreply, State};
-handle_info(_Other, State) ->
- {noreply, State}.
-
-
-%% Refresh sets new options for the request and forces an update of
-%% the screen ant status.
-refresh(State) ->
- refresh(State, []).
-refresh(State, Opts) ->
- appmon_info:app(State#astate.client,
- State#astate.name, true, Opts).
-
-
-
-%% find_pid finds the pid of the clicked object. The scenario is that
-%% the user clicks on an item in his window, that ObjId is searched
-%% for among all nodes (vertices) and if found action is taken
-%% depending on the current mode (see handle_info)
-find_pid(State, Id, X, Y) ->
- %% Try to manage both versions of GS, remove first case later.
- ObjList = case gs:read(Id, {find, {X, Y}}) of
- {error, _} ->
- gs:read(Id, {hit, {X, Y}}); % Try new format
- Num when is_integer(Num) -> [Num];
- _Other -> []
- end,
- DG = State#astate.digraph,
- All = appmon_dg:get(all, DG),
- find_pid2(ObjList, All, DG, State).
-
-find_pid2([Id | Ids], All, DG, State) ->
- case search_for_pid(All, DG, Id) of
- {ok, _KeyStr, Pid} ->
- handle_proc_press(mode(), Pid, State);
- _ -> find_pid2(Ids, All, DG, State)
- end;
-find_pid2([], _All, _DG, _State) -> ok.
-
-search_for_pid([V|Vs], DG, ObjId) ->
- VD = appmon_dg:get(data, DG, V),
- if ObjId==VD#vdata.txt_obj ->
- {ok, V, VD#vdata.type};
- true -> search_for_pid(Vs, DG, ObjId)
- end;
-search_for_pid([], _DG, _ObjId) -> false.
-
-
-%%
-%% called when a process has been clicked on.
-%%
-handle_proc_press(info, Pid, State) ->
- appmon_info:pinfo(State#astate.client, Pid, true,
- [{timeout, at_most_once}]);
-handle_proc_press(send, Pid, _State) ->
- {P, RawStr} = two_entries(winroot(), 250, 70,
- "Send", "To: ", "Msg: ",
- pid_to_list(Pid), "", bg()),
- Str = case lists:last(RawStr) of
- 46 -> RawStr;
- _ -> RawStr++"."
- end,
- case erl_scan:string(Str) of
- {ok, Tokens, _} ->
- case erl_parse:parse_term(Tokens) of
- {ok, Term} ->
- case catch list_to_pid(P) of
- To when is_pid(To) -> To ! Term;
- _ -> error
- end;
- _Error -> error
- end;
- _Error -> error
- end;
-handle_proc_press(trace, Pid, _State) ->
- case trace_state(Pid) of
- true ->
- io:format("Removing trace on ~p~n", [Pid]),
- sys:trace(Pid, false),
- set_trace_state(Pid, false);
- _Other ->
- io:format("Putting trace on ~p~n", [Pid]),
- sys:trace(Pid, true, 1000),
- set_trace_state(Pid, true)
- end;
-handle_proc_press(kill, Pid, _State) ->
- exit(Pid, kill).
-
-
-trace_state(Pid) -> get({trace_state, Pid}).
-set_trace_state(Pid, State) -> put({trace_state, Pid}, State).
-
-set_default_mode() ->
- {Id, Mode} = get(default_mode),
- case mode() of
- Mode -> true;
- _Other -> set_mode(Id, Mode)
- end.
-set_default_mode(Id, Mode) ->
- put(default_mode, {Id, Mode}),
- select(Id), %Dirty workaround
- set_default_mode().
-
-set_mode(Id, Mode) ->
- %%io:format("mode=~p~n", [Mode]),
- set_mode(Mode),
- deselect(),
- select(Id).
-
-set_mode(Mode) -> put(mode, Mode).
-mode() -> get(mode).
-
-flush({delivery, S, A, N, R}) ->
- receive
- {delivery, S, A, N, R2} ->
- flush({delivery, S, A, N, R2})
- after 0 ->
- {delivery, S, A, N, R}
- end.
-
-
-%%------------------------------------------------------------
-%% Real stuff
-%%
-update2(Vs, Root, Ls, SecLs, State) ->
- DG = State#astate.digraph,
- Ref = mk_ref(),
- Added = add_procs(Vs, DG, Ref),
- AddedLs = add_links(Ls, DG, Ref, primary),
- AddedLs2 = add_links(SecLs, DG, Ref, secondary),
- DelLs = del_links(appmon_dg:eget(all, DG), DG, Ref),
- Dels = del_procs(appmon_dg:get(all, DG), DG, Ref),
-
- LastX = appmon_place:place(DG, Root),
- Width = lists:max(LastX),
- Height = length(LastX),
-
- %% Delete things from screen
- del(Dels), del(DelLs),
-
- %% Add vertices to screen
- foreach(fun(V) -> draw_node(DG, V) end, Added),
-
- %% Add edges to screen
- foreach(fun(E) -> draw_edge(DG, E) end, AddedLs),
- foreach(fun(E) -> draw_edge(DG, E) end, AddedLs2),
-
- %% Move vertices on screen
- foreach(fun(V) -> move_vertex(DG, V) end, appmon_dg:get(all, DG)),
-
- tree_driven_resize(Width, Height),
-
- gs:config(win(), {map, true}), %Make win visible
- ok.
-
-%% Make an integer reference, could have used make_ref BIF but didn't
-mk_ref() -> put(reference, get(reference)+1).
-init_ref() -> put(reference, 0).
-
-
-%% Add processes (vertices) to digraph, use the string repr of pid as
-%% key in digraph.
-add_procs([{Pid, Str}|Vs], DG, Ref) ->
- case appmon_dg:add(DG, Str, mk_vdata(Str, Pid, Ref), Ref) of
- known -> add_procs(Vs, DG, Ref);
- updated -> add_procs(Vs, DG, Ref);
- _ ->
- case lists:member(32, Str) of
- true ->
- appmon_dg:set(x, DG, Str, foreign), % UNHOLY!
- add_procs(Vs, DG, Ref); % Don't add foreign
- _ -> [Str | add_procs(Vs, DG, Ref)]
- end
- end;
-add_procs([], _DG, _Ref) -> [].
-
-
-%% Add links to digraph. NOTE that foreign links get a special weight
-%% and that no link is added if it goes to a process not in the set of
-%% vertices.
-%%
-%% OTP-1970: Check that linked-to processes really exist.
-%%
-add_links([{V1, V2}|Ls], DG, Ref, Weight) ->
- L = case lists:member(32, V2) of
- true -> {V1, V2, foreign};
- _ -> {V1, V2, Weight}
- end,
- case appmon_dg:get(data, DG, V2) of
- false -> add_links(Ls, DG, Ref, Weight);
- VD ->
- if VD#vdata.ref == Ref -> % OTP-1970
- case appmon_dg:eadd(DG, L, mk_edata(L, Ref), Ref) of
- known -> add_links(Ls, DG, Ref, Weight);
- updated -> add_links(Ls, DG, Ref, Weight);
- _Other -> [L | add_links(Ls, DG, Ref, Weight)]
- end;
- true ->
- add_links(Ls, DG, Ref, Weight)
- end
- end;
-add_links([], _DG, _Ref, _Weight) -> [].
-
-%% Make an edge data structure
-mk_edata(_L, Ref) ->
- #edata{ref=Ref}.
-
-%% Make a vertex data structure, note that pid can be either a pid or
-%% a port, we're not picky here.
-mk_vdata(P, Pid, Ref) ->
- #vdata{ref=Ref, type=Pid, txt=P, width=width(P)}.
-width(Txt) -> ?CHARWIDTH*length(Txt)+10. % Should use GS stuff instead
-
-
-%% Delete those processes that have the wrong reference from the
-%% digraph. Returns a list of deleted procs and their data (to be able
-%% to erase things on screen).
-del_procs([V|Vs], DG, Ref) ->
- VD = appmon_dg:get(data, DG, V),
- if VD#vdata.ref /= Ref -> appmon_dg:del(DG, V),
- [{V, VD} | del_procs(Vs, DG, Ref)];
- true -> del_procs(Vs, DG, Ref)
- end;
-del_procs([], _DG, _Ref) -> [].
-
-
-%% Deletes links that have the wrong reference from the digraph, note
-%% that the weight of the edge is not considered here. Returns a list
-%% of deleted links and their data (to be able to erase things on
-%% screen).
-del_links([L | Ls], DG, Ref) ->
- ED = appmon_dg:eget(data, DG, L),
- if ED#edata.ref /= Ref -> appmon_dg:edel(DG, L),
- [{L, ED} | del_links(Ls, DG, Ref)];
- true -> del_links(Ls, DG, Ref)
- end;
-del_links([], _DG, _Ref) -> [].
-
-%% Del deletes the GS objects of the list of should-be-deleted
-%% items. Returns nothing particular.
-del(L) ->
- lists:foreach(fun({{V1, V2, Weight}, D}) when is_record(D, edata) ->
- if Weight== foreign ->
- dealloc_foreign({V1, V2, Weight});
- true -> ok end,
- destroy(D#edata.line);
- ({_I, D}) when is_record(D, vdata) ->
- destroy(D#vdata.sym_obj),
- destroy(D#vdata.txt_obj)
- end, L).
-
-
-move_vertex(DG, V) ->
- VData = appmon_dg:get(data, DG, V),
-%% io:format("Vertex ~p data: x:~p, oldx:~p, y:~p, oldy:~p offs:~p~n",
-%% [V, VData#vdata.x, VData#vdata.origx,
-%% VData#vdata.y, VData#vdata.origy, offsetx()]),
- if VData#vdata.x == foreign -> ok;
- true ->
- X = VData#vdata.x,
- Y = scaley(VData#vdata.y),
- OldX = VData#vdata.origx,
- OldY = scaley(VData#vdata.origy),
- if X==OldX, Y==OldY -> true;
- true ->
- %%io:format("Moving vertex: ~p~n", [V]),
-
- W = VData#vdata.width,
- {BoxC, TxtC} = calc_box_coords(X, Y, W),
-
- %% move the symbol and text
- gs:config(VData#vdata.sym_obj, [{coords, BoxC}]),
- gs:config(VData#vdata.txt_obj, [{coords, TxtC}]),
- foreach(fun(E) -> move_edge(DG, E) end,
- appmon_dg:get(edges, DG, V))
- end
- end.
-
-
-move_edge(DG, E) ->
- {{V1, V2, Weight}, V1, V2, ED} = appmon_dg:eget(edge, DG, E),
- VD1 = appmon_dg:get(data, DG, V1),
- VD2 = appmon_dg:get(data, DG, V2),
- Line = ED#edata.line,
- move_line(DG, VD1, VD2, Line, Weight).
-move_line(DG, VD1, VD2, Line, Weight) when is_list(Line) ->
- move_line(DG, VD1, VD2, hd(Line), Weight);
-move_line(_DG, VD1, VD2, Line, Weight) ->
- Coords = calc_coords(VD1, VD2, Weight),
- gs:config(Line, [{coords, Coords} | line_opts(Weight)]).
-
-%% Draw the vertex on the canvas
-draw_node(DG, V) ->
- %%io:format("Drawing~n",[]),
- Data = appmon_dg:get(data, DG, V),
-
- X = Data#vdata.x,
- Y = scaley(Data#vdata.y),
-
- {Sym, Txt} = draw(rectangle, sup_col(), Data#vdata.txt, X, Y,
- Data#vdata.width),
-
- appmon_dg:av(DG, V, Data#vdata{sym_obj=Sym, txt_obj=Txt}),
- true.
-
-%% Draws a symbol (rectangle for instance) on the canvas.
-draw(Symbol, Col, Txt, X, Y, W) ->
- {BoxC, TxtC} = calc_box_coords(X, Y, W),
- Box = gs:create(Symbol, canvas(), [{coords, BoxC}, {fill, Col}]),
-
- TxtObj = gs:create(text, canvas(), [{coords, TxtC},
- {anchor, c},
- %%{buttonpress, true},
- {text, Txt}]),
- {Box, TxtObj}.
-
-%% Returns {BoxCoords, TextCoords}
-calc_box_coords(X, Y, W) ->
- {[{X, Y-radius()}, {X+W, Y+radius()}], [{X+trunc(W/2), Y}]}.
-
-
-%% Draw a line on the canvas
-draw_edge(DG, E) ->
- {V1, V2, Weight} = E,
- Line = draw_line(DG, V1, V2, Weight),
-%% io:format("Line: ~p~n", [Line]),
- appmon_dg:eset(line, DG, E, Line).
-
-
-%% From is parent, To is child. If To is not a record then we are
-%% dealing with a link to a process on another node. Find a suitable
-%% place at the left margin and write the process name there and draw
-%% a line to it.
-%%
-draw_line(DG, From, To, foreign) ->
- VD1 = appmon_dg:get(data, DG, From),
- Y = find_foreign_place(VD1#vdata.y+0.5, foreign_places()),
- add_foreign_place({From, To, foreign}, Y),
-%% io:format("New Y: ~p~n", [Y]),
- appmon_dg:set(x, DG, To, 0),
- appmon_dg:set(y, DG, To, Y),
- VD2 = appmon_dg:get(data, DG, To),
- Coords = calc_coords(VD1, VD2, foreign),
-%% io:format("Node coords: ~p~n", [Coords]),
- L = gs:create(line, canvas(), [{coords, Coords} | line_opts(foreign)]),
- T = gs:create(text, canvas(), [{coords, [{0, 5+scaley(Y)}]},
- {anchor, nw}, {fg, f_line_col()},
-%% {font, {screen, 10}},
- {text, To}]),
- [L, T];
-
-draw_line(DG, From, To, Weight) ->
- VD1 = appmon_dg:get(data, DG, From),
- VD2 = appmon_dg:get(data, DG, To),
- Coords = calc_coords(VD1, VD2, Weight),
- gs:create(line, canvas(), [{coords, Coords} | line_opts(Weight)]).
-
-%%----------------------------------------------------------------------
-%%
-%% Line coordinate calculation
-%%
-%% Calculate coordinates for edges (links, lines). Primaries have a
-%% nice knee and secondaries are oriented differently. If weight is
-%% foreign then we will calculate a nice line to the left margin.
-%%
-calc_coords(From, To, foreign) ->
- Y = scaley(To#vdata.y),
- X1 = From#vdata.x+trunc(From#vdata.width/2),
- Y1 = scaley(From#vdata.y)+radius(),
- [{0, Y}, {X1-40, Y}, {X1, Y1}];
-calc_coords(From, To, primary) ->
- X1 = From#vdata.x+trunc(From#vdata.width/2),
- Y1 = scaley(From#vdata.y)+radius(),
-
- X2 = To#vdata.x+trunc(To#vdata.width/2),
- Y2 = scaley(To#vdata.y)-radius(),
-
- Y3 = trunc((Y1+Y2)/2),
- [{X1, Y1}, {X1, Y3}, {X2, Y3}, {X2, Y2}];
-
-calc_coords(V1, V2, _Weight) ->
- Y1 = scaley(V1#vdata.y),
- X1 = V1#vdata.x,
- X1w = X1+V1#vdata.width,
- Y2 = scaley(V2#vdata.y),
- X2 = V2#vdata.x,
- X2w = X2+V2#vdata.width,
-
- if Y1 == Y2 -> calc_u(X1, X1w, Y1, X2, X2w);
- X1w < X2 -> calc_s(X1w, Y1, X2, Y2);
- X2w < X1 -> calc_s(X1, Y1, X2w, Y2);
- true ->
- D1 = abs(X1-X2), D2 = abs(X1w-X2w),
- if D1 > D2 -> calc_rbrack(X1w, Y1, X2w, Y2);
- true -> calc_lbrack(X1, Y1, X2, Y2)
- end
- end.
-
-%% Calculates line coordinates that will go from bottom of one node to
-%% bottom of another on the same level. The line will form a nice "U".
-calc_u(X1, X1w, Y, X2, X2w) ->
- X3 = trunc((X1+X1w)/2),
- X4 = trunc((X2+X2w)/2),
- Y2 = Y+radius(),
- Y3 = Y2+20,
- [{X3, Y2}, {X3, Y3}, {X4, Y3}, {X4, Y2}].
-
-%% Calculates line coordinates that will go from right (or left) side
-%% to right (or left) side, thus forming a "[" or a "]" (bracket).
-calc_rbrack(X1, Y1, X2, Y2) ->
- X3 = 20 + if X1 > X2 -> X1;
- true -> X2
- end,
- [{X1, Y1}, {X3, Y1}, {X3, Y2}, {X2, Y2}].
-calc_lbrack(X1, Y1, X2, Y2) ->
- X3 = -20 + if X1 < X2 -> X1;
- true -> X2
- end,
- [{X1, Y1}, {X3, Y1}, {X3, Y2}, {X2, Y2}].
-
-%% Calculates line coordinates that will form a nice "S"
-calc_s(X1, Y1, X2, Y2) ->
- X3 = trunc((X1+X2)/2),
- [{X1, Y1}, {X3, Y1}, {X3, Y2}, {X2, Y2}].
-
-
-%% Options for lines (edges, links)
-line_opts(foreign) -> [{width, 2}, {smooth, true}, {fg, f_line_col()}];
-line_opts(primary) -> [{width, 2}, {smooth, false}, {fg, line_col()}];
-line_opts(_) -> [{width, 2}, {smooth, true}, {fg, sec_line_col()}].
-
-
-
-%%----------------------------------------------------------------------
-%%
-%% Handling of links to foreign processes
-%%
-%%----------------------------------------------------------------------
-dealloc_foreign(L) ->
-%% io:format("deallocing foreign: ~p~n", [L]),
- put(foreign_places, lists:keydelete(L, 1, foreign_places())).
-add_foreign_place(V, Y) ->
-%% io:format("Adding foreign: ~p~n", [V]),
- put(foreign_places, [{V, Y} | foreign_places()]).
-foreign_places() ->
- get(foreign_places).
-init_foreign_places() ->
- put(foreign_places, []).
-
-%% Find a good place for the foreign node
-find_foreign_place(StartY, L) ->
- case lists:keysearch(StartY, 2, L) of
- {value, _} -> find_foreign_place(StartY + 1, L);
- _ -> StartY
- end.
-
-
-%%------------------------------------------------------------
-%%
-%% Graphical stuff
-%%
-
-setup_base_win(NodeName, AppName) ->
- set_winroot(gs:start([{kernel,true}])),
-
- W = ?MINWIDTH, H = ?MINHEIGHT,
-
- Name = "APPMON: " ++ atom_to_list(AppName) ++ " on " ++
- atom_to_list(NodeName),
-
- set_win(gs:create(window, winroot(), [{title, Name}, %%{bg, red},
- {x, 250}, {y, 100},
- {width, W}, {bg, win_col()},
- {height, H+?BUTTAREA_H}])),
- %% standard buttons
- mk_std_butts(win(), W),
- set_canvas(gs:create(canvas, win(),[{x,0}, {y,?BUTTAREA_H},
- {width, W}, {height, H},
- {bg, bg()},
- {buttonpress, true}])),
-
- set_old_win_size(width, gs:read(win(), width)),
- set_old_win_size(height, gs:read(win(), height)),
-
-%% gs:config(win(), {map, true}), %Make win visible
- ok.
-
-
-nice_line_coords(W, H) ->
- [{0,H-10}, {W,H-10}].
-
-%%------------------------------
-%% Button stuff
-
-mk_butt_area(Win, W) ->
- H = ?BUTTAREA_H,
- F = gs:create(frame, Win,[{x,0}, {y,0}, %%{bg, frame_col()},
- {width,W}, {height,H}]),
- C = gs:create(canvas,F,[{x,0}, {y,0}, {width, W}, {height, H-9},
- {bg, bg()}]),
- L = gs:create(line,C,[{coords,nice_line_coords(W, H)}]),
-
- MB = gs:create(menubar, Win, []),
-
- FMB = gs:create(menubutton, MB, [{label, {text, "File"}}]),
- FM = gs:create(menu, FMB, []),
- gs:create(menuitem, FM, [{label, {text, ?CLOSETXT}}]),
-
- OMB = gs:create(menubutton, MB, [{label, {text, "Options"}}]),
- OM = gs:create(menu, OMB, []),
- gs:create(menuitem, OM, [{label, {text, ?REFRESHTXT}}]),
- Group = now(),
- gs:create(menuitem, OM, [{itemtype, separator}]),
- gs:create(menuitem, OM, [{label, {text, ?SUPVIEWTXT}}, {itemtype, radio},
- {group, Group}]),
- gs:create(menuitem, OM, [{label, {text, ?PROCVIEWTXT}}, {select, true},
- {group, Group}, {itemtype, radio}]),
-
- HMB = gs:create(menubutton, MB, [{label, {text, "Help"}}, {side, right}]),
- HM = gs:create(menu, HMB, []),
- gs:create(menuitem, HM, [{label, {text, ?HELPTXT}}]),
-
- {F, C, L}.
-
-mk_std_butts(Win, W) ->
- {F, C, L} = mk_butt_area(Win, W),
- set_bframe(F), set_bcanvas(C), set_bline(L),
-
- IButt = mk_mode_butt({text, "Info"}, {mode, info}, 10),
- mk_mode_butt({text, "Send"}, {mode, send}, 90),
- mk_mode_butt({text, "Trace"}, {mode, trace}, 170),
- mk_mode_butt({text, "Kill"}, {mode, kill}, 250),
-
- set_default_mode(IButt, info),
-
- true.
-
-select(Id) ->
- gs:config(Id, {bg, sel_col()}),
- set_selected(Id).
-
-deselect() ->
- gs:config(selected(), {bg, de_sel_col()}).
-
-mk_mode_butt(Label, Data, X) ->
- gs:create(button, bframe(), [{label, Label}, {x, X}, {y, 35},
- {data, Data}, {width, 70}, {height, 25}]).
-
-%%------------------------------------------------------------
-%% Graphical utilities
-
-mk_frame(P, X, Y, W, H, BG) ->
- gs:create(frame, P, [{x, X}, {y, Y}, {width, W}, {height, H}, {bg, BG}]).
-
-mk_butt(P, X, Y, W, H, Txt) ->
- gs:create(button, P, [{x, X}, {y, Y}, {height, H}, {width, W},
- {label, {text, Txt}}]).
-
-mk_butt(P, X, Y, Txt) ->
- mk_butt(P, X, Y, 70, 20, Txt).
-
-mk_label(P, X, Y, W, H, Txt, BG) ->
- gs:create(label, P, [{x, X}, {y, Y}, {height, H}, {width, W},
- {label, {text, Txt}}, {bg, BG}]).
-
-mk_entry(P, X, Y, W, H, Txt, BG) ->
- gs:create(entry, P, [{x, X}, {y, Y}, {height, H}, {width, W}, {text, Txt},
- {bg, BG}, {keypress, true}]).
-
-
-two_entries(Root, W, H, Name, LTxt1, LTxt2, StartTxt1, StartTxt2, BG) ->
- Win = gs:create(window, Root, [{title, Name}, %%{bg, red},
- %%{x, X}, {y, Y},
- {width, W}, {bg, BG},
- {height, H}]),
- F = mk_frame(Win, 0, 0, W, H, BG),
-
- mk_label(F, 10, 10, 30, 20, LTxt1, BG),
- mk_label(F, 10, 40, 30, 20, LTxt2, BG),
-
- E1 = mk_entry(F, 40, 10, 120, 20, StartTxt1, BG),
- E2 = mk_entry(F, 40, 40, 120, 20, StartTxt2, BG),
-
- Ok = mk_butt(F, 170, 10, "Ok"),
- Cn = mk_butt(F, 170, 40, "Cancel"),
- gs:config(Win, {map, true}),
-
- Ret = case catch two_entries_loop(E1, E2, Ok, Cn) of
- {P2, Msg} -> {P2, Msg};
- _Other ->
- false
- end,
- gs:destroy(Win),
- Ret.
-
-
-two_entries_loop(E1, E2, Ok, Cn) ->
- receive
- {gs, Ok, click, _, _} ->
- {gs:read(E1, text),
- gs:read(E2, text)};
- {gs, E1, keypress, _, ['Return'|_]} ->
- {gs:read(E1, text),
- gs:read(E2, text)};
- {gs, E2, keypress, _, ['Return'|_]} ->
- {gs:read(E1, text),
- gs:read(E2, text)};
- {gs, _, keypress, _, _} ->
- two_entries_loop(E1, E2, Ok, Cn);
- {gs, Cn, click, _, _} ->
- true
- end.
-
-%%--------------------------------------------------------------------
-%%
-%% Resizing routines.
-%%
-%% Resizing deals with a number of different interdependent
-%% sizes. Top size is the window size. From window size all other
-%% sizes are calculated, we call this the "leader" size. The
-%% canvas is usually the same size as the window, except for the
-%% row of buttons at the top of the windoww. The canvas is also
-%% displaced when the tree is smaller than the minimum window
-%% size.
-%%
-%%
-%% Window size - the size of the outer window. Note that
-%% provisions must be made for the button area at the top of the
-%% window, this is called WinAdj. this is the only item taht
-%% changes when the user manually resizes the window.
-%%
-%% Canvas size - The size of the canvas, should be equal to
-%% window size less the button area. Must be adjusted when the
-%% window has been manually resized. The canvas also has a
-%% scrollregion which must be maintained. Note that we could have
-%% used the canvas size as "leading" size, but this did not work
-%% since the canvas doesn't fill the complete window when the
-%% tree is smaller than the window.
-%%
-%% Tree size - The size of the tree. This may change whenever a
-%% new tree is delivered from the info routine.
-%%
-%% Dim - All these size adjustments are done in some dimension
-%% (width or height).
-%%
-%% Max, Min - The outmost window may not become larger than Max
-%% size or smaller than Min size when resized by the tree
-%% size. The user resizing is not restricted to these sizes.
-%%
-%% Scrollbars:
-%%
-%% Scrollbars are used whenever necessary, whenever the tree size
-%% is bigger than canvas size (in any dimension).
-%%
-%% Invariants:
-%%
-%% The three sizes are not varied at the same time. When the
-%% window is resized because of a new tree, then window and
-%% canvas must be updated. When the user has resized, then only
-%% the canvas must be changed (to fit in the window)
-%%
-%% Tree driven resize
-%%
-%% This occurs when the tree has been updated. The window may
-%% grow and shrink to fit the tree, but may not be smaller than
-%% Min and not bigger than Max (scrollbars will be used instead)
-%%
-
-tree_driven_resize(TWidth, THeight) ->
- gs:config(win(), {configure, false}),
- Width = TWidth+20,
- Height = scaley(THeight+1),
- put({width, tree}, Width),
- put({height, tree}, Height),
- adjust_win(width, Width),
- adjust_win(height, Height),
- fit_tree_to_win(width, Width),
- fit_tree_to_win(height, Height),
- check_scroll_region(Width, Height, gs:read(canvas(), scrollregion)),
- gs:config(win(), {configure, true}),
- ok.
-
-
-%% Will adjust the window size to the tree size (given the max and min
-%% restrictions.
-adjust_win(Dim, TreeSize) ->
- case get({Dim, user_resize}) of
- true -> ok;
- _ ->
- WinSize = gs:read(win(), Dim),%%get_dim(Dim, win()),
- case get_wanted_winsize(Dim, TreeSize) + winadj(Dim) of
- WinSize -> ok;
- NewSize ->
- %%set(Dim, win(), NewSize+winadj(Dim))
- set_old_win_size(Dim, NewSize),
- gs:config(win(), {Dim, NewSize})
- end
- end.
-
-get_wanted_winsize(Dim, Size) ->
- Max = maxsize(Dim), Min = minsize(Dim),
- if Size > Max -> Max;
- Size < Min -> Min;
- true -> Size
- end.
-
-set_old_win_size(Dim, Size) -> put({Dim, winsize}, Size).
-old_win_size(Dim) -> get({Dim, winsize}).
-
-
-%%--------------------------------------------------------------------
-%%
-%% user_driven_resize
-%%
-%% This is when the user drags the window to some size. This is
-%% basically the same as a tree resize, only this time the window
-%% itself must not be fiddled with. When the window has been
-%% resized this way then normal tree driven resize is not allow
-%% to alter the size in that dimension. User overrides.
-%%
-user_driven_resize(W, H) ->
- gs:config(win(), {configure, false}),
- check_user_resize(width, W),
- check_user_resize(height, H),
- check_scroll_region(get({width, tree}), get({height, tree}),
- gs:read(canvas(), scrollregion)),
- gs:config(win(), {configure, true}).
-
-check_user_resize(Dim, Size) ->
- case old_win_size(Dim) of
- Size -> false;
- _ ->
- put({Dim, user_resize}, true),
- set_old_win_size(Dim, Size),
- fit_tree_to_win(Dim, get({Dim, tree}))
- end.
-
-
-
-%%--------------------------------------------------------------------
-%%
-%% General resizing routines
-%%
-%% fit_tree_to_win - Will fit the canvas into a pre-sized window in
-%% one dimension.
-%%
-fit_tree_to_win(Dim, TreeSize) ->
- Size = gs:read(win(), Dim) - winadj(Dim),
- set_canvas_offset(Dim, Size, TreeSize),
- set_button_width(Dim, Size),
- if TreeSize > Size ->
- gs:config(canvas(), {trans_dim2vh(Dim), trans_dim2enable(Dim)});
- TreeSize < Size ->
- gs:config(canvas(), {trans_dim2vh(Dim), false});
- true ->
- gs:config(canvas(), {trans_dim2vh(Dim), false})
- end.
-
-
-%%------------------------------
-%% Set the canvas width and displacement in x.
-set_canvas_offset(height, Size, _) ->
- gs:config(canvas(), {height, Size});
-set_canvas_offset(width, Size, Size) ->
- gs:config(canvas(), [{x, 0}, {width, Size}]);
-set_canvas_offset(width, Size, TreeSize) when Size<TreeSize ->
- gs:config(canvas(), [{x, 0}, {width, Size}]);
-set_canvas_offset(width, Size, TreeSize) when Size>TreeSize->
- Val = trunc((Size-TreeSize)/2),
- gs:config(canvas(), [{x, Val}, {width, Size-Val}]).
-
-%%------------------------------
-%% Set the button area width
-set_button_width(height,_) -> ok;
-set_button_width(width, W) ->
- gs:config(bcanvas(), [{width, W}]),
- gs:config(bframe(), [{width, W}]),
- gs:config(bline(), [{coords, nice_line_coords(W, ?BUTTAREA_H)}]).
-
-
-%%------------------------------
-%% Update the scrollregion size if needed.
-check_scroll_region(W, H, {_, _, W, H}) -> ok;
-check_scroll_region(W, H, {_, _, _, _}) ->
- gs:config(canvas(), {scrollregion, {0, 0, W, H}}).
-
-
-%% Window sizing primitives
-winadj(width) -> 0;
-winadj(height) -> ?BUTTAREA_H.
-maxsize(width) -> ?MAXWIDTH;
-maxsize(height) -> ?MAXHEIGHT.
-minsize(width) -> ?MINWIDTH;
-minsize(height) -> ?MINHEIGHT.
-
-
-
-trans_dim2vh(width) -> hscroll;
-trans_dim2vh(height) -> vscroll.
-trans_dim2enable(width) -> bottom;
-trans_dim2enable(height) -> right.
-
-
-
-
-
-%%------------------------------------------------------------
-%% Global Window info
-
-winroot() -> get(winroot).
-win() -> get(win).
-canvas() -> get(canvas).
-bframe() -> get(bframe).
-bcanvas() -> get(bcanvas).
-bline() -> get(bline).
-set_winroot(X) -> put(winroot, X).
-set_win(X) -> put(win, X).
-set_canvas(X) -> put(canvas, X).
-set_bframe(X) -> put(bframe, X).
-set_bcanvas(X) -> put(bcanvas, X).
-set_bline(X) -> put(bline, X).
-
-sup_col() -> ?darkkhaki.
-%%work_col() -> ?orange.
-bg() -> ?palegoldenrod.
-line_col() -> ?peachpuff4. %% saddlebrown.darkgoldenrod
-f_line_col() -> ?royalblue. %% saddlebrown.darkgoldenrod
-sec_line_col() -> ?red.
-win_col() -> bg(). %%darkolivegreen.
-
-sel_col() -> ?darkgrey.
-de_sel_col() -> ?lightgrey.
-set_selected(Id)-> put(selected, Id).
-selected() -> get(selected).
-
-scaley(Y) -> 55*Y.
-radius() -> 10.
-
-destroy(undefined) -> true;
-destroy(L) when is_list(L) -> lists:foreach(fun(X) -> destroy(X) end , L);
-destroy(Win) -> gs:destroy(Win).
-
diff --git a/lib/appmon/src/appmon_dg.erl b/lib/appmon/src/appmon_dg.erl
deleted file mode 100644
index f53defa946..0000000000
--- a/lib/appmon/src/appmon_dg.erl
+++ /dev/null
@@ -1,205 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%------------------------------------------------------------
-%%
-%% Digraph handling for process view GUI. Feeble attempt at data
-%% separation. Provides functional interface to the data structures
-%% vdata and edata, v for vertex and e for edge.
-%%
-%%------------------------------------------------------------
--module(appmon_dg).
-
--include("appmon_dg.hrl").
-
-%% Exports for vertices
--export([get/3, get/2, set/4, av/3, add/4, del/2, visited/3]).
-
-%% Exports for edges
--export([eget/2, eget/3, eset/4, eadd/4, edel/2, ae/3]).
-
-%% Exports for convenience
--export([print_dg/1]).
-
-
-%%------------------------------------------------------------
-
-
-eget(all, DG) ->
- digraph:edges(DG).
-
-eget(data, DG, E) ->
- case digraph:edge(DG, E) of
- {_, _V1, _V2, Data} -> Data;
- _Other -> false
- end;
-eget(edge, DG, {V1, V2}) ->
- case digraph:edge(DG, {V1, V2}) of
- {E, W1, W2, ED} -> {E, W1, W2, ED};
- Other ->
- case digraph:edge(DG, {V2, V1}) of
- {E, W1, W2, ED} -> {E, W1, W2, ED};
- Other -> false
- end
- end;
-
-%% Weight in edge name
-eget(edge, DG, {V1, V2, Weight}) ->
- case digraph:edge(DG, {V1, V2, Weight}) of
- {E, W1, W2, ED} -> {E, W1, W2, ED};
- _Other -> false
- end;
-eget(in, DG, V) ->
- efilter(digraph:in_edges(DG, V)).
-
-efilter(Es) ->
- lists:filter(fun({_V1, _V2, primary}) -> true;
- (_E) -> false end,
- Es).
-
-eset(ref, DG, E, Ref) ->
- {E2, _V1, _V2, D} = eget(edge, DG, E),
- update_e(DG, E2, D#edata{ref=Ref});
-eset(line, DG, E, Line) ->
- {E2, _V1, _V2, D} = eget(edge, DG, E),
- update_e(DG, E2, D#edata{line=Line}).
-
-edel(DG, E) ->
- digraph:del_edge(DG, E).
-
-eadd(DG, E, D, Ref) ->
- case eget(edge, DG, E) of
- {_, _, _, ED} when is_record(ED, edata), ED#edata.ref == Ref ->
- known;
- {_, _, _, ED} when is_record(ED, edata), ED#edata.ref /= Ref ->
- update_e(DG, E, ED#edata{ref=Ref}),
- updated;
- _Other ->
- ae(DG, E, D)
- end.
-
-ae(DG, {V1, V2, Weight}, D) ->
- digraph:add_edge(DG, {V1, V2, Weight}, V1, V2, D).
-
-update_e(DG, {V1, V2, Weight}, D) ->
- digraph:del_edge(DG, {V1, V2, Weight}),
- digraph:add_edge(DG, {V1, V2, Weight}, V1, V2, D).
-
-%% Filter destination vertex from a list of edges
-vfilter(Vs) ->
- lists:map(fun({_V1, V2, _Weight}) -> V2;
- ({_V1, V2}) -> V2
- end, Vs).
-
-get(all, DG) ->
- digraph:vertices(DG).
-
-get(data, DG, {V1, V2}) ->
- case digraph:edge(DG, {V1, V2}) of
- {_,_,_,Data} -> Data;
- _Other -> false
- end;
-get(data, DG, V) ->
- case digraph:vertex(DG, V) of
- {_,Data} -> Data;
- _Other -> false
- end;
-
-%% Return all children of vertex V (those which V has edges to)
-get(out, DG, V) ->
- vfilter(efilter(digraph:out_edges(DG, V)));
-get(in, DG, V) ->
- digraph:in_neighbours(DG, V);
-get(edges, DG, V) ->
- digraph:edges(DG, V);
-get(w, DG, V) ->
- Data = get(data, DG, V),
- Data#vdata.width;
-get(x, DG, V) ->
- Data = get(data, DG, V),
- Data#vdata.x.
-
-set(type, DG, V, Type) ->
- D = get(data, DG, V),
- av(DG, V, D#vdata{type=Type});
-
-set(ref, DG, V, Ref) ->
- D = get(data, DG, V),
- av(DG, V, D#vdata{ref=Ref});
-
-set(y, DG, V, Y) ->
- D = get(data, DG, V),
- av(DG, V, D#vdata{y=Y});
-
-set(data, DG, V, D) when is_record(D, vdata)->
- av(DG, V, D);
-
-set(x, DG, V, X) ->
- D = get(data, DG, V),
- if D#vdata.x /= X ->
- av(DG, V, D#vdata{x=X});
- true -> true
- end.
-
-visited(DG, {V1, V2}, Ref) -> % for edge
- D = eget(data, DG, {V1, V2}),
- if is_record(D, edata), D#edata.ref == Ref -> true;
- true -> false
- end;
-visited(DG, V, Ref) ->
- D = get(data, DG, V),
- if is_record(D, vdata), D#vdata.ref == Ref -> true;
- true -> false
- end.
-
-add(DG, V, D, Ref) ->
- case get(data, DG, V) of
- D2 when is_record(D2, vdata), D2#vdata.ref==Ref ->
- io:format("Ooops in ~p:add vertex~n", [?MODULE]),
- known;
- D2 when is_record(D2, vdata) ->
- %%io:format("~p touch vertex ~p~n", [self(), V]),
- set(ref, DG, V, Ref),
- set(type, DG, V, D#vdata.type),
- save_coords(DG, V),
- updated;
- _Other ->
- av(DG, V, D), added
- end.
-
-save_coords(DG, V) ->
- D = get(data, DG, V),
- D2 = D#vdata{origx=D#vdata.x, origy=D#vdata.y},
- av(DG, V, D2).
-
-del(DG, V) ->
- digraph:del_vertex(DG, V).
-
-
-av(DG, V, D) ->
- digraph:add_vertex(DG, V, D).
-
-print_dg(DG) ->
- io:format("Vertices:~n", []),
- lists:foreach(fun(V) -> io:format(" ~p ~p~n",
- [V, get(data, DG, V)]) end,
- get(all, DG)),
- io:format("Edges:~n", []),
- lists:foreach(fun(V) -> io:format(" ~p ~p~n",
- [V, eget(edge, DG, V)]) end,
- eget(all, DG)),
- true.
diff --git a/lib/appmon/src/appmon_dg.hrl b/lib/appmon/src/appmon_dg.hrl
deleted file mode 100644
index c3485cf1fd..0000000000
--- a/lib/appmon/src/appmon_dg.hrl
+++ /dev/null
@@ -1,45 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-
-
-
-%%
-%% The dg package record definitions
-%%
-%% This is the declarations of the datastructures used for the
-%% application monitoring software. All fields are reserved for the
-%% implementation except those stated otherwise
-%%
-
--record(vdata, {ref, %
- type, %
- x, %
- origx=-1, %
- y, %
- origy=-1, %
- txt="", % Set by user
- width=0, % Set by user
- sym_obj=undefined, %
- txt_obj}). %
-
-
-
--record(edata, {ref, %
- line, %
- weight}). %
-
diff --git a/lib/appmon/src/appmon_lb.erl b/lib/appmon/src/appmon_lb.erl
deleted file mode 100644
index 3ab6ce58e6..0000000000
--- a/lib/appmon/src/appmon_lb.erl
+++ /dev/null
@@ -1,696 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-
-%%% Due to the fact that the application buttons in the appmon window
-%%% gets too small to read when the number of applications increases,
-%%% this listbox window has been created.
-%%% Because of the limitations of GS a listbox was chosen to keep
-%%% the nodes and applications. When it's possible to scroll a frame I
-%%% think one should put in scrollbars in the appmon main window.
-%%% The listbox solution is too slow with lots of applications.
-%%%
-%%% In the listbox the nodes are shown with their applications beneith.
-%%% By double clicking on an application name, or a single click and
-%%% then pressing the load button, its application window is started.
-
--module(appmon_lb).
--compile([{nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,listbox,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
--export ([
- start/1,
- stop/1,
- add_node/2,
- remove_node/2,
- add_apps/3,
- remove_app/3,
- open_win/2,
- update_status/3
- ]).
-
--export ([init/1]).
-
--define (LB_W, 200). % List box width
--define (LB_H, 400). % List box height
--define (BUTT_W, 100).
--define (WIN_W, ?LB_W + ?BUTT_W + 25). % Window width
--define (WIN_H, ?LB_H + 20). % Window height
-
-
-%%% #node{}
-%%%
-%%% The record 'node' contains the name of the node, its status and
-%%% the applications running on that node.
-%%%
-%%% node == atom ()
-%%% status == alive || dead
-%%% apps == [#app{}]
-%%%
-
--record (node, {node, %% Name of the node
- status = alive,
- apps = []}).
-
-%%% #app{}
-%%%
-%%% The record 'app' contains the name of the application and its pid
-%%%
-%%% app == atom ()
-%%% pid == pid ()
-%%%
-
--record (app, {app,
- pid}).
-
-
-%%% #win{}
-%%%
-%%% The record 'win' contains the pid of the listbox window,
-%%% its x and y position, its width and height.
-%%%
-%%% pid == win_closed || pid ()
-%%% x == integer ()
-%%% y == integer ()
-%%% width == integer ()
-%%% height == integer ()
-%%%
-
--record (win, {pid = win_closed,
- x = 50,
- y = 50,
- width = ?WIN_W,
- height = ?WIN_H}).
-
-
-
-%%% Every function in the interface is called with the pid
-%%% of this recieve loop, called 'LbPid'.
-%%%
-
-
-%%% start /1
-%%%
-%%% start returns the pid of the spawned receive loop or
-%%% it will call exit/2 after a timeout.
-%%%
-%%% Pre:
-%%% CallingPid == pid ()
-%%%
-%%% Def:
-%%% pid () || exit/2
-%%%
-
-start (CallingPid) ->
- PidInit = spawn (?MODULE, init, [CallingPid]),
-
- %% Wait for a initialization completion message from
- %% the spawned process before returning its Pid.
-
- receive
- {initialization_complete, PidInit} ->
- PidInit
-
- %% (Conditional) Failure to start within the time limit
- %% will result in termination (Timeout may be infinite).
-
- after
- 60000 ->
- exit (PidInit, kill),
- exit ({startup_timeout, ?MODULE})
- end.
-
-
-
-%%% stop /1
-%%%
-%%% stop exits the receive loop
-%%%
-%%% Post:
-%%% exiting the receive loop
-%%%
-
-stop (LbPid) ->
- call (LbPid, stop).
-
-
-
-%%% add_node /2
-%%%
-%%% add_node adds the given node to the DB list.
-%%%
-%%% Pre:
-%%% Node == atom ()
-%%%
-%%% Post:
-%%% Node is added to the DB list
-%%%
-
-add_node (LbPid, Node) ->
- call (LbPid, {add_node, Node}).
-
-
-
-%%% remove_node /2
-%%%
-%%% remove_node removes the given node from the DB list.
-%%%
-%%% Pre:
-%%% Node == atom ()
-%%%
-%%% Post:
-%%% Node is removed from the DB list
-%%%
-
-remove_node (LbPid, Node) ->
- call (LbPid, {remove_node, Node}).
-
-
-
-%%% add_apps /3
-%%%
-%%% add_apps add the given applications to the given
-%%% node in the DB list.
-%%%
-%%% Pre:
-%%% Apps == [App]
-%%% App == {Name, Pid}
-%%% Name == atom ()
-%%% Pid == pid ()
-%%% Node == atom ()
-%%%
-%%% Post:
-%%% Node#node{apps = Apps}
-%%%
-
-add_apps (LbPid, Apps, Node) ->
- call (LbPid, {add_apps, Apps, Node}).
-
-
-
-%%% remove_app /3
-%%%
-%%% remove_app remove the given application from the
-%%% given node in the DB list.
-%%%
-%%% Pre:
-%%% App == atom ()
-%%% Node == atom ()
-%%%
-%%% Def:
-%%% Node#node{apps = OldApps - App}
-%%%
-
-remove_app (LbPid, App, Node) ->
- call (LbPid, {remove_app, App, Node}).
-
-
-
-%%% open_win /3
-%%%
-%%% open_win opens the listbox window with the given nodes
-%%% and their applications.
-%%%
-%%% Pre:
-%%% Nodes_apps == [{Node, Status, Apps}]
-%%% Node == atom ()
-%%% Status == alive || dead
-%%% Apps == [App]
-%%% App == {AppName, AppPid}
-%%% AppName == atom ()
-%%% AppPid == pid ()
-%%%
-%%% Post:
-%%% Window with listbox
-%%%
-
-open_win (LbPid, Nodes_apps) ->
- call (LbPid, {open_win, Nodes_apps}).
-
-
-
-%%% update_status /3
-%%%
-%%% update_status changes the status for the given node.
-%%%
-%%% Pre:
-%%% Node == atom ()
-%%% Status == alive || dead
-%%%
-%%% Def:
-%%% Node#node{status = Status}
-%%%
-
-update_status (LbPid, Node, Status) ->
- call (LbPid, {update_status, Node, Status}).
-
-
-
-%%% call /2
-%%%
-%%% call sends the given action to the listbox receive loop.
-%%%
-%%% Pre:
-%%% Action == atom () || tuple ()
-%%%
-
-call (LbPid, Action) ->
- LbPid ! Action.
-
-
-
-%%% init /1
-%%%
-
-init (CallingPid) ->
- CallingPid ! {initialization_complete, self ()},
- loop (#win{}, []).
-
-
-
-%%% loop /2
-%%%
-%%% loop is the recive loop for the listbox window process.
-%%%
-%%% Pre:
-%%% Win == #win{}
-%%% Data == [#node{}]
-%%%
-
-loop (Win, Data) ->
- receive
- {add_node, Node} ->
- NewData = add_node_1 (Node, Data),
- update (NewData, Win#win.pid),
- loop (Win, NewData);
-
- {remove_node, Node} ->
- NewData = dead_node (Node, Data),
- update (NewData, Win#win.pid),
- loop (Win, NewData);
-
- {add_apps, Apps, Node} ->
- NewData = add_apps_1 (Apps, Node, Data),
- update (NewData, Win#win.pid),
- loop (Win, NewData);
-
- {remove_app, App, Node} ->
- NewData = remove_app_1 (App, Node, Data),
- update (NewData, Win#win.pid),
- loop (Win, NewData);
-
- {open_win, Nodes_apps} ->
- NewData = parse_data ([], Nodes_apps),
- NewWin = Win#win{pid = init_win ({Win#win.x, Win#win.y})},
- update (NewData, NewWin#win.pid),
- loop (NewWin, NewData);
-
- {update_status, Node, Status} ->
- NewData = update_status_1 (Node, Status, Data),
- update (NewData, Win#win.pid),
- loop (Win, NewData);
-
- stop ->
- true;
-
-
- {gs, _Id, destroy, _D, _Arg} ->
- bye;
-
- {gs, _Id, configure, _D, [W, H | _]} ->
- NewWin = configure (Win#win.pid, W, H),
- loop (NewWin, Data);
-
- {gs, lb, doubleclick, _, _Txt} ->
- load_app (gs:read (lb, selection), Data),
- loop (Win, Data);
-
- {gs, lb, click, _, _Txt} ->
- loop (Win, Data);
-
- {gs, close, click, _D, _Arg} ->
- case Win#win.pid of
- win_closed ->
- true;
-
- _opened ->
- gs:destroy (Win#win.pid)
- end,
- loop (#win{}, Data);
-
- {gs, load, click, _D, _Txt} ->
- load_app (gs:read (lb, selection), Data),
- loop (Win, Data);
-
- {gs, clear, click, _D, _Txt} ->
- gs:config (lb, {selection, clear}),
- loop (Win, Data);
-
-
- _ ->
- loop (Win, Data)
- end.
-
-
-
-%%% init_win /1
-%%%
-
-init_win ({X, Y}) ->
- GS = gs:start (),
-
- Win = gs:window (win, GS, [{x, X},
- {y, Y},
- {width, ?WIN_W},
- {height, ?WIN_H},
- {title,"Appmon: nodes and applications"},
- {configure, true}]),
-
- gs:listbox (lb, Win, [{x, 5},
- {y, 10},
- {width, ?LB_W},
- {height, ?LB_H},
- {vscroll, right},
- {hscroll, bottom},
- {selectmode, single},
- {click, true},
- {doubleclick, true}]),
-
- gs:button (load, Win, [{x, ?WIN_W - ?BUTT_W - 10},
- {y, ?WIN_H - 120},
- {width, ?BUTT_W},
- {label, {text, "Load"}}]),
-
- gs:button (clear, Win, [{x, ?WIN_W - ?BUTT_W - 10},
- {y, ?WIN_H - 80},
- {width, ?BUTT_W},
- {label, {text, "Clear"}}]),
-
- gs:button (close, Win, [{x, ?WIN_W - ?BUTT_W - 10},
- {y, ?WIN_H - 40},
- {width, ?BUTT_W},
- {label, {text, "Close"}}]),
-
- gs:config (Win, {map, true}),
- Win.
-
-
-
-%%% add_node_1 /2
-%%%
-%%% add_node adds the given node in the given window
-%%% with its appications in a listbox.
-%%%
-
-add_node_1 (Node, []) ->
- [new_node (Node)];
-
-add_node_1 (Node, [H | T]) ->
- T1 = lists:keysort (#node.node, [new_node (Node) | T]),
- [H | T1].
-
-
-
-%%% dead_node /2
-%%%
-%%% dead_node returns a list with the given node's
-%%% status changed to dead.
-%%%
-
-dead_node (Node, Data) ->
- case lists:keysearch (Node, #node.node, Data) of
- {value, Node_rec} ->
- L = Node_rec#node.apps,
- lists:keyreplace (Node, #node.node,
- Data, new_node (Node, dead, L));
-
- _false ->
- Data
- end.
-
-
-
-
-
-%%% add_apps_1 /3
-%%%
-%%% add_apps_1 returns a list with the given application
-%%% into the old list inserted.
-%%%
-
-add_apps_1 (Apps, Node, Data) ->
- case lists:keysearch (Node, #node.node, Data) of
- {value, _Node_rec} ->
- NewApps = parse_apps (Apps, []),
- lists:keyreplace (Node, #node.node,
- Data, new_node (Node, NewApps));
-
- _false ->
- Data
- end.
-
-
-
-%%% remove_app_1 /3
-%%%
-%%% remove_app_1 returns a list with the given application
-%%% removed from the old list.
-%%%
-
-remove_app_1 (App, Node, Data) ->
-
- case lists:keysearch (Node, #node.node, Data) of
- {value, Node_rec} ->
- L = Node_rec#node.apps,
- L2 = lists:keydelete (App, #app.app, L),
- lists:keyreplace(Node, #node.node, Data, new_node(Node,L2));
-
- _false ->
- Data
- end.
-
-
-
-%%% configure /3
-%%%
-%%% configure returns a win record after the window has been
-%%% configured.
-%%%
-
-configure (WPid, W, H) ->
- X = gs:read (WPid, x),
- Y = gs:read (WPid, y),
-
- gs:config (lb, [{width, W - ?BUTT_W - 25}, {height, H - 20}]),
- gs:config (load, [{x, W - ?BUTT_W - 10}, {y, H - 120}]),
- gs:config (clear, [{x, W - ?BUTT_W - 10}, {y, H - 80}]),
- gs:config (close, [{x, W - ?BUTT_W - 10}, {y, H - 40}]),
-
- #win{pid = WPid, x = X, y = Y, width = W, height = H}.
-
-
-
-
-
-%%% load_app /2
-%%%
-%%% load_app opens the application window by calling
-%%% the appmon_a module.
-%%%
-
-load_app ([], _Data) -> %% no application chosen
- ok;
-
-load_app ([Index], Data) ->
- App = gs:read (lb, {get, Index}),
-
- case string:substr (App, 1, 3) of
- " " ->
- AppName = list_to_atom (string:substr (App, 4)),
-
- case get_node (AppName, Index, Data) of
- no_node ->
- ok;
-
- NodeName ->
- appmon_a:start (NodeName, AppName)
- end;
-
- _ ->
- ok
- end.
-
-
-
-%%% update_status_1 /3
-%%%
-%%% update_status_1 returns a list with the given
-%%% node's status updated.
-%%%
-
-update_status_1 (Node, Status, Data) ->
- case lists:keysearch (Node, #node.node, Data) of
- {value, Node_rec} ->
- lists:keyreplace (Node,
- #node.node,
- Data,
- new_node(Node,Status,Node_rec#node.apps));
-
- _not_found ->
- Data
- end.
-
-
-
-%%% update /2
-%%%
-%%% update updates the listbox with new data.
-%%%
-
-update (_Data, win_closed) ->
- true;
-
-update (Data, _Win) ->
- gs:config (lb, clear),
- lb_print (Data).
-
-
-
-%%% lb_print /1
-%%%
-%%% lb_print prints the list into the listbox.
-%%%
-
-lb_print ([]) ->
- ok;
-
-lb_print ([#node{node = Node, status = Status, apps = Apps} | T]) ->
- Str = io_lib:format ("~p (~p)", [Node, Status]),
- gs:config (lb, {add, Str}),
-
- case Status of
- alive ->
- lb_print_apps (Apps);
-
- _dead ->
- gs:config (lb, {add, ""}),
- ok
- end,
-
- lb_print (T).
-
-
-
-%%% lb_print_apps /1
-%%%
-%%% lb_print_apps prints the applications into the listbox.
-%%%
-
-lb_print_apps ([]) ->
- ok;
-
-lb_print_apps ([#app{app = App} | T]) ->
- Str = io_lib:format (" ~p", [App]),
- gs:config (lb, {add, Str}),
- lb_print_apps (T).
-
-
-
-%%% new_node /1, 2, 3
-%%%
-%%% new_node returna a new node record constructed
-%%% with the given data
-%%%
-
-new_node (Node) ->
- #node{node = Node}.
-
-new_node (Node, Apps) ->
- #node{node = Node, apps = Apps}.
-
-new_node (Node, Status, Apps) ->
- #node{node = Node, status = Status, apps = Apps}.
-
-
-
-%%% new_app /2
-%%%
-%%% new_app returns a new application record
-%%% constructed with the given data.
-%%%
-
-new_app (App, Pid) ->
- #app{app = App, pid = Pid}.
-
-
-
-%%% parse_apps /2
-%%%
-%%% parse_apps returns a list of application records.
-%%%
-
-parse_apps ([], [H | T]) ->
- [H | lists:keysort (#app.app, T)];
-
-parse_apps ([App | T], L) ->
- Pid = element (1, App),
- Name = element (2, App),
- parse_apps (T, [new_app (Name, Pid) | L]).
-
-
-
-%%% get_node /3
-%%%
-%%% get_node returns the node from the given list
-%%% or else no_node if it doesn't exists.
-%%%
-
-get_node (_App, _Index, []) ->
- no_node;
-
-get_node (App, Index, [Node | T]) ->
- Length = length (Node#node.apps) + 1,
-
- case Length < Index of
- true ->
- get_node (App, Index - Length, T);
-
- false ->
- Node#node.node
- end.
-
-
-
-%%% parse_data /2
-%%%
-%%% parse_data returns a list with node records.
-%%%
-
-parse_data (Data, []) ->
- Data;
-
-parse_data (Data, [{Node, Status, Apps} | T]) ->
- Apps_1 = parse_apps (Apps, []),
- parse_data ([new_node (Node, Status, Apps_1) | Data], T).
-
-
-
diff --git a/lib/appmon/src/appmon_place.erl b/lib/appmon/src/appmon_place.erl
deleted file mode 100644
index fe1e909d7c..0000000000
--- a/lib/appmon/src/appmon_place.erl
+++ /dev/null
@@ -1,192 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%------------------------------------------------------------
-%%
-%% Places a Digraph in a tree-like manner. The vertices in the digraph
-%% is updated with x and y positions. The operation is not atomic. The
-%% digraph may be cyclic but edges must then have been labeled primary
-%% or secondary and the set of primary links must make up a non-cyclic
-%% graph (a tree).
-%%
-%%
-%% IMPLEMENTATION DETAIL
-%% ---------------------
-%%
-%% The placement algorithm is straightforward, place the
-%% nodes in the vertical plane (y-plane) and then place
-%% nodes in the horisontal plane (x-plane).
-%%
-%% First all nodes are placed in the y (vertical) plane
-%% by a standard traversing of the tree. We then place
-%% the tree in the x (horisontal) plane. Each node is
-%% placed in the middle of its children as far to the
-%% left as possible, preferably at the left margin. Two
-%% things can make a node not be placed at the left
-%% margin and that is the case when a previous node has
-%% been placed at the same vertical level as the node we
-%% are trying to place (thus forcing a placement further
-%% to the right), and the second case is when the middle
-%% of the subtree of the node is not at the left margin
-%% (which it only is when the subtree is empty). The
-%% algorithm obviously depends on keeping track of the
-%% rightmost positions at all depths, and this
-%% information is also usefull when calculating the width
-%% of the tree.
-%%
-%%
-%%
-%%------------------------------------------------------------
-
-
-
--module(appmon_place).
-
--export([place/2]).
-
--include("appmon_dg.hrl").
-
-
--import(lists, [foreach/2, foldl/3]).
-
-
-place(DG, Root) ->
- case appmon_dg:get(data, DG, Root) of
- false -> [0];
- _Other ->
- placey(DG, Root, 1),
- placex(DG, Root, [])
- end.
-
-
-%%------------------------------------------------------------
-%%
-%%
-%% Placing a graph in y plane
-%% --------------------------
-%%
-%% Place nodes in the graph in the y plane rather stupidly
-%%
-
-placey(DG, V, Y) ->
- appmon_dg:set(y, DG, V, Y),
- Y1 = Y+1,
- foreach(fun(C) -> placey(DG, C, Y1) end, appmon_dg:get(out, DG, V)).
-
-
-
-
-%%------------------------------------------------------------
-%%
-%%
-%% Place a tree in the x plane
-%% ---------------------------
-%%
-%% Place nodes in the tree in the x plane. The goal of the x
-%% placement is to place all nodes as far to the left as possible
-%% while maintaining a nice tree shape.
-%%
-%% To place a node we must first place its children, the
-%% intention is to place the current node in the middle and above
-%% its children. The calc_mid function will place the node in the
-%% middle of its children. If the node should be placed further
-%% to the right than the middle of its children, then its
-%% children are moved DeltaX positions to be balanced under the
-%% node. Thus at the end the node and its children form a nice
-%% looking tree.
-%%
-%% The function also maintains the 'rightmost x on each level'
-%% list LastX by putting its own position on top of the list
-%%
-%%
-
-placex(DG, V, LastX) ->
- Ch = appmon_dg:get(out, DG, V),
- ChLX = foldl(fun(C, Accu) -> placex(DG, C, Accu) end,
- tll(LastX),
- Ch),
-
- Width = appmon_dg:get(w, DG, V),
- MyX = calc_mid(DG, Width, Ch),
- DeltaX = calc_delta(MyX, hdd(LastX)+spacex()),
-
- appmon_dg:set(x, DG, V, MyX),
- move(DG, V, [MyX+Width | ChLX], DeltaX).
-
-
-%%------------------------------------------------------------
-%%
-%%
-%% Move a subtree DeltaX positions to the right
-%% --------------------------------------------
-%%
-%% Used when moving children to balance under an already placed
-%% parent. Note that the correct LastX depends on the ordering of
-%% the children which must be the same as when the children were
-%% first placed. It must be ensured that hdd(NewLastX) is the
-%% same as hdd(NewLastX)+DeltaX. If the order of children is
-%% preserved then so is hdd(LastX). Another solution would be to
-%% set hdd(LastX) from the parent
-%%
-%% Note the two base clauses, one for the no-children case and
-%% one optimisation clause (unneccessary perhaps) for DeltaX==0
-%%
-
-move(_DG, _L, LastX, 0) -> LastX;
-move(DG, V, LastX, DeltaX) -> move2(DG, V, LastX, DeltaX).
-
-move2(DG, V, LastX, DeltaX) ->
- NewX = appmon_dg:get(x, DG, V)+DeltaX,
- appmon_dg:set(x, DG, V, NewX),
- ChLX = foldl(fun(C, LX) -> move2(DG, C, LX, DeltaX) end,
- tll(LastX),
- appmon_dg:get(out, DG, V)),
- [erlang:max(NewX+appmon_dg:get(w, DG, V), hdd(LastX)) | ChLX].
-
-
-%%------------------------------------------------------------
-%%
-%%
-%% Calculate the middle position of the children
-%% ---------------------------------------------
-%%
-%% Calculates the mid x position for a list of children. This
-%% position is later compared to the position dictated by LastX
-%% in calc_delta.
-
-calc_mid(_DG, _Width, []) -> 0;
-calc_mid(DG, Width, ChList) ->
- LeftMostX = appmon_dg:get(x, DG, hd(ChList)),
- Z2 = lists:last(ChList),
- RightMostX = appmon_dg:get(x, DG, Z2)+appmon_dg:get(w, DG, Z2),
- trunc((LeftMostX+RightMostX)/2)-trunc(Width/2).
-
-calc_delta(Mid, Right) ->
- if Right>Mid -> Right-Mid;
- true -> 0
- end.
-
-
-
-%% Special head and tail
-%% Handles empty list in a non-standard way
-tll([]) -> [];
-tll([_|T]) -> T.
-hdd([]) -> 0;
-hdd([H|_]) -> H.
-
-spacex() -> 20. % Should be macro??
diff --git a/lib/appmon/src/appmon_txt.erl b/lib/appmon/src/appmon_txt.erl
deleted file mode 100644
index 056265af90..0000000000
--- a/lib/appmon/src/appmon_txt.erl
+++ /dev/null
@@ -1,307 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%------------------------------------------------------------
-%%
-%% Simple text viewer
-%%
-%%------------------------------------------------------------
-
--module(appmon_txt).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,1}}]).
--export([start/0, start/1, print/1, fprint/1]).
-
-%% gen_server stuff
--export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- terminate/2]).
-
--define(LOADTXT, "Load file").
--define(SAVETXT, "Save file").
--define(SAVEASTXT, "Save as").
--define(CLOSETXT, "Close").
--define(HELPTXT, "Help").
-
-%%------------------------------------------------------------
-%%
-%% start/0 starts an open text viewer that can be filled with
-%% whatever.
-%%
-%%------------------------------------------------------------
-start() ->
- start([]).
-
-%%------------------------------------------------------------
-%%
-%% start(ListOfOptions) starts an open text viewer with options
-%%
-%% Options can be
-%% {file, FileName} - insert contents of file
-%% locked - the text cannot be edited
-%% {text, Text} - insert text at startup
-%%
-%%------------------------------------------------------------
-start(Opts) ->
- gen_server:start_link({local, ?MODULE}, ?MODULE, Opts, []).
-
-%% Start a text viewer if necessary
-print(Txt) ->
- catch start(),
- gen_server:call(?MODULE, {add_txt, Txt}),
- ok.
-
-fprint(File) ->
- catch start(),
- gen_server:call(?MODULE, {add_file, File}),
- ok.
-
-
-%%------------------------------------------------------------
-%% gen server admin
-
-init(Opts) ->
- process_flag(trap_exit, true),
- setup_base_win(),
- default_status(),
- setup_opts(Opts),
- {ok, []}.
-
-terminate(_Reason, _State) ->
- ok.
-
-%%------------------------------------------------------------
-%% gen server stuff
-handle_call({add_txt, Txt}, _From, State) ->
- do_insert_text(Txt),
- scroll_to_last_line(),
- {reply, ok, State};
-handle_call({add_file, FileName}, _From, State) ->
- do_load_file(FileName),
- {reply, ok, State};
-handle_call(_Request, _From, State) ->
- {reply, ok, State}.
-handle_cast(_Request, State) ->
- {noreply, State}.
-handle_info({gs, _, click, _, [?CLOSETXT|_]}, State) ->
- {stop, normal, State};
-handle_info({gs, _, click, _, [?LOADTXT|_]}, State) ->
- ui_load(),
- {noreply, State};
-handle_info({gs, _, configure, _, [W, H | _]}, State) ->
- resize(W, H),
- {noreply, State};
-
-handle_info({gs, _, destroy, _, _}, State) ->
- {stop, normal, State};
-handle_info(Request, State) ->
- io:format("~p got info: ~p~n", [self(), Request]),
- print_status("Not implemented"),
- {noreply, State}.
-
-
-%%------------------------------------------------------------
-%% Handle options
-
-setup_opts([Opt|Opts]) ->
- setup_opt(Opt),
- setup_opts(Opts);
-setup_opts([]) -> ok.
-
-setup_opt(Opt) ->
- case Opt of
- {file, FileName} ->
- do_load_file(FileName);
- locked ->
- do_lock();
- {text, Text} ->
- do_insert_text(Text);
- _Other ->
- ok
- end.
-
-do_load_file(FileName) ->
- case catch i_load_file(FileName) of
- ok ->
- default_status();
- _Other ->
- print_status(lists:append(["File not found: ", FileName]))
- end.
-
-i_load_file(FileName) ->
- {ok, Bin} = file:read_file(FileName),
- L = binary_to_list(Bin),
- i_do_clear(),
- do_insert_text(L),
- ok.
-
-ui_load() ->
- Title = "Load file",
- Files = get_file_list(),
- case catch ui_list_dialog(Title, "File: ", Files) of
- {ok, FileName} ->
- do_load_file(FileName);
- _Other ->
- print_status("Load cancelled")
- end.
-
-get_file_list() ->
- case file:list_dir(".") of
- {ok, FileList} -> lists:sort(FileList);
- _Other -> []
- end.
-
-do_insert_text(Text) ->
- gs:config(editor(), {insert, {'end', Text}}),
- ok.
-
-%% Scrolls editor to show the last rows
-scroll_to_last_line() ->
- H = gs:read(editor(), size),
- R = gs:read(editor(), height),
- TopRow = H-R/15,
- if TopRow > 0 -> gs:config(editor(), {vscrollpos, TopRow});
- true -> gs:config(editor(), {vscrollpos, 0})
- end,
- ok.
-
-do_lock() ->
- gs:config(editor(), {enable, false}).
-
-i_do_clear() ->
- gs:config(editor(), clear).
-
-%%------------------------------------------------------------
-%% Graphical stuff
-
-label_h() -> 20.
-menu_h() -> 29.
-
-setup_base_win() ->
- H = 400, W=580,
- LabelHeight=label_h(), MenuHeight=menu_h(),
-
- F = gs:start([{kernel,true}]),
- set_winroot(F),
-
- Win = gs:create(window, F, [{width, W}, {height, H},
- {title,"APPMON: Process Information"}]),
-
- E = gs:create(editor, Win, [{x, 0}, {y, MenuHeight},
- {width, W},
- {height, H-MenuHeight-LabelHeight-1},
- {vscroll, right}]),
- set_editor(E),
-
- L = gs:create(label, Win, [{x, 0}, {y, H-LabelHeight},
- {height,LabelHeight }, {width, W},
- {align, w}]),
- set_status(L),
- print_status("Loading"),
-
- gs:config(Win, {map, true}),
-
- MB = gs:create(menubar, Win, []),
-
- FMB = gs:create(menubutton, MB, [{label, {text, "File"}}]),
- FM = gs:create(menu, FMB, []),
- gs:create(menuitem, FM, [{label, {text, ?CLOSETXT}}]),
-
- gs:config(Win, {configure, true}),
- ok.
-
-resize(W, H) ->
- gs:config(editor(), [{width, W}, {height, H-label_h()-menu_h()}]),
- gs:config(status(), [{y, H-label_h()}, {width, W}]),
- ok.
-
-%%------------------------------------------------------------
-%% ui_list_dialog(
-%%
-%% Traditional dialog with a list box and a selection field that
-%% is updated from the list box.
-%%
-%% Returns {ok, String} if successful and something else if not
-%%
-%% Title - the name of the window
-%% LeadText - the lead text on the selection field
-%% List - a list of items that will be displayed in the list box
-%%
-%%------------------------------------------------------------
-
-ui_list_dialog(Title, LeadText, TxtList) ->
- W = 200, H = 300,
-
- Win = gs:create(window, winroot(), [{title, Title},
- {width, W},{height, H}]),
- Ok = gs:create(button, Win, [{x, 10}, {y,10},
- {width, 50}, {height, 20},
- {label, {text, "Ok"}}]),
- Cn = gs:create(button, Win, [{x, 70}, {y,10},
- {width, 50}, {height, 20},
- {label, {text, "Cancel"}}]),
-
- gs:create(label, Win, [{x, 10}, {y, 50},
- {width, 60}, {height, 20},
- {label, {text, LeadText}}]),
- Box = gs:create(entry, Win, [{x, 10}, {y, 70},
- {width, 160}, {height, 20},
- {keypress, true}]),
- List = gs:create(listbox, Win, [{x, 10}, {y, 100}, {width, 180},
- {height, 190},
- {items, TxtList}, {vscroll, right},
- {hscroll, false}, {click, true},
- {doubleclick, true},
- {keypress, true}]),
- gs:config(Win, {map, true}),
-
- RetVal = ui_load_loop(Box, List, Ok, Cn),
-
- gs:destroy(Win),
-
- RetVal.
-
-ui_load_loop(Box, List, Ok, Cn) ->
- receive
- {gs, Box, keypress, _, ['Return'|_]} ->
- {ok, gs:read(Box, text)};
- {gs, Box, keypress, _, _} ->
- ui_load_loop(Box, List, Ok, Cn);
- {gs, Ok, click, _, _} ->
- {ok, gs:read(Box, text)};
- {gs, List, doubleclick, _, [_Idx, Txt|_]} ->
- {ok, Txt};
- {gs, List, click, _, [_Idx, Txt|_]} ->
- gs:config(Box, {text, Txt}),
- ui_load_loop(Box, List, Ok, Cn);
- _Other ->
- something_else
- end.
-
-%% The status row at the bottom of the window
-set_status(Id) -> put(status_row, Id).
-status() -> get(status_row).
-print_status(Msg) -> gs:config(get(status_row), {label, {text, Msg}}).
-default_status() -> print_status("Done").
-
-set_editor(X) -> put(editor, X).
-editor() -> get(editor).
-
-winroot() -> get(winroot).
-set_winroot(X) -> put(winroot, X).
diff --git a/lib/appmon/src/appmon_web.erl b/lib/appmon/src/appmon_web.erl
deleted file mode 100644
index 048f7fa165..0000000000
--- a/lib/appmon/src/appmon_web.erl
+++ /dev/null
@@ -1,1031 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%%---------------------------------------------------------------------
-%%% File : webappmon.erl
-%%% Author : Martin G. <[email protected]>
-%%% Purpose : Frontend to the webbased version of appmon.
-%%% Created : 24 Apr 2001 by Martin G. <[email protected]>
-%%%---------------------------------------------------------------------
-
--module(appmon_web).
-
-%% The functions that the user can call to interact with the genserver
--export([init/1,handle_call/3,handle_cast/2,handle_info/2]).
--export([terminate/2,code_change/3]).
-
--export([node_info/2,application_info/2,application_env/2]).
--export([proc_info/2,trace/2]).
--export([start/0,stop/0,start_link/0]).
-
-%% Export the function that returns the configuration data needed by
-%% webtool
--export([configData/0]).
-
--behaviour(gen_server).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Start the genserver %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-start_link()->
- gen_server:start_link({local,webappmon_server},appmon_web,[],[]).
-start()->
- gen_server:start({local,webappmon_server},appmon_web,[],[]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Stop the genserver %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-stop()->
- gen_server:call(webappmon_server,stop,1000).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Get the page that shows the nodes and the apps on the sel node %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-node_info(Env,Input)->
- gen_server:call(webappmon_server,{node_data,Env,Input}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Get the application process tree %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-application_info(Env,Input)->
- gen_server:call(webappmon_server,{app_data,Env,Input}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Get the page that shows the data about the process %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-proc_info(Env,Input)->
- gen_server:call(webappmon_server,{proc_data,Env,Input}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Get the spec on the app %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-application_env(Env,Input)->
- gen_server:call(webappmon_server,{app_env,Env,Input}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Toggle the trace flag for the selected process %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-trace(Env,Input)->
- gen_server:call(webappmon_server,{trace,Env,Input}).
-
-configData()->
- {appmon,[{web_data,{"WebAppmon","/appmon/main_frame.html"}},
- {alias,{"/appmon",code:priv_dir(appmon)}},
- {alias,{erl_alias,"/erl",[appmon_web]}},
- {start,{child,{backend,{process_info,start_link,[]},
- permanent,100,worker,[process_info]}}},
- {start,{child,{{local,webappmon_server},
- {appmon_web,start_link,[]},
- permanent,100,worker,[appmon_web]}}}
- ]}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% Callback functions for the genserver %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-init(_Arg)->
- {ok,[]}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Create the different pages %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-handle_call({node_data,_Env,Input},_From,State)->
- {reply,app_and_node_sel_page(Input),State};
-
-handle_call({app_data,_Env,Input},_From,State)->
- {reply,process_tree_page(Input),State};
-
-handle_call({proc_data,_Env,Input},_From,State)->
- {reply,process_specifickation_page(Input),State};
-
-handle_call({app_env,_Env,Input},_From,State)->
- {reply,application_specifickation_page(Input),State};
-
-handle_call({trace,_Env,Input},_From,State)->
- {reply,toggle_trace(Input),State}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Shutdown the genserver %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-terminate(_,_State)->
- ok.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Callback function currently not used ... %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-handle_cast(_,State)->
- {noreply,State}.
-
-handle_info(_,State)->
- {noreply,State}.
-
-code_change(_OldVsn,State,_Extra)->
- {ok,State}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% Private functions to create the part of the sides that is common %%
-%% to all sides %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the Header for the page If we now the mimetype use that type%%
-%% otherwise use text %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-header() ->
- header("text/html").
-header(MimeType) ->
- "Content-type: " ++ MimeType ++ "\r\n\r\n".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the Htmlheader sett the title of the side to nothing if %%
-%% we dont know the name of the side %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-html_header()->
- html_header("").
-
-html_header(Part) ->
- "<HTML BGCOLOR=\"#FFFFFF\">\n" ++
- "<HEAD>\n" ++
- "<TITLE>Appmon " ++ Part ++ "</TITLE>\n" ++
- "</HEAD>\n".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Close the Html tag and if neccessay add some clean upp %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-html_end()->
- "</HTML>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% The functions that creates the whole pages by collecting %%
-%% the necessary data %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Returns the page where the user see's which nodes and apps that %%
-%% are availible for monitoring %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-app_and_node_sel_page(Input)->
- [header(),
- html_header(),
- node_body(httpd:parse_query(Input)),
- html_end()].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Returns the process tree for the application whose name is %%
-%% the first value in the Inputs key/value list %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-process_tree_page(Input)->
- [header(),
- html_header(),
- application_javascript(httpd:parse_query(Input)),
- application_body(httpd:parse_query(Input)),
- html_end()].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Send trace on or off to the process thats pid is the third arg of %%
-%% the inputs key/val list. Then it returns the process tree for the %%
-%% the application that is the first key/val pair of input %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-toggle_trace(Input)->
- send_trace(httpd:parse_query(Input)),
- [header(),
- html_header(),
- application_javascript(httpd:parse_query(Input)),
- application_body(httpd:parse_query(Input)),
- html_end()].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Creates the page that shows all information about the process that %%
-%% that is the first arg of th input key/val pairs %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-process_specifickation_page(Input)->
- [header(),
- html_header(),
- process_body(httpd:parse_query(Input)),
- html_end()].
-
-application_specifickation_page(Input)->
- [header(),
- html_header(),
- application_env_body(httpd:parse_query(Input)),
- html_end()].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The Private functions that do the job %%
-%% To build the the page that shows the applications %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Build the body of the side that shows the node name and %%
-%% the application list %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-node_body([{"node",Node}|_Rest])->
- case process_info:is_node(Node) of
- {true,Controlled_node,Name} ->
- "<BODY BGCOLOR=\"#FFFFFF\">" ++
- node_selections_javascripts() ++
- node_selection(Controlled_node) ++
- node_title() ++
- application_tree(Controlled_node,Name) ++
- "</BODY>";
-
- {false,Server_node,Name} ->
- "<BODY BGCOLOR=\"#FFFFFF\">" ++
- node_selections_javascripts() ++
- node_selection(Server_node) ++
- node_title() ++
- application_tree(Server_node,Name) ++
- "</BODY>"
- end;
-
-node_body(_Whatever)->
- node_body([{atom_to_list(node),atom_to_list(node())}]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Returns the javascript that sets a new node to monitor %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-node_selections_javascripts()->
- "<SCRIPT>
- function node_selected()
- {
- parent.frames.base_frames.location=\"../../appmon/start_info.html\"
- window.location =\"./node_info?node=\" + " ++
- "document.node_selection.nodes[document.node_selection.nodes.selectedIndex].value;
- }
- </SCRIPT>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Insert the html code that shows the combobox where the user can %%
-%% select another node to monitor %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-node_selection(Node)->
- " <FORM ACTION=\"./node_info\" NAME=node_selection>\n
- <TABLE WIDTH=\"100%\" BORDER=\"0\">\n
- <TR><TD ALIGN=\"center\">\n
- <SELECT NAME=nodes onChange=\"node_selected()\">\n" ++
- print_nodes(order_nodes(Node,process_info:get_nodes())) ++
- "</SELECT>\n
- </TD></TR>\n
- </TABLE>\n
- </FORM>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Add the node we are working with in the beginning of the list and %%
-%% remove it from other places so its always the first in the listbox %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-order_nodes(Node,Node_list)->
- [Node|lists:delete(Node,Node_list)].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Take the list of nodes and make it to a list of options to the %%
-%% the combobox %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-print_nodes([])->
- [];
-print_nodes([Node|Rest])->
- "<OPTION value=\"" ++
- atom_to_list(Node) ++
- "\">" ++
- atom_to_list(Node) ++
- "\n" ++
- print_nodes(Rest).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the header of the node info page i.e. the name of the node %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-node_title()->
- " <TABLE WIDTH=\"100%\" BORDER=\"0\">
- <TR><TD ALIGN=\"center\"><FONT SIZE=5>Applications</FONT></TD></TR>
- </TABLE>\n".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Build the body of the side that shows the node i.e the application %%
-%% list %%
-%% Node and Node_name are the same just different types %%
-%% Node are the atom Node_name the string of the node name %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-application_tree(Node,Node_name)->
- Fun=fun(Name)->
- Name_str =atom_to_list(Name),
- "<LI><A HREF=\"./application_info?name=" ++ Name_str ++
- "&mode=all&node=" ++ Node_name ++
- "\" TARGET=main><B>" ++ Name_str ++
- "</B></A>" ++ print_space(15-length(Name_str),[]) ++
- "<A HREF=\"./application_env?name=" ++ Name_str ++
- "&node=" ++ Node_name ++
- "\" TARGET=\"main\"><FONT SIZE=2>spec</FONT></A></LI>\n"
- end,
- "<UL>" ++
- lists:map(Fun, (process_info:get_applications(Node))) ++
- "</UL>" ++
- "<FORM Name=reload>" ++
- "<INPUT TYPE=\"button\" onClick=\"node_selected()\"
- VALUE=\"Reload\">\n" ++
- "</FORM>" ++
- "<!--<A HREF=\"../../appmon/application_help.html\" TARGET=main>Help</A>-->".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Print spaces between the application name and the spec link %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-print_space(N,Space)when N >0 ->
- print_space(N-1,"&nbsp;" ++ Space);
-print_space(_N,Space)->
- Space.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The Private functions that do the job %%
-%% To build the the page that shows process in an application %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%Generates the javascript that govern the look of the page that %%
-%%the processes of an application %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%Args is the list whit input args should be App Mode, Node
-application_javascript(Args)when length(Args)>=3 ->
- Vars=
- "<SCRIPT>
- var proc;
- var app=\"" ++ element(2,lists:nth(1,Args)) ++ "\";
- var node=\"" ++ element(2,lists:nth(3,Args)) ++ "\";",
- CommonFuncs=
- " function reload_bottom_frame()
- {parent.proc_data.location.href=\"/appmon/blank.html\";}
-
- function show_process_info()
- {
- if(proc.indexOf(\"#Port\")== -1)
- {
- if(proc.charAt(0)==\'<\')
- window.location=\"./proc_info?name=\" + proc + \"&node=\" + node
- else
- {
- start=proc.indexOf(\"<\");
- endpoint=proc.lastIndexOf(\">\");
- window.location=\"./proc_info?name=\" + proc.slice(start,endpoint+1) + \"&node=\" + node ;
- }
- }
- }
-
- function trace()
- {
- if(proc.charAt(0)==\'<\')
- window.location=\"./trace?name=\" + app + \"&mode=\" + get_mode() + \"&node=\" + node + \"&proc=\" + proc;
- else
- {
- start=proc.indexOf(\"<\");
- endpoint=proc.lastIndexOf(\">\");
- window.location=\"./trace?name=\" + app + \"&mode=\" + get_mode() + \"&node=\" + node + \"&proc=\" +
- proc.slice(start,endpoint+1) ;
- }
-
- }
-
- function reload_page()\n
- {
- window.location=\"./application_info?name=\" + app + \"&mode=\" + get_mode() + \"&node=\" + node ;
- }
- function get_mode()
- {
- for (i= 0; i < document.reload_form.mode.length; i++)
- {
- if (document.reload_form.mode[i].checked)
- return(document.reload_form.mode[i].value);
- }
- return(\"all\");
- }",
- Vars++CommonFuncs++"</SCRIPT>";
-application_javascript(_)->
- "<SCRIPT></SCRIPT>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the body i.e the process tree for the applications whose %%
-%% name is the second arg in the first tuple %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%args is the list [{_,Appname},{_,Mode},{_Node}]
-application_body(Args) when is_list(Args),length(Args) >= 3 ->
- App=element(2,lists:nth(1,Args)),
- Mode=element(2,lists:nth(2,Args)),
- Node=element(2,lists:nth(3,Args)),
- "<BODY BGCOLOR=\"FFFFFF\" onLoad=reload_bottom_frame() >"
- ++ mode_selection(Mode) ++
- selected_app_header(App,Node) ++ process_tree(App,Mode,Node)++
- "</BODY>";
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% If the pattern above ain't match then something is wrong %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-application_body(_Whatever)->
- "Please use the links to the left".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the part of the process tree page side where the user can %%
-%% select the mode the view the tree in. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mode_selection(Mode)->
- "<FORM NAME=\"reload_form\">\n" ++
- "<TABLE>" ++
- "<TR>\n" ++
- "<!--<TD><INPUT TYPE=\"button\" NAME=\"refresh_but\" VALUE=\"Reload\" onClick=\"reload_page()\">
- &nbsp;&nbsp;&nbsp;&nbsp;</TD>\n-->" ++
- print_radio_buttons([{"all","All processes"},{"sup_child","Supervised processes"},
- {"sup","Only supervisors"}],Mode) ++
- "</TR>\n </TABLE>\n" ++
- "</FORM>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Print the radiobuttons. if the mode is the one the current %%
-%% radiobutton represent set the one checked %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-print_radio_buttons([],_)->
- [];
-print_radio_buttons([{Mode,Name}|Rest],Mode)->
- "<TD><INPUT TYPE=\"radio\" NAME=\"mode\" CHECKED=\"true\" VALUE=\""++
- Mode ++"\" onClick=\"reload_page()\">&nbsp;&nbsp;" ++Name ++
- "</TD>\n" ++ print_radio_buttons(Rest,Mode);
-print_radio_buttons([{Mode1,Name}|Rest],Mode)->
- "<TD><INPUT TYPE=\"radio\" NAME=\"mode\" VALUE=\""++ Mode1 ++
- "\" onClick=\"reload_page()\">&nbsp;&nbsp;" ++ Name ++
- "</TD>\n" ++
- print_radio_buttons(Rest,Mode).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The part that shows the name of the application that the process %%
-%% tree represent %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-selected_app_header(App,Node)->
- {Year,Mon,Day}=date(),
- "<TABLE>
- <TR>
- <TD>Node:</TD>
- <TD>" ++Node ++"</TD>
- </TR>
- <TR>
- <TD>Application:</TD>
- <TD>" ++App ++"</TD>
- </TR>
- <TR>
- <TD>Date:</TD>
- <TD>" ++ integer_to_list(Day) ++ "/" ++
- integer_to_list(Mon) ++"&nbsp;-&nbsp;"++
- integer_to_list(Year) ++
- "</TD>
- </TR>
- </TABLE>
- <TABLE WIDTH=100%>
- <TR>
- <TD>
- <HR WIDTH=\"80%\">
- <!--<FONT SIZE=4>Process tree</FONT>
- <HR ALIGN=\"center\" WIDTH=\"80%\">-->
- </TD>
- </TR>
- </TABLE>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%get the process tree from process_info and build the nested %%
-%% unordered list that represent the applications process tree %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-process_tree(App,Mode,Node)->
- case process_info:get_processes(list_to_atom(App),
- list_to_atom(Mode),
- list_to_atom(Node)) of
- unknown->
- "Unknown application please update application tree";
- {Tree,Traced_dict} ->
- "<UL>" ++
- htmlify_tree(Tree,Traced_dict,1,Node,Mode,App) ++
- "</UL>"
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Build each node in the tree and then build its children %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-htmlify_tree({Pid,Childs,Childs2},Proc_tab,N,Node,Mode,App)->
- case ets:lookup(Proc_tab,Pid) of
- [] when N<3->
- print_pid(Pid,Node,Mode,App,notrace)++
- htmlify_prim_child(Childs,Proc_tab,N+1,Node,Mode,App) ++
- htmlify_sec_child(Childs2);
- [_Traced]->
- print_pid(Pid,Node,Mode,App,"<FONT SIZE=2 COLOR=\"firebrick\">Stop Trace</FONT>")++
- htmlify_prim_child(Childs,Proc_tab,N+1,Node,Mode,App) ++
- htmlify_sec_child(Childs2);
- []->
- print_pid(Pid,Node,Mode,App,"<FONT SIZE=2>Start Trace</FONT>")++
- htmlify_prim_child(Childs,Proc_tab,N+1,Node,Mode,App) ++
- htmlify_sec_child(Childs2)
- end.
-
-print_pid(Pid,Node,_Mode,_App,notrace)->
- "<LI><A TARGET=\"proc_data\" STYLE=\"text-decoration:none; color:blue\" HREF=\"./proc_info?name=" ++ urlify_pid(Pid) ++
- "&node="++ Node ++" \" >"++ htmlify_pid(Pid,[]) ++
- "</A>";
-
-print_pid([$P,$o,$r,$t|Rest],_Node,_Mode,_App,_TrMode)->
- "<LI>" ++ htmlify_pid([$P,$o,$r,$t|Rest],[]);
-
-print_pid(Pid,Node,Mode,App,TrMode)->
- "<LI><A TARGET=\"proc_data\" STYLE=\"text-decoration:none; color:blue\" HREF=\"./proc_info?name=" ++
- urlify_pid(Pid) ++ "&node="++ Node ++" \" >"++
- htmlify_pid(Pid,[]) ++ "</A>"++
- "&nbsp;&nbsp;&nbsp
- <A HREF=\"./trace?app="++App++"&mode="++Mode++
- "&node="++Node++"&proc="++urlify_pid(Pid)++"\">
- "++TrMode++"</A>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Change the '<' sign and the '>' sign to the html representation %%
-%% of the sign %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-htmlify_pid([60|Pid],New)->
- htmlify_pid(Pid,";tl&"++New);
-htmlify_pid([139|Pid],New)->
- htmlify_pid(Pid,";tl&"++New);
-
-htmlify_pid([62|Pid],New)->
- htmlify_pid(Pid,";tg&"++New);
-htmlify_pid([155|Pid],New)->
- htmlify_pid(Pid,";tg&"++New);
-htmlify_pid([Chr|Pid],New)->
- htmlify_pid(Pid,[Chr|New]);
-htmlify_pid([],New)->
- lists:reverse(New).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Change the < and > sign to the representation of the signs in %%
-%% the HTTP protocol %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-urlify_pid(Pid) ->
- case re:run(Pid,"[<](.*)[>]",[{capture,all_but_first,list}]) of
- {match,[PidStr]}->
- "%3C"++PidStr++"%3E";
- _->
- Pid
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Change the < and > sign from the representation of the signs in %%
-%% the HTTP protocol %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-unurlify_pid(Pid)->
- unurlify_pid(Pid,[]).
-
-unurlify_pid([$%,$3,$C|Rest],New)->
- unurlify_pid(Rest,[60|New]);
-
-unurlify_pid([$%,$3,$E|Rest],New)->
- unurlify_pid(Rest,[62|New]);
-unurlify_pid([Chr|Rest],New)->
- unurlify_pid(Rest,[Chr|New]);
-
-unurlify_pid([],New)->
- lists:reverse(New).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Make html of the list of primary childs %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-htmlify_prim_child([],_Proc_tab,_N,_Node,_Mode,_App)->
- [];
-
-htmlify_prim_child(Childs,Proc_tab,N,Node,Mode,App)->
- Fun=fun(Child)->
- htmlify_tree(Child,Proc_tab,N,Node,Mode,App)
- end,
- "<UL>\n" ++ lists:map(Fun,Childs) ++ "</UL>\n".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Make html of hte list whit sedondary childs, they has no childs %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-htmlify_sec_child([])->
- [];
-
-htmlify_sec_child(Sec_child_list)->
- Htmlify_child=fun(Pid1)->
- "<LI><FONT COLOR=\"#FF2222\">" ++ Pid1 ++
- "</FONT></LI>\n"
- end,
- "<UL>" ++ lists:map(Htmlify_child,Sec_child_list) ++ "</UL>\n".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The Private functions that do the job %%
-%% To build the the page that shows process data %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The function that creates the collects the various part of %%
-%% the side that shows information about a specific process, %%
-%% Pid_name should be the list representation of a pid %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-process_body(Args) when length(Args)==2->
- Pid=element(2,lists:nth(1,Args)),
- Node=element(2,lists:nth(2,Args)),
- "<BODY BGCOLOR=\"#FFFFFF\">" ++
- process_information_table(Pid,Node) ++ "</BODY>";
-
-process_body(_)->
- "<BODY BGCOLOR=\"#FFFFFF\">Please dont call this side manually</BODY>".
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the table that shows the name of the pid to show extended %%
-%% info about %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Get the table that shows the extended info about a process %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-process_information_table(Pid_name,Node)->
- PidID=unurlify_pid(Pid_name),
- case catch list_to_pid(PidID) of
- Pid when is_pid(Pid) ->
- get_process_table(Pid,Node);
- _Other ->
- io_lib:format("Not a process id ~s",[PidID])
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Create the table that shoows the extended info about processes %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-get_process_table(Pid,Node_name) when is_list(Node_name)->
- Node=list_to_atom(Node_name),
- get_process_table(Pid,Node);
-
-get_process_table(Pid,Node) when is_atom(Node)->
- case lists:member(Node,[node()|nodes()]) of
- true->
- Proc_data=process_info:get_process_data(Pid,Node),
- "<TABLE BORDER=1 >
- <TR BGCOLOR=\"#8899AA\"><TD COLSPAN=6 ALIGN=\"center\" >
- <FONT size=4> Process" ++
- htmlify_pid(pid_to_list(Pid),[]) ++ "</FONT>
- </TD></TR>" ++
- start_process_proc_data(Proc_data) ++
- "</TABLE><BR><BR>";
- _ ->
- "Please try again the Node dont exists"
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The process information is quite messy tidi it up by creating a %%
-%% table that looks like key val %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-start_process_proc_data(Proc_data)->
- %%Pic out the special cases the links and the process dict
- {Special,Usual}=split_proc_data(Proc_data),
- Usual2=append_empty(Usual),
- UsualProcData=process_proc_data(Usual2,0),
- SpecProcData=process_proc_data(Special),
- UsualProcData++SpecProcData.
-
-append_empty(List) when length(List) rem 2 == 0 ->
- List;
-append_empty(List)->
- append_empty(lists:append(List,[empty])).
-
-split_proc_data(Proc_data)->
- Spec=lists:map(fun(Key)->
- case lists:keysearch(Key,1,Proc_data) of
- {value,Data}->
- Data;
- _ ->
- not_included
- end
- end,[links,dictionary,messages]),
- Spec2=clear(Spec,[]),
- Usual=lists:filter(fun({Key,_Val})->
- case Key of
- messages ->
- false;
- links ->
- false;
- dictionary ->
- false;
- _ ->
- true
- end
- end,Proc_data),
- {Spec2,Usual}.
-
-clear([],New)->
- New;
-clear([not_included|Spec],New)->
- clear(Spec,New);
-clear([Other|Spec],New)->
- clear(Spec,[Other|New]).
-
-process_proc_data(Data,3)->
- "</TR>"++process_proc_data(Data,0);
-process_proc_data([],_N)->
- [];
-process_proc_data(Data,0)->
- "<TR>"++process_proc_data(Data,1);
-
-process_proc_data([empty|Data],N)->
- "<TD>&nbsp;</TD><TD>&nbsp;</TD> "++process_proc_data(Data,N+1);
-
-process_proc_data([{current_function,MFA}|Rest],N)->
- "<TD NOWRAP=true><FONT SIZE=3><B>Current function:</B></TD><TD><FONT SIZE=3>"++
- io_lib:format("~p",[MFA]) ++"</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{error_handler,Mod}|Rest],N)->
- "<TD NOWRAP=\"true\"><B><FONT SIZE=3>Error handler:</B></TD><TD><FONT SIZE=3>"
- ++ atom_to_list(Mod) ++ "</TD>\n" ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{group_leader,Grp}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Group leader:</B></TD><TD><FONT SIZE=3>" ++
- htmlify_pid(pid_to_list(Grp),[]) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{heap_size,Size}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Heap size:</B></TD><TD><FONT SIZE=3>"
- ++ integer_to_list(Size) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{initial_call,MFA}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Initial call:</B></TD><TD><FONT SIZE=3>"++
- io_lib:format("~p",[MFA]) ++"</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{message_queue_len,Size}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Message queue length:</B></TD><TD><FONT SIZE=3>" ++
- integer_to_list(Size) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{priority,Level}|Rest],N)->
- "<TD><FONT SIZE=3><B>Process priority:</B></TD><TD><FONT SIZE=3>" ++
- atom_to_list(Level) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{reductions,Number}|Rest],N)->
- "<TD ><FONT SIZE=3><B>Number of executed reductions:</B></TD>
- <TD><FONT SIZE=3>" ++ integer_to_list(Number) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{registered_name,Name}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Process Name:</B></TD><TD><FONT SIZE=3>"
- ++ atom_to_list(Name) ++ "</TD>\n" ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{stack_size,Size}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Stack size:</B></TD><TD><FONT SIZE=3>"
- ++ integer_to_list(Size) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{status,Status}|Rest],N)->
- "<TD NOWRAP=\"true\"><FONT SIZE=3><B>Process status:</B></TD><TD><FONT SIZE=3>"
- ++ atom_to_list(Status) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{trap_exit,Boolean}|Rest],N)->
- "<TD NOWRAP=\"true\" ><FONT SIZE=3><B>Trap Exit:</B></TD><TD><FONT SIZE=3>"
- ++ atom_to_list(Boolean) ++ "</TD>\n " ++
- process_proc_data(Rest,N+1);
-
-process_proc_data([{Key,Val}|Rest],N)->
- "<TD NOWRAP=\"true\" ><FONT SIZE=3><B>" ++ io_lib:write(Key) ++
- "</B></TD><TD><FONT SIZE=3>" ++ io_lib:write(Val) ++
- "</TD>\n " ++
- process_proc_data(Rest,N).
-
-process_proc_data([])->
- [];
-process_proc_data([{links,List_of_pids}|Rest])->
- "<TR><TD NOWRAP=\"true\"><FONT SIZE=3><B>Links:</B></TD><TD COLSPAN=5><FONT SIZE=3>"++ print_links(List_of_pids) ++"</TD></TR>\n " ++
- process_proc_data(Rest);
-
-process_proc_data([{messages,Queue}|Rest])->
- "<TR><TD NOWRAP=\"true\"><FONT SIZE=3><B>Message Queue:</B></TD><TD COLSPAN=5><FONT SIZE=3>" ++ io_lib:write(Queue) ++ "</TD></TR>\n " ++
- process_proc_data(Rest);
-
-process_proc_data([{dictionary,Dict}|Rest])->
- "<TR><TD NOWRAP=\"true\"><FONT SIZE=3><B>Process dictionary:</B></TD><TD COLSPAN=5><FONT SIZE=3>&nbsp;</TD></TR>\n " ++
- get_dictionary_data(Dict) ++
- process_proc_data(Rest).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% In the process info there are the links to other processes print %%
-%% this pid %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-print_links(Pids)->
- print_links(Pids,[]).
-
-print_links([],Links)->
- htmlify_pid(Links,[]);
-
-print_links([Pid],Links) when is_pid(Pid) ->
- print_links([],Links ++ pid_to_list(Pid));
-
-print_links([Pid],Links) when is_port(Pid) ->
- print_links([],Links ++ erlang:port_to_list(Pid));
-
-print_links([Pid|Rest],Links) when is_pid(Pid) ->
- print_links(Rest,Links ++ pid_to_list(Pid) ++ ", ");
-
-print_links([Pid|Rest],Links) when is_port(Pid) ->
- print_links(Rest,Links ++ erlang:port_to_list(Pid) ++ ", ").
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Fix the data in the process dictionary %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-get_dictionary_data([])->
- [];
-
-get_dictionary_data([{Key,Val}|Dict])->
- FormatedVal=add_space(htmlify_pid(lists:flatten(fix_type(Val)),[])),
- "<TR><TD><FONT SIZE=3>" ++
- htmlify_pid(lists:flatten(fix_type(Key)),[]) ++
- "</TD><TD COLSPAN=5><FONT SIZE=3>" ++
- FormatedVal++ "</TD></TR>\n" ++
- get_dictionary_data(Dict).
-
-add_space(List)->
- add_space(List,0,[]).
-add_space([],_Len,New) ->
- lists:reverse(New);
-add_space([Char|Rest],Len,New)when Len<50 ->
- add_space(Rest,Len+1,[Char|New]);
-
-add_space([$\,|Rest],_Len,New) ->
- add_space(Rest,0,[$\ ,$,|New]);
-
-add_space([Char|Rest],Len,New) ->
- add_space(Rest,Len+1,[Char|New]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Interpret the type of the data and make it to a list %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-fix_type(Val) when is_atom(Val) ->
- atom_to_list(Val);
-fix_type(Val) when is_float(Val) ->
- float_to_list(Val);
-fix_type(Val) when is_integer(Val) ->
- integer_to_list(Val);
-fix_type(Val) when is_list(Val) ->
- case io_lib:printable_list(Val) of
- true->
- case Val of
- []->
- io_lib:write(Val);
- _->
- Val
- end;
- _->
- io_lib:write(Val)
- end;
-fix_type(Val) when is_pid(Val) ->
- pid_to_list(Val);
-fix_type(Val) when is_port(Val) ->
- erlang:port_to_list(Val);
-fix_type(Val) when is_tuple(Val) ->
- io_lib:write(Val);
-fix_type(_Val) ->
- [].
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The Private functions that send the trace signal to the process %%
-%% thats the 4 member of the Arg list %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-send_trace(Args)when length(Args)>=4->
- {_,Proc}=lists:nth(4,Args),
- Pid2=unurlify_pid(Proc),
- process_info:send_trace(Pid2);
-
-send_trace(_Args)->
- arg_error.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Private functions that prints the application environment %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-application_env_body(Args)when length(Args)>=2 ->
- App=element(2,lists:nth(1,Args)),
- Node=element(2,lists:nth(2,Args)),
- "<SCRIPT>
- function reload_bottom_frame()
- {parent.proc_data.location.href=\"/appmon/blank.html\";}
- </SCRIPT>
- <BODY BGCOLOR=\"#FFFFFF\" onLoad=reload_bottom_frame()>"
- ++ application_env_table(App,Node) ++ "</BODY>";
-
-application_env_body(_)->
- "<BODY BGCOLOR=\"#FFFFFF\">Please dont call this side manually</BODY>".
-
-application_env_table(App,Node)->
- case process_info:get_application_keys(list_to_atom(App),
- list_to_atom(Node)) of
- {ok,List}->
- "<TABLE BORDER=1>" ++ application_env_head(App,Node) ++
- print_key_list(List,[]) ++ "</TABLE>";
- _ ->
- "Please try again,something went wrong"
- end.
-
-application_env_head(App,Node)->
- "<TR BGCOLOR=\"#8899AA\"><TD ALIGN=\"center\" COLSPAN=3>
- <FONT SIZE=6>" ++ App ++ "@" ++ Node ++ "</FONT>\n
- </TD></TR>
- <TR><TD COLSPAN=3>&nbsp</TD></TR>
- <TR BGCOLOR=\"#8899AA\">
- <TD><B>Key</B></TD><TD><B>Val/Sec. key</B></TD><TD><B>Sec. Val</B></TD>
- </TR>".
-
-print_key_list([],Result)->
- Result;
-
-print_key_list([{application,Name}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("Application name :",Name));
-
-print_key_list([{description,Desc}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("Description :",Desc));
-
-print_key_list([{vsn,Ver}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("Version :",Ver));
-
-print_key_list([{id,Id}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("ID:",fix_type(Id)));
-
-print_key_list([{modules,Mods}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("Modules:","&nbsp;") ++
- print_secondary_list(Mods,[]));
-
-print_key_list([{maxP,Max}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Max nr of processes",fix_type(Max)));
-
-print_key_list([{maxT,Max}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Max running sec:",fix_type(Max)));
-
-print_key_list([{registered,Names}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Registered names:","&nbsp;") ++
- print_secondary_list(Names,[]));
-
-print_key_list([{applications,Apps}|Rest],Result)->
- print_key_list(Rest,Result ++ print_key("Depends on:","&nbsp") ++
- print_secondary_list(Apps,[]));
-
-print_key_list([{included_applications,Inc_apps}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Included applications:",
- fix_type(Inc_apps)));
-
-print_key_list([{env,Env}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Environment:",fix_type(Env)));
-
-print_key_list([{mod,Mod}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Application callback mod:",
- fix_type(Mod)));
-
-print_key_list([{start_phases,Phase_arg}|Rest],Result)->
- print_key_list(Rest,Result ++
- print_key("Application callback mod:",
- fix_type(Phase_arg)));
-
-print_key_list([_|Rest],Result)->
- print_key_list(Rest,Result).
-
-print_key(Label,Val)->
- "<TR>
- <TD><B>" ++ Label ++ "</B></TD><TD>" ++ Val ++
- "</TD><TD>&nbsp;</TD>
- </TR>".
-
-print_key2(Label,Val)->
- "<TR>
- <TD>&nbsp;</TD><TD>" ++ Label ++ "</TD><TD>" ++ Val ++ "</TD>
- </TR>".
-
-print_secondary_list([],Result)->
- Result;
-print_secondary_list([{Mod,Ver}|Rest],Result) ->
- print_secondary_list(Rest,Result ++
- print_key2(fix_type(Mod),fix_type(Ver)));
-
-print_secondary_list([Mod|Rest],Result) ->
- print_secondary_list(Rest,Result ++
- print_key2(fix_type(Mod),"&nbsp;")).
diff --git a/lib/appmon/src/process_info.erl b/lib/appmon/src/process_info.erl
deleted file mode 100644
index e5d44ae50e..0000000000
--- a/lib/appmon/src/process_info.erl
+++ /dev/null
@@ -1,662 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(process_info).
--behavior(gen_server).
-
--export([start/0, start_link/0, stop/0]).
--export([is_node/1, get_nodes/0,
- get_applications/1, get_application_keys/2,
- get_processes/3, get_process_data/2,
- send_trace/1]).
-
-%% gen_server callbacks
--export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- terminate/2, code_change/3]).
-
--record(data, {que=undef,
- procs=undef,
- links=undef,
- links2=undef}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% Functions to retrieve information about which application %%
-%% at the node %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-start() ->
- gen_server:start({local, proc_info}, process_info, [], []).
-
-start_link() ->
- gen_server:start_link({local, proc_info}, process_info, [], []).
-
-stop() ->
- gen_server:call(proc_info, stop, 1000).
-
-%% is_node(NodeS) -> {bool(), Node, NodeS2}
-%% NodeS = NodeS2 = string()
-%% Node = node()
-is_node(NodeS) ->
- Node = list_to_atom(NodeS),
- case lists:member(Node, [node()|nodes()]) of
- true->
- {true, Node, NodeS};
- false ->
- {false, node(), atom_to_list(node())}
- end.
-
-%% get_nodes() -> [node()]
-get_nodes() ->
- [node()|nodes()].
-
-%% get_applications(Node) -> [App]
-%% Node = node()
-%% App = atom()
-%% Returns the list of all applications with a supervision tree (that
-%% is, not library applications such as stdlib) at Node.
-get_applications(Node) ->
- Info = rpc:call(Node, application, info, []),
- {value, {running, Apps}} = lists:keysearch(running, 1, Info),
- [App || {App, Pid} <- Apps, is_pid(Pid)].
-
-%% get_application_keys(App, Node) -> {ok, Keys} | {error, Reason}
-%% Node = node()
-%% App = atom()
-%% Keys = [{Key, Val}]
-%% Key = atom()
-%% Val = term()
-%% Reason = badapp | badrpc
-get_application_keys(App, Node) ->
- case rpc:call(Node, application, get_all_key, [App]) of
- {ok, Keys} ->
- {ok, Keys};
- undefined ->
- {error, badapp};
- {badrpc, _} ->
- {error, badrpc}
- end.
-
-%% get_processes(App, Mode, Node) -> {Tree, Dict} | unknown
-%% App = atom()
-%% Mode = sup | sup_child | all
-%% Node = node()
-get_processes(App, Mode, Node) ->
- gen_server:call(proc_info, {get_processes, App, Mode, Node}).
-
-%% get_process_data(Pid, Node) -> ProcData
-%% Pid = pid()
-%% Node = node()
-%% ProcData -- see erlang:process_info/1
-get_process_data(Pid, Node) ->
- case rpc:call(Node, erlang, process_info, [Pid]) of
- {badrpc, _} ->
- [{error,"Please try again"}];
- Res ->
- Res
- end.
-
-%% send_trace(PidL) -> void()
-send_trace(PidL) ->
- gen_server:call(proc_info, {send_trace, PidL}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% gen_server callbacks %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-init([]) ->
- {ok, ets:new(procs, [])}.
-
-handle_call({get_processes, App, Mode, Node}, _From, State) ->
- case do_get_processes(App, Mode, Node) of
- unknown ->
- {reply, unknown, State};
- Tree ->
- {reply, {Tree, State}, State}
- end;
-handle_call({send_trace, PidL}, _From, State) ->
- do_send_trace(PidL, State),
- {reply, ok, State};
-handle_call(stop, _From, State) ->
- {stop, normal, ok, State}.
-
-handle_cast(_, State) ->
- {noreply, State}.
-
-handle_info(_, State) ->
- {noreply, State}.
-
-terminate(_Reason, _State) ->
- ok.
-
-code_change(_, State, _) ->
- {ok, State}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% Internal functions %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% do_get_processes(App, Mode, Node) -> Tree | unknown
-%% App = atom()
-%% Mode = all | sup | sup_childs
-%% Node = node()
-%% Tree = term()
-do_get_processes(App, Mode, Node) ->
- case rpc:call(Node, application_controller, get_master, [App]) of
- Pid when is_pid(Pid) ->
- start_collecting_data(Pid, Mode, Node);
- undefined ->
- unknown
- end.
-
-%% Initiate the database, get the processes and the links.
-%% Then build lists and return them.
-start_collecting_data(Pid, Mode, Node) ->
- Db = get_database(),
- {Db2, Tree} = build_graph({master,Pid}, Db, Pid, Mode, Node),
- delete_database(Db2),
- Tree.
-
-get_database() ->
- P = ets:new(procs,[]),
- L = ets:new(link,[bag]),
- L2 = ets:new(link2,[bag]),
- Q = queue:new(),
- ets:insert(P, {whereis(application_controller), crap}),
- ets:insert(P, {whereis(gs), crap}),
- #data{que=Q, procs=P, links=L, links2=L2}.
-
-delete_database(Db) ->
- ets:delete(Db#data.procs),
- ets:delete(Db#data.links),
- ets:delete(Db#data.links2).
-
-%% The thought is
-%% 1. Get the processes that links to Pid.
-%% Pid is the application master the first time.
-%% 2. Add the processes to the database and clear the list of children
-%% from processes which for some resason not should be there.
-%% 3. Queue the children, so we later can se if they have any links.
-%% 4. Add links to the childrens.
-%% 5. When the whole tree is retreived remove the unnecessary processes
-%% depending on the mode.
-%% 6. Take all links that point to the same pid and sort out
-%% the primary and secondary relations.
-%% If more than one process links to the same process, the relation
-%% between a supervisor and a process is primary. The rest is
-%% secondary, there is no different in real world just in logic
-%% between a secondary and a primary relation.
-%% When all processes in the application is collected,
-%% fix secondary links and return the tree.
-build_graph(finish, Db, Grp, Mode, Node) ->
- Db = fix_links(Db, Grp, Node),
- delete_unwanted(Db, Mode, Grp),
- Tree = start_tree(Db, Node),
- {Db, Tree};
-build_graph(Pid, Db, Grp, Mode, Node) ->
- Children = get_children(Pid, Mode, Node),
- Children2 = add_and_remove(Children, Pid, Db, Grp, Node),
- Q2 = queue_children(Db#data.que, Children2),
- add_children(Pid, Db, Children2, 1),
- case queue:out(Q2) of
- {empty, _}->
- build_graph(finish, Db, Grp, Mode, Node);
- {{value,NPid}, Q3}->
- Db2 = Db#data{que=Q3},
- build_graph(NPid,Db2,Grp,Mode,Node)
- end.
-
-%% Collect the processes which the current process has a link to
-%% Pid is now the application_master and the application master's
-%% child is the application supervisor but in reality there are two
-%% application master processes.
-%% Fix this by reordering the processes a little.
-get_children({master,Pid}, _Mode, Node) when is_pid(Pid) ->
- %% Get the master pid
- MPid = case application_master:get_child(Pid) of
- {Pid1, _App} -> Pid1;
- Pid1 -> Pid1
- end,
- %% Get the second appplication master process and order them
- %% correctly
- case rpc:call(Node, erlang, process_info, [MPid,links]) of
- {links, [H|T]} -> [H,MPid|T];
- {links, []} -> MPid
- end;
-get_children({Pid, _Name}, _Mode, Node) when is_pid(Pid),
- Node==node(Pid) ->
- {links,Links} = rpc:call(Node, erlang, process_info, [Pid,links]),
- Links;
-get_children(Pid, _Mode, Node) when is_pid(Pid), Node==node(Pid) ->
- {links,Links} = rpc:call(Node, erlang, process_info, [Pid,links]),
- Links;
-get_children(Pid, _Mode, Node) when is_pid(Pid), Node/=node(Pid) ->
- [];
-get_children(Port, _Mode, _Node) when is_port(Port) ->
- [].
-
-%% Add the links to the database.
-%% The first case -- when it is the application master process -- there
-%% is only one real child even though there are more links.
-add_children({master,Pid}, Db, [Child|_Rest], N) ->
- add_child(Pid, Db, Child, N);
-add_children(_Pid, _Db, [], _N) ->
- ok;
-add_children(Pid, Db, [Child|Rest], N) ->
- add_child(Pid, Db, Child, N),
- add_children(Pid, Db, Rest, N+1).
-
-add_child(Pid, Db, Child, N) ->
- case ets:match_object(Db#data.links, {Pid,Child,'_'}) of
- [] ->
- ets:insert(Db#data.links, {Pid,Child,N});
- _ ->
- ok
- end.
-
-%% Add the list of processes to the queue.
-queue_children(Queue, []) ->
- Queue;
-queue_children(Queue, [H|T]) ->
- Q = queue:in(H, Queue),
- queue_children(Q, T).
-
-%% The processess that we already has added to the database are
-%% not children to the current process, so we don't need to add them a
-%% second time.
-remove_used_children([], _Db, New_list) ->
- lists:reverse(New_list);
-remove_used_children([Child|Rest], Db, New) ->
- case ets:lookup(Db#data.procs, Child) of
- [] ->
- remove_used_children(Rest, Db, [Child|New]);
- _ ->
- remove_used_children(Rest, Db, New)
- end.
-
-%% Take the list of links and separate it into a list with ports and a
-%% list with pids.
-separate_ports([], Pids, Ports) ->
- {Pids, Ports};
-separate_ports([Child|Rest], Pids, Ports) ->
- if
- is_port(Child) ->
- separate_ports(Rest, Pids, [Child|Ports]);
- is_pid(Child) ->
- separate_ports(Rest, [Child|Pids], Ports)
- end.
-
-%% Add the current pid to the ets table with processes and clear
-%% the list of children from processes that should not be there.
-%% In the first case, no children are used so it's not necessary.
-add_and_remove(Children, {master,Pid}, Db, _Grp, Node)
- when is_pid(Pid), Node==node(Pid) ->
- ets:insert(Db#data.procs, {Pid, {master,master}, controller}),
- {_Pids,Ports} = separate_ports(Children, [], []),
- Ports++Children;
-%% This clause is removable when using only link as retrieving mode .
-add_and_remove(Children, {Pid,_Name}, Db, Grp, Node)
- when is_pid(Pid), Node==node(Pid) ->
- ets:insert(Db#data.procs, {Pid,
- rpc:call(Node,erlang,process_info,
- [Pid,registered_name])}),
- {Pids, Ports} = separate_ports(Children, [], []),
- Children1 = remove_used_children(Pids, Db, []),
- Children2 = remove_others_children(Children1, Grp, Node),
- Ports++Children2;
-add_and_remove(Children, Pid, Db, Grp, Node) when is_pid(Pid),
- Node==node(Pid) ->
- ets:insert(Db#data.procs, {Pid,
- rpc:call(Node,erlang,process_info,
- [Pid,registered_name])}),
- {Pids, Ports} = separate_ports(Children, [], []),
- Children1 = remove_used_children(Pids, Db, []),
- Children2 =remove_others_children(Children1, Grp, Node),
- Ports++Children2;
-add_and_remove(_Children, Pid, _Db, _Grp, Node) when is_pid(Pid),
- Node/=node(Pid) ->
- [];
-%% Take care of the ports, don't add them to the table with processes.
-add_and_remove(_Children, Pid, _Db, _Grp, _Node) when is_port(Pid) ->
- [].
-
-%% Control that the application's group leader is the group leader of
-%% Pid
-group_leader_check({Pid,_Name}, Grp, Node) ->
- group_leader_check(Pid, Grp, Node);
-group_leader_check(Pid, Grp, Node) ->
- case rpc:call(Node, erlang, process_info, [Pid,group_leader]) of
- {_Item, Grp} -> yes;
- _ -> no
- end.
-
-%% Take the list of children and remove the ones with anoother group
-%% leader.
-remove_others_children(Children, Grp, Node) ->
- lists:filter(fun(Child) ->
- case group_leader_check(Child, Grp, Node) of
- yes -> true;
- no -> false
- end
- end,
- Children).
-
-%% Mark the processes in the procs table as either supervisor or worker.
-fix_links(Db, Leader, Node) ->
- {Sup,_Work} = mark_supervisors_workers(Db, Leader, Node),
- ets:match_delete(Db#data.procs, {'_',crap}),
- [_Pid|Procs] = ets:tab2list(Db#data.procs),
- N_links = get_n_links(Procs, Db#data.links, []),
- N_links2 = take_sup_links(Sup, Db#data.links, N_links),
- add_shared_links(N_links2, Db#data.links2),
- Db.
-
-%% Add the links that point to the same child to the shared links table
-add_shared_links(N_links, Links2) ->
- Insert_fun = fun(Link) -> ets:insert(Links2, Link) end,
- lists:map(fun(List) -> lists:map(Insert_fun, List) end, N_links).
-
-%% Take the list of links that point to the same children and remove
-%% the ones that are children to supervisors.
-%% The first argument is a list of the supervisors.
-%% N_links contains a list of list of links that points to the same
-%% child.
-take_sup_links([], _Db, N_links) ->
- N_links;
-take_sup_links([H|Supervised], Links_table, N_links) ->
- N_list_fun = fun(Link) ->
- insert_sup_links(Link, H, Links_table)
- end,
- N_links2 = lists:map(fun(Link_list) ->
- lists:filter(N_list_fun,Link_list)
- end,
- N_links),
- take_sup_links(Supervised, Links_table, N_links2).
-
-%% Insert the supervised links in the primary links list.
-%% This function should be used as a fun to the filter function in
-%% take_sup_links/3.
-insert_sup_links({From,To,N}, Sup, Links_table) ->
- case From of
- Sup ->
- ets:insert(Links_table, {From,To,N}),
- false;
- _ ->
- true
- end.
-
-%% Get the links which points to the same children.
-get_n_links([], _Links, N_link) ->
- N_link;
-get_n_links([{Pid,_,_}|Procs], Links, N_link) ->
- case ets:match_object(Links, {'_',Pid,'_'}) of
- L when length(L)>1 ->
- ets:match_delete(Links, {'_',Pid,'_'}),
- get_n_links(Procs, Links, [L|N_link]);
- _L ->
- get_n_links(Procs, Links, N_link)
- end;
-get_n_links([{Pid,_}|Procs], Links, N_link) ->
- case ets:match_object(Links, {'_',Pid,'_'}) of
- L when length(L)>1 ->
- ets:match_delete(Links, {'_',Pid,'_'}),
- get_n_links(Procs, Links, [L|N_link]);
- _L ->
- get_n_links(Procs, Links, N_link)
- end.
-
-%% Mark the processes that are in the supervisor tree as either worker
-%% or supervisor.
-mark_supervisors_workers(Db, Leader, Node) ->
- %% Get the supervisors and workers.
- {Sup_list, Worker_list} = get_by_supervisors1(Leader),
- %% Update the supervisor pids.
- lists:map(fun(Pid) ->
- ets:insert(Db#data.procs,
- {Pid,
- rpc:call(Node, erlang,process_info,
- [Pid,registered_name]),
- supervisor})
- end,
- Sup_list),
- %% Update the worker pids.
- lists:map(fun(Pid) ->
- ets:insert(Db#data.procs,
- {Pid,
- rpc:call(Node, erlang,process_info,
- [Pid,registered_name]),
- worker})
- end,
- Worker_list),
- {lists:reverse(Sup_list), Worker_list}.
-
-%% The second way to retrieve the applications processes is to go by
-%% the supervision tree.
-get_by_supervisors1(Leader) ->
- case application_master:get_child(Leader) of
- {Pid, _Name}->
- get_by_supervisors([{namn,Pid,supervisor,list_of_mods}],
- [], []);
- Pid ->
- get_by_supervisors([{namn,Pid,supervisor,list_of_mods}],
- [], [])
- end.
-
-get_by_supervisors([], Sup, Work) ->
- {Sup, Work};
-get_by_supervisors([{_,Pid,supervisor,_}|Rest], Sup, Work)
- when is_pid(Pid) ->
- Children = supervisor:which_children(Pid),
- Children2 = lists:append(Children, Rest),
- get_by_supervisors(Children2, [Pid|Sup], Work);
-get_by_supervisors([{_,Pid,_,_}|Rest], Sup, Work) when is_pid(Pid) ->
- get_by_supervisors(Rest, Sup, [Pid|Work]);
-get_by_supervisors([_Whatever|Rest], Sup, Work) ->
- get_by_supervisors(Rest, Sup, Work).
-
-%% Use pattern matching to select mode and delete the unneccesary pids
-delete_unwanted(Db, sup_child, App_pid) ->
- delete_not_in_supervisor_tree(Db),
- add_main_link(Db, App_pid),
- Db;
-delete_unwanted(Db, all, _App_pid) ->
- Db;
-delete_unwanted(Db, sup, App_pid) ->
- delete_workers(Db),
- delete_not_in_supervisor_tree(Db),
- add_main_link(Db, App_pid),
- Db.
-
-add_main_link(Db, App_pid) ->
- case application_master:get_child(App_pid) of
- {Pid, _Name} when is_pid(Pid) ->
- ets:insert(Db#data.links, {App_pid,Pid,1});
- Pid when is_pid(Pid) ->
- ets:insert(Db#data.links, {App_pid,Pid,1});
- _ ->
- false
- end.
-
-%% Delete the processes that are in the supervision tree but are
-%% workers, and their links.
-delete_workers(Db) ->
- Pids = ets:match_object(Db#data.procs, {'_','_',worker}),
- Pids2 =
- lists:map(
- fun({Pid,_,_}) ->
- %% Remove the unwanted pids from the process table.
- ets:match_delete(Db#data.procs, {Pid,'_','_'}),
- %% Remove the links to and from the pid.
- ets:match_delete(Db#data.links, {Pid,'_','_'}),
- ets:match_delete(Db#data.links, {'_',Pid,'_'}),
- ets:match_delete(Db#data.links2, {Pid,'_','_'}),
- ets:match_delete(Db#data.links2, {'_',Pid,'_'})
- end,
- Pids),
- Pids2.
-
-%% Delete the processes that are not in the supervision tree.
-delete_not_in_supervisor_tree(Db) ->
- Pids = ets:match_object(Db#data.procs,{'_','_'}),
- Pids2 =
- lists:map(
- fun({Pid,_}) ->
- %% Remove the unwanted from the process table.
- ets:match_delete(Db#data.procs, {Pid,'_'}),
- %% Remove the links to and from the pid.
- ets:match_delete(Db#data.links, {Pid,'_','_'}),
- ets:match_delete(Db#data.links, {'_',Pid,'_'}),
- ets:match_delete(Db#data.links2, {Pid,'_','_'}),
- ets:match_delete(Db#data.links2, {'_',Pid,'_'})
- end,
- Pids),
- Pids2.
-
-%% Start generating the tree.
-start_tree(Db, Node) ->
- case get_master(Db) of
- no -> false;
- Pid ->
- build_node(Pid, Db, Node)
- end.
-
-%% Build a node and then it runs itself on every child to the current
-%% pid.
-build_node(Pid, Db, Node) when is_pid(Pid), Node==node(Pid) ->
- Sort_fun = fun sort_order/2,
- Fix_sec_name_fun = fun(Pid2) -> get_link_name(Pid2, Db) end,
- Build_tree_fun = fun({_,Pid1,_}) -> build_node(Pid1,Db,Node) end,
- Children = ets:match_object(Db#data.links, {Pid,'_','_'}),
- Children1 = lists:sort(Sort_fun, Children),
- Sec_children = ets:match_object(Db#data.links2, {Pid,'_','_'}),
- {get_name(Pid,Db),
- lists:map(Build_tree_fun,Children1),
- lists:map(Fix_sec_name_fun,Sec_children)};
-build_node(Pid, _Db, Node) when is_pid(Pid), Node/=node(Pid) ->
- {"Runs on another node:"++erlang:pid_to_list(Pid), [], []};
-build_node(Pid, _Db, _Node) when is_port(Pid) ->
- {"Port :"++erlang:port_to_list(Pid), [], []}.
-
-%% Select the name of the pid from the database where we previosly
-%% added it.
-get_name(Pid, Db) ->
- case ets:lookup(Db#data.procs, Pid) of
- [{_,{_,master},_}] -> pid_to_list(Pid);
- [{_,{_,Name}}] -> atom_to_list(Name)++" : "++pid_to_list(Pid);
- [{_,{_,Name},_}] -> atom_to_list(Name)++" : "++pid_to_list(Pid);
- _ -> pid_to_list(Pid)
- end.
-
-%% Select the name of the process which we have a link to.
-get_link_name({_,Pid,_}, Db) when is_pid(Pid) ->
- case ets:lookup(Db#data.procs, Pid) of
- [{_,{_,Name}}] -> atom_to_list(Name)++" : "++pid_to_list(Pid);
- [{_,{_,Name},_}] -> atom_to_list(Name)++" : "++pid_to_list(Pid);
- _ -> pid_to_list(Pid)
- end;
-get_link_name({_,Port,_}, _Db) when is_port(Port) ->
- "Port :"++" : ";
-get_link_name(_, _) ->
- "".
-
-%% Sort the links in the order they where added, in ascending order.
-sort_order({_,_,N1}, {_,_,N2}) when N1>N2 -> true;
-sort_order(_N1, _N2) -> false.
-
-%% Select the pid of the application master.
-get_master(Db) ->
- case ets:match_object(Db#data.procs,
- {'_',{master,master},controller}) of
- [{Pid,_,_}|_Rest] -> Pid;
- _ -> no
- end.
-
-%% The main function to handle tracing.
-%% Checks if the process is in the table with traced processes. If so,
-%% it stops the trace, otherwise it starts the trace.
-do_send_trace(PidL, Traced_tab) ->
- Pid = list_to_pid(PidL),
- Key = get_key(Pid),
- case catch ets:lookup(Traced_tab, Key) of
- [] ->
- trace_process(Pid, Key, true, Traced_tab);
- [_Object]->
- trace_process(Pid, Key, false, Traced_tab)
- end,
- filter_procs(Traced_tab, ets:tab2list(Traced_tab)).
-
-get_key(Pid) ->
- Node = node(Pid),
- case rpc:call(Node, erlang, process_info, [Pid,registered_name]) of
- [] -> pid_to_list(Pid);
- {registered_name, Name} ->
- atom_to_list(Name)++" : "++pid_to_list(Pid)
- end.
-
-%% Tries to toggle the trace flag for the process.
-trace_process(Pid, Key, On_or_off, Procs_tab) ->
- case rpc:call(node(Pid), sys, trace, [Pid,On_or_off,1000]) of
- timeout ->
- Node = node(Pid),
- io:fwrite("timeout node= ~w, Pid= ~w mode= ~w ~n",
- [Node, Pid, On_or_off]);
- {badrpc, _} ->
- Node = node(Pid),
- io:fwrite("badrpc node= ~w, Pid= ~w mode= ~w ~n",
- [Node, Pid, On_or_off]);
- Res ->
- Node = node(Pid),
- io:fwrite("anymode ~w node= ~w, Pid= ~w mode= ~w ~n",
- [Res, Node, Pid,On_or_off]),
- case On_or_off of
- true -> ets:insert(Procs_tab, {Key,On_or_off});
- false -> ets:delete(Procs_tab, Key)
- end
- end.
-
-%% Check if the processes in the ets table with traced processes
-%% are alive. If not, remove them.
-filter_procs(Tab, Tab_list) ->
- lists:foreach(fun({Key,_Val}) -> is_alive(Key, Tab) end, Tab_list).
-
-is_alive(Key, Tab) ->
- case get_pid(Key) of
- nopid -> false;
- Pid -> is_alive2(Pid, Key, Tab)
- end.
-
-%% Key is either a pid in list form or Pidname:Pid in list form.
-get_pid(Key) ->
- case catch list_to_pid(string:substr(Key,string:rchr(Key,$<))) of
- Pid when is_pid(Pid) ->
- Pid;
- _ ->
- nopid
- end.
-
-is_alive2(Pid, Key, Tab) ->
- case catch rpc:call(node(Pid), erlang, is_process_alive, [Pid]) of
- true -> true;
- false ->
- catch ets:delete(Tab, Key),
- ok
- end.
diff --git a/lib/appmon/vsn.mk b/lib/appmon/vsn.mk
deleted file mode 100644
index 5585c5e1c2..0000000000
--- a/lib/appmon/vsn.mk
+++ /dev/null
@@ -1 +0,0 @@
-APPMON_VSN = 2.1.14.2
diff --git a/lib/asn1/Makefile b/lib/asn1/Makefile
index 9c1b19605c..18e95a2471 100644
--- a/lib/asn1/Makefile
+++ b/lib/asn1/Makefile
@@ -26,6 +26,9 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
SUB_DIRECTORIES = src doc/src c_src
+static_lib: SUB_DIRECTORIES = c_src
+
+
include vsn.mk
VSN = $(ASN1_VSN)
@@ -60,7 +63,6 @@ info:
version:
@echo "$(VSN)"
-
# ----------------------------------------------------
# Application (source) release targets
# ----------------------------------------------------
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
index 70238335c4..a7cd03f516 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
@@ -46,12 +46,11 @@ else
TYPEMARKER =
endif
-EI_LIBDIR = $(ERL_TOP)/lib/erl_interface/obj$(TYPEMARKER)/$(TARGET)
-
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
CFLAGS = $(DED_INCLUDES) $(EI_INCLUDES) $(DED_CFLAGS)
+STATIC_CFLAGS = $(DED_INCLUDES) $(EI_INCLUDES) $(DED_STATIC_CFLAGS)
LDFLAGS += $(DED_LDFLAGS)
# ----------------------------------------------------
@@ -59,28 +58,55 @@ LDFLAGS += $(DED_LDFLAGS)
# ----------------------------------------------------
NIF_OBJ_FILES = $(OBJDIR)/asn1_erl_nif.o
+NIF_STATIC_OBJ_FILES = $(OBJDIR)/asn1_erl_nif_static.o
-
+# Module and shared lib have to have same name of
+# static nifs to work
ifeq ($(TARGET),win32)
-NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1_erl_nif.dll
+NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1rt_nif.dll
+NIF_LIB_FILE = $(LIBDIR)/asn1rt_nif.lib
CLIB_FLAGS =
LN=cp
else
-NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1_erl_nif.so
+NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1rt_nif.so
+NIF_LIB_FILE = $(LIBDIR)/asn1rt_nif.a
CLIB_FLAGS = -lc
LN= ln -s
endif
+ifeq ($(USING_VC),yes)
+AR_OUT=-out:
+AR_FLAGS=
+else
+AR_OUT=
+ifeq ($(V),0)
+AR_FLAGS=rc
+else
+AR_FLAGS=rcv
+endif
+endif
+
+ifndef RANLIB
+RANLIB=true
+endif
+
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
opt: $(NIF_SHARED_OBJ_FILE)
+else
+# Do not build dynamic files on OSE
+opt:
+endif
debug: opt
+static_lib: $(NIF_LIB_FILE)
+
clean:
rm -f core *~
rm -f $(LIBDIR)/*
@@ -96,6 +122,13 @@ docs:
$(OBJDIR)/%.o: %.c
$(V_CC) -c $(CFLAGS) -O3 -o $@ $<
+$(OBJDIR)/%_static.o: %.c
+ $(V_CC) -c $(STATIC_CFLAGS) -O3 -o $@ $<
+
+$(NIF_LIB_FILE): $(NIF_STATIC_OBJ_FILES)
+ $(V_AR) $(AR_FLAGS) $(AR_OUT)$@ $(NIF_STATIC_OBJ_FILES)
+ $(V_RANLIB) $@
+
$(NIF_SHARED_OBJ_FILE): $(NIF_OBJ_FILES)
$(V_LD) $(LDFLAGS) -o $(NIF_SHARED_OBJ_FILE) $(NIF_OBJ_FILES) $(CLIB_FLAGS) $(LIBS)
@@ -106,7 +139,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
+endif
$(INSTALL_DIR) "$(RELSYSDIR)/c_src"
$(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src"
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index b3dd312fed..317a464060 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -57,54 +57,54 @@
#define MASK(X,M) (X & M)
/* PER COMPLETE */
-int per_complete(ErlNifBinary *, unsigned char *, int);
+static int per_complete(ErlNifBinary *, unsigned char *, int);
-int per_insert_octets(int, unsigned char **, unsigned char **, int *);
+static int per_insert_octets(int, unsigned char **, unsigned char **, int *);
-int per_insert_octets_except_unused(int, unsigned char **, unsigned char **,
+static int per_insert_octets_except_unused(int, unsigned char **, unsigned char **,
int *, int);
-int per_insert_octets_as_bits_exact_len(int, int, unsigned char **,
+static int per_insert_octets_as_bits_exact_len(int, int, unsigned char **,
unsigned char **, int *);
-int per_insert_octets_as_bits(int, unsigned char **, unsigned char **, int *);
+static int per_insert_octets_as_bits(int, unsigned char **, unsigned char **, int *);
-int per_pad_bits(int, unsigned char **, int *);
+static int per_pad_bits(int, unsigned char **, int *);
-int per_insert_least_sign_bits(int, unsigned char, unsigned char **, int *);
+static int per_insert_least_sign_bits(int, unsigned char, unsigned char **, int *);
-int per_insert_most_sign_bits(int, unsigned char, unsigned char **, int *);
+static int per_insert_most_sign_bits(int, unsigned char, unsigned char **, int *);
-int per_insert_bits_as_bits(int, int, unsigned char **, unsigned char **, int *);
+static int per_insert_bits_as_bits(int, int, unsigned char **, unsigned char **, int *);
-int per_insert_octets_unaligned(int, unsigned char **, unsigned char **, int);
+static int per_insert_octets_unaligned(int, unsigned char **, unsigned char **, int);
-int per_realloc_memory(ErlNifBinary *, int, unsigned char **);
+static int per_realloc_memory(ErlNifBinary *, int, unsigned char **);
/* BER DECODE */
-int ber_decode_begin(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int,
+static int ber_decode_begin(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int,
unsigned int *);
-int ber_decode(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int *, int);
+static int ber_decode(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int *, int);
-int ber_decode_tag(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int, int *);
+static int ber_decode_tag(ErlNifEnv *, ERL_NIF_TERM *, unsigned char *, int, int *);
-int ber_decode_value(ErlNifEnv*, ERL_NIF_TERM *, unsigned char *, int *, int,
+static int ber_decode_value(ErlNifEnv*, ERL_NIF_TERM *, unsigned char *, int *, int,
int);
/* BER ENCODE */
typedef struct ber_encode_mem_chunk mem_chunk_t;
-int ber_encode(ErlNifEnv *, ERL_NIF_TERM , mem_chunk_t **, unsigned int *);
+static int ber_encode(ErlNifEnv *, ERL_NIF_TERM , mem_chunk_t **, unsigned int *);
-void ber_free_chunks(mem_chunk_t *chunk);
-mem_chunk_t *ber_new_chunk(unsigned int length);
-int ber_check_memory(mem_chunk_t **curr, unsigned int needed);
+static void ber_free_chunks(mem_chunk_t *chunk);
+static mem_chunk_t *ber_new_chunk(unsigned int length);
+static int ber_check_memory(mem_chunk_t **curr, unsigned int needed);
-int ber_encode_tag(ErlNifEnv *, ERL_NIF_TERM , unsigned int ,
+static int ber_encode_tag(ErlNifEnv *, ERL_NIF_TERM , unsigned int ,
mem_chunk_t **, unsigned int *);
-int ber_encode_length(size_t , mem_chunk_t **, unsigned int *);
+static int ber_encode_length(size_t , mem_chunk_t **, unsigned int *);
/*
*
@@ -113,7 +113,7 @@ int ber_encode_length(size_t , mem_chunk_t **, unsigned int *);
*
*/
-int per_complete(ErlNifBinary *out_binary, unsigned char *in_buf,
+static int per_complete(ErlNifBinary *out_binary, unsigned char *in_buf,
int in_buf_len) {
int counter = in_buf_len;
/* counter keeps track of number of bytes left in the
@@ -489,7 +489,7 @@ int per_complete(ErlNifBinary *out_binary, unsigned char *in_buf,
}
}
-int per_realloc_memory(ErlNifBinary *binary, int amount, unsigned char **ptr) {
+static int per_realloc_memory(ErlNifBinary *binary, int amount, unsigned char **ptr) {
int i = *ptr - binary->data;
@@ -502,7 +502,7 @@ int per_realloc_memory(ErlNifBinary *binary, int amount, unsigned char **ptr) {
return ASN1_OK;
}
-int per_insert_most_sign_bits(int no_bits, unsigned char val,
+static int per_insert_most_sign_bits(int no_bits, unsigned char val,
unsigned char **output_ptr, int *unused) {
unsigned char *ptr = *output_ptr;
@@ -523,7 +523,7 @@ int per_insert_most_sign_bits(int no_bits, unsigned char val,
return ASN1_OK;
}
-int per_insert_least_sign_bits(int no_bits, unsigned char val,
+static int per_insert_least_sign_bits(int no_bits, unsigned char val,
unsigned char **output_ptr, int *unused) {
unsigned char *ptr = *output_ptr;
int ret = 0;
@@ -552,7 +552,7 @@ int per_insert_least_sign_bits(int no_bits, unsigned char val,
/* per_pad_bits adds no_bits bits in the buffer that output_ptr
points at.
*/
-int per_pad_bits(int no_bits, unsigned char **output_ptr, int *unused) {
+static int per_pad_bits(int no_bits, unsigned char **output_ptr, int *unused) {
unsigned char *ptr = *output_ptr;
int ret = 0;
@@ -575,7 +575,7 @@ int per_pad_bits(int no_bits, unsigned char **output_ptr, int *unused) {
The unused parameter tells how many bits that are not set in the
actual byte in the output buffer. If desired_no is more bits than the
input buffer has in no_bytes bytes, then zero bits is padded.*/
-int per_insert_bits_as_bits(int desired_no, int no_bytes,
+static int per_insert_bits_as_bits(int desired_no, int no_bytes,
unsigned char **input_ptr, unsigned char **output_ptr, int *unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char val;
@@ -615,7 +615,7 @@ int per_insert_bits_as_bits(int desired_no, int no_bytes,
}
/* per_insert_octets_as_bits_exact_len */
-int per_insert_octets_as_bits_exact_len(int desired_len, int in_buff_len,
+static int per_insert_octets_as_bits_exact_len(int desired_len, int in_buff_len,
unsigned char **in_ptr, unsigned char **ptr, int *unused) {
int ret = 0;
int ret2 = 0;
@@ -653,7 +653,7 @@ int per_insert_octets_as_bits_exact_len(int desired_len, int in_buff_len,
otherwise the function returns ASN1_ERROR. The output buffer is concatenated
without alignment.
*/
-int per_insert_octets_as_bits(int no_bytes, unsigned char **input_ptr,
+static int per_insert_octets_as_bits(int no_bytes, unsigned char **input_ptr,
unsigned char **output_ptr, int *unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char *ptr = *output_ptr;
@@ -693,7 +693,7 @@ int per_insert_octets_as_bits(int no_bytes, unsigned char **input_ptr,
into the output buffer, *output_ptr. Before the first byte is
inserted the input buffer is aligned.
*/
-int per_insert_octets(int no_bytes, unsigned char **input_ptr,
+static int per_insert_octets(int no_bytes, unsigned char **input_ptr,
unsigned char **output_ptr, int *unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char *ptr = *output_ptr;
@@ -718,7 +718,7 @@ int per_insert_octets(int no_bytes, unsigned char **input_ptr,
/* per_insert_octets_unaligned inserts bytes from the input buffer, *input_ptr,
into the output buffer, *output_ptr.No alignment is done.
*/
-int per_insert_octets_unaligned(int no_bytes, unsigned char **input_ptr,
+static int per_insert_octets_unaligned(int no_bytes, unsigned char **input_ptr,
unsigned char **output_ptr, int unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char *ptr = *output_ptr;
@@ -742,7 +742,7 @@ int per_insert_octets_unaligned(int no_bytes, unsigned char **input_ptr,
return no_bytes;
}
-int per_insert_octets_except_unused(int no_bytes, unsigned char **input_ptr,
+static int per_insert_octets_except_unused(int no_bytes, unsigned char **input_ptr,
unsigned char **output_ptr, int *unused, int in_unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char *ptr = *output_ptr;
@@ -835,7 +835,7 @@ int per_insert_octets_except_unused(int no_bytes, unsigned char **input_ptr,
* is the empty binary.
* If some error occured during the decoding of the in_buf an error is returned.
*/
-int ber_decode_begin(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
+static int ber_decode_begin(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
int in_buf_len, unsigned int *err_pos) {
int maybe_ret;
int ib_index = 0;
@@ -857,7 +857,7 @@ int ber_decode_begin(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
return ASN1_OK;
}
-int ber_decode(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
+static int ber_decode(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
int *ib_index, int in_buf_len) {
int maybe_ret;
int form;
@@ -889,7 +889,7 @@ int ber_decode(ErlNifEnv* env, ERL_NIF_TERM *term, unsigned char *in_buf,
* decode_tag decodes the BER encoded tag in in_buf and creates an
* nif term tag
*/
-int ber_decode_tag(ErlNifEnv* env, ERL_NIF_TERM *tag, unsigned char *in_buf,
+static int ber_decode_tag(ErlNifEnv* env, ERL_NIF_TERM *tag, unsigned char *in_buf,
int in_buf_len, int *ib_index) {
int tag_no, tmp_tag, form;
@@ -936,21 +936,36 @@ int ber_decode_tag(ErlNifEnv* env, ERL_NIF_TERM *tag, unsigned char *in_buf,
* in_buf and puts the value part in the decode_buf as an Erlang
* nif term into value
*/
-int ber_decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char *in_buf,
+static int ber_decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char *in_buf,
int *ib_index, int form, int in_buf_len) {
int maybe_ret;
unsigned int len = 0;
unsigned int lenoflen = 0;
- int indef = 0;
unsigned char *tmp_out_buff;
ERL_NIF_TERM term = 0, curr_head = 0;
if (((in_buf[*ib_index]) & 0x80) == ASN1_SHORT_DEFINITE_LENGTH) {
len = in_buf[*ib_index];
- } else if (in_buf[*ib_index] == ASN1_INDEFINITE_LENGTH
- )
- indef = 1;
- else /* long definite length */{
+ } else if (in_buf[*ib_index] == ASN1_INDEFINITE_LENGTH) {
+ (*ib_index)++;
+ curr_head = enif_make_list(env, 0);
+ if (*ib_index+1 >= in_buf_len || form == ASN1_PRIMITIVE) {
+ return ASN1_INDEF_LEN_ERROR;
+ }
+ while (!(in_buf[*ib_index] == 0 && in_buf[*ib_index + 1] == 0)) {
+ maybe_ret = ber_decode(env, &term, in_buf, ib_index, in_buf_len);
+ if (maybe_ret <= ASN1_ERROR) {
+ return maybe_ret;
+ }
+ curr_head = enif_make_list_cell(env, term, curr_head);
+ if (*ib_index+1 >= in_buf_len) {
+ return ASN1_INDEF_LEN_ERROR;
+ }
+ }
+ enif_make_reverse_list(env, curr_head, value);
+ (*ib_index) += 2; /* skip the indefinite length end bytes */
+ return ASN1_OK;
+ } else /* long definite length */{
lenoflen = (in_buf[*ib_index] & 0x7f); /*length of length */
if (lenoflen > (in_buf_len - (*ib_index + 1)))
return ASN1_LEN_ERROR;
@@ -965,23 +980,7 @@ int ber_decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char *in_buf,
if (len > (in_buf_len - (*ib_index + 1)))
return ASN1_VALUE_ERROR;
(*ib_index)++;
- if (indef == 1) { /* in this case it is desireably to check that indefinite length
- end bytes exist in inbuffer */
- curr_head = enif_make_list(env, 0);
- while (!(in_buf[*ib_index] == 0 && in_buf[*ib_index + 1] == 0)) {
- if (*ib_index >= in_buf_len)
- return ASN1_INDEF_LEN_ERROR;
-
- if ((maybe_ret = ber_decode(env, &term, in_buf, ib_index, in_buf_len))
- <= ASN1_ERROR
- )
- return maybe_ret;
- curr_head = enif_make_list_cell(env, term, curr_head);
- }
- enif_make_reverse_list(env, curr_head, value);
- (*ib_index) += 2; /* skip the indefinite length end bytes */
- } else if (form == ASN1_CONSTRUCTED)
- {
+ if (form == ASN1_CONSTRUCTED) {
int end_index = *ib_index + len;
if (end_index > in_buf_len)
return ASN1_LEN_ERROR;
@@ -1012,7 +1011,7 @@ struct ber_encode_mem_chunk {
char *curr;
};
-int ber_encode(ErlNifEnv *env, ERL_NIF_TERM term, mem_chunk_t **curr, unsigned int *count) {
+static int ber_encode(ErlNifEnv *env, ERL_NIF_TERM term, mem_chunk_t **curr, unsigned int *count) {
const ERL_NIF_TERM *tv;
unsigned int form;
@@ -1087,7 +1086,7 @@ int ber_encode(ErlNifEnv *env, ERL_NIF_TERM term, mem_chunk_t **curr, unsigned i
return ASN1_OK;
}
-int ber_encode_tag(ErlNifEnv *env, ERL_NIF_TERM tag, unsigned int form,
+static int ber_encode_tag(ErlNifEnv *env, ERL_NIF_TERM tag, unsigned int form,
mem_chunk_t **curr, unsigned int *count) {
unsigned int class_tag_no, head_tag;
if (!enif_get_uint(env, tag, &class_tag_no))
@@ -1122,7 +1121,7 @@ int ber_encode_tag(ErlNifEnv *env, ERL_NIF_TERM tag, unsigned int form,
}
}
-int ber_encode_length(size_t size, mem_chunk_t **curr, unsigned int *count) {
+static int ber_encode_length(size_t size, mem_chunk_t **curr, unsigned int *count) {
if (size < 128) {
if (ber_check_memory(curr, 1u))
return ASN1_ERROR;
@@ -1150,7 +1149,7 @@ int ber_encode_length(size_t size, mem_chunk_t **curr, unsigned int *count) {
return ASN1_OK;
}
-mem_chunk_t *ber_new_chunk(unsigned int length) {
+static mem_chunk_t *ber_new_chunk(unsigned int length) {
mem_chunk_t *new = enif_alloc(sizeof(mem_chunk_t));
if (new == NULL)
return NULL;
@@ -1165,7 +1164,7 @@ mem_chunk_t *ber_new_chunk(unsigned int length) {
return new;
}
-void ber_free_chunks(mem_chunk_t *chunk) {
+static void ber_free_chunks(mem_chunk_t *chunk) {
mem_chunk_t *curr, *next = chunk;
while (next != NULL) {
curr = next;
@@ -1175,7 +1174,7 @@ void ber_free_chunks(mem_chunk_t *chunk) {
}
}
-int ber_check_memory(mem_chunk_t **curr, unsigned int needed) {
+static int ber_check_memory(mem_chunk_t **curr, unsigned int needed) {
mem_chunk_t *new;
if ((*curr)->curr-needed >= (*curr)->top)
return ASN1_OK;
@@ -1320,6 +1319,7 @@ static void unload(ErlNifEnv* env, void* priv_data) {
}
+
static ErlNifFunc nif_funcs[] = {
{ "encode_per_complete", 1, encode_per_complete },
{ "decode_ber_tlv_raw", 1, decode_ber_tlv_raw },
diff --git a/lib/asn1/doc/src/asn1_spec.xmlsrc b/lib/asn1/doc/src/asn1_spec.xmlsrc
index 07cba17816..9001aca65c 100644
--- a/lib/asn1/doc/src/asn1_spec.xmlsrc
+++ b/lib/asn1/doc/src/asn1_spec.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/asn1/doc/src/asn1_ug.xml b/lib/asn1/doc/src/asn1_ug.xml
index 362ca9330f..8b33497dd3 100644
--- a/lib/asn1/doc/src/asn1_ug.xml
+++ b/lib/asn1/doc/src/asn1_ug.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -34,23 +34,25 @@
<section>
<title>Features</title>
- <p>The Asn1 application provides:
- </p>
+ <p>The Asn1 application provides:</p>
<list type="bulleted">
<item>An ASN.1 compiler for Erlang, which generates encode and
decode functions to be used by Erlang programs sending and
receiving ASN.1 specified data.</item>
<item>Run-time functions used by the generated code.</item>
- <item>The supported encoding rules are:
+ <item>Support for the following encoding rules:
<list>
<item>
Basic Encoding Rules (<em>BER</em>)
</item>
<item>
- Distinguished Encoding Rules (<em>DER</em>), a specialized form of BER that is used in security-conscious applications.
+ Distinguished Encoding Rules (<em>DER</em>), a specialized
+ form of BER that is used in security-conscious
+ applications.
</item>
<item>
- Packed Encoding Rules (<em>PER</em>) both the aligned and unaligned variant.
+ Packed Encoding Rules (<em>PER</em>); both the aligned and
+ unaligned variant.
</item>
</list>
</item>
@@ -59,71 +61,41 @@
<section>
<title>Overview</title>
- <p>ASN.1 (Abstract Syntax Notation 1) is a formal language for describing data structures to be exchanged between distributed computer systems.
- The purpose of ASN.1 is to have
- a platform and programming language independent notation to express
- types using a
- standardized set of rules for the transformation of values of
- a defined type, into a stream of bytes. This stream of bytes
- can then be sent on a communication channel set up by the
- lower layers in the stack of communication protocols e.g.
- TCP/IP or encapsulated within UDP packets. This way, two
- different applications written in two completely different
- programming languages running on different computers with
- different internal representation of data can exchange
- instances of structured data types (instead of exchanging
- bytes or bits). This makes programming faster and easier since no code
- has to be written to process the transport format of the
- data.
- </p>
- <p>To write a network application which processes ASN.1 encoded
- messages, it is prudent and sometimes essential to have a set
- of off-line development tools such as an ASN.1 compiler which
- can generate the encode and decode logic for the specific ASN.1
- data types. It is also necessary to combine this with some
- general language-specific runtime support for ASN.1 encoding and
- decoding.
- </p>
- <p>The ASN.1 compiler must be directed towards a target language
- or a set of closely related languages. This manual describes a
- compiler which is directed towards the functional language
- Erlang. In order to use this compiler, familiarity with the
- language Erlang is essential. Therefore, the runtime support for ASN.1 is
- also closely related to the language Erlang and
- consist of a number of functions, which the
- compiler uses. The types in ASN.1 and how to represent
- values of those types in Erlang are described in this manual.
- </p>
- <p>The following document is structured so that the first part describes
- how to use ASN.1 compiler, and then there are descriptions of all
- the primitive and constructed ASN.1 types and their representation
- in Erlang,
- </p>
+ <p>ASN.1 (Abstract Syntax Notation One) is a formal language for
+ describing data structures to be exchanged between distributed
+ computer systems. The purpose of ASN.1 is to have a platform
+ and programming language independent notation to express types
+ using a standardized set of rules for the transformation of
+ values of a defined type into a stream of bytes. This stream of
+ bytes can then be sent on any type of communication
+ channel. This way, two applications written in different
+ programming languages running on different computers with
+ different internal representation of data can exchange instances
+ of structured data types.</p>
</section>
<section>
<title>Prerequisites</title>
- <p>It is assumed that the reader is familiar with the ASN.1 notation
- as documented in the standard definition [<cite id="X.680"></cite>] which is
- the primary text. It may also be helpful, but not necessary,
- to read the standard definitions
- [<cite id="X.681"></cite>] [<cite id="X.682"></cite>] [<cite id="X.683"></cite>]
- [<cite id="X.690"></cite>] [<cite id="X.691"></cite>]. </p>
- <p>A very good book explaining those reference texts is
- [<cite id="DUBUISSON"></cite>], free to download at
- <url href="http://www.oss.com/asn1/dubuisson.html">http://www.oss.com/asn1/dubuisson.html </url>.
+ <p>It is assumed that the reader is familiar with the ASN.1
+ notation as documented in the standard definition [<cite
+ id="X.680"></cite>] which is the primary text. It may also be
+ helpful, but not necessary, to read the standard definitions
+ [<cite id="X.681"></cite>] [<cite id="X.682"></cite>] [<cite
+ id="X.683"></cite>] [<cite id="X.690"></cite>] [<cite
+ id="X.691"></cite>]. </p>
+ <p>A good book explaining those reference texts is
+ [<cite id="DUBUISSON"></cite>], which is free to download at
+ <url href="http://www.oss.com/asn1/dubuisson.html">http://www.oss.com/asn1/dubuisson.html</url>.
</p>
</section>
<section>
- <title>Capability</title>
+ <title>Capabilities</title>
<p>This application covers all features of ASN.1 up to the 1997
- edition of the specification. In the 2002 edition of ASN.1 a number of
- new features where introduced of which some are supported while
- others are not. For example the
- ECN (Encoding Control Notation) and XML notation are still
- unsupported. Though, the other features of the 2002 edition are
- fully or partly supported as shown below:</p>
+ edition of the specification. In the 2002 edition of ASN.1 a
+ number of new features were introduced. The following features
+ of the 2002 edition are fully or partly supported as shown
+ below:</p>
<list type="bulleted">
<item>
<p>Decimal notation (e.g., "1.5e3") for REAL values. The
@@ -131,7 +103,7 @@
supported.</p>
</item>
<item>
- <p>The RELATIVE-OID type for relative object identifiers are
+ <p>The RELATIVE-OID type for relative object identifiers is
fully supported.</p>
</item>
<item>
@@ -141,16 +113,16 @@
constraint is not a PER-visible constraint.</p>
</item>
<item>
- <p>The subtype constraint by regular expressions (PATTERN) for character string types is parsed when compiling, but no further action is taken. This constraint is not a PER-visible constraint.</p>
+ <p>The subtype constraint by regular expressions (PATTERN)
+ for character string types is parsed when compiling, but no
+ further action is taken. This constraint is not a
+ PER-visible constraint.</p>
</item>
<item>
<p>Multiple-line comments as in C, <c>/* ... */</c>, are
supported.</p>
</item>
</list>
- <p>It should also be added here that the encoding formats
- supported are <em>BER</em>, <em>DER</em>, <em>PER aligned
- basic</em> variant and <em>PER unaligned basic</em> variant.</p>
</section>
</section>
@@ -162,19 +134,17 @@
<title>A First Example</title>
<p>The following example demonstrates the basic functionality used to run
the Erlang ASN.1 compiler.</p>
- <p>First, create a file called <c>People.asn</c> containing the following:</p>
+ <p>Create a file called <c>People.asn</c> containing the following:</p>
<pre>
-People DEFINITIONS IMPLICIT TAGS ::=
-
+People DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-EXPORTS Person;
-
-Person ::= [PRIVATE 19] SEQUENCE {
- name PrintableString,
- location INTEGER {home(0),field(1),roving(2)},
- age INTEGER OPTIONAL }
+ Person ::= SEQUENCE {
+ name PrintableString,
+ location INTEGER {home(0),field(1),roving(2)},
+ age INTEGER OPTIONAL
+ }
END </pre>
- <p>This file (<c>people.asn</c>) must be compiled before it can be
+ <p>This file (<c>People.asn</c>) must be compiled before it can be
used.
The ASN.1 compiler checks that the syntax is correct and that the
text represents proper ASN.1 code before generating an abstract
@@ -186,14 +156,14 @@ END </pre>
The following shows how the compiler
can be called from the Erlang shell:</p>
<pre>
-1><input>asn1ct:compile("People", [ber]).</input>
+1><input> asn1ct:compile("People", [ber]).</input>
ok
2> </pre>
<p>The <c>verbose</c> option can be given to have information
about the generated files printed:</p>
<pre>
-2><input>asn1ct:compile("People", [ber,verbose]).</input>
+2><input> asn1ct:compile("People", [ber,verbose]).</input>
Erlang ASN.1 compiling "People.asn"
--{generated,"People.asn1db"}--
--{generated,"People.hrl"}--
@@ -201,20 +171,17 @@ Erlang ASN.1 compiling "People.asn"
ok
3> </pre>
- <p>The ASN.1 module People is now accepted and the abstract syntax tree
- is saved in the <c>People.asn1db</c> file, the
- generated Erlang code is compiled using the Erlang compiler and
- loaded into the Erlang runtime system. Now there is a user interface
- of encode/2 and decode/2 in the module People, which is invoked by:
- <br></br>
-<c><![CDATA['People':encode(<Type name>,<Value>),]]></c> <br></br>
-
+ <p>The ASN.1 module <c>People</c> is now accepted and the
+ abstract syntax tree is saved in the <c>People.asn1db</c> file;
+ the generated Erlang code is compiled using the Erlang compiler
+ and loaded into the Erlang run-time system. Now there is an API
+ for <c>encode/2</c> and <c>decode/2</c> in the module
+ <c>People</c>, which is invoked by: <br></br>
+ <c><![CDATA['People':encode(<Type name>, <Value>)]]></c>
+ <br></br>
or <br></br>
-<c><![CDATA['People':decode(<Type name>,<Value>),]]></c> <br></br>
+<c><![CDATA['People':decode(<Type name>, <Value>)]]></c></p>
- Alternatively one can use the <c><![CDATA[asn1rt:encode(<Module name> ,<Type name>,<Value>)]]></c> and <c><![CDATA[asn1rt:decode(< Module name>,<Type name>,<Value>)]]></c> calls.
- However, they are not as efficient as the previous methods since they
- result in an additional <c>apply/3</c> call.</p>
<p>Assume there is a network
application which receives instances of the ASN.1 defined
type Person, modifies and sends them back again:</p>
@@ -237,33 +204,30 @@ receive
constructed and encoded using
<c>'People':encode('Person',Answer)</c> which takes an
instance of a defined ASN.1 type and transforms it to a
- binary according to the BER or PER
- encoding-rules.
+ binary according to the BER or PER encoding rules.
<br></br>
The encoder and the decoder can also be run from
- the shell. The following dialogue with the shell illustrates
- how the functions
- <c>asn1rt:encode/3</c> and <c>asn1rt:decode/3</c> are used.</p>
+ the shell.</p>
<pre>
2> <input>Rockstar = {'Person',"Some Name",roving,50}.</input>
{'Person',"Some Name",roving,50}
-3> <input>{ok,Bin} = asn1rt:encode('People','Person',Rockstar).</input>
+3> <input>{ok,Bin} = 'People':encode('Person',Rockstar).</input>
{ok,&lt;&lt;243,17,19,9,83,111,109,101,32,78,97,109,101,2,1,2,
2,1,50&gt;&gt;}
-4> <input>{ok,Person} = asn1rt:decode('People','Person',Bin).</input>
+4> <input>{ok,Person} = 'People':decode('Person',Bin).</input>
{ok,{'Person',"Some Name",roving,50}}
5> </pre>
</section>
<section>
<title>Module dependencies</title>
- <p>It is common that asn1 modules import defined types, values and
- other entities from another asn1 module.</p>
- <p>Earlier versions of the asn1 compiler required that modules that
+ <p>It is common that ASN.1 modules import defined types, values and
+ other entities from another ASN.1 module.</p>
+ <p>Earlier versions of the ASN.1 compiler required that modules that
were imported from had to be compiled before the module that
- imported. This caused problems when asn1 modules had circular
+ imported. This caused problems when ASN.1 modules had circular
dependencies.</p>
- <p>Now are referenced modules parsed when the compiler finds an
+ <p>Referenced modules are now parsed when the compiler finds an
entity that is imported. There will not be any code generated for
the referenced module. However, the compiled module rely on
that the referenced modules also will be compiled.</p>
@@ -279,11 +243,8 @@ The encoder and the decoder can also be run from
(including the compiler).</p>
</item>
<item>
- <p>The module <c>asn1rt</c> which provides the run-time functions.
- However, it is preferable to use the generated <c>encode/2</c> and
- <c>decode/2</c> functions in each module, ie.
- Module:encode(Type,Value), in favor of the <c>asn1rt</c>
- interface.</p>
+ <p>The module <c>asn1rt_nif</c> which provides the run-time functions
+ for the ASN.1 decoder for the BER back-end.</p>
</item>
</list>
<p>The reason for the division of the interface into compile-time
@@ -318,7 +279,7 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn
</item>
<tag><c>-I IncludeDir</c></tag>
<item>
- <p>Where to search for <c>.asn1db</c> files and asn1
+ <p>Where to search for <c>.asn1db</c> files and ASN.1
source specs in order to resolve references to other
modules. This option can be repeated many times if there
are several places to search in. The compiler will always
@@ -330,26 +291,26 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn
</item>
<tag><c>+asn1config</c></tag>
<item>
- <p>This functionality works together with the flags
- <c>ber</c>. It enables the
+ <p>This functionality works together with the
+ <c>ber</c> option. It enables the
specialized decodes, see the <seealso marker="asn1_spec">Specialized Decode</seealso> chapter.
</p>
</item>
<tag><c>+undec_rest</c></tag>
<item>
- <p>A buffer that holds a message, being decoded may
- also have some following bytes. Now it is possible to get
- those following bytes returned together with the decoded
- value. If an asn1 spec is compiled with this option a tuple
- <c>{ok,Value,Rest}</c> is returned. <c>Rest</c> may be a
- list or a binary. Earlier versions of the compiler ignored
- those following bytes.</p>
+ <p>A buffer that holds a message being decoded may also have
+ trailing bytes. If those trailing bytes are important they
+ can be returned along with the decoded value by compiling
+ the ASN.1 specification with the <c>+undec_rest</c> option.
+ The return value from the decoder will be
+ <c>{ok,Value,Rest}</c> where <c>Rest</c> is a binary
+ containing the trailing bytes.</p>
</item>
<tag><c>+'Any Erlc Option'</c></tag>
<item>
<p>You may add any option to the Erlang compiler when
compiling the generated Erlang files. Any option
- unrecognised by the asn1 compiler will be passed to the
+ unrecognized by the ASN.1 compiler will be passed to the
Erlang compiler.</p>
</item>
</taglist>
@@ -374,35 +335,15 @@ asn1ct:compile("H323-MESSAGES.asn1",[ber]). </pre>
asn1ct:compile("H323-MESSAGES.asn1",[per]). </pre>
<p>The generic encode and decode functions can be invoked like this:</p>
<pre>
-asn1ct:encode('H323-MESSAGES','SomeChoiceType',{call,"octetstring"}).
-asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
- <p>Or, preferable like:</p>
- <pre>
'H323-MESSAGES':encode('SomeChoiceType',{call,"octetstring"}).
'H323-MESSAGES':decode('SomeChoiceType',Bytes). </pre>
</section>
<section>
<title>Run-time Functions</title>
- <p>A brief description of the major functions is given here. For a
- complete description of each function see
- <seealso marker="asn1rt"> the Asn1 Reference Manual</seealso>, the <c>asn1rt</c> module.</p>
- <p>The generic run-time encode and decode functions can be invoked as below:</p>
- <pre>
-asn1rt:encode('H323-MESSAGES','SomeChoiceType',{call,"octetstring"}).
-asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
- <p>Or, preferable like:</p>
- <pre>
-'H323-MESSAGES':encode('SomeChoiceType',{call,"octetstring"}).
-'H323-MESSAGES':decode('SomeChoiceType',Bytes). </pre>
- <p>The asn1 nif is enabled in two occasions: encoding of
- asn1 values when the asn1 spec is compiled with <c>per</c> and
- or decode of encoded asn1 values when the asn1 spec is
- compiled with <c>ber</c>. In
- those cases the nif will be loaded automatically at the first call
- to <c>encode</c>/<c>decode</c>. If one doesn't want the performance
- overhead of the nif being loaded at the first call it is possible
- to load the nif separately by loading the <c>asn1rt_nif</c> module.</p>
+ <p>When an ASN.1 specification is compiled with the <c>ber</c>
+ option, the module <c>asn1rt_nif</c> module and the NIF library in
+ <c>asn1/priv_dir</c> will be needed at run-time.</p>
<p>By invoking the function <c>info/0</c> in a generated module, one
gets information about which compiler options were used.</p>
</section>
@@ -413,9 +354,9 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
compile time appear on the screen together with
a line number indicating where in the source file the error
was detected. If no errors are found, an Erlang ASN.1 module will
- be created as default.</p>
- <p>The run-time encoders and decoders (in the <c>asn1rt</c> module) do
- execute within a catch and returns <c>{ok, Data}</c> or
+ be created.</p>
+ <p>The run-time encoders and decoders execute within a catch and
+ returns <c>{ok, Data}</c> or
<c>{error, {asn1, Description}}</c> where
<c>Description</c> is
an Erlang term describing the error. </p>
@@ -424,18 +365,18 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
<section>
<marker id="inlineExamples"></marker>
- <title>Multi File Compilation</title>
- <p>There are various reasons for using a multi file compilation:</p>
+ <title>Multi-file Compilation</title>
+ <p>There are various reasons for using multi-file compilation:</p>
<list type="bulleted">
- <item>You want to choose name for the generated module by
- any reason. Maybe you need to compile the same specs for
- different encoding/decoding standards.</item>
+ <item>You want to choose the name for the generated module,
+ perhaps because you need to compile the same specs for
+ different encoding rules.</item>
<item>You want only one resulting module.</item>
</list>
- <p>You need to specify which asn1 specs you will
+ <p>You need to specify which ASN.1 specs you will
compile in a module that must have the extension
<c>.set.asn</c>. You chose name of the module and provide the
- names of the asn1 specs. For instance, if you have the specs
+ names of the ASN.1 specs. For instance, if you have the specs
<c>File1.asn</c>, <c>File2.asn</c> and <c>File3.asn</c> your
module <c>MyModule.set.asn</c> will look like:</p>
<pre>
@@ -446,11 +387,45 @@ File3.asn </pre>
<code type="none">
~> erlc MyModule.set.asn </code>
<p>the result will be one merged module <c>MyModule.erl</c> with
- the generated code from the three asn1 specs.
+ the generated code from the three ASN.1 specs.
</p>
</section>
<section>
+ <title>A quick note about tags</title>
+
+ <p>Tags used to be important for all users of ASN.1, because it
+ was necessary to manually add tags to certain constructs in order
+ for the ASN.1 specification to be valid. Here is an example of
+ an old-style specification:</p>
+
+ <pre>
+Tags DEFINITIONS ::=
+BEGIN
+ Afters ::= CHOICE { cheese [0] IA5String,
+ dessert [1] IA5String }
+END </pre>
+
+ <p>Without the tags (the numbers in square brackets) the ASN.1
+ compiler would refuse to compile the file.</p>
+
+ <p>In 1994 the global tagging mode AUTOMATIC TAGS was introduced.
+ By putting AUTOMATIC TAGS in the module header, the ASN.1 compiler
+ will automatically add tags when needed. Here is the same
+ specification in AUTOMATIC TAGS mode:</p>
+
+ <pre>
+Tags DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ Afters ::= CHOICE { cheese IA5String,
+ dessert IA5String }
+END
+</pre>
+
+ <p>Tags will not be mentioned any more in this manual.</p>
+ </section>
+
+ <section>
<marker id="ASN1Types"></marker>
<title>The ASN.1 Types</title>
<p>This section describes the ASN.1 types including their
@@ -521,7 +496,7 @@ Operational ::= BOOLEAN --ASN.1 definition </pre>
<p>In Erlang code it may look like:</p>
<pre>
Val = true,
-{ok,Bytes}=asn1rt:encode(MyModule,'Operational',Val), </pre>
+{ok,Bytes} = MyModule:encode('Operational', Val), </pre>
<p>Below follows a description of how
values of each type can be represented in Erlang.
</p>
@@ -587,20 +562,18 @@ T6value3 = white
<section>
<marker id="REAL"></marker>
<title>REAL</title>
- <p>In this version reals are not implemented. When they are,
- the following
- ASN.1 type is used:</p>
+ <p>The following ASN.1 type is used for real numbers:</p>
<pre>
R1 ::= REAL
</pre>
- <p>Can be assigned a value in Erlang as:</p>
+ <p>It can be assigned a value in Erlang as:</p>
<pre>
-R1value1 = 2.14,
+R1value1 = "2.14",
R1value2 = {256,10,-2},
</pre>
<p>In the last line note that the tuple {256,10,-2} is the real number
2.56 in a special notation, which will encode faster than simply
- stating the number as 2.56. The arity three tuple is
+ stating the number as <c>"2.56"</c>. The arity three tuple is
<c>{Mantissa,Base,Exponent}</c> i.e. Mantissa * Base^Exponent.</p>
</section>
@@ -653,7 +626,7 @@ Day1 = saturday,
Bits1 ::= BIT STRING
Bits2 ::= BIT STRING {foo(0),bar(1),gnu(2),gnome(3),punk(14)}
</pre>
- <p>There are five different notations available for representation of
+ <p>There are two notations available for representation of
BIT STRING values in Erlang and as input to the encode functions.</p>
<list type="ordered">
<item>A bitstring. By default, a BIT STRING with no
@@ -661,43 +634,10 @@ Bits2 ::= BIT STRING {foo(0),bar(1),gnu(2),gnome(3),punk(14)}
<item>A list of atoms corresponding to atoms in the <c>NamedBitList</c>
in the BIT STRING definition. A BIT STRING with symbolic
names will always be decoded to this format.</item>
- <item>A list of binary digits (0 or 1). This format is always
- accepted as input to the encode functions. A BIT STRING will
- be decoded to this format if <em>legacy_bit_string</em> option
- has been given. <em>This format may be withdrawn in a future
- release.</em>
- </item>
- <item>As <c>{Unused,Binary}</c> where <c>Unused</c> denotes how
- many trailing zero-bits 0 to 7 that are unused in the least
- significant byte in <c>Binary</c>. This format is always
- accepted as input to the encode functions. A BIT STRING will
- be decoded to this format if <em>compact_bit_string</em> has
- been given. <em>This format may be withdrawn in a future
- release.</em>
- </item>
- <item>A hexadecimal number (or an integer). This format should be
- avoided, since it is easy to misinterpret a <c>BIT STRING</c>
- value in this format. <em>This format may be withdrawn in a future
- release.</em>
- </item>
</list>
- <note>
- <p>It is recommended to either use the bitstring format (for
- BIT STRINGs with no symbolic names) or a list of symbolic
- names (for BIT STRINGs with symbolic names). The other formats
- should be avoided since they may be withdrawn in a future
- release.
- </p>
- </note>
+ <p>Example:</p>
<pre>
Bits1Val1 = &lt;&lt;0:1,1:1,0:1,1:1,1:1&gt;&gt;,
-Bits1Val2 = 16#1A,
-Bits1Val3 = {3,&lt;&lt;0:1,1:1,0:1,1:1,1:1,0:3&gt;&gt;},
-Bits1Val4 = [0,1,0,1,1]
- </pre>
- <p>Note that <c>Bits1Val1</c>, <c>Bits1Val2</c>, <c>Bits1Val3</c>,
- and <c>Bits1Val1</c> denote the same value.</p>
- <pre>
Bits2Val1 = [gnu,punk],
Bits2Val2 = &lt;&lt;2#1110:4&gt;&gt;,
Bits2Val3 = [bar,gnu,gnome],
@@ -708,37 +648,60 @@ Bits2Val3 = [bar,gnu,gnome],
2 and 14 are set to 1 and the rest set to 0. The symbolic values
appear as a list of values. If a named value appears, which is not
specified in the type definition, a run-time error will occur.</p>
- <p>The compact notation equivalent to the empty BIT STRING is
- <c><![CDATA[{0,<<>>}]]></c>, which in the other notations is
- <c><![CDATA[<<>>]]></c>, <c>[]</c>, or
- <c>0</c>.</p>
<p>BIT STRINGS may also be sub-typed with, for example, a SIZE
specification:</p>
<pre>
Bits3 ::= BIT STRING (SIZE(0..31)) </pre>
<p>This means that no bit higher than 31 can ever be set.</p>
+
+ <section>
+ <title>Deprecated representations for BIT STRING</title>
+ <p>In addition to the representations described above, the
+ following deprecated representations are available if the
+ specification has been compiled with the
+ <c>legacy_erlang_types</c> option:</p>
+ <list type="ordered">
+ <item>A list of binary digits (0 or 1). This format is
+ accepted as input to the encode functions, and a BIT STRING
+ will be decoded to this format if the
+ <em>legacy_bit_string</em> option has been given.
+ </item>
+ <item>As <c>{Unused,Binary}</c> where <c>Unused</c> denotes
+ how many trailing zero-bits 0 to 7 that are unused in the
+ least significant byte in <c>Binary</c>. This format is
+ accepted as input to the encode functions, and a <c>BIT
+ STRING</c> will be decoded to this format if
+ <em>compact_bit_string</em> has been given.
+ </item>
+ <item>A hexadecimal number (or an integer). This format
+ should be avoided, since it is easy to misinterpret a BIT
+ STRING value in this format.
+ </item>
+ </list>
+ </section>
</section>
<section>
<marker id="OCTET STRING"></marker>
<title>OCTET STRING</title>
- <p>The OCTET STRING is the simplest of all ASN.1 types The OCTET STRING
- only moves or transfers e.g. binary files or other unstructured
- information complying to two rules.
- Firstly, the bytes consist of octets and secondly, encoding is
- not required.</p>
+ <p>The OCTET STRING is the simplest of all ASN.1 types. The
+ OCTET STRING only moves or transfers e.g. binary files or other
+ unstructured information complying to two rules. Firstly, the
+ bytes consist of octets and secondly, encoding is not
+ required.</p>
<p>It is possible to have the following ASN.1 type definitions:</p>
<pre>
O1 ::= OCTET STRING
O2 ::= OCTET STRING (SIZE(28)) </pre>
<p>With the following example assignments in Erlang:</p>
<pre>
-O1Val = [17,13,19,20,0,0,255,254],
-O2Val = "must be exactly 28 chars....", </pre>
- <p>Observe that <c>O1Val</c> is assigned a series of numbers between 0
- and 255 i.e. octets.
- <c>O2Val</c> is assigned using the string notation.
- </p>
+O1Val = &lt;&lt;17,13,19,20,0,0,255,254&gt;&gt;,
+O2Val = &lt;&lt;"must be exactly 28 chars...."&gt;&gt;,</pre>
+ <p>By default, an OCTET STRING is always represented as
+ an Erlang binary. If the specification has been compiled with
+ the <c>legacy_erlang_types</c> option, the encode functions
+ will accept both lists and binaries, and the decode functions
+ will decode an OCTET STRING to a list.</p>
</section>
<section>
@@ -770,13 +733,11 @@ O2Val = "must be exactly 28 chars....", </pre>
specified for a type are especially important for PER, where
they affect the encoding.
</p>
- <p>Please note that <em>all</em> the Character strings are
- supported and it is possible to use the following ASN.1 type
- definitions:</p>
+ <p>Here are some examples:</p>
<pre>
Digs ::= NumericString (SIZE(1..3))
TextFile ::= IA5String (SIZE(0..64000)) </pre>
- <p>and the following Erlang assignments:</p>
+ <p>with corresponding Erlang assignments:</p>
<pre>
DigsVal1 = "456",
DigsVal2 = "123",
@@ -789,70 +750,86 @@ TextFileVal2 = [88,76,55,44,99,121 .......... a lot of characters here ....]
characters are all represented by quadruples beginning with
three zeros like {0,0,0,65} for the 'A' character. When
decoding a value for these strings the result is a list of
- quadruples, or integers when the value is an ASCII character.
- The following example shows how it works:</p>
- <p>In a file <c>PrimStrings.asn1</c> the type <c>BMP</c> is defined as
- <br></br>
-<c>BMP ::= BMPString</c> then using BER encoding (<c>ber</c>
- option)the input/output format will be:</p>
+ quadruples, or integers when the value is an ASCII character.</p>
+
+ <p>The following example shows how it works. We have the following
+ specification in the file <c>PrimStrings.asn1</c>.</p>
+ <pre>
+PrimStrings DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ BMP ::= BMPString
+END
+ </pre>
+
+ <p>Encoding and decoding some strings:</p>
+
<pre>
-1> <input>{ok,Bytes1} = asn1rt:encode('PrimStrings','BMP',[{0,0,53,53},{0,0,45,56}]).</input>
-{ok,[30,4,"55-8"]}
-2> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes1)).</input>
+1> <input>asn1ct:compile('PrimStrings', [ber]).</input>
+ok
+2> <input>{ok,Bytes1} = 'PrimStrings':encode('BMP', [{0,0,53,53},{0,0,45,56}]).</input>
+{ok,&lt;&lt;30,4,53,54,45,56>>}
+3> <input>'PrimStrings':decode('BMP', Bytes1).</input>
{ok,[{0,0,53,53},{0,0,45,56}]}
-3> <input>{ok,Bytes2} = asn1rt:encode('PrimStrings','BMP',[{0,0,53,53},{0,0,0,65}]).</input>
-{ok,[30,4,[53,53,0,65]]}
-4> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes2)).</input>
+4> <input>{ok,Bytes2} = 'PrimStrings':encode('BMP', [{0,0,53,53},{0,0,0,65}]).</input>
+{ok,&lt;&lt;30,4,53,53,0,65>>}
+5> <input>'PrimStrings':decode('BMP', Bytes2).</input>
{ok,[{0,0,53,53},65]}
-5> <input>{ok,Bytes3} = asn1rt:encode('PrimStrings','BMP',"BMP string").</input>
-{ok,[30,20,[0,66,0,77,0,80,0,32,0,115,0,116,0,114,0,105,0,110,0,103]]}
-6> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes3)).</input>
+6> <input>{ok,Bytes3} = 'PrimStrings':encode('BMP', "BMP string").</input>
+{ok,&lt;&lt;30,20,0,66,0,77,0,80,0,32,0,115,0,116,0,114,0,105,0,110,0,103>>}
+7> <input>'PrimStrings':decode('BMP', Bytes3).</input>
{ok,"BMP string"} </pre>
- <p>The UTF8String is represented in Erlang as a list of integers,
- where each integer represents the unicode value of one
- character. When a value shall be encoded one first has to
- transform it to a UTF8 encoded binary, then it can be encoded by
- asn1. When decoding the result is a UTF8 encoded binary, which
- may be transformed to an integer list. The transformation
- functions, <c>utf8_binary_to_list</c> and
- <c>utf8_list_to_binary</c>, are in the <c>asn1rt</c> module. In
- the example below we assume an asn1 definition <c>UTF ::= UTF8String</c> in a module <c>UTF.asn</c>:</p>
+
+ <p>The UTF8String type is represented as a UTF-8 encoded binary in
+ Erlang. Such binaries can be created directly using the binary syntax
+ or by converting from a list of Unicode code points using the
+ <c>unicode:characters_to_binary/1</c> function.</p>
+
+ <p>Here are some examples showing how UTF-8 encoded binaries can
+ be created and manipulated:</p>
+
+ <pre>
+1> <input>Gs = "Мой маленький Гном".</input>
+[1052,1086,1081,32,1084,1072,1083,1077,1085,1100,1082,1080,
+ 1081,32,1043,1085,1086,1084]
+2> <input>Gbin = unicode:characters_to_binary(Gs).</input>
+&lt;&lt;208,156,208,190,208,185,32,208,188,208,176,208,187,208,
+ 181,208,189,209,140,208,186,208,184,208,185,32,208,147,
+ 208,...>>
+3> <input>Gbin = &lt;&lt;"Мой маленький Гном"/utf8>>.</input>
+&lt;&lt;208,156,208,190,208,185,32,208,188,208,176,208,187,208,
+ 181,208,189,209,140,208,186,208,184,208,185,32,208,147,
+ 208,...>>
+4> <input>Gs = unicode:characters_to_list(Gbin).</input>
+[1052,1086,1081,32,1084,1072,1083,1077,1085,1100,1082,1080,
+ 1081,32,1043,1085,1086,1084]
+ </pre>
+
+ <p>See the <seealso marker="stdlib:unicode">unicode</seealso> module
+ for more details.</p>
+
+ <p>In the following example we will use this ASN.1 specification:</p>
+ <pre>
+UTF DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ UTF ::= UTF8String
+END
+ </pre>
+
+ <p>Encoding and decoding a string with Unicode characters:</p>
+
<pre>
-1> <input>asn1ct:compile('UTF',[ber]).</input>
-Erlang ASN.1 version "1.4.3.3" compiling "UTF.asn"
-Compiler Options: [ber]
---{generated,"UTF.asn1db"}--
---{generated,"UTF.erl"}--
+5> <input>asn1ct:compile('UTF', [ber]).</input>
ok
-2> <input>UTF8Val1 = "hello".</input>
-"hello"
-3> <input>{ok,UTF8bin1} = asn1rt:utf8_list_to_binary(UTF8Val1).</input>
-{ok,&lt;&lt;104,101,108,108,111&gt;&gt;}
-4> <input>{ok,B}='UTF':encode('UTF',UTF8bin1).</input>
-{ok,[12,
- 5,
- &lt;&lt;104,101,108,108,111&gt;&gt;]}
-5> <input>Bin = list_to_binary(B).</input>
-&lt;&lt;12,5,104,101,108,108,111&gt;&gt;
-6> <input>{ok,UTF8bin1}='UTF':decode('UTF',Bin).</input>
-{ok,&lt;&lt;104,101,108,108,111&gt;&gt;}
-7> <input>asn1rt:utf8_binary_to_list(UTF8bin1).</input>
-{ok,"hello"}
-8> <input>UTF8Val2 = [16#00,16#100,16#ffff,16#ffffff].</input>
-[0,256,65535,16777215]
-9> <input>{ok,UTF8bin2} = asn1rt:utf8_list_to_binary(UTF8Val2).</input>
-{ok,&lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;}
-10> <input>{ok,B2} = 'UTF':encode('UTF',UTF8bin2).</input>
-{ok,[12,
- 11,
- &lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;]}
-11> <input>Bin2 = list_to_binary(B2).</input>
-&lt;&lt;12,11,0,196,128,239,191,191,248,191,191,191,191&gt;&gt;
-12> <input>{ok,UTF8bin2} = 'UTF':decode('UTF',Bin2).</input>
-{ok,&lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;}
-13> <input>asn1rt:utf8_binary_to_list(UTF8bin2).</input>
-{ok,[0,256,65535,16777215]}
-14> </pre>
+6> <input>{ok,Bytes1} = 'UTF':encode('UTF', &lt;&lt;"Гном"/utf8>>).</input>
+{ok,&lt;&lt;12,8,208,147,208,189,208,190,208,188>>}
+7> <input>{ok,Bin1} = 'UTF':decode('UTF', Bytes1).</input>
+{ok,&lt;&lt;208,147,208,189,208,190,208,188>>}
+8> <input>io:format("~ts\n", [Bin1]).</input>
+Гном
+ok
+9> <input>unicode:characters_to_list(Bin1).</input>
+[1043,1085,1086,1084]
+ </pre>
</section>
<section>
@@ -887,9 +864,11 @@ OidVal1 = {1,2,55},
<section>
<marker id="Object Descriptor"></marker>
<title>Object Descriptor</title>
- <p>Values of this type can be assigned a value as an ordinary string i.e. <br></br>
+ <p>Values of this type can be assigned a value as an ordinary string
+ like this:</p>
- "This is the value of an Object descriptor"</p>
+ <pre>
+ "This is the value of an Object descriptor"</pre>
</section>
<section>
@@ -932,19 +911,31 @@ Pdu ::= SEQUENCE {
<pre>
MyPdu = #'Pdu'{a=22,b=77.99,c={0,1,2,3,4},d='NULL'}. </pre>
<p>The decode functions will return a record as result when decoding
- a <c>SEQUENCE</c> or a <c>SET</c>.
- <marker id="DEFAULT"></marker>
-</p>
- <p>A <c>SEQUENCE</c> and a <c>SET</c> may contain a component with a
- <c>DEFAULT</c> key word followed by the actual value that is the
- default value. In case of BER encoding it is optional to encode the
- value if it equals the default value. If the application uses the
- atom asn1_DEFAULT as value or if the value is a primitive value
- that equals the default value the encoding omits the bytes for
- this value, which is more efficient and it results in fever
- bytes to send to the receiving application.</p>
- <p>For instance, if the following types exists in a file "File.asn":</p>
+ a <c>SEQUENCE</c> or a <c>SET</c>.</p>
+
+ <p>A <c>SEQUENCE</c> and a <c>SET</c> may contain a component
+ with a <c>DEFAULT</c> key word followed by the actual value that
+ is the default value. The <c>DEFAULT</c> keyword means that the
+ application doing the encoding can omit encoding of the value,
+ thus resulting in fewer bytes to send to the receiving
+ application.</p>
+
+ <p>An application can use the atom <c>asn1_DEFAULT</c> to indicate
+ that the encoding should be omitted for that position in
+ the SEQUENCE.</p>
+
+ <p>Depending on the encoding rules, the encoder may also compare
+ the given value to the default value and automatically omit the
+ encoding if they are equal. How much effort the encoder makes to
+ to compare the values depends on the encoding rules. The DER
+ encoding rules forbids encoding a value equal to the default value,
+ so it has a more thorough and time-consuming comparison than the
+ encoders for the other encoding rules.</p>
+
+ <p>In the following example we will use this ASN.1 specification:</p>
<pre>
+File DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
Seq1 ::= SEQUENCE {
a INTEGER DEFAULT 1,
b Seq2 DEFAULT {aa TRUE, bb 15}
@@ -954,131 +945,50 @@ Seq2 ::= SEQUENCE {
aa BOOLEAN,
bb INTEGER
}
- </pre>
- <p>Some values and the corresponding encoding in an Erlang terminal
- is shown below:</p>
+
+Seq3 ::= SEQUENCE {
+ bs BIT STRING {a(0), b(1), c(2)} DEFAULT {a, c}
+}
+END </pre>
+ <p>Here is an example where the BER encoder is able to omit encoding
+ of the default values:</p>
<pre>
-1> <input>asn1ct:compile('File').</input>
-Erlang ASN.1 version "1.3.2" compiling "File.asn1"
-Compiler Options: []
---{generated,"File.asn1db"}--
---{generated,"File.hrl"}--
---{generated,"File.erl"}--
+1> <input>asn1ct:compile('File', [ber]).</input>
ok
-2> <input>'File':encode('Seq1',{'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
-{ok,["0",[0],[[],[]]]}
-3> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-4> <input>'File':encode('Seq1',{'Seq1',1,{'Seq2',true,15}}).</input>
-{ok,["0","\\b",[[],["\\241",[6],[[[128],[1],"\\377"],[[129],[1],[15]]]]]]}
-5> <input>lists:flatten(["0","\\b",[[],["\\241",[6],[[[128],[1],"\\377"],[[129],[1],[15]]]]]]).</input>
-[48,8,161,6,128,1,255,129,1,15]
-6> </pre>
- <p>The result after command line 3, in the example above,shows that the
- encoder omits the encoding of default values when they are specific
- by asn1_DEFAULT. Line 5 shows that even primitive values that equals
- the default value are detected and not encoded. But the constructed
- value of component <c>b</c> in <c>Seq1</c> is not recognized as the
- default value. Checking of default values in <c>BER</c> is not done
- in case of complex values, because it would be to expensive.
- <marker id="DEFAULT DER"></marker>
-</p>
- <p>But, the DER encoding format has stronger requirements regarding
- default values both for SET and SEQUENCE. A more elaborate and time
- expensive check of default values will take place. The following is
- an example with the same types and values as above but with der
- encoding format.</p>
- <pre>
-1> <input>asn1ct:compile('File',[der]).</input>
-Erlang ASN.1 version "1.3.2" compiling "File.asn1"
-Compiler Options: [der]
---{generated,"File.asn1db"}--
---{generated,"File.hrl"}--
---{generated,"File.erl"}--
+2> <input>'File':encode('Seq1', {'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
+{ok,&lt;&lt;48,0>>}
+3> <input>'File':encode('Seq1', {'Seq1',1,{'Seq2',true,15}}).</input>
+{ok,&lt;&lt;48,0>>} </pre>
+
+ <p>And here is an example with a named BIT STRING where the BER
+ encoder will not omit the encoding:</p>
+ <pre>
+4> <input>'File':encode('Seq3', {'Seq3',asn1_DEFAULT).</input>
+{ok,&lt;&lt;48,0>>}
+5> <input>'File':encode('Seq3', {'Seq3',&lt;&lt;16#101:3>>).</input>
+{ok,&lt;&lt;48,4,128,2,5,160>>} </pre>
+
+ <p>The DER encoder will omit the encoding for the same BIT STRING:</p>
+ <pre>
+6> <input>asn1ct:compile('File', [ber,der]).</input>
ok
-2> <input>'File':encode('Seq1',{'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
-{ok,["0",[0],[[],[]]]}
-3> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-4> <input>'File':encode('Seq1',{'Seq1',1,{'Seq2',true,15}}).</input>
-{ok,["0",[0],[[],[]]]}
-5> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-6>
- </pre>
- <p>Line 5 shows that even values of constructed types is checked and if
- it equals the default value it will not be encoded.</p>
+7> <input>'File':encode('Seq3', {'Seq3',asn1_DEFAULT).</input>
+{ok,&lt;&lt;48,0>>}
+8> <input>'File':encode('Seq3', {'Seq3',&lt;&lt;16#101:3>>).</input>
+{ok,&lt;&lt;48,0>>} </pre>
</section>
<section>
<marker id="SET"></marker>
<title>SET</title>
- <p>The SET type is an unusual construct and normally the SEQUENCE
- type is more appropriate to use. Set is also inefficient compared with SEQUENCE, as the components can be in any order. Hence, it must be possible
- to distinguish every component in 'SET', both when
- encoding and decoding a value of a type defined to be a SET.
- The tags of all components must be different from each other
- in order to be easily recognizable.</p>
- <p>A SET may be defined as:</p>
- <pre>
-Pdu2 ::= SET {
- a INTEGER,
- b BOOLEAN,
- c ENUMERATED {on(0),off(1)} } </pre>
- <p>A SET is represented as an Erlang record.
- For each SEQUENCE and <c>SET</c> in
- an ASN.1 module an Erlang record declaration is generated. For
- <c>Pdu2</c> above a record is defined like this:</p>
- <pre>
--record('Pdu2',{a, b, c}). </pre>
- <p>The record declarations for a module <c>M</c> are placed in a
- separate <c>M.hrl</c> file.</p>
- <p>Values can be assigned in Erlang as demonstrated below:</p>
- <pre>
-V = #'Pdu2'{a=44,b=false,c=off}. </pre>
- <p>The decode functions will return a record as result when decoding
- a SET.
- </p>
- <p>The difference between SET and SEQUENCE is that the order of
- the components (in the BER encoded format) is undefined for SET
- and defined as the lexical order from the ASN.1 definition for
- SEQUENCE. The ASN.1 compiler for Erlang will always encode a
- SET in the lexical order. The decode routines can handle SET
- components encoded in any order but will always return the
- result as a record. Since all components of the SET must be
- distinguishable both in the encoding phase as well as the
- decoding phase the following type is not allowed in a module
- with EXPLICIT or IMPLICIT as tag-default :</p>
- <p></p>
- <pre>
-Bad ::= SET {i INTEGER,
- j INTEGER } </pre>
- <p>The ASN.1 to Erlang compiler rejects the above type. We
- shall not explain the concept of tag further here, we refer to
- [<cite id="X.680"></cite>].
- </p>
- <p>Encoding of a SET with components with DEFAULT values behaves
- similar as a SEQUENCE, <seealso marker="#DEFAULT">see above</seealso>. The DER encoding format restrictions on DEFAULT
- values is the same for SET as for SEQUENCE, and is supported by
- the compiler, <seealso marker="#DEFAULT DER">see above</seealso>.</p>
- <p>Moreover, in DER the elements of a SET will be sorted. If a
- component is an un-tagged choice the sorting have to take place
- in run-time. This fact emphasizes the following recommendation
- if DER encoding format is used.</p>
- <p>The concept of SET is an unusual
- construct and one cannot think of one single application
- where the set type is essential. (Imagine if someone
- "invented'' the shuffled array in 'C') People tend to think
- that 'SET' sounds nicer and more mathematical than 'SEQUENCE'
- and hence use it when 'SEQUENCE' would have been more
- appropriate. It is also most inefficient, since every correct
- implementation of SET must always be prepared to accept the
- components in any order. So, if possible use SEQUENCE instead
- of SET.</p>
+ <p>In Erlang, the SET type is used exactly as SEQUENCE. Note
+ that if the BER or DER encoding rules are used, decoding a
+ SET is slower than decoding a SEQUENCE because the components
+ must be sorted.</p>
</section>
<section>
- <title>Notes about Extend-ability for SEQUENCE and SET</title>
+ <title>Notes about extensibility for SEQUENCE and SET</title>
<p>When a SEQUENCE or SET contains an extension marker and
extension components like this:</p>
<pre>
@@ -1105,51 +1015,28 @@ SExt ::= SEQUENCE {
<marker id="CHOICE"></marker>
<title>CHOICE</title>
<p>The CHOICE type is a space saver and is similar to the concept of a
- 'union' in the C-language. As with the previous SET-type, the
- tags of all components of a CHOICE need to be distinct. If
- AUTOMATIC TAGS are defined for the module (which is
- preferable) the tags can be omitted completely in the ASN.1
- specification of a CHOICE.
- </p>
+ 'union' in the C language.</p>
<p>Assume:</p>
<pre>
+SomeModuleName DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
T ::= CHOICE {
- x [0] REAL,
- y [1] INTEGER,
- z [2] OBJECT IDENTIFIER }
- </pre>
+ x REAL,
+ y INTEGER,
+ z OBJECT IDENTIFIER }
+END </pre>
<p>It is then possible to assign values:</p>
<pre>
TVal1 = {y,17},
TVal2 = {z,{0,1,2}},
</pre>
- <p>A CHOICE value is always represented as the tuple
+ <p>A CHOICE value is always represented as the tuple
<c>{ChoiceAlternative, Val}</c> where <c>ChoiceAlternative</c>
- is an atom denoting the selected choice
- alternative.
- </p>
- <p>It is also allowed to have a CHOICE type tagged as follow:</p>
- <p></p>
- <pre>
-C ::= [PRIVATE 111] CHOICE {
- C1,
- C2 }
-
-C1 ::= CHOICE {
- a [0] INTEGER,
- b [1] BOOLEAN }
-
-C2 ::= CHOICE {
- c [2] INTEGER,
- d [3] OCTET STRING } </pre>
- <p>In this case, the top type C appears to have no tags at all in
- its components, however, both C1 and C2 are also defined as
- CHOICE types and they have distinct tags among themselves.
- Hence, the above type C is both legal and allowed.
+ is an atom denoting the selected choice alternative.
</p>
<section>
- <title>Extendable CHOICE</title>
+ <title>Extensible CHOICE</title>
<p>When a CHOICE contains an extension marker and the decoder detects
an unknown alternative of the CHOICE the value is represented as:</p>
<pre>
@@ -1226,26 +1113,29 @@ Arr2Val = ["abc",[14,34,54],"Octets"], </pre>
Where <c>Value</c> may be a value of yet another type T2.</p>
<p>For example:</p>
<pre>
+EmbeddedExample DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
B ::= SEQUENCE {
a Arr1,
- b [0] T }
+ b T }
Arr1 ::= SET SIZE (5) OF INTEGER (4..9)
T ::= CHOICE {
- x [0] REAL,
- y [1] INTEGER,
- z [2] OBJECT IDENTIFIER } </pre>
- <p>The above example can be assigned like this in Erlang:</p>
+ x REAL,
+ y INTEGER,
+ z OBJECT IDENTIFIER }
+ END </pre>
+ <p>The SEQUENCE b can be encoded like this in Erlang:</p>
<pre>
-V2 = #'B'{a=[4,5,6,7,8], b={x,7.77}}.
- </pre>
+1> 'EmbeddedExample':encode('B', {'B',[4,5,6,7,8],{x,"7.77"}}).
+{ok,&lt;&lt;5,56,0,8,3,55,55,55,46,69,45,50>>} </pre>
</section>
</section>
<section>
<title>Naming of Records in .hrl Files</title>
- <p>When an asn1 specification is compiled all defined types of
+ <p>When an ASN.1 specification is compiled all defined types of
type SET or SEQUENCE will result in a corresponding record in the
generated hrl file. This is because the values for SET/SEQUENCE
as mentioned in sections above are represented as records.</p>
@@ -1261,8 +1151,8 @@ V2 = #'B'{a=[4,5,6,7,8], b={x,7.77}}.
Emb ::= SEQUENCE {
a SEQUENCE OF OCTET STRING,
b SET {
- a [0] INTEGER,
- b [1] INTEGER DEFAULT 66},
+ a INTEGER,
+ b INTEGER DEFAULT 66},
c CHOICE {
a INTEGER,
b FooType } }
@@ -1333,7 +1223,7 @@ PType{T} ::= SEQUENCE{
<p>Types may refer to themselves. Suppose:</p>
<pre>
Rec ::= CHOICE {
- nothing [0] NULL,
+ nothing NULL,
something SEQUENCE {
a INTEGER,
b OCTET STRING,
@@ -1365,7 +1255,7 @@ tt TT ::= {a 77,b {"kalle","kula"}} </pre>
Firstly, it could be used as the value in some DEFAULT component:</p>
<pre>
SS ::= SET {
- s [0] OBJECT IDENTIFIER,
+ s OBJECT IDENTIFIER,
val TT DEFAULT tt } </pre>
<p>It could also be used from inside an Erlang program. If the above ASN.1
code was defined in ASN.1 module <c>Values</c>, then the ASN.1 value
@@ -1399,8 +1289,8 @@ SS ::= SET {
<marker id="Information Object"></marker>
<title>ASN.1 Information Objects (X.681)</title>
<p>Information Object Classes, Information Objects and Information
- Object Sets, (in the following called classes, objects and
- object sets respectively), are defined in the standard
+ Object Sets (in the following called classes, objects and
+ object sets respectively) are defined in the standard
definition [<cite id="X.681"></cite>]. In the following only a brief
explanation is given. </p>
<p>These constructs makes it possible to define open types,
@@ -1469,9 +1359,26 @@ StartMessage ::= SEQUENCE {
<p><c>StartMessage</c> can in the <c>content</c> field be
encoded with a value of any type that an object in the
<c>GENERAL-PROCEDURES</c> object set has in its <c>NEW MESSAGE</c> field. This field refers to a type field
- <c><![CDATA[&amp;Message]]></c> in the class. The <c>msgId</c> field is always
+ <c>&amp;Message</c> in the class. The <c>msgId</c> field is always
encoded as a PrintableString, since the field refers to a fixed type
in the class.</p>
+ <p>In practice, object sets are usually declared to be extensible so
+ so that more objects can be added to the set later. Extensibility is
+ indicated like this:</p>
+ <pre>
+GENERAL-PROCEDURES GENERAL-PROCEDURE ::= {
+ object1 | object2, ...} </pre>
+ <p>When decoding a type that uses an extensible set constraint,
+ there is always the possibility that the value in the UNIQUE
+ field is unknown (i.e. the type has been encoded with a later
+ version of the ASN.1 specification). When that happens, the
+ unencoded data will be returned wrapped in a tuple like this:</p>
+
+ <pre>
+{asn1_OPENTYPE,Binary}</pre>
+ <p>where <c>Binary</c> is an Erlang binary that contains the encoded
+ data. (If the option <c>legacy_erlang_types</c> has been given,
+ just the binary will be returned.)</p>
</section>
<section>
@@ -1483,7 +1390,7 @@ StartMessage ::= SEQUENCE {
instance, if a Type is used in a definition with certain
purpose, one want the type-name to express the intention. This
can be done with parameterization.</p>
- <p>When many types (or an other ASN.1 entity) only differs in some
+ <p>When many types (or another ASN.1 entity) only differs in some
minor cases, but the structure of the types are similar, only
one general type can be defined and the differences may be supplied
through parameters. </p>
@@ -1500,132 +1407,11 @@ T1 ::= General{PrintableString}
T2 ::= General{BIT STRING}
</pre>
<p>An example of a value that can be encoded as type T1 is {12,"hello"}.</p>
- <p>Observe that the compiler not generates encode/decode functions for
- parameterized types, only for the instances of the parameterized
- types. So, if a file contains the types General{}, T1 and T2 above,
+ <p>Note that the compiler does not generate encode/decode functions for
+ parameterized types, but only for the instances of the parameterized
+ types. Therefore, if a file contains the types General{}, T1 and T2 above,
encode/decode functions will only be generated for T1 and T2.
</p>
</section>
-
- <section>
- <title>Tags</title>
- <p>Every built-in ASN.1 type, except CHOICE and ANY have a universal tag.
- This is a unique number that clearly identifies the type. <br></br>
-
- It is essential for all users of ASN.1 to
- understand all the details about tags.</p>
- <p>Tags are implicitly encoded in the BER encoding as shown below, but
- are hardly not accounted for in the PER encoding. In PER tags are
- used for instance to sort the components of a SET.</p>
- <p>There are four different types of tags.</p>
- <taglist>
- <tag><em>universal</em></tag>
- <item>
- <p>For types whose meaning is the same in all
- applications. Such as integers, sequences and so on; that is, all the built in
- types.</p>
- </item>
- <tag><em>application</em></tag>
- <item>
- <p>For application specific types for example, the types in
- X.400 Message handling service have this sort of tag.</p>
- </item>
- <tag><em>private</em></tag>
- <item>
- <p>For your own private types.</p>
- </item>
- <tag><em>context</em></tag>
- <item>
- <p>This is used to distinguish otherwise indistinguishable
- types in a specific context. For example, if we have two
- components of a
- CHOICE type that are both <c>INTEGER</c> values, there is no
- way for the decoder to
- decipher which component was actually chosen, since both
- components will be
- tagged as <c>INTEGER</c>. When this or similar situations occur,
- one or both of the components should be given a context specific
- to resolve the ambiguity.</p>
- </item>
- </taglist>
- <p>The tag in the case of the 'Apdu' type [PRIVATE 1] is encoded to a
- sequence of bytes making it possible for a
- decoder to look at the (initial) bytes that arrive and determine
- whether the rest of the bytes must be of the type associated
- with that particular sequence of bytes. This means that each
- tag must be uniquely associated with <em>only</em> one ASN.1
- type.
- </p>
- <p>Immediately following the tag is a sequence of bytes
- informing the decoder of the length of the instance. This is
- sometimes referred to as TLV (Tag length value) encoding.
- Hence, the structure of a BER encoded series of bytes is as shown in the table below.</p>
- <p></p>
- <table>
- <row>
- <cell align="left" valign="middle">Tag</cell>
- <cell align="left" valign="middle">Len</cell>
- <cell align="left" valign="middle">Value</cell>
- </row>
- <tcaption>Structure of a BER encoded series of bytes</tcaption>
- </table>
- </section>
-
- <section>
- <title>Encoding Rules</title>
- <p>When the first recommendation on ASN.1 was released 1988 it was
- accompanied with the Basic Encoding Rules, BER, as the only
- alternative for encoding.
- BER is a somewhat verbose protocol. It adopts a so-called TLV (type,
- length, value) approach to encoding in which every element of the
- encoding carries some type information, some length information and
- then the value of that element. Where the element is itself
- structured, then the Value part of the element is itself a series of
- embedded TLV components, to whatever depth is necessary. In summary,
- BER is not a compact encoding but is relatively fast and easy to
- produce.</p>
- <p>The DER (Distinguished Encoding Rule) encoding format was included in
- the standard in 1994. It is a specialized form of BER, which gives
- the encoder the option to encode some entities differently. For
- instance, is the value for TRUE any octet with any bit set to one. But,
- DER does not leave any such choices. The value for TRUE in the DER
- case is encoded as the octet <c>11111111</c>. So, the same value
- encoded by two different DER encoders must result in the same bit
- stream.</p>
- <p>A more compact encoding is achieved with the Packed Encoding
- Rules PER which was introduced together with the revised
- recommendation in 1994. PER takes a rather different approach from
- that taken by BER. The first difference is that the tag part in
- the TLV is omitted from the encodings, and any tags in the
- notation are not encoded. The potential ambiguities are resolved
- as follows:</p>
- <list type="bulleted">
- <item>
- <p>A CHOICE is encoded by first encoding a choice index which
- identifies the chosen
- alternative by its position in the notation.</p>
- </item>
- <item>
- <p>The elements of a SEQUENCE are transmitted in textual
- order. OPTIONAL or DEFAULT elements are preceded by a bit map
- to identify which elements are present. After sorting the
- elements of a SET in the "canonical tag order" as defined in
- X.680 8.6 they are treated as a SEQUENCE regarding OPTIONAL
- and DEFAULT elements. A SET is transferred in the sorted
- order.</p>
- </item>
- </list>
- <p>A second difference is that PER takes full account of the sub-typing
- information in that the encoded bytes are affected by the constraints.
- The BER encoded bytes are unaffected by the constraints.
- PER uses the sub-typing information to for example omit length fields
- whenever possible. </p>
- <p>The run-time functions, sometimes take the constraints into account
- both for BER and PER. For instance are SIZE constrained strings checked.</p>
- <p>There are two variants of PER, <em>aligned</em> and <em>unaligned</em>.
- In summary, PER results in compact encodings which require much more
- computation to produce than BER.
- </p>
- </section>
</chapter>
diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml
index fcd77e9dc6..32ff2d52cf 100644
--- a/lib/asn1/doc/src/asn1ct.xml
+++ b/lib/asn1/doc/src/asn1ct.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -42,6 +42,18 @@
can be used in during development of applications which handles ASN.1
data (encoded as BER or PER).</p>
<note>
+ <p>By default in OTP 17, the representation of the BIT STRING
+ and OCTET STRING types as Erlang terms have changed. BIT
+ STRING values are now Erlang bitstrings and OCTET STRING values
+ are binaries. Also, an undecoded open type will now be wrapped in
+ a <c>asn1_OPENTYPE</c> tuple. For details see <seealso
+ marker="asn1_ug#BIT STRING">BIT STRING</seealso>, <seealso
+ marker="asn1_ug#OCTET STRING">OCTET STRING</seealso>, and
+ <seealso marker="asn1_ug#Information%20Object">ASN.1 Information Objects</seealso> in User's Guide.</p>
+ <p>To revert to the old representation of the types, use the
+ <c>legacy_erlang_types</c> option.</p>
+ </note>
+ <note>
<p>In R16, the options have been simplified. The back-end is chosen
using one of the options <c>ber</c>, <c>per</c>, or <c>uper</c>.
The options <c>optimize</c>, <c>nif</c>, and <c>driver</c> options
@@ -50,7 +62,7 @@
and <c>uper_bin</c> options will still work, but will print a warning.
</p>
<p>Another change in R16 is that the generated <c>encode/2</c>
- function (and <c>asn1rt:encode/3</c>) always returns a binary.
+ function always returns a binary.
The <c>encode/2</c> function for the BER back-end used to return
an iolist.</p>
</note>
@@ -64,7 +76,7 @@
<v>Asn1module = atom() | string()</v>
<v>Options = [Option| OldOption]</v>
<v>Option = ber | per | uper | der | compact_bit_string |
- legacy_bit_string |
+ legacy_bit_string | legacy_erlang_types |
noobj | {n2n, EnumTypeName} |{outdir, Dir} | {i, IncludeDir} |
asn1config | undec_rest | no_ok_wrapper |
{macro_name_prefix, Prefix} | {record_name_prefix, Prefix} | verbose | warnings_as_errors</v>
@@ -163,6 +175,7 @@ File3.asn </pre>
BIT STRING type section in the Users Guide
</seealso>.
</p>
+ <p>This option implies the <c>legacy_erlang_types</c> option.</p>
</item>
<tag><c>legacy_bit_string</c></tag>
<item>
@@ -175,8 +188,19 @@ File3.asn </pre>
<seealso marker="asn1_ug#BIT STRING">
BIT STRING type section in the Users Guide
</seealso>.
+ <p>This option implies the <c>legacy_erlang_types</c> option.</p>
</p>
</item>
+ <tag><c>legacy_erlang_types</c></tag>
+ <item>
+ <p>Use the same Erlang types to represent BIT STRING and
+ OCTET STRING as in R16. For details see <seealso
+ marker="asn1_ug#BIT STRING">BIT STRING</seealso> and
+ <seealso marker="asn1_ug#OCTET STRING">OCTET
+ STRING</seealso> in User's Guide.</p>
+ <p><em>This option is not recommended for
+ new code.</em></p>
+ </item>
<tag><c>{n2n, EnumTypeName}</c></tag>
<item>
<p>
@@ -303,6 +327,8 @@ File3.asn </pre>
not always checked. Returns <c>{ok, Bytes}</c> if successful or
<c>{error, Reason}</c> if an error occurred.
</p>
+ <p>This function is deprecated.
+ Use <c>Module:encode(Type, Value)</c> instead.</p>
</desc>
</func>
<func>
@@ -316,6 +342,8 @@ File3.asn </pre>
<desc>
<p>Decodes <c>Type</c> from <c>Module</c> from the binary
<c>Bytes</c>. Returns <c>{ok, Value}</c> if successful.</p>
+ <p>This function is deprecated.
+ Use <c>Module:decode(Type, Bytes)</c> instead.</p>
</desc>
</func>
<func>
diff --git a/lib/asn1/doc/src/asn1rt.xml b/lib/asn1/doc/src/asn1rt.xml
index 2b1b108ab1..3cf56b01ca 100644
--- a/lib/asn1/doc/src/asn1rt.xml
+++ b/lib/asn1/doc/src/asn1rt.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -34,9 +34,12 @@
<module>asn1rt</module>
<modulesummary>ASN.1 runtime support functions</modulesummary>
<description>
- <p>This module is the interface module for the ASN.1 runtime support functions.
- To encode and decode ASN.1 types in runtime the functions in this module
- should be used.</p>
+ <warning>
+ <p>
+ All functions in this module are deprecated and will be
+ removed in a future release.
+ </p>
+ </warning>
</description>
<funcs>
@@ -52,6 +55,7 @@
<desc>
<p>Decodes <c>Type</c> from <c>Module</c> from the binary <c>Bytes</c>.
Returns <c>{ok,Value}</c> if successful.</p>
+ <p>Use <c>Module:decode(Type, Bytes)</c> instead of this function.</p>
</desc>
</func>
@@ -65,16 +69,13 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Encodes <c>Value</c> of <c>Type</c> defined in the ASN.1 module
- <c>Module</c>. Returns a possibly nested list of bytes and or binaries
- if successful. To get as fast execution as possible the
- encode function only performs rudimentary tests that the input
- <c>Value</c>
- is a correct instance of <c>Type</c>. The length of strings is for example
- not always checked. </p>
- <note>
- <p>Starting in R16, <c>Bytes</c> is always a binary.</p>
- </note>
+ <p>Encodes <c>Value</c> of <c>Type</c> defined in the ASN.1
+ module <c>Module</c>. Returns a binary if successful. To get
+ as fast execution as possible the encode function only
+ performs rudimentary tests that the input <c>Value</c> is a
+ correct instance of <c>Type</c>. The length of strings is, for
+ example, not always checked. </p>
+ <p>Use <c>Module:encode(Type, Value)</c> instead of this function.</p>
</desc>
</func>
@@ -90,6 +91,7 @@
<p><c>info/1</c> returns the version of the asn1 compiler that was
used to compile the module. It also returns the compiler options
that was used.</p>
+ <p>Use <c>Module:info()</c> instead of this function.</p>
</desc>
</func>
@@ -106,6 +108,7 @@
to a list of integers, where each integer represents one
character as its unicode value. The function fails if the binary
is not a properly encoded UTF8 string.</p>
+ <p>Use <seealso marker="stdlib:unicode#characters_to_list-1">unicode:characters_to_list/1</seealso> instead of this function.</p>
</desc>
</func>
@@ -121,6 +124,7 @@
<p><c>utf8_list_to_binary/1</c> Transforms a list of integers,
where each integer represents one character as its unicode
value, to a UTF8 encoded binary.</p>
+ <p>Use <seealso marker="stdlib:unicode#characters_to_binary-1">unicode:characters_to_binary/1</seealso> instead of this function.</p>
</desc>
</func>
diff --git a/lib/asn1/doc/src/book.xml b/lib/asn1/doc/src/book.xml
index 718e6e7b17..2399267cb0 100644
--- a/lib/asn1/doc/src/book.xml
+++ b/lib/asn1/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/asn1/doc/src/fascicules.xml b/lib/asn1/doc/src/fascicules.xml
index 2488e7b57e..837b4f57f4 100644
--- a/lib/asn1/doc/src/fascicules.xml
+++ b/lib/asn1/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml
index a00fc3de36..9feb673c04 100644
--- a/lib/asn1/doc/src/notes.xml
+++ b/lib/asn1/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,200 @@
<p>This document describes the changes made to the asn1 application.</p>
+<section><title>Asn1 3.0.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>The ASN.1 compiler would crash if a SEQUENCE ended
+ with a double set of ellipses (<c>...</c>).</p>
+ <p>
+ Own Id: OTP-12546 Aux Id: seq12815 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Asn1 3.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When decoding BER, primitives with an indefinite length
+ will be immediately rejected. (Thanks to Simon Cornish
+ for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-12205</p>
+ </item>
+ <item>
+ <p>
+ BER: A bug with compliance to X.680 (200811) s31.2.7 has
+ been fixed. Basically, when TagDefault is AUTOMATIC then
+ tags are IMPLICIT unless EXPLICIT is given.</p>
+ <p>
+ Own Id: OTP-12318</p>
+ </item>
+ <item>
+ <p>
+ Usage of the <c>EXTERNAL</c> 1994 variant type was
+ broken.</p>
+ <p>
+ Own Id: OTP-12326</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Asn1 3.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Several problems where the ASN.1 compiler would crash
+ when attempting to compile correct specifications have
+ been corrected.</p>
+ <p>
+ Own Id: OTP-12125</p>
+ </item>
+ <item>
+ <p>
+ Robustness when decoding incorrect BER messages has been
+ improved.</p>
+ <p>
+ Own Id: OTP-12145</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Asn1 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The ASN.1 compiler now generates code that don't trigger
+ Dialyzer warnings. Along the way, a few minor bugs were
+ fixed.</p>
+ <p>
+ Own Id: OTP-11372 Aux Id: seq12397 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Asn1 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Subtyping an extensible ENUMERATED would cause an
+ compilation error. (Thanks to Morten Nygaard Åsnes for
+ reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11700</p>
+ </item>
+ <item>
+ <p>When specifying the value for an OCTET STRING in a
+ specification, the ASN.1 standard clearly states that the
+ value must be either a bstring or an hstring, but NOT a
+ cstring. The ASN.1 compiler will now generate a
+ compilation error if the value of an OCTET STRING is
+ given as a character string.</p>
+ <p>That is, the following example is now illegal:</p>
+ <p><c>string OCTET STRING ::= "Now illegal"</c></p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11727</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ By giving --enable-static-{nifs,drivers} to configure it
+ is now possible to statically linking of nifs and drivers
+ to the main Erlang VM binary. At the moment only the asn1
+ and crypto nifs of the Erlang/OTP nifs and drivers have
+ been prepared to be statically linked. For more details
+ see the Installation Guide in the System documentation.</p>
+ <p>
+ Own Id: OTP-11258</p>
+ </item>
+ <item>
+ <p>Code generation for the <c>per</c> and <c>uper</c>
+ backends has been somewhat improved.</p>
+ <p>
+ Own Id: OTP-11573</p>
+ </item>
+ <item>
+ <p>The OCTET STRING and BIT STRING types now have a more
+ natural mapping to Erlang types (binary and bitstring,
+ respectively), which is more efficient and will avoid
+ useless conversions between lists and
+ binaries/bitstrings.</p>
+ <p>This is an incompatible change. To revert to the old
+ mapping to support existing applications, use the
+ <c>legacy_erlang_types</c> option.</p>
+ <p>Impact: There is a potential for better performance,
+ as it is now possible to avoid conversions between lists
+ and binaries both in the generated ASN.1 encode/decode
+ code and in the application itself.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11594</p>
+ </item>
+ <item>
+ <p>All functions in the <c>asn1rt</c> module, as well as
+ <c>asn1ct:decode/3</c> and <c>asn1ct:encode/3</c>, are
+ now deprecated.</p>
+ <p>
+ Own Id: OTP-11731</p>
+ </item>
+ <item>
+ <p>
+ Generated .hrl files are now protected from being
+ included more than once.</p>
+ <p>
+ Own Id: OTP-11804</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Asn1 2.0.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/asn1/doc/src/part.xml b/lib/asn1/doc/src/part.xml
index 19ee64b4a0..735ec2e616 100644
--- a/lib/asn1/doc/src/part.xml
+++ b/lib/asn1/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/asn1/doc/src/ref_man.xml b/lib/asn1/doc/src/ref_man.xml
index a0af1f5be3..0a0ed5416a 100644
--- a/lib/asn1/doc/src/ref_man.xml
+++ b/lib/asn1/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile
index 500f4a1358..6798da0072 100644
--- a/lib/asn1/src/Makefile
+++ b/lib/asn1/src/Makefile
@@ -52,6 +52,7 @@ CT_MODULES= \
asn1ct_pretty_format \
asn1ct_func \
asn1ct_gen \
+ asn1ct_gen_check \
asn1ct_gen_per \
asn1ct_name \
asn1ct_constructed_per \
diff --git a/lib/asn1/src/asn1.app.src b/lib/asn1/src/asn1.app.src
index f2ee8deb75..02cbba0f10 100644
--- a/lib/asn1/src/asn1.app.src
+++ b/lib/asn1/src/asn1.app.src
@@ -10,5 +10,6 @@
asn1db
]},
{env, []},
- {applications, [kernel, stdlib]}
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/asn1/src/asn1.appup.src b/lib/asn1/src/asn1.appup.src
index 2d11eddfbf..e4b3508cc4 100644
--- a/lib/asn1/src/asn1.appup.src
+++ b/lib/asn1/src/asn1.appup.src
@@ -1,11 +1,21 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
{"%VSN%",
-% This version does not change anything of the runtime modules
-% Only changes in compile time modules and thus no need for upgrade on target
-[
- ],
- [
- ]}.
-
-
-
-
+ [{<<".*">>,[{restart_application, asn1}]}],
+ [{<<".*">>,[{restart_application, asn1}]}]
+}.
diff --git a/lib/asn1/src/asn1_records.hrl b/lib/asn1/src/asn1_records.hrl
index 396ba0fcfa..6c1cf1b12a 100644
--- a/lib/asn1/src/asn1_records.hrl
+++ b/lib/asn1/src/asn1_records.hrl
@@ -37,7 +37,7 @@
-record('ObjectClassFieldType',{classname,class,fieldname,type}).
-record(typedef,{checked=false,pos,name,typespec}).
--record(classdef,{checked=false,pos,name,typespec}).
+-record(classdef, {checked=false,pos,name,module,typespec}).
-record(valuedef,{checked=false,pos,name,type,value,module}).
-record(ptypedef,{checked=false,pos,name,args,typespec}).
-record(pvaluedef,{checked=false,pos,name,args,type,value}).
@@ -45,7 +45,6 @@
-record(pobjectdef,{checked=false,pos,name,args,class,def}).
-record(pobjectsetdef,{checked=false,pos,name,args,class,def}).
--record(identifier,{pos,val}).
-record('Constraint',{'SingleValue'=no,'SizeConstraint'=no,'ValueRange'=no,'PermittedAlphabet'=no,
'ContainedSubtype'=no, 'TypeConstraint'=no,'InnerSubtyping'=no,e=no,'Other'=no}).
-record(simpletableattributes,{objectsetname,c_name,c_index,usedclassfield,
@@ -73,6 +72,15 @@
% Externalvaluereference -> modulename '.' typename
-record('Externalvaluereference',{pos,module,value}).
+%% Used to hold a tag for a field in a SEQUENCE/SET. It can also
+%% be used for identifiers in OBJECT IDENTIFIER values, since the
+%% parser cannot always distinguish a SEQUENCE with one element from
+%% an OBJECT IDENTIFIER.
+-record(seqtag,
+ {pos :: integer(),
+ module :: atom(),
+ val :: atom()}).
+
-record(state,{module,mname,type,tname,value,vname,erule,parameters=[],
inputmodules,abscomppath=[],recordtopname=[],options,
sourcedir}).
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index f2ccf5f212..df341e5aab 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -19,6 +19,10 @@
%%
%%
-module(asn1ct).
+-deprecated([decode/3,encode/3]).
+-compile([{nowarn_deprecated_function,{asn1rt,decode,3}},
+ {nowarn_deprecated_function,{asn1rt,encode,2}},
+ {nowarn_deprecated_function,{asn1rt,encode,3}}]).
%% Compile Time functions for ASN.1 (e.g ASN.1 compiler).
@@ -39,8 +43,8 @@
add_tobe_refed_func/1,add_generated_refed_func/1,
maybe_rename_function/3,current_sindex/0,
set_current_sindex/1,maybe_saved_sindex/2,
- parse_and_save/2,verbose/3,warning/3,warning/4,error/3]).
--export([get_bit_string_format/0]).
+ parse_and_save/2,verbose/3,warning/3,warning/4,error/3,format_error/1]).
+-export([get_bit_string_format/0,use_legacy_types/0]).
-include("asn1_records.hrl").
-include_lib("stdlib/include/erl_compile.hrl").
@@ -139,7 +143,8 @@ parse_and_save_passes() ->
{pass,save,fun save_pass/1}].
common_passes() ->
- [{pass,check,fun check_pass/1},
+ [{iff,parse,{pass,parse_listing,fun parse_listing/1}},
+ {pass,check,fun check_pass/1},
{iff,abs,{pass,abs_listing,fun abs_listing/1}},
{pass,generate,fun generate_pass/1},
{unless,noobj,{pass,compile,fun compile_pass/1}}].
@@ -239,6 +244,16 @@ save_pass(#st{code=M,erule=Erule,dbfile=DbFile}=St) ->
asn1_db:dbsave(DbFile,M#module.name),
{ok,St}.
+parse_listing(#st{code=Code,outfile=OutFile0}=St) ->
+ OutFile = OutFile0 ++ ".parse",
+ case file:write_file(OutFile, io_lib:format("~p\n", [Code])) of
+ ok ->
+ done;
+ {error,Reason} ->
+ Error = {write_error,OutFile,Reason},
+ {error,St#st{error=[{structured_error,{OutFile0,none},?MODULE,Error}]}}
+ end.
+
abs_listing(#st{code={M,_},outfile=OutFile}) ->
pretty2(M#module.name, OutFile++".abs"),
done.
@@ -333,8 +348,7 @@ print_structured_errors([_|_]=Errors) ->
print_structured_errors(_) -> ok.
compile1(File, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p, compiling ~p~n", [?vsn,File], Opts),
- verbose("Compiler Options: ~p~n", [Opts], Opts),
+ compiler_verbose(File, Opts),
Passes = single_passes(),
Base = filename:rootname(filename:basename(File)),
OutFile = outfile(Base, "", Opts),
@@ -349,8 +363,7 @@ compile1(File, #st{opts=Opts}=St0) ->
%% compile_set/3 merges and compiles a number of asn1 modules
%% specified in a .set.asn file to one .erl file.
compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p compiling ~p ~n", [?vsn,Files], Opts),
- verbose("Compiler Options: ~p~n",[Opts], Opts),
+ compiler_verbose(Files, Opts),
OutFile = outfile(SetBase, "", Opts),
DbFile = outfile(SetBase, "asn1db", Opts),
InputModules = [begin
@@ -363,6 +376,11 @@ compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
Passes = set_passes(),
run_passes(Passes, St).
+compiler_verbose(What, Opts) ->
+ verbose("Erlang ASN.1 compiler ~s\n", [?vsn], Opts),
+ verbose("Compiling: ~p\n", [What], Opts),
+ verbose("Options: ~p\n", [Opts], Opts).
+
%% merge_modules/2 -> returns a module record where the typeorval lists are merged,
%% the exports lists are merged, the imports lists are merged when the
%% elements come from other modules than the merge set, the tagdefault
@@ -559,6 +577,8 @@ get_pos_of_def(#pobjectdef{pos=Pos}) ->
Pos;
get_pos_of_def(#pobjectsetdef{pos=Pos}) ->
Pos;
+get_pos_of_def(#'Externaltypereference'{pos=Pos}) ->
+ Pos;
get_pos_of_def(#'Externalvaluereference'{pos=Pos}) ->
Pos;
get_pos_of_def(_) ->
@@ -838,6 +858,7 @@ delete_double_of_symbol1([],Acc) ->
generate({M,GenTOrV}, OutFile, EncodingRule, Options) ->
debug_on(Options),
setup_bit_string_format(Options),
+ setup_legacy_erlang_types(Options),
put(encoding_options,Options),
asn1ct_table:new(check_functions),
@@ -866,6 +887,31 @@ generate({M,GenTOrV}, OutFile, EncodingRule, Options) ->
asn1ct_table:delete(check_functions),
Result.
+setup_legacy_erlang_types(Opts) ->
+ F = case lists:member(legacy_erlang_types, Opts) of
+ false ->
+ case get_bit_string_format() of
+ bitstring ->
+ false;
+ compact ->
+ legacy_forced_info(compact_bit_string),
+ true;
+ legacy ->
+ legacy_forced_info(legacy_bit_string),
+ true
+ end;
+ true ->
+ true
+ end,
+ put(use_legacy_erlang_types, F).
+
+legacy_forced_info(Opt) ->
+ io:format("Info: The option 'legacy_erlang_types' "
+ "is implied by the '~s' option.\n", [Opt]).
+
+use_legacy_types() ->
+ get(use_legacy_erlang_types).
+
setup_bit_string_format(Opts) ->
Format = case {lists:member(compact_bit_string, Opts),
lists:member(legacy_bit_string, Opts)} of
@@ -1011,7 +1057,7 @@ get_file_list1(Stream,Dir,Includes,Acc) ->
Ret = io:get_line(Stream,''),
case Ret of
eof ->
- file:close(Stream),
+ ok = file:close(Stream),
lists:reverse(Acc);
FileName ->
SuffixedNameList =
@@ -1072,6 +1118,7 @@ remove_asn_flags(Options) ->
X /= optimize,
X /= compact_bit_string,
X /= legacy_bit_string,
+ X /= legacy_erlang_types,
X /= debug,
X /= asn1config,
X /= record_name_prefix].
@@ -1896,8 +1943,9 @@ read_config_file(ModuleName) ->
Includes = [I || {i,I} <- Options],
read_config_file1(ModuleName,Includes);
{error,Reason} ->
- file:format_error(Reason),
- throw({error,{"error reading asn1 config file",Reason}})
+ Error = "error reading asn1 config file: " ++
+ file:format_error(Reason),
+ throw({error,Error})
end.
read_config_file1(ModuleName,[]) ->
case filename:extension(ModuleName) of
@@ -1915,8 +1963,9 @@ read_config_file1(ModuleName,[H|T]) ->
{error,enoent} ->
read_config_file1(ModuleName,T);
{error,Reason} ->
- file:format_error(Reason),
- throw({error,{"error reading asn1 config file",Reason}})
+ Error = "error reading asn1 config file: " ++
+ file:format_error(Reason),
+ throw({error,Error})
end.
get_config_info(CfgList,InfoType) ->
@@ -2392,6 +2441,10 @@ verbose(Format, Args, S) ->
ok
end.
+format_error({write_error,File,Reason}) ->
+ io_lib:format("writing output file ~s failed: ~s",
+ [File,file:format_error(Reason)]).
+
is_error(S) when is_record(S, state) ->
is_error(S#state.options);
is_error(O) ->
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 0a13801e08..240f1cbb16 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -91,7 +91,7 @@ check(S,{Types,Values,ParameterizedTypes,Classes,Objects,ObjectSets}) ->
save_asn1db_uptodate(S,S#state.erule,S#state.mname),
put(top_module,S#state.mname),
- _ = checkp(S, ParameterizedTypes), %must do this before the templates are used
+ ParamError = checkp(S, ParameterizedTypes), %must do this before the templates are used
%% table to save instances of parameterized objects,object sets
asn1ct_table:new(parameterized_objects),
@@ -160,8 +160,10 @@ check(S,{Types,Values,ParameterizedTypes,Classes,Objects,ObjectSets}) ->
Exporterror = check_exports(S,S#state.module),
ImportError = check_imports(S,S#state.module),
- case {Terror3,Verror5,Cerror,Oerror,Exporterror,ImportError} of
- {[],[],[],[],[],[]} ->
+ AllErrors = lists:flatten([ParamError,Terror3,Verror5,Cerror,
+ Oerror,Exporterror,ImportError]),
+ case AllErrors of
+ [] ->
ContextSwitchTs = context_switch_in_spec(),
InstanceOf = instance_of_in_spec(S#state.mname),
NewTypes = lists:subtract(Types,AddClasses) ++ ContextSwitchTs
@@ -175,8 +177,7 @@ check(S,{Types,Values,ParameterizedTypes,Classes,Objects,ObjectSets}) ->
lists:subtract(NewObjects,ExclO)++InlinedObjects,
lists:subtract(NewObjectSets,ExclOS)++ParObjectSetNames}};
_ ->
- {error,lists:flatten([Terror3,Verror5,Cerror,
- Oerror,Exporterror,ImportError])}
+ {error,AllErrors}
end.
context_switch_in_spec() ->
@@ -270,46 +271,30 @@ check_exports(S,Module = #module{}) ->
end
end.
-check_imports(S,Module = #module{ }) ->
- case Module#module.imports of
- {imports,[]} ->
- [];
- {imports,ImportList} when is_list(ImportList) ->
- check_imports2(S,ImportList,[]);
- _ ->
- []
- end.
-check_imports2(_S,[],Acc) ->
+check_imports(S, #module{imports={imports,Imports}}) ->
+ check_imports_1(S, Imports, []).
+
+check_imports_1(_S, [], Acc) ->
Acc;
-check_imports2(S,[#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs],Acc) ->
- NameOfDef =
- fun(#'Externaltypereference'{type=N}) -> N;
- (#'Externalvaluereference'{value=N}) -> N
- end,
- Module = NameOfDef(ModuleRef),
- Refs = [{M,R}||{{M,_},R} <- [{catch get_referenced_type(S,Ref),Ref}||Ref <- Imports]],
- {Illegal,Other} = lists:splitwith(fun({error,_}) -> true;(_) -> false end,
- Refs),
- ChainedRefs = [R||{M,R} <- Other, M =/= Module],
- IllegalRefs = [R||{error,R} <- Illegal] ++
- [R||{M,R} <- ChainedRefs,
- ok =/= chained_import(S,Module,M,NameOfDef(R))],
- ReportError =
- fun(Ref) ->
- NewS=S#state{type=Ref,tname=NameOfDef(Ref)},
- error({import,"imported undefined entity",NewS})
- end,
- check_imports2(S,SFMs,[ReportError(Err)||Err <- IllegalRefs]++Acc).
+check_imports_1(S, [#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs], Acc0) ->
+ Module = name_of_def(ModuleRef),
+ Refs0 = [{catch get_referenced_type(S, Ref),Ref} || Ref <- Imports],
+ Refs = [{M,R} || {{M,_},R} <- Refs0],
+ {Illegal,Other} = lists:splitwith(fun({error,_}) -> true;
+ (_) -> false
+ end, Refs),
+ ChainedRefs = [R || {M,R} <- Other, M =/= Module],
+ IllegalRefs = [R || {error,R} <- Illegal] ++
+ [R || {M,R} <- ChainedRefs,
+ ok =/= chained_import(S, Module, M, name_of_def(R))],
+ Acc = [return_asn1_error(S, Ref, {undefined_import,name_of_def(Ref),Module}) ||
+ Ref <- IllegalRefs] ++ Acc0,
+ check_imports_1(S, SFMs, Acc).
chained_import(S,ImpMod,DefMod,Name) ->
%% Name is a referenced structure that is not defined in ImpMod,
%% but must be present in the Imports list of ImpMod. The chain of
%% imports of Name must end in DefMod.
- NameOfDef =
- fun(#'Externaltypereference'{type=N}) -> N;
- (#'Externalvaluereference'{value=N}) -> N;
- (Other) -> Other
- end,
GetImports =
fun(_M_) ->
case asn1_db:dbget(_M_,'MODULE') of
@@ -321,9 +306,9 @@ chained_import(S,ImpMod,DefMod,Name) ->
FindNameInImports =
fun([],N,_) -> {no_mod,N};
([#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs],N,F) ->
- case [NameOfDef(X)||X <- Imports, NameOfDef(X) =:= N] of
+ case [name_of_def(X) || X <- Imports, name_of_def(X) =:= N] of
[] -> F(SFMs,N,F);
- [N] -> {NameOfDef(ModuleRef),N}
+ [N] -> {name_of_def(ModuleRef),N}
end
end,
case GetImports(ImpMod) of
@@ -565,14 +550,10 @@ check_class(S = #state{mname=M,tname=T},ClassSpec)
#objectclass{fields=Def}; % in case of recursive definitions
Tref = #'Externaltypereference'{type=TName} ->
{MName,RefType} = get_referenced_type(S,Tref),
- case is_class(S,RefType) of
- true ->
- NewState = update_state(S#state{type=RefType,
- tname=TName},MName),
- check_class(NewState,get_class_def(S,RefType));
- _ ->
- error({class,{internal_error,RefType},S})
- end;
+ #classdef{} = CD = get_class_def(S, RefType),
+ NewState = update_state(S#state{type=RefType,
+ tname=TName}, MName),
+ check_class(NewState, CD);
{pt,ClassRef,Params} ->
%% parameterized class
{_,PClassDef} = get_referenced_type(S,ClassRef),
@@ -966,6 +947,8 @@ prepare_objset(ObjDef={object,definedsyntax,_ObjFields}) ->
{set,[ObjDef],false};
prepare_objset({ObjDef=#type{},Ext}) when is_list(Ext) ->
{set,[ObjDef|Ext],true};
+prepare_objset({#type{}=Type,#type{}=Ext}) ->
+ {set,[Type,Ext],true};
prepare_objset(Ret) ->
Ret.
@@ -1293,10 +1276,25 @@ get_fieldname_element(_S,Def,[{_RefType,_FieldName}|_RestFName])
check_fieldname_element(S,{value,{_,Def}}) ->
check_fieldname_element(S,Def);
-check_fieldname_element(S,TDef) when is_record(TDef,typedef) ->
- check_type(S,TDef,TDef#typedef.typespec);
-check_fieldname_element(S,VDef) when is_record(VDef,valuedef) ->
- check_value(S,VDef);
+check_fieldname_element(S, #typedef{typespec=Ts}=TDef) ->
+ case Ts of
+ #'Object'{} ->
+ check_object(S, TDef, Ts);
+ _ ->
+ check_type(S, TDef, Ts)
+ end;
+check_fieldname_element(S, #valuedef{}=VDef) ->
+ try
+ check_value(S, VDef)
+ catch
+ throw:{objectdef} ->
+ #valuedef{checked=C,pos=Pos,name=N,type=Type,
+ value=Def} = VDef,
+ ClassName = Type#type.def,
+ NewSpec = #'Object'{classname=ClassName,def=Def},
+ NewDef = #typedef{checked=C,pos=Pos,name=N,typespec=NewSpec},
+ check_fieldname_element(S, NewDef)
+ end;
check_fieldname_element(S,Eref)
when is_record(Eref,'Externaltypereference');
is_record(Eref,'Externalvaluereference') ->
@@ -1567,13 +1565,13 @@ check_defaultfields(S, Fields, ClassFields) ->
[] ->
ok;
[_|_]=Invalid ->
- throw(asn1_error(S, T, {invalid_fields,Invalid,Obj}))
+ asn1_error(S, T, {invalid_fields,Invalid,Obj})
end,
case ordsets:subtract(Mandatory, Present) of
[] ->
check_defaultfields_1(S, Fields, ClassFields, []);
[_|_]=Missing ->
- throw(asn1_error(S, T, {missing_mandatory_fields,Missing,Obj}))
+ asn1_error(S, T, {missing_mandatory_fields,Missing,Obj})
end.
check_defaultfields_1(_S, [], _ClassFields, Acc) ->
@@ -1819,12 +1817,10 @@ convert_to_defaultfield(S,ObjFieldName,[OFS|RestOFS],CField)->
FieldName);
ValSetting = #valuedef{} ->
ValSetting;
- ValSetting = {'CHOICE',{Alt,_ChVal}} when is_atom(Alt) ->
- #valuedef{type=element(3,CField),
- value=ValSetting,
- module=S#state.mname};
ValSetting ->
- #identifier{val=ValSetting}
+ #valuedef{type=element(3,CField),
+ value=ValSetting,
+ module=S#state.mname}
end,
?dbg("fixedtypevaluefield ValRef: ~p~n",[ValRef]),
case ValRef of
@@ -2152,11 +2148,9 @@ check_valuedef(#state{recordtopname=TopName}=S0, V0) ->
{'INTEGER',NamedNumberList} ->
ok = validate_integer(SVal, Value, NamedNumberList, Constr),
V#valuedef{value=normalize_value(SVal, Vtype, Value, [])};
- #'SEQUENCE'{components=Components} ->
- {ok,SeqVal} = validate_sequence(SVal, Value,
- Components, Constr),
- V#valuedef{value=normalize_value(SVal, Vtype,
- SeqVal, TopName)};
+ #'SEQUENCE'{} ->
+ {ok,SeqVal} = convert_external(SVal, Value),
+ V#valuedef{value=normalize_value(SVal, Vtype, SeqVal, TopName)};
{'SelectionType',SelName,SelT} ->
CheckedT = check_selectiontype(SVal, SelName, SelT),
NewV = V#valuedef{type=CheckedT},
@@ -2308,22 +2302,23 @@ validate_oid(_, S, OID, [Id|Vrest], Acc)
error({value, {"illegal "++to_string(OID),[Id,Vrest],Acc}, S})
end
end;
-validate_oid(_, S, OID, [{Atom,Value}],[])
+validate_oid(_, S, OID, [{#seqtag{module=Mod,val=Atom},Value}], [])
when is_atom(Atom),is_integer(Value) ->
%% this case when an OBJECT IDENTIFIER value has been parsed as a
%% SEQUENCE value
- Rec = #'Externalvaluereference'{module=S#state.mname,
+ Rec = #'Externalvaluereference'{module=Mod,
value=Atom},
validate_objectidentifier1(S, OID, [Rec,Value]);
-validate_oid(_, S, OID, [{Atom,EVRef}],[])
+validate_oid(_, S, OID, [{#seqtag{module=Mod,val=Atom},EVRef}], [])
when is_atom(Atom),is_record(EVRef,'Externalvaluereference') ->
%% this case when an OBJECT IDENTIFIER value has been parsed as a
%% SEQUENCE value OTP-4354
- Rec = #'Externalvaluereference'{module=EVRef#'Externalvaluereference'.module,
+ Rec = #'Externalvaluereference'{module=Mod,
value=Atom},
validate_objectidentifier1(S, OID, [Rec,EVRef]);
-validate_oid(_, S, OID, [Atom|Rest],Acc) when is_atom(Atom) ->
- Rec = #'Externalvaluereference'{module=S#state.mname,
+validate_oid(_, S, OID, [#seqtag{module=Mod,val=Atom}|Rest], Acc)
+ when is_atom(Atom) ->
+ Rec = #'Externalvaluereference'{module=Mod,
value=Atom},
validate_oid(true,S, OID, [Rec|Rest],Acc);
validate_oid(_, S, OID, V, Acc) ->
@@ -2415,13 +2410,13 @@ valid_objectid(o_id,_I,[1]) -> false;
valid_objectid(o_id,_I,[2]) -> true;
valid_objectid(_,_,_) -> true.
-validate_sequence(S=#state{type=Vtype},Value,_Components,_Constr) ->
+convert_external(S=#state{type=Vtype}, Value) ->
case Vtype of
#type{tag=[{tag,'UNIVERSAL',8,'IMPLICIT',32}]} ->
%% this is an 'EXTERNAL' (or INSTANCE OF)
case Value of
- [{identification,_}|_RestVal] ->
- {ok,to_EXTERNAL1990(S,Value)};
+ [{#seqtag{val=identification},_}|_] ->
+ {ok,to_EXTERNAL1990(S, Value)};
_ ->
{ok,Value}
end;
@@ -2429,21 +2424,25 @@ validate_sequence(S=#state{type=Vtype},Value,_Components,_Constr) ->
{ok,Value}
end.
-to_EXTERNAL1990(S,[{identification,{'CHOICE',{syntax,Stx}}}|Rest]) ->
- to_EXTERNAL1990(S,Rest,[{'direct-reference',Stx}]);
-to_EXTERNAL1990(S,[{identification,{'CHOICE',{'presentation-context-id',I}}}|Rest]) ->
- to_EXTERNAL1990(S,Rest,[{'indirect-reference',I}]);
-to_EXTERNAL1990(S,[{identification,{'CHOICE',{'context-negotiation',[{_,PCid},{_,TrStx}]}}}|Rest]) ->
- to_EXTERNAL1990(S,Rest,[{'indirect-reference',PCid},{'direct-reference',TrStx}]);
-to_EXTERNAL1990(S,_) ->
+to_EXTERNAL1990(S, [{#seqtag{val=identification}=T,
+ {'CHOICE',{syntax,Stx}}}|Rest]) ->
+ to_EXTERNAL1990(S, Rest, [{T#seqtag{val='direct-reference'},Stx}]);
+to_EXTERNAL1990(S, [{#seqtag{val=identification}=T,
+ {'CHOICE',{'presentation-context-id',I}}}|Rest]) ->
+ to_EXTERNAL1990(S, Rest, [{T#seqtag{val='indirect-reference'},I}]);
+to_EXTERNAL1990(S, [{#seqtag{val=identification}=T,
+ {'CHOICE',{'context-negotiation',[{_,PCid},{_,TrStx}]}}}|Rest]) ->
+ to_EXTERNAL1990(S, Rest, [{T#seqtag{val='indirect-reference'},PCid},
+ {T#seqtag{val='direct-reference'},TrStx}]);
+to_EXTERNAL1990(S, _) ->
error({value,"illegal value in EXTERNAL type",S}).
-to_EXTERNAL1990(S,[V={'data-value-descriptor',_}|Rest],Acc) ->
- to_EXTERNAL1990(S,Rest,[V|Acc]);
-to_EXTERNAL1990(_S,[{'data-value',Val}],Acc) ->
- Encoding = {encoding,{'CHOICE',{'octet-aligned',Val}}},
+to_EXTERNAL1990(S, [V={#seqtag{val='data-value-descriptor'},_}|Rest], Acc) ->
+ to_EXTERNAL1990(S, Rest, [V|Acc]);
+to_EXTERNAL1990(_S, [{#seqtag{val='data-value'}=T,Val}], Acc) ->
+ Encoding = {T#seqtag{val=encoding},{'CHOICE',{'octet-aligned',Val}}},
lists:reverse([Encoding|Acc]);
-to_EXTERNAL1990(S,_,_) ->
+to_EXTERNAL1990(S, _, _) ->
error({value,"illegal value in EXTERNAL type",S}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2464,7 +2463,7 @@ normalize_value(S0, Type, {'DEFAULT',Value}, NameList) ->
{'BIT STRING',CType,_} ->
normalize_bitstring(S,Value,CType);
{'OCTET STRING',CType,_} ->
- normalize_octetstring(S,Value,CType);
+ normalize_octetstring(S0, Value, CType);
{'NULL',_CType,_} ->
%%normalize_null(Value);
'NULL';
@@ -2574,6 +2573,18 @@ normalize_bitstring(S, Value, Type)->
Bs
end.
+hstring_to_binary(L) ->
+ byte_align(hstring_to_bitstring(L)).
+
+bstring_to_binary(L) ->
+ byte_align(bstring_to_bitstring(L)).
+
+byte_align(Bs) ->
+ case bit_size(Bs) rem 8 of
+ 0 -> Bs;
+ N -> <<Bs/bitstring,0:(8-N)>>
+ end.
+
hstring_to_bitstring(L) ->
<< <<(hex_to_int(D)):4>> || D <- L >>.
@@ -2592,59 +2603,19 @@ hex_to_int(D) when $A =< D, D =< $F -> D - ($A - 10).
normalize_octetstring(S,Value,CType) ->
case Value of
{bstring,String} ->
- bstring_to_octetlist(String);
+ bstring_to_binary(String);
{hstring,String} ->
- hstring_to_octetlist(String);
+ hstring_to_binary(String);
Rec when is_record(Rec,'Externalvaluereference') ->
get_normalized_value(S,Value,CType,
fun normalize_octetstring/3,[]);
{Name,String} when is_atom(Name) ->
normalize_octetstring(S,String,CType);
- List when is_list(List) ->
- %% check if list elements are valid octet values
- lists:map(fun([])-> ok;
- (H)when H > 255->
- asn1ct:warning("not legal octet value ~p in OCTET STRING, ~p~n",
- [H,List],S,
- "not legal octet value ~p in OCTET STRING");
- (_)-> ok
- end, List),
- List;
- Other ->
- asn1ct:warning("unknown default value ~p~n",[Other],S,
- "unknown default value"),
- Value
+ _ ->
+ Item = S#state.value,
+ asn1_error(S, Item, illegal_octet_string_value)
end.
-
-bstring_to_octetlist([]) ->
- [];
-bstring_to_octetlist([H|T]) when H == $0 ; H == $1 ->
- bstring_to_octetlist(T,6,[(H - $0) bsl 7]).
-bstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H == $0; H == $1 ->
- bstring_to_octetlist(T, 7, [0,Hacc + (H -$0)| Tacc]);
-bstring_to_octetlist([H|T],BSL,[Hacc|Tacc]) when H == $0; H == $1 ->
- bstring_to_octetlist(T, BSL-1, [Hacc + ((H - $0) bsl BSL)| Tacc]);
-bstring_to_octetlist([],7,[0|Acc]) ->
- lists:reverse(Acc);
-bstring_to_octetlist([],_,Acc) ->
- lists:reverse(Acc).
-
-hstring_to_octetlist([]) ->
- [];
-hstring_to_octetlist(L) ->
- hstring_to_octetlist(L,4,[]).
-hstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H >= $A, H =< $F ->
- hstring_to_octetlist(T,4,[Hacc + (H - $A + 10)|Tacc]);
-hstring_to_octetlist([H|T],BSL,Acc) when H >= $A, H =< $F ->
- hstring_to_octetlist(T,0,[(H - $A + 10) bsl BSL|Acc]);
-hstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H >= $0; H =< $9 ->
- hstring_to_octetlist(T,4,[Hacc + (H - $0)|Tacc]);
-hstring_to_octetlist([H|T],BSL,Acc) when H >= $0; H =< $9 ->
- hstring_to_octetlist(T,0,[(H - $0) bsl BSL|Acc]);
-hstring_to_octetlist([],_,Acc) ->
- lists:reverse(Acc).
-
normalize_objectidentifier(S, Value) ->
{ok,Val} = validate_objectidentifier(S, o_id, Value, []),
Val.
@@ -2659,18 +2630,21 @@ normalize_objectdescriptor(Value) ->
normalize_real(Value) ->
Value.
-normalize_enumerated(S, Id, {Base,Ext}) ->
+normalize_enumerated(S, Id0, NNL) ->
+ {Id,_} = lookup_enum_value(S, Id0, NNL),
+ Id.
+
+lookup_enum_value(S, Id, {Base,Ext}) ->
%% Extensible ENUMERATED.
- normalize_enumerated(S, Id, Base++Ext);
-normalize_enumerated(S, #'Externalvaluereference'{value=Id},
- NamedNumberList) ->
- normalize_enumerated(S, Id, NamedNumberList);
-normalize_enumerated(S, Id, NamedNumberList) when is_atom(Id) ->
- case lists:keymember(Id, 1, NamedNumberList) of
- true ->
- Id;
+ lookup_enum_value(S, Id, Base++Ext);
+lookup_enum_value(S, #'Externalvaluereference'{value=Id}, NNL) ->
+ lookup_enum_value(S, Id, NNL);
+lookup_enum_value(S, Id, NNL) when is_atom(Id) ->
+ case lists:keyfind(Id, 1, NNL) of
+ {_,_}=Ret ->
+ Ret;
false ->
- throw(asn1_error(S, S#state.value, {undefined,Id}))
+ asn1_error(S, S#state.value, {undefined,Id})
end.
normalize_choice(S,{'CHOICE',{C,V}},CType,NameList) when is_atom(C) ->
@@ -2730,20 +2704,20 @@ normalize_set(S,Value,Components,NameList) ->
normalized_record('SET',S,SortedVal,Components,NameList)
end.
-sort_value(Components,Value) ->
- ComponentNames = lists:map(fun(#'ComponentType'{name=Cname}) -> Cname end,
- Components),
- sort_value1(ComponentNames,Value,[]).
-sort_value1(_,V=#'Externalvaluereference'{},_) ->
- %% sort later, get the value in normalize_seq_or_set
- V;
-sort_value1([N|Ns],Value,Acc) ->
- case lists:keysearch(N,1,Value) of
- {value,V} ->sort_value1(Ns,Value,[V|Acc]);
- _ -> sort_value1(Ns,Value,Acc)
- end;
-sort_value1([],_,Acc) ->
- lists:reverse(Acc).
+sort_value(Components, Value0) when is_list(Value0) ->
+ {Keys0,_} = lists:mapfoldl(fun(#'ComponentType'{name=N}, I) ->
+ {{N,I},I+1}
+ end, 0, Components),
+ Keys = gb_trees:from_orddict(orddict:from_list(Keys0)),
+ Value1 = [{case gb_trees:lookup(N, Keys) of
+ {value,K} -> K;
+ none -> 'end'
+ end,Pair} || {#seqtag{val=N},_}=Pair <- Value0],
+ Value = lists:sort(Value1),
+ [Pair || {_,Pair} <- Value];
+sort_value(_Components, #'Externalvaluereference'{}=Value) ->
+ %% Sort later.
+ Value.
sort_val_if_set(['SET'|_],Val,Type) ->
sort_value(Type,Val);
@@ -2776,9 +2750,9 @@ is_record_normalized(_S,Name,Value,NumComps) when is_tuple(Value) ->
is_record_normalized(_,_,_,_) ->
false.
-normalize_seq_or_set(SorS,S,[{Cname,V}|Vs],
+normalize_seq_or_set(SorS, S, [{#seqtag{val=Cname},V}|Vs],
[#'ComponentType'{name=Cname,typespec=TS}|Cs],
- NameList,Acc) ->
+ NameList, Acc) ->
NewNameList =
case TS#type.def of
#'Externaltypereference'{type=TName} ->
@@ -2956,8 +2930,7 @@ get_canonic_type(S,Type,NameList) ->
check_ptype(S,Type,Ts) when is_record(Ts,type) ->
- %Tag = Ts#type.tag,
- %Constr = Ts#type.constraint,
+ check_formal_parameters(S, Type#ptypedef.args),
Def = Ts#type.def,
NewDef=
case Def of
@@ -2983,6 +2956,16 @@ check_ptype(S,Type,Ts) when is_record(Ts,type) ->
check_ptype(_S,_PTDef,Ts) when is_record(Ts,objectclass) ->
throw({asn1_param_class,Ts}).
+check_formal_parameters(S, Args) ->
+ _ = [check_formal_parameter(S, A) || A <- Args],
+ ok.
+
+check_formal_parameter(_, {_,_}) ->
+ ok;
+check_formal_parameter(_, #'Externaltypereference'{}) ->
+ ok;
+check_formal_parameter(S, #'Externalvaluereference'{value=Name}=Ref) ->
+ asn1_error(S, Ref, {illegal_typereference,Name}).
% check_type(S,Type,ObjSpec={{objectclassname,_},_}) ->
% check_class(S,ObjSpec);
@@ -3030,9 +3013,9 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
{TmpRefMod,TmpRefDef} ->
{TmpRefMod,TmpRefDef,false}
end,
- case is_class(S,RefTypeDef) of
- true -> throw({asn1_class,RefTypeDef});
- _ -> ok
+ case get_class_def(S, RefTypeDef) of
+ none -> ok;
+ #classdef{} -> throw({asn1_class,RefTypeDef})
end,
Ct = TestFun(Ext),
{RefType,ExtRef} =
@@ -3105,12 +3088,11 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
Ct=maybe_illicit_implicit_tag(open_type,Tag),
TempNewDef#newt{type='ASN1_OPEN_TYPE',tag=Ct};
'INTEGER' ->
- check_integer(S,[],Constr),
TempNewDef#newt{tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_INTEGER))};
{'INTEGER',NamedNumberList} ->
- TempNewDef#newt{type={'INTEGER',check_integer(S,NamedNumberList,Constr)},
+ TempNewDef#newt{type={'INTEGER',check_integer(S,NamedNumberList)},
tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_INTEGER))};
'REAL' ->
@@ -3118,8 +3100,7 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
TempNewDef#newt{tag=merge_tags(Tag,?TAG_PRIMITIVE(?N_REAL))};
{'BIT STRING',NamedNumberList} ->
- NewL = check_bitstring(S,NamedNumberList,Constr),
-%% erlang:display({asn1ct_check,NamedNumberList,NewL}),
+ NewL = check_bitstring(S, NamedNumberList),
TempNewDef#newt{type={'BIT STRING',NewL},
tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_BIT_STRING))};
@@ -3415,23 +3396,17 @@ get_type_from_object(S,Object,TypeField)
ObjSpec = check_object(S,ObjectDef,ObjectDef#typedef.typespec),
get_fieldname_element(S,ObjectDef#typedef{typespec=ObjSpec},TypeField).
-is_class(_S,#classdef{}) ->
- true;
-is_class(S,#typedef{typespec=#type{def=Eref}})
- when is_record(Eref,'Externaltypereference')->
- is_class(S,Eref);
-is_class(S,Eref) when is_record(Eref,'Externaltypereference')->
- {_,NextDef} = get_referenced_type(S,Eref),
- is_class(S,NextDef);
-is_class(_,_) ->
- false.
-
-get_class_def(_S,CD=#classdef{}) ->
+%% get_class_def(S, Type) -> #classdef{} | 'none'.
+get_class_def(S, #typedef{typespec=#type{def=#'Externaltypereference'{}=Eref}}) ->
+ {_,NextDef} = get_referenced_type(S, Eref),
+ get_class_def(S, NextDef);
+get_class_def(S, #'Externaltypereference'{}=Eref) ->
+ {_,NextDef} = get_referenced_type(S, Eref),
+ get_class_def(S, NextDef);
+get_class_def(_S, #classdef{}=CD) ->
CD;
-get_class_def(S,#typedef{typespec=#type{def=Eref}})
- when is_record(Eref,'Externaltypereference') ->
- {_,NextDef} = get_referenced_type(S,Eref),
- get_class_def(S,NextDef).
+get_class_def(_S, _) ->
+ none.
maybe_illicit_implicit_tag(Kind,Tag) ->
case Tag of
@@ -3638,109 +3613,54 @@ match_args(_,_, _, _) ->
%% categorize_arg(S,FormalArg,ActualArg) -> {FormalArg,CatgorizedActualArg}
%%
categorize_arg(S,{Governor,Param},ActArg) ->
- case {governor_category(S,Governor),parameter_name_style(Param,ActArg)} of
-%% {absent,beginning_uppercase} -> %% a type
-%% categorize(S,type,ActArg);
- {type,beginning_lowercase} -> %% a value
- categorize(S,value,Governor,ActArg);
- {type,beginning_uppercase} -> %% a value set
- categorize(S,value_set,ActArg);
-%% {absent,entirely_uppercase} -> %% a class
-%% categorize(S,class,ActArg);
+ case {governor_category(S, Governor),parameter_name_style(Param)} of
+ {type,beginning_lowercase} -> %a value
+ categorize(S, value, Governor, ActArg);
+ {type,beginning_uppercase} -> %a value set
+ categorize(ActArg);
{{class,ClassRef},beginning_lowercase} ->
- categorize(S,object,ActArg,ClassRef);
+ categorize(S, object, ActArg, ClassRef);
{{class,ClassRef},beginning_uppercase} ->
- categorize(S,object_set,ActArg,ClassRef);
- _ ->
- [ActArg]
+ categorize(S, object_set, ActArg, ClassRef)
end;
-categorize_arg(S,FormalArg,ActualArg) ->
- %% governor is absent => a type or a class
- case FormalArg of
- #'Externaltypereference'{type=Name} ->
- case is_class_name(Name) of
- true ->
- categorize(S,class,ActualArg);
- _ ->
- categorize(S,type,ActualArg)
- end;
- FA ->
- throw({error,{unexpected_formal_argument,FA}})
- end.
-
-governor_category(S,#type{def=Eref})
- when is_record(Eref,'Externaltypereference') ->
- governor_category(S,Eref);
-governor_category(_S,#type{}) ->
+categorize_arg(_S, _FormalArg, ActualArg) ->
+ %% Governor is absent -- must be a type or a class. We have already
+ %% checked that the FormalArg begins with an uppercase letter.
+ categorize(ActualArg).
+
+%% governor_category(S, Item) -> type | {class,#'Externaltypereference'{}}
+%% Determine whether Item is a type or a class.
+governor_category(S, #type{def=#'Externaltypereference'{}=Eref}) ->
+ governor_category(S, Eref);
+governor_category(_S, #type{}) ->
type;
-governor_category(S,Ref) when is_record(Ref,'Externaltypereference') ->
- case is_class(S,Ref) of
- true ->
- {class,Ref};
- _ ->
+governor_category(S, #'Externaltypereference'{}=Ref) ->
+ case get_class_def(S, Ref) of
+ #classdef{pos=Pos,module=Mod,name=Name} ->
+ {class,#'Externaltypereference'{pos=Pos,module=Mod,type=Name}};
+ none ->
type
- end;
-governor_category(_,Class)
- when Class == 'TYPE-IDENTIFIER'; Class == 'ABSTRACT-SYNTAX' ->
- class.
-%% governor_category(_,_) ->
-%% absent.
+ end.
%% parameter_name_style(Param,Data) -> Result
%% gets the Parameter and the name of the Data and if it exists tells
%% whether it begins with a lowercase letter or is partly or entirely
%% spelled with uppercase letters. Otherwise returns undefined
%%
-parameter_name_style(_,#'Externaltypereference'{type=Name}) ->
- name_category(Name);
-parameter_name_style(_,#'Externalvaluereference'{value=Name}) ->
- name_category(Name);
-parameter_name_style(_,{valueset,_}) ->
- %% It is a object set or value set
+parameter_name_style(#'Externaltypereference'{}) ->
beginning_uppercase;
-parameter_name_style(#'Externalvaluereference'{},_) ->
- beginning_lowercase;
-parameter_name_style(#'Externaltypereference'{type=Name},_) ->
- name_category(Name);
-parameter_name_style(_,_) ->
- undefined.
-
-name_category(Atom) when is_atom(Atom) ->
- name_category(atom_to_list(Atom));
-name_category([H|T]) ->
- case is_lowercase(H) of
- true ->
- beginning_lowercase;
- _ ->
- case is_class_name(T) of
- true ->
- entirely_uppercase;
- _ ->
- beginning_uppercase
- end
- end;
-name_category(_) ->
- undefined.
+parameter_name_style(#'Externalvaluereference'{}) ->
+ beginning_lowercase.
is_lowercase(X) when X >= $A,X =< $W ->
false;
is_lowercase(_) ->
true.
-
-is_class_name(Name) when is_atom(Name) ->
- is_class_name(atom_to_list(Name));
-is_class_name(Name) ->
- case [X||X <- Name, X >= $a,X =< $w] of
- [] ->
- true;
- _ ->
- false
- end.
-%% categorize(S,Category,Parameter) -> CategorizedParameter
+%% categorize(Parameter) -> CategorizedParameter
%% If Parameter has an abstract syntax of another category than
%% Category, transform it to a known syntax.
-categorize(_S,type,{object,_,Type}) ->
+categorize({object,_,Type}) ->
%% One example of this case is an object with a parameterized type
%% having a locally defined type as parameter.
Def = fun(D = #type{}) ->
@@ -3752,11 +3672,12 @@ categorize(_S,type,{object,_,Type}) ->
D
end,
[Def(X)||X<-Type];
-categorize(_S,type,Def) when is_record(Def,type) ->
+categorize(#type{}=Def) ->
[#typedef{name = new_reference_name("type_argument"),
typespec = Def#type{inlined=yes}}];
-categorize(_,_,Def) ->
+categorize(Def) ->
[Def].
+
categorize(S,object_set,Def,ClassRef) ->
NewObjSetSpec =
check_object(S,Def,#'ObjectSet'{class = ClassRef,
@@ -3803,8 +3724,9 @@ resolv_value(S,Val) ->
resolv_value1(S,Id).
resolv_value1(S, ERef = #'Externalvaluereference'{value=Name}) ->
- case catch resolve_namednumber(S,S#state.type,Name) of
- V when is_integer(V) -> V;
+ case catch resolve_namednumber(S, S#state.type, Name) of
+ V when is_integer(V) ->
+ V;
_ ->
case get_referenced_type(S,ERef) of
{Err,_Reason} when Err == error; Err == 'EXIT' ->
@@ -3857,21 +3779,20 @@ resolve_value_from_object(S,Object,FieldName) ->
end.
-
resolve_namednumber(S,#typedef{typespec=Type},Name) ->
case Type#type.def of
{'ENUMERATED',NameList} ->
- NamedNumberList=check_enumerated(S,NameList,Type#type.constraint),
- N = normalize_enumerated(S,Name,NamedNumberList),
- {value,{_,V}} = lists:keysearch(N,1,NamedNumberList),
- V;
+ resolve_namednumber_1(S, Name, NameList, Type);
{'INTEGER',NameList} ->
- NamedNumberList = check_enumerated(S,NameList,Type#type.constraint),
- {value,{_,V}} = lists:keysearch(Name,1,NamedNumberList),
- V;
+ resolve_namednumber_1(S, Name, NameList, Type);
_ ->
not_enumerated
end.
+
+resolve_namednumber_1(S, Name, NameList, Type) ->
+ NamedNumberList = check_enumerated(S, NameList, Type#type.constraint),
+ {_,N} = lookup_enum_value(S, Name, NamedNumberList),
+ N.
check_constraints(S,[{'ContainedSubtype',Type} | Rest], Acc) ->
{RefMod,CTDef} = get_referenced_type(S,Type#type.def),
@@ -3952,9 +3873,9 @@ check_constraint(S,{simpletable,Type}) ->
#'Externaltypereference'{} ->
ERef = check_externaltypereference(S,C),
{simpletable,ERef#'Externaltypereference'.type};
- #type{def=#'Externaltypereference'{type=T}} ->
- check_externaltypereference(S,C#type.def),
- {simpletable,T};
+ #type{def=#'Externaltypereference'{}=ExtTypeRef} ->
+ ERef = check_externaltypereference(S, ExtTypeRef),
+ {simpletable,ERef#'Externaltypereference'.type};
{valueset,#type{def=ERef=#'Externaltypereference'{}}} -> % this is an object set
{_,TDef} = get_referenced_type(S,ERef),
case TDef#typedef.typespec of
@@ -4589,55 +4510,43 @@ check_reference(S,#'Externaltypereference'{pos=Pos,module=Emod,type=Name}) ->
#'Externaltypereference'{pos=Pos,module=ModName,type=Name}
end.
+get_referenced_type(S, T) ->
+ case do_get_referenced_type(S, T) of
+ {_,#type{def=#'Externaltypereference'{}=ERef}} ->
+ get_referenced_type(S, ERef);
+ {_,#type{def=#'Externalvaluereference'{}=VRef}} ->
+ get_referenced_type(S, VRef);
+ {_,_}=Res ->
+ Res
+ end.
-get_referenced_type(S,Ext) when is_record(Ext,'Externaltypereference') ->
- case match_parameters(S,Ext, S#state.parameters) of
- Ext ->
- #'Externaltypereference'{pos=Pos,module=Emod,type=Etype} = Ext,
- case S#state.mname of
- Emod -> % a local reference in this module
- get_referenced1(S,Emod,Etype,Pos);
- _ ->% always when multi file compiling
- case lists:member(Emod,S#state.inputmodules) of
- true ->
- get_referenced1(S,Emod,Etype,Pos);
- false ->
- get_referenced(S,Emod,Etype,Pos)
- end
- end;
- ERef = #'Externaltypereference'{} ->
- get_referenced_type(S,ERef);
- Other ->
- {undefined,Other}
- end;
-get_referenced_type(S=#state{mname=Emod},
- ERef=#'Externalvaluereference'{pos=P,module=Emod,
- value=Eval}) ->
- case match_parameters(S,ERef,S#state.parameters) of
- ERef ->
- get_referenced1(S,Emod,Eval,P);
- OtherERef when is_record(OtherERef,'Externalvaluereference') ->
- get_referenced_type(S,OtherERef);
- Value ->
- {Emod,Value}
- end;
-get_referenced_type(S,ERef=#'Externalvaluereference'{pos=Pos,module=Emod,
- value=Eval}) ->
- case match_parameters(S,ERef,S#state.parameters) of
- ERef ->
- case lists:member(Emod,S#state.inputmodules) of
- true ->
- get_referenced1(S,Emod,Eval,Pos);
- false ->
- get_referenced(S,Emod,Eval,Pos)
- end;
- OtherERef ->
- get_referenced_type(S,OtherERef)
- end;
-get_referenced_type(S,#identifier{val=Name,pos=Pos}) ->
- get_referenced1(S,undefined,Name,Pos);
-get_referenced_type(_S,Type) ->
- {undefined,Type}.
+do_get_referenced_type(#state{parameters=Ps}=S, T0) ->
+ case match_parameters(S, T0, Ps) of
+ T0 ->
+ do_get_ref_type_1(S, T0);
+ T ->
+ do_get_referenced_type(S, T)
+ end.
+
+do_get_ref_type_1(S, #'Externaltypereference'{pos=P,
+ module=M,
+ type=T}) ->
+ do_get_ref_type_2(S, P, M, T);
+do_get_ref_type_1(S, #'Externalvaluereference'{pos=P,
+ module=M,
+ value=V}) ->
+ do_get_ref_type_2(S, P, M, V);
+do_get_ref_type_1(_, T) ->
+ {undefined,T}.
+
+do_get_ref_type_2(#state{mname=Current,inputmodules=Modules}=S,
+ Pos, M, T) ->
+ case M =:= Current orelse lists:member(M, Modules) of
+ true ->
+ get_referenced1(S, M, T, Pos);
+ false ->
+ get_referenced(S, M, T, Pos)
+ end.
%% get_referenced/3
%% The referenced entity Ename may in case of an imported parameterized
@@ -4936,73 +4845,46 @@ imported1(Name,
end;
imported1(_Name,[]) ->
false.
-
-check_integer(_S,[],_C) ->
+%% Check the named number list for an INTEGER or a BIT STRING.
+check_named_number_list(_S, []) ->
[];
-check_integer(S,NamedNumberList,_C) ->
- case [X || X <- NamedNumberList, tuple_size(X) =:= 2] of
- NamedNumberList ->
- %% An already checked integer with NamedNumberList
- NamedNumberList;
- _ ->
- case check_unique(NamedNumberList,2) of
- [] ->
- check_int(S,NamedNumberList,[]);
- L when is_list(L) ->
- error({type,{duplicates,L},S}),
- unchanged
- end
+check_named_number_list(_S, [{_,_}|_]=NNL) ->
+ %% The named number list has already been checked.
+ NNL;
+check_named_number_list(S, NNL0) ->
+ %% Check that the names are unique.
+ T = S#state.type,
+ case check_unique(NNL0, 2) of
+ [] ->
+ NNL1 = [{Id,resolve_valueref(S, Val)} || {'NamedNumber',Id,Val} <- NNL0],
+ NNL = lists:keysort(2, NNL1),
+ case check_unique(NNL, 2) of
+ [] ->
+ NNL;
+ [Val|_] ->
+ asn1_error(S, T, {value_reused,Val})
+ end;
+ [H|_] ->
+ asn1_error(S, T, {namelist_redefinition,H})
end.
-
-check_int(S,[{'NamedNumber',Id,Num}|T],Acc) when is_integer(Num) ->
- check_int(S,T,[{Id,Num}|Acc]);
-check_int(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_int(S,[{'NamedNumber',Id,{'Externalvaluereference',_,Mod,Name}}|T],Acc) ->
- Val = dbget_ex(S,Mod,Name),
- check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_int(_S,[],Acc) ->
- lists:keysort(2,Acc).
+resolve_valueref(S, #'Externalvaluereference'{module=Mod,value=Name}) ->
+ dbget_ex(S, Mod, Name);
+resolve_valueref(_, Val) when is_integer(Val) ->
+ Val.
-check_real(_S,_Constr) ->
- ok.
+check_integer(S, NNL) ->
+ check_named_number_list(S, NNL).
-check_bitstring(_S,[],_Constr) ->
- [];
-check_bitstring(S,NamedNumberList,_Constr) ->
- case check_unique(NamedNumberList,2) of
- [] ->
- check_bitstr(S,NamedNumberList,[]);
- L when is_list(L) ->
- error({type,{duplicates,L},S}),
- unchanged
- end.
+check_bitstring(S, NNL0) ->
+ NNL = check_named_number_list(S, NNL0),
+ _ = [asn1_error(S, S#state.type, {invalid_bit_number,Bit}) ||
+ {_,Bit} <- NNL, Bit < 0],
+ NNL.
-check_bitstr(S,[{'NamedNumber',Id,Num}|T],Acc)when is_integer(Num) ->
- check_bitstr(S,T,[{Id,Num}|Acc]);
-check_bitstr(S,[{'NamedNumber',Id,Name}|T],Acc) when is_atom(Name) ->
-%%check_bitstr(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc) ->
-%% io:format("asn1ct_check:check_bitstr/3 hej hop ~w~n",[Name]),
- Val = dbget_ex(S,S#state.mname,Name),
-%% io:format("asn1ct_check:check_bitstr/3: ~w~n",[Val]),
- check_bitstr(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_bitstr(S,[],Acc) ->
- case check_unique(Acc,2) of
- [] ->
- lists:keysort(2,Acc);
- L when is_list(L) ->
- error({type,{duplicate_values,L},S}),
- unchanged
- end;
-%% When a BIT STRING already is checked, for instance a COMPONENTS OF S
-%% where S is a sequence that has a component that is a checked BS, the
-%% NamedNumber list is a list of {atom(),integer()} elements.
-check_bitstr(S,[El={Id,Num}|Rest],Acc) when is_atom(Id),is_integer(Num) ->
- check_bitstr(S,Rest,[El|Acc]).
-
+check_real(_S,_Constr) ->
+ ok.
%% Check INSTANCE OF
%% check that DefinedObjectClass is of TYPE-IDENTIFIER class
@@ -5013,20 +4895,16 @@ check_instance_of(S,DefinedObjectClass,Constraint) ->
check_type_identifier(S,DefinedObjectClass),
iof_associated_type(S,Constraint).
-
-check_type_identifier(_S,'TYPE-IDENTIFIER') ->
- ok;
-check_type_identifier(S,Eref=#'Externaltypereference'{}) ->
- case get_referenced_type(S,Eref) of
- {_,#classdef{name='TYPE-IDENTIFIER'}} -> ok;
- {_,#classdef{typespec=NextEref}}
- when is_record(NextEref,'Externaltypereference') ->
- check_type_identifier(S,NextEref);
+check_type_identifier(S, Eref=#'Externaltypereference'{type=Class}) ->
+ case get_referenced_type(S, Eref) of
+ {_,#classdef{name='TYPE-IDENTIFIER'}} ->
+ ok;
+ {_,#classdef{typespec=#'Externaltypereference'{}=NextEref}} ->
+ check_type_identifier(S, NextEref);
{_,TD=#typedef{typespec=#type{def=#'Externaltypereference'{}}}} ->
- check_type_identifier(S,(TD#typedef.typespec)#type.def);
- Err ->
- error({type,{"object set in type INSTANCE OF "
- "not of class TYPE-IDENTIFIER",Eref,Err},S})
+ check_type_identifier(S, (TD#typedef.typespec)#type.def);
+ _ ->
+ asn1_error(S, S#state.type, {illegal_instance_of,Class})
end.
iof_associated_type(S,[]) ->
@@ -5156,9 +5034,6 @@ check_enumerated(S,NamedNumberList,_Constr) ->
%% the latter is returned if the ENUMERATION contains EXTENSIONMARK
check_enum(S,[{'NamedNumber',Id,Num}|T],Acc1,Acc2,Root) when is_integer(Num) ->
check_enum(S,T,[{Id,Num}|Acc1],Acc2,Root);
-check_enum(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc1,Acc2,Root) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_enum(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc1,Acc2,Root);
check_enum(S,['EXTENSIONMARK'|T],Acc1,Acc2,_Root) ->
NewAcc2 = lists:keysort(2,Acc1),
NewList = enum_number(lists:reverse(Acc2),NewAcc2,0,[],[]),
@@ -6708,6 +6583,8 @@ merge_tags2([T1= #tag{type='IMPLICIT'}, T2 |Rest], Acc) ->
merge_tags2([T1#tag{type=T2#tag.type, form=T2#tag.form}|Rest],Acc);
merge_tags2([T1= #tag{type={default,'IMPLICIT'}}, T2 |Rest], Acc) ->
merge_tags2([T1#tag{type=T2#tag.type, form=T2#tag.form}|Rest],Acc);
+merge_tags2([T1= #tag{type={default,'AUTOMATIC'}}, T2 |Rest], Acc) ->
+ merge_tags2([T1#tag{type=T2#tag.type, form=T2#tag.form}|Rest],Acc);
merge_tags2([H|T],Acc) ->
merge_tags2(T, [H|Acc]);
merge_tags2([], Acc) ->
@@ -6774,7 +6651,7 @@ storeindb(#state{mname=Module}=S, [H|T], Errors) ->
storeindb(S, T, Errors);
Prev ->
PrevLine = asn1ct:get_pos_of_def(Prev),
- {error,Error} = asn1_error(S, H, {already_defined,Name,PrevLine}),
+ Error = return_asn1_error(S, H, {already_defined,Name,PrevLine}),
storeindb(S, T, [Error|Errors])
end;
storeindb(_, [], []) ->
@@ -6821,20 +6698,39 @@ findtypes_and_values([],Tacc,Vacc,Pacc,Cacc,Oacc,OSacc) ->
{lists:reverse(Tacc),lists:reverse(Vacc),lists:reverse(Pacc),
lists:reverse(Cacc),lists:reverse(Oacc),lists:reverse(OSacc)}.
-asn1_error(#state{mname=Where}, Item, Error) ->
+return_asn1_error(#state{mname=Where}, Item, Error) ->
Pos = asn1ct:get_pos_of_def(Item),
- {error,{structured_error,{Where,Pos},?MODULE,Error}}.
+ {structured_error,{Where,Pos},?MODULE,Error}.
+
+asn1_error(S, Item, Error) ->
+ throw({error,return_asn1_error(S, Item, Error)}).
format_error({already_defined,Name,PrevLine}) ->
io_lib:format("the name ~p has already been defined at line ~p",
[Name,PrevLine]);
+format_error({illegal_instance_of,Class}) ->
+ io_lib:format("using INSTANCE OF on class '~s' is illegal, "
+ "because INSTANCE OF may only be used on the class TYPE-IDENTFIER",
+ [Class]);
+format_error(illegal_octet_string_value) ->
+ "expecting a bstring or an hstring as value for an OCTET STRING";
+format_error({illegal_typereference,Name}) ->
+ io_lib:format("'~p' is used as a typereference, but does not start with an uppercase letter", [Name]);
format_error({invalid_fields,Fields,Obj}) ->
io_lib:format("invalid ~s in ~p", [format_fields(Fields),Obj]);
+format_error({invalid_bit_number,Bit}) ->
+ io_lib:format("the bit number '~p' is invalid", [Bit]);
format_error({missing_mandatory_fields,Fields,Obj}) ->
io_lib:format("missing mandatory ~s in ~p",
[format_fields(Fields),Obj]);
+format_error({namelist_redefinition,Name}) ->
+ io_lib:format("the name '~s' can not be redefined", [Name]);
format_error({undefined,Name}) ->
io_lib:format("'~s' is referenced, but is not defined", [Name]);
+format_error({undefined_import,Ref,Module}) ->
+ io_lib:format("'~s' is not exported from ~s", [Ref,Module]);
+format_error({value_reused,Val}) ->
+ io_lib:format("the value '~p' is used more than once", [Val]);
format_error(Other) ->
io_lib:format("~p", [Other]).
@@ -6850,14 +6746,6 @@ error({export,Msg,#state{mname=Mname,type=Ref,tname=Typename}}) ->
Pos = Ref#'Externaltypereference'.pos,
io:format("asn1error:~p:~p:~p~n~p~n",[Pos,Mname,Typename,Msg]),
{error,{export,Pos,Mname,Typename,Msg}};
-error({import,Msg,#state{mname=Mname,type=Ref,tname=Typename}}) ->
- PosOfDef =
- fun(#'Externaltypereference'{pos=P}) -> P;
- (#'Externalvaluereference'{pos=P}) -> P
- end,
- Pos = PosOfDef(Ref),
- io:format("asn1error:~p:~p:~p~n~p~n",[Pos,Mname,Typename,Msg]),
- {error,{import,Pos,Mname,Typename,Msg}};
% error({type,{Msg1,Msg2},#state{mname=Mname,type=Type,tname=Typename}})
% when is_record(Type,typedef) ->
% io:format("asn1error:~p:~p:~p ~p~n",
@@ -7074,7 +6962,7 @@ include_default_class1(_,[]) ->
include_default_class1(Module,[{Name,TS}|Rest]) ->
case asn1_db:dbget(Module,Name) of
undefined ->
- C = #classdef{checked=true,name=Name,
+ C = #classdef{checked=true,module=Module,name=Name,
typespec=TS},
asn1_db:dbput(Module,Name,C);
_ -> ok
@@ -7158,3 +7046,6 @@ check_fold(S, [H|T], Check) ->
[Error|check_fold(S, T, Check)]
end;
check_fold(_, [], Check) when is_function(Check, 3) -> [].
+
+name_of_def(#'Externaltypereference'{type=N}) -> N;
+name_of_def(#'Externalvaluereference'{value=N}) -> N.
diff --git a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl
index a38da8bcc2..820d19b85c 100644
--- a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -234,7 +234,7 @@ gen_decode_sequence(Erules,Typename,D) when is_record(D,type) ->
asn1ct_name:new(rb),
emit([" {'",RecordName,"'}.",nl,nl]);
{LeadingAttrTerm,PostponedDecArgs} ->
- emit([com,nl,nl]),
+ emit([nl]),
case {LeadingAttrTerm,PostponedDecArgs} of
{[],[]} ->
ok;
@@ -413,7 +413,7 @@ gen_decode_set(Erules,Typename,D) when is_record(D,type) ->
%% return value as record
emit([" {'",RecordName,"'}.",nl]);
{LeadingAttrTerm,PostponedDecArgs} ->
- emit([com,nl,nl]),
+ emit([nl]),
case {LeadingAttrTerm,PostponedDecArgs} of
{[],[]} ->
ok;
@@ -617,18 +617,20 @@ gen_dec_sequence_call1(Erules,TopType,[#'ComponentType'{name=Cname,typespec=Type
{LA,PostponedDec} =
gen_dec_component(Erules,TopType,Cname,Tags,Type,Num,Prop,
Ext,DecObjInf),
+ emit([com,nl]),
case Rest of
[] ->
{LA ++ LeadingAttrAcc,PostponedDec ++ ArgsAcc};
_ ->
- emit([com,nl]),
asn1ct_name:new(bytes),
gen_dec_sequence_call1(Erules,TopType,Rest,Num+1,Ext,DecObjInf,
LA++LeadingAttrAcc,PostponedDec++ArgsAcc)
end;
gen_dec_sequence_call1(_Erules,_TopType,[],1,_,_,_,_) ->
- no_terms.
+ no_terms;
+gen_dec_sequence_call1(_, _, [], _Num, _, _, LA, PostponedDec) ->
+ {LA, PostponedDec}.
gen_dec_sequence_call2(_Erules,_TopType, {[], [], []}, _Ext,_DecObjInf) ->
no_terms;
@@ -643,7 +645,6 @@ gen_dec_sequence_call2(Erules,TopType,{Root1,EList,Root2},_Ext,DecObjInf) ->
%% TagList is the tags of Root2 elements from the first up to and
%% including the first mandatory element.
TagList = get_root2_taglist(Root2,[]),
- emit({com,nl}),
emit([{curr,tlv}," = ",
{call,ber,skip_ExtensionAdditions,
[{prev,tlv},{asis,TagList}]},com,nl]),
@@ -962,8 +963,7 @@ gen_enc_line(Erules,TopType,Cname,Type,Element,Indent,OptOrMand,Assign,EncObj)
WhatKind = asn1ct_gen:type(InnerType),
emit(IndDeep),
emit(Assign),
- gen_optormand_case(OptOrMand,Erules,TopType,Cname,Type,InnerType,WhatKind,
- Element),
+ gen_optormand_case(OptOrMand, Erules, TopType, Cname, Type, Element),
case {Type,asn1ct_gen:get_constraint(Type#type.constraint,
componentrelation)} of
% #type{constraint=[{tableconstraint_info,RefedFieldName}],
@@ -1029,26 +1029,19 @@ gen_enc_line(Erules,TopType,Cname,Type,Element,Indent,OptOrMand,Assign,EncObj)
emit([nl,indent(7),"end"])
end.
-gen_optormand_case(mandatory,_Erules,_TopType,_Cname,_Type,_InnerType,_WhatKind,
- _Element) ->
+gen_optormand_case(mandatory, _Erules, _TopType, _Cname, _Type, _Element) ->
ok;
-gen_optormand_case('OPTIONAL',Erules,_TopType,_Cname,_Type,_InnerType,_WhatKind,
- Element) ->
+gen_optormand_case('OPTIONAL', Erules, _TopType, _Cname, _Type, Element) ->
emit([" case ",Element," of",nl]),
emit([indent(9),"asn1_NOVALUE -> {",
empty_lb(Erules),",0};",nl]),
emit([indent(9),"_ ->",nl,indent(12)]);
-gen_optormand_case({'DEFAULT',DefaultValue},Erules,TopType,Cname,Type,
- InnerType,WhatKind,Element) ->
+gen_optormand_case({'DEFAULT',DefaultValue}, Erules, _TopType,
+ _Cname, Type, Element) ->
CurrMod = get(currmod),
case catch lists:member(der,get(encoding_options)) of
true ->
- emit(" case catch "),
- asn1ct_gen:gen_check_call(TopType,Cname,Type,InnerType,
- WhatKind,{asis,DefaultValue},
- Element),
- emit([" of",nl]),
- emit([indent(12),"true -> {[],0};",nl]);
+ asn1ct_gen_check:emit(Type, DefaultValue, Element);
_ ->
emit([" case ",Element," of",nl]),
emit([indent(9),"asn1_DEFAULT -> {",
@@ -1063,10 +1056,9 @@ gen_optormand_case({'DEFAULT',DefaultValue},Erules,TopType,Cname,Type,
emit([indent(9),{asis,
DefaultValue}," -> {",
empty_lb(Erules),",0};",nl])
- end
- end,
- emit([indent(9),"_ ->",nl,indent(12)]).
-
+ end,
+ emit([indent(9),"_ ->",nl,indent(12)])
+ end.
gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand,DecObjInf) ->
@@ -1210,11 +1202,11 @@ gen_dec_call({typefield,_},_,_,Cname,Type,BytesVar,Tag,_,_,_DecObjInf,OptOrMandC
(Type#type.def)#'ObjectClassFieldType'.fieldname,
[{Cname,RefedFieldName,asn1ct_gen:mk_var(asn1ct_name:curr(term)),
asn1ct_gen:mk_var(asn1ct_name:curr(tmpterm)),Tag,OptOrMandComp}];
-gen_dec_call(InnerType,Erules,TopType,Cname,Type,BytesVar,Tag,PrimOptOrMand,
- OptOrMand,DecObjInf,_) ->
+gen_dec_call(InnerType, _Erules, TopType, Cname, Type, BytesVar,
+ Tag, _PrimOptOrMand, _OptOrMand, DecObjInf,_) ->
WhatKind = asn1ct_gen:type(InnerType),
- gen_dec_call1(WhatKind,InnerType,Erules,TopType,Cname,Type,BytesVar,Tag,
- PrimOptOrMand,OptOrMand),
+ gen_dec_call1(WhatKind, InnerType, TopType, Cname,
+ Type, BytesVar, Tag),
case DecObjInf of
{Cname,{_,OSet,_UniqueFName,ValIndex}} ->
Term = asn1ct_gen:mk_var(asn1ct_name:curr(term)),
@@ -1226,8 +1218,9 @@ gen_dec_call(InnerType,Erules,TopType,Cname,Type,BytesVar,Tag,PrimOptOrMand,
ok
end,
[].
-gen_dec_call1({primitive,bif},InnerType,Erules,TopType,Cname,Type,BytesVar,
- Tag,OptOrMand,_) ->
+
+gen_dec_call1({primitive,bif}, InnerType, TopType, Cname,
+ Type, BytesVar, Tag) ->
case {asn1ct:get_gen_state_field(namelist),InnerType} of
{[{Cname,undecoded}|Rest],_} ->
asn1ct:add_generated_refed_func({[Cname|TopType],undecoded,
@@ -1236,11 +1229,10 @@ gen_dec_call1({primitive,bif},InnerType,Erules,TopType,Cname,Type,BytesVar,
emit(["{'",asn1ct_gen:list2name([Cname|TopType]),"',",
BytesVar,"}"]);
_ ->
- ?ASN1CT_GEN_BER:gen_dec_prim(Erules,Type,BytesVar,Tag,[],
- ?PRIMITIVE,OptOrMand)
+ ?ASN1CT_GEN_BER:gen_dec_prim(Type, BytesVar, Tag)
end;
-gen_dec_call1('ASN1_OPEN_TYPE',_InnerType,Erules,TopType,Cname,Type,BytesVar,
- Tag,OptOrMand,_) ->
+gen_dec_call1('ASN1_OPEN_TYPE', _InnerType, TopType, Cname,
+ Type, BytesVar, Tag) ->
case {asn1ct:get_gen_state_field(namelist),Type#type.def} of
{[{Cname,undecoded}|Rest],_} ->
asn1ct:add_generated_refed_func({[Cname|TopType],undecoded,
@@ -1249,15 +1241,12 @@ gen_dec_call1('ASN1_OPEN_TYPE',_InnerType,Erules,TopType,Cname,Type,BytesVar,
emit(["{'",asn1ct_gen:list2name([Cname|TopType]),"',",
BytesVar,"}"]);
{_,#'ObjectClassFieldType'{type=OpenType}} ->
- ?ASN1CT_GEN_BER:gen_dec_prim(Erules,#type{def=OpenType},
- BytesVar,Tag,[],
- ?PRIMITIVE,OptOrMand);
+ ?ASN1CT_GEN_BER:gen_dec_prim(#type{def=OpenType},
+ BytesVar, Tag);
_ ->
- ?ASN1CT_GEN_BER:gen_dec_prim(Erules,Type,BytesVar,Tag,[],
- ?PRIMITIVE,OptOrMand)
+ ?ASN1CT_GEN_BER:gen_dec_prim(Type, BytesVar, Tag)
end;
-gen_dec_call1(WhatKind,_,_Erules,TopType,Cname,Type,BytesVar,
- Tag,_,_OptOrMand) ->
+gen_dec_call1(WhatKind, _, TopType, Cname, Type, BytesVar, Tag) ->
case asn1ct:get_gen_state_field(namelist) of
[{Cname,undecoded}|Rest] ->
asn1ct:add_generated_refed_func({[Cname|TopType],undecoded,
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl
index 4672f7edd3..a91404ed54 100644
--- a/lib/asn1/src/asn1ct_constructed_per.erl
+++ b/lib/asn1/src/asn1ct_constructed_per.erl
@@ -79,7 +79,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
[]
end,
Aligned = is_aligned(Erule),
- Value0 = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value0 = make_var(val),
Optionals = optionals(to_textual_order(CompList)),
ImmOptionals = [asn1ct_imm:per_enc_optional(Value0, Opt, Aligned) ||
Opt <- Optionals],
@@ -87,7 +87,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
ExtImm = case Ext of
{ext,ExtPos,NumExt} when NumExt > 0 ->
gen_encode_extaddgroup(CompList),
- Value = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value = make_var(val),
asn1ct_imm:per_enc_extensions(Value, ExtPos,
NumExt, Aligned);
_ ->
@@ -106,19 +106,17 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
c_index=N,
usedclassfield=UniqueFieldName,
uniqueclassfield=UniqueFieldName,
- valueindex=ValueIndex
+ valueindex=ValueIndex0
} -> %% N is index of attribute that determines constraint
{Module,ObjSetName} = ObjectSet,
#typedef{typespec=#'ObjectSet'{gen=Gen}} =
asn1_db:dbget(Module, ObjSetName),
case Gen of
true ->
- ObjectEncode =
- asn1ct_gen:un_hyphen_var(lists:concat(['Obj',AttrN])),
- El = make_element(N+1, asn1ct_gen:mk_var(asn1ct_name:curr(val))),
- ValueMatch = value_match(ValueIndex, El),
- ObjSetImm0 = [{assign,{var,ObjectEncode},ValueMatch}],
- {{AttrN,ObjectEncode},ObjSetImm0};
+ ValueIndex = ValueIndex0 ++ [{N+1,top}],
+ Val = make_var(val),
+ {ObjSetImm0,Dst} = enc_dig_out_value(ValueIndex, Val),
+ {{AttrN,Dst},ObjSetImm0};
false ->
{false,[]}
end;
@@ -128,7 +126,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
%% when the simpletableattributes was at an outer
%% level and the objfun has been passed through the
%% function call
- {{"got objfun through args","ObjFun"},[]};
+ {{"got objfun through args",{var,"ObjFun"}},[]};
_ ->
{false,[]}
end
@@ -136,7 +134,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
ImmSetExt =
case Ext of
{ext,_Pos,NumExt2} when NumExt2 > 0 ->
- asn1ct_imm:per_enc_extension_bit('Extensions', Aligned);
+ asn1ct_imm:per_enc_extension_bit({var,"Extensions"}, Aligned);
{ext,_Pos,_} ->
asn1ct_imm:per_enc_extension_bit([], Aligned);
_ ->
@@ -428,8 +426,7 @@ gen_dec_open_type(Erule, Val, {Xmod,Xtype}, LeadingAttr,
emit([Term," = ",{asis,F},"(",TmpTerm,", ",Val,")"]).
dec_objset_optional(N, {'DEFAULT',Val}) ->
- dec_objset_optional_1(N, Val),
- dec_objset_optional_1(N, asn1_DEFAULT);
+ dec_objset_optional_1(N, Val);
dec_objset_optional(N, 'OPTIONAL') ->
dec_objset_optional_1(N, asn1_NOVALUE);
dec_objset_optional(_N, mandatory) -> ok.
@@ -452,8 +449,13 @@ dec_objset_default(N, C, LeadingAttr, false) ->
"{value,Bytes},"
"{unique_name_and_value,",{asis,LeadingAttr},",Id}}}).",nl,nl]);
dec_objset_default(N, _, _, true) ->
- emit([{asis,N},"(Bytes, Id) ->",nl,
- "Bytes.",nl,nl]).
+ emit([{asis,N},"(Bytes, Id) ->",nl|
+ case asn1ct:use_legacy_types() of
+ false ->
+ ["{asn1_OPENTYPE,Bytes}.",nl,nl];
+ true ->
+ ["Bytes.",nl,nl]
+ end]).
dec_objset_1(Erule, N, {Id,Obj}, RestFields, Typename) ->
emit([{asis,N},"(Bytes, ",{asis,Id},") ->",nl]),
@@ -540,7 +542,7 @@ gen_encode_choice_imm(Erule, TopType, #type{def={'CHOICE',CompList}}) ->
Aligned = is_aligned(Erule),
Cs = gen_enc_choice(Erule, TopType, CompList, Ext),
[{assign,{expr,"{ChoiceTag,ChoiceVal}"},"Val"}|
- asn1ct_imm:per_enc_choice('ChoiceTag', Cs, Aligned)].
+ asn1ct_imm:per_enc_choice({var,"ChoiceTag"}, Cs, Aligned)].
gen_decode_choice(Erules,Typename,D) when is_record(D,type) ->
asn1ct_name:start(),
@@ -562,14 +564,14 @@ gen_encode_sof(Erule, Typename, SeqOrSetOf, D) ->
gen_encode_sof_imm(Erule, Typename, SeqOrSetOf, #type{}=D) ->
{_SeqOrSetOf,ComponentType} = D#type.def,
Aligned = is_aligned(Erule),
- Constructed_Suffix =
- asn1ct_gen:constructed_suffix(SeqOrSetOf,
- ComponentType#type.def),
- Conttype = asn1ct_gen:get_inner(ComponentType#type.def),
+ CompType = ComponentType#type.def,
+ Constructed_Suffix = asn1ct_gen:constructed_suffix(SeqOrSetOf, CompType),
+ Conttype = asn1ct_gen:get_inner(CompType),
Currmod = get(currmod),
Imm0 = case asn1ct_gen:type(Conttype) of
{primitive,bif} ->
- asn1ct_gen_per:gen_encode_prim_imm('Comp', ComponentType, Aligned);
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Comp"},
+ ComponentType, Aligned);
{constructed,bif} ->
TypeName = [Constructed_Suffix|Typename],
Enc = enc_func(asn1ct_gen:list2name(TypeName)),
@@ -577,17 +579,19 @@ gen_encode_sof_imm(Erule, Typename, SeqOrSetOf, #type{}=D) ->
[{objfun,_}|_] -> [{var,"ObjFun"}];
_ -> []
end,
- [{apply,Enc,[{var,"Comp"}|ObjArg]}];
+ [{apply,{local,Enc,CompType},
+ [{var,"Comp"}|ObjArg]}];
#'Externaltypereference'{module=Currmod,type=Ename} ->
- [{apply,enc_func(Ename),[{var,"Comp"}]}];
+ [{apply,{local,enc_func(Ename),CompType},[{var,"Comp"}]}];
#'Externaltypereference'{module=EMod,type=Ename} ->
- [{apply,{EMod,enc_func(Ename)},[{var,"Comp"}]}];
+ [{apply,{EMod,enc_func(Ename),CompType},[{var,"Comp"}]}];
'ASN1_OPEN_TYPE' ->
- asn1ct_gen_per:gen_encode_prim_imm('Comp',
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Comp"},
#type{def='ASN1_OPEN_TYPE'},
Aligned)
end,
- asn1ct_imm:per_enc_sof('Val', D#type.constraint, 'Comp', Imm0, Aligned).
+ asn1ct_imm:per_enc_sof({var,"Val"}, D#type.constraint, 'Comp',
+ Imm0, Aligned).
gen_decode_sof(Erules, Typename, SeqOrSetOf, #type{}=D) ->
asn1ct_name:start(),
@@ -871,8 +875,8 @@ gen_enc_components_call1(Erule,TopType,
CanonicalNum ->
CanonicalNum
end,
- Element0 = make_element(TermNo+1, asn1ct_gen:mk_var(asn1ct_name:curr(val))),
- {Imm0,Element} = asn1ct_imm:enc_bind_var(Element0),
+ Val = make_var(val),
+ {Imm0,Element} = asn1ct_imm:enc_element(TermNo+1, Val),
Imm1 = gen_enc_line_imm(Erule, TopType, Cname, Type, Element, DynamicEnc, Ext),
Category = case {Prop,Ext} of
{'OPTIONAL',_} ->
@@ -906,26 +910,36 @@ def_values(#type{def=#'Externaltypereference'{module=Mod,type=Type}}, Def) ->
#typedef{typespec=T} = asn1_db:dbget(Mod, Type),
def_values(T, Def);
def_values(#type{def={'BIT STRING',[]}}, Bs) when is_bitstring(Bs) ->
- ListBs = [B || <<B:1>> <= Bs],
- IntBs = lists:foldl(fun(B, A) ->
- (A bsl 1) bor B
- end, 0, lists:reverse(ListBs)),
- Sz = bit_size(Bs),
- Compact = case 8 - Sz rem 8 of
- 8 ->
- {0,Bs};
- Unused ->
- {Unused,<<Bs:Sz/bits,0:Unused>>}
- end,
- [asn1_DEFAULT,Bs,Compact,ListBs,IntBs];
+ case asn1ct:use_legacy_types() of
+ false ->
+ [asn1_DEFAULT,Bs];
+ true ->
+ ListBs = [B || <<B:1>> <= Bs],
+ IntBs = lists:foldl(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, lists:reverse(ListBs)),
+ Sz = bit_size(Bs),
+ Compact = case 8 - Sz rem 8 of
+ 8 ->
+ {0,Bs};
+ Unused ->
+ {Unused,<<Bs:Sz/bits,0:Unused>>}
+ end,
+ [asn1_DEFAULT,Bs,Compact,ListBs,IntBs]
+ end;
def_values(#type{def={'BIT STRING',[_|_]=Ns}}, List) when is_list(List) ->
Bs = asn1ct_gen:named_bitstring_value(List, Ns),
- ListBs = [B || <<B:1>> <= Bs],
- IntBs = lists:foldl(fun(B, A) ->
- (A bsl 1) bor B
- end, 0, lists:reverse(ListBs)),
- Args = [List,Bs,ListBs,IntBs],
- {call,per_common,is_default_bitstring,Args};
+ As = case asn1ct:use_legacy_types() of
+ false ->
+ [List,Bs];
+ true ->
+ ListBs = [B || <<B:1>> <= Bs],
+ IntBs = lists:foldl(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, lists:reverse(ListBs)),
+ [List,Bs,ListBs,IntBs]
+ end,
+ {call,per_common,is_default_bitstring,As};
def_values(#type{def={'INTEGER',Ns}}, Def) ->
[asn1_DEFAULT,Def|case lists:keyfind(Def, 2, Ns) of
false -> [];
@@ -967,9 +981,9 @@ gen_enc_line_imm_1(Erule, TopType, Cname, Type, Element, DynamicEnc) ->
CurrMod = get(currmod),
case asn1ct_gen:type(Atype) of
#'Externaltypereference'{module=CurrMod,type=EType} ->
- [{apply,enc_func(EType),[{expr,Element}]}];
+ [{apply,{local,enc_func(EType),Atype},[Element]}];
#'Externaltypereference'{module=Mod,type=EType} ->
- [{apply,{Mod,enc_func(EType)},[{expr,Element}]}];
+ [{apply,{Mod,enc_func(EType),Atype},[Element]}];
{primitive,bif} ->
asn1ct_gen_per:gen_encode_prim_imm(Element, Type, Aligned);
'ASN1_OPEN_TYPE' ->
@@ -988,9 +1002,9 @@ gen_enc_line_imm_1(Erule, TopType, Cname, Type, Element, DynamicEnc) ->
Enc = enc_func(asn1ct_gen:list2name(NewTypename)),
case {Type#type.tablecinf,DynamicEnc} of
{[{objfun,_}|_R],{_,EncFun}} ->
- [{apply,Enc,[{expr,Element},{var,EncFun}]}];
+ [{apply,{local,Enc,Type},[Element,EncFun]}];
_ ->
- [{apply,Enc,[{expr,Element}]}]
+ [{apply,{local,Enc,Type},[Element]}]
end
end
end.
@@ -1014,13 +1028,16 @@ enc_var_type_call(Erule, Name, RestFieldNames,
{_,Key,Code} <- ObjSet1],
ObjSet = lists:sort([P || {_,B}=P <- ObjSet2, B =/= none]),
Key = erlang:md5(term_to_binary({encode,ObjSet,RestFieldNames,Extensible})),
+ Imm = enc_objset_imm(Erule, Name, ObjSet, RestFieldNames, Extensible),
+ Lambda = {lambda,[{var,"Val"},{var,"Id"}],Imm},
Gen = fun(_Fd, N) ->
- enc_objset(Erule, Name, N, ObjSet,
- RestFieldNames, Extensible)
+ Aligned = is_aligned(Erule),
+ emit([{asis,N},"(Val, Id) ->",nl]),
+ asn1ct_imm:enc_cg(Imm, Aligned),
+ emit([".",nl])
end,
Prefix = lists:concat(["enc_os_",Name]),
- F = asn1ct_func:call_gen(Prefix, Key, Gen),
- [{apply,F,[{var,atom_to_list(Val)},{var,Fun}]}].
+ [{call_gen,Prefix,Key,Gen,Lambda,[Val,Fun]}].
fix_object_code(Name, [{Name,B}|_], _ClassFields) ->
B;
@@ -1042,9 +1059,7 @@ fix_object_code(Name, [], ClassFields) ->
end
end.
-
-enc_objset(Erule, Component, Name, ObjSet, RestFieldNames, Extensible) ->
- asn1ct_name:start(),
+enc_objset_imm(Erule, Component, ObjSet, RestFieldNames, Extensible) ->
Aligned = is_aligned(Erule),
E = {error,
fun() ->
@@ -1053,22 +1068,28 @@ enc_objset(Erule, Component, Name, ObjSet, RestFieldNames, Extensible) ->
"{value,Val},"
"{unique_name_and_value,'_'}})",nl])
end},
- Imm = [{'cond',
- [[{eq,{var,"Id"},Key}|
- enc_obj(Erule, Obj, RestFieldNames, Aligned)] ||
- {Key,Obj} <- ObjSet] ++
- [['_',case Extensible of
- false -> E;
- true -> {put_bits,{var,"Val"},binary,[1]}
- end]]}],
- emit([{asis,Name},"(Val, Id) ->",nl]),
- asn1ct_imm:enc_cg(Imm, Aligned),
- emit([".",nl]).
+ [{'cond',
+ [[{eq,{var,"Id"},Key}|
+ enc_obj(Erule, Obj, RestFieldNames, Aligned)] ||
+ {Key,Obj} <- ObjSet] ++
+ [['_',case Extensible of
+ false ->
+ E;
+ true ->
+ case asn1ct:use_legacy_types() of
+ false ->
+ {call,per_common,open_type_to_binary,
+ [{var,"Val"}]};
+ true ->
+ {call,per_common,legacy_open_type_to_binary,
+ [{var,"Val"}]}
+ end
+ end]]}].
enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
case Obj of
#typedef{name={primitive,bif},typespec=Def} ->
- asn1ct_gen_per:gen_encode_prim_imm('Val', Def, Aligned);
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Val"}, Def, Aligned);
#typedef{name={constructed,bif},typespec=Def} ->
InnerType = asn1ct_gen:get_inner(Def#type.def),
case InnerType of
@@ -1084,7 +1105,7 @@ enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
gen_encode_sof_imm(Erule, name, InnerType, Def)
end;
#typedef{name=Type} ->
- [{apply,enc_func(Type),[{var,"Val"}]}];
+ [{apply,{local,enc_func(Type),Type},[{var,"Val"}]}];
#'Externalvaluereference'{module=Mod,value=Value} ->
case asn1_db:dbget(Mod, Value) of
#typedef{typespec=#'Object'{def=Def}} ->
@@ -1097,9 +1118,9 @@ enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
Func = enc_func(Type),
case get(currmod) of
Mod ->
- [{apply,Func,[{var,"Val"}]}];
+ [{apply,{local,Func,Obj},[{var,"Val"}]}];
_ ->
- [{apply,{Mod,Func},[{var,"Val"}]}]
+ [{apply,{Mod,Func,Obj},[{var,"Val"}]}]
end
end.
@@ -1540,12 +1561,12 @@ gen_enc_choices([H|T], Erule, TopType, Pos, Constr, Ext) ->
no ->
case Type#type.tablecinf of
[{objfun,_}|_] ->
- {"got objfun through args","ObjFun"};
+ {"got objfun through args",{var,"ObjFun"}};
_ ->
false
end;
_ ->
- {no_attr,"ObjFun"}
+ {no_attr,{var,"ObjFun"}}
end,
DoExt = case Constr of
ext -> Ext;
@@ -1561,7 +1582,7 @@ gen_enc_choices([H|T], Erule, TopType, Pos, Constr, Ext) ->
[{put_bits,0,1,[1]}|
asn1ct_imm:per_enc_integer(Pos, Constr, Aligned)]
end,
- Body = gen_enc_line_imm(Erule, TopType, Cname, Type, 'ChoiceVal',
+ Body = gen_enc_line_imm(Erule, TopType, Cname, Type, {var,"ChoiceVal"},
EncObj, DoExt),
Imm = Tag ++ Body,
[{Cname,Imm}|gen_enc_choices(T, Erule, TopType, Pos+1, Constr, Ext)];
@@ -1778,3 +1799,13 @@ value_match1(Value,[],Acc,Depth) ->
Acc ++ Value ++ lists:concat(lists:duplicate(Depth,")"));
value_match1(Value,[{VI,_}|VIs],Acc,Depth) ->
value_match1(Value,VIs,Acc++lists:concat(["element(",VI,","]),Depth+1).
+
+enc_dig_out_value([], Value) ->
+ {[],Value};
+enc_dig_out_value([{N,_}|T], Value) ->
+ {Imm0,Dst0} = enc_dig_out_value(T, Value),
+ {Imm,Dst} = asn1ct_imm:enc_element(N, Dst0),
+ {Imm0++Imm,Dst}.
+
+make_var(Base) ->
+ {var,atom_to_list(asn1ct_gen:mk_var(asn1ct_name:curr(Base)))}.
diff --git a/lib/asn1/src/asn1ct_func.erl b/lib/asn1/src/asn1ct_func.erl
index dbadedb683..fb94f65b32 100644
--- a/lib/asn1/src/asn1ct_func.erl
+++ b/lib/asn1/src/asn1ct_func.erl
@@ -19,7 +19,8 @@
%%
-module(asn1ct_func).
--export([start_link/0,need/1,call/3,call_gen/3,call_gen/4,generate/1]).
+-export([start_link/0,need/1,call/3,call_gen/3,call_gen/4,
+ generate/1,is_used/1]).
-export([init/1,handle_call/3,handle_cast/2,terminate/2]).
start_link() ->
@@ -48,7 +49,7 @@ need(MFA) ->
call_gen(Prefix, Key, Gen, Args) when is_function(Gen, 2) ->
F = req({gen_func,Prefix,Key,Gen}),
- asn1ct_gen:emit([F,"(",call_args(Args, ""),")"]).
+ asn1ct_gen:emit([{asis,F},"(",call_args(Args, ""),")"]).
call_gen(Prefix, Key, Gen) when is_function(Gen, 2) ->
req({gen_func,Prefix,Key,Gen}).
@@ -63,6 +64,10 @@ generate(Fd) ->
Funcs = sofs:to_external(Funcs0),
ok = file:write(Fd, Funcs).
+is_used({_,_,_}=MFA) ->
+ req({is_used,MFA}).
+
+
req(Req) ->
gen_server:call(get(?MODULE), Req, infinity).
@@ -103,7 +108,10 @@ handle_call({gen_func,Prefix,Key,GenFun}, _From, #st{gen=G0,gc=Gc0}=St) ->
{reply,Name,St#st{gen=G,gc=Gc}};
{value,{Name,_}} ->
{reply,Name,St}
- end.
+ end;
+handle_call({is_used,MFA}, _From, #st{used=Used}=St) ->
+ {reply,gb_sets:is_member(MFA, Used),St}.
+
terminate(_, _) ->
ok.
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index 30d337635b..2ef8466309 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -23,12 +23,12 @@
-export([demit/1,
emit/1,
+ open_output_file/1,close_output_file/0,
get_inner/1,type/1,def_to_tag/1,prim_bif/1,
list2name/1,
list2rname/1,
constructed_suffix/2,
unify_if_string/1,
- gen_check_call/7,
get_constraint/2,
insert_once/2,
ct_gen_module/1,
@@ -42,6 +42,8 @@
-export([gen_encode_constructed/4,
gen_decode_constructed/4]).
+-define(SUPPRESSION_FUNC, 'dialyzer-suppressions').
+
%% pgen(Outfile, Erules, Module, TypeOrVal, Options)
%% Generate Erlang module (.erl) and (.hrl) file corresponding to an ASN.1 module
%% .hrl file is only generated if necessary
@@ -70,8 +72,7 @@ pgen_module(OutFile,Erules,Module,
HrlGenerated = pgen_hrl(Erules,Module,TypeOrVal,Options,Indent),
asn1ct_name:start(),
ErlFile = lists:concat([OutFile,".erl"]),
- Fid = fopen(ErlFile),
- put(gen_file_out,Fid),
+ _ = open_output_file(ErlFile),
asn1ct_func:start_link(),
gen_head(Erules,Module,HrlGenerated),
pgen_exports(Erules,Module,TypeOrVal),
@@ -85,12 +86,18 @@ pgen_module(OutFile,Erules,Module,
"%%%",nl,
"%%% Run-time functions.",nl,
"%%%",nl]),
- asn1ct_func:generate(Fid),
- file:close(Fid),
- _ = erase(gen_file_out),
+ dialyzer_suppressions(Erules),
+ Fd = get(gen_file_out),
+ asn1ct_func:generate(Fd),
+ close_output_file(),
_ = erase(outfile),
asn1ct:verbose("--~p--~n",[{generated,ErlFile}],Options).
+dialyzer_suppressions(Erules) ->
+ emit([nl,
+ {asis,?SUPPRESSION_FUNC},"(Arg) ->",nl]),
+ Rtmod = ct_gen_module(Erules),
+ Rtmod:dialyzer_suppressions(Erules).
pgen_typeorval(Erules,Module,N2nConvEnums,{Types,Values,_Ptypes,_Classes,Objects,ObjectSets}) ->
Rtmod = ct_gen_module(Erules),
@@ -98,11 +105,6 @@ pgen_typeorval(Erules,Module,N2nConvEnums,{Types,Values,_Ptypes,_Classes,Objects
pgen_values(Erules,Module,Values),
pgen_objects(Rtmod,Erules,Module,Objects),
pgen_objectsets(Rtmod,Erules,Module,ObjectSets),
- case catch lists:member(der,get(encoding_options)) of
- true ->
- pgen_check_defaultval(Erules,Module);
- _ -> ok
- end,
pgen_partial_decode(Rtmod,Erules,Module).
pgen_values(_,_,[]) ->
@@ -178,23 +180,6 @@ pgen_objectsets(Rtmod,Erules,Module,[H|T]) ->
Rtmod:gen_objectset_code(Erules,TypeDef),
pgen_objectsets(Rtmod,Erules,Module,T).
-pgen_check_defaultval(Erules,Module) ->
- CheckObjects = asn1ct_table:to_list(check_functions),
- case get(asndebug) of
- true ->
- FileName = lists:concat([Module,".table"]),
- {ok,IoDevice} = file:open(FileName,[write]),
- Fun =
- fun(X)->
- io:format(IoDevice,"~n~n************~n~n~p~n~n*****"
- "********~n~n",[X])
- end,
- lists:foreach(Fun,CheckObjects),
- file:close(IoDevice);
- _ -> ok
- end,
- gen_check_defaultval(Erules,Module,CheckObjects).
-
pgen_partial_decode(Rtmod,Erule,Module) when Erule == ber ->
pgen_partial_inc_dec(Rtmod,Erule,Module),
pgen_partial_dec(Rtmod,Erule,Module);
@@ -542,8 +527,7 @@ gen_part_decode_funcs({constructed,bif},TypeName,
emit([" 'dec_",TypeName,"'(Data,",{asis,Tag},")"]);
gen_part_decode_funcs({primitive,bif},_TypeName,
{_Name,undecoded,Tag,Type}) ->
- % Argument no 6 is 0, i.e. bit 6 for primitive encoding.
- asn1ct_gen_ber_bin_v2:gen_dec_prim(ber_bin_v2,Type,"Data",Tag,[],0,", mandatory, ");
+ asn1ct_gen_ber_bin_v2:gen_dec_prim(Type, "Data", Tag);
gen_part_decode_funcs(WhatKind,_TypeName,{_,Directive,_,_}) ->
throw({error,{asn1,{"Not implemented yet",WhatKind," partial incomplete directive:",Directive}}}).
@@ -576,131 +560,6 @@ gen_types(Erules,Tname,Type) when is_record(Type,type) ->
asn1ct_name:clear(),
Rtmod:gen_decode(Erules,Tname,Type).
-gen_check_defaultval(Erules,Module,[{Name,Type}|Rest]) ->
- gen_check_func(Name,Type),
- gen_check_defaultval(Erules,Module,Rest);
-gen_check_defaultval(_,_,[]) ->
- ok.
-
-gen_check_func(Name,FType = #type{def=Def}) ->
- EncName = ensure_atom(Name),
- emit({{asis,EncName},"(_V,asn1_DEFAULT) ->",nl," true;",nl}),
- emit({{asis,EncName},"(V,V) ->",nl," true;",nl}),
- emit({{asis,EncName},"(V,{_,V}) ->",nl," true;",nl}),
- case Def of
- {'SEQUENCE OF',Type} ->
- gen_check_sof(Name,'SEQOF',Type);
- {'SET OF',Type} ->
- gen_check_sof(Name,'SETOF',Type);
- #'SEQUENCE'{components=Components} ->
- gen_check_sequence(Name,Components);
- #'SET'{components=Components} ->
- gen_check_sequence(Name,Components);
- {'CHOICE',Components} ->
- gen_check_choice(Name,Components);
- #'Externaltypereference'{type=T} ->
- emit({{asis,EncName},"(DefaultValue,Value) ->",nl}),
- emit({" '",list2name([T,check]),"'(DefaultValue,Value).",nl});
- MaybePrim ->
- InnerType = get_inner(MaybePrim),
- case type(InnerType) of
- {primitive,bif} ->
- emit({{asis,EncName},"(DefaultValue,Value) ->",nl," "}),
- gen_prim_check_call(get_inner(InnerType),"DefaultValue","Value",
- FType),
- emit({".",nl,nl});
- _ ->
- throw({asn1_error,{unknown,type,MaybePrim}})
- end
- end.
-
-gen_check_sof(Name,SOF,Type) ->
- EncName = ensure_atom(Name),
- NewName = ensure_atom(list2name([sorted,Name])),
- emit({{asis,EncName},"(V1,V2) ->",nl}),
- emit({" ",{asis,NewName},"(lists:sort(V1),lists:sort(V2)).",nl,nl}),
- emit({{asis,NewName},"([],[]) ->",nl," true;",nl}),
- emit({{asis,NewName},"([DV|DVs],[V|Vs]) ->",nl," "}),
- InnerType = get_inner(Type#type.def),
- case type(InnerType) of
- {primitive,bif} ->
- gen_prim_check_call(get_inner(InnerType),"DV","V",Type),
- emit({",",nl});
- {constructed,bif} ->
- emit([{asis,ensure_atom(list2name([SOF,Name]))},"(DV, V),",nl]);
- #'Externaltypereference'{type=T} ->
- emit([{asis,ensure_atom(list2name([T,check]))},"(DV,V),",nl]);
- 'ASN1_OPEN_TYPE' ->
- emit(["DV = V,",nl]);
- _ ->
- emit(["DV = V,",nl])
- end,
- emit({" ",{asis,NewName},"(DVs,Vs).",nl,nl}).
-
-gen_check_sequence(Name, []) ->
- emit([{asis,ensure_atom(Name)},"(_,_) ->",nl,
- " throw(badval).",nl,nl]);
-gen_check_sequence(Name,Components) ->
- emit([{asis,ensure_atom(Name)},"(DefaultValue,Value) ->",nl]),
- gen_check_sequence(Name,Components,1).
-
-gen_check_sequence(Name,[#'ComponentType'{name=N,typespec=Type}|Cs],Num) ->
- InnerType = get_inner(Type#type.def),
- NthDefV = ["element(",Num+1,",DefaultValue)"],
- NthV = ["element(",Num+1,",Value)"],
- gen_check_func_call(Name,Type,InnerType,NthDefV,NthV,N),
- case Cs of
- [] ->
- emit({".",nl,nl});
- _ ->
- emit({",",nl}),
- gen_check_sequence(Name,Cs,Num+1)
- end.
-
-gen_check_choice(Name,CList=[#'ComponentType'{}|_Cs]) ->
- emit([{asis,ensure_atom(Name)},"({Id,DefaultValue},{Id,Value}) ->",nl]),
- emit([" case Id of",nl]),
- gen_check_choice_components(Name,CList,1).
-
-gen_check_choice_components(_,[],_)->
- ok;
-gen_check_choice_components(Name,[#'ComponentType'{name=N,typespec=Type}|
- Cs],Num) ->
- Ind6 = " ",
- InnerType = get_inner(Type#type.def),
- emit({Ind6,"'",N,"' ->",nl,Ind6}),
- gen_check_func_call(Name,Type,InnerType,{var,"defaultValue"},
- {var,"value"},N),
- case Cs of
- [] ->
- emit({nl," end.",nl,nl});
- _ ->
- emit({";",nl}),
- gen_check_choice_components(Name,Cs,Num+1)
- end.
-
-gen_check_func_call(Name,Type,InnerType,DefVal,Val,N) ->
- case type(InnerType) of
- {primitive,bif} ->
- emit(" "),
- gen_prim_check_call(get_inner(InnerType),DefVal,Val,Type);
- #'Externaltypereference'{type=T} ->
- emit({" ",{asis,ensure_atom(list2name([T,check]))},"(",DefVal,",",Val,")"});
- 'ASN1_OPEN_TYPE' ->
- emit([" if",nl,
- " ",DefVal," == ",Val," -> true;",nl,
- " true -> throw({error,{asn1_open_type}})",nl,
- " end",nl]);
- {constructed,bif} ->
- emit([" ",{asis,ensure_atom(list2name([N,Name]))},"(",DefVal,",",Val,")"]);
- _ ->
- emit([" if",nl,
- " ",DefVal," == ",Val," -> true;",nl,
- " true -> throw({error,{asn1_open_type}})",nl,
- " end",nl])
- end.
-
-
%% VARIOUS GENERATOR STUFF
%% *************************************************
%%**************************************************
@@ -790,7 +649,9 @@ gen_decode_constructed(Erules,Typename,InnerType,D) when is_record(D,typedef) ->
pgen_exports(Erules,_Module,{Types,Values,_,_,Objects,ObjectSets}) ->
- emit(["-export([encoding_rule/0,bit_string_format/0]).",nl]),
+ emit(["-export([encoding_rule/0,bit_string_format/0,",nl,
+ " legacy_erlang_types/0]).",nl]),
+ emit(["-export([",{asis,?SUPPRESSION_FUNC},"/1]).",nl]),
case Types of
[] -> ok;
_ ->
@@ -1022,7 +883,9 @@ gen_info_functions(Erules) ->
emit(["encoding_rule() -> ",
{asis,Erules},".",nl,nl,
"bit_string_format() -> ",
- {asis,asn1ct:get_bit_string_format()},".",nl,nl]).
+ {asis,asn1ct:get_bit_string_format()},".",nl,nl,
+ "legacy_erlang_types() -> ",
+ {asis,asn1ct:use_legacy_types()},".",nl,nl]).
gen_decode_partial_incomplete(ber) ->
case {asn1ct:read_config_data(partial_incomplete_decode),
@@ -1074,9 +937,10 @@ gen_partial_inc_dispatcher() ->
ok;
{Data1,Data2} ->
% io:format("partial_incomplete_decode: ~p~ninc_type_pattern: ~p~n",[Data,Data2]),
- gen_partial_inc_dispatcher(Data1,Data2)
+ gen_partial_inc_dispatcher(Data1, Data2, "")
end.
-gen_partial_inc_dispatcher([{FuncName,TopType,_Pattern}|Rest],TypePattern) ->
+
+gen_partial_inc_dispatcher([{FuncName,TopType,_Pattern}|Rest], TypePattern, Sep) ->
TPattern =
case lists:keysearch(FuncName,1,TypePattern) of
{value,{_,TP}} -> TP;
@@ -1090,13 +954,13 @@ gen_partial_inc_dispatcher([{FuncName,TopType,_Pattern}|Rest],TypePattern) ->
_ ->
atom_to_list(TopType)
end,
- emit(["decode_partial_inc_disp('",TopTypeName,"',Data) ->",nl,
+ emit([Sep,
+ "decode_partial_inc_disp('",TopTypeName,"',Data) ->",nl,
" ",{asis,list_to_atom(lists:concat(["dec-inc-",FuncName2]))},
- "(Data);",nl]),
- gen_partial_inc_dispatcher(Rest,TypePattern);
-gen_partial_inc_dispatcher([],_) ->
- emit(["decode_partial_inc_disp(Type,_Data) ->",nl,
- " exit({error,{asn1,{undefined_type,Type}}}).",nl]).
+ "(Data)"]),
+ gen_partial_inc_dispatcher(Rest, TypePattern, ";\n");
+gen_partial_inc_dispatcher([], _, _) ->
+ emit([".",nl]).
gen_dispatcher([F1,F2|T],FuncName,Prefix,ExtraArg) ->
emit([FuncName,"('",F1,"',Data) -> '",Prefix,F1,"'(Data",ExtraArg,")",";",nl]),
@@ -1121,9 +985,23 @@ pgen_info() ->
open_hrl(OutFile,Module) ->
File = lists:concat([OutFile,".hrl"]),
- Fid = fopen(File),
- put(gen_file_out,Fid),
- gen_hrlhead(Module).
+ _ = open_output_file(File),
+ gen_hrlhead(Module),
+ Protector = hrl_protector(OutFile),
+ emit(["-ifndef(",Protector,").\n",
+ "-define(",Protector,", true).\n"
+ "\n"]).
+
+hrl_protector(OutFile) ->
+ BaseName = filename:basename(OutFile),
+ P = "_" ++ string:to_upper(BaseName) ++ "_HRL_",
+ [if
+ $A =< C, C =< $Z -> C;
+ $a =< C, C =< $a -> C;
+ $0 =< C, C =< $9 -> C;
+ true -> $_
+ end || C <- P].
+
%% EMIT functions ************************
%% ***************************************
@@ -1195,15 +1073,19 @@ call_args([A|As], Sep) ->
[Sep,do_emit(A)|call_args(As, ", ")];
call_args([], _) -> [].
-fopen(F) ->
+open_output_file(F) ->
case file:open(F, [write,raw,delayed_write]) of
- {ok, Fd} ->
+ {ok,Fd} ->
+ put(gen_file_out, Fd),
Fd;
{error, Reason} ->
io:format("** Can't open file ~p ~n", [F]),
exit({error,Reason})
end.
+close_output_file() ->
+ ok = file:close(erase(gen_file_out)).
+
pgen_hrl(Erules,Module,TypeOrVal,Options,_Indent) ->
put(currmod,Module),
{Types,Values,Ptypes,_,_,_} = TypeOrVal,
@@ -1226,8 +1108,9 @@ pgen_hrl(Erules,Module,TypeOrVal,Options,_Indent) ->
0 ->
0;
Y ->
- Fid = get(gen_file_out),
- file:close(Fid),
+ Protector = hrl_protector(get(outfile)),
+ emit(["-endif. %% ",Protector,"\n"]),
+ close_output_file(),
asn1ct:verbose("--~p--~n",
[{generated,lists:concat([get(outfile),".hrl"])}],
Options),
@@ -1345,15 +1228,23 @@ gen_record(TorPtype,Name,Type,Num) when is_record(Type,type) ->
emit({"}).",nl,nl}),
Tr ++ ExtensionList2;
{Rootl1,Extl,Rootl2} ->
+ case Rootl1 =/= [] andalso Extl++Rootl2 =/= [] of
+ true -> emit([com]);
+ false -> ok
+ end,
case Rootl1 of
- [] -> true;
- _ -> emit([",",nl])
+ [_|_] -> emit([nl]);
+ [] -> ok
end,
emit(["%% with extensions",nl]),
gen_record2(Name,'SEQUENCE',Extl,"",ext),
+ case Extl =/= [] andalso Rootl2 =/= [] of
+ true -> emit([com]);
+ false -> ok
+ end,
case Extl of
- [_H|_] when Rootl2 /= [] -> emit([",",nl]);
- _ -> ok
+ [_|_] -> emit([nl]);
+ [] -> ok
end,
emit(["%% end of extensions",nl]),
gen_record2(Name,'SEQUENCE',Rootl2,"",noext),
@@ -1443,171 +1334,6 @@ to_textual_order(Cs=[#'ComponentType'{textual_order=undefined}|_]) ->
to_textual_order(Cs) when is_list(Cs) ->
lists:keysort(#'ComponentType'.textual_order,Cs).
-
-gen_check_call(TopType,Cname,Type,InnerType,WhatKind,DefaultValue,Element) ->
- case WhatKind of
- {primitive,bif} ->
- gen_prim_check_call(InnerType,DefaultValue,Element,Type);
- #'Externaltypereference'{module=M,type=T} ->
- %% generate function call
- Name = list2name([T,check]),
- emit({"'",Name,"'(",DefaultValue,", ",Element,")"}),
- %% insert in ets table and do look ahead check
- Typedef = asn1_db:dbget(M,T),
- RefType = Typedef#typedef.typespec,
- InType = asn1ct_gen:get_inner(RefType#type.def),
- case insert_once(check_functions,{Name,RefType}) of
- true ->
- lookahead_innertype([T],InType,RefType);
- _ ->
- ok
- end;
- {constructed,bif} ->
- NameList = [Cname|TopType],
- Name = list2name(NameList ++ [check]),
- emit({"'",Name,"'(",DefaultValue,", ",Element,")"}),
- asn1ct_table:insert(check_functions, {Name, Type}),
- %% Must look for check functions in InnerType,
- %% that may be referenced or internal defined
- %% constructed types not used elsewhere.
- lookahead_innertype(NameList,InnerType,Type);
- _ ->
- %% Generate Dummy function call i.e. anything is accepted
- emit(["fun() -> true end ()"])
- end.
-
-gen_prim_check_call(PrimType, Default, Element, Type) ->
- case unify_if_string(PrimType) of
- 'BOOLEAN' ->
- check_call(check_bool, [Default,Element]);
- 'INTEGER' ->
- NNL = case Type#type.def of
- {_,NamedNumberList} -> NamedNumberList;
- _ -> []
- end,
- check_call(check_int, [Default,Element,{asis,NNL}]);
- 'BIT STRING' ->
- case Type#type.def of
- {_,[]} ->
- check_call(check_bitstring,
- [Default,Element]);
- {_,[_|_]=NBL} ->
- check_call(check_named_bitstring,
- [Default,Element,{asis,NBL}])
- end;
- 'OCTET STRING' ->
- check_call(check_octetstring, [Default,Element]);
- 'NULL' ->
- check_call(check_null, [Default,Element]);
- 'OBJECT IDENTIFIER' ->
- check_call(check_objectidentifier, [Default,Element]);
- 'RELATIVE-OID' ->
- check_call(check_objectidentifier, [Default,Element]);
- 'ObjectDescriptor' ->
- check_call(check_objectdescriptor, [Default,Element]);
- 'REAL' ->
- check_call(check_real, [Default,Element]);
- 'ENUMERATED' ->
- {_,Enumerations} = Type#type.def,
- check_call(check_enum, [Default,Element,{asis,Enumerations}]);
- restrictedstring ->
- check_call(check_restrictedstring, [Default,Element])
- end.
-
-check_call(F, Args) ->
- asn1ct_func:call(check, F, Args).
-
-%% lokahead_innertype/3 traverses Type and checks if check functions
-%% have to be generated, i.e. for all constructed or referenced types.
-lookahead_innertype(Name,'SEQUENCE',Type) ->
- Components = (Type#type.def)#'SEQUENCE'.components,
- lookahead_components(Name,Components);
-lookahead_innertype(Name,'SET',Type) ->
- Components = (Type#type.def)#'SET'.components,
- lookahead_components(Name,Components);
-lookahead_innertype(Name,'CHOICE',Type) ->
- {_,Components} = Type#type.def,
- lookahead_components(Name,Components);
-lookahead_innertype(Name,'SEQUENCE OF',SeqOf) ->
- lookahead_sof(Name,'SEQOF',SeqOf);
-lookahead_innertype(Name,'SET OF',SeqOf) ->
- lookahead_sof(Name,'SETOF',SeqOf);
-lookahead_innertype(_Name,#'Externaltypereference'{module=M,type=T},_) ->
- Typedef = asn1_db:dbget(M,T),
- RefType = Typedef#typedef.typespec,
- insert_once(check_functions,{list2name([T,check]),RefType}),
- InType = asn1ct_gen:get_inner(RefType#type.def),
- case type(InType) of
- {constructed,bif} ->
- lookahead_innertype([T],InType,RefType);
- Ref = #'Externaltypereference'{} ->
- lookahead_reference(Ref);
- _ ->
- ok
- end;
-lookahead_innertype(_,_,_) ->
- ok.
-
-lookahead_components(_,[]) -> ok;
-lookahead_components(Name,[C|Cs]) ->
- #'ComponentType'{name=Cname,typespec=Type} = C,
- InType = asn1ct_gen:get_inner(Type#type.def),
- case asn1ct_gen:type(InType) of
- {constructed,bif} ->
- case insert_once(check_functions,
- {list2name([Cname|Name] ++ [check]),Type}) of
- true ->
- lookahead_innertype([Cname|Name],InType,Type);
- _ ->
- ok
- end;
- #'Externaltypereference'{module=RefMod,type=RefName} ->
- Typedef = asn1_db:dbget(RefMod,RefName),
- RefType = Typedef#typedef.typespec,
- case insert_once(check_functions,{list2name([RefName,check]),
- RefType}) of
- true ->
- lookahead_innertype([RefName],InType,RefType);
- _ ->
- ok
- end;
- _ ->
- ok
- end,
- lookahead_components(Name,Cs).
-
-lookahead_sof(Name,SOF,SOFType) ->
- Type = case SOFType#type.def of
- {_,_Type} -> _Type;
- _Type -> _Type
- end,
- InnerType = asn1ct_gen:get_inner(Type#type.def),
- case asn1ct_gen:type(InnerType) of
- {constructed,bif} ->
- %% this is if a constructed type is defined in
- %% the SEQUENCE OF type
- NameList = [SOF|Name],
- insert_once(check_functions,
- {list2name(NameList ++ [check]),Type}),
- lookahead_innertype(NameList,InnerType,Type);
- Ref = #'Externaltypereference'{} ->
- lookahead_reference(Ref);
- _ ->
- ok
- end.
-
-lookahead_reference(#'Externaltypereference'{module=M,type=T}) ->
- Typedef = asn1_db:dbget(M,T),
- RefType = Typedef#typedef.typespec,
- InType = get_inner(RefType#type.def),
- case insert_once(check_functions,
- {list2name([T,check]),RefType}) of
- true ->
- lookahead_innertype([T],InType,RefType);
- _ ->
- ok
- end.
-
insert_once(Table,Object) ->
case asn1ct_table:lookup(Table, element(1, Object)) of
[] ->
@@ -1661,6 +1387,11 @@ conform_value(#type{def={'BIT STRING',[]}}, Bs) ->
bitstring when is_bitstring(Bs) ->
Bs
end;
+conform_value(#type{def='OCTET STRING'}, String) ->
+ case asn1ct:use_legacy_types() of
+ false -> String;
+ true -> binary_to_list(String)
+ end;
conform_value(_, Value) -> Value.
named_bitstring_value(List, Names) ->
@@ -1879,11 +1610,6 @@ get_constraint(C,Key) ->
{value,Cnstr} ->
Cnstr
end.
-
-ensure_atom(Atom) when is_atom(Atom) ->
- Atom;
-ensure_atom(List) when is_list(List) ->
- list_to_atom(List).
get_record_name_prefix() ->
case lists:keysearch(record_name_prefix,1,get(encoding_options)) of
diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
index de81259fcb..e51b0898be 100644
--- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
@@ -27,11 +27,12 @@
-export([decode_class/1, decode_type/1]).
-export([gen_encode/2,gen_encode/3,gen_decode/2,gen_decode/3]).
-export([gen_encode_prim/4]).
--export([gen_dec_prim/7]).
+-export([gen_dec_prim/3]).
-export([gen_objectset_code/2, gen_obj_code/3]).
-export([encode_tag_val/3]).
-export([gen_inc_decode/2,gen_decode_selected/3]).
-export([extaddgroup2sequence/1]).
+-export([dialyzer_suppressions/1]).
-import(asn1ct_gen, [emit/1,demit/1]).
@@ -65,6 +66,23 @@
%%===============================================================================
%%===============================================================================
+dialyzer_suppressions(_) ->
+ case asn1ct:use_legacy_types() of
+ false -> ok;
+ true -> suppress({ber,encode_bit_string,4})
+ end,
+ suppress({ber,decode_selective,2}),
+ emit([" ok.",nl]).
+
+suppress({M,F,A}=MFA) ->
+ case asn1ct_func:is_used(MFA) of
+ false ->
+ ok;
+ true ->
+ Args = [lists:concat(["element(",I,", Arg)"]) || I <- lists:seq(1, A)],
+ emit([" ",{call,M,F,Args},com,nl])
+ end.
+
%%===============================================================================
%% encode #{typedef, {pos, name, typespec}}
%%===============================================================================
@@ -163,6 +181,12 @@ gen_encode_user(Erules, #typedef{}=D, Wrapper) ->
gen_encode_prim(_Erules, #type{}=D, DoTag, Value) ->
BitStringConstraint = get_size_constraint(D#type.constraint),
+ MaxBitStrSize = case BitStringConstraint of
+ [] -> none;
+ {_,'MAX'} -> none;
+ {_,Max} -> Max;
+ Max when is_integer(Max) -> Max
+ end,
asn1ct_name:new(enumval),
Type = case D#type.def of
'OCTET STRING' -> restricted_string;
@@ -206,10 +230,32 @@ gen_encode_prim(_Erules, #type{}=D, DoTag, Value) ->
{call,ber,encode_tags,
[DoTag,{curr,realval},{curr,realsize}]},nl,
"end"]);
+ {'BIT STRING',[]} ->
+ case asn1ct:use_legacy_types() of
+ false when MaxBitStrSize =:= none ->
+ call(encode_unnamed_bit_string, [Value,DoTag]);
+ false ->
+ call(encode_unnamed_bit_string,
+ [{asis,MaxBitStrSize},Value,DoTag]);
+ true ->
+ call(encode_bit_string,
+ [{asis,BitStringConstraint},Value,
+ {asis,[]},DoTag])
+ end;
{'BIT STRING',NamedNumberList} ->
- call(encode_bit_string,
- [{asis,BitStringConstraint},Value,
- {asis,NamedNumberList},DoTag]);
+ case asn1ct:use_legacy_types() of
+ false when MaxBitStrSize =:= none ->
+ call(encode_named_bit_string,
+ [Value,{asis,NamedNumberList},DoTag]);
+ false ->
+ call(encode_named_bit_string,
+ [{asis,MaxBitStrSize},Value,
+ {asis,NamedNumberList},DoTag]);
+ true ->
+ call(encode_bit_string,
+ [{asis,BitStringConstraint},Value,
+ {asis,NamedNumberList},DoTag])
+ end;
'NULL' ->
call(encode_null, [Value,DoTag]);
'OBJECT IDENTIFIER' ->
@@ -232,14 +278,20 @@ emit_enc_enumerated_cases(L, Tags) ->
emit_enc_enumerated_cases(L, Tags, noext).
emit_enc_enumerated_cases([{EnumName,EnumVal}|T], Tags, Ext) ->
+ Bytes = encode_pos_integer(EnumVal, []),
+ Len = length(Bytes),
emit([{asis,EnumName}," -> ",
- {call,ber,encode_enumerated,[EnumVal,Tags]},";",nl]),
+ {call,ber,encode_tags,[Tags,{asis,Bytes},Len]},";",nl]),
emit_enc_enumerated_cases(T, Tags, Ext);
emit_enc_enumerated_cases([], _Tags, _Ext) ->
%% FIXME: Should extension be handled?
emit([{curr,enumval}," -> exit({error,{asn1, {enumerated_not_in_range,",{curr, enumval},"}}})"]),
emit([nl,"end"]).
+encode_pos_integer(0, [B|_Acc] = L) when B < 128 ->
+ L;
+encode_pos_integer(N, Acc) ->
+ encode_pos_integer(N bsr 8, [N band 255|Acc]).
%%===============================================================================
%%===============================================================================
@@ -317,15 +369,11 @@ gen_decode_selected_type(_Erules,TypeDef) ->
case asn1ct_gen:type(InnerType) of
'ASN1_OPEN_TYPE' ->
asn1ct_name:new(len),
- gen_dec_prim(ber, Def#type{def='ASN1_OPEN_TYPE'},
- BytesVar,Tag, [] ,
- ?PRIMITIVE,"OptOrMand");
-% emit({";",nl});
+ gen_dec_prim(Def#type{def='ASN1_OPEN_TYPE'},
+ BytesVar, Tag);
{primitive,bif} ->
asn1ct_name:new(len),
- gen_dec_prim(ber, Def, BytesVar,Tag,[] ,
- ?PRIMITIVE,"OptOrMand");
-% emit([";",nl]);
+ gen_dec_prim(Def, BytesVar, Tag);
{constructed,bif} ->
TopType = case TypeDef#typedef.name of
A when is_atom(A) -> [A];
@@ -439,14 +487,12 @@ gen_decode_user(Erules,D) when is_record(D,typedef) ->
case asn1ct_gen:type(InnerType) of
'ASN1_OPEN_TYPE' ->
asn1ct_name:new(len),
- gen_dec_prim(ber, Def#type{def='ASN1_OPEN_TYPE'},
- BytesVar,{string,"TagIn"}, [] ,
- ?PRIMITIVE,"OptOrMand"),
+ gen_dec_prim(Def#type{def='ASN1_OPEN_TYPE'},
+ BytesVar, {string,"TagIn"}),
emit({".",nl,nl});
{primitive,bif} ->
asn1ct_name:new(len),
- gen_dec_prim(ber, Def, BytesVar,{string,"TagIn"},[] ,
- ?PRIMITIVE,"OptOrMand"),
+ gen_dec_prim(Def, BytesVar, {string,"TagIn"}),
emit([".",nl,nl]);
{constructed,bif} ->
asn1ct:update_namelist(D#typedef.name),
@@ -459,19 +505,11 @@ gen_decode_user(Erules,D) when is_record(D,typedef) ->
end.
-gen_dec_prim(_Erules, Att, BytesVar, DoTag, _TagIn, _Form, _OptOrMand) ->
+gen_dec_prim(Att, BytesVar, DoTag) ->
Typename = Att#type.def,
-%% Currently not used for BER replaced with [] as place holder
-%% Constraint = Att#type.constraint,
-%% Constraint = [],
Constraint = get_size_constraint(Att#type.constraint),
IntConstr = int_constr(Att#type.constraint),
- AsBin = case get(binary_strings) of
- true -> "_as_bin";
- _ -> ""
- end,
NewTypeName = case Typename of
- 'OCTET STRING' -> restricted_string;
'NumericString' -> restricted_string;
'TeletexString' -> restricted_string;
'T61String' -> restricted_string;
@@ -484,85 +522,40 @@ gen_dec_prim(_Erules, Att, BytesVar, DoTag, _TagIn, _Form, _OptOrMand) ->
'ObjectDescriptor'-> restricted_string;
'UTCTime' -> restricted_string;
'GeneralizedTime' -> restricted_string;
+ 'OCTET STRING' ->
+ case asn1ct:use_legacy_types() of
+ true -> restricted_string;
+ false -> Typename
+ end;
_ -> Typename
end,
- case NewTypeName of
- 'BOOLEAN'->
- emit(["decode_boolean(",BytesVar,","]),
- need(decode_boolean, 2);
- 'INTEGER' ->
- case IntConstr of
- [] ->
- emit(["decode_integer(",BytesVar,","]),
- need(decode_integer, 2);
- {_,_} ->
- emit(["decode_integer(",BytesVar,",",
- {asis,IntConstr},","]),
- need(decode_integer, 3)
- end;
- {'INTEGER',NamedNumberList} ->
- case IntConstr of
- [] ->
- emit(["decode_named_integer(",BytesVar,",",
- {asis,NamedNumberList},","]),
- need(decode_named_integer, 3);
- {_,_} ->
- emit(["decode_named_integer(",BytesVar,",",
- {asis,IntConstr},",",
- {asis,NamedNumberList},","]),
- need(decode_named_integer, 4)
- end;
- {'ENUMERATED',NamedNumberList} ->
- emit(["decode_enumerated(",BytesVar,",",
- {asis,NamedNumberList},","]),
- need(decode_enumerated, 3);
- 'REAL' ->
- ok;
- {'BIT STRING',_NamedNumberList} ->
- ok;
- 'NULL' ->
- emit(["decode_null(",BytesVar,","]),
- need(decode_null, 2);
- 'OBJECT IDENTIFIER' ->
- emit(["decode_object_identifier(",BytesVar,","]),
- need(decode_object_identifier, 2);
- 'RELATIVE-OID' ->
- emit(["decode_relative_oid(",BytesVar,","]),
- need(decode_relative_oid, 2);
- restricted_string ->
- emit(["decode_restricted_string",AsBin,"(",BytesVar,","]),
- case Constraint of
- [] ->
- need(decode_restricted_string, 2);
- _ ->
- emit([{asis,Constraint},","]),
- need(decode_restricted_string, 3)
- end;
- 'UniversalString' ->
- emit(["decode_universal_string",AsBin,"(",
- BytesVar,",",{asis,Constraint},","]),
- need(decode_universal_string, 3);
- 'UTF8String' ->
- emit(["decode_UTF8_string",AsBin,"(",
- BytesVar,","]),
- need(decode_UTF8_string, 2);
- 'BMPString' ->
- emit(["decode_BMP_string",AsBin,"(",
- BytesVar,",",{asis,Constraint},","]),
- need(decode_BMP_string, 3);
- 'ASN1_OPEN_TYPE' ->
- emit(["decode_open_type_as_binary(",
- BytesVar,","]),
- need(decode_open_type_as_binary, 2)
- end,
-
TagStr = case DoTag of
{string,Tag1} -> Tag1;
_ when is_list(DoTag) -> {asis,DoTag}
end,
case NewTypeName of
- {'BIT STRING',NNL} ->
- gen_dec_bit_string(BytesVar, Constraint, NNL, TagStr);
+ 'BOOLEAN'->
+ call(decode_boolean, [BytesVar,TagStr]);
+ 'INTEGER' ->
+ check_constraint(decode_integer, [BytesVar,TagStr],
+ IntConstr,
+ identity,
+ identity);
+ {'INTEGER',NNL} ->
+ check_constraint(decode_integer,
+ [BytesVar,TagStr],
+ IntConstr,
+ identity,
+ fun(Val) ->
+ asn1ct_name:new(val),
+ emit([{curr,val}," = "]),
+ Val(),
+ emit([com,nl,
+ {call,ber,number2name,
+ [{curr,val},{asis,NNL}]}])
+ end);
+ {'ENUMERATED',NNL} ->
+ gen_dec_enumerated(BytesVar, NNL, TagStr);
'REAL' ->
asn1ct_name:new(tmpbuf),
emit(["begin",nl,
@@ -570,8 +563,36 @@ gen_dec_prim(_Erules, Att, BytesVar, DoTag, _TagIn, _Form, _OptOrMand) ->
{call,ber,match_tags,[BytesVar,TagStr]},com,nl,
{call,real_common,decode_real,[{curr,tmpbuf}]},nl,
"end",nl]);
- _ ->
- emit([TagStr,")"])
+ {'BIT STRING',NNL} ->
+ gen_dec_bit_string(BytesVar, Constraint, NNL, TagStr);
+ 'NULL' ->
+ call(decode_null, [BytesVar,TagStr]);
+ 'OBJECT IDENTIFIER' ->
+ call(decode_object_identifier, [BytesVar,TagStr]);
+ 'RELATIVE-OID' ->
+ call(decode_relative_oid, [BytesVar,TagStr]);
+ 'OCTET STRING' ->
+ check_constraint(decode_octet_string, [BytesVar,TagStr],
+ Constraint, {erlang,byte_size}, identity);
+ restricted_string ->
+ check_constraint(decode_restricted_string, [BytesVar,TagStr],
+ Constraint,
+ {erlang,byte_size},
+ fun(Val) ->
+ emit("binary_to_list("),
+ Val(),
+ emit(")")
+ end);
+ 'UniversalString' ->
+ check_constraint(decode_universal_string, [BytesVar,TagStr],
+ Constraint, {erlang,length}, identity);
+ 'UTF8String' ->
+ call(decode_UTF8_string, [BytesVar,TagStr]);
+ 'BMPString' ->
+ check_constraint(decode_BMP_string, [BytesVar,TagStr],
+ Constraint, {erlang,length}, identity);
+ 'ASN1_OPEN_TYPE' ->
+ call(decode_open_type_as_binary, [BytesVar,TagStr])
end.
%% Simplify an integer constraint so that we can efficiently test it.
@@ -587,7 +608,7 @@ int_constr(C) ->
[{'ValueRange',{_,_}=Range}] ->
Range;
[{'SingleValue',Sv}] ->
- {Sv,Sv};
+ Sv;
[] ->
[]
end.
@@ -598,16 +619,108 @@ gen_dec_bit_string(BytesVar, _Constraint, [_|_]=NNL, TagStr) ->
gen_dec_bit_string(BytesVar, Constraint, [], TagStr) ->
case asn1ct:get_bit_string_format() of
compact ->
- call(decode_compact_bit_string,
- [BytesVar,{asis,Constraint},TagStr]);
+ check_constraint(decode_compact_bit_string,
+ [BytesVar,TagStr],
+ Constraint,
+ {ber,compact_bit_string_size},
+ identity);
legacy ->
- call(decode_legacy_bit_string,
- [BytesVar,{asis,Constraint},TagStr]);
+ check_constraint(decode_native_bit_string,
+ [BytesVar,TagStr],
+ Constraint,
+ {erlang,bit_size},
+ fun(Val) ->
+ asn1ct_name:new(val),
+ emit([{curr,val}," = "]),
+ Val(),
+ emit([com,nl,
+ {call,ber,native_to_legacy_bit_string,
+ [{curr,val}]}])
+ end);
bitstring ->
- call(decode_native_bit_string,
- [BytesVar,{asis,Constraint},TagStr])
+ check_constraint(decode_native_bit_string,
+ [BytesVar,TagStr],
+ Constraint,
+ {erlang,bit_size},
+ identity)
+ end.
+
+check_constraint(F, Args, Constr, PreConstr0, ReturnVal0) ->
+ PreConstr = case PreConstr0 of
+ identity ->
+ fun(V) -> V end;
+ {Mod,Name} ->
+ fun(V) ->
+ asn1ct_name:new(c),
+ emit([{curr,c}," = ",
+ {call,Mod,Name,[V]},com,nl]),
+ {curr,c}
+ end
+ end,
+ ReturnVal = case ReturnVal0 of
+ identity -> fun(Val) -> Val() end;
+ _ -> ReturnVal0
+ end,
+ case Constr of
+ [] when ReturnVal0 =:= identity ->
+ %% No constraint, no complications.
+ call(F, Args);
+ [] ->
+ %% No constraint, but the return value could consist
+ %% of more than one statement.
+ emit(["begin",nl]),
+ ReturnVal(fun() -> call(F, Args) end),
+ emit([nl,
+ "end",nl]);
+ _ ->
+ %% There is a constraint.
+ asn1ct_name:new(val),
+ emit(["begin",nl,
+ {curr,val}," = ",{call,ber,F,Args},com,nl]),
+ PreVal0 = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ PreVal = PreConstr(PreVal0),
+ emit("if "),
+ case Constr of
+ {Min,Max} ->
+ emit([{asis,Min}," =< ",PreVal,", ",
+ PreVal," =< ",{asis,Max}]);
+ Sv when is_integer(Sv) ->
+ emit([PreVal," =:= ",{asis,Sv}])
+ end,
+ emit([" ->",nl]),
+ ReturnVal(fun() -> emit(PreVal0) end),
+ emit([";",nl,
+ "true ->",nl,
+ "exit({error,{asn1,bad_range}})",nl,
+ "end",nl,
+ "end"])
end.
+gen_dec_enumerated(BytesVar, NNL0, TagStr) ->
+ asn1ct_name:new(enum),
+ emit(["case ",
+ {call,ber,decode_integer,[BytesVar,TagStr]},
+ " of",nl]),
+ NNL = case NNL0 of
+ {L1,L2} ->
+ L1 ++ L2 ++ [accept];
+ [_|_] ->
+ NNL0 ++ [error]
+ end,
+ gen_dec_enumerated_1(NNL),
+ emit("end").
+
+gen_dec_enumerated_1([accept]) ->
+ asn1ct_name:new(default),
+ emit([{curr,default}," -> {asn1_enum,",{curr,default},"}",nl]);
+gen_dec_enumerated_1([error]) ->
+ asn1ct_name:new(default),
+ emit([{curr,default}," -> exit({error,{asn1,{illegal_enumerated,",
+ {curr,default},"}}})",nl]);
+gen_dec_enumerated_1([{V,K}|T]) ->
+ emit([{asis,K}," -> ",{asis,V},";",nl]),
+ gen_dec_enumerated_1(T).
+
%% Object code generating for encoding and decoding
%% ------------------------------------------------
@@ -952,9 +1065,8 @@ gen_decode_field_call(ObjName,FieldName,Bytes,Type) ->
Tag = [(decode_class(X#tag.class) bsl 10) + X#tag.number ||
X <- OTag],
case Type#typedef.name of
- {primitive,bif} -> %%tag should be the primitive tag
- gen_dec_prim(ber,Def,Bytes,Tag,"TagIn",?PRIMITIVE,
- opt_or_default),
+ {primitive,bif} ->
+ gen_dec_prim(Def, Bytes, Tag),
[];
{constructed,bif} ->
emit({" 'dec_",ObjName,'_',FieldName,
@@ -982,8 +1094,7 @@ gen_decode_default_call(ClassName,FieldName,Bytes,Type) ->
FieldName])),
typespec=Type}];
{primitive,bif} ->
- gen_dec_prim(ber,Type,Bytes,Tag,"TagIn",
- ?PRIMITIVE,opt_or_default),
+ gen_dec_prim(Type, Bytes, Tag),
[];
#'Externaltypereference'{module=CurrentMod,type=Etype} ->
emit([" 'dec_",Etype,"'(",Bytes, " ,",{asis,Tag},")",nl]),
@@ -1090,13 +1201,11 @@ gen_objset_enc(Erules, ObjSetName, UniqueName,
%% See X.681 Annex E for the following case
gen_objset_enc(_,ObjSetName,_UniqueName,['EXTENSIONMARK'],_ClName,
_ClFields,_NthObj,Acc) ->
- emit(["'getenc_",ObjSetName,"'(_) ->",nl]),
- emit({indent(3),"fun(_, Val, _RestPrimFieldName) ->",nl}),
- emit({indent(6),"Len = case Val of",nl,indent(9),
- "Bin when is_binary(Bin) -> byte_size(Bin);",nl,indent(9),
- "_ -> length(Val)",nl,indent(6),"end,"}),
- emit({indent(6),"{Val,Len}",nl}),
- emit({indent(3),"end.",nl,nl}),
+ emit(["'getenc_",ObjSetName,"'(_) ->",nl,
+ indent(2),"fun(_, Val, _RestPrimFieldName) ->",nl]),
+ emit_enc_open_type(4),
+ emit([nl,
+ indent(2),"end.",nl,nl]),
Acc;
gen_objset_enc(_, ObjSetName, UniqueName, [], _, _, _, Acc) ->
emit_default_getenc(ObjSetName, UniqueName),
@@ -1158,13 +1267,8 @@ gen_inlined_enc_funs1(Fields, [{typefield,Name,_}|Rest], ObjSetName,
%% were no type in the table and we therefore generate
%% code that returns the input for application
%% treatment.
- emit([indent(9),{asis,Name}," ->",nl,
- indent(12),"Len = case Val of",nl,
- indent(15),"Bin when is_binary(Bin) -> "
- "byte_size(Bin);",nl,
- indent(15),"_ -> length(Val)",nl,
- indent(12),"end,",nl,
- indent(12),"{Val,Len}"]),
+ emit([indent(9),{asis,Name}," ->",nl]),
+ emit_enc_open_type(11),
{Acc0,0}
end,
gen_inlined_enc_funs1(Fields, Rest, ObjSetName, Sep, NthObj+NAdd, Acc);
@@ -1175,6 +1279,25 @@ gen_inlined_enc_funs1(_, [], _, _, NthObj, Acc) ->
indent(3),"end"]),
{Acc,NthObj}.
+emit_enc_open_type(I) ->
+ Indent = indent(I),
+ S = [Indent, "case Val of",nl,
+ Indent,indent(2),"{asn1_OPENTYPE,Bin} when is_binary(Bin) ->",nl,
+ Indent,indent(4),"{Bin,byte_size(Bin)}"|
+ case asn1ct:use_legacy_types() of
+ false ->
+ [nl,
+ Indent,"end"];
+ true ->
+ [";",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) ->",nl,
+ Indent,indent(4),"{Bin,byte_size(Bin)};",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),"{Val,length(Val)}",nl,
+ Indent, "end"]
+ end],
+ emit(S).
+
emit_inner_of_fun(TDef=#typedef{name={ExtMod,Name},typespec=Type},
InternalDefFunName) ->
OTag = Type#type.tag,
@@ -1258,14 +1381,9 @@ gen_objset_dec(_,ObjSetName,_UniqueName,['EXTENSIONMARK'],_ClName,
_ClFields,_NthObj) ->
emit(["'getdec_",ObjSetName,"'(_) ->",nl]),
emit([indent(2),"fun(_,Bytes, _RestPrimFieldName) ->",nl]),
-
- emit([indent(4),"case Bytes of",nl,
- indent(6),"Bin when is_binary(Bin) -> ",nl,
- indent(8),"Bin;",nl,
- indent(6),"_ ->",nl,
- indent(8),{call,ber,ber_encode,["Bytes"]},nl,
- indent(4),"end",nl]),
- emit([indent(2),"end.",nl,nl]),
+ emit_dec_open_type(4),
+ emit([nl,
+ indent(2),"end.",nl,nl]),
ok;
gen_objset_dec(_, ObjSetName, UniqueName, [], _, _, _) ->
emit_default_getdec(ObjSetName, UniqueName),
@@ -1312,12 +1430,8 @@ gen_inlined_dec_funs1(Fields, [{typefield,Name,Prop}|Rest],
end,
0;
false ->
- emit([indent(9),{asis,Name}," ->",nl,
- indent(12),"Len = case Bytes of",nl,
- indent(15),"B when is_binary(B) -> byte_size(B);",nl,
- indent(15),"_ -> length(Bytes)",nl,
- indent(12),"end,",nl,
- indent(12),"{Bytes,[],Len}"]),
+ emit([indent(9),{asis,Name}," ->",nl]),
+ emit_dec_open_type(11),
0
end,
gen_inlined_dec_funs1(Fields, Rest, ObjSetName, Sep, NthObj+N);
@@ -1328,7 +1442,28 @@ gen_inlined_dec_funs1(_, [], _, _, NthObj) ->
indent(3),"end"]),
NthObj.
-emit_inner_of_decfun(#typedef{name={ExtName,Name},typespec=Type},Prop,
+emit_dec_open_type(I) ->
+ Indent = indent(I),
+ S = case asn1ct:use_legacy_types() of
+ false ->
+ [Indent, "case Bytes of",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) -> ",nl,
+ Indent,indent(4),"{asn1_OPENTYPE,Bin};",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),"{asn1_OPENTYPE,",
+ {call,ber,ber_encode,["Bytes"]},"}",nl,
+ Indent, "end"];
+ true ->
+ [Indent, "case Bytes of",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) -> ",nl,
+ Indent,indent(4),"Bin;",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),{call,ber,ber_encode,["Bytes"]},nl,
+ Indent, "end"]
+ end,
+ emit(S).
+
+emit_inner_of_decfun(#typedef{name={ExtName,Name},typespec=Type}, _Prop,
InternalDefFunName) ->
OTag = Type#type.tag,
%% Tag = [X#tag{class=decode_class(X#tag.class)}|| X <- OTag],
@@ -1336,8 +1471,7 @@ emit_inner_of_decfun(#typedef{name={ExtName,Name},typespec=Type},Prop,
case {ExtName,Name} of
{primitive,bif} ->
emit(indent(12)),
- gen_dec_prim(ber,Type,"Bytes",Tag,"TagIn",
- ?PRIMITIVE,Prop),
+ gen_dec_prim(Type, "Bytes", Tag),
0;
{constructed,bif} ->
emit([indent(12),"'dec_",
@@ -1354,7 +1488,7 @@ emit_inner_of_decfun(#typedef{name={ExtName,Name},typespec=Type},Prop,
emit_inner_of_decfun(#typedef{name=Name},_Prop,_) ->
emit([indent(12),"'dec_",Name,"'(Bytes)"]),
0;
-emit_inner_of_decfun(Type,Prop,_) when is_record(Type,type) ->
+emit_inner_of_decfun(#type{}=Type, _Prop, _) ->
OTag = Type#type.tag,
%% Tag = [X#tag{class=decode_class(X#tag.class)}|| X <- OTag],
Tag = [(decode_class(X#tag.class) bsl 10) + X#tag.number || X <- OTag],
@@ -1365,8 +1499,7 @@ emit_inner_of_decfun(Type,Prop,_) when is_record(Type,type) ->
case WhatKind of
{primitive,bif} ->
emit([indent(9),Def," ->",nl,indent(12)]),
- gen_dec_prim(ber,Type,"Bytes",Tag,"TagIn",
- ?PRIMITIVE,Prop);
+ gen_dec_prim(Type, "Bytes", Tag);
#'Externaltypereference'{module=CurrMod,type=T} ->
emit([indent(9),T," ->",nl,indent(12),"'dec_",T,
% "'(Bytes, ",Prop,")"]);
@@ -1503,6 +1636,3 @@ extaddgroup2sequence(ExtList) when is_list(ExtList) ->
call(F, Args) ->
asn1ct_func:call(ber, F, Args).
-
-need(F, Arity) ->
- asn1ct_func:need({ber,F,Arity}).
diff --git a/lib/asn1/src/asn1ct_gen_check.erl b/lib/asn1/src/asn1ct_gen_check.erl
new file mode 100644
index 0000000000..d80a02dfbf
--- /dev/null
+++ b/lib/asn1/src/asn1ct_gen_check.erl
@@ -0,0 +1,271 @@
+%% vim: tabstop=8:shiftwidth=4
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(asn1ct_gen_check).
+-export([emit/3]).
+
+-import(asn1ct_gen, [emit/1]).
+-include("asn1_records.hrl").
+
+emit(Type, Default, Value) ->
+ Key = {Type,Default},
+ Gen = fun(Fd, Name) ->
+ file:write(Fd, gen(Name, Type, Default))
+ end,
+ emit(" case "),
+ asn1ct_func:call_gen("is_default_", Key, Gen, [Value]),
+ emit([" of",nl,
+ "true -> {[],0};",nl,
+ "false ->",nl]).
+
+gen(Name, #type{def=T}, Default) ->
+ NameStr = atom_to_list(Name),
+ [NameStr,"(asn1_DEFAULT) ->\n",
+ "true;\n"|case do_gen(T, Default) of
+ {literal,Literal} ->
+ [NameStr,"(",term2str(Literal),") ->\n","true;\n",
+ NameStr,"(_) ->\n","false.\n\n"];
+ {exception,Func,Args} ->
+ [NameStr,"(Value) ->\n",
+ "try ",Func,"(Value",arg2str(Args),") of\n",
+ "_ -> true\n"
+ "catch throw:false -> false\n"
+ "end.\n\n"]
+ end].
+
+do_gen(_, asn1_NOVALUE) ->
+ {literal,asn1_NOVALUE};
+do_gen(#'Externaltypereference'{module=M,type=T}, Default) ->
+ #typedef{typespec=#type{def=Td}} = asn1_db:dbget(M, T),
+ do_gen(Td, Default);
+do_gen('BOOLEAN', Default) ->
+ {literal,Default};
+do_gen({'BIT STRING',[]}, Default) ->
+ true = is_bitstring(Default), %Assertion.
+ case asn1ct:use_legacy_types() of
+ false ->
+ {literal,Default};
+ true ->
+ {exception,need(check_legacy_bitstring, 2),[Default]}
+ end;
+do_gen({'BIT STRING',[_|_]=NBL}, Default) ->
+ do_named_bitstring(NBL, Default);
+do_gen({'ENUMERATED',_}, Default) ->
+ {literal,Default};
+do_gen('INTEGER', Default) ->
+ {literal,Default};
+do_gen({'INTEGER',NNL}, Default) ->
+ {exception,need(check_int, 3),[Default,NNL]};
+do_gen('NULL', Default) ->
+ {literal,Default};
+do_gen('OCTET STRING', Default) ->
+ true = is_binary(Default), %Assertion.
+ case asn1ct:use_legacy_types() of
+ false ->
+ {literal,Default};
+ true ->
+ {exception,need(check_octetstring, 2),[Default]}
+ end;
+do_gen('OBJECT IDENTIFIER', Default0) ->
+ Default = pre_process_oid(Default0),
+ {exception,need(check_objectidentifier, 2),[Default]};
+do_gen({'CHOICE',Cs}, Default) ->
+ {Tag,Value} = Default,
+ [Type] = [Type || #'ComponentType'{name=T,typespec=Type} <- Cs,
+ T =:= Tag],
+ case do_gen(Type#type.def, Value) of
+ {literal,Lit} ->
+ {literal,{Tag,Lit}};
+ {exception,Func0,Args} ->
+ Key = {Tag,Func0,Args},
+ Gen = fun(Fd, Name) ->
+ S = gen_choice(Name, Tag, Func0, Args),
+ ok = file:write(Fd, S)
+ end,
+ Func = asn1ct_func:call_gen("is_default_choice", Key, Gen),
+ {exception,atom_to_list(Func),[]}
+ end;
+do_gen(#'SEQUENCE'{components=Cs}, Default) ->
+ do_seq_set(Cs, Default);
+do_gen({'SEQUENCE OF',Type}, Default) ->
+ do_sof(Type, Default);
+do_gen(#'SET'{components=Cs}, Default) ->
+ do_seq_set(Cs, Default);
+do_gen({'SET OF',Type}, Default) ->
+ do_sof(Type, Default);
+do_gen(Type, Default) ->
+ case asn1ct_gen:unify_if_string(Type) of
+ restrictedstring ->
+ {exception,need(check_restrictedstring, 2),[Default]};
+ _ ->
+ %% Open type. Do our best.
+ {literal,Default}
+ end.
+
+do_named_bitstring(NBL, Default0) when is_list(Default0) ->
+ Default = lists:sort(Default0),
+ Bs = asn1ct_gen:named_bitstring_value(Default, NBL),
+ Func = case asn1ct:use_legacy_types() of
+ false -> check_named_bitstring;
+ true -> check_legacy_named_bitstring
+ end,
+ {exception,need(Func, 4),[Default,Bs,bit_size(Bs)]};
+do_named_bitstring(_, Default) when is_bitstring(Default) ->
+ Func = case asn1ct:use_legacy_types() of
+ false -> check_named_bitstring;
+ true -> check_legacy_named_bitstring
+ end,
+ {exception,need(Func, 3),[Default,bit_size(Default)]}.
+
+do_seq_set(Cs0, Default) ->
+ Tag = element(1, Default),
+ Cs1 = [T || #'ComponentType'{typespec=T} <- Cs0],
+ Cs = components(Cs1, tl(tuple_to_list(Default))),
+ case are_all_literals(Cs) of
+ true ->
+ Literal = list_to_tuple([Tag|[L || {literal,L} <- Cs]]),
+ {literal,Literal};
+ false ->
+ Key = {Cs,Default},
+ Gen = fun(Fd, Name) ->
+ S = gen_components(Name, Tag, Cs),
+ ok = file:write(Fd, S)
+ end,
+ Func = asn1ct_func:call_gen("is_default_cs_", Key, Gen),
+ {exception,atom_to_list(Func),[]}
+ end.
+
+do_sof(Type, Default0) ->
+ Default = lists:sort(Default0),
+ Cs0 = lists:duplicate(length(Default), Type),
+ Cs = components(Cs0, Default),
+ case are_all_literals(Cs) of
+ true ->
+ Literal = [Lit || {literal,Lit} <- Cs],
+ {exception,need(check_literal_sof, 2),[Literal]};
+ false ->
+ Key = Cs,
+ Gen = fun(Fd, Name) ->
+ S = gen_sof(Name, Cs),
+ ok = file:write(Fd, S)
+ end,
+ Func = asn1ct_func:call_gen("is_default_sof", Key, Gen),
+ {exception,atom_to_list(Func),[]}
+ end.
+
+are_all_literals([{literal,_}|T]) ->
+ are_all_literals(T);
+are_all_literals([_|_]) ->
+ false;
+are_all_literals([]) -> true.
+
+gen_components(Name, Tag, Cs) ->
+ [atom_to_list(Name),"(Value) ->\n",
+ "case Value of\n",
+ "{",term2str(Tag)|gen_cs_1(Cs, 1, [])].
+
+gen_cs_1([{literal,Lit}|T], I, Acc) ->
+ [",\n",term2str(Lit)|gen_cs_1(T, I, Acc)];
+gen_cs_1([H|T], I, Acc) ->
+ Var = "E"++integer_to_list(I),
+ [",\n",Var|gen_cs_1(T, I+1, [{Var,H}|Acc])];
+gen_cs_1([], _, Acc) ->
+ ["} ->\n"|gen_cs_2(Acc, "")].
+
+gen_cs_2([{Var,{exception,Func,Args}}|T], Sep) ->
+ [Sep,Func,"(",Var,arg2str(Args),")"|gen_cs_2(T, ",\n")];
+gen_cs_2([], _) ->
+ [";\n",
+ "_ ->\n"
+ "throw(false)\n"
+ "end.\n"].
+
+gen_sof(Name, Cs) ->
+ [atom_to_list(Name),"(Value) ->\n",
+ "case length(Value) of\n",
+ integer_to_list(length(Cs))," -> ok;\n"
+ "_ -> throw(false)\n"
+ "end,\n"
+ "T0 = lists:sort(Value)"|gen_sof_1(Cs, 1)].
+
+gen_sof_1([{exception,Func,Args}|Cs], I) ->
+ NumStr = integer_to_list(I),
+ H = "H" ++ NumStr,
+ T = "T" ++ NumStr,
+ Prev = "T" ++ integer_to_list(I-1),
+ [",\n",
+ "[",H,case Cs of
+ [] -> [];
+ [_|_] -> ["|",T]
+ end,"] = ",Prev,",\n",
+ Func,"(",H,arg2str(Args),")"|gen_sof_1(Cs, I+1)];
+gen_sof_1([], _) ->
+ ".\n".
+
+components([#type{def=Def}|Ts], [V|Vs]) ->
+ [do_gen(Def, V)|components(Ts, Vs)];
+components([], []) -> [].
+
+gen_choice(Name, Tag, Func, Args) ->
+ NameStr = atom_to_list(Name),
+ [NameStr,"({",term2str(Tag),",Value}) ->\n"
+ " ",Func,"(Value",arg2str(Args),");\n",
+ NameStr,"(_) ->\n"
+ " throw(false).\n"].
+
+pre_process_oid(Oid) ->
+ Reserved = reserved_oid(),
+ pre_process_oid(tuple_to_list(Oid), Reserved, []).
+
+pre_process_oid([H|T]=Tail, Res0, Acc) ->
+ case lists:keyfind(H, 2, Res0) of
+ false ->
+ {lists:reverse(Acc),Tail};
+ {Names0,H,Res} ->
+ Names = case is_list(Names0) of
+ false -> [Names0];
+ true -> Names0
+ end,
+ Keys = [H|Names],
+ pre_process_oid(T, Res, [Keys|Acc])
+ end.
+
+reserved_oid() ->
+ [{['itu-t',ccitt],0,
+ [{recommendation,0,[]},
+ {question,1,[]},
+ {administration,2,[]},
+ {'network-operator',3,[]},
+ {'identified-organization',4,[]}]},
+ {iso,1,[{standard,0,[]},
+ {'member-body',2,[]},
+ {'identified-organization',3,[]}]},
+ {['joint-iso-itu-t','joint-iso-ccitt'],2,[]}].
+
+arg2str(Args) ->
+ [", "++term2str(Arg) || Arg <- Args].
+
+term2str(T) ->
+ io_lib:format("~w", [T]).
+
+need(F, A) ->
+ asn1ct_func:need({check,F,A}),
+ atom_to_list(F).
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl
index 8b999ddbf0..39cc0536f8 100644
--- a/lib/asn1/src/asn1ct_gen_per.erl
+++ b/lib/asn1/src/asn1ct_gen_per.erl
@@ -32,6 +32,7 @@
-export([gen_encode/2, gen_encode/3]).
-export([gen_dec_external/2]).
-export([extaddgroup2sequence/1]).
+-export([dialyzer_suppressions/1]).
-import(asn1ct_gen, [emit/1,demit/1]).
-import(asn1ct_func, [call/3]).
@@ -40,6 +41,15 @@
%% Generate ENCODING ******************************
%%****************************************x
+dialyzer_suppressions(Erules) ->
+ case asn1ct_func:is_used({Erules,complete,1}) of
+ false ->
+ ok;
+ true ->
+ emit([" _ = complete(Arg),",nl])
+ end,
+ emit([" ok.",nl]).
+
gen_encode(Erules,Type) when is_record(Type,typedef) ->
gen_encode_user(Erules,Type).
@@ -99,7 +109,7 @@ gen_encode_user(Erules,D) when is_record(D,typedef) ->
gen_encode_prim(Erules, D) ->
- Value = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value = {var,atom_to_list(asn1ct_gen:mk_var(asn1ct_name:curr(val)))},
gen_encode_prim(Erules, D, Value).
gen_encode_prim(Erules, #type{}=D, Value) ->
@@ -132,7 +142,14 @@ gen_encode_prim_imm(Val, #type{def=Type0,constraint=Constraint}, Aligned) ->
ToBinary = {real_common,encode_real},
asn1ct_imm:per_enc_restricted_string(Val, ToBinary, Aligned);
{'BIT STRING',NNL} ->
- asn1ct_imm:per_enc_bit_string(Val, NNL, Constraint, Aligned);
+ case asn1ct:use_legacy_types() of
+ false ->
+ asn1ct_imm:per_enc_bit_string(Val, NNL,
+ Constraint, Aligned);
+ true ->
+ asn1ct_imm:per_enc_legacy_bit_string(Val, NNL,
+ Constraint, Aligned)
+ end;
'NULL' ->
asn1ct_imm:per_enc_null(Val, Aligned);
'OBJECT IDENTIFIER' ->
@@ -144,15 +161,21 @@ gen_encode_prim_imm(Val, #type{def=Type0,constraint=Constraint}, Aligned) ->
'BOOLEAN' ->
asn1ct_imm:per_enc_boolean(Val, Aligned);
'OCTET STRING' ->
- asn1ct_imm:per_enc_octet_string(Val, Constraint, Aligned);
+ case asn1ct:use_legacy_types() of
+ false ->
+ asn1ct_imm:per_enc_octet_string(Val, Constraint, Aligned);
+ true ->
+ asn1ct_imm:per_enc_legacy_octet_string(Val, Constraint,
+ Aligned)
+ end;
'ASN1_OPEN_TYPE' ->
case Constraint of
[#'Externaltypereference'{type=Tname}] ->
EncFunc = enc_func(Tname),
- Imm = [{apply,EncFunc,[{expr,Val}]}],
+ Imm = [{apply,{local,EncFunc,[]},[Val]}],
asn1ct_imm:per_enc_open_type(Imm, Aligned);
[] ->
- Imm = [{call,erlang,iolist_to_binary,[{expr,Val}]}],
+ Imm = [{call,erlang,iolist_to_binary,[Val]}],
asn1ct_imm:per_enc_open_type(Imm, Aligned)
end
end.
@@ -325,7 +348,10 @@ gen_dec_imm_1('GeneralizedTime', Constraint, Aligned) ->
gen_dec_imm_1('OCTET STRING', Constraint, Aligned) ->
SzConstr = asn1ct_imm:effective_constraint(bitstring, Constraint),
Imm = asn1ct_imm:per_dec_octet_string(SzConstr, Aligned),
- {convert,binary_to_list,Imm};
+ case asn1ct:use_legacy_types() of
+ false -> {convert,{binary,copy},Imm};
+ true -> {convert,binary_to_list,Imm}
+ end;
gen_dec_imm_1('TeletexString', _Constraint, Aligned) ->
gen_dec_restricted_string(Aligned);
gen_dec_imm_1('T61String', _Constraint, Aligned) ->
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl
index 047156fc10..bdd14871d1 100644
--- a/lib/asn1/src/asn1ct_imm.erl
+++ b/lib/asn1/src/asn1ct_imm.erl
@@ -26,17 +26,19 @@
per_dec_octet_string/2,per_dec_open_type/1,per_dec_real/1,
per_dec_restricted_string/1]).
-export([per_dec_constrained/3,per_dec_normally_small_number/1]).
--export([per_enc_bit_string/4,per_enc_boolean/2,
+-export([per_enc_bit_string/4,per_enc_legacy_bit_string/4,
+ per_enc_boolean/2,
per_enc_choice/3,per_enc_enumerated/3,
per_enc_integer/3,per_enc_integer/4,
per_enc_null/2,
per_enc_k_m_string/4,per_enc_octet_string/3,
+ per_enc_legacy_octet_string/3,
per_enc_open_type/2,
per_enc_restricted_string/3,
per_enc_small_number/2]).
-export([per_enc_extension_bit/2,per_enc_extensions/4,per_enc_optional/3]).
-export([per_enc_sof/5]).
--export([enc_absent/3,enc_append/1,enc_bind_var/1]).
+-export([enc_absent/3,enc_append/1,enc_element/2]).
-export([enc_cg/2]).
-export([optimize_alignment/1,optimize_alignment/2,
dec_slim_cg/2,dec_code_gen/2]).
@@ -80,15 +82,8 @@ per_dec_enumerated(NamedList0, Aligned) ->
Ub = length(NamedList0) - 1,
Constraint = [{'ValueRange',{0,Ub}}],
Int = per_dec_integer(Constraint, Aligned),
- EnumTail = case matched_range(Int) of
- {0,Ub} ->
- %% The error case can never happen.
- [];
- _ ->
- [enum_error]
- end,
- NamedList = per_dec_enumerated_fix_list(NamedList0, EnumTail, 0),
- {map,Int,NamedList}.
+ NamedList = per_dec_enumerated_fix_list(NamedList0, [enum_error], 0),
+ {map,Int,opt_map(NamedList, Int)}.
per_dec_enumerated(BaseNamedList, NamedListExt0, Aligned) ->
Base = per_dec_enumerated(BaseNamedList, Aligned),
@@ -122,7 +117,7 @@ per_dec_length(no, AllowZero, Aligned) ->
per_dec_named_integer(Constraint, NamedList0, Aligned) ->
Int = per_dec_integer(Constraint, Aligned),
NamedList = [{K,V} || {V,K} <- NamedList0] ++ [integer_default],
- {map,Int,NamedList}.
+ {map,Int,opt_map(NamedList, Int)}.
per_dec_k_m_string(StringType, Constraint, Aligned) ->
SzConstr = effective_constraint(bitstring, Constraint),
@@ -157,7 +152,37 @@ per_dec_restricted_string(Aligned) ->
%%% Encoding.
%%%
-per_enc_bit_string(Val0, [], Constraint0, Aligned) ->
+per_enc_bit_string(Val, [], Constraint0, Aligned) ->
+ {B,[[],Bits]} = mk_vars([], [bits]),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ B ++ [{call,erlang,bit_size,[Val],Bits}|
+ per_enc_length(Val, 1, Bits, Constraint, Aligned, 'BIT STRING')];
+per_enc_bit_string(Val0, NNL0, Constraint0, Aligned) ->
+ {B,[Val,Bs,Bits,Positions]} = mk_vars(Val0, [bs,bits,positions]),
+ NNL = lists:keysort(2, NNL0),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ ExtraArgs = case constr_min_size(Constraint) of
+ no -> [];
+ Lb -> [Lb]
+ end,
+ ToBs = case ExtraArgs of
+ [] ->
+ {call,per_common,bs_drop_trailing_zeroes,[Val]};
+ [0] ->
+ {call,per_common,bs_drop_trailing_zeroes,[Val]};
+ [Lower] ->
+ {call,per_common,adjust_trailing_zeroes,[Val,Lower]}
+ end,
+ B ++ [{'try',
+ [bit_string_name2pos_fun(NNL, Val)],
+ {Positions,
+ [{call,per_common,bitstring_from_positions,
+ [Positions|ExtraArgs]}]},
+ [ToBs],Bs},
+ {call,erlang,bit_size,[Bs],Bits}|
+ per_enc_length(Bs, 1, Bits, Constraint, Aligned, 'BIT STRING')].
+
+per_enc_legacy_bit_string(Val0, [], Constraint0, Aligned) ->
{B,[Val,Bs,Bits]} = mk_vars(Val0, [bs,bits]),
Constraint = effective_constraint(bitstring, Constraint0),
ExtraArgs = case constr_min_size(Constraint) of
@@ -167,12 +192,13 @@ per_enc_bit_string(Val0, [], Constraint0, Aligned) ->
B ++ [{call,per_common,to_bitstring,[Val|ExtraArgs],Bs},
{call,erlang,bit_size,[Bs],Bits}|
per_enc_length(Bs, 1, Bits, Constraint, Aligned, 'BIT STRING')];
-per_enc_bit_string(Val0, NNL0, Constraint0, Aligned) ->
+per_enc_legacy_bit_string(Val0, NNL0, Constraint0, Aligned) ->
{B,[Val,Bs,Bits,Positions]} = mk_vars(Val0, [bs,bits,positions]),
NNL = lists:keysort(2, NNL0),
Constraint = effective_constraint(bitstring, Constraint0),
ExtraArgs = case constr_min_size(Constraint) of
no -> [];
+ 0 -> [];
Lb -> [Lb]
end,
B ++ [{'try',
@@ -235,10 +261,6 @@ per_enc_k_m_string(Val0, StringType, Constraint, Aligned) ->
SzConstraint = effective_constraint(bitstring, Constraint),
Unit = string_num_bits(StringType, Constraint, Aligned),
Chars0 = char_tab(Constraint, StringType, Unit),
- Args = case enc_char_tab(Chars0) of
- notab -> [Val,Unit];
- Chars -> [Val,Unit,Chars]
- end,
Enc = case Unit of
16 ->
{call,per_common,encode_chars_16bit,[Val],Bin};
@@ -247,7 +269,15 @@ per_enc_k_m_string(Val0, StringType, Constraint, Aligned) ->
8 ->
{call,erlang,list_to_binary,[Val],Bin};
_ ->
- {call,per_common,encode_chars,Args,Bin}
+ case enc_char_tab(Chars0) of
+ notab ->
+ {call,per_common,encode_chars,[Val,Unit],Bin};
+ {tab,Tab} ->
+ {call,per_common,encode_chars,[Val,Unit,Tab],Bin};
+ {compact_map,Map} ->
+ {call,per_common,encode_chars_compact_map,
+ [Val,Unit,Map],Bin}
+ end
end,
case Unit of
8 ->
@@ -256,35 +286,33 @@ per_enc_k_m_string(Val0, StringType, Constraint, Aligned) ->
B ++ [{call,erlang,length,[Val],Len},Enc]
end ++ per_enc_length(Bin, Unit, Len, SzConstraint, Aligned, k_m_string).
-per_enc_open_type([], Aligned) ->
- [{put_bits,1,8,unit(1, Aligned)},{put_bits,0,8,[1]}];
-per_enc_open_type([{'cond',
- [['_',
- {put_bits,0,0,_},
- {call,per_common,encode_unconstrained_number,_}=Call]]}],
- Aligned) ->
- %% We KNOW that encode_unconstrained_number/1 will return an IO list;
- %% therefore the call to complete/1 can be replaced with a cheaper
- %% call to iolist_to_binary/1.
- {Dst,Imm} = per_enc_open_type_output([Call], []),
- ToBin = {erlang,iolist_to_binary},
- Imm ++ per_enc_open_type(Dst, ToBin, Aligned);
-per_enc_open_type([{call,erlang,iolist_to_binary,Args}], Aligned) ->
- {_,[_,Bin,Len]} = mk_vars('dummy', [bin,len]),
- [{call,erlang,iolist_to_binary,Args,Bin},
- {call,erlang,byte_size,[Bin],Len}|per_enc_length(Bin, 8, Len, Aligned)];
per_enc_open_type(Imm0, Aligned) ->
- try
- {Prefix,Imm1} = split_off_nonbuilding(Imm0),
- Prefix ++ enc_open_type(Imm1, Aligned)
- catch
- throw:impossible ->
- {Dst,Imm} = per_enc_open_type_output(Imm0, []),
- ToBin = {enc_mod(Aligned),complete},
- Imm ++ per_enc_open_type(Dst, ToBin, Aligned)
- end.
+ Imm = case Aligned of
+ true ->
+ %% Temporarily make the implicit 'align' done by
+ %% complete/1 explicit to facilitate later
+ %% optimizations: the absence of 'align' can be used
+ %% as an indication that complete/1 can be replaced
+ %% with a cheaper operation such as
+ %% iolist_to_binary/1. The redundant 'align' will be
+ %% optimized away later.
+ Imm0 ++ [{put_bits,0,0,[1,align]}];
+ false ->
+ Imm0
+ end,
+ {[],[[],Val,Len,Bin]} = mk_vars([], [output,len,bin]),
+ [{list,Imm,Val},
+ {call,enc_mod(Aligned),complete,[Val],Bin},
+ {call,erlang,byte_size,[Bin],Len}|
+ per_enc_length(Bin, 8, Len, Aligned)].
+
+per_enc_octet_string(Bin, Constraint0, Aligned) ->
+ {B,[[],Len]} = mk_vars([], [len]),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ B ++ [{call,erlang,byte_size,[Bin],Len}|
+ per_enc_length(Bin, 8, Len, Constraint, Aligned, 'OCTET STRING')].
-per_enc_octet_string(Val0, Constraint0, Aligned) ->
+per_enc_legacy_octet_string(Val0, Constraint0, Aligned) ->
{B,[Val,Bin,Len]} = mk_vars(Val0, [bin,len]),
Constraint = effective_constraint(bitstring, Constraint0),
B ++ [{call,erlang,iolist_to_binary,[Val],Bin},
@@ -316,28 +344,27 @@ per_enc_extensions(Val0, Pos0, NumBits, Aligned) when NumBits > 0 ->
_ -> [{put_bits,Bitmap,NumBits,[1]}]
end,
B++[{call,per_common,extension_bitmap,[Val,Pos,Pos+NumBits],Bitmap},
- {'cond',[[{eq,Bitmap,0}],
- ['_'|Length ++ PutBits]],{var,"Extensions"}}].
+ {list,[{'cond',[[{eq,Bitmap,0}],
+ ['_'|Length ++ PutBits]]}],
+ {var,"Extensions"}}].
per_enc_optional(Val0, {Pos,DefVals}, _Aligned) when is_integer(Pos),
is_list(DefVals) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val]} = mk_vars(Val1, []),
+ {B,Val} = enc_element(Pos, Val0),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{'cond',
[[{eq,Val,DefVal},Zero] || DefVal <- DefVals] ++ [['_',One]]}];
per_enc_optional(Val0, {Pos,{call,M,F,A}}, _Aligned) when is_integer(Pos) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val,Tmp]} = mk_vars(Val1, [tmp]),
+ {B,Val} = enc_element(Pos, Val0),
+ {[],[[],Tmp]} = mk_vars([], [tmp]),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{call,M,F,[Val|A],Tmp},
{'cond',
[[{eq,Tmp,true},Zero],['_',One]]}];
per_enc_optional(Val0, Pos, _Aligned) when is_integer(Pos) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val]} = mk_vars(Val1, []),
+ {B,Val} = enc_element(Pos, Val0),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{'cond',[[{eq,Val,asn1_NOVALUE},Zero],
@@ -391,20 +418,22 @@ enc_append([H|T]) ->
[{block,H}|enc_append(T)];
enc_append([]) -> [].
-enc_bind_var(Val) ->
- {B,[{var,Var}]} = mk_vars(Val, []),
- {B,list_to_atom(Var)}.
+enc_element(N, Val0) ->
+ {[],[Val,Dst]} = mk_vars(Val0, [element]),
+ {[{call,erlang,element,[N,Val],Dst}],Dst}.
enc_cg(Imm0, false) ->
Imm1 = enc_cse(Imm0),
- Imm = enc_pre_cg(Imm1),
+ Imm2 = enc_pre_cg(Imm1),
+ Imm = enc_opt(Imm2),
enc_cg(Imm);
enc_cg(Imm0, true) ->
Imm1 = enc_cse(Imm0),
Imm2 = enc_hoist_align(Imm1),
Imm3 = enc_opt_al(Imm2),
Imm4 = per_fixup(Imm3),
- Imm = enc_pre_cg(Imm4),
+ Imm5 = enc_pre_cg(Imm4),
+ Imm = enc_opt(Imm5),
enc_cg(Imm).
%%%
@@ -552,14 +581,42 @@ per_num_bits(N) when N =< 64 -> 6;
per_num_bits(N) when N =< 128 -> 7;
per_num_bits(N) when N =< 255 -> 8.
+opt_map(Map, Imm) ->
+ case matched_range(Imm) of
+ unknown -> Map;
+ {Lb,Ub} -> opt_map_1(Map, Lb, Ub)
+ end.
+
+opt_map_1([{I,_}=Pair|T], Lb, Ub) ->
+ if
+ I =:= Lb, I =< Ub ->
+ [Pair|opt_map_1(T, Lb+1, Ub)];
+ Lb < I, I =< Ub ->
+ [Pair|opt_map_1(T, Lb, Ub)];
+ true ->
+ opt_map_1(T, Lb, Ub)
+ end;
+opt_map_1(Map, Lb, Ub) ->
+ if
+ Lb =< Ub ->
+ Map;
+ true ->
+ []
+ end.
+
matched_range({get_bits,Bits0,[U|Flags]}) when is_integer(U) ->
- case lists:member(signed, Flags) of
- false ->
+ case not lists:member(signed, Flags) andalso is_integer(Bits0) of
+ true ->
Bits = U*Bits0,
{0,(1 bsl Bits) - 1};
- true ->
+ false ->
unknown
end;
+matched_range({add,Imm,Add}) ->
+ case matched_range(Imm) of
+ unknown -> unknown;
+ {Lb,Ub} -> {Lb+Add,Ub+Add}
+ end;
matched_range(_Op) -> unknown.
string_num_bits(StringType, Constraint, Aligned) ->
@@ -881,6 +938,9 @@ dcg_list_outside([{call,Fun,{V,Buf},{Dst,DstBuf}}|T]) ->
emit(["{",Dst,",",DstBuf,"} = "]),
Fun(V, Buf),
iter_dcg_list_outside(T);
+dcg_list_outside([{convert,{M,F},V,Dst}|T]) ->
+ emit([Dst," = ",{asis,M},":",{asis,F},"(",V,")"]),
+ iter_dcg_list_outside(T);
dcg_list_outside([{convert,Op,V,Dst}|T]) ->
emit([Dst," = ",Op,"(",V,")"]),
iter_dcg_list_outside(T);
@@ -972,11 +1032,11 @@ mk_dest(S) -> S.
split_off_nonbuilding(Imm) ->
lists:splitwith(fun is_nonbuilding/1, Imm).
-is_nonbuilding({apply,_,_,_}) -> true;
is_nonbuilding({assign,_,_}) -> true;
is_nonbuilding({call,_,_,_,_}) -> true;
-is_nonbuilding({'cond',_,_}) -> true;
is_nonbuilding({lc,_,_,_,_}) -> true;
+is_nonbuilding({set,_,_}) -> true;
+is_nonbuilding({list,_,_}) -> true;
is_nonbuilding({sub,_,_,_}) -> true;
is_nonbuilding({'try',_,_,_,_}) -> true;
is_nonbuilding(_) -> false.
@@ -986,17 +1046,13 @@ mk_vars(Input0, Temps) ->
Curr = asn1ct_name:curr(enc),
[H|T] = atom_to_list(Curr),
Base = [H - ($a - $A)|T ++ "@"],
- if
- is_atom(Input0) ->
- Input = {var,atom_to_list(Input0)},
- {[],[Input|mk_vars_1(Base, Temps)]};
- is_integer(Input0) ->
+ case Input0 of
+ {var,Name} when is_list(Name) ->
{[],[Input0|mk_vars_1(Base, Temps)]};
- Input0 =:= [] ->
+ [] ->
{[],[Input0|mk_vars_1(Base, Temps)]};
- true ->
- Input = mk_var(Base, input),
- {[{assign,Input,Input0}],[Input|mk_vars_1(Base, Temps)]}
+ _ when is_integer(Input0) ->
+ {[],[Input0|mk_vars_1(Base, Temps)]}
end.
mk_vars_1(Base, Vars) ->
@@ -1143,8 +1199,15 @@ per_enc_length(Bin, Unit, Len, {Lb,Ub}, Aligned, Type)
U = unit(Unit, Aligned, Type, Lb*Unit, Ub*Unit),
PutBits = [{put_bits,Bin,binary,U}],
build_length_cond(Prefix, [[Check|PutLen++PutBits]]);
-per_enc_length(Bin, Unit, Len, Sv, Aligned, Type) when is_integer(Sv) ->
- NumBits = Sv*Unit,
+per_enc_length(Bin, Unit0, Len, Sv, Aligned, Type) when is_integer(Sv) ->
+ NumBits = Sv*Unit0,
+ Unit = case NumBits rem 8 of
+ 0 ->
+ %% Help out the alignment optimizer.
+ 8;
+ _ ->
+ Unit0
+ end,
U = unit(Unit, Aligned, Type, NumBits, NumBits),
Pb = {put_bits,Bin,binary,U},
[{'cond',[[{eq,Len,Sv},Pb]]}].
@@ -1254,6 +1317,8 @@ eval_cond_1({eq,[],[]}) ->
true;
eval_cond_1({eq,I,N}) when is_integer(I), is_integer(N) ->
I =:= N;
+eval_cond_1({ge,I,N}) when is_integer(I), is_integer(N) ->
+ I >= N;
eval_cond_1({lt,I,N}) when is_integer(I), is_integer(N) ->
I < N;
eval_cond_1(_) -> maybe.
@@ -1268,9 +1333,15 @@ prepend_to_cond_1([Check|T], Code) ->
enc_char_tab(notab) ->
notab;
enc_char_tab(Tab0) ->
- Tab = tuple_to_list(Tab0),
- First = hd(Tab),
- {First-1,list_to_tuple(enc_char_tab_1(Tab, First, 0))}.
+ Tab1 = tuple_to_list(Tab0),
+ First = hd(Tab1),
+ Tab = enc_char_tab_1(Tab1, First, 0),
+ case lists:member(ill, Tab) of
+ false ->
+ {compact_map,{First,tuple_size(Tab0)}};
+ true ->
+ {tab,{First-1,list_to_tuple(Tab)}}
+ end.
enc_char_tab_1([H|T], H, I) ->
[I|enc_char_tab_1(T, H+1, I+1)];
@@ -1358,58 +1429,6 @@ opt_choice_2([_|_], _) ->
throw(impossible);
opt_choice_2([], _) -> [].
-
-%%%
-%%% Helper functions for code generation of open types.
-%%%
-
-per_enc_open_type(Val0, {ToBinMod,ToBinFunc}, Aligned) ->
- {B,[Val,Len,Bin]} = mk_vars(Val0, [len,bin]),
- B ++ [{call,ToBinMod,ToBinFunc,[Val],Bin},
- {call,erlang,byte_size,[Bin],Len}|
- per_enc_length(Bin, 8, Len, Aligned)].
-
-enc_open_type([{'cond',Cs}], Aligned) ->
- [{'cond',[[C|enc_open_type_1(Act, Aligned)] || [C|Act] <- Cs]}];
-enc_open_type(_, _) ->
- throw(impossible).
-
-enc_open_type_1([{error,_}]=Imm, _) ->
- Imm;
-enc_open_type_1(Imm, Aligned) ->
- NumBits = num_bits(Imm, 0),
- Pad = case 8 - (NumBits rem 8) of
- 8 -> [];
- Pad0 -> [{put_bits,0,Pad0,[1]}]
- end,
- NumBytes = (NumBits+7) div 8,
- enc_length(NumBytes, no, Aligned) ++ Imm ++ Pad.
-
-num_bits([{put_bits,_,N,[U|_]}|T], Sum) when is_integer(N) ->
- num_bits(T, Sum+N*U);
-num_bits([_|_], _) ->
- throw(impossible);
-num_bits([], Sum) -> Sum.
-
-per_enc_open_type_output([{apply,F,A}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{apply,F,A,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([{call,M,F,A}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{call,M,F,A,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([{'cond',Cs}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{'cond',Cs,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([H|T], Acc) ->
- per_enc_open_type_output(T, [H|Acc]).
-
-output_var() ->
- asn1ct_name:new(enc),
- Curr = asn1ct_name:curr(enc),
- [H|T] = atom_to_list(Curr),
- list_to_atom([H - ($a - $A)|T ++ "@output"]).
-
-
%%%
%%% Optimize list comprehensions (SEQUENCE OF/SET OF).
%%%
@@ -1587,16 +1606,16 @@ collect_put_bits(Imm) ->
%%% the same element twice.
%%%
-enc_cse([{assign,{var,V},E}=H|T]) ->
- [H|enc_cse_1(T, E, V)];
+enc_cse([{call,erlang,element,Args,V}=H|T]) ->
+ [H|enc_cse_1(T, Args, V)];
enc_cse(Imm) -> Imm.
-enc_cse_1([{assign,Dst,E}|T], E, V) ->
- [{assign,Dst,V}|enc_cse_1(T, E, V)];
-enc_cse_1([{block,Bl}|T], E, V) ->
- [{block,enc_cse_1(Bl, E, V)}|enc_cse_1(T, E, V)];
-enc_cse_1([H|T], E, V) ->
- [H|enc_cse_1(T, E, V)];
+enc_cse_1([{call,erlang,element,Args,Dst}|T], Args, V) ->
+ [{set,V,Dst}|enc_cse_1(T, Args, V)];
+enc_cse_1([{block,Bl}|T], Args, V) ->
+ [{block,enc_cse_1(Bl, Args, V)}|enc_cse_1(T, Args, V)];
+enc_cse_1([H|T], Args, V) ->
+ [H|enc_cse_1(T, Args, V)];
enc_cse_1([], _, _) -> [].
@@ -1637,7 +1656,7 @@ enc_pre_cg_2({block,Bl0}, StL, StB) ->
enc_pre_cg_1(Bl0, StL, StB);
enc_pre_cg_2({call,_,_,_}=Imm, _, _) ->
Imm;
-enc_pre_cg_2({call_gen,_,_,_,_}=Imm, _, _) ->
+enc_pre_cg_2({call_gen,_,_,_,_,_}=Imm, _, _) ->
Imm;
enc_pre_cg_2({'cond',Cs0}, StL, _StB) ->
Cs = [{C,enc_pre_cg_1(Act, StL, outside_seq)} || [C|Act] <- Cs0],
@@ -1662,18 +1681,22 @@ enc_pre_cg_2({var,_}=Imm, _, _) -> Imm.
enc_make_cons({binary,H}, {binary,T}) ->
{binary,H++T};
enc_make_cons({binary,H0}, {cons,{binary,H1},T}) ->
- {cons,{binary,H0++H1},T};
+ enc_make_cons({binary,H0++H1}, T);
+enc_make_cons({binary,H}, {cons,{integer,Int},T}) ->
+ enc_make_cons({binary,H++[{put_bits,Int,8,[1]}]}, T);
enc_make_cons({integer,Int}, {binary,T}) ->
{binary,[{put_bits,Int,8,[1]}|T]};
+enc_make_cons({integer,Int}, {cons,{binary,H},T}) ->
+ enc_make_cons({binary,[{put_bits,Int,8,[1]}|H]}, T);
enc_make_cons(H, T) ->
{cons,H,T}.
-enc_pre_cg_nonbuilding({'cond',Cs0,Dst}, StL) ->
- Cs = [{C,enc_pre_cg_1(Act, StL, outside_seq)} || [C|Act] <- Cs0],
- {'cond',Cs,Dst};
enc_pre_cg_nonbuilding({lc,B0,Var,List,Dst}, StL) ->
B = enc_pre_cg_1(B0, StL, outside_seq),
{lc,B,Var,List,Dst};
+enc_pre_cg_nonbuilding({list,List0,Dst}, _StL) ->
+ List = enc_pre_cg_1(List0, outside_list, outside_seq),
+ {list,List,Dst};
enc_pre_cg_nonbuilding({'try',Try0,{P,Succ0},Else0,Dst}, StL) ->
Try = enc_pre_cg_1(Try0, StL, outside_seq),
Succ = enc_pre_cg_1(Succ0, StL, outside_seq),
@@ -1681,6 +1704,562 @@ enc_pre_cg_nonbuilding({'try',Try0,{P,Succ0},Else0,Dst}, StL) ->
{'try',Try,{P,Succ},Else,Dst};
enc_pre_cg_nonbuilding(Imm, _) -> Imm.
+%%%
+%%% Optimize calls to complete/1 and surrounding code. There are
+%%% several opportunities for optimizations.
+%%%
+%%% It may be possible to replace the call to complete/1 with
+%%% something cheaper (most important for the PER back-end which has
+%%% an expensive complete/1 implementation). If we can be sure that
+%%% complete/1 will be called with an iolist (no 'align' atoms or
+%%% bitstrings in the list), we can call iolist_to_binary/1
+%%% instead. If the list may include bitstrings, we can can call
+%%% list_to_bitstring/1 (note that list_to_bitstring/1 does not accept
+%%% a binary or bitstring, so we MUST be sure that we only pass it a
+%%% list). If complete/1 is called with a binary, we can omit the
+%%% call altogether.
+%%%
+%%% A call to byte_size/1 that follows complete/1 can be eliminated
+%%% if the size of the binary produced by complete/1 can be determined
+%%% and is constant.
+%%%
+%%% The code that encodes the length descriptor (a 'cond' instruction)
+%%% for a binary produced by complete/1 can be simplified if the lower
+%%% and upper bounds for the size of the binary are known.
+%%%
+
+-record(ost,
+ {sym,
+ t
+ }).
+
+enc_opt(Imm0) ->
+ {Imm,_} = enc_opt(Imm0, #ost{sym=gb_trees:empty()}),
+ Imm.
+
+enc_opt(align, St) ->
+ {align,St#ost{t=t_align({0,7})}};
+enc_opt({apply,What,As}, St) ->
+ {{apply,What,subst_list(As, St)},St#ost{t=t_any()}};
+enc_opt({assign,_,_}=Imm, St) ->
+ {Imm,St};
+enc_opt({binary,PutBits0}, St) ->
+ PutBits = [{put_bits,subst(V, St),Sz,F} ||
+ {put_bits,V,Sz,F} <- PutBits0],
+ NumBits = lists:foldl(fun({put_bits,_,Bits,_}, Sum) ->
+ Sum+Bits
+ end, 0, PutBits),
+ {{binary,PutBits},St#ost{t=t_bitstring(NumBits)}};
+enc_opt({block,Bl0}, St0) ->
+ {Bl,St} = enc_opt(Bl0, St0),
+ {{block,Bl},St};
+enc_opt({call,binary,encode_unsigned,[Int],Bin}=Imm, St0) ->
+ Type = get_type(Int, St0),
+ St = case t_range(Type) of
+ any ->
+ set_type(Bin, t_binary(), St0);
+ {Lb0,Ub0} ->
+ Lb = bit_size(binary:encode_unsigned(Lb0)),
+ Ub = bit_size(binary:encode_unsigned(Ub0)),
+ set_type(Bin, t_binary({Lb,Ub}), St0)
+ end,
+ {Imm,St};
+enc_opt({call,erlang,bit_size,[Bin],Dst}=Imm0, St0) ->
+ Type = get_type(Bin, St0),
+ case t_range(Type) of
+ any ->
+ St1 = set_type(Bin, t_bitstring(), St0),
+ St = propagate(Dst,
+ fun(T, S) ->
+ bit_size_propagate(Bin, T, S)
+ end, St1),
+ {Imm0,St};
+ {Lb,Ub}=Range ->
+ St = set_type(Dst, t_integer(Range), St0),
+ Imm = case Lb of
+ Ub -> none;
+ _ -> Imm0
+ end,
+ {Imm,St}
+ end;
+enc_opt({call,erlang,byte_size,[Bin],Dst}=Imm0, St0) ->
+ Type = get_type(Bin, St0),
+ case t_range(Type) of
+ any ->
+ St1 = set_type(Bin, t_binary(), St0),
+ St = propagate(Dst,
+ fun(T, S) ->
+ byte_size_propagate(Bin, T, S)
+ end, St1),
+ {Imm0,St};
+ {Lb0,Ub0} ->
+ Lb = (Lb0+7) div 8,
+ Ub = (Ub0+7) div 8,
+ St = set_type(Dst, t_integer({Lb,Ub}), St0),
+ Imm = case Lb of
+ Ub -> none;
+ _ -> Imm0
+ end,
+ {Imm,St}
+ end;
+enc_opt({call,erlang,iolist_to_binary,_}=Imm, St) ->
+ {Imm,St#ost{t=t_binary()}};
+enc_opt({call,erlang,length,[List],Dst}=Imm0, St0) ->
+ St1 = propagate(Dst,
+ fun(T, S) ->
+ length_propagate(List, T, S)
+ end, St0),
+ {Imm0,St1};
+enc_opt({call,per,complete,[Data],Dst}, St0) ->
+ Type = get_type(Data, St0),
+ St = set_type(Dst, t_binary(t_range(Type)), St0),
+ case t_type(Type) of
+ binary ->
+ {{set,Data,Dst},St};
+ bitlist ->
+ %% We KNOW that list_to_bitstring/1 will construct
+ %% a binary (the number of bits is divisible by 8)
+ %% because per_enc_open_type/2 added an 'align' atom
+ %% at the end. If that 'align' atom had not been
+ %% optimized away, the type would have been 'align'
+ %% instead of 'bitlist'.
+ {{call,erlang,list_to_bitstring,[Data],Dst},St};
+ iolist ->
+ {{call,erlang,iolist_to_binary,[Data],Dst},St};
+ nil ->
+ Imm = {list,{binary,[{put_bits,0,8,[1]}]},Dst},
+ enc_opt(Imm, St0);
+ _ ->
+ {{call,per,complete,[Data],Dst},St}
+ end;
+enc_opt({call,uper,complete,[Data],Dst}, St0) ->
+ Type = get_type(Data, St0),
+ St = set_type(Dst, t_binary(t_range(Type)), St0),
+ case t_type(Type) of
+ binary ->
+ {{set,Data,Dst},St0};
+ iolist ->
+ {{call,erlang,iolist_to_binary,[Data],Dst},St};
+ nil ->
+ Imm = {list,{binary,[{put_bits,0,8,[1]}]},Dst},
+ enc_opt(Imm, St0);
+ _ ->
+ %% 'bitlist' or 'any'.
+ {{call,uper,complete,[Data],Dst},St}
+ end;
+enc_opt({call,per_common,encode_chars,[List,NumBits|_],Dst}=Imm, St0) ->
+ %% Note: Never used when NumBits =:= 8 (list_to_binary/1 will
+ %% be used instead).
+ St1 = set_type(Dst, t_bitstring(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, NumBits, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_chars_16bit,[List],Dst}=Imm, St0) ->
+ St1 = set_type(Dst, t_binary(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, 16, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_big_chars,[List],Dst}=Imm, St0) ->
+ St1 = set_type(Dst, t_binary(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, 32, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_fragmented,[_,Unit]}=Imm, St) ->
+ T = case Unit rem 8 of
+ 0 -> t_iolist();
+ _ -> t_bitlist()
+ end,
+ {Imm,St#ost{t=T}};
+enc_opt({call,per_common,encode_unconstrained_number,_}=Imm, St) ->
+ {Imm,St#ost{t=t_iolist()}};
+enc_opt({call,per_common,bitstring_from_positions,_}=Imm, St) ->
+ {Imm,St#ost{t=t_bitstring()}};
+enc_opt({call,per_common,to_named_bitstring,_}=Imm, St) ->
+ {Imm,St#ost{t=t_bitstring()}};
+enc_opt({call,_,_,_}=Imm, St) ->
+ {Imm,St#ost{t=t_any()}};
+enc_opt({call,_,_,_,_}=Imm, St) ->
+ {Imm,St#ost{t=undefined}};
+enc_opt({call_gen,N,K,F,L,As}, St) ->
+ {{call_gen,N,K,F,L,subst(As, St)},St#ost{t=t_any()}};
+enc_opt({'cond',Cs0}, St0) ->
+ case enc_opt_cs(Cs0, St0) of
+ [{'_',Imm,Type}] ->
+ {Imm,St0#ost{t=Type}};
+ [{Cond,Imm,Type0}|Cs1] ->
+ {Cs,Type} = enc_opt_cond_1(Cs1, Type0, [{Cond,Imm}]),
+ {{'cond',Cs},St0#ost{t=Type}}
+ end;
+enc_opt({cons,H0,T0}, St0) ->
+ {H,#ost{t=TypeH}=St1} = enc_opt(H0, St0),
+ {T,#ost{t=TypeT}=St} = enc_opt(T0, St1),
+ {{cons,H,T},St#ost{t=t_cons(TypeH, TypeT)}};
+enc_opt({error,_}=Imm, St) ->
+ {Imm,St#ost{t=t_any()}};
+enc_opt({integer,V}, St) ->
+ {{integer,subst(V, St)},St#ost{t=t_integer()}};
+enc_opt({lc,E0,B,C}, St) ->
+ {E,_} = enc_opt(E0, St),
+ {{lc,E,B,C},St#ost{t=t_any()}};
+enc_opt({lc,E0,B,C,Dst}, St) ->
+ {E,_} = enc_opt(E0, St),
+ {{lc,E,B,C,Dst},St#ost{t=undefined}};
+enc_opt({list,Imm0,Dst}, St0) ->
+ {Imm,#ost{t=Type}=St1} = enc_opt(Imm0, St0),
+ St = set_type(Dst, Type, St1),
+ {{list,Imm,Dst},St#ost{t=undefined}};
+enc_opt(nil, St) ->
+ {nil,St#ost{t=t_nil()}};
+enc_opt({seq,H0,T0}, St0) ->
+ {H,St1} = enc_opt(H0, St0),
+ {T,St} = enc_opt(T0, St1),
+ case {H,T} of
+ {none,_} ->
+ {T,St};
+ {{list,Imm,Data},
+ {seq,{call,per,complete,[Data],_},_}} ->
+ %% Get rid of any explicit 'align' added by per_enc_open_type/2.
+ {{seq,{list,remove_trailing_align(Imm),Data},T},St};
+ {_,_} ->
+ {{seq,H,T},St}
+ end;
+enc_opt({set,_,_}=Imm, St) ->
+ {Imm,St#ost{t=undefined}};
+enc_opt({sub,Src0,Int,Dst}, St0) ->
+ Src = subst(Src0, St0),
+ Type = get_type(Src, St0),
+ St = case t_range(Type) of
+ any ->
+ propagate(Dst,
+ fun(T, S) ->
+ set_type(Src, t_add(T, Int), S)
+ end,
+ St0);
+ {Lb,Ub} ->
+ set_type(Dst, t_integer({Lb-Int,Ub-Int}), St0)
+ end,
+ {{sub,Src,Int,Dst},St#ost{t=undefined}};
+enc_opt({'try',Try0,{P,Succ0},Else0,Dst}, St0) ->
+ {Try,_} = enc_opt(Try0, St0),
+ {Succ,_} = enc_opt(Succ0, St0),
+ {Else,_} = enc_opt(Else0, St0),
+ {{'try',Try,{P,Succ},Else,Dst},St0#ost{t=undefined}};
+enc_opt({var,_}=Imm, St) ->
+ Type = get_type(Imm, St),
+ {subst(Imm, St),St#ost{t=Type}}.
+
+remove_trailing_align({block,Bl}) ->
+ {block,remove_trailing_align(Bl)};
+remove_trailing_align({cons,H,{cons,align,nil}}) ->
+ H;
+remove_trailing_align({seq,H,T}) ->
+ {seq,H,remove_trailing_align(T)};
+remove_trailing_align(Imm) -> Imm.
+
+bit_size_propagate(Bin, Type, St) ->
+ case t_range(Type) of
+ any ->
+ St;
+ {Lb,Ub} ->
+ set_type(Bin, t_bitstring({Lb,Ub}), St)
+ end.
+
+byte_size_propagate(Bin, Type, St) ->
+ case t_range(Type) of
+ any ->
+ St;
+ {Lb,Ub} ->
+ set_type(Bin, t_binary({Lb*8,Ub*8}), St)
+ end.
+
+char_propagate(Dst, T, NumBits, St) ->
+ case t_range(T) of
+ any ->
+ St;
+ {Sz,Sz} when Sz*NumBits rem 8 =:= 0 ->
+ Bits = Sz*NumBits,
+ set_type(Dst, t_binary({Bits,Bits}), St);
+ {Lb,Ub} ->
+ Range = {Lb*NumBits,Ub*NumBits},
+ case NumBits rem 8 of
+ 0 ->
+ set_type(Dst, t_binary(Range), St);
+ _ ->
+ set_type(Dst, t_bitstring(Range), St)
+ end
+ end.
+
+length_propagate(List, Type, St) ->
+ set_type(List, t_list(t_range(Type)), St).
+
+enc_opt_cond_1([{Cond,{error,_}=Imm,_}|T], St, Acc) ->
+ enc_opt_cond_1(T, St, [{Cond,Imm}|Acc]);
+enc_opt_cond_1([{Cond,Imm,Curr0}|T], Curr1, Acc) ->
+ Curr = t_join(Curr0, Curr1),
+ enc_opt_cond_1(T, Curr, [{Cond,Imm}|Acc]);
+enc_opt_cond_1([], St, Acc) ->
+ {lists:reverse(Acc),St}.
+
+enc_opt_cs([{Cond,Imm0}|T], St0) ->
+ case eo_eval_cond(Cond, St0) of
+ false ->
+ enc_opt_cs(T, St0);
+ true ->
+ {Imm,#ost{t=Type}} = enc_opt(Imm0, St0),
+ [{'_',Imm,Type}];
+ maybe ->
+ St = update_type_info(Cond, St0),
+ {Imm,#ost{t=Type}} = enc_opt(Imm0, St),
+ [{Cond,Imm,Type}|enc_opt_cs(T, St0)]
+ end;
+enc_opt_cs([], _) -> [].
+
+eo_eval_cond('_', _) ->
+ true;
+eo_eval_cond({Op,{var,_}=Var,Val}, St) ->
+ Type = get_type(Var, St),
+ case t_range(Type) of
+ any -> maybe;
+ {_,_}=Range -> eval_cond_range(Op, Range, Val)
+ end;
+eo_eval_cond({_Op,{expr,_},_Val}, _St) -> maybe.
+
+eval_cond_range(lt, {Lb,Ub}, Val) ->
+ if
+ Ub < Val -> true;
+ Val =< Lb -> false;
+ true -> maybe
+ end;
+eval_cond_range(_Op, _Range, _Val) -> maybe.
+
+update_type_info({ult,{var,_}=Var,Val}, St) ->
+ Int = t_integer({0,Val-1}),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({lt,{var,_}=Var,Val}, St) ->
+ Int = t_integer({0,Val-1}),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({eq,{var,_}=Var,Val}, St) when is_integer(Val) ->
+ Int = t_integer(Val),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({eq,_,_}, St) ->
+ St;
+update_type_info({ge,_,_}, St) -> St.
+
+subst_list(As, St) ->
+ [subst(A, St) || A <- As].
+
+subst({var,_}=Var, St) ->
+ Type = get_type(Var, St),
+ case t_type(Type) of
+ integer ->
+ case t_range(Type) of
+ any -> Var;
+ {Val,Val} -> Val;
+ {_,_} -> Var
+ end;
+ _ ->
+ Var
+ end;
+subst(V, _St) -> V.
+
+set_type({var,Var}, {_,_}=Type, #ost{sym=Sym0}=St0) ->
+ Sym1 = gb_trees:enter(Var, Type, Sym0),
+ case gb_trees:lookup({propagate,Var}, Sym1) of
+ none ->
+ St0#ost{sym=Sym1};
+ {value,Propagate} ->
+ Sym = gb_trees:delete({propagate,Var}, Sym1),
+ St = St0#ost{sym=Sym},
+ Propagate(Type, St)
+ end.
+
+get_type({var,V}, #ost{sym=Sym}) ->
+ case gb_trees:lookup(V, Sym) of
+ none -> t_any();
+ {value,T} -> T
+ end.
+
+propagate({var,Var}, Propagate, #ost{sym=Sym0}=St) when is_function(Propagate, 2) ->
+ Sym = gb_trees:enter({propagate,Var}, Propagate, Sym0),
+ St#ost{sym=Sym}.
+
+%%%
+%%% A simple type system.
+%%%
+%%% Each type descriptions is a tuple {Type,Range}.
+%%% Type is one of the following atoms:
+%%%
+%%% Type name Description
+%%% --------- -----------
+%%% any Anything.
+%%%
+%%% align Basically iodata, but the list may contain bitstrings
+%%% and the the atom 'align'. Can be passed to complete/1
+%%% to construct a binary. Only used for aligned PER (per).
+%%%
+%%% bitstring An Erlang bitstring.
+%%%
+%%% bitlist A list that may be passed to list_to_bitstring/1 to
+%%% construct a bitstring.
+%%% NOTE: When analysing aligned PER (per), the number
+%%% of bits in the bitlist is always divisible by 8 (if
+%%% not, the type will be 'align' instead).
+%%%
+%%% binary An Erlang binary (the number of bits is divisible by 8).
+%%%
+%%% iolist An Erlang iolist.
+%%%
+%%% nil []
+%%%
+%%% integer An integer.
+%%%
+%%%
+%%% Range is one of:
+%%%
+%%% any
+%%% {LowerBound,UpperBound}
+%%%
+%%%
+
+t_align(Range) ->
+ {align,t__range(Range)}.
+
+t_any() ->
+ {any,any}.
+
+t_binary() ->
+ {binary,any}.
+
+t_binary(Range) ->
+ {binary,t__range(Range)}.
+
+t_bitlist() ->
+ {bitlist,any}.
+
+t_bitstring() ->
+ {bitstring,any}.
+
+t_bitstring(Range0) ->
+ case t__range(Range0) of
+ {Bits,Bits}=Range when Bits rem 8 =:= 0 ->
+ {binary,Range};
+ Range ->
+ {bitstring,Range}
+ end.
+
+t_add({integer,{Lb,Ub}}, N) ->
+ {integer,{Lb+N,Ub+N}}.
+
+t_cons({_,_}=T1, {_,_}=T2) ->
+ T = case {t__cons_type(T1),t__cons_type(T2)} of
+ {_,any} -> any;
+ {any,_} -> any;
+ {align,_} -> align;
+ {_,align} -> align;
+ {binary,binary} -> iolist;
+ {binary,bitstring} -> bitlist;
+ {bitstring,binary} -> bitlist;
+ {bitstring,bitstring} -> bitlist
+ end,
+ {T,t__cons_ranges(t__cons_range(T1), t__cons_range(T2))}.
+
+t_integer() ->
+ {integer,any}.
+
+t_integer(Range) ->
+ {integer,t__range(Range)}.
+
+t_iolist() ->
+ {iolist,any}.
+
+t_list(Range) ->
+ {list,t__range(Range)}.
+
+t_nil() ->
+ {nil,{0,0}}.
+
+t_meet({T1,Range1}, {T2,Range2}) ->
+ {t_meet_types(T1, T2),t_meet_ranges(Range1, Range2)}.
+
+t_meet_types(integer, integer) -> integer;
+t_meet_types(any, integer) -> integer.
+
+t_meet_ranges(any, Range) ->
+ Range;
+t_meet_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ if
+ Lb1 =< Ub2, Lb2 =< Ub1 ->
+ {max(Lb1, Lb2),Ub1};
+ Lb2 =< Ub1, Lb1 =< Ub2 ->
+ {max(Lb1, Lb2),Ub2}
+ end.
+
+t_join({T1,Range1}, {T2,Range2}) ->
+ T = t_join_types(lists:sort([T1,T2])),
+ Range = t_join_ranges(Range1, Range2),
+ {T,Range}.
+
+t_join_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ {min(Lb1, Lb2),max(Ub1, Ub2)};
+t_join_ranges(any, _) -> any;
+t_join_ranges(_, any) -> any.
+
+t_join_types([T,T]) -> T;
+t_join_types([align,any]) -> any;
+t_join_types([align,_]) -> align;
+t_join_types([any,_]) -> any;
+t_join_types([bitlist,bitstring]) -> any;
+t_join_types([bitlist,integer]) -> any;
+t_join_types([bitlist,iolist]) -> bitlist;
+t_join_types([bitlist,nil]) -> bitlist;
+t_join_types([binary,bitlist]) -> bitlist;
+t_join_types([binary,bitstring]) -> bitstring;
+t_join_types([binary,integer]) -> binary;
+t_join_types([binary,iolist]) -> iolist;
+t_join_types([binary,nil]) -> iolist;
+t_join_types([bitstring,integer]) -> any;
+t_join_types([bitstring,iolist]) -> any;
+t_join_types([bitstring,nil]) -> any;
+t_join_types([integer,_]) -> any;
+t_join_types([iolist,nil]) -> iolist.
+
+t_type({T,_}) -> T.
+
+t_range({_,Range}) -> Range.
+
+t__cons_type({align,_}) -> align;
+t__cons_type({any,_}) -> any;
+t__cons_type({binary,_}) -> binary;
+t__cons_type({bitstring,_}) -> bitstring;
+t__cons_type({bitlist,_}) -> bitstring;
+t__cons_type({integer,_}) -> binary;
+t__cons_type({iolist,_}) -> binary;
+t__cons_type({nil,_}) -> binary.
+
+t__cons_range({integer,_}) -> {8,8};
+t__cons_range({_,Range}) -> Range.
+
+t__cons_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ {Lb1+Lb2,Ub1+Ub2};
+t__cons_ranges(any, _) -> any;
+t__cons_ranges(_, any) -> any.
+
+t__range({Lb,Ub}=Range) when is_integer(Lb), is_integer(Ub) ->
+ Range;
+t__range(any) ->
+ any;
+t__range(Val) when is_integer(Val) ->
+ {Val,Val}.
+
%%%
%%% Code generation for encoding.
@@ -1702,19 +2281,10 @@ enc_cg(align) ->
enc_cg({apply,F0,As0}) ->
As = enc_call_args(As0, ""),
case F0 of
- {M,F} ->
- emit([{asis,M},":",{asis,F},"(",As,")"]);
- F when is_atom(F) ->
- emit([{asis,F},"(",As,")"])
- end;
-enc_cg({apply,F0,As0,Dst}) ->
- As = enc_call_args(As0, ""),
- emit([mk_val(Dst)," = "]),
- case F0 of
- {M,F} ->
- emit([{asis,M},":",{asis,F},"(",As,")"]);
- F when is_atom(F) ->
- emit([{asis,F},"(",As,")"])
+ {local,F,_} when is_atom(F) ->
+ emit([{asis,F},"(",As,")"]);
+ {M,F,_} ->
+ emit([{asis,M},":",{asis,F},"(",As,")"])
end;
enc_cg({assign,Dst0,Expr}) ->
Dst = mk_val(Dst0),
@@ -1728,15 +2298,11 @@ enc_cg({call,M,F,As0,Dst}) ->
As = [mk_val(A) || A <- As0],
emit([mk_val(Dst)," = "]),
asn1ct_func:call(M, F, As);
-enc_cg({call_gen,Prefix,Key,Gen,As0}) ->
+enc_cg({call_gen,Prefix,Key,Gen,_,As0}) ->
As = [mk_val(A) || A <- As0],
asn1ct_func:call_gen(Prefix, Key, Gen, As);
enc_cg({'cond',Cs}) ->
enc_cg_cond(Cs);
-enc_cg({'cond',Cs,Dst0}) ->
- Dst = mk_val(Dst0),
- emit([Dst," = "]),
- enc_cg_cond(Cs);
enc_cg({error,Error}) when is_function(Error, 0) ->
Error();
enc_cg({error,Var0}) ->
@@ -1752,12 +2318,17 @@ enc_cg({lc,Body,Var,List,Dst}) ->
emit([mk_val(Dst)," = ["]),
enc_cg(Body),
emit([" || ",mk_val(Var)," <- ",mk_val(List),"]"]);
+enc_cg({list,List,Dst}) ->
+ emit([mk_val(Dst)," = "]),
+ enc_cg(List);
enc_cg(nil) ->
emit("[]");
enc_cg({sub,Src0,Int,Dst0}) ->
Src = mk_val(Src0),
Dst = mk_val(Dst0),
emit([Dst," = ",Src," - ",Int]);
+enc_cg({set,{var,Src},{var,Dst}}) ->
+ emit([Dst," = ",Src]);
enc_cg({'try',Try,{P,Succ},Else,Dst}) ->
emit([mk_val(Dst)," = try "]),
enc_cg(Try),
@@ -1792,8 +2363,6 @@ enc_call_args([A|As], Sep) ->
[Sep,mk_val(A)|enc_call_args(As, ", ")];
enc_call_args([], _) -> [].
-enc_cg_cond([{'_',Action}]) ->
- enc_cg(Action);
enc_cg_cond(Cs) ->
emit("if "),
enc_cg_cond(Cs, ""),
@@ -1849,7 +2418,7 @@ mk_val(Other) -> {asis,Other}.
bit_string_name2pos_fun(NNL, Src) ->
{call_gen,"bit_string_name2pos_",NNL,
- fun(Fd, Name) -> gen_name2pos(Fd, Name, NNL) end,[Src]}.
+ fun(Fd, Name) -> gen_name2pos(Fd, Name, NNL) end,[],[Src]}.
gen_name2pos(Fd, Name, Names) ->
Cs0 = gen_name2pos_cs(Names, Name),
@@ -1978,19 +2547,12 @@ enc_opt_al(Imm0) ->
{Imm,_} = enc_opt_al_1(Imm0, unknown),
Imm.
-enc_opt_al_1([{'cond',Cs0,Dst},{call,per,complete,[Dst],Bin}|T0], Al0) ->
- {Cs1,{M,F}} = enc_opt_al_prepare_cond(Cs0),
- {Cs,_} = enc_opt_al_cond(Cs1, 0),
- {T,Al} = enc_opt_al_1([{call,M,F,[Dst],Bin}|T0], Al0),
- {[{'cond',Cs,Dst}|T],Al};
enc_opt_al_1([H0|T0], Al0) ->
{H,Al1} = enc_opt_al(H0, Al0),
{T,Al} = enc_opt_al_1(T0, Al1),
{H++T,Al};
enc_opt_al_1([], Al) -> {[],Al}.
-enc_opt_al({apply,_,_,_}=Imm, Al) ->
- {[Imm],Al};
enc_opt_al({assign,_,_}=Imm, Al) ->
{[Imm],Al};
enc_opt_al({block,Bl0}, Al0) ->
@@ -2012,6 +2574,10 @@ enc_opt_al({'cond',Cs0}, Al0) ->
{[{'cond',Cs}],Al};
enc_opt_al({error,_}=Imm, Al) ->
{[Imm],Al};
+enc_opt_al({list,Imm0,Dst}, Al) ->
+ Imm1 = enc_opt_hoist_align(Imm0),
+ {Imm,_} = enc_opt_al_1(Imm1, 0),
+ {[{list,Imm,Dst}],Al};
enc_opt_al({put_bits,V,N,[U,align]}, Al0) when Al0 rem 8 =:= 0 ->
Al = if
is_integer(N) -> N*U;
@@ -2038,8 +2604,12 @@ enc_opt_al({put_bits,_,N,[U]}=PutBits, Al) when is_integer(N), is_integer(Al) ->
{[PutBits],Al+N*U};
enc_opt_al({put_bits,_,binary,[U]}=PutBits, Al) when U rem 8 =:= 0 ->
{[PutBits],Al};
+enc_opt_al({set,_,_}=Imm, Al) ->
+ {[Imm],Al};
enc_opt_al({sub,_,_,_}=Imm, Al) ->
{[Imm],Al};
+enc_opt_al({'try',_,_,_,_}=Imm, Al) ->
+ {[Imm],Al};
enc_opt_al(Imm, _) ->
{[Imm],unknown}.
@@ -2063,29 +2633,25 @@ enc_opt_al_cond_1([], _, CAcc, AAcc) ->
end,
{lists:reverse(CAcc),Al}.
-enc_opt_al_prepare_cond(Cs0) ->
- try enc_opt_al_prepare_cond_1(Cs0) of
- Cs ->
- {Cs,{erlang,iolist_to_binary}}
+enc_opt_hoist_align([{'cond',Cs0},{put_bits,0,0,[1,align]}]=Imm) ->
+ try
+ Cs = [insert_align_last(C) || C <- Cs0],
+ [{'cond',Cs}]
catch
throw:impossible ->
- {Cs0,{per,complete}}
- end.
-
-enc_opt_al_prepare_cond_1(Cs) ->
- [[C|enc_opt_al_prepare_cond_2(Act)] || [C|Act] <- Cs].
-
-enc_opt_al_prepare_cond_2([{put_bits,_,binary,[U|_]}|_]) when U rem 8 =/= 0 ->
- throw(impossible);
-enc_opt_al_prepare_cond_2([{put_bits,_,_,_}=H|T]) ->
- [H|enc_opt_al_prepare_cond_2(T)];
-enc_opt_al_prepare_cond_2([{call,per_common,encode_fragmented,_}=H|T]) ->
- [H|enc_opt_al_prepare_cond_2(T)];
-enc_opt_al_prepare_cond_2([_|_]) ->
- throw(impossible);
-enc_opt_al_prepare_cond_2([]) ->
- [{put_bits,0,0,[1,align]}].
+ Imm
+ end;
+enc_opt_hoist_align(Imm) -> Imm.
+insert_align_last([_,{error,_}]=C) ->
+ C;
+insert_align_last([H|T]) ->
+ case lists:last(T) of
+ {put_bits,_,_,_} ->
+ [H|T ++ [{put_bits,0,0,[1,align]}]];
+ _ ->
+ throw(impossible)
+ end.
%%%
%%% For the aligned PER format, fix up the intermediate format
@@ -2095,8 +2661,6 @@ enc_opt_al_prepare_cond_2([]) ->
per_fixup([{apply,_,_}=H|T]) ->
[H|per_fixup(T)];
-per_fixup([{apply,_,_,_}=H|T]) ->
- [H|per_fixup(T)];
per_fixup([{block,Block}|T]) ->
[{block,per_fixup(Block)}|per_fixup(T)];
per_fixup([{'assign',_,_}=H|T]) ->
@@ -2104,14 +2668,11 @@ per_fixup([{'assign',_,_}=H|T]) ->
per_fixup([{'cond',Cs0}|T]) ->
Cs = [[C|per_fixup(Act)] || [C|Act] <- Cs0],
[{'cond',Cs}|per_fixup(T)];
-per_fixup([{'cond',Cs0,Dst}|T]) ->
- Cs = [[C|per_fixup(Act)] || [C|Act] <- Cs0],
- [{'cond',Cs,Dst}|per_fixup(T)];
per_fixup([{call,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{call,_,_,_,_}=H|T]) ->
[H|per_fixup(T)];
-per_fixup([{call_gen,_,_,_,_}=H|T]) ->
+per_fixup([{call_gen,_,_,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{error,_}=H|T]) ->
[H|per_fixup(T)];
@@ -2119,6 +2680,10 @@ per_fixup([{lc,B,V,L}|T]) ->
[{lc,per_fixup(B),V,L}|per_fixup(T)];
per_fixup([{lc,B,V,L,Dst}|T]) ->
[{lc,per_fixup(B),V,L,Dst}|per_fixup(T)];
+per_fixup([{list,Imm,Dst}|T]) ->
+ [{list,per_fixup(Imm),Dst}|per_fixup(T)];
+per_fixup([{set,_,_}=H|T]) ->
+ [H|per_fixup(T)];
per_fixup([{sub,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{'try',Try0,{P,Succ0},Else0,Dst}|T]) ->
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl
index 283616b157..3891fce8d3 100644
--- a/lib/asn1/src/asn1ct_parser2.erl
+++ b/lib/asn1/src/asn1ct_parser2.erl
@@ -25,7 +25,8 @@
%% Only used internally within this module.
-record(typereference, {pos,val}).
--record(constraint,{c,e}).
+-record(constraint, {c,e}).
+-record(identifier, {pos,val}).
%% parse all types in module
parse(Tokens) ->
@@ -112,6 +113,9 @@ parse_ModuleDefinition(Tokens) ->
parse_Exports([{'EXPORTS',_L1},{';',_L2}|Rest]) ->
{{exports,[]},Rest};
+parse_Exports([{'EXPORTS',_},{'ALL',_},{';',_}|Rest]) ->
+ %% Same as no exports definition.
+ {{exports,all},Rest};
parse_Exports([{'EXPORTS',_L1}|Rest]) ->
{SymbolList,Rest2} = parse_SymbolList(Rest),
case Rest2 of
@@ -1037,10 +1041,6 @@ parse_DefinedObjectClass([{typereference,_,_ModName},{'.',_},Tr={typereference,_
parse_DefinedObjectClass([Tr={typereference,_,_ObjClName}|Rest]) ->
% {{objectclassname,tref2Exttref(Tr)},Rest};
{tref2Exttref(Tr),Rest};
-parse_DefinedObjectClass([{'TYPE-IDENTIFIER',_}|Rest]) ->
- {'TYPE-IDENTIFIER',Rest};
-parse_DefinedObjectClass([{'ABSTRACT-SYNTAX',_}|Rest]) ->
- {'ABSTRACT-SYNTAX',Rest};
parse_DefinedObjectClass(Tokens) ->
throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module),
[got,get_token(hd(Tokens)),expected,
@@ -1051,7 +1051,8 @@ parse_DefinedObjectClass(Tokens) ->
parse_ObjectClassAssignment([{typereference,L1,ObjClName},{'::=',_}|Rest]) ->
{Type,Rest2} = parse_ObjectClass(Rest),
- {#classdef{pos=L1,name=ObjClName,typespec=Type},Rest2};
+ {#classdef{pos=L1,name=ObjClName,module=resolve_module(Type),
+ typespec=Type},Rest2};
parse_ObjectClassAssignment(Tokens) ->
throw({asn1_assignment_error,{get_line(hd(Tokens)),get(asn1_module),
[got,get_token(hd(Tokens)),expected,
@@ -2134,8 +2135,7 @@ parse_ParameterizedObjectSetAssignment(Tokens) ->
%% Parameter = {Governor,Reference} | Reference
%% Governor = Type | DefinedObjectClass
%% Type = #type{}
-%% DefinedObjectClass = #'Externaltypereference'{} |
-%% 'ABSTRACT-SYNTAX' | 'TYPE-IDENTIFIER'
+%% DefinedObjectClass = #'Externaltypereference'{}
%% Reference = #'Externaltypereference'{} | #'Externalvaluereference'{}
parse_ParameterList([{'{',_}|Rest]) ->
parse_ParameterList(Rest,[]);
@@ -2863,13 +2863,14 @@ parse_SequenceValue(Tokens) ->
throw({asn1_error,{get_line(hd(Tokens)),get(asn1_module),
[got,get_token(hd(Tokens)),expected,'{']}}).
-parse_SequenceValue([{identifier,_,IdName}|Rest],Acc) ->
+parse_SequenceValue([{identifier,Pos,IdName}|Rest],Acc) ->
{Value,Rest2} = parse_Value(Rest),
+ SeqTag = #seqtag{pos=Pos,module=get(asn1_module),val=IdName},
case Rest2 of
[{',',_}|Rest3] ->
- parse_SequenceValue(Rest3,[{IdName,Value}|Acc]);
+ parse_SequenceValue(Rest3, [{SeqTag,Value}|Acc]);
[{'}',_}|Rest3] ->
- {lists:reverse([{IdName,Value}|Acc]),Rest3};
+ {lists:reverse(Acc, [{SeqTag,Value}]),Rest3};
_ ->
throw({asn1_error,{get_line(hd(Rest2)),get(asn1_module),
[got,get_token(hd(Rest2)),expected,'}']}})
diff --git a/lib/asn1/src/asn1ct_table.erl b/lib/asn1/src/asn1ct_table.erl
index a5eb6d0413..2eca80eda3 100644
--- a/lib/asn1/src/asn1ct_table.erl
+++ b/lib/asn1/src/asn1ct_table.erl
@@ -22,34 +22,25 @@
%% Table abstraction module for ASN.1 compiler
-export([new/1]).
--export([new/2]).
-export([new_reuse/1]).
--export([new_reuse/2]).
-export([exists/1]).
-export([size/1]).
-export([insert/2]).
-export([lookup/2]).
-export([match/2]).
-export([to_list/1]).
--export([delete/1]). % TODO: Remove (since we run in a separate process)
+-export([delete/1]).
-%% Always creates a new table
-new(Table) -> new(Table, []).
-new(Table, Options) ->
- TableId = case get(Table) of
- undefined ->
- ets:new(Table, Options);
- _ ->
- delete(Table),
- ets:new(Table, Options)
- end,
+%% Always create a new table.
+new(Table) ->
+ undefined = get(Table), %Assertion.
+ TableId = ets:new(Table, []),
put(Table, TableId).
-%% Only create it if it doesn't exist yet
-new_reuse(Table) -> new_reuse(Table, []).
-new_reuse(Table, Options) ->
- not exists(Table) andalso new(Table, Options).
+%% Only create it if it doesn't exist yet.
+new_reuse(Table) ->
+ not exists(Table) andalso new(Table).
exists(Table) -> get(Table) =/= undefined.
@@ -63,14 +54,17 @@ match(Table, MatchSpec) -> ets:match(get(Table), MatchSpec).
to_list(Table) -> ets:tab2list(get(Table)).
+%% Deleting tables is no longer strictly necessary since each compilation
+%% runs in separate process, but it will reduce memory consumption
+%% especially when many compilations are run in parallel.
+
delete(Tables) when is_list(Tables) ->
[delete(T) || T <- Tables],
true;
delete(Table) when is_atom(Table) ->
- case get(Table) of
+ case erase(Table) of
undefined ->
true;
TableId ->
- ets:delete(TableId),
- erase(Table)
+ ets:delete(TableId)
end.
diff --git a/lib/asn1/src/asn1ct_tok.erl b/lib/asn1/src/asn1ct_tok.erl
index 85199c65ec..8687ed955c 100644
--- a/lib/asn1/src/asn1ct_tok.erl
+++ b/lib/asn1/src/asn1ct_tok.erl
@@ -36,7 +36,7 @@ process(Stream,Lno,R) ->
process(io:get_line(Stream, ''), Stream,Lno+1,R).
process(eof, Stream,Lno,R) ->
- file:close(Stream),
+ ok = file:close(Stream),
lists:flatten(lists:reverse([{'$end',Lno}|R]));
@@ -309,7 +309,6 @@ check_hex(_) ->
%% returns rstrtype if A is a reserved word in the group
%% RestrictedCharacterStringType
reserved_word('ABSENT') -> true;
-%reserved_word('ABSTRACT-SYNTAX') -> true; % impl as predef item
reserved_word('ALL') -> true;
reserved_word('ANY') -> true;
reserved_word('APPLICATION') -> true;
@@ -380,7 +379,6 @@ reserved_word('T61String') -> rstrtype;
reserved_word('TAGS') -> true;
reserved_word('TeletexString') -> rstrtype;
reserved_word('TRUE') -> true;
-%% reserved_word('TYPE-IDENTIFIER') -> true; % impl as predef item
reserved_word('UNION') -> true;
reserved_word('UNIQUE') -> true;
reserved_word('UNIVERSAL') -> true;
diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl
index 862b3c4ea5..221cd991a7 100644
--- a/lib/asn1/src/asn1ct_value.erl
+++ b/lib/asn1/src/asn1ct_value.erl
@@ -18,6 +18,7 @@
%%
%%
-module(asn1ct_value).
+-compile([{nowarn_deprecated_function,{asn1rt,utf8_list_to_binary,1}}]).
%% Generate Erlang values for ASN.1 types.
%% The value is randomized within it's constraints
@@ -260,7 +261,11 @@ from_type_prim(M, D) ->
'BOOLEAN' ->
true;
'OCTET STRING' ->
- adjust_list(size_random(C),c_string(C,"OCTET STRING"));
+ S0 = adjust_list(size_random(C), c_string(C, "OCTET STRING")),
+ case M:legacy_erlang_types() of
+ false -> list_to_binary(S0);
+ true -> S0
+ end;
'NumericString' ->
adjust_list(size_random(C),c_string(C,"0123456789"));
'TeletexString' ->
@@ -348,7 +353,7 @@ random_unnamed_bit_string(M, C) ->
random(Upper) ->
{A1,A2,A3} = erlang:now(),
- random:seed(A1,A2,A3),
+ _ = random:seed(A1, A2, A3),
random:uniform(Upper).
size_random(C) ->
diff --git a/lib/asn1/src/asn1rt.erl b/lib/asn1/src/asn1rt.erl
index d18f81346a..ad8b879c38 100644
--- a/lib/asn1/src/asn1rt.erl
+++ b/lib/asn1/src/asn1rt.erl
@@ -18,14 +18,13 @@
%%
%%
-module(asn1rt).
+-deprecated(module).
%% Runtime functions for ASN.1 (i.e encode, decode)
-export([encode/2,encode/3,decode/3,load_driver/0,unload_driver/0,info/1]).
-export([utf8_binary_to_list/1,utf8_list_to_binary/1]).
-
--deprecated([load_driver/0,unload_driver/0]).
encode(Module,{Type,Term}) ->
encode(Module,Type,Term).
diff --git a/lib/asn1/src/asn1rt_nif.erl b/lib/asn1/src/asn1rt_nif.erl
index c1879e3dcf..1a44f1a27c 100644
--- a/lib/asn1/src/asn1rt_nif.erl
+++ b/lib/asn1/src/asn1rt_nif.erl
@@ -30,7 +30,7 @@
-define(ASN1_NIF_VSN,1).
load_nif() ->
- LibBaseName = "asn1_erl_nif",
+ LibBaseName = "asn1rt_nif",
PrivDir = code:priv_dir(asn1),
LibName = case erlang:system_info(build_type) of
opt ->
diff --git a/lib/asn1/src/asn1rtt_ber.erl b/lib/asn1/src/asn1rtt_ber.erl
index 583ff790b7..c4cd872368 100644
--- a/lib/asn1/src/asn1rtt_ber.erl
+++ b/lib/asn1/src/asn1rtt_ber.erl
@@ -26,22 +26,24 @@
skip_ExtensionAdditions/2]).
-export([encode_boolean/2,decode_boolean/2,
encode_integer/2,encode_integer/3,
- decode_integer/2,decode_integer/3,
- decode_named_integer/3,decode_named_integer/4,
- encode_enumerated/2,decode_enumerated/3,
+ decode_integer/2,
+ number2name/2,
+ encode_unnamed_bit_string/2,encode_unnamed_bit_string/3,
+ encode_named_bit_string/3,encode_named_bit_string/4,
encode_bit_string/4,
decode_named_bit_string/3,
- decode_compact_bit_string/3,
- decode_legacy_bit_string/3,
- decode_native_bit_string/3,
+ decode_compact_bit_string/2,compact_bit_string_size/1,
+ decode_native_bit_string/2,
+ native_to_legacy_bit_string/1,
encode_null/2,decode_null/2,
encode_relative_oid/2,decode_relative_oid/2,
encode_object_identifier/2,decode_object_identifier/2,
encode_restricted_string/2,
- decode_restricted_string/2,decode_restricted_string/3,
- encode_universal_string/2,decode_universal_string/3,
+ decode_octet_string/2,
+ decode_restricted_string/2,
+ encode_universal_string/2,decode_universal_string/2,
encode_UTF8_string/2,decode_UTF8_string/2,
- encode_BMP_string/2,decode_BMP_string/3]).
+ encode_BMP_string/2,decode_BMP_string/2]).
-export([encode_open_type/2,decode_open_type/2,
decode_open_type_as_binary/2]).
@@ -588,8 +590,6 @@ encode_tags(TagIn, {BytesSoFar,LenSoFar}) ->
encode_open_type(Val, T) when is_list(Val) ->
encode_open_type(list_to_binary(Val), T);
-encode_open_type(Val, []) ->
- {Val,byte_size(Val)};
encode_open_type(Val, Tag) ->
encode_tags(Tag, Val, byte_size(Val)).
@@ -694,41 +694,14 @@ encode_integer_neg(N, Acc) ->
%%===============================================================================
%% decode integer
-%% (Buffer, Range, HasTag, TotalLen) -> {Integer, Remain, RemovedBytes}
-%% (Buffer, Range, NamedNumberList, HasTag, TotalLen) -> {Integer, Remain, RemovedBytes}
%%===============================================================================
-decode_named_integer(Tlv, NamedNumberList, TagIn) ->
- V = match_tags(Tlv, TagIn),
- Int = decode_integer(V),
- number2name(Int, NamedNumberList).
-
-decode_named_integer(Tlv, Range, NamedNumberList, TagIn) ->
- V = match_tags(Tlv, TagIn),
- Int = range_check_integer(decode_integer(V), Range),
- number2name(Int, NamedNumberList).
-
decode_integer(Tlv, TagIn) ->
- V = match_tags(Tlv, TagIn),
- decode_integer(V).
-
-decode_integer(Tlv, Range, TagIn) ->
- V = match_tags(Tlv, TagIn),
- Int = decode_integer(V),
- range_check_integer(Int, Range).
-
-decode_integer(Bin) ->
+ Bin = match_tags(Tlv, TagIn),
Len = byte_size(Bin),
<<Int:Len/signed-unit:8>> = Bin,
Int.
-range_check_integer(Int, {Lb,Ub}) when Lb =< Int, Int =< Ub ->
- Int;
-range_check_integer(Int, Range) ->
- exit({error,{asn1,{integer_range,Range,Int}}}).
-
-number2name(Int, []) ->
- Int;
number2name(Int, NamedNumberList) ->
case lists:keyfind(Int, 2, NamedNumberList) of
{NamedVal,_} ->
@@ -737,49 +710,56 @@ number2name(Int, NamedNumberList) ->
Int
end.
-
%%============================================================================
-%% Enumerated value, ITU_T X.690 Chapter 8.4
-
-%% encode enumerated value
+%% Bitstring value, ITU_T X.690 Chapter 8.6
+%%
+%% encode bitstring value
%%============================================================================
-encode_enumerated(Val, TagIn) when is_integer(Val) ->
- encode_tags(TagIn, encode_integer(Val)).
-%%============================================================================
-%% decode enumerated value
-%% (Buffer, Range, NamedNumberList, HasTag, TotalLen) -> Value
-%%===========================================================================
-decode_enumerated(Tlv, NamedNumberList, Tags) ->
- Buffer = match_tags(Tlv, Tags),
- decode_enumerated_notag(Buffer, NamedNumberList, Tags).
-
-decode_enumerated_notag(Buffer, {NamedNumberList,ExtList}, _Tags) ->
- IVal = decode_integer(Buffer),
- case decode_enumerated1(IVal, NamedNumberList) of
- {asn1_enum,IVal} ->
- decode_enumerated1(IVal,ExtList);
- EVal ->
- EVal
- end;
-decode_enumerated_notag(Buffer, NNList, _Tags) ->
- IVal = decode_integer(Buffer),
- case decode_enumerated1(IVal, NNList) of
- {asn1_enum,_} ->
- exit({error,{asn1, {illegal_enumerated, IVal}}});
- EVal ->
- EVal
- end.
+encode_unnamed_bit_string(Bits, TagIn) ->
+ Unused = (8 - (bit_size(Bits) band 7)) band 7,
+ Bin = <<Unused,Bits/bitstring,0:Unused>>,
+ encode_tags(TagIn, Bin, byte_size(Bin)).
-decode_enumerated1(Val, NamedNumberList) ->
- %% it must be a named integer
- case lists:keyfind(Val, 2, NamedNumberList) of
- {NamedVal, _} ->
- NamedVal;
- _ ->
- {asn1_enum,Val}
+encode_unnamed_bit_string(MaxBits, Bits, TagIn) ->
+ NumBits = bit_size(Bits),
+ Unused = (8 - (NumBits band 7)) band 7,
+ Bin = <<Unused,Bits/bitstring,0:Unused>>,
+ if
+ NumBits > MaxBits ->
+ exit({error,{asn1,
+ {bitstring_length,
+ {{was,NumBits},{maximum,MaxBits}}}}});
+ true ->
+ encode_tags(TagIn, Bin, byte_size(Bin))
end.
+encode_named_bit_string([H|_]=Bits, NamedBitList, TagIn) when is_atom(H) ->
+ do_encode_named_bit_string(Bits, NamedBitList, TagIn);
+encode_named_bit_string([{bit,_}|_]=Bits, NamedBitList, TagIn) ->
+ do_encode_named_bit_string(Bits, NamedBitList, TagIn);
+encode_named_bit_string(Bits, _NamedBitList, TagIn) when is_bitstring(Bits) ->
+ encode_unnamed_bit_string(Bits, TagIn).
+
+encode_named_bit_string(C, [H|_]=Bits, NamedBitList, TagIn) when is_atom(H) ->
+ do_encode_named_bit_string(C, Bits, NamedBitList, TagIn);
+encode_named_bit_string(C, [{bit,_}|_]=Bits, NamedBitList, TagIn) ->
+ do_encode_named_bit_string(C, Bits, NamedBitList, TagIn);
+encode_named_bit_string(C, Bits, _NamedBitList, TagIn) when is_bitstring(Bits) ->
+ encode_unnamed_bit_string(C, Bits, TagIn).
+
+do_encode_named_bit_string([FirstVal | RestVal], NamedBitList, TagIn) ->
+ ToSetPos = get_all_bitposes([FirstVal | RestVal], NamedBitList, []),
+ Size = lists:max(ToSetPos) + 1,
+ BitList = make_and_set_list(Size, ToSetPos, 0),
+ {Len,Unused,OctetList} = encode_bitstring(BitList),
+ encode_tags(TagIn, [Unused|OctetList],Len+1).
+
+do_encode_named_bit_string(Size, [FirstVal | RestVal], NamedBitList, TagIn) ->
+ ToSetPos = get_all_bitposes([FirstVal | RestVal], NamedBitList, []),
+ BitList = make_and_set_list(Size, ToSetPos, 0),
+ {Len, Unused, OctetList} = encode_bitstring(BitList),
+ encode_tags(TagIn, [Unused|OctetList], Len+1).
%%============================================================================
%% Bitstring value, ITU_T X.690 Chapter 8.6
@@ -880,15 +860,14 @@ remove_unused_then_dotag(TagIn,Unused,BinBits) ->
encode_bit_string_named(C, [FirstVal | RestVal], NamedBitList, TagIn) ->
ToSetPos = get_all_bitposes([FirstVal | RestVal], NamedBitList, []),
- Size =
- case C of
- [] ->
- lists:max(ToSetPos)+1;
- {_Min,Max} ->
- Max;
- TSize ->
- TSize
- end,
+ Size = case C of
+ [] ->
+ lists:max(ToSetPos) + 1;
+ {_Min,Max} ->
+ Max;
+ TSize ->
+ TSize
+ end,
BitList = make_and_set_list(Size, ToSetPos, 0),
{Len, Unused, OctetList} = encode_bitstring(BitList),
encode_tags(TagIn, [Unused|OctetList],Len+1).
@@ -1046,33 +1025,23 @@ unused_bitlist([Bit | Rest], Trail, Ack) ->
%% decode bitstring value
%%============================================================================
-decode_compact_bit_string(Buffer, Range, Tags) ->
+decode_compact_bit_string(Buffer, Tags) ->
case match_and_collect(Buffer, Tags) of
- <<0>> ->
- check_restricted_string({0,<<>>}, 0, Range);
- <<Unused,Bits/binary>> ->
- Val = {Unused,Bits},
- Len = bit_size(Bits) - Unused,
- check_restricted_string(Val, Len, Range)
+ <<0>> -> {0,<<>>};
+ <<Unused,Bits/binary>> -> {Unused,Bits}
end.
-decode_legacy_bit_string(Buffer, Range, Tags) ->
- Val = case match_and_collect(Buffer, Tags) of
- <<0>> ->
- [];
- <<Unused,Bits/binary>> ->
- decode_bitstring2(byte_size(Bits), Unused, Bits)
- end,
- check_restricted_string(Val, length(Val), Range).
+compact_bit_string_size({Unused,Bits}) ->
+ bit_size(Bits) - Unused.
-decode_native_bit_string(Buffer, Range, Tags) ->
+decode_native_bit_string(Buffer, Tags) ->
case match_and_collect(Buffer, Tags) of
<<0>> ->
- check_restricted_string(<<>>, 0, Range);
+ <<>>;
<<Unused,Bits/binary>> ->
Size = bit_size(Bits) - Unused,
<<Val:Size/bitstring,_:Unused/bitstring>> = Bits,
- check_restricted_string(Val, Size, Range)
+ Val
end.
decode_named_bit_string(Buffer, NamedNumberList, Tags) ->
@@ -1095,6 +1064,9 @@ decode_bitstring2(Len, Unused,
[B7,B6,B5,B4,B3,B2,B1,B0|
decode_bitstring2(Len - 1, Unused, Buffer)].
+native_to_legacy_bit_string(Bits) ->
+ [B || <<B:1>> <= Bits].
+
%%----------------------------------------
%% Decode the bitlist to names
%%----------------------------------------
@@ -1251,25 +1223,19 @@ encode_restricted_string(OctetList, TagIn) when is_list(OctetList) ->
encode_tags(TagIn, OctetList, length(OctetList)).
%%============================================================================
-%% decode Numeric Printable Teletex Videotex Visible IA5 Graphic General strings
+%% decode OCTET STRING to binary
%%============================================================================
-decode_restricted_string(Tlv, TagsIn) ->
+decode_octet_string(Tlv, TagsIn) ->
Bin = match_and_collect(Tlv, TagsIn),
- binary_to_list(Bin).
+ binary:copy(Bin).
-decode_restricted_string(Tlv, Range, TagsIn) ->
- Bin = match_and_collect(Tlv, TagsIn),
- check_restricted_string(binary_to_list(Bin), byte_size(Bin), Range).
+%%============================================================================
+%% decode Numeric Printable Teletex Videotex Visible IA5 Graphic General strings
+%%============================================================================
-check_restricted_string(Val, _Len, []) ->
- Val;
-check_restricted_string(Val, Len, {Lb,Ub}) when Lb =< Len, Len =< Ub ->
- Val;
-check_restricted_string(Val, Len, Len) ->
- Val;
-check_restricted_string(Val, _Len, Range) ->
- exit({error,{asn1,{length,Range,Val}}}).
+decode_restricted_string(Tlv, TagsIn) ->
+ match_and_collect(Tlv, TagsIn).
%%============================================================================
%% encode Universal string
@@ -1295,10 +1261,9 @@ mk_uni_list([H|T],List) ->
%% {String, Remain, RemovedBytes}
%%===========================================================================
-decode_universal_string(Buffer, Range, Tags) ->
+decode_universal_string(Buffer, Tags) ->
Bin = match_and_collect(Buffer, Tags),
- Val = mk_universal_string(binary_to_list(Bin)),
- check_restricted_string(Val, length(Val), Range).
+ mk_universal_string(binary_to_list(Bin)).
mk_universal_string(In) ->
mk_universal_string(In, []).
@@ -1358,10 +1323,9 @@ mk_BMP_list([H|T], List) ->
%% (Buffer, Range, StringType, HasTag, TotalLen) ->
%% {String, Remain, RemovedBytes}
%%============================================================================
-decode_BMP_string(Buffer, Range, Tags) ->
+decode_BMP_string(Buffer, Tags) ->
Bin = match_and_collect(Buffer, Tags),
- Val = mk_BMP_string(binary_to_list(Bin)),
- check_restricted_string(Val, length(Val), Range).
+ mk_BMP_string(binary_to_list(Bin)).
mk_BMP_string(In) ->
mk_BMP_string(In,[]).
diff --git a/lib/asn1/src/asn1rtt_check.erl b/lib/asn1/src/asn1rtt_check.erl
index be4f9c8bff..0083867a10 100644
--- a/lib/asn1/src/asn1rtt_check.erl
+++ b/lib/asn1/src/asn1rtt_check.erl
@@ -18,43 +18,41 @@
%%
-module(asn1rtt_check).
--export([check_bool/2,
+-export([check_fail/1,
check_int/3,
- check_bitstring/2,check_named_bitstring/3,
+ check_legacy_bitstring/2,
+ check_legacy_named_bitstring/3,
+ check_legacy_named_bitstring/4,
+ check_named_bitstring/3,
+ check_named_bitstring/4,
+ check_literal_sof/2,
check_octetstring/2,
- check_null/2,
check_objectidentifier/2,
check_objectdescriptor/2,
check_real/2,
- check_enum/3,
check_restrictedstring/2]).
-check_bool(_Bool, asn1_DEFAULT) ->
- true;
-check_bool(Bool, Bool) when is_boolean(Bool) ->
- true;
-check_bool(_Bool1, Bool2) ->
- throw({error,Bool2}).
+check_fail(_) ->
+ throw(false).
-check_int(_, asn1_DEFAULT, _) ->
- true;
check_int(Value, Value, _) when is_integer(Value) ->
true;
-check_int(DefValue, Value, NNL) when is_atom(Value) ->
+check_int(Value, DefValue, NNL) when is_atom(Value) ->
case lists:keyfind(Value, 1, NNL) of
{_,DefValue} ->
true;
_ ->
- throw({error,DefValue})
+ throw(false)
end;
-check_int(DefaultValue, _Value, _) ->
- throw({error,DefaultValue}).
+check_int(_, _, _) ->
+ throw(false).
+
+check_legacy_bitstring(Value, Default) ->
+ check_bitstring(Default, Value).
%% check_bitstring(Default, UserBitstring) -> true|false
%% Default = bitstring()
%% UserBitstring = integeger() | list(0|1) | {Unused,binary()} | bitstring()
-check_bitstring(_, asn1_DEFAULT) ->
- true;
check_bitstring(DefVal, {Unused,Binary}) ->
%% User value in compact format.
Sz = bit_size(Binary) - Unused,
@@ -62,7 +60,7 @@ check_bitstring(DefVal, {Unused,Binary}) ->
check_bitstring(DefVal, Val);
check_bitstring(DefVal, Val) when is_bitstring(Val) ->
case Val =:= DefVal of
- false -> throw(error);
+ false -> throw(false);
true -> true
end;
check_bitstring(Def, Val) when is_list(Val) ->
@@ -75,178 +73,95 @@ check_bitstring_list(<<H:1,T1/bitstring>>, [H|T2]) ->
check_bitstring_list(<<>>, []) ->
true;
check_bitstring_list(_, _) ->
- throw(error).
+ throw(false).
check_bitstring_integer(<<H:1,T1/bitstring>>, Int) when H =:= Int band 1 ->
check_bitstring_integer(T1, Int bsr 1);
check_bitstring_integer(<<>>, 0) ->
true;
check_bitstring_integer(_, _) ->
- throw(error).
-
-check_named_bitstring(_, asn1_DEFAULT, _) ->
- true;
-check_named_bitstring(V, V, _) ->
- true;
-%% Default value and user value as lists of ones and zeros
-check_named_bitstring(L1=[H1|_T1], L2=[H2|_T2], NBL=[_H|_T]) when is_integer(H1), is_integer(H2) ->
- L2new = remove_trailing_zeros(L2),
- check_named_bitstring(L1, L2new, NBL);
-%% Default value as a list of 1 and 0 and user value as a list of atoms
-check_named_bitstring(L1=[H1|_T1], L2=[H2|_T2], NBL) when is_integer(H1), is_atom(H2) ->
- L3 = bit_list_to_nbl(L1, NBL, 0, []),
- check_named_bitstring(L3, L2, NBL);
-%% Both default value and user value as a list of atoms
-check_named_bitstring(L1=[H1|T1], L2=[H2|_T2], _)
- when is_atom(H1), is_atom(H2), length(L1) =:= length(L2) ->
- case lists:member(H1, L2) of
- true ->
- check_bitstring1(T1, L2);
- false -> throw({error,L2})
- end;
-%% Default value as a list of atoms and user value as a list of 1 and 0
-check_named_bitstring(L1=[H1|_T1], L2=[H2|_T2], NBL) when is_atom(H1), is_integer(H2) ->
- L3 = bit_list_to_nbl(L2, NBL, 0, []),
- check_named_bitstring(L1, L3, NBL);
-%% User value in compact format
-check_named_bitstring(DefVal,CBS={_,_}, NBL) ->
- NewVal = cbs_to_bit_list(CBS),
- check_named_bitstring(DefVal, NewVal, NBL);
-%% User value as a binary
-check_named_bitstring(DefVal, CBS, NBL) when is_binary(CBS) ->
- NewVal = cbs_to_bit_list({0,CBS}),
- check_named_bitstring(DefVal, NewVal, NBL);
-%% User value as a bitstring
-check_named_bitstring(DefVal, CBS, NBL) when is_bitstring(CBS) ->
- BitSize = bit_size(CBS),
- Unused = 8 - (BitSize band 7),
- NewVal = cbs_to_bit_list({Unused,<<CBS:BitSize/bits,0:Unused>>}),
- check_named_bitstring(DefVal, NewVal, NBL);
-check_named_bitstring(DV, V, _) ->
- throw({error,DV,V}).
-
-int_to_bit_list(0, Acc, 0) ->
- Acc;
-int_to_bit_list(Int, Acc, Len) when Len > 0 ->
- int_to_bit_list(Int bsr 1, [Int band 1|Acc], Len - 1).
-
-bit_list_to_nbl([0|T], NBL, Pos, Acc) ->
- bit_list_to_nbl(T, NBL, Pos+1, Acc);
-bit_list_to_nbl([1|T], NBL, Pos, Acc) ->
- case lists:keyfind(Pos, 2, NBL) of
- {N,_} ->
- bit_list_to_nbl(T, NBL, Pos+1, [N|Acc]);
+ throw(false).
+
+check_legacy_named_bitstring([Int|_]=Val, Bs, BsSize) when is_integer(Int) ->
+ check_named_bitstring(<< <<B:1>> || B <- Val >>, Bs, BsSize);
+check_legacy_named_bitstring({Unused,Val0}, Bs, BsSize) ->
+ Sz = bit_size(Val0) - Unused,
+ <<Val:Sz/bits,_/bits>> = Val0,
+ check_named_bitstring(Val, Bs, BsSize);
+check_legacy_named_bitstring(Val, Bs, BsSize) when is_integer(Val) ->
+ L = legacy_int_to_bitlist(Val),
+ check_named_bitstring(<< <<B:1>> || B <- L >>, Bs, BsSize);
+check_legacy_named_bitstring(Val, Bs, BsSize) ->
+ check_named_bitstring(Val, Bs, BsSize).
+
+check_legacy_named_bitstring([Int|_]=Val, Names, Bs, BsSize) when is_integer(Int) ->
+ check_named_bitstring(<< <<B:1>> || B <- Val >>, Names, Bs, BsSize);
+check_legacy_named_bitstring({Unused,Val0}, Names, Bs, BsSize) ->
+ Sz = bit_size(Val0) - Unused,
+ <<Val:Sz/bits,_/bits>> = Val0,
+ check_named_bitstring(Val, Names, Bs, BsSize);
+check_legacy_named_bitstring(Val, Names, Bs, BsSize) when is_integer(Val) ->
+ L = legacy_int_to_bitlist(Val),
+ check_named_bitstring(<< <<B:1>> || B <- L >>, Names, Bs, BsSize);
+check_legacy_named_bitstring(Val, Names, Bs, BsSize) ->
+ check_named_bitstring(Val, Names, Bs, BsSize).
+
+legacy_int_to_bitlist(0) ->
+ [];
+legacy_int_to_bitlist(Int) ->
+ [Int band 1|legacy_int_to_bitlist(Int bsr 1)].
+
+check_named_bitstring(Bs, Bs, _) ->
+ true;
+check_named_bitstring(Val, Bs, BsSize) ->
+ Rest = bit_size(Val) - BsSize,
+ case Val of
+ <<Bs:BsSize/bits,0:Rest>> ->
+ true;
_ ->
- throw({error,{no,named,element,at,pos,Pos}})
- end;
-bit_list_to_nbl([], _, _, Acc) ->
- Acc.
-
-remove_trailing_zeros(L2) ->
- remove_trailing_zeros1(lists:reverse(L2)).
-remove_trailing_zeros1(L) ->
- lists:reverse(lists:dropwhile(fun(0)->true;
- (_) ->false
- end,
- L)).
-
-check_bitstring1([H|T], NBL) ->
- case lists:member(H, NBL) of
- true -> check_bitstring1(T, NBL);
- V -> throw({error,V})
- end;
-check_bitstring1([], _) ->
- true.
-
-cbs_to_bit_list({Unused, <<B7:1,B6:1,B5:1,B4:1,B3:1,B2:1,B1:1,B0:1,Rest/binary>>}) when byte_size(Rest) >= 1 ->
- [B7,B6,B5,B4,B3,B2,B1,B0|cbs_to_bit_list({Unused,Rest})];
-cbs_to_bit_list({0,<<B7:1,B6:1,B5:1,B4:1,B3:1,B2:1,B1:1,B0:1>>}) ->
- [B7,B6,B5,B4,B3,B2,B1,B0];
-cbs_to_bit_list({Unused,Bin}) when byte_size(Bin) =:= 1 ->
- Used = 8-Unused,
- <<Int:Used,_:Unused>> = Bin,
- int_to_bit_list(Int, [], Used).
-
+ throw(false)
+ end.
-check_octetstring(_, asn1_DEFAULT) ->
- true;
-check_octetstring(L, L) ->
- true;
-check_octetstring(L, Int) when is_list(L), is_integer(Int) ->
- case integer_to_octetlist(Int) of
- L -> true;
- V -> throw({error,V})
+check_named_bitstring([_|_]=Val, Names, _, _) ->
+ case lists:sort(Val) of
+ Names -> true;
+ _ -> throw(false)
end;
-check_octetstring(_, V) ->
- throw({error,V}).
-
-integer_to_octetlist(Int) ->
- integer_to_octetlist(Int, []).
-integer_to_octetlist(0, Acc) ->
- Acc;
-integer_to_octetlist(Int, Acc) ->
- integer_to_octetlist(Int bsr 8, [(Int band 255)|Acc]).
-
-check_null(_, asn1_DEFAULT) ->
+check_named_bitstring(Bs, _, Bs, _) ->
true;
-check_null('NULL', 'NULL') ->
- true;
-check_null(_, V) ->
- throw({error,V}).
+check_named_bitstring(Val, _, Bs, BsSize) ->
+ Rest = bit_size(Val) - BsSize,
+ case Val of
+ <<Bs:BsSize/bits,0:Rest>> ->
+ true;
+ _ ->
+ throw(false)
+ end.
-check_objectidentifier(_, asn1_DEFAULT) ->
- true;
-check_objectidentifier(OI, OI) ->
+check_octetstring(V, V) ->
true;
-check_objectidentifier(DOI, OI) when is_tuple(DOI), is_tuple(OI) ->
- check_objectidentifier1(tuple_to_list(DOI), tuple_to_list(OI));
-check_objectidentifier(_, OI) ->
- throw({error,OI}).
-
-check_objectidentifier1([V|Rest1], [V|Rest2]) ->
- check_objectidentifier1(Rest1, Rest2, V);
-check_objectidentifier1([V1|Rest1], [V2|Rest2]) ->
- case reserved_objectid(V2, []) of
- V1 ->
- check_objectidentifier1(Rest1, Rest2, [V1]);
- V ->
- throw({error,V})
- end.
-check_objectidentifier1([V|Rest1], [V|Rest2], Above) ->
- check_objectidentifier1(Rest1, Rest2, [V|Above]);
-check_objectidentifier1([V1|Rest1], [V2|Rest2], Above) ->
- case reserved_objectid(V2, Above) of
- V1 ->
- check_objectidentifier1(Rest1, Rest2, [V1|Above]);
- V ->
- throw({error,V})
+check_octetstring(V, Def) when is_list(V) ->
+ case list_to_binary(V) of
+ Def -> true;
+ _ -> throw(false)
+ end;
+check_octetstring(_, _) ->
+ throw(false).
+
+check_objectidentifier(Value, {Prefix,Tail}) when is_tuple(Value) ->
+ check_oid(tuple_to_list(Value), Prefix, Tail);
+check_objectidentifier(_, _) ->
+ throw(false).
+
+check_oid([H|T], [K|Ks], Tail) ->
+ case lists:member(H, K) of
+ false -> throw(false);
+ true -> check_oid(T, Ks, Tail)
end;
-check_objectidentifier1([], [], _) ->
+check_oid(Tail, [], Tail) ->
true;
-check_objectidentifier1(_, V, _) ->
- throw({error,object,identifier,V}).
-
-%% ITU-T Rec. X.680 Annex B - D
-reserved_objectid('itu-t', []) -> 0;
-reserved_objectid('ccitt', []) -> 0;
-%% arcs below "itu-t"
-reserved_objectid('recommendation', [0]) -> 0;
-reserved_objectid('question', [0]) -> 1;
-reserved_objectid('administration', [0]) -> 2;
-reserved_objectid('network-operator', [0]) -> 3;
-reserved_objectid('identified-organization', [0]) -> 4;
-
-reserved_objectid(iso, []) -> 1;
-%% arcs below "iso", note that number 1 is not used
-reserved_objectid('standard', [1]) -> 0;
-reserved_objectid('member-body', [1]) -> 2;
-reserved_objectid('identified-organization', [1]) -> 3;
-
-reserved_objectid('joint-iso-itu-t', []) -> 2;
-reserved_objectid('joint-iso-ccitt', []) -> 2;
-
-reserved_objectid(_, _) -> false.
-
+check_oid(_, _, _) ->
+ throw(false).
check_objectdescriptor(_, asn1_DEFAULT) ->
true;
@@ -262,21 +177,6 @@ check_real(R, R) ->
check_real(_, _) ->
throw({error,{not_implemented_yet,check_real}}).
-check_enum(_, asn1_DEFAULT, _) ->
- true;
-check_enum(Val, Val, _) ->
- true;
-check_enum(Int, Atom, Enumerations) when is_integer(Int), is_atom(Atom) ->
- case lists:keyfind(Atom, 1, Enumerations) of
- {_,Int} -> true;
- _ -> throw({error,{enumerated,Int,Atom}})
- end;
-check_enum(DefVal, Val, _) ->
- throw({error,{enumerated,DefVal,Val}}).
-
-
-check_restrictedstring(_, asn1_DEFAULT) ->
- true;
check_restrictedstring(Val, Val) ->
true;
check_restrictedstring([V|Rest1], [V|Rest2]) ->
@@ -295,7 +195,15 @@ check_restrictedstring({V1,V2,V3,V4}, [V1,V2,V3,V4]) ->
check_restrictedstring([V1,V2,V3,V4], {V1,V2,V3,V4}) ->
true;
%% character string list
-check_restrictedstring(V1, V2) when is_list(V1), is_tuple(V2) ->
- check_restrictedstring(V1, tuple_to_list(V2));
-check_restrictedstring(V1, V2) ->
- throw({error,{restricted,string,V1,V2}}).
+check_restrictedstring(V1, V2) when is_tuple(V1) ->
+ check_restrictedstring(tuple_to_list(V1), V2);
+check_restrictedstring(_, _) ->
+ throw(false).
+
+check_literal_sof(Value, Default) ->
+ case lists:sort(Value) of
+ Default ->
+ true;
+ _ ->
+ throw(false)
+ end.
diff --git a/lib/asn1/src/asn1rtt_ext.erl b/lib/asn1/src/asn1rtt_ext.erl
index 46adb2007d..f3eee1cdd5 100644
--- a/lib/asn1/src/asn1rtt_ext.erl
+++ b/lib/asn1/src/asn1rtt_ext.erl
@@ -38,7 +38,7 @@ transform_to_EXTERNAL1990([{'context-negotiation',Context_negot}|Rest], Acc) ->
transform_to_EXTERNAL1990([asn1_NOVALUE|Rest], Acc) ->
transform_to_EXTERNAL1990(Rest, [asn1_NOVALUE|Acc]);
transform_to_EXTERNAL1990([Data_val_desc,Data_value], Acc)
- when is_list(Data_value)->
+ when is_list(Data_value); is_binary(Data_value) ->
list_to_tuple(lists:reverse([{'octet-aligned',Data_value},
Data_val_desc|Acc]));
transform_to_EXTERNAL1990([Data_val_desc,Data_value], Acc)
diff --git a/lib/asn1/src/asn1rtt_per_common.erl b/lib/asn1/src/asn1rtt_per_common.erl
index 3309e6a4ca..0290c75a28 100644
--- a/lib/asn1/src/asn1rtt_per_common.erl
+++ b/lib/asn1/src/asn1rtt_per_common.erl
@@ -30,6 +30,7 @@
decode_big_chars/2,
decode_oid/1,decode_relative_oid/1,
encode_chars/2,encode_chars/3,
+ encode_chars_compact_map/3,
encode_chars_16bit/1,encode_big_chars/1,
encode_fragmented/2,
encode_oid/1,encode_relative_oid/1,
@@ -37,8 +38,10 @@
bitstring_from_positions/1,bitstring_from_positions/2,
to_bitstring/1,to_bitstring/2,
to_named_bitstring/1,to_named_bitstring/2,
- is_default_bitstring/5,
- extension_bitmap/3]).
+ bs_drop_trailing_zeroes/1,adjust_trailing_zeroes/2,
+ is_default_bitstring/3,is_default_bitstring/5,
+ extension_bitmap/3,
+ open_type_to_binary/1,legacy_open_type_to_binary/1]).
-define('16K',16384).
@@ -106,6 +109,9 @@ encode_chars(Val, NumBits) ->
encode_chars(Val, NumBits, {Lb,Tab}) ->
<< <<(enc_char(C, Lb, Tab)):NumBits>> || C <- Val >>.
+encode_chars_compact_map(Val, NumBits, {Lb,Limit}) ->
+ << <<(enc_char_cm(C, Lb, Limit)):NumBits>> || C <- Val >>.
+
encode_chars_16bit(Val) ->
L = [case C of
{0,0,A,B} -> [A,B];
@@ -272,6 +278,25 @@ to_named_bitstring(Val, Lb) ->
%% for correctness, not speed.
adjust_trailing_zeroes(to_bitstring(Val), Lb).
+is_default_bitstring(asn1_DEFAULT, _, _) ->
+ true;
+is_default_bitstring(Named, Named, _) ->
+ true;
+is_default_bitstring(Bs, _, Bs) ->
+ true;
+is_default_bitstring(Val, _, Def) when is_bitstring(Val) ->
+ Sz = bit_size(Def),
+ case Val of
+ <<Def:Sz/bitstring,T/bitstring>> ->
+ NumZeroes = bit_size(T),
+ case T of
+ <<0:NumZeroes>> -> true;
+ _ -> false
+ end;
+ _ ->
+ false
+ end.
+
is_default_bitstring(asn1_DEFAULT, _, _, _, _) ->
true;
is_default_bitstring({Unused,Bin}, V0, V1, V2, V3) when is_integer(Unused) ->
@@ -306,6 +331,16 @@ is_default_bitstring(_, _, _, _, _) -> false.
extension_bitmap(Val, Pos, Limit) ->
extension_bitmap(Val, Pos, Limit, 0).
+open_type_to_binary({asn1_OPENTYPE,Bin}) when is_binary(Bin) ->
+ Bin.
+
+legacy_open_type_to_binary({asn1_OPENTYPE,Bin}) when is_binary(Bin) ->
+ Bin;
+legacy_open_type_to_binary(Bin) when is_binary(Bin) ->
+ Bin;
+legacy_open_type_to_binary(List) when is_list(List) ->
+ List.
+
%%%
%%% Internal functions.
%%%
@@ -352,6 +387,15 @@ enc_char(C0, Lb, Tab) ->
illegal_char_error()
end.
+enc_char_cm(C0, Lb, Limit) ->
+ C = C0 - Lb,
+ if
+ 0 =< C, C < Limit ->
+ C;
+ true ->
+ illegal_char_error()
+ end.
+
illegal_char_error() ->
error({error,{asn1,"value forbidden by FROM constraint"}}).
@@ -438,6 +482,8 @@ adjust_trailing_zeroes(Bs0, Lb) ->
bs_drop_trailing_zeroes(Bs) ->
bs_drop_trailing_zeroes(Bs, bit_size(Bs)).
+bs_drop_trailing_zeroes(Bs, 0) ->
+ Bs;
bs_drop_trailing_zeroes(Bs0, Sz0) when Sz0 < 8 ->
<<Byte:Sz0>> = Bs0,
Sz = Sz0 - ntz(Byte),
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index 83bd66a631..432197eec0 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -50,22 +50,24 @@ all() ->
{group, performance}].
groups() ->
- [{compile, parallel([]),
+ Parallel = asn1_test_lib:parallel(),
+ [{compile, Parallel,
[c_syntax,
c_string,
c_implicit_before_choice,
constraint_equivalence]},
- {ber, parallel([]),
+ {ber, Parallel,
[ber_choiceinseq,
% Uses 'SOpttest'
- ber_optional]},
+ ber_optional,
+ tagdefault_automatic]},
{app_test, [], [{asn1_app_test, all}]},
{appup_test, [], [{asn1_appup_test, all}]},
- {parallel, parallel([]),
+ {parallel, Parallel,
[cover,
xref,
{group, ber},
@@ -133,14 +135,13 @@ groups() ->
testChoiceIndefinite,
per_open_type,
testInfObjectClass,
- testParameterizedInfObj,
+ testParam,
testFragmented,
testMergeCompile,
testobj,
testDeepTConstr,
testExport,
testImport,
- testParamBasic,
testDER,
testDEFAULT,
testMvrasn6,
@@ -173,13 +174,6 @@ groups() ->
testTimer_per,
testTimer_uper]}].
-parallel(Options) ->
- case erlang:system_info(smp_support) andalso
- erlang:system_info(schedulers) > 1 of
- true -> [parallel|Options];
- false -> Options
- end.
-
%%------------------------------------------------------------------------------
%% Init/end
%%------------------------------------------------------------------------------
@@ -328,6 +322,10 @@ testCompactBitString(Config, Rule, Opts) ->
testPrimStrings(Config) ->
test(Config, fun testPrimStrings/3, [ber,{ber,[der]},per,uper]).
testPrimStrings(Config, Rule, Opts) ->
+ LegacyOpts = [legacy_erlang_types|Opts],
+ asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config,
+ [Rule|LegacyOpts]),
+ testPrimStrings_cases(Rule, LegacyOpts),
asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config, [Rule|Opts]),
testPrimStrings_cases(Rule, Opts),
asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config,
@@ -424,16 +422,15 @@ testMultipleLevels(Config, Rule, Opts) ->
asn1_test_lib:compile("MultipleLevels", Config, [Rule|Opts]),
testMultipleLevels:main(Rule).
-testDef(Config) -> test(Config, fun testDef/3).
-testDef(Config, Rule, Opts) ->
- asn1_test_lib:compile("Def", Config, [Rule|Opts]),
- testDef:main(Rule).
-
testDEFAULT(Config) ->
test(Config, fun testDEFAULT/3, [ber,{ber,[der]},per,uper]).
testDEFAULT(Config, Rule, Opts) ->
asn1_test_lib:compile_all(["Def","Default"], Config, [Rule|Opts]),
testDef:main(Rule),
+ testSeqSetDefaultVal:main(Rule, Opts),
+ asn1_test_lib:compile_all(["Def","Default"], Config,
+ [legacy_erlang_types,Rule|Opts]),
+ testDef:main(Rule),
testSeqSetDefaultVal:main(Rule, Opts).
testOpt(Config) -> test(Config, fun testOpt/3).
@@ -523,12 +520,6 @@ testSetDefault(Config, Rule, Opts) ->
asn1_test_lib:compile("SetDefault", Config, [Rule|Opts]),
testSetDefault:main(Rule).
-testParamBasic(Config) ->
- test(Config, fun testParamBasic/3, [ber,{ber,[der]},per,uper]).
-testParamBasic(Config, Rule, Opts) ->
- asn1_test_lib:compile("ParamBasic", Config, [Rule|Opts]),
- testParamBasic:main(Rule).
-
testSetOptional(Config) -> test(Config, fun testSetOptional/3).
testSetOptional(Config, Rule, Opts) ->
asn1_test_lib:compile("SetOptional", Config, [Rule|Opts]),
@@ -669,6 +660,19 @@ ber_optional(Config, Rule, Opts) ->
{'C', asn1_NOVALUE, 111, asn1_NOVALUE}},
asn1_test_lib:roundtrip('SOpttest', 'S', V).
+tagdefault_automatic(Config) ->
+ test(Config, fun tagdefault_automatic/3, [ber]).
+tagdefault_automatic(Config, Rule, Opts) ->
+ asn1_test_lib:compile("TAGDEFAULT-AUTOMATIC", Config, [Rule|Opts]),
+ << 48,8,128,2,100,101,129,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Tagged', {'Tagged', << 100,101 >>, << 110,111 >>}),
+ << 48,8,128,2,100,101,129,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Untagged', {'Untagged', << 100,101 >>, << 110,111 >>}),
+ << 48,8,4,2,100,101,130,2,110,111 >> =
+ asn1_test_lib:roundtrip_enc('TAGDEFAULT-AUTOMATIC', 'Mixed', {'Mixed', << 100,101 >>, << 110,111 >>}),
+
+ ok.
+
%% records used by test-case default
-record('Def1', {bool0,
bool1 = asn1_DEFAULT,
@@ -761,12 +765,16 @@ testInfObjectClass(Config, Rule, Opts) ->
testInfObjectClass:main(Rule),
testInfObj:main(Rule).
-testParameterizedInfObj(Config) ->
- test(Config, fun testParameterizedInfObj/3).
-testParameterizedInfObj(Config, Rule, Opts) ->
- Files = ["Param","Param2"],
+testParam(Config) ->
+ test(Config, fun testParam/3, [ber,{ber,[der]},per,uper]).
+testParam(Config, Rule, Opts) ->
+ Files = ["ParamBasic","Param","Param2"],
asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
- testParameterizedInfObj:main(Config, Rule).
+ testParamBasic:main(Rule),
+ testParameterizedInfObj:main(Config, Rule),
+ asn1_test_lib:compile("Param", Config,
+ [legacy_erlang_types,Rule|Opts]),
+ testParameterizedInfObj:param(Rule).
testFragmented(Config) ->
test(Config, fun testFragmented/3).
@@ -784,7 +792,8 @@ testMergeCompile(Config, Rule, Opts) ->
testobj(Config) -> test(Config, fun testobj/3).
testobj(Config, Rule, Opts) ->
- asn1_test_lib:compile("RANAP", Config, [Rule|Opts]),
+ asn1_test_lib:compile("RANAP", Config, [legacy_erlang_types,
+ Rule|Opts]),
asn1_test_lib:compile_erlang("testobj", Config, []),
ok = testobj:run(),
ok = testParameterizedInfObj:ranap(Rule).
@@ -804,14 +813,15 @@ testExport(Config) ->
testImport(Config) ->
test(Config, fun testImport/3).
testImport(Config, Rule, Opts) ->
- {error, _} = asn1ct:compile(filename:join(?config(data_dir, Config),
- "ImportsFrom"),
- [Rule, {outdir, ?config(priv_dir, Config)}
- |Opts]).
+ Files = ["ImportsFrom","ImportsFrom2","ImportsFrom3"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ 42 = 'ImportsFrom':i(),
+ ok.
testMegaco(Config) -> test(Config, fun testMegaco/3).
testMegaco(Config, Rule, Opts) ->
- {ok, Module1, Module2} = testMegaco:compile(Config, Rule, Opts),
+ {ok, Module1, Module2} = testMegaco:compile(Config, Rule,
+ [legacy_erlang_types|Opts]),
ok = testMegaco:main(Module1, Config),
ok = testMegaco:main(Module2, Config).
@@ -850,7 +860,7 @@ duplicate_tags(Config) ->
rtUI(Config) -> test(Config, fun rtUI/3).
rtUI(Config, Rule, Opts) ->
asn1_test_lib:compile("Prim", Config, [Rule|Opts]),
- {ok, _} = asn1rt:info('Prim'),
+ _ = 'Prim':info(),
Rule = 'Prim':encoding_rule(),
io:format("Default BIT STRING format: ~p\n",
['Prim':bit_string_format()]).
@@ -892,7 +902,8 @@ specialized_decodes(Config, Rule, Opts) ->
"PartialDecMyHTTP.asn",
"MEDIA-GATEWAY-CONTROL.asn",
"P-Record"],
- Config, [Rule, asn1config|Opts]),
+ Config,
+ [Rule,legacy_erlang_types,asn1config|Opts]),
test_partial_incomplete_decode:test(Config),
test_selective_decode:test().
@@ -1022,7 +1033,8 @@ test_x691(Config, Rule, Opts) ->
test_x691:cases(Rule),
%% OTP-7708.
- asn1_test_lib:compile("EUTRA-extract-55", Config, [Rule|Opts]),
+ asn1_test_lib:compile("EUTRA-extract-55", Config,
+ [legacy_erlang_types,Rule|Opts]),
%% OTP-7763.
Val = {'Seq',15,lists:duplicate(8, 0),[0],lists:duplicate(28, 0),15,true},
@@ -1128,21 +1140,21 @@ END
ok = asn1ct:compile(File, [{outdir, PrivDir}]).
-timer_compile(Config, Rule, Opts) ->
+timer_compile(Config, Rule) ->
asn1_test_lib:compile_all(["H235-SECURITY-MESSAGES", "H323-MESSAGES"],
- Config, [Rule|Opts]).
+ Config, [no_ok_wrapper,Rule]).
testTimer_ber(Config) ->
- timer_compile(Config,ber,[]),
- testTimer:go(Config,ber).
+ timer_compile(Config, ber),
+ testTimer:go().
testTimer_per(Config) ->
- timer_compile(Config,per,[]),
- testTimer:go(Config,per).
+ timer_compile(Config, per),
+ testTimer:go().
testTimer_uper(Config) ->
- timer_compile(Config,uper,[]),
- {comment,_} = testTimer:go(Config,uper).
+ timer_compile(Config, uper),
+ testTimer:go().
%% Test of multiple-line comment, OTP-8043
testComment(suite) -> [];
@@ -1200,8 +1212,8 @@ ticket_7407_code(FinalPadding) ->
eutra1(msg) ->
{'BCCH-BCH-Message',
- {'MasterInformationBlock',[0,1,0,1],[1,0,1,0],
- {'PHICH-Configuration',short,ffs},[1,0,1,0,0,0,0,0]}}.
+ {'MasterInformationBlock',<<2#0101:4>>,<<2#1010:4>>,
+ {'PHICH-Configuration',short,ffs},<<2#10100000>>}}.
eutra1(result, true) ->
<<90,80,0>>;
diff --git a/lib/asn1/test/asn1_SUITE_data/Constraints.py b/lib/asn1/test/asn1_SUITE_data/Constraints.py
index c3b3aebd6d..3495cd841b 100644
--- a/lib/asn1/test/asn1_SUITE_data/Constraints.py
+++ b/lib/asn1/test/asn1_SUITE_data/Constraints.py
@@ -16,6 +16,7 @@ SemiConstrained ::= INTEGER (100..MAX)
NegSemiConstrained ::= INTEGER (-128..MAX)
SemiConstrainedExt ::= INTEGER (42..MAX, ...)
NegSemiConstrainedExt ::= INTEGER (-128..MAX, ...)
+SemiNamed ::= INTEGER {a(100), b(200)} (100..MAX)
-- Extensions --
LongLongExt ::= INTEGER (0..18446744073709551615, ..., -5000..-1)
Range256to65536Ext ::= INTEGER (256..65536, ..., 1000000..9000000)
@@ -65,10 +66,12 @@ Wednesday ::= Day(wednesday)
Thing ::= INTEGER {fred (0),fred2 (1),fred3 (2)}
-
-
AnotherThing ::= Thing (fred | fred2)
+OneMoreThing ::= INTEGER {wilma(0), fred(1), betty(3), barney(2)}
+OneMoreThing-1 ::= OneMoreThing (wilma | fred)
+OneMoreThing-2 ::= OneMoreThing (fred | barney)
+
I ::= INTEGER (0|15..269) -- OTP-5457
X1 ::= INTEGER (1..4 | 8 | 10 | 20) -- OTP-9946
diff --git a/lib/asn1/test/asn1_SUITE_data/Constructed.asn b/lib/asn1/test/asn1_SUITE_data/Constructed.asn
index 09a66d0c0d..bd49741726 100644
--- a/lib/asn1/test/asn1_SUITE_data/Constructed.asn
+++ b/lib/asn1/test/asn1_SUITE_data/Constructed.asn
@@ -1,6 +1,3 @@
-
-
-
Constructed DEFINITIONS ::=
BEGIN
@@ -20,4 +17,7 @@ C ::= CHOICE {
S3 ::= SEQUENCE {i INTEGER}
S3ext ::= SEQUENCE {i INTEGER, ...}
+
+OS ::= OCTET STRING
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1 b/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1
index c8145bad63..e279a180c1 100644
--- a/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/ContextSwitchingTypes.asn1
@@ -21,6 +21,10 @@ val3-T T ::= {identification context-negotiation:{presentation-context-id 12,
transfer-syntax {1 2 3}},
data-value '123'H}
+val4-T T ::= {identification presentation-context-id:42,
+ data-value-descriptor "FooBar",
+ data-value '123'H}
+
-- EMBEDDED PDV type
EP ::= EMBEDDED PDV
diff --git a/lib/asn1/test/asn1_SUITE_data/Default.asn b/lib/asn1/test/asn1_SUITE_data/Default.asn
index 168ce50bb2..b91660381a 100644
--- a/lib/asn1/test/asn1_SUITE_data/Default.asn
+++ b/lib/asn1/test/asn1_SUITE_data/Default.asn
@@ -25,6 +25,10 @@ SeqBS ::= SEQUENCE {
e BIT STRING DEFAULT '01011010'B
}
+SeqBS2 ::= SEQUENCE {
+ bs BIT STRING {a(0), z(25)} DEFAULT '101'B
+}
+
SetBS ::= SET {
a BIT STRING DEFAULT '1010110'B,
b BIT STRING DEFAULT 'A8A'H,
@@ -156,4 +160,23 @@ four INTEGER ::= 4
cr IA5String ::= {0,13}
+SeqNamedInts ::= SEQUENCE {
+ i1 INTEGER {first(0), last(31)} DEFAULT 15,
+ i2 INTEGER {first(0), last(31)} DEFAULT 31
+}
+
+S5 ::= SEQUENCE {
+ s3 S3 DEFAULT {},
+ so SEQUENCE OF OBJECT IDENTIFIER DEFAULT {
+ {itu-t question 999},
+ {itu-t question 555}
+ },
+ soe SEQUENCE OF OBJECT IDENTIFIER DEFAULT { }
+}
+
+SOI ::= SEQUENCE {
+ soi SEQUENCE OF OBJECT IDENTIFIER
+ DEFAULT { {iso member-body f(250) 9 55}, {iso member-body f(250) 3 4} }
+}
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/DoubleEllipses.asn b/lib/asn1/test/asn1_SUITE_data/DoubleEllipses.asn
index e90cf55d61..846c3e7569 100644
--- a/lib/asn1/test/asn1_SUITE_data/DoubleEllipses.asn
+++ b/lib/asn1/test/asn1_SUITE_data/DoubleEllipses.asn
@@ -12,6 +12,15 @@ Seq ::= SEQUENCE
c BOOLEAN
}
+SeqV1 ::= SEQUENCE
+ {
+ a INTEGER,
+ ...,
+ b BOOLEAN,
+ ...
+ }
+
+
SeqV2 ::= SEQUENCE
{
a INTEGER,
@@ -50,6 +59,18 @@ SeqAltV2 ::= SEQUENCE
g INTEGER
}
+SeqDoubleEmpty1 ::= SEQUENCE {
+ ...,
+ ...
+}
+
+SeqDoubleEmpty2 ::= SEQUENCE {
+ a BOOLEAN,
+ b INTEGER OPTIONAL,
+ ...,
+ ...
+}
+
Set ::= SET {
a INTEGER,
...,
@@ -57,6 +78,14 @@ Set ::= SET {
c BOOLEAN
}
+
+SetV1 ::= SET {
+ a INTEGER,
+ ...,
+ b BOOLEAN,
+ ...
+ }
+
SetV2 ::= SET
{
a INTEGER,
@@ -96,4 +125,4 @@ SetAltV2 ::= SET
}
-END \ No newline at end of file
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1 b/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
index 8dc5f3d7e1..74fa97e7aa 100644
--- a/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
@@ -18,6 +18,8 @@ Ext1 ::= ENUMERATED {
magenta(9)
}
+SubExt1 ::= Ext1 ( blue | orange | black )
+
Noext ::= ENUMERATED {
blue(0),
red(1),
diff --git a/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1 b/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
index 8c4f3a8f7e..b4ea943040 100644
--- a/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
@@ -16,7 +16,9 @@ Names ::= SEQUENCE {
thirdName [2] INSTANCE OF OTHER-NAME ({TI})
}
-OTHER-NAME ::= TYPE-IDENTIFIER
+OTHER-NAME ::= YET-ANOTHER-NAME
+
+YET-ANOTHER-NAME ::= TYPE-IDENTIFIER
TI OTHER-NAME ::= {{INTEGER IDENTIFIED BY {2 4}} |
{Seq IDENTIFIED BY {2 3 4}} |
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
index 896a35d627..32b8f75dde 100644
--- a/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
@@ -1,16 +1,8 @@
-ImportsFrom DEFINITIONS ::=
-
+ImportsFrom DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-IMPORTS
-Type1, Type2, Type3
-FROM RemoteFile1 objid
-val1, val2, val3
-FROM RemoteFile2;
-
-objid OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) remote-operations(4) notation(0)}
-
-LocalType ::= INTEGER
+IMPORTS Int FROM ImportsFrom2;
+i Int ::= 42
END
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1
new file mode 100644
index 0000000000..b0c29d24ae
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1
@@ -0,0 +1,7 @@
+ImportsFrom2 DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+IMPORTS Int FROM ImportsFrom3;
+
+LocalDef ::= OCTET STRING
+
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1
new file mode 100644
index 0000000000..ca27b20697
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1
@@ -0,0 +1,4 @@
+ImportsFrom3 DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ Int ::= INTEGER (0..63)
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObj.asn b/lib/asn1/test/asn1_SUITE_data/InfObj.asn
index 880e81c3b1..719119f418 100644
--- a/lib/asn1/test/asn1_SUITE_data/InfObj.asn
+++ b/lib/asn1/test/asn1_SUITE_data/InfObj.asn
@@ -255,6 +255,51 @@ Multiple-Optionals ::= SEQUENCE {
t3 [2] MULTIPLE-OPTIONALS.&T3 ({Multiple-Optionals-Set}{@id}) OPTIONAL
}
+-- Test different ways of constructing object sets.
+
+OBJECT-SET-TEST ::= CLASS {
+ &id INTEGER UNIQUE,
+ &Type
+} WITH SYNTAX {
+ &id IS &Type
+}
+
+ObjectSetTest{OBJECT-SET-TEST:ObjectSet} ::=
+ SEQUENCE {
+ id OBJECT-SET-TEST.&id ({ObjectSet}),
+ type OBJECT-SET-TEST.&Type ({ObjectSet}{@id})
+ }
+
+ost1 OBJECT-SET-TEST ::= { 1 IS BIT STRING }
+ost2 OBJECT-SET-TEST ::= { 2 IS OCTET STRING }
+ost3 OBJECT-SET-TEST ::= { 3 IS ENUMERATED {donald,scrooge} }
+ost4 OBJECT-SET-TEST ::= { 4 IS BOOLEAN }
+ost5 OBJECT-SET-TEST ::= { 5 IS INTEGER (0..15) }
+
+Ost12 OBJECT-SET-TEST ::= { ost1 | ost2 }
+Ost123 OBJECT-SET-TEST ::= { ost3 | Ost12 }
+Ost1234 OBJECT-SET-TEST ::= { Ost123 | ost4 }
+Ost45 OBJECT-SET-TEST ::= { ost4 | ost5 }
+Ost12345 OBJECT-SET-TEST ::= { Ost123 | Ost45 }
+
+OstSeq12 ::= ObjectSetTest{ {Ost12} }
+OstSeq123 ::= ObjectSetTest{ {Ost123} }
+OstSeq1234 ::= ObjectSetTest{ {Ost1234} }
+OstSeq45 ::= ObjectSetTest{ {Ost45} }
+OstSeq12345 ::= ObjectSetTest{ {Ost12345} }
+
+ExOst12 OBJECT-SET-TEST ::= { ost1, ..., ost2 }
+ExOst123 OBJECT-SET-TEST ::= { ost3, ..., ExOst12 }
+--ExOst1234 OBJECT-SET-TEST ::= { ExOst123, ..., ost4 }
+ExOst45 OBJECT-SET-TEST ::= { ost4, ..., ost5 }
+ExOst12345 OBJECT-SET-TEST ::= { ExOst123, ..., ExOst45 }
+
+ExOstSeq12 ::= ObjectSetTest{ {ExOst12} }
+ExOstSeq123 ::= ObjectSetTest{ {ExOst123} }
+--ExOstSeq1234 ::= ObjectSetTest{ {ExOst1234} }
+ExOstSeq45 ::= ObjectSetTest{ {ExOst45} }
+ExOstSeq12345 ::= ObjectSetTest{ {ExOst12345} }
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 b/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1
index 491bdf8956..68fc782f33 100644
--- a/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1
@@ -20,4 +20,26 @@ T21 ::= General2{PrintableString}
T22 ::= General2{BIT STRING}
+
+--
+-- Test a class parameter that is the governor for another parameter.
+--
+
+AlgorithmIdentifier{ALGORITHM-TYPE, ALGORITHM-TYPE:AlgorithmSet} ::=
+ SEQUENCE {
+ algorithm ALGORITHM-TYPE.&id ({AlgorithmSet}),
+ type ALGORITHM-TYPE.&Type ({AlgorithmSet}{@algorithm})
+ }
+
+AnAlgorithm ::= AlgorithmIdentifier{ SIGNATURE-ALGORITHM,
+ { {KEY 1 CONTAINING INTEGER} |
+ {KEY 2 CONTAINING BOOLEAN} } }
+
+SIGNATURE-ALGORITHM ::= CLASS {
+ &id INTEGER UNIQUE,
+ &Type
+} WITH SYNTAX {
+ KEY &id CONTAINING &Type
+}
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
index 20c4126c0b..7068674647 100644
--- a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
@@ -16,4 +16,11 @@ Seq ::= SEQUENCE
Empty ::= SEQUENCE {}
+Big ::= SEQUENCE {
+ ...,
+ os1 [1] OCTET STRING (SIZE (120..130)) OPTIONAL,
+ os2 [2] OCTET STRING (SIZE (128..256)) OPTIONAL,
+ os3 [3] OCTET STRING (SIZE (17000..30000)) OPTIONAL
+}
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/Set.py b/lib/asn1/test/asn1_SUITE_data/Set.py
index 4062f6b804..3928004e6b 100644
--- a/lib/asn1/test/asn1_SUITE_data/Set.py
+++ b/lib/asn1/test/asn1_SUITE_data/Set.py
@@ -80,8 +80,8 @@ SetOpt3 ::= SET
SetIn ::= SET
{
- boolIn BOOLEAN,
- intIn INTEGER
+ boolIn BOOLEAN OPTIONAL,
+ intIn INTEGER OPTIONAL
}
diff --git a/lib/asn1/test/asn1_SUITE_data/TAGDEFAULT-AUTOMATIC.asn b/lib/asn1/test/asn1_SUITE_data/TAGDEFAULT-AUTOMATIC.asn
new file mode 100644
index 0000000000..2fcba1f71e
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/TAGDEFAULT-AUTOMATIC.asn
@@ -0,0 +1,25 @@
+TAGDEFAULT-AUTOMATIC DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+
+EXPORTS
+ Tagged,
+ Untagged,
+ Mixed
+;
+
+Tagged ::= SEQUENCE {
+ o0 [0] OCTET STRING,
+ o1 [1] OCTET STRING
+}
+
+Untagged ::= SEQUENCE {
+ o0 OCTET STRING,
+ o1 OCTET STRING
+}
+
+Mixed ::= SEQUENCE {
+ o0 OCTET STRING,
+ o2 [2] OCTET STRING
+}
+
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
index 06eba8b6eb..0bf4425263 100644
--- a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
+++ b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
@@ -47,7 +47,7 @@ val('TransactionPDU') ->
dialoguePortion=val('DialoguePortion'),
componentPortion=val('ComponentSequence')};
val('TransactionID') ->
- "OCTET STRING";
+ <<"OCTET STRING">>;
val('DialoguePortion') ->
#'DialoguePortion'{version=val('ProtocolVersion'),
applicationContext={integerApplicationId,12},
@@ -57,23 +57,23 @@ val('DialoguePortion') ->
val('Confidentiality') ->
#'Confidentiality'{confidentialityId={integerConfidentialityId,14}};
val('ProtocolVersion') ->
- "K";
+ <<"K">>;
val('UserInformation') ->
[val('EXTERNAL'),val('EXTERNAL')];
val('EXTERNAL') ->
#'EXTERNAL'{'direct-reference'={0,1,2},
- encoding={'single-ASN1-type',[1,2,3,4]}};
+ encoding={'single-ASN1-type',<<1,2,3,4>>}};
val('ComponentSequence') ->
[val('ComponentPDU',1),val('ComponentPDU',2),val('ComponentPDU',3)];
val('Invoke') ->
- #'Invoke'{componentIDs="AB",
+ #'Invoke'{componentIDs = <<"AB">>,
opcode={local,-2},
parameter=running};
val('ReturnResult') ->
- #'ReturnResult'{componentID="C",
+ #'ReturnResult'{componentID = <<"C">>,
parameter=[1,2,3,4]};
val('ReturnError') ->
- #'ReturnError'{componentID="D",
+ #'ReturnError'{componentID = <<"D">>,
errorCode={local,21},
parameter=true};
val('Abort') ->
@@ -87,8 +87,8 @@ val(Type) ->
check_result('PackageType',unidirectional,Res) ->
{unidirectional,
{'UniTransactionPDU',
- "OCTET STRING",
- {'DialoguePortion',"K",
+ <<"OCTET STRING">>,
+ {'DialoguePortion',<<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -96,14 +96,14 @@ check_result('PackageType',unidirectional,Res) ->
{'Confidentiality',
{integerConfidentialityId,14}}},
[{invokeLast,
- {_,"AB",{local,-2},running}},
- {returnResultLast,{_,"C",_}},
- {returnError,{_,"D",{local,21},true}}]}} = Res,
+ {_,<<"AB">>,{local,-2},running}},
+ {returnResultLast,{_,<<"C">>,_}},
+ {returnError,{_,<<"D">>,{local,21},true}}]}} = Res,
ok;
%% check_OT_val(OTVal);
check_result('PackageType',abort,Res)->
- {abort,{'Abort',"OCTET STRING",
- {'DialoguePortion',"K",
+ {abort,{'Abort',<<"OCTET STRING">>,
+ {'DialoguePortion',<<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -114,9 +114,9 @@ check_result('PackageType',abort,Res)->
ok;
%% check_OT_val(OTVal);
check_result('PackageType',response,Res) ->
- {response,{'TransactionPDU',"OCTET STRING",
+ {response,{'TransactionPDU',<<"OCTET STRING">>,
{'DialoguePortion',
- "K",
+ <<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -124,11 +124,11 @@ check_result('PackageType',response,Res) ->
{'Confidentiality',
{integerConfidentialityId,14}}},
[{invokeLast,
- {_,"AB",{local,-2},running}},
+ {_,<<"AB">>,{local,-2},running}},
{returnResultLast,
- {_,"C",_}},
+ {_,<<"C">>,_}},
{returnError,
- {_,"D",{local,21},true}}]}} = Res,
+ {_,<<"D">>,{local,21},true}}]}} = Res,
ok.
%% check_OT_val(OTVal).
diff --git a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
index 8e21e6ca84..a1e563f6be 100644
--- a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
+++ b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
@@ -67,8 +67,8 @@ run3(Erule) ->
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE,
- [[80,66,0,5,10,0,5,0,24,11,7,84,54,33,0,1,1,0,0,0,1,39,5,66,127,0,0,1],
- []],
+ [<<80,66,0,5,10,0,5,0,24,11,7,84,54,33,0,1,1,0,0,0,1,39,5,66,127,0,0,1>>,
+ <<>>],
{'RRC-RadioResourceConfigDedicated',
[{'RRC-SRB-ToAddMod',1,
{explicitValue,
diff --git a/lib/asn1/test/asn1_app_test.erl b/lib/asn1/test/asn1_app_test.erl
index 1225e36778..d800846b3f 100644
--- a/lib/asn1/test/asn1_app_test.erl
+++ b/lib/asn1/test/asn1_app_test.erl
@@ -134,13 +134,13 @@ get_ebin_mods(App) ->
check_asn1ct_modules(Extra) ->
ASN1CTMods = [asn1ct,asn1ct_check,asn1_db,asn1ct_pretty_format,
- asn1ct_gen,asn1ct_gen_per,asn1ct_gen_per_rt2ct,
+ asn1ct_gen,asn1ct_gen_check,asn1ct_gen_per,
asn1ct_name,asn1ct_constructed_per,asn1ct_constructed_ber,
asn1ct_gen_ber,asn1ct_constructed_ber_bin_v2,
asn1ct_gen_ber_bin_v2,asn1ct_value,
asn1ct_tok,asn1ct_parser2,asn1ct_table,
asn1ct_imm,asn1ct_func,asn1ct_rtt,
- asn1ct_eval_ext,asn1ct_eval_per,asn1ct_eval_uper],
+ asn1ct_eval_ext],
case Extra -- ASN1CTMods of
[] ->
ok;
diff --git a/lib/asn1/test/asn1_appup_test.erl b/lib/asn1/test/asn1_appup_test.erl
index a2c1423eda..7391959645 100644
--- a/lib/asn1/test/asn1_appup_test.erl
+++ b/lib/asn1/test/asn1_appup_test.erl
@@ -21,8 +21,8 @@
%% Purpose: Verify the application specifics of the asn1 application
%%----------------------------------------------------------------------
-module(asn1_appup_test).
--compile({no_auto_import,[error/1]}).
-compile(export_all).
+-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -44,16 +44,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(asn1, ".app"),
- AppupFile = file_name(asn1, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
+ Config.
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -62,349 +55,7 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+appup() ->
+ [{doc, "perform a simple check of the asn1 appup file"}].
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,asn1,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- io:format("V= ~p, UpFrom= ~p, DownTo= ~p, Modules= ~p~n",
- [V, UpFrom, DownTo, Modules]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up,I={add_application,_App},Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [up,I , Modules]),
- ok;
-check_depend(down,I={remove_application,_App},Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [down,I , Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- d("check_instructions(~w) -> bad instruction: "
- "~n Reason: ~p", [UpDown,Reason]),
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end.
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {apply, {Module, Function, Args}},
- _AllInstr, Modules)
- when is_atom(Module), is_atom(Function), is_list(Args) ->
- d("check_instruction -> entry when apply instruction with"
- "~n Module: ~p"
- "~n Function: ~p"
- "~n Args: ~p", [Module, Function, Args]),
- check_module(Module, Modules),
- check_apply(Module,Function,Args);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- d("check_instruction -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("update_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr|Instrs], Modules) ->
- d("update_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- Module = instruction_module(Instr),
- d("update_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]).
-
-instruction_module({add_module, Module}) ->
- Module;
-instruction_module({remove, {Module, _, _}}) ->
- Module;
-instruction_module({load_module, Module, _, _, _}) ->
- Module;
-instruction_module({update, Module, _, _, _, _}) ->
- Module;
-instruction_module({apply, {Module, _, _}}) ->
- Module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-check_apply(Module,Function,Args) ->
- case (catch Module:module_info()) of
- Info when is_list(Info) ->
- check_exported(Function,Args,Info);
- {'EXIT',{undef,_}} ->
- error({not_existing_module,Module})
- end.
-
-check_exported(Function,Args,Info) ->
- case lists:keysearch(exports,1,Info) of
- {value,{exports,FunList}} ->
- case lists:keysearch(Function,1,FunList) of
- {value,{_,Arity}} when Arity==length(Args) ->
- ok;
- _ ->
- error({not_exported_function,Function,length(Args)})
- end;
- _ ->
- error({bad_export,Info})
- end.
-
-check_module_depend(M, [], _) when is_atom(M) ->
- d("check_module_depend -> entry with"
- "~n M: ~p", [M]),
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- d("check_module_depend -> entry with"
- "~n M: ~p"
- "~n Deps: ~p"
- "~n Modules: ~p", [M, Deps, Modules]),
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- d("check_module_depend -> entry when bad depend with"
- "~n D: ~p", [D]),
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-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.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F, A) ->
- d(false, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
-
+ ok = ?t:appup_test(asn1).
diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl
index 417380159e..da07cd1118 100644
--- a/lib/asn1/test/asn1_test_lib.erl
+++ b/lib/asn1/test/asn1_test_lib.erl
@@ -21,19 +21,72 @@
-export([compile/3,compile_all/3,compile_erlang/3,
hex_to_bin/1,
+ parallel/0,
roundtrip/3,roundtrip/4,roundtrip_enc/3,roundtrip_enc/4]).
-include_lib("test_server/include/test_server.hrl").
+run_dialyzer() ->
+ false.
+
compile(File, Config, Options) -> compile_all([File], Config, Options).
compile_all(Files, Config, Options) ->
DataDir = ?config(data_dir, Config),
CaseDir = ?config(case_dir, Config),
- [compile_file(filename:join(DataDir, F), [{outdir, CaseDir}|Options])
+ [compile_file(filename:join(DataDir, F), [{outdir, CaseDir},
+ debug_info|Options])
|| F <- Files],
+ dialyze(Files, Options),
ok.
+parallel() ->
+ case erlang:system_info(schedulers) > 1 andalso not run_dialyzer() of
+ true -> [parallel];
+ false -> []
+ end.
+
+dialyze(Files, Options) ->
+ case not run_dialyzer() orelse lists:member(abs, Options) of
+ true -> ok;
+ false -> dialyze(Files)
+ end.
+
+dialyze(Files) ->
+ Beams0 = [code:which(module(F)) || F <- Files],
+ Beams = [code:which(asn1rt_nif)|Beams0],
+ case dialyzer:run([{files,Beams},
+ {warnings,[no_improper_lists]},
+ {get_warnings,true}]) of
+ [] ->
+ ok;
+ [_|_]=Ws ->
+ io:put_chars([[B,$\n] || B <- Beams]),
+ io:put_chars([dialyzer:format_warning(W) || W <- Ws]),
+ error(dialyzer_warnings)
+ end.
+
+module(F0) ->
+ F1 = filename:basename(F0),
+ F2 = case filename:extension(F1) of
+ ".asn" ->
+ filename:rootname(F1);
+ ".asn1" ->
+ filename:rootname(F1);
+ ".py" ->
+ filename:rootname(F1);
+ "" ->
+ F1
+ end,
+ F = case filename:extension(F2) of
+ ".set" ->
+ filename:rootname(F2);
+ "" ->
+ F2
+ end,
+ list_to_atom(F).
+%% filename:join(CaseDir, F ++ ".beam").
+
compile_file(File, Options) ->
try
ok = asn1ct:compile(File, [warnings_as_errors|Options])
@@ -59,6 +112,7 @@ roundtrip(Mod, Type, Value) ->
roundtrip(Mod, Type, Value, ExpectedValue) ->
{ok,Encoded} = Mod:encode(Type, Value),
{ok,ExpectedValue} = Mod:decode(Type, Encoded),
+ test_ber_indefinite(Mod, Type, Encoded, ExpectedValue),
ok.
roundtrip_enc(Mod, Type, Value) ->
@@ -67,6 +121,7 @@ roundtrip_enc(Mod, Type, Value) ->
roundtrip_enc(Mod, Type, Value, ExpectedValue) ->
{ok,Encoded} = Mod:encode(Type, Value),
{ok,ExpectedValue} = Mod:decode(Type, Encoded),
+ test_ber_indefinite(Mod, Type, Encoded, ExpectedValue),
Encoded.
%%%
@@ -76,3 +131,52 @@ roundtrip_enc(Mod, Type, Value, ExpectedValue) ->
hex2num(C) when $0 =< C, C =< $9 -> C - $0;
hex2num(C) when $A =< C, C =< $F -> C - $A + 10;
hex2num(C) when $a =< C, C =< $f -> C - $a + 10.
+
+test_ber_indefinite(Mod, Type, Encoded, ExpectedValue) ->
+ case Mod:encoding_rule() of
+ ber ->
+ Indefinite = iolist_to_binary(ber_indefinite(Encoded)),
+ {ok,ExpectedValue} = Mod:decode(Type, Indefinite);
+ _ ->
+ ok
+ end.
+
+%% Rewrite all definite lengths for constructed values to an
+%% indefinite length.
+ber_indefinite(Bin0) ->
+ case ber_get_tag(Bin0) of
+ done ->
+ [];
+ primitive ->
+ Bin0;
+ {constructed,Tag,Bin1} ->
+ {Len,Bin2} = ber_get_len(Bin1),
+ <<Val0:Len/binary,Bin/binary>> = Bin2,
+ Val = iolist_to_binary(ber_indefinite(Val0)),
+ [<<Tag/binary,16#80,Val/binary,0,0>>|ber_indefinite(Bin)]
+ end.
+
+ber_get_tag(<<>>) ->
+ done;
+ber_get_tag(<<_:2,0:1,_:5,_/binary>>) ->
+ primitive;
+ber_get_tag(<<_:2,1:1,_:5,_/binary>>=Bin0) ->
+ TagLen = ber_tag_length(Bin0),
+ <<Tag:TagLen/binary,Bin/binary>> = Bin0,
+ {constructed,Tag,Bin}.
+
+ber_tag_length(<<_:3,2#11111:5,T/binary>>) ->
+ ber_tag_length_1(T, 1);
+ber_tag_length(_) ->
+ 1.
+
+ber_tag_length_1(<<1:1,_:7,T/binary>>, N) ->
+ ber_tag_length_1(T, N+1);
+ber_tag_length_1(<<0:1,_:7,_/binary>>, N) ->
+ N+1.
+
+ber_get_len(<<0:1,L:7,T/binary>>) ->
+ {L,T};
+ber_get_len(<<1:1,Octets:7,T0/binary>>) ->
+ <<L:Octets/unit:8,T/binary>> = T0,
+ {L,T}.
diff --git a/lib/asn1/test/ber_decode_error.erl b/lib/asn1/test/ber_decode_error.erl
index 8be92292ee..ef11717c45 100644
--- a/lib/asn1/test/ber_decode_error.erl
+++ b/lib/asn1/test/ber_decode_error.erl
@@ -51,4 +51,22 @@ run([]) ->
{error,{asn1,{invalid_value,_}}} =
(catch 'Constructed':decode('I', <<8,7>>)),
+ %% Short indefinite length. Make sure that the decoder doesn't look
+ %% beyond the end of binary when looking for a 0,0 terminator.
+ {error,{asn1,{invalid_length,_}}} =
+ (catch 'Constructed':decode('S', sub(<<8,16#80,0,0>>, 3))),
+ {error,{asn1,{invalid_length,_}}} =
+ (catch 'Constructed':decode('S', sub(<<8,16#80,0,0>>, 2))),
+ {error,{asn1,{invalid_length,_}}} =
+ (catch 'Constructed':decode('S', sub(<<40,16#80,1,1,255,0,0>>, 6))),
+ {error,{asn1,{invalid_length,_}}} =
+ (catch 'Constructed':decode('S', sub(<<40,16#80,1,1,255,0,0>>, 5))),
+
+ %% A primitive must not be encoded with an indefinite length.
+ {error,{asn1,{invalid_length,_}}} =
+ (catch 'Constructed':decode('OS', <<4,128,4,3,97,98,99,0,0>>)),
ok.
+
+sub(Bin, Bytes) ->
+ <<B:Bytes/binary,_/binary>> = Bin,
+ B.
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl
index 6451f81c01..1edd60f7c8 100644
--- a/lib/asn1/test/error_SUITE.erl
+++ b/lib/asn1/test/error_SUITE.erl
@@ -19,7 +19,9 @@
-module(error_SUITE).
-export([suite/0,all/0,groups/0,
- already_defined/1,enumerated/1,objects/1]).
+ already_defined/1,bitstrings/1,enumerated/1,
+ imports/1,instance_of/1,integers/1,objects/1,
+ parameterization/1,values/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -29,9 +31,16 @@ all() ->
[{group,p}].
groups() ->
- [{p,parallel(),[already_defined,
- enumerated,
- objects]}].
+ [{p,parallel(),
+ [already_defined,
+ bitstrings,
+ enumerated,
+ imports,
+ instance_of,
+ integers,
+ objects,
+ parameterization,
+ values]}].
parallel() ->
case erlang:system_info(schedulers) > 1 of
@@ -68,6 +77,23 @@ already_defined(Config) ->
} = run(P, Config),
ok.
+bitstrings(Config) ->
+ M = 'Bitstrings',
+ P = {M,
+ <<"Bitstrings DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " Bs1 ::= BIT STRING {a(1), a(1)}\n"
+ " Bs2 ::= BIT STRING {a(1), b(2), a(3)}\n"
+ " Bs3 ::= BIT STRING {x(1), y(1)}\n"
+ " Bs4 ::= BIT STRING {x(-1), y(0)}\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,3},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,4},asn1ct_check,{value_reused,1}},
+ {structured_error,{M,5},asn1ct_check,{invalid_bit_number,-1}}
+ ]} = run(P, Config),
+ ok.
+
enumerated(Config) ->
M = 'Enumerated',
P = {M,
@@ -96,6 +122,63 @@ enumerated(Config) ->
} = run(P, Config),
ok.
+imports(Config) ->
+ Ext = 'ExternalModule',
+ ExtP = {Ext,
+ <<"ExternalModule DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "END\n">>},
+ ok = run(ExtP, Config),
+
+ M = 'Imports',
+ P = {M,
+ <<"Imports DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "IMPORTS NotDefined FROM ExternalModule\n"
+ "X FROM UndefinedModule objid\n"
+ "Y, Z FROM UndefinedModule2;\n"
+ "objid OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) remote-operations(4)\n"
+ " notation(0)}\n"
+ "END\n">>},
+ {error,[{structured_error,{M,2},asn1ct_check,
+ {undefined_import,'NotDefined','ExternalModule'}},
+ {structured_error,{M,3},asn1ct_check,{undefined_import,'X','UndefinedModule'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Y','UndefinedModule2'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Z','UndefinedModule2'}}
+ ]} = run(P, Config),
+ ok.
+
+instance_of(Config) ->
+ M = 'InstanceOf',
+ P = {M,
+ <<"InstanceOf DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "XX ::= INSTANCE OF CL ({TI})\n"
+ "CL ::= CLASS {\n"
+ "&id INTEGER,\n"
+ "&Type\n"
+ "}\n"
+ "o1 CL ::= {&id 1, &Type OCTET STRING}\n"
+ "TI CL ::= { o1 }\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{illegal_instance_of,'CL'}}
+ ]} = run(P, Config),
+ ok.
+
+integers(Config) ->
+ M = 'Integers',
+ P = {M,
+ <<"Integers DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " Int1 ::= INTEGER {a(1), a(1)}\n"
+ " Int2 ::= INTEGER {a(1), b(2), a(3)}\n"
+ " Int3 ::= INTEGER {x(1), y(1)}\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,3},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,4},asn1ct_check,{value_reused,1}}
+ ]} = run(P, Config),
+ ok.
+
+
objects(Config) ->
M = 'Objects',
P = {M,
@@ -138,6 +221,38 @@ objects(Config) ->
} = run(P, Config),
ok.
+parameterization(Config) ->
+ M = 'Parameterization',
+ P = {M,
+ <<"Parameterization DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " NotUppercase{lowercase} ::= INTEGER (lowercase)\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{'Parameterization',2},asn1ct_check,
+ {illegal_typereference,lowercase}}
+ ]
+ } = run(P, Config),
+ ok.
+
+values(Config) ->
+ M = 'Values',
+ P = {M,
+ <<"Values DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " os1 OCTET STRING ::= \"abc\"\n"
+ " os2 OCTET STRING ::= 42\n"
+ " os3 OCTET STRING ::= { 1, 3 }\n"
+ "END\n">>},
+ {error,
+ [
+ {structured_error,{M,2},asn1ct_check,
+ illegal_octet_string_value},
+ {structured_error,{M,3},asn1ct_check,
+ illegal_octet_string_value},
+ {structured_error,{M,4},asn1ct_check,
+ illegal_octet_string_value}
+ ]
+ } = run(P, Config),
+ ok.
run({Mod,Spec}, Config) ->
diff --git a/lib/asn1/test/h323test.erl b/lib/asn1/test/h323test.erl
index 3baaa994ea..7577928493 100644
--- a/lib/asn1/test/h323test.erl
+++ b/lib/asn1/test/h323test.erl
@@ -42,7 +42,7 @@ alerting_val() ->
{'TerminalInfo',asn1_NOVALUE},
false,false},
asn1_NOVALUE,
- {'CallIdentifier',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},
+ {'CallIdentifier',<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE}.
@@ -57,18 +57,18 @@ connect_val() ->
{'Connect-UUIE',
{0,0,8,2250,0,2},
{ipAddress,
- {'TransportAddress_ipAddress',[136,225,41,58],1187}},
+ {'TransportAddress_ipAddress',<<136,225,41,58>>,1187}},
{'EndpointType',asn1_NOVALUE,
{'VendorIdentifier',
{'H221NonStandard',181,0,21324},
- [77,105,99,114,111,115,111,102,116,174,32,78,101,116,
- 77,101,100,116,105,110,103,174,0],
- [51,46,48,0]},
+ <<77,105,99,114,111,115,111,102,116,174,32,78,101,116,
+ 77,101,100,116,105,110,103,174,0>>,
+ <<51,46,48,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
{'TerminalInfo',asn1_NOVALUE},
false,false},
- [22,137,237,197,191,35,211,17,140,45,0,192,79,75,28,208],
- {'CallIdentifier',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},
+ <<22,137,237,197,191,35,211,17,140,45,0,192,79,75,28,208>>,
+ {'CallIdentifier',<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE}.
diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl
index e54cbe825b..09e19ceebb 100644
--- a/lib/asn1/test/testChoExtension.erl
+++ b/lib/asn1/test/testChoExtension.erl
@@ -31,13 +31,13 @@ extension(_Rules) ->
%% A trick to encode with another compatible CHOICE type to test reception
%% extension alternative
- roundtrip('ChoExt1x', {str,"abc"}),
+ roundtrip('ChoExt1x', {str,<<"abc">>}),
roundtrip('ChoExt2', {bool,true}),
roundtrip('ChoExt2', {int,33}),
roundtrip('ChoExt3', {bool,true}),
roundtrip('ChoExt3', {int,33}),
- roundtrip('ChoExt4', {str,"abc"}),
+ roundtrip('ChoExt4', {str,<<"abc">>}),
roundtrip('ChoEmptyRoot', {bool,false}),
roundtrip('ChoEmptyRoot', {bool,true}),
diff --git a/lib/asn1/test/testChoExternal.erl b/lib/asn1/test/testChoExternal.erl
index 12abdbb2bc..0914d54f33 100644
--- a/lib/asn1/test/testChoExternal.erl
+++ b/lib/asn1/test/testChoExternal.erl
@@ -31,16 +31,16 @@ external(_Rules) ->
roundtrip('ChoXBool', {xboolImp,true}),
roundtrip('ChoXBool', {xboolExp,true}),
- roundtrip('NT', {os,"kalle"}),
- roundtrip('Exp', {os,"kalle"}),
- roundtrip('NTNT', {os,"kalle"}),
- roundtrip('NTExp', {os,"kalle"}),
- roundtrip('ExpNT', {os,"kalle"}),
- roundtrip('ExpExp', {os,"kalle"}),
- roundtrip('XNTNT', {os,"kalle"}),
- roundtrip('XNTExp', {os,"kalle"}),
- roundtrip('XExpNT', {os,"kalle"}),
- roundtrip('XExpExp', {os,"kalle"}),
+ roundtrip('NT', {os,<<"kalle">>}),
+ roundtrip('Exp', {os,<<"kalle">>}),
+ roundtrip('NTNT', {os,<<"kalle">>}),
+ roundtrip('NTExp', {os,<<"kalle">>}),
+ roundtrip('ExpNT', {os,<<"kalle">>}),
+ roundtrip('ExpExp', {os,<<"kalle">>}),
+ roundtrip('XNTNT', {os,<<"kalle">>}),
+ roundtrip('XNTExp', {os,<<"kalle">>}),
+ roundtrip('XExpNT', {os,<<"kalle">>}),
+ roundtrip('XExpExp', {os,<<"kalle">>}),
ok.
diff --git a/lib/asn1/test/testChoOptional.erl b/lib/asn1/test/testChoOptional.erl
index f5e77cb721..71a7346e3f 100644
--- a/lib/asn1/test/testChoOptional.erl
+++ b/lib/asn1/test/testChoOptional.erl
@@ -27,16 +27,20 @@
run() ->
roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho=asn1_NOVALUE}),
roundtrip('Seq1', #'Seq1'{bool=true,int=233,cho=asn1_NOVALUE}),
- roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho={vsCho,"Vs Str"}}),
- roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho={ocStrCho,"Oct Str"}}),
+ roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,
+ cho={vsCho,"Vs Str"}}),
+ roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,
+ cho={ocStrCho,<<"Oct Str">>}}),
roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho=asn1_NOVALUE,bool=true}),
roundtrip('Seq2', #'Seq2'{int=233,cho=asn1_NOVALUE,bool=true}),
roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={vsCho,"Vs Str"},bool=true}),
- roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={ocStrCho,"Oct Str"},bool=true}),
+ roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={ocStrCho,<<"Oct Str">>},
+ bool=true}),
roundtrip('Seq3', #'Seq3'{cho=asn1_NOVALUE,int=asn1_NOVALUE,bool=true}),
roundtrip('Seq3', #'Seq3'{cho=asn1_NOVALUE,int=233,bool=true}),
roundtrip('Seq3', #'Seq3'{cho={vsCho,"Vs Str"},int=asn1_NOVALUE,bool=true}),
- roundtrip('Seq3', #'Seq3'{cho={ocStrCho,"Oct Str"},int=asn1_NOVALUE,bool=true}),
+ roundtrip('Seq3', #'Seq3'{cho={ocStrCho,<<"Oct Str">>},
+ int=asn1_NOVALUE,bool=true}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoRecursive.erl b/lib/asn1/test/testChoRecursive.erl
index 593b845949..ccd60c2897 100644
--- a/lib/asn1/test/testChoRecursive.erl
+++ b/lib/asn1/test/testChoRecursive.erl
@@ -31,13 +31,13 @@ recursive(_Rules) ->
roundtrip('ChoRec',
{something,
#'ChoRec_something'{a = 77,
- b = "some octets here",
+ b = <<"some octets here">>,
c = {nothing,'NULL'}}}),
roundtrip('ChoRec', {nothing,'NULL'}),
roundtrip('ChoRec2',
{something,
#'ChoRec2_something'{a = 77,
- b = "some octets here",
+ b = <<"some octets here">>,
c = {nothing,'NULL'}}}),
roundtrip('ChoRec2', {nothing,'NULL'}),
ok.
diff --git a/lib/asn1/test/testChoTypeRefCho.erl b/lib/asn1/test/testChoTypeRefCho.erl
index cd2672add0..636c301403 100644
--- a/lib/asn1/test/testChoTypeRefCho.erl
+++ b/lib/asn1/test/testChoTypeRefCho.erl
@@ -30,7 +30,7 @@ choice(_Rules) ->
roundtrip('ChoTRcho', {'choChoE-E',{choInt,88}}),
roundtrip('ChoChoInline', {bool1,true}),
roundtrip('ChoChoInline', {choCho,{bool,true}}),
- roundtrip('ChoChoInline', {choCho,{octStr,"kk"}}),
+ roundtrip('ChoChoInline', {choCho,{octStr,<<"kk">>}}),
roundtrip('ChoChoInline', {choCho,{int,55}}),
ok.
diff --git a/lib/asn1/test/testChoTypeRefPrim.erl b/lib/asn1/test/testChoTypeRefPrim.erl
index 8a2bc7bd8e..747baeddd8 100644
--- a/lib/asn1/test/testChoTypeRefPrim.erl
+++ b/lib/asn1/test/testChoTypeRefPrim.erl
@@ -25,18 +25,18 @@
prim(_Rules) ->
roundtrip('ChoTR', {bool,true}),
- roundtrip('ChoTR', {octStr,[11,12,13,14,15,16,17]}),
+ roundtrip('ChoTR', {octStr,<<11,12,13,14,15,16,17>>}),
roundtrip('ChoTR', {int,233}),
- roundtrip('ChoTR', {octStr,"Stringing in the rain"}),
- roundtrip('ChoTR2', {octStr,"A string"}),
- roundtrip('ChoTR2', {octStrI,"A string"}),
- roundtrip('ChoTR2', {octStrE,"A string"}),
- roundtrip('ChoTR2', {'octStr-I',"A string"}),
- roundtrip('ChoTR2', {'octStrI-I',"A string"}),
- roundtrip('ChoTR2', {'octStrE-I',"A string"}),
- roundtrip('ChoTR2', {'octStr-E',"A string"}),
- roundtrip('ChoTR2', {'octStrI-E',"A string"}),
- roundtrip('ChoTR2', {'octStrE-E',"A string"}),
+ roundtrip('ChoTR', {octStr,<<"Stringing in the rain">>}),
+ roundtrip('ChoTR2', {octStr,<<"A string">>}),
+ roundtrip('ChoTR2', {octStrI,<<"A string">>}),
+ roundtrip('ChoTR2', {octStrE,<<"A string">>}),
+ roundtrip('ChoTR2', {'octStr-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrI-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrE-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStr-E',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrI-E',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrE-E',<<"A string">>}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoTypeRefSeq.erl b/lib/asn1/test/testChoTypeRefSeq.erl
index 86c22619aa..91d0b45e89 100644
--- a/lib/asn1/test/testChoTypeRefSeq.erl
+++ b/lib/asn1/test/testChoTypeRefSeq.erl
@@ -28,15 +28,24 @@
-record('ChoSeqExp', {seqInt, seqOs}).
seq(_Rules) ->
- roundtrip('ChoTRseq', {choSeq,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {choSeqI,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {choSeqE,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeq-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqI-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqE-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeq-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqI-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqE-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
+ roundtrip('ChoTRseq', {choSeq,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {choSeqI,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {choSeqE,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeq-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqI-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqE-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeq-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqI-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqE-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoTypeRefSet.erl b/lib/asn1/test/testChoTypeRefSet.erl
index fd3d75cbcb..bd9068b53e 100644
--- a/lib/asn1/test/testChoTypeRefSet.erl
+++ b/lib/asn1/test/testChoTypeRefSet.erl
@@ -28,15 +28,24 @@
-record('ChoSetExp', {setInt, setOs}).
set(_Rules) ->
- roundtrip('ChoTRset', {choSet,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {choSetI,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {choSetE,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSet-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetI-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetE-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSet-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetI-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetE-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
+ roundtrip('ChoTRset', {choSet,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {choSetI,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {choSetE,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSet-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetI-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetE-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSet-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetI-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetE-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl
index 54ba748519..3ccf883bd6 100644
--- a/lib/asn1/test/testConstraints.erl
+++ b/lib/asn1/test/testConstraints.erl
@@ -208,14 +208,14 @@ int_constraints(Rules) ->
%% More SIZE Constraints
%%==========================================================
- roundtrip('FixedSize', "0123456789"),
- roundtrip('FixedSize2', "0123456789"),
- roundtrip('FixedSize2', "0123456789abcdefghij"),
+ roundtrip('FixedSize', <<"0123456789">>),
+ roundtrip('FixedSize2', <<"0123456789">>),
+ roundtrip('FixedSize2', <<"0123456789abcdefghij">>),
range_error(Rules, 'FixedSize', "short"),
range_error(Rules, 'FixedSize2', "short"),
- [roundtrip('VariableSize', lists:seq($A, $A+L-1)) ||
+ [roundtrip('VariableSize', list_to_binary(lists:seq($A, $A+L-1))) ||
L <- lists:seq(1, 10)],
roundtrip_enc('ShorterExt', "a", shorter_ext(Rules, "a")),
diff --git a/lib/asn1/test/testContextSwitchingTypes.erl b/lib/asn1/test/testContextSwitchingTypes.erl
index bdd6883dac..61d1fbdd69 100644
--- a/lib/asn1/test/testContextSwitchingTypes.erl
+++ b/lib/asn1/test/testContextSwitchingTypes.erl
@@ -24,11 +24,21 @@
-include_lib("test_server/include/test_server.hrl").
test(Config) ->
- ValT = 'ContextSwitchingTypes':'val1-T'(),
- check_EXTERNAL(enc_dec('T', ValT)),
+ ValT_1 = 'ContextSwitchingTypes':'val1-T'(),
+ check_EXTERNAL(enc_dec('T', ValT_1)),
+
+ ValT_2 = 'ContextSwitchingTypes':'val2-T'(),
+ check_EXTERNAL(enc_dec('T', ValT_2)),
+
+ ValT_3 = 'ContextSwitchingTypes':'val3-T'(),
+ check_EXTERNAL(enc_dec('T', ValT_3)),
+
+ ValT_4 = 'ContextSwitchingTypes':'val4-T'(),
+ check_EXTERNAL(enc_dec('T', ValT_4)),
{ok,ValT2} = asn1ct:value('ContextSwitchingTypes', 'T',
[{i,?config(case_dir, Config)}]),
+ io:format("ValT2 ~p~n",[ValT2]),
check_EXTERNAL(enc_dec('T', ValT2)),
ValEP = 'ContextSwitchingTypes':'val1-EP'(),
diff --git a/lib/asn1/test/testDoubleEllipses.erl b/lib/asn1/test/testDoubleEllipses.erl
index 4e8972cdfc..bd6831bf1e 100644
--- a/lib/asn1/test/testDoubleEllipses.erl
+++ b/lib/asn1/test/testDoubleEllipses.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,17 +24,20 @@
-include_lib("test_server/include/test_server.hrl").
-record('Seq',{a, c}).
+-record('SeqV1',{a, b}).
-record('SeqV2',{a, b ,c}).
-record('SeqAlt',{a,d,b,e,c,f,g}).
-record('SeqAltV2',{a,d,b,e,h,i,c,f,g}).
-record('Set',{a, c}).
+-record('SetV1',{a, b}).
-record('SetV2',{a, b ,c}).
-record('SetAlt',{a,d,b,e,c,f,g}).
-record('SetAltV2',{a,d,b,e,h,i,c,f,g}).
main(_Rules) ->
roundtrip('Seq', #'Seq'{a=10,c=true}),
+ roundtrip('SeqV1', #'SeqV1'{a=10,b=false}),
roundtrip('SeqV2', #'SeqV2'{a=10,b=false,c=true}),
roundtrip('SeqAlt',
#'SeqAlt'{a=10,d=12,b = <<2#1010:4>>,
@@ -45,6 +48,7 @@ main(_Rules) ->
e=true,h="PS",i=13,c=false,f=14,g=16}),
roundtrip('Set', #'Set'{a=10,c=true}),
+ roundtrip('SetV1', #'SetV1'{a=10,b=false}),
roundtrip('SetV2', #'SetV2'{a=10,b=false,c=true}),
roundtrip('SetAlt',
#'SetAlt'{a=10,d=12,
@@ -54,6 +58,14 @@ main(_Rules) ->
#'SetAltV2'{a=10,d=12,
b = <<2#1010:4>>,
e=true,h="PS",i=13,c=false,f=14,g=16}),
+
+ roundtrip('SeqDoubleEmpty1',
+ {'SeqDoubleEmpty1'}),
+ roundtrip('SeqDoubleEmpty2',
+ {'SeqDoubleEmpty2',true,42}),
+ roundtrip('SeqDoubleEmpty2',
+ {'SeqDoubleEmpty2',true,asn1_NOVALUE}),
+
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testEnumExt.erl b/lib/asn1/test/testEnumExt.erl
index c66adaf949..878518be11 100644
--- a/lib/asn1/test/testEnumExt.erl
+++ b/lib/asn1/test/testEnumExt.erl
@@ -59,6 +59,10 @@ main(ber) ->
common(ber).
common(Erule) ->
+ roundtrip('SubExt1', blue),
+ roundtrip('SubExt1', orange),
+ roundtrip('SubExt1', black),
+
roundtrip('Seq', {'Seq',blue,42}),
roundtrip('Seq', {'Seq',red,42}),
roundtrip('Seq', {'Seq',green,42}),
diff --git a/lib/asn1/test/testFragmented.erl b/lib/asn1/test/testFragmented.erl
index 8d5fa07a5b..35b21f90a9 100644
--- a/lib/asn1/test/testFragmented.erl
+++ b/lib/asn1/test/testFragmented.erl
@@ -22,10 +22,10 @@
-export([main/1]).
main(_Erule) ->
- roundtrip('PDU', {'PDU',1,false,["abc","def"]}),
+ roundtrip('PDU', {'PDU',1,false,[<<"abc">>,<<"def">>]}),
B256 = lists:seq(0, 255),
K1 = lists:duplicate(4, B256),
- K8 = binary_to_list(iolist_to_binary(lists:duplicate(8, K1))),
+ K8 = iolist_to_binary(lists:duplicate(8, K1)),
roundtrip('PDU', {'PDU',1,false,[K8,K8]}),
roundtrip('PDU', {'PDU',1,false,[K8,K8,K8,K8]}),
roundtrip('PDU', {'PDU',1,false,[K8,K8,K8,K8,K8,K8]}),
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index cd335e1023..37c134b1b9 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -49,7 +49,7 @@ main(_Erule) ->
roundtrip('RANAPextract1', 'InitiatingMessage2', Val3),
roundtrip('InfObj', 'MyPdu', {'MyPdu',42,12,false,"string"}),
- roundtrip('InfObj', 'MyPdu', {'MyPdu',{'Seq',1023,"hello"},
+ roundtrip('InfObj', 'MyPdu', {'MyPdu',{'Seq',1023,<<"hello">>},
42,true,"longer string"}),
roundtrip('InfObj', 'MyPdu', {'MyPdu',"75712346",43,true,"string"}),
@@ -110,15 +110,49 @@ main(_Erule) ->
enc_dec('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,asn1_DEFAULT}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,42,true,"abc"}),
+ {'Multiple-Optionals',1,42,true,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,asn1_NOVALUE,true,"abc"}),
+ {'Multiple-Optionals',1,asn1_NOVALUE,true,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,42,asn1_NOVALUE,"abc"}),
+ {'Multiple-Optionals',1,42,asn1_NOVALUE,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
{'Multiple-Optionals',1,42,true,asn1_NOVALUE}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}).
+ {'Multiple-Optionals',1,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}),
+
+ test_objset('OstSeq12', [1,2]),
+ test_objset('OstSeq123', [1,2,3]),
+ test_objset('OstSeq1234', [1,2,3,4]),
+ test_objset('OstSeq45', [4,5]),
+ test_objset('OstSeq12345', [1,2,3,4,5]),
+
+ test_objset('ExOstSeq12', [1,2]),
+ test_objset('ExOstSeq123', [1,2,3]),
+ %%test_objset('ExOstSeq1234', [1,2,3,4]),
+ test_objset('ExOstSeq45', [4,5]),
+ test_objset('ExOstSeq12345', [1,2,3,4,5]),
+
+ ok.
+
+test_objset(Type, Keys) ->
+ _ = [test_object(Type, Key) || Key <- Keys],
+ _ = [(catch test_object(Type, Key)) ||
+ Key <- lists:seq(1, 5) -- Keys],
+ ok.
+
+test_object(T, 1) ->
+ roundtrip('InfObj', T, {T,1,<<42:7>>});
+test_object(T, 2) ->
+ roundtrip('InfObj', T, {T,2,<<"abc">>});
+test_object(T, 3) ->
+ roundtrip('InfObj', T, {T,3,donald}),
+ roundtrip('InfObj', T, {T,3,scrooge});
+test_object(T, 4) ->
+ roundtrip('InfObj', T, {T,4,true}),
+ roundtrip('InfObj', T, {T,4,false});
+test_object(T, 5) ->
+ roundtrip('InfObj', T, {T,5,0}),
+ roundtrip('InfObj', T, {T,5,15}).
roundtrip(M, T, V) ->
asn1_test_lib:roundtrip(M, T, V).
diff --git a/lib/asn1/test/testMergeCompile.erl b/lib/asn1/test/testMergeCompile.erl
index 7cda71c441..b21897cfc2 100644
--- a/lib/asn1/test/testMergeCompile.erl
+++ b/lib/asn1/test/testMergeCompile.erl
@@ -30,12 +30,12 @@
main(Erule) ->
%% test of module MS.set.asn that tests OTP-4492: different tagdefault in
%% modules and types with same name in modules
- MSVal = {'Type4M2',8,true,three,"OCTET STRING"},
+ MSVal = {'Type4M2',8,true,three,<<"OCTET STRING">>},
asn1_test_lib:roundtrip('MS', 'Type4M2', MSVal),
%% test of RANAP.set.asn1
PIEVal2 = [{'ProtocolIE-Field',4,ignore,{radioNetwork,'rab-pre-empted'}}],
- EncVal =
+ EncVal0 =
case Erule of
per ->
<<1,100>>;
@@ -44,6 +44,7 @@ main(Erule) ->
ber ->
<<2,1,1>>
end,
+ EncVal = {asn1_OPENTYPE,EncVal0},
PEVal2 = [{'ProtocolExtensionField',1,ignore,EncVal},
{'ProtocolExtensionField',2,reject,EncVal}],
Val2 =
@@ -142,7 +143,40 @@ test('InsertSubscriberDataArg') ->
ok.
test(mvrasn6,'InsertSubscriberDataArg') ->
- Val = {'InsertSubscriberDataArg',"IMSI","Address","C",serviceGranted,["abc","cde"],["tele","serv","ice"],asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,{'NAEA-PreferredCI',"NCC",asn1_NOVALUE},{'GPRSSubscriptionData','NULL',[{'PDP-Context',49,"PT","PDP-Address","QoS",'NULL',"APN",asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],asn1_NOVALUE},'NULL',onlyMSC,{'LSAInformation','NULL',accessOutsideLSAsAllowed,[{'LSAData',"LSA","L",'NULL',asn1_NOVALUE},{'LSAData',"LSA","L",'NULL',asn1_NOVALUE}],asn1_NOVALUE},'NULL',{'LCSInformation',["Addr","ess","string"],[{'LCS-PrivacyClass',"S","ExtSS",notifyLocationAllowed,[{'ExternalClient',{'LCSClientExternalID',"Addr",asn1_NOVALUE},asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],[broadcastService,anonymousLocation,targetMSsubscribedService],asn1_NOVALUE}],asn1_NOVALUE},100,"age",{'MC-SS-Info',"S","ExtSS",5,4,asn1_NOVALUE},"C",{'SGSN-CAMEL-SubscriptionInfo',{'GPRS-CSI',[{'GPRS-CamelTDPData',attach,13,"Addr",continueTransaction,asn1_NOVALUE}],11,asn1_NOVALUE,'NULL','NULL'},{'SMS-CSI',[{'SMS-CAMEL-TDP-DataList','sms-CollectedInfo',13,"Addr",continueTransaction,asn1_NOVALUE}],11,asn1_NOVALUE,'NULL','NULL'},asn1_NOVALUE},"ON"},
- {ok,Bytes} = 'Mvrasn6':encode('InsertSubscriberDataArg', Val),
- {ok,_} = 'Mvrasn6':decode('InsertSubscriberDataArg', Bytes),
+ Val = {'InsertSubscriberDataArg',<<"IMSI">>,<<"Address">>,<<"C">>,
+ serviceGranted,[<<"abc">>,<<"cde">>],
+ [<<"tele">>,<<"serv">>,<<"ice">>],
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
+ {'NAEA-PreferredCI',<<"NCC">>,asn1_NOVALUE},
+ {'GPRSSubscriptionData','NULL',
+ [{'PDP-Context',49,<<"PT">>,<<"PDP-Address">>,<<"QoS">>,
+ 'NULL',<<"APN">>,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],
+ asn1_NOVALUE},'NULL',onlyMSC,
+ {'LSAInformation','NULL',accessOutsideLSAsAllowed,
+ [{'LSAData',<<"LSA">>,<<"L">>,'NULL',asn1_NOVALUE},
+ {'LSAData',<<"LSA">>,<<"L">>,'NULL',asn1_NOVALUE}],
+ asn1_NOVALUE},'NULL',
+ {'LCSInformation',[<<"Addr">>,<<"ess">>,<<"string">>],
+ [{'LCS-PrivacyClass',<<"S">>,<<"ExtSS">>,notifyLocationAllowed,
+ [{'ExternalClient',
+ {'LCSClientExternalID',<<"Addr">>,asn1_NOVALUE},
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],
+ [broadcastService,anonymousLocation,targetMSsubscribedService],
+ asn1_NOVALUE}],asn1_NOVALUE},
+ 100,<<"age">>,
+ {'MC-SS-Info',<<"S">>,<<"ExtSS">>,5,4,asn1_NOVALUE},
+ <<"C">>,
+ {'SGSN-CAMEL-SubscriptionInfo',
+ {'GPRS-CSI',
+ [{'GPRS-CamelTDPData',attach,13,<<"Addr">>,
+ continueTransaction,asn1_NOVALUE}],
+ 11,asn1_NOVALUE,'NULL','NULL'},
+ {'SMS-CSI',
+ [{'SMS-CAMEL-TDP-Data','sms-CollectedInfo',
+ 13,<<"Addr">>,continueTransaction,asn1_NOVALUE}],
+ 11,asn1_NOVALUE,'NULL','NULL'},
+ asn1_NOVALUE},
+ <<"ON">>},
+ asn1_test_lib:roundtrip('Mvrasn6', 'InsertSubscriberDataArg', Val),
ok.
diff --git a/lib/asn1/test/testNBAPsystem.erl b/lib/asn1/test/testNBAPsystem.erl
index 57cb483374..e37e22163a 100644
--- a/lib/asn1/test/testNBAPsystem.erl
+++ b/lib/asn1/test/testNBAPsystem.erl
@@ -79,13 +79,14 @@ powerRaiseLimit, dLPowerAveragingWindowSize, 'iE-Extensions' = asn1_NOVALUE}).
compile(Config, Options) ->
- [asn1_test_lib:compile(filename:join([nbapsystem, M]), Config, Options)
- || M <- ["NBAP-CommonDataTypes.asn",
- "NBAP-IEs.asn",
- "NBAP-PDU-Contents.asn",
- "NBAP-PDU-Discriptions.asn",
- "NBAP-Constants.asn",
- "NBAP-Containers.asn"]],
+ Fs = [filename:join("nbapsystem", M) ||
+ M <- ["NBAP-CommonDataTypes.asn",
+ "NBAP-IEs.asn",
+ "NBAP-PDU-Contents.asn",
+ "NBAP-PDU-Discriptions.asn",
+ "NBAP-Constants.asn",
+ "NBAP-Containers.asn"]],
+ asn1_test_lib:compile_all(Fs, Config, Options),
ok.
diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl
index 3db89ca174..39f7947e8d 100644
--- a/lib/asn1/test/testParamBasic.erl
+++ b/lib/asn1/test/testParamBasic.erl
@@ -43,6 +43,9 @@ main(Rules) ->
#'T12'{number=11,string = <<10:4>>});
_ -> ok
end,
+ roundtrip('AnAlgorithm', {'AnAlgorithm',1,42}),
+ roundtrip('AnAlgorithm', {'AnAlgorithm',2,true}),
+ roundtrip('AnAlgorithm', {'AnAlgorithm',2,false}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testParameterizedInfObj.erl b/lib/asn1/test/testParameterizedInfObj.erl
index f3b4f9b170..2fe900792d 100644
--- a/lib/asn1/test/testParameterizedInfObj.erl
+++ b/lib/asn1/test/testParameterizedInfObj.erl
@@ -20,7 +20,7 @@
-module(testParameterizedInfObj).
--export([main/2,ranap/1]).
+-export([main/2,param/1,ranap/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -36,31 +36,29 @@ main(Config, Erule) ->
param2(Config, Erule).
param(Erule) ->
- PERVal = #'AllocationOrRetentionPriority'
- {priorityLevel = true,
- iE_Extensions =
- [#'ProtocolExtensionField'{id=14,
- criticality=reject,
- extensionValue= <<0>>},
- #'ProtocolExtensionField'{id=2,
- criticality=ignore,
- extensionValue= <<1>>}]},
- BERVal = #'AllocationOrRetentionPriority'
- {priorityLevel = true,
- iE_Extensions =
- [#'ProtocolExtensionField'{id=14,
- criticality=reject,
- extensionValue= <<2,1,0>>},
- #'ProtocolExtensionField'{id=2,
- criticality=ignore,
- extensionValue= <<2,1,1>>}]},
- case Erule of
- ber ->
- roundtrip('AllocationOrRetentionPriority', BERVal);
- per ->
- roundtrip('AllocationOrRetentionPriority', PERVal);
- uper ->
- roundtrip('AllocationOrRetentionPriority', PERVal)
+ Exts0 = case Erule of
+ ber ->
+ %% As implemented, the open type must contain
+ %% valid BER-encoded data.
+ [{14,<<2,1,0>>},{2,<<2,1,0>>}];
+ _ ->
+ %% The PER decoder will not look inside the open type.
+ [{14,<<0>>},{2,<<"anything goes">>}]
+ end,
+ case 'Param':legacy_erlang_types() of
+ false ->
+ Exts = [#'ProtocolExtensionField'{id=Id,
+ criticality=reject,
+ extensionValue={asn1_OPENTYPE,
+ Eval}} ||
+ {Id,Eval} <- Exts0],
+ aor_roundtrip(Exts);
+ true ->
+ Exts = [#'ProtocolExtensionField'{id=Id,
+ criticality=reject,
+ extensionValue=Eval} ||
+ {Id,Eval} <- Exts0],
+ aor_roundtrip(Exts)
end,
%% test code for OTP-4242, ValueFromObject
@@ -72,8 +70,13 @@ param(Erule) ->
{error,_Reason2} = 'Param':decode('OS2',[4,4,1,2,3,4]),
{ok,_Val4} = 'Param':decode('OS1',[4,2,1,2]);
_ -> %per/uper
- roundtrip('OS1', [1,2]),
- {error,_Reason3} = 'Param':encode('OS1', [1,2,3,4])
+ case 'Param':legacy_erlang_types() of
+ false ->
+ roundtrip('OS1', <<1,2>>),
+ {error,_Reason3} = 'Param':encode('OS1', <<1,2,3,4>>);
+ true ->
+ ok
+ end
end,
roundtrip('Scl', {'Scl',42,{a,9738654}}),
@@ -82,6 +85,11 @@ param(Erule) ->
ok.
+aor_roundtrip(Exts) ->
+ Val = #'AllocationOrRetentionPriority'{priorityLevel = true,
+ iE_Extensions = Exts},
+ roundtrip('AllocationOrRetentionPriority', Val).
+
roundtrip(T, V) ->
asn1_test_lib:roundtrip('Param', T, V).
@@ -102,11 +110,11 @@ ranap(_Erule) ->
param2(Config, Erule) ->
roundtrip2('HandoverRequired',
{'HandoverRequired',
- [{'ProtocolIE-Field',1,"ABC"},
+ [{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,577799}]}),
Enc = roundtrip2('HandoverRequired',
{'HandoverRequired',
- [{'ProtocolIE-Field',1,"ABC"},
+ [{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,-42},
{'ProtocolIE-Field',100,533},
{'ProtocolIE-Field',101,true}]}),
@@ -127,17 +135,19 @@ param2(Config, Erule) ->
[{i,DataDir},{outdir,CaseDir},Erule]),
%% Decompile extended data.
- {ok,{'HandoverRequired',[{'ProtocolIE-Field',1,"ABC"},
+ {ok,{'HandoverRequired',[{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,-42},
- {'ProtocolIE-Field',100,Open100},
- {'ProtocolIE-Field',101,Open101}]}} =
+ {'ProtocolIE-Field',100,
+ {asn1_OPENTYPE,Open100}},
+ {'ProtocolIE-Field',101,
+ {asn1_OPENTYPE,Open101}}]}} =
'Param2':decode('HandoverRequired', Enc),
true = is_binary(Open100),
true = is_binary(Open101),
%% Test single root.
roundtrip2('SingleRoot',
- {'SingleRoot',[{'ProtocolIE-Field',1,"ABC"},
+ {'SingleRoot',[{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,9999}]}),
ok.
diff --git a/lib/asn1/test/testPrimExternal.erl b/lib/asn1/test/testPrimExternal.erl
index 07a1de931f..a03760976d 100644
--- a/lib/asn1/test/testPrimExternal.erl
+++ b/lib/asn1/test/testPrimExternal.erl
@@ -45,6 +45,6 @@ external(_Rules) ->
'XExpNT',
'XExpImp',
'XExpExp'],
- _ = [asn1_test_lib:roundtrip('PrimExternal', T, "kalle") ||
+ _ = [asn1_test_lib:roundtrip('PrimExternal', T, <<"kalle">>) ||
T <- Types],
ok.
diff --git a/lib/asn1/test/testPrimStrings.erl b/lib/asn1/test/testPrimStrings.erl
index 2fe0780701..155d6f6ff5 100644
--- a/lib/asn1/test/testPrimStrings.erl
+++ b/lib/asn1/test/testPrimStrings.erl
@@ -18,6 +18,8 @@
%%
%%
-module(testPrimStrings).
+-compile([{nowarn_deprecated_function,{asn1rt,utf8_list_to_binary,1}},
+ {nowarn_deprecated_function,{asn1rt,utf8_binary_to_list,1}}]).
-export([bit_string/2]).
-export([octet_string/1]).
@@ -34,14 +36,11 @@
fragmented(Rules) ->
Lens = fragmented_lengths(),
- fragmented_octet_string(Rules, Lens),
- case Rules of
- per ->
- %% NYI.
- ok;
- _ ->
- fragmented_strings(Lens)
- end.
+ case 'PrimStrings':legacy_erlang_types() of
+ false -> fragmented_octet_string(Rules, Lens);
+ true -> ok
+ end,
+ fragmented_strings(Lens).
fragmented_strings(Lens) ->
Types = ['Ns','Ps','Ps11','Vis','IA5'],
@@ -74,33 +73,37 @@ bit_string(Rules, Opts) ->
%% Bs1 ::= BIT STRING
%%==========================================================
- bs_roundtrip('Bs1', 0, <<>>),
- bs_roundtrip('Bs1', 4, <<1:3>>),
- bs_roundtrip('Bs1', 15, <<15:4>>),
- bs_roundtrip('Bs1', 255, <<255:8>>),
-
- bs_roundtrip('Bs1', 256, [0,0,0,0,0,0,0,0,1]),
- bs_roundtrip('Bs1', 257, [1,0,0,0,0,0,0,0,1]),
- bs_roundtrip('Bs1', 444, [0,0,1,1,1,1,0,1,1]),
-
- {ok,Enc1} = 'PrimStrings':encode('Bs1', 12345678901234567890),
- {ok,_} = 'PrimStrings':decode('Bs1', Enc1),
+ bs_roundtrip('Bs1', <<>>),
+ bs_roundtrip('Bs1', <<1:3>>),
+ bs_roundtrip('Bs1', <<15:4>>),
+ bs_roundtrip('Bs1', <<2#010010:6>>),
+ bs_roundtrip('Bs1', <<2#11111111:8>>),
+ bs_roundtrip('Bs1', <<2#100000000:9>>),
+ bs_roundtrip('Bs1', <<2#100000001:9>>),
+ bs_roundtrip('Bs1', <<2#001111011:9>>),
+ bs_roundtrip('Bs1', <<2#0100101111100010011:19>>),
- bs_roundtrip('Bs1', [1,1,1,1,1,1,1,1]),
- bs_roundtrip('Bs1', [0,1,0,0,1,0]),
- bs_roundtrip('Bs1', [1,0,0,0,0,0,0,0,0]),
- bs_roundtrip('Bs1', [0,1,0,0,1,0,1,1,1,1,1,0,0,0,1,0,0,1,1]),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+ ok;
+ true ->
+ {ok,Enc1} = 'PrimStrings':encode('Bs1', 12345678901234567890),
+ {ok,_} = 'PrimStrings':decode('Bs1', Enc1)
+ end,
case {Rules,Opts} of
- {ber,[]} ->
+ {ber,[legacy_erlang_types]} ->
bs_decode('Bs1', <<35,8,3,2,0,73,3,2,4,32>>,
[0,1,0,0,1,0,0,1,0,0,1,0]),
bs_decode('Bs1', <<35,9,3,2,0,234,3,3,7,156,0>>,
[1,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,0]),
bs_decode('Bs1', <<35,128,3,2,0,234,3,3,7,156,0,0,0>>,
[1,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,0]);
- _ ->
+ {ber,[]} ->
+ %% XXX
+ ok;
+ {_,_} ->
%% DER, PER, UPER
consistent_def_enc('BsDef1',
[2#111101,
@@ -120,30 +123,39 @@ bit_string(Rules, Opts) ->
%%==========================================================
roundtrip('Bs2', [mo,tu,fr]),
- roundtrip('Bs2', [0,1,1,0,0,1,0], [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110011:7>>, [mo,tu,fr,sa]),
%%==========================================================
%% Bs3 ::= BIT STRING {su(0), mo(1), tu(2), we(3), th(4), fr(5), sa(6) } (SIZE (1..7))
%%==========================================================
roundtrip('Bs3', [mo,tu,fr]),
- bs_roundtrip('Bs3', [0,1,1,0,0,1,0], [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110011:7>>, [mo,tu,fr,sa]),
+ bs_roundtrip('Bs3', <<2#011001:6>>, [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#11:2>>, [su,mo]),
%%==========================================================
%% Bs7 ::= BIT STRING (SIZE (24))
%%==========================================================
- bs_roundtrip('Bs7', 53245,
- [1,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0]),
- bs_roundtrip('Bs7', [1,0,1,0],
- [1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),
+ bs_roundtrip('Bs7', <<23563:24>>),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+%% {error,_} = 'PrimStrings':encode('Bs7', <<2#1010:4>>);
+ ok;
+ true ->
+ ok
+ end,
%%==========================================================
%% BsPri ::= [PRIVATE 61] BIT STRING
%%==========================================================
- bs_roundtrip('BsPri', 45, [1,0,1,1,0,1]),
- bs_roundtrip('BsPri', 211, [1,1,0,0,1,0,1,1]),
+ bs_roundtrip('BsPri', <<2#101101:6>>),
+ bs_roundtrip('BsPri', <<2#11001011:8>>),
case Rules of
ber ->
@@ -164,8 +176,8 @@ bit_string(Rules, Opts) ->
%% BsExpPri ::= [PRIVATE 61] EXPLICIT BIT STRING
%%==========================================================
- bs_roundtrip('BsExpPri', 45, [1,0,1,1,0,1]),
- bs_roundtrip('BsExpPri', 211, [1,1,0,0,1,0,1,1]),
+ bs_roundtrip('BsExpPri', <<2#101101:6>>),
+ bs_roundtrip('BsExpPri', <<2#11001011:8>>),
case Rules of
ber ->
@@ -186,14 +198,14 @@ bit_string(Rules, Opts) ->
%% veteran(2), collegeGraduate(3)}, test case for OTP-5710
%%==========================================================
- {ok,Bytes54} = 'BitStr':encode('PersonalStatus', []),
+ {ok,Bytes54} = 'BitStr':encode('PersonalStatus', <<>>),
{ok,[]} = 'BitStr':decode('PersonalStatus', Bytes54),
%%==========================================================
%% BS5932 ::= BIT STRING (SIZE (5..MAX))
%% test case for OTP-5932
%%==========================================================
- bs_roundtrip('BSMAX', [1,0,1,0,1]),
+ bs_roundtrip('BSMAX', <<2#10101:5>>),
case Rules of
ber ->
{error,_} = 'PrimStrings':encode('BSMAX', [1,0,1]);
@@ -207,28 +219,35 @@ bit_string(Rules, Opts) ->
%% BS1024 ::= BIT STRING (SIZE (1024))
%% test case for OTP-7602
%%==========================================================
- BSmaker =
- fun(_F,S,S,_,Acc) ->
- Acc;
- (F,Ix,S,{A,B},Acc) ->
- F(F,Ix+1,S,{B,A},[A|Acc])
- end,
-
- BSList255 = BSmaker(BSmaker,0,255,{1,0},[]),
- bs_roundtrip('BS255', BSList255),
- BSList256 = BSmaker(BSmaker,0,256,{1,0},[]),
- bs_roundtrip('BS256', BSList256),
- BSList1024 = BSmaker(BSmaker,0,1024,{1,0},[]),
- bs_roundtrip('BS1024', BSList1024),
- bs_roundtrip('TransportLayerAddress', [0,1,1,0]),
+ bs_roundtrip('BS255', random_bits(255)),
+ bs_roundtrip('BS256', random_bits(256)),
+ bs_roundtrip('BS1024', random_bits(1024)),
+
+ bs_roundtrip('TransportLayerAddress', <<2#0110:4>>),
case Rules of
ber -> ok;
_ -> per_bs_strings()
end.
-consistent_def_enc(Type, Vs) ->
+random_bits(N) ->
+ Seed = integer_to_list(erlang:phash2(erlang:now())),
+ random_bits(<<>>, N, Seed).
+
+random_bits(Bin, N, Seed) ->
+ RandomBits = erlang:md5(Seed),
+ Bits = bit_size(RandomBits),
+ if
+ Bits < N ->
+ random_bits(<<Bin/bitstring,RandomBits/bitstring>>,
+ N-Bits, RandomBits);
+ true ->
+ <<LastBits:N/bitstring,_/bitstring>> = RandomBits,
+ <<Bin/bitstring,LastBits/bitstring>>
+ end.
+
+consistent_def_enc(Type, Vs0) ->
M = 'PrimStrings',
{ok,Enc} = M:encode(Type, {Type,asn1_DEFAULT}),
{ok,Val} = M:decode(Type, Enc),
@@ -241,6 +260,13 @@ consistent_def_enc(Type, Vs) ->
{legacy,{_,Bs}} when is_list(Bs) -> ok
end,
+ %% If this is not the legacy format, only bitstrings are
+ %% allowed.
+ Vs = case M:legacy_erlang_types() of
+ false -> [V || V <- Vs0, is_bitstring(V)];
+ true -> Vs0
+ end,
+
%% All values should be recognized and encoded as the
%% the default value (i.e. not encoded at all).
_ = [{ok,Enc} = M:encode(Type, {Type,V}) || V <- Vs],
@@ -252,18 +278,9 @@ consistent_def_enc(Type, Vs) ->
%% a SIZE constraint).
per_bs_strings() ->
- bs_roundtrip('Bs3', [0,0,1,0,0,0,0], [tu]),
bs_roundtrip('Bs3', <<2#0010000:7>>, [tu]),
- bs_roundtrip('Bs3', {1,<<2#00100000:8>>}, [tu]),
-
- bs_roundtrip('Bs4', [0,1,1,0,0,1,0], [mo,tu,fr]),
bs_roundtrip('Bs4', <<2#0110010:7>>, [mo,tu,fr]),
- bs_roundtrip('Bs4', {1,<<2#01100100:8>>}, [mo,tu,fr]),
-
- bs_roundtrip('Bs4', [0,1,1,0,0,0,0], [mo,tu]),
bs_roundtrip('Bs4', <<2#011:3,0:32>>, [mo,tu]),
- bs_roundtrip('Bs4', {5,<<2#011:3,0:32,0:5>>}, [mo,tu]),
-
[per_trailing_zeroes(B) || B <- lists:seq(0, 255)],
ok.
@@ -279,10 +296,6 @@ per_trailing_zeroes(Byte) ->
{bit,LastBitPos} -> LastBitPos+1
end,
- %% List of zeroes and ones.
- named_roundtrip(L, Pos, ExpectedSz),
- named_roundtrip(L++[0,0,0,0,0], Pos, ExpectedSz),
-
%% Bitstrings.
Bs = << <<B:1>> || B <- L >>,
Sz = bit_size(Bs),
@@ -290,14 +303,22 @@ per_trailing_zeroes(Byte) ->
Bin = <<Bs:Sz/bits,0:16,0:7>>,
named_roundtrip(Bin, Pos, ExpectedSz),
- %% Compact bitstring.
- named_roundtrip({7,Bin}, Pos, ExpectedSz),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+ ok;
+ true ->
+ %% List of zeroes and ones.
+ named_roundtrip(L, Pos, ExpectedSz),
+ named_roundtrip(L++[0,0,0,0,0], Pos, ExpectedSz),
- %% Integer bitstring (obsolete).
- IntBs = intlist_to_integer(L, 0, 0),
- named_roundtrip(IntBs, Pos, ExpectedSz),
+ %% Compact bitstring.
+ named_roundtrip({7,Bin}, Pos, ExpectedSz),
- ok.
+ %% Integer bitstring (obsolete).
+ IntBs = intlist_to_integer(L, 0, 0),
+ named_roundtrip(IntBs, Pos, ExpectedSz),
+ ok
+ end.
make_bit_list(0) -> [];
make_bit_list(B) -> [B band 1|make_bit_list(B bsr 1)].
@@ -331,61 +352,62 @@ octet_string(Rules) ->
%% Os ::= OCTET STRING
%%==========================================================
+ Legacy = 'PrimStrings':legacy_erlang_types(),
case Rules of
- ber ->
- {ok,"Jones"} =
+ ber when not Legacy ->
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
- {ok,"Jones"} =
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
- {ok,"Jones"} =
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
ok;
_ ->
ok
end,
- roundtrip('Os', [47,23,99,255,1]),
- roundtrip('OsCon', [47,23,99,255,1]),
- roundtrip('OsPri', [47,23,99,255,1]),
- roundtrip('OsApp', [47,23,99,255,1]),
+ os_roundtrip('Os', <<47,23,99,255,1>>),
+ os_roundtrip('OsCon', <<47,23,99,255,1>>),
+ os_roundtrip('OsPri', <<47,23,99,255,1>>),
+ os_roundtrip('OsApp', <<47,23,99,255,1>>),
- roundtrip('OsExpCon', [47,23,99,255,1]),
- roundtrip('OsExpPri', [47,23,99,255,1]),
- roundtrip('OsExpApp', [47,23,99,255,1]),
+ os_roundtrip('OsExpCon', <<47,23,99,255,1>>),
+ os_roundtrip('OsExpPri', <<47,23,99,255,1>>),
+ os_roundtrip('OsExpApp', <<47,23,99,255,1>>),
- roundtrip('Os', []),
- roundtrip('OsApp', []),
- roundtrip('OsExpApp',[]),
+ os_roundtrip('Os', <<>>),
+ os_roundtrip('OsApp', <<>>),
+ os_roundtrip('OsExpApp', <<>>),
- OsR = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
+ OsR = <<"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>,
- roundtrip('Os', OsR),
- roundtrip('OsCon', OsR),
- roundtrip('OsExpApp', OsR),
+ os_roundtrip('Os', OsR),
+ os_roundtrip('OsCon', OsR),
+ os_roundtrip('OsExpApp', OsR),
case Rules of
- ber ->
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,7,4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,11,36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,13,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
- {ok,"JonesJones"} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
+ ber when not Legacy ->
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,7,4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,11,36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,13,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
+ {ok,<<"JonesJones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
ok;
-
- _->
+ _ ->
ok
end,
S255 = lists:seq(1, 255),
- Strings = {type,true,"","1","12","345",true,
- S255,[$a|S255],[$a,$b|S255],397},
- p_roundtrip('OsFixedStrings', Strings),
- p_roundtrip('OsFixedStringsExt', Strings),
- p_roundtrip('OsVarStringsExt', Strings),
+ Strings = {type,true,<<"">>,<<"1">>,<<"12">>,<<"345">>,true,
+ list_to_binary(S255),list_to_binary([$a|S255]),
+ list_to_binary([$a,$b|S255]),397},
+ p_os_roundtrip('OsFixedStrings', Strings),
+ p_os_roundtrip('OsFixedStringsExt', Strings),
+ p_os_roundtrip('OsVarStringsExt', Strings),
ShortenedStrings = shorten_by_two(Strings),
- p_roundtrip('OsFixedStringsExt', ShortenedStrings),
- p_roundtrip('OsVarStringsExt', ShortenedStrings),
+ p_os_roundtrip('OsFixedStringsExt', ShortenedStrings),
+ p_os_roundtrip('OsVarStringsExt', ShortenedStrings),
ok.
fragmented_octet_string(Erules, Lens) ->
@@ -414,13 +436,14 @@ fragmented_octet_string(Erules, Types, L) ->
ok.
enc_frag(Erules, Type, Value) ->
- {ok,Encoded} = 'PrimStrings':encode(Type, Value),
+ M = 'PrimStrings',
+ {ok,Encoded} = M:encode(Type, Value),
case Erules of
ber ->
Encoded;
_ ->
%% Validate encoding with our own encoder.
- Encoded = enc_frag_1(<<>>, list_to_binary(Value))
+ Encoded = enc_frag_1(<<>>, Value)
end.
enc_frag_1(Res, Bin0) ->
@@ -439,12 +462,12 @@ enc_frag_1(Res, Bin0) ->
end.
make_value(L) ->
- make_value(L, 0, []).
+ make_value(L, 0, <<>>).
make_value(0, _, Acc) ->
Acc;
make_value(N, Byte, Acc) when Byte =< 255 ->
- make_value(N-1, Byte+7, [Byte|Acc]);
+ make_value(N-1, Byte+7, <<Acc/binary,Byte:8>>);
make_value(N, Byte, Acc) ->
make_value(N, Byte band 16#FF, Acc).
@@ -742,10 +765,32 @@ utf8_string(_Rules) ->
shorten_by_two(Tuple) ->
L = [case E of
[_,_|T] -> T;
+ <<_:16,T/binary>> -> T;
_ -> E
end || E <- tuple_to_list(Tuple)],
list_to_tuple(L).
+p_os_roundtrip(Type, Value0) ->
+ Value = setelement(1, Value0, Type),
+ p_os_roundtrip_1(Type, Value).
+
+p_os_roundtrip_1(Type, Value) ->
+ M = 'PrimStrings',
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Value);
+ true ->
+ {ok,Encoded} = M:encode(Type, Value),
+ Es0 = tuple_to_list(Value),
+ Es1 = [if
+ is_binary(E) -> binary_to_list(E);
+ true -> E
+ end || E <- Es0],
+ ListValue = list_to_tuple(Es1),
+ {ok,Encoded} = M:encode(Type, ListValue),
+ {ok,ListValue} = M:decode(Type, Encoded)
+ end.
+
p_roundtrip(Type, Value0) ->
Value = setelement(1, Value0, Type),
roundtrip(Type, Value).
@@ -759,15 +804,57 @@ roundtrip(Type, Value, Expected) ->
bs_roundtrip(Type, Value) ->
bs_roundtrip(Type, Value, Value).
-bs_roundtrip(Type, Value, Expected) ->
+os_roundtrip(Type, Bin) when is_binary(Bin) ->
M = 'PrimStrings',
- {ok,Encoded} = M:encode(Type, Value),
- {ok,Encoded} = M:encode(Type, Expected),
- case M:decode(Type, Encoded) of
- {ok,Expected} ->
- ok;
- {ok,Other} ->
- Expected = convert(Other, Expected)
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Bin);
+ true ->
+ {ok,Encoded} = M:encode(Type, Bin),
+ List = binary_to_list(Bin),
+ {ok,Encoded} = M:encode(Type, List),
+ {ok,List} = M:decode(Type, Encoded)
+ end.
+
+bs_roundtrip(Type, Value, Expected) when is_bitstring(Value) ->
+ M = 'PrimStrings',
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Value, Expected);
+ true ->
+ {ok,Encoded} = M:encode(Type, Value),
+ BitList = [B || <<B:1>> <= Value],
+ {ok,Encoded} = M:encode(Type, BitList),
+ case BitList of
+ [] ->
+ {ok,Encoded} = M:encode(Type, 0);
+ [_|_] ->
+ case lists:last(BitList) of
+ 1 ->
+ Int = lists:foldr(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, BitList),
+ {ok,Encoded} = M:encode(Type, Int);
+ 0 ->
+ %% This BIT STRING cannot be represented
+ %% as an integer.
+ ok
+ end
+ end,
+ Compact = case bit_size(Value) of
+ Bits when Bits rem 8 =:= 0 ->
+ {0,Value};
+ Bits ->
+ Unused = 8 - Bits rem 8,
+ {Unused,<<Value:Bits/bitstring,0:Unused>>}
+ end,
+ {ok,Encoded} = M:encode(Type, Compact),
+ case M:decode(Type, Encoded) of
+ {ok,Expected} ->
+ ok;
+ {ok,Other} ->
+ Expected = convert(Other, Expected)
+ end
end.
bs_decode(Type, Encoded, Expected) ->
diff --git a/lib/asn1/test/testSeqExtension.erl b/lib/asn1/test/testSeqExtension.erl
index 8473459c36..c16e9fcd4c 100644
--- a/lib/asn1/test/testSeqExtension.erl
+++ b/lib/asn1/test/testSeqExtension.erl
@@ -44,7 +44,7 @@ main(Erule, DataDir, Opts) ->
roundtrip('SeqExt4', #'SeqExt4'{bool=true,int=12345}),
roundtrip('SeqExt4', #'SeqExt4'{bool=false,int=123456}),
- roundtrip('SeqExt5', #'SeqExt5'{name="Arne",shoesize=47}),
+ roundtrip('SeqExt5', #'SeqExt5'{name = <<"Arne">>,shoesize=47}),
%% Encode a value with this version of the specification.
BigInt = 128638468966,
@@ -52,7 +52,7 @@ main(Erule, DataDir, Opts) ->
s2=#'SeqExt2'{bool=true,int=2345},
s3=#'SeqExt3'{bool=false,int=17},
s4=#'SeqExt4'{bool=true,int=38739739},
- s5=#'SeqExt5'{name="Arne",shoesize=47},
+ s5=#'SeqExt5'{name = <<"Arne">>,shoesize=47},
s6=#'SeqExt6'{i1=531,i2=601,i3=999,
i4=777,i5=11953,
i6=13553,i7=77777},
diff --git a/lib/asn1/test/testSeqExternal.erl b/lib/asn1/test/testSeqExternal.erl
index a8e0902244..0b1d305054 100644
--- a/lib/asn1/test/testSeqExternal.erl
+++ b/lib/asn1/test/testSeqExternal.erl
@@ -29,15 +29,15 @@
-record('SeqXSet3',{bool, int, set}).
main(_Rules) ->
- roundtrip('XNTNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XImpNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XExpNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XNTImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XImpImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XExpImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XNTExp', #'XSeqExp'{os="kalle",bool=true}),
- roundtrip('XImpExp', #'XSeqExp'{os="kalle",bool=true}),
- roundtrip('XExpExp', #'XSeqExp'{os="kalle",bool=true}),
+ roundtrip('XNTNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
roundtrip('SeqXSet1',
#'SeqXSet1'{set=#'XSet1'{bool1=true,int1=77,
set1=#'XSetIn'{boolIn=false,intIn=88}},
diff --git a/lib/asn1/test/testSeqOf.erl b/lib/asn1/test/testSeqOf.erl
index 7f8f4079b4..25059d6052 100644
--- a/lib/asn1/test/testSeqOf.erl
+++ b/lib/asn1/test/testSeqOf.erl
@@ -85,10 +85,10 @@ main(_Rules) ->
seq43=SeqIn3}),
roundtrip('Seq5', {'Seq5',true,[],77}),
- roundtrip('Seq5', {'Seq5',true,[""],77}),
- roundtrip('Seq5', {'Seq5',true,["a"],77}),
- roundtrip('Seq5', {'Seq5',true,["ab"],77}),
- roundtrip('Seq5', {'Seq5',true,["abc"],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"a">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"ab">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"abc">>],77}),
roundtrip('Seq6', {'Seq6',[],[],101}),
roundtrip('Seq6', {'Seq6',[],[7],101}),
@@ -100,15 +100,15 @@ main(_Rules) ->
roundtrip('Seq8', {'Seq8',[],37}),
roundtrip('Seq9', {'Seq9',true,[],97}),
- roundtrip('Seq9', {'Seq9',true,[""],97}),
- roundtrip('Seq9', {'Seq9',true,["x"],97}),
- roundtrip('Seq9', {'Seq9',true,["xy"],97}),
- roundtrip('Seq9', {'Seq9',true,["xyz"],97}),
-
- roundtrip('Seq10', {'Seq10',true,[""],97}),
- roundtrip('Seq10', {'Seq10',true,["a"],97}),
- roundtrip('Seq10', {'Seq10',true,["a","b"],97}),
- roundtrip('Seq10', {'Seq10',true,["a","b","c"],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"x">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"xy">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"xyz">>],97}),
+
+ roundtrip('Seq10', {'Seq10',true,[<<"">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>,<<"b">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>,<<"b">>,<<"c">>],97}),
roundtrip('SeqEmp', #'SeqEmp'{seq1=[#'Empty'{}]}),
diff --git a/lib/asn1/test/testSeqOfExternal.erl b/lib/asn1/test/testSeqOfExternal.erl
index 2e60f441c1..38b9f0ce7c 100644
--- a/lib/asn1/test/testSeqOfExternal.erl
+++ b/lib/asn1/test/testSeqOfExternal.erl
@@ -29,50 +29,59 @@
main(_Rules) ->
roundtrip('NTNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('NTImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('NTExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqOfTag.erl b/lib/asn1/test/testSeqOfTag.erl
index 38c1dcb90f..f66e29e91d 100644
--- a/lib/asn1/test/testSeqOfTag.erl
+++ b/lib/asn1/test/testSeqOfTag.erl
@@ -44,47 +44,47 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SeqTagNt', #'SeqTagNt'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagNtI', #'SeqTagNtI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagNtE', #'SeqTagNtE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagI', #'SeqTagI'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagII', #'SeqTagII'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagIE', #'SeqTagIE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagE', #'SeqTagE'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagEI', #'SeqTagEI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagEE', #'SeqTagEE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
+ roundtrip('SeqTagNt', #'SeqTagNt'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagNtI', #'SeqTagNtI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagNtE', #'SeqTagNtE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagI', #'SeqTagI'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagII', #'SeqTagII'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagIE', #'SeqTagIE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagE', #'SeqTagE'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagEI', #'SeqTagEI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagEE', #'SeqTagEE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXNt',
- #'SeqTagXNt'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]}),
+ #'SeqTagXNt'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXI',
- #'SeqTagXI'{ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]}),
+ #'SeqTagXI'{ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXE',
- #'SeqTagXE'{xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagXE'{xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagImpX',
- #'SeqTagImpX'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}],
- ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}],
- xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagImpX'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagExpX',
- #'SeqTagExpX'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}],
- ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}],
- xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagExpX'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqPrim.erl b/lib/asn1/test/testSeqPrim.erl
index eb21d50a37..7f3ef86ac5 100644
--- a/lib/asn1/test/testSeqPrim.erl
+++ b/lib/asn1/test/testSeqPrim.erl
@@ -25,6 +25,7 @@
-record('Seq',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}).
-record('Empty',{}).
+-record('Big', {os1,os2,os3}).
main(_Rules) ->
roundtrip('Seq', #'Seq'{bool=true,boolCon=true,boolPri=true,boolApp=true,
@@ -35,6 +36,9 @@ main(_Rules) ->
roundtrip('Seq', #'Seq'{bool=false,boolCon=true,boolPri=false,boolApp=true,
boolExpCon=false,boolExpPri=true,boolExpApp=false}),
roundtrip('Empty', #'Empty'{}),
+ roundtrip('Big', #'Big'{os1=list_to_binary(lists:duplicate(120, 16#A5)),
+ os2=list_to_binary(lists:duplicate(128, 16#A7)),
+ os3=list_to_binary(lists:duplicate(17777, 16#F5))}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testSeqSetDefaultVal.erl b/lib/asn1/test/testSeqSetDefaultVal.erl
index 044099199f..c3d9ce33b7 100644
--- a/lib/asn1/test/testSeqSetDefaultVal.erl
+++ b/lib/asn1/test/testSeqSetDefaultVal.erl
@@ -36,6 +36,7 @@
c = asn1_DEFAULT,
d = asn1_DEFAULT,
e = asn1_DEFAULT}).
+-record('SeqBS2',{bs = asn1_DEFAULT}).
-record('SetBS',{a = asn1_DEFAULT,
b = asn1_DEFAULT,
c = asn1_DEFAULT,
@@ -93,6 +94,13 @@
b = asn1_DEFAULT}).
-record('S4_b',{ba = asn1_DEFAULT,
bb = asn1_DEFAULT}).
+-record('SeqNamedInts',
+ {i1 = asn1_DEFAULT,
+ i2 = asn1_DEFAULT}).
+-record('S5',{s3 = asn1_DEFAULT,
+ so = asn1_DEFAULT,
+ soe = asn1_DEFAULT}).
+-record('SOI', {soi = asn1_DEFAULT}).
main(ber, []) ->
%% Nothing to test because plain BER will only use
@@ -105,7 +113,11 @@ main(Rule, Opts) ->
case {Rule,Opts} of
{ber,[der]} ->
- der();
+ der(),
+ case 'Default':legacy_erlang_types() of
+ false -> der_new_types();
+ true -> der_legacy()
+ end;
{_,_} ->
ok
end,
@@ -118,51 +130,51 @@ main(Rule, Opts) ->
{#'SeqBS'{},
[{#'SeqBS'.a,
- [asn1_DEFAULT,
- 2#0110101,
+ [asn1_DEFAULT, %Always.
+ <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>],
+ [2#0110101, %Legacy only.
[1,0,1,0,1,1,0],
- {1,<<16#AC>>},
- <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>]},
+ {1,<<16#AC>>}]},
{#'SeqBS'.b,
[asn1_DEFAULT,
- 2#10100010101,
+ <<16#A8:8,16#A:4>>],
+ [2#10100010101,
[1,0,1,0,1,0,0,0,1,0,1,0],
- {4,<<16#A8,16#A0>>},
- <<16#A8:8,16#A:4>>]},
+ {4,<<16#A8,16#A0>>}]},
{#'SeqBS'.c,
[asn1_DEFAULT,
[second],
- [0,1],
- {6,<<0:1,1:1,0:6>>},
- <<1:2>>]},
+ <<1:2>>],
+ [[0,1],
+ {6,<<0:1,1:1,0:6>>}]},
{#'SeqBS'.c, %Zeroes on the right
[asn1_DEFAULT,
[second],
- [0,1,0,0,0],
- {4,<<0:1,1:1,0:6>>},
- <<1:2,0:17>>]},
+ <<1:2,0:17>>],
+ [[0,1,0,0,0],
+ {4,<<0:1,1:1,0:6>>}]},
{#'SeqBS'.d,
[asn1_DEFAULT,
- 2#1001,
+ <<2#1001:4>>],
+ [2#1001,
[1,0,0,1],
- {4,<<2#1001:4,0:4>>},
- <<2#1001:4>>]},
+ {4,<<2#1001:4,0:4>>}]},
{#'SeqBS'.e,
[asn1_DEFAULT,
- [0,1,0,1,1,0,1,0],
- {0,<<2#01011010:8>>},
- <<2#01011010:8>>]},
+ <<2#01011010:8>>],
+ [[0,1,0,1,1,0,1,0],
+ {0,<<2#01011010:8>>}]},
%% Not EQUAL to DEFAULT.
{#'SeqBS'.b,
+ [<<6:3>>],
[[1,1,0], %Not equal to DEFAULT
- {5,<<6:3,0:5>>},
- <<6:3>>]}
+ {5,<<6:3,0:5>>}]}
]},
{#'SeqOS'{},
[{#'SeqOS'.a,
[asn1_DEFAULT,
- [172]]}]},
+ <<172>>]}]},
{#'SeqOI'{},
[{#'SeqOI'.a,
@@ -170,15 +182,14 @@ main(Rule, Opts) ->
{1,2,14,15}]},
{#'SeqOI'.b,
[asn1_DEFAULT,
-%% {iso,'member-body',250,3,4},
+ %% {iso,'member-body',250,3,4},
{1,2,250,3,4}]},
{#'SeqOI'.c,
[asn1_DEFAULT,
-%% {iso,standard,8571,2,250,4},
+ %% {iso,standard,8571,2,250,4},
{1,0,8571,2,250,4}]}]}
],
- io:format("~p\n", [Ts]),
- R0 = [[consistency(Rec, Pos, Vs) || {Pos,Vs} <- Fs] || {Rec,Fs} <- Ts],
+ R0 = [[consistency(Rec, PosVs) || PosVs <- Fs] || {Rec,Fs} <- Ts],
case lists:flatten(R0) of
[] ->
ok;
@@ -187,8 +198,20 @@ main(Rule, Opts) ->
?t:fail()
end.
-consistency(Rec0, Pos, [V|Vs]) ->
+legacy_filter({_,_}=Keep) ->
+ Keep;
+legacy_filter({Rec,Standard,Legacy}) ->
+ case 'Default':legacy_erlang_types() of
+ false ->
+ {Rec,Standard};
+ true ->
+ {Rec,Standard++Legacy}
+ end.
+
+consistency(Rec0, PosVs) ->
+ {Pos,[V|Vs]=AllVs} = legacy_filter(PosVs),
T = element(1, Rec0),
+ io:format("~p: ~p\n", [T,AllVs]),
Rec = setelement(Pos, Rec0, V),
{ok,Enc} = 'Default':encode(T, Rec),
{ok,_SmokeTest} = 'Default':decode(T, Enc),
@@ -206,7 +229,7 @@ consistency_1([V|Vs], Rec0, Pos, Enc) ->
consistency_1([], _, _, _) -> [].
der() ->
- io:put_chars("Peforming DER-specific tests..."),
+ io:put_chars("Performing DER-specific tests..."),
roundtrip(<<48,0>>,
'SeqInts',
#'SeqInts'{a=asn1_DEFAULT,b=asn1_DEFAULT,
@@ -227,105 +250,6 @@ der() ->
#'SetInts'{a=1,b=-1,c=three,d=1},
#'SetInts'{a=1,b=-1,c=3,d=1}),
-
- roundtrip(<<48,0>>,
- 'SeqBS',
- #'SeqBS'{a=2#0110101,
- b=2#010100010101,
- c=[second],
- d=[1,0,0,1]},
- #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<2#1001:4>>,
- e = <<2#01011010:8>>}),
- roundtrip(<<48,0>>,
- 'SeqBS',
- #'SeqBS'{a=[1,0,1,0,1,1,0],
- b=[1,0,1,0,1,0,0,0,1,0,1,0],
- c={5,<<64>>},
- d=2#1001},
- #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<2#1001:4>>,
- e = <<2#01011010:8>>}),
- roundtrip(<<48,3,131,1,0>>,
- 'SeqBS',
- #'SeqBS'{a=[1,0,1,0,1,1,0],
- b=[1,0,1,0,1,0,0,0,1,0,1,0],
- c={5,<<64>>},
- d=0},
- #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<>>,
- e = <<2#01011010:8>>}),
- roundtrip(<<48,3,131,1,0>>,
- 'SeqBS',
- #'SeqBS'{a = <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>,
- b = <<1:1,0:1,1:1,0:1,1:1,0:1,0:1,0:1,1:1,0:1,1:1,0:1>>,
- c = <<2:3>>,
- d=0,
- e = <<16#5A:8>>},
- #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<>>,
- e = <<2#01011010:8>>}),
-
- %% None of the default values are used.
- roundtrip(<<48,19,128,2,7,128,129,2,5,64,130,2,5,32,131,1,0,132,2,5,224>>,
- 'SeqBS',
- #'SeqBS'{a = <<1:1>>,
- b = {5,<<64>>},
- c = [third],
- d = 0,
- e = <<7:3>>},
- #'SeqBS'{a = <<1:1>>,
- b = <<2:3>>,
- c = [third],
- d = <<>>,
- e = <<7:3>>}),
-
- roundtrip(<<49,0>>,
- 'SetBS',
- #'SetBS'{a=2#0110101,
- b=2#010100010101,
- c=[second],
- d=[1,0,0,1]},
- #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<2#1001:4>>}),
- roundtrip(<<49,0>>,
- 'SetBS',
- #'SetBS'{a=[1,0,1,0,1,1,0],
- b=[1,0,1,0,1,0,0,0,1,0,1,0],
- c={5,<<64>>},
- d=9},
- #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<2#1001:4>>}),
- roundtrip(<<49,3,131,1,0>>,
- 'SetBS',
- #'SetBS'{a=[1,0,1,0,1,1,0],
- b=[1,0,1,0,1,0,0,0,1,0,1,0],
- c={5,<<64>>},
- d=0},
- #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<>>}),
- roundtrip(<<49,3,131,1,0>>,
- 'SetBS',
- #'SetBS'{a = <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>,
- b = <<1:1,0:1,1:1,0:1,1:1,0:1,0:1,0:1,1:1,0:1,1:1,0:1>>,
- c = <<2:3>>,
- d=0},
- #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
- c=[second], d = <<>>}),
-
- roundtrip(<<48,0>>, 'SeqOS',
- #'SeqOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
- roundtrip(<<48,0>>,
- 'SeqOS',
- #'SeqOS'{a=172,b=43168,c='NULL'},
- #'SeqOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
-
- roundtrip(<<49,0>>, 'SetOS', #'SetOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
- roundtrip(<<49,0>>,
- 'SetOS',
- #'SetOS'{a=172,b=43168,c='NULL'},
- #'SetOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
-
roundtrip(<<48,0>>,
'SeqOI',
#'SeqOI'{a={1,2,14,15},
@@ -450,6 +374,184 @@ der() ->
#'S4'{a=#'S2'{a=1,b=asn1_NOVALUE},b=#'S4_b'{ba=true,bb=0}},
#'S4'{a=#'S2'{a=1,b=asn1_NOVALUE},b=#'S4_b'{ba=true,bb=0}}),
+ roundtrip(<<48,0>>,
+ 'SeqBS',
+ #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>,
+ e = <<2#01011010:8>>}),
+ roundtrip(<<49,0>>,
+ 'SetBS',
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>}),
+
+ %% None of the default values are used.
+ roundtrip(<<48,19,128,2,7,128,129,2,5,64,130,2,5,32,131,1,0,132,2,5,224>>,
+ 'SeqBS',
+ #'SeqBS'{a = <<1:1>>,
+ b = <<2:3>>,
+ c = [third],
+ d = <<>>,
+ e = <<7:3>>}),
+ roundtrip(<<49,3,131,1,0>>,
+ 'SetBS',
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<>>}),
+
+ %% SeqNamedInts
+ roundtrip(<<48,0>>,
+ 'SeqNamedInts',
+ #'SeqNamedInts'{i1=15,i2=31}),
+ roundtrip(<<48,0>>,
+ 'SeqNamedInts',
+ #'SeqNamedInts'{},
+ #'SeqNamedInts'{i1=15,i2=31}),
+ roundtrip(<<48,0>>,
+ 'SeqNamedInts',
+ #'SeqNamedInts'{i2=last},
+ #'SeqNamedInts'{i1=15,i2=31}),
+ roundtrip(<<48,3,128,1,0>>,
+ 'SeqNamedInts',
+ #'SeqNamedInts'{i1=first,i2=31},
+ #'SeqNamedInts'{i1=first,i2=31}),
+
+ %% S5
+ roundtrip(<<48,0>>,
+ 'S5',
+ #'S5'{s3=#'S3'{a=[11,12,13],
+ b=[{a,11},{b,true},{c,13}],
+ c=[1,2,3,4],
+ d=[#'S2'{a=20,b=true},#'S2'{a=30,b=false}]},
+ so=[{0,1,999},{0,1,555}],
+ soe=[]}),
+ roundtrip(<<48,0>>,
+ 'S5',
+ #'S5'{},
+ #'S5'{s3=#'S3'{a=[11,12,13],
+ b=[{a,11},{b,true},{c,13}],
+ c=[1,2,3,4],
+ d=[#'S2'{a=20,b=true},#'S2'{a=30,b=false}]},
+ so=[{0,1,999},{0,1,555}],
+ soe=[]}),
+
+ %% SOI
+ roundtrip(<<48,0>>,
+ 'SOI',
+ #'SOI'{},
+ #'SOI'{soi=[{1,2,250,9,55},{1,2,250,3,4}]}),
+
+ %% SeqBS2
+ roundtrip(<<48,0>>,
+ 'SeqBS2',
+ #'SeqBS2'{bs= <<16#5:3>>}),
+ roundtrip(<<48,0>>,
+ 'SeqBS2',
+ #'SeqBS2'{bs= <<16#5:3,0:4>>},
+ #'SeqBS2'{bs= <<16#5:3>>}),
+
+ ok.
+
+der_new_types() ->
+ io:put_chars("Performing DER-specific tests with new types..."),
+
+ roundtrip(<<48,0>>, 'SeqOS',
+ #'SeqOS'{a = <<172>>,b = <<16#A8,16#A0>>,c='NULL'}),
+
+ roundtrip(<<49,0>>, 'SetOS',
+ #'SetOS'{a = <<172>>,b = <<16#A8,16#A0>>,c='NULL'}),
+ ok.
+
+der_legacy() ->
+ io:put_chars("Performing DER-specific tests with legacy types..."),
+
+ roundtrip(<<48,0>>, 'SeqOS',
+ #'SeqOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
+ roundtrip(<<49,0>>, 'SetOS',
+ #'SetOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
+
+ roundtrip(<<48,0>>,
+ 'SeqBS',
+ #'SeqBS'{a=2#0110101,
+ b=2#010100010101,
+ c=[second],
+ d=[1,0,0,1]},
+ #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>,
+ e = <<2#01011010:8>>}),
+ roundtrip(<<48,0>>,
+ 'SeqBS',
+ #'SeqBS'{a=[1,0,1,0,1,1,0],
+ b=[1,0,1,0,1,0,0,0,1,0,1,0],
+ c={5,<<64>>},
+ d=2#1001},
+ #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>,
+ e = <<2#01011010:8>>}),
+ roundtrip(<<48,3,131,1,0>>,
+ 'SeqBS',
+ #'SeqBS'{a=[1,0,1,0,1,1,0],
+ b=[1,0,1,0,1,0,0,0,1,0,1,0],
+ c={5,<<64>>},
+ d=0},
+ #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<>>,
+ e = <<2#01011010:8>>}),
+ roundtrip(<<48,3,131,1,0>>,
+ 'SeqBS',
+ #'SeqBS'{a = <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>,
+ b = <<1:1,0:1,1:1,0:1,1:1,0:1,0:1,0:1,1:1,0:1,1:1,0:1>>,
+ c = <<2:3>>,
+ d=0,
+ e = <<16#5A:8>>},
+ #'SeqBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<>>,
+ e = <<2#01011010:8>>}),
+
+ %% None of the default values are used.
+ roundtrip(<<48,19,128,2,7,128,129,2,5,64,130,2,5,32,131,1,0,132,2,5,224>>,
+ 'SeqBS',
+ #'SeqBS'{a = <<1:1>>,
+ b = {5,<<64>>},
+ c = [third],
+ d = 0,
+ e = <<7:3>>},
+ #'SeqBS'{a = <<1:1>>,
+ b = <<2:3>>,
+ c = [third],
+ d = <<>>,
+ e = <<7:3>>}),
+ roundtrip(<<49,0>>,
+ 'SetBS',
+ #'SetBS'{a=2#0110101,
+ b=2#010100010101,
+ c=[second],
+ d=[1,0,0,1]},
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>}),
+ roundtrip(<<49,0>>,
+ 'SetBS',
+ #'SetBS'{a=[1,0,1,0,1,1,0],
+ b=[1,0,1,0,1,0,0,0,1,0,1,0],
+ c={5,<<64>>},
+ d=9},
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<2#1001:4>>}),
+ roundtrip(<<49,3,131,1,0>>,
+ 'SetBS',
+ #'SetBS'{a=[1,0,1,0,1,1,0],
+ b=[1,0,1,0,1,0,0,0,1,0,1,0],
+ c={5,<<64>>},
+ d=0},
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<>>}),
+ roundtrip(<<49,3,131,1,0>>,
+ 'SetBS',
+ #'SetBS'{a = <<1:1,0:1,1:1,0:1,1:1,1:1,0:1>>,
+ b = <<1:1,0:1,1:1,0:1,1:1,0:1,0:1,0:1,1:1,0:1,1:1,0:1>>,
+ c = <<2:3>>,
+ d=0},
+ #'SetBS'{a = <<2#1010110:7>>, b = <<16#A8A:12>>,
+ c=[second], d = <<>>}),
+
ok.
roundtrip(Encoded, Type, Value) ->
diff --git a/lib/asn1/test/testSeqTag.erl b/lib/asn1/test/testSeqTag.erl
index 2f127b3e97..6bacca6808 100644
--- a/lib/asn1/test/testSeqTag.erl
+++ b/lib/asn1/test/testSeqTag.erl
@@ -35,24 +35,24 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SeqTag', #'SeqTag'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagImp', #'SeqTagImp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagExp', #'SeqTagExp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagX', #'SeqTagX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
- roundtrip('SeqTagImpX', #'SeqTagImpX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
- roundtrip('SeqTagExpX', #'SeqTagExpX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
+ roundtrip('SeqTag', #'SeqTag'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagImp', #'SeqTagImp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagExp', #'SeqTagExp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagX', #'SeqTagX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagImpX', #'SeqTagImpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagExpX', #'SeqTagExpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefCho.erl b/lib/asn1/test/testSeqTypeRefCho.erl
index b008bc46b8..1a921c6f38 100644
--- a/lib/asn1/test/testSeqTypeRefCho.erl
+++ b/lib/asn1/test/testSeqTypeRefCho.erl
@@ -28,10 +28,10 @@
main(_Rules) ->
roundtrip('SeqTRcho',
- #'SeqTRcho'{'seqCho' = {choOs,"A string 1"},
- 'seqChoE' = {choOs,"A string 3"},
- 'seqCho-E' = {choOs,"A string 7"},
- 'seqChoE-E' = {choOs,"A string 9"}}),
+ #'SeqTRcho'{'seqCho' = {choOs,<<"A string 1">>},
+ 'seqChoE' = {choOs,<<"A string 3">>},
+ 'seqCho-E' = {choOs,<<"A string 7">>},
+ 'seqChoE-E' = {choOs,<<"A string 9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefPrim.erl b/lib/asn1/test/testSeqTypeRefPrim.erl
index b63882ae99..d66d1ebcfe 100644
--- a/lib/asn1/test/testSeqTypeRefPrim.erl
+++ b/lib/asn1/test/testSeqTypeRefPrim.erl
@@ -26,15 +26,15 @@
main(_Rules) ->
roundtrip('SeqTR',
- #'SeqTR'{'octStr' = "A string 1",
- 'octStrI' = "A string 2",
- 'octStrE' = "A string 3",
- 'octStr-I' = "A string 4",
- 'octStrI-I' = "A string 5",
- 'octStrE-I' = "A string 6",
- 'octStr-E' = "A string 7",
- 'octStrI-E' = "A string 8",
- 'octStrE-E' = "A string 9"}),
+ #'SeqTR'{'octStr' = <<"A string 1">>,
+ 'octStrI' = <<"A string 2">>,
+ 'octStrE' = <<"A string 3">>,
+ 'octStr-I' = <<"A string 4">>,
+ 'octStrI-I' = <<"A string 5">>,
+ 'octStrE-I' = <<"A string 6">>,
+ 'octStr-E' = <<"A string 7">>,
+ 'octStrI-E' = <<"A string 8">>,
+ 'octStrE-E' = <<"A string 9">>}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefSeq.erl b/lib/asn1/test/testSeqTypeRefSeq.erl
index fc2e0a67c9..3288511f0a 100644
--- a/lib/asn1/test/testSeqTypeRefSeq.erl
+++ b/lib/asn1/test/testSeqTypeRefSeq.erl
@@ -71,15 +71,15 @@ main(_Rules) ->
seqS2=#'SeqSTag_seqS2'{b2=true,i2=22},
seqS3=#'SeqSTag_seqS3'{b3=true,i3=33}}),
roundtrip('SeqTRseq',
- #'SeqTRseq'{seqSeq=#'SeqSeq'{seqInt=2,seqOs="A1"},
- seqSeqI=#'SeqSeq'{seqInt=2,seqOs="A2"},
- seqSeqE=#'SeqSeq'{seqInt=2,seqOs="A3"},
- 'seqSeq-I'=#'SeqSeqImp'{seqInt=2,seqOs="A4"},
- 'seqSeqI-I'=#'SeqSeqImp'{seqInt=2,seqOs="A5"},
- 'seqSeqE-I'=#'SeqSeqImp'{seqInt=2,seqOs="A6"},
- 'seqSeq-E'=#'SeqSeqExp'{seqInt=2,seqOs="A7"},
- 'seqSeqI-E'=#'SeqSeqExp'{seqInt=2,seqOs="A8"},
- 'seqSeqE-E'=#'SeqSeqExp'{seqInt=2,seqOs="A9"}}),
+ #'SeqTRseq'{seqSeq=#'SeqSeq'{seqInt=2,seqOs = <<"A1">>},
+ seqSeqI=#'SeqSeq'{seqInt=2,seqOs = <<"A2">>},
+ seqSeqE=#'SeqSeq'{seqInt=2,seqOs = <<"A3">>},
+ 'seqSeq-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A4">>},
+ 'seqSeqI-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A5">>},
+ 'seqSeqE-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A6">>},
+ 'seqSeq-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A7">>},
+ 'seqSeqI-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A8">>},
+ 'seqSeqE-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefSet.erl b/lib/asn1/test/testSeqTypeRefSet.erl
index 911a4b7a47..d73423284b 100644
--- a/lib/asn1/test/testSeqTypeRefSet.erl
+++ b/lib/asn1/test/testSeqTypeRefSet.erl
@@ -32,15 +32,15 @@
main(_Rules) ->
roundtrip('SeqTRset',
- #'SeqTRset'{seqSet=#'SeqSet'{setInt=2,setOs="A1"},
- seqSetI=#'SeqSet'{setInt=2,setOs="A2"},
- seqSetE=#'SeqSet'{setInt=2,setOs="A3"},
- 'seqSet-I'=#'SeqSetImp'{setInt=2,setOs="A4"},
- 'seqSetI-I'=#'SeqSetImp'{setInt=2,setOs="A5"},
- 'seqSetE-I'=#'SeqSetImp'{setInt=2,setOs="A6"},
- 'seqSet-E'=#'SeqSetExp'{setInt=2,setOs="A7"},
- 'seqSetI-E'=#'SeqSetExp'{setInt=2,setOs="A8"},
- 'seqSetE-E'=#'SeqSetExp'{setInt=2,setOs="A9"}}),
+ #'SeqTRset'{seqSet=#'SeqSet'{setInt=2,setOs = <<"A1">>},
+ seqSetI=#'SeqSet'{setInt=2,setOs = <<"A2">>},
+ seqSetE=#'SeqSet'{setInt=2,setOs = <<"A3">>},
+ 'seqSet-I'=#'SeqSetImp'{setInt=2,setOs = <<"A4">>},
+ 'seqSetI-I'=#'SeqSetImp'{setInt=2,setOs = <<"A5">>},
+ 'seqSetE-I'=#'SeqSetImp'{setInt=2,setOs = <<"A6">>},
+ 'seqSet-E'=#'SeqSetExp'{setInt=2,setOs = <<"A7">>},
+ 'seqSetI-E'=#'SeqSetExp'{setInt=2,setOs = <<"A8">>},
+ 'seqSetE-E'=#'SeqSetExp'{setInt=2,setOs = <<"A9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetExternal.erl b/lib/asn1/test/testSetExternal.erl
index e17d7053aa..626adc5822 100644
--- a/lib/asn1/test/testSetExternal.erl
+++ b/lib/asn1/test/testSetExternal.erl
@@ -28,15 +28,15 @@
-record('SetXSeq3',{bool, int, seq}).
main(_Rules) ->
- roundtrip('XNTNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XImpNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XExpNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XNTImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XImpImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XExpImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XNTExp', #'XSetExp'{os="kalle",bool=true}),
- roundtrip('XImpExp', #'XSetExp'{os="kalle",bool=true}),
- roundtrip('XExpExp', #'XSetExp'{os="kalle",bool=true}),
+ roundtrip('XNTNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
roundtrip('SetXSeq1', #'SetXSeq1'{seq=#'XSeq1'{bool1=true,int1=77,
seq1=#'XSeqIn'{boolIn=false,intIn=88}},
bool=true,int=66}),
diff --git a/lib/asn1/test/testSetOf.erl b/lib/asn1/test/testSetOf.erl
index 54c42c1f21..0f82a14625 100644
--- a/lib/asn1/test/testSetOf.erl
+++ b/lib/asn1/test/testSetOf.erl
@@ -121,9 +121,9 @@ main(_Rules) ->
#'SetIn'{boolIn=false,intIn=125},
#'SetIn'{boolIn=false,intIn=225}]}),
- roundtrip('SetOs', ["First","Second","Third"]),
- roundtrip('SetOsImp', ["First","Second","Third"]),
- roundtrip('SetOsExp', ["First","Second","Third"]),
+ roundtrip('SetOs', [<<"First">>,<<"Second">>,<<"Third">>]),
+ roundtrip('SetOsImp', [<<"First">>,<<"Second">>,<<"Third">>]),
+ roundtrip('SetOsExp', [<<"First">>,<<"Second">>,<<"Third">>]),
roundtrip('SetEmp', #'SetEmp'{set1=[#'Empty'{}]}),
ok.
diff --git a/lib/asn1/test/testSetOfExternal.erl b/lib/asn1/test/testSetOfExternal.erl
index a380ba5ac1..cc5fe10710 100644
--- a/lib/asn1/test/testSetOfExternal.erl
+++ b/lib/asn1/test/testSetOfExternal.erl
@@ -28,24 +28,42 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('NTNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('ImpNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('ExpNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('NTImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('ImpImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('ExpImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('NTExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('ImpExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('ExpExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('XNTNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XImpNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XExpNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XNTImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XImpImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XExpImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XNTExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
- roundtrip('XImpExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
- roundtrip('XExpExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
+ roundtrip('NTNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('NTImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('NTExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetOfTag.erl b/lib/asn1/test/testSetOfTag.erl
index 81bc467abb..0d656f05a6 100644
--- a/lib/asn1/test/testSetOfTag.erl
+++ b/lib/asn1/test/testSetOfTag.erl
@@ -42,42 +42,42 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SetTagNt', #'SetTagNt'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagNtI', #'SetTagNtI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagNtE', #'SetTagNtE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagI', #'SetTagI'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagII', #'SetTagII'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagIE', #'SetTagIE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagE', #'SetTagE'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagEI', #'SetTagEI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagEE', #'SetTagEE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagXNt', #'SetTagXNt'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}]}),
- roundtrip('SetTagXI', #'SetTagXI'{ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}]}),
- roundtrip('SetTagXE', #'SetTagXE'{xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
- roundtrip('SetTagImpX', #'SetTagImpX'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}],
- ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}],
- xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
- roundtrip('SetTagExpX', #'SetTagExpX'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}],
- ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}],
- xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
+ roundtrip('SetTagNt', #'SetTagNt'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagNtI', #'SetTagNtI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagNtE', #'SetTagNtE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagI', #'SetTagI'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagII', #'SetTagII'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagIE', #'SetTagIE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagE', #'SetTagE'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagEI', #'SetTagEI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagEE', #'SetTagEE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXNt', #'SetTagXNt'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXI', #'SetTagXI'{ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXE', #'SetTagXE'{xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagImpX', #'SetTagImpX'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagExpX', #'SetTagExpX'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTag.erl b/lib/asn1/test/testSetTag.erl
index 5863a149b9..fa1d84f50d 100644
--- a/lib/asn1/test/testSetTag.erl
+++ b/lib/asn1/test/testSetTag.erl
@@ -34,24 +34,24 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SetTag', #'SetTag'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagImp', #'SetTagImp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagExp', #'SetTagExp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagX', #'SetTagX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
- roundtrip('SetTagImpX', #'SetTagImpX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
- roundtrip('SetTagExpX', #'SetTagExpX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
+ roundtrip('SetTag', #'SetTag'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagImp', #'SetTagImp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagExp', #'SetTagExp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagX', #'SetTagX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagImpX', #'SetTagImpX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagExpX', #'SetTagExpX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefCho.erl b/lib/asn1/test/testSetTypeRefCho.erl
index 8d62f45bfa..97bbd557e0 100644
--- a/lib/asn1/test/testSetTypeRefCho.erl
+++ b/lib/asn1/test/testSetTypeRefCho.erl
@@ -29,10 +29,10 @@
main(_Rules) ->
roundtrip('SetTRcho',
- #'SetTRcho'{'setCho' = {choOs,"A string 1"},
- 'setChoE' = {choOs,"A string 3"},
- 'setCho-E' = {choOs,"A string 7"},
- 'setChoE-E' = {choOs,"A string 9"}}),
+ #'SetTRcho'{'setCho' = {choOs,<<"A string 1">>},
+ 'setChoE' = {choOs,<<"A string 3">>},
+ 'setCho-E' = {choOs,<<"A string 7">>},
+ 'setChoE-E' = {choOs,<<"A string 9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefPrim.erl b/lib/asn1/test/testSetTypeRefPrim.erl
index cc2e157e68..d441fb789d 100644
--- a/lib/asn1/test/testSetTypeRefPrim.erl
+++ b/lib/asn1/test/testSetTypeRefPrim.erl
@@ -28,15 +28,15 @@
main(_Rules) ->
roundtrip('SetTR',
- #'SetTR'{'octStr' = "A string 1",
- 'octStrI' = "A string 2",
- 'octStrE' = "A string 3",
- 'octStr-I' = "A string 4",
- 'octStrI-I' = "A string 5",
- 'octStrE-I' = "A string 6",
- 'octStr-E' = "A string 7",
- 'octStrI-E' = "A string 8",
- 'octStrE-E' = "A string 9"}),
+ #'SetTR'{'octStr' = <<"A string 1">>,
+ 'octStrI' = <<"A string 2">>,
+ 'octStrE' = <<"A string 3">>,
+ 'octStr-I' = <<"A string 4">>,
+ 'octStrI-I' = <<"A string 5">>,
+ 'octStrE-I' = <<"A string 6">>,
+ 'octStr-E' = <<"A string 7">>,
+ 'octStrI-E' = <<"A string 8">>,
+ 'octStrE-E' = <<"A string 9">>}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefSeq.erl b/lib/asn1/test/testSetTypeRefSeq.erl
index 17af5c2922..a2b5f5745e 100644
--- a/lib/asn1/test/testSetTypeRefSeq.erl
+++ b/lib/asn1/test/testSetTypeRefSeq.erl
@@ -30,23 +30,23 @@
main(_Rules) ->
roundtrip('SetTRseq',
- #'SetTRseq'{'setSeq' = #'SetSeq'{seqOs = "A1",
+ #'SetTRseq'{'setSeq' = #'SetSeq'{seqOs = <<"A1">>,
seqInt = 2},
- 'setSeqI' = #'SetSeq'{seqOs = "A2",
+ 'setSeqI' = #'SetSeq'{seqOs = <<"A2">>,
seqInt = 2},
- 'setSeqE' = #'SetSeq'{seqOs = "A3",
+ 'setSeqE' = #'SetSeq'{seqOs = <<"A3">>,
seqInt = 2},
- 'setSeq-I' = #'SetSeqImp'{seqOs = "A4",
+ 'setSeq-I' = #'SetSeqImp'{seqOs = <<"A4">>,
seqInt = 2},
- 'setSeqI-I' = #'SetSeqImp'{seqOs = "A5",
+ 'setSeqI-I' = #'SetSeqImp'{seqOs = <<"A5">>,
seqInt = 2},
- 'setSeqE-I' = #'SetSeqImp'{seqOs = "A6",
+ 'setSeqE-I' = #'SetSeqImp'{seqOs = <<"A6">>,
seqInt = 2},
- 'setSeq-E' = #'SetSeqExp'{seqOs = "A7",
+ 'setSeq-E' = #'SetSeqExp'{seqOs = <<"A7">>,
seqInt = 2},
- 'setSeqI-E' = #'SetSeqExp'{seqOs = "A8",
+ 'setSeqI-E' = #'SetSeqExp'{seqOs = <<"A8">>,
seqInt = 2},
- 'setSeqE-E' = #'SetSeqExp'{seqOs = "A9",
+ 'setSeqE-E' = #'SetSeqExp'{seqOs = <<"A9">>,
seqInt = 2}}),
ok.
diff --git a/lib/asn1/test/testSetTypeRefSet.erl b/lib/asn1/test/testSetTypeRefSet.erl
index 8786e0fb4d..80a6be58c9 100644
--- a/lib/asn1/test/testSetTypeRefSet.erl
+++ b/lib/asn1/test/testSetTypeRefSet.erl
@@ -71,15 +71,15 @@ main(_Rules) ->
setS2=#'SetSTag_setS2'{b2=true,i2=22},
setS3=#'SetSTag_setS3'{b3=true,i3=33}}),
roundtrip('SetTRset',
- #'SetTRset'{setSet=#'SetSet'{setInt=2,setOs="A1"},
- setSetI=#'SetSet'{setInt=2,setOs="A2"},
- setSetE=#'SetSet'{setInt=2,setOs="A3"},
- 'setSet-I'=#'SetSetImp'{setInt=2,setOs="A4"},
- 'setSetI-I'=#'SetSetImp'{setInt=2,setOs="A5"},
- 'setSetE-I'=#'SetSetImp'{setInt=2,setOs="A6"},
- 'setSet-E'=#'SetSetExp'{setInt=2,setOs="A7"},
- 'setSetI-E'=#'SetSetExp'{setInt=2,setOs="A8"},
- 'setSetE-E'=#'SetSetExp'{setInt=2,setOs="A9"}}),
+ #'SetTRset'{setSet=#'SetSet'{setInt=2,setOs = <<"A1">>},
+ setSetI=#'SetSet'{setInt=2,setOs = <<"A2">>},
+ setSetE=#'SetSet'{setInt=2,setOs = <<"A3">>},
+ 'setSet-I'=#'SetSetImp'{setInt=2,setOs = <<"A4">>},
+ 'setSetI-I'=#'SetSetImp'{setInt=2,setOs = <<"A5">>},
+ 'setSetE-I'=#'SetSetImp'{setInt=2,setOs = <<"A6">>},
+ 'setSet-E'=#'SetSetExp'{setInt=2,setOs = <<"A7">>},
+ 'setSetI-E'=#'SetSetExp'{setInt=2,setOs = <<"A8">>},
+ 'setSetE-E'=#'SetSetExp'{setInt=2,setOs = <<"A9">>}}),
ok.
diff --git a/lib/asn1/test/testTcapsystem.erl b/lib/asn1/test/testTcapsystem.erl
index 4979a385b2..fcc9e084e0 100644
--- a/lib/asn1/test/testTcapsystem.erl
+++ b/lib/asn1/test/testTcapsystem.erl
@@ -21,44 +21,42 @@
-export([compile/2]).
--include_lib("test_server/include/test_server.hrl").
-
compile(Config, Options) ->
- [asn1_test_lib:compile(filename:join([tcapsystem, M]), Config, Options)
- || M <- ["DialoguePDUs.asn",
- "MAP-ApplicationContexts.asn",
- "MAP-BS-Code.asn",
- "MAP-CallHandlingOperations.asn",
- "MAP-CH-DataTypes.asn",
- "MAP-CommonDataTypes.asn",
- "MAP-DialogueInformation.asn",
- "MAP-ER-DataTypes.asn",
- "MAP-Errors.asn",
- "MAP-ExtensionDataTypes.asn",
- "MAP-GR-DataTypes.asn",
- "MAP-Group-Call-Operations.asn",
- "MAP-LCS-DataTypes.asn",
- "MAP-LocationServiceOperations.asn",
- "MAP-MobileServiceOperations.asn",
- "MAP-MS-DataTypes.asn",
- "MAP-OM-DataTypes.asn",
- "MAP-OperationAndMaintenanceOperations.asn",
- "MAP-Protocol.asn",
- "MAP-SecureTransportOperations.asn",
- "MAP-ShortMessageServiceOperations.asn",
- "MAP-SM-DataTypes.asn",
- "MAP-SS-Code.asn",
- "MAP-SS-DataTypes.asn",
- "MAP-ST-DataTypes.asn",
- "MAP-SupplementaryServiceOperations.asn",
- "MAP-TS-Code.asn",
- "MobileDomainDefinitions.asn",
- "Remote-Operations-Generic-ROS-PDUs.asn",
- "Remote-Operations-Information-Objects.asn",
- "Remote-Operations-Useful-Definitions.asn",
- "TCAP-Examples.asn",
- "TCAPMessages.asn",
- "TCAP-Tools.asn",
- "TC-Notation-Extensions.asn",
- "UnidialoguePDUs.asn"]],
- ok.
+ Fs = [filename:join("tcapsystem", M) ||
+ M <- ["DialoguePDUs.asn",
+ "MAP-ApplicationContexts.asn",
+ "MAP-BS-Code.asn",
+ "MAP-CallHandlingOperations.asn",
+ "MAP-CH-DataTypes.asn",
+ "MAP-CommonDataTypes.asn",
+ "MAP-DialogueInformation.asn",
+ "MAP-ER-DataTypes.asn",
+ "MAP-Errors.asn",
+ "MAP-ExtensionDataTypes.asn",
+ "MAP-GR-DataTypes.asn",
+ "MAP-Group-Call-Operations.asn",
+ "MAP-LCS-DataTypes.asn",
+ "MAP-LocationServiceOperations.asn",
+ "MAP-MobileServiceOperations.asn",
+ "MAP-MS-DataTypes.asn",
+ "MAP-OM-DataTypes.asn",
+ "MAP-OperationAndMaintenanceOperations.asn",
+ "MAP-Protocol.asn",
+ "MAP-SecureTransportOperations.asn",
+ "MAP-ShortMessageServiceOperations.asn",
+ "MAP-SM-DataTypes.asn",
+ "MAP-SS-Code.asn",
+ "MAP-SS-DataTypes.asn",
+ "MAP-ST-DataTypes.asn",
+ "MAP-SupplementaryServiceOperations.asn",
+ "MAP-TS-Code.asn",
+ "MobileDomainDefinitions.asn",
+ "Remote-Operations-Generic-ROS-PDUs.asn",
+ "Remote-Operations-Information-Objects.asn",
+ "Remote-Operations-Useful-Definitions.asn",
+ "TCAP-Examples.asn",
+ "TCAPMessages.asn",
+ "TCAP-Tools.asn",
+ "TC-Notation-Extensions.asn",
+ "UnidialoguePDUs.asn"]],
+ asn1_test_lib:compile_all(Fs, Config, Options).
diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl
index 0f02bab6e0..89bc2b463d 100644
--- a/lib/asn1/test/testTimer.erl
+++ b/lib/asn1/test/testTimer.erl
@@ -18,163 +18,141 @@
%%
%%
-module(testTimer).
--export([go/2]).
+-export([go/0]).
-include_lib("test_server/include/test_server.hrl").
-define(times, 5000).
val() ->
- _Value = {'H323-UserInformation',{'H323-UU-PDU',
- {callProceeding,
- {'CallProceeding-UUIE',
- {0,8,222},
- {'EndpointType',
- {'NonStandardParameter',
- {object,{0,9,237}},
- "O"},
- {'VendorIdentifier',
- {'H221NonStandard',62,63,16282},
- "OC",
- "OC"},
- {'GatekeeperInfo',
- {'NonStandardParameter',
- {object,{0,10,260}},
- "O"}},
- {'GatewayInfo',
- [{h320,
- {'H320Caps',
- {'NonStandardParameter',
- {object,{0,11,282}},
- "O"},
- [{'DataRate',
- {'NonStandardParameter',
- {object,
- {0,11,295}},
- "O"},
- 1290470518,
- 78}],
- [{'SupportedPrefix',
- {'NonStandardParameter',
- {object,
- {0,12,312}},
- "O"},
- {'h323-ID',"BM"}}]}}],
- {'NonStandardParameter',
- {object,{0,13,326}},
- "O"}},
- {'McuInfo',
- {'NonStandardParameter',
- {object,{1,13,340,340}},
- "OC"}},
- {'TerminalInfo',
- {'NonStandardParameter',
- {object,{1,14,353,354}},
- "OC"}},
- true,
- true},
- {ipxAddress,
- {'TransportAddress_ipxAddress',
- "OCTET ",
- "OCTE",
- "OC"}},
- {'CallIdentifier',"OCTET STRINGOCTE"},
- {noSecurity,'NULL'},
- [{'ClearToken',
- 1667517741,
- "BM",
- {'DHset',[1],[1],[1]},
- "OCTET STR",
- -26430296,
- {'TypedCertificate',
- {1,16,405,406},
- "OC"},
- "BMP",
- {'NonStandardParameter',
- {1,16,414,415},
- "OC"}},
- {'ClearToken',
- 1817656756,
- "BMP",
- {'DHset',[1],[1],[1]},
- "OCTET STRI",
- -16356110,
- {'TypedCertificate',
- {1,17,442,443},
- "OC"},
- "BMP",
- {'NonStandardParameter',
- {1,18,452,452},
- "OC"}}],
- [{cryptoGKPwdEncr,
- {'CryptoH323Token_cryptoGKPwdEncr',
- {1,18,467,467},
- {'Params',-7477016,"OCTET ST"},
- "OC"}},
- {cryptoGKPwdEncr,
- {'CryptoH323Token_cryptoGKPwdEncr',
- {1,19,486,486},
- {'Params',-2404513,"OCTET ST"},
- []}}],
- []}},
- {'NonStandardParameter',{object,{0,3,84}},[]},
- [],
- true,
- [],
- []},
- {'H323-UserInformation_user-data',24,"O"}}.
+ {'H323-UserInformation',{'H323-UU-PDU',
+ {callProceeding,
+ {'CallProceeding-UUIE',
+ {0,8,222},
+ {'EndpointType',
+ {'NonStandardParameter',
+ {object,{0,9,237}},
+ <<"O">>},
+ {'VendorIdentifier',
+ {'H221NonStandard',62,63,16282},
+ <<"OC">>,
+ <<"OC">>},
+ {'GatekeeperInfo',
+ {'NonStandardParameter',
+ {object,{0,10,260}},
+ <<"O">>}},
+ {'GatewayInfo',
+ [{h320,
+ {'H320Caps',
+ {'NonStandardParameter',
+ {object,{0,11,282}},
+ <<"O">>},
+ [{'DataRate',
+ {'NonStandardParameter',
+ {object,
+ {0,11,295}},
+ <<"O">>},
+ 1290470518,
+ 78}],
+ [{'SupportedPrefix',
+ {'NonStandardParameter',
+ {object,
+ {0,12,312}},
+ <<"O">>},
+ {'h323-ID',"BM"}}]}}],
+ {'NonStandardParameter',
+ {object,{0,13,326}},
+ <<"O">>}},
+ {'McuInfo',
+ {'NonStandardParameter',
+ {object,{1,13,340,340}},
+ <<"OC">>}},
+ {'TerminalInfo',
+ {'NonStandardParameter',
+ {object,{1,14,353,354}},
+ <<"OC">>}},
+ true,
+ true},
+ {ipxAddress,
+ {'TransportAddress_ipxAddress',
+ <<"OCTET ">>,
+ <<"OCTE">>,
+ <<"OC">>}},
+ {'CallIdentifier',<<"OCTET STRINGOCTE">>},
+ {noSecurity,'NULL'},
+ [{'ClearToken',
+ 1667517741,
+ "BM",
+ {'DHset',<<1:1>>,<<1:1>>,<<1:1>>},
+ <<"OCTET STR">>,
+ -26430296,
+ {'TypedCertificate',
+ {1,16,405,406},
+ <<"OC">>},
+ "BMP",
+ {'NonStandardParameter',
+ {1,16,414,415},
+ <<"OC">>}},
+ {'ClearToken',
+ 1817656756,
+ "BMP",
+ {'DHset',<<1:1>>,<<1:1>>,<<1:1>>},
+ <<"OCTET STRI">>,
+ -16356110,
+ {'TypedCertificate',
+ {1,17,442,443},
+ <<"OC">>},
+ "BMP",
+ {'NonStandardParameter',
+ {1,18,452,452},
+ <<"OC">>}}],
+ [{cryptoGKPwdEncr,
+ {'CryptoH323Token_cryptoGKPwdEncr',
+ {1,18,467,467},
+ {'Params',-7477016,<<"OCTET ST">>},
+ <<"OC">>}},
+ {cryptoGKPwdEncr,
+ {'CryptoH323Token_cryptoGKPwdEncr',
+ {1,19,486,486},
+ {'Params',-2404513,<<"OCTET ST">>},
+ <<>>}}],
+ []}},
+ {'NonStandardParameter',{object,{0,3,84}},<<>>},
+ [],
+ true,
+ [],
+ []},
+ {'H323-UserInformation_user-data',24,<<"O">>}}.
-go(Config, _Enc) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
+go() ->
Module = 'H323-MESSAGES',
Type = 'H323-UserInformation',
Value = val(),
- {ok,Bytes} = asn1rt:encode(Module,Type,Value),
+ Bytes = Module:encode(Type, Value),
+ Value = Module:decode(Type, Bytes),
- CompileOptions = compile_options(),
-
{ValWr,done} = timer:tc(fun() -> encode(?times, Module, Type, Value) end),
- ?line io:format("ASN1 encode ~p: ~p micro~n", [CompileOptions, ValWr / ?times]),
+ io:format("ASN.1 encoding: ~p micro~n", [ValWr / ?times]),
done = decode(2, Module, Type, Bytes),
{ValRead,done} = timer:tc(fun() -> decode(?times, Module, Type, Bytes) end),
- ?line io:format("ASN1 decode ~p: ~p micro~n", [CompileOptions, ValRead /?times]),
-
+ io:format("ASN.1 decoding: ~p micro~n", [ValRead /?times]),
- ?line Comment = "encode: "++integer_to_list(round(ValWr/?times))++
- " micro, decode: "++integer_to_list(round(ValRead /?times))++
- " micro. " ++ CompileOptions,
+ Comment = "encode: "++integer_to_list(round(ValWr/?times)) ++
+ " micro, decode: "++integer_to_list(round(ValRead /?times)) ++
+ " micro. [" ++ atom_to_list(Module:encoding_rule()) ++ "]",
{comment,Comment}.
encode(0, _Module,_Type,_Value) ->
done;
encode(N, Module,Type,Value) ->
- ?line {ok,B} = asn1rt:encode(Module,Type,Value),
- _B2 = if
- is_list(B) -> list_to_binary(B);
- true -> B
- end,
- encode(N-1, Module,Type,Value).
+ Module:encode(Type, Value),
+ encode(N-1, Module, Type, Value).
decode(0, _Module, _Type, _Value) ->
done;
decode(N, Module, Type, Value) ->
- {ok,_B} = asn1rt:decode(Module, Type, Value),
+ Module:decode(Type, Value),
decode(N-1, Module, Type, Value).
-
-compile_options() ->
- {ok,Info} = asn1rt:info('H323-MESSAGES'),
- case lists:keyfind(options, 1, Info) of
- {_,Opts0} ->
- Opts1 = [X || X <- Opts0,
- (X =:= ber orelse
- X =:= per orelse
- X =:= uper)],
- lists:flatten(io_lib:format("~p", [Opts1]));
- _ ->
- "[]"
- end.
-
diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl
index b46d7177f5..2b5f3f74c1 100644
--- a/lib/asn1/test/testTypeValueNotation.erl
+++ b/lib/asn1/test/testTypeValueNotation.erl
@@ -24,7 +24,7 @@
-record('Seq', {octstr, int, bool, enum, bitstr, null, oid, vstr}).
main(_Rule, _Option) ->
- Value = #'Seq'{octstr = [1, 2, 3, 4],
+ Value = #'Seq'{octstr = <<1,2,3,4>>,
int = 12,
bool = true,
enum = a,
diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl
index 179299c78d..7f358e863c 100644
--- a/lib/asn1/test/test_compile_options.erl
+++ b/lib/asn1/test/test_compile_options.erl
@@ -123,7 +123,7 @@ verbose(Config) when is_list(Config) ->
?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj,verbose]),
?line test_server:capture_stop(),
?line [Line0|_] = test_server:capture_get(),
- ?line true = lists:prefix("Erlang ASN.1 version", Line0),
+ ?line true = lists:prefix("Erlang ASN.1 compiler", Line0),
%% Test non-verbose compile
?line test_server:capture_start(),
diff --git a/lib/asn1/vsn.mk b/lib/asn1/vsn.mk
index 153c64ebdd..d1c364c34a 100644
--- a/lib/asn1/vsn.mk
+++ b/lib/asn1/vsn.mk
@@ -1,2 +1,2 @@
#next version number to use is 2.0
-ASN1_VSN = 2.0.4
+ASN1_VSN = 3.0.4
diff --git a/lib/common_test/configure.in b/lib/common_test/configure.in
index b2e6ad997a..b2e6ad997a 100755..100644
--- a/lib/common_test/configure.in
+++ b/lib/common_test/configure.in
diff --git a/lib/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile
index 99161ce68a..57233a7f6c 100644
--- a/lib/common_test/doc/src/Makefile
+++ b/lib/common_test/doc/src/Makefile
@@ -47,6 +47,7 @@ CT_MODULES = \
ct_snmp \
unix_telnet \
ct_slave \
+ ct_property_test \
ct_netconfc
CT_XML_FILES = $(CT_MODULES:=.xml)
diff --git a/lib/common_test/doc/src/basics_chapter.xml b/lib/common_test/doc/src/basics_chapter.xml
index ff6ea6c557..12c6143a1a 100644
--- a/lib/common_test/doc/src/basics_chapter.xml
+++ b/lib/common_test/doc/src/basics_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/book.xml b/lib/common_test/doc/src/book.xml
index 2c48664b26..f3f28999d7 100644
--- a/lib/common_test/doc/src/book.xml
+++ b/lib/common_test/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/common_test_app.xml b/lib/common_test/doc/src/common_test_app.xml
index f446f8ac13..ea4522c40b 100644
--- a/lib/common_test/doc/src/common_test_app.xml
+++ b/lib/common_test/doc/src/common_test_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/common_test/doc/src/config_file_chapter.xml b/lib/common_test/doc/src/config_file_chapter.xml
index 99e25faf27..d3068db17b 100644
--- a/lib/common_test/doc/src/config_file_chapter.xml
+++ b/lib/common_test/doc/src/config_file_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/cover_chapter.xml b/lib/common_test/doc/src/cover_chapter.xml
index b952df58f1..accb94e1a9 100644
--- a/lib/common_test/doc/src/cover_chapter.xml
+++ b/lib/common_test/doc/src/cover_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2013</year>
+ <year>2006</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -81,10 +81,7 @@
specify that previously exported data should be imported and
included in the analysis for a test (you can specify multiple
import files). This way it is possible to analyse total code coverage
- without necessarily running all tests at once. Note that even if
- you run separate tests in one test run, code coverage data will
- not be passed on from one test to another unless you specify an
- export file for Common Test to use for this purpose.</p>
+ without necessarily running all tests at once.</p>
<p>To activate the code coverage support, you simply specify the
name of the cover specification file as you start Common Test.
@@ -266,10 +263,20 @@ ct_cover:cross_cover_analyse(Level, [{s1,S1LogDir},{s2,S2LogDir}]).</code>
<section>
<title>Logging</title>
- <p>To view the result of a code coverage test, follow the
- "Coverage log" link on the test suite results page. This
- takes you to the code coverage overview page. If you have
- successfully performed a detailed coverage analysis, you
+ <p>To view the result of a code coverage test, click the button
+ labled "COVER LOG" in the top level index page for the test run.</p>
+
+ <p>Prior to Erlang/OTP 17.1, if your test run consisted of
+ multiple tests, cover would be started and stopped for each test
+ within the test run. Separate logs would be available via the
+ "Coverage log" link on the test suite result pages. These links
+ are still available, but now they all point to the same page as
+ the button on the top level index page. The log contains the
+ accumulated results for the complete test run. See the release
+ notes for more information about this change.</p>
+
+ <p>The buttonc takes you to the code coverage overview page. If you
+ have successfully performed a detailed coverage analysis, you
find links to each individual module coverage page here.</p>
<p>If cross cover analysis has been performed, and there are
diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml
index 859ff9df14..cab6dfea51 100644
--- a/lib/common_test/doc/src/ct_hooks.xml
+++ b/lib/common_test/doc/src/ct_hooks.xml
@@ -450,12 +450,15 @@
</func>
<func>
- <name>Module:on_tc_fail(TestcaseName, Reason, CTHState) -&gt;
+ <name>Module:on_tc_fail(TestName, Reason, CTHState) -&gt;
NewCTHState</name>
<fsummary>Called after the CTH scope ends</fsummary>
<type>
- <v>TestcaseName = init_per_suite | end_per_suite |
- init_per_group | end_per_group | atom()</v>
+ <v>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</v>
+ <v>FuncName = atom()</v>
+ <v>GroupName = atom()</v>
<v>Reason = term()</v>
<v>CTHState = NewCTHState = term()</v>
</type>
@@ -463,14 +466,16 @@
<desc>
<p> OPTIONAL </p>
- <p>This function is called whenever a testcase fails.
- It is called after the post function has been called for
- the testcase which failed. i.e.
- if init_per_suite fails this function is called after
+ <p>This function is called whenever a test case (or config function)
+ fails. It is called after the post function has been called for
+ the failed test case. I.e. if init_per_suite fails, this function
+ is called after
<seealso marker="#Module:post_init_per_suite-4">
- post_init_per_suite</seealso>, and if a testcase fails it is called
+ post_init_per_suite</seealso>, and if a test case fails, it is called
after <seealso marker="#Module:post_end_per_testcase-4">
- post_end_per_testcase</seealso>.</p>
+ post_end_per_testcase</seealso>. If the failed test case belongs
+ to a test case group, the first argument is a tuple
+ <c>{FuncName,GroupName}</c>, otherwise simply the function name.</p>
<p>The data which comes with the Reason follows the same format as the
<seealso marker="event_handler_chapter#failreason">FailReason
@@ -481,12 +486,14 @@
</func>
<func>
- <name>Module:on_tc_skip(TestcaseName, Reason, CTHState) -&gt;
+ <name>Module:on_tc_skip(TestName, Reason, CTHState) -&gt;
NewCTHState</name>
<fsummary>Called after the CTH scope ends</fsummary>
<type>
- <v>TestcaseName = end_per_suite | {init_per_group,GroupName} |
- {end_per_group,GroupName} | atom()</v>
+ <v>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</v>
+ <v>FuncName = atom()</v>
<v>GroupName = atom()</v>
<v>Reason = {tc_auto_skip | tc_user_skip, term()}</v>
<v>CTHState = NewCTHState = term()</v>
@@ -495,14 +502,17 @@
<desc>
<p> OPTIONAL </p>
- <p>This function is called whenever a testcase is skipped.
- It is called after the post function has been called for the
- testcase which was skipped.
- i.e. if init_per_group is skipped this function is called after
- <seealso marker="#Module:post_init_per_suite-4">post_init_per_group
- </seealso>, and if a testcase is skipped it is called after
- <seealso marker="#Module:post_end_per_testcase-4">post_end_per_testcase
- </seealso>.</p>
+ <p>This function is called whenever a test case (or config function)
+ is skipped. It is called after the post function has been called
+ for the skipped test case. I.e. if init_per_group is skipped, this
+ function is called after
+ <seealso marker="#Module:post_init_per_group-4">
+ post_init_per_group</seealso>, and if a test case is skipped,
+ it is called after
+ <seealso marker="#Module:post_end_per_testcase-4">
+ post_end_per_testcase</seealso>. If the skipped test case belongs to a
+ test case group, the first argument is a tuple <c>{FuncName,GroupName}</c>,
+ otherwise simply the function name.</p>
<p>The data which comes with the Reason follows the same format as
<seealso marker="event_handler_chapter#tc_auto_skip">tc_auto_skip
diff --git a/lib/common_test/doc/src/ct_master_chapter.xml b/lib/common_test/doc/src/ct_master_chapter.xml
index 1d2d64a166..37a0805055 100644
--- a/lib/common_test/doc/src/ct_master_chapter.xml
+++ b/lib/common_test/doc/src/ct_master_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2012</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/ct_run.xml b/lib/common_test/doc/src/ct_run.xml
index d857b20d88..d8e79ca80e 100644
--- a/lib/common_test/doc/src/ct_run.xml
+++ b/lib/common_test/doc/src/ct_run.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
@@ -108,6 +108,7 @@
EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
@@ -144,6 +145,7 @@
EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
@@ -171,6 +173,7 @@
[-decrypt_key Key] | [-decrypt_file KeyFile]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
diff --git a/lib/common_test/doc/src/dependencies_chapter.xml b/lib/common_test/doc/src/dependencies_chapter.xml
index 8aad552285..e6c7025b12 100644
--- a/lib/common_test/doc/src/dependencies_chapter.xml
+++ b/lib/common_test/doc/src/dependencies_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml
index a231653558..f39f391818 100644
--- a/lib/common_test/doc/src/event_handler_chapter.xml
+++ b/lib/common_test/doc/src/event_handler_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2012</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -59,6 +59,15 @@
Event handlers plugged into this manager will receive the events from
all the test nodes as well as information from the CT Master server
itself.</p>
+
+ <p>User specific event handlers may be plugged into a Common Test event
+ manager, either by telling Common Test to install them before the test
+ run (see below), or by adding the handlers dynamically during the test
+ run by means of
+ <c>gen_event:add_handler/3</c> or <c>gen_event:add_sup_handler/3</c>.
+ In the latter scenario, the reference of the Common Test event manager is
+ required. To get it, call <c>ct:get_event_mgr_ref/0</c> or (on the CT
+ Master node) <c>ct_master:get_event_mgr_ref/0</c>.</p>
</section>
<section>
<marker id="usage"></marker>
@@ -227,11 +236,13 @@
<item>
<marker id="tc_auto_skip"></marker>
- <c>#event{name = tc_auto_skip, data = {Suite,Func,Reason}}</c>
+ <c>#event{name = tc_auto_skip, data = {Suite,TestName,Reason}}</c>
<p><c>Suite = atom()</c>, the name of the suite.</p>
- <p><c>Func = atom() | {end_per_group,GroupName}</c>, the name of the test case
- or configuration function.</p>
- <p><c>GroupName = atom()</c>, name of the group.</p>
+ <p><c>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</c></p>
+ <p><c>FuncName = atom()</c>, the name of the test case or configuration function.</p>
+ <p><c>GroupName = atom()</c>, the name of the test case group.</p>
<p><c>Reason = {failed,FailReason} |
{require_failed_in_suite0,RequireInfo}</c>,
reason for auto skipping <c>Func</c>.</p>
@@ -252,21 +263,26 @@
<c>init_per_group</c>, a failed <c>require</c> in <c>suite/0</c>, or a failed test case
in a sequence. Note that this event is never received as a result of a test case getting
skipped because of <c>init_per_testcase</c> failing, since that information is carried with
- the <c>tc_done</c> event.
+ the <c>tc_done</c> event. If a failed test case belongs to a test case group, the second
+ data element is a tuple <c>{FuncName,GroupName}</c>, otherwise simply the function name.
</p></item>
-
+
<item>
<marker id="tc_user_skip"></marker>
- <c>#event{name = tc_user_skip, data = {Suite,Func,Comment}}</c>
+ <c>#event{name = tc_user_skip, data = {Suite,TestName,Comment}}</c>
<p><c>Suite = atom()</c>, the name of the suite.</p>
- <p><c>Func = atom() | {end_per_group,GroupName}</c>, the name of the test case
- or configuration function.</p>
- <p><c>GroupName = atom()</c>, name of the group.</p>
+ <p><c>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</c></p>
+ <p><c>FuncName = atom()</c>, the name of the test case or configuration function.</p>
+ <p><c>GroupName = atom()</c>, the name of the test case group.</p>
<p><c>Comment = string()</c>, reason for skipping the test case.</p>
<p>This event specifies that a test case has been skipped by the user.
It is only ever received if the skip was declared in a test specification.
Otherwise, user skip information is received as a <c>{skipped,SkipReason}</c>
- result in the <c>tc_done</c> event for the test case.
+ result in the <c>tc_done</c> event for the test case. If a skipped test case belongs
+ to a test case group, the second data element is a tuple <c>{FuncName,GroupName}</c>,
+ otherwise simply the function name.
</p></item>
<item><c>#event{name = test_stats, data = {Ok,Failed,Skipped}}</c>
diff --git a/lib/common_test/doc/src/example_chapter.xml b/lib/common_test/doc/src/example_chapter.xml
index 2333f92989..36781d152c 100644
--- a/lib/common_test/doc/src/example_chapter.xml
+++ b/lib/common_test/doc/src/example_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/fascicules.xml b/lib/common_test/doc/src/fascicules.xml
index 38df4a1709..c4a28a699a 100644
--- a/lib/common_test/doc/src/fascicules.xml
+++ b/lib/common_test/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/common_test/doc/src/getting_started_chapter.xml b/lib/common_test/doc/src/getting_started_chapter.xml
index 0b42445540..445c731d01 100644
--- a/lib/common_test/doc/src/getting_started_chapter.xml
+++ b/lib/common_test/doc/src/getting_started_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2007</year><year>2012</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/install_chapter.xml b/lib/common_test/doc/src/install_chapter.xml
index 4ef4e6de94..7f8c606324 100644
--- a/lib/common_test/doc/src/install_chapter.xml
+++ b/lib/common_test/doc/src/install_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2007</year><year>2010</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml
index 535e2b6028..472e3b7833 100644
--- a/lib/common_test/doc/src/notes.xml
+++ b/lib/common_test/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,6 +32,605 @@
<file>notes.xml</file>
</header>
+<section><title>Common_Test 1.10.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A fault in the Common Test logger process, that caused
+ the application to crash when running on a long name
+ node, has been corrected.</p>
+ <p>
+ Own Id: OTP-12643</p>
+ </item>
+ <item>
+ <p>
+ A 'wait_for_prompt' option in ct_telnet:expect/3 has been
+ introduced which forces the function to not return until
+ a prompt string has been received, even if other expect
+ patterns have already been found.</p>
+ <p>
+ Own Id: OTP-12688 Aux Id: seq12818 </p>
+ </item>
+ <item>
+ <p>
+ If the last expression in a test case causes a timetrap
+ timeout, the stack trace is ignored and not printed to
+ the test case log file. This happens because the
+ {Suite,TestCase,Line} info is not available in the stack
+ trace in this scenario, due to tail call elimination.
+ Common Test has been modified to handle this situation by
+ inserting a {Suite,TestCase,last_expr} tuple in the
+ correct place and printing the stack trace as expected.</p>
+ <p>
+ Own Id: OTP-12697 Aux Id: seq12848 </p>
+ </item>
+ <item>
+ <p>
+ Fixed a buffer problem in ct_netconfc which could cause
+ that some messages where buffered forever.</p>
+ <p>
+ Own Id: OTP-12698 Aux Id: seq12844 </p>
+ </item>
+ <item>
+ <p>
+ The VTS mode in Common Test has been modified to use a
+ private version of the Webtool application (ct_webtool).</p>
+ <p>
+ Own Id: OTP-12704 Aux Id: OTP-10922 </p>
+ </item>
+ <item>
+ <p>
+ Add possibility to add user capabilities in
+ <c>ct_netconfc:hello/3</c>.</p>
+ <p>
+ Own Id: OTP-12707 Aux Id: seq12846 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Common_Test 1.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The tests overview file, index.html, did not always get
+ updated correctly after a new test run. This was because
+ of a bug in the Common Test log cache mechanism which has
+ now been corrected.</p>
+ <p>
+ Own Id: OTP-11400</p>
+ </item>
+ <item>
+ <p>
+ When a successful test case returns, Common Test should,
+ according to the documentation, send a tc_done event to
+ the event handlers with Result = ok in the data field.
+ However, Common Test sets Result to the return value of
+ the test case instead. Common Test has been modified now
+ to comply with the documentation.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12279 Aux Id: seq12737, OTP-12531 </p>
+ </item>
+ <item>
+ <p>
+ A ct_telnet:expect/3 call could never be aborted before
+ an idle_timeout, even if total_timeout had been set to a
+ lower value (i.e. a shorter time). This problem has been
+ fixed.</p>
+ <p>
+ Own Id: OTP-12335</p>
+ </item>
+ <item>
+ <p>
+ The undocumented return value {skipped,Reason} from
+ config functions and test cases was handled
+ inconsistently. Test cases were e.g. reported as
+ "skipped" to CT Hook functions, but "successful" to event
+ handlers. Now, the above return value is consistently
+ handled the same way as {skip,Reason} and this has also
+ been documented.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12359 Aux Id: seq12760 </p>
+ </item>
+ <item>
+ <p>
+ The Erlang source code to HTML generator would sometimes
+ fail because epp:parse_erl_form/1 could not find and
+ expand required macros in included header files. The
+ problem has been solved by making sure common_test always
+ passes the full include path to epp. Also, a bug that
+ could cause erl_syntax:revert/1 to fail because of a
+ badly formed syntax tree has been corrected.</p>
+ <p>
+ Own Id: OTP-12419</p>
+ </item>
+ <item>
+ <p>
+ A missing group option in the ct_run help text has been
+ added.</p>
+ <p>
+ Own Id: OTP-12433 Aux Id: seq12788 </p>
+ </item>
+ <item>
+ <p>
+ Printouts by means of ct:log/2/3 or ct:pal/2/3 from the
+ hook functions on_tc_fail/2 and on_tc_skip/2 would (quite
+ unexpectedly) end up in the "unexpected i/o" log file
+ instead of in the test case log file. This behaviour has
+ been changed so that now, all printouts (including stdio
+ printouts) from these hook functions will be routed to
+ the test case log file.</p>
+ <p>
+ Own Id: OTP-12468</p>
+ </item>
+ <item>
+ <p>
+ ct_netconfc:action/3 will now - if the return type is
+ void - accept an RPC reply on the form
+ {ok,[simple_xml()]}, and in this event return only the
+ atom ok.</p>
+ <p>
+ Own Id: OTP-12491 Aux Id: seq12797 </p>
+ </item>
+ <item>
+ <p>
+ OTP-11971 erroneously changed the handling of relative
+ paths for incl_dirs specified in the cover spec file.
+ This is now corrected so these are expected to be
+ relative to the directory where the cover spec file
+ itself is stored</p>
+ <p>
+ Own Id: OTP-12498 Aux Id: OTP-11971 </p>
+ </item>
+ <item>
+ <p>
+ Some test cases have been updated to use ct:sleep/1
+ instead of timer:sleep/1. The reason being that the sleep
+ times need to be scaled to compensate for slow execution
+ (e.g. when cover is running).</p>
+ <p>
+ Own Id: OTP-12574</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Common Test now exports a function,
+ ct:get_event_mgr_ref/0, that returns the name of the
+ Common Test event manager. This makes it possible to plug
+ in event handlers to the event manager while tests are
+ running (using the gen_event API).</p>
+ <p>
+ Own Id: OTP-12506 Aux Id: seq12802 </p>
+ </item>
+ <item>
+ <p>
+ When a test case (or configuration function) fails
+ because of an exit signal from a linked process, Common
+ Test previously passed only the reason for process
+ termination to the CT post hook functions and the event
+ handlers (in the tc_done event). This has been changed so
+ that now the tuple {'EXIT',ReasonForProcessTermination}
+ is passed instead. This makes it much easier in the CT
+ post hook functions to distinguish a failure of this sort
+ from other types of errors and from the return value of a
+ successful test case.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12531 Aux Id: OTP-12279 </p>
+ </item>
+ <item>
+ <p>
+ A new feature has been introduced in ct_telnet:get_data/1
+ that makes it possible to automatically poll the telnet
+ connection in case an incomplete string (one that has not
+ yet been terminated by a newline) remains in the receive
+ buffer. The polling is controlled by two new telnet
+ config values, which are documented in the ct_telnet
+ reference manual. The polling mechanism is disabled by
+ default (making the get_data/1 function backwards
+ compatible).</p>
+ <p>
+ Own Id: OTP-12627</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Common_Test 1.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The source code to html code generator in Test Server
+ (and Common Test) would fail to generate anchors in the
+ html code for functions with non-expandable macros,
+ resulting in bad html links to such functions. This
+ correction lets the code generator ignore macros that
+ can't be expanded (i.e. not pre-process them), so that
+ correct anchors will always be produced.</p>
+ <p>
+ Own Id: OTP-11766 Aux Id: seq12556 </p>
+ </item>
+ <item>
+ <p>
+ OTP-11971 erroneously changed the handling of relative
+ paths (import/export files) specified in the cover spec
+ file. This is now corrected so these are expected to be
+ relative to the directory where the cover spec file
+ itself is stored.</p>
+ <p>
+ Own Id: OTP-12031</p>
+ </item>
+ <item>
+ <p>
+ Common Test would sometimes crash while trying to print
+ large amounts of SASL reports to log on a computer with a
+ slow file system. This problem (due to an error in IO
+ message buffering in ct_logs) has been fixed.</p>
+ <p>
+ Own Id: OTP-12159</p>
+ </item>
+ <item>
+ <p>
+ The common_test telnet client, ct_telnet and friends, had
+ some unstable test cases. Some of these were caused by
+ the unix_telnet callback sending an extra newline after
+ sending the password. This caused the sever to send an
+ extra prompt back which confused the tests. The extra
+ newline is no longer sent.</p>
+ <p>
+ Also, debug printouts and logging from the telnet client
+ is improved, and some test cases are slightly modified in
+ order to stabilize the test.</p>
+ <p>
+ Own Id: OTP-12329</p>
+ </item>
+ <item>
+ <p>
+ ct_netconfc did not expect the return value
+ {error,timeout} from ssh_connection:subsystem/4. This has
+ been corrected.</p>
+ <p>
+ Own Id: OTP-12334</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ A new option, <c>{newline,boolean()}</c> is added to all
+ functions in <c>ct_telnet</c> that send data (command
+ strings) to the telnet server. By default,
+ <c>ct_telnet</c> adds a newline to all command strings,
+ and by setting the new option to <c>false</c> this
+ behavior is turned off.</p>
+ <p>
+ Own Id: OTP-12252 Aux Id: seq12730 </p>
+ </item>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Common_Test 1.8.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Ticket OTP-11971 introduced a runtime dependency towards
+ test_server-3.7.1, since the interface between
+ test_server and common_test was changed. Erroneously, the
+ common_test.app file was not updated according to this.
+ This has now been corrected.</p>
+ <p>
+ Own Id: OTP-12037</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Warning: this is experimental and may disappear or change
+ without previous warning.</p>
+ <p>
+ Experimental support for running Quickcheck and PropEr
+ tests from common_test suites is added to common_test.
+ See the reference manual for the new module
+ <c>ct_property_testing</c>.</p>
+ <p>
+ Experimental property tests are added under
+ <c>lib/{inet,ssh}/test/property_test</c>. They can be run
+ directly or from the commont_test suites
+ <c>inet/ftp_property_test_SUITE.erl</c> and
+ <c>ssh/test/ssh_property_test_SUITE.erl</c>.</p>
+ <p>
+ See the code in the <c>test</c> directories and the man
+ page for details.</p>
+ <p>
+ (Thanks to Tuncer Ayaz for a patch adding Triq)</p>
+ <p>
+ Own Id: OTP-12119</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Common_Test 1.8.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Substrings in long telnet messages would sometimes get
+ wrongly reversed. This error has been corrected.</p>
+ <p>
+ Own Id: OTP-11871 Aux Id: seq12581 </p>
+ </item>
+ <item>
+ <p>
+ The basic_html logging mode in Common Test (for
+ compatibility with old browsers) generated HTML code with
+ unbalanced tags. This has been fixed.</p>
+ <p>
+ Own Id: OTP-11917 Aux Id: seq12598 </p>
+ </item>
+ <item>
+ <p>
+ The mechanism for running code cover analysis with
+ common_test has been improved. Earlier, if a test run
+ consisted of multiple tests, cover would be started and
+ stopped for each test. This would give "intermediate"
+ cover logs available from the "Coverage log" link on the
+ test suite result pages. To accumulate cover data over
+ all tests, the 'export' option had to be used in the
+ cover spec file. This was not well documented, and the
+ functionality was quite confusing.</p>
+ <p>
+ Using the 'nodes' option in the cover spec file would
+ fail when the test run consisted of multiple tests, since
+ the specified nodes would only be included in the cover
+ analysis of the first test.</p>
+ <p>
+ The repeated compilation and analysis of the same modules
+ was also very time consuming.</p>
+ <p>
+ To overcome these problems, ct will now only cover
+ compile and analyze modules once per test run, i.e. once
+ for each cover spec file. The log file is available via a
+ new button on the top level index page. The old "Coverage
+ log" links on the test suite result pages still exist,
+ but they all point to the same log containing the
+ accumulated result.</p>
+ <p>
+ Own Id: OTP-11971</p>
+ </item>
+ <item>
+ <p>
+ If multiple tests would run simultaneously on different
+ Erlang nodes, writing their logs to the same directory,
+ then there would often be entries in the all_runs.html
+ log file showing incomplete results (all zeroes) upon
+ completion. This problem was caused by a bug in the
+ Common Test log cache mechanism, which has been fixed.</p>
+ <p>
+ Own Id: OTP-11988 Aux Id: seq12611 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Common_Test 1.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The error generated if a test case process received an
+ exit from a linked process while executing
+ init_per_testcase/2, was handled incorrectly by Common
+ Test. The problem has been solved, and Common Test now
+ reports this type of error correctly, with proper error
+ reason and exit location as well.</p>
+ <p>
+ Own Id: OTP-11643</p>
+ </item>
+ <item>
+ <p>
+ Running a parallel test case group with two or more
+ instances of the same test case would result in identical
+ log file names, and one test case instance would
+ overwrite the log file of another. This problem has been
+ solved.</p>
+ <p>
+ Own Id: OTP-11644</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ The <c>cth_surefire</c> hook would crash in
+ <c>pre_init_per_suite/3</c> if a previous hook returned
+ <c>{skip,Reason}</c> or <c>{fail,Reason}</c> instead of a
+ <c>Config</c> list. This error has been corrected, and
+ <c>cth_surefire</c> will now simply propagate the
+ received <c>InitData</c> value instead.</p>
+ <p>
+ Own Id: OTP-11811</p>
+ </item>
+ <item>
+ <p>
+ Specs of return values are corrected for
+ <c>ct_netconfc:get/2,3</c>,
+ <c>ct_netconfc:get_config/3,4</c>,
+ <c>ct_netconfc:action/2,3</c>,
+ <c>ct_netconfc:send_rpc/2,3</c> and
+ <c>ct_netconfc:send/2,3</c>.</p>
+ <p>
+ Own Id: OTP-11834 Aux Id: seq12574 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ ct_telnet can now log all communication taking place
+ during a telnet session. Previously, only information
+ about ct_telnet operations and commands, as well as
+ explicitly requested data from the server, was logged.</p>
+ <p>
+ Furthermore, a logging mechanism based on an Error Logger
+ event handler and a dedicated Common Test hook,
+ <c>cth_conn_log</c>, now makes it possible to print data
+ for individual connections to separate log files. Please
+ see the <c>ct_telnet</c> reference manual for more
+ information and examples.</p>
+ <p>
+ Important note: A new argument, <c>ConnName</c> has been
+ added to the <c>unix_telnet:connect/5</c> callback
+ function. This forces users that use private ct_telnet
+ callback modules to update their code according to
+ <c>unix_telnet:connect/6</c>. Please see the
+ <c>unix_telnet</c> reference manual and source code
+ module for details.</p>
+ <p>
+ Own Id: OTP-11440 Aux Id: seq12457 </p>
+ </item>
+ <item>
+ <p>
+ A new timeout option has been introduced for the
+ <c>ct_telnet:expect/3</c> function. With
+ <c>{total_timeout,Time}</c> it's possible to set a time
+ limit for the complete expect operation. After
+ <c>Time</c> milliseconds, <c>expect/3</c> returns
+ <c>{error,timeout}</c>. The default value used if
+ <c>total_timeout</c> is not specified, is infinity (i.e.
+ no time limit). Please see the <c>ct_telnet</c> reference
+ manual for more information.</p>
+ <p>
+ Own Id: OTP-11689</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Test case group name information has been added to the
+ data sent with <c>tc_user_skip</c> and
+ <c>tc_auto_skip</c> event messages, as well as the data
+ passed in calls to the CT Hook functions
+ <c>on_tc_skip/3</c> and <c>on_tc_fail/3</c>. The
+ modification only affects the function name
+ element/argument. This value remains an atom if the test
+ case in question does not belong to a test case group.
+ Otherwise a tuple <c>{FuncName,GroupName}</c>
+ (<c>{atom(),atom()}</c>) is passed instead.</p>
+ <p>
+ Note that this change may (depending on the patterns used
+ for matching) require modifications of user event
+ handlers and hook modules. Please see the Event Handling
+ chapter in the Common Test User's Guide, and the
+ reference manual for <c>ct_hooks</c>, for details.</p>
+ <p>
+ Note also that the Test Server framework callback
+ function <c>report/2</c> has been modified. This change
+ only affects users with test frameworks interfacing Test
+ Server rather than Common Test. See the
+ <c>test_server_ctrl</c> reference manual for details.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11732 Aux Id: seq12541 </p>
+ </item>
+ <item>
+ <p>
+ If Common Test can't prompt the user to abort or continue
+ the test run when one or more test suites fail to
+ compile, a new option,
+ <c>{abort_if_missing_suites,Bool}</c>, can be used to
+ specify whether it should proceed with the test run, or
+ stop execution. The default value of <c>Bool</c> is
+ <c>false</c> (i.e. to proceed even if suites are
+ missing).</p>
+ <p>
+ Own Id: OTP-11769</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ common_test: Fix problems reported by Dialyzer.</p>
+ <p>
+ Own Id: OTP-11525</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Common_Test 1.7.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/common_test/doc/src/notes_history.xml b/lib/common_test/doc/src/notes_history.xml
index e4085d5431..34ac4fd15b 100644
--- a/lib/common_test/doc/src/notes_history.xml
+++ b/lib/common_test/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/part.xml b/lib/common_test/doc/src/part.xml
index a74185221d..fe73918975 100644
--- a/lib/common_test/doc/src/part.xml
+++ b/lib/common_test/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/part_notes.xml b/lib/common_test/doc/src/part_notes.xml
index 506677a7a5..13ca499196 100644
--- a/lib/common_test/doc/src/part_notes.xml
+++ b/lib/common_test/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/part_notes_history.xml b/lib/common_test/doc/src/part_notes_history.xml
index e658810e7a..f995a70b7f 100644
--- a/lib/common_test/doc/src/part_notes_history.xml
+++ b/lib/common_test/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/ref_man.xml b/lib/common_test/doc/src/ref_man.xml
index 6fede88434..c266b70d00 100644
--- a/lib/common_test/doc/src/ref_man.xml
+++ b/lib/common_test/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -78,6 +78,7 @@
<xi:include href="unix_telnet.xml"/>
<xi:include href="ct_slave.xml"/>
<xi:include href="ct_hooks.xml"/>
+ <xi:include href="ct_property_test.xml"/>
</application>
diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml
index fad0510049..864f82cb63 100644
--- a/lib/common_test/doc/src/run_test_chapter.xml
+++ b/lib/common_test/doc/src/run_test_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -59,7 +59,15 @@
<p>If compilation should fail for one or more suites, the compilation errors
are printed to tty and the operator is asked if the test run should proceed
without the missing suites, or be aborted. If the operator chooses to proceed,
- it is noted in the HTML log which tests have missing suites.</p>
+ it is noted in the HTML log which tests have missing suites. If Common Test is
+ unable to prompt the user after compilation failure (if Common Test doesn't
+ control stdin), the test run will proceed automatically without the missing
+ suites. This behaviour can however be modified with the
+ <c><![CDATA[ct_run]]></c> flag <c><![CDATA[-abort_if_missing_suites]]></c>,
+ or the <c><![CDATA[ct:run_test/1]]></c> option
+ <c><![CDATA[{abort_if_missing_suites,TrueOrFalse}]]></c>. If
+ <c><![CDATA[abort_if_missing_suites]]></c> is set (to true), the test run
+ will stop immediately if some suites fail to compile.</p>
<p>Any help module (i.e. regular Erlang module with name not ending with
"_SUITE") that resides in the same test object directory as a suite
@@ -167,6 +175,7 @@
<seealso marker="ct_hooks_chapter#builtin_cths">Built-in Common Test Hooks</seealso>. Default is <c>true</c>.</item>
<item><c><![CDATA[-include]]></c>, specifies include directories (see above).</item>
<item><c><![CDATA[-no_auto_compile]]></c>, disables the automatic test suite compilation feature (see above).</item>
+ <item><c><![CDATA[-abort_if_missing_suites]]></c>, aborts the test run if one or more suites fail to compile (see above).</item>
<item><c><![CDATA[-multiply_timetraps <n>]]></c>, extends <seealso marker="write_test_chapter#timetraps">timetrap
timeout</seealso> values.</item>
<item><c><![CDATA[-scale_timetraps <bool>]]></c>, enables automatic <seealso marker="write_test_chapter#timetraps">timetrap
@@ -215,7 +224,7 @@
<pre>-exit_status ignore_config</pre>
<p>For more information about the <c>ct_run</c> program, see the
- <seealso marker="ct_run#top">Reference Manual</seealso> and the
+ <seealso marker="ct_run">Reference Manual</seealso> and the
<seealso marker="install_chapter#general">Installation</seealso> chapter.
</p>
</section>
@@ -589,8 +598,8 @@
Common Test will either execute one test run per specification file, or
join the files and perform all tests within one single test run. The first
behaviour is the default one. The latter requires that the start
- flag/option <c>join_suites</c> is provided, e.g.
- <c>run_test -spec ./my_tests1.ts ./my_tests2.ts -join_suites</c>.</p>
+ flag/option <c>join_specs</c> is provided, e.g.
+ <c>run_test -spec ./my_tests1.ts ./my_tests2.ts -join_specs</c>.</p>
<p>Joining a number of specifications, or running them separately, can
also be accomplished with (and may be combined with) test specification
@@ -744,6 +753,9 @@
{auto_compile, Bool},
{auto_compile, NodeRefs, Bool},
+ {abort_if_missing_suites, Bool},
+ {abort_if_missing_suites, NodeRefs, Bool},
+
{config, ConfigFiles}.
{config, ConfigDir, ConfigBaseNames}.
{config, NodeRefs, ConfigFiles}.
diff --git a/lib/common_test/doc/src/test_structure_chapter.xml b/lib/common_test/doc/src/test_structure_chapter.xml
index b9ca59135d..3c9e159436 100644
--- a/lib/common_test/doc/src/test_structure_chapter.xml
+++ b/lib/common_test/doc/src/test_structure_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2010</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/why_test_chapter.xml b/lib/common_test/doc/src/why_test_chapter.xml
index 95ff614f87..db94c6a6cb 100644
--- a/lib/common_test/doc/src/why_test_chapter.xml
+++ b/lib/common_test/doc/src/why_test_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml
index a33b22ac39..055fb90641 100644
--- a/lib/common_test/doc/src/write_test_chapter.xml
+++ b/lib/common_test/doc/src/write_test_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/common_test/priv/Makefile.in b/lib/common_test/priv/Makefile.in
index 5a9fabbe45..1bc6b82ebb 100644
--- a/lib/common_test/priv/Makefile.in
+++ b/lib/common_test/priv/Makefile.in
@@ -71,7 +71,7 @@ debug opt:
$(V_at)sed -e 's;@CT_VSN@;$(VSN);' \
-e 's;@TS_VSN@;$(TEST_SERVER_VSN);' \
../install.sh.in > install.sh
- $(V_at)chmod 775 install.sh
+ - $(V_at)chmod -f 775 install.sh
docs:
diff --git a/lib/common_test/priv/auxdir/config.guess b/lib/common_test/priv/auxdir/config.guess
deleted file mode 100755
index f475ceb413..0000000000
--- a/lib/common_test/priv/auxdir/config.guess
+++ /dev/null
@@ -1,1534 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-#
-# Please send patches with a ChangeLog entry to [email protected].
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# ([email protected] 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # [email protected] (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <[email protected]>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <[email protected]> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/lib/common_test/priv/auxdir/config.sub b/lib/common_test/priv/auxdir/config.sub
deleted file mode 100755
index bb6edbdb47..0000000000
--- a/lib/common_test/priv/auxdir/config.sub
+++ /dev/null
@@ -1,1789 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches with a ChangeLog entry to [email protected].
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
- ;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- xscaleeb)
- basic_machine=armeb-unknown
- ;;
-
- xscaleel)
- basic_machine=armel-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i386-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- hexagon-*)
- os=-elf
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
-
diff --git a/lib/common_test/priv/auxdir/install-sh b/lib/common_test/priv/auxdir/install-sh
deleted file mode 100755
index a5897de6ea..0000000000
--- a/lib/common_test/priv/auxdir/install-sh
+++ /dev/null
@@ -1,519 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2006-12-25.00
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/lib/common_test/priv/run_test.in b/lib/common_test/priv/run_test.in
index 1508751e4f..1508751e4f 100755..100644
--- a/lib/common_test/priv/run_test.in
+++ b/lib/common_test/priv/run_test.in
diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile
index 4600c0ad78..449cba6c83 100644
--- a/lib/common_test/src/Makefile
+++ b/lib/common_test/src/Makefile
@@ -62,6 +62,8 @@ MODULES= \
ct_telnet_client \
ct_make \
vts \
+ ct_webtool \
+ ct_webtool_sup \
unix_telnet \
ct_config \
ct_config_plain \
@@ -74,7 +76,8 @@ MODULES= \
ct_netconfc \
ct_conn_log_h \
cth_conn_log \
- ct_groups
+ ct_groups \
+ ct_property_test
TARGET_MODULES= $(MODULES:%=$(EBIN)/%)
BEAM_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
diff --git a/lib/common_test/src/common_test.app.src b/lib/common_test/src/common_test.app.src
index 18c1dec784..580d5dbd7b 100644
--- a/lib/common_test/src/common_test.app.src
+++ b/lib/common_test/src/common_test.app.src
@@ -1,7 +1,7 @@
% This is an -*- erlang -*- file.
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -62,5 +62,10 @@
ct_master,
ct_master_logs]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies,["xmerl-1.3.7","webtool-0.8.10","tools-2.6.14",
+ "test_server-3.7.1","stdlib-2.0","ssh-3.0.1",
+ "snmp-4.25.1","sasl-2.4","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","erts-6.0",
+ "debugger-4.0","crypto-3.3","compiler-5.0"]}]}.
diff --git a/lib/common_test/src/common_test.appup.src b/lib/common_test/src/common_test.appup.src
index 0fbe5f23f7..4dfd9f1b0d 100644
--- a/lib/common_test/src/common_test.appup.src
+++ b/lib/common_test/src/common_test.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}. \ No newline at end of file
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, common_test}]}],
+ [{<<".*">>,[{restart_application, common_test}]}]
+}.
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index e6732f7fc7..9d8fce2789 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -52,6 +52,7 @@
-module(ct).
-include("ct.hrl").
+-include("ct_util.hrl").
%% Command line user interface for running tests
-export([install/1, run/1, run/2, run/3,
@@ -77,6 +78,7 @@
%% Other interface functions
-export([get_status/0, abort_current_testcase/1,
+ get_event_mgr_ref/0,
encrypt_config_file/2, encrypt_config_file/3,
decrypt_config_file/2, decrypt_config_file/3]).
@@ -150,7 +152,8 @@ run(TestDirs) ->
%%% {silent_connections,Conns} | {stylesheet,CSSFile} |
%%% {cover,CoverSpecFile} | {cover_stop,Bool} | {step,StepOpts} |
%%% {event_handler,EventHandlers} | {include,InclDirs} |
-%%% {auto_compile,Bool} | {create_priv_dir,CreatePrivDir} |
+%%% {auto_compile,Bool} | {abort_if_missing_suites,Bool} |
+%%% {create_priv_dir,CreatePrivDir} |
%%% {multiply_timetraps,M} | {scale_timetraps,Bool} |
%%% {repeat,N} | {duration,DurTime} | {until,StopTime} |
%%% {force_stop,ForceStop} | {decrypt,DecryptKeyOrFile} |
@@ -772,7 +775,7 @@ comment(Format, Args) when is_list(Format), is_list(Args) ->
send_html_comment(Comment) ->
Html = "<font color=\"green\">" ++ Comment ++ "</font>",
- ct_util:set_testdata({comment,Html}),
+ ct_util:set_testdata({{comment,group_leader()},Html}),
test_server:comment(Html).
%%%-----------------------------------------------------------------
@@ -1004,6 +1007,18 @@ abort_current_testcase(Reason) ->
test_server_ctrl:abort_current_testcase(Reason).
%%%-----------------------------------------------------------------
+%%% @spec get_event_mgr_ref() -> EvMgrRef
+%%% EvMgrRef = atom()
+%%%
+%%% @doc <p>Call this function in order to get a reference to the
+%%% CT event manager. The reference can be used to e.g. add
+%%% a user specific event handler while tests are running.
+%%% Example:
+%%% <c>gen_event:add_handler(ct:get_event_mgr_ref(), my_ev_h, [])</c></p>
+get_event_mgr_ref() ->
+ ?CT_EVMGR_REF.
+
+%%%-----------------------------------------------------------------
%%% @spec encrypt_config_file(SrcFileName, EncryptFileName) ->
%%% ok | {error,Reason}
%%% SrcFileName = string()
diff --git a/lib/common_test/src/ct_conn_log_h.erl b/lib/common_test/src/ct_conn_log_h.erl
index ac08a3e0ad..cff02a46d9 100644
--- a/lib/common_test/src/ct_conn_log_h.erl
+++ b/lib/common_test/src/ct_conn_log_h.erl
@@ -30,80 +30,88 @@
handle_event/2, handle_call/2, handle_info/2,
terminate/2]).
--record(state, {group_leader,logs=[]}).
+-record(state, {logs=[], default_gl}).
-define(WIDTH,80).
%%%-----------------------------------------------------------------
%%% Callbacks
-init({GL,Logs}) ->
- open_files(Logs,#state{group_leader=GL}).
+init({GL,ConnLogs}) ->
+ open_files(GL,ConnLogs,#state{default_gl=GL}).
-open_files([{ConnMod,{LogType,Logs}}|T],State) ->
- case do_open_files(Logs,[]) of
+open_files(GL,[{ConnMod,{LogType,LogFiles}}|T],State=#state{logs=Logs}) ->
+ case do_open_files(LogFiles,[]) of
{ok,Fds} ->
- open_files(T,State#state{logs=[{ConnMod,{LogType,Fds}} |
- State#state.logs]});
+ ConnInfo = proplists:get_value(GL,Logs,[]),
+ Logs1 = [{GL,[{ConnMod,{LogType,Fds}}|ConnInfo]} |
+ proplists:delete(GL,Logs)],
+ open_files(GL,T,State#state{logs=Logs1});
Error ->
Error
end;
-open_files([],State) ->
+open_files(_GL,[],State) ->
{ok,State}.
-
-do_open_files([{Tag,File}|Logs],Acc) ->
- case file:open(File, [write,{encoding,utf8}]) of
+do_open_files([{Tag,File}|LogFiles],Acc) ->
+ case file:open(File, [write,append,{encoding,utf8}]) of
{ok,Fd} ->
- do_open_files(Logs,[{Tag,Fd}|Acc]);
+ do_open_files(LogFiles,[{Tag,Fd}|Acc]);
{error,Reason} ->
{error,{could_not_open_log,File,Reason}}
end;
do_open_files([],Acc) ->
{ok,lists:reverse(Acc)}.
+handle_event({info_report,_,{From,update,{GL,ConnLogs}}},
+ State) when node(GL) == node() ->
+ Result = open_files(GL,ConnLogs,State),
+ From ! {updated,GL},
+ Result;
handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() ->
{ok, State};
-handle_event({_Type,_GL,{Pid,{ct_connection,Action,ConnName},Report}},State) ->
- %% NOTE: if the format of this event is changed
- %% ({ct_connection,Action,ConnName}) then remember to change
- %% test_server_h:report_receiver as well!!!
- Info = conn_info(Pid,#conn_log{name=ConnName,action=Action}),
- write_report(now(),Info,Report,State),
+handle_event({_Type,GL,{Pid,{ct_connection,Mod,Action,ConnName},Report}},
+ State) ->
+ Info = conn_info(Pid,#conn_log{name=ConnName,action=Action,module=Mod}),
+ write_report(now(),Info,Report,GL,State),
{ok, State};
-handle_event({_Type,_GL,{Pid,Info=#conn_log{},Report}},State) ->
- %% NOTE: if the format of this event is changed
- %% (Info=#conn_log{}) then remember to change
- %% test_server_h:report_receiver as well!!!
- write_report(now(),conn_info(Pid,Info),Report,State),
+handle_event({_Type,GL,{Pid,Info=#conn_log{},Report}}, State) ->
+ write_report(now(),conn_info(Pid,Info),Report,GL,State),
{ok, State};
-handle_event({error_report,_,{Pid,_,[{ct_connection,ConnName}|R]}},State) ->
+handle_event({error_report,GL,{Pid,_,[{ct_connection,ConnName}|R]}}, State) ->
%% Error reports from connection
- write_error(now(),conn_info(Pid,#conn_log{name=ConnName}),R,State),
+ write_error(now(),conn_info(Pid,#conn_log{name=ConnName}),R,GL,State),
{ok, State};
-handle_event(_, State) ->
+handle_event(_What, State) ->
{ok, State}.
-handle_info(_, State) ->
+handle_info(_What, State) ->
{ok, State}.
handle_call(_Query, State) ->
{ok, {error, bad_query}, State}.
terminate(_,#state{logs=Logs}) ->
- [file:close(Fd) || {_,{_,Fds}} <- Logs, {_,Fd} <- Fds],
+ lists:foreach(
+ fun({_GL,ConnLogs}) ->
+ [file:close(Fd) || {_,{_,Fds}} <- ConnLogs, {_,Fd} <- Fds]
+ end, Logs),
ok.
%%%-----------------------------------------------------------------
%%% Writing reports
-write_report(Time,#conn_log{module=ConnMod}=Info,Data,State) ->
- {LogType,Fd} = get_log(Info,State),
+write_report(_Time,#conn_log{header=false,module=ConnMod}=Info,Data,GL,State) ->
+ {LogType,Fd} = get_log(Info,GL,State),
+ io:format(Fd,"~n~ts",[format_data(ConnMod,LogType,Data)]);
+
+write_report(Time,#conn_log{module=ConnMod}=Info,Data,GL,State) ->
+ {LogType,Fd} = get_log(Info,GL,State),
io:format(Fd,"~n~ts~ts~ts",[format_head(ConnMod,LogType,Time),
format_title(LogType,Info),
format_data(ConnMod,LogType,Data)]).
-write_error(Time,#conn_log{module=ConnMod}=Info,Report,State) ->
- case get_log(Info,State) of
+write_error(Time,#conn_log{module=ConnMod}=Info,Report,GL,State) ->
+ case get_log(Info,GL,State) of
{html,_} ->
%% The error will anyway be written in the html log by the
%% sasl error handler, so don't write it again.
@@ -115,14 +123,19 @@ write_error(Time,#conn_log{module=ConnMod}=Info,Report,State) ->
format_error(LogType,Report)])
end.
-get_log(Info,State) ->
- case proplists:get_value(Info#conn_log.module,State#state.logs) of
- {html,_} ->
- {html,State#state.group_leader};
- {LogType,Fds} ->
- {LogType,get_fd(Info,Fds)};
+get_log(Info,GL,State) ->
+ case proplists:get_value(GL,State#state.logs) of
undefined ->
- {html,State#state.group_leader}
+ {html,State#state.default_gl};
+ ConnLogs ->
+ case proplists:get_value(Info#conn_log.module,ConnLogs) of
+ {html,_} ->
+ {html,GL};
+ {LogType,Fds} ->
+ {LogType,get_fd(Info,Fds)};
+ undefined ->
+ {html,GL}
+ end
end.
get_fd(#conn_log{name=undefined},Fds) ->
@@ -191,17 +204,22 @@ pretty_head({{{Y,Mo,D},{H,Mi,S}},MicroS},ConnMod,Text0) ->
micro2milli(MicroS)]).
pretty_title(#conn_log{client=Client}=Info) ->
- io_lib:format("= Client ~w ~s Server ~ts ",
+ io_lib:format("= Client ~w ~s ~ts ",
[Client,actionstr(Info),serverstr(Info)]).
actionstr(#conn_log{action=send}) -> "----->";
+actionstr(#conn_log{action=cmd}) -> "----->";
actionstr(#conn_log{action=recv}) -> "<-----";
actionstr(#conn_log{action=open}) -> "opened session to";
actionstr(#conn_log{action=close}) -> "closed session to";
actionstr(_) -> "<---->".
+serverstr(#conn_log{name=undefined,address={undefined,_}}) ->
+ io_lib:format("server",[]);
serverstr(#conn_log{name=undefined,address=Address}) ->
io_lib:format("~p",[Address]);
+serverstr(#conn_log{name=Alias,address={undefined,_}}) ->
+ io_lib:format("~w",[Alias]);
serverstr(#conn_log{name=Alias,address=Address}) ->
io_lib:format("~w(~p)",[Alias,Address]).
diff --git a/lib/common_test/src/ct_cover.erl b/lib/common_test/src/ct_cover.erl
index ae671c750a..b630a51835 100644
--- a/lib/common_test/src/ct_cover.erl
+++ b/lib/common_test/src/ct_cover.erl
@@ -47,18 +47,21 @@ add_nodes(Nodes) ->
undefined ->
{error,cover_not_running};
_ ->
- {File,Nodes0,Import,Export,AppInfo} = ct_util:get_testdata(cover),
+ Nodes0 = cover:which_nodes(),
Nodes1 = [Node || Node <- Nodes,
lists:member(Node,Nodes0) == false],
ct_logs:log("COVER INFO",
"Adding nodes to cover test: ~w", [Nodes1]),
case cover:start(Nodes1) of
- Result = {ok,_} ->
- ct_util:set_testdata({cover,{File,Nodes1++Nodes0,
- Import,Export,AppInfo}}),
-
+ Result = {ok,StartedNodes} ->
+ ct_logs:log("COVER INFO",
+ "Successfully added nodes to cover test: ~w",
+ [StartedNodes]),
Result;
Error ->
+ ct_logs:log("COVER INFO",
+ "Failed to add nodes to cover test: ~tp",
+ [Error]),
Error
end
end.
@@ -81,19 +84,20 @@ remove_nodes(Nodes) ->
undefined ->
{error,cover_not_running};
_ ->
- {File,Nodes0,Import,Export,AppInfo} = ct_util:get_testdata(cover),
+ Nodes0 = cover:which_nodes(),
ToRemove = [Node || Node <- Nodes, lists:member(Node,Nodes0)],
ct_logs:log("COVER INFO",
- "Removing nodes from cover test: ~w", [ToRemove]),
+ "Removing nodes from cover test: ~w", [ToRemove]),
case cover:stop(ToRemove) of
ok ->
- Nodes1 = lists:foldl(fun(N,Deleted) ->
- lists:delete(N,Deleted)
- end, Nodes0, ToRemove),
- ct_util:set_testdata({cover,{File,Nodes1,
- Import,Export,AppInfo}}),
+ ct_logs:log("COVER INFO",
+ "Successfully removed nodes from cover test.",
+ []),
ok;
Error ->
+ ct_logs:log("COVER INFO",
+ "Failed to remove nodes from cover test: ~tp",
+ [Error]),
Error
end
end.
@@ -124,20 +128,20 @@ get_spec(File) ->
catch get_spec_test(File).
get_spec_test(File) ->
- FullName = filename:absname(File),
- case filelib:is_file(FullName) of
+ Dir = filename:dirname(File), % always abs path in here, set in ct_run
+ case filelib:is_file(File) of
true ->
- case file:consult(FullName) of
+ case file:consult(File) of
{ok,Terms} ->
Import =
case lists:keysearch(import, 1, Terms) of
{value,{_,Imps=[S|_]}} when is_list(S) ->
ImpsFN = lists:map(fun(F) ->
- filename:absname(F)
+ filename:absname(F,Dir)
end, Imps),
test_files(ImpsFN, ImpsFN);
{value,{_,Imp=[IC|_]}} when is_integer(IC) ->
- ImpFN = filename:absname(Imp),
+ ImpFN = filename:absname(Imp,Dir),
test_files([ImpFN], [ImpFN]);
_ ->
[]
@@ -145,11 +149,11 @@ get_spec_test(File) ->
Export =
case lists:keysearch(export, 1, Terms) of
{value,{_,Exp=[EC|_]}} when is_integer(EC) ->
- filename:absname(Exp);
+ filename:absname(Exp,Dir);
{value,{_,[Exp]}} ->
- filename:absname(Exp);
+ filename:absname(Exp,Dir);
_ ->
- []
+ undefined
end,
Nodes =
case lists:keysearch(nodes, 1, Terms) of
@@ -170,12 +174,12 @@ get_spec_test(File) ->
[] -> [#cover{app=none, level=details}];
_ -> Res
end,
- case get_cover_opts(Apps, Terms, []) of
+ case get_cover_opts(Apps, Terms, Dir, []) of
E = {error,_} ->
E;
[CoverSpec] ->
CoverSpec1 = remove_excludes_and_dups(CoverSpec),
- {FullName,Nodes,Import,Export,CoverSpec1};
+ {File,Nodes,Import,Export,CoverSpec1};
_ ->
{error,multiple_apps_in_cover_spec}
end;
@@ -186,7 +190,7 @@ get_spec_test(File) ->
{error,{invalid_cover_spec,Error}}
end;
false ->
- {error,{cant_read_cover_spec_file,FullName}}
+ {error,{cant_read_cover_spec_file,File}}
end.
collect_apps([{level,Level}|Ts], Apps) ->
@@ -201,124 +205,125 @@ collect_apps([], Apps) ->
%% get_cover_opts(Terms) -> AppCoverInfo
%% AppCoverInfo: [#cover{app=App,...}]
-get_cover_opts([App | Apps], Terms, CoverInfo) ->
- case get_app_info(App, Terms) of
+get_cover_opts([App | Apps], Terms, Dir, CoverInfo) ->
+ case get_app_info(App, Terms, Dir) of
E = {error,_} -> E;
AppInfo ->
AppInfo1 = files2mods(AppInfo),
- get_cover_opts(Apps, Terms, [AppInfo1|CoverInfo])
+ get_cover_opts(Apps, Terms, Dir, [AppInfo1|CoverInfo])
end;
-get_cover_opts([], _, CoverInfo) ->
+get_cover_opts([], _, _, CoverInfo) ->
lists:reverse(CoverInfo).
-%% get_app_info(App, Terms) -> App1
+%% get_app_info(App, Terms, Dir) -> App1
-get_app_info(App=#cover{app=none}, [{incl_dirs,Dirs}|Terms]) ->
- get_app_info(App, [{incl_dirs,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{incl_dirs,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".beam", false, []) of
+get_app_info(App=#cover{app=none}, [{incl_dirs,Dirs}|Terms], Dir) ->
+ get_app_info(App, [{incl_dirs,none,Dirs}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{incl_dirs,Name,Dirs}|Terms], Dir) ->
+ case get_files(Dirs, Dir, ".beam", false, []) of
E = {error,_} -> E;
Mods1 ->
Mods = App#cover.incl_mods,
- get_app_info(App#cover{incl_mods=Mods++Mods1},Terms)
+ get_app_info(App#cover{incl_mods=Mods++Mods1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{incl_dirs_r,Dirs}|Terms]) ->
- get_app_info(App, [{incl_dirs_r,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{incl_dirs_r,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".beam", true, []) of
+get_app_info(App=#cover{app=none}, [{incl_dirs_r,Dirs}|Terms], Dir) ->
+ get_app_info(App, [{incl_dirs_r,none,Dirs}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{incl_dirs_r,Name,Dirs}|Terms], Dir) ->
+ case get_files(Dirs, Dir, ".beam", true, []) of
E = {error,_} -> E;
Mods1 ->
Mods = App#cover.incl_mods,
- get_app_info(App#cover{incl_mods=Mods++Mods1},Terms)
+ get_app_info(App#cover{incl_mods=Mods++Mods1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{incl_mods,Mods1}|Terms]) ->
- get_app_info(App, [{incl_mods,none,Mods1}|Terms]);
-get_app_info(App=#cover{app=Name}, [{incl_mods,Name,Mods1}|Terms]) ->
+get_app_info(App=#cover{app=none}, [{incl_mods,Mods1}|Terms], Dir) ->
+ get_app_info(App, [{incl_mods,none,Mods1}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{incl_mods,Name,Mods1}|Terms], Dir) ->
Mods = App#cover.incl_mods,
- get_app_info(App#cover{incl_mods=Mods++Mods1},Terms);
+ get_app_info(App#cover{incl_mods=Mods++Mods1},Terms,Dir);
-get_app_info(App=#cover{app=none}, [{excl_dirs,Dirs}|Terms]) ->
- get_app_info(App, [{excl_dirs,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{excl_dirs,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".beam", false, []) of
+get_app_info(App=#cover{app=none}, [{excl_dirs,Dirs}|Terms], Dir) ->
+ get_app_info(App, [{excl_dirs,none,Dirs}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{excl_dirs,Name,Dirs}|Terms], Dir) ->
+ case get_files(Dirs, Dir, ".beam", false, []) of
E = {error,_} -> E;
Mods1 ->
Mods = App#cover.excl_mods,
- get_app_info(App#cover{excl_mods=Mods++Mods1},Terms)
+ get_app_info(App#cover{excl_mods=Mods++Mods1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{excl_dirs_r,Dirs}|Terms]) ->
- get_app_info(App, [{excl_dirs_r,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{excl_dirs_r,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".beam", true, []) of
+get_app_info(App=#cover{app=none}, [{excl_dirs_r,Dirs}|Terms],Dir) ->
+ get_app_info(App, [{excl_dirs_r,none,Dirs}|Terms],Dir);
+get_app_info(App=#cover{app=Name}, [{excl_dirs_r,Name,Dirs}|Terms],Dir) ->
+ case get_files(Dirs, Dir, ".beam", true, []) of
E = {error,_} -> E;
Mods1 ->
Mods = App#cover.excl_mods,
- get_app_info(App#cover{excl_mods=Mods++Mods1},Terms)
+ get_app_info(App#cover{excl_mods=Mods++Mods1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{excl_mods,Mods1}|Terms]) ->
- get_app_info(App, [{excl_mods,none,Mods1}|Terms]);
-get_app_info(App=#cover{app=Name}, [{excl_mods,Name,Mods1}|Terms]) ->
+get_app_info(App=#cover{app=none}, [{excl_mods,Mods1}|Terms], Dir) ->
+ get_app_info(App, [{excl_mods,none,Mods1}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{excl_mods,Name,Mods1}|Terms], Dir) ->
Mods = App#cover.excl_mods,
- get_app_info(App#cover{excl_mods=Mods++Mods1},Terms);
+ get_app_info(App#cover{excl_mods=Mods++Mods1},Terms,Dir);
-get_app_info(App=#cover{app=none}, [{cross,Cross}|Terms]) ->
- get_app_info(App, [{cross,none,Cross}|Terms]);
-get_app_info(App=#cover{app=Name}, [{cross,Name,Cross1}|Terms]) ->
+get_app_info(App=#cover{app=none}, [{cross,Cross}|Terms], Dir) ->
+ get_app_info(App, [{cross,none,Cross}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{cross,Name,Cross1}|Terms], Dir) ->
Cross = App#cover.cross,
- get_app_info(App#cover{cross=Cross++Cross1},Terms);
+ get_app_info(App#cover{cross=Cross++Cross1},Terms,Dir);
-get_app_info(App=#cover{app=none}, [{src_dirs,Dirs}|Terms]) ->
- get_app_info(App, [{src_dirs,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{src_dirs,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".erl", false, []) of
+get_app_info(App=#cover{app=none}, [{src_dirs,Dirs}|Terms], Dir) ->
+ get_app_info(App, [{src_dirs,none,Dirs}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{src_dirs,Name,Dirs}|Terms], Dir) ->
+ case get_files(Dirs, Dir, ".erl", false, []) of
E = {error,_} -> E;
Src1 ->
Src = App#cover.src,
- get_app_info(App#cover{src=Src++Src1},Terms)
+ get_app_info(App#cover{src=Src++Src1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{src_dirs_r,Dirs}|Terms]) ->
- get_app_info(App, [{src_dirs_r,none,Dirs}|Terms]);
-get_app_info(App=#cover{app=Name}, [{src_dirs_r,Name,Dirs}|Terms]) ->
- case get_files(Dirs, ".erl", true, []) of
+get_app_info(App=#cover{app=none}, [{src_dirs_r,Dirs}|Terms], Dir) ->
+ get_app_info(App, [{src_dirs_r,none,Dirs}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{src_dirs_r,Name,Dirs}|Terms], Dir) ->
+ case get_files(Dirs, Dir, ".erl", true, []) of
E = {error,_} -> E;
Src1 ->
Src = App#cover.src,
- get_app_info(App#cover{src=Src++Src1},Terms)
+ get_app_info(App#cover{src=Src++Src1},Terms,Dir)
end;
-get_app_info(App=#cover{app=none}, [{src_files,Src1}|Terms]) ->
- get_app_info(App, [{src_files,none,Src1}|Terms]);
-get_app_info(App=#cover{app=Name}, [{src_files,Name,Src1}|Terms]) ->
+get_app_info(App=#cover{app=none}, [{src_files,Src1}|Terms], Dir) ->
+ get_app_info(App, [{src_files,none,Src1}|Terms], Dir);
+get_app_info(App=#cover{app=Name}, [{src_files,Name,Src1}|Terms], Dir) ->
Src = App#cover.src,
- get_app_info(App#cover{src=Src++Src1},Terms);
+ get_app_info(App#cover{src=Src++Src1},Terms,Dir);
-get_app_info(App, [_|Terms]) ->
- get_app_info(App, Terms);
+get_app_info(App, [_|Terms], Dir) ->
+ get_app_info(App, Terms, Dir);
-get_app_info(App, []) ->
+get_app_info(App, [], _) ->
App.
%% get_files(...)
-get_files([Dir|Dirs], Ext, Recurse, Files) ->
- case file:list_dir(Dir) of
+get_files([Dir|Dirs], RootDir, Ext, Recurse, Files) ->
+ DirAbs = filename:absname(Dir, RootDir),
+ case file:list_dir(DirAbs) of
{ok,Entries} ->
- {SubDirs,Matches} = analyse_files(Entries, Dir, Ext, [], []),
+ {SubDirs,Matches} = analyse_files(Entries, DirAbs, Ext, [], []),
if Recurse == false ->
- get_files(Dirs, Ext, Recurse, Files++Matches);
+ get_files(Dirs, RootDir, Ext, Recurse, Files++Matches);
true ->
- Files1 = get_files(SubDirs, Ext, Recurse, Files++Matches),
- get_files(Dirs, Ext, Recurse, Files1)
+ Files1 = get_files(SubDirs, RootDir, Ext, Recurse, Files++Matches),
+ get_files(Dirs, RootDir, Ext, Recurse, Files1)
end;
{error,Reason} ->
- {error,{Reason,Dir}}
+ {error,{Reason,DirAbs}}
end;
-get_files([], _Ext, _R, Files) ->
+get_files([], _RootDir, _Ext, _R, Files) ->
Files.
%% analyse_files(...)
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index e81b69a1b5..498950c9d1 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -249,8 +249,8 @@ init_tc2(Mod,Suite,Func,SuiteInfo,MergeResult,Config) ->
end
end.
-ct_suite_init(Suite, Func, PostInitHook, Config) when is_list(Config) ->
- case ct_hooks:init_tc(Suite, Func, Config) of
+ct_suite_init(Suite, FuncSpec, PostInitHook, Config) when is_list(Config) ->
+ case ct_hooks:init_tc(Suite, FuncSpec, Config) of
NewConfig when is_list(NewConfig) ->
PostInitHookResult = do_post_init_hook(PostInitHook, NewConfig),
{ok, [PostInitHookResult ++ NewConfig]};
@@ -657,13 +657,21 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
_ ->
ok
end,
- ct_util:delete_testdata(comment),
+ if Func == end_per_group; Func == end_per_suite ->
+ %% clean up any saved comments
+ ct_util:match_delete_testdata({comment,'_'});
+ true ->
+ %% attemp to delete any saved comment for this TC
+ case process_info(TCPid, group_leader) of
+ {group_leader,TCGL} ->
+ ct_util:delete_testdata({comment,TCGL});
+ _ ->
+ ok
+ end
+ end,
ct_util:delete_suite_data(last_saved_config),
- FuncSpec = case group_or_func(Func,Args) of
- {_,_GroupName,_} = Group -> Group;
- _ -> Func
- end,
+ FuncSpec = group_or_func(Func,Args),
{Result1,FinalNotify} =
case ct_hooks:end_tc(
@@ -678,18 +686,21 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
undefined ->
%% send sync notification so that event handlers may print
%% in the log file before it gets closed
- ct_event:sync_notify(#event{name=tc_done,
- node=node(),
- data={Mod,FuncSpec,
- tag_cth(FinalNotify)}}),
+ Event = #event{name=tc_done,
+ node=node(),
+ data={Mod,FuncSpec,
+ tag(FinalNotify)}},
+ ct_event:sync_notify(Event),
Result1;
Fun ->
%% send sync notification so that event handlers may print
%% in the log file before it gets closed
- ct_event:sync_notify(#event{name=tc_done,
- node=node(),
- data={Mod,FuncSpec,
- tag(FinalNotify)}}),
+ Event = #event{name=tc_done,
+ node=node(),
+ data={Mod,FuncSpec,
+ tag({'$test_server_framework_test',
+ FinalNotify})}},
+ ct_event:sync_notify(Event),
Fun(end_tc, Return)
end,
@@ -730,9 +741,14 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
(undefined) ->
undefined;
(Unexpected) ->
- exit({error,{reset_curr_tc,{Mod,Func},Unexpected}})
+ {error,{reset_curr_tc,{Mod,Func},Unexpected}}
end,
- ct_util:update_testdata(curr_tc, ClearCurrTC),
+ case ct_util:update_testdata(curr_tc, ClearCurrTC) of
+ {error,_} = ClearError ->
+ exit(ClearError);
+ _ ->
+ ok
+ end,
case FinalResult of
{auto_skip,{sequence_failed,_,_}} ->
@@ -757,44 +773,37 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
%% {error,Reason} | {skip,Reason} | {timetrap_timeout,TVal} |
%% {testcase_aborted,Reason} | testcase_aborted_or_killed |
-%% {'EXIT',Reason} | Other (ignored return value, e.g. 'ok')
-tag({STag,Reason}) when STag == skip; STag == skipped ->
- case Reason of
- {failed,{_,init_per_testcase,_}} -> {auto_skipped,Reason};
- _ -> {skipped,Reason}
- end;
-tag({auto_skip,Reason}) ->
- {auto_skipped,Reason};
-tag(E = {ETag,_}) when ETag == error; ETag == 'EXIT';
- ETag == timetrap_timeout;
- ETag == testcase_aborted ->
- {failed,E};
-tag(E = testcase_aborted_or_killed) ->
- {failed,E};
-tag(Other) ->
- Other.
-
-tag_cth({skipped,Reason={failed,{_,init_per_testcase,_}}}) ->
+%% {'EXIT',Reason} | {fail,Reason} | {failed,Reason} |
+%% {user_timetrap_error,Reason} |
+%% Other (ignored return value, e.g. 'ok')
+tag({'$test_server_framework_test',Result}) ->
+ case tag(Result) of
+ ok -> Result;
+ Failure -> Failure
+ end;
+tag({skipped,Reason={failed,{_,init_per_testcase,_}}}) ->
{auto_skipped,Reason};
-tag_cth({STag,Reason}) when STag == skip; STag == skipped ->
+tag({STag,Reason}) when STag == skip; STag == skipped ->
case Reason of
{failed,{_,init_per_testcase,_}} -> {auto_skipped,Reason};
_ -> {skipped,Reason}
end;
-tag_cth({auto_skip,Reason}) ->
+tag({auto_skip,Reason}) ->
{auto_skipped,Reason};
-tag_cth({fail,Reason}) ->
+tag({fail,Reason}) ->
{failed,{error,Reason}};
-tag_cth(E = {ETag,_}) when ETag == error; ETag == 'EXIT';
+tag(Failed = {failed,_Reason}) ->
+ Failed;
+tag(E = {ETag,_}) when ETag == error; ETag == 'EXIT';
ETag == timetrap_timeout;
ETag == testcase_aborted ->
{failed,E};
-tag_cth(E = testcase_aborted_or_killed) ->
+tag(E = testcase_aborted_or_killed) ->
{failed,E};
-tag_cth(List) when is_list(List) ->
- ok;
-tag_cth(Other) ->
- Other.
+tag(UserTimetrap = {user_timetrap_error,_Reason}) ->
+ UserTimetrap;
+tag(_Other) ->
+ ok.
%%%-----------------------------------------------------------------
%%% @spec error_notification(Mod,Func,Args,Error) -> ok
@@ -828,6 +837,8 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
io_lib:format("{test_case_failed,~p}", [Reason]);
Result -> Result
end;
+ {'EXIT',_Reason} = EXIT ->
+ io_lib:format("~P", [EXIT,5]);
{Spec,_Reason} when is_atom(Spec) ->
io_lib:format("~w", [Spec]);
Other ->
@@ -848,7 +859,7 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
_ ->
%% this notification comes from the test case process, so
%% we can add error info to comment with test_server:comment/1
- case ct_util:get_testdata(comment) of
+ case ct_util:get_testdata({comment,group_leader()}) of
undefined ->
test_server:comment(ErrorHtml);
Comment ->
@@ -1231,38 +1242,7 @@ report(What,Data) ->
ct_logs:make_all_suites_index({TestName,RunDir}),
ok;
tests_start ->
- case ct_util:get_testdata(cover) of
- undefined ->
- ok;
- {_CovFile,_CovNodes,CovImport,CovExport,_CovAppData} ->
- %% Always import cover data from files specified by CovImport
- %% if no CovExport defined. If CovExport is defined, only
- %% import from CovImport files initially, then use CovExport
- %% to pass coverdata between proceeding tests (in the same run).
- Imps =
- case CovExport of
- [] -> % don't export data between tests
- CovImport;
- _ ->
- case filelib:is_file(CovExport) of
- true ->
- [CovExport];
- false ->
- CovImport
- end
- end,
- lists:foreach(
- fun(Imp) ->
- case cover:import(Imp) of
- ok ->
- ok;
- {error,Reason} ->
- ct_logs:log("COVER INFO",
- "Importing cover data from: ~ts fails! "
- "Reason: ~p", [Imp,Reason])
- end
- end, Imps)
- end;
+ ok;
tests_done ->
ok;
severe_error ->
@@ -1272,28 +1252,41 @@ report(What,Data) ->
ct_util:set_testdata({What,Data}),
ok;
tc_start ->
- %% Data = {{Suite,Func},LogFileName}
+ %% Data = {{Suite,{Func,GroupName}},LogFileName}
+ Data1 = case Data of
+ {{Suite,{Func,undefined}},LFN} -> {{Suite,Func},LFN};
+ _ -> Data
+ end,
ct_event:sync_notify(#event{name=tc_logfile,
node=node(),
- data=Data}),
+ data=Data1}),
ok;
tc_done ->
- {_Suite,Case,Result} = Data,
+ {Suite,{Func,GrName},Result} = Data,
+ Data1 = if GrName == undefined -> {Suite,Func,Result};
+ true -> Data
+ end,
+ %% Register the group leader for the process calling the report
+ %% function, making it possible for a hook function to print
+ %% in the test case log file
+ ReportingPid = self(),
+ ct_logs:register_groupleader(ReportingPid, group_leader()),
case Result of
{failed, _} ->
- ct_hooks:on_tc_fail(What, Data);
+ ct_hooks:on_tc_fail(What, Data1);
{skipped,{failed,{_,init_per_testcase,_}}} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
{skipped,{require_failed,_}} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
{skipped,_} ->
- ct_hooks:on_tc_skip(tc_user_skip, Data);
+ ct_hooks:on_tc_skip(tc_user_skip, Data1);
{auto_skipped,_} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
_Else ->
ok
end,
- case {Case,Result} of
+ ct_logs:unregister_groupleader(ReportingPid),
+ case {Func,Result} of
{init_per_suite,_} ->
ok;
{end_per_suite,_} ->
@@ -1322,20 +1315,17 @@ report(What,Data) ->
tc_user_skip ->
%% test case or config function specified as skipped in testspec,
%% or init config func for suite/group has returned {skip,Reason}
- %% Data = {Suite,Case,Comment} |
- %% {Suite,{GroupConfigFunc,GroupName},Comment}
+ %% Data = {Suite,{Func,GroupName},Comment}
{Func,Data1} = case Data of
- {Suite,{ConfigFunc,undefined},Cmt} ->
- {ConfigFunc,{Suite,ConfigFunc,Cmt}};
- {_,{ConfigFunc,_},_} -> {ConfigFunc,Data};
- {_,Case,_} -> {Case,Data}
+ {Suite,{F,undefined},Comment} ->
+ {F,{Suite,F,Comment}};
+ D = {_,{F,_},_} ->
+ {F,D}
end,
-
ct_event:sync_notify(#event{name=tc_user_skip,
node=node(),
data=Data1}),
ct_hooks:on_tc_skip(What, Data1),
-
if Func /= init_per_suite, Func /= init_per_group,
Func /= end_per_suite, Func /= end_per_group ->
add_to_stats(user_skipped);
@@ -1345,13 +1335,12 @@ report(What,Data) ->
tc_auto_skip ->
%% test case skipped because of error in config function, or
%% config function skipped because of error in info function
- %% Data = {Suite,Case,Comment} |
- %% {Suite,{GroupConfigFunc,GroupName},Comment}
+ %% Data = {Suite,{Func,GroupName},Comment}
{Func,Data1} = case Data of
- {Suite,{ConfigFunc,undefined},Cmt} ->
- {ConfigFunc,{Suite,ConfigFunc,Cmt}};
- {_,{ConfigFunc,_},_} -> {ConfigFunc,Data};
- {_,Case,_} -> {Case,Data}
+ {Suite,{F,undefined},Comment} ->
+ {F,{Suite,F,Comment}};
+ D = {_,{F,_},_} ->
+ {F,D}
end,
%% this test case does not have a log, so printouts
%% from event handlers should end up in the main log
@@ -1359,7 +1348,6 @@ report(What,Data) ->
node=node(),
data=Data1}),
ct_hooks:on_tc_skip(What, Data1),
-
if Func /= end_per_suite,
Func /= end_per_group ->
add_to_stats(auto_skipped);
@@ -1412,7 +1400,7 @@ warn(_What) ->
true.
%%%-----------------------------------------------------------------
-%%% @spec add_data_dir(File0) -> File1
+%%% @spec add_data_dir(File0, Config) -> File1
add_data_dir(File,Config) when is_atom(File) ->
add_data_dir(atom_to_list(File),Config);
diff --git a/lib/common_test/src/ct_gen_conn.erl b/lib/common_test/src/ct_gen_conn.erl
index a5b736136f..56082086f6 100644
--- a/lib/common_test/src/ct_gen_conn.erl
+++ b/lib/common_test/src/ct_gen_conn.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,13 @@
-export([start/4, stop/1, get_conn_pid/1]).
-export([call/2, call/3, return/2, do_within_time/2]).
+%%----------------------------------------------------------------------
+%% Exported types
+%%----------------------------------------------------------------------
+-export_type([server_id/0,
+ target_name/0,
+ key_or_name/0]).
+
-ifdef(debug).
-define(dbg,true).
-else.
@@ -47,6 +54,18 @@
cb_state,
ct_util_server}).
+%%------------------------------------------------------------------
+%% Type declarations
+%%------------------------------------------------------------------
+-type server_id() :: atom().
+%% A `ServerId' which exists in a configuration file.
+-type target_name() :: atom().
+%% A name which is associated to a `server_id()' via a
+%% `require' statement or a call to {@link ct:require/2} in the
+%% test suite.
+-type key_or_name() :: server_id() | target_name().
+
+
%%%-----------------------------------------------------------------
%%% @spec start(Address,InitData,CallbackMod,Opts) ->
%%% {ok,Handle} | {error,Reason}
@@ -288,7 +307,8 @@ call(Pid, Msg, Timeout) ->
end.
return({To,Ref},Result) ->
- To ! {Ref, Result}.
+ To ! {Ref, Result},
+ ok.
init_gen(Parent,Opts) ->
process_flag(trap_exit,true),
@@ -325,7 +345,7 @@ loop(Opts) ->
link(NewPid),
put(conn_pid,NewPid),
loop(Opts#gen_opts{conn_pid=NewPid,
- cb_state=NewState});
+ cb_state=NewState});
Error ->
ct_util:unregister_connection(self()),
log("Reconnect failed. Giving up!",
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index e845e9e908..df4c98d9d1 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -64,11 +64,16 @@ terminate(Hooks) ->
%% @doc Called as each test case is started. This includes all configuration
%% tests.
--spec init_tc(Mod :: atom(), Func :: atom(), Args :: list()) ->
+-spec init_tc(Mod :: atom(),
+ FuncSpec :: atom() |
+ {ConfigFunc :: init_per_group | end_per_group,
+ GroupName :: atom(),
+ Properties :: list()},
+ Args :: list()) ->
NewConfig :: proplists:proplist() |
- {skip, Reason :: term()} |
- {auto_skip, Reason :: term()} |
- {fail, Reason :: term()}.
+ {skip, Reason :: term()} |
+ {auto_skip, Reason :: term()} |
+ {fail, Reason :: term()}.
init_tc(Mod, init_per_suite, Config) ->
Info = try proplists:get_value(ct_hooks, Mod:suite(),[]) of
@@ -82,8 +87,8 @@ init_tc(Mod, init_per_suite, Config) ->
call(fun call_generic/3, Config ++ Info, [pre_init_per_suite, Mod]);
init_tc(Mod, end_per_suite, Config) ->
call(fun call_generic/3, Config, [pre_end_per_suite, Mod]);
-init_tc(Mod, {init_per_group, GroupName, Opts}, Config) ->
- maybe_start_locker(Mod, GroupName, Opts),
+init_tc(Mod, {init_per_group, GroupName, Properties}, Config) ->
+ maybe_start_locker(Mod, GroupName, Properties),
call(fun call_generic/3, Config, [pre_init_per_group, GroupName]);
init_tc(_Mod, {end_per_group, GroupName, _}, Config) ->
call(fun call_generic/3, Config, [pre_end_per_group, GroupName]);
@@ -93,15 +98,18 @@ init_tc(_Mod, TC, Config) ->
%% @doc Called as each test case is completed. This includes all configuration
%% tests.
-spec end_tc(Mod :: atom(),
- Func :: atom(),
+ FuncSpec :: atom() |
+ {ConfigFunc :: init_per_group | end_per_group,
+ GroupName :: atom(),
+ Properties :: list()},
Args :: list(),
Result :: term(),
- Resturn :: term()) ->
+ Return :: term()) ->
NewConfig :: proplists:proplist() |
- {skip, Reason :: term()} |
- {auto_skip, Reason :: term()} |
- {fail, Reason :: term()} |
- ok | '$ct_no_change'.
+ {skip, Reason :: term()} |
+ {auto_skip, Reason :: term()} |
+ {fail, Reason :: term()} |
+ ok | '$ct_no_change'.
end_tc(Mod, init_per_suite, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_suite, Mod, Config],
@@ -112,18 +120,20 @@ end_tc(Mod, end_per_suite, Config, Result, _Return) ->
end_tc(_Mod, {init_per_group, GroupName, _}, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_group, GroupName, Config],
'$ct_no_change');
-end_tc(Mod, {end_per_group, GroupName, Opts}, Config, Result, _Return) ->
+end_tc(Mod, {end_per_group, GroupName, Properties}, Config, Result, _Return) ->
Res = call(fun call_generic/3, Result,
[post_end_per_group, GroupName, Config], '$ct_no_change'),
- maybe_stop_locker(Mod, GroupName,Opts),
+ maybe_stop_locker(Mod, GroupName, Properties),
Res;
end_tc(_Mod, TC, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
'$ct_no_change').
+%% Case = TestCase | {TestCase,GroupName}
on_tc_skip(How, {Suite, Case, Reason}) ->
call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]).
+%% Case = TestCase | {TestCase,GroupName}
on_tc_fail(_How, {Suite, Case, Reason}) ->
call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, Case]).
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index a7fb45a4e4..fa55a9754e 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,7 @@
-module(ct_logs).
-export([init/2, close/2, init_tc/1, end_tc/1]).
+-export([register_groupleader/2, unregister_groupleader/1]).
-export([get_log_dir/0, get_log_dir/1]).
-export([log/3, start_log/1, cont_log/2, end_log/0]).
-export([set_stylesheet/2, clear_stylesheet/1]).
@@ -62,6 +63,7 @@
-define(totals_name, "totals.info").
-define(log_cache_name, "ct_log_cache").
-define(misc_io_log, "misc_io.log.html").
+-define(coverlog_name, "cover.html"). % must be same as in test_server_ctrl
-define(table_color1,"#ADD8E6").
-define(table_color2,"#E4F0FE").
@@ -76,7 +78,7 @@
tests = []}).
%%%-----------------------------------------------------------------
-%%% @spec init(Mode) -> Result
+%%% @spec init(Mode, Verbosity) -> Result
%%% Mode = normal | interactive
%%% Result = {StartTime,LogDir}
%%% StartTime = term()
@@ -128,7 +130,13 @@ datestr_from_dirname([]) ->
close(Info, StartDir) ->
%% close executes on the ct_util process, not on the logger process
%% so we need to use a local copy of the log cache data
- LogCacheBin = make_last_run_index(),
+ LogCacheBin =
+ case make_last_run_index() of
+ {error,_} -> % log server not responding
+ undefined;
+ LCB ->
+ LCB
+ end,
put(ct_log_cache,LogCacheBin),
Cache2File = fun() ->
case get(ct_log_cache) of
@@ -260,7 +268,7 @@ init_tc(RefreshLog) ->
ok.
%%%-----------------------------------------------------------------
-%%% @spec end_tc(TCPid) -> ok | {error,Reason}
+%%% @spec end_tc(TCPid) -> ok
%%%
%%% @doc Test case clean up (tool-internal use only).
%%%
@@ -271,6 +279,26 @@ end_tc(TCPid) ->
call({end_tc,TCPid}).
%%%-----------------------------------------------------------------
+%%% @spec register_groupleader(Pid,GroupLeader) -> ok
+%%%
+%%% @doc To enable logging to a group leader (tool-internal use only).
+%%%
+%%% <p>This function is called by ct_framework:report/2</p>
+register_groupleader(Pid,GroupLeader) ->
+ call({register_groupleader,Pid,GroupLeader}),
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% @spec unregister_groupleader(Pid) -> ok
+%%%
+%%% @doc To disable logging to a group leader (tool-internal use only).
+%%%
+%%% <p>This function is called by ct_framework:report/2</p>
+unregister_groupleader(Pid) ->
+ call({unregister_groupleader,Pid}),
+ ok.
+
+%%%-----------------------------------------------------------------
%%% @spec log(Heading,Format,Args) -> ok
%%%
%%% @doc Log internal activity (tool-internal use only).
@@ -709,6 +737,7 @@ logger_loop(State) ->
end
end,
if Importance >= (100-VLvl) ->
+ CtLogFd = State#logger_state.ct_log_fd,
case get_groupleader(Pid, GL, State) of
{tc_log,TCGL,TCGLs} ->
case erlang:is_process_alive(TCGL) of
@@ -722,14 +751,15 @@ logger_loop(State) ->
%% Group leader is dead, so write to the
%% CtLog or unexpected_io log instead
unexpected_io(Pid,Category,Importance,
- List,State),
+ List,CtLogFd),
+
logger_loop(State)
end;
{ct_log,_Fd,TCGLs} ->
%% If category is ct_internal then write
%% to ct_log, else write to unexpected_io
%% log
- unexpected_io(Pid,Category,Importance,List,State),
+ unexpected_io(Pid,Category,Importance,List,CtLogFd),
logger_loop(State#logger_state{
tc_groupleaders = TCGLs})
end;
@@ -755,6 +785,14 @@ logger_loop(State) ->
return(From,ok),
logger_loop(State#logger_state{tc_groupleaders =
rm_tc_gl(TCPid,State)});
+ {{register_groupleader,Pid,GL},From} ->
+ GLs = add_tc_gl(Pid,GL,State),
+ return(From,ok),
+ logger_loop(State#logger_state{tc_groupleaders = GLs});
+ {{unregister_groupleader,Pid},From} ->
+ return(From,ok),
+ logger_loop(State#logger_state{tc_groupleaders =
+ rm_tc_gl(Pid,State)});
{{get_log_dir,true},From} ->
return(From,{ok,State#logger_state.log_dir}),
logger_loop(State);
@@ -802,16 +840,15 @@ logger_loop(State) ->
ok
end.
-create_io_fun(FromPid, State) ->
+create_io_fun(FromPid, CtLogFd) ->
%% we have to build one io-list of all strings
%% before printing, or other io printouts (made in
%% parallel) may get printed between this header
%% and footer
- Fd = State#logger_state.ct_log_fd,
fun({Str,Args}, IoList) ->
case catch io_lib:format(Str,Args) of
{'EXIT',_Reason} ->
- io:format(Fd, "Logging fails! Str: ~p, Args: ~p~n",
+ io:format(CtLogFd, "Logging fails! Str: ~p, Args: ~p~n",
[Str,Args]),
%% stop the testcase, we need to see the fault
exit(FromPid, {log_printout_error,Str,Args}),
@@ -826,28 +863,53 @@ create_io_fun(FromPid, State) ->
print_to_log(sync, FromPid, Category, TCGL, List, State) ->
%% in some situations (exceptions), the printout is made from the
%% test server IO process and there's no valid group leader to send to
+ CtLogFd = State#logger_state.ct_log_fd,
if FromPid /= TCGL ->
- IoFun = create_io_fun(FromPid, State),
+ IoFun = create_io_fun(FromPid, CtLogFd),
io:format(TCGL,"~ts", [lists:foldl(IoFun, [], List)]);
true ->
- unexpected_io(FromPid,Category,?MAX_IMPORTANCE,List,State)
+ unexpected_io(FromPid,Category,?MAX_IMPORTANCE,List,CtLogFd)
end,
State;
print_to_log(async, FromPid, Category, TCGL, List, State) ->
%% in some situations (exceptions), the printout is made from the
%% test server IO process and there's no valid group leader to send to
+ CtLogFd = State#logger_state.ct_log_fd,
Printer =
if FromPid /= TCGL ->
- IoFun = create_io_fun(FromPid, State),
+ IoFun = create_io_fun(FromPid, CtLogFd),
fun() ->
test_server:permit_io(TCGL, self()),
- io:format(TCGL, "~ts", [lists:foldl(IoFun, [], List)])
+
+ %% Since asynchronous io gets can get buffered if
+ %% the file system is slow, there is also a risk that
+ %% the group leader has terminated before we get to
+ %% the io:format(GL, ...) call. We check this and
+ %% print "expired" messages to the unexpected io
+ %% log instead (best we can do).
+
+ case erlang:is_process_alive(TCGL) of
+ true ->
+ try io:format(TCGL, "~ts",
+ [lists:foldl(IoFun,[],List)]) of
+ _ -> ok
+ catch
+ _:terminated ->
+ unexpected_io(FromPid, Category,
+ ?MAX_IMPORTANCE,
+ List, CtLogFd)
+ end;
+ false ->
+ unexpected_io(FromPid, Category,
+ ?MAX_IMPORTANCE,
+ List, CtLogFd)
+ end
end;
true ->
fun() ->
- unexpected_io(FromPid,Category,?MAX_IMPORTANCE,
- List,State)
+ unexpected_io(FromPid, Category, ?MAX_IMPORTANCE,
+ List, CtLogFd)
end
end,
case State#logger_state.async_print_jobs of
@@ -1304,7 +1366,8 @@ total_row(Success, Fail, UserSkip, AutoSkip, NotBuilt, All) ->
"<td align=right>",integer_to_list(AllSkip),
" (",UserSkipStr,"/",AutoSkipStr,")</td>\n",
"<td align=right><b>",integer_to_list(NotBuilt),"<b></td>\n",
- AllInfo, "</tr>\n</tfoot>\n"].
+ AllInfo, "</tr>\n",
+ xhtml("","</tfoot>\n")].
not_built(_BaseName,_LogDir,_All,[]) ->
0;
@@ -1368,6 +1431,19 @@ index_header(Label, StartTime) ->
format_time(StartTime),
{[],[1],[2,3,4,5]})
end,
+ Cover =
+ case filelib:is_regular(?abs(?coverlog_name)) of
+ true ->
+ xhtml(["<p><a href=\"",?coverlog_name,
+ "\">Cover Log</a></p><br>\n"],
+ ["<br />"
+ "<div id=\"button_holder\" class=\"btn\">\n"
+ "<a href=\"",?coverlog_name,
+ "\">COVER LOG</a>\n</div><br /><br />"]);
+ false ->
+ xhtml("<br>\n", "<br /><br /><br />\n")
+ end,
+
[Head |
["<center>\n",
xhtml(["<p><a href=\"",?ct_log_name,
@@ -1375,8 +1451,8 @@ index_header(Label, StartTime) ->
["<br />"
"<div id=\"button_holder\" class=\"btn\">\n"
"<a href=\"",?ct_log_name,
- "\">COMMON TEST FRAMEWORK LOG</a>\n</div>"]),
- xhtml("<br>\n", "<br /><br /><br />\n"),
+ "\">COMMON TEST FRAMEWORK LOG</a>\n</div><br>\n"]),
+ Cover,
xhtml(["<table border=\"3\" cellpadding=\"5\" "
"bgcolor=\"",?table_color3,"\">\n"],
["<table id=\"",?sortable_table_name,"\">\n",
@@ -1519,7 +1595,8 @@ all_suites_index_footer() ->
xhtml("<br><br>\n", "<br /><br />\n") | footer()].
all_runs_index_footer() ->
- ["</tbody>\n</table>\n",
+ [xhtml("", "</tbody>\n"),
+ "</table>\n",
"</center>\n",
xhtml("<br><br>\n", "<br /><br />\n") | footer()].
@@ -1676,7 +1753,7 @@ config_table(Vars) ->
config_table_header() ->
[
xhtml(["<h2>Configuration</h2>\n"
- "<table border=\"3\" cellpadding=\"5\" bgcolor=\"",?table_color1,"\"\n"],
+ "<table border=\"3\" cellpadding=\"5\" bgcolor=\"",?table_color1,"\">\n"],
["<h4>CONFIGURATION</h4>\n",
"<table id=\"",?sortable_table_name,"\">\n",
"<thead>\n"]),
@@ -1692,7 +1769,7 @@ config_table1([{Key,Value}|Vars]) ->
"<td>", io_lib:format("~p",[Value]), "</td>\n</tr>\n"]) |
config_table1(Vars)];
config_table1([]) ->
- ["</tbody>\n</table>\n"].
+ [xhtml("","</tbody>\n"),"</table>\n"].
make_all_runs_index(When) ->
@@ -1828,6 +1905,18 @@ sort_all_runs(Dirs) ->
{Date1,HH1,MM1,SS1} > {Date2,HH2,MM2,SS2}
end, Dirs).
+sort_ct_runs(Dirs) ->
+ %% Directory naming: <Prefix>.NodeName.Date_Time[/...]
+ %% Sort on Date_Time string: "YYYY-MM-DD_HH.MM.SS"
+ lists:sort(
+ fun(Dir1,Dir2) ->
+ [SS1,MM1,DateHH1 | _] =
+ lists:reverse(string:tokens(filename:dirname(Dir1),[$.])),
+ [SS2,MM2,DateHH2 | _] =
+ lists:reverse(string:tokens(filename:dirname(Dir2),[$.])),
+ {DateHH1,MM1,SS1} =< {DateHH2,MM2,SS2}
+ end, Dirs).
+
dir_diff_all_runs(Dirs, LogCache) ->
case LogCache#log_cache.all_runs of
[] ->
@@ -1842,14 +1931,27 @@ dir_diff_all_runs(LogDirs=[Dir|Dirs], Cached=[CElem|CElems],
LatestInCache, AllRunsDirs) ->
DirDate = datestr_from_dirname(Dir),
if DirDate > LatestInCache ->
- %% Dir is a new run entry
+ %% Dir is a new run entry (not cached)
dir_diff_all_runs(Dirs, Cached, LatestInCache,
[Dir|AllRunsDirs]);
DirDate == LatestInCache, CElems /= [] ->
- %% Dir is an existing run entry
+ %% Dir is an existing (cached) run entry
+
+ %% Only add the cached element instead of Dir if the totals
+ %% are "non-empty" (a test might be executing on a different
+ %% node and results haven't been saved yet)
+ ElemToAdd =
+ case CElem of
+ {_CDir,{_NodeStr,_Label,_Logs,{0,0,0,0,0}},_IxLink} ->
+ %% "empty" element in cache - this could be an
+ %% incomplete test and should be checked again
+ Dir;
+ _ ->
+ CElem
+ end,
dir_diff_all_runs(Dirs, CElems,
datestr_from_dirname(element(1,hd(CElems))),
- [CElem|AllRunsDirs]);
+ [ElemToAdd|AllRunsDirs]);
DirDate == LatestInCache, CElems == [] ->
%% we're done, Dirs must all be new
lists:reverse(Dirs)++[CElem|AllRunsDirs];
@@ -2127,7 +2229,8 @@ make_all_suites_index(When) when is_atom(When) ->
end
end,
- LogDirs = filelib:wildcard(logdir_prefix()++".*/*"++?logdir_ext),
+ Wildcard = logdir_prefix()++".*/*"++?logdir_ext,
+ LogDirs = sort_ct_runs(filelib:wildcard(Wildcard)),
LogCacheInfo = get_cache_data(UseCache),
@@ -3120,12 +3223,11 @@ html_encoding(latin1) ->
html_encoding(utf8) ->
"utf-8".
-unexpected_io(Pid,ct_internal,_Importance,List,State) ->
- IoFun = create_io_fun(Pid,State),
- io:format(State#logger_state.ct_log_fd, "~ts",
- [lists:foldl(IoFun, [], List)]);
-unexpected_io(Pid,_Category,_Importance,List,State) ->
- IoFun = create_io_fun(Pid,State),
+unexpected_io(Pid,ct_internal,_Importance,List,CtLogFd) ->
+ IoFun = create_io_fun(Pid,CtLogFd),
+ io:format(CtLogFd, "~ts", [lists:foldl(IoFun, [], List)]);
+unexpected_io(Pid,_Category,_Importance,List,CtLogFd) ->
+ IoFun = create_io_fun(Pid,CtLogFd),
Data = io_lib:format("~ts", [lists:foldl(IoFun, [], List)]),
test_server_io:print_unexpected(Data),
ok.
diff --git a/lib/common_test/src/ct_master.erl b/lib/common_test/src/ct_master.erl
index b42ff73846..2cdb259899 100644
--- a/lib/common_test/src/ct_master.erl
+++ b/lib/common_test/src/ct_master.erl
@@ -25,6 +25,7 @@
-export([run/1,run/3,run/4]).
-export([run_on_node/2,run_on_node/3]).
-export([run_test/1,run_test/2]).
+-export([get_event_mgr_ref/0]).
-export([basic_html/1]).
-export([abort/0,abort/1,progress/0]).
@@ -292,6 +293,18 @@ progress() ->
call(progress).
%%%-----------------------------------------------------------------
+%%% @spec get_event_mgr_ref() -> MasterEvMgrRef
+%%% MasterEvMgrRef = atom()
+%%%
+%%% @doc <p>Call this function in order to get a reference to the
+%%% CT master event manager. The reference can be used to e.g.
+%%% add a user specific event handler while tests are running.
+%%% Example:
+%%% <c>gen_event:add_handler(ct_master:get_event_mgr_ref(), my_ev_h, [])</c></p>
+get_event_mgr_ref() ->
+ ?CT_MEVMGR_REF.
+
+%%%-----------------------------------------------------------------
%%% @spec basic_html(Bool) -> ok
%%% Bool = true | false
%%%
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index 64fe8b4bb0..80ffb51ab9 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -1,7 +1,7 @@
%%----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -172,6 +172,7 @@
only_open/2,
hello/1,
hello/2,
+ hello/3,
close_session/1,
close_session/2,
kill_session/2,
@@ -212,11 +213,7 @@
%%----------------------------------------------------------------------
%% Exported types
%%----------------------------------------------------------------------
--export_type([hook_options/0,
- conn_mod/0,
- log_type/0,
- key_or_name/0,
- notification/0]).
+-export_type([notification/0]).
%%----------------------------------------------------------------------
%% Internal exports
@@ -292,19 +289,11 @@
%%----------------------------------------------------------------------
%% Type declarations
%%----------------------------------------------------------------------
--type client() :: handle() | server_id() | target_name().
+-type client() :: handle() | ct_gen_conn:server_id() | ct_gen_conn:target_name().
-type handle() :: term().
%% An opaque reference for a connection (netconf session). See {@link
%% ct} for more information.
--type server_id() :: atom().
-%% A `ServerId' which exists in a configuration file.
--type target_name() :: atom().
-%% A name which is associated to a `server_id()' via a
-%% `require' statement or a call to {@link ct:require/2} in the
-%% test suite.
--type key_or_name() :: server_id() | target_name().
-
-type options() :: [option()].
%% Options used for setting up ssh connection to a netconf server.
@@ -326,14 +315,7 @@
%% See XML Schema for Event Notifications found in RFC5277 for further
%% detail about the data format for the string values.
--type hook_options() :: [hook_option()].
-%% Options that can be given to `cth_conn_log' in the `ct_hook' statement.
--type hook_option() :: {log_type,log_type()} |
- {hosts,[key_or_name()]}.
--type log_type() :: raw | pretty | html | silent.
%-type error_handler() :: module().
--type conn_mod() :: ct_netconfc.
-
-type error_reason() :: term().
-type simple_xml() :: {xml_tag(), xml_attributes(), xml_content()} |
@@ -384,7 +366,7 @@ open(Options) ->
%%----------------------------------------------------------------------
-spec open(KeyOrName, ExtraOptions) -> Result when
- KeyOrName :: key_or_name(),
+ KeyOrName :: ct_gen_conn:key_or_name(),
ExtraOptions :: options(),
Result :: {ok,handle()} | {error,error_reason()}.
%% @doc Open a named netconf session and exchange `hello' messages.
@@ -461,7 +443,7 @@ only_open(Options) ->
%%----------------------------------------------------------------------
-spec only_open(KeyOrName,ExtraOptions) -> Result when
- KeyOrName :: key_or_name(),
+ KeyOrName :: ct_gen_conn:key_or_name(),
ExtraOptions :: options(),
Result :: {ok,handle()} | {error,error_reason()}.
%% @doc Open a name netconf session, but don't send `hello'.
@@ -475,23 +457,35 @@ only_open(KeyOrName, ExtraOpts) ->
%%----------------------------------------------------------------------
%% @spec hello(Client) -> Result
-%% @equiv hello(Client, infinity)
+%% @equiv hello(Client, [], infinity)
hello(Client) ->
- hello(Client,?DEFAULT_TIMEOUT).
+ hello(Client,[],?DEFAULT_TIMEOUT).
%%----------------------------------------------------------------------
-spec hello(Client,Timeout) -> Result when
Client :: handle(),
Timeout :: timeout(),
Result :: ok | {error,error_reason()}.
+%% @spec hello(Client, Timeout) -> Result
+%% @equiv hello(Client, [], Timeout)
+hello(Client,Timeout) ->
+ hello(Client,[],Timeout).
+
+%%----------------------------------------------------------------------
+-spec hello(Client,Options,Timeout) -> Result when
+ Client :: handle(),
+ Options :: [{capability, [string()]}],
+ Timeout :: timeout(),
+ Result :: ok | {error,error_reason()}.
%% @doc Exchange `hello' messages with the server.
%%
-%% Sends a `hello' message to the server and waits for the return.
-%%
+%% Adds optional capabilities and sends a `hello' message to the
+%% server and waits for the return.
%% @end
%%----------------------------------------------------------------------
-hello(Client,Timeout) ->
- call(Client, {hello, Timeout}).
+hello(Client,Options,Timeout) ->
+ call(Client, {hello, Options, Timeout}).
+
%%----------------------------------------------------------------------
%% @spec get_session_id(Client) -> Result
@@ -555,7 +549,7 @@ send(Client, SimpleXml) ->
Client :: client(),
SimpleXml :: simple_xml(),
Timeout :: timeout(),
- Result :: ok | {error,error_reason()}.
+ Result :: simple_xml() | {error,error_reason()}.
%% @doc Send an XML document to the server.
%%
%% The given XML document is sent as is to the server. This function
@@ -575,7 +569,7 @@ send_rpc(Client, SimpleXml) ->
Client :: client(),
SimpleXml :: simple_xml(),
Timeout :: timeout(),
- Result :: ok | {error,error_reason()}.
+ Result :: [simple_xml()] | {error,error_reason()}.
%% @doc Send a Netconf <code>rpc</code> request to the server.
%%
%% The given XML document is wrapped in a valid Netconf
@@ -654,7 +648,7 @@ get(Client, Filter) ->
Client :: client(),
Filter :: simple_xml() | xpath(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
+ Result :: {ok,[simple_xml()]} | {error,error_reason()}.
%% @doc Get data.
%%
%% This operation returns both configuration and state data from the
@@ -680,7 +674,7 @@ get_config(Client, Source, Filter) ->
Source :: netconf_db(),
Filter :: simple_xml() | xpath(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
+ Result :: {ok,[simple_xml()]} | {error,error_reason()}.
%% @doc Get configuration data.
%%
%% To be able to access another source than `running', the server
@@ -778,8 +772,9 @@ action(Client,Action) ->
Client :: client(),
Action :: simple_xml(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
-%% @doc Execute an action.
+ Result :: ok | {ok,[simple_xml()]} | {error,error_reason()}.
+%% @doc Execute an action. If the return type is void, <c>ok</c> will
+%% be returned instead of <c>{ok,[simple_xml()]}</c>.
%%
%% @end
%%----------------------------------------------------------------------
@@ -1058,9 +1053,9 @@ terminate(_, #state{connection=Connection}) ->
ok.
%% @private
-handle_msg({hello,Timeout}, From,
+handle_msg({hello, Options, Timeout}, From,
#state{connection=Connection,hello_status=HelloStatus} = State) ->
- case do_send(Connection, client_hello()) of
+ case do_send(Connection, client_hello(Options)) of
ok ->
case HelloStatus of
undefined ->
@@ -1136,7 +1131,9 @@ handle_msg({Ref,timeout},#state{pending=Pending} = State) ->
close_session -> stop;
_ -> noreply
end,
- {R,State#state{pending=Pending1}}.
+ %% Halfhearted try to get in correct state, this matches
+ %% the implementation before this patch
+ {R,State#state{pending=Pending1, buff= <<>>}}.
%% @private
%% Called by ct_util_server to close registered connections before terminate.
@@ -1240,10 +1237,14 @@ set_request_timer(T) ->
%%%-----------------------------------------------------------------
-client_hello() ->
+client_hello(Options) when is_list(Options) ->
+ UserCaps = [{capability, UserCap} ||
+ {capability, UserCap} <- Options,
+ is_list(hd(UserCap))],
{hello, ?NETCONF_NAMESPACE_ATTR,
[{capabilities,
- [{capability,[?NETCONF_BASE_CAP++?NETCONF_BASE_CAP_VSN]}]}]}.
+ [{capability,[?NETCONF_BASE_CAP++?NETCONF_BASE_CAP_VSN]}|
+ UserCaps]}]}.
%%%-----------------------------------------------------------------
@@ -1326,72 +1327,54 @@ to_xml_doc(Simple) ->
%%%-----------------------------------------------------------------
%%% Parse and handle received XML data
-handle_data(NewData,#state{connection=Connection,buff=Buff} = State) ->
+handle_data(NewData,#state{connection=Connection,buff=Buff0} = State0) ->
log(Connection,recv,NewData),
- Data = <<Buff/binary,NewData/binary>>,
- case xmerl_sax_parser:stream(<<>>,
- [{continuation_fun,fun sax_cont/1},
- {continuation_state,{Data,Connection,false}},
- {event_fun,fun sax_event/3},
- {event_state,[]}]) of
- {ok, Simple, Rest} ->
- decode(Simple,State#state{buff=Rest});
- {fatal_error,_Loc,Reason,_EndTags,_EventState} ->
- ?error(Connection#connection.name,[{parse_error,Reason},
- {buffer,Buff},
- {new_data,NewData}]),
- case Reason of
- {could_not_fetch_data,Msg} ->
- handle_msg(Msg,State#state{buff = <<>>});
- _Other ->
- Pending1 =
- case State#state.pending of
- [] ->
- [];
- Pending ->
- %% Assuming the first request gets the
- %% first answer
- P=#pending{tref=TRef,caller=Caller} =
- lists:last(Pending),
- timer:cancel(TRef),
- Reason1 = {failed_to_parse_received_data,Reason},
- ct_gen_conn:return(Caller,{error,Reason1}),
- lists:delete(P,Pending)
- end,
- {noreply,State#state{pending=Pending1,buff = <<>>}}
- end
- end.
-
-%%%-----------------------------------------------------------------
-%%% Parsing of XML data
-%% Contiuation function for the sax parser
-sax_cont(done) ->
- {<<>>,done};
-sax_cont({Data,Connection,false}) ->
+ Data = append_wo_initial_nl(Buff0,NewData),
case binary:split(Data,[?END_TAG],[]) of
- [All] ->
- %% No end tag found. Remove what could be a part
- %% of an end tag from the data and save for next
- %% iteration
- SafeSize = size(All)-5,
- <<New:SafeSize/binary,Save:5/binary>> = All,
- {New,{Save,Connection,true}};
- [_Msg,_Rest]=Msgs ->
- %% We have at least one full message. Any excess data will
- %% be returned from xmerl_sax_parser:stream/2 in the Rest
- %% parameter.
- {list_to_binary(Msgs),done}
- end;
-sax_cont({Data,Connection,true}) ->
- case ssh_receive_data() of
- {ok,Bin} ->
- log(Connection,recv,Bin),
- sax_cont({<<Data/binary,Bin/binary>>,Connection,false});
- {error,Reason} ->
- throw({could_not_fetch_data,Reason})
+ [_NoEndTagFound] ->
+ {noreply, State0#state{buff=Data}};
+ [FirstMsg,Buff1] ->
+ SaxArgs = [{event_fun,fun sax_event/3}, {event_state,[]}],
+ case xmerl_sax_parser:stream(FirstMsg, SaxArgs) of
+ {ok, Simple, _Thrash} ->
+ case decode(Simple, State0#state{buff=Buff1}) of
+ {noreply, #state{buff=Buff} = State} when Buff =/= <<>> ->
+ %% Recurse if we have more data in buffer
+ handle_data(<<>>, State);
+ Other ->
+ Other
+ end;
+ {fatal_error,_Loc,Reason,_EndTags,_EventState} ->
+ ?error(Connection#connection.name,
+ [{parse_error,Reason},
+ {buffer, Buff0},
+ {new_data,NewData}]),
+ handle_error(Reason, State0#state{buff= <<>>})
+ end
end.
-
+%% xml does not accept a leading nl and some netconf server add a nl after
+%% each ?END_TAG, ignore them
+append_wo_initial_nl(<<>>,NewData) -> NewData;
+append_wo_initial_nl(<<"\n", Data/binary>>, NewData) ->
+ append_wo_initial_nl(Data, NewData);
+append_wo_initial_nl(Data, NewData) ->
+ <<Data/binary, NewData/binary>>.
+
+handle_error(Reason, State) ->
+ Pending1 = case State#state.pending of
+ [] -> [];
+ Pending ->
+ %% Assuming the first request gets the
+ %% first answer
+ P=#pending{tref=TRef,caller=Caller} =
+ lists:last(Pending),
+ _ = timer:cancel(TRef),
+ Reason1 = {failed_to_parse_received_data,Reason},
+ ct_gen_conn:return(Caller,{error,Reason1}),
+ lists:delete(P,Pending)
+ end,
+ {noreply, State#state{pending=Pending1}}.
%% Event function for the sax parser. It builds a simple XML structure.
%% Care is taken to keep namespace attributes and prefixes as in the original XML.
@@ -1473,7 +1456,7 @@ decode({Tag,Attrs,_}=E, #state{connection=Connection,pending=Pending}=State) ->
{noreply,State#state{hello_status = {error,Reason}}}
end;
#pending{tref=TRef,caller=Caller} ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
case decode_hello(E) of
{ok,SessionId,Capabilities} ->
ct_gen_conn:return(Caller,ok),
@@ -1501,7 +1484,7 @@ decode({Tag,Attrs,_}=E, #state{connection=Connection,pending=Pending}=State) ->
case [P || P = #pending{msg_id=undefined,op=undefined} <- Pending] of
[#pending{tref=TRef,
caller=Caller}] ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
ct_gen_conn:return(Caller,E),
{noreply,State#state{pending=[]}};
_ ->
@@ -1523,7 +1506,7 @@ get_msg_id(Attrs) ->
decode_rpc_reply(MsgId,{_,Attrs,Content0}=E,#state{pending=Pending} = State) ->
case lists:keytake(MsgId,#pending.msg_id,Pending) of
{value, #pending{tref=TRef,op=Op,caller=Caller}, Pending1} ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
Content = forward_xmlns_attr(Attrs,Content0),
{CallerReply,{ServerReply,State2}} =
do_decode_rpc_reply(Op,Content,State#state{pending=Pending1}),
@@ -1538,7 +1521,7 @@ decode_rpc_reply(MsgId,{_,Attrs,Content0}=E,#state{pending=Pending} = State) ->
msg_id=undefined,
op=undefined,
caller=Caller}] ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
ct_gen_conn:return(Caller,E),
{noreply,State#state{pending=[]}};
_ ->
@@ -1589,6 +1572,9 @@ decode_ok(Other) ->
decode_data([{Tag,Attrs,Content}]) ->
case get_local_name_atom(Tag) of
+ ok ->
+ %% when action has return type void
+ ok;
data ->
%% Since content of data has nothing from the netconf
%% namespace, we remove the parent's xmlns attribute here
@@ -1851,16 +1837,6 @@ get_tag([]) ->
%%%-----------------------------------------------------------------
%%% SSH stuff
-ssh_receive_data() ->
- receive
- {ssh_cm, CM, {data, Ch, _Type, Data}} ->
- ssh_connection:adjust_window(CM,Ch,size(Data)),
- {ok, Data};
- {ssh_cm, _CM, {Closed, _Ch}} = X when Closed == closed; Closed == eof ->
- {error,X};
- {_Ref,timeout} = X ->
- {error,X}
- end.
ssh_open(#options{host=Host,timeout=Timeout,port=Port,ssh=SshOpts,name=Name}) ->
case ssh:connect(Host, Port,
@@ -1877,14 +1853,13 @@ ssh_open(#options{host=Host,timeout=Timeout,port=Port,ssh=SshOpts,name=Name}) ->
name = Name}};
failure ->
ssh:close(CM),
- {error,{ssh,could_not_execute_netconf_subsystem}}
+ {error,{ssh,could_not_execute_netconf_subsystem}};
+ {error,timeout} ->
+ {error,{ssh,could_not_execute_netconf_subsystem,timeout}}
end;
{error, Reason} ->
ssh:close(CM),
- {error,{ssh,could_not_open_channel,Reason}};
- Other ->
- %% Bug in ssh?? got {closed,0} here once...
- {error,{ssh,unexpected_from_session_channel,Other}}
+ {error,{ssh,could_not_open_channel,Reason}}
end;
{error,Reason} ->
{error,{ssh,could_not_connect_to_server,Reason}}
diff --git a/lib/common_test/src/ct_property_test.erl b/lib/common_test/src/ct_property_test.erl
new file mode 100644
index 0000000000..52acda5388
--- /dev/null
+++ b/lib/common_test/src/ct_property_test.erl
@@ -0,0 +1,186 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% WARNING %%%
+%%% %%%
+%%% This is experimental code which may be changed or removed %%%
+%%% anytime without any warning. %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%% @doc EXPERIMENTAL support in common-test for calling property based tests.
+%%%
+%%% <p>This module is a first step towards running Property Based testing in the
+%%% Common Test framework. A property testing tool like QuickCheck or PropEr is
+%%% assumed to be installed.</p>
+%%%
+%%% <p>The idea is to have a common_test testsuite calling a property testing
+%%% tool with special property test suites as defined by that tool. In this manual
+%%% we assume the usual Erlang Application directory structure. The tests are
+%%% collected in the application's <c>test</c> directory. The test directory
+%%% has a sub-directory called <c>property_test</c> where everything needed for
+%%% the property tests are collected.</p>
+%%%
+%%% <p>A typical ct test suite using <c>ct_property_test</c> is organized as follows:
+%%% </p>
+%%% ```
+%%% -include_lib("common_test/include/ct.hrl").
+%%%
+%%% all() -> [prop_ftp_case].
+%%%
+%%% init_per_suite(Config) ->
+%%% ct_property_test:init_per_suite(Config).
+%%%
+%%% %%%---- test case
+%%% prop_ftp_case(Config) ->
+%%% ct_property_test:quickcheck(
+%%% ftp_simple_client_server:prop_ftp(Config),
+%%% Config
+%%% ).
+%%% '''
+%%%
+%%% <warning>
+%%% <p>
+%%% This is experimental code which may be changed or removed
+%%% anytime without any warning.
+%%% </p>
+%%% </warning>
+%%%
+%%% @end
+
+-module(ct_property_test).
+
+%% API
+-export([init_per_suite/1,
+ quickcheck/2]).
+
+-include_lib("common_test/include/ct.hrl").
+
+%%%-----------------------------------------------------------------
+%%% @spec init_per_suite(Config) -> Config | {skip,Reason}
+%%%
+%%% @doc Initializes Config for property testing.
+%%%
+%%% <p>The function investigates if support is available for either Quickcheck, PropEr,
+%%% or Triq.
+%%% The options <c>{property_dir,AbsPath}</c> and
+%%% <c>{property_test_tool,Tool}</c> is set in the Config returned.</p>
+%%% <p>The function is intended to be called in the init_per_suite in the test suite.</p>
+%%% <p>The property tests are assumed to be in the subdirectory <c>property_test</c>.</p>
+%%% @end
+
+init_per_suite(Config) ->
+ case which_module_exists([eqc,proper,triq]) of
+ {ok,ToolModule} ->
+ ct:pal("Found property tester ~p",[ToolModule]),
+ Path = property_tests_path("property_test", Config),
+ case compile_tests(Path,ToolModule) of
+ error ->
+ {fail, "Property test compilation failed in "++Path};
+ up_to_date ->
+ add_code_pathz(Path),
+ [{property_dir,Path},
+ {property_test_tool,ToolModule} | Config]
+ end;
+
+ not_found ->
+ ct:pal("No property tester found",[]),
+ {skip, "No property testing tool found"}
+ end.
+
+%%%-----------------------------------------------------------------
+%%% @spec quickcheck(Property, Config) -> true | {fail,Reason}
+%%%
+%%% @doc Call quickcheck and return the result in a form suitable for common_test.
+%%%
+%%% <p>The function is intended to be called in the test cases in the test suite.</p>
+%%% @end
+
+quickcheck(Property, Config) ->
+ Tool = proplists:get_value(property_test_tool,Config),
+ F = function_name(quickcheck, Tool),
+ mk_ct_return( Tool:F(Property), Tool ).
+
+
+%%%================================================================
+%%%
+%%% Local functions
+%%%
+
+%%% Make return values back to the calling Common Test suite
+mk_ct_return(true, _Tool) ->
+ true;
+mk_ct_return(Other, Tool) ->
+ try lists:last(hd(Tool:counterexample()))
+ of
+ {set,{var,_},{call,M,F,Args}} ->
+ {fail, io_lib:format("~p:~p/~p returned bad result",[M,F,length(Args)])}
+ catch
+ _:_ ->
+ {fail, Other}
+ end.
+
+%%% Check if a property testing tool is found
+which_module_exists([Module|Modules]) ->
+ case module_exists(Module) of
+ true -> {ok,Module};
+ false -> which_module_exists(Modules)
+ end;
+which_module_exists(_) ->
+ not_found.
+
+module_exists(Module) ->
+ is_list(catch Module:module_info()).
+
+%%% The path to the property tests
+property_tests_path(Dir, Config) ->
+ DataDir = proplists:get_value(data_dir, Config),
+ filename:join(lists:droplast(filename:split(DataDir))++[Dir]).
+
+%%% Extend the code path with Dir if it not already present
+add_code_pathz(Dir) ->
+ case lists:member(Dir, code:get_path()) of
+ true -> ok;
+ false -> code:add_pathz(Dir)
+ end.
+
+compile_tests(Path, ToolModule) ->
+ MacroDefs = macro_def(ToolModule),
+ {ok,Cwd} = file:get_cwd(),
+ ok = file:set_cwd(Path),
+ {ok,FileNames} = file:list_dir("."),
+ BeamFiles = [F || F<-FileNames,
+ filename:extension(F) == ".beam"],
+ [file:delete(F) || F<-BeamFiles],
+ ct:pal("Compiling in ~p:~n Deleted ~p~n MacroDefs=~p",[Path,BeamFiles,MacroDefs]),
+ Result = make:all([load|MacroDefs]),
+ file:set_cwd(Cwd),
+ Result.
+
+
+macro_def(eqc) -> [{d, 'EQC'}];
+macro_def(proper) -> [{d, 'PROPER'}];
+macro_def(triq) -> [{d, 'TRIQ'}].
+
+function_name(quickcheck, triq) -> check;
+function_name(F, _) -> F.
+
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index 7c797be03e..be547b443b 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,6 +71,7 @@
enable_builtin_hooks,
include = [],
auto_compile,
+ abort_if_missing_suites,
silent_connections = [],
stylesheet,
multiply_timetraps = 1,
@@ -224,18 +225,24 @@ finish(Tracing, ExitStatus, Args) ->
if ExitStatus == interactive_mode ->
interactive_mode;
true ->
- %% it's possible to tell CT to finish execution with a call
- %% to a different function than the normal halt/1 BIF
- %% (meant to be used mainly for reading the CT exit status)
- case get_start_opt(halt_with,
- fun([HaltMod,HaltFunc]) ->
- {list_to_atom(HaltMod),
- list_to_atom(HaltFunc)} end,
- Args) of
- undefined ->
- halt(ExitStatus);
- {M,F} ->
- apply(M, F, [ExitStatus])
+ case get_start_opt(vts, true, Args) of
+ true ->
+ %% VTS mode, don't halt the node
+ ok;
+ _ ->
+ %% it's possible to tell CT to finish execution with a call
+ %% to a different function than the normal halt/1 BIF
+ %% (meant to be used mainly for reading the CT exit status)
+ case get_start_opt(halt_with,
+ fun([HaltMod,HaltFunc]) ->
+ {list_to_atom(HaltMod),
+ list_to_atom(HaltFunc)} end,
+ Args) of
+ undefined ->
+ halt(ExitStatus);
+ {M,F} ->
+ apply(M, F, [ExitStatus])
+ end
end
end.
@@ -243,12 +250,14 @@ script_start1(Parent, Args) ->
%% read general start flags
Label = get_start_opt(label, fun([Lbl]) -> Lbl end, Args),
Profile = get_start_opt(profile, fun([Prof]) -> Prof end, Args),
- Vts = get_start_opt(vts, true, Args),
+ Vts = get_start_opt(vts, true, undefined, Args),
Shell = get_start_opt(shell, true, Args),
Cover = get_start_opt(cover, fun([CoverFile]) -> ?abs(CoverFile) end, Args),
- CoverStop = get_start_opt(cover_stop, fun([CS]) -> list_to_atom(CS) end, Args),
+ CoverStop = get_start_opt(cover_stop,
+ fun([CS]) -> list_to_atom(CS) end, Args),
LogDir = get_start_opt(logdir, fun([LogD]) -> LogD end, Args),
- LogOpts = get_start_opt(logopts, fun(Os) -> [list_to_atom(O) || O <- Os] end,
+ LogOpts = get_start_opt(logopts,
+ fun(Os) -> [list_to_atom(O) || O <- Os] end,
[], Args),
Verbosity = verbosity_args2opts(Args),
MultTT = get_start_opt(multiply_timetraps,
@@ -290,10 +299,10 @@ script_start1(Parent, Args) ->
application:set_env(common_test, auto_compile, true),
InclDirs =
case proplists:get_value(include, Args) of
- Incl when is_list(hd(Incl)) ->
- Incl;
+ Incls when is_list(hd(Incls)) ->
+ [filename:absname(IDir) || IDir <- Incls];
Incl when is_list(Incl) ->
- [Incl];
+ [filename:absname(Incl)];
undefined ->
[]
end,
@@ -311,6 +320,12 @@ script_start1(Parent, Args) ->
application:set_env(common_test, auto_compile, false),
{false,[]}
end,
+
+ %% abort test run if some suites can't be compiled
+ AbortIfMissing = get_start_opt(abort_if_missing_suites,
+ fun([]) -> true;
+ ([Bool]) -> list_to_atom(Bool)
+ end, false, Args),
%% silent connections
SilentConns =
get_start_opt(silent_connections,
@@ -321,8 +336,8 @@ script_start1(Parent, Args) ->
Stylesheet = get_start_opt(stylesheet,
fun([SS]) -> ?abs(SS) end, Args),
%% basic_html - used by ct_logs
- BasicHtml = case proplists:get_value(basic_html, Args) of
- undefined ->
+ BasicHtml = case {Vts,proplists:get_value(basic_html, Args)} of
+ {undefined,undefined} ->
application:set_env(common_test, basic_html, false),
undefined;
_ ->
@@ -347,6 +362,7 @@ script_start1(Parent, Args) ->
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = IncludeDirs,
silent_connections = SilentConns,
stylesheet = Stylesheet,
@@ -354,9 +370,10 @@ script_start1(Parent, Args) ->
scale_timetraps = ScaleTT,
create_priv_dir = CreatePrivDir,
starter = script},
-
+
%% check if log files should be refreshed or go on to run tests...
Result = run_or_refresh(Opts, Args),
+
%% send final results to starting process waiting in script_start/0
Parent ! {self(), Result}.
@@ -551,6 +568,9 @@ combine_test_opts(TS, Specs, Opts) ->
ACBool
end,
+ AbortIfMissing = choose_val(Opts#opts.abort_if_missing_suites,
+ TSOpts#opts.abort_if_missing_suites),
+
BasicHtml =
case choose_val(Opts#opts.basic_html,
TSOpts#opts.basic_html) of
@@ -578,6 +598,7 @@ combine_test_opts(TS, Specs, Opts) ->
enable_builtin_hooks = EnableBuiltinHooks,
stylesheet = Stylesheet,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = AllInclude,
multiply_timetraps = MultTT,
scale_timetraps = ScaleTT,
@@ -743,23 +764,10 @@ script_start4(Opts = #opts{tests = Tests}, Args) ->
%%% @doc Print usage information for <code>ct_run</code>.
script_usage() ->
io:format("\n\nUsage:\n\n"),
- io:format("Run tests in web based GUI:\n\n"
- "\tct_run -vts [-browser Browser]"
- "\n\t[-config ConfigFile1 ConfigFile2 .. ConfigFileN]"
- "\n\t[-decrypt_key Key] | [-decrypt_file KeyFile]"
- "\n\t[-dir TestDir1 TestDir2 .. TestDirN] |"
- "\n\t[-suite Suite [-case Case]]"
- "\n\t[-logopts LogOpt1 LogOpt2 .. LogOptN]"
- "\n\t[-verbosity GenVLvl | [CategoryVLvl1 .. CategoryVLvlN]]"
- "\n\t[-include InclDir1 InclDir2 .. InclDirN]"
- "\n\t[-no_auto_compile]"
- "\n\t[-multiply_timetraps N]"
- "\n\t[-scale_timetraps]"
- "\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
- "\n\t[-basic_html]\n\n"),
io:format("Run tests from command line:\n\n"
"\tct_run [-dir TestDir1 TestDir2 .. TestDirN] |"
- "\n\t[-suite Suite1 Suite2 .. SuiteN [-case Case1 Case2 .. CaseN]]"
+ "\n\t[[-dir TestDir] -suite Suite1 Suite2 .. SuiteN"
+ "\n\t [[-group Groups1 Groups2 .. GroupsN] [-case Case1 Case2 .. CaseN]]]"
"\n\t[-step [config | keep_inactive]]"
"\n\t[-config ConfigFile1 ConfigFile2 .. ConfigFileN]"
"\n\t[-userconfig CallbackModule ConfigFile1 .. ConfigFileN]"
@@ -775,6 +783,7 @@ script_usage() ->
"\n\t[-ct_hooks CTHook1 CTHook2 .. CTHookN]"
"\n\t[-include InclDir1 InclDir2 .. InclDirN]"
"\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
"\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
@@ -799,6 +808,7 @@ script_usage() ->
"\n\t[-ct_hooks CTHook1 CTHook2 .. CTHookN]"
"\n\t[-include InclDir1 InclDir2 .. InclDirN]"
"\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
"\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
@@ -813,7 +823,22 @@ script_usage() ->
io:format("Run CT in interactive mode:\n\n"
"\tct_run -shell"
"\n\t[-config ConfigFile1 ConfigFile2 .. ConfigFileN]"
- "\n\t[-decrypt_key Key] | [-decrypt_file KeyFile]\n\n").
+ "\n\t[-decrypt_key Key] | [-decrypt_file KeyFile]\n\n"),
+ io:format("Run tests in web based GUI:\n\n"
+ "\tct_run -vts [-browser Browser]"
+ "\n\t[-config ConfigFile1 ConfigFile2 .. ConfigFileN]"
+ "\n\t[-decrypt_key Key] | [-decrypt_file KeyFile]"
+ "\n\t[-dir TestDir1 TestDir2 .. TestDirN] |"
+ "\n\t[-suite Suite [-case Case]]"
+ "\n\t[-logopts LogOpt1 LogOpt2 .. LogOptN]"
+ "\n\t[-verbosity GenVLvl | [CategoryVLvl1 .. CategoryVLvlN]]"
+ "\n\t[-include InclDir1 InclDir2 .. InclDirN]"
+ "\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
+ "\n\t[-multiply_timetraps N]"
+ "\n\t[-scale_timetraps]"
+ "\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
+ "\n\t[-basic_html]\n\n").
%%%-----------------------------------------------------------------
%%% @hidden
@@ -1006,10 +1031,10 @@ run_test2(StartOpts) ->
case proplists:get_value(include, StartOpts) of
undefined ->
[];
- Incl when is_list(hd(Incl)) ->
- Incl;
+ Incls when is_list(hd(Incls)) ->
+ [filename:absname(IDir) || IDir <- Incls];
Incl when is_list(Incl) ->
- [Incl]
+ [filename:absname(Incl)]
end,
case os:getenv("CT_INCLUDE_PATH") of
false ->
@@ -1026,6 +1051,10 @@ run_test2(StartOpts) ->
{ACBool,[]}
end,
+ %% abort test run if some suites can't be compiled
+ AbortIfMissing = get_start_opt(abort_if_missing_suites, value, false,
+ StartOpts),
+
%% decrypt config file
case proplists:get_value(decrypt, StartOpts) of
undefined ->
@@ -1067,6 +1096,7 @@ run_test2(StartOpts) ->
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = Include,
silent_connections = SilentConns,
stylesheet = Stylesheet,
@@ -1371,6 +1401,7 @@ run_testspec2(TestSpec) ->
EnvInclude++Opts#opts.include
end,
application:set_env(common_test, include, AllInclude),
+
LogDir1 = which(logdir,Opts#opts.logdir),
case check_and_install_configfiles(
Opts#opts.config, LogDir1, Opts) of
@@ -1401,6 +1432,7 @@ get_data_for_node(#testspec{label = Labels,
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = ACs,
+ abort_if_missing_suites = AiMSs,
include = Incl,
multiply_timetraps = MTs,
scale_timetraps = STs,
@@ -1435,6 +1467,7 @@ get_data_for_node(#testspec{label = Labels,
EvHandlers = [{H,A} || {N,H,A} <- EvHs, N==Node],
FiltCTHooks = [Hook || {N,Hook} <- CTHooks, N==Node],
AutoCompile = proplists:get_value(Node, ACs),
+ AbortIfMissing = proplists:get_value(Node, AiMSs),
Include = [I || {N,I} <- Incl, N==Node],
#opts{label = Label,
profile = Profile,
@@ -1451,6 +1484,7 @@ get_data_for_node(#testspec{label = Labels,
ct_hooks = FiltCTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = Include,
multiply_timetraps = MT,
scale_timetraps = ST,
@@ -1621,7 +1655,7 @@ do_run(Tests, Misc, LogDir, LogOpts) when is_list(Misc),
do_run(Tests, [], Opts#opts{logdir = LogDir}, []);
do_run(Tests, Skip, Opts, Args) when is_record(Opts, opts) ->
- #opts{label = Label, profile = Profile, cover = Cover,
+ #opts{label = Label, profile = Profile,
verbosity = VLvls} = Opts,
%% label - used by ct_logs
TestLabel =
@@ -1645,22 +1679,6 @@ do_run(Tests, Skip, Opts, Args) when is_record(Opts, opts) ->
non_existing ->
{error,no_path_to_test_server};
_ ->
- Opts1 = if Cover == undefined ->
- Opts;
- true ->
- case ct_cover:get_spec(Cover) of
- {error,Reason} ->
- exit({error,Reason});
- CoverSpec ->
- CoverStop =
- case Opts#opts.cover_stop of
- undefined -> true;
- Stop -> Stop
- end,
- Opts#opts{coverspec = CoverSpec,
- cover_stop = CoverStop}
- end
- end,
%% This env variable is used by test_server to determine
%% which framework it runs under.
case os:getenv("TEST_SERVER_FRAMEWORK") of
@@ -1686,7 +1704,7 @@ do_run(Tests, Skip, Opts, Args) when is_record(Opts, opts) ->
_Pid ->
ct_util:set_testdata({starter,Opts#opts.starter}),
compile_and_run(Tests, Skip,
- Opts1#opts{verbosity=Verbosity}, Args)
+ Opts#opts{verbosity=Verbosity}, Args)
end
end.
@@ -1722,8 +1740,8 @@ compile_and_run(Tests, Skip, Opts, Args) ->
{SuiteErrs,HelpErrs} = auto_compile(TestSuites),
{TestSuites,SuiteErrs,SuiteErrs++HelpErrs}
end,
-
- case continue(AllMakeErrors) of
+
+ case continue(AllMakeErrors, Opts#opts.abort_if_missing_suites) of
true ->
SavedErrors = save_make_errors(SuiteMakeErrors),
ct_repeat:log_loop_info(Args),
@@ -2047,9 +2065,9 @@ final_skip([Skip|Skips], Final) ->
final_skip([], Final) ->
lists:reverse(Final).
-continue([]) ->
+continue([], _) ->
true;
-continue(_MakeErrors) ->
+continue(_MakeErrors, AbortIfMissingSuites) ->
io:nl(),
OldGl = group_leader(),
case set_group_leader_same_as_shell() of
@@ -2077,26 +2095,26 @@ continue(_MakeErrors) ->
true
end;
false -> % no shell process to use
- true
+ not AbortIfMissingSuites
end.
set_group_leader_same_as_shell() ->
%%! Locate the shell process... UGLY!!!
GS2or3 = fun(P) ->
- case process_info(P,initial_call) of
- {initial_call,{group,server,X}} when X == 2 ; X == 3 ->
- true;
- _ ->
- false
- end
- end,
+ case process_info(P,initial_call) of
+ {initial_call,{group,server,X}} when X == 2 ; X == 3 ->
+ true;
+ _ ->
+ false
+ end
+ end,
case [P || P <- processes(), GS2or3(P),
- true == lists:keymember(shell,1,
- element(2,process_info(P,dictionary)))] of
- [GL|_] ->
- group_leader(GL, self());
- [] ->
- false
+ true == lists:keymember(shell,1,
+ element(2,process_info(P,dictionary)))] of
+ [GL|_] ->
+ group_leader(GL, self());
+ [] ->
+ false
end.
check_and_add([{TestDir0,M,_} | Tests], Added, PA) ->
@@ -2121,67 +2139,19 @@ check_and_add([{TestDir0,M,_} | Tests], Added, PA) ->
check_and_add([], _, PA) ->
{ok,PA}.
-do_run_test(Tests, Skip, Opts) ->
+do_run_test(Tests, Skip, Opts0) ->
case check_and_add(Tests, [], []) of
{ok,AddedToPath} ->
ct_util:set_testdata({stats,{0,0,{0,0}}}),
- ct_util:set_testdata({cover,undefined}),
- test_server_ctrl:start_link(local),
- case Opts#opts.coverspec of
- CovData={CovFile,
- CovNodes,
- _CovImport,
- CovExport,
- #cover{app = CovApp,
- level = CovLevel,
- excl_mods = CovExcl,
- incl_mods = CovIncl,
- cross = CovCross,
- src = _CovSrc}} ->
- ct_logs:log("COVER INFO",
- "Using cover specification file: ~ts~n"
- "App: ~w~n"
- "Cross cover: ~w~n"
- "Including ~w modules~n"
- "Excluding ~w modules",
- [CovFile,CovApp,CovCross,
- length(CovIncl),length(CovExcl)]),
-
- %% cover export file will be used for export and import
- %% between tests so make sure it doesn't exist initially
- case filelib:is_file(CovExport) of
- true ->
- DelResult = file:delete(CovExport),
- ct_logs:log("COVER INFO",
- "Warning! "
- "Export file ~ts already exists. "
- "Deleting with result: ~p",
- [CovExport,DelResult]);
- false ->
- ok
- end,
- %% tell test_server which modules should be cover compiled
- %% note that actual compilation is done when tests start
- test_server_ctrl:cover(CovApp, CovFile, CovExcl, CovIncl,
- CovCross, CovExport, CovLevel,
- Opts#opts.cover_stop),
- %% save cover data (used e.g. to add nodes dynamically)
- ct_util:set_testdata({cover,CovData}),
- %% start cover on specified nodes
- if (CovNodes /= []) and (CovNodes /= undefined) ->
- ct_logs:log("COVER INFO",
- "Nodes included in cover "
- "session: ~w",
- [CovNodes]),
- cover:start(CovNodes);
- true ->
- ok
- end,
- true;
- _ ->
- false
- end,
+ %% test_server needs to know the include path too
+ InclPath = case application:get_env(common_test, include) of
+ {ok,Incls} -> Incls;
+ _ -> []
+ end,
+ application:set_env(test_server, include, InclPath),
+
+ test_server_ctrl:start_link(local),
%% let test_server expand the test tuples and count no of cases
{Suites,NoOfCases} = count_test_cases(Tests, Skip),
@@ -2206,24 +2176,31 @@ do_run_test(Tests, Skip, Opts) ->
end,
%% if the verbosity level is set lower than ?STD_IMPORTANCE, tell
%% test_server to ignore stdout printouts to the test case log file
- case proplists:get_value(default, Opts#opts.verbosity) of
+ case proplists:get_value(default, Opts0#opts.verbosity) of
VLvl when is_integer(VLvl), (?STD_IMPORTANCE < (100-VLvl)) ->
test_server_ctrl:reject_io_reqs(true);
_Lower ->
ok
end,
- test_server_ctrl:multiply_timetraps(Opts#opts.multiply_timetraps),
- test_server_ctrl:scale_timetraps(Opts#opts.scale_timetraps),
+ test_server_ctrl:multiply_timetraps(Opts0#opts.multiply_timetraps),
+ test_server_ctrl:scale_timetraps(Opts0#opts.scale_timetraps),
test_server_ctrl:create_priv_dir(choose_val(
- Opts#opts.create_priv_dir,
+ Opts0#opts.create_priv_dir,
auto_per_run)),
+
+ {ok,LogDir} = ct_logs:get_log_dir(true),
+ {TsCoverInfo,Opts} = maybe_start_cover(Opts0, LogDir),
+
ct_event:notify(#event{name=start_info,
node=node(),
data={NoOfTests,NoOfSuites,NoOfCases}}),
CleanUp = add_jobs(Tests, Skip, Opts, []),
unlink(whereis(test_server_ctrl)),
catch test_server_ctrl:wait_finish(),
+
+ maybe_stop_cover(Opts, TsCoverInfo, LogDir),
+
%% check if last testcase has left a "dead" trace window
%% behind, and if so, kill it
case ct_util:get_testdata(interpret) of
@@ -2256,6 +2233,102 @@ do_run_test(Tests, Skip, Opts) ->
exit(Error)
end.
+maybe_start_cover(Opts=#opts{cover=Cover,cover_stop=CoverStop0},LogDir) ->
+ if Cover == undefined ->
+ {undefined,Opts};
+ true ->
+ case ct_cover:get_spec(Cover) of
+ {error,Reason} ->
+ exit({error,Reason});
+ CoverSpec ->
+ CoverStop =
+ case CoverStop0 of
+ undefined -> true;
+ Stop -> Stop
+ end,
+ start_cover(Opts#opts{coverspec=CoverSpec,
+ cover_stop=CoverStop},
+ LogDir)
+ end
+ end.
+
+start_cover(Opts=#opts{coverspec=CovData,cover_stop=CovStop},LogDir) ->
+ {CovFile,
+ CovNodes,
+ CovImport,
+ _CovExport,
+ #cover{app = CovApp,
+ level = CovLevel,
+ excl_mods = CovExcl,
+ incl_mods = CovIncl,
+ cross = CovCross,
+ src = _CovSrc}} = CovData,
+ ct_logs:log("COVER INFO",
+ "Using cover specification file: ~ts~n"
+ "App: ~w~n"
+ "Cross cover: ~w~n"
+ "Including ~w modules~n"
+ "Excluding ~w modules",
+ [CovFile,CovApp,CovCross,
+ length(CovIncl),length(CovExcl)]),
+
+ %% Tell test_server to print a link in its coverlog
+ %% pointing to the real coverlog which will be written in
+ %% maybe_stop_cover/2
+ test_server_ctrl:cover({log,LogDir}),
+
+ %% Cover compile all modules
+ {ok,TsCoverInfo} = test_server_ctrl:cover_compile(CovApp,CovFile,
+ CovExcl,CovIncl,
+ CovCross,CovLevel,
+ CovStop),
+ ct_logs:log("COVER INFO",
+ "Compilation completed - test_server cover info: ~tp",
+ [TsCoverInfo]),
+
+ %% start cover on specified nodes
+ if (CovNodes /= []) and (CovNodes /= undefined) ->
+ ct_logs:log("COVER INFO",
+ "Nodes included in cover "
+ "session: ~w",
+ [CovNodes]),
+ cover:start(CovNodes);
+ true ->
+ ok
+ end,
+ lists:foreach(
+ fun(Imp) ->
+ case cover:import(Imp) of
+ ok ->
+ ok;
+ {error,Reason} ->
+ ct_logs:log("COVER INFO",
+ "Importing cover data from: ~ts fails! "
+ "Reason: ~p", [Imp,Reason])
+ end
+ end, CovImport),
+ {TsCoverInfo,Opts}.
+
+maybe_stop_cover(_,undefined,_) ->
+ ok;
+maybe_stop_cover(#opts{coverspec=CovData},TsCoverInfo,LogDir) ->
+ {_CovFile,
+ _CovNodes,
+ _CovImport,
+ CovExport,
+ _AppData} = CovData,
+ case CovExport of
+ undefined -> ok;
+ _ ->
+ ct_logs:log("COVER INFO","Exporting cover data to ~tp",[CovExport]),
+ cover:export(CovExport)
+ end,
+ ct_logs:log("COVER INFO","Analysing cover data to ~tp",[LogDir]),
+ test_server_ctrl:cover_analyse(TsCoverInfo,LogDir),
+ ct_logs:log("COVER INFO","Analysis completed.",[]),
+ ok.
+
+
delete_dups([S | Suites]) ->
Suites1 = lists:delete(S, Suites),
[S | delete_dups(Suites1)];
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl
index 4092d33bc0..844f53731e 100644
--- a/lib/common_test/src/ct_telnet.erl
+++ b/lib/common_test/src/ct_telnet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,80 +17,166 @@
%% %CopyrightEnd%
%%
-%%% @doc Common Test specific layer on top of telnet client ct_telnet_client.erl
-%%%
-%%% <p>Use this module to set up telnet connections, send commands and
-%%% perform string matching on the result.
-%%% See the <c>unix_telnet</c> manual page for information about how to use
-%%% ct_telnet, and configure connections, specifically for unix hosts.</p>
-%%% <p>The following default values are defined in ct_telnet:</p>
-%%% <pre>
-%%% Connection timeout = 10 sec (time to wait for connection)
-%%% Command timeout = 10 sec (time to wait for a command to return)
-%%% Max no of reconnection attempts = 3
-%%% Reconnection interval = 5 sek (time to wait in between reconnection attempts)
-%%% Keep alive = true (will send NOP to the server every 10 sec if connection is idle)</pre>
-%%% <p>These parameters can be altered by the user with the following
-%%% configuration term:</p>
-%%% <pre>
-%%% {telnet_settings, [{connect_timeout,Millisec},
-%%% {command_timeout,Millisec},
-%%% {reconnection_attempts,N},
-%%% {reconnection_interval,Millisec},
-%%% {keep_alive,Bool}]}.</pre>
-%%% <p><code>Millisec = integer(), N = integer()</code></p>
-%%% <p>Enter the <code>telnet_settings</code> term in a configuration
-%%% file included in the test and ct_telnet will retrieve the information
-%%% automatically. Note that <c>keep_alive</c> may be specified per connection if
-%%% required. See <c>unix_telnet</c> for details.</p></doc>
-
-%%% @type connection_type() = telnet | ts1 | ts2
-
-%%% @type connection() = handle() |
-%%% {ct:target_name(),connection_type()} | ct:target_name()
-
-%%% @type handle() = ct_gen_conn:handle(). Handle for a
-%%% specific telnet connection.
-
-%%% @type prompt_regexp() = string(). A regular expression which
-%%% matches all possible prompts for a specific type of target. The
-%%% regexp must not have any groups i.e. when matching, re:run/3 shall
-%%% return a list with one single element.
-%%%
-%%% @see unix_telnet
+%% @doc Common Test specific layer on top of telnet client `ct_telnet_client.erl'
+%%
+%% <p>Use this module to set up telnet connections, send commands and
+%% perform string matching on the result.
+%% See the `unix_telnet' manual page for information about how to use
+%% `ct_telnet', and configure connections, specifically for unix hosts.</p>
+%% <p>The following default values are defined in `ct_telnet':</p>
+%% <pre>
+%% Connection timeout = 10 sec (time to wait for connection)
+%% Command timeout = 10 sec (time to wait for a command to return)
+%% Max no of reconnection attempts = 3
+%% Reconnection interval = 5 sek (time to wait in between reconnection attempts)
+%% Keep alive = true (will send NOP to the server every 10 sec if connection is idle)
+%% Polling limit = 0 (max number of times to poll to get a remaining string terminated)
+%% Polling interval = 1 sec (sleep time between polls)</pre>
+%% <p>These parameters can be altered by the user with the following
+%% configuration term:</p>
+%% <pre>
+%% {telnet_settings, [{connect_timeout,Millisec},
+%% {command_timeout,Millisec},
+%% {reconnection_attempts,N},
+%% {reconnection_interval,Millisec},
+%% {keep_alive,Bool},
+%% {poll_limit,N},
+%% {poll_interval,Millisec}]}.</pre>
+%% <p><code>Millisec = integer(), N = integer()</code></p>
+%% <p>Enter the <code>telnet_settings</code> term in a configuration
+%% file included in the test and ct_telnet will retrieve the information
+%% automatically. Note that `keep_alive' may be specified per connection if
+%% required. See `unix_telnet' for details.</p>
+%%
+%% == Logging ==
+%%
+%% The default logging behaviour of `ct_telnet' is to print information
+%% to the test case HTML log about performed operations and commands
+%% and their corresponding results. What won't be printed to the HTML log
+%% are text strings sent from the telnet server that are not explicitly
+%% received by means of a `ct_telnet' function such as `expect/3'.
+%% `ct_telnet' may however be configured to use a special purpose event handler,
+%% implemented in `ct_conn_log_h', for logging <b>all</b> telnet traffic.
+%% To use this handler, you need to install a Common Test hook named
+%% `cth_conn_log'. Example (using the test suite info function):
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks, [{cth_conn_log, [{conn_mod(),hook_options()}]}]}].
+%% '''
+%%
+%% `conn_mod()' is the name of the common_test module implementing
+%% the connection protocol, i.e. `ct_telnet'.
+%%
+%% The `cth_conn_log' hook performs unformatted logging of telnet data to
+%% a separate text file. All telnet communication is captured and printed,
+%% including arbitrary data sent from the server. The link to this text file
+%% can be found on the top of the test case HTML log.
+%%
+%% By default, data for all telnet connections is logged in one common
+%% file (named `default'), which might get messy e.g. if multiple telnet
+%% sessions are running in parallel. It is therefore possible to create a
+%% separate log file for each connection. To configure this, use the hook
+%% option `hosts' and list the names of the servers/connections that will be
+%% used in the suite. Note that the connections must be named for this to work
+%% (see the `open' function below).
+%%
+%% The hook option named `log_type' may be used to change the `cth_conn_log'
+%% behaviour. The default value of this option is `raw', which results in the
+%% behaviour described above. If the value is set to `html', all telnet
+%% communication is printed to the test case HTML log instead.
+%%
+%% All `cth_conn_log' hook options described above can also be specified in
+%% a configuration file with the configuration variable `ct_conn_log'. Example:
+%%
+%% ```
+%% {ct_conn_log, [{ct_telnet,[{log_type,raw},
+%% {hosts,[key_or_name()]}]}]}
+%% '''
+%%
+%% <b>Note</b> that hook options specified in a configuration file
+%% will overwrite any hardcoded hook options in the test suite!
+%%
+%% === Logging example ===
+%%
+%% The following `ct_hooks' statement will cause printing of telnet traffic
+%% to separate logs for the connections named `server1' and `server2'.
+%% Traffic for any other connections will be logged in the default telnet log.
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks,
+%% [{cth_conn_log, [{ct_telnet,[{hosts,[server1,server2]}]}]}]}].
+%%'''
+%%
+%% As previously explained, the above specification could also be provided
+%% by means of an entry like this in a configuration file:
+%%
+%% ```
+%% {ct_conn_log, [{ct_telnet,[{hosts,[server1,server2]}]}]}.
+%% '''
+%%
+%% in which case the `ct_hooks' statement in the test suite may simply look
+%% like this:
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks, [{cth_conn_log, []}]}].
+%% '''
+%%
+%% @end
--module(ct_telnet).
+%% @type connection_type() = telnet | ts1 | ts2
+
+%% @type connection() = handle() |
+%% {ct:target_name(),connection_type()} | ct:target_name()
--compile(export_all).
+%% @type handle() = ct_gen_conn:handle(). Handle for a
+%% specific telnet connection.
+
+%% @type prompt_regexp() = string(). A regular expression which
+%% matches all possible prompts for a specific type of target. The
+%% regexp must not have any groups i.e. when matching, re:run/3 shall
+%% return a list with one single element.
+%%
+%% @see unix_telnet
+
+-module(ct_telnet).
-export([open/1, open/2, open/3, open/4, close/1]).
-export([cmd/2, cmd/3, cmdf/3, cmdf/4, get_data/1,
- send/2, sendf/3, expect/2, expect/3]).
+ send/2, send/3, sendf/3, sendf/4,
+ expect/2, expect/3]).
%% Callbacks
-export([init/3,handle_msg/2,reconnect/2,terminate/2]).
%% Tool internals
--export([silent_teln_expect/5, teln_receive_until_prompt/3,
- start_log/1, log/3, cont_log/2, end_log/0,
- try_start_log/1, try_log/3, try_cont_log/2, try_end_log/0]).
-
+-export([silent_teln_expect/6, teln_receive_until_prompt/3,
+ format_data/2]).
+-export([start_gen_log/1, end_gen_log/0, log/3, log/4]).
-define(RECONNS,3).
-define(RECONN_TIMEOUT,5000).
-define(DEFAULT_TIMEOUT,10000).
-define(DEFAULT_PORT,23).
+-define(POLL_LIMIT,0).
+-define(POLL_INTERVAL,1000).
-include("ct_util.hrl").
--record(state,{teln_pid,
+-record(state,{host,
+ port,
+ teln_pid,
prx,
- type,
buffer=[],
prompt=false,
name,
+ type,
target_mod,
keep_alive,
+ poll_limit=?POLL_LIMIT,
+ poll_interval=?POLL_INTERVAL,
extra,
conn_to=?DEFAULT_TIMEOUT,
com_to=?DEFAULT_TIMEOUT,
@@ -108,6 +194,7 @@ open(Name) ->
%%% Name = target_name()
%%% ConnType = ct_telnet:connection_type()
%%% Handle = ct_telnet:handle()
+%%% Reason = term()
%%%
%%% @doc Open a telnet connection to the specified target host.
open(Name,ConnType) ->
@@ -137,6 +224,7 @@ open(KeyOrName,ConnType,TargetMod) ->
%%% TargetMod = atom()
%%% Extra = term()
%%% Handle = handle()
+%%% Reason = term()
%%%
%%% @doc Open a telnet connection to the specified target host.
%%%
@@ -160,8 +248,7 @@ open(KeyOrName,ConnType,TargetMod) ->
open(KeyOrName,ConnType,TargetMod,Extra) ->
case ct:get_config({KeyOrName,ConnType}) of
undefined ->
- log(heading(open,{KeyOrName,ConnType}),"Failed: ~p",
- [{not_available,KeyOrName}]),
+ log(undefined,open,"Failed: ~p",[{not_available,KeyOrName}]),
{error,{not_available,KeyOrName,ConnType}};
Addr ->
Addr1 =
@@ -183,15 +270,24 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
end;
Bool -> Bool
end,
- log(heading(open,{KeyOrName,ConnType}),
- "Opening connection to: ~p",[Addr1]),
- ct_gen_conn:start(KeyOrName,full_addr(Addr1,ConnType),
- {TargetMod,KeepAlive,Extra},?MODULE)
+ log(undefined,open,"Connecting to ~p(~p)",
+ [KeyOrName,Addr1]),
+ Reconnect =
+ case ct:get_config({telnet_settings,reconnection_attempts}) of
+ 0 -> false;
+ _ -> true
+ end,
+ ct_gen_conn:start(full_addr(Addr1,ConnType),
+ {TargetMod,KeepAlive,Extra},
+ ?MODULE, [{name,KeyOrName},
+ {reconnect,Reconnect},
+ {old,true}])
end.
%%%-----------------------------------------------------------------
%%% @spec close(Connection) -> ok | {error,Reason}
-%%% Connection = ct_telnet:connection()
+%%% Connection = ct_telnet:connection()
+%%% Reason = term()
%%%
%%% @doc Close the telnet connection and stop the process managing it.
%%%
@@ -202,9 +298,9 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
close(Connection) ->
case get_handle(Connection) of
{ok,Pid} ->
- log("ct_telnet:close","Handle: ~w",[Pid]),
+ log(undefined,close,"Connection closed, handle: ~w",[Pid]),
case ct_gen_conn:stop(Pid) of
- {error,{process_down,Pid,noproc}} ->
+ {error,{process_down,Pid,_}} ->
{error,already_closed};
Result ->
Result
@@ -217,47 +313,89 @@ close(Connection) ->
%%% Test suite interface
%%%-----------------------------------------------------------------
%%% @spec cmd(Connection,Cmd) -> {ok,Data} | {error,Reason}
-%%% @equiv cmd(Connection,Cmd,DefaultTimeout)
+%%% @equiv cmd(Connection,Cmd,[])
cmd(Connection,Cmd) ->
- cmd(Connection,Cmd,default).
+ cmd(Connection,Cmd,[]).
%%%-----------------------------------------------------------------
-%%% @spec cmd(Connection,Cmd,Timeout) -> {ok,Data} | {error,Reason}
+%%% @spec cmd(Connection,Cmd,Opts) -> {ok,Data} | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% Cmd = string()
-%%% Timeout = integer()
+%%% Opts = [Opt]
+%%% Opt = {timeout,timeout()} | {newline,boolean()}
%%% Data = [string()]
+%%% Reason = term()
%%% @doc Send a command via telnet and wait for prompt.
-cmd(Connection,Cmd,Timeout) ->
- case get_handle(Connection) of
- {ok,Pid} ->
- call(Pid,{cmd,Cmd,Timeout});
+%%%
+%%% This function will by default add a newline to the end of the
+%%% given command. If this is not desired, the option
+%%% `{newline,false}' can be used. This is necessary, for example,
+%%% when sending telnet command sequences (prefixed with the
+%%% Interprete As Command, IAC, character).
+%%%
+%%% The option `timeout' specifies how long the client shall wait for
+%%% prompt. If the time expires, the function returns
+%%% `{error,timeout}'. See the module description for information
+%%% about the default value for the command timeout.
+cmd(Connection,Cmd,Opts) when is_list(Opts) ->
+ case check_cmd_opts(Opts) of
+ ok ->
+ case get_handle(Connection) of
+ {ok,Pid} ->
+ call(Pid,{cmd,Cmd,Opts});
+ Error ->
+ Error
+ end;
Error ->
Error
- end.
+ end;
+cmd(Connection,Cmd,Timeout) when is_integer(Timeout); Timeout==default ->
+ %% This clause is kept for backwards compatibility only
+ cmd(Connection,Cmd,[{timeout,Timeout}]).
+
+check_cmd_opts([{timeout,Timeout}|Opts]) when is_integer(Timeout);
+ Timeout==default ->
+ check_cmd_opts(Opts);
+check_cmd_opts([]) ->
+ ok;
+check_cmd_opts(Opts) ->
+ check_send_opts(Opts).
+
%%%-----------------------------------------------------------------
%%% @spec cmdf(Connection,CmdFormat,Args) -> {ok,Data} | {error,Reason}
-%%% @equiv cmdf(Connection,CmdFormat,Args,DefaultTimeout)
+%%% @equiv cmdf(Connection,CmdFormat,Args,[])
cmdf(Connection,CmdFormat,Args) ->
- cmdf(Connection,CmdFormat,Args,default).
+ cmdf(Connection,CmdFormat,Args,[]).
%%%-----------------------------------------------------------------
-%%% @spec cmdf(Connection,CmdFormat,Args,Timeout) -> {ok,Data} | {error,Reason}
+%%% @spec cmdf(Connection,CmdFormat,Args,Opts) -> {ok,Data} | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% CmdFormat = string()
%%% Args = list()
-%%% Timeout = integer()
+%%% Opts = [Opt]
+%%% Opt = {timeout,timeout()} | {newline,boolean()}
%%% Data = [string()]
+%%% Reason = term()
%%% @doc Send a telnet command and wait for prompt
%%% (uses a format string and list of arguments to build the command).
-cmdf(Connection,CmdFormat,Args,Timeout) when is_list(Args) ->
+%%%
+%%% See {@link cmd/3} further description.
+cmdf(Connection,CmdFormat,Args,Opts) when is_list(Args) ->
Cmd = lists:flatten(io_lib:format(CmdFormat,Args)),
- cmd(Connection,Cmd,Timeout).
+ cmd(Connection,Cmd,Opts).
%%%-----------------------------------------------------------------
%%% @spec get_data(Connection) -> {ok,Data} | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% Data = [string()]
-%%% @doc Get all data which has been received by the telnet client
-%%% since last command was sent.
+%%% Reason = term()
+%%% @doc Get all data that has been received by the telnet client
+%%% since the last command was sent. Note that only newline terminated
+%%% strings are returned. If the last string received has not yet
+%%% been terminated, the connection may be polled automatically until
+%%% the string is complete. The polling feature is controlled
+%%% by the `poll_limit' and `poll_interval' config values and is
+%%% by default disabled (meaning the function will immediately
+%%% return all complete strings received and save a remaining
+%%% non-terminated string for a later `get_data' call).
get_data(Connection) ->
case get_handle(Connection) of
{ok,Pid} ->
@@ -268,30 +406,67 @@ get_data(Connection) ->
%%%-----------------------------------------------------------------
%%% @spec send(Connection,Cmd) -> ok | {error,Reason}
+%%% @equiv send(Connection,Cmd,[])
+send(Connection,Cmd) ->
+ send(Connection,Cmd,[]).
+
+%%%-----------------------------------------------------------------
+%%% @spec send(Connection,Cmd,Opts) -> ok | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% Cmd = string()
+%%% Opts = [Opt]
+%%% Opt = {newline,boolean()}
+%%% Reason = term()
%%% @doc Send a telnet command and return immediately.
%%%
+%%% This function will by default add a newline to the end of the
+%%% given command. If this is not desired, the option
+%%% `{newline,false}' can be used. This is necessary, for example,
+%%% when sending telnet command sequences (prefixed with the
+%%% Interprete As Command, IAC, character).
+%%%
%%% <p>The resulting output from the command can be read with
%%% <code>get_data/1</code> or <code>expect/2/3</code>.</p>
-send(Connection,Cmd) ->
- case get_handle(Connection) of
- {ok,Pid} ->
- call(Pid,{send,Cmd});
+send(Connection,Cmd,Opts) ->
+ case check_send_opts(Opts) of
+ ok ->
+ case get_handle(Connection) of
+ {ok,Pid} ->
+ call(Pid,{send,Cmd,Opts});
+ Error ->
+ Error
+ end;
Error ->
Error
end.
+check_send_opts([{newline,Bool}|Opts]) when is_boolean(Bool) ->
+ check_send_opts(Opts);
+check_send_opts([Invalid|_]) ->
+ {error,{invalid_option,Invalid}};
+check_send_opts([]) ->
+ ok.
+
+
%%%-----------------------------------------------------------------
%%% @spec sendf(Connection,CmdFormat,Args) -> ok | {error,Reason}
+%%% @equiv sendf(Connection,CmdFormat,Args,[])
+sendf(Connection,CmdFormat,Args) when is_list(Args) ->
+ sendf(Connection,CmdFormat,Args,[]).
+
+%%%-----------------------------------------------------------------
+%%% @spec sendf(Connection,CmdFormat,Args,Opts) -> ok | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% CmdFormat = string()
%%% Args = list()
+%%% Opts = [Opt]
+%%% Opt = {newline,boolean()}
+%%% Reason = term()
%%% @doc Send a telnet command and return immediately (uses a format
%%% string and a list of arguments to build the command).
-sendf(Connection,CmdFormat,Args) when is_list(Args) ->
+sendf(Connection,CmdFormat,Args,Opts) when is_list(Args) ->
Cmd = lists:flatten(io_lib:format(CmdFormat,Args)),
- send(Connection,Cmd).
+ send(Connection,Cmd,Opts).
%%%-----------------------------------------------------------------
%%% @spec expect(Connection,Patterns) -> term()
@@ -309,9 +484,12 @@ expect(Connection,Patterns) ->
%%% Prompt = string()
%%% Tag = term()
%%% Opts = [Opt]
-%%% Opt = {timeout,Timeout} | repeat | {repeat,N} | sequence |
-%%% {halt,HaltPatterns} | ignore_prompt | no_prompt_check
-%%% Timeout = integer()
+%%% Opt = {idle_timeout,IdleTimeout} | {total_timeout,TotalTimeout} |
+%%% repeat | {repeat,N} | sequence | {halt,HaltPatterns} |
+%%% ignore_prompt | no_prompt_check | wait_for_prompt |
+%%% {wait_for_prompt,Prompt}
+%%% IdleTimeout = infinity | integer()
+%%% TotalTimeout = infinity | integer()
%%% N = integer()
%%% HaltPatterns = Patterns
%%% MatchList = [Match]
@@ -322,9 +500,9 @@ expect(Connection,Patterns) ->
%%%
%%% @doc Get data from telnet and wait for the expected pattern.
%%%
-%%% <p><code>Pattern</code> can be a POSIX regular expression. If more
-%%% than one pattern is given, the function returns when the first
-%%% match is found.</p>
+%%% <p><code>Pattern</code> can be a POSIX regular expression. The function
+%%% returns as soon as a pattern has been successfully matched (at least one,
+%%% in the case of multiple patterns).</p>
%%%
%%% <p><code>RxMatch</code> is a list of matched strings. It looks
%%% like this: <code>[FullMatch, SubMatch1, SubMatch2, ...]</code>
@@ -337,15 +515,23 @@ expect(Connection,Patterns) ->
%%% will also include the matched <code>Tag</code>. Else, only
%%% <code>RxMatch</code> is returned.</p>
%%%
-%%% <p>The <code>timeout</code> option indicates that the function
+%%% <p>The <code>idle_timeout</code> option indicates that the function
%%% shall return if the telnet client is idle (i.e. if no data is
-%%% received) for more than <code>Timeout</code> milliseconds. Default
+%%% received) for more than <code>IdleTimeout</code> milliseconds. Default
%%% timeout is 10 seconds.</p>
%%%
-%%% <p>The function will always return when a prompt is found, unless
-%%% any of the <code>ignore_prompt</code> or
-%%% <code>no_prompt_check</code> options are used, in which case it
-%%% will return when a match is found or after a timeout.</p>
+%%% <p>The <code>total_timeout</code> option sets a time limit for
+%%% the complete expect operation. After <code>TotalTimeout</code>
+%%% milliseconds, <code>{error,timeout}</code> is returned. The default
+%%% value is <code>infinity</code> (i.e. no time limit).</p>
+%%%
+%%% <p>The function will return when a prompt is received, even if no
+%%% pattern has yet been matched. In this event,
+%%% <code>{error,{prompt,Prompt}}</code> is returned.
+%%% However, this behaviour may be modified with the
+%%% <code>ignore_prompt</code> or <code>no_prompt_check</code> option, which
+%%% tells <code>expect</code> to return only when a match is found or after a
+%%% timeout.</p>
%%%
%%% <p>If the <code>ignore_prompt</code> option is used,
%%% <code>ct_telnet</code> will ignore any prompt found. This option
@@ -359,6 +545,13 @@ expect(Connection,Patterns) ->
%%% is useful if, for instance, the <code>Pattern</code> itself
%%% matches the prompt.</p>
%%%
+%%% <p>The <code>wait_for_prompt</code> option forces <code>ct_telnet</code>
+%%% to wait until the prompt string has been received before returning
+%%% (even if a pattern has already been matched). This is equal to calling:
+%%% <code>expect(Conn, Patterns++[{prompt,Prompt}], [sequence|Opts])</code>.
+%%% Note that <code>idle_timeout</code> and <code>total_timeout</code>
+%%% may abort the operation of waiting for prompt.</p>
+%%%
%%% <p>The <code>repeat</code> option indicates that the pattern(s)
%%% shall be matched multiple times. If <code>N</code> is given, the
%%% pattern(s) will be matched <code>N</code> times, and the function
@@ -408,9 +601,20 @@ init(Name,{Ip,Port,Type},{TargetMod,KeepAlive,Extra}) ->
Settings ->
set_telnet_defaults(Settings,#state{})
end,
- case catch TargetMod:connect(Ip,Port,S0#state.conn_to,KeepAlive,Extra) of
+ case catch TargetMod:connect(Name,Ip,Port,S0#state.conn_to,
+ KeepAlive,Extra) of
{ok,TelnPid} ->
- log(heading(init,{Name,Type}),
+ put({ct_telnet_pid2name,TelnPid},Name),
+ S1 = S0#state{host=Ip,
+ port=Port,
+ teln_pid=TelnPid,
+ name=Name,
+ type=type(Type),
+ target_mod=TargetMod,
+ keep_alive=KeepAlive,
+ extra=Extra,
+ prx=TargetMod:get_prompt_regexp()},
+ log(S1,open,
"Opened telnet connection\n"
"IP: ~p\n"
"Port: ~p\n"
@@ -418,16 +622,13 @@ init(Name,{Ip,Port,Type},{TargetMod,KeepAlive,Extra}) ->
"Reconnection attempts: ~p\n"
"Reconnection interval: ~p\n"
"Connection timeout: ~p\n"
- "Keep alive: ~w",
- [Ip,Port,S0#state.com_to,S0#state.reconns,
- S0#state.reconn_int,S0#state.conn_to,KeepAlive]),
- {ok,TelnPid,S0#state{teln_pid=TelnPid,
- type=type(Type),
- name={Name,Type},
- target_mod=TargetMod,
- keep_alive=KeepAlive,
- extra=Extra,
- prx=TargetMod:get_prompt_regexp()}};
+ "Keep alive: ~w\n"
+ "Poll limit: ~w\n"
+ "Poll interval: ~w",
+ [Ip,Port,S1#state.com_to,S1#state.reconns,
+ S1#state.reconn_int,S1#state.conn_to,KeepAlive,
+ S1#state.poll_limit,S1#state.poll_interval]),
+ {ok,TelnPid,S1};
{'EXIT',Reason} ->
{error,Reason};
Error ->
@@ -447,87 +648,111 @@ set_telnet_defaults([{reconnection_interval,RInt}|Ss],S) ->
set_telnet_defaults(Ss,S#state{reconn_int=RInt});
set_telnet_defaults([{keep_alive,_}|Ss],S) ->
set_telnet_defaults(Ss,S);
+set_telnet_defaults([{poll_limit,PL}|Ss],S) ->
+ set_telnet_defaults(Ss,S#state{poll_limit=PL});
+set_telnet_defaults([{poll_interval,PI}|Ss],S) ->
+ set_telnet_defaults(Ss,S#state{poll_interval=PI});
set_telnet_defaults([Unknown|Ss],S) ->
- log(heading(set_telnet_defaults,{telnet_settings,Unknown}),
- "Bad element in telnet_settings: ~p",[Unknown]),
+ force_log(S,error,
+ "Bad element in telnet_settings: ~p",[Unknown]),
set_telnet_defaults(Ss,S);
set_telnet_defaults([],S) ->
S.
%% @hidden
-handle_msg({cmd,Cmd,Timeout},State) ->
- try_start_log(heading(cmd,State#state.name)),
- try_cont_log("Cmd: ~p", [Cmd]),
- debug_cont_log("Throwing Buffer:",[]),
+handle_msg({cmd,Cmd,Opts},State) ->
+ start_gen_log(heading(cmd,State#state.name)),
+ log(State,cmd,"Cmd: ~p",[Cmd]),
+
+ %% whatever is in the buffer from previous operations
+ %% will be ignored as we go ahead with this telnet cmd
+
+ debug_cont_gen_log("Throwing Buffer:",[]),
debug_log_lines(State#state.buffer),
+
case {State#state.type,State#state.prompt} of
- {ts,_} ->
- silent_teln_expect(State#state.teln_pid,
+ {ts,_} ->
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,2000}]);
- {ip,false} ->
- silent_teln_expect(State#state.teln_pid,
+ [{idle_timeout,2000}]);
+ {ip,false} ->
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,200}]);
+ [{idle_timeout,200}]);
{ip,true} ->
ok
end,
- TO = if Timeout == default -> State#state.com_to;
- true -> Timeout
+ TO = case proplists:get_value(timeout,Opts,default) of
+ default -> State#state.com_to;
+ Timeout -> Timeout
end,
+ Newline = proplists:get_value(newline,Opts,true),
{Return,NewBuffer,Prompt} =
- case teln_cmd(State#state.teln_pid, Cmd, State#state.prx, TO) of
+ case teln_cmd(State#state.teln_pid, Cmd, State#state.prx,
+ Newline, TO) of
{ok,Data,_PromptType,Rest} ->
- try_cont_log("Return: ~p", [{ok,Data}]),
+ log(State,recv,"Return: ~p",[{ok,Data}]),
{{ok,Data},Rest,true};
Error ->
- Retry = {retry,{Error,State#state.name,State#state.teln_pid,
- {cmd,Cmd,TO}}},
- try_cont_log("Return: ~p", [Error]),
+ Retry = {retry,{Error,
+ {State#state.name,
+ State#state.type},
+ State#state.teln_pid,
+ {cmd,Cmd,Opts}}},
+ log(State,recv,"Return: ~p",[Error]),
{Retry,[],false}
end,
- try_end_log(),
+ end_gen_log(),
{Return,State#state{buffer=NewBuffer,prompt=Prompt}};
-handle_msg({send,Cmd},State) ->
- try_log(heading(send,State#state.name),"Cmd: ~p",[Cmd]),
- debug_cont_log("Throwing Buffer:",[]),
+handle_msg({send,Cmd,Opts},State) ->
+ start_gen_log(heading(send,State#state.name)),
+ log(State,send,"Sending: ~p",[Cmd]),
+
+ debug_cont_gen_log("Throwing Buffer:",[]),
debug_log_lines(State#state.buffer),
+
case {State#state.type,State#state.prompt} of
{ts,_} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,2000}]);
+ [{idle_timeout,2000}]);
{ip,false} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,200}]);
+ [{idle_timeout,200}]);
{ip,true} ->
ok
end,
- ct_telnet_client:send_data(State#state.teln_pid,Cmd),
+ Newline = proplists:get_value(newline,Opts,true),
+ ct_telnet_client:send_data(State#state.teln_pid,Cmd,Newline),
+ end_gen_log(),
{ok,State#state{buffer=[],prompt=false}};
handle_msg(get_data,State) ->
- try_start_log(heading(get_data,State#state.name)),
- {ok,Data,Buffer} = teln_get_all_data(State#state.teln_pid,
- State#state.prx,
- State#state.buffer,
- [],[]),
- try_cont_log("Return: ~p",[{ok,Data}]),
- try_end_log(),
+ start_gen_log(heading(get_data,State#state.name)),
+ log(State,cmd,"Reading data...",[]),
+ {ok,Data,Buffer} = teln_get_all_data(State,State#state.buffer,[],[],
+ State#state.poll_limit),
+ log(State,recv,"Return: ~p",[{ok,Data}]),
+ end_gen_log(),
{{ok,Data},State#state{buffer=Buffer}};
handle_msg({expect,Pattern,Opts},State) ->
- try_start_log(heading(expect,State#state.name)),
- try_cont_log("Expect: ~p\nOpts=~p\n",[Pattern,Opts]),
+ start_gen_log(heading(expect,State#state.name)),
+ log(State,expect,"Expect: ~p\nOpts = ~p\n",[Pattern,Opts]),
{Return,NewBuffer,Prompt} =
- case teln_expect(State#state.teln_pid,
+ case teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
Pattern,
State#state.prx,
@@ -536,22 +761,23 @@ handle_msg({expect,Pattern,Opts},State) ->
P = check_if_prompt_was_reached(Data,[]),
{{ok,Data},Rest,P};
{ok,Data,HaltReason,Rest} ->
- force_cont_log("HaltReason: ~p",
- [HaltReason]),
+ force_log(State,expect,"HaltReason: ~p",[HaltReason]),
P = check_if_prompt_was_reached(Data,HaltReason),
{{ok,Data,HaltReason},Rest,P};
{error,Reason,Rest} ->
- force_cont_log("Expect failed\n~p",[{error,Reason}]),
+ force_log(State,expect,"Expect failed\n~p",[{error,Reason}]),
P = check_if_prompt_was_reached([],Reason),
{{error,Reason},Rest,P};
{error,Reason} ->
- force_cont_log("Expect failed\n~p",[{error,Reason}]),
+ force_log(State,expect,"Expect failed\n~p",[{error,Reason}]),
P = check_if_prompt_was_reached([],Reason),
{{error,Reason},[],P}
end,
- try_end_log(),
+ end_gen_log(),
Return1 = case Return of
- {error,_} -> {retry,{Return,State#state.name,
+ {error,_} -> {retry,{Return,
+ {State#state.name,
+ State#state.type},
State#state.teln_pid,
{expect,Pattern,Opts}}};
_ -> Return
@@ -562,18 +788,20 @@ handle_msg({expect,Pattern,Opts},State) ->
%% @hidden
reconnect({Ip,Port,_Type},State) ->
reconnect(Ip,Port,State#state.reconns,State).
-reconnect(Ip,Port,N,State=#state{target_mod=TargetMod,
+reconnect(Ip,Port,N,State=#state{name=Name,
+ target_mod=TargetMod,
keep_alive=KeepAlive,
extra=Extra,
conn_to=ConnTo,
reconn_int=ReconnInt}) ->
- case TargetMod:connect(Ip,Port,ConnTo,KeepAlive,Extra) of
- {ok, NewPid} ->
+ case TargetMod:connect(Name,Ip,Port,ConnTo,KeepAlive,Extra) of
+ {ok,NewPid} ->
+ put({ct_telnet_pid2name,NewPid},Name),
{ok, NewPid, State#state{teln_pid=NewPid}};
Error when N==0 ->
Error;
_Error ->
- log("Reconnect failed!","Retries left: ~w",[N]),
+ log(State,reconnect,"Reconnect failed!","Retries left: ~w",[N]),
timer:sleep(ReconnInt),
reconnect(Ip,Port,N-1,State)
end.
@@ -581,11 +809,9 @@ reconnect(Ip,Port,N,State=#state{target_mod=TargetMod,
%% @hidden
terminate(TelnPid,State) ->
- log(heading(terminate,State#state.name),
- "Closing telnet connection.\nId: ~w",
- [TelnPid]),
- ct_telnet_client:close(TelnPid).
-
+ Result = ct_telnet_client:close(TelnPid),
+ log(State,close,"Telnet connection for ~w closed.",[TelnPid]),
+ Result.
%%%=================================================================
%%% Internal function
@@ -637,105 +863,148 @@ check_if_prompt_was_reached(Data,_) when is_list(Data) ->
check_if_prompt_was_reached(_,_) ->
false.
-%tc(Fun) ->
-% Before = erlang:now(),
-% Val = Fun(),
-% After = erlang:now(),
-% {now_diff(After, Before), Val}.
-%now_diff({A2, B2, C2}, {A1, B1, C1}) ->
-% ((A2-A1)*1000000 + B2-B1)*1000000 + C2-C1.
+%%%-----------------------------------------------------------------
+%%% Functions for logging ct_telnet reports and telnet data
-heading(Function,Name) ->
- io_lib:format("~w:~w ~p",[?MODULE,Function,Name]).
+heading(Action,undefined) ->
+ io_lib:format("~w ~w",[?MODULE,Action]);
+heading(Action,Name) ->
+ io_lib:format("~w ~w for ~p",[?MODULE,Action,Name]).
-%%% @hidden
-%% Functions for regular (unconditional) logging, to be
-%% used during connect, reconnect, disconnect etc.
-log(Heading,Str,Args) ->
- ct_gen_conn:log(Heading,Str,Args).
-%%% @hidden
-start_log(Heading) ->
- ct_gen_conn:start_log(Heading).
-cont_log(Str,Args) ->
- ct_gen_conn:cont_log(Str,Args).
-end_log() ->
- ct_gen_conn:end_log().
+force_log(State,Action,String,Args) ->
+ log(State,Action,String,Args,true).
+%%%-----------------------------------------------------------------
%%% @hidden
-%% Functions for conditional logging, to be used by
-%% cmd, send, receive, expect etc (this output may be
-%% silenced by user).
-try_start_log(Heading) ->
- do_try_log(start_log,[Heading]).
-%%% @hidden
-try_end_log() ->
- do_try_log(end_log,[]).
+log(State,Action,String,Args) when is_record(State, state) ->
+ log(State,Action,String,Args,false);
+log(Name,Action,String,Args) when is_atom(Name) ->
+ log(#state{name=Name},Action,String,Args,false);
+log(TelnPid,Action,String,Args) when is_pid(TelnPid) ->
+ log(#state{teln_pid=TelnPid},Action,String,Args,false).
+%%%-----------------------------------------------------------------
%%% @hidden
-try_log(Heading,Str,Args) ->
- do_try_log(log,[Heading,Str,Args]).
+log(undefined,String,Args) ->
+ log(#state{},undefined,String,Args,false);
+log(Name,String,Args) when is_atom(Name) ->
+ log(#state{name=Name},undefined,String,Args,false);
+log(TelnPid,String,Args) when is_pid(TelnPid) ->
+ log(#state{teln_pid=TelnPid},undefined,String,Args).
+%%%-----------------------------------------------------------------
%%% @hidden
-try_cont_log(Str,Args) ->
- do_try_log(cont_log,[Str,Args]).
+log(#state{name=Name,teln_pid=TelnPid,host=Host,port=Port},
+ Action,String,Args,ForcePrint) ->
+ Name1 = if Name == undefined -> get({ct_telnet_pid2name,TelnPid});
+ true -> Name
+ end,
+ Silent = get(silent),
+
+ if Action == general_io ->
+ case ct_util:get_testdata({cth_conn_log,?MODULE}) of
+ HookMode when HookMode /= undefined, HookMode /= silent,
+ Silent /= true ->
+ error_logger:info_report(#conn_log{header=false,
+ client=self(),
+ conn_pid=TelnPid,
+ address={Host,Port},
+ name=Name1,
+ action=Action,
+ module=?MODULE},
+ {String,Args});
+ _ -> %% hook inactive or silence requested
+ ok
+ end;
+ true ->
+ if Action == open; Action == close; Action == reconnect;
+ Action == info; Action == error ->
+ ct_gen_conn:log(heading(Action,Name1),String,Args);
+
+ ForcePrint == false ->
+ case ct_util:is_silenced(telnet) of
+ true ->
+ ok;
+ false ->
+ ct_gen_conn:cont_log(String,Args)
+ end;
+
+ ForcePrint == true ->
+ case ct_util:is_silenced(telnet) of
+ true ->
+ %% call log/3 now instead of cont_log/2 since
+ %% start_gen_log/1 will not have been previously
+ %% called
+ ct_gen_conn:log(heading(Action,Name1),String,Args);
+ false ->
+ ct_gen_conn:cont_log(String,Args)
+ end
+ end
+ end.
+
+%%%-----------------------------------------------------------------
%%% @hidden
-do_try_log(Func,Args) ->
+start_gen_log(Heading) ->
%% check if output is suppressed
case ct_util:is_silenced(telnet) of
- true ->
- ok;
- false ->
- apply(ct_gen_conn,Func,Args)
+ true -> ok;
+ false -> ct_gen_conn:start_log(Heading)
end.
+%%%-----------------------------------------------------------------
%%% @hidden
-%% Functions that will force printout even if ct_telnet
-%% output has been silenced, to be used for error printouts.
-force_cont_log(Str,Args) ->
+end_gen_log() ->
+ %% check if output is suppressed
case ct_util:is_silenced(telnet) of
- true ->
- %% call log/3 now instead of cont_log/2 since
- %% start_log/1 will not have been previously called
- log("ct_telnet info",Str,Args);
- false ->
- cont_log(Str,Args)
+ true -> ok;
+ false -> ct_gen_conn:end_log()
end.
%%% @hidden
%% Debug printouts.
-debug_cont_log(Str,Args) ->
+debug_cont_gen_log(Str,Args) ->
Old = put(silent,true),
- cont_log(Str,Args),
+ ct_gen_conn:cont_log(Str,Args),
put(silent,Old).
-
+%% Log callback - called from the error handler process
+format_data(_How,{String,Args}) ->
+ io_lib:format(String,Args).
%%%=================================================================
%%% Abstraction layer on top of ct_telnet_client.erl
-teln_cmd(Pid,Cmd,Prx,Timeout) ->
- ct_telnet_client:send_data(Pid,Cmd),
+teln_cmd(Pid,Cmd,Prx,Newline,Timeout) ->
+ ct_telnet_client:send_data(Pid,Cmd,Newline),
teln_receive_until_prompt(Pid,Prx,Timeout).
-
-teln_get_all_data(Pid,Prx,Data,Acc,LastLine) ->
- case check_for_prompt(Prx,lists:reverse(LastLine) ++ Data) of
+teln_get_all_data(State=#state{teln_pid=Pid,prx=Prx},Data,Acc,LastLine,Polls) ->
+ case check_for_prompt(Prx,LastLine++Data) of
{prompt,Lines,_PromptType,Rest} ->
- teln_get_all_data(Pid,Prx,Rest,[Lines|Acc],[]);
+ teln_get_all_data(State,Rest,[Lines|Acc],[],State#state.poll_limit);
{noprompt,Lines,LastLine1} ->
case ct_telnet_client:get_data(Pid) of
+ {ok,[]} when LastLine1 /= [], Polls > 0 ->
+ %% No more data from server but the last string is not
+ %% a complete line (maybe because of a slow connection),
+ timer:sleep(State#state.poll_interval),
+ NewPolls = if Polls == infinity -> infinity;
+ true -> Polls-1
+ end,
+ teln_get_all_data(State,[],[Lines|Acc],LastLine1,NewPolls);
{ok,[]} ->
- {ok,lists:reverse(lists:append([Lines|Acc])),
- lists:reverse(LastLine1)};
+ {ok,lists:reverse(lists:append([Lines|Acc])),LastLine1};
{ok,Data1} ->
- teln_get_all_data(Pid,Prx,Data1,[Lines|Acc],LastLine1)
+ teln_get_all_data(State,Data1,[Lines|Acc],LastLine1,
+ State#state.poll_limit)
end
end.
%% Expect options record
-record(eo,{teln_pid,
prx,
- timeout,
+ idle_timeout,
+ total_timeout,
haltpatterns=[],
seq=false,
repeat=false,
@@ -746,11 +1015,9 @@ teln_get_all_data(Pid,Prx,Data,Acc,LastLine) ->
%% @doc Externally the silent_teln_expect function shall only be used
%% by the TargetModule, i.e. the target specific module which
%% implements connect/2 and get_prompt_regexp/0.
-silent_teln_expect(Pid,Data,Pattern,Prx,Opts) ->
+silent_teln_expect(Name,Pid,Data,Pattern,Prx,Opts) ->
Old = put(silent,true),
- try_cont_log("silent_teln_expect/5, Pattern = ~p",[Pattern]),
- Result = teln_expect(Pid,Data,Pattern,Prx,Opts),
- try_cont_log("silent_teln_expect -> ~p\n",[Result]),
+ Result = teln_expect(Name,Pid,Data,Pattern,Prx,Opts),
put(silent,Old),
Result.
@@ -766,7 +1033,7 @@ silent_teln_expect(Pid,Data,Pattern,Prx,Opts) ->
%% condition is fullfilled.
%% 3b) Repeat (sequence): 2) is repeated either N times or until a
%% halt condition is fullfilled.
-teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
+teln_expect(Name,Pid,Data,Pattern0,Prx,Opts) ->
HaltPatterns =
case get_ignore_prompt(Opts) of
true ->
@@ -776,21 +1043,31 @@ teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
end,
PromptCheck = get_prompt_check(Opts),
- Seq = get_seq(Opts),
- Pattern = convert_pattern(Pattern0,Seq),
- Timeout = get_timeout(Opts),
+ {WaitForPrompt,Pattern1,Opts1} = wait_for_prompt(Pattern0,Opts),
+
+ Seq = get_seq(Opts1),
+ Pattern2 = convert_pattern(Pattern1,Seq),
+ {IdleTimeout,TotalTimeout} = get_timeouts(Opts1),
EO = #eo{teln_pid=Pid,
prx=Prx,
- timeout=Timeout,
+ idle_timeout=IdleTimeout,
+ total_timeout=TotalTimeout,
seq=Seq,
haltpatterns=HaltPatterns,
prompt_check=PromptCheck},
- case get_repeat(Opts) of
+ case get_repeat(Opts1) of
false ->
- case teln_expect1(Data,Pattern,[],EO) of
+ case teln_expect1(Name,Pid,Data,Pattern2,[],EO) of
+ {ok,Matched,Rest} when WaitForPrompt ->
+ case lists:reverse(Matched) of
+ [{prompt,_},Matched1] ->
+ {ok,Matched1,Rest};
+ [{prompt,_}|Matched1] ->
+ {ok,lists:reverse(Matched1),Rest}
+ end;
{ok,Matched,Rest} ->
{ok,Matched,Rest};
{halt,Why,Rest} ->
@@ -800,7 +1077,7 @@ teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
end;
N ->
EO1 = EO#eo{repeat=N},
- repeat_expect(Data,Pattern,[],EO1)
+ repeat_expect(Name,Pid,Data,Pattern2,[],EO1)
end.
convert_pattern(Pattern,Seq)
@@ -822,11 +1099,22 @@ rm_dupl([P|Ps],Acc) ->
rm_dupl([],Acc) ->
lists:reverse(Acc).
-get_timeout(Opts) ->
- case lists:keysearch(timeout,1,Opts) of
- {value,{timeout,T}} -> T;
- false -> ?DEFAULT_TIMEOUT
- end.
+get_timeouts(Opts) ->
+ {case lists:keysearch(idle_timeout,1,Opts) of
+ {value,{_,T}} ->
+ T;
+ false ->
+ %% this check is for backwards compatibility (pre CT v1.8)
+ case lists:keysearch(timeout,1,Opts) of
+ {value,{_,T}} -> T;
+ false -> ?DEFAULT_TIMEOUT
+ end
+ end,
+ case lists:keysearch(total_timeout,1,Opts) of
+ {value,{_,T}} -> T;
+ false -> infinity
+ end}.
+
get_repeat(Opts) ->
case lists:keysearch(repeat,1,Opts) of
{value,{repeat,N}} when is_integer(N) ->
@@ -853,25 +1141,70 @@ get_ignore_prompt(Opts) ->
get_prompt_check(Opts) ->
not lists:member(no_prompt_check,Opts).
+wait_for_prompt(Pattern, Opts) ->
+ case lists:member(wait_for_prompt, Opts) of
+ true ->
+ wait_for_prompt1(prompt, Pattern,
+ lists:delete(wait_for_prompt,Opts));
+ false ->
+ case proplists:get_value(wait_for_prompt, Opts) of
+ undefined ->
+ {false,Pattern,Opts};
+ PromptStr ->
+ wait_for_prompt1({prompt,PromptStr}, Pattern,
+ proplists:delete(wait_for_prompt,Opts))
+ end
+ end.
+
+wait_for_prompt1(Prompt, [Ch|_] = Pattern, Opts) when is_integer(Ch) ->
+ wait_for_prompt2(Prompt, [Pattern], Opts);
+wait_for_prompt1(Prompt, Pattern, Opts) when is_list(Pattern) ->
+ wait_for_prompt2(Prompt, Pattern, Opts);
+wait_for_prompt1(Prompt, Pattern, Opts) ->
+ wait_for_prompt2(Prompt, [Pattern], Opts).
+
+wait_for_prompt2(Prompt, Pattern, Opts) ->
+ Pattern1 = case lists:reverse(Pattern) of
+ [prompt|_] -> Pattern;
+ [{prompt,_}|_] -> Pattern;
+ _ -> Pattern ++ [Prompt]
+ end,
+ Opts1 = case lists:member(sequence, Opts) of
+ true -> Opts;
+ false -> [sequence|Opts]
+ end,
+ {true,Pattern1,Opts1}.
+
%% Repeat either single or sequence. All match results are accumulated
%% and returned when a halt condition is fulllfilled.
-repeat_expect(Rest,_Pattern,Acc,#eo{repeat=0}) ->
+repeat_expect(_Name,_Pid,Rest,_Pattern,Acc,#eo{repeat=0}) ->
{ok,lists:reverse(Acc),done,Rest};
-repeat_expect(Data,Pattern,Acc,EO) ->
- case teln_expect1(Data,Pattern,[],EO) of
+repeat_expect(Name,Pid,Data,Pattern,Acc,EO) ->
+ case teln_expect1(Name,Pid,Data,Pattern,[],EO) of
{ok,Matched,Rest} ->
EO1 = EO#eo{repeat=EO#eo.repeat-1},
- repeat_expect(Rest,Pattern,[Matched|Acc],EO1);
+ repeat_expect(Name,Pid,Rest,Pattern,[Matched|Acc],EO1);
{halt,Why,Rest} ->
{ok,lists:reverse(Acc),Why,Rest};
{error,Reason} ->
{error,Reason}
end.
-teln_expect1(Data,Pattern,Acc,EO) ->
- ExpectFun = case EO#eo.seq of
- true -> fun() -> seq_expect(Data,Pattern,Acc,EO) end;
- false -> fun() -> one_expect(Data,Pattern,EO) end
+teln_expect1(Name,Pid,Data,Pattern,Acc,EO=#eo{idle_timeout=IdleTO,
+ total_timeout=TotalTO}) ->
+ %% TotalTO is a float value in this loop (unless it's 'infinity'),
+ %% but an integer value will be passed to the other functions
+ EOMod = if TotalTO /= infinity -> EO#eo{total_timeout=trunc(TotalTO)};
+ true -> EO
+ end,
+
+ ExpectFun = case EOMod#eo.seq of
+ true -> fun() ->
+ seq_expect(Name,Pid,Data,Pattern,Acc,EOMod)
+ end;
+ false -> fun() ->
+ one_expect(Name,Pid,Data,Pattern,EOMod)
+ end
end,
case ExpectFun() of
{match,Match,Rest} ->
@@ -880,20 +1213,45 @@ teln_expect1(Data,Pattern,Acc,EO) ->
{halt,Why,Rest};
NotFinished ->
%% Get more data
- Fun = fun() -> get_data1(EO#eo.teln_pid) end,
- case ct_gen_conn:do_within_time(Fun, EO#eo.timeout) of
- {error,Reason} ->
+ Fun = fun() -> get_data1(EOMod#eo.teln_pid) end,
+ BreakAfter = if TotalTO < IdleTO ->
+ %% use the integer value
+ EOMod#eo.total_timeout;
+ true ->
+ IdleTO
+ end,
+ case timer:tc(ct_gen_conn, do_within_time, [Fun,BreakAfter]) of
+ {_,{error,Reason}} ->
%% A timeout will occur when the telnet connection
- %% is idle for EO#eo.timeout milliseconds.
+ %% is idle for EO#eo.idle_timeout milliseconds.
{error,Reason};
- {ok,Data1} ->
+ {_,{ok,Data1}} when TotalTO == infinity ->
case NotFinished of
{nomatch,Rest} ->
%% One expect
- teln_expect1(Rest++Data1,Pattern,[],EO);
+ teln_expect1(Name,Pid,Rest++Data1,
+ Pattern,[],EOMod);
{continue,Patterns1,Acc1,Rest} ->
%% Sequence
- teln_expect1(Rest++Data1,Patterns1,Acc1,EO)
+ teln_expect1(Name,Pid,Rest++Data1,
+ Patterns1,Acc1,EOMod)
+ end;
+ {Elapsed,{ok,Data1}} ->
+ TVal = TotalTO - (Elapsed/1000),
+ if TVal =< 0 ->
+ {error,timeout};
+ true ->
+ EO1 = EO#eo{total_timeout = TVal},
+ case NotFinished of
+ {nomatch,Rest} ->
+ %% One expect
+ teln_expect1(Name,Pid,Rest++Data1,
+ Pattern,[],EO1);
+ {continue,Patterns1,Acc1,Rest} ->
+ %% Sequence
+ teln_expect1(Name,Pid,Rest++Data1,
+ Patterns1,Acc1,EO1)
+ end
end
end
end.
@@ -909,51 +1267,49 @@ get_data1(Pid) ->
%% 1) Single expect.
%% First the whole data chunk is searched for a prompt (to avoid doing
%% a regexp match for the prompt at each line).
-%% If we are searching for anyting else, the datachunk is split into
+%% If we are searching for anything else, the datachunk is split into
%% lines and each line is matched against each pattern.
%% one_expect: split data chunk at prompts
-one_expect(Data,Pattern,EO) when EO#eo.prompt_check==false ->
+one_expect(Name,Pid,Data,Pattern,EO) when EO#eo.prompt_check==false ->
% io:format("Raw Data ~p Pattern ~p EO ~p ",[Data,Pattern,EO]),
- one_expect1(Data,Pattern,[],EO#eo{found_prompt=false});
-one_expect(Data,Pattern,EO) ->
+ one_expect1(Name,Pid,Data,Pattern,[],EO#eo{found_prompt=false});
+one_expect(Name,Pid,Data,Pattern,EO) ->
case match_prompt(Data,EO#eo.prx) of
{prompt,UptoPrompt,PromptType,Rest} ->
case Pattern of
[Prompt] when Prompt==prompt; Prompt=={prompt,PromptType} ->
%% Only searching for prompt
- log_lines(UptoPrompt),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
+ log_lines(Name,Pid,UptoPrompt),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[PromptType]),
{match,{prompt,PromptType},Rest};
[{prompt,_OtherPromptType}] ->
- %% Only searching for one specific prompt, not thisone
- log_lines(UptoPrompt),
+ %% Only searching for one specific prompt, not this one
+ log_lines(Name,Pid,UptoPrompt),
{nomatch,Rest};
_ ->
- one_expect1(UptoPrompt,Pattern,Rest,
+ one_expect1(Name,Pid,UptoPrompt,Pattern,Rest,
EO#eo{found_prompt=PromptType})
end;
noprompt ->
case Pattern of
[Prompt] when Prompt==prompt; element(1,Prompt)==prompt ->
%% Only searching for prompt
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
{nomatch,LastLine};
_ ->
- one_expect1(Data,Pattern,[],EO#eo{found_prompt=false})
+ one_expect1(Name,Pid,Data,Pattern,[],
+ EO#eo{found_prompt=false})
end
end.
-remove_zero(List) ->
- [Ch || Ch <- List, Ch=/=0, Ch=/=13].
-
%% one_expect1: split data chunk at lines
-one_expect1(Data,Pattern,Rest,EO) ->
- case match_lines(Data,Pattern,EO) of
+one_expect1(Name,Pid,Data,Pattern,Rest,EO) ->
+ case match_lines(Name,Pid,Data,Pattern,EO) of
{match,Match,MatchRest} ->
{match,Match,MatchRest++Rest};
{nomatch,prompt} ->
- one_expect(Rest,Pattern,EO);
+ one_expect(Name,Pid,Rest,Pattern,EO);
{nomatch,NoMatchRest} ->
{nomatch,NoMatchRest++Rest};
{halt,Why,HaltRest} ->
@@ -970,77 +1326,77 @@ one_expect1(Data,Pattern,Rest,EO) ->
%% searching for the next pattern in the list.
%% seq_expect: Split data chunk at prompts
-seq_expect(Data,[],Acc,_EO) ->
+seq_expect(_Name,_Pid,Data,[],Acc,_EO) ->
{match,lists:reverse(Acc),Data};
-seq_expect([],Patterns,Acc,_EO) ->
+seq_expect(_Name,_Pid,[],Patterns,Acc,_EO) ->
{continue,Patterns,lists:reverse(Acc),[]};
-seq_expect(Data,Patterns,Acc,EO) when EO#eo.prompt_check==false ->
- seq_expect1(Data,Patterns,Acc,[],EO#eo{found_prompt=false});
-seq_expect(Data,Patterns,Acc,EO) ->
+seq_expect(Name,Pid,Data,Patterns,Acc,EO) when EO#eo.prompt_check==false ->
+ seq_expect1(Name,Pid,Data,Patterns,Acc,[],EO#eo{found_prompt=false});
+seq_expect(Name,Pid,Data,Patterns,Acc,EO) ->
case match_prompt(Data,EO#eo.prx) of
{prompt,UptoPrompt,PromptType,Rest} ->
- seq_expect1(UptoPrompt,Patterns,Acc,Rest,
+ seq_expect1(Name,Pid,UptoPrompt,Patterns,Acc,Rest,
EO#eo{found_prompt=PromptType});
noprompt ->
- seq_expect1(Data,Patterns,Acc,[],EO#eo{found_prompt=false})
+ seq_expect1(Name,Pid,Data,Patterns,Acc,[],EO#eo{found_prompt=false})
end.
%% seq_expect1: For one prompt-chunk, match each pattern - line by
%% line if it is other than the prompt we are seaching for.
-seq_expect1(Data,[prompt|Patterns],Acc,Rest,EO) ->
+seq_expect1(Name,Pid,Data,[prompt|Patterns],Acc,Rest,EO) ->
case EO#eo.found_prompt of
false ->
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
%% Rest==[] because no prompt is found
{continue,[prompt|Patterns],Acc,LastLine};
PromptType ->
- log_lines(Data),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
- seq_expect(Rest,Patterns,[{prompt,PromptType}|Acc],EO)
+ log_lines(Name,Pid,Data),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[PromptType]),
+ seq_expect(Name,Pid,Rest,Patterns,[{prompt,PromptType}|Acc],EO)
end;
-seq_expect1(Data,[{prompt,PromptType}|Patterns],Acc,Rest,EO) ->
+seq_expect1(Name,Pid,Data,[{prompt,PromptType}|Patterns],Acc,Rest,EO) ->
case EO#eo.found_prompt of
false ->
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
%% Rest==[] because no prompt is found
{continue,[{prompt,PromptType}|Patterns],Acc,LastLine};
PromptType ->
- log_lines(Data),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
- seq_expect(Rest,Patterns,[{prompt,PromptType}|Acc],EO);
+ log_lines(Name,Pid,Data),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts", [PromptType]),
+ seq_expect(Name,Pid,Rest,Patterns,[{prompt,PromptType}|Acc],EO);
_OtherPromptType ->
- log_lines(Data),
- seq_expect(Rest,[{prompt,PromptType}|Patterns],Acc,EO)
+ log_lines(Name,Pid,Data),
+ seq_expect(Name,Pid,Rest,[{prompt,PromptType}|Patterns],Acc,EO)
end;
-seq_expect1(Data,[Pattern|Patterns],Acc,Rest,EO) ->
- case match_lines(Data,[Pattern],EO) of
+seq_expect1(Name,Pid,Data,[Pattern|Patterns],Acc,Rest,EO) ->
+ case match_lines(Name,Pid,Data,[Pattern],EO) of
{match,Match,MatchRest} ->
- seq_expect1(MatchRest,Patterns,[Match|Acc],Rest,EO);
+ seq_expect1(Name,Pid,MatchRest,Patterns,[Match|Acc],Rest,EO);
{nomatch,prompt} ->
- seq_expect(Rest,[Pattern|Patterns],Acc,EO);
+ seq_expect(Name,Pid,Rest,[Pattern|Patterns],Acc,EO);
{nomatch,NoMatchRest} when Rest==[] ->
%% The data did not end with a prompt
{continue,[Pattern|Patterns],Acc,NoMatchRest};
{halt,Why,HaltRest} ->
{halt,Why,HaltRest++Rest}
end;
-seq_expect1(Data,[],Acc,Rest,_EO) ->
+seq_expect1(_Name,_Pid,Data,[],Acc,Rest,_EO) ->
{match,lists:reverse(Acc),Data++Rest}.
%% Split prompt-chunk at lines
-match_lines(Data,Patterns,EO) ->
+match_lines(Name,Pid,Data,Patterns,EO) ->
FoundPrompt = EO#eo.found_prompt,
case one_line(Data,[]) of
{noline,Rest} when FoundPrompt=/=false ->
%% This is the line including the prompt
- case match_line(Rest,Patterns,FoundPrompt,EO) of
+ case match_line(Name,Pid,Rest,Patterns,FoundPrompt,EO) of
nomatch ->
{nomatch,prompt};
{Tag,Match} ->
{Tag,Match,[]}
end;
{noline,Rest} when EO#eo.prompt_check==false ->
- case match_line(Rest,Patterns,false,EO) of
+ case match_line(Name,Pid,Rest,Patterns,false,EO) of
nomatch ->
{nomatch,Rest};
{Tag,Match} ->
@@ -1049,9 +1405,9 @@ match_lines(Data,Patterns,EO) ->
{noline,Rest} ->
{nomatch,Rest};
{Line,Rest} ->
- case match_line(Line,Patterns,false,EO) of
+ case match_line(Name,Pid,Line,Patterns,false,EO) of
nomatch ->
- match_lines(Rest,Patterns,EO);
+ match_lines(Name,Pid,Rest,Patterns,EO);
{Tag,Match} ->
{Tag,Match,Rest}
end
@@ -1059,43 +1415,43 @@ match_lines(Data,Patterns,EO) ->
%% For one line, match each pattern
-match_line(Line,Patterns,FoundPrompt,EO) ->
- match_line(Line,Patterns,FoundPrompt,EO,match).
-
-match_line(Line,[prompt|Patterns],false,EO,RetTag) ->
- match_line(Line,Patterns,false,EO,RetTag);
-match_line(Line,[prompt|_Patterns],FoundPrompt,_EO,RetTag) ->
- try_cont_log(" ~ts", [Line]),
- try_cont_log("<b>PROMPT:</b> ~ts", [FoundPrompt]),
+match_line(Name,Pid,Line,Patterns,FoundPrompt,EO) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,match).
+
+match_line(Name,Pid,Line,[prompt|Patterns],false,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,false,EO,RetTag);
+match_line(Name,Pid,Line,[prompt|_Patterns],FoundPrompt,_EO,RetTag) ->
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_EO,RetTag)
+match_line(Name,Pid,Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_EO,RetTag)
when PromptType==FoundPrompt ->
- try_cont_log(" ~ts", [Line]),
- try_cont_log("<b>PROMPT:</b> ~ts", [FoundPrompt]),
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Line,[{prompt,PromptType}|Patterns],FoundPrompt,EO,RetTag)
+match_line(Name,Pid,Line,[{prompt,PromptType}|Patterns],FoundPrompt,EO,RetTag)
when PromptType=/=FoundPrompt ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
-match_line(Line,[{Tag,Pattern}|Patterns],FoundPrompt,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
+match_line(Name,Pid,Line,[{Tag,Pattern}|Patterns],FoundPrompt,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
{match,Match} ->
- try_cont_log("<b>MATCH:</b> ~ts", [Line]),
+ log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,{Tag,Match}}
end;
-match_line(Line,[Pattern|Patterns],FoundPrompt,EO,RetTag) ->
+match_line(Name,Pid,Line,[Pattern|Patterns],FoundPrompt,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
{match,Match} ->
- try_cont_log("<b>MATCH:</b> ~ts", [Line]),
+ log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,Match}
end;
-match_line(Line,[],FoundPrompt,EO,match) ->
- match_line(Line,EO#eo.haltpatterns,FoundPrompt,EO,halt);
-match_line(Line,[],_FoundPrompt,_EO,halt) ->
- try_cont_log(" ~ts", [Line]),
+match_line(Name,Pid,Line,[],FoundPrompt,EO,match) ->
+ match_line(Name,Pid,Line,EO#eo.haltpatterns,FoundPrompt,EO,halt);
+match_line(Name,Pid,Line,[],_FoundPrompt,_EO,halt) ->
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
nomatch.
one_line([$\n|Rest],Line) ->
@@ -1111,26 +1467,29 @@ one_line([],Line) ->
debug_log_lines(String) ->
Old = put(silent,true),
- log_lines(String),
+ log_lines(undefined,undefined,String),
put(silent,Old).
-log_lines(String) ->
- case log_lines_not_last(String) of
+log_lines(Name,Pid,String) ->
+ case log_lines_not_last(Name,Pid,String) of
[] ->
ok;
LastLine ->
- try_cont_log(" ~ts", [LastLine])
+ log(name_or_pid(Name,Pid)," ~ts",[LastLine])
end.
-log_lines_not_last(String) ->
+log_lines_not_last(Name,Pid,String) ->
case add_tabs(String,[],[]) of
{[],LastLine} ->
LastLine;
{String1,LastLine} ->
- try_cont_log("~ts",[String1]),
+ log(name_or_pid(Name,Pid),"~ts",[String1]),
LastLine
end.
+name_or_pid(undefined,Pid) -> Pid;
+name_or_pid(Name,_) -> Name.
+
add_tabs([0|Rest],Acc,LastLine) ->
add_tabs(Rest,Acc,LastLine);
add_tabs([$\r|Rest],Acc,LastLine) ->
@@ -1145,8 +1504,6 @@ add_tabs([],[],LastLine) ->
{[],lists:reverse(LastLine)}.
-
-
%%% @hidden
teln_receive_until_prompt(Pid,Prx,Timeout) ->
Fun = fun() -> teln_receive_until_prompt(Pid,Prx,[],[]) end,
@@ -1154,7 +1511,7 @@ teln_receive_until_prompt(Pid,Prx,Timeout) ->
teln_receive_until_prompt(Pid,Prx,Acc,LastLine) ->
{ok,Data} = ct_telnet_client:get_data(Pid),
- case check_for_prompt(Prx,LastLine ++ Data) of
+ case check_for_prompt(Prx,LastLine++Data) of
{prompt,Lines,PromptType,Rest} ->
Return = lists:reverse(lists:append([Lines|Acc])),
{ok,Return,PromptType,Rest};
@@ -1174,8 +1531,10 @@ check_for_prompt(Prx,Data) ->
split_lines(String) ->
split_lines(String,[],[]).
-split_lines([$\n|Rest],Line,Lines) ->
+split_lines([$\n|Rest],Line,Lines) when Line /= [] ->
split_lines(Rest,[],[lists:reverse(Line)|Lines]);
+split_lines([$\n|Rest],[],Lines) ->
+ split_lines(Rest,[],Lines);
split_lines([$\r|Rest],Line,Lines) ->
split_lines(Rest,Line,Lines);
split_lines([0|Rest],Line,Lines) ->
diff --git a/lib/common_test/src/ct_telnet_client.erl b/lib/common_test/src/ct_telnet_client.erl
index 2cbcba9c77..0c448e5b35 100644
--- a/lib/common_test/src/ct_telnet_client.erl
+++ b/lib/common_test/src/ct_telnet_client.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,8 +32,10 @@
-module(ct_telnet_client).
--export([open/1, open/2, open/3, open/4, close/1]).
--export([send_data/2, get_data/1]).
+%%-define(debug, true).
+
+-export([open/2, open/3, open/4, open/5, close/1]).
+-export([send_data/2, send_data/3, get_data/1]).
-define(TELNET_PORT, 23).
-define(OPEN_TIMEOUT,10000).
@@ -64,20 +66,23 @@
-define(TERMINAL_TYPE, 24).
-define(WINDOW_SIZE, 31).
--record(state,{get_data, keep_alive=true}).
+-record(state,{conn_name, get_data, keep_alive=true, log_pos=1}).
-open(Server) ->
- open(Server, ?TELNET_PORT, ?OPEN_TIMEOUT, true).
+open(Server, ConnName) ->
+ open(Server, ?TELNET_PORT, ?OPEN_TIMEOUT, true, ConnName).
-open(Server, Port) ->
- open(Server, Port, ?OPEN_TIMEOUT, true).
+open(Server, Port, ConnName) ->
+ open(Server, Port, ?OPEN_TIMEOUT, true, ConnName).
-open(Server, Port, Timeout) ->
- open(Server, Port, Timeout, true).
+open(Server, Port, Timeout, ConnName) ->
+ open(Server, Port, Timeout, true, ConnName).
-open(Server, Port, Timeout, KeepAlive) ->
+open(Server, Port, Timeout, KeepAlive, ConnName) ->
Self = self(),
- Pid = spawn(fun() -> init(Self, Server, Port, Timeout, KeepAlive) end),
+ Pid = spawn(fun() ->
+ init(Self, Server, Port, Timeout,
+ KeepAlive, ConnName)
+ end),
receive
{open,Pid} ->
{ok,Pid};
@@ -86,29 +91,37 @@ open(Server, Port, Timeout, KeepAlive) ->
end.
close(Pid) ->
- Pid ! close.
+ Pid ! {close,self()},
+ receive closed -> ok
+ after 5000 -> ok
+ end.
send_data(Pid, Data) ->
- Pid ! {send_data, Data++"\n"},
+ send_data(Pid, Data, true).
+send_data(Pid, Data, true) ->
+ send_data(Pid, Data++"\n", false);
+send_data(Pid, Data, false) ->
+ Pid ! {send_data, Data},
ok.
get_data(Pid) ->
- Pid ! {get_data, self()},
+ Pid ! {get_data,self()},
receive
{data,Data} ->
- {ok, Data}
+ {ok,Data}
end.
-
%%%-----------------------------------------------------------------
%%% Internal functions
-init(Parent, Server, Port, Timeout, KeepAlive) ->
+init(Parent, Server, Port, Timeout, KeepAlive, ConnName) ->
case gen_tcp:connect(Server, Port, [list,{packet,0}], Timeout) of
{ok,Sock} ->
- dbg("Connected to: ~p (port: ~w, keep_alive: ~w)\n", [Server,Port,KeepAlive]),
- send([?IAC,?DO,?SUPPRESS_GO_AHEAD], Sock),
+ dbg("~p connected to: ~p (port: ~w, keep_alive: ~w)\n",
+ [ConnName,Server,Port,KeepAlive]),
+ send([?IAC,?DO,?SUPPRESS_GO_AHEAD], Sock, ConnName),
Parent ! {open,self()},
- loop(#state{get_data=10, keep_alive=KeepAlive}, Sock, []),
+ loop(#state{conn_name=ConnName, get_data=10, keep_alive=KeepAlive},
+ Sock, []),
gen_tcp:close(Sock);
Error ->
Parent ! {Error,self()}
@@ -118,6 +131,13 @@ loop(State, Sock, Acc) ->
receive
{tcp_closed,_} ->
dbg("Connection closed\n", []),
+ Data = lists:reverse(lists:append(Acc)),
+ dbg("Printing queued messages: ~tp",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ length(Data))]),
receive
{get_data,Pid} ->
Pid ! closed
@@ -125,11 +145,11 @@ loop(State, Sock, Acc) ->
ok
end;
{tcp,_,Msg0} ->
- dbg("tcp msg: ~p~n",[Msg0]),
+ dbg("rcv tcp msg: ~tp~n",[Msg0]),
Msg = check_msg(Sock,Msg0,[]),
loop(State, Sock, [Msg | Acc]);
{send_data,Data} ->
- send(Data, Sock),
+ send(Data, Sock, State#state.conn_name),
loop(State, Sock, Acc);
{get_data,Pid} ->
NewState =
@@ -144,54 +164,109 @@ loop(State, Sock, Acc) ->
end;
_ ->
Data = lists:reverse(lists:append(Acc)),
- dbg("get_data ~p\n",[Data]),
+ Len = length(Data),
+ dbg("get_data ~tp\n",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
Pid ! {data,Data},
- State
+ State#state{log_pos = 1}
end,
loop(NewState, Sock, []);
{get_data_delayed,Pid} ->
NewState =
case State of
#state{keep_alive = true, get_data = 0} ->
- if Acc == [] -> send([?IAC,?NOP], Sock);
+ dbg("sending NOP\n",[]),
+ if Acc == [] -> send([?IAC,?NOP], Sock,
+ State#state.conn_name);
true -> ok
end,
State#state{get_data=10};
_ ->
State
end,
- NewAcc =
+ {NewAcc,Pos} =
case erlang:is_process_alive(Pid) of
- true ->
+ true when Acc /= [] ->
Data = lists:reverse(lists:append(Acc)),
- dbg("get_data_delayed ~p\n",[Data]),
+ Len = length(Data),
+ dbg("get_data_delayed ~tp\n",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
Pid ! {data,Data},
- [];
+ {[],1};
+ true when Acc == [] ->
+ dbg("get_data_delayed nodata\n",[]),
+ Pid ! {data,[]},
+ {[],1};
false ->
- Acc
+ {Acc,NewState#state.log_pos}
end,
- loop(NewState, Sock, NewAcc);
- close ->
+ loop(NewState#state{log_pos=Pos}, Sock, NewAcc);
+ {close,Pid} ->
dbg("Closing connection\n", []),
+ if Acc == [] ->
+ ok;
+ true ->
+ Data = lists:reverse(lists:append(Acc)),
+ dbg("Printing queued messages: ~tp",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ length(Data))])
+ end,
gen_tcp:close(Sock),
- ok
+ Pid ! closed
after wait(State#state.keep_alive,?IDLE_TIMEOUT) ->
- if
- Acc == [] -> send([?IAC,?NOP], Sock);
- true -> ok
- end,
- loop(State, Sock, Acc)
+ dbg("idle timeout\n",[]),
+ Data = lists:reverse(lists:append(Acc)),
+ case Data of
+ [] ->
+ dbg("sending NOP\n",[]),
+ send([?IAC,?NOP], Sock, State#state.conn_name),
+ loop(State, Sock, Acc);
+ _ when State#state.log_pos == length(Data)+1 ->
+ loop(State, Sock, Acc);
+ _ ->
+ dbg("idle timeout, printing ~tp\n",[Data]),
+ Len = length(Data),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
+ loop(State#state{log_pos = Len+1}, Sock, Acc)
+ end
end.
wait(true, Time) -> Time;
wait(false, _) -> infinity.
-send(Data, Sock) ->
+send(Data, Sock, ConnName) ->
case Data of
[?IAC|_] = Cmd ->
- cmd_dbg(Cmd);
+ cmd_dbg("Sending",Cmd),
+ try io_lib:format("[~w] ~w", [?MODULE,Data]) of
+ Str ->
+ ct_telnet:log(ConnName, general_io, Str, [])
+ catch
+ _:_ -> ok
+ end;
_ ->
- dbg("Sending: ~p\n", [Data])
+ dbg("Sending: ~tp\n", [Data]),
+ try io_lib:format("[~w] ~ts", [?MODULE,Data]) of
+ Str ->
+ ct_telnet:log(ConnName, general_io, Str, [])
+ catch
+ _:_ -> ok
+ end
end,
gen_tcp:send(Sock, Data),
ok.
@@ -204,8 +279,7 @@ check_msg(Sock, [?IAC,?IAC | T], Acc) ->
check_msg(Sock, [?IAC | Cs], Acc) ->
case get_cmd(Cs) of
{Cmd,Cs1} ->
- dbg("Got ", []),
- cmd_dbg(Cmd),
+ cmd_dbg("Got",Cmd),
respond_cmd(Cmd, Sock),
check_msg(Sock, Cs1, Acc);
error ->
@@ -224,12 +298,12 @@ check_msg(_Sock, [], Acc) ->
respond_cmd([?WILL,?ECHO], Sock) ->
R = [?IAC,?DO,?ECHO],
- cmd_dbg(R),
+ cmd_dbg("Responding",R),
gen_tcp:send(Sock, R);
respond_cmd([?DO,?ECHO], Sock) ->
R = [?IAC,?WILL,?ECHO],
- cmd_dbg(R),
+ cmd_dbg("Responding",R),
gen_tcp:send(Sock, R);
%% Answers from server
@@ -249,12 +323,12 @@ respond_cmd([?WONT | _Opt], _Sock) -> % server ack?
respond_cmd([?WILL,Opt], Sock) ->
R = [?IAC,?DONT,Opt],
- cmd_dbg(R),
+ cmd_dbg("Responding",R),
gen_tcp:send(Sock, R);
respond_cmd([?DO | Opt], Sock) ->
R = [?IAC,?WONT | Opt],
- cmd_dbg(R),
+ cmd_dbg("Responding",R),
gen_tcp:send(Sock, R);
%% Commands without options (which we ignore)
@@ -290,13 +364,14 @@ get_subcmd([Opt | Rest], Acc) ->
get_subcmd(Rest, [Opt | Acc]).
-ifdef(debug).
-dbg(_Str,_Args) ->
- io:format(_Str,_Args).
+dbg(Str,Args) ->
+ TS = timestamp(),
+ io:format("[~p ct_telnet_client, ~s]\n" ++ Str,[self(),TS|Args]).
-cmd_dbg(_Cmd) ->
- case _Cmd of
+cmd_dbg(Prefix,Cmd) ->
+ case Cmd of
[?IAC|Cmd1] ->
- cmd_dbg(Cmd1);
+ cmd_dbg(Prefix,Cmd1);
[Ctrl|Opts] ->
CtrlStr =
case Ctrl of
@@ -312,15 +387,23 @@ cmd_dbg(_Cmd) ->
[Opt] -> Opt;
_ -> Opts
end,
- io:format("~ts(~w): ~w\n", [CtrlStr,Ctrl,Opts1]);
+ dbg("~ts: ~ts(~w): ~w\n", [Prefix,CtrlStr,Ctrl,Opts1]);
Any ->
- io:format("Unexpected in cmd_dbg:~n~w~n",[Any])
+ dbg("Unexpected in cmd_dbg:~n~w~n",[Any])
end.
+timestamp() ->
+ {MS,S,US} = now(),
+ {{Year,Month,Day}, {Hour,Min,Sec}} =
+ calendar:now_to_local_time({MS,S,US}),
+ MilliSec = trunc(US/1000),
+ lists:flatten(io_lib:format("~4.10.0B-~2.10.0B-~2.10.0B "
+ "~2.10.0B:~2.10.0B:~2.10.0B.~3.10.0B",
+ [Year,Month,Day,Hour,Min,Sec,MilliSec])).
-else.
dbg(_Str,_Args) ->
ok.
-cmd_dbg(_Cmd) ->
+cmd_dbg(_Prefix,_Cmd) ->
ok.
-endif.
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index c07ea323e6..10a9bdac67 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -1120,8 +1120,9 @@ should_be_added(Tag,Node,_Data,Spec) ->
%% list terms *without* possible duplicates here
Tag == logdir; Tag == logopts;
Tag == basic_html; Tag == label;
- Tag == auto_compile; Tag == stylesheet;
- Tag == verbosity; Tag == silent_connections ->
+ Tag == auto_compile; Tag == abort_if_missing_suites;
+ Tag == stylesheet; Tag == verbosity;
+ Tag == silent_connections ->
lists:keymember(ref2node(Node,Spec#testspec.nodes),1,
read_field(Spec,Tag)) == false;
%% for terms *with* possible duplicates
@@ -1496,6 +1497,8 @@ valid_terms() ->
{include,3},
{auto_compile,2},
{auto_compile,3},
+ {abort_if_missing_suites,2},
+ {abort_if_missing_suites,3},
{stylesheet,2},
{stylesheet,3},
{suites,3},
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index bcc4caa62e..56027586d1 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -37,7 +37,7 @@
save_suite_data_async/3, save_suite_data_async/2,
read_suite_data/1,
delete_suite_data/0, delete_suite_data/1, match_delete_suite_data/1,
- delete_testdata/0, delete_testdata/1,
+ delete_testdata/0, delete_testdata/1, match_delete_testdata/1,
set_testdata/1, get_testdata/1, get_testdata/2,
set_testdata_async/1, update_testdata/2, update_testdata/3,
set_verbosity/1, get_verbosity/1]).
@@ -77,6 +77,8 @@
-record(suite_data, {key,name,value}).
%%%-----------------------------------------------------------------
+start() ->
+ start(normal, ".", ?default_verbosity).
%%% @spec start(Mode) -> Pid | exit(Error)
%%% Mode = normal | interactive
%%% Pid = pid()
@@ -91,9 +93,6 @@
%%% <code>ct_util_server</code>.</p>
%%%
%%% @see ct
-start() ->
- start(normal, ".", ?default_verbosity).
-
start(LogDir) when is_list(LogDir) ->
start(normal, LogDir, ?default_verbosity);
start(Mode) ->
@@ -271,6 +270,9 @@ delete_testdata() ->
delete_testdata(Key) ->
call({delete_testdata, Key}).
+match_delete_testdata(KeyPat) ->
+ call({match_delete_testdata, KeyPat}).
+
update_testdata(Key, Fun) ->
update_testdata(Key, Fun, []).
@@ -362,7 +364,25 @@ loop(Mode,TestData,StartDir) ->
{{delete_testdata,Key},From} ->
TestData1 = lists:keydelete(Key,1,TestData),
return(From,ok),
- loop(From,TestData1,StartDir);
+ loop(From,TestData1,StartDir);
+ {{match_delete_testdata,{Key1,Key2}},From} ->
+ %% handles keys with 2 elements
+ TestData1 =
+ lists:filter(fun({Key,_}) when not is_tuple(Key) ->
+ true;
+ ({Key,_}) when tuple_size(Key) =/= 2 ->
+ true;
+ ({{_,KeyB},_}) when Key1 == '_' ->
+ KeyB =/= Key2;
+ ({{KeyA,_},_}) when Key2 == '_' ->
+ KeyA =/= Key1;
+ (_) when Key1 == '_' ; Key2 == '_' ->
+ false;
+ (_) ->
+ true
+ end, TestData),
+ return(From,ok),
+ loop(From,TestData1,StartDir);
{{set_testdata,New = {Key,_Val}},From} ->
TestData1 = lists:keydelete(Key,1,TestData),
return(From,ok),
@@ -382,9 +402,18 @@ loop(Mode,TestData,StartDir) ->
TestData1 =
case lists:keysearch(Key,1,TestData) of
{value,{Key,Val}} ->
- NewVal = Fun(Val),
- return(From,NewVal),
- [{Key,NewVal}|lists:keydelete(Key,1,TestData)];
+ try Fun(Val) of
+ '$delete' ->
+ return(From,deleted),
+ lists:keydelete(Key,1,TestData);
+ NewVal ->
+ return(From,NewVal),
+ [{Key,NewVal}|lists:keydelete(Key,1,TestData)]
+ catch
+ _:Error ->
+ return(From,{error,Error}),
+ TestData
+ end;
_ ->
case lists:member(create,Opts) of
true ->
diff --git a/lib/common_test/src/ct_util.hrl b/lib/common_test/src/ct_util.hrl
index 7c01e17c36..845bb55486 100644
--- a/lib/common_test/src/ct_util.hrl
+++ b/lib/common_test/src/ct_util.hrl
@@ -48,6 +48,7 @@
release_shell=false,
include=[],
auto_compile=[],
+ abort_if_missing_suites=[],
stylesheet=[],
multiply_timetraps=[],
scale_timetraps=[],
@@ -79,4 +80,10 @@
-define(tablesorter_script, "jquery.tablesorter.min.js").
%% Logging information for error handler
--record(conn_log, {client, name, address, action, module}).
+-record(conn_log, {header=true,
+ client,
+ name,
+ address,
+ conn_pid,
+ action,
+ module}).
diff --git a/lib/common_test/src/ct_webtool.erl b/lib/common_test/src/ct_webtool.erl
new file mode 100644
index 0000000000..b67a7c2a92
--- /dev/null
+++ b/lib/common_test/src/ct_webtool.erl
@@ -0,0 +1,1207 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(ct_webtool).
+-behaviour(gen_server).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% The general idea is: %%
+%% %%
+%% %%
+%% 1. Scan through the path for *.tool files and find all the web %%
+%% based tools. Query each tool for configuration data. %%
+%% 2. Add Alias for Erlscript and html for each tool to %%
+%% the webserver configuration data. %%
+%% 3. Start the webserver. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% API functions
+-export([start/0, start/2, stop/0]).
+
+%% Starting Webtool from a shell script
+-export([script_start/0, script_start/1]).
+
+%% Web api
+-export([started_tools/2, toolbar/2, start_tools/2, stop_tools/2]).
+
+%% API against other tools
+-export([is_localhost/0]).
+
+%% Debug export s
+-export([get_tools1/1]).
+-export([debug/1, stop_debug/0, debug_app/1]).
+
+%% gen_server callbacks
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+-include_lib("kernel/include/file.hrl").
+-include_lib("stdlib/include/ms_transform.hrl").
+
+-record(state,{priv_dir,app_data,supvis,web_data,started=[]}).
+
+-define(MAX_NUMBER_OF_WEBTOOLS,256).
+-define(DEFAULT_PORT,8888).% must be >1024 or the user must be root on unix
+-define(DEFAULT_ADDR,{127,0,0,1}).
+
+-define(WEBTOOL_ALIAS,{ct_webtool,[{alias,{erl_alias,"/ct_webtool",[ct_webtool]}}]}).
+-define(HEADER,"Pragma:no-cache\r\n Content-type: text/html\r\n\r\n").
+-define(HTML_HEADER,"<HTML>\r\n<HEAD>\r\n<TITLE>WebTool</TITLE>\r\n</HEAD>\r\n<BODY BGCOLOR=\"#FFFFFF\">\r\n").
+-define(HTML_HEADER_RELOAD,"<HTML>\r\n<HEAD>\r\n<TITLE>WebTool
+ </TITLE>\r\n</HEAD>\r\n
+ <BODY BGCOLOR=\"#FFFFFF\" onLoad=reloadCompiledList()>\r\n").
+
+-define(HTML_END,"</BODY></HTML>").
+
+-define(SEND_URL_TIMEOUT,5000).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% For debugging only. %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Start tracing with
+%% debug(Functions).
+%% Functions = local | global | FunctionList
+%% FunctionList = [Function]
+%% Function = {FunctionName,Arity} | FunctionName |
+%% {Module, FunctionName, Arity} | {Module,FunctionName}
+debug(F) ->
+ ttb:tracer(all,[{file,"webtool.trc"}]), % tracing all nodes
+ ttb:p(all,[call,timestamp]),
+ MS = [{'_',[],[{return_trace},{message,{caller}}]}],
+ tp(F,MS),
+ ttb:ctp(?MODULE,stop_debug), % don't want tracing of the stop_debug func
+ ok.
+tp(local,MS) -> % all functions
+ ttb:tpl(?MODULE,MS);
+tp(global,MS) -> % all exported functions
+ ttb:tp(?MODULE,MS);
+tp([{M,F,A}|T],MS) -> % Other module
+ ttb:tpl(M,F,A,MS),
+ tp(T,MS);
+tp([{M,F}|T],MS) when is_atom(F) -> % Other module
+ ttb:tpl(M,F,MS),
+ tp(T,MS);
+tp([{F,A}|T],MS) -> % function/arity
+ ttb:tpl(?MODULE,F,A,MS),
+ tp(T,MS);
+tp([F|T],MS) -> % function
+ ttb:tpl(?MODULE,F,MS),
+ tp(T,MS);
+tp([],_MS) ->
+ ok.
+stop_debug() ->
+ ttb:stop([format]).
+
+debug_app(Mod) ->
+ ttb:tracer(all,[{file,"webtool_app.trc"},{handler,{fun out/4,true}}]),
+ ttb:p(all,[call,timestamp]),
+ MS = [{'_',[],[{return_trace},{message,{caller}}]}],
+ ttb:tp(Mod,MS),
+ ok.
+
+out(_,{trace_ts,Pid,call,MFA={M,F,A},{W,_,_},TS},_,S)
+ when W==webtool;W==mod_esi->
+ io:format("~w: (~p)~ncall ~s~n", [TS,Pid,ffunc(MFA)]),
+ [{M,F,length(A)}|S];
+out(_,{trace_ts,Pid,return_from,MFA,R,TS},_,[MFA|S]) ->
+ io:format("~w: (~p)~nreturned from ~s -> ~p~n", [TS,Pid,ffunc(MFA),R]),
+ S;
+out(_,_,_,_) ->
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% Functions called via script. %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+script_start() ->
+ usage(),
+ halt().
+script_start([App]) ->
+ DefaultBrowser =
+ case os:type() of
+ {win32,_} -> iexplore;
+ _ -> firefox
+ end,
+ script_start([App,DefaultBrowser]);
+script_start([App,Browser]) ->
+ io:format("Starting webtool...\n"),
+ start(),
+ AvailableApps = get_applications(),
+ {OSType,_} = os:type(),
+ case lists:keysearch(App,1,AvailableApps) of
+ {value,{App,StartPage}} ->
+ io:format("Starting ~w...\n",[App]),
+ start_tools([],"app=" ++ atom_to_list(App)),
+ PortStr = integer_to_list(get_port()),
+ Url = case StartPage of
+ "/" ++ Page ->
+ "http://localhost:" ++ PortStr ++ "/" ++ Page;
+ _ ->
+ "http://localhost:" ++ PortStr ++ "/" ++ StartPage
+ end,
+ case Browser of
+ none ->
+ ok;
+ iexplore when OSType == win32->
+ io:format("Starting internet explorer...\n"),
+ {ok,R} = win32reg:open(""),
+ Key="\\local_machine\\SOFTWARE\\Microsoft\\IE Setup\\Setup",
+ win32reg:change_key(R,Key),
+ {ok,Val} = win32reg:value(R,"Path"),
+ IExplore=filename:join(win32reg:expand(Val),"iexplore.exe"),
+ os:cmd("\"" ++ IExplore ++ "\" " ++ Url);
+ _ when OSType == win32 ->
+ io:format("Starting ~w...\n",[Browser]),
+ os:cmd("\"" ++ atom_to_list(Browser) ++ "\" " ++ Url);
+ B when B==firefox; B==mozilla ->
+ io:format("Sending URL to ~w...",[Browser]),
+ BStr = atom_to_list(Browser),
+ SendCmd = BStr ++ " -raise -remote \'openUrl(" ++
+ Url ++ ")\'",
+ Port = open_port({spawn,SendCmd},[exit_status]),
+ receive
+ {Port,{exit_status,0}} ->
+ io:format("done\n"),
+ ok;
+ {Port,{exit_status,_Error}} ->
+ io:format(" not running, starting ~w...\n",
+ [Browser]),
+ os:cmd(BStr ++ " " ++ Url),
+ ok
+ after ?SEND_URL_TIMEOUT ->
+ io:format(" failed, starting ~w...\n",[Browser]),
+ erlang:port_close(Port),
+ os:cmd(BStr ++ " " ++ Url)
+ end;
+ _ ->
+ io:format("Starting ~w...\n",[Browser]),
+ os:cmd(atom_to_list(Browser) ++ " " ++ Url)
+ end,
+ ok;
+ false ->
+ stop(),
+ io:format("\n{error,{unknown_app,~p}}\n",[App]),
+ halt()
+ end.
+
+usage() ->
+ io:format("Starting webtool...\n"),
+ start(),
+ Apps = lists:map(fun({A,_}) -> A end,get_applications()),
+ io:format(
+ "\nUsage: start_webtool application [ browser ]\n"
+ "\nAvailable applications are: ~p\n"
+ "Default browser is \'iexplore\' (Internet Explorer) on Windows "
+ "or else \'firefox\'\n",
+ [Apps]),
+ stop().
+
+
+get_applications() ->
+ gen_server:call(ct_web_tool,get_applications).
+
+get_port() ->
+ gen_server:call(ct_web_tool,get_port).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% Api functions to the genserver. %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%----------------------------------------------------------------------
+%
+%----------------------------------------------------------------------
+
+start()->
+ start(standard_path,standard_data).
+
+start(Path,standard_data)->
+ case get_standard_data() of
+ {error,Reason} ->
+ {error,Reason};
+ Data ->
+ start(Path,Data)
+ end;
+
+start(standard_path,Data)->
+ Path=get_path(),
+ start(Path,Data);
+
+start(Path,Port) when is_integer(Port)->
+ Data = get_standard_data(Port),
+ start(Path,Data);
+
+start(Path,Data0)->
+ Data = Data0 ++ rest_of_standard_data(),
+ gen_server:start({local,ct_web_tool},ct_webtool,{Path,Data},[]).
+
+stop()->
+ gen_server:call(ct_web_tool,stoppit).
+
+%----------------------------------------------------------------------
+%Web Api functions called by the web
+%----------------------------------------------------------------------
+started_tools(Env,Input)->
+ gen_server:call(ct_web_tool,{started_tools,Env,Input}).
+
+toolbar(Env,Input)->
+ gen_server:call(ct_web_tool,{toolbar,Env,Input}).
+
+start_tools(Env,Input)->
+ gen_server:call(ct_web_tool,{start_tools,Env,Input}).
+
+stop_tools(Env,Input)->
+ gen_server:call(ct_web_tool,{stop_tools,Env,Input}).
+%----------------------------------------------------------------------
+%Support API for other tools
+%----------------------------------------------------------------------
+
+is_localhost()->
+ gen_server:call(ct_web_tool,is_localhost).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%%The gen_server callback functions that builds the webbpages %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+handle_call(get_applications,_,State)->
+ MS = ets:fun2ms(fun({Tool,{web_data,{_,Start}}}) -> {Tool,Start} end),
+ Tools = ets:select(State#state.app_data,MS),
+ {reply,Tools,State};
+
+handle_call(get_port,_,State)->
+ {value,{port,Port}}=lists:keysearch(port,1,State#state.web_data),
+ {reply,Port,State};
+
+handle_call({started_tools,_Env,_Input},_,State)->
+ {reply,started_tools_page(State),State};
+
+handle_call({toolbar,_Env,_Input},_,State)->
+ {reply,toolbar(),State};
+
+handle_call({start_tools,Env,Input},_,State)->
+ {NewState,Page}=start_tools_page(Env,Input,State),
+ {reply,Page,NewState};
+
+handle_call({stop_tools,Env,Input},_,State)->
+ {NewState,Page}=stop_tools_page(Env,Input,State),
+ {reply,Page,NewState};
+
+handle_call(stoppit,_From,Data)->
+ {stop,normal,ok,Data};
+
+handle_call(is_localhost,_From,Data)->
+ Result=case proplists:get_value(bind_address, Data#state.web_data) of
+ ?DEFAULT_ADDR ->
+ true;
+ _IpNumber ->
+ false
+ end,
+ {reply,Result,Data}.
+
+
+handle_info(_Message,State)->
+ {noreply,State}.
+
+handle_cast(_Request,State)->
+ {noreply,State}.
+
+code_change(_,State,_)->
+ {ok,State}.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The other functions needed by the gen_server behaviour
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%----------------------------------------------------------------------
+% Start the gen_server
+%----------------------------------------------------------------------
+init({Path,Config})->
+ case filelib:is_dir(Path) of
+ true ->
+ {ok, Table} = get_tool_files_data(),
+ insert_app(?WEBTOOL_ALIAS, Table),
+ case ct_webtool_sup:start_link() of
+ {ok, Pid} ->
+ case start_webserver(Table, Path, Config) of
+ {ok, _} ->
+ print_url(Config),
+ {ok,#state{priv_dir=Path,
+ app_data=Table,
+ supvis=Pid,
+ web_data=Config}};
+ {error, Error} ->
+ {stop, {error, Error}}
+ end;
+ Error ->
+ {stop,Error}
+ end;
+ false ->
+ {stop, {error, error_dir}}
+ end.
+
+terminate(_Reason,Data)->
+ %%shut down the webbserver
+ shutdown_server(Data),
+ %%Shutdown the different tools that are started with application:start
+ shutdown_apps(Data),
+ %%Shutdown the supervisor and its children will die
+ shutdown_supervisor(Data),
+ ok.
+
+print_url(ConfigData)->
+ Server=proplists:get_value(server_name,ConfigData,"undefined"),
+ Port=proplists:get_value(port,ConfigData,"undefined"),
+ {A,B,C,D}=proplists:get_value(bind_address,ConfigData,"undefined"),
+ io:format("WebTool is available at http://~s:~w/~n",[Server,Port]),
+ io:format("Or http://~w.~w.~w.~w:~w/~n",[A,B,C,D,Port]).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% begin build the pages
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------
+%The page that shows the started tools
+%----------------------------------------------------------------------
+started_tools_page(State)->
+ [?HEADER,?HTML_HEADER,started_tools(State),?HTML_END].
+
+toolbar()->
+ [?HEADER,?HTML_HEADER,toolbar_page(),?HTML_END].
+
+
+start_tools_page(_Env,Input,State)->
+ %%io:format("~n======= ~n ~p ~n============~n",[Input]),
+ case get_tools(Input) of
+ {tools,Tools}->
+ %%io:format("~n======= ~n ~p ~n============~n",[Tools]),
+ {ok,NewState}=handle_apps(Tools,State,start),
+ {NewState,[?HEADER,?HTML_HEADER_RELOAD,reload_started_apps(),
+ show_unstarted_apps(NewState),?HTML_END]};
+ _ ->
+ {State,[?HEADER,?HTML_HEADER,show_unstarted_apps(State),?HTML_END]}
+ end.
+
+stop_tools_page(_Env,Input,State)->
+ case get_tools(Input) of
+ {tools,Tools}->
+ {ok,NewState}=handle_apps(Tools,State,stop),
+ {NewState,[?HEADER,?HTML_HEADER_RELOAD,reload_started_apps(),
+ show_started_apps(NewState),?HTML_END]};
+ _ ->
+ {State,[?HEADER,?HTML_HEADER,show_started_apps(State),?HTML_END]}
+ end.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Functions that start and config the webserver
+%% 1. Collect the config data
+%% 2. Start webserver
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------
+% Start the webserver
+%----------------------------------------------------------------------
+start_webserver(Data,Path,Config)->
+ case get_conf_data(Data,Path,Config) of
+ {ok,Conf_data}->
+ %%io:format("Conf_data: ~p~n",[Conf_data]),
+ start_server(Conf_data);
+ {error,Error} ->
+ {error,{error_server_conf_file,Error}}
+ end.
+
+start_server(Conf_data)->
+ case inets:start(httpd, Conf_data, stand_alone) of
+ {ok,Pid}->
+ {ok,Pid};
+ Error->
+ {error,{server_error,Error}}
+ end.
+
+%----------------------------------------------------------------------
+% Create config data for the webserver
+%----------------------------------------------------------------------
+get_conf_data(Data,Path,Config)->
+ Aliases=get_aliases(Data),
+ ServerRoot = filename:join([Path,"root"]),
+ MimeTypesFile = filename:join([ServerRoot,"conf","mime.types"]),
+ case httpd_conf:load_mime_types(MimeTypesFile) of
+ {ok,MimeTypes} ->
+ Config1 = Config ++ Aliases,
+ Config2 = [{server_root,ServerRoot},
+ {document_root,filename:join([Path,"root/doc"])},
+ {mime_types,MimeTypes} |
+ Config1],
+ {ok,Config2};
+ Error ->
+ Error
+ end.
+
+%----------------------------------------------------------------------
+% Control the path for *.tools files
+%----------------------------------------------------------------------
+get_tool_files_data()->
+ Tools=get_tools1(code:get_path()),
+ %%io:format("Data : ~p ~n",[Tools]),
+ get_file_content(Tools).
+
+%----------------------------------------------------------------------
+%Control that the data in the file really is erlang terms
+%----------------------------------------------------------------------
+get_file_content(Tools)->
+ Get_data=fun({tool,ToolData}) ->
+ %%io:format("Data : ~p ~n",[ToolData]),
+ case proplists:get_value(config_func,ToolData) of
+ {M,F,A}->
+ case catch apply(M,F,A) of
+ {'EXIT',_} ->
+ bad_data;
+ Data when is_tuple(Data) ->
+ Data;
+ _->
+ bad_data
+ end;
+ _ ->
+ bad_data
+ end
+ end,
+ insert_file_content([X ||X<-lists:map(Get_data,Tools),X/=bad_data]).
+
+%----------------------------------------------------------------------
+%Insert the data from the file in to the ets:table
+%----------------------------------------------------------------------
+insert_file_content(Content)->
+ Table=ets:new(app_data,[bag]),
+ lists:foreach(fun(X)->
+ insert_app(X,Table)
+ end,Content),
+ {ok,Table}.
+
+%----------------------------------------------------------------------
+%Control that we got a a tuple of a atom and a list if so add the
+%elements in the list to the ets:table
+%----------------------------------------------------------------------
+insert_app({Name,Key_val_list},Table) when is_list(Key_val_list),is_atom(Name)->
+ %%io:format("ToolData: ~p: ~p~n",[Name,Key_val_list]),
+ lists:foreach(
+ fun({alias,{erl_alias,Alias,Mods}}) ->
+ Key_val = {erl_script_alias,{Alias,Mods}},
+ %%io:format("Insert: ~p~n",[Key_val]),
+ ets:insert(Table,{Name,Key_val});
+ (Key_val_pair)->
+ %%io:format("Insert: ~p~n",[Key_val_pair]),
+ ets:insert(Table,{Name,Key_val_pair})
+ end,
+ Key_val_list);
+
+insert_app(_,_)->
+ ok.
+
+%----------------------------------------------------------------------
+% Select all the alias in the database
+%----------------------------------------------------------------------
+get_aliases(Data)->
+ MS = ets:fun2ms(fun({_,{erl_script_alias,Alias}}) ->
+ {erl_script_alias,Alias};
+ ({_,{alias,Alias}}) ->
+ {alias,Alias}
+ end),
+ ets:select(Data,MS).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% Helper functions %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+get_standard_data(Port)->
+ [
+ {port,Port},
+ {bind_address,?DEFAULT_ADDR},
+ {server_name,"localhost"}
+ ].
+
+get_standard_data()->
+ case get_free_port(?DEFAULT_PORT,?MAX_NUMBER_OF_WEBTOOLS) of
+ {error,Reason} -> {error,Reason};
+ Port ->
+ [
+ {port,Port},
+ {bind_address,?DEFAULT_ADDR},
+ {server_name,"localhost"}
+ ]
+ end.
+
+get_free_port(_Port,0) ->
+ {error,no_free_port_found};
+get_free_port(Port,N) ->
+ case gen_tcp:connect("localhost",Port,[]) of
+ {error, _Reason} ->
+ Port;
+ {ok,Sock} ->
+ gen_tcp:close(Sock),
+ get_free_port(Port+1,N-1)
+ end.
+
+rest_of_standard_data() ->
+ [
+ %% Do not allow the server to be crashed by malformed http-request
+ {max_header_siz,1024},
+ {max_header_action,reply414},
+ %% Go on a straight ip-socket
+ {com_type,ip_comm},
+ %% Do not change the order of these module names!!
+ {modules,[mod_alias,
+ mod_auth,
+ mod_esi,
+ mod_actions,
+ mod_cgi,
+ mod_include,
+ mod_dir,
+ mod_get,
+ mod_head,
+ mod_log,
+ mod_disk_log]},
+ {directory_index,["index.html"]},
+ {default_type,"text/plain"}
+ ].
+
+
+get_path()->
+ code:priv_dir(webtool).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% These functions is used to shutdown the webserver
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------
+% Shut down the webbserver
+%----------------------------------------------------------------------
+shutdown_server(State)->
+ {Addr,Port} = get_addr_and_port(State#state.web_data),
+ inets:stop(httpd,{Addr,Port}).
+
+get_addr_and_port(Config) ->
+ Addr = proplists:get_value(bind_address,Config,?DEFAULT_ADDR),
+ Port = proplists:get_value(port,Config,?DEFAULT_PORT),
+ {Addr,Port}.
+
+%----------------------------------------------------------------------
+% Select all apps in the table and close them
+%----------------------------------------------------------------------
+shutdown_apps(State)->
+ Data=State#state.app_data,
+ MS = ets:fun2ms(fun({_,{start,HowToStart}}) -> HowToStart end),
+ lists:foreach(fun(Start_app)->
+ stop_app(Start_app)
+ end,
+ ets:select(Data,MS)).
+
+%----------------------------------------------------------------------
+%Shuts down the supervisor that supervises tools that is not
+%Designed as applications
+%----------------------------------------------------------------------
+shutdown_supervisor(State)->
+ %io:format("~n==================~n"),
+ ct_webtool_sup:stop(State#state.supvis).
+ %io:format("~n==================~n").
+
+%----------------------------------------------------------------------
+%close the individual apps.
+%----------------------------------------------------------------------
+stop_app({child,_Real_name})->
+ ok;
+
+stop_app({app,Real_name})->
+ application:stop(Real_name);
+
+stop_app({func,_Start,Stop})->
+ case Stop of
+ {M,F,A} ->
+ catch apply(M,F,A);
+ _NoStop ->
+ ok
+ end.
+
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% These functions creates the webpage where the user can select if
+%% to start apps or to stop apps
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+toolbar_page()->
+ "<TABLE>
+ <TR>
+ <TD>
+ <B>Select Action</B>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A HREF=\"./start_tools\" TARGET=right> Start Tools</A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A HREF=\"./stop_tools\" TARGET=right> Stop Tools</A>
+ </TD>
+ </TR>
+ </TABLE>".
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% These functions creates the webbpage that shows the started apps
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------
+% started_tools(State)->String (html table)
+% State is a record of type state
+%----------------------------------------------------------------------
+started_tools(State)->
+ Names=get_started_apps(State#state.app_data,State#state.started),
+ "<TABLE BORDER=1 WIDTH=100%>
+ "++ make_rows(Names,[],0) ++"
+ </TABLE>".
+%----------------------------------------------------------------------
+%get_started_apps(Data,Started)-> [{web_name,link}]
+%selects the started apps from the ets table of apps.
+%----------------------------------------------------------------------
+
+get_started_apps(Data,Started)->
+ SelectData=fun({Name,Link}) ->
+ {Name,Link}
+ end,
+ MS = lists:map(fun(A) -> {{A,{web_data,'$1'}},[],['$1']} end,Started),
+
+ [{"WebTool","/tool_management.html"} |
+ [SelectData(X) || X <- ets:select(Data,MS)]].
+
+%----------------------------------------------------------------------
+% make_rows(List,Result,Fields)-> String (The rows of a htmltable
+% List a list of tupler discibed above
+% Result an accumulator for the result
+% Field, counter that counts the number of cols in each row.
+%----------------------------------------------------------------------
+make_rows([],Result,Fields)->
+ Result ++ fill_out(Fields);
+make_rows([Data|Paths],Result,Field)when Field==0->
+ make_rows(Paths,Result ++ "<TR>" ++ make_field(Data),Field+1);
+
+make_rows([Path|Paths],Result,Field)when Field==4->
+ make_rows(Paths,Result ++ make_field(Path) ++ "</TR>",0);
+
+make_rows([Path|Paths],Result,Field)->
+ make_rows(Paths,Result ++ make_field(Path),Field+1).
+
+%----------------------------------------------------------------------
+% make_fields(Path)-> String that is a field i a html table
+% Path is a name url tuple {Name,url}
+%----------------------------------------------------------------------
+make_field(Path)->
+ "<TD WIDTH=20%>" ++ get_name(Path) ++ "</TD>".
+
+
+%----------------------------------------------------------------------
+%get_name({Nae,Url})->String that represents a <A> tag in html.
+%----------------------------------------------------------------------
+get_name({Name,Url})->
+ "<A HREF=\"" ++ Url ++ "\" TARGET=app_frame>" ++ Name ++ "</A>".
+
+
+%----------------------------------------------------------------------
+% fill_out(Nr)-> String, that represent Nr fields in a html-table.
+%----------------------------------------------------------------------
+fill_out(Nr)when Nr==0->
+ [];
+fill_out(Nr)when Nr==4->
+ "<TD WIDTH=\"20%\" >&nbsp</TD></TR>";
+
+fill_out(Nr)->
+ "<TD WIDTH=\"20%\">&nbsp</TD>" ++ fill_out(Nr+1).
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%These functions starts applicatons and builds the page showing tools
+%%to start
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%----------------------------------------------------------------------
+%Controls whether the user selected a tool to start
+%----------------------------------------------------------------------
+get_tools(Input)->
+ case httpd:parse_query(Input) of
+ []->
+ no_tools;
+ Tools->
+ FormatData=fun({_Name,Data}) -> list_to_atom(Data) end,
+ SelectData=
+ fun({Name,_Data}) -> string:equal(Name,"app") end,
+ {tools,[FormatData(X)||X<-Tools,SelectData(X)]}
+ end.
+
+%----------------------------------------------------------------------
+% Selects the data to start the applications the user has ordered
+% starting of
+%----------------------------------------------------------------------
+handle_apps([],State,_Cmd)->
+ {ok,State};
+
+handle_apps([Tool|Tools],State,Cmd)->
+ case ets:match_object(State#state.app_data,{Tool,{start,'_'}}) of
+ []->
+ Started = case Cmd of
+ start ->
+ [Tool|State#state.started];
+ stop ->
+ lists:delete(Tool,State#state.started)
+ end,
+ {ok,#state{priv_dir=State#state.priv_dir,
+ app_data=State#state.app_data,
+ supvis=State#state.supvis,
+ web_data=State#state.web_data,
+ started=Started}};
+ ToStart ->
+ case handle_apps2(ToStart,State,Cmd) of
+ {ok,NewState}->
+ handle_apps(Tools,NewState,Cmd);
+ _->
+ handle_apps(Tools,State,Cmd)
+ end
+ end.
+
+%----------------------------------------------------------------------
+%execute every start or stop data about a tool.
+%----------------------------------------------------------------------
+handle_apps2([{Name,Start_data}],State,Cmd)->
+ case handle_app({Name,Start_data},State#state.app_data,State#state.supvis,Cmd) of
+ ok->
+ Started = case Cmd of
+ start ->
+ [Name|State#state.started];
+ stop ->
+
+ lists:delete(Name,State#state.started)
+ end,
+ {ok,#state{priv_dir=State#state.priv_dir,
+ app_data=State#state.app_data,
+ supvis=State#state.supvis,
+ web_data=State#state.web_data,
+ started=Started}};
+ _->
+ error
+ end;
+
+handle_apps2([{Name,Start_data}|Rest],State,Cmd)->
+ case handle_app({Name,Start_data},State#state.app_data,State#state.supvis,Cmd)of
+ ok->
+ handle_apps2(Rest,State,Cmd);
+ _->
+ error
+ end.
+
+
+%----------------------------------------------------------------------
+% Handle start and stop of applications
+%----------------------------------------------------------------------
+
+handle_app({Name,{start,{func,Start,Stop}}},Data,_Pid,Cmd)->
+ Action = case Cmd of
+ start ->
+ Start;
+ _ ->
+ Stop
+ end,
+ case Action of
+ {M,F,A} ->
+ case catch apply(M,F,A) of
+ {'EXIT',_} = Exit->
+ %%! Here the tool disappears from the webtool interface!!
+ io:format("\n=======ERROR (webtool, line ~w) =======\n"
+ "Could not start application \'~p\'\n\n"
+ "~w:~w(~s) ->\n"
+ "~p\n\n",
+ [?LINE,Name,M,F,format_args(A),Exit]),
+ ets:delete(Data,Name);
+ _OK->
+ ok
+ end;
+ _NoStart ->
+ ok
+ end;
+
+
+handle_app({Name,{start,{child,ChildSpec}}},Data,Pid,Cmd)->
+ case Cmd of
+ start ->
+ case catch supervisor:start_child(Pid,ChildSpec) of
+ {ok,_}->
+ ok;
+ {ok,_,_}->
+ ok;
+ {error,Reason}->
+ %%! Here the tool disappears from the webtool interface!!
+ io:format("\n=======ERROR (webtool, line ~w) =======\n"
+ "Could not start application \'~p\'\n\n"
+ "supervisor:start_child(~p,~p) ->\n"
+ "~p\n\n",
+ [?LINE,Name,Pid,ChildSpec,{error,Reason}]),
+ ets:delete(Data,Name);
+ Error ->
+ %%! Here the tool disappears from the webtool interface!!
+ io:format("\n=======ERROR (webtool, line ~w) =======\n"
+ "Could not start application \'~p\'\n\n"
+ "supervisor:start_child(~p,~p) ->\n"
+ "~p\n\n",
+ [?LINE,Name,Pid,ChildSpec,Error]),
+ ets:delete(Data,Name)
+ end;
+ stop ->
+ case catch supervisor:terminate_child(websup,element(1,ChildSpec)) of
+ ok ->
+ supervisor:delete_child(websup,element(1,ChildSpec));
+ _ ->
+ error
+ end
+ end;
+
+
+
+handle_app({Name,{start,{app,Real_name}}},Data,_Pid,Cmd)->
+ case Cmd of
+ start ->
+ case application:start(Real_name,temporary) of
+ ok->
+ io:write(Name),
+ ok;
+ {error,{already_started,_}}->
+ %% Remove it from the database so we dont start
+ %% anything already started
+ ets:match_delete(Data,{Name,{start,{app,Real_name}}}),
+ ok;
+ {error,_Reason}=Error->
+ %%! Here the tool disappears from the webtool interface!!
+ io:format("\n=======ERROR (webtool, line ~w) =======\n"
+ "Could not start application \'~p\'\n\n"
+ "application:start(~p,~p) ->\n"
+ "~p\n\n",
+ [?LINE,Name,Real_name,temporary,Error]),
+ ets:delete(Data,Name)
+ end;
+
+ stop ->
+ application:stop(Real_name)
+ end;
+
+%----------------------------------------------------------------------
+% If the data is incorrect delete the app
+%----------------------------------------------------------------------
+handle_app({Name,Incorrect},Data,_Pid,Cmd)->
+ %%! Here the tool disappears from the webtool interface!!
+ io:format("\n=======ERROR (webtool, line ~w) =======\n"
+ "Could not ~w application \'~p\'\n\n"
+ "Incorrect data: ~p\n\n",
+ [?LINE,Cmd,Name,Incorrect]),
+ ets:delete(Data,Name).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% this functions creates the page that shows the unstarted tools %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+reload_started_apps()->
+ "<script>
+ function reloadCompiledList()
+ {
+ parent.parent.top1.document.location.href=\"/webtool/webtool/started_tools\";
+ }
+ </script>".
+
+show_unstarted_apps(State)->
+ "<TABLE HEIGHT=100% WIDTH=100% BORDER=0>
+ <TR HEIGHT=80%><TD ALIGN=\"center\" VALIGN=\"middle\">
+ <FORM NAME=\"stop_apps\" ACTION=\"/webtool/webtool/start_tools\" >
+ <TABLE BORDER=1 WIDTH=60%>
+ <TR BGCOLOR=\"#8899AA\">
+ <TD ALIGN=CENTER COLSPAN=2><FONT SIZE=4>Available Tools<FONT></TD>
+ </TR>
+ <TR>
+ <TD WIDTH=50%>
+ <TABLE BORDER=0>
+ "++ list_available_apps(State)++"
+ <TR><TD COLSPAN=2>&nbsp;</TD></TR>
+ <TR>
+ <TD COLSPAN=2 ALIGN=\"center\">
+ <INPUT TYPE=submit VALUE=\"Start\">
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ <TD>
+ To Start a Tool:
+ <UL>
+ <LI>Select the
+ checkbox for each tool to
+ start.</LI>
+ <LI>Click on the
+ button marked <EM>Start</EM>.</LI></UL>
+ </TD>
+ </TR>
+ </TABLE>
+ </FORM>
+ </TD></TR>
+ <TR><TD>&nbsp;</TD></TR>
+ </TABLE>".
+
+
+
+list_available_apps(State)->
+ MS = ets:fun2ms(fun({Tool,{web_data,{Name,_}}}) -> {Tool,Name} end),
+ Unstarted_apps=
+ lists:filter(
+ fun({Tool,_})->
+ false==lists:member(Tool,State#state.started)
+ end,
+ ets:select(State#state.app_data,MS)),
+ case Unstarted_apps of
+ []->
+ "<TR><TD>All tools are started</TD></TR>";
+ _->
+ list_apps(Unstarted_apps)
+ end.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% these functions creates the page that shows the started apps %%
+%% the user can select to shutdown %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+show_started_apps(State)->
+ "<TABLE HEIGHT=100% WIDTH=100% BORDER=0>
+ <TR HEIGHT=80%><TD ALIGN=\"center\" VALIGN=\"middle\">
+ <FORM NAME=\"stop_apps\" ACTION=\"/webtool/webtool/stop_tools\" >
+ <TABLE BORDER=1 WIDTH=60%>
+ <TR BGCOLOR=\"#8899AA\">
+ <TD ALIGN=CENTER COLSPAN=2><FONT SIZE=4>Started Tools<FONT></TD>
+ </TR>
+ <TR>
+ <TD WIDTH=50%>
+ <TABLE BORDER=0>
+ "++ list_started_apps(State)++"
+ <TR><TD COLSPAN=2>&nbsp;</TD></TR>
+ <TR>
+ <TD COLSPAN=2 ALIGN=\"center\">
+ <INPUT TYPE=submit VALUE=\"Stop\">
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ <TD>
+ Stop a Tool:
+ <UL>
+ <LI>Select the
+ checkbox for each tool to
+ stop.</LI>
+ <LI>Click on the
+ button marked <EM>Stop</EM>.</LI></UL>
+ </TD>
+ </TR>
+ </TABLE>
+ </FORM>
+ </TD></TR>
+ <TR><TD>&nbsp;</TD></TR>
+ </TABLE>".
+
+list_started_apps(State)->
+ MS = lists:map(fun(A) -> {{A,{web_data,{'$1','_'}}},[],[{{A,'$1'}}]} end,
+ State#state.started),
+ Started_apps= ets:select(State#state.app_data,MS),
+ case Started_apps of
+ []->
+ "<TR><TD>No tool is started yet.</TD></TR>";
+ _->
+ list_apps(Started_apps)
+ end.
+
+
+list_apps(Apps) ->
+ lists:map(fun({Tool,Name})->
+ "<TR><TD>
+ <INPUT TYPE=\"checkbox\" NAME=\"app\" VALUE=\""
+ ++ atom_to_list(Tool) ++ "\">
+ " ++ Name ++ "
+ </TD></TR>"
+ end,
+ Apps).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%
+%% Collecting the data from the *.tool files %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%----------------------------------------
+% get_tools(Dirs) => [{M,F,A},{M,F,A}...{M,F,A}]
+% Dirs - [string()] Directory names
+% Calls get_tools2/2 recursively for a number of directories
+% to retireve the configuration data for the web based tools.
+%----------------------------------------
+get_tools1(Dirs)->
+ get_tools1(Dirs,[]).
+
+get_tools1([Dir|Rest],Data) when is_list(Dir) ->
+ Tools=case filename:basename(Dir) of
+ %% Dir is an 'ebin' directory, check in '../priv' as well
+ "ebin" ->
+ [get_tools2(filename:join(filename:dirname(Dir),"priv")) |
+ get_tools2(Dir)];
+ _ ->
+ get_tools2(Dir)
+ end,
+ get_tools1(Rest,[Tools|Data]);
+
+get_tools1([],Data) ->
+ lists:flatten(Data).
+
+%----------------------------------------
+% get_tools2(Directory) => DataList
+% DataList : [WebTuple]|[]
+% WebTuple: {tool,[{web,M,F,A}]}
+%
+%----------------------------------------
+get_tools2(Dir)->
+ get_tools2(tool_files(Dir),[]).
+
+get_tools2([ToolFile|Rest],Data) ->
+ case get_tools3(ToolFile) of
+ {tool,WebData} ->
+ get_tools2(Rest,[{tool,WebData}|Data]);
+ {error,_Reason} ->
+ get_tools2(Rest,Data);
+ nodata ->
+ get_tools2(Rest,Data)
+ end;
+
+get_tools2([],Data) ->
+ Data.
+
+%----------------------------------------
+% get_tools3(ToolFile) => {ok,Tool}|{error,Reason}|nodata
+% Tool: {tool,[KeyValTuple]}
+% ToolFile - string() A .tool file
+% Now we have the file get the data and sort it out
+%----------------------------------------
+get_tools3(ToolFile) ->
+ case file:consult(ToolFile) of
+ {error,open} ->
+ {error,nofile};
+ {error,read} ->
+ {error,format};
+ {ok,[{version,"1.2"},ToolInfo]} when is_list(ToolInfo)->
+ webdata(ToolInfo);
+ {ok,[{version,_Vsn},_Info]} ->
+ {error,old_version};
+ {ok,_Other} ->
+ {error,format}
+ end.
+
+
+%----------------------------------------------------------------------
+% webdata(TupleList)-> ToolTuple| nodata
+% ToolTuple: {tool,[{config_func,{M,F,A}}]}
+%
+% There are a little unneccesary work in this format but it is extendable
+%----------------------------------------------------------------------
+webdata(TupleList)->
+ case proplists:get_value(config_func,TupleList,nodata) of
+ {M,F,A} ->
+ {tool,[{config_func,{M,F,A}}]};
+ _ ->
+ nodata
+ end.
+
+
+%=============================================================================
+% Functions for getting *.tool configuration files
+%=============================================================================
+
+%----------------------------------------
+% tool_files(Dir) => ToolFiles
+% Dir - string() Directory name
+% ToolFiles - [string()]
+% Return the list of all files in Dir ending with .tool (appended to Dir)
+%----------------------------------------
+tool_files(Dir) ->
+ case file:list_dir(Dir) of
+ {ok,Files} ->
+ filter_tool_files(Dir,Files);
+ {error,_Reason} ->
+ []
+ end.
+
+%----------------------------------------
+% filter_tool_files(Dir,Files) => ToolFiles
+% Dir - string() Directory name
+% Files, ToolFiles - [string()] File names
+% Filters out the files in Files ending with .tool and append them to Dir
+%----------------------------------------
+filter_tool_files(_Dir,[]) ->
+ [];
+filter_tool_files(Dir,[File|Rest]) ->
+ case filename:extension(File) of
+ ".tool" ->
+ [filename:join(Dir,File)|filter_tool_files(Dir,Rest)];
+ _ ->
+ filter_tool_files(Dir,Rest)
+ end.
+
+
+%%%-----------------------------------------------------------------
+%%% format functions
+ffunc({M,F,A}) when is_list(A) ->
+ io_lib:format("~w:~w(~s)\n",[M,F,format_args(A)]);
+ffunc({M,F,A}) when is_integer(A) ->
+ io_lib:format("~w:~w/~w\n",[M,F,A]).
+
+format_args([]) ->
+ "";
+format_args(Args) ->
+ Str = lists:append(["~p"|lists:duplicate(length(Args)-1,",~p")]),
+ io_lib:format(Str,Args).
diff --git a/lib/common_test/src/ct_webtool_sup.erl b/lib/common_test/src/ct_webtool_sup.erl
new file mode 100644
index 0000000000..1d612a2d18
--- /dev/null
+++ b/lib/common_test/src/ct_webtool_sup.erl
@@ -0,0 +1,74 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(ct_webtool_sup).
+
+-behaviour(supervisor).
+
+%% External exports
+-export([start_link/0,stop/1]).
+
+%% supervisor callbacks
+-export([init/1]).
+
+%%%----------------------------------------------------------------------
+%%% API
+%%%----------------------------------------------------------------------
+start_link() ->
+ supervisor:start_link({local,ct_websup},ct_webtool_sup, []).
+
+stop(Pid)->
+ exit(Pid,normal).
+%%%----------------------------------------------------------------------
+%%% Callback functions from supervisor
+%%%----------------------------------------------------------------------
+
+%%----------------------------------------------------------------------
+%% Func: init/1
+%% Returns: {ok, {SupFlags, [ChildSpec]}} |
+%% ignore |
+%% {error, Reason}
+%%----------------------------------------------------------------------
+init(_StartArgs) ->
+ %%Child1 =
+ %%Child2 ={webcover_backend,{webcover_backend,start_link,[]},permanent,2000,worker,[webcover_backend]},
+ %%{ok,{{simple_one_for_one,5,10},[Child1]}}.
+ {ok,{{one_for_one,100,10},[]}}.
+
+%%%----------------------------------------------------------------------
+%%% Internal functions
+%%%----------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/common_test/src/cth_conn_log.erl b/lib/common_test/src/cth_conn_log.erl
index 644594e34d..1e60f2751e 100644
--- a/lib/common_test/src/cth_conn_log.erl
+++ b/lib/common_test/src/cth_conn_log.erl
@@ -56,11 +56,29 @@
pre_init_per_testcase/3,
post_end_per_testcase/4]).
+%%----------------------------------------------------------------------
+%% Exported types
+%%----------------------------------------------------------------------
+-export_type([hook_options/0,
+ log_type/0,
+ conn_mod/0]).
+
+%%----------------------------------------------------------------------
+%% Type declarations
+%%----------------------------------------------------------------------
+-type hook_options() :: [hook_option()].
+%% Options that can be given to `cth_conn_log' in the `ct_hook' statement.
+-type hook_option() :: {log_type,log_type()} |
+ {hosts,[ct_gen_conn:key_or_name()]}.
+-type log_type() :: raw | pretty | html | silent.
+-type conn_mod() :: ct_netconfc | ct_telnet.
+%%----------------------------------------------------------------------
+
-spec init(Id, HookOpts) -> Result when
Id :: term(),
- HookOpts :: ct_netconfc:hook_options(),
- Result :: {ok,[{ct_netconfc:conn_mod(),
- {ct_netconfc:log_type(),[ct_netconfc:key_or_name()]}}]}.
+ HookOpts :: hook_options(),
+ Result :: {ok,[{conn_mod(),
+ {log_type(),[ct_gen_conn:key_or_name()]}}]}.
init(_Id, HookOpts) ->
ConfOpts = ct:get_config(ct_conn_log,[]),
{ok,merge_log_info(ConfOpts,HookOpts)}.
@@ -73,20 +91,23 @@ merge_log_info([{Mod,ConfOpts}|ConfList],HookList) ->
{value,{_,HookOpts},HL1} ->
{ConfOpts ++ HookOpts, HL1} % ConfOpts overwrites HookOpts!
end,
- [{Mod,get_log_opts(Opts)} | merge_log_info(ConfList,HookList1)];
+ [{Mod,get_log_opts(Mod,Opts)} | merge_log_info(ConfList,HookList1)];
merge_log_info([],HookList) ->
- [{Mod,get_log_opts(Opts)} || {Mod,Opts} <- HookList].
+ [{Mod,get_log_opts(Mod,Opts)} || {Mod,Opts} <- HookList].
-get_log_opts(Opts) ->
- LogType = proplists:get_value(log_type,Opts,html),
+get_log_opts(Mod,Opts) ->
+ DefaultLogType = if Mod == ct_telnet -> raw;
+ true -> html
+ end,
+ LogType = proplists:get_value(log_type,Opts,DefaultLogType),
Hosts = proplists:get_value(hosts,Opts,[]),
{LogType,Hosts}.
-
pre_init_per_testcase(TestCase,Config,CthState) ->
Logs =
lists:map(
- fun({ConnMod,{LogType,Hosts}}) ->
+ fun({ConnMod,{LogType,Hosts}}) ->
+ ct_util:set_testdata({{?MODULE,ConnMod},LogType}),
case LogType of
LogType when LogType==raw; LogType==pretty ->
Dir = ?config(priv_dir,Config),
@@ -117,9 +138,44 @@ pre_init_per_testcase(TestCase,Config,CthState) ->
end
end,
CthState),
- error_logger:add_report_handler(ct_conn_log_h,{group_leader(),Logs}),
+
+ GL = group_leader(),
+ Update =
+ fun(Init) when Init == undefined; Init == [] ->
+ error_logger:add_report_handler(ct_conn_log_h,{GL,Logs}),
+ [TestCase];
+ (PrevUsers) ->
+ error_logger:info_report(update,{GL,Logs}),
+ receive
+ {updated,GL} ->
+ [TestCase|PrevUsers]
+ after
+ 5000 ->
+ {error,no_response}
+ end
+ end,
+ ct_util:update_testdata(?MODULE, Update, [create]),
{Config,CthState}.
-post_end_per_testcase(_TestCase,_Config,Return,CthState) ->
- error_logger:delete_report_handler(ct_conn_log_h),
+post_end_per_testcase(TestCase,_Config,Return,CthState) ->
+ Update =
+ fun(PrevUsers) ->
+ case lists:delete(TestCase, PrevUsers) of
+ [] ->
+ '$delete';
+ PrevUsers1 ->
+ PrevUsers1
+ end
+ end,
+ case ct_util:update_testdata(?MODULE, Update) of
+ deleted ->
+ [ct_util:delete_testdata({?MODULE,ConnMod}) ||
+ {ConnMod,_} <- CthState],
+ error_logger:delete_report_handler(ct_conn_log_h);
+ {error,no_response} ->
+ exit({?MODULE,no_response_from_logger});
+ _PrevUsers ->
+ ok
+ end,
{Return,CthState}.
+
diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl
index 7ed2018bdf..bb12171ea7 100644
--- a/lib/common_test/src/cth_surefire.erl
+++ b/lib/common_test/src/cth_surefire.erl
@@ -79,6 +79,10 @@ init(Path, Opts) ->
url_base = proplists:get_value(url_base,Opts),
timer = now() }.
+pre_init_per_suite(Suite,SkipOrFail,State) when is_tuple(SkipOrFail) ->
+ {SkipOrFail, init_tc(State#state{curr_suite = Suite,
+ curr_suite_ts = now()},
+ SkipOrFail) };
pre_init_per_suite(Suite,Config,#state{ test_cases = [] } = State) ->
TcLog = proplists:get_value(tc_logfile,Config),
CurrLogDir = filename:dirname(TcLog),
diff --git a/lib/common_test/src/unix_telnet.erl b/lib/common_test/src/unix_telnet.erl
index 88199b07d0..09b6fd1510 100644
--- a/lib/common_test/src/unix_telnet.erl
+++ b/lib/common_test/src/unix_telnet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,8 +17,8 @@
%% %CopyrightEnd%
%%
-%%% @doc Callback module for ct_telnet for talking telnet
-%%% to a unix host.
+%%% @doc Callback module for ct_telnet, for connecting to a telnet
+%%% server on a unix host.
%%%
%%% <p>It requires the following entry in the config file:</p>
%%% <pre>
@@ -28,15 +28,15 @@
%%% {password,Password},
%%% {keep_alive,Bool}]}. % optional</pre>
%%%
-%%% <p>To talk telnet to the host specified by
+%%% <p>To communicate via telnet to the host specified by
%%% <code>HostNameOrIpAddress</code>, use the interface functions in
-%%% <code>ct</code>, e.g. <code>open(Name), cmd(Name,Cmd), ...</code>.</p>
+%%% <code>ct_telnet</code>, e.g. <code>open(Name), cmd(Name,Cmd), ...</code>.</p>
%%%
%%% <p><code>Name</code> is the name you allocated to the unix host in
%%% your <code>require</code> statement. E.g.</p>
-%%% <pre> suite() -> [{require,Name,{unix,[telnet,username,password]}}].</pre>
+%%% <pre> suite() -> [{require,Name,{unix,[telnet]}}].</pre>
%%% <p>or</p>
-%%% <pre> ct:require(Name,{unix,[telnet,username,password]}).</pre>
+%%% <pre> ct:require(Name,{unix,[telnet]}).</pre>
%%%
%%% <p>The "keep alive" activity (i.e. that Common Test sends NOP to the server
%%% every 10 seconds if the connection is idle) may be enabled or disabled for one
@@ -54,94 +54,106 @@
-compile(export_all).
%% Callbacks for ct_telnet.erl
--export([connect/5,get_prompt_regexp/0]).
--import(ct_telnet,[start_log/1,cont_log/2,end_log/0]).
+-export([connect/6,get_prompt_regexp/0]).
+-import(ct_telnet,[start_gen_log/1,log/4,end_gen_log/0]).
-define(username,"login: ").
-define(password,"Password: ").
-define(prx,"login: |Password: |\\\$ |> ").
%%%-----------------------------------------------------------------
-%%% @hidden
%%% @spec get_prompt_regexp() -> PromptRegexp
%%% PromptRegexp = ct_telnet:prompt_regexp()
%%%
%%% @doc Callback for ct_telnet.erl.
%%%
-%%% <p>Return the prompt regexp for telnet connections to the
-%%% interwatch instrument.</p>
+%%% <p>Return a suitable regexp string that will match common
+%%% prompts for users on unix hosts.</p>
get_prompt_regexp() ->
?prx.
%%%-----------------------------------------------------------------
-%%% @hidden
-%%% @spec connect(Ip,Port,Timeout,KeepAlive,Extra) -> {ok,Handle} | {error,Reason}
+%%% @spec connect(ConnName,Ip,Port,Timeout,KeepAlive,Extra) ->
+%%% {ok,Handle} | {error,Reason}
+%%% ConnName = ct:target_name()
%%% Ip = string() | {integer(),integer(),integer(),integer()}
%%% Port = integer()
%%% Timeout = integer()
%%% KeepAlive = bool()
-%%% Extra = {Username,Password}
+%%% Extra = ct:target_name() | {Username,Password}
%%% Username = string()
%%% Password = string()
%%% Handle = ct_telnet:handle()
+%%% Reason = term()
%%%
%%% @doc Callback for ct_telnet.erl.
%%%
-%%% <p>Setup telnet connection to a UNIX host.</p>
-connect(Ip,Port,Timeout,KeepAlive,Extra) ->
+%%% <p>Setup telnet connection to a unix host.</p>
+connect(ConnName,Ip,Port,Timeout,KeepAlive,Extra) ->
case Extra of
{Username,Password} ->
- connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
- Name ->
- case get_username_and_password(Name) of
+ connect1(ConnName,Ip,Port,Timeout,KeepAlive,
+ Username,Password);
+ KeyOrName ->
+ case get_username_and_password(KeyOrName) of
{ok,{Username,Password}} ->
- connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
+ connect1(ConnName,Ip,Port,Timeout,KeepAlive,
+ Username,Password);
Error ->
Error
end
end.
-connect1(Ip,Port,Timeout,KeepAlive,Username,Password) ->
- start_log("unix_telnet:connect"),
+connect1(Name,Ip,Port,Timeout,KeepAlive,Username,Password) ->
+ start_gen_log("unix_telnet connect"),
Result =
- case ct_telnet_client:open(Ip,Port,Timeout,KeepAlive) of
+ case ct_telnet_client:open(Ip,Port,Timeout,KeepAlive,Name) of
{ok,Pid} ->
- case ct_telnet:silent_teln_expect(Pid,[],[prompt],?prx,[]) of
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ [prompt],?prx,[]) of
{ok,{prompt,?username},_} ->
+ log(Name,send,"Logging in to ~p:~p", [Ip,Port]),
ok = ct_telnet_client:send_data(Pid,Username),
- cont_log("Username: ~ts",[Username]),
- case ct_telnet:silent_teln_expect(Pid,[],prompt,?prx,[]) of
+ log(Name,send,"Username: ~ts",[Username]),
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ prompt,?prx,[]) of
{ok,{prompt,?password},_} ->
ok = ct_telnet_client:send_data(Pid,Password),
Stars = lists:duplicate(length(Password),$*),
- cont_log("Password: ~s",[Stars]),
- ok = ct_telnet_client:send_data(Pid,""),
- case ct_telnet:silent_teln_expect(Pid,[],prompt,
+ log(Name,send,"Password: ~s",[Stars]),
+% ok = ct_telnet_client:send_data(Pid,""),
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ prompt,
?prx,[]) of
{ok,{prompt,Prompt},_}
- when Prompt=/=?username, Prompt=/=?password ->
+ when Prompt=/=?username,
+ Prompt=/=?password ->
{ok,Pid};
Error ->
- cont_log("Password failed\n~p\n",
- [Error]),
+ log(Name,recv,"Password failed\n~p\n",
+ [Error]),
{error,Error}
end;
Error ->
- cont_log("Login failed\n~p\n",[Error]),
+ log(Name,recv,"Login to ~p:~p failed\n~p\n",[Ip,Port,Error]),
{error,Error}
end;
{ok,[{prompt,_OtherPrompt1},{prompt,_OtherPrompt2}],_} ->
{ok,Pid};
Error ->
- cont_log("Did not get expected prompt\n~p\n",[Error]),
+ log(Name,conn_error,
+ "Did not get expected prompt from ~p:~p\n~p\n",
+ [Ip,Port,Error]),
{error,Error}
end;
Error ->
- cont_log("Could not open telnet connection\n~p\n",[Error]),
+ log(Name,conn_error,
+ "Could not open telnet connection to ~p:~p\n~p\n",
+ [Ip,Port,Error]),
Error
end,
- end_log(),
+ end_gen_log(),
Result.
get_username_and_password(Name) ->
diff --git a/lib/common_test/src/vts.erl b/lib/common_test/src/vts.erl
index b340c6fdd1..ab13e7d0ee 100644
--- a/lib/common_test/src/vts.erl
+++ b/lib/common_test/src/vts.erl
@@ -63,21 +63,21 @@
%%%-----------------------------------------------------------------
%%% User API
start() ->
- webtool:start(),
- webtool:start_tools([],"app=vts").
+ ct_webtool:start(),
+ ct_webtool:start_tools([],"app=vts").
init_data(ConfigFiles,EvHandlers,LogDir,LogOpts,Tests) ->
call({init_data,ConfigFiles,EvHandlers,LogDir,LogOpts,Tests}).
stop() ->
- webtool:stop_tools([],"app=vts"),
- webtool:stop().
+ ct_webtool:stop_tools([],"app=vts"),
+ ct_webtool:stop().
report(What,Data) ->
call({report,What,Data}).
%%%-----------------------------------------------------------------
-%%% Return config data used by webtool
+%%% Return config data used by ct_webtool
config_data() ->
{ok,LogDir} =
case lists:keysearch(logdir,1,init:get_arguments()) of
diff --git a/lib/common_test/test/Makefile b/lib/common_test/test/Makefile
index 085f19d023..a0ac47f12a 100644
--- a/lib/common_test/test/Makefile
+++ b/lib/common_test/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2013. All Rights Reserved.
+# Copyright Ericsson AB 2008-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -61,6 +61,7 @@ MODULES= \
ct_snmp_SUITE \
ct_group_leader_SUITE \
ct_cover_SUITE \
+ ct_cover_nomerge_SUITE \
ct_groups_search_SUITE \
ct_surefire_SUITE \
ct_telnet_SUITE
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 8ee12a2e4d..c2e06d866f 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
@@ -73,7 +73,7 @@ test_get_known_variable(_)->
test_localtime_update(_)->
Seconds = 5,
LT1 = ct:get_config(localtime),
- timer:sleep(Seconds*1000),
+ ct:sleep(Seconds*1000),
LT2 = ct:reload_config(localtime),
case is_diff_ok(LT1, LT2, Seconds) of
{false, Actual, Exp}->
diff --git a/lib/common_test/test/ct_config_info_SUITE.erl b/lib/common_test/test/ct_config_info_SUITE.erl
index 8f2f0eb75f..9c242a41df 100644
--- a/lib/common_test/test/ct_config_info_SUITE.erl
+++ b/lib/common_test/test/ct_config_info_SUITE.erl
@@ -125,7 +125,7 @@ test_events(config_info) ->
[{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{config_info_1_SUITE,{init_per_group,g1,[]},
{failed,{timetrap_timeout,350}}}},
- {?eh,tc_auto_skip,{config_info_1_SUITE,t11,
+ {?eh,tc_auto_skip,{config_info_1_SUITE,{t11,g1},
{failed,{config_info_1_SUITE,init_per_group,{timetrap_timeout,350}}}}},
{?eh,tc_auto_skip,{config_info_1_SUITE,{end_per_group,g1},
{failed,{config_info_1_SUITE,init_per_group,
@@ -142,7 +142,7 @@ test_events(config_info) ->
[{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g4,[]}}},
{?eh,tc_done,{config_info_1_SUITE,{init_per_group,g4,[]},
{failed,{timetrap_timeout,400}}}},
- {?eh,tc_auto_skip,{config_info_1_SUITE,t41,
+ {?eh,tc_auto_skip,{config_info_1_SUITE,{t41,g4},
{failed,{config_info_1_SUITE,init_per_group,
{timetrap_timeout,400}}}}},
{?eh,tc_auto_skip,{config_info_1_SUITE,{end_per_group,g4},
diff --git a/lib/common_test/test/ct_cover_SUITE.erl b/lib/common_test/test/ct_cover_SUITE.erl
index ec2680f664..1dab425509 100644
--- a/lib/common_test/test/ct_cover_SUITE.erl
+++ b/lib/common_test/test/ct_cover_SUITE.erl
@@ -76,7 +76,12 @@ all() ->
cover_node_option,
ct_cover_add_remove_nodes,
otp_9956,
- cross
+ cross,
+ export_import,
+ relative_incl_dirs,
+ absolute_incl_dirs,
+ relative_excl_dirs,
+ absolute_excl_dirs
].
%%--------------------------------------------------------------------
@@ -172,8 +177,8 @@ cross(Config) ->
check_calls(Events2,1),
%% Get the log dirs for each test and run cross cover analyse
- [D11,D12] = lists:sort(get_run_dirs(Events1)),
- [D21,D22] = lists:sort(get_run_dirs(Events2)),
+ [D11,D12] = lists:sort(get_log_dirs(Events1)),
+ [D21,D22] = lists:sort(get_log_dirs(Events2)),
ct_cover:cross_cover_analyse(details,[{cross1,D11},{cross2,D21}]),
ct_cover:cross_cover_analyse(details,[{cross1,D12},{cross2,D22}]),
@@ -199,6 +204,59 @@ cross(Config) ->
ok.
+export_import(Config) ->
+ DataDir = ?config(data_dir,Config),
+ false = check_cover(Config),
+ CoverSpec1 =
+ default_cover_file_content() ++ [{export,"export_import.coverdata"}],
+ CoverFile1 = create_cover_file(export_import1,CoverSpec1,Config),
+ {ok,Events1} = run_test(export_import1,default,[{cover,CoverFile1}],Config),
+ check_calls(Events1,1),
+ CoverSpec2 =
+ default_cover_file_content() ++ [{import,"export_import.coverdata"}],
+ CoverFile2 = create_cover_file(export_import2,CoverSpec2,Config),
+ {ok,Events2} = run_test(export_import2,default,[{cover,CoverFile2}],Config),
+ check_calls(Events2,2),
+ ok.
+
+relative_incl_dirs(Config) ->
+ false = check_cover(Config),
+ RelDir = rel_path(?config(priv_dir, Config), ?config(data_dir, Config)),
+ CoverSpec = [{incl_dirs, [RelDir]}],
+ CoverFile = create_cover_file(rel_incl_dirs, CoverSpec, Config),
+ Opts = [{cover, CoverFile}],
+ {ok, Events} = run_test(rel_incl_dirs, default, Opts, Config),
+ check_calls(Events, 1),
+ ok.
+
+absolute_incl_dirs(Config) ->
+ false = check_cover(Config),
+ CoverSpec = [{incl_dirs, [?config(data_dir, Config)]}],
+ CoverFile = create_cover_file(abs_incl_dirs, CoverSpec, Config),
+ Opts = [{cover, CoverFile}],
+ {ok, Events} = run_test(abs_incl_dirs, default, Opts, Config),
+ check_calls(Events, 1),
+ ok.
+
+relative_excl_dirs(Config) ->
+ false = check_cover(Config),
+ RelDir = rel_path(?config(priv_dir, Config), ?config(data_dir, Config)),
+ CoverSpec = default_cover_file_content() ++ [{excl_dirs, [RelDir]}],
+ CoverFile = create_cover_file(rel_excl_dirs, CoverSpec, Config),
+ Opts = [{cover, CoverFile}],
+ {ok, Events} = run_test(rel_excl_dirs, default_no_cover, Opts, Config),
+ check_no_cover_compiled(Events),
+ ok.
+
+absolute_excl_dirs(Config) ->
+ false = check_cover(Config),
+ AbsDir = ?config(data_dir, Config),
+ CoverSpec = default_cover_file_content() ++ [{excl_dirs, [AbsDir]}],
+ CoverFile = create_cover_file(abs_excl_dirs, CoverSpec, Config),
+ Opts = [{cover, CoverFile}],
+ {ok, Events} = run_test(abs_excl_dirs, default_no_cover, Opts, Config),
+ check_no_cover_compiled(Events),
+ ok.
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
@@ -267,30 +325,42 @@ check_cover(Node) when is_atom(Node) ->
false
end.
-%% Get the log dir "run.<timestamp>" for all (both!) tests
-get_run_dirs(Events) ->
- [filename:dirname(TCLog) ||
+%% Get the log dir "ct_run.<timestamp>" for all (both!) tests
+get_log_dirs(Events) ->
+ [LogDir ||
{ct_test_support_eh,
- {event,tc_logfile,_Node,
- {{?suite,init_per_suite},TCLog}}} <- Events].
+ {event,start_logging,_Node,LogDir}} <- Events].
+
+%% Check if a module was compiled without cover
+check_no_cover_compiled(Events) ->
+ check_no_cover_compiled(Events, ?mod).
+check_no_cover_compiled(Events, Mod) ->
+ [ {error, {not_cover_compiled, Mod}} = analyse_log(CoverLog, Mod)
+ || CoverLog <- cover_logs(Events) ].
%% Check that each coverlog includes N calls to ?mod:foo/0
check_calls(Events,N) ->
check_calls(Events,{?mod,foo,0},N).
check_calls(Events,MFA,N) ->
- CoverLogs = [filename:join(D,"all.coverdata") || D <- get_run_dirs(Events)],
- do_check_logs(CoverLogs,MFA,N).
+ do_check_logs(cover_logs(Events),MFA,N).
do_check_logs([CoverLog|CoverLogs],{Mod,_,_} = MFA,N) ->
- {ok,_} = cover:start(),
- ok = cover:import(CoverLog),
- {ok,Calls} = cover:analyse(Mod,calls,function),
- ok = cover:stop(),
+ {ok, Calls} = analyse_log(CoverLog, Mod),
{MFA,N} = lists:keyfind(MFA,1,Calls),
do_check_logs(CoverLogs,MFA,N);
do_check_logs([],_,_) ->
ok.
+cover_logs(Events) ->
+ [filename:join(D,"all.coverdata") || D <- get_log_dirs(Events)].
+
+analyse_log(CoverLog, Mod) ->
+ {ok, _} = cover:start(),
+ ok = cover:import(CoverLog),
+ Result = cover:analyse(Mod, calls, function),
+ ok = cover:stop(),
+ Result.
+
fullname(Name) ->
{ok,Host} = inet:gethostname(),
list_to_atom(atom_to_list(Name) ++ "@" ++ Host).
@@ -319,3 +389,12 @@ start_slave(Name,Args) ->
{boot_timeout,10}, % extending some timers for slow test hosts
{init_timeout,10},
{startup_timeout,10}]).
+
+rel_path(From, To) ->
+ Segments = do_rel_path(filename:split(From), filename:split(To)),
+ filename:join(Segments).
+
+do_rel_path([Seg|RestA], [Seg|RestB]) ->
+ do_rel_path(RestA, RestB);
+do_rel_path(PathA, PathB) ->
+ lists:duplicate(length(PathA), "..") ++ PathB.
diff --git a/lib/common_test/test/ct_cover_SUITE_data/cover_SUITE.erl b/lib/common_test/test/ct_cover_SUITE_data/cover_SUITE.erl
index 83d368c53d..789e48bd96 100644
--- a/lib/common_test/test/ct_cover_SUITE_data/cover_SUITE.erl
+++ b/lib/common_test/test/ct_cover_SUITE_data/cover_SUITE.erl
@@ -71,6 +71,10 @@ default(_Config) ->
cover_test_mod:foo(),
ok.
+default_no_cover(_Config) ->
+ cover_test_mod:foo(),
+ ok.
+
slave(_Config) ->
cover_compiled = code:which(cover_test_mod),
cover_test_mod:foo(),
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE.erl b/lib/common_test/test/ct_cover_nomerge_SUITE.erl
new file mode 100644
index 0000000000..8e2ee1b500
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE.erl
@@ -0,0 +1,221 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%%-------------------------------------------------------------------
+%%% File: ct_cover_nomerge_SUITE
+%%%
+%%% Description:
+%%% Test code cover analysis support when merge_tests=false
+%%%
+%%%-------------------------------------------------------------------
+-module(ct_cover_nomerge_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).
+-define(mod, cover_test_mod).
+
+%%--------------------------------------------------------------------
+%% TEST SERVER CALLBACK FUNCTIONS
+%%--------------------------------------------------------------------
+
+%%--------------------------------------------------------------------
+%% Description: Since Common Test starts another Test Server
+%% instance, the tests need to be performed on a separate node (or
+%% there will be clashes with logging processes etc).
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ case test_server:is_cover() of
+ true ->
+ {skip,"Test server is running cover already - skipping"};
+ false ->
+ ct_test_support:init_per_suite(Config)
+ end.
+
+end_per_suite(Config) ->
+ ct_test_support:end_per_suite(Config).
+
+init_per_testcase(TestCase, Config) ->
+ ct_test_support:init_per_testcase(TestCase, Config).
+
+end_per_testcase(TestCase, Config) ->
+ try apply(?MODULE,TestCase,[cleanup,Config])
+ catch error:undef -> ok
+ end,
+ ct_test_support:end_per_testcase(TestCase, Config).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ local,
+ remote,
+ remote_nostop
+ ].
+
+%%--------------------------------------------------------------------
+%% TEST CASES
+%%--------------------------------------------------------------------
+
+local(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "local.spec"),
+ CoverSpec = [{incl_mods,[?mod]}],
+ CoverFile = create_cover_file(local,CoverSpec,Config),
+ {Opts,ERPid} = setup([{spec,Spec},{label,local},{cover,CoverFile}], Config),
+ {ok,Events} = execute(local, local, Opts, ERPid, Config),
+ false = check_cover(Config),
+ check_calls(Events,2),
+ ok.
+
+remote(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "remote.spec"),
+ %% extending some timers for slow test hosts
+ {ok,Node} = ct_slave:start(ct_nomerge,[{boot_timeout,15},
+ {init_timeout,15},
+ {startup_timeout,15}]),
+
+ CoverSpec = [{nodes,[Node]},
+ {incl_mods,[?mod]}],
+ CoverFile = create_cover_file(remote,CoverSpec,Config),
+ {Opts,ERPid} = setup([{spec,Spec},{label,remote},{cover,CoverFile}], Config),
+ {ok,Events} = execute(remote, remote, Opts, ERPid, Config),
+ false = check_cover(Config),
+ check_calls(Events,2),
+ ok.
+remote(cleanup,_Config) ->
+ {ok,_} = ct_slave:stop(ct_nomerge),
+ ok.
+
+remote_nostop(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Spec = filename:join(DataDir, "remote_nostop.spec"),
+ %% extending some timers for slow test hosts
+ {ok,Node} = ct_slave:start(ct_nomerge,[{boot_timeout,15},
+ {init_timeout,15},
+ {startup_timeout,15}]),
+
+ CoverSpec = [{nodes,[Node]},
+ {incl_mods,[?mod]}],
+ CoverFile = create_cover_file(remote_nostop,CoverSpec,Config),
+ {Opts,ERPid} = setup([{spec,Spec},{label,remote_nostop},
+ {cover,CoverFile},{cover_stop,false}],
+ Config),
+ {ok,Events} = execute(remote_nostop, remote_nostop, Opts, ERPid, Config),
+ {true,[Node],[cover_test_mod]} = check_cover(Config),
+ check_calls(Events,2),
+ ok.
+remote_nostop(cleanup,Config) ->
+ CtNode = ?config(ct_node,Config),
+ ok = rpc:call(CtNode,cover,stop,[]),
+ {ok,_} = ct_slave:stop(ct_nomerge),
+ ok.
+
+
+%%%-----------------------------------------------------------------
+%%% HELP FUNCTIONS
+%%%-----------------------------------------------------------------
+setup(Test, Config) ->
+ Opts0 = ct_test_support:get_opts(Config),
+ Level = ?config(trace_level, Config),
+ EvHArgs = [{cbm,ct_test_support},{trace_level,Level}],
+ Opts = Opts0 ++ [{event_handler,{?eh,EvHArgs}}|Test],
+ ERPid = ct_test_support:start_event_receiver(Config),
+ {Opts,ERPid}.
+
+execute(Name, Testcase, Opts, ERPid, Config) ->
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(Name,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config),
+ Opts),
+ TestEvents = events_to_check(Testcase),
+ R = ct_test_support:verify_events(TestEvents, Events, Config),
+ {R,Events}.
+
+reformat(Events, EH) ->
+ ct_test_support:reformat(Events, EH).
+
+events_to_check(local) ->
+ events_to_check1(cover_nomerge_local_SUITE);
+events_to_check(remote) ->
+ events_to_check1(cover_nomerge_remote_SUITE);
+events_to_check(remote_nostop) ->
+ events_to_check1(cover_nomerge_remote_nostop_SUITE).
+events_to_check1(Suite) ->
+ OneTest =
+ [{?eh,start_logging,{'DEF','RUNDIR'}}] ++
+ [{?eh,tc_done,{Suite,t1,ok}}] ++
+ [{?eh,tc_done,{Suite,t2,ok}}] ++
+ [{?eh,stop_logging,[]}],
+
+ %% 2 tests (ct:run_test + script_start) is default
+ OneTest ++ OneTest.
+
+check_cover(Config) when is_list(Config) ->
+ CTNode = proplists:get_value(ct_node, Config),
+ check_cover(CTNode);
+check_cover(Node) when is_atom(Node) ->
+ case rpc:call(Node,test_server,is_cover,[]) of
+ true ->
+ {true,
+ rpc:call(Node,cover,which_nodes,[]),
+ rpc:call(Node,cover,modules,[])};
+ false ->
+ false
+ end.
+
+%% Get the log dir "ct_run.<timestamp>" for all (both!) tests
+get_log_dirs(Events) ->
+ [LogDir ||
+ {ct_test_support_eh,
+ {event,start_logging,_Node,LogDir}} <- Events].
+
+%% Check that each coverlog includes N calls to ?mod:foo/0
+check_calls(Events,N) ->
+ check_calls(Events,{?mod,foo,0},N).
+check_calls(Events,MFA,N) ->
+ CoverLogs = [filename:join(D,"all.coverdata") || D <- get_log_dirs(Events)],
+ do_check_logs(CoverLogs,MFA,N).
+
+do_check_logs([CoverLog|CoverLogs],{Mod,_,_} = MFA,N) ->
+ {ok,_} = cover:start(),
+ ok = cover:import(CoverLog),
+ {ok,Calls} = cover:analyse(Mod,calls,function),
+ ok = cover:stop(),
+ {MFA,N} = lists:keyfind(MFA,1,Calls),
+ do_check_logs(CoverLogs,MFA,N);
+do_check_logs([],_,_) ->
+ ok.
+
+create_cover_file(Filename,Terms,Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ File = filename:join(PrivDir,Filename) ++ ".cover",
+ {ok,Fd} = file:open(File,[write]),
+ lists:foreach(fun(Term) ->
+ file:write(Fd,io_lib:format("~p.~n",[Term]))
+ end,Terms),
+ ok = file:close(Fd),
+ File.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_local_SUITE.erl b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_local_SUITE.erl
new file mode 100644
index 0000000000..e1fe3b5fc9
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_local_SUITE.erl
@@ -0,0 +1,63 @@
+%%--------------------------------------------------------------------
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+-module(cover_nomerge_local_SUITE).
+-include_lib("common_test/include/ct.hrl").
+
+-compile(export_all).
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+
+suite() ->
+ [].
+
+all() ->
+ [t1,t2].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(Config) ->
+ Config.
+
+init_per_testcase(_Case, Config) ->
+ Dog = test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% Test cases
+break(_Config) ->
+ test_server:break(""),
+ ok.
+
+t1(_Config) ->
+ cover_compiled = code:which(cover_test_mod),
+ ok = cover_test_mod:foo(),
+ ok.
+
+t2(_Config) ->
+ cover_compiled = code:which(cover_test_mod),
+ ok = cover_test_mod:foo(),
+ ok.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_SUITE.erl b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_SUITE.erl
new file mode 100644
index 0000000000..a77ae0c2db
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_SUITE.erl
@@ -0,0 +1,75 @@
+%%--------------------------------------------------------------------
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+-module(cover_nomerge_remote_SUITE).
+-include_lib("common_test/include/ct.hrl").
+
+-compile(export_all).
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+
+suite() ->
+ [].
+
+all() ->
+ [t1,t2].
+
+init_per_suite(Config) ->
+ {ok,Host} = inet:gethostname(),
+ Node = list_to_atom("ct_nomerge@"++Host),
+ pong = net_adm:ping(Node),
+
+%% Include this row, and exclude the equivalent row in end_per_suite =>
+%% fails every now and then with missing data. Why?
+%% ct_cover:remove_nodes([Node]),
+ ct_cover:add_nodes([Node]),
+ [{node,Node}|Config].
+
+end_per_suite(Config) ->
+ Node = ?config(node,Config),
+ ct_cover:remove_nodes([Node]),
+ Config.
+
+init_per_testcase(_Case, Config) ->
+ Dog = test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% Test cases
+break(_Config) ->
+ test_server:break(""),
+ ok.
+
+t1(Config) ->
+ Node = ?config(node,Config),
+ cover_compiled = rpc:call(Node, code, which, [cover_test_mod]),
+ ok = rpc:call(Node, cover_test_mod, foo, []),
+ ok.
+
+t2(Config) ->
+ Node = ?config(node,Config),
+ cover_compiled = rpc:call(Node, code, which, [cover_test_mod]),
+ ok = rpc:call(Node, cover_test_mod, foo, []),
+ ok.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_nostop_SUITE.erl b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_nostop_SUITE.erl
new file mode 100644
index 0000000000..0b3159f2c3
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_nomerge_remote_nostop_SUITE.erl
@@ -0,0 +1,68 @@
+%%--------------------------------------------------------------------
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+-module(cover_nomerge_remote_nostop_SUITE).
+-include_lib("common_test/include/ct.hrl").
+
+-compile(export_all).
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+
+suite() ->
+ [].
+
+all() ->
+ [t1,t2].
+
+init_per_suite(Config) ->
+ {ok,Host} = inet:gethostname(),
+ Node = list_to_atom("ct_nomerge@"++Host),
+ pong = net_adm:ping(Node),
+ [{node,Node}|Config].
+
+end_per_suite(Config) ->
+ Config.
+
+init_per_testcase(_Case, Config) ->
+ Dog = test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% Test cases
+break(_Config) ->
+ test_server:break(""),
+ ok.
+
+t1(Config) ->
+ Node = ?config(node,Config),
+ cover_compiled = rpc:call(Node, code, which, [cover_test_mod]),
+ ok = rpc:call(Node, cover_test_mod, foo, []),
+ ok.
+
+t2(Config) ->
+ Node = ?config(node,Config),
+ cover_compiled = rpc:call(Node, code, which, [cover_test_mod]),
+ ok = rpc:call(Node, cover_test_mod, foo, []),
+ ok.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_test_mod.erl b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_test_mod.erl
new file mode 100644
index 0000000000..d4f69452c3
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/cover_test_mod.erl
@@ -0,0 +1,4 @@
+-module(cover_test_mod).
+-compile(export_all).
+foo() ->
+ ok.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/local.spec b/lib/common_test/test/ct_cover_nomerge_SUITE_data/local.spec
new file mode 100644
index 0000000000..893c48b010
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/local.spec
@@ -0,0 +1,6 @@
+{merge_tests,false}.
+
+{alias,dir,"."}.
+
+{cases, dir, cover_nomerge_local_SUITE, [t1]}.
+{cases, dir, cover_nomerge_local_SUITE, [t2]}.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote.spec b/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote.spec
new file mode 100644
index 0000000000..78c4332270
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote.spec
@@ -0,0 +1,6 @@
+{merge_tests,false}.
+
+{alias,dir,"."}.
+
+{cases, dir, cover_nomerge_remote_SUITE, [t1]}.
+{cases, dir, cover_nomerge_remote_SUITE, [t2]}.
diff --git a/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote_nostop.spec b/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote_nostop.spec
new file mode 100644
index 0000000000..049f586c72
--- /dev/null
+++ b/lib/common_test/test/ct_cover_nomerge_SUITE_data/remote_nostop.spec
@@ -0,0 +1,6 @@
+{merge_tests,false}.
+
+{alias,dir,"."}.
+
+{cases, dir, cover_nomerge_remote_nostop_SUITE, [t1]}.
+{cases, dir, cover_nomerge_remote_nostop_SUITE, [t2]}.
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl
index 28f0494d20..8464225284 100644
--- a/lib/common_test/test/ct_error_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE.erl
@@ -66,7 +66,7 @@ all() ->
[cfg_error, lib_error, no_compile, timetrap_end_conf,
timetrap_normal, timetrap_extended, timetrap_parallel,
timetrap_fun, timetrap_fun_group, misc_errors,
- config_restored].
+ config_restored, config_func_errors].
groups() ->
[].
@@ -310,6 +310,25 @@ config_restored(Config) when is_list(Config) ->
ok = ct_test_support:verify_events(TestEvents, Events, Config).
%%%-----------------------------------------------------------------
+%%%
+config_func_errors(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "error/test/config_func_error_1_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite}],
+ Config),
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(config_func_errors,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config),
+ Opts),
+
+ TestEvents = events_to_check(config_func_errors),
+ ok = ct_test_support:verify_events(TestEvents, Events, Config).
+
+
+%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
@@ -323,8 +342,6 @@ setup(Test, Config) ->
reformat(Events, EH) ->
ct_test_support:reformat(Events, EH).
- %reformat(Events, _EH) ->
- % Events.
%%%-----------------------------------------------------------------
%%% TEST EVENTS
@@ -352,8 +369,8 @@ test_events(cfg_error) ->
{'EXIT',init_per_suite_fails}}}}},
{?eh,test_stats,{0,0,{0,1}}},
{?eh,tc_auto_skip,
- {cfg_error_1_SUITE,tc2,{failed,{cfg_error_1_SUITE,init_per_suite,
- {'EXIT',init_per_suite_fails}}}}},
+ {cfg_error_1_SUITE,{tc2,g1},{failed,{cfg_error_1_SUITE,init_per_suite,
+ {'EXIT',init_per_suite_fails}}}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_auto_skip,
{cfg_error_1_SUITE,end_per_suite,{failed,{cfg_error_1_SUITE,init_per_suite,
@@ -369,7 +386,7 @@ test_events(cfg_error) ->
{'EXIT',{{badmatch,[1,2]},'_'}}}}}},
{?eh,test_stats,{0,0,{0,3}}},
{?eh,tc_auto_skip,
- {cfg_error_2_SUITE,tc2,
+ {cfg_error_2_SUITE,{tc2,g1},
{failed,{cfg_error_2_SUITE,init_per_suite,
{'EXIT',{{badmatch,[1,2]},'_'}}}}}},
{?eh,test_stats,{0,0,{0,4}}},
@@ -386,7 +403,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_3_SUITE,init_per_suite,{timetrap_timeout,2000}}}}},
{?eh,test_stats,{0,0,{0,5}}},
{?eh,tc_auto_skip,
- {cfg_error_3_SUITE,tc2,
+ {cfg_error_3_SUITE,{tc2,g1},
{failed,{cfg_error_3_SUITE,init_per_suite,{timetrap_timeout,2000}}}}},
{?eh,test_stats,{0,0,{0,6}}},
{?eh,tc_auto_skip,
@@ -400,7 +417,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_4_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,7}}},
{?eh,tc_auto_skip,
- {cfg_error_4_SUITE,tc2,
+ {cfg_error_4_SUITE,{tc2,g1},
{failed,{cfg_error_4_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,8}}},
{?eh,tc_auto_skip,
@@ -414,7 +431,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_5_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,9}}},
{?eh,tc_auto_skip,
- {cfg_error_5_SUITE,tc2,
+ {cfg_error_5_SUITE,{tc2,g1},
{failed,{cfg_error_5_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,10}}},
{?eh,tc_auto_skip,
@@ -460,7 +477,7 @@ test_events(cfg_error) ->
{cfg_error_8_SUITE,{init_per_group,g1,[]},
{failed,{error,{init_per_group_fails,g1}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc1,
+ {cfg_error_8_SUITE,{tc1,g1},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{init_per_group_fails,g1}}}}}},
{?eh,test_stats,{4,0,{0,11}}},
@@ -472,7 +489,7 @@ test_events(cfg_error) ->
[{?eh,tc_start,{cfg_error_8_SUITE,{init_per_group,g2,[]}}},
{?eh,tc_done,{cfg_error_8_SUITE,{init_per_group,g2,[]},
{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{cfg_error_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{cfg_error_8_SUITE,{tc1,g2},
{failed,{cfg_error_8_SUITE,init_per_group,
{timetrap_timeout,2000}}}}},
{?eh,test_stats,{4,0,{0,12}}},
@@ -485,7 +502,7 @@ test_events(cfg_error) ->
{cfg_error_8_SUITE,{init_per_group,g3,[]},
{failed,{error,{{badmatch,42},'_'}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc1,
+ {cfg_error_8_SUITE,{tc1,g3},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{{badmatch,42},'_'}}}}}},
{?eh,test_stats,{4,0,{0,13}}},
@@ -511,7 +528,7 @@ test_events(cfg_error) ->
{?eh,tc_done,{cfg_error_8_SUITE,{init_per_group,g6,[]},
{failed,{error,{sub_group_failed,g6}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc2,
+ {cfg_error_8_SUITE,{tc2,g6},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{sub_group_failed,g6}}}}}},
{?eh,test_stats,{6,0,{0,14}}},
@@ -1094,11 +1111,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g4,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g4,[]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,1}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,2}}},
@@ -1109,11 +1126,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g5,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g5,[]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,3}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,4}}},
@@ -1124,11 +1141,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g6,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g6,[]},
{failed,{timetrap_timeout,{'$approx',500}}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{0,11,{0,5}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{0,11,{0,6}}},
@@ -1277,11 +1294,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg4,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg4,[parallel]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,7}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,8}}},
@@ -1293,11 +1310,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg5,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg5,[parallel]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,9}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,10}}},
@@ -1309,11 +1326,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg6,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg6,[parallel]},
{failed,{timetrap_timeout,{'$approx',500}}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{4,26,{0,11}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{4,26,{0,12}}},
@@ -1390,10 +1407,10 @@ test_events(timetrap_fun_group) ->
{?eh,tc_done,{timetrap_8_SUITE,tc0,
{user_timetrap_error,{kaboom,'_'}}}},
{?eh,test_stats,{9,31,{0,12}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc1,sg1},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{9,31,{0,13}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,sg1},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{9,31,{0,14}}},
{?eh,tc_start,{timetrap_8_SUITE,{end_per_group,sg1,[sequence]}}},
@@ -1408,10 +1425,10 @@ test_events(timetrap_fun_group) ->
{?eh,tc_done,{timetrap_8_SUITE,tc0,
{failed,{timetrap_timeout,{'$approx',1000}}}}},
{?eh,test_stats,{10,32,{0,14}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc1,sg2},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{10,32,{0,15}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,sg2},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{10,32,{0,16}}},
{?eh,tc_start,{timetrap_8_SUITE,{end_per_group,sg2,[sequence]}}},
@@ -1449,7 +1466,8 @@ test_events(misc_errors) ->
{failed,{error,{suite_failed,this_is_expected}}}}},
{?eh,test_stats,{0,5,{0,0}}},
{?eh,tc_start,{misc_error_1_SUITE,killed_by_signal_1}},
- {?eh,tc_done,{misc_error_1_SUITE,killed_by_signal_1,i_die_now}},
+ {?eh,tc_done,{misc_error_1_SUITE,killed_by_signal_1,
+ {failed,{'EXIT',i_die_now}}}},
{?eh,test_stats,{0,6,{0,0}}},
{?eh,tc_start,{misc_error_1_SUITE,killed_by_signal_2}},
{?eh,tc_done,{misc_error_1_SUITE,killed_by_signal_2,
@@ -1498,4 +1516,42 @@ test_events(config_restored) ->
{?eh,tc_done,{config_restored_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
+ ];
+
+test_events(config_func_errors) ->
+ [
+ {?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,4}},
+ {?eh,tc_start,{config_func_error_1_SUITE,init_per_suite}},
+ {?eh,tc_done,{config_func_error_1_SUITE,init_per_suite,ok}},
+
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_iptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_iptc,'_'}},
+ {?eh,test_stats,{0,1,{0,0}}},
+
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_eptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_eptc,'_'}},
+ {?eh,test_stats,{0,2,{0,0}}},
+
+ [{?eh,tc_start,{config_func_error_1_SUITE,{init_per_group,g1,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{init_per_group,g1,[]},ok}},
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_iptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_iptc,'_'}},
+ {?eh,test_stats,{0,3,{0,0}}},
+ {?eh,tc_start,{config_func_error_1_SUITE,{end_per_group,g1,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{end_per_group,g1,[]},ok}}],
+
+ [{?eh,tc_start,{config_func_error_1_SUITE,{init_per_group,g2,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{init_per_group,g2,[]},ok}},
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_eptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_eptc,'_'}},
+ {?eh,test_stats,{0,4,{0,0}}},
+ {?eh,tc_start,{config_func_error_1_SUITE,{end_per_group,g2,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{end_per_group,g2,[]},ok}}],
+
+ {?eh,tc_start,{config_func_error_1_SUITE,end_per_suite}},
+ {?eh,tc_done,{config_func_error_1_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_12_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_12_SUITE.erl
index 806d3caf72..0ff8659269 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_12_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_12_SUITE.erl
@@ -26,10 +26,10 @@ init_per_testcase(_, Config) ->
Config.
end_per_testcase(tc2, _Config) ->
- timer:sleep(2000),
+ ct:sleep(2000),
exit(this_should_not_be_printed);
end_per_testcase(tc4, _Config) ->
- timer:sleep(2000),
+ ct:sleep(2000),
exit(this_should_not_be_printed);
end_per_testcase(_, _) ->
ok.
@@ -42,7 +42,7 @@ tc1() ->
put('$test_server_framework_test',
fun(init_tc, _Default) ->
ct:pal("init_tc(~p): Night time...",[self()]),
- timer:sleep(2000),
+ ct:sleep(2000),
ct:pal("init_tc(~p): Day time!",[self()]),
exit(this_should_not_be_printed);
(_, Default) -> Default
@@ -67,7 +67,7 @@ tc3(_) ->
put('$test_server_framework_test',
fun(end_tc, _Default) ->
ct:pal("end_tc(~p): Night time...",[self()]),
- timer:sleep(1000),
+ ct:sleep(1000),
ct:pal("end_tc(~p): Day time!",[self()]);
(_, Default) -> Default
end),
@@ -78,7 +78,7 @@ tc4() ->
put('$test_server_framework_test',
fun(end_tc, _Default) ->
ct:pal("end_tc(~p): Night time...",[self()]),
- timer:sleep(1000),
+ ct:sleep(1000),
ct:pal("end_tc(~p): Day time!",[self()]);
(_, Default) -> Default
end),
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_13_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_13_SUITE.erl
index c8a3c1d15e..cfc0babb68 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_13_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_13_SUITE.erl
@@ -26,7 +26,7 @@ init_per_suite() ->
put('$test_server_framework_test',
fun(end_tc, _Default) ->
ct:pal("end_tc(~p): Night time...",[self()]),
- timer:sleep(1000),
+ ct:sleep(1000),
ct:pal("end_tc(~p): Day time!",[self()]);
(_, Default) -> Default
end),
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_14_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_14_SUITE.erl
index 960d0f61b0..54b09e78c6 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_14_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_14_SUITE.erl
@@ -29,7 +29,7 @@ end_per_suite() ->
put('$test_server_framework_test',
fun(end_tc, _Default) ->
ct:pal("end_tc(~p): Night time...",[self()]),
- timer:sleep(1000),
+ ct:sleep(1000),
ct:pal("end_tc(~p): Day time!",[self()]);
(_, Default) -> Default
end),
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_3_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_3_SUITE.erl
index 08c57887ef..0d93e46501 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_3_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_3_SUITE.erl
@@ -36,7 +36,7 @@ suite() ->
%% Reason = term()
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- timer:sleep(5000),
+ ct:sleep(5000),
exit(shouldnt_happen).
% Config.
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_7_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_7_SUITE.erl
index 9cd5b6ad29..d95f3b235b 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_7_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_7_SUITE.erl
@@ -43,7 +43,7 @@ init_per_suite(Config) ->
%% Config0 = Config1 = [tuple()]
%%--------------------------------------------------------------------
end_per_suite(Config) ->
- timer:sleep(5000),
+ ct:sleep(5000),
ok.
%%--------------------------------------------------------------------
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_8_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_8_SUITE.erl
index 25993833d7..d8f0c48034 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_8_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/cfg_error_8_SUITE.erl
@@ -57,7 +57,7 @@ init_per_group(g1, Config) ->
Config;
init_per_group(g2, Config) ->
ct:comment("init_per_group(g2) timeout"),
- timer:sleep(5000),
+ ct:sleep(5000),
Config;
init_per_group(g3, _Config) ->
badmatch = 42;
@@ -80,7 +80,7 @@ end_per_group(g11, _Config) ->
ok;
end_per_group(g12, _Config) ->
ct:comment("end_per_group(g6) timeout"),
- timer:sleep(5000),
+ ct:sleep(5000),
ok;
end_per_group(_GroupName, _Config) ->
ok.
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl
new file mode 100644
index 0000000000..f1025213dc
--- /dev/null
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl
@@ -0,0 +1,138 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(config_func_error_1_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+%%--------------------------------------------------------------------
+%% Function: suite() -> Info
+%% Info = [tuple()]
+%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,5}}].
+
+%%--------------------------------------------------------------------
+%% Function: init_per_suite(Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_suite(_Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_group(GroupName, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_group(_GroupName, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_group(GroupName, Config0) ->
+%% void() | {save_config,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_group(_GroupName, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_testcase(TestCase, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+bad_proc(Config) ->
+ ct:pal("Bye bye from ~p", [self()]),
+ %% this call will either generate an exit immediately
+ %% or return a fun to be executed here
+ ErrorFun = ct_test_support:random_error(Config),
+ ct:log("Calling error fun now...", []),
+ ErrorFun(),
+ ct:sleep(10000),
+ ok.
+
+init_per_testcase(exit_in_iptc, Config) ->
+ spawn_link(?MODULE, bad_proc, [Config]),
+ ct:sleep(10000),
+ Config;
+init_per_testcase(_, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_testcase(TestCase, Config0) ->
+%% void() | {save_config,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_testcase(exit_in_eptc, Config) ->
+ spawn_link(?MODULE, bad_proc, [Config]),
+ ct:sleep(10000),
+ ok;
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: groups() -> [Group]
+%% Group = {GroupName,Properties,GroupsAndTestCases}
+%% GroupName = atom()
+%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]
+%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]
+%% TestCase = atom()
+%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}
+%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |
+%% repeat_until_any_ok | repeat_until_any_fail
+%% N = integer() | forever
+%%--------------------------------------------------------------------
+groups() ->
+ [{g1, [], [exit_in_iptc]},
+ {g2, [], [exit_in_eptc]}].
+
+%%--------------------------------------------------------------------
+%% Function: all() -> GroupsAndTestCases | {skip,Reason}
+%% GroupsAndTestCases = [{group,GroupName} | TestCase]
+%% GroupName = atom()
+%% TestCase = atom()
+%% Reason = term()
+%%--------------------------------------------------------------------
+all() ->
+ [exit_in_iptc,
+ exit_in_eptc,
+ {group, g1},
+ {group, g2}].
+
+exit_in_iptc(_) ->
+ ok.
+
+exit_in_eptc(_) ->
+ ok.
+
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
index a98382965f..1451a4119e 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_1_SUITE.erl
@@ -111,7 +111,7 @@ end_per_testcase1(tc2, Config) ->
ct:pal("end_per_testcase(tc2): ~p", [Config]),
tc2 = ?config(tc, Config),
{failed,timetrap_timeout} = ?config(tc_status, Config),
- timer:sleep(2000);
+ ct:sleep(2000);
end_per_testcase1(tc3, Config) ->
ct:pal("end_per_testcase(tc3): ~p", [Config]),
@@ -123,7 +123,7 @@ end_per_testcase1(tc4, Config) ->
ct:pal("end_per_testcase(tc4): ~p", [Config]),
tc4 = ?config(tc, Config),
{failed,{testcase_aborted,testing_end_conf}} = ?config(tc_status, Config),
- timer:sleep(2000);
+ ct:sleep(2000);
end_per_testcase1(tc5, Config) ->
ct:pal("end_per_testcase(tc5): ~p", [Config]),
@@ -182,29 +182,29 @@ all() ->
[tc1, tc2, tc3, tc4, tc5, tc6, tc7, tc8, tc9].
tc1(_) ->
- timer:sleep(2000),
+ ct:sleep(2000),
ok.
tc2(_) ->
- timer:sleep(2000).
+ ct:sleep(2000).
tc3(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
- timer:sleep(2000),
+ ct:sleep(2000),
ok.
tc4(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
- timer:sleep(2000),
+ ct:sleep(2000),
ok.
tc5(_) ->
- timer:sleep(2000),
+ ct:sleep(2000),
ok.
tc6(_) ->
spawn(ct, abort_current_testcase, [testing_end_conf]),
- timer:sleep(2000).
+ ct:sleep(2000).
tc7(_) ->
sleep(2000),
@@ -220,5 +220,5 @@ tc9(_) ->
%%%-----------------------------------------------------------------
sleep(T) ->
- timer:sleep(T),
+ ct:sleep(T),
ok.
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl
index 1389acca11..a9ea0be847 100644
--- a/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/timetrap_helper.erl
@@ -3,5 +3,5 @@
-export([sleep/1]).
sleep(T) ->
- timer:sleep(T),
+ ct:sleep(T),
ok.
diff --git a/lib/common_test/test/ct_event_handler_SUITE.erl b/lib/common_test/test/ct_event_handler_SUITE.erl
index b534a7141d..b759424e46 100644
--- a/lib/common_test/test/ct_event_handler_SUITE.erl
+++ b/lib/common_test/test/ct_event_handler_SUITE.erl
@@ -29,6 +29,7 @@
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
+-include_lib("common_test/src/ct_util.hrl").
%-include_lib("common_test/include/ct_event.hrl").
@@ -59,7 +60,7 @@ end_per_testcase(TestCase, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [start_stop, results].
+ [start_stop, results, event_mgrs].
groups() ->
[].
@@ -156,18 +157,28 @@ results(Config) when is_list(Config) ->
TestEvents =
[{eh_A,start_logging,{'DEF','RUNDIR'}},
{eh_A,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
- {eh_A,start_info,{1,1,3}},
+ {eh_A,start_info,{1,1,5}},
{eh_A,tc_start,{eh_11_SUITE,init_per_suite}},
{eh_A,tc_done,{eh_11_SUITE,init_per_suite,ok}},
- {eh_A,tc_start,{eh_11_SUITE,tc1}},
- {eh_A,tc_done,{eh_11_SUITE,tc1,ok}},
- {eh_A,test_stats,{1,0,{0,0}}},
- {eh_A,tc_start,{eh_11_SUITE,tc2}},
- {eh_A,tc_done,{eh_11_SUITE,tc2,{skipped,"Skipped"}}},
- {eh_A,test_stats,{1,0,{1,0}}},
- {eh_A,tc_start,{eh_11_SUITE,tc3}},
- {eh_A,tc_done,{eh_11_SUITE,tc3,{failed,{error,'Failing'}}}},
- {eh_A,test_stats,{1,1,{1,0}}},
+ [{eh_A,tc_start,{eh_11_SUITE,{init_per_group,g1,[]}}},
+ {eh_A,tc_done,{eh_11_SUITE,{init_per_group,g1,[]},ok}},
+ {eh_A,tc_start,{eh_11_SUITE,tc1}},
+ {eh_A,tc_done,{eh_11_SUITE,tc1,ok}},
+ {eh_A,test_stats,{1,0,{0,0}}},
+ {eh_A,tc_start,{eh_11_SUITE,tc2}},
+ {eh_A,tc_done,{eh_11_SUITE,tc2,ok}},
+ {eh_A,test_stats,{2,0,{0,0}}},
+ {eh_A,tc_start,{eh_11_SUITE,tc3}},
+ {eh_A,tc_done,{eh_11_SUITE,tc3,{skipped,"Skip"}}},
+ {eh_A,test_stats,{2,0,{1,0}}},
+ {eh_A,tc_start,{eh_11_SUITE,tc4}},
+ {eh_A,tc_done,{eh_11_SUITE,tc4,{skipped,"Skipped"}}},
+ {eh_A,test_stats,{2,0,{2,0}}},
+ {eh_A,tc_start,{eh_11_SUITE,tc5}},
+ {eh_A,tc_done,{eh_11_SUITE,tc5,{failed,{error,'Failing'}}}},
+ {eh_A,test_stats,{2,1,{2,0}}},
+ {eh_A,tc_start,{eh_11_SUITE,{end_per_group,g1,[]}}},
+ {eh_A,tc_done,{eh_11_SUITE,{end_per_group,g1,[]},ok}}],
{eh_A,tc_start,{eh_11_SUITE,end_per_suite}},
{eh_A,tc_done,{eh_11_SUITE,end_per_suite,ok}},
{eh_A,test_done,{'DEF','STOP_TIME'}},
@@ -176,5 +187,10 @@ results(Config) when is_list(Config) ->
ok = ct_test_support:verify_events(TestEvents++TestEvents, Events, Config).
+event_mgrs(_) ->
+ ?CT_EVMGR_REF = ct:get_event_mgr_ref(),
+ ?CT_MEVMGR_REF = ct_master:get_event_mgr_ref().
+
+
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
diff --git a/lib/common_test/test/ct_event_handler_SUITE_data/event_handling_1/test/eh_11_SUITE.erl b/lib/common_test/test/ct_event_handler_SUITE_data/event_handling_1/test/eh_11_SUITE.erl
index 16b7129993..14ea12d579 100644
--- a/lib/common_test/test/ct_event_handler_SUITE_data/event_handling_1/test/eh_11_SUITE.erl
+++ b/lib/common_test/test/ct_event_handler_SUITE_data/event_handling_1/test/eh_11_SUITE.erl
@@ -32,100 +32,36 @@
%% COMMON TEST CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
-%%--------------------------------------------------------------------
-%% Function: suite() -> Info
-%%
-%% Info = [tuple()]
-%% List of key/value pairs.
-%%
-%% Description: Returns list of tuples to set default properties
-%% for the suite.
-%%
-%% Note: The suite/0 function is only meant to be used to return
-%% default data values, not perform any other operations.
-%%--------------------------------------------------------------------
suite() ->
[
{timetrap,{seconds,10}}
].
-%%--------------------------------------------------------------------
-%% Function: init_per_suite(Config0) ->
-%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
-%%
-%% Config0 = Config1 = [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%% Reason = term()
-%% The reason for skipping the suite.
-%%
-%% Description: Initialization before the suite.
-%%
-%% 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_suite(Config) ->
Config.
-%%--------------------------------------------------------------------
-%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}
-%%
-%% Config0 = Config1 = [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%%
-%% Description: Cleanup after the suite.
-%%--------------------------------------------------------------------
end_per_suite(_Config) ->
- ok.
+ %% should report ok as result to event handler
+ done.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ %% should report ok as result to event handler
+ void.
-%%--------------------------------------------------------------------
-%% Function: init_per_testcase(TestCase, Config0) ->
-%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
-%%
-%% TestCase = atom()
-%% Name of the test case that is about to run.
-%% Config0 = Config1 = [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%% Reason = term()
-%% The reason for skipping the test case.
-%%
-%% Description: Initialization 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(_TestCase, Config) ->
Config.
-%%--------------------------------------------------------------------
-%% Function: end_per_testcase(TestCase, Config0) ->
-%% void() | {save_config,Config1}
-%%
-%% TestCase = atom()
-%% Name of the test case that is finished.
-%% Config0 = Config1 = [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%%
-%% Description: Cleanup after each test case.
-%%--------------------------------------------------------------------
end_per_testcase(_TestCase, _Config) ->
- ok.
+ true.
-%%--------------------------------------------------------------------
-%% Function: all() -> TestCases | {skip,Reason}
-%%
-%% TestCases = [TestCase | {sequence,SeqName}]
-%% TestCase = atom()
-%% Name of a test case.
-%% SeqName = atom()
-%% Name of a test case sequence.
-%% Reason = term()
-%% The reason for skipping all test cases.
-%%
-%% Description: Returns the list of test cases that are to be executed.
-%%--------------------------------------------------------------------
-all() ->
- [tc1, tc2, tc3].
+groups() ->
+ [{g1, [], [tc1, tc2, tc3, tc4, tc5]}].
+all() ->
+ [{group,g1}].
%%--------------------------------------------------------------------
%% TEST CASES
@@ -134,8 +70,15 @@ all() ->
tc1(_Config) ->
ok.
-tc2(_Config) ->
- {skip,"Skipped"}.
+tc2(_Config) ->
+ %% should report ok as result to event handler
+ 42.
+
+tc3(_Config) ->
+ {skip,"Skip"}.
+
+tc4(_Config) ->
+ {skipped,"Skipped"}.
-tc3(_Config) ->
+tc5(_Config) ->
exit('Failing').
diff --git a/lib/common_test/test/ct_gen_conn_SUITE_data/conn_SUITE.erl b/lib/common_test/test/ct_gen_conn_SUITE_data/conn_SUITE.erl
index 1344878675..96dd80e4e8 100644
--- a/lib/common_test/test/ct_gen_conn_SUITE_data/conn_SUITE.erl
+++ b/lib/common_test/test/ct_gen_conn_SUITE_data/conn_SUITE.erl
@@ -73,23 +73,23 @@ handles_to_multi_conn_pids(_Config) ->
{true,true} = {is_process_alive(Handle3),is_process_alive(ConnPid3)},
ok = proto:close(Handle1),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle1),is_process_alive(ConnPid1)},
{true,true} = {is_process_alive(Handle2),is_process_alive(ConnPid2)},
ok = proto:kill_conn_proc(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
{true,false} = {is_process_alive(Handle2),is_process_alive(ConnPid2)},
ConnPid2x = ct_gen_conn:get_conn_pid(Handle2),
true = is_process_alive(ConnPid2x),
ok = proto:close(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle2),is_process_alive(ConnPid2x)},
application:set_env(ct_test, reconnect, false),
ok = proto:kill_conn_proc(Handle3),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle3),is_process_alive(ConnPid3)},
ok.
@@ -116,23 +116,23 @@ handles_to_single_conn_pids(_Config) ->
ct:pal("CONNS = ~n~p", [Conns]),
ok = proto:close(Handle1),
- timer:sleep(100),
+ ct:sleep(100),
{false,true} = {is_process_alive(Handle1),is_process_alive(ConnPid)},
ok = proto:kill_conn_proc(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
NewConnPid = ct_gen_conn:get_conn_pid(Handle2),
NewConnPid = ct_gen_conn:get_conn_pid(Handle3),
true = is_process_alive(Handle2),
true = is_process_alive(Handle3),
ok = proto:close(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
{false,true} = {is_process_alive(Handle2),is_process_alive(NewConnPid)},
application:set_env(ct_test, reconnect, false),
ok = proto:kill_conn_proc(Handle3),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle3),is_process_alive(NewConnPid)},
ok.
@@ -158,29 +158,29 @@ names_to_multi_conn_pids(_Config) ->
Handle1 = proto:open(mconn1),
ok = proto:close(mconn1),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle1),is_process_alive(ConnPid1)},
ok = proto:kill_conn_proc(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
Handle2 = proto:open(mconn2), % should've been reconnected already
{true,false} = {is_process_alive(Handle2),is_process_alive(ConnPid2)},
ConnPid2x = ct_gen_conn:get_conn_pid(Handle2),
true = is_process_alive(ConnPid2x),
ok = proto:close(mconn2),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle2),is_process_alive(ConnPid2x)},
Handle2y = proto:open(mconn2),
ConnPid2y = ct_gen_conn:get_conn_pid(Handle2y),
{true,true} = {is_process_alive(Handle2y),is_process_alive(ConnPid2y)},
ok = proto:close(mconn2),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle2y),is_process_alive(ConnPid2y)},
application:set_env(ct_test, reconnect, false),
ok = proto:kill_conn_proc(Handle3),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle3),is_process_alive(ConnPid3)},
ok.
@@ -211,11 +211,11 @@ names_to_single_conn_pids(_Config) ->
ct:pal("CONNS on ~p = ~n~p", [ConnPid,Conns]),
ok = proto:close(sconn1),
- timer:sleep(100),
+ ct:sleep(100),
{false,true} = {is_process_alive(Handle1),is_process_alive(ConnPid)},
ok = proto:kill_conn_proc(Handle2),
- timer:sleep(100),
+ ct:sleep(100),
{true,false} = {is_process_alive(Handle2),is_process_alive(ConnPid)},
Handle2 = proto:open(sconn2), % should've been reconnected already
NewConnPid = ct_gen_conn:get_conn_pid(Handle2),
@@ -227,12 +227,12 @@ names_to_single_conn_pids(_Config) ->
ct:pal("CONNS on ~p = ~n~p", [NewConnPid,Conns1]),
ok = proto:close(sconn2),
- timer:sleep(100),
+ ct:sleep(100),
{false,true} = {is_process_alive(Handle2),is_process_alive(NewConnPid)},
application:set_env(ct_test, reconnect, false),
ok = proto:kill_conn_proc(Handle3),
- timer:sleep(100),
+ ct:sleep(100),
{false,false} = {is_process_alive(Handle3),is_process_alive(NewConnPid)},
ok.
diff --git a/lib/common_test/test/ct_group_info_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE.erl
index e7bc5baaa1..83ac7dbbcf 100644
--- a/lib/common_test/test/ct_group_info_SUITE.erl
+++ b/lib/common_test/test/ct_group_info_SUITE.erl
@@ -273,7 +273,7 @@ test_events(timetrap_all) ->
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
{?eh,tc_auto_skip,
- {group_timetrap_1_SUITE,t111,{group0_failed,bad_return_value}}},
+ {group_timetrap_1_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{group_timetrap_1_SUITE,
{end_per_group,g11},
@@ -431,7 +431,7 @@ test_events(timetrap_all_no_ips) ->
{?eh,tc_done,{group_timetrap_2_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_timetrap_2_SUITE,t111,
+ {?eh,tc_auto_skip,{group_timetrap_2_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{group_timetrap_2_SUITE,
@@ -512,7 +512,7 @@ test_events(timetrap_all_no_ipg) ->
{?eh,tc_done,{ct_framework,
{init_per_group,g11,[{suite,group_timetrap_3_SUITE}]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_timetrap_3_SUITE,t111,{group0_failed,bad_return_value}}},
+ {?eh,tc_auto_skip,{group_timetrap_3_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g11},
{group0_failed,bad_return_value}}}],
@@ -551,7 +551,7 @@ test_events(require) ->
{?eh,tc_done,{group_require_1_SUITE,{init_per_group,g4,[]},
{auto_skipped,{require_failed,
{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t41,g4},
{require_failed,
{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
@@ -580,7 +580,7 @@ test_events(require) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g8},
@@ -604,7 +604,7 @@ test_events(require) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,
@@ -646,7 +646,7 @@ test_events(require_default) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g4,[]},
{auto_skipped,{require_failed,{not_available,common3}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t41,g4},
{require_failed,{not_available,common3}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g4},
@@ -674,7 +674,7 @@ test_events(require_default) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g8},
@@ -699,7 +699,7 @@ test_events(require_default) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,
@@ -740,7 +740,7 @@ test_events(require_no_ips) ->
{?eh,tc_done,{group_require_2_SUITE,{init_per_group,g4,[]},
{auto_skipped,{require_failed,
{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t41,g4},
{require_failed,{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,{end_per_group,g4},
@@ -768,7 +768,7 @@ test_events(require_no_ips) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,{end_per_group,g8},
@@ -792,7 +792,7 @@ test_events(require_no_ips) ->
{?eh,tc_done,{group_require_2_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,
@@ -831,7 +831,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]},
{auto_skipped,{require_failed,{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t41,g4},
{require_failed,{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g4},
@@ -857,7 +857,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]},
{auto_skipped,{require_failed,{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g8},
@@ -879,7 +879,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t111,{group0_failed,bad_return_value}}},
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g11},
{group0_failed,bad_return_value}}}],
diff --git a/lib/common_test/test/ct_group_leader_SUITE_data/group_leader_SUITE.erl b/lib/common_test/test/ct_group_leader_SUITE_data/group_leader_SUITE.erl
index 804f722081..bfdc78639e 100644
--- a/lib/common_test/test/ct_group_leader_SUITE_data/group_leader_SUITE.erl
+++ b/lib/common_test/test/ct_group_leader_SUITE_data/group_leader_SUITE.erl
@@ -258,14 +258,14 @@ gen_io(Label, N, Acc) ->
%% (via ct logging functions) from an external process which has a
%% different group leader than the test cases.
unexp1(Config) ->
- timer:sleep(1000),
+ ct:sleep(1000),
gen_unexp_io(),
- timer:sleep(1000),
+ ct:sleep(1000),
check_unexp_io(Config),
ok.
unexp2(_) ->
- timer:sleep(2000),
+ ct:sleep(2000),
ok.
gen_unexp_io() ->
diff --git a/lib/common_test/test/ct_groups_spec_SUITE.erl b/lib/common_test/test/ct_groups_spec_SUITE.erl
index 5a6d5ac0ac..de4ab77229 100644
--- a/lib/common_test/test/ct_groups_spec_SUITE.erl
+++ b/lib/common_test/test/ct_groups_spec_SUITE.erl
@@ -246,7 +246,8 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t11,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{3,2,{0,1}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
@@ -327,19 +328,27 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{14,9,{0,2}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
{?eh,tc_done,{groups_spec_1_SUITE,t22,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t41,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t51,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t52,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t42,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t23,{failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t41,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t51,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t52,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t42,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t23,g2},
+ {failed,{groups_spec_1_SUITE,t22}}}},
{?eh,test_stats,{14,10,{0,9}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]}}},
@@ -355,7 +364,8 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{16,11,{0,10}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
@@ -372,8 +382,10 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g5,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t51,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t52,{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t52}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
{?eh,test_stats,{18,13,{0,12}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]},ok}}],
@@ -417,7 +429,8 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t11,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{3,2,{0,1}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
@@ -493,18 +506,26 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{14,9,{0,2}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
{?eh,tc_done,{groups_spec_1_SUITE,t22,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t41,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t51,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t52,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t42,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t23,{failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t41,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t51,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t52,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t42,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t23,g2},
+ {failed,{groups_spec_1_SUITE,t22}}}},
{?eh,test_stats,{14,10,{0,9}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]},ok}}],
@@ -521,7 +542,8 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{16,11,{0,10}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
@@ -535,8 +557,10 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g5,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t51,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t52,{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t52}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
{?eh,test_stats,{18,13,{0,12}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]},ok}}],
@@ -555,7 +579,8 @@ test_events(override_with_spec) ->
[{?eh,tc_start,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{19,15,{0,13}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
diff --git a/lib/common_test/test/ct_groups_test_1_SUITE.erl b/lib/common_test/test/ct_groups_test_1_SUITE.erl
index e520a72227..d5de949554 100644
--- a/lib/common_test/test/ct_groups_test_1_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_1_SUITE.erl
@@ -302,7 +302,7 @@ test_events(groups_suite_1) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}];
@@ -410,7 +410,7 @@ test_events(groups_suite_2) ->
{?eh,tc_done,{groups_12_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_12_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_12_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_12_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}];
@@ -505,7 +505,7 @@ test_events(groups_suites_1) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{?eh,tc_start,{groups_12_SUITE,init_per_suite}},
{?eh,tc_done,{groups_12_SUITE,init_per_suite,ok}},
@@ -596,7 +596,7 @@ test_events(groups_suites_1) ->
{?eh,tc_done,{groups_12_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_12_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_12_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_12_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}];
@@ -691,7 +691,7 @@ test_events(groups_dir_1) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{?eh,tc_start,{groups_12_SUITE,init_per_suite}},
{?eh,tc_done,{groups_12_SUITE,init_per_suite,ok}},
@@ -782,7 +782,7 @@ test_events(groups_dir_1) ->
{?eh,tc_done,{groups_12_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_12_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_12_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_12_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}];
@@ -878,7 +878,7 @@ test_events(groups_dirs_1) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{?eh,tc_start,{groups_12_SUITE,init_per_suite}},
{?eh,tc_done,{groups_12_SUITE,init_per_suite,ok}},
@@ -969,7 +969,7 @@ test_events(groups_dirs_1) ->
{?eh,tc_done,{groups_12_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_12_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_12_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_12_SUITE,end_per_suite,ok}},
{?eh,tc_start,{groups_21_SUITE,init_per_suite}},
{?eh,tc_done,{groups_21_SUITE,init_per_suite,ok}},
@@ -1089,7 +1089,7 @@ test_events(groups_dirs_1) ->
{groups_21_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_21_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_21_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_21_SUITE,end_per_suite,ok}},
{?eh,tc_start,{groups_22_SUITE,init_per_suite}},
{?eh,tc_done,{groups_22_SUITE,init_per_suite,ok}},
@@ -1223,6 +1223,6 @@ test_events(groups_dirs_1) ->
{groups_22_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_22_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_22_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_22_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}].
diff --git a/lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl b/lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl
index ec90ef95d1..6f49f9a957 100644
--- a/lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl
@@ -278,7 +278,7 @@ testcase_5a(Config) ->
%% increase chance the done event will come
%% during execution of subgroup (could be
%% tricky to handle)
- timer:sleep(3),
+ ct:sleep(3),
ok.
testcase_5b() ->
[].
diff --git a/lib/common_test/test/ct_groups_test_2_SUITE.erl b/lib/common_test/test/ct_groups_test_2_SUITE.erl
index 8b0de98709..f41395e028 100644
--- a/lib/common_test/test/ct_groups_test_2_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_2_SUITE.erl
@@ -302,7 +302,7 @@ test_events(empty_group) ->
{?eh,tc_done,
{groups_22_SUITE,{end_per_group,test_group_8,[]},ok}}],
{?eh,tc_start,{groups_22_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_22_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_22_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_groups_test_2_SUITE_data/groups_2/groups_22_SUITE.erl b/lib/common_test/test/ct_groups_test_2_SUITE_data/groups_2/groups_22_SUITE.erl
index 154c676d7e..80bb5ba69b 100644
--- a/lib/common_test/test/ct_groups_test_2_SUITE_data/groups_2/groups_22_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_2_SUITE_data/groups_2/groups_22_SUITE.erl
@@ -293,7 +293,7 @@ testcase_5a(Config) ->
%% increase chance the done event will come
%% during execution of subgroup (could be
%% tricky to handle)
- timer:sleep(3),
+ ct:sleep(3),
ok.
testcase_5b() ->
[].
diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index b5855da9df..d5ad8312e6 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -786,7 +786,7 @@ test_events(skip_pre_end_cth) ->
{?eh,cth,{'_',post_end_per_group,[group1,'$proplist','_',[]]}},
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,{end_per_group,group1,[]},
{skipped,"Test skip"}}}],
- {?eh,cth,{'_',on_tc_skip,[end_per_group,
+ {?eh,cth,{'_',on_tc_skip,[{end_per_group,group1},
{tc_user_skip,{skipped,"Test skip"}},
[]]}},
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,end_per_suite}},
@@ -1075,7 +1075,37 @@ test_events(fail_n_skip_with_minimal_cth) ->
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
{?eh,cth,{'_',init,['_',[]]}},
{?eh,tc_start,{'_',init_per_suite}},
-
+
+ {parallel,
+ [{?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,{init_per_group,
+ group1,[parallel]}}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,{init_per_group,
+ group1,[parallel]},ok}},
+ {parallel,
+ [{?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,{init_per_group,
+ group2,[parallel]}}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,{init_per_group,
+ group2,[parallel]},ok}},
+ %% Verify that 'skip' as well as 'skipped' works
+ {?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,test_case2}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,test_case2,{skipped,"skip it"}}},
+ {?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,test_case3}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,test_case3,{skipped,"skip it"}}},
+ {?eh,cth,{empty_cth,on_tc_skip,[{test_case2,group2},
+ {tc_user_skip,{skipped,"skip it"}},
+ []]}},
+ {?eh,cth,{empty_cth,on_tc_skip,[{test_case3,group2},
+ {tc_user_skip,{skipped,"skip it"}},
+ []]}},
+ {?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,{end_per_group,
+ group2,[parallel]}}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,{end_per_group,group2,
+ [parallel]},ok}}]},
+ {?eh,tc_start,{ct_cth_fail_one_skip_one_SUITE,{end_per_group,
+ group1,[parallel]}}},
+ {?eh,tc_done,{ct_cth_fail_one_skip_one_SUITE,{end_per_group,
+ group1,[parallel]},ok}}]},
+
{?eh,tc_done,{'_',end_per_suite,ok}},
{?eh,cth,{'_',terminate,[[]]}},
{?eh,stop_logging,[]}
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_cth_fail_one_skip_one_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_cth_fail_one_skip_one_SUITE.erl
index b2f22d8257..7b84c246ca 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_cth_fail_one_skip_one_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_cth_fail_one_skip_one_SUITE.erl
@@ -41,6 +41,8 @@ end_per_group(_Group,_Config) ->
init_per_testcase(test_case2, Config) ->
{skip,"skip it"};
+init_per_testcase(test_case3, Config) ->
+ {skipped,"skip it"};
init_per_testcase(_TestCase, Config) ->
Config.
@@ -48,7 +50,9 @@ end_per_testcase(_TestCase, _Config) ->
ok.
groups() ->
- [{group1,[parallel],[{group2,[parallel],[test_case1,test_case2,test_case3]}]}].
+ [{group1,[parallel],
+ [{group2,[parallel],
+ [test_case1,test_case2,test_case3,test_case4]}]}].
all() ->
[{group,group1}].
@@ -62,3 +66,6 @@ test_case2(Config) ->
test_case3(Config) ->
ok.
+
+test_case4(Config) ->
+ ok.
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/cth_log_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/cth_log_SUITE.erl
index 18dd07e87e..80ce248418 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/cth_log_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/cth_log_SUITE.erl
@@ -50,7 +50,7 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
Gen = proplists:get_value(gen, Config),
exit(Gen, kill),
- timer:sleep(100),
+ ct:sleep(100),
ok.
%%--------------------------------------------------------------------
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
index 9ee2a90896..77783fccf5 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
@@ -75,6 +75,7 @@
init(Id, Opts) ->
gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, init, [Id, Opts]}}),
+ ct:log("~w:init called", [?MODULE]),
{ok,Opts}.
%% @doc The ID is used to uniquly identify an CTH instance, if two CTH's
@@ -85,6 +86,7 @@ init(Id, Opts) ->
id(Opts) ->
gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, id, [Opts]}}),
+ ct:log("~w:id called", [?MODULE]),
now().
%% @doc Called before init_per_suite is called. Note that this callback is
@@ -100,6 +102,7 @@ pre_init_per_suite(Suite,Config,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, pre_init_per_suite,
[Suite,Config,State]}}),
+ ct:log("~w:pre_init_per_suite(~w) called", [?MODULE,Suite]),
{Config, State}.
%% @doc Called after init_per_suite.
@@ -114,6 +117,7 @@ post_init_per_suite(Suite,Config,Return,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, post_init_per_suite,
[Suite,Config,Return,State]}}),
+ ct:log("~w:post_init_per_suite(~w) called", [?MODULE,Suite]),
{Return, State}.
%% @doc Called before end_per_suite. The config/state can be changed here,
@@ -127,6 +131,7 @@ pre_end_per_suite(Suite,Config,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, pre_end_per_suite,
[Suite,Config,State]}}),
+ ct:log("~w:pre_end_per_suite(~w) called", [?MODULE,Suite]),
{Config, State}.
%% @doc Called after end_per_suite. Note that the config cannot be
@@ -141,6 +146,7 @@ post_end_per_suite(Suite,Config,Return,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, post_end_per_suite,
[Suite,Config,Return,State]}}),
+ ct:log("~w:post_end_per_suite(~w) called", [?MODULE,Suite]),
{Return, State}.
%% @doc Called before each init_per_group.
@@ -154,6 +160,7 @@ pre_init_per_group(Group,Config,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, pre_init_per_group,
[Group,Config,State]}}),
+ ct:log("~w:pre_init_per_group(~w) called", [?MODULE,Group]),
{Config, State}.
%% @doc Called after each init_per_group.
@@ -168,6 +175,7 @@ post_init_per_group(Group,Config,Return,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, post_init_per_group,
[Group,Config,Return,State]}}),
+ ct:log("~w:post_init_per_group(~w) called", [?MODULE,Group]),
{Return, State}.
%% @doc Called after each end_per_group. The config/state can be changed here,
@@ -181,6 +189,7 @@ pre_end_per_group(Group,Config,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, pre_end_per_group,
[Group,Config,State]}}),
+ ct:log("~w:pre_end_per_group(~w) called", [?MODULE,Group]),
{Config, State}.
%% @doc Called after each end_per_group. Note that the config cannot be
@@ -195,6 +204,7 @@ post_end_per_group(Group,Config,Return,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, post_end_per_group,
[Group,Config,Return,State]}}),
+ ct:log("~w:post_end_per_group(~w) called", [?MODULE,Group]),
{Return, State}.
%% @doc Called before each test case.
@@ -208,6 +218,7 @@ pre_init_per_testcase(TC,Config,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, pre_init_per_testcase,
[TC,Config,State]}}),
+ ct:log("~w:pre_init_per_testcase(~w) called", [?MODULE,TC]),
{Config, State}.
%% @doc Called after each test case. Note that the config cannot be
@@ -222,6 +233,7 @@ post_end_per_testcase(TC,Config,Return,State) ->
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, post_end_per_testcase,
[TC,Config,Return,State]}}),
+ ct:log("~w:post_end_per_testcase(~w) called", [?MODULE,TC]),
{Return, State}.
%% @doc Called after post_init_per_suite, post_end_per_suite, post_init_per_group,
@@ -229,30 +241,32 @@ post_end_per_testcase(TC,Config,Return,State) ->
%% This function should be used for extra cleanup which might be needed.
%% It is not possible to modify the config or the status of the test run.
-spec on_tc_fail(TC :: init_per_suite | end_per_suite |
- init_per_group | end_per_group | atom(),
- Reason :: term(), State :: #state{}) ->
- NewState :: #state{}.
+ init_per_group | end_per_group | atom() |
+ {Function :: atom(), GroupName :: atom()},
+ Reason :: term(), State :: #state{}) -> NewState :: #state{}.
on_tc_fail(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, on_tc_fail,
[TC,Reason,State]}}),
+ ct:log("~w:on_tc_fail(~w) called", [?MODULE,TC]),
State.
%% @doc Called when a test case is skipped by either user action
%% or due to an init function failing. Test case can be
%% end_per_suite, init_per_group, end_per_group and the actual test cases.
-spec on_tc_skip(TC :: end_per_suite |
- init_per_group | end_per_group | atom(),
+ init_per_group | end_per_group | atom() |
+ {Function :: atom(), GroupName :: atom()},
{tc_auto_skip, {failed, {Mod :: atom(), Function :: atom(), Reason :: term()}}} |
- {tc_user_skip, {skipped, Reason :: term()}},
- State :: #state{}) ->
- NewState :: #state{}.
+ {tc_user_skip, {skipped, Reason :: term()}},
+ State :: #state{}) -> NewState :: #state{}.
on_tc_skip(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, on_tc_skip,
[TC,Reason,State]}}),
+ ct:log("~w:on_tc_skip(~w) called", [?MODULE,TC]),
State.
%% @doc Called when the scope of the CTH is done, this depends on
@@ -274,4 +288,5 @@ terminate(State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = cth, node = node(),
data = {?MODULE, terminate, [State]}}),
+ ct:log("~w:terminate called", [?MODULE]),
ok.
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl
index 30721a6b3a..436470f46d 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl
@@ -28,10 +28,14 @@
%% CT Hooks
-export([init/2]).
-export([terminate/1]).
+-export([on_tc_skip/3]).
init(Id, Opts) ->
empty_cth:init(Id, Opts).
+on_tc_skip(TC, Reason, State) ->
+ empty_cth:on_tc_skip(TC,Reason,State).
+
terminate(State) ->
empty_cth:terminate(State).
diff --git a/lib/common_test/test/ct_master_SUITE.erl b/lib/common_test/test/ct_master_SUITE.erl
index 7408cbe376..e90513f888 100644
--- a/lib/common_test/test/ct_master_SUITE.erl
+++ b/lib/common_test/test/ct_master_SUITE.erl
@@ -81,7 +81,8 @@ end_per_testcase(TestCase, Config) ->
ct_test_support:end_per_testcase(TestCase, Config).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() -> [{timetrap,{seconds,60}},
+ {ct_hooks,[ts_install_cth]}].
all() ->
[ct_master_test].
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 2bcfeeec0c..d01211b0c6 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
@@ -164,7 +164,7 @@ hello_from_server_first(Config) ->
{ok,Client} = ct_netconfc:only_open(?DEFAULT_SSH_OPTS(DataDir)),
ct:sleep(500),
?NS:expect(hello),
- ?ok = ct_netconfc:hello(Client),
+ ?ok = ct_netconfc:hello(Client, [{capability, ["urn:com:ericsson:ebase:1.1.0"]}], infinity),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
@@ -218,7 +218,7 @@ hello_required_exists(Config) ->
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(my_named_connection),
- timer:sleep(500),
+ 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),
@@ -488,8 +488,18 @@ action(Config) ->
DataDir = ?config(data_dir,Config),
{ok,Client} = open_success(DataDir),
Data = [{myactionreturn,[{xmlns,"myns"}],["value"]}],
- ?NS:expect_reply(action,{data,Data}),
- {ok,Data} = ct_netconfc:action(Client,{myaction,[{xmlns,"myns"}],[]}),
+ %% test either to receive {data,Data} or {ok,Data},
+ %% both need to be handled
+ ct:log("Client will receive {~w,~p}", [data,Data]),
+ ct:log("Expecting ~p", [{ok, Data}]),
+ ?NS:expect_reply(action,{data, Data}),
+ {ok, Data} = ct_netconfc:action(Client,{myaction,[{xmlns,"myns"}],[]}),
+
+ ct:log("Client will receive {~w,~p}", [ok,Data]),
+ ct:log("Expecting ~p", [ok]),
+ ?NS:expect_reply(action,{ok, Data}),
+ ok = ct_netconfc:action(Client,{myaction,[{xmlns,"myns"}],[]}),
+
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
@@ -656,10 +666,10 @@ receive_chunked_data(Config) ->
%% Spawn a process which will wait a bit for the client to send
%% the request (below), then order the server to the chunks of the
%% rpc-reply one by one.
- spawn(fun() -> timer:sleep(500),?NS:hupp(send,Part1),
- timer:sleep(100),?NS:hupp(send,Part2),
- timer:sleep(100),?NS:hupp(send,Part3),
- timer:sleep(100),?NS:hupp(send,Part4)
+ spawn(fun() -> ct:sleep(500),?NS:hupp(send,Part1),
+ ct:sleep(100),?NS:hupp(send,Part2),
+ ct:sleep(100),?NS:hupp(send,Part3),
+ ct:sleep(100),?NS:hupp(send,Part4)
end),
%% Order server to expect a get - then the process above will make
@@ -704,8 +714,8 @@ timeout_receive_chunked_data(Config) ->
%% Spawn a process which will wait a bit for the client to send
%% the request (below), then order the server to the chunks of the
%% rpc-reply one by one.
- spawn(fun() -> timer:sleep(500),?NS:hupp(send,Part1),
- timer:sleep(100),?NS:hupp(send,Part2)
+ spawn(fun() -> ct:sleep(500),?NS:hupp(send,Part1),
+ ct:sleep(100),?NS:hupp(send,Part2)
end),
%% Order server to expect a get - then the process above will make
@@ -750,9 +760,9 @@ close_while_waiting_for_chunked_data(Config) ->
%% Spawn a process which will wait a bit for the client to send
%% the request (below), then order the server to the chunks of the
%% rpc-reply one by one.
- spawn(fun() -> timer:sleep(500),?NS:hupp(send,Part1),
- timer:sleep(100),?NS:hupp(send,Part2),
- timer:sleep(100),?NS:hupp(kill)
+ spawn(fun() -> ct:sleep(500),?NS:hupp(send,Part1),
+ ct:sleep(100),?NS:hupp(send,Part2),
+ ct:sleep(100),?NS:hupp(kill)
end),
%% Order server to expect a get - then the process above will make
@@ -768,7 +778,7 @@ connection_crash(Config) ->
%% Test that if the test survives killing the connection
%% process. Earlier this caused ct_util_server to terminate, and
%% this aborting the complete test run.
- spawn(fun() -> timer:sleep(500),exit(Client,kill) end),
+ spawn(fun() -> ct:sleep(500),exit(Client,kill) end),
?NS:expect(get),
{error,{closed,killed}}=ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]}),
ok.
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
index fb0734d48e..27da67bd1d 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
@@ -351,7 +351,7 @@ check_expected(SessionId,ConnRef,Msg) ->
do(ConnRef, Do),
reply(ConnRef,Reply);
error ->
- timer:sleep(1000),
+ ct:sleep(1000),
exit({error,{got_unexpected,SessionId,Msg,ets:tab2list(ns_tab)}})
end.
@@ -540,8 +540,13 @@ make_msg({hello,SessionId,Stuff}) ->
SessionIdXml/binary,"</hello>">>);
make_msg(ok) ->
xml(rpc_reply("<ok/>"));
+
+make_msg({ok,Data}) ->
+ xml(rpc_reply(from_simple({ok,Data})));
+
make_msg({data,Data}) ->
xml(rpc_reply(from_simple({data,Data})));
+
make_msg(event) ->
xml(<<"<notification xmlns=\"",?NETCONF_NOTIF_NAMESPACE,"\">"
"<eventTime>2012-06-14T14:50:54+02:00</eventTime>"
diff --git a/lib/common_test/test/ct_pre_post_test_io_SUITE.erl b/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
index 5de1ecc2bd..1e6018f442 100644
--- a/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
+++ b/lib/common_test/test/ct_pre_post_test_io_SUITE.erl
@@ -91,27 +91,27 @@ pre_post_io(Config) ->
spawn(fun() ->
ct:pal("CONTROLLER: Started!", []),
%% --- test run 1 ---
- timer:sleep(3000),
+ ct:sleep(3000),
ct:pal("CONTROLLER: Handle remote events = true", []),
ok = ct_test_support:ct_rpc({cth_log_redirect,
handle_remote_events,
[true]}, Config),
- timer:sleep(2000),
+ ct:sleep(2000),
ct:pal("CONTROLLER: Proceeding with test run #1!", []),
ok = ct_test_support:ct_rpc({cth_ctrl,proceed,[]}, Config),
- timer:sleep(6000),
+ ct:sleep(6000),
ct:pal("CONTROLLER: Proceeding with shutdown #1!", []),
ok = ct_test_support:ct_rpc({cth_ctrl,proceed,[]}, Config),
%% --- test run 2 ---
- timer:sleep(3000),
+ ct:sleep(3000),
ct:pal("CONTROLLER: Handle remote events = true", []),
ok = ct_test_support:ct_rpc({cth_log_redirect,
handle_remote_events,
[true]}, Config),
- timer:sleep(2000),
+ ct:sleep(2000),
ct:pal("CONTROLLER: Proceeding with test run #2!", []),
ok = ct_test_support:ct_rpc({cth_ctrl,proceed,[]}, Config),
- timer:sleep(6000),
+ ct:sleep(6000),
ct:pal("CONTROLLER: Proceeding with shutdown #2!", []),
ok = ct_test_support:ct_rpc({cth_ctrl,proceed,[]}, Config)
end),
diff --git a/lib/common_test/test/ct_repeat_1_SUITE.erl b/lib/common_test/test/ct_repeat_1_SUITE.erl
index 98eaa28763..50e07608f6 100644
--- a/lib/common_test/test/ct_repeat_1_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_1_SUITE.erl
@@ -220,12 +220,11 @@ test_events(repeat_cs_and_grs) ->
{?eh,test_stats,{1,1,{0,0}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_result,[]},ok}},
{?eh,test_stats,{2,1,{0,0}}},
- {?eh,tc_done,{repeat_1_SUITE,{end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {?eh,tc_done,{repeat_1_SUITE,{end_per_group,gr_fail_result,[]},ok}}],
{?eh,test_stats,{3,1,{0,0}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_init,[]},
{failed,{error,fails_on_purpose}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}},
{?eh,test_stats,{3,1,{0,1}}},
@@ -242,12 +241,11 @@ test_events(repeat_cs_and_grs) ->
{?eh,test_stats,{5,2,{0,1}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_result,[]},ok}},
{?eh,test_stats,{6,2,{0,1}}},
- {?eh,tc_done,{repeat_1_SUITE,{end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {?eh,tc_done,{repeat_1_SUITE,{end_per_group,gr_fail_result,[]},ok}}],
{?eh,test_stats,{7,2,{0,1}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_init,[]},
{failed,{error,fails_on_purpose}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}},
{?eh,test_stats,{7,2,{0,2}}},
@@ -269,7 +267,7 @@ test_events(repeat_seq) ->
ok}},
{?eh,test_stats,{1,0,{0,0}}},
{?eh,test_stats,{1,1,{0,0}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_1},
{failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{1,1,{0,1}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -289,9 +287,8 @@ test_events(repeat_seq) ->
{init_per_group,gr_fail_result,[]},ok}},
{?eh,test_stats,{4,2,{0,2}}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {end_per_group,gr_fail_result,[]},ok}}],
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_2},
{group_result,gr_fail_result,failed}}},
{?eh,test_stats,{4,2,{0,3}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -315,7 +312,7 @@ test_events(repeat_seq) ->
{failed,
{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_3},
{group_result,gr_fail_init,failed}}},
{?eh,test_stats,{7,2,{0,6}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -329,12 +326,13 @@ test_events(repeat_seq) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,repeat_seq_4,[sequence,{repeat,2}]},
ok}},
+ {?eh,tc_done,{repeat_1_SUITE,tc_fail_1,'_'}},
{?eh,test_stats,{8,3,{0,8}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,
- tc_ok_1,{failed,{repeat_1_SUITE,tc_fail_1}}}},
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
+ {failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{8,3,{0,9}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,
- tc_ok_1,{failed,{repeat_1_SUITE,tc_fail_1}}}},
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_4},
+ {failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{8,3,{0,10}}},
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,repeat_seq_4,[sequence,{repeat,2}]},
@@ -401,8 +399,7 @@ test_events(repeat_gr_until_any_ok) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,gr_fail_result,[]},ok}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,tc_fail_1,
{failed,{error,{{badmatch,2},'_'}}}}},
{?eh,test_stats,{1,1,{0,0}}},
@@ -417,8 +414,7 @@ test_events(repeat_gr_until_any_ok) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,gr_fail_result_then_ok,[]},ok}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result_then_ok,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result_then_ok,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,repeat_gr_until_any_ok_1,
[{repeat_until_any_ok,3}]},ok}}],
@@ -440,8 +436,7 @@ test_events(repeat_gr_until_any_ok) ->
{init_per_group,repeat_gr_until_any_ok_2,
[{repeat_until_any_ok,3}]},ok}},
[{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,tc_fail_1,
{failed,{error,{{badmatch,2},'_'}}}}},
{?eh,test_stats,{5,5,{0,2}}},
@@ -674,8 +669,7 @@ test_events(repeat_gr_until_any_fail) ->
{repeat_1_SUITE,{end_per_group,gr_ok_then_fail_result,[]}}},
{?eh,tc_done,
{repeat_1_SUITE,
- {end_per_group,gr_ok_then_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_ok_then_fail_result,[]},ok}}],
{?eh,tc_start,{repeat_1_SUITE,tc_ok_2}},
{?eh,tc_done,{repeat_1_SUITE,tc_ok_2,ok}},
{?eh,test_stats,{8,0,{0,0}}},
@@ -764,7 +758,7 @@ test_events(repeat_gr_until_any_fail) ->
{init_per_group,gr_ok_then_fail_init,[]},
{failed,{error,failing_this_time}}}},
{?eh,tc_auto_skip,
- {repeat_1_SUITE,tc_ok_1,
+ {repeat_1_SUITE,{tc_ok_1,gr_ok_then_fail_init},
{failed,
{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}},
@@ -937,8 +931,7 @@ test_events(repeat_gr_until_all_ok) ->
{?eh,tc_done,{repeat_1_SUITE,tc_ok_1,ok}},
{?eh,test_stats,{3,1,{0,0}}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result_then_ok,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result_then_ok,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,repeat_gr_until_all_ok_1,
[{repeat_until_all_ok,3}]},ok}}],
@@ -963,7 +956,7 @@ test_events(repeat_gr_until_all_ok) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,gr_fail_init_then_ok,[]},
{failed,{error,failing_this_time}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init_then_ok},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}},
{?eh,test_stats,{7,1,{0,1}}},
@@ -1112,8 +1105,7 @@ test_events(repeat_gr_until_all_fail) ->
gr_ok_then_fail_result,[]},ok}},
{?eh,test_stats,{3,3,{0,2}}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_ok_then_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_ok_then_fail_result,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,repeat_gr_until_all_fail_1,
[{repeat_until_all_fail,2}]},ok}}],
@@ -1147,8 +1139,7 @@ test_events(repeat_gr_until_all_fail) ->
{init_per_group,repeat_gr_until_all_fail_3,
[{repeat_until_all_fail,3}]},ok}},
[{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,tc_ok_then_fail_1,ok}},
{?eh,test_stats,{6,5,{0,3}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1158,8 +1149,7 @@ test_events(repeat_gr_until_all_fail) ->
{init_per_group,repeat_gr_until_all_fail_3,
[{repeat_until_all_fail,2}]},ok}},
[{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_fail_result,[]},ok}}],
{?eh,tc_done,{repeat_1_SUITE,tc_ok_then_fail_1,
{failed,{error,failing_this_time}}}},
{?eh,test_stats,{7,6,{0,3}}},
@@ -1237,10 +1227,10 @@ test_events(repeat_seq_until_any_fail) ->
{?eh,tc_done,{repeat_1_SUITE,tc_ok_then_fail_1,
{failed,{error,failing_this_time}}}},
{?eh,test_stats,{15,1,{0,0}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_until_any_fail_3},
{failed,{repeat_1_SUITE,tc_ok_then_fail_1}}}},
{?eh,test_stats,{15,1,{0,1}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
{failed,{repeat_1_SUITE,tc_ok_then_fail_1}}}},
{?eh,test_stats,{15,1,{0,2}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1262,12 +1252,11 @@ test_events(repeat_seq_until_any_fail) ->
{init_per_group,repeat_seq_until_any_fail_4,
[{repeat_until_any_fail,2},sequence]},ok}},
[{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_ok_then_fail_result,[]},
- {return_group_result,failed}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {end_per_group,gr_ok_then_fail_result,[]},ok}}],
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
{group_result,gr_ok_then_fail_result,failed}}},
{?eh,test_stats,{19,1,{0,3}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_until_any_fail_4},
{group_result,gr_ok_then_fail_result,failed}}},
{?eh,test_stats,{19,1,{0,4}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1296,10 +1285,10 @@ test_events(repeat_seq_until_any_fail) ->
{?eh,tc_auto_skip,{repeat_1_SUITE,{end_per_group,gr_ok_then_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_2},
{group_result,gr_ok_then_fail_init,failed}}},
{?eh,test_stats,{24,1,{0,6}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_until_any_fail_5},
{group_result,gr_ok_then_fail_init,failed}}},
{?eh,test_stats,{24,1,{0,7}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1472,8 +1461,7 @@ test_events(repeat_shuffled_seq_until_any_fail) ->
[{?eh,tc_start,{repeat_1_SUITE,
{end_per_group,gr_ok_then_fail_result,[]}}},
{?eh,tc_done,{repeat_1_SUITE,
- {end_per_group,gr_ok_then_fail_result,[]},
- {return_group_result,failed}}}],
+ {end_per_group,gr_ok_then_fail_result,[]},ok}}],
{?eh,tc_start,{repeat_1_SUITE,
{end_per_group,repeat_shuffled_seq_until_any_fail_4,
[{shuffle,repeated},{repeat_until_any_fail,2},sequence]}}},
diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
index bb2aba2c5a..b6f285322d 100644
--- a/lib/common_test/test/ct_repeat_testrun_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
@@ -343,9 +343,9 @@ skip_first_tc1(Suite) ->
{?eh,tc_done,{Suite,tc2,?skipped}},
{?eh,test_stats,{'_',0,{0,1}}},
{?eh,tc_done,{Suite,{init_per_group,g,[]},?skipped}},
- {?eh,tc_auto_skip,{Suite,tc1,?skip_reason}},
+ {?eh,tc_auto_skip,{Suite,{tc1,g},?skip_reason}},
{?eh,test_stats,{'_',0,{0,2}}},
- {?eh,tc_auto_skip,{Suite,tc2,?skip_reason}},
+ {?eh,tc_auto_skip,{Suite,{tc2,g},?skip_reason}},
{?eh,test_stats,{'_',0,{0,3}}},
{?eh,tc_auto_skip,{Suite,{end_per_group,g},?skip_reason}},
{?eh,tc_done,{Suite,tc2,?skipped}},
diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE_data/a_test/r1_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE_data/a_test/r1_SUITE.erl
index 3fd5943691..3d7049a9c4 100644
--- a/lib/common_test/test/ct_repeat_testrun_SUITE_data/a_test/r1_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_testrun_SUITE_data/a_test/r1_SUITE.erl
@@ -68,7 +68,7 @@ end_per_testcase(_Case, Config) ->
%%%-----------------------------------------------------------------
%%% Test cases
tc1(_Config) ->
- timer:sleep(10000),
+ ct:sleep(10000),
ok.
tc2(_Config) ->
diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE_data/b_test/r2_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE_data/b_test/r2_SUITE.erl
index dc9abc2863..e4f6e7dcc1 100644
--- a/lib/common_test/test/ct_repeat_testrun_SUITE_data/b_test/r2_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_testrun_SUITE_data/b_test/r2_SUITE.erl
@@ -68,7 +68,7 @@ end_per_testcase(_Case, Config) ->
%%%-----------------------------------------------------------------
%%% Test cases
tc1(_Config) ->
- %% timer:sleep(3000),
+ %% ct:sleep(3000),
ok.
tc2(_Config) ->
diff --git a/lib/common_test/test/ct_sequence_1_SUITE.erl b/lib/common_test/test/ct_sequence_1_SUITE.erl
index 8c87236838..4055cd789e 100644
--- a/lib/common_test/test/ct_sequence_1_SUITE.erl
+++ b/lib/common_test/test/ct_sequence_1_SUITE.erl
@@ -182,16 +182,15 @@ test_events(subgroup_return_fail) ->
{?eh,test_stats,{0,1,{0,0}}},
{?eh,tc_start,
{subgroups_1_SUITE,{end_per_group,return_fail,[]}}},
- {?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},
- {return_group_result,failed}}}],
+ {?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},ok}}],
{?eh,tc_auto_skip,
- {subgroups_1_SUITE,ok_tc,{group_result,return_fail,failed}}},
+ {subgroups_1_SUITE,{ok_tc,ok_group},
+ {group_result,return_fail,failed}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,
{subgroups_1_SUITE,{end_per_group,subgroup_return_fail,[sequence]}}},
{?eh,tc_done,
- {subgroups_1_SUITE,{end_per_group,subgroup_return_fail,[sequence]},
- {return_group_result,failed}}}],
+ {subgroups_1_SUITE,{end_per_group,subgroup_return_fail,[sequence]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -208,19 +207,19 @@ test_events(subgroup_init_fail) ->
[{?eh,tc_start,{subgroups_1_SUITE,{init_per_group,fail_init,[]}}},
{?eh,tc_done,{subgroups_1_SUITE,{init_per_group,fail_init,[]},
{failed,{error,init_per_group_fails_on_purpose}}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,fail_init},
{failed,{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}},
{?eh,test_stats,{0,0,{0,1}}},
{?eh,tc_auto_skip,{subgroups_1_SUITE,{end_per_group,fail_init},
{failed,{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}}],
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{group_result,fail_init,failed}}},
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,ok_group},
+ {group_result,fail_init,failed}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_start,{subgroups_1_SUITE,{end_per_group,subgroup_init_fail,[sequence]}}},
{?eh,tc_done,{subgroups_1_SUITE,
- {end_per_group,subgroup_init_fail,[sequence]},
- {return_group_result,failed}}}],
+ {end_per_group,subgroup_init_fail,[sequence]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -237,13 +236,13 @@ test_events(subgroup_after_failed_case) ->
{?eh,tc_start,{subgroups_1_SUITE,failing_tc}},
{?eh,tc_done,{subgroups_1_SUITE,failing_tc,{failed,{error,{{badmatch,3},'_'}}}}},
{?eh,test_stats,{0,1,{0,0}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{failed,{subgroups_1_SUITE,failing_tc}}}},
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,ok_group},
+ {failed,{subgroups_1_SUITE,failing_tc}}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,subgroup_after_failed_case,[sequence]}}},
{?eh,tc_done,{subgroups_1_SUITE,
- {end_per_group,subgroup_after_failed_case,[sequence]},
- {return_group_result,failed}}}],
+ {end_per_group,subgroup_after_failed_case,[sequence]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -263,15 +262,14 @@ test_events(case_after_subgroup_return_fail) ->
{?eh,tc_done,{subgroups_1_SUITE,failing_tc,{failed,{error,{{badmatch,3},'_'}}}}},
{?eh,test_stats,{0,1,{0,0}}},
{?eh,tc_start,{subgroups_1_SUITE,{end_per_group,return_fail,[]}}},
- {?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},
- {return_group_result,failed}}}],
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{group_result,return_fail,failed}}},
+ {?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},ok}}],
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,case_after_subgroup_return_fail},
+ {group_result,return_fail,failed}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,case_after_subgroup_return_fail,[sequence]}}},
{?eh,tc_done,{subgroups_1_SUITE,
- {end_per_group,case_after_subgroup_return_fail,[sequence]},
- {return_group_result,failed}}}],
+ {end_per_group,case_after_subgroup_return_fail,[sequence]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -289,7 +287,7 @@ test_events(case_after_subgroup_fail_init) ->
{?eh,tc_done,{subgroups_1_SUITE,
{init_per_group,fail_init,[]},
{failed,{error,init_per_group_fails_on_purpose}}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,fail_init},
{failed,
{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}},
@@ -300,13 +298,13 @@ test_events(case_after_subgroup_fail_init) ->
{'EXIT',init_per_group_fails_on_purpose}}}}}],
{?eh,tc_auto_skip,
- {subgroups_1_SUITE,ok_tc,{group_result,fail_init,failed}}},
+ {subgroups_1_SUITE,{ok_tc,case_after_subgroup_fail_init},
+ {group_result,fail_init,failed}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,case_after_subgroup_fail_init,[sequence]}}},
{?eh,tc_done,{subgroups_1_SUITE,
- {end_per_group,case_after_subgroup_fail_init,[sequence]},
- {return_group_result,failed}}}],
+ {end_per_group,case_after_subgroup_fail_init,[sequence]},ok}}],
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_shell_SUITE.erl b/lib/common_test/test/ct_shell_SUITE.erl
index 4b8c43d800..70c0ab8127 100644
--- a/lib/common_test/test/ct_shell_SUITE.erl
+++ b/lib/common_test/test/ct_shell_SUITE.erl
@@ -93,7 +93,7 @@ start_interactive(Config) ->
test_server:format(Level,
"ct_util_server not stopped on ~p yet, waiting 5 s...~n",
[CTNode]),
- timer:sleep(5000),
+ ct:sleep(5000),
undefined = rpc:call(CTNode, erlang, whereis, [ct_util_server])
end,
Events = ct_test_support:get_events(ERPid, Config),
diff --git a/lib/common_test/test/ct_skip_SUITE.erl b/lib/common_test/test/ct_skip_SUITE.erl
index b0a6c839a2..6fb803b928 100644
--- a/lib/common_test/test/ct_skip_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE.erl
@@ -153,10 +153,10 @@ testspec_skip(Config) when is_list(Config) ->
{skip_groups, TestDir, user_skip_6_SUITE, psub1, "SKIPPED"}],
{Opts,ERPid} = setup_testspec([{ts1,TestSpec1},
- {ts2,TestSpec2},
- {ts3,TestSpec3},
- {ts4,TestSpec4},
- {ts5,TestSpec5}], Config),
+ {ts2,TestSpec2},
+ {ts3,TestSpec3},
+ {ts4,TestSpec4},
+ {ts5,TestSpec5}], Config),
ok = ct_test_support:run(Opts, Config),
@@ -234,8 +234,8 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_2_SUITE,init_per_suite,{failed,{error,init_per_suite_failed}}}},
{?eh,tc_auto_skip,
- {auto_skip_2_SUITE,tc1,{failed,{auto_skip_2_SUITE,init_per_suite,
- {'EXIT',init_per_suite_failed}}}}},
+ {auto_skip_2_SUITE,{tc1,g1},{failed,{auto_skip_2_SUITE,init_per_suite,
+ {'EXIT',init_per_suite_failed}}}}},
{?eh,test_stats,{0,0,{0,3}}},
{?eh,tc_auto_skip,
{auto_skip_2_SUITE,end_per_suite,{failed,{auto_skip_2_SUITE,init_per_suite,
@@ -274,12 +274,12 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_5_SUITE,{init_per_group,g1,[]},{failed,{error,{group,g1,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_5_SUITE,tc1,{failed,{auto_skip_5_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_5_SUITE,{tc1,g1},{failed,{auto_skip_5_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,6}}},
{?eh,tc_auto_skip,
- {auto_skip_5_SUITE,tc2,{failed,{auto_skip_5_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_5_SUITE,{tc2,g1},{failed,{auto_skip_5_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,7}}},
{?eh,tc_auto_skip,
{auto_skip_5_SUITE,{end_per_group,g1},
@@ -295,20 +295,20 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_6_SUITE,{init_per_group,g1,[]},{failed,{error,{group,g1,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc1,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc1,g1},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,8}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc3,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc3,g2},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,9}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc4,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc4,g2},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,10}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc2,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc2,g1},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,11}}},
{?eh,tc_auto_skip,
{auto_skip_6_SUITE,{end_per_group,g1},
@@ -324,12 +324,12 @@ test_events(auto_skip) ->
{?eh,tc_done,{auto_skip_6_SUITE,{init_per_group,g4,[]},
{failed,{error,{group,g4,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc3,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g4,failed}}}}}},
+ {auto_skip_6_SUITE,{tc3,g4},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g4,failed}}}}}},
{?eh,test_stats,{3,0,{0,12}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc4,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g4,failed}}}}}},
+ {auto_skip_6_SUITE,{tc4,g4},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g4,failed}}}}}},
{?eh,test_stats,{3,0,{0,13}}},
{?eh,tc_auto_skip,
{auto_skip_6_SUITE,{end_per_group,g4},
@@ -498,13 +498,13 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g1}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc1,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc1,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,25}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc2,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc2,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,26}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g2},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,27}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g1},
@@ -516,13 +516,13 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g1}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc1,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc1,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,28}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc2,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc2,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,29}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g2},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,30}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g1},
@@ -544,7 +544,7 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g4}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g4},
{require_failed,{not_available,unknown_variable_g4}}}},
{?eh,test_stats,{12,0,{0,31}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g4},
@@ -574,10 +574,10 @@ test_events(user_skip) ->
{user_skip_1_SUITE,tc1,"Whole suite skipped"}},
{?eh,test_stats,{0,0,{1,0}}},
{?eh,tc_user_skip,
- {user_skip_1_SUITE,tc2,"Whole suite skipped"}},
+ {user_skip_1_SUITE,{tc2,g1},"Whole suite skipped"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,
- {user_skip_1_SUITE,tc3,"Whole suite skipped"}},
+ {user_skip_1_SUITE,{tc3,g1},"Whole suite skipped"}},
{?eh,test_stats,{0,0,{3,0}}},
{?eh,tc_user_skip,
{user_skip_1_SUITE,tc4,"Whole suite skipped"}},
@@ -638,9 +638,9 @@ test_events(user_skip) ->
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g1,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc1,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc1,g1},"Group skipped"}},
{?eh,test_stats,{3,0,{10,0}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc2,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc2,g1},"Group skipped"}},
{?eh,test_stats,{3,0,{11,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g1},"Group skipped"}}],
@@ -657,10 +657,10 @@ test_events(user_skip) ->
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g3,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g3,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc5,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc6,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc7,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc8,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc5,g3},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc6,g4},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc7,g4},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc8,g3},"Group skipped"}},
{?eh,test_stats,{5,0,{15,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g3},"Group skipped"}}],
@@ -671,9 +671,9 @@ test_events(user_skip) ->
{?eh,test_stats,{6,0,{15,0}}},
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g6,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g6,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc10,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc10,g6},"Group skipped"}},
{?eh,test_stats,{6,0,{16,0}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc11,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc11,g6},"Group skipped"}},
{?eh,test_stats,{6,0,{17,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g6},"Group skipped"}}],
{?eh,tc_start,{user_skip_4_SUITE,{end_per_group,g5,[]}}},
@@ -687,9 +687,9 @@ test_events(user_skip) ->
{skipped,{bad,'Whole suite skipped'}}}},
{?eh,tc_user_skip,{user_skip_5_SUITE,tc1,{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{18,0}}},
- {?eh,tc_user_skip,{user_skip_5_SUITE,tc2,{bad,'Whole suite skipped'}}},
+ {?eh,tc_user_skip,{user_skip_5_SUITE,{tc2,g1},{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{19,0}}},
- {?eh,tc_user_skip,{user_skip_5_SUITE,tc3,{bad,'Whole suite skipped'}}},
+ {?eh,tc_user_skip,{user_skip_5_SUITE,{tc3,g1},{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{20,0}}},
{?eh,tc_user_skip,{user_skip_5_SUITE,tc4,{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{21,0}}},
@@ -700,10 +700,10 @@ test_events(user_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,ptop1,[parallel]},
{skipped,"Top group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc1,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc2,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc1,ptop1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc2,ptop1},"Top group skipped"}},
{?eh,tc_user_skip,{user_skip_6_SUITE,{end_per_group,ptop1},
"Top group skipped"}}]},
@@ -718,8 +718,8 @@ test_events(user_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,psub2,[parallel]},
{skipped,"Sub group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Sub group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub2},"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub2},"Sub group skipped"}},
{?eh,tc_user_skip,{user_skip_6_SUITE,{end_per_group,psub2},
"Sub group skipped"}}]},
@@ -745,14 +745,14 @@ test_events(testspec_skip) ->
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]}}},
{?eh,tc_done,
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]},ok}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc1,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc1,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{1,0}}},
{parallel,
[{?eh,tc_start,
{user_skip_7_SUITE,{init_per_group,psub1,[parallel]}}},
{?eh,tc_done,
{user_skip_7_SUITE,{init_per_group,psub1,[parallel]},ok}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,tc_start,{user_skip_7_SUITE,tc4}},
{?eh,tc_done,{user_skip_7_SUITE,tc4,ok}},
{?eh,test_stats,{1,0,{2,0}}},
@@ -778,13 +778,13 @@ test_events(testspec_skip) ->
{?eh,tc_start,{ct_framework,init_per_suite}},
{?eh,tc_done,{ct_framework,init_per_suite,ok}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{init_per_group,ptop1},"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc1,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc1,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc2,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc2,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{end_per_group,ptop1},"SKIPPED"}},
{?eh,tc_start,{ct_framework,end_per_suite}},
@@ -804,8 +804,8 @@ test_events(testspec_skip) ->
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]},ok}},
{?eh,tc_user_skip,
{user_skip_7_SUITE,{init_per_group,psub1},"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{end_per_group,psub1},"SKIPPED"}},
{?eh,tc_start,{user_skip_7_SUITE,tc1}},
@@ -837,13 +837,13 @@ test_events(testspec_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,ptop1,[parallel]},
{skipped,"Top group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc1,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc1,ptop1},"Top group skipped"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc2,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc2,ptop1},"Top group skipped"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,
{user_skip_6_SUITE,{end_per_group,ptop1},"Top group skipped"}}]},
diff --git a/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_4_SUITE.erl b/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_4_SUITE.erl
index 825846cd55..89e202a404 100644
--- a/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_4_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_4_SUITE.erl
@@ -72,7 +72,7 @@ end_per_group(_GroupName, _Config) ->
%% Reason = term()
%%--------------------------------------------------------------------
init_per_testcase(tc1, Config) ->
- timer:sleep(5000),
+ ct:sleep(5000),
Config;
init_per_testcase(_TestCase, Config) ->
Config.
diff --git a/lib/common_test/test/ct_smoke_test_SUITE.erl b/lib/common_test/test/ct_smoke_test_SUITE.erl
index 49b38361e2..6077946c33 100644
--- a/lib/common_test/test/ct_smoke_test_SUITE.erl
+++ b/lib/common_test/test/ct_smoke_test_SUITE.erl
@@ -480,7 +480,7 @@ events(Test) when Test == dir1 ; Test == dir2 ;
{Suite,tc4,{skipped,"Skipping this one"}}},
{?eh,test_stats,{7,0,{1,0}}},
{?eh,tc_start,{Suite,end_per_suite}},
- {?eh,tc_done,{Suite,end_per_suite,ips_data}},
+ {?eh,tc_done,{Suite,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -517,7 +517,7 @@ events(Test) when Test == dir1_2 ; Test == suite11_21 ->
{happy_11_SUITE,tc4,{skipped,"Skipping this one"}}},
{?eh,test_stats,{7,0,{1,0}}},
{?eh,tc_start,{happy_11_SUITE,end_per_suite}},
- {?eh,tc_done,{happy_11_SUITE,end_per_suite,ips_data}},
+ {?eh,tc_done,{happy_11_SUITE,end_per_suite,ok}},
{?eh,tc_start,{happy_21_SUITE,init_per_suite}},
{?eh,tc_done,{happy_21_SUITE,init_per_suite,ok}},
{?eh,tc_start,{happy_21_SUITE,tc1}},
@@ -546,7 +546,7 @@ events(Test) when Test == dir1_2 ; Test == suite11_21 ->
{happy_21_SUITE,tc4,{skipped,"Skipping this one"}}},
{?eh,test_stats,{14,0,{2,0}}},
{?eh,tc_start,{happy_21_SUITE,end_per_suite}},
- {?eh,tc_done,{happy_21_SUITE,end_per_suite,ips_data}},
+ {?eh,tc_done,{happy_21_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -563,7 +563,7 @@ events(Test) when Test == tc111 ; Test == tc211 ->
{?eh,tc_done,{Suite,tc1,ok}},
{?eh,test_stats,{1,0,{0,0}}},
{?eh,tc_start,{Suite,end_per_suite}},
- {?eh,tc_done,{Suite,end_per_suite,ips_data}},
+ {?eh,tc_done,{Suite,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
];
@@ -582,7 +582,7 @@ events(tc111_112) ->
{?eh,tc_done,{happy_11_SUITE,tc2,ok}},
{?eh,test_stats,{2,0,{0,0}}},
{?eh,tc_start,{happy_11_SUITE,end_per_suite}},
- {?eh,tc_done,{happy_11_SUITE,end_per_suite,ips_data}},
+ {?eh,tc_done,{happy_11_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_snmp_SUITE_data/snmp.cfg b/lib/common_test/test/ct_snmp_SUITE_data/snmp.cfg
index 895e097de6..7ff356e49a 100644
--- a/lib/common_test/test/ct_snmp_SUITE_data/snmp.cfg
+++ b/lib/common_test/test/ct_snmp_SUITE_data/snmp.cfg
@@ -22,23 +22,23 @@
{agent_target_param_def,{data_dir_file,"target_params.conf"}},
{agent_vacm,{data_dir_file,"vacm.conf"}}]}.
{snmp_app1,[{manager, [{config, [{verbosity, silence}]},
- {server,[{verbosity,silence}]},
- {net_if,[{verbosity,silence}]},
+ {server,[{verbosity,log}]},
+ {net_if,[{verbosity,log}]},
{versions,[v2]}
]},
{agent, [{config, [{verbosity, silence}]},
- {net_if,[{verbosity,silence}]},
+ {net_if,[{verbosity,log}]},
{mib_server,[{verbosity,silence}]},
{local_db,[{verbosity,silence}]},
- {agent_verbosity,silence}
+ {agent_verbosity,log}
]}]}.
{snmp_app2,[{manager, [{config, [{verbosity, silence}]},
- {server,[{verbosity,silence}]},
- {net_if,[{verbosity,silence}]}
+ {server,[{verbosity,log}]},
+ {net_if,[{verbosity,log}]}
]},
{agent, [{config, [{verbosity, silence}]},
- {net_if,[{verbosity,silence}]},
+ {net_if,[{verbosity,log}]},
{mib_server,[{verbosity,silence}]},
{local_db,[{verbosity,silence}]},
- {agent_verbosity,silence}
+ {agent_verbosity,log}
]}]}.
diff --git a/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE.erl b/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE.erl
index 16b2b5690c..07f7bf02e4 100644
--- a/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE.erl
+++ b/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE.erl
@@ -1,7 +1,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -117,12 +117,12 @@ break(_Config) ->
start_stop(Config) ->
ok = ct_snmp:start(Config,snmp1,snmp_app1),
- timer:sleep(1000),
+ ct:sleep(1000),
{snmp,_,_} = lists:keyfind(snmp,1,application:which_applications()),
[_|_] = filelib:wildcard("*/*.conf",?config(priv_dir,Config)),
ok = ct_snmp:stop(Config),
- timer:sleep(1000),
+ ct:sleep(1000),
false = lists:keyfind(snmp,1,application:which_applications()),
[] = filelib:wildcard("*/*.conf",?config(priv_dir,Config)),
ok.
@@ -288,6 +288,9 @@ override_usm(Config) ->
%% Check that usm.conf is overwritten
{ok,MyUsm} = snmpa_conf:read_usm_config(DataDir),
{ok,UsedUsm} = snmpa_conf:read_usm_config(ConfDir),
+ ct:pal(
+ "MyUsm = ~p~nUsedUsm = ~p",
+ [MyUsm, UsedUsm]),
true = (MyUsm == UsedUsm),
%% Check that the usm user is actually configured...
@@ -304,6 +307,9 @@ override_standard(Config) ->
%% Check that standard.conf is overwritten
{ok,MyStandard} = snmpa_conf:read_standard_config(DataDir),
{ok,UsedStandard} = snmpa_conf:read_standard_config(ConfDir),
+ ct:pal(
+ "MyStandard = ~p~nUsedStandard = ~p",
+ [MyStandard, UsedStandard]),
true = (MyStandard == UsedStandard),
%% Check that the values from standard.conf is actually configured...
@@ -319,6 +325,9 @@ override_context(Config) ->
%% Check that context.conf is overwritten
{ok,MyContext} = snmpa_conf:read_context_config(DataDir),
{ok,UsedContext} = snmpa_conf:read_context_config(ConfDir),
+ ct:pal(
+ "MyContext = ~p~nUsedContext = ~p",
+ [MyContext, UsedContext]),
true = (MyContext == UsedContext),
ok.
@@ -330,6 +339,9 @@ override_community(Config) ->
%% Check that community.conf is overwritten
{ok,MyCommunity} = snmpa_conf:read_community_config(DataDir),
{ok,UsedCommunity} = snmpa_conf:read_community_config(ConfDir),
+ ct:pal(
+ "MyCommunity = ~p~nUsedCommunity = ~p",
+ [MyCommunity, UsedCommunity]),
true = (MyCommunity == UsedCommunity),
ok.
@@ -341,6 +353,9 @@ override_notify(Config) ->
%% Check that notify.conf is overwritten
{ok,MyNotify} = snmpa_conf:read_notify_config(DataDir),
{ok,UsedNotify} = snmpa_conf:read_notify_config(ConfDir),
+ ct:pal(
+ "MyNotify = ~p~nUsedNotify = ~p",
+ [MyNotify, UsedNotify]),
true = (MyNotify == UsedNotify),
ok.
@@ -352,6 +367,9 @@ override_target_addr(Config) ->
%% Check that target_addr.conf is overwritten
{ok,MyTargetAddr} = snmpa_conf:read_target_addr_config(DataDir),
{ok,UsedTargetAddr} = snmpa_conf:read_target_addr_config(ConfDir),
+ ct:pal(
+ "MyTargetAddr = ~p~nUsedTargetAddr = ~p",
+ [MyTargetAddr, UsedTargetAddr]),
true = (MyTargetAddr == UsedTargetAddr),
ok.
@@ -363,6 +381,9 @@ override_target_params(Config) ->
%% Check that target_params.conf is overwritten
{ok,MyTargetParams} = snmpa_conf:read_target_params_config(DataDir),
{ok,UsedTargetParams} = snmpa_conf:read_target_params_config(ConfDir),
+ ct:pal(
+ "MyTargetParams = ~p~nUsedTargetParams = ~p",
+ [MyTargetParams, UsedTargetParams]),
true = (MyTargetParams == UsedTargetParams),
ok.
@@ -374,6 +395,9 @@ override_vacm(Config) ->
%% Check that vacm.conf is overwritten
{ok,MyVacm} = snmpa_conf:read_vacm_config(DataDir),
{ok,UsedVacm} = snmpa_conf:read_vacm_config(ConfDir),
+ ct:pal(
+ "MyVacm = ~p~nUsedVacm = ~p",
+ [MyVacm, UsedVacm]),
true = (MyVacm == UsedVacm),
ok.
diff --git a/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE_data/target_addr.conf b/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE_data/target_addr.conf
index d02672a074..d3ce2fa60e 100644
--- a/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE_data/target_addr.conf
+++ b/lib/common_test/test/ct_snmp_SUITE_data/snmp_SUITE_data/target_addr.conf
@@ -1,2 +1,2 @@
-{"target1", snmpUDPDomain, [147,214,122,73], 5000, 1500, 3, "std_trap", "target_v3", "", [], 2048}.
-{"target2", snmpUDPDomain, [147,214,122,73], 5000, 1500, 3, "std_inform", "target_v3", "", [], 2048}.
+{"target1", snmpUDPDomain, {[147,214,122,73], 5000}, 1500, 3, "std_trap", "target_v3", "", [], 2048}.
+{"target2", snmpUDPDomain, {[147,214,122,73], 5000}, 1500, 3, "std_inform", "target_v3", "", [], 2048}.
diff --git a/lib/common_test/test/ct_surefire_SUITE.erl b/lib/common_test/test/ct_surefire_SUITE.erl
index c5e44682b0..db7a0be915 100644
--- a/lib/common_test/test/ct_surefire_SUITE.erl
+++ b/lib/common_test/test/ct_surefire_SUITE.erl
@@ -205,7 +205,7 @@ test_events(_) ->
[{?eh,tc_start,{surefire_SUITE,{init_per_group,g_fail,[]}}},
{?eh,tc_done,{surefire_SUITE,{init_per_group,g_fail,[]},
{failed,{error,all_cases_should_be_skipped}}}},
- {?eh,tc_auto_skip,{surefire_SUITE,tc_ok,
+ {?eh,tc_auto_skip,{surefire_SUITE,{tc_ok,g_fail},
{failed,
{surefire_SUITE,init_per_group,
{'EXIT',all_cases_should_be_skipped}}}}},
diff --git a/lib/common_test/test/ct_telnet_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE.erl
index e2ee207754..62cb821ede 100644
--- a/lib/common_test/test/ct_telnet_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE.erl
@@ -46,35 +46,60 @@
%% instance, the tests need to be performed on a separate node (or
%% there will be clashes with logging processes etc).
%%--------------------------------------------------------------------
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+groups() ->
+ [{legacy, [], [unix_telnet,own_server,timetrap]},
+ {raw, [], [unix_telnet,own_server,timetrap]},
+ {html, [], [unix_telnet,own_server]},
+ {silent, [], [unix_telnet,own_server]}].
+
+all() ->
+ [
+ {group,legacy},
+ {group,raw},
+ {group,html},
+ {group,silent}
+ ].
+
+%%--------------------------------------------------------------------
+%% CONFIG FUNCTIONS
+%%--------------------------------------------------------------------
+
init_per_suite(Config) ->
ct_test_support:init_per_suite(Config).
end_per_suite(Config) ->
ct_test_support:end_per_suite(Config).
-init_per_testcase(TestCase, Config) when TestCase=/=unix_telnet->
+init_per_testcase(TestCase, Config) when TestCase /= unix_telnet ->
+ ct:pal("Testcase ~p starting!", [TestCase]),
TS = telnet_server:start([{port,?erl_telnet_server_port},
{users,[{?erl_telnet_server_user,
?erl_telnet_server_pwd}]}]),
ct_test_support:init_per_testcase(TestCase, [{telnet_server,TS}|Config]);
init_per_testcase(TestCase, Config) ->
- ct_test_support:init_per_testcase(TestCase, Config).
+ ct:pal("Testcase ~p starting. Checking connection to telnet server...",
+ [TestCase]),
+ ct:require(testconn, {unix,[telnet]}),
+ case {os:type(),ct_telnet:open(testconn)} of
+ {_,{ok,Handle}} ->
+ ok = ct_telnet:close(Handle),
+ ct:pal("Connection ok, starting tests!", []),
+ ct_test_support:init_per_testcase(TestCase, Config);
+ {{unix,_},{error,Reason}} ->
+ ct:fail("No connection to telnet server! Reason: ~tp", [Reason]);
+ {_,{error,Reason}} ->
+ {skip,{no_access_to_telnet_server,Reason}}
+ end.
+end_per_testcase(TestCase, Config) when TestCase /= unix_telnet ->
+ ct:pal("Stopping the telnet_server now!", []),
+ telnet_server:stop(?config(telnet_server,Config)),
+ ct_test_support:end_per_testcase(TestCase, Config);
end_per_testcase(TestCase, Config) ->
- case ?config(telnet_server,Config) of
- undefined -> ok;
- TS -> telnet_server:stop(TS)
- end,
ct_test_support:end_per_testcase(TestCase, Config).
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() ->
- [
- unix_telnet,
- own_server,
- timetrap
- ].
%%--------------------------------------------------------------------
%% TEST CASES
@@ -82,27 +107,43 @@ all() ->
%%%-----------------------------------------------------------------
%%%
-unix_telnet(Config) when is_list(Config) ->
- all_tests_in_suite(unix_telnet,"ct_telnet_basic_SUITE","telnet.cfg",Config).
+unix_telnet(Config) ->
+ CfgFile = "telnet.unix_telnet." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
+ all_tests_in_suite(unix_telnet,"ct_telnet_basic_SUITE",CfgFile,Config).
own_server(Config) ->
+ CfgFile = "telnet.own_server." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
all_tests_in_suite(own_server,"ct_telnet_own_server_SUITE",
- "telnet2.cfg",Config).
+ CfgFile,Config).
timetrap(Config) ->
+ CfgFile = "telnet.timetrap." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
all_tests_in_suite(timetrap,"ct_telnet_timetrap_SUITE",
- "telnet3.cfg",Config).
+ CfgFile,Config).
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
+groupname(Config) ->
+ case proplists:get_value(tc_group_properties, Config) of
+ undefined ->
+ undefined;
+ TGP ->
+ proplists:get_value(name, TGP)
+ end.
+
all_tests_in_suite(TestCase, SuiteName, CfgFileName, Config) ->
+ PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
Suite = filename:join(DataDir, SuiteName),
- CfgFile = filename:join(DataDir, CfgFileName),
- Cfg = telnet_config(TestCase),
- ok = file:write_file(CfgFile, io_lib:write(Cfg) ++ "."),
+ CfgFile = filename:join(PrivDir, CfgFileName),
+ Cfg = telnet_config(TestCase, groupname(Config)),
+ Txt = lists:flatten([lists:flatten(io_lib:write(C))++".\n" || C <- Cfg]),
+ ok = file:write_file(CfgFile, Txt),
{Opts,ERPid} = setup([{suite,Suite},
{label,TestCase},
{config,CfgFile}],
@@ -132,15 +173,49 @@ execute(Name, Opts, ERPid, Config) ->
reformat(Events, EH) ->
ct_test_support:reformat(Events, EH).
-
-telnet_config(unix_telnet) ->
- {unix, ct:get_config(unix)};
-telnet_config(_) ->
- {unix,[{telnet,"localhost"},
- {port, ?erl_telnet_server_port},
- {username,?erl_telnet_server_user},
- {password,?erl_telnet_server_pwd},
- {keep_alive,true}]}.
+telnet_config(_, undefined) ->
+ [];
+telnet_config(unix_telnet, legacy) ->
+ [{unix, ct:get_config(unix)},
+ {ct_conn_log,[]}];
+%% LogType same as GroupName
+telnet_config(unix_telnet, LogType) ->
+ LogTypeTerm = if LogType == raw -> [];
+ true -> [{log_type,LogType}]
+ end,
+ [{unix, ct:get_config(unix)},
+ {ct_conn_log,
+ [{ct_telnet, LogTypeTerm ++
+ [{hosts,[telnet_server_conn1,
+ telnet_server_conn2,
+ telnet_server_conn3,
+ telnet_server_conn4]}]}]}];
+telnet_config(_, LogType) ->
+ LogTypeTerm = if LogType == raw -> [];
+ true -> [{log_type,LogType}]
+ end,
+ [{unix,[{telnet,"localhost"},
+ {port, ?erl_telnet_server_port},
+ {username,?erl_telnet_server_user},
+ {password,?erl_telnet_server_pwd},
+ {keep_alive,true}]},
+ {telnet_settings, [{connect_timeout,10000},
+ {command_timeout,10000},
+ {reconnection_attempts,0},
+ {reconnection_interval,0},
+ {keep_alive,true},
+ {poll_limit,10},
+ {poll_interval,1000}]} |
+ if LogType == legacy ->
+ [{ct_conn_log,[]}];
+ true ->
+ [{ct_conn_log,
+ [{ct_telnet, LogTypeTerm ++
+ [{hosts,[telnet_server_conn1,
+ telnet_server_conn2,
+ telnet_server_conn3,
+ telnet_server_conn4]}]}]}]
+ end].
%%%-----------------------------------------------------------------
%%% TEST EVENTS
@@ -159,14 +234,39 @@ events_to_check(timetrap,_Config) ->
all_cases(Suite,Config) ->
{module,_} = code:load_abs(filename:join(?config(data_dir,Config),
Suite)),
- TCs = Suite:all(),
+ GroupsAndTCs = Suite:all(),
+
+ Terms =
+ lists:flatmap(
+ fun({group,G}) ->
+ {value,{G,Props,GTCs}} =
+ lists:keysearch(G,1,Suite:groups()),
+ GTCs1 = [[{?eh,tc_start,{Suite,GTC}},
+ {?eh,tc_done,{Suite,GTC,ok}}] ||
+ GTC <- GTCs],
+ GEvs = [{?eh,tc_start,{Suite,{init_per_group,G,Props}}},
+ {?eh,tc_done,{Suite,{init_per_group,G,Props},ok}} |
+ GTCs1] ++
+ [{?eh,tc_start,{Suite,{end_per_group,G,Props}}},
+ {?eh,tc_done,{Suite,{end_per_group,G,Props},ok}}],
+ case lists:member(parallel, Props) of
+ true -> [{parallel,GEvs}];
+ false -> GEvs
+ end;
+ (TC) ->
+ [{?eh,tc_done,{Suite,TC,ok}}]
+ end, GroupsAndTCs),
+
code:purge(Suite),
code:delete(Suite),
+ FlatTerms = lists:flatten(Terms),
+
+ ct:log("Verifying with terms:~n~p", [FlatTerms]),
+
OneTest =
- [{?eh,start_logging,{'DEF','RUNDIR'}}] ++
- [{?eh,tc_done,{Suite,TC,ok}} || TC <- TCs] ++
- [{?eh,stop_logging,[]}],
+ [{?eh,start_logging,{'DEF','RUNDIR'}} |
+ FlatTerms] ++ [{?eh,stop_logging,[]}],
%% 2 tests (ct:run_test + script_start) is default
OneTest ++ OneTest.
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
index 914b95f9cf..3885c1991d 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
@@ -5,45 +5,101 @@
-include_lib("common_test/include/ct.hrl").
+-define(no_of_sessions, 4).
+-define(conn_name(N), (list_to_atom("telnet_server_conn"++integer_to_list(N)))).
+-define(get_n(Cfg), (proplists:get_value(n, Cfg))).
+
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
+suite() -> [
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]}
+ ].
+
+operations() ->
+ [start_stop, send_and_get, expect, already_closed,
+ cmd, sendf, no_newline, close_wrong_type].
+
+mult_case(_Case, 0) ->
+ [];
+mult_case(Case, N) ->
+ [list_to_atom(atom_to_list(Case)++integer_to_list(N)) |
+ mult_case(Case, N-1)].
+
+groups() ->
+ [{single_connection,[],operations()},
+ {multiple_connections,[parallel],
+ lists:reverse(mult_case(sessions,?no_of_sessions))}].
+
+all() ->
+ [{group,single_connection},
+ {group,multiple_connections}].
+
init_per_suite(Config) ->
+ ct:pal("Will use these log hook options: ~p",
+ [ct:get_config(ct_conn_log,[])]),
Config.
end_per_suite(_Config) ->
ok.
+init_per_group(Group, Config) ->
+ if Group == single_connection ->
+ ct:require(?conn_name(1),{unix,[telnet]});
+ true ->
+ ok
+ end,
+ [{n,1} | Config].
-suite() -> [{require,telnet_temp,{unix,[telnet]}}].
+end_per_group(_GroupName, Config) ->
+ Config.
-all() ->
- [start_stop, send_and_get, expect, already_closed,
- cmd, sendf, close_wrong_type].
+init_per_testcase(Case, Config) when (Case == sessions1) or
+ (Case == sessions2) or
+ (Case == sessions3) or
+ (Case == sessions4) ->
+ N = lists:last(atom_to_list(Case))-48,
+ ct:log("Using connection ~w for session ~w on ~w",
+ [?conn_name(N),N,self()]),
+ ct:require(?conn_name(N),{unix,[telnet]}),
+ [{n,N} | proplists:delete(n,Config)];
+init_per_testcase(Case, Config) ->
+ ct:log("Testcase ~w using connection ~w",
+ [Case,?conn_name(?get_n(Config))]),
+ Config.
-groups() ->
- [].
+end_per_testcase(_Case, _) ->
+ ok.
-init_per_group(_GroupName, Config) ->
- Config.
+%%%-----------------------------------------------------------------
+%%% TEST CASES
-end_per_group(_GroupName, Config) ->
- Config.
+sessions(Config) ->
+ [apply(?MODULE,Op,[Config]) || Op <- operations()],
+ ok.
+
+sessions1(Config) -> sessions(Config).
+sessions2(Config) -> sessions(Config).
+sessions3(Config) -> sessions(Config).
+sessions4(Config) -> sessions(Config).
-start_stop(_Config) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+start_stop(Config) ->
+ ct:log("Opening ~w...", [?conn_name(?get_n(Config))]),
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:close(Handle),
ok.
-send_and_get(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+
+send_and_get(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:send(Handle, "ayt"),
{ok, _Data} = ct_telnet:get_data(Handle),
ok = ct_telnet:close(Handle),
ok.
-expect(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+expect(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:send(Handle, "echo ayt"),
ok = case ct_telnet:expect(Handle, ["ayt"]) of
{ok, _} ->
@@ -54,25 +110,40 @@ expect(_) ->
ok = ct_telnet:close(Handle),
ok.
-already_closed(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+already_closed(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:close(Handle),
{error, already_closed} = ct_telnet:close(Handle),
ok.
-cmd(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+cmd(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
{ok, _} = ct_telnet:cmd(Handle, "display"),
{ok, _} = ct_telnet:cmdf(Handle, "~s ~s", ["set", "bsasdel"]),
ok = ct_telnet:close(Handle),
ok.
-sendf(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+sendf(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:sendf(Handle, "~s", ["ayt"]),
ok = ct_telnet:close(Handle),
ok.
+no_newline(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
+ IAC = 255, % interprete as command
+ AYT = 246, % are you there
+ ok = ct_telnet:send(Handle, [IAC,AYT], [{newline,false}]),
+ {ok,_} = ct_telnet:expect(Handle,"yes",[no_prompt_check]),
+ {ok,_} = ct_telnet:cmd(Handle, ""), % send newline only to get back prompt
+ ok = ct_telnet:close(Handle),
+ ok.
+
close_wrong_type(_) ->
{error, _} = ct_telnet:close(whatever),
ok.
+
+%%%-----------------------------------------------------------------
+%%% HELP FUNCS
+
+
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 3f7c0d68bf..9dc9095f47 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
@@ -4,25 +4,48 @@
-include_lib("common_test/include/ct.hrl").
+%% telnet control characters
+-define(SE, 240).
+-define(NOP, 241).
+-define(DM, 242).
+-define(BRK, 243).
+-define(IP, 244).
+-define(AO, 245).
+-define(AYT, 246).
+-define(EC, 247).
+-define(EL, 248).
+-define(GA, 249).
+-define(SB, 250).
+-define(WILL, 251).
+-define(WONT, 252).
+-define(DO, 253).
+-define(DONT, 254).
+-define(IAC, 255).
+
+-define(SHORT_TIME,2000).
+
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-
-suite() -> [{require,erl_telnet_server,{unix,[telnet]}}].
+suite() ->
+ [
+ {require,telnet_server_conn1,{unix,[telnet]}},
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]}
+ ].
all() ->
- [expect,
+ [
+ expect,
expect_repeat,
expect_sequence,
+ expect_wait_until_prompt,
expect_error_prompt,
- expect_error_timeout,
+ expect_error_timeout1,
+ expect_error_timeout2,
+ expect_error_timeout3,
+ total_timeout_less_than_idle,
no_prompt_check,
no_prompt_check_repeat,
no_prompt_check_sequence,
@@ -30,11 +53,25 @@ all() ->
ignore_prompt,
ignore_prompt_repeat,
ignore_prompt_sequence,
- ignore_prompt_timeout].
+ ignore_prompt_timeout,
+ large_string,
+ server_speaks,
+ server_disconnects,
+ newline_ayt,
+ newline_break
+ ].
groups() ->
[].
+init_per_suite(Config) ->
+ ct:pal("Will use these log hook options: ~p",
+ [ct:get_config(ct_conn_log,[])]),
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
init_per_group(_GroupName, Config) ->
Config.
@@ -43,7 +80,9 @@ end_per_group(_GroupName, Config) ->
%% Simple expect
expect(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo ayt"),
+ {ok,["ayt"]} = ct_telnet:expect(Handle, "ayt"),
ok = ct_telnet:send(Handle, "echo ayt"),
{ok,["ayt"]} = ct_telnet:expect(Handle, ["ayt"]),
ok = ct_telnet:close(Handle),
@@ -51,7 +90,7 @@ expect(_) ->
%% Expect with repeat option
expect_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xy xy"),
{ok,[["xy"],["xy"]],done} = ct_telnet:expect(Handle, ["xy"],[{repeat,2}]),
ok = ct_telnet:close(Handle),
@@ -59,7 +98,7 @@ expect_repeat(_) ->
%% Expect with sequence option
expect_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml ab cd ef"),
{ok,[["ab"],["cd"],["ef"]]} = ct_telnet:expect(Handle,
[["ab"],["cd"],["ef"]],
@@ -67,10 +106,25 @@ expect_sequence(_) ->
ok = ct_telnet:close(Handle),
ok.
+%% Check that expect can wait for delayed prompt
+expect_wait_until_prompt(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ Timeouts = [{idle_timeout,5000},{total_timeout,7000}],
+
+ ok = ct_telnet:send(Handle, "echo_delayed_prompt 3000 xxx"),
+ {ok,["xxx"]} =
+ ct_telnet:expect(Handle, "xxx",
+ [wait_for_prompt|Timeouts]),
+ ok = ct_telnet:send(Handle, "echo_delayed_prompt 3000 yyy zzz"),
+ {ok,[["yyy"],["zzz"]]} =
+ ct_telnet:expect(Handle, ["yyy","zzz"],
+ [{wait_for_prompt,"> "}|Timeouts]),
+ ok.
+
%% Check that expect returns when a prompt is found, even if pattern
%% is not matched.
expect_error_prompt(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx> yyy"),
{error,{prompt,"> "}} = ct_telnet:expect(Handle, ["yyy"]),
ok = ct_telnet:close(Handle),
@@ -79,17 +133,61 @@ expect_error_prompt(_) ->
%% Check that expect returns after idle timeout, and even if the
%% expected pattern is received - as long as not newline or prompt is
%% received it will not match.
-expect_error_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+expect_error_timeout1(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
+ {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{timeout,?SHORT_TIME}]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+expect_error_timeout2(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
+ {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{idle_timeout,1000},
+ {total_timeout,infinity}]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Check that if server loops and pattern not matching, the operation
+%% can be aborted
+expect_error_timeout3(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_loop 5000 xxx"),
+
+ T0 = now(),
+ {error,timeout} = ct_telnet:expect(Handle, ["yyy"],
+ [{idle_timeout,infinity},
+ {total_timeout,2001}]),
+ Diff = trunc(timer:now_diff(now(),T0)/1000),
+ {_,true} = {Diff, (Diff >= 2000) and (Diff =< 4000)},
+
+ ok = ct_telnet:send(Handle, "echo ayt"),
+ {ok,["ayt"]} = ct_telnet:expect(Handle, ["ayt"]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% OTP-12335: If total_timeout < idle_timeout, expect will never timeout
+%% until after idle_timeout, which is incorrect.
+total_timeout_less_than_idle(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
- {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{timeout,1000}]),
+
+ T0 = now(),
+ {error,timeout} = ct_telnet:expect(Handle, ["yyy"],
+ [{idle_timeout,5000},
+ {total_timeout,2001}]),
+ Diff = trunc(timer:now_diff(now(),T0)/1000),
+ {_,true} = {Diff, (Diff >= 2000) and (Diff =< 4000)},
+
+ ok = ct_telnet:send(Handle, "echo ayt"),
+ {ok,["ayt"]} = ct_telnet:expect(Handle, ["ayt"]),
ok = ct_telnet:close(Handle),
ok.
%% expect with ignore_prompt option should not return even if a prompt
%% is found. The pattern after the prompt (here "> ") can be matched.
ignore_prompt(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx> yyy"),
{ok,["yyy"]} = ct_telnet:expect(Handle, ["yyy"], [ignore_prompt]),
ok = ct_telnet:close(Handle),
@@ -97,7 +195,7 @@ ignore_prompt(_) ->
%% expect with ignore_prompt and repeat options.
ignore_prompt_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml yyy> yyy>"),
{ok,[["yyy"],["yyy"]],done} = ct_telnet:expect(Handle, ["yyy"],
[{repeat,2},
@@ -107,7 +205,7 @@ ignore_prompt_repeat(_) ->
%% expect with ignore_prompt and sequence options.
ignore_prompt_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xxx> yyy> zzz> "),
{ok,[["xxx"],["yyy"],["zzz"]]} = ct_telnet:expect(Handle,
[["xxx"],["yyy"],["zzz"]],
@@ -121,26 +219,26 @@ ignore_prompt_sequence(_) ->
%% As for expect without the ignore_prompt option, it a newline or a
%% prompt is required in order for the pattern to match.
ignore_prompt_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo xxx"), % sends prompt and newline
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx\n"), % no prompt, but newline
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx"), % no prompt, no newline
{error,timeout} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:close(Handle),
ok.
%% no_prompt_check option shall match pattern both when prompt is sent
%% and when it is not.
no_prompt_check(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [no_prompt_check]),
ok = ct_telnet:send(Handle, "echo_no_prompt yyy"),
@@ -150,7 +248,7 @@ no_prompt_check(_) ->
%% no_prompt_check and repeat options
no_prompt_check_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xxx xxx"),
{ok,[["xxx"],["xxx"]],done} = ct_telnet:expect(Handle,["xxx"],
[{repeat,2},
@@ -164,7 +262,7 @@ no_prompt_check_repeat(_) ->
%% no_prompt_check and sequence options
no_prompt_check_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml_no_prompt ab cd ef"),
{ok,[["ab"],["cd"],["ef"]]} = ct_telnet:expect(Handle,
[["ab"],["cd"],["ef"]],
@@ -176,9 +274,111 @@ no_prompt_check_sequence(_) ->
%% Check that expect returns after idle timeout when no_prompt_check
%% option is used.
no_prompt_check_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [no_prompt_check,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Check that it's possible to receive multiple chunks of data sent from
+%% the server with one get_data call
+large_string(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ String = "abcd efgh ijkl mnop qrst uvwx yz ",
+ BigString = lists:flatmap(fun(S) -> S end,
+ [String || _ <- lists:seq(1,10)]),
+ VerifyStr = [C || C <- BigString, C/=$ ],
+
+ {ok,Data} = ct_telnet:cmd(Handle, "echo_sep "++BigString),
+ ct:log("[CMD] Received ~w chars: ~s", [length(lists:flatten(Data)),Data]),
+ VerifyStr = [C || C <- lists:flatten(Data), C/=$ , C/=$\r, C/=$\n, C/=$>],
+
+ %% Test #1: With a long sleep value, all data gets gets buffered and
+ %% ct_telnet can receive it with one single request to ct_telnet_client.
+ %% Test #2: With a short sleep value, ct_telnet needs multiple calls to
+ %% ct_telnet_client to collect the data. This iterative operation should
+ %% yield the same result as the single request case.
+
+ ok = ct_telnet:send(Handle, "echo_sep "++BigString),
+ ct:sleep(1000),
+ {ok,Data1} = ct_telnet:get_data(Handle),
+ ct:log("[GET DATA #1] Received ~w chars: ~s",
+ [length(lists:flatten(Data1)),Data1]),
+ 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),
+ 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/=$>],
+
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% The server says things. Manually check that it gets printed correctly
+%% in the general IO log.
+%%
+%% In this test case we simulate data sent spontaneously from the
+%% server. We use ct_telnet_client:send_data instead of ct_telnet:send
+%% to avoid flushing of buffers in the client, and we use
+%% echo_no_prompt since the server would normally not send a prompt in
+%% this case.
+server_speaks(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+
+ Backdoor = ct_gen_conn:get_conn_pid(Handle),
+ ok = ct_telnet_client:send_data(Backdoor,
+ "echo_no_prompt This is the first message"),
+ ok = ct_telnet_client:send_data(Backdoor,
+ "echo_no_prompt This is the second message"),
+ %% Let ct_telnet_client get an idle timeout. This should print the
+ %% two messages to the log. Note that the buffers are not flushed here!
+ ct:sleep(15000),
+ ok = ct_telnet_client:send_data(Backdoor,
+ "echo_no_prompt This is the third message"),
+ {ok,_} = ct_telnet:expect(Handle, ["first.*second.*third"],
+ [no_prompt_check, sequence]),
+ {error,timeout} = ct_telnet:expect(Handle, ["the"], [no_prompt_check,
+ {timeout,?SHORT_TIME}]),
+ ok = ct_telnet_client:send_data(Backdoor,
+ "echo_no_prompt This is the fourth message"),
+ %% give the server time to respond
+ ct:sleep(2000),
+ %% closing the connection should print last message in log
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Let the server close the connection. Make sure buffered data gets printed
+%% to the general IO log.
+server_disconnects(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "disconnect_after 1500"),
+ %% wait until the get_data operation (triggered by send/2) times out
+ %% before sending the msg
+ ct:sleep(500),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the message"),
+ %% when the server closes the connection, the last message should be
+ %% printed in the log
+ ct:sleep(3000),
+ _ = ct_telnet:close(Handle),
+ ok.
+
+%% Test option {newline,false} to send telnet command sequence.
+newline_ayt(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, [?IAC,?AYT], [{newline,false}]),
+ {ok,["yes"]} = ct_telnet:expect(Handle, ["yes"]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Test option {newline,false} to send telnet command sequence.
+newline_break(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, [?IAC,?BRK], [{newline,false}]),
+ %% '#' is the prompt in break mode
+ {ok,["# "]} = ct_telnet:expect(Handle, ["# "], [no_prompt_check]),
+ {ok,R} = ct_telnet:cmd(Handle, "q", [{newline,false}]),
+ "> " = lists:flatten(R),
ok = ct_telnet:close(Handle),
ok.
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
index f274fb9112..c45a4f0984 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
@@ -4,7 +4,7 @@
-include_lib("common_test/include/ct.hrl").
--define(name,erl_telnet_server).
+-define(name, telnet_server_conn1).
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
@@ -17,6 +17,8 @@ end_per_suite(_Config) ->
ok.
suite() -> [{require,?name,{unix,[telnet]}},
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]},
{timetrap,{seconds,7}}].
all() ->
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
index 9882fa980c..b6ef3062d4 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
@@ -168,7 +168,7 @@ test_events(ts_if_1) ->
{?eh,tc_start,{ts_if_1_SUITE,tc4}},
{?eh,tc_done,{ts_if_1_SUITE,tc4,{failed,{error,failed_on_purpose}}}},
{?eh,test_stats,{1,3,{0,2}}},
- {?eh,tc_auto_skip,{ts_if_1_SUITE,tc5,{failed,{ts_if_1_SUITE,tc4}}}},
+ {?eh,tc_auto_skip,{ts_if_1_SUITE,{tc5,seq2},{failed,{ts_if_1_SUITE,tc4}}}},
{?eh,test_stats,{1,3,{0,3}}},
{?eh,tc_start,{ts_if_1_SUITE,{end_per_group,seq2,[sequence]}}},
{?eh,tc_done,{ts_if_1_SUITE,{end_per_group,seq2,[sequence]},ok}}],
@@ -199,7 +199,7 @@ test_events(ts_if_1) ->
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g1,[]},
{skipped,g1_got_skipped}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,gtc1,g1_got_skipped}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,{gtc1,g1},g1_got_skipped}},
{?eh,test_stats,{1,4,{3,6}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,{end_per_group,g1},g1_got_skipped}}],
@@ -208,7 +208,7 @@ test_events(ts_if_1) ->
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g2,[parallel]},ok}},
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g3,[]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g3,[]},{skipped,g3_got_skipped}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,gtc2,g3_got_skipped}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,{gtc2,g3},g3_got_skipped}},
{?eh,test_stats,{1,4,{4,6}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,{end_per_group,g3},g3_got_skipped}}],
{?eh,tc_start,{ts_if_1_SUITE,{end_per_group,g2,[parallel]}}},
@@ -279,7 +279,7 @@ test_events(ts_if_1) ->
{init_per_group,g1,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
{?eh,tc_auto_skip,
- {ts_if_7_SUITE,tc2,{group0_failed,bad_return_value}}},
+ {ts_if_7_SUITE,{tc2,g1},{group0_failed,bad_return_value}}},
{?eh,test_stats,{2,7,{4,11}}},
{?eh,tc_auto_skip,
{ts_if_7_SUITE,{end_per_group,g1},{group0_failed,bad_return_value}}},
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_1_SUITE.erl
index 06fa6ac638..d30feb0bd2 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_1_SUITE.erl
@@ -76,7 +76,7 @@ end_per_group(_GroupName, _Config) ->
%% Reason = term()
%%--------------------------------------------------------------------
init_per_testcase(tc1, Config) ->
- timer:sleep(5000),
+ ct:sleep(5000),
Config;
init_per_testcase(tc8, _Config) ->
{skip,"tc8 skipped"};
@@ -92,7 +92,7 @@ init_per_testcase(_TestCase, Config) ->
%% Config0 = Config1 = [tuple()]
%%--------------------------------------------------------------------
end_per_testcase(tc2, Config) ->
- timer:sleep(5000);
+ ct:sleep(5000);
end_per_testcase(tc12, Config) ->
ct:comment("end_per_testcase(tc12) called!"),
ct:pal("end_per_testcase(tc12) called!", []),
@@ -146,7 +146,7 @@ tc2(_) ->
timeout_in_end_per_testcase.
tc3(_) ->
- timer:sleep(5000).
+ ct:sleep(5000).
tc4(_) ->
exit(failed_on_purpose).
@@ -186,7 +186,7 @@ gtc2(_) ->
tc12(_) ->
F = fun() -> ct:abort_current_testcase('stopping tc12') end,
spawn(F),
- timer:sleep(1000),
+ ct:sleep(1000),
exit(should_have_been_aborted).
tc13(_) ->
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 772274ce7e..6abca08452 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -40,6 +40,8 @@
-export([ct_test_halt/1, ct_rpc/2]).
+-export([random_error/1]).
+
-include_lib("kernel/include/file.hrl").
%%%-----------------------------------------------------------------
@@ -49,12 +51,12 @@ init_per_suite(Config) ->
init_per_suite(Config, 50).
init_per_suite(Config, Level) ->
+ ScaleFactor = test_server:timetrap_scale_factor(),
case os:type() of
{win32, _} ->
%% Extend timeout to 1 hour for windows as starting node
%% can take a long time there
- test_server:timetrap( 60*60*1000 *
- test_server:timetrap_scale_factor());
+ test_server:timetrap( 60*60*1000 * ScaleFactor );
_ ->
ok
end,
@@ -65,6 +67,16 @@ init_per_suite(Config, Level) ->
_ ->
ok
end,
+
+ {Mult,Scale} = test_server_ctrl:get_timetrap_parameters(),
+ test_server:format(Level, "Timetrap multiplier: ~w~n", [Mult]),
+ if Scale == true ->
+ test_server:format(Level, "Timetrap scale factor: ~w~n",
+ [ScaleFactor]);
+ true ->
+ ok
+ end,
+
start_slave(Config, Level).
start_slave(Config, Level) ->
@@ -110,7 +122,6 @@ start_slave(NodeName, Config, Level) ->
_ ->
ok
end,
-
TraceFile = filename:join(DataDir, "ct.trace"),
case file:read_file_info(TraceFile) of
{ok,_} ->
@@ -395,6 +406,55 @@ ct_rpc({M,F,A}, Config) ->
%%%-----------------------------------------------------------------
+%%% random_error/1
+random_error(Config) when is_list(Config) ->
+ random:seed(now()),
+ Gen = fun(0,_) -> ok; (N,Fun) -> Fun(N-1, Fun) end,
+ Gen(random:uniform(100), Gen),
+
+ ErrorTypes = ['BADMATCH','BADARG','CASE_CLAUSE','FUNCTION_CLAUSE',
+ 'EXIT','THROW','UNDEF'],
+ Type = lists:nth(random:uniform(length(ErrorTypes)), ErrorTypes),
+ Where = case random:uniform(2) of
+ 1 ->
+ io:format("ct_test_support *returning* error of type ~w",
+ [Type]),
+ tc;
+ 2 ->
+ io:format("ct_test_support *generating* error of type ~w",
+ [Type]),
+ lib
+ end,
+ ErrorFun =
+ fun() ->
+ case Type of
+ 'BADMATCH' ->
+ ok = proplists:get_value(undefined, Config);
+ 'BADARG' ->
+ size(proplists:get_value(priv_dir, Config));
+ 'FUNCTION_CLAUSE' ->
+ random_error(x);
+ 'EXIT' ->
+ spawn_link(fun() ->
+ undef_proc ! hello,
+ ok
+ end);
+ 'THROW' ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ if is_list(PrivDir) -> throw(generated_throw) end;
+ 'UNDEF' ->
+ apply(?MODULE, random_error, [])
+ end
+ end,
+ %% either call the fun here or return it to the caller (to be
+ %% executed in a test case instead)
+ case Where of
+ tc -> ErrorFun;
+ lib -> ErrorFun()
+ end.
+
+
+%%%-----------------------------------------------------------------
%%% EVENT HANDLING
handle_event(EH, Event) ->
@@ -431,6 +491,7 @@ er_loop(Evs) ->
From ! {event_receiver,lists:reverse(Evs)},
er_loop(Evs);
stop ->
+ unregister(event_receiver),
ok
end.
diff --git a/lib/common_test/test/ct_testspec_1_SUITE.erl b/lib/common_test/test/ct_testspec_1_SUITE.erl
index 187b5e6d3a..bc19283a47 100644
--- a/lib/common_test/test/ct_testspec_1_SUITE.erl
+++ b/lib/common_test/test/ct_testspec_1_SUITE.erl
@@ -763,39 +763,39 @@ test_events(skip_all_groups) ->
{?eh,start_info,{1,1,12}},
{?eh,tc_start,{groups_11_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1a},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1a},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_2},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2a,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{0,0,{5,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3a,test_group_3},"SKIPPED!"}},
{?eh,test_stats,{0,0,{6,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3b,test_group_3},"SKIPPED!"}},
{?eh,test_stats,{0,0,{7,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2b,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{0,0,{8,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_2},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_4},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_5a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{9,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_7a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{0,0,{10,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_7b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{0,0,{11,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{12,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_4},"SKIPPED!"}},
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{negative,{?eh,tc_start,'_'},{?eh,stop_logging,'_'}}
];
@@ -826,21 +826,21 @@ test_events(skip_group) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1a,[]},ok}}],
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{2,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},
"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_2},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2a,test_group_2},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3a,test_group_3},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3b,test_group_3},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2b,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{2,0,{6,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_2},
"SKIPPED!"}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{negative,{?eh,tc_start,'_'},{?eh,stop_logging,'_'}}
];
@@ -864,19 +864,19 @@ test_events(skip_group_all_testcases) ->
{?eh,tc_start,{groups_11_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1a},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1a},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1a},
"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},
"SKIPPED!"}},
- {?eh,tc_done,{groups_11_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_11_SUITE,end_per_suite,ok}},
{negative,{?eh,tc_start,'_'},{?eh,stop_logging,'_'}}
];
@@ -901,13 +901,13 @@ test_events(skip_group_testcase) ->
{?eh,tc_start,{groups_11_SUITE,{init_per_group,test_group_1a,[]}}},
{?eh,tc_start,{groups_11_SUITE,testcase_1a}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{1,0,{1,0}}},
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1a,[]},'_'}},
{?eh,tc_start,{groups_11_SUITE,{init_per_group,test_group_1b,[]}}},
{?eh,tc_start,{groups_11_SUITE,testcase_1b}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{2,0,{2,0}}},
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1b,[]},'_'}},
@@ -1045,8 +1045,8 @@ test_events(skip_subgroup) ->
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_8},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_8},"SKIPPED!"}},
@@ -1065,7 +1065,7 @@ test_events(skip_subgroup) ->
{?eh,tc_done,{groups_12_SUITE,{end_per_group,test_group_4,[]},ok}}],
{?eh,tc_start,{groups_12_SUITE,end_per_suite}},
- {?eh,tc_done,{groups_12_SUITE,end_per_suite,init}},
+ {?eh,tc_done,{groups_12_SUITE,end_per_suite,ok}},
{negative,{?eh,tc_start,'_'},{?eh,stop_logging,'_'}}
];
@@ -1146,12 +1146,12 @@ test_events(skip_subgroup_all_testcases) ->
{?eh,tc_done,{groups_12_SUITE,{init_per_group,test_group_4,[]},ok}},
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_5},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{6,0}}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_5},"SKIPPED!"}},
@@ -1240,9 +1240,9 @@ test_events(skip_subgroup_testcase) ->
{?eh,tc_done,
{groups_12_SUITE,{init_per_group,test_group_6,[parallel]},ok}},
[{?eh,tc_start,{groups_12_SUITE,{init_per_group,test_group_7,'_'}}},
- {?eh,tc_user_skip, {groups_12_SUITE,testcase_7a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{1,0,{1,0}}},
- {?eh,tc_user_skip, {groups_12_SUITE,testcase_7b,"SKIPPED!"}},
+ {?eh,tc_user_skip, {groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{1,0,{2,0}}},
{?eh,tc_start,{groups_12_SUITE,{end_per_group,test_group_7,'_'}}}],
{shuffle,
@@ -1281,22 +1281,22 @@ test_events(sub_skipped_by_top) ->
{?eh,tc_start,{groups_12_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_12_SUITE,{init_per_group,test_group_4},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_4},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_4},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{12,0}}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_4},"SKIPPED!"}},
diff --git a/lib/common_test/test/ct_testspec_1_SUITE_data/groups_1/groups_12_SUITE.erl b/lib/common_test/test/ct_testspec_1_SUITE_data/groups_1/groups_12_SUITE.erl
index 69c06f9b83..e5de5df1a8 100644
--- a/lib/common_test/test/ct_testspec_1_SUITE_data/groups_1/groups_12_SUITE.erl
+++ b/lib/common_test/test/ct_testspec_1_SUITE_data/groups_1/groups_12_SUITE.erl
@@ -285,7 +285,7 @@ testcase_5a(Config) ->
%% increase chance the done event will come
%% during execution of subgroup (could be
%% tricky to handle)
- timer:sleep(3),
+ ct:sleep(3),
ok.
testcase_5b() ->
[].
diff --git a/lib/common_test/test/ct_testspec_1_SUITE_data/groups_2/groups_22_SUITE.erl b/lib/common_test/test/ct_testspec_1_SUITE_data/groups_2/groups_22_SUITE.erl
index cd517876df..dcd361d658 100644
--- a/lib/common_test/test/ct_testspec_1_SUITE_data/groups_2/groups_22_SUITE.erl
+++ b/lib/common_test/test/ct_testspec_1_SUITE_data/groups_2/groups_22_SUITE.erl
@@ -278,7 +278,7 @@ testcase_5a(Config) ->
%% increase chance the done event will come
%% during execution of subgroup (could be
%% tricky to handle)
- timer:sleep(3),
+ ct:sleep(3),
ok.
testcase_5b() ->
[].
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl
index 31884aa182..2db5a9bc44 100644
--- a/lib/common_test/test/telnet_server.erl
+++ b/lib/common_test/test/telnet_server.erl
@@ -31,7 +31,8 @@
users,
authorized=false,
suppress_go_ahead=false,
- buffer=[]}).
+ buffer=[],
+ break=false}).
-type options() :: [{port,pos_integer()} | {users,users()}].
-type users() :: [{user(),password()}].
@@ -51,31 +52,51 @@ stop(Pid) ->
init(Opts) ->
Port = proplists:get_value(port,Opts),
Users = proplists:get_value(users,Opts,[]),
- {ok, LSock} = gen_tcp:listen(Port, [list, {packet, 0},
- {active, true}]),
+ {ok, LSock} = listen(5, Port, [list, {packet, 0},
+ {active, true},
+ {reuseaddr,true}]),
State = #state{listen=LSock,users=Users},
accept(State),
- ok = gen_tcp:close(LSock).
+ ok = gen_tcp:close(LSock),
+ dbg("telnet_server closed the listen socket ~p\n", [LSock]),
+ ct:sleep(1000),
+ ok.
+
+listen(0, _Port, _Opts) ->
+ {error,eaddrinuse};
+listen(Retries, Port, Opts) ->
+ case gen_tcp:listen(Port, Opts) of
+ {error,eaddrinuse} ->
+ dbg("Listen port not released, trying again..."),
+ ct:sleep(5000),
+ listen(Retries-1, Port, Opts);
+ Ok = {ok,_LSock} ->
+ Ok;
+ Error ->
+ exit(Error)
+ end.
accept(#state{listen=LSock}=State) ->
Server = self(),
Acceptor = spawn_link(fun() -> do_accept(LSock,Server) end),
receive
{Acceptor,Sock} when is_port(Sock) ->
+ dbg("Connected to client on socket ~p\n", [Sock]),
case init_client(State#state{client=Sock}) of
stopped ->
- io:format("telnet_server stopped\n"),
+ dbg("telnet_server stopped\n"),
ok;
R ->
- io:format("connection to client closed with reason ~p~n",[R]),
+ dbg("Connection to client "
+ "closed with reason ~p~n",[R]),
accept(State)
end;
{Acceptor,closed} ->
- io:format("listen socket closed unexpectedly, "
- "terminating telnet_server\n"),
+ dbg("Listen socket closed unexpectedly, "
+ "terminating telnet_server\n"),
ok;
stop ->
- io:format("telnet_server stopped\n"),
+ dbg("telnet_server stopped\n"),
ok
end.
@@ -96,19 +117,21 @@ init_client(#state{client=Sock}=State) ->
dbg("Server sending: ~p~n",["login: "]),
R = case gen_tcp:send(Sock,"login: ") of
ok ->
- loop(State);
+ loop(State, 1);
Error ->
Error
end,
_ = gen_tcp:close(Sock),
R.
-loop(State) ->
+loop(State, N) ->
receive
{tcp,_,Data} ->
try handle_data(Data,State) of
{ok,State1} ->
- loop(State1)
+ loop(State1, N);
+ closed ->
+ closed
catch
throw:Error ->
Error
@@ -117,10 +140,18 @@ loop(State) ->
closed;
{tcp_error,_,Error} ->
{error,tcp,Error};
+ disconnect ->
+ Sock = State#state.client,
+ dbg("Server closing connection on socket ~p~n", [Sock]),
+ ok = gen_tcp:close(Sock),
+ closed;
stop ->
stopped
end.
+handle_data(Cmd,#state{break=true}=State) ->
+ dbg("Server got data when in break mode: ~p~n",[Cmd]),
+ handle_break_cmd(Cmd,State);
handle_data([?IAC|Cmd],State) ->
dbg("Server got cmd: ~p~n",[Cmd]),
handle_cmd(Cmd,State);
@@ -129,55 +160,101 @@ handle_data(Data,State) ->
case get_line(Data,[]) of
{Line,Rest} ->
WholeLine = lists:flatten(lists:reverse(State#state.buffer,Line)),
- {ok,State1} = do_handle_data(WholeLine,State),
- case Rest of
- [] -> {ok,State1};
- _ -> handle_data(Rest,State1)
+ case do_handle_data(WholeLine,State) of
+ {ok,State1} ->
+ case Rest of
+ [] -> {ok,State1};
+ _ -> handle_data(Rest,State1)
+ end;
+ {close,State1} ->
+ dbg("Server closing connection~n",[]),
+ gen_tcp:close(State1#state.client),
+ closed
end;
false ->
{ok,State#state{buffer=[Data|State#state.buffer]}}
end.
-%% Add function clause below to handle new telnet commands (sent with
-%% ?IAC from client - this is not possible to do from ct_telnet API,
-%% but ct_telnet sends DONT SUPPRESS_GO_AHEAD)
+%% Add function clause below to handle new telnet commands sent with
+%% ?IAC from client. This can be done from ct_telnet:send or
+%% ct_telnet:cmd if using the option {newline,false}. Also, ct_telnet
+%% sends DONT SUPPRESS_GO_AHEAD.
handle_cmd([?DO,?SUPPRESS_GO_AHEAD|T],State) ->
send([?IAC,?WILL,?SUPPRESS_GO_AHEAD],State),
- handle_cmd(T,State#state{suppress_go_ahead=true});
+ handle_data(T,State#state{suppress_go_ahead=true});
handle_cmd([?DONT,?SUPPRESS_GO_AHEAD|T],State) ->
send([?IAC,?WONT,?SUPPRESS_GO_AHEAD],State),
- handle_cmd(T,State#state{suppress_go_ahead=false});
-handle_cmd([?IAC|T],State) ->
- %% Multiple commands in one packet
- handle_cmd(T,State);
+ handle_data(T,State#state{suppress_go_ahead=false});
+handle_cmd([?BRK|T],State) ->
+ %% Used when testing 'newline' option in ct_telnet:send and ct_telnet:cmd.
+ send("# ",State),
+ handle_data(T,State#state{break=true});
+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([_H|T],State) ->
%% Not responding to this command
handle_cmd(T,State);
handle_cmd([],State) ->
{ok,State}.
+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([],State) ->
+ {ok,State}.
+
+
%% Add function clause below to handle new text command (text entered
%% from the telnet prompt)
do_handle_data(Data,#state{authorized=false}=State) ->
check_user(Data,State);
do_handle_data(Data,#state{authorized={user,_}}=State) ->
check_pwd(Data,State);
-do_handle_data("echo "++ Data,State) ->
+do_handle_data("echo " ++ Data,State) ->
send(Data++"\r\n> ",State),
{ok,State};
-do_handle_data("echo_no_prompt "++ Data,State) ->
+do_handle_data("echo_sep " ++ Data,State) ->
+ Msgs = string:tokens(Data," "),
+ lists:foreach(fun(Msg) ->
+ send(Msg,State),
+ ct:sleep(10)
+ end, Msgs),
+ send("\r\n> ",State),
+ {ok,State};
+do_handle_data("echo_no_prompt " ++ Data,State) ->
send(Data,State),
{ok,State};
-do_handle_data("echo_ml "++ Data,State) ->
+do_handle_data("echo_ml " ++ Data,State) ->
Lines = string:tokens(Data," "),
ReturnData = string:join(Lines,"\n"),
send(ReturnData++"\r\n> ",State),
{ok,State};
-do_handle_data("echo_ml_no_prompt "++ Data,State) ->
+do_handle_data("echo_ml_no_prompt " ++ Data,State) ->
Lines = string:tokens(Data," "),
ReturnData = string:join(Lines,"\n"),
send(ReturnData,State),
{ok,State};
+do_handle_data("echo_loop " ++ Data,State) ->
+ [TStr|Lines] = string:tokens(Data," "),
+ ReturnData = string:join(Lines,"\n"),
+ send_loop(list_to_integer(TStr),ReturnData,State),
+ {ok,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)),
+ send("\r\n> ",State),
+ {ok,State};
+do_handle_data("disconnect_after " ++WaitStr,State) ->
+ Wait = list_to_integer(string:strip(WaitStr,right,$\n)),
+ dbg("Server will close connection in ~w ms...", [Wait]),
+ erlang:send_after(Wait,self(),disconnect),
+ {ok,State};
+do_handle_data("disconnect" ++_,State) ->
+ {close,State};
do_handle_data([],State) ->
send("> ",State),
{ok,State};
@@ -188,7 +265,7 @@ do_handle_data(_Data,State) ->
check_user(User,State) ->
case lists:keyfind(User,1,State#state.users) of
{User,Pwd} ->
- dbg("user ok\n"),
+ dbg("user ok\n"),
send("Password: ",State),
{ok,State#state{authorized={user,Pwd}}};
false ->
@@ -211,6 +288,20 @@ send(Data,State) ->
throw({error,send,Error})
end.
+send_loop(T,Data,State) ->
+ dbg("Server sending ~p in loop for ~w ms...~n",[Data,T]),
+ send_loop(now(),T,Data,State).
+
+send_loop(T0,T,Data,State) ->
+ ElapsedMS = trunc(timer:now_diff(now(),T0)/1000),
+ if ElapsedMS >= T ->
+ ok;
+ true ->
+ send(Data,State),
+ ct:sleep(500),
+ send_loop(T0,T,Data,State)
+ end.
+
get_line([$\r,$\n|Rest],Acc) ->
{lists:reverse(Acc),Rest};
get_line([$\r,0|Rest],Acc) ->
@@ -223,6 +314,16 @@ get_line([],_) ->
false.
dbg(_F) ->
- io:format(_F).
+ dbg(_F,[]).
dbg(_F,_A) ->
- io:format(_F,_A).
+ TS = timestamp(),
+ io:format("[telnet_server, ~s]\n" ++ _F,[TS|_A]).
+
+timestamp() ->
+ {MS,S,US} = now(),
+ {{Year,Month,Day}, {Hour,Min,Sec}} =
+ calendar:now_to_local_time({MS,S,US}),
+ MilliSec = trunc(US/1000),
+ lists:flatten(io_lib:format("~4.10.0B-~2.10.0B-~2.10.0B "
+ "~2.10.0B:~2.10.0B:~2.10.0B.~3.10.0B",
+ [Year,Month,Day,Hour,Min,Sec,MilliSec])).
diff --git a/lib/common_test/vsn.mk b/lib/common_test/vsn.mk
index 568405b110..e2d921729c 100644
--- a/lib/common_test/vsn.mk
+++ b/lib/common_test/vsn.mk
@@ -1 +1 @@
-COMMON_TEST_VSN = 1.7.4
+COMMON_TEST_VSN = 1.10.1
diff --git a/lib/compiler/doc/src/book.xml b/lib/compiler/doc/src/book.xml
index fc56a837d5..45b49fe46d 100644
--- a/lib/compiler/doc/src/book.xml
+++ b/lib/compiler/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index f1238f27a6..5fccdcdcb5 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -350,12 +350,18 @@ module.beam: module.erl \
parsed code before the code is checked for errors.</p>
</item>
- <tag><c>asm</c></tag>
+ <tag><c>from_asm</c></tag>
<item>
<p>The input file is expected to be assembler code (default
file suffix ".S"). Note that the format of assembler files
- is not documented, and may change between releases - this
- option is primarily for internal debugging use.</p>
+ is not documented, and may change between releases.</p>
+ </item>
+
+ <tag><c>from_core</c></tag>
+ <item>
+ <p>The input file is expected to be core code (default
+ file suffix ".core"). Note that the format of core files
+ is not documented, and may change between releases.</p>
</item>
<tag><c>no_strict_record_tests</c></tag>
@@ -402,6 +408,11 @@ module.beam: module.erl \
<code>-compile({no_auto_import,[error/1]}).</code>
</item>
+ <tag><c>no_auto_import</c></tag>
+ <item>
+ <p>Do not auto import any functions from the module <c>erlang</c>.</p>
+ </item>
+
<tag><c>no_line_info</c></tag>
<item>
@@ -540,6 +551,14 @@ module.beam: module.erl \
<c>{Module,Name,Arity}</c> or a list of such tuples.</p>
</item>
+ <tag><c>nowarn_deprecated_type</c></tag>
+ <item>
+ <p>Turns off warnings for uses of deprecated types. By
+ default (<c>warn_deprecated_type</c>), warnings are
+ emitted for every use of a type known by the compiler
+ to be deprecated.</p>
+ </item>
+
<tag><c>warn_obsolete_guard</c></tag>
<item>
<p>Causes warnings to be emitted for calls to old type
diff --git a/lib/compiler/doc/src/fascicules.xml b/lib/compiler/doc/src/fascicules.xml
index 43090b4aed..fadd37eefb 100644
--- a/lib/compiler/doc/src/fascicules.xml
+++ b/lib/compiler/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml
index cb39b28d3d..9b5b44f3e1 100644
--- a/lib/compiler/doc/src/notes.xml
+++ b/lib/compiler/doc/src/notes.xml
@@ -31,6 +31,353 @@
<p>This document describes the changes made to the Compiler
application.</p>
+<section><title>Compiler 5.0.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Matching out a map from a record and then updating the
+ record could cause a 'badarg' exception at run-time.
+ (Thanks to Dmitry Aleksandrov for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-12402</p>
+ </item>
+ <item>
+ <p>The compiler would crash when compiling some complex,
+ nonsensical guards such as:</p>
+ <p> ... <c>when {{X}}, -X</c>...</p>
+ <p>
+ Own Id: OTP-12410</p>
+ </item>
+ <item>
+ <p>
+ In rare circumstances, using binary pattern in the value
+ part of a map pattern would cause the compiler to crash.</p>
+ <p>
+ Own Id: OTP-12414</p>
+ </item>
+ <item>
+ <p>Case expressions where a map was wrapped in a tuple or
+ list such as:</p>
+ <p><c>case {a,Map} of</c><br/> <c>{a,#{k:=_}}=Tuple -&gt;
+ Tuple</c><br/> <c>end.</c></p>
+ <p>would be unsafely "optimized" to either cause an
+ exception at run-time or would return an empty map.</p>
+ <p>
+ Own Id: OTP-12451</p>
+ </item>
+ <item>
+ <p>When a variable was compared to a literal map using
+ the '<c>==</c>' operator, the compiler would change the
+ operator to '<c>=:=</c>' since it is more efficient.
+ However, this optimization is not safe if the map literal
+ has numeric keys or values. The compiler will now only do
+ the optimization if all keys and values are
+ non-numeric.</p>
+ <p>
+ Own Id: OTP-12456</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 5.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Named funs with the same name and arity could get mixed
+ up with each other.</p>
+ <p>
+ Own Id: OTP-12262</p>
+ </item>
+ <item>
+ <p>
+ Coalesce map keys in dialyzer mode</p>
+ <p>
+ This fixes a regression introduced in commit
+ 805f9c89fc01220bc1bb0f27e1b68fd4eca688ba The problem
+ occurred with compounded map keys compiled with dialyzer
+ option turned on, '+dialyzer'.</p>
+ <p>
+ Reported by: Ivan Uemlianin</p>
+ <p>
+ Own Id: OTP-12347</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 5.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Corrected a bug with incorrect code generation when
+ inlining was turned on.</p>
+ <p>
+ Own Id: OTP-12132</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 5.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A Dialyzer crash involving analysis of Map types has now
+ been fixed.</p>
+ <p>
+ Own Id: OTP-11947</p>
+ </item>
+ <item>
+ <p>The compiler would fail to compile a file with a
+ latin-1 character in the false branch of an <c>-ifdef</c>
+ or <c>-indef</c>.</p>
+ <p>
+ Own Id: OTP-11987</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 5.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Line numbers would not be correct when a binary
+ construction such as
+ '<c>&lt;&lt;Bin/binary,...&gt;&gt;</c>' fails. (Thanks to
+ Stanislav Seletskiy for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11572</p>
+ </item>
+ <item>
+ <p>
+ The compiler now properly annotates the code in value in
+ the '<c>after</c>' clause for a '<c>try</c>' so that
+ Dialyzer no longer generates a false warning for an
+ unmatched return.</p>
+ <p>
+ Own Id: OTP-11580</p>
+ </item>
+ <item>
+ <p>
+ Some case statements where no clause would match could
+ cause an internal error in the compiler. (Thanks to Erik
+ Soe Sorensen for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11610</p>
+ </item>
+ <item>
+ <p>
+ With <c>--Wunmatched_returns</c>, dialyzer will no longer
+ warn when the value of a list comprehension is ignored,
+ provided that the each value in the list would be an
+ atomic value (such as integer or atoms, as opposed to
+ tuples and lists). Example: ignoring '<c>[io:format(...)
+ || ...]</c>' will not cause a warning, while ignoring
+ '<c>[file:close(Fd) || ...]</c>' will.</p>
+ <p>
+ Own Id: OTP-11626</p>
+ </item>
+ <item>
+ <p>
+ Matching out a binary and applying the binary as if it
+ were a fun would crash the run-time system. (Thanks to
+ Loïc Hoguin.)</p>
+ <p>
+ Own Id: OTP-11672</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Allow all auto imports to be suppressed at once.
+ Introducing the no_auto_import attribute:
+ -compile(no_auto_import). Useful for code generation
+ tools that always use the qualified function names and
+ want to avoid the auto imported functions clashing with
+ local ones. (Thanks to José Valim.)</p>
+ <p>
+ Own Id: OTP-11682</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Adapt 'asm' deprecation message to new version scheme.
+ (Thanks to Tuncer Ayaz)</p>
+ <p>
+ Own Id: OTP-11751</p>
+ </item>
+ <item>
+ <p>
+ A number of compiler errors where unusual or nonsensical
+ code would crash the compiler have been reported by Ulf
+ Norell and corrected by Anthony Ramine.</p>
+ <p>
+ Own Id: OTP-11770</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Compilation times for modules with a huge number for
+ record accesses using the dot operator has been improved.</p>
+ <p>
+ Own Id: OTP-10652</p>
+ </item>
+ <item>
+ <p>
+ The compiler can generate somewhat better code by moving
+ let expressions into sequences. (Thanks to Anthony
+ Ramine.)</p>
+ <p>
+ Own Id: OTP-11056</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ Funs can now be a given a name. Thanks to to Richard
+ O'Keefe for the idea (EEP37) and to Anthony Ramine for
+ the implementation.</p>
+ <p>
+ Own Id: OTP-11537</p>
+ </item>
+ <item>
+ <p>
+ Using the <c>from_asm</c> option to produce a BEAM file
+ starting from BEAM assembly code would often fail because
+ early optimization passes would not understand
+ instructions that later optimization passes would
+ introduce. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11544</p>
+ </item>
+ <item>
+ <p>
+ The <c>.core</c> and <c>.S</c> extensions are now
+ documented in the <c>erlc</c> documentation, and the
+ '<c>from_core</c>' and '<c>from_asm</c>' options are now
+ documented in the compiler documentation. (Thanks to
+ Tuncer Ayaz.)</p>
+ <p>
+ Own Id: OTP-11547</p>
+ </item>
+ <item>
+ <p>Optimization of case expressions that build tuples or
+ lists have been improved.</p>
+ <p>
+ Own Id: OTP-11584</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see Map Expressions in the
+ <seealso marker="doc/reference_manual:expressions#map_expressions">
+ Reference Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Thanks to Anthony Ramine for several improvements to the
+ optimizations in the BEAM compiler and for cleaning up
+ the code the code that transforms list and binary
+ comprehensions to Core Erlang.</p>
+ <p>
+ Own Id: OTP-11720</p>
+ </item>
+ <item>
+ <p>
+ The default encoding for Erlang source files is now
+ UTF-8. As a temporary measure to ease the transition from
+ the old default of latin-1, if the compiler encounters
+ byte sequences that are not valid UTF-8 sequences, the
+ compiler will re-try the compilation in latin-1 mode.
+ This workaround will be removed in a future release.</p>
+ <p>
+ Own Id: OTP-11791</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Compiler 4.9.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/compiler/doc/src/notes_history.xml b/lib/compiler/doc/src/notes_history.xml
index db0dc2f683..9e8934f416 100644
--- a/lib/compiler/doc/src/notes_history.xml
+++ b/lib/compiler/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/compiler/doc/src/part_notes.xml b/lib/compiler/doc/src/part_notes.xml
index e730e3f7e2..0c1fdd567d 100644
--- a/lib/compiler/doc/src/part_notes.xml
+++ b/lib/compiler/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/compiler/doc/src/part_notes_history.xml b/lib/compiler/doc/src/part_notes_history.xml
index 12366f0006..a4909f156e 100644
--- a/lib/compiler/doc/src/part_notes_history.xml
+++ b/lib/compiler/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/compiler/doc/src/ref_man.xml b/lib/compiler/doc/src/ref_man.xml
index 74fe45aa77..6478ad4b11 100644
--- a/lib/compiler/doc/src/ref_man.xml
+++ b/lib/compiler/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/compiler/src/beam_a.erl b/lib/compiler/src/beam_a.erl
index c590c5e35b..fe4f473846 100644
--- a/lib/compiler/src/beam_a.erl
+++ b/lib/compiler/src/beam_a.erl
@@ -88,6 +88,12 @@ rename_instr({bs_private_append=I,F,Sz,U,Src,Flags,Dst}) ->
{bs_init,F,{I,U,Flags},none,[Sz,Src],Dst};
rename_instr(bs_init_writable=I) ->
{bs_init,{f,0},I,1,[{x,0}],{x,0}};
+rename_instr({put_map_assoc,Fail,S,D,R,L}) ->
+ {put_map,Fail,assoc,S,D,R,L};
+rename_instr({put_map_exact,Fail,S,D,R,L}) ->
+ {put_map,Fail,exact,S,D,R,L};
+rename_instr({test,has_map_fields,Fail,Src,{list,List}}) ->
+ {test,has_map_fields,Fail,[Src|List]};
rename_instr({select_val=I,Reg,Fail,{list,List}}) ->
{select,I,Reg,Fail,List};
rename_instr({select_tuple_arity=I,Reg,Fail,{list,List}}) ->
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index 112b087f3c..f8cf178d2e 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -324,6 +324,8 @@ make_op({gc_bif,Bif,Fail,Live,Args,Dest}, Dict) ->
encode_op(BifOp, [Fail,Live,{extfunc,erlang,Bif,Arity}|Args++[Dest]],Dict);
make_op({bs_add=Op,Fail,[Src1,Src2,Unit],Dest}, Dict) ->
encode_op(Op, [Fail,Src1,Src2,Unit,Dest], Dict);
+make_op({test,Cond,Fail,Src,{list,_}=Ops}, Dict) ->
+ encode_op(Cond, [Fail,Src,Ops], Dict);
make_op({test,Cond,Fail,Ops}, Dict) when is_list(Ops) ->
encode_op(Cond, [Fail|Ops], Dict);
make_op({test,Cond,Fail,Live,[Op|Ops],Dst}, Dict) when is_list(Ops) ->
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index cf5244e1ce..7a30c68593 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -123,15 +123,24 @@ is_last_bool([], _) -> false.
collect_block(Is) ->
collect_block(Is, []).
+collect_block([{allocate,N,R}|Is0], Acc) ->
+ {Inits,Is} = lists:splitwith(fun ({init,{y,_}}) -> true;
+ (_) -> false
+ end, Is0),
+ collect_block(Is, [{set,[],[],{alloc,R,{nozero,N,0,Inits}}}|Acc]);
collect_block([{allocate_zero,Ns,R},{test_heap,Nh,R}|Is], Acc) ->
- collect_block(Is, [{set,[],[],{alloc,R,{no_opt,Ns,Nh,[]}}}|Acc]);
+ collect_block(Is, [{set,[],[],{alloc,R,{zero,Ns,Nh,[]}}}|Acc]);
collect_block([I|Is]=Is0, Acc) ->
case collect(I) of
error -> {reverse(Acc),Is0};
Instr -> collect_block(Is, [Instr|Acc])
end.
+collect({allocate,N,R}) -> {set,[],[],{alloc,R,{nozero,N,0,[]}}};
collect({allocate_zero,N,R}) -> {set,[],[],{alloc,R,{zero,N,0,[]}}};
+collect({allocate_heap,Ns,Nh,R}) -> {set,[],[],{alloc,R,{nozero,Ns,Nh,[]}}};
+collect({allocate_heap_zero,Ns,Nh,R}) -> {set,[],[],{alloc,R,{zero,Ns,Nh,[]}}};
+collect({init,D}) -> {set,[D],[],init};
collect({test_heap,N,R}) -> {set,[],[],{alloc,R,{nozero,nostack,N,[]}}};
collect({bif,N,F,As,D}) -> {set,[D],As,{bif,N,F}};
collect({gc_bif,N,F,R,As,D}) -> {set,[D],As,{alloc,R,{gc_bif,N,F}}};
@@ -143,7 +152,15 @@ collect({get_tuple_element,S,I,D}) -> {set,[D],[S],{get_tuple_element,I}};
collect({set_tuple_element,S,D,I}) -> {set,[],[S,D],{set_tuple_element,I}};
collect({get_list,S,D1,D2}) -> {set,[D1,D2],[S],get_list};
collect(remove_message) -> {set,[],[],remove_message};
+collect({put_map,F,Op,S,D,R,{list,Puts}}) ->
+ {set,[D],[S|Puts],{alloc,R,{put_map,Op,F}}};
+collect({get_map_elements,F,S,{list,Gets}}) ->
+ {set,Gets,[S],{get_map_elements,F}};
collect({'catch',R,L}) -> {set,[R],[],{'catch',L}};
+collect(fclearerror) -> {set,[],[],fclearerror};
+collect({fcheckerror,{f,0}}) -> {set,[],[],fcheckerror};
+collect({fmove,S,D}) -> {set,[D],[S],fmove};
+collect({fconv,S,D}) -> {set,[D],[S],fconv};
collect(_) -> error.
%% embed_lines([Instruction]) -> [Instruction]
@@ -223,6 +240,7 @@ move_allocates_2(Alloc, [], Acc) ->
alloc_may_pass({set,_,_,{alloc,_,_}}) -> false;
alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false;
+alloc_may_pass({set,_,_,{get_map_elements,_}}) -> false;
alloc_may_pass({set,_,_,put_list}) -> false;
alloc_may_pass({set,_,_,put}) -> false;
alloc_may_pass({set,_,_,_}) -> true.
@@ -273,7 +291,11 @@ opt_moves([X0,Y0], Is0) ->
not_possible -> {[X,Y0],Is2};
{X,_} -> {[X,Y0],Is2};
{Y,Is} -> {[X,Y],Is}
- end.
+ end;
+opt_moves(Ds, Is) ->
+ %% multiple destinations -> pass through
+ {Ds,Is}.
+
%% opt_move(Dest, [Instruction]) -> {UpdatedDest,[Instruction]} | not_possible
%% If there is a {move,Dest,FinalDest} instruction
@@ -370,6 +392,7 @@ gen_init(Fs, Regs, Y, Acc) ->
init_yreg([{set,_,_,{bif,_,_}}|_], Reg) -> Reg;
init_yreg([{set,_,_,{alloc,_,{gc_bif,_,_}}}|_], Reg) -> Reg;
+init_yreg([{set,_,_,{alloc,_,{put_map,_,_}}}|_], Reg) -> Reg;
init_yreg([{set,Ds,_,_}|Is], Reg) -> init_yreg(Is, add_yregs(Ds, Reg));
init_yreg(_Is, Reg) -> Reg.
diff --git a/lib/compiler/src/beam_bool.erl b/lib/compiler/src/beam_bool.erl
index 124abd13c1..a452d30b61 100644
--- a/lib/compiler/src/beam_bool.erl
+++ b/lib/compiler/src/beam_bool.erl
@@ -126,44 +126,53 @@ bopt_block(Reg, Fail, OldIs, [{block,Bl0}|Acc0], St0) ->
%% There was a reference to a boolean expression
%% from inside a protected block (try/catch), to
%% a boolean expression outside.
- throw:protected_barrier ->
+ throw:protected_barrier ->
failed;
- %% The 'xor' operator was used. We currently don't
- %% find it worthwile to translate 'xor' operators
- %% (the code would be clumsy).
- throw:'xor' ->
+ %% The 'xor' operator was used. We currently don't
+ %% find it worthwile to translate 'xor' operators
+ %% (the code would be clumsy).
+ throw:'xor' ->
failed;
- %% The block does not contain a boolean expression,
- %% but only a call to a guard BIF.
- %% For instance: ... when element(1, T) ->
- throw:not_boolean_expr ->
+ %% The block does not contain a boolean expression,
+ %% but only a call to a guard BIF.
+ %% For instance: ... when element(1, T) ->
+ throw:not_boolean_expr ->
failed;
- %% The block contains a 'move' instruction that could
- %% not be handled.
- throw:move ->
+ %% The block contains a 'move' instruction that could
+ %% not be handled.
+ throw:move ->
failed;
- %% The optimization is not safe. (A register
- %% used by the instructions following the
- %% optimized code is either not assigned a
- %% value at all or assigned a different value.)
- throw:all_registers_not_killed ->
+ %% The optimization is not safe. (A register
+ %% used by the instructions following the
+ %% optimized code is either not assigned a
+ %% value at all or assigned a different value.)
+ throw:all_registers_not_killed ->
failed;
- throw:registers_used ->
+ throw:registers_used ->
failed;
- %% A protected block refered to the value
- %% returned by another protected block,
- %% probably because the Core Erlang code
- %% used nested try/catches in the guard.
- %% (v3_core never produces nested try/catches
- %% in guards, so it must have been another
- %% Core Erlang translator.)
- throw:protected_violation ->
+ %% A protected block refered to the value
+ %% returned by another protected block,
+ %% probably because the Core Erlang code
+ %% used nested try/catches in the guard.
+ %% (v3_core never produces nested try/catches
+ %% in guards, so it must have been another
+ %% Core Erlang translator.)
+ throw:protected_violation ->
+ failed;
+
+ %% Failed to work out the live registers for a GC
+ %% BIF. For example, if the number of live registers
+ %% needed to be 4 because {x,3} was a source register,
+ %% but {x,2} was not known to be initialized, this
+ %% exception would be thrown.
+ throw:gc_bif_alloc_failure ->
failed
+
end
end.
@@ -318,6 +327,8 @@ split_block_label_used([{set,[_],_,{bif,_,{f,Fail}}}|_], Fail) ->
true;
split_block_label_used([{set,[_],_,{alloc,_,{gc_bif,_,{f,Fail}}}}|_], Fail) ->
true;
+split_block_label_used([{set,[_],_,{alloc,_,{put_map,_,{f,Fail}}}}|_], Fail) ->
+ true;
split_block_label_used([_|Is], Fail) ->
split_block_label_used(Is, Fail);
split_block_label_used([], _) -> false.
@@ -391,10 +402,14 @@ bopt_tree([{set,_,_,{bif,'xor',_}}|_], _, _) ->
throw('xor');
bopt_tree([{protected,[Dst],Code,_}|Is], Forest0, Pre) ->
ProtForest0 = gb_trees:from_orddict([P || {_,any}=P <- gb_trees:to_list(Forest0)]),
- {ProtPre,[{_,ProtTree}]} = bopt_tree(Code, ProtForest0, []),
- Prot = {prot,ProtPre,ProtTree},
- Forest = gb_trees:enter(Dst, Prot, Forest0),
- bopt_tree(Is, Forest, Pre);
+ case bopt_tree(Code, ProtForest0, []) of
+ {ProtPre,[{_,ProtTree}]} ->
+ Prot = {prot,ProtPre,ProtTree},
+ Forest = gb_trees:enter(Dst, Prot, Forest0),
+ bopt_tree(Is, Forest, Pre);
+ _Res ->
+ throw(not_boolean_expr)
+ end;
bopt_tree([{set,[Dst],[Src],move}=Move|Is], Forest, Pre) ->
case {Src,Dst} of
{{tmp,_},_} -> throw(move);
@@ -432,9 +447,10 @@ bopt_bool_args(As, Forest) ->
mapfoldl(fun bopt_bool_arg/2, Forest, As).
bopt_bool_arg({T,_}=R, Forest) when T =:= x; T =:= y; T =:= tmp ->
- Val = case gb_trees:get(R, Forest) of
- any -> {test,is_eq_exact,fail,[R,{atom,true}]};
- Val0 -> Val0
+ Val = case gb_trees:lookup(R, Forest) of
+ {value,any} -> {test,is_eq_exact,fail,[R,{atom,true}]};
+ {value,Val0} -> Val0;
+ none -> throw(mixed)
end,
{Val,gb_trees:delete(R, Forest)};
bopt_bool_arg(Term, Forest) ->
@@ -525,7 +541,9 @@ bopt_cg({prot,Pre0,Tree}, Fail, Rs0, Acc, St0) ->
bopt_cg({atom,true}, _Fail, _Rs, Acc, St) ->
{Acc,St};
bopt_cg({atom,false}, Fail, _Rs, Acc, St) ->
- {[{jump,{f,Fail}}|Acc],St}.
+ {[{jump,{f,Fail}}|Acc],St};
+bopt_cg(_, _, _, _, _) ->
+ throw(not_boolean_expr).
bopt_cg_not({'and',As0}) ->
As = [bopt_cg_not(A) || A <- As0],
@@ -538,7 +556,9 @@ bopt_cg_not({'not',Arg}) ->
bopt_cg_not({test,Test,Fail,As}) ->
{inverted_test,Test,Fail,As};
bopt_cg_not({atom,Bool}) when is_boolean(Bool) ->
- {atom,not Bool}.
+ {atom,not Bool};
+bopt_cg_not(_) ->
+ throw(not_boolean_expr).
bopt_cg_not_not({'and',As}) ->
{'and',[bopt_cg_not_not(A) || A <- As]};
@@ -654,10 +674,16 @@ put_reg_1(V, [], I) -> [{I,V}].
fetch_reg(V, [{I,V}|_]) -> {x,I};
fetch_reg(V, [_|SRs]) -> fetch_reg(V, SRs).
-live_regs(Regs) ->
- foldl(fun ({I,_}, _) ->
- I
- end, -1, Regs)+1.
+live_regs([{_,reserved}|_]) ->
+ %% We are not sure that this register is initialized, so we must
+ %% abort the optimization.
+ throw(gc_bif_alloc_failure);
+live_regs([{I,_}]) ->
+ I+1;
+live_regs([{_,_}|Regs]) ->
+ live_regs(Regs);
+live_regs([]) ->
+ 0.
%%%
diff --git a/lib/compiler/src/beam_bsm.erl b/lib/compiler/src/beam_bsm.erl
index fdfcb08125..d54c2a9fde 100644
--- a/lib/compiler/src/beam_bsm.erl
+++ b/lib/compiler/src/beam_bsm.erl
@@ -209,6 +209,7 @@ btb_reaches_match_2([{call,Arity,{f,Lbl}}|Is], Regs, D) ->
btb_reaches_match_2([{apply,Arity}|Is], Regs, D) ->
btb_call(Arity+2, apply, Regs, Is, D);
btb_reaches_match_2([{call_fun,Live}=I|Is], Regs, D) ->
+ btb_ensure_not_used([{x,Live}], I, Regs),
btb_call(Live, I, Regs, Is, D);
btb_reaches_match_2([{make_fun2,_,_,_,Live}|Is], Regs, D) ->
btb_call(Live, make_fun2, Regs, Is, D);
diff --git a/lib/compiler/src/beam_clean.erl b/lib/compiler/src/beam_clean.erl
index 9d89e21a4e..b653998252 100644
--- a/lib/compiler/src/beam_clean.erl
+++ b/lib/compiler/src/beam_clean.erl
@@ -234,6 +234,36 @@ replace([{bs_init,{f,Lbl},Info,Live,Ss,Dst}|Is], Acc, D) when Lbl =/= 0 ->
replace(Is, [{bs_init,{f,label(Lbl, D)},Info,Live,Ss,Dst}|Acc], D);
replace([{bs_put,{f,Lbl},Info,Ss}|Is], Acc, D) when Lbl =/= 0 ->
replace(Is, [{bs_put,{f,label(Lbl, D)},Info,Ss}|Acc], D);
+replace([{bs_init2,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_init2,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
+replace([{bs_init_bits,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_init_bits,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
+replace([{bs_put_integer,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_integer,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_put_utf8=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_utf16=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_utf32=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_binary,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_binary,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_put_float,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_float,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_add,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_add,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{bs_append,{f,Lbl},_,_,_,_,_,_,_}=I0|Is], Acc, D) when Lbl =/= 0 ->
+ I = setelement(2, I0, {f,label(Lbl, D)}),
+ replace(Is, [I|Acc], D);
+replace([{bs_utf8_size=I,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{bs_utf16_size=I,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{put_map=I,{f,Lbl},Op,Src,Dst,Live,List}|Is], Acc, D)
+ when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Op,Src,Dst,Live,List}|Acc], D);
+replace([{get_map_elements=I,{f,Lbl},Src,List}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,List}|Acc], D);
replace([I|Is], Acc, D) ->
replace(Is, [I|Acc], D);
replace([], Acc, _) -> Acc.
diff --git a/lib/compiler/src/beam_dict.erl b/lib/compiler/src/beam_dict.erl
index 212b9fb03a..ea51673fa3 100644
--- a/lib/compiler/src/beam_dict.erl
+++ b/lib/compiler/src/beam_dict.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,16 +29,24 @@
-type label() :: non_neg_integer().
+-type index() :: non_neg_integer().
+
+-type atom_tab() :: gb_trees:tree(atom(), index()).
+-type import_tab() :: gb_trees:tree(mfa(), index()).
+-type fname_tab() :: gb_trees:tree(Name :: term(), index()).
+-type line_tab() :: gb_trees:tree({Fname :: index(), Line :: term()}, index()).
+-type literal_tab() :: dict:dict(Literal :: term(), index()).
+
-record(asm,
- {atoms = gb_trees:empty() :: gb_tree(), %{Atom,Index}
+ {atoms = gb_trees:empty() :: atom_tab(),
exports = [] :: [{label(), arity(), label()}],
locals = [] :: [{label(), arity(), label()}],
- imports = gb_trees:empty() :: gb_tree(), %{{M,F,A},Index}
+ imports = gb_trees:empty() :: import_tab(),
strings = <<>> :: binary(), %String pool
lambdas = [], %[{...}]
- literals = dict:new() :: dict(), %Format: {Literal,Number}
- fnames = gb_trees:empty() :: gb_tree(), %{Name,Index}
- lines = gb_trees:empty() :: gb_tree(), %{{Fname,Line},Index}
+ literals = dict:new() :: literal_tab(),
+ fnames = gb_trees:empty() :: fname_tab(),
+ lines = gb_trees:empty() :: line_tab(),
num_lines = 0 :: non_neg_integer(), %Number of line instructions
next_import = 0 :: non_neg_integer(),
string_offset = 0 :: non_neg_integer(),
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl
index 1a8bbcee22..c45596f236 100644
--- a/lib/compiler/src/beam_disasm.erl
+++ b/lib/compiler/src/beam_disasm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,7 +37,8 @@
%%-----------------------------------------------------------------------
--type literals() :: 'none' | gb_tree().
+-type index() :: non_neg_integer().
+-type literals() :: 'none' | gb_trees:tree(index(), term()).
-type symbolic_tag() :: 'a' | 'f' | 'h' | 'i' | 'u' | 'x' | 'y' | 'z'.
-type disasm_tag() :: symbolic_tag() | 'fr' | 'atom' | 'float' | 'literal'.
-type disasm_term() :: 'nil' | {disasm_tag(), _}.
@@ -216,7 +217,8 @@ optional_chunk(F, ChunkTag) ->
%%-----------------------------------------------------------------------
-type l_info() :: {non_neg_integer(), {_,_,_,_,_,_}}.
--spec beam_disasm_lambdas('none' | binary(), gb_tree()) -> 'none' | [l_info()].
+-spec beam_disasm_lambdas('none' | binary(), gb_trees:tree(index(), _)) ->
+ 'none' | [l_info()].
beam_disasm_lambdas(none, _) -> none;
beam_disasm_lambdas(<<_:32,Tab/binary>>, Atoms) ->
@@ -365,6 +367,14 @@ disasm_instr(B, Bs, Atoms, Literals) ->
disasm_select_inst(select_val, Bs, Atoms, Literals);
select_tuple_arity ->
disasm_select_inst(select_tuple_arity, Bs, Atoms, Literals);
+ put_map_assoc ->
+ disasm_map_inst(put_map_assoc, Arity, Bs, Atoms, Literals);
+ put_map_exact ->
+ disasm_map_inst(put_map_exact, Arity, Bs, Atoms, Literals);
+ get_map_elements ->
+ disasm_map_inst(get_map_elements, Arity, Bs, Atoms, Literals);
+ has_map_fields ->
+ disasm_map_inst(has_map_fields, Arity, Bs, Atoms, Literals);
_ ->
try decode_n_args(Arity, Bs, Atoms, Literals) of
{Args, RestBs} ->
@@ -395,6 +405,16 @@ disasm_select_inst(Inst, Bs, Atoms, Literals) ->
{List, RestBs} = decode_n_args(Len, Bs4, Atoms, Literals),
{{Inst, [X,F,{Z,U,List}]}, RestBs}.
+disasm_map_inst(Inst, Arity, Bs0, Atoms, Literals) ->
+ {Args0,Bs1} = decode_n_args(Arity, Bs0, Atoms, Literals),
+ %% no droplast ..
+ [Z|Args1] = lists:reverse(Args0),
+ Args = lists:reverse(Args1),
+ {U, Bs2} = decode_arg(Bs1, Atoms, Literals),
+ {u, Len} = U,
+ {List, RestBs} = decode_n_args(Len, Bs2, Atoms, Literals),
+ {{Inst, Args ++ [{Z,U,List}]}, RestBs}.
+
%%-----------------------------------------------------------------------
%% decode_arg([Byte]) -> {Arg, [Byte]}
%%
@@ -417,11 +437,12 @@ decode_arg([B|Bs]) ->
decode_int(Tag, B, Bs)
end.
--spec decode_arg([byte(),...], gb_tree(), literals()) -> {disasm_term(), [byte()]}.
+-spec decode_arg([byte(),...], gb_trees:tree(index(), _), literals()) ->
+ {disasm_term(), [byte()]}.
decode_arg([B|Bs0], Atoms, Literals) ->
Tag = decode_tag(B band 2#111),
- ?NO_DEBUG('Tag = ~p, B = ~p, Bs = ~p~n', [Tag, B, Bs]),
+ ?NO_DEBUG('Tag = ~p, B = ~p, Bs = ~p~n', [Tag, B, Bs0]),
case Tag of
z ->
decode_z_tagged(Tag, B, Bs0, Literals);
@@ -1009,6 +1030,7 @@ resolve_inst({gc_bif2,Args},Imports,_,_) ->
[F,Live,Bif,A1,A2,Reg] = resolve_args(Args),
{extfunc,_Mod,BifName,_Arity} = lookup(Bif+1,Imports),
{gc_bif,BifName,F,Live,[A1,A2],Reg};
+
%%
%% New instruction in R14, gc_bif with 3 arguments
%%
@@ -1119,6 +1141,29 @@ resolve_inst({line,[Index]},_,_,_) ->
{line,resolve_arg(Index)};
%%
+%% 17.0
+%%
+resolve_inst({put_map_assoc,Args},_,_,_) ->
+ [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args,
+ List = resolve_args(List0),
+ {put_map_assoc,FLbl,Src,Dst,N,{list,List}};
+resolve_inst({put_map_exact,Args},_,_,_) ->
+ [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args,
+ List = resolve_args(List0),
+ {put_map_exact,FLbl,Src,Dst,N,{list,List}};
+resolve_inst({is_map=I,Args0},_,_,_) ->
+ [FLbl|Args] = resolve_args(Args0),
+ {test,I,FLbl,Args};
+resolve_inst({has_map_fields,Args0},_,_,_) ->
+ [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0,
+ List = resolve_args(List0),
+ {test,has_map_fields,FLbl,Src,{list,List}};
+resolve_inst({get_map_elements,Args0},_,_,_) ->
+ [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0,
+ List = resolve_args(List0),
+ {get_map_elements,FLbl,Src,{list,List}};
+
+%%
%% Catches instructions that are not yet handled.
%%
resolve_inst(X,_,_,_) -> ?exit({resolve_inst,X}).
diff --git a/lib/compiler/src/beam_except.erl b/lib/compiler/src/beam_except.erl
index e5ec1bd904..d261809765 100644
--- a/lib/compiler/src/beam_except.erl
+++ b/lib/compiler/src/beam_except.erl
@@ -131,9 +131,13 @@ translate_exception(_, _, _, _) -> no.
fix_block(Is, 0) ->
reverse(Is);
-fix_block(Is0, Words) ->
- [{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is] = reverse(Is0),
- [{set,[],[],{alloc,Live,{F1,F2,Needed-Words,F3}}}|Is].
+fix_block(Is, Words) ->
+ fix_block_1(reverse(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([I|Is], Words) ->
+ [I|fix_block_1(Is, Words)].
dig_out_block_fc([{set,[],[],{alloc,Live,_}}|Bl]) ->
case dig_out_fc(Bl, Live-1, nil) of
diff --git a/lib/compiler/src/beam_flatten.erl b/lib/compiler/src/beam_flatten.erl
index 25428c0c10..46835bece1 100644
--- a/lib/compiler/src/beam_flatten.erl
+++ b/lib/compiler/src/beam_flatten.erl
@@ -51,6 +51,7 @@ norm_block([], Acc) -> Acc.
norm({set,[D],As,{bif,N,F}}) -> {bif,N,F,As,D};
norm({set,[D],As,{alloc,R,{gc_bif,N,F}}}) -> {gc_bif,N,F,R,As,D};
+norm({set,[D],[],init}) -> {init,D};
norm({set,[D],[S],move}) -> {move,S,D};
norm({set,[D],[S],fmove}) -> {fmove,S,D};
norm({set,[D],[S],fconv}) -> {fconv,S,D};
@@ -60,6 +61,10 @@ norm({set,[],[S],put}) -> {put,S};
norm({set,[D],[S],{get_tuple_element,I}}) -> {get_tuple_element,S,I,D};
norm({set,[],[S,D],{set_tuple_element,I}}) -> {set_tuple_element,S,D,I};
norm({set,[D1,D2],[S],get_list}) -> {get_list,S,D1,D2};
+norm({set,[D],[S|Puts],{alloc,R,{put_map,Op,F}}}) ->
+ {put_map,F,Op,S,D,R,{list,Puts}};
+norm({set,Gets,[S],{get_map_elements,F}}) ->
+ {get_map_elements,F,S,{list,Gets}};
norm({set,[],[],remove_message}) -> remove_message;
norm({set,[],[],fclearerror}) -> fclearerror;
norm({set,[],[],fcheckerror}) -> {fcheckerror,{f,0}}.
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index b29a3565e4..b952139f2c 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -202,19 +202,19 @@ is_label(_) -> false.
move(Is) ->
move_1(Is, [], []).
-move_1([I|Is], End0, Acc0) ->
+move_1([I|Is], Ends, Acc0) ->
case is_exit_instruction(I) of
false ->
- move_1(Is, End0, [I|Acc0]);
+ move_1(Is, Ends, [I|Acc0]);
true ->
- case extract_seq(Acc0, [I|End0]) of
+ case extract_seq(Acc0, [I]) of
no ->
- move_1(Is, End0, [I|Acc0]);
+ move_1(Is, Ends, [I|Acc0]);
{yes,End,Acc} ->
- move_1(Is, End, Acc)
+ move_1(Is, [End|Ends], Acc)
end
end;
-move_1([], End, Acc) -> reverse(Acc, End).
+move_1([], Ends, Acc) -> reverse(Acc, lists:append(reverse(Ends))).
extract_seq([{line,_}=Line|Is], Acc) ->
extract_seq(Is, [Line|Acc]);
@@ -446,11 +446,13 @@ is_label_used_in_2({set,_,_,Info}, Lbl) ->
case Info of
{bif,_,{f,F}} -> F =:= Lbl;
{alloc,_,{gc_bif,_,{f,F}}} -> F =:= Lbl;
+ {alloc,_,{put_map,_,{f,F}}} -> F =:= Lbl;
{'catch',{f,F}} -> F =:= Lbl;
{alloc,_,_} -> false;
{put_tuple,_} -> false;
{get_tuple_element,_} -> false;
{set_tuple_element,_} -> false;
+ {get_map_elements,{f,F}} -> F =:= Lbl;
{line,_} -> false;
_ when is_atom(Info) -> false
end.
@@ -527,6 +529,10 @@ ulbl({bs_init,Lbl,_,_,_,_}, Used) ->
mark_used(Lbl, Used);
ulbl({bs_put,Lbl,_,_}, Used) ->
mark_used(Lbl, Used);
+ulbl({put_map,Lbl,_Op,_Src,_Dst,_Live,_List}, Used) ->
+ mark_used(Lbl, Used);
+ulbl({get_map_elements,Lbl,_Src,_List}, Used) ->
+ mark_used(Lbl, Used);
ulbl(_, Used) -> Used.
mark_used({f,0}, Used) -> Used;
diff --git a/lib/compiler/src/beam_split.erl b/lib/compiler/src/beam_split.erl
index cacaaebffe..688bba9a94 100644
--- a/lib/compiler/src/beam_split.erl
+++ b/lib/compiler/src/beam_split.erl
@@ -49,6 +49,13 @@ split_block([{set,[R],As,{bif,N,{f,Lbl}=Fail}}|Is], Bl, Acc) when Lbl =/= 0 ->
split_block([{set,[R],As,{alloc,Live,{gc_bif,N,{f,Lbl}=Fail}}}|Is], Bl, Acc)
when Lbl =/= 0 ->
split_block(Is, [], [{gc_bif,N,Fail,Live,As,R}|make_block(Bl, Acc)]);
+split_block([{set,[D],[S|Puts],{alloc,R,{put_map,Op,{f,Lbl}=Fail}}}|Is],
+ Bl, Acc) when Lbl =/= 0 ->
+ split_block(Is, [], [{put_map,Fail,Op,S,D,R,{list,Puts}}|
+ make_block(Bl, Acc)]);
+split_block([{set,Gets,[S],{get_map_elements,{f,Lbl}=Fail}}|Is], Bl, Acc)
+ when Lbl =/= 0 ->
+ split_block(Is, [], [{get_map_elements,Fail,S,{list,Gets}}|make_block(Bl, Acc)]);
split_block([{set,[R],[],{'catch',L}}|Is], Bl, Acc) ->
split_block(Is, [], [{'catch',R,L}|make_block(Bl, Acc)]);
split_block([{set,[],[],{line,_}=Line}|Is], Bl, Acc) ->
diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl
index 3ec57a67da..58c0f765ae 100644
--- a/lib/compiler/src/beam_type.erl
+++ b/lib/compiler/src/beam_type.erl
@@ -142,6 +142,12 @@ simplify_float(Is0, Ts0) ->
throw:not_possible -> not_possible
end.
+simplify_float_1([{set,[],[],fclearerror}|Is], Ts, Rs, Acc) ->
+ simplify_float_1(Is, Ts, Rs, clearerror(Acc));
+simplify_float_1([{set,[],[],fcheckerror}|Is], Ts, Rs, Acc) ->
+ simplify_float_1(Is, Ts, Rs, checkerror(Acc));
+simplify_float_1([{set,[{fr,_}],_,_}=I|Is], Ts, Rs, Acc) ->
+ simplify_float_1(Is, Ts, Rs, [I|Acc]);
simplify_float_1([{set,[D0],[A0],{alloc,_,{gc_bif,'-',{f,0}}}}=I|Is]=Is0,
Ts0, Rs0, Acc0) ->
case tdb_find(A0, Ts0) of
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index e9911fefd9..8ca368c167 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -152,6 +152,7 @@ bif_to_test(is_function, [_]=Ops, Fail) -> {test,is_function,Fail,Ops};
bif_to_test(is_function, [_,_]=Ops, Fail) -> {test,is_function2,Fail,Ops};
bif_to_test(is_integer, [_]=Ops, Fail) -> {test,is_integer,Fail,Ops};
bif_to_test(is_list, [_]=Ops, Fail) -> {test,is_list,Fail,Ops};
+bif_to_test(is_map, [_]=Ops, Fail) -> {test,is_map,Fail,Ops};
bif_to_test(is_number, [_]=Ops, Fail) -> {test,is_number,Fail,Ops};
bif_to_test(is_pid, [_]=Ops, Fail) -> {test,is_pid,Fail,Ops};
bif_to_test(is_port, [_]=Ops, Fail) -> {test,is_port,Fail,Ops};
@@ -184,6 +185,7 @@ is_pure_test({test,is_lt,_,[_,_]}) -> true;
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,_,[_,{list,_}]}) -> true;
is_pure_test({test,Op,_,Ops}) ->
erl_internal:new_type_test(Op, length(Ops)).
@@ -746,6 +748,8 @@ live_opt([{try_end,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{loop_rec_end,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
+live_opt([{wait_timeout,_,nil}=I|Is], Regs, D, Acc) ->
+ live_opt(Is, Regs, D, [I|Acc]);
live_opt([{wait_timeout,_,{Tag,_}}=I|Is], Regs, D, Acc) when Tag =/= x ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{line,_}=I|Is], Regs, D, Acc) ->
@@ -759,6 +763,12 @@ live_opt([{allocate,_,Live}=I|Is], _, D, Acc) ->
live_opt(Is, live_call(Live), D, [I|Acc]);
live_opt([{allocate_heap,_,_,Live}=I|Is], _, D, Acc) ->
live_opt(Is, live_call(Live), D, [I|Acc]);
+live_opt([{'%',_}=I|Is], Regs, D, Acc) ->
+ live_opt(Is, Regs, D, [I|Acc]);
+live_opt([{recv_set,_}=I|Is], Regs, D, Acc) ->
+ live_opt(Is, Regs, D, [I|Acc]);
+live_opt([{recv_mark,_}=I|Is], Regs, D, Acc) ->
+ live_opt(Is, Regs, D, [I|Acc]);
live_opt([], _, _, Acc) -> Acc.
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 48f5135aca..9d5563d13b 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -213,9 +213,12 @@ validate_error_1(Error, Module, Name, Ar) ->
{{Module,Name,Ar},
{internal_error,'_',{Error,erlang:get_stacktrace()}}}.
+-type index() :: non_neg_integer().
+-type reg_tab() :: gb_trees:tree(index(), 'none' | {'value', _}).
+
-record(st, %Emulation state
- {x=init_regs(0, term) :: gb_tree(), %x register info.
- y=init_regs(0, initialized) :: gb_tree(), %y register info.
+ {x=init_regs(0, term) :: reg_tab(),%x register info.
+ y=init_regs(0, initialized) :: reg_tab(),%y register info.
f=init_fregs(), %
numy=none, %Number of y registers.
h=0, %Available heap size.
@@ -227,11 +230,16 @@ validate_error_1(Error, Module, Name, Ar) ->
setelem=false %Previous instruction was setelement/3.
}).
+-type label() :: integer().
+-type label_set() :: gb_sets:set(label()).
+-type branched_tab() :: gb_trees:tree(label(), #st{}).
+-type ft_tab() :: gb_trees:tree().
+
-record(vst, %Validator state
{current=none :: #st{} | 'none', %Current state
- branched=gb_trees:empty() :: gb_tree(), %States at jumps
- labels=gb_sets:empty() :: gb_set(), %All defined labels
- ft=gb_trees:empty() :: gb_tree() %Some other functions
+ branched=gb_trees:empty() :: branched_tab(), %States at jumps
+ labels=gb_sets:empty() :: label_set(), %All defined labels
+ ft=gb_trees:empty() :: ft_tab() %Some other functions
% in the module (those that start with bs_start_match2).
}).
@@ -574,6 +582,7 @@ valfun_4({apply,Live}, Vst) ->
valfun_4({apply_last,Live,_}, Vst) ->
tail_call(apply, Live+2, Vst);
valfun_4({call_fun,Live}, Vst) ->
+ validate_src([{x,Live}], Vst),
call('fun', Live+1, Vst);
valfun_4({call,Live,Func}, Vst) ->
call(Func, Live, Vst);
@@ -769,6 +778,10 @@ valfun_4({test,is_nonempty_list,{f,Lbl},[Cons]}, Vst) ->
valfun_4({test,test_arity,{f,Lbl},[Tuple,Sz]}, Vst) when is_integer(Sz) ->
assert_type(tuple, Tuple, Vst),
set_type_reg({tuple,Sz}, Tuple, branch_state(Lbl, Vst));
+valfun_4({test,has_map_fields,{f,Lbl},Src,{list,List}}, Vst) ->
+ validate_src([Src], Vst),
+ assert_strict_literal_termorder(List),
+ branch_state(Lbl, Vst);
valfun_4({test,_Op,{f,Lbl},Src}, Vst) ->
validate_src(Src, Vst),
branch_state(Lbl, Vst);
@@ -865,9 +878,38 @@ valfun_4({bs_final,{f,Fail},Dst}, Vst0) ->
valfun_4({bs_final2,Src,Dst}, Vst0) ->
assert_term(Src, Vst0),
set_type_reg(binary, Dst, Vst0);
+%% Map instructions.
+valfun_4({put_map_assoc,{f,Fail},Src,Dst,Live,{list,List}}, Vst) ->
+ verify_put_map(Fail, Src, Dst, Live, List, Vst);
+valfun_4({put_map_exact,{f,Fail},Src,Dst,Live,{list,List}}, Vst) ->
+ verify_put_map(Fail, Src, Dst, Live, List, Vst);
+valfun_4({get_map_elements,{f,Fail},Src,{list,List}}, Vst) ->
+ verify_get_map(Fail, Src, List, Vst);
valfun_4(_, _) ->
error(unknown_instruction).
+verify_get_map(Fail, Src, List, Vst0) ->
+ assert_term(Src, Vst0),
+ Vst1 = branch_state(Fail, Vst0),
+ Lits = mmap(fun(L,_R) -> [L] end, List),
+ assert_strict_literal_termorder(Lits),
+ verify_get_map_pair(List,Vst0,Vst1).
+
+verify_get_map_pair([],_,Vst) -> Vst;
+verify_get_map_pair([Src,Dst|Vs],Vst0,Vsti) ->
+ assert_term(Src, Vst0),
+ verify_get_map_pair(Vs,Vst0,set_type_reg(term,Dst,Vsti)).
+
+verify_put_map(Fail, Src, Dst, Live, List, Vst0) ->
+ verify_live(Live, Vst0),
+ verify_y_init(Vst0),
+ foreach(fun (Term) -> assert_term(Term, Vst0) end, List),
+ assert_term(Src, Vst0),
+ Vst1 = heap_alloc(0, Vst0),
+ Vst2 = branch_state(Fail, Vst1),
+ Vst = prune_x_regs(Live, Vst2),
+ set_type_reg(term, Dst, Vst).
+
%%
%% Common code for validating bs_get* instructions.
%%
@@ -888,7 +930,7 @@ validate_bs_skip_utf(Fail, Ctx, Live, Vst0) ->
branch_state(Fail, Vst).
%%
-%% Special state handling for setelement/3 and the set_tuple_element/3 instruction.
+%% Special state handling for setelement/3 and set_tuple_element/3 instructions.
%% A possibility for garbage collection must not occur between setelement/3 and
%% set_tuple_element/3.
%%
@@ -1078,6 +1120,39 @@ assert_freg_set({fr,Fr}=Freg, #vst{current=#st{f=Fregs}})
end;
assert_freg_set(Fr, _) -> error({bad_source,Fr}).
+%%% Maps
+
+%% ensure that a list of literals has a strict
+%% ascending term order (also meaning unique literals)
+assert_strict_literal_termorder(Ls) ->
+ Vs = lists:map(fun (L) -> get_literal(L) end, Ls),
+ case check_strict_value_termorder(Vs) of
+ true -> ok;
+ false -> error({not_strict_order, Ls})
+ end.
+
+%% usage:
+%% mmap(fun(A,B) -> [{A,B}] end, [1,2,3,4]),
+%% [{1,2},{3,4}]
+
+mmap(F,List) ->
+ {arity,Ar} = erlang:fun_info(F,arity),
+ mmap(F,Ar,List).
+mmap(_F,_,[]) -> [];
+mmap(F,Ar,List) ->
+ {Hd,Tl} = lists:split(Ar,List),
+ apply(F,Hd) ++ mmap(F,Ar,Tl).
+
+check_strict_value_termorder([]) -> true;
+check_strict_value_termorder([_]) -> true;
+check_strict_value_termorder([V1,V2]) ->
+ erts_internal:cmp_term(V1,V2) < 0;
+check_strict_value_termorder([V1,V2|Vs]) ->
+ case erts_internal:cmp_term(V1,V2) < 0 of
+ true -> check_strict_value_termorder([V2|Vs]);
+ false -> false
+ end.
+
%%%
%%% Binary matching.
%%%
@@ -1313,6 +1388,7 @@ assert_term(Src, Vst) ->
%% number Integer or Float of unknown value
%%
+
assert_type(WantedType, Term, Vst) ->
assert_type(WantedType, get_term_type(Term, Vst)).
@@ -1328,7 +1404,6 @@ assert_type({tuple_element,I}, {tuple,Sz})
assert_type(Needed, Actual) ->
error({bad_type,{needed,Needed},{actual,Actual}}).
-
%% upgrade_tuple_type(NewTupleType, OldType) -> TupleType.
%% upgrade_tuple_type/2 is used when linear code finds out more and
%% more information about a tuple type, so that the type gets more
@@ -1409,6 +1484,15 @@ get_term_type_1({y,Y}=Reg, #vst{current=#st{y=Ys}}) when is_integer(Y) ->
get_term_type_1(Src, _) -> error({bad_source,Src}).
+%% get_literal(Src) -> literal_value().
+get_literal(nil) -> [];
+get_literal({atom,A}) when is_atom(A) -> A;
+get_literal({float,F}) when is_float(F) -> F;
+get_literal({integer,I}) when is_integer(I) -> I;
+get_literal({literal,L}) -> L;
+get_literal(T) -> error({not_literal,T}).
+
+
branch_arities([], _, #vst{}=Vst) -> Vst;
branch_arities([Sz,{f,L}|T], Tuple, #vst{current=St}=Vst0)
when is_integer(Sz) ->
diff --git a/lib/compiler/src/beam_z.erl b/lib/compiler/src/beam_z.erl
index 8c6b0c916d..c2a6ef604e 100644
--- a/lib/compiler/src/beam_z.erl
+++ b/lib/compiler/src/beam_z.erl
@@ -74,6 +74,22 @@ undo_rename({bs_init,F,{I,Extra,U,Flags},Live,[Sz,Src],Dst}) ->
{I,F,Sz,Extra,Live,U,Src,Flags,Dst};
undo_rename({bs_init,_,bs_init_writable=I,_,_,_}) ->
I;
+undo_rename({put_map,Fail,assoc,S,D,R,L}) ->
+ {put_map_assoc,Fail,S,D,R,L};
+undo_rename({put_map,Fail,exact,S,D,R,L}) ->
+ {put_map_exact,Fail,S,D,R,L};
+undo_rename({test,has_map_fields,Fail,[Src|List]}) ->
+ {test,has_map_fields,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
+undo_rename({get_map_elements,Fail,Src,{list, List}}) ->
+ {get_map_elements,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
undo_rename({select,I,Reg,Fail,List}) ->
{I,Reg,Fail,{list,List}};
undo_rename(I) -> I.
+
+%% to_typed_literal(Arg)
+%% transform Arg to specific literal i.e. float | integer | atom if applicable
+to_typed_literal({literal, V}) when is_float(V) -> {float, V};
+to_typed_literal({literal, V}) when is_atom(V) -> {atom, V};
+to_typed_literal({literal, V}) when is_integer(V) -> {integer, V};
+to_typed_literal({literal, []}) -> nil;
+to_typed_literal(V) -> V.
diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl
index 4b74d60e9f..9d6768b157 100644
--- a/lib/compiler/src/cerl.erl
+++ b/lib/compiler/src/cerl.erl
@@ -120,15 +120,23 @@
update_c_bitstr/5, update_c_bitstr/6, ann_c_bitstr/5,
ann_c_bitstr/6, is_c_bitstr/1, bitstr_val/1, bitstr_size/1,
bitstr_bitsize/1, bitstr_unit/1, bitstr_type/1,
- bitstr_flags/1]).
-
--export_type([c_binary/0, c_call/0, c_clause/0, c_cons/0, c_fun/0, c_literal/0,
- c_module/0, c_tuple/0, c_values/0, c_var/0, cerl/0, var_name/0]).
-
-%%
-%% needed by the include file below -- do not move
-%%
--type var_name() :: integer() | atom() | {atom(), integer()}.
+ bitstr_flags/1,
+
+ %% keep map exports here for now
+ map_es/1,
+ map_arg/1,
+ update_c_map/3,
+ c_map/1, is_c_map_empty/1,
+ ann_c_map/2, ann_c_map/3,
+ map_pair_op/1,map_pair_key/1,map_pair_val/1,
+ update_c_map_pair/4,
+ c_map_pair/2,
+ ann_c_map_pair/4
+ ]).
+
+-export_type([c_binary/0, c_bitstr/0, c_call/0, c_clause/0, c_cons/0, c_fun/0,
+ c_literal/0, c_map/0, c_map_pair/0, c_module/0, c_tuple/0,
+ c_values/0, c_var/0, cerl/0, var_name/0]).
-include("core_parse.hrl").
@@ -145,6 +153,8 @@
-type c_let() :: #c_let{}.
-type c_letrec() :: #c_letrec{}.
-type c_literal() :: #c_literal{}.
+-type c_map() :: #c_map{}.
+-type c_map_pair() :: #c_map_pair{}.
-type c_module() :: #c_module{}.
-type c_primop() :: #c_primop{}.
-type c_receive() :: #c_receive{}.
@@ -155,11 +165,14 @@
-type c_var() :: #c_var{}.
-type cerl() :: c_alias() | c_apply() | c_binary() | c_bitstr()
- | c_call() | c_case() | c_catch() | c_clause() | c_cons()
+ | c_call() | c_case() | c_catch() | c_clause() | c_cons()
| c_fun() | c_let() | c_letrec() | c_literal()
- | c_module() | c_primop() | c_receive() | c_seq()
+ | c_map() | c_map_pair()
+ | c_module() | c_primop() | c_receive() | c_seq()
| c_try() | c_tuple() | c_values() | c_var().
+-type var_name() :: integer() | atom() | {atom(), integer()}.
+
%% =====================================================================
%% Representation (general)
%%
@@ -191,13 +204,15 @@
%% <td>call</td>
%% <td>case</td>
%% <td>catch</td>
-%% </tr><tr>
%% <td>clause</td>
+%% </tr><tr>
%% <td>cons</td>
%% <td>fun</td>
%% <td>let</td>
%% <td>letrec</td>
%% <td>literal</td>
+%% <td>map</td>
+%% <td>map_pair</td>
%% <td>module</td>
%% </tr><tr>
%% <td>primop</td>
@@ -248,10 +263,10 @@
%% @see subtrees/1
%% @see meta/1
--type ctype() :: 'alias' | 'apply' | 'binary' | 'bitrst' | 'call' | 'case'
- | 'catch' | 'clause' | 'cons' | 'fun' | 'let' | 'letrec'
- | 'literal' | 'module' | 'primop' | 'receive' | 'seq' | 'try'
- | 'tuple' | 'values' | 'var'.
+-type ctype() :: 'alias' | 'apply' | 'binary' | 'bitrst' | 'call' | 'case'
+ | 'catch' | 'clause' | 'cons' | 'fun' | 'let' | 'letrec'
+ | 'literal' | 'map' | 'map_pair' | 'module' | 'primop'
+ | 'receive' | 'seq' | 'try' | 'tuple' | 'values' | 'var'.
-spec type(cerl()) -> ctype().
@@ -268,6 +283,8 @@ type(#c_fun{}) -> 'fun';
type(#c_let{}) -> 'let';
type(#c_letrec{}) -> letrec;
type(#c_literal{}) -> literal;
+type(#c_map{}) -> map;
+type(#c_map_pair{}) -> map_pair;
type(#c_module{}) -> module;
type(#c_primop{}) -> primop;
type(#c_receive{}) -> 'receive';
@@ -1558,6 +1575,104 @@ ann_make_list(_, [], Node) ->
%% ---------------------------------------------------------------------
+%% maps
+
+-spec map_es(c_map()) -> [c_map_pair()].
+
+map_es(#c_map{es = Es}) ->
+ Es.
+
+-spec map_arg(c_map()) -> c_map() | c_literal().
+
+map_arg(#c_map{arg=M}) ->
+ M.
+
+-spec c_map([c_map_pair()]) -> c_map().
+
+c_map(Pairs) ->
+ #c_map{es=Pairs}.
+
+-spec is_c_map_empty(c_map() | c_literal()) -> boolean().
+
+is_c_map_empty(#c_map{ es=[] }) -> true;
+is_c_map_empty(#c_literal{val=M}) when is_map(M),map_size(M) =:= 0 -> true;
+is_c_map_empty(_) -> false.
+
+-spec ann_c_map([term()], [cerl()]) -> c_map() | c_literal().
+
+ann_c_map(As,Es) ->
+ ann_c_map(As, #c_literal{val=#{}}, Es).
+
+-spec ann_c_map([term()], c_map() | c_literal(), [c_map_pair()]) -> c_map() | c_literal().
+
+ann_c_map(As,#c_literal{val=Mval}=M,Es) when is_map(Mval), map_size(Mval) =:= 0 ->
+ Pairs = [[Ck,Cv]||#c_map_pair{key=Ck,val=Cv}<-Es],
+ IsLit = lists:foldl(fun(Pair,Res) ->
+ Res andalso is_lit_list(Pair)
+ end, true, Pairs),
+ Fun = fun(Pair) -> [K,V] = lit_list_vals(Pair), {K,V} end,
+ case IsLit of
+ false ->
+ #c_map{arg=M, es=Es, anno=As };
+ true ->
+ #c_literal{anno=As, val=maps:from_list(lists:map(Fun, Pairs))}
+ end;
+ann_c_map(As,#c_literal{val=M},Es) when is_map(M) ->
+ fold_map_pairs(As,Es,M);
+ann_c_map(As,M,Es) ->
+ #c_map{arg=M, es=Es, anno=As }.
+
+fold_map_pairs(As,[],M) -> #c_literal{anno=As,val=M};
+%% M#{ K => V}
+fold_map_pairs(As,[#c_map_pair{op=#c_literal{val=assoc},key=Ck,val=Cv}=E|Es],M) ->
+ case is_lit_list([Ck,Cv]) of
+ true ->
+ [K,V] = lit_list_vals([Ck,Cv]),
+ fold_map_pairs(As,Es,maps:put(K,V,M));
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+%% M#{ K := V}
+fold_map_pairs(As,[#c_map_pair{op=#c_literal{val=exact},key=Ck,val=Cv}=E|Es],M) ->
+ case is_lit_list([Ck,Cv]) of
+ true ->
+ [K,V] = lit_list_vals([Ck,Cv]),
+ case maps:is_key(K,M) of
+ true -> fold_map_pairs(As,Es,maps:put(K,V,M));
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+fold_map_pairs(As,Es,M) ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=Es, anno=As }.
+
+%-spec update_c_map(c_map() | c_literal(), [c_map_pair()]) -> c_map() | c_literal().
+
+update_c_map(Old,M,Es) ->
+ #c_map{arg=M, es = Es, anno = get_ann(Old)}.
+
+map_pair_key(#c_map_pair{key=K}) -> K.
+map_pair_val(#c_map_pair{val=V}) -> V.
+map_pair_op(#c_map_pair{op=Op}) -> Op.
+
+-spec c_map_pair(cerl(), cerl()) -> c_map_pair().
+
+c_map_pair(Key,Val) ->
+ #c_map_pair{op=#c_literal{val=assoc},key=Key,val=Val}.
+
+-spec ann_c_map_pair([term()], cerl(), cerl(), cerl()) ->
+ c_map_pair().
+
+ann_c_map_pair(As,Op,K,V) ->
+ #c_map_pair{op=Op, key = K, val=V, anno = As}.
+
+update_c_map_pair(Old,Op,K,V) ->
+ #c_map_pair{op=Op, key=K, val=V, anno = get_ann(Old)}.
+
+
+%% ---------------------------------------------------------------------
%% @spec c_tuple(Elements::[cerl()]) -> cerl()
%%
@@ -2945,6 +3060,10 @@ pat_vars(Node, Vs) ->
pat_vars(cons_hd(Node), pat_vars(cons_tl(Node), Vs));
tuple ->
pat_list_vars(tuple_es(Node), Vs);
+ map ->
+ pat_list_vars(map_es(Node), Vs);
+ map_pair ->
+ pat_list_vars([map_pair_op(Node),map_pair_key(Node),map_pair_val(Node)],Vs);
binary ->
pat_list_vars(binary_segments(Node), Vs);
bitstr ->
@@ -3803,7 +3922,6 @@ data_type(#c_cons{}) ->
data_type(#c_tuple{}) ->
tuple.
-
%% @spec data_es(Node::cerl()) -> [cerl()]
%%
%% @doc Returns the list of subtrees of a data constructor node. If
@@ -3835,7 +3953,6 @@ data_es(#c_cons{hd = H, tl = T}) ->
data_es(#c_tuple{es = Es}) ->
Es.
-
%% @spec data_arity(Node::cerl()) -> integer()
%%
%% @doc Returns the number of subtrees of a data constructor
@@ -3892,7 +4009,6 @@ ann_make_data(As, {atomic, V}, []) -> #c_literal{val = V, anno = As};
ann_make_data(As, cons, [H, T]) -> ann_c_cons(As, H, T);
ann_make_data(As, tuple, Es) -> ann_c_tuple(As, Es).
-
%% @spec update_data(Old::cerl(), Type::dtype(),
%% Elements::[cerl()]) -> cerl()
%% @see make_data/2
@@ -4022,6 +4138,10 @@ subtrees(T) ->
[[cons_hd(T)], [cons_tl(T)]];
tuple ->
[tuple_es(T)];
+ map ->
+ [map_es(T)];
+ map_pair ->
+ [[map_pair_op(T)],[map_pair_key(T)],[map_pair_val(T)]];
'let' ->
[let_vars(T), [let_arg(T)], [let_body(T)]];
seq ->
@@ -4143,6 +4263,9 @@ ann_make_tree(As, bitstr, [[V],[S],[U],[T],[Fs]]) ->
ann_c_bitstr(As, V, S, U, T, Fs);
ann_make_tree(As, cons, [[H], [T]]) -> ann_c_cons(As, H, T);
ann_make_tree(As, tuple, [Es]) -> ann_c_tuple(As, Es);
+ann_make_tree(As, map, [Es]) -> ann_c_map(As, Es);
+ann_make_tree(As, map, [[A], Es]) -> ann_c_map(As, A, Es);
+ann_make_tree(As, map_pair, [[Op], [K], [V]]) -> ann_c_map_pair(As, Op, K, V);
ann_make_tree(As, 'let', [Vs, [A], [B]]) -> ann_c_let(As, Vs, A, B);
ann_make_tree(As, seq, [[A], [B]]) -> ann_c_seq(As, A, B);
ann_make_tree(As, apply, [[Op], Es]) -> ann_c_apply(As, Op, Es);
@@ -4272,12 +4395,8 @@ meta_1(cons, Node) ->
%% we get exactly one element, we generate a 'c_cons' call
%% instead of 'make_list' to reconstruct the node.
case split_list(Node) of
- {[H], none} ->
- meta_call(c_cons, [meta(H), meta(c_nil())]);
{[H], Node1} ->
meta_call(c_cons, [meta(H), meta(Node1)]);
- {L, none} ->
- meta_call(make_list, [make_list(meta_list(L))]);
{L, Node1} ->
meta_call(make_list,
[make_list(meta_list(L)), meta(Node1)])
@@ -4364,8 +4483,6 @@ split_list(Node, L) ->
case type(Node) of
cons when A =:= [] ->
split_list(cons_tl(Node), [cons_hd(Node) | L]);
- nil when A =:= [] ->
- {lists:reverse(L), none};
_ ->
{lists:reverse(L), Node}
end.
diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl
index 99fa8dd9d5..87bd47c08b 100644
--- a/lib/compiler/src/cerl_clauses.erl
+++ b/lib/compiler/src/cerl_clauses.erl
@@ -354,6 +354,29 @@ match(P, E, Bs) ->
{false, Bs}
end
end;
+ map ->
+ %% The most we can do is to say "definitely no match" if a
+ %% map pattern is matched against non-map data.
+ case E of
+ any ->
+ {false, Bs};
+ _ ->
+ case type(E) of
+ literal ->
+ case is_map(concrete(E)) of
+ false ->
+ none;
+ true ->
+ {false, Bs}
+ end;
+ cons ->
+ none;
+ tuple ->
+ none;
+ _ ->
+ {false, Bs}
+ end
+ end;
_ ->
match_1(P, E, Bs)
end.
diff --git a/lib/compiler/src/cerl_inline.erl b/lib/compiler/src/cerl_inline.erl
index c6de63c69f..75740e8b9d 100644
--- a/lib/compiler/src/cerl_inline.erl
+++ b/lib/compiler/src/cerl_inline.erl
@@ -42,7 +42,7 @@
bitstr_flags/1, binary_segments/1, update_c_alias/3,
update_c_apply/3, update_c_binary/2, update_c_bitstr/6,
update_c_call/4, update_c_case/3, update_c_catch/2,
- update_c_clause/4, c_fun/2, c_int/1, c_let/3,
+ update_c_clause/4, c_fun/2, c_int/1, c_let/3, ann_c_let/4,
update_c_let/4, update_c_letrec/3, update_c_module/5,
update_c_primop/3, update_c_receive/4, update_c_seq/3,
c_seq/2, update_c_try/6, c_tuple/1, update_c_values/2,
@@ -51,7 +51,7 @@
catch_body/1, clause_body/1, clause_guard/1,
clause_pats/1, clause_vars/1, concrete/1, cons_hd/1,
cons_tl/1, data_arity/1, data_es/1, data_type/1,
- fun_body/1, fun_vars/1, get_ann/1, int_val/1,
+ fname_arity/1, fun_body/1, fun_vars/1, get_ann/1, int_val/1,
is_c_atom/1, is_c_cons/1, is_c_fname/1, is_c_int/1,
is_c_list/1, is_c_seq/1, is_c_tuple/1, is_c_var/1,
is_data/1, is_literal/1, is_literal_term/1, let_arg/1,
@@ -63,7 +63,11 @@
receive_clauses/1, receive_timeout/1, seq_arg/1,
seq_body/1, set_ann/2, try_arg/1, try_body/1, try_vars/1,
try_evars/1, try_handler/1, tuple_es/1, tuple_arity/1,
- type/1, values_es/1, var_name/1]).
+ type/1, values_es/1, var_name/1,
+ map_arg/1, map_es/1, update_c_map/3,
+ update_c_map_pair/4,
+ map_pair_op/1, map_pair_key/1, map_pair_val/1
+ ]).
-import(lists, [foldl/3, foldr/3, mapfoldl/3, reverse/1]).
@@ -128,6 +132,8 @@ weight(call) -> 3; % Assume remote-calls as efficient as `apply'.
weight(primop) -> 2; % Assume more efficient than `apply'.
weight(binary) -> 4; % Initialisation base cost.
weight(bitstr) -> 3; % Coding/decoding a value; like a primop.
+weight(map) -> 4; % Initialisation base cost.
+weight(map_pair) -> 3; % Coding/decoding a value; like a primop.
weight(module) -> 1. % Like a letrec with a constant body
%% These "reference" structures are used for variables and function
@@ -333,6 +339,8 @@ i(E, Ctxt, Ren, Env, S0) ->
i_catch(E, Ctxt, Ren, Env, S);
binary ->
i_binary(E, Ren, Env, S);
+ map ->
+ i_map(E, Ctxt, Ren, Env, S);
module ->
i_module(E, Ctxt, Ren, Env, S)
end
@@ -1022,8 +1030,17 @@ i_apply(E, Ctxt, Ren, Env, S) ->
visit_and_count_size(Opnd, S)
end,
S3, Opnds),
- N = apply_size(length(Es)),
- {update_c_apply(E, E1, Es), count_size(N, S4)}
+ Arity = length(Es),
+ E2 = case is_c_fname(E1) andalso length(Es) =/= fname_arity(E1) of
+ true ->
+ V = new_var(Env),
+ ann_c_let(get_ann(E), [V], E1,
+ update_c_apply(E, V, Es));
+ false ->
+ update_c_apply(E, E1, Es)
+ end,
+ N = apply_size(Arity),
+ {E2, count_size(N, S4)}
end.
apply_size(A) ->
@@ -1324,6 +1341,25 @@ i_bitstr(E, Ren, Env, S) ->
S3 = count_size(weight(bitstr), S2),
{update_c_bitstr(E, Val, Size, Unit, Type, Flags), S3}.
+i_map(E, Ctx, Ren, Env, S) ->
+ %% Visit the segments for value.
+ {M1, S1} = i(map_arg(E), value, Ren, Env, S),
+ {Es, S2} = mapfoldl(fun (E, S) ->
+ i_map_pair(E, Ctx, Ren, Env, S)
+ end, S1, map_es(E)),
+ S3 = count_size(weight(map), S2),
+ {update_c_map(E, M1,Es), S3}.
+
+i_map_pair(E, Ctx, Ren, Env, S) ->
+ %% It is not necessary to visit the Op and Key fields,
+ %% since these are always literals.
+ {Val, S1} = i(map_pair_val(E), Ctx, Ren, Env, S),
+ Op = map_pair_op(E),
+ Key = map_pair_key(E),
+ S2 = count_size(weight(map_pair), S1),
+ {update_c_map_pair(E, Op, Key, Val), S2}.
+
+
%% This is a simplified version of `i_pattern', for lists of parameter
%% variables only. It does not modify the state.
@@ -1383,6 +1419,16 @@ i_pattern(E, Ren, Env, Ren0, Env0, S) ->
S, binary_segments(E)),
S2 = count_size(weight(binary), S1),
{update_c_binary(E, Es), S2};
+ map ->
+ %% map patterns should not have args
+ M = map_arg(E),
+
+ {Es, S1} = mapfoldl(fun (E, S) ->
+ i_map_pair_pattern(E, Ren, Env, Ren0, Env0, S)
+ end,
+ S, map_es(E)),
+ S2 = count_size(weight(map), S1),
+ {update_c_map(E, M, Es), S2};
_ ->
case is_literal(E) of
true ->
@@ -1416,6 +1462,15 @@ i_bitstr_pattern(E, Ren, Env, Ren0, Env0, S) ->
S3 = count_size(weight(bitstr), S2),
{update_c_bitstr(E, Val, Size, Unit, Type, Flags), S3}.
+i_map_pair_pattern(E, Ren, Env, Ren0, Env0, S) ->
+ %% It is not necessary to visit the Op it is always a literal.
+ %% Same goes for Key
+ {Val, S1} = i_pattern(map_pair_val(E), Ren, Env, Ren0, Env0, S),
+ Op = map_pair_op(E), %% should be 'exact' literal
+ Key = map_pair_key(E),
+ S2 = count_size(weight(map_pair), S1),
+ {update_c_map_pair(E, Op, Key, Val), S2}.
+
%% ---------------------------------------------------------------------
%% Other central inlining functions
diff --git a/lib/compiler/src/cerl_trees.erl b/lib/compiler/src/cerl_trees.erl
index 1e3755025f..e53bdd4efb 100644
--- a/lib/compiler/src/cerl_trees.erl
+++ b/lib/compiler/src/cerl_trees.erl
@@ -55,7 +55,15 @@
update_c_let/4, update_c_letrec/3, update_c_module/5,
update_c_primop/3, update_c_receive/4, update_c_seq/3,
update_c_try/6, update_c_tuple/2, update_c_tuple_skel/2,
- update_c_values/2, values_es/1, var_name/1]).
+ update_c_values/2, values_es/1, var_name/1,
+
+ map_arg/1, map_es/1,
+ ann_c_map/3,
+ update_c_map/3,
+ map_pair_key/1,map_pair_val/1,map_pair_op/1,
+ ann_c_map_pair/4,
+ update_c_map_pair/4
+ ]).
%% ---------------------------------------------------------------------
@@ -129,6 +137,12 @@ map_1(F, T) ->
map(F, cons_tl(T)));
tuple ->
update_c_tuple_skel(T, map_list(F, tuple_es(T)));
+ map ->
+ update_c_map(T, map(F, map_arg(T)), map_list(F, map_es(T)));
+ map_pair ->
+ update_c_map_pair(T, map(F, map_pair_op(T)),
+ map(F, map_pair_key(T)),
+ map(F, map_pair_val(T)));
'let' ->
update_c_let(T, map_list(F, let_vars(T)),
map(F, let_arg(T)),
@@ -235,6 +249,14 @@ fold_1(F, S, T) ->
fold(F, fold(F, S, cons_hd(T)), cons_tl(T));
tuple ->
fold_list(F, S, tuple_es(T));
+ map ->
+ fold_list(F, S, map_es(T));
+ map_pair ->
+ fold(F,
+ fold(F,
+ fold(F, S, map_pair_op(T)),
+ map_pair_key(T)),
+ map_pair_val(T));
'let' ->
fold(F, fold(F, fold_list(F, S, let_vars(T)),
let_arg(T)),
@@ -349,6 +371,15 @@ mapfold(F, S0, T) ->
tuple ->
{Ts, S1} = mapfold_list(F, S0, tuple_es(T)),
F(update_c_tuple_skel(T, Ts), S1);
+ map ->
+ {M , S1} = mapfold(F, S0, map_arg(T)),
+ {Ts, S2} = mapfold_list(F, S1, map_es(T)),
+ F(update_c_map(T, M, Ts), S2);
+ map_pair ->
+ {Op, S1} = mapfold(F, S0, map_pair_op(T)),
+ {Key, S2} = mapfold(F, S1, map_pair_key(T)),
+ {Val, S3} = mapfold(F, S2, map_pair_val(T)),
+ F(update_c_map_pair(T,Op,Key,Val), S3);
'let' ->
{Vs, S1} = mapfold_list(F, S0, let_vars(T)),
{A, S2} = mapfold(F, S1, let_arg(T)),
@@ -488,6 +519,10 @@ variables(T, S) ->
variables(cons_tl(T), S));
tuple ->
vars_in_list(tuple_es(T), S);
+ map ->
+ vars_in_list(map_es(T), S);
+ map_pair ->
+ vars_in_list([map_pair_op(T),map_pair_key(T), map_pair_val(T)], S);
'let' ->
Vs = variables(let_body(T), S),
Vs1 = var_list_names(let_vars(T)),
@@ -688,6 +723,17 @@ label(T, N, Env) ->
{Ts, N1} = label_list(tuple_es(T), N, Env),
{As, N2} = label_ann(T, N1),
{ann_c_tuple_skel(As, Ts), N2};
+ map ->
+ {M, N1} = label(map_arg(T), N, Env),
+ {Ts, N2} = label_list(map_es(T), N1, Env),
+ {As, N3} = label_ann(T, N2),
+ {ann_c_map(As, M, Ts), N3};
+ map_pair ->
+ {Op, N1} = label(map_pair_op(T), N, Env),
+ {Val, N2} = label(map_pair_key(T), N1, Env),
+ {Key, N3} = label(map_pair_val(T), N2, Env),
+ {As, N4} = label_ann(T, N3),
+ {ann_c_map_pair(As,Op,Key,Val), N4};
'let' ->
{A, N1} = label(let_arg(T), N, Env),
{Vs, N2, Env1} = label_vars(let_vars(T), N1, Env),
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 47d446273b..c7d91070f6 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -230,12 +230,27 @@ format_error({undef_parse_transform,M}) ->
format_error({core_transform,M,R}) ->
io_lib:format("error in core transform '~s': ~tp", [M, R]);
format_error({crash,Pass,Reason}) ->
- io_lib:format("internal error in ~p;\ncrash reason: ~tp", [Pass,Reason]);
+ io_lib:format("internal error in ~p;\ncrash reason: ~ts", [Pass,format_error_reason(Reason)]);
format_error({bad_return,Pass,Reason}) ->
- io_lib:format("internal error in ~p;\nbad return value: ~tp", [Pass,Reason]);
+ io_lib:format("internal error in ~p;\nbad return value: ~ts", [Pass,format_error_reason(Reason)]);
format_error({module_name,Mod,Filename}) ->
- io_lib:format("Module name '~s' does not match file name '~ts'",
- [Mod,Filename]).
+ io_lib:format("Module name '~s' does not match file name '~ts'", [Mod,Filename]);
+format_error(reparsing_invalid_unicode) ->
+ "Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add \"%% coding: latin-1\" at the beginning of the file. Retrying with latin-1 encoding.".
+
+format_error_reason({Reason, Stack}) when is_list(Stack) ->
+ StackFun = fun
+ (escript, run, 2) -> true;
+ (escript, start, 1) -> true;
+ (init, start_it, 1) -> true;
+ (init, start_em, 1) -> true;
+ (_Mod, _Fun, _Arity) -> false
+ end,
+ FormatFun = fun (Term, _) -> io_lib:format("~tp", [Term]) end,
+ [io_lib:format("~tp", [Reason]),"\n\n",
+ lib:format_stacktrace(1, Stack, StackFun, FormatFun)];
+format_error_reason(Reason) ->
+ io_lib:format("~tp", [Reason]).
%% The compile state record.
-record(compile, {filename="" :: file:filename(),
@@ -417,6 +432,9 @@ pass(from_core) ->
pass(from_asm) ->
{".S",[?pass(beam_consult_asm)|asm_passes()]};
pass(asm) ->
+ %% TODO: remove 'asm' in 18.0
+ io:format("compile:file/2 option 'asm' has been deprecated and will be~n"
+ "removed in the 18.0 release. Use 'from_asm' instead.~n"),
pass(from_asm);
pass(from_beam) ->
{".beam",[?pass(read_beam_file)|binary_passes()]};
@@ -606,9 +624,11 @@ core_passes() ->
[{core_old_inliner,fun test_old_inliner/1,fun core_old_inliner/1},
{iff,doldinline,{listing,"oldinline"}},
?pass(core_fold_module),
+ {iff,dcorefold,{listing,"corefold"}},
{core_inline_module,fun test_core_inliner/1,fun core_inline_module/1},
{iff,dinline,{listing,"inline"}},
- {core_fold_after_inline,fun test_core_inliner/1,fun core_fold_module/1},
+ {core_fold_after_inlining,fun test_any_inliner/1,
+ fun core_fold_module_after_inlining/1},
?pass(core_transforms)]},
{iff,dcopt,{listing,"copt"}},
{iff,'to_core',{done,"core"}}]}
@@ -774,20 +794,59 @@ no_native_compilation(BeamFile, #compile{options=Opts0}) ->
_ -> false
end.
-parse_module(St) ->
- Opts = St#compile.options,
- Cwd = ".",
- IncludePath = [Cwd, St#compile.dir|inc_paths(Opts)],
- R = epp:parse_file(St#compile.ifile, IncludePath, pre_defs(Opts)),
+parse_module(St0) ->
+ case do_parse_module(utf8, St0) of
+ {ok,_}=Ret ->
+ Ret;
+ {error,_}=Ret ->
+ Ret;
+ {invalid_unicode,File,Line} ->
+ case do_parse_module(latin1, St0) of
+ {ok,St} ->
+ Es = [{File,[{Line,?MODULE,reparsing_invalid_unicode}]}],
+ {ok,St#compile{warnings=Es++St#compile.warnings}};
+ {error,St} ->
+ Es = [{File,[{Line,?MODULE,reparsing_invalid_unicode}]}],
+ {error,St#compile{errors=Es++St#compile.errors}}
+ end
+ end.
+
+do_parse_module(DefEncoding, #compile{ifile=File,options=Opts,dir=Dir}=St) ->
+ R = epp:parse_file(File,
+ [{includes,[".",Dir|inc_paths(Opts)]},
+ {macros,pre_defs(Opts)},
+ {default_encoding,DefEncoding},
+ extra]),
case R of
- {ok,Forms} ->
- Encoding = epp:read_encoding(St#compile.ifile),
- {ok,St#compile{code=Forms,encoding=Encoding}};
+ {ok,Forms,Extra} ->
+ Encoding = proplists:get_value(encoding, Extra),
+ case find_invalid_unicode(Forms, File) of
+ none ->
+ {ok,St#compile{code=Forms,encoding=Encoding}};
+ {invalid_unicode,_,_}=Ret ->
+ case Encoding of
+ none ->
+ Ret;
+ _ ->
+ {ok,St#compile{code=Forms,encoding=Encoding}}
+ end
+ end;
{error,E} ->
Es = [{St#compile.ifile,[{none,?MODULE,{epp,E}}]}],
{error,St#compile{errors=St#compile.errors ++ Es}}
end.
+find_invalid_unicode([H|T], File0) ->
+ case H of
+ {attribute,_,file,{File,_}} ->
+ find_invalid_unicode(T, File);
+ {error,{Line,file_io_server,invalid_unicode}} ->
+ {invalid_unicode,File0,Line};
+ _Other ->
+ find_invalid_unicode(T, File0)
+ end;
+find_invalid_unicode([], _) -> none.
+
parse_core(St) ->
case file:read_file(St#compile.ifile) of
{ok,Bin} ->
@@ -1130,6 +1189,12 @@ core_fold_module(#compile{code=Code0,options=Opts,warnings=Warns}=St) ->
{ok,Code,Ws} = sys_core_fold:module(Code0, Opts),
{ok,St#compile{code=Code,warnings=Warns ++ Ws}}.
+core_fold_module_after_inlining(#compile{code=Code0,options=Opts}=St) ->
+ %% Inlining may produce code that generates spurious warnings.
+ %% Ignore all warnings.
+ {ok,Code,_Ws} = sys_core_fold:module(Code0, Opts),
+ {ok,St#compile{code=Code}}.
+
test_old_inliner(#compile{options=Opts}) ->
%% The point of this test is to avoid loading the old inliner
%% if we know that it will not be used.
@@ -1148,6 +1213,9 @@ test_core_inliner(#compile{options=Opts}) ->
end, Opts)
end.
+test_any_inliner(St) ->
+ test_old_inliner(St) orelse test_core_inliner(St).
+
core_old_inliner(#compile{code=Code0,options=Opts}=St) ->
{ok,Code} = sys_core_inline:module(Code0, Opts),
{ok,St#compile{code=Code}}.
@@ -1613,7 +1681,7 @@ compile_beam(File0, _OutFile, Opts) ->
compile_asm(File0, _OutFile, Opts) ->
File = shorten_filename(File0),
- case file(File, [asm|make_erl_options(Opts)]) of
+ case file(File, [from_asm|make_erl_options(Opts)]) of
{ok,_Mod} -> ok;
Other -> Other
end.
diff --git a/lib/compiler/src/compiler.app.src b/lib/compiler/src/compiler.app.src
index 8775c84698..8f68915f8e 100644
--- a/lib/compiler/src/compiler.app.src
+++ b/lib/compiler/src/compiler.app.src
@@ -67,4 +67,6 @@
]},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","hipe-3.10.3","erts-6.0",
+ "crypto-3.3"]}]}.
diff --git a/lib/compiler/src/compiler.appup.src b/lib/compiler/src/compiler.appup.src
index 54a63833e6..fe273b269c 100644
--- a/lib/compiler/src/compiler.appup.src
+++ b/lib/compiler/src/compiler.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, compiler}]}],
+ [{<<".*">>,[{restart_application, compiler}]}]
+}.
diff --git a/lib/compiler/src/core_lib.erl b/lib/compiler/src/core_lib.erl
index 824be9ff7f..0d95971f91 100644
--- a/lib/compiler/src/core_lib.erl
+++ b/lib/compiler/src/core_lib.erl
@@ -59,7 +59,7 @@ is_lit_bin(Es) ->
%% Return the value of LitExpr.
-spec literal_value(cerl:c_literal() | cerl:c_binary() |
- cerl:c_cons() | cerl:c_tuple()) -> term().
+ cerl:c_map() | cerl:c_cons() | cerl:c_tuple()) -> term().
literal_value(#c_literal{val=V}) -> V;
literal_value(#c_binary{segments=Es}) ->
@@ -67,7 +67,14 @@ literal_value(#c_binary{segments=Es}) ->
literal_value(#c_cons{hd=H,tl=T}) ->
[literal_value(H)|literal_value(T)];
literal_value(#c_tuple{es=Es}) ->
- list_to_tuple(literal_value_list(Es)).
+ list_to_tuple(literal_value_list(Es));
+literal_value(#c_map{arg=Cm,es=Cmps}) ->
+ M = literal_value(Cm),
+ lists:foldl(fun(#c_map_pair{ key=Ck, val=Cv },Mi) ->
+ K = literal_value(Ck),
+ V = literal_value(Cv),
+ maps:put(K,V,Mi)
+ end, M, Cmps).
literal_value_list(Vals) -> [literal_value(V) || V <- Vals].
@@ -105,6 +112,10 @@ vu_expr(V, #c_cons{hd=H,tl=T}) ->
vu_expr(V, H) orelse vu_expr(V, T);
vu_expr(V, #c_tuple{es=Es}) ->
vu_expr_list(V, Es);
+vu_expr(V, #c_map{arg=M,es=Es}) ->
+ vu_expr(V, M) orelse vu_expr_list(V, Es);
+vu_expr(V, #c_map_pair{key=Key,val=Val}) ->
+ vu_expr_list(V, [Key,Val]);
vu_expr(V, #c_binary{segments=Ss}) ->
vu_seg_list(V, Ss);
vu_expr(V, #c_fun{vars=Vs,body=B}) ->
@@ -201,6 +212,8 @@ vu_pattern(V, #c_tuple{es=Es}, St) ->
vu_pattern_list(V, Es, St);
vu_pattern(V, #c_binary{segments=Ss}, St) ->
vu_pat_seg_list(V, Ss, St);
+vu_pattern(V, #c_map{es=Es}, St) ->
+ vu_map_pairs(V, Es, St);
vu_pattern(V, #c_alias{var=Var,pat=P}, St0) ->
case vu_pattern(V, Var, St0) of
{true,_}=St1 -> St1;
@@ -223,6 +236,13 @@ vu_pat_seg_list(V, Ss, St) ->
end
end, St, Ss).
+vu_map_pairs(V, [#c_map_pair{val=Pat}|T], St0) ->
+ case vu_pattern(V, Pat, St0) of
+ {true,_}=St -> St;
+ St -> vu_map_pairs(V, T, St)
+ end;
+vu_map_pairs(_, [], St) -> St.
+
-spec vu_var_list(cerl:var_name(), [cerl:c_var()]) -> boolean().
vu_var_list(V, Vs) ->
diff --git a/lib/compiler/src/core_lint.erl b/lib/compiler/src/core_lint.erl
index 67d37ff1fc..25df33a287 100644
--- a/lib/compiler/src/core_lint.erl
+++ b/lib/compiler/src/core_lint.erl
@@ -254,6 +254,10 @@ gexpr(#c_cons{hd=H,tl=T}, Def, _Rt, St) ->
gexpr_list([H,T], Def, St);
gexpr(#c_tuple{es=Es}, Def, _Rt, St) ->
gexpr_list(Es, Def, St);
+gexpr(#c_map{es=Es}, Def, _Rt, St) ->
+ gexpr_list(Es, Def, St);
+gexpr(#c_map_pair{key=K,val=V}, Def, _Rt, St) ->
+ gexpr_list([K,V], Def, St);
gexpr(#c_binary{segments=Ss}, Def, _Rt, St) ->
gbitstr_list(Ss, Def, St);
gexpr(#c_seq{arg=Arg,body=B}, Def, Rt, St0) ->
@@ -263,10 +267,21 @@ gexpr(#c_let{vars=Vs,arg=Arg,body=B}, Def, Rt, St0) ->
St1 = gbody(Arg, Def, let_varcount(Vs), St0), %This is a guard body
{Lvs,St2} = variable_list(Vs, St1),
gbody(B, union(Lvs, Def), Rt, St2);
-gexpr(#c_call{module=#c_literal{val=erlang},
- name=#c_literal{},
- args=As}, Def, 1, St) ->
- gexpr_list(As, Def, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=is_record},
+ args=[Arg,#c_literal{val=Tag},#c_literal{val=Size}]},
+ Def, 1, St) when is_atom(Tag), is_integer(Size) ->
+ gexpr(Arg, Def, 1, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=is_record}},
+ _Def, 1, St) ->
+ add_error({illegal_guard,St#lint.func}, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=Name},args=As},
+ Def, 1, St) when is_atom(Name) ->
+ case is_guard_bif(Name, length(As)) of
+ true ->
+ gexpr_list(As, Def, St);
+ false ->
+ add_error({illegal_guard,St#lint.func}, St)
+ end;
gexpr(#c_primop{name=#c_literal{val=A},args=As}, Def, _Rt, St0) when is_atom(A) ->
gexpr_list(As, Def, St0);
gexpr(#c_try{arg=E,vars=[#c_var{name=X}],body=#c_var{name=X},
@@ -278,6 +293,7 @@ gexpr(#c_case{arg=Arg,clauses=Cs}, Def, Rt, St0) ->
St1 = gbody(Arg, Def, PatCount, St0),
clauses(Cs, Def, PatCount, Rt, St1);
gexpr(_Core, _, _, St) ->
+ %%io:fwrite("clint gexpr: ~p~n", [_Core]),
add_error({illegal_guard,St#lint.func}, St).
%% gexpr_list([Expr], Defined, State) -> State.
@@ -293,6 +309,14 @@ gbitstr_list(Es, Def, St0) ->
gbitstr(#c_bitstr{val=V,size=S}, Def, St) ->
gexpr_list([V,S], Def, St).
+%% is_guard_bif(Name, Arity) -> Boolean.
+
+is_guard_bif(Name, Arity) ->
+ erl_internal:guard_bif(Name, Arity)
+ orelse erl_internal:arith_op(Name, Arity)
+ orelse erl_internal:bool_op(Name, Arity)
+ orelse erl_internal:comp_op(Name, Arity).
+
%% expr(Expr, Defined, RetCount, State) -> State.
expr(#c_var{name={_,_}=FA}, Def, _Rt, St) ->
@@ -303,6 +327,10 @@ expr(#c_cons{hd=H,tl=T}, Def, _Rt, St) ->
expr_list([H,T], Def, St);
expr(#c_tuple{es=Es}, Def, _Rt, St) ->
expr_list(Es, Def, St);
+expr(#c_map{es=Es}, Def, _Rt, St) ->
+ expr_list(Es, Def, St);
+expr(#c_map_pair{key=K,val=V},Def,_Rt,St) ->
+ expr_list([K,V],Def,St);
expr(#c_binary{segments=Ss}, Def, _Rt, St) ->
bitstr_list(Ss, Def, St);
expr(#c_fun{vars=Vs,body=B}, Def, Rt, St0) ->
@@ -355,7 +383,7 @@ expr(#c_try{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Def, Rt, St0) ->
{Ens,St5} = variable_list(Evs, St4),
body(H, union(Ens, Def), Rt, St5);
expr(_Other, _, _, St) ->
- %%io:fwrite("clint: ~p~n", [_Other]),
+ %%io:fwrite("clint expr: ~p~n", [_Other]),
add_error({illegal_expr,St#lint.func}, St).
%% expr_list([Expr], Defined, State) -> State.
@@ -454,13 +482,19 @@ pattern(#c_cons{hd=H,tl=T}, Def, Ps, St) ->
pattern_list([H,T], Def, Ps, St);
pattern(#c_tuple{es=Es}, Def, Ps, St) ->
pattern_list(Es, Def, Ps, St);
+pattern(#c_map{es=Es}, Def, Ps, St) ->
+ pattern_list(Es, Def, Ps, St);
+pattern(#c_map_pair{op=#c_literal{val=exact},key=K,val=V},Def,Ps,St) ->
+ pattern_list([K,V],Def,Ps,St);
pattern(#c_binary{segments=Ss}, Def, Ps, St0) ->
St = pat_bin_tail_check(Ss, St0),
pat_bin(Ss, Def, Ps, St);
pattern(#c_alias{var=V,pat=P}, Def, Ps, St0) ->
{Vvs,St1} = variable(V, Ps, St0),
pattern(P, Def, union(Vvs, Ps), St1);
-pattern(_, _, Ps, St) -> {Ps,add_error({not_pattern,St#lint.func}, St)}.
+pattern(_Other, _, Ps, St) ->
+ %%io:fwrite("clint pattern: ~p~n", [_Other]),
+ {Ps,add_error({not_pattern,St#lint.func}, St)}.
pat_var(N, _Def, Ps, St) ->
case is_element(N, Ps) of
diff --git a/lib/compiler/src/core_parse.hrl b/lib/compiler/src/core_parse.hrl
index 0b8f4d8895..4a00535360 100644
--- a/lib/compiler/src/core_parse.hrl
+++ b/lib/compiler/src/core_parse.hrl
@@ -34,7 +34,7 @@
-record(c_apply, {anno=[], op, % op :: Tree,
args}). % args :: [Tree]
--record(c_binary, {anno=[], segments}). % segments :: [#c_bitstr{}]
+-record(c_binary, {anno=[], segments :: [cerl:c_bitstr()]}).
-record(c_bitstr, {anno=[], val, % val :: Tree,
size, % size :: Tree,
@@ -70,6 +70,15 @@
-record(c_literal, {anno=[], val}). % val :: literal()
+-record(c_map, {anno=[],
+ arg=#c_literal{val=#{}} :: cerl:c_var() | cerl:c_literal(),
+ es :: [cerl:c_map_pair()]}).
+
+-record(c_map_pair, {anno=[],
+ op :: #c_literal{val::'assoc'} | #c_literal{val::'exact'},
+ key,
+ val}).
+
-record(c_module, {anno=[], name, % name :: Tree,
exports, % exports :: [Tree],
attrs, % attrs :: [#c_def{}],
diff --git a/lib/compiler/src/core_parse.yrl b/lib/compiler/src/core_parse.yrl
index 4e98a8c2da..a66ad4235f 100644
--- a/lib/compiler/src/core_parse.yrl
+++ b/lib/compiler/src/core_parse.yrl
@@ -21,6 +21,8 @@
%% Have explicit productions for annotated phrases named anno_XXX.
%% This just does an XXX and adds the annotation.
+Expect 0.
+
Nonterminals
module_definition module_export module_attribute module_defs
@@ -44,6 +46,9 @@ receive_expr timeout try_expr
sequence catch_expr
variable clause clause_pattern
+map_expr map_pairs map_pair map_pair_assoc map_pair_exact
+map_pattern map_pair_patterns map_pair_pattern
+
annotation anno_fun anno_expression anno_expressions
anno_variable anno_variables anno_pattern anno_patterns
anno_function_name
@@ -53,7 +58,7 @@ Terminals
%% Separators
-'(' ')' '{' '}' '[' ']' '|' ',' '->' '=' '/' '<' '>' ':' '-|' '#'
+'(' ')' '{' '}' '[' ']' '|' ',' '->' '=' '/' '<' '>' ':' '-|' '#' '~' '::'
%% Keywords (atoms are assumed to always be single-quoted).
@@ -166,6 +171,7 @@ anno_patterns -> anno_pattern : ['$1'].
other_pattern -> atomic_pattern : '$1'.
other_pattern -> tuple_pattern : '$1'.
+other_pattern -> map_pattern : '$1'.
other_pattern -> cons_pattern : '$1'.
other_pattern -> binary_pattern : '$1'.
other_pattern -> anno_variable '=' anno_pattern :
@@ -176,6 +182,16 @@ atomic_pattern -> atomic_literal : '$1'.
tuple_pattern -> '{' '}' : c_tuple([]).
tuple_pattern -> '{' anno_patterns '}' : c_tuple('$2').
+map_pattern -> '~' '{' '}' '~' : #c_map{es=[]}.
+map_pattern -> '~' '{' map_pair_patterns '}' '~' :
+ #c_map{es=lists:sort('$3')}.
+
+map_pair_patterns -> map_pair_pattern : ['$1'].
+map_pair_patterns -> map_pair_pattern ',' map_pair_patterns : ['$1' | '$3'].
+
+map_pair_pattern -> '~' '<' anno_pattern ',' anno_pattern '>' :
+ #c_map_pair{op=#c_literal{val=exact},key='$3',val='$5'}.
+
cons_pattern -> '[' anno_pattern tail_pattern :
#c_cons{hd='$2',tl='$3'}.
@@ -240,6 +256,7 @@ single_expression -> primop_expr : '$1'.
single_expression -> try_expr : '$1'.
single_expression -> sequence : '$1'.
single_expression -> catch_expr : '$1'.
+single_expression -> map_expr : '$1'.
literal -> atomic_literal : '$1'.
literal -> tuple_literal : '$1'.
@@ -267,6 +284,22 @@ tail_literal -> ',' literal tail_literal : #c_cons{hd='$2',tl='$3'}.
tuple -> '{' '}' : c_tuple([]).
tuple -> '{' anno_expressions '}' : c_tuple('$2').
+map_expr -> '~' '{' '}' '~' : #c_map{es=[]}.
+map_expr -> '~' '{' map_pairs '}' '~' : #c_map{es='$3'}.
+map_expr -> '~' '{' map_pairs '|' variable '}' '~' : #c_map{arg='$5',es='$3'}.
+map_expr -> '~' '{' map_pairs '|' map_expr '}' '~' : #c_map{arg='$5',es='$3'}.
+
+map_pairs -> map_pair : ['$1'].
+map_pairs -> map_pair ',' map_pairs : ['$1' | '$3'].
+
+map_pair -> map_pair_assoc : '$1'.
+map_pair -> map_pair_exact : '$1'.
+
+map_pair_assoc -> '::' '<' anno_expression ',' anno_expression'>' :
+ #c_map_pair{op=#c_literal{val=assoc},key='$3',val='$5'}.
+map_pair_exact -> '~' '<' anno_expression ',' anno_expression'>' :
+ #c_map_pair{op=#c_literal{val=exact},key='$3',val='$5'}.
+
cons -> '[' anno_expression tail : c_cons('$2', '$3').
tail -> ']' : #c_literal{val=[]}.
@@ -381,3 +414,5 @@ Erlang code.
tok_val(T) -> element(3, T).
tok_line(T) -> element(2, T).
+
+%% vim: syntax=erlang
diff --git a/lib/compiler/src/core_pp.erl b/lib/compiler/src/core_pp.erl
index 1f91a52be3..83412ecdd7 100644
--- a/lib/compiler/src/core_pp.erl
+++ b/lib/compiler/src/core_pp.erl
@@ -118,6 +118,16 @@ format_1(#c_literal{val=Tuple}, Ctxt) when is_tuple(Tuple) ->
format_1(#c_literal{anno=A,val=Bitstring}, Ctxt) when is_bitstring(Bitstring) ->
Segs = segs_from_bitstring(Bitstring),
format_1(#c_binary{anno=A,segments=Segs}, Ctxt);
+format_1(#c_literal{anno=A,val=M},Ctxt) when is_map(M) ->
+ Pairs = maps:to_list(M),
+ Op = case Ctxt of
+ #ctxt{ class = clause } -> exact;
+ _ -> assoc
+ end,
+ Cpairs = [#c_map_pair{op=#c_literal{val=Op},
+ key=#c_literal{val=V},
+ val=#c_literal{val=K}} || {K,V} <- Pairs],
+ format_1(#c_map{anno=A,arg=#c_literal{val=#{}},es=Cpairs},Ctxt);
format_1(#c_var{name={I,A}}, _) ->
[core_atom(I),$/,integer_to_list(A)];
format_1(#c_var{name=V}, _) ->
@@ -161,6 +171,27 @@ format_1(#c_tuple{es=Es}, Ctxt) ->
format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
$}
];
+format_1(#c_map{arg=#c_literal{val=M},es=Es}, Ctxt) when is_map(M),map_size(M)=:=0 ->
+ ["~{",
+ format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
+ "}~"
+ ];
+format_1(#c_map{arg=Var,es=Es}, Ctxt) ->
+ ["~{",
+ format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
+ "|",format(Var, add_indent(Ctxt, 1)),
+ "}~"
+ ];
+format_1(#c_map_pair{op=#c_literal{val=assoc},key=K,val=V}, Ctxt) ->
+ ["::<",
+ format_hseq([K,V], ",", add_indent(Ctxt, 1), fun format/2),
+ ">"
+ ];
+format_1(#c_map_pair{op=#c_literal{val=exact},key=K,val=V}, Ctxt) ->
+ ["~<",
+ format_hseq([K,V], ",", add_indent(Ctxt, 1), fun format/2),
+ ">"
+ ];
format_1(#c_cons{hd=H,tl=T}, Ctxt) ->
Txt = ["["|format(H, add_indent(Ctxt, 1))],
[Txt|format_list_tail(T, add_indent(Ctxt, width(Txt, Ctxt)))];
diff --git a/lib/compiler/src/core_scan.erl b/lib/compiler/src/core_scan.erl
index c0dfecd1dc..b7799b373a 100644
--- a/lib/compiler/src/core_scan.erl
+++ b/lib/compiler/src/core_scan.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -272,6 +271,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([C|Cs], Toks, Pos) -> %Punctuation character
P = list_to_atom([C]),
scan1(Cs, [{P,Pos}|Toks], Pos);
diff --git a/lib/compiler/src/erl_bifs.erl b/lib/compiler/src/erl_bifs.erl
index 3ad3c8c690..6c75538194 100644
--- a/lib/compiler/src/erl_bifs.erl
+++ b/lib/compiler/src/erl_bifs.erl
@@ -91,6 +91,7 @@ is_pure(erlang, is_float, 1) -> true;
is_pure(erlang, is_function, 1) -> true;
is_pure(erlang, is_integer, 1) -> true;
is_pure(erlang, is_list, 1) -> true;
+is_pure(erlang, is_map, 1) -> true;
is_pure(erlang, is_number, 1) -> true;
is_pure(erlang, is_pid, 1) -> true;
is_pure(erlang, is_port, 1) -> true;
diff --git a/lib/compiler/src/genop.tab b/lib/compiler/src/genop.tab
index ebc9b1c85b..7d6bf56ccb 100755
--- a/lib/compiler/src/genop.tab
+++ b/lib/compiler/src/genop.tab
@@ -528,3 +528,11 @@ BEAM_FORMAT_NUMBER=0
# R15A
153: line/1
+
+# R17
+
+154: put_map_assoc/5
+155: put_map_exact/5
+156: is_map/2
+157: has_map_fields/3
+158: get_map_elements/3
diff --git a/lib/compiler/src/rec_env.erl b/lib/compiler/src/rec_env.erl
index 31a1f8b0b7..555a331bd7 100644
--- a/lib/compiler/src/rec_env.erl
+++ b/lib/compiler/src/rec_env.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,6 +72,7 @@ test_1({custom, F} = Type, N, Env) when is_integer(N), N > 0 ->
test_1(_,0, Env) ->
Env.
-endif.
+%%@clear
%% Representation:
@@ -95,7 +96,7 @@ test_1(_,0, Env) ->
%% =====================================================================
%% @type environment(). An abstract environment.
--type mapping() :: {'map', dict()} | {'rec', dict(), dict()}.
+-type mapping() :: {'map', dict:dict()} | {'rec', dict:dict(), dict:dict()}.
-type environment() :: [mapping(),...].
%% =====================================================================
diff --git a/lib/compiler/src/sys_core_dsetel.erl b/lib/compiler/src/sys_core_dsetel.erl
index f6696992b9..60d83763f8 100644
--- a/lib/compiler/src/sys_core_dsetel.erl
+++ b/lib/compiler/src/sys_core_dsetel.erl
@@ -102,6 +102,13 @@ visit(Env, #c_literal{}=R) ->
visit(Env0, #c_tuple{es=Es0}=R) ->
{Es1,Env1} = visit_list(Env0, Es0),
{R#c_tuple{es=Es1}, Env1};
+visit(Env0, #c_map{es=Es0}=R) ->
+ {Es1,Env1} = visit_list(Env0, Es0),
+ {R#c_map{es=Es1}, Env1};
+visit(Env0, #c_map_pair{key=K0,val=V0}=R) ->
+ {K,Env1} = visit(Env0, K0),
+ {V,Env2} = visit(Env1, V0),
+ {R#c_map_pair{key=K,val=V}, Env2};
visit(Env0, #c_cons{hd=H0,tl=T0}=R) ->
{H1,Env1} = visit(Env0, H0),
{T1,Env2} = visit(Env1, T0),
@@ -212,6 +219,11 @@ visit_pat(Env0, #c_var{name=V}, Vs) ->
{[V|Vs], dict:store(V, 0, Env0)};
visit_pat(Env0, #c_tuple{es=Es}, Vs) ->
visit_pats(Es, Env0, Vs);
+visit_pat(Env0, #c_map{es=Es}, Vs) ->
+ visit_pats(Es, Env0, Vs);
+visit_pat(Env0, #c_map_pair{op=#c_literal{val=exact},key=V,val=K}, Vs0) ->
+ {Vs1, Env1} = visit_pat(Env0, V, Vs0),
+ visit_pat(Env1, K, Vs1);
visit_pat(Env0, #c_cons{hd=H,tl=T}, Vs0) ->
{Vs1, Env1} = visit_pat(Env0, H, Vs0),
visit_pat(Env1, T, Vs1);
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index cda3f7d81e..ed8f609082 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -70,9 +70,9 @@
-export([module/2,format_error/1]).
-import(lists, [map/2,foldl/3,foldr/3,mapfoldl/3,all/2,any/2,
- reverse/1,reverse/2,member/2,nth/2,flatten/1]).
+ reverse/1,reverse/2,member/2,nth/2,flatten/1,unzip/1]).
--import(cerl, [ann_c_cons/3,ann_c_tuple/2]).
+-import(cerl, [ann_c_cons/3,ann_c_map/3,ann_c_tuple/2]).
-include("core_parse.hrl").
@@ -246,6 +246,16 @@ expr(#c_tuple{anno=Anno,es=Es0}=Tuple, Ctxt, Sub) ->
value ->
ann_c_tuple(Anno, Es)
end;
+expr(#c_map{anno=Anno,arg=V0,es=Es0}=Map, Ctxt, Sub) ->
+ Es = pair_list(Es0, Ctxt, Sub),
+ case Ctxt of
+ effect ->
+ add_warning(Map, useless_building),
+ expr(make_effect_seq(Es, Sub), Ctxt, Sub);
+ value ->
+ V = expr(V0, Ctxt, Sub),
+ ann_c_map(Anno,V,Es)
+ end;
expr(#c_binary{segments=Ss}=Bin0, Ctxt, Sub) ->
%% Warn for useless building, but always build the binary
%% anyway to preserve a possible exception.
@@ -295,6 +305,10 @@ expr(#c_let{}=Let, Ctxt, Sub) ->
%% Now recursively re-process the new expression.
expr(Expr, Ctxt, sub_new_preserve_types(Sub))
end;
+expr(#c_letrec{body=#c_var{}}=Letrec, effect, _Sub) ->
+ %% This is named fun in an 'effect' context. Warn and ignore.
+ add_warning(Letrec, useless_building),
+ void();
expr(#c_letrec{defs=Fs0,body=B0}=Letrec, Ctxt, Sub) ->
Fs1 = map(fun ({Name,Fb}) ->
{Name,expr(Fb, {letrec,Ctxt}, Sub)}
@@ -302,18 +316,54 @@ expr(#c_letrec{defs=Fs0,body=B0}=Letrec, Ctxt, Sub) ->
B1 = body(B0, value, Sub),
Letrec#c_letrec{defs=Fs1,body=B1};
expr(#c_case{}=Case0, Ctxt, Sub) ->
+ %% Ideally, the compiler should only emit warnings when there is
+ %% a real mistake in the code being compiled. We use the follow
+ %% heuristics in an attempt to approach that ideal:
+ %%
+ %% * If the guard for a clause always fails, we will emit a
+ %% warning.
+ %%
+ %% * If a case expression is a literal, we will emit no warnings
+ %% for clauses that will not match or for clauses that are
+ %% shadowed after a clause that will always match. That means
+ %% that code such as:
+ %%
+ %% case ?DEBUG of
+ %% false -> ok;
+ %% true -> ...
+ %% end
+ %%
+ %% (where ?DEBUG expands to either 'true' or 'false') will not
+ %% produce any warnings.
+ %%
+ %% * If the case expression is not literal, warnings will be
+ %% emitted for every clause that don't match and for all
+ %% clauses following a clause that will always match.
+ %%
+ %% * If no clause will ever match, there will be a warning
+ %% (in addition to any warnings that may have been emitted
+ %% according to the rules above).
+ %%
case opt_bool_case(Case0) of
#c_case{arg=Arg0,clauses=Cs0}=Case1 ->
Arg1 = body(Arg0, value, Sub),
- {Arg2,Cs1} = case_opt(Arg1, Cs0),
- Cs2 = clauses(Arg2, Cs1, Case1, Ctxt, Sub),
- Case = eval_case(Case1#c_case{arg=Arg2,clauses=Cs2}, Sub),
- bsm_an(Case);
+ LitExpr = cerl:is_literal(Arg1),
+ {Arg2,Cs1} = case_opt(Arg1, Cs0, Sub),
+ Cs2 = clauses(Arg2, Cs1, Ctxt, Sub, LitExpr),
+ Case = Case1#c_case{arg=Arg2,clauses=Cs2},
+ warn_no_clause_match(Case1, Case),
+ Expr = eval_case(Case, Sub),
+ case move_case_into_arg(Case, Sub) of
+ impossible ->
+ bsm_an(Expr);
+ Other ->
+ expr(Other, Ctxt, sub_new_preserve_types(Sub))
+ end;
Other ->
expr(Other, Ctxt, Sub)
end;
expr(#c_receive{clauses=Cs0,timeout=T0,action=A0}=Recv, Ctxt, Sub) ->
- Cs1 = clauses(#c_var{name='_'}, Cs0, Recv, Ctxt, Sub), %This is all we know
+ Cs1 = clauses(#c_var{name='_'}, Cs0, Ctxt, Sub, false),
T1 = expr(T0, value, Sub),
A1 = body(A0, Ctxt, Sub),
Recv#c_receive{clauses=Cs1,timeout=T1,action=A1};
@@ -377,6 +427,16 @@ expr(#c_try{anno=A,arg=E0,vars=Vs0,body=B0,evars=Evs0,handler=H0}=Try, _, Sub0)
expr_list(Es, Ctxt, Sub) ->
[expr(E, Ctxt, Sub) || E <- Es].
+pair_list(Es, Ctxt, Sub) ->
+ [pair(E, Ctxt, Sub) || E <- Es].
+
+pair(#c_map_pair{key=K,val=V}, effect, Sub) ->
+ make_effect_seq([K,V], Sub);
+pair(#c_map_pair{key=K0,val=V0}=Pair, value=Ctxt, Sub) ->
+ K = expr(K0, Ctxt, Sub),
+ V = expr(V0, Ctxt, Sub),
+ Pair#c_map_pair{key=K,val=V}.
+
bitstr_list(Es, Sub) ->
[bitstr(E, Sub) || E <- Es].
@@ -547,6 +607,14 @@ eval_binary_1([#c_bitstr{val=#c_literal{val=Val},size=#c_literal{val=Sz},
error:_ ->
throw(impossible)
end;
+eval_binary_1([#c_bitstr{val=#c_literal{},size=#c_literal{},
+ unit=#c_literal{},type=#c_literal{},
+ flags=#c_cons{}=Flags}=Bitstr|Ss], Acc0) ->
+ case cerl:fold_literal(Flags) of
+ #c_literal{} = Flags1 ->
+ eval_binary_1([Bitstr#c_bitstr{flags=Flags1}|Ss], Acc0);
+ _ -> throw(impossible)
+ end;
eval_binary_1([], Acc) -> Acc;
eval_binary_1(_, _) -> throw(impossible).
@@ -646,7 +714,7 @@ useless_call(effect, #c_call{anno=Anno,
useless_call(_, _) -> no.
%% make_effect_seq([Expr], Sub) -> #c_seq{}|void()
-%% Convert a list of epressions evaluated in effect context to a chain of
+%% Convert a list of expressions evaluated in effect context to a chain of
%% #c_seq{}. The body in the innermost #c_seq{} will be void().
%% Anything that will not have any effect will be thrown away.
@@ -1161,6 +1229,11 @@ is_non_numeric([H|T]) ->
is_non_numeric(H) andalso is_non_numeric(T);
is_non_numeric(Tuple) when is_tuple(Tuple) ->
is_non_numeric_tuple(Tuple, tuple_size(Tuple));
+is_non_numeric(Map) when is_map(Map) ->
+ %% Note that 17.x and 18.x compare keys in different ways.
+ %% Be very conservative -- require that both keys and values
+ %% are non-numeric.
+ is_non_numeric(maps:to_list(Map));
is_non_numeric(Num) when is_number(Num) ->
false;
is_non_numeric(_) -> true.
@@ -1270,9 +1343,12 @@ eval_element(Call, #c_literal{val=Pos}, #c_var{name=V}, Types)
{ok,#c_tuple{es=Elements}} ->
if
1 =< Pos, Pos =< length(Elements) ->
- case lists:nth(Pos, Elements) of
- #c_alias{var=Alias} -> Alias;
- Res -> Res
+ El = lists:nth(Pos, Elements),
+ try
+ pat_to_expr(El)
+ catch
+ throw:impossible ->
+ Call
end;
true ->
eval_failure(Call, badarg)
@@ -1310,6 +1386,7 @@ eval_is_record(Call, _, _, _, _) -> Call.
is_not_integer(#c_literal{val=Val}) when not is_integer(Val) -> true;
is_not_integer(#c_tuple{}) -> true;
is_not_integer(#c_cons{}) -> true;
+is_not_integer(#c_map{}) -> true;
is_not_integer(_) -> false.
%% is_not_tuple(Core) -> true | false.
@@ -1317,6 +1394,7 @@ is_not_integer(_) -> false.
is_not_tuple(#c_literal{val=Val}) when not is_tuple(Val) -> true;
is_not_tuple(#c_cons{}) -> true;
+is_not_tuple(#c_map{}) -> true;
is_not_tuple(_) -> false.
%% eval_setelement(Call, Pos, Tuple, NewVal) -> Core.
@@ -1452,14 +1530,14 @@ let_subst_list([], [], _) -> {[],[],[]}.
%%pattern(Pat, Sub) -> pattern(Pat, Sub, Sub).
-pattern(#c_var{name=V0}=Pat, Isub, Osub) ->
+pattern(#c_var{}=Pat, Isub, Osub) ->
case sub_is_val(Pat, Isub) of
true ->
V1 = make_var_name(),
Pat1 = #c_var{name=V1},
{Pat1,sub_set_var(Pat, Pat1, scope_add([V1], Osub))};
false ->
- {Pat,sub_del_var(Pat, scope_add([V0], Osub))}
+ {Pat,sub_del_var(Pat, Osub)}
end;
pattern(#c_literal{}=Pat, _, Osub) -> {Pat,Osub};
pattern(#c_cons{anno=Anno,hd=H0,tl=T0}, Isub, Osub0) ->
@@ -1469,6 +1547,9 @@ pattern(#c_cons{anno=Anno,hd=H0,tl=T0}, Isub, Osub0) ->
pattern(#c_tuple{anno=Anno,es=Es0}, Isub, Osub0) ->
{Es1,Osub1} = pattern_list(Es0, Isub, Osub0),
{ann_c_tuple(Anno, Es1),Osub1};
+pattern(#c_map{anno=Anno,es=Es0}=Map, Isub, Osub0) ->
+ {Es1,Osub1} = map_pair_pattern_list(Es0, Isub, Osub0),
+ {Map#c_map{anno=Anno,es=Es1},Osub1};
pattern(#c_binary{segments=V0}=Pat, Isub, Osub0) ->
{V1,Osub1} = bin_pattern_list(V0, Isub, Osub0),
{Pat#c_binary{segments=V1},Osub1};
@@ -1478,6 +1559,15 @@ pattern(#c_alias{var=V0,pat=P0}=Pat, Isub, Osub0) ->
Osub = update_types(V1, [P1], Osub2),
{Pat#c_alias{var=V1,pat=P1},Osub}.
+map_pair_pattern_list(Ps0, Isub, Osub0) ->
+ {Ps,{_,Osub}} = mapfoldl(fun map_pair_pattern/2, {Isub,Osub0}, Ps0),
+ {Ps,Osub}.
+
+map_pair_pattern(#c_map_pair{op=#c_literal{val=exact},key=K0,val=V0}=Pair,{Isub,Osub0}) ->
+ K = expr(K0, Isub),
+ {V,Osub} = pattern(V0,Isub,Osub0),
+ {Pair#c_map_pair{key=K,val=V},{Isub,Osub}}.
+
bin_pattern_list(Ps0, Isub, Osub0) ->
{Ps,{_,Osub}} = mapfoldl(fun bin_pattern/2, {Isub,Osub0}, Ps0),
{Ps,Osub}.
@@ -1522,6 +1612,9 @@ is_subst(_) -> false.
%% chains so we never have to search more than once. Use orddict so
%% we know the format.
%%
+%% In addition to the list of substitutions, we also keep track of
+%% all variable currently live (the scope).
+%%
%% sub_subst_scope/1 adds dummy substitutions for all variables
%% in the scope in order to force renaming if variables in the
%% scope occurs as pattern variables.
@@ -1548,8 +1641,17 @@ sub_set_name(V, Val, #sub{v=S,s=Scope,t=Tdb0}=Sub) ->
Tdb = copy_type(V, Val, Tdb1),
Sub#sub{v=orddict:store(V, Val, S),s=gb_sets:add(V, Scope),t=Tdb}.
-sub_del_var(#c_var{name=V}, #sub{v=S,t=Tdb}=Sub) ->
- Sub#sub{v=orddict:erase(V, S),t=kill_types(V, Tdb)}.
+sub_del_var(#c_var{name=V}, #sub{v=S,s=Scope,t=Tdb}=Sub) ->
+ %% Profiling shows that for programs with many record operations,
+ %% sub_del_var/2 is a bottleneck. Since the scope contains all
+ %% variables that are live, we know that V cannot be present in S
+ %% if it is not in the scope.
+ case gb_sets:is_member(V, Scope) of
+ false ->
+ Sub#sub{s=gb_sets:insert(V, Scope)};
+ true ->
+ Sub#sub{v=orddict:erase(V, S),t=kill_types(V, Tdb)}
+ end.
sub_subst_var(#c_var{name=V}, Val, #sub{v=S0}) ->
%% Fold chained substitutions.
@@ -1559,47 +1661,50 @@ sub_subst_scope(#sub{v=S0,s=Scope}=Sub) ->
S = [{-1,#c_var{name=Sv}} || Sv <- gb_sets:to_list(Scope)]++S0,
Sub#sub{v=S}.
-sub_is_val(#c_var{name=V}, #sub{v=S}) ->
- v_is_value(V, S).
-
-v_is_value(Var, Sub) ->
- any(fun ({_,#c_var{name=Val}}) when Val =:= Var -> true;
- (_) -> false
- end, Sub).
-
-%% clauses(E, [Clause], TopLevel, Context, Sub) -> [Clause].
-%% Trim the clauses by removing all clauses AFTER the first one which
-%% is guaranteed to match. Also remove all trivially false clauses.
-
-clauses(E, Cs0, TopLevel, Ctxt, Sub) ->
- Cs = clauses_1(E, Cs0, Ctxt, Sub),
-
- %% Here we want to warn if no clauses whatsoever will ever
- %% match, because that is probably a mistake.
- case all(fun is_compiler_generated/1, Cs) andalso
- any(fun(C) -> not is_compiler_generated(C) end, Cs0) of
+sub_is_val(#c_var{name=V}, #sub{v=S,s=Scope}) ->
+ %% When the bottleneck in sub_del_var/2 was eliminated, this
+ %% became the new bottleneck. Since the scope contains all
+ %% live variables, a variable V can only be the target for
+ %% a substitution if it is in the scope.
+ gb_sets:is_member(V, Scope) andalso v_is_value(V, S).
+
+v_is_value(Var, [{_,#c_var{name=Var}}|_]) -> true;
+v_is_value(Var, [_|T]) -> v_is_value(Var, T);
+v_is_value(_, []) -> false.
+
+%% warn_no_clause_match(CaseOrig, CaseOpt) -> ok
+%% Generate a warning if none of the user-specified clauses
+%% will match.
+
+warn_no_clause_match(CaseOrig, CaseOpt) ->
+ OrigCs = cerl:case_clauses(CaseOrig),
+ OptCs = cerl:case_clauses(CaseOpt),
+ case any(fun(C) -> not is_compiler_generated(C) end, OrigCs) andalso
+ all(fun is_compiler_generated/1, OptCs) of
true ->
%% The original list of clauses did contain at least one
%% user-specified clause, but none of them will match.
%% That is probably a mistake.
- add_warning(TopLevel, no_clause_match);
+ add_warning(CaseOrig, no_clause_match);
false ->
%% Either there were user-specified clauses left in
%% the transformed clauses, or else none of the original
%% clauses were user-specified to begin with (as in 'andalso').
ok
- end,
+ end.
- Cs.
+%% clauses(E, [Clause], TopLevel, Context, Sub) -> [Clause].
+%% Trim the clauses by removing all clauses AFTER the first one which
+%% is guaranteed to match. Also remove all trivially false clauses.
-clauses_1(E, [C0|Cs], Ctxt, Sub) ->
+clauses(E, [C0|Cs], Ctxt, Sub, LitExpr) ->
#c_clause{pats=Ps,guard=G} = C1 = clause(C0, E, Ctxt, Sub),
%%ok = io:fwrite("~w: ~p~n", [?LINE,{E,Ps}]),
case {will_match(E, Ps),will_succeed(G)} of
{yes,yes} ->
- Line = get_line(core_lib:get_anno(C1)),
- case core_lib:is_literal(E) of
+ case LitExpr of
false ->
+ Line = get_line(core_lib:get_anno(C1)),
shadow_warning(Cs, Line);
true ->
%% If the case expression is a literal,
@@ -1608,15 +1713,13 @@ clauses_1(E, [C0|Cs], Ctxt, Sub) ->
ok
end,
[C1]; %Skip the rest
- {no,_Suc} ->
- clauses_1(E, Cs, Ctxt, Sub); %Skip this clause
- {_Mat,no} ->
+ {_Mat,no} -> %Guard fails.
add_warning(C1, nomatch_guard),
- clauses_1(E, Cs, Ctxt, Sub); %Skip this clause
+ clauses(E, Cs, Ctxt, Sub, LitExpr); %Skip this clause
{_Mat,_Suc} ->
- [C1|clauses_1(E, Cs, Ctxt, Sub)]
+ [C1|clauses(E, Cs, Ctxt, Sub, LitExpr)]
end;
-clauses_1(_, [], _, _) -> [].
+clauses(_, [], _, _, _) -> [].
shadow_warning([C|Cs], none) ->
add_warning(C, nomatch_shadow),
@@ -1634,69 +1737,18 @@ will_succeed(#c_literal{val=true}) -> yes;
will_succeed(#c_literal{val=false}) -> no;
will_succeed(_Guard) -> maybe.
-%% will_match(Expr, [Pattern]) -> yes | maybe | no.
-%% Test if we know whether a match will succeed/fail or just don't
-%% know. Be conservative.
+%% will_match(Expr, [Pattern]) -> yes | maybe.
+%% We KNOW that this function is only used after optimizations
+%% in case_opt/4. Therefore clauses that can definitely not match
+%% have already been pruned.
will_match(#c_values{es=Es}, Ps) ->
- will_match_list(Es, Ps, yes);
+ will_match_1(cerl_clauses:match_list(Ps, Es));
will_match(E, [P]) ->
- will_match_1(E, P).
-
-will_match_1(_E, #c_var{}) -> yes; %Will always match
-will_match_1(E, #c_alias{pat=P}) -> %Pattern decides
- will_match_1(E, P);
-will_match_1(#c_var{}, _P) -> maybe;
-will_match_1(#c_tuple{es=Es}, #c_tuple{es=Ps}) ->
- will_match_list(Es, Ps, yes);
-will_match_1(#c_literal{val=Lit}, P) ->
- will_match_lit(Lit, P);
-will_match_1(_, _) -> maybe.
-
-will_match_list([E|Es], [P|Ps], M) ->
- case will_match_1(E, P) of
- yes -> will_match_list(Es, Ps, M);
- maybe -> will_match_list(Es, Ps, maybe);
- no -> no
- end;
-will_match_list([], [], M) -> M.
-
-will_match_lit(Cons, #c_cons{hd=Hp,tl=Tp}) ->
- case Cons of
- [H|T] ->
- case will_match_lit(H, Hp) of
- yes -> will_match_lit(T, Tp);
- Other -> Other
- end;
- _ ->
- no
- end;
-will_match_lit(Tuple, #c_tuple{es=Es}) ->
- case is_tuple(Tuple) andalso tuple_size(Tuple) =:= length(Es) of
- true -> will_match_lit_list(tuple_to_list(Tuple), Es);
- false -> no
- end;
-will_match_lit(Bin, #c_binary{}) ->
- case is_bitstring(Bin) of
- true -> maybe;
- false -> no
- end;
-will_match_lit(_, #c_var{}) ->
- yes;
-will_match_lit(Lit, #c_alias{pat=P}) ->
- will_match_lit(Lit, P);
-will_match_lit(Lit1, #c_literal{val=Lit2}) ->
- case Lit1 =:= Lit2 of
- true -> yes;
- false -> no
- end.
+ will_match_1(cerl_clauses:match(P, E)).
-will_match_lit_list([H|T], [P|Ps]) ->
- case will_match_lit(H, P) of
- yes -> will_match_lit_list(T, Ps);
- Other -> Other
- end;
-will_match_lit_list([], []) -> yes.
+will_match_1({false,_}) -> maybe;
+will_match_1({true,_}) -> yes.
%% opt_bool_case(CoreExpr) - CoreExpr'.
%% Do various optimizations to case statement that has a
@@ -1760,9 +1812,14 @@ opt_bool_clauses([#c_clause{pats=[#c_literal{val=Lit}],
true ->
%% This clause will match.
C = C0#c_clause{body=opt_bool_case(B)},
- case Lit of
- false -> [C|opt_bool_clauses(Cs, SeenT, true)];
- true -> [C|opt_bool_clauses(Cs, true, SeenF)]
+ case {Lit,SeenT,SeenF} of
+ {false,_,false} ->
+ [C|opt_bool_clauses(Cs, SeenT, true)];
+ {true,false,_} ->
+ [C|opt_bool_clauses(Cs, true, SeenF)];
+ _ ->
+ add_warning(C, nomatch_shadow),
+ opt_bool_clauses(Cs, SeenT, SeenF)
end
end;
opt_bool_clauses([#c_clause{pats=Ps,guard=#c_literal{val=true}}=C|Cs], SeenT, SeenF) ->
@@ -1895,165 +1952,309 @@ opt_bool_case_guard(Arg, [#c_clause{pats=[#c_literal{val=false}]}=Fc,Tc]) ->
%% last clause is guaranteed to match so if there is only one clause
%% with a pattern containing only variables then rewrite to a let.
-eval_case(#c_case{arg=#c_var{name=V},
- clauses=[#c_clause{pats=[P],guard=G,body=B}|_]}=Case,
- #sub{t=Tdb}=Sub) ->
- case orddict:find(V, Tdb) of
- {ok,Type} ->
- case {will_match_type(P, Type),will_succeed(G)} of
- {yes,yes} ->
- {Ps,Es} = remove_non_vars(P, Type),
- expr(#c_let{vars=Ps,arg=#c_values{es=Es},body=B},
- sub_new(Sub));
- {_,_} ->
- eval_case_1(Case, Sub)
- end;
- error -> eval_case_1(Case, Sub)
- end;
-eval_case(Case, Sub) -> eval_case_1(Case, Sub).
-
-eval_case_1(#c_case{arg=E,clauses=[#c_clause{pats=Ps,body=B}]}=Case, Sub) ->
- case is_var_pat(Ps) of
- true -> expr(#c_let{vars=Ps,arg=E,body=B}, sub_new(Sub));
- false -> eval_case_2(E, Ps, B, Case)
- end;
-eval_case_1(Case, _) -> Case.
-
-eval_case_2(E, [P], B, Case) ->
- %% Recall that there is only one clause and that it is guaranteed to match.
- %% If E and P are literals, they must be the same literal and the body
- %% can be used directly as there are no variables that need to be bound.
- %% Otherwise, P could be an alias meaning that two or more variables
- %% would be bound to E. We don't bother to optimize that case as it
- %% is rather uncommon.
- case core_lib:is_literal(E) andalso core_lib:is_literal(P) of
- false -> Case;
- true -> B
- end;
-eval_case_2(_, _, _, Case) -> Case.
-
-is_var_pat(Ps) ->
- all(fun (#c_var{}) -> true;
- (_Pat) -> false
- end, Ps).
-
-will_match_type(#c_tuple{es=Es}, #c_tuple{es=Ps}) ->
- will_match_list_type(Es, Ps);
-will_match_type(#c_literal{val=Atom}, #c_literal{val=Atom}) -> yes;
-will_match_type(#c_var{}, #c_var{}) -> yes;
-will_match_type(#c_var{}, #c_alias{}) -> yes;
-will_match_type(_, _) -> no.
-
-will_match_list_type([E|Es], [P|Ps]) ->
- case will_match_type(E, P) of
- yes -> will_match_list_type(Es, Ps);
- no -> no
- end;
-will_match_list_type([], []) -> yes;
-will_match_list_type(_, _) -> no. %Different length
-
-remove_non_vars(Ps0, Es0) ->
- {Ps,Es} = remove_non_vars(Ps0, Es0, [], []),
- {reverse(Ps),reverse(Es)}.
-
-remove_non_vars(#c_tuple{es=Ps}, #c_tuple{es=Es}, Pacc, Eacc) ->
- remove_non_vars_list(Ps, Es, Pacc, Eacc);
-remove_non_vars(#c_var{}=Var, #c_alias{var=Evar}, Pacc, Eacc) ->
- {[Var|Pacc],[Evar|Eacc]};
-remove_non_vars(#c_var{}=Var, #c_var{}=Evar, Pacc, Eacc) ->
- {[Var|Pacc],[Evar|Eacc]};
-remove_non_vars(P, E, Pacc, Eacc) ->
- true = core_lib:is_literal(P) andalso core_lib:is_literal(E), %Assertion.
- {Pacc,Eacc}.
-
-remove_non_vars_list([P|Ps], [E|Es], Pacc0, Eacc0) ->
- {Pacc,Eacc} = remove_non_vars(P, E, Pacc0, Eacc0),
- remove_non_vars_list(Ps, Es, Pacc, Eacc);
-remove_non_vars_list([], [], Pacc, Eacc) ->
- {Pacc,Eacc}.
+eval_case(#c_case{arg=E,clauses=[#c_clause{pats=Ps0,
+ guard=#c_literal{val=true},
+ body=B}]}=Case, Sub) ->
+ Es = case cerl:is_c_values(E) of
+ true -> cerl:values_es(E);
+ false -> [E]
+ end,
+ %% Consider:
+ %%
+ %% case SomeSideEffect() of
+ %% X=Y -> ...
+ %% end
+ %%
+ %% We must not rewrite it to:
+ %%
+ %% let <X,Y> = <SomeSideEffect(),SomeSideEffect()> in ...
+ %%
+ %% because SomeSideEffect() would be evaluated twice.
+ %%
+ %% Instead we must evaluate the case expression in an outer let
+ %% like this:
+ %%
+ %% let NewVar = SomeSideEffect() in
+ %% let <X,Y> = <NewVar,NewVar> in ...
+ %%
+ Vs = make_vars([], length(Es)),
+ case cerl_clauses:match_list(Ps0, Vs) of
+ {false,_} ->
+ %% This can only happen if the Core Erlang code is
+ %% handwritten or generated by another code generator
+ %% than v3_core. Assuming that the Core Erlang program
+ %% is correct, the clause will always match at run-time.
+ Case;
+ {true,Bs} ->
+ {Ps,As} = unzip(Bs),
+ InnerLet = cerl:c_let(Ps, core_lib:make_values(As), B),
+ Let = cerl:c_let(Vs, E, InnerLet),
+ expr(Let, sub_new(Sub))
+ end;
+eval_case(Case, _) -> Case.
%% case_opt(CaseArg, [Clause]) -> {CaseArg,[Clause]}.
-%% Try and optimise case by avoid building a tuple in
-%% the case expression. Instead of building a tuple
-%% in the case expression, combine the elements into
-%% multiple "values". If a clause refers to the tuple
-%% in the case expression (that was not built), introduce
-%% a let into the guard and/or body to build the tuple.
+%% Try and optimise a case by avoid building tuples or lists
+%% in the case expression. Instead combine the variable parts
+%% of the case expression to multiple "values". If a clause
+%% refers to the constructed term in the case expression (which
+%% was not built), introduce a let into the guard and/or body to
+%% build the term.
%%
-%% case {Expr1,Expr2} of case <Expr1,Expr2> of
-%% {P1,P2} -> ... <P1,P2> -> ...
+%% case {ok,[Expr1,Expr2]} of case <Expr1,Expr2> of
+%% {ok,[P1,P2]} -> ... <P1,P2> -> ...
%% . ==> .
%% . .
%% . .
-%% Var -> <Var1,Var2> ->
-%% ... Var ... let <Var> = {Var1,Var2}
-%% in ... Var ...
+%% Var -> <Var1,Var2> ->
+%% ... Var ... let <Var> = {ok,[Var1,Var2]}
+%% in ... Var ...
%% . .
%% . .
%% . .
-%% end. end.
+%% end. end.
%%
-case_opt(#c_tuple{anno=A,es=Es}, Cs0) ->
- Cs1 = case_opt_cs(Cs0, length(Es)),
- {core_lib:set_anno(core_lib:make_values(Es), A),Cs1};
-case_opt(Arg, Cs) -> {Arg,Cs}.
-
-case_opt_cs([#c_clause{pats=Ps0,guard=G,body=B}=C|Cs], Arity) ->
- case case_tuple_pat(Ps0, Arity) of
- {ok,Ps1,Avs} ->
- Flet = fun ({V,Pat}, Body) -> letify(V, Pat, Body) end,
- [C#c_clause{pats=Ps1,
- guard=foldl(Flet, G, Avs),
- body=foldl(Flet, B, Avs)}|case_opt_cs(Cs, Arity)];
- error -> %Can't match
- add_warning(C, nomatch_clause_type),
- case_opt_cs(Cs, Arity)
+case_opt(Arg, Cs0, Sub) ->
+ Cs1 = [{cerl:clause_pats(C),C,[],[]} || C <- Cs0],
+ Args0 = case cerl:is_c_values(Arg) of
+ false -> [Arg];
+ true -> cerl:values_es(Arg)
+ end,
+ LitExpr = cerl:is_literal(Arg),
+ {Args,Cs2} = case_opt_args(Args0, Cs1, Sub, LitExpr, []),
+ Cs = [cerl:update_c_clause(C,
+ reverse(Ps),
+ letify(Bs, cerl:clause_guard(C)),
+ letify(Bs, cerl:clause_body(C))) ||
+ {[],C,Ps,Bs} <- Cs2],
+ {core_lib:make_values(Args),Cs}.
+
+case_opt_args([A0|As0], Cs0, Sub, LitExpr, Acc) ->
+ case case_opt_arg(A0, Sub, Cs0, LitExpr) of
+ {error,Cs1} ->
+ %% Nothing to be done. Move on to the next argument.
+ Cs = [{Ps,C,[P|PsAcc],Bs} || {[P|Ps],C,PsAcc,Bs} <- Cs1],
+ case_opt_args(As0, Cs, Sub, LitExpr, [A0|Acc]);
+ {ok,As1,Cs} ->
+ %% The argument was either expanded (from tuple/list) or
+ %% removed (literal).
+ case_opt_args(As1++As0, Cs, Sub, LitExpr, Acc)
+ end;
+case_opt_args([], Cs, _Sub, _LitExpr, Acc) ->
+ {reverse(Acc),Cs}.
+
+%% case_opt_arg(Expr, Sub, Clauses0, LitExpr) ->
+%% {ok,Args,Clauses} | error
+%% Try to expand one argument to several arguments (if tuple/list)
+%% or to remove a literal argument.
+%%
+case_opt_arg(E0, Sub, Cs0, LitExpr) ->
+ E = maybe_replace_var(E0, Sub),
+ case cerl:is_data(E) of
+ false ->
+ {error,Cs0};
+ true ->
+ Cs = case_opt_nomatch(E, Cs0, LitExpr),
+ case cerl:data_type(E) of
+ {atomic,_} ->
+ case_opt_lit(E, Cs);
+ _ ->
+ case_opt_data(E, Cs)
+ end
+ end.
+
+%% maybe_replace_var(Expr0, Sub) -> Expr
+%% If Expr0 is a variable that has been previously matched and
+%% is known to be a tuple, return the tuple instead. Otherwise
+%% return Expr0 unchanged.
+%%
+maybe_replace_var(E, Sub) ->
+ case cerl:is_c_var(E) of
+ false -> E;
+ true -> maybe_replace_var_1(E, Sub)
+ end.
+
+maybe_replace_var_1(E, #sub{t=Tdb}) ->
+ case orddict:find(cerl:var_name(E), Tdb) of
+ {ok,T0} ->
+ case cerl:is_c_tuple(T0) of
+ false ->
+ E;
+ true ->
+ %% The pattern was a tuple. Now we must make sure
+ %% that the elements of the tuple are suitable. In
+ %% particular, we don't want binary or map
+ %% construction here, since that means that the
+ %% binary or map will be constructed in the 'case'
+ %% argument. That is wasteful for binaries. Even
+ %% worse is that any map pattern that use the ':='
+ %% operator will fail when used in map
+ %% construction (only the '=>' operator is allowed
+ %% when constructing a map from scratch).
+ ToData = fun coerce_to_data/1,
+ try
+ cerl_trees:map(ToData, T0)
+ catch
+ throw:impossible ->
+ %% Something unsuitable was found (map or
+ %% or binary). Keep the variable.
+ E
+ end
+ end;
+ error ->
+ E
+ end.
+
+%% coerce_to_data(Core) -> Core'
+%% Coerce an element originally from a pattern to an data item or or
+%% variable. Throw an 'impossible' exception if non-data Core Erlang
+%% terms such as binary construction or map construction are
+%% encountered.
+
+coerce_to_data(C) ->
+ case cerl:is_c_alias(C) of
+ false ->
+ case cerl:is_data(C) orelse cerl:is_c_var(C) of
+ true -> C;
+ false -> throw(impossible)
+ end;
+ true ->
+ coerce_to_data(cerl:alias_pat(C))
+ end.
+
+%% case_opt_nomatch(E, Clauses, LitExpr) -> Clauses'
+%% Remove all clauses that cannot possibly match.
+
+case_opt_nomatch(E, [{[P|_],C,_,_}=Current|Cs], LitExpr) ->
+ case cerl_clauses:match(P, E) of
+ none ->
+ %% The pattern will not match the case expression. Remove
+ %% the clause. Unless the entire case expression is a
+ %% literal, also emit a warning.
+ case LitExpr of
+ false -> add_warning(C, nomatch_clause_type);
+ true -> ok
+ end,
+ case_opt_nomatch(E, Cs, LitExpr);
+ _ ->
+ [Current|case_opt_nomatch(E, Cs, LitExpr)]
+ end;
+case_opt_nomatch(_, [], _) -> [].
+
+%% case_opt_lit(Literal, Clauses0) -> {ok,[],Clauses} | error
+%% The current part of the case expression is a literal. That
+%% means that we will know at compile-time whether a clause
+%% will match, and we can remove the corresponding pattern from
+%% each clause.
+%%
+%% The only complication is if the literal is a binary. Binary
+%% pattern matching is tricky, so we will give up in that case.
+
+case_opt_lit(Lit, Cs0) ->
+ try case_opt_lit_1(Lit, Cs0) of
+ Cs ->
+ {ok,[],Cs}
+ catch
+ throw:impossible ->
+ {error,Cs0}
+ end.
+
+case_opt_lit_1(E, [{[P|Ps],C,PsAcc,Bs0}|Cs]) ->
+ %% Non-matching clauses have already been removed
+ %% in case_opt_nomatch/3.
+ case cerl_clauses:match(P, E) of
+ {true,Bs} ->
+ %% The pattern matches the literal. Remove the pattern
+ %% and update the bindings.
+ [{Ps,C,PsAcc,Bs++Bs0}|case_opt_lit_1(E, Cs)];
+ {false,_} ->
+ %% Binary literal and pattern. We are not sure whether
+ %% the pattern will match.
+ throw(impossible)
end;
-case_opt_cs([], _) -> [].
+case_opt_lit_1(_, []) -> [].
-%% case_tuple_pat([Pattern], Arity) -> {ok,[Pattern],[{AliasVar,Pat}]} | error.
+%% case_opt_data(Expr, Clauses0, LitExpr) -> {ok,Exprs,Clauses}
+
+case_opt_data(E, Cs0) ->
+ Es = cerl:data_es(E),
+ TypeSig = {cerl:data_type(E),cerl:data_arity(E)},
+ try case_opt_data_1(Cs0, Es, TypeSig) of
+ Cs ->
+ {ok,Es,Cs}
+ catch
+ throw:impossible ->
+ {error,Cs0}
+ end.
-case_tuple_pat([#c_tuple{es=Ps}], Arity) when length(Ps) =:= Arity ->
- {ok,Ps,[]};
-case_tuple_pat([#c_literal{val=T}], Arity) when tuple_size(T) =:= Arity ->
- Ps = [#c_literal{val=E} || E <- tuple_to_list(T)],
- {ok,Ps,[]};
-case_tuple_pat([#c_var{anno=Anno0}=V], Arity) ->
- Vars = make_vars(Anno0, 1, Arity),
+case_opt_data_1([{[P|Ps0],C,PsAcc,Bs0}|Cs], Es, TypeSig) ->
+ {ok,Ps1,Bs1} = case_data_pat(P, TypeSig),
+ [{Ps1++Ps0,C,PsAcc,Bs1++Bs0}|
+ case_opt_data_1(Cs, Es, TypeSig)];
+case_opt_data_1([], _, _) -> [].
+%% case_data_pat(Pattern, Type, Arity) -> {ok,[Pattern],[{AliasVar,Pat}]} | error.
+
+case_data_pat(P, TypeSig) ->
+ case cerl:is_data(P) of
+ false ->
+ case_data_pat_var(P, TypeSig);
+ true ->
+ {ok,cerl:data_es(P),[]}
+ end.
+
+%% case_data_pat_var(Pattern, {DataType,ArityType}) ->
+%% {ok,[Pattern],[{AliasVar,Pat}]}
+
+case_data_pat_var(P, {Type,Arity}=TypeSig) ->
%% If the entire case statement is evaluated in an effect
%% context (e.g. "case {A,B} of ... end, ok"), there will
%% be a warning that a term is constructed but never used.
- %% To avoid that warning, we must annotate the tuple as
- %% compiler generated.
-
- Anno = [compiler_generated|Anno0],
- {ok,Vars,[{V,#c_tuple{anno=Anno,es=Vars}}]};
-case_tuple_pat([#c_alias{var=V,pat=P}], Arity) ->
- case case_tuple_pat([P], Arity) of
- {ok,Ps,Avs} ->
- Anno0 = core_lib:get_anno(P),
- Anno = [compiler_generated|Anno0],
- {ok,Ps,[{V,#c_tuple{anno=Anno,es=unalias_pat_list(Ps)}}|Avs]};
- error ->
- error
- end;
-case_tuple_pat(_, _) -> error.
+ %% To avoid that warning, we must annotate the data
+ %% constructor as compiler generated.
+ Ann = [compiler_generated|cerl:get_ann(P)],
+ case cerl:type(P) of
+ var ->
+ Vars = make_vars(cerl:get_ann(P), Arity),
+ {ok,Vars,[{P,cerl:ann_make_data(Ann, Type, Vars)}]};
+ alias ->
+ V = cerl:alias_var(P),
+ Apat = cerl:alias_pat(P),
+ {ok,Ps,Bs} = case_data_pat(Apat, TypeSig),
+ {ok,Ps,[{V,cerl:ann_make_data(Ann, Type,
+ pat_to_expr_list(Ps))}|Bs]}
+ end.
-%% unalias_pat(Pattern) -> Pattern.
-%% Remove all the aliases in a pattern but using the alias variables
-%% instead of the values. We KNOW they will be bound.
+%% pat_to_expr(Pattern) -> Expression.
+%% Convert a pattern to an expression if possible. We KNOW that
+%% all variables in the pattern will be bound.
+%%
+%% Throw an 'impossible' exception if a map or (non-literal)
+%% binary is encountered. Trying to use a map pattern as an
+%% expression is incorrect, while rebuilding a potentially
+%% huge binary in an expression would be wasteful.
+
+pat_to_expr(P) ->
+ case cerl:type(P) of
+ alias ->
+ cerl:alias_var(P);
+ var ->
+ P;
+ _ ->
+ case cerl:is_data(P) of
+ false ->
+ %% Map or binary.
+ throw(impossible);
+ true ->
+ Es = pat_to_expr_list(cerl:data_es(P)),
+ cerl:update_data(P, cerl:data_type(P), Es)
+ end
+ end.
-unalias_pat(#c_alias{var=V}) -> V;
-unalias_pat(#c_cons{anno=Anno,hd=H0,tl=T0}) ->
- H1 = unalias_pat(H0),
- T1 = unalias_pat(T0),
- ann_c_cons(Anno, H1, T1);
-unalias_pat(#c_tuple{anno=Anno,es=Ps}) ->
- ann_c_tuple(Anno, unalias_pat_list(Ps));
-unalias_pat(Atomic) -> Atomic.
+pat_to_expr_list(Ps) -> [pat_to_expr(P) || P <- Ps].
-unalias_pat_list(Ps) -> [unalias_pat(P) || P <- Ps].
+make_vars(A, Max) ->
+ make_vars(A, 1, Max).
make_vars(A, I, Max) when I =< Max ->
[make_var(A)|make_vars(A, I+1, Max)];
@@ -2067,6 +2268,11 @@ make_var_name() ->
put(new_var_num, N+1),
list_to_atom("fol"++integer_to_list(N)).
+letify(Bs, Body) ->
+ foldr(fun({V,Val}, B) ->
+ letify(V, Val, B)
+ end, Body, Bs).
+
letify(#c_var{name=Vname}=Var, Val, Body) ->
case core_lib:is_var_used(Vname, Body) of
true ->
@@ -2077,23 +2283,23 @@ letify(#c_var{name=Vname}=Var, Val, Body) ->
%% opt_case_in_let(LetExpr) -> LetExpr'
-opt_case_in_let(#c_let{vars=Vs,arg=Arg,body=B}=Let) ->
- opt_case_in_let_0(Vs, Arg, B, Let).
+opt_case_in_let(#c_let{vars=Vs,arg=Arg,body=B}=Let, Sub) ->
+ opt_case_in_let_0(Vs, Arg, B, Let, Sub).
opt_case_in_let_0([#c_var{name=V}], Arg,
- #c_case{arg=#c_var{name=V},clauses=Cs}=Case, Let) ->
+ #c_case{arg=#c_var{name=V},clauses=Cs}=Case, Let, Sub) ->
case opt_case_in_let_1(V, Arg, Cs) of
impossible ->
case is_simple_case_arg(Arg) andalso
not core_lib:is_var_used(V, Case#c_case{arg=#c_literal{val=nil}}) of
true ->
- opt_bool_case(Case#c_case{arg=Arg});
+ expr(opt_bool_case(Case#c_case{arg=Arg,clauses=Cs}), sub_new(Sub));
false ->
Let
end;
Expr -> Expr
end;
-opt_case_in_let_0(_, _, _, Let) -> Let.
+opt_case_in_let_0(_, _, _, Let, _) -> Let.
opt_case_in_let_1(V, Arg, Cs) ->
try
@@ -2183,16 +2389,31 @@ is_safe_bool_expr(Core, Sub) ->
is_safe_bool_expr_1(Core, Sub, gb_sets:empty()).
is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
- name=#c_literal{val=is_record},
- args=[_,_]},
- _Sub, _BoolVars) ->
+ name=#c_literal{val=is_record},
+ args=[A,#c_literal{val=Tag},#c_literal{val=Size}]},
+ Sub, _BoolVars) when is_atom(Tag), is_integer(Size) ->
+ is_safe_simple(A, Sub);
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_record}},
+ _Sub, _BoolVars) ->
%% The is_record/2 BIF is NOT allowed in guards.
+ %% The is_record/3 BIF where its second argument is not an atom or its third
+ %% is not an integer is NOT allowed in guards.
%%
%% NOTE: Calls like is_record(Expr, LiteralTag), where LiteralTag
%% is a literal atom referring to a defined record, have already
%% been rewritten to is_record(Expr, LiteralTag, TupleSize).
false;
is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_function},
+ args=[A,#c_literal{val=Arity}]},
+ Sub, _BoolVars) when is_integer(Arity), Arity >= 0 ->
+ is_safe_simple(A, Sub);
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_function}},
+ _Sub, _BoolVars) ->
+ false;
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
name=#c_literal{val=Name},args=Args},
Sub, BoolVars) ->
NumArgs = length(Args),
@@ -2342,6 +2563,25 @@ move_let_into_expr(#c_let{vars=Lvs0,body=Lbody0}=Let,
Case#c_case{arg=Cexpr,clauses=[Ca,Cb]};
{_,_,_} -> impossible
end;
+move_let_into_expr(#c_let{vars=Lvs0,body=Lbody0}=Let,
+ #c_seq{arg=Sarg0,body=Sbody0}=Seq, Sub0) ->
+ %%
+ %% let <Lvars> = do <Seq-arg>
+ %% <Seq-body>
+ %% in <Let-body>
+ %%
+ %% ==>
+ %%
+ %% do <Seq-arg>
+ %% let <Lvars> = <Seq-body>
+ %% in <Let-body>
+ %%
+ Sarg = body(Sarg0, Sub0),
+ Sbody1 = body(Sbody0, Sub0),
+ {Lvs,Sbody,Sub} = let_substs(Lvs0, Sbody1, Sub0),
+ Lbody = body(Lbody0, Sub),
+ Seq#c_seq{arg=Sarg,body=Let#c_let{vars=Lvs,arg=core_lib:make_values(Sbody),
+ body=Lbody}};
move_let_into_expr(_Let, _Expr, _Sub) -> impossible.
is_failing_clause(#c_clause{body=B}) ->
@@ -2402,7 +2642,7 @@ opt_simple_let_2(Let0, Vs0, Arg0, Body0, effect, Sub) ->
expr(#c_seq{arg=Arg,body=Body}, effect, sub_new_preserve_types(Sub));
true ->
Let = Let0#c_let{vars=Vs,arg=Arg,body=Body},
- opt_case_in_let_arg(opt_case_in_let(Let), effect, Sub)
+ opt_case_in_let_arg(opt_case_in_let(Let, Sub), effect, Sub)
end
end;
opt_simple_let_2(Let, Vs0, Arg0, Body, value, Sub) ->
@@ -2425,10 +2665,81 @@ opt_simple_let_2(Let, Vs0, Arg0, Body, value, Sub) ->
expr(#c_seq{arg=Arg,body=Body}, value, sub_new_preserve_types(Sub));
{Vs,Arg,Body} ->
opt_case_in_let_arg(
- opt_case_in_let(Let#c_let{vars=Vs,arg=Arg,body=Body}),
+ opt_case_in_let(Let#c_let{vars=Vs,arg=Arg,body=Body}, Sub),
value, Sub)
end.
+move_case_into_arg(#c_case{arg=#c_let{vars=OuterVars0,arg=OuterArg,
+ body=InnerArg0}=Outer,
+ clauses=InnerClauses}=Inner, Sub) ->
+ %%
+ %% case let <OuterVars> = <OuterArg> in <InnerArg> of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% let <OuterVars> = <OuterArg>
+ %% in case <InnerArg> of <InnerClauses> end
+ %%
+ ScopeSub0 = sub_subst_scope(Sub#sub{t=[]}),
+ {OuterVars,ScopeSub} = pattern_list(OuterVars0, ScopeSub0),
+ InnerArg = body(InnerArg0, ScopeSub),
+ Outer#c_let{vars=OuterVars,arg=OuterArg,
+ body=Inner#c_case{arg=InnerArg,clauses=InnerClauses}};
+move_case_into_arg(#c_case{arg=#c_case{arg=OuterArg,
+ clauses=[OuterCa0,OuterCb]}=Outer,
+ clauses=InnerClauses}=Inner0, Sub) ->
+ case is_failing_clause(OuterCb) of
+ true ->
+ #c_clause{pats=OuterPats0,guard=OuterGuard0,
+ body=InnerArg0} = OuterCa0,
+ %%
+ %% case case <OuterArg> of
+ %% <OuterPats> when <OuterGuard> -> <InnerArg>
+ %% <OuterCb>
+ %% ...
+ %% end of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% case <OuterArg> of
+ %% <OuterPats> when <OuterGuard> ->
+ %% case <InnerArg> of <InnerClauses> end
+ %% <OuterCb>
+ %% end
+ %%
+ ScopeSub0 = sub_subst_scope(Sub#sub{t=[]}),
+ {OuterPats,ScopeSub} = pattern_list(OuterPats0, ScopeSub0),
+ OuterGuard = guard(OuterGuard0, ScopeSub),
+ InnerArg = body(InnerArg0, ScopeSub),
+ Inner = Inner0#c_case{arg=InnerArg,clauses=InnerClauses},
+ OuterCa = OuterCa0#c_clause{pats=OuterPats,guard=OuterGuard,
+ body=Inner},
+ Outer#c_case{arg=OuterArg,
+ clauses=[OuterCa,OuterCb]};
+ false ->
+ impossible
+ end;
+move_case_into_arg(#c_case{arg=#c_seq{arg=OuterArg,body=InnerArg}=Outer,
+ clauses=InnerClauses}=Inner, _Sub) ->
+ %%
+ %% case do <OuterArg> <InnerArg> of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% do <OuterArg>
+ %% case <InnerArg> of <InerClauses> end
+ %%
+ Outer#c_seq{arg=OuterArg,
+ body=Inner#c_case{arg=InnerArg,clauses=InnerClauses}};
+move_case_into_arg(_, _) ->
+ impossible.
+
%% In guards only, rewrite a case in a let argument like
%%
%% let <Var> = case <> of
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl
index 7d918a55ed..761ae8409c 100644
--- a/lib/compiler/src/sys_pre_expand.erl
+++ b/lib/compiler/src/sys_pre_expand.erl
@@ -228,6 +228,13 @@ pattern({cons,Line,H,T}, St0) ->
pattern({tuple,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{tuple,Line,TPs},St1};
+pattern({map,Line,Ps}, St0) ->
+ {TPs,St1} = pattern_list(Ps, St0),
+ {{map,Line,TPs},St1};
+pattern({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = pattern(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{tuple,Line,[{atom,Line,Tag}|TPs]},TPsvs,St1};
@@ -321,6 +328,21 @@ expr({tuple,Line,Es0}, St0) ->
%%expr({struct,Line,Tag,Es0}, Vs, St0) ->
%% {Es1,Esvs,Esus,St1} = expr_list(Es0, Vs, St0),
%% {{tuple,Line,[{atom,Line,Tag}|Es1]},Esvs,Esus,St1};
+expr({map,Line,Es0}, St0) ->
+ {Es1,St1} = expr_list(Es0, St0),
+ {{map,Line,Es1},St1};
+expr({map,Line,E0,Es0}, St0) ->
+ {E1,St1} = expr(E0, St0),
+ {Es1,St2} = expr_list(Es0, St1),
+ {{map,Line,E1,Es1},St2};
+expr({map_field_assoc,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_assoc,Line,K,V},St2};
+expr({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
expr({bin,Line,Es0}, St0) ->
{Es1,St1} = expr_bin(Es0, St0),
{{bin,Line,Es1},St1};
@@ -344,6 +366,8 @@ expr({'receive',Line,Cs0,To0,ToEs0}, St0) ->
{{'receive',Line,Cs,To,ToEs},St3};
expr({'fun',Line,Body}, St) ->
fun_tq(Line, Body, St);
+expr({named_fun,Line,Name,Cs}, St) ->
+ fun_tq(Line, Cs, St, Name);
expr({call,Line,{atom,La,N}=Atom,As0}, St0) ->
{As,St1} = expr_list(As0, St0),
Ar = length(As),
@@ -475,6 +499,11 @@ fun_tq(Lf, {clauses,Cs0}, St0) ->
Index = Uniq = 0,
{{'fun',Lf,{clauses,Cs1},{Index,Uniq,Fname}},St2}.
+fun_tq(Line, Cs0, St0, Name) ->
+ {Cs1,St1} = fun_clauses(Cs0, St0),
+ {Fname,St2} = new_fun_name(St1, Name),
+ {{named_fun,Line,Name,Cs1,{0,0,Fname}},St2}.
+
fun_clauses([{clause,L,H0,G0,B0}|Cs0], St0) ->
{H,St1} = head(H0, St0),
{G,St2} = guard(G0, St1),
@@ -485,9 +514,12 @@ fun_clauses([], St) -> {[],St}.
%% new_fun_name(State) -> {FunName,State}.
-new_fun_name(#expand{func=F,arity=A,fcount=I}=St) ->
+new_fun_name(St) ->
+ new_fun_name(St, 'fun').
+
+new_fun_name(#expand{func=F,arity=A,fcount=I}=St, FName) ->
Name = "-" ++ atom_to_list(F) ++ "/" ++ integer_to_list(A)
- ++ "-fun-" ++ integer_to_list(I) ++ "-",
+ ++ "-" ++ atom_to_list(FName) ++ "-" ++ integer_to_list(I) ++ "-",
{list_to_atom(Name),St#expand{fcount=I+1}}.
%% pattern_bin([Element], State) -> {[Element],[Variable],[UsedVar],State}.
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 6a13495523..47a357c23d 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -210,6 +210,8 @@ need_heap_0([], H, Acc) ->
need_heap_1(#l{ke={set,_,{binary,_}},i=I}, H) ->
{need_heap_need(I, H),0};
+need_heap_1(#l{ke={set,_,{map,_,_}},i=I}, H) ->
+ {need_heap_need(I, H),0};
need_heap_1(#l{ke={set,_,Val}}, H) ->
%% Just pass through adding to needed heap.
{[],H + case Val of
@@ -453,8 +455,11 @@ basic_block([Le|Les], Acc) ->
end;
no_block -> {reverse(Acc, [Le]),Les}
end.
+
+%% sets that may garbage collect are not allowed in basic blocks.
collect_block({set,_,{binary,_}}) -> no_block;
+collect_block({set,_,{map,_,_,_}}) -> no_block;
collect_block({set,_,_}) -> include;
collect_block({call,{var,_}=Var,As,_Rs}) -> {block_end,As++[Var]};
collect_block({call,Func,As,_Rs}) -> {block_end,As++func_vars(Func)};
@@ -594,14 +599,13 @@ top_level_block(Keis, Bef, MaxRegs, _St) ->
%% number to the outer catch, which is wrong.
turn_yregs(0, Tp, _) -> Tp;
-turn_yregs(El, Tp, MaxY) when element(1, element(El, Tp)) =:= yy ->
- turn_yregs(El-1, setelement(El, Tp, {y,MaxY-element(2, element(El, Tp))}), MaxY);
-turn_yregs(El, Tp, MaxY) when is_list(element(El, Tp)) ->
- New = map(fun ({yy,YY}) -> {y,MaxY-YY};
- (Other) -> Other end, element(El, Tp)),
- turn_yregs(El-1, setelement(El, Tp, New), MaxY);
turn_yregs(El, Tp, MaxY) ->
- turn_yregs(El-1, Tp, MaxY).
+ turn_yregs(El-1,setelement(El,Tp,turn_yreg(element(El,Tp),MaxY)),MaxY).
+
+turn_yreg({yy,YY},MaxY) -> {y,MaxY-YY};
+turn_yreg({list,Ls},MaxY) -> {list, turn_yreg(Ls,MaxY)};
+turn_yreg(Ts,MaxY) when is_list(Ts) -> [turn_yreg(T,MaxY)||T<-Ts];
+turn_yreg(Other,_MaxY) -> Other.
%% select_cg(Sclause, V, TypeFail, ValueFail, StackReg, State) ->
%% {Is,StackReg,State}.
@@ -623,6 +627,8 @@ select_cg(#l{ke={type_clause,bin_int,S}}, {var,V}, Tf, _Vf, Bef, St) ->
select_bin_segs(S, V, Tf, Bef, St);
select_cg(#l{ke={type_clause,bin_end,[S]}}, {var,V}, Tf, _Vf, Bef, St) ->
select_bin_end(S, V, Tf, Bef, St);
+select_cg(#l{ke={type_clause,map,S}}, {var,V}, Tf, Vf, Bef, St) ->
+ select_map(S, V, Tf, Vf, Bef, St);
select_cg(#l{ke={type_clause,Type,Scs}}, {var,V}, Tf, Vf, Bef, St0) ->
{Vis,{Aft,St1}} =
mapfoldl(fun (S, {Int,Sta}) ->
@@ -637,6 +643,10 @@ select_val_cg(tuple, R, [Arity,{f,Lbl}], Tf, Vf, [{label,Lbl}|Sis]) ->
[{test,is_tuple,{f,Tf},[R]},{test,test_arity,{f,Vf},[R,Arity]}|Sis];
select_val_cg(tuple, R, Vls, Tf, Vf, Sis) ->
[{test,is_tuple,{f,Tf},[R]},{select_tuple_arity,R,{f,Vf},{list,Vls}}|Sis];
+select_val_cg(map, R, [_Val,{f,Lbl}], Fail, Fail, [{label,Lbl}|Sis]) ->
+ [{test,is_map,{f,Fail},[R]}|Sis];
+select_val_cg(map, R, [_Val,{f,Lbl}|_], Tf, _Vf, [{label,Lbl}|Sis]) ->
+ [{test,is_map,{f,Tf},[R]}|Sis];
select_val_cg(Type, R, [Val, {f,Lbl}], Fail, Fail, [{label,Lbl}|Sis]) ->
[{test,is_eq_exact,{f,Fail},[R,{Type,Val}]}|Sis];
select_val_cg(Type, R, [Val, {f,Lbl}], Tf, Vf, [{label,Lbl}|Sis]) ->
@@ -915,6 +925,52 @@ select_extract_tuple(Src, Vs, I, Vdb, Bef, St) ->
{Es,{Aft,_}} = flatmapfoldl(F, {Bef,0}, Vs),
{Es,Aft,St}.
+select_map(Scs, V, Tf, Vf, Bef, St0) ->
+ Reg = fetch_var(V, Bef),
+ {Is,Aft,St1} =
+ match_fmf(fun(#l{ke={val_clause,{map,_,Es},B},i=I,vdb=Vdb}, Fail, St1) ->
+ select_map_val(V, Es, B, Fail, I, Vdb, Bef, St1)
+ end, Vf, St0, Scs),
+ {[{test,is_map,{f,Tf},[Reg]}|Is],Aft,St1}.
+
+select_map_val(V, Es, B, Fail, I, Vdb, Bef, St0) ->
+ {Eis,Int,St1} = select_extract_map(V, Es, Fail, I, Vdb, Bef, St0),
+ {Bis,Aft,St2} = match_cg(B, Fail, Int, St1),
+ {Eis++Bis,Aft,St2}.
+
+select_extract_map(_, [], _, _, _, Bef, St) -> {[],Bef,St};
+select_extract_map(Src, Vs, Fail, I, Vdb, Bef, St) ->
+ %% First split the instruction flow
+ %% We want one set of each
+ %% 1) has_map_fields (no target registers)
+ %% 2) get_map_elements (with target registers)
+ %% Assume keys are term-sorted
+ Rsrc = fetch_var(Src, Bef),
+
+ {{HasKs,GetVs},Aft} = lists:foldr(fun
+ ({map_pair,Key,{var,V}},{{HasKsi,GetVsi},Int0}) ->
+ case vdb_find(V, Vdb) of
+ {V,_,L} when L =< I ->
+ {{[Key|HasKsi],GetVsi},Int0};
+ _Other ->
+ Reg1 = put_reg(V, Int0#sr.reg),
+ Int1 = Int0#sr{reg=Reg1},
+ {{HasKsi,[Key,fetch_reg(V, Reg1)|GetVsi]},Int1}
+ end
+ end, {{[],[]},Bef}, Vs),
+
+ Code = case {HasKs,GetVs} of
+ {HasKs,[]} ->
+ [{test,has_map_fields,{f,Fail},Rsrc,{list,HasKs}}];
+ {[],GetVs} ->
+ [{get_map_elements, {f,Fail},Rsrc,{list,GetVs}}];
+ {HasKs,GetVs} ->
+ [{test,has_map_fields,{f,Fail},Rsrc,{list,HasKs}},
+ {get_map_elements, {f,Fail},Rsrc,{list,GetVs}}]
+ end,
+ {Code, Aft, St}.
+
+
select_extract_cons(Src, [{var,Hd}, {var,Tl}], I, Vdb, Bef, St) ->
{Es,Aft} = case {vdb_find(Hd, Vdb), vdb_find(Tl, Vdb)} of
{{_,_,Lhd}, {_,_,Ltl}} when Lhd =< I, Ltl =< I ->
@@ -1408,7 +1464,7 @@ catch_cg(C, {var,R}, Le, Vdb, Bef, St0) ->
%% annotation must reflect this and make sure that the return
%% variable is allocated first.
%%
-%% put_list for constructing a cons is an atomic instruction
+%% put_list and put_map are atomic instructions, both of
%% which can safely resuse one of the source registers as target.
set_cg([{var,R}], {cons,Es}, Le, Vdb, Bef, St) ->
@@ -1448,6 +1504,35 @@ set_cg([{var,R}], {binary,Segs}, Le, Vdb, Bef,
%% Now generate the complete code for constructing the binary.
Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a),
{Sis++Code,Aft,St};
+set_cg([{var,R}], {map,Op,Map,Es}, Le, Vdb, Bef,
+ #cg{in_catch=InCatch,bfail=Bfail}=St) ->
+
+ Fail = {f,Bfail},
+ {Sis,Int0} =
+ case InCatch of
+ true -> adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb);
+ false -> {[],Bef}
+ end,
+ SrcReg = cg_reg_arg(Map,Int0),
+ Line = line(Le#l.a),
+
+ %% The instruction needs to store keys in term sorted order
+ %% All keys has to be unique here
+ Pairs = map_pair_strip_and_termsort(Es),
+
+ %% fetch registers for values to be put into the map
+ List = flatmap(fun({K,V}) -> [K,cg_reg_arg(V,Int0)] end, Pairs),
+
+ Live = max_reg(Bef#sr.reg),
+ Int1 = Int0#sr{reg=put_reg(R, Int0#sr.reg)},
+ Aft = clear_dead(Int1, Le#l.i, Vdb),
+ Target = fetch_reg(R, Int1#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};
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)},
@@ -1460,16 +1545,27 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
end,
{Ais,clear_dead(Int, Le#l.i, Vdb),St}.
+map_pair_strip_and_termsort(Es) ->
+ %% format in
+ %% [{map_pair,K,V}]
+ %% where K is for example {integer, 1} and we want to sort on 1.
+ Ls = [{K,V}||{_,K,V}<-Es],
+ lists:sort(fun ({{_,A},_}, {{_,B},_}) -> erts_internal:cmp_term(A,B) =< 0;
+ ({nil,_}, {{_,B},_}) -> [] =< B;
+ ({{_,A},_}, {nil,_}) -> A =< []
+ end, Ls).
+
%%%
%%% Code generation for constructing binaries.
%%%
cg_binary([{bs_put_binary,Fail,{atom,all},U,_Flags,Src}|PutCode],
Target, Temp, Fail, MaxRegs, Anno) ->
+ Line = line(Anno),
Live = cg_live(Target, MaxRegs),
SzCode = cg_bitstr_size(PutCode, Target, Temp, Fail, Live),
BinFlags = {field_flags,[]},
- Code = SzCode ++
+ Code = [Line|SzCode] ++
[case member(single_use, Anno) of
true ->
{bs_private_append,Fail,Target,U,Src,BinFlags,Target};
@@ -1930,7 +2026,7 @@ load_vars(Vs, Regs) ->
foldl(fun ({var,V}, Rs) -> put_reg(V, Rs) end, Regs, Vs).
%% put_reg(Val, Regs) -> Regs.
-%% find_reg(Val, Regs) -> ok{r{R}} | error.
+%% find_reg(Val, Regs) -> {ok,r{R}} | error.
%% fetch_reg(Val, Regs) -> r{R}.
%% Functions to interface the registers.
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 01bb8635cd..59ec0d4199 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,13 +74,16 @@
-export([module/2,format_error/1]).
-import(lists, [reverse/1,reverse/2,map/2,member/2,foldl/3,foldr/3,mapfoldl/3,
- splitwith/2,keyfind/3,sort/1,foreach/2]).
+ splitwith/2,keyfind/3,sort/1,foreach/2,droplast/1,last/1]).
-import(ordsets, [add_element/2,del_element/2,is_element/2,
union/1,union/2,intersection/2,subtract/2]).
--import(cerl, [ann_c_cons/3,ann_c_cons_skel/3,ann_c_tuple/2,c_tuple/1]).
+-import(cerl, [ann_c_cons/3,ann_c_cons_skel/3,ann_c_tuple/2,c_tuple/1,
+ ann_c_map/2, ann_c_map/3]).
-include("core_parse.hrl").
+-define(REC_OFFSET, 100000000). % Also in erl_expand_records.
+
%% Internal core expressions and help functions.
%% N.B. annotations fields in place as normal Core expressions.
@@ -92,7 +95,7 @@
-record(icase, {anno=#a{},args,clauses,fc}).
-record(icatch, {anno=#a{},body}).
-record(iclause, {anno=#a{},pats,pguard=[],guard,body}).
--record(ifun, {anno=#a{},id,vars,clauses,fc}).
+-record(ifun, {anno=#a{},id,vars,clauses,fc,name=unnamed}).
-record(iletrec, {anno=#a{},defs,body}).
-record(imatch, {anno=#a{},pat,guard=[],arg,fc}).
-record(iprimop, {anno=#a{},name,args}).
@@ -101,6 +104,8 @@
-record(ireceive2, {anno=#a{},clauses,timeout,action}).
-record(iset, {anno=#a{},var,arg}).
-record(itry, {anno=#a{},args,vars,body,evars,handler}).
+-record(ifilter, {anno=#a{},arg}).
+-record(igen, {anno=#a{},acc_pat,acc_guard,skip_pat,tail,tail_pat,arg}).
-type iapply() :: #iapply{}.
-type ibinary() :: #ibinary{}.
@@ -117,10 +122,13 @@
-type ireceive2() :: #ireceive2{}.
-type iset() :: #iset{}.
-type itry() :: #itry{}.
+-type ifilter() :: #ifilter{}.
+-type igen() :: #igen{}.
-type i() :: iapply() | ibinary() | icall() | icase() | icatch()
| iclause() | ifun() | iletrec() | imatch() | iprimop()
- | iprotect() | ireceive1() | ireceive2() | iset() | itry().
+ | iprotect() | ireceive1() | ireceive2() | iset() | itry()
+ | ifilter() | igen().
-type warning() :: {file:filename(), [{integer(), module(), term()}]}.
@@ -226,13 +234,13 @@ guard(Gs0, St0) ->
Gt1 = guard_tests(Gt0),
L = element(2, Gt1),
{op,L,'or',Gt1,Rhs}
- end, guard_tests(last(Gs0)), first(Gs0)),
+ end, guard_tests(last(Gs0)), droplast(Gs0)),
{Gs,St} = gexpr_top(Gs1, St0#core{in_guard=true}),
{Gs,St#core{in_guard=false}}.
guard_tests(Gs) ->
L = element(2, hd(Gs)),
- {protect,L,foldr(fun (G, Rhs) -> {op,L,'and',G,Rhs} end, last(Gs), first(Gs))}.
+ {protect,L,foldr(fun (G, Rhs) -> {op,L,'and',G,Rhs} end, last(Gs), droplast(Gs))}.
%% gexpr_top(Expr, State) -> {Cexpr,State}.
%% Generate an internal core expression of a guard test. Explicitly
@@ -269,51 +277,67 @@ gexpr({op,L,'orelse',E1,E2}, Bools, St0) ->
True = {atom,L,true},
E = make_bool_switch_guard(L, E1, V, True, E2),
gexpr(E, Bools, St);
-gexpr({op,Line,Op,L,R}=Call, Bools0, St0) ->
+gexpr({op,Line,Op,L,R}=E, Bools, St) ->
case erl_internal:bool_op(Op, 2) of
- true ->
- {Le,Lps,Bools1,St1} = gexpr(L, Bools0, St0),
- {Ll,Llps,St2} = force_safe(Le, St1),
- {Re,Rps,Bools,St3} = gexpr(R, Bools1, St2),
- {Rl,Rlps,St4} = force_safe(Re, St3),
- Anno = lineno_anno(Line, St4),
- {#icall{anno=#a{anno=Anno}, %Must have an #a{}
- module=#c_literal{anno=Anno,val=erlang},
- name=#c_literal{anno=Anno,val=Op},
- args=[Ll,Rl]},Lps ++ Llps ++ Rps ++ Rlps,Bools,St4};
- false ->
- gexpr_test(Call, Bools0, St0)
+ true ->
+ gexpr_bool(Op, L, R, Bools, St, Line);
+ false ->
+ gexpr_test(E, Bools, St)
end;
-gexpr({op,Line,Op,A}=Call, Bools0, St0) ->
- case Op of
- 'not' ->
- {Ae0,Aps,Bools,St1} = gexpr(A, Bools0, St0),
- case Ae0 of
- #icall{module=#c_literal{val=erlang},
- name=#c_literal{val='=:='},
- args=[E,#c_literal{val=true}]}=EqCall ->
- %%
- %% Doing the following transformation
- %% not(Expr =:= true) ==> Expr =:= false
- %% will help eliminating redundant is_boolean/1 tests.
- %%
- Ae = EqCall#icall{args=[E,#c_literal{val=false}]},
- {Al,Alps,St2} = force_safe(Ae, St1),
- {Al,Aps ++ Alps,Bools,St2};
- Ae ->
- {Al,Alps,St2} = force_safe(Ae, St1),
- Anno = lineno_anno(Line, St2),
- {#icall{anno=#a{anno=Anno}, %Must have an #a{}
- module=#c_literal{anno=Anno,val=erlang},
- name=#c_literal{anno=Anno,val=Op},
- args=[Al]},Aps ++ Alps,Bools,St2}
- end;
- _ ->
- gexpr_test(Call, Bools0, St0)
+gexpr({call,Line,{remote,_,{atom,_,erlang},{atom,_,Op}},[L,R]}=E, Bools, St) ->
+ case erl_internal:bool_op(Op, 2) of
+ true ->
+ gexpr_bool(Op, L, R, Bools, St, Line);
+ false ->
+ gexpr_test(E, Bools, St)
end;
+gexpr({op,Line,'not',A}, Bools, St) ->
+ gexpr_not(A, Bools, St, Line);
+gexpr({call,Line,{remote,_,{atom,_,erlang},{atom,_,'not'}},[A]}, Bools, St) ->
+ gexpr_not(A, Bools, St, Line);
gexpr(E0, Bools, St0) ->
gexpr_test(E0, Bools, St0).
+%% gexpr_not(L, R, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
+%% Generate a guard for boolean operators
+
+gexpr_bool(Op, L, R, Bools0, St0, Line) ->
+ {Le,Lps,Bools1,St1} = gexpr(L, Bools0, St0),
+ {Ll,Llps,St2} = force_safe(Le, St1),
+ {Re,Rps,Bools,St3} = gexpr(R, Bools1, St2),
+ {Rl,Rlps,St4} = force_safe(Re, St3),
+ Anno = lineno_anno(Line, St4),
+ {#icall{anno=#a{anno=Anno}, %Must have an #a{}
+ module=#c_literal{anno=Anno,val=erlang},
+ name=#c_literal{anno=Anno,val=Op},
+ args=[Ll,Rl]},Lps ++ Llps ++ Rps ++ Rlps,Bools,St4}.
+
+%% gexpr_not(Expr, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
+%% Generate an erlang:'not'/1 guard test.
+
+gexpr_not(A, Bools0, St0, Line) ->
+ {Ae0,Aps,Bools,St1} = gexpr(A, Bools0, St0),
+ case Ae0 of
+ #icall{module=#c_literal{val=erlang},
+ name=#c_literal{val='=:='},
+ args=[E,#c_literal{val=true}]}=EqCall ->
+ %%
+ %% Doing the following transformation
+ %% not(Expr =:= true) ==> Expr =:= false
+ %% will help eliminating redundant is_boolean/1 tests.
+ %%
+ Ae = EqCall#icall{args=[E,#c_literal{val=false}]},
+ {Al,Alps,St2} = force_safe(Ae, St1),
+ {Al,Aps ++ Alps,Bools,St2};
+ Ae ->
+ {Al,Alps,St2} = force_safe(Ae, St1),
+ Anno = lineno_anno(Line, St2),
+ {#icall{anno=#a{anno=Anno}, %Must have an #a{}
+ module=#c_literal{anno=Anno,val=erlang},
+ name=#c_literal{anno=Anno,val='not'},
+ args=[Al]},Aps ++ Alps,Bools,St2}
+ end.
+
%% gexpr_test(Expr, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
%% Generate a guard test. At this stage we must be sure that we have
%% a proper boolean value here so wrap things with an true test if we
@@ -330,7 +354,8 @@ gexpr_test(E0, Bools0, St0) ->
#icall{anno=Anno,module=#c_literal{val=erlang},name=#c_literal{val=N},args=As} ->
Ar = length(As),
case erl_internal:type_test(N, Ar) orelse
- erl_internal:comp_op(N, Ar) of
+ erl_internal:comp_op(N, Ar) orelse
+ erl_internal:bool_op(N, Ar) of
true -> {E1,Eps0,Bools0,St1};
false ->
Lanno = Anno#a.anno,
@@ -478,15 +503,46 @@ expr({cons,L,H0,T0}, St0) ->
{H1,Hps,St1} = safe(H0, St0),
{T1,Tps,St2} = safe(T0, St1),
A = lineno_anno(L, St2),
- {ann_c_cons(A, H1, T1),Hps ++ Tps,St2};
-expr({lc,L,E,Qs}, St) ->
- lc_tq(L, E, Qs, #c_literal{anno=lineno_anno(L, St),val=[]}, St);
+ {annotate_cons(A, H1, T1, St2),Hps ++ Tps,St2};
+expr({lc,L,E,Qs0}, St0) ->
+ {Qs1,St1} = preprocess_quals(L, Qs0, St0),
+ lc_tq(L, E, Qs1, #c_literal{anno=lineno_anno(L, St1),val=[]}, St1);
expr({bc,L,E,Qs}, St) ->
bc_tq(L, E, Qs, {nil,L}, St);
expr({tuple,L,Es0}, St0) ->
{Es1,Eps,St1} = safe_list(Es0, St0),
- A = lineno_anno(L, St1),
- {ann_c_tuple(A, Es1),Eps,St1};
+ A = record_anno(L, St1),
+ {annotate_tuple(A, Es1, St1),Eps,St1};
+expr({map,L,Es0}, St0) ->
+ % erl_lint should make sure only #{ K => V } are allowed
+ % in map construction.
+ try map_pair_list(Es0, St0) of
+ {Es1,Eps,St1} ->
+ A = lineno_anno(L, St1),
+ {ann_c_map(A,Es1),Eps,St1}
+ catch
+ throw:{bad_map,Warning} ->
+ St = add_warning(L, Warning, St0),
+ LineAnno = lineno_anno(L, St),
+ As = [#c_literal{anno=LineAnno,val=badarg}],
+ {#icall{anno=#a{anno=LineAnno}, %Must have an #a{}
+ module=#c_literal{anno=LineAnno,val=erlang},
+ name=#c_literal{anno=LineAnno,val=error},
+ args=As},[],St}
+ end;
+expr({map,L,M0,Es0}, St0) ->
+ try expr_map(M0,Es0,lineno_anno(L, St0),St0) of
+ {_,_,_}=Res -> Res
+ catch
+ throw:{bad_map,Warning} ->
+ St = add_warning(L, Warning, St0),
+ LineAnno = lineno_anno(L, St),
+ As = [#c_literal{anno=LineAnno,val=badarg}],
+ {#icall{anno=#a{anno=LineAnno}, %Must have an #a{}
+ module=#c_literal{anno=LineAnno,val=erlang},
+ name=#c_literal{anno=LineAnno,val=error},
+ args=As},[],St}
+ end;
expr({bin,L,Es0}, St0) ->
try expr_bin(Es0, lineno_anno(L, St0), St0) of
{_,_,_}=Res -> Res
@@ -502,7 +558,7 @@ expr({bin,L,Es0}, St0) ->
end;
expr({block,_,Es0}, St0) ->
%% Inline the block directly.
- {Es1,St1} = exprs(first(Es0), St0),
+ {Es1,St1} = exprs(droplast(Es0), St0),
{E1,Eps,St2} = expr(last(Es0), St1),
{E1,Es1 ++ Eps,St2};
expr({'if',L,Cs0}, St0) ->
@@ -553,16 +609,23 @@ expr({'try',L,Es0,[],[],As0}, St0) ->
%% 'try ... after ... end'
{Es1,St1} = exprs(Es0, St0),
{As1,St2} = exprs(As0, St1),
- {Evs,Hs0,St3} = try_after(As1, St2),
- %% We must kill the id for any funs in the duplicated after body,
- %% to avoid getting two local functions having the same name.
- Hs = kill_id_anns(Hs0),
+ {Name,St3} = new_fun_name("after", St2),
{V,St4} = new_var(St3), % (must not exist in As1)
- %% TODO: this duplicates the 'after'-code; should lift to function.
- Lanno = lineno_anno(L, St4),
- {#itry{anno=#a{anno=Lanno},args=Es1,vars=[V],body=As1++[V],
- evars=Evs,handler=Hs},
- [],St4};
+ LA = lineno_anno(L, St4),
+ Lanno = #a{anno=LA},
+ Fc = function_clause([], LA, {Name,0}),
+ Fun = #ifun{anno=Lanno,id=[],vars=[],
+ clauses=[#iclause{anno=Lanno,pats=[],
+ guard=[#c_literal{val=true}],
+ body=As1}],
+ fc=Fc},
+ App = #iapply{anno=#a{anno=[compiler_generated|LA]},
+ op=#c_var{anno=LA,name={Name,0}},args=[]},
+ {Evs,Hs,St5} = try_after([App], St4),
+ Try = #itry{anno=Lanno,args=Es1,vars=[V],body=[App,V],evars=Evs,handler=Hs},
+ Letrec = #iletrec{anno=Lanno,defs=[{{Name,0},Fun}],
+ body=[Try]},
+ {Letrec,[],St5};
expr({'try',L,Es,Cs,Ecs,As}, St0) ->
%% 'try ... [of ...] [catch ...] after ... end'
expr({'try',L,[{'try',L,Es,Cs,Ecs,[]}],[],[],As}, St0);
@@ -581,7 +644,11 @@ expr({'fun',L,{function,M,F,A}}, St0) ->
name=#c_literal{val=make_fun},
args=As},Aps,St1};
expr({'fun',L,{clauses,Cs},Id}, St) ->
- fun_tq(Id, Cs, L, St);
+ fun_tq(Id, Cs, L, St, unnamed);
+expr({named_fun,L,'_',Cs,Id}, St) ->
+ fun_tq(Id, Cs, L, St, unnamed);
+expr({named_fun,L,Name,Cs,Id}, St) ->
+ fun_tq(Id, Cs, L, St, {named,Name});
expr({call,L,{remote,_,M,F},As0}, #core{wanted=Wanted}=St0) ->
{[M1,F1|As1],Aps,St1} = safe_list([M,F|As0], St0),
Lanno = lineno_anno(L, St1),
@@ -595,7 +662,7 @@ expr({call,Lc,{atom,Lf,F},As0}, St0) ->
Op = #c_var{anno=lineno_anno(Lf, St1),name={F,length(As1)}},
{#iapply{anno=#a{anno=lineno_anno(Lc, St1)},op=Op,args=As1},Aps,St1};
expr({call,L,FunExp,As0}, St0) ->
- {Fun,Fps,St1} = safe(FunExp, St0),
+ {Fun,Fps,St1} = safe_fun(length(As0), FunExp, St0),
{As1,Aps,St2} = safe_list(As0, St1),
Lanno = lineno_anno(L, St2),
{#iapply{anno=#a{anno=Lanno},op=Fun,args=As1},Fps ++ Aps,St2};
@@ -625,7 +692,7 @@ expr({match,L,P0,E0}, St0) ->
Other when not is_atom(Other) ->
{#imatch{anno=#a{anno=Lanno},pat=P2,arg=E2,fc=Fc},Eps,St4}
end;
-expr({op,_,'++',{lc,Llc,E,Qs},More}, St0) ->
+expr({op,_,'++',{lc,Llc,E,Qs0},More}, St0) ->
%% Optimise '++' here because of the list comprehension algorithm.
%%
%% To avoid achieving quadratic complexity if there is a chain of
@@ -633,7 +700,8 @@ expr({op,_,'++',{lc,Llc,E,Qs},More}, St0) ->
%% evaluation of More now. Evaluating More here could also reduce the
%% number variables in the environment for letrec.
{Mc,Mps,St1} = safe(More, St0),
- {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St1),
+ {Qs,St2} = preprocess_quals(Llc, Qs0, St1),
+ {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St2),
{Y,Mps++Yps,St};
expr({op,L,'andalso',E1,E2}, St0) ->
{#c_var{name=V0},St} = new_var(L, St0),
@@ -684,6 +752,76 @@ make_bool_switch_guard(L, E, V, T, F) ->
{clause,NegL,[V],[],[V]}
]}.
+expr_map(M0,Es0,A,St0) ->
+ {M1,Mps,St1} = safe(M0, St0),
+ case is_valid_map_src(M1) of
+ true ->
+ case {M1,Es0} of
+ {#c_var{}, []} ->
+ %% transform M#{} to is_map(M)
+ {Vpat,St2} = new_var(St1),
+ {Fpat,St3} = new_var(St2),
+ Cs = [#iclause{
+ anno=A,
+ pats=[Vpat],
+ guard=[#icall{anno=#a{anno=A},
+ module=#c_literal{anno=A,val=erlang},
+ name=#c_literal{anno=A,val=is_map},
+ args=[Vpat]}],
+ body=[Vpat]}],
+ Fc = fail_clause([Fpat], A, #c_literal{val=badarg}),
+ {#icase{anno=#a{anno=A},args=[M1],clauses=Cs,fc=Fc},Mps,St3};
+ {_,_} ->
+ {Es1,Eps,St2} = map_pair_list(Es0, St1),
+ {ann_c_map(A,M1,Es1),Mps++Eps,St2}
+ end;
+ false -> throw({bad_map,bad_map})
+ end.
+
+is_valid_map_src(#c_literal{val = M}) when is_map(M) -> true;
+is_valid_map_src(#c_map{}) -> true;
+is_valid_map_src(#c_var{}) -> true;
+is_valid_map_src(_) -> false.
+
+map_pair_list(Es, St) ->
+ foldr(fun
+ ({map_field_assoc,L,K0,V0}, {Ces,Esp,St0}) ->
+ {K1,Ep0,St1} = safe(K0, St0),
+ K = ensure_valid_map_key(K1),
+ {V,Ep1,St2} = safe(V0, St1),
+ A = lineno_anno(L, St2),
+ Pair = #c_map_pair{op=#c_literal{val=assoc},anno=A,key=K,val=V},
+ {[Pair|Ces],Ep0 ++ Ep1 ++ Esp,St2};
+ ({map_field_exact,L,K0,V0}, {Ces,Esp,St0}) ->
+ {K1,Ep0,St1} = safe(K0, St0),
+ K = ensure_valid_map_key(K1),
+ {V,Ep1,St2} = safe(V0, St1),
+ A = lineno_anno(L, St2),
+ Pair = #c_map_pair{op=#c_literal{val=exact},anno=A,key=K,val=V},
+ {[Pair|Ces],Ep0 ++ Ep1 ++ Esp,St2}
+ end, {[],[],St}, Es).
+
+ensure_valid_map_key(K0) ->
+ case coalesced_map_key(K0) of
+ {ok,K1} -> K1;
+ error -> throw({bad_map,bad_map_key})
+ end.
+
+coalesced_map_key(#c_literal{}=K) -> {ok,K};
+%% Dialyzer hack redux
+%% DO coalesce tuples and list in maps for dialyzer
+%% Dialyzer tries to break this apart, don't let it
+coalesced_map_key(#c_tuple{}=K) ->
+ case core_lib:is_literal(K) of
+ true -> {ok,cerl:fold_literal(K)};
+ false -> error
+ end;
+coalesced_map_key(#c_cons{}=K) ->
+ case core_lib:is_literal(K) of
+ true -> {ok,cerl:fold_literal(K)};
+ false -> error
+ end;
+coalesced_map_key(_) -> error.
%% try_exception([ExcpClause], St) -> {[ExcpVar],Handler,St}.
@@ -836,9 +974,9 @@ bitstr({bin_element,_,E0,Size0,[Type,{unit,Unit}|Flags]}, St0) ->
flags=#c_literal{val=Flags}},
Eps ++ Eps2,St2}.
-%% fun_tq(Id, [Clauses], Line, State) -> {Fun,[PreExp],State}.
+%% fun_tq(Id, [Clauses], Line, State, NameInfo) -> {Fun,[PreExp],State}.
-fun_tq({_,_,Name}=Id, Cs0, L, St0) ->
+fun_tq({_,_,Name}=Id, Cs0, L, St0, NameInfo) ->
Arity = clause_arity(hd(Cs0)),
{Cs1,St1} = clauses(Cs0, St0),
{Args,St2} = new_vars(Arity, St1),
@@ -847,138 +985,50 @@ fun_tq({_,_,Name}=Id, Cs0, L, St0) ->
Fc = function_clause(Ps, Anno, {Name,Arity}),
Fun = #ifun{anno=#a{anno=Anno},
id=[{id,Id}], %We KNOW!
- vars=Args,clauses=Cs1,fc=Fc},
+ vars=Args,clauses=Cs1,fc=Fc,name=NameInfo},
{Fun,[],St3}.
%% lc_tq(Line, Exp, [Qualifier], Mc, State) -> {LetRec,[PreExp],State}.
%% This TQ from Simon PJ pp 127-138.
-%% This gets a bit messy as we must transform all directly here. We
-%% recognise guard tests and try to fold them together and join to a
-%% preceding generators, this should give us better and more compact
-%% code.
-lc_tq(Line, E, [{generate,Lg,P,G}|Qs0], Mc, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
+lc_tq(Line, E, [#igen{anno=GAnno,acc_pat=AccPat,acc_guard=AccGuard,
+ skip_pat=SkipPat,tail=Tail,tail_pat=TailPat,
+ arg={Pre,Arg}}|Qs], Mc, St0) ->
{Name,St1} = new_fun_name("lc", St0),
- {Head,St2} = new_var(St1),
- {Tname,St3} = new_var_name(St2),
- LA = lineno_anno(Line, St3),
- LAnno = #a{anno=LA},
- Tail = #c_var{anno=LA,name=Tname},
- {Arg,St4} = new_var(St3),
- {Nc,[],St5} = expr({call,Lg,{atom,Lg,Name},[{var,Lg,Tname}]}, St4),
- {Guardc,St6} = lc_guard_tests(Gs, St5), %These are always flat!
- {Lc,Lps,St7} = lc_tq(Line, E, Qs1, Nc, St6),
- {Pc,St8} = list_gen_pattern(P, Line, St7),
- {Gc,Gps,St9} = safe(G, St8), %Will be a function argument!
- Fc = function_clause([Arg], LA, {Name,1}),
-
- %% Avoid constructing a default clause if the list comprehension
- %% only has a variable as generator and there are no guard
- %% tests. In other words, if the comprehension is equivalent to
- %% lists:map/2.
- Cs0 = case {Guardc, Pc} of
- {[], #c_var{}} ->
- [#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]}],guard=[],
- body=[Mc]}];
- _ ->
- [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[ann_c_cons(LA, Head, Tail)],
- guard=[],
- body=[Nc]},
- #iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]}],guard=[],
- body=[Mc]}]
- end,
- Cs = case Pc of
- nomatch -> Cs0;
- _ ->
- [#iclause{anno=LAnno,
- pats=[ann_c_cons(LA, Pc, Tail)],
- guard=Guardc,
- body=Lps ++ [Lc]}|Cs0]
- end,
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,1},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Gc]}]},
- [],St9};
-lc_tq(Line, E, [{b_generate,Lg,P,G}|Qs0], Mc, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Name,St1} = new_fun_name("blc", St0),
LA = lineno_anno(Line, St1),
LAnno = #a{anno=LA},
- HeadBinPattern = pattern(P, St1),
- #c_binary{segments=Ps0} = HeadBinPattern,
- {Ps,Tail,St2} = append_tail_segment(Ps0, St1),
- {EPs,St3} = emasculate_segments(Ps, St2),
- Pattern = HeadBinPattern#c_binary{segments=Ps},
- EPattern = HeadBinPattern#c_binary{segments=EPs},
- {Arg,St4} = new_var(St3),
- {Guardc,St5} = lc_guard_tests(Gs, St4), %These are always flat!
- Tname = Tail#c_var.name,
- {Nc,[],St6} = expr({call,Lg,{atom,Lg,Name},[{var,Lg,Tname}]}, St5),
- {Bc,Bps,St7} = lc_tq(Line, E, Qs1, Nc, St6),
- {Gc,Gps,St10} = safe(G, St7), %Will be a function argument!
- Fc = function_clause([Arg], LA, {Name,1}),
- {TailSegList,_,St} = append_tail_segment([], St10),
- Cs = [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[Pattern],
- guard=Guardc,
- body=Bps ++ [Bc]},
- #iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[EPattern],
- guard=[],
- body=[#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Tail]}]},
- #iclause{anno=LAnno,
- pats=[#c_binary{anno=LA,segments=TailSegList}],guard=[],
- body=[Mc]}],
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,1},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Gc]}]},
- [],St};
-lc_tq(Line, E, [Fil0|Qs0], Mc, St0) ->
- %% Special case sequences guard tests.
- LA = lineno_anno(element(2, Fil0), St0),
- LAnno = #a{anno=LA},
- case is_guard_test(Fil0) of
- true ->
- {Gs0,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Lc,Lps,St1} = lc_tq(Line, E, Qs1, Mc, St0),
- {Gs,St2} = lc_guard_tests([Fil0|Gs0], St1), %These are always flat!
- {#icase{anno=LAnno,
- args=[],
- clauses=[#iclause{anno=LAnno,pats=[],
- guard=Gs,body=Lps ++ [Lc]}],
- fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[],guard=[],body=[Mc]}},
- [],St2};
- false ->
- {Lc,Lps,St1} = lc_tq(Line, E, Qs0, Mc, St0),
- {Fpat,St2} = new_var(St1),
- Fc = fail_clause([Fpat], LA,
- c_tuple([#c_literal{val=case_clause},Fpat])),
- %% Do a novars little optimisation here.
- {Filc,Fps,St3} = novars(Fil0, St2),
- {#icase{anno=LAnno,
- args=[Filc],
- clauses=[#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=true}],
- guard=[],
- body=Lps ++ [Lc]},
- #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[#c_literal{anno=LA,val=false}],
- guard=[],
- body=[Mc]}],
- fc=Fc},
- Fps,St3}
- end;
+ F = #c_var{anno=LA,name={Name,1}},
+ Nc = #iapply{anno=GAnno,op=F,args=[Tail]},
+ {Var,St2} = new_var(St1),
+ Fc = function_clause([Var], LA, {Name,1}),
+ TailClause = #iclause{anno=LAnno,pats=[TailPat],guard=[],body=[Mc]},
+ Cs0 = case {AccPat,AccGuard} of
+ {SkipPat,[]} ->
+ %% Skip and accumulator patterns are the same and there is
+ %% no guard, no need to generate a skip clause.
+ [TailClause];
+ _ ->
+ [#iclause{anno=#a{anno=[compiler_generated|LA]},
+ pats=[SkipPat],guard=[],body=[Nc]},
+ TailClause]
+ end,
+ {Cs,St4} = case AccPat of
+ nomatch ->
+ %% The accumulator pattern never matches, no need
+ %% for an accumulator clause.
+ {Cs0,St2};
+ _ ->
+ {Lc,Lps,St3} = lc_tq(Line, E, Qs, Nc, St2),
+ {[#iclause{anno=LAnno,pats=[AccPat],guard=AccGuard,
+ body=Lps ++ [Lc]}|Cs0],
+ St3}
+ end,
+ Fun = #ifun{anno=LAnno,id=[],vars=[Var],clauses=Cs,fc=Fc},
+ {#iletrec{anno=LAnno#a{anno=[list_comprehension|LA]},defs=[{{Name,1},Fun}],
+ body=Pre ++ [#iapply{anno=LAnno,op=F,args=[Arg]}]},
+ [],St4};
+lc_tq(Line, E, [#ifilter{}=Filter|Qs], Mc, St) ->
+ filter_tq(Line, E, Filter, Mc, St, Qs, fun lc_tq/5);
lc_tq(Line, E0, [], Mc0, St0) ->
{H1,Hps,St1} = safe(E0, St0),
{T1,Tps,St} = force_safe(Mc0, St1),
@@ -988,143 +1038,60 @@ lc_tq(Line, E0, [], Mc0, St0) ->
%% bc_tq(Line, Exp, [Qualifier], More, State) -> {LetRec,[PreExp],State}.
%% This TQ from Gustafsson ERLANG'05.
-%% This gets a bit messy as we must transform all directly here. We
-%% recognise guard tests and try to fold them together and join to a
-%% preceding generators, this should give us better and more compact
-%% code.
%% More could be transformed before calling bc_tq.
-bc_tq(Line, Exp, Qualifiers, _, St0) ->
+bc_tq(Line, Exp, Qs0, _, St0) ->
{BinVar,St1} = new_var(St0),
- {Sz,SzPre,St2} = bc_initial_size(Exp, Qualifiers, St1),
- {E,BcPre,St} = bc_tq1(Line, Exp, Qualifiers, BinVar, St2),
+ {Sz,SzPre,St2} = bc_initial_size(Exp, Qs0, St1),
+ {Qs,St3} = preprocess_quals(Line, Qs0, St2),
+ {E,BcPre,St} = bc_tq1(Line, Exp, Qs, BinVar, St3),
Pre = SzPre ++
[#iset{var=BinVar,
arg=#iprimop{name=#c_literal{val=bs_init_writable},
args=[Sz]}}] ++ BcPre,
{E,Pre,St}.
-bc_tq1(Line, E, [{generate,Lg,P,G}|Qs0], AccExpr, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
+bc_tq1(Line, E, [#igen{anno=GAnno,acc_pat=AccPat,acc_guard=AccGuard,
+ skip_pat=SkipPat,tail=Tail,tail_pat=TailPat,
+ arg={Pre,Arg}}|Qs], Mc, St0) ->
{Name,St1} = new_fun_name("lbc", St0),
LA = lineno_anno(Line, St1),
- {[Head,Tail,AccVar],St2} = new_vars(LA, 3, St1),
LAnno = #a{anno=LA},
- {Arg,St3} = new_var(St2),
- NewMore = {call,Lg,{atom,Lg,Name},[{var,Lg,Tail#c_var.name},
- {var,Lg,AccVar#c_var.name}]},
- {Guardc,St4} = lc_guard_tests(Gs, St3), %These are always flat!
- {Lc,Lps,St5} = bc_tq1(Line, E, Qs1, AccVar, St4),
- {Nc,Nps,St6} = expr(NewMore, St5),
- {Pc,St7} = list_gen_pattern(P, Line, St6),
- {Gc,Gps,St8} = safe(G, St7), %Will be a function argument!
- Fc = function_clause([Arg,AccVar], LA, {Name,2}),
- Cs0 = case {Guardc, Pc} of
- {[], #c_var{}} ->
- [#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]},AccVar],guard=[],
- body=[AccVar]}];
- _ ->
- [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[ann_c_cons(LA, Head, Tail),AccVar],
- guard=[],
- body=Nps ++ [Nc]},
- #iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]},AccVar],guard=[],
- body=[AccVar]}]
- end,
- Cs = case Pc of
- nomatch -> Cs0;
- _ ->
- Body = Lps ++ Nps ++ [#iset{var=AccVar,arg=Lc},Nc],
- [#iclause{anno=LAnno,
- pats=[ann_c_cons(LA,Pc,Tail),AccVar],
- guard=Guardc,
- body=Body}|Cs0]
- end,
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg,AccVar],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,2},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,2}},
- args=[Gc,AccExpr]}]},
- [],St8};
-bc_tq1(Line, E, [{b_generate,Lg,P,G}|Qs0], AccExpr, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Name,St1} = new_fun_name("lbc", St0),
- LA = lineno_anno(Line, St1),
- {AccVar,St2} = new_var(LA, St1),
- LAnno = #a{anno=LA},
- HeadBinPattern = pattern(P, St2),
- #c_binary{segments=Ps0} = HeadBinPattern,
- {Ps,Tail,St3} = append_tail_segment(Ps0, St2),
- {EPs,St4} = emasculate_segments(Ps, St3),
- Pattern = HeadBinPattern#c_binary{segments=Ps},
- EPattern = HeadBinPattern#c_binary{segments=EPs},
- {Arg,St5} = new_var(St4),
- NewMore = {call,Lg,{atom,Lg,Name},[{var,Lg,Tail#c_var.name},
- {var,Lg,AccVar#c_var.name}]},
- {Guardc,St6} = lc_guard_tests(Gs, St5), %These are always flat!
- {Bc,Bps,St7} = bc_tq1(Line, E, Qs1, AccVar, St6),
- {Nc,Nps,St8} = expr(NewMore, St7),
- {Gc,Gps,St9} = safe(G, St8), %Will be a function argument!
- Fc = function_clause([Arg,AccVar], LA, {Name,2}),
- Body = Bps ++ Nps ++ [#iset{var=AccVar,arg=Bc},Nc],
- {TailSegList,_,St} = append_tail_segment([], St9),
- Cs = [#iclause{anno=LAnno,
- pats=[Pattern,AccVar],
- guard=Guardc,
- body=Body},
- #iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[EPattern,AccVar],
- guard=[],
- body=Nps ++ [Nc]},
- #iclause{anno=LAnno,
- pats=[#c_binary{anno=LA,segments=TailSegList},AccVar],
- guard=[],
- body=[AccVar]}],
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg,AccVar],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,2},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,2}},
- args=[Gc,AccExpr]}]},
- [],St};
-bc_tq1(Line, E, [Fil0|Qs0], AccVar, St0) ->
- %% Special case sequences guard tests.
- LA = lineno_anno(element(2, Fil0), St0),
- LAnno = #a{anno=LA},
- case is_guard_test(Fil0) of
- true ->
- {Gs0,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Bc,Bps,St1} = bc_tq1(Line, E, Qs1, AccVar, St0),
- {Gs,St} = lc_guard_tests([Fil0|Gs0], St1), %These are always flat!
- {#icase{anno=LAnno,
- args=[],
- clauses=[#iclause{anno=LAnno,
- pats=[],
- guard=Gs,body=Bps ++ [Bc]}],
- fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[],guard=[],body=[AccVar]}},
- [],St};
- false ->
- {Bc,Bps,St1} = bc_tq1(Line, E, Qs0, AccVar, St0),
- {Fpat,St2} = new_var(St1),
- Fc = fail_clause([Fpat], LA,
- c_tuple([#c_literal{val=case_clause},Fpat])),
- %% Do a novars little optimisation here.
- {Filc,Fps,St} = novars(Fil0, St2),
- {#icase{anno=LAnno,
- args=[Filc],
- clauses=[#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=true}],
- guard=[],
- body=Bps ++ [Bc]},
- #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[#c_literal{anno=LA,val=false}],
- guard=[],
- body=[AccVar]}],
- fc=Fc},
- Fps,St}
- end;
+ {Vars=[_,AccVar],St2} = new_vars(LA, 2, St1),
+ F = #c_var{anno=LA,name={Name,2}},
+ Nc = #iapply{anno=GAnno,op=F,args=[Tail,AccVar]},
+ Fc = function_clause(Vars, LA, {Name,2}),
+ TailClause = #iclause{anno=LAnno,pats=[TailPat,AccVar],guard=[],
+ body=[AccVar]},
+ Cs0 = case {AccPat,AccGuard} of
+ {SkipPat,[]} ->
+ %% Skip and accumulator patterns are the same and there is
+ %% no guard, no need to generate a skip clause.
+ [TailClause];
+ _ ->
+ [#iclause{anno=#a{anno=[compiler_generated|LA]},
+ pats=[SkipPat,AccVar],guard=[],body=[Nc]},
+ TailClause]
+ end,
+ {Cs,St4} = case AccPat of
+ nomatch ->
+ %% The accumulator pattern never matches, no need
+ %% for an accumulator clause.
+ {Cs0,St2};
+ _ ->
+ {Bc,Bps,St3} = bc_tq1(Line, E, Qs, AccVar, St2),
+ Body = Bps ++ [#iset{var=AccVar,arg=Bc},Nc],
+ {[#iclause{anno=LAnno,
+ pats=[AccPat,AccVar],guard=AccGuard,
+ body=Body}|Cs0],
+ St3}
+ end,
+ Fun = #ifun{anno=LAnno,id=[],vars=Vars,clauses=Cs,fc=Fc},
+ {#iletrec{anno=LAnno#a{anno=[list_comprehension|LA]},defs=[{{Name,2},Fun}],
+ body=Pre ++ [#iapply{anno=LAnno,op=F,args=[Arg,Mc]}]},
+ [],St4};
+bc_tq1(Line, E, [#ifilter{}=Filter|Qs], Mc, St) ->
+ filter_tq(Line, E, Filter, Mc, St, Qs, fun bc_tq1/5);
bc_tq1(_, {bin,Bl,Elements}, [], AccVar, St0) ->
{E,Pre,St} = expr({bin,Bl,[{bin_element,Bl,
{var,Bl,AccVar#c_var.name},
@@ -1132,31 +1099,154 @@ bc_tq1(_, {bin,Bl,Elements}, [], AccVar, St0) ->
[binary,{unit,1}]}|Elements]}, St0),
#a{anno=A} = Anno0 = get_anno(E),
Anno = Anno0#a{anno=[compiler_generated,single_use|A]},
- %%Anno = Anno0#a{anno=[compiler_generated|A]},
{set_anno(E, Anno),Pre,St}.
-append_tail_segment(Segs, St) ->
- app_tail_seg(Segs, St, []).
-
-app_tail_seg([#c_bitstr{val=Var0,size=#c_literal{val=all}}=Seg0]=L,
- St0, Acc) ->
- case Var0 of
- #c_var{name='_'} ->
- {Var,St} = new_var(St0),
- Seg = Seg0#c_bitstr{val=Var},
- {reverse(Acc, [Seg]),Var,St};
- #c_var{} ->
- {reverse(Acc, L),Var0,St0}
+%% filter_tq(Line, Expr, Filter, Mc, State, [Qualifier], TqFun) ->
+%% {Case,[PreExpr],State}.
+%% Transform an intermediate comprehension filter to its intermediate case
+%% representation.
+
+filter_tq(Line, E, #ifilter{anno=#a{anno=LA}=LAnno,arg={Pre,Arg}},
+ Mc, St0, Qs, TqFun) ->
+ %% The filter is an expression, it is compiled to a case of degree 1 with
+ %% 3 clauses, one accumulating, one skipping and the final one throwing
+ %% {case_clause,Value} where Value is the result of the filter and is not a
+ %% boolean.
+ {Lc,Lps,St1} = TqFun(Line, E, Qs, Mc, St0),
+ {FailPat,St2} = new_var(St1),
+ Fc = fail_clause([FailPat], LA,
+ c_tuple([#c_literal{val=case_clause},FailPat])),
+ {#icase{anno=LAnno#a{anno=[list_comprehension|LA]},args=[Arg],
+ clauses=[#iclause{anno=LAnno,
+ pats=[#c_literal{val=true}],guard=[],
+ body=Lps ++ [Lc]},
+ #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[#c_literal{val=false}],guard=[],
+ body=[Mc]}],
+ fc=Fc},
+ Pre,St2};
+filter_tq(Line, E, #ifilter{anno=#a{anno=LA}=LAnno,arg=Guard},
+ Mc, St0, Qs, TqFun) when is_list(Guard) ->
+ %% Otherwise it is a guard, compiled to a case of degree 0 with 2 clauses,
+ %% the first matches if the guard succeeds and the comprehension continues
+ %% or the second one is selected and the current element is skipped.
+ {Lc,Lps,St1} = TqFun(Line, E, Qs, Mc, St0),
+ {#icase{anno=LAnno#a{anno=[list_comprehension|LA]},args=[],
+ clauses=[#iclause{anno=LAnno,pats=[],guard=Guard,body=Lps ++ [Lc]}],
+ fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[],guard=[],body=[Mc]}},
+ [],St1}.
+
+%% preprocess_quals(Line, [Qualifier], State) -> {[Qualifier'],State}.
+%% Preprocess a list of Erlang qualifiers into its intermediate representation,
+%% represented as a list of #igen{} and #ifilter{} records. We recognise guard
+%% tests and try to fold them together and join to a preceding generators, this
+%% should give us better and more compact code.
+
+preprocess_quals(Line, Qs, St) ->
+ preprocess_quals(Line, Qs, St, []).
+
+preprocess_quals(Line, [Q|Qs0], St0, Acc) ->
+ case is_generator(Q) of
+ true ->
+ {Gs,Qs} = splitwith(fun is_guard_test/1, Qs0),
+ {Gen,St} = generator(Line, Q, Gs, St0),
+ preprocess_quals(Line, Qs, St, [Gen|Acc]);
+ false ->
+ LAnno = #a{anno=lineno_anno(get_anno(Q), St0)},
+ case is_guard_test(Q) of
+ true ->
+ %% When a filter is a guard test, its argument in the
+ %% #ifilter{} record is a list as returned by
+ %% lc_guard_tests/2.
+ {Gs,Qs} = splitwith(fun is_guard_test/1, Qs0),
+ {Cg,St} = lc_guard_tests([Q|Gs], St0),
+ Filter = #ifilter{anno=LAnno,arg=Cg},
+ preprocess_quals(Line, Qs, St, [Filter|Acc]);
+ false ->
+ %% Otherwise, it is a pair {Pre,Arg} as in a generator
+ %% input.
+ {Ce,Pre,St} = novars(Q, St0),
+ Filter = #ifilter{anno=LAnno,arg={Pre,Ce}},
+ preprocess_quals(Line, Qs0, St, [Filter|Acc])
+ end
end;
-app_tail_seg([H|T], St, Acc) ->
- app_tail_seg(T, St, [H|Acc]);
-app_tail_seg([], St0, Acc) ->
+preprocess_quals(_, [], St, Acc) ->
+ {reverse(Acc),St}.
+
+is_generator({generate,_,_,_}) -> true;
+is_generator({b_generate,_,_,_}) -> true;
+is_generator(_) -> false.
+
+%%
+%% Generators are abstracted as sextuplets:
+%% - acc_pat is the accumulator pattern, e.g. [Pat|Tail] for Pat <- Expr.
+%% - acc_guard is the list of guards immediately following the current
+%% generator in the qualifier list input.
+%% - skip_pat is the skip pattern, e.g. <<X,_:X,Tail/bitstring>> for
+%% <<X,1:X>> <= Expr.
+%% - tail is the variable used in AccPat and SkipPat bound to the rest of the
+%% generator input.
+%% - tail_pat is the tail pattern, respectively [] and <<_/bitstring>> for list
+%% and bit string generators.
+%% - arg is a pair {Pre,Arg} where Pre is the list of expressions to be
+%% inserted before the comprehension function and Arg is the expression
+%% that it should be passed.
+%%
+
+%% generator(Line, Generator, Guard, State) -> {Generator',State}.
+%% Transform a given generator into its #igen{} representation.
+
+generator(Line, {generate,Lg,P0,E}, Gs, St0) ->
+ LA = lineno_anno(Line, St0),
+ GA = lineno_anno(Lg, St0),
+ {Head,St1} = list_gen_pattern(P0, Line, St0),
+ {[Tail,Skip],St2} = new_vars(2, St1),
+ {Cg,St3} = lc_guard_tests(Gs, St2),
+ {AccPat,SkipPat} = case Head of
+ #c_var{} ->
+ %% If the generator pattern is a variable, the
+ %% pattern from the accumulator clause can be
+ %% reused in the skip one. lc_tq and bc_tq1 takes
+ %% care of dismissing the latter in that case.
+ Cons = ann_c_cons(LA, Head, Tail),
+ {Cons,Cons};
+ nomatch ->
+ %% If it never matches, there is no need for
+ %% an accumulator clause.
+ {nomatch,ann_c_cons(LA, Skip, Tail)};
+ _ ->
+ {ann_c_cons(LA, Head, Tail),
+ ann_c_cons(LA, Skip, Tail)}
+ end,
+ {Ce,Pre,St4} = safe(E, St3),
+ Gen = #igen{anno=#a{anno=GA},acc_pat=AccPat,acc_guard=Cg,skip_pat=SkipPat,
+ tail=Tail,tail_pat=#c_literal{anno=LA,val=[]},arg={Pre,Ce}},
+ {Gen,St4};
+generator(Line, {b_generate,Lg,P,E}, Gs, St0) ->
+ LA = lineno_anno(Line, St0),
+ GA = lineno_anno(Lg, St0),
+ Cp = #c_binary{segments=Segs} = pattern(P, St0),
+ %% The function append_tail_segment/2 keeps variable patterns as-is, making
+ %% it possible to have the same skip clause removal as with list generators.
+ {AccSegs,Tail,TailSeg,St1} = append_tail_segment(Segs, St0),
+ AccPat = Cp#c_binary{segments=AccSegs},
+ {Cg,St2} = lc_guard_tests(Gs, St1),
+ {SkipSegs,St3} = emasculate_segments(AccSegs, St2),
+ SkipPat = Cp#c_binary{segments=SkipSegs},
+ {Ce,Pre,St4} = safe(E, St3),
+ Gen = #igen{anno=#a{anno=GA},acc_pat=AccPat,acc_guard=Cg,skip_pat=SkipPat,
+ tail=Tail,tail_pat=#c_binary{anno=LA,segments=[TailSeg]},
+ arg={Pre,Ce}},
+ {Gen,St4}.
+
+append_tail_segment(Segs, St0) ->
{Var,St} = new_var(St0),
Tail = #c_bitstr{val=Var,size=#c_literal{val=all},
unit=#c_literal{val=1},
type=#c_literal{val=binary},
flags=#c_literal{val=[unsigned,big]}},
- {reverse(Acc, [Tail]),Var,St}.
+ {Segs++[Tail],Var,Tail,St}.
emasculate_segments(Segs, St) ->
emasculate_segments(Segs, St, []).
@@ -1167,7 +1257,7 @@ emasculate_segments([B|Rest], St0, Acc) ->
{Var,St1} = new_var(St0),
emasculate_segments(Rest, St1, [B#c_bitstr{val=Var}|Acc]);
emasculate_segments([], St, Acc) ->
- {lists:reverse(Acc),St}.
+ {reverse(Acc),St}.
lc_guard_tests([], St) -> {[],St};
lc_guard_tests(Gs0, St0) ->
@@ -1412,6 +1502,15 @@ safe(E0, St0) ->
{Se,Sps,St2} = force_safe(E1, St1),
{Se,Eps ++ Sps,St2}.
+safe_fun(A0, E0, St0) ->
+ case safe(E0, St0) of
+ {#c_var{name={_,A1}}=E1,Eps,St1} when A1 =/= A0 ->
+ {V,St2} = new_var(St1),
+ {V,Eps ++ [#iset{var=V,arg=E1}],St2};
+ Result ->
+ Result
+ end.
+
safe_list(Es, St) ->
foldr(fun (E, {Ces,Esp,St0}) ->
{Ce,Ep,St1} = safe(E, St0),
@@ -1479,9 +1578,11 @@ pattern({atom,L,A}, St) -> #c_literal{anno=lineno_anno(L, St),val=A};
pattern({string,L,S}, St) -> #c_literal{anno=lineno_anno(L, St),val=S};
pattern({nil,L}, St) -> #c_literal{anno=lineno_anno(L, St),val=[]};
pattern({cons,L,H,T}, St) ->
- ann_c_cons(lineno_anno(L, St), pattern(H, St), pattern(T, St));
+ annotate_cons(lineno_anno(L, St), pattern(H, St), pattern(T, St), St);
pattern({tuple,L,Ps}, St) ->
- ann_c_tuple(lineno_anno(L, St), pattern_list(Ps, St));
+ annotate_tuple(record_anno(L, St), pattern_list(Ps, St), St);
+pattern({map,L,Ps}, St) ->
+ #c_map{anno=lineno_anno(L, St), es=pattern_map_pairs(Ps, St)};
pattern({bin,L,Ps}, St) ->
%% We don't create a #ibinary record here, since there is
%% no need to hold any used/new annotations in a pattern.
@@ -1489,6 +1590,60 @@ pattern({bin,L,Ps}, St) ->
pattern({match,_,P1,P2}, St) ->
pat_alias(pattern(P1, St), pattern(P2, St)).
+%% pattern_map_pairs([MapFieldExact],State) -> [#c_map_pairs{}]
+pattern_map_pairs(Ps, St) ->
+ %% check literal key uniqueness (dict is needed)
+ %% pattern all pairs
+ {CMapPairs, Kdb} = lists:mapfoldl(fun
+ (P,Kdbi) ->
+ #c_map_pair{key=Ck,val=Cv} = CMapPair = pattern_map_pair(P,St),
+ K = core_lib:literal_value(Ck),
+ case dict:find(K,Kdbi) of
+ {ok, Vs} ->
+ {CMapPair, dict:store(K,[Cv|Vs],Kdbi)};
+ _ ->
+ {CMapPair, dict:store(K,[Cv],Kdbi)}
+ end
+ end, dict:new(), Ps),
+ pattern_alias_map_pairs(CMapPairs,Kdb,dict:new(),St).
+
+pattern_alias_map_pairs([],_,_,_) -> [];
+pattern_alias_map_pairs([#c_map_pair{key=Ck}=Pair|Pairs],Kdb,Kset,St) ->
+ %% alias same keys if needed
+ K = core_lib:literal_value(Ck),
+ case dict:find(K,Kset) of
+ {ok,processed} ->
+ pattern_alias_map_pairs(Pairs,Kdb,Kset,St);
+ _ ->
+ Cvs = dict:fetch(K,Kdb),
+ Cv = pattern_alias_map_pair_patterns(Cvs),
+ Kset1 = dict:store(K, processed, Kset),
+ [Pair#c_map_pair{val=Cv}|pattern_alias_map_pairs(Pairs,Kdb,Kset1,St)]
+ end.
+
+pattern_alias_map_pair_patterns([Cv]) -> Cv;
+pattern_alias_map_pair_patterns([Cv1,Cv2|Cvs]) ->
+ pattern_alias_map_pair_patterns([pat_alias(Cv1,Cv2)|Cvs]).
+
+pattern_map_pair({map_field_exact,L,K,V},St) ->
+ #c_map_pair{anno=lineno_anno(L, St),
+ op=#c_literal{val=exact},
+ key=pattern_map_key(K,St),
+ val=pattern(V, St)}.
+
+pattern_map_key(K,St) ->
+ %% Throws 'nomatch' if the key can't be a literal
+ %% this will be a cryptic error message but it is better than nothing
+ case expr(K,St) of
+ {Key0,[],_} ->
+ %% Dialyzer hack redux
+ case coalesced_map_key(Key0) of
+ {ok,Key1} -> Key1;
+ error -> throw(nomatch)
+ end;
+ _ -> throw(nomatch)
+ end.
+
%% pat_bin([BinElement], State) -> [BinSeg].
pat_bin(Ps, St) -> [pat_segment(P, St) || P <- Ps].
@@ -1546,15 +1701,6 @@ pat_alias_list(_, _) -> throw(nomatch).
pattern_list(Ps, St) -> [pattern(P, St) || P <- Ps].
-%% first([A]) -> [A].
-%% last([A]) -> A.
-
-first([_]) -> [];
-first([H|T]) -> [H|first(T)].
-
-last([L]) -> L;
-last([_|T]) -> last(T).
-
%% make_vars([Name]) -> [{Var,Name}].
make_vars(Vs) -> [ #c_var{name=V} || V <- Vs ].
@@ -1602,6 +1748,26 @@ fail_clause(Pats, Anno, Arg) ->
body=[#iprimop{anno=#a{anno=Anno},name=#c_literal{val=match_fail},
args=[Arg]}]}.
+annotate_tuple(A, Es, St) ->
+ case member(dialyzer, St#core.opts) of
+ true ->
+ %% Do not coalesce constant tuple elements. A Hack.
+ Node = cerl:ann_c_tuple(A, [cerl:c_var(any)]),
+ cerl:update_c_tuple_skel(Node, Es);
+ false ->
+ ann_c_tuple(A, Es)
+ end.
+
+annotate_cons(A, H, T, St) ->
+ case member(dialyzer, St#core.opts) of
+ true ->
+ %% Do not coalesce constant conses. A Hack.
+ Node= cerl:ann_c_cons(A, cerl:c_var(any), cerl:c_var(any)),
+ cerl:update_c_cons_skel(Node, H, T);
+ false ->
+ ann_c_cons(A, H, T)
+ end.
+
ubody(B, St) -> uexpr(B, [], St).
%% uclauses([Lclause], [KnownVar], State) -> {[Lclause],State}.
@@ -1637,13 +1803,13 @@ uclause(#iclause{anno=Anno,pats=Ps0,guard=G0,body=B0}, Pks, Ks0, St0) ->
uguard([], [], _, St) -> {[],St};
uguard(Pg, [], Ks, St) ->
%% No guard, so fold together equality tests.
- uguard(first(Pg), [last(Pg)], Ks, St);
+ uguard(droplast(Pg), [last(Pg)], Ks, St);
uguard(Pg, Gs0, Ks, St0) ->
%% Gs0 must contain at least one element here.
{Gs3,St5} = foldr(fun (T, {Gs1,St1}) ->
{L,St2} = new_var(St1),
{R,St3} = new_var(St2),
- {[#iset{var=L,arg=T}] ++ first(Gs1) ++
+ {[#iset{var=L,arg=T}] ++ droplast(Gs1) ++
[#iset{var=R,arg=last(Gs1)},
#icall{anno=#a{}, %Must have an #a{}
module=#c_literal{val=erlang},
@@ -1712,21 +1878,29 @@ uexpr(#iletrec{anno=A,defs=Fs0,body=B0}, Ks, St0) ->
{B1,St2} = uexprs(B0, Ks, St1),
Used = used_in_any(map(fun ({_,F}) -> F end, Fs1) ++ B1),
{#iletrec{anno=A#a{us=Used,ns=[]},defs=Fs1,body=B1},St2};
-uexpr(#icase{anno=A,args=As0,clauses=Cs0,fc=Fc0}, Ks, St0) ->
+uexpr(#icase{anno=#a{anno=Anno}=A,args=As0,clauses=Cs0,fc=Fc0}, Ks, St0) ->
%% As0 will never generate new variables.
{As1,St1} = uexpr_list(As0, Ks, St0),
{Cs1,St2} = uclauses(Cs0, Ks, St1),
{Fc1,St3} = uclause(Fc0, Ks, St2),
Used = union(used_in_any(As1), used_in_any(Cs1)),
- New = new_in_all(Cs1),
+ New = case member(list_comprehension, Anno) of
+ true -> [];
+ false -> new_in_all(Cs1)
+ end,
{#icase{anno=A#a{us=Used,ns=New},args=As1,clauses=Cs1,fc=Fc1},St3};
-uexpr(#ifun{anno=A,id=Id,vars=As,clauses=Cs0,fc=Fc0}, Ks0, St0) ->
+uexpr(#ifun{anno=A0,id=Id,vars=As,clauses=Cs0,fc=Fc0,name=Name}, Ks0, St0) ->
Avs = lit_list_vars(As),
- Ks1 = union(Avs, Ks0),
- {Cs1,St1} = ufun_clauses(Cs0, Ks1, St0),
- {Fc1,St2} = ufun_clause(Fc0, Ks1, St1),
- Used = subtract(intersection(used_in_any(Cs1), Ks0), Avs),
- {#ifun{anno=A#a{us=Used,ns=[]},id=Id,vars=As,clauses=Cs1,fc=Fc1},St2};
+ Ks1 = case Name of
+ unnamed -> Ks0;
+ {named,FName} -> union(subtract([FName], Avs), Ks0)
+ end,
+ Ks2 = union(Avs, Ks1),
+ {Cs1,St1} = ufun_clauses(Cs0, Ks2, St0),
+ {Fc1,St2} = ufun_clause(Fc0, Ks2, St1),
+ Used = subtract(intersection(used_in_any(Cs1), Ks1), Avs),
+ A1 = A0#a{us=Used,ns=[]},
+ {#ifun{anno=A1,id=Id,vars=As,clauses=Cs1,fc=Fc1,name=Name},St2};
uexpr(#iapply{anno=A,op=Op,args=As}, _, St) ->
Used = union(lit_vars(Op), lit_list_vars(As)),
{#iapply{anno=A#a{us=Used},op=Op,args=As},St};
@@ -1822,6 +1996,12 @@ upattern(#c_cons{hd=H0,tl=T0}=Cons, Ks, St0) ->
upattern(#c_tuple{es=Es0}=Tuple, Ks, St0) ->
{Es1,Esg,Esv,Eus,St1} = upattern_list(Es0, Ks, St0),
{Tuple#c_tuple{es=Es1},Esg,Esv,Eus,St1};
+upattern(#c_map{es=Es0}=Map, Ks, St0) ->
+ {Es1,Esg,Esv,Eus,St1} = upattern_list(Es0, Ks, St0),
+ {Map#c_map{es=Es1},Esg,Esv,Eus,St1};
+upattern(#c_map_pair{op=#c_literal{val=exact},val=V0}=MapPair, Ks, St0) ->
+ {V,Vg,Vv,Vu,St1} = upattern(V0, Ks, St0),
+ {MapPair#c_map_pair{val=V},Vg,Vv,Vu,St1};
upattern(#c_binary{segments=Es0}=Bin, Ks, St0) ->
{Es1,Esg,Esv,Eus,St1} = upat_bin(Es0, Ks, St0),
{Bin#c_binary{segments=Es1},Esg,Esv,Eus,St1};
@@ -2021,15 +2201,25 @@ cexpr(#itry{anno=A,args=La,vars=Vs,body=Lb,evars=Evs,handler=Lh}, As, St0) ->
cexpr(#icatch{anno=A,body=Les}, _As, St0) ->
{Ces,_Us1,St1} = cexprs(Les, [], St0), %Never export!
{#c_catch{body=Ces},[],A#a.us,St1};
-cexpr(#ifun{anno=A,id=Id,vars=Args,clauses=Lcs,fc=Lfc}, _As, St0) ->
- {Ccs,St1} = cclauses(Lcs, [], St0), %NEVER export!
- {Cfc,St2} = cclause(Lfc, [], St1),
- Anno = A#a.anno,
- {#c_fun{anno=Id++Anno,vars=Args,
- body=#c_case{anno=Anno,
- arg=set_anno(core_lib:make_values(Args), Anno),
- clauses=Ccs ++ [Cfc]}},
- [],A#a.us,St2};
+cexpr(#ifun{name=unnamed}=Fun, As, St0) ->
+ cfun(Fun, As, St0);
+cexpr(#ifun{anno=#a{us=Us0}=A0,name={named,Name},fc=#iclause{pats=Ps}}=Fun0,
+ As, St0) ->
+ case is_element(Name, Us0) of
+ false ->
+ cfun(Fun0, As, St0);
+ true ->
+ A1 = A0#a{us=del_element(Name, Us0)},
+ Fun1 = Fun0#ifun{anno=A1},
+ {#c_fun{body=Body}=CFun0,[],Us1,St1} = cfun(Fun1, As, St0),
+ RecVar = #c_var{name={Name,length(Ps)}},
+ Let = #c_let{vars=[#c_var{name=Name}],arg=RecVar,body=Body},
+ CFun1 = CFun0#c_fun{body=Let},
+ Letrec = #c_letrec{anno=A0#a.anno,
+ defs=[{RecVar,CFun1}],
+ body=RecVar},
+ {Letrec,[],Us1,St1}
+ end;
cexpr(#iapply{anno=A,op=Op,args=Args}, _As, St) ->
{#c_apply{anno=A#a.anno,op=Op,args=Args},[],A#a.us,St};
cexpr(#icall{anno=A,module=Mod,name=Name,args=Args}, _As, St) ->
@@ -2056,23 +2246,15 @@ cexpr(Lit, _As, St) ->
%%Vs = lit_vars(Lit),
{set_anno(Lit, Anno#a.anno),[],Vs,St}.
-%% Kill the id annotations for any fun inside the expression.
-%% Necessary when duplicating code in try ... after.
-
-kill_id_anns(#ifun{clauses=Cs0}=Fun) ->
- Cs = kill_id_anns(Cs0),
- Fun#ifun{clauses=Cs,id=[]};
-kill_id_anns(#a{}=A) ->
- %% Optimization: Don't waste time searching for funs inside annotations.
- A;
-kill_id_anns([H|T]) ->
- [kill_id_anns(H)|kill_id_anns(T)];
-kill_id_anns([]) -> [];
-kill_id_anns(Tuple) when is_tuple(Tuple) ->
- L0 = tuple_to_list(Tuple),
- L = kill_id_anns(L0),
- list_to_tuple(L);
-kill_id_anns(Other) -> Other.
+cfun(#ifun{anno=A,id=Id,vars=Args,clauses=Lcs,fc=Lfc}, _As, St0) ->
+ {Ccs,St1} = cclauses(Lcs, [], St0), %NEVER export!
+ {Cfc,St2} = cclause(Lfc, [], St1),
+ Anno = A#a.anno,
+ {#c_fun{anno=Id++Anno,vars=Args,
+ body=#c_case{anno=Anno,
+ arg=set_anno(core_lib:make_values(Args), Anno),
+ clauses=Ccs ++ [Cfc]}},
+ [],A#a.us,St2}.
%% lit_vars(Literal) -> [Var].
@@ -2080,6 +2262,8 @@ lit_vars(Lit) -> lit_vars(Lit, []).
lit_vars(#c_cons{hd=H,tl=T}, Vs) -> lit_vars(H, lit_vars(T, Vs));
lit_vars(#c_tuple{es=Es}, Vs) -> lit_list_vars(Es, Vs);
+lit_vars(#c_map{arg=V,es=Es}, Vs) -> lit_vars(V, lit_list_vars(Es, Vs));
+lit_vars(#c_map_pair{key=K,val=V}, Vs) -> lit_vars(K, lit_vars(V, Vs));
lit_vars(#c_var{name=V}, Vs) -> add_element(V, Vs);
lit_vars(_, Vs) -> Vs. %These are atomic
@@ -2101,6 +2285,23 @@ bitstr_vars(Segs, Vs) ->
lit_vars(V, lit_vars(S, Vs0))
end, Vs, Segs).
+record_anno(L, St) when L >= ?REC_OFFSET ->
+ case member(dialyzer, St#core.opts) of
+ true ->
+ [record | lineno_anno(L - ?REC_OFFSET, St)];
+ false ->
+ lineno_anno(L, St)
+ end;
+record_anno(L, St) when L < -?REC_OFFSET ->
+ case member(dialyzer, St#core.opts) of
+ true ->
+ [record | lineno_anno(L + ?REC_OFFSET, St)];
+ false ->
+ lineno_anno(L, St)
+ end;
+record_anno(L, St) ->
+ lineno_anno(L, St).
+
lineno_anno(L, St) ->
{line, Line} = erl_parse:get_attribute(L, line),
if
@@ -2150,6 +2351,9 @@ is_simple(#c_literal{}) -> true;
is_simple(#c_cons{hd=H,tl=T}) ->
is_simple(H) andalso is_simple(T);
is_simple(#c_tuple{es=Es}) -> is_simple_list(Es);
+is_simple(#c_map{es=Es}) -> is_simple_list(Es);
+is_simple(#c_map_pair{key=K,val=V}) ->
+ is_simple(K) andalso is_simple(V);
is_simple(_) -> false.
-spec is_simple_list([cerl:cerl()]) -> boolean().
@@ -2167,7 +2371,11 @@ is_simple_list(Es) -> lists:all(fun is_simple/1, Es).
format_error(nomatch) ->
"pattern cannot possibly match";
format_error(bad_binary) ->
- "binary construction will fail because of a type mismatch".
+ "binary construction will fail because of a type mismatch";
+format_error(bad_map_key) ->
+ "map construction will fail because of none literal key (large binaries are not literals)";
+format_error(bad_map) ->
+ "map construction will fail because of a type mismatch".
add_warning(Line, Term, #core{ws=Ws,file=[{file,File}]}=St) when Line >= 0 ->
St#core{ws=[{File,[{location(Line),?MODULE,Term}]}|Ws]};
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index 65f1251099..40d2f72b4c 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -81,7 +81,7 @@
-export([module/2,format_error/1]).
-import(lists, [map/2,foldl/3,foldr/3,mapfoldl/3,splitwith/2,member/2,
- keymember/3,keyfind/3,partition/2]).
+ keymember/3,keyfind/3,partition/2,droplast/1,last/1]).
-import(ordsets, [add_element/2,del_element/2,union/2,union/1,subtract/2]).
-import(cerl, [c_tuple/1]).
@@ -272,6 +272,18 @@ expr(#c_cons{anno=A,hd=Ch,tl=Ct}, Sub, St0) ->
expr(#c_tuple{anno=A,es=Ces}, Sub, St0) ->
{Kes,Ep,St1} = atomic_list(Ces, Sub, St0),
{#k_tuple{anno=A,es=Kes},Ep,St1};
+expr(#c_map{anno=A,arg=Var,es=Ces}, Sub, St0) ->
+ try expr_map(A,Var,Ces,Sub,St0) of
+ {_,_,_}=Res -> Res
+ catch
+ throw:bad_map ->
+ St1 = add_warning(get_line(A), bad_map, A, St0),
+ Erl = #c_literal{val=erlang},
+ Name = #c_literal{val=error},
+ Args = [#c_literal{val=badarg}],
+ Error = #c_call{anno=A,module=Erl,name=Name,args=Args},
+ expr(Error, Sub, St1)
+ end;
expr(#c_binary{anno=A,segments=Cv}, Sub, St0) ->
try atomic_bin(Cv, Sub, St0) of
{Kv,Ep,St1} ->
@@ -347,7 +359,7 @@ expr(#c_case{arg=Ca,clauses=Ccs}, Sub, St0) ->
{Kvs,Pv,St2} = match_vars(Ka, St1), %Must have variables here!
{Km,St3} = kmatch(Kvs, Ccs, Sub, St2),
Match = flatten_seq(build_match(Kvs, Km)),
- {last(Match),Pa ++ Pv ++ first(Match),St3};
+ {last(Match),Pa ++ Pv ++ droplast(Match),St3};
expr(#c_receive{anno=A,clauses=Ccs0,timeout=Ce,action=Ca}, Sub, St0) ->
{Ke,Pe,St1} = atomic(Ce, Sub, St0), %Force this to be atomic!
{Rvar,St2} = new_var(St1),
@@ -493,6 +505,85 @@ translate_match_fail_1(Anno, As, Sub, #kern{ff=FF}) ->
translate_fc(Args) ->
[#c_literal{val=function_clause},make_list(Args)].
+expr_map(A,Var0,Ces,Sub,St0) ->
+ %% An extra pass of validation of Map src because of inlining
+ {Var,Mps,St1} = expr(Var0, Sub, St0),
+ case is_valid_map_src(Var) of
+ true ->
+ {Km,Eps,St2} = map_split_pairs(A, Var, Ces, Sub, St1),
+ {Km,Eps++Mps,St2};
+ false -> throw(bad_map)
+ end.
+
+is_valid_map_src(#k_map{}) -> true;
+is_valid_map_src(#k_literal{val=M}) when is_map(M) -> true;
+is_valid_map_src(#k_var{}) -> true;
+is_valid_map_src(_) -> false.
+
+map_split_pairs(A, Var, Ces, Sub, St0) ->
+ %% two steps
+ %% 1. force variables
+ %% 2. remove multiples
+ Pairs0 = [{Op,K,V} || #c_map_pair{op=#c_literal{val=Op},key=K,val=V} <- Ces],
+ {Pairs,Esp,St1} = foldr(fun
+ ({Op,K0,V0}, {Ops,Espi,Sti0}) when Op =:= assoc; Op =:= exact ->
+ {K,[],Sti1} = expr(K0, Sub, Sti0),
+ {V,Ep,Sti2} = atomic(V0, Sub, Sti1),
+ {[{Op,K,V}|Ops],Ep ++ Espi,Sti2}
+ end, {[],[],St0}, Pairs0),
+
+ case map_group_pairs(Pairs) of
+ {Assoc,[]} ->
+ Kes = [#k_map_pair{key=K,val=V}||{_,{assoc,K,V}} <- Assoc],
+ {#k_map{anno=A,op=assoc,var=Var,es=Kes},Esp,St1};
+ {[],Exact} ->
+ Kes = [#k_map_pair{key=K,val=V}||{_,{exact,K,V}} <- Exact],
+ {#k_map{anno=A,op=exact,var=Var,es=Kes},Esp,St1};
+ {Assoc,Exact} ->
+ Kes1 = [#k_map_pair{key=K,val=V}||{_,{assoc,K,V}} <- Assoc],
+ {Mvar,Em,St2} = force_atomic(#k_map{anno=A,op=assoc,var=Var,es=Kes1},St1),
+ Kes2 = [#k_map_pair{key=K,val=V}||{_,{exact,K,V}} <- Exact],
+ {#k_map{anno=A,op=exact,var=Mvar,es=Kes2},Esp ++ Em,St2}
+
+ end.
+
+%% Group map by Assoc operations and Exact operations
+
+map_group_pairs(Es) ->
+ Groups = dict:to_list(map_group_pairs(Es,dict:new())),
+ partition(fun({_,{Op,_,_}}) -> Op =:= assoc end, Groups).
+
+map_group_pairs([{assoc,K,V}|Es0],Used0) ->
+ Used1 = case map_key_is_used(K,Used0) of
+ {ok, {assoc,_,_}} -> map_key_set_used(K,{assoc,K,V},Used0);
+ {ok, {exact,_,_}} -> map_key_set_used(K,{exact,K,V},Used0);
+ _ -> map_key_set_used(K,{assoc,K,V},Used0)
+ end,
+ map_group_pairs(Es0,Used1);
+map_group_pairs([{exact,K,V}|Es0],Used0) ->
+ Used1 = case map_key_is_used(K,Used0) of
+ {ok, {assoc,_,_}} -> map_key_set_used(K,{assoc,K,V},Used0);
+ {ok, {exact,_,_}} -> map_key_set_used(K,{exact,K,V},Used0);
+ _ -> map_key_set_used(K,{exact,K,V},Used0)
+ end,
+ map_group_pairs(Es0,Used1);
+map_group_pairs([],Used) ->
+ Used.
+
+map_key_set_used(K,How,Used) ->
+ dict:store(map_key_clean(K),How,Used).
+
+map_key_is_used(K,Used) ->
+ dict:find(map_key_clean(K),Used).
+
+%% Be explicit instead of using set_kanno(K,[])
+map_key_clean(#k_literal{val=V}) -> {k_literal,V};
+map_key_clean(#k_int{val=V}) -> {k_int,V};
+map_key_clean(#k_float{val=V}) -> {k_float,V};
+map_key_clean(#k_atom{val=V}) -> {k_atom,V};
+map_key_clean(#k_nil{}) -> k_nil.
+
+
%% call_type(Module, Function, Arity) -> call | bif | apply | error.
%% Classify the call.
call_type(#c_literal{val=M}, #c_literal{val=F}, Ar) when is_atom(M), is_atom(F) ->
@@ -648,6 +739,9 @@ pattern(#c_cons{anno=A,hd=Ch,tl=Ct}, Isub, Osub0, St0) ->
pattern(#c_tuple{anno=A,es=Ces}, Isub, Osub0, St0) ->
{Kes,Osub1,St1} = pattern_list(Ces, Isub, Osub0, St0),
{#k_tuple{anno=A,es=Kes},Osub1,St1};
+pattern(#c_map{anno=A,es=Ces}, Isub, Osub0, St0) ->
+ {Kes,Osub1,St1} = pattern_map_pairs(Ces, Isub, Osub0, St0),
+ {#k_map{anno=A,op=exact,es=Kes},Osub1,St1};
pattern(#c_binary{anno=A,segments=Cv}, Isub, Osub0, St0) ->
{Kv,Osub1,St1} = pattern_bin(Cv, Isub, Osub0, St0),
{#k_binary{anno=A,segs=Kv},Osub1,St1};
@@ -662,6 +756,25 @@ flatten_alias(#c_alias{var=V,pat=P}) ->
{[V|Vs],Pat};
flatten_alias(Pat) -> {[],Pat}.
+pattern_map_pairs(Ces0, Isub, Osub0, St0) ->
+ %% It is assumed that all core keys are literals
+ %% It is later assumed that these keys are term sorted
+ %% so we need to sort them here
+ Ces1 = lists:sort(fun
+ (#c_map_pair{key=CkA},#c_map_pair{key=CkB}) ->
+ A = core_lib:literal_value(CkA),
+ B = core_lib:literal_value(CkB),
+ erts_internal:cmp_term(A,B) < 0
+ end, Ces0),
+ %% pattern the pair keys and values as normal
+ {Kes,{Osub1,St1}} = lists:mapfoldl(fun
+ (#c_map_pair{anno=A,key=Ck,val=Cv},{Osubi0,Sti0}) ->
+ {Kk,Osubi1,Sti1} = pattern(Ck, Isub, Osubi0, Sti0),
+ {Kv,Osubi2,Sti2} = pattern(Cv, Isub, Osubi1, Sti1),
+ {#k_map_pair{anno=A,key=Kk,val=Kv},{Osubi2,Sti2}}
+ end, {Osub0, St0}, Ces1),
+ {Kes,Osub1,St1}.
+
pattern_bin(Es, Isub, Osub0, St0) ->
{Kbin,{_,Osub},St} = pattern_bin_1(Es, Isub, Osub0, St0),
{Kbin,Osub,St}.
@@ -826,15 +939,6 @@ foldr2(Fun, Acc0, [E1|L1], [E2|L2]) ->
foldr2(Fun, Acc1, L1, L2);
foldr2(_, Acc, [], []) -> Acc.
-%% first([A]) -> [A].
-%% last([A]) -> A.
-
-last([L]) -> L;
-last([_|T]) -> last(T).
-
-first([_]) -> [];
-first([H|T]) -> [H|first(T)].
-
%% This code implements the algorithm for an optimizing compiler for
%% pattern matching given "The Implementation of Functional
%% Programming Languages" by Simon Peyton Jones. The code is much
@@ -1015,7 +1119,8 @@ match_con_1([U|_Us] = L, Cs, Def, St0) ->
%% Extract clauses for different constructors (types).
%%ok = io:format("match_con ~p~n", [Cs]),
Ttcs = select_types([k_binary], Cs) ++ select_bin_con(Cs) ++
- select_types([k_cons,k_tuple,k_atom,k_float,k_int,k_nil,k_literal], Cs),
+ select_types([k_cons,k_tuple,k_map,k_atom,k_float,k_int,
+ k_nil,k_literal], Cs),
%%ok = io:format("ttcs = ~p~n", [Ttcs]),
{Scs,St1} =
mapfoldl(fun ({T,Tcs}, St) ->
@@ -1251,10 +1356,9 @@ group_value(k_cons, Cs) -> [Cs]; %These are single valued
group_value(k_nil, Cs) -> [Cs];
group_value(k_binary, Cs) -> [Cs];
group_value(k_bin_end, Cs) -> [Cs];
-group_value(k_bin_seg, Cs) ->
- group_bin_seg(Cs);
-group_value(k_bin_int, Cs) ->
- [Cs];
+group_value(k_bin_seg, Cs) -> group_bin_seg(Cs);
+group_value(k_bin_int, Cs) -> [Cs];
+group_value(k_map, Cs) -> group_map(Cs);
group_value(_, Cs) ->
%% group_value(Cs).
Cd = foldl(fun (C, Gcs0) -> dict:append(clause_val(C), C, Gcs0) end,
@@ -1267,6 +1371,12 @@ group_bin_seg([C1|Cs]) ->
[[C1|More]|group_bin_seg(Rest)];
group_bin_seg([]) -> [].
+group_map([C1|Cs]) ->
+ V1 = clause_val(C1),
+ {More,Rest} = splitwith(fun (C) -> clause_val(C) =:= V1 end, Cs),
+ [[C1|More]|group_map(Rest)];
+group_map([]) -> [].
+
%% Profiling shows that this quadratic implementation account for a big amount
%% of the execution time if there are many values.
% group_value([C|Cs]) ->
@@ -1315,6 +1425,13 @@ get_match(#k_bin_int{}=BinInt, St0) ->
get_match(#k_tuple{es=Es}, St0) ->
{Mes,St1} = new_vars(length(Es), St0),
{#k_tuple{es=Mes},Mes,St1};
+get_match(#k_map{op=exact,es=Es0}, St0) ->
+ {Mes,St1} = new_vars(length(Es0), St0),
+ {Es,_} = mapfoldl(fun
+ (#k_map_pair{}=Pair, [V|Vs]) ->
+ {Pair#k_map_pair{val=V},Vs}
+ end, Mes, Es0),
+ {#k_map{op=exact,es=Es},Mes,St1};
get_match(M, St) ->
{M,[],St}.
@@ -1331,7 +1448,11 @@ new_clauses(Cs0, U, St) ->
[S,N|As];
#k_bin_int{next=N} ->
[N|As];
- _Other -> As
+ #k_map{op=exact,es=Es} ->
+ Vals = [V || #k_map_pair{val=V} <- Es],
+ Vals ++ As;
+ _Other ->
+ As
end,
Vs = arg_alias(Arg),
Osub1 = foldl(fun (#k_var{name=V}, Acc) ->
@@ -1406,6 +1527,7 @@ arg_con(Arg) ->
#k_nil{} -> k_nil;
#k_cons{} -> k_cons;
#k_tuple{} -> k_tuple;
+ #k_map{} -> k_map;
#k_binary{} -> k_binary;
#k_bin_end{} -> k_bin_end;
#k_bin_seg{} -> k_bin_seg;
@@ -1426,7 +1548,15 @@ arg_val(Arg, C) ->
{#k_var{name=get_vsub(V, Isub)},U,T,Fs};
_ ->
{set_kanno(S, []),U,T,Fs}
- end
+ end;
+ #k_map{op=exact,es=Es} ->
+ Keys = [begin
+ #k_map_pair{key=#k_literal{val=Key}} = Pair,
+ Key
+ end || Pair <- Es],
+ %% multiple keys may have the same name
+ %% do not use ordsets
+ lists:sort(fun(A,B) -> erts_internal:cmp_term(A,B) < 0 end, Keys)
end.
%% ubody_used_vars(Expr, State) -> [UsedVar]
@@ -1795,6 +1925,10 @@ lit_vars(#k_atom{}) -> [];
lit_vars(#k_nil{}) -> [];
lit_vars(#k_cons{hd=H,tl=T}) ->
union(lit_vars(H), lit_vars(T));
+lit_vars(#k_map{var=Var,es=Es}) ->
+ lit_list_vars([Var|Es]);
+lit_vars(#k_map_pair{key=K,val=V}) ->
+ union(lit_vars(K), lit_vars(V));
lit_vars(#k_binary{segs=V}) -> lit_vars(V);
lit_vars(#k_bin_end{}) -> [];
lit_vars(#k_bin_seg{size=Size,seg=S,next=N}) ->
@@ -1830,7 +1964,11 @@ pat_vars(#k_bin_int{size=Size}) ->
{U,[]};
pat_vars(#k_bin_end{}) -> {[],[]};
pat_vars(#k_tuple{es=Es}) ->
- pat_list_vars(Es).
+ pat_list_vars(Es);
+pat_vars(#k_map{es=Es}) ->
+ pat_list_vars(Es);
+pat_vars(#k_map_pair{val=V}) ->
+ pat_vars(V).
pat_list_vars(Ps) ->
foldl(fun (P, {Used0,New0}) ->
@@ -1871,7 +2009,9 @@ format_error(nomatch_shadow) ->
format_error(bad_call) ->
"invalid module and/or function name; this call will always fail";
format_error(bad_segment_size) ->
- "binary construction will fail because of a type mismatch".
+ "binary construction will fail because of a type mismatch";
+format_error(bad_map) ->
+ "map construction will fail because of a type mismatch".
add_warning(none, Term, Anno, #kern{ws=Ws}=St) ->
File = get_file(Anno),
diff --git a/lib/compiler/src/v3_kernel.hrl b/lib/compiler/src/v3_kernel.hrl
index fb8baf398b..ab66445f73 100644
--- a/lib/compiler/src/v3_kernel.hrl
+++ b/lib/compiler/src/v3_kernel.hrl
@@ -38,6 +38,8 @@
-record(k_nil, {anno=[]}).
-record(k_tuple, {anno=[],es}).
+-record(k_map, {anno=[],var,op,es}).
+-record(k_map_pair, {anno=[],key,val}).
-record(k_cons, {anno=[],hd,tl}).
-record(k_binary, {anno=[],segs}).
-record(k_bin_seg, {anno=[],size,unit,type,flags,seg,next}).
diff --git a/lib/compiler/src/v3_kernel_pp.erl b/lib/compiler/src/v3_kernel_pp.erl
index e363a5387a..b33eba50eb 100644
--- a/lib/compiler/src/v3_kernel_pp.erl
+++ b/lib/compiler/src/v3_kernel_pp.erl
@@ -104,6 +104,30 @@ format_1(#k_tuple{es=Es}, Ctxt) ->
format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
$}
];
+format_1(#k_map{var=#k_literal{val=M},op=assoc,es=Es}, Ctxt) when is_map(M), map_size(M) =:= 0 ->
+ ["~{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ "}~"
+ ];
+format_1(#k_map{var=#k_literal{val=M},op=exact,es=Es}, Ctxt) when is_map(M), map_size(M) =:= 0 ->
+ ["::{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ "}::"
+ ];
+format_1(#k_map{var=Var,op=assoc,es=Es}, Ctxt) ->
+ ["~{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ " | ",format_1(Var, Ctxt),
+ "}~"
+ ];
+format_1(#k_map{var=Var,op=exact,es=Es}, Ctxt) ->
+ ["::{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ " | ",format_1(Var, Ctxt),
+ "}::"
+ ];
+format_1(#k_map_pair{key=K,val=V}, Ctxt) ->
+ ["<",format(K, Ctxt),",",format(V, Ctxt),">"];
format_1(#k_binary{segs=S}, Ctxt) ->
["#<",format(S, ctxt_bump_indent(Ctxt, 2)),">#"];
format_1(#k_bin_seg{next=Next}=S, Ctxt) ->
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index 2cc3493570..cd4b5fd674 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -323,7 +323,8 @@ type(k_tuple) -> tuple;
type(k_binary) -> binary;
type(k_bin_seg) -> bin_seg;
type(k_bin_int) -> bin_int;
-type(k_bin_end) -> bin_end.
+type(k_bin_end) -> bin_end;
+type(k_map) -> map.
%% variable(Klit) -> Lit.
%% var_list([Klit]) -> [Lit].
@@ -365,6 +366,10 @@ literal(#k_bin_end{}, Ctxt) ->
{bin_end,Ctxt};
literal(#k_tuple{es=Es}, Ctxt) ->
{tuple,literal_list(Es, Ctxt)};
+literal(#k_map{op=Op,var=Var,es=Es}, Ctxt) ->
+ {map,Op,literal(Var, Ctxt),literal_list(Es, Ctxt)};
+literal(#k_map_pair{key=K,val=V}, Ctxt) ->
+ {map_pair,literal(K, Ctxt),literal(V, Ctxt)};
literal(#k_literal{val=V}, _Ctxt) ->
{literal,V}.
@@ -393,7 +398,11 @@ literal2(#k_bin_int{size=S,unit=U,flags=Fs,val=Int,next=N}, Ctxt) ->
literal2(#k_bin_end{}, Ctxt) ->
{bin_end,Ctxt};
literal2(#k_tuple{es=Es}, Ctxt) ->
- {tuple,literal_list2(Es, Ctxt)}.
+ {tuple,literal_list2(Es, Ctxt)};
+literal2(#k_map{op=Op,es=Es}, Ctxt) ->
+ {map,Op,literal_list2(Es, Ctxt)};
+literal2(#k_map_pair{key=K,val=V}, Ctxt) ->
+ {map_pair,literal2(K, Ctxt),literal2(V, Ctxt)}.
literal_list2(Ks, Ctxt) ->
[literal2(K, Ctxt) || K <- Ks].
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 51b3064589..0b56a49cd6 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -26,6 +26,7 @@ MODULES= \
guard_SUITE \
inline_SUITE \
lc_SUITE \
+ map_SUITE \
match_SUITE \
misc_SUITE \
num_bif_SUITE \
@@ -47,6 +48,7 @@ NO_OPT= \
fun \
guard \
lc \
+ map \
match \
misc \
num_bif \
@@ -67,6 +69,7 @@ INLINE= \
fun \
guard \
lc \
+ map \
match \
misc \
num_bif \
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl
index 4ffbe07e32..b5408ecd8f 100644
--- a/lib/compiler/test/andor_SUITE.erl
+++ b/lib/compiler/test/andor_SUITE.erl
@@ -129,6 +129,10 @@ t_case_y(X, Y, Z) ->
Y =:= 100
end.
+-define(GUARD(E), if E -> true;
+ true -> false
+ end).
+
t_and_or(Config) when is_list(Config) ->
?line true = true and true,
?line false = true and false,
@@ -160,11 +164,16 @@ t_and_or(Config) when is_list(Config) ->
?line true = false or id(true),
?line false = false or id(false),
- ok.
+ True = id(true),
--define(GUARD(E), if E -> true;
- true -> false
- end).
+ false = ?GUARD(erlang:'and'(bar, True)),
+ false = ?GUARD(erlang:'or'(bar, True)),
+ false = ?GUARD(erlang:'not'(erlang:'and'(bar, True))),
+ false = ?GUARD(erlang:'not'(erlang:'not'(erlang:'and'(bar, True)))),
+
+ true = (fun (X = true) when X or true or X -> true end)(True),
+
+ ok.
t_andalso(Config) when is_list(Config) ->
Bs = [true,false],
@@ -194,6 +203,9 @@ t_andalso(Config) when is_list(Config) ->
?line false = id(false) andalso not id(glurf),
?line false = false andalso not id(glurf),
+ true = begin (X1 = true) andalso X1, X1 end,
+ false = false = begin (X2 = false) andalso X2, X2 end,
+
ok.
t_orelse(Config) when is_list(Config) ->
@@ -224,6 +236,9 @@ t_orelse(Config) when is_list(Config) ->
?line true = id(true) orelse not id(glurf),
?line true = true orelse not id(glurf),
+ true = begin (X1 = true) orelse X1, X1 end,
+ false = begin (X2 = false) orelse X2, X2 end,
+
ok.
t_andalso_1({X,Y}) ->
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl
index bf67eedd5f..d088863c5c 100644
--- a/lib/compiler/test/beam_except_SUITE.erl
+++ b/lib/compiler/test/beam_except_SUITE.erl
@@ -57,6 +57,11 @@ coverage(_) ->
{'EXIT',{undef,[{erlang,error,[a,b,c],_}|_]}} =
(catch erlang:error(a, b, c)),
+
+ {'EXIT',{badarith,[{?MODULE,bar,1,[File,{line,9}]}|_]}} =
+ (catch bar(x)),
+ {'EXIT',{{case_clause,{1}},[{?MODULE,bar,1,[File,{line,9}]}|_]}} =
+ (catch bar(0)),
ok.
-file("fake.erl", 1).
@@ -65,3 +70,8 @@ fc(a) -> %Line 2
fc(L) when length(L) > 2 -> %Line 4
%% Not the same as a "real" function_clause error.
error(function_clause, [L]). %Line 6
+%% Would crash the compiler.
+bar(X) -> %Line 8
+ case {X+1} of %Line 9
+ 1 -> ok %Line 10
+ end. %Line 11
diff --git a/lib/compiler/test/bs_bincomp_SUITE.erl b/lib/compiler/test/bs_bincomp_SUITE.erl
index f6d8b1c532..4450405695 100644
--- a/lib/compiler/test/bs_bincomp_SUITE.erl
+++ b/lib/compiler/test/bs_bincomp_SUITE.erl
@@ -25,7 +25,7 @@
init_per_group/2,end_per_group/2,
byte_aligned/1,bit_aligned/1,extended_byte_aligned/1,
extended_bit_aligned/1,mixed/1,filters/1,trim_coverage/1,
- nomatch/1,sizes/1,tail/1]).
+ nomatch/1,sizes/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,7 +35,7 @@ all() ->
test_lib:recompile(?MODULE),
[byte_aligned, bit_aligned, extended_byte_aligned,
extended_bit_aligned, mixed, filters, trim_coverage,
- nomatch, sizes, tail].
+ nomatch, sizes].
groups() ->
[].
@@ -290,40 +290,6 @@ sizes(Config) when is_list(Config) ->
?line cs_end(),
ok.
-tail(Config) when is_list(Config) ->
- ?line [] = tail_1(<<0:7>>),
- ?line [0] = tail_1(<<0>>),
- ?line [0] = tail_1(<<0:12>>),
- ?line [0,0] = tail_1(<<0:20>>),
-
- ?line [] = tail_2(<<0:7>>),
- ?line [42] = tail_2(<<0>>),
- ?line [] = tail_2(<<0:12>>),
- ?line [42,42] = tail_2(<<0,1>>),
-
- ?line <<>> = tail_3(<<0:7>>),
- ?line <<42>> = tail_3(<<0>>),
- ?line <<42>> = tail_3(<<0:12>>),
- ?line <<42,42>> = tail_3(<<0:20>>),
-
- ?line [] = tail_4(<<0:15>>),
- ?line [7] = tail_4(<<7,8>>),
- ?line [9] = tail_4(<<9,17:12>>),
- ok.
-
-tail_1(Bits) ->
- [X || <<X:8/integer, _/bits>> <= Bits].
-
-tail_2(Bits) ->
- [42 || <<_:8/integer, _/bytes>> <= Bits].
-
-tail_3(Bits) ->
- << <<42>> || <<_:8/integer, _/bits>> <= Bits >>.
-
-tail_4(Bits) ->
- [X || <<X:8/integer, Tail/bits>> <= Bits, bit_size(Tail) >= 8].
-
-
cs_init() ->
erts_debug:set_internal_state(available_internal_state, true),
ok.
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index 9f15845d33..10e3451e8f 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -34,7 +34,7 @@
otp_7188/1,otp_7233/1,otp_7240/1,otp_7498/1,
match_string/1,zero_width/1,bad_size/1,haystack/1,
cover_beam_bool/1,matched_out_size/1,follow_fail_branch/1,
- no_partition/1]).
+ no_partition/1,calling_a_binary/1,binary_in_map/1]).
-export([coverage_id/1,coverage_external_ignore/2]).
@@ -59,7 +59,7 @@ groups() ->
matching_and_andalso,otp_7188,otp_7233,otp_7240,
otp_7498,match_string,zero_width,bad_size,haystack,
cover_beam_bool,matched_out_size,follow_fail_branch,
- no_partition]}].
+ no_partition,calling_a_binary,binary_in_map]}].
init_per_suite(Config) ->
@@ -1178,6 +1178,37 @@ no_partition_2([], a5) ->
no_partition_2(42.0, a6) ->
six.
+calling_a_binary(Config) when is_list(Config) ->
+ [] = call_binary(<<>>, []),
+ {'EXIT',{badarg,_}} = (catch call_binary(<<1>>, [])),
+ {'EXIT',{badarg,_}} = (catch call_binary(<<1,2,3>>, [])),
+ ok.
+
+call_binary(<<>>, Acc) ->
+ Acc;
+call_binary(<<H,T/bits>>, Acc) ->
+ T(<<Acc/binary,H>>).
+
+binary_in_map(Config) when is_list(Config) ->
+ ok = match_binary_in_map(#{key => <<42:8>>}),
+ {'EXIT',{{badmatch,#{key := 1}},_}} =
+ (catch match_binary_in_map(#{key => 1})),
+ {'EXIT',{{badmatch,#{key := <<1023:16>>}},_}} =
+ (catch match_binary_in_map(#{key => <<1023:16>>})),
+ {'EXIT',{{badmatch,#{key := <<1:8>>}},_}} =
+ (catch match_binary_in_map(#{key => <<1:8>>})),
+ {'EXIT',{{badmatch,not_a_map},_}} =
+ (catch match_binary_in_map(not_a_map)),
+ ok.
+
+match_binary_in_map(Map) ->
+ case 8 of
+ N ->
+ #{key := <<42:N>>} = Map,
+ ok
+ end.
+
+
check(F, R) ->
R = F().
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index d517029b1b..f7b1dbdddf 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -196,7 +196,7 @@ redundant_case_1(_) -> d.
failure(Module, Conf) ->
?line Src = filename:join(?config(data_dir, Conf), atom_to_list(Module)),
?line Out = ?config(priv_dir,Conf),
- ?line io:format("Compiling: ~s\n", [Src]),
+ ?line io:format("Compiling: ~ts\n", [Src]),
?line CompRc = compile:file(Src, [{outdir,Out},return,time]),
?line io:format("Result: ~p\n",[CompRc]),
?line case CompRc of
@@ -278,6 +278,16 @@ try_it(StartNode, Module, Conf) ->
?line ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]),
?line test_server:timetrap_cancel(LastDog),
+ AsmDog = test_server:timetrap(test_server:minutes(10)),
+ io:format("Compiling (from assembly): ~s\n", [Src]),
+ {ok,_} = compile:file(Src, [to_asm,{outdir,Out},report|OtherOpts]),
+ Asm = filename:join(Out, lists:concat([Module, ".S"])),
+ CompRc3 = compile:file(Asm, [from_asm,{outdir,Out},report|OtherOpts]),
+ io:format("Result: ~p\n",[CompRc3]),
+ {ok,_} = CompRc3,
+ ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]),
+ test_server:timetrap_cancel(AsmDog),
+
case StartNode of
false -> ok;
true -> ?line test_server:stop_node(Node)
@@ -466,8 +476,8 @@ self_compile_node(CompilerDir, OutDir, Version, Opts) ->
ok.
compile_compiler(Files, OutDir, Version, InlineOpts) ->
- io:format("~s", [code:which(compile)]),
- io:format("Compiling ~s into ~s", [Version,OutDir]),
+ io:format("~ts", [code:which(compile)]),
+ io:format("Compiling ~s into ~ts", [Version,OutDir]),
Opts = [report,
bin_opt_info,
{outdir,OutDir},
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index be01ea713d..8cb7d1b55b 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -24,7 +24,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
- app_test/1,
+ app_test/1,appup_test/1,
file_1/1, forms_2/1, module_mismatch/1, big_file/1, outdir/1,
binary/1, makedep/1, cond_and_ifdef/1, listings/1, listings_big/1,
other_output/1, encrypted_abstr/1,
@@ -42,7 +42,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [app_test, file_1, forms_2, module_mismatch, big_file, outdir,
+ [app_test, appup_test, file_1, forms_2, module_mismatch, big_file, outdir,
binary, makedep, cond_and_ifdef, listings, listings_big,
other_output, encrypted_abstr,
{group, bad_record_use}, strict_record,
@@ -71,6 +71,10 @@ end_per_group(_GroupName, Config) ->
app_test(Config) when is_list(Config) ->
?line ?t:app_test(compiler).
+%% Test that the Application upgrade file has no `basic' errors.";
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(compiler).
+
%% Tests that we can compile and run a simple Erlang program,
%% using compile:file/1.
@@ -286,57 +290,67 @@ cond_and_ifdef(Config) when is_list(Config) ->
ok.
listings(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:minutes(8)),
- ?line DataDir = ?config(data_dir, Config),
- ?line PrivDir = ?config(priv_dir, Config),
- ?line Simple = filename:join(DataDir, simple),
- ?line TargetDir = filename:join(PrivDir, listings),
- ?line ok = file:make_dir(TargetDir),
+ Dog = test_server:timetrap(test_server:minutes(8)),
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ ok = do_file_listings(DataDir, PrivDir, [
+ "simple",
+ "small",
+ "small_maps"
+ ]),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+do_file_listings(_, _, []) -> ok;
+do_file_listings(DataDir, PrivDir, [File|Files]) ->
+ Simple = filename:join(DataDir, File),
+ TargetDir = filename:join(PrivDir, listings),
+ ok = file:make_dir(TargetDir),
%% Test all dedicated listing options.
- ?line do_listing(Simple, TargetDir, 'S'),
- ?line do_listing(Simple, TargetDir, 'E'),
- ?line do_listing(Simple, TargetDir, 'P'),
- ?line do_listing(Simple, TargetDir, dpp, ".pp"),
- ?line do_listing(Simple, TargetDir, dabstr, ".abstr"),
- ?line do_listing(Simple, TargetDir, dexp, ".expand"),
- ?line do_listing(Simple, TargetDir, dcore, ".core"),
- ?line do_listing(Simple, TargetDir, doldinline, ".oldinline"),
- ?line do_listing(Simple, TargetDir, dinline, ".inline"),
- ?line do_listing(Simple, TargetDir, dcore, ".core"),
- ?line do_listing(Simple, TargetDir, dcopt, ".copt"),
- ?line do_listing(Simple, TargetDir, dsetel, ".dsetel"),
- ?line do_listing(Simple, TargetDir, dkern, ".kernel"),
- ?line do_listing(Simple, TargetDir, dlife, ".life"),
- ?line do_listing(Simple, TargetDir, dcg, ".codegen"),
- ?line do_listing(Simple, TargetDir, dblk, ".block"),
- ?line do_listing(Simple, TargetDir, dbool, ".bool"),
- ?line do_listing(Simple, TargetDir, dtype, ".type"),
- ?line do_listing(Simple, TargetDir, ddead, ".dead"),
- ?line do_listing(Simple, TargetDir, djmp, ".jump"),
- ?line do_listing(Simple, TargetDir, dclean, ".clean"),
- ?line do_listing(Simple, TargetDir, dpeep, ".peep"),
- ?line do_listing(Simple, TargetDir, dopt, ".optimize"),
+ do_listing(Simple, TargetDir, 'S'),
+ do_listing(Simple, TargetDir, 'E'),
+ do_listing(Simple, TargetDir, 'P'),
+ do_listing(Simple, TargetDir, dpp, ".pp"),
+ do_listing(Simple, TargetDir, dabstr, ".abstr"),
+ do_listing(Simple, TargetDir, dexp, ".expand"),
+ do_listing(Simple, TargetDir, dcore, ".core"),
+ do_listing(Simple, TargetDir, doldinline, ".oldinline"),
+ do_listing(Simple, TargetDir, dinline, ".inline"),
+ do_listing(Simple, TargetDir, dcore, ".core"),
+ do_listing(Simple, TargetDir, dcopt, ".copt"),
+ do_listing(Simple, TargetDir, dsetel, ".dsetel"),
+ do_listing(Simple, TargetDir, dkern, ".kernel"),
+ do_listing(Simple, TargetDir, dlife, ".life"),
+ do_listing(Simple, TargetDir, dcg, ".codegen"),
+ do_listing(Simple, TargetDir, dblk, ".block"),
+ do_listing(Simple, TargetDir, dbool, ".bool"),
+ do_listing(Simple, TargetDir, dtype, ".type"),
+ do_listing(Simple, TargetDir, ddead, ".dead"),
+ do_listing(Simple, TargetDir, djmp, ".jump"),
+ do_listing(Simple, TargetDir, dclean, ".clean"),
+ do_listing(Simple, TargetDir, dpeep, ".peep"),
+ do_listing(Simple, TargetDir, dopt, ".optimize"),
%% First clean up.
- ?line Listings = filename:join(PrivDir, listings),
- ?line lists:foreach(fun(F) -> ok = file:delete(F) end,
- filelib:wildcard(filename:join(Listings, "*"))),
+ Listings = filename:join(PrivDir, listings),
+ lists:foreach(fun(F) -> ok = file:delete(F) end,
+ filelib:wildcard(filename:join(Listings, "*"))),
%% Test options that produce a listing file if 'binary' is not given.
- ?line do_listing(Simple, TargetDir, to_pp, ".P"),
- ?line do_listing(Simple, TargetDir, to_exp, ".E"),
- ?line do_listing(Simple, TargetDir, to_core0, ".core"),
- ?line ok = file:delete(filename:join(Listings, "simple.core")),
- ?line do_listing(Simple, TargetDir, to_core, ".core"),
- ?line do_listing(Simple, TargetDir, to_kernel, ".kernel"),
+ do_listing(Simple, TargetDir, to_pp, ".P"),
+ do_listing(Simple, TargetDir, to_exp, ".E"),
+ do_listing(Simple, TargetDir, to_core0, ".core"),
+ ok = file:delete(filename:join(Listings, File ++ ".core")),
+ do_listing(Simple, TargetDir, to_core, ".core"),
+ do_listing(Simple, TargetDir, to_kernel, ".kernel"),
%% Final clean up.
- ?line lists:foreach(fun(F) -> ok = file:delete(F) end,
- filelib:wildcard(filename:join(Listings, "*"))),
- ?line ok = file:del_dir(Listings),
- ?line test_server:timetrap_cancel(Dog),
- ok.
+ lists:foreach(fun(F) -> ok = file:delete(F) end,
+ filelib:wildcard(filename:join(Listings, "*"))),
+ ok = file:del_dir(Listings),
+
+ do_file_listings(DataDir,PrivDir,Files).
listings_big(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:minutes(10)),
@@ -415,11 +429,11 @@ encrypted_abstr(Config) when is_list(Config) ->
?line {Simple,Target} = files(Config, "encrypted_abstr"),
Res = case has_crypto() of
- no ->
+ false ->
%% No crypto.
?line encrypted_abstr_no_crypto(Simple, Target),
{comment,"The crypto application is missing or broken"};
- yes ->
+ true ->
%% Simulate not having crypto by removing
%% the crypto application from the path.
?line OldPath = code:get_path(),
@@ -511,6 +525,7 @@ write_crypt_file(Contents0) ->
ok = file:write_file(".erlang.crypt", Contents).
encrypted_abstr_no_crypto(Simple, Target) ->
+ io:format("simpe: ~p~n", [Simple]),
?line TargetDir = filename:dirname(Target),
?line Key = "ablurf123BX#$;3",
?line error = compile:file(Simple,
@@ -525,11 +540,11 @@ verify_abstract(Target) ->
has_crypto() ->
try
crypto:start(),
- crypto:info(),
+ <<_,_,_,_,_>> = crypto:rand_bytes(5),
crypto:stop(),
- yes
+ true
catch
- error:_ -> no
+ error:_ -> false
end.
install_crypto_key(Key) ->
@@ -769,8 +784,8 @@ do_core({M,A}, Outdir) ->
error
end.
-%% Compile to Beam assembly language (.S) and the try to
-%% run .S throught the compiler again.
+%% Compile to Beam assembly language (.S) and then try to
+%% run .S through the compiler again.
asm(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:minutes(20)),
@@ -791,10 +806,10 @@ do_asm(Beam, Outdir) ->
try
{ok,M,Asm} = compile:forms(A, ['S']),
AsmFile = filename:join(Outdir, atom_to_list(M)++".S"),
- {ok,Fd} = file:open(AsmFile, [write]),
+ {ok,Fd} = file:open(AsmFile, [write,{encoding,utf8}]),
beam_listing:module(Fd, Asm),
ok = file:close(Fd),
- case compile:file(AsmFile, [from_asm,no_postopt,binary,report]) of
+ case compile:file(AsmFile, [from_asm,binary,report]) of
{ok,M,_} ->
ok = file:delete(AsmFile);
Other ->
diff --git a/lib/compiler/test/compile_SUITE_data/small.erl b/lib/compiler/test/compile_SUITE_data/small.erl
new file mode 100644
index 0000000000..37cd270e50
--- /dev/null
+++ b/lib/compiler/test/compile_SUITE_data/small.erl
@@ -0,0 +1,48 @@
+-module(small).
+
+-export([go/0,go/2]).
+
+
+-small_attribute({value,3}).
+
+go() -> go(3, 3.0).
+go(A,B) ->
+ V1 = A + B,
+ V2 = A * B,
+ V3 = V1 / V2,
+ V4 = V3 / 0.3,
+ V5 = V1 + V2 + V3 + V4,
+ try
+ R = call(<<"wazzup">>, A),
+ {A,B,V5,R,t(),recv()}
+ catch
+ C:E ->
+ {error, C, E}
+ end.
+
+-spec call(binary(), term()) -> binary().
+
+call(<<"wa", B/binary>>,V) when is_integer(V) -> B;
+call(B,_) -> B.
+
+t() ->
+ <<23:32, V:14, _:2, B/binary>> = id(<<"wazzup world">>),
+ {V,B}.
+
+recv() ->
+ F = fun() ->
+ receive
+ 1 -> ok;
+ 2 -> ok;
+ 3 -> ok;
+ a -> ok;
+ _ -> none
+ after 0 -> tmo
+ end
+ end,
+ tmo = F(),
+ ok.
+
+
+id(I) -> I.
+
diff --git a/lib/compiler/test/compile_SUITE_data/small_maps.erl b/lib/compiler/test/compile_SUITE_data/small_maps.erl
new file mode 100644
index 0000000000..a17a136a7d
--- /dev/null
+++ b/lib/compiler/test/compile_SUITE_data/small_maps.erl
@@ -0,0 +1,16 @@
+-module(small_maps).
+
+-export([go/0,go/1]).
+
+go() ->
+ go(1337).
+
+go(V0) ->
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1] },
+ {some_val,[1337,{some_val,1337}]} = get_val(M1),
+ ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl
index a40dc32d59..428ad65364 100644
--- a/lib/compiler/test/core_SUITE.erl
+++ b/lib/compiler/test/core_SUITE.erl
@@ -23,7 +23,8 @@
init_per_testcase/2,end_per_testcase/2,
dehydrated_itracer/1,nested_tries/1,
seq_in_guard/1,make_effect_seq/1,eval_is_boolean/1,
- unsafe_case/1,nomatch_shadow/1,reversed_annos/1]).
+ unsafe_case/1,nomatch_shadow/1,reversed_annos/1,
+ map_core_test/1,eval_case/1,bad_boolean_guard/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -48,7 +49,9 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
[dehydrated_itracer,nested_tries,seq_in_guard,make_effect_seq,
- eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos]}].
+ eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos,
+ map_core_test,eval_case,bad_boolean_guard
+ ]}].
init_per_suite(Config) ->
@@ -72,6 +75,9 @@ end_per_group(_GroupName, Config) ->
?comp(unsafe_case).
?comp(nomatch_shadow).
?comp(reversed_annos).
+?comp(map_core_test).
+?comp(eval_case).
+?comp(bad_boolean_guard).
try_it(Mod, Conf) ->
Src = filename:join(?config(data_dir, Conf), atom_to_list(Mod)),
diff --git a/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
new file mode 100644
index 0000000000..318f8e3dc7
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
@@ -0,0 +1,32 @@
+module 'bad_boolean_guard' ['bad_boolean_guard'/0,
+ 'module_info'/0,
+ 'module_info'/1]
+ attributes []
+'bad_boolean_guard'/0 =
+ fun () ->
+ apply 'f'/1
+ ('true')
+'f'/1 =
+ fun (_X_cor0) ->
+ case _X_cor0 of
+ <X>
+ when try
+ call 'erlang':'and'
+ ('bad', _X_cor0)
+ of <Try> ->
+ Try
+ catch <T,R> ->
+ 'false' ->
+ 'not_ok'
+ <_X_cor3> when 'true' ->
+ 'ok'
+ end
+'module_info'/0 =
+ fun () ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard')
+'module_info'/1 =
+ fun (_X_cor0) ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard', _X_cor0)
+end \ No newline at end of file
diff --git a/lib/compiler/test/core_SUITE_data/eval_case.core b/lib/compiler/test/core_SUITE_data/eval_case.core
new file mode 100644
index 0000000000..f2776e2b1f
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/eval_case.core
@@ -0,0 +1,34 @@
+module 'eval_case' ['eval_case'/0]
+ attributes []
+'eval_case'/0 =
+ fun () ->
+ case <> of
+ <> when 'true' ->
+ case apply 'do_case'/0() of
+ <'ok'> when 'true' ->
+ 'ok'
+ ( <_cor0> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor0})
+ -| ['compiler_generated'] )
+ end
+ ( <> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause'})
+ -| [{'function_name',{'eval_case',0}}] )
+ -| ['compiler_generated'] )
+ end
+'do_case'/0 =
+ fun () ->
+ case let <_cor0> =
+ apply 'id'/1(42)
+ in let <_cor1> =
+ call 'erlang':'+'
+ (_cor0, 7)
+ in {'x',_cor1} of
+ <{'x',49}> when 'true' ->
+ 'ok'
+ end
+'id'/1 =
+ fun (_cor0) -> _cor0
+end
diff --git a/lib/compiler/test/core_SUITE_data/map_core_test.core b/lib/compiler/test/core_SUITE_data/map_core_test.core
new file mode 100644
index 0000000000..2aa853d450
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/map_core_test.core
@@ -0,0 +1,95 @@
+module 'map_core_test' ['map_core_test'/0,
+ 'module_info'/0,
+ 'module_info'/1]
+ attributes []
+'map_core_test'/0 =
+ %% Line 14
+ fun () ->
+ let <_cor0> =
+ %% Line 15
+ ~{::<'check','ok'>,::<1337,#{#<104>(8,1,'integer',['unsigned'|['big']]),
+ #<101>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<111>(8,1,'integer',['unsigned'|['big']])}#>,::<'val',0>}~
+ in let <M> =
+ %% Line 15
+ apply 'id'/1
+ (_cor0)
+ in let <_cor2> =
+ %% Line 16
+ apply 'id'/1
+ ([1|[2|[3|[4|[5|[6]]]]]])
+ in %% Line 16
+ case apply 'call'/2
+ (M, _cor2) of
+ <~{~<1337,#{#<104>(8,1,'integer',['unsigned'|['big']]),
+ #<101>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<111>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<49>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<50>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<51>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<52>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<53>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<54>(8,1,'integer',['unsigned'|['big']])}#>,~<'check','ok'>,~<'val',21>}~> when 'true' ->
+ %% Line 17
+ 'ok'
+ ( <_cor3> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor3})
+ -| ['compiler_generated'] )
+ end
+'call'/2 =
+ %% Line 20
+ fun (_cor1,_cor0) ->
+ case <_cor1,_cor0> of
+ <M = ~{~<1337,Bin>,~<'check',_cor8>,~<'val',Val>}~,[V|Vs]> when 'true' ->
+ let <_cor3> =
+ %% Line 21
+ call 'erlang':'+'
+ (V, 48)
+ in let <_cor4> =
+ %% Line 21
+ #{#<Bin>('all',8,'binary',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<_cor3>(8,1,'integer',['unsigned'|['big']])}#
+ in let <_cor2> =
+ %% Line 21
+ call 'erlang':'+'
+ (Val, V)
+ in let <_cor5> =
+ %% Line 21
+ ~{~<1337,_cor4>,~<'val',_cor2>|M}~
+ in %% Line 21
+ apply 'call'/2
+ (_cor5, Vs)
+ %% Line 22
+ <M,[]> when 'true' ->
+ M
+ ( <_cor7,_cor6> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause',_cor7,_cor6})
+ -| [{'function_name',{'call',2}}] )
+ -| ['compiler_generated'] )
+ end
+'id'/1 =
+ %% Line 24
+ fun (_cor0) ->
+ _cor0
+'module_info'/0 =
+ fun () ->
+ call 'erlang':'get_module_info'
+ ('map_core_test')
+'module_info'/1 =
+ fun (_cor0) ->
+ call 'erlang':'get_module_info'
+ ('map_core_test', _cor0)
+end
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index a5a4e62a42..2de17e7653 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -22,7 +22,8 @@
init_per_group/2,end_per_group/2,
t_element/1,setelement/1,t_length/1,append/1,t_apply/1,bifs/1,
eq/1,nested_call_in_case/1,guard_try_catch/1,coverage/1,
- unused_multiple_values_error/1,unused_multiple_values/1]).
+ unused_multiple_values_error/1,unused_multiple_values/1,
+ multiple_aliases/1,redundant_boolean_clauses/1,mixed_matching_clauses/1]).
-export([foo/0,foo/1,foo/2,foo/3]).
@@ -38,7 +39,8 @@ groups() ->
[{p,test_lib:parallel(),
[t_element,setelement,t_length,append,t_apply,bifs,
eq,nested_call_in_case,guard_try_catch,coverage,
- unused_multiple_values_error,unused_multiple_values]}].
+ unused_multiple_values_error,unused_multiple_values,
+ multiple_aliases,redundant_boolean_clauses,mixed_matching_clauses]}].
init_per_suite(Config) ->
@@ -58,6 +60,12 @@ t_element(Config) when is_list(Config) ->
X = make_ref(),
?line X = id(element(1, {X,y,z})),
?line b = id(element(2, {a,b,c,d})),
+ (fun() ->
+ case {a,#{k=>X}} of
+ {a,#{k:=X}}=Tuple ->
+ #{k:=X} = id(element(2, Tuple))
+ end
+ end)(),
%% No optimization, but should work.
Tuple = id({x,y,z}),
@@ -202,6 +210,16 @@ eq(Config) when is_list(Config) ->
?line ?CMP_DIFF(a, [a]),
?line ?CMP_DIFF(a, {1,2,3}),
+ ?CMP_SAME(#{a=>1.0,b=>2}, #{b=>2.0,a=>1}),
+ ?CMP_SAME(#{a=>[1.0],b=>[2]}, #{b=>[2.0],a=>[1]}),
+
+ %% The rule for comparing keys are different in 17.x and 18.x.
+ %% Just test that the results are consistent.
+ Bool = id(#{1=>a}) == id(#{1.0=>a}), %Unoptimizable.
+ Bool = id(#{1=>a}) == #{1.0=>a}, %Optimizable.
+ Bool = #{1=>a} == #{1.0=>a}, %Optimizable.
+ io:format("Bool = ~p\n", [Bool]),
+
ok.
%% OTP-7117.
@@ -249,6 +267,12 @@ coverage(Config) when is_list(Config) ->
case list_to_pid("<0.42.0>") of
Pid when is_pid(Pid) -> ok
end,
+
+ %% Cover the non-variable case in bsm_do_an/4.
+ ok = bsm_an_inlined(<<1>>, Config),
+ error = bsm_an_inlined(<<1,2,3>>, Config),
+ error = bsm_an_inlined([], Config),
+
ok.
cover_will_match_list_type(A) ->
@@ -290,7 +314,8 @@ cover_is_safe_bool_expr(X) ->
false
end.
-id(I) -> I.
+bsm_an_inlined(<<_:8>>, _) -> ok;
+bsm_an_inlined(_, _) -> error.
unused_multiple_values_error(Config) when is_list(Config) ->
PrivDir = ?config(priv_dir, Config),
@@ -329,3 +354,50 @@ do_something(I) ->
put(unused_multiple_values,
[I|get(unused_multiple_values)]),
I.
+
+
+%% Make sure that multiple aliases does not cause
+%% the case expression to be evaluated twice.
+multiple_aliases(Config) when is_list(Config) ->
+ do_ma(fun() ->
+ X = Y = run_once(),
+ {X,Y}
+ end, {ok,ok}),
+ do_ma(fun() ->
+ case {true,run_once()} of
+ {true=A=B,ok=X=Y} ->
+ {A,B,X,Y}
+ end
+ end, {true,true,ok,ok}),
+ ok.
+
+do_ma(Fun, Expected) when is_function(Fun, 0) ->
+ Expected = Fun(),
+ ran_once = erase(run_once),
+ ok.
+
+run_once() ->
+ undefined = put(run_once, ran_once),
+ ok.
+
+
+redundant_boolean_clauses(Config) when is_list(Config) ->
+ X = id(0),
+ yes = case X == 0 of
+ false -> no;
+ false -> no;
+ true -> yes
+ end.
+
+mixed_matching_clauses(Config) when is_list(Config) ->
+ 0 = case #{} of
+ #{} -> 0;
+ a -> 1
+ end,
+ 0 = case <<>> of
+ <<>> -> 0;
+ a -> 1
+ end,
+ ok.
+
+id(I) -> I.
diff --git a/lib/compiler/test/error_SUITE.erl b/lib/compiler/test/error_SUITE.erl
index 859c4571ea..bd877bb528 100644
--- a/lib/compiler/test/error_SUITE.erl
+++ b/lib/compiler/test/error_SUITE.erl
@@ -23,7 +23,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
head_mismatch_line/1,warnings_as_errors/1, bif_clashes/1,
- transforms/1]).
+ transforms/1,forbidden_maps/1,bad_utf8/1]).
%% Used by transforms/1 test case.
-export([parse_transform/2]).
@@ -36,7 +36,8 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
- [head_mismatch_line,warnings_as_errors,bif_clashes,transforms]}].
+ [head_mismatch_line,warnings_as_errors,bif_clashes,
+ transforms,forbidden_maps,bad_utf8]}].
init_per_suite(Config) ->
Config.
@@ -240,6 +241,38 @@ parse_transform(_, _) ->
error(too_bad).
+forbidden_maps(Config) when is_list(Config) ->
+ Ts1 = [{map_illegal_use_of_pattern,
+ <<"
+ -export([t/0]).
+ t() ->
+ V = 32,
+ #{<<\"hi\",V,\"all\">> := 1} = id(#{<<\"hi all\">> => 1}).
+ id(I) -> I.
+ ">>,
+ [return],
+ {error,[{5,erl_lint,{illegal_map_key_variable,'V'}}], []}}],
+ [] = run2(Config, Ts1),
+ ok.
+
+bad_utf8(Config) ->
+ Ts = [{bad_utf8,
+ %% If coding is specified explicitly as utf-8, there should be
+ %% a compilation error; we must not fallback to parsing the
+ %% file in latin-1 mode.
+ <<"%% coding: utf-8
+ %% Bj",246,"rn
+ t() -> \"",246,"\".
+ ">>,
+ [],
+ {error,[{2,epp,cannot_parse},
+ {2,file_io_server,invalid_unicode}],
+ []}
+ }],
+ [] = run2(Config, Ts),
+ ok.
+
+
run(Config, Tests) ->
?line File = test_filename(Config),
run(Tests, File, dont_write_beam).
@@ -303,6 +336,7 @@ run_test(Test0, File, Warnings, WriteBeam) ->
?line compile:file(File, [binary,report|Warnings]),
%% Test result of compilation.
+ io:format("~p\n", [Opts]),
?line Res = case compile:file(File, Opts) of
{ok,Mod,_,[{_File,Ws}]} ->
%io:format("compile:file(~s,~p) ->~n~p~n",
@@ -320,6 +354,11 @@ run_test(Test0, File, Warnings, WriteBeam) ->
%io:format("compile:file(~s,~p) ->~n~p~n",
% [File,Opts,_ZZ]),
{error,Es,Ws};
+ {error,[{XFile,Es1},{XFile,Es2}],Ws} = _ZZ
+ when is_list(XFile) ->
+ %io:format("compile:file(~s,~p) ->~n~p~n",
+ % [File,Opts,_ZZ]),
+ {error,Es1++Es2,Ws};
{error,Es,[{_File,Ws}]} = _ZZ->
%io:format("compile:file(~s,~p) ->~n~p~n",
% [File,Opts,_ZZ]),
diff --git a/lib/compiler/test/fun_SUITE.erl b/lib/compiler/test/fun_SUITE.erl
index 6067ee8e06..a3e9b7fe4e 100644
--- a/lib/compiler/test/fun_SUITE.erl
+++ b/lib/compiler/test/fun_SUITE.erl
@@ -21,10 +21,10 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
test1/1,overwritten_fun/1,otp_7202/1,bif_fun/1,
- external/1]).
+ external/1,eep37/1,eep37_dup/1,badarity/1]).
-%% Internal export.
--export([call_me/1]).
+%% Internal exports.
+-export([call_me/1,dup1/0,dup2/0]).
-include_lib("test_server/include/test_server.hrl").
@@ -32,7 +32,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [test1,overwritten_fun,otp_7202,bif_fun,external].
+ [test1,overwritten_fun,otp_7202,bif_fun,external,eep37,eep37_dup,badarity].
groups() ->
[].
@@ -197,5 +197,29 @@ external(Config) when is_list(Config) ->
call_me(I) ->
{ok,I}.
+eep37(Config) when is_list(Config) ->
+ F = fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end,
+ Add = fun _(N) -> N + 1 end,
+ UnusedName = fun BlackAdder(N) -> N + 42 end,
+ 720 = F(6),
+ 10 = Add(9),
+ 50 = UnusedName(8),
+ ok.
+
+eep37_dup(Config) when is_list(Config) ->
+ dup1 = (dup1())(),
+ dup2 = (dup2())(),
+ ok.
+
+dup1() ->
+ fun _F() -> dup1 end.
+
+dup2() ->
+ fun _F() -> dup2 end.
+
+badarity(Config) when is_list(Config) ->
+ {'EXIT',{{badarity,{_,[]}},_}} = (catch (fun badarity/1)()),
+ ok.
+
id(I) ->
I.
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index a0a9bb7ddd..34bfdeb1e5 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -33,7 +33,7 @@
tricky/1,rel_ops/1,literal_type_tests/1,
basic_andalso_orelse/1,traverse_dcd/1,
check_qlc_hrl/1,andalso_semi/1,t_tuple_size/1,binary_part/1,
- bad_constants/1]).
+ bad_constants/1,bad_guards/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -50,7 +50,7 @@ groups() ->
t_is_boolean,is_function_2,tricky,rel_ops,
literal_type_tests,basic_andalso_orelse,traverse_dcd,
check_qlc_hrl,andalso_semi,t_tuple_size,binary_part,
- bad_constants]}].
+ bad_constants,bad_guards]}].
init_per_suite(Config) ->
Config.
@@ -1023,6 +1023,10 @@ is_function_2(Config) when is_list(Config) ->
true = is_function(id(fun() -> ok end), 0),
false = is_function(id(fun ?MODULE:all/1), 0),
false = is_function(id(fun() -> ok end), 1),
+ {'EXIT',{badarg,_}} =
+ (catch is_function(id(fun() -> ok end), -1) orelse error),
+ {'EXIT',{badarg,_}} =
+ (catch is_function(id(fun() -> ok end), '') orelse error),
F = fun(_) -> ok end,
if
@@ -1550,6 +1554,28 @@ bad_constants(Config) when is_list(Config) ->
?line ?FAILING(3.14),
ok.
+bad_guards(Config) when is_list(Config) ->
+ if erlang:float(self()); true -> ok end,
+
+ fc(catch bad_guards_1(1, [])),
+ fc(catch bad_guards_1(1, [2])),
+ fc(catch bad_guards_1(atom, [2])),
+
+ fc(catch bad_guards_2(#{a=>0,b=>0}, [])),
+ fc(catch bad_guards_2(#{a=>0,b=>0}, [x])),
+ fc(catch bad_guards_2(not_a_map, [x])),
+ fc(catch bad_guards_2(42, [x])),
+ ok.
+
+%% beam_bool used to produce GC BIF instructions whose
+%% Live operands included uninitialized registers.
+
+bad_guards_1(X, [_]) when {{X}}, -X ->
+ ok.
+
+bad_guards_2(M, [_]) when M#{a := 0, b => 0}, map_size(M) ->
+ ok.
+
%% Call this function to turn off constant propagation.
id(I) -> I.
diff --git a/lib/compiler/test/inline_SUITE.erl b/lib/compiler/test/inline_SUITE.erl
index e5c2d4f73a..47851e680b 100644
--- a/lib/compiler/test/inline_SUITE.erl
+++ b/lib/compiler/test/inline_SUITE.erl
@@ -37,7 +37,7 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
[attribute,bsdecode,bsdes,barnes2,decode1,smith,fname,
- itracer,pseudoknot,comma_splitter,lists,really_inlined,otp_7223,
+ itracer,pseudoknot,maps_inline_test,comma_splitter,lists,really_inlined,otp_7223,
coverage]}].
init_per_suite(Config) ->
@@ -85,6 +85,7 @@ attribute(Config) when is_list(Config) ->
?comp(pseudoknot).
?comp(comma_splitter).
?comp(fname).
+?comp(maps_inline_test).
try_inline(Mod, Config) ->
Node = ?config(testing_node, Config),
diff --git a/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
new file mode 100644
index 0000000000..d9762e2647
--- /dev/null
+++ b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
@@ -0,0 +1,70 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(maps_inline_test).
+
+-export([?MODULE/0]).
+
+?MODULE() ->
+ 21 = mval(#{val => 1}) +
+ mval(#{val => 2}) +
+ mval(#{val => 3}) +
+ mval(#{val => 4}) +
+ mval(#{val => 5}) +
+ mval(#{val => 6}),
+
+ 21 = gval(#{id => 1}) +
+ gval(#{id => 2}) +
+ gval(#{id => 3}) +
+ gval(#{id => 4}) +
+ gval(#{id => 5}) +
+ gval(#{id => 6}),
+
+ 21 = sval(#{id => 1}) +
+ sval(#{id => 2}) +
+ sval(#{id => 3}) +
+ sval(#{id => 4}) +
+ sval(#{id => 5}) +
+ sval(#{id => 6}),
+
+ M = #{v => 1, m => #{v => 21, m => #{v => 7, m => 13}}},
+
+ 42 = decompose(M).
+
+% switch key orders
+decompose(#{ m := M, v := V}) when is_map(M) ->
+ V + decompose(M);
+decompose(#{ v := V, m := M}) -> V + M.
+
+
+mval(#{val := V}) -> V.
+
+sval(#{id := 1}) -> 6;
+sval(#{id := 2}) -> 5;
+sval(#{id := 3}) -> 4;
+sval(#{id := 4}) -> 3;
+sval(#{id := 5}) -> 2;
+sval(#{id := 6}) -> 1.
+
+gval(M) when is_map(M) andalso M =:= #{ id => 1} -> 1;
+gval(M) when is_map(M) andalso M =:= #{ id => 2} -> 4;
+gval(M) when is_map(M) andalso M =:= #{ id => 3} -> 2;
+gval(M) when is_map(M) andalso M =:= #{ id => 4} -> 5;
+gval(M) when is_map(M) andalso M =:= #{ id => 5} -> 3;
+gval(M) when is_map(M) andalso M =:= #{ id => 6} -> 6.
diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl
index f5948504b3..398398a397 100644
--- a/lib/compiler/test/lc_SUITE.erl
+++ b/lib/compiler/test/lc_SUITE.erl
@@ -23,7 +23,7 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
basic/1,deeply_nested/1,no_generator/1,
- empty_generator/1]).
+ empty_generator/1,no_export/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,7 +31,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [basic, deeply_nested, no_generator, empty_generator].
+ [basic, deeply_nested, no_generator, empty_generator, no_export].
groups() ->
[].
@@ -177,6 +177,10 @@ empty_generator(Config) when is_list(Config) ->
?line [] = [X || {X} <- [], (false or (X/0 > 3))],
ok.
+no_export(Config) when is_list(Config) ->
+ [] = [ _X = a || false ] ++ [ _X = a || false ],
+ ok.
+
id(I) -> I.
fc(Args, {'EXIT',{function_clause,[{?MODULE,_,Args,_}|_]}}) -> ok;
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
new file mode 100644
index 0000000000..403b7e8405
--- /dev/null
+++ b/lib/compiler/test/map_SUITE.erl
@@ -0,0 +1,605 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(map_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([
+ t_build_and_match_literals/1,
+ t_update_literals/1,t_match_and_update_literals/1,
+ t_update_map_expressions/1,
+ t_update_assoc/1,t_update_exact/1,
+ t_guard_bifs/1, t_guard_sequence/1, t_guard_update/1,
+ t_guard_receive/1, t_guard_fun/1,
+ t_list_comprehension/1,
+ t_map_sort_literals/1,
+ t_map_size/1,
+ t_build_and_match_aliasing/1,
+
+ %% warnings
+ t_warn_useless_build/1,
+ t_warn_pair_key_overloaded/1,
+
+ %% not covered in 17.0-rc1
+ t_build_and_match_over_alloc/1,
+ t_build_and_match_empty_val/1,
+ t_build_and_match_val/1,
+ t_build_and_match_nil/1,
+ t_build_and_match_structure/1,
+
+ %% errors in 17.0-rc1
+ t_update_values/1,
+ t_expand_map_update/1,
+ t_export/1
+ ]).
+
+suite() -> [].
+
+all() -> [
+ t_build_and_match_literals,
+ t_update_literals, t_match_and_update_literals,
+ t_update_map_expressions,
+ t_update_assoc,t_update_exact,
+ t_guard_bifs, t_guard_sequence, t_guard_update,
+ t_guard_receive,t_guard_fun, t_list_comprehension,
+ t_map_sort_literals,
+ t_map_size,
+ t_build_and_match_aliasing,
+
+ %% warnings
+ t_warn_useless_build,
+ t_warn_pair_key_overloaded,
+
+ %% not covered in 17.0-rc1
+ t_build_and_match_over_alloc,
+ t_build_and_match_empty_val,
+ t_build_and_match_val,
+ t_build_and_match_nil,
+ t_build_and_match_structure,
+
+ %% errors in 17.0-rc1
+ t_update_values,
+ t_expand_map_update,
+ t_export
+ ].
+
+groups() -> [].
+
+init_per_suite(Config) -> Config.
+end_per_suite(_Config) -> ok.
+
+init_per_group(_GroupName, Config) -> Config.
+end_per_group(_GroupName, Config) -> Config.
+
+%% tests
+
+t_build_and_match_literals(Config) when is_list(Config) ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% map key
+ #{ #{} := 42 } = id(#{ #{} => 42 }),
+ #{ #{ "a" => 3 } := 42 } = id(#{ #{ "a" => 3} => 42 }),
+
+ %% nil key
+ #{[]:=ok,1:=2} = id(#{[]=>ok,1=>2}),
+
+ %% error case
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ {'EXIT',{badarg,_}} = (catch id(#{<<0:258>> =>"three"})),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{#{"a"=>42} := 3}=id(#{#{"a"=>3}=>42}))),
+ ok.
+
+t_build_and_match_aliasing(Config) when is_list(Config) ->
+ M1 = id(#{a=>1,b=>2,c=>3,d=>4}),
+ #{c:=C1=_=_=C2} = M1,
+ true = C1 =:= C2,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B} = M1,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B,b:=2} = M1,
+ #{a:=A=1,a:=A,a:=A,b:=B=2,b:=B,b:=2} = M1,
+ #{c:=C1, c:=_, c:=3, c:=_, c:=C2} = M1,
+ #{c:=C=_=3=_=C} = M1,
+
+ M2 = id(#{"a"=>1,"b"=>2,"c"=>3,"d"=>4}),
+ #{"a":=A2,"a":=A2,"a":=A2,"b":=B2,"b":=B2,"b":=2} = M2,
+ #{"a":=_,"a":=_,"a":=_,"b":=_,"b":=_,"b":=2} = M2,
+ ok.
+
+t_map_size(Config) when is_list(Config) ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+% test map updates without matching
+t_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
+
+% test map updates with matching
+t_match_and_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+
+t_update_map_expressions(Config) when is_list(Config) ->
+ M = maps:new(),
+ X = id(fondue),
+ M1 = #{ a := 1 } = M#{a => 1},
+ #{ b := {X} } = M1#{ a := 1, b => {X} },
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Test need to be in a fun.
+ %% This tests that let expr optimisation in sys_core_fold
+ %% covers maps correctly.
+ F = fun() ->
+ M0 = id(#{ "a" => [1,2,3] }),
+ #{ "a" := _ } = M0,
+ M0#{ "a" := b }
+ end,
+
+ #{ "a" := b } = F(),
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{badarg,_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{badarg,_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+
+t_update_assoc(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{badarg,_}} = (catch BadMap#{nonexisting=>val}),
+ {'EXIT',{badarg,_}} = (catch <<>>#{nonexisting=>val}),
+ {'EXIT',{badarg,_}} = (catch M0#{<<0:257>> => val}), %% limitation
+ ok.
+
+t_update_exact(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch ((id(nil))#{ a := b })),
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+ {'EXIT',{badarg,_}} = (catch <<>>#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{<<0:257>> := val}), %% limitation
+ ok.
+
+t_update_values(Config) when is_list(Config) ->
+ V0 = id(1337),
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1], "wazzup" => 42 },
+ [1337, {some_val, 1337}] = get_val(M1),
+
+ N = 110,
+ List = [{[I,1,2,3,I],{1,2,3,"wat",I}}|| I <- lists:seq(1,N)],
+
+ {_,_,#{val2 := {1,2,3,"wat",N}, val1 := [N,1,2,3,N]}} = lists:foldl(fun
+ ({V2,V3},{Old2,Old3,Mi}) ->
+ ok = check_val(Mi,Old2,Old3),
+ #{ val1 := Old2, val2 := Old3 } = Mi,
+ {V2,V3, Mi#{ val1 := id(V2), val2 := V1, val2 => id(V3)}}
+ end, {none, none, #{val1=>none,val2=>none}},List),
+ ok.
+
+t_expand_map_update(Config) when is_list(Config) ->
+ M = #{<<"hello">> => <<"world">>}#{<<"hello">> := <<"les gens">>},
+ #{<<"hello">> := <<"les gens">>} = M,
+ ok.
+
+t_export(Config) when is_list(Config) ->
+ Raclette = id(#{}),
+ case brie of brie -> Fromage = Raclette end,
+ Raclette = Fromage#{},
+ ok.
+
+check_val(#{val1:=V1, val2:=V2},V1,V2) -> ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
+
+t_guard_bifs(Config) when is_list(Config) ->
+ true = map_guard_empty(),
+ true = map_guard_empty_2(),
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ true = map_guard_tautology(),
+ true = map_guard_ill_map_size(),
+ ok.
+
+map_guard_empty() when is_map(#{}); false -> true.
+
+map_guard_empty_2() when true; #{} andalso false -> true.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+map_guard_tautology() when #{} =:= #{}; true -> true.
+
+map_guard_ill_map_size() when true; map_size(0) -> true.
+
+t_guard_sequence(Config) when is_list(Config) ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+
+t_guard_update(Config) when is_list(Config) ->
+ error = map_guard_update(#{},#{}),
+ 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}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+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.
+
+t_guard_receive(Config) when is_list(Config) ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
+
+
+t_list_comprehension(Config) when is_list(Config) ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
+
+t_guard_fun(Config) when is_list(Config) ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ case (catch F1(#{s=>none,v=>none})) of
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+
+t_map_sort_literals(Config) when is_list(Config) ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = id(#{ a => 1 }) < id(#{ b => 1}),
+ false = id(#{ b => 1 }) < id(#{ a => 1}),
+ true = id(#{ a => 1, b => 1, c => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ b => 1, c => 1, d => 1 }) > id(#{ a => 1, b => 1, c => 1}),
+ true = id(#{ c => 1, b => 1, a => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ "a" => 1 }) < id(#{ <<"a">> => 1}),
+ false = id(#{ <<"a">> => 1 }) < id(#{ "a" => 1}),
+ false = id(#{ 1 => 1 }) < id(#{ 1.0 => 1}),
+ false = id(#{ 1.0 => 1 }) < id(#{ 1 => 1}),
+
+ %% value order
+ true = id(#{ a => 1 }) < id(#{ a => 2}),
+ false = id(#{ a => 2 }) < id(#{ a => 1}),
+ false = id(#{ a => 2, b => 1 }) < id(#{ a => 1, b => 3}),
+ true = id(#{ a => 1, b => 1 }) < id(#{ a => 1, b => 3}),
+
+ true = id(#{ "a" => "hi", b => 134 }) == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+t_warn_pair_key_overloaded(Config) when is_list(Config) ->
+ #{ "hi1" := 42 } = id(#{ "hi1" => 1, "hi1" => 42 }),
+
+ #{ "hi1" := 1337, "hi2" := [2], "hi3" := 3 } = id(#{
+ "hi1" => erlang:atom_to_binary(?MODULE,utf8),
+ "hi1" => erlang:binary_to_atom(<<"wazzup">>,utf8),
+ "hi1" => erlang:binary_to_float(<<"3.1416">>),
+ "hi1" => erlang:float_to_binary(3.1416),
+ "hi2" => erlang:pid_to_list(self()),
+ "hi3" => erlang:float_to_binary(3.1416),
+ "hi2" => lists:subtract([1,2],[1]),
+ "hi3" => +3,
+ "hi1" => erlang:min(1,2),
+ "hi1" => erlang:hash({1,2},35),
+ "hi1" => erlang:phash({1,2},33),
+ "hi1" => erlang:phash2({1,2},34),
+ "hi1" => erlang:integer_to_binary(1337),
+ "hi1" => erlang:binary_to_integer(<<"1337">>),
+ "hi4" => erlang:float_to_binary(3.1416)
+ }),
+ ok.
+
+t_warn_useless_build(Config) when is_list(Config) ->
+ [#{ a => id(I)} || I <- [1,2,3]],
+ ok.
+
+t_build_and_match_over_alloc(Config) when is_list(Config) ->
+ Ls = id([1,2,3]),
+ V0 = [a|Ls],
+ M0 = id(#{ "a" => V0 }),
+ #{ "a" := V1 } = M0,
+ V2 = id([c|Ls]),
+ M2 = id(#{ "a" => V2 }),
+ #{ "a" := V3 } = M2,
+ {[a,1,2,3],[c,1,2,3]} = id({V1,V3}),
+ ok.
+
+t_build_and_match_empty_val(Config) when is_list(Config) ->
+ F = fun(#{ "hi":=_,{1,2}:=_,1337:=_}) -> ok end,
+ ok = F(id(#{"hi"=>ok,{1,2}=>ok,1337=>ok})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+t_build_and_match_val(Config) when is_list(Config) ->
+ F = fun
+ (#{ "hi" := first, v := V}) -> {1,V};
+ (#{ "hi" := second, v := V}) -> {2,V}
+ end,
+
+
+ {1,"hello"} = F(id(#{"hi"=>first,v=>"hello"})),
+ {2,"second"} = F(id(#{"hi"=>second,v=>"second"})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+t_build_and_match_nil(Config) when is_list(Config) ->
+ %% literals removed the coverage
+ V1 = id(cookie),
+ V2 = id(cake),
+ V3 = id(crisps),
+
+ #{ [] := V1, "treat" := V2, {your,treat} := V3 } = id(#{
+ {your,treat} => V3,
+ "treat" => V2,
+ [] => V1 }),
+ #{ [] := V3, [] := V3 } = id(#{ [] => V1, [] => V3 }),
+ ok.
+
+t_build_and_match_structure(Config) when is_list(Config) ->
+ V2 = id("it"),
+ S = id([42,{"hi", "=)", #{ "a" => 42, any => any, val => "get_" ++ V2}}]),
+
+ %% match deep map values
+ V2 = case S of
+ [42,{"hi",_, #{ "a" := 42, val := "get_" ++ V1, any := _ }}] -> V1
+ end,
+ %% match deep map
+ ok = case S of
+ [42,{"hi",_, #{ }}] -> ok
+ end,
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index ae7d764535..1e778dca24 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -22,7 +22,7 @@
init_per_group/2,end_per_group/2,
pmatch/1,mixed/1,aliases/1,match_in_call/1,
untuplify/1,shortcut_boolean/1,letify_guard/1,
- selectify/1,underscore/1,coverage/1]).
+ selectify/1,underscore/1,match_map/1,coverage/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -35,7 +35,8 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
[pmatch,mixed,aliases,match_in_call,untuplify,
- shortcut_boolean,letify_guard,selectify,underscore,coverage]}].
+ shortcut_boolean,letify_guard,selectify,
+ underscore,match_map,coverage]}].
init_per_suite(Config) ->
@@ -400,6 +401,24 @@ underscore(Config) when is_list(Config) ->
_ = is_list(Config),
ok.
+-record(s, {map,t}).
+
+match_map(Config) when is_list(Config) ->
+ Map = #{key=>{x,y},ignore=>anything},
+ #s{map=Map,t={x,y}} = do_match_map(#s{map=Map}),
+ {a,#{k:={a,b,c}}} = do_match_map_2(#{k=>{a,b,c}}),
+ ok.
+
+do_match_map(#s{map=#{key:=Val}}=S) ->
+ %% Would crash with a 'badarg' exception.
+ S#s{t=Val}.
+
+do_match_map_2(Map) ->
+ case {a,Map} of
+ {a,#{k:=_}}=Tuple ->
+ Tuple
+ end.
+
coverage(Config) when is_list(Config) ->
%% Cover beam_dead.
ok = coverage_1(x, a),
diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl
index ec49267ded..00a6e900d4 100644
--- a/lib/compiler/test/receive_SUITE.erl
+++ b/lib/compiler/test/receive_SUITE.erl
@@ -257,6 +257,7 @@ wait(Config) when is_list(Config) ->
self() ! <<42>>,
<<42>> = wait_1(r, 1, 2),
{1,2,3} = wait_1(1, 2, 3),
+ {'EXIT',{timeout_value,_}} = (catch receive after [] -> timeout end),
ok.
wait_1(r, _, _) ->
diff --git a/lib/compiler/test/record_SUITE.erl b/lib/compiler/test/record_SUITE.erl
index c9f5a2053e..f736e14bf6 100644
--- a/lib/compiler/test/record_SUITE.erl
+++ b/lib/compiler/test/record_SUITE.erl
@@ -369,6 +369,14 @@ record_test_3(Config) when is_list(Config) ->
?line false = is_record(id(#barf{}), id(barf), id(42)),
?line false = is_record(id(#barf{}), id(foo), id(6)),
+ Rec = id(#barf{}),
+ Good = id(barf),
+ Bad = id(foo),
+ Size = id(6),
+
+ true = is_record(Rec, Good, Size) orelse error,
+ error = is_record(Rec, Bad, Size) orelse error,
+
ok.
record_access_in_guards(Config) when is_list(Config) ->
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl
index 810b2b48c9..0637041873 100644
--- a/lib/compiler/test/warnings_SUITE.erl
+++ b/lib/compiler/test/warnings_SUITE.erl
@@ -37,7 +37,9 @@
-export([pattern/1,pattern2/1,pattern3/1,pattern4/1,
guard/1,bad_arith/1,bool_cases/1,bad_apply/1,
- files/1,effect/1,bin_opt_info/1,bin_construction/1, comprehensions/1]).
+ files/1,effect/1,bin_opt_info/1,bin_construction/1,
+ comprehensions/1,maps/1,redundant_boolean_clauses/1,
+ latin1_fallback/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(2)).
@@ -61,7 +63,8 @@ groups() ->
[{p,test_lib:parallel(),
[pattern,pattern2,pattern3,pattern4,guard,
bad_arith,bool_cases,bad_apply,files,effect,
- bin_opt_info,bin_construction,comprehensions]}].
+ bin_opt_info,bin_construction,comprehensions,maps,
+ redundant_boolean_clauses,latin1_fallback]}].
init_per_suite(Config) ->
Config.
@@ -117,6 +120,7 @@ pattern2(Config) when is_list(Config) ->
Source,
[nowarn_unused_vars],
{warnings,[{2,sys_core_fold,{nomatch_shadow,1}},
+ {4,sys_core_fold,no_clause_match},
{5,sys_core_fold,nomatch_clause_type},
{6,sys_core_fold,nomatch_clause_type}]}}],
?line [] = run(Config, Ts),
@@ -199,6 +203,8 @@ pattern4(Config) when is_list(Config) ->
[nowarn_unused_vars],
{warnings,
[{9,sys_core_fold,no_clause_match},
+ {11,sys_core_fold,nomatch_shadow},
+ {15,sys_core_fold,nomatch_shadow},
{18,sys_core_fold,no_clause_match},
{23,sys_core_fold,no_clause_match},
{33,sys_core_fold,no_clause_match}
@@ -389,6 +395,10 @@ effect(Config) when is_list(Config) ->
<<X:8>>;
unused_fun ->
fun() -> {ok,X} end;
+ unused_named_fun ->
+ fun F(0) -> 1;
+ F(N) -> N*F(N-1)
+ end;
unused_atom ->
ignore; %no warning
unused_nil ->
@@ -483,8 +493,9 @@ effect(Config) when is_list(Config) ->
{22,sys_core_fold,{no_effect,{erlang,is_integer,1}}},
{24,sys_core_fold,useless_building},
{26,sys_core_fold,useless_building},
- {32,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
- {34,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
+ {28,sys_core_fold,useless_building},
+ {36,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
+ {38,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
?line [] = run(Config, Ts),
ok.
@@ -546,6 +557,127 @@ comprehensions(Config) when is_list(Config) ->
run(Config, Ts),
ok.
+maps(Config) when is_list(Config) ->
+ Ts = [{bad_map,
+ <<"
+ t() ->
+ case maybe_map of
+ #{} -> ok;
+ not_map -> error
+ end.
+ x() ->
+ case true of
+ #{} -> error;
+ true -> ok
+ end.
+ ">>,
+ [],
+ {warnings,[{3,sys_core_fold,no_clause_match},
+ {9,sys_core_fold,nomatch_clause_type}]}},
+ {bad_map_src1,
+ <<"
+ t() ->
+ M = {a,[]},
+ {'EXIT',{badarg,_}} = (catch(M#{ a => 1})),
+ ok.
+ ">>,
+ [],
+ {warnings,[{4,v3_kernel,bad_map}]}},
+ {bad_map_src2,
+ <<"
+ t() ->
+ M = id({a,[]}),
+ {'EXIT',{badarg,_}} = (catch(M#{ a => 1})),
+ ok.
+ id(I) -> I.
+ ">>,
+ [inline],
+ {warnings,[{4,v3_kernel,bad_map}]}},
+ {bad_map_src3,
+ <<"
+ t() ->
+ {'EXIT',{badarg,_}} = (catch <<>>#{ a := 1}),
+ ok.
+ ">>,
+ [],
+ {warnings,[{3,v3_core,bad_map}]}},
+ {bad_map_literal_key,
+ <<"
+ t() ->
+ V = id(1),
+ M = id(#{ <<$h,$i>> => V }),
+ V = case M of
+ #{ <<0:257>> := Val } -> Val;
+ #{ <<$h,$i>> := Val } -> Val
+ end,
+ ok.
+ id(I) -> I.
+ ">>,
+ [],
+ {warnings,[{6,v3_core,nomatch}]}}],
+ run(Config, Ts),
+ ok.
+
+redundant_boolean_clauses(Config) when is_list(Config) ->
+ Ts = [{redundant_boolean_clauses,
+ <<"
+ t(X) ->
+ case X == 0 of
+ false -> no;
+ false -> no;
+ true -> yes
+ end.
+ ">>,
+ [],
+ {warnings,[{5,sys_core_fold,nomatch_shadow}]}}],
+ run(Config, Ts),
+ ok.
+
+latin1_fallback(Conf) when is_list(Conf) ->
+ DataDir = ?privdir,
+ IncFile = filename:join(DataDir, "include_me.hrl"),
+ file:write_file(IncFile, <<"%% ",246," in include file\n">>),
+ Ts1 = [{latin1_fallback1,
+ %% Test that the compiler fall backs to latin-1 with
+ %% a warning if a file has no encoding and does not
+ %% contain correct UTF-8 sequences.
+ <<"%% Bj",246,"rn
+ t(_) -> \"",246,"\";
+ t(x) -> ok.
+ ">>,
+ [],
+ {warnings,[{1,compile,reparsing_invalid_unicode},
+ {3,sys_core_fold,{nomatch_shadow,2}}]}}],
+ [] = run(Conf, Ts1),
+
+ Ts2 = [{latin1_fallback2,
+ %% Test that the compiler fall backs to latin-1 with
+ %% a warning if a file has no encoding and does not
+ %% contain correct UTF-8 sequences.
+ <<"
+
+ -include(\"include_me.hrl\").
+ ">>,
+ [],
+ {warnings,[{1,compile,reparsing_invalid_unicode}]}
+ }],
+ [] = run(Conf, Ts2),
+
+ Ts3 = [{latin1_fallback3,
+ %% Test that the compiler fall backs to latin-1 with
+ %% a warning if a file has no encoding and does not
+ %% contain correct UTF-8 sequences.
+ <<"-ifdef(NOTDEFINED).
+ t(_) -> \"",246,"\";
+ t(x) -> ok.
+ -endif.
+ ">>,
+ [],
+ {warnings,[{2,compile,reparsing_invalid_unicode}]}}],
+ [] = run(Conf, Ts3),
+
+ ok.
+
%%%
%%% End of test cases.
%%%
diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk
index cbdf57f177..05e682c893 100644
--- a/lib/compiler/vsn.mk
+++ b/lib/compiler/vsn.mk
@@ -1 +1 @@
-COMPILER_VSN = 4.9.4
+COMPILER_VSN = 5.0.4
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin.xml
index c599a92ff1..73456845fc 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml
index 2318ccb6d2..4cf079ce09 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml
index 4495fd4450..cdbcd0e146 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml
index 4cd20ad185..420e4b289c 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml
index 830c06a87c..8dbf7804ac 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml
index 2c451acd9c..2c448f1f54 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml
index 9030c0e735..d3b548636a 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml
index e68b0854d8..7a2d874aab 100644
--- a/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml
+++ b/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/book.xml b/lib/cosEvent/doc/src/book.xml
index 68e26be0ea..1b025351f8 100644
--- a/lib/cosEvent/doc/src/book.xml
+++ b/lib/cosEvent/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/ch_contents.xml b/lib/cosEvent/doc/src/ch_contents.xml
index 943e00b967..e65c7e53bc 100644
--- a/lib/cosEvent/doc/src/ch_contents.xml
+++ b/lib/cosEvent/doc/src/ch_contents.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/ch_event_service.xml b/lib/cosEvent/doc/src/ch_event_service.xml
index c65f6767ad..5148b77ab1 100644
--- a/lib/cosEvent/doc/src/ch_event_service.xml
+++ b/lib/cosEvent/doc/src/ch_event_service.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/ch_introduction.xml b/lib/cosEvent/doc/src/ch_introduction.xml
index 101c3e1212..01ce5c4231 100644
--- a/lib/cosEvent/doc/src/ch_introduction.xml
+++ b/lib/cosEvent/doc/src/ch_introduction.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/cosEventApp.xml b/lib/cosEvent/doc/src/cosEventApp.xml
index 55ea790203..3b9a38ea93 100644
--- a/lib/cosEvent/doc/src/cosEventApp.xml
+++ b/lib/cosEvent/doc/src/cosEventApp.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2001</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/fascicules.xml b/lib/cosEvent/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosEvent/doc/src/fascicules.xml
+++ b/lib/cosEvent/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosEvent/doc/src/notes.xml b/lib/cosEvent/doc/src/notes.xml
index ba986792c5..8f519447fc 100644
--- a/lib/cosEvent/doc/src/notes.xml
+++ b/lib/cosEvent/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosEvent 2.1.14</title>
+ <section><title>cosEvent 2.1.15</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEvent 2.1.14</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEvent/doc/src/part.xml b/lib/cosEvent/doc/src/part.xml
index a17821cadc..a21579bc0a 100644
--- a/lib/cosEvent/doc/src/part.xml
+++ b/lib/cosEvent/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/part_notes.xml b/lib/cosEvent/doc/src/part_notes.xml
index 92324ce227..d9a5e610c6 100644
--- a/lib/cosEvent/doc/src/part_notes.xml
+++ b/lib/cosEvent/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/doc/src/ref_man.xml b/lib/cosEvent/doc/src/ref_man.xml
index 7088c2ef92..26dbf2b2ef 100644
--- a/lib/cosEvent/doc/src/ref_man.xml
+++ b/lib/cosEvent/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEvent/src/cosEvent.app.src b/lib/cosEvent/src/cosEvent.app.src
index c1cb9e0cc9..66b0d2e168 100644
--- a/lib/cosEvent/src/cosEvent.app.src
+++ b/lib/cosEvent/src/cosEvent.app.src
@@ -38,7 +38,8 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosEventApp, []}}
+ {mod, {cosEventApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosEvent/vsn.mk b/lib/cosEvent/vsn.mk
index 6745bee079..40bf1ba49d 100644
--- a/lib/cosEvent/vsn.mk
+++ b/lib/cosEvent/vsn.mk
@@ -1,3 +1,3 @@
-COSEVENT_VSN = 2.1.14
+COSEVENT_VSN = 2.1.15
diff --git a/lib/cosEventDomain/doc/src/CosEventDomainAdmin.xml b/lib/cosEventDomain/doc/src/CosEventDomainAdmin.xml
index 60f26dda96..fba39e5bd2 100644
--- a/lib/cosEventDomain/doc/src/CosEventDomainAdmin.xml
+++ b/lib/cosEventDomain/doc/src/CosEventDomainAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomain.xml b/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomain.xml
index 4941f8652c..12ab034f8f 100644
--- a/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomain.xml
+++ b/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomain.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomainFactory.xml b/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomainFactory.xml
index 5eff7038d9..16d297ddab 100644
--- a/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomainFactory.xml
+++ b/lib/cosEventDomain/doc/src/CosEventDomainAdmin_EventDomainFactory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2001</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/book.xml b/lib/cosEventDomain/doc/src/book.xml
index 3a36704355..8023ac8755 100644
--- a/lib/cosEventDomain/doc/src/book.xml
+++ b/lib/cosEventDomain/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/ch_QoS.xml b/lib/cosEventDomain/doc/src/ch_QoS.xml
index 232cc4021a..ff46824074 100644
--- a/lib/cosEventDomain/doc/src/ch_QoS.xml
+++ b/lib/cosEventDomain/doc/src/ch_QoS.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/ch_contents.xml b/lib/cosEventDomain/doc/src/ch_contents.xml
index bdb951566f..8de9aa06d2 100644
--- a/lib/cosEventDomain/doc/src/ch_contents.xml
+++ b/lib/cosEventDomain/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/ch_event_domain_service.xml b/lib/cosEventDomain/doc/src/ch_event_domain_service.xml
index 39ac915b38..af08182bf5 100644
--- a/lib/cosEventDomain/doc/src/ch_event_domain_service.xml
+++ b/lib/cosEventDomain/doc/src/ch_event_domain_service.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/ch_introduction.xml b/lib/cosEventDomain/doc/src/ch_introduction.xml
index 8a85fc052f..68048a5caa 100644
--- a/lib/cosEventDomain/doc/src/ch_introduction.xml
+++ b/lib/cosEventDomain/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/cosEventDomainApp.xml b/lib/cosEventDomain/doc/src/cosEventDomainApp.xml
index e7704b90b5..ff444c75d6 100644
--- a/lib/cosEventDomain/doc/src/cosEventDomainApp.xml
+++ b/lib/cosEventDomain/doc/src/cosEventDomainApp.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2001</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/fascicules.xml b/lib/cosEventDomain/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosEventDomain/doc/src/fascicules.xml
+++ b/lib/cosEventDomain/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosEventDomain/doc/src/notes.xml b/lib/cosEventDomain/doc/src/notes.xml
index 565b501148..2c3bf16411 100644
--- a/lib/cosEventDomain/doc/src/notes.xml
+++ b/lib/cosEventDomain/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosEventDomain 1.1.13</title>
+ <section><title>cosEventDomain 1.1.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEventDomain 1.1.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEventDomain/doc/src/part.xml b/lib/cosEventDomain/doc/src/part.xml
index 720a4d3feb..20d6a8539b 100644
--- a/lib/cosEventDomain/doc/src/part.xml
+++ b/lib/cosEventDomain/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/part_notes.xml b/lib/cosEventDomain/doc/src/part_notes.xml
index 0979d6e491..88fe24a5ae 100644
--- a/lib/cosEventDomain/doc/src/part_notes.xml
+++ b/lib/cosEventDomain/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/doc/src/ref_man.xml b/lib/cosEventDomain/doc/src/ref_man.xml
index ddb836e1d6..cee6394af2 100644
--- a/lib/cosEventDomain/doc/src/ref_man.xml
+++ b/lib/cosEventDomain/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosEventDomain/src/cosEventDomain.app.src b/lib/cosEventDomain/src/cosEventDomain.app.src
index e4307e1f99..60114b6a91 100644
--- a/lib/cosEventDomain/src/cosEventDomain.app.src
+++ b/lib/cosEventDomain/src/cosEventDomain.app.src
@@ -27,5 +27,7 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosEventDomainApp, []}}
+ {mod, {cosEventDomainApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosNotification-1.1.21"]}
]}.
diff --git a/lib/cosEventDomain/vsn.mk b/lib/cosEventDomain/vsn.mk
index e9cf92395a..6317ed3c22 100644
--- a/lib/cosEventDomain/vsn.mk
+++ b/lib/cosEventDomain/vsn.mk
@@ -1,3 +1,3 @@
-COSEVENTDOMAIN_VSN = 1.1.13
+COSEVENTDOMAIN_VSN = 1.1.14
diff --git a/lib/cosFileTransfer/doc/src/CosFileTransfer_Directory.xml b/lib/cosFileTransfer/doc/src/CosFileTransfer_Directory.xml
index 7c68768aa9..991ce19f58 100644
--- a/lib/cosFileTransfer/doc/src/CosFileTransfer_Directory.xml
+++ b/lib/cosFileTransfer/doc/src/CosFileTransfer_Directory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/CosFileTransfer_File.xml b/lib/cosFileTransfer/doc/src/CosFileTransfer_File.xml
index 8b317049e2..252d14cf5e 100644
--- a/lib/cosFileTransfer/doc/src/CosFileTransfer_File.xml
+++ b/lib/cosFileTransfer/doc/src/CosFileTransfer_File.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/CosFileTransfer_FileIterator.xml b/lib/cosFileTransfer/doc/src/CosFileTransfer_FileIterator.xml
index 80cbd1f448..01a9671ba5 100644
--- a/lib/cosFileTransfer/doc/src/CosFileTransfer_FileIterator.xml
+++ b/lib/cosFileTransfer/doc/src/CosFileTransfer_FileIterator.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/CosFileTransfer_FileTransferSession.xml b/lib/cosFileTransfer/doc/src/CosFileTransfer_FileTransferSession.xml
index 918f0bf9f7..0c69eb3687 100644
--- a/lib/cosFileTransfer/doc/src/CosFileTransfer_FileTransferSession.xml
+++ b/lib/cosFileTransfer/doc/src/CosFileTransfer_FileTransferSession.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/CosFileTransfer_VirtualFileSystem.xml b/lib/cosFileTransfer/doc/src/CosFileTransfer_VirtualFileSystem.xml
index 7bb6e8d356..4c898e5459 100644
--- a/lib/cosFileTransfer/doc/src/CosFileTransfer_VirtualFileSystem.xml
+++ b/lib/cosFileTransfer/doc/src/CosFileTransfer_VirtualFileSystem.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/book.xml b/lib/cosFileTransfer/doc/src/book.xml
index aaa14f7d69..c34dd92390 100644
--- a/lib/cosFileTransfer/doc/src/book.xml
+++ b/lib/cosFileTransfer/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ch_contents.xml b/lib/cosFileTransfer/doc/src/ch_contents.xml
index 70094beb2d..c75b0db2c5 100644
--- a/lib/cosFileTransfer/doc/src/ch_contents.xml
+++ b/lib/cosFileTransfer/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ch_example.xml b/lib/cosFileTransfer/doc/src/ch_example.xml
index 8d16371836..ad0d94f76b 100644
--- a/lib/cosFileTransfer/doc/src/ch_example.xml
+++ b/lib/cosFileTransfer/doc/src/ch_example.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ch_install.xml b/lib/cosFileTransfer/doc/src/ch_install.xml
index 068dceb733..d125d331c5 100644
--- a/lib/cosFileTransfer/doc/src/ch_install.xml
+++ b/lib/cosFileTransfer/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ch_introduction.xml b/lib/cosFileTransfer/doc/src/ch_introduction.xml
index d81269aba4..0c92d0db20 100644
--- a/lib/cosFileTransfer/doc/src/ch_introduction.xml
+++ b/lib/cosFileTransfer/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ch_system.xml b/lib/cosFileTransfer/doc/src/ch_system.xml
index 51a8ac86cd..986728a614 100644
--- a/lib/cosFileTransfer/doc/src/ch_system.xml
+++ b/lib/cosFileTransfer/doc/src/ch_system.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/cosFileTransferApp.xml b/lib/cosFileTransfer/doc/src/cosFileTransferApp.xml
index e27bffd44d..ab968f168f 100644
--- a/lib/cosFileTransfer/doc/src/cosFileTransferApp.xml
+++ b/lib/cosFileTransfer/doc/src/cosFileTransferApp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/fascicules.xml b/lib/cosFileTransfer/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosFileTransfer/doc/src/fascicules.xml
+++ b/lib/cosFileTransfer/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosFileTransfer/doc/src/notes.xml b/lib/cosFileTransfer/doc/src/notes.xml
index d68a52655a..1d0c826d40 100644
--- a/lib/cosFileTransfer/doc/src/notes.xml
+++ b/lib/cosFileTransfer/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,7 +30,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosFileTransfer 1.1.15</title>
+ <section><title>cosFileTransfer 1.1.16</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosFileTransfer 1.1.15</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosFileTransfer/doc/src/part.xml b/lib/cosFileTransfer/doc/src/part.xml
index 78e4063927..0170bb3e31 100644
--- a/lib/cosFileTransfer/doc/src/part.xml
+++ b/lib/cosFileTransfer/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/part_notes.xml b/lib/cosFileTransfer/doc/src/part_notes.xml
index f3819bd4be..cc93603331 100644
--- a/lib/cosFileTransfer/doc/src/part_notes.xml
+++ b/lib/cosFileTransfer/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/doc/src/ref_man.xml b/lib/cosFileTransfer/doc/src/ref_man.xml
index 088ec49a29..29e190b8e7 100644
--- a/lib/cosFileTransfer/doc/src/ref_man.xml
+++ b/lib/cosFileTransfer/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosFileTransfer/src/cosFileTransfer.app.src b/lib/cosFileTransfer/src/cosFileTransfer.app.src
index 31d94b6f0d..21226b0c6b 100644
--- a/lib/cosFileTransfer/src/cosFileTransfer.app.src
+++ b/lib/cosFileTransfer/src/cosFileTransfer.app.src
@@ -36,6 +36,8 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosFileTransferApp, []}}
+ {mod, {cosFileTransferApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","orber-3.6.27","kernel-3.0",
+ "inets-5.10","erts-6.0","cosProperty-1.1.17"]}
]}.
diff --git a/lib/cosFileTransfer/vsn.mk b/lib/cosFileTransfer/vsn.mk
index cf33926334..f52a1bd800 100644
--- a/lib/cosFileTransfer/vsn.mk
+++ b/lib/cosFileTransfer/vsn.mk
@@ -1 +1 @@
-COSFILETRANSFER_VSN = 1.1.15
+COSFILETRANSFER_VSN = 1.1.16
diff --git a/lib/cosNotification/doc/src/CosNotification.xml b/lib/cosNotification/doc/src/CosNotification.xml
index cd965bc46b..d3003ee538 100644
--- a/lib/cosNotification/doc/src/CosNotification.xml
+++ b/lib/cosNotification/doc/src/CosNotification.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotification_AdminPropertiesAdmin.xml b/lib/cosNotification/doc/src/CosNotification_AdminPropertiesAdmin.xml
index 46c3921b66..be2314ea84 100644
--- a/lib/cosNotification/doc/src/CosNotification_AdminPropertiesAdmin.xml
+++ b/lib/cosNotification/doc/src/CosNotification_AdminPropertiesAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotification_QoSAdmin.xml b/lib/cosNotification/doc/src/CosNotification_QoSAdmin.xml
index b7c19f664b..7dede0ebb8 100644
--- a/lib/cosNotification/doc/src/CosNotification_QoSAdmin.xml
+++ b/lib/cosNotification/doc/src/CosNotification_QoSAdmin.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ConsumerAdmin.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ConsumerAdmin.xml
index 96ccdf1d29..c31bc8668c 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ConsumerAdmin.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ConsumerAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannel.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannel.xml
index 1682cf9968..f242cd5a30 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannel.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannel.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannelFactory.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannelFactory.xml
index 64e0e4dad8..487cc8365e 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannelFactory.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_EventChannelFactory.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyConsumer.xml
index 7ba74547bb..8655704239 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullConsumer.xml
index d8344e004a..fca52d25b9 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullSupplier.xml
index cc2c17a3ca..938614dd24 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPullSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushConsumer.xml
index 30ba264f74..aeac8754b6 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushSupplier.xml
index d5079a5ae7..fbece27728 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxyPushSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxySupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxySupplier.xml
index bdd9213a8b..ee9d34e556 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxySupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_ProxySupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullConsumer.xml
index 86796a2643..02aaff133e 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullSupplier.xml
index c30217362a..d1534f0766 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPullSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushConsumer.xml
index 3f3e187486..9400f771b0 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushConsumer.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushSupplier.xml
index f85f33de01..0aa08faa7f 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SequenceProxyPushSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullConsumer.xml
index 09546d9584..a4a8f91f00 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullSupplier.xml
index d171851014..f779820977 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPullSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushConsumer.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushConsumer.xml
index a055a0ab36..a9ebdca27e 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushConsumer.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushConsumer.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushSupplier.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushSupplier.xml
index f03322b819..0d5df4800b 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushSupplier.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_StructuredProxyPushSupplier.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SupplierAdmin.xml b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SupplierAdmin.xml
index 5c7408040d..70ee36e18f 100644
--- a/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SupplierAdmin.xml
+++ b/lib/cosNotification/doc/src/CosNotifyChannelAdmin_SupplierAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyComm_NotifyPublish.xml b/lib/cosNotification/doc/src/CosNotifyComm_NotifyPublish.xml
index 2ea19a2dfb..403359d08f 100644
--- a/lib/cosNotification/doc/src/CosNotifyComm_NotifyPublish.xml
+++ b/lib/cosNotification/doc/src/CosNotifyComm_NotifyPublish.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyComm_NotifySubscribe.xml b/lib/cosNotification/doc/src/CosNotifyComm_NotifySubscribe.xml
index 97b15d958a..e2cdb49a15 100644
--- a/lib/cosNotification/doc/src/CosNotifyComm_NotifySubscribe.xml
+++ b/lib/cosNotification/doc/src/CosNotifyComm_NotifySubscribe.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml b/lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml
index dd894f2fea..09740b0d1b 100644
--- a/lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml
+++ b/lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyFilter_FilterAdmin.xml b/lib/cosNotification/doc/src/CosNotifyFilter_FilterAdmin.xml
index 9e0fe693d4..e4afb9b6c7 100644
--- a/lib/cosNotification/doc/src/CosNotifyFilter_FilterAdmin.xml
+++ b/lib/cosNotification/doc/src/CosNotifyFilter_FilterAdmin.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyFilter_FilterFactory.xml b/lib/cosNotification/doc/src/CosNotifyFilter_FilterFactory.xml
index 886b5b4729..04fdf9d7eb 100644
--- a/lib/cosNotification/doc/src/CosNotifyFilter_FilterFactory.xml
+++ b/lib/cosNotification/doc/src/CosNotifyFilter_FilterFactory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml b/lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml
index f5c6a75f3e..72720f21ea 100644
--- a/lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml
+++ b/lib/cosNotification/doc/src/CosNotifyFilter_MappingFilter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/book.xml b/lib/cosNotification/doc/src/book.xml
index fe311ee57c..da21f23f7f 100644
--- a/lib/cosNotification/doc/src/book.xml
+++ b/lib/cosNotification/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_BNF.xml b/lib/cosNotification/doc/src/ch_BNF.xml
index f658f606d3..127069dff3 100644
--- a/lib/cosNotification/doc/src/ch_BNF.xml
+++ b/lib/cosNotification/doc/src/ch_BNF.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_QoS.xml b/lib/cosNotification/doc/src/ch_QoS.xml
index fbc8622a62..2ed35f8d68 100644
--- a/lib/cosNotification/doc/src/ch_QoS.xml
+++ b/lib/cosNotification/doc/src/ch_QoS.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_contents.xml b/lib/cosNotification/doc/src/ch_contents.xml
index e5505951bf..dc94a067ef 100644
--- a/lib/cosNotification/doc/src/ch_contents.xml
+++ b/lib/cosNotification/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_example.xml b/lib/cosNotification/doc/src/ch_example.xml
index 14c0e5c6fd..2710acc04d 100644
--- a/lib/cosNotification/doc/src/ch_example.xml
+++ b/lib/cosNotification/doc/src/ch_example.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_install.xml b/lib/cosNotification/doc/src/ch_install.xml
index 3463815bc5..4b10ea5ffa 100644
--- a/lib/cosNotification/doc/src/ch_install.xml
+++ b/lib/cosNotification/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_introduction.xml b/lib/cosNotification/doc/src/ch_introduction.xml
index 63e4a58bd5..82a4a2d66f 100644
--- a/lib/cosNotification/doc/src/ch_introduction.xml
+++ b/lib/cosNotification/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ch_system.xml b/lib/cosNotification/doc/src/ch_system.xml
index 126bba5f0b..2efda9e5cd 100644
--- a/lib/cosNotification/doc/src/ch_system.xml
+++ b/lib/cosNotification/doc/src/ch_system.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/cosNotificationApp.xml b/lib/cosNotification/doc/src/cosNotificationApp.xml
index 08bac7f810..a11de06a11 100644
--- a/lib/cosNotification/doc/src/cosNotificationApp.xml
+++ b/lib/cosNotification/doc/src/cosNotificationApp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/fascicules.xml b/lib/cosNotification/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosNotification/doc/src/fascicules.xml
+++ b/lib/cosNotification/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosNotification/doc/src/notes.xml b/lib/cosNotification/doc/src/notes.xml
index 2d126271a9..2e4f922142 100644
--- a/lib/cosNotification/doc/src/notes.xml
+++ b/lib/cosNotification/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosNotification 1.1.20</title>
+ <section><title>cosNotification 1.1.21</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosNotification 1.1.20</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosNotification/doc/src/part.xml b/lib/cosNotification/doc/src/part.xml
index 06ae875c01..99770639c0 100644
--- a/lib/cosNotification/doc/src/part.xml
+++ b/lib/cosNotification/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/part_notes.xml b/lib/cosNotification/doc/src/part_notes.xml
index af262c3d0e..83fadb868e 100644
--- a/lib/cosNotification/doc/src/part_notes.xml
+++ b/lib/cosNotification/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/doc/src/ref_man.xml b/lib/cosNotification/doc/src/ref_man.xml
index 1cf77c3c7f..0e729be80a 100644
--- a/lib/cosNotification/doc/src/ref_man.xml
+++ b/lib/cosNotification/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosNotification/src/cosNotification.app.src b/lib/cosNotification/src/cosNotification.app.src
index 04beac36e8..ad02eb4421 100644
--- a/lib/cosNotification/src/cosNotification.app.src
+++ b/lib/cosNotification/src/cosNotification.app.src
@@ -116,5 +116,7 @@
{registered, [cosNotificationSup, oe_cosNotificationFactory]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosNotificationApp, []}}
+ {mod, {cosNotificationApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosTime-1.1.14","cosEvent-2.1.15"]}
]}.
diff --git a/lib/cosNotification/vsn.mk b/lib/cosNotification/vsn.mk
index ea59800164..28d6ec71bf 100644
--- a/lib/cosNotification/vsn.mk
+++ b/lib/cosNotification/vsn.mk
@@ -1,2 +1,2 @@
-COSNOTIFICATION_VSN = 1.1.20
+COSNOTIFICATION_VSN = 1.1.21
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertiesIterator.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertiesIterator.xml
index 623e121715..925b63e657 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertiesIterator.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertiesIterator.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertyNamesIterator.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertyNamesIterator.xml
index 9cb5e8f489..758af6396c 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertyNamesIterator.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertyNamesIterator.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertySet.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertySet.xml
index f9a7c9ca97..1babf7776b 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertySet.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertySet.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertySetDef.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertySetDef.xml
index 2dbfd05ba8..78629d6702 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertySetDef.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertySetDef.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertySetDefFactory.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertySetDefFactory.xml
index a009e70f68..607cb791ae 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertySetDefFactory.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertySetDefFactory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/CosPropertyService_PropertySetFactory.xml b/lib/cosProperty/doc/src/CosPropertyService_PropertySetFactory.xml
index 62ee2bda4f..e9761181e2 100644
--- a/lib/cosProperty/doc/src/CosPropertyService_PropertySetFactory.xml
+++ b/lib/cosProperty/doc/src/CosPropertyService_PropertySetFactory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/book.xml b/lib/cosProperty/doc/src/book.xml
index f3ba9a5bcd..4d249a3753 100644
--- a/lib/cosProperty/doc/src/book.xml
+++ b/lib/cosProperty/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/ch_contents.xml b/lib/cosProperty/doc/src/ch_contents.xml
index 9b8a39cfb3..80eee4affe 100644
--- a/lib/cosProperty/doc/src/ch_contents.xml
+++ b/lib/cosProperty/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/ch_example.xml b/lib/cosProperty/doc/src/ch_example.xml
index 3b5c6160fb..fab5cfaa5f 100644
--- a/lib/cosProperty/doc/src/ch_example.xml
+++ b/lib/cosProperty/doc/src/ch_example.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/ch_install.xml b/lib/cosProperty/doc/src/ch_install.xml
index 33324a0ce6..c7f1734b94 100644
--- a/lib/cosProperty/doc/src/ch_install.xml
+++ b/lib/cosProperty/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/ch_introduction.xml b/lib/cosProperty/doc/src/ch_introduction.xml
index 1f8731113a..f2064785c5 100644
--- a/lib/cosProperty/doc/src/ch_introduction.xml
+++ b/lib/cosProperty/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/cosProperty.xml b/lib/cosProperty/doc/src/cosProperty.xml
index 4dbbbad794..67116292d5 100644
--- a/lib/cosProperty/doc/src/cosProperty.xml
+++ b/lib/cosProperty/doc/src/cosProperty.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/fascicules.xml b/lib/cosProperty/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosProperty/doc/src/fascicules.xml
+++ b/lib/cosProperty/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosProperty/doc/src/notes.xml b/lib/cosProperty/doc/src/notes.xml
index eaf1100c4e..739f41617f 100644
--- a/lib/cosProperty/doc/src/notes.xml
+++ b/lib/cosProperty/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosProperty 1.1.16</title>
+ <section><title>cosProperty 1.1.17</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosProperty 1.1.16</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosProperty/doc/src/part.xml b/lib/cosProperty/doc/src/part.xml
index 210dad6920..c726c68e8b 100644
--- a/lib/cosProperty/doc/src/part.xml
+++ b/lib/cosProperty/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/part_notes.xml b/lib/cosProperty/doc/src/part_notes.xml
index 4e02ff4e55..74a1641e67 100644
--- a/lib/cosProperty/doc/src/part_notes.xml
+++ b/lib/cosProperty/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/doc/src/ref_man.xml b/lib/cosProperty/doc/src/ref_man.xml
index f69904e42f..9a1fd13758 100644
--- a/lib/cosProperty/doc/src/ref_man.xml
+++ b/lib/cosProperty/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosProperty/src/cosProperty.app.src b/lib/cosProperty/src/cosProperty.app.src
index 3099e904f7..b977bb5984 100644
--- a/lib/cosProperty/src/cosProperty.app.src
+++ b/lib/cosProperty/src/cosProperty.app.src
@@ -41,5 +41,7 @@
{registered, [oe_cosPropertySup]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosProperty, []}}
+ {mod, {cosProperty, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","mnesia-4.12",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosProperty/vsn.mk b/lib/cosProperty/vsn.mk
index ac7820216e..0f546a2da8 100644
--- a/lib/cosProperty/vsn.mk
+++ b/lib/cosProperty/vsn.mk
@@ -1,2 +1,2 @@
-COSPROPERTY_VSN = 1.1.16
+COSPROPERTY_VSN = 1.1.17
diff --git a/lib/cosTime/doc/src/CosTime_TIO.xml b/lib/cosTime/doc/src/CosTime_TIO.xml
index 7b955c64e3..edc3324e0f 100644
--- a/lib/cosTime/doc/src/CosTime_TIO.xml
+++ b/lib/cosTime/doc/src/CosTime_TIO.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/CosTime_TimeService.xml b/lib/cosTime/doc/src/CosTime_TimeService.xml
index 66cfb694e6..a432f6ba10 100644
--- a/lib/cosTime/doc/src/CosTime_TimeService.xml
+++ b/lib/cosTime/doc/src/CosTime_TimeService.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/CosTime_UTO.xml b/lib/cosTime/doc/src/CosTime_UTO.xml
index 26e6eef978..9c29f8552d 100644
--- a/lib/cosTime/doc/src/CosTime_UTO.xml
+++ b/lib/cosTime/doc/src/CosTime_UTO.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/CosTimerEvent_TimerEventHandler.xml b/lib/cosTime/doc/src/CosTimerEvent_TimerEventHandler.xml
index 2adf318674..8ce741334f 100644
--- a/lib/cosTime/doc/src/CosTimerEvent_TimerEventHandler.xml
+++ b/lib/cosTime/doc/src/CosTimerEvent_TimerEventHandler.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/CosTimerEvent_TimerEventService.xml b/lib/cosTime/doc/src/CosTimerEvent_TimerEventService.xml
index 80f5fd1466..b1c1c5400d 100644
--- a/lib/cosTime/doc/src/CosTimerEvent_TimerEventService.xml
+++ b/lib/cosTime/doc/src/CosTimerEvent_TimerEventService.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/book.xml b/lib/cosTime/doc/src/book.xml
index f9d27f8d0b..b6c332d469 100644
--- a/lib/cosTime/doc/src/book.xml
+++ b/lib/cosTime/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/ch_contents.xml b/lib/cosTime/doc/src/ch_contents.xml
index 1e223f24fc..78d148eaaf 100644
--- a/lib/cosTime/doc/src/ch_contents.xml
+++ b/lib/cosTime/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/ch_example.xml b/lib/cosTime/doc/src/ch_example.xml
index 9664331726..f0196cd465 100644
--- a/lib/cosTime/doc/src/ch_example.xml
+++ b/lib/cosTime/doc/src/ch_example.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/ch_install.xml b/lib/cosTime/doc/src/ch_install.xml
index fe2b25c2f6..e4a8476fcf 100644
--- a/lib/cosTime/doc/src/ch_install.xml
+++ b/lib/cosTime/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/ch_introduction.xml b/lib/cosTime/doc/src/ch_introduction.xml
index ca23168089..d6de5df38c 100644
--- a/lib/cosTime/doc/src/ch_introduction.xml
+++ b/lib/cosTime/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/cosTime.xml b/lib/cosTime/doc/src/cosTime.xml
index 978e048d48..dfb2c68602 100644
--- a/lib/cosTime/doc/src/cosTime.xml
+++ b/lib/cosTime/doc/src/cosTime.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/fascicules.xml b/lib/cosTime/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosTime/doc/src/fascicules.xml
+++ b/lib/cosTime/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosTime/doc/src/notes.xml b/lib/cosTime/doc/src/notes.xml
index f468f8aa53..f218f19a6b 100644
--- a/lib/cosTime/doc/src/notes.xml
+++ b/lib/cosTime/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosTime 1.1.13</title>
+ <section><title>cosTime 1.1.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTime 1.1.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTime/doc/src/part.xml b/lib/cosTime/doc/src/part.xml
index fe6a50c18d..cae3232e8d 100644
--- a/lib/cosTime/doc/src/part.xml
+++ b/lib/cosTime/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/part_notes.xml b/lib/cosTime/doc/src/part_notes.xml
index 3f45a11ea7..b0667abb38 100644
--- a/lib/cosTime/doc/src/part_notes.xml
+++ b/lib/cosTime/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/doc/src/ref_man.xml b/lib/cosTime/doc/src/ref_man.xml
index 18de68a4c3..1f4fb06c2c 100644
--- a/lib/cosTime/doc/src/ref_man.xml
+++ b/lib/cosTime/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTime/src/cosTime.app.src b/lib/cosTime/src/cosTime.app.src
index 191ee5f3db..cd01de35cb 100644
--- a/lib/cosTime/src/cosTime.app.src
+++ b/lib/cosTime/src/cosTime.app.src
@@ -26,5 +26,7 @@
{registered, [oe_cosTimeSup, oe_cosTimerEventService]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosTime, []}}
+ {mod, {cosTime, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosEvent-2.1.15"]}
]}.
diff --git a/lib/cosTime/vsn.mk b/lib/cosTime/vsn.mk
index 02cd669222..9e9e5c0250 100644
--- a/lib/cosTime/vsn.mk
+++ b/lib/cosTime/vsn.mk
@@ -1,2 +1,3 @@
-COSTIME_VSN = 1.1.13
+COSTIME_VSN = 1.1.14
+
diff --git a/lib/cosTransactions/doc/src/CosTransactions_Control.xml b/lib/cosTransactions/doc/src/CosTransactions_Control.xml
index 39cffa1889..998821c5d8 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_Control.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_Control.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_Coordinator.xml b/lib/cosTransactions/doc/src/CosTransactions_Coordinator.xml
index e172951e4e..4b76ae19b8 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_Coordinator.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_Coordinator.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_RecoveryCoordinator.xml b/lib/cosTransactions/doc/src/CosTransactions_RecoveryCoordinator.xml
index 0222f3be86..339adac638 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_RecoveryCoordinator.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_RecoveryCoordinator.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_Resource.xml b/lib/cosTransactions/doc/src/CosTransactions_Resource.xml
index 1f091a5092..cee0829710 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_Resource.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_Resource.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_SubtransactionAwareResource.xml b/lib/cosTransactions/doc/src/CosTransactions_SubtransactionAwareResource.xml
index 5878b41360..12115036bc 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_SubtransactionAwareResource.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_SubtransactionAwareResource.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_Synchronization.xml b/lib/cosTransactions/doc/src/CosTransactions_Synchronization.xml
index cca0396e33..89a0eb97c4 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_Synchronization.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_Synchronization.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_Terminator.xml b/lib/cosTransactions/doc/src/CosTransactions_Terminator.xml
index c4457bcaa7..6f35235114 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_Terminator.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_Terminator.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_TransactionFactory.xml b/lib/cosTransactions/doc/src/CosTransactions_TransactionFactory.xml
index 7e93aa2964..e2e5b63bca 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_TransactionFactory.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_TransactionFactory.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/CosTransactions_TransactionalObject.xml b/lib/cosTransactions/doc/src/CosTransactions_TransactionalObject.xml
index 0e836f5818..a249a89c71 100644
--- a/lib/cosTransactions/doc/src/CosTransactions_TransactionalObject.xml
+++ b/lib/cosTransactions/doc/src/CosTransactions_TransactionalObject.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/book.xml b/lib/cosTransactions/doc/src/book.xml
index 785cf387c0..460b7cce9a 100644
--- a/lib/cosTransactions/doc/src/book.xml
+++ b/lib/cosTransactions/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ch_contents.xml b/lib/cosTransactions/doc/src/ch_contents.xml
index 21cefda955..bf11e0137e 100644
--- a/lib/cosTransactions/doc/src/ch_contents.xml
+++ b/lib/cosTransactions/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ch_example.xml b/lib/cosTransactions/doc/src/ch_example.xml
index 026bfc467e..64fdf7293f 100644
--- a/lib/cosTransactions/doc/src/ch_example.xml
+++ b/lib/cosTransactions/doc/src/ch_example.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2010</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ch_install.xml b/lib/cosTransactions/doc/src/ch_install.xml
index d4b64d3987..0de5db539b 100644
--- a/lib/cosTransactions/doc/src/ch_install.xml
+++ b/lib/cosTransactions/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ch_introduction.xml b/lib/cosTransactions/doc/src/ch_introduction.xml
index b0e58c5528..7edd2a57d5 100644
--- a/lib/cosTransactions/doc/src/ch_introduction.xml
+++ b/lib/cosTransactions/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ch_skeletons.xml b/lib/cosTransactions/doc/src/ch_skeletons.xml
index a6dd41f929..451db4ae70 100644
--- a/lib/cosTransactions/doc/src/ch_skeletons.xml
+++ b/lib/cosTransactions/doc/src/ch_skeletons.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/cosTransactions.xml b/lib/cosTransactions/doc/src/cosTransactions.xml
index f93004641f..9b1bc5c428 100644
--- a/lib/cosTransactions/doc/src/cosTransactions.xml
+++ b/lib/cosTransactions/doc/src/cosTransactions.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/fascicules.xml b/lib/cosTransactions/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/cosTransactions/doc/src/fascicules.xml
+++ b/lib/cosTransactions/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/cosTransactions/doc/src/notes.xml b/lib/cosTransactions/doc/src/notes.xml
index e375338a8f..4b20f23efb 100644
--- a/lib/cosTransactions/doc/src/notes.xml
+++ b/lib/cosTransactions/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosTransactions 1.2.13</title>
+ <section><title>cosTransactions 1.2.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTransactions 1.2.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTransactions/doc/src/part.xml b/lib/cosTransactions/doc/src/part.xml
index b5a8397525..a5331ceb05 100644
--- a/lib/cosTransactions/doc/src/part.xml
+++ b/lib/cosTransactions/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/part_notes.xml b/lib/cosTransactions/doc/src/part_notes.xml
index 16e1968093..8ccf52b17c 100644
--- a/lib/cosTransactions/doc/src/part_notes.xml
+++ b/lib/cosTransactions/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/doc/src/ref_man.xml b/lib/cosTransactions/doc/src/ref_man.xml
index b662f30b28..663ccb06bc 100644
--- a/lib/cosTransactions/doc/src/ref_man.xml
+++ b/lib/cosTransactions/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/cosTransactions/src/cosTransactions.app.src b/lib/cosTransactions/src/cosTransactions.app.src
index 52769b1711..6b99915ad6 100644
--- a/lib/cosTransactions/src/cosTransactions.app.src
+++ b/lib/cosTransactions/src/cosTransactions.app.src
@@ -39,5 +39,6 @@
{registered, [cosTransactions_sup, oe_cosTransactionsFactory]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosTransactions, []}}
+ {mod, {cosTransactions, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosTransactions/vsn.mk b/lib/cosTransactions/vsn.mk
index 5414270a3d..7aed212523 100644
--- a/lib/cosTransactions/vsn.mk
+++ b/lib/cosTransactions/vsn.mk
@@ -1 +1 @@
-COSTRANSACTIONS_VSN = 1.2.13
+COSTRANSACTIONS_VSN = 1.2.14
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index 13eebea6a9..e893c914e6 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -23,7 +23,12 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Macros
#
+ifneq ($(findstring ose,$(TARGET)),ose)
SUB_DIRECTORIES = src c_src doc/src
+else
+SUB_DIRECTORIES = src doc/src
+endif
+static_lib: SUB_DIRECTORIES = c_src
include vsn.mk
VSN = $(CRYPTO_VSN)
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index a20ddff05c..8c92b5ba1b 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -70,6 +70,10 @@ RELSYSDIR = $(RELEASE_PATH)/lib/crypto-$(VSN)
CRYPTO_OBJS = $(OBJDIR)/crypto$(TYPEMARKER).o
CALLBACK_OBJS = $(OBJDIR)/crypto_callback$(TYPEMARKER).o
NIF_MAKEFILE = $(PRIVDIR)/Makefile
+CRYPTO_STATIC_OBJS = $(OBJDIR)/crypto_static$(TYPEMARKER).o\
+ $(OBJDIR)/crypto_callback_static$(TYPEMARKER).o
+
+NIF_ARCHIVE = $(LIBDIR)/crypto$(TYPEMARKER).a
ifeq ($(findstring win32,$(TARGET)), win32)
NIF_LIB = $(LIBDIR)/crypto$(TYPEMARKER).dll
@@ -97,7 +101,24 @@ CALLBACK_OBJS =
CALLBACK_LIB =
endif
+ifeq ($(USING_VC),yes)
+AR_OUT=-out:
+AR_FLAGS=
+else
+AR_OUT=
+ifeq ($(V),0)
+AR_FLAGS=rc
+else
+AR_FLAGS=rcv
+endif
+endif
+
+ifndef RANLIB
+RANLIB=true
+endif
+
ALL_CFLAGS = $(TYPE_FLAGS) $(EXTRA_FLAGS) $(INCLUDES)
+ALL_STATIC_CFLAGS = $(DED_STATIC_CFLAGS) $(INCLUDES)
# ----------------------------------------------------
# Targets
@@ -105,7 +126,14 @@ ALL_CFLAGS = $(TYPE_FLAGS) $(EXTRA_FLAGS) $(INCLUDES)
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
debug opt valgrind: $(NIF_LIB) $(CALLBACK_LIB)
+else
+# Do not build dynamic files on OSE
+debug opt valgrind:
+endif
+
+static_lib: $(NIF_ARCHIVE)
$(OBJDIR)/%$(TYPEMARKER).o: %.c
$(V_at)$(INSTALL_DIR) $(OBJDIR)
@@ -115,6 +143,14 @@ $(LIBDIR)/crypto$(TYPEMARKER).so: $(CRYPTO_OBJS)
$(V_at)$(INSTALL_DIR) $(LIBDIR)
$(V_LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CRYPTO_LINK_LIB)
+$(OBJDIR)/%_static$(TYPEMARKER).o: %.c
+ $(V_at)$(INSTALL_DIR) $(OBJDIR)
+ $(V_CC) -c -o $@ $(ALL_STATIC_CFLAGS) $<
+
+$(LIBDIR)/crypto$(TYPEMARKER).a: $(CRYPTO_STATIC_OBJS)
+ $(V_AR) $(AR_FLAGS) $(AR_OUT)$@ $(CRYPTO_STATIC_OBJS)
+ $(V_RANLIB) $@
+
$(LIBDIR)/crypto$(TYPEMARKER).dll: $(CRYPTO_OBJS)
$(V_at)$(INSTALL_DIR) $(LIBDIR)
$(V_LD) $(LDFLAGS) -o $@ $(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) $(CRYPTO_OBJS) -l$(SSL_CRYPTO_LIBNAME) -l$(SSL_SSL_LIBNAME)
@@ -145,8 +181,11 @@ else
rm -f $(LIBDIR)/crypto_callback.valgrind.so
endif
rm -f $(OBJDIR)/crypto.o
+ rm -f $(OBJDIR)/crypto_static.o
rm -f $(OBJDIR)/crypto.debug.o
+ rm -f $(OBJDIR)/crypto_static.debug.o
rm -f $(OBJDIR)/crypto.valgrind.o
+ rm -f $(OBJDIR)/crypto_static.valgrind.o
rm -f $(OBJDIR)/crypto_callback.o
rm -f $(OBJDIR)/crypto_callback.debug.o
rm -f $(OBJDIR)/crypto_callback.valgrind.o
@@ -163,12 +202,14 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
$(INSTALL_DATA) $(NIF_MAKEFILE) "$(RELSYSDIR)/priv/obj"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(CRYPTO_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
$(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib"
endif
+endif
release_docs_spec:
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 42fb172953..26e2486dc2 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2010-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2010-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -81,12 +81,18 @@
# define HAVE_EC
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x0090803fL
+# define HAVE_AES_IGE
+#endif
+
#if defined(HAVE_EC)
#include <openssl/ec.h>
#include <openssl/ecdh.h>
#include <openssl/ecdsa.h>
#endif
+
+
#ifdef VALGRIND
# include <valgrind/memcheck.h>
@@ -209,6 +215,7 @@ static ERL_NIF_TERM des_cfb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
static ERL_NIF_TERM des_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM des_ede3_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
@@ -221,6 +228,7 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
@@ -247,9 +255,11 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
/* helpers */
-static void init_algorithms_types(void);
+static void init_algorithms_types(ErlNifEnv*);
static void init_digest_types(ErlNifEnv* env);
static void hmac_md5(unsigned char *key, int klen,
unsigned char *dbuf, int dlen,
@@ -335,6 +345,7 @@ static ErlNifFunc nif_funcs[] = {
{"des_ecb_crypt", 3, des_ecb_crypt},
{"des_ede3_cbc_crypt", 6, des_ede3_cbc_crypt},
{"des_ede3_cfb_crypt_nif", 6, des_ede3_cfb_crypt_nif},
+ {"aes_cfb_8_crypt", 4, aes_cfb_8_crypt},
{"aes_cfb_128_crypt", 4, aes_cfb_128_crypt},
{"aes_ctr_encrypt", 3, aes_ctr_encrypt},
{"aes_ctr_decrypt", 3, aes_ctr_encrypt},
@@ -349,6 +360,7 @@ static ErlNifFunc nif_funcs[] = {
{"dss_verify_nif", 4, dss_verify_nif},
{"rsa_verify_nif", 4, rsa_verify_nif},
{"aes_cbc_crypt", 4, aes_cbc_crypt},
+ {"aes_ige_crypt_nif", 4, aes_ige_crypt_nif},
{"do_exor", 2, do_exor},
{"rc4_encrypt", 2, rc4_encrypt},
{"rc4_set_key", 1, rc4_set_key},
@@ -373,103 +385,11 @@ static ErlNifFunc nif_funcs[] = {
{"ec_key_generate", 1, ec_key_generate},
{"ecdsa_sign_nif", 4, ecdsa_sign_nif},
{"ecdsa_verify_nif", 5, ecdsa_verify_nif},
- {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif}
-};
-
-#if defined(HAVE_EC)
-struct nid_map {
- char *name;
- int nid;
- ERL_NIF_TERM atom;
-};
+ {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif},
-static struct nid_map ec_curves[] = {
- /* prime field curves */
- /* secg curves */
- { "secp112r1", NID_secp112r1 },
- { "secp112r2", NID_secp112r2 },
- { "secp128r1", NID_secp128r1 },
- { "secp128r2", NID_secp128r2 },
- { "secp160k1", NID_secp160k1 },
- { "secp160r1", NID_secp160r1 },
- { "secp160r2", NID_secp160r2 },
- /* SECG secp192r1 is the same as X9.62 prime192v1 */
- { "secp192r1", NID_X9_62_prime192v1 },
- { "secp192k1", NID_secp192k1 },
- { "secp224k1", NID_secp224k1 },
- { "secp224r1", NID_secp224r1 },
- { "secp256k1", NID_secp256k1 },
- /* SECG secp256r1 is the same as X9.62 prime256v1 */
- { "secp256r1", NID_X9_62_prime256v1 },
- { "secp384r1", NID_secp384r1 },
- { "secp521r1", NID_secp521r1 },
- /* X9.62 curves */
- { "prime192v1", NID_X9_62_prime192v1 },
- { "prime192v2", NID_X9_62_prime192v2 },
- { "prime192v3", NID_X9_62_prime192v3 },
- { "prime239v1", NID_X9_62_prime239v1 },
- { "prime239v2", NID_X9_62_prime239v2 },
- { "prime239v3", NID_X9_62_prime239v3 },
- { "prime256v1", NID_X9_62_prime256v1 },
- /* characteristic two field curves */
- /* NIST/SECG curves */
- { "sect113r1", NID_sect113r1 },
- { "sect113r2", NID_sect113r2 },
- { "sect131r1", NID_sect131r1 },
- { "sect131r2", NID_sect131r2 },
- { "sect163k1", NID_sect163k1 },
- { "sect163r1", NID_sect163r1 },
- { "sect163r2", NID_sect163r2 },
- { "sect193r1", NID_sect193r1 },
- { "sect193r2", NID_sect193r2 },
- { "sect233k1", NID_sect233k1 },
- { "sect233r1", NID_sect233r1 },
- { "sect239k1", NID_sect239k1 },
- { "sect283k1", NID_sect283k1 },
- { "sect283r1", NID_sect283r1 },
- { "sect409k1", NID_sect409k1 },
- { "sect409r1", NID_sect409r1 },
- { "sect571k1", NID_sect571k1 },
- { "sect571r1", NID_sect571r1 },
- /* X9.62 curves */
- { "c2pnb163v1", NID_X9_62_c2pnb163v1 },
- { "c2pnb163v2", NID_X9_62_c2pnb163v2 },
- { "c2pnb163v3", NID_X9_62_c2pnb163v3 },
- { "c2pnb176v1", NID_X9_62_c2pnb176v1 },
- { "c2tnb191v1", NID_X9_62_c2tnb191v1 },
- { "c2tnb191v2", NID_X9_62_c2tnb191v2 },
- { "c2tnb191v3", NID_X9_62_c2tnb191v3 },
- { "c2pnb208w1", NID_X9_62_c2pnb208w1 },
- { "c2tnb239v1", NID_X9_62_c2tnb239v1 },
- { "c2tnb239v2", NID_X9_62_c2tnb239v2 },
- { "c2tnb239v3", NID_X9_62_c2tnb239v3 },
- { "c2pnb272w1", NID_X9_62_c2pnb272w1 },
- { "c2pnb304w1", NID_X9_62_c2pnb304w1 },
- { "c2tnb359v1", NID_X9_62_c2tnb359v1 },
- { "c2pnb368w1", NID_X9_62_c2pnb368w1 },
- { "c2tnb431r1", NID_X9_62_c2tnb431r1 },
- /* the WAP/WTLS curves
- * [unlike SECG, spec has its own OIDs for curves from X9.62] */
- { "wtls1", NID_wap_wsg_idm_ecid_wtls1 },
- { "wtls3", NID_wap_wsg_idm_ecid_wtls3 },
- { "wtls4", NID_wap_wsg_idm_ecid_wtls4 },
- { "wtls5", NID_wap_wsg_idm_ecid_wtls5 },
- { "wtls6", NID_wap_wsg_idm_ecid_wtls6 },
- { "wtls7", NID_wap_wsg_idm_ecid_wtls7 },
- { "wtls8", NID_wap_wsg_idm_ecid_wtls8 },
- { "wtls9", NID_wap_wsg_idm_ecid_wtls9 },
- { "wtls10", NID_wap_wsg_idm_ecid_wtls10 },
- { "wtls11", NID_wap_wsg_idm_ecid_wtls11 },
- { "wtls12", NID_wap_wsg_idm_ecid_wtls12 },
- /* IPSec curves */
- { "ipsec3", NID_ipsec3 },
- { "ipsec4", NID_ipsec4 }
+ {"rand_seed_nif", 1, rand_seed_nif}
};
-#define EC_CURVES_CNT (sizeof(ec_curves)/sizeof(struct nid_map))
-
-#endif /* HAVE_EC */
-
ERL_NIF_INIT(crypto,nif_funcs,load,NULL,upgrade,unload)
@@ -530,24 +450,105 @@ static ERL_NIF_TERM atom_ppbasis;
static ERL_NIF_TERM atom_onbasis;
#endif
+static ErlNifResourceType* hmac_context_rtype;
+struct hmac_context
+{
+ ErlNifMutex* mtx;
+ int alive;
+ HMAC_CTX ctx;
+};
+static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context*);
+
/*
#define PRINTF_ERR0(FMT) enif_fprintf(stderr, FMT "\n")
#define PRINTF_ERR1(FMT, A1) enif_fprintf(stderr, FMT "\n", A1)
+#define PRINTF_ERR2(FMT, A1, A2) enif_fprintf(stderr, FMT "\n", A1, A2)
*/
#define PRINTF_ERR0(FMT)
#define PRINTF_ERR1(FMT,A1)
+#define PRINTF_ERR2(FMT,A1,A2)
+
+#ifdef __OSE__
+
+/* For crypto on OSE we have to initialize the crypto library on each
+ process that uses it. So since we do not know which scheduler is going
+ to execute the nif we have to check before each nif call that we have
+ initialized crypto in that process. */
+
+#include "ose.h"
+#include "openssl/osessl.h"
+
+static ErlNifTSDKey crypto_init_key;
+static int check_ose_crypto(void);
+static int init_ose_crypto(void);
+
+static int check_ose_crypto() {
+ int key = (int)enif_tsd_get(crypto_init_key);
+ if (!key) {
+ if (!CRYPTO_OSE5_init()) {
+ PRINTF_ERR0("CRYPTO: Call to CRYPTO_OSE5_init failed");
+ return 0;
+ }
+ enif_tsd_set(crypto_init_key,1);
+ }
+ return 1;
+}
+
+static int init_ose_crypto() {
+ /* Crypto nif upgrade does not work on OSE so no need to
+ destroy this key */
+ enif_tsd_key_create("crypto_init_key", &crypto_init_key);
+ return check_ose_crypto();
+}
+
+#define INIT_OSE_CRYPTO() init_ose_crypto()
+#define CHECK_OSE_CRYPTO() check_ose_crypto()
+#else
+#define INIT_OSE_CRYPTO() 1
+#define CHECK_OSE_CRYPTO()
+#endif
+
+
+static int verify_lib_version(void)
+{
+ const unsigned long libv = SSLeay();
+ const unsigned long hdrv = OPENSSL_VERSION_NUMBER;
+
+# define MAJOR_VER(V) ((unsigned long)(V) >> (7*4))
+
+ if (MAJOR_VER(libv) != MAJOR_VER(hdrv)) {
+ PRINTF_ERR2("CRYPTO: INCOMPATIBLE SSL VERSION"
+ " lib=%lx header=%lx\n", libv, hdrv);
+ return 0;
+ }
+ return 1;
+}
+
#ifdef HAVE_DYNAMIC_CRYPTO_LIB
-static int change_basename(char* buf, int bufsz, const char* newfile)
+
+# if defined(DEBUG)
+static char crypto_callback_name[] = "crypto_callback.debug";
+# elif defined(VALGRIND)
+static char crypto_callback_name[] = "crypto_callback.valgrind";
+# else
+static char crypto_callback_name[] = "crypto_callback";
+# endif
+
+static int change_basename(ErlNifBinary* bin, char* buf, int bufsz, const char* newfile)
{
- char* p = strrchr(buf, '/');
- p = (p == NULL) ? buf : p + 1;
+ int i;
- if ((p - buf) + strlen(newfile) >= bufsz) {
+ for (i = bin->size; i > 0; i--) {
+ if (bin->data[i-1] == '/')
+ break;
+ }
+ if (i + strlen(newfile) >= bufsz) {
PRINTF_ERR0("CRYPTO: lib name too long");
return 0;
}
- strcpy(p, newfile);
+ memcpy(buf, bin->data, i);
+ strcpy(buf+i, newfile);
return 1;
}
@@ -566,19 +567,35 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
int tpl_arity;
const ERL_NIF_TERM* tpl_array;
int vernum;
+ ErlNifBinary lib_bin;
char lib_buf[1000];
- /* load_info: {201, "/full/path/of/this/library"} */
+ if (!INIT_OSE_CRYPTO())
+ return 0;
+
+ if (!verify_lib_version())
+ return 0;
+
+ /* load_info: {301, <<"/full/path/of/this/library">>} */
if (!enif_get_tuple(env, load_info, &tpl_arity, &tpl_array)
|| tpl_arity != 2
|| !enif_get_int(env, tpl_array[0], &vernum)
- || vernum != 201
- || enif_get_string(env, tpl_array[1], lib_buf, sizeof(lib_buf), ERL_NIF_LATIN1) <= 0) {
+ || vernum != 301
+ || !enif_inspect_binary(env, tpl_array[1], &lib_bin)) {
PRINTF_ERR1("CRYPTO: Invalid load_info '%T'", load_info);
return 0;
}
+ hmac_context_rtype = enif_open_resource_type(env, NULL, "hmac_context",
+ (ErlNifResourceDtor*) hmac_context_dtor,
+ ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
+ NULL);
+ if (!hmac_context_rtype) {
+ PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'");
+ return 0;
+ }
+
if (library_refc > 0) {
/* Repeated loading of this library (module upgrade).
* Atoms and callbacks are already set, we are done.
@@ -619,21 +636,15 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
atom_tpbasis = enif_make_atom(env,"tpbasis");
atom_ppbasis = enif_make_atom(env,"ppbasis");
atom_onbasis = enif_make_atom(env,"onbasis");
-
- {
- int i;
- for (i = 0; i < EC_CURVES_CNT; i++)
- ec_curves[i].atom = enif_make_atom(env,ec_curves[i].name);
- }
#endif
init_digest_types(env);
- init_algorithms_types();
+ init_algorithms_types(env);
#ifdef HAVE_DYNAMIC_CRYPTO_LIB
{
void* handle;
- if (!change_basename(lib_buf, sizeof(lib_buf), "crypto_callback")) {
+ if (!change_basename(&lib_bin, lib_buf, sizeof(lib_buf), crypto_callback_name)) {
return 0;
}
if (!(handle = enif_dlopen(lib_buf, &error_handler, NULL))) {
@@ -709,36 +720,61 @@ static void unload(ErlNifEnv* env, void* priv_data)
--library_refc;
}
-static int algos_cnt;
-static ERL_NIF_TERM algos[9]; /* increase when extending the list */
+static int algo_hash_cnt;
+static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */
+static int algo_pubkey_cnt;
+static ERL_NIF_TERM algo_pubkey[3]; /* increase when extending the list */
+static int algo_cipher_cnt;
+static ERL_NIF_TERM algo_cipher[2]; /* increase when extending the list */
-static void init_algorithms_types(void)
+static void init_algorithms_types(ErlNifEnv* env)
{
- algos_cnt = 0;
- algos[algos_cnt++] = atom_md4;
- algos[algos_cnt++] = atom_md5;
- algos[algos_cnt++] = atom_sha;
- algos[algos_cnt++] = atom_ripemd160;
+ algo_hash_cnt = 0;
+ algo_hash[algo_hash_cnt++] = atom_md4;
+ algo_hash[algo_hash_cnt++] = atom_md5;
+ algo_hash[algo_hash_cnt++] = atom_sha;
+ algo_hash[algo_hash_cnt++] = atom_ripemd160;
#ifdef HAVE_SHA224
- algos[algos_cnt++] = atom_sha224;
+ algo_hash[algo_hash_cnt++] = atom_sha224;
#endif
#ifdef HAVE_SHA256
- algos[algos_cnt++] = atom_sha256;
+ algo_hash[algo_hash_cnt++] = atom_sha256;
#endif
#ifdef HAVE_SHA384
- algos[algos_cnt++] = atom_sha384;
+ algo_hash[algo_hash_cnt++] = atom_sha384;
#endif
#ifdef HAVE_SHA512
- algos[algos_cnt++] = atom_sha512;
+ algo_hash[algo_hash_cnt++] = atom_sha512;
#endif
+
+ algo_pubkey_cnt = 0;
#if defined(HAVE_EC)
- algos[algos_cnt++] = atom_ec;
+#if !defined(OPENSSL_NO_EC2M)
+ algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ec_gf2m");
+#endif
+ algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ecdsa");
+ algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ecdh");
+#endif
+
+ algo_cipher_cnt = 0;
+#ifdef HAVE_DES_ede3_cfb_encrypt
+ algo_cipher[algo_cipher_cnt++] = enif_make_atom(env, "des3_cbf");
+#endif
+#ifdef HAVE_AES_IGE
+ algo_cipher[algo_cipher_cnt++] = enif_make_atom(env,"aes_ige256");
#endif
+
+ ASSERT(algo_hash_cnt <= sizeof(algo_hash)/sizeof(ERL_NIF_TERM));
+ ASSERT(algo_pubkey_cnt <= sizeof(algo_pubkey)/sizeof(ERL_NIF_TERM));
+ ASSERT(algo_cipher_cnt <= sizeof(algo_cipher)/sizeof(ERL_NIF_TERM));
}
static ERL_NIF_TERM algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
- return enif_make_list_from_array(env, algos, algos_cnt);
+ return enif_make_tuple3(env,
+ enif_make_list_from_array(env, algo_hash, algo_hash_cnt),
+ enif_make_list_from_array(env, algo_pubkey, algo_pubkey_cnt),
+ enif_make_list_from_array(env, algo_cipher, algo_cipher_cnt));
}
static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
@@ -772,7 +808,7 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -784,6 +820,7 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
MD5_Init((MD5_CTX *) enif_make_new_binary(env, MD5_CTX_LEN, &ret));
return ret;
}
@@ -792,6 +829,7 @@ static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
MD5_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin)
|| ctx_bin.size != MD5_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
@@ -808,6 +846,7 @@ static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
MD5_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD5_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -820,7 +859,7 @@ static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -832,6 +871,7 @@ static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
RIPEMD160_Init((RIPEMD160_CTX *) enif_make_new_binary(env, RIPEMD160_CTX_LEN, &ret));
return ret;
}
@@ -840,6 +880,7 @@ static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TER
RIPEMD160_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin)
|| ctx_bin.size != RIPEMD160_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
@@ -856,6 +897,7 @@ static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary ctx_bin;
RIPEMD160_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != RIPEMD160_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -869,7 +911,7 @@ static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -881,6 +923,7 @@ static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA1_Init((SHA_CTX *) enif_make_new_binary(env, SHA_CTX_LEN, &ret));
return ret;
}
@@ -889,6 +932,7 @@ static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
SHA_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != SHA_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -904,6 +948,7 @@ static ERL_NIF_TERM sha_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
SHA_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != SHA_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -917,7 +962,7 @@ static ERL_NIF_TERM sha224_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA224
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -933,6 +978,7 @@ static ERL_NIF_TERM sha224_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA224
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA224_Init((SHA256_CTX *) enif_make_new_binary(env, sizeof(SHA256_CTX), &ret));
return ret;
#else
@@ -945,6 +991,7 @@ static ERL_NIF_TERM sha224_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA256_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -964,6 +1011,7 @@ static ERL_NIF_TERM sha224_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA256_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)) {
return enif_make_badarg(env);
}
@@ -980,7 +1028,7 @@ static ERL_NIF_TERM sha256_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA256
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -996,6 +1044,7 @@ static ERL_NIF_TERM sha256_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA256
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA256_Init((SHA256_CTX *) enif_make_new_binary(env, sizeof(SHA256_CTX), &ret));
return ret;
#else
@@ -1008,6 +1057,7 @@ static ERL_NIF_TERM sha256_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA256_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1027,6 +1077,7 @@ static ERL_NIF_TERM sha256_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA256_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)) {
return enif_make_badarg(env);
}
@@ -1043,7 +1094,7 @@ static ERL_NIF_TERM sha384_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA384
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1059,6 +1110,7 @@ static ERL_NIF_TERM sha384_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA384
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA384_Init((SHA512_CTX *) enif_make_new_binary(env, sizeof(SHA512_CTX), &ret));
return ret;
#else
@@ -1071,6 +1123,7 @@ static ERL_NIF_TERM sha384_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA512_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1090,6 +1143,7 @@ static ERL_NIF_TERM sha384_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA512_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)) {
return enif_make_badarg(env);
}
@@ -1106,7 +1160,7 @@ static ERL_NIF_TERM sha512_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA512
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1134,6 +1188,7 @@ static ERL_NIF_TERM sha512_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA512_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1153,6 +1208,7 @@ static ERL_NIF_TERM sha512_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA512_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)) {
return enif_make_badarg(env);
}
@@ -1169,7 +1225,7 @@ static ERL_NIF_TERM md4(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1181,6 +1237,7 @@ static ERL_NIF_TERM md4(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM md4_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
MD4_Init((MD4_CTX *) enif_make_new_binary(env, MD4_CTX_LEN, &ret));
return ret;
}
@@ -1189,6 +1246,7 @@ static ERL_NIF_TERM md4_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
MD4_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD4_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1204,6 +1262,7 @@ static ERL_NIF_TERM md4_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
MD4_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD4_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -1218,7 +1277,7 @@ static ERL_NIF_TERM md5_mac_n(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > MD5_LEN) {
@@ -1236,7 +1295,7 @@ static ERL_NIF_TERM sha_mac_n(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA_LEN) {
@@ -1256,7 +1315,7 @@ static ERL_NIF_TERM sha224_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA224_DIGEST_LENGTH) {
@@ -1279,7 +1338,7 @@ static ERL_NIF_TERM sha256_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA256_DIGEST_LENGTH) {
@@ -1302,7 +1361,7 @@ static ERL_NIF_TERM sha384_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA384_DIGEST_LENGTH) {
@@ -1326,7 +1385,7 @@ static ERL_NIF_TERM sha512_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA512_DIGEST_LENGTH) {
@@ -1342,13 +1401,24 @@ static ERL_NIF_TERM sha512_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
#endif
}
+static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context *obj)
+{
+ if (obj->alive) {
+ HMAC_CTX_cleanup(&obj->ctx);
+ obj->alive = 0;
+ }
+ enif_mutex_destroy(obj->mtx);
+}
+
static ERL_NIF_TERM hmac_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Type, Key) */
ErlNifBinary key;
- ERL_NIF_TERM ret;
- unsigned char * ctx_buf;
+ struct hmac_context* obj;
const EVP_MD *md;
+ ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) md = EVP_sha1();
#ifdef HAVE_SHA224
else if (argv[0] == atom_sha224) md = EVP_sha224();
@@ -1371,57 +1441,66 @@ static ERL_NIF_TERM hmac_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
return enif_make_badarg(env);
}
- ctx_buf = enif_make_new_binary(env, sizeof(HMAC_CTX), &ret);
- HMAC_CTX_init((HMAC_CTX *) ctx_buf);
- HMAC_Init((HMAC_CTX *) ctx_buf, key.data, key.size, md);
+ obj = enif_alloc_resource(hmac_context_rtype, sizeof(struct hmac_context));
+ obj->mtx = enif_mutex_create("crypto.hmac");
+ obj->alive = 1;
+ HMAC_CTX_init(&obj->ctx);
+ HMAC_Init(&obj->ctx, key.data, key.size, md);
+ ret = enif_make_resource(env, obj);
+ enif_release_resource(obj);
return ret;
}
static ERL_NIF_TERM hmac_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Context, Data) */
- ErlNifBinary context, data;
- ERL_NIF_TERM ret;
- unsigned char * ctx_buf;
+ ErlNifBinary data;
+ struct hmac_context* obj;
- if (!enif_inspect_binary(env, argv[0], &context)
- || !enif_inspect_iolist_as_binary(env, argv[1], &data)
- || context.size != sizeof(HMAC_CTX)) {
+ CHECK_OSE_CRYPTO();
+
+ if (!enif_get_resource(env, argv[0], hmac_context_rtype, (void**)&obj)
+ || !enif_inspect_iolist_as_binary(env, argv[1], &data)) {
return enif_make_badarg(env);
}
+ enif_mutex_lock(obj->mtx);
+ if (!obj->alive) {
+ enif_mutex_unlock(obj->mtx);
+ return enif_make_badarg(env);
+ }
+ HMAC_Update(&obj->ctx, data.data, data.size);
+ enif_mutex_unlock(obj->mtx);
- ctx_buf = enif_make_new_binary(env, sizeof(HMAC_CTX), &ret);
- memcpy(ctx_buf, context.data, context.size);
- HMAC_Update((HMAC_CTX *)ctx_buf, data.data, data.size);
CONSUME_REDS(env,data);
-
- return ret;
+ return argv[0];
}
static ERL_NIF_TERM hmac_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Context) or (Context, HashLen) */
- ErlNifBinary context;
ERL_NIF_TERM ret;
- HMAC_CTX ctx;
+ struct hmac_context* obj;
unsigned char mac_buf[EVP_MAX_MD_SIZE];
unsigned char * mac_bin;
unsigned int req_len = 0;
unsigned int mac_len;
+
+ CHECK_OSE_CRYPTO();
- if (!enif_inspect_binary(env, argv[0], &context)) {
- return enif_make_badarg(env);
- }
- if (argc == 2 && !enif_get_uint(env, argv[1], &req_len)) {
+ if (!enif_get_resource(env,argv[0],hmac_context_rtype, (void**)&obj)
+ || (argc == 2 && !enif_get_uint(env, argv[1], &req_len))) {
return enif_make_badarg(env);
}
- if (context.size != sizeof(ctx)) {
- return enif_make_badarg(env);
+ enif_mutex_lock(obj->mtx);
+ if (!obj->alive) {
+ enif_mutex_unlock(obj->mtx);
+ return enif_make_badarg(env);
}
- memcpy(&ctx, context.data, context.size);
- HMAC_Final(&ctx, mac_buf, &mac_len);
- HMAC_CTX_cleanup(&ctx);
+ HMAC_Final(&obj->ctx, mac_buf, &mac_len);
+ HMAC_CTX_cleanup(&obj->ctx);
+ obj->alive = 0;
+ enif_mutex_unlock(obj->mtx);
if (argc == 2 && req_len < mac_len) {
/* Only truncate to req_len bytes if asked. */
@@ -1440,6 +1519,8 @@ static ERL_NIF_TERM des_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)
@@ -1461,6 +1542,8 @@ static ERL_NIF_TERM des_cfb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
@@ -1479,6 +1562,7 @@ static ERL_NIF_TERM des_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
ErlNifBinary key, text;
DES_key_schedule schedule;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8 ||
!enif_inspect_iolist_as_binary(env, argv[1], &text) || text.size != 8) {
return enif_make_badarg(env);
@@ -1498,6 +1582,8 @@ static ERL_NIF_TERM des_ede3_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_T
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key1) || key1.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[1], &key2) || key2.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &key3) || key3.size != 8
@@ -1526,6 +1612,8 @@ static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_N
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key1) || key1.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[1], &key2) || key2.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &key3) || key3.size != 8
@@ -1548,6 +1636,31 @@ static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_N
#endif
}
+static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{/* (Key, IVec, Data, IsEncrypt) */
+ ErlNifBinary key, ivec, text;
+ AES_KEY aes_key;
+ unsigned char ivec_clone[16]; /* writable copy */
+ int new_ivlen = 0;
+ ERL_NIF_TERM ret;
+
+ if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
+ || !(key.size == 16 || key.size == 24 || key.size == 32)
+ || !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
+ || !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
+ return enif_make_badarg(env);
+ }
+
+ memcpy(ivec_clone, ivec.data, 16);
+ AES_set_encrypt_key(key.data, key.size * 8, &aes_key);
+ AES_cfb8_encrypt((unsigned char *) text.data,
+ enif_make_new_binary(env, text.size, &ret),
+ text.size, &aes_key, ivec_clone, &new_ivlen,
+ (argv[3] == atom_true));
+ CONSUME_REDS(env,text);
+ return ret;
+}
+
static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Key, IVec, Data, IsEncrypt) */
ErlNifBinary key, ivec, text;
@@ -1556,14 +1669,17 @@ static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE
int new_ivlen = 0;
ERL_NIF_TERM ret;
- if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 16
+ CHECK_OSE_CRYPTO();
+
+ if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
+ || !(key.size == 16 || key.size == 24 || key.size == 32)
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
return enif_make_badarg(env);
}
memcpy(ivec_clone, ivec.data, 16);
- AES_set_encrypt_key(key.data, 128, &aes_key);
+ AES_set_encrypt_key(key.data, key.size * 8, &aes_key);
AES_cfb128_encrypt((unsigned char *) text.data,
enif_make_new_binary(env, text.size, &ret),
text.size, &aes_key, ivec_clone, &new_ivlen,
@@ -1583,6 +1699,8 @@ static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM
unsigned int num = 0;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
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], &ivec) || ivec.size != 16
@@ -1614,6 +1732,8 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N
unsigned char * ivec2_buf;
unsigned char * ecount2_buf;
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_tuple(env, argv[0], &state_arity, &state_term)
|| state_arity != 4
|| !enif_inspect_iolist_as_binary(env, state_term[0], &key_bin)
@@ -1647,6 +1767,7 @@ static ERL_NIF_TERM rand_bytes_1(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned bytes;
unsigned char* data;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)) {
return enif_make_badarg(env);
}
@@ -1660,6 +1781,7 @@ static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NI
unsigned bytes;
unsigned char* data;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)) {
return enif_make_badarg(env);
}
@@ -1677,6 +1799,7 @@ static ERL_NIF_TERM rand_bytes_3(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned char* data;
unsigned top_mask, bot_mask;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)
|| !enif_get_uint(env, argv[1], &top_mask)
|| !enif_get_uint(env, argv[2], &bot_mask)) {
@@ -1699,6 +1822,9 @@ static ERL_NIF_TERM strong_rand_mpint_nif(ErlNifEnv* env, int argc, const ERL_NI
unsigned char* data;
unsigned dlen;
ERL_NIF_TERM ret;
+
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_uint(env, argv[0], &bits)
|| !enif_get_int(env, argv[1], &top)
|| !enif_get_int(env, argv[2], &bottom)) {
@@ -1766,6 +1892,9 @@ static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
unsigned char* data;
unsigned dlen;
ERL_NIF_TERM ret;
+
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_mpint(env, argv[0], &bn_from)
|| !get_bn_from_mpint(env, argv[1], &bn_rand)) {
if (bn_from) BN_free(bn_from);
@@ -1789,7 +1918,7 @@ static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Base,Exponent,Modulo,bin_hdr) */
- BIGNUM *bn_base=NULL, *bn_exponent=NULL, *bn_modulo, *bn_result;
+ BIGNUM *bn_base=NULL, *bn_exponent=NULL, *bn_modulo=NULL, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
@@ -1797,6 +1926,8 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
unsigned extra_byte;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_base)
|| !get_bn_from_bin(env, argv[1], &bn_exponent)
|| !get_bn_from_bin(env, argv[2], &bn_modulo)
@@ -1804,6 +1935,7 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
if (bn_base) BN_free(bn_base);
if (bn_exponent) BN_free(bn_exponent);
+ if (bn_modulo) BN_free(bn_modulo);
return enif_make_badarg(env);
}
bn_result = BN_new();
@@ -1838,6 +1970,8 @@ static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
DSA *dsa;
int i;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) {
if (enif_get_tuple(env, argv[1], &tpl_arity, &tpl_terms)) {
if (tpl_arity != 2 || tpl_terms[0] != atom_digest
@@ -2005,6 +2139,8 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
struct digest_type_t* digp = NULL;
unsigned char* digest = NULL;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(type);
if (!digp) {
return enif_make_badarg(env);
@@ -2064,6 +2200,8 @@ static ERL_NIF_TERM aes_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
unsigned char* ret_ptr;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| (key_bin.size != 16 && key_bin.size != 32)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
@@ -2090,6 +2228,47 @@ static ERL_NIF_TERM aes_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
return ret;
}
+static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{/* (Key, IVec, Data, IsEncrypt) */
+#ifdef HAVE_AES_IGE
+ ErlNifBinary key_bin, ivec_bin, data_bin;
+ AES_KEY aes_key;
+ unsigned char ivec[32];
+ int i;
+ unsigned char* ret_ptr;
+ ERL_NIF_TERM ret;
+
+ CHECK_OSE_CRYPTO();
+
+ if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
+ || (key_bin.size != 16 && key_bin.size != 32)
+ || !enif_inspect_binary(env, argv[1], &ivec_bin)
+ || ivec_bin.size != 32
+ || !enif_inspect_iolist_as_binary(env, argv[2], &data_bin)
+ || data_bin.size % 16 != 0) {
+
+ return enif_make_badarg(env);
+ }
+
+ if (argv[3] == atom_true) {
+ i = AES_ENCRYPT;
+ AES_set_encrypt_key(key_bin.data, key_bin.size*8, &aes_key);
+ }
+ else {
+ i = AES_DECRYPT;
+ AES_set_decrypt_key(key_bin.data, key_bin.size*8, &aes_key);
+ }
+
+ ret_ptr = enif_make_new_binary(env, data_bin.size, &ret);
+ memcpy(ivec, ivec_bin.data, 32); /* writable copy */
+ AES_ige_encrypt(data_bin.data, ret_ptr, data_bin.size, &aes_key, ivec, i);
+ CONSUME_REDS(env,data_bin);
+ return ret;
+#else
+ return atom_notsup;
+#endif
+}
+
static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data1, Data2) */
ErlNifBinary d1, d2;
@@ -2097,6 +2276,8 @@ static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
int i;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &d1)
|| !enif_inspect_iolist_as_binary(env,argv[1], &d2)
|| d1.size != d2.size) {
@@ -2117,6 +2298,8 @@ static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
RC4_KEY rc4_key;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &key)
|| !enif_inspect_iolist_as_binary(env,argv[1], &data)) {
return enif_make_badarg(env);
@@ -2133,6 +2316,8 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
ErlNifBinary key;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &key)) {
return enif_make_badarg(env);
}
@@ -2148,6 +2333,8 @@ static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_N
RC4_KEY* rc4_key;
ERL_NIF_TERM new_state, new_data;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &state)
|| state.size != sizeof(RC4_KEY)
|| !enif_inspect_iolist_as_binary(env,argv[1], &data)) {
@@ -2167,6 +2354,8 @@ static ERL_NIF_TERM rc2_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
RC2_KEY rc2_key;
ERL_NIF_TERM ret;
unsigned char iv_copy[8];
+
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| (key_bin.size != 5 && key_bin.size != 8 && key_bin.size != 16)
@@ -2228,6 +2417,8 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
struct digest_type_t *digp;
unsigned char* digest;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(argv[0]);
if (!digp) {
return enif_make_badarg(env);
@@ -2294,6 +2485,8 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
DSA* dsa;
int i;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) {
if (enif_get_tuple(env, argv[1], &tpl_arity, &tpl_terms)) {
if (tpl_arity != 2 || tpl_terms[0] != atom_digest
@@ -2349,6 +2542,7 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
return enif_make_binary(env, &ret_bin);
}
else {
+ enif_release_binary(&ret_bin);
return atom_error;
}
}
@@ -2376,7 +2570,11 @@ static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary data_bin, ret_bin;
ERL_NIF_TERM head, tail;
int padding, i;
- RSA* rsa = RSA_new();
+ RSA* rsa;
+
+ CHECK_OSE_CRYPTO();
+
+ rsa = RSA_new();
if (!enif_inspect_binary(env, argv[0], &data_bin)
|| !enif_get_list_cell(env, argv[1], &head, &tail)
@@ -2422,7 +2620,11 @@ static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE
{/* (Data, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Padding, IsEncrypt) */
ErlNifBinary data_bin, ret_bin;
int padding, i;
- RSA* rsa = RSA_new();
+ RSA* rsa;
+
+ CHECK_OSE_CRYPTO();
+
+ rsa = RSA_new();
if (!enif_inspect_binary(env, argv[0], &data_bin)
|| !get_rsa_private_key(env, argv[1], rsa)
@@ -2468,6 +2670,8 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E
unsigned char *p_ptr, *g_ptr;
ERL_NIF_TERM ret_p, ret_g;
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_int(env, argv[0], &prime_len)
|| !enif_get_int(env, argv[1], &generator)) {
@@ -2491,10 +2695,14 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E
static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* ([PrimeLen, Generator]) */
- DH* dh_params = DH_new();
+ DH* dh_params;
int i;
ERL_NIF_TERM ret, head, tail;
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!enif_get_list_cell(env, argv[0], &head, &tail)
|| !get_bn_from_bin(env, head, &dh_params->p)
|| !enif_get_list_cell(env, tail, &head, &tail)
@@ -2521,12 +2729,16 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (PrivKey, DHParams=[P,G], Mpint) */
- DH* dh_params = DH_new();
+ DH* dh_params;
int pub_len, prv_len;
unsigned char *pub_ptr, *prv_ptr;
ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail;
int mpint; /* 0 or 4 */
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!(get_bn_from_bin(env, argv[0], &dh_params->priv_key)
|| argv[0] == atom_undefined)
|| !enif_get_list_cell(env, argv[1], &head, &tail)
@@ -2563,12 +2775,16 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_
static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */
- DH* dh_params = DH_new();
+ DH* dh_params;
BIGNUM* pubkey = NULL;
int i;
ErlNifBinary ret_bin;
ERL_NIF_TERM ret, head, tail;
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!get_bn_from_bin(env, argv[0], &pubkey)
|| !get_bn_from_bin(env, argv[1], &dh_params->priv_key)
|| !enif_get_list_cell(env, argv[2], &head, &tail)
@@ -2589,6 +2805,7 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T
ret = enif_make_binary(env, &ret_bin);
}
else {
+ enif_release_binary(&ret_bin);
ret = atom_error;
}
}
@@ -2600,12 +2817,14 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T
static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Multiplier, Verifier, Generator, Exponent, Prime) */
BIGNUM *bn_verifier = NULL;
- BIGNUM *bn_exponent, *bn_generator, *bn_prime, *bn_multiplier, *bn_result;
+ BIGNUM *bn_exponent = NULL, *bn_generator = NULL, *bn_prime = NULL, *bn_multiplier = NULL, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_multiplier)
|| !get_bn_from_bin(env, argv[1], &bn_verifier)
|| !get_bn_from_bin(env, argv[2], &bn_generator)
@@ -2613,9 +2832,9 @@ static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
|| !get_bn_from_bin(env, argv[4], &bn_prime)) {
if (bn_multiplier) BN_free(bn_multiplier);
if (bn_verifier) BN_free(bn_verifier);
- if (bn_verifier) BN_free(bn_generator);
- if (bn_verifier) BN_free(bn_exponent);
- if (bn_verifier) BN_free(bn_prime);
+ if (bn_generator) BN_free(bn_generator);
+ if (bn_exponent) BN_free(bn_exponent);
+ if (bn_prime) BN_free(bn_prime);
return enif_make_badarg(env);
}
@@ -2666,6 +2885,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_a)
|| !get_bn_from_bin(env, argv[1], &bn_u)
|| !get_bn_from_bin(env, argv[2], &bn_B)
@@ -2709,8 +2930,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
/* a + (u * x) */
bn_exp2 = BN_new();
- BN_mod_mul(bn_result, bn_u, bn_exponent, bn_prime, bn_ctx);
- BN_mod_add(bn_exp2, bn_a, bn_result, bn_prime, bn_ctx);
+ BN_mul(bn_result, bn_u, bn_exponent, bn_ctx);
+ BN_add(bn_exp2, bn_a, bn_result);
/* (B - (k * g^x)) ^ (a + (u * x)) % N */
BN_mod_exp(bn_result, bn_base, bn_exp2, bn_prime, bn_ctx);
@@ -2739,12 +2960,14 @@ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
<premaster secret> = (A * v^u) ^ b % N
*/
BIGNUM *bn_b = NULL, *bn_verifier = NULL;
- BIGNUM *bn_prime, *bn_A, *bn_u, *bn_base, *bn_result;
+ BIGNUM *bn_prime = NULL, *bn_A = NULL, *bn_u = NULL, *bn_base, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_verifier)
|| !get_bn_from_bin(env, argv[1], &bn_b)
|| !get_bn_from_bin(env, argv[2], &bn_u)
@@ -2805,6 +3028,8 @@ static ERL_NIF_TERM bf_cfb64_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM
int bf_n = 0; /* blowfish ivec pos */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2828,6 +3053,8 @@ static ERL_NIF_TERM bf_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned char bf_tkey[8]; /* blowfish ivec */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2851,6 +3078,8 @@ static ERL_NIF_TERM bf_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
BF_KEY bf_key; /* blowfish key 8 */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)
|| data_bin.size < 8) {
@@ -2871,6 +3100,8 @@ static ERL_NIF_TERM blowfish_ofb64_encrypt(ErlNifEnv* env, int argc, const ERL_N
int bf_n = 0; /* blowfish ivec pos */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2887,21 +3118,9 @@ static ERL_NIF_TERM blowfish_ofb64_encrypt(ErlNifEnv* env, int argc, const ERL_N
}
#if defined(HAVE_EC)
-static int term2curve_id(ERL_NIF_TERM nid)
-{
- int i;
-
- for (i = 0; i < EC_CURVES_CNT; i++)
- if (ec_curves[i].atom == nid)
- return ec_curves[i].nid;
-
- return 0;
-}
-
static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
{
EC_KEY *key = NULL;
- int nid = 0;
int c_arity = -1;
const ERL_NIF_TERM* curve;
ErlNifBinary seed;
@@ -2913,18 +3132,12 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
EC_GROUP *group = NULL;
EC_POINT *point = NULL;
- if (enif_is_atom(env, curve_arg)) {
- nid = term2curve_id(curve_arg);
- if (nid == 0)
- return NULL;
- key = EC_KEY_new_by_curve_name(nid);
- }
- else if (enif_is_tuple(env, curve_arg)
- && enif_get_tuple(env,curve_arg,&c_arity,&curve)
- && c_arity == 5
- && get_bn_from_bin(env, curve[3], &bn_order)
- && (curve[4] != atom_none && get_bn_from_bin(env, curve[4], &cofactor))) {
- /* {Field, Prime, Point, Order, CoFactor} = Curve */
+ /* {Field, Prime, Point, Order, CoFactor} = Curve */
+ if (enif_is_tuple(env, curve_arg)
+ && enif_get_tuple(env,curve_arg,&c_arity,&curve)
+ && c_arity == 5
+ && get_bn_from_bin(env, curve[3], &bn_order)
+ && (curve[4] != atom_none && get_bn_from_bin(env, curve[4], &cofactor))) {
int f_arity = -1;
const ERL_NIF_TERM* field;
@@ -2958,6 +3171,8 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
/* create the EC_GROUP structure */
group = EC_GROUP_new_curve_GFp(p, a, b, NULL);
+#if !defined(OPENSSL_NO_EC2M)
+
} else if (f_arity == 3 && field[0] == atom_characteristic_two_field) {
/* {characteristic_two_field, M, Basis} */
@@ -3016,6 +3231,7 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
goto out_err;
group = EC_GROUP_new_curve_GF2m(p, a, b, NULL);
+#endif
} else
goto out_err;
@@ -3061,6 +3277,7 @@ out:
if (bn_order) BN_free(bn_order);
if (cofactor) BN_free(cofactor);
if (group) EC_GROUP_free(group);
+ if (point) EC_POINT_free(point);
return key;
}
@@ -3204,6 +3421,8 @@ static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM
#if defined(HAVE_EC)
EC_KEY *key = ec_key_new(env, argv[0]);
+ CHECK_OSE_CRYPTO();
+
if (key && EC_KEY_generate_key(key)) {
const EC_GROUP *group;
const EC_POINT *public_key;
@@ -3221,8 +3440,11 @@ static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM
EC_KEY_free(key);
return enif_make_tuple2(env, pub_key, priv_key);
}
- else
+ else {
+ if (key)
+ EC_KEY_free(key);
return enif_make_badarg(env);
+ }
#else
return atom_notsup;
#endif
@@ -3241,6 +3463,8 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
struct digest_type_t *digp;
unsigned char* digest;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(argv[0]);
if (!digp) {
return enif_make_badarg(env);
@@ -3308,6 +3532,8 @@ static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
struct digest_type_t* digp = NULL;
unsigned char* digest = NULL;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(type);
if (!digp) {
return enif_make_badarg(env);
@@ -3371,6 +3597,8 @@ static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF
EC_POINT *my_ecpoint;
EC_KEY *other_ecdh = NULL;
+ CHECK_OSE_CRYPTO();
+
if (!get_ec_key(env, argv[1], argv[2], atom_undefined, &key))
return enif_make_badarg(env);
@@ -3411,6 +3639,16 @@ out_err:
#endif
}
+static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ErlNifBinary seed_bin;
+ CHECK_OSE_CRYPTO();
+ if (!enif_inspect_binary(env, argv[0], &seed_bin))
+ return enif_make_badarg(env);
+ RAND_seed(seed_bin.data,seed_bin.size);
+ return atom_ok;
+}
+
/* HMAC */
diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c
index 81106b4cc2..b4c175ae43 100644
--- a/lib/crypto/c_src/crypto_callback.c
+++ b/lib/crypto/c_src/crypto_callback.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2012. All Rights Reserved.
+ * Copyright Ericsson AB 2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -17,6 +17,7 @@
* %CopyrightEnd%
*/
+#include <stdio.h>
#include <string.h>
#include <openssl/opensslconf.h>
@@ -51,13 +52,28 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks);
static ErlNifRWLock** lock_vec = NULL; /* Static locks used by openssl */
+static void nomem(size_t size, const char* op)
+{
+ fprintf(stderr, "Out of memory abort. Crypto failed to %s %zu bytes.\r\n",
+ op, size);
+ abort();
+}
+
static void* crypto_alloc(size_t size)
{
- return enif_alloc(size);
+ void *ret = enif_alloc(size);
+
+ if (!ret && size)
+ nomem(size, "allocate");
+ return ret;
}
static void* crypto_realloc(void* ptr, size_t size)
{
- return enif_realloc(ptr, size);
+ void* ret = enif_realloc(ptr, size);
+
+ if (!ret && size)
+ nomem(size, "reallocate");
+ return ret;
}
static void crypto_free(void* ptr)
{
@@ -91,8 +107,6 @@ static INLINE void locking(int mode, ErlNifRWLock* lock)
static void locking_function(int mode, int n, const char *file, int line)
{
- ASSERT(n>=0 && n<CRYPTO_num_locks());
-
locking(mode, lock_vec[n]);
}
diff --git a/lib/crypto/doc/src/book.xml b/lib/crypto/doc/src/book.xml
index f07208482c..c477791bf2 100644
--- a/lib/crypto/doc/src/book.xml
+++ b/lib/crypto/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 99d167bfa9..98384978a5 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2013</year>
+ <year>1999</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -99,7 +99,9 @@
<p><code>ecdh_private() = key_value() </code></p>
- <p><code>ecdh_params() = ec_named_curve() |
+ <p><code>ecdh_params() = ec_named_curve() | ec_explicit_curve()</code></p>
+
+ <p><code>ec_explicit_curve() =
{ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), CoFactor :: none | integer()} </code></p>
<p><code>ec_field() = {prime_field, Prime :: integer()} |
@@ -114,11 +116,19 @@
secp192k1| secp160r2| secp128r2| secp128r1| sect233r1| sect233k1| sect193r2| sect193r1|
sect131r2| sect131r1| sect283r1| sect283k1| sect163r2| secp256k1| secp160k1| secp160r1|
secp112r2| secp112r1| sect113r2| sect113r1| sect239k1| sect163r1| sect163k1| secp256r1|
- secp192r1 </code></p>
+ secp192r1|
+ brainpoolP160r1| brainpoolP160t1| brainpoolP192r1| brainpoolP192t1| brainpoolP224r1|
+ brainpoolP224t1| brainpoolP256r1| brainpoolP256t1| brainpoolP320r1| brainpoolP320t1|
+ brainpoolP384r1| brainpoolP384t1| brainpoolP512r1| brainpoolP512t1
+ </code>
+ Note that the <em>sect</em> curves are GF2m (characteristic two) curves and are only supported if the
+ underlying OpenSSL has support for them.
+ See also <seealso marker="#supports-0">crypto:supports/0</seealso>
+ </p>
<p><code>stream_cipher() = rc4 | aes_ctr </code></p>
- <p><code>block_cipher() = aes_cbc128 | aes_cfb128 | blowfish_cbc |
+ <p><code>block_cipher() = aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc |
blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cbf
| des_ede3 | rc2_cbc </code></p>
@@ -142,9 +152,12 @@
Note that both md4 and md5 are recommended only for compatibility with existing applications.
</p>
<p><code> cipher_algorithms() = des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 |
- blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb128| aes_cbc256 | rc2_cbc | aes_ctr| rc4 </code> </p>
- <p><code> public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh </code> </p>
-
+ blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128| aes_cbc256 | aes_ige256 | rc2_cbc | aes_ctr| rc4 </code> </p>
+ <p><code> public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m</code>
+ Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported
+ with ecdsa and ecdh.
+ </p>
+
</section>
<funcs>
@@ -159,8 +172,9 @@
</type>
<desc>
<p>Encrypt <c>PlainText</c>according to <c>Type</c> block cipher.
- <c>IVec</c> is an arbitrary initializing vector.
- </p>
+ <c>IVec</c> is an arbitrary initializing vector.</p>
+ <p>May throw exception <c>notsup</c> in case the chosen <c>Type</c>
+ is not supported by the underlying OpenSSL implementation.</p>
</desc>
</func>
@@ -175,8 +189,9 @@
</type>
<desc>
<p>Decrypt <c>CipherText</c>according to <c>Type</c> block cipher.
- <c>IVec</c> is an arbitrary initializing vector.
- </p>
+ <c>IVec</c> is an arbitrary initializing vector.</p>
+ <p>May throw exception <c>notsup</c> in case the chosen <c>Type</c>
+ is not supported by the underlying OpenSSL implementation.</p>
</desc>
</func>
@@ -351,7 +366,11 @@
or to one of the functions <seealso marker="#hmac_final-1">hmac_final</seealso> and
<seealso marker="#hmac_final_n-2">hmac_final_n</seealso>
</p>
-
+ <warning><p>Do not use a <c>Context</c> as argument in more than one
+ call to hmac_update or hmac_final. The semantics of reusing old contexts
+ in any way is undefined and could even crash the VM in earlier releases.
+ The reason for this limitation is a lack of support in the underlying
+ OpenSSL API.</p></warning>
</desc>
</func>
@@ -437,17 +456,17 @@
</func>
<func>
- <name>private_decrypt(Type, ChipherText, PrivateKey, Padding) -> PlainText</name>
- <fsummary>Decrypts ChipherText using the private Key.</fsummary>
+ <name>private_decrypt(Type, CipherText, PrivateKey, Padding) -> PlainText</name>
+ <fsummary>Decrypts CipherText using the private Key.</fsummary>
<type>
<v>Type = rsa</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
<v>PrivateKey = rsa_private()</v>
<v>Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding</v>
<v>PlainText = binary()</v>
</type>
<desc>
- <p>Decrypts the <c>ChipherText</c>, encrypted with
+ <p>Decrypts the <c>CipherText</c>, encrypted with
<seealso marker="#public_encrypt-4">public_encrypt/4</seealso> (or equivalent function)
using the <c>PrivateKey</c>, and returns the
plaintext (message digest). This is a low level signature verification operation
@@ -458,7 +477,7 @@
</func>
<func>
- <name>private_encrypt(Type, PlainText, PrivateKey, Padding) -> ChipherText</name>
+ <name>private_encrypt(Type, PlainText, PrivateKey, Padding) -> CipherText</name>
<fsummary>Encrypts PlainText using the private Key.</fsummary>
<type>
<v>Type = rsa</v>
@@ -469,7 +488,7 @@
used, where N is public modulus of the RSA key.</d>
<v>PrivateKey = rsa_private()</v>
<v>Padding = rsa_pkcs1_padding | rsa_no_padding</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
</type>
<desc>
<p>Encrypts the <c>PlainText</c> using the <c>PrivateKey</c>
@@ -481,17 +500,17 @@
</desc>
</func>
<func>
- <name>public_decrypt(Type, ChipherText, PublicKey, Padding) -> PlainText</name>
- <fsummary>Decrypts ChipherText using the public Key.</fsummary>
+ <name>public_decrypt(Type, CipherText, PublicKey, Padding) -> PlainText</name>
+ <fsummary>Decrypts CipherText using the public Key.</fsummary>
<type>
<v>Type = rsa</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
<v>PublicKey = rsa_public() </v>
<v>Padding = rsa_pkcs1_padding | rsa_no_padding</v>
<v>PlainText = binary()</v>
</type>
<desc>
- <p>Decrypts the <c>ChipherText</c>, encrypted with
+ <p>Decrypts the <c>CipherText</c>, encrypted with
<seealso marker="#private_encrypt-4">private_encrypt/4</seealso>(or equivalent function)
using the <c>PrivateKey</c>, and returns the
plaintext (message digest). This is a low level signature verification operation
@@ -502,7 +521,7 @@
</func>
<func>
- <name>public_encrypt(Type, PlainText, PublicKey, Padding) -> ChipherText</name>
+ <name>public_encrypt(Type, PlainText, PublicKey, Padding) -> CipherText</name>
<fsummary>Encrypts PlainText using the public Key.</fsummary>
<type>
<v>Type = rsa</v>
@@ -513,7 +532,7 @@
used, where N is public modulus of the RSA key.</d>
<v>PublicKey = rsa_public()</v>
<v>Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
</type>
<desc>
<p>Encrypts the <c>PlainText</c> (message digest) using the <c>PublicKey</c>
@@ -537,6 +556,21 @@
</desc>
</func>
+ <func>
+ <name>rand_seed(Seed) -> ok</name>
+ <fsummary>Set the seed for random bytes generation</fsummary>
+ <type>
+ <v>Seed = binary()</v>
+ </type>
+ <desc>
+ <p>Set the seed for PRNG to the given binary. This calls the
+ RAND_seed function from openssl. Only use this if the system
+ you are running on does not have enough "randomness" built in.
+ Normally this is when <seealso marker="#strong_rand_bytes/1">
+ stong_rand_bytes/1</seealso> returns <c>low_entropy</c></p>
+ </desc>
+ </func>
+
<func>
<name>rand_uniform(Lo, Hi) -> N</name>
<fsummary>Generate a random number</fsummary>
@@ -659,7 +693,7 @@
<p>Decrypts <c>CipherText</c> according to the stream cipher <c>Type</c> specified in stream_init/3.
<c>PlainText</c> can be any number of bytes. The initial <c>State</c> is created using
<seealso marker="#stream_init-2">stream_init</seealso>.
- <c>NewState</c> must be passed into the next call to <c>stream_encrypt</c>.</p>
+ <c>NewState</c> must be passed into the next call to <c>stream_decrypt</c>.</p>
</desc>
</func>
@@ -678,7 +712,29 @@
</desc>
</func>
-
+ <func>
+ <name>ec_curves() -> EllipticCurveList </name>
+ <fsummary>Provide a list of available named elliptic curves.</fsummary>
+ <type>
+ <v>EllipticCurveList = [ec_named_curve()]</v>
+ </type>
+ <desc>
+ <p>Can be used to determine which named elliptic curves are supported.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name>ec_curve(NamedCurve) -> EllipticCurve </name>
+ <fsummary>Get the defining parameters of a elliptic curve.</fsummary>
+ <type>
+ <v>NamedCurve = ec_named_curve()</v>
+ <v>EllipticCurve = ec_explicit_curve()</v>
+ </type>
+ <desc>
+ <p>Return the defining parameters of a elliptic curve.</p>
+ </desc>
+ </func>
+
<func>
<name>verify(Algorithm, DigestType, Msg, Signature, Key) -> boolean()</name>
<fsummary>Verifies a digital signature.</fsummary>
diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml
index 6d26076c04..1d10773401 100644
--- a/lib/crypto/doc/src/crypto_app.xml
+++ b/lib/crypto/doc/src/crypto_app.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
<year>1999</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/fascicules.xml b/lib/crypto/doc/src/fascicules.xml
index 8fc250bc75..cbc266cd30 100644
--- a/lib/crypto/doc/src/fascicules.xml
+++ b/lib/crypto/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/crypto/doc/src/insidecover.xml b/lib/crypto/doc/src/insidecover.xml
index e7407b8052..bf2427afdf 100644
--- a/lib/crypto/doc/src/insidecover.xml
+++ b/lib/crypto/doc/src/insidecover.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE bookinsidecover SYSTEM "bookinsidecover.dtd">
<bookinsidecover>
diff --git a/lib/crypto/doc/src/licenses.xml b/lib/crypto/doc/src/licenses.xml
index 0b791acfa2..1c77d1f115 100644
--- a/lib/crypto/doc/src/licenses.xml
+++ b/lib/crypto/doc/src/licenses.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml
index 7408907ebd..a0ebc4b3dd 100644
--- a/lib/crypto/doc/src/notes.xml
+++ b/lib/crypto/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,6 +30,205 @@
</header>
<p>This document describes the changes made to the Crypto application.</p>
+<section><title>Crypto 3.5</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Extend block_encrypt/decrypt for aes_cfb8 and aes_cfb128
+ to accept keys of length 128, 192 and 256 bits. Before
+ only 128 bit keys were accepted.</p>
+ <p>
+ Own Id: OTP-12467</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Crypto 3.4.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add configure option --with-ssl-incl=PATH to support
+ OpenSSL installations with headers and libraries at
+ different places.</p>
+ <p>
+ Own Id: OTP-12215 Aux Id: seq12700 </p>
+ </item>
+ <item>
+ <p>
+ Add configure option --with-ssl-rpath to control which
+ runtime library path to use for dynamic linkage toward
+ OpenSSL.</p>
+ <p>
+ Own Id: OTP-12316 Aux Id: seq12753 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Crypto 3.4.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make <c>crypto</c> verify major version number of OpenSSL
+ header files and runtime library. Loading of
+ <c>crypto</c> will fail if there is a version mismatch.</p>
+ <p>
+ Own Id: OTP-12146 Aux Id: seq12700 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Crypto 3.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix memory leak in <c>crypto:hmac_init/upgrade/final</c>
+ functions for all data and in <c>crypto:hmac/3/4</c> for
+ data larger than 20000 bytes. Bug exists since OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11953</p>
+ </item>
+ <item>
+ <p>
+ Fix memory leak in <c>crypto</c> for elliptic curve.</p>
+ <p>
+ Own Id: OTP-11999</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add <c>aes_cfb8</c> cypher to <c>crypto:block_encrypt</c>
+ and <c>block_decrypt</c>.</p>
+ <p>
+ Own Id: OTP-11911</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Crypto 3.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix memory leaks and invalid deallocations in
+ <c>mod_pow</c>, <c>mod_exp</c> and
+ <c>generate_key(srp,...)</c> when bad arguments are
+ passed. (Thanks to Florian Zumbiehi)</p>
+ <p>
+ Own Id: OTP-11550</p>
+ </item>
+ <item>
+ <p>
+ Correction of the word 'ChipherText' throughout the
+ documentation (Thanks to Andrew Tunnell-Jones)</p>
+ <p>
+ Own Id: OTP-11609</p>
+ </item>
+ <item>
+ <p>
+ Fix fatal bug when using a hmac context variable in more
+ than one call to <c>hmac_update</c> or <c>hmac_final</c>.
+ The reuse of hmac contexts has never worked as the
+ underlying OpenSSL implementation does not support it. It
+ is now documented as having undefined behaviour, but it
+ does not crash or corrupt the VM anymore.</p>
+ <p>
+ Own Id: OTP-11724</p>
+ </item>
+ <item>
+ <p>
+ Crypto handles out-of-memory with a controlled abort
+ instead of crash/corruption. (Thanks to Florian Zumbiehi)</p>
+ <p>
+ Own Id: OTP-11725</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ By giving --enable-static-{nifs,drivers} to configure it
+ is now possible to statically linking of nifs and drivers
+ to the main Erlang VM binary. At the moment only the asn1
+ and crypto nifs of the Erlang/OTP nifs and drivers have
+ been prepared to be statically linked. For more details
+ see the Installation Guide in the System documentation.</p>
+ <p>
+ Own Id: OTP-11258</p>
+ </item>
+ <item>
+ <p>
+ Add IGE mode for AES cipher in crypto (Thanks to Yura
+ Beznos).</p>
+ <p>
+ Own Id: OTP-11522</p>
+ </item>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Remove all obsolete application processes from crypto and
+ make it into a pure library application.</p>
+ <p>
+ Own Id: OTP-11619</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Crypto 3.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/crypto/doc/src/ref_man.xml b/lib/crypto/doc/src/ref_man.xml
index f801221c81..d14ff053c9 100644
--- a/lib/crypto/doc/src/ref_man.xml
+++ b/lib/crypto/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/release_notes.xml b/lib/crypto/doc/src/release_notes.xml
index 0a84ca1c15..4f9d448ad1 100644
--- a/lib/crypto/doc/src/release_notes.xml
+++ b/lib/crypto/doc/src/release_notes.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/usersguide.xml b/lib/crypto/doc/src/usersguide.xml
index dc5bf520a9..e6fd291974 100644
--- a/lib/crypto/doc/src/usersguide.xml
+++ b/lib/crypto/doc/src/usersguide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile
index 574c2076f2..c185c159e5 100644
--- a/lib/crypto/src/Makefile
+++ b/lib/crypto/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2013. All Rights Reserved.
+# Copyright Ericsson AB 1999-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -35,10 +35,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/crypto-$(VSN)
# ----------------------------------------------------
MODULES= \
- crypto_app \
crypto \
- crypto_server \
- crypto_sup
+ crypto_ec_curves
HRL_FILES=
diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src
index 5548b6a1b5..823a27ee39 100644
--- a/lib/crypto/src/crypto.app.src
+++ b/lib/crypto/src/crypto.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,15 +17,13 @@
%% %CopyrightEnd%
%%
{application, crypto,
- [{description, "CRYPTO version 2"},
+ [{description, "CRYPTO"},
{vsn, "%VSN%"},
{modules, [crypto,
- crypto_app,
- crypto_sup,
- crypto_server]},
- {registered, [crypto_sup, crypto_server]},
+ crypto_ec_curves]},
+ {registered, []},
{applications, [kernel, stdlib]},
{env, []},
- {mod, {crypto_app, []}}]}.
+ {runtime_dependencies, ["erts-6.0","stdlib-2.0","kernel-3.0"]}]}.
diff --git a/lib/crypto/src/crypto.appup.src b/lib/crypto/src/crypto.appup.src
index 5b4ce5acee..42816773c1 100644
--- a/lib/crypto/src/crypto.appup.src
+++ b/lib/crypto/src/crypto.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,13 +16,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
{"%VSN%",
- [
- {<<"2\\.*">>, [{restart_application, crypto}]}
- {<<"1\\.*">>, [{restart_application, crypto}]}
- ],
- [
- {<<"2\\.*">>, [{restart_application, crypto}]}
- {<<"1\\.*">>, [{restart_application, crypto}]}
- ]}.
+ [{<<".*">>,[{restart_application, crypto}]}],
+ [{<<".*">>,[{restart_application, crypto}]}]
+}.
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 8e8370f3b0..e1fbbf9ab8 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -34,6 +34,8 @@
-export([public_encrypt/4, private_decrypt/4]).
-export([private_encrypt/4, public_decrypt/4]).
-export([dh_generate_parameters/2, dh_check/1]). %% Testing see
+-export([ec_curve/1, ec_curves/0]).
+-export([rand_seed/1]).
%% DEPRECATED
%% Replaced by hash_*
@@ -183,7 +185,7 @@
%%-type ec_key() :: {Curve :: ec_curve(), PrivKey :: binary() | undefined, PubKey :: ec_point() | undefined}.
-on_load(on_load/0).
--define(CRYPTO_NIF_VSN,201).
+-define(CRYPTO_NIF_VSN,301).
-define(nif_stub,nif_stub_error(?LINE)).
nif_stub_error(Line) ->
@@ -204,20 +206,13 @@ stop() ->
application:stop(crypto).
supports()->
- Algs = algorithms(),
- PubKeyAlgs =
- case lists:member(ec, Algs) of
- true ->
- {public_keys, [rsa, dss, ecdsa, dh, srp, ecdh]};
- false ->
- {public_keys, [rsa, dss, dh, srp]}
- end,
- [{hashs, Algs -- [ec]},
- {ciphers, [des_cbc, des_cfb, des3_cbc, des3_cbf, des_ede3, blowfish_cbc,
- blowfish_cfb64, blowfish_ofb64, blowfish_ecb, aes_cbc128, aes_cfb128,
- aes_cbc256, rc2_cbc, aes_ctr, rc4
- ]},
- PubKeyAlgs
+ {Hashs, PubKeys, Ciphers} = algorithms(),
+
+ [{hashs, Hashs},
+ {ciphers, [des_cbc, des_cfb, des3_cbc, des_ede3, blowfish_cbc,
+ blowfish_cfb64, blowfish_ofb64, blowfish_ecb, aes_cbc128, aes_cfb8, aes_cfb128,
+ aes_cbc256, rc2_cbc, aes_ctr, rc4] ++ Ciphers},
+ {public_keys, [rsa, dss, dh, srp] ++ PubKeys}
].
info_lib() -> ?nif_stub.
@@ -286,7 +281,7 @@ hmac_final_n(_Context, _HashLen) -> ? nif_stub.
%% Ecrypt/decrypt %%%
-spec block_encrypt(des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 | blowfish_cbc |
- blowfish_cfb64 | aes_cbc128 | aes_cfb128 | aes_cbc256 | rc2_cbc,
+ blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary().
block_encrypt(des_cbc, Key, Ivec, Data) ->
@@ -309,13 +304,18 @@ block_encrypt(aes_cbc128, Key, Ivec, Data) ->
aes_cbc_128_encrypt(Key, Ivec, Data);
block_encrypt(aes_cbc256, Key, Ivec, Data) ->
aes_cbc_256_encrypt(Key, Ivec, Data);
+block_encrypt(aes_ige256, Key, Ivec, Data) ->
+ aes_ige_256_encrypt(Key, Ivec, Data);
+block_encrypt(aes_cfb8, Key, Ivec, Data) ->
+ aes_cfb_8_encrypt(Key, Ivec, Data);
block_encrypt(aes_cfb128, Key, Ivec, Data) ->
aes_cfb_128_encrypt(Key, Ivec, Data);
block_encrypt(rc2_cbc, Key, Ivec, Data) ->
rc2_cbc_encrypt(Key, Ivec, Data).
-spec block_decrypt(des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 | blowfish_cbc |
- blowfish_cfb64 | blowfish_ofb64 | aes_cbc128 | aes_cbc256 | aes_cfb128 | rc2_cbc,
+ blowfish_cfb64 | blowfish_ofb64 | aes_cbc128 | aes_cbc256 | aes_ige256 |
+ aes_cfb8 | aes_cfb128 | rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary().
block_decrypt(des_cbc, Key, Ivec, Data) ->
@@ -338,6 +338,10 @@ block_decrypt(aes_cbc128, Key, Ivec, Data) ->
aes_cbc_128_decrypt(Key, Ivec, Data);
block_decrypt(aes_cbc256, Key, Ivec, Data) ->
aes_cbc_256_decrypt(Key, Ivec, Data);
+block_decrypt(aes_ige256, Key, Ivec, Data) ->
+ aes_ige_256_decrypt(Key, Ivec, Data);
+block_decrypt(aes_cfb8, Key, Ivec, Data) ->
+ aes_cfb_8_decrypt(Key, Ivec, Data);
block_decrypt(aes_cfb128, Key, Ivec, Data) ->
aes_cfb_128_decrypt(Key, Ivec, Data);
block_decrypt(rc2_cbc, Key, Ivec, Data) ->
@@ -357,14 +361,16 @@ block_decrypt(des_ecb, Key, Data) ->
block_decrypt(blowfish_ecb, Key, Data) ->
blowfish_ecb_decrypt(Key, Data).
--spec next_iv(des_cbc | des3_cbc | aes_cbc, Data::iodata()) -> binary().
+-spec next_iv(des_cbc | des3_cbc | aes_cbc | aes_ige, Data::iodata()) -> binary().
next_iv(des_cbc, Data) ->
des_cbc_ivec(Data);
next_iv(des3_cbc, Data) ->
des_cbc_ivec(Data);
next_iv(aes_cbc, Data) ->
- aes_cbc_ivec(Data).
+ aes_cbc_ivec(Data);
+next_iv(aes_ige, Data) ->
+ aes_ige_ivec(Data).
-spec next_iv(des_cfb, Data::iodata(), Ivec::binary()) -> binary().
@@ -436,6 +442,11 @@ rand_uniform_pos(_,_) ->
rand_uniform_nif(_From,_To) -> ?nif_stub.
+-spec rand_seed(binary()) -> ok.
+rand_seed(Seed) ->
+ rand_seed_nif(Seed).
+
+rand_seed_nif(_Seed) -> ?nif_stub.
-spec mod_pow(binary()|integer(), binary()|integer(), binary()|integer()) -> binary() | error.
mod_pow(Base, Exponent, Prime) ->
@@ -557,7 +568,7 @@ generate_key(srp, {user, [Generator, Prime, Version]}, PrivateArg)
user_srp_gen_key(Private, Generator, Prime);
generate_key(ecdh, Curve, undefined) ->
- ec_key_generate(Curve).
+ ec_key_generate(nif_curve_params(Curve)).
compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) ->
@@ -640,7 +651,7 @@ on_load() ->
end
end,
Lib = filename:join([PrivDir, "lib", LibName]),
- Status = case erlang:load_nif(Lib, {?CRYPTO_NIF_VSN,Lib}) of
+ Status = case erlang:load_nif(Lib, {?CRYPTO_NIF_VSN,path2bin(Lib)}) of
ok -> ok;
{error, {load_failed, _}}=Error1 ->
ArchLibDir =
@@ -652,7 +663,7 @@ on_load() ->
[] -> Error1;
_ ->
ArchLib = filename:join([ArchLibDir, LibName]),
- erlang:load_nif(ArchLib, {?CRYPTO_NIF_VSN,ArchLib})
+ erlang:load_nif(ArchLib, {?CRYPTO_NIF_VSN,path2bin(ArchLib)})
end;
Error1 -> Error1
end,
@@ -663,6 +674,14 @@ on_load() ->
"OpenSSL might not be installed on this system.~n",[E,Str]),
Status
end.
+
+path2bin(Path) when is_list(Path) ->
+ Encoding = file:native_name_encoding(),
+ case unicode:characters_to_binary(Path,Encoding,Encoding) of
+ Bin when is_binary(Bin) ->
+ Bin
+ end.
+
%%--------------------------------------------------------------------
%%% Internal functions (some internal API functions are part of the deprecated API)
%%--------------------------------------------------------------------
@@ -1144,7 +1163,21 @@ blowfish_ofb64_encrypt(_Key, _IVec, _Data) -> ?nif_stub.
%%
-%% AES in cipher feedback mode (CFB)
+%% AES in cipher feedback mode (CFB) - 8 bit shift
+%%
+-spec aes_cfb_8_encrypt(iodata(), binary(), iodata()) -> binary().
+-spec aes_cfb_8_decrypt(iodata(), binary(), iodata()) -> binary().
+
+aes_cfb_8_encrypt(Key, IVec, Data) ->
+ aes_cfb_8_crypt(Key, IVec, Data, true).
+
+aes_cfb_8_decrypt(Key, IVec, Data) ->
+ aes_cfb_8_crypt(Key, IVec, Data, false).
+
+aes_cfb_8_crypt(_Key, _IVec, _Data, _IsEncrypt) -> ?nif_stub.
+
+%%
+%% AES in cipher feedback mode (CFB) - 128 bit shift
%%
-spec aes_cfb_128_encrypt(iodata(), binary(), iodata()) -> binary().
-spec aes_cfb_128_decrypt(iodata(), binary(), iodata()) -> binary().
@@ -1255,6 +1288,41 @@ aes_cbc_ivec(Data) when is_list(Data) ->
aes_cbc_ivec(list_to_binary(Data)).
+%%
+%% AES - with 256 bit key in infinite garble extension mode (IGE)
+%%
+
+-spec aes_ige_256_decrypt(iodata(), binary(), iodata()) ->
+ binary().
+
+aes_ige_256_encrypt(Key, IVec, Data) ->
+ aes_ige_crypt(Key, IVec, Data, true).
+
+aes_ige_256_decrypt(Key, IVec, Data) ->
+ aes_ige_crypt(Key, IVec, Data, false).
+
+aes_ige_crypt(Key, IVec, Data, IsEncrypt) ->
+ case aes_ige_crypt_nif(Key,IVec,Data,IsEncrypt) of
+ notsup -> erlang:error(notsup);
+ Bin -> Bin
+ end.
+
+aes_ige_crypt_nif(_Key, _IVec, _Data, _IsEncrypt) -> ?nif_stub.
+
+%%
+%% aes_ige_ivec(Data) -> binary()
+%%
+%% Returns the IVec to be used in the next iteration of
+%% aes_ige_*_[encrypt|decrypt].
+%% IVec size: 32 bytes
+%%
+aes_ige_ivec(Data) when is_binary(Data) ->
+ {_, IVec} = split_binary(Data, size(Data) - 32),
+ IVec;
+aes_ige_ivec(Data) when is_list(Data) ->
+ aes_ige_ivec(list_to_binary(Data)).
+
+
%% Stream ciphers --------------------------------------------------------------------
stream_crypt(Fun, State, Data, Size, MaxByts, []) when Size =< MaxByts ->
@@ -1459,21 +1527,27 @@ ec_key_generate(_Key) -> ?nif_stub.
ecdh_compute_key_nif(_Others, _Curve, _My) -> ?nif_stub.
+ec_curves() ->
+ crypto_ec_curves:curves().
+
+ec_curve(X) ->
+ crypto_ec_curves:curve(X).
+
%%
%% EC
%%
term_to_nif_prime({prime_field, Prime}) ->
- {prime_field, int_to_bin(Prime)};
+ {prime_field, ensure_int_as_bin(Prime)};
term_to_nif_prime(PrimeField) ->
PrimeField.
term_to_nif_curve({A, B, Seed}) ->
{ensure_int_as_bin(A), ensure_int_as_bin(B), Seed}.
nif_curve_params({PrimeField, Curve, BasePoint, Order, CoFactor}) ->
- {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), int_to_bin(Order), int_to_bin(CoFactor)};
+ {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), ensure_int_as_bin(Order), ensure_int_as_bin(CoFactor)};
nif_curve_params(Curve) when is_atom(Curve) ->
%% named curve
- Curve.
+ crypto_ec_curves:curve(Curve).
%% MISC --------------------------------------------------------------------
@@ -1724,6 +1798,7 @@ mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub.
rand_bytes,
strong_rand_bytes,
rand_uniform,
+ rand_seed,
mod_pow,
exor,
%% deprecated
diff --git a/lib/crypto/src/crypto_ec_curves.erl b/lib/crypto/src/crypto_ec_curves.erl
new file mode 100644
index 0000000000..fe17643d96
--- /dev/null
+++ b/lib/crypto/src/crypto_ec_curves.erl
@@ -0,0 +1,1215 @@
+-module(crypto_ec_curves).
+
+-export([curve/1, curves/0]).
+
+curves() ->
+ CryptoSupport = crypto:supports(),
+ HasGF2m = proplists:get_bool(ec_gf2m, proplists:get_value(public_keys, CryptoSupport)),
+ prime_curves() ++ characteristic_two_curves(HasGF2m).
+
+
+prime_curves() ->
+ [secp112r1,secp112r2,secp128r1,secp128r2,secp160k1,secp160r1,secp160r2,
+ secp192r1,secp192k1,secp224k1,secp224r1,secp256k1,secp256r1,secp384r1,
+ secp521r1,prime192v1,prime192v2,prime192v3,prime239v1,prime239v2,prime239v3,
+ prime256v1,wtls6,wtls7,wtls8,wtls9,wtls12,
+ brainpoolP160r1,brainpoolP160t1,brainpoolP192r1,brainpoolP192t1,
+ brainpoolP224r1,brainpoolP224t1,brainpoolP256r1,brainpoolP256t1,
+ brainpoolP320r1,brainpoolP320t1,brainpoolP384r1,brainpoolP384t1,
+ brainpoolP512r1,brainpoolP512t1].
+
+characteristic_two_curves(true) ->
+ [sect113r1,sect113r2,sect131r1,sect131r2,sect163k1,sect163r1,
+ sect163r2,sect193r1,sect193r2,sect233k1,sect233r1,sect239k1,sect283k1,
+ sect283r1,sect409k1,sect409r1,sect571k1,sect571r1,c2pnb163v1,c2pnb163v2,
+ c2pnb163v3,c2pnb176v1,c2tnb191v1,c2tnb191v2,c2tnb191v3,c2pnb208w1,c2tnb239v1,
+ c2tnb239v2,c2tnb239v3,c2pnb272w1,c2pnb304w1,c2tnb359v1,c2pnb368w1,c2tnb431r1,
+ wtls1,wtls3,wtls4,wtls5,wtls10,wtls11,ipsec3,ipsec4];
+characteristic_two_curves(_) ->
+ [].
+
+curve(secp112r1) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#DB7C2ABF62E35E668076BEAD2088:112>>, %% A
+ <<16#659EF8BA043916EEDE8911702B22:112>>, %% B
+ <<16#00F50B028E4D696E676875615175290472783FB1:160>>}, %% Seed
+ <<16#04:8,
+ 16#09487239995A5EE76B55F9C2F098:112, %% X(p0)
+ 16#A89CE5AF8724C0A23E0E0FF77500:112>>, %% Y(p0)
+ <<16#DB7C2ABF62E35E7628DFAC6561C5:112>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp112r2) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#6127C24C05F38A0AAAF65C0EF02C:112>>, %% A
+ <<16#51DEF1815DB5ED74FCC34C85D709:112>>, %% B
+ <<16#002757A1114D696E6768756151755316C05E0BD4:160>>}, %% Seed
+ <<16#04:8,
+ 16#4BA30AB5E892B4E1649DD0928643:112, %% X(p0)
+ 16#ADCD46F5882E3747DEF36E956E97:112>>, %% Y(p0)
+ <<16#36DF0AAFD8B8D7597CA10520D04B:112>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(secp128r1) ->
+ {
+ {prime_field, <<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF:128>>}, %% Prime
+ {<<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC:128>>, %% A
+ <<16#E87579C11079F43DD824993C2CEE5ED3:128>>, %% B
+ <<16#000E0D4D696E6768756151750CC03A4473D03679:160>>}, %% Seed
+ <<16#04:8,
+ 16#161FF7528B899B2D0C28607CA52C5B86:128, %% X(p0)
+ 16#CF5AC8395BAFEB13C02DA292DDED7A83:128>>, %% Y(p0)
+ <<16#FFFFFFFE0000000075A30D1B9038A115:128>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp128r2) ->
+ {
+ {prime_field, <<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF:128>>}, %% Prime
+ {<<16#D6031998D1B3BBFEBF59CC9BBFF9AEE1:128>>, %% A
+ <<16#5EEEFCA380D02919DC2C6558BB6D8A5D:128>>, %% B
+ <<16#004D696E67687561517512D8F03431FCE63B88F4:160>>}, %% Seed
+ <<16#04:8,
+ 16#7B6AA5D85E572983E6FB32A7CDEBC140:128, %% X(p0)
+ 16#27B6916A894D3AEE7106FE805FC34B44:128>>, %% Y(p0)
+ <<16#3FFFFFFF7FFFFFFFBE0024720613B5A3:128>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(secp160k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#07:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#3B4C382CE37AA192A4019E763036F4F5DD4D7EBB:160, %% X(p0)
+ 16#938CF935318FDCED6BC28286531733C3F03C4FEE:160>>, %% Y(p0)
+ <<16#0100000000000000000001B8FA16DFAB9ACA16B6B3:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp160r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC:160>>, %% A
+ <<16#1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45:160>>, %% B
+ <<16#1053CDE42C14D696E67687561517533BF3F83345:160>>}, %% Seed
+ <<16#04:8,
+ 16#4A96B5688EF573284664698968C38BB913CBFC82:160, %% X(p0)
+ 16#23A628553168947D59DCC912042351377AC5FB32:160>>, %% Y(p0)
+ <<16#0100000000000000000001F4C8F927AED3CA752257:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp160r2) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70:160>>, %% A
+ <<16#B4E134D3FB59EB8BAB57274904664D5AF50388BA:160>>, %% B
+ <<16#B99B99B099B323E02709A4D696E6768756151751:160>>}, %% Seed
+ <<16#04:8,
+ 16#52DCB034293A117E1F4FF11B30F7199D3144CE6D:160, %% X(p0)
+ 16#FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E:160>>, %% Y(p0)
+ <<16#0100000000000000000000351EE786A818F3A1A16B:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp192r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1:192>>, %% B
+ <<16#3045AE6FC8422F64ED579528D38120EAE12196D5:160>>}, %% Seed
+ <<16#04:8,
+ 16#188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012:192, %% X(p0)
+ 16#07192B95FFC8DA78631011ED6B24CDD573F977A11E794811:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp192k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37:192>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D:192, %% X(p0)
+ 16#9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp224k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D:224>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#05:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C:224, %% X(p0)
+ 16#7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5:224>>, %% Y(p0)
+ <<16#010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7:232>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp224r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001:224>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE:224>>, %% A
+ <<16#B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4:224>>, %% B
+ <<16#BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5:160>>}, %% Seed
+ <<16#04:8,
+ 16#B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21:224, %% X(p0)
+ 16#BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34:224>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp256k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F:256>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#07:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798:256, %% X(p0)
+ 16#483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8:256>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp256r1) ->
+ {
+ {prime_field, <<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF:256>>}, %% Prime
+ {<<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC:256>>, %% A
+ <<16#5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B:256>>, %% B
+ <<16#C49D360886E704936A6678E1139D26B7819F7E90:160>>}, %% Seed
+ <<16#04:8,
+ 16#6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296:256, %% X(p0)
+ 16#4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5:256>>, %% Y(p0)
+ <<16#FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp384r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE:256, %% Prime
+ 16#FFFFFFFF0000000000000000FFFFFFFF:128>>},
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE:256, %% A
+ 16#FFFFFFFF0000000000000000FFFFFFFC:128>>,
+ <<16#B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875A:256, %% B
+ 16#C656398D8A2ED19D2A85C8EDD3EC2AEF:128>>,
+ <<16#A335926AA319A27A1D00896A6773A4827ACDAC73:160>>}, %% Seed
+ <<16#04:8,
+ 16#AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A38:256, %% X(p0)
+ 16#5502F25DBF55296C3A545E3872760AB7:128,
+ 16#3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C0:256, %% Y(p0)
+ 16#0A60B1CE1D7E819D7A431D7C90EA0E5F:128>>,
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF:256, %% Order
+ 16#581A0DB248B0A77AECEC196ACCC52973:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp521r1) ->
+ {
+ {prime_field, <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Prime
+ 16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256,
+ 16#FFFF:16>>},
+ {<<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% A
+ 16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256,
+ 16#FFFC:16>>,
+ <<16#51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109:256, %% B
+ 16#E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F:256,
+ 16#00:8>>,
+ <<16#D09E8800291CB85396CC6717393284AAA0DA64BA:160>>}, %% Seed
+ <<16#04:8,
+ 16#00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D:256, %% X(p0)
+ 16#3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5:256,
+ 16#BD66:16,
+ 16#011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E:256, %% Y(p0)
+ 16#662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD1:256,
+ 16#6650:16>>,
+ <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Order
+ 16#FFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E9138:256,
+ 16#6409:16>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1:192>>, %% B
+ <<16#3045AE6FC8422F64ED579528D38120EAE12196D5:160>>}, %% Seed
+ <<16#04:8,
+ 16#188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012:192, %% X(p0)
+ 16#07192B95FFC8DA78631011ED6B24CDD573F977A11E794811:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v2) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953:192>>, %% B
+ <<16#31A92EE2029FD10D901B113E990710F0D21AC6B6:160>>}, %% Seed
+ <<16#04:8,
+ 16#EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A:192, %% X(p0)
+ 16#6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v3) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#22123DC2395A05CAA7423DAECCC94760A7D462256BD56916:192>>, %% B
+ <<16#C469684435DEB378C4B65CA9591E2A5763059A2E:160>>}, %% Seed
+ <<16#04:8,
+ 16#7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896:192, %% X(p0)
+ 16#38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v1) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A:240>>, %% B
+ <<16#E43BB460F0B80CC0C0B075798E948060F8321B7D:160>>}, %% Seed
+ <<16#04:8,
+ 16#0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF:240, %% X(p0)
+ 16#7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v2) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C:240>>, %% B
+ <<16#E8B4011604095303CA3B8099982BE09FCB9AE616:160>>}, %% Seed
+ <<16#04:8,
+ 16#38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7:240, %% X(p0)
+ 16#5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v3) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E:240>>, %% B
+ <<16#7D7374168FFE3471B60A857686A19475D3BFA2FF:160>>}, %% Seed
+ <<16#04:8,
+ 16#6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A:240, %% X(p0)
+ 16#1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime256v1) ->
+ {
+ {prime_field, <<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF:256>>}, %% Prime
+ {<<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC:256>>, %% A
+ <<16#5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B:256>>, %% B
+ <<16#C49D360886E704936A6678E1139D26B7819F7E90:160>>}, %% Seed
+ <<16#04:8,
+ 16#6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296:256, %% X(p0)
+ 16#4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5:256>>, %% Y(p0)
+ <<16#FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(sect113r1) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#3088250CA6E7C7FE649CE85820F7:112>>, %% A
+ <<16#E8BEE4D3E2260744188BE0E9C723:112>>, %% B
+ <<16#10E723AB14D696E6768756151756FEBF8FCB49A9:160>>}, %% Seed
+ <<16#04:8,
+ 16#009D73616F35F4AB1407D73562C10F:120, %% X(p0)
+ 16#00A52830277958EE84D1315ED31886:120>>, %% Y(p0)
+ <<16#0100000000000000D9CCEC8A39E56F:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect113r2) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#689918DBEC7E5A0DD6DFC0AA55C7:112>>, %% A
+ <<16#95E9A9EC9B297BD4BF36E059184F:112>>, %% B
+ <<16#10C0FB15760860DEF1EEF4D696E676875615175D:160>>}, %% Seed
+ <<16#04:8,
+ 16#01A57A6A7B26CA5EF52FCDB8164797:120, %% X(p0)
+ 16#00B3ADC94ED1FE674C06E695BABA1D:120>>, %% Y(p0)
+ <<16#010000000000000108789B2496AF93:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect131r1) ->
+ {
+ {characteristic_two_field, 131, {ppbasis,2,3,8}},
+ {<<16#07A11B09A76B562144418FF3FF8C2570B8:136>>, %% A
+ <<16#0217C05610884B63B9C6C7291678F9D341:136>>, %% B
+ <<16#4D696E676875615175985BD3ADBADA21B43A97E2:160>>}, %% Seed
+ <<16#04:8,
+ 16#0081BAF91FDF9833C40F9C181343638399:136, %% X(p0)
+ 16#078C6E7EA38C001F73C8134B1B4EF9E150:136>>, %% Y(p0)
+ <<16#0400000000000000023123953A9464B54D:136>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect131r2) ->
+ {
+ {characteristic_two_field, 131, {ppbasis,2,3,8}},
+ {<<16#03E5A88919D7CAFCBF415F07C2176573B2:136>>, %% A
+ <<16#04B8266A46C55657AC734CE38F018F2192:136>>, %% B
+ <<16#985BD3ADBAD4D696E676875615175A21B43A97E3:160>>}, %% Seed
+ <<16#04:8,
+ 16#0356DCD8F2F95031AD652D23951BB366A8:136, %% X(p0)
+ 16#0648F06D867940A5366D9E265DE9EB240F:136>>, %% Y(p0)
+ <<16#0400000000000000016954A233049BA98F:136>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163k1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8:168, %% X(p0)
+ 16#0289070FB05D38FF58321F2E800536D538CCDAA3D9:168>>, %% Y(p0)
+ <<16#04000000000000000000020108A2E0CC0D99F8A5EF:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163r1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#07B6882CAAEFA84F9554FF8428BD88E246D2782AE2:168>>, %% A
+ <<16#0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9:168>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0369979697AB43897789566789567F787A7876A654:168, %% X(p0)
+ 16#00435EDB42EFAFB2989D51FEFCE3C80988F41FF883:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163r2) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#020A601907B8C953CA1481EB10512F78744A3205FD:168>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#03F0EBA16286A2D57EA0991168D4994637E8343E36:168, %% X(p0)
+ 16#00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1:168>>, %% Y(p0)
+ <<16#040000000000000000000292FE77E70C12A4234C33:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect193r1) ->
+ {
+ {characteristic_two_field, 193, {tpbasis,15}},
+ {<<16#17858FEB7A98975169E171F77B4087DE098AC8A911DF7B01:192>>, %% A
+ <<16#FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814:192>>, %% B
+ <<16#103FAEC74D696E676875615175777FC5B191EF30:160>>}, %% Seed
+ <<16#04:8,
+ 16#01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1:200, %% X(p0)
+ 16#0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05:200>>, %% Y(p0)
+ <<16#01000000000000000000000000C7F34A778F443ACC920EBA49:200>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect193r2) ->
+ {
+ {characteristic_two_field, 193, {tpbasis,15}},
+ {<<16#0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B:200>>, %% A
+ <<16#C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE:192>>, %% B
+ <<16#10B7B4D696E676875615175137C8A16FD0DA2211:160>>}, %% Seed
+ <<16#04:8,
+ 16#00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F:200, %% X(p0)
+ 16#01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C:200>>, %% Y(p0)
+ <<16#010000000000000000000000015AAB561B005413CCD4EE99D5:200>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect233k1) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126:240, %% X(p0)
+ 16#01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3:240>>, %% Y(p0)
+ <<16#8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF:232>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect233r1) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#01:8>>, %% A
+ <<16#66647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD:232>>, %% B
+ <<16#74D59FF07F6B413D0EA14B344B20A2DB049B50C3:160>>}, %% Seed
+ <<16#04:8,
+ 16#00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B:240, %% X(p0)
+ 16#01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052:240>>, %% Y(p0)
+ <<16#01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7:240>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect239k1) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,158}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC:240, %% X(p0)
+ 16#76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA:240>>, %% Y(p0)
+ <<16#2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5:240>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect283k1) ->
+ {
+ {characteristic_two_field, 283, {ppbasis,5,7,12}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC24:256, %% X(p0)
+ 16#58492836:32,
+ 16#01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E341161:256, %% Y(p0)
+ 16#77DD2259:32>>,
+ <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E06:256, %% Order
+ 16#1E163C61:32>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect283r1) ->
+ {
+ {characteristic_two_field, 283, {ppbasis,5,7,12}},
+ {<<16#01:8>>, %% A
+ <<16#027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E31:256, %% B
+ 16#3B79A2F5:32>>,
+ <<16#77E2B07370EB0F832A6DD5B62DFC88CD06BB84BE:160>>}, %% Seed
+ <<16#04:8,
+ 16#05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD:256, %% X(p0)
+ 16#86B12053:32,
+ 16#03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45:256, %% Y(p0)
+ 16#BE8112F4:32>>,
+ <<16#03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7C:256, %% Order
+ 16#EFADB307:32>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect409k1) ->
+ {
+ {characteristic_two_field, 409, {tpbasis,87}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2:256, %% X(p0)
+ 16#C460189EB5AAAA62EE222EB1B35540CFE9023746:160,
+ 16#01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3:256, %% Y(p0)
+ 16#DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B:160>>,
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20:256, %% Order
+ 16#400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF:152>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect409r1) ->
+ {
+ {characteristic_two_field, 409, {tpbasis,87}},
+ {<<16#01:8>>, %% A
+ <<16#21A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9:256, %% B
+ 16#A197B272822F6CD57A55AA4F50AE317B13545F:152>>,
+ <<16#4099B5A457F9D69F79213D094C4BCD4D4262210B:160>>}, %% Seed
+ <<16#04:8,
+ 16#015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703:256, %% X(p0)
+ 16#DC255A868A1180515603AEAB60794E54BB7996A7:160,
+ 16#0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F:256, %% Y(p0)
+ 16#38514F1FDF4B4F40D2181B3681C364BA0273C706:160>>,
+ <<16#010000000000000000000000000000000000000000000000000001E2AAD6A612:256, %% Order
+ 16#F33307BE5FA47C3C9E052F838164CD37D9A21173:160>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect571k1) ->
+ {
+ {characteristic_two_field, 571, {ppbasis,2,5,10}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA4:256, %% X(p0)
+ 16#4370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7:256,
+ 16#E2945283A01C8972:64,
+ 16#0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C:256, %% Y(p0)
+ 16#9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F6:256,
+ 16#01CD4C143EF1C7A3:64>>,
+ <<16#0200000000000000000000000000000000000000000000000000000000000000:256, %% Order
+ 16#00000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB4:256,
+ 16#5CFE778F637C1001:64>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect571r1) ->
+ {
+ {characteristic_two_field, 571, {ppbasis,2,5,10}},
+ {<<16#01:8>>, %% A
+ <<16#02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD:256, %% B
+ 16#84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C:256,
+ 16#7FFEFF7F2955727A:64>>,
+ <<16#2AA058F73A0E33AB486B0F610410C53A7F132310:160>>}, %% Seed
+ <<16#04:8,
+ 16#0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABD:256, %% X(p0)
+ 16#BDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927:256,
+ 16#E1E7769C8EEC2D19:64,
+ 16#037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A6:256, %% Y(p0)
+ 16#84423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C:256,
+ 16#1A4827AF1B8AC15B:64>>,
+ <<16#03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Order
+ 16#FFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E:256,
+ 16#8382E9BB2FE84E47:64>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#072546B5435234A422E0789675F432C89435DE5242:168>>, %% A
+ <<16#C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9:160>>, %% B
+ <<16#D2C0FB15760860DEF1EEF4D696E6768756151754:160>>}, %% Seed
+ <<16#04:8,
+ 16#07AF69989546103D79329FCC3D74880F33BBE803CB:168, %% X(p0)
+ 16#01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F:168>>, %% Y(p0)
+ <<16#0400000000000000000001E60FC8821CC74DAEAFC1:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v2) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#0108B39E77C4B108BED981ED0E890E117C511CF072:168>>, %% A
+ <<16#0667ACEB38AF4E488C407433FFAE4F1C811638DF20:168>>, %% B
+ <<16#53814C050D44D696E67687561517580CA4E29FFD:160>>}, %% Seed
+ <<16#04:8,
+ 16#0024266E4EB5106D0A964D92C4860E2671DB9B6CC5:168, %% X(p0)
+ 16#079F684DDF6684C5CD258B3890021B2386DFD19FC5:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v3) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#07A526C63D3E25A256A007699F5447E32AE456B50E:168>>, %% A
+ <<16#03F7061798EB99E238FD6F1BF95B48FEEB4854252B:168>>, %% B
+ <<16#50CBF1D95CA94D696E676875615175F16A36A3B8:160>>}, %% Seed
+ <<16#04:8,
+ 16#02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB:168, %% X(p0)
+ 16#05B935590C155E17EA48EB3FF3718B893DF59A05D0:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb176v1) ->
+ {
+ {characteristic_two_field, 176, {ppbasis,1,2,43}},
+ {<<16#E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B:176>>, %% A
+ <<16#5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2:176>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#8D16C2866798B600F9F08BB4A8E860F3298CE04A5798:176, %% X(p0)
+ 16#6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C:176>>, %% Y(p0)
+ <<16#010092537397ECA4F6145799D62B0A19CE06FE26AD:168>>, %% Order
+ <<16#FF6E:16>> %% CoFactor
+ };
+
+curve(c2tnb191v1) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#2866537B676752636A68F56554E12640276B649EF7526267:192>>, %% A
+ <<16#2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC:192>>, %% B
+ <<16#4E13CA542744D696E67687561517552F279A8C84:160>>}, %% Seed
+ <<16#04:8,
+ 16#36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D:192, %% X(p0)
+ 16#765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB:192>>, %% Y(p0)
+ <<16#40000000000000000000000004A20E90C39067C893BBB9A5:192>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2tnb191v2) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#401028774D7777C7B7666D1366EA432071274F89FF01E718:192>>, %% A
+ <<16#0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01:192>>, %% B
+ <<16#0871EF2FEF24D696E6768756151758BEE0D95C15:160>>}, %% Seed
+ <<16#04:8,
+ 16#3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10:192, %% X(p0)
+ 16#17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A:192>>, %% Y(p0)
+ <<16#20000000000000000000000050508CB89F652824E06B8173:192>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(c2tnb191v3) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#6C01074756099122221056911C77D77E77A777E7E7E77FCB:192>>, %% A
+ <<16#71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8:192>>, %% B
+ <<16#E053512DC684D696E676875615175067AE786D1F:160>>}, %% Seed
+ <<16#04:8,
+ 16#375D4CE24FDE434489DE8746E71786015009E66E38A926DD:192, %% X(p0)
+ 16#545A39176196575D985999366E6AD34CE0A77CD7127B06BE:192>>, %% Y(p0)
+ <<16#155555555555555555555555610C0B196812BFB6288A3EA3:192>>, %% Order
+ <<16#06:8>> %% CoFactor
+ };
+
+curve(c2pnb208w1) ->
+ {
+ {characteristic_two_field, 208, {ppbasis,1,2,83}},
+ {<<16#00:8>>, %% A
+ <<16#C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E:208>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A:208, %% X(p0)
+ 16#0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3:208>>, %% Y(p0)
+ <<16#0101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D:200>>, %% Order
+ <<16#FE48:16>> %% CoFactor
+ };
+
+curve(c2tnb239v1) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#32010857077C5431123A46B808906756F543423E8D27877578125778AC76:240>>, %% A
+ <<16#790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16:240>>, %% B
+ <<16#D34B9A4D696E676875615175CA71B920BFEFB05D:160>>}, %% Seed
+ <<16#04:8,
+ 16#57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D:240, %% X(p0)
+ 16#61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305:240>>, %% Y(p0)
+ <<16#2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447:240>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(c2tnb239v2) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F:240>>, %% A
+ <<16#5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B:240>>, %% B
+ <<16#2AA6982FDFA4D696E676875615175D266727277D:160>>}, %% Seed
+ <<16#04:8,
+ 16#28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205:240, %% X(p0)
+ 16#5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833:240>>, %% Y(p0)
+ <<16#1555555555555555555555555555553C6F2885259C31E3FCDF154624522D:240>>, %% Order
+ <<16#06:8>> %% CoFactor
+ };
+
+curve(c2tnb239v3) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F:240>>, %% A
+ <<16#6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40:240>>, %% B
+ <<16#9E076F4D696E676875615175E11E9FDD77F92041:160>>}, %% Seed
+ <<16#04:8,
+ 16#70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92:240, %% X(p0)
+ 16#2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461:240>>, %% Y(p0)
+ <<16#0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF:240>>, %% Order
+ <<16#0A:8>> %% CoFactor
+ };
+
+curve(c2pnb272w1) ->
+ {
+ {characteristic_two_field, 272, {ppbasis,1,3,56}},
+ {<<16#91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586:256, %% A
+ 16#FB20:16>>,
+ <<16#7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E5:256, %% B
+ 16#40F7:16>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171:256, %% X(p0)
+ 16#DD8D:16,
+ 16#10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE:256, %% Y(p0)
+ 16#9D23:16>>,
+ <<16#0100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E6295:256, %% Order
+ 16#21:8>>,
+ <<16#FF06:16>> %% CoFactor
+ };
+
+curve(c2pnb304w1) ->
+ {
+ {characteristic_two_field, 304, {ppbasis,1,2,11}},
+ {<<16#FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C128807836:256, %% A
+ 16#5A0396C8E681:48>>,
+ <<16#BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C1403960:256, %% B
+ 16#1E55827340BE:48>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A:256, %% X(p0)
+ 16#644F740A2614:48,
+ 16#E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B54:256, %% Y(p0)
+ 16#9FDC1B92C03B:48>>,
+ <<16#0101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899:256, %% Order
+ 16#164443051D:40>>,
+ <<16#FE2E:16>> %% CoFactor
+ };
+
+curve(c2tnb359v1) ->
+ {
+ {characteristic_two_field, 359, {tpbasis,68}},
+ {<<16#5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223:256, %% A
+ 16#A5E05656FB549016A96656A557:104>>,
+ <<16#2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626:256, %% B
+ 16#089687742B6329E70680231988:104>>,
+ <<16#2B354920B724D696E67687561517585BA1332DC6:160>>}, %% Seed
+ <<16#04:8,
+ 16#3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6B:256, %% X(p0)
+ 16#DCDE98E8E707C07A2239B1B097:104,
+ 16#53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868:256, %% Y(p0)
+ 16#FE57E4AE2DE211305A407104BD:104>>,
+ <<16#01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20:256, %% Order
+ 16#A7EB964FE7719E74F490758D3B:104>>,
+ <<16#4C:8>> %% CoFactor
+ };
+
+curve(c2pnb368w1) ->
+ {
+ {characteristic_two_field, 368, {ppbasis,1,2,85}},
+ {<<16#E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C5:256, %% A
+ 16#76D62F0AB7519CCD2A1A906AE30D:112>>,
+ <<16#FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1:256, %% B
+ 16#C2112D84D164F444F8F74786046A:112>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22:256, %% X(p0)
+ 16#E7E789E927BE216F02E1FB136A5F:112,
+ 16#7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87C:256, %% Y(p0)
+ 16#D1855ADAA81E2A0750B80FDA2310:112>>,
+ <<16#010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87:256, %% Order
+ 16#E909AE40A6F131E9CFCE5BD967:104>>,
+ <<16#FF70:16>> %% CoFactor
+ };
+
+curve(c2tnb431r1) ->
+ {
+ {characteristic_two_field, 431, {tpbasis,120}},
+ {<<16#1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF6:256, %% A
+ 16#20B0EB9906D0957F6C6FEACD615468DF104DE296CD8F:176>>,
+ <<16#10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A:256, %% B
+ 16#919B626D4E50A8DD731B107A9962381FB5D807BF2618:176>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658:256, %% X(p0)
+ 16#EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7:176,
+ 16#20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F:256, %% Y(p0)
+ 16#3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760:176>>,
+ <<16#0340340340340340340340340340340340340340340340340340340323C313FA:256, %% Order
+ 16#B50589703B5EC68D3587FEC60D161CC149C1AD4A91:168>>,
+ <<16#2760:16>> %% CoFactor
+ };
+
+curve(wtls1) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#01667979A40BA497E5D5C270780617:120, %% X(p0)
+ 16#00F44B4AF1ECC2630E08785CEBCC15:120>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFDBF91AF6DEA73:112>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls3) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8:168, %% X(p0)
+ 16#0289070FB05D38FF58321F2E800536D538CCDAA3D9:168>>, %% Y(p0)
+ <<16#04000000000000000000020108A2E0CC0D99F8A5EF:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls4) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#3088250CA6E7C7FE649CE85820F7:112>>, %% A
+ <<16#E8BEE4D3E2260744188BE0E9C723:112>>, %% B
+ <<16#10E723AB14D696E6768756151756FEBF8FCB49A9:160>>}, %% Seed
+ <<16#04:8,
+ 16#009D73616F35F4AB1407D73562C10F:120, %% X(p0)
+ 16#00A52830277958EE84D1315ED31886:120>>, %% Y(p0)
+ <<16#0100000000000000D9CCEC8A39E56F:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls5) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#072546B5435234A422E0789675F432C89435DE5242:168>>, %% A
+ <<16#C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9:160>>, %% B
+ <<16#D2C0FB15760860DEF1EEF4D696E6768756151754:160>>}, %% Seed
+ <<16#04:8,
+ 16#07AF69989546103D79329FCC3D74880F33BBE803CB:168, %% X(p0)
+ 16#01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F:168>>, %% Y(p0)
+ <<16#0400000000000000000001E60FC8821CC74DAEAFC1:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls6) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#DB7C2ABF62E35E668076BEAD2088:112>>, %% A
+ <<16#659EF8BA043916EEDE8911702B22:112>>, %% B
+ <<16#00F50B028E4D696E676875615175290472783FB1:160>>}, %% Seed
+ <<16#04:8,
+ 16#09487239995A5EE76B55F9C2F098:112, %% X(p0)
+ 16#A89CE5AF8724C0A23E0E0FF77500:112>>, %% Y(p0)
+ <<16#DB7C2ABF62E35E7628DFAC6561C5:112>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls7) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70:160>>, %% A
+ <<16#B4E134D3FB59EB8BAB57274904664D5AF50388BA:160>>, %% B
+ <<16#B99B99B099B323E02709A4D696E6768756151751:160>>}, %% Seed
+ <<16#04:8,
+ 16#52DCB034293A117E1F4FF11B30F7199D3144CE6D:160, %% X(p0)
+ 16#FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E:160>>, %% Y(p0)
+ <<16#0100000000000000000000351EE786A818F3A1A16B:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls8) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFDE7:112>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0000000000000000000000000001:112, %% X(p0)
+ 16#0000000000000000000000000002:112>>, %% Y(p0)
+ <<16#0100000000000001ECEA551AD837E9:120>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls9) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F:160>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0000000000000000000000000000000000000001:160, %% X(p0)
+ 16#0000000000000000000000000000000000000002:160>>, %% Y(p0)
+ <<16#0100000000000000000001CDC98AE0E2DE574ABF33:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls10) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126:240, %% X(p0)
+ 16#01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3:240>>, %% Y(p0)
+ <<16#8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF:232>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(wtls11) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#01:8>>, %% A
+ <<16#66647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD:232>>, %% B
+ <<16#74D59FF07F6B413D0EA14B344B20A2DB049B50C3:160>>}, %% Seed
+ <<16#04:8,
+ 16#00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B:240, %% X(p0)
+ 16#01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052:240>>, %% Y(p0)
+ <<16#01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7:240>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls12) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001:224>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE:224>>, %% A
+ <<16#B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21:224, %% X(p0)
+ 16#BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34:224>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(ipsec3) ->
+ {
+ {characteristic_two_field, 155, {tpbasis,62}},
+ {<<16#00:8>>, %% A
+ <<16#07338F:24>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#000000000000000000000000000000000000007B:160, %% X(p0)
+ 16#00000000000000000000000000000000000001C8:160>>, %% Y(p0)
+ <<16#02AAAAAAAAAAAAAAAAAAC7F3C7881BD0868FA86C:160>>, %% Order
+ <<16#03:8>> %% CoFactor
+ };
+
+curve(ipsec4) ->
+ {
+ {characteristic_two_field, 185, {tpbasis,69}},
+ {<<16#00:8>>, %% A
+ <<16#1EE9:16>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#000000000000000000000000000000000000000000000018:192, %% X(p0)
+ 16#00000000000000000000000000000000000000000000000D:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFEDF97C44DB9F2420BAFCA75E:184>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(brainpoolP160r1) ->
+ {
+ {prime_field, <<16#E95E4A5F737059DC60DFC7AD95B3D8139515620F:160>>}, %% Prime
+ {<<16#340E7BE2A280EB74E2BE61BADA745D97E8F7C300:160>>, %% A
+ <<16#1E589A8595423412134FAA2DBDEC95C8D8675E58:160>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#BED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC3:160, %% X(p0)
+ 16#1667CB477A1A8EC338F94741669C976316DA6321:160>>, %% Y(p0)
+ <<16#E95E4A5F737059DC60DF5991D45029409E60FC09:160>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP160t1) ->
+ {
+ {prime_field, <<16#E95E4A5F737059DC60DFC7AD95B3D8139515620F:160>>}, %% Prime
+ {<<16#E95E4A5F737059DC60DFC7AD95B3D8139515620C:160>>, %% A
+ <<16#7A556B6DAE535B7B51ED2C4D7DAA7A0B5C55F380:160>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#B199B13B9B34EFC1397E64BAEB05ACC265FF2378:160, %% X(p0)
+ 16#ADD6718B7C7C1961F0991B842443772152C9E0AD:160>>, %% Y(p0)
+ <<16#E95E4A5F737059DC60DF5991D45029409E60FC09:160>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP192r1) ->
+ {
+ {prime_field, <<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297:192>>}, %% Prime
+ {<<16#6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF:192>>, %% A
+ <<16#469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9:192>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#C0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD6:192, %% X(p0)
+ 16#14B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F:192>>, %% Y(p0)
+ <<16#C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP192t1) ->
+ {
+ {prime_field, <<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297:192>>}, %% Prime
+ {<<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86294:192>>, %% A
+ <<16#13D56FFAEC78681E68F9DEB43B35BEC2FB68542E27897B79:192>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#3AE9E58C82F63C30282E1FE7BBF43FA72C446AF6F4618129:192, %% X(p0)
+ 16#097E2C5667C2223A902AB5CA449D0084B7E5B3DE7CCC01C9:192>>, %% Y(p0)
+ <<16#C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP224r1) ->
+ {
+ {prime_field, <<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF:224>>}, %% Prime
+ {<<16#68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43:224>>, %% A
+ <<16#2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0D9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D:224, %% X(p0)
+ 16#58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD:224>>, %% Y(p0)
+ <<16#D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP224t1) ->
+ {
+ {prime_field, <<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF:224>>}, %% Prime
+ {<<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FC:224>>, %% A
+ <<16#4B337D934104CD7BEF271BF60CED1ED20DA14C08B3BB64F18A60888D:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#6AB1E344CE25FF3896424E7FFE14762ECB49F8928AC0C76029B4D580:224, %% X(p0)
+ 16#0374E9F5143E568CD23F3F4D7C0D4B1E41C8CC0D1C6ABD5F1A46DB4C:224>>, %% Y(p0)
+ <<16#D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP256r1) ->
+ {
+ {prime_field, <<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377:256>>}, %% Prime
+ {<<16#7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9:256>>, %% A
+ <<16#26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6:256>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262:256, %% X(p0)
+ 16#547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997:256>>, %% Y(p0)
+ <<16#A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP256t1) ->
+ {
+ {prime_field, <<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377:256>>}, %% Prime
+ {<<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5374:256>>, %% A
+ <<16#662C61C430D84EA4FE66A7733D0B76B7BF93EBC4AF2F49256AE58101FEE92B04:256>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#A3E8EB3CC1CFE7B7732213B23A656149AFA142C47AAFBC2B79A191562E1305F4:256, %% X(p0)
+ 16#2D996C823439C56D7F7B22E14644417E69BCB6DE39D027001DABE8F35B25C9BE:256>>, %% Y(p0)
+ <<16#A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP320r1) ->
+ {
+ {prime_field, <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% Prime
+ 16#FCD412B1F1B32E27:64>>},
+ {<<16#3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F4:256, %% A
+ 16#92F375A97D860EB4:64>>,
+ <<16#520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD88453981:256, %% B
+ 16#6F5EB4AC8FB1F1A6:64>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#43BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C7:256, %% X(p0)
+ 16#10AF8D0D39E20611:64,
+ 16#14FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7:256, %% Y(p0)
+ 16#D35245D1692E8EE1:64>>,
+ <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E9:256, %% Order
+ 16#8691555B44C59311:64>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP320t1) ->
+ {
+ {prime_field, <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% Prime
+ 16#FCD412B1F1B32E27:64>>},
+ {<<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% A
+ 16#FCD412B1F1B32E24:64>>,
+ <<16#A7F561E038EB1ED560B3D147DB782013064C19F27ED27C6780AAF77FB8A547CE:256, %% B
+ 16#B5B4FEF422340353:64>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#925BE9FB01AFC6FB4D3E7D4990010F813408AB106C4F09CB7EE07868CC136FFF:256, %% X(p0)
+ 16#3357F624A21BED52:64,
+ 16#63BA3A7A27483EBF6671DBEF7ABB30EBEE084E58A0B077AD42A5A0989D1EE71B:256, %% Y(p0)
+ 16#1B9BC0455FB0D2C3:64>>,
+ <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E9:256, %% Order
+ 16#8691555B44C59311:64>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP384r1) ->
+ {
+ {prime_field, <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% Prime
+ 16#ACD3A729901D1A71874700133107EC53:128>>},
+ {<<16#7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F:256, %% A
+ 16#8AA5814A503AD4EB04A8C7DD22CE2826:128>>,
+ <<16#04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D5:256, %% B
+ 16#7CB4390295DBC9943AB78696FA504C11:128>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8:256, %% X(p0)
+ 16#E826E03436D646AAEF87B2E247D4AF1E:128,
+ 16#8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF9912928:256, %% Y(p0)
+ 16#0E4646217791811142820341263C5315:128>>,
+ <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7:256, %% Order
+ 16#CF3AB6AF6B7FC3103B883202E9046565:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP384t1) ->
+ {
+ {prime_field, <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% Prime
+ 16#ACD3A729901D1A71874700133107EC53:128>>},
+ {<<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% A
+ 16#ACD3A729901D1A71874700133107EC50:128>>,
+ <<16#7F519EADA7BDA81BD826DBA647910F8C4B9346ED8CCDC64E4B1ABD11756DCE1D:256, %% B
+ 16#2074AA263B88805CED70355A33B471EE:128>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#18DE98B02DB9A306F2AFCD7235F72A819B80AB12EBD653172476FECD462AABFF:256, %% X(p0)
+ 16#C4FF191B946A5F54D8D0AA2F418808CC:128,
+ 16#25AB056962D30651A114AFD2755AD336747F93475B7A1FCA3B88F2B6A208CCFE:256, %% Y(p0)
+ 16#469408584DC2B2912675BF5B9E582928:128>>,
+ <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7:256, %% Order
+ 16#CF3AB6AF6B7FC3103B883202E9046565:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP512r1) ->
+ {
+ {prime_field, <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% Prime
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3:256>>},
+ {<<16#7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC:256, %% A
+ 16#2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA:256>>,
+ <<16#3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A7:256, %% B
+ 16#2BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723:256>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098E:256, %% X(p0)
+ 16#FF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822:256,
+ 16#7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111:256, %% Y(p0)
+ 16#B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892:256>>,
+ <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870:256, %% Order
+ 16#553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069:256>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP512t1) ->
+ {
+ {prime_field, <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% Prime
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3:256>>},
+ {<<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% A
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F0:256>>,
+ <<16#7CBBBCF9441CFAB76E1890E46884EAE321F70C0BCB4981527897504BEC3E36A6:256, %% B
+ 16#2BCDFA2304976540F6450085F2DAE145C22553B465763689180EA2571867423E:256>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#640ECE5C12788717B9C1BA06CBC2A6FEBA85842458C56DDE9DB1758D39C0313D:256, %% X(p0)
+ 16#82BA51735CDB3EA499AA77A7D6943A64F7A3F25FE26F06B51BAA2696FA9035DA:256,
+ 16#5B534BD595F5AF0FA2C892376C84ACE1BB4E3019B71634C01131159CAE03CEE9:256, %% Y(p0)
+ 16#D9932184BEEF216BD71DF2DADF86A627306ECFF96DBB8BACE198B61E00F8B332:256>>,
+ <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870:256, %% Order
+ 16#553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069:256>>,
+ <<16#01:8>> %% CoFactor
+ }.
diff --git a/lib/crypto/src/crypto_server.erl b/lib/crypto/src/crypto_server.erl
deleted file mode 100644
index 89650a9f06..0000000000
--- a/lib/crypto/src/crypto_server.erl
+++ /dev/null
@@ -1,68 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%% Purpose: Provide cryptographic algorithms.
-
--module(crypto_server).
-
--behaviour(gen_server).
-
--export([start_link/0]).
-
-%% Internal exports, call-back functions.
--export([init/1,handle_call/3,handle_cast/2,handle_info/2,code_change/3,
- terminate/2]).
-
-
-%%% --------------------------------------------------------
-%%% Interface Functions.
-%%% --------------------------------------------------------
-
-start_link() ->
- gen_server:start_link({local, crypto_server}, crypto_server, [], []).
-
-init([]) ->
- {ok,[]}.
-
-
-
-%%% --------------------------------------------------------
-%%% The call-back functions.
-%%% --------------------------------------------------------
-
-handle_call(_, _, State) ->
- {noreply, State}.
-
-handle_cast(_, State) ->
- {noreply, State}.
-
-handle_info(_, State) ->
- {noreply, State}.
-
-code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-terminate(_Reason, _State) ->
- [].
-
-
-
-
-
-
diff --git a/lib/crypto/src/crypto_sup.erl b/lib/crypto/src/crypto_sup.erl
deleted file mode 100644
index 8ef58777ab..0000000000
--- a/lib/crypto/src/crypto_sup.erl
+++ /dev/null
@@ -1,39 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%% Purpose: Main supervisor in CRYPTO application.
-
--module(crypto_sup).
-
--behaviour(supervisor).
-
--export([start_link/0, init/1]).
-
-start_link() ->
- supervisor:start_link({local, crypto_sup}, crypto_sup, []).
-
-
-%% init([])
-%% Returns: {ok, {SupFlags, [ChildSpec]}}
-%%
-init([]) ->
- Child = {crypto_server, {crypto_server, start_link, []},
- permanent, 2000, worker, [crypto_server]},
- {ok, {{one_for_all, 10, 3600}, [Child]}}.
-
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index ddc9607e29..53e29af338 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -30,6 +30,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app,
+ appup,
{group, md4},
{group, md5},
{group, ripemd160},
@@ -54,8 +55,10 @@ all() ->
{group, blowfish_cfb64},
{group, blowfish_ofb64},
{group, aes_cbc128},
+ {group, aes_cfb8},
{group, aes_cfb128},
{group, aes_cbc256},
+ {group, aes_ige256},
{group, rc2_cbc},
{group, rc4},
{group, aes_ctr},
@@ -88,8 +91,10 @@ groups() ->
{des3_cbf,[], [block]},
{rc2_cbc,[], [block]},
{aes_cbc128,[], [block]},
+ {aes_cfb8,[], [block]},
{aes_cfb128,[], [block]},
{aes_cbc256,[], [block]},
+ {aes_ige256,[], [block]},
{blowfish_cbc, [], [block]},
{blowfish_ecb, [], [block]},
{blowfish_cfb64, [], [block]},
@@ -102,7 +107,21 @@ groups() ->
init_per_suite(Config) ->
try crypto:start() of
ok ->
- Config
+ try crypto:strong_rand_bytes(1) of
+ _ ->
+ Config
+ catch error:low_entropy ->
+ %% Make sure we are on OSE, otherwise we want to crash
+ {ose,_} = os:type(),
+
+ %% This is NOT how you want to seed this, it is just here
+ %% to make the tests pass. Check your OS manual for how you
+ %% really want to seed.
+ {H,M,L} = erlang:now(),
+ Bin = <<H:24,M:20,L:20>>,
+ crypto:rand_seed(<< <<Bin/binary>> || _ <- lists:seq(1,16) >>),
+ Config
+ end
catch _:_ ->
{skip, "Crypto did not start"}
end.
@@ -140,6 +159,11 @@ app() ->
app(Config) when is_list(Config) ->
ok = ?t:app_test(crypto).
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the crypto appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(crypto).
+%%--------------------------------------------------------------------
hash() ->
[{doc, "Test all different hash functions"}].
hash(Config) when is_list(Config) ->
@@ -435,7 +459,7 @@ do_generate_compute({dh, P, G}) ->
SharedSecret = crypto:compute_key(dh, UserPub, HostPriv, [P, G]).
do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) ->
- Secret = crypto:bytes_to_integer(crypto:compute_key(Type, Pub, Priv, Curve)),
+ Secret = crypto:compute_key(Type, Pub, Priv, Curve),
case Secret of
SharedSecret ->
ok;
@@ -443,6 +467,9 @@ do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) ->
ct:fail({{crypto, compute_key, [Type, Pub, Priv, Curve]}, {expected, SharedSecret}, {got, Other}})
end.
+hexstr2point(X, Y) ->
+ <<4:8, (hexstr2bin(X))/binary, (hexstr2bin(Y))/binary>>.
+
hexstr2bin(S) ->
list_to_binary(hexstr2list(S)).
@@ -663,10 +690,10 @@ group_config(ecdsa = Type, Config) ->
SignVerify = [{Type, sha, Public, Private, Msg}],
[{sign_verify, SignVerify} | Config];
group_config(srp, Config) ->
- GenerateCompute = [srp3(), srp6(), srp6a()],
+ GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()],
[{generate_compute, GenerateCompute} | Config];
group_config(ecdh, Config) ->
- Compute = [ecdh()],
+ Compute = ecdh(),
[{compute, Compute} | Config];
group_config(dh, Config) ->
GenerateCompute = [dh()],
@@ -695,6 +722,12 @@ group_config(aes_cbc128, Config) ->
group_config(aes_cbc256, Config) ->
Block = aes_cbc256(),
[{block, Block} | Config];
+group_config(aes_ige256, Config) ->
+ Block = aes_ige256(),
+ [{block, Block} | Config];
+group_config(aes_cfb8, Config) ->
+ Block = aes_cfb8(),
+ [{block, Block} | Config];
group_config(aes_cfb128, Config) ->
Block = aes_cfb128(),
[{block, Block} | Config];
@@ -1117,6 +1150,76 @@ aes_cbc256() ->
hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
].
+aes_ige256() ->
+ [{aes_ige256,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_ige256,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("4D0F9E735749215C05CB20DA00F7814B77D33F8A668BEBBAC1739AB20302D4FE"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_ige256,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("2A5569424DAE1ACEABDEEA108DB4606AE21A9227CAB5F55BF52535CFA2B34717"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_ige256,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("15D5A583D2D668E518E683D9BDF1B6D0E0C3B1E5D5C1D51E964822E1ADE88DFA"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
+ ].
+
+aes_cfb8() ->
+ [{aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("3B3FD92EB72DAD20333449F8E83CFB4A"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("C8A64537A0B3A93FCDE3CDAD9F1CE58B"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("26751F67A3CBB140B1808CF187A4F4DF"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")},
+ {aes_cfb8,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb8,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("cdc80d6fddf18cab34c25909c99a4174"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb8,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("67ce7f7f81173621961a2b70171d3d7a"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb8,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("2e1e8a1dd59b88b1c8e60fed1efac4c9"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")},
+ {aes_cfb8,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb8,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("dc7e84bfda79164b7ecd8486985d3860"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb8,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("39ffed143b28b1c832113c6331e5407b"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb8,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("df10132415e54b92a13ed0a8267ae2f9"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
+ ].
+
aes_cfb128() ->
[{aes_cfb128,
hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
@@ -1133,6 +1236,38 @@ aes_cfb128() ->
{aes_cfb128,
hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
hexstr2bin("26751F67A3CBB140B1808CF187A4F4DF"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")},
+ {aes_cfb128,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb128,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("cdc80d6fddf18cab34c25909c99a4174"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb128,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("67ce7f7f81173621961a2b70171d3d7a"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb128,
+ hexstr2bin("8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b"),
+ hexstr2bin("2e1e8a1dd59b88b1c8e60fed1efac4c9"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")},
+ {aes_cfb128,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb128,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("dc7e84bfda79164b7ecd8486985d3860"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb128,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("39ffed143b28b1c832113c6331e5407b"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb128,
+ hexstr2bin("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4"),
+ hexstr2bin("df10132415e54b92a13ed0a8267ae2f9"),
hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
].
@@ -1425,6 +1560,32 @@ srp6() ->
ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime),
srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPrivate, UserPassHash, Scrambler, SessionKey).
+
+srp6a_smaller_prime() ->
+ Username = <<"alice">>,
+ Password = <<"password123">>,
+ Salt = <<"mystrongsalt">>,
+ Prime = hexstr2bin("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"),
+ Generator = <<7>>,
+ Version = '6a',
+ Scrambler = hexstr2bin("18DE4A002AD05EF464B19AE2B6929F9B1319C7AA"),
+ Verifier = hexstr2bin("867401D5DE10964768184EAF246B322760C847604075FA66A4423907"
+ "8428BCA5"),
+ ClientPrivate = hexstr2bin("C49F832EE8D67ECF9E7F2785EB0622D8B3FE2344C00F96E1AEF4103C"
+ "A44D51F9"),
+ ServerPrivate = hexstr2bin("6C78CCEAAEC15E69068A87795B2A20ED7B45CFC5A254EBE2F17F144A"
+ "4D99DB18"),
+ ClientPublic = hexstr2bin("2452A57166BBBF690DB77539BAF9C57CD1ED99D5AA15ED925AD9B5C3"
+ "64BBEDFF"),
+ ServerPublic = hexstr2bin("2C0464DE84B91E4963A3546CAC0EFE55F31F49208C3F0AD7EE55F444"
+ "8F38BA7F"),
+
+ SessionKey = hexstr2bin("65581B2302580BD26F522A5A421CF969B9CCBCE4051196B034A2A9D22065D848"),
+ UserPassHash = crypto:hash(sha, [Salt, crypto:hash(sha, [Username, <<$:>>, Password])]),
+ Verifier = crypto:mod_pow(Generator, UserPassHash, Prime),
+ ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime),
+ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPrivate, UserPassHash, Scrambler, SessionKey).
+
srp6a() ->
Username = <<"alice">>,
Password = <<"password123">>,
@@ -1474,9 +1635,89 @@ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPriv
{host, [Verifier, Prime, Version, Scrambler]},
SessionKey}.
ecdh() ->
- {ecdh, 10053111454769593468622878414300213417816614162107065345116848162553478019161427871683337786549966,
- 1373339791687564785573162818422814591820885704654,
- secp160r1, 990333295438215762119481641129490894973766052278}.
+ %% http://csrc.nist.gov/groups/STM/cavp/
+ [{ecdh, hexstr2point("42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", "dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523"),
+ hexstr2bin("f17d3fea367b74d340851ca4270dcb24c271f445bed9d527"),
+ secp192r1,
+ hexstr2bin("803d8ab2e5b6e6fca715737c3a82f7ce3c783124f6d51cd0")},
+ {ecdh, hexstr2point("deb5712fa027ac8d2f22c455ccb73a91e17b6512b5e030e7", "7e2690a02cc9b28708431a29fb54b87b1f0c14e011ac2125"),
+ hexstr2bin("56e853349d96fe4c442448dacb7cf92bb7a95dcf574a9bd5"),
+ secp192r1,
+ hexstr2bin("c208847568b98835d7312cef1f97f7aa298283152313c29d")},
+ {ecdh, hexstr2point("af33cd0629bc7e996320a3f40368f74de8704fa37b8fab69abaae280", "882092ccbba7930f419a8a4f9bb16978bbc3838729992559a6f2e2d7"),
+ hexstr2bin("8346a60fc6f293ca5a0d2af68ba71d1dd389e5e40837942df3e43cbd"),
+ secp224r1,
+ hexstr2bin("7d96f9a3bd3c05cf5cc37feb8b9d5209d5c2597464dec3e9983743e8")},
+ {ecdh, hexstr2point("13bfcd4f8e9442393cab8fb46b9f0566c226b22b37076976f0617a46", "eeb2427529b288c63c2f8963c1e473df2fca6caa90d52e2f8db56dd4"),
+ hexstr2bin("043cb216f4b72cdf7629d63720a54aee0c99eb32d74477dac0c2f73d"),
+ secp224r1,
+ hexstr2bin("ee93ce06b89ff72009e858c68eb708e7bc79ee0300f73bed69bbca09")},
+ {ecdh, hexstr2point("700c48f77f56584c5cc632ca65640db91b6bacce3a4df6b42ce7cc838833d287", "db71e509e3fd9b060ddb20ba5c51dcc5948d46fbf640dfe0441782cab85fa4ac"),
+ hexstr2bin("7d7dc5f71eb29ddaf80d6214632eeae03d9058af1fb6d22ed80badb62bc1a534"),
+ secp256r1,
+ hexstr2bin("46fc62106420ff012e54a434fbdd2d25ccc5852060561e68040dd7778997bd7b")},
+ {ecdh, hexstr2point("809f04289c64348c01515eb03d5ce7ac1a8cb9498f5caa50197e58d43a86a7ae", "b29d84e811197f25eba8f5194092cb6ff440e26d4421011372461f579271cda3"),
+ hexstr2bin("38f65d6dce47676044d58ce5139582d568f64bb16098d179dbab07741dd5caf5"),
+ secp256r1,
+ hexstr2bin("057d636096cb80b67a8c038c890e887d1adfa4195e9b3ce241c8a778c59cda67")},
+ {ecdh, hexstr2point("a7c76b970c3b5fe8b05d2838ae04ab47697b9eaf52e764592efda27fe7513272734466b400091adbf2d68c58e0c50066", "ac68f19f2e1cb879aed43a9969b91a0839c4c38a49749b661efedf243451915ed0905a32b060992b468c64766fc8437a"),
+ hexstr2bin("3cc3122a68f0d95027ad38c067916ba0eb8c38894d22e1b15618b6818a661774ad463b205da88cf699ab4d43c9cf98a1"),
+ secp384r1,
+ hexstr2bin("5f9d29dc5e31a163060356213669c8ce132e22f57c9a04f40ba7fcead493b457e5621e766c40a2e3d4d6a04b25e533f1")},
+ {ecdh, hexstr2point("30f43fcf2b6b00de53f624f1543090681839717d53c7c955d1d69efaf0349b7363acb447240101cbb3af6641ce4b88e0", "25e46c0c54f0162a77efcc27b6ea792002ae2ba82714299c860857a68153ab62e525ec0530d81b5aa15897981e858757"),
+ hexstr2bin("92860c21bde06165f8e900c687f8ef0a05d14f290b3f07d8b3a8cc6404366e5d5119cd6d03fb12dc58e89f13df9cd783"),
+ secp384r1,
+ hexstr2bin("a23742a2c267d7425fda94b93f93bbcc24791ac51cd8fd501a238d40812f4cbfc59aac9520d758cf789c76300c69d2ff")},
+ {ecdh, hexstr2point("00685a48e86c79f0f0875f7bc18d25eb5fc8c0b07e5da4f4370f3a9490340854334b1e1b87fa395464c60626124a4e70d0f785601d37c09870ebf176666877a2046d", "01ba52c56fc8776d9e8f5db4f0cc27636d0b741bbe05400697942e80b739884a83bde99e0f6716939e632bc8986fa18dccd443a348b6c3e522497955a4f3c302f676"),
+ hexstr2bin("017eecc07ab4b329068fba65e56a1f8890aa935e57134ae0ffcce802735151f4eac6564f6ee9974c5e6887a1fefee5743ae2241bfeb95d5ce31ddcb6f9edb4d6fc47"),
+ secp521r1,
+ hexstr2bin("005fc70477c3e63bc3954bd0df3ea0d1f41ee21746ed95fc5e1fdf90930d5e136672d72cc770742d1711c3c3a4c334a0ad9759436a4d3c5bf6e74b9578fac148c831")},
+ {ecdh, hexstr2point("01df277c152108349bc34d539ee0cf06b24f5d3500677b4445453ccc21409453aafb8a72a0be9ebe54d12270aa51b3ab7f316aa5e74a951c5e53f74cd95fc29aee7a", "013d52f33a9f3c14384d1587fa8abe7aed74bc33749ad9c570b471776422c7d4505d9b0a96b3bfac041e4c6a6990ae7f700e5b4a6640229112deafa0cd8bb0d089b0"),
+ hexstr2bin("00816f19c1fb10ef94d4a1d81c156ec3d1de08b66761f03f06ee4bb9dcebbbfe1eaa1ed49a6a990838d8ed318c14d74cc872f95d05d07ad50f621ceb620cd905cfb8"),
+ secp521r1,
+ hexstr2bin("000b3920ac830ade812c8f96805da2236e002acbbf13596a9ab254d44d0e91b6255ebf1229f366fb5a05c5884ef46032c26d42189273ca4efa4c3db6bd12a6853759")},
+
+ %% RFC-6954, Appendix A
+ {ecdh, hexstr2point("A9C21A569759DA95E0387041184261440327AFE33141CA04B82DC92E",
+ "98A0F75FBBF61D8E58AE5511B2BCDBE8E549B31E37069A2825F590C1"),
+ hexstr2bin("6060552303899E2140715816C45B57D9B42204FB6A5BF5BEAC10DB00"),
+ brainpoolP224r1,
+ hexstr2bin("1A4BFE705445120C8E3E026699054104510D119757B74D5FE2462C66")},
+ {ecdh, hexstr2point("034A56C550FF88056144E6DD56070F54B0135976B5BF77827313F36B",
+ "75165AD99347DC86CAAB1CBB579E198EAF88DC35F927B358AA683681"),
+ hexstr2bin("39F155483CEE191FBECFE9C81D8AB1A03CDA6790E7184ACE44BCA161"),
+ brainpoolP224r1,
+ hexstr2bin("1A4BFE705445120C8E3E026699054104510D119757B74D5FE2462C66")},
+ {ecdh, hexstr2point("44106E913F92BC02A1705D9953A8414DB95E1AAA49E81D9E85F929A8E3100BE5",
+ "8AB4846F11CACCB73CE49CBDD120F5A900A69FD32C272223F789EF10EB089BDC"),
+ hexstr2bin("55E40BC41E37E3E2AD25C3C6654511FFA8474A91A0032087593852D3E7D76BD3"),
+ brainpoolP256r1,
+ hexstr2bin("89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B")},
+ {ecdh, hexstr2point("8D2D688C6CF93E1160AD04CC4429117DC2C41825E1E9FCA0ADDD34E6F1B39F7B",
+ "990C57520812BE512641E47034832106BC7D3E8DD0E4C7F1136D7006547CEC6A"),
+ hexstr2bin("81DB1EE100150FF2EA338D708271BE38300CB54241D79950F77B063039804F1D"),
+ brainpoolP256r1,
+ hexstr2bin("89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B")},
+ {ecdh, hexstr2point("68B665DD91C195800650CDD363C625F4E742E8134667B767B1B476793588F885AB698C852D4A6E77A252D6380FCAF068",
+ "55BC91A39C9EC01DEE36017B7D673A931236D2F1F5C83942D049E3FA20607493E0D038FF2FD30C2AB67D15C85F7FAA59"),
+ hexstr2bin("032640BC6003C59260F7250C3DB58CE647F98E1260ACCE4ACDA3DD869F74E01F8BA5E0324309DB6A9831497ABAC96670"),
+ brainpoolP384r1,
+ hexstr2bin("0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42")},
+ {ecdh, hexstr2point("4D44326F269A597A5B58BBA565DA5556ED7FD9A8A9EB76C25F46DB69D19DC8CE6AD18E404B15738B2086DF37E71D1EB4",
+ "62D692136DE56CBE93BF5FA3188EF58BC8A3A0EC6C1E151A21038A42E9185329B5B275903D192F8D4E1F32FE9CC78C48"),
+ hexstr2bin("1E20F5E048A5886F1F157C74E91BDE2B98C8B52D58E5003D57053FC4B0BD65D6F15EB5D1EE1610DF870795143627D042"),
+ brainpoolP384r1,
+ hexstr2bin("0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42")},
+ {ecdh, hexstr2point("0A420517E406AAC0ACDCE90FCD71487718D3B953EFD7FBEC5F7F27E28C6149999397E91E029E06457DB2D3E640668B392C2A7E737A7F0BF04436D11640FD09FD",
+ "72E6882E8DB28AAD36237CD25D580DB23783961C8DC52DFA2EC138AD472A0FCEF3887CF62B623B2A87DE5C588301EA3E5FC269B373B60724F5E82A6AD147FDE7"),
+ hexstr2bin("230E18E1BCC88A362FA54E4EA3902009292F7F8033624FD471B5D8ACE49D12CFABBC19963DAB8E2F1EBA00BFFB29E4D72D13F2224562F405CB80503666B25429"),
+ brainpoolP512r1,
+ hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")},
+ {ecdh, hexstr2point("9D45F66DE5D67E2E6DB6E93A59CE0BB48106097FF78A081DE781CDB31FCE8CCBAAEA8DD4320C4119F1E9CD437A2EAB3731FA9668AB268D871DEDA55A5473199F",
+ "2FDC313095BCDD5FB3A91636F07A959C8E86B5636A1E930E8396049CB481961D365CC11453A06C719835475B12CB52FC3C383BCE35E27EF194512B71876285FA"),
+ hexstr2bin("16302FF0DBBB5A8D733DAB7141C1B45ACBC8715939677F6A56850A38BD87BD59B09E80279609FF333EB9D4C061231FB26F92EEB04982A5F1D1764CAD57665422"),
+ brainpoolP512r1,
+ hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")}].
dh() ->
{dh, 0087761979513264537414556992123116644042638206717762626089877284926656954974893442000747478454809111207351620687968672207938731607963470779396984752680274820156266685080223616226905101126463253150237669547023934604953898814222890239130021414026118792251620881355456432549881723310342870016961804255746630219, 2}.
diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk
index 98c071cf87..8489b59562 100644
--- a/lib/crypto/vsn.mk
+++ b/lib/crypto/vsn.mk
@@ -1 +1 @@
-CRYPTO_VSN = 3.2
+CRYPTO_VSN = 3.5
diff --git a/lib/debugger/doc/src/book.xml b/lib/debugger/doc/src/book.xml
index b8440eed2b..82ae6b5b94 100644
--- a/lib/debugger/doc/src/book.xml
+++ b/lib/debugger/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/debugger/doc/src/debugger.xml b/lib/debugger/doc/src/debugger.xml
index 479c4271b0..a04dce92d2 100644
--- a/lib/debugger/doc/src/debugger.xml
+++ b/lib/debugger/doc/src/debugger.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/debugger/doc/src/debugger_chapter.xml b/lib/debugger/doc/src/debugger_chapter.xml
index d309b839a4..99b6d07355 100644
--- a/lib/debugger/doc/src/debugger_chapter.xml
+++ b/lib/debugger/doc/src/debugger_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/debugger/doc/src/fascicules.xml b/lib/debugger/doc/src/fascicules.xml
index 1b9d6bc94d..154c8a3b6d 100644
--- a/lib/debugger/doc/src/fascicules.xml
+++ b/lib/debugger/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/debugger/doc/src/i.xml b/lib/debugger/doc/src/i.xml
index 9560b43665..7564da79b3 100644
--- a/lib/debugger/doc/src/i.xml
+++ b/lib/debugger/doc/src/i.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -211,7 +211,7 @@
the result of calling the shell function <c>pid(X,Y,Z)</c>.
An attached process is expected to call the unofficial
<c>int:attached(Pid)</c> function and to be able to handle
- messages from the interpreter, see <c>dbg_ui_trace.erl</c> for
+ messages from the interpreter, see <c>dbg_wx_trace.erl</c> for
an example.</p>
</desc>
</func>
diff --git a/lib/debugger/doc/src/int.xml b/lib/debugger/doc/src/int.xml
index 0794685f34..96d0d7f83d 100644
--- a/lib/debugger/doc/src/int.xml
+++ b/lib/debugger/doc/src/int.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -49,7 +49,7 @@
execution. This is done by sending and receiving information
to/from the process via a third process, called the meta process.
It is possible to implement your own attached process. See
- <c>int.erl</c> for available functions and <c>dbg_ui_trace.erl</c>
+ <c>int.erl</c> for available functions and <c>dbg_wx_trace.erl</c>
for possible messages.</p>
<p>The interpreter depends on the Kernel, STDLIB and GS
diff --git a/lib/debugger/doc/src/notes.xml b/lib/debugger/doc/src/notes.xml
index a3543a1e11..7384189a6f 100644
--- a/lib/debugger/doc/src/notes.xml
+++ b/lib/debugger/doc/src/notes.xml
@@ -32,6 +32,128 @@
<p>This document describes the changes made to the Debugger
application.</p>
+<section><title>Debugger 4.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix save state which did not work on Mac.</p>
+ <p>
+ Own Id: OTP-12378</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Debugger 4.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure to install .hrl files when needed</p>
+ <p>
+ Own Id: OTP-12197</p>
+ </item>
+ <item>
+ <p>
+ Invoking debugger functions <c>ia/1</c> and <c>iaa/1</c>
+ crashed, when it tried to invoke the old and removed gs
+ based gui functions.</p>
+ <p>
+ Own Id: OTP-12357</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Debugger 4.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix evaluation of map updates in the debugger and
+ erl_eval</p>
+ <p>
+ Reported-by: José Valim</p>
+ <p>
+ Own Id: OTP-11922</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Debugger 4.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The debugger now correctly evaluates code such as '<c>X =
+ true andalso X</c>'. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11553</p>
+ </item>
+ <item>
+ <p>
+ A few subtle bugs in the evaluation of code in the
+ debugger has been corrected. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11676</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ Support Maps syntax in debugger (Thanks to Anthony
+ Ramine).</p>
+ <p>
+ Own Id: OTP-11673</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Debugger 3.2.12</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/debugger/doc/src/part.xml b/lib/debugger/doc/src/part.xml
index b5646235d4..0c90feab66 100644
--- a/lib/debugger/doc/src/part.xml
+++ b/lib/debugger/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/debugger/doc/src/ref_man.xml b/lib/debugger/doc/src/ref_man.xml
index 62bef83646..9ecc1f8879 100644
--- a/lib/debugger/doc/src/ref_man.xml
+++ b/lib/debugger/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/debugger/priv/erlang_bug.png b/lib/debugger/priv/erlang_bug.png
index 87c8279654..200f531484 100644
--- a/lib/debugger/priv/erlang_bug.png
+++ b/lib/debugger/priv/erlang_bug.png
Binary files differ
diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile
index 85754da219..d61519f1ad 100644
--- a/lib/debugger/src/Makefile
+++ b/lib/debugger/src/Makefile
@@ -45,20 +45,6 @@ MODULES= \
dbg_iload \
dbg_iserver \
dbg_istk \
- dbg_ui_break \
- dbg_ui_break_win \
- dbg_ui_edit \
- dbg_ui_edit_win \
- dbg_ui_filedialog_win \
- dbg_ui_interpret \
- dbg_ui_mon \
- dbg_ui_mon_win \
- dbg_ui_settings \
- dbg_ui_trace \
- dbg_ui_trace_win \
- dbg_ui_view \
- dbg_ui_win \
- dbg_ui_winman \
dbg_wx_break \
dbg_wx_break_win \
dbg_wx_code \
@@ -77,7 +63,7 @@ MODULES= \
HRL_FILES=
-INTERNAL_HRL_FILES= dbg_ieval.hrl
+INTERNAL_HRL_FILES= dbg_ieval.hrl dbg_wx_filedialog_win.hrl
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/lib/debugger/src/dbg_icmd.erl b/lib/debugger/src/dbg_icmd.erl
index b230efaa7a..ce12c1beb3 100644
--- a/lib/debugger/src/dbg_icmd.erl
+++ b/lib/debugger/src/dbg_icmd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -49,10 +49,6 @@
%% specifies if the process should break.
%%--------------------------------------------------------------------
-%% Common Test adaptation
-cmd({call_remote,0,ct_line,line,_As}, Bs, _Ieval) ->
- Bs;
-
cmd(Expr, Bs, Ieval) ->
cmd(Expr, Bs, get(next_break), Ieval).
@@ -399,7 +395,7 @@ eval_restricted({From,_Mod,Cmd,SP}, Bs) ->
eval_nonrestricted({From,Mod,Cmd,SP}, Bs, #ieval{level=Le}) when SP < Le->
%% Evaluate in stack
- eval_restricted({From, Mod, Cmd, SP}, Bs),
+ _ = eval_restricted({From, Mod, Cmd, SP}, Bs),
Bs;
eval_nonrestricted({From, _Mod, Cmd, _SP}, Bs,
#ieval{level=Le,module=M,line=Line}=Ieval) ->
@@ -465,7 +461,8 @@ tell_attached(Msg) ->
case get(attached) of
undefined -> ignore;
AttPid ->
- AttPid ! {self(), Msg}
+ AttPid ! {self(), Msg},
+ ignore
end.
%%====================================================================
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl
index f4b6d488a5..96f9f91808 100644
--- a/lib/debugger/src/dbg_ieval.erl
+++ b/lib/debugger/src/dbg_ieval.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -204,7 +204,8 @@ meta(Int, Debugged, M, F, As) ->
%% If it's a fun we're evaluating, show a text
%% representation of the fun and its arguments,
%% not dbg_ieval:eval_fun(...)
- {dbg_ieval, eval_fun} ->
+ {dbg_ieval, EvalFun} when EvalFun =:= eval_fun;
+ EvalFun =:= eval_named_fun ->
{Mx, Fx} = lists:last(As),
{Mx, Fx, lists:nth(2, As)};
_ ->
@@ -432,7 +433,8 @@ eval_function(Mod, Name, As, Bs, Called, Ieval0, Lc) ->
do_eval_function(Mod, Fun, As0, Bs0, _, Ieval0) when is_function(Fun);
Mod =:= ?MODULE,
- Fun =:= eval_fun ->
+ Fun =:= eval_fun orelse
+ Fun =:= eval_named_fun ->
#ieval{level=Le,line=Li,top=Top} = Ieval0,
case lambda(Fun, As0) of
{[{clause,Fc,_,_,_}|_]=Cs,Module,Name,As,Bs} ->
@@ -455,11 +457,6 @@ do_eval_function(Mod, Fun, As0, Bs0, _, Ieval0) when is_function(Fun);
exception(error, Reason, Bs0, Ieval0)
end;
-%% Common Test adaptation
-do_eval_function(ct_line, line, As, Bs, extern, #ieval{level=Le}=Ieval) ->
- debugged_cmd({apply,ct_line,line,As}, Bs, Ieval#ieval{level=Le+1}),
- {value, ignore, Bs};
-
do_eval_function(Mod, Name, As0, Bs0, Called, Ieval0) ->
#ieval{level=Le,line=Li,top=Top} = Ieval0,
trace(call, {Called, {Le,Li,Mod,Name,As0}}),
@@ -487,13 +484,29 @@ lambda(eval_fun, [Cs,As,Bs,{Mod,Name}=F]) ->
true ->
{error,{badarity,{F,As}}}
end;
+lambda(eval_named_fun, [Cs,As,Bs0,FName,RF,{Mod,Name}=F]) ->
+ %% Fun defined in interpreted code, called from outside
+ if
+ length(element(3,hd(Cs))) =:= length(As) ->
+ db_ref(Mod), %% Adds ref between module and process
+ Bs1 = add_binding(FName, RF, Bs0),
+ {Cs,Mod,Name,As,Bs1};
+ true ->
+ {error,{badarity,{F,As}}}
+ end;
lambda(Fun, As) when is_function(Fun) ->
%% Fun called from within interpreted code...
case erlang:fun_info(Fun, module) of
%% ... and the fun was defined in interpreted code
{module, ?MODULE} ->
- {env, [{Mod,Name},Bs,Cs]} = erlang:fun_info(Fun, env),
+ {Mod,Name,Bs, Cs} =
+ case erlang:fun_info(Fun, env) of
+ {env,[{{M,F},Bs0,Cs0}]} ->
+ {M,F,Bs0, Cs0};
+ {env,[{{M,F},Bs0,Cs0,FName}]} ->
+ {M,F,add_binding(FName, Fun, Bs0), Cs0}
+ end,
{arity, Arity} = erlang:fun_info(Fun, arity),
if
length(As) =:= Arity ->
@@ -636,6 +649,25 @@ expr({tuple,Line,Es0}, Bs0, Ieval) ->
{Vs,Bs} = eval_list(Es0, Bs0, Ieval#ieval{line=Line}),
{value,list_to_tuple(Vs),Bs};
+%% Map
+expr({map,Line,Fs0}, Bs0, Ieval) ->
+ {Fs,Bs} = eval_map_fields(Fs0, Bs0, Ieval#ieval{line=Line,top=false}),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi) end,
+ #{}, Fs),
+ {value,Value,Bs};
+expr({map,Line,E0,Fs0}, Bs0, Ieval0) ->
+ Ieval = Ieval0#ieval{line=Line,top=false},
+ {value,E,Bs1} = expr(E0, Bs0, Ieval),
+ case E of
+ #{} ->
+ {Fs,Bs2} = eval_map_fields(Fs0, Bs0, Ieval),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi);
+ ({map_exact,K,V}, Mi) -> maps:update(K,V,Mi)
+ end, E, Fs),
+ {value,Value,merge_bindings(Bs2, Bs1, Ieval)};
+ _ ->
+ exception(error, {badarg,E}, Bs1, Ieval)
+ end;
%% A block of statements
expr({block,Line,Es},Bs,Ieval) ->
seq(Es, Bs, Ieval#ieval{line=Line});
@@ -694,23 +726,25 @@ expr({'if',Line,Cs}, Bs, Ieval) ->
if_clauses(Cs, Bs, Ieval#ieval{line=Line});
%% Andalso/orelse
-expr({'andalso',Line,E1,E2}, Bs, Ieval) ->
- case expr(E1, Bs, Ieval#ieval{line=Line, top=false}) of
- {value,false,_}=Res ->
- Res;
- {value,true,_} ->
- expr(E2, Bs, Ieval#ieval{line=Line, top=false});
- {value,Val,Bs} ->
- exception(error, {badarg,Val}, Bs, Ieval)
+expr({'andalso',Line,E1,E2}, Bs0, Ieval) ->
+ case expr(E1, Bs0, Ieval#ieval{line=Line, top=false}) of
+ {value,false,_}=Res ->
+ Res;
+ {value,true,Bs} ->
+ {value,Val,_} = expr(E2, Bs, Ieval#ieval{line=Line, top=false}),
+ {value,Val,Bs};
+ {value,Val,Bs} ->
+ exception(error, {badarg,Val}, Bs, Ieval)
end;
-expr({'orelse',Line,E1,E2}, Bs, Ieval) ->
- case expr(E1, Bs, Ieval#ieval{line=Line, top=false}) of
- {value,true,_}=Res ->
- Res;
- {value,false,_} ->
- expr(E2, Bs, Ieval#ieval{line=Line, top=false});
- {value,Val,_} ->
- exception(error, {badarg,Val}, Bs, Ieval)
+expr({'orelse',Line,E1,E2}, Bs0, Ieval) ->
+ case expr(E1, Bs0, Ieval#ieval{line=Line, top=false}) of
+ {value,true,_}=Res ->
+ Res;
+ {value,false,Bs} ->
+ {value,Val,_} = expr(E2, Bs, Ieval#ieval{line=Line, top=false}),
+ {value,Val,Bs};
+ {value,Val,Bs} ->
+ exception(error, {badarg,Val}, Bs, Ieval)
end;
%% Matching expression
@@ -727,50 +761,121 @@ expr({match,Line,Lhs,Rhs0}, Bs0, Ieval0) ->
%% Construct a fun
expr({make_fun,Line,Name,Cs}, Bs, #ieval{module=Module}=Ieval) ->
Arity = length(element(3,hd(Cs))),
- Info = {Module,Name},
+ Info = {{Module,Name},Bs,Cs},
Fun =
case Arity of
- 0 -> fun() -> eval_fun(Cs, [], Bs, Info) end;
- 1 -> fun(A) -> eval_fun(Cs, [A], Bs,Info) end;
- 2 -> fun(A,B) -> eval_fun(Cs, [A,B], Bs,Info) end;
- 3 -> fun(A,B,C) -> eval_fun(Cs, [A,B,C], Bs,Info) end;
- 4 -> fun(A,B,C,D) -> eval_fun(Cs, [A,B,C,D], Bs,Info) end;
- 5 -> fun(A,B,C,D,E) -> eval_fun(Cs, [A,B,C,D,E], Bs,Info) end;
- 6 -> fun(A,B,C,D,E,F) -> eval_fun(Cs, [A,B,C,D,E,F], Bs,Info) end;
+ 0 -> fun() -> eval_fun([], Info) end;
+ 1 -> fun(A) -> eval_fun([A], Info) end;
+ 2 -> fun(A,B) -> eval_fun([A,B], Info) end;
+ 3 -> fun(A,B,C) -> eval_fun([A,B,C], Info) end;
+ 4 -> fun(A,B,C,D) -> eval_fun([A,B,C,D], Info) end;
+ 5 -> fun(A,B,C,D,E) -> eval_fun([A,B,C,D,E], Info) end;
+ 6 -> fun(A,B,C,D,E,F) -> eval_fun([A,B,C,D,E,F], Info) end;
7 -> fun(A,B,C,D,E,F,G) ->
- eval_fun(Cs, [A,B,C,D,E,F,G], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G], Info) end;
8 -> fun(A,B,C,D,E,F,G,H) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H], Info) end;
9 -> fun(A,B,C,D,E,F,G,H,I) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I], Info) end;
10 -> fun(A,B,C,D,E,F,G,H,I,J) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J], Info) end;
11 -> fun(A,B,C,D,E,F,G,H,I,J,K) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K], Info) end;
12 -> fun(A,B,C,D,E,F,G,H,I,J,K,L) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L], Info) end;
13 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M], Info) end;
14 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N], Info) end;
15 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O], Info) end;
16 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P], Info) end;
17 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q], Info) end;
18 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R], Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R], Info) end;
19 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S],Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S],Info) end;
20 -> fun(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T],Bs,Info) end;
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T],Info) end;
_Other ->
exception(error, {'argument_limit',{'fun',Cs}}, Bs,
Ieval#ieval{line=Line})
end,
{value,Fun,Bs};
+%% Construct a fun
+expr({make_named_fun,Line,Name,FName,Cs}, Bs, #ieval{module=Module}=Ieval) ->
+ Arity = length(element(3,hd(Cs))),
+ Info = {{Module,Name},Bs,Cs,FName},
+ Fun =
+ case Arity of
+ 0 -> fun RF() -> eval_named_fun([], RF, Info) end;
+ 1 -> fun RF(A) -> eval_named_fun([A], RF, Info) end;
+ 2 -> fun RF(A,B) ->
+ eval_named_fun([A,B], RF, Info) end;
+ 3 -> fun RF(A,B,C) ->
+ eval_named_fun([A,B,C], RF, Info) end;
+ 4 -> fun RF(A,B,C,D) ->
+ eval_named_fun([A,B,C,D], RF, Info) end;
+ 5 -> fun RF(A,B,C,D,E) ->
+ eval_named_fun([A,B,C,D,E],
+ RF, Info) end;
+ 6 -> fun RF(A,B,C,D,E,F) ->
+ eval_named_fun([A,B,C,D,E,F],
+ RF, Info) end;
+ 7 -> fun RF(A,B,C,D,E,F,G) ->
+ eval_named_fun([A,B,C,D,E,F,G],
+ RF, Info) end;
+ 8 -> fun RF(A,B,C,D,E,F,G,H) ->
+ eval_named_fun([A,B,C,D,E,F,G,H],
+ RF, Info) end;
+ 9 -> fun RF(A,B,C,D,E,F,G,H,I) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I],
+ RF, Info) end;
+ 10 -> fun RF(A,B,C,D,E,F,G,H,I,J) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J],
+ RF, Info) end;
+ 11 -> fun RF(A,B,C,D,E,F,G,H,I,J,K) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K],
+ RF, Info) end;
+ 12 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L],
+ RF, Info) end;
+ 13 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M],
+ RF, Info) end;
+ 14 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N],
+ RF, Info) end;
+ 15 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O],
+ RF, Info) end;
+ 16 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P],
+ RF, Info) end;
+ 17 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q],
+ RF, Info) end;
+ 18 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,
+ R],
+ RF, Info) end;
+ 19 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,
+ R,S],
+ RF, Info) end;
+ 20 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,
+ R,S,T],
+ RF, Info) end;
+ _Other ->
+ exception(error, {'argument_limit',{named_fun,FName,Cs}}, Bs,
+ Ieval#ieval{line=Line})
+ end,
+ {value,Fun,Bs};
+
%% Construct an external fun.
expr({make_ext_fun,Line,MFA0}, Bs0, Ieval0) ->
{[M,F,A],Bs} = eval_list(MFA0, Bs0, Ieval0),
@@ -786,11 +891,6 @@ expr({make_ext_fun,Line,MFA0}, Bs0, Ieval0) ->
exception(error, badarg, Bs, Ieval, true)
end;
-%% Common test adaptation
-expr({call_remote,0,ct_line,line,As0,Lc}, Bs0, Ieval0) ->
- {As,_Bs} = eval_list(As0, Bs0, Ieval0),
- eval_function(ct_line, line, As, Bs0, extern, Ieval0, Lc);
-
%% Local function call
expr({local_call,Line,F,As0,Lc}, Bs0, #ieval{module=M} = Ieval0) ->
Ieval = Ieval0#ieval{line=Line},
@@ -960,9 +1060,13 @@ expr(E, _Bs, _Ieval) ->
erlang:error({'NYI',E}).
%% Interpreted fun() called from uninterpreted module, recurse
-eval_fun(Cs, As, Bs, Info) ->
+eval_fun(As, {Info,Bs,Cs}) ->
dbg_debugged:eval(?MODULE, eval_fun, [Cs,As,Bs,Info]).
+%% Interpreted named fun() called from uninterpreted module, recurse
+eval_named_fun(As, RF, {Info,Bs,Cs,FName}) ->
+ dbg_debugged:eval(?MODULE, eval_named_fun, [Cs,As,Bs,FName,RF,Info]).
+
%% eval_lc(Expr,[Qualifier],Bindings,IevalState) ->
%% {value,Value,Bindings}.
%% This is evaluating list comprehensions "straight out of the book".
@@ -1032,7 +1136,7 @@ eval_generate([V|Rest], P, Bs0, CompFun, Ieval) ->
case catch match1(P, V, erl_eval:new_bindings(), Bs0) of
{match,Bsn} ->
Bs2 = add_bindings(Bsn, Bs0),
- CompFun(Bs2) ++ eval_generate(Rest, P, Bs2, CompFun, Ieval);
+ CompFun(Bs2) ++ eval_generate(Rest, P, Bs0, CompFun, Ieval);
nomatch ->
eval_generate(Rest, P, Bs0, CompFun, Ieval)
end;
@@ -1373,6 +1477,19 @@ guard_expr({cons,_,H0,T0}, Bs) ->
guard_expr({tuple,_,Es0}, Bs) ->
{values,Es} = guard_exprs(Es0, Bs),
{value,list_to_tuple(Es)};
+guard_expr({map,_,Fs0}, Bs) ->
+ Fs = eval_map_fields_guard(Fs0, Bs),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi) end,
+ #{}, Fs),
+ {value,Value};
+guard_expr({map,_,E0,Fs0}, Bs) ->
+ {value,E} = guard_expr(E0, Bs),
+ Fs = eval_map_fields_guard(Fs0, Bs),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi);
+ ({map_exact,K,V}, Mi) -> maps:update(K,V,Mi) end,
+ E, Fs),
+ io:format("~p~n", [{E,Value}]),
+ {value,Value};
guard_expr({bin,_,Flds}, Bs) ->
{value,V,_Bs} =
eval_bits:expr_grp(Flds, Bs,
@@ -1382,6 +1499,37 @@ guard_expr({bin,_,Flds}, Bs) ->
end, [], false),
{value,V}.
+
+%% eval_map_fields([Field], Bindings, IEvalState) ->
+%% {[{map_assoc | map_exact,Key,Value}],Bindings}
+
+eval_map_fields(Fs, Bs, Ieval) ->
+ eval_map_fields(Fs, Bs, Ieval, fun expr/3).
+
+eval_map_fields_guard(Fs0, Bs) ->
+ {Fs,_} = eval_map_fields(Fs0, Bs, #ieval{},
+ fun (G0, Bs0, _) ->
+ {value,G} = guard_expr(G0, Bs0),
+ {value,G,Bs0}
+ end),
+ Fs.
+
+eval_map_fields(Fs, Bs, Ieval, F) ->
+ eval_map_fields(Fs, Bs, Ieval, F, []).
+
+eval_map_fields([{map_field_assoc,Line,K0,V0}|Fs], Bs0, Ieval0, F, Acc) ->
+ Ieval = Ieval0#ieval{line=Line},
+ {value,K,Bs1} = F(K0, Bs0, Ieval),
+ {value,V,Bs2} = F(V0, Bs1, Ieval),
+ eval_map_fields(Fs, Bs2, Ieval0, F, [{map_assoc,K,V}|Acc]);
+eval_map_fields([{map_field_exact,Line,K0,V0}|Fs], Bs0, Ieval0, F, Acc) ->
+ Ieval = Ieval0#ieval{line=Line},
+ {value,K,Bs1} = F(K0, Bs0, Ieval),
+ {value,V,Bs2} = F(V0, Bs1, Ieval),
+ eval_map_fields(Fs, Bs2, Ieval0, F, [{map_exact,K,V}|Acc]);
+eval_map_fields([], Bs, _Ieval, _F, Acc) ->
+ {lists:reverse(Acc),Bs}.
+
%% match(Pattern,Term,Bs) -> {match,Bs} | nomatch
match(Pat, Term, Bs) ->
try match1(Pat, Term, Bs, Bs)
@@ -1411,6 +1559,8 @@ match1({cons,_,H,T}, [H1|T1], Bs0, BBs) ->
match1({tuple,_,Elts}, Tuple, Bs, BBs)
when length(Elts) =:= tuple_size(Tuple) ->
match_tuple(Elts, Tuple, 1, Bs, BBs);
+match1({map,_,Fields}, Map, Bs, BBs) when is_map(Map) ->
+ match_map(Fields, Map, Bs, BBs);
match1({bin,_,Fs}, B, Bs0, BBs) when is_bitstring(B) ->
try eval_bits:match_bits(Fs, B, Bs0, BBs,
match_fun(BBs),
@@ -1434,6 +1584,17 @@ match_tuple([E|Es], Tuple, I, Bs0, BBs) ->
match_tuple([], _, _, Bs, _BBs) ->
{match,Bs}.
+match_map([{map_field_exact,_,K0,Pat}|Fs], Map, Bs0, BBs) ->
+ {value,K,BBs} = expr(K0, BBs, #ieval{}),
+ case maps:find(K, Map) of
+ {ok,Value} ->
+ {match,Bs} = match1(Pat, Value, Bs0, BBs),
+ match_map(Fs, Map, Bs, BBs);
+ error -> throw(nomatch)
+ end;
+match_map([], _, Bs, _BBs) ->
+ {match,Bs}.
+
head_match([Par|Pars], [Arg|Args], Bs0, BBs) ->
try match1(Par, Arg, Bs0, BBs) of
{match,Bs} -> head_match(Pars, Args, Bs, BBs)
diff --git a/lib/debugger/src/dbg_iload.erl b/lib/debugger/src/dbg_iload.erl
index 3c95ef8068..ad05a7c529 100644
--- a/lib/debugger/src/dbg_iload.erl
+++ b/lib/debugger/src/dbg_iload.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,18 +42,21 @@
load_mod(Mod, File, Binary, Db) ->
Flag = process_flag(trap_exit, true),
- Pid = spawn_link(fun () -> load_mod1(Mod, File, Binary, Db) end),
+ Pid = spawn_link(load_mod1(Mod, File, Binary, Db)),
receive
{'EXIT', Pid, What} ->
process_flag(trap_exit, Flag),
What
end.
--spec load_mod1(atom(), file:filename(), binary(), ets:tid()) -> no_return().
+-spec load_mod1(atom(), file:filename(), binary(), ets:tid()) ->
+ fun(() -> no_return()).
load_mod1(Mod, File, Binary, Db) ->
- store_module(Mod, File, Binary, Db),
- exit({ok, Mod}).
+ fun() ->
+ store_module(Mod, File, Binary, Db),
+ exit({ok, Mod})
+ end.
%%====================================================================
%% Internal functions
@@ -194,6 +197,11 @@ pattern({cons,Line,H0,T0}) ->
pattern({tuple,Line,Ps0}) ->
Ps1 = pattern_list(Ps0),
{tuple,Line,Ps1};
+pattern({map,Line,Fs0}) ->
+ Fs1 = lists:map(fun ({map_field_exact,L,K,V}) ->
+ {map_field_exact,L,expr(K, false),pattern(V)}
+ end, Fs0),
+ {map,Line,Fs1};
pattern({op,_,'-',{integer,Line,I}}) ->
{value,Line,-I};
pattern({op,_,'+',{integer,Line,I}}) ->
@@ -262,6 +270,8 @@ guard_test({string,Line,_}) -> {value,Line,false};
guard_test({nil,Line}) -> {value,Line,false};
guard_test({cons,Line,_,_}) -> {value,Line,false};
guard_test({tuple,Line,_}) -> {value,Line,false};
+guard_test({map,Line,_}) -> {value,Line,false};
+guard_test({map,Line,_,_}) -> {value,Line,false};
guard_test({bin,Line,_}) -> {value,Line,false}.
gexpr({var,Line,V}) -> {var,Line,V};
@@ -279,6 +289,13 @@ gexpr({cons,Line,H0,T0}) ->
gexpr({tuple,Line,Es0}) ->
Es1 = gexpr_list(Es0),
{tuple,Line,Es1};
+gexpr({map,Line,Fs0}) ->
+ Fs1 = map_fields(Fs0, fun gexpr/1),
+ {map,Line,Fs1};
+gexpr({map,Line,E0,Fs0}) ->
+ E1 = gexpr(E0),
+ Fs1 = map_fields(Fs0, fun gexpr/1),
+ {map,Line,E1,Fs1};
gexpr({bin,Line,Flds0}) ->
Flds = gexpr_list(Flds0),
{bin,Line,Flds};
@@ -341,6 +358,13 @@ expr({cons,Line,H0,T0}, _Lc) ->
expr({tuple,Line,Es0}, _Lc) ->
Es1 = expr_list(Es0),
{tuple,Line,Es1};
+expr({map,Line,Fs0}, _Lc) ->
+ Fs1 = map_fields(Fs0),
+ {map,Line,Fs1};
+expr({map,Line,E0,Fs0}, _Lc) ->
+ E1 = expr(E0, false),
+ Fs1 = map_fields(Fs0),
+ {map,Line,E1,Fs1};
expr({block,Line,Es0}, Lc) ->
%% Unfold block into a sequence.
Es1 = exprs(Es0, Lc),
@@ -369,6 +393,9 @@ expr({'fun',Line,{function,F,A},{_Index,_OldUniq,Name}}, _Lc) ->
As = new_vars(A, Line),
Cs = [{clause,Line,As,[],[{local_call,Line,F,As,true}]}],
{make_fun,Line,Name,Cs};
+expr({named_fun,Line,FName,Cs0,{_,_,Name}}, _Lc) when is_atom(Name) ->
+ Cs = fun_clauses(Cs0),
+ {make_named_fun,Line,Name,FName,Cs};
expr({'fun',Line,{function,{atom,_,M},{atom,_,F},{integer,_,A}}}, _Lc)
when 0 =< A, A =< 255 ->
%% New format in R15 for fun M:F/A (literal values).
@@ -433,7 +460,7 @@ expr({lc,Line,E0,Gs0}, _Lc) -> %R8.
({b_generate,L,P0,Qs}) -> %R12.
{b_generate,L,expr(P0, false),expr(Qs, false)};
(Expr) ->
- case is_guard(Expr) of
+ case erl_lint:is_guard_test(Expr) of
true -> {guard,guard([[Expr]])};
false -> expr(Expr, false)
end
@@ -445,7 +472,7 @@ expr({bc,Line,E0,Gs0}, _Lc) -> %R12.
({b_generate,L,P0,Qs}) -> %R12.
{b_generate,L,expr(P0, false),expr(Qs, false)};
(Expr) ->
- case is_guard(Expr) of
+ case erl_lint:is_guard_test(Expr) of
true -> {guard,guard([[Expr]])};
false -> expr(Expr, false)
end
@@ -488,42 +515,6 @@ expr({bin_element,Line,Expr,Size,Type}, _Lc) ->
expr(Other, _Lc) ->
exit({?MODULE,{unknown_expr,Other}}).
-%% is_guard(Expression) -> true | false.
-%% Test if a general expression is a guard test or guard BIF.
-%% Cannot use erl_lint here as sys_pre_expand has transformed source.
-
-is_guard({op,_,Op,L,R}) ->
- erl_internal:comp_op(Op, 2) andalso is_gexpr_list([L,R]);
-is_guard({call,_,{remote,_,{atom,_,erlang},{atom,_,Test}},As}) ->
- Arity = length(As),
- (erl_internal:guard_bif(Test, Arity) orelse
- erl_internal:old_type_test(Test, Arity)) andalso is_gexpr_list(As);
-is_guard({atom,_,true}) -> true;
-is_guard(_) -> false.
-
-is_gexpr({var,_,_}) -> true;
-is_gexpr({atom,_,_}) -> true;
-is_gexpr({integer,_,_}) -> true;
-is_gexpr({char,_,_}) -> true;
-is_gexpr({float,_,_}) -> true;
-is_gexpr({string,_,_}) -> true;
-is_gexpr({nil,_}) -> true;
-is_gexpr({cons,_,H,T}) -> is_gexpr_list([H,T]);
-is_gexpr({tuple,_,Es}) -> is_gexpr_list(Es);
-is_gexpr({call,_,{remote,_,{atom,_,erlang},{atom,_,F}},As}) ->
- Ar = length(As),
- case erl_internal:guard_bif(F, Ar) of
- true -> is_gexpr_list(As);
- false -> erl_internal:arith_op(F, Ar) andalso is_gexpr_list(As)
- end;
-is_gexpr({op,_,Op,A}) ->
- erl_internal:arith_op(Op, 1) andalso is_gexpr(A);
-is_gexpr({op,_,Op,A1,A2}) ->
- erl_internal:arith_op(Op, 2) andalso is_gexpr_list([A1,A2]);
-is_gexpr(_) -> false.
-
-is_gexpr_list(Es) -> lists:all(fun (E) -> is_gexpr(E) end, Es).
-
consify([A|As]) ->
{cons,0,A,consify(As)};
consify([]) -> {value,0,[]}.
@@ -547,6 +538,15 @@ fun_clauses([{clause,L,H,G,B}|Cs]) ->
[{clause,L,head(H),guard(G),exprs(B, true)}|fun_clauses(Cs)];
fun_clauses([]) -> [].
+map_fields(Fs) ->
+ map_fields(Fs, fun (E) -> expr(E, false) end).
+
+map_fields([{map_field_assoc,L,N,V}|Fs], F) ->
+ [{map_field_assoc,L,F(N),F(V)}|map_fields(Fs)];
+map_fields([{map_field_exact,L,N,V}|Fs], F) ->
+ [{map_field_exact,L,F(N),F(V)}|map_fields(Fs)];
+map_fields([], _) -> [].
+
%% new_var_name() -> VarName.
new_var_name() ->
diff --git a/lib/debugger/src/dbg_ui_break.erl b/lib/debugger/src/dbg_ui_break.erl
deleted file mode 100644
index 8b9a236ce7..0000000000
--- a/lib/debugger/src/dbg_ui_break.erl
+++ /dev/null
@@ -1,98 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_break).
-
-%% External exports
--export([start/3, start/4, start/5]).
-
-%% Internal exports
--export([init/5]).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(GS, Pos, Type)
-%% start(GS, Pos, Type, Module, Line)
-%% GS = graphics system identifier
-%% Pos = {X, Y}
-%% X = Y = integer()
-%% Type = line | conditional | function
-%% Module = atom()
-%% Line = integer()
-%%--------------------------------------------------------------------
-start(GS, Pos, Type) ->
- start(GS, Pos, Type, "", "").
-start(GS, Pos, Type, Mod) ->
- start(GS, Pos, Type, Mod, "").
-start(GS, Pos, Type, Mod, Line) ->
- spawn_link(?MODULE, init, [GS, Pos, Type, Mod, Line]).
-
-
-%%====================================================================
-%% Internal exports
-%%====================================================================
-
-init(GS, Pos, Type, Mod, Line) ->
- Win = dbg_ui_break_win:create_win(GS, Pos, Type, Mod, Line),
- if
- Type==function, is_atom(Mod) ->
- Win2 = gui_cmd({module, Mod}, Win),
- loop(Win2);
- true ->
- loop(Win)
- end.
-
-loop(Win) ->
- receive
-
- %% From the GUI
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd = dbg_ui_break_win:handle_event(GuiEvent, Win),
- Win2 = gui_cmd(Cmd, Win),
- loop(Win2)
- end.
-
-gui_cmd(ignore, Win) ->
- Win;
-gui_cmd(stopped, _Win) ->
- exit(normal);
-gui_cmd({win, Win2}, _Win) ->
- Win2;
-gui_cmd({module, Mod}, Win) ->
- Funcs = int:functions(Mod),
- dbg_ui_break_win:update_functions(Win, Funcs);
-gui_cmd({break, DataL, Action}, _Win) ->
- Fun =
- fun(Data) ->
- case Data of
- [Mod, Line] ->
- int:break(Mod, Line),
- int:action_at_break(Mod, Line, Action);
- [Mod, Line, CMod, CFunc] ->
- int:break(Mod, Line),
- int:test_at_break(Mod, Line, {CMod, CFunc}),
- int:action_at_break(Mod, Line, Action);
- [Mod, Func, Arity] ->
- int:break_in(Mod, Func, Arity)
- end
- end,
- lists:foreach(Fun, DataL),
- exit(normal).
diff --git a/lib/debugger/src/dbg_ui_break_win.erl b/lib/debugger/src/dbg_ui_break_win.erl
deleted file mode 100644
index 11d810ccab..0000000000
--- a/lib/debugger/src/dbg_ui_break_win.erl
+++ /dev/null
@@ -1,314 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_break_win).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,entry,2}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,listbox,2}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,radiobutton,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-%% External exports
--export([create_win/5,
- update_functions/2,
- handle_event/2]).
-
--record(winInfo, {type, % line | conditional | function
- win, % gsobj()
- packer, % gsobj() | undefined
- entries, % [{atom|integer, GSobj()}]
- trigger, % enable | disable | delete
- ok, % gsobj()
- cancel, % gsobj()
- listbox, % gsobj()
- funcs=[] % [[Name, Arity]]
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% create_win(GS, Pos, Type, Mod, Line) -> #winInfo{}
-%% GS = graphics system identifier
-%% Pos = {X, Y}
-%% X = Y = integer()
-%% Type = line | conditional | function
-%% Mod = atom() | ""
-%% Line = integer() | ""
-%%--------------------------------------------------------------------
-create_win(GS, {X, Y}, function, Mod, _Line) ->
- Pad = 8,
- W = 230,
-
- Font = dbg_ui_win:font(normal),
-
- %% Window
- Win = gs:window(GS, [{title, "Function Break"}, {x, X}, {y, Y},
- {destroy, true}, {configure, true},
- {keypress, true}, {data, window}]),
-
- %% Frame
- Frm = gs:frame(Win, [{x, 0}, {y, 0}, {width, W}, {height, 190},
- {packer_x, [{fixed, 70}, {stretch, 1, W-80},
- {fixed, 10}]},
- {packer_y, [{fixed, 10}, {fixed, 30},
- {stretch, 1, 100}, {fixed, 40}]}]),
-
- %% Create input field (label+entry)
- gs:label(Frm, [{label, {text,"Module:"}}, {font, Font}, {align, e},
- {pack_x, 1}, {pack_y, 2}]),
- Ent = gs:entry(Frm, [{text, Mod},
- {pack_x, 2}, {pack_y, 2},
- {keypress, true}, {setfocus, true},
- {buttonpress, true}]),
- Entries = [{Ent, atom}],
-
- %% Create a listbox containing the functions of the module
- gs:label(Frm, [{label, {text,"Function:"}}, {font, Font}, {align, ne},
- {pack_x, 1}, {pack_y, 3}]),
- Lb = gs:listbox(Frm, [{bw, 2}, {relief, ridge}, {vscroll, right},
- {pack_x, 2}, {pack_y, 3},
- {selectmode, multiple}]),
-
- %% Add OK and Cancel buttons
- {Wbtn, Hbtn} = dbg_ui_win:min_size(["OK","Cancel"], 70, 30),
- Bot = gs:frame(Frm, [{pack_x, {1, 3}}, {pack_y, 4}]),
- OK = gs:button(Bot, [{x, Pad}, {y, Pad},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"OK"}}, {font, Font}]),
- Cancel = gs:button(Bot, [{x, W-Pad-Wbtn}, {y, Pad},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"Cancel"}}, {font, Font}]),
-
- Wfrm = gs:read(Frm, width), Hfrm = gs:read(Frm, height),
- gs:config(Win, [{width, Wfrm}, {height, Hfrm}, {map, true}]),
- #winInfo{type=function, win=Win,
- packer=Frm, entries=Entries, trigger=enable,
- ok=OK, cancel=Cancel, listbox=Lb, funcs=[]};
-create_win(GS, {X, Y}, Type, Mod, Line) ->
- Pad = 8,
- W = 230,
-
- Font = dbg_ui_win:font(normal),
-
- %% Window
- Title = case Type of
- line -> "Line Break";
- conditional -> "Conditional Break"
- end,
- Win = gs:window(GS, [{title, Title}, {x, X}, {y, Y},
- {destroy, true}]),
-
- %% Create input fields (label+entry)
- {Wlbl, Hlbl} = dbg_ui_win:min_size(["C-Function:"], 10, 30),
- Went = W-Wlbl-2*Pad,
- Labels = case Type of
- line ->
- [{atom,"Module:",Mod}, {integer,"Line:",Line}];
- conditional ->
- [{atom,"Module:",Mod}, {integer,"Line:",Line},
- {atom,"C-Module:",""}, {atom,"C-Function:",""}]
- end,
- Fun = fun({DataType, Label, Default}, Yin) ->
- gs:create(label, Win, [{x, Pad}, {y, Yin},
- {width,Wlbl}, {height,Hlbl},
- {label, {text,Label}},
- {font, Font}, {align, e}]),
- Ent = gs:create(entry, Win, [{x, Pad+Wlbl}, {y, Yin},
- {width, Went},
- {height, Hlbl},
- {text, Default},
- {keypress, true}]),
- {{Ent, DataType}, Yin+Hlbl}
- end,
- {Entries, Yacc} = lists:mapfoldl(Fun, Pad, Labels),
- {First, _DataType} = hd(Entries),
- gs:config(First, [{buttonpress, true}, {setfocus, true}]),
-
- %% Add 'trigger action' buttons
- {Wlbl2, Hlbl2} = dbg_ui_win:min_size(["Trigger Action"], 100, 20),
- Wfrm = Wlbl2+8, Hfrm = Hlbl2*4+4,
- Grp = erlang:now(),
- Frm = gs:frame(Win, [{x, W/2-Wfrm/2-2}, {y, Yacc+Pad-2},
- {width, Wfrm}, {height, Hfrm}, {bw, 2}]),
- gs:label(Frm, [{label, {text, "Trigger Action"}}, {font, Font},
- {x, 2}, {y, 0}, {width, Wlbl2}, {height, Hlbl2}]),
- gs:radiobutton(Frm, [{label, {text, "Enable"}}, {font, Font},
- {x, 10}, {y, Hlbl2},
- {width, Wlbl2-10}, {height, Hlbl2},
- {align, w}, {group, Grp},
- {data, {trigger, enable}},
- {select, true}]),
- gs:radiobutton(Frm, [{label, {text, "Disable"}}, {font, Font},
- {x, 10}, {y, Hlbl2*2},
- {width, Wlbl2-10}, {height, Hlbl2},
- {align, w}, {group, Grp},
- {data, {trigger, disable}}]),
- gs:radiobutton(Frm, [{label, {text, "Delete"}}, {font, Font},
- {x, 10}, {y, Hlbl2*3},
- {width, Wlbl2-10}, {height, Hlbl2},
- {align, w}, {group, Grp},
- {data, {trigger, delete}}]),
-
- %% Add OK and Cancel buttons
- {Wbtn, Hbtn} = dbg_ui_win:min_size(["OK","Cancel"], 70, 30),
- Ybtn = Yacc + Pad + Hfrm + Pad,
- OK = gs:button(Win, [{x, Pad}, {y, Ybtn},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"OK"}}, {font, Font}]),
- gs:button(Win, [{x, W-Pad-Wbtn}, {y, Ybtn},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"Cancel"}}, {font, Font}]),
-
- Hwin = Ybtn + Hbtn + Pad,
- gs:config(Win, [{width, W}, {height, Hwin}, {map, true}]),
-
- #winInfo{type=Type, win=Win,
- entries=Entries, trigger=enable, ok=OK}.
-
-%%--------------------------------------------------------------------
-%% update_functions(WinInfo, Funcs) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Funcs = [{Name, Arity}]
-%% Name = atom()
-%% Arity = integer()
-%%--------------------------------------------------------------------
-update_functions(WinInfo, Funcs) ->
- Items = lists:map(fun([N, A]) -> io_lib:format("~p/~p", [N, A]) end,
- Funcs),
- gs:config(WinInfo#winInfo.listbox, [{items, Items},
- {setfocus, true}]),
- WinInfo#winInfo{funcs=Funcs}.
-
-%%--------------------------------------------------------------------
-%% handle_event(GSEvent, WinInfo) -> Command
-%% GSEvent = {gs, Id, Event, Data, Arg}
-%% WinInfo = #winInfo{}
-%% Command = ignore
-%% | stopped
-%% | {win, WinInfo}
-%% | {module, Mod}
-%% | {break, [[Mod, Line]], Action}
-%% | {break, [[Mod, Line, CMod, CFunc]], Action}
-%% | {break, [[Mod, Func, Arity]], Action}
-%%--------------------------------------------------------------------
-handle_event({gs, _Id, destroy, _Data, _Arg}, _WinInfo) ->
- stopped;
-handle_event({gs, _Id, configure, _Data, [W, H|_]}, WinInfo) ->
- gs:config(WinInfo#winInfo.packer, [{width, W-10}, {height, H-10}]),
- gs:config(WinInfo#winInfo.cancel, [{x, W-80}]),
- ignore;
-handle_event({gs, Ent, buttonpress, _,[N,X0,Y0|_]}, WinInfo) when N>1 ->
- %% Right (middle) mouse button click in module entry, display a
- %% menu containing all interpreted modules
- Mods = int:interpreted(),
- X = gs:read(Ent, x) + X0,
- Y = gs:read(Ent, y) + Y0,
- Menu = gs:menu(WinInfo#winInfo.win, [{post_at,{X,Y}}]),
- lists:foreach(fun(Mod) ->
- gs:menuitem(Menu, [{label,{text,Mod}},
- {data,{module,Mod}}])
- end,
- Mods),
- ignore;
-handle_event({gs, LB, keypress, window, [Key|_]}, WinInfo) ->
- %% Used for functional break window, since listboxes for some
- %% reason doesn't generate keypress events
- if
- Key/='Tab', Key/='Return' ->
- ignore;
- true ->
- handle_event({gs, LB, click, listbox, ["OK"]}, WinInfo)
- end;
-handle_event({gs, Ent, keypress, Data, [Key|_]}, WinInfo) ->
- case WinInfo#winInfo.type of
- function when Key/='Tab', Key/='Return' ->
- case gs:read(WinInfo#winInfo.listbox, items) of
- [] -> ignore;
- _Items ->
- gs:config(WinInfo#winInfo.listbox, clear),
- {win, WinInfo#winInfo{funcs=[]}}
- end;
- function -> % 'Return' | 'Tab' pressed in Module entry
- case check_input(WinInfo#winInfo.entries) of
- error -> ignore;
- [Mod] -> {module, Mod}
- end;
- _Type when Key=='Tab'; Key=='Return' ->
- case next_entry(Ent, WinInfo#winInfo.entries) of
- last ->
- gs:config(WinInfo#winInfo.ok, flash),
- handle_event({gs, Ent, click, Data, ["OK"]}, WinInfo);
- Next ->
- gs:config(Next, {setfocus, true}),
- ignore
- end;
- _Type -> ignore
- end;
-handle_event({gs, _Id, click, _Data, ["OK"|_]}, WinInfo) ->
- case check_input(WinInfo#winInfo.entries) of
- error -> ignore;
- Data when WinInfo#winInfo.type/=function ->
- {break, [Data], WinInfo#winInfo.trigger};
- [Mod] -> % Function break window
- case gs:read(WinInfo#winInfo.listbox, selection) of
- [] ->
- {module, Mod};
- IndexL ->
- Funcs = WinInfo#winInfo.funcs,
- Breaks =
- [[Mod|lists:nth(Index+1, Funcs)] || Index <- IndexL],
- {break, Breaks, enable}
- end
- end;
-handle_event({gs, _Id, click, _Data, ["Cancel"|_]}, _WinInfo) ->
- stopped;
-handle_event({gs, _Id, click, {trigger,Trigger}, _Arg}, WinInfo) ->
- {win, WinInfo#winInfo{trigger=Trigger}};
-handle_event({gs, _Id, click, {module, Mod}, _Arg}, WinInfo) ->
- {Ent, _DataType} = hd(WinInfo#winInfo.entries),
- gs:config(Ent, {insert,{0,Mod}}),
- ignore;
-handle_event(_GSEvent, _WinInfo) ->
- ignore.
-
-check_input(Entries) ->
- check_input(Entries, []).
-check_input([{Entry, Type} | Entries], Data) ->
- Str = gs:read(Entry, text),
- case erl_scan:string(Str) of
- {ok, [{Type, _Line, Val}], _EndLine} ->
- check_input(Entries, [Val|Data]);
- _Error -> error
- end;
-check_input([], Data) -> lists:reverse(Data).
-
-next_entry(Entry, [{Entry, _Type}]) ->
- last;
-next_entry(Entry, [{Entry, _Type1}, {Next, _Type2}|_]) ->
- Next;
-next_entry(Entry, [_|Entries]) ->
- next_entry(Entry, Entries).
diff --git a/lib/debugger/src/dbg_ui_edit.erl b/lib/debugger/src/dbg_ui_edit.erl
deleted file mode 100644
index 390e6acdb4..0000000000
--- a/lib/debugger/src/dbg_ui_edit.erl
+++ /dev/null
@@ -1,91 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_edit).
-
-%% External exports
--export([start/5]).
-
-%% Internal exports
--export([init/6]).
-
--record(state, {win, % term() Edit dialog window data
- pid, % pid() Parent
- prompt % atom()
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(GS, Pos, Title, Prompt, {Type, Value})
-%% GS = graphics system identifier
-%% Pos = {X, Y}
-%% X = Y = integer()
-%% Title = string()
-%% Prompt = atom()
-%% Type = term | atom | float | integer | string
-%% Value = term()
-%%--------------------------------------------------------------------
-start(GS, Pos, Title, Prompt, Edit) ->
- case dbg_ui_winman:is_started(Title) of
- true -> ignore;
- false ->
- spawn(?MODULE, init, [self(), GS, Pos, Title, Prompt, Edit])
- end.
-
-
-%%====================================================================
-%% Internal exports
-%%====================================================================
-
-init(Pid, GS, Pos, Title, Prompt, Edit) ->
-
- %% Create edit dialog window
- Win = dbg_ui_edit_win:create_win(GS, Pos, Title, Prompt, Edit),
- Window = dbg_ui_edit_win:get_window(Win),
- dbg_ui_winman:insert(Title, Window),
- State = #state{win=Win, pid=Pid, prompt=Prompt},
-
- loop(State).
-
-loop(State) ->
- receive
-
- %% From the GUI
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd = dbg_ui_edit_win:handle_event(GuiEvent,
- State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, _Data} ->
- loop(State);
- {dbg_ui_winman, destroy} ->
- exit(normal)
- end.
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd(stopped, _State) ->
- exit(normal);
-gui_cmd({edit, Value}, State) ->
- State#state.pid ! {dbg_ui_edit, State#state.prompt, Value},
- exit(normal).
diff --git a/lib/debugger/src/dbg_ui_edit_win.erl b/lib/debugger/src/dbg_ui_edit_win.erl
deleted file mode 100644
index 2e9a685b57..0000000000
--- a/lib/debugger/src/dbg_ui_edit_win.erl
+++ /dev/null
@@ -1,128 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_edit_win).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,entry,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-%% External exports
--export([create_win/5, get_window/1,
- handle_event/2]).
-
--record(winInfo, {window, % gsobj()
- entry, % gsobj()
- button, % gsobj()
- type % atom()
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% create_win(GS, Pos, Title, Prompt, {Type, Value}) -> #winInfo{}
-%% GS = graphics system identifier
-%% Pos = {X, Y}
-%% X = Y = integer()
-%% Title = string()
-%% Prompt = atom()
-%% Type = term | atom | float | integer | string
-%% Value = term()
-%%--------------------------------------------------------------------
-create_win(GS, {X, Y}, Title, Prompt, {Type, Value}) ->
- Pad=8,
-
- Font = dbg_ui_win:font(normal),
-
- %% Window
- Win = gs:window(GS, [{title, Title}, {x, X}, {y, Y},
- {destroy, true}]),
-
- %% Label
- {Wlbl, Hlbl} = dbg_ui_win:min_size([Prompt], 50, 30),
- gs:label(Win, [{x, Pad}, {y, Pad}, {width, Wlbl}, {height, Hlbl},
- {align, e}, {label, {text, Prompt}}, {font, Font}]),
-
-
- %% Entry
- {Went, _Hent} = dbg_ui_win:min_size([Value], 100, 20),
- Ent = gs:entry(Win, [{x, Pad+Wlbl}, {y, Pad},
- {width, Went}, {height, Hlbl},
- {text, Value},
- {keypress, true}]),
-
- %% OK and Cancel buttons
- W = Pad + Wlbl + Went + Pad,
- {Wbtn, Hbtn} = dbg_ui_win:min_size(["Cancel"], 70, 30),
- Ybtn = Pad + Hlbl + Pad,
- Btn = gs:button(Win, [{x, Pad}, {y, Ybtn},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"OK"}}, {font, Font}]),
- gs:button(Win, [{x, W-Pad-Wbtn}, {y, Ybtn},
- {width, Wbtn}, {height, Hbtn},
- {label, {text,"Cancel"}}, {font, Font}]),
-
- H = Ybtn + Hbtn + Pad,
- gs:config(Win, [{width, W}, {height, H}, {map, true}]),
-
- #winInfo{window=Win, entry=Ent, button=Btn, type=Type}.
-
-%%--------------------------------------------------------------------
-%% get_window(WinInfo) -> Window
-%% WinInfo = #winInfo{}
-%% Window = gsobj()
-%%--------------------------------------------------------------------
-get_window(WinInfo) ->
- WinInfo#winInfo.window.
-
-%%--------------------------------------------------------------------
-%% handle_event(GSEvent, WinInfo) -> Command
-%% GSEvent = {gs, Id, Event, Data, Arg}
-%% WinInfo = #winInfo{}
-%% Command = ignore
-%% | stopped
-%% | {edit, Value}
-%%--------------------------------------------------------------------
-handle_event({gs, _Id, destroy, _Data, _Arg}, _WinInfo) ->
- stopped;
-handle_event({gs, Id, keypress, Data, ['Return'|_]}, WinInfo) ->
- gs:config(WinInfo#winInfo.button, flash),
- handle_event({gs, Id, click, Data, ["OK"]}, WinInfo);
-handle_event({gs, _Id, click, _Data, ["OK"|_]}, WinInfo) ->
- Ent = WinInfo#winInfo.entry,
- Str = gs:read(Ent, text),
- Type = WinInfo#winInfo.type,
- case erl_scan:string(Str) of
- {ok, Tokens, _EndLine} when Type==term ->
- case erl_parse:parse_term(Tokens++[{dot, 1}]) of
- {ok, Value} -> {edit, Value};
- _Error -> ignore
- end;
- {ok, [{Type, _Line, Value}], _EndLine} when Type/=term ->
- {edit, Value};
- _ ->
- ignore
- end;
-handle_event({gs, _Id, click, _Data, ["Cancel"|_]}, _WinInfo) ->
- stopped;
-handle_event(_GSEvent, _WinInfo) ->
- ignore.
diff --git a/lib/debugger/src/dbg_ui_filedialog_win.erl b/lib/debugger/src/dbg_ui_filedialog_win.erl
deleted file mode 100644
index 52dc2012f3..0000000000
--- a/lib/debugger/src/dbg_ui_filedialog_win.erl
+++ /dev/null
@@ -1,340 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
--module(dbg_ui_filedialog_win).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,listbox,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-%% External exports
--export([create_win/6, create_win/7, get_window/1,
- tag/2,
- handle_event/2]).
-
--record(winInfo, {window, % gsobj()
- extra, % fun()
- cwd, % string()
- pattern % string()
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% create_win(GS, Title, Pos, Mode, Filter, Extra)
-%% create_win(GS, Title, Pos, Mode, Filter, Extra, FileName) -> #winInfo{}
-%% GS = term()
-%% Title = string()
-%% Pos = {X,Y}
-%% Mode = normal | multiselect
-%% Filter = string() File name that may include * symbols.
-%% Extra = fun(File) -> {true, tag} | true | {error, term()}
-%% FileName = string() Suggested file name when saving
-%%--------------------------------------------------------------------
-create_win(GS, Title, {X,Y}, Mode, Filter, Extra) ->
- create_win(GS, Title, {X,Y}, Mode, Filter, Extra, null).
-create_win(GS, Title, {X,Y}, Mode, Filter, Extra, FileName) ->
- Pad = 8,
- Wlb = 480, Hlb = 130,
-
- Font = dbg_ui_win:font(normal),
-
- {Wlbl, Hlbl} = dbg_ui_win:min_size(["Directories"], 80, 20),
- {Wbtn, Hbtn} = dbg_ui_win:min_size(["Filter","Cancel"], 70, 30),
-
- %% Window
- Win = gs:window(GS, [{title,Title}, {x, X}, {y,Y}, {destroy,true}]),
-
- %% 'Filter' label and entry (for selecting directory)
- gs:label(Win, [{label, {text,"Filter"}}, {font, Font}, {align, sw},
- {x, Pad+2}, {y, Pad}, {width,Wlbl}, {height,Hlbl}]),
- gs:entry('Filter', Win, [{x, Pad}, {y, Pad+Hlbl},
- {width, Wlb}, {height, Hbtn},
- {keypress, true}]),
-
- %% Listboxes (showing directories and files)
- Xmid = Pad + Wlb/2,
- Y2 = Pad + Hlbl + Hbtn + Pad,
- gs:label(Win, [{label, {text,"Directories"}},
- {font, Font}, {align, sw},
- {x, Pad+2}, {y, Y2},
- {width, Wlbl}, {height, Hlbl}]),
- gs:label(Win, [{label, {text,"Files"}},
- {font, Font}, {align, sw},
- {x, Xmid+Pad/2+2}, {y, Y2},
- {width, Wlbl}, {height, Hlbl}]),
- gs:listbox('Dirs', Win, [{x, Pad}, {y, Y2+Hlbl},
- {width, Wlb/2-Pad/2}, {height, Hlb},
- {vscroll, right},
- {click, true}, {doubleclick, true}]),
- gs:listbox('Files', Win, [{x, Xmid+Pad/2}, {y, Y2+Hlbl},
- {width, Wlb/2-Pad/2}, {height, Hlb},
- {vscroll, right},
- {click, true}, {doubleclick, true}]),
-
- %% 'Selection' label and entry (for selecting file)
- Y3 = Y2 + Hlbl + Hlb,
- gs:label(Win, [{label, {text,"Selection"}}, {font,Font}, {align,sw},
- {x, Pad+2}, {y, Y3}, {width, Wlbl}, {height, Hlbl}]),
- gs:entry('Selection', Win, [{x, Pad}, {y, Y3+Hlbl},
- {width, Wlb}, {height, Hbtn},
- {keypress, true}]),
-
- %% Buttons
- Y4 = Y3 + Hlbl + Hbtn + Pad,
- Wb = Wlb - Wbtn,
- Opts = [{y, Y4}, {width, Wbtn}, {height, Hbtn}, {font, Font}],
- case Mode of
- normal ->
- gs:button(Win, [{label, {text,"OK"}}, {x, Pad},
- {data, select} | Opts]),
- gs:button(Win, [{label, {text,"Filter"}}, {x, Wlb/2-Wbtn/2},
- {data, filter} | Opts]),
- gs:button(Win, [{label, {text,"Cancel"}}, {x, Pad+Wb},
- {data, done} | Opts]);
- multiselect ->
- gs:button(Win, [{label, {text,"Choose"}}, {x, Pad},
- {data, select} | Opts]),
- gs:button(Win, [{label, {text,"All"}}, {x, Pad+Wb/3},
- {data, multiselect} | Opts]),
- gs:button(Win, [{label, {text,"Filter"}}, {x, Pad+2*Wb/3},
- {data, filter} | Opts]),
- gs:button(Win, [{label, {text,"Done"}}, {x, Pad+Wb},
- {data, done} | Opts])
- end,
-
- %% Insert contents
- {ok, Home} = file:get_cwd(),
- {Cwd, Pattern} = update_win(Filter, Extra, Home),
- if
- is_list(FileName) ->
- gs:config('Selection', {text, filename:join(Cwd,FileName)});
- true -> ignore
- end,
-
- Wwin = Pad + Wlb + Pad,
- Hwin = Y4 + Hbtn + Pad,
- gs:config(Win, [{width, Wwin}, {height, Hwin}, {map, true}]),
-
- #winInfo{window=Win, extra=Extra, cwd=Cwd, pattern=Pattern}.
-
-%%--------------------------------------------------------------------
-%% get_window(WinInfo) -> Window
-%% WinInfo = #winInfo{}
-%% Window = gsobj()
-%%--------------------------------------------------------------------
-get_window(WinInfo) ->
- WinInfo#winInfo.window.
-
-%%--------------------------------------------------------------------
-%% tag(WinInfo, File)
-%% WinInfo = #winInfo{}
-%% File = string()
-%%--------------------------------------------------------------------
-tag(WinInfo, File0) ->
- File = relfile(WinInfo#winInfo.cwd, File0),
- case member(File, gs:read('Files', items)) of
- {true, Index} -> gs:config('Files', {change, {Index, tag(File)}});
- false -> ignore
- end.
-
-tag(Str) -> [$*|Str].
-untag([$*|Str]) -> Str;
-untag([$(|Str]) -> [$)|Rts] = lists:reverse(Str),lists:reverse(Rts);
-untag(Str) -> Str.
-
-member(E, L) -> member(E, L, 0).
-member(E, [E|_], I) -> {true, I};
-member(E, [_|T], I) -> member(E, T, I+1);
-member(_E, [], _I) -> false.
-
-%%--------------------------------------------------------------------
-%% handle_event(GSEvent, WinInfo) -> Command
-%% GSEvent = {gs, Id, Event, Data, Arg}
-%% WinInfo = #winInfo{}
-%% Command = ignore
-%% | {stopped, Dir}
-%% | {win, WinInfo}
-%% | {select, File} | {multiselect, Dir, FileNames}
-%%--------------------------------------------------------------------
-handle_event({gs, _Id, destroy, _Data, _Args}, WinInfo) ->
- {stopped, WinInfo#winInfo.cwd};
-
-handle_event({gs, 'Filter', keypress, _Data, ['Return'|_]}, WinInfo) ->
- handle_event({gs, null, click, filter, null}, WinInfo);
-handle_event({gs, 'Selection', keypress, _Data, ['Return'|_]}, WinInfo) ->
- handle_event({gs, null, click, select, null}, WinInfo);
-
-handle_event({gs, 'Dirs', click, _Data, [0,"..",true|_]}, WinInfo) ->
- Filter = filename:join(filename:dirname(WinInfo#winInfo.cwd),
- WinInfo#winInfo.pattern),
- gs:config('Filter', {text, Filter}),
- ignore;
-handle_event({gs, 'Dirs', click, _Data, [_Index,Str,true|_]}, WinInfo) ->
- Filter = filename:join([WinInfo#winInfo.cwd, Str,
- WinInfo#winInfo.pattern]),
- gs:config('Filter', {text, Filter}),
- ignore;
-handle_event({gs, 'Dirs', doubleclick, _Data, _Arg}, WinInfo) ->
- handle_event({gs, null, click, filter, null}, WinInfo);
-
-handle_event({gs, 'Files', click, _Data, [_Index,Str,true|_]}, WinInfo) ->
- Selection = filename:join(WinInfo#winInfo.cwd, untag(Str)),
- gs:config('Selection', {text, Selection}),
- ignore;
-handle_event({gs, 'Files', doubleclick, _Data, _Arg}, WinInfo) ->
- handle_event({gs, null, click, select, null}, WinInfo);
-
-handle_event({gs, _Id, click, select, _Arg}, _WinInfo) ->
- {select, gs:read('Selection', text)};
-handle_event({gs, _Id, click, multiselect, _Arg}, WinInfo) ->
- Files = [untag(File) || File <- gs:read('Files', items)],
- {multiselect, WinInfo#winInfo.cwd, Files};
-handle_event({gs, _Id, click, filter, _Arg}, WinInfo) ->
- {Cwd, Pattern} = update_win(gs:read('Filter', text),
- WinInfo#winInfo.extra,
- WinInfo#winInfo.cwd),
- {win, WinInfo#winInfo{cwd=Cwd, pattern=Pattern}};
-handle_event({gs, _Id, click, done, _Arg}, WinInfo) ->
- {stopped, WinInfo#winInfo.cwd};
-
-handle_event(_GSEvent, _WinInfo) ->
- ignore.
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-update_win(Filter, ExtraFilter, Prev) ->
- {Res, {Filter2, Cwd, FilePattern}} = check_filter(Filter, Prev),
-
- Dirs = [".." | get_subdirs(Cwd)],
-
- gs:config('Filter', {text, Filter2}),
- gs:config('Dirs', {items, Dirs}),
- gs:config('Selection', {text, Cwd}),
-
- case Res of
- ok ->
- Matching = lists:sort(filelib:wildcard(Filter2, erl_prim_loader)),
- Files = extra_filter(Matching, Cwd, ExtraFilter),
- gs:config('Files', {items, Files});
- error ->
- gs:config('Files', beep)
- end,
-
- {Cwd, FilePattern}.
-
-%% check_filter(Filter, Prev) -> {ok, Res} | {error, Res}
-%% Res = {Filter, Cwd, FilePattern}
-%% Filter = Prev = Cwd = FilePattern = string()
-check_filter(Filter0, Prev) ->
- Filter = case filename:pathtype(Filter0) of
- absolute -> Filter0;
- _Relative -> filename:absname(Filter0, Prev)
- end,
- Comps = filename:split(Filter),
- Last = lists:last(Comps),
- FilePattern = case is_pattern(Last) of
- true -> Last;
- false -> "*"
- end,
- {Cwd, Rest} = max_existing(Comps),
- case Rest of
- [] ->
- %% Filter = existing file or directory
- Res = case filelib:is_dir(Filter, erl_prim_loader) of
- true -> {filename:join(Filter, "*"), Filter, "*"};
- false -> {Filter, filename:dirname(Filter),
- filename:basename(Filter)}
- end,
- {ok, Res};
- [FilePattern] ->
- %% Filter = existing dir and valid pattern
- {ok, {Filter, Cwd, FilePattern}};
- Comps ->
- %% Filter = garbage
- {error, {Prev, Prev, "*"}};
- [Name|_Names] ->
- %% Filter = existing dir ++ pattern or non-existing file/dir
- case is_pattern(Name) of
- true -> {ok, {Filter, Cwd, FilePattern}};
- false -> {error, {Cwd, Cwd, ""}}
- end
- end.
-
-max_existing([Name | Names]) ->
- case filelib:is_file(Name, erl_prim_loader) of
- true -> max_existing(Name, Names);
- false -> {[], [Name | Names]}
- end.
-max_existing(Dir, [Name | Names]) ->
- Dir2 = filename:join(Dir, Name),
- case filelib:is_file(Dir2, erl_prim_loader) of
- true when Names =:= [] -> {Dir2, []};
- true -> max_existing(Dir2, Names);
- false -> {Dir, [Name | Names]}
- end.
-
-is_pattern(Str) ->
- lists:member($*, Str).
-
-extra_filter([File|Files], Dir, Fun) ->
- case Fun(File) of
- true ->
- [relfile(Dir, File) | extra_filter(Files, Dir, Fun)];
- {true,tag} ->
- [[$*|relfile(Dir,File)] | extra_filter(Files, Dir, Fun)];
- {true,disable} ->
- [[$(|relfile(Dir,File)]++[$)] | extra_filter(Files, Dir, Fun)];
- {error, _Reason} -> extra_filter(Files, Dir, Fun)
- end;
-extra_filter([], _Dir, _Fun) -> [].
-
-get_subdirs(Dir) ->
- case erl_prim_loader:list_dir(Dir) of
- {ok, FileNames} ->
- X = [FN || FN <- FileNames,
- filelib:is_dir(filename:join(Dir, FN), erl_prim_loader)],
- lists:sort(X);
- _Error ->
- []
- end.
-
-%% Return the "remainder" of a file name relative a dir name, examples:
-%% relfile("/home/gunilla", "/home/gunilla/m.erl") -> "m.erl"
-%% relfile("/home/gunilla/dir", "/home/gunilla/dir/m.erl") -> "dir/m.erl"
-%% relfile("/home/gunilla", "/home/arne/m.erl") -> "/home/arne/m.erl"
-relfile(Dir, File) ->
- case compare(Dir, File) of
- error -> File;
- RelFile -> RelFile
- end.
-
-compare([_|Dir], [_|File]) ->
- compare(Dir, File);
-compare([], [$/|File]) ->
- File;
-compare(_, _) ->
- error.
diff --git a/lib/debugger/src/dbg_ui_interpret.erl b/lib/debugger/src/dbg_ui_interpret.erl
deleted file mode 100644
index 73392d40cb..0000000000
--- a/lib/debugger/src/dbg_ui_interpret.erl
+++ /dev/null
@@ -1,161 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_interpret).
-
--include_lib("kernel/include/file.hrl").
-
-%% External exports
--export([start/4]).
-
-%% Internal exports
--export([init/6]).
-
--record(state, {gs, % term() Graphics system id
- win, % term() Interpret dialog window data
- monitor, % pid() Monitor pid
- mode % local | global
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(GS, Pos, Dir, Mode)
-%% GS = Graphics system id
-%% Dir = string()
-%% Pos = {X,Y}
-%% Mode = local | global
-%%--------------------------------------------------------------------
-start(GS, Pos, Dir, Mode) ->
- Title = "Interpret Dialog",
- case dbg_ui_winman:is_started(Title) of
- true -> ignore;
- false ->
- spawn(?MODULE, init, [self(), GS, Pos, Title, Dir, Mode])
- end.
-
-%%====================================================================
-%% Internal exports
-%%====================================================================
-
-init(Monitor, GS, Pos, Title, Dir, Mode) ->
- Filter = filename:join(Dir, "*.erl"),
- Extra = fun(File) ->
- case int:interpretable(File) of
- true ->
- ModS = filename:basename(File, ".erl"),
- Mod = list_to_atom(ModS),
- case int:file(Mod) of
- File -> {true, tag};
- _ -> true % {error,not_loaded} | File2
- end;
- _Error -> {true,disable}
- end
- end,
-
- %% Create interpret dialog window
- Win = dbg_ui_filedialog_win:create_win(GS, Title, Pos, multiselect,
- Filter, Extra),
- Window = dbg_ui_filedialog_win:get_window(Win),
- dbg_ui_winman:insert(Title, Window),
-
- State = #state{gs=GS, win=Win, monitor=Monitor, mode=Mode},
- loop(State).
-
-
-%%====================================================================
-%% Main loop and message handling
-%%====================================================================
-
-loop(State) ->
- receive
-
- %% From the GUI
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd = dbg_ui_filedialog_win:handle_event(GuiEvent,
- State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, _Data} ->
- loop(State);
- {dbg_ui_winman, destroy} ->
- exit(normal)
- end.
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd({stopped, Dir}, State) ->
- State#state.monitor ! {dbg_ui_interpret, Dir},
- exit(normal);
-gui_cmd({win, Win}, State) ->
- State#state{win=Win};
-gui_cmd({select, File}, State) ->
- Res = case State#state.mode of
- local -> int:i(File);
- global -> int:ni(File)
- end,
-
- case Res of
- %% Interpretation succeeded, tag the file name
- {module, _Mod} ->
- dbg_ui_filedialog_win:tag(State#state.win, File);
-
- %% Interpretation failed
- error ->
- Error = format_error(int:interpretable(File)),
- Msg = ["Error when interpreting:", File, Error],
- Window = dbg_ui_filedialog_win:get_window(State#state.win),
- tool_utils:notify(Window, Msg)
- end,
- State;
-gui_cmd({multiselect, Dir, FileNames}, State) ->
- interpret_all(State, Dir, FileNames),
- State.
-
-interpret_all(State, Dir, [File0|Files]) ->
- File = filename:join(Dir, File0),
- Res = case State#state.mode of
- local -> int:i(File);
- global -> int:ni(File)
- end,
- case Res of
- {module, _Mod} ->
- dbg_ui_filedialog_win:tag(State#state.win, File),
- interpret_all(State, Dir, Files);
- error ->
- Window = dbg_ui_filedialog_win:get_window(State#state.win),
- Error = format_error(int:interpretable(File)),
- Msg = ["Error when interpreting:", File, Error,
- "OK to continue?"],
- case tool_utils:confirm(Window, Msg) of
- ok -> interpret_all(State, Dir, Files);
- cancel -> true
- end
- end;
-interpret_all(_State, _Dir, []) ->
- true.
-
-format_error({error,no_beam}) -> "No BEAM file";
-format_error({error,no_debug_info}) -> "No debug_info in BEAM file";
-format_error({error,badarg}) -> "File does not exist";
-format_error({error,{app,App}}) ->
- "Cannot interpret "++atom_to_list(App)++" modules".
diff --git a/lib/debugger/src/dbg_ui_mon.erl b/lib/debugger/src/dbg_ui_mon.erl
deleted file mode 100644
index 82fe210968..0000000000
--- a/lib/debugger/src/dbg_ui_mon.erl
+++ /dev/null
@@ -1,738 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_mon).
-
--include_lib("kernel/include/file.hrl").
-
-%% External exports
--export([start/2, stop/0]).
-
--define(TRACEWIN, ['Button Area', 'Evaluator Area', 'Bindings Area']).
--define(BACKTRACE, 100).
-
--record(pinfo, {pid, % pid()
- status % break | exit | idle | running | waiting
- }).
-
--record(state, {mode, % local | global
- starter, % bool() 'true' if int was started by me
-
- gs, % term() Graphics system id
- win, % term() Monitor window data
- focus, % undefined | #pinfo{} Process in focus
- coords, % {X,Y} Mouse pointer position
-
- intdir, % string() Default dir
- pinfos, % [#pinfo{}] Debugged processes
-
- tracewin, % [Area] Areas shown in trace window
- backtrace, % integer() Number of call frames to fetch
-
- attach, % false | {Flags, Function}
-
- sfile, % default | string() Settings file
- changed % boolean() Settings have been changed
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(Mode, SFile) -> {ok, Pid} | {error, Reason}
-%% Mode = local | global
-%% SFile = string() | default Settings file
-%% Pid = pid()
-%% Reason = {already_started,Pid} | term()
-%%--------------------------------------------------------------------
-start(Mode, SFile) ->
- case whereis(?MODULE) of
- undefined ->
- CallingPid = self(),
- Pid = spawn(fun () -> init(CallingPid, Mode, SFile) end),
- receive
- {initialization_complete, Pid} ->
- {ok, Pid};
- Error ->
- Error
- end;
-
- Pid ->
- {error, {already_started,Pid}}
- end.
-
-%%--------------------------------------------------------------------
-%% stop() -> ok
-%%--------------------------------------------------------------------
-stop() ->
- case whereis(?MODULE) of
- undefined ->
- ok;
- Pid ->
- Flag = process_flag(trap_exit, true),
- link(Pid),
- Pid ! stop,
- receive
- {'EXIT', Pid, stop} ->
- process_flag(trap_exit, Flag),
- ok
- end
- end.
-
-
-%%====================================================================
-%% Initialization
-%%====================================================================
-
-init(CallingPid, Mode, SFile) ->
- register(?MODULE, self()),
-
- %% Graphics system
- case catch dbg_ui_mon_win:init() of
- {'EXIT', Reason} ->
- CallingPid ! {error, Reason};
- GS ->
- init2(CallingPid, Mode, SFile, GS)
- end.
-
-init2(CallingPid, Mode, SFile, GS) ->
-
- %% Start Int if necessary and subscribe to information from it
- Bool = case int:start() of
- {ok, _Int} -> true;
- {error, {already_started, _Int}} -> false
- end,
- int:subscribe(),
-
- %% Start other necessary stuff
- dbg_ui_winman:start(), % Debugger window manager
-
- %% Create monitor window
- Title = "Monitor",
- Win = dbg_ui_mon_win:create_win(GS, Title, menus()),
- Window = dbg_ui_mon_win:get_window(Win),
- dbg_ui_winman:insert(Title, Window),
-
- %% Initial process state
- State1 = #state{mode = Mode,
- starter = Bool,
-
- gs = GS,
- win = Win,
- focus = undefined,
- coords = {0,0},
-
- intdir = element(2, file:get_cwd()),
- pinfos = [],
-
- sfile = SFile,
- changed = false
- },
-
- State2 = init_options(?TRACEWIN, % Trace Window
- int:auto_attach(), % Auto Attach
- int:stack_trace(), % Stack Trace
- ?BACKTRACE, % Back Trace Size
- State1),
-
- State3 = init_contents(int:interpreted(), % Modules
- int:all_breaks(), % Breakpoints
- int:snapshot(), % Processes
- State2),
-
- %% Disable/enable functionality according to process in focus (none)
- gui_enable_functions(State3#state.focus),
-
- CallingPid ! {initialization_complete, self()},
-
- if
- SFile =:= default ->
- loop(State3);
- true ->
- loop(load_settings(SFile, State3))
- end.
-
-init_options(TraceWin, AutoAttach, StackTrace, BackTrace, State) ->
- lists:foreach(fun(Area) ->
- dbg_ui_mon_win:select(Area, true)
- end,
- TraceWin),
-
- case AutoAttach of
- false -> ignore;
- {Flags, _Function} ->
- dbg_ui_mon_win:show_option(State#state.win,
- auto_attach, Flags),
- lists:foreach(fun(Flag) ->
- dbg_ui_mon_win:select(map(Flag), true)
- end,
- Flags)
- end,
-
- dbg_ui_mon_win:show_option(State#state.win,
- stack_trace, StackTrace),
- dbg_ui_mon_win:select(map(StackTrace), true),
-
- dbg_ui_mon_win:show_option(State#state.win, back_trace, BackTrace),
-
- State#state{tracewin=TraceWin, backtrace=BackTrace}.
-
-init_contents(Mods, Breaks, Processes, State) ->
- Win2 =
- lists:foldl(fun(Mod, Win) ->
- dbg_ui_mon_win:add_module(Win,'Module',Mod)
- end,
- State#state.win,
- Mods),
-
- Win3 =
- lists:foldl(fun(Break, Win) ->
- dbg_ui_mon_win:add_break(Win,'Break',Break)
- end,
- Win2,
- Breaks),
-
- lists:foldl(fun(PidTuple, State0) ->
- int_cmd({new_process, PidTuple}, State0)
- end,
- State#state{win=Win3},
- Processes).
-
-
-%%====================================================================
-%% Main loop and message handling
-%%====================================================================
-
-loop(State) ->
- receive
-
- stop ->
- gui_cmd(stopped, State);
-
- %% From the GUI
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent) =:= gs ->
- Cmd = dbg_ui_mon_win:handle_event(GuiEvent,State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the interpreter process
- {int, Cmd} ->
- State2 = int_cmd(Cmd, State),
- loop(State2);
-
- %% From the dbg_ui_interpret process
- {dbg_ui_interpret, Dir} ->
- loop(State#state{intdir=Dir});
-
- %% From the dbg_ui_edit process
- {dbg_ui_edit, 'Backtrace:', BackTrace} ->
- dbg_ui_mon_win:show_option(State#state.win,
- back_trace, BackTrace),
- loop(State#state{backtrace=BackTrace});
-
- %% From the dbg_ui_settings process
- {dbg_ui_settings, SFile, Action} ->
- State2 = case Action of
- load -> load_settings(SFile, State);
- save -> save_settings(SFile, State)
- end,
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, Data} ->
- dbg_ui_winman:update_windows_menu(Data),
- loop(State)
- end.
-
-%%--Commands from the GUI---------------------------------------------
-%% Act upon a command from the GUI. In most cases, it is only necessary
-%% to call a relevant int-function. int will then report when the action
-%% has been taken.
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd(stopped, State) ->
- if
- State#state.starter =:= true -> int:stop();
- true -> int:auto_attach(false)
- end,
- exit(stop);
-gui_cmd({coords, Coords}, State) ->
- State#state{coords=Coords};
-
-gui_cmd({shortcut, Key}, State) ->
- case shortcut(Key) of
- {always, Cmd} -> gui_cmd(Cmd, State);
- {if_enabled, Cmd} ->
- case dbg_ui_mon_win:is_enabled(Cmd) of
- true -> gui_cmd(Cmd, State);
- false -> State
- end;
- false -> State
- end;
-
-%% File Menu
-gui_cmd('Load Settings...', State) ->
- Window = dbg_ui_mon_win:get_window(State#state.win),
- dbg_ui_settings:start(Window, State#state.coords,
- load, State#state.sfile),
- State;
-gui_cmd('Save Settings...', State) ->
- Window = dbg_ui_mon_win:get_window(State#state.win),
- dbg_ui_settings:start(Window, State#state.coords,
- save, State#state.sfile),
- State;
-gui_cmd('Exit', State) ->
- gui_cmd(stopped, State);
-
-%% Edit Menu
-gui_cmd('Refresh', State) ->
- int:clear(),
- Win = dbg_ui_mon_win:clear_processes(State#state.win),
- gui_enable_functions(undefined),
- State2 = State#state{win=Win, focus=undefined, pinfos=[]},
- lists:foldl(fun(PidTuple, S) ->
- int_cmd({new_process,PidTuple}, S)
- end,
- State2,
- int:snapshot());
-gui_cmd('Kill All', State) ->
- lists:foreach(fun(PInfo) ->
- case PInfo#pinfo.status of
- exit -> ignore;
- _Status -> exit(PInfo#pinfo.pid, kill)
- end
- end,
- State#state.pinfos),
- State;
-
-%% Module Menu
-gui_cmd('Interpret...', State) ->
- dbg_ui_interpret:start(State#state.gs, State#state.coords,
- State#state.intdir, State#state.mode),
- State;
-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
- delete -> int:nn(Mod);
- view -> dbg_ui_view:start(State#state.gs, Mod)
- end,
- State;
-
-%% Process Menu
-gui_cmd('Step', State) ->
- int:step((State#state.focus)#pinfo.pid),
- State;
-gui_cmd('Next', State) ->
- int:next((State#state.focus)#pinfo.pid),
- State;
-gui_cmd('Continue', State) ->
- int:continue((State#state.focus)#pinfo.pid),
- State;
-gui_cmd('Finish ', State) ->
- int:finish((State#state.focus)#pinfo.pid),
- State;
-gui_cmd('Attach', State) ->
- Pid = (State#state.focus)#pinfo.pid,
- case dbg_ui_winman:is_started(dbg_ui_trace:title(Pid)) of
- true -> ignore;
- false -> int:attach(Pid, trace_function(State))
- end,
- State;
-gui_cmd('Kill', State) ->
- exit((State#state.focus)#pinfo.pid, kill),
- State;
-
-%% Break Menu
-gui_cmd('Line Break...', State) ->
- dbg_ui_break:start(State#state.gs, State#state.coords, line),
- State;
-gui_cmd('Conditional Break...', State) ->
- dbg_ui_break:start(State#state.gs, State#state.coords, conditional),
- State;
-gui_cmd('Function Break...', State) ->
- dbg_ui_break:start(State#state.gs, State#state.coords, function),
- State;
-gui_cmd('Enable All', State) ->
- Breaks = int:all_breaks(),
- lists:foreach(fun ({{Mod, Line}, _Options}) ->
- int:enable_break(Mod, Line)
- end,
- Breaks),
- State;
-gui_cmd('Disable All', State) ->
- Breaks = int:all_breaks(),
- lists:foreach(fun ({{Mod, Line}, _Options}) ->
- int:disable_break(Mod, Line)
- end,
- Breaks),
- State;
-gui_cmd('Delete All', State) ->
- int:no_break(),
- State;
-gui_cmd({break, {Mod, Line}, What}, State) ->
- case What of
- delete -> int:delete_break(Mod, Line);
- {status, inactive} -> int:disable_break(Mod, Line);
- {status, active} -> int:enable_break(Mod, Line);
- {trigger, Action} -> int:action_at_break(Mod, Line, Action)
- end,
- State;
-
-%% Options Commands
-gui_cmd({'Trace Window', TraceWin}, State) ->
- State2 = State#state{tracewin=TraceWin},
- case State#state.attach of
- false -> ignore;
- {Flags, {dbg_ui_trace, start, StartFlags}} ->
- case trace_function(State2) of
- {_, _, StartFlags} -> ignore;
- NewFunction -> % {_, _, NewStartFlags}
- int:auto_attach(Flags, NewFunction)
- end;
- _AutoAttach -> ignore
- end,
- State2;
-gui_cmd({'Auto Attach', When}, State) ->
- if
- When =:= [] -> int:auto_attach(false);
- true ->
- Flags = [map(Name) || Name <- When],
- int:auto_attach(Flags, trace_function(State))
- end,
- State;
-gui_cmd({'Stack Trace', [Name]}, State) ->
- int:stack_trace(map(Name)),
- State;
-gui_cmd('Back Trace Size...', State) ->
- dbg_ui_edit:start(State#state.gs, State#state.coords, "Backtrace",
- 'Backtrace:', {integer, State#state.backtrace}),
- State;
-
-%% Help Menu
-gui_cmd('Debugger', State) ->
- HelpFile = filename:join([code:lib_dir(debugger), "doc", "html", "index.html"]),
- Window = dbg_ui_mon_win:get_window(State#state.win),
- tool_utils:open_help(Window, HelpFile),
- State;
-
-gui_cmd({focus, Pid, Win}, State) ->
- {value, PInfo} =
- lists:keysearch(Pid, #pinfo.pid, State#state.pinfos),
- gui_enable_functions(PInfo),
- State#state{win=Win, focus=PInfo};
-gui_cmd(default, State) ->
- case lists:member('Attach', menus(enabled, State#state.focus)) of
- true -> gui_cmd('Attach', State);
- false -> State
- end.
-
-%%--Commands from the interpreter-------------------------------------
-
-int_cmd({interpret, Mod}, State) ->
- Win = dbg_ui_mon_win:add_module(State#state.win, 'Module', Mod),
- State#state{win=Win};
-int_cmd({no_interpret, Mod}, State) ->
- Win = dbg_ui_mon_win:delete_module(State#state.win, Mod),
- State#state{win=Win};
-
-int_cmd({new_process, {Pid, Function, Status, Info}}, State) ->
-
- %% Create record with information about the process
- Name = registered_name(Pid),
- PInfo = #pinfo{pid=Pid, status=Status},
-
- %% Update window
- Win = dbg_ui_mon_win:add_process(State#state.win,
- Pid, Name, Function, Status, Info),
-
- %% Store process information
- PInfos = State#state.pinfos ++ [PInfo],
- State#state{win=Win, pinfos=PInfos};
-int_cmd({new_status, Pid, Status, Info}, State) ->
-
- %% Find stored information about the process
- PInfos = State#state.pinfos,
- {value, PInfo} = lists:keysearch(Pid, #pinfo.pid, PInfos),
-
- %% Update process information
- PInfo2 = PInfo#pinfo{status=Status},
- PInfos2 = lists:keyreplace(Pid, #pinfo.pid, PInfos, PInfo2),
- State2 = State#state{pinfos=PInfos2},
-
- %% Update window
- dbg_ui_mon_win:update_process(State2#state.win, Pid, Status, Info),
- case State2#state.focus of
- #pinfo{pid=Pid} ->
- gui_enable_functions(PInfo2),
- State2#state{focus=PInfo2};
- _ ->
- State2
- end;
-
-int_cmd({new_break, Break}, State) ->
- Win = dbg_ui_mon_win:add_break(State#state.win, 'Break', Break),
- State#state{win=Win};
-int_cmd({delete_break, Point}, State) ->
- Win = dbg_ui_mon_win:delete_break(State#state.win, Point),
- State#state{win=Win};
-int_cmd({break_options, Break}, State) ->
- dbg_ui_mon_win:update_break(State#state.win, Break),
- State;
-int_cmd(no_break, State) ->
- Win = dbg_ui_mon_win:clear_breaks(State#state.win),
- State#state{win=Win};
-int_cmd({no_break, Mod}, State) ->
- Win = dbg_ui_mon_win:clear_breaks(State#state.win, Mod),
- State#state{win=Win};
-
-int_cmd({auto_attach, AutoAttach}, State) ->
- OnFlags = case AutoAttach of
- false -> [];
- {Flags, _Function} -> Flags
- end,
- OffFlags = [init, exit, break] -- OnFlags,
- dbg_ui_mon_win:show_option(State#state.win, auto_attach, OnFlags),
- lists:foreach(fun(Flag) ->
- dbg_ui_mon_win:select(map(Flag), true)
- end,
- OnFlags),
- lists:foreach(fun(Flag) ->
- dbg_ui_mon_win:select(map(Flag), false)
- end,
- OffFlags),
- State#state{attach=AutoAttach};
-int_cmd({stack_trace, Flag}, State) ->
- dbg_ui_mon_win:show_option(State#state.win, stack_trace, Flag),
- dbg_ui_mon_win:select(map(Flag), true),
- State.
-
-
-%%====================================================================
-%% GUI auxiliary functions
-%%====================================================================
-
-menus() ->
- [{'File', [{'Load Settings...', 0},
- {'Save Settings...', 2},
- separator,
- {'Exit', 0}]},
- {'Edit', [{'Refresh', no},
- {'Kill All', no}]},
- {'Module', [{'Interpret...', 0},
- {'Delete All Modules', no},
- separator]},
- {'Process', [{'Step', 0},
- {'Next', 0},
- {'Continue', 0},
- {'Finish ', 0},
- separator,
- {'Attach', 0},
- {'Kill', no}]},
- {'Break', [{'Line Break...', 5},
- {'Conditional Break...', no},
- {'Function Break...', no},
- separator,
- {'Enable All', no},
- {'Disable All', no},
- {'Delete All', 0},
- separator]},
- {'Options', [{'Trace Window', no, cascade,
- [{'Button Area', no, check},
- {'Evaluator Area', no, check},
- {'Bindings Area', no, check},
- {'Trace Area', no, check}]},
- {'Auto Attach', no, cascade,
- [{'First Call', no, check},
- {'On Break', no, check},
- {'On Exit', no, check}]},
- {'Stack Trace', no, cascade,
- [{'Stack On, Tail', no, radio},
- {'Stack On, No Tail', no, radio},
- {'Stack Off', no, radio}]},
- {'Back Trace Size...', no}]},
- {'Help', [{'Debugger', no}]}].
-
-menus(enabled, undefined) ->
- [];
-menus(disabled, undefined) ->
- ['Step','Next','Continue','Finish ','Attach','Kill'];
-menus(enabled, #pinfo{status=exit}) ->
- ['Attach'];
-menus(disabled, #pinfo{status=exit}) ->
- ['Step','Next','Continue','Finish ','Kill'];
-menus(enabled, #pinfo{status=break}) ->
- ['Step','Next','Continue','Finish ','Attach','Kill'];
-menus(disabled, #pinfo{status=break}) ->
- [];
-menus(enabled, _PInfo) ->
- ['Attach','Kill'];
-menus(disabled, _PInfo) ->
- ['Step','Next','Continue','Finish '].
-
-shortcut(l) -> {always, 'Load Settings...'};
-shortcut(v) -> {always, 'Save Settings...'};
-shortcut(e) -> {always, 'Exit'};
-
-shortcut(i) -> {always, 'Interpret...'};
-
-shortcut(s) -> {if_enabled, 'Step'};
-shortcut(n) -> {if_enabled, 'Next'};
-shortcut(c) -> {if_enabled, 'Continue'};
-shortcut(f) -> {if_enabled, 'Finish '};
-shortcut(a) -> {if_enabled, 'Attach'};
-
-shortcut(b) -> {always, 'Line Break...'};
-shortcut(d) -> {always, 'Delete All'};
-
-shortcut(_) -> false.
-
-%% Enable/disable functionality depending on the state of the process
-%% currently in Focus
-gui_enable_functions(PInfo) ->
- Enabled = menus(enabled, PInfo),
- Disabled = menus(disabled, PInfo),
- dbg_ui_mon_win:enable(Enabled, true),
- dbg_ui_mon_win:enable(Disabled, false).
-
-%% Map values used by int to/from GUI names
-map('First Call') -> init; % Auto attach
-map('On Exit') -> exit;
-map('On Break') -> break;
-map(init) -> 'First Call';
-map(exit) -> 'On Exit';
-map(break) -> 'On Break';
-
-map('Stack On, Tail') -> all; % Stack trace
-map('Stack On, No Tail') -> no_tail;
-map('Stack Off') -> false;
-map(all) -> 'Stack On, Tail';
-map(true) -> 'Stack On, Tail';
-map(no_tail) -> 'Stack On, No Tail';
-map(false) -> 'Stack Off'.
-
-
-%%====================================================================
-%% Debugger settings
-%%====================================================================
-
-load_settings(SFile, State) ->
- case file:read_file(SFile) of
- {ok, Binary} ->
- case catch binary_to_term(Binary) of
- {debugger_settings, Settings} ->
- load_settings2(Settings,
- State#state{sfile=SFile,
- changed=false});
- _Error -> State
- end;
- {error, _Reason} -> State
- end.
-
-load_settings2(Settings, State) ->
- {TraceWin, AutoAttach, StackTrace, BackTrace, Files, Breaks} =
- Settings,
-
- TraceWinAll = ['Button Area', 'Evaluator Area', 'Bindings Area',
- 'Trace Area'],
- lists:foreach(fun(Area) -> dbg_ui_mon_win:select(Area, true) end,
- TraceWin),
- lists:foreach(fun(Area) -> dbg_ui_mon_win:select(Area, false) end,
- TraceWinAll--TraceWin),
-
- case AutoAttach of
- false -> int:auto_attach(false);
- {Flags, Function} -> int:auto_attach(Flags, Function)
- end,
-
- int:stack_trace(StackTrace),
-
- dbg_ui_mon_win:show_option(State#state.win, back_trace, BackTrace),
-
- case State#state.mode of
- local -> lists:foreach(fun(File) -> int:i(File) end, Files);
- global -> lists:foreach(fun(File) -> int:ni(File) end, Files)
- end,
- lists:foreach(fun(Break) ->
- {{Mod, Line}, [Status, Action, _, Cond]} =
- Break,
- int:break(Mod, Line),
- if
- Status =:= inactive ->
- int:disable_break(Mod, Line);
- true -> ignore
- end,
- if
- Action/=enable ->
- int:action_at_break(Mod,Line,Action);
- true -> ignore
- end,
- case Cond of
- CFunction when is_tuple(CFunction) ->
- int:test_at_break(Mod,Line,CFunction);
- null -> ignore
- end
- end,
- Breaks),
-
- State#state{tracewin=TraceWin, backtrace=BackTrace}.
-
-save_settings(SFile, State) ->
- Settings = {State#state.tracewin,
- int:auto_attach(),
- int:stack_trace(),
- State#state.backtrace,
- [int:file(Mod) || Mod <- int:interpreted()],
- int:all_breaks()},
- Binary = term_to_binary({debugger_settings, Settings}),
- case file:write_file(SFile, Binary) of
- ok ->
- State#state{sfile=SFile, changed=false};
- {error, _Reason} ->
- State
- end.
-
-
-%%====================================================================
-%% Other internal functions
-%%====================================================================
-
-registered_name(Pid) ->
- %% Yield in order to give Pid more time to register its name
- timer:sleep(200),
-
- Node = node(Pid),
- if
- Node =:= node() ->
- case erlang:process_info(Pid, registered_name) of
- {registered_name, Name} -> Name;
- _ -> undefined
- end;
- true ->
- case rpc:call(Node,erlang,process_info,
- [Pid,registered_name]) of
- {registered_name, Name} -> Name;
- _ -> undefined
- end
- end.
-
-trace_function(State) ->
- {dbg_ui_trace, start, [State#state.tracewin,State#state.backtrace]}.
diff --git a/lib/debugger/src/dbg_ui_mon_win.erl b/lib/debugger/src/dbg_ui_mon_win.erl
deleted file mode 100644
index 8655c7697a..0000000000
--- a/lib/debugger/src/dbg_ui_mon_win.erl
+++ /dev/null
@@ -1,573 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_mon_win).
--compile([{nowarn_deprecated_function,{gs,checkbutton,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,grid,2}},
- {nowarn_deprecated_function,{gs,gridline,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,listbox,2}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menubar,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-%% External exports
--export([init/0]).
--export([create_win/3, get_window/1,
- show_option/3,
- enable/2, is_enabled/1, select/2,
- add_module/3, delete_module/2,
- add_process/6, update_process/4, clear_processes/1,
- add_break/3, update_break/2, delete_break/2,
- clear_breaks/1, clear_breaks/2,
- handle_event/2
- ]).
-
--define(default_rows,50).
-
--record(moduleInfo, {module, menubtn}).
--record(procInfo, {pid, row}).
--record(breakInfo, {point, status, break}).
--record(winInfo, {window, % gsobj()
- grid, % gsobj()
- row, % int() Last row in grid
-
- focus, % int() Selected row in grid
-
- modules=[], % [#moduleInfo{}] Known modules
- processes=[], % [#procInfo{}] Known processes
- breaks=[], % [#breakInfo{}] Known breakpoints
-
- listbox, % gsobj() Listinng known modules
-
- %% Auto attach buttons
- fbutton, % gsobj()
- bbutton, % gsobj()
- ebutton, % gsobj()
- selected=[], % ['First Call'|'On Break'|'On Exit']
-
- slabel, % showing Stack Trace option
- blabel % showing Back Trace Size
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-init() ->
- dbg_ui_win:init().
-
-%%--------------------------------------------------------------------
-%% create_win(GS, Title, Menus) -> #winInfo{}
-%% GS = gsobj()
-%% Title = string()
-%% Menus = [menu()] See dbg_ui_win.erl
-%%--------------------------------------------------------------------
-
--define(PAD, 5).
--define(Wf, 150).
--define(Wg, 770).
--define(W, 800).
--define(H, 390).
-
-create_win(GS, Title, Menus) ->
- Win = gs:window(GS, [{title, Title},
- {width, ?W}, {height, ?H},
- {configure,true}, {destroy,true},
- {keypress,true}, {motion,true}]),
-
- MenuBar = gs:menubar(Win, []),
- dbg_ui_win:create_menus(MenuBar, Menus),
- dbg_ui_winman:windows_menu(MenuBar),
-
- Font = dbg_ui_win:font(normal),
-
- Frame = gs:frame(Win, [{x, ?PAD}, {y, 30},
- {width, ?Wf}, {height, ?H}]),
- Hlb = 200,
- Listbox = gs:listbox(Frame, [{x, 0}, {y, 0},
- {width, ?Wf}, {height, Hlb},
- {data, listbox},
- {doubleclick, true},
- {items, []}]),
- gs:label(Frame, [{x, 0}, {y, Hlb}, {width, ?Wf}, {height, 20},
- {align, w},
- {label, {text, "Auto Attach:"}}, {font, Font}]),
- Fbtn = gs:checkbutton(Frame, [{x, 0}, {y, Hlb+20},
- {width, ?Wf}, {height, 20},
- {label, {text, 'First Call'}},
- {align, w}, {font, Font},
- {data, autoattach}]),
- Bbtn = gs:checkbutton(Frame, [{x, 0}, {y, Hlb+40},
- {width, ?Wf}, {height, 20},
- {label, {text, 'On Break'}},
- {align, w}, {font, Font},
- {data, autoattach}]),
- Ebtn = gs:checkbutton(Frame, [{x, 0}, {y, Hlb+60},
- {width, ?Wf}, {height, 20},
- {label, {text, 'On Exit'}},
- {align, w}, {font, Font},
- {data, autoattach}]),
- SLabel = gs:label(Frame, [{x, 0}, {y, Hlb+80},
- {width, ?Wf}, {height, 40},
- {font, Font}, {align, w}]),
- BLabel = gs:label(Frame, [{x, 0}, {y, Hlb+120},
- {width, ?Wf}, {height, 40},
- {font, Font}, {align, w}]),
-
- Grid = gs:grid(Win, [{x, 2*?PAD+?Wf}, {y, 30},
- {width, ?W-(2*?PAD+?Wf)}, {height, ?H-30},
- {bg, grey}, {fg, black},
- {vscroll, right}, {hscroll, bottom},
- calc_columnwidths(?Wg),
- {rows, {1,?default_rows}}]),
- gs:gridline(Grid, [{row, 1}, {bw, 5}, {fg, blue},
- {font, Font},
- {text, {1,"Pid"}}, {text, {2,"Initial Call"}},
- {text, {3,"Name"}}, {text, {4,"Status"}},
- {text, {5,"Information"}}]),
-
- gs:config(Win, {map, true}),
- #winInfo{window=Win, grid=Grid, row=1, focus=0,
- listbox=Listbox,
- fbutton=Fbtn, bbutton=Bbtn, ebutton=Ebtn,
- slabel=SLabel, blabel=BLabel}.
-
-%%--------------------------------------------------------------------
-%% get_window(WinInfo) -> Window
-%% WinInfo = #winInfo{}
-%% Window = gsobj()
-%%--------------------------------------------------------------------
-get_window(WinInfo) ->
- WinInfo#winInfo.window.
-
-%%--------------------------------------------------------------------
-%% show_option(WinInfo, Option, Value) -> void()
-%% WinInfo = #winInfo{}
-%% Option = auto_attach | stack_trace | back_trace
-%% Value = [Flag] % Option==auto_attach
-%% Flag = init | break | exit
-%% | true | all | no_tail | false % Option==stack_trace
-%% | int() % Option==back_trace
-%%--------------------------------------------------------------------
-show_option(WinInfo, Option, Value) ->
- case Option of
-
- auto_attach ->
- lists:foreach(fun (Button) ->
- gs:config(Button, {select, false})
- end,
- option_buttons(WinInfo, [init, break, exit])),
- lists:foreach(fun (Button) ->
- gs:config(Button, {select, true})
- end,
- option_buttons(WinInfo, Value));
-
- stack_trace ->
- Text = case Value of
- all -> "Stack Trace:\n On (with tail)";
- true -> "Stack Trace:\n On (with tail)";
- no_tail -> "Stack Trace:\n On (no tail)";
- false -> "Stack Trace:\n Off"
- end,
- gs:config(WinInfo#winInfo.slabel, {label, {text, Text}});
-
- back_trace ->
- Text = "Back Trace Size:\n " ++ integer_to_list(Value),
- gs:config(WinInfo#winInfo.blabel, {label, {text, Text}})
- end.
-
-option_buttons(WinInfo, [init|Flags]) ->
- [WinInfo#winInfo.fbutton|option_buttons(WinInfo, Flags)];
-option_buttons(WinInfo, [break|Flags]) ->
- [WinInfo#winInfo.bbutton|option_buttons(WinInfo, Flags)];
-option_buttons(WinInfo, [exit|Flags]) ->
- [WinInfo#winInfo.ebutton|option_buttons(WinInfo, Flags)];
-option_buttons(_WinInfo, []) ->
- [].
-
-%%--------------------------------------------------------------------
-%% enable([MenuItem], Bool)
-%% is_enabled(MenuItem) -> Bool
-%% MenuItem = atom()
-%% Bool = boolean()
-%%--------------------------------------------------------------------
-enable(MenuItems, Bool) ->
- lists:foreach(fun(MenuItem) ->
- gs:config(MenuItem, {enable, Bool})
- end,
- MenuItems).
-
-is_enabled(MenuItem) ->
- gs:read(MenuItem, enable).
-
-%%--------------------------------------------------------------------
-%% select(MenuItem, Bool)
-%% MenuItem = atom()
-%% Bool = boolean()
-%%--------------------------------------------------------------------
-select(MenuItem, Bool) ->
- dbg_ui_win:select(MenuItem, Bool).
-
-%%--------------------------------------------------------------------
-%% add_module(WinInfo, Name, Mod) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Name = atom()
-%% Mod = atom()
-%%--------------------------------------------------------------------
-add_module(WinInfo, Menu, Mod) ->
- Modules = WinInfo#winInfo.modules,
- case lists:keymember(Mod, #moduleInfo.module, Modules) of
- false ->
- %% Create a menu for the module
- Font = dbg_ui_win:font(normal),
- MenuBtn = gs:menuitem(Menu, [{label, {text,Mod}},
- {font, Font},
- {itemtype, cascade}]),
- SubMenu = gs:menu(MenuBtn, []),
- gs:menuitem(SubMenu, [{label, {text,"View"}},
- {font, Font},
- {data, {module,Mod,view}}]),
- gs:menuitem(SubMenu, [{label, {text,"Delete"}},
- {font, Font},
- {data, {module,Mod,delete}}]),
-
- %% Add the module to the listbox
- gs:config(WinInfo#winInfo.listbox, {add, Mod}),
-
- ModInfo = #moduleInfo{module=Mod, menubtn=MenuBtn},
- WinInfo#winInfo{modules=[ModInfo | Modules]};
- true -> WinInfo
- end.
-
-%%--------------------------------------------------------------------
-%% delete_module(WinInfo, Mod) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Mod = atom()
-%%--------------------------------------------------------------------
-delete_module(WinInfo, Mod) ->
- {value, ModInfo} = lists:keysearch(Mod, #moduleInfo.module,
- WinInfo#winInfo.modules),
- gs:destroy(ModInfo#moduleInfo.menubtn),
- delete_module(WinInfo#winInfo.listbox, atom_to_list(Mod), 0),
- WinInfo#winInfo{modules=lists:keydelete(Mod, #moduleInfo.module,
- WinInfo#winInfo.modules)}.
-
-delete_module(Listbox, ModS, Index) ->
- case gs:read(Listbox, {get, Index}) of
- ModS ->
- gs:config(Listbox, {del, Index});
- _OtherModS ->
- delete_module(Listbox, ModS, Index+1)
- end.
-
-%%--------------------------------------------------------------------
-%% add_process(WinInfo, Pid, Name, Function, Status, Info) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Pid = pid()
-%% Name = undefined | atom()
-%% Function = {Mod, Func, Args}
-%% Status = idle | running | break | exit
-%% Info = {} | term()
-%%--------------------------------------------------------------------
-add_process(WinInfo, Pid, Name, {Mod,Func,Args}, Status, Info) ->
- Grid = WinInfo#winInfo.grid,
- Row = (WinInfo#winInfo.row)+1,
- GridLine = case gs:read(Grid, {obj_at_row, Row}) of
- undefined ->
- if Row>?default_rows ->
- gs:config(Grid,[{rows,{1,Row}}]);
- true -> ok
- end,
- gs:gridline(Grid,[{row,Row}, {bw,5}, {fg,black},
- {font,dbg_ui_win:font(normal)},
- {click, true},
- {doubleclick, true}]);
- GSObj ->
- GSObj
- end,
- Name2 = case Name of undefined -> ""; _ -> Name end,
- FuncS = io_lib:format("~w:~w/~w", [Mod, Func, length(Args)]),
- Info2 = case Info of {} -> ""; _ -> Info end,
- Options = [{text, {1,Pid}}, {text, {2,FuncS}}, {text, {3,Name2}},
- {text, {4,Status}}, {text, {5,Info2}},
- {data, {gridline, Pid}}],
- gs:config(GridLine, Options),
-
- ProcInfo = #procInfo{pid=Pid, row=Row},
- WinInfo#winInfo{processes=[ProcInfo|WinInfo#winInfo.processes],
- row=Row}.
-
-%%--------------------------------------------------------------------
-%% update_process(WinInfo, Pid, Status, Info)
-%% WinInfo = #winInfo{}
-%% Pid = pid()
-%% Status = idle | running | break | exit
-%% Info = {} | term()
-%%--------------------------------------------------------------------
-update_process(WinInfo, Pid, Status, Info) ->
- {value, ProcInfo} = lists:keysearch(Pid, #procInfo.pid,
- WinInfo#winInfo.processes),
-
- Grid = WinInfo#winInfo.grid,
- GridLine = gs:read(Grid, {obj_at_row, ProcInfo#procInfo.row}),
-
- Info2 = case Info of {} -> ""; _ -> Info end,
- gs:config(GridLine, [{text, {4,Status}}, {text, {5,Info2}}]).
-
-%%--------------------------------------------------------------------
-%% clear_processes(WinInfo) -> WinInfo
-%% WinInfo = #winInfo{}
-%%--------------------------------------------------------------------
-clear_processes(WinInfo) ->
- Grid = WinInfo#winInfo.grid,
- Max = WinInfo#winInfo.row,
- clear_processes(Grid, 2, Max),
- gs:config(Grid,[{rows,{1,?default_rows}}]),
- WinInfo#winInfo{row=1, focus=0, processes=[]}.
-
-clear_processes(Grid, Row, Max) when Row=<Max ->
- GridLine = gs:read(Grid, {obj_at_row, Row}),
- case gs:read(GridLine,{text,4}) of
- "exit" ->
- Pid = list_to_pid(gs:read(GridLine,{text,1})),
- dbg_ui_winman:clear_process(dbg_ui_trace:title(Pid));
- _ ->
- ok
- end,
-
- Options = [{fg, black},
- {{text,1}, ""}, {{text,2},""}, {{text,3},""},
- {{text,4}, ""}, {{text,5},""},
- {data, []}],
- gs:config(GridLine, Options),
- clear_processes(Grid, Row+1, Max);
-clear_processes(_Grid, Row, Max) when Row>Max ->
- done.
-
-%%--------------------------------------------------------------------
-%% add_break(WinInfo, Name, {Point, Options}) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Name = atom()
-%% Point = {Mod, Line}
-%% Options = [Status, Action, Mods, Cond]
-%% Status = active | inactive
-%% Action = enable | disable | delete
-%% Mods = null (not used)
-%% Cond = null | {Mod, Func}
-%%--------------------------------------------------------------------
-add_break(WinInfo, Menu, {Point, Options}) ->
- Break = dbg_ui_win:add_break(Menu, Point),
- dbg_ui_win:update_break(Break, Options),
- BreakInfo = #breakInfo{point=Point, break=Break},
- WinInfo#winInfo{breaks=[BreakInfo|WinInfo#winInfo.breaks]}.
-
-%%--------------------------------------------------------------------
-%% update_break(WinInfo, {Point, Options})
-%% WinInfo = #winInfo{}
-%% Point = {Mod, Line}
-%% Options = [Status, Action, Mods, Cond]
-%% Status = active | inactive
-%% Action = enable | disable | delete
-%% Mods = null (not used)
-%% Cond = null | {Mod, Func}
-%%--------------------------------------------------------------------
-update_break(WinInfo, {Point, Options}) ->
- {value, BreakInfo} = lists:keysearch(Point, #breakInfo.point,
- WinInfo#winInfo.breaks),
- dbg_ui_win:update_break(BreakInfo#breakInfo.break, Options).
-
-%%--------------------------------------------------------------------
-%% delete_break(WinInfo, Point) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Point = {Mod, Line}
-%%--------------------------------------------------------------------
-delete_break(WinInfo, Point) ->
- {value, BreakInfo} = lists:keysearch(Point, #breakInfo.point,
- WinInfo#winInfo.breaks),
- dbg_ui_win:delete_break(BreakInfo#breakInfo.break),
- WinInfo#winInfo{breaks=lists:keydelete(Point, #breakInfo.point,
- WinInfo#winInfo.breaks)}.
-
-%%--------------------------------------------------------------------
-%% clear_breaks(WinInfo) -> WinInfo
-%% clear_breaks(WinInfo, Mod) -> WinInfo
-%% WinInfo = #winInfo{}
-%%--------------------------------------------------------------------
-clear_breaks(WinInfo) ->
- lists:foreach(fun(BreakInfo) ->
- dbg_ui_win:delete_break(BreakInfo#breakInfo.break)
- end,
- WinInfo#winInfo.breaks),
- WinInfo#winInfo{breaks=[]}.
-clear_breaks(WinInfo, Mod) ->
- Fun =
- fun(BreakInfo) ->
- case BreakInfo#breakInfo.point of
- {Mod, _Line} ->
- dbg_ui_win:delete_break(BreakInfo#breakInfo.break),
- false;
- _ -> true
- end
- end,
- Breaks = lists:filter(Fun, WinInfo#winInfo.breaks),
- WinInfo#winInfo{breaks=Breaks}.
-
-%%--------------------------------------------------------------------
-%% handle_event(GSEvent, WinInfo) -> Command
-%% GSEvent = {gs, Id, Event, Data, Arg}
-%% WinInfo = #winInfo{}
-%% Command = ignore
-%% | stopped
-%% | {coords, {X,Y}}
-%%
-%% | {shortcut, Key}
-%% | MenuItem | {Menu, [MenuItem]}
-%% MenuItem = Menu = atom()
-%% | {break, Point, What}
-%% What = delete | {status, Status} | {trigger, Trigger}
-%% | {module, Mod, What}
-%% What = view | delete
-%%
-%% | {focus, Pid, WinInfo}
-%% | default
-%%--------------------------------------------------------------------
-%% Window events
-handle_event({gs, _Id, configure, _Data, [W, H |_]}, WinInfo) ->
- configure(WinInfo, {W, H}),
- ignore;
-handle_event({gs, _Id, destroy, _Data, _Arg}, _WinInfo) ->
- stopped;
-handle_event({gs, _Id, motion, _Data, [X,Y]}, WinInfo) ->
- {LastX, LastY} = dbg_ui_win:motion(X, Y),
- Win = WinInfo#winInfo.window,
- {coords, {gs:read(Win, x)+LastX-5, gs:read(Win, y)+LastY-5}};
-
-%% Menus and keyboard shortcuts
-handle_event({gs, _Id, keypress, _Data, [Key,_,_,1]}, _WinInfo) when
- Key/='Up', Key/='Down', Key/=p, Key/=n ->
- {shortcut, Key};
-handle_event({gs, _Id, click, {dbg_ui_winman, Win}, _Arg}, _WinInfo) ->
- dbg_ui_winman:raise(Win),
- ignore;
-handle_event({gs, _Id, click, {menuitem, Name}, _Arg}, _WinInfo) ->
- Name;
-handle_event({gs, _Id, click, {menu, Menu}, _Arg}, _WinInfo) ->
- Names = dbg_ui_win:selected(Menu),
- {Menu, Names};
-handle_event({gs, _Id, click, {break, Point, What}, _Arg}, _WinInfo) ->
- {break, Point, What};
-handle_event({gs, _Id, click, {module, Mod, What}, _Arg}, _WinInfo) ->
- {module, Mod, What};
-
-%% Listbox
-handle_event({gs, _Id, doubleclick, listbox, [_Index, ModS|_]}, _WI) ->
- {module, list_to_atom(ModS), view};
-
-%% Auto attach buttons
-handle_event({gs, _Id, click, autoattach, _Arg}, WinInfo) ->
- Names = lists:foldl(fun (Button, NamesAcc) ->
- case gs:read(Button, select) of
- true ->
- {text, Name} =
- gs:read(Button, label),
- [list_to_atom(Name)|NamesAcc];
- false ->
- NamesAcc
- end
- end,
- [],
- [WinInfo#winInfo.ebutton,
- WinInfo#winInfo.bbutton,
- WinInfo#winInfo.fbutton]),
- {'Auto Attach', Names};
-
-%% Process grid
-handle_event({gs, _Id, keypress, _Data, [Key|_]}, WinInfo) when
- Key =:= 'Up'; Key =:= 'Down' ->
- Dir = if Key =:= 'Up' -> up; Key =:= 'Down' -> down end,
- Row = move(WinInfo, Dir),
- if Row>1 ->
- WinInfo2 = highlight(WinInfo, Row),
- #procInfo{pid=Pid} =
- lists:keyfind(Row, #procInfo.row, WinInfo#winInfo.processes),
- {focus, Pid, WinInfo2};
- true ->
- ignore
- end;
-handle_event({gs, _Id, click, {gridline, Pid}, [_Col,Row|_]}, WinInfo) ->
- WinInfo2 = highlight(WinInfo, Row),
- {focus, Pid, WinInfo2};
-handle_event({gs, _Id, doubleclick, _Data, _Arg}, _WinInfo) ->
- default;
-
-handle_event(_GSEvent, _WinInfo) ->
- ignore.
-
-move(WinInfo, Dir) ->
- Row = WinInfo#winInfo.focus,
- Last = WinInfo#winInfo.row,
- if
- Dir =:= up, Row > 1 -> Row-1;
- Dir =:= down, Row < Last -> Row+1;
- true -> Row
- end.
-
-highlight(WinInfo, Row) ->
- Grid = WinInfo#winInfo.grid,
- case WinInfo#winInfo.focus of
- 0 -> ignore;
- Focus ->
- GridLine1 = gs:read(Grid, {obj_at_row, Focus}),
- gs:config(GridLine1, {fg, black})
- end,
- GridLine2 = gs:read(Grid, {obj_at_row, Row}),
- gs:config(GridLine2, {fg, white}),
- WinInfo#winInfo{focus=Row}.
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-configure(WinInfo, {W, H}) ->
- Grid = WinInfo#winInfo.grid,
- NewW = W - (2*?PAD+?Wf),
- Dx = NewW - gs:read(Grid, width),
- Dy = H-42 - gs:read(Grid, height),
- if
- (Dx+Dy) =/= 0 ->
- gs:config(Grid, [{width, NewW}, {height, H-30}]),
- Cols = calc_columnwidths(NewW),
- gs:config(Grid, Cols);
- true ->
- ok
- end.
-
-calc_columnwidths(Width) ->
- W = if
- Width =< ?Wg -> ?Wg;
- true -> Width
- end,
- First = [round(X) || X <- [0.13*W, 0.27*W, 0.18*W, 0.18*W]],
- Last = W - lists:sum(First) - 30,
- {columnwidths, First++[Last]}.
diff --git a/lib/debugger/src/dbg_ui_settings.erl b/lib/debugger/src/dbg_ui_settings.erl
deleted file mode 100644
index fcfd67966f..0000000000
--- a/lib/debugger/src/dbg_ui_settings.erl
+++ /dev/null
@@ -1,162 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_settings).
-
--include_lib("kernel/include/file.hrl").
-
-%% External exports
--export([start/4]).
-
-%% Internal exports
--export([init/6]).
-
-%% OTP-6011 What's denoted gs="Graphics system id" is now in fact
-%% the object id of the monitor window.
--record(state, {gs, % term() Graphics system id
- win, % term() Settings dialog window data
- monitor, % pid() Monitor pid
- action % load | save
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(GS, Pos, Action, SFile)
-%% GS = Graphics system id
-%% Pos = {X,Y}
-%% Action = load | save
-%% SFile = default | string()
-%%--------------------------------------------------------------------
-start(GS, Pos, Action, SFile) ->
- Title = case Action of
- load -> "Load Settings Dialog";
- save -> "Save Settings Dialog"
- end,
- case dbg_ui_winman:is_started(Title) of
- true -> ignore;
- false ->
- spawn(?MODULE, init, [self(), GS, Pos, Title, Action, SFile])
- end.
-
-%%====================================================================
-%% Internal exports
-%%====================================================================
-
-init(Monitor, GS, Pos, Title, Action, SFile) ->
- {SDir, SFileName} =
- if
- %% If settings are saved for the first time, and to
- %% the default directory HOME/erlang.tools/debugger,
- %% make sure the directory exists, or create it if
- %% desired and possible
- SFile==default -> {default_settings_dir(GS), "NoName.state"};
- true -> {filename:dirname(SFile), filename:basename(SFile)}
- end,
-
- Filter = filename:join(SDir, "*.state"),
- Extra = fun(_File) -> true end,
-
- %% Create window
- Win = case Action of
- load ->
- dbg_ui_filedialog_win:create_win(GS, Title, Pos, normal,
- Filter, Extra);
- save ->
- dbg_ui_filedialog_win:create_win(GS, Title, Pos, normal,
- Filter, Extra, SFileName)
- end,
- Window = dbg_ui_filedialog_win:get_window(Win),
- dbg_ui_winman:insert(Title, Window),
-
- State = #state{gs=GS, win=Win, monitor=Monitor, action=Action},
- loop(State).
-
-
-%%====================================================================
-%% Main loop and message handling
-%%====================================================================
-
-loop(State) ->
- receive
-
- %% From the GUI
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd = dbg_ui_filedialog_win:handle_event(GuiEvent,
- State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, _Data} ->
- loop(State);
- {dbg_ui_winman, destroy} ->
- exit(normal)
- end.
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd({stopped, _Dir}, _State) ->
- exit(normal);
-gui_cmd({win, Win}, State) ->
- State#state{win=Win};
-gui_cmd({select, File}, State) ->
- State#state.monitor ! {dbg_ui_settings, File, State#state.action},
- exit(normal).
-
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-default_settings_dir(GS) ->
- {ok, [[Home]]} = init:get_argument(home),
- DefDir = filename:join([Home, ".erlang_tools", "debugger"]),
-
- case filelib:is_dir(DefDir) of
- true -> DefDir;
- false ->
- {ok, CWD} = file:get_cwd(),
-
- Msg = ["Default directory", DefDir, "does not exist.",
- "Click OK to create it or",
- "Cancel to use other directory."],
- case tool_utils:confirm(GS, Msg) of
- ok ->
- ToolsDir = filename:dirname(DefDir),
- case filelib:is_dir(ToolsDir) of
- true ->
- case file:make_dir(DefDir) of
- ok -> DefDir;
- _Error -> CWD
- end;
- false ->
- case file:make_dir(ToolsDir) of
- ok ->
- case file:make_dir(DefDir) of
- ok -> DefDir;
- _Error -> CWD
- end;
- _Error -> CWD
- end
- end;
- cancel -> CWD
- end
- end.
diff --git a/lib/debugger/src/dbg_ui_trace.erl b/lib/debugger/src/dbg_ui_trace.erl
deleted file mode 100644
index 3e1fb2dcae..0000000000
--- a/lib/debugger/src/dbg_ui_trace.erl
+++ /dev/null
@@ -1,814 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_trace).
-
-%% External exports
--export([start/1, start/3]).
--export([title/1]).
-
--define(TRACEWIN, ['Button Area', 'Evaluator Area', 'Bindings Area']).
--define(BACKTRACE, 100).
-
--record(state, {gs, % term() Graphics system id
- win, % term() Attach process window data
- coords, % {X,Y} Mouse point position
-
- pid, % pid() Debugged process
- meta, % pid() Meta process
- status, % {Status,Mod,Line} | {exit,Where,Reason}
- % Status = init | idle | break
- % | wait_break | wait_running
- % | running
- % Where={Mod,Line} | null
-
- cm, % atom() | undefined Current module
- cm_obsolete=false, % boolean() Curr mod needs reloading
-
- stack, % {Cur,Max}
-
- trace, % boolean()
- stack_trace, % all | no_tail | false
- backtrace % integer() #call frames to fetch
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(Pid)
-%% start(Pid, TraceWin, BackTrace)
-%% Pid = pid()
-%% TraceWin = [WinArea]
-%% WinArea = 'Button|Evaluator|Bindings|Trace Area'
-%% Backtrace = integer()
-%%--------------------------------------------------------------------
-start(Pid) -> % Used by debugger:quick/3 (no monitor)
- start(Pid, ?TRACEWIN, ?BACKTRACE).
-start(Pid, TraceWin, BackTrace) ->
- case {whereis(dbg_wx_mon), whereis(dbg_ui_mon)} of
- {undefined, undefined} ->
- case which_gui() of
- gs ->
- start2(Pid, TraceWin, BackTrace);
- wx ->
- dbg_wx_trace:start(Pid, TraceWin, BackTrace)
- end;
- {undefined, Monitor} when is_pid(Monitor) ->
- start2(Pid, TraceWin, BackTrace);
- {Monitor, _} when is_pid(Monitor) ->
- dbg_wx_trace:start(Pid, TraceWin, BackTrace)
- end.
-
-start2(Pid, TraceWin, BackTrace) ->
- %% Inform int about my existence and get the meta pid back
- case int:attached(Pid) of
- {ok, Meta} ->
- init(Pid, Meta, TraceWin, BackTrace);
- error ->
- ignore
- end.
-
-which_gui() ->
- try
- wx:new(),
- wx:destroy(),
- wx
- catch _:_ ->
- gs
- end.
-
-%%--------------------------------------------------------------------
-%% title(Pid) -> string()
-%% By exporting this function, dbg_ui_mon may check with dbg_ui_winman
-%% if there already is an attach window for a given pid and thus avoid
-%% spawning processes unnecessarily.
-%%--------------------------------------------------------------------
-title(Pid) ->
- "Attach Process " ++ pid_to_list(Pid).
-
-
-%%====================================================================
-%% Main loop and message handling
-%%====================================================================
-
-init(Pid, Meta, TraceWin, BackTrace) ->
-
- %% Start necessary stuff
- GS = dbg_ui_trace_win:init(), % Graphics system
-
- %% Create attach process window
- Title = title(Pid),
- Win = dbg_ui_trace_win:create_win(GS, Title, TraceWin, menus()),
- Window = dbg_ui_trace_win:get_window(Win),
- dbg_ui_winman:insert(Title, Window),
-
- %% Initial process state
- State1 = #state{gs=GS, win=Win, coords={0,0}, pid=Pid, meta=Meta,
- status={idle,null,null},
- stack={1,1}},
-
- State2 = init_options(TraceWin,
- int:stack_trace(), % Stack Trace
- BackTrace, % Back trace size
- State1),
-
- State3 = init_contents(int:all_breaks(), % Breakpoints
- State2),
-
- int:meta(Meta, trace, State3#state.trace),
-
- gui_enable_updown(stack_trace, {1,1}),
- gui_enable_btrace(false, false),
- dbg_ui_trace_win:display(idle),
-
- loop(State3).
-
-init_options(TraceWin, StackTrace, BackTrace, State) ->
- lists:foreach(fun(Area) -> dbg_ui_trace_win:select(Area, true) end,
- TraceWin),
-
- Trace = lists:member('Trace Area', TraceWin),
-
- dbg_ui_trace_win:select(map(StackTrace), true),
-
- %% Backtrace size is (currently) not shown in window
-
- State#state{trace=Trace,stack_trace=StackTrace,backtrace=BackTrace}.
-
-init_contents(Breaks, State) ->
- Win =
- lists:foldl(fun(Break, Win) ->
- dbg_ui_trace_win:add_break(Win,
- 'Break',Break)
- end,
- State#state.win,
- Breaks),
-
- State#state{win=Win}.
-
-loop(#state{meta=Meta} = State) ->
- receive
-
- %% From the GUI main window
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd =
- dbg_ui_trace_win:handle_event(GuiEvent,State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the GUI help windows
- {gui, Cmd} ->
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the interpreter
- {int, Cmd} ->
- State2 = int_cmd(Cmd, State),
- loop(State2);
-
- %% From the meta process
- {Meta, Cmd} ->
- State2 = meta_cmd(Cmd, State),
- loop(State2);
- {NewMeta, {exit_at, Where, Reason, Cur}} ->
- State2 = meta_cmd({exit_at, Where, Reason, Cur},
- State#state{meta=NewMeta}),
- loop(State2);
-
- %% From the dbg_ui_edit process
- {dbg_ui_edit, 'Backtrace:', BackTrace} ->
- loop(State#state{backtrace=BackTrace});
- {dbg_ui_edit, Var, Val} ->
- Cmd = atom_to_list(Var)++"="++io_lib:format("~p", [Val]),
- State2 = gui_cmd({user_command, lists:flatten(Cmd)}, State),
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, Data} ->
- dbg_ui_winman:update_windows_menu(Data),
- loop(State);
- {dbg_ui_winman, destroy} ->
- exit(stop)
- end.
-
-%%--Commands from the GUI---------------------------------------------
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd({win, Win}, State) ->
- State#state{win=Win};
-gui_cmd(stopped, _State) ->
- exit(stop);
-gui_cmd({coords, Coords}, State) ->
- State#state{coords=Coords};
-
-gui_cmd({shortcut, Key}, State) ->
- case shortcut(Key) of
- {always, Cmd} -> gui_cmd(Cmd, State);
- {if_enabled, Cmd} ->
- case dbg_ui_trace_win:is_enabled(Cmd) of
- true -> gui_cmd(Cmd, State);
- false -> State
- end;
- false -> State
- end;
-
-%% File menu
-gui_cmd('Close', State) ->
- gui_cmd(stopped, State);
-
-%% Edit menu
-gui_cmd('Go To Line...', State) ->
- %% Will result in message handled below: {gui, {gotoline, Line}}
- dbg_ui_trace_win:helpwin(gotoline, State#state.win,
- State#state.gs, State#state.coords),
- State;
-gui_cmd({gotoline, Line}, State) ->
- Win = dbg_ui_trace_win:select_line(State#state.win, Line),
- State#state{win=Win};
-gui_cmd('Search...', State) ->
- dbg_ui_trace_win:helpwin(search, State#state.win,
- State#state.gs, State#state.coords),
- State;
-
-%% Process menu
-gui_cmd('Step', State) ->
- int:meta(State#state.meta, step),
- State;
-gui_cmd('Next', State) ->
- int:meta(State#state.meta, next),
- State;
-gui_cmd('Continue', State) ->
- int:meta(State#state.meta, continue),
- {Status, Mod, Line} = State#state.status,
- if
- Status==wait_break ->
- Win = dbg_ui_trace_win:unmark_line(State#state.win),
- gui_enable_functions(wait_running),
- State#state{win=Win, status={wait_running,Mod,Line}};
- true ->
- dbg_ui_trace_win:enable(['Stop'], true),
- dbg_ui_trace_win:enable(['Continue'], false),
- State
- end;
-gui_cmd('Finish', State) ->
- int:meta(State#state.meta, finish),
- State;
-gui_cmd('Skip', State) ->
- int:meta(State#state.meta, skip),
- State;
-gui_cmd('Time Out', State) ->
- int:meta(State#state.meta, timeout),
- State;
-gui_cmd('Stop', State) ->
- int:meta(State#state.meta, stop),
- {Status, Mod, Line} = State#state.status,
- if
- Status==wait_running ->
- Win = dbg_ui_trace_win:mark_line(State#state.win, Line,
- break),
- gui_enable_functions(wait_break),
- gui_enable_updown(State#state.stack_trace,
- State#state.stack),
- gui_enable_btrace(State#state.trace,
- State#state.stack_trace),
- dbg_ui_trace_win:display({wait, Mod, Line}),
- State#state{win=Win, status={wait_break,Mod,Line}};
- true ->
- dbg_ui_trace_win:enable(['Stop'], false),
- dbg_ui_trace_win:enable(['Continue'], true),
- State
- end;
-gui_cmd('Where', State) ->
- {_Cur, Max} = State#state.stack,
- Stack = {Max, Max},
- {_Status, Mod, Line} = State#state.status,
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid, break),
- gui_update_bindings(State#state.meta),
- gui_enable_updown(State#state.stack_trace, Stack),
- dbg_ui_trace_win:display(State#state.status),
- State#state{win=Win, cm=Mod, stack=Stack};
-
-gui_cmd('Kill', State) ->
- exit(State#state.pid, kill),
- State;
-gui_cmd('Messages', State) ->
- case int:meta(State#state.meta, messages) of
- [] ->
- dbg_ui_trace_win:eval_output("< No Messages!\n", bold);
- Messages ->
- dbg_ui_trace_win:eval_output("< --- Current Messages ---\n",
- bold),
- lists:foldl(
- fun(Msg, N) ->
- Str1 = io_lib:format(" ~w:", [N]),
- dbg_ui_trace_win:eval_output(Str1, bold),
- Str2 = io_lib:format(" ~ts~n",[io_lib:print(Msg)]),
- dbg_ui_trace_win:eval_output(Str2, normal),
- N+1
- end,
- 1,
- Messages)
- end,
- State;
-gui_cmd('Back Trace', State) ->
- dbg_ui_trace_win:trace_output("\nBACK TRACE\n----------\n"),
- lists:foreach(
- fun({Le, {Mod,Func,Args}}) ->
- Str = io_lib:format("~p > ~p:~p~p~n",
- [Le, Mod, Func, Args]),
- dbg_ui_trace_win:trace_output(Str);
- ({Le, {Fun,Args}}) ->
- Str = io_lib:format("~p > ~p~p~n", [Le, Fun, Args]),
- dbg_ui_trace_win:trace_output(Str);
- (_) -> ignore
- end,
- int:meta(State#state.meta, backtrace, State#state.backtrace)),
- dbg_ui_trace_win:trace_output("\n"),
- State;
-gui_cmd('Up', State) ->
- {Cur, Max} = State#state.stack,
- case int:meta(State#state.meta, stack_frame, {up, Cur}) of
- {New, {undefined,-1}, _Bs} -> % call from non-interpreted code
- Stack = {New, Max},
- Win = dbg_ui_trace_win:show_no_code(State#state.win),
- dbg_ui_trace_win:update_bindings([]),
- gui_enable_updown(State#state.stack_trace, Stack),
- dbg_ui_trace_win:display({New,null,null}),
- State#state{win=Win, cm=null, stack=Stack};
-
- {New, {Mod,Line}, Bs} ->
- Stack = {New, Max},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid,
- where),
- dbg_ui_trace_win:update_bindings(Bs),
- gui_enable_updown(State#state.stack_trace, Stack),
- dbg_ui_trace_win:display({New,Mod,Line}),
- State#state{win=Win, cm=Mod, stack=Stack};
- top ->
- dbg_ui_trace_win:enable(['Up'], false),
- State
- end;
-gui_cmd('Down', State) ->
- {Cur, Max} = State#state.stack,
- case int:meta(State#state.meta, stack_frame, {down, Cur}) of
- {New, {undefined,-1}, _Bs} -> % call from non-interpreted code
- Stack = {New, Max},
- Win = dbg_ui_trace_win:show_no_code(State#state.win),
- dbg_ui_trace_win:update_bindings([]),
- gui_enable_updown(State#state.stack_trace, Stack),
- dbg_ui_trace_win:display({New,null,null}),
- State#state{win=Win, cm=null, stack=Stack};
-
- {New, {Mod,Line}, Bs} ->
- Stack = {New, Max},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid,
- where),
- dbg_ui_trace_win:update_bindings(Bs),
- gui_enable_updown(State#state.stack_trace, Stack),
- dbg_ui_trace_win:display({New,Mod,Line}),
- State#state{win=Win, cm=Mod, stack=Stack};
-
- bottom ->
- gui_cmd('Where', State)
- end;
-
-%% Break menu
-gui_cmd('Line Break...', State) ->
- add_break(State#state.gs, State#state.coords, line,
- State#state.cm,
- dbg_ui_trace_win:selected_line(State#state.win)),
- State;
-gui_cmd('Conditional Break...', State) ->
- add_break(State#state.gs, State#state.coords, conditional,
- State#state.cm,
- dbg_ui_trace_win:selected_line(State#state.win)),
- State;
-gui_cmd('Function Break...', State) ->
- add_break(State#state.gs, State#state.coords, function,
- State#state.cm, undefined),
- State;
-gui_cmd('Enable All', State) ->
- Breaks = int:all_breaks(),
- ThisMod = State#state.cm,
- lists:foreach(fun ({{Mod, Line}, _Options}) when Mod==ThisMod ->
- int:enable_break(Mod, Line);
- (_Break) ->
- ignore
- end,
- Breaks),
- State;
-gui_cmd('Disable All', State) ->
- Breaks = int:all_breaks(),
- ThisMod = State#state.cm,
- lists:foreach(fun ({{Mod, Line}, _Options}) when Mod==ThisMod ->
- int:disable_break(Mod, Line);
- (_Break) ->
- ignore
- end,
- Breaks),
- State;
-gui_cmd('Delete All', State) ->
- int:no_break(State#state.cm),
- State;
-gui_cmd({break, {Mod, Line}, What}, State) ->
- case What of
- add -> int:break(Mod, Line);
- delete -> int:delete_break(Mod, Line);
- {status, inactive} -> int:disable_break(Mod, Line);
- {status, active} -> int:enable_break(Mod, Line);
- {trigger, Action} -> int:action_at_break(Mod, Line, Action)
- end,
- State;
-
-%% Options menu
-gui_cmd({'Trace Window', TraceWin}, State) ->
- Trace = lists:member('Trace Area', TraceWin),
- int:meta(State#state.meta, trace, Trace),
- Win = dbg_ui_trace_win:configure(State#state.win, TraceWin),
- {Status,_,_} = State#state.status,
- if
- Status==break; Status==wait_break ->
- gui_enable_btrace(Trace, State#state.stack_trace);
- true -> ignore
- end,
- State#state{win=Win, trace=Trace};
-gui_cmd({'Stack Trace', [Name]}, State) ->
- int:meta(State#state.meta, stack_trace, map(Name)),
- {Status,_,_} = State#state.status,
- if
- Status==break; Status==wait_break ->
- gui_enable_btrace(State#state.trace, map(Name));
- true -> ignore
- end,
- State;
-gui_cmd('Back Trace Size...', State) ->
- dbg_ui_edit:start(State#state.gs, State#state.coords, "Backtrace",
- 'Backtrace:', {integer, State#state.backtrace}),
- State;
-
-%% Help menu
-gui_cmd('Debugger', State) ->
- Window = dbg_ui_trace_win:get_window(State#state.win),
- HelpFile = filename:join([code:lib_dir(debugger),
- "doc", "html", "part_frame.html"]),
- tool_utils:open_help(Window, HelpFile),
- State;
-
-gui_cmd({user_command, Cmd}, State) ->
- {Status, _Mod, _Line} = State#state.status,
- if
- Status==break;
- Status==wait_break;
- Status==wait_running ->
- Cm = State#state.cm,
- Arg = case State#state.stack of
- {Cur, Max} when Cur<Max -> {Cm, Cmd, Cur};
- _Stack -> {Cm, Cmd}
- end,
-
- %% Reply will be received as {Meta, {eval_rsp, Res}}
- int:meta(State#state.meta, eval, Arg);
- true ->
- Str = "Commands not allowed",
- dbg_ui_trace_win:eval_output([$<,Str,10], normal)
- end,
- State;
-
-gui_cmd({edit, {Var, Val}}, State) ->
- dbg_ui_edit:start(State#state.gs, State#state.coords,
- "Edit variable", Var, {term, Val}),
- State.
-
-add_break(GS, Coords, Type, undefined, _Line) ->
- dbg_ui_break:start(GS, Coords, Type);
-add_break(GS, Coords, Type, Mod, undefined) ->
- dbg_ui_break:start(GS, Coords, Type, Mod);
-add_break(GS, Coords, Type, Mod, Line) ->
- dbg_ui_break:start(GS, Coords, Type, Mod, Line).
-
-%%--Commands from the interpreter-------------------------------------
-
-int_cmd({interpret, Mod}, State) ->
- if
- Mod==State#state.cm ->
- State#state{cm_obsolete=true};
- true ->
- State
- end;
-int_cmd({no_interpret, Mod}, State) ->
- if
- Mod==State#state.cm ->
- State#state{cm_obsolete=true};
- true ->
- Win = dbg_ui_trace_win:remove_code(State#state.win, Mod),
- State#state{win=Win}
- end;
-
-int_cmd({new_break, Break}, State) ->
- Win = dbg_ui_trace_win:add_break(State#state.win, 'Break', Break),
- State#state{win=Win};
-int_cmd({delete_break, Point}, State) ->
- Win = dbg_ui_trace_win:delete_break(State#state.win, Point),
- State#state{win=Win};
-int_cmd({break_options, Break}, State) ->
- Win = dbg_ui_trace_win:update_break(State#state.win, Break),
- State#state{win=Win};
-int_cmd(no_break, State) ->
- Win = dbg_ui_trace_win:clear_breaks(State#state.win),
- State#state{win=Win};
-int_cmd({no_break, Mod}, State) ->
- Win = dbg_ui_trace_win:clear_breaks(State#state.win, Mod),
- State#state{win=Win}.
-
-%%--Commands from the meta process------------------------------------
-
-%% Message received when first attached to a living process
-%% '_Trace' is a boolean indicating if the process is traced or not --
-%% ignore this as we already have ordered tracing or not depending on if
-%% the Trace Area is shown or not.
-meta_cmd({attached, Mod, Line, _Trace}, State) ->
- Win = if
- Mod/=undefined ->
- gui_enable_functions(init),
- gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid,
- break);
- true -> State#state.win
- end,
- State#state{win=Win, status={init,Mod,Line}, cm=Mod};
-
-%% Message received when returning to interpreted code
-meta_cmd({re_entry, dbg_ieval, eval_fun}, State) ->
- State;
-meta_cmd({re_entry, Mod, _Func}, State) ->
- Obs = State#state.cm_obsolete,
- case State#state.cm of
- Mod when Obs==true ->
- Win = gui_load_module(State#state.win, Mod,State#state.pid),
- State#state{win=Win, cm_obsolete=false};
- Mod -> State;
- Cm ->
- Win = gui_show_module(State#state.win, Mod, 0,
- Cm, State#state.pid, break),
- State#state{win=Win, cm=Mod}
- end;
-
-%% Message received when attached to a terminated process
-meta_cmd({exit_at, null, Reason, Cur}, State) ->
- Stack = {Cur, Cur},
- gui_enable_functions(exit),
- gui_enable_updown(false, Stack),
- dbg_ui_trace_win:display({exit, null, Reason}),
- State#state{status={exit,null,Reason}, stack=Stack};
-meta_cmd({exit_at, {Mod,Line}, Reason, Cur}, State) ->
- Stack = {Cur+1, Cur+1},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid, break),
- gui_enable_functions(exit),
- gui_enable_updown(State#state.stack_trace, Stack),
- gui_enable_btrace(State#state.trace, State#state.stack_trace),
- gui_update_bindings(State#state.meta),
- dbg_ui_trace_win:display({exit, {Mod,Line}, Reason}),
- State#state{win=Win, cm=Mod,status={exit,{Mod,Line},Reason},
- stack=Stack};
-
-meta_cmd({break_at, Mod, Line, Cur}, State) ->
- Stack = {Cur,Cur},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid, break),
- gui_enable_functions(break),
- gui_enable_updown(State#state.stack_trace, Stack),
- gui_enable_btrace(State#state.trace, State#state.stack_trace),
- gui_update_bindings(State#state.meta),
- dbg_ui_trace_win:display({break, Mod, Line}),
- State#state{win=Win, cm=Mod, status={break,Mod,Line}, stack=Stack};
-meta_cmd({func_at, Mod, Line, Cur}, State) ->
- Stack = {Cur,Cur},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid, where),
- gui_enable_functions(idle),
- dbg_ui_trace_win:display(idle),
- State#state{win=Win, cm=Mod, status={idle,Mod,Line}, stack=Stack};
-meta_cmd({wait_at, Mod, Line, Cur}, #state{status={Status,_,_}}=State)
- when Status/=init, Status/=break ->
- Stack = {Cur,Cur},
- gui_enable_functions(wait_running),
- dbg_ui_trace_win:display({wait,Mod,Line}),
- State#state{status={wait_running,Mod,Line}, stack=Stack};
-meta_cmd({wait_at, Mod, Line, Cur}, State) ->
- Stack = {Cur,Cur},
- Win = gui_show_module(State#state.win, Mod, Line,
- State#state.cm, State#state.pid, break),
- gui_enable_functions(wait_break),
- gui_enable_updown(State#state.stack_trace, Stack),
- gui_enable_btrace(State#state.trace, State#state.stack_trace),
- gui_update_bindings(State#state.meta),
- dbg_ui_trace_win:display({wait, Mod, Line}),
- State#state{win=Win, cm=Mod, status={wait_break,Mod,Line},
- stack=Stack};
-meta_cmd({wait_after_at, Mod, Line, Sp}, State) ->
- meta_cmd({wait_at, Mod, Line, Sp}, State);
-meta_cmd(running, State) ->
- Win = dbg_ui_trace_win:unmark_line(State#state.win),
- gui_enable_functions(running),
- dbg_ui_trace_win:update_bindings([]),
- dbg_ui_trace_win:display({running, State#state.cm}),
- State#state{win=Win, status={running,null,null}};
-
-meta_cmd(idle, State) ->
- Win = dbg_ui_trace_win:show_no_code(State#state.win),
- gui_enable_functions(idle),
- dbg_ui_trace_win:update_bindings([]),
- dbg_ui_trace_win:display(idle),
- State#state{win=Win, status={idle,null,null}, cm=undefined};
-
-%% Message about changed trace option can be ignored, the change must
-%% have been ordered by this process. (In theory, the change could have
-%% been ordered by another attached process. The Debugger, though,
-%% allows max one attached process per debugged process).
-meta_cmd({trace, _Bool}, State) ->
- State;
-
-meta_cmd({stack_trace, Flag}, State) ->
- dbg_ui_trace_win:select(map(Flag), true),
- gui_enable_updown(Flag, State#state.stack),
- {Status,_,_} = State#state.status,
- if
- Status==break; Status==wait_break ->
- gui_enable_btrace(State#state.trace, Flag);
- true -> ignore
- end,
- State#state{stack_trace=Flag};
-
-meta_cmd({trace_output, Str}, State) ->
- dbg_ui_trace_win:trace_output(Str),
- State;
-
-%% Reply on a user command
-meta_cmd({eval_rsp, Res}, State) ->
- Str = io_lib:print(Res),
- dbg_ui_trace_win:eval_output([$<,Str,10], normal),
- State.
-
-
-%%====================================================================
-%% GUI auxiliary functions
-%%====================================================================
-
-menus() ->
- [{'File', [{'Close', no}]},
- {'Edit', [{'Go To Line...', no},
- {'Search...', no}]},
- {'Process', [{'Step', 0},
- {'Next', 0},
- {'Continue', 0},
- {'Finish', 0},
- {'Skip', no},
- {'Time Out', no},
- {'Stop', no},
- separator,
- {'Kill', no},
- separator,
- {'Messages', 0},
- {'Back Trace', no},
- separator,
- {'Where', 0},
- {'Up', no},
- {'Down', no}]},
- {'Break', [{'Line Break...', 5},
- {'Conditional Break...', no},
- {'Function Break...', no},
- separator,
- {'Enable All', no},
- {'Disable All', no},
- {'Delete All', 0},
- separator]},
- {'Options', [{'Trace Window', no, cascade,
- [{'Button Area', no, check},
- {'Evaluator Area', no, check},
- {'Bindings Area', no, check},
- {'Trace Area', no, check}]},
- {'Stack Trace', no, cascade,
- [{'Stack On, Tail', no, radio},
- {'Stack On, No Tail', no, radio},
- {'Stack Off', no, radio}]},
- {'Back Trace Size...', no}]},
- {'Help', [{'Debugger', no}]}].
-
-%% enable(Status) -> [MenuItem]
-%% Status = init % when first message from Meta has arrived
-%% | idle | break | exit | wait_break | wait_running | running
-enable(init) -> [];
-enable(idle) -> ['Stop','Kill'];
-enable(break) -> ['Step','Next','Continue','Finish','Skip',
- 'Kill','Messages'];
-enable(exit) -> [];
-enable(wait_break) -> ['Continue','Time Out','Kill'];
-enable(wait_running) -> ['Stop','Kill'];
-enable(running) -> ['Stop','Kill'].
-
-all_buttons() ->
- ['Step','Next','Continue','Finish','Skip','Time Out','Stop',
- 'Kill','Messages','Back Trace','Where','Up','Down'].
-
-shortcut(s) -> {if_enabled, 'Step'};
-shortcut(n) -> {if_enabled, 'Next'};
-shortcut(c) -> {if_enabled, 'Continue'};
-shortcut(f) -> {if_enabled, 'Finish'};
-shortcut(m) -> {if_enabled, 'Messages'};
-shortcut(w) -> {if_enabled, 'Where'};
-
-shortcut(b) -> {always, 'Line Break...'};
-shortcut(d) -> {always, 'Delete All'};
-
-shortcut(_) -> false.
-
-map('Stack On, Tail') -> all; % Stack trace
-map('Stack On, No Tail') -> no_tail;
-map('Stack Off') -> false;
-map(all) -> 'Stack On, Tail';
-map(true) -> 'Stack On, Tail';
-map(no_tail) -> 'Stack On, No Tail';
-map(false) -> 'Stack Off'.
-
-
-%% gui_show_module(Win, Mod, Line, Cm, Pid, How) -> Win
-%% gui_show_module(Win, {Mod,Line}, _Reason, Cm, Pid, How) -> Win
-%% How = where | break
-%% Show contents of a module in code area
-gui_show_module(Win, {Mod,Line}, _Reason, Cm, Pid, How) ->
- gui_show_module(Win, Mod, Line, Cm, Pid, How);
-gui_show_module(Win, Mod, Line, Mod, _Pid, How) ->
- dbg_ui_trace_win:mark_line(Win, Line, How);
-gui_show_module(Win, Mod, Line, _Cm, Pid, How) ->
- Win2 = case dbg_ui_trace_win:is_shown(Win, Mod) of
- {true, Win3} -> Win3;
- false -> gui_load_module(Win, Mod, Pid)
- end,
- dbg_ui_trace_win:mark_line(Win2, Line, How).
-
-gui_load_module(Win, Mod, Pid) ->
- dbg_ui_trace_win:display({text, "Loading module..."}),
- Contents = int:contents(Mod, Pid),
- Win2 = dbg_ui_trace_win:show_code(Win, Mod, Contents),
- dbg_ui_trace_win:display({text, ""}),
- Win2.
-
-gui_update_bindings(Meta) ->
- Bs = int:meta(Meta, bindings, nostack),
- dbg_ui_trace_win:update_bindings(Bs).
-
-gui_enable_functions(Status) ->
- Enable = enable(Status),
- Disable = all_buttons() -- Enable,
- dbg_ui_trace_win:enable(Disable, false),
- dbg_ui_trace_win:enable(Enable, true).
-
-gui_enable_updown(Flag, Stack) ->
- {Enable, Disable} =
- if
- Flag==false -> {[], ['Up', 'Down']};
- true ->
- case Stack of
- {1,1} -> {[], ['Up', 'Down']};
- {2,2} -> {[], ['Up', 'Down']};
- {Max,Max} -> {['Up'], ['Down']};
- {2,_Max} -> {['Down'], ['Up']};
- {_Cur,_Max} -> {['Up', 'Down'], []}
- end
- end,
- dbg_ui_trace_win:enable(Enable, true),
- dbg_ui_trace_win:enable(Disable, false),
- if
- Enable==[] -> dbg_ui_trace_win:enable(['Where'], false);
- true -> dbg_ui_trace_win:enable(['Where'], true)
- end.
-
-gui_enable_btrace(Trace, StackTrace) ->
- Bool = if
- Trace==false -> false;
- StackTrace==false -> false;
- true -> true
- end,
- dbg_ui_trace_win:enable(['Back Trace'], Bool).
diff --git a/lib/debugger/src/dbg_ui_trace_win.erl b/lib/debugger/src/dbg_ui_trace_win.erl
deleted file mode 100644
index beb3fbd71e..0000000000
--- a/lib/debugger/src/dbg_ui_trace_win.erl
+++ /dev/null
@@ -1,1595 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_trace_win).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,checkbutton,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,4}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,editor,2}},
- {nowarn_deprecated_function,{gs,editor,3}},
- {nowarn_deprecated_function,{gs,entry,2}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,frame,3}},
- {nowarn_deprecated_function,{gs,grid,3}},
- {nowarn_deprecated_function,{gs,gridline,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,label,3}},
- {nowarn_deprecated_function,{gs,menubar,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,window,2}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-%% External exports
--export([init/0]).
--export([create_win/4, get_window/1,
- configure/2,
- enable/2, is_enabled/1, select/2,
- add_break/3, update_break/2, delete_break/2,
- clear_breaks/1, clear_breaks/2,
- display/1, % Help messages
- is_shown/2, % Code area
- show_code/3, show_no_code/1, remove_code/2,
- mark_line/3, unmark_line/1,
- select_line/2, selected_line/1,
- eval_output/2, % Evaluator area
- update_bindings/1, % Bindings area
- trace_output/1, % Trace area
- handle_event/2
- ]).
--export([helpwin/4, % Help windows
- helpwin/5]).
-
--record(breakInfo, {point, status, break}).
--record(winInfo, {window, % gsobj()
- size, % {W, H}
- flags, % {F,F,F,F} F = open|close
-
- marked_line=0, % integer() Current line
- selected_line=0, % integer() Selected line
-
- breaks=[], % [#breakInfo{}] Known breakpoints
-
- editor, % {Mod, Editor} Visible code editor
- editors=[] % [{Mod,Editor}] Code editors
- }).
-
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% init() -> GS
-%% GS = term()
-%%--------------------------------------------------------------------
-init() ->
- dbg_ui_win:init().
-
-%%--------------------------------------------------------------------
-%% create_win(GS, Title, TraceWin, Menus) -> #winInfo{}
-%% GS = gsobj()
-%% Title = string()
-%% TraceWin = [WinArea]
-%% WinArea = 'Button|Evaluator|Bindings|Trace Area'
-%% Menus = [menu()] See dbg_ui_win.erl
-%%--------------------------------------------------------------------
-create_win(GS, Title, TraceWin, Menus) ->
- Bu = flip(lists:member('Button Area', TraceWin)),
- Ev = flip(lists:member('Evaluator Area', TraceWin)),
- Bi = flip(lists:member('Bindings Area', TraceWin)),
- Tr = flip(lists:member('Trace Area', TraceWin)),
-
- Win = gs:window(trace_window, GS, [{title, Title},
- {width, 550},
- {configure,true}, {destroy,true},
- {keypress,true}, {motion,true}]),
-
- MenuBar = gs:menubar(Win, []),
- dbg_ui_win:create_menus(MenuBar, Menus),
- dbg_ui_winman:windows_menu(MenuBar),
-
- FrameOpts = [{anchor,nw}, {relief,raised}, {bw,2}, {keypress,true}],
- Editor = code_area(2, 25, FrameOpts, Win),
- button_area(Bu, 2, 235, FrameOpts, Win),
- eval_area({Ev,Bi}, 2, 265, FrameOpts, Win),
- bind_area({Ev,Bi}, 300, 265, FrameOpts, Win),
- trace_area(Tr, 2, 475, FrameOpts, Win),
-
- Flags = {Bu, Ev, Bi, Tr},
- resizebar(rb1(Flags), 'RB1', 2, 225, 710, 10, Win),
- resizebar(rb2(Flags), 'RB2', 2, 465, 710, 10, Win),
- resizebar(rb3(Flags), 'RB3', 290, 265, 10, 200, Win),
- config_v(),
- config_h(),
-
- gs:config(Win,{height,
- 25 +
- gs:read('CodeArea', height) +
- gs:read('RB1', height) +
- gs:read('ButtonArea', height) +
- erlang:max(gs:read('EvalArea', height),
- gs:read('BindArea', height)) +
- gs:read('RB2', height) +
- gs:read('TraceArea', height)}),
-
- gs:config(Win, {map, true}),
- #winInfo{window=Win, size={gs:read(Win,width), gs:read(Win,height)},
- flags=Flags,
- editor={'$top', Editor}, editors=[{'$top', Editor}]}.
-
-flip(true) -> open;
-flip(false) -> close.
-
-%%--------------------------------------------------------------------
-%% get_window(WinInfo) -> Window
-%% WinInfo = #winInfo{}
-%% Window = gsobj()
-%%--------------------------------------------------------------------
-get_window(WinInfo) ->
- WinInfo#winInfo.window.
-
-%%--------------------------------------------------------------------
-%% configure(WinInfo, TraceWin) -> WinInfo
-%% WinInfo = #winInfo{}
-%% TraceWin = [WinArea]
-%% WinArea = 'Button|Evaluator|Bindings|Trace Area'
-%% Window areas should be opened or closed.
-%%--------------------------------------------------------------------
-configure(WinInfo, TraceWin) ->
- {Bu1, Ev1, Bi1, Tr1} = OldFlags = WinInfo#winInfo.flags,
- Bu2 = flip(lists:member('Button Area', TraceWin)),
- Ev2 = flip(lists:member('Evaluator Area', TraceWin)),
- Bi2 = flip(lists:member('Bindings Area', TraceWin)),
- Tr2 = flip(lists:member('Trace Area', TraceWin)),
- NewFlags = {Bu2, Ev2, Bi2, Tr2},
-
- Win = WinInfo#winInfo.window,
- W = gs:read(Win, width),
- H = gs:read(Win, height),
-
- H2 = if
- Bu1 =:= close, Bu2 =:= open ->
- resize_button_area(open, width, W-4),
- gs:config('ButtonArea', {height, 30}),
- H+30;
- Bu1 =:= open, Bu2 =:= close ->
- gs:config('ButtonArea', [{width, 0}, {height, 0}]),
- H-30;
- true -> H
- end,
- H3 = if
- Ev1 =:= close, Ev2 =:= open, Bi1 =:= open ->
- Wnew1 = round((W-10-4)/2), % W = window/2 - rb - pads
- Hbi1 = gs:read('BindArea', height), % H = bind area h
- resize_eval_area(open, width, Wnew1),
- resize_eval_area(open, height, Hbi1),
- gs:config('RB3', {width, 10}),
- gs:config('RB3', {height, Hbi1}),
- resize_bind_area(open, width,
- Wnew1-gs:read('BindArea', width)),
- H2;
- Ev1 =:= close, Ev2 =:= open, Bi1 =:= close ->
- resize_eval_area(open, width, W-4),
- resize_eval_area(open, height, 200),
- H2+200;
- Ev1 =:= open, Ev2 =:= close, Bi1 =:= open ->
- gs:config('EvalArea', [{width,0}, {height,0}]),
- gs:config('RB3', [{width, 0}, {height, 0}]),
- Wnew2 = W-4,
- resize_bind_area(open, width,
- Wnew2-gs:read('BindArea', width)),
- H2;
- Ev1 =:= open, Ev2 =:= close, Bi1 =:= close ->
- Hs1 = gs:read('EvalArea', height),
- gs:config('EvalArea', [{width, 0}, {height, 0}]),
- H2-Hs1;
- true -> H2
- end,
- H4 = if
- Bi1 =:= close, Bi2 =:= open, Ev2 =:= open ->
- Wnew3 = round((W-10-4)/2), % W = window/2 - rb - pads
- Hs2 = gs:read('EvalArea', height), % H = eval area h
- resize_bind_area(open, width, Wnew3),
- resize_bind_area(open, height, Hs2),
- gs:config('RB3', [{width,10},{height,Hs2}]),
- resize_eval_area(open, width,
- Wnew3-gs:read('EvalArea', width)),
- H3;
- Bi1 =:= close, Bi2 =:= open, Ev2 =:= close ->
- resize_bind_area(open, width, W-4),
- resize_bind_area(open, height, 200),
- H3+200;
- Bi1 =:= open, Bi2 =:= close, Ev2 =:= open ->
- gs:config('BindArea', [{width, 0}, {height, 0}]),
- gs:config('RB3', [{width, 0}, {height, 0}]),
- Wnew4 = W-4,
- resize_eval_area(open, width,
- Wnew4-gs:read('EvalArea', width)),
- H3;
- Bi1 =:= open, Bi2 =:= close, Ev2 =:= close ->
- Hbi2 = gs:read('BindArea', height),
- gs:config('BindArea', [{width, 0}, {height, 0}]),
- H3-Hbi2;
- true -> H3
- end,
- H5 = if
- Tr1 =:= close, Tr2 =:= open ->
- resize_trace_area(open, width, W-4),
- resize_trace_area(open, height, 200),
- H4+200;
- Tr1 =:= open, Tr2 =:= close ->
- Hf = gs:read('TraceArea', height),
- gs:config('TraceArea', [{width, 0}, {height, 0}]),
- H4-Hf;
- true -> H4
- end,
- gs:config(Win, {height, H5}),
-
- RB1old = rb1(OldFlags), RB1new = rb1(NewFlags),
- if
- RB1old =:= close, RB1new =:= open ->
- gs:config('RB1', [{width, W-4}, {height, 10}]),
- gs:config(Win, {height, gs:read(Win, height)+10});
- RB1old =:= open, RB1new =:= close ->
- gs:config('RB1', [{width, 0}, {height, 0}, lower]),
- gs:config(Win, {height, gs:read(Win, height)-10});
- true -> ignore
- end,
-
- RB2old = rb2(OldFlags), RB2new = rb2(NewFlags),
- if
- RB2old =:= close, RB2new =:= open ->
- gs:config('RB2', [{width, W-4}, {height, 10}]),
- gs:config(Win, {height,gs:read(Win, height)+10});
- RB2old =:= open, RB2new =:= close ->
- gs:config('RB2', [{width, 0}, {height, 0}, lower]),
- gs:config(Win, {height, gs:read(Win, height)-10});
- true -> ignore
- end,
- config_v(),
- config_h(),
-
- flush_configure(),
-
- WinInfo#winInfo{size={gs:read(Win, width), gs:read(Win, height)},
- flags=NewFlags}.
-
-flush_configure() ->
- receive
- {gs, _Id, configure, _Data, _Arg} ->
- flush_configure()
- after 100 ->
- true
- end.
-
-%%--------------------------------------------------------------------
-%% enable([MenuItem], Bool)
-%% is_enabled(MenuItem) -> Bool
-%% MenuItem = atom()
-%% Bool = boolean()
-%%--------------------------------------------------------------------
-enable(MenuItems, Bool) ->
- lists:foreach(fun(MenuItem) ->
- gs:config(MenuItem, {enable, Bool}),
- case is_button(MenuItem) of
- {true, Button} ->
- gs:config(Button, {enable, Bool});
- false -> ignore
- end
- end,
- MenuItems).
-
-is_enabled(MenuItem) ->
- gs:read(MenuItem, enable).
-
-%%--------------------------------------------------------------------
-%% select(MenuItem, Bool)
-%% MenuItem = atom()
-%% Bool = boolean()
-%%--------------------------------------------------------------------
-select(MenuItem, Bool) ->
- dbg_ui_win:select(MenuItem, Bool).
-
-%%--------------------------------------------------------------------
-%% add_break(WinInfo, Name, {Point, Options}) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Name = atom() Menu name
-%% Point = {Mod, Line}
-%% Options = [Status, Action, Mods, Cond]
-%% Status = active | inactive
-%% Action = enable | disable | delete
-%% Mods = null (not used)
-%% Cond = null | {Mod, Func}
-%%--------------------------------------------------------------------
-add_break(WinInfo, Menu, {{Mod,Line},[Status|_Options]}=Break) ->
- case lists:keyfind(Mod, 1, WinInfo#winInfo.editors) of
- {Mod, Editor} ->
- add_break_to_code(Editor, Line, Status);
- false -> ignore
- end,
- add_break_to_menu(WinInfo, Menu, Break).
-
-add_break_to_code(Editor, Line, Status) ->
- Color = if Status =:= active -> red; Status =:= inactive -> blue end,
- config_editor(Editor, [{overwrite,{{Line,0},"-@- "}},
- {fg,{{{Line,0},{Line,lineend}}, Color}}]).
-
-add_break_to_menu(WinInfo, Menu, {Point, [Status|_Options]=Options}) ->
- Break = dbg_ui_win:add_break(Menu, Point),
- dbg_ui_win:update_break(Break, Options),
- BreakInfo = #breakInfo{point=Point, status=Status, break=Break},
- WinInfo#winInfo{breaks=[BreakInfo|WinInfo#winInfo.breaks]}.
-
-%%--------------------------------------------------------------------
-%% update_break(WinInfo, {Point, Options}) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Point = {Mod, Line}
-%% Options = [Status, Action, Mods, Cond]
-%% Status = active | inactive
-%% Action = enable | disable | delete
-%% Mods = null (not used)
-%% Cond = null | {Mod, Func}
-%%--------------------------------------------------------------------
-update_break(WinInfo, {{Mod,Line},[Status|_Options]}=Break) ->
- case lists:keyfind(Mod, 1, WinInfo#winInfo.editors) of
- {Mod, Editor} ->
- add_break_to_code(Editor, Line, Status);
- false -> ignore
- end,
- update_break_in_menu(WinInfo, Break).
-
-update_break_in_menu(WinInfo, {Point, [Status|_Options]=Options}) ->
- {value, BreakInfo} = lists:keysearch(Point, #breakInfo.point,
- WinInfo#winInfo.breaks),
- dbg_ui_win:update_break(BreakInfo#breakInfo.break, Options),
- BreakInfo2 = BreakInfo#breakInfo{status=Status},
- WinInfo#winInfo{breaks=lists:keyreplace(Point, #breakInfo.point,
- WinInfo#winInfo.breaks,
- BreakInfo2)}.
-
-%%--------------------------------------------------------------------
-%% delete_break(WinInfo, Point) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Point = {Mod, Line}
-%%--------------------------------------------------------------------
-delete_break(WinInfo, {Mod,Line}=Point) ->
- case lists:keyfind(Mod, 1, WinInfo#winInfo.editors) of
- {Mod, Editor} -> delete_break_from_code(Editor, Line);
- false -> ignore
- end,
- delete_break_from_menu(WinInfo, Point).
-
-delete_break_from_code(Editor, Line) ->
- Prefix = string:substr(integer_to_list(Line)++": ", 1, 5),
- config_editor(Editor, [{overwrite,{{Line,0},Prefix}},
- {fg,{{{Line,0},{Line,lineend}}, black}}]).
-
-delete_break_from_menu(WinInfo, Point) ->
- {value, BreakInfo} = lists:keysearch(Point, #breakInfo.point,
- WinInfo#winInfo.breaks),
- dbg_ui_win:delete_break(BreakInfo#breakInfo.break),
- WinInfo#winInfo{breaks=lists:keydelete(Point, #breakInfo.point,
- WinInfo#winInfo.breaks)}.
-
-%%--------------------------------------------------------------------
-%% clear_breaks(WinInfo) -> WinInfo
-%% clear_breaks(WinInfo, Mod) -> WinInfo
-%% WinInfo = #winInfo{}
-%%--------------------------------------------------------------------
-clear_breaks(WinInfo) ->
- clear_breaks(WinInfo, all).
-clear_breaks(WinInfo, Mod) ->
- Remove = if
- Mod =:= all -> WinInfo#winInfo.breaks;
- true ->
- lists:filter(fun(#breakInfo{point={Mod2,_L}}) ->
- if
- Mod2 =:= Mod -> true;
- true -> false
- end
- end,
- WinInfo#winInfo.breaks)
- end,
- lists:foreach(fun(#breakInfo{point=Point}) ->
- delete_break(WinInfo, Point)
- end,
- Remove),
- Remain = WinInfo#winInfo.breaks -- Remove,
- WinInfo#winInfo{breaks=Remain}.
-
-%%--------------------------------------------------------------------
-%% display(Arg)
-%% Arg = idle | {Status,Mod,Line} | {running,Mod}
-%% | {exit,Where,Reason} | {text,Text}
-%% Status = break | wait | Level
-%% Level = int()
-%% Mod = atom()
-%% Line = integer()
-%% Where = {Mod,Line} | null
-%% Reason = term()
-%% Text = string()
-%%--------------------------------------------------------------------
-display(Arg) ->
- Str = case Arg of
- idle -> "State: uninterpreted";
- {exit, {Mod,Line}, Reason} ->
- gs:config(trace_window, raise),
- io_lib:format("State: EXITED [~w.erl/~w], Reason:~w",
- [Mod, Line, Reason]);
- {exit, null, Reason} ->
- gs:config(trace_window, raise),
- io_lib:format("State: EXITED [uninterpreted], "
- "Reason:~w", [Reason]);
- {Level, null, _Line} when is_integer(Level) ->
- io_lib:format("*** Call level #~w "
- "(in non-interpreted code)",
- [Level]);
- {Level, Mod, Line} when is_integer(Level) ->
- io_lib:format("*** Call level #~w [~w.erl/~w]",
- [Level, Mod, Line]);
- {Status, Mod, Line} ->
- What = case Status of
- wait -> 'receive';
- _ -> Status
- end,
- io_lib:format("State: ~w [~w.erl/~w]",
- [What, Mod, Line]);
- {running, Mod} ->
- io_lib:format("State: running [~w.erl]", [Mod]);
- {text, Text} -> Text
- end,
- gs:config(info_window, {label,{text,lists:flatten(Str)}}).
-
-%%--------------------------------------------------------------------
-%% is_shown(WinInfo, Mod) -> {true, WinInfo} | false
-%% show_code(WinInfo, Mod, Contents) -> WinInfo
-%% show_no_code(WinInfo) -> WinInfo
-%% remove_code(WinInfo, Mod) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Mod = atom()
-%% Contents = string()
-%% Note: remove_code/2 should not be used for currently shown module.
-%%--------------------------------------------------------------------
-is_shown(WinInfo, Mod) ->
- case lists:keyfind(Mod, 1, WinInfo#winInfo.editors) of
- {Mod, Editor} ->
- gs:config(Editor, raise),
- {true, WinInfo#winInfo{editor={Mod, Editor}}};
- false -> false
- end.
-
-show_code(WinInfo, Mod, Contents) ->
- Editors = WinInfo#winInfo.editors,
- {Flag, Editor} = case lists:keyfind(Mod, 1, Editors) of
- {Mod, Ed} -> {existing, Ed};
- false -> {new, code_editor()}
- end,
- %% Insert code and update breakpoints, if any
- config_editor(Editor, [raise, clear]),
- show_code(Editor, Contents),
- lists:foreach(fun(BreakInfo) ->
- case BreakInfo#breakInfo.point of
- {Mod2, Line} when Mod2 =:= Mod ->
- Status = BreakInfo#breakInfo.status,
- add_break_to_code(Editor, Line,Status);
- _Point -> ignore
- end
- end,
- WinInfo#winInfo.breaks),
- case Flag of
- existing ->
- WinInfo#winInfo{editor={Mod, Editor}};
- new ->
- WinInfo#winInfo{editor={Mod, Editor},
- editors=[{Mod, Editor} | Editors]}
- end.
-
-show_code(Editor, Text) when length(Text) > 1500 ->
- %% Add some text at a time so that other processes may get scheduled
- Str = string:sub_string(Text, 1, 1500),
- config_editor(Editor, {insert,{'end', Str}}),
- show_code(Editor, string:sub_string(Text, 1501));
-show_code(Editor, Text) ->
- config_editor(Editor, {insert,{'end',Text}}).
-
-show_no_code(WinInfo) ->
- {'$top', Editor} = lists:keyfind('$top', 1, WinInfo#winInfo.editors),
- gs:config(Editor, raise),
- WinInfo#winInfo{editor={'$top', Editor}}.
-
-remove_code(WinInfo, Mod) ->
- Editors = WinInfo#winInfo.editors,
- case lists:keyfind(Mod, 1, Editors) of
- {Mod, Editor} ->
- gs:destroy(Editor),
- WinInfo#winInfo{editors=lists:keydelete(Mod, 1, Editors)};
- false ->
- WinInfo
- end.
-
-%%--------------------------------------------------------------------
-%% mark_line(WinInfo, Line, How) -> WinInfo
-%% WinInfo = #winInfo{}
-%% Line = integer()
-%% How = break | where
-%% Mark the code line where the process is executing.
-%%--------------------------------------------------------------------
-mark_line(WinInfo, Line, How) ->
- {_Mod, Editor} = WinInfo#winInfo.editor,
- mark_line2(Editor, WinInfo#winInfo.marked_line, false),
- mark_line2(Editor, Line, How),
- if
- Line =/= 0 -> config_editor(Editor, {vscrollpos, Line-5});
- true -> ignore
- end,
- WinInfo#winInfo{marked_line=Line}.
-
-unmark_line(WinInfo) ->
- mark_line(WinInfo, 0, false).
-
-mark_line2(Editor, Line, How) ->
- Prefix = case How of
- break -> "-->";
- where -> ">>>";
- false -> " "
- end,
- Font = if
- How =:= false -> dbg_ui_win:font(normal);
- true -> dbg_ui_win:font(bold)
- end,
- config_editor(Editor, [{overwrite, {{Line,5}, Prefix}},
- {font_style,
- {{{Line,0},{Line,lineend}}, Font}}]).
-
-%%--------------------------------------------------------------------
-%% select_line(WinInfo, Line) -> WinInfo
-%% selected_line(WinInfo) -> undefined | Line
-%% WinInfo = #winInfo{}
-%% Line = integer()
-%% Select/unselect a line (unselect if Line=0).
-%%--------------------------------------------------------------------
-select_line(WinInfo, Line) ->
- {_Mod, Editor} = WinInfo#winInfo.editor,
-
- %% Since 'Line' may be specified by the user in the 'Go To Line'
- %% help window, it must be checked that it is correct
- Size = gs:read(Editor, size),
- if
- Line =:= 0 ->
- select_line(Editor, WinInfo#winInfo.selected_line, false),
- WinInfo#winInfo{selected_line=0};
- Line < Size ->
- select_line(Editor, Line, true),
- config_editor(Editor, {vscrollpos, Line-5}),
- WinInfo#winInfo{selected_line=Line};
- true ->
- WinInfo
- end.
-
-select_line(Editor, Line, true) ->
- config_editor(Editor, {selection, {{Line,0}, {Line,lineend}}});
-select_line(Editor, _Line, false) ->
- config_editor(Editor, {selection, {{1,0}, {1,0}}}).
-
-selected_line(WinInfo) ->
- case WinInfo#winInfo.selected_line of
- 0 -> undefined;
- Line -> Line
- end.
-
-%%--------------------------------------------------------------------
-%% eval_output(Str, Face)
-%% Str = string()
-%% Face = normal | bold
-%%--------------------------------------------------------------------
-eval_output(Text, Face) ->
- Y1 = gs:read('EvalEditor', size),
- config_editor('EvalEditor', {insert,{'end',Text}}),
- Y2 = gs:read('EvalEditor', size),
-
- Font = dbg_ui_win:font(Face),
- config_editor('EvalEditor',
- [{font_style, {{{Y1,0},{Y2,lineend}}, Font}},
- {vscrollpos,Y2}]).
-
-%%--------------------------------------------------------------------
-%% update_bindings(Bs)
-%% Bs = [{Var,Val}]
-%%--------------------------------------------------------------------
-update_bindings(Bs) ->
- gs:config('BindGrid', {rows, {1,length(Bs)+1}}),
- Font = dbg_ui_win:font(normal),
- Last =
- lists:foldl(fun({Var, Val}, Row) ->
- Opts = [{text, {1,atom_to_list(Var)}},
- {text, {2,io_lib:format("~P",
- [Val, 4])}},
- {doubleclick, true},
- {data, {binding,{Var,Val}}}],
- case gs:read('BindGrid',{obj_at_row,Row}) of
- undefined ->
- gs:gridline('BindGrid',
- [{row, Row},
- {height, 14},
- {font, Font} | Opts]);
- GridLine ->
- gs:config(GridLine, Opts)
- end,
- Row+1
- end,
- 2,
- Bs),
- delete_gridlines(Last).
-
-delete_gridlines(Row) ->
- case gs:read('BindGrid', {obj_at_row, Row}) of
- undefined -> true;
- GridLine ->
- gs:destroy(GridLine),
- delete_gridlines(Row+1)
- end.
-
-%%--------------------------------------------------------------------
-%% trace_output(Str)
-%% Str = string()
-%%--------------------------------------------------------------------
-trace_output(Str) ->
- Font = dbg_ui_win:font(normal),
- config_editor('TraceEditor',
- [{insert, {'end',Str}},
- {fg, {{{1,0},'end'},black}},
- {font_style, {{{1,0},'end'},Font}}]),
- Max = gs:read('TraceEditor', size),
- config_editor('TraceEditor', {vscrollpos, Max}).
-
-%%--------------------------------------------------------------------
-%% handle_event(GSEvent, WinInfo) -> Command
-%% GSEvent = {gs, Id, Event, Data, Arg}
-%% WinInfo = #winInfo{}
-%% Command = ignore
-%% | {win, WinInfo}
-%% | stopped
-%% | {coords, {X,Y}}
-%%
-%% | {shortcut, Key}
-%% | MenuItem | {Menu, [MenuItem]}
-%% MenuItem = Menu = atom()
-%% | {break, Point, What}
-%% What = add | delete | {status,Status} |{trigger,Trigger}
-%% | {module, Mod, view}
-%%
-%% | {user_command, Cmd}
-%%
-%% | {edit, {Var, Val}}
-%%--------------------------------------------------------------------
-%% Window events
-handle_event({gs, _Id, configure, _Data, [W, H|_]}, WinInfo) ->
- case WinInfo#winInfo.size of
- {W, H} -> ignore;
- _Size ->
- configure(WinInfo, W, H),
- {win, WinInfo#winInfo{size={W, H}}}
- end;
-handle_event({gs, _Id, destroy, _Data, _Arg}, _WinInfo) ->
- stopped;
-handle_event({gs, _Id, motion, _Data, [X,Y]}, WinInfo) ->
- {LastX, LastY} = dbg_ui_win:motion(X, Y),
- Win = WinInfo#winInfo.window,
- {coords, {gs:read(Win, x)+LastX-5, gs:read(Win, y)+LastY-5}};
-handle_event({gs, RB, buttonpress, resizebar, _Arg}, WinInfo) ->
- resize(WinInfo, RB), % Resize window contents
- ignore;
-
-%% Menus, buttons and keyboard shortcuts
-handle_event({gs, _Id, keypress, _Data, [Key,_,_,1]}, _WinInfo) ->
- {shortcut, Key};
-handle_event({gs, _Id, click, {dbg_ui_winman, Win}, _Arg}, _WinInfo) ->
- dbg_ui_winman:raise(Win),
- ignore;
-handle_event({gs, _Id, click, {menuitem, Name}, _Arg}, _WinInfo) ->
- Name;
-handle_event({gs, _Id, click, {menu, Menu}, _Arg}, _WinInfo) ->
- Names = dbg_ui_win:selected(Menu),
- {Menu, Names};
-handle_event({gs, _Id, click, {break, Point, What}, _Arg}, _WinInfo) ->
- {break, Point, What};
-handle_event({gs, _Id, click, {module, Mod, view}, _Arg}, _WinInfo) ->
- {module, Mod, view};
-
-%% Code area
-handle_event({gs, Editor, buttonpress, code_editor, _Arg}, WinInfo) ->
- {Row, _Col} = gs:read(Editor, insertpos),
- Again = receive
- {gs, Editor, buttonpress, code_editor, _} ->
- gs:read(Editor, insertpos)
- after 500 ->
- false
- end,
- case Again of
- {Row, _} ->
- {Mod, _Editor} = WinInfo#winInfo.editor,
- Point = {Mod, Row},
- case lists:keymember(Point, #breakInfo.point,
- WinInfo#winInfo.breaks) of
- false -> {break, Point, add};
- true -> {break, Point, delete}
- end;
- {Row2, _} ->
- select_line(Editor, Row2, true),
- {win, WinInfo#winInfo{selected_line=Row2}};
- false ->
- select_line(Editor, Row, true),
- {win, WinInfo#winInfo{selected_line=Row}}
- end;
-
-%% Button area
-handle_event({gs, _Id, click, {button, Name}, _Arg}, _WinInfo) ->
- Name;
-
-%% Evaluator area
-handle_event({gs, 'EvalEntry', keypress, _Data, ['Return'|_]}, _WI) ->
- Command = case gs:read('EvalEntry', text) of
- [10] ->
- eval_output("\n", normal),
- ignore;
- Cmd ->
- eval_output([$>, Cmd, 10], normal),
- {user_command, Cmd}
- end,
- gs:config('EvalEntry', [{text,""}, {focus,false}]),
- Command;
-
-%% Bindings area
-handle_event({gs, _Id, click, {binding, {Var, Val}}, _Arg}, _WinInfo) ->
- Str = io_lib:format("< ~p = ~p~n", [Var, Val]),
- eval_output(Str, bold),
- ignore;
-handle_event({gs, _Id, doubleclick, {binding, B}, _Arg}, _WinInfo) ->
- {edit, B};
-
-handle_event(_GSEvent, _WinInfo) ->
- ignore.
-
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-%%--Code Area---------------------------------------------------------
-
-code_area(X, Y, FrameOpts, Win) ->
- gs:frame('CodeArea', Win,
- [{x,X}, {y,Y}, {width,546}, {height,400} | FrameOpts]),
- gs:label(info_window, 'CodeArea',
- [{label,{text,""}}, {font,dbg_ui_win:font(normal)},
- {x,5}, {y,10}, {width,406}, {height,15},
- {anchor,nw}, {align,w}]),
- code_editor('CodeEditor', 536, 365).
-
-code_editor() ->
- W = gs:read('CodeEditor', width),
- H = gs:read('CodeEditor', height),
- code_editor(null, W, H).
-
-code_editor(Name, W, H) ->
- Editor = if
- Name =:= null -> gs:editor('CodeArea', []);
- true -> gs:editor(Name, 'CodeArea', [])
- end,
- gs:config(Editor, [{x,5}, {y,30}, {width,W}, {height,H},
- {keypress,false}, {buttonpress,true},
- {data,code_editor}]),
- config_editor(Editor, [{vscroll,right}, {hscroll,bottom}]),
- Font = dbg_ui_win:font(normal),
- config_editor(Editor, [{wrap,none}, {fg,{{{1,0},'end'},black}},
- {font, Font},
- {font_style, {{{1,0},'end'},Font}}]),
- Editor.
-
-resize_code_area(WinInfo, Key, Diff) ->
- gs:config('CodeArea', {Key,gs:read('CodeArea', Key)+Diff}),
- case Key of
- width ->
- gs:config(info_window, {Key,gs:read(info_window,Key)+Diff});
- height -> ignore
- end,
-
- %% Resize all code editors
- Value = gs:read('CodeEditor', Key)+Diff,
- gs:config('CodeEditor', {Key,Value}),
- Editors = WinInfo#winInfo.editors,
- lists:foreach(fun({_Mod, Editor}) ->
- gs:config(Editor, {Key,Value})
- end,
- Editors).
-
-%%--Button Area-------------------------------------------------------
-
-buttons() ->
- [{'Step','StepButton'}, {'Next','NextButton'},
- {'Continue','ContinueButton'}, {'Finish','FinishButton'},
- {'Where','WhereButton'}, {'Up','UpButton'}, {'Down','DownButton'}].
-
-is_button(Name) ->
- case lists:keyfind(Name, 1, buttons()) of
- {Name, Button} -> {true, Button};
- false -> false
- end.
-
-button_area(Bu, X, Y, FrameOpts, Win) ->
- {W,H} = case Bu of
- open -> {546,30};
- close -> {0,0}
- end,
- gs:frame('ButtonArea', Win,
- [{x,X}, {y,Y}, {width,W}, {height,H} | FrameOpts]),
- Font = dbg_ui_win:font(normal),
- lists:foldl(fun({Name, Button}, Xb) ->
- gs:button(Button, 'ButtonArea',
- [{label, {text,Name}}, {font,Font},
- {x, Xb}, {y, 1},
- {width, 77}, {height, 24},
- {data, {button,Name}}]),
- Xb+78
- end,
- 1,
- buttons()).
-
-resize_button_area(close, width, _Diff) ->
- ignore;
-resize_button_area(open, width, Diff) ->
- gs:config('ButtonArea', {width, gs:read('ButtonArea', width)+Diff}).
-
-%%--Evaluator Area----------------------------------------------------
-
-eval_area({Ev,Bi}, X, Y, FrameOpts, Win) ->
- {W,H} = if
- Ev =:= open -> {289,200};
- true -> {0,0}
- end,
- Font = dbg_ui_win:font(normal),
- gs:frame('EvalArea', Win,
- [{x,X}, {y,Y}, {width,W}, {height,H} | FrameOpts]),
- gs:label('EvalArea',
- [{label,{text,"Evaluator:"}}, {font, Font},
- {x,5}, {y,35}, {width,80}, {height,25},
- {anchor,sw}, {align,center}]),
- gs:entry('EvalEntry', 'EvalArea',
- [{font, Font},
- {x,80}, {y,35}, {width,185}, {height,25},
- {anchor,sw}, {keypress,true}]),
- gs:editor('EvalEditor', 'EvalArea',
- [{x,5}, {y,35}, {width, 280}, {height, 160},
- {keypress,false},
- {vscroll,right}, {hscroll,bottom},
- {wrap,none}, {fg,{{{1,0},'end'},black}},
- {font, Font},
- {font_style,{{{1,0},'end'},Font}}]),
- gs:config('EvalEditor', {enable, false}),
- if
- Ev =:= open, Bi =:= close -> resize_eval_area(Ev, width, 257);
- true -> ignore
- end.
-
-resize_eval_area(close, _Key, _Diff) ->
- ignore;
-resize_eval_area(open, Key, Diff) ->
- New = gs:read('EvalArea', Key)+Diff,
- gs:config('EvalArea', {Key,New}),
- case Key of
- width ->
- gs:config('EvalEntry', {width,New-104}),
- gs:config('EvalEditor', {width,New-9});
- height ->
- gs:config('EvalEditor', {height,New-40})
- end.
-
-%%--Bindings Area-----------------------------------------------------
-
-bind_area({Ev,Bi}, X, Y, FrameOpts, Win) ->
- {W,H} = if
- Bi =:= open -> {249,200};
- true -> {0,0}
- end,
- gs:frame('BindArea', Win,
- [{x,X}, {y,Y}, {width,W}, {height,H} | FrameOpts]),
-
- Font = dbg_ui_win:font(bold),
- gs:grid('BindGrid', 'BindArea',
- [{x,2}, {y,2}, {height,193}, {width,241},
- {fg,black}, {vscroll,right}, {hscroll,bottom},
- {font,Font},
- calc_columnwidths(241), {rows, {1,50}}]),
- gs:gridline('BindGrid',
- [{row,1}, {height,14}, {fg,blue},
- {text,{1,"Name"}}, {text,{2,"Value"}}, {font,Font}]),
- gs:config('BindGrid', {rows,{1,1}}),
- if
- Bi =:= open, Ev =:= close -> resize_bind_area(Bi, width, 297);
- true -> ignore
- end.
-
-resize_bind_area(close, _Key, _Diff) ->
- ignore;
-resize_bind_area(open, Key, Diff) ->
- New = gs:read('BindArea', Key)+Diff,
- gs:config('BindArea', {Key,New}),
- case Key of
- width ->
- gs:config('BindGrid', {width,New-8}),
- Cols = calc_columnwidths(New-8),
- gs:config('BindGrid', Cols);
- height ->
- gs:config('BindGrid', {height,New-7})
- end.
-
-calc_columnwidths(Width) ->
- if Width =< 291 ->
- {columnwidths,[90,198]};
- true ->
- S = (Width)/(90+198),
- {columnwidths,[round(90*S),round(198*S)]}
- end.
-
-%%--Trace Area--------------------------------------------------------
-
-trace_area(Tr, X, Y, FrameOpts, Win) ->
- {W,H} = case Tr of
- open -> {546,200};
- close -> {0,0}
- end,
- gs:frame('TraceArea', Win,
- [{x,X}, {y,Y}, {width,W}, {height,H} | FrameOpts]),
- Editor = gs:editor('TraceEditor', 'TraceArea',
- [{x,5}, {y,5}, {width,536}, {height,190},
- {keypress,false}]),
- Font = dbg_ui_win:font(normal),
- config_editor(Editor,
- [{vscroll,right}, {hscroll,bottom},
- {wrap,none},{fg,{{{1,0},'end'},black}},
- {font, Font},
- {font_style,{{{1,0},'end'},Font}}]).
-
-resize_trace_area(close, _Key, _Diff) ->
- ignore;
-resize_trace_area(open, Key, Diff) ->
- New = gs:read('TraceArea', Key)+Diff,
- gs:config('TraceArea', {Key,New}),
- gs:config('TraceEditor', {Key,New-10}).
-
-%%--Editors-----------------------------------------------------------
-
-config_editor(Editor, Opts) ->
- gs:config(Editor, {enable,true}),
- gs:config(Editor, Opts),
- gs:config(Editor, {enable,false}).
-
-%%--Resize Bars-------------------------------------------------------
-%% The resize bars are used to resize the areas within the window.
-
-%%--------------------------------------------------------------------
-%% resizebar(Flag, Name, X, Y, W, H, Obj) -> resizebar()
-%% Flag = open | close
-%% Name = atom()
-%% X = Y = integer() Coordinates relative to Obj
-%% W = H = integer() Width and height
-%% Obj = gsobj()
-%% Creates a 'resize bar', a frame object over which the cursor will
-%% be of the 'resize' type.
-%%--------------------------------------------------------------------
-resizebar(Flag, Name, X, Y, W, H, Obj) ->
- {W2,H2} = case Flag of
- open -> {W,H};
- close -> {0,0}
- end,
- gs:create(frame, Name, Obj, [{x,X}, {y,Y}, {width,W2}, {height,H2},
- {bw,2},
- {cursor,resize},
- {buttonpress,true}, {buttonrelease,true},
- {data,resizebar}]).
-
-rb1({_Bu,Ev,Bi,Tr}) ->
- if
- Ev =:= close, Bi =:= close, Tr =:= close -> close;
- true -> open
- end.
-
-rb2({_Bu,Ev,Bi,Tr}) ->
- if
- Tr =:= open ->
- if
- Ev =:= close, Bi =:= close -> close;
- true -> open
- end;
- true -> close
- end.
-
-rb3({_Bu,Ev,Bi,_Tr}) ->
- if
- Ev =:= open, Bi =:= open -> open;
- true -> close
- end.
-
-%%--Configuration-----------------------------------------------------
-%% Resize the window as well as its contents
-
-%%--------------------------------------------------------------------
-%% config_v()
-%% Reconfigure the window vertically.
-%%--------------------------------------------------------------------
-config_v() ->
- Y1 = 25+gs:read('CodeArea', height),
- gs:config('RB1', {y,Y1}),
-
- Y2 = Y1+gs:read('RB1', height),
- gs:config('ButtonArea', {y,Y2}),
-
- Y3 = Y2+gs:read('ButtonArea', height),
- gs:config('EvalArea', {y,Y3}),
- gs:config('RB3', {y,Y3}),
- gs:config('BindArea', {y,Y3}),
-
- Y4 = Y3 + erlang:max(gs:read('EvalArea', height),
- gs:read('BindArea', height)),
- gs:config('RB2', {y,Y4}),
-
- Y5 = Y4 + gs:read('RB2', height),
- gs:config('TraceArea', {y,Y5}).
-
-%%--------------------------------------------------------------------
-%% config_h()
-%% Reconfigure the window horizontally.
-%%--------------------------------------------------------------------
-config_h() ->
- X1 = 2+gs:read('EvalArea', width),
- gs:config('RB3', {x,X1}),
-
- X2 = X1+gs:read('RB3', width),
- gs:config('BindArea', {x,X2}).
-
-%%--------------------------------------------------------------------
-%% configure(WinInfo, W, H)
-%% The window has been resized, now its contents must be resized too.
-%%--------------------------------------------------------------------
-configure(WinInfo, NewW, NewH) ->
- {Bu,Ev,Bi,Tr} = Flags = WinInfo#winInfo.flags,
-
- OldW = gs:read('CodeArea', width)+4,
- OldH = 25+gs:read('CodeArea', height)+
- gs:read('RB1', height)+
- gs:read('ButtonArea', height)+
- erlang:max(gs:read('EvalArea', height), gs:read('BindArea', height))+
- gs:read('RB2', height)+
- gs:read('TraceArea', height),
-
- %% Adjust width unless it is unchanged or less than minimum width
- if
- OldW =/= NewW ->
- {Dcode,Deval,Dbind} = configure_widths(OldW,NewW,Flags),
- resize_code_area(WinInfo, width, Dcode),
- case rb1(Flags) of
- open ->
- gs:config('RB1', {width,gs:read('RB1',width)+Dcode});
- close -> ignore
- end,
- resize_button_area(Bu, width, Dcode),
- resize_eval_area(Ev, width, Deval),
- resize_bind_area(Bi, width, Dbind),
- case rb2(Flags) of
- open ->
- gs:config('RB2', {width,gs:read('RB2',width)+Dcode});
- close -> ignore
- end,
- resize_trace_area(Tr, width, Dcode),
- config_h();
- true -> ignore
- end,
-
- %% Adjust height unless it is unchanged or less than minimum height
- if
- OldH =/= NewH ->
- {Dcode2,Deval2,Dtrace} = configure_heights(OldH,NewH,Flags),
- resize_code_area(WinInfo, height, Dcode2),
- resize_eval_area(Ev, height, Deval2),
- case rb3(Flags) of
- open ->
- gs:config('RB3',
- {height,gs:read('RB3',height)+Deval2});
- close -> ignore
- end,
- resize_bind_area(Bi, height, Deval2),
- resize_trace_area(Tr, height, Dtrace),
- config_v();
- true -> ignore
- end.
-
-%% Compute how much the width of each frame must be increased or
-%% decreased in order to adjust to the new window width.
-configure_widths(OldW, NewW, Flags) ->
- {_Bu,Ev,Bi,_Tr} = Flags,
-
- %% Difference between old and new width, considering min window width
- Diff = abs(erlang:max(OldW,330)-erlang:max(NewW,330)),
-
- %% Check how much the frames can be resized in reality
- Limits = if
- %% Window larger
- NewW > OldW ->
- if
- Ev =:= open, Bi =:= open -> {0,Diff,Diff};
- Ev =:= open -> {0,Diff,0};
- Bi =:= open -> {0,0,Diff};
- true -> {Diff,0,0}
- end;
-
- %% Window smaller; get difference between min size
- %% and current size
- OldW>NewW ->
- if
- Ev =:= open, Bi =:= open ->
- {0,
- gs:read('EvalArea',width)-204,
- gs:read('BindArea',width)-112};
- Ev =:= open -> {0,Diff,0};
- Bi =:= open -> {0,0,Diff};
- true -> {Diff,0,0}
- end
- end,
-
- case Limits of
-
- %% No Shell or Bind frame, larger window
- {T,0,0} when NewW > OldW -> {T,0,0};
-
- %% No Shell or Bind frame, smaller window
- {T,0,0} when OldW > NewW -> {-T,0,0};
-
- %% Window larger; divide Diff among the frames and return result
- {_,Sf,B} when NewW > OldW ->
- {_,Sf2,B2} = divide([{0,0},{0,Sf},{0,B}],Diff),
- {Sf2+B2,Sf2,B2};
-
- %% Window smaller; divide Diff among the frames and return
- %% the inverted result (the frames should shrink)
- {_,Sf,B} when OldW>NewW ->
- {_,Sf2,B2} = divide([{0,0},{0,Sf},{0,B}],Diff),
- {-(Sf2+B2),-Sf2,-B2}
- end.
-
-%% Compute how much the height of each frame must be increased or
-%% decreased in order to adjust to the new window height.
-configure_heights(OldH, NewH, Flags) ->
- {_Bu,Ev,Bi,Tr} = Flags,
-
- %% Difference between old and new height, considering min win height
- MinH = min_height(Flags),
- Diff = abs(erlang:max(OldH,MinH)-erlang:max(NewH,MinH)),
-
- %% Check how much the frames can be resized in reality
- {T,Sf,Ff} = if
- %% Window larger
- NewH > OldH ->
- {Diff,
- if
- Ev =:= close, Bi =:= close -> 0;
- true -> Diff
- end,
- if
- Tr =:= open -> Diff;
- true -> 0
- end};
-
- %% Window smaller; get difference between min size
- %% and current size
- OldH > NewH ->
- {gs:read('CodeArea',height)-100,
- if
- Ev =:= close, Bi =:= close -> 0;
- true ->
- if
- Ev =:= open ->
- gs:read('EvalArea',height)-100;
- Bi =:= open ->
- gs:read('BindArea',height)-100
- end
- end,
- if
- Tr =:= open -> gs:read('TraceArea',height)-100;
- true -> 0
- end}
- end,
-
- if
- %% Window larger; divide Diff among the frames and return result
- NewH>OldH -> divide([{0,T},{0,Sf},{0,Ff}],Diff);
-
- %% Window smaller; divide Diff among the frames and return
- %% the inverted result (the frames should shrink)
- OldH>NewH ->
- {T2,Sf2,Ff2} = divide([{0,T},{0,Sf},{0,Ff}],Diff),
- {-T2,-Sf2,-Ff2}
- end.
-
-%% Compute minimum window height
-min_height(Flags) ->
- {Bu,S,Bi,F} = Flags,
- H1 = 25 + 100 + 2, % Upper pad + Trace frame + lower pad
- H2 = H1 + bu(Bu) + s_bi(S,Bi) + f(F),
- H3 = case rb1(Flags) of
- open -> H2+10;
- close -> H2
- end,
- H4 = case rb2(Flags) of
- open -> H3+10;
- close -> H3
- end,
- H4.
-
-bu(close) -> 0;
-bu(open) -> 30.
-
-s_bi(close,close) -> 0;
-s_bi(_,_) -> 100.
-
-f(close) -> 0;
-f(open) -> 100.
-
-%% Try to distribute Diff as evenly as possible between E1, E2 and E3.
-divide([{T,T},{S,S},{F,F}], _Diff) ->
- {T,S,F};
-divide(L, Diff) ->
- [{T,Tmax},{S,Smax},{F,Fmax}] = L,
-
- %% Count how many elements in L can still be filled
- Rem = remaining(L),
-
- %% Divide Diff by Rem
- D = Diff div Rem,
-
- if
- %% All of Diff has been distributed
- D =:= 0 -> {T,S,F};
- true ->
- %% For each element, try to add as much as possible of D
- {NewT,Dt} = divide2(D,T,Tmax),
- {NewS,Ds} = divide2(D,S,Smax),
- {NewF,Df} = divide2(D,F,Fmax),
-
- %% Recur with a list of elements with new current values
- %% and decreased Diff
- divide([{NewT,Tmax},{NewS,Smax},{NewF,Fmax}],
- (Diff rem Rem)+Dt+Ds+Df)
- end.
-
-%% Count the number of 'non-filled' elements in L, ie where Curr<Max.
-remaining([]) -> 0;
-remaining([{Max,Max}|T]) -> remaining(T);
-remaining([_H|T]) -> 1 + remaining(T).
-
-divide2(_Diff, Max, Max) -> {Max,0};
-divide2(Diff, Curr, Max) ->
- New = Curr+Diff,
- if
- New>Max -> {Max,New-Max};
- true -> {New,0}
- end.
-
-%%--Resizing using resize bars----------------------------------------
-%% Motions event will move the ResizeBar accordingly in Win, when
-%% the mouse button is released, the window is reconfigured.
-
-resize(WinInfo, ResizeBar) ->
-
- %% Get window dimensions
- W = gs:read(WinInfo#winInfo.window, width),
- H = gs:read(WinInfo#winInfo.window, height),
-
- %% Call resize loop with min and max for the resize bars derived
- %% from the window dimensions
- resizeloop(WinInfo, ResizeBar, null,
- rblimits('RB1',W,H),
- rblimits('RB2',W,H),
- rblimits('RB3',W,H)).
-
-resizeloop(WI, RB, Prev, {Min1,Max1}, {Min2,Max2}, {Min3,Max3}) ->
- receive
- {gs,_,motion,_,[_,Y]} when RB =:= 'RB1', Y > Min1, Y < Max1 ->
- gs:config('RB1', {y,Y}),
- resizeloop(WI, RB, Y, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
- {gs,_,motion,_,_} when RB =:= 'RB1' ->
- resizeloop(WI, RB, Prev, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
-
- {gs,_,motion,_,[_,Y]} when RB =:= 'RB2', Y > Min2, Y < Max2 ->
- gs:config('RB2', {y,Y}),
- resizeloop(WI, RB, Y, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
- {gs,_,motion,_,_} when RB =:= 'RB2' ->
- resizeloop(WI, RB, Prev, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
-
- {gs,_,motion,_,[X,_]} when RB =:= 'RB3', X > Min3, X < Max3 ->
- gs:config('RB3', {x,X}),
- resizeloop(WI, RB, X, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
- {gs,_,motion,_,_} when RB =:= 'RB3' ->
- resizeloop(WI, RB, Prev, {Min1,Max1}, {Min2,Max2}, {Min3,Max3});
-
- {gs,_,buttonrelease,_,_} ->
- resize_win(WI, RB, Prev)
- end.
-
-resize_win(_WinInfo, _RB, null) -> ignore;
-resize_win(WinInfo, 'RB1', Y) ->
- {_Bu,S,Bi,F} = Flags = WinInfo#winInfo.flags,
- H = gs:read('CodeArea', height),
- Diff = H-(Y-25),
-
- %% Resize Code, Evaluator and Binding areas
- resize_code_area(WinInfo, height, -Diff),
- if
- S =:= close, Bi =:= close, F =:= open ->
- resize_trace_area(open, height, Diff);
- true ->
- resize_eval_area(S, height, Diff),
- resize_bind_area(Bi, height, Diff)
- end,
-
- %% Resize vertical resize bar
- case rb3(Flags) of
- open -> gs:config('RB3', {height,gs:read('RB3',height)+Diff});
- close -> ignore
- end,
-
- %% Adjust the frames y coordinates
- config_v();
-resize_win(WinInfo, 'RB2', Y) ->
- {_Bu,S,Bi,F} = Flags = WinInfo#winInfo.flags,
- Prev = gs:read('TraceArea',y),
- Diff = Prev-(Y+10),
-
- %% Resize Trace, Evaluator and Binding areas
- resize_trace_area(F, height, Diff),
- resize_eval_area(S, height, -Diff),
- resize_bind_area(Bi, height, -Diff),
-
- %% Resize vertical resize bar
- case rb3(Flags) of
- open -> gs:config('RB3', {height,gs:read('RB3',height)-Diff});
- close -> ignore
- end,
-
- %% Adjust the frames y coordinates
- config_v();
-
-resize_win(WinInfo, 'RB3', X) ->
- {_Bu,S,Bi,_F} = WinInfo#winInfo.flags,
- Prev = gs:read('BindArea', x),
- Diff = Prev-(X+10),
-
- %% Resize Binding and Trace areas
- resize_bind_area(Bi, width, Diff),
- resize_eval_area(S, width, -Diff),
-
- %% Adjust the frames x coordinates
- config_h().
-
-%% Given the window dimensions, return the limits for a resize bar.
-rblimits('RB1',_W,H) ->
-
- %% Code frame should not have height <100
- Min = 126,
-
- %% Max is decided by a minimum distance to 'RB2'
- %% unless 'RB2' is invisible and 'CodeArea' is visible
- %% (=> EvalFrame and BindFrame invisible) in which case
- %% TraceFrame should not have height <100
- RB2 = gs:read('RB2',height),
- FF = gs:read('TraceArea',height),
- Max = case RB2 of
- 0 when FF =/= 0 ->
- H-112;
- _ ->
- Y = gs:read('RB2',y),
- erlang:max(Min,Y-140)
- end,
-
- {Min,Max};
-rblimits('RB2',_W,H) ->
- %% TraceFrame should not have height < 100
- Max = H-112,
- %% Min is decided by a minimum distance to 'RB1'
- Y = gs:read('RB1',y),
- Min = erlang:min(Max,Y+140),
- {Min,Max};
-
-rblimits('RB3',W,_H) ->
- %% Neither CodeArea nor BindArea should occupy
- %% less than 1/3 of the total window width and EvalFrame should
- %% be at least 289 pixels wide
- {erlang:max(round(W/3),289),round(2*W/3)}.
-
-
-%%====================================================================
-%% 'Go To Line' and 'Search' help windows
-%%====================================================================
-
-helpwin(gotoline, WinInfo, GS, Coords) ->
- spawn_link(?MODULE, helpwin, [gotoline, WinInfo, GS, Coords,self()]);
-helpwin(search, WinInfo, GS, Coords) ->
- spawn_link(?MODULE, helpwin, [search, WinInfo, GS, Coords, self()]).
-
-helpwin(Type, WinInfo, GS, Coords, AttPid) ->
- {_Mod, Editor} = WinInfo#winInfo.editor,
- Data = case Type of
- gotoline -> null;
- search ->
- {{1, 0}, false}
- end,
- Win = helpwin(Type, GS, Coords),
- helpwin_loop(Type, AttPid, Editor, Data, Win).
-
-helpwin_loop(Type, AttPid, Editor, Data, Win) ->
- receive
- {gs, _Id, destroy, _Data, _Arg} ->
- helpwin_stop(Type, AttPid, Editor, Data),
- true;
-
- {gs, _Id, keypress, _Data, ['Return'|_]} ->
- gs:config(btn(Win), flash),
- Data2 = helpwin_action(Type, default,
- AttPid, Editor, Data, Win),
- helpwin_loop(Type, AttPid, Editor, Data2, Win);
- {gs, _Id, keypress, _Data, _Arg} ->
- helpwin_loop(Type, AttPid, Editor, Data, Win);
-
- {gs, _Id, click, _Data, ["Clear"]} ->
- gs:config(ent(Win), {delete, {0,last}}),
- Data2 = helpwin_clear(Type, AttPid, Editor, Data, Win),
- helpwin_loop(Type, AttPid, Editor, Data2, Win);
- {gs, _Id, click, _Data, ["Close"]} ->
- helpwin_stop(Type, AttPid, Editor, Data),
- true;
- {gs, _Id, click, Action, _Arg} ->
- Data2 =
- helpwin_action(Type, Action, AttPid, Editor, Data, Win),
- helpwin_loop(Type, AttPid, Editor, Data2, Win)
- end.
-
-helpwin_stop(gotoline, _AttPid, _Editor, _Data) ->
- ignore;
-helpwin_stop(search, _AttPid, Editor, {Pos, _CS}) ->
- unmark_string(Editor, Pos).
-
-helpwin_clear(gotoline, _AttPid, _Editor, Data, _Win) ->
- Data;
-helpwin_clear(search, _AttPid, Editor, {Pos, CS}, Win) ->
- unmark_string(Editor, Pos),
- gs:config(lbl(Win), {label, {text,""}}),
- {{1, 0}, CS}.
-
-helpwin_action(gotoline, default, AttPid, _Editor, Data, Win) ->
- case string:strip(gs:read(ent(Win), text)) of
- "" -> ignore;
- Str ->
- case catch list_to_integer(Str) of
- {'EXIT', _Reason} -> ignore;
- Line -> AttPid ! {gui, {gotoline, Line}}
- end
- end,
- Data;
-helpwin_action(search, case_sensitive, _AttPid, _Ed, {Pos, CS}, _Win) ->
- Bool = if CS =:= true -> false; CS =:= false -> true end,
- {Pos, Bool};
-helpwin_action(search, default, _AttPid, Editor, {Pos, CS}, Win) ->
- gs:config(lbl(Win), {label, {text, ""}}),
- unmark_string(Editor, Pos),
- case gs:read(ent(Win), text) of
- "" -> {Pos, CS};
- Str ->
- gs:config(lbl(Win), {label, {text,"Searching..."}}),
- Str2 = lowercase(CS, Str),
- case search(Str2, Editor, gs:read(Editor, size), Pos, CS) of
- {Row, Col} ->
- gs:config(lbl(Win), {label, {text,""}}),
- mark_string(Editor, {Row, Col}, Str),
- {{Row, Col}, CS};
- not_found ->
- gs:config(lbl(Win), {label, {text,"Not found"}}),
- {Pos, CS}
- end
- end.
-
-search(_Str, _Editor, Max, {Row, _Col}, _CS) when Row>Max ->
- not_found;
-search(Str, Editor, Max, {Row, Col}, CS) ->
- SearchIn = lowercase(CS, gs:read(Editor,
- {get,{{Row,Col+1},{Row,lineend}}})),
- case string:str(SearchIn, Str) of
- 0 -> search(Str, Editor, Max, {Row+1, 0}, CS);
- N -> {Row, Col+N}
- end.
-
-lowercase(true, Str) -> Str;
-lowercase(false, Str) ->
- [if Char >= $A, Char =< $Z -> Char+32;
- true -> Char
- end || Char <- Str].
-
-mark_string(Editor, {Row, Col}, Str) ->
- Between = {{Row,Col}, {Row,Col+length(Str)}},
- Font = dbg_ui_win:font(bold),
- gs:config(Editor, [{vscrollpos, Row-5},
- {font_style, {Between, Font}},
- {fg, {Between, red}}]).
-
-unmark_string(Editor, {Row, Col}) ->
- Between = {{Row,Col}, {Row,lineend}},
- Font = dbg_ui_win:font(normal),
- gs:config(Editor, [{vscrollpos, Row-5},
- {font_style, {Between, Font}},
- {fg, {Between, black}}]).
-
-helpwin(Type, GS, {X, Y}) ->
- W = 200, Pad = 10, Wbtn = 50,
-
- Title = case Type of search -> "Search"; gotoline -> "Go To Line" end,
- Win = gs:window(GS, [{title, Title}, {x, X}, {y, Y}, {width, W},
- {destroy, true}]),
-
- Ent = gs:entry(Win, [{x, Pad}, {y, Pad}, {width, W-2*Pad},
- {keypress, true}]),
- Hent = gs:read(Ent, height),
-
- Font = dbg_ui_win:font(normal),
-
- {Ybtn, Lbl} =
- case Type of
- search ->
- Ycb = Pad+Hent,
- gs:checkbutton(Win, [{label, {text, "Case Sensitive"}},
- {font, Font},
- {align, w},
- {x, Pad}, {y, Ycb},
- {width, W-2*Pad}, {height, 15},
- {data, case_sensitive}]),
- Ylbl = Ycb+15,
- {Ylbl+Hent+Pad,
- gs:label(Win, [{x, Pad}, {y, Ylbl},
- {width, W-2*Pad}, {height, Hent}])};
- gotoline -> {Pad+Hent+Pad, null}
- end,
-
- BtnLbl = case Type of search -> "Search"; gotoline -> "Go" end,
- Btn = gs:button(Win, [{label, {text, BtnLbl}}, {font, Font},
- {x, W/2-3/2*Wbtn-Pad}, {y, Ybtn},
- {width, Wbtn}, {height, Hent},
- {data, default}]),
- gs:button(Win, [{label, {text, "Clear"}}, {font, Font},
- {x, W/2-1/2*Wbtn}, {y, Ybtn},
- {width, Wbtn}, {height, Hent}]),
- gs:button(Win, [{label, {text, "Close"}}, {font, Font},
- {x, W/2+1/2*Wbtn+Pad}, {y, Ybtn},
- {width, Wbtn}, {height, Hent}]),
-
- H = Ybtn+Hent+Pad,
- gs:config(Win, [{height, H}, {map, true}]),
- {Ent, Lbl, Btn}.
-
-ent(Win) -> element(1, Win).
-lbl(Win) -> element(2, Win).
-btn(Win) -> element(3, Win).
diff --git a/lib/debugger/src/dbg_ui_view.erl b/lib/debugger/src/dbg_ui_view.erl
deleted file mode 100644
index be998f22ff..0000000000
--- a/lib/debugger/src/dbg_ui_view.erl
+++ /dev/null
@@ -1,255 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_view).
-
-%% External exports
--export([start/2]).
-
--record(state, {gs, % term() Graphics system id
- win, % term() Attach process window data
- coords, % {X,Y} Mouse point position
- mod % atom() Module
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start(GS, Mod)
-%% Mod = atom()
-%%--------------------------------------------------------------------
-start(GS, Mod) ->
- Title = "View Module " ++ atom_to_list(Mod),
- case dbg_ui_winman:is_started(Title) of
- true -> ignore;
- false -> spawn(fun () -> init(GS, Mod, Title) end)
- end.
-
--spec stop() -> no_return().
-stop() ->
- exit(stop).
-
-%%====================================================================
-%% Main loop and message handling
-%%====================================================================
-
-init(GS, Mod, Title) ->
- %% Subscribe to messages from the interpreter
- int:subscribe(),
-
- %% Create attach process window
- Win1 = dbg_ui_trace_win:create_win(GS, Title, ['Code Area'], menus()),
- Window = dbg_ui_trace_win:get_window(Win1),
- dbg_ui_winman:insert(Title, Window),
-
- Win2 = gui_load_module(Win1, Mod),
- Win3 =
- lists:foldl(fun(Break, Win) ->
- dbg_ui_trace_win:add_break(Win, 'Break', Break)
- end,
- Win2,
- int:all_breaks(Mod)),
-
- loop(#state{gs=GS, win=Win3, coords={0,0}, mod=Mod}).
-
-loop(State) ->
- receive
-
- %% From the GUI main window
- GuiEvent when is_tuple(GuiEvent), element(1, GuiEvent)==gs ->
- Cmd = dbg_ui_trace_win:handle_event(GuiEvent, State#state.win),
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the GUI help windows
- {gui, Cmd} ->
- State2 = gui_cmd(Cmd, State),
- loop(State2);
-
- %% From the interpreter
- {int, Cmd} ->
- State2 = int_cmd(Cmd, State),
- loop(State2);
-
- %% From the dbg_ui_winman process (Debugger window manager)
- {dbg_ui_winman, update_windows_menu, Data} ->
- dbg_ui_winman:update_windows_menu(Data),
- loop(State);
- {dbg_ui_winman, destroy} ->
- stop();
-
- %% Help window termination -- ignore
- {'EXIT', _Pid, _Reason} ->
- loop(State)
- end.
-
-%%--Commands from the GUI---------------------------------------------
-
-gui_cmd(ignore, State) ->
- State;
-gui_cmd({win, Win}, State) ->
- State#state{win=Win};
-gui_cmd(stopped, _State) ->
- stop();
-gui_cmd({coords, Coords}, State) ->
- State#state{coords=Coords};
-
-gui_cmd({shortcut, Key}, State) ->
- case shortcut(Key) of
- false -> State;
- Cmd -> gui_cmd(Cmd, State)
- end;
-
-%% File menu
-gui_cmd('Close', _State) ->
- stop();
-
-%% Edit menu
-gui_cmd('Go To Line...', State) ->
- %% Will result in message handled below: {gui, {gotoline, Line}}
- dbg_ui_trace_win:helpwin(gotoline, State#state.win,
- State#state.gs, State#state.coords),
- State;
-gui_cmd({gotoline, Line}, State) ->
- Win = dbg_ui_trace_win:select_line(State#state.win, Line),
- State#state{win=Win};
-gui_cmd('Search...', State) ->
- dbg_ui_trace_win:helpwin(search, State#state.win,
- State#state.gs, State#state.coords),
- State;
-
-%% Break menu
-gui_cmd('Line Break...', State) ->
- add_break(State#state.gs, State#state.coords, line,
- State#state.mod,
- dbg_ui_trace_win:selected_line(State#state.win)),
- State;
-gui_cmd('Conditional Break...', State) ->
- add_break(State#state.gs, State#state.coords, conditional,
- State#state.mod,
- dbg_ui_trace_win:selected_line(State#state.win)),
- State;
-gui_cmd('Function Break...', State) ->
- add_break(State#state.gs, State#state.coords, function,
- State#state.mod, undefined),
- State;
-gui_cmd('Enable All', State) ->
- Breaks = int:all_breaks(),
- ThisMod = State#state.mod,
- lists:foreach(fun ({{Mod, Line}, _Options}) when Mod==ThisMod ->
- int:enable_break(Mod, Line);
- (_Break) ->
- ignore
- end,
- Breaks),
- State;
-gui_cmd('Disable All', State) ->
- Breaks = int:all_breaks(),
- ThisMod = State#state.mod,
- lists:foreach(fun ({{Mod, Line}, _Options}) when Mod==ThisMod ->
- int:disable_break(Mod, Line);
- (_Break) ->
- ignore
- end,
- Breaks),
- State;
-gui_cmd('Delete All', State) ->
- int:no_break(State#state.mod),
- State;
-gui_cmd({break, {Mod, Line}, What}, State) ->
- case What of
- add -> int:break(Mod, Line);
- delete -> int:delete_break(Mod, Line);
- {status, inactive} -> int:disable_break(Mod, Line);
- {status, active} -> int:enable_break(Mod, Line);
- {trigger, Action} -> int:action_at_break(Mod, Line, Action)
- end,
- State;
-
-%% Help menu
-gui_cmd('Debugger', State) ->
- Window = dbg_ui_trace_win:get_window(State#state.win),
- HelpFile = filename:join([code:lib_dir(debugger),
- "doc", "html", "part_frame.html"]),
- tool_utils:open_help(Window, HelpFile),
- State.
-
-add_break(GS, Coords, Type, undefined, _Line) ->
- dbg_ui_break:start(GS, Coords, Type);
-add_break(GS, Coords, Type, Mod, undefined) ->
- dbg_ui_break:start(GS, Coords, Type, Mod);
-add_break(GS, Coords, Type, Mod, Line) ->
- dbg_ui_break:start(GS, Coords, Type, Mod, Line).
-
-%%--Commands from the interpreter-------------------------------------
-
-int_cmd({new_break, {{Mod,_Line},_Options}=Break}, #state{mod=Mod}=State) ->
- Win = dbg_ui_trace_win:add_break(State#state.win, 'Break', Break),
- State#state{win=Win};
-int_cmd({delete_break, {Mod,_Line}=Point}, #state{mod=Mod}=State) ->
- Win = dbg_ui_trace_win:delete_break(State#state.win, Point),
- State#state{win=Win};
-int_cmd({break_options, {{Mod,_Line},_Options}=Break}, #state{mod=Mod}=State) ->
- Win = dbg_ui_trace_win:update_break(State#state.win, Break),
- State#state{win=Win};
-int_cmd(no_break, State) ->
- Win = dbg_ui_trace_win:clear_breaks(State#state.win),
- State#state{win=Win};
-int_cmd({no_break, _Mod}, State) ->
- Win = dbg_ui_trace_win:clear_breaks(State#state.win),
- State#state{win=Win};
-int_cmd(_, State) ->
- State.
-
-
-%%====================================================================
-%% GUI auxiliary functions
-%%====================================================================
-
-menus() ->
- [{'File', [{'Close', 0}]},
- {'Edit', [{'Go To Line...', 0},
- {'Search...', 0}]},
- {'Break', [{'Line Break...', 5},
- {'Conditional Break...', 13},
- {'Function Break...', 0},
- separator,
- {'Enable All', no},
- {'Disable All', no},
- {'Delete All', 0},
- separator]},
- {'Help', [{'Debugger', no}]}].
-
-shortcut(c) -> 'Close';
-shortcut(g) -> 'Go To Line...';
-shortcut(s) -> 'Search...';
-shortcut(b) -> 'Line Break...';
-shortcut(r) -> 'Conditional Break...';
-shortcut(f) -> 'Function Break...';
-shortcut(d) -> 'Delete All';
-
-shortcut(_) -> false.
-
-gui_load_module(Win, Mod) ->
- dbg_ui_trace_win:display({text, "Loading module..."}),
- Contents = int:contents(Mod, any),
- Win2 = dbg_ui_trace_win:show_code(Win, Mod, Contents),
- dbg_ui_trace_win:display({text, ""}),
- Win2.
diff --git a/lib/debugger/src/dbg_ui_win.erl b/lib/debugger/src/dbg_ui_win.erl
deleted file mode 100644
index 1c7a80a1c4..0000000000
--- a/lib/debugger/src/dbg_ui_win.erl
+++ /dev/null
@@ -1,281 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_win).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menu,3}},
- {nowarn_deprecated_function,{gs,menubutton,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,menuitem,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,1}}]).
-
-%% External exports
--export([init/0,
- font/1, min_size/3, min_size/4,
- create_menus/2, select/2, selected/1,
- add_break/2, update_break/2, delete_break/1,
- motion/2
- ]).
-
--record(break, {mb, smi, emi, dimi, demi}).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% init() -> GS
-%% GS = term()
-%%--------------------------------------------------------------------
-init() ->
- gs:start([{kernel, true}]).
-
-%%--------------------------------------------------------------------
-%% font(Style) -> Font
-%% Style = normal | bold
-%% Select a suitable font. Defaults to {screen,12} and, if it does not
-%% exist, {courier,12}.
-%%--------------------------------------------------------------------
-font(Style) ->
- GS = init(),
- Style2 = if
- Style =:= normal -> [];
- true -> [Style]
- end,
- case gs:read(GS, {choose_font, {screen,Style2,12}}) of
- Font when element(1, Font) =:= screen ->
- Font;
- _ ->
- gs:read(GS, {choose_font, {courier,Style2,12}})
- end.
-
-%%--------------------------------------------------------------------
-%% min_size(Strings, MinW, MinH) -> {W, H}
-%% min_size(Font, Strings, MinW, MinH) -> {W, H}
-%% Font = GS font - defaults to dbg_ui_win:font(normal)
-%% Strings = [string()]
-%% MinW = MinH = int()
-%% W = H = int()
-%%--------------------------------------------------------------------
-min_size(Strings, MinW, MinH) ->
- min_size(font(normal), Strings, MinW, MinH).
-
-min_size(Font, Strings, MinW, MinH) ->
- GS = init(),
- min_size(GS, Font, Strings, MinW, MinH).
-
-min_size(GS, Font, [String|Strings], MinW, MinH) ->
- {W, H} = gs:read(GS, {font_wh, {Font, String}}),
- min_size(GS, Font, Strings, erlang:max(MinW, W), erlang:max(MinH, H));
-min_size(_GS, _Font, [], W, H) ->
- {W, H}.
-
-%%--------------------------------------------------------------------
-%% create_menus(MenuBar, [Menu])
-%% MenuBar = gsobj()
-%% Menu = {Name, [Item]}
-%% Name = atom()
-%% Item = {Name, N} | {Name, N, Type} | {Name, N, cascade, [Item]}
-%% | separator
-%% N = no | integer()
-%% Type = check | radio
-%% Create the specified menus and menuitems.
-%%
-%% Normal menuitems are specified as {Name, N}. Generates the event:
-%% {gs, _Id, click, {menuitem, Name}, _Arg}
-%%
-%% Check and radio menuitems are specified as {Name, N, check|radio}.
-%% They are assumed to be children to a cascade menuitem! (And all children
-%% to one cascade menuitem are assumed to be either check OR radio
-%% menuitems)!
-%% Selecting a check/radio menuitem generates the event:
-%% {gs, _Id, click, {menu, Menu}, _Arg}
-%% where Menu is the name of the parent, the cascade menuitem.
-%% Use selected(Menu) to retrieve which check/radio menuitems are
-%% selected.
-%%--------------------------------------------------------------------
-create_menus(MenuBar, [{Title, Items}|Menus]) ->
- Title2 = " "++(atom_to_list(Title))++" ",
- MenuBtn = gs:menubutton(MenuBar, [{label, {text,Title2}},
- {font, font(normal)}]),
- case Title of
- 'Help' -> gs:config(MenuBtn, {side, right});
- _ -> ignore
- end,
- Menu = gs:menu(Title, MenuBtn, []),
- create_items(Menu, Items, Title),
- create_menus(MenuBar, Menus);
-create_menus(_MenuBar, []) ->
- done.
-
-create_items(Menu, [Item|Items], Group) ->
- create_item(Menu, Item, Group),
- create_items(Menu, Items, Group);
-create_items(_Menu, [], _Group) ->
- done.
-
-create_item(Menu, {Name, _N, cascade, Items}, _Group) ->
- MenuBtn = gs:menuitem(Menu, [{label, {text,Name}},
- {font, font(normal)},
- {itemtype, cascade}]),
- SubMenu = gs:menu(Name, MenuBtn, []),
- create_items(SubMenu, Items, Name);
-create_item(Menu, separator, _Group) ->
- gs:menuitem(Menu, [{itemtype, separator}]);
-create_item(Menu, MenuItem, Group) ->
- Options = case MenuItem of
- {Name, N} ->
- [{data, {menuitem,Name}}];
- {Name, N, check} ->
- [{itemtype, check}, {data, {menu, Group}}];
- {Name, N, radio} ->
- [{itemtype, radio}, {data, {menu, Group}},
- {group, group(Group)}]
- end,
- gs:menuitem(Name, Menu, [{label, {text,Name}},
- {font, font(normal)} | Options]),
- if
- is_integer(N) -> gs:config(Name, {underline, N});
- true -> ignore
- end.
-
-%% When grouping radio buttons, the group id must be an atom unique for
-%% each window.
-group(Group) ->
- list_to_atom(atom_to_list(Group)++pid_to_list(self())).
-
-%%--------------------------------------------------------------------
-%% select(MenuItem, Bool)
-%% MenuItem = atom()
-%% Bool = boolean()
-%%--------------------------------------------------------------------
-select(MenuItem, Bool) ->
- gs:config(MenuItem, {select, Bool}).
-
-%%--------------------------------------------------------------------
-%% selected(Menu) -> [Name]
-%% Menu = Name = atom()
-%%--------------------------------------------------------------------
-selected(Menu) ->
- Children = gs:read(Menu, children),
- Selected = [gs:read(Child, select) || Child <- Children],
- lists:map(fun(Child) ->
- {text, Name} = gs:read(Child, label),
- list_to_atom(Name)
- end,
- Selected).
-
-%%--------------------------------------------------------------------
-%% add_break(Name, Point) -> #break{}
-%% Name = atom()
-%% Point = {Mod, Line}
-%% The break will generate the following events:
-%% {gs, _Id, click, {break, Point, Event}, _Arg}
-%% Event = delete | {trigger, Action} | {status, Status}
-%% Action = enable | disable | delete
-%% Status = active | inactive
-%%--------------------------------------------------------------------
-add_break(Menu, Point) ->
- Font = font(normal),
-
- %% Create a name for the breakpoint
- {Mod, Line} = Point,
- Label = io_lib:format("~w ~5w", [Mod, Line]),
-
- %% Create a menu for the breakpoint
- MenuBtn = gs:menuitem(Menu, [{label, {text,Label}}, {font, Font},
- {itemtype, cascade}]),
- SubMenu = gs:menu(MenuBtn, []),
- SMI = gs:menuitem(SubMenu, [{data, {break,Point,null}}]),
- gs:menuitem(SubMenu, [{label, {text,"Delete"}}, {font, Font},
- {data, {break,Point,delete}}]),
- TriggerMenuBtn = gs:menuitem(SubMenu,
- [{label,{text,"Trigger Action"}},
- {font, Font},
- {itemtype, cascade}]),
- TriggerMenu = gs:menu(TriggerMenuBtn, []),
- Group = element(3, erlang:now()),
- EMI = gs:menuitem(TriggerMenu, [{label, {text,"Enable"}},
- {font, Font},
- {itemtype, radio}, {group, Group},
- {data,
- {break,Point,{trigger,enable}}}]),
- DiMI = gs:menuitem(TriggerMenu, [{label, {text,"Disable"}},
- {font, Font},
- {itemtype, radio}, {group, Group},
- {data,
- {break,Point,{trigger,disable}}}]),
- DeMI = gs:menuitem(TriggerMenu, [{label, {text,"Delete"}},
- {font, Font},
- {itemtype, radio}, {group, Group},
- {data,
- {break,Point,{trigger,delete}}}]),
-
- #break{mb=MenuBtn, smi=SMI, emi=EMI, dimi=DiMI, demi=DeMI}.
-
-%%--------------------------------------------------------------------
-%% update_break(Break, Options)
-%% Break = #break{}
-%% Options = [Status, Action, Mods, Cond]
-%% Status = active | inactive
-%% Action = enable | disable | delete
-%% Mods = null (not used)
-%% Cond = null | {Mod, Func}
-%%--------------------------------------------------------------------
-update_break(Break, Options) ->
- [Status, Trigger|_] = Options,
- {break, Point, _Status} = gs:read(Break#break.smi, data),
-
- {Label, Data} = case Status of
- active ->
- {"Disable", {break,Point,{status,inactive}}};
- inactive ->
- {"Enable", {break,Point,{status,active}}}
- end,
- gs:config(Break#break.smi, [{label, {text,Label}},
- {font, font(normal)},
- {data, Data}]),
-
- TriggerMI = case Trigger of
- enable -> Break#break.emi;
- disable -> Break#break.dimi;
- delete -> Break#break.demi
- end,
- gs:config(TriggerMI, {select, true}).
-
-%%--------------------------------------------------------------------
-%% delete_break(Break)
-%% Break = #break{}
-%%--------------------------------------------------------------------
-delete_break(Break) ->
- gs:destroy(Break#break.mb).
-
-%%--------------------------------------------------------------------
-%% motion(X, Y) -> {X, Y}
-%% X = Y = integer()
-%%--------------------------------------------------------------------
-motion(X, Y) ->
- receive
- {gs, _Id, motion, _Data, [NX,NY]} ->
- motion(NX, NY)
- after 0 ->
- {X, Y}
- end.
diff --git a/lib/debugger/src/dbg_ui_winman.erl b/lib/debugger/src/dbg_ui_winman.erl
deleted file mode 100644
index b5433a202b..0000000000
--- a/lib/debugger/src/dbg_ui_winman.erl
+++ /dev/null
@@ -1,182 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(dbg_ui_winman).
--behaviour(gen_server).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,menu,3}},
- {nowarn_deprecated_function,{gs,menubutton,3}},
- {nowarn_deprecated_function,{gs,menuitem,3}}]).
-
-%% External exports
--export([start/0]).
--export([insert/2, is_started/1,
- clear_process/1,
- raise/1,
- windows_menu/1, update_windows_menu/1]).
-
-%% gen_server callbacks
--export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- terminate/2, code_change/3]).
-
--record(win, {owner, % pid()
- title, % string()
- win % gsobj()
- }).
-
--record(state, {wins=[] % [#win{}]
- }).
-
-%%====================================================================
-%% External exports
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% start()
-%%--------------------------------------------------------------------
-start() ->
- gen_server:start({local,?MODULE}, ?MODULE, [], []).
-
-%%--------------------------------------------------------------------
-%% insert(Title, Win)
-%% Title = string()
-%% Win = gsobj()
-%%--------------------------------------------------------------------
-insert(Title, Win) ->
- gen_server:cast(?MODULE, {insert, self(), Title, Win}).
-
-%%--------------------------------------------------------------------
-%% is_started(Title) -> true | false
-%% Title = string()
-%%--------------------------------------------------------------------
-is_started(Title) ->
- case gen_server:call(?MODULE, {is_started, Title}, infinity) of
- {true, Win} ->
- raise(Win),
- true;
- false ->
- false
- end.
-
-%%--------------------------------------------------------------------
-%% clear_process(Title)
-%% Title = string()
-%%--------------------------------------------------------------------
-clear_process(Title) ->
- gen_server:cast(?MODULE, {clear_process, Title}).
-
-%%--------------------------------------------------------------------
-%% raise(Win)
-%% Win = gsobj()
-%%--------------------------------------------------------------------
-raise(Win) ->
- gs:config(Win, [raise, {iconify, false}, {setfocus, true}]).
-
-%%--------------------------------------------------------------------
-%% windows_menu(MenuBar)
-%% MenuBar = gsobj()
-%%--------------------------------------------------------------------
-windows_menu(MenuBar) ->
- gs:menubutton('WindowsMenuBtn', MenuBar,
- [{label,{text," Windows "}},
- {font, dbg_ui_win:font(normal)}]),
- gs:menu('WindowsMenu', 'WindowsMenuBtn', []).
-
-%%--------------------------------------------------------------------
-%% update_windows_menu(Data)
-%% Data = {New, Old}
-%% New = Old = list()
-%%--------------------------------------------------------------------
-update_windows_menu([MonInfo|Infos]) ->
- gs:destroy('WindowsMenu'),
- gs:menu('WindowsMenu', 'WindowsMenuBtn', []),
- menuitem(MonInfo),
- gs:menuitem(separator, 'WindowsMenu', [{itemtype, separator}]),
- lists:foreach(fun(Info) -> menuitem(Info) end, Infos).
-
-menuitem({Title, Win}) ->
- gs:menuitem(Title, 'WindowsMenu', [{label, {text,Title}},
- {font, dbg_ui_win:font(normal)},
- {data, {dbg_ui_winman,Win}}]).
-
-
-%%====================================================================
-%% gen_server callbacks
-%%====================================================================
-
-init(_Arg) ->
- process_flag(trap_exit, true),
- {ok, #state{}}.
-
-handle_call({is_started, Title}, _From, State) ->
- Reply = case lists:keyfind(Title, #win.title, State#state.wins) of
- false -> false;
- Win -> {true, Win#win.win}
- end,
- {reply, Reply, State}.
-
-handle_cast({insert, Pid, Title, Win}, State) ->
- link(Pid),
- Wins = State#state.wins ++ [#win{owner=Pid, title=Title, win=Win}],
- inform_all(Wins),
- {noreply, State#state{wins=Wins}};
-
-handle_cast({clear_process, Title}, State) ->
- OldWins = State#state.wins,
- Wins = case lists:keyfind(Title, #win.title, OldWins) of
- #win{owner=Pid} ->
- Msg = {dbg_ui_winman, destroy},
- Pid ! Msg,
- lists:keydelete(Title, #win.title, OldWins);
- false ->
- OldWins
- end,
- {noreply, State#state{wins=Wins}}.
-
-handle_info({'EXIT', Pid, _Reason}, State) ->
- [Mon | _Wins] = State#state.wins,
- if
- Pid =:= Mon#win.owner -> {stop, normal, State};
- true ->
- Wins2 = lists:keydelete(Pid, #win.owner, State#state.wins),
- inform_all(Wins2),
- {noreply, State#state{wins=Wins2}}
- end.
-
-terminate(_Reason, State) ->
- delete_all(State#state.wins),
- ok.
-
-code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-inform_all(Wins) ->
- Infos = lists:map(fun(#win{title=Title, win=Win}) -> {Title, Win} end,
- Wins),
- Msg = {dbg_ui_winman, update_windows_menu, Infos},
- lists:foreach(fun(#win{owner=Pid}) -> Pid ! Msg end, Wins).
-
-delete_all(Wins) ->
- Msg = {dbg_ui_winman, destroy},
- lists:foreach(fun(#win{owner=Pid}) -> Pid ! Msg end, Wins).
diff --git a/lib/debugger/src/dbg_wx_filedialog_win.erl b/lib/debugger/src/dbg_wx_filedialog_win.erl
index c8ecb7b5d4..ea34295067 100644
--- a/lib/debugger/src/dbg_wx_filedialog_win.erl
+++ b/lib/debugger/src/dbg_wx_filedialog_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -242,16 +242,13 @@ handle_event(#wx{event=#wxList{itemIndex=Index}},
{noreply, State0}
end;
-handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}},
+handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}},
State = #state{ptext=Previous, completion=Comp}) ->
case Previous =:= undefined orelse lists:prefix(Wanted, Previous) of
- true ->
- case Comp of
- {Temp,_} -> wxWindow:destroy(Temp);
- undefined -> ok
- end,
+ true ->
+ destroy_completion(Comp),
{noreply, State#state{ptext=Wanted,completion=undefined}};
- false ->
+ false ->
{noreply, show_completion(Wanted, State)}
end;
@@ -310,8 +307,7 @@ handle_event(#wx{event=#wxSize{size={Width,_}}}, State = #state{list=LC}) ->
end),
{noreply, State};
-handle_event(Event,State) ->
- io:format("~p Got ~p ~n",[self(), Event]),
+handle_event(_Event,State) ->
{noreply, State}.
handle_info(_Msg, State) ->
@@ -419,8 +415,9 @@ show_completion(Wanted, State = #state{text=TC, win=Win, list=LC, completion=Com
end.
destroy_completion(undefined) -> ok;
-destroy_completion({Window, _}) ->
+destroy_completion({Window, _LB}) ->
Parent = wxWindow:getParent(Window),
+ wxWindow:hide(Window),
wxWindow:destroy(Window),
wxWindow:refresh(Parent).
diff --git a/lib/debugger/src/dbg_wx_mon.erl b/lib/debugger/src/dbg_wx_mon.erl
index 4a01492cf5..aed86f5232 100644
--- a/lib/debugger/src/dbg_wx_mon.erl
+++ b/lib/debugger/src/dbg_wx_mon.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -148,7 +148,7 @@ init2(CallingPid, Mode, SFile, GS) ->
win = Win,
focus = undefined,
- coords = {20,20},
+ coords = {-1,-1},
intdir = element(2, file:get_cwd()),
pinfos = [],
@@ -414,7 +414,7 @@ gui_cmd({'Trace Window', TraceWin}, State) ->
State2 = State#state{tracewin=TraceWin},
case State#state.attach of
false -> ignore;
- {Flags, {dbg_ui_trace, start, StartFlags}} ->
+ {Flags, {dbg_wx_trace, start, StartFlags}} ->
case trace_function(State2) of
{_, _, StartFlags} -> ignore;
NewFunction -> % {_, _, NewStartFlags}
diff --git a/lib/debugger/src/dbg_wx_mon_win.erl b/lib/debugger/src/dbg_wx_mon_win.erl
index a617f3e1e7..d94eb14937 100644
--- a/lib/debugger/src/dbg_wx_mon_win.erl
+++ b/lib/debugger/src/dbg_wx_mon_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -43,7 +43,7 @@
-record(moduleInfo, {module, menubtn}).
-record(procInfo, {pid, row}).
-record(breakInfo, {point, status, break}).
--record(break, {mb, smi, emi, dimi, demi}). %% BUGBUG defined in dbg_ui_win
+-record(break, {mb, smi, emi, dimi, demi}).
-record(winInfo, {window, % gsobj()
grid, % gsobj()
row, % int() Last row in grid
@@ -76,13 +76,6 @@
init() ->
dbg_wx_win:init().
-%%--------------------------------------------------------------------
-%% create_win(GS, Title, Menus) -> #winInfo{}
-%% GS = gsobj()
-%% Title = string()
-%% Menus = [menu()] See dbg_ui_win.erl
-%%--------------------------------------------------------------------
-
-define(GRID,1000).
-define(PAD, 5).
@@ -624,8 +617,6 @@ handle_event(#wx{userData=Data,
_WinInfo) ->
Data;
handle_event(_Event, _WinInfo) ->
-%% FIXME
- io:format("Ev: ~p~n",[_Event]),
ignore.
%%====================================================================
diff --git a/lib/debugger/src/dbg_wx_settings.erl b/lib/debugger/src/dbg_wx_settings.erl
index 20aac74c3d..2c332c0a54 100644
--- a/lib/debugger/src/dbg_wx_settings.erl
+++ b/lib/debugger/src/dbg_wx_settings.erl
@@ -65,14 +65,8 @@ open_win(Win, Pos, SFile, Str, What) ->
{style,What}]),
case wxFileDialog:showModal(FD) of
?wxID_OK ->
- case wxFileDialog:getPaths(FD) of
- [NewFile] ->
- wxFileDialog:destroy(FD),
- {ok, NewFile};
- _ ->
- wxFileDialog:destroy(FD),
- cancel
- end;
+ NewFile = wxFileDialog:getPath(FD),
+ {ok, NewFile};
_ ->
wxFileDialog:destroy(FD),
cancel
diff --git a/lib/debugger/src/dbg_wx_trace.erl b/lib/debugger/src/dbg_wx_trace.erl
index 7108b5a79a..4438466bb0 100644
--- a/lib/debugger/src/dbg_wx_trace.erl
+++ b/lib/debugger/src/dbg_wx_trace.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,21 +71,10 @@ start(Pid, TraceWin, BackTrace) ->
start(Pid, TraceWin, BackTrace, ?STRINGS).
start(Pid, TraceWin, BackTrace, Strings) ->
- case {whereis(dbg_wx_mon), whereis(dbg_ui_mon)} of
- {undefined, undefined} ->
- case which_gui() of
- gs ->
- dbg_ui_trace:start(Pid, TraceWin, BackTrace);
- wx ->
- Parent = wx:new(),
- Env = wx:get_env(),
- start(Pid, Env, Parent, TraceWin, BackTrace, Strings)
- end;
- {undefined, Monitor} when is_pid(Monitor) ->
- dbg_ui_trace:start(Pid, TraceWin, BackTrace);
- {Monitor, _} when is_pid(Monitor) ->
+ case whereis(dbg_wx_mon) of
+ Monitor when is_pid(Monitor) ->
Monitor ! {?MODULE, self(), get_env},
- receive
+ receive
{env, Monitor, Env, Parent} ->
start(Pid, Env, Parent, TraceWin, BackTrace, Strings)
end
@@ -110,15 +99,6 @@ start(Pid, Env, Parent, TraceWin, BackTrace, Strings) ->
ignore
end.
-which_gui() ->
- try
- wx:new(),
- wx:destroy(),
- wx
- catch _:_ ->
- gs
- end.
-
%%--------------------------------------------------------------------
%% title(Pid) -> string()
%% By exporting this function, dbg_wx_mon may check with dbg_wx_winman
@@ -145,7 +125,7 @@ init(Pid, Parent, Meta, TraceWin, BackTrace, Strings) ->
dbg_wx_winman:insert(Title, Window),
%% Initial process state
- State1 = #state{win=Win, coords={0,0}, pid=Pid, meta=Meta,
+ State1 = #state{win=Win, coords={-1,-1}, pid=Pid, meta=Meta,
status={idle,null,null},
stack={1,1}, strings=[str_on]},
diff --git a/lib/debugger/src/dbg_wx_view.erl b/lib/debugger/src/dbg_wx_view.erl
index 6242b9d0e0..fc7ffc0d56 100644
--- a/lib/debugger/src/dbg_wx_view.erl
+++ b/lib/debugger/src/dbg_wx_view.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,7 +72,7 @@ init(GS, Env, Mod, Title) ->
Win2,
int:all_breaks(Mod)),
- try loop(#state{gs=GS, win=Win3, coords={0,0}, mod=Mod})
+ try loop(#state{gs=GS, win=Win3, coords={-1,-1}, mod=Mod})
catch _E:normal ->
exit(normal);
_E:_R ->
diff --git a/lib/debugger/src/debugger.app.src b/lib/debugger/src/debugger.app.src
index 807054c983..f102385d39 100644
--- a/lib/debugger/src/debugger.app.src
+++ b/lib/debugger/src/debugger.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,20 +27,6 @@
dbg_iload,
dbg_iserver,
dbg_istk,
- dbg_ui_break,
- dbg_ui_break_win,
- dbg_ui_edit,
- dbg_ui_edit_win,
- dbg_ui_filedialog_win,
- dbg_ui_interpret,
- dbg_ui_mon,
- dbg_ui_mon_win,
- dbg_ui_settings,
- dbg_ui_trace,
- dbg_ui_trace_win,
- dbg_ui_view,
- dbg_ui_win,
- dbg_ui_winman,
dbg_wx_break,
dbg_wx_break_win,
dbg_wx_code,
@@ -59,5 +45,7 @@
i,
int
]},
- {registered, [dbg_iserver, dbg_ui_mon, dbg_ui_winman]},
- {applications, [kernel, stdlib, gs]}]}.
+ {registered, [dbg_iserver, dbg_wx_mon, dbg_wx_winman]},
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","kernel-3.0","erts-6.0",
+ "compiler-5.0"]}]}.
diff --git a/lib/debugger/src/debugger.appup.src b/lib/debugger/src/debugger.appup.src
index 7a435e9b22..81d2fab05a 100644
--- a/lib/debugger/src/debugger.appup.src
+++ b/lib/debugger/src/debugger.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, debugger}]}],
+ [{<<".*">>,[{restart_application, debugger}]}]
+}.
diff --git a/lib/debugger/src/debugger.erl b/lib/debugger/src/debugger.erl
index b97091ee6b..77fd0acb70 100644
--- a/lib/debugger/src/debugger.erl
+++ b/lib/debugger/src/debugger.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,44 +32,38 @@
%% --------
%% Interface module.
%%
-%% dbg_ui_winman
+%% dbg_wx_winman
%% -------------
%% Window manager, keeping track of open windows and Debugger
%% processes.
%%
-%% dbg_ui_mon, dbg_ui_mon_win
+%% dbg_wx_mon, dbg_wx_mon_win
%% --------------------------
%% Monitor window, main window of Debugger, displaying information
%% about interpreted modules and debugged processes.
%%
-%% dbg_ui_trace, dbg_ui_trace_win
+%% dbg_wx_trace, dbg_wx_trace_win
%% ------------------------------
%% Attach process window, showing the code executed by a debugged
%% process and providing a GUI for stepping, inspecting variables etc.
%%
-%% dbg_ui_break, dbg_ui_break_win
+%% dbg_wx_break, dbg_wx_break_win
%% ------------------------------
%% Help window for creating new breakpoints.
%%
-%% dbg_ui_edit, dbg_ui_edit_win
-%% --------------------------------------
-%% Help window for editing terms, used for setting backtrace size
-%% (i.e. how many stack frames to display in the attach process window)
-%% and changing variable values.
-%%
-%% dbg_ui_interpret, dbg_ui_filedialog_win
+%% dbg_wx_interpret, dbg_wx_filedialog_win
%% --------------------------------------
%% Help window for selecting modules to interpret.
%%
-%% dbg_ui_settings, dbg_ui_filedialog_win
+%% dbg_wx_settings, dbg_wx_filedialog_win
%% --------------------------------------
%% Help window for saving and loading Debugger settings.
%%
-%% dbg_ui_view
+%% dbg_wx_view
%% -----------
-%% Help window for viewing interpreted modules (uses dbg_ui_trace_win).
+%% Help window for viewing interpreted modules (uses dbg_wx_trace_win).
%%
-%% dbg_ui_win
+%% dbg_wx_win
%% ----------
%% GUI specific functionality used by more than one window type.
%%
@@ -78,7 +72,7 @@ start() ->
start(global, default, default).
start(Mode) when Mode==local; Mode==global ->
start(Mode, default, default);
-start(Gui) when Gui==gs; Gui==wx ->
+start(Gui) when Gui==wx ->
start(global, default, Gui);
start(SFile) when is_list(SFile), is_integer(hd(SFile)) ->
start(global, SFile, default).
@@ -86,8 +80,6 @@ start(SFile) when is_list(SFile), is_integer(hd(SFile)) ->
start(Mode, SFile) ->
start(Mode, SFile, default).
-start(Mode, SFile, gs) ->
- dbg_ui_mon:start(Mode, SFile);
start(Mode, SFile, wx) ->
dbg_wx_mon:start(Mode, SFile);
start(Mode, SFile, default) ->
@@ -95,7 +87,7 @@ start(Mode, SFile, default) ->
start(Mode, SFile, Gui).
stop() ->
- dbg_ui_mon:stop().
+ dbg_wx_mon:stop().
quick(M, F, A) ->
int:i(M),
@@ -104,15 +96,7 @@ quick(M, F, A) ->
auto_attach(Flags) ->
case which_gui() of
- gs -> int:auto_attach(Flags, {dbg_ui_trace, start, []});
wx -> int:auto_attach(Flags, {dbg_wx_trace, start, []})
end.
-which_gui() ->
- try
- wx:new(),
- wx:destroy(),
- wx
- catch _:_ ->
- gs
- end.
+which_gui() -> wx.
diff --git a/lib/debugger/src/i.erl b/lib/debugger/src/i.erl
index 5805501524..0afb998097 100644
--- a/lib/debugger/src/i.erl
+++ b/lib/debugger/src/i.erl
@@ -250,7 +250,7 @@ ist(Flag) ->
%% -------------------------------------------
iaa(Flag) ->
- iaa(Flag,{dbg_ui_trace,start,[]}).
+ iaa(Flag,{dbg_wx_trace,start,[]}).
%% -------------------------------------------
%% Set the automatic attachment flag.
@@ -271,7 +271,7 @@ iaa(Flag,Fnk) ->
%% -------------------------------------------
ia(Pid) ->
- ia(Pid,{dbg_ui_trace,start}).
+ ia(Pid,{dbg_wx_trace,start}).
%% -------------------------------------------
%% Attach to process.
diff --git a/lib/debugger/src/int.erl b/lib/debugger/src/int.erl
index bdd671cff1..908390ce50 100644
--- a/lib/debugger/src/int.erl
+++ b/lib/debugger/src/int.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -265,9 +265,6 @@ first_lines(Clauses) ->
first_line({clause,_L,_Vars,_,Exprs}) ->
first_line(Exprs);
-%% Common Test adaptation
-first_line([{call_remote,0,ct_line,line,_As}|Exprs]) ->
- first_line(Exprs);
first_line([Expr|_Exprs]) -> % Expr = {Op, Line, ..varying no of args..}
element(2, Expr).
@@ -630,14 +627,13 @@ find_beam(Mod, Src) ->
File = filename:join(SrcDir, BeamFile),
case is_file(File) of
true -> File;
- false -> find_beam_1(Mod, BeamFile, SrcDir)
+ false -> find_beam_1(BeamFile, SrcDir)
end.
-find_beam_1(Mod, BeamFile, SrcDir) ->
+find_beam_1(BeamFile, SrcDir) ->
RootDir = filename:dirname(SrcDir),
EbinDir = filename:join(RootDir, "ebin"),
CodePath = [EbinDir | code:get_path()],
- BeamFile = atom_to_list(Mod) ++ code:objfile_extension(),
lists:foldl(fun(_, Beam) when is_list(Beam) -> Beam;
(Dir, error) ->
File = filename:join(Dir, BeamFile),
diff --git a/lib/debugger/test/Makefile b/lib/debugger/test/Makefile
index 5aa290c61b..9a0ce14ecd 100644
--- a/lib/debugger/test/Makefile
+++ b/lib/debugger/test/Makefile
@@ -44,6 +44,7 @@ MODULES= \
fun_SUITE \
lc_SUITE \
line_number_SUITE \
+ map_SUITE \
record_SUITE \
trycatch_SUITE \
test_lib \
diff --git a/lib/debugger/test/bs_construct_SUITE.erl b/lib/debugger/test/bs_construct_SUITE.erl
index 4870c87d74..8a6798c6ad 100644
--- a/lib/debugger/test/bs_construct_SUITE.erl
+++ b/lib/debugger/test/bs_construct_SUITE.erl
@@ -647,19 +647,27 @@ make_sub_bin(Bin0) ->
%% give the same result.
dynamic(Config) when is_list(Config) ->
- ?line dynamic_1(fun dynamic_big/5),
- ?line dynamic_1(fun dynamic_little/5),
+ Ps = [spawn_monitor(fun() ->
+ dynamic_1(Fun)
+ end) || Fun <- [fun dynamic_big/5,
+ fun dynamic_little/5]],
+ [receive
+ {'DOWN',Ref,process,Pid,normal} ->
+ ok;
+ {'DOWN',Ref,process,Pid,Exit} ->
+ ?t:fail({Pid,Exit})
+ end || {Pid,Ref} <- Ps],
ok.
dynamic_1(Dynamic) ->
- <<Lpad:128>> = erlang:md5([0]),
- <<Rpad:128>> = erlang:md5([1]),
- <<Int:128>> = erlang:md5([2]),
- 8385 = dynamic_2(0, {Int,Lpad,Rpad,Dynamic}, 0).
+ <<Lpad:64,_/binary>> = erlang:md5([0]),
+ <<Rpad:64,_/binary>> = erlang:md5([1]),
+ <<Int:64,_/binary>> = erlang:md5([2]),
+ 2145 = dynamic_2(0, {Int,Lpad,Rpad,Dynamic}, 0).
-dynamic_2(129, _, Count) -> Count;
+dynamic_2(64+1, _, Count) -> Count;
dynamic_2(Bef, Data, Count0) ->
- Count = dynamic_3(Bef, 128-Bef, Data, Count0),
+ Count = dynamic_3(Bef, 64-Bef, Data, Count0),
dynamic_2(Bef+1, Data, Count).
dynamic_3(_, -1, _, Count) -> Count;
@@ -680,13 +688,13 @@ dynamic_big(Bef, N, Int, Lpad, Rpad) ->
<<MaskedInt:N>> = NumBin,
%% Construct the binary in two different ways.
- Bin = id(<<Lpad:Bef,NumBin/bitstring,Rpad:(128-Bef-N)>>),
- Bin = <<Lpad:Bef,Int:N,Rpad:(128-Bef-N)>>,
+ Bin = id(<<Lpad:Bef,NumBin/bitstring,Rpad:(64-Bef-N)>>),
+ Bin = <<Lpad:Bef,Int:N,Rpad:(64-Bef-N)>>,
%% Further verify the result by matching.
LpadMasked = Lpad band ((1 bsl Bef) - 1),
- RpadMasked = Rpad band ((1 bsl (128-Bef-N)) - 1),
- Rbits = (128-Bef-N),
+ RpadMasked = Rpad band ((1 bsl (64-Bef-N)) - 1),
+ Rbits = (64-Bef-N),
<<LpadMasked:Bef,MaskedInt:N,RpadMasked:Rbits>> = id(Bin),
ok.
@@ -696,13 +704,13 @@ dynamic_little(Bef, N, Int, Lpad, Rpad) ->
<<MaskedInt:N/little>> = NumBin,
%% Construct the binary in two different ways.
- Bin = id(<<Lpad:Bef/little,NumBin/bitstring,Rpad:(128-Bef-N)/little>>),
- Bin = <<Lpad:Bef/little,Int:N/little,Rpad:(128-Bef-N)/little>>,
+ Bin = id(<<Lpad:Bef/little,NumBin/bitstring,Rpad:(64-Bef-N)/little>>),
+ Bin = <<Lpad:Bef/little,Int:N/little,Rpad:(64-Bef-N)/little>>,
%% Further verify the result by matching.
LpadMasked = Lpad band ((1 bsl Bef) - 1),
- RpadMasked = Rpad band ((1 bsl (128-Bef-N)) - 1),
- Rbits = (128-Bef-N),
+ RpadMasked = Rpad band ((1 bsl (64-Bef-N)) - 1),
+ Rbits = (64-Bef-N),
<<LpadMasked:Bef/little,MaskedInt:N/little,RpadMasked:Rbits/little>> = id(Bin),
ok.
diff --git a/lib/debugger/test/debugger_SUITE.erl b/lib/debugger/test/debugger_SUITE.erl
index 6f5442e97d..c74550be86 100644
--- a/lib/debugger/test/debugger_SUITE.erl
+++ b/lib/debugger/test/debugger_SUITE.erl
@@ -27,13 +27,13 @@
-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,
- app_test/1,erts_debug/1,encrypted_debug_info/1,
+ app_test/1,appup_test/1,erts_debug/1,encrypted_debug_info/1,
no_abstract_code/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app_test, erts_debug, no_abstract_code,
+ [app_test, appup_test, erts_debug, no_abstract_code,
encrypted_debug_info].
groups() ->
@@ -64,6 +64,9 @@ app_test(Config) when is_list(Config) ->
?line ?t:app_test(debugger),
ok.
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(debugger).
+
erts_debug(Config) when is_list(Config) ->
c:l(erts_debug),
ok.
diff --git a/lib/debugger/test/erl_eval_SUITE.erl b/lib/debugger/test/erl_eval_SUITE.erl
index bb2669f450..ba60ed6fb3 100644
--- a/lib/debugger/test/erl_eval_SUITE.erl
+++ b/lib/debugger/test/erl_eval_SUITE.erl
@@ -39,7 +39,8 @@
otp_8133/1,
funs/1,
try_catch/1,
- eval_expr_5/1]).
+ eval_expr_5/1,
+ eep37/1]).
%%
%% Define to run outside of test server
@@ -63,6 +64,7 @@ config(priv_dir,_) ->
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
init_per_testcase(_Case, Config) ->
+ test_lib:interpret(?MODULE),
?line Dog = ?t:timetrap(?default_timeout),
[{watchdog, Dog} | Config].
end_per_testcase(_Case, Config) ->
@@ -78,7 +80,7 @@ all() ->
pattern_expr, match_bin, guard_3, guard_4, lc,
simple_cases, unary_plus, apply_atom, otp_5269,
otp_6539, otp_6543, otp_6787, otp_6977, otp_7550,
- otp_8133, funs, try_catch, eval_expr_5].
+ otp_8133, funs, try_catch, eval_expr_5, eep37].
groups() ->
[].
@@ -1323,6 +1325,27 @@ eval_expr_5(Config) when is_list(Config) ->
ok
end.
+eep37(Config) when is_list(Config) ->
+ check(fun () -> (fun _(X) -> X end)(42) end,
+ "(fun _(X) -> X end)(42).",
+ 42),
+ check(fun () -> (fun _Id(X) -> X end)(42) end,
+ "(fun _Id(X) -> X end)(42).", 42),
+ check(fun () -> is_function((fun Self() -> Self end)(), 0) end,
+ "is_function((fun Self() -> Self end)(), 0).",
+ true),
+ check(fun () ->
+ F = fun Fact(N) when N > 0 ->
+ N * Fact(N - 1);
+ Fact(0) ->
+ 1
+ end,
+ F(6)
+ end,
+ "(fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end)(6).",
+ 720),
+ ok.
+
%% Check the string in different contexts: as is; in fun; from compiled code.
check(F, String, Result) ->
check1(F, String, Result),
diff --git a/lib/debugger/test/fun_SUITE.erl b/lib/debugger/test/fun_SUITE.erl
index a06cdc7165..8425f973e6 100644
--- a/lib/debugger/test/fun_SUITE.erl
+++ b/lib/debugger/test/fun_SUITE.erl
@@ -24,7 +24,7 @@
init_per_testcase/2,end_per_testcase/2,
init_per_suite/1,end_per_suite/1,
good_call/1,bad_apply/1,bad_fun_call/1,badarity/1,
- ext_badarity/1,otp_6061/1,external/1]).
+ ext_badarity/1,otp_6061/1,external/1,eep37/1]).
%% Internal exports.
-export([nothing/0,call_me/1]).
@@ -48,7 +48,7 @@ end_per_group(_GroupName, Config) ->
cases() ->
[good_call, bad_apply, bad_fun_call, badarity,
- ext_badarity, otp_6061, external].
+ ext_badarity, otp_6061, external, eep37].
init_per_testcase(_Case, Config) ->
test_lib:interpret(?MODULE),
@@ -288,5 +288,18 @@ external(Config) when is_list(Config) ->
call_me(I) ->
{ok,I}.
+eep37(Config) when is_list(Config) ->
+ F = fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end,
+ Add = fun _(N) -> N + 1 end,
+ UnusedName = fun BlackAdder(N) -> N + 42 end,
+ 720 = F(6),
+ 10 = Add(9),
+ 50 = UnusedName(8),
+ [1,1,2,6,24,120] = lists:map(F, lists:seq(0, 5)),
+ {'EXIT',{{badarity,_},_}} = (catch lists:map(fun G() -> G() end, [1])),
+ {'EXIT',{{badarity,_},_}} = (catch F()),
+
+ ok.
+
id(I) ->
I.
diff --git a/lib/debugger/test/int_eval_SUITE.erl b/lib/debugger/test/int_eval_SUITE.erl
index 4ffcf7888e..9d7ef238e3 100644
--- a/lib/debugger/test/int_eval_SUITE.erl
+++ b/lib/debugger/test/int_eval_SUITE.erl
@@ -28,7 +28,7 @@
bifs_outside_erlang/1, spawning/1, applying/1,
catch_and_throw/1, external_call/1, test_module_info/1,
apply_interpreted_fun/1, apply_uninterpreted_fun/1,
- interpreted_exit/1, otp_8310/1, stacktrace/1]).
+ interpreted_exit/1, otp_8310/1, stacktrace/1, maps/1]).
%% Helpers.
-export([applier/3]).
@@ -44,7 +44,7 @@ all() ->
[bifs_outside_erlang, spawning, applying,
catch_and_throw, external_call, test_module_info,
apply_interpreted_fun, apply_uninterpreted_fun,
- interpreted_exit, otp_8310, stacktrace].
+ interpreted_exit, otp_8310, stacktrace, maps].
groups() ->
[].
@@ -291,6 +291,12 @@ stacktrace(Config) when is_list(Config) ->
end,
ok.
+maps(Config) when is_list(Config) ->
+ Fun = fun () -> ?IM:empty_map_update([camembert]) end,
+ {'EXIT',{{badarg,[camembert]},_}} = spawn_eval(Fun),
+ [#{hello := 0, price := 0}] = spawn_eval(fun () -> ?IM:update_in_fun() end),
+ ok.
+
do_eval(Config, Mod) ->
?line DataDir = ?config(data_dir, Config),
diff --git a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
index c5c6a56363..7f55360f48 100644
--- a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
+++ b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
@@ -29,6 +29,7 @@
-export([more_catch/1,more_nocatch/1,exit_me/0]).
-export([f/1, f_try/1, f_catch/1]).
-export([otp_5837/1, otp_8310/0]).
+-export([empty_map_update/1, update_in_fun/0]).
%% Internal exports.
-export([echo/2,my_subtract/2,catch_a_ball/0,throw_a_ball/0]).
@@ -236,4 +237,13 @@ otp_8310() ->
(catch {a, [X || X <- a]}),
{'EXIT',{{bad_generator,b},_}} =
(catch {a, << <<X>> || << X >> <= b >>}),
+ true = begin (X1 = true) andalso X1, X1 end,
+ false = begin (X2 = false) andalso X2, X2 end,
+ true = begin (X3 = true) orelse X3, X3 end,
+ false = begin (X4 = false) orelse X4, X4 end,
ok.
+
+empty_map_update(Map) -> Map#{}.
+
+update_in_fun() ->
+ lists:map(fun (X) -> X#{price := 0} end, [#{hello => 0, price => nil}]).
diff --git a/lib/debugger/test/map_SUITE.erl b/lib/debugger/test/map_SUITE.erl
new file mode 100644
index 0000000000..0076193725
--- /dev/null
+++ b/lib/debugger/test/map_SUITE.erl
@@ -0,0 +1,1003 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(map_SUITE).
+
+%% Copied from map_SUITE in erts.
+
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2
+ ]).
+
+-export([
+ t_build_and_match_literals/1,
+ t_update_literals/1,t_match_and_update_literals/1,
+ t_update_map_expressions/1,
+ t_update_assoc/1,t_update_exact/1,
+ t_guard_bifs/1, t_guard_sequence/1, t_guard_update/1,
+ t_guard_receive/1, t_guard_fun/1,
+ t_list_comprehension/1,
+ t_map_sort_literals/1,
+ %t_size/1,
+ t_map_size/1,
+
+ %% Specific Map BIFs
+ t_bif_map_get/1,
+ t_bif_map_find/1,
+ t_bif_map_is_key/1,
+ t_bif_map_keys/1,
+ t_bif_map_merge/1,
+ t_bif_map_new/1,
+ t_bif_map_put/1,
+ t_bif_map_remove/1,
+ t_bif_map_update/1,
+ t_bif_map_values/1,
+ t_bif_map_to_list/1,
+ t_bif_map_from_list/1,
+
+ %% erlang
+ t_erlang_hash/1,
+ t_map_encode_decode/1,
+
+ %% maps module not bifs
+ t_maps_fold/1,
+ t_maps_map/1,
+ t_maps_size/1,
+ t_maps_without/1,
+
+ %% misc
+ t_pdict/1,
+ t_ets/1,
+ t_dets/1
+ ]).
+
+-include_lib("stdlib/include/ms_transform.hrl").
+
+suite() -> [].
+
+all() -> [
+ t_build_and_match_literals,
+ t_update_literals, t_match_and_update_literals,
+ t_update_map_expressions,
+ t_update_assoc,t_update_exact,
+ t_guard_bifs, t_guard_sequence, t_guard_update,
+ t_guard_receive,t_guard_fun, t_list_comprehension,
+ t_map_sort_literals,
+
+ %% Specific Map BIFs
+ t_bif_map_get,t_bif_map_find,t_bif_map_is_key,
+ t_bif_map_keys, t_bif_map_merge, t_bif_map_new,
+ t_bif_map_put,
+ t_bif_map_remove, t_bif_map_update,
+ t_bif_map_values,
+ t_bif_map_to_list, t_bif_map_from_list,
+
+ %% erlang
+ t_erlang_hash, t_map_encode_decode,
+ t_map_size,
+
+ %% maps module
+ t_maps_fold, t_maps_map,
+ t_maps_size, t_maps_without,
+
+
+ %% Other functions
+ t_pdict,
+ t_ets
+ ].
+
+groups() -> [].
+
+init_per_suite(Config) ->
+ test_lib:interpret(?MODULE),
+ Config.
+
+end_per_suite(_Config) -> ok.
+
+init_per_group(_GroupName, Config) -> Config.
+end_per_group(_GroupName, Config) -> Config.
+
+%% tests
+
+t_build_and_match_literals(Config) when is_list(Config) ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% error case
+ %V = 32,
+ %{'EXIT',{{badmatch,_},_}} = (catch (#{<<"hi all">> => 1} = id(#{<<"hi",V,"all">> => 1}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ ok.
+
+
+%% Tests size(Map).
+%% not implemented, perhaps it shouldn't be either
+
+%t_size(Config) when is_list(Config) ->
+% 0 = size(#{}),
+% 1 = size(#{a=>1}),
+% 1 = size(#{a=>#{a=>1}}),
+% 2 = size(#{a=>1, b=>2}),
+% 3 = size(#{a=>1, b=>2, b=>"3"}),
+% ok.
+
+t_map_size(Config) when is_list(Config) ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+% test map updates without matching
+t_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
+
+% test map updates with matching
+t_match_and_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+
+t_update_map_expressions(Config) when is_list(Config) ->
+ M = maps:new(),
+ #{ a := 1 } = M#{a => 1},
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{{badarg,<<>>},_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{{badarg,[]},_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+
+t_update_assoc(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{{badarg,BadMap},_}} = (catch BadMap#{nonexisting=>val}),
+
+ ok.
+
+t_update_exact(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ %% M2 = M0#{3=>wrong,3.0:=new}, %% FIXME
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+
+ ok.
+
+t_guard_bifs(Config) when is_list(Config) ->
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ ok.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+t_guard_sequence(Config) when is_list(Config) ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+
+t_guard_update(Config) when is_list(Config) ->
+ error = map_guard_update(#{},#{}),
+ first = map_guard_update(#{}, #{x=>first}),
+ second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
+map_guard_update(_, _) -> error.
+
+t_guard_receive(Config) when is_list(Config) ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
+
+
+t_list_comprehension(Config) when is_list(Config) ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
+
+t_guard_fun(Config) when is_list(Config) ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} = (catch F1(#{s=>none,v=>none})),
+ ok.
+
+
+t_map_sort_literals(Config) when is_list(Config) ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = #{ a => 1 } < id(#{ b => 1}),
+ false = #{ b => 1 } < id(#{ a => 1}),
+ true = #{ a => 1, b => 1, c => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ b => 1, c => 1, d => 1 } > id(#{ a => 1, b => 1, c => 1}),
+ true = #{ c => 1, b => 1, a => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ "a" => 1 } < id(#{ <<"a">> => 1}),
+ false = #{ <<"a">> => 1 } < id(#{ "a" => 1}),
+ false = #{ 1 => 1 } < id(#{ 1.0 => 1}),
+ false = #{ 1.0 => 1 } < id(#{ 1 => 1}),
+
+ %% value order
+ true = #{ a => 1 } < id(#{ a => 2}),
+ false = #{ a => 2 } < id(#{ a => 1}),
+ false = #{ a => 2, b => 1 } < id(#{ a => 1, b => 3}),
+ true = #{ a => 1, b => 1 } < id(#{ a => 1, b => 3}),
+
+ true = #{ "a" => "hi", b => 134 } == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+%% BIFs
+t_bif_map_get(Config) when is_list(Config) ->
+
+ 1 = maps:get(a, #{ a=> 1}),
+ 2 = maps:get(b, #{ a=> 1, b => 2}),
+ "hi" = maps:get("hello", #{ a=>1, "hello" => "hi"}),
+ "tuple hi" = maps:get({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ "v4" = maps:get(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,[])),
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,<<>>)),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get({1,1}, #{{1,1.0} => "tuple"})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{ b=>1, c=>2})),
+ ok.
+
+t_bif_map_find(Config) when is_list(Config) ->
+
+ {ok, 1} = maps:find(a, #{ a=> 1}),
+ {ok, 2} = maps:find(b, #{ a=> 1, b => 2}),
+ {ok, "int"} = maps:find(1, #{ 1 => "int"}),
+ {ok, "float"} = maps:find(1.0, #{ 1.0=> "float"}),
+
+ {ok, "hi"} = maps:find("hello", #{ a=>1, "hello" => "hi"}),
+ {ok, "tuple hi"} = maps:find({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ {ok, "v4"} = maps:find(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ error = maps:find(a,#{}),
+ error = maps:find(a,#{b=>1, c=>2}),
+ error = maps:find(1.0, #{ 1 => "int"}),
+ error = maps:find(1, #{ 1.0 => "float"}),
+ error = maps:find({1.0,1}, #{ a=>a, {1,1.0} => "tuple hi"}), % reverse types in tuple key
+
+
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id([]))),
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id(<<>>))),
+ ok.
+
+
+t_bif_map_is_key(Config) when is_list(Config) ->
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(int, M1),
+ true = maps:is_key(<<"key">>, M1),
+ true = maps:is_key(4, M1),
+
+ false = maps:is_key(5, M1),
+ false = maps:is_key(<<"key2">>, M1),
+ false = maps:is_key("h", M1),
+ false = maps:is_key("hello", M1),
+ false = maps:is_key(atom, M1),
+ false = maps:is_key(any, id(#{})),
+
+ false = maps:is_key("hi", maps:remove("hi", M1)),
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(1, maps:put(1, "number", M1)),
+ false = maps:is_key(1.0, maps:put(1, "number", M1)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id([]))),
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id(<<>>))),
+ ok.
+
+t_bif_map_keys(Config) when is_list(Config) ->
+ [] = maps:keys(#{}),
+
+ [1,2,3,4,5] = maps:keys(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [1,2,3,4,5] = maps:keys(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ [4,int,"hi",<<"key">>] = maps:keys(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(154)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(atom)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys([])),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(<<>>)),
+ ok.
+
+t_bif_map_new(Config) when is_list(Config) ->
+ #{} = maps:new(),
+ 0 = erlang:map_size(maps:new()),
+ ok.
+
+t_bif_map_merge(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:merge(#{},#{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(#{}, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(M0, #{}),
+
+ M1 = #{ "hi" => "hello again", float => 3.3, {1,2} => "tuple", 4 => integer },
+
+ #{4 := number, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello", <<"key">> := <<"value">>} = maps:merge(M1,M0),
+
+ #{4 := integer, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello again", <<"key">> := <<"value">>} = maps:merge(M0,M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge((1 bsl 65 + 3), <<>>)),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(<<>>, id(#{ a => 1}))),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(id(#{ a => 2}), <<>> )),
+
+ ok.
+
+
+t_bif_map_put(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = #{ "hi" := "hello"} = maps:put("hi", "hello", #{}),
+
+ ["hi"] = maps:keys(M1),
+ ["hello"] = maps:values(M1),
+
+ M2 = #{ int := 3 } = maps:put(int, 3, M1),
+
+ [int,"hi"] = maps:keys(M2),
+ [3,"hello"] = maps:values(M2),
+
+ M3 = #{ <<"key">> := <<"value">> } = maps:put(<<"key">>, <<"value">>, M2),
+
+ [int,"hi",<<"key">>] = maps:keys(M3),
+ [3,"hello",<<"value">>] = maps:values(M3),
+
+ M4 = #{ 18446744073709551629 := wat } = maps:put(18446744073709551629, wat, M3),
+
+ [18446744073709551629,int,"hi",<<"key">>] = maps:keys(M4),
+ [wat,3,"hello",<<"value">>] = maps:values(M4),
+
+ M0 = #{ 4 := number } = M5 = maps:put(4, number, M4),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M5),
+ [number,wat,3,"hello",<<"value">>] = maps:values(M5),
+
+ M6 = #{ <<"key">> := <<"other value">> } = maps:put(<<"key">>, <<"other value">>, M5),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M6),
+ [number,wat,3,"hello",<<"other value">>] = maps:values(M6),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,154)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,atom)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,[])),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,<<>>)),
+ ok.
+
+t_bif_map_remove(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:remove(some_key, #{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = maps:remove("hi", M0),
+ [4,18446744073709551629,int,<<"key">>] = maps:keys(M1),
+ [number,wat,3,<<"value">>] = maps:values(M1),
+
+ M2 = maps:remove(int, M1),
+ [4,18446744073709551629,<<"key">>] = maps:keys(M2),
+ [number,wat,<<"value">>] = maps:values(M2),
+
+ M3 = maps:remove(<<"key">>, M2),
+ [4,18446744073709551629] = maps:keys(M3),
+ [number,wat] = maps:values(M3),
+
+ M4 = maps:remove(18446744073709551629, M3),
+ [4] = maps:keys(M4),
+ [number] = maps:values(M4),
+
+ M5 = maps:remove(4, M4),
+ [] = maps:keys(M5),
+ [] = maps:values(M5),
+
+ M0 = maps:remove(5,M0),
+ M0 = maps:remove("hi there",M0),
+
+ #{ "hi" := "hello", int := 3, 4 := number} = maps:remove(18446744073709551629,maps:remove(<<"key">>,M0)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,154)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,atom)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,[])),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,<<>>)),
+ ok.
+
+t_bif_map_update(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello again", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update("hi", "hello again", M0),
+
+ #{ "hi" := "hello", int := 1337, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(int, 1337, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"new value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(<<"key">>, <<"new value">>, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := integer, 18446744073709551629 := wat} = maps:update(4, integer, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wazzup} = maps:update(18446744073709551629, wazzup, M0),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,{})),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,<<"value">>)),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(5,none,M0)),
+
+ ok.
+
+
+
+t_bif_map_values(Config) when is_list(Config) ->
+
+ [] = maps:values(#{}),
+
+ [a,b,c,d,e] = maps:values(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [a,b,c,d,e] = maps:values(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ M2 = M1#{ "hi" => "hello2", <<"key">> => <<"value2">> },
+ [number,3,"hello2",<<"value2">>] = maps:values(M2),
+ [number,3,"hello",<<"value">>] = maps:values(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(atom)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values([])),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(<<>>)),
+ ok.
+
+t_erlang_hash(Config) when is_list(Config) ->
+
+ ok = t_bif_erlang_phash2(),
+ ok = t_bif_erlang_phash(),
+ ok = t_bif_erlang_hash(),
+
+ ok.
+
+t_bif_erlang_phash2() ->
+
+ 39679005 = erlang:phash2(#{}),
+ 78942764 = erlang:phash2(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 }),
+ 37338230 = erlang:phash2(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} }),
+ 14363616 = erlang:phash2(#{ 1 => a }),
+ 51612236 = erlang:phash2(#{ a => 1 }),
+
+ 37468437 = erlang:phash2(#{{} => <<>>}),
+ 44049159 = erlang:phash2(#{<<>> => {}}),
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 118679416 = erlang:phash2(M0),
+ 51612236 = erlang:phash2(M1),
+ 118679416 = erlang:phash2(M2),
+ ok.
+
+t_bif_erlang_phash() ->
+ Sz = 1 bsl 32,
+ 268440612 = erlang:phash(#{},Sz),
+ 1196461908 = erlang:phash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 3944426064 = erlang:phash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 1394238263 = erlang:phash(#{ 1 => a },Sz),
+ 4066388227 = erlang:phash(#{ a => 1 },Sz),
+
+ 1578050717 = erlang:phash(#{{} => <<>>},Sz),
+ 1578050717 = erlang:phash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 3590546636 = erlang:phash(M0,Sz),
+ 4066388227 = erlang:phash(M1,Sz),
+ 3590546636 = erlang:phash(M2,Sz),
+ ok.
+
+t_bif_erlang_hash() ->
+ Sz = 1 bsl 27 - 1,
+ 5158 = erlang:hash(#{},Sz),
+ 71555838 = erlang:hash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 5497225 = erlang:hash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 126071654 = erlang:hash(#{ 1 => a },Sz),
+ 126426236 = erlang:hash(#{ a => 1 },Sz),
+
+ 101655720 = erlang:hash(#{{} => <<>>},Sz),
+ 101655720 = erlang:hash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 38260486 = erlang:hash(M0,Sz),
+ 126426236 = erlang:hash(M1,Sz),
+ 38260486 = erlang:hash(M2,Sz),
+ ok.
+
+
+t_map_encode_decode(Config) when is_list(Config) ->
+ <<131,116,0,0,0,0>> = erlang:term_to_binary(#{}),
+ Pairs = [
+ {a,b},{"key","values"},{<<"key">>,<<"value">>},
+ {1,b},{[atom,1],{<<"wat">>,1,2,3}},
+ {aa,"values"},
+ {1 bsl 64 + (1 bsl 50 - 1), sc1},
+ {99, sc2},
+ {1 bsl 65 + (1 bsl 51 - 1), sc3},
+ {88, sc4},
+ {1 bsl 66 + (1 bsl 52 - 1), sc5},
+ {77, sc6},
+ {1 bsl 67 + (1 bsl 53 - 1), sc3},
+ {75, sc6}, {-10,sc8},
+ {<<>>, sc9}, {3.14158, sc10},
+ {[3.14158], sc11}, {more_atoms, sc12},
+ {{more_tuples}, sc13}, {self(), sc14},
+ {{},{}},{[],[]}
+ ],
+ ok = map_encode_decode_and_match(Pairs,[],#{}),
+
+ %% check sorting
+
+ %% literally #{ b=>2, a=>1 } in the internal order
+ #{ a:=1, b:=2 } =
+ erlang:binary_to_term(<<131,116,0,0,0,2,100,0,1,98,97,2,100,0,1,97,97,1>>),
+
+
+ %% literally #{ "hi" => "value", a=>33, b=>55 } in the internal order
+ #{ a:=33, b:=55, "hi" := "value"} = erlang:binary_to_term(<<131,116,0,0,0,3,
+ 107,0,2,104,105, % "hi" :: list()
+ 107,0,5,118,97,108,117,101, % "value" :: list()
+ 100,0,1,97, % a :: atom()
+ 97,33, % 33 :: integer()
+ 100,0,1,98, % b :: atom()
+ 97,55 % 55 :: integer()
+ >>),
+
+
+ %% error cases
+ %% template: <<131,116,0,0,0,2,100,0,1,97,100,0,1,98,97,1,97,1>>
+ %% which is: #{ a=>1, b=>1 }
+
+ %% uniqueness violation
+ %% literally #{ a=>1, "hi"=>"value", a=>2 }
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,3,100,0,1,97,107,0,2,104,105,100,0,1,97,97,1,107,0,5,118,97,108,117,101,97,2>>)),
+
+ %% bad size (too large)
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,12,100,0,1,97,100,0,1,98,97,1,97,1>>)),
+
+ %% bad size (too small) .. should fail just truncate it .. weird.
+ %% possibly change external format so truncated will be #{a:=1}
+ #{ a:=b } =
+ erlang:binary_to_term(<<131,116,0,0,0,1,100,0,1,97,100,0,1,98,97,1,97,1>>),
+
+ ok.
+
+map_encode_decode_and_match([{K,V}|Pairs], EncodedPairs, M0) ->
+ M1 = maps:put(K,V,M0),
+ B0 = erlang:term_to_binary(M1),
+ Ls = lists:sort(fun(A,B) -> erts_internal:cmp_term(A,B) < 0 end, [{K, erlang:term_to_binary(K), erlang:term_to_binary(V)}|EncodedPairs]),
+ %% sort Ks and Vs according to term spec, then match it
+ KVbins = lists:foldr(fun({_,Kbin,Vbin}, Acc) -> [Kbin,Vbin | Acc] end, [], Ls),
+ ok = match_encoded_map(B0, length(Ls), KVbins),
+ %% decode and match it
+ M1 = erlang:binary_to_term(B0),
+ map_encode_decode_and_match(Pairs,Ls,M1);
+map_encode_decode_and_match([],_,_) -> ok.
+
+match_encoded_map(<<131,116,Size:32,Encoded/binary>>,Size,Items) ->
+ match_encoded_map(Encoded,Items);
+match_encoded_map(_,_,_) -> no_match_size.
+
+match_encoded_map(<<>>,[]) -> ok;
+match_encoded_map(Bin,[<<131,Item/binary>>|Items]) ->
+ Size = erlang:byte_size(Item),
+ <<EncodedTerm:Size/binary, Bin1/binary>> = Bin,
+ EncodedTerm = Item, %% Asssert
+ match_encoded_map(Bin1,Items).
+
+
+t_bif_map_to_list(Config) when is_list(Config) ->
+ [] = maps:to_list(#{}),
+ [{a,1},{b,2}] = maps:to_list(#{a=>1,b=>2}),
+ [{a,1},{b,2},{c,3}] = maps:to_list(#{c=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3}] = maps:to_list(#{g=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3},{"c",4}] = maps:to_list(#{g=>3,a=>1,b=>2,"c"=>4}),
+ [{3,v2},{hi,v4},{{hi,3},v5},{"hi",v3},{<<"hi">>,v1}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5}),
+
+ [{3,v7},{hi,v9},{{hi,3},v10},{"hi",v8},{<<"hi">>,v6}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5,
+ <<"hi">>=>v6,3=>v7,"hi"=>v8,hi=>v9,{hi,3}=>v10}),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(42))),
+ ok.
+
+
+t_bif_map_from_list(Config) when is_list(Config) ->
+ #{} = maps:from_list([]),
+ A = maps:from_list([]),
+ 0 = erlang:map_size(A),
+
+ #{a:=1,b:=2} = maps:from_list([{a,1},{b,2}]),
+ #{c:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{c,3}]),
+ #{g:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{g,3}]),
+
+ #{a:=2} = maps:from_list([{a,1},{a,3},{a,2}]),
+
+ #{ <<"hi">>:=v1,3:=v3,"hi":=v6,hi:=v4,{hi,3}:=v5} =
+ maps:from_list([{3,v3},{"hi",v6},{hi,v4},{{hi,3},v5},{<<"hi">>,v1}]),
+
+ #{<<"hi">>:=v6,3:=v8,"hi":=v11,hi:=v9,{hi,3}:=v10} =
+ maps:from_list([ {{hi,3},v3}, {"hi",v0},{3,v1}, {<<"hi">>,v4}, {hi,v2},
+ {<<"hi">>,v6}, {{hi,3},v10},{"hi",v11}, {hi,v9}, {3,v8}]),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},b]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},{b,b,3}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},<<>>]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b}|{b,a}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(42))),
+ ok.
+
+%% Maps module, not BIFs
+t_maps_fold(_Config) ->
+ Vs = lists:seq(1,100),
+ M = maps:from_list([{{k,I},{v,I}}||I<-Vs]),
+
+ %% fold
+ 5050 = maps:fold(fun({k,_},{v,V},A) -> V + A end, 0, M),
+
+ ok.
+
+t_maps_map(_Config) ->
+ Vs = lists:seq(1,100),
+ M1 = maps:from_list([{I,I}||I<-Vs]),
+ M2 = maps:from_list([{I,{token,I}}||I<-Vs]),
+
+ M2 = maps:map(fun(_K,V) -> {token,V} end, M1),
+ ok.
+
+t_maps_size(_Config) ->
+ Vs = lists:seq(1,100),
+ lists:foldl(fun(I,M) ->
+ M1 = maps:put(I,I,M),
+ I = maps:size(M1),
+ M1
+ end, #{}, Vs),
+ ok.
+
+
+t_maps_without(_Config) ->
+ Ki = [11,22,33,44,55,66,77,88,99],
+ M0 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100)]),
+ M1 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100) -- Ki]),
+ M1 = maps:without([{k,I}||I <- Ki],M0),
+ ok.
+
+
+%% MISC
+t_pdict(_Config) ->
+
+ put(#{ a => b, b => a},#{ c => d}),
+ put(get(#{ a => b, b => a}),1),
+ 1 = get(#{ c => d}),
+ #{ c := d } = get(#{ a => b, b => a}).
+
+t_ets(_Config) ->
+
+ Tid = ets:new(map_table,[]),
+
+ [ets:insert(Tid,{maps:from_list([{I,-I}]),I}) || I <- lists:seq(1,100)],
+
+
+ [{#{ 2 := -2},2}] = ets:lookup(Tid,#{ 2 => -2 }),
+
+ %% Test equal
+ [3,4] = lists:sort(
+ ets:select(Tid,[{{'$1','$2'},
+ [{'or',{'==','$1',#{ 3 => -3 }},
+ {'==','$1',#{ 4 => -4 }}}],
+ ['$2']}])),
+ %% Test match
+ [30,50] = lists:sort(
+ ets:select(Tid,
+ [{{#{ 30 => -30}, '$1'},[],['$1']},
+ {{#{ 50 => -50}, '$1'},[],['$1']}]
+ )),
+
+ ets:insert(Tid,{#{ a => b, b => c, c => a},transitivity}),
+
+ %% Test equal with map of different size
+ [] = ets:select(Tid,[{{'$1','_'},[{'==','$1',#{ b => c }}],['$_']}]),
+
+ %% Test match with map of different size
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => c },'_'},[],['$_']}]),
+
+ %%% Test match with don't care value
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => '_' },'_'},[],['$_']}]),
+
+ %% Test is_map bif
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{not_a_map,2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{{nope,a,tuple},2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+
+ %% Test map_size bif
+ [3] = ets:select(Tid,[{{'$1','_'},[{'==',{map_size,'$1'},3}],
+ [{map_size,'$1'}]}]),
+
+ true = ets:delete(Tid,#{50 => -50}),
+ [] = ets:lookup(Tid,#{50 => -50}),
+
+ ets:delete(Tid),
+ ok.
+
+t_dets(_Config) ->
+ ok.
+
+getmsg(_Tracer) ->
+ receive V -> V after 100 -> timeout end.
+
+trace_collector(Msg,Parent) ->
+ io:format("~p~n",[Msg]),
+ Parent ! Msg,
+ Parent.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/debugger/vsn.mk b/lib/debugger/vsn.mk
index a245e26a55..b82f0f4e37 100644
--- a/lib/debugger/vsn.mk
+++ b/lib/debugger/vsn.mk
@@ -1 +1 @@
-DEBUGGER_VSN = 3.2.12
+DEBUGGER_VSN = 4.0.3
diff --git a/lib/dialyzer/doc/manual.txt b/lib/dialyzer/doc/manual.txt
index d519ac960b..29c9518d84 100644
--- a/lib/dialyzer/doc/manual.txt
+++ b/lib/dialyzer/doc/manual.txt
@@ -125,7 +125,7 @@ The exit status of the command line version is:
Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
[-I include_dir]* [--output_plt file] [-Wwarn]*
- [--src] [--gui | --wx] [files_or_dirs] [-r dirs]
+ [--src] [--gui] [files_or_dirs] [-r dirs]
[--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
@@ -234,9 +234,7 @@ Options:
--fullpath
Display the full path names of files for which warnings are emitted.
--gui
- Use the gs-based GUI.
- --wx
- Use the wx-based GUI.
+ Use the GUI.
Note:
* denotes that multiple occurrences of these options are possible.
diff --git a/lib/dialyzer/doc/src/book.xml b/lib/dialyzer/doc/src/book.xml
index ec06427671..61b873fb5b 100644
--- a/lib/dialyzer/doc/src/book.xml
+++ b/lib/dialyzer/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/dialyzer/doc/src/dialyzer.xml b/lib/dialyzer/doc/src/dialyzer.xml
index 0ac96e8ac9..e482b1e6f8 100644
--- a/lib/dialyzer/doc/src/dialyzer.xml
+++ b/lib/dialyzer/doc/src/dialyzer.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2006</year><year>2013</year>
+ <year>2006</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -50,33 +50,31 @@
<p>Dialyzer also has a command line version for automated use. Below is a
brief description of the list of its options. The same information can
be obtained by writing</p>
- <code type="none"><![CDATA[
- dialyzer --help
- ]]></code>
+ <code type="none">
+ dialyzer --help</code>
<p>in a shell. Please refer to the GUI description for more details on
the operation of Dialyzer.</p>
<p>The exit status of the command line version is:</p>
- <code type="none"><![CDATA[
+ <code type="none">
0 - No problems were encountered during the analysis and no
warnings were emitted.
1 - Problems were encountered during the analysis.
- 2 - No problems were encountered, but warnings were emitted.
- ]]></code>
+ 2 - No problems were encountered, but warnings were emitted.</code>
<p>Usage:</p>
- <code type="none"><![CDATA[
+ <code type="none">
dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
- [-I include_dir]* [--output_plt file] [-Wwarn]*
- [--src] [--gui | --wx] [files_or_dirs] [-r dirs]
+ [-I include_dir]* [--output_plt file] [-Wwarn]* [--raw]
+ [--src] [--gui] [files_or_dirs] [-r dirs]
[--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
- [--no_native] [--fullpath]
- ]]></code>
+ [--dump_callgraph file] [--no_native] [--fullpath]
+ [--statistics]</code>
<p>Options:</p>
<taglist>
<tag><c><![CDATA[files_or_dirs]]></c> (for backwards compatibility also
- as: <c><![CDATA[-c files_or_dirs]]></c></tag>
+ as: <c><![CDATA[-c files_or_dirs]]></c>)</tag>
<item>Use Dialyzer from the command line to detect defects in the
specified files or directories containing <c><![CDATA[.erl]]></c> or
<c><![CDATA[.beam]]></c> files, depending on the type of the
@@ -88,16 +86,14 @@
analysis.</item>
<tag><c><![CDATA[--apps applications]]></c></tag>
<item>Option typically used when building or modifying a plt as in:
- <code type="none"><![CDATA[
- dialyzer --build_plt --apps erts kernel stdlib mnesia ...
- ]]></code>
+ <code type="none">
+ dialyzer --build_plt --apps erts kernel stdlib mnesia ...</code>
to conveniently refer to library applications corresponding to the
Erlang/OTP installation. However, the option is general and can also
be used during analysis in order to refer to Erlang/OTP applications.
In addition, file or directory names can also be included, as in:
- <code type="none"><![CDATA[
- dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
- ]]></code></item>
+ <code type="none">
+ dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam</code></item>
<tag><c><![CDATA[-o outfile]]></c> (or
<c><![CDATA[--output outfile]]></c>)</tag>
<item>When using Dialyzer from the command line, send the analysis
@@ -129,19 +125,16 @@
that the plts are disjoint (i.e., do not have any module
appearing in more than one plt).
The plts are created in the usual way:
- <code type="none"><![CDATA[
+ <code type="none">
dialyzer --build_plt --output_plt plt_1 files_to_include
...
- dialyzer --build_plt --output_plt plt_n files_to_include
- ]]></code>
+ dialyzer --build_plt --output_plt plt_n files_to_include</code>
and then can be used in either of the following ways:
- <code type="none"><![CDATA[
- dialyzer files_to_analyze --plts plt_1 ... plt_n
- ]]></code>
+ <code type="none">
+ dialyzer files_to_analyze --plts plt_1 ... plt_n</code>
or:
- <code type="none"><![CDATA[
- dialyzer --plts plt_1 ... plt_n -- files_to_analyze
- ]]></code>
+ <code type="none">
+ dialyzer --plts plt_1 ... plt_n -- files_to_analyze</code>
(Note the -- delimiter in the second case)</item>
<tag><c><![CDATA[-Wwarn]]></c></tag>
<item>A family of options which selectively turn on/off warnings
@@ -204,9 +197,7 @@
<tag><c><![CDATA[--fullpath]]></c></tag>
<item>Display the full path names of files for which warnings are emitted.</item>
<tag><c><![CDATA[--gui]]></c></tag>
- <item>Use the gs-based GUI.</item>
- <tag><c><![CDATA[--wx]]></c></tag>
- <item>Use the wx-based GUI.</item>
+ <item>Use the GUI.</item>
</taglist>
<note>
<p>* denotes that multiple occurrences of these options are possible.</p>
@@ -222,8 +213,6 @@
<item>Suppress warnings for unused functions.</item>
<tag><c><![CDATA[-Wno_improper_lists]]></c></tag>
<item>Suppress warnings for construction of improper lists.</item>
- <tag><c><![CDATA[-Wno_tuple_as_fun]]></c></tag>
- <item>Suppress warnings for using tuples instead of funs.</item>
<tag><c><![CDATA[-Wno_fun_app]]></c></tag>
<item>Suppress warnings for fun applications that will fail.</item>
<tag><c><![CDATA[-Wno_match]]></c></tag>
@@ -231,9 +220,16 @@
match.</item>
<tag><c><![CDATA[-Wno_opaque]]></c></tag>
<item>Suppress warnings for violations of opaqueness of data types.</item>
- <tag><c><![CDATA[-Wno_behaviours]]></c>***</tag>
+ <tag><c><![CDATA[-Wno_fail_call]]></c></tag>
+ <item>Suppress warnings for failing calls.</item>
+ <tag><c><![CDATA[-Wno_contracts]]></c></tag>
+ <item>Suppress warnings about invalid contracts.</item>
+ <tag><c><![CDATA[-Wno_behaviours]]></c></tag>
<item>Suppress warnings about behaviour callbacks which drift from the
published recommended interfaces.</item>
+ <tag><c><![CDATA[-Wno_undefined_callbacks]]></c></tag>
+ <item>Suppress warnings about behaviours that have no
+ <c>-callback</c> attributes for their callbacks.</item>
<tag><c><![CDATA[-Wunmatched_returns]]></c>***</tag>
<item>Include warnings for function calls which ignore a structured return
value or do not match against one of many possible return
@@ -242,7 +238,10 @@
<item>Include warnings for functions that only return by means of an
exception.</item>
<tag><c><![CDATA[-Wrace_conditions]]></c>***</tag>
- <item>Include warnings for possible race conditions.</item>
+ <item>Include warnings for possible race conditions. Note that the
+ analysis that finds data races performs intra-procedural data flow analysis
+ and can sometimes explode in time. Enable it at your own risk.
+ </item>
<tag><c><![CDATA[-Wunderspecs]]></c>***</tag>
<item>Warn about underspecified functions
(the -spec is strictly more allowing than the success typing).</item>
@@ -280,13 +279,13 @@
</type>
<desc>
<p>Dialyzer GUI version.</p>
- <code type="none"><![CDATA[
+ <code type="none">
OptList :: [Option]
Option :: {files, [Filename :: string()]}
| {files_rec, [DirName :: string()]}
| {defines, [{Macro: atom(), Value : term()}]}
- | {from, src_code | byte_code} %% Defaults to byte_code
- | {init_plt, FileName :: string()} %% If changed from default
+ | {from, src_code | byte_code} %% Defaults to byte_code
+ | {init_plt, FileName :: string()} %% If changed from default
| {plts, [FileName :: string()]} %% If changed from default
| {include_dirs, [DirName :: string()]}
| {output_file, FileName :: string()}
@@ -306,14 +305,15 @@ WarnOpts :: no_return
| no_match
| no_opaque
| no_fail_call
+ | no_contracts
+ | no_behaviours
+ | no_undefined_callbacks
+ | unmatched_returns
| error_handling
| race_conditions
- | behaviours
- | unmatched_returns
| overspecs
| underspecs
- | specdiffs
- ]]></code>
+ | specdiffs</code>
</desc>
</func>
<func>
@@ -325,17 +325,30 @@ WarnOpts :: no_return
</type>
<desc>
<p>Dialyzer command line version.</p>
- <code type="none"><![CDATA[
+ <code type="none">
Warnings :: [{Tag, Id, Msg}]
-Tag :: 'warn_return_no_exit' | 'warn_return_only_exit'
- | 'warn_not_called' | 'warn_non_proper_list'
- | 'warn_fun_app' | 'warn_matching'
- | 'warn_failing_call' | 'warn_contract_types'
- | 'warn_contract_syntax' | 'warn_contract_not_equal'
- | 'warn_contract_subtype' | 'warn_contract_supertype'
+Tag :: 'warn_behaviour'
+ | 'warn_bin_construction'
+ | 'warn_callgraph'
+ | 'warn_contract_not_equal'
+ | 'warn_contract_range'
+ | 'warn_contract_subtype'
+ | 'warn_contract_supertype'
+ | 'warn_contract_syntax'
+ | 'warn_contract_types'
+ | 'warn_failing_call'
+ | 'warn_fun_app'
+ | 'warn_matching'
+ | 'warn_non_proper_list'
+ | 'warn_not_called'
+ | 'warn_opaque'
+ | 'warn_race_condition'
+ | 'warn_return_no_exit'
+ | 'warn_return_only_exit'
+ | 'warn_umatched_return'
+ | 'warn_undefined_callbacks'
Id = {File :: string(), Line :: integer()}
-Msg = msg() -- Undefined
-]]></code>
+Msg = msg() -- Undefined</code>
</desc>
</func>
<func>
diff --git a/lib/dialyzer/doc/src/dialyzer_chapter.xml b/lib/dialyzer/doc/src/dialyzer_chapter.xml
index be75f1cc65..2626e19050 100644
--- a/lib/dialyzer/doc/src/dialyzer_chapter.xml
+++ b/lib/dialyzer/doc/src/dialyzer_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/dialyzer/doc/src/fascicules.xml b/lib/dialyzer/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/dialyzer/doc/src/fascicules.xml
+++ b/lib/dialyzer/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml
index 70ebee678c..8976679c1d 100644
--- a/lib/dialyzer/doc/src/notes.xml
+++ b/lib/dialyzer/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,294 @@
<p>This document describes the changes made to the Dialyzer
application.</p>
+<section><title>Dialyzer 2.7.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> A bug concerning <c>map()</c> types has been fixed.
+ </p>
+ <p>
+ Own Id: OTP-12472</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Dialyzer 2.7.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> When compiling Erlang source, Dialyzer now ignores
+ the environment variable ERL_COMPILER_OPTIONS as well as
+ skips the Erlang Compiler option
+ <c>warnings_as_errors</c>. </p>
+ <p>
+ Own Id: OTP-12225</p>
+ </item>
+ <item>
+ <p> Dialyzer did not check the type of record elements
+ when updating them. The bug, introduced in Erlang/OTP
+ 17.1, has been corrected. (Thanks to Nicolas Dudebout for
+ pointing it out.) </p>
+ <p>
+ Own Id: OTP-12319</p>
+ </item>
+ <item>
+ <p>
+ Coalesce map keys in dialyzer mode</p>
+ <p>
+ This fixes a regression introduced in commit
+ 805f9c89fc01220bc1bb0f27e1b68fd4eca688ba The problem
+ occurred with compounded map keys compiled with dialyzer
+ option turned on, '+dialyzer'.</p>
+ <p>
+ Reported by: Ivan Uemlianin</p>
+ <p>
+ Own Id: OTP-12347</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Dialyzer 2.7.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> A bug concerning <c>is_record/2,3</c> has been fixed,
+ as well as some cases where Dialyzer could crash due to
+ reaching system limits. </p>
+ <p>
+ Own Id: OTP-12018</p>
+ </item>
+ <item>
+ <p> When given the <c>-Wunderspecs</c> flag Dialyzer
+ sometimes output bogus warnings for parametrized types.
+ This bug has been fixed. </p>
+ <p>
+ Own Id: OTP-12111</p>
+ </item>
+ <item>
+ <p>Dialyzer now fetch the compile options from beam
+ files, and use them when creating core from the abstract
+ code. Previously the options were ignored. </p>
+ <p>
+ Own Id: OTP-12150</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Dialyzer 2.7.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Fix a bug concerning opaque types. Thanks to Shayan
+ Pooya for pointing out the bug.</p>
+ <p>
+ Own Id: OTP-11869</p>
+ </item>
+ <item>
+ <p> A bug where Dialyzer failed to handle typed records
+ with fields containing remote types has been fixed.
+ Thanks to Erik Søe Sørensen for reporting the bug. </p>
+ <p>
+ Own Id: OTP-11918</p>
+ </item>
+ <item>
+ <p> Make sure that only literal records are checked
+ against the types of record definitions. Until now the
+ elements of tuples have been checked against record field
+ types if the tag och size of the tuple matches the record
+ definition, often with surprising results. </p>
+ <p>
+ Own Id: OTP-11935 Aux Id: seq12590 </p>
+ </item>
+ <item>
+ <p>
+ A Dialyzer crash involving analysis of Map types has now
+ been fixed.</p>
+ <p>
+ Own Id: OTP-11947</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Dialyzer 2.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Dialyzer will no longer emit warnings when inspecting
+ or modifying opaque types within the scope of a module.
+ </p> <p> Hitherto the shape of terms (tuple, list, etc.)
+ has been used to determine the opaque terms, but now the
+ contracts are used for decorating types with opaqueness.
+ </p>
+ <p>
+ Own Id: OTP-10397</p>
+ </item>
+ <item>
+ <p>
+ With <c>--Wunmatched_returns</c>, dialyzer will no longer
+ warn when the value of a list comprehension is ignored,
+ provided that the each value in the list would be an
+ atomic value (such as integer or atoms, as opposed to
+ tuples and lists). Example: ignoring '<c>[io:format(...)
+ || ...]</c>' will not cause a warning, while ignoring
+ '<c>[file:close(Fd) || ...]</c>' will.</p>
+ <p>
+ Own Id: OTP-11626</p>
+ </item>
+ <item>
+ <p>
+ The man page for dialyzer now contains correct
+ information regarding -Wno_behaviours. (Thanks to Steve
+ Vinosky.)</p>
+ <p>
+ Own Id: OTP-11706</p>
+ </item>
+ <item>
+ <p> Fix handling of 'on_load' attribute. (Thanks to
+ Kostis Sagonas.) </p>
+ <p>
+ Own Id: OTP-11743</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p> The generalization of guard constraints has been
+ modified. </p>
+ <p>
+ Own Id: OTP-11798 Aux Id: seq12547 </p>
+ </item>
+ <item>
+ <p> Dialyzer now plays nicely with funs that come as
+ "external" arguments. (Thanks to Stavros Aronis for
+ fixing the bug.) </p>
+ <p>
+ Own Id: OTP-11826</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see Map Expressions in the
+ <seealso marker="doc/reference_manual:expressions#map_expressions">
+ Reference Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p> Parameterized opaque types have been introduced. </p>
+ <p>
+ Own Id: OTP-11625</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Dialyzer 2.6.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/dialyzer/doc/src/part.xml b/lib/dialyzer/doc/src/part.xml
index 564ef3a52f..83289206f9 100644
--- a/lib/dialyzer/doc/src/part.xml
+++ b/lib/dialyzer/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/dialyzer/doc/src/part_notes.xml b/lib/dialyzer/doc/src/part_notes.xml
index 992ee73daa..3798d25315 100644
--- a/lib/dialyzer/doc/src/part_notes.xml
+++ b/lib/dialyzer/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/dialyzer/doc/src/ref_man.xml b/lib/dialyzer/doc/src/ref_man.xml
index 7e5367b7c5..23e7b6f57d 100644
--- a/lib/dialyzer/doc/src/ref_man.xml
+++ b/lib/dialyzer/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/dialyzer/src/Makefile b/lib/dialyzer/src/Makefile
index bb2edd419a..91fbdca5bd 100644
--- a/lib/dialyzer/src/Makefile
+++ b/lib/dialyzer/src/Makefile
@@ -57,7 +57,6 @@ MODULES = \
dialyzer_dataflow \
dialyzer_dep \
dialyzer_explanation \
- dialyzer_gui \
dialyzer_gui_wx \
dialyzer_options \
dialyzer_plt \
@@ -89,7 +88,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
ifeq ($(NATIVE_LIBS_ENABLED),yes)
ERL_COMPILE_FLAGS += +native
endif
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_unused_import +warn_untyped_record +warn_missing_spec +warnings_as_errors
+ERL_COMPILE_FLAGS += +warn_export_vars +warn_unused_import +warn_untyped_record +warn_missing_spec +warnings_as_errors
# ----------------------------------------------------
# Targets
@@ -113,9 +112,6 @@ $(EBIN)/dialyzer_cl_parse.$(EMULATOR): dialyzer_cl_parse.erl ../vsn.mk
$(EBIN)/dialyzer_plt.$(EMULATOR): dialyzer_plt.erl ../vsn.mk
$(erlc_verbose)erlc -W $(ERL_COMPILE_FLAGS) -DVSN="\"v$(VSN)\"" -o$(EBIN) dialyzer_plt.erl
-$(EBIN)/dialyzer_gui.$(EMULATOR): dialyzer_gui.erl ../vsn.mk
- $(erlc_verbose)erlc -W $(ERL_COMPILE_FLAGS) -DVSN="\"v$(VSN)\"" -o$(EBIN) dialyzer_gui.erl
-
$(EBIN)/dialyzer_gui_wx.$(EMULATOR): dialyzer_gui_wx.erl ../vsn.mk
$(erlc_verbose)erlc -W $(ERL_COMPILE_FLAGS) -DVSN="\"v$(VSN)\"" -o$(EBIN) dialyzer_gui_wx.erl
@@ -140,7 +136,6 @@ $(EBIN)/dialyzer_contracts.beam: dialyzer.hrl
$(EBIN)/dialyzer_dataflow.beam: dialyzer.hrl
$(EBIN)/dialyzer_dep.beam: dialyzer.hrl
$(EBIN)/dialyzer_explanation.beam: dialyzer.hrl
-$(EBIN)/dialyzer_gui.beam: dialyzer.hrl
$(EBIN)/dialyzer_gui_wx.beam: dialyzer.hrl dialyzer_gui_wx.hrl
$(EBIN)/dialyzer_options.beam: dialyzer.hrl
$(EBIN)/dialyzer_plt.beam: dialyzer.hrl
diff --git a/lib/dialyzer/src/dialyzer.app.src b/lib/dialyzer/src/dialyzer.app.src
index 9222a28a77..1756800c4f 100644
--- a/lib/dialyzer/src/dialyzer.app.src
+++ b/lib/dialyzer/src/dialyzer.app.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,17 +29,22 @@
dialyzer_cl_parse,
dialyzer_codeserver,
dialyzer_contracts,
+ dialyzer_coordinator,
dialyzer_dataflow,
dialyzer_dep,
dialyzer_explanation,
- dialyzer_gui,
dialyzer_gui_wx,
dialyzer_options,
dialyzer_plt,
dialyzer_races,
dialyzer_succ_typings,
dialyzer_typesig,
- dialyzer_utils]},
+ dialyzer_utils,
+ dialyzer_timing,
+ dialyzer_worker]},
{registered, []},
{applications, [compiler, gs, hipe, kernel, stdlib, wx]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","syntax_tools-1.6.14","stdlib-2.0",
+ "kernel-3.0","hipe-3.10.3","erts-6.0",
+ "compiler-5.0"]}]}.
diff --git a/lib/dialyzer/src/dialyzer.appup.src b/lib/dialyzer/src/dialyzer.appup.src
index 26d14ee8f4..1e293e407a 100644
--- a/lib/dialyzer/src/dialyzer.appup.src
+++ b/lib/dialyzer/src/dialyzer.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,6 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, dialyzer}]}],
+ [{<<".*">>,[{restart_application, dialyzer}]}]
+}.
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 822aa0826a..cec94a49fd 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -62,18 +62,18 @@ plain_cl() ->
cl_halt(cl_check_init(Opts), Opts);
{plt_info, Opts} ->
cl_halt(cl_print_plt_info(Opts), Opts);
- {{gui, Type}, Opts} ->
+ {gui, Opts} ->
try check_gui_options(Opts)
catch throw:{dialyzer_error, Msg} -> cl_error(Msg)
end,
case Opts#options.check_plt of
true ->
case cl_check_init(Opts#options{get_warnings = false}) of
- {ok, _} -> gui_halt(internal_gui(Type, Opts), Opts);
+ {ok, _} -> gui_halt(internal_gui(Opts), Opts);
{error, _} = Error -> cl_halt(Error, Opts)
end;
false ->
- gui_halt(internal_gui(Type, Opts), Opts)
+ gui_halt(internal_gui(Opts), Opts)
end;
{cl, Opts} ->
case Opts#options.check_plt of
@@ -172,19 +172,16 @@ run(Opts) ->
end,
case dialyzer_cl:start(OptsRecord) of
{?RET_DISCREPANCIES, Warnings} -> Warnings;
- {?RET_NOTHING_SUSPICIOUS, []} -> []
+ {?RET_NOTHING_SUSPICIOUS, _} -> []
end
catch
throw:{dialyzer_error, ErrorMsg} ->
erlang:error({dialyzer_error, lists:flatten(ErrorMsg)})
end.
-internal_gui(Type, OptsRecord) ->
+internal_gui(OptsRecord) ->
F = fun() ->
- case Type of
- gs -> dialyzer_gui:start(OptsRecord);
- wx -> dialyzer_gui_wx:start(OptsRecord)
- end,
+ dialyzer_gui_wx:start(OptsRecord),
?RET_NOTHING_SUSPICIOUS
end,
doit(F).
@@ -205,7 +202,7 @@ gui(Opts) ->
case cl_check_init(OptsRecord) of
{ok, ?RET_NOTHING_SUSPICIOUS} ->
F = fun() ->
- dialyzer_gui:start(OptsRecord)
+ dialyzer_gui_wx:start(OptsRecord)
end,
case doit(F) of
{ok, _} -> ok;
@@ -426,6 +423,9 @@ message_to_string({call_without_opaque, [M, F, Args, ExpectedTriples]}) ->
message_to_string({opaque_eq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for equality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
+message_to_string({opaque_guard, [Arg1, Infix, Arg2, ArgNs]}) ->
+ io_lib:format("Guard test ~s ~s ~s contains ~s\n",
+ [Arg1, Infix, Arg2, form_positions(ArgNs)]);
message_to_string({opaque_guard, [Guard, Args]}) ->
io_lib:format("Guard test ~w~s breaks the opaqueness of its argument\n",
[Guard, Args]);
@@ -438,8 +438,15 @@ message_to_string({opaque_match, [Pat, OpaqueType, OpaqueTerm]}) ->
message_to_string({opaque_neq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for inequality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
-message_to_string({opaque_type_test, [Fun, Opaque]}) ->
- io_lib:format("The type test ~s(~s) breaks the opaqueness of the term ~s\n", [Fun, Opaque, Opaque]);
+message_to_string({opaque_type_test, [Fun, Args, Arg, ArgType]}) ->
+ io_lib:format("The type test ~s~s breaks the opaqueness of the term ~s~s\n",
+ [Fun, Args, Arg, ArgType]);
+message_to_string({opaque_size, [SizeType, Size]}) ->
+ io_lib:format("The size ~s breaks the opaqueness of ~s\n",
+ [SizeType, Size]);
+message_to_string({opaque_call, [M, F, Args, Culprit, OpaqueType]}) ->
+ io_lib:format("The call ~s:~s~s breaks the opaqueness of the term ~s :: ~s\n",
+ [M, F, Args, Culprit, OpaqueType]);
%%----- Warnings for concurrency errors --------------------
message_to_string({race_condition, [M, F, Args, Reason]}) ->
io_lib:format("The call ~w:~w~s ~s\n", [M, F, Args, Reason]);
@@ -466,7 +473,14 @@ message_to_string({callback_missing, [B, F, A]}) ->
io_lib:format("Undefined callback function ~w/~w (behaviour '~w')\n",
[F, A, B]);
message_to_string({callback_info_missing, [B]}) ->
- io_lib:format("Callback info about the ~w behaviour is not available\n", [B]).
+ io_lib:format("Callback info about the ~w behaviour is not available\n", [B]);
+%%----- Warnings for unknown functions, types, and behaviours -------------
+message_to_string({unknown_type, {M, F, A}}) ->
+ io_lib:format("Unknown type ~w:~w/~w", [M, F, A]);
+message_to_string({unknown_function, {M, F, A}}) ->
+ io_lib:format("Unknown function ~w:~w/~w", [M, F, A]);
+message_to_string({unknown_behaviour, B}) ->
+ io_lib:format("Unknown behaviour ~w", [B]).
%%-----------------------------------------------------------------------------
%% Auxiliary functions below
@@ -549,4 +563,4 @@ form_position_string(ArgNs) ->
ordinal(1) -> "1st";
ordinal(2) -> "2nd";
ordinal(3) -> "3rd";
-ordinal(N) when is_integer(N) -> io_lib:format("~wth",[N]).
+ordinal(N) when is_integer(N) -> io_lib:format("~wth", [N]).
diff --git a/lib/dialyzer/src/dialyzer.hrl b/lib/dialyzer/src/dialyzer.hrl
index 105a174e31..9a25f86512 100644
--- a/lib/dialyzer/src/dialyzer.hrl
+++ b/lib/dialyzer/src/dialyzer.hrl
@@ -2,7 +2,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%%
%%% The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
@@ -58,6 +58,7 @@
-define(WARN_RACE_CONDITION, warn_race_condition).
-define(WARN_BEHAVIOUR, warn_behaviour).
-define(WARN_UNDEFINED_CALLBACK, warn_undefined_callbacks).
+-define(WARN_UNKNOWN, warn_unknown).
%%
%% The following type has double role:
@@ -73,7 +74,7 @@
| ?WARN_CONTRACT_SUPERTYPE | ?WARN_CALLGRAPH
| ?WARN_UNMATCHED_RETURN | ?WARN_RACE_CONDITION
| ?WARN_BEHAVIOUR | ?WARN_CONTRACT_RANGE
- | ?WARN_UNDEFINED_CALLBACK.
+ | ?WARN_UNDEFINED_CALLBACK | ?WARN_UNKNOWN.
%%
%% This is the representation of each warning as they will be returned
@@ -88,12 +89,6 @@
-type dial_error() :: any(). %% XXX: underspecified
%%--------------------------------------------------------------------
-%% THIS TYPE SHOULD ONE DAY DISAPPEAR -- IT DOES NOT BELONG HERE
-%%--------------------------------------------------------------------
-
--type ordset(T) :: [T] . %% XXX: temporarily
-
-%%--------------------------------------------------------------------
%% Basic types used either in the record definitions below or in other
%% parts of the application
%%--------------------------------------------------------------------
@@ -143,7 +138,7 @@
init_plts = [] :: [file:filename()],
include_dirs = [] :: [file:filename()],
output_plt = none :: 'none' | file:filename(),
- legal_warnings = ordsets:new() :: ordset(dial_warn_tag()),
+ legal_warnings = ordsets:new() :: ordsets:ordset(dial_warn_tag()),
report_mode = normal :: rep_mode(),
erlang_mode = false :: boolean(),
use_contracts = true :: boolean(),
@@ -167,4 +162,4 @@
dialyzer_timing:end_stamp(Server),
Var
end).
--define(timing(Server, Msg, Expr),?timing(Server, Msg, _T, Expr)).
+-define(timing(Server, Msg, Expr), ?timing(Server, Msg, _T, Expr)).
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 0fbaf1d47c..af1c2b7e3a 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -2,7 +2,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,6 +39,8 @@
one_file_result/0,
compile_result/0]).
+-export_type([no_warn_unused/0]).
+
-include("dialyzer.hrl").
-record(analysis_state,
@@ -48,7 +50,7 @@
defines = [] :: [dial_define()],
doc_plt :: dialyzer_plt:plt(),
include_dirs = [] :: [file:filename()],
- no_warn_unused :: set(),
+ no_warn_unused :: no_warn_unused(),
parent :: pid(),
plt :: dialyzer_plt:plt(),
start_from = byte_code :: start_from(),
@@ -59,6 +61,8 @@
-record(server_state, {parent :: pid(), legal_warnings :: [dial_warn_tag()]}).
+-type no_warn_unused() :: sets:set(mfa()).
+
%%--------------------------------------------------------------------
%% Main
%%--------------------------------------------------------------------
@@ -168,7 +172,7 @@ analysis_start(Parent, Analysis) ->
throw:{error, _ErrorMsg} = Error -> exit(Error)
end,
NewPlt0 = dialyzer_plt:insert_types(Plt, dialyzer_codeserver:get_records(NewCServer)),
- ExpTypes = dialyzer_codeserver:get_exported_types(NewCServer),
+ ExpTypes = dialyzer_codeserver:get_exported_types(NewCServer),
NewPlt1 = dialyzer_plt:insert_exported_types(NewPlt0, ExpTypes),
State0 = State#analysis_state{plt = NewPlt1},
dump_callgraph(Callgraph, State0, Analysis),
@@ -245,7 +249,7 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
timing_server = Timing,
parent = Parent} = State) ->
send_log(Parent, "Reading files and computing callgraph... "),
- {T1, _} = statistics(runtime),
+ {T1, _} = statistics(wall_clock),
Callgraph = dialyzer_callgraph:new(),
CompileInit = make_compile_init(State, Callgraph),
{{Failed, NoWarn, Modules}, NextLabel} =
@@ -268,13 +272,13 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
[[Reason || {_Filename, Reason} <- Failed]]),
exit({error, Msg})
end,
- {T2, _} = statistics(runtime),
+ {T2, _} = statistics(wall_clock),
Msg1 = io_lib:format("done in ~.2f secs\nRemoving edges... ", [(T2-T1)/1000]),
send_log(Parent, Msg1),
Callgraph =
?timing(Timing, "clean", _C2,
cleanup_callgraph(State, CServer2, Callgraph, Modules)),
- {T3, _} = statistics(runtime),
+ {T3, _} = statistics(wall_clock),
Msg2 = io_lib:format("done in ~.2f secs\n", [(T3-T2)/1000]),
send_log(Parent, Msg2),
{Callgraph, sets:from_list(NoWarn), CServer2}.
@@ -369,7 +373,16 @@ compile_byte(File, Callgraph, CServer, UseContracts) ->
{error, " Could not get abstract code for: " ++ File ++ "\n" ++
" Recompile with +debug_info or analyze starting from source code"};
{ok, AbstrCode} ->
- compile_common(File, AbstrCode, [], Callgraph, CServer, UseContracts)
+ compile_byte(File, AbstrCode, Callgraph, CServer, UseContracts)
+ end.
+
+compile_byte(File, AbstrCode, Callgraph, CServer, UseContracts) ->
+ case dialyzer_utils:get_compile_options_from_beam(File) of
+ error ->
+ {error, " Could not get compile options for: " ++ File ++ "\n" ++
+ " Recompile or analyze starting from source code"};
+ {ok, CompOpts} ->
+ compile_common(File, AbstrCode, CompOpts, Callgraph, CServer, UseContracts)
end.
compile_common(File, AbstrCode, CompOpts, Callgraph, CServer, UseContracts) ->
@@ -423,11 +436,8 @@ abs_get_nowarn(Abs, M) ->
false ->
[{M, F, A} || {function, _, F, A, _} <- Abs]; % all functions
true ->
- OnLoad =
- lists:flatten([{M, F, A} || {attribute, _, on_load, {F, A}} <- Abs]),
- OnLoad ++ [{M, F, A} ||
- {nowarn_unused_function, FAs} <- Opts,
- {F, A} <- lists:flatten([FAs])]
+ [{M, F, A} || {nowarn_unused_function, FAs} <- Opts,
+ {F, A} <- lists:flatten([FAs])]
end.
get_exported_types_from_core(Core) ->
@@ -619,9 +629,9 @@ dump_callgraph(CallGraph, State, #analysis{callgraph_file = File} = Analysis) ->
Extension = filename:extension(File),
Start_Msg = io_lib:format("Dumping the callgraph... ", []),
send_log(State#analysis_state.parent, Start_Msg),
- {T1, _} = statistics(runtime),
+ {T1, _} = statistics(wall_clock),
dump_callgraph(CallGraph, State, Analysis, Extension),
- {T2, _} = statistics(runtime),
+ {T2, _} = statistics(wall_clock),
Finish_Msg = io_lib:format("done in ~2f secs\n", [(T2-T1)/1000]),
send_log(State#analysis_state.parent, Finish_Msg),
ok.
diff --git a/lib/dialyzer/src/dialyzer_behaviours.erl b/lib/dialyzer/src/dialyzer_behaviours.erl
index 2b9a69ce77..1d458b49fc 100644
--- a/lib/dialyzer/src/dialyzer_behaviours.erl
+++ b/lib/dialyzer/src/dialyzer_behaviours.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,15 +40,17 @@
-type behaviour() :: atom().
+-type rectab() :: erl_types:type_table().
+
-record(state, {plt :: dialyzer_plt:plt(),
codeserver :: dialyzer_codeserver:codeserver(),
filename :: file:filename(),
behlines :: [{behaviour(), non_neg_integer()}],
- records :: dict()}).
+ records :: rectab()}).
%%--------------------------------------------------------------------
--spec check_callbacks(module(), [{cerl:cerl(), cerl:cerl()}], dict(),
+-spec check_callbacks(module(), [{cerl:cerl(), cerl:cerl()}], rectab(),
dialyzer_plt:plt(),
dialyzer_codeserver:codeserver()) -> [dial_warning()].
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index b9ad3f857d..00b01fbd36 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,6 +35,7 @@
is_escaping/2,
is_self_rec/2,
non_local_calls/1,
+ lookup_letrec/2,
lookup_rec_var/2,
lookup_call_site/2,
lookup_label/2,
@@ -63,14 +64,16 @@
put_named_tables/2, put_public_tables/2, put_behaviour_api_calls/2,
get_behaviour_api_calls/1, dispose_race_server/1, duplicate/1]).
--export_type([callgraph/0, mfa_or_funlbl/0, callgraph_edge/0]).
+-export_type([callgraph/0, mfa_or_funlbl/0, callgraph_edge/0, mod_deps/0]).
-include("dialyzer.hrl").
%%----------------------------------------------------------------------
-type scc() :: [mfa_or_funlbl()].
--type mfa_calls() :: [{mfa_or_funlbl(), mfa_or_funlbl()}].
+-type mfa_call() :: {mfa_or_funlbl(), mfa_or_funlbl()}.
+-type mfa_calls() :: [mfa_call()].
+-type mod_deps() :: dict:dict(module(), [module()]).
%%-----------------------------------------------------------------------------
%% A callgraph is a directed graph where the nodes are functions and a
@@ -81,6 +84,8 @@
%% digraph - A digraph representing the callgraph.
%% Nodes are represented as MFAs or labels.
%% esc - A set of all escaping functions as reported by dialyzer_dep.
+%% letrec_map - A dict mapping from letrec bound labels to function labels.
+%% Includes all functions.
%% name_map - A mapping from label to MFA.
%% rev_name_map - A reverse mapping of the name_map.
%% rec_var_map - A dict mapping from letrec bound labels to function names.
@@ -90,9 +95,10 @@
%% whenever applicable.
%%-----------------------------------------------------------------------------
--record(callgraph, {digraph = digraph:new() :: digraph(),
+-record(callgraph, {digraph = digraph:new() :: digraph:graph(),
active_digraph :: active_digraph(),
esc :: ets:tid(),
+ letrec_map :: ets:tid(),
name_map :: ets:tid(),
rev_name_map :: ets:tid(),
rec_var_map :: ets:tid(),
@@ -101,7 +107,7 @@
race_detection = false :: boolean(),
race_data_server = new_race_data_server() :: pid()}).
--record(race_data_state, {race_code = dict:new() :: dict(),
+-record(race_data_state, {race_code = dict:new() :: dict:dict(),
public_tables = [] :: [label()],
named_tables = [] :: [string()],
beh_api_calls = [] :: [{mfa(), mfa()}]}).
@@ -110,18 +116,19 @@
-type callgraph() :: #callgraph{}.
--type active_digraph() :: {'d', digraph()} | {'e', ets:tid(), ets:tid()}.
+-type active_digraph() :: {'d', digraph:graph()} | {'e', ets:tid(), ets:tid()}.
%%----------------------------------------------------------------------
-spec new() -> callgraph().
new() ->
- [ETSEsc, ETSNameMap, ETSRevNameMap, ETSRecVarMap, ETSSelfRec, ETSCalls] =
+ [ETSEsc, ETSNameMap, ETSRevNameMap, ETSRecVarMap, ETSLetrecMap, ETSSelfRec, ETSCalls] =
[ets:new(N,[public, {read_concurrency, true}]) ||
N <- [callgraph_esc, callgraph_name_map, callgraph_rev_name_map,
- callgraph_rec_var_map, callgraph_self_rec, callgraph_calls]],
+ callgraph_rec_var_map, callgraph_letrec_map, callgraph_self_rec, callgraph_calls]],
#callgraph{esc = ETSEsc,
+ letrec_map = ETSLetrecMap,
name_map = ETSNameMap,
rev_name_map = ETSRevNameMap,
rec_var_map = ETSRecVarMap,
@@ -144,6 +151,12 @@ lookup_rec_var(Label, #callgraph{rec_var_map = RecVarMap})
when is_integer(Label) ->
ets_lookup_dict(Label, RecVarMap).
+-spec lookup_letrec(label(), callgraph()) -> 'error' | {'ok', label()}.
+
+lookup_letrec(Label, #callgraph{letrec_map = LetrecMap})
+ when is_integer(Label) ->
+ ets_lookup_dict(Label, LetrecMap).
+
-spec lookup_call_site(label(), callgraph()) -> 'error' | {'ok', [_]}. % XXX: refine
lookup_call_site(Label, #callgraph{calls = Calls})
@@ -211,7 +224,10 @@ non_local_calls(#callgraph{digraph = DG}) ->
Edges = digraph_edges(DG),
find_non_local_calls(Edges, sets:new()).
--spec find_non_local_calls([{mfa_or_funlbl(), mfa_or_funlbl()}], set()) -> mfa_calls().
+-type call_tab() :: sets:set(mfa_call()).
+
+-spec find_non_local_calls([{mfa_or_funlbl(), mfa_or_funlbl()}], call_tab()) ->
+ mfa_calls().
find_non_local_calls([{{M,_,_}, {M,_,_}}|Left], Set) ->
find_non_local_calls(Left, Set);
@@ -256,7 +272,7 @@ get_required_by(SCC, #callgraph{active_digraph = {'d', DG}}) ->
modules(#callgraph{digraph = DG}) ->
ordsets:from_list([M || {M,_F,_A} <- digraph_vertices(DG)]).
--spec module_postorder(callgraph()) -> {[module()], {'d', digraph()}}.
+-spec module_postorder(callgraph()) -> {[module()], {'d', digraph:graph()}}.
module_postorder(#callgraph{digraph = DG}) ->
Edges = lists:foldl(fun edge_fold/2, sets:new(), digraph_edges(DG)),
@@ -276,7 +292,7 @@ edge_fold(_, Set) -> Set.
%% The module deps of a module are modules that depend on the module
--spec module_deps(callgraph()) -> dict().
+-spec module_deps(callgraph()) -> mod_deps().
module_deps(#callgraph{digraph = DG}) ->
Edges = lists:foldl(fun edge_fold/2, sets:new(), digraph_edges(DG)),
@@ -290,7 +306,7 @@ module_deps(#callgraph{digraph = DG}) ->
digraph_delete(MDG),
dict:from_list(Deps).
--spec strip_module_deps(dict(), set()) -> dict().
+-spec strip_module_deps(mod_deps(), sets:set(module())) -> mod_deps().
strip_module_deps(ModDeps, StripSet) ->
FilterFun1 = fun(Val) -> not sets:is_element(Val, StripSet) end,
@@ -348,16 +364,18 @@ ets_lookup_set(Key, Table) ->
scan_core_tree(Tree, #callgraph{calls = ETSCalls,
esc = ETSEsc,
+ letrec_map = ETSLetrecMap,
name_map = ETSNameMap,
rec_var_map = ETSRecVarMap,
rev_name_map = ETSRevNameMap,
self_rec = ETSSelfRec}) ->
%% Build name map and recursion variable maps.
- build_maps(Tree, ETSRecVarMap, ETSNameMap, ETSRevNameMap),
+ build_maps(Tree, ETSRecVarMap, ETSNameMap, ETSRevNameMap, ETSLetrecMap),
%% First find the module-local dependencies.
- {Deps0, EscapingFuns, Calls} = dialyzer_dep:analyze(Tree),
+ {Deps0, EscapingFuns, Calls, Letrecs} = dialyzer_dep:analyze(Tree),
true = ets:insert(ETSCalls, dict:to_list(Calls)),
+ true = ets:insert(ETSLetrecMap, dict:to_list(Letrecs)),
true = ets:insert(ETSEsc, [{E} || E <- EscapingFuns]),
LabelEdges = get_edges_from_deps(Deps0),
@@ -394,7 +412,7 @@ scan_core_tree(Tree, #callgraph{calls = ETSCalls,
NamedEdges3 = NewNamedEdges1 ++ NewNamedEdges2,
{Names3, NamedEdges3}.
-build_maps(Tree, ETSRecVarMap, ETSNameMap, ETSRevNameMap) ->
+build_maps(Tree, ETSRecVarMap, ETSNameMap, ETSRevNameMap, ETSLetrecMap) ->
%% We only care about the named (top level) functions. The anonymous
%% functions will be analysed together with their parents.
Defs = cerl:module_defs(Tree),
@@ -406,6 +424,7 @@ build_maps(Tree, ETSRecVarMap, ETSNameMap, ETSRevNameMap) ->
MFA = {Mod, FunName, Arity},
FunLabel = get_label(Function),
VarLabel = get_label(Var),
+ true = ets:insert(ETSLetrecMap, {VarLabel, FunLabel}),
true = ets:insert(ETSNameMap, {FunLabel, MFA}),
true = ets:insert(ETSRevNameMap, {MFA, FunLabel}),
true = ets:insert(ETSRecVarMap, {VarLabel, MFA})
@@ -561,7 +580,7 @@ digraph_reaching_subgraph(Funs, DG) ->
%% Races
%%----------------------------------------------------------------------
--spec renew_race_info(callgraph(), dict(), [label()], [string()]) ->
+-spec renew_race_info(callgraph(), dict:dict(), [label()], [string()]) ->
callgraph().
renew_race_info(#callgraph{race_data_server = RaceDataServer} = CG,
@@ -627,7 +646,7 @@ duplicate(#callgraph{race_data_server = RaceDataServer} = Callgraph) ->
dispose_race_server(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_cast(stop, RaceDataServer).
--spec get_digraph(callgraph()) -> digraph().
+-spec get_digraph(callgraph()) -> digraph:graph().
get_digraph(#callgraph{digraph = Digraph}) ->
Digraph.
@@ -642,7 +661,7 @@ get_named_tables(#callgraph{race_data_server = RaceDataServer}) ->
get_public_tables(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_call(get_public_tables, RaceDataServer).
--spec get_race_code(callgraph()) -> dict().
+-spec get_race_code(callgraph()) -> dict:dict().
get_race_code(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_call(get_race_code, RaceDataServer).
@@ -663,12 +682,12 @@ race_code_new(#callgraph{race_data_server = RaceDataServer} = CG) ->
ok = race_data_server_cast(race_code_new, RaceDataServer),
CG.
--spec put_digraph(digraph(), callgraph()) -> callgraph().
+-spec put_digraph(digraph:graph(), callgraph()) -> callgraph().
put_digraph(Digraph, Callgraph) ->
Callgraph#callgraph{digraph = Digraph}.
--spec put_race_code(dict(), callgraph()) -> callgraph().
+-spec put_race_code(dict:dict(), callgraph()) -> callgraph().
put_race_code(RaceCode, #callgraph{race_data_server = RaceDataServer} = CG) ->
ok = race_data_server_cast({put_race_code, RaceCode}, RaceDataServer),
diff --git a/lib/dialyzer/src/dialyzer_cl.erl b/lib/dialyzer/src/dialyzer_cl.erl
index 365c0b36d4..3e7d9dfa99 100644
--- a/lib/dialyzer/src/dialyzer_cl.erl
+++ b/lib/dialyzer/src/dialyzer_cl.erl
@@ -2,7 +2,7 @@
%%-------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,7 +40,7 @@
external_calls = [] :: [mfa()],
external_types = [] :: [mfa()],
legal_warnings = ordsets:new() :: [dial_warn_tag()],
- mod_deps = dict:new() :: dict(),
+ mod_deps = dict:new() :: dialyzer_callgraph:mod_deps(),
output = standard_io :: io:device(),
output_format = formatted :: format(),
filename_opt = basename :: fopt(),
@@ -504,7 +504,7 @@ hipe_compile(Files, #options{erlang_mode = ErlangMode} = Options) ->
_ ->
Mods = [lists, dict, digraph, digraph_utils, ets,
gb_sets, gb_trees, ordsets, sets, sofs,
- cerl, cerl_trees, erl_types, erl_bif_types,
+ cerl, erl_types, cerl_trees, erl_bif_types,
dialyzer_analysis_callgraph, dialyzer, dialyzer_behaviours,
dialyzer_codeserver, dialyzer_contracts,
dialyzer_coordinator, dialyzer_dataflow, dialyzer_dep,
@@ -533,7 +533,7 @@ hc(Mod) ->
case code:is_module_native(Mod) of
true -> ok;
false ->
- %% io:format(" ~s", [Mod]),
+ %% io:format(" ~w", [Mod]),
{ok, Mod} = hipe:c(Mod),
ok
end.
@@ -603,7 +603,7 @@ cl_loop(State, LogCache) ->
Msg = failed_anal_msg(Reason, LogCache),
cl_error(State, Msg);
{'EXIT', BackendPid, Reason} when Reason =/= 'normal' ->
- Msg = failed_anal_msg(io_lib:format("~P", [Reason, 12]), LogCache),
+ Msg = failed_anal_msg(io_lib:format("~p", [Reason]), LogCache),
cl_error(State, Msg);
_Other ->
%% io:format("Received ~p\n", [_Other]),
@@ -613,7 +613,7 @@ cl_loop(State, LogCache) ->
-spec failed_anal_msg(string(), [_]) -> nonempty_string().
failed_anal_msg(Reason, LogCache) ->
- Msg = "Analysis failed with error:\n" ++ Reason ++ "\n",
+ Msg = "Analysis failed with error:\n" ++ lists:flatten(Reason) ++ "\n",
case LogCache =:= [] of
true -> Msg;
false ->
@@ -640,7 +640,7 @@ store_unknown_behaviours(#cl_state{unknown_behaviours = Behs} = St, Beh) ->
-spec cl_error(string()) -> no_return().
cl_error(Msg) ->
- throw({dialyzer_error, Msg}).
+ throw({dialyzer_error, lists:flatten(Msg)}).
-spec cl_error(#cl_state{}, string()) -> no_return().
@@ -650,13 +650,14 @@ cl_error(State, Msg) ->
Outfile -> io:format(Outfile, "\n~s\n", [Msg])
end,
maybe_close_output_file(State),
- throw({dialyzer_error, Msg}).
+ throw({dialyzer_error, lists:flatten(Msg)}).
return_value(State = #cl_state{erlang_mode = ErlangMode,
mod_deps = ModDeps,
output_plt = OutputPlt,
plt_info = PltInfo,
- stored_warnings = StoredWarnings},
+ stored_warnings = StoredWarnings,
+ legal_warnings = LegalWarnings},
Plt) ->
case OutputPlt =:= none of
true -> ok;
@@ -676,16 +677,33 @@ return_value(State = #cl_state{erlang_mode = ErlangMode,
maybe_close_output_file(State),
{RetValue, []};
true ->
- {RetValue, process_warnings(StoredWarnings)}
+ Unknown =
+ case ordsets:is_element(?WARN_UNKNOWN, LegalWarnings) of
+ true ->
+ unknown_functions(State) ++
+ unknown_types(State) ++
+ unknown_behaviours(State);
+ false -> []
+ end,
+ UnknownWarnings =
+ [{?WARN_UNKNOWN, {_Filename = "", _Line = 0}, W} || W <- Unknown],
+ AllWarnings =
+ UnknownWarnings ++ process_warnings(StoredWarnings),
+ {RetValue, AllWarnings}
end.
+unknown_functions(#cl_state{external_calls = Calls}) ->
+ [{unknown_function, MFA} || MFA <- Calls].
+
print_ext_calls(#cl_state{report_mode = quiet}) ->
ok;
print_ext_calls(#cl_state{output = Output,
external_calls = Calls,
stored_warnings = Warnings,
- output_format = Format}) ->
- case Calls =:= [] of
+ output_format = Format,
+ legal_warnings = LegalWarnings}) ->
+ case not ordsets:is_element(?WARN_UNKNOWN, LegalWarnings)
+ orelse Calls =:= [] of
true -> ok;
false ->
case Warnings =:= [] of
@@ -708,14 +726,19 @@ do_print_ext_calls(Output, [{M,F,A}|T], Before) ->
do_print_ext_calls(_, [], _) ->
ok.
+unknown_types(#cl_state{external_types = Types}) ->
+ [{unknown_type, MFA} || MFA <- Types].
+
print_ext_types(#cl_state{report_mode = quiet}) ->
ok;
print_ext_types(#cl_state{output = Output,
external_calls = Calls,
external_types = Types,
stored_warnings = Warnings,
- output_format = Format}) ->
- case Types =:= [] of
+ output_format = Format,
+ legal_warnings = LegalWarnings}) ->
+ case not ordsets:is_element(?WARN_UNKNOWN, LegalWarnings)
+ orelse Types =:= [] of
true -> ok;
false ->
case Warnings =:= [] andalso Calls =:= [] of
@@ -738,6 +761,15 @@ do_print_ext_types(Output, [{M,F,A}|T], Before) ->
do_print_ext_types(_, [], _) ->
ok.
+unknown_behaviours(#cl_state{unknown_behaviours = DupBehaviours,
+ legal_warnings = LegalWarnings}) ->
+ case ordsets:is_element(?WARN_BEHAVIOUR, LegalWarnings) of
+ false -> [];
+ true ->
+ Behaviours = lists:usort(DupBehaviours),
+ [{unknown_behaviour, B} || B <- Behaviours]
+ end.
+
%%print_unknown_behaviours(#cl_state{report_mode = quiet}) ->
%% ok;
print_unknown_behaviours(#cl_state{output = Output,
diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl
index 2ea3d3af5a..04ce0e8bc3 100644
--- a/lib/dialyzer/src/dialyzer_cl_parse.erl
+++ b/lib/dialyzer/src/dialyzer_cl_parse.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,7 +30,7 @@
-type dial_cl_parse_ret() :: {'check_init', #options{}}
| {'plt_info', #options{}}
| {'cl', #options{}}
- | {{'gui', 'gs' | 'wx'}, #options{}}
+ | {'gui', #options{}}
| {'error', string()}.
-type deep_string() :: string() | [deep_string()].
@@ -193,12 +193,9 @@ cl(["--dump_callgraph", File|T]) ->
put(dialyzer_callgraph_file, File),
cl(T);
cl(["--gui"|T]) ->
- put(dialyzer_options_mode, {gui, gs}),
+ put(dialyzer_options_mode, gui),
cl(T);
-cl(["--wx"|T]) ->
- put(dialyzer_options_mode, {gui, wx}),
- cl(T);
-cl(["--solver",Solver|T]) -> % not documented
+cl(["--solver", Solver|T]) -> % not documented
append_var(dialyzer_solvers, [list_to_atom(Solver)]),
cl(T);
cl([H|_] = L) ->
@@ -217,7 +214,7 @@ cl([]) ->
{plt_info, cl_options()};
false ->
case get(dialyzer_options_mode) of
- {gui, _} = GUI -> {GUI, common_options()};
+ gui -> {gui, common_options()};
cl ->
case get(dialyzer_options_analysis_type) =:= plt_check of
true -> {check_init, cl_options()};
@@ -360,12 +357,13 @@ help_warnings() ->
help_message() ->
S = "Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
- [-I include_dir]* [--output_plt file] [-Wwarn]*
- [--src] [--gui | --wx] [files_or_dirs] [-r dirs]
+ [-I include_dir]* [--output_plt file] [-Wwarn]* [--raw]
+ [--src] [--gui] [files_or_dirs] [-r dirs]
[--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
- [--no_native] [--fullpath] [--statistics]
+ [--dump_callgraph file] [--no_native] [--fullpath]
+ [--statistics]
Options:
files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
Use Dialyzer from the command line to detect defects in the
@@ -473,9 +471,7 @@ Options:
--fullpath
Display the full path names of files for which warnings are emitted.
--gui
- Use the gs-based GUI.
- --wx
- Use the wx-based GUI.
+ Use the GUI.
Note:
* denotes that multiple occurrences of these options are possible.
@@ -500,14 +496,16 @@ warning_options_msg() ->
Suppress warnings for unused functions.
-Wno_improper_lists
Suppress warnings for construction of improper lists.
- -Wno_tuple_as_fun
- Suppress warnings for using tuples instead of funs.
-Wno_fun_app
Suppress warnings for fun applications that will fail.
-Wno_match
Suppress warnings for patterns that are unused or cannot match.
-Wno_opaque
Suppress warnings for violations of opaqueness of data types.
+ -Wno_fail_call
+ Suppress warnings for failing calls.
+ -Wno_contracts
+ Suppress warnings about invalid contracts.
-Wno_behaviours
Suppress warnings about behaviour callbacks which drift from the published
recommended interfaces.
diff --git a/lib/dialyzer/src/dialyzer_codeserver.erl b/lib/dialyzer/src/dialyzer_codeserver.erl
index 216e06219c..aab3d6add6 100644
--- a/lib/dialyzer/src/dialyzer_codeserver.erl
+++ b/lib/dialyzer/src/dialyzer_codeserver.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -64,6 +64,12 @@
-type dict_ets() :: ets:tid().
-type set_ets() :: ets:tid().
+-type types() :: erl_types:type_table().
+-type mod_records() :: dict:dict(module(), types()).
+
+-type contracts() :: dict:dict(mfa(),dialyzer_contracts:file_contract()).
+-type mod_contracts() :: dict:dict(module(), contracts()).
+
-record(codeserver, {next_core_label = 0 :: label(),
code :: dict_ets(),
exported_types :: set_ets(), % set(mfa())
@@ -160,12 +166,12 @@ insert(Mod, ModCode, CS) ->
true = ets:insert(CS#codeserver.code, [ModEntry|Funs]),
CS.
--spec get_temp_exported_types(codeserver()) -> set().
+-spec get_temp_exported_types(codeserver()) -> sets:set(mfa()).
get_temp_exported_types(#codeserver{temp_exported_types = TempExpTypes}) ->
ets_set_to_set(TempExpTypes).
--spec insert_temp_exported_types(set(), codeserver()) -> codeserver().
+-spec insert_temp_exported_types(sets:set(mfa()), codeserver()) -> codeserver().
insert_temp_exported_types(Set, CS) ->
TempExportedTypes = CS#codeserver.temp_exported_types,
@@ -183,17 +189,17 @@ insert_exports(List, #codeserver{exports = Exports} = CS) ->
is_exported(MFA, #codeserver{exports = Exports}) ->
ets_set_is_element(MFA, Exports).
--spec get_exported_types(codeserver()) -> set(). % set(mfa())
+-spec get_exported_types(codeserver()) -> sets:set(mfa()).
get_exported_types(#codeserver{exported_types = ExpTypes}) ->
ets_set_to_set(ExpTypes).
--spec get_exports(codeserver()) -> set(). % set(mfa())
+-spec get_exports(codeserver()) -> sets:set(mfa()).
get_exports(#codeserver{exports = Exports}) ->
ets_set_to_set(Exports).
--spec finalize_exported_types(set(), codeserver()) -> codeserver().
+-spec finalize_exported_types(sets:set(mfa()), codeserver()) -> codeserver().
finalize_exported_types(Set, CS) ->
ExportedTypes = ets_read_concurrent_table(dialyzer_codeserver_exported_types),
@@ -222,7 +228,7 @@ get_next_core_label(#codeserver{next_core_label = NCL}) ->
set_next_core_label(NCL, CS) ->
CS#codeserver{next_core_label = NCL}.
--spec lookup_mod_records(atom(), codeserver()) -> dict().
+-spec lookup_mod_records(atom(), codeserver()) -> types().
lookup_mod_records(Mod, #codeserver{records = RecDict}) when is_atom(Mod) ->
case ets_dict_find(Mod, RecDict) of
@@ -230,12 +236,12 @@ lookup_mod_records(Mod, #codeserver{records = RecDict}) when is_atom(Mod) ->
{ok, Dict} -> Dict
end.
--spec get_records(codeserver()) -> dict().
+-spec get_records(codeserver()) -> mod_records().
get_records(#codeserver{records = RecDict}) ->
ets_dict_to_dict(RecDict).
--spec store_temp_records(atom(), dict(), codeserver()) -> codeserver().
+-spec store_temp_records(module(), types(), codeserver()) -> codeserver().
store_temp_records(Mod, Dict, #codeserver{temp_records = TempRecDict} = CS)
when is_atom(Mod) ->
@@ -244,12 +250,12 @@ store_temp_records(Mod, Dict, #codeserver{temp_records = TempRecDict} = CS)
false -> CS#codeserver{temp_records = ets_dict_store(Mod, Dict, TempRecDict)}
end.
--spec get_temp_records(codeserver()) -> dict().
+-spec get_temp_records(codeserver()) -> mod_records().
get_temp_records(#codeserver{temp_records = TempRecDict}) ->
ets_dict_to_dict(TempRecDict).
--spec set_temp_records(dict(), codeserver()) -> codeserver().
+-spec set_temp_records(mod_records(), codeserver()) -> codeserver().
set_temp_records(Dict, CS) ->
true = ets:delete(CS#codeserver.temp_records),
@@ -257,7 +263,7 @@ set_temp_records(Dict, CS) ->
true = ets_dict_store_dict(Dict, TempRecords),
CS#codeserver{temp_records = TempRecords}.
--spec finalize_records(dict(), codeserver()) -> codeserver().
+-spec finalize_records(mod_records(), codeserver()) -> codeserver().
finalize_records(Dict, CS) ->
true = ets:delete(CS#codeserver.temp_records),
@@ -265,7 +271,7 @@ finalize_records(Dict, CS) ->
true = ets_dict_store_dict(Dict, Records),
CS#codeserver{records = Records, temp_records = clean}.
--spec lookup_mod_contracts(atom(), codeserver()) -> dict().
+-spec lookup_mod_contracts(atom(), codeserver()) -> contracts().
lookup_mod_contracts(Mod, #codeserver{contracts = ContDict})
when is_atom(Mod) ->
@@ -284,7 +290,7 @@ get_contract_pair(Key, ContDict) ->
lookup_mfa_contract(MFA, #codeserver{contracts = ContDict}) ->
ets_dict_find(MFA, ContDict).
--spec get_contracts(codeserver()) -> dict().
+-spec get_contracts(codeserver()) -> mod_contracts().
get_contracts(#codeserver{contracts = ContDict}) ->
ets_dict_to_dict(ContDict).
@@ -294,7 +300,7 @@ get_contracts(#codeserver{contracts = ContDict}) ->
get_callbacks(#codeserver{callbacks = CallbDict}) ->
ets:tab2list(CallbDict).
--spec store_temp_contracts(atom(), dict(), dict(), codeserver()) ->
+-spec store_temp_contracts(module(), contracts(), contracts(), codeserver()) ->
codeserver().
store_temp_contracts(Mod, SpecDict, CallbackDict,
@@ -313,13 +319,14 @@ store_temp_contracts(Mod, SpecDict, CallbackDict,
CS1#codeserver{temp_callbacks = ets_dict_store(Mod, CallbackDict, Cb)}
end.
--spec get_temp_contracts(codeserver()) -> {dict(), dict()}.
+-spec get_temp_contracts(codeserver()) -> {mod_contracts(), mod_contracts()}.
get_temp_contracts(#codeserver{temp_contracts = TempContDict,
temp_callbacks = TempCallDict}) ->
{ets_dict_to_dict(TempContDict), ets_dict_to_dict(TempCallDict)}.
--spec finalize_contracts(dict(), dict(), codeserver()) -> codeserver().
+-spec finalize_contracts(mod_contracts(), mod_contracts(), codeserver()) ->
+ codeserver().
finalize_contracts(SpecDict, CallbackDict, CS) ->
Contracts = ets_read_concurrent_table(dialyzer_codeserver_contracts),
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl
index 332a326b0d..f27fc1a842 100644
--- a/lib/dialyzer/src/dialyzer_contracts.erl
+++ b/lib/dialyzer/src/dialyzer_contracts.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,10 +21,10 @@
-module(dialyzer_contracts).
-export([check_contract/2,
- check_contracts/3,
+ check_contracts/4,
contracts_without_fun/3,
contract_to_string/1,
- get_invalid_contract_warnings/3,
+ get_invalid_contract_warnings/4,
get_contract_args/1,
get_contract_return/1,
get_contract_return/2,
@@ -52,7 +52,7 @@
%% to expand records and/or remote types that they might contain.
%%-----------------------------------------------------------------------
--type tmp_contract_fun() :: fun((set(), dict()) -> contract_pair()).
+-type tmp_contract_fun() :: fun((sets:set(mfa()), types()) -> contract_pair()).
-record(tmp_contract, {contract_funs = [] :: [tmp_contract_fun()],
forms = [] :: [{_, _}]}).
@@ -160,17 +160,24 @@ process_contract_remote_types(CodeServer) ->
dialyzer_codeserver:finalize_contracts(NewContractDict, NewCallbackDict,
CodeServer).
+-type opaques() :: [erl_types:erl_type()] | 'universe'.
+-type opaques_fun() :: fun((module()) -> opaques()).
+
+-type fun_types() :: dict:dict(label(), erl_types:type_table()).
+
-spec check_contracts([{mfa(), file_contract()}],
- dialyzer_callgraph:callgraph(), dict()) -> plt_contracts().
+ dialyzer_callgraph:callgraph(), fun_types(),
+ opaques_fun()) -> plt_contracts().
-check_contracts(Contracts, Callgraph, FunTypes) ->
+check_contracts(Contracts, Callgraph, FunTypes, FindOpaques) ->
FoldFun =
fun(Label, Type, NewContracts) ->
case dialyzer_callgraph:lookup_name(Label, Callgraph) of
{ok, {M,F,A} = MFA} ->
case orddict:find(MFA, Contracts) of
{ok, {_FileLine, Contract}} ->
- case check_contract(Contract, Type) of
+ Opaques = FindOpaques(M),
+ case check_contract(Contract, Type, Opaques) of
ok ->
case erl_bif_types:is_known(M, F, A) of
true ->
@@ -192,7 +199,10 @@ check_contracts(Contracts, Callgraph, FunTypes) ->
%% Checks all components of a contract
-spec check_contract(#contract{}, erl_types:erl_type()) -> 'ok' | {'error', term()}.
-check_contract(#contract{contracts = Contracts}, SuccType) ->
+check_contract(Contract, SuccType) ->
+ check_contract(Contract, SuccType, 'universe').
+
+check_contract(#contract{contracts = Contracts}, SuccType, Opaques) ->
try
Contracts1 = [{Contract, insert_constraints(Constraints, dict:new())}
|| {Contract, Constraints} <- Contracts],
@@ -203,9 +213,9 @@ check_contract(#contract{contracts = Contracts}, SuccType) ->
error ->
{error, {overlapping_contract, []}};
ok ->
- InfList = [erl_types:t_inf(Contract, SuccType, opaque)
+ InfList = [erl_types:t_inf(Contract, SuccType, Opaques)
|| Contract <- Contracts2],
- case check_contract_inf_list(InfList, SuccType) of
+ case check_contract_inf_list(InfList, SuccType, Opaques) of
{error, _} = Invalid -> Invalid;
ok -> check_extraneous(Contracts2, SuccType)
end
@@ -217,7 +227,7 @@ check_contract(#contract{contracts = Contracts}, SuccType) ->
check_domains([_]) -> ok;
check_domains([Dom|Doms]) ->
Fun = fun(D) ->
- erl_types:any_none_or_unit(erl_types:t_inf_lists(Dom, D, opaque))
+ erl_types:any_none_or_unit(erl_types:t_inf_lists(Dom, D))
end,
case lists:all(Fun, Doms) of
true -> check_domains(Doms);
@@ -227,23 +237,23 @@ check_domains([Dom|Doms]) ->
%% Allow a contract if one of the overloaded contracts is possible.
%% We used to be more strict, e.g., all overloaded contracts had to be
%% possible.
-check_contract_inf_list([FunType|Left], SuccType) ->
+check_contract_inf_list([FunType|Left], SuccType, Opaques) ->
FunArgs = erl_types:t_fun_args(FunType),
case lists:any(fun erl_types:t_is_none_or_unit/1, FunArgs) of
- true -> check_contract_inf_list(Left, SuccType);
+ true -> check_contract_inf_list(Left, SuccType, Opaques);
false ->
STRange = erl_types:t_fun_range(SuccType),
case erl_types:t_is_none_or_unit(STRange) of
true -> ok;
false ->
Range = erl_types:t_fun_range(FunType),
- case erl_types:t_is_none(erl_types:t_inf(STRange, Range, opaque)) of
- true -> check_contract_inf_list(Left, SuccType);
+ case erl_types:t_is_none(erl_types:t_inf(STRange, Range)) of
+ true -> check_contract_inf_list(Left, SuccType, Opaques);
false -> ok
end
end
end;
-check_contract_inf_list([], _SuccType) ->
+check_contract_inf_list([], _SuccType, _Opaques) ->
{error, invalid_contract}.
check_extraneous([], _SuccType) -> ok;
@@ -259,7 +269,7 @@ check_extraneous_1(Contract, SuccType) ->
STRng = erl_types:t_fun_range(SuccType),
?debug("CR = ~p\nSR = ~p\n", [CRngs, STRng]),
case [CR || CR <- CRngs,
- erl_types:t_is_none(erl_types:t_inf(CR, STRng, opaque))] of
+ erl_types:t_is_none(erl_types:t_inf(CR, STRng))] of
[] ->
CRngList = list_part(CRng),
STRngList = list_part(STRng),
@@ -268,7 +278,7 @@ check_extraneous_1(Contract, SuccType) ->
true ->
CRngElements = erl_types:t_list_elements(CRngList),
STRngElements = erl_types:t_list_elements(STRngList),
- Inf = erl_types:t_inf(CRngElements, STRngElements, opaque),
+ Inf = erl_types:t_inf(CRngElements, STRngElements),
case erl_types:t_is_none(Inf) of
true -> {error, invalid_contract};
false -> ok
@@ -278,13 +288,14 @@ check_extraneous_1(Contract, SuccType) ->
end.
list_part(Type) ->
- erl_types:t_inf(erl_types:t_list(), Type, opaque).
+ erl_types:t_inf(erl_types:t_list(), Type).
is_not_nil_list(Type) ->
erl_types:t_is_list(Type) andalso not erl_types:t_is_nil(Type).
%% This is the heart of the "range function"
--spec process_contracts([contract_pair()], [erl_types:erl_type()]) -> erl_types:erl_type().
+-spec process_contracts([contract_pair()], [erl_types:erl_type()]) ->
+ erl_types:erl_type().
process_contracts(OverContracts, Args) ->
process_contracts(OverContracts, Args, erl_types:t_none()).
@@ -299,7 +310,8 @@ process_contracts([OverContract|Left], Args, AccRange) ->
process_contracts([], _Args, AccRange) ->
AccRange.
--spec process_contract(contract_pair(), [erl_types:erl_type()]) -> 'error' | {'ok', erl_types:erl_type()}.
+-spec process_contract(contract_pair(), [erl_types:erl_type()]) ->
+ 'error' | {'ok', erl_types:erl_type()}.
process_contract({Contract, Constraints}, CallTypes0) ->
CallTypesFun = erl_types:t_fun(CallTypes0, erl_types:t_any()),
@@ -335,8 +347,11 @@ solve_constraints(Contract, Call, Constraints) ->
%% ?debug("Inf: ~s\n", [erl_types:t_to_string(Inf)]),
%% erl_types:t_assign_variables_to_subtype(Contract, Inf).
+-type contracts() :: dict:dict(mfa(),dialyzer_contracts:file_contract()).
+
%% Checks the contracts for functions that are not implemented
--spec contracts_without_fun(dict(), [_], dialyzer_callgraph:callgraph()) -> [dial_warning()].
+-spec contracts_without_fun(contracts(), [_], dialyzer_callgraph:callgraph()) ->
+ [dial_warning()].
contracts_without_fun(Contracts, AllFuns0, Callgraph) ->
AllFuns1 = [{dialyzer_callgraph:lookup_name(Label, Callgraph), Arity}
@@ -369,12 +384,15 @@ insert_constraints([{subtype, Type1, Type2}|Left], Dict) ->
end;
insert_constraints([], Dict) -> Dict.
--spec store_tmp_contract(mfa(), file_line(), [_], dict(), dict()) -> dict().
+-type types() :: erl_types:type_table().
+
+-spec store_tmp_contract(mfa(), file_line(), [_], contracts(), types()) ->
+ contracts().
store_tmp_contract(MFA, FileLine, TypeSpec, SpecDict, RecordsDict) ->
%% io:format("contract from form: ~p\n", [TypeSpec]),
TmpContract = contract_from_form(TypeSpec, RecordsDict, FileLine),
- %% io:format("contract: ~p\n", [Contract]),
+ %% io:format("contract: ~p\n", [TmpContract]),
dict:store(MFA, {FileLine, TmpContract}, SpecDict).
contract_from_form(Forms, RecDict, FileLine) ->
@@ -396,7 +414,8 @@ contract_from_form([{type, _, 'fun', [_, _]} = Form | Left], RecDict,
throw({error, NewMsg})
end,
NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords),
- {NewType, []}
+ NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType),
+ {NewTypeNoVars, []}
end,
NewTypeAcc = [TypeFun | TypeAcc],
NewFormAcc = [{Form, []} | FormAcc],
@@ -410,7 +429,8 @@ contract_from_form([{type, _L1, bounded_fun,
process_constraints(Constr, RecDict, ExpTypes, AllRecords),
Type = erl_types:t_from_form(Form, RecDict, VarDict),
NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords),
- {NewType, Constr1}
+ NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType),
+ {NewTypeNoVars, Constr1}
end,
NewTypeAcc = [TypeFun | TypeAcc],
NewFormAcc = [{Form, Constr} | FormAcc],
@@ -419,7 +439,8 @@ contract_from_form([], _RecDict, _FileLine, TypeAcc, FormAcc) ->
{lists:reverse(TypeAcc), lists:reverse(FormAcc)}.
process_constraints(Constrs, RecDict, ExpTypes, AllRecords) ->
- Init = initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords),
+ Init0 = initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords),
+ Init = remove_cycles(Init0),
constraints_fixpoint(Init, RecDict, ExpTypes, AllRecords).
initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords) ->
@@ -459,12 +480,9 @@ constraints_fixpoint(OldVarDict, Constrs, RecDict, ExpTypes, AllRecords) ->
constraints_fixpoint(NewVarDict, Constrs, RecDict, ExpTypes, AllRecords)
end.
--define(TYPE_LIMIT, 4).
-
final_form(Form, RecDict, ExpTypes, AllRecords, VarDict) ->
T1 = erl_types:t_from_form(Form, RecDict, VarDict),
- T2 = erl_types:t_solve_remote(T1, ExpTypes, AllRecords),
- erl_types:t_limit(T2, ?TYPE_LIMIT).
+ erl_types:t_solve_remote(T1, ExpTypes, AllRecords).
constraints_to_dict(Constrs, RecDict, ExpTypes, AllRecords, VarDict) ->
Subtypes =
@@ -479,6 +497,74 @@ constraints_to_subs([C|Rest], RecDict, ExpTypes, AllRecords, VarDict, Acc) ->
NewAcc = [{subtype, T1, T2}|Acc],
constraints_to_subs(Rest, RecDict, ExpTypes, AllRecords, VarDict, NewAcc).
+%% Replaces variables with '_' when necessary to break up cycles among
+%% the constraints.
+
+remove_cycles(Constrs0) ->
+ Uses = find_uses(Constrs0),
+ G = digraph:new(),
+ Vs0 = [V || {V, _} <- Uses] ++ [V || {_, V} <- Uses],
+ Vs = lists:usort(Vs0),
+ lists:foreach(fun(V) -> _ = digraph:add_vertex(G, V) end, Vs),
+ lists:foreach(fun({From, To}) ->
+ _ = digraph:add_edge(G, {From, To}, From, To, [])
+ end, Uses),
+ ok = remove_cycles(G, Vs),
+ ToRemove = ordsets:subtract(ordsets:from_list(Uses),
+ ordsets:from_list(digraph:edges(G))),
+ Constrs = remove_uses(ToRemove, Constrs0),
+ digraph:delete(G),
+ Constrs.
+
+find_uses([{Var, Form}|Constrs]) ->
+ UsedVars = form_vars(Form, []),
+ VarName = erl_types:t_var_name(Var),
+ [{VarName, UsedVar} || UsedVar <- UsedVars] ++ find_uses(Constrs);
+find_uses([]) ->
+ [].
+
+form_vars({var, _, '_'}, Vs) -> Vs;
+form_vars({var, _, V}, Vs) -> [V|Vs];
+form_vars(T, Vs) when is_tuple(T) ->
+ form_vars(tuple_to_list(T), Vs);
+form_vars([E|Es], Vs) ->
+ form_vars(Es, form_vars(E, Vs));
+form_vars(_, Vs) -> Vs.
+
+remove_cycles(G, Vs) ->
+ NumberOfEdges = digraph:no_edges(G),
+ lists:foreach(fun(V) ->
+ case digraph:get_cycle(G, V) of
+ false -> true;
+ [V] -> digraph:del_edge(G, {V, V});
+ [V, V1|_] -> digraph:del_edge(G, {V, V1})
+ end
+ end, Vs),
+ case digraph:no_edges(G) =:= NumberOfEdges of
+ true -> ok;
+ false -> remove_cycles(G, Vs)
+ end.
+
+remove_uses([], Constrs) -> Constrs;
+remove_uses([{Var, Use}|ToRemove], Constrs0) ->
+ Constrs = remove_uses(Var, Use, Constrs0),
+ remove_uses(ToRemove, Constrs).
+
+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.
+
+remove_use({var, L, V}, V) -> {var, L, '_'};
+remove_use(T, V) when is_tuple(T) ->
+ list_to_tuple(remove_use(tuple_to_list(T), V));
+remove_use([E|Es], V) ->
+ [remove_use(E, V)|remove_use(Es, V)];
+remove_use(T, _V) -> T.
+
%% Gets the most general domain of a list of domains of all
%% the overloaded contracts
@@ -494,30 +580,35 @@ general_domain([], AccSig) ->
AccSig1 = erl_types:subst_all_vars_to_any(AccSig),
erl_types:t_fun_args(AccSig1).
--spec get_invalid_contract_warnings([module()], dialyzer_codeserver:codeserver(), dialyzer_plt:plt()) -> [dial_warning()].
+-spec get_invalid_contract_warnings([module()],
+ dialyzer_codeserver:codeserver(),
+ dialyzer_plt:plt(),
+ opaques_fun()) -> [dial_warning()].
-get_invalid_contract_warnings(Modules, CodeServer, Plt) ->
- get_invalid_contract_warnings_modules(Modules, CodeServer, Plt, []).
+get_invalid_contract_warnings(Modules, CodeServer, Plt, FindOpaques) ->
+ get_invalid_contract_warnings_modules(Modules, CodeServer, Plt, FindOpaques, []).
-get_invalid_contract_warnings_modules([Mod|Mods], CodeServer, Plt, Acc) ->
+get_invalid_contract_warnings_modules([Mod|Mods], CodeServer, Plt, FindOpaques, Acc) ->
Contracts1 = dialyzer_codeserver:lookup_mod_contracts(Mod, CodeServer),
Contracts2 = dict:to_list(Contracts1),
Records = dialyzer_codeserver:lookup_mod_records(Mod, CodeServer),
- NewAcc = get_invalid_contract_warnings_funs(Contracts2, Plt, Records, Acc),
- get_invalid_contract_warnings_modules(Mods, CodeServer, Plt, NewAcc);
-get_invalid_contract_warnings_modules([], _CodeServer, _Plt, Acc) ->
+ NewAcc = get_invalid_contract_warnings_funs(Contracts2, Plt, Records, FindOpaques, Acc),
+ get_invalid_contract_warnings_modules(Mods, CodeServer, Plt, FindOpaques, NewAcc);
+get_invalid_contract_warnings_modules([], _CodeServer, _Plt, _FindOpaques, Acc) ->
Acc.
get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
- Plt, RecDict, Acc) ->
+ Plt, RecDict, FindOpaques, Acc) ->
case dialyzer_plt:lookup(Plt, MFA) of
none ->
%% This must be a contract for a non-available function. Just accept it.
- get_invalid_contract_warnings_funs(Left, Plt, RecDict, Acc);
+ get_invalid_contract_warnings_funs(Left, Plt, RecDict, FindOpaques, Acc);
{value, {Ret, Args}} ->
Sig = erl_types:t_fun(Args, Ret),
+ {M, _F, _A} = MFA,
+ Opaques = FindOpaques(M),
NewAcc =
- case check_contract(Contract, Sig) of
+ case check_contract(Contract, Sig, Opaques) of
{error, invalid_contract} ->
[invalid_contract_warning(MFA, FileLine, Sig, RecDict)|Acc];
{error, {overlapping_contract, []}} ->
@@ -551,7 +642,7 @@ get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
BifArgs = erl_bif_types:arg_types(M, F, A),
BifRet = erl_bif_types:type(M, F, A),
BifSig = erl_types:t_fun(BifArgs, BifRet),
- case check_contract(Contract, BifSig) of
+ case check_contract(Contract, BifSig, Opaques) of
{error, _} ->
[invalid_contract_warning(MFA, FileLine, BifSig, RecDict)
|Acc];
@@ -564,9 +655,9 @@ get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
RecDict, Acc)
end
end,
- get_invalid_contract_warnings_funs(Left, Plt, RecDict, NewAcc)
+ get_invalid_contract_warnings_funs(Left, Plt, RecDict, FindOpaques, NewAcc)
end;
-get_invalid_contract_warnings_funs([], _Plt, _RecDict, Acc) ->
+get_invalid_contract_warnings_funs([], _Plt, _RecDict, _FindOpaques, Acc) ->
Acc.
invalid_contract_warning({M, F, A}, FileLine, SuccType, RecDict) ->
@@ -593,7 +684,7 @@ picky_contract_check(CSig0, Sig0, MFA, FileLine, Contract, RecDict, Acc) ->
true -> Acc;
false ->
case extra_contract_warning(MFA, FileLine, Contract,
- CSig, Sig, RecDict) of
+ CSig0, Sig0, RecDict) of
no_warning -> Acc;
{warning, Warning} -> [Warning|Acc]
end
@@ -601,16 +692,23 @@ picky_contract_check(CSig0, Sig0, MFA, FileLine, Contract, RecDict, Acc) ->
end.
extra_contract_warning({M, F, A}, FileLine, Contract, CSig, Sig, RecDict) ->
- SigString = lists:flatten(dialyzer_utils:format_sig(Sig, RecDict)),
- ContractString0 = lists:flatten(dialyzer_utils:format_sig(CSig, RecDict)),
+ %% We do not want to depend upon erl_types:t_to_string() possibly
+ %% hiding the contents of opaque types.
+ SigUnopaque = erl_types:t_unopaque(Sig),
+ CSigUnopaque = erl_types:t_unopaque(CSig),
+ SigString0 =
+ lists:flatten(dialyzer_utils:format_sig(SigUnopaque, RecDict)),
+ ContractString0 =
+ lists:flatten(dialyzer_utils:format_sig(CSigUnopaque, RecDict)),
%% The only difference is in record fields containing 'undefined' or not.
- IsUndefRecordFieldsRelated = SigString =:= ContractString0,
+ IsUndefRecordFieldsRelated = SigString0 =:= ContractString0,
{IsRemoteTypesRelated, SubtypeRelation} =
is_remote_types_related(Contract, CSig, Sig, RecDict),
case IsUndefRecordFieldsRelated orelse IsRemoteTypesRelated of
true ->
no_warning;
false ->
+ SigString = lists:flatten(dialyzer_utils:format_sig(Sig, RecDict)),
ContractString = contract_to_string(Contract),
{Tag, Msg} =
case SubtypeRelation of
@@ -652,14 +750,8 @@ is_remote_types_related(Contract, CSig, Sig, RecDict) ->
t_from_forms_without_remote([{FType, []}], RecDict) ->
Type0 = erl_types:t_from_form(FType, RecDict),
- Map =
- fun(Type) ->
- case erl_types:t_is_remote(Type) of
- true -> erl_types:t_none();
- false -> Type
- end
- end,
- {ok, erl_types:t_map(Map, Type0)};
+ Type1 = erl_types:subst_all_remote(Type0, erl_types:t_none()),
+ {ok, erl_types:subst_all_vars_to_any(Type1)};
t_from_forms_without_remote([{_FType, _Constrs}], _RecDict) ->
%% 'When' constraints
unsupported;
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 6956850f1a..3cdbf3569a 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -2,7 +2,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,27 +41,37 @@
-include("dialyzer.hrl").
+%%-import(helper, %% 'helper' could be any module doing sanity checks...
-import(erl_types,
- [any_none/1, t_any/0, t_atom/0, t_atom/1, t_atom_vals/1,
+ [t_inf/2, t_inf/3, t_inf_lists/2, t_inf_lists/3,
+ t_inf_lists/3, t_is_equal/2, t_is_subtype/2, t_subtract/2,
+ t_sup/1, t_sup/2]).
+
+-import(erl_types,
+ [any_none/1, t_any/0, t_atom/0, t_atom/1, t_atom_vals/1, t_atom_vals/2,
t_binary/0, t_boolean/0,
t_bitstr/0, t_bitstr/2, t_bitstr_concat/1, t_bitstr_match/2,
- t_cons/0, t_cons/2, t_cons_hd/1, t_cons_tl/1, t_contains_opaque/1,
- t_find_opaque_mismatch/2, t_float/0, t_from_range/2, t_from_term/1,
- t_fun/0, t_fun/2, t_fun_args/1, t_fun_range/1,
- t_inf/2, t_inf/3, t_inf_lists/2, t_inf_lists/3, t_inf_lists_masked/3,
- t_integer/0, t_integers/1,
- t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_boolean/1, t_is_equal/2,
- t_is_integer/1, t_is_nil/1, t_is_none/1, t_is_none_or_unit/1,
- t_is_number/1, t_is_reference/1, t_is_pid/1, t_is_port/1,
- t_is_subtype/2, t_is_unit/1,
- t_limit/2, t_list/0, t_maybe_improper_list/0, t_module/0,
- t_none/0, t_non_neg_integer/0, t_number/0, t_number_vals/1,
- t_opaque_match_atom/2, t_opaque_match_record/2,
- t_opaque_matching_structure/2,
+ t_cons/0, t_cons/2, t_cons_hd/2, t_cons_tl/2,
+ t_contains_opaque/2,
+ t_find_opaque_mismatch/3, t_float/0, t_from_range/2, t_from_term/1,
+ t_fun/0, t_fun/2, t_fun_args/1, t_fun_args/2, t_fun_range/1,
+ t_fun_range/2, t_integer/0, t_integers/1,
+ t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_any_atom/3,
+ t_is_boolean/2,
+ t_is_integer/2, t_is_list/1,
+ t_is_nil/2, t_is_none/1, t_is_none_or_unit/1,
+ t_is_number/2, t_is_reference/2, t_is_pid/2, t_is_port/2,
+ t_is_unit/1,
+ t_limit/2, t_list/0, t_list_elements/2,
+ t_maybe_improper_list/0, t_module/0,
+ t_none/0, t_non_neg_integer/0, t_number/0, t_number_vals/2,
t_pid/0, t_port/0, t_product/1, t_reference/0,
- t_sup/1, t_sup/2, t_subtract/2, t_to_string/2, t_to_tlist/1,
- t_tuple/0, t_tuple/1, t_tuple_args/1, t_tuple_subtypes/1,
- t_unit/0, t_unopaque/1]).
+ t_to_string/2, t_to_tlist/1,
+ t_tuple/0, t_tuple/1, t_tuple_args/1, t_tuple_args/2,
+ t_tuple_subtypes/2,
+ t_unit/0, t_unopaque/2,
+ t_map/1
+ ]).
%%-define(DEBUG, true).
%%-define(DEBUG_PP, true).
@@ -76,50 +86,66 @@
%%--------------------------------------------------------------------
+-type type() :: erl_types:erl_type().
+-type types() :: erl_types:type_table().
+
-define(no_arg, no_arg).
-define(TYPE_LIMIT, 3).
+-define(BITS, 128).
+
-record(state, {callgraph :: dialyzer_callgraph:callgraph(),
- envs :: dict(),
- fun_tab :: dict(),
+ envs :: env_tab(),
+ fun_tab :: fun_tab(),
plt :: dialyzer_plt:plt(),
- opaques :: [erl_types:erl_type()],
+ opaques :: [type()],
races = dialyzer_races:new() :: dialyzer_races:races(),
- records = dict:new() :: dict(),
- tree_map :: dict(),
+ records = dict:new() :: types(),
+ tree_map :: dict:dict(label(), cerl:cerl()),
warning_mode = false :: boolean(),
warnings = [] :: [dial_warning()],
- work :: {[_], [_], set()},
+ work :: {[_], [_], sets:set()},
module :: module()
}).
--record(map, {dict = dict:new() :: dict(),
- subst = dict:new() :: dict(),
+-record(map, {dict = dict:new() :: type_tab(),
+ subst = dict:new() :: subst_tab(),
modified = [] :: [Key :: term()],
modified_stack = [] :: [{[Key :: term()],reference()}],
ref = undefined :: reference() | undefined}).
+-type nowarn() :: dialyzer_analysis_callgraph:no_warn_unused().
+-type env_tab() :: dict:dict(label(), #map{}).
+-type fun_entry() :: {Args :: [type()], RetType :: type()}.
+-type fun_tab() :: dict:dict('top' | label(),
+ {'not_handled', fun_entry()} | fun_entry()).
+-type key() :: label() | cerl:cerl().
+-type type_tab() :: dict:dict(key(), type()).
+-type subst_tab() :: dict:dict(key(), cerl:cerl()).
+
%% Exported Types
-opaque state() :: #state{}.
%%--------------------------------------------------------------------
+-type fun_types() :: dict:dict(label(), type()).
+
-spec get_warnings(cerl:c_module(), dialyzer_plt:plt(),
- dialyzer_callgraph:callgraph(), dict(), set()) ->
- {[dial_warning()], dict()}.
+ dialyzer_callgraph:callgraph(), types(), nowarn()) ->
+ {[dial_warning()], fun_types()}.
get_warnings(Tree, Plt, Callgraph, Records, NoWarnUnused) ->
State1 = analyze_module(Tree, Plt, Callgraph, Records, true),
- State2 = find_mismatched_record_patterns(Tree, State1),
- State3 =
- state__renew_warnings(state__get_warnings(State2, NoWarnUnused), State2),
- State4 = state__get_race_warnings(State3),
- {State4#state.warnings, state__all_fun_types(State4)}.
+ State2 =
+ state__renew_warnings(state__get_warnings(State1, NoWarnUnused), State1),
+ State3 = state__get_race_warnings(State2),
+ {State3#state.warnings, state__all_fun_types(State3)}.
-spec get_fun_types(cerl:c_module(), dialyzer_plt:plt(),
- dialyzer_callgraph:callgraph(), dict()) -> dict().
+ dialyzer_callgraph:callgraph(),
+ types()) -> fun_types().
get_fun_types(Tree, Plt, Callgraph, Records) ->
State = analyze_module(Tree, Plt, Callgraph, Records, false),
@@ -204,7 +230,7 @@ analyze_loop(State) ->
traverse(Tree, Map, State) ->
?debug("Handling ~p\n", [cerl:type(Tree)]),
- %%debug_pp_map(Map),
+ %% debug_pp_map(Map),
case cerl:type(Tree) of
alias ->
%% This only happens when checking for illegal record patterns
@@ -252,18 +278,8 @@ traverse(Tree, Map, State) ->
{State1, Map1} = lists:foldl(FoldFun, {State, Map}, Defs),
traverse(Body, Map1, State1);
literal ->
- %% This is needed for finding records
- case cerl:unfold_literal(Tree) of
- Tree ->
- Type = literal_type(Tree),
- NewType =
- case erl_types:t_opaque_match_atom(Type, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end,
- {State, Map, NewType};
- NewTree -> traverse(NewTree, Map, State)
- end;
+ Type = literal_type(Tree),
+ {State, Map, Type};
module ->
handle_module(Tree, Map, State);
primop ->
@@ -286,8 +302,12 @@ traverse(Tree, Map, State) ->
SMA;
false ->
State2 =
- case (t_is_any(ArgType) orelse t_is_simple(ArgType)
- orelse is_call_to_send(Arg)) of
+ case
+ t_is_any(ArgType)
+ orelse t_is_simple(ArgType, State)
+ orelse is_call_to_send(Arg)
+ orelse is_lc_simple_list(Arg, ArgType, State)
+ of
true -> % do not warn in these cases
State1;
false ->
@@ -301,6 +321,10 @@ traverse(Tree, Map, State) ->
handle_try(Tree, Map, State);
tuple ->
handle_tuple(Tree, Map, State);
+ map ->
+ handle_map(Tree, Map, State);
+ map_pair ->
+ handle_map_pair(Tree, Map, State);
values ->
Elements = cerl:values_es(Tree),
{State1, Map1, EsType} = traverse_list(Elements, Map, State),
@@ -308,18 +332,10 @@ traverse(Tree, Map, State) ->
{State1, Map1, Type};
var ->
?debug("Looking up unknown variable: ~p\n", [Tree]),
- case state__lookup_type_for_rec_var(Tree, State) of
+ case state__lookup_type_for_letrec(Tree, State) of
error ->
LType = lookup_type(Tree, Map),
- Opaques = State#state.opaques,
- case t_opaque_match_record(LType, Opaques) of
- [Opaque] -> {State, Map, Opaque};
- _ ->
- case t_opaque_match_atom(LType, Opaques) of
- [Opaque] -> {State, Map, Opaque};
- _ -> {State, Map, LType}
- end
- end;
+ {State, Map, LType};
{ok, Type} -> {State, Map, Type}
end;
Other ->
@@ -343,20 +359,24 @@ traverse_list([], Map, State, Acc) ->
handle_apply(Tree, Map, State) ->
Args = cerl:apply_args(Tree),
Op = cerl:apply_op(Tree),
- {State1, Map1, ArgTypes} = traverse_list(Args, Map, State),
- {State2, Map2, OpType} = traverse(Op, Map1, State1),
+ {State0, Map1, ArgTypes} = traverse_list(Args, Map, State),
+ {State1, Map2, OpType} = traverse(Op, Map1, State0),
case any_none(ArgTypes) of
true ->
- {State2, Map2, t_none()};
+ {State1, Map2, t_none()};
false ->
- {CallSitesKnown, FunList} =
- case state__lookup_call_site(Tree, State2) of
- error -> {false, []};
- {ok, [external]} -> {false, []};
- {ok, List} -> {true, List}
+ FunList =
+ case state__lookup_call_site(Tree, State) of
+ error -> [external]; %% so that we go directly in the fallback
+ {ok, List} -> List
end,
- case CallSitesKnown of
- false ->
+ FunInfoList = [{local, state__fun_info(Fun, State)} || Fun <- FunList],
+ case
+ handle_apply_or_call(FunInfoList, Args, ArgTypes, Map2, Tree, State1)
+ of
+ {had_external, State2} ->
+ %% Fallback: use whatever info we collected from traversing the op
+ %% instead of the result that has been generalized to t_any().
Arity = length(Args),
OpType1 = t_inf(OpType, t_fun(Arity, t_any())),
case t_is_none(OpType1) of
@@ -367,7 +387,8 @@ handle_apply(Tree, Map, State) ->
Tree, Msg),
{State3, Map2, t_none()};
false ->
- NewArgs = t_inf_lists(ArgTypes, t_fun_args(OpType1)),
+ NewArgs = t_inf_lists(ArgTypes,
+ t_fun_args(OpType1, 'universe')),
case any_none(NewArgs) of
true ->
Msg = {fun_app_args,
@@ -378,7 +399,7 @@ handle_apply(Tree, Map, State) ->
{State3, enter_type(Op, OpType1, Map2), t_none()};
false ->
Map3 = enter_type_lists(Args, NewArgs, Map2),
- Range0 = t_fun_range(OpType1),
+ Range0 = t_fun_range(OpType1, 'universe'),
Range =
case t_is_unit(Range0) of
true -> t_none();
@@ -387,25 +408,23 @@ handle_apply(Tree, Map, State) ->
{State2, enter_type(Op, OpType1, Map3), Range}
end
end;
- true ->
- FunInfoList = [{local, state__fun_info(Fun, State)}
- || Fun <- FunList],
- handle_apply_or_call(FunInfoList, Args, ArgTypes, Map2, Tree, State1)
+ Normal -> Normal
end
end.
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State) ->
None = t_none(),
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State,
- [None || _ <- ArgTypes], None).
+ [None || _ <- ArgTypes], None, false).
handle_apply_or_call([{local, external}|Left], Args, ArgTypes, Map, Tree, State,
- _AccArgTypes, _AccRet) ->
+ _AccArgTypes, _AccRet, _HadExternal) ->
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree, State,
- ArgTypes, t_any());
+ ArgTypes, t_any(), true);
handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
Args, ArgTypes, Map, Tree,
- #state{opaques = Opaques} = State, AccArgTypes, AccRet) ->
+ #state{opaques = Opaques} = State,
+ AccArgTypes, AccRet, HadExternal) ->
Any = t_any(),
AnyArgs = [Any || _ <- Args],
GenSig = {AnyArgs, fun(_) -> t_any() end},
@@ -423,83 +442,55 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
{M, F, A} = Fun,
case erl_bif_types:is_known(M, F, A) of
true ->
- IsBIF = true,
BArgs = erl_bif_types:arg_types(M, F, A),
BRange =
fun(FunArgs) ->
- ArgPos = erl_bif_types:structure_inspecting_args(M, F, A),
- NewFunArgs =
- case ArgPos =:= [] of
- true -> FunArgs;
- false -> % some positions need to be un-opaqued
- N = length(FunArgs),
- PFs = lists:zip(lists:seq(1, N), FunArgs),
- [case ordsets:is_element(P, ArgPos) of
- true -> erl_types:t_unopaque(FArg, Opaques);
- false -> FArg
- end || {P, FArg} <- PFs]
- end,
- erl_bif_types:type(M, F, A, NewFunArgs)
+ erl_bif_types:type(M, F, A, FunArgs, Opaques)
end,
{BArgs, BRange};
- false -> IsBIF = false, GenSig
+ false ->
+ GenSig
end;
- local -> IsBIF = false, GenSig
+ local -> GenSig
end,
{SigArgs, SigRange} =
- %% if there is hard-coded or contract information with opaque types,
- %% the checking for possible type violations needs to take place w.r.t.
- %% this information and not w.r.t. the structure-based success typing.
- case prefer_opaque_types(CArgs, BifArgs) of
- true -> {AnyArgs, t_any()}; % effectively forgets the success typing
- false ->
- case Sig of
- {value, {SR, SA}} -> {SA, SR};
- none -> {AnyArgs, t_any()}
- end
- end,
- ArgModeMask = [case lists:member(Arg, Opaques) of
- true -> opaque;
- false -> structured
- end || Arg <- ArgTypes],
- NewArgsSig = t_inf_lists_masked(SigArgs, ArgTypes, ArgModeMask),
- NewArgsContract = t_inf_lists_masked(CArgs, ArgTypes, ArgModeMask),
- NewArgsBif = t_inf_lists_masked(BifArgs, ArgTypes, ArgModeMask),
- NewArgTypes0 = t_inf_lists_masked(NewArgsSig, NewArgsContract, ArgModeMask),
- NewArgTypes = t_inf_lists_masked(NewArgTypes0, NewArgsBif, ArgModeMask),
- BifRet = BifRange(NewArgTypes),
- {TmpArgTypes, TmpArgsContract} =
- case (TypeOfApply =:= remote) andalso (not IsBIF) of
- true ->
- List1 = lists:zip(CArgs, NewArgTypes),
- List2 = lists:zip(CArgs, NewArgsContract),
- {[erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List1],
- [erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List2]};
- false -> {NewArgTypes, NewArgsContract}
- end,
- ContrRet = CRange(TmpArgTypes),
- RetMode =
- case t_contains_opaque(ContrRet) orelse t_contains_opaque(BifRet) of
- true -> opaque;
- false -> structured
+ case Sig of
+ {value, {SR, SA}} -> {SA, SR};
+ none -> {AnyArgs, t_any()}
end,
- RetWithoutContr = t_inf(SigRange, BifRet, RetMode),
- RetWithoutLocal = t_inf(ContrRet, RetWithoutContr, RetMode),
+
?debug("--------------------------------------------------------\n", []),
- ?debug("Fun: ~p\n", [Fun]),
- ?debug("Args: ~s\n", [erl_types:t_to_string(t_product(ArgTypes))]),
+ ?debug("Fun: ~p\n", [state__lookup_name(Fun, State)]),
+ ?debug("Module ~p\n", [State#state.module]),
+ ?debug("CArgs ~s\n", [erl_types:t_to_string(t_product(CArgs))]),
+ ?debug("ArgTypes ~s\n", [erl_types:t_to_string(t_product(ArgTypes))]),
+ ?debug("BifArgs ~p\n", [erl_types:t_to_string(t_product(BifArgs))]),
+
+ NewArgsSig = t_inf_lists(SigArgs, ArgTypes, Opaques),
+ ?debug("SigArgs ~s\n", [erl_types:t_to_string(t_product(SigArgs))]),
?debug("NewArgsSig: ~s\n", [erl_types:t_to_string(t_product(NewArgsSig))]),
+ NewArgsContract = t_inf_lists(CArgs, ArgTypes, Opaques),
?debug("NewArgsContract: ~s\n",
[erl_types:t_to_string(t_product(NewArgsContract))]),
+ NewArgsBif = t_inf_lists(BifArgs, ArgTypes, Opaques),
?debug("NewArgsBif: ~s\n", [erl_types:t_to_string(t_product(NewArgsBif))]),
- ?debug("NewArgTypes: ~s\n", [erl_types:t_to_string(t_product(NewArgTypes))]),
+ NewArgTypes0 = t_inf_lists(NewArgsSig, NewArgsContract),
+ NewArgTypes = t_inf_lists(NewArgTypes0, NewArgsBif, Opaques),
+ ?debug("NewArgTypes ~s\n", [erl_types:t_to_string(t_product(NewArgTypes))]),
+ ?debug("\n", []),
+
+ BifRet = BifRange(NewArgTypes),
+ ContrRet = CRange(NewArgTypes),
+ RetWithoutContr = t_inf(SigRange, BifRet),
+ RetWithoutLocal = t_inf(ContrRet, RetWithoutContr),
+
?debug("RetWithoutContr: ~s\n",[erl_types:t_to_string(RetWithoutContr)]),
?debug("RetWithoutLocal: ~s\n", [erl_types:t_to_string(RetWithoutLocal)]),
?debug("BifRet: ~s\n", [erl_types:t_to_string(BifRange(NewArgTypes))]),
- ?debug("ContrRet: ~s\n", [erl_types:t_to_string(CRange(TmpArgTypes))]),
- ?debug("SigRet: ~s\n", [erl_types:t_to_string(SigRange)]),
+ ?debug("SigRange: ~s\n", [erl_types:t_to_string(SigRange)]),
+ ?debug("ContrRet: ~s\n", [erl_types:t_to_string(CRange(NewArgTypes))]),
+ ?debug("LocalRet: ~s\n", [erl_types:t_to_string(LocalRet)]),
+
State1 =
case is_race_analysis_enabled(State) of
true ->
@@ -513,6 +504,9 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
FailedConj = any_none([RetWithoutLocal|NewArgTypes]),
IsFailBif = t_is_none(BifRange(BifArgs)),
IsFailSig = t_is_none(SigRange),
+ ?debug("FailedConj: ~p~n", [FailedConj]),
+ ?debug("IsFailBif: ~p~n", [IsFailBif]),
+ ?debug("IsFailSig: ~p~n", [IsFailSig]),
State2 =
case FailedConj andalso not (IsFailBif orelse IsFailSig) of
true ->
@@ -532,14 +526,14 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
false ->
FailedSig = any_none(NewArgsSig),
FailedContract =
- any_none([CRange(TmpArgsContract)|NewArgsContract]),
+ any_none([CRange(NewArgsContract)|NewArgsContract]),
FailedBif = any_none([BifRange(NewArgsBif)|NewArgsBif]),
InfSig = t_inf(t_fun(SigArgs, SigRange),
- t_fun(BifArgs, BifRange(BifArgs))),
+ t_fun(BifArgs, BifRange(BifArgs))),
FailReason =
apply_fail_reason(FailedSig, FailedBif, FailedContract),
Msg = get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes, InfSig,
- Contr, CArgs, State1, FailReason),
+ Contr, CArgs, State1, FailReason, Opaques),
WarnType = case Msg of
{call, _} -> ?WARN_FAILING_CALL;
{apply, _} -> ?WARN_FAILING_CALL;
@@ -547,7 +541,8 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
{call_without_opaque, _} -> ?WARN_OPAQUE;
{opaque_type_test, _} -> ?WARN_OPAQUE
end,
- state__add_warning(State1, WarnType, Tree, Msg)
+ Frc = {erlang, is_record, 3} =:= state__lookup_name(Fun, State),
+ state__add_warning(State1, WarnType, Tree, Msg, Frc)
end;
false -> State1
end,
@@ -571,16 +566,21 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
TotalRet =
case t_is_none(LocalRet) andalso t_is_unit(RetWithoutLocal) of
true -> RetWithoutLocal;
- false -> t_inf(RetWithoutLocal, LocalRet, opaque)
+ false -> t_inf(RetWithoutLocal, LocalRet)
end,
NewAccRet = t_sup(AccRet, TotalRet),
?debug("NewAccRet: ~s\n", [t_to_string(NewAccRet)]),
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree,
- State3, NewAccArgTypes, NewAccRet);
+ State3, NewAccArgTypes, NewAccRet, HadExternal);
handle_apply_or_call([], Args, _ArgTypes, Map, _Tree, State,
- AccArgTypes, AccRet) ->
- NewMap = enter_type_lists(Args, AccArgTypes, Map),
- {State, NewMap, AccRet}.
+ AccArgTypes, AccRet, HadExternal) ->
+ case HadExternal of
+ false ->
+ NewMap = enter_type_lists(Args, AccArgTypes, Map),
+ {State, NewMap, AccRet};
+ true ->
+ {had_external, State}
+ end.
apply_fail_reason(FailedSig, FailedBif, FailedContract) ->
if
@@ -590,7 +590,7 @@ apply_fail_reason(FailedSig, FailedBif, FailedContract) ->
end.
get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
- Sig, Contract, ContrArgs, State, FailReason) ->
+ Sig, Contract, ContrArgs, State, FailReason, Opaques) ->
ArgStrings = format_args(Args, ArgTypes, State),
ContractInfo =
case Contract of
@@ -599,44 +599,52 @@ get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
dialyzer_contracts:contract_to_string(C)};
none -> {false, none}
end,
- EnumArgTypes =
- case NewArgTypes of
- [] -> [];
- _ -> lists:zip(lists:seq(1, length(NewArgTypes)), NewArgTypes)
- end,
+ EnumArgTypes = lists:zip(lists:seq(1, length(NewArgTypes)), NewArgTypes),
ArgNs = [Arg || {Arg, Type} <- EnumArgTypes, t_is_none(Type)],
case state__lookup_name(Fun, State) of
- {M, F, _A} ->
- case is_opaque_type_test_problem(Fun, NewArgTypes, State) of
- true ->
- [Opaque] = NewArgTypes,
- {opaque_type_test, [atom_to_list(F), erl_types:t_to_string(Opaque)]};
- false ->
+ {M, F, A} ->
+ case is_opaque_type_test_problem(Fun, Args, NewArgTypes, State) of
+ {yes, Arg, ArgType} ->
+ {opaque_type_test, [atom_to_list(F), ArgStrings,
+ format_arg(Arg), format_type(ArgType, State)]};
+ no ->
SigArgs = t_fun_args(Sig),
- case is_opaque_related_problem(ArgNs, ArgTypes) of
- true -> %% an opaque term is used where a structured term is expected
- ExpectedArgs =
- case FailReason of
- only_sig -> SigArgs;
- _ -> ContrArgs
- end,
- {call_with_opaque, [M, F, ArgStrings, ArgNs, ExpectedArgs]};
- false ->
- case is_opaque_related_problem(ArgNs, SigArgs) orelse
- is_opaque_related_problem(ArgNs, ContrArgs) of
- true -> %% a structured term is used where an opaque is expected
- ExpectedTriples =
- case FailReason of
- only_sig -> expected_arg_triples(ArgNs, SigArgs, State);
- _ -> expected_arg_triples(ArgNs, ContrArgs, State)
- end,
- {call_without_opaque, [M, F, ArgStrings, ExpectedTriples]};
- false -> %% there is a structured term clash in some argument
- {call, [M, F, ArgStrings,
- ArgNs, FailReason,
- format_sig_args(Sig, State),
- format_type(t_fun_range(Sig), State),
- ContractInfo]}
+ BadOpaque =
+ opaque_problems([SigArgs, ContrArgs], ArgTypes, Opaques, ArgNs),
+ %% In fact *both* 'call_with_opaque' and
+ %% 'call_without_opaque' are possible.
+ case lists:keyfind(decl, 1, BadOpaque) of
+ {decl, BadArgs} ->
+ %% a structured term is used where an opaque is expected
+ ExpectedTriples =
+ case FailReason of
+ only_sig -> expected_arg_triples(BadArgs, SigArgs, State);
+ _ -> expected_arg_triples(BadArgs, ContrArgs, State)
+ end,
+ {call_without_opaque, [M, F, ArgStrings, ExpectedTriples]};
+ false ->
+ case lists:keyfind(use, 1, BadOpaque) of
+ {use, BadArgs} ->
+ %% an opaque term is used where a structured term is expected
+ ExpectedArgs =
+ case FailReason of
+ only_sig -> SigArgs;
+ _ -> ContrArgs
+ end,
+ {call_with_opaque, [M, F, ArgStrings, BadArgs, ExpectedArgs]};
+ false ->
+ case
+ erl_bif_types:opaque_args(M, F, A, ArgTypes, Opaques)
+ of
+ [] -> %% there is a structured term clash in some argument
+ {call, [M, F, ArgStrings,
+ ArgNs, FailReason,
+ format_sig_args(Sig, State),
+ format_type(t_fun_range(Sig), State),
+ ContractInfo]};
+ Ns ->
+ {call_with_opaque, [M, F, ArgStrings, Ns, ContrArgs]}
+ end
end
end
end;
@@ -648,31 +656,48 @@ get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
ContractInfo]}
end.
-%% returns 'true' if we are running with opaque on (not checked yet),
-%% and there is either a contract or hard-coded type information with
-%% opaque types
-%% TODO: check that we are running with opaque types
-%% TODO: check the return type also
-prefer_opaque_types(CArgs, BifArgs) ->
- t_contains_opaque(t_product(CArgs))
- orelse t_contains_opaque(t_product(BifArgs)).
-
-is_opaque_related_problem(ArgNs, ArgTypes) ->
- Fun = fun (N) -> erl_types:t_contains_opaque(lists:nth(N, ArgTypes)) end,
- ArgNs =/= [] andalso lists:all(Fun, ArgNs).
-
-is_opaque_type_test_problem(Fun, ArgTypes, State) ->
+%% -> [{ElementI, [ArgN]}] where [ArgN] is a non-empty list of
+%% arguments containing unknown opaque types and Element is 1 or 2.
+opaque_problems(ContractOrSigList, ArgTypes, Opaques, ArgNs) ->
+ ArgElementList = find_unknown(ContractOrSigList, ArgTypes, Opaques, ArgNs),
+ F = fun(1) -> decl; (2) -> use end,
+ [{F(ElementI), lists:usort([ArgN || {ArgN, EI} <- ArgElementList,
+ EI =:= ElementI])} ||
+ ElementI <- lists:usort([EI || {_, EI} <- ArgElementList])].
+
+%% -> [{ArgN, ElementI}] where ElementI = 1 means there is an unknown
+%% opaque type in argument ArgN of the the contract/signature,
+%% and ElementI = 2 means that there is an unknown opaque type in
+%% argument ArgN of the the (current) argument types.
+find_unknown(ContractOrSigList, ArgTypes, Opaques, NoneArgNs) ->
+ ArgNs = lists:seq(1, length(ArgTypes)),
+ [{ArgN, ElementI} ||
+ ContractOrSig <- ContractOrSigList,
+ {E1, E2, ArgN} <- lists:zip3(ContractOrSig, ArgTypes, ArgNs),
+ lists:member(ArgN, NoneArgNs),
+ ElementI <- erl_types:t_find_unknown_opaque(E1, E2, Opaques)].
+
+is_opaque_type_test_problem(Fun, Args, ArgTypes, State) ->
case Fun of
{erlang, FN, 1} when FN =:= is_atom; FN =:= is_boolean;
FN =:= is_binary; FN =:= is_bitstring;
FN =:= is_float; FN =:= is_function;
FN =:= is_integer; FN =:= is_list;
FN =:= is_number; FN =:= is_pid; FN =:= is_port;
- FN =:= is_reference; FN =:= is_tuple ->
- [Type] = ArgTypes,
- erl_types:t_is_opaque(Type) andalso
- not lists:member(Type, State#state.opaques);
- _ -> false
+ FN =:= is_reference; FN =:= is_tuple;
+ FN =:= is_map ->
+ type_test_opaque_arg(Args, ArgTypes, State#state.opaques);
+ {erlang, FN, 2} when FN =:= is_function ->
+ type_test_opaque_arg(Args, ArgTypes, State#state.opaques);
+ _ -> no
+ end.
+
+type_test_opaque_arg([], [], _Opaques) ->
+ no;
+type_test_opaque_arg([Arg|Args], [ArgType|ArgTypes], Opaques) ->
+ case erl_types:t_has_opaque_subtype(ArgType, Opaques) of
+ true -> {yes, Arg, ArgType};
+ false -> type_test_opaque_arg(Args, ArgTypes, Opaques)
end.
expected_arg_triples(ArgNs, ArgTypes, State) ->
@@ -683,47 +708,56 @@ expected_arg_triples(ArgNs, ArgTypes, State) ->
add_bif_warnings({erlang, Op, 2}, [T1, T2] = Ts, Tree, State)
when Op =:= '=:='; Op =:= '==' ->
- Type1 = erl_types:t_unopaque(T1, State#state.opaques),
- Type2 = erl_types:t_unopaque(T2, State#state.opaques),
- Inf = t_inf(T1, T2),
- Inf1 = t_inf(Type1, Type2),
- case t_is_none(Inf) andalso t_is_none(Inf1) andalso(not any_none(Ts))
- andalso (not is_int_float_eq_comp(T1, Op, T2)) of
+ Opaques = State#state.opaques,
+ Inf = t_inf(T1, T2, Opaques),
+ case
+ t_is_none(Inf) andalso (not any_none(Ts))
+ andalso (not is_int_float_eq_comp(T1, Op, T2, Opaques))
+ of
true ->
- Args = case erl_types:t_is_opaque(T1) of
- true -> [format_type(T2, State), Op, format_type(T1, State)];
- false -> [format_type(T1, State), Op, format_type(T2, State)]
- end,
- case any_opaque(Ts) of
- true ->
- state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_eq, Args});
- false ->
- state__add_warning(State, ?WARN_MATCHING, Tree, {exact_eq, Args})
+ %% Give priority to opaque warning (as usual).
+ case erl_types:t_find_unknown_opaque(T1, T2, Opaques) of
+ [] ->
+ Args = comp_format_args([], T1, Op, T2, State),
+ state__add_warning(State, ?WARN_MATCHING, Tree, {exact_eq, Args});
+ Ns ->
+ Args = comp_format_args(Ns, T1, Op, T2, State),
+ state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_eq, Args})
end;
false ->
State
end;
add_bif_warnings({erlang, Op, 2}, [T1, T2] = Ts, Tree, State)
when Op =:= '=/='; Op =:= '/=' ->
- Inf = t_inf(T1, T2),
- case t_is_none(Inf) andalso (not any_none(Ts))
- andalso (not is_int_float_eq_comp(T1, Op, T2)) andalso any_opaque(Ts) of
+ Opaques = State#state.opaques,
+ case
+ (not any_none(Ts))
+ andalso (not is_int_float_eq_comp(T1, Op, T2, Opaques))
+ of
true ->
- Args = case erl_types:t_is_opaque(T1) of
- true -> [format_type(T2, State), Op, format_type(T1, State)];
- false -> [format_type(T1, State), Op, format_type(T2, State)]
- end,
- state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_neq, Args});
+ case erl_types:t_find_unknown_opaque(T1, T2, Opaques) of
+ [] -> State;
+ Ns ->
+ Args = comp_format_args(Ns, T1, Op, T2, State),
+ state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_neq, Args})
+ end;
false ->
State
end;
add_bif_warnings(_, _, _, State) ->
State.
-is_int_float_eq_comp(T1, Op, T2) ->
+is_int_float_eq_comp(T1, Op, T2, Opaques) ->
(Op =:= '==' orelse Op =:= '/=') andalso
- ((erl_types:t_is_float(T1) andalso erl_types:t_is_integer(T2)) orelse
- (erl_types:t_is_integer(T1) andalso erl_types:t_is_float(T2))).
+ ((erl_types:t_is_float(T1, Opaques)
+ andalso t_is_integer(T2, Opaques)) orelse
+ (t_is_integer(T1, Opaques)
+ andalso erl_types:t_is_float(T2, Opaques))).
+
+comp_format_args([1|_], T1, Op, T2, State) ->
+ [format_type(T2, State), Op, format_type(T1, State)];
+comp_format_args(_, T1, Op, T2, State) ->
+ [format_type(T1, State), Op, format_type(T2, State)].
%%----------------------------------------
@@ -784,16 +818,27 @@ handle_bitstr(Tree, Map, State) ->
{State3, Map2, t_none()};
false ->
UnitVal = cerl:concrete(cerl:bitstr_unit(Tree)),
- Type =
- case t_number_vals(SizeType) of
- [OneSize] -> t_bitstr(0, OneSize * UnitVal);
- _ ->
- MinSize = erl_types:number_min(SizeType),
- t_bitstr(UnitVal, UnitVal * MinSize)
- end,
+ Opaques = State2#state.opaques,
+ NumberVals = t_number_vals(SizeType, Opaques),
+ {State3, Type} =
+ case t_contains_opaque(SizeType, Opaques) of
+ true ->
+ Msg = {opaque_size, [format_type(SizeType, State2),
+ format_cerl(Size)]},
+ {state__add_warning(State2, ?WARN_OPAQUE, Size, Msg),
+ t_none()};
+ false ->
+ case NumberVals of
+ [OneSize] -> {State2, t_bitstr(0, OneSize * UnitVal)};
+ unknown -> {State2, t_bitstr()};
+ _ ->
+ MinSize = erl_types:number_min(SizeType, Opaques),
+ {State2, t_bitstr(UnitVal, UnitVal * MinSize)}
+ end
+ end,
Map3 = enter_type_lists([Val, Size, Tree],
[ValType, SizeType, Type], Map2),
- {State2, Map3, Type}
+ {State3, Map3, Type}
end
end.
@@ -805,34 +850,47 @@ handle_call(Tree, Map, State) ->
Args = cerl:call_args(Tree),
MFAList = [M, F|Args],
{State1, Map1, [MType0, FType0|As]} = traverse_list(MFAList, Map, State),
- %% Module and function names should be treated as *structured terms*
- %% even if they happen to be identical to an atom (or tuple) which
- %% is also involved in the definition of an opaque data type.
- MType = t_inf(t_module(), t_unopaque(MType0)),
- FType = t_inf(t_atom(), t_unopaque(FType0)),
+ Opaques = State#state.opaques,
+ MType = t_inf(t_module(), MType0, Opaques),
+ FType = t_inf(t_atom(), FType0, Opaques),
Map2 = enter_type_lists([M, F], [MType, FType], Map1),
+ MOpaque = t_is_none(MType) andalso (not t_is_none(MType0)),
+ FOpaque = t_is_none(FType) andalso (not t_is_none(FType0)),
case any_none([MType, FType|As]) of
true ->
State2 =
- case t_is_none(MType) andalso (not t_is_none(MType0)) of
- true -> % This is a problem we just detected; not a known one
- MS = format_cerl(M),
- Msg = {app_call, [MS, format_cerl(F),
- format_args(Args, As, State1),
- MS, format_type(t_module(), State1),
- format_type(MType0, State1)]},
- state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
- false ->
- case t_is_none(FType) andalso (not t_is_none(FType0)) of
- true ->
- FS = format_cerl(F),
- Msg = {app_call, [format_cerl(M), FS,
- format_args(Args, As, State1),
- FS, format_type(t_atom(), State1),
- format_type(FType0, State1)]},
- state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
- false -> State1
- end
+ if
+ MOpaque -> % This is a problem we just detected; not a known one
+ MS = format_cerl(M),
+ case t_is_none(t_inf(t_module(), MType0)) of
+ true ->
+ Msg = {app_call, [MS, format_cerl(F),
+ format_args(Args, As, State1),
+ MS, format_type(t_module(), State1),
+ format_type(MType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
+ false ->
+ Msg = {opaque_call, [MS, format_cerl(F),
+ format_args(Args, As, State1),
+ MS, format_type(MType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg)
+ end;
+ FOpaque ->
+ FS = format_cerl(F),
+ case t_is_none(t_inf(t_atom(), FType0)) of
+ true ->
+ Msg = {app_call, [format_cerl(M), FS,
+ format_args(Args, As, State1),
+ FS, format_type(t_atom(), State1),
+ format_type(FType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
+ false ->
+ Msg = {opaque_call, [format_cerl(M), FS,
+ format_args(Args, As, State1),
+ FS, format_type(FType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg)
+ end;
+ true -> State1
end,
{State2, Map2, t_none()};
false ->
@@ -874,7 +932,7 @@ handle_case(Tree, Map, State) ->
handle_clauses(Clauses, Arg, ArgType, ArgType, State2,
[], Map2, [], []),
Map3 = join_maps_end(MapList, Map2),
- debug_pp_map(Map2),
+ debug_pp_map(Map3),
{State3, Map3, Type}
end.
@@ -886,7 +944,7 @@ handle_cons(Tree, Map, State) ->
{State1, Map1, HdType} = traverse(Hd, Map, State),
{State2, Map2, TlType} = traverse(Tl, Map1, State1),
State3 =
- case t_is_none(t_inf(TlType, t_list())) of
+ case t_is_none(t_inf(TlType, t_list(), State2#state.opaques)) of
true ->
Msg = {improper_list_constr, [format_type(TlType, State2)]},
state__add_warning(State2, ?WARN_NON_PROPER_LIST, Tree, Msg);
@@ -979,8 +1037,9 @@ handle_receive(Tree, Map, State) ->
[], []),
Map1 = join_maps(MapList, Map),
{State3, Map2, TimeoutType} = traverse(Timeout, Map1, State2),
- case (t_is_atom(TimeoutType) andalso
- (t_atom_vals(TimeoutType) =:= ['infinity'])) of
+ Opaques = State3#state.opaques,
+ case (t_is_atom(TimeoutType, Opaques) andalso
+ (t_atom_vals(TimeoutType, Opaques) =:= ['infinity'])) of
true ->
{State3, Map2, ReceiveType};
false ->
@@ -1023,6 +1082,19 @@ handle_try(Tree, Map, State) ->
%%----------------------------------------
+handle_map(Tree,Map,State) ->
+ Pairs = cerl:map_es(Tree),
+ {State1, Map1, TypePairs} = traverse_list(Pairs,Map,State),
+ {State1, Map1, t_map(TypePairs)}.
+
+handle_map_pair(Tree,Map,State) ->
+ Key = cerl:map_pair_key(Tree),
+ Val = cerl:map_pair_val(Tree),
+ {State1, Map1, [K,V]} = traverse_list([Key,Val],Map,State),
+ {State1, Map1, {K,V}}.
+
+%%----------------------------------------
+
handle_tuple(Tree, Map, State) ->
Elements = cerl:tuple_es(Tree),
{State1, Map1, EsType} = traverse_list(Elements, Map, State),
@@ -1031,55 +1103,46 @@ handle_tuple(Tree, Map, State) ->
true ->
{State1, Map1, t_none()};
false ->
- %% Let's find out if this is a record or opaque construction.
+ %% Let's find out if this is a record
case Elements of
[Tag|Left] ->
- case cerl:is_c_atom(Tag) of
+ case cerl:is_c_atom(Tag) andalso is_literal_record(Tree) of
true ->
TagVal = cerl:atom_val(Tag),
- case t_opaque_match_record(TupleType, State1#state.opaques) of
- [Opaque] ->
- RecStruct = t_opaque_matching_structure(TupleType, Opaque),
- RecFields = t_tuple_args(RecStruct),
- case bind_pat_vars(Elements, RecFields, [], Map1, State1) of
- {error, _, ErrorPat, ErrorType, _} ->
- Msg = {record_constr,
- [TagVal, format_patterns(ErrorPat),
- format_type(ErrorType, State1)]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- {Map2, _ETypes} ->
- {State1, Map2, Opaque}
- end;
- _ ->
- case state__lookup_record(TagVal, length(Left), State1) of
- error -> {State1, Map1, TupleType};
- {ok, RecType} ->
- InfTupleType = t_inf(RecType, TupleType),
- case t_is_none(InfTupleType) of
- true ->
- RecC = format_type(TupleType, State1),
- FieldDiffs = format_field_diffs(TupleType, State1),
- Msg = {record_constr, [RecC, FieldDiffs]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- false ->
- case bind_pat_vars(Elements, t_tuple_args(RecType),
- [], Map1, State1) of
- {error, bind, ErrorPat, ErrorType, _} ->
- Msg = {record_constr,
- [TagVal, format_patterns(ErrorPat),
- format_type(ErrorType, State1)]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- {Map2, ETypes} ->
- {State1, Map2, t_tuple(ETypes)}
- end
- end
- end
+ case state__lookup_record(TagVal, length(Left), State1) of
+ error -> {State1, Map1, TupleType};
+ {ok, RecType} ->
+ InfTupleType = t_inf(RecType, TupleType),
+ case t_is_none(InfTupleType) of
+ true ->
+ RecC = format_type(TupleType, State1),
+ FieldDiffs = format_field_diffs(TupleType, State1),
+ Msg = {record_constr, [RecC, FieldDiffs]},
+ State2 = state__add_warning(State1, ?WARN_MATCHING,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ false ->
+ case bind_pat_vars(Elements, t_tuple_args(RecType),
+ [], Map1, State1) of
+ {error, bind, ErrorPat, ErrorType, _} ->
+ Msg = {record_constr,
+ [TagVal, format_patterns(ErrorPat),
+ format_type(ErrorType, State1)]},
+ State2 = state__add_warning(State1, ?WARN_MATCHING,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ {error, opaque, ErrorPat, ErrorType, OpaqueType} ->
+ Msg = {opaque_match,
+ [format_patterns(ErrorPat),
+ format_type(ErrorType, State1),
+ format_type(OpaqueType, State1)]},
+ State2 = state__add_warning(State1, ?WARN_OPAQUE,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ {Map2, ETypes} ->
+ {State1, Map2, t_tuple(ETypes)}
+ end
+ end
end;
false ->
{State1, Map1, t_tuple(EsType)}
@@ -1173,15 +1236,10 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
false ->
{State1, Map, t_none(), ArgType0};
true ->
- PatString =
- case ErrorType of
- bind -> format_patterns(Pats);
- record -> format_patterns(Pats);
- opaque -> format_patterns(NewPats)
- end,
{Msg, Force} =
case t_is_none(ArgType0) of
true ->
+ PatString = format_patterns(Pats),
PatTypes = [PatString, format_type(OrigArgType, State1)],
%% See if this is covered by an earlier clause or if it
%% simply cannot match
@@ -1231,6 +1289,12 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
false ->
true
end,
+ PatString =
+ case ErrorType of
+ bind -> format_patterns(Pats);
+ record -> format_patterns(NewPats);
+ opaque -> format_patterns(NewPats)
+ end,
PatTypes = case ErrorType of
bind -> [PatString, format_type(ArgType0, State1)];
record -> [PatString, format_type(Type, State1)];
@@ -1356,7 +1420,9 @@ bind_pat_vars_reverse(Pats, Types, Acc, Map, State) ->
end.
bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
- ?debug("Binding pat: ~w to ~s\n", [cerl:type(Pat), format_type(Type, State)]),
+ ?debug("Binding pat: ~w to ~s\n", [cerl:type(Pat), format_type(Type, State)]
+),
+ Opaques = State#state.opaques,
{NewMap, TypeOut} =
case cerl:type(Pat) of
alias ->
@@ -1372,9 +1438,15 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
case Rev of
true -> {Map, t_bitstr()};
false ->
- BinType = t_inf(t_bitstr(), Type),
+ BinType = t_inf(t_bitstr(), Type, Opaques),
case t_is_none(BinType) of
- true -> bind_error([Pat], Type, t_none(), bind);
+ true ->
+ case t_find_opaque_mismatch(t_bitstr(), Type, Opaques) of
+ {ok, T1, T2} ->
+ bind_error([Pat], T1, T2, opaque);
+ error ->
+ bind_error([Pat], Type, t_none(), bind)
+ end;
false ->
Segs = cerl:binary_segments(Pat),
{Map1, SegTypes} = bind_bin_segs(Segs, BinType, Map, State),
@@ -1382,36 +1454,34 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
end
end;
cons ->
- Cons = t_inf(Type, t_cons()),
+ Cons = t_inf(Type, t_cons(), Opaques),
case t_is_none(Cons) of
true ->
- bind_opaque_pats(t_cons(), Type, Pat, Map, State, Rev);
+ bind_opaque_pats(t_cons(), Type, Pat, State);
false ->
{Map1, [HdType, TlType]} =
bind_pat_vars([cerl:cons_hd(Pat), cerl:cons_tl(Pat)],
- [t_cons_hd(Cons), t_cons_tl(Cons)],
+ [t_cons_hd(Cons, Opaques),
+ t_cons_tl(Cons, Opaques)],
[], Map, State, Rev),
{Map1, t_cons(HdType, TlType)}
end;
literal ->
Literal = literal_type(Pat),
- LiteralOrOpaque =
- case t_opaque_match_atom(Literal, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Literal
- end,
- case t_is_none(t_inf(LiteralOrOpaque, Type)) of
+ case t_is_none(t_inf(Literal, Type, Opaques)) of
true ->
- bind_opaque_pats(Literal, Type, Pat, Map, State, Rev);
- false -> {Map, LiteralOrOpaque}
+ bind_opaque_pats(Literal, Type, Pat, State);
+ false -> {Map, Literal}
end;
+ map ->
+ {Map, t_map([])};
tuple ->
Es = cerl:tuple_es(Pat),
{TypedRecord, Prototype} =
case Es of
[] -> {false, t_tuple([])};
[Tag|Left] ->
- case cerl:is_c_atom(Tag) of
+ case cerl:is_c_atom(Tag) andalso is_literal_record(Pat) of
true ->
TagAtom = cerl:atom_val(Tag),
case state__lookup_record(TagAtom, length(Left), State) of
@@ -1419,27 +1489,28 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
{ok, Record} ->
[_Head|AnyTail] = [t_any() || _ <- Es],
UntypedRecord = t_tuple([t_atom(TagAtom)|AnyTail]),
- {not erl_types:t_is_equal(Record, UntypedRecord), Record}
+ {not t_is_equal(Record, UntypedRecord), Record}
end;
false -> {false, t_tuple(length(Es))}
end
end,
- Tuple = t_inf(Prototype, Type),
+ Tuple = t_inf(Prototype, Type, Opaques),
case t_is_none(Tuple) of
true ->
- bind_opaque_pats(Prototype, Type, Pat, Map, State, Rev);
+ bind_opaque_pats(Prototype, Type, Pat, State);
false ->
- SubTuples = t_tuple_subtypes(Tuple),
+ SubTuples = t_tuple_subtypes(Tuple, Opaques),
%% Need to call the top function to get the try-catch wrapper
MapJ = join_maps_begin(Map),
Results =
case Rev of
true ->
- [bind_pat_vars_reverse(Es, t_tuple_args(SubTuple), [],
- MapJ, State)
+ [bind_pat_vars_reverse(Es, t_tuple_args(SubTuple, Opaques),
+ [], MapJ, State)
|| SubTuple <- SubTuples];
false ->
- [bind_pat_vars(Es, t_tuple_args(SubTuple), [], MapJ, State)
+ [bind_pat_vars(Es, t_tuple_args(SubTuple, Opaques), [],
+ MapJ, State)
|| SubTuple <- SubTuples]
end,
case lists:keyfind(opaque, 2, Results) of
@@ -1466,47 +1537,24 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
bind_pat_vars(Es, t_to_tlist(Type), [], Map, State, Rev),
{Map1, t_product(EsTypes)};
var ->
- Opaques = State#state.opaques,
VarType1 =
- case state__lookup_type_for_rec_var(Pat, State) of
- error ->
- LType = lookup_type(Pat, Map),
- case t_opaque_match_record(LType, Opaques) of
- [Opaque] -> Opaque;
- _ ->
- case t_opaque_match_atom(LType, Opaques) of
- [Opaque] -> Opaque;
- _ -> LType
- end
- end;
+ case state__lookup_type_for_letrec(Pat, State) of
+ error -> lookup_type(Pat, Map);
{ok, RecType} -> RecType
end,
%% Must do inf when binding args to pats. Vars in pats are fresh.
- VarType2 = t_inf(VarType1, Type),
- VarType3 =
- case Opaques =/= [] of
- true ->
- case t_opaque_match_record(VarType2, Opaques) of
- [OpaqueRec] -> OpaqueRec;
- _ ->
- case t_opaque_match_atom(VarType2, Opaques) of
- [OpaqueAtom] -> OpaqueAtom;
- _ -> VarType2
- end
- end;
- false -> VarType2
- end,
- case t_is_none(VarType3) of
+ VarType2 = t_inf(VarType1, Type, Opaques),
+ case t_is_none(VarType2) of
true ->
- case t_find_opaque_mismatch(VarType1, Type) of
+ case t_find_opaque_mismatch(VarType1, Type, Opaques) of
{ok, T1, T2} ->
bind_error([Pat], T1, T2, opaque);
error ->
bind_error([Pat], Type, t_none(), bind)
end;
false ->
- Map1 = enter_type(Pat, VarType3, Map),
- {Map1, VarType3}
+ Map1 = enter_type(Pat, VarType2, Map),
+ {Map1, VarType2}
end;
_Other ->
%% Catch all is needed when binding args to pats
@@ -1529,7 +1577,8 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
binary = SegType, [] = Segs, %% just an assert
T = t_inf(t_bitstr(UnitVal, 0), BinType),
{Map1, [Type]} = bind_pat_vars([Val], [T], [], Map, State, false),
- bind_bin_segs(Segs, t_bitstr(0, 0), [Type|Acc], Map1, State);
+ Type1 = remove_local_opaque_types(Type, State#state.opaques),
+ bind_bin_segs(Segs, t_bitstr(0, 0), [Type1|Acc], Map1, State);
utf -> % XXX: possibly can be strengthened
true = lists:member(SegType, [utf8, utf16, utf32]),
{Map1, [_]} = bind_pat_vars([Val], [t_integer()], [], Map, State, false),
@@ -1539,11 +1588,17 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
Size = cerl:bitstr_size(Seg),
{Map1, [SizeType]} =
bind_pat_vars([Size], [t_non_neg_integer()], [], Map, State, false),
+ Opaques = State#state.opaques,
+ NumberVals = t_number_vals(SizeType, Opaques),
+ case t_contains_opaque(SizeType, Opaques) of
+ true -> bind_error([Seg], SizeType, t_none(), opaque);
+ false -> ok
+ end,
Type =
- case t_number_vals(SizeType) of
+ case NumberVals of
[OneSize] -> t_bitstr(0, UnitVal * OneSize);
- _ ->
- MinSize = erl_types:number_min(SizeType),
+ _ -> % 'unknown' too
+ MinSize = erl_types:number_min(SizeType, Opaques),
t_bitstr(UnitVal, UnitVal * MinSize)
end,
ValConstr =
@@ -1551,16 +1606,24 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
binary -> Type; %% The same constraints as for the whole bitstr
float -> t_float();
integer ->
- case t_number_vals(SizeType) of
+ case NumberVals of
unknown -> t_integer();
List ->
SizeVal = lists:max(List),
Flags = cerl:concrete(cerl:bitstr_flags(Seg)),
N = SizeVal * UnitVal,
- case lists:member(signed, Flags) of
- true -> t_from_range(-(1 bsl (N - 1)), 1 bsl (N - 1) - 1);
- false -> t_from_range(0, 1 bsl N - 1)
- end
+ case N >= ?BITS of
+ true ->
+ case lists:member(signed, Flags) of
+ true -> t_from_range(neg_inf, pos_inf);
+ false -> t_from_range(0, pos_inf)
+ end;
+ false ->
+ case lists:member(signed, Flags) of
+ true -> t_from_range(-(1 bsl (N - 1)), 1 bsl (N - 1) - 1);
+ false -> t_from_range(0, 1 bsl N - 1)
+ end
+ end
end
end,
{Map2, [_]} = bind_pat_vars([Val], [ValConstr], [], Map1, State, false),
@@ -1573,21 +1636,26 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
bind_bin_segs([], _BinType, Acc, Map, _State) ->
{Map, lists:reverse(Acc)}.
-bind_error(Pats, Type, OpaqueType, Error) ->
+bind_error(Pats, Type, OpaqueType, Error0) ->
+ Error = case {Error0, Pats} of
+ {bind, [Pat]} ->
+ case is_literal_record(Pat) of
+ true -> record;
+ false -> Error0
+ end;
+ _ -> Error0
+ end,
throw({error, Error, Pats, Type, OpaqueType}).
-bind_opaque_pats(GenType, Type, Pat, Map, State, Rev) ->
- case t_find_opaque_mismatch(GenType, Type) of
+-spec bind_opaque_pats(type(), type(), cerl:c_literal(), state()) ->
+ no_return().
+
+bind_opaque_pats(GenType, Type, Pat, State) ->
+ case t_find_opaque_mismatch(GenType, Type, State#state.opaques) of
{ok, T1, T2} ->
- case lists:member(T2, State#state.opaques) of
- true ->
- NewType = erl_types:t_struct_from_opaque(Type, [T2]),
- {Map1, _} =
- bind_pat_vars([Pat], [NewType], [], Map, State, Rev),
- {Map1, T2};
- false -> bind_error([Pat], T1, T2, opaque)
- end;
- error -> bind_error([Pat], Type, t_none(), bind)
+ bind_error([Pat], T1, T2, opaque);
+ error ->
+ bind_error([Pat], Type, t_none(), bind)
end.
%%----------------------------------------
@@ -1630,6 +1698,8 @@ bind_guard(Guard, Map, Env, Eval, State) ->
Es0 = cerl:tuple_es(Guard),
{Map1, Es} = bind_guard_list(Es0, Map, Env, dont_know, State),
{Map1, t_tuple(Es)};
+ map ->
+ {Map, t_map([])};
'let' ->
Arg = cerl:let_arg(Guard),
[Var] = cerl:let_vars(Guard),
@@ -1700,19 +1770,9 @@ handle_guard_call(Guard, Map, Env, Eval, State) ->
handle_guard_gen_fun({M, F, A}, Guard, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
- {Map1, As0} = bind_guard_list(Args, Map, Env, dont_know, State),
- MapFun = fun(Type) ->
- case lists:member(Type, State#state.opaques) of
- true -> erl_types:t_opaque_structure(Type);
- false -> Type
- end
- end,
- As = lists:map(MapFun, As0),
- Mode = case As =:= As0 of
- true -> structured;
- false -> opaque
- end,
- BifRet = erl_bif_types:type(M, F, A, As),
+ {Map1, As} = bind_guard_list(Args, Map, Env, dont_know, State),
+ Opaques = State#state.opaques,
+ BifRet = erl_bif_types:type(M, F, A, As, Opaques),
case t_is_none(BifRet) of
true ->
%% Is this an error-bif?
@@ -1721,11 +1781,8 @@ handle_guard_gen_fun({M, F, A}, Guard, Map, Env, Eval, State) ->
false -> signal_guard_fatal_fail(Eval, Guard, As, State)
end;
false ->
- BifArgs = case erl_bif_types:arg_types(M, F, A) of
- unknown -> lists:duplicate(A, t_any());
- List -> List
- end,
- Map2 = enter_type_lists(Args, t_inf_lists(BifArgs, As0, Mode), Map1),
+ BifArgs = bif_args(M, F, A),
+ Map2 = enter_type_lists(Args, t_inf_lists(BifArgs, As, Opaques), Map1),
Ret =
case Eval of
pos -> t_inf(t_atom(true), BifRet);
@@ -1771,29 +1828,19 @@ bind_type_test(Eval, TypeTest, ArgType, State) ->
is_reference -> t_reference();
is_tuple -> t_tuple()
end,
- Mode = determine_mode(ArgType, State#state.opaques),
case Eval of
pos ->
- Inf = t_inf(Type, ArgType, Mode),
+ Inf = t_inf(Type, ArgType, State#state.opaques),
case t_is_none(Inf) of
true -> error;
false -> {ok, Inf, t_atom(true)}
end;
neg ->
- case Mode of
- opaque ->
- Struct = erl_types:t_opaque_structure(ArgType),
- case t_is_none(t_subtract(Struct, Type)) of
- true -> error;
- false -> {ok, ArgType, t_atom(false)}
- end;
- structured ->
- Sub = t_subtract(ArgType, Type),
- case t_is_none(Sub) of
- true -> error;
- false -> {ok, Sub, t_atom(false)}
- end
- end;
+ Sub = t_subtract(ArgType, Type),
+ case t_is_none(Sub) of
+ true -> error;
+ false -> {ok, Sub, t_atom(false)}
+ end;
dont_know ->
{ok, ArgType, t_boolean()}
end.
@@ -1802,12 +1849,13 @@ handle_guard_comp(Guard, Comp, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
[Arg1, Arg2] = Args,
{Map1, ArgTypes} = bind_guard_list(Args, Map, Env, dont_know, State),
+ Opaques = State#state.opaques,
[Type1, Type2] = ArgTypes,
- IsInt1 = t_is_integer(Type1),
- IsInt2 = t_is_integer(Type2),
- case {cerl:type(Arg1), cerl:type(Arg2)} of
- {literal, literal} ->
- case erlang:Comp(cerl:concrete(Arg1), cerl:concrete(Arg2)) of
+ IsInt1 = t_is_integer(Type1, Opaques),
+ IsInt2 = t_is_integer(Type2, Opaques),
+ case {type(Arg1), type(Arg2)} of
+ {{literal, Lit1}, {literal, Lit2}} ->
+ case erlang:Comp(cerl:concrete(Lit1), cerl:concrete(Lit2)) of
true when Eval =:= pos -> {Map, t_atom(true)};
true when Eval =:= dont_know -> {Map, t_atom(true)};
true when Eval =:= neg -> {Map, t_atom(true)};
@@ -1816,13 +1864,14 @@ handle_guard_comp(Guard, Comp, Map, Env, Eval, State) ->
false when Eval =:= dont_know -> {Map, t_atom(false)};
false when Eval =:= neg -> {Map, t_atom(false)}
end;
- {literal, var} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
- case bind_comp_literal_var(Arg1, Arg2, Type2, Comp, Map1) of
+ {{literal, Lit1}, var} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
+ case bind_comp_literal_var(Lit1, Arg2, Type2, Comp, Map1, Opaques) of
error -> signal_guard_fail(Eval, Guard, ArgTypes, State);
{ok, NewMap} -> {NewMap, t_atom(true)}
end;
- {var, literal} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
- case bind_comp_literal_var(Arg2, Arg1, Type1, invert_comp(Comp), Map1) of
+ {var, {literal, Lit2}} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
+ case bind_comp_literal_var(Lit2, Arg1, Type1, invert_comp(Comp),
+ Map1, Opaques) of
error -> signal_guard_fail(Eval, Guard, ArgTypes, State);
{ok, NewMap} -> {NewMap, t_atom(true)}
end;
@@ -1835,10 +1884,10 @@ invert_comp('<') -> '>';
invert_comp('>=') -> '=<';
invert_comp('>') -> '<'.
-bind_comp_literal_var(Lit, Var, VarType, CompOp, Map) ->
+bind_comp_literal_var(Lit, Var, VarType, CompOp, Map, Opaques) ->
LitVal = cerl:concrete(Lit),
NewVarType =
- case t_number_vals(VarType) of
+ case t_number_vals(VarType, Opaques) of
unknown ->
Range =
case CompOp of
@@ -1847,7 +1896,7 @@ bind_comp_literal_var(Lit, Var, VarType, CompOp, Map) ->
'>=' -> t_from_range(neg_inf, LitVal);
'>' -> t_from_range(neg_inf, LitVal - 1)
end,
- t_inf(Range, VarType);
+ t_inf(Range, VarType, Opaques);
NumberVals ->
NewNumberVals = [X || X <- NumberVals, erlang:CompOp(LitVal, X)],
t_integers(NewNumberVals)
@@ -1861,17 +1910,18 @@ handle_guard_is_function(Guard, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
{Map1, ArgTypes0} = bind_guard_list(Args, Map, Env, dont_know, State),
[FunType0, ArityType0] = ArgTypes0,
- ArityType = t_inf(ArityType0, t_integer()),
+ Opaques = State#state.opaques,
+ ArityType = t_inf(ArityType0, t_integer(), Opaques),
case t_is_none(ArityType) of
true -> signal_guard_fail(Eval, Guard, ArgTypes0, State);
false ->
FunTypeConstr =
- case t_number_vals(ArityType) of
+ case t_number_vals(ArityType, State#state.opaques) of
unknown -> t_fun();
Vals ->
t_sup([t_fun(lists:duplicate(X, t_any()), t_any()) || X <- Vals])
end,
- FunType = t_inf(FunType0, FunTypeConstr),
+ FunType = t_inf(FunType0, FunTypeConstr, Opaques),
case t_is_none(FunType) of
true ->
case Eval of
@@ -1896,47 +1946,59 @@ handle_guard_is_record(Guard, Map, Env, Eval, State) ->
Arity = cerl:int_val(Arity0),
{Map1, RecType} = bind_guard(Rec, Map, Env, dont_know, State),
ArityMin1 = Arity - 1,
- TupleType =
- case state__lookup_record(Tag, ArityMin1, State) of
- error -> t_tuple([t_atom(Tag)|lists:duplicate(ArityMin1, t_any())]);
- {ok, Prototype} -> Prototype
- end,
- Mode = determine_mode(RecType, State#state.opaques),
- NewTupleType =
- case t_opaque_match_record(TupleType, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> TupleType
- end,
- Type = t_inf(NewTupleType, RecType, Mode),
- case t_is_none(Type) of
+ Opaques = State#state.opaques,
+ Tuple = t_tuple([t_atom(Tag)|lists:duplicate(ArityMin1, t_any())]),
+ case t_is_none(t_inf(Tuple, RecType, Opaques)) of
true ->
- case Eval of
- pos -> signal_guard_fail(Eval, Guard,
- [RecType, t_from_term(Tag),
- t_from_term(Arity)],
- State);
- neg -> {Map1, t_atom(false)};
- dont_know -> {Map1, t_atom(false)}
+ case erl_types:t_has_opaque_subtype(RecType, Opaques) of
+ true ->
+ signal_guard_fail(Eval, Guard,
+ [RecType, t_from_term(Tag),
+ t_from_term(Arity)],
+ State);
+ false ->
+ case Eval of
+ pos -> signal_guard_fail(Eval, Guard,
+ [RecType, t_from_term(Tag),
+ t_from_term(Arity)],
+ State);
+ neg -> {Map1, t_atom(false)};
+ dont_know -> {Map1, t_atom(false)}
+ end
end;
false ->
- case Eval of
- pos -> {enter_type(Rec, Type, Map1), t_atom(true)};
- neg -> {Map1, t_atom(false)};
- dont_know -> {Map1, t_boolean()}
+ TupleType =
+ case state__lookup_record(Tag, ArityMin1, State) of
+ error -> Tuple;
+ {ok, Prototype} -> Prototype
+ end,
+ Type = t_inf(TupleType, RecType, State#state.opaques),
+ case t_is_none(Type) of
+ true ->
+ %% No special handling of opaque errors.
+ FArgs = "record " ++ format_type(RecType, State),
+ Msg = {record_matching, [FArgs, Tag]},
+ throw({fail, {Guard, Msg}});
+ false ->
+ case Eval of
+ pos -> {enter_type(Rec, Type, Map1), t_atom(true)};
+ neg -> {Map1, t_atom(false)};
+ dont_know -> {Map1, t_boolean()}
+ end
end
end.
handle_guard_eq(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
- case {cerl:type(Arg1), cerl:type(Arg2)} of
- {literal, literal} ->
- case cerl:concrete(Arg1) =:= cerl:concrete(Arg2) of
+ case {type(Arg1), type(Arg2)} of
+ {{literal, Lit1}, {literal, Lit2}} ->
+ case cerl:concrete(Lit1) =:= cerl:concrete(Lit2) of
true ->
if
Eval =:= pos -> {Map, t_atom(true)};
Eval =:= neg ->
- ArgTypes = [t_from_term(cerl:concrete(Arg1)),
- t_from_term(cerl:concrete(Arg2))],
+ ArgTypes = [t_from_term(cerl:concrete(Lit1)),
+ t_from_term(cerl:concrete(Lit2))],
signal_guard_fail(Eval, Guard, ArgTypes, State);
Eval =:= dont_know -> {Map, t_atom(true)}
end;
@@ -1945,28 +2007,28 @@ handle_guard_eq(Guard, Map, Env, Eval, State) ->
Eval =:= neg -> {Map, t_atom(false)};
Eval =:= dont_know -> {Map, t_atom(false)};
Eval =:= pos ->
- ArgTypes = [t_from_term(cerl:concrete(Arg1)),
- t_from_term(cerl:concrete(Arg2))],
+ ArgTypes = [t_from_term(cerl:concrete(Lit1)),
+ t_from_term(cerl:concrete(Lit2))],
signal_guard_fail(Eval, Guard, ArgTypes, State)
end
end;
- {literal, _} when Eval =:= pos ->
- case cerl:concrete(Arg1) of
+ {{literal, Lit1}, _} when Eval =:= pos ->
+ case cerl:concrete(Lit1) of
Atom when is_atom(Atom) ->
- bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State);
+ bind_eqeq_guard_lit_other(Guard, Lit1, Arg2, Map, Env, State);
[] ->
- bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State);
+ bind_eqeq_guard_lit_other(Guard, Lit1, Arg2, Map, Env, State);
_ ->
- bind_eq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State)
+ bind_eq_guard(Guard, Lit1, Arg2, Map, Env, Eval, State)
end;
- {_, literal} when Eval =:= pos ->
- case cerl:concrete(Arg2) of
+ {_, {literal, Lit2}} when Eval =:= pos ->
+ case cerl:concrete(Lit2) of
Atom when is_atom(Atom) ->
- bind_eqeq_guard_lit_other(Guard, Arg2, Arg1, Map, Env, State);
+ bind_eqeq_guard_lit_other(Guard, Lit2, Arg1, Map, Env, State);
[] ->
- bind_eqeq_guard_lit_other(Guard, Arg2, Arg1, Map, Env, State);
+ bind_eqeq_guard_lit_other(Guard, Lit2, Arg1, Map, Env, State);
_ ->
- bind_eq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State)
+ bind_eq_guard(Guard, Arg1, Lit2, Map, Env, Eval, State)
end;
{_, _} ->
bind_eq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State)
@@ -1975,26 +2037,37 @@ handle_guard_eq(Guard, Map, Env, Eval, State) ->
bind_eq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State) ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, dont_know, State),
{Map2, Type2} = bind_guard(Arg2, Map1, Env, dont_know, State),
- case (t_is_nil(Type1) orelse t_is_nil(Type2) orelse
- t_is_atom(Type1) orelse t_is_atom(Type2)) of
+ Opaques = State#state.opaques,
+ case
+ t_is_nil(Type1, Opaques) orelse t_is_nil(Type2, Opaques)
+ orelse t_is_atom(Type1, Opaques) orelse t_is_atom(Type2, Opaques)
+ of
true -> bind_eqeq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State);
false ->
- case Eval of
- pos -> {Map2, t_atom(true)};
- neg -> {Map2, t_atom(false)};
- dont_know -> {Map2, t_boolean()}
+ %% XXX. Is this test OK?
+ OpArgs = erl_types:t_find_unknown_opaque(Type1, Type2, Opaques),
+ case OpArgs =:= [] of
+ true ->
+ case Eval of
+ pos -> {Map2, t_atom(true)};
+ neg -> {Map2, t_atom(false)};
+ dont_know -> {Map2, t_boolean()}
+ end;
+ false ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end
end.
handle_guard_eqeq(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
- case {cerl:type(Arg1), cerl:type(Arg2)} of
- {literal, literal} ->
- case cerl:concrete(Arg1) =:= cerl:concrete(Arg2) of
+ case {type(Arg1), type(Arg2)} of
+ {{literal, Lit1}, {literal, Lit2}} ->
+
+ case cerl:concrete(Lit1) =:= cerl:concrete(Lit2) of
true ->
if Eval =:= neg ->
- ArgTypes = [t_from_term(cerl:concrete(Arg1)),
- t_from_term(cerl:concrete(Arg2))],
+ ArgTypes = [t_from_term(cerl:concrete(Lit1)),
+ t_from_term(cerl:concrete(Lit2))],
signal_guard_fail(Eval, Guard, ArgTypes, State);
Eval =:= pos -> {Map, t_atom(true)};
Eval =:= dont_know -> {Map, t_atom(true)}
@@ -2003,15 +2076,15 @@ handle_guard_eqeq(Guard, Map, Env, Eval, State) ->
if Eval =:= neg -> {Map, t_atom(false)};
Eval =:= dont_know -> {Map, t_atom(false)};
Eval =:= pos ->
- ArgTypes = [t_from_term(cerl:concrete(Arg1)),
- t_from_term(cerl:concrete(Arg2))],
+ ArgTypes = [t_from_term(cerl:concrete(Lit1)),
+ t_from_term(cerl:concrete(Lit2))],
signal_guard_fail(Eval, Guard, ArgTypes, State)
end
end;
- {literal, _} when Eval =:= pos ->
- bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State);
- {_, literal} when Eval =:= pos ->
- bind_eqeq_guard_lit_other(Guard, Arg2, Arg1, Map, Env, State);
+ {{literal, Lit1}, _} when Eval =:= pos ->
+ bind_eqeq_guard_lit_other(Guard, Lit1, Arg2, Map, Env, State);
+ {_, {literal, Lit2}} when Eval =:= pos ->
+ bind_eqeq_guard_lit_other(Guard, Lit2, Arg1, Map, Env, State);
{_, _} ->
bind_eqeq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State)
end.
@@ -2021,44 +2094,52 @@ bind_eqeq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State) ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, dont_know, State),
?debug("Types are:~s =:= ~s\n", [t_to_string(Type1),
t_to_string(Type2)]),
- Inf = t_inf(Type1, Type2),
+ Opaques = State#state.opaques,
+ Inf = t_inf(Type1, Type2, Opaques),
case t_is_none(Inf) of
true ->
- case Eval of
- neg -> {Map2, t_atom(false)};
- dont_know -> {Map2, t_atom(false)};
- pos -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
+ OpArgs = erl_types:t_find_unknown_opaque(Type1, Type2, Opaques),
+ case OpArgs =:= [] of
+ true ->
+ case Eval of
+ neg -> {Map2, t_atom(false)};
+ dont_know -> {Map2, t_atom(false)};
+ pos -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
+ end;
+ false ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end;
false ->
case Eval of
- pos ->
- case {cerl:type(Arg1), cerl:type(Arg2)} of
- {var, var} ->
- Map3 = enter_subst(Arg1, Arg2, Map2),
- Map4 = enter_type(Arg2, Inf, Map3),
- {Map4, t_atom(true)};
- {var, _} ->
- Map3 = enter_type(Arg1, Inf, Map2),
- {Map3, t_atom(true)};
- {_, var} ->
- Map3 = enter_type(Arg2, Inf, Map2),
- {Map3, t_atom(true)};
- {_, _} ->
- {Map2, t_atom(true)}
- end;
- neg ->
- {Map2, t_atom(false)};
- dont_know ->
- {Map2, t_boolean()}
+ pos ->
+ case {cerl:type(Arg1), cerl:type(Arg2)} of
+ {var, var} ->
+ Map3 = enter_subst(Arg1, Arg2, Map2),
+ Map4 = enter_type(Arg2, Inf, Map3),
+ {Map4, t_atom(true)};
+ {var, _} ->
+ Map3 = enter_type(Arg1, Inf, Map2),
+ {Map3, t_atom(true)};
+ {_, var} ->
+ Map3 = enter_type(Arg2, Inf, Map2),
+ {Map3, t_atom(true)};
+ {_, _} ->
+ {Map2, t_atom(true)}
+ end;
+ neg ->
+ {Map2, t_atom(false)};
+ dont_know ->
+ {Map2, t_boolean()}
end
end.
bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
Eval = dont_know,
+ Opaques = State#state.opaques,
case cerl:concrete(Arg1) of
true ->
{_, Type} = MT = bind_guard(Arg2, Map, Env, pos, State),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type, Opaques) of
true -> MT;
false ->
{_, Type0} = bind_guard(Arg2, Map, Env, Eval, State),
@@ -2066,7 +2147,7 @@ bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
end;
false ->
{Map1, Type} = bind_guard(Arg2, Map, Env, neg, State),
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type, Opaques) of
true -> {Map1, t_atom(true)};
false ->
{_, Type0} = bind_guard(Arg2, Map, Env, Eval, State),
@@ -2087,14 +2168,15 @@ bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
handle_guard_and(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
pos ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, Eval, State),
- case t_is_atom(true, Type1) of
+ case t_is_any_atom(true, Type1, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, t_any()], State);
true ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, Eval, State),
- case t_is_atom(true, Type2) of
+ case t_is_any_atom(true, Type2, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State);
true -> {Map2, t_atom(true)}
end
@@ -2109,7 +2191,10 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
try bind_guard(Arg2, MapJ, Env, neg, State)
catch throw:{fail, _} -> bind_guard(Arg1, MapJ, Env, pos, State)
end,
- case t_is_atom(false, Type1) orelse t_is_atom(false, Type2) of
+ case
+ t_is_any_atom(false, Type1, Opaques)
+ orelse t_is_any_atom(false, Type2, Opaques)
+ of
true -> {join_maps_end([Map1, Map2], MapJ), t_atom(false)};
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end;
@@ -2124,11 +2209,16 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
false ->
NewMap = join_maps_end([Map1, Map2], MapJ),
NewType =
- case {t_atom_vals(Bool1), t_atom_vals(Bool2)} of
+ case {t_atom_vals(Bool1, Opaques), t_atom_vals(Bool2, Opaques)} of
{['true'] , ['true'] } -> t_atom(true);
{['false'], _ } -> t_atom(false);
{_ , ['false']} -> t_atom(false);
+ {unknown , _ } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
+ {_ , unknown } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
{_ , _ } -> t_boolean()
+
end,
{NewMap, NewType}
end
@@ -2136,6 +2226,7 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
handle_guard_or(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
pos ->
MapJ = join_maps_begin(Map),
@@ -2149,19 +2240,23 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
catch
throw:{fail,_} -> bind_guard(Arg2, MapJ, Env, dont_know, State)
end,
- case ((t_is_atom(true, Bool1) andalso t_is_boolean(Bool2))
- orelse
- (t_is_atom(true, Bool2) andalso t_is_boolean(Bool1))) of
+ case
+ ((t_is_any_atom(true, Bool1, Opaques)
+ andalso t_is_boolean(Bool2, Opaques))
+ orelse
+ (t_is_any_atom(true, Bool2, Opaques)
+ andalso t_is_boolean(Bool1, Opaques)))
+ of
true -> {join_maps_end([Map1, Map2], MapJ), t_atom(true)};
false -> signal_guard_fail(Eval, Guard, [Bool1, Bool2], State)
end;
neg ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, neg, State),
- case t_is_atom(false, Type1) of
+ case t_is_any_atom(false, Type1, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, t_any()], State);
true ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, neg, State),
- case t_is_atom(false, Type2) of
+ case t_is_any_atom(false, Type2, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State);
true -> {Map2, t_atom(false)}
end
@@ -2177,10 +2272,14 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
false ->
NewMap = join_maps_end([Map1, Map2], MapJ),
NewType =
- case {t_atom_vals(Bool1), t_atom_vals(Bool2)} of
+ case {t_atom_vals(Bool1, Opaques), t_atom_vals(Bool2, Opaques)} of
{['false'], ['false']} -> t_atom(false);
{['true'] , _ } -> t_atom(true);
{_ , ['true'] } -> t_atom(true);
+ {unknown , _ } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
+ {_ , unknown } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
{_ , _ } -> t_boolean()
end,
{NewMap, NewType}
@@ -2189,10 +2288,11 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
handle_guard_not(Guard, Map, Env, Eval, State) ->
[Arg] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
neg ->
{Map1, Type} = bind_guard(Arg, Map, Env, pos, State),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type, Opaques) of
true -> {Map1, t_atom(false)};
false ->
{_, Type0} = bind_guard(Arg, Map, Env, Eval, State),
@@ -2200,7 +2300,7 @@ handle_guard_not(Guard, Map, Env, Eval, State) ->
end;
pos ->
{Map1, Type} = bind_guard(Arg, Map, Env, neg, State),
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type, Opaques) of
true -> {Map1, t_atom(true)};
false ->
{_, Type0} = bind_guard(Arg, Map, Env, Eval, State),
@@ -2212,10 +2312,11 @@ handle_guard_not(Guard, Map, Env, Eval, State) ->
case t_is_none(Bool) of
true -> throw({fatal_fail, none});
false ->
- case t_atom_vals(Bool) of
+ case t_atom_vals(Bool, Opaques) of
['true'] -> {Map1, t_atom(false)};
['false'] -> {Map1, t_atom(true)};
- [_, _] -> {Map1, Bool}
+ [_, _] -> {Map1, Bool};
+ unknown -> signal_guard_fail(Eval, Guard, [Type], State)
end
end
end.
@@ -2231,31 +2332,47 @@ bind_guard_list([], Map, _Env, _Eval, _State, Acc) ->
-type eval() :: 'pos' | 'neg' | 'dont_know'.
--spec signal_guard_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
+-spec signal_guard_fail(eval(), cerl:c_call(), [type()],
state()) -> no_return().
signal_guard_fail(Eval, Guard, ArgTypes, State) ->
+ signal_guard_failure(Eval, Guard, ArgTypes, fail, State).
+
+-spec signal_guard_fatal_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
+ state()) -> no_return().
+
+signal_guard_fatal_fail(Eval, Guard, ArgTypes, State) ->
+ signal_guard_failure(Eval, Guard, ArgTypes, fatal_fail, State).
+
+signal_guard_failure(Eval, Guard, ArgTypes, Tag, State) ->
Args = cerl:call_args(Guard),
F = cerl:atom_val(cerl:call_name(Guard)),
- MFA = {cerl:atom_val(cerl:call_module(Guard)), F, length(Args)},
- Msg =
+ {M, F, A} = MFA = {cerl:atom_val(cerl:call_module(Guard)), F, length(Args)},
+ Opaques = State#state.opaques,
+ {Kind, XInfo} =
+ case erl_bif_types:opaque_args(M, F, A, ArgTypes, Opaques) of
+ [] ->
+ {case Eval of
+ neg -> neg_guard_fail;
+ pos -> guard_fail;
+ dont_know -> guard_fail
+ end,
+ []};
+ Ns -> {opaque_guard, [Ns]}
+ end,
+ FArgs =
case is_infix_op(MFA) of
true ->
[ArgType1, ArgType2] = ArgTypes,
[Arg1, Arg2] = Args,
- Kind =
- case Eval of
- neg -> neg_guard_fail;
- pos -> guard_fail;
- dont_know -> guard_fail
- end,
- {Kind, [format_args_1([Arg1], [ArgType1], State),
- atom_to_list(F),
- format_args_1([Arg2], [ArgType2], State)]};
+ [format_args_1([Arg1], [ArgType1], State),
+ atom_to_list(F),
+ format_args_1([Arg2], [ArgType2], State)] ++ XInfo;
false ->
- mk_guard_msg(Eval, F, Args, ArgTypes, State)
+ [F, format_args(Args, ArgTypes, State)]
end,
- throw({fail, {Guard, Msg}}).
+ Msg = {Kind, FArgs},
+ throw({Tag, {Guard, Msg}}).
is_infix_op({erlang, '=:=', 2}) -> true;
is_infix_op({erlang, '==', 2}) -> true;
@@ -2268,25 +2385,10 @@ is_infix_op({erlang, '>=', 2}) -> true;
is_infix_op({M, F, A}) when is_atom(M), is_atom(F),
is_integer(A), 0 =< A, A =< 255 -> false.
--spec signal_guard_fatal_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
- state()) -> no_return().
-
-signal_guard_fatal_fail(Eval, Guard, ArgTypes, State) ->
- Args = cerl:call_args(Guard),
- F = cerl:atom_val(cerl:call_name(Guard)),
- Msg = mk_guard_msg(Eval, F, Args, ArgTypes, State),
- throw({fatal_fail, {Guard, Msg}}).
-
-mk_guard_msg(Eval, F, Args, ArgTypes, State) ->
- FArgs = [F, format_args(Args, ArgTypes, State)],
- case any_has_opaque_subtype(ArgTypes) of
- true -> {opaque_guard, FArgs};
- false ->
- case Eval of
- neg -> {neg_guard_fail, FArgs};
- pos -> {guard_fail, FArgs};
- dont_know -> {guard_fail, FArgs}
- end
+bif_args(M, F, A) ->
+ case erl_bif_types:arg_types(M, F, A) of
+ unknown -> lists:duplicate(A, t_any());
+ List -> List
end.
bind_guard_case_clauses(Arg, Clauses, Map0, Env, Eval, State) ->
@@ -2366,14 +2468,15 @@ bind_guard_case_clauses(GenArgType, GenMap, ArgExpr, [Clause|Left],
end,
{NewMap3, CType} = bind_guard(cerl:clause_body(Clause), NewMap2,
Env, Eval, State),
+ Opaques = State#state.opaques,
case Eval of
pos ->
- case t_is_atom(true, CType) of
+ case t_is_any_atom(true, CType, Opaques) of
true -> ok;
false -> throw({fail, none})
end;
neg ->
- case t_is_atom(false, CType) of
+ case t_is_any_atom(false, CType, Opaques) of
true -> ok;
false -> throw({fail, none})
end;
@@ -2501,8 +2604,11 @@ enter_type(Key, Val, MS) ->
error ->
?debug("Entering ~p :: ~s\n", [KeyLabel, t_to_string(Val)]),
case dict:find(KeyLabel, Dict) of
- {ok, Val} -> MS;
- {ok, _OldVal} -> store_map(KeyLabel, Val, MS);
+ {ok, Value} ->
+ case erl_types:t_is_equal(Val, Value) of
+ true -> MS;
+ false -> store_map(KeyLabel, Val, MS)
+ end;
error -> store_map(KeyLabel, Val, MS)
end
end
@@ -2611,10 +2717,15 @@ get_label(L) when is_integer(L) ->
get_label(T) ->
cerl_trees:get_label(T).
-t_is_simple(ArgType) ->
- t_is_atom(ArgType) orelse t_is_number(ArgType) orelse t_is_port(ArgType)
- orelse t_is_pid(ArgType) orelse t_is_reference(ArgType)
- orelse t_is_nil(ArgType).
+t_is_simple(ArgType, State) ->
+ Opaques = State#state.opaques,
+ t_is_atom(ArgType, Opaques) orelse t_is_number(ArgType, Opaques)
+ orelse t_is_port(ArgType, Opaques)
+ orelse t_is_pid(ArgType, Opaques) orelse t_is_reference(ArgType, Opaques)
+ orelse t_is_nil(ArgType, Opaques).
+
+remove_local_opaque_types(Type, Opaques) ->
+ t_unopaque(Type, Opaques).
%% t_is_structured(ArgType) ->
%% case t_is_nil(ArgType) of
@@ -2638,11 +2749,12 @@ is_call_to_send(Tree) ->
andalso (Arity =:= 2)
end.
-any_opaque(Ts) ->
- lists:any(fun erl_types:t_is_opaque/1, Ts).
-
-any_has_opaque_subtype(Ts) ->
- lists:any(fun erl_types:t_has_opaque_subtype/1, Ts).
+is_lc_simple_list(Tree, TreeType, State) ->
+ Opaques = State#state.opaques,
+ Ann = cerl:get_ann(Tree),
+ lists:member(list_comprehension, Ann)
+ andalso t_is_list(TreeType)
+ andalso t_is_simple(t_list_elements(TreeType, Opaques), State).
filter_match_fail([Clause] = Cls) ->
Body = cerl:clause_body(Clause),
@@ -2662,12 +2774,6 @@ filter_match_fail([]) ->
%% receive after 1 -> ok end
[].
-determine_mode(Type, Opaques) ->
- case lists:member(Type, Opaques) of
- true -> opaque;
- false -> structured
- end.
-
%%% ===========================================================================
%%%
%%% The State.
@@ -2679,7 +2785,7 @@ state__new(Callgraph, Tree, Plt, Module, Records) ->
erl_types:t_opaque_from_records(Records),
TreeMap = build_tree_map(Tree),
Funs = dict:fetch_keys(TreeMap),
- FunTab = init_fun_tab(Funs, dict:new(), TreeMap, Callgraph, Plt, Opaques),
+ FunTab = init_fun_tab(Funs, dict:new(), TreeMap, Callgraph, Plt),
ExportedFuns =
[Fun || Fun <- Funs--[top], dialyzer_callgraph:is_escaping(Fun, Callgraph)],
Work = init_work(ExportedFuns),
@@ -2740,12 +2846,14 @@ state__add_warning(#state{warnings = Warnings, warning_mode = true} = State,
case Force of
true ->
Warn = {Tag, {get_file(Ann), abs(get_line(Ann))}, Msg},
+ ?debug("MSG ~s\n", [dialyzer:format_warning(Warn)]),
State#state{warnings = [Warn|Warnings]};
false ->
case is_compiler_generated(Ann) of
true -> State;
false ->
Warn = {Tag, {get_file(Ann), get_line(Ann)}, Msg},
+ ?debug("MSG ~s\n", [dialyzer:format_warning(Warn)]),
State#state{warnings = [Warn|Warnings]}
end
end.
@@ -2829,12 +2937,11 @@ state__get_warnings(#state{tree_map = TreeMap, fun_tab = FunTab,
state__is_escaping(Fun, #state{callgraph = Callgraph}) ->
dialyzer_callgraph:is_escaping(Fun, Callgraph).
-state__lookup_type_for_rec_var(Var, #state{callgraph = Callgraph} = State) ->
+state__lookup_type_for_letrec(Var, #state{callgraph = Callgraph} = State) ->
Label = get_label(Var),
- case dialyzer_callgraph:lookup_rec_var(Label, Callgraph) of
+ case dialyzer_callgraph:lookup_letrec(Label, Callgraph) of
error -> error;
- {ok, MFA} ->
- {ok, FunLabel} = dialyzer_callgraph:lookup_label(MFA, Callgraph),
+ {ok, FunLabel} ->
{ok, state__fun_type(FunLabel, State)}
end.
@@ -2876,10 +2983,10 @@ build_tree_map(Tree) ->
end,
cerl_trees:fold(Fun, dict:new(), Tree).
-init_fun_tab([top|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
+init_fun_tab([top|Left], Dict, TreeMap, Callgraph, Plt) ->
NewDict = dict:store(top, {[], t_none()}, Dict),
- init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
-init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
+ init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt);
+init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt) ->
Arity = cerl:fun_arity(dict:fetch(Fun, TreeMap)),
FunEntry =
case dialyzer_callgraph:is_escaping(Fun, Callgraph) of
@@ -2896,8 +3003,8 @@ init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
false -> {not_handled, {lists:duplicate(Arity, t_none()), t_unit()}}
end,
NewDict = dict:store(Fun, FunEntry, Dict),
- init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
-init_fun_tab([], Dict, _TreeMap, _Callgraph, _Plt, _Opaques) ->
+ init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt);
+init_fun_tab([], Dict, _TreeMap, _Callgraph, _Plt) ->
?debug("DICT:~p\n",[dict:to_list(Dict)]),
Dict.
@@ -2946,34 +3053,27 @@ state__update_fun_entry(Tree, ArgTypes, Out0,
if Fun =:= top -> Out0;
true ->
case lookup_fun_sig(Fun, CG, Plt) of
- {value, {SigRet, _}} -> t_inf(SigRet, Out0, opaque);
+ {value, {SigRet, _}} -> t_inf(SigRet, Out0);
none -> Out0
end
end,
Out = t_limit(Out1, ?TYPE_LIMIT),
- case dict:find(Fun, FunTab) of
- {ok, {ArgTypes, OldOut}} ->
- case t_is_equal(OldOut, Out) of
- true ->
- ?debug("Fixpoint for ~w: ~s\n",
- [state__lookup_name(Fun, State),
- t_to_string(t_fun(ArgTypes, Out))]),
- State;
- false ->
- NewEntry = {ArgTypes, Out},
- ?debug("New Entry for ~w: ~s\n",
- [state__lookup_name(Fun, State),
- t_to_string(t_fun(ArgTypes, Out))]),
- NewFunTab = dict:store(Fun, NewEntry, FunTab),
- State1 = State#state{fun_tab = NewFunTab},
- state__add_work_from_fun(Tree, State1)
- end;
- {ok, {NewArgTypes, _OldOut}} ->
- %% Can only happen in self-recursive functions. Only update the out type.
- NewEntry = {NewArgTypes, Out},
+ {ok, {OldArgTypes, OldOut}} = dict:find(Fun, FunTab),
+ SameArgs = lists:all(fun({A, B}) -> erl_types:t_is_equal(A, B)
+ end, lists:zip(OldArgTypes, ArgTypes)),
+ SameOut = t_is_equal(OldOut, Out),
+ if
+ SameArgs, SameOut ->
+ ?debug("Fixpoint for ~w: ~s\n",
+ [state__lookup_name(Fun, State),
+ t_to_string(t_fun(ArgTypes, Out))]),
+ State;
+ true ->
+ %% Can only happen in self-recursive functions.
+ NewEntry = {OldArgTypes, Out},
?debug("New Entry for ~w: ~s\n",
[state__lookup_name(Fun, State),
- t_to_string(t_fun(NewArgTypes, Out))]),
+ t_to_string(t_fun(OldArgTypes, Out))]),
NewFunTab = dict:store(Fun, NewEntry, FunTab),
State1 = State#state{fun_tab = NewFunTab},
state__add_work_from_fun(Tree, State1)
@@ -2994,7 +3094,7 @@ state__add_work_from_fun(Tree, #state{callgraph = Callgraph,
%% Must filter the result for results in this module.
FilteredList = [L || {ok, L} <- LabelList, dict:is_key(L, TreeMap)],
?debug("~w: Will try to add:~w\n",
- [state__lookup_name(get_label(Tree), State), MFAList]),
+ [state__lookup_name(Label, State), MFAList]),
lists:foldl(fun(L, AccState) ->
state__add_work(L, AccState)
end, State, FilteredList)
@@ -3055,7 +3155,8 @@ forward_args(Fun, ArgTypes, #state{work = Work, fun_tab = FunTab} = State) ->
case Fixpoint of
true -> State;
false ->
- NewArgTypes = [t_sup(X, Y) || {X, Y} <- lists:zip(ArgTypes, OldArgTypes)],
+ NewArgTypes = [t_sup(X, Y) ||
+ {X, Y} <- lists:zip(ArgTypes, OldArgTypes)],
NewWork = add_work(Fun, Work),
?debug("~w: forwarding args ~s\n",
[state__lookup_name(Fun, State),
@@ -3093,7 +3194,7 @@ state__get_callgraph(#state{callgraph = Callgraph}) ->
state__get_races(#state{races = Races}) ->
Races.
--spec state__get_records(state()) -> dict().
+-spec state__get_records(state()) -> types().
state__get_records(#state{records = Records}) ->
Records.
@@ -3192,12 +3293,17 @@ get_file([_|Tail]) -> get_file(Tail).
is_compiler_generated(Ann) ->
lists:member(compiler_generated, Ann) orelse (get_line(Ann) < 1).
--spec format_args([cerl:cerl()], [erl_types:erl_type()], state()) ->
+is_literal_record(Tree) ->
+ Ann = cerl:get_ann(Tree),
+ lists:member(record, Ann).
+
+-spec format_args([cerl:cerl()], [type()], state()) ->
nonempty_string().
format_args([], [], _State) ->
"()";
-format_args(ArgList, TypeList, State) ->
+format_args(ArgList0, TypeList, State) ->
+ ArgList = fold_literals(ArgList0),
"(" ++ format_args_1(ArgList, TypeList, State) ++ ")".
format_args_1([Arg], [Type], State) ->
@@ -3227,25 +3333,25 @@ format_arg(Arg) ->
Default
end.
--spec format_type(erl_types:erl_type(), state()) -> string().
+-spec format_type(type(), state()) -> string().
format_type(Type, #state{records = R}) ->
t_to_string(Type, R).
--spec format_field_diffs(erl_types:erl_type(), state()) -> string().
+-spec format_field_diffs(type(), state()) -> string().
format_field_diffs(RecConstruction, #state{records = R}) ->
erl_types:record_field_diffs_to_string(RecConstruction, R).
--spec format_sig_args(erl_types:erl_type(), state()) -> string().
+-spec format_sig_args(type(), state()) -> string().
-format_sig_args(Type, #state{records = R}) ->
- SigArgs = t_fun_args(Type),
+format_sig_args(Type, #state{opaques = Opaques} = State) ->
+ SigArgs = t_fun_args(Type, Opaques),
case SigArgs of
[] -> "()";
[SArg|SArgs] ->
- lists:flatten("(" ++ t_to_string(SArg, R)
- ++ ["," ++ t_to_string(T, R) || T <- SArgs] ++ ")")
+ lists:flatten("(" ++ format_type(SArg, State)
+ ++ ["," ++ format_type(T, State) || T <- SArgs] ++ ")")
end.
format_cerl(Tree) ->
@@ -3256,7 +3362,8 @@ format_cerl(Tree) ->
{ribbon, 100000} %% newlines.
]).
-format_patterns(Pats) ->
+format_patterns(Pats0) ->
+ Pats = fold_literals(Pats0),
NewPats = map_pats(cerl:c_values(Pats)),
String = format_cerl(NewPats),
case Pats of
@@ -3288,6 +3395,23 @@ map_pats(Pats) ->
end,
cerl_trees:map(Fun, Pats).
+fold_literals(TreeList) ->
+ [cerl:fold_literal(Tree) || Tree <- TreeList].
+
+type(Tree) ->
+ Folded = cerl:fold_literal(Tree),
+ case cerl:type(Folded) of
+ literal -> {literal, Folded};
+ Type -> Type
+ end.
+
+is_literal(Tree) ->
+ Folded = cerl:fold_literal(Tree),
+ case cerl:is_literal(Folded) of
+ true -> {yes, Folded};
+ false -> no
+ end.
+
parent_allows_this(FunLbl, #state{callgraph = Callgraph, plt = Plt} =State) ->
case state__is_escaping(FunLbl, State) of
false -> false; % if it isn't escaping it can't be a return value
@@ -3332,18 +3456,18 @@ find_terminals(Tree) ->
M0 = cerl:call_module(Tree),
F0 = cerl:call_name(Tree),
A = length(cerl:call_args(Tree)),
- case cerl:is_literal(M0) andalso cerl:is_literal(F0) of
- false ->
- %% We cannot make assumptions. Say that both are true.
- {true, true};
- true ->
- M = cerl:concrete(M0),
- F = cerl:concrete(F0),
+ case {is_literal(M0), is_literal(F0)} of
+ {{yes, LitM}, {yes, LitF}} ->
+ M = cerl:concrete(LitM),
+ F = cerl:concrete(LitF),
case (erl_bif_types:is_known(M, F, A)
andalso t_is_none(erl_bif_types:type(M, F, A))) of
true -> {true, false};
false -> {false, true}
- end
+ end;
+ _ ->
+ %% We cannot make assumptions. Say that both are true.
+ {true, true}
end;
'case' -> find_terminals_list(cerl:case_clauses(Tree));
'catch' -> find_terminals(cerl:catch_body(Tree));
@@ -3353,6 +3477,7 @@ find_terminals(Tree) ->
'let' -> find_terminals(cerl:let_body(Tree));
letrec -> find_terminals(cerl:letrec_body(Tree));
literal -> {false, true};
+ map -> {false, true};
primop -> {false, false}; %% match_fail, etc. are not explicit exits.
'receive' ->
Timeout = cerl:receive_timeout(Tree),
@@ -3388,66 +3513,6 @@ find_terminals_list([], Explicit, Normal) ->
%%----------------------------------------------------------------------------
-%% If you write a record pattern in a matching that violates the
-%% definition it will never match. However, the warning is lost in the
-%% regular analysis. This after-pass catches it.
-
-find_mismatched_record_patterns(Tree, State) ->
- cerl_trees:fold(
- fun(SubTree, AccState) ->
- case cerl:is_c_clause(SubTree) of
- true -> lists:foldl(fun(P, AccState1) ->
- find_rec_warnings(P, AccState1)
- end, AccState, cerl:clause_pats(SubTree));
- false -> AccState
- end
- end, State, Tree).
-
-find_rec_warnings(Tree, State) ->
- cerl_trees:fold(
- fun(SubTree, AccState) ->
- case cerl:is_c_tuple(SubTree) of
- true -> find_rec_warnings_tuple(SubTree, AccState);
- false -> AccState
- end
- end, State, Tree).
-
-find_rec_warnings_tuple(Tree, State) ->
- Elements = cerl:tuple_es(Tree),
- {_, _, EsType} = traverse_list(Elements, map__new(), State),
- TupleType = t_tuple(EsType),
- case t_is_none(TupleType) of
- true -> State;
- false ->
- %% Let's find out if this is a record construction.
- case Elements of
- [Tag|Left] ->
- case cerl:is_c_atom(Tag) of
- true ->
- TagVal = cerl:atom_val(Tag),
- case state__lookup_record(TagVal, length(Left), State) of
- error -> State;
- {ok, Prototype} ->
- InfTupleType = t_inf(Prototype, TupleType),
- case t_is_none(InfTupleType) of
- true ->
- Msg = {record_matching,
- [format_patterns([Tree]), TagVal]},
- state__add_warning(State, ?WARN_MATCHING, Tree, Msg);
- false ->
- State
- end
- end;
- false ->
- State
- end;
- _ ->
- State
- end
- end.
-
-%%----------------------------------------------------------------------------
-
-ifdef(DEBUG_PP).
debug_pp(Tree, true) ->
io:put_chars(cerl_prettypr:format(Tree, [{hook, cerl_typean:pp_hook()}])),
diff --git a/lib/dialyzer/src/dialyzer_dep.erl b/lib/dialyzer/src/dialyzer_dep.erl
index febb65b766..572e60278d 100644
--- a/lib/dialyzer/src/dialyzer_dep.erl
+++ b/lib/dialyzer/src/dialyzer_dep.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% analyze(CoreTree) -> {Deps, Esc, Calls}.
+%% analyze(CoreTree) -> {Deps, Esc, Calls, Letrecs}.
%%
%% Deps = a dict mapping labels of functions to an ordset of functions
%% it calls.
@@ -53,18 +53,24 @@
%% which the operation can refer to. If 'external' is part of
%% the set the operation can be externally defined.
%%
+%% Letrecs = a dict mapping var labels to their recursive definition.
+%% top-level letrecs are not included as they are handled
+%% separately.
+%%
--spec analyze(cerl:c_module()) -> {dict(), ordset('external' | label()), dict()}.
+-spec analyze(cerl:c_module()) ->
+ {dict:dict(), ordsets:ordset('external' | label()), dict:dict(), dict:dict()}.
analyze(Tree) ->
%% io:format("Handling ~w\n", [cerl:atom_val(cerl:module_name(Tree))]),
{_, State} = traverse(Tree, map__new(), state__new(Tree), top),
Esc = state__esc(State),
- %% Add dependency from 'external' to all escaping function
+ %% Add dependency from 'external' to all escaping functions
State1 = state__add_deps(external, output(Esc), State),
Deps = state__deps(State1),
Calls = state__calls(State1),
- {map__finalize(Deps), set__to_ordsets(Esc), map__finalize(Calls)}.
+ Letrecs = state__letrecs(State1),
+ {map__finalize(Deps), set__to_ordsets(Esc), map__finalize(Calls), Letrecs}.
traverse(Tree, Out, State, CurrentFun) ->
%% io:format("Type: ~w\n", [cerl:type(Tree)]),
@@ -118,8 +124,10 @@ traverse(Tree, Out, State, CurrentFun) ->
TmpState = state__add_deps(Label, O1, State),
state__add_deps(CurrentFun, O2,TmpState)
end,
- {BodyFuns, State2} = traverse(Body, Out, State1,
- cerl_trees:get_label(Tree)),
+ Vars = cerl:fun_vars(Tree),
+ Out1 = bind_single(Vars, output(set__singleton(external)), Out),
+ {BodyFuns, State2} =
+ traverse(Body, Out1, State1, cerl_trees:get_label(Tree)),
{output(set__singleton(Label)), state__add_esc(BodyFuns, State2)};
'let' ->
Vars = cerl:let_vars(Tree),
@@ -131,9 +139,12 @@ traverse(Tree, Out, State, CurrentFun) ->
letrec ->
Defs = cerl:letrec_defs(Tree),
Body = cerl:letrec_body(Tree),
+ State1 = lists:foldl(fun({ Var, Fun }, Acc) ->
+ state__add_letrecs(cerl_trees:get_label(Var), cerl_trees:get_label(Fun), Acc)
+ end, State, Defs),
Out1 = bind_defs(Defs, Out),
- State1 = traverse_defs(Defs, Out1, State, CurrentFun),
- traverse(Body, Out1, State1, CurrentFun);
+ State2 = traverse_defs(Defs, Out1, State1, CurrentFun),
+ traverse(Body, Out1, State2, CurrentFun);
literal ->
{output(none), State};
module ->
@@ -173,6 +184,15 @@ traverse(Tree, Out, State, CurrentFun) ->
Args = cerl:tuple_es(Tree),
{List, State1} = traverse_list(Args, Out, State, CurrentFun),
{merge_outs(List), State1};
+ map ->
+ Args = cerl:map_es(Tree),
+ {List, State1} = traverse_list(Args, Out, State, CurrentFun),
+ {merge_outs(List), State1};
+ map_pair ->
+ Key = cerl:map_pair_key(Tree),
+ Val = cerl:map_pair_val(Tree),
+ {List, State1} = traverse_list([Key,Val], Out, State, CurrentFun),
+ {merge_outs(List), State1};
values ->
traverse_list(cerl:values_es(Tree), Out, State, CurrentFun);
var ->
@@ -291,7 +311,7 @@ primop(Tree, ArgFuns, State) ->
%% Set
%%
--record(set, {set :: set()}).
+-record(set, {set :: sets:set()}).
set__singleton(Val) ->
#set{set = sets:add_element(Val, sets:new())}.
@@ -460,18 +480,30 @@ all_vars(Tree, AccIn) ->
-type local_set() :: 'none' | #set{}.
--record(state, {deps :: dict(),
+-record(state, {deps :: dict:dict(),
esc :: local_set(),
- call :: dict(),
- arities :: dict()}).
+ call :: dict:dict(),
+ arities :: dict:dict(),
+ letrecs :: dict:dict()}).
state__new(Tree) ->
Exports = set__from_list([X || X <- cerl:module_exports(Tree)]),
- InitEsc = set__from_list([cerl_trees:get_label(Fun)
- || {Var, Fun} <- cerl:module_defs(Tree),
- set__is_element(Var, Exports)]),
+ %% get the labels of all exported functions
+ ExpLs = [cerl_trees:get_label(Fun) || {Var, Fun} <- cerl:module_defs(Tree),
+ set__is_element(Var, Exports)],
+ %% make sure to also initiate an analysis from all functions called
+ %% from on_load attributes; in Core these exist as a list of {F,A} pairs
+ OnLoadFAs = lists:flatten([cerl:atom_val(Args)
+ || {Attr, Args} <- cerl:module_attrs(Tree),
+ cerl:atom_val(Attr) =:= on_load]),
+ OnLoadLs = [cerl_trees:get_label(Fun)
+ || {Var, Fun} <- cerl:module_defs(Tree),
+ lists:member(cerl:var_name(Var), OnLoadFAs)],
+ %% init the escaping function labels to exported + called from on_load
+ InitEsc = set__from_list(OnLoadLs ++ ExpLs),
Arities = cerl_trees:fold(fun find_arities/2, dict:new(), Tree),
- #state{deps = map__new(), esc = InitEsc, call = map__new(), arities = Arities}.
+ #state{deps = map__new(), esc = InitEsc, call = map__new(),
+ arities = Arities, letrecs = map__new()}.
find_arities(Tree, AccMap) ->
case cerl:is_c_fun(Tree) of
@@ -490,9 +522,15 @@ state__add_deps(From, #output{type = single, content=To},
%% io:format("Adding deps from ~w to ~w\n", [From, set__to_ordsets(To)]),
State#state{deps = map__add(From, To, Map)}.
+state__add_letrecs(Var, Fun, #state{letrecs = Map} = State) ->
+ State#state{letrecs = map__store(Var, Fun, Map)}.
+
state__deps(#state{deps = Deps}) ->
Deps.
+state__letrecs(#state{letrecs = Letrecs}) ->
+ Letrecs.
+
state__add_esc(#output{content = none}, State) ->
State;
state__add_esc(#output{type = single, content = Set},
diff --git a/lib/dialyzer/src/dialyzer_gui.erl b/lib/dialyzer/src/dialyzer_gui.erl
deleted file mode 100644
index 97e5752577..0000000000
--- a/lib/dialyzer/src/dialyzer_gui.erl
+++ /dev/null
@@ -1,1381 +0,0 @@
-%% -*- erlang-indent-level: 2 -*-
-%%------------------------------------------------------------------------
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%%-----------------------------------------------------------------------
-%%% File : dialyzer_gui.erl
-%%% Authors : Tobias Lindahl <[email protected]>
-%%% Kostis Sagonas <[email protected]>
-%%% Description : The graphical user interface for the Dialyzer tool.
-%%%
-%%% Created : 27 Apr 2004 by Tobias Lindahl <[email protected]>
-%%%-----------------------------------------------------------------------
-
--module(dialyzer_gui).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,editor,2}},
- {nowarn_deprecated_function,{gs,entry,2}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,listbox,2}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menubar,2}},
- {nowarn_deprecated_function,{gs,menubutton,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,radiobutton,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,stop,0}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
--export([start/1]).
-
--include("dialyzer.hrl").
-
-%%------------------------------------------------------------------------
-
--define(DIALYZER_ERROR_TITLE, "Dialyzer Error").
--define(DIALYZER_MESSAGE_TITLE, "Dialyzer Message").
-
-%%------------------------------------------------------------------------
-
--type gs_object() :: any(). %% XXX: should be imported from gs
-
--record(mode, {start_byte_code :: gs_object(),
- start_src_code :: gs_object()}).
-
--record(menu, {file_save_log :: gs_object(),
- file_save_warn :: gs_object(),
- file_quit :: gs_object(),
- help_about :: gs_object(),
- help_manual :: gs_object(),
- help_warnings :: gs_object(),
- opts_macros :: gs_object(),
- opts_includes :: gs_object(),
- plt_empty :: gs_object(),
- plt_search_doc :: gs_object(),
- plt_show_doc :: gs_object(),
- warnings :: gs_object()}).
-
--record(gui_state, {add_all :: gs_object(),
- add_file :: gs_object(),
- add_rec :: gs_object(),
- chosen_box :: gs_object(),
- analysis_pid :: pid(),
- del_file :: gs_object(),
- doc_plt :: dialyzer_plt:plt(),
- clear_chosen :: gs_object(),
- clear_log :: gs_object(),
- clear_warn :: gs_object(),
- init_plt :: dialyzer_plt:plt(),
- dir_entry :: gs_object(),
- file_box :: gs_object(),
- file_wd :: gs_object(),
- gs :: gs_object(),
- log :: gs_object(),
- menu :: #menu{},
- mode :: #mode{},
- options :: #options{},
- packer :: gs_object(),
- run :: gs_object(),
- stop :: gs_object(),
- top :: gs_object(),
- warnings_box :: gs_object(),
- backend_pid :: pid()}).
-
-%%------------------------------------------------------------------------
-
--spec start(#options{}) -> ?RET_NOTHING_SUSPICIOUS.
-
-start(#options{from = From, init_plts = InitPltFiles,
- legal_warnings = LegalWarnings} = DialyzerOptions) ->
- process_flag(trap_exit, true),
-
- GS = gs:start(),
- code:add_pathsa(["."]),
- WH = [{width, 1000}, {height, 550}],
- EmptySpace = {stretch, 1},
-
- {ok, Host} = inet:gethostname(),
- %% --------- Top Window --------------
- TopWin = gs:window(GS, [{title, "Dialyzer " ++ ?VSN ++ " @ " ++ Host},
- {configure, true},
- {default, listbox, {bg, white}},
- {default, editor, {bg, white}},
- {default, entry, {bg, white}},
- {default, button, {font, {helvetica, bold, 12}}},
- {default, label, {font, {helvetica, bold, 12}}}
- |WH]),
- Packer = gs:frame(TopWin, [{packer_x, [{stretch, 3},{fixed, 200},
- {stretch, 7}]},
- {packer_y, [{fixed, 25}, {fixed, 20},
- {stretch, 1, 50},
- {fixed, 25}, {fixed, 20},
- {stretch, 1, 50},
- {fixed, 25}]}]),
-
- %% --------- Chosen box --------------
- gs:label(Packer, [{label, {text, "Directories or modules to analyze"}},
- {height, 20}, {pack_xy, {1, 2}}]),
- ChosenBox = gs:listbox(Packer, [{pack_xy, {1, 3}}, {vscroll, right},
- {selectmode, multiple}]),
-
- %% --------- File box --------------
- gs:label(Packer, [{label, {text, "File"}}, {height, 20}, {pack_xy, {1,5}}]),
- FilePacker = gs:frame(Packer, [{packer_x, [{fixed, 30}, {stretch, 1, 100}]},
- {packer_y, [{fixed, 25}, {stretch, 1, 25}]},
- {pack_xy, {1, 6}}]),
- gs:label(FilePacker, [{label, {text, "Dir:"}}, {pack_xy, {1, 1}}]),
- DirEntry = gs:entry(FilePacker, [{height, 30}, {pack_xy, {2, 1}},
- {keypress, true}]),
- File = gs:listbox(FilePacker, [{pack_x, {1,2}}, {pack_y, 2},
- {selectmode, multiple}, {doubleclick, true},
- {vscroll, right}]),
-
- %% --------- Options --------------
- gs:label(Packer, [{label, {text, "Analysis Options"}},
- {height, 20}, {pack_xy, {2, 2}}]),
- ModePacker = gs:frame(Packer, [{packer_x, [{fixed, 75}, {fixed, 120}]},
- {packer_y, [{fixed, 20}, {fixed, 20},
- {fixed, 20},
- %% EmptySpace,
- {fixed, 20}, {fixed, 20},
- {fixed, 20}, EmptySpace]},
- {bw, 10}, {relief, flat},
- {default, {radiobutton, {align, w}}},
- {default, {label, {align, w}}},
- {pack_xy, {2, 3}}]),
-
- %% Bytecode vs. Source code
- gs:label(ModePacker, [{label, {text, "File Type:"}},
- {height, 20}, {pack_xy, {1,1}}]),
- {ByteSel, SrcSel} = case From of
- byte_code -> {[{select, true}], []};
- src_code -> {[], [{select, true}]}
- end,
- ModeByteCode = gs:radiobutton(ModePacker,
- ByteSel ++ [{group, start_from},
- {label, {text,"BeamFiles"}},
- {pack_xy, {2,1}}]),
- ModeSrcCode = gs:radiobutton(ModePacker,
- SrcSel ++ [{group, start_from},
- {label, {text,"SourceFiles"}},
- {pack_xy, {2,2}}]),
- Mode = #mode{start_byte_code = ModeByteCode,
- start_src_code = ModeSrcCode},
-
- %% --------- Log box --------------
- gs:label(Packer, [{label, {text, "Log"}}, {height, 20}, {pack_xy, {3,2}}]),
- Log = gs:editor(Packer, [{pack_x, 3}, {pack_y, 3}, {enable, false},
- {font, {courier, 12}}, {vscroll, right},
- {wrap, word}]),
-
- %% --------- Warnings box --------------
- gs:label(Packer, [{label, {text, "Warnings"}},{height, 20},{pack_xy, {3,5}}]),
- WarningsBox = gs:editor(Packer, [{pack_x, {2,3}}, {pack_y, 6},
- {enable, false},
- {font, {courier, 12}}, {vscroll, right},
- {wrap, word}]),
-
- %% --------- Buttons --------------
- ButtonPackerHighLeft =
- gs:frame(Packer, [{packer_x, [{fixed, 50}, {fixed, 65}, EmptySpace]},
- {pack_xy, {1,4}}]),
- ButtonPackerHighRight =
- gs:frame(Packer, [{packer_x, [{fixed, 70}, {fixed, 70}, EmptySpace]},
- {pack_xy, {3,4}}]),
- ButtonPackerLowLeft =
- gs:frame(Packer, [{packer_x, [{fixed, 50},
- {fixed, 60},
- {fixed, 110},
- EmptySpace]},
- {pack_xy, {1,7}}]),
- ButtonPackerLowRight =
- gs:frame(Packer, [{packer_x, [{fixed, 100},
- {fixed, 70},
- EmptySpace,
- {fixed, 70},
- {fixed, 70}]},
- {pack_x, {2,3}}, {pack_y, 7}]),
-
- WHButton = [{width, 60}, {height, 20}],
- AddFile = gs:button(ButtonPackerLowLeft, [{pack_xy, {1, 1}},
- {label, {text,"Add"}}|WHButton]),
- AddAll = gs:button(ButtonPackerLowLeft, [{pack_xy, {2, 1}},
- {label, {text,"Add All"}}|WHButton]),
- AddRec = gs:button(ButtonPackerLowLeft, [{pack_xy, {3, 1}},
- {label, {text,"Add Recursively"}}
- |WHButton]),
- DelFile = gs:button(ButtonPackerHighLeft, [{pack_xy, {1, 1}},
- {label, {text,"Delete"}}|WHButton]),
- ClearChosen = gs:button(ButtonPackerHighLeft, [{pack_xy, {2, 1}},
- {label, {text,"Delete All"}}
- |WHButton]),
- ClearLog = gs:button(ButtonPackerHighRight, [{pack_xy, {1, 1}},
- {label, {text,"Clear Log"}}
- |WHButton]),
- ClearWarn = gs:button(ButtonPackerLowRight, [{pack_xy, {1, 1}},
- {label, {text,"Clear Warnings"}}
- |WHButton]),
-
- Run = gs:button(ButtonPackerLowRight, [{pack_xy, {4, 1}},
- {label, {text,"Run"}}|WHButton]),
- Stop = gs:button(ButtonPackerLowRight, [{pack_xy, {5, 1}}, {enable, false},
- {label, {text,"Stop"}}|WHButton]),
-
- %% --------- Menu --------------
- MenuBar = gs:menubar(TopWin, []),
-
- %% File Menu
- MenuBarFile = gs:menubutton(MenuBar, [{label, {text, "File"}}]),
- MenuFile = gs:menu(MenuBarFile, []),
- MenuFileSaveWarn = gs:menuitem(MenuFile, [{label, {text, "Save Warnings"}}]),
- MenuFileSaveLog = gs:menuitem(MenuFile, [{label, {text, "Save Log"}}]),
- MenuFileQuit = gs:menuitem(MenuFile, [{label, {text, "Quit"}}]),
-
- %% Warnings Menu
- MenuBarWarn = gs:menubutton(MenuBar, [{label, {text, "Warnings"}}]),
- MenuWarn = gs:menu(MenuBarWarn, []),
- MenuWarnMatch = gs:menuitem(MenuWarn, [{label, {text, "Match failures"}},
- {itemtype, check}, {select, true}]),
- MenuWarnFailingCall = gs:menuitem(MenuWarn,
- [{label, {text, "Failing function calls"}},
- {itemtype, check}, {select, true}]),
- MenuWarnFunApp = gs:menuitem(MenuWarn, [{label,
- {text, "Bad fun applications"}},
- {itemtype, check}, {select, true}]),
- MenuWarnOpaque = gs:menuitem(MenuWarn, [{label,
- {text, "Opaqueness violations"}},
- {itemtype, check}, {select, true}]),
- MenuWarnLists = gs:menuitem(MenuWarn,
- [{label, {text, "Improper list constructions"}},
- {itemtype, check}, {select, true}]),
- MenuWarnNotCalled = gs:menuitem(MenuWarn,
- [{label, {text, "Unused functions"}},
- {itemtype, check}, {select, true}]),
- MenuWarnReturnOnlyExit = gs:menuitem(MenuWarn,
- [{label,
- {text, "Error handling functions"}},
- {itemtype, check}, {select, false}]),
- MenuWarnReturnNoReturn = gs:menuitem(MenuWarn,
- [{label,
- {text, "Functions of no return"}},
- {itemtype, check}, {select, true}]),
- MenuWarnCallNonExported = gs:menuitem(MenuWarn,
- [{label,
- {text, "Call to unexported function"}},
- {itemtype, check}, {select, true}]),
- MenuWarnRaceCondition = gs:menuitem(MenuWarn,
- [{label,
- {text,"Possible race conditions"}},
- {itemtype, check}, {select, false}]),
- MenuWarnContractTypes = gs:menuitem(MenuWarn,
- [{label, {text, "Wrong contracts"}},
- {itemtype, check}, {select, true}]),
- MenuWarnContractSyntax = gs:menuitem(MenuWarn,
- [{label,
- {text, "Wrong contract syntax"}},
- {itemtype, check}, {select, true}]),
-
- %% PLT Menu
- MenuBarPLT = gs:menubutton(MenuBar, [{label, {text,"PLT"}}]),
- MenuPLT = gs:menu(MenuBarPLT, []),
- MenuPLTEmpty = gs:menuitem(MenuPLT, [{label, {text, "Init with empty PLT"}},
- {itemtype, check}, {select, false}]),
- MenuPLTShow = gs:menuitem(MenuPLT, [{label, {text, "Show contents"}}]),
- MenuPLTSearch = gs:menuitem(MenuPLT, [{label, {text, "Search contents"}}]),
-
- %% Options Menu
- MenuBarOpts = gs:menubutton(MenuBar, [{label,{text,"Options"}}]),
- MenuOpts = gs:menu(MenuBarOpts, []),
- MenuOptsMacros = gs:menuitem(MenuOpts,
- [{label, {text, "Manage Macro Definitions"}}]),
- MenuOptsIncludes = gs:menuitem(MenuOpts,
- [{label, {text, "Manage Include Directories"}}]),
-
- %% Help
- MenuBarHelp = gs:menubutton(MenuBar, [{label, {text, "Help"}}, {side, right}]),
- MenuHelp = gs:menu(MenuBarHelp, []),
- MenuHelpManual = gs:menuitem(MenuHelp, [{label, {text, "Manual"}}]),
- MenuHelpWarnings = gs:menuitem(MenuHelp, [{label, {text, "Warning Options"}}]),
- MenuHelpAbout = gs:menuitem(MenuHelp, [{label, {text, "About"}}]),
-
- Warnings = [{?WARN_RETURN_NO_RETURN, MenuWarnReturnNoReturn},
- {?WARN_RETURN_ONLY_EXIT, MenuWarnReturnOnlyExit},
- {?WARN_NOT_CALLED, MenuWarnNotCalled},
- {?WARN_NON_PROPER_LIST, MenuWarnLists},
- {?WARN_FUN_APP, MenuWarnFunApp},
- {?WARN_MATCHING, MenuWarnMatch},
- {?WARN_OPAQUE, MenuWarnOpaque},
- {?WARN_FAILING_CALL, MenuWarnFailingCall},
- {?WARN_CALLGRAPH, MenuWarnCallNonExported},
- {?WARN_RACE_CONDITION, MenuWarnRaceCondition},
- %% For contracts.
- {?WARN_CONTRACT_TYPES, MenuWarnContractTypes},
- {?WARN_CONTRACT_SYNTAX, MenuWarnContractSyntax}
- ],
-
- init_warnings(Warnings, LegalWarnings),
-
- Menu = #menu{file_quit = MenuFileQuit,
- plt_empty = MenuPLTEmpty,
- help_manual = MenuHelpManual,
- help_about = MenuHelpAbout,
- help_warnings = MenuHelpWarnings,
- opts_macros = MenuOptsMacros,
- opts_includes = MenuOptsIncludes,
- plt_search_doc = MenuPLTSearch,
- plt_show_doc = MenuPLTShow,
- file_save_log = MenuFileSaveLog,
- file_save_warn = MenuFileSaveWarn,
- warnings = Warnings},
-
- %% --------- Init --------------
- gs:config(TopWin, [{map, true}]),
- gs:config(Packer, WH),
- {ok, CWD} = file:get_cwd(),
-
- InitPlt =
- case InitPltFiles of
- [] -> dialyzer_plt:new();
- _ ->
- Plts = [dialyzer_plt:from_file(F) || F <- InitPltFiles],
- dialyzer_plt:merge_plts_or_report_conflicts(InitPltFiles, Plts)
- end,
-
- State = #gui_state{add_all = AddAll,
- add_file = AddFile,
- add_rec = AddRec,
- chosen_box = ChosenBox,
- clear_chosen = ClearChosen,
- clear_log = ClearLog,
- clear_warn = ClearWarn,
- del_file = DelFile,
- doc_plt = dialyzer_plt:new(),
- dir_entry = DirEntry,
- file_box = File,
- file_wd = CWD,
- gs = GS,
- init_plt = InitPlt,
- log = Log,
- menu = Menu,
- mode = Mode,
- options = DialyzerOptions,
- packer = Packer,
- run = Run,
- stop = Stop,
- top = TopWin,
- warnings_box = WarningsBox},
- NewState = change_dir_or_add_file(State, "."),
- gui_loop(NewState).
-
-%% ----------------------------------------------------------------
-%%
-%% Main GUI Loop
-%%
-
--spec gui_loop(#gui_state{}) -> ?RET_NOTHING_SUSPICIOUS.
-
-gui_loop(#gui_state{add_all = AddAll, add_file = AddFile, add_rec = AddRec,
- backend_pid = BackendPid, chosen_box = ChosenBox,
- clear_chosen = ClearChosen, clear_log = ClearLog,
- clear_warn = ClearWarn, del_file = DelFile,
- dir_entry = DirEntry, file_box = File, log = Log,
- menu = Menu, packer = Packer, run = Run, stop = Stop,
- top = TopWin, warnings_box = Warn} = State) ->
- %% --- Menu ---
- Quit = Menu#menu.file_quit,
- Manual = Menu#menu.help_manual,
- Warnings = Menu#menu.help_warnings,
- About = Menu#menu.help_about,
- SaveLog = Menu#menu.file_save_log,
- SaveWarn = Menu#menu.file_save_warn,
- SearchPlt = Menu#menu.plt_search_doc,
- ShowPlt = Menu#menu.plt_show_doc,
- Macros = Menu#menu.opts_macros,
- Includes = Menu#menu.opts_includes,
-
- receive
- {gs, TopWin, configure, _Data, [W, H|_]} ->
- gs:config(Packer, [{width, W}, {height, H}]),
- gui_loop(State);
- {gs, TopWin, destroy, _Data, _Args} ->
- ?RET_NOTHING_SUSPICIOUS;
- {gs, File, doubleclick, _, [_Id, Text|_]} ->
- NewState = change_dir_or_add_file(State, Text),
- gui_loop(NewState);
- {gs, DirEntry, keypress, _, ['Return'|_]} ->
- gs:config(TopWin, [{setfocus, true}]),
- NewState = change_dir_absolute(State, gs:read(DirEntry, text)),
- gui_loop(NewState);
- {gs, DirEntry, keypress, _, _} ->
- gui_loop(State);
- %% ----- Buttons -----
- {gs, AddFile, click, _, _} ->
- handle_add_files(State),
- gui_loop(State);
- {gs, AddAll, click, _, _} ->
- handle_add_all_click(State),
- gui_loop(State);
- {gs, AddRec, click, _, _} ->
- handle_add_rec_click(State),
- gui_loop(State);
- {gs, DelFile, click, _, _} ->
- handle_file_delete(State),
- gui_loop(State);
- {gs, ClearChosen, click, _, _} ->
- gs:config(ChosenBox, [clear]),
- gui_loop(State);
- {gs, ClearLog, click, _, _} ->
- Log = State#gui_state.log,
- gs:config(Log, [{enable, true}]),
- gs:config(Log, [clear]),
- gs:config(Log, [{enable, false}]),
- gui_loop(State);
- {gs, ClearWarn, click, _, _} ->
- Warn = State#gui_state.warnings_box,
- gs:config(Warn, [{enable, true}]),
- gs:config(Warn, [clear]),
- gs:config(Warn, [{enable, false}]),
- gui_loop(State);
- {gs, Run, click, _, _} ->
- NewState = start_analysis(State),
- gui_loop(NewState);
- {gs, Stop, click, _, _} ->
- config_gui_stop(State),
- BackendPid ! {self(), stop},
- update_editor(Log, "\n***** Analysis stopped ****\n"),
- gui_loop(State);
- %% ----- Menu -----
- {gs, Quit, click, _, _} ->
- case maybe_quit(State) of
- true -> ?RET_NOTHING_SUSPICIOUS;
- false -> gui_loop(State)
- end;
- {gs, Manual, click, _, _} ->
- spawn_link(fun() -> manual(State) end),
- gui_loop(State);
- {gs, Warnings, click, _, _} ->
- spawn_link(fun() -> warnings(State) end),
- gui_loop(State);
- {gs, About, click, _, _} ->
- spawn_link(fun() -> about(State) end),
- gui_loop(State);
- {gs, SaveLog, click, _, _} ->
- save_log(State),
- gui_loop(State);
- {gs, SaveWarn, click, _, _} ->
- save_warn(State),
- gui_loop(State);
- {gs, SearchPlt, click, _, _} ->
- spawn_link(fun() -> search_doc_plt(State) end),
- gui_loop(State);
- {gs, ShowPlt, click, _, _} ->
- spawn_link(fun() -> show_doc_plt(State) end),
- gui_loop(State);
- {gs, Macros, click, _, _} ->
- Self = self(),
- spawn_link(fun() -> macro_dialog(State, Self) end),
- gui_loop(State);
- {gs, Includes, click, _, _} ->
- Self = self(),
- spawn_link(fun() -> include_dialog(State, Self) end),
- gui_loop(State);
- {new_options, NewOptions} ->
- NewState = State#gui_state{options = NewOptions},
- gui_loop(NewState);
- %% ----- Analysis -----
- {BackendPid, ext_calls, ExtCalls} ->
- Msg = io_lib:format("The following functions are called "
- "but type information about them is not available.\n"
- "The analysis might get more precise by including "
- "the modules containing these functions:\n\n\t~p\n",
- [ExtCalls]),
- free_editor(State, "Analysis done", Msg),
- gui_loop(State);
- {BackendPid, ext_types, ExtTypes} ->
- Map = fun({M,F,A}) -> io_lib:format("~p:~p/~p",[M,F,A]) end,
- ExtTypeString = string:join(lists:map(Map, ExtTypes), "\n"),
- Msg = io_lib:format("The following remote types are being used "
- "but information about them is not available.\n"
- "The analysis might get more precise by including "
- "the modules containing these types and making sure "
- "that they are exported:\n~s\n", [ExtTypeString]),
- free_editor(State, "Analysis done", Msg),
- gui_loop(State);
- {BackendPid, log, LogMsg} ->
- update_editor(Log, LogMsg),
- gui_loop(State);
- {BackendPid, warnings, Warns} ->
- SortedWarns = lists:keysort(2, Warns), %% Sort on file/line
- WarnList = [dialyzer:format_warning(W) || W <- SortedWarns],
- update_editor(Warn, lists:flatten(WarnList)),
- gui_loop(State);
- {BackendPid, done, _NewPlt, NewDocPlt} ->
- message(State, "Analysis done"),
- config_gui_stop(State),
- gui_loop(State#gui_state{doc_plt = NewDocPlt});
- {'EXIT', BackendPid, {error, Reason}} ->
- free_editor(State, ?DIALYZER_ERROR_TITLE, Reason),
- config_gui_stop(State),
- gui_loop(State);
- {'EXIT', BackendPid, Reason} when Reason =/= 'normal' ->
- free_editor(State, ?DIALYZER_ERROR_TITLE, io_lib:format("~p", [Reason])),
- config_gui_stop(State),
- gui_loop(State);
- _Other ->
- %% io:format("Received ~p\n", [Other]),
- gui_loop(State)
- end.
-
-%% ----------------------------------------------------------------
-%%
-%% Main window actions
-%%
-
-%% ---- Adding and deleting files ----
-
-handle_add_all_click(#gui_state{chosen_box = ChosenBox, file_box = File,
- file_wd = FWD, mode = Mode}) ->
- case gs:read(File, items) of
- [] ->
- ok;
- Add0 ->
- gs:config(File, [{selection, clear}]),
- Add1 = ordsets:subtract(Add0, [".."]),
- Add = ordsets:from_list([filename:join(FWD, X) || X <- Add1]),
- case gs:read(Mode#mode.start_byte_code, select) of
- true ->
- add_files(filter_mods(Add, ".beam"), ChosenBox, byte_code);
- false ->
- add_files(filter_mods(Add, ".erl"), ChosenBox, src_code)
- end
- end.
-
-all_subdirs(Dirs) ->
- all_subdirs(Dirs, []).
-
-all_subdirs([Dir|T], Acc) ->
- {ok, Files} = file:list_dir(Dir),
- SubDirs = lists:zf(fun(F) ->
- SubDir = filename:join(Dir, F),
- case filelib:is_dir(SubDir) of
- true -> {true, SubDir};
- false -> false
- end
- end, Files),
- NewAcc = ordsets:union(ordsets:from_list(SubDirs), Acc),
- all_subdirs(T ++ SubDirs, NewAcc);
-all_subdirs([], Acc) ->
- Acc.
-
-handle_add_rec_click(#gui_state{chosen_box = ChosenBox, file_box = File,
- file_wd = FWD, mode = Mode}) ->
- case gs:read(File, selection) of
- [] ->
- ok;
- List ->
- gs:config(File, [{selection, clear}]),
- Dirs1 = [gs:read(File, {get, X}) || X <- List],
- Dirs2 = ordsets:from_list([filename:join(FWD, X) || X <- Dirs1]),
- Dirs3 = ordsets:filter(fun(X) -> filelib:is_dir(X) end, Dirs2),
- TargetDirs = ordsets:union(Dirs3, all_subdirs(Dirs3)),
- {Code, Ext} = case gs:read(Mode#mode.start_byte_code, select) of
- true -> {byte_code, ".beam"};
- false -> {src_code, ".erl"}
- end,
- add_files(filter_mods(TargetDirs, Ext), ChosenBox, Code)
- end.
-
-handle_add_files(#gui_state{chosen_box = ChosenBox, file_box = File,
- file_wd = FWD, mode = Mode}) ->
- case gs:read(File, selection) of
- [] ->
- ok;
- List ->
- gs:config(File, [{selection, clear}]),
- Add0 = [gs:read(File, {get, X}) || X <- List],
- Add = ordsets:from_list([filename:join(FWD, X) || X <- Add0]),
- case gs:read(Mode#mode.start_byte_code, select) of
- true ->
- add_files(filter_mods(Add, ".beam"), ChosenBox, byte_code);
- false ->
- add_files(filter_mods(Add, ".erl"), ChosenBox, src_code)
- end
- end.
-
-filter_mods(Mods, Extension) ->
- Fun = fun(X) ->
- filename:extension(X) =:= Extension
- orelse
- (filelib:is_dir(X) andalso
- contains_files(X, Extension))
- end,
- ordsets:filter(Fun, Mods).
-
-contains_files(Dir, Extension) ->
- {ok, Files} = file:list_dir(Dir),
- lists:any(fun(X) -> filename:extension(X) =:= Extension end, Files).
-
-add_files(Add, ChosenBox, Type) ->
- Set = gs:read(ChosenBox, items),
- Set1 =
- case Type of
- byte_code -> filter_mods(Set, ".beam");
- src_code -> filter_mods(Set, ".erl")
- end,
- Files = ordsets:union(Add, Set1),
- gs:config(ChosenBox, [{items, Files}]),
- ok.
-
-handle_file_delete(#gui_state{chosen_box = ChosenBox}) ->
- List = gs:read(ChosenBox, selection),
- lists:foreach(fun(X) -> gs:config(ChosenBox, [{del, X}]) end,
- lists:reverse(lists:sort(List))).
-
-%% ---- Other ----
-
-change_dir_or_add_file(#gui_state{file_wd = FWD, mode = Mode, dir_entry = Dir,
- chosen_box = CBox, file_box = File} = State,
- Text) ->
- NewWDorFile =
- case Text of
- ".." -> filename:join(butlast(filename:split(FWD)));
- "." -> FWD;
- _ -> filename:join(FWD, Text)
- end,
- case filelib:is_dir(NewWDorFile) of
- true ->
- gs:config(Dir, [{text, NewWDorFile}]),
- {ok, List} = file:list_dir(NewWDorFile),
- gs:config(File, [{items, [".."|lists:sort(List)]}]),
- State#gui_state{file_wd = NewWDorFile};
- false ->
- case gs:read(Mode#mode.start_byte_code, select) of
- true ->
- case filter_mods([NewWDorFile], ".beam") of
- [] -> ok;
- RealFiles -> add_files(RealFiles, CBox, byte_code)
- end;
- false ->
- case filter_mods([NewWDorFile], ".erl") of
- [] -> ok;
- RealFiles -> add_files(RealFiles, CBox, src_code)
- end
- end,
- State
- end.
-
-butlast([H1, H2 | T]) ->
- [H1 | butlast([H2|T])];
-butlast([_]) ->
- [];
-butlast([]) ->
- ["/"].
-
-change_dir_absolute(#gui_state{file_wd = FWD, dir_entry = Dir,
- file_box = File} = State,
- Text) ->
- case filelib:is_dir(Text) of
- true ->
- WD = filename:join(FWD, Text),
- gs:config(Dir, [{text, WD}]),
- {ok, List} = file:list_dir(WD),
- gs:config(File, [{items, [".."|lists:sort(List)]}]),
- State#gui_state{file_wd = WD};
- false ->
- State
- end.
-
-init_warnings([{Tag, GSItem}|Left], LegalWarnings) ->
- Select = ordsets:is_element(Tag, LegalWarnings),
- gs:config(GSItem, [{select, Select}]),
- init_warnings(Left, LegalWarnings);
-init_warnings([], _LegalWarnings) ->
- ok.
-
-config_gui_start(State) ->
- Enabled = [{enable, true}],
- Disabled = [{enable, false}],
- gs:config(State#gui_state.stop, Enabled),
- gs:config(State#gui_state.run, Disabled),
- gs:config(State#gui_state.del_file, Disabled),
- gs:config(State#gui_state.clear_chosen, Disabled),
- gs:config(State#gui_state.add_file, Disabled),
- gs:config(State#gui_state.add_all, Disabled),
- gs:config(State#gui_state.add_rec, Disabled),
- gs:config(State#gui_state.clear_warn, Disabled),
- gs:config(State#gui_state.clear_log, Disabled),
- Menu = State#gui_state.menu,
- gs:config(Menu#menu.file_save_warn, Disabled),
- gs:config(Menu#menu.file_save_log, Disabled),
- gs:config(Menu#menu.opts_macros, Disabled),
- gs:config(Menu#menu.opts_includes, Disabled),
- gs:config(Menu#menu.plt_empty, Disabled),
- gs:config(Menu#menu.plt_search_doc, Disabled),
- gs:config(Menu#menu.plt_show_doc, Disabled),
- Mode = State#gui_state.mode,
- gs:config(Mode#mode.start_byte_code, Disabled),
- gs:config(Mode#mode.start_src_code, Disabled).
-
-config_gui_stop(State) ->
- Enabled = [{enable, true}],
- Disabled = [{enable, false}],
- gs:config(State#gui_state.stop, Disabled),
- gs:config(State#gui_state.run, Enabled),
- gs:config(State#gui_state.del_file, Enabled),
- gs:config(State#gui_state.clear_chosen, Enabled),
- gs:config(State#gui_state.add_file, Enabled),
- gs:config(State#gui_state.add_all, Enabled),
- gs:config(State#gui_state.add_rec, Enabled),
- gs:config(State#gui_state.clear_warn, Enabled),
- gs:config(State#gui_state.clear_log, Enabled),
- Menu = State#gui_state.menu,
- gs:config(Menu#menu.file_save_warn, Enabled),
- gs:config(Menu#menu.file_save_log, Enabled),
- gs:config(Menu#menu.opts_macros, Enabled),
- gs:config(Menu#menu.opts_includes, Enabled),
- gs:config(Menu#menu.plt_empty, Enabled),
- gs:config(Menu#menu.plt_search_doc, Enabled),
- gs:config(Menu#menu.plt_show_doc, Enabled),
- Mode = State#gui_state.mode,
- gs:config(Mode#mode.start_byte_code, Enabled),
- gs:config(Mode#mode.start_src_code, Enabled).
-
-%% ----------------------------------------------------------------
-%%
-%% Messages
-%%
-
-message(State, Message) ->
- output_sms(State, ?DIALYZER_MESSAGE_TITLE, Message).
-
-error_sms(State, Message) ->
- output_sms(State, ?DIALYZER_ERROR_TITLE, Message).
-
-%%
-%% This function is to be used *only* for small messages because lines
-%% are not wrapped and the created window has a limited area for text.
-%% For bigger messages, the function free_editor/3 is to be used.
-%%
-output_sms(#gui_state{gs = GS, top = TopWin}, Title, Message) ->
- %% Lines = string:words(Message, $\n),
- %% io:format("The message has ~w lines\n", [Lines]),
- WH = [{width, 400}, {height, 100}],
- MessageWin = gs:window(GS, [{title, Title},
- {default, button, {font, {helvetica, bold, 12}}}
- |WH]),
- MessagePacker = gs:frame(MessageWin, [{packer_y, [{fixed, 75}, {fixed, 25}]},
- {packer_x, [{fixed, 175},{fixed, 50},
- {fixed, 175}]}]),
- gs:label(MessagePacker, [{pack_x, {1, 3}}, {pack_y, 1},
- {label, {text, Message}}]),
- OK = gs:button(MessagePacker, [{label, {text, "OK"}}, {pack_xy, {2, 2}}]),
- gs:config(MessageWin, [{map, true}]),
- gs:config(MessagePacker, WH),
- message_loop(OK, MessageWin, TopWin).
-
-message_loop(Ok, Win, TopWin) ->
- receive
- {gs, Ok, click, _, _} ->
- gs:destroy(Win);
- {gs, Win, destroy, _, _} ->
- ok;
- {gs, TopWin, destroy, _, _} ->
- exit(normal);
- {gs, _, _, _, _} ->
- message_loop(Ok, Win, TopWin)
- end.
-
-dialog(#gui_state{gs = GS, top = TopWin}, Message, OkLabel, CancelLabel) ->
- WH = [{width, 400}, {height, 100}],
- WHButton = [{width, 70}, {height, 20}],
- DialogWin = gs:window(GS, [{title, "Dialyzer Message"},
- {default, button, {font, {helvetica, bold, 12}}}
- |WH]),
- DialogPacker = gs:frame(DialogWin, [{packer_y, [{fixed, 75}, {fixed, 25}]},
- {packer_x, [{fixed, 150}, {fixed, 50},
- {fixed, 50}, {fixed, 150}]}]),
- gs:label(DialogPacker, [{pack_x, {1,4}}, {pack_y, 1},
- {label, {text, Message}}]),
- Ok = gs:button(DialogPacker, [{label, {text, OkLabel}},
- {pack_xy, {2,2}}|WHButton]),
- Cancel = gs:button(DialogPacker, [{label, {text, CancelLabel}},
- {pack_xy, {3,2}}|WHButton]),
- gs:config(DialogWin, [{map, true}]),
- gs:config(DialogPacker, WH),
- dialog_loop(Ok, Cancel, DialogWin, TopWin).
-
-dialog_loop(Ok, Cancel, Win, TopWin) ->
- receive
- {gs, Ok, click, _, _} ->
- gs:destroy(Win),
- true;
- {gs, Cancel, click, _, _} ->
- gs:destroy(Win),
- false;
- {gs, Win, destroy, _, _} ->
- false;
- {gs, TopWin, destroy, _, _} ->
- exit(normal);
- {gs, _, _, _, _} ->
- dialog_loop(Ok, Cancel, Win, TopWin)
- end.
-
-maybe_quit(#gui_state{top = TopWin} = State) ->
- case dialog(State, "Do you really want to quit?", "Yes", "No") of
- true ->
- flush(),
- gs:destroy(TopWin),
- gs:stop(),
- true;
- false ->
- false
- end.
-
-
-%% ----------------------------------------------------------------
-%%
-%% Menu actions
-%%
-
-%% ---- Help Menu ----
-
-manual(State) ->
- help_menu_common(State, "Dialyzer Manual", 500, "manual.txt", white).
-
-warnings(State) ->
- help_menu_common(State, "Dialyzer Warnings", 500, "warnings.txt", white).
-
-about(State) ->
- help_menu_common(State, "About Dialyzer", 160, "about.txt", yellow).
-
-help_menu_common(#gui_state{gs = GS, top = TopWin} = State,
- Title, Height, TxtFileName, BackGroundColor) ->
- WH = [{width, 600}, {height, Height}],
- Win = gs:window(GS, [{title, Title}, {configure, true},
- {default, editor, {bg, BackGroundColor}} | WH]),
- EmptySpace = {stretch, 1},
- Frame = gs:frame(Win, [{packer_x, [EmptySpace, {fixed, 60}, EmptySpace]},
- {packer_y, [EmptySpace, {fixed, 30}]} | WH]),
- Editor = gs:editor(Frame, [{pack_x, {1, 3}}, {pack_y, 1},
- {font, {courier, 12}}, {vscroll, right},
- {wrap, word}]),
- Button = gs:button(Frame, [{label, {text, "Ok"}}, {pack_xy, {2, 2}}]),
- gs:config(Win, [{map, true}]),
- gs:config(Frame, WH),
- AboutFile = filename:join([code:lib_dir(dialyzer), "doc", TxtFileName]),
- case gs:config(Editor, {load, AboutFile}) of
- {error, Reason} ->
- gs:destroy(Win),
- error_sms(State,
- io_lib:format("Could not find doc/~s file!\n\n ~p",
- [TxtFileName, Reason]));
- ok ->
- gs:config(Editor, [{enable, false}]),
- show_info_loop(TopWin, Win, Frame, Button)
- end.
-
-%% ---- File Menu ----
-
-save_log(#gui_state{file_wd = CWD, log = Log} = State) ->
- {Win, Entry, OkButton, CancelButton} = file_box(State, "Save Log", CWD),
- save_loop(State, OkButton, CancelButton, Entry, Win, Log).
-
-save_warn(#gui_state{file_wd = CWD, warnings_box = WBox} = State) ->
- {Win, Entry, OkButton, CancelButton} = file_box(State, "Save Warnings", CWD),
- save_loop(State, OkButton, CancelButton, Entry, Win, WBox).
-
-file_box(#gui_state{gs = GS}, Title, Default) ->
- WH = [{width, 400}, {height, 75}],
- Win = gs:window(GS, [{title, Title}|WH]),
- Fix25 = {fixed, 27}, Fix75 = {fixed, 75},
- WinPacker = gs:frame(Win, [{packer_y, [Fix25, Fix25, Fix25]},
- {packer_x, [Fix75, Fix75, Fix75, {fixed, 175}]}]),
- gs:label(WinPacker, [{pack_xy, {1,2}}, {label, {text, "Enter file:"}}]),
- Entry = gs:entry(WinPacker, [{pack_x, {2,4}}, {pack_y, 2}, {keypress, true}]),
- OkButton = gs:button(WinPacker, [{label, {text, "Ok"}}, {pack_xy, {2,3}}]),
- CancelButton = gs:button(WinPacker, [{label, {text, "Cancel"}},
- {pack_xy, {3,3}}]),
- gs:config(Entry, [{text, Default}]),
- gs:config(Win, [{map, true}]),
- gs:config(WinPacker, WH),
- {Win, Entry, OkButton, CancelButton}.
-
-save_loop(#gui_state{top = TopWin} = State,
- OkButton, CancelButton, Entry, Save, Editor) ->
- receive
- {gs, OkButton, click, _, _} ->
- File = gs:read(Entry, text),
- case gs:config(Editor, [{save, File}]) of
- {error, _} ->
- error_sms(State, "Could not write to file:\n" ++ File),
- save_loop(State, OkButton, CancelButton, Entry, Save, Editor);
- _ ->
- gs:destroy(Save)
- end;
- {gs, Entry, keypress, _, ['Return'|_]} ->
- File = gs:read(Entry, text),
- case gs:config(Editor, [{save, File}]) of
- {error, _} ->
- error_sms(State, "Could not write to file:\n" ++ File),
- save_loop(State, OkButton, CancelButton, Entry, Save, Editor);
- _ ->
- gs:destroy(Save)
- end;
- {gs, Entry, keypress, _, _} ->
- save_loop(State, OkButton, CancelButton, Entry, Save, Editor);
- {gs, CancelButton, click, _, _} ->
- gs:destroy(Save);
- {gs, TopWin, destroy, _, _} ->
- exit(normal);
- {gs, Save, destroy, _, _} ->
- ok;
- {gs, _, _, _, _} ->
- save_loop(State, OkButton, CancelButton, Entry, Save, Editor)
- end.
-
-%% ---- Plt Menu ----
-
-search_doc_plt(#gui_state{gs = GS, top = TopWin} = State) ->
- WH = [{width, 400}, {height, 100}],
- WHB = [{width, 120}, {height, 30}],
- Title = io_lib:format("Search the PLT", []),
- Win = gs:window(GS, [{title, Title}, {configure, true},
- {default, editor, {bg, white}} | WH]),
- EmptySpace = {stretch, 1},
- Frame = gs:frame(Win, [{packer_x, [EmptySpace, EmptySpace, EmptySpace]},
- {packer_y, [{fixed, 30}, {fixed, 30},
- EmptySpace, {fixed, 30}]} | WH]),
- gs:label(Frame, [{pack_xy, {1,1}}, {label, {text, "Module"}}]),
- ModEntry = gs:entry(Frame, [{pack_xy, {1,2}}]),
- gs:label(Frame, [{pack_xy, {2,1}}, {label, {text, "Function"}}]),
- FunEntry = gs:entry(Frame, [{pack_xy, {2,2}}]),
- gs:label(Frame, [{pack_xy, {3,1}}, {label, {text, "Arity"}}]),
- ArityEntry = gs:entry(Frame, [{pack_xy, {3,2}}]),
- ButtonPacker = gs:frame(Frame, [{pack_xy, {2,4}},
- {packer_x, [{fixed, 60}, {fixed, 60}]},
- {packer_y, {fixed, 30}}]),
- SearchButton = gs:button(ButtonPacker, [{label, {text, "Search"}},
- {pack_xy, {1,1}}]),
- CancelButton = gs:button(ButtonPacker, [{label, {text, "Cancel"}},
- {pack_xy, {2,1}}]),
- gs:config(Win, [{map, true}]),
- gs:config(Frame, WH),
- gs:config(ButtonPacker, WHB),
- search_doc_plt_loop(State, CancelButton, SearchButton, ModEntry,
- FunEntry, ArityEntry, Win, TopWin).
-
-search_doc_plt_loop(State, CancelButton, SearchButton, ModEntry,
- FunEntry, ArityEntry, Win, TopWin) ->
- receive
- {gs, CancelButton, click, _, _} ->
- gs:destroy(Win),
- ok;
- {gs, TopWin, destroy, _, _} ->
- exit(normal);
- {gs, SearchButton, click, _, _} ->
- M = format_search(gs:read(ModEntry, text)),
- F = format_search(gs:read(FunEntry, text)),
- A = format_search(gs:read(ArityEntry, text)),
- case dialyzer_plt:get_specs(State#gui_state.doc_plt, M, F, A) of
- "" ->
- error_sms(State, "No such function"),
- search_doc_plt_loop(State, CancelButton, SearchButton, ModEntry,
- FunEntry, ArityEntry, Win, TopWin);
- NonEmptyString ->
- gs:destroy(Win),
- free_editor(State, "Content of PLT", NonEmptyString)
- end
- end.
-
-format_search([]) ->
- '_';
-format_search(String) ->
- try list_to_integer(String)
- catch error:_ -> list_to_atom(String)
- end.
-
-show_doc_plt(#gui_state{doc_plt = DocPLT} = State) ->
- case dialyzer_plt:get_specs(DocPLT) of
- "" -> error_sms(State, "No analysis has been made yet!\n");
- NonEmptyString -> free_editor(State, "Content of PLT", NonEmptyString)
- end.
-
-free_editor(#gui_state{gs = GS, top = TopWin}, Title, Contents0) ->
- Contents = lists:flatten(Contents0),
- Tokens = string:tokens(Contents, "\n"),
- NofLines = length(Tokens),
- LongestLine = lists:max([length(X) || X <- Tokens]),
- Height0 = NofLines * 25 + 80,
- Height = if Height0 > 500 -> 500; true -> Height0 end,
- Width0 = LongestLine * 7 + 60,
- Width = if Width0 > 800 -> 800; true -> Width0 end,
- WH = [{width, Width}, {height, Height}],
- Win = gs:window(GS, [{title, Title}, {configure, true},
- {default, editor, {bg, white}} | WH]),
- EmptySpace = {stretch, 1},
- Frame = gs:frame(Win, [{packer_x, [EmptySpace, {fixed, 60}, EmptySpace]},
- {packer_y, [EmptySpace, {fixed, 30}]}
- | WH]),
- Editor = gs:editor(Frame, [{pack_x, {1,3}}, {pack_y, 1},
- {font, {courier, 12}}, {vscroll, right},
- {wrap, word}, {enable, true}]),
- Button = gs:button(Frame, [{label, {text, "Ok"}}, {pack_xy, {2,2}}]),
- gs:config(Editor, [{insert, {insert, Contents}}]),
- gs:config(Editor, [{enable, false}]),
- gs:config(Win, [{map, true}]),
- gs:config(Frame, WH),
- show_info_loop(TopWin, Win, Frame, Button).
-
-%% ---- Common ----
-
-show_info_loop(TopWin, Win, Frame, Button) ->
- receive
- {gs, Button, click, _, _} ->
- gs:destroy(Win);
- {gs, TopWin, destroy, _, _} ->
- exit(normal);
- {gs, Win, destroy, _, _} ->
- ok;
- {gs, Win, configure, _Data, [W, H|_]} ->
- gs:config(Frame, [{width, W}, {height, H}]),
- show_info_loop(TopWin, Win, Frame, Button)
- end.
-
-include_dialog(#gui_state{gs = GS, options = Options}, Parent) ->
- WH = [{width, 300}, {height, 400}],
- Title = io_lib:format("Include Directories", []),
- Win = gs:window(GS, [{title, Title}, {configure, true},
- {default, entry, {bg, white}}| WH]),
- EmptySpace = {stretch, 1},
- Frame = gs:frame(Win, [{packer_x, [EmptySpace]},
- {packer_y, [{fixed, 30}, {fixed, 30}, {fixed, 30},
- EmptySpace, {fixed, 30}, {fixed, 30}]}
- | WH]),
- gs:label(Frame, [{pack_xy, {1,1}}, {label, {text, "Directory"}}]),
- DirEntry = gs:entry(Frame, [{pack_xy, {1,2}}]),
- ButtonPacker1 = gs:frame(Frame, [{pack_xy, {1,3}},
- {packer_x, [{fixed, 70}, {fixed, 70},
- EmptySpace]},
- {packer_y, {fixed, 30}}]),
- AddButton = gs:button(ButtonPacker1, [{label, {text, "Add"}},
- {pack_xy, {1,1}}]),
- Dirs = [io_lib:format("~s", [X]) || X <- Options#options.include_dirs],
- DirBox = gs:listbox(Frame, [{pack_xy, {1,4}}, {vscroll, right},
- {bg, white}, {configure, true},
- {selectmode, multiple}, {items, Dirs}]),
- ButtonPacker2 = gs:frame(Frame, [{pack_xy, {1,5}},
- {packer_x, [{fixed, 60}, {fixed, 70},
- EmptySpace]},
- {packer_y, {fixed, 30}}]),
- DeleteButton = gs:button(ButtonPacker2, [{label, {text, "Delete"}},
- {pack_xy, {1,1}}]),
- DeleteAllButton = gs:button(ButtonPacker2, [{label, {text, "Delete All"}},
- {pack_xy, {2,1}}]),
- ButtonPacker3 = gs:frame(Frame, [{pack_xy, {1,6}},
- {packer_x, [EmptySpace,
- {fixed, 60}, {fixed, 60}]},
- {packer_y, {fixed, 30}}]),
- OkButton = gs:button(ButtonPacker3, [{label, {text, "Ok"}},
- {pack_xy, {2,1}}]),
- CancelButton = gs:button(ButtonPacker3, [{label, {text, "Cancel"}},
- {pack_xy, {3,1}}]),
- gs:config(Win, [{map, true}]),
- gs:config(Frame, WH),
- include_loop(Parent, Options, Frame, AddButton, DeleteAllButton, DeleteButton,
- DirBox, DirEntry, OkButton, CancelButton, Win).
-
-include_loop(Parent, Options, Frame, AddButton, DeleteAllButton, DeleteButton,
- DirBox, DirEntry, OkButton, CancelButton, Win) ->
- receive
- {gs, CancelButton, click, _, _} ->
- gs:destroy(Win),
- ok;
- {gs, OkButton, click, _, _} ->
- gs:destroy(Win),
- Parent ! {new_options, Options},
- ok;
- {gs, Win, configure, _Data, [W, H|_]} ->
- gs:config(Frame, [{width, W}, {height, H}]),
- include_loop(Parent, Options, Frame, AddButton, DeleteAllButton,
- DeleteButton, DirBox, DirEntry, OkButton, CancelButton, Win);
- {gs, AddButton, click, _, _} ->
- Dirs = Options#options.include_dirs,
- NewDirs =
- case gs:read(DirEntry, text) of
- [] -> Dirs;
- Add -> [Add|Dirs]
- end,
- NewOptions = Options#options{include_dirs = NewDirs},
- gs:config(DirBox, [{items, NewDirs}]),
- include_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, DirBox, DirEntry, OkButton, CancelButton, Win);
- {gs, DeleteAllButton, click, _, _} ->
- gs:config(DirBox, [clear]),
- NewOptions = Options#options{include_dirs = []},
- include_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, DirBox, DirEntry, OkButton, CancelButton, Win);
- {gs, DeleteButton, click, _, _} ->
- NewOptions =
- case gs:read(DirBox, selection) of
- [] ->
- Options;
- List ->
- lists:foreach(fun(X) -> gs:config(DirBox, [{del, X}]) end,
- lists:sort(List)),
- NewDirs = gs:read(DirBox, items),
- Options#options{include_dirs = NewDirs}
- end,
- include_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, DirBox, DirEntry, OkButton, CancelButton, Win);
- {gs, Win, destroy, _, _} ->
- ok
- end.
-
-macro_dialog(#gui_state{gs = GS, options = Options}, Parent) ->
- WH = [{width, 300}, {height, 400}],
- Title = io_lib:format("Macro Definitions", []),
- Win = gs:window(GS, [{title, Title}, {configure, true},
- {default, entry, {bg, white}}| WH]),
- EmptySpace = {stretch, 1},
- Frame = gs:frame(Win, [{packer_x, [EmptySpace, EmptySpace]},
- {packer_y, [{fixed, 30}, {fixed, 30}, {fixed, 30},
- EmptySpace, {fixed, 30}, {fixed, 30}]}
- | WH]),
- gs:label(Frame, [{pack_xy, {1,1}}, {label, {text, "Macro"}}]),
- MacroEntry = gs:entry(Frame, [{pack_xy, {1,2}}]),
- gs:label(Frame, [{pack_xy, {2,1}}, {label, {text, "Term"}}]),
- TermEntry = gs:entry(Frame, [{pack_xy, {2,2}}]),
- ButtonPacker1 = gs:frame(Frame, [{pack_x, {1,2}}, {pack_y, 3},
- {packer_x, [{fixed, 70},{fixed, 70},
- EmptySpace]},
- {packer_y, {fixed, 30}}]),
- AddButton = gs:button(ButtonPacker1, [{label, {text, "Add"}},
- {pack_xy, {1,1}}]),
- Macros = [io_lib:format("~p = ~p",[X,Y]) || {X,Y} <- Options#options.defines],
- MacroBox = gs:listbox(Frame, [{pack_x, {1,2}}, {pack_y, 4}, {vscroll, right},
- {bg, white}, {configure, true},
- {selectmode, multiple},
- {items, Macros}]),
- ButtonPacker2 = gs:frame(Frame, [{pack_x, {1,2}}, {pack_y, 5},
- {packer_x, [{fixed, 60}, {fixed, 70},
- EmptySpace]},
- {packer_y, {fixed, 30}}]),
- DeleteButton = gs:button(ButtonPacker2, [{label, {text, "Delete"}},
- {pack_xy, {1,1}}]),
- DeleteAllButton = gs:button(ButtonPacker2, [{label, {text, "Delete All"}},
- {pack_xy, {2,1}}]),
- ButtonPacker3 = gs:frame(Frame, [{pack_x, {1,2}}, {pack_y, 6},
- {packer_x, [EmptySpace,
- {fixed, 60}, {fixed, 60}]},
- {packer_y, {fixed, 30}}]),
- OkButton = gs:button(ButtonPacker3, [{label, {text, "Ok"}},
- {pack_xy, {2,1}}]),
- CancelButton = gs:button(ButtonPacker3, [{label, {text, "Cancel"}},
- {pack_xy, {3,1}}]),
- gs:config(Win, [{map, true}]),
- gs:config(Frame, WH),
- macro_loop(Parent, Options, Frame, AddButton, DeleteAllButton, DeleteButton,
- MacroBox, MacroEntry, TermEntry, OkButton, CancelButton, Win).
-
-macro_loop(Parent, Options, Frame, AddButton, DeleteAllButton, DeleteButton,
- MacroBox, MacroEntry, TermEntry, OkButton, CancelButton, Win) ->
- receive
- {gs, CancelButton, click, _, _} ->
- gs:destroy(Win),
- ok;
- {gs, OkButton, click, _, _} ->
- gs:destroy(Win),
- Parent ! {new_options, Options},
- ok;
- {gs, Win, configure, _Data, [W, H|_]} ->
- gs:config(Frame, [{width, W}, {height, H}]),
- macro_loop(Parent, Options, Frame, AddButton, DeleteAllButton,
- DeleteButton, MacroBox, MacroEntry, TermEntry, OkButton,
- CancelButton, Win);
- {gs, AddButton, click, _, _} ->
- Defines = Options#options.defines,
- NewDefines =
- case gs:read(MacroEntry, text) of
- "" -> Defines;
- Macro ->
- Empty = [{text, ""}],
- case gs:read(TermEntry, text) of
- "" ->
- gs:config(MacroEntry, Empty),
- orddict:store(list_to_atom(Macro), true, Defines);
- String ->
- case parse(String) of
- {ok, Term} ->
- gs:config(MacroEntry, Empty),
- gs:config(TermEntry, Empty),
- orddict:store(list_to_atom(Macro), Term, Defines);
- {error, _Reason} ->
- Defines
- end
- end
- end,
- NewOptions = Options#options{defines = NewDefines},
- NewEntries = [io_lib:format("~p = ~p", [X, Y]) || {X, Y} <- NewDefines],
- gs:config(MacroBox, [{items, NewEntries}]),
- macro_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, MacroBox, MacroEntry, TermEntry, OkButton,
- CancelButton, Win);
- {gs, DeleteAllButton, click, _, _} ->
- gs:config(MacroBox, [clear]),
- NewOptions = Options#options{defines = []},
- macro_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, MacroBox, MacroEntry, TermEntry, OkButton,
- CancelButton, Win);
- {gs, DeleteButton, click, _, _} ->
- NewOptions =
- case gs:read(MacroBox, selection) of
- [] ->
- Options;
- List ->
- gs:config(MacroBox, [{selection, clear}]),
- Fun =
- fun(X) ->
- Val = gs:read(MacroBox, {get, X}),
- [MacroName|_] = re:split(Val, " ", [{return, list}]),
- list_to_atom(MacroName)
- end,
- Delete = [Fun(X) || X <- List],
- lists:foreach(fun(X) -> gs:config(MacroBox, [{del, X}]) end,
- lists:reverse(lists:sort(List))),
- Defines = Options#options.defines,
- NewDefines = lists:foldl(fun(X, Acc) ->
- orddict:erase(X, Acc)
- end,
- Defines, Delete),
- Options#options{defines = NewDefines}
- end,
- macro_loop(Parent, NewOptions, Frame, AddButton, DeleteAllButton,
- DeleteButton, MacroBox, MacroEntry, TermEntry, OkButton,
- CancelButton, Win);
- {gs, Win, destroy, _, _} ->
- ok
- end.
-
-parse(String) ->
- case erl_scan:string(String ++ ".", 1) of
- {ok, Ts, _} ->
- case erl_parse:parse_exprs(Ts) of
- {ok, [Expr]} ->
- try erl_parse:normalise(Expr)
- catch error:Reason -> {error, Reason}
- end;
- {error, E} ->
- parse_error(E)
- end;
- {error, E, _} ->
- parse_error(E)
- end.
-
-parse_error(E) ->
- S = io_lib:fwrite("Error parsing expression: ~P.", [E,15]),
- {error, S}.
-
-%% ----------------------------------------------------------------
-%%
-%% Run the analysis
-%%
-
-start_analysis(State) ->
- Analysis = build_analysis_record(State),
- case get_anal_files(State, Analysis#analysis.start_from) of
- error ->
- Msg = "You must choose one or more files or dirs\n"
- "before starting the analysis!",
- error_sms(State, Msg),
- config_gui_stop(State),
- State;
- {ok, Files} ->
- Msg = "\n========== Starting Analysis ==========\n\n",
- update_editor(State#gui_state.log, Msg),
- NewAnalysis = Analysis#analysis{files = Files},
- run_analysis(State, NewAnalysis)
- end.
-
-build_analysis_record(#gui_state{mode = Mode, menu = Menu, options = Options,
- init_plt = InitPlt0}) ->
- StartFrom =
- case gs:read(Mode#mode.start_byte_code, select) of
- true -> byte_code;
- false -> src_code
- end,
- InitPlt =
- case gs:read(Menu#menu.plt_empty, select) of
- true -> dialyzer_plt:new();
- false -> InitPlt0
- end,
- #analysis{defines = Options#options.defines,
- include_dirs = Options#options.include_dirs,
- plt = InitPlt,
- start_from = StartFrom,
- solvers = Options#options.solvers}.
-
-get_anal_files(#gui_state{chosen_box = ChosenBox}, StartFrom) ->
- Files = gs:read(ChosenBox, items),
- FilteredMods =
- case StartFrom of
- src_code -> filter_mods(Files, ".erl");
- byte_code -> filter_mods(Files, ".beam")
- end,
- FilteredDirs = [X || X <- Files, filelib:is_dir(X)],
- case ordsets:union(FilteredMods, FilteredDirs) of
- [] -> error;
- Set -> {ok, Set}
- end.
-
-run_analysis(State, Analysis) ->
- config_gui_start(State),
- Self = self(),
- NewAnalysis = Analysis#analysis{doc_plt = dialyzer_plt:new()},
- LegalWarnings = find_legal_warnings(State),
- Fun =
- fun() ->
- dialyzer_analysis_callgraph:start(Self, LegalWarnings, NewAnalysis)
- end,
- BackendPid = spawn_link(Fun),
- State#gui_state{backend_pid = BackendPid}.
-
-find_legal_warnings(#gui_state{menu = #menu{warnings = Warnings}}) ->
- ordsets:from_list([Tag || {Tag, GSItem} <- Warnings,
- gs:read(GSItem, select) =:= true]).
-
-flush() ->
- receive
- _ -> flush()
- after
- 0 -> ok
- end.
-
-update_editor(Editor, Msg) ->
- gs:config(Editor, [{enable, true}]),
- NofRows = gs:read(Editor, size),
- gs:config(Editor, [{insertpos, 'end'}]),
- gs:config(Editor, [{insert, {insert, Msg}}]),
- NewNofRows = gs:read(Editor, size),
- ScrollPos = gs:read(Editor, vscrollpos),
- gs:config(Editor, [{vscrollpos, ScrollPos + NewNofRows - NofRows}]),
- gs:config(Editor, [{enable, false}]).
diff --git a/lib/dialyzer/src/dialyzer_gui_wx.erl b/lib/dialyzer/src/dialyzer_gui_wx.erl
index 08f31c1e13..868857d675 100644
--- a/lib/dialyzer/src/dialyzer_gui_wx.erl
+++ b/lib/dialyzer/src/dialyzer_gui_wx.erl
@@ -61,7 +61,7 @@
init_plt :: dialyzer_plt:plt(),
dir_entry :: wx:wx_object(),
file_box :: wx:wx_object(),
- files_to_analyze :: ordset(string()),
+ files_to_analyze :: ordsets:ordset(string()),
gui :: wx:wx_object(),
log :: wx:wx_object(),
menu :: menu(),
@@ -699,8 +699,7 @@ handle_add_files(#gui_state{chosen_box = ChosenBox, file_box = FileBox,
end.
handle_add_dir(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
- files_to_analyze = FileList,
- mode = Mode} = State) ->
+ files_to_analyze = FileList, mode = Mode} = State) ->
case wxDirPickerCtrl:getPath(DirBox) of
"" ->
State;
@@ -714,8 +713,8 @@ handle_add_dir(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
State#gui_state{files_to_analyze = add_files(filter_mods(NewDir1,Ext), FileList, ChosenBox, Ext)}
end.
-handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox, files_to_analyze = FileList,
- mode = Mode} = State) ->
+handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
+ files_to_analyze = FileList, mode = Mode} = State) ->
case wxDirPickerCtrl:getPath(DirBox) of
"" ->
State;
@@ -723,11 +722,11 @@ handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox, files_to_a
NewDir = ordsets:new(),
NewDir1 = ordsets:add_element(Dir,NewDir),
TargetDirs = ordsets:union(NewDir1, all_subdirs(NewDir1)),
- case wxRadioBox:getSelection(Mode) of
- 0 -> Ext = ".beam";
- 1-> Ext = ".erl"
- end,
- State#gui_state{files_to_analyze = add_files(filter_mods(TargetDirs,Ext), FileList, ChosenBox, Ext)}
+ Ext = case wxRadioBox:getSelection(Mode) of
+ 0 -> ".beam";
+ 1 -> ".erl"
+ end,
+ State#gui_state{files_to_analyze = add_files(filter_mods(TargetDirs, Ext), FileList, ChosenBox, Ext)}
end.
handle_file_delete(#gui_state{chosen_box = ChosenBox,
@@ -886,13 +885,10 @@ config_gui_start(State) ->
wxRadioBox:disable(State#gui_state.mode).
save_file(#gui_state{frame = Frame, warnings_box = WBox, log = Log} = State, Type) ->
- case Type of
- warnings ->
- Message = "Save Warnings",
- Box = WBox;
- log -> Message = "Save Log",
- Box = Log
- end,
+ {Message, Box} = case Type of
+ warnings -> {"Save Warnings", WBox};
+ log -> {"Save Log", Log}
+ end,
case wxTextCtrl:getValue(Box) of
"" -> error_sms(State,"There is nothing to save...\n");
_ ->
@@ -936,8 +932,7 @@ include_dialog(#gui_state{gui = Wx, frame = Frame, options = Options}) ->
wxButton:connect(DeleteAllButton, command_button_clicked),
wxButton:connect(Ok, command_button_clicked),
wxButton:connect(Cancel, command_button_clicked),
- Dirs = [io_lib:format("~s", [X])
- || X <- Options#options.include_dirs],
+ Dirs = [io_lib:format("~s", [X]) || X <- Options#options.include_dirs],
wxListBox:set(Box, Dirs),
Layout = wxBoxSizer:new(?wxVERTICAL),
Buttons = wxBoxSizer:new(?wxHORIZONTAL),
diff --git a/lib/dialyzer/src/dialyzer_options.erl b/lib/dialyzer/src/dialyzer_options.erl
index 06672e595f..a92b8b1958 100644
--- a/lib/dialyzer/src/dialyzer_options.erl
+++ b/lib/dialyzer/src/dialyzer_options.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -51,7 +51,8 @@ build(Opts) ->
?WARN_CONTRACT_TYPES,
?WARN_CONTRACT_SYNTAX,
?WARN_BEHAVIOUR,
- ?WARN_UNDEFINED_CALLBACK],
+ ?WARN_UNDEFINED_CALLBACK,
+ ?WARN_UNKNOWN],
DefaultWarns1 = ordsets:from_list(DefaultWarns),
InitPlt = dialyzer_plt:get_default_plt(),
DefaultOpts = #options{},
@@ -310,6 +311,8 @@ build_warnings([Opt|Opts], Warnings) ->
ordsets:add_element(?WARN_CONTRACT_SUBTYPE, Warnings);
underspecs ->
ordsets:add_element(?WARN_CONTRACT_SUPERTYPE, Warnings);
+ no_unknown ->
+ ordsets:del_element(?WARN_UNKNOWN, Warnings);
OtherAtom ->
bad_option("Unknown dialyzer warning option", OtherAtom)
end,
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index 5f64099210..63798f44b1 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -2,7 +2,7 @@
%%----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -67,7 +67,7 @@
%%----------------------------------------------------------------------
--type mod_deps() :: dict().
+-type mod_deps() :: dialyzer_callgraph:mod_deps().
-type deep_string() :: string() | [deep_string()].
@@ -80,11 +80,11 @@
%%----------------------------------------------------------------------
--record(plt, {info = table_new() :: dict(),
- types = table_new() :: dict(),
- contracts = table_new() :: dict(),
- callbacks = table_new() :: dict(),
- exported_types = sets:new() :: set()}).
+-record(plt, {info = table_new() :: dict:dict(),
+ types = table_new() :: dict:dict(),
+ contracts = table_new() :: dict:dict(),
+ callbacks = table_new() :: dict:dict(),
+ exported_types = sets:new() :: sets:set()}).
-record(mini_plt, {info :: ets:tid(),
contracts :: ets:tid(),
@@ -96,15 +96,15 @@
-include("dialyzer.hrl").
-type file_md5() :: {file:filename(), binary()}.
--type plt_info() :: {[file_md5()], dict()}.
+-type plt_info() :: {[file_md5()], dict:dict()}.
-record(file_plt, {version = "" :: string(),
file_md5_list = [] :: [file_md5()],
- info = dict:new() :: dict(),
- contracts = dict:new() :: dict(),
- callbacks = dict:new() :: dict(),
- types = dict:new() :: dict(),
- exported_types = sets:new() :: set(),
+ info = dict:new() :: dict:dict(),
+ contracts = dict:new() :: dict:dict(),
+ callbacks = dict:new() :: dict:dict(),
+ types = dict:new() :: dict:dict(),
+ exported_types = sets:new() :: sets:set(),
mod_deps :: mod_deps(),
implementation_md5 = [] :: [file_md5()]}).
@@ -184,22 +184,22 @@ lookup(Plt, Label) when is_integer(Label) ->
lookup_1(#mini_plt{info = Info}, MFAorLabel) ->
ets_table_lookup(Info, MFAorLabel).
--spec insert_types(plt(), dict()) -> plt().
+-spec insert_types(plt(), dict:dict()) -> plt().
insert_types(PLT, Rec) ->
PLT#plt{types = Rec}.
--spec insert_exported_types(plt(), set()) -> plt().
+-spec insert_exported_types(plt(), sets:set()) -> plt().
insert_exported_types(PLT, Set) ->
PLT#plt{exported_types = Set}.
--spec get_types(plt()) -> dict().
+-spec get_types(plt()) -> dict:dict().
get_types(#plt{types = Types}) ->
Types.
--spec get_exported_types(plt()) -> set().
+-spec get_exported_types(plt()) -> sets:set().
get_exported_types(#plt{exported_types = ExpTypes}) ->
ExpTypes.
@@ -211,7 +211,7 @@ get_exported_types(#plt{exported_types = ExpTypes}) ->
lookup_module(#plt{info = Info}, M) when is_atom(M) ->
table_lookup_module(Info, M).
--spec all_modules(plt()) -> set().
+-spec all_modules(plt()) -> sets:set().
all_modules(#plt{info = Info, contracts = Cs}) ->
sets:union(table_all_modules(Info), table_all_modules(Cs)).
diff --git a/lib/dialyzer/src/dialyzer_races.erl b/lib/dialyzer/src/dialyzer_races.erl
index 2aa8343bce..2a8aba5d8f 100644
--- a/lib/dialyzer/src/dialyzer_races.erl
+++ b/lib/dialyzer/src/dialyzer_races.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -85,6 +85,12 @@
-type race_tag() :: 'whereis_register' | 'whereis_unregister'
| 'ets_lookup_insert' | 'mnesia_dirty_read_write'.
+%% The following type is similar to the dial_warning() type but has a
+%% tag which is local to this module and is not propagated to outside
+-type dial_race_warning() :: {race_warn_tag(), file_line(), {atom(), [term()]}}.
+-type race_warn_tag() :: ?WARN_WHEREIS_REGISTER | ?WARN_WHEREIS_UNREGISTER
+ | ?WARN_ETS_LOOKUP_INSERT | ?WARN_MNESIA_DIRTY_READ_WRITE.
+
-record(beg_clause, {arg :: var_to_map1(),
pats :: var_to_map1(),
guard :: cerl:cerl()}).
@@ -98,14 +104,14 @@
def_vars :: [core_vars()],
arg_types :: [erl_types:erl_type()],
call_vars :: [core_vars()],
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-record(dep_call, {call_name :: dep_calls(),
args :: args(),
arg_types :: [erl_types:erl_type()],
vars :: [core_vars()],
- state :: _, %% XXX: recursive
+ state :: dialyzer_dataflow:state(),
file_line :: file_line(),
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-record(fun_call, {caller :: dialyzer_callgraph:mfa_or_funlbl(),
callee :: dialyzer_callgraph:mfa_or_funlbl(),
arg_types :: [erl_types:erl_type()],
@@ -114,7 +120,7 @@
arg :: var_to_map1()}).
-record(warn_call, {call_name :: warn_calls(),
args :: args(),
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-type case_tags() :: 'beg_case' | #beg_clause{} | #end_clause{} | #end_case{}.
-type code() :: [#dep_call{} | #fun_call{} | #warn_call{} |
@@ -141,7 +147,7 @@
race_tags = [] :: [#race_fun{}],
%% true for fun types and warning mode
race_analysis = false :: boolean(),
- race_warnings = [] :: [dial_warning()]}).
+ race_warnings = [] :: [dial_race_warning()]}).
%%% ===========================================================================
%%%
@@ -984,8 +990,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
NewRaceVarMap, Args, NewFunArgs, NewFunTypes, NestingLevel};
{CurrFun, Fun} ->
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
- NewRaceVarMap =
- race_var_map(Args, NewFunArgs, RaceVarMap, bind),
+ NewRaceVarMap = race_var_map(Args, NewFunArgs, RaceVarMap, bind),
RetC =
case Fun of
InitFun ->
@@ -1012,8 +1017,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
label = FunLabel, var_map = NewRaceVarMap,
def_vars = Args, call_vars = NewFunArgs,
arg_types = NewFunTypes}|
- lists:reverse(StateRaceList)] ++
- RetC;
+ lists:reverse(StateRaceList)] ++ RetC;
_ ->
[#curr_fun{status = in, mfa = Fun,
label = FunLabel, var_map = NewRaceVarMap,
@@ -1048,13 +1052,9 @@ fixup_race_backward(CurrFun, Calls, CallsToAnalyze, Parents, Height) ->
false -> [CurrFun|Parents]
end;
[Head|Tail] ->
- MorePaths =
- case Head of
- {Parent, CurrFun} -> true;
- {Parent, _TupleB} -> false
- end,
- case MorePaths of
- true ->
+ {Parent, TupleB} = Head,
+ case TupleB =:= CurrFun of
+ true -> % more paths are needed
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
NewParents =
fixup_race_backward(Parent, NewCallsToAnalyze,
@@ -1565,7 +1565,7 @@ any_args(StrList) ->
end
end.
--spec bind_dict_vars(label(), label(), dict()) -> dict().
+-spec bind_dict_vars(label(), label(), dict:dict()) -> dict:dict().
bind_dict_vars(Key, Label, RaceVarMap) ->
case Key =:= Label of
@@ -1751,7 +1751,7 @@ compare_vars(Var1, Var2, RaceVarMap) when is_integer(Var1), is_integer(Var2) ->
compare_vars(_Var1, _Var2, _RaceVarMap) ->
false.
--spec compare_var_list(label_type(), [label_type()], dict()) -> boolean().
+-spec compare_var_list(label_type(), [label_type()], dict:dict()) -> boolean().
compare_var_list(Var, VarList, RaceVarMap) ->
lists:any(fun (V) -> compare_vars(Var, V, RaceVarMap) end, VarList).
@@ -1763,7 +1763,7 @@ ets_list_args(MaybeList) ->
catch _:_ -> [?no_label]
end;
false -> [ets_tuple_args(MaybeList)]
- end.
+ end.
ets_list_argtypes(ListStr) ->
ListStr1 = string:strip(ListStr, left, $[),
@@ -1848,7 +1848,8 @@ ets_tuple_argtypes1(Str, Tuple, TupleList, NestingLevel) ->
end.
format_arg(?bypassed) -> ?no_label;
-format_arg(Arg) ->
+format_arg(Arg0) ->
+ Arg = cerl:fold_literal(Arg0),
case cerl:type(Arg) of
var -> cerl_trees:get_label(Arg);
tuple -> list_to_tuple([format_arg(A) || A <- cerl:tuple_es(Arg)]);
@@ -1878,7 +1879,7 @@ format_args_1([Arg|Args], [Type|Types], CleanState) ->
case Arg =:= ?bypassed of
true -> [?no_label, format_type(Type, CleanState)];
false ->
- case cerl:is_literal(Arg) of
+ case cerl:is_literal(cerl:fold_literal(Arg)) of
true -> [?no_label, format_cerl(Arg)];
false -> [format_arg(Arg), format_type(Type, CleanState)]
end
@@ -1956,7 +1957,8 @@ mnesia_tuple_argtypes(TupleStr) ->
[TupleStr2|_T] = string:tokens(TupleStr1, " ,"),
lists:flatten(string:tokens(TupleStr2, " |")).
--spec race_var_map(var_to_map1(), var_to_map2(), dict(), op()) -> dict().
+-spec race_var_map(var_to_map1(), var_to_map2(), dict:dict(), op()) ->
+ dict:dict().
race_var_map(Vars1, Vars2, RaceVarMap, Op) ->
case Vars1 =:= ?no_arg orelse Vars1 =:= ?bypassed
@@ -2147,7 +2149,8 @@ race_var_map_guard_helper1(Arg, Pats, RaceVarMap, Op) ->
end
end.
-race_var_map_guard_helper2(Arg, Pat, Bool, RaceVarMap, Op) ->
+race_var_map_guard_helper2(Arg, Pat0, Bool, RaceVarMap, Op) ->
+ Pat = cerl:fold_literal(Pat0),
case cerl:type(Pat) of
literal ->
[Arg1, Arg2] = cerl:call_args(Arg),
diff --git a/lib/dialyzer/src/dialyzer_succ_typings.erl b/lib/dialyzer/src/dialyzer_succ_typings.erl
index 84379642bf..ef9b00e203 100644
--- a/lib/dialyzer/src/dialyzer_succ_typings.erl
+++ b/lib/dialyzer/src/dialyzer_succ_typings.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,7 +72,7 @@
-record(st, {callgraph :: dialyzer_callgraph:callgraph(),
codeserver :: dialyzer_codeserver:codeserver(),
- no_warn_unused :: set(),
+ no_warn_unused :: sets:set(mfa()),
parent = none :: parent(),
timing_server :: dialyzer_timing:timing_server(),
solvers :: [solver()],
@@ -137,7 +137,7 @@ get_refined_success_typings(SCCs, #st{callgraph = Callgraph,
-type doc_plt() :: 'undefined' | dialyzer_plt:plt().
-spec get_warnings(dialyzer_callgraph:callgraph(), dialyzer_plt:plt(),
- doc_plt(), dialyzer_codeserver:codeserver(), set(),
+ doc_plt(), dialyzer_codeserver:codeserver(), sets:set(mfa()),
dialyzer_timing:timing_server(), [solver()], pid()) ->
{[dial_warning()], dialyzer_plt:plt(), doc_plt()}.
@@ -149,8 +149,10 @@ get_warnings(Callgraph, Plt, DocPlt, Codeserver,
NewState = InitState#st{no_warn_unused = NoWarnUnused},
Mods = dialyzer_callgraph:modules(NewState#st.callgraph),
MiniPlt = NewState#st.plt,
+ FindOpaques = lookup_and_find_opaques_fun(Codeserver),
CWarns =
- dialyzer_contracts:get_invalid_contract_warnings(Mods, Codeserver, MiniPlt),
+ dialyzer_contracts:get_invalid_contract_warnings(Mods, Codeserver,
+ MiniPlt, FindOpaques),
MiniDocPlt = dialyzer_plt:get_mini_plt(DocPlt),
ModWarns =
?timing(TimingServer, "warning",
@@ -261,7 +263,16 @@ refine_one_module(M, {CodeServer, Callgraph, Plt, _Solvers}) ->
FunTypes = get_fun_types_from_plt(AllFuns, Callgraph, Plt),
NewFunTypes =
dialyzer_dataflow:get_fun_types(ModCode, Plt, Callgraph, Records),
- case reached_fixpoint(FunTypes, NewFunTypes) of
+ Contracts1 = dialyzer_codeserver:lookup_mod_contracts(M, CodeServer),
+ Contracts = orddict:from_list(dict:to_list(Contracts1)),
+ FindOpaques = find_opaques_fun(Records),
+ DecoratedFunTypes =
+ decorate_succ_typings(Contracts, Callgraph, NewFunTypes, FindOpaques),
+ %% ?debug("NewFunTypes ~p\n ~n", [dict:to_list(NewFunTypes)]),
+ %% ?debug("refine DecoratedFunTypes ~p\n ~n", [dict:to_list(DecoratedFunTypes)]),
+ debug_pp_functions("Refine", NewFunTypes, DecoratedFunTypes, Callgraph),
+
+ case reached_fixpoint(FunTypes, DecoratedFunTypes) of
true -> [];
{false, NotFixpoint} ->
?debug("Not fixpoint\n", []),
@@ -357,9 +368,16 @@ find_succ_types_for_scc(SCC, {Codeserver, Callgraph, Plt, Solvers}) ->
AllFunSet = sets:from_list([X || {X, _} <- AllFuns]),
FilteredFunTypes =
dict:filter(fun(X, _) -> sets:is_element(X, AllFunSet) end, FunTypes),
+ FindOpaques = lookup_and_find_opaques_fun(Codeserver),
+ DecoratedFunTypes =
+ decorate_succ_typings(Contracts3, Callgraph, FilteredFunTypes, FindOpaques),
%% Check contracts
PltContracts =
- dialyzer_contracts:check_contracts(Contracts3, Callgraph, FilteredFunTypes),
+ dialyzer_contracts:check_contracts(Contracts3, Callgraph,
+ DecoratedFunTypes, FindOpaques),
+ %% ?debug("FilteredFunTypes ~p\n ~n", [dict:to_list(FilteredFunTypes)]),
+ %% ?debug("SCC DecoratedFunTypes ~p\n ~n", [dict:to_list(DecoratedFunTypes)]),
+ debug_pp_functions("SCC", FilteredFunTypes, DecoratedFunTypes, Callgraph),
ContractFixpoint =
lists:all(fun({MFA, _C}) ->
%% Check the non-deleted PLT
@@ -368,16 +386,47 @@ find_succ_types_for_scc(SCC, {Codeserver, Callgraph, Plt, Solvers}) ->
{value, _} -> true
end
end, PltContracts),
- Plt = insert_into_plt(FilteredFunTypes, Callgraph, Plt),
+ Plt = insert_into_plt(DecoratedFunTypes, Callgraph, Plt),
Plt = dialyzer_plt:insert_contract_list(Plt, PltContracts),
case (ContractFixpoint andalso
- reached_fixpoint_strict(PropTypes, FilteredFunTypes)) of
+ reached_fixpoint_strict(PropTypes, DecoratedFunTypes)) of
true -> [];
false ->
?debug("Not fixpoint for: ~w\n", [AllFuns]),
[Fun || {Fun, _Arity} <- AllFuns]
end.
+decorate_succ_typings(Contracts, Callgraph, FunTypes, FindOpaques) ->
+ F = fun(Label, Type) ->
+ case dialyzer_callgraph:lookup_name(Label, Callgraph) of
+ {ok, MFA} ->
+ case orddict:find(MFA, Contracts) of
+ {ok, {_FileLine, Contract}} ->
+ Args = dialyzer_contracts:get_contract_args(Contract),
+ Ret = dialyzer_contracts:get_contract_return(Contract),
+ C = erl_types:t_fun(Args, Ret),
+ {M, _, _} = MFA,
+ Opaques = FindOpaques(M),
+ erl_types:t_decorate_with_opaque(Type, C, Opaques);
+ error -> Type
+ end;
+ error -> Type
+ end
+ end,
+ dict:map(F, FunTypes).
+
+lookup_and_find_opaques_fun(Codeserver) ->
+ fun(Module) ->
+ Records = dialyzer_codeserver:lookup_mod_records(Module, Codeserver),
+ (find_opaques_fun(Records))(Module)
+ end.
+
+find_opaques_fun(Records) ->
+ fun(Module) ->
+ erl_types:module_builtin_opaques(Module) ++
+ erl_types:t_opaque_from_records(Records)
+ end.
+
get_fun_types_from_plt(FunList, Callgraph, Plt) ->
get_fun_types_from_plt(FunList, Callgraph, Plt, dict:new()).
@@ -443,9 +492,30 @@ debug_pp_succ_typings(SuccTypes) ->
|| {MFA, {contract, RetFun, ArgT}} <- SuccTypes],
?debug("\n", []),
ok.
+
+debug_pp_functions(Header, FunTypes, DecoratedFunTypes, Callgraph) ->
+ ?debug("FunTypes (~s)\n", [Header]),
+ FTypes = lists:keysort(1, dict:to_list(FunTypes)),
+ DTypes = lists:keysort(1, dict:to_list(DecoratedFunTypes)),
+ Fun = fun({{Label, Type},{Label, DecoratedType}}) ->
+ Name = lookup_name(Label, Callgraph),
+ ?debug("~w (~w): ~s\n",
+ [Name, Label, erl_types:t_to_string(Type)]),
+ case erl_types:t_is_equal(Type, DecoratedType) of
+ true -> ok;
+ false ->
+ ?debug(" With opaque types: ~s\n",
+ [erl_types:t_to_string(DecoratedType)])
+ end
+ end,
+ lists:foreach(Fun, lists:zip(FTypes, DTypes)),
+ ?debug("\n", []).
-else.
debug_pp_succ_typings(_) ->
ok.
+
+debug_pp_functions(_, _, _, _) ->
+ ok.
-endif.
lookup_name(F, CG) ->
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index a418a11e65..3d03ed3ab3 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,29 +31,33 @@
-export([analyze_scc/6]).
-export([get_safe_underapprox/2]).
+%%-import(helper, %% 'helper' could be any module doing sanity checks...
+-import(erl_types,
+ [t_has_var/1, t_inf/2, t_is_equal/2, t_is_subtype/2,
+ t_subtract/2, t_subtract_list/2, t_sup/1, t_sup/2,t_unify/2]).
+
-import(erl_types,
[t_any/0, t_atom/0, t_atom_vals/1,
t_binary/0, t_bitstr/0, t_bitstr/2, t_bitstr_concat/1, t_boolean/0,
t_collect_vars/1, t_cons/2, t_cons_hd/1, t_cons_tl/1,
t_float/0, t_from_range/2, t_from_term/1,
t_fun/0, t_fun/2, t_fun_args/1, t_fun_range/1,
- t_has_var/1,
- t_inf/2, t_inf/3, t_integer/0,
- t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_cons/1, t_is_equal/2,
+ t_integer/0,
+ t_is_any/1, t_is_atom/1, t_is_any_atom/2, t_is_cons/1,
t_is_float/1, t_is_fun/1,
t_is_integer/1, t_non_neg_integer/0,
t_is_list/1, t_is_nil/1, t_is_none/1, t_is_number/1,
- t_is_subtype/2, t_limit/2, t_list/0, t_list/1,
+ t_limit/2, t_list/0, t_list/1,
t_list_elements/1, t_nonempty_list/1, t_maybe_improper_list/0,
t_module/0, t_number/0, t_number_vals/1,
- t_opaque_match_record/2, t_opaque_matching_structure/2,
- t_opaque_from_records/1,
t_pid/0, t_port/0, t_product/1, t_reference/0,
- t_subst/2, t_subtract/2, t_subtract_list/2, t_sup/1, t_sup/2,
+ t_subst/2,
t_timeout/0, t_tuple/0, t_tuple/1,
- t_unify/3, t_var/1, t_var_name/1,
- t_none/0, t_unit/0]).
+ t_var/1, t_var_name/1,
+ t_none/0, t_unit/0,
+ t_map/1
+ ]).
-include("dialyzer.hrl").
@@ -79,7 +83,7 @@
list :: [constr()],
deps :: [dep()],
masks :: [{dep(),[non_neg_integer()]}] |
- {'d',dict()},
+ {'d',dict:dict(dep(), [non_neg_integer()])},
id :: {'list', dep()}}).
-type constraint_list() :: #constraint_list{}.
@@ -90,26 +94,30 @@
-type constr() :: constraint() | constraint_list() | constraint_ref().
--type typesig_scc() :: [{mfa(), {cerl:c_var(), cerl:c_fun()}, dict()}].
+-type types() :: erl_types:type_table().
+
+-type typesig_scc() :: [{mfa(), {cerl:c_var(), cerl:c_fun()}, types()}].
-type typesig_funmap() :: [{type_var(), type_var()}]. %% Orddict
--type dict_or_ets() :: {'d', dict()} | {'e', ets:tid()}.
+-type prop_types() :: dict:dict(label(), types()).
+
+-type dict_or_ets() :: {'d', prop_types()} | {'e', ets:tid()}.
-record(state, {callgraph :: dialyzer_callgraph:callgraph(),
cs = [] :: [constr()],
cmap = {'d', dict:new()} :: dict_or_ets(),
fun_map = [] :: typesig_funmap(),
- fun_arities = dict:new() :: dict(),
+ fun_arities = dict:new() :: dict:dict(type_var(), arity()),
in_match = false :: boolean(),
in_guard = false :: boolean(),
module :: module(),
- name_map = dict:new() :: dict(),
+ name_map = dict:new() :: dict:dict(mfa(),
+ cerl:c_fun()),
next_label = 0 :: label(),
- self_rec :: erl_types:erl_type(),
+ self_rec :: 'false' | erl_types:erl_type(),
plt :: dialyzer_plt:plt(),
prop_types = {'d', dict:new()} :: dict_or_ets(),
- records = dict:new() :: dict(),
- opaques = [] :: [erl_types:erl_type()],
+ records = dict:new() :: types(),
scc = [] :: [type_var()],
mfas :: [tuple()],
solvers = [] :: [solver()]
@@ -164,7 +172,7 @@
-spec analyze_scc(typesig_scc(), label(),
dialyzer_callgraph:callgraph(),
- dialyzer_plt:plt(), dict(), [solver()]) -> dict().
+ dialyzer_plt:plt(), prop_types(), [solver()]) -> prop_types().
analyze_scc(SCC, NextLabel, CallGraph, Plt, PropTypes, Solvers0) ->
Solvers = solvers(Solvers0),
@@ -192,11 +200,10 @@ solvers(Solvers) -> Solvers.
%%
%% ============================================================================
-traverse_scc([{MFA, Def, Rec}|Left], DefSet, AccState) ->
+traverse_scc([{_MFA, Def, Rec}|Left], DefSet, AccState) ->
TmpState1 = state__set_rec_dict(AccState, Rec),
- TmpState2 = state__set_opaques(TmpState1, MFA),
DummyLetrec = cerl:c_letrec([Def], cerl:c_atom(foo)),
- {NewAccState, _} = traverse(DummyLetrec, DefSet, TmpState2),
+ {NewAccState, _} = traverse(DummyLetrec, DefSet, TmpState1),
traverse_scc(Left, DefSet, NewAccState);
traverse_scc([], _DefSet, AccState) ->
AccState.
@@ -382,18 +389,8 @@ traverse(Tree, DefinedVars, State) ->
{State2, _} = traverse_list(Funs, DefinedVars1, State1),
traverse(Body, DefinedVars1, State2);
literal ->
- %% This is needed for finding records
- case cerl:unfold_literal(Tree) of
- Tree ->
- Type = t_from_term(cerl:concrete(Tree)),
- NewType =
- case erl_types:t_opaque_match_atom(Type, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end,
- {State, NewType};
- NewTree -> traverse(NewTree, DefinedVars, State)
- end;
+ Type = t_from_term(cerl:concrete(Tree)),
+ {State, Type};
module ->
Defs = cerl:module_defs(Tree),
Funs = [Fun || {_Var, Fun} <- Defs],
@@ -460,29 +457,23 @@ traverse(Tree, DefinedVars, State) ->
end,
case Elements of
[Tag|Fields] ->
- case cerl:is_c_atom(Tag) of
+ case cerl:is_c_atom(Tag) andalso is_literal_record(Tree) of
true ->
- %% Check if an opaque term is constructed.
- case t_opaque_match_record(TupleType, State#state.opaques) of
- [Opaque] ->
- OpStruct = t_opaque_matching_structure(TupleType, Opaque),
- State3 = state__store_conj(TupleType, sub, OpStruct, State2),
- {State3, Opaque};
- %% Check if a record is constructed.
- _ ->
- Arity = length(Fields),
- Records = State2#state.records,
- case lookup_record(Records, cerl:atom_val(Tag), Arity) of
- error -> {State2, TupleType};
- {ok, RecType} ->
- State3 = state__store_conj(TupleType, sub, RecType, State2),
- {State3, TupleType}
- end
- end;
+ %% Check if a record is constructed.
+ Arity = length(Fields),
+ Records = State2#state.records,
+ case lookup_record(Records, cerl:atom_val(Tag), Arity) of
+ error -> {State2, TupleType};
+ {ok, RecType} ->
+ State3 = state__store_conj(TupleType, sub, RecType, State2),
+ {State3, TupleType}
+ end;
false -> {State2, TupleType}
- end;
+ end;
[] -> {State2, TupleType}
end;
+ map ->
+ {State, t_map([])};
values ->
%% We can get into trouble when unifying products that have the
%% same element appearing several times. Handle these cases by
@@ -591,9 +582,13 @@ handle_try(Tree, DefinedVars, State) ->
case state__is_in_guard(State) of
true ->
Conj1 = mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(BodyVar, eq, TreeVar)]),
+ mk_constraint(BodyVar,
+ eq,
+ TreeVar)]),
Disj = mk_disj_constraint_list([Conj1,
- mk_constraint(HandlerVar, eq, TreeVar)]),
+ mk_constraint(HandlerVar,
+ eq,
+ TreeVar)]),
NewState1 = state__new_constraint_context(HandlerState),
Conj2 = mk_conj_constraint_list([OldCs, Disj]),
NewState2 = state__store_conj(Conj2, NewState1),
@@ -604,19 +599,27 @@ handle_try(Tree, DefinedVars, State) ->
{false, false} ->
Conj1 =
mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(TreeVar, eq, BodyVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ BodyVar)]),
Conj2 =
mk_conj_constraint_list([HandlerCs,
- mk_constraint(TreeVar, eq, HandlerVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ HandlerVar)]),
Disj = mk_disj_constraint_list([Conj1, Conj2]),
{Disj, TreeVar};
{false, true} ->
{mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(TreeVar, eq, BodyVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ BodyVar)]),
BodyVar};
{true, false} ->
{mk_conj_constraint_list([HandlerCs,
- mk_constraint(TreeVar, eq, HandlerVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ HandlerVar)]),
HandlerVar};
{true, true} ->
?debug("Throw failed\n", []),
@@ -668,10 +671,7 @@ handle_call(Call, DefinedVars, State) ->
get_plt_constr(MFA, Dst, ArgVars, State) ->
Plt = state__plt(State),
PltRes = dialyzer_plt:lookup(Plt, MFA),
- Opaques = State#state.opaques,
- Module = State#state.module,
SCCMFAs = State#state.mfas,
- {FunModule, _, _} = MFA,
Contract =
case lists:member(MFA, SCCMFAs) of
true -> none;
@@ -691,28 +691,24 @@ get_plt_constr(MFA, Dst, ArgVars, State) ->
none ->
{?mk_fun_var(fun(Map) ->
ArgTypes = lookup_type_list(ArgVars, Map),
- dialyzer_contracts:get_contract_return(C, ArgTypes)
+ get_contract_return(C, ArgTypes)
end, ArgVars), GenArgs};
{value, {PltRetType, PltArgTypes}} ->
%% Need to combine the contract with the success typing.
{?mk_fun_var(
fun(Map) ->
- ArgTypes0 = lookup_type_list(ArgVars, Map),
- ArgTypes = case FunModule =:= Module of
- false ->
- List = lists:zip(PltArgTypes, ArgTypes0),
- [erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List];
- true -> ArgTypes0
- end,
- CRet = dialyzer_contracts:get_contract_return(C, ArgTypes),
- t_inf(CRet, PltRetType, opaque)
+ ArgTypes = lookup_type_list(ArgVars, Map),
+ CRet = get_contract_return(C, ArgTypes),
+ t_inf(CRet, PltRetType)
end, ArgVars),
- [t_inf(X, Y, opaque) || {X, Y} <- lists:zip(GenArgs, PltArgTypes)]}
+ [t_inf(X, Y) || {X, Y} <- lists:zip(GenArgs, PltArgTypes)]}
end,
state__store_conj_lists([Dst|ArgVars], sub, [RetType|ArgCs], State)
end.
+get_contract_return(C, ArgTypes) ->
+ dialyzer_contracts:get_contract_return(C, ArgTypes).
+
filter_match_fail([Clause] = Cls) ->
Body = cerl:clause_body(Clause),
case cerl:type(Body) of
@@ -873,7 +869,8 @@ get_underapprox_from_guard(Tree, Map) ->
MFA ->
case get_type_test(MFA) of
{ok, Type} ->
- [Arg] = cerl:call_args(Tree),
+ [Arg0] = cerl:call_args(Tree),
+ Arg = cerl:fold_literal(Arg0),
{ArgType, Map1} = get_underapprox_from_guard(Arg, Map),
Inf = t_inf(Type, ArgType),
case t_is_none(Inf) of
@@ -890,7 +887,9 @@ get_underapprox_from_guard(Tree, Map) ->
{erlang, '=:=', 2} -> throw(dont_know);
{erlang, '==', 2} -> throw(dont_know);
{erlang, 'and', 2} ->
- [Arg1, Arg2] = cerl:call_args(Tree),
+ [Arg1_0, Arg2_0] = cerl:call_args(Tree),
+ Arg1 = cerl:fold_literal(Arg1_0),
+ Arg2 = cerl:fold_literal(Arg2_0),
case ((cerl:is_c_var(Arg1) orelse cerl:is_literal(Arg1))
andalso
(cerl:is_c_var(Arg2) orelse cerl:is_literal(Arg2))) of
@@ -1045,6 +1044,9 @@ get_safe_underapprox_1([Pat|Left], Acc, Map) ->
{Ts, Map1} = get_safe_underapprox_1(Es, [], Map),
Type = t_tuple(Ts),
get_safe_underapprox_1(Left, [Type|Acc], Map1);
+ map ->
+ %% TODO: Can maybe do something here
+ throw(dont_know);
values ->
Es = cerl:values_es(Pat),
{Ts, Map1} = get_safe_underapprox_1(Es, [], Map),
@@ -1086,7 +1088,7 @@ get_bif_constr({erlang, Op, 2}, Dst, Args = [Arg1, Arg2], _State)
when Op =:= '+'; Op =:= '-'; Op =:= '*' ->
ReturnType = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, Op, 2, TmpArgTypes)
+ bif_return(erlang, Op, 2, TmpArgTypes)
end, Args),
ArgFun =
fun(A, Pos) ->
@@ -1128,8 +1130,8 @@ get_bif_constr({erlang, Op, 2}, Dst, [Arg1, Arg2] = Args, _State)
fun(LocalArg1, LocalArg2, LocalOp) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- IsTrue = t_is_atom(true, DstType),
- IsFalse = t_is_atom(false, DstType),
+ IsTrue = t_is_any_atom(true, DstType),
+ IsFalse = t_is_any_atom(false, DstType),
case IsTrue orelse IsFalse of
true ->
Arg1Type = lookup_type(LocalArg1, Map),
@@ -1176,7 +1178,7 @@ get_bif_constr({erlang, Op, 2}, Dst, [Arg1, Arg2] = Args, _State)
Arg2Var = ?mk_fun_var(Arg2Fun, DstArgs),
DstVar = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, Op, 2, TmpArgTypes)
+ bif_return(erlang, Op, 2, TmpArgTypes)
end, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstVar),
mk_constraint(Arg1, sub, Arg1Var),
@@ -1218,7 +1220,7 @@ get_bif_constr({erlang, '++', 2}, Dst, [Hd, Tl] = Args, _State) ->
ArgTypes = erl_bif_types:arg_types(erlang, '++', 2),
ReturnType = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, '++', 2, TmpArgTypes)
+ bif_return(erlang, '++', 2, TmpArgTypes)
end, Args),
Cs = mk_constraints(Args, sub, ArgTypes),
mk_conj_constraint_list([mk_constraint(Dst, sub, ReturnType),
@@ -1240,7 +1242,7 @@ get_bif_constr({erlang, is_function, 1}, Dst, [Arg], State) ->
get_bif_constr({erlang, is_function, 2}, Dst, [Fun, Arity], _State) ->
ArgFun = fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
ArityType = lookup_type(Arity, Map),
case t_number_vals(ArityType) of
@@ -1268,7 +1270,7 @@ get_bif_constr({erlang, is_reference, 1}, Dst, [Arg], State) ->
get_bif_test_constr(Dst, Arg, t_reference(), State);
get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
ArgFun = fun(Map) ->
- case t_is_atom(true, lookup_type(Dst, Map)) of
+ case t_is_any_atom(true, lookup_type(Dst, Map)) of
true -> t_tuple();
false -> t_any()
end
@@ -1276,7 +1278,7 @@ get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
ArgV = ?mk_fun_var(ArgFun, [Dst]),
DstFun = fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, is_record, 2, TmpArgTypes)
+ bif_return(erlang, is_record, 2, TmpArgTypes)
end,
DstV = ?mk_fun_var(DstFun, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstV),
@@ -1285,10 +1287,9 @@ get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
%% TODO: Revise this to make it precise for Tag and Arity.
Records = State#state.records,
- AllOpaques = State#state.opaques,
ArgFun =
fun(Map) ->
- case t_is_atom(true, lookup_type(Dst, Map)) of
+ case t_is_any_atom(true, lookup_type(Dst, Map)) of
true ->
ArityType = lookup_type(Arity, Map),
case t_is_integer(ArityType) of
@@ -1304,10 +1305,7 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
[TagVal] ->
case lookup_record(Records, TagVal, ArityVal - 1) of
{ok, Type} ->
- case t_opaque_match_record(Type, AllOpaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end;
+ Type;
error -> GenRecord
end;
_ -> GenRecord
@@ -1323,38 +1321,9 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
end,
ArgV = ?mk_fun_var(ArgFun, [Tag, Arity, Dst]),
DstFun = fun(Map) ->
- [TmpVar, TmpTag, TmpArity] = TmpArgTypes = lookup_type_list(Args, Map),
- TmpArgTypes2 =
- case lists:member(TmpVar, AllOpaques) of
- true ->
- case t_is_integer(TmpArity) of
- true ->
- case t_number_vals(TmpArity) of
- [TmpArityVal] ->
- case t_is_atom(TmpTag) of
- true ->
- case t_atom_vals(TmpTag) of
- [TmpTagVal] ->
- case lookup_record(Records, TmpTagVal,
- TmpArityVal - 1) of
- {ok, TmpType} ->
- case t_is_none(t_inf(TmpType, TmpVar, opaque)) of
- true -> TmpArgTypes;
- false -> [TmpType, TmpTag, TmpArity]
- end;
- error -> TmpArgTypes
- end;
- _ -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end;
- _ -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end,
- erl_bif_types:type(erlang, is_record, 3, TmpArgTypes2)
+ [TmpVar, TmpTag, TmpArity] = lookup_type_list(Args, Map),
+ TmpArgTypes = [TmpVar,TmpTag,TmpArity],
+ bif_return(erlang, is_record, 3, TmpArgTypes)
end,
DstV = ?mk_fun_var(DstFun, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstV),
@@ -1369,12 +1338,14 @@ get_bif_constr({erlang, 'and', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
ArgFun = fun(Var) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> True;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true ->
- case t_is_atom(true, lookup_type(Var, Map)) of
+ case
+ t_is_any_atom(true, lookup_type(Var, Map))
+ of
true -> False;
false -> t_boolean()
end;
@@ -1386,15 +1357,15 @@ get_bif_constr({erlang, 'and', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
end,
DstFun = fun(Map) ->
Arg1Type = lookup_type(Arg1, Map),
- case t_is_atom(false, Arg1Type) of
+ case t_is_any_atom(false, Arg1Type) of
true -> False;
false ->
Arg2Type = lookup_type(Arg2, Map),
- case t_is_atom(false, Arg2Type) of
+ case t_is_any_atom(false, Arg2Type) of
true -> False;
false ->
- case (t_is_atom(true, Arg1Type)
- andalso t_is_atom(true, Arg2Type)) of
+ case (t_is_any_atom(true, Arg1Type)
+ andalso t_is_any_atom(true, Arg2Type)) of
true -> True;
false -> t_boolean()
end
@@ -1413,12 +1384,14 @@ get_bif_constr({erlang, 'or', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
ArgFun = fun(Var) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true -> False;
false ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
- case t_is_atom(false, lookup_type(Var, Map)) of
+ case
+ t_is_any_atom(false, lookup_type(Var, Map))
+ of
true -> True;
false -> t_boolean()
end;
@@ -1430,15 +1403,15 @@ get_bif_constr({erlang, 'or', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
end,
DstFun = fun(Map) ->
Arg1Type = lookup_type(Arg1, Map),
- case t_is_atom(true, Arg1Type) of
+ case t_is_any_atom(true, Arg1Type) of
true -> True;
false ->
Arg2Type = lookup_type(Arg2, Map),
- case t_is_atom(true, Arg2Type) of
+ case t_is_any_atom(true, Arg2Type) of
true -> True;
false ->
- case (t_is_atom(false, Arg1Type)
- andalso t_is_atom(false, Arg2Type)) of
+ case (t_is_any_atom(false, Arg1Type)
+ andalso t_is_any_atom(false, Arg2Type)) of
true -> False;
false -> t_boolean()
end
@@ -1465,10 +1438,10 @@ get_bif_constr({erlang, 'not', 1}, Dst, [Arg] = Args, _State) ->
Fun = fun(Var) ->
fun(Map) ->
Type = lookup_type(Var, Map),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type) of
true -> False;
false ->
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type) of
true -> True;
false -> t_boolean()
end
@@ -1485,10 +1458,10 @@ get_bif_constr({erlang, '=:=', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
OtherVarType = lookup_type(OtherVar, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> OtherVarType;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true ->
case is_singleton_type(OtherVarType) of
true -> t_subtract(lookup_type(Self, Map), OtherVarType);
@@ -1518,7 +1491,7 @@ get_bif_constr({erlang, '=:=', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
DstFun = fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, '==', 2, TmpArgTypes)
+ bif_return(erlang, '==', 2, TmpArgTypes)
end,
ArgFun =
fun(Var, Self) ->
@@ -1527,16 +1500,16 @@ get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
DstType = lookup_type(Dst, Map),
case is_singleton_non_number_type(VarType) of
true ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> VarType;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true -> t_subtract(lookup_type(Self, Map), VarType);
false -> t_any()
end
end;
false ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
case t_is_number(VarType) of
true -> t_number();
@@ -1560,18 +1533,14 @@ get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
mk_constraint(Arg1, sub, ArgV1),
mk_constraint(Arg2, sub, ArgV2)]);
get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
- #state{cs = Constrs, opaques = Opaques}) ->
+ #state{cs = Constrs}) ->
GenType = erl_bif_types:type(erlang, element, 2),
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
Fun = fun(Map) ->
- [I, T] = ATs = lookup_type_list(Args, Map),
- ATs2 = case lists:member(T, Opaques) of
- true -> [I, erl_types:t_opaque_structure(T)];
- false -> ATs
- end,
- erl_bif_types:type(erlang, element, 2, ATs2)
+ ATs2 = lookup_type_list(Args, Map),
+ bif_return(erlang, element, 2, ATs2)
end,
ReturnType = ?mk_fun_var(Fun, Args),
ArgTypes = erl_bif_types:arg_types(erlang, element, 2),
@@ -1583,22 +1552,14 @@ get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
end,
mk_conj_constraint_list([mk_constraint(Dst, sub, ReturnType)|NewCs])
end;
-get_bif_constr({M, F, A} = _BIF, Dst, Args, State) ->
+get_bif_constr({M, F, A} = _BIF, Dst, Args, _State) ->
GenType = erl_bif_types:type(M, F, A),
- Opaques = State#state.opaques,
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
- UnopaqueFun =
- fun(T) -> case lists:member(T, Opaques) of
- true -> erl_types:t_unopaque(T, [T]);
- false -> T
- end
- end,
ReturnType = ?mk_fun_var(fun(Map) ->
- TmpArgTypes0 = lookup_type_list(Args, Map),
- TmpArgTypes = [UnopaqueFun(T) || T<- TmpArgTypes0],
- erl_bif_types:type(M, F, A, TmpArgTypes)
+ TmpArgTypes = lookup_type_list(Args, Map),
+ bif_return(M, F, A, TmpArgTypes)
end, Args),
case erl_bif_types:is_known(M, F, A) of
false ->
@@ -1616,12 +1577,12 @@ get_bif_constr({M, F, A} = _BIF, Dst, Args, State) ->
end.
eval_inv_arith('+', _Pos, Dst, Arg) ->
- erl_bif_types:type(erlang, '-', 2, [Dst, Arg]);
+ bif_return(erlang, '-', 2, [Dst, Arg]);
eval_inv_arith('*', _Pos, Dst, Arg) ->
case t_number_vals(Arg) of
[0] -> t_integer();
_ ->
- TmpRet = erl_bif_types:type(erlang, 'div', 2, [Dst, Arg]),
+ TmpRet = bif_return(erlang, 'div', 2, [Dst, Arg]),
Zero = t_from_term(0),
%% If 0 is not part of the result, it cannot be part of the argument.
case t_is_subtype(Zero, Dst) of
@@ -1630,9 +1591,9 @@ eval_inv_arith('*', _Pos, Dst, Arg) ->
end
end;
eval_inv_arith('-', 1, Dst, Arg) ->
- erl_bif_types:type(erlang, '-', 2, [Arg, Dst]);
+ bif_return(erlang, '-', 2, [Arg, Dst]);
eval_inv_arith('-', 2, Dst, Arg) ->
- erl_bif_types:type(erlang, '+', 2, [Arg, Dst]).
+ bif_return(erlang, '+', 2, [Arg, Dst]).
range_inc(neg_inf) -> neg_inf;
range_inc(pos_inf) -> pos_inf;
@@ -1642,33 +1603,20 @@ range_dec(neg_inf) -> neg_inf;
range_dec(pos_inf) -> pos_inf;
range_dec(Int) when is_integer(Int) -> Int - 1.
-get_bif_test_constr(Dst, Arg, Type, State) ->
+get_bif_test_constr(Dst, Arg, Type, _State) ->
ArgFun = fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> Type;
false -> t_any()
end
end,
ArgV = ?mk_fun_var(ArgFun, [Dst]),
- Opaques = State#state.opaques,
DstFun = fun(Map) ->
ArgType = lookup_type(Arg, Map),
case t_is_none(t_inf(ArgType, Type)) of
true ->
- case lists:member(ArgType, Opaques) of
- true ->
- OpaqueStruct = erl_types:t_opaque_structure(ArgType),
- case t_is_none(t_inf(OpaqueStruct, Type)) of
- true -> t_from_term(false);
- false ->
- case t_is_subtype(ArgType, Type) of
- true -> t_from_term(true);
- false -> t_boolean()
- end
- end;
- false -> t_from_term(false)
- end;
+ t_from_term(false);
false ->
case t_is_subtype(ArgType, Type) of
true -> t_from_term(true);
@@ -1784,7 +1732,6 @@ minimize_state(#state{
fun_arities = FunArities,
self_rec = SelfRec,
prop_types = {d, PropTypes},
- opaques = Opaques,
solvers = Solvers
}) ->
Opts = [{read_concurrency, true}],
@@ -1798,7 +1745,6 @@ minimize_state(#state{
fun_arities = FunArities,
self_rec = SelfRec,
prop_types = {e, ETSPropTypes},
- opaques = Opaques,
solvers = Solvers
}.
@@ -1947,7 +1893,7 @@ sane_maps(Map1, Map2, Keys, _S1, _S2) ->
%% Solver v2
--record(v2_state, {constr_data = dict:new() :: dict(),
+-record(v2_state, {constr_data = dict:new() :: dict:dict(),
state :: #state{}}).
v2_solve_ref(Fun, Map, State) ->
@@ -1956,8 +1902,7 @@ v2_solve_ref(Fun, Map, State) ->
{ok, NewMap}.
v2_solve(#constraint{}=C, Map, V2State) ->
- State = V2State#v2_state.state,
- case solve_one_c(C, Map, State#state.opaques) of
+ case solve_one_c(C, Map) of
error ->
report_failed_constraint(C, Map),
{error, V2State};
@@ -2031,7 +1976,7 @@ v2_solve_self_recursive(Cs, Map, Id, RecType0, V2State0) ->
{ok, NewMap, V2State, U} ->
pp_map("recursive finished", NewMap),
NewRecType = unsafe_lookup_type(Id, NewMap),
- case t_is_equal(NewRecType, RecType0) of
+ case is_equal(NewRecType, RecType0) of
true ->
{NewMap2, U1} = enter_var_type(RecVar, NewRecType, NewMap),
{ok, NewMap2, V2State, lists:umerge(U, U1)};
@@ -2397,7 +2342,7 @@ solve_self_recursive(Cs, Map, MapDict, Id, RecType0, State) ->
{ok, NewMapDict, NewMap} ->
pp_map("NewMap", NewMap),
NewRecType = unsafe_lookup_type(Id, NewMap),
- case t_is_equal(NewRecType, RecType0) of
+ case is_equal(NewRecType, RecType0) of
true ->
{ok, NewMapDict, enter_type(RecVar, NewRecType, NewMap)};
false ->
@@ -2447,7 +2392,7 @@ solve_cs([#constraint_list{} = C|Tail], Map, MapDict, State) ->
{error, _NewMapDict} = Error -> Error
end;
solve_cs([#constraint{} = C|Tail], Map, MapDict, State) ->
- case solve_one_c(C, Map, State#state.opaques) of
+ case solve_one_c(C, Map) of
error ->
report_failed_constraint(C, Map),
{error, MapDict};
@@ -2457,10 +2402,10 @@ solve_cs([#constraint{} = C|Tail], Map, MapDict, State) ->
solve_cs([], Map, MapDict, _State) ->
{ok, MapDict, Map}.
-solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
+solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map) ->
LhsType = lookup_type(Lhs, Map),
RhsType = lookup_type(Rhs, Map),
- Inf = t_inf(LhsType, RhsType, opaque),
+ Inf = t_inf(LhsType, RhsType),
?debug("Solving: ~s :: ~s ~w ~s :: ~s\n\tInf: ~s\n",
[format_type(Lhs), format_type(LhsType), Op,
format_type(Rhs), format_type(RhsType), format_type(Inf)]),
@@ -2468,12 +2413,12 @@ solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
true -> error;
false ->
case Op of
- sub -> solve_subtype(Lhs, Inf, Map, Opaques);
+ sub -> solve_subtype(Lhs, Inf, Map);
eq ->
- case solve_subtype(Lhs, Inf, Map, Opaques) of
+ case solve_subtype(Lhs, Inf, Map) of
error -> error;
{ok, {Map1, U1}} ->
- case solve_subtype(Rhs, Inf, Map1, Opaques) of
+ case solve_subtype(Rhs, Inf, Map1) of
error -> error;
{ok, {Map2, U2}} -> {ok, {Map2, lists:umerge(U1, U2)}}
end
@@ -2481,7 +2426,7 @@ solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
end
end.
-solve_subtype(Type, Inf, Map, Opaques) ->
+solve_subtype(Type, Inf, Map) ->
%% case cerl:is_literal(Type) of
%% true ->
%% case t_is_subtype(t_from_term(cerl:concrete(Type)), Inf) of
@@ -2489,7 +2434,7 @@ solve_subtype(Type, Inf, Map, Opaques) ->
%% false -> error
%% end;
%% false ->
- try t_unify(Type, Inf, Opaques) of
+ try t_unify(Type, Inf) of
{_, List} -> {ok, enter_type_list(List, Map)}
catch
throw:{mismatch, _T1, _T2} ->
@@ -2540,7 +2485,7 @@ join_one_key(Key, [Map|Maps], Type) ->
true -> Type;
false ->
NewType = lookup_type(Key, Map),
- case t_is_equal(NewType, Type) of
+ case is_equal(NewType, Type) of
true -> join_one_key(Key, Maps, Type);
false -> join_one_key(Key, Maps, t_sup(NewType, Type))
end
@@ -2555,7 +2500,7 @@ maps_are_equal(Map1, Map2, Deps) ->
maps_are_equal_1(Map1, Map2, [H|Tail]) ->
T1 = lookup_type(H, Map1),
T2 = lookup_type(H, Map2),
- case t_is_equal(T1, T2) of
+ case is_equal(T1, T2) of
true -> maps_are_equal_1(Map1, Map2, Tail);
false ->
?debug("~w: ~s =/= ~s\n", [H, format_type(T1), format_type(T2)]),
@@ -2587,14 +2532,22 @@ prune_keys(Map1, Map2, Deps) ->
enter_type(Key, Val, Map) when is_integer(Key) ->
?debug("Entering ~s :: ~s\n", [format_type(t_var(Key)), format_type(Val)]),
- case t_is_any(Val) of
+ %% Keep any() in the map if it is opaque:
+ case is_equal(Val, t_any()) of
true ->
erase_type(Key, Map);
false ->
LimitedVal = t_limit(Val, ?INTERNAL_TYPE_LIMIT),
+ case is_equal(LimitedVal, Val) of
+ true -> ok;
+ false -> ?debug("LimitedVal ~s\n", [format_type(LimitedVal)])
+ end,
case dict:find(Key, Map) of
- {ok, LimitedVal} -> Map;
- {ok, _} -> map_store(Key, LimitedVal, Map);
+ {ok, Value} ->
+ case is_equal(Value, LimitedVal) of
+ true -> Map;
+ false -> map_store(Key, LimitedVal, Map)
+ end;
error -> map_store(Key, LimitedVal, Map)
end
end;
@@ -2681,7 +2634,10 @@ updated_vars_only(U, OldMap, NewMap) ->
[V || V <- U, not is_same(V, OldMap, NewMap)].
is_same(Key, Map1, Map2) ->
- t_is_equal(lookup_type(Key, Map1), lookup_type(Key, Map2)).
+ is_equal(lookup_type(Key, Map1), lookup_type(Key, Map2)).
+
+is_equal(Type1, Type2) ->
+ t_is_equal(Type1, Type2).
pp_map(_S, _Map) ->
?debug("\t~s: ~p\n",
@@ -2716,11 +2672,6 @@ new_state(SCC0, NextLabel, CallGraph, Plt, PropTypes, Solvers) ->
state__set_rec_dict(State, RecDict) ->
State#state{records = RecDict}.
-state__set_opaques(#state{records = RecDict} = State, {M, _F, _A}) ->
- Opaques =
- erl_types:module_builtin_opaques(M) ++ t_opaque_from_records(RecDict),
- State#state{opaques = Opaques, module = M}.
-
state__set_in_match(State, Bool) ->
State#state{in_match = Bool}.
@@ -2760,7 +2711,8 @@ state__lookup_undef_var(Tree, #state{callgraph = CG, plt = Plt}) ->
{ok, MFA} ->
case dialyzer_plt:lookup(Plt, MFA) of
none -> error;
- {value, {RetType, ArgTypes}} -> {ok, t_fun(ArgTypes, RetType)}
+ {value, {RetType, ArgTypes}} ->
+ {ok, t_fun(ArgTypes, RetType)}
end
end.
@@ -2897,7 +2849,7 @@ state__get_cs(Var, #state{cmap = {d, Dict}}) ->
dict:fetch(Var, Dict).
state__is_self_rec(Fun, #state{self_rec = SelfRec}) ->
- Fun =:= SelfRec.
+ not (SelfRec =:= 'false') andalso is_equal(Fun, SelfRec).
state__store_funs(Vars0, Funs0, #state{fun_map = Map} = State) ->
debug_make_name_map(Vars0, Funs0),
@@ -2923,7 +2875,9 @@ state__finalize(State) ->
%%
%% ============================================================================
--spec mk_constraint(erl_types:erl_type(), constr_op(), fvar_or_type()) -> #constraint{}.
+-spec mk_constraint(erl_types:erl_type(),
+ constr_op(),
+ fvar_or_type()) -> #constraint{}.
mk_constraint(Lhs, Op, Rhs) ->
case t_is_any(Lhs) orelse constraint_opnd_is_any(Rhs) of
@@ -2934,9 +2888,9 @@ mk_constraint(Lhs, Op, Rhs) ->
case Deps =:= [] of
true ->
%% This constraint is constant. Solve it immediately.
- case solve_one_c(C, map_new(), []) of
+ case solve_one_c(C, map_new()) of
error -> throw(error);
- _ ->
+ _R ->
%% This is always true, keep it anyway for logistic reasons
C
end;
@@ -2944,10 +2898,13 @@ mk_constraint(Lhs, Op, Rhs) ->
C
end;
true ->
- C = mk_constraint_1(t_any(), Op, t_any()),
- C#constraint{deps = []}
+ mk_constraint_any(Op)
end.
+mk_constraint_any(Op) ->
+ C = mk_constraint_1(t_any(), Op, t_any()),
+ C#constraint{deps = []}.
+
%% the following function is used so that we do not call
%% erl_types:t_is_any/1 with a term other than an erl_type()
-spec constraint_opnd_is_any(fvar_or_type()) -> boolean().
@@ -3002,7 +2959,8 @@ mk_constraint_1(Lhs, Op, Rhs) ->
#constraint{lhs = Lhs, op = Op, rhs = Rhs}.
mk_constraints([Lhs|LhsTail], Op, [Rhs|RhsTail]) ->
- [mk_constraint(Lhs, Op, Rhs)|mk_constraints(LhsTail, Op, RhsTail)];
+ [mk_constraint(Lhs, Op, Rhs) |
+ mk_constraints(LhsTail, Op, RhsTail)];
mk_constraints([], _Op, []) ->
[].
@@ -3017,7 +2975,7 @@ mk_constraint_list(Type, List) ->
Deps = calculate_deps(List2),
case Deps =:= [] of
true -> #constraint_list{type = conj,
- list = [mk_constraint(t_any(), eq, t_any())],
+ list = [mk_constraint_any(eq)],
deps = []};
false -> #constraint_list{type = Type, list = List2, deps = Deps}
end.
@@ -3236,6 +3194,9 @@ calculate_masks([], _I, L) ->
%%
%% ============================================================================
+bif_return(M, F, A, Xs) ->
+ erl_bif_types:type(M, F, A, Xs).
+
is_singleton_non_number_type(Type) ->
case t_is_number(Type) of
true -> false;
@@ -3265,7 +3226,7 @@ is_singleton_type(Type) ->
find_element(Args, Cs) ->
[Pos, Tuple] = Args,
- case erl_types:t_is_number(Pos) of
+ case t_is_number(Pos) of
true ->
case erl_types:t_number_vals(Pos) of
'unknown' -> 'unknown';
@@ -3301,12 +3262,18 @@ find_constraint(Tuple, [_|Cs]) ->
lookup_record(Records, Tag, Arity) ->
case erl_types:lookup_record(Tag, Arity, Records) of
{ok, Fields} ->
- {ok, t_tuple([t_from_term(Tag)|
- [FieldType || {_FieldName, FieldType} <- Fields]])};
+ RecType =
+ t_tuple([t_from_term(Tag)|
+ [FieldType || {_FieldName, FieldType} <- Fields]]),
+ {ok, RecType};
error ->
error
end.
+is_literal_record(Tree) ->
+ Ann = cerl:get_ann(Tree),
+ lists:member(record, Ann).
+
family(L) ->
sofs:to_external(sofs:rel2fam(sofs:relation(L))).
diff --git a/lib/dialyzer/src/dialyzer_utils.erl b/lib/dialyzer/src/dialyzer_utils.erl
index a4c4d37a0f..5297a3a7b4 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,7 @@
format_sig/1,
format_sig/2,
get_abstract_code_from_beam/1,
+ get_compile_options_from_beam/1,
get_abstract_code_from_src/1,
get_abstract_code_from_src/2,
get_core_from_abstract_code/1,
@@ -97,7 +98,7 @@ get_abstract_code_from_src(File) ->
{'ok', abstract_code()} | {'error', [string()]}.
get_abstract_code_from_src(File, Opts) ->
- case compile:file(File, [to_pp, binary|Opts]) of
+ case compile:noenv_file(File, [to_pp, binary|Opts]) of
error -> {error, []};
{error, Errors, _} -> {error, format_errors(Errors)};
{ok, _, AbstrCode} -> {ok, AbstrCode}
@@ -136,6 +137,26 @@ get_abstract_code_from_beam(File) ->
error
end.
+-spec get_compile_options_from_beam(file:filename()) -> 'error' | {'ok', [compile:option()]}.
+
+get_compile_options_from_beam(File) ->
+ case beam_lib:chunks(File, [compile_info]) of
+ {ok, {_, List}} ->
+ case lists:keyfind(compile_info, 1, List) of
+ {compile_info, CompInfo} -> compile_info_to_options(CompInfo);
+ _ -> error
+ end;
+ _ ->
+ %% No or unsuitable compile info.
+ error
+ end.
+
+compile_info_to_options(CompInfo) ->
+ case lists:keyfind(options, 1, CompInfo) of
+ {options, CompOpts} -> {ok, CompOpts};
+ _ -> error
+ end.
+
-type get_core_from_abs_ret() :: {'ok', cerl:c_module()} | 'error'.
-spec get_core_from_abstract_code(abstract_code()) -> get_core_from_abs_ret().
@@ -150,7 +171,9 @@ get_core_from_abstract_code(AbstrCode, Opts) ->
%% performed them. In some cases we end up in trouble when
%% performing them again.
AbstrCode1 = cleanup_parse_transforms(AbstrCode),
- try compile:forms(AbstrCode1, Opts ++ src_compiler_opts()) of
+ %% Remove parse_transforms (and other options) from compile options.
+ Opts2 = cleanup_compile_options(Opts),
+ try compile:noenv_forms(AbstrCode1, Opts2 ++ src_compiler_opts()) of
{ok, _, Core} -> {ok, Core};
_What -> error
catch
@@ -164,14 +187,14 @@ get_core_from_abstract_code(AbstrCode, Opts) ->
%% ============================================================================
-spec get_record_and_type_info(abstract_code()) ->
- {'ok', dict()} | {'error', string()}.
+ {'ok', dict:dict()} | {'error', string()}.
get_record_and_type_info(AbstractCode) ->
Module = get_module(AbstractCode),
get_record_and_type_info(AbstractCode, Module, dict:new()).
--spec get_record_and_type_info(abstract_code(), module(), dict()) ->
- {'ok', dict()} | {'error', string()}.
+-spec get_record_and_type_info(abstract_code(), module(), dict:dict()) ->
+ {'ok', dict:dict()} | {'error', string()}.
get_record_and_type_info(AbstractCode, Module, RecDict) ->
get_record_and_type_info(AbstractCode, Module, [], RecDict).
@@ -304,7 +327,7 @@ process_record_remote_types(CServer) ->
CServer1 = dialyzer_codeserver:finalize_records(NewRecords, CServer),
dialyzer_codeserver:finalize_exported_types(TempExpTypes, CServer1).
--spec merge_records(dict(), dict()) -> dict().
+-spec merge_records(dict:dict(), dict:dict()) -> dict:dict().
merge_records(NewRecords, OldRecords) ->
dict:merge(fun(_Key, NewVal, _OldVal) -> NewVal end, NewRecords, OldRecords).
@@ -315,10 +338,10 @@ merge_records(NewRecords, OldRecords) ->
%%
%% ============================================================================
--type spec_dict() :: dict().
--type callback_dict() :: dict().
+-type spec_dict() :: dict:dict().
+-type callback_dict() :: dict:dict().
--spec get_spec_info(atom(), abstract_code(), dict()) ->
+-spec get_spec_info(atom(), abstract_code(), dict:dict()) ->
{'ok', spec_dict(), callback_dict()} | {'error', string()}.
get_spec_info(ModName, AbstractCode, RecordsDict) ->
@@ -383,7 +406,7 @@ get_spec_info([], SpecDict, CallbackDict, _RecordsDict, _ModName, _File) ->
%%
%% ============================================================================
--spec sets_filter([module()], set()) -> set().
+-spec sets_filter([module()], sets:set()) -> sets:set().
sets_filter([], ExpTypes) ->
ExpTypes;
@@ -402,7 +425,7 @@ sets_filter([Mod|Mods], ExpTypes) ->
src_compiler_opts() ->
[no_copt, to_core, binary, return_errors,
no_inline, strict_record_tests, strict_record_updates,
- no_is_record_optimization].
+ dialyzer].
-spec get_module(abstract_code()) -> module().
@@ -419,6 +442,21 @@ cleanup_parse_transforms([Other|Left]) ->
cleanup_parse_transforms([]) ->
[].
+-spec cleanup_compile_options([compile:option()]) -> [compile:option()].
+
+cleanup_compile_options(Opts) ->
+ lists:filter(fun keep_compile_option/1, Opts).
+
+%% Using abstract, not asm or core.
+keep_compile_option(from_asm) -> false;
+keep_compile_option(asm) -> false;
+keep_compile_option(from_core) -> false;
+%% The parse transform will already have been applied, may cause
+%% problems if it is re-applied.
+keep_compile_option({parse_transform, _}) -> false;
+keep_compile_option(warnings_as_errors) -> false;
+keep_compile_option(_) -> true.
+
-spec format_errors([{module(), string()}]) -> [string()].
format_errors([{Mod, Errors}|Left]) ->
@@ -434,7 +472,7 @@ format_errors([]) ->
format_sig(Type) ->
format_sig(Type, dict:new()).
--spec format_sig(erl_types:erl_type(), dict()) -> string().
+-spec format_sig(erl_types:erl_type(), dict:dict()) -> string().
format_sig(Type, RecDict) ->
"fun(" ++ Sig = lists:flatten(erl_types:t_to_string(Type, RecDict)),
@@ -450,11 +488,10 @@ flat_format(Fmt, Lst) ->
%% Created : 5 March 2007
%%-------------------------------------------------------------------
+-spec pp_hook() -> fun((cerl:cerl(), _, _) -> term()).
pp_hook() ->
fun pp_hook/3.
--spec pp_hook() -> fun((cerl:cerl(), _, _) -> term()).
-
pp_hook(Node, Ctxt, Cont) ->
case cerl:type(Node) of
binary ->
diff --git a/lib/dialyzer/test/Makefile b/lib/dialyzer/test/Makefile
index 9f8a3f1194..f43e04dd59 100644
--- a/lib/dialyzer/test/Makefile
+++ b/lib/dialyzer/test/Makefile
@@ -7,9 +7,11 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
AUXILIARY_FILES=\
dialyzer.spec\
+ dialyzer.cover\
dialyzer_test_constants.hrl\
dialyzer_common.erl\
file_utils.erl\
+ dialyzer_SUITE.erl\
plt_SUITE.erl
# ----------------------------------------------------
diff --git a/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl b/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl
index 7eb4c6ec97..76da1fda70 100644
--- a/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl
+++ b/lib/dialyzer/test/behaviour_SUITE_data/src/custom_sup.erl
@@ -1,4 +1,3 @@
-%%% -*- coding: utf-8 -*-
%%%
%%% Dialyzer was giving a warning with this input because of a bug in the
%%% substitution of remote types in specs. Remote types in the first element of
diff --git a/lib/dialyzer/test/dialyzer.cover b/lib/dialyzer/test/dialyzer.cover
new file mode 100644
index 0000000000..cc61ea1901
--- /dev/null
+++ b/lib/dialyzer/test/dialyzer.cover
@@ -0,0 +1,3 @@
+%% -*- erlang -*-
+{incl_app,dialyzer,details}.
+%{incl_mods,dialyzer,[erl_types,erl_bif_types]}.
diff --git a/lib/dialyzer/test/dialyzer_SUITE.erl b/lib/dialyzer/test/dialyzer_SUITE.erl
new file mode 100644
index 0000000000..8507525597
--- /dev/null
+++ b/lib/dialyzer/test/dialyzer_SUITE.erl
@@ -0,0 +1,112 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(dialyzer_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+-define(application, dialyzer).
+
+%% 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]).
+-export([init_per_testcase/2, end_per_testcase/2]).
+
+%% Test cases must be exported.
+-export([app_test/1, appup_test/1, beam_tests/1]).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [app_test, appup_test, beam_tests].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+end_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%
+%%% Test cases starts here.
+%%%
+
+app_test(doc) ->
+ ["Test that the .app file does not contain any `basic' errors"];
+app_test(suite) ->
+ [];
+app_test(Config) when is_list(Config) ->
+ ?line ?t:app_test(dialyzer).
+
+%% Test that the .appup file does not contain any `basic' errors
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(dialyzer).
+
+beam_tests(Config) when is_list(Config) ->
+ Prog = <<"
+ -module(no_auto_import).
+
+ %% Copied from erl_lint_SUITE.erl, clash6
+
+ -export([size/1]).
+
+ size([]) ->
+ 0;
+ size({N,_}) ->
+ N;
+ size([_|T]) ->
+ 1+size(T).
+ ">>,
+ Opts = [no_auto_import],
+ {ok, BeamFile} = compile(Config, Prog, no_auto_import, Opts),
+ [] = run_dialyzer([BeamFile]),
+ ok.
+
+compile(Config, Prog, Module, CompileOpts) ->
+ Source = lists:concat([Module, ".erl"]),
+ PrivDir = ?config(priv_dir,Config),
+ Filename = filename:join([PrivDir, Source]),
+ ok = file:write_file(Filename, Prog),
+ Opts = [{outdir, PrivDir}, debug_info | CompileOpts],
+ {ok, Module} = compile:file(Filename, Opts),
+ {ok, filename:join([PrivDir, lists:concat([Module, ".beam"])])}.
+
+run_dialyzer(Files) ->
+ dialyzer:run([{analysis_type, plt_build},
+ {files, Files},
+ {from, byte_code},
+ {check_plt, false}]).
diff --git a/lib/dialyzer/test/file_utils.erl b/lib/dialyzer/test/file_utils.erl
index 36b368760c..e1314ec8de 100644
--- a/lib/dialyzer/test/file_utils.erl
+++ b/lib/dialyzer/test/file_utils.erl
@@ -106,7 +106,7 @@ lcs_fast(S1, S2) ->
-spec lcs_fast([string()], [string()],
pos_integer(), pos_integer(),
- non_neg_integer(), array()) -> {[string()], array()}.
+ non_neg_integer(), array:array()) -> {[string()], array:array()}.
lcs_fast([], _, _, _, _, Acc) ->
{[], Acc};
diff --git a/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options b/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
index 3ff26b87db..44a65f6e90 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [no_unused, no_return]}]}.
+{dialyzer_options, [{warnings, [no_unused, no_return, no_unknown]}]}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/array b/lib/dialyzer/test/opaque_SUITE_data/results/array
index b05d088a03..9921b61669 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/array
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/array
@@ -1,3 +1,3 @@
-array_use.erl:12: The type test is_tuple(array()) breaks the opaqueness of the term array()
-array_use.erl:9: The attempt to match a term of type array() against the pattern {'array', _, _, 'undefined', _} breaks the opaqueness of the term
+array_use.erl:12: The type test is_tuple(array:array(_)) breaks the opaqueness of the term array:array(_)
+array_use.erl:9: The attempt to match a term of type array:array(_) against the pattern {'array', _, _, 'undefined', _} breaks the opaqueness of the term
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/crash b/lib/dialyzer/test/opaque_SUITE_data/results/crash
index 1ddae5149f..69bdc00257 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/crash
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/crash
@@ -1,6 +1,6 @@
crash_1.erl:45: Record construction #targetlist{list::[]} violates the declared type of field list::'undefined' | crash_1:target()
-crash_1.erl:48: The call crash_1:get_using_branch2(Branch::maybe_improper_list(),L::'undefined' | crash_1:target()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+crash_1.erl:48: The call crash_1:get_using_branch2(Branch::maybe_improper_list(),L::'undefined' | crash_1:target()) will never return since it differs in the 2nd argument from the success typing arguments: (any(),maybe_improper_list())
crash_1.erl:50: The pattern <_Branch, []> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
crash_1.erl:52: The pattern <Branch, [H = {'target', _, _} | _T]> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
crash_1.erl:54: The pattern <Branch, [{'target', _, _} | T]> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/dict b/lib/dialyzer/test/opaque_SUITE_data/results/dict
index 5c6bf6a927..42f6663191 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/dict
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/dict
@@ -1,15 +1,15 @@
-dict_use.erl:41: The attempt to match a term of type dict() against the pattern 'gazonk' breaks the opaqueness of the term
-dict_use.erl:45: The attempt to match a term of type dict() against the pattern [] breaks the opaqueness of the term
-dict_use.erl:46: The attempt to match a term of type dict() against the pattern 42 breaks the opaqueness of the term
-dict_use.erl:51: The attempt to match a term of type dict() against the pattern [] breaks the opaqueness of the term
-dict_use.erl:52: The attempt to match a term of type dict() against the pattern 42 breaks the opaqueness of the term
-dict_use.erl:58: Attempt to test for equality between a term of type maybe_improper_list() and a term of opaque type dict()
-dict_use.erl:60: Attempt to test for inequality between a term of type atom() and a term of opaque type dict()
-dict_use.erl:64: Guard test length(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:65: Guard test is_atom(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:66: Guard test is_list(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:70: The type test is_list(dict()) breaks the opaqueness of the term dict()
-dict_use.erl:73: The call dict:fetch('foo',[1 | 2 | 3,...]) does not have an opaque term of type dict() as 2nd argument
+dict_use.erl:41: The attempt to match a term of type dict:dict(_,_) against the pattern 'gazonk' breaks the opaqueness of the term
+dict_use.erl:45: The attempt to match a term of type dict:dict(_,_) against the pattern [] breaks the opaqueness of the term
+dict_use.erl:46: The attempt to match a term of type dict:dict(_,_) against the pattern 42 breaks the opaqueness of the term
+dict_use.erl:51: The attempt to match a term of type dict:dict(_,_) against the pattern [] breaks the opaqueness of the term
+dict_use.erl:52: The attempt to match a term of type dict:dict(_,_) against the pattern 42 breaks the opaqueness of the term
+dict_use.erl:58: Attempt to test for equality between a term of type maybe_improper_list() and a term of opaque type dict:dict(_,_)
+dict_use.erl:60: Attempt to test for inequality between a term of type atom() and a term of opaque type dict:dict(_,_)
+dict_use.erl:64: Guard test length(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:65: Guard test is_atom(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:66: Guard test is_list(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:70: The type test is_list(dict:dict(_,_)) breaks the opaqueness of the term dict:dict(_,_)
+dict_use.erl:73: The call dict:fetch('foo',[1 | 2 | 3,...]) does not have an opaque term of type dict:dict(_,_) as 2nd argument
dict_use.erl:76: The call dict:merge(Fun::any(),42,[1 | 2,...]) does not have opaque terms as 2nd and 3rd arguments
-dict_use.erl:79: The call dict:store(42,'elli',{'dict',0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}) does not have an opaque term of type dict() as 3rd argument
+dict_use.erl:79: The call dict:store(42,'elli',{'dict',0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}) does not have an opaque term of type dict:dict(_,_) as 3rd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/ets b/lib/dialyzer/test/opaque_SUITE_data/results/ets
index 5498ba1538..e11c7a8352 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/ets
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/ets
@@ -1,3 +1,4 @@
-ets_use.erl:12: Guard test is_integer(T::atom() | tid()) breaks the opaqueness of its argument
-ets_use.erl:7: Guard test is_integer(T::tid()) breaks the opaqueness of its argument
+ets_use.erl:12: Guard test is_integer(T::atom() | ets:tid()) breaks the opaqueness of its argument
+ets_use.erl:20: The type test is_integer(atom() | ets:tid()) breaks the opaqueness of the term atom() | ets:tid()
+ets_use.erl:7: Guard test is_integer(T::ets:tid()) breaks the opaqueness of its argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/ewgi b/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
index 3c8cfb59f8..209f27b2f2 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
@@ -1,4 +1,4 @@
-ewgi_api.erl:55: The call gb_trees:to_list({non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_tree() as 1st argument
-ewgi_testapp.erl:35: The call ewgi_testapp:htmlise_data("request_data",{non_neg_integer(),'nil' | {_,_,_,_}}) will never return since it differs in the 2nd argument from the success typing arguments: ([95 | 97 | 100 | 101 | 104 | 112 | 113 | 114 | 115 | 116 | 117,...],[{_,_}])
-ewgi_testapp.erl:43: The call gb_trees:to_list(T::{non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_tree() as 1st argument
+ewgi_api.erl:55: The call gb_trees:to_list({non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
+ewgi_testapp.erl:35: The call ewgi_testapp:htmlise_data("request_data",{non_neg_integer(),'nil' | {_,_,_,_}}) does not have a term of type [{_,_}] | gb_trees:tree(_,_) (with opaque subterms) as 2nd argument
+ewgi_testapp.erl:43: The call gb_trees:to_list(T::{non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1 b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
index eb8f304905..ac5ef14041 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
@@ -2,4 +2,4 @@
inf_loop1.erl:119: The pattern [{_, LNorms}] can never match the type []
inf_loop1.erl:121: The pattern [{LinksA, LNormA}, {LinksB, LNormB}] can never match the type []
inf_loop1.erl:129: The pattern [{_, Norm} | _] can never match the type []
-inf_loop1.erl:71: The call gb_trees:get(Edge::any(),Etab::array()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+inf_loop1.erl:71: The call gb_trees:get(Edge::any(),Etab::array:array(_)) does not have an opaque term of type gb_trees:tree(_,_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2 b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2
new file mode 100644
index 0000000000..8cd2abe8cd
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2
@@ -0,0 +1,5 @@
+
+inf_loop2.erl:122: The pattern [{_, LNorms}] can never match the type []
+inf_loop2.erl:124: The pattern [{LinksA, LNormA}, {LinksB, LNormB}] can never match the type []
+inf_loop2.erl:132: The pattern [{_, Norm} | _] can never match the type []
+inf_loop2.erl:74: The call gb_trees:get(Edge::any(),Etab::array:array(_)) does not have an opaque term of type gb_trees:tree(_,_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/int b/lib/dialyzer/test/opaque_SUITE_data/results/int
index 3ee4def34b..dc806fa12c 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/int
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/int
@@ -1,3 +1,3 @@
-int_adt.erl:28: Invalid type specification for function int_adt:add_f/2. The success typing is (number(),float()) -> number()
-int_adt.erl:32: Invalid type specification for function int_adt:div_f/2. The success typing is (number(),number()) -> float()
+int_adt.erl:28: Invalid type specification for function int_adt:add_f/2. The success typing is (number() | int_adt:int(),float()) -> number() | int_adt:int()
+int_adt.erl:32: Invalid type specification for function int_adt:div_f/2. The success typing is (number() | int_adt:int(),number() | int_adt:int()) -> float()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque b/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
index ab850b613e..0363be544d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
@@ -1,2 +1,2 @@
-mixed_opaque_use.erl:31: The call mixed_opaque_rec_adt:get_a(Q::mixed_opaque_queue_adt:my_queue()) contains an opaque term as 1st argument when an opaque term of type mixed_opaque_rec_adt:rec() is expected
+mixed_opaque_use.erl:31: The call mixed_opaque_rec_adt:get_a(Q::mixed_opaque_queue_adt:my_queue()) does not have an opaque term of type mixed_opaque_rec_adt:rec() as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/modules b/lib/dialyzer/test/opaque_SUITE_data/results/modules
new file mode 100644
index 0000000000..f71334b9de
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/modules
@@ -0,0 +1,3 @@
+
+opaque_digraph.erl:353: Cons will produce an improper list since its 2nd argument is number()
+opaque_digraph.erl:365: Cons will produce an improper list since its 2nd argument is number()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/my_queue b/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
index 2860b91084..1f25a6f9c3 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
@@ -4,4 +4,4 @@ my_queue_use.erl:19: The call my_queue_adt:add(42,Q0::[]) does not have an opaqu
my_queue_use.erl:24: The attempt to match a term of type my_queue_adt:my_queue() against the pattern [42 | Q2] breaks the opaqueness of the term
my_queue_use.erl:30: Attempt to test for equality between a term of type [] and a term of opaque type my_queue_adt:my_queue()
my_queue_use.erl:34: Cons will produce an improper list since its 2nd argument is my_queue_adt:my_queue()
-my_queue_use.erl:34: The call my_queue_adt:dequeue(nonempty_improper_list(42,my_queue_adt:my_queue())) does not have an opaque term of type my_queue_adt:my_queue() as 1st argument
+my_queue_use.erl:34: The call my_queue_adt:dequeue(nonempty_maybe_improper_list(42,my_queue_adt:my_queue())) does not have an opaque term of type my_queue_adt:my_queue() as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/opaque b/lib/dialyzer/test/opaque_SUITE_data/results/opaque
index ca76f57b54..5747f9061f 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/opaque
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/opaque
@@ -1,2 +1,3 @@
+opaque_bug3.erl:19: The pattern 'a' can never match the type #c{}
opaque_bug4.erl:20: The attempt to match a term of type opaque_adt:abc() against the pattern 'a' breaks the opaqueness of the term
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/para b/lib/dialyzer/test/opaque_SUITE_data/results/para
new file mode 100644
index 0000000000..3aaa238de6
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/para
@@ -0,0 +1,21 @@
+
+para1.erl:18: The test para1:t(atom()) =:= para1:t(integer()) can never evaluate to 'true'
+para1.erl:23: The test para1:t(atom()) =:= para1:t() can never evaluate to 'true'
+para1.erl:28: The test para1:t() =:= para1:t(integer()) can never evaluate to 'true'
+para1.erl:33: The test {3,2} =:= {'a','b'} can never evaluate to 'true'
+para1.erl:38: Attempt to test for equality between a term of type para1_adt:t(integer()) and a term of opaque type para1_adt:t(atom())
+para1.erl:43: Attempt to test for equality between a term of type para1_adt:t() and a term of opaque type para1_adt:t(atom())
+para1.erl:48: Attempt to test for equality between a term of type para1_adt:t(integer()) and a term of opaque type para1_adt:t()
+para1.erl:53: The test {3,2} =:= {'a','b'} can never evaluate to 'true'
+para2.erl:103: Attempt to test for equality between a term of type para2_adt:circ({{integer(),integer()},{integer(),integer()}},{{integer(),integer()},{integer(),integer()}}) and a term of opaque type para2_adt:circ({{integer(),integer()},{integer(),integer()}})
+para2.erl:117: Attempt to test for equality between a term of type para2_adt:un(atom(),integer()) and a term of opaque type para2_adt:un(integer(),atom())
+para2.erl:31: The test 'a' =:= 'b' can never evaluate to 'true'
+para2.erl:61: Attempt to test for equality between a term of type para2_adt:c2() and a term of opaque type para2_adt:c1()
+para2.erl:66: The test 'a' =:= 'b' can never evaluate to 'true'
+para2.erl:88: The test para2:circ({{integer(),integer()},{integer(),integer()}}) =:= para2:circ({{integer(),integer()},{integer(),integer()}},{{integer(),integer()},{integer(),integer()}}) can never evaluate to 'true'
+para3.erl:28: Invalid type specification for function para3:ot2/0. The success typing is () -> 'foo'
+para3.erl:36: The pattern {{{17}}} can never match the type {{{{{{_,_,_,_,_}}}}}}
+para3.erl:55: Invalid type specification for function para3:t2/0. The success typing is () -> 'foo'
+para3.erl:65: The attempt to match a term of type {{{{{para3_adt:ot1(_,_,_,_,_)}}}}} against the pattern {{{{{17}}}}} breaks the opaqueness of para3_adt:ot1(_,_,_,_,_)
+para3.erl:68: The pattern {{{{17}}}} can never match the type {{{{{para3_adt:ot1(_,_,_,_,_)}}}}}
+para3.erl:74: Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/queue b/lib/dialyzer/test/opaque_SUITE_data/results/queue
index c3f04ea64d..5b3813c418 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/queue
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/queue
@@ -1,12 +1,11 @@
-queue_use.erl:18: The call queue:is_empty({[],[]}) does not have an opaque term of type queue() as 1st argument
-queue_use.erl:22: The call queue:in(42,Q0::{[],[]}) does not have an opaque term of type queue() as 2nd argument
-queue_use.erl:27: The attempt to match a term of type queue() against the pattern {"*", Q2} breaks the opaqueness of the term
-queue_use.erl:33: Attempt to test for equality between a term of type {[42,...],[]} and a term of opaque type queue()
-queue_use.erl:36: The attempt to match a term of type queue() against the pattern {F, _R} breaks the opaqueness of the term
-queue_use.erl:40: The call queue:out({[42,...],[]}) does not have an opaque term of type queue() as 1st argument
-queue_use.erl:48: The call queue_use:add_unique(42,#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
-queue_use.erl:51: The call queue_use:is_in_queue(E::42,DB::#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
-queue_use.erl:56: The attempt to match a term of type #db{p::[],q::queue()} against the pattern {'db', _, {L1, L2}} breaks the opaqueness of queue()
-queue_use.erl:62: The call queue_use:tuple_queue({42,'gazonk'}) does not have a term of type {_,queue()} (with opaque subterms) as 1st argument
-queue_use.erl:65: The call queue:in(F::42,Q::'gazonk') does not have an opaque term of type queue() as 2nd argument
+queue_use.erl:18: The call queue:is_empty({[],[]}) does not have an opaque term of type queue:queue(_) as 1st argument
+queue_use.erl:22: The call queue:in(42,Q0::{[],[]}) does not have an opaque term of type queue:queue(_) as 2nd argument
+queue_use.erl:27: The attempt to match a term of type queue:queue(_) against the pattern {"*", Q2} breaks the opaqueness of the term
+queue_use.erl:33: Attempt to test for equality between a term of type {[42,...],[]} and a term of opaque type queue:queue(_)
+queue_use.erl:36: The attempt to match a term of type queue:queue(_) against the pattern {F, _R} breaks the opaqueness of the term
+queue_use.erl:40: The call queue:out({[42,...],[]}) does not have an opaque term of type queue:queue(_) as 1st argument
+queue_use.erl:51: The call queue_use:is_in_queue(E::42,DB::#db{p::[],q::queue:queue(_)}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+queue_use.erl:56: The attempt to match a term of type #db{p::[],q::queue:queue(_)} against the pattern {'db', _, {L1, L2}} breaks the opaqueness of queue:queue(_)
+queue_use.erl:62: The call queue_use:tuple_queue({42,'gazonk'}) does not have a term of type {_,queue:queue(_)} (with opaque subterms) as 1st argument
+queue_use.erl:65: The call queue:in(F::42,Q::'gazonk') does not have an opaque term of type queue:queue(_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/simple b/lib/dialyzer/test/opaque_SUITE_data/results/simple
new file mode 100644
index 0000000000..29864d6065
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/simple
@@ -0,0 +1,92 @@
+
+exact_api.erl:17: The call exact_api:set_type(A::#digraph{vtab::'notable',etab::'notable',ntab::'notable',cyclic::'true'}) does not have an opaque term of type digraph:graph() as 1st argument
+exact_api.erl:23: The call digraph:delete(G::#digraph{vtab::'notable',etab::'notable',ntab::'notable',cyclic::'true'}) does not have an opaque term of type digraph:graph() as 1st argument
+exact_api.erl:55: The attempt to match a term of type exact_adt:exact_adt() against the pattern {'exact_adt'} breaks the opaqueness of the term
+exact_api.erl:59: The call exact_adt:exact_adt_set_type2(A::#exact_adt{}) does not have an opaque term of type exact_adt:exact_adt() as 1st argument
+is_rec.erl:10: The call erlang:is_record(simple1_adt:d1(),'r',2) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:15: The call erlang:is_record(A::simple1_adt:d1(),'r',I::1 | 2 | 3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:19: Guard test is_record(A::simple1_adt:d1(),'r',2) breaks the opaqueness of its argument
+is_rec.erl:23: Guard test is_record({simple1_adt:d1(),1},'r',2) breaks the opaqueness of its argument
+is_rec.erl:41: The call erlang:is_record(A::simple1_adt:d1(),R::'a') contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:45: The call erlang:is_record(A::simple1_adt:d1(),A::simple1_adt:d1(),1) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+is_rec.erl:49: The call erlang:is_record(A::simple1_adt:d1(),any(),1) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:53: The call erlang:is_record(A::simple1_adt:d1(),A::simple1_adt:d1(),any()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+is_rec.erl:57: Guard test is_record(A::simple1_adt:d1(),'r',2) breaks the opaqueness of its argument
+is_rec.erl:61: The record #r{f1::simple1_adt:d1()} violates the declared type for #r{}
+is_rec.erl:65: The call erlang:is_record({simple1_adt:d1(),1},'r',2) contains an opaque term as 1st argument when terms of different types are expected in these positions
+rec_api.erl:104: Matching of pattern {'r2', 10} tagged with a record name violates the declared type of #r2{f1::10}
+rec_api.erl:113: The attempt to match a term of type #r3{f1::queue:queue(_)} against the pattern {'r3', 'a'} breaks the opaqueness of queue:queue(_)
+rec_api.erl:118: Record construction #r3{f1::10} violates the declared type of field f1::queue:queue(_)
+rec_api.erl:123: The attempt to match a term of type #r3{f1::10} against the pattern {'r3', 10} breaks the opaqueness of queue:queue(_)
+rec_api.erl:24: Record construction #r1{f1::10} violates the declared type of field f1::'undefined' | rec_api:a()
+rec_api.erl:29: Matching of pattern {'r1', 10} tagged with a record name violates the declared type of #r1{f1::10}
+rec_api.erl:33: The attempt to match a term of type rec_adt:r1() against the pattern {'r1', 'a'} breaks the opaqueness of the term
+rec_api.erl:35: Invalid type specification for function rec_api:adt_t1/1. The success typing is (#r1{f1::'a'}) -> #r1{f1::'a'}
+rec_api.erl:40: Invalid type specification for function rec_api:adt_r1/0. The success typing is () -> #r1{f1::'a'}
+rec_api.erl:85: The attempt to match a term of type rec_api:f() against the variable _ breaks the opaqueness of rec_adt:f()
+rec_api.erl:99: Record construction #r2{f1::10} violates the declared type of field f1::rec_api:a()
+simple1_api.erl:113: The test simple1_api:d1() =:= simple1_api:d2() can never evaluate to 'true'
+simple1_api.erl:118: Guard test simple1_api:d2() =:= A::simple1_api:d1() can never succeed
+simple1_api.erl:142: Attempt to test for equality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:148: Guard test simple1_adt:o2() =:= A::simple1_adt:o1() contains an opaque term as 1st argument
+simple1_api.erl:154: Attempt to test for inequality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:160: Attempt to test for inequality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:165: Attempt to test for equality between a term of type simple1_adt:c2() and a term of opaque type simple1_adt:c1()
+simple1_api.erl:181: Guard test A::simple1_adt:d1() =< B::simple1_adt:d2() contains an opaque term as 1st argument
+simple1_api.erl:185: Guard test 'a' =< B::simple1_adt:d2() contains an opaque term as 2nd argument
+simple1_api.erl:189: Guard test A::simple1_adt:d1() =< 'd' contains an opaque term as 1st argument
+simple1_api.erl:197: The type test is_integer(A::simple1_adt:d1()) breaks the opaqueness of the term A::simple1_adt:d1()
+simple1_api.erl:221: Guard test A::simple1_api:i1() > 3 can never succeed
+simple1_api.erl:225: Guard test A::simple1_adt:i1() > 3 contains an opaque term as 1st argument
+simple1_api.erl:233: Guard test A::simple1_adt:i1() < 3 contains an opaque term as 1st argument
+simple1_api.erl:239: Guard test A::1 > 3 can never succeed
+simple1_api.erl:243: Guard test A::1 > 3 can never succeed
+simple1_api.erl:257: Guard test is_function(T::simple1_api:o1()) can never succeed
+simple1_api.erl:265: Guard test is_function(T::simple1_adt:o1()) breaks the opaqueness of its argument
+simple1_api.erl:269: The type test is_function(T::simple1_adt:o1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:274: Guard test is_function(T::simple1_api:o1(),A::simple1_api:i1()) can never succeed
+simple1_api.erl:284: Guard test is_function(T::simple1_adt:o1(),A::simple1_adt:i1()) breaks the opaqueness of its argument
+simple1_api.erl:289: The type test is_function(T::simple1_adt:o1(),A::simple1_adt:i1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:294: The call erlang:is_function(T::simple1_api:o1(),A::simple1_adt:i1()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+simple1_api.erl:300: The type test is_function(T::simple1_adt:o1(),A::simple1_api:i1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:306: Guard test B::simple1_api:b2() =:= 'true' can never succeed
+simple1_api.erl:315: Guard test A::simple1_api:b1() =:= 'false' can never succeed
+simple1_api.erl:319: Guard test not('and'('true','true')) can never succeed
+simple1_api.erl:337: Clause guard cannot succeed.
+simple1_api.erl:342: Guard test B::simple1_adt:b2() =:= 'true' contains an opaque term as 1st argument
+simple1_api.erl:347: Guard test A::simple1_adt:b1() =:= 'true' contains an opaque term as 1st argument
+simple1_api.erl:355: Invalid type specification for function simple1_api:bool_adt_t6/1. The success typing is ('true') -> 1
+simple1_api.erl:365: Clause guard cannot succeed.
+simple1_api.erl:368: Invalid type specification for function simple1_api:bool_adt_t8/2. The success typing is (boolean(),boolean()) -> 1
+simple1_api.erl:378: Clause guard cannot succeed.
+simple1_api.erl:381: Invalid type specification for function simple1_api:bool_adt_t9/2. The success typing is ('false','false') -> 1
+simple1_api.erl:407: The size simple1_adt:i1() breaks the opaqueness of A
+simple1_api.erl:418: The attempt to match a term of type non_neg_integer() against the variable A breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:425: The attempt to match a term of type non_neg_integer() against the variable B breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:432: The pattern <<_:B/integer-unit:1>> can never match the type any()
+simple1_api.erl:448: The attempt to match a term of type non_neg_integer() against the variable Sz breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:460: The attempt to match a term of type simple1_adt:bit1() against the pattern <<_/binary-unit:8>> breaks the opaqueness of the term
+simple1_api.erl:478: The call 'foo':A(A::simple1_adt:a()) breaks the opaqueness of the term A :: simple1_adt:a()
+simple1_api.erl:486: The call A:'foo'(A::simple1_adt:a()) breaks the opaqueness of the term A :: simple1_adt:a()
+simple1_api.erl:499: The call 'foo':A(A::simple1_api:i()) requires that A is of type atom() not simple1_api:i()
+simple1_api.erl:503: The call 'foo':A(A::simple1_adt:i()) requires that A is of type atom() not simple1_adt:i()
+simple1_api.erl:507: The call A:'foo'(A::simple1_api:i()) requires that A is of type atom() | tuple() not simple1_api:i()
+simple1_api.erl:511: The call A:'foo'(A::simple1_adt:i()) requires that A is of type atom() | tuple() not simple1_adt:i()
+simple1_api.erl:519: Guard test A::simple1_adt:d2() == B::simple1_adt:d1() contains an opaque term as 1st argument
+simple1_api.erl:534: Guard test A::simple1_adt:d1() >= 3 contains an opaque term as 1st argument
+simple1_api.erl:536: Guard test A::simple1_adt:d1() == 3 contains an opaque term as 1st argument
+simple1_api.erl:538: Guard test A::simple1_adt:d1() =:= 3 contains an opaque term as 1st argument
+simple1_api.erl:548: The call erlang:'<'(A::simple1_adt:d1(),3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple1_api.erl:558: The call erlang:'=<'(A::simple1_adt:d1(),B::simple1_adt:d2()) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple1_api.erl:565: Guard test {digraph:graph(),3} > {digraph:graph(),atom() | ets:tid()} contains an opaque term as 2nd argument
+simple1_api.erl:91: Invalid type specification for function simple1_api:tup/0. The success typing is () -> {'a','b'}
+simple2_api.erl:100: The call lists:flatten(A::simple1_adt:tuple1()) contains an opaque term as 1st argument when a structured term of type [any()] is expected
+simple2_api.erl:116: The call lists:flatten({simple1_adt:tuple1()}) will never return since it differs in the 1st argument from the success typing arguments: ([any()])
+simple2_api.erl:121: Guard test {simple1_adt:d1(),3} > {simple1_adt:d1(),simple1_adt:tuple1()} contains an opaque term as 2nd argument
+simple2_api.erl:125: The call erlang:tuple_to_list(B::simple1_adt:tuple1()) contains an opaque term as 1st argument when a structured term of type tuple() is expected
+simple2_api.erl:31: The call erlang:'!'(A::simple1_adt:d1(),'foo') contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:35: The call erlang:send(A::simple1_adt:d1(),'foo') contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:51: The call erlang:'<'(A::simple1_adt:d1(),3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:59: The call lists:keysearch(1,A::simple1_adt:d1(),[]) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+simple2_api.erl:67: The call lists:keysearch('key',1,A::simple1_adt:tuple1()) contains an opaque term as 3rd argument when terms of different types are expected in these positions
+simple2_api.erl:96: The call lists:keyreplace('a',1,[{1, 2}],A::simple1_adt:tuple1()) contains an opaque term as 4th argument when terms of different types are expected in these positions
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/timer b/lib/dialyzer/test/opaque_SUITE_data/results/timer
index e917b76b08..b1cfcd4e9f 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/timer
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/timer
@@ -1,4 +1,4 @@
timer_use.erl:16: The pattern 'gazonk' can never match the type {'error',_} | {'ok',timer:tref()}
-timer_use.erl:17: The attempt to match a term of type {'ok',timer:tref()} against the pattern {'ok', 42} breaks the opaqueness of timer:tref()
+timer_use.erl:17: The attempt to match a term of type {'error',_} | {'ok',timer:tref()} against the pattern {'ok', 42} breaks the opaqueness of timer:tref()
timer_use.erl:18: The attempt to match a term of type {'error',_} | {'ok',timer:tref()} against the pattern {Tag, 'gazonk'} breaks the opaqueness of timer:tref()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/wings b/lib/dialyzer/test/opaque_SUITE_data/results/wings
index a9571441f8..511263b70a 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/wings
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/wings
@@ -1,11 +1,11 @@
-wings_dissolve.erl:103: Guard test is_list(List::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:19: Guard test is_list(Faces::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:272: Guard test is_list(Faces::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:31: The call gb_sets:is_empty(Faces::[any(),...]) does not have an opaque term of type gb_set() as 1st argument
+wings_dissolve.erl:103: Guard test is_list(List::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:19: Guard test is_list(Faces::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:272: Guard test is_list(Faces::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:31: The call gb_sets:is_empty(Faces::[any(),...]) does not have an opaque term of type gb_sets:set(_) as 1st argument
wings_edge.erl:205: The pattern <Edge, 'hard', Htab> can never match the type <_,'soft',_>
-wings_edge_cmd.erl:30: The call gb_trees:size(P::gb_set()) contains an opaque term as 1st argument when an opaque term of type gb_tree() is expected
+wings_edge_cmd.erl:30: The call gb_trees:size(P::gb_sets:set(_)) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
wings_edge_cmd.erl:32: The pattern [_ | Parts] can never match the type []
wings_edge_cmd.erl:32: The pattern [{_, P} | _] can never match the type []
-wings_io.erl:30: The attempt to match a term of type {'empty',queue()} against the pattern {'empty', {In, Out}} breaks the opaqueness of queue()
-wings_we.erl:155: The call wings_util:gb_trees_largest_key(Etab::gb_tree()) contains an opaque term as 1st argument when a structured term of type {_,{_,_,_,'nil' | {_,_,_,'nil' | {_,_,_,_}}}} is expected
+wings_io.erl:30: The attempt to match a term of type {'empty',queue:queue(_)} against the pattern {'empty', {In, Out}} breaks the opaqueness of queue:queue(_)
+wings_we.erl:155: The call wings_util:gb_trees_largest_key(Etab::gb_trees:tree(_,_)) contains an opaque term as 1st argument when a structured term of type {_,{_,_,_,'nil' | {_,_,_,'nil' | {_,_,_,_}}}} is expected
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl b/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
index 8a2cd86f43..a4cec065ab 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
@@ -24,7 +24,7 @@ ok3() ->
ok4() ->
dict:fetch(foo, dict:new()).
-ok5() -> % this is OK since some_mod:new/0 might be returning a dict()
+ok5() -> % this is OK since some_mod:new/0 might be returning a dict:dict()
dict:fetch(foo, some_mod:new()).
ok6() ->
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl b/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
index d65af0af4e..593d9a669d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
@@ -1,5 +1,5 @@
-module(ets_use).
--export([t1/0, t2/0]).
+-export([t1/0, t2/0, t3/0, t4/0]).
t1() ->
case n() of
@@ -13,4 +13,10 @@ t2() ->
T when is_atom(T) -> atm
end.
-n() -> ets:new(n, [named_table]).
+t3() ->
+ is_atom(n()). % no warning since atom() is possible
+
+t4() ->
+ is_integer(n()). % opaque warning since ets:tid() is opaque
+
+n() -> ets:new(n, [named_table]). % -> atom() | ets:tid()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
index 0b98f550f1..5cbc79f948 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
@@ -28,7 +28,7 @@
%% @type bag() = gb_tree()
-ifdef(HAS_GB_TREE_SPEC).
--type bag() :: gb_tree().
+-type bag() :: gb_trees:tree().
-else.
-type bag() :: {non_neg_integer(), {any(), any(), any(), any()} | 'nil'}.
-endif.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
index 5da8ff0ecf..d8e15cb081 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
@@ -29,7 +29,7 @@
%% @type bag() = gb_tree()
-ifdef(HAS_GB_TREE_SPEC).
--type bag() :: gb_tree().
+-type bag() :: gb_trees:tree().
-else.
-type bag() :: {non_neg_integer(), {any(), any(), any(), any()} | 'nil'}.
-endif.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl b/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
index 008b0a486a..7c34b01c2d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
@@ -12,12 +12,12 @@
-export([new/0, get_g/1]).
--record(rec, {g :: gb_set()}).
+-record(rec, {g :: gb_sets:set()}).
-spec new() -> #rec{}.
new() ->
#rec{g = gb_sets:empty()}.
--spec get_g(#rec{}) -> gb_set().
+-spec get_g(#rec{}) -> gb_sets:set().
get_g(R) ->
R#rec.g.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
index 0dff16cf14..3275736e75 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
@@ -1,7 +1,7 @@
%% -*- erlang-indent-level: 2 -*-
%%----------------------------------------------------------------------------
%% Non-sensical (i.e., stripped-down) program that sends the analysis
-%% into an infinite loop. The #we.es field was originally a gb_tree()
+%% into an infinite loop. The #we.es field was originally a gb_trees:tree()
%% but the programmer declared it as an array in order to change it to
%% that data type instead. In the file, there are two calls to function
%% gb_trees:get/2 which seem to be the ones responsible for sending the
@@ -14,7 +14,7 @@
-export([command/1]).
-record(we, {id,
- es = array:new() :: array(),
+ es = array:new() :: array:array(),
vp,
mirror = none}).
-record(edge, {vs,ve,a = none,b = none,lf,rf,ltpr,ltsu,rtpr,rtsu}).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl
new file mode 100644
index 0000000000..3787fc6750
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl
@@ -0,0 +1,175 @@
+%% -*- erlang-indent-level: 2 -*-
+%%----------------------------------------------------------------------------
+%% Copy of inf_loop1.erl, where the calls mentioned below have been
+%% restored.
+
+%% Non-sensical (i.e., stripped-down) program that sends the analysis
+%% into an infinite loop. The #we.es field was originally a gb_trees:tree()
+%% but the programmer declared it as an array in order to change it to
+%% that data type instead. In the file, there are two calls to function
+%% gb_trees:get/2 which seem to be the ones responsible for sending the
+%% analysis into an infinite loop. Currently, these calls are marked and
+%% have been changed to gbee_trees:get/2 in order to be able to see that
+%% the analysis works if these two calls are taken out of the picture.
+%%----------------------------------------------------------------------------
+-module(inf_loop2).
+
+-export([command/1]).
+
+-record(we, {id,
+ es = array:new() :: array:array(),
+ vp,
+ mirror = none}).
+-record(edge, {vs,ve,a = none,b = none,lf,rf,ltpr,ltsu,rtpr,rtsu}).
+
+command(St) ->
+ State = drag_mode(offset_region),
+ SetupSt = wings_sel_conv:more(St),
+ Tvs = wings_sel:fold(fun(Faces, #we{id = Id} = We, Acc) ->
+ FaceRegions = wings_sel:face_regions(Faces, We),
+ {AllVs0,VsData} =
+ collect_offset_regions_data(FaceRegions, We, [], []),
+ AllVs = ordsets:from_list(AllVs0),
+ [{Id,{AllVs,offset_regions_fun(VsData, State)}}|Acc]
+ end,
+ [],
+ SetupSt),
+ wings_drag:setup(Tvs, 42, [], St).
+
+drag_mode(Type) ->
+ {Mode,Norm} = wings_pref:get_value(Type, {average,loop}),
+ {Type,Mode,Norm}.
+
+collect_offset_regions_data([Faces|Regions], We, AllVs, VsData) ->
+ {FaceNormTab,OuterEdges,RegVs} =
+ some_fake_module:faces_data_0(Faces, We, [], [], []),
+ {LoopNorm,LoopVsData,LoopVs} =
+ offset_regions_loop_data(OuterEdges, Faces, We, FaceNormTab),
+ Vs = RegVs -- LoopVs,
+ RegVsData = vertex_normals(Vs, FaceNormTab, We, LoopVsData),
+ collect_offset_regions_data(Regions, We, RegVs ++ AllVs,
+ [{LoopNorm,RegVsData}|VsData]);
+collect_offset_regions_data([], _, AllVs, VsData) ->
+ {AllVs,VsData}.
+
+offset_regions_loop_data(Edges, Faces, We, FNtab) ->
+ EdgeSet = gb_sets:from_list(Edges),
+ offset_loop_data_0(EdgeSet, Faces, We, FNtab, [], [], []).
+
+offset_loop_data_0(EdgeSet0, Faces, We, FNtab, LNorms, VData0, Vs0) ->
+ case gb_sets:is_empty(EdgeSet0) of
+ false ->
+ {Edge,EdgeSet1} = gb_sets:take_smallest(EdgeSet0),
+ {EdgeSet,VData,Links,LoopNorm,Vs} =
+ offset_loop_data_1(Edge, EdgeSet1, Faces, We, FNtab, VData0, Vs0),
+ offset_loop_data_0(EdgeSet, Faces, We, FNtab,
+ [{Links,LoopNorm}|LNorms], VData, Vs);
+ true ->
+ AvgLoopNorm = average_loop_norm(LNorms),
+ {AvgLoopNorm,VData0,Vs0}
+ end.
+
+offset_loop_data_1(Edge, EdgeSet, _Faces,
+ #we{es = Etab, vp = Vtab} = We, FNtab, VData, Vs) ->
+ #edge{vs = Va, ve = Vb, lf = Lf, ltsu = NextLeft} = gb_trees:get(Edge, Etab),
+ VposA = gb_trees:get(Va, Vtab),
+ VposB = gb_trees:get(Vb, Vtab),
+ VDir = e3d_vec:sub(VposB, VposA),
+ FNorm = wings_face:normal(Lf, We),
+ EdgeData = gb_trees:get(NextLeft, Etab),
+ offset_loop_data_2(NextLeft, EdgeData, Va, VposA, Lf, Edge, We, FNtab,
+ EdgeSet, VDir, [], [FNorm], VData, [], Vs, 0).
+
+offset_loop_data_2(CurE, #edge{vs = Va, ve = Vb, lf = PrevFace,
+ rtsu = NextEdge, ltsu = IfCurIsMember},
+ Vb, VposB, PrevFace, LastE,
+ #we{mirror = M} = We,
+ FNtab, EdgeSet0, VDir, EDir0, VNorms0, VData0, VPs0, Vs0,
+ Links) ->
+ Mirror = M == PrevFace,
+ offset_loop_is_member(Mirror, Vb, Va, VposB, CurE, IfCurIsMember, VNorms0,
+ NextEdge, EdgeSet0, VDir, EDir0, FNtab, PrevFace,
+ LastE, We, VData0, VPs0, Vs0, Links).
+
+offset_loop_is_member(Mirror, V1, V2, Vpos1, CurE, NextE, VNorms0, NEdge,
+ EdgeSet0, VDir, EDir0, FNtab, PFace, LastE, We,
+ VData0, VPs0, Vs0, Links) ->
+ #we{es = Etab, vp = Vtab} = We,
+ Vpos2 = gb_trees:get(V2, Vtab),
+ Dir = e3d_vec:sub(Vpos2, Vpos1),
+ NextVDir = e3d_vec:neg(Dir),
+ EdgeSet = gb_sets:delete(CurE, EdgeSet0),
+ EdgeData = gb_trees:get(NextE, Etab), %% HERE
+ [FNorm|_] = VNorms0,
+ VData = offset_loop_data_3(Mirror, V1, Vpos1, VNorms0, NEdge, VDir,
+ Dir, EDir0, FNtab, We, VData0),
+ VPs = [Vpos1|VPs0],
+ Vs = [V1|Vs0],
+ offset_loop_data_2(NextE, EdgeData, V2, Vpos2, PFace, LastE, We, FNtab,
+ EdgeSet, NextVDir, [], [FNorm], VData, VPs, Vs, Links + 1).
+
+offset_loop_data_3(false, V, Vpos, VNorms0, NextEdge,
+ VDir, Dir, EDir0, FNtab, We, VData0) ->
+ #we{es = Etab} = We,
+ VNorm = e3d_vec:norm(e3d_vec:add(VNorms0)),
+ NV = wings_vertex:other(V, gb_trees:get(NextEdge, Etab)), %% HERE
+ ANorm = vertex_normal(NV, FNtab, We),
+ EDir = some_fake_module:average_edge_dir(VNorm, VDir, Dir, EDir0),
+ AvgDir = some_fake_module:evaluate_vdata(VDir, Dir, VNorm),
+ ScaledDir = some_fake_module:along_edge_scale_factor(VDir, Dir, EDir, ANorm),
+ [{V,{Vpos,AvgDir,EDir,ScaledDir}}|VData0].
+
+average_loop_norm([{_,LNorms}]) ->
+ e3d_vec:norm(LNorms);
+average_loop_norm([{LinksA,LNormA},{LinksB,LNormB}]) ->
+ case LinksA < LinksB of
+ true ->
+ e3d_vec:norm(e3d_vec:add(e3d_vec:neg(LNormA), LNormB));
+ false ->
+ e3d_vec:norm(e3d_vec:add(e3d_vec:neg(LNormB), LNormA))
+ end;
+average_loop_norm(LNorms) ->
+ LoopNorms = [Norm || {_,Norm} <- LNorms],
+ e3d_vec:norm(e3d_vec:neg(e3d_vec:add(LoopNorms))).
+
+vertex_normals([V|Vs], FaceNormTab, #we{vp = Vtab, mirror = M} = We, Acc) ->
+ FaceNorms =
+ wings_vertex:fold(fun(_, Face, _, A) when Face == M ->
+ [e3d_vec:neg(wings_face:normal(M, We))|A];
+ (_, Face, _, A) ->
+ [gb_trees:get(Face, FaceNormTab)|A]
+ end, [], V, We),
+ VNorm = e3d_vec:norm(e3d_vec:add(FaceNorms)),
+ Vpos = gb_trees:get(V, Vtab),
+ vertex_normals(Vs, FaceNormTab, We, [{V,{Vpos,VNorm}}|Acc]);
+vertex_normals([], _, _, Acc) ->
+ Acc.
+
+vertex_normal(V, FaceNormTab, #we{mirror = M} = We) ->
+ wings_vertex:fold(fun(_, Face, _, A) when Face == M ->
+ [e3d_vec:neg(wings_face:normal(Face, We))|A];
+ (_, Face, _, A) ->
+ N = gb_trees:get(Face, FaceNormTab),
+ case e3d_vec:is_zero(N) of
+ true -> A;
+ false -> [N|A]
+ end
+ end, [], V, We).
+
+offset_regions_fun(OffsetData, {_,Solution,_} = State) ->
+ fun(new_mode_data, {NewState,_}) ->
+ offset_regions_fun(OffsetData, NewState);
+ ([Dist,_,_,Bump|_], A) ->
+ lists:foldl(fun({LoopNormal,VsData}, VsAcc0) ->
+ lists:foldl(fun({V,{Vpos0,VNorm}}, VsAcc) ->
+ [{V,Vpos0}|VsAcc];
+ ({V,{Vpos0,Dir,EDir,ScaledEDir}}, VsAcc) ->
+ Vec = case Solution of
+ average -> Dir;
+ along_edges -> EDir;
+ scaled -> ScaledEDir
+ end,
+ [{V,Vpos0}|VsAcc]
+ end, VsAcc0, VsData)
+ end, A, OffsetData)
+ end.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl
new file mode 100644
index 0000000000..09d4229e28
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl
@@ -0,0 +1,655 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+
+%%% The Erlang scanner. All types are opaque, which puts some stress
+%%% on Dialyzer.
+
+-module(opaque_digraph).
+
+-export([new/0, new/1, delete/1, info/1]).
+
+-export([add_vertex/1, add_vertex/2, add_vertex/3]).
+-export([del_vertex/2, del_vertices/2]).
+-export([vertex/2, no_vertices/1, vertices/1]).
+-export([source_vertices/1, sink_vertices/1]).
+
+-export([add_edge/3, add_edge/4, add_edge/5]).
+-export([del_edge/2, del_edges/2, del_path/3]).
+-export([edge/2, no_edges/1, edges/1]).
+
+-export([out_neighbours/2, in_neighbours/2]).
+-export([out_edges/2, in_edges/2, edges/2]).
+-export([out_degree/2, in_degree/2]).
+-export([get_path/3, get_cycle/2]).
+
+-export([get_short_path/3, get_short_cycle/2]).
+
+-export_type([local_digraph/0, d_type/0, vertex/0]).
+
+-record(digraph, {vtab = notable :: ets:tab(),
+ etab = notable :: ets:tab(),
+ ntab = notable :: ets:tab(),
+ cyclic = true :: boolean()}).
+
+-opaque local_digraph() :: #digraph{}.
+
+-export_type([edge/0, label/0, add_edge_err_rsn/0,
+ d_protection/0, d_cyclicity/0]).
+
+-opaque edge() :: term().
+-opaque label() :: term().
+-opaque vertex() :: term().
+
+-opaque add_edge_err_rsn() :: {'bad_edge', Path :: [vertex()]}
+ | {'bad_vertex', V :: vertex()}.
+
+%%
+%% Type is a list of
+%% protected | private
+%% acyclic | cyclic
+%%
+%% default is [cyclic,protected]
+%%
+-opaque d_protection() :: 'private' | 'protected'.
+-opaque d_cyclicity() :: 'acyclic' | 'cyclic'.
+-opaque d_type() :: d_cyclicity() | d_protection().
+
+-spec new() -> local_digraph().
+
+new() -> new([]).
+
+-spec new(Type) -> local_digraph() when
+ Type :: [d_type()].
+
+new(Type) ->
+ case check_type(Type, protected, []) of
+ {Access, Ts} ->
+ V = ets:new(vertices, [set, Access]),
+ E = ets:new(edges, [set, Access]),
+ N = ets:new(neighbours, [bag, Access]),
+ ets:insert(N, [{'$vid', 0}, {'$eid', 0}]),
+ set_type(Ts, #digraph{vtab=V, etab=E, ntab=N});
+ error ->
+ erlang:error(badarg)
+ end.
+
+%%
+%% Check type of graph
+%%
+%-spec check_type([d_type()], d_protection(), [{'cyclic', boolean()}]) ->
+% {d_protection(), [{'cyclic', boolean()}]}.
+
+check_type([acyclic|Ts], A, L) ->
+ check_type(Ts, A,[{cyclic,false} | L]);
+check_type([cyclic | Ts], A, L) ->
+ check_type(Ts, A, [{cyclic,true} | L]);
+check_type([protected | Ts], _, L) ->
+ check_type(Ts, protected, L);
+check_type([private | Ts], _, L) ->
+ check_type(Ts, private, L);
+check_type([], A, L) -> {A, L};
+check_type(_, _, _) -> error.
+
+%%
+%% Set graph type
+%%
+-spec set_type([{'cyclic', boolean()}], local_digraph()) -> local_digraph().
+
+set_type([{cyclic,V} | Ks], G) ->
+ set_type(Ks, G#digraph{cyclic = V});
+set_type([], G) -> G.
+
+
+%% Data access functions
+
+-spec delete(G) -> 'true' when
+ G :: local_digraph().
+
+delete(G) ->
+ ets:delete(G#digraph.vtab),
+ ets:delete(G#digraph.etab),
+ ets:delete(G#digraph.ntab).
+
+-spec info(G) -> InfoList when
+ G :: local_digraph(),
+ InfoList :: [{'cyclicity', Cyclicity :: d_cyclicity()} |
+ {'memory', NoWords :: non_neg_integer()} |
+ {'protection', Protection :: d_protection()}].
+
+info(G) ->
+ VT = G#digraph.vtab,
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ Cyclicity = case G#digraph.cyclic of
+ true -> cyclic;
+ false -> acyclic
+ end,
+ Protection = ets:info(VT, protection),
+ Memory = ets:info(VT, memory) + ets:info(ET, memory) + ets:info(NT, memory),
+ [{cyclicity, Cyclicity}, {memory, Memory}, {protection, Protection}].
+
+-spec add_vertex(G) -> vertex() when
+ G :: local_digraph().
+
+add_vertex(G) ->
+ do_add_vertex({new_vertex_id(G), []}, G).
+
+-spec add_vertex(G, V) -> vertex() when
+ G :: local_digraph(),
+ V :: vertex().
+
+add_vertex(G, V) ->
+ do_add_vertex({V, []}, G).
+
+-spec add_vertex(G, V, Label) -> vertex() when
+ G :: local_digraph(),
+ V :: vertex(),
+ Label :: label().
+
+add_vertex(G, V, D) ->
+ do_add_vertex({V, D}, G).
+
+-spec del_vertex(G, V) -> 'true' when
+ G :: local_digraph(),
+ V :: vertex().
+
+del_vertex(G, V) ->
+ do_del_vertex(V, G).
+
+-spec del_vertices(G, Vertices) -> 'true' when
+ G :: local_digraph(),
+ Vertices :: [vertex()].
+
+del_vertices(G, Vs) ->
+ do_del_vertices(Vs, G).
+
+-spec vertex(G, V) -> {V, Label} | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Label :: label().
+
+vertex(G, V) ->
+ case ets:lookup(G#digraph.vtab, V) of
+ [] -> false;
+ [Vertex] -> Vertex
+ end.
+
+-spec no_vertices(G) -> non_neg_integer() when
+ G :: local_digraph().
+
+no_vertices(G) ->
+ ets:info(G#digraph.vtab, size).
+
+-spec vertices(G) -> Vertices when
+ G :: local_digraph(),
+ Vertices :: [vertex()].
+
+vertices(G) ->
+ ets:select(G#digraph.vtab, [{{'$1', '_'}, [], ['$1']}]).
+
+-spec source_vertices(local_digraph()) -> [vertex()].
+
+source_vertices(G) ->
+ collect_vertices(G, in).
+
+-spec sink_vertices(local_digraph()) -> [vertex()].
+
+sink_vertices(G) ->
+ collect_vertices(G, out).
+
+-spec in_degree(G, V) -> non_neg_integer() when
+ G :: local_digraph(),
+ V :: vertex().
+
+in_degree(G, V) ->
+ length(ets:lookup(G#digraph.ntab, {in, V})).
+
+-spec in_neighbours(G, V) -> Vertex when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertex :: [vertex()].
+
+in_neighbours(G, V) ->
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ collect_elems(ets:lookup(NT, {in, V}), ET, 2).
+
+-spec in_edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+in_edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{in, V}, '$1'}, [], ['$1']}]).
+
+-spec out_degree(G, V) -> non_neg_integer() when
+ G :: local_digraph(),
+ V :: vertex().
+
+out_degree(G, V) ->
+ length(ets:lookup(G#digraph.ntab, {out, V})).
+
+-spec out_neighbours(G, V) -> Vertices when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex()].
+
+out_neighbours(G, V) ->
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ collect_elems(ets:lookup(NT, {out, V}), ET, 3).
+
+-spec out_edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+out_edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{out, V}, '$1'}, [], ['$1']}]).
+
+-spec add_edge(G, V1, V2) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex().
+
+add_edge(G, V1, V2) ->
+ do_add_edge({new_edge_id(G), V1, V2, []}, G).
+
+-spec add_edge(G, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+add_edge(G, V1, V2, D) ->
+ do_add_edge({new_edge_id(G), V1, V2, D}, G).
+
+-spec add_edge(G, E, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ E :: edge(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+add_edge(G, E, V1, V2, D) ->
+ do_add_edge({E, V1, V2, D}, G).
+
+-spec del_edge(G, E) -> 'true' when
+ G :: local_digraph(),
+ E :: edge().
+
+del_edge(G, E) ->
+ do_del_edges([E], G).
+
+-spec del_edges(G, Edges) -> 'true' when
+ G :: local_digraph(),
+ Edges :: [edge()].
+
+del_edges(G, Es) ->
+ do_del_edges(Es, G).
+
+-spec no_edges(G) -> non_neg_integer() when
+ G :: local_digraph().
+
+no_edges(G) ->
+ ets:info(G#digraph.etab, size).
+
+-spec edges(G) -> Edges when
+ G :: local_digraph(),
+ Edges :: [edge()].
+
+edges(G) ->
+ ets:select(G#digraph.etab, [{{'$1', '_', '_', '_'}, [], ['$1']}]).
+
+-spec edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{out, V},'$1'}, [], ['$1']},
+ {{{in, V}, '$1'}, [], ['$1']}]).
+
+-spec edge(G, E) -> {E, V1, V2, Label} | 'false' when
+ G :: local_digraph(),
+ E :: edge(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+edge(G, E) ->
+ case ets:lookup(G#digraph.etab,E) of
+ [] -> false;
+ [Edge] -> Edge
+ end.
+
+%%
+%% Generate a "unique" edge identifier (relative to this graph)
+%%
+-spec new_edge_id(local_digraph()) -> edge().
+
+new_edge_id(G) ->
+ NT = G#digraph.ntab,
+ [{'$eid', K}] = ets:lookup(NT, '$eid'),
+ true = ets:delete(NT, '$eid'),
+ true = ets:insert(NT, {'$eid', K+1}),
+ ['$e' | K].
+
+%%
+%% Generate a "unique" vertex identifier (relative to this graph)
+%%
+-spec new_vertex_id(local_digraph()) -> vertex().
+
+new_vertex_id(G) ->
+ NT = G#digraph.ntab,
+ [{'$vid', K}] = ets:lookup(NT, '$vid'),
+ true = ets:delete(NT, '$vid'),
+ true = ets:insert(NT, {'$vid', K+1}),
+ ['$v' | K].
+
+%%
+%% Collect elements for a index in a tuple
+%%
+collect_elems(Keys, Table, Index) ->
+ collect_elems(Keys, Table, Index, []).
+
+collect_elems([{_,Key}|Keys], Table, Index, Acc) ->
+ collect_elems(Keys, Table, Index,
+ [ets:lookup_element(Table, Key, Index)|Acc]);
+collect_elems([], _, _, Acc) -> Acc.
+
+-spec do_add_vertex({vertex(), label()}, local_digraph()) -> vertex().
+
+do_add_vertex({V, _Label} = VL, G) ->
+ ets:insert(G#digraph.vtab, VL),
+ V.
+
+%%
+%% Collect either source or sink vertices.
+%%
+collect_vertices(G, Type) ->
+ Vs = vertices(G),
+ lists:foldl(fun(V, A) ->
+ case ets:member(G#digraph.ntab, {Type, V}) of
+ true -> A;
+ false -> [V|A]
+ end
+ end, [], Vs).
+
+%%
+%% Delete vertices
+%%
+do_del_vertices([V | Vs], G) ->
+ do_del_vertex(V, G),
+ do_del_vertices(Vs, G);
+do_del_vertices([], #digraph{}) -> true.
+
+do_del_vertex(V, G) ->
+ do_del_nedges(ets:lookup(G#digraph.ntab, {in, V}), G),
+ do_del_nedges(ets:lookup(G#digraph.ntab, {out, V}), G),
+ ets:delete(G#digraph.vtab, V).
+
+do_del_nedges([{_, E}|Ns], G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E, V1, V2, _}] ->
+ do_del_edge(E, V1, V2, G),
+ do_del_nedges(Ns, G);
+ [] -> % cannot happen
+ do_del_nedges(Ns, G)
+ end;
+do_del_nedges([], #digraph{}) -> true.
+
+%%
+%% Delete edges
+%%
+do_del_edges([E|Es], G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E,V1,V2,_}] ->
+ do_del_edge(E,V1,V2,G),
+ do_del_edges(Es, G);
+ [] ->
+ do_del_edges(Es, G)
+ end;
+do_del_edges([], #digraph{}) -> true.
+
+do_del_edge(E, V1, V2, G) ->
+ ets:select_delete(G#digraph.ntab, [{{{in, V2}, E}, [], [true]},
+ {{{out,V1}, E}, [], [true]}]),
+ ets:delete(G#digraph.etab, E).
+
+-spec rm_edges([vertex(),...], local_digraph()) -> 'true'.
+
+rm_edges([V1, V2|Vs], G) ->
+ rm_edge(V1, V2, G),
+ rm_edges([V2|Vs], G);
+rm_edges(_, _) -> true.
+
+-spec rm_edge(vertex(), vertex(), local_digraph()) -> 'ok'.
+
+rm_edge(V1, V2, G) ->
+ Es = out_edges(G, V1),
+ rm_edge_0(Es, V1, V2, G).
+
+rm_edge_0([E|Es], V1, V2, G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E, V1, V2, _}] ->
+ do_del_edge(E, V1, V2, G),
+ rm_edge_0(Es, V1, V2, G);
+ _ ->
+ rm_edge_0(Es, V1, V2, G)
+ end;
+rm_edge_0([], _, _, #digraph{}) -> ok.
+
+%%
+%% Check that endpoints exist
+%%
+-spec do_add_edge({edge(), vertex(), vertex(), label()}, local_digraph()) ->
+ edge() | {'error', add_edge_err_rsn()}.
+
+do_add_edge({E, V1, V2, Label}, G) ->
+ case ets:member(G#digraph.vtab, V1) of
+ false -> {error, {bad_vertex, V1}};
+ true ->
+ case ets:member(G#digraph.vtab, V2) of
+ false -> {error, {bad_vertex, V2}};
+ true ->
+ case other_edge_exists(G, E, V1, V2) of
+ true -> {error, {bad_edge, [V1, V2]}};
+ false when G#digraph.cyclic =:= false ->
+ acyclic_add_edge(E, V1, V2, Label, G);
+ false ->
+ do_insert_edge(E, V1, V2, Label, G)
+ end
+ end
+ end.
+
+other_edge_exists(#digraph{etab = ET}, E, V1, V2) ->
+ case ets:lookup(ET, E) of
+ [{E, Vert1, Vert2, _}] when Vert1 =/= V1; Vert2 =/= V2 ->
+ true;
+ _ ->
+ false
+ end.
+
+-spec do_insert_edge(edge(), vertex(), vertex(), label(), local_digraph()) -> edge().
+
+do_insert_edge(E, V1, V2, Label, #digraph{ntab=NT, etab=ET}) ->
+ ets:insert(NT, [{{out, V1}, E}, {{in, V2}, E}]),
+ ets:insert(ET, {E, V1, V2, Label}),
+ E.
+
+-spec acyclic_add_edge(edge(), vertex(), vertex(), label(), local_digraph()) ->
+ edge() | {'error', {'bad_edge', [vertex()]}}.
+
+acyclic_add_edge(_E, V1, V2, _L, _G) when V1 =:= V2 ->
+ {error, {bad_edge, [V1, V2]}};
+acyclic_add_edge(E, V1, V2, Label, G) ->
+ case get_path(G, V2, V1) of
+ false -> do_insert_edge(E, V1, V2, Label, G);
+ Path -> {error, {bad_edge, Path}}
+ end.
+
+%%
+%% Delete all paths from vertex V1 to vertex V2
+%%
+
+-spec del_path(G, V1, V2) -> 'true' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex().
+
+del_path(G, V1, V2) ->
+ case get_path(G, V1, V2) of
+ false -> true;
+ Path ->
+ rm_edges(Path, G),
+ del_path(G, V1, V2)
+ end.
+
+%%
+%% Find a cycle through V
+%% return the cycle as list of vertices [V ... V]
+%% if no cycle exists false is returned
+%% if only a cycle of length one exists it will be
+%% returned as [V] but only after longer cycles have
+%% been searched.
+%%
+
+-spec get_cycle(G, V) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_cycle(G, V) ->
+ case one_path(out_neighbours(G, V), V, [], [V], [V], 2, G, 1) of
+ false ->
+ case lists:member(V, out_neighbours(G, V)) of
+ true -> [V];
+ false -> false
+ end;
+ Vs -> Vs
+ end.
+
+%%
+%% Find a path from V1 to V2
+%% return the path as list of vertices [V1 ... V2]
+%% if no path exists false is returned
+%%
+
+-spec get_path(G, V1, V2) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_path(G, V1, V2) ->
+ one_path(out_neighbours(G, V1), V2, [], [V1], [V1], 1, G, 1).
+
+%%
+%% prune_short_path (evaluate conditions on path)
+%% short : if path is too short
+%% ok : if path is ok
+%%
+prune_short_path(Counter, Min) when Counter < Min ->
+ short;
+prune_short_path(_Counter, _Min) ->
+ ok.
+
+one_path([W|Ws], W, Cont, Xs, Ps, Prune, G, Counter) ->
+ case prune_short_path(Counter, Prune) of
+ short -> one_path(Ws, W, Cont, Xs, Ps, Prune, G, Counter);
+ ok -> lists:reverse([W|Ps])
+ end;
+one_path([V|Vs], W, Cont, Xs, Ps, Prune, G, Counter) ->
+ case lists:member(V, Xs) of
+ true -> one_path(Vs, W, Cont, Xs, Ps, Prune, G, Counter);
+ false -> one_path(out_neighbours(G, V), W,
+ [{Vs,Ps} | Cont], [V|Xs], [V|Ps],
+ Prune, G, Counter+1)
+ end;
+one_path([], W, [{Vs,Ps}|Cont], Xs, _, Prune, G, Counter) ->
+ one_path(Vs, W, Cont, Xs, Ps, Prune, G, Counter-1);
+one_path([], _, [], _, _, _, _, _Counter) -> false.
+
+%%
+%% Like get_cycle/2, but a cycle of length one is preferred.
+%%
+
+-spec get_short_cycle(G, V) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_short_cycle(G, V) ->
+ get_short_path(G, V, V).
+
+%%
+%% Like get_path/3, but using a breadth-first search makes it possible
+%% to find a short path.
+%%
+
+-spec get_short_path(G, V1, V2) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_short_path(G, V1, V2) ->
+ T = new(),
+ add_vertex(T, V1),
+ Q = queue:new(),
+ Q1 = queue_out_neighbours(V1, G, Q),
+ L = spath(Q1, G, V2, T),
+ delete(T),
+ L.
+
+spath(Q, G, Sink, T) ->
+ case queue:out(Q) of
+ {{value, E}, Q1} ->
+ {_E, V1, V2, _Label} = edge(G, E),
+ if
+ Sink =:= V2 ->
+ follow_path(V1, T, [V2]);
+ true ->
+ case vertex(T, V2) of
+ false ->
+ add_vertex(T, V2),
+ add_edge(T, V2, V1),
+ NQ = queue_out_neighbours(V2, G, Q1),
+ spath(NQ, G, Sink, T);
+ _V ->
+ spath(Q1, G, Sink, T)
+ end
+ end;
+ {empty, _Q1} ->
+ false
+ end.
+
+follow_path(V, T, P) ->
+ P1 = [V | P],
+ case out_neighbours(T, V) of
+ [N] ->
+ follow_path(N, T, P1);
+ [] ->
+ P1
+ end.
+
+queue_out_neighbours(V, G, Q0) ->
+ lists:foldl(fun(E, Q) -> queue:in(E, Q) end, Q0, out_edges(G, V)).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl
new file mode 100644
index 0000000000..24d0793a7c
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl
@@ -0,0 +1,1300 @@
+%%
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+
+%%% The Erlang scanner. All types are opaque, which puts some stress
+%%% on Dialyzer.
+
+-module(opaque_erl_scan).
+
+%%% External exports
+
+-export([string/1,string/2,string/3,tokens/3,tokens/4,
+ format_error/1,reserved_word/1,
+ token_info/1,token_info/2,
+ attributes_info/1,attributes_info/2,set_attribute/3]).
+
+%%% Private
+-export([continuation_location/1]).
+
+-export_type([error_info/0,
+ line/0,
+ location/0,
+ options/0,
+ return_cont/0,
+ token/0,
+ tokens_result/0]).
+
+%%%
+%%% Defines and type definitions
+%%%
+
+-define(COLUMN(C), (is_integer(C) andalso C >= 1)).
+%% Line numbers less than zero have always been allowed:
+-define(ALINE(L), is_integer(L)).
+-define(STRING(S), is_list(S)).
+-define(RESWORDFUN(F), is_function(F, 1)).
+-define(SETATTRFUN(F), is_function(F, 1)).
+
+-export_type([category/0, column/0, resword_fun/0, option/0, symbol/0,
+ info_line/0, attributes_data/0, attributes/0, tokens/0,
+ error_description/0, char_spec/0, cont_fun/0,
+ attribute_item/0, info_location/0, attribute_info/0,
+ token_item/0, token_info/0]).
+
+-opaque category() :: atom().
+-opaque column() :: pos_integer().
+-opaque line() :: integer().
+-opaque location() :: line() | {line(),column()}.
+-opaque resword_fun() :: fun((atom()) -> boolean()).
+-opaque option() :: 'return' | 'return_white_spaces' | 'return_comments'
+ | 'text' | {'reserved_word_fun', resword_fun()}.
+-opaque options() :: option() | [option()].
+-opaque symbol() :: atom() | float() | integer() | string().
+-opaque info_line() :: integer() | term().
+-opaque attributes_data()
+ :: [{'column', column()} | {'line', info_line()} | {'text', string()}]
+ | {line(), column()}.
+%% The fact that {line(),column()} is a possible attributes() type
+%% is hidden.
+-opaque attributes() :: line() | attributes_data().
+-opaque token() :: {category(), attributes(), symbol()}
+ | {category(), attributes()}.
+-opaque tokens() :: [token()].
+-opaque error_description() :: term().
+-opaque error_info() :: {location(), module(), error_description()}.
+
+%%% Local record.
+-record(erl_scan,
+ {resword_fun = fun reserved_word/1 :: resword_fun(),
+ ws = false :: boolean(),
+ comment = false :: boolean(),
+ text = false :: boolean()}).
+
+%%----------------------------------------------------------------------------
+
+-spec format_error(ErrorDescriptor) -> string() when
+ ErrorDescriptor :: error_description().
+format_error({string,Quote,Head}) ->
+ lists:flatten(["unterminated " ++ string_thing(Quote) ++
+ " starting with " ++
+ io_lib:write_string(Head, Quote)]);
+format_error({illegal,Type}) ->
+ lists:flatten(io_lib:fwrite("illegal ~w", [Type]));
+format_error(char) -> "unterminated character";
+format_error({base,Base}) ->
+ lists:flatten(io_lib:fwrite("illegal base '~w'", [Base]));
+format_error(Other) ->
+ lists:flatten(io_lib:write(Other)).
+
+-spec string(String) -> Return when
+ String :: string(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String) ->
+ string(String, 1, []).
+
+-spec string(String, StartLocation) -> Return when
+ String :: string(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ StartLocation :: location(),
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String, StartLocation) ->
+ string(String, StartLocation, []).
+
+-spec string(String, StartLocation, Options) -> Return when
+ String :: string(),
+ Options :: options(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ StartLocation :: location(),
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String, Line, Options) when ?STRING(String), ?ALINE(Line) ->
+ string1(String, options(Options), Line, no_col, []);
+string(String, {Line,Column}, Options) when ?STRING(String),
+ ?ALINE(Line),
+ ?COLUMN(Column) ->
+ string1(String, options(Options), Line, Column, []).
+
+-opaque char_spec() :: string() | 'eof'.
+-opaque cont_fun() :: fun((char_spec(), #erl_scan{}, line(), column(),
+ tokens(), any()) -> any()).
+-opaque return_cont() :: {erl_scan_continuation,
+ string(), column(), tokens(), line(),
+ #erl_scan{}, any(), cont_fun()}.
+-opaque tokens_result() :: {'ok', Tokens :: tokens(), EndLocation :: location()}
+ | {'eof', EndLocation :: location()}
+ | {'error', ErrorInfo :: error_info(),
+ EndLocation :: location()}.
+
+-spec tokens(Continuation, CharSpec, StartLocation) -> Return when
+ Continuation :: return_cont() | [],
+ CharSpec :: char_spec(),
+ StartLocation :: location(),
+ Return :: {'done',Result :: tokens_result(),LeftOverChars :: char_spec()}
+ | {'more', Continuation1 :: return_cont()}.
+tokens(Cont, CharSpec, StartLocation) ->
+ tokens(Cont, CharSpec, StartLocation, []).
+
+-spec tokens(Continuation, CharSpec, StartLocation, Options) -> Return when
+ Continuation :: return_cont() | [],
+ CharSpec :: char_spec(),
+ StartLocation :: location(),
+ Options :: options(),
+ Return :: {'done',Result :: tokens_result(),LeftOverChars :: char_spec()}
+ | {'more', Continuation1 :: return_cont()}.
+tokens([], CharSpec, Line, Options) when ?ALINE(Line) ->
+ tokens1(CharSpec, options(Options), Line, no_col, [], fun scan/6, []);
+tokens([], CharSpec, {Line,Column}, Options) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ tokens1(CharSpec, options(Options), Line, Column, [], fun scan/6, []);
+tokens({erl_scan_continuation,Cs,Col,Toks,Line,St,Any,Fun},
+ CharSpec, _Loc, _Opts) ->
+ tokens1(Cs++CharSpec, St, Line, Col, Toks, Fun, Any).
+
+continuation_location({erl_scan_continuation,_,no_col,_,Line,_,_,_}) ->
+ Line;
+continuation_location({erl_scan_continuation,_,Col,_,Line,_,_,_}) ->
+ {Line,Col}.
+
+-opaque attribute_item() :: 'column' | 'length' | 'line'
+ | 'location' | 'text'.
+-opaque info_location() :: location() | term().
+-opaque attribute_info() :: {'column', column()}| {'length', pos_integer()}
+ | {'line', info_line()}
+ | {'location', info_location()}
+ | {'text', string()}.
+-opaque token_item() :: 'category' | 'symbol' | attribute_item().
+-opaque token_info() :: {'category', category()} | {'symbol', symbol()}
+ | attribute_info().
+
+-spec token_info(Token) -> TokenInfo when
+ Token :: token(),
+ TokenInfo :: [TokenInfoTuple :: token_info()].
+token_info(Token) ->
+ Items = [category,column,length,line,symbol,text], % undefined order
+ token_info(Token, Items).
+
+-spec token_info(Token, TokenItem) -> TokenInfoTuple | 'undefined' when
+ Token :: token(),
+ TokenItem :: token_item(),
+ TokenInfoTuple :: token_info();
+ (Token, TokenItems) -> TokenInfo when
+ Token :: token(),
+ TokenItems :: [TokenItem :: token_item()],
+ TokenInfo :: [TokenInfoTuple :: token_info()].
+token_info(_Token, []) ->
+ [];
+token_info(Token, [Item|Items]) when is_atom(Item) ->
+ case token_info(Token, Item) of
+ undefined ->
+ token_info(Token, Items);
+ TokenInfo when is_tuple(TokenInfo) ->
+ [TokenInfo|token_info(Token, Items)]
+ end;
+token_info({Category,_Attrs}, category=Item) ->
+ {Item,Category};
+token_info({Category,_Attrs,_Symbol}, category=Item) ->
+ {Item,Category};
+token_info({Category,_Attrs}, symbol=Item) ->
+ {Item,Category};
+token_info({_Category,_Attrs,Symbol}, symbol=Item) ->
+ {Item,Symbol};
+token_info({_Category,Attrs}, Item) ->
+ attributes_info(Attrs, Item);
+token_info({_Category,Attrs,_Symbol}, Item) ->
+ attributes_info(Attrs, Item).
+
+-spec attributes_info(Attributes) -> AttributesInfo when
+ Attributes :: attributes(),
+ AttributesInfo :: [AttributeInfoTuple :: attribute_info()].
+attributes_info(Attributes) ->
+ Items = [column,length,line,text], % undefined order
+ attributes_info(Attributes, Items).
+
+-spec attributes_info
+ (Attributes, AttributeItem) -> AttributeInfoTuple | 'undefined' when
+ Attributes :: attributes(),
+ AttributeItem :: attribute_item(),
+ AttributeInfoTuple :: attribute_info();
+ (Attributes, AttributeItems) -> AttributeInfo when
+ Attributes :: attributes(),
+ AttributeItems :: [AttributeItem :: attribute_item()],
+ AttributeInfo :: [AttributeInfoTuple :: attribute_info()].
+attributes_info(_Attrs, []) ->
+ [];
+attributes_info(Attrs, [A|As]) when is_atom(A) ->
+ case attributes_info(Attrs, A) of
+ undefined ->
+ attributes_info(Attrs, As);
+ AttributeInfo when is_tuple(AttributeInfo) ->
+ [AttributeInfo|attributes_info(Attrs, As)]
+ end;
+attributes_info({Line,Column}, column=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Column};
+attributes_info(Line, column) when ?ALINE(Line) ->
+ undefined;
+attributes_info(Attrs, column=Item) ->
+ attr_info(Attrs, Item);
+attributes_info(Attrs, length=Item) ->
+ case attributes_info(Attrs, text) of
+ undefined ->
+ undefined;
+ {text,Text} ->
+ {Item,length(Text)}
+ end;
+attributes_info(Line, line=Item) when ?ALINE(Line) ->
+ {Item,Line};
+attributes_info({Line,Column}, line=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Line};
+attributes_info(Attrs, line=Item) ->
+ attr_info(Attrs, Item);
+attributes_info({Line,Column}=Location, location=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Location};
+attributes_info(Line, location=Item) when ?ALINE(Line) ->
+ {Item,Line};
+attributes_info(Attrs, location=Item) ->
+ {line,Line} = attributes_info(Attrs, line), % assume line is present
+ case attributes_info(Attrs, column) of
+ undefined ->
+ %% If set_attribute() has assigned a term such as {17,42}
+ %% to 'line', then Line will look like {Line,Column}. One
+ %% should not use 'location' but 'line' and 'column' in
+ %% such special cases.
+ {Item,Line};
+ {column,Column} ->
+ {Item,{Line,Column}}
+ end;
+attributes_info({Line,Column}, text) when ?ALINE(Line), ?COLUMN(Column) ->
+ undefined;
+attributes_info(Line, text) when ?ALINE(Line) ->
+ undefined;
+attributes_info(Attrs, text=Item) ->
+ attr_info(Attrs, Item);
+attributes_info(T1, T2) ->
+ erlang:error(badarg, [T1,T2]).
+
+-spec set_attribute(AttributeItem, Attributes, SetAttributeFun) -> Attributes when
+ AttributeItem :: 'line',
+ Attributes :: attributes(),
+ SetAttributeFun :: fun((info_line()) -> info_line()).
+set_attribute(Tag, Attributes, Fun) when ?SETATTRFUN(Fun) ->
+ set_attr(Tag, Attributes, Fun).
+
+%%%
+%%% Local functions
+%%%
+
+string_thing($') -> "atom"; %' Stupid Emacs
+string_thing(_) -> "string".
+
+-define(WHITE_SPACE(C),
+ is_integer(C) andalso
+ (C >= $\000 andalso C =< $\s orelse C >= $\200 andalso C =< $\240)).
+-define(DIGIT(C), C >= $0, C =< $9).
+-define(CHAR(C), is_integer(C), C >= 0).
+-define(UNICODE(C),
+ is_integer(C) andalso
+ (C >= 0 andalso C < 16#D800 orelse
+ C > 16#DFFF andalso C < 16#FFFE orelse
+ C > 16#FFFF andalso C =< 16#10FFFF)).
+
+-define(UNI255(C), C >= 0, C =< 16#ff).
+
+options(Opts0) when is_list(Opts0) ->
+ Opts = lists:foldr(fun expand_opt/2, [], Opts0),
+ [RW_fun] =
+ case opts(Opts, [reserved_word_fun], []) of
+ badarg ->
+ erlang:error(badarg, [Opts0]);
+ R ->
+ R
+ end,
+ Comment = proplists:get_bool(return_comments, Opts),
+ WS = proplists:get_bool(return_white_spaces, Opts),
+ Txt = proplists:get_bool(text, Opts),
+ #erl_scan{resword_fun = RW_fun,
+ comment = Comment,
+ ws = WS,
+ text = Txt};
+options(Opt) ->
+ options([Opt]).
+
+opts(Options, [Key|Keys], L) ->
+ V = case lists:keyfind(Key, 1, Options) of
+ {reserved_word_fun,F} when ?RESWORDFUN(F) ->
+ {ok,F};
+ {Key,_} ->
+ badarg;
+ false ->
+ {ok,default_option(Key)}
+ end,
+ case V of
+ badarg ->
+ badarg;
+ {ok,Value} ->
+ opts(Options, Keys, [Value|L])
+ end;
+opts(_Options, [], L) ->
+ lists:reverse(L).
+
+default_option(reserved_word_fun) ->
+ fun reserved_word/1.
+
+expand_opt(return, Os) ->
+ [return_comments,return_white_spaces|Os];
+expand_opt(O, Os) ->
+ [O|Os].
+
+attr_info(Attrs, Item) ->
+ try lists:keyfind(Item, 1, Attrs) of
+ {_Item, _Value} = T ->
+ T;
+ false ->
+ undefined
+ catch
+ _:_ ->
+ erlang:error(badarg, [Attrs, Item])
+ end.
+
+-spec set_attr('line', attributes(), fun((line()) -> line())) -> attributes().
+
+set_attr(line, Line, Fun) when ?ALINE(Line) ->
+ Ln = Fun(Line),
+ if
+ ?ALINE(Ln) ->
+ Ln;
+ true ->
+ [{line,Ln}]
+ end;
+set_attr(line, {Line,Column}, Fun) when ?ALINE(Line), ?COLUMN(Column) ->
+ Ln = Fun(Line),
+ if
+ ?ALINE(Ln) ->
+ {Ln,Column};
+ true ->
+ [{line,Ln},{column,Column}]
+ end;
+set_attr(line=Tag, Attrs, Fun) when is_list(Attrs) ->
+ {line,Line} = lists:keyfind(Tag, 1, Attrs),
+ case lists:keyreplace(Tag, 1, Attrs, {line,Fun(Line)}) of
+ [{line,Ln}] when ?ALINE(Ln) ->
+ Ln;
+ As ->
+ As
+ end;
+set_attr(T1, T2, T3) ->
+ erlang:error(badarg, [T1,T2,T3]).
+
+tokens1(Cs, St, Line, Col, Toks, Fun, Any) when ?STRING(Cs); Cs =:= eof ->
+ case Fun(Cs, St, Line, Col, Toks, Any) of
+ {more,{Cs0,Ncol,Ntoks,Nline,Nany,Nfun}} ->
+ {more,{erl_scan_continuation,Cs0,Ncol,Ntoks,Nline,St,Nany,Nfun}};
+ {ok,Toks0,eof,Nline,Ncol} ->
+ Res = case Toks0 of
+ [] ->
+ {eof,location(Nline, Ncol)};
+ _ ->
+ {ok,lists:reverse(Toks0),location(Nline,Ncol)}
+ end,
+ {done,Res,eof};
+ {ok,Toks0,Rest,Nline,Ncol} ->
+ {done,{ok,lists:reverse(Toks0),location(Nline, Ncol)},Rest};
+ {{error,_,_}=Error,Rest} ->
+ {done,Error,Rest}
+ end.
+
+string1(Cs, St, Line, Col, Toks) ->
+ case scan1(Cs, St, Line, Col, Toks) of
+ {more,{Cs0,Ncol,Ntoks,Nline,Any,Fun}} ->
+ case Fun(Cs0++eof, St, Nline, Ncol, Ntoks, Any) of
+ {ok,Toks1,_Rest,Line2,Col2} ->
+ {ok,lists:reverse(Toks1),location(Line2, Col2)};
+ {{error,_,_}=Error,_Rest} ->
+ Error
+ end;
+ {ok,Ntoks,[_|_]=Rest,Nline,Ncol} ->
+ string1(Rest, St, Nline, Ncol, Ntoks);
+ {ok,Ntoks,_,Nline,Ncol} ->
+ {ok,lists:reverse(Ntoks),location(Nline, Ncol)};
+ {{error,_,_}=Error,_Rest} ->
+ Error
+ end.
+
+scan(Cs, St, Line, Col, Toks, _) ->
+ scan1(Cs, St, Line, Col, Toks).
+
+scan1([$\s|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_spcs(Cs, St, Line, Col, Toks, 1);
+scan1([$\s|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1);
+scan1([$\n|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_newline(Cs, St, Line, Col, Toks);
+scan1([$\n|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line+1, new_column(Col, 1), Toks, 0);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $A, C =< $Z ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $a, C =< $z ->
+ scan_atom(Cs, St, Line, Col, Toks, [C]);
+%% Optimization: some very common punctuation characters:
+scan1([$,|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ",", ',', 1);
+scan1([$(|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "(", '(', 1);
+scan1([$)|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ")", ')', 1);
+scan1([${|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "{", '{', 1);
+scan1([$}|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "}", '}', 1);
+scan1([$[|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "[", '[', 1);
+scan1([$]|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "]", ']', 1);
+scan1([$;|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ";", ';', 1);
+scan1([$_=C|Cs], St, Line, Col, Toks) ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+%% More punctuation characters below.
+scan1([$\%|Cs], St, Line, Col, Toks) when not St#erl_scan.comment ->
+ skip_comment(Cs, St, Line, Col, Toks, 1);
+scan1([$\%=C|Cs], St, Line, Col, Toks) ->
+ scan_comment(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when ?DIGIT(C) ->
+ scan_number(Cs, St, Line, Col, Toks, [C]);
+scan1("..."++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "...", '...', 3);
+scan1(".."=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1(".."++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "..", '..', 2);
+scan1("."=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1([$.=C|Cs], St, Line, Col, Toks) ->
+ scan_dot(Cs, St, Line, Col, Toks, [C]);
+scan1([$"|Cs], St, Line, Col, Toks) -> %" Emacs
+ State0 = {[],[],Line,Col},
+ scan_string(Cs, St, Line, incr_column(Col, 1), Toks, State0);
+scan1([$'|Cs], St, Line, Col, Toks) -> %' Emacs
+ State0 = {[],[],Line,Col},
+ scan_qatom(Cs, St, Line, incr_column(Col, 1), Toks, State0);
+scan1([$$|Cs], St, Line, Col, Toks) ->
+ scan_char(Cs, St, Line, Col, Toks);
+scan1([$\r|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ white_space_end(Cs, St, Line, Col, Toks, 1, "\r");
+scan1([C|Cs], St, Line, Col, Toks) when C >= $ß, C =< $ÿ, C =/= $÷ ->
+ scan_atom(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $À, C =< $Þ, C /= $× ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+scan1([$\t|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_tabs(Cs, St, Line, Col, Toks, 1);
+scan1([$\t|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1);
+scan1([C|Cs], St, Line, Col, Toks) when ?WHITE_SPACE(C) ->
+ case St#erl_scan.ws of
+ true ->
+ scan_white_space(Cs, St, Line, Col, Toks, [C]);
+ false ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1)
+ end;
+%% Punctuation characters and operators, first recognise multiples.
+%% << <- <=
+scan1("<<"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<<", '<<', 2);
+scan1("<-"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<-", '<-', 2);
+scan1("<="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<=", '<=', 2);
+scan1("<"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% >> >=
+scan1(">>"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">>", '>>', 2);
+scan1(">="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">=", '>=', 2);
+scan1(">"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% -> --
+scan1("->"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "->", '->', 2);
+scan1("--"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "--", '--', 2);
+scan1("-"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% ++
+scan1("++"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "++", '++', 2);
+scan1("+"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% =:= =/= =< ==
+scan1("=:="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=:=", '=:=', 3);
+scan1("=:"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1("=/="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=/=", '=/=', 3);
+scan1("=/"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1("=<"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=<", '=<', 2);
+scan1("=="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "==", '==', 2);
+scan1("="=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% /=
+scan1("/="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "/=", '/=', 2);
+scan1("/"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% ||
+scan1("||"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "||", '||', 2);
+scan1("|"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% :-
+scan1(":-"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":-", ':-', 2);
+%% :: for typed records
+scan1("::"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "::", '::', 2);
+scan1(":"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% Optimization: punctuation characters less than 127:
+scan1([$=|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=", '=', 1);
+scan1([$:|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":", ':', 1);
+scan1([$||Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "|", '|', 1);
+scan1([$#|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "#", '#', 1);
+scan1([$/|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "/", '/', 1);
+scan1([$?|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "?", '?', 1);
+scan1([$-|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "-", '-', 1);
+scan1([$+|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "+", '+', 1);
+scan1([$*|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "*", '*', 1);
+scan1([$<|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<", '<', 1);
+scan1([$>|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">", '>', 1);
+scan1([$!|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "!", '!', 1);
+scan1([$@|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "@", '@', 1);
+scan1([$\\|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "\\", '\\', 1);
+scan1([$^|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "^", '^', 1);
+scan1([$`|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "`", '`', 1);
+scan1([$~|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "~", '~', 1);
+scan1([$&|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "&", '&', 1);
+%% End of optimization.
+scan1([C|Cs], St, Line, Col, Toks) when ?UNI255(C) ->
+ Str = [C],
+ tok2(Cs, St, Line, Col, Toks, Str, list_to_atom(Str), 1);
+scan1([C|Cs], _St, Line, Col, _Toks) when ?CHAR(C) ->
+ Ncol = incr_column(Col, 1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs);
+scan1([]=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1(eof=Cs, _St, Line, Col, Toks) ->
+ {ok,Toks,Cs,Line,Col}.
+
+scan_atom(Cs0, St, Line, Col, Toks, Ncs0) ->
+ case scan_name(Cs0, Ncs0) of
+ {more,Ncs} ->
+ {more,{[],Col,Toks,Line,Ncs,fun scan_atom/6}};
+ {Wcs,Cs} ->
+ case catch list_to_atom(Wcs) of
+ Name when is_atom(Name) ->
+ case (St#erl_scan.resword_fun)(Name) of
+ true ->
+ tok2(Cs, St, Line, Col, Toks, Wcs, Name);
+ false ->
+ tok3(Cs, St, Line, Col, Toks, atom, Wcs, Name)
+ end;
+ _Error ->
+ Ncol = incr_column(Col, length(Wcs)),
+ scan_error({illegal,atom}, Line, Col, Line, Ncol, Cs)
+ end
+ end.
+
+scan_variable(Cs0, St, Line, Col, Toks, Ncs0) ->
+ case scan_name(Cs0, Ncs0) of
+ {more,Ncs} ->
+ {more,{[],Col,Toks,Line,Ncs,fun scan_variable/6}};
+ {Wcs,Cs} ->
+ case catch list_to_atom(Wcs) of
+ Name when is_atom(Name) ->
+ tok3(Cs, St, Line, Col, Toks, var, Wcs, Name);
+ _Error ->
+ Ncol = incr_column(Col, length(Wcs)),
+ scan_error({illegal,var}, Line, Col, Line, Ncol, Cs)
+ end
+ end.
+
+scan_name([C|Cs], Ncs) when C >= $a, C =< $z ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $A, C =< $Z ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([$_=C|Cs], Ncs) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when ?DIGIT(C) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([$@=C|Cs], Ncs) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $ß, C =< $ÿ, C =/= $÷ ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $À, C =< $Þ, C =/= $× ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([], Ncs) ->
+ {more,Ncs};
+scan_name(Cs, Ncs) ->
+ {lists:reverse(Ncs),Cs}.
+
+-define(STR(St, S), if St#erl_scan.text -> S; true -> [] end).
+
+scan_dot([$%|_]=Cs, St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 1)};
+scan_dot([$\n=C|Cs], St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, Ncs++[C])),
+ {ok,[{dot,Attrs}|Toks],Cs,Line+1,new_column(Col, 1)};
+scan_dot([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, Ncs++[C])),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 2)};
+scan_dot(eof=Cs, St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 1)};
+scan_dot(Cs, St, Line, Col, Toks, Ncs) ->
+ tok2(Cs, St, Line, Col, Toks, Ncs, '.', 1).
+
+%%% White space characters are very common, so it is worthwhile to
+%%% scan them fast and store them compactly. (The words "whitespace"
+%%% and "white space" usually mean the same thing. The Erlang
+%%% specification denotes the characters with ASCII code in the
+%%% interval 0 to 32 as "white space".)
+%%%
+%%% Convention: if there is a white newline ($\n) it will always be
+%%% the first character in the text string. As a consequence, there
+%%% cannot be more than one newline in a white_space token string.
+%%%
+%%% Some common combinations are recognized, some are not. Examples
+%%% of the latter are tab(s) followed by space(s), like "\t ".
+%%% (They will be represented by two (or more) tokens.)
+%%%
+%%% Note: the character sequence "\r\n" is *not* recognized since it
+%%% would violate the property that $\n will always be the first
+%%% character. (But since "\r\n\r\n" is common, it pays off to
+%%% recognize "\n\r".)
+
+scan_newline([$\s|Cs], St, Line, Col, Toks) ->
+ scan_nl_spcs(Cs, St, Line, Col, Toks, 2);
+scan_newline([$\t|Cs], St, Line, Col, Toks) ->
+ scan_nl_tabs(Cs, St, Line, Col, Toks, 2);
+scan_newline([$\r|Cs], St, Line, Col, Toks) ->
+ newline_end(Cs, St, Line, Col, Toks, 2, "\n\r");
+scan_newline([$\f|Cs], St, Line, Col, Toks) ->
+ newline_end(Cs, St, Line, Col, Toks, 2, "\n\f");
+scan_newline([], _St, Line, Col, Toks) ->
+ {more,{[$\n],Col,Toks,Line,[],fun scan/6}};
+scan_newline(Cs, St, Line, Col, Toks) ->
+ scan_nl_white_space(Cs, St, Line, Col, Toks, "\n").
+
+scan_nl_spcs([$\s|Cs], St, Line, Col, Toks, N) when N < 17 ->
+ scan_nl_spcs(Cs, St, Line, Col, Toks, N+1);
+scan_nl_spcs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_nl_spcs/6}};
+scan_nl_spcs(Cs, St, Line, Col, Toks, N) ->
+ newline_end(Cs, St, Line, Col, Toks, N, nl_spcs(N)).
+
+scan_nl_tabs([$\t|Cs], St, Line, Col, Toks, N) when N < 11 ->
+ scan_nl_tabs(Cs, St, Line, Col, Toks, N+1);
+scan_nl_tabs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_nl_tabs/6}};
+scan_nl_tabs(Cs, St, Line, Col, Toks, N) ->
+ newline_end(Cs, St, Line, Col, Toks, N, nl_tabs(N)).
+
+%% Note: returning {more,Cont} is meaningless here; one could just as
+%% well return several tokens. But since tokens() scans up to a full
+%% stop anyway, nothing is gained by not collecting all white spaces.
+scan_nl_white_space([$\n|Cs], #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks0, Ncs) ->
+ Toks = [{white_space,Line,lists:reverse(Ncs)}|Toks0],
+ scan_newline(Cs, St, Line+1, Col, Toks);
+scan_nl_white_space([$\n|Cs], St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ Attrs = attributes(Line, Col, St, Ncs),
+ Token = {white_space,Attrs,Ncs},
+ scan_newline(Cs, St, Line+1, new_column(Col, length(Ncs)), [Token|Toks]);
+scan_nl_white_space([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ scan_nl_white_space(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_nl_white_space([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_nl_white_space/6}};
+scan_nl_white_space(Cs, #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks, Ncs) ->
+ scan1(Cs, St, Line+1, Col, [{white_space,Line,lists:reverse(Ncs)}|Toks]);
+scan_nl_white_space(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ Attrs = attributes(Line, Col, St, Ncs),
+ Token = {white_space,Attrs,Ncs},
+ scan1(Cs, St, Line+1, new_column(Col, length(Ncs)), [Token|Toks]).
+
+newline_end(Cs, #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks, _N, Ncs) ->
+ scan1(Cs, St, Line+1, Col, [{white_space,Line,Ncs}|Toks]);
+newline_end(Cs, St, Line, Col, Toks, N, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ scan1(Cs, St, Line+1, new_column(Col, N), [{white_space,Attrs,Ncs}|Toks]).
+
+scan_spcs([$\s|Cs], St, Line, Col, Toks, N) when N < 16 ->
+ scan_spcs(Cs, St, Line, Col, Toks, N+1);
+scan_spcs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_spcs/6}};
+scan_spcs(Cs, St, Line, Col, Toks, N) ->
+ white_space_end(Cs, St, Line, Col, Toks, N, spcs(N)).
+
+scan_tabs([$\t|Cs], St, Line, Col, Toks, N) when N < 10 ->
+ scan_tabs(Cs, St, Line, Col, Toks, N+1);
+scan_tabs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_tabs/6}};
+scan_tabs(Cs, St, Line, Col, Toks, N) ->
+ white_space_end(Cs, St, Line, Col, Toks, N, tabs(N)).
+
+skip_white_space([$\n|Cs], St, Line, Col, Toks, _N) ->
+ skip_white_space(Cs, St, Line+1, new_column(Col, 1), Toks, 0);
+skip_white_space([C|Cs], St, Line, Col, Toks, N) when ?WHITE_SPACE(C) ->
+ skip_white_space(Cs, St, Line, Col, Toks, N+1);
+skip_white_space([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun skip_white_space/6}};
+skip_white_space(Cs, St, Line, Col, Toks, N) ->
+ scan1(Cs, St, Line, incr_column(Col, N), Toks).
+
+%% Maybe \t and \s should break the loop.
+scan_white_space([$\n|_]=Cs, St, Line, Col, Toks, Ncs) ->
+ white_space_end(Cs, St, Line, Col, Toks, length(Ncs), lists:reverse(Ncs));
+scan_white_space([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ scan_white_space(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_white_space([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_white_space/6}};
+scan_white_space(Cs, St, Line, Col, Toks, Ncs) ->
+ white_space_end(Cs, St, Line, Col, Toks, length(Ncs), lists:reverse(Ncs)).
+
+-compile({inline,[white_space_end/7]}).
+
+white_space_end(Cs, St, Line, Col, Toks, N, Ncs) ->
+ tok3(Cs, St, Line, Col, Toks, white_space, Ncs, Ncs, N).
+
+scan_char([$\\|Cs]=Cs0, St, Line, Col, Toks) ->
+ case scan_escape(Cs, incr_column(Col, 2)) of
+ more ->
+ {more,{[$$|Cs0],Col,Toks,Line,[],fun scan/6}};
+ {error,Ncs,Error,Ncol} ->
+ scan_error(Error, Line, Col, Line, Ncol, Ncs);
+ {eof,Ncol} ->
+ scan_error(char, Line, Col, Line, Ncol, eof);
+ {nl,Val,Str,Ncs,Ncol} ->
+ Attrs = attributes(Line, Col, St, ?STR(St, "$\\"++Str)), %"
+ Ntoks = [{char,Attrs,Val}|Toks],
+ scan1(Ncs, St, Line+1, Ncol, Ntoks);
+ {Val,Str,Ncs,Ncol} ->
+ Attrs = attributes(Line, Col, St, ?STR(St, "$\\"++Str)), %"
+ Ntoks = [{char,Attrs,Val}|Toks],
+ scan1(Ncs, St, Line, Ncol, Ntoks)
+ end;
+scan_char([$\n=C|Cs], St, Line, Col, Toks) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, [$$,C])),
+ scan1(Cs, St, Line+1, new_column(Col, 1), [{char,Attrs,C}|Toks]);
+scan_char([C|Cs], St, Line, Col, Toks) when ?UNICODE(C) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, [$$,C])),
+ scan1(Cs, St, Line, incr_column(Col, 2), [{char,Attrs,C}|Toks]);
+scan_char([C|_Cs], _St, Line, Col, _Toks) when ?CHAR(C) ->
+ scan_error({illegal,character}, Line, Col, Line, incr_column(Col, 1), eof);
+scan_char([], _St, Line, Col, Toks) ->
+ {more,{[$$],Col,Toks,Line,[],fun scan/6}};
+scan_char(eof, _St, Line, Col, _Toks) ->
+ scan_error(char, Line, Col, Line, incr_column(Col, 1), eof).
+
+scan_string(Cs, St, Line, Col, Toks, {Wcs,Str,Line0,Col0}) ->
+ case scan_string0(Cs, St, Line, Col, $\", Str, Wcs) of %"
+ {more,Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ State = {Nwcs,Nstr,Line0,Col0},
+ {more,{Ncs,Ncol,Toks,Nline,State,fun scan_string/6}};
+ {char_error,Ncs,Error,Nline,Ncol,EndCol} ->
+ scan_error(Error, Nline, Ncol, Nline, EndCol, Ncs);
+ {error,Nline,Ncol,Nwcs,Ncs} ->
+ Estr = string:substr(Nwcs, 1, 16), % Expanded escape chars.
+ scan_error({string,$\",Estr}, Line0, Col0, Nline, Ncol, Ncs); %"
+ {Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ Attrs = attributes(Line0, Col0, St, Nstr),
+ scan1(Ncs, St, Nline, Ncol, [{string,Attrs,Nwcs}|Toks])
+ end.
+
+scan_qatom(Cs, St, Line, Col, Toks, {Wcs,Str,Line0,Col0}) ->
+ case scan_string0(Cs, St, Line, Col, $\', Str, Wcs) of %'
+ {more,Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ State = {Nwcs,Nstr,Line0,Col0},
+ {more,{Ncs,Ncol,Toks,Nline,State,fun scan_qatom/6}};
+ {char_error,Ncs,Error,Nline,Ncol,EndCol} ->
+ scan_error(Error, Nline, Ncol, Nline, EndCol, Ncs);
+ {error,Nline,Ncol,Nwcs,Ncs} ->
+ Estr = string:substr(Nwcs, 1, 16), % Expanded escape chars.
+ scan_error({string,$\',Estr}, Line0, Col0, Nline, Ncol, Ncs); %'
+ {Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ case catch list_to_atom(Nwcs) of
+ A when is_atom(A) ->
+ Attrs = attributes(Line0, Col0, St, Nstr),
+ scan1(Ncs, St, Nline, Ncol, [{atom,Attrs,A}|Toks]);
+ _ ->
+ scan_error({illegal,atom}, Line0, Col0, Nline, Ncol, Ncs)
+ end
+ end.
+
+scan_string0(Cs, #erl_scan{text=false}, Line, no_col=Col, Q, [], Wcs) ->
+ scan_string_no_col(Cs, Line, Col, Q, Wcs);
+scan_string0(Cs, #erl_scan{text=true}, Line, no_col=Col, Q, Str, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Str, Wcs);
+scan_string0(Cs, St, Line, Col, Q, [], Wcs) ->
+ scan_string_col(Cs, St, Line, Col, Q, Wcs);
+scan_string0(Cs, _St, Line, Col, Q, Str, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Str, Wcs).
+
+%% Optimization. Col =:= no_col.
+scan_string_no_col([Q|Cs], Line, Col, Q, Wcs) ->
+ {Cs,Line,Col,_DontCare=[],lists:reverse(Wcs)};
+scan_string_no_col([$\n=C|Cs], Line, Col, Q, Wcs) ->
+ scan_string_no_col(Cs, Line+1, Col, Q, [C|Wcs]);
+scan_string_no_col([C|Cs], Line, Col, Q, Wcs) when C =/= $\\, ?UNICODE(C) ->
+ scan_string_no_col(Cs, Line, Col, Q, [C|Wcs]);
+scan_string_no_col(Cs, Line, Col, Q, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Wcs, Wcs).
+
+%% Optimization. Col =/= no_col.
+scan_string_col([Q|Cs], St, Line, Col, Q, Wcs0) ->
+ Wcs = lists:reverse(Wcs0),
+ Str = ?STR(St, [Q|Wcs++[Q]]),
+ {Cs,Line,Col+1,Str,Wcs};
+scan_string_col([$\n=C|Cs], St, Line, _xCol, Q, Wcs) ->
+ scan_string_col(Cs, St, Line+1, 1, Q, [C|Wcs]);
+scan_string_col([C|Cs], St, Line, Col, Q, Wcs) when C =/= $\\, ?UNICODE(C) ->
+ scan_string_col(Cs, St, Line, Col+1, Q, [C|Wcs]);
+scan_string_col(Cs, _St, Line, Col, Q, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Wcs, Wcs).
+
+%% Note: in those cases when a 'char_error' tuple is returned below it
+%% is tempting to skip over characters up to the first Q character,
+%% but then the end location of the error tuple would not correspond
+%% to the start location of the returned Rest string. (Maybe the end
+%% location could be modified, but that too is ugly.)
+scan_string1([Q|Cs], Line, Col, Q, Str0, Wcs0) ->
+ Wcs = lists:reverse(Wcs0),
+ Str = [Q|lists:reverse(Str0, [Q])],
+ {Cs,Line,incr_column(Col, 1),Str,Wcs};
+scan_string1([$\n=C|Cs], Line, Col, Q, Str, Wcs) ->
+ Ncol = new_column(Col, 1),
+ scan_string1(Cs, Line+1, Ncol, Q, [C|Str], [C|Wcs]);
+scan_string1([$\\|Cs]=Cs0, Line, Col, Q, Str, Wcs) ->
+ case scan_escape(Cs, Col) of
+ more ->
+ {more,Cs0,Line,Col,Str,Wcs};
+ {error,Ncs,Error,Ncol} ->
+ {char_error,Ncs,Error,Line,Col,incr_column(Ncol, 1)};
+ {eof,Ncol} ->
+ {error,Line,incr_column(Ncol, 1),lists:reverse(Wcs),eof};
+ {nl,Val,ValStr,Ncs,Ncol} ->
+ Nstr = lists:reverse(ValStr, [$\\|Str]),
+ Nwcs = [Val|Wcs],
+ scan_string1(Ncs, Line+1, Ncol, Q, Nstr, Nwcs);
+ {Val,ValStr,Ncs,Ncol} ->
+ Nstr = lists:reverse(ValStr, [$\\|Str]),
+ Nwcs = [Val|Wcs],
+ scan_string1(Ncs, Line, incr_column(Ncol, 1), Q, Nstr, Nwcs)
+ end;
+scan_string1([C|Cs], Line, no_col=Col, Q, Str, Wcs) when ?UNICODE(C) ->
+ scan_string1(Cs, Line, Col, Q, [C|Str], [C|Wcs]);
+scan_string1([C|Cs], Line, Col, Q, Str, Wcs) when ?UNICODE(C) ->
+ scan_string1(Cs, Line, Col+1, Q, [C|Str], [C|Wcs]);
+scan_string1([C|Cs], Line, Col, _Q, _Str, _Wcs) when ?CHAR(C) ->
+ {char_error,Cs,{illegal,character},Line,Col,incr_column(Col, 1)};
+scan_string1([]=Cs, Line, Col, _Q, Str, Wcs) ->
+ {more,Cs,Line,Col,Str,Wcs};
+scan_string1(eof, Line, Col, _Q, _Str, Wcs) ->
+ {error,Line,Col,lists:reverse(Wcs),eof}.
+
+-define(OCT(C), C >= $0, C =< $7).
+-define(HEX(C), C >= $0 andalso C =< $9 orelse
+ C >= $A andalso C =< $F orelse
+ C >= $a andalso C =< $f).
+
+%% \<1-3> octal digits
+scan_escape([O1,O2,O3|Cs], Col) when ?OCT(O1), ?OCT(O2), ?OCT(O3) ->
+ Val = (O1*8 + O2)*8 + O3 - 73*$0,
+ {Val,[O1,O2,O3],Cs,incr_column(Col, 3)};
+scan_escape([O1,O2], _Col) when ?OCT(O1), ?OCT(O2) ->
+ more;
+scan_escape([O1,O2|Cs], Col) when ?OCT(O1), ?OCT(O2) ->
+ Val = (O1*8 + O2) - 9*$0,
+ {Val,[O1,O2],Cs,incr_column(Col, 2)};
+scan_escape([O1], _Col) when ?OCT(O1) ->
+ more;
+scan_escape([O1|Cs], Col) when ?OCT(O1) ->
+ {O1 - $0,[O1],Cs,incr_column(Col, 1)};
+%% \x{<hex digits>}
+scan_escape([$x,${|Cs], Col) ->
+ scan_hex(Cs, incr_column(Col, 2), []);
+scan_escape([$x], _Col) ->
+ more;
+scan_escape([$x|eof], Col) ->
+ {eof,incr_column(Col, 1)};
+%% \x<2> hexadecimal digits
+scan_escape([$x,H1,H2|Cs], Col) when ?HEX(H1), ?HEX(H2) ->
+ Val = erlang:list_to_integer([H1,H2], 16),
+ {Val,[$x,H1,H2],Cs,incr_column(Col, 3)};
+scan_escape([$x,H1], _Col) when ?HEX(H1) ->
+ more;
+scan_escape([$x|Cs], Col) ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)};
+%% \^X -> CTL-X
+scan_escape([$^=C0,$\n=C|Cs], Col) ->
+ {nl,C,[C0,C],Cs,new_column(Col, 1)};
+scan_escape([$^=C0,C|Cs], Col) when ?CHAR(C) ->
+ Val = C band 31,
+ {Val,[C0,C],Cs,incr_column(Col, 2)};
+scan_escape([$^], _Col) ->
+ more;
+scan_escape([$^|eof], Col) ->
+ {eof,incr_column(Col, 1)};
+scan_escape([$\n=C|Cs], Col) ->
+ {nl,C,[C],Cs,new_column(Col, 1)};
+scan_escape([C0|Cs], Col) when ?UNICODE(C0) ->
+ C = escape_char(C0),
+ {C,[C0],Cs,incr_column(Col, 1)};
+scan_escape([C|Cs], Col) when ?CHAR(C) ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)};
+scan_escape([], _Col) ->
+ more;
+scan_escape(eof, Col) ->
+ {eof,Col}.
+
+scan_hex([C|Cs], no_col=Col, Wcs) when ?HEX(C) ->
+ scan_hex(Cs, Col, [C|Wcs]);
+scan_hex([C|Cs], Col, Wcs) when ?HEX(C) ->
+ scan_hex(Cs, Col+1, [C|Wcs]);
+scan_hex(Cs, Col, Wcs) ->
+ scan_esc_end(Cs, Col, Wcs, 16, "x{").
+
+scan_esc_end([$}|Cs], Col, Wcs0, B, Str0) ->
+ Wcs = lists:reverse(Wcs0),
+ case catch erlang:list_to_integer(Wcs, B) of
+ Val when ?UNICODE(Val) ->
+ {Val,Str0++Wcs++[$}],Cs,incr_column(Col, 1)};
+ _ ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)}
+ end;
+scan_esc_end([], _Col, _Wcs, _B, _Str0) ->
+ more;
+scan_esc_end(eof, Col, _Wcs, _B, _Str0) ->
+ {eof,Col};
+scan_esc_end(Cs, Col, _Wcs, _B, _Str0) ->
+ {error,Cs,{illegal,character},Col}.
+
+escape_char($n) -> $\n; % \n = LF
+escape_char($r) -> $\r; % \r = CR
+escape_char($t) -> $\t; % \t = TAB
+escape_char($v) -> $\v; % \v = VT
+escape_char($b) -> $\b; % \b = BS
+escape_char($f) -> $\f; % \f = FF
+escape_char($e) -> $\e; % \e = ESC
+escape_char($s) -> $\s; % \s = SPC
+escape_char($d) -> $\d; % \d = DEL
+escape_char(C) -> C.
+
+scan_number([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_number(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_number([$.,C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_fraction(Cs, St, Line, Col, Toks, [C,$.|Ncs]);
+scan_number([$.]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
+scan_number([$#|Cs]=Cs0, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_integer(Ncs) of
+ B when B >= 2, B =< 1+$Z-$A+10 ->
+ Bcs = ?STR(St, Ncs++[$#]),
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[],Bcs});
+ B ->
+ Len = length(Ncs),
+ scan_error({base,B}, Line, Col, Line, incr_column(Col, Len), Cs0)
+ end;
+scan_number([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
+scan_number(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_integer(Ncs) of
+ N when is_integer(N) ->
+ tok3(Cs, St, Line, Col, Toks, integer, Ncs, N);
+ _ ->
+ Ncol = incr_column(Col, length(Ncs)),
+ scan_error({illegal,integer}, Line, Col, Line, Ncol, Cs)
+ end.
+
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when ?DIGIT(C), C < $0+B ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when C >= $A, B > 10, C < $A+B-10 ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when C >= $a, B > 10, C < $a+B-10 ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([]=Cs, _St, Line, Col, Toks, State) ->
+ {more,{Cs,Col,Toks,Line,State,fun scan_based_int/6}};
+scan_based_int(Cs, St, Line, Col, Toks, {B,Ncs0,Bcs}) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch erlang:list_to_integer(Ncs, B) of
+ N when is_integer(N) ->
+ tok3(Cs, St, Line, Col, Toks, integer, ?STR(St, Bcs++Ncs), N);
+ _ ->
+ Len = length(Bcs)+length(Ncs),
+ Ncol = incr_column(Col, Len),
+ scan_error({illegal,integer}, Line, Col, Line, Ncol, Cs)
+ end.
+
+scan_fraction([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_fraction(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_fraction([E|Cs], St, Line, Col, Toks, Ncs) when E =:= $e; E =:= $E ->
+ scan_exponent_sign(Cs, St, Line, Col, Toks, [E|Ncs]);
+scan_fraction([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_fraction/6}};
+scan_fraction(Cs, St, Line, Col, Toks, Ncs) ->
+ float_end(Cs, St, Line, Col, Toks, Ncs).
+
+scan_exponent_sign([C|Cs], St, Line, Col, Toks, Ncs) when C =:= $+; C =:= $- ->
+ scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_exponent_sign([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent_sign/6}};
+scan_exponent_sign(Cs, St, Line, Col, Toks, Ncs) ->
+ scan_exponent(Cs, St, Line, Col, Toks, Ncs).
+
+scan_exponent([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_exponent([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent/6}};
+scan_exponent(Cs, St, Line, Col, Toks, Ncs) ->
+ float_end(Cs, St, Line, Col, Toks, Ncs).
+
+float_end(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_float(Ncs) of
+ F when is_float(F) ->
+ tok3(Cs, St, Line, Col, Toks, float, Ncs, F);
+ _ ->
+ Ncol = incr_column(Col, length(Ncs)),
+ scan_error({illegal,float}, Line, Col, Line, Ncol, Cs)
+ end.
+
+skip_comment([C|Cs], St, Line, Col, Toks, N) when C =/= $\n, ?CHAR(C) ->
+ case ?UNICODE(C) of
+ true ->
+ skip_comment(Cs, St, Line, Col, Toks, N+1);
+ false ->
+ Ncol = incr_column(Col, N+1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs)
+ end;
+skip_comment([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun skip_comment/6}};
+skip_comment(Cs, St, Line, Col, Toks, N) ->
+ scan1(Cs, St, Line, incr_column(Col, N), Toks).
+
+scan_comment([C|Cs], St, Line, Col, Toks, Ncs) when C =/= $\n, ?CHAR(C) ->
+ case ?UNICODE(C) of
+ true ->
+ scan_comment(Cs, St, Line, Col, Toks, [C|Ncs]);
+ false ->
+ Ncol = incr_column(Col, length(Ncs)+1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs)
+ end;
+scan_comment([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_comment/6}};
+scan_comment(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ tok3(Cs, St, Line, Col, Toks, comment, Ncs, Ncs).
+
+tok2(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, _Wcs, P) ->
+ scan1(Cs, St, Line, Col, [{P,Line}|Toks]);
+tok2(Cs, St, Line, Col, Toks, Wcs, P) ->
+ Attrs = attributes(Line, Col, St, Wcs),
+ scan1(Cs, St, Line, incr_column(Col, length(Wcs)), [{P,Attrs}|Toks]).
+
+tok2(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, _Wcs, P, _N) ->
+ scan1(Cs, St, Line, Col, [{P,Line}|Toks]);
+tok2(Cs, St, Line, Col, Toks, Wcs, P, N) ->
+ Attrs = attributes(Line, Col, St, Wcs),
+ scan1(Cs, St, Line, incr_column(Col, N), [{P,Attrs}|Toks]).
+
+tok3(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, Item, _S, Sym) ->
+ scan1(Cs, St, Line, Col, [{Item,Line,Sym}|Toks]);
+tok3(Cs, St, Line, Col, Toks, Item, String, Sym) ->
+ Token = {Item,attributes(Line, Col, St, String),Sym},
+ scan1(Cs, St, Line, incr_column(Col, length(String)), [Token|Toks]).
+
+tok3(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, Item,
+ _String, Sym, _Length) ->
+ scan1(Cs, St, Line, Col, [{Item,Line,Sym}|Toks]);
+tok3(Cs, St, Line, Col, Toks, Item, String, Sym, Length) ->
+ Token = {Item,attributes(Line, Col, St, String),Sym},
+ scan1(Cs, St, Line, incr_column(Col, Length), [Token|Toks]).
+
+scan_error(Error, Line, Col, EndLine, EndCol, Rest) ->
+ Loc = location(Line, Col),
+ EndLoc = location(EndLine, EndCol),
+ scan_error(Error, Loc, EndLoc, Rest).
+
+scan_error(Error, ErrorLoc, EndLoc, Rest) ->
+ {{error,{ErrorLoc,?MODULE,Error},EndLoc},Rest}.
+
+-compile({inline,[attributes/4]}).
+
+attributes(Line, no_col, #erl_scan{text = false}, _String) ->
+ Line;
+attributes(Line, no_col, #erl_scan{text = true}, String) ->
+ [{line,Line},{text,String}];
+attributes(Line, Col, #erl_scan{text = false}, _String) ->
+ {Line,Col};
+attributes(Line, Col, #erl_scan{text = true}, String) ->
+ [{line,Line},{column,Col},{text,String}].
+
+location(Line, no_col) ->
+ Line;
+location(Line, Col) when is_integer(Col) ->
+ {Line,Col}.
+
+-compile({inline,[incr_column/2,new_column/2]}).
+
+incr_column(no_col=Col, _N) ->
+ Col;
+incr_column(Col, N) when is_integer(Col) ->
+ Col + N.
+
+new_column(no_col=Col, _Ncol) ->
+ Col;
+new_column(Col, Ncol) when is_integer(Col) ->
+ Ncol.
+
+nl_spcs(2) -> "\n ";
+nl_spcs(3) -> "\n ";
+nl_spcs(4) -> "\n ";
+nl_spcs(5) -> "\n ";
+nl_spcs(6) -> "\n ";
+nl_spcs(7) -> "\n ";
+nl_spcs(8) -> "\n ";
+nl_spcs(9) -> "\n ";
+nl_spcs(10) -> "\n ";
+nl_spcs(11) -> "\n ";
+nl_spcs(12) -> "\n ";
+nl_spcs(13) -> "\n ";
+nl_spcs(14) -> "\n ";
+nl_spcs(15) -> "\n ";
+nl_spcs(16) -> "\n ";
+nl_spcs(17) -> "\n ".
+
+spcs(1) -> " ";
+spcs(2) -> " ";
+spcs(3) -> " ";
+spcs(4) -> " ";
+spcs(5) -> " ";
+spcs(6) -> " ";
+spcs(7) -> " ";
+spcs(8) -> " ";
+spcs(9) -> " ";
+spcs(10) -> " ";
+spcs(11) -> " ";
+spcs(12) -> " ";
+spcs(13) -> " ";
+spcs(14) -> " ";
+spcs(15) -> " ";
+spcs(16) -> " ".
+
+nl_tabs(2) -> "\n\t";
+nl_tabs(3) -> "\n\t\t";
+nl_tabs(4) -> "\n\t\t\t";
+nl_tabs(5) -> "\n\t\t\t\t";
+nl_tabs(6) -> "\n\t\t\t\t\t";
+nl_tabs(7) -> "\n\t\t\t\t\t\t";
+nl_tabs(8) -> "\n\t\t\t\t\t\t\t";
+nl_tabs(9) -> "\n\t\t\t\t\t\t\t\t";
+nl_tabs(10) -> "\n\t\t\t\t\t\t\t\t\t";
+nl_tabs(11) -> "\n\t\t\t\t\t\t\t\t\t\t".
+
+tabs(1) -> "\t";
+tabs(2) -> "\t\t";
+tabs(3) -> "\t\t\t";
+tabs(4) -> "\t\t\t\t";
+tabs(5) -> "\t\t\t\t\t";
+tabs(6) -> "\t\t\t\t\t\t";
+tabs(7) -> "\t\t\t\t\t\t\t";
+tabs(8) -> "\t\t\t\t\t\t\t\t";
+tabs(9) -> "\t\t\t\t\t\t\t\t\t";
+tabs(10) -> "\t\t\t\t\t\t\t\t\t\t".
+
+-spec reserved_word(Atom :: atom()) -> boolean().
+reserved_word('after') -> true;
+reserved_word('begin') -> true;
+reserved_word('case') -> true;
+reserved_word('try') -> true;
+reserved_word('cond') -> true;
+reserved_word('catch') -> true;
+reserved_word('andalso') -> true;
+reserved_word('orelse') -> true;
+reserved_word('end') -> true;
+reserved_word('fun') -> true;
+reserved_word('if') -> true;
+reserved_word('let') -> true;
+reserved_word('of') -> true;
+reserved_word('receive') -> true;
+reserved_word('when') -> true;
+reserved_word('bnot') -> true;
+reserved_word('not') -> true;
+reserved_word('div') -> true;
+reserved_word('rem') -> true;
+reserved_word('band') -> true;
+reserved_word('and') -> true;
+reserved_word('bor') -> true;
+reserved_word('bxor') -> true;
+reserved_word('bsl') -> true;
+reserved_word('bsr') -> true;
+reserved_word('or') -> true;
+reserved_word('xor') -> true;
+reserved_word(_) -> false.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
index 9e695cec1d..e9f7ad825b 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
@@ -2,7 +2,7 @@
-export([weird/1]).
--spec weird(dict() | gb_tree()) -> 42.
+-spec weird(dict:dict() | gb_trees:tree()) -> 42.
weird(gazonk) -> 42.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
index 3456f0e9c6..cdcaa5f9e8 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
@@ -3,6 +3,8 @@
-opaque abc() :: 'a' | 'b' | 'c'.
+-spec atom_or_list(_) -> abc() | list().
+
atom_or_list(1) -> a;
atom_or_list(2) -> b;
atom_or_list(3) -> c;
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug5.erl b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug5.erl
new file mode 100644
index 0000000000..28d739de8e
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug5.erl
@@ -0,0 +1,10 @@
+%% Second arg of is_record call wasn't checked properly
+
+-module(opaque_bug5).
+
+-export([b/0]).
+
+b() ->
+ is_record(id({a}), id(a)).
+
+id(I) -> I.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl
new file mode 100644
index 0000000000..68e2c60368
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl
@@ -0,0 +1,93 @@
+-module(para1).
+
+-compile(export_all).
+
+%% Parameterized opaque types
+
+-export_type([t/0, t/1]).
+
+-opaque t() :: {integer(), integer()}.
+
+-opaque t(A) :: {A, A}.
+
+-type y(A) :: {A, A}.
+
+tt1() ->
+ I = t1(),
+ A = t2(),
+ A =:= I. % never 'true'
+
+tt2() ->
+ I = t0(),
+ A = t2(),
+ A =:= I. % never 'true'
+
+tt3() ->
+ I1 = t0(),
+ I2 = t1(),
+ I1 =:= I2. % never true
+
+tt4() ->
+ I1 = y1(),
+ I2 = y2(),
+ I1 =:= I2. % cannot evaluate to true
+
+adt_tt1() ->
+ I = adt_t1(),
+ A = adt_t2(),
+ A =:= I. % opaque attempt
+
+adt_tt2() ->
+ I = adt_t0(),
+ A = adt_t2(),
+ A =:= I. % opaque attempt
+
+adt_tt3() ->
+ I1 = adt_t0(),
+ I2 = adt_t1(),
+ I1 =:= I2. % opaque attempt
+
+adt_tt4() ->
+ I1 = adt_y1(),
+ I2 = adt_y2(),
+ I1 =:= I2. % cannot evaluate to true
+
+-spec t0() -> t().
+
+t0() ->
+ {3, 2}.
+
+-spec t1() -> t(integer()).
+
+t1() ->
+ {3, 3}.
+
+-spec t2() -> t(atom()).
+
+t2() ->
+ {a, b}.
+
+-spec y1() -> y(integer()).
+
+y1() ->
+ {3, 2}.
+
+-spec y2() -> y(atom()).
+
+y2() ->
+ {a, b}.
+
+adt_t0() ->
+ para1_adt:t0().
+
+adt_t1() ->
+ para1_adt:t1().
+
+adt_t2() ->
+ para1_adt:t2().
+
+adt_y1() ->
+ para1_adt:y1().
+
+adt_y2() ->
+ para1_adt:y2().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl
new file mode 100644
index 0000000000..95ac6b7982
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl
@@ -0,0 +1,36 @@
+-module(para1_adt).
+
+-export([t0/0, t1/0, t2/0, y1/0, y2/0]).
+
+-export_type([t/0, t/1, y/1]).
+
+-opaque t() :: {integer(), integer()}.
+
+-opaque t(A) :: {A, A}.
+
+-type y(A) :: {A, A}.
+
+-spec t0() -> t().
+
+t0() ->
+ {3, 2}.
+
+-spec t1() -> t(integer()).
+
+t1() ->
+ {3, 3}.
+
+-spec t2() -> t(atom()).
+
+t2() ->
+ {a, b}.
+
+-spec y1() -> y(integer()).
+
+y1() ->
+ {3, 2}.
+
+-spec y2() -> y(atom()).
+
+y2() ->
+ {a, b}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl
new file mode 100644
index 0000000000..09b2235fa5
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl
@@ -0,0 +1,123 @@
+-module(para2).
+
+-compile(export_all).
+
+%% More parameterized opaque types
+
+-export_type([strange/1]).
+
+-export_type([c1/0, c2/0]).
+
+-export_type([circ/1, circ/2]).
+
+-opaque strange(A) :: {B, B, A}.
+
+-spec t(strange(integer())) -> strange(atom()).
+
+t({3, 4, 5}) ->
+ {a, b, c}.
+
+-opaque c1() :: c2().
+-opaque c2() :: c1().
+
+c() ->
+ A = c1(),
+ B = c2(),
+ A =:= B.
+
+t() ->
+ A = ct1(),
+ B = ct2(),
+ A =:= B. % can never evaluate to 'true'
+
+-spec c1() -> c1().
+
+c1() ->
+ a.
+
+-spec c2() -> c2().
+
+c2() ->
+ a.
+
+-type ct1() :: ct2().
+-type ct2() :: ct1().
+
+-spec ct1() -> ct1().
+
+ct1() ->
+ a.
+
+-spec ct2() -> ct2().
+
+ct2() ->
+ b.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+c_adt() ->
+ A = c1_adt(),
+ B = c2_adt(),
+ A =:= B. % opaque attempt
+
+t_adt() ->
+ A = ct1_adt(),
+ B = ct2_adt(),
+ A =:= B. % can never evaluate to true
+
+c1_adt() ->
+ para2_adt:c1().
+
+c2_adt() ->
+ para2_adt:c2().
+
+ct1_adt() ->
+ para2_adt:ct1().
+
+ct2_adt() ->
+ para2_adt:ct2().
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-opaque circ(A) :: circ(A, A).
+-opaque circ(A, B) :: circ({A, B}).
+
+tcirc() ->
+ A = circ1(),
+ B = circ2(),
+ A =:= B. % can never evaluate to 'true' (but the types are not OK, or?)
+
+-spec circ1() -> circ(integer()).
+
+circ1() ->
+ 3.
+
+-spec circ2() -> circ(integer(), integer()).
+
+circ2() ->
+ {3, 3}.
+
+tcirc_adt() ->
+ A = circ1_adt(),
+ B = circ2_adt(),
+ A =:= B. % opaque attempt (one would expect them to be the same...)
+
+circ1_adt() ->
+ para2_adt:circ1().
+
+circ2_adt() ->
+ para2_adt:circ2().
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+u_adt() ->
+ A = u1_adt(),
+ B = u2_adt(),
+ %% The resulting types are equal, but not the parameters:
+ A =:= B. % opaque attempt
+
+u1_adt() ->
+ para2_adt:u1().
+
+u2_adt() ->
+ para2_adt:u2().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl
new file mode 100644
index 0000000000..96df437c67
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl
@@ -0,0 +1,64 @@
+-module(para2_adt).
+
+%% More parameterized opaque types
+
+-export_type([c1/0, c2/0]).
+
+-export_type([ct1/0, ct2/0]).
+
+-export_type([circ/1, circ/2]).
+
+-export_type([un/2]).
+
+-export([c1/0, c2/0, ct1/0, ct2/0, circ1/0, circ2/0, u1/0, u2/0]).
+
+-opaque c1() :: c2().
+-opaque c2() :: c1().
+
+-spec c1() -> c1().
+
+c1() ->
+ a.
+
+-spec c2() -> c2().
+
+c2() ->
+ a.
+
+-type ct1() :: ct2().
+-type ct2() :: ct1().
+
+-spec ct1() -> ct1().
+
+ct1() ->
+ a.
+
+-spec ct2() -> ct2().
+
+ct2() ->
+ b.
+
+-opaque circ(A) :: circ(A, A).
+-opaque circ(A, B) :: circ({A, B}).
+
+-spec circ1() -> circ(integer()).
+
+circ1() ->
+ 3.
+
+-spec circ2() -> circ(integer(), integer()).
+
+circ2() ->
+ {3, 3}.
+
+-opaque un(A, B) :: A | B.
+
+-spec u1() -> un(integer(), atom()).
+
+u1() ->
+ 3.
+
+-spec u2() -> un(atom(), integer()).
+
+u2() ->
+ 3.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl
new file mode 100644
index 0000000000..792ae40d39
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl
@@ -0,0 +1,77 @@
+-module(para3).
+
+-export([t/0, t1/1, t2/0, ot1/1, ot2/0, t1_adt/0, t2_adt/0]).
+
+-export([exp_adt/0]).
+
+%% More opaque tests.
+
+-export_type([ot1/0, ot1/1, ot1/2, ot1/3, ot1/4, ot1/5]).
+
+-opaque ot1() :: {ot1(_)}.
+
+-opaque ot1(A) :: {ot1(A, A)}.
+
+-opaque ot1(A, B) :: {ot1(A, B, A)}.
+
+-opaque ot1(A, B, C) :: {ot1(A, B, C, A)}.
+
+-opaque ot1(A, B, C, D) :: {ot1(A, B, C, D, A)}.
+
+-opaque ot1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec ot1(_) -> ot1().
+
+ot1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-spec ot2() -> ot1(). % invalid type spec
+
+ot2() ->
+ foo.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+t() ->
+ {{{17}}} = t1(3). %% pattern can never match
+
+-type t1() :: {t1(_)}.
+
+-type t1(A) :: {t1(A, A)}.
+
+-type t1(A, B) :: {t1(A, B, A)}.
+
+-type t1(A, B, C) :: {t1(A, B, C, A)}.
+
+-type t1(A, B, C, D) :: {t1(A, B, C, D, A)}.
+
+-type t1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec t1(_) -> t1().
+
+t1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-spec t2() -> t1(). % invalid type spec
+
+t2() ->
+ foo.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Shows that the list TypeNames in t_from_form must include ArgsLen.
+
+t1_adt() ->
+ {{{{{17}}}}} = para3_adt:t1(3). % breaks the opaqueness
+
+t2_adt() ->
+ {{{{17}}}} = para3_adt:t1(3). % can never match
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-type exp() :: para3_adt:exp1(para3_adt:exp2()).
+
+-spec exp_adt() -> exp().
+
+exp_adt() ->
+ 3.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl
new file mode 100644
index 0000000000..3919b846e6
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl
@@ -0,0 +1,27 @@
+-module(para3_adt).
+
+-export([t1/1]).
+
+-export_type([t1/0, t1/1, t1/2, t1/3, t1/4, ot1/5]).
+
+-export_type([exp1/1, exp2/0]).
+
+-type t1() :: {t1(_)}.
+
+-type t1(A) :: {t1(A, A)}.
+
+-type t1(A, B) :: {t1(A, B, A)}.
+
+-type t1(A, B, C) :: {t1(A, B, C, A)}.
+
+-type t1(A, B, C, D) :: {ot1(A, B, C, D, A)}.
+
+-opaque ot1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec t1(_) -> t1().
+
+t1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-opaque exp1(T) :: T.
+-opaque exp2() :: integer().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl
new file mode 100644
index 0000000000..7103847ae7
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl
@@ -0,0 +1,17 @@
+-module(exact_adt).
+
+-export([exact_adt_set_type/1, exact_adt_set_type2/1]).
+
+-export_type([exact_adt/0]).
+
+-record(exact_adt, {}).
+
+-opaque exact_adt() :: #exact_adt{}.
+
+-spec exact_adt_set_type(_) -> exact_adt().
+
+exact_adt_set_type(G) -> G.
+
+-spec exact_adt_set_type2(exact_adt()) -> exact_adt().
+
+exact_adt_set_type2(G) -> G.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl
new file mode 100644
index 0000000000..c19330eb30
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl
@@ -0,0 +1,60 @@
+-module(exact_api).
+
+-export([new/0, exact_api_test/1, exact_api_new/1,
+ exact_adt_test/1, exact_adt_new/1]).
+
+-export_type([exact_api/0]).
+
+-record(digraph, {vtab = notable :: ets:tab(),
+ etab = notable :: ets:tab(),
+ ntab = notable :: ets:tab(),
+ cyclic = true :: boolean()}).
+
+-spec new() -> digraph:graph().
+
+new() ->
+ A = #digraph{},
+ set_type(A), % does not have an opaque term as 1st argument
+ A.
+
+-spec set_type(digraph:graph()) -> true.
+
+set_type(G) ->
+ digraph:delete(G).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% The derived spec of exact_api_new() is
+%%% -spec exact_api_new(exact_api:exact_api()) -> exact_api:exact_api().
+%%% This won't happen unless dialyzer_typesig uses
+%%% t_is_exactly_equal() rather than t_is_equal().
+%%% [As of R17B the latter considers two types equal if nothing but
+%%% their ?opaque tags differ.]
+
+-record(exact_api, {}).
+
+-opaque exact_api() :: #exact_api{}.
+
+exact_api_test(X) ->
+ #exact_api{} = exact_api_set_type(X). % OK
+
+exact_api_new(A) ->
+ A = #exact_api{},
+ _ = exact_api_set_type(A), % OK (the opaque type is local)
+ A.
+
+-spec exact_api_set_type(exact_api()) -> exact_api().
+
+exact_api_set_type(#exact_api{}=E) -> E.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-record(exact_adt, {}).
+
+exact_adt_test(X) ->
+ #exact_adt{} = exact_adt:exact_adt_set_type(X). % breaks the opaqueness
+
+exact_adt_new(A) ->
+ A = #exact_adt{},
+ _ = exact_adt:exact_adt_set_type2(A), % does not have an opaque term as 1st argument
+ A.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl
new file mode 100644
index 0000000000..2b157483bc
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl
@@ -0,0 +1,65 @@
+-module(is_rec).
+
+-export([ri1/0, ri11/0, ri13/0, ri14/0, ri2/0, ri3/0, ri4/0, ri5/0,
+ ri6/0, ri7/0, ri8/0]).
+
+-record(r, {f1 :: integer()}).
+
+ri1() ->
+ A = simple1_adt:d1(),
+ is_record(A, r). % opaque term 1
+
+ri11() ->
+ A = simple1_adt:d1(),
+ I = '1-3'(),
+ is_record(A, r, I). % opaque term 1
+
+ri13() ->
+ A = simple1_adt:d1(),
+ if is_record(A, r) -> true end. % breaks the opaqueness
+
+ri14() ->
+ A = simple1_adt:d1(),
+ if is_record({A, 1}, r) -> true end. % breaks the opaqueness
+
+-type '1-3-t'() :: 1..3.
+
+-spec '1-3'() -> '1-3-t'().
+
+'1-3'() ->
+ random:uniform(3).
+
+
+-spec 'Atom'() -> atom().
+
+'Atom'() ->
+ a.
+
+ri2() ->
+ A = simple1_adt:d1(),
+ R = 'Atom'(),
+ is_record(A, R). % opaque term 1
+
+ri3() ->
+ A = simple1_adt:d1(),
+ is_record(A, A, 1). % opaque term 2
+
+ri4() ->
+ A = simple1_adt:d1(),
+ is_record(A, hipp:hopp(), 1). % opaque term 1
+
+ri5() ->
+ A = simple1_adt:d1(),
+ is_record(A, A, hipp:hopp()). % opaque term 2
+
+ri6() ->
+ A = simple1_adt:d1(),
+ if is_record(A, r) -> true end. % breaks opaqueness
+
+ri7() ->
+ A = simple1_adt:d1(),
+ if is_record({r, A}, r) -> true end. % A violates #r{}
+
+ri8() ->
+ A = simple1_adt:d1(),
+ is_record({A, 1}, r). % opaque term 1
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl
new file mode 100644
index 0000000000..ff80d6e99b
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl
@@ -0,0 +1,28 @@
+-module(rec_adt).
+
+-export([f/0, r1/0]).
+
+-export_type([r1/0]).
+
+-export_type([f/0, op_t/0, a/0]).
+
+-opaque a() :: a | b.
+
+-record(r1,
+ {f1 :: a()}).
+
+-opaque r1() :: #r1{}.
+
+-opaque f() :: fun((_) -> _).
+
+-opaque op_t() :: integer().
+
+-spec f() -> f().
+
+f() ->
+ fun(_) -> 3 end.
+
+-spec r1() -> r1().
+
+r1() ->
+ #r1{f1 = a}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl
new file mode 100644
index 0000000000..fb6d59d263
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl
@@ -0,0 +1,123 @@
+-module(rec_api).
+
+-export([t1/0, t2/0, t3/0, adt_t1/0, adt_t1/1, adt_r1/0,
+ t/1, t_adt/0, r/0, r_adt/0, u1/0, u2/0, u3/0, v1/0, v2/0, v3/0]).
+
+-export_type([{a,0},{r1,0}, r2/0, r3/0]).
+
+-export_type([f/0, op_t/0, r/0, tup/0]).
+
+-opaque a() :: a | b.
+
+-record(r1,
+ {f1 :: a()}).
+
+-opaque r1() :: #r1{}.
+
+t1() ->
+ A = #r1{f1 = a},
+ {r1, a} = A.
+
+t2() ->
+ A = {r1, 10},
+ {r1, 10} = A,
+ A = #r1{f1 = 10}, % violates the type of field f1
+ #r1{f1 = 10} = A.
+
+t3() ->
+ A = {r1, 10},
+ #r1{f1 = 10} = A. % violates the type of #r1{}
+
+adt_t1() ->
+ R = rec_adt:r1(),
+ {r1, a} = R. % breaks the opaqueness
+
+-spec adt_t1(rec_adt:r1()) -> rec_adt:r1(). % invalid type spec
+
+adt_t1(R) ->
+ {r1, a} = R.
+
+-spec adt_r1() -> rec_adt:r1(). % invalid type spec
+
+adt_r1() ->
+ #r1{f1 = a}.
+
+-opaque f() :: fun((_) -> _).
+
+-opaque op_t() :: integer().
+
+-spec t(f()) -> _.
+
+t(A) ->
+ T = term(),
+ %% 3(T), % cannot test this: dialyzer_dep deliberately crashes
+ A(T).
+
+-spec term() -> op_t().
+
+term() ->
+ 3.
+
+t_adt() ->
+ A = rec_adt:f(),
+ T = term(),
+ A(T).
+
+-record(r, {f = fun(_) -> 3 end :: f(), o = 1 :: op_t()}).
+
+-opaque r() :: #r{}.
+
+-opaque tup() :: {'r', f(), op_t()}.
+
+-spec r() -> _.
+
+r() ->
+ {{r, f(), 2},
+ #r{f = f(), o = 2}}. % OK, f() is a local opaque type
+
+-spec f() -> f().
+
+f() ->
+ fun(_) -> 3 end.
+
+r_adt() ->
+ {{r, rec_adt:f(), 2},
+ #r{f = rec_adt:f(), o = 2}}. % breaks the opaqueness
+
+-record(r2, % like #r1{}, but with initial value
+ {f1 = a :: a()}).
+
+-opaque r2() :: #r2{}.
+
+u1() ->
+ A = #r2{f1 = a},
+ {r2, a} = A.
+
+u2() ->
+ A = {r2, 10},
+ {r2, 10} = A,
+ A = #r2{f1 = 10}, % violates the type of field f1
+ #r2{f1 = 10} = A.
+
+u3() ->
+ A = {r2, 10},
+ #r2{f1 = 10} = A. % violates the type of #r2{}
+
+-record(r3, % like #r1{}, but an opaque type
+ {f1 = queue:new():: queue:queue()}).
+
+-opaque r3() :: #r3{}.
+
+v1() ->
+ A = #r3{f1 = queue:new()},
+ {r3, a} = A. % breaks the opaqueness
+
+v2() ->
+ A = {r3, 10},
+ {r3, 10} = A,
+ A = #r3{f1 = 10}, % violates the type of field f1
+ #r3{f1 = 10} = A.
+
+v3() ->
+ A = {r3, 10},
+ #r3{f1 = 10} = A. % breaks the opaqueness
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl
new file mode 100644
index 0000000000..21a277c1e9
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl
@@ -0,0 +1,138 @@
+-module(simple1_adt).
+
+-export([d1/0, d2/0, i/0, n1/0, n2/0, o1/0, o2/0,
+ c1/0, c2/0, bit1/0, a/0, i1/0, tuple/0,
+ b1/0, b2/0, ty_i1/0]).
+
+-export_type([o1/0, o2/0, d1/0, d2/0]).
+
+-export_type([i1/0, i2/0, di1/0, di2/0]).
+
+-export_type([ty_i1/0, c1/0, c2/0]).
+
+-export_type([b1/0, b2/0]).
+
+-export_type([bit1/0]).
+
+-export_type([tuple1/0, a/0, i/0]).
+
+%% Equal:
+
+-opaque o1() :: a | b | c.
+
+-opaque o2() :: a | b | c.
+
+%% Disjoint:
+
+-opaque d1() :: a | b | c.
+
+-opaque d2() :: d | e | f.
+
+%% One common element:
+
+-opaque c1() :: a | b | c.
+
+-opaque c2() :: c | e | f.
+
+%% Equal integer range:
+
+-opaque i1() :: 1 | 2.
+
+-opaque i2() :: 1 | 2.
+
+%% Disjoint integer range:
+
+-opaque di1() :: 1 | 2.
+
+-opaque di2() :: 3 | 4.
+
+
+-type ty_i1() :: 1 | 2.
+
+%% Boolean types
+
+-opaque b1() :: boolean().
+
+-opaque b2() :: boolean().
+
+%% Binary types
+
+-opaque bit1() :: binary().
+
+%% Tuple types
+
+-opaque tuple1() :: tuple().
+
+%% Atom type
+
+-opaque a() :: atom().
+
+-opaque i() :: integer().
+
+-spec d1() -> d1().
+
+d1() -> a.
+
+-spec d2() -> d2().
+
+d2() -> d.
+
+-spec i() -> i().
+
+i() ->
+ 1.
+
+-spec n1() -> o1().
+
+n1() -> a.
+
+-spec n2() -> o2().
+
+n2() -> a.
+
+-spec o1() -> o1().
+
+o1() -> a.
+
+-spec o2() -> o2().
+
+o2() -> a.
+
+-spec c1() -> c1().
+
+c1() -> a.
+
+-spec c2() -> c2().
+
+c2() -> e.
+
+-spec bit1() -> bit1().
+
+bit1() ->
+ <<"hej">>.
+
+-spec a() -> a().
+
+a() ->
+ e.
+
+-spec i1() -> i1().
+
+i1() -> 1.
+
+-spec tuple() -> tuple1().
+
+tuple() -> {1,2}.
+
+-spec b1() -> b1().
+
+b1() -> true.
+
+-spec b2() -> b2().
+
+b2() -> false.
+
+-spec ty_i1() -> ty_i1().
+
+ty_i1() ->
+ 1.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl
new file mode 100644
index 0000000000..eef2074e0c
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl
@@ -0,0 +1,571 @@
+-module(simple1_api).
+
+-export([t1/1, adt_t1/1, t2/1, adt_t2/1, tup/0, t3/0, t4/0, t5/0, t6/0, t7/0,
+ t8/0, adt_t3/0, adt_t4/0, adt_t7/0, adt_t8/0, adt_t5/0,
+ c1/2, c2/2, c2/0, c3/0, c4/0, tt1/0, tt2/0,
+ cmp1/0, cmp2/0, cmp3/0, cmp4/0,
+ ty_cmp1/0, ty_cmp2/0, ty_cmp3/0, ty_cmp4/0,
+ f1/0, f2/0, adt_f1/0, adt_f2/0, f3/0, f4/0, adt_f3/0, adt_f4/0,
+ adt_f4_a/0, adt_f4_b/0,
+ bool_t1/0, bool_t2/0, bool_t3/0, bool_t4/0, bool_t5/1, bool_t6/1,
+ bool_t7/0, bool_adt_t1/0, bool_adt_t2/0, bool_adt_t5/1,
+ bool_adt_t6/1, bool_t8/0, bool_adt_t8/2, bool_t9/0, bool_adt_t9/2,
+ bit_t1/0, bit_adt_t1/0, bit_t3/1, bit_adt_t2/0, bit_adt_t3/1,
+ bit_t5/1, bit_t4/1, bit_adt_t4/1, bit_t5/0, bit_adt_t5/0,
+ call_f/1, call_f_adt/1, call_m_adt/1, call_m/1, call_f_i/1,
+ call_m_i/1, call_m_adt_i/1, call_f_adt_i/1,
+ eq1/0, eq2/0, c5/0, c6/2, c7/2, c8/0]).
+
+%%% Equal opaque types
+
+-export_type([o1/0, o2/0]).
+
+-export_type([d1/0, d2/0]).
+
+-opaque o1() :: a | b | c.
+
+-opaque o2() :: a | b | c.
+
+-export_type([i1/0, i2/0, di1/0, di2/0]).
+
+-export_type([b1/0, b2/0]).
+
+-export_type([bit1/0]).
+
+-export_type([a/0, i/0]).
+
+%% The derived spec is
+%% -spec t1('a' | 'b') -> simple1_api:o1('a') | simple1_api:o2('a').
+%% but that is not tested...
+
+t1(a) ->
+ o1();
+t1(b) ->
+ o2().
+
+-spec o1() -> o1().
+
+o1() -> a.
+
+-spec o2() -> o2().
+
+o2() -> a.
+
+%% The derived spec is
+%% -spec adt_t1('a' | 'b') -> simple1_adt:o1('a') | simple1_adt:o2('a').
+%% but that is not tested...
+
+adt_t1(a) ->
+ simple1_adt:o1();
+adt_t1(b) ->
+ simple1_adt:o2().
+
+%%% Disjunct opaque types
+
+-opaque d1() :: a | b | c.
+
+-opaque d2() :: d | e | f.
+
+%% -spec t2('a' | 'b') -> simple1_api:d1('a') | simple1_api:d2('d').
+
+t2(a) ->
+ d1();
+t2(b) ->
+ d2().
+
+-spec d1() -> d1().
+
+d1() -> a.
+
+-spec d2() -> d2().
+
+d2() -> d.
+
+%% -spec adt_t2('a' | 'b') -> simple1_adt:d1('a') | simple1_adt:d2('d').
+
+adt_t2(a) ->
+ simple1_adt:d1();
+adt_t2(b) ->
+ simple1_adt:d2().
+
+-spec tup() -> simple1_adt:tuple1(). % invalid type spec
+
+tup() ->
+ {a, b}.
+
+%%% Matching equal opaque types with different names
+
+t3() ->
+ A = n1(),
+ B = n2(),
+ A = A, % OK, of course
+ A = B. % OK since o1() and o2() are local opaque types
+
+t4() ->
+ A = n1(),
+ B = n2(),
+ true = A =:= A, % OK, of course
+ A =:= B. % OK since o1() and o2() are local opaque types
+
+t5() ->
+ A = d1(),
+ B = d2(),
+ A =:= B. % can never evaluate to true
+
+t6() ->
+ A = d1(),
+ B = d2(),
+ A = B. % can never succeed
+
+t7() ->
+ A = d1(),
+ B = d2(),
+ A =/= B. % OK (always true?)
+
+t8() ->
+ A = d1(),
+ B = d2(),
+ A /= B. % OK (always true?)
+
+-spec n1() -> o1().
+
+n1() -> a.
+
+-spec n2() -> o2().
+
+n2() -> a.
+
+adt_t3() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ true = A =:= A, % OK.
+ A =:= B. % opaque test, not OK
+
+adt_t4() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ A = A, % OK
+ A = B. % opaque term
+
+adt_t7() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ false = A =/= A, % OK
+ A =/= B. % opaque test, not OK
+
+adt_t8() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ false = A /= A, % OK
+ A /= B. % opaque test, not OK
+
+adt_t5() ->
+ A = simple1_adt:c1(),
+ B = simple1_adt:c2(),
+ A =:= B. % opaque test, not OK
+
+%% Comparison in guard
+
+-spec c1(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c1(A, B) when A =< B -> true. % succ type of A and B is any() (type spec is OK)
+
+-spec c2(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c2(A, B) ->
+ if A =< B -> true end. % succ type of A and B is any() (type spec is OK)
+
+c2() ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d2(),
+ if A =< B -> ok end. % opaque term
+
+c3() ->
+ B = simple1_adt:d2(),
+ if a =< B -> ok end. % opaque term
+
+c4() ->
+ A = simple1_adt:d1(),
+ if A =< d -> ok end. % opaque term
+
+tt1() ->
+ A = o1(),
+ is_integer(A). % OK
+
+tt2() ->
+ A = simple1_adt:d1(),
+ is_integer(A). % breaks the opaqueness
+
+%% Comparison with integers
+
+-opaque i1() :: 1 | 2.
+
+-opaque i2() :: 1 | 2.
+
+-opaque di1() :: 1 | 2.
+
+-opaque di2() :: 3 | 4.
+
+-spec i1() -> i1().
+
+i1() -> 1.
+
+-type ty_i1() :: 1 | 2.
+
+-spec ty_i1() -> ty_i1().
+
+ty_i1() -> 1.
+
+cmp1() ->
+ A = i1(),
+ if A > 3 -> ok end. % can never succeed
+
+cmp2() ->
+ A = simple1_adt:i1(),
+ if A > 3 -> ok end. % opaque term
+
+cmp3() ->
+ A = i1(),
+ if A < 3 -> ok end.
+
+cmp4() ->
+ A = simple1_adt:i1(),
+ if A < 3 -> ok end. % opaque term
+
+%% -type
+
+ty_cmp1() ->
+ A = ty_i1(),
+ if A > 3 -> ok end. % can never succeed
+
+ty_cmp2() ->
+ A = simple1_adt:ty_i1(),
+ if A > 3 -> ok end. % can never succeed
+
+ty_cmp3() ->
+ A = ty_i1(),
+ if A < 3 -> ok end.
+
+ty_cmp4() ->
+ A = simple1_adt:ty_i1(),
+ if A < 3 -> ok end.
+
+%% is_function
+
+f1() ->
+ T = n1(),
+ if is_function(T) -> ok end. % can never succeed
+
+f2() ->
+ T = n1(),
+ is_function(T). % ok
+
+adt_f1() ->
+ T = simple1_adt:n1(),
+ if is_function(T) -> ok end. % breaks the opaqueness
+
+adt_f2() ->
+ T = simple1_adt:n1(),
+ is_function(T). % breaks the opaqueness
+
+f3() ->
+ A = i1(),
+ T = n1(),
+ if is_function(T, A) -> ok end. % can never succeed
+
+f4() ->
+ A = i1(),
+ T = n1(),
+ is_function(T, A). % ok
+
+adt_f3() ->
+ A = simple1_adt:i1(),
+ T = simple1_adt:n1(),
+ if is_function(T, A) -> ok end. % breaks the opaqueness
+
+adt_f4() ->
+ A = simple1_adt:i1(),
+ T = simple1_adt:n1(),
+ is_function(T, A). % breaks the opaqueness
+
+adt_f4_a() ->
+ A = simple1_adt:i1(),
+ T = n1(),
+ is_function(T, A). % opaque term
+
+
+adt_f4_b() ->
+ A = i1(),
+ T = simple1_adt:n1(),
+ is_function(T, A). % breaks the opaqueness
+
+%% A few Boolean examples
+
+bool_t1() ->
+ B = b2(),
+ if B -> ok end. % B =:= true can never succeed
+
+bool_t2() ->
+ A = b1(),
+ B = b2(),
+ if A and not B -> ok end.
+
+bool_t3() ->
+ A = b1(),
+ if not A -> ok end. % can never succeed
+
+bool_t4() ->
+ A = n1(),
+ if not ((A >= 1) and not (A < 1)) -> ok end. % can never succeed
+
+-spec bool_t5(i1()) -> integer().
+
+bool_t5(A) ->
+ if [not (A > 1)] =:=
+ [false]-> 1 end.
+
+-spec bool_t6(b1()) -> integer().
+
+bool_t6(A) ->
+ if [not A] =:=
+ [false]-> 1 end.
+
+-spec bool_t7() -> integer().
+
+bool_t7() ->
+ A = i1(),
+ if [not A] =:= % cannot succeed
+ [false]-> 1 end.
+
+bool_adt_t1() ->
+ B = simple1_adt:b2(),
+ if B -> ok end. % opaque term
+
+bool_adt_t2() ->
+ A = simple1_adt:b1(),
+ B = simple1_adt:b2(),
+ if A and not B -> ok end. % opaque term
+
+-spec bool_adt_t5(simple1_adt:i1()) -> integer().
+
+bool_adt_t5(A) ->
+ if [not (A > 1)] =:= % succ type of A is any() (type spec is OK)
+ [false]-> 1 end.
+
+-spec bool_adt_t6(simple1_adt:b1()) -> integer(). % invalid type spec
+
+bool_adt_t6(A) ->
+ if [not A] =:= % succ type of A is 'true'
+ [false]-> 1 end.
+
+-spec bool_t8() -> integer().
+
+bool_t8() ->
+ A = i1(),
+ if [A and A] =:= % cannot succeed
+ [false]-> 1 end.
+
+-spec bool_adt_t8(simple1_adt:b1(), simple1_adt:b2()) -> integer(). % invalid
+
+bool_adt_t8(A, B) ->
+ if [A and B] =:=
+ [false]-> 1 end.
+
+-spec bool_t9() -> integer().
+
+bool_t9() ->
+ A = i1(),
+ if [A or A] =:= % cannot succeed
+ [false]-> 1 end.
+
+-spec bool_adt_t9(simple1_adt:b1(), simple1_adt:b2()) -> integer(). % invalid
+
+bool_adt_t9(A, B) ->
+ if [A or B] =:=
+ [false]-> 1 end.
+
+-opaque b1() :: boolean().
+
+-opaque b2() :: boolean().
+
+-spec b1() -> b1().
+
+b1() -> true.
+
+-spec b2() -> b2().
+
+b2() -> false.
+
+%% Few (very few...) examples with bit syntax
+
+bit_t1() ->
+ A = i1(),
+ <<100:(A)>>.
+
+bit_adt_t1() ->
+ A = simple1_adt:i1(),
+ <<100:(A)>>. % breaks the opaqueness
+
+bit_t3(A) ->
+ B = i1(),
+ case none:none() of
+ <<A:B>> -> 1
+ end.
+
+bit_adt_t2() ->
+ A = simple1_adt:i1(),
+ case <<"hej">> of
+ <<_:A>> -> ok % breaks the opaqueness (but the message is strange)
+ end.
+
+
+bit_adt_t3(A) ->
+ B = simple1_adt:i1(),
+ case none:none() of
+ <<A: % breaks the opaqueness (the message is less than perfect)
+ B>> -> 1
+ end.
+
+bit_t5(A) ->
+ B = o1(),
+ case none:none() of % the type is any(); should fix that XXX
+ <<A:B>> -> 1 % can never match (local opaque type is OK)
+ end.
+
+-spec bit_t4(<<_:1>>) -> integer().
+
+bit_t4(A) ->
+ Sz = i1(),
+ case A of
+ <<_:Sz>> -> 1
+ end.
+
+-spec bit_adt_t4(<<_:1>>) -> integer().
+
+bit_adt_t4(A) ->
+ Sz = simple1_adt:i1(),
+ case A of
+ <<_:Sz>> -> 1 % breaks the opaqueness
+ end.
+
+bit_t5() ->
+ A = bit1(),
+ case A of
+ <<_/binary>> -> 1
+ end.
+
+bit_adt_t5() ->
+ A = simple1_adt:bit1(),
+ case A of
+ <<_/binary>> -> 1 % breaks the opaqueness
+ end.
+
+-opaque bit1() :: binary().
+
+-spec bit1() -> bit1().
+
+bit1() ->
+ <<"hej">>.
+
+%% Calls with variable module or function
+
+call_f(A) ->
+ A = a(),
+ foo:A(A).
+
+call_f_adt(A) ->
+ A = simple1_adt:a(),
+ foo:A(A). % breaks the opaqueness
+
+call_m(A) ->
+ A = a(),
+ A:foo(A).
+
+call_m_adt(A) ->
+ A = simple1_adt:a(),
+ A:foo(A). % breaks the opaqueness
+
+-opaque a() :: atom().
+
+-opaque i() :: integer().
+
+-spec a() -> a().
+
+a() ->
+ e.
+
+call_f_i(A) ->
+ A = i(),
+ foo:A(A). % A is not atom() but i()
+
+call_f_adt_i(A) ->
+ A = simple1_adt:i(),
+ foo:A(A). % A is not atom() but simple1_adt:i()
+
+call_m_i(A) ->
+ A = i(),
+ A:foo(A). % A is not atom() but i()
+
+call_m_adt_i(A) ->
+ A = simple1_adt:i(),
+ A:foo(A). % A is not atom() but simple1_adt:i()
+
+-spec eq1() -> integer().
+
+eq1() ->
+ A = simple1_adt:d2(),
+ B = simple1_adt:d1(),
+ if
+ A == B -> % opaque term
+ 0;
+ A == A ->
+ 1;
+ A =:= A -> % compiler finds this one cannot match
+ 2;
+ true -> % compiler finds this one cannot match
+ 3
+ end.
+
+eq2() ->
+ A = simple1_adt:d1(),
+ if
+ {A} >= {A} ->
+ 1;
+ A >= 3 -> % opaque term
+ 2;
+ A == 3 -> % opaque term
+ 3;
+ A =:= 3 -> % opaque term
+ 4;
+ A == A ->
+ 5;
+ A =:= A -> % compiler finds this one cannot match
+ 6
+ end.
+
+c5() ->
+ A = simple1_adt:d1(),
+ A < 3. % opaque term
+
+c6(A, B) ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d1(),
+ A =< B. % same type - no warning
+
+c7(A, B) ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d2(),
+ A =< B. % opaque term
+
+c8() ->
+ D = digraph:new(),
+ E = ets:new(foo, []),
+ if {D, a} > {D, E} -> true; % OK
+ {1.0, 2} > {{D}, {E}} -> true; % OK
+ {D, 3} > {D, E} -> true % opaque term 2
+ end.
+
+-spec i() -> i().
+
+i() ->
+ 1.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl
new file mode 100644
index 0000000000..c86f6fd0b5
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl
@@ -0,0 +1,125 @@
+-module(simple2_api).
+
+-export([c1/2, c2/0, c3/0, c4/1, c5/1, c6/0, c6_b/0, c7/0, c7_b/0,
+ c7_c/0, c8/0, c9/0, c10/0, c11/0, c12/0, c13/0, c14/0, c15/0,
+ c16/0, c17/0, c18/0, c19/0, c20/0, c21/0, c22/0, c23/0,
+ c24/0, c25/0, c26/0]).
+
+-spec c1(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c1(A, B) ->
+ {A} =< {B}. % succ type of A and B is any()
+
+c2() ->
+ A = simple1_adt:d1(),
+ erlang:make_tuple(1, A). % ok
+
+c3() ->
+ A = simple1_adt:d1(),
+ setelement(1, {A}, A). % ok
+
+c4(_) ->
+ A = simple1_adt:d1(),
+ halt(A). % ok (BIF fails...)
+
+c5(_) ->
+ A = simple1_adt:d1(),
+ [A] -- [A]. % ok
+
+c6() ->
+ A = simple1_adt:d1(),
+ A ! foo. % opaque term
+
+c6_b() ->
+ A = simple1_adt:d1(),
+ erlang:send(A, foo). % opaque term
+
+c7() ->
+ A = simple1_adt:d1(),
+ foo ! A. % ok
+
+c7_b() ->
+ A = simple1_adt:d1(),
+ erlang:send(foo, A). % ok
+
+c7_c() ->
+ A = simple1_adt:d1(),
+ erlang:send(foo, A, []). % ok
+
+c8() ->
+ A = simple1_adt:d1(),
+ A < 3. % opaque term
+
+c9() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(A, 1, []). % ok
+
+c10() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(1, A, []). % opaque term 2
+
+c11() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [A]). % ok
+
+c12() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, A). % opaque term 3
+
+c13() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [{A,2}]). % ok
+
+c14() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [{2,A}]). % ok
+
+c15() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(key, 1, [A]). % ok
+
+c16() ->
+ A = simple1_adt:tuple(),
+ erlang:send(foo, A). % ok
+
+c17() ->
+ A = simple1_adt:tuple(),
+ lists:reverse([A]). % ok
+
+c18() ->
+ A = simple1_adt:tuple(),
+ lists:keyreplace(a, 1, [A], {1,2}). % ok
+
+c19() ->
+ A = simple1_adt:tuple(),
+ %% Problem. The spec says argument 4 is a tuple(). Fix that!
+ lists:keyreplace(a, 1, [{1,2}], A). % opaque term 4
+
+c20() ->
+ A = simple1_adt:tuple(),
+ lists:flatten(A). % opaque term 1
+
+c21() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([[{A}]]). % ok
+
+c22() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([[A]]). % ok
+
+c23() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([A]). % ok
+
+c24() ->
+ A = simple1_adt:tuple(),
+ lists:flatten({A}). % will never return
+
+c25() ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:tuple(),
+ if {A,3} > {A,B} -> true end. % opaque 2nd argument
+
+c26() ->
+ B = simple1_adt:tuple(),
+ tuple_to_list(B). % opaque term 1
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
index 5ca3202bba..d88f238190 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
@@ -1,10 +1,15 @@
-module(union_adt).
-export([new/1, new_a/1, new_rec/1]).
+%% Now (R17) that opaque types are no longer recognized by their shape
+%% this test case is rather meaningless.
+
-record(rec, {x = 42 :: integer()}).
-opaque u() :: 'aaa' | 'bbb' | #rec{}.
+-spec new(_) -> u().
+
new(a) -> aaa;
new(b) -> bbb;
new(X) when is_integer(X) ->
@@ -13,7 +18,11 @@ new(X) when is_integer(X) ->
%% the following two functions (and their uses in union_use.erl) test
%% that the return type is the opaque one and not just a subtype of it
+-spec new_a(_) -> u().
+
new_a(a) -> aaa.
+-spec new_rec(_) -> u().
+
new_rec(X) when is_integer(X) ->
#rec{x = X}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl b/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
index 8f0da1f5dc..ca6bc0ab4a 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
@@ -14,12 +14,12 @@
rel2fam(Rel) ->
sofs:to_external(sofs:relation_to_family(sofs:relation(Rel))).
-%% a definition that does not violate the opaqueness of gb_tree()
+%% a definition that does not violate the opaqueness of gb_trees:tree()
gb_trees_smallest_key(Tree) ->
{Key, _V} = gb_trees:smallest(Tree),
Key.
-%% a definition that violates the opaqueness of gb_tree()
+%% a definition that violates the opaqueness of gb_trees:tree()
gb_trees_largest_key({_, Tree}) ->
largest_key1(Tree).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl
new file mode 100644
index 0000000000..c742990c6a
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl
@@ -0,0 +1,5 @@
+-module(zoltan_adt).
+
+-export_type([id/0]).
+
+-opaque id() :: string().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
index 38c6051c58..e094d1982b 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
@@ -2,7 +2,7 @@
-export([get/2]).
--opaque data() :: gb_tree().
+-opaque data() :: gb_trees:tree().
-spec get(term(), data()) -> term().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
index b62b9de576..07c9f0a270 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
@@ -2,13 +2,13 @@
-export([f/0, gen/0]).
--opaque id() :: string().
+%-opaque id() :: string().
-spec f() -> char().
%% List pattern matching issue
f() -> [H|_T] = gen(), H.
--spec gen() -> id().
+-spec gen() -> zoltan_adt:id().
gen() -> "Dummy".
diff --git a/lib/dialyzer/test/options1_SUITE_data/dialyzer_options b/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
index c612e77d3e..65d233ac0d 100644
--- a/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, [{include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists]}]}.
+{dialyzer_options, [{include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists, no_unknown]}]}.
{time_limit, 30}.
diff --git a/lib/dialyzer/test/options1_SUITE_data/results/compiler b/lib/dialyzer/test/options1_SUITE_data/results/compiler
index 6399e3e36b..30b6f4814a 100644
--- a/lib/dialyzer/test/options1_SUITE_data/results/compiler
+++ b/lib/dialyzer/test/options1_SUITE_data/results/compiler
@@ -4,7 +4,7 @@ beam_bool.erl:193: The pattern {[], _} can never match the type {[{_,_,_,_},...]
beam_bool.erl:510: The pattern [{'set', [Dst], _, _}, {'%live', _}] can never match the type [{_,_,_,_}]
beam_disasm.erl:537: The variable X can never match since previous clauses completely covered the type 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
beam_type.erl:284: The pattern <'pi', 0> can never match the type <_,1 | 2>
-beam_validator.erl:396: The pattern <{'jump', {'f', _}}, Vst = {'vst', 'none', _}> can never match the type <_,#vst{current::#st{ct::[]}}>
+beam_validator.erl:396: Matching of pattern {'vst', 'none', _} tagged with a record name violates the declared type of #vst{current::#st{ct::[]}}
beam_validator.erl:690: The pattern <'term', OldT> can never match the type <{'tuple',[any(),...]},_>
beam_validator.erl:693: Guard test 'or'('false','false') can never succeed
beam_validator.erl:700: Guard test 'or'('false','false') can never succeed
@@ -33,4 +33,4 @@ core_lint.erl:473: The pattern <{'c_atom', _, 'all'}, 'binary', _Def, St> can ne
core_lint.erl:505: The pattern <_Req, 'unknown', St> can never match the type <non_neg_integer(),non_neg_integer(),_>
v3_codegen.erl:1569: The call v3_codegen:load_reg_1(V::any(),I::0,Rs::any(),pos_integer()) will never return since it differs in the 4th argument from the success typing arguments: (any(),0,maybe_improper_list(),0)
v3_codegen.erl:1571: The call v3_codegen:load_reg_1(V::any(),I::0,[],pos_integer()) will never return since it differs in the 4th argument from the success typing arguments: (any(),0,maybe_improper_list(),0)
-v3_core.erl:646: The pattern <Prim = {'iprimop', _, _, _}, St> can never match the type <#c_nil{anno::[any(),...]} | {'c_atom' | 'c_char' | 'c_float' | 'c_int' | 'c_string' | 'c_tuple' | 'c_var' | 'ibinary' | 'icatch' | 'ireceive1',[any(),...] | {_,_,_,_},_} | #c_cons{anno::[any(),...]} | #c_fname{anno::[any(),...]} | #iletrec{anno::{_,_,_,_},defs::[any(),...],body::[any(),...]} | #icase{anno::{_,_,_,_},args::[any()],clauses::[any()],fc::{_,_,_,_,_,_}} | #ireceive2{anno::{_,_,_,_},clauses::[any()],action::[any()]} | #ifun{anno::{_,_,_,_},id::[any(),...],vars::[any()],clauses::[any(),...],fc::{_,_,_,_,_,_}} | #imatch{anno::{_,_,_,_},guard::[],fc::{_,_,_,_,_,_}} | #itry{anno::{_,_,_,_},args::[any()],vars::[any(),...],body::[any(),...],evars::[any(),...],handler::[any(),...]},_>
+v3_core.erl:646: Matching of pattern {'iprimop', _, _, _} tagged with a record name violates the declared type of #c_nil{anno::[any(),...]} | {'c_atom' | 'c_char' | 'c_float' | 'c_int' | 'c_string' | 'c_tuple' | 'c_var' | 'ibinary' | 'icatch' | 'ireceive1',[any(),...] | {_,_,_,_},_} | #c_cons{anno::[any(),...]} | #c_fname{anno::[any(),...]} | #iletrec{anno::{_,_,_,_},defs::[any(),...],body::[any(),...]} | #icase{anno::{_,_,_,_},args::[any()],clauses::[any()],fc::{_,_,_,_,_,_}} | #ireceive2{anno::{_,_,_,_},clauses::[any()],action::[any()]} | #ifun{anno::{_,_,_,_},id::[any(),...],vars::[any()],clauses::[any(),...],fc::{_,_,_,_,_,_}} | #imatch{anno::{_,_,_,_},guard::[],fc::{_,_,_,_,_,_}} | #itry{anno::{_,_,_,_},args::[any()],vars::[any(),...],body::[any(),...],evars::[any(),...],handler::[any(),...]}
diff --git a/lib/dialyzer/test/options1_SUITE_data/src/compiler/core_scan.erl b/lib/dialyzer/test/options1_SUITE_data/src/compiler/core_scan.erl
index 879af3efea..2f9f6a2bcc 100644
--- a/lib/dialyzer/test/options1_SUITE_data/src/compiler/core_scan.erl
+++ b/lib/dialyzer/test/options1_SUITE_data/src/compiler/core_scan.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
diff --git a/lib/dialyzer/test/options1_SUITE_data/src/compiler/sys_expand_pmod.erl b/lib/dialyzer/test/options1_SUITE_data/src/compiler/sys_expand_pmod.erl
index f48cc05b9c..cd13f468b2 100644
--- a/lib/dialyzer/test/options1_SUITE_data/src/compiler/sys_expand_pmod.erl
+++ b/lib/dialyzer/test/options1_SUITE_data/src/compiler/sys_expand_pmod.erl
@@ -341,6 +341,8 @@ expr({'fun',Line,Body,Info},St) ->
{function,M,F,A} -> %This is an error in lint!
{'fun',Line,{function,M,F,A},Info}
end;
+expr({named_fun,Loc,Name,Cs,Info},St) ->
+ {named_fun,Loc,Name,fun_clauses(Cs, St),Info};
expr({call,Lc,{atom,_,new}=Name,As0},#pmod{parameters=Ps}=St)
when length(As0) =:= length(Ps) ->
%% The new() function does not take a 'THIS' argument (it's static).
diff --git a/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options b/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
index e00e23bb66..ba0e6b1ad7 100644
--- a/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, [{defines, [{vsn, 42}]}]}.
+{dialyzer_options, [{defines, [{vsn, 42}]}, {warnings, [no_unknown]}]}.
{time_limit, 20}.
diff --git a/lib/dialyzer/test/r9c_SUITE_data/results/asn1 b/lib/dialyzer/test/r9c_SUITE_data/results/asn1
index c11105b76d..1cf03346ee 100644
--- a/lib/dialyzer/test/r9c_SUITE_data/results/asn1
+++ b/lib/dialyzer/test/r9c_SUITE_data/results/asn1
@@ -5,7 +5,7 @@ asn1ct.erl:1673: The pattern 'all' can never match the type 'asn1_module' | 'exc
asn1ct.erl:672: The pattern <{'false', Result}, _, _> can never match the type <{'true','true'},atom() | binary() | [atom() | [any()] | char()],[any()]>
asn1ct.erl:909: Guard test is_atom(Ext::[49 | 97 | 98 | 100 | 110 | 115]) can never succeed
asn1ct_check.erl:1698: The pattern {'error', _} can never match the type [any()]
-asn1ct_check.erl:2733: The pattern {'type', Tag, _, _, _, _} can never match the type 'ASN1_OPEN_TYPE' | {_,_} | {'fixedtypevaluefield',_,_}
+asn1ct_check.erl:2733: Matching of pattern {'type', Tag, _, _, _, _} tagged with a record name violates the declared type of 'ASN1_OPEN_TYPE' | {_,_} | {'fixedtypevaluefield',_,_}
asn1ct_check.erl:2738: The pattern <_S, _> can never match since previous clauses completely covered the type <#state{},#'ObjectClassFieldType'{class::#objectclass{fields::maybe_improper_list() | {_,_,_,_}},fieldname::{_,maybe_improper_list()},type::'ASN1_OPEN_TYPE' | {_,_} | {'fixedtypevaluefield',_,_}}>
asn1ct_check.erl:2887: The variable Other can never match since previous clauses completely covered the type any()
asn1ct_check.erl:3188: The pattern <_S, [], B> can never match the type <#state{},{'SingleValue',_},{'ValueRange',_}>
diff --git a/lib/dialyzer/test/race_SUITE_data/dialyzer_options b/lib/dialyzer/test/race_SUITE_data/dialyzer_options
index 44e1720715..6992fc6c40 100644
--- a/lib/dialyzer/test/race_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/race_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [race_conditions]}]}.
+{dialyzer_options, [{warnings, [race_conditions, no_unknown]}]}.
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
index d640f564cd..0382627cfc 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
@@ -1,3 +1,3 @@
-ets_insert_control_flow3.erl:21: The call ets:insert(Table::atom() | tid(),{'root',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'root') call in ets_insert_control_flow3.erl on line 12
-ets_insert_control_flow3.erl:23: The call ets:insert(Table::atom() | tid(),{'user',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'user') call in ets_insert_control_flow3.erl on line 13
+ets_insert_control_flow3.erl:21: The call ets:insert(Table::atom() | ets:tid(),{'root',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'root') call in ets_insert_control_flow3.erl on line 12
+ets_insert_control_flow3.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'user',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'user') call in ets_insert_control_flow3.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
index 6f34e75902..22944fd066 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
@@ -1,3 +1,3 @@
-ets_insert_control_flow4.erl:21: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 13
-ets_insert_control_flow4.erl:23: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 13
+ets_insert_control_flow4.erl:21: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 13
+ets_insert_control_flow4.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
index 5af592f43f..e172887f34 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
@@ -1,5 +1,5 @@
-ets_insert_control_flow5.erl:22: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
-ets_insert_control_flow5.erl:23: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 13
-ets_insert_control_flow5.erl:25: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
-ets_insert_control_flow5.erl:26: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 13
+ets_insert_control_flow5.erl:22: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
+ets_insert_control_flow5.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 13
+ets_insert_control_flow5.erl:25: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
+ets_insert_control_flow5.erl:26: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
index 58f934a190..6a34337a2c 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
@@ -1,5 +1,5 @@
-ets_insert_param.erl:13: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_param.erl on line 10
-ets_insert_param.erl:14: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 14, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 15
-ets_insert_param.erl:17: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_param.erl on line 10
-ets_insert_param.erl:18: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 18
+ets_insert_param.erl:13: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_param.erl on line 10
+ets_insert_param.erl:14: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 14, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 15
+ets_insert_param.erl:17: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_param.erl on line 10
+ets_insert_param.erl:18: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 18
diff --git a/lib/dialyzer/test/small_SUITE_data/dialyzer_options b/lib/dialyzer/test/small_SUITE_data/dialyzer_options
index 50991c9bc5..0d91699e4d 100644
--- a/lib/dialyzer/test/small_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/small_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, []}.
+{dialyzer_options, [{warnings, [no_unknown]}]}.
diff --git a/lib/dialyzer/test/small_SUITE_data/results/confusing_record_warning b/lib/dialyzer/test/small_SUITE_data/results/confusing_record_warning
deleted file mode 100644
index ac3d89b02b..0000000000
--- a/lib/dialyzer/test/small_SUITE_data/results/confusing_record_warning
+++ /dev/null
@@ -1,3 +0,0 @@
-
-confusing_record_warning.erl:18: Function test/1 has no local return
-confusing_record_warning.erl:18: Matching of pattern {'r', [_]} tagged with a record name violates the declared type of #r{field::'binary' | 'undefined'}
diff --git a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
index 173ff3a9f1..fbdd182358 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
+++ b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
@@ -1,27 +1,28 @@
contracts_with_subtypes.erl:106: The call contracts_with_subtypes:rec_arg({'a','b'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
contracts_with_subtypes.erl:107: The call contracts_with_subtypes:rec_arg({'b','a'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:108: The call contracts_with_subtypes:rec_arg({'a',{'b','a'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
contracts_with_subtypes.erl:109: The call contracts_with_subtypes:rec_arg({'b',{'a','b'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:110: The call contracts_with_subtypes:rec_arg({'a',{'b',{'a','b'}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:111: The call contracts_with_subtypes:rec_arg({'b',{'a',{'b','a'}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:142: The pattern 1 can never match the type string()
-contracts_with_subtypes.erl:145: The pattern 'alpha' can never match the type {'ok',_} | {'ok',_,string()}
-contracts_with_subtypes.erl:147: The pattern 42 can never match the type {'ok',_} | {'ok',_,string()}
-contracts_with_subtypes.erl:163: The pattern 'alpha' can never match the type {'ok',X}
-contracts_with_subtypes.erl:165: The pattern 42 can never match the type {'ok',X}
-contracts_with_subtypes.erl:183: The pattern 'alpha' can never match the type {'ok',X}
-contracts_with_subtypes.erl:185: The pattern 42 can never match the type {'ok',X}
-contracts_with_subtypes.erl:202: The pattern 1 can never match the type string()
-contracts_with_subtypes.erl:205: The pattern {'ok', _} can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:206: The pattern 'alpha' can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:207: The pattern {'ok', 42} can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:208: The pattern 42 can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:234: Function flat_ets_new_t/0 has no local return
-contracts_with_subtypes.erl:235: The call contracts_with_subtypes:flat_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,'set' | 'ordered_set' | 'bag' | 'duplicate_bag' | 'public' | 'protected' | 'private' | 'named_table' | {'keypos',integer()} | {'heir',pid(),term()} | {'heir','none'} | {'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed')
+contracts_with_subtypes.erl:135: The call contracts_with_subtypes:rec2({'a','b'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:136: The call contracts_with_subtypes:rec2({'b','a'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:137: The call contracts_with_subtypes:rec2({'a',{'b','a'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:138: The call contracts_with_subtypes:rec2({'b',{'a','b'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:171: The pattern 1 can never match the type string()
+contracts_with_subtypes.erl:174: The pattern 'alpha' can never match the type {'ok',_} | {'ok',_,string()}
+contracts_with_subtypes.erl:176: The pattern 42 can never match the type {'ok',_} | {'ok',_,string()}
+contracts_with_subtypes.erl:192: The pattern 'alpha' can never match the type {'ok',_}
+contracts_with_subtypes.erl:194: The pattern 42 can never match the type {'ok',_}
+contracts_with_subtypes.erl:212: The pattern 'alpha' can never match the type {'ok',_}
+contracts_with_subtypes.erl:214: The pattern 42 can never match the type {'ok',_}
+contracts_with_subtypes.erl:231: The pattern 1 can never match the type string()
+contracts_with_subtypes.erl:234: The pattern {'ok', _} can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:235: The pattern 'alpha' can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:236: The pattern {'ok', 42} can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:237: The pattern 42 can never match the type {'ok',_,string()}
contracts_with_subtypes.erl:23: Invalid type specification for function contracts_with_subtypes:extract2/0. The success typing is () -> 'something'
-contracts_with_subtypes.erl:261: Function factored_ets_new_t/0 has no local return
-contracts_with_subtypes.erl:262: The call contracts_with_subtypes:factored_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,Type | Access | 'named_table' | {'keypos',Pos} | {'heir',Pid::pid(),HeirData} | {'heir','none'} | Tweaks), is_subtype(Type,type()), is_subtype(Access,access()), is_subtype(Tweaks,{'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed'), is_subtype(Pos,pos_integer()), is_subtype(HeirData,term())
+contracts_with_subtypes.erl:263: Function flat_ets_new_t/0 has no local return
+contracts_with_subtypes.erl:264: The call contracts_with_subtypes:flat_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,'set' | 'ordered_set' | 'bag' | 'duplicate_bag' | 'public' | 'protected' | 'private' | 'named_table' | {'keypos',integer()} | {'heir',pid(),term()} | {'heir','none'} | {'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed')
+contracts_with_subtypes.erl:290: Function factored_ets_new_t/0 has no local return
+contracts_with_subtypes.erl:291: The call contracts_with_subtypes:factored_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,Type | Access | 'named_table' | {'keypos',Pos} | {'heir',Pid::pid(),HeirData} | {'heir','none'} | Tweaks), is_subtype(Type,type()), is_subtype(Access,access()), is_subtype(Tweaks,{'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed'), is_subtype(Pos,pos_integer()), is_subtype(HeirData,term())
contracts_with_subtypes.erl:77: The call contracts_with_subtypes:foo1(5) breaks the contract (Arg1) -> Res when is_subtype(Arg1,atom()), is_subtype(Res,atom())
contracts_with_subtypes.erl:78: The call contracts_with_subtypes:foo2(5) breaks the contract (Arg1) -> Res when is_subtype(Arg1,Arg2), is_subtype(Arg2,atom()), is_subtype(Res,atom())
contracts_with_subtypes.erl:79: The call contracts_with_subtypes:foo3(5) breaks the contract (Arg1) -> Res when is_subtype(Arg2,atom()), is_subtype(Arg1,Arg2), is_subtype(Res,atom())
diff --git a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2 b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
new file mode 100644
index 0000000000..9f5433a13d
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
@@ -0,0 +1,3 @@
+
+contracts_with_subtypes2.erl:18: Function t/0 has no local return
+contracts_with_subtypes2.erl:19: The call contracts_with_subtypes2:t({'a',{'b',{'c',{'d',{'e',{'g',3}}}}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A}), is_subtype(A,{'b',B}), is_subtype(B,{'c',C}), is_subtype(C,{'d',D}), is_subtype(D,{'e',E}), is_subtype(E,{'f',_})
diff --git a/lib/appmon/doc/html/.gitignore b/lib/dialyzer/test/small_SUITE_data/results/eep37
index e69de29bb2..e69de29bb2 100644
--- a/lib/appmon/doc/html/.gitignore
+++ b/lib/dialyzer/test/small_SUITE_data/results/eep37
diff --git a/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside b/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside
new file mode 100644
index 0000000000..3e597ef1bc
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside
@@ -0,0 +1,7 @@
+
+funs_from_outside.erl:18: The pattern 'error' can never match the type {'ok','nothing' | 'something'}
+funs_from_outside.erl:32: Function run2/2 has no local return
+funs_from_outside.erl:35: Function testb/3 has no local return
+funs_from_outside.erl:41: The pattern 'error' can never match the type {'ok','nothing' | 'something'}
+funs_from_outside.erl:78: Function test2/1 has no local return
+funs_from_outside.erl:83: The pattern 'error' can never match the type 'ok'
diff --git a/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2 b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
new file mode 100644
index 0000000000..4565112ea0
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
@@ -0,0 +1,2 @@
+
+scala_user.erl:5: Invalid type specification for function scala_user:is_list/2. The success typing is (maybe_improper_list() | tuple(),_) -> boolean()
diff --git a/lib/dialyzer/test/small_SUITE_data/results/literals b/lib/dialyzer/test/small_SUITE_data/results/literals
new file mode 100644
index 0000000000..03e161ca71
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/literals
@@ -0,0 +1,14 @@
+
+literals.erl:11: Function t1/0 has no local return
+literals.erl:12: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:14: Function t2/0 has no local return
+literals.erl:15: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:17: Function t3/0 has no local return
+literals.erl:18: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:21: Record construction #r{id::'a'} violates the declared type of field id::'integer' | 'undefined'
+literals.erl:23: Function m1/1 has no local return
+literals.erl:23: Matching of pattern {'r', 'a'} tagged with a record name violates the declared type of #r{id::'integer' | 'undefined'}
+literals.erl:26: Function m2/1 has no local return
+literals.erl:26: Matching of pattern {'r', 'a'} tagged with a record name violates the declared type of #r{id::'integer' | 'undefined'}
+literals.erl:29: Function m3/1 has no local return
+literals.erl:29: The pattern {{'r', 'a'}} can never match the type any()
diff --git a/lib/dialyzer/test/small_SUITE_data/results/maps_difftype b/lib/dialyzer/test/small_SUITE_data/results/maps_difftype
new file mode 100644
index 0000000000..8980321135
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/maps_difftype
@@ -0,0 +1,3 @@
+
+maps_difftype.erl:10: Function empty_mismatch/1 has no local return
+maps_difftype.erl:11: The pattern ~{}~ can never match the type tuple()
diff --git a/lib/dialyzer/test/small_SUITE_data/results/my_sofs b/lib/dialyzer/test/small_SUITE_data/results/my_sofs
index bc97c08d62..0b933e6cd7 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/my_sofs
+++ b/lib/dialyzer/test/small_SUITE_data/results/my_sofs
@@ -1,3 +1,3 @@
-my_sofs.erl:34: The pattern {'Set', _, _} can never match the type #'OrdSet'{}
-my_sofs.erl:54: The pattern {'Set', _, _} can never match the type #'OrdSet'{}
+my_sofs.erl:34: Matching of pattern {'Set', _, _} tagged with a record name violates the declared type of #'OrdSet'{}
+my_sofs.erl:54: Matching of pattern {'Set', _, _} tagged with a record name violates the declared type of #'OrdSet'{}
diff --git a/lib/dialyzer/test/small_SUITE_data/results/predef b/lib/dialyzer/test/small_SUITE_data/results/predef
new file mode 100644
index 0000000000..85e210d6e4
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/predef
@@ -0,0 +1,8 @@
+
+predef.erl:19: Invalid type specification for function predef:array/1. The success typing is (array:array(_)) -> array:array(_)
+predef.erl:24: Invalid type specification for function predef:dict/1. The success typing is (dict:dict(_,_)) -> dict:dict(_,_)
+predef.erl:29: Invalid type specification for function predef:digraph/1. The success typing is (digraph:graph()) -> [any()]
+predef.erl:39: Invalid type specification for function predef:gb_set/1. The success typing is (gb_sets:set(_)) -> gb_sets:set(_)
+predef.erl:44: Invalid type specification for function predef:gb_tree/1. The success typing is (gb_trees:tree(_,_)) -> gb_trees:tree(_,_)
+predef.erl:49: Invalid type specification for function predef:queue/1. The success typing is (queue:queue(_)) -> queue:queue(_)
+predef.erl:54: Invalid type specification for function predef:set/1. The success typing is (sets:set(_)) -> sets:set(_)
diff --git a/lib/dialyzer/test/small_SUITE_data/results/pretty_bitstring b/lib/dialyzer/test/small_SUITE_data/results/pretty_bitstring
new file mode 100644
index 0000000000..0ad6eee766
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/pretty_bitstring
@@ -0,0 +1,3 @@
+
+pretty_bitstring.erl:7: Function t/0 has no local return
+pretty_bitstring.erl:8: The call binary:copy(#{#<1>(8, 1, 'integer', ['unsigned', 'big']), #<2>(8, 1, 'integer', ['unsigned', 'big']), #<3>(3, 1, 'integer', ['unsigned', 'big'])}#,2) breaks the contract (Subject,N) -> binary() when is_subtype(Subject,binary()), is_subtype(N,non_neg_integer())
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_construct b/lib/dialyzer/test/small_SUITE_data/results/record_construct
index c0110b144f..4c40fec298 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/record_construct
+++ b/lib/dialyzer/test/small_SUITE_data/results/record_construct
@@ -1,6 +1,6 @@
record_construct.erl:15: Function t_opa/0 has no local return
-record_construct.erl:16: Record construction #r_opa{b::gb_set(),c::42,e::'false'} violates the declared type of field c::boolean()
+record_construct.erl:16: Record construction #r_opa{b::gb_sets:set(_),c::42,e::'false'} violates the declared type of field c::boolean()
record_construct.erl:20: Function t_rem/0 has no local return
record_construct.erl:21: Record construction #r_rem{a::'gazonk'} violates the declared type of field a::string()
record_construct.erl:6: Function t_loc/0 has no local return
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_pat b/lib/dialyzer/test/small_SUITE_data/results/record_pat
index 9a3f925e42..a46be6c451 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/record_pat
+++ b/lib/dialyzer/test/small_SUITE_data/results/record_pat
@@ -1,2 +1,2 @@
-record_pat.erl:14: The pattern {'foo', 'baz'} violates the declared type for #foo{}
+record_pat.erl:14: Matching of pattern {'foo', 'baz'} tagged with a record name violates the declared type of #foo{bar::'undefined' | integer()}
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_test b/lib/dialyzer/test/small_SUITE_data/results/record_test
index 9715f0dcfb..7060bfa200 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/record_test
+++ b/lib/dialyzer/test/small_SUITE_data/results/record_test
@@ -1,3 +1,3 @@
-record_test.erl:19: The pattern {'foo', _} can never match the type 'foo'
+record_test.erl:19: Matching of pattern {'foo', _} tagged with a record name violates the declared type of 'foo'
record_test.erl:21: The variable _ can never match since previous clauses completely covered the type 'foo'
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_update b/lib/dialyzer/test/small_SUITE_data/results/record_update
new file mode 100644
index 0000000000..ea52057adf
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/record_update
@@ -0,0 +1,2 @@
+
+record_update.erl:7: Invalid type specification for function record_update:quux/2. The success typing is (#foo{bar::atom()},atom()) -> #foo{bar::atom()}
diff --git a/lib/dialyzer/test/small_SUITE_data/results/relevant_record_warning b/lib/dialyzer/test/small_SUITE_data/results/relevant_record_warning
new file mode 100644
index 0000000000..2e417e1b2a
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/relevant_record_warning
@@ -0,0 +1,3 @@
+
+relevant_record_warning.erl:22: Function test/1 has no local return
+relevant_record_warning.erl:23: Record construction #r{field::<<_:8>>} violates the declared type of field field::'binary' | 'undefined'
diff --git a/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl b/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl
deleted file mode 100644
index 8c2497ed21..0000000000
--- a/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl
+++ /dev/null
@@ -1,16 +0,0 @@
-%%% -*- erlang-indent-level: 2 -*-
-%%%------------------------------------------------------------------------
-%%% File : bin_compr.erl
-%%% Purpose : Test case which crashes in dialyzer_dataflow:bind_bin_segs/5.
-%%%------------------------------------------------------------------------
-
--module(bin_compr).
-
--export([bc/1]).
-
-%% The binary comprehension below is stupid: it consumes the whole
-%% bitstr in one go and produces a [666] result provided Bits is a
-%% bitstr of at least 8 bits. Still, this is a valid Erlang program
-%% and dialyzer's analysis should not crash on it.
-bc(Bits) ->
- [666 || <<_:8/integer, _/bits>> <= Bits].
diff --git a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
index d72138d509..d7dfd9752e 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
@@ -103,15 +103,44 @@ c(babb) -> rec_arg({b, {a, {b, b}}});
c(ababb) -> rec_arg({a, {b, {a, {b, b}}}});
c(babaa) -> rec_arg({b, {a, {b, {a, a}}}}).
-w(ab) -> rec_arg({a, b});
-w(ba) -> rec_arg({b, a});
-w(aba) -> rec_arg({a, {b, a}});
-w(bab) -> rec_arg({b, {a, b}});
-w(abab) -> rec_arg({a, {b, {a, b}}});
-w(baba) -> rec_arg({b, {a, {b, a}}});
+w(ab) -> rec_arg({a, b}); % breaks the contract
+w(ba) -> rec_arg({b, a}); % breaks the contract
+w(aba) -> rec_arg({a, {b, a}}); % no longer breaks the contract
+w(bab) -> rec_arg({b, {a, b}}); % breaks the contract
+w(abab) -> rec_arg({a, {b, {a, b}}}); % no longer breaks the contract
+w(baba) -> rec_arg({b, {a, {b, a}}}); % no longer breaks the contract
w(ababa) -> rec_arg({a, {b, {a, {b, a}}}});
w(babab) -> rec_arg({b, {a, {b, {a, b}}}}).
+%% For comparison: the same thing with types
+
+-type ab() :: {a, a()} | {b, b()}.
+-type a() :: a | {b, b()}.
+-type b() :: b | {a, a()}.
+
+-spec rec2(Arg) -> ok when
+ Arg :: ab().
+
+rec2(X) -> get(X).
+
+d(aa) -> rec2({a, a});
+d(bb) -> rec2({b, b});
+d(abb) -> rec2({a, {b, b}});
+d(baa) -> rec2({b, {a, a}});
+d(abaa) -> rec2({a, {b, {a, a}}});
+d(babb) -> rec2({b, {a, {b, b}}});
+d(ababb) -> rec2({a, {b, {a, {b, b}}}});
+d(babaa) -> rec2({b, {a, {b, {a, a}}}}).
+
+q(ab) -> rec2({a, b}); % breaks the contract
+q(ba) -> rec2({b, a}); % breaks the contract
+q(aba) -> rec2({a, {b, a}}); % breaks the contract
+q(bab) -> rec2({b, {a, b}}); % breaks the contract
+q(abab) -> rec2({a, {b, {a, b}}});
+q(baba) -> rec2({b, {a, {b, a}}});
+q(ababa) -> rec2({a, {b, {a, {b, a}}}});
+q(babab) -> rec2({b, {a, {b, {a, b}}}}).
+
%===============================================================================
-type dublo(X) :: {X, X}.
@@ -143,7 +172,7 @@ st(X) when is_atom(X) ->
_Other -> ok
end;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
@@ -161,7 +190,7 @@ dt(X) when is_atom(X) ->
err2 -> ok;
{ok, X} -> ok;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
@@ -181,7 +210,7 @@ dt2(X) when is_atom(X) ->
err2 -> ok;
{ok, X} -> ok;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl
new file mode 100644
index 0000000000..d2f945b284
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl
@@ -0,0 +1,40 @@
+-module(contracts_with_subtypes2).
+
+-compile(export_all).
+
+-behaviour(supervisor).
+
+-spec t(Arg) -> ok when
+ Arg :: {a, A},
+ A :: {b, B},
+ B :: {c, C},
+ C :: {d, D},
+ D :: {e, E},
+ E :: {f, _}.
+
+t(X) ->
+ get(X).
+
+t() ->
+ t({a, {b, {c, {d, {e, {g, 3}}}}}}). % breaks the contract
+
+%% This one should possibly result in warnings about unused variables.
+-spec l() -> ok when
+ X :: Y,
+ Y :: X.
+
+l() ->
+ ok.
+
+%% This is the example from seq12547 (ticket OTP-11798).
+%% There used to be a warning.
+
+-spec init(term()) -> Result when
+ Result :: {ok, {{supervisor:strategy(),
+ non_neg_integer(),
+ pos_integer()},
+ [supervisor:child_spec()]}}
+ | ignore.
+
+init(_) ->
+ foo:bar().
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl
new file mode 100644
index 0000000000..f362a06bca
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl
@@ -0,0 +1,6 @@
+-type host() :: nonempty_string().
+-type path() :: nonempty_string().
+-type url() :: binary().
+
+% The host portion of a url, if available.
+-type url_host() :: host() | none.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl
new file mode 100644
index 0000000000..8cab65fc9c
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl
@@ -0,0 +1,148 @@
+
+-define(SECOND, 1000).
+-define(MINUTE, (60 * ?SECOND)).
+-define(HOUR, (60 * ?MINUTE)).
+-define(DAY, (24 * ?HOUR)).
+-define(MB, (1024 * 1024)).
+
+% Maximum length of tag/blob prefix
+-define(NAME_MAX, 511).
+
+% How long ddfs node startup can take. The most time-consuming part
+% is the scanning of the tag objects in the node's DDFS volumes.
+-define(NODE_STARTUP, (1 * ?MINUTE)).
+
+% How long to wait on the master for replies from nodes.
+-define(NODE_TIMEOUT, (10 * ?SECOND)).
+
+% How long to wait for a reply from an operation coordinated by the
+% master that accesses nodes. This value should be larger than
+% NODE_TIMEOUT.
+-define(NODEOP_TIMEOUT, (1 * ?MINUTE)).
+
+% The minimum amount of free space a node must have, to be considered
+% a primary candidate host for a new blob.
+-define(MIN_FREE_SPACE, (1024 * ?MB)).
+
+% The maximum number of active HTTP connections on a system (this
+% applies separately for GET and PUT operations).
+-define(HTTP_MAX_ACTIVE, 3).
+
+% The maximum number of waiting HTTP connections to queue up on a busy system.
+-define(HTTP_QUEUE_LENGTH, 100).
+
+% The maximum number of simultaneous HTTP connections. Note that
+% HTTP_MAX_CONNS * 2 * 2 + 32 < Maximum number of file descriptors, where
+% 2 = Get and put, 2 = two FDs required for each connection (connection
+% itself + a file it accesses), 32 = a guess how many extra fds is needed.
+-define(HTTP_MAX_CONNS, 128).
+
+% How long to keep a PUT request in queue if the system is busy.
+-define(PUT_WAIT_TIMEOUT, (1 * ?MINUTE)).
+
+% How long to keep a GET request in queue if the system is busy.
+-define(GET_WAIT_TIMEOUT, (1 * ?MINUTE)).
+
+% An unused loaded tag expires in TAG_EXPIRES milliseconds. Note that
+% if TAG_EXPIRES is not smaller than GC_INTERVAL, tags will never
+% expire from the memory cache and will always take up memory.
+-define(TAG_EXPIRES, (10 * ?HOUR)).
+
+% How often the master's cache of all known tag names is refreshed.
+% This refresh is only needed to purge deleted tags eventually from
+% the tag cache. It doesn't harm to have a long interval.
+-define(TAG_CACHE_INTERVAL, (10 * ?MINUTE)).
+
+% How soon a tag object initialized in memory expires if it's content
+% cannot be fetched from the cluster.
+-define(TAG_EXPIRES_ONERROR, (1 * ?SECOND)).
+
+% How often a DDFS node should refresh its tag cache from disk.
+-define(FIND_TAGS_INTERVAL, ?DAY).
+
+% How often buffered (delayed) updates to a tag need to be
+% flushed. Tradeoff: The longer the interval, the more updates are
+% bundled in a single commit. On the other hand, in the worst case
+% the requester has to wait for the full interval before getting a
+% reply. A long interval also increases the likelihood that the server
+% crashes before the commit has finished successfully, making requests
+% more unreliable.
+-define(DELAYED_FLUSH_INTERVAL, (1 * ?SECOND)).
+
+% How long to wait between garbage collection runs.
+-define(GC_INTERVAL, ?DAY).
+
+% Max duration for a GC run. This should be smaller than
+% min(ORPHANED_{BLOB,TAG}_EXPIRES).
+-define(GC_MAX_DURATION, (3 * ?DAY)).
+
+% How long to wait after startup for cluster to stabilize before
+% starting the first GC run.
+-define(GC_DEFAULT_INITIAL_WAIT, (5 * ?MINUTE)).
+
+% The longest potential interval between messages in the GC protocol;
+% used to ensure GC makes forward progress. This can be set to the
+% estimated time to traverse all the volumes on a DDFS node.
+-define(GC_PROGRESS_INTERVAL, (30 * ?MINUTE)).
+
+% Number of extra replicas (i.e. lost replicas recovered during GC) to
+% allow before deleting extra replicas.
+-define(NUM_EXTRA_REPLICAS, 1).
+
+% Permissions for files backing blobs and tags.
+-define(FILE_MODE, 8#00400).
+
+% How often to check available disk space in ddfs_node.
+-define(DISKSPACE_INTERVAL, (10 * ?SECOND)).
+
+% The maximum size of payloads of HTTP requests to the /ddfs/tag/
+% prefix.
+-define(MAX_TAG_BODY_SIZE, (512 * ?MB)).
+
+% Tag attribute names and values have a limited size, and there
+% can be only a limited number of them.
+-define(MAX_TAG_ATTRIB_NAME_SIZE, 1024).
+-define(MAX_TAG_ATTRIB_VALUE_SIZE, 1024).
+-define(MAX_NUM_TAG_ATTRIBS, 1000).
+
+% How long HTTP requests that perform tag updates should wait to
+% finish (a long time).
+-define(TAG_UPDATE_TIMEOUT, ?DAY).
+
+% Timeout for re-replicating a single blob over HTTP PUT. This
+% depends on the largest blobs hosted by DDFS, and the speed of the
+% cluster network.
+-define(GC_PUT_TIMEOUT, (180 * ?MINUTE)).
+
+% Delete !partial files after this many milliseconds.
+-define(PARTIAL_EXPIRES, ?DAY).
+
+% When orphaned blob can be deleted. This should be large enough that
+% you can upload all the new blobs of a tag and perform the tag update
+% within this time.
+-define(ORPHANED_BLOB_EXPIRES, (5 * ?DAY)).
+
+% When orphaned tag can be deleted.
+-define(ORPHANED_TAG_EXPIRES, (5 * ?DAY)).
+
+% How long a tag has to stay on the deleted list before
+% we can permanently forget it, after all known instances
+% of the tag object have been removed. This quarantine period
+% ensures that a node that was temporarily unavailable
+% and reactivates can't resurrect deleted tags. You
+% must ensure that all temporarily inactive nodes
+% are reactivated (or cleaned) within the ?DELETED_TAG_EXPIRES
+% time frame.
+%
+% This value _must_ be larger than the other time-related DDFS
+% parameters listed in this file. In particular, it must be larger
+% than ORPHANED_TAG_EXPIRES.
+-define(DELETED_TAG_EXPIRES, (30 * ?DAY)).
+
+% How many times a tag operation should be retried before aborting.
+-define(MAX_TAG_OP_RETRIES, 3).
+
+% How long to wait before timing out a tag retrieval. This should be
+% large enough to read a large tag object off the disk and send it
+% over the network.
+-define(GET_TAG_TIMEOUT, (5 * ?MINUTE)).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl
new file mode 100644
index 0000000000..e43ec23fe1
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl
@@ -0,0 +1,9 @@
+-type volume_name() :: nonempty_string().
+
+% Diskinfo is {FreeSpace, UsedSpace}.
+-type diskinfo() :: {non_neg_integer(), non_neg_integer()}.
+-type volume() :: {diskinfo(), volume_name()}.
+
+-type object_type() :: 'blob' | 'tag'.
+-type object_name() :: binary().
+-type taginfo() :: {erlang:timestamp(), volume_name()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl
new file mode 100644
index 0000000000..dc43f7586b
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl
@@ -0,0 +1,17 @@
+-type local_object() :: {object_name(), node()}.
+-type phase() :: 'start' | 'build_map' | 'map_wait' | 'gc'
+ | 'rr_blobs' | 'rr_blobs_wait' | 'rr_tags'.
+-type protocol_msg() :: {'check_blob', object_name()} | 'start_gc' | 'end_rr'.
+
+-type blob_update() :: {object_name(), 'filter' | [url()]}.
+
+-type check_blob_result() :: 'false' | {'true', volume_name()}.
+
+% GC statistics
+
+% {Files, Bytes}
+-type gc_stat() :: {non_neg_integer(), non_neg_integer()}.
+% {Kept, Deleted}
+-type obj_stats() :: {gc_stat(), gc_stat()}.
+% {Tags, Blobs}.
+-type gc_run_stats() :: {obj_stats(), obj_stats()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl
new file mode 100644
index 0000000000..2be2773dc5
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl
@@ -0,0 +1,531 @@
+-module(ddfs_master).
+-behaviour(gen_server).
+
+-export([start_link/0]).
+-export([get_tags/1, get_tags/3,
+ get_nodeinfo/1,
+ get_read_nodes/0,
+ get_hosted_tags/1,
+ gc_blacklist/0, gc_blacklist/1,
+ gc_stats/0,
+ choose_write_nodes/3,
+ new_blob/4, new_blob/5,
+ safe_gc_blacklist/0, safe_gc_blacklist/1,
+ refresh_tag_cache/0,
+ tag_notify/2,
+ tag_operation/2, tag_operation/3,
+ update_gc_stats/1,
+ update_nodes/1
+ ]).
+-export([init/1,
+ handle_call/3,
+ handle_cast/2,
+ handle_info/2,
+ terminate/2,
+ code_change/3]).
+
+-define(WEB_PORT, 8011).
+
+-compile(nowarn_deprecated_type).
+
+-include("common_types.hrl").
+-include("gs_util.hrl").
+-include("config.hrl").
+-include("ddfs.hrl").
+-include("ddfs_tag.hrl").
+-include("ddfs_gc.hrl").
+
+-type node_info() :: {node(), {non_neg_integer(), non_neg_integer()}}.
+-type gc_stats() :: none | gc_run_stats().
+
+-record(state, {tags = gb_trees:empty() :: gb_trees:tree(),
+ tag_cache = false :: false | gb_sets:set(),
+ cache_refresher :: pid(),
+
+ nodes = [] :: [node_info()],
+ write_blacklist = [] :: [node()],
+ read_blacklist = [] :: [node()],
+ gc_blacklist = [] :: [node()],
+ safe_gc_blacklist = gb_sets:empty() :: gb_sets:set(),
+ gc_stats = none :: none | {gc_stats(), erlang:timestamp()}}).
+-type state() :: #state{}.
+-type replyto() :: {pid(), reference()}.
+
+-export_type([gc_stats/0, node_info/0]).
+
+%% ===================================================================
+%% API functions
+
+-spec start_link() -> {ok, pid()}.
+start_link() ->
+ lager:info("DDFS master starts"),
+ case gen_server:start_link({local, ?MODULE}, ?MODULE, [], []) of
+ {ok, Server} -> {ok, Server};
+ {error, {already_started, Server}} -> {ok, Server}
+ end.
+
+-spec tag_operation(term(), tagname()) -> term().
+tag_operation(Op, Tag) ->
+ gen_server:call(?MODULE, {tag, Op, Tag}).
+-spec tag_operation(term(), tagname(), non_neg_integer() | infinity) ->
+ term().
+tag_operation(Op, Tag, Timeout) ->
+ gen_server:call(?MODULE, {tag, Op, Tag}, Timeout).
+
+-spec tag_notify(term(), tagname()) -> ok.
+tag_notify(Op, Tag) ->
+ gen_server:cast(?MODULE, {tag_notify, Op, Tag}).
+
+-spec get_nodeinfo(all) -> {ok, [node_info()]}.
+get_nodeinfo(all) ->
+ gen_server:call(?MODULE, {get_nodeinfo, all}).
+
+-spec get_read_nodes() -> {ok, [node()], non_neg_integer()} | {error, term()}.
+get_read_nodes() ->
+ gen_server:call(?MODULE, get_read_nodes, infinity).
+
+-spec gc_blacklist() -> {ok, [node()]}.
+gc_blacklist() ->
+ gen_server:call(?MODULE, gc_blacklist).
+
+-spec gc_blacklist([node()]) -> ok.
+gc_blacklist(Nodes) ->
+ gen_server:cast(?MODULE, {gc_blacklist, Nodes}).
+
+-spec gc_stats() -> {ok, none | {gc_stats(), erlang:timestamp()}} | {error, term()}.
+gc_stats() ->
+ gen_server:call(?MODULE, gc_stats).
+
+-spec get_hosted_tags(host()) -> {ok, [tagname()]} | {error, term()}.
+get_hosted_tags(Host) ->
+ gen_server:call(?MODULE, {get_hosted_tags, Host}).
+
+-spec choose_write_nodes(non_neg_integer(), [node()], [node()]) -> {ok, [node()]}.
+choose_write_nodes(K, Include, Exclude) ->
+ gen_server:call(?MODULE, {choose_write_nodes, K, Include, Exclude}).
+
+-spec get_tags(gc) -> {ok, [tagname()], [node()]} | too_many_failed_nodes;
+ (safe) -> {ok, [binary()]} | too_many_failed_nodes.
+get_tags(Mode) ->
+ get_tags(?MODULE, Mode, ?GET_TAG_TIMEOUT).
+
+-spec get_tags(server(), gc, non_neg_integer()) ->
+ {ok, [tagname()], [node()]} | too_many_failed_nodes;
+ (server(), safe, non_neg_integer()) ->
+ {ok, [binary()]} | too_many_failed_nodes.
+get_tags(Server, Mode, Timeout) ->
+ disco_profile:timed_run(
+ fun() -> gen_server:call(Server, {get_tags, Mode}, Timeout) end,
+ get_tags).
+
+-spec new_blob(string()|object_name(), non_neg_integer(), [node()], [node()]) ->
+ too_many_replicas | {ok, [nonempty_string()]}.
+new_blob(Obj, K, Include, Exclude) ->
+ gen_server:call(?MODULE, {new_blob, Obj, K, Include, Exclude}, infinity).
+
+-spec new_blob(server(), string()|object_name(), non_neg_integer(), [node()], [node()]) ->
+ too_many_replicas | {ok, [nonempty_string()]}.
+new_blob(Master, Obj, K, Include, Exclude) ->
+ gen_server:call(Master, {new_blob, Obj, K, Include, Exclude}, infinity).
+
+-spec safe_gc_blacklist() -> {ok, [node()]} | {error, term()}.
+safe_gc_blacklist() ->
+ gen_server:call(?MODULE, safe_gc_blacklist).
+
+-spec safe_gc_blacklist(gb_sets:set()) -> ok.
+safe_gc_blacklist(SafeGCBlacklist) ->
+ gen_server:cast(?MODULE, {safe_gc_blacklist, SafeGCBlacklist}).
+
+-spec update_gc_stats(gc_run_stats()) -> ok.
+update_gc_stats(Stats) ->
+ gen_server:cast(?MODULE, {update_gc_stats, Stats}).
+
+-type nodes_update() :: [{node(), boolean(), boolean()}].
+-spec update_nodes(nodes_update()) -> ok.
+update_nodes(DDFSNodes) ->
+ gen_server:cast(?MODULE, {update_nodes, DDFSNodes}).
+
+-spec update_nodestats(gb_trees:tree()) -> ok.
+update_nodestats(NewNodes) ->
+ gen_server:cast(?MODULE, {update_nodestats, NewNodes}).
+
+-spec update_tag_cache(gb_sets:set()) -> ok.
+update_tag_cache(TagCache) ->
+ gen_server:cast(?MODULE, {update_tag_cache, TagCache}).
+
+-spec refresh_tag_cache() -> ok.
+refresh_tag_cache() ->
+ gen_server:cast(?MODULE, refresh_tag_cache).
+
+%% ===================================================================
+%% gen_server callbacks
+
+-spec init(_) -> gs_init().
+init(_Args) ->
+ _ = [disco_profile:new_histogram(Name)
+ || Name <- [get_tags, do_get_tags_all, do_get_tags_filter,
+ do_get_tags_safe, do_get_tags_gc]],
+ spawn_link(fun() -> monitor_diskspace() end),
+ spawn_link(fun() -> ddfs_gc:start_gc(disco:get_setting("DDFS_DATA")) end),
+ Refresher = spawn_link(fun() -> refresh_tag_cache_proc() end),
+ put(put_port, disco:get_setting("DDFS_PUT_PORT")),
+ {ok, #state{cache_refresher = Refresher}}.
+
+-type choose_write_nodes_msg() :: {choose_write_nodes, non_neg_integer(), [node()], [node()]}.
+-type new_blob_msg() :: {new_blob, string() | object_name(), non_neg_integer(), [node()]}.
+-type tag_msg() :: {tag, ddfs_tag:call_msg(), tagname()}.
+-spec handle_call(dbg_state_msg(), from(), state()) ->
+ gs_reply(state());
+ ({get_nodeinfo, all}, from(), state()) ->
+ gs_reply({ok, [node_info()]});
+ (get_read_nodes, from(), state()) ->
+ gs_reply({ok, [node()], non_neg_integer});
+ (gc_blacklist, from(), state()) ->
+ gs_reply({ok, [node()]});
+ (gc_stats, from(), state()) ->
+ gs_reply({ok, gc_stats(), erlang:timestamp()});
+ (choose_write_nodes_msg(), from(), state()) ->
+ gs_reply({ok, [node()]});
+ (new_blob_msg(), from(), state()) ->
+ gs_reply(new_blob_result());
+ (tag_msg(), from(), state()) ->
+ gs_reply({error, nonodes}) | gs_noreply();
+ ({get_tags, gc | safe}, from(), state()) ->
+ gs_noreply();
+ ({get_hosted_tags, host()}, from(), state()) ->
+ gs_noreply();
+ (safe_gc_blacklist, from(), state()) ->
+ gs_reply({ok, [node()]}).
+handle_call(dbg_get_state, _, S) ->
+ {reply, S, S};
+
+handle_call({get_nodeinfo, all}, _From, #state{nodes = Nodes} = S) ->
+ {reply, {ok, Nodes}, S};
+
+handle_call(get_read_nodes, _F, #state{nodes = Nodes, read_blacklist = RB} = S) ->
+ {reply, do_get_readable_nodes(Nodes, RB), S};
+
+handle_call(gc_blacklist, _F, #state{gc_blacklist = Nodes} = S) ->
+ {reply, {ok, Nodes}, S};
+
+handle_call(gc_stats, _F, #state{gc_stats = Stats} = S) ->
+ {reply, {ok, Stats}, S};
+
+handle_call({choose_write_nodes, K, Include, Exclude}, _,
+ #state{nodes = N, write_blacklist = WBL, gc_blacklist = GBL} = S) ->
+ BL = lists:umerge(WBL, GBL),
+ {reply, do_choose_write_nodes(N, K, Include, Exclude, BL), S};
+
+handle_call({new_blob, Obj, K, Include, Exclude}, _,
+ #state{nodes = N, gc_blacklist = GBL, write_blacklist = WBL} = S) ->
+ BL = lists:umerge(WBL, GBL),
+ {reply, do_new_blob(Obj, K, Include, Exclude, BL, N), S};
+
+handle_call({tag, _M, _Tag}, _From, #state{nodes = []} = S) ->
+ {reply, {error, no_nodes}, S};
+
+handle_call({tag, M, Tag}, From, S) ->
+ {noreply, do_tag_request(M, Tag, From, S)};
+
+handle_call({get_tags, Mode}, From, #state{nodes = Nodes} = S) ->
+ spawn(fun() ->
+ gen_server:reply(From, do_get_tags(Mode, [N || {N, _} <- Nodes]))
+ end),
+ {noreply, S};
+
+handle_call({get_hosted_tags, Host}, From, S) ->
+ spawn(fun() -> gen_server:reply(From, ddfs_gc:hosted_tags(Host)) end),
+ {noreply, S};
+
+handle_call(safe_gc_blacklist, _From, #state{safe_gc_blacklist = SBL} = S) ->
+ {reply, {ok, gb_sets:to_list(SBL)}, S}.
+
+-spec handle_cast({tag_notify, ddfs_tag:cast_msg(), tagname()}
+ | {gc_blacklist, [node()]}
+ | {safe_gc_blacklist, gb_sets:set()}
+ | {update_gc_stats, gc_stats()}
+ | {update_tag_cache, gb_sets:set()}
+ | refresh_tag_cache
+ | {update_nodes, nodes_update()}
+ | {update_nodestats, gb_trees:tree()},
+ state()) -> gs_noreply().
+handle_cast({tag_notify, M, Tag}, S) ->
+ {noreply, do_tag_notify(M, Tag, S)};
+
+handle_cast({gc_blacklist, Nodes}, #state{safe_gc_blacklist = SBL} = S) ->
+ BLSet = gb_sets:from_list(Nodes),
+ NewSBL = gb_sets:intersection(BLSet, SBL),
+ {noreply, S#state{gc_blacklist = gb_sets:to_list(BLSet),
+ safe_gc_blacklist = NewSBL}};
+
+handle_cast({safe_gc_blacklist, SafeBlacklist}, #state{gc_blacklist = BL} = S) ->
+ SBL = gb_sets:intersection(SafeBlacklist, gb_sets:from_list(BL)),
+ {noreply, S#state{safe_gc_blacklist = SBL}};
+
+handle_cast({update_gc_stats, Stats}, S) ->
+ {noreply, S#state{gc_stats = {Stats, now()}}};
+
+handle_cast({update_tag_cache, TagCache}, S) ->
+ {noreply, S#state{tag_cache = TagCache}};
+
+handle_cast(refresh_tag_cache, #state{cache_refresher = Refresher} = S) ->
+ Refresher ! refresh,
+ {noreply, S};
+
+handle_cast({update_nodes, NewNodes}, S) ->
+ {noreply, do_update_nodes(NewNodes, S)};
+
+handle_cast({update_nodestats, NewNodes}, S) ->
+ {noreply, do_update_nodestats(NewNodes, S)}.
+
+-spec handle_info({'DOWN', _, _, pid(), _}, state()) -> gs_noreply().
+handle_info({'DOWN', _, _, Pid, _}, S) ->
+ {noreply, do_tag_exit(Pid, S)}.
+
+%% ===================================================================
+%% gen_server callback stubs
+
+-spec terminate(term(), state()) -> ok.
+terminate(Reason, _State) ->
+ lager:warning("DDFS master died: ~p", [Reason]).
+
+-spec code_change(term(), state(), term()) -> {ok, state()}.
+code_change(_OldVsn, State, _Extra) -> {ok, State}.
+
+%% ===================================================================
+%% internal functions
+
+-spec do_get_readable_nodes([node_info()], [node()]) ->
+ {ok, [node()], non_neg_integer()}.
+do_get_readable_nodes(Nodes, ReadBlacklist) ->
+ NodeSet = gb_sets:from_ordset(lists:sort([Node || {Node, _} <- Nodes])),
+ BlackSet = gb_sets:from_ordset(ReadBlacklist),
+ ReadableNodeSet = gb_sets:subtract(NodeSet, BlackSet),
+ {ok, gb_sets:to_list(ReadableNodeSet), gb_sets:size(BlackSet)}.
+
+-spec do_choose_write_nodes([node_info()], non_neg_integer(), [node()], [node()], [node()]) ->
+ {ok, [node()]}.
+do_choose_write_nodes(Nodes, K, Include, Exclude, BlackList) ->
+ % Include is the list of nodes that must be included
+ %
+ % Node selection algorithm:
+ % 1. try to choose K nodes randomly from all the nodes which have
+ % more than ?MIN_FREE_SPACE bytes free space available and which
+ % are not excluded or blacklisted.
+ % 2. if K nodes cannot be found this way, choose the K emptiest
+ % nodes which are not excluded or blacklisted.
+ Primary = ([N || {N, {Free, _Total}} <- Nodes, Free > ?MIN_FREE_SPACE / 1024]
+ -- (Exclude ++ BlackList)),
+ if length(Primary) >= K ->
+ {ok, Include ++ disco_util:choose_random(Primary -- Include , K - length(Include))};
+ true ->
+ Preferred = [N || {N, _} <- lists:reverse(lists:keysort(2, Nodes))],
+ Secondary = Include ++ lists:sublist(Preferred -- (Include ++ Exclude ++ BlackList),
+ K - length(Include)),
+ {ok, Secondary}
+ end.
+
+-type new_blob_result() :: too_many_replicas | {ok, [nonempty_string()]}.
+-spec do_new_blob(string()|object_name(), non_neg_integer(), [node()], [node()], [node()], [node_info()]) ->
+ new_blob_result().
+do_new_blob(_Obj, K, _Include, _Exclude, _BlackList, Nodes) when K > length(Nodes) ->
+ too_many_replicas;
+do_new_blob(Obj, K, Include, Exclude, BlackList, Nodes) ->
+ {ok, WriteNodes} = do_choose_write_nodes(Nodes, K, Include, Exclude, BlackList),
+ Urls = [["http://", disco:host(N), ":", get(put_port), "/ddfs/", Obj]
+ || N <- WriteNodes],
+ {ok, Urls}.
+
+% Tag request: Start a new tag server if one doesn't exist already. Forward
+% the request to the tag server.
+
+-spec get_tag_pid(tagname(), gb_trees:tree(), false | gb_sets:set()) ->
+ {pid(), gb_trees:tree()}.
+get_tag_pid(Tag, Tags, Cache) ->
+ case gb_trees:lookup(Tag, Tags) of
+ none ->
+ NotFound = (Cache =/= false
+ andalso not gb_sets:is_element(Tag, Cache)),
+ {ok, Server} = ddfs_tag:start(Tag, NotFound),
+ erlang:monitor(process, Server),
+ {Server, gb_trees:insert(Tag, Server, Tags)};
+ {value, P} ->
+ {P, Tags}
+ end.
+
+-spec do_tag_request(term(), tagname(), replyto(), state()) ->
+ state().
+do_tag_request(M, Tag, From, #state{tags = Tags, tag_cache = Cache} = S) ->
+ {Pid, TagsN} = get_tag_pid(Tag, Tags, Cache),
+ gen_server:cast(Pid, {M, From}),
+ S#state{tags = TagsN,
+ tag_cache = Cache =/= false andalso gb_sets:add(Tag, Cache)}.
+
+-spec do_tag_notify(term(), tagname(), state()) -> state().
+do_tag_notify(M, Tag, #state{tags = Tags, tag_cache = Cache} = S) ->
+ {Pid, TagsN} = get_tag_pid(Tag, Tags, Cache),
+ gen_server:cast(Pid, {notify, M}),
+ S#state{tags = TagsN,
+ tag_cache = Cache =/= false andalso gb_sets:add(Tag, Cache)}.
+
+-spec do_update_nodes(nodes_update(), state()) -> state().
+do_update_nodes(NewNodes, #state{nodes = Nodes, tags = Tags} = S) ->
+ WriteBlacklist = lists:sort([Node || {Node, false, _} <- NewNodes]),
+ ReadBlacklist = lists:sort([Node || {Node, _, false} <- NewNodes]),
+ OldNodes = gb_trees:from_orddict(Nodes),
+ UpdatedNodes = lists:keysort(1, [case gb_trees:lookup(Node, OldNodes) of
+ none ->
+ {Node, {0, 0}};
+ {value, OldStats} ->
+ {Node, OldStats}
+ end || {Node, _WB, _RB} <- NewNodes]),
+ if
+ UpdatedNodes =/= Nodes ->
+ _ = [gen_server:cast(Pid, {die, none}) || Pid <- gb_trees:values(Tags)],
+ spawn(fun() ->
+ {ok, ReadableNodes, RBSize} =
+ do_get_readable_nodes(UpdatedNodes, ReadBlacklist),
+ refresh_tag_cache(ReadableNodes, RBSize)
+ end),
+ S#state{nodes = UpdatedNodes,
+ write_blacklist = WriteBlacklist,
+ read_blacklist = ReadBlacklist,
+ tag_cache = false,
+ tags = gb_trees:empty()};
+ true ->
+ S#state{write_blacklist = WriteBlacklist,
+ read_blacklist = ReadBlacklist}
+ end.
+
+-spec do_update_nodestats(gb_trees:tree(), state()) -> state().
+do_update_nodestats(NewNodes, #state{nodes = Nodes} = S) ->
+ UpdatedNodes = [case gb_trees:lookup(Node, NewNodes) of
+ none ->
+ {Node, Stats};
+ {value, NewStats} ->
+ {Node, NewStats}
+ end || {Node, Stats} <- Nodes],
+ S#state{nodes = UpdatedNodes}.
+
+-spec do_tag_exit(pid(), state()) -> state().
+do_tag_exit(Pid, S) ->
+ NewTags = [X || {_, V} = X <- gb_trees:to_list(S#state.tags), V =/= Pid],
+ S#state{tags = gb_trees:from_orddict(NewTags)}.
+
+-spec do_get_tags(all | filter, [node()]) -> {[node()], [node()], [binary()]};
+ (safe, [node()]) -> {ok, [binary()]} | too_many_failed_nodes;
+ (gc, [node()]) -> {ok, [binary()], [node()]} | too_many_failed_nodes.
+do_get_tags(all, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {Replies, Failed} =
+ gen_server:multi_call(Nodes, ddfs_node, get_tags, ?NODE_TIMEOUT),
+ {OkNodes, Tags} = lists:unzip(Replies),
+ {OkNodes, Failed, lists:usort(lists:flatten(Tags))}
+ end, do_get_tags_all);
+
+do_get_tags(filter, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {OkNodes, Failed, Tags} = do_get_tags(all, Nodes),
+ case tag_operation(get_tagnames, <<"+deleted">>, ?NODEOP_TIMEOUT) of
+ {ok, Deleted} ->
+ TagSet = gb_sets:from_ordset(Tags),
+ DelSet = gb_sets:insert(<<"+deleted">>, Deleted),
+ NotDeleted = gb_sets:to_list(gb_sets:subtract(TagSet, DelSet)),
+ {OkNodes, Failed, NotDeleted};
+ E ->
+ E
+ end
+ end, do_get_tags_filter);
+
+do_get_tags(safe, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ case do_get_tags(filter, Nodes) of
+ {_OkNodes, Failed, Tags} when length(Failed) < TagMinK ->
+ {ok, Tags};
+ _ ->
+ too_many_failed_nodes
+ end
+ end, do_get_tags_safe);
+
+% The returned tag list may include +deleted.
+do_get_tags(gc, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {OkNodes, Failed, Tags} = do_get_tags(all, Nodes),
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ case length(Failed) < TagMinK of
+ false ->
+ too_many_failed_nodes;
+ true ->
+ case tag_operation(get_tagnames, <<"+deleted">>, ?NODEOP_TIMEOUT) of
+ {ok, Deleted} ->
+ TagSet = gb_sets:from_ordset(Tags),
+ NotDeleted = gb_sets:subtract(TagSet, Deleted),
+ {ok, gb_sets:to_list(NotDeleted), OkNodes};
+ E ->
+ E
+ end
+ end
+ end, do_get_tags_gc).
+
+% Timeouts in this call by the below processes can cause ddfs_master
+% itself to crash, since the processes are linked to it.
+-spec safe_get_read_nodes() -> {ok, [node()], non_neg_integer()} | error.
+safe_get_read_nodes() ->
+ try get_read_nodes() of
+ {ok, _ReadableNodes, _RBSize} = RN ->
+ RN;
+ E ->
+ lager:error("unexpected response retrieving readable nodes: ~p", [E]),
+ error
+ catch
+ K:E ->
+ lager:error("error retrieving readable nodes: ~p:~p", [K, E]),
+ error
+ end.
+
+-spec monitor_diskspace() -> no_return().
+monitor_diskspace() ->
+ case safe_get_read_nodes() of
+ {ok, ReadableNodes, _RBSize} ->
+ {Space, _F} = gen_server:multi_call(ReadableNodes,
+ ddfs_node,
+ get_diskspace,
+ ?NODE_TIMEOUT),
+ update_nodestats(gb_trees:from_orddict(lists:keysort(1, Space)));
+ error ->
+ ok
+ end,
+ timer:sleep(?DISKSPACE_INTERVAL),
+ monitor_diskspace().
+
+-spec refresh_tag_cache_proc() -> no_return().
+refresh_tag_cache_proc() ->
+ case safe_get_read_nodes() of
+ {ok, ReadableNodes, RBSize} ->
+ refresh_tag_cache(ReadableNodes, RBSize);
+ error ->
+ ok
+ end,
+ receive
+ refresh ->
+ ok
+ after ?TAG_CACHE_INTERVAL ->
+ ok
+ end,
+ refresh_tag_cache_proc().
+
+-spec refresh_tag_cache([node()], non_neg_integer()) -> ok.
+refresh_tag_cache(Nodes, BLSize) ->
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ {Replies, Failed} =
+ gen_server:multi_call(Nodes, ddfs_node, get_tags, ?NODE_TIMEOUT),
+ if Nodes =/= [], length(Failed) + BLSize < TagMinK ->
+ {_OkNodes, Tags} = lists:unzip(Replies),
+ update_tag_cache(gb_sets:from_list(lists:flatten(Tags)));
+ true -> ok
+ end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl
new file mode 100644
index 0000000000..2920b67fc5
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl
@@ -0,0 +1,19 @@
+
+-type tokentype() :: 'read' | 'write'.
+-type user_attr() :: [{binary(), binary()}].
+% An 'internal' token is also used by internal consumers, but never stored.
+-type token() :: 'null' | binary().
+
+-type tagname() :: binary().
+-type tagid() :: binary().
+
+-type attrib() :: 'urls' | 'read_token' | 'write_token' | {'user', binary()}.
+
+-record(tagcontent, {id :: tagid(),
+ last_modified :: binary(),
+ read_token = null :: token(),
+ write_token = null :: token(),
+ urls = [] :: [[binary()]],
+ user = [] :: user_attr()}).
+
+-type tagcontent() :: #tagcontent{}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl
new file mode 100644
index 0000000000..d579e9a7d7
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl
@@ -0,0 +1,16 @@
+% This is a set of type utilities to be used when spec-cing the
+% callbacks of a gen_server implementation. It should be included in
+% the impl module, which needs to define the state() type.
+
+-type gs_init() :: {ok, state()}.
+-type gs_reply(T) :: {reply, (T), state()}.
+-type gs_noreply() :: {noreply, state()}.
+-type gs_noreply_t() :: {noreply, state(), non_neg_integer()}.
+-type gs_stop(T) :: {stop, (T), state()}.
+
+% Generic utilities.
+
+-type server() :: pid() | atom() | {atom(), node()}.
+-type from() :: {pid(), term()}.
+
+-type dbg_state_msg() :: dbg_get_state.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/eep37.erl b/lib/dialyzer/test/small_SUITE_data/src/eep37.erl
new file mode 100644
index 0000000000..2818688f95
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/eep37.erl
@@ -0,0 +1,15 @@
+-module(eep37).
+
+-compile(export_all).
+
+-spec self() -> fun(() -> fun()).
+self() ->
+ fun Self() -> Self end.
+
+-spec fact() -> fun((non_neg_integer()) -> non_neg_integer()).
+fact() ->
+ fun Fact(N) when N > 0 ->
+ N * Fact(N - 1);
+ Fact(0) ->
+ 1
+ end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/fun2ms.erl b/lib/dialyzer/test/small_SUITE_data/src/fun2ms.erl
new file mode 100644
index 0000000000..9e7df85e4c
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/fun2ms.erl
@@ -0,0 +1,21 @@
+-module(fun2ms).
+-export([return/0]).
+-include_lib("stdlib/include/ms_transform.hrl").
+
+-record(snapshot, {id :: integer(), arg1 :: atom(), arg2 :: tuple()}).
+
+return() ->
+ TableId = ets:new(table, [public, {keypos, #snapshot.id}]),
+
+ ets:insert(TableId, [#snapshot{id = 1, arg1 = hard, arg2 = {1,2}},
+ #snapshot{id = 2, arg1 = rock, arg2 = {1,2}},
+ #snapshot{id = 3, arg1 = hallelujah, arg2 =
+ {1,2}}]),
+
+
+ Example = ets:fun2ms(
+ fun(#snapshot{id = Arg1, arg1 = Arg2}) ->
+ {Arg1, Arg2}
+ end),
+
+ ets:select(TableId, Example).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl b/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl
new file mode 100644
index 0000000000..f4cbf31160
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl
@@ -0,0 +1,83 @@
+-module(funs_from_outside).
+
+-export([run1/2, run2/2, run3/2]).
+-export([test1/1, test2/1]).
+
+%%------------------------------------------------------------------------------
+
+run1(X, Y) ->
+ testa(fun do_something/1, X, Y).
+
+testa(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ {ok, _} -> ok;
+ error -> error
+ end.
+
+do_nothing(_) -> {ok, nothing}.
+
+do_something(_) -> {ok, something}.
+
+even(X) ->
+ X rem 2 =:= 0.
+
+%%------------------------------------------------------------------------------
+
+%% Duplicating code since we are monovariant...
+
+run2(X, Y) ->
+ testb(fun do_something/1, X, Y).
+
+testb(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ error -> error
+ end.
+
+%%------------------------------------------------------------------------------
+
+%% Duplicating code since we are monovariant...
+
+run3(X, Y) ->
+ testc(fun do_something_2/1, X, Y).
+
+testc(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ {ok, _} -> ok;
+ %% This pattern can match.
+ error -> error
+ end.
+
+do_something_2(foo) -> {ok, something};
+do_something_2(_) -> error.
+
+%%------------------------------------------------------------------------------
+
+test1(Fun) ->
+ F = case get(test1) of
+ test1_t -> Fun;
+ test1_f -> fun fok/0
+ end,
+ error = F().
+
+fok() -> ok.
+
+%%------------------------------------------------------------------------------
+
+test2(Fun) ->
+ F = case get(test1) of
+ test1_t -> fun fok/0;
+ test1_f -> fun fok/0
+ end,
+ error = F().
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
new file mode 100644
index 0000000000..c26787fe24
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
@@ -0,0 +1,5 @@
+-module(scala_data).
+
+-export_type([data/0]).
+
+-opaque data() :: {'data', term()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
new file mode 100644
index 0000000000..4e981f3b74
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
@@ -0,0 +1,8 @@
+-module(scala_user).
+
+-export([is_list/2]).
+
+-spec is_list(atom(), scala_data:data()) -> boolean().
+
+is_list( List,Data) when is_list(List) -> true;
+is_list(Tuple,Data) when is_tuple(Tuple) -> false.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/limit.erl b/lib/dialyzer/test/small_SUITE_data/src/limit.erl
new file mode 100644
index 0000000000..97ee585b77
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/limit.erl
@@ -0,0 +1,20 @@
+%% Misc cases where Dialyzer would fail with system_limit or crash
+
+-module(limit).
+
+-export([tu/0, big/1, b2/0]).
+
+tu() ->
+ erlang:make_tuple(1 bsl 24, def, [{5,e},{1,a},{3,c}]).
+
+big(<<Int:1152921504606846976/unit:128,0,_/binary>>) -> {5,Int}.
+
+b2() ->
+ Maxbig = maxbig(),
+ _ = bnot Maxbig,
+ ok.
+
+maxbig() ->
+ %% We assume that the maximum arity is (1 bsl 19) - 1.
+ Ws = erlang:system_info(wordsize),
+ (((1 bsl ((16777184 * (Ws div 4))-1)) - 1) bsl 1) + 1.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/literals.erl b/lib/dialyzer/test/small_SUITE_data/src/literals.erl
new file mode 100644
index 0000000000..abd7033712
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/literals.erl
@@ -0,0 +1,33 @@
+-module(literals).
+
+%% Bad records inside structures used to be ignored. The reason:
+%% v3_core:unfold() does not annotate the parts of a literal.
+%% This example does not work perfectly yet, in particular Maps.
+
+-export([t1/0, t2/0, t3/0, t4/0, m1/1, m2/1, m3/1, m4/1]).
+
+-record(r, {id :: integer}).
+
+t1() ->
+ #r{id = a}. % violation
+
+t2() ->
+ [#r{id = a}]. % violation
+
+t3() ->
+ {#r{id = a}}. % violation
+
+t4() ->
+ #{a => #r{id = a}}. % violation found, but t4() returns... (bug)
+
+m1(#r{id = a}) -> % violation
+ ok.
+
+m2([#r{id = a}]) -> % violation
+ ok.
+
+m3({#r{id = a}}) -> % can never match; not so good
+ ok.
+
+m4(#{a := #r{id = a}}) -> % violation not found
+ ok.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps1.erl b/lib/dialyzer/test/small_SUITE_data/src/maps1.erl
new file mode 100644
index 0000000000..228ffe2c22
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps1.erl
@@ -0,0 +1,77 @@
+%%
+%% File: maps1.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-01-17
+%%
+
+-module(maps1).
+
+-compile([export_all]).
+
+
+-export([recv/3, decode/1]).
+-export([get_my_map/0,is_my_map/1]).
+
+%-record(can_pkt, {id, data :: binary(), timestamp}).
+
+-type can_pkt() :: #{ id => term(), data => binary(), timestamp => term() }.
+-type channel() :: atom() | pid() | {atom(),_}.
+
+-spec recv(<<_:64,_:_*8>>, fun((can_pkt()) -> R), channel()) -> R.
+recv(Packet, Fun, Chan) ->
+ #{id := Can_id, data := Can_data} = P = decode(Packet),
+ Fun(P).
+
+-spec decode(<<_:64,_:_*8>>) -> #{id => <<_:11>>,timestamp => char()}.
+decode(<<_:12, Len:4, Timestamp:16, 0:3, Id:11/bitstring, 0:18,
+ Data:Len/binary, _/binary>>) ->
+ #{id => Id, data => Data, timestamp => Timestamp}.
+
+
+
+t1() ->
+ #{bar=>fun t2/0}.
+
+t2() -> ok.
+
+-type map_state() :: #{ id => integer(), val => term() }.
+
+-spec update(map_state(), term()) -> map_state().
+
+update(#{ id := Id, val := Val } = M, X) when is_integer(Id) ->
+ M#{ val := [Val,X] }.
+
+%% key coalescing
+
+-spec get_my_map() -> map().
+
+get_my_map() ->
+ #{labels => [one, two],
+ number => 27,
+ [1,2,3] => wer,
+ {4,5,6} => sdf,
+ kvok => #{
+ <<"wat">> => v,
+ a => qwe,
+ 2 => asd,
+ [1,2,3] => wer,
+ {4,5,6} => sdf,
+ "abc" => zxc
+ }
+ }.
+
+-spec is_my_map(map()) -> 'ok'.
+
+is_my_map(#{labels := [one, two],
+ number := 27,
+ [1,2,3] := wer,
+ {4,5,6} := sdf,
+ kvok := #{
+ <<"wat">> := v,
+ a := qwe,
+ 2 := asd,
+ [1,2,3] := wer,
+ {4,5,6} := sdf,
+ "abc" := zxc
+ }
+ }) -> ok.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl
new file mode 100644
index 0000000000..19e61a7944
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl
@@ -0,0 +1,11 @@
+%%
+%% File: maps_difftype.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-04-29
+%%
+-module(maps_difftype).
+
+-export([empty_mismatch/1]).
+
+empty_mismatch(Tuple) when is_tuple(Tuple) ->
+ case Tuple of #{} -> ok end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
new file mode 100644
index 0000000000..70059f73b6
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
@@ -0,0 +1,12 @@
+-module(maps_redef).
+
+-export([t/0]).
+
+%% OK in Erlang/OTP 17, at least.
+
+-type map() :: atom(). % redefine built-in type
+
+-spec t() -> map().
+
+t() ->
+ a. % OK
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl
new file mode 100644
index 0000000000..945b2a9144
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps_redef2.erl
@@ -0,0 +1,23 @@
+%% In 17, the linter says that map(A) redefines 'type map', which is
+%% allowed until next release. However, Dialyzer used to replace
+%% map(A) with #{}, which resulted in warnings.
+
+-module(maps_redef2).
+
+-export([t/0]).
+
+-type map(_A) :: integer().
+
+t() ->
+ M = new(),
+ t1(M).
+
+-spec t1(map(_)) -> map(_).
+
+t1(A) ->
+ A + A.
+
+-spec new() -> map(_).
+
+new() ->
+ 3.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
index 16533a9caa..7242ac2016 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
@@ -1,4 +1,6 @@
%%% This is to ensure that "on_load" functions are never reported as unused.
+%%% In addition, all functions called by a function in an on_load attribute
+%%% should be considered as called by an entry point of the module.
-module(on_load).
@@ -8,4 +10,7 @@
foo() -> ok.
-bar() -> ok.
+bar() -> gazonk(17).
+
+gazonk(N) when N < 42 -> gazonk(N+1);
+gazonk(42) -> ok.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/predef.erl b/lib/dialyzer/test/small_SUITE_data/src/predef.erl
new file mode 100644
index 0000000000..ee9073aa67
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/predef.erl
@@ -0,0 +1,67 @@
+-module(predef).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+%% Before Erlang/OTP 17.0 local re-definitions of pre-defined opaque
+%% types were ignored but did not generate any warning.
+-opaque array() :: atom().
+-opaque digraph() :: atom().
+-opaque gb_set() :: atom().
+-type dict() :: atom().
+-type gb_tree() :: atom().
+-type queue() :: atom().
+-type set() :: atom().
+-type tid() :: atom().
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/predef2.erl b/lib/dialyzer/test/small_SUITE_data/src/predef2.erl
new file mode 100644
index 0000000000..b1d941a49a
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/predef2.erl
@@ -0,0 +1,56 @@
+-module(predef2).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/pretty_bitstring.erl b/lib/dialyzer/test/small_SUITE_data/src/pretty_bitstring.erl
new file mode 100644
index 0000000000..3dbf5ab7a7
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/pretty_bitstring.erl
@@ -0,0 +1,8 @@
+%% Prettyprint bitstrings.
+
+-module(pretty_bitstring).
+
+-export([t/0]).
+
+t() ->
+ binary:copy(<<1,2,3:3>>,2).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl b/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
index 54cc2601bd..b250c6ee65 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
@@ -7,7 +7,7 @@ t_loc() ->
#r_loc{}.
-record(r_opa, {a :: atom(),
- b = gb_sets:new() :: gb_set(),
+ b = gb_sets:new() :: gb_sets:set(),
c = 42 :: boolean(),
d, % untyped on purpose
e = false :: boolean()}).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/record_update.erl b/lib/dialyzer/test/small_SUITE_data/src/record_update.erl
new file mode 100644
index 0000000000..bad7a0a929
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/record_update.erl
@@ -0,0 +1,10 @@
+-module(record_update).
+
+-export([quux/2]).
+
+-record(foo, {bar :: atom()}).
+
+-spec quux(#foo{}, string()) -> #foo{}.
+
+quux(Foo, NotBar) ->
+ Foo#foo{ bar = NotBar }.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/confusing_record_warning.erl b/lib/dialyzer/test/small_SUITE_data/src/relevant_record_warning.erl
index 8af74e0914..3ff65458df 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/confusing_record_warning.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/relevant_record_warning.erl
@@ -1,3 +1,7 @@
+%% Formerly confusing_record_warning.erl.
+%% The warning output is relevant as of Erlang/OTP 17.1.
+%% The original comment kept below.
+
%%---------------------------------------------------------------------
%% A user complained that dialyzer produces a weird warning for the
%% following program. I explained to him that there is an implicit
@@ -9,7 +13,7 @@
%% The pattern {'r', [_]} can never match the type any()
%% We should clearly give some less confusing warning in this case.
%%---------------------------------------------------------------------
--module(confusing_record_warning).
+-module(relevant_record_warning).
-export([test/1]).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
new file mode 100644
index 0000000000..c34fa1b9dd
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
@@ -0,0 +1,11 @@
+-module(remote_field).
+
+-type f(T) :: {ssl:sslsocket(), T}.
+
+-record(r1, { f1 :: f(_) }).
+-type r1(T) :: #r1{ f1 :: fun((ssl:sslsocket(), T) -> any()) }.
+
+-record(state, {
+ r :: r1(T),
+ arg :: T
+ }).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
new file mode 100644
index 0000000000..35687e22ec
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
@@ -0,0 +1,17 @@
+-module(remote_field2).
+
+-export([handle_cast/2]).
+
+-record(state, {tcp_socket :: inet:socket()}).
+
+-spec handle_cast(_,_) ->
+ {noreply,_} |
+ {stop,{shutdown,connection_closed},
+ #state{tcp_socket :: port()}}.
+handle_cast({send, Message}, #state{tcp_socket = TCPSocket} = State) ->
+ case gen_tcp:send(TCPSocket, Message) of
+ ok ->
+ {noreply, State};
+ {error, closed} ->
+ {stop, {shutdown, connection_closed}, State}
+ end.
diff --git a/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options b/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
index f7197ac30f..6843119b9d 100644
--- a/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [underspecs]}]}.
+{dialyzer_options, [{warnings, [underspecs, no_unknown]}]}.
diff --git a/lib/dialyzer/test/underspecs_SUITE_data/results/arr b/lib/dialyzer/test/underspecs_SUITE_data/results/arr
new file mode 100644
index 0000000000..9497d12eec
--- /dev/null
+++ b/lib/dialyzer/test/underspecs_SUITE_data/results/arr
@@ -0,0 +1,4 @@
+
+arr.erl:14: Type specification arr:test2(array:array(T),non_neg_integer(),T) -> array:array(T) is a supertype of the success typing: arr:test2(array:array(_),pos_integer(),_) -> array:array(_)
+arr.erl:24: Type specification arr:test4(array:array(T),non_neg_integer(),_) -> array:array(T) is a supertype of the success typing: arr:test4(array:array(_),pos_integer(),_) -> array:array(_)
+arr.erl:29: Type specification arr:test5(array:array(T),non_neg_integer(),T) -> array:array(T) is a supertype of the success typing: arr:test5(array:array(_),non_neg_integer(),integer()) -> array:array(_)
diff --git a/lib/dialyzer/test/underspecs_SUITE_data/src/arr.erl b/lib/dialyzer/test/underspecs_SUITE_data/src/arr.erl
new file mode 100644
index 0000000000..3b265ccec2
--- /dev/null
+++ b/lib/dialyzer/test/underspecs_SUITE_data/src/arr.erl
@@ -0,0 +1,41 @@
+-module(arr).
+
+%% http://erlang.org/pipermail/erlang-questions/2014-August/080445.html
+
+-define(A, array).
+
+-export([test/3, test2/3, test3/3, test4/3, test5/3, test6/3]).
+
+-spec test(?A:array(T), non_neg_integer(), T) -> ?A:array(T).
+
+test(Array, N, Value) ->
+ ?A:set(N, Value, Array).
+
+-spec test2(?A:array(T), non_neg_integer(), T) -> ?A:array(T).
+
+test2(Array, N, Value) when N > 0 ->
+ ?A:set(N, Value, Array).
+
+-spec test3(?A:array(T), non_neg_integer(), _) -> ?A:array(T).
+
+test3(Array, N, Value) ->
+ ?A:set(N, Value, Array).
+
+-spec test4(?A:array(T), non_neg_integer(), _) -> ?A:array(T).
+
+test4(Array, N, Value) when N > 0 ->
+ ?A:set(N, Value, Array).
+
+-spec test5(?A:array(T), non_neg_integer(), T) -> ?A:array(T).
+
+test5(Array, N, Value) when is_integer(Value) ->
+ ?A:set(N, Value, Array).
+
+%% One would ideally want a warning also for test6(), but the current
+%% analysis of parametrized opaque types is not strong enough to
+%% discover this.
+-spec test6(?A:array(integer()), non_neg_integer(), integer()) ->
+ ?A:array(any()).
+
+test6(Array, N, Value) ->
+ ?A:set(N, Value, Array).
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options b/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options
new file mode 100644
index 0000000000..49ac917f61
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options
@@ -0,0 +1 @@
+{dialyzer_options, [{warnings, [unmatched_returns]}]}.
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings b/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings
new file mode 100644
index 0000000000..24b44c1b5c
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings
@@ -0,0 +1,5 @@
+
+lc_warnings.erl:32: Expression produces a value of type [opaque_atom_adt:opaque_atom()], but this value is unmatched
+lc_warnings.erl:43: Expression produces a value of type [array:array(_)], but this value is unmatched
+lc_warnings.erl:65: Expression produces a value of type [lc_warnings:opaque_tuple()], but this value is unmatched
+lc_warnings.erl:7: Expression produces a value of type ['ok' | {'error',atom()}], but this value is unmatched
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl
new file mode 100644
index 0000000000..cb01a8fde3
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl
@@ -0,0 +1,95 @@
+-module(lc_warnings).
+-compile([export_all]).
+
+close(Fs) ->
+ %% There should be a warning since we ignore a potential
+ %% {error,Error} return from file:close/1.
+ [file:close(F) || F <- Fs],
+
+ %% No warning because the type of unmatched return will be ['ok']
+ %% (which is a list of a simple type).
+ [ok = file:close(F) || F <- Fs],
+
+ %% Suppressed.
+ _ = [file:close(F) || F <- Fs],
+ ok.
+
+format(X) ->
+ %% No warning since the result of the list comprehension is
+ %% a list of simple.
+ [io:format("~p\n", [E]) || E <- X],
+
+ %% Warning explicitly suppressed.
+ _ = [io:format("~p\n", [E]) || E <- X],
+ ok.
+
+opaque1() ->
+ List = gen_atom(),
+ %% This is a list of an externally defined opaque type. Since
+ %% we are not allowed to peek inside opaque types, there should
+ %% be a warning (even though the type in this case happens to be
+ %% an atom).
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque2() ->
+ List = gen_array(),
+ %% This is an list of an externally defined opaque type. Since
+ %% we are not allowed to peek inside opaque types, there should
+ %% be a warning.
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque3() ->
+ List = gen_int(),
+
+ %% No warning, since we are allowed to look into the type and can
+ %% see that it is a simple type.
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque4() ->
+ List = gen_tuple(),
+
+ %% There should be a warning, since we are allowed to look inside
+ %% the opaque type and see that it is a tuple (non-simple).
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+gen_atom() ->
+ [opaque_atom_adt:atom(ok)].
+
+gen_array() ->
+ [array:new()].
+
+
+gen_int() ->
+ [opaque_int(42)].
+
+gen_tuple() ->
+ [opaque_tuple(x, 25)].
+
+-opaque opaque_int() :: integer().
+
+-spec opaque_int(integer()) -> opaque_int().
+
+opaque_int(Int) -> Int.
+
+-opaque opaque_tuple() :: {any(),any()}.
+
+-spec opaque_tuple(any(), any()) -> opaque_tuple().
+
+opaque_tuple(X, Y) ->
+ {X,Y}.
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl
new file mode 100644
index 0000000000..b5b51fe75b
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl
@@ -0,0 +1,9 @@
+-module(opaque_atom_adt).
+-export([atom/1]).
+
+-opaque opaque_atom() :: atom().
+
+-spec atom(atom()) -> opaque_atom().
+
+atom(Atom) ->
+ Atom.
diff --git a/lib/dialyzer/test/user_SUITE_data/dialyzer_options b/lib/dialyzer/test/user_SUITE_data/dialyzer_options
index 513ed7752b..d20ecd389f 100644
--- a/lib/dialyzer/test/user_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/user_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, []}.
+{dialyzer_options, [{warnings, [no_unknown]}]}.
{time_limit, 3}. \ No newline at end of file
diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk
index af32c5b901..527afaf4ef 100644
--- a/lib/dialyzer/vsn.mk
+++ b/lib/dialyzer/vsn.mk
@@ -1 +1 @@
-DIALYZER_VSN = 2.6.1
+DIALYZER_VSN = 2.7.4
diff --git a/lib/diameter/bin/diameterc b/lib/diameter/bin/diameterc
index d31f341c36..2c9a8f555c 100755
--- a/lib/diameter/bin/diameterc
+++ b/lib/diameter/bin/diameterc
@@ -4,7 +4,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -74,7 +74,7 @@ compile(#argv{file = File, options = Opts, output = Out}) ->
ok ->
0;
{error, Reason} ->
- error_msg(Reason, []),
+ error_msg(diameter_make:format_error(Reason), []),
1
catch
error: Reason ->
diff --git a/lib/diameter/doc/src/book.xml b/lib/diameter/doc/src/book.xml
index 960296528b..7b606c84d0 100644
--- a/lib/diameter/doc/src/book.xml
+++ b/lib/diameter/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
-<year>2011</year>
+<year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml
index 9864b21bc5..ea175a58b8 100644
--- a/lib/diameter/doc/src/diameter.xml
+++ b/lib/diameter/doc/src/diameter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY spawn_opt
'<seealso marker="erts:erlang#spawn_opt-2">erlang:spawn_opt/2</seealso>'>
@@ -20,7 +20,8 @@
<header>
<copyright>
-<year>2011</year><year>2013</year>
+<year>2011</year>
+<year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -110,7 +111,7 @@ Defined in &dict_data_types;.</p>
<tag><c>application_alias() = term()</c></tag>
<item>
<p>
-A name identifying a Diameter application in
+Name identifying a Diameter application in
service configuration.
Passed to &call; when sending requests
defined by the application.</p>
@@ -128,7 +129,7 @@ ExtraArgs = list()
</pre>
<p>
-A module implementing the callback interface defined in &man_app;,
+Module implementing the callback interface defined in &man_app;,
along with any
extra arguments to be appended to those documented.
Note that extra arguments specific to an outgoing request can be
@@ -155,7 +156,7 @@ Has one the following types.</p>
<tag><c>{alias, &application_alias;}</c></tag>
<item>
<p>
-A unique identifier for the application in the scope of the
+Unique identifier for the application in the scope of the
service.
Defaults to the value of the <c>dictionary</c> option if
unspecified.</p>
@@ -164,7 +165,7 @@ unspecified.</p>
<tag><c>{dictionary, atom()}</c></tag>
<item>
<p>
-The name of an encode/decode module for the Diameter
+Name of an encode/decode module for the Diameter
messages defined by the application.
These modules are generated from files whose format is documented in
&man_dict;.</p>
@@ -173,7 +174,7 @@ These modules are generated from files whose format is documented in
<tag><c>{module, &application_module;}</c></tag>
<item>
<p>
-The callback module with which messages of the Diameter application are
+Callback module in which messages of the Diameter application are
handled.
See &man_app; for the required interface and semantics.</p>
</item>
@@ -181,7 +182,7 @@ See &man_app; for the required interface and semantics.</p>
<tag><c>{state, term()}</c></tag>
<item>
<p>
-The initial callback state.
+Initial callback state.
The prevailing state is passed to some
&man_app;
callbacks, which can then return a new state.
@@ -191,7 +192,7 @@ Defaults to the value of the <c>alias</c> option if unspecified.</p>
<tag><c>{call_mutates_state, true|false}</c></tag>
<item>
<p>
-Specifies whether or not the &app_pick_peer;
+Whether or not the &app_pick_peer;
application callback can modify the application state.
Defaults to <c>false</c> if unspecified.</p>
@@ -208,7 +209,7 @@ probably avoid it.</p>
<tag><c>{answer_errors, callback|report|discard}</c></tag>
<item>
<p>
-Determines the manner in which incoming answer messages containing
+Manner in which incoming answer messages containing
decode errors are handled.</p>
<p>
@@ -226,13 +227,13 @@ question is as if a callback had taken place and returned
<c>{error, failure}</c>.</p>
<p>
-Defaults to <c>report</c> if unspecified.</p>
+Defaults to <c>discard</c> if unspecified.</p>
</item>
<tag><c>{request_errors, answer_3xxx|answer|callback}</c></tag>
<item>
<p>
-Determines the manner in which incoming requests are handled when an
+Manner in which incoming requests are handled when an
error other than 3007 (DIAMETER_APPLICATION_UNSUPPORTED, which cannot
be associated with an application callback module), is detected.</p>
@@ -292,7 +293,7 @@ Multiple options append to the argument list.</p>
<tag><c>{filter, &peer_filter;}</c></tag>
<item>
<p>
-A filter to apply to the list of available peers before passing it to
+Filter to apply to the list of available peers before passing it to
the &app_pick_peer; callback for the application in question.
Multiple options are equivalent a single <c>all</c> filter on the
corresponding list of filters.
@@ -302,7 +303,7 @@ Defaults to <c>none</c>.</p>
<tag><c>{timeout, &dict_Unsigned32;}</c></tag>
<item>
<p>
-The number of milliseconds after which the request should
+Number of milliseconds after which the request should
timeout.
Defaults to 5000.</p>
</item>
@@ -310,7 +311,7 @@ Defaults to 5000.</p>
<tag><c>detach</c></tag>
<item>
<p>
-Causes &call; to return <c>ok</c> as
+Cause &call; to return <c>ok</c> as
soon as the request in
question has been encoded, instead of waiting for and returning
the result from a subsequent &app_handle_answer; or
@@ -355,8 +356,8 @@ question communicates an address list as described in
<tag><c>{'Origin-State-Id', &dict_Unsigned32;}</c></tag>
<item>
<p>
-Origin-State-Id is optional but will be included in outgoing messages
-sent by diameter itself: CER/CEA, DWR/DWA and DPR/DPA.
+Origin-State-Id is optional but, if configured, will be included in
+outgoing CER/CEA and DWR/DWA messages.
Setting a value of <c>0</c> (zero) is equivalent to not setting a
value, as documented in &the_rfc;.
The function &origin_state_id;
@@ -426,7 +427,7 @@ configuration passed to &start_service; or &add_transport;.</p>
<tag><c>peer_filter() = term()</c></tag>
<item>
<p>
-A filter passed to &call; in order to select candidate peers for a
+Filter passed to &call; in order to select candidate peers for a
&app_pick_peer; callback.
Has one of the following types.</p>
@@ -499,6 +500,18 @@ Matches only those peers matched by each filter in the specified list.</p>
<p>
Matches only those peers matched by at least one filter in the
specified list.</p>
+
+<p>
+The resulting peer list will be in match order, peers matching the
+first filter of the list sorting before those matched by the second,
+and so on.
+For example, the following filter causes peers matching both the host
+and realm filters to be presented before those matching only the realm
+filter.</p>
+
+<pre>
+{any, [{all, [host, realm]}, realm]}
+</pre>
</item>
</taglist>
@@ -661,7 +674,7 @@ connection establishment.</p>
<tag><c>{'CEA', Result, Caps, Pkt}</c></tag>
<item>
<pre>
-Result = integer() | atom() | {capabilities_cb, CB, ResultCode|discard}
+Result = ResultCode | atom() | {capabilities_cb, CB, ResultCode|discard}
Caps = #diameter_caps{}
Pkt = #diameter_packet{}
ResultCode = integer()
@@ -729,7 +742,7 @@ info fields of forms other than the above.</p>
<tag><c>service_name() = term()</c></tag>
<item>
<p>
-The name of a service as passed to &start_service; and with which the
+Name of a service as passed to &start_service; and with which the
service is identified.
There can be at most one service with a given name on a given node.
Note that &make_ref;
@@ -741,7 +754,7 @@ can be used to generate a service name that is somewhat unique.</p>
<tag><c>service_opt()</c></tag>
<item>
<p>
-An option passed to &start_service;.
+Option passed to &start_service;.
Can be any <c>&capability;</c> as well as the following.</p>
<taglist>
@@ -749,7 +762,7 @@ Can be any <c>&capability;</c> as well as the following.</p>
<tag><c>{application, [&application_opt;]}</c></tag>
<item>
<p>
-Defines a Diameter application supported by the service.</p>
+A Diameter application supported by the service.</p>
<p>
A service must configure one tuple for each Diameter
@@ -770,6 +783,27 @@ be matched by corresponding &capability; configuration, of
</item>
+<marker id="incoming_maxlen"/>
+<tag><c>{incoming_maxlen, 0..16777215}</c></tag>
+<item>
+<p>
+Bound on the expected size of incoming Diameter messages.
+Messages larger than the specified number of bytes are discarded.</p>
+
+<p>
+Defaults to <c>16777215</c>, the maximum value of the 24-bit Message
+Length field in a Diameter Header.</p>
+
+<warning>
+<p>
+This option should be set to as low a value as is sufficient for the
+Diameter applications and peers in question, since decoding incoming
+messages from a malicious peer can otherwise generate significant
+load.</p>
+</warning>
+
+</item>
+
<tag><c>{restrict_connections, false
| node
| nodes
@@ -777,7 +811,7 @@ be matched by corresponding &capability; configuration, of
| evaluable()}</c></tag>
<item>
<p>
-Specifies the degree to which the service allows multiple transport
+The degree to which the service allows multiple transport
connections to the same peer, as identified by its Origin-Host
at capabilities exchange.</p>
@@ -803,7 +837,7 @@ Defaults to <c>nodes</c>.</p>
<tag><c>{sequence, {H,N} | &evaluable;}</c></tag>
<item>
<p>
-Specifies a constant value <c>H</c> for the topmost <c>32-N</c> bits of
+A constant value <c>H</c> for the topmost <c>32-N</c> bits of
of 32-bit End-to-End and Hop-by-Hop Identifiers generated
by the service, either explicitly or as a return value of a function
to be evaluated at &start_service;.
@@ -838,7 +872,7 @@ outgoing requests.</p>
<tag><c>{share_peers, boolean() | [node()] | evaluable()}</c></tag>
<item>
<p>
-Specifies nodes to which peer connections established on the local
+Nodes to which peer connections established on the local
Erlang node are communicated.
Shared peers become available in the remote candidates list passed to
&app_pick_peer; callbacks on remote nodes whose services are
@@ -877,7 +911,7 @@ of a single Diameter node across multiple Erlang nodes.</p>
<tag><c>{spawn_opt, [term()]}</c></tag>
<item>
<p>
-An options list passed to &spawn_opt; when spawning a process for an
+Options list passed to &spawn_opt; when spawning a process for an
incoming Diameter request, unless the transport in question
specifies another value.
Options <c>monitor</c> and <c>link</c> are ignored.</p>
@@ -886,10 +920,34 @@ Options <c>monitor</c> and <c>link</c> are ignored.</p>
Defaults to the empty list.</p>
</item>
+<marker id="string_decode"/>
+<tag><c>{string_decode, boolean()}</c></tag>
+<item>
+<p>
+Whether or not to decode AVPs of type &dict_OctetString; and its
+derived types &dict_DiameterIdentity;, &dict_DiameterURI;,
+&dict_IPFilterRule;, &dict_QoSFilterRule;, and &dict_UTF8String;.
+If <c>true</c> then AVPs of these types are decoded to string().
+If <c>false</c> then values are retained as binary().</p>
+
+<p>
+Defaults to <c>true</c>.</p>
+
+<warning>
+<p>
+This option should be set to <c>false</c>
+since a sufficiently malicious peer can otherwise cause large amounts
+of memory to be consumed when decoded Diameter messages are passed
+between processes.
+The default value is for backwards compatibility.</p>
+</warning>
+
+</item>
+
<tag><c>{use_shared_peers, boolean() | [node()] | evaluable()}</c></tag>
<item>
<p>
-Specifies nodes from which communicated peers are made available in
+Nodes from which communicated peers are made available in
the remote candidates list of &app_pick_peer; callbacks.</p>
<p>
@@ -929,7 +987,7 @@ each node from which requests are sent.</p>
<tag><c>transport_opt()</c></tag>
<item>
<p>
-An option passed to &add_transport;.
+Option passed to &add_transport;.
Has one of the following types.</p>
<taglist>
@@ -937,8 +995,7 @@ Has one of the following types.</p>
<tag><c>{applications, [&application_alias;]}</c></tag>
<item>
<p>
-The list of Diameter applications to which the transport should be
-restricted.
+Diameter applications to which the transport should be restricted.
Defaults to all applications configured on the service in question.
Applications not configured on the service in question are ignored.</p>
@@ -971,7 +1028,7 @@ TLS is desired over TCP as implemented by &man_tcp;.</p>
<tag><c>{capabilities_cb, &evaluable;}</c></tag>
<item>
<p>
-A callback invoked upon reception of CER/CEA during capabilities
+Callback invoked upon reception of CER/CEA during capabilities
exchange in order to ask whether or not the connection should
be accepted.
Applied to the <c>&transport_ref;</c> and
@@ -1019,7 +1076,7 @@ case the corresponding callbacks are applied until either all return
<tag><c>{capx_timeout, &dict_Unsigned32;}</c></tag>
<item>
<p>
-The number of milliseconds after which a transport process having an
+Number of milliseconds after which a transport process having an
established transport connection will be terminated if the expected
capabilities exchange message (CER or CEA) is not received from the peer.
For a connecting transport, the timing of connection attempts is
@@ -1066,7 +1123,7 @@ transport.</p>
<item>
<p>
-A callback invoked prior to terminating the transport process of a
+Callback invoked prior to terminating the transport process of a
transport connection having watchdog state <c>OKAY</c>.
Applied to <c>application|service|transport</c> and the
<c>&transport_ref;</c> and <c>&app_peer;</c> in question:
@@ -1082,7 +1139,7 @@ The return value can have one of the following types.</p>
<tag><c>{dpr, [option()]}</c></tag>
<item>
<p>
-Causes Disconnect-Peer-Request to be sent to the peer, the transport
+Send Disconnect-Peer-Request to the peer, the transport
process being terminated following reception of
Disconnect-Peer-Answer or timeout.
An <c>option()</c> can be one of the following.</p>
@@ -1091,7 +1148,7 @@ An <c>option()</c> can be one of the following.</p>
<tag><c>{cause, 0|rebooting|1|busy|2|goaway}</c></tag>
<item>
<p>
-The Disconnect-Cause to send, <c>REBOOTING</c>, <c>BUSY</c> and
+Disconnect-Cause to send, <c>REBOOTING</c>, <c>BUSY</c> and
<c>DO_NOT_WANT_TO_TALK_TO_YOU</c> respectively.
Defaults to <c>rebooting</c> for <c>Reason=service|application</c> and
<c>goaway</c> for <c>Reason=transport</c>.</p>
@@ -1100,9 +1157,9 @@ Defaults to <c>rebooting</c> for <c>Reason=service|application</c> and
<tag><c>{timeout, &dict_Unsigned32;}</c></tag>
<item>
<p>
-The number of milliseconds after which the transport process is
+Number of milliseconds after which the transport process is
terminated if DPA has not been received.
-Defaults to 1000.</p>
+Defaults to the value of &dpa_timeout;.</p>
</item>
</taglist>
</item>
@@ -1116,7 +1173,7 @@ Equivalent to <c>{dpr, []}</c>.</p>
<tag><c>close</c></tag>
<item>
<p>
-Causes the transport process to be terminated without
+Terminate the transport process without
Disconnect-Peer-Request being sent to the peer.</p>
</item>
@@ -1139,11 +1196,34 @@ configured them.</p>
Defaults to a single callback returning <c>dpr</c>.</p>
</item>
+<marker id="dpa_timeout"/>
+<tag><c>{dpa_timeout, &dict_Unsigned32;}</c></tag>
+<item>
+<p>
+Number of milliseconds after which a transport connection is
+terminated following an outgoing DPR if DPA is not received.</p>
+
+<p>
+Defaults to 1000.</p>
+</item>
+
+<marker id="dpr_timeout"/>
+<tag><c>{dpr_timeout, &dict_Unsigned32;}</c></tag>
+<item>
+<p>
+Number of milliseconds after which a transport connection is
+terminated following an incoming DPR if the peer does not close the
+connection.</p>
+
+<p>
+Defaults to 5000.</p>
+</item>
+
<marker id="length_errors"/>
<tag><c>{length_errors, exit|handle|discard}</c></tag>
<item>
<p>
-Specifies how to deal with errors in the Message Length field of the
+How to deal with errors in the Message Length field of the
Diameter Header in an incoming message.
An error in this context is that the length is not at least 20 bytes
(the length of a Header), is not a multiple of 4 (a valid length) or
@@ -1175,11 +1255,26 @@ See &man_tcp; for the behaviour of that module.</p>
</note>
</item>
+<tag><c>{pool_size, pos_integer()}</c></tag>
+<item>
+<p>
+Number of transport processes to start.
+For a listening transport, determines the size of the pool of
+accepting transport processes, a larger number being desirable for
+processing multiple concurrent peer connection attempts.
+For a connecting transport, determines the number of connections to
+the peer in question that will be attempted to be establshed:
+the &service_opt;: <c>restrict_connections</c> should also be
+configured on the service in question to allow multiple connections to
+the same peer.</p>
+
+</item>
+
<marker id="spawn_opt"/>
<tag><c>{spawn_opt, [term()]}</c></tag>
<item>
<p>
-An options list passed to &spawn_opt; when spawning a process for an
+Options passed to &spawn_opt; when spawning a process for an
incoming Diameter request.
Options <c>monitor</c> and <c>link</c> are ignored.</p>
@@ -1192,7 +1287,7 @@ Defaults to the list configured on the service if not specified.</p>
<tag><c>{transport_config, term(), &dict_Unsigned32; | infinity}</c></tag>
<item>
<p>
-A term passed as the third argument to the &transport_start; function of
+Term passed as the third argument to the &transport_start; function of
the relevant &transport_module; in order to
start a transport process.
Defaults to the empty list if unspecified.</p>
@@ -1220,7 +1315,7 @@ To listen on both SCTP and TCP, define one transport for each.</p>
<tag><c>{transport_module, atom()}</c></tag>
<item>
<p>
-A module implementing a transport process as defined in &man_transport;.
+Module implementing a transport process as defined in &man_transport;.
Defaults to <c>diameter_tcp</c> if unspecified.</p>
<p>
@@ -1240,7 +1335,7 @@ corresponding timeout (see below) or all fail.</p>
<tag><c>{watchdog_config, [{okay|suspect, non_neg_integer()}]}</c></tag>
<item>
<p>
-Specifies configuration that alters the behaviour of the watchdog
+Configuration that alters the behaviour of the watchdog
state machine.
On key <c>okay</c>, the non-negative number of answered DWR
messages before transitioning from REOPEN to OKAY.
@@ -1295,7 +1390,7 @@ in predicate functions passed to &remove_transport;.</p>
<tag><c>transport_ref() = reference()</c></tag>
<item>
<p>
-An reference returned by &add_transport; that
+Reference returned by &add_transport; that
identifies the configuration.</p>
</item>
@@ -1724,6 +1819,15 @@ connection might look as follows.</p>
The information presented here is as in the <c>connect</c> case except
that the client connections are grouped under an <c>accept</c> tuple.</p>
+<p>
+Whether or not the &transport_opt; <c>pool_size</c> has been
+configured affects the format
+of the listing in the case of a connecting transport, since a value
+greater than 1 implies multiple transport processes for the same
+<c>&transport_ref;</c>, as in the listening case.
+The format in this case is similar to the listening case, with a
+<c>pool</c> tuple in place of an <c>accept</c> tuple.</p>
+
</item>
<tag><c>connections</c></tag>
diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml
index 0b6839dcb2..67c430c40a 100644
--- a/lib/diameter/doc/src/diameter_app.xml
+++ b/lib/diameter/doc/src/diameter_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY message '<seealso marker="#message">message()</seealso>'>
<!ENTITY dict
diff --git a/lib/diameter/doc/src/diameter_codec.xml b/lib/diameter/doc/src/diameter_codec.xml
index 9d26466b25..308a56fab7 100644
--- a/lib/diameter/doc/src/diameter_codec.xml
+++ b/lib/diameter/doc/src/diameter_codec.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY records
'<seealso marker="diameter_dict#MESSAGE_RECORDS">diameter_dict(4)</seealso>'>
diff --git a/lib/diameter/doc/src/diameter_dict.xml b/lib/diameter/doc/src/diameter_dict.xml
index 4f51a12ebc..5cf1b174a0 100644
--- a/lib/diameter/doc/src/diameter_dict.xml
+++ b/lib/diameter/doc/src/diameter_dict.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "fileref.dtd" [
<!ENTITY format
'<seealso marker="#FILE_FORMAT">FILE FORMAT</seealso>'>
@@ -529,6 +529,11 @@ answer record and passed to a &app_handle_request;
callback upon reception of an incoming request.</p>
<p>
+In cases in which there is a choice between string() and binary() types
+for OctetString() and derived types, the representation is determined
+by the value of &mod_string_decode;.</p>
+
+<p>
<em>Basic AVP Data Formats</em></p>
<marker id="OctetString"/>
@@ -541,7 +546,7 @@ callback upon reception of an incoming request.</p>
<marker id="Grouped"/>
<pre>
-OctetString() = [0..255]
+OctetString() = string() | binary()
Integer32() = -2147483647..2147483647
Integer64() = -9223372036854775807..9223372036854775807
Unsigned32() = 0..4294967295
@@ -603,7 +608,7 @@ and <c>{{2104,2,26},{9,42,23}}</c> (both inclusive) can be encoded.</p>
<marker id="UTF8String"/>
<pre>
-UTF8String() = [integer()]
+UTF8String() = [integer()] | binary()
</pre>
<p>
diff --git a/lib/diameter/doc/src/diameter_examples.xml b/lib/diameter/doc/src/diameter_examples.xml
index 1fd7755695..7808d64b8d 100644
--- a/lib/diameter/doc/src/diameter_examples.xml
+++ b/lib/diameter/doc/src/diameter_examples.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
-<year>2011</year><year>2012</year>
+<year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
diff --git a/lib/diameter/doc/src/diameter_intro.xml b/lib/diameter/doc/src/diameter_intro.xml
index 6c1d1910d2..93293f2d8e 100644
--- a/lib/diameter/doc/src/diameter_intro.xml
+++ b/lib/diameter/doc/src/diameter_intro.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd" [
<!ENTITY % also SYSTEM "seealso.ent">
%also;
diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml
index 1c1eff6c6a..0c7e6b794d 100644
--- a/lib/diameter/doc/src/diameter_make.xml
+++ b/lib/diameter/doc/src/diameter_make.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY compile_forms2
'<seealso marker="compiler:compile#forms-2">compile:forms/2</seealso>'>
@@ -16,7 +16,7 @@
<header>
<copyright>
<year>2012</year>
-<year>2013</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -52,7 +52,7 @@ under the License.
<p>
The function &codec; is used to compile a diameter
&dictionary; into Erlang source.
-The resulting source implements the interface diameter required
+The resulting source implements the interface diameter requires
to encode and decode the dictionary's messages and AVPs.</p>
<p>
@@ -175,6 +175,10 @@ Note that a dictionary's <c>&dict_name;</c>, together with the
The <c>&dict_name;</c> of a literal input dictionary defaults to
<c>dictionary</c>.</p>
+<p>
+A returned error reason can be converted into a readable string using
+&format_error;.</p>
+
</desc>
</func>
@@ -206,6 +210,18 @@ The return value is also a parsed dictionary.</p>
</desc>
</func>
+<!-- ===================================================================== -->
+
+<func>
+<name>format_error(Reason) -> string()</name>
+<fsummary>Turn an error reason into a readable string.</fsummary>
+<desc>
+
+<p>
+Turn an error reason returned by &codec; into a readable string.</p>
+</desc>
+</func>
+
</funcs>
<!-- ===================================================================== -->
diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml
index 2be77e3dfd..6302cb1435 100644
--- a/lib/diameter/doc/src/diameter_sctp.xml
+++ b/lib/diameter/doc/src/diameter_sctp.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY gen_sctp '<seealso marker="kernel:gen_sctp">gen_sctp(3)</seealso>'>
<!ENTITY gen_sctp_open1
@@ -15,7 +15,8 @@
<erlref>
<header>
<copyright>
-<year>2011</year><year>2013</year>
+<year>2011</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -113,7 +114,7 @@ and port respectively.</p>
<p>
Multiple <c>ip</c> options can be specified for a multihomed peer.
If none are specified then the values of <c>Host-IP-Address</c>
-in the <c>#diameter_service{}</c> record are used.
+in the <c>diameter_service</c> record are used.
(In particular, one of these must be specified.)
Option <c>port</c> defaults to 3868 for a listening transport and 0 for a
connecting transport.</p>
@@ -131,25 +132,18 @@ the buffer size.</p>
</warning>
<p>
-diameter_sctp uses the <c>transport_data</c> field of
-the <c>#diameter_packet{}</c> record to communicate the stream on which an
-inbound message has been received, or on which an outbound message
-should be sent: the value will be of the form <c>{stream, Id}</c>
-on an inbound message passed to a &app_handle_request; or
-&app_handle_answer; callback.
-For an outbound message, either <c>undefined</c> (explicitly or
-by receiving the outbound message as a <c>binary()</c>) or a tuple
-should be set in the return value of &app_handle_request;
-(typically by retaining the value passed into this function)
-or &app_prepare_request;.
-The value <c>undefined</c> uses a "next outbound stream" id and
-increments this modulo the total number outbound streams.
-That is, successive values of <c>undefined</c> cycle through all
-outbound streams.</p>
-
-<!-- TODO: Some way of getting at the number of available outbound -->
-<!-- streams. -->
-
+The <c>transport_data</c> field of record <c>diameter_packet</c>
+is used to communicate the stream on which an inbound message
+has been received, or on which an outbound message should be sent.
+The value will be of the form <c>{stream, Id}</c> for an inbound
+message passed to a &app_handle_request; or &app_handle_answer;
+callback.
+For an outbound message, <c>{outstream, Id}</c> in the return value of
+&app_handle_request; or &app_prepare_retransmit; sets the outbound
+stream, the stream id being interpreted modulo the number of outbound
+streams.
+Any other value, or not setting a value, causes successive such sends
+to cycle though all outbound streams.</p>
</desc>
</func>
diff --git a/lib/diameter/doc/src/diameter_soc.xml b/lib/diameter/doc/src/diameter_soc.xml
index 4f5419122f..d9159f84b5 100644
--- a/lib/diameter/doc/src/diameter_soc.xml
+++ b/lib/diameter/doc/src/diameter_soc.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd" [
<!ENTITY % also SYSTEM "seealso.ent" >
%also;
diff --git a/lib/diameter/doc/src/diameter_soc_rfc6733.xml b/lib/diameter/doc/src/diameter_soc_rfc6733.xml
index deb4d05b0f..34ec902632 100644
--- a/lib/diameter/doc/src/diameter_soc_rfc6733.xml
+++ b/lib/diameter/doc/src/diameter_soc_rfc6733.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!--
<copyright>
-<year>2013</year>
+<year>2013</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
diff --git a/lib/diameter/doc/src/diameter_tcp.xml b/lib/diameter/doc/src/diameter_tcp.xml
index ce4d6cfd0f..f6bbe7dd23 100644
--- a/lib/diameter/doc/src/diameter_tcp.xml
+++ b/lib/diameter/doc/src/diameter_tcp.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY start '<seealso marker="#start-3">start/3</seealso>'>
<!ENTITY gen_tcp_connect3
diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml
index 9161bd1f48..1618d05c47 100644
--- a/lib/diameter/doc/src/diameter_transport.xml
+++ b/lib/diameter/doc/src/diameter_transport.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
<!ENTITY message '<seealso marker="#message">message()</seealso>'>
<!ENTITY MESSAGES '<seealso marker="#MESSAGES">MESSAGES</seealso>'>
diff --git a/lib/diameter/doc/src/diameter_using.xml b/lib/diameter/doc/src/diameter_using.xml
index c487d94a16..4427d29c3c 100644
--- a/lib/diameter/doc/src/diameter_using.xml
+++ b/lib/diameter/doc/src/diameter_using.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/diameter/doc/src/diameterc.xml b/lib/diameter/doc/src/diameterc.xml
index 039f4f9cdd..5bffe9a771 100644
--- a/lib/diameter/doc/src/diameterc.xml
+++ b/lib/diameter/doc/src/diameterc.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd" [
<!ENTITY dictionary
'<seealso marker="diameter_dict">dictionary file</seealso>'>
diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml
index 18c712ec3d..c5df63a7f0 100644
--- a/lib/diameter/doc/src/notes.xml
+++ b/lib/diameter/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd" [
<!ENTITY % also SYSTEM "seealso.ent" >
<!ENTITY % here SYSTEM "seehere.ent" >
@@ -11,7 +11,7 @@
<header>
<copyright>
<year>2011</year>
-<year>2013</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -42,6 +42,668 @@ first.</p>
<!-- ===================================================================== -->
+<section><title>diameter 1.9.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix broken relay counters.</p>
+ <p>
+ OTP-12654 in OTP 17.5.3 broke counters in the case of
+ answer messages received in the relay application.
+ Counters were accumulated as unknown messages or
+ no_result_code instead of as relayed messages on the
+ intended Result-Code and 'Experimental-Result' tuples.</p>
+ <p>
+ Own Id: OTP-12741</p>
+ </item>
+ <item>
+ <p>
+ Fix diameter_sctp listener race.</p>
+ <p>
+ An oversight in OTP-12428 made it possible to start a
+ transport process that could not establish associations.</p>
+ <p>
+ Own Id: OTP-12744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.9.1</title>
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ Don't leave extra bit in decoded AVP data.</p>
+ <p>
+ OTP-12074 in OTP 17.3 missed one case: a length error on
+ a trailing AVP unknown to the dictionary in question.</p>
+ <p>
+ Own Id: OTP-12642</p>
+ </item>
+ <item>
+ <p>
+ Don't confuse Result-Code and Experimental-Result</p>
+ <p>
+ The errors field of a decoded diameter_packet record was
+ populated with a Result-Code AVP when an
+ Experimental-Result containing a 3xxx Result-Code was
+ received in an answer not setting the E-bit. The correct
+ AVP is now extracted from the incoming message.</p>
+ <p>
+ Own Id: OTP-12654</p>
+ </item>
+ <item>
+ <p>
+ Don't count on unknown Application Id.</p>
+ <p>
+ OTP-11721 in OTP 17.1 missed the case of an Application
+ Id not agreeing with that of the dictionary in question,
+ causing counters to be accumulated on keys containing the
+ unknown id.</p>
+ <p>
+ Own Id: OTP-12701</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Don't discard outgoing answers unnecessarily.</p>
+ <p>
+ Answers missing a Result-Code AVP or setting an E-bit
+ inappropriately were discarded even if encode was
+ successful.</p>
+ <p>
+ Own Id: OTP-11492</p>
+ </item>
+ <item>
+ <p>
+ Increase supervision timeouts.</p>
+ <p>
+ At diameter application shutdown, DPR could be omitted on
+ open peer connections because of short supervision
+ timeouts.</p>
+ <p>
+ Own Id: OTP-12412</p>
+ </item>
+ <item>
+ <p>
+ Fix retransmission of messages sent as header/avps list.</p>
+ <p>
+ Extracting End-to-End and Hop-by-Hop Identifiers resulted
+ in a function clause error, resulting in a handle_error
+ callback.</p>
+ <p>
+ Own Id: OTP-12415</p>
+ </item>
+ <item>
+ <p>
+ Fix diameter_avp decode of Grouped AVPs having decode
+ errors.</p>
+ <p>
+ Components of such an AVP were not extracted, causing it
+ to be represented by a single diameter_avp record instead
+ of the intended list.</p>
+ <p>
+ Dictionary files must be recompiled for the fix to have
+ effect.</p>
+ <p>
+ Own Id: OTP-12475</p>
+ </item>
+ <item>
+ <p>
+ Fix ordering of AVPs in relayed messages.</p>
+ <p>
+ The order was reversed relative to the received order,
+ with a Route-Record AVP prepended.</p>
+ <p>
+ Thanks to Andrzej Trawiński.</p>
+ <p>
+ Own Id: OTP-12551</p>
+ </item>
+ <item>
+ <p>
+ Fix issues with DiameterURI encode/decode.</p>
+ <p>
+ RFC 6773 changed the default port and transport, but the
+ RFC 3588 defaults were used even if the RFC 6733 common
+ dictionary was in use. The RFC 3588 defaults are now only
+ used when the common dictionary is
+ diameter_gen_base_rfc3588.</p>
+ <p>
+ Both RFC 3588 and 6733 disallow
+ transport=udp;protocol=diameter. Encode of the
+ combination now fails.</p>
+ <p>
+ Decode of ports numbers outside the range 0-65535 and
+ fully qualified domain names longer than 255 octets now
+ fails.</p>
+ <p>
+ Note that RFC 3588 is obsolete, and that there is a
+ diameter_gen_base_rfc6733. The change in defaults is a
+ potential interoperability problem when moving to RFC
+ 6733 with peers that do not send all URI components. The
+ fact that 6733 allows 5xxx result codes in answer
+ messages setting the E-bit, which RFC 3588 doesn't, is
+ another.</p>
+ <p>
+ Own Id: OTP-12589</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add service_opt() string_decode.</p>
+ <p>
+ To disable the decode of potentially large binaries to
+ string. This prevents large strings from being copied
+ when incoming Diameter messages are passed between
+ processes, a vulnerability that can lead to memory being
+ exhausted given sufficiently malicious peers.</p>
+ <p>
+ The value is a boolean(), true being the default for
+ backwards compatibility. Setting false causes both
+ diameter_caps records and decoded messages to contain
+ binary() in relevant places that previously had string():
+ diameter_app(3) callbacks need to be prepared for the
+ change.</p>
+ <p>
+ The Diameter types affected are OctetString and the
+ derived types UTF8String, DiameterIdentity, DiameterURI,
+ IPFilterRule, and QoSFilterRule. Time and Address are
+ unaffected.</p>
+ <p>
+ Own Id: OTP-11952</p>
+ </item>
+ <item>
+ <p>
+ Add transport_opt() pool_size.</p>
+ <p>
+ To allow for pools of accepting transport processes,
+ which can better service multiple simultaneous peer
+ connections. The option can also be used with connecting
+ transports, to establish multiple connections to the same
+ peer without having to configure multiple transports.</p>
+ <p>
+ Own Id: OTP-12428</p>
+ </item>
+ <item>
+ <p>
+ Allow DPR to be sent with diameter:call/4.</p>
+ <p>
+ It has been possible to send, but the answer was regarded
+ as unsolicited and discarded. DPA now causes the
+ transport process in question to be terminated, as for
+ DPR that diameter itself sends.</p>
+ <p>
+ Own Id: OTP-12542</p>
+ </item>
+ <item>
+ <p>
+ Discard requests after DPR.</p>
+ <p>
+ RFC 6733 is imprecise, but the tone is that messages
+ received after DPR are an exception to be dealt with only
+ because of the possibility of unordered delivery over
+ SCTP. As a consequence, and because a request following
+ DPR is unlikely to be answered due to the impending loss
+ of the peer connection, discard outgoing requests
+ following an outgoing or incoming DPR. Incoming requests
+ are also discarded, with the exception of DPR itself.
+ Answers are sent and received as usual.</p>
+ <p>
+ Own Id: OTP-12543</p>
+ </item>
+ <item>
+ <p>
+ Add transport_opt() dpr_timeout.</p>
+ <p>
+ To cause a peer connection to be closed following an
+ outgoing DPA when the peer fails to do so. It is the
+ recipient of DPA that should close the connection
+ according to RFC 6733.</p>
+ <p>
+ Own Id: OTP-12609</p>
+ </item>
+ <item>
+ <p>
+ Add service_opt() incoming_maxlen.</p>
+ <p>
+ To bound the expected size of incoming Diameter messages.
+ Messages larger than the specified number of bytes are
+ discarded, to prevent a malicious peer from generating
+ excessive load.</p>
+ <p>
+ Own Id: OTP-12628</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix remote diameter_request table leak.</p>
+ <p>
+ An outgoing request whose pick_peer callback selected a
+ transport on another node resulted in an orphaned table
+ entry on that node.</p>
+ <p>
+ Own Id: OTP-12196</p>
+ </item>
+ <item>
+ <p>
+ Fix handling of 3xxx Result-Code without E-bit.</p>
+ <p>
+ OTP-12233 broke the population of the errors field of the
+ diameter_packet record when an incoming request with an
+ E-bit/Result-Code mismatch was detected, causing a
+ 4-tuple to be inserted as Result-Code in a diameter_avp
+ record.</p>
+ <p>
+ Own Id: OTP-12233</p>
+ </item>
+ <item>
+ <p>
+ Fix ignored connect timer.</p>
+ <p>
+ There are two timers governing the establishment of peer
+ connections: connect_timer and watchdog_timer. The former
+ is the RFC 6733 Tc timer, and is used at initial
+ connection establishment. The latter is RFC 3539 TwInit,
+ and is used for connection reestablishment. A connecting
+ transport erroneously used watchdog_timer in both cases.</p>
+ <p>
+ Own Id: OTP-12281 Aux Id: seq12728 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Order candidate peers in pick_peer callbacks.</p>
+ <p>
+ The order of candidate peers presented to a
+ diameter_app(3) pick_peer callback has previously not
+ been documented, but there are use cases that are
+ simplified by an ordering. The order is now determined by
+ the filter.</p>
+ <p>
+ Own Id: OTP-12308</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.7.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Don't leave extra bit in decoded AVP data.</p>
+ <p>
+ An extra bit could be communicated in the data field of a
+ diameter_avp record in the case of length errors. Of no
+ consequence for code using the record encoding of
+ Diameter messages, but code examining diameter_avp
+ records would see this bit.</p>
+ <p>
+ Dictionary files must be recompiled for the fix to have
+ effect.</p>
+ <p>
+ Own Id: OTP-12074</p>
+ </item>
+ <item>
+ <p>
+ Fix counting of outgoing requests and answers setting the
+ E-bit.</p>
+ <p>
+ OTP-11721 broke these counters for all outgoing requests
+ except DWR, and caused answers setting the E-bit to be
+ counted as unknown messages.</p>
+ <p>
+ Own Id: OTP-12080</p>
+ </item>
+ <item>
+ <p>
+ Fix Failed-AVP decode.</p>
+ <p>
+ The best-effort decode only worked for AVPs in the common
+ dictionary, not for those in the dictionary of the
+ application identified in the Diameter Header of the
+ answer message in question.</p>
+ <p>
+ Failed-AVP in an answer decoded with the RFC 3588 common
+ dictionary (diameter_gen_base_rfc3588) was regarded as an
+ error. The RFC 6733 dictionary was unaffected.</p>
+ <p>
+ Dictionary files must be recompiled for the fix to have
+ effect.</p>
+ <p>
+ Own Id: OTP-12094</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Improve robustness.</p>
+ <p>
+ Counters returned by diameter:service_info/2 now only
+ count messages known to the dictionary in question, so
+ that an attacker cannot cause arbitrarily many counters
+ to be created.</p>
+ <p>
+ Messages to the Erlang log have been minimized, and those
+ related to traffic have been removed entirely since an
+ attacker could cause a node to be logged to death.
+ Consequently, the default answer_errors configuration has
+ been changed from report to discard. A service needs to
+ be restarted for the change in default to take effect.</p>
+ <p>
+ Own Id: OTP-11721</p>
+ </item>
+ <item>
+ <p>
+ Fix request table leak.</p>
+ <p>
+ Outgoing Diameter requests are stored in a table until an
+ answer is received or times out. Calling
+ diameter:stop_service/1 before this took place would
+ orphan the entries, resulting in a memory leak.</p>
+ <p>
+ Own Id: OTP-11893</p>
+ </item>
+ <item>
+ <p>
+ Fix broken SCTP transport.</p>
+ <p>
+ OTP-11593 caused the sending of answer messages over SCTP
+ to fail.</p>
+ <p>
+ Own Id: OTP-11901 Aux Id: OTP-11593 </p>
+ </item>
+ <item>
+ <p>
+ Fix watchdog process leak.</p>
+ <p>
+ A failed capabilities exchange on a listening transport
+ would orphan a process, causing a memory leak.</p>
+ <p>
+ Own Id: OTP-11934</p>
+ </item>
+ <item>
+ <p>
+ Fix incorrect handling of incoming DPR.</p>
+ <p>
+ In the case of a listening transport, a reconnection by a
+ peer following DPR could transition the watchdog state to
+ REOPEN instead of OKAY.</p>
+ <p>
+ Own Id: OTP-11938</p>
+ </item>
+ <item>
+ <p>
+ Fix handling of AVP length errors on unknown AVPs.</p>
+ <p>
+ An AVP (Header) length that pointed past the end of the
+ message was not flagged as a 5014 error in this case.
+ Moreover, encoding such an AVP in the Failed-AVP of an
+ answer message as a consequence of other errors (eg.
+ M-bit, resulting in 5001) failed if the AVP contained a
+ complete header.</p>
+ <p>
+ Dictionary files must be recompiled for the fix to have
+ effect.</p>
+ <p>
+ Own Id: OTP-11946</p>
+ </item>
+ <item>
+ <p>
+ Fix broken check in dictionary compilation.</p>
+ <p>
+ That an AVP specified in the content of a @codecs or
+ @custom_types section was undefined went undetected,
+ causing compilation to fail when attempting to lookup the
+ AVP's type.</p>
+ <p>
+ Own Id: OTP-11958</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add result code counters for CEA, DWA, and DPA.</p>
+ <p>
+ In addition to the existing result code counters on other
+ answer messages.</p>
+ <p>
+ Own Id: OTP-11891</p>
+ </item>
+ <item>
+ <p>
+ Add best-effort decode of AVPs within Failed-AVP.</p>
+ <p>
+ OTP-11007 disabled the decode of AVPs in Failed-AVP since
+ errors could cause the decode of Failed-AVP itself to
+ fail. Component AVPs are now decoded if possible,
+ otherwise not. AVPs of type Grouped are decoded as much
+ as possible, as deeply as possible.</p>
+ <p>
+ Dictionary files must be recompiled for the fix to have
+ effect.</p>
+ <p>
+ Own Id: OTP-11936 Aux Id: OTP-11007 </p>
+ </item>
+ <item>
+ <p>
+ Add counters for encode errors in outgoing Diameter
+ messages.</p>
+ <p>
+ In addition to the existing counters on decode errors.
+ The latter now count independently of result codes in
+ answer messages since decode errors do not preclude the
+ presence of a result code.</p>
+ <p>
+ Own Id: OTP-11937</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>diameter 1.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add missing check at dictionary compilation.</p>
+ <p>
+ In particular, that an AVP defined as having type Grouped
+ in an @avp_types section has a corresponding definition
+ in a @grouped section.</p>
+ <p>
+ Own Id: OTP-11561</p>
+ </item>
+ <item>
+ <p>
+ Correct documentation on the setting of Origin-State-Id</p>
+ <p>
+ It was incorrectly stated that the AVP would be set in an
+ outgoing DPR/DPA.</p>
+ <p>
+ Own Id: OTP-11583</p>
+ </item>
+ <item>
+ <p>
+ Change interface for communicating outbound stream id to
+ diameter_sctp</p>
+ <p>
+ The module uses the transport_data field of record
+ diameter_packet to communicate the stream on which the an
+ incoming message is received and on which an outgoing
+ message should be sent, the previous interface being that
+ both are communicated as a tuple of the form {stream,
+ Id}. However, since diameter retains the value of an
+ incoming request's transport_data unless the
+ corresponding answer message specifies otherwise, the
+ behaviour in this case is to send an answer on the
+ outbound stream with the same identifier as the that of
+ the inbound stream on which the request was received. If
+ the inbound stream id is greater than or equal to the
+ number of outbound streams then this is guaranteed to
+ fail, causing the transport process in question to
+ terminate. There is no relationship between inbound and
+ outbound stream identifiers so diameter_sctp's imposition
+ of one is simply wrong.</p>
+ <p>
+ Outbound stream ids are now communicated with a different
+ tuple: {outstream, Id}, interpreted modulo the number of
+ outbound streams. Thus, retention of an inbound request's
+ transport_data has no effect on the selection of an
+ outbound stream.</p>
+ <p>
+ The change in interface is not strictly backwards
+ compatible because of the new atom for the outbound
+ stream. However, as there is currently no documented way
+ of obtaining the available number of outbound streams for
+ a peer connection, there is no way for a client to have
+ known the range of ids from which it could reliably have
+ chosen with the previous interface, so any setting of the
+ outbound stream has probably been unintentional. Not
+ explicitly specifying an outbound stream now results in a
+ round-robin selection.</p>
+ <p>
+ Thanks to Sharmila Pillai for reporting the problem.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11593</p>
+ </item>
+ <item>
+ <p>
+ Fix unicode path failure in diameter_make:codec/2.</p>
+ <p>
+ A dictionary path containing a unicode codepoint > 255
+ caused the function to fail.</p>
+ <p>
+ Own Id: OTP-11655</p>
+ </item>
+ <item>
+ <p>
+ Fix 'accept' config to diameter_sctp.</p>
+ <p>
+ OTP-10893 added support for {accept, Match} tuples to
+ specify addresses or regexps that should be matched
+ against peer addresses to decide whether or not a newly
+ established association should be retained, but this
+ hasn't been functional in the SCTP case because of
+ missing support in inet(3).</p>
+ <p>
+ The display of both local and peer addresses in
+ diameter:service_info/2 output has also been corrected.</p>
+ <p>
+ Own Id: OTP-11661 Aux Id: OTP-10229 </p>
+ </item>
+ <item>
+ <p>
+ Be lenient with the M-bit in Grouped AVPs.</p>
+ <p>
+ RFC 6733 says this, in 4.4:</p>
+ <p>
+ <taglist><item><p><c>Receivers of a Grouped AVP that does
+ not have the 'M' (mandatory) bit set and one or more of
+ the encapsulated AVPs within the group has the 'M'
+ (mandatory) bit set MAY simply be ignored if the Grouped
+ AVP itself is unrecognized. The rule applies even if the
+ encapsulated AVP with its 'M' (mandatory) bit set is
+ further encapsulated within other sub-groups, i.e., other
+ Grouped AVPs embedded within the Grouped
+ AVP.</c></p></item></taglist></p>
+ <p>
+ The first sentence is mangled but take it to mean this:</p>
+ <p>
+ <taglist><item><p><c>An unrecognized AVP of type Grouped
+ that does not set the 'M' bit MAY be ignored even if one
+ of its encapsulated AVPs sets the 'M'
+ bit.</c></p></item></taglist></p>
+ <p>
+ This is a bit of a non-statement since if the AVP is
+ unrecognized then its type is unknown. We therefore don't
+ know that its data bytes contain encapsulated AVPs, so
+ can't but ignore any of those that set the M-bit. Doing
+ anything else when the type *is* known would be
+ inconsistent.</p>
+ <p>
+ OTP-11087 (R16B03) caused the M-bit on any unrecognized
+ AVP to be regarded as an error, unrecognized being taken
+ to mean "not explicitly defined as a member of its
+ container". (That is, an AVP that can't be packed into a
+ dedicated record field, which is slightly stronger than
+ "not defined".) This fixed the original intention for
+ top-level AVPs but broke the required leniency for
+ Grouped AVPs whose type is known. This leniency is now
+ restored.</p>
+ <p>
+ Note that dictionary files need to be recompiled for the
+ change to have effect.</p>
+ <p>
+ Thanks to Rory McKeown for reporting the problem.</p>
+ <p>
+ Own Id: OTP-11675 Aux Id: OTP-11087 </p>
+ </item>
+ <item>
+ <p>
+ Fix pick_peer case clause failure.</p>
+ <p>
+ In the case of {call_mutates_state, true} configuration
+ on the service in question, any peer selection that
+ failed to select a peer resulted in a case clause
+ failure. This was noticed in the case of a peer failover
+ in which an alternate peer wasn't available.</p>
+ <p>
+ Own Id: OTP-11789</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>diameter 1.5</title>
<section><title>Improvements and New Features</title>
@@ -73,12 +735,6 @@ first.</p>
<p>
Own Id: OTP-11361</p>
</item>
- <item>
- <p>
- Fix silent make rules (Thanks to Anthony Ramine)</p>
- <p>
- Own Id: OTP-11514</p>
- </item>
</list>
</section>
@@ -86,7 +742,7 @@ first.</p>
<section><title>diameter 1.4.4</title>
- <section><title>Known Bugs and Problems</title>
+ <section><title>Fixed Bugs and Malfunctions</title>
<list>
<item>
<p>
diff --git a/lib/diameter/doc/src/ref_man.xml b/lib/diameter/doc/src/ref_man.xml
index 1095887144..62ba02b0b5 100644
--- a/lib/diameter/doc/src/ref_man.xml
+++ b/lib/diameter/doc/src/ref_man.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent
index 7bf7460351..4e205ffad7 100644
--- a/lib/diameter/doc/src/seealso.ent
+++ b/lib/diameter/doc/src/seealso.ent
@@ -4,7 +4,7 @@
%CopyrightBegin%
-Copyright Ericsson AB 2012-2013. All Rights Reserved.
+Copyright Ericsson AB 2012-2015. All Rights Reserved.
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
@@ -64,11 +64,14 @@ significant.
<!ENTITY capabilities_cb '<seealso marker="#capabilities_cb">capabilities_cb</seealso>'>
<!ENTITY capx_timeout '<seealso marker="#capx_timeout">capx_timeout</seealso>'>
<!ENTITY disconnect_cb '<seealso marker="#disconnect_cb">disconnect_cb</seealso>'>
+<!ENTITY dpa_timeout '<seealso marker="#dpa_timeout">dpa_timeout</seealso>'>
<!ENTITY transport_config '<seealso marker="#transport_config">transport_config</seealso>'>
<!ENTITY transport_module '<seealso marker="#transport_module">transport_module</seealso>'>
<!ENTITY connect_timer '<seealso marker="#connect_timer">connect_timer</seealso>'>
<!ENTITY watchdog_timer '<seealso marker="#watchdog_timer">watchdog_timer</seealso>'>
+<!ENTITY mod_string_decode '<seealso marker="diameter#service_opt">diameter:service_opt()</seealso> <seealso marker="diameter#string_decode">string_decode</seealso>'>
+
<!-- diameter_app -->
<!ENTITY app_handle_answer '<seealso marker="diameter_app#Mod:handle_answer-4">handle_answer/4</seealso>'>
@@ -102,6 +105,9 @@ significant.
<!ENTITY dict_Address '<seealso marker="diameter_dict#DATA_TYPES">Address()</seealso>'>
<!ENTITY dict_DiameterIdentity '<seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>'>
+<!ENTITY dict_DiameterURI '<seealso marker="diameter_dict#DATA_TYPES">DiameterURI()</seealso>'>
+<!ENTITY dict_IPFilterRule '<seealso marker="diameter_dict#DATA_TYPES">IPFilterRule()</seealso>'>
+<!ENTITY dict_QoSFilterRule '<seealso marker="diameter_dict#DATA_TYPES">QoSFilterRule()</seealso>'>
<!ENTITY dict_Grouped '<seealso marker="diameter_dict#DATA_TYPES">Grouped()</seealso>'>
<!ENTITY dict_OctetString '<seealso marker="diameter_dict#DATA_TYPES">OctetString()</seealso>'>
<!ENTITY dict_Time '<seealso marker="diameter_dict#DATA_TYPES">Time()</seealso>'>
@@ -117,6 +123,7 @@ significant.
<!ENTITY make_codec '<seealso marker="diameter_make#codec-2">diameter_make:codec/2</seealso>'>
<!ENTITY make_format '<seealso marker="diameter_make#format-1">diameter_make:format/1</seealso>'>
<!ENTITY make_flatten '<seealso marker="diameter_make#flatten-1">diameter_make:flatten/1</seealso>'>
+<!ENTITY make_format_error '<seealso marker="diameter_make#format_error-1">diameter_make:format_error/1</seealso>'>
<!-- diameter_transport -->
diff --git a/lib/diameter/doc/src/user_man.xml b/lib/diameter/doc/src/user_man.xml
index a6416c7e23..f915fa5a66 100644
--- a/lib/diameter/doc/src/user_man.xml
+++ b/lib/diameter/doc/src/user_man.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
-<year>2011</year>
+<year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/diameter/examples/code/GNUmakefile b/lib/diameter/examples/code/GNUmakefile
index 98e36a99e3..81f1da5a39 100644
--- a/lib/diameter/examples/code/GNUmakefile
+++ b/lib/diameter/examples/code/GNUmakefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2012. All Rights Reserved.
+# Copyright Ericsson AB 2010-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
EXAMPLES = client server relay # redirect proxy
CALLBACKS = $(EXAMPLES:%=%_cb)
-MODULES = peer $(EXAMPLES) $(EXAMPLES:%=%_cb)
+MODULES = node $(EXAMPLES) $(EXAMPLES:%=%_cb)
BEAM = $(MODULES:%=%.beam)
diff --git a/lib/diameter/examples/code/client.erl b/lib/diameter/examples/code/client.erl
index bfe71b0e56..844c9cdbdd 100644
--- a/lib/diameter/examples/code/client.erl
+++ b/lib/diameter/examples/code/client.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,9 +38,10 @@
-module(client).
-include_lib("diameter/include/diameter.hrl").
--include_lib("diameter/include/diameter_gen_base_rfc3588.hrl").
+-include_lib("diameter/include/diameter_gen_base_rfc6733.hrl").
-export([start/1, %% start a service
+ start/2, %%
connect/2, %% add a connecting transport
call/1, %% send using the record encoding
cast/1, %% send using the list encoding and detached
@@ -50,17 +51,14 @@
%% both the record and list encoding here, one detached and one not,
%% is just for demonstration purposes.
-%% Convenience functions using the default service name, ?SVC_NAME.
+%% Convenience functions using the default service name.
-export([start/0,
connect/1,
stop/0,
call/0,
cast/0]).
--define(SVC_NAME, ?MODULE).
--define(APP_ALIAS, ?MODULE).
--define(CALLBACK_MOD, client_cb).
-
+-define(DEF_SVC_NAME, ?MODULE).
-define(L, atom_to_list).
%% The service configuration. As in the server example, a client
@@ -70,27 +68,40 @@
{'Origin-Realm', "example.com"},
{'Vendor-Id', 0},
{'Product-Name', "Client"},
- {'Auth-Application-Id', [?DIAMETER_APP_ID_COMMON]},
- {application, [{alias, ?APP_ALIAS},
- {dictionary, ?DIAMETER_DICT_COMMON},
- {module, ?CALLBACK_MOD}]}]).
+ {'Auth-Application-Id', [0]},
+ {string_decode, false},
+ {application, [{alias, common},
+ {dictionary, diameter_gen_base_rfc6733},
+ {module, client_cb}]}]).
%% start/1
start(Name)
when is_atom(Name) ->
- peer:start(Name, ?SERVICE(Name)).
+ start(Name, []);
+
+start(Opts)
+ when is_list(Opts) ->
+ start(?DEF_SVC_NAME, Opts).
+
+%% start/0
start() ->
- start(?SVC_NAME).
+ start(?DEF_SVC_NAME).
+
+%% start/2
+
+start(Name, Opts) ->
+ node:start(Name, Opts ++ [T || {K,_} = T <- ?SERVICE(Name),
+ false == lists:keymember(K, 1, Opts)]).
%% connect/2
connect(Name, T) ->
- peer:connect(Name, T).
+ node:connect(Name, T).
connect(T) ->
- connect(?SVC_NAME, T).
+ connect(?DEF_SVC_NAME, T).
%% call/1
@@ -99,10 +110,10 @@ call(Name) ->
RAR = #diameter_base_RAR{'Session-Id' = SId,
'Auth-Application-Id' = 0,
'Re-Auth-Request-Type' = 0},
- diameter:call(Name, ?APP_ALIAS, RAR, []).
+ diameter:call(Name, common, RAR, []).
call() ->
- call(?SVC_NAME).
+ call(?DEF_SVC_NAME).
%% cast/1
@@ -111,15 +122,15 @@ cast(Name) ->
RAR = ['RAR', {'Session-Id', SId},
{'Auth-Application-Id', 0},
{'Re-Auth-Request-Type', 1}],
- diameter:call(Name, ?APP_ALIAS, RAR, [detach]).
+ diameter:call(Name, common, RAR, [detach]).
cast() ->
- cast(?SVC_NAME).
+ cast(?DEF_SVC_NAME).
%% stop/1
stop(Name) ->
- peer:stop(Name).
+ node:stop(Name).
stop() ->
- stop(?SVC_NAME).
+ stop(?DEF_SVC_NAME).
diff --git a/lib/diameter/examples/code/client_cb.erl b/lib/diameter/examples/code/client_cb.erl
index ee3dcb2fec..843cdd9262 100644
--- a/lib/diameter/examples/code/client_cb.erl
+++ b/lib/diameter/examples/code/client_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,23 +77,11 @@ prepare_retransmit(Packet, SvcName, Peer) ->
%% handle_answer/4
-%% Since client.erl has detached the call when using the list
-%% encoding and not otherwise, output to the terminal in the
-%% the former case, return in the latter.
-
-handle_answer(#diameter_packet{msg = Msg}, Request, _SvcName, _Peer)
- when is_list(Request) ->
- io:format("answer: ~p~n", [Msg]);
-
handle_answer(#diameter_packet{msg = Msg}, _Request, _SvcName, _Peer) ->
{ok, Msg}.
%% handle_error/4
-handle_error(Reason, Request, _SvcName, _Peer)
- when is_list(Request) ->
- io:format("error: ~p~n", [Reason]);
-
handle_error(Reason, _Request, _SvcName, _Peer) ->
{error, Reason}.
diff --git a/lib/diameter/examples/code/node.erl b/lib/diameter/examples/code/node.erl
new file mode 100644
index 0000000000..4fe9007059
--- /dev/null
+++ b/lib/diameter/examples/code/node.erl
@@ -0,0 +1,174 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%% A library module used by the example Diameter nodes. Does little
+%% more than provide an alternate/simplified transport configuration.
+%%
+
+-module(node).
+
+-export([start/2,
+ listen/2,
+ connect/2,
+ stop/1]).
+
+-type protocol()
+ :: tcp | sctp.
+
+-type ip_address()
+ :: default
+ | inet:ip_address().
+
+-type server_transport()
+ :: protocol()
+ | {protocol(), ip_address(), non_neg_integer()}.
+
+-type server_opts()
+ :: server_transport()
+ | {server_transport(), [diameter:transport_opt()]}
+ | [diameter:transport_opt()].
+
+-type client_transport()
+ :: protocol() | any
+ | {protocol() | any, ip_address(), non_neg_integer()}
+ | {protocol() | any, ip_address(), ip_address(), non_neg_integer()}.
+
+-type client_opts()
+ :: client_transport()
+ | {client_transport(), [diameter:transport_opt()]}
+ | [diameter:transport_opt()].
+
+%% The server_transport() and client_transport() config is just
+%% convenience: arbitrary options can be specifed as a
+%% [diameter:transport_opt()].
+
+-define(DEFAULT_PORT, 3868).
+
+%% ---------------------------------------------------------------------------
+%% Interface functions
+%% ---------------------------------------------------------------------------
+
+%% start/2
+
+-spec start(diameter:service_name(), [diameter:service_opt()])
+ -> ok
+ | {error, term()}.
+
+start(Name, Opts)
+ when is_atom(Name), is_list(Opts) ->
+ diameter:start_service(Name, Opts).
+
+%% connect/2
+
+-spec connect(diameter:service_name(), client_opts())
+ -> {ok, diameter:transport_ref()}
+ | {error, term()}.
+
+connect(Name, Opts)
+ when is_list(Opts) ->
+ diameter:add_transport(Name, {connect, Opts});
+
+connect(Name, {T, Opts}) ->
+ connect(Name, Opts ++ client_opts(T));
+
+connect(Name, T) ->
+ connect(Name, [{connect_timer, 5000} | client_opts(T)]).
+
+%% listen/2
+
+-spec listen(diameter:service_name(), server_opts())
+ -> {ok, diameter:transport_ref()}
+ | {error, term()}.
+
+listen(Name, Opts)
+ when is_list(Opts) ->
+ diameter:add_transport(Name, {listen, Opts});
+
+listen(Name, {T, Opts}) ->
+ listen(Name, Opts ++ server_opts(T));
+
+listen(Name, T) ->
+ listen(Name, server_opts(T)).
+
+%% stop/1
+
+-spec stop(diameter:service_name())
+ -> ok
+ | {error, term()}.
+
+stop(Name) ->
+ diameter:stop_service(Name).
+
+%% ---------------------------------------------------------------------------
+%% Internal functions
+%% ---------------------------------------------------------------------------
+
+%% server_opts/1
+%%
+%% Return transport options for a listening transport.
+
+server_opts({T, Addr, Port}) ->
+ [{transport_module, tmod(T)},
+ {transport_config, [{reuseaddr, true},
+ {ip, addr(Addr)},
+ {port, Port}]}];
+
+server_opts(T) ->
+ server_opts({T, loopback, ?DEFAULT_PORT}).
+
+%% client_opts/1
+%%
+%% Return transport options for a connecting transport.
+
+client_opts({T, LA, RA, RP})
+ when T == all; %% backwards compatibility
+ T == any ->
+ [[S, {C,Os}], T] = [client_opts({P, LA, RA, RP}) || P <- [sctp,tcp]],
+ [S, {C,Os,2000} | T];
+
+client_opts({T, LA, RA, RP}) ->
+ [{transport_module, tmod(T)},
+ {transport_config, [{raddr, addr(RA)},
+ {rport, RP},
+ {reuseaddr, true}
+ | ip(LA)]}];
+
+client_opts({T, RA, RP}) ->
+ client_opts({T, default, RA, RP});
+
+client_opts(T) ->
+ client_opts({T, loopback, loopback, ?DEFAULT_PORT}).
+
+%% ---------------------------------------------------------------------------
+
+tmod(tcp) -> diameter_tcp;
+tmod(sctp) -> diameter_sctp.
+
+ip(default) ->
+ [];
+ip(loopback) ->
+ [{ip, {127,0,0,1}}];
+ip(Addr) ->
+ [{ip, Addr}].
+
+addr(loopback) ->
+ {127,0,0,1};
+addr(A) ->
+ A.
diff --git a/lib/diameter/examples/code/peer.erl b/lib/diameter/examples/code/peer.erl
deleted file mode 100644
index b4ee17e4b7..0000000000
--- a/lib/diameter/examples/code/peer.erl
+++ /dev/null
@@ -1,150 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%
-%% A library module that factors out commonality in the example
-%% Diameter peers.
-%%
-
--module(peer).
-
--include_lib("diameter/include/diameter.hrl").
--include_lib("diameter/include/diameter_gen_base_rfc3588.hrl").
-
--export([start/2,
- listen/2,
- connect/2,
- stop/1]).
-
--type service_name()
- :: term().
-
--type protocol()
- :: tcp | sctp.
-
--type ip_address()
- :: default
- | inet:ip_address().
-
--type server_config()
- :: protocol()
- | {protocol(), ip_address(), non_neg_integer()}.
-
--type client_config()
- :: protocol()
- | {protocol(), ip_address(), non_neg_integer()}
- | {protocol(), ip_address(), ip_address(), non_neg_integer()}.
-
--define(DEFAULT_PORT, 3868).
-
-%% ---------------------------------------------------------------------------
-%% Interface functions
-%% ---------------------------------------------------------------------------
-
-%% start/2
-
--spec start(service_name(), list())
- -> ok
- | {error, term()}.
-
-start(Name, Opts)
- when is_atom(Name), is_list(Opts) ->
- diameter:start_service(Name, Opts).
-
-%% connect/2
-
--spec connect(service_name(), client_config())
- -> {ok, reference()}
- | {error, term()}.
-
-connect(Name, T) ->
- diameter:add_transport(Name, {connect, [{reconnect_timer, 5000}
- | client(T)]}).
-
-%% listen/2
-
--spec listen(service_name(), server_config())
- -> {ok, reference()}
- | {error, term()}.
-
-listen(Name, T) ->
- diameter:add_transport(Name, {listen, server(T)}).
-
-%% stop/1
-
--spec stop(service_name())
- -> ok
- | {error, term()}.
-
-stop(Name) ->
- diameter:stop_service(Name).
-
-%% ---------------------------------------------------------------------------
-%% Internal functions
-%% ---------------------------------------------------------------------------
-
-%% server/1
-%%
-%% Return config for a listening transport.
-
-server({T, Addr, Port}) ->
- [{transport_module, tmod(T)},
- {transport_config, [{reuseaddr, true},
- {ip, addr(Addr)},
- {port, Port}]}];
-
-server(T) ->
- server({T, loopback, ?DEFAULT_PORT}).
-
-%% client/1
-%%
-%% Return config for a connecting transport.
-
-client({all, LA, RA, RP}) ->
- [[M,{K,C}], T]
- = [client({P, LA, RA, RP}) || P <- [sctp,tcp]],
- [M, {K,C,2000} | T];
-
-client({T, LA, RA, RP}) ->
- [{transport_module, tmod(T)},
- {transport_config, [{raddr, addr(RA)},
- {rport, RP},
- {reuseaddr, true}
- | ip(LA)]}];
-
-client({T, RA, RP}) ->
- client({T, default, RA, RP});
-
-client(T) ->
- client({T, loopback, loopback, ?DEFAULT_PORT}).
-
-tmod(tcp) -> diameter_tcp;
-tmod(sctp) -> diameter_sctp.
-
-ip(default) ->
- [];
-ip(loopback) ->
- [{ip, {127,0,0,1}}];
-ip(Addr) ->
- [{ip, Addr}].
-
-addr(loopback) ->
- {127,0,0,1};
-addr(A) ->
- A.
diff --git a/lib/diameter/examples/code/redirect_cb.erl b/lib/diameter/examples/code/redirect_cb.erl
index 69836774a1..8d98b0d2df 100644
--- a/lib/diameter/examples/code/redirect_cb.erl
+++ b/lib/diameter/examples/code/redirect_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,12 +34,10 @@
-define(UNEXPECTED, erlang:error({unexpected, ?MODULE, ?LINE})).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
pick_peer(_, _, _SvcName, _State) ->
diff --git a/lib/diameter/examples/code/relay.erl b/lib/diameter/examples/code/relay.erl
index d3438f83f3..7bc46dc68d 100644
--- a/lib/diameter/examples/code/relay.erl
+++ b/lib/diameter/examples/code/relay.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,10 +31,8 @@
-module(relay).
--include_lib("diameter/include/diameter.hrl").
--include_lib("diameter/include/diameter_gen_base_rfc3588.hrl").
-
-export([start/1,
+ start/2,
listen/2,
connect/2,
stop/1]).
@@ -44,49 +42,56 @@
connect/1,
stop/0]).
--define(APP_ALIAS, ?MODULE).
--define(SVC_NAME, ?MODULE).
--define(CALLBACK_MOD, relay_cb).
+-define(DEF_SVC_NAME, ?MODULE).
%% The service configuration.
-define(SERVICE(Name), [{'Origin-Host', atom_to_list(Name) ++ ".example.com"},
{'Origin-Realm', "example.com"},
{'Vendor-Id', 193},
{'Product-Name', "RelayAgent"},
- {'Auth-Application-Id', [?DIAMETER_APP_ID_RELAY]},
- {application, [{alias, ?MODULE},
- {dictionary, ?DIAMETER_DICT_RELAY},
- {module, ?CALLBACK_MOD}]}]).
+ {'Auth-Application-Id', [16#FFFFFFFF]},
+ {string_decode, false},
+ {application, [{alias, relay},
+ {dictionary, diameter_relay},
+ {module, relay_cb}]}]).
%% start/1
start(Name)
when is_atom(Name) ->
- peer:start(Name, ?SERVICE(Name)).
+ start(Name, []).
+
+%% start/1
start() ->
- start(?SVC_NAME).
+ start(?DEF_SVC_NAME).
+
+%% start/2
+
+start(Name, Opts) ->
+ node:start(Name, Opts ++ [T || {K,_} = T <- ?SERVICE(Name),
+ false == lists:keymember(K, 1, Opts)]).
%% listen/2
listen(Name, T) ->
- peer:listen(Name, T).
+ node:listen(Name, T).
listen(T) ->
- listen(?SVC_NAME, T).
+ listen(?DEF_SVC_NAME, T).
%% connect/2
connect(Name, T) ->
- peer:connect(Name, T).
+ node:connect(Name, T).
connect(T) ->
- connect(?SVC_NAME, T).
+ connect(?DEF_SVC_NAME, T).
%% stop/1
stop(Name) ->
- peer:stop(Name).
+ node:stop(Name).
stop() ->
- stop(?SVC_NAME).
+ stop(?DEF_SVC_NAME).
diff --git a/lib/diameter/examples/code/relay_cb.erl b/lib/diameter/examples/code/relay_cb.erl
index 9f9cd8d5ae..68798014e6 100644
--- a/lib/diameter/examples/code/relay_cb.erl
+++ b/lib/diameter/examples/code/relay_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,12 +32,10 @@
handle_error/5,
handle_request/3]).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
%% Returning 'relay' from handle_request causes diameter to resend the
diff --git a/lib/diameter/examples/code/server.erl b/lib/diameter/examples/code/server.erl
index 3959461cec..f32cec594c 100644
--- a/lib/diameter/examples/code/server.erl
+++ b/lib/diameter/examples/code/server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,21 +34,17 @@
-module(server).
--include_lib("diameter/include/diameter.hrl").
--include_lib("diameter/include/diameter_gen_base_rfc3588.hrl").
-
-export([start/1, %% start a service
+ start/2, %%
listen/2, %% add a listening transport
stop/1]). %% stop a service
-%% Convenience functions using the default service name, ?SVC_NAME.
+%% Convenience functions using the default service name.
-export([start/0,
listen/1,
stop/0]).
--define(SVC_NAME, ?MODULE).
--define(APP_ALIAS, ?MODULE).
--define(CALLBACK_MOD, server_cb).
+-define(DEF_SVC_NAME, ?MODULE).
%% The service configuration. In a server supporting multiple Diameter
%% applications each application may have its own, although they could all
@@ -57,32 +53,46 @@
{'Origin-Realm', "example.com"},
{'Vendor-Id', 193},
{'Product-Name', "Server"},
- {'Auth-Application-Id', [?DIAMETER_APP_ID_COMMON]},
- {application, [{alias, ?APP_ALIAS},
- {dictionary, ?DIAMETER_DICT_COMMON},
- {module, ?CALLBACK_MOD}]}]).
+ {'Auth-Application-Id', [0]},
+ {restrict_connections, false},
+ {string_decode, false},
+ {application, [{alias, common},
+ {dictionary, diameter_gen_base_rfc6733},
+ {module, server_cb}]}]).
%% start/1
start(Name)
when is_atom(Name) ->
- peer:start(Name, ?SERVICE(Name)).
+ start(Name, []);
+
+start(Opts)
+ when is_list(Opts) ->
+ start(?DEF_SVC_NAME, Opts).
+
+%% start/0
start() ->
- start(?SVC_NAME).
+ start(?DEF_SVC_NAME).
+
+%% start/2
+
+start(Name, Opts) ->
+ node:start(Name, Opts ++ [T || {K,_} = T <- ?SERVICE(Name),
+ false == lists:keymember(K, 1, Opts)]).
%% listen/2
listen(Name, T) ->
- peer:listen(Name, T).
+ node:listen(Name, T).
listen(T) ->
- listen(?SVC_NAME, T).
+ listen(?DEF_SVC_NAME, T).
%% stop/1
stop(Name) ->
- peer:stop(Name).
+ node:stop(Name).
stop() ->
- stop(?SVC_NAME).
+ stop(?DEF_SVC_NAME).
diff --git a/lib/diameter/examples/code/server_cb.erl b/lib/diameter/examples/code/server_cb.erl
index 0f6eb32ed6..071e152493 100644
--- a/lib/diameter/examples/code/server_cb.erl
+++ b/lib/diameter/examples/code/server_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,7 +24,7 @@
-module(server_cb).
-include_lib("diameter/include/diameter.hrl").
--include_lib("diameter/include/diameter_gen_base_rfc3588.hrl").
+-include_lib("diameter/include/diameter_gen_base_rfc6733.hrl").
%% diameter callbacks
-export([peer_up/3,
@@ -38,12 +38,10 @@
-define(UNEXPECTED, erlang:error({unexpected, ?MODULE, ?LINE})).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
pick_peer(_, _, _SvcName, _State) ->
@@ -68,10 +66,13 @@ handle_request(#diameter_packet{msg = Req, errors = []}, _SvcName, {_, Caps})
origin_realm = {OR,_}}
= Caps,
#diameter_base_RAR{'Session-Id' = Id,
- 'Re-Auth-Request-Type' = RT}
+ 'Re-Auth-Request-Type' = Type}
= Req,
- {reply, answer(RT, Id, OH, OR)};
+ {reply, #diameter_base_RAA{'Result-Code' = rc(Type),
+ 'Origin-Host' = OH,
+ 'Origin-Realm' = OR,
+ 'Session-Id' = Id}};
%% ... or one that wasn't. 3xxx errors are answered by diameter itself
%% but these are 5xxx errors for which we must contruct a reply.
@@ -84,32 +85,18 @@ handle_request(#diameter_packet{msg = Req}, _SvcName, {_, Caps})
#diameter_base_RAR{'Session-Id' = Id}
= Req,
- Ans = #diameter_base_RAA{'Origin-Host' = OH,
- 'Origin-Realm' = OR,
- 'Session-Id' = Id},
+ {reply, #diameter_base_RAA{'Origin-Host' = OH,
+ 'Origin-Realm' = OR,
+ 'Session-Id' = Id}};
- {reply, Ans};
+%% Answer that any other message is unsupported.
+handle_request(#diameter_packet{}, _SvcName, _) ->
+ {answer_message, 3001}. %% DIAMETER_COMMAND_UNSUPPORTED
-%% Should really reply to other base messages that we don't support
-%% but simply discard them instead.
-handle_request(#diameter_packet{}, _SvcName, {_,_}) ->
- discard.
+%% Map Re-Auth-Request-Type to Result-Code just for the purpose of
+%% generating different answers.
-%% ---------------------------------------------------------------------------
-
-%% Answer using the record or list encoding depending on
-%% Re-Auth-Request-Type. This is just as an example. You would
-%% typically just choose one, and this has nothing to do with the how
-%% client.erl sends.
-
-answer(0, Id, OH, OR) ->
- #diameter_base_RAA{'Result-Code' = 2001, %% DIAMETER_SUCCESS
- 'Origin-Host' = OH,
- 'Origin-Realm' = OR,
- 'Session-Id' = Id};
-
-answer(_, Id, OH, OR) ->
- ['RAA', {'Result-Code', 5012}, %% DIAMETER_UNABLE_TO_COMPLY
- {'Origin-Host', OH},
- {'Origin-Realm', OR},
- {'Session-Id', Id}].
+rc(0) ->
+ 2001; %% DIAMETER_SUCCESS
+rc(_) ->
+ 5012. %% DIAMETER_UNABLE_TO_COMPLY
diff --git a/lib/diameter/include/diameter.hrl b/lib/diameter/include/diameter.hrl
index 79c4dce541..c2c271a9a3 100644
--- a/lib/diameter/include/diameter.hrl
+++ b/lib/diameter/include/diameter.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -58,8 +58,8 @@
-record(diameter_header,
{version, %% 8-bit unsigned
length, %% 24-bit unsigned
- cmd_code, %% 8-bit unsigned
- application_id, %% 24-bit unsigned
+ cmd_code, %% 24-bit unsigned
+ application_id, %% 32-bit unsigned
hop_by_hop_id, %% 32-bit unsigned
end_to_end_id, %% 32-bit unsigned
is_request, %% boolean() R flag
@@ -126,7 +126,7 @@
default,
extra = []}).
-%% The diameter service and diameter_apps records are only passed
+%% The diameter service and diameter_app records are only passed
%% through the transport interface when starting a transport process,
%% although typically a transport implementation will (and probably
%% should) only be interested host_ip_address.
@@ -143,6 +143,7 @@
init_state, %% option 'state', initial callback state
id, %% 32-bit unsigned application identifier = Dict:id()
mutable = false, %% boolean(), do traffic callbacks modify state?
- options = [{answer_errors, report}, %% | callback | discard
+ options = [{answer_errors, discard}, %% | callback | report
{request_errors, answer_3xxx}]}). %% | callback | answer
+
-endif. %% -ifdef(diameter_hrl).
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl
index 55aae3a243..e8ffe7f92c 100644
--- a/lib/diameter/include/diameter_gen.hrl
+++ b/lib/diameter/include/diameter_gen.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,6 +25,18 @@
-define(THROW(T), throw({?MODULE, T})).
+%% Tag common to generated dictionaries.
+-define(TAG, diameter_gen).
+
+%% Key to a value in the process dictionary that determines whether or
+%% not an unrecognized AVP setting the M-bit should be regarded as an
+%% error or not. See is_strict/0.
+-define(STRICT_KEY, strict).
+
+%% Key that says whether or not we should do a best-effort decode
+%% within Failed-AVP.
+-define(FAILED_KEY, failed).
+
-type parent_name() :: atom(). %% parent = Message or AVP
-type parent_record() :: tuple(). %%
-type avp_name() :: atom().
@@ -35,6 +47,25 @@
-type grouped_avp() :: nonempty_improper_list(#diameter_avp{}, [avp()]).
-type avp() :: non_grouped_avp() | grouped_avp().
+%% Use a (hopefully) unique key when manipulating the process
+%% dictionary.
+
+putr(K,V) ->
+ put({?TAG, K}, V).
+
+getr(K) ->
+ case get({?TAG, K}) of
+ undefined ->
+ V = erase({?MODULE, K}), %% written in old code
+ V == undefined orelse putr(K,V),
+ V;
+ V ->
+ V
+ end.
+
+eraser(K) ->
+ erase({?TAG, K}).
+
%% ---------------------------------------------------------------------------
%% # encode_avps/2
%% ---------------------------------------------------------------------------
@@ -212,53 +243,209 @@ decode(Name, #diameter_avp{code = Code, vendor_id = Vid} = Avp, Acc) ->
%% decode/4
+%% AVP is defined in the dictionary ...
decode(Name, {AvpName, Type}, Avp, Acc) ->
d(Name, Avp#diameter_avp{name = AvpName, type = Type}, Acc);
+%% ... or not.
decode(Name, 'AVP', Avp, Acc) ->
decode_AVP(Name, Avp, Acc).
-%% d/3
+%% 6733, 4.4:
+%%
+%% Receivers of a Grouped AVP that does not have the 'M' (mandatory)
+%% bit set and one or more of the encapsulated AVPs within the group
+%% has the 'M' (mandatory) bit set MAY simply be ignored if the
+%% Grouped AVP itself is unrecognized. The rule applies even if the
+%% encapsulated AVP with its 'M' (mandatory) bit set is further
+%% encapsulated within other sub-groups, i.e., other Grouped AVPs
+%% embedded within the Grouped AVP.
+%%
+%% The first sentence is slightly mangled, but take it to mean this:
+%%
+%% An unrecognized AVP of type Grouped that does not set the 'M' bit
+%% MAY be ignored even if one of its encapsulated AVPs sets the 'M'
+%% bit.
+%%
+%% The text above is a change from RFC 3588, which instead says this:
+%%
+%% Further, if any of the AVPs encapsulated within a Grouped AVP has
+%% the 'M' (mandatory) bit set, the Grouped AVP itself MUST also
+%% include the 'M' bit set.
+%%
+%% Both of these texts have problems. If the AVP is unknown then its
+%% type is unknown since the type isn't sent over the wire, so the
+%% 6733 text becomes a non-statement: don't know that the AVP not
+%% setting the M-bit is of type Grouped, therefore can't know that its
+%% data consists of encapsulated AVPs, therefore can't but ignore that
+%% one of these might set the M-bit. It should be no worse if we know
+%% the AVP to have type Grouped.
+%%
+%% Similarly, for the 3588 text: if we receive an AVP that doesn't set
+%% the M-bit and don't know that the AVP has type Grouped then we
+%% can't realize that its data contains an AVP that sets the M-bit, so
+%% can't regard the AVP as erroneous on this account. Again, it should
+%% be no worse if the type is known to be Grouped, but in this case
+%% the RFC forces us to regard the AVP as erroneous. This is
+%% inconsistent, and the 3588 text has never been enforced.
+%%
+%% So, if an AVP doesn't set the M-bit then we're free to ignore it,
+%% regardless of the AVP's type. If we know the type to be Grouped
+%% then we must ignore the M-bit on an encapsulated AVP. That means
+%% packing such an encapsulated AVP into an 'AVP' field if need be,
+%% not regarding the lack of a specific field as an error as is
+%% otherwise the case. (The lack of an AVP-specific field being how we
+%% defined the RFC's "unrecognized", which is slightly stronger than
+%% "not defined".)
-%% Don't try to decode the value of a Failed-AVP component since it
-%% probably won't. Note that matching on 'Failed-AVP' assumes that
-%% this is the RFC AVP, with code 279. Strictly, this doesn't need to
-%% be the case, so we're assuming no one defines another Failed-AVP.
-d('Failed-AVP' = Name, Avp, Acc) ->
- decode_AVP(Name, Avp, Acc);
+%% d/3
-%% Or try to decode.
-d(Name, Avp, {Avps, Acc}) ->
+d(Name, Avp, Acc) ->
#diameter_avp{name = AvpName,
- data = Data}
+ data = Data,
+ type = Type,
+ is_mandatory = M}
= Avp,
- try avp(decode, Data, AvpName) of
+ %% Use the process dictionary is to keep track of whether or not
+ %% to ignore an M-bit on an encapsulated AVP. Not ideal, but the
+ %% alternative requires widespread changes to be able to pass the
+ %% value around through the entire decode. The solution here is
+ %% simple in comparison, both to implement and to understand.
+
+ Strict = relax(Type, M),
+
+ %% Use the process dictionary again to keep track of whether we're
+ %% decoding within Failed-AVP and should ignore decode errors
+ %% altogether.
+
+ Failed = relax(Name), %% Not AvpName or else a failed Failed-AVP
+ %% decode is packed into 'AVP'.
+ Mod = dict(Failed), %% Dictionary to decode in.
+
+ %% On decode, a Grouped AVP is represented as a #diameter_avp{}
+ %% list with AVP as head and component AVPs as tail. On encode,
+ %% data can be a list of component AVPs.
+
+ try Mod:avp(decode, Data, AvpName) of
V ->
+ {Avps, T} = Acc,
{H, A} = ungroup(V, Avp),
- {[H | Avps], pack_avp(Name, A, Acc)}
+ {[H | Avps], pack_avp(Name, A, T)}
catch
+ throw: {?TAG, {grouped, RC, ComponentAvps}} ->
+ {Avps, {Rec, Errors}} = Acc,
+ A = trim(Avp),
+ {[[A | trim(ComponentAvps)] | Avps], {Rec, [{RC, A} | Errors]}};
error: Reason ->
- %% Failures here won't be visible since they're a "normal"
- %% occurrence if the peer sends a faulty AVP that we need to
- %% respond sensibly to. Log the occurence for traceability,
- %% but the peer will also receive info in the resulting
- %% answer-message.
- diameter_lib:log({decode, failure},
- ?MODULE,
- ?LINE,
- {Reason, Avp, erlang:get_stacktrace()}),
- {Rec, Failed} = Acc,
- {[Avp|Avps], {Rec, [rc(Reason, Avp) | Failed]}}
+ d(undefined == Failed orelse is_failed(),
+ Reason,
+ Name,
+ trim(Avp),
+ Acc)
+ after
+ reset(?STRICT_KEY, Strict),
+ reset(?FAILED_KEY, Failed)
end.
+%% trim/1
+%%
+%% Remove any extra bit that was added in diameter_codec to induce a
+%% 5014 error.
+
+trim(#diameter_avp{data = <<0:1, Bin/binary>>} = Avp) ->
+ Avp#diameter_avp{data = Bin};
+
+trim(Avps)
+ when is_list(Avps) ->
+ lists:map(fun trim/1, Avps);
+
+trim(Avp) ->
+ Avp.
+
+%% dict/1
+%%
+%% Retrieve the dictionary for the best-effort decode of Failed-AVP,
+%% as put by diameter_codec:decode/2. See that function for the
+%% explanation.
+
+dict(true) ->
+ case get({diameter_codec, dictionary}) of
+ undefined ->
+ ?MODULE;
+ Mod ->
+ Mod
+ end;
+
+dict(_) ->
+ ?MODULE.
+
+%% d/5
+
+%% Ignore a decode error within Failed-AVP ...
+d(true, _, Name, Avp, Acc) ->
+ decode_AVP(Name, Avp, Acc);
+
+%% ... or not. Failures here won't be visible since they're a "normal"
+%% occurrence if the peer sends a faulty AVP that we need to respond
+%% sensibly to. Log the occurence for traceability, but the peer will
+%% also receive info in the resulting answer message.
+d(false, Reason, Name, Avp, {Avps, Acc}) ->
+ Stack = diameter_lib:get_stacktrace(),
+ diameter_lib:log(decode_error,
+ ?MODULE,
+ ?LINE,
+ {Name, Avp#diameter_avp.name, Stack}),
+ {Rec, Failed} = Acc,
+ {[Avp|Avps], {Rec, [rc(Reason, Avp) | Failed]}}.
+
+%% relax/2
+
+%% Set false in the process dictionary as soon as we see a Grouped AVP
+%% that doesn't set the M-bit, so that is_strict() can say whether or
+%% not to ignore the M-bit on an encapsulated AVP.
+relax('Grouped', M) ->
+ case getr(?STRICT_KEY) of
+ undefined when not M ->
+ putr(?STRICT_KEY, M);
+ _ ->
+ false
+ end;
+relax(_, _) ->
+ false.
+
+is_strict() ->
+ false /= getr(?STRICT_KEY).
+
+%% relax/1
+%%
+%% Set true in the process dictionary as soon as we see Failed-AVP.
+%% Matching on 'Failed-AVP' assumes that this is the RFC AVP.
+%% Strictly, this doesn't need to be the case.
+
+relax('Failed-AVP') ->
+ is_failed() orelse putr(?FAILED_KEY, true);
+
+relax(_) ->
+ is_failed().
+
+is_failed() ->
+ true == getr(?FAILED_KEY).
+
+%% reset/2
+
+reset(Key, undefined) ->
+ eraser(Key);
+reset(_, _) ->
+ ok.
+
%% decode_AVP/3
%%
%% Don't know this AVP: see if it can be packed in an 'AVP' field
%% undecoded. Note that the type field is 'undefined' in this case.
decode_AVP(Name, Avp, {Avps, Acc}) ->
- {[Avp | Avps], pack_AVP(Name, Avp, Acc)}.
+ {[trim(Avp) | Avps], pack_AVP(Name, Avp, Acc)}.
%% rc/1
@@ -310,15 +497,25 @@ pack_avp(_, Arity, Avp, Acc) ->
%% pack_AVP/3
-%% Give Failed-AVP special treatment since it'll contain any
-%% unrecognized mandatory AVP's.
-pack_AVP(Name, #diameter_avp{is_mandatory = true} = Avp, Acc)
- when Name /= 'Failed-AVP' ->
+%% Length failure was induced because of a header/payload length
+%% mismatch. The AVP Length is reset to match the received data if
+%% this AVP is encoded in an answer message, since the length is
+%% computed.
+%%
+%% Data is a truncated header if command_code = undefined, otherwise
+%% payload bytes. The former is padded to the length of a header if
+%% the AVP reaches an outgoing encode in diameter_codec.
+%%
+%% RFC 6733 says that an AVP returned with 5014 can contain a minimal
+%% payload for the AVP's type, but in this case we don't know the
+%% type.
+
+pack_AVP(_, #diameter_avp{data = <<0:1, Data/binary>>} = Avp, Acc) ->
{Rec, Failed} = Acc,
- {Rec, [{5001, Avp} | Failed]};
+ {Rec, [{5014, Avp#diameter_avp{data = Data}} | Failed]};
-pack_AVP(Name, #diameter_avp{is_mandatory = M} = Avp, Acc) ->
- case avp_arity(Name, 'AVP') of
+pack_AVP(Name, #diameter_avp{is_mandatory = M, name = AvpName} = Avp, Acc) ->
+ case pack_arity(Name, AvpName, M) of
0 ->
{Rec, Failed} = Acc,
{Rec, [{if M -> 5001; true -> 5008 end, Avp} | Failed]};
@@ -326,6 +523,33 @@ pack_AVP(Name, #diameter_avp{is_mandatory = M} = Avp, Acc) ->
pack(Arity, 'AVP', Avp, Acc)
end.
+%% Give Failed-AVP special treatment since (1) it'll contain any
+%% unrecognized mandatory AVP's and (2) the RFC 3588 grammar failed to
+%% allow for Failed-AVP in an answer-message.
+
+pack_arity(Name, AvpName, M) ->
+ IsFailed = Name == 'Failed-AVP' orelse is_failed(),
+
+ %% Not testing just Name /= 'Failed-AVP' means we're changing the
+ %% packing of AVPs nested within Failed-AVP, but the point of
+ %% ignoring errors within Failed-AVP is to decode as much as
+ %% possible, and failing because a mandatory AVP couldn't be
+ %% packed into a dedicated field defeats that point. Note that we
+ %% can't just test not is_failed() since this will be 'true' when
+ %% packing an unknown AVP directly within Failed-AVP.
+
+ pack_arity(IsFailed
+ orelse {Name, AvpName} == {'answer-message', 'Failed-AVP'}
+ orelse not M
+ orelse not is_strict(),
+ Name).
+
+pack_arity(true, Name) ->
+ avp_arity(Name, 'AVP');
+
+pack_arity(false, _) ->
+ 0.
+
%% 3588:
%%
%% DIAMETER_AVP_UNSUPPORTED 5001
@@ -380,22 +604,37 @@ value(_, Avp) ->
%% # grouped_avp/3
%% ---------------------------------------------------------------------------
--spec grouped_avp(decode, avp_name(), binary())
+-spec grouped_avp(decode, avp_name(), bitstring())
-> {avp_record(), [avp()]};
(encode, avp_name(), avp_record() | avp_values())
-> binary()
| no_return().
+%% Length error induced by diameter_codec:collect_avps/1.
+grouped_avp(decode, _Name, <<0:1, _/binary>>) ->
+ throw({?TAG, {grouped, 5014, []}});
+
grouped_avp(decode, Name, Data) ->
- {Rec, Avps, []} = decode_avps(Name, diameter_codec:collect_avps(Data)),
- {Rec, Avps};
-%% A failed match here will result in 5004. Note that this is the only
-%% AVP type that doesn't just return the decoded record, also
-%% returning the list of component AVP's.
+ grouped_decode(Name, diameter_codec:collect_avps(Data));
grouped_avp(encode, Name, Data) ->
encode_avps(Name, Data).
+%% grouped_decode/2
+%%
+%% Note that Grouped is the only AVP type that doesn't just return a
+%% decoded value, also returning the list of component diameter_avp
+%% records.
+
+grouped_decode(_Name, {Error, Acc}) ->
+ {RC, Avp} = Error,
+ throw({?TAG, {grouped, RC, [Avp | Acc]}});
+
+grouped_decode(Name, ComponentAvps) ->
+ {Rec, Avps, Es} = decode_avps(Name, ComponentAvps),
+ [] == Es orelse throw({?TAG, {grouped, 5004, Avps}}), %% decode failure
+ {Rec, Avps}.
+
%% ---------------------------------------------------------------------------
%% # empty_group/1
%% ---------------------------------------------------------------------------
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
index 578bbaee2e..9afccf298c 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -41,7 +41,7 @@ INCDIR = ../include
ABS_EBIN := $(shell cd $(EBIN) && pwd)
# Where make should look for dependencies.
-VPATH = .:base:compiler:transport:gen
+VPATH = .:base:compiler:transport:gen:info
# ----------------------------------------------------
# Target specs
@@ -55,13 +55,13 @@ DICT_ERLS = $(DICT_MODULES:%=%.erl)
DICT_HRLS = $(DICT_MODULES:%=%.hrl)
# Modules to build before compiling dictionaries.
-COMPILER_MODULES = $(notdir $(filter compiler/%, $(CT_MODULES))) \
- $(DICT_YRL)
+COMPILER_MODULES = $(notdir $(CT_MODULES)) $(DICT_YRL)
# All handwritten modules from which a depend.mk is generated.
MODULES = \
$(RT_MODULES) \
- $(CT_MODULES)
+ $(CT_MODULES) \
+ $(INFO_MODULES)
# Modules whose names are inserted into the app file.
APP_MODULES = \
@@ -72,6 +72,7 @@ APP_MODULES = \
TARGET_MODULES = \
$(APP_MODULES) \
$(CT_MODULES) \
+ $(INFO_MODULES) \
$(DICT_YRL:%=gen/%)
# What to build for the 'opt' target.
@@ -147,14 +148,19 @@ gen/$(DICT_YRL).erl: compiler/$(DICT_YRL).yrl
$(ERLC) -Werror -o $(@D) $<
# Generate the app file.
-$(APP_TARGET): $(APP_SRC) ../vsn.mk modules.mk
+$(APP_TARGET): $(APP_SRC) ../vsn.mk modules.mk app.sed
$(gen_verbose) \
M=`echo $(notdir $(APP_MODULES)) | tr ' ' ,`; \
+ C=`echo $(COMPILER_MODULES) | tr ' ' ,`; \
+ I=`echo $(notdir $(INFO_MODULES)) | tr ' ' ,`; \
R=`echo $(REGISTERED) | tr ' ' ,`; \
sed -e 's;%VSN%;$(VSN);' \
-e "s;%MODULES%;$$M;" \
+ -e "s;%COMPILER%;$$C;" \
+ -e "s;%INFO%;$$I;" \
-e "s;%REGISTERED%;$$R;" \
- $< > $@
+ $< \
+ | sed -f app.sed > $@
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
$(vsn_verbose) \
@@ -177,6 +183,8 @@ info:
@echo
@$(call list,CT_MODULES)
@echo
+ @$(call list,INFO_MODULES)
+ @echo
@$(call list,TARGET_MODULES)
@echo
@$(call list,TARGET_DIRS)
@@ -216,7 +224,7 @@ dialyze: opt $(PLT)
-Wno_improper_lists \
$(EBIN)/diameter_gen_base_rfc3588.$(EMULATOR) \
$(patsubst %, $(EBIN)/%.$(EMULATOR), \
- $(notdir $(RT_MODULES) $(CT_MODULES)))
+ $(notdir $(RT_MODULES) $(CT_MODULES) $(INFO_MODULES)))
# Omit all but the common dictionary module since these
# (diameter_gen_relay in particular) generate warning depending on how
# much of the included diameter_gen.hrl they use.
diff --git a/lib/tv/Makefile b/lib/diameter/src/app.sed
index 1c6d4b54f6..7916f65002 100644
--- a/lib/tv/Makefile
+++ b/lib/diameter/src/app.sed
@@ -1,35 +1,40 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-# ----------------------------------------------------
-# Common Macros
-# ----------------------------------------------------
+#
+# Generate runtime_dependencies from applications to avoid having to
+# specify the same application more than once.
+#
-SUB_DIRECTORIES = src priv doc/src
+/{runtime_dependencies,/b v
+/{[-a-z]*, "[0-9.]*"}/!b
+/{vsn,/b
-include vsn.mk
-VSN = $(TV_VSN)
+/%%/!H
+s/{\([^,]*\)[^}]*}/\1/g
+s/%%/%,/
+b
-SPECIAL_TARGETS =
+:v
-# ----------------------------------------------------
-# Default Subdir Targets
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_subdir.mk
+p
+x
+s/\n//
+s/%//g
+s/\n */ /g
+s/{\([^,]*\), "\([^"]*"\)}/"\1-\2/g
diff --git a/lib/diameter/src/base/diameter.erl b/lib/diameter/src/base/diameter.erl
index d74e091e11..010f977b97 100644
--- a/lib/diameter/src/base/diameter.erl
+++ b/lib/diameter/src/base/diameter.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,6 +45,7 @@
-export_type([evaluable/0,
restriction/0,
+ message_length/0,
remotes/0,
sequence/0,
app_alias/0,
@@ -298,6 +299,9 @@ call(SvcName, App, Message) ->
| [node()]
| evaluable().
+-type message_length()
+ :: 0..16#FFFFFF.
+
%% Options passed to start_service/2
-type service_opt()
@@ -306,6 +310,8 @@ call(SvcName, App, Message) ->
| {restrict_connections, restriction()}
| {sequence, sequence() | evaluable()}
| {share_peers, remotes()}
+ | {string_decode, boolean()}
+ | {incoming_maxlen, message_length()}
| {use_shared_peers, remotes()}
| {spawn_opt, list()}.
@@ -337,11 +343,14 @@ call(SvcName, App, Message) ->
:: {transport_module, atom()}
| {transport_config, any()}
| {transport_config, any(), 'Unsigned32'() | infinity}
+ | {pool_size, pos_integer()}
| {applications, [app_alias()]}
| {capabilities, [capability()]}
| {capabilities_cb, evaluable()}
| {capx_timeout, 'Unsigned32'()}
| {disconnect_cb, evaluable()}
+ | {dpr_timeout, 'Unsigned32'()}
+ | {dpa_timeout, 'Unsigned32'()}
| {length_errors, exit | handle | discard}
| {connect_timer, 'Unsigned32'()}
| {watchdog_timer, 'Unsigned32'() | {module(), atom(), list()}}
diff --git a/lib/diameter/src/base/diameter_capx.erl b/lib/diameter/src/base/diameter_capx.erl
index 93548ecafd..7dc61f229f 100644
--- a/lib/diameter/src/base/diameter_capx.erl
+++ b/lib/diameter/src/base/diameter_capx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,8 @@
-export([build_CER/2,
recv_CER/3,
recv_CEA/3,
- make_caps/2]).
+ make_caps/2,
+ binary_caps/1]).
-include_lib("diameter/include/diameter.hrl").
-include("diameter_internal.hrl").
@@ -115,7 +116,8 @@ mk_caps(Caps0, Opts) ->
-define(SC(K,F),
set_cap({K, Val}, {Caps, #diameter_caps{F = false} = C}) ->
- {Caps#diameter_caps{F = cap(K, Val)}, C#diameter_caps{F = true}}).
+ {Caps#diameter_caps{F = cap(K, copy(Val))},
+ C#diameter_caps{F = true}}).
?SC('Origin-Host', origin_host);
?SC('Origin-Realm', origin_realm);
@@ -375,10 +377,10 @@ capx_to_caps(CEX, Dict) ->
'Firmware-Revision',
'AVP'],
CEX),
- #diameter_caps{origin_host = OH,
- origin_realm = OR,
+ #diameter_caps{origin_host = copy(OH),
+ origin_realm = copy(OR),
vendor_id = VId,
- product_name = PN,
+ product_name = copy(PN),
origin_state_id = OSI,
host_ip_address = IP,
supported_vendor_id = SV,
@@ -389,6 +391,32 @@ capx_to_caps(CEX, Dict) ->
firmware_revision = FR,
avp = X}.
+%% Copy binaries to avoid retaining a reference to a large binary
+%% containing AVPs we aren't interested in.
+copy(B)
+ when is_binary(B) ->
+ binary:copy(B);
+
+copy(T) ->
+ T.
+
+%% binary_caps/1
+%%
+%% Encode stringish capabilities with {string_decode, false}.
+
+binary_caps(Caps) ->
+ lists:foldl(fun bcaps/2, Caps, [#diameter_caps.origin_host,
+ #diameter_caps.origin_realm,
+ #diameter_caps.product_name]).
+
+bcaps(N, Caps) ->
+ case element(N, Caps) of
+ undefined ->
+ Caps;
+ V ->
+ setelement(N, Caps, iolist_to_binary(V))
+ end.
+
%% ---------------------------------------------------------------------------
%% ---------------------------------------------------------------------------
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl
index 0de4d53973..bf2fe8e7ca 100644
--- a/lib/diameter/src/base/diameter_codec.erl
+++ b/lib/diameter/src/base/diameter_codec.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,6 +22,8 @@
-export([encode/2,
decode/2,
decode/3,
+ setopts/1,
+ getopt/1,
collect_avps/1,
decode_header/1,
sequence_numbers/1,
@@ -59,6 +61,50 @@
%% +-+-+-+-+-+-+-+-+-+-+-+-+-
%%% ---------------------------------------------------------------------------
+%%% # setopts/1
+%%% # getopt/1
+%%% ---------------------------------------------------------------------------
+
+%% These functions are a compromise in the same vein as the use of the
+%% process dictionary in diameter_gen.hrl in generated codec modules.
+%% Instead of rewriting the entire dictionary generation to pass
+%% encode/decode options around, the calling process sets them by
+%% calling setopts/1. At current, the only option is whether or not to
+%% decode binaries as strings, which is used by diameter_types.
+
+setopts(Opts)
+ when is_list(Opts) ->
+ lists:foreach(fun setopt/1, Opts).
+
+%% Decode stringish types to string()? The default true is for
+%% backwards compatibility.
+setopt({string_decode = K, false = B}) ->
+ setopt(K, B);
+
+%% Regard anything but the generated RFC 3588 dictionary as modern.
+%% This affects the interpretation of defaults during the decode
+%% of values of type DiameterURI, this having changed from RFC 3588.
+%% (So much for backwards compatibility.)
+setopt({common_dictionary, diameter_gen_base_rfc3588}) ->
+ setopt(rfc, 3588);
+
+setopt(_) ->
+ ok.
+
+setopt(Key, Value) ->
+ put({diameter, Key}, Value).
+
+getopt(Key) ->
+ case get({diameter, Key}) of
+ undefined when Key == string_decode ->
+ true;
+ undefined when Key == rfc ->
+ 6733;
+ V ->
+ V
+ end.
+
+%%% ---------------------------------------------------------------------------
%%% # encode/2
%%% ---------------------------------------------------------------------------
@@ -70,12 +116,15 @@ encode(Mod, #diameter_packet{} = Pkt) ->
try
e(Mod, Pkt)
catch
+ exit: {Reason, Stack, #diameter_header{} = H} = T ->
+ %% Exit with a header in the reason to let the caller
+ %% count encode errors.
+ ?LOG(encode_error, {Reason, Stack, H}),
+ exit({?MODULE, encode, T});
error: Reason ->
- %% Be verbose since a crash report may be truncated and
- %% encode errors are self-inflicted.
- X = {?MODULE, encode, {Reason, ?STACK}},
- diameter_lib:error_report(X, {?MODULE, encode, [Mod, Pkt]}),
- exit(X)
+ T = {Reason, diameter_lib:get_stacktrace()},
+ ?LOG(encode_error, T),
+ exit({?MODULE, encode, T})
end;
encode(Mod, Msg) ->
@@ -87,53 +136,62 @@ encode(Mod, Msg) ->
msg = Msg}).
e(_, #diameter_packet{msg = [#diameter_header{} = Hdr | As]} = Pkt) ->
- Avps = encode_avps(As),
- Length = size(Avps) + 20,
-
- #diameter_header{version = Vsn,
- cmd_code = Code,
- application_id = Aid,
- hop_by_hop_id = Hid,
- end_to_end_id = Eid}
- = Hdr,
-
- Flags = make_flags(0, Hdr),
-
- Pkt#diameter_packet{header = Hdr,
- bin = <<Vsn:8, Length:24,
- Flags:8, Code:24,
- Aid:32,
- Hid:32,
- Eid:32,
- Avps/binary>>};
+ try encode_avps(reorder(As)) of
+ Avps ->
+ Length = size(Avps) + 20,
+
+ #diameter_header{version = Vsn,
+ cmd_code = Code,
+ application_id = Aid,
+ hop_by_hop_id = Hid,
+ end_to_end_id = Eid}
+ = Hdr,
+
+ Flags = make_flags(0, Hdr),
+
+ Pkt#diameter_packet{header = Hdr,
+ bin = <<Vsn:8, Length:24,
+ Flags:8, Code:24,
+ Aid:32,
+ Hid:32,
+ Eid:32,
+ Avps/binary>>}
+ catch
+ error: Reason ->
+ exit({Reason, diameter_lib:get_stacktrace(), Hdr})
+ end;
-e(Mod, #diameter_packet{header = Hdr, msg = Msg} = Pkt) ->
+e(Mod, #diameter_packet{header = Hdr0, msg = Msg} = Pkt) ->
#diameter_header{version = Vsn,
hop_by_hop_id = Hid,
end_to_end_id = Eid}
- = Hdr,
+ = Hdr0,
MsgName = rec2msg(Mod, Msg),
- {Code, Flags0, Aid} = msg_header(Mod, MsgName, Hdr),
- Flags = make_flags(Flags0, Hdr),
-
- Avps = encode_avps(Mod, MsgName, values(Msg)),
- Length = size(Avps) + 20,
-
- Pkt#diameter_packet{header = Hdr#diameter_header
- {length = Length,
- cmd_code = Code,
- application_id = Aid,
- is_request = 0 /= ?MASK(7, Flags),
- is_proxiable = 0 /= ?MASK(6, Flags),
- is_error = 0 /= ?MASK(5, Flags),
- is_retransmitted = 0 /= ?MASK(4, Flags)},
- bin = <<Vsn:8, Length:24,
- Flags:8, Code:24,
- Aid:32,
- Hid:32,
- Eid:32,
- Avps/binary>>}.
+ {Code, Flags0, Aid} = msg_header(Mod, MsgName, Hdr0),
+ Flags = make_flags(Flags0, Hdr0),
+ Hdr = Hdr0#diameter_header{cmd_code = Code,
+ application_id = Aid,
+ is_request = 0 /= ?MASK(7, Flags),
+ is_proxiable = 0 /= ?MASK(6, Flags),
+ is_error = 0 /= ?MASK(5, Flags),
+ is_retransmitted = 0 /= ?MASK(4, Flags)},
+ Values = values(Msg),
+
+ try encode_avps(Mod, MsgName, Values) of
+ Avps ->
+ Length = size(Avps) + 20,
+ Pkt#diameter_packet{header = Hdr#diameter_header{length = Length},
+ bin = <<Vsn:8, Length:24,
+ Flags:8, Code:24,
+ Aid:32,
+ Hid:32,
+ Eid:32,
+ Avps/binary>>}
+ catch
+ error: Reason ->
+ exit({Reason, diameter_lib:get_stacktrace(), Hdr})
+ end.
%% make_flags/2
@@ -171,26 +229,50 @@ values(Avps) ->
%% Message as a list of #diameter_avp{} ...
encode_avps(_, _, [#diameter_avp{} | _] = Avps) ->
- encode_avps(reorder(Avps, [], Avps));
+ encode_avps(reorder(Avps));
%% ... or as a tuple list or record.
encode_avps(Mod, MsgName, Values) ->
Mod:encode_avps(MsgName, Values).
%% reorder/1
+%%
+%% Reorder AVPs for the relay case using the index field of
+%% diameter_avp records. Decode populates this field in collect_avps
+%% and presents AVPs in reverse order. A relay then sends the reversed
+%% list with a Route-Record AVP prepended. The goal here is just to do
+%% lists:reverse/1 in Grouped AVPs and the outer list, but only in the
+%% case there are indexed AVPs at all, so as not to reverse lists that
+%% have been explicilty sent (unindexed, in the desired order) as a
+%% diameter_avp list. The effect is the same as lists:keysort/2, but
+%% only on the cases we expect, not a general sort.
+
+reorder(Avps) ->
+ case reorder(Avps, []) of
+ false ->
+ Avps;
+ Sorted ->
+ Sorted
+ end.
+
+%% reorder/3
-reorder([#diameter_avp{index = 0} | _] = Avps, Acc, _) ->
+%% In case someone has reversed the list already. (Not likely.)
+reorder([#diameter_avp{index = 0} | _] = Avps, Acc) ->
Avps ++ Acc;
-reorder([#diameter_avp{index = N} = A | Avps], Acc, _)
+%% Assume indexed AVPs are in reverse order.
+reorder([#diameter_avp{index = N} = A | Avps], Acc)
when is_integer(N) ->
lists:reverse(Avps, [A | Acc]);
-reorder([H | T], Acc, Avps) ->
- reorder(T, [H | Acc], Avps);
+%% An unindexed AVP.
+reorder([H | T], Acc) ->
+ reorder(T, [H | Acc]);
-reorder([], Acc, _) ->
- Acc.
+%% No indexed members.
+reorder([], _) ->
+ false.
%% encode_avps/1
@@ -225,15 +307,35 @@ rec2msg(Mod, Rec) ->
%% Unsuccessfully decoded AVPs will be placed in #diameter_packet.errors.
--spec decode(module(), #diameter_packet{} | bitstring())
+-spec decode(module() | {module(), module()}, #diameter_packet{} | binary())
-> #diameter_packet{}.
+%% An Answer setting the E-bit. The application dictionary is needed
+%% for the best-effort decode of Failed-AVP, and the best way to make
+%% this available to the AVP decode in diameter_gen.hrl, without
+%% having to rewrite the entire codec generation, is to place it in
+%% the process dictionary. It's the code in diameter_gen.hrl (that's
+%% included by every generated codec module) that looks for the entry.
+%% Not ideal, but it solves the problem relatively simply.
+decode({Mod, Mod}, Pkt) ->
+ decode(Mod, Pkt);
+decode({Mod, AppMod}, Pkt) ->
+ Key = {?MODULE, dictionary},
+ put(Key, AppMod),
+ try
+ decode(Mod, Pkt)
+ after
+ erase(Key)
+ end;
+
+%% Or not: a request, or an answer not setting the E-bit.
decode(Mod, Pkt) ->
decode(Mod:id(), Mod, Pkt).
-%% If we're a relay application then just extract the avp's without
-%% any decoding of their data since we don't know the application in
-%% question.
+%% decode/3
+
+%% Relay application: just extract the avp's without any decoding of
+%% their data since we don't know the application in question.
decode(?APP_ID_RELAY, _, #diameter_packet{} = Pkt) ->
case collect_avps(Pkt) of
{E, As} ->
@@ -259,34 +361,36 @@ decode(_, Mod, #diameter_packet{header = Hdr} = Pkt) ->
decode_avps(MsgName, Mod, Pkt, collect_avps(Pkt));
decode(Id, Mod, Bin)
- when is_bitstring(Bin) ->
+ when is_binary(Bin) ->
decode(Id, Mod, #diameter_packet{header = decode_header(Bin), bin = Bin}).
+%% decode_avps/4
+
decode_avps(MsgName, Mod, Pkt, {E, Avps}) ->
- ?LOG(invalid, Pkt#diameter_packet.bin),
+ ?LOG(invalid_avp_length, Pkt#diameter_packet.header),
#diameter_packet{errors = Failed}
= P
= decode_avps(MsgName, Mod, Pkt, Avps),
P#diameter_packet{errors = [E | Failed]};
-decode_avps('', Mod, Pkt, Avps) -> %% unknown message ...
- ?LOG(unknown, {Mod, Pkt#diameter_packet.header}),
+decode_avps('', _, Pkt, Avps) -> %% unknown message ...
+ ?LOG(unknown_message, Pkt#diameter_packet.header),
Pkt#diameter_packet{avps = lists:reverse(Avps),
errors = [3001]}; %% DIAMETER_COMMAND_UNSUPPORTED
%% msg = undefined identifies this case.
decode_avps(MsgName, Mod, Pkt, Avps) -> %% ... or not
- {Rec, As, Failed} = Mod:decode_avps(MsgName, Avps),
- ?LOGC([] /= Failed, failed, {Mod, Failed}),
+ {Rec, As, Errors} = Mod:decode_avps(MsgName, Avps),
+ ?LOGC([] /= Errors, decode_errors, Pkt#diameter_packet.header),
Pkt#diameter_packet{msg = Rec,
- errors = Failed,
+ errors = Errors,
avps = As}.
%%% ---------------------------------------------------------------------------
%%% # decode_header/1
%%% ---------------------------------------------------------------------------
--spec decode_header(bitstring())
+-spec decode_header(binary())
-> #diameter_header{}
| false.
@@ -297,7 +401,7 @@ decode_header(<<Version:8,
ApplicationId:32,
HopByHopId:32,
EndToEndId:32,
- _/bitstring>>) ->
+ _/binary>>) ->
<<R:1, P:1, E:1, T:1, _:4>>
= CmdFlags,
%% 3588 (ch 3) says that reserved bits MUST be set to 0 and ignored
@@ -356,6 +460,9 @@ sequence_numbers(#diameter_packet{bin = Bin})
sequence_numbers(#diameter_packet{header = #diameter_header{} = H}) ->
sequence_numbers(H);
+sequence_numbers(#diameter_packet{msg = [#diameter_header{} = H | _]}) ->
+ sequence_numbers(H);
+
sequence_numbers(#diameter_header{hop_by_hop_id = H,
end_to_end_id = E}) ->
{H,E};
@@ -410,7 +517,7 @@ msg_id(#diameter_header{application_id = A,
is_request = R}) ->
{A, C, if R -> 1; true -> 0 end};
-msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/bitstring>>) ->
+msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/binary>>) ->
{ApplId, CmdCode, Rbit}.
%%% ---------------------------------------------------------------------------
@@ -421,17 +528,18 @@ msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/bitstring>>) ->
%% order in the binary. Note also that grouped avp's aren't unraveled,
%% only those at the top level.
--spec collect_avps(#diameter_packet{} | bitstring())
+-spec collect_avps(#diameter_packet{} | binary())
-> [Avp]
| {Error, [Avp]}
when Avp :: #diameter_avp{},
Error :: {5014, #diameter_avp{}}.
collect_avps(#diameter_packet{bin = Bin}) ->
- <<_:20/binary, Avps/bitstring>> = Bin,
+ <<_:20/binary, Avps/binary>> = Bin,
collect_avps(Avps);
-collect_avps(Bin) ->
+collect_avps(Bin)
+ when is_binary(Bin) ->
collect_avps(Bin, 0, []).
collect_avps(<<>>, _, Acc) ->
@@ -461,7 +569,9 @@ collect_avps(Bin, N, Acc) ->
split_avp(Bin) ->
{Code, V, M, P, Len, HdrLen} = split_head(Bin),
- {Data, B} = split_data(Bin, HdrLen, Len - HdrLen),
+
+ <<_:HdrLen/binary, Rest/binary>> = Bin,
+ {Data, B} = split_data(Rest, Len - HdrLen),
{B, #diameter_avp{code = Code,
vendor_id = V,
@@ -471,17 +581,15 @@ split_avp(Bin) ->
%% split_head/1
-split_head(<<Code:32, 1:1, M:1, P:1, _:5, Len:24, V:32, _/bitstring>>) ->
+split_head(<<Code:32, 1:1, M:1, P:1, _:5, Len:24, V:32, _/binary>>) ->
{Code, V, M, P, Len, 12};
-split_head(<<Code:32, 0:1, M:1, P:1, _:5, Len:24, _/bitstring>>) ->
+split_head(<<Code:32, 0:1, M:1, P:1, _:5, Len:24, _/binary>>) ->
{Code, undefined, M, P, Len, 8};
-%% Header is truncated: pack_avp/1 will pad to the minimum header
-%% length.
-split_head(B)
- when is_bitstring(B) ->
- ?THROW({5014, #diameter_avp{data = B}}).
+%% Header is truncated.
+split_head(Bin) ->
+ ?THROW({5014, #diameter_avp{data = Bin}}).
%% 3588:
%%
@@ -516,34 +624,31 @@ split_head(B)
%% split_data/3
-split_data(Bin, HdrLen, Len)
- when 0 =< Len ->
- split_data(Bin, HdrLen, Len, (4 - (Len rem 4)) rem 4);
-
-split_data(_, _, _) ->
- invalid_avp_length().
+split_data(Bin, Len) ->
+ Pad = (4 - (Len rem 4)) rem 4,
-%% split_data/4
+ %% Len might be negative here, but that ensures the failure of the
+ %% binary match.
-split_data(Bin, HdrLen, Len, Pad) ->
case Bin of
- <<_:HdrLen/binary, Data:Len/binary, _:Pad/binary, Rest/bitstring>> ->
+ <<Data:Len/binary, _:Pad/binary, Rest/binary>> ->
{Data, Rest};
_ ->
- invalid_avp_length()
+ %% Header length points past the end of the message, or
+ %% doesn't span the header. As stated in the 6733 text
+ %% above, it's sufficient to return a zero-filled minimal
+ %% payload if this is a request. Do this (in cases that we
+ %% know the type) by inducing a decode failure and letting
+ %% the dictionary's decode (in diameter_gen) deal with it.
+ %%
+ %% Note that the extra bit can only occur in the trailing
+ %% AVP of a message or Grouped AVP, since a faulty AVP
+ %% Length is otherwise indistinguishable from a correct
+ %% one here, since we don't know the types of the AVPs
+ %% being extracted.
+ {<<0:1, Bin/binary>>, <<>>}
end.
-%% invalid_avp_length/0
-%%
-%% AVP Length doesn't mesh with payload. Induce a decode error by
-%% returning a payload that no valid Diameter type can have. This is
-%% so that a known AVP will result in 5014 error with a zero'd
-%% payload. Here we simply don't know how to construct this payload.
-%% (Yes, this solution is an afterthought.)
-
-invalid_avp_length() ->
- {<<0:1>>, <<>>}.
-
%%% ---------------------------------------------------------------------------
%%% # pack_avp/1
%%% ---------------------------------------------------------------------------
@@ -554,6 +659,8 @@ invalid_avp_length() ->
%% dictionary doesn't know about specific AVP's.
%% Grouped AVP whose components need packing ...
+pack_avp([#diameter_avp{} = A | Avps]) ->
+ pack_avp(A#diameter_avp{data = Avps});
pack_avp(#diameter_avp{data = [#diameter_avp{} | _] = Avps} = A) ->
pack_avp(A#diameter_avp{data = encode_avps(Avps)});
@@ -575,17 +682,23 @@ pack_avp(#diameter_avp{data = {Dict, Name, Value}} = A) ->
{Name, Type} = Dict:avp_name(Code, Vid),
pack_avp(A#diameter_avp{data = {Hdr, {Type, Value}}});
+%% ... with a truncated header ...
pack_avp(#diameter_avp{code = undefined, data = B})
- when is_bitstring(B) ->
+ when is_binary(B) ->
%% Reset the AVP Length of an AVP Header resulting from a 5014
%% error. The RFC doesn't explicitly say to do this but the
%% receiver can't correctly extract this and following AVP's
%% without a correct length. On the downside, the header doesn't
%% reveal if the received header has been padded.
Pad = 8*header_length(B) - bit_size(B),
- Len = size(<<H:5/binary, _:24, T/binary>> = <<B/bitstring, 0:Pad>>),
+ Len = size(<<H:5/binary, _:24, T/binary>> = <<B/binary, 0:Pad>>),
<<H/binary, Len:24, T/binary>>;
+%% ... when ignoring errors in Failed-AVP ...
+%% ... during a relay encode ...
+pack_avp(#diameter_avp{data = <<0:1, B/binary>>} = A) ->
+ pack_avp(A#diameter_avp{data = B});
+
%% ... or as an iolist.
pack_avp(#diameter_avp{code = Code,
vendor_id = V,
diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl
index f5ea459fd0..8ac3b9d6ca 100644
--- a/lib/diameter/src/base/diameter_config.erl
+++ b/lib/diameter/src/base/diameter_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,10 +35,11 @@
%%
-module(diameter_config).
--compile({no_auto_import, [monitor/2]}).
-
-behaviour(gen_server).
+-compile({no_auto_import, [monitor/2, now/0]}).
+-import(diameter_lib, [now/0]).
+
-export([start_service/2,
stop_service/1,
add_transport/2,
@@ -158,7 +159,8 @@ stop_service(SvcName) ->
%% # add_transport/2
%% --------------------------------------------------------------------------
--spec add_transport(diameter:service_name(), {connect|listen, [diameter:transport_opt()]})
+-spec add_transport(diameter:service_name(),
+ {connect|listen, [diameter:transport_opt()]})
-> {ok, diameter:transport_ref()}
| {error, term()}.
@@ -531,7 +533,10 @@ opt({applications, As}) ->
opt({capabilities, Os}) ->
is_list(Os) andalso ok == encode_CER(Os);
-opt({capx_timeout, Tmo}) ->
+opt({K, Tmo})
+ when K == capx_timeout;
+ K == dpr_timeout;
+ K == dpa_timeout ->
?IS_UINT32(Tmo);
opt({length_errors, T}) ->
@@ -554,6 +559,9 @@ opt({watchdog_config, L}) ->
opt({spawn_opt, Opts}) ->
is_list(Opts);
+opt({pool_size, N}) ->
+ is_integer(N) andalso 0 < N;
+
%% Options that we can't validate.
opt({K, _})
when K == transport_config;
@@ -638,13 +646,24 @@ make_config(SvcName, Opts) ->
{false, monitor},
{?NOMASK, sequence},
{nodes, restrict_connections},
+ {16#FFFFFF, incoming_maxlen},
+ {true, string_decode},
{[], spawn_opt}]),
+ D = proplists:get_value(string_decode, SvcOpts, true),
+
#service{name = SvcName,
rec = #diameter_service{applications = Apps,
- capabilities = Caps},
+ capabilities = binary_caps(Caps, D)},
options = SvcOpts}.
+binary_caps(Caps, true) ->
+ Caps;
+binary_caps(Caps, false) ->
+ diameter_capx:binary_caps(Caps).
+
+%% make_opts/2
+
make_opts(Opts, Defs) ->
Known = [{K, get_opt(K, Opts, D)} || {D,K} <- Defs],
Unknown = Opts -- Known,
@@ -653,17 +672,26 @@ make_opts(Opts, Defs) ->
[{K, opt(K,V)} || {K,V} <- Known].
+opt(incoming_maxlen, N)
+ when 0 =< N, N < 1 bsl 24 ->
+ N;
+
opt(spawn_opt, L)
when is_list(L) ->
L;
opt(K, false = B)
- when K /= sequence ->
+ when K == share_peers;
+ K == use_shared_peers;
+ K == monitor;
+ K == restrict_connections;
+ K == string_decode ->
B;
opt(K, true = B)
when K == share_peers;
- K == use_shared_peers ->
+ K == use_shared_peers;
+ K == string_decode ->
B;
opt(restrict_connections, T)
@@ -753,7 +781,7 @@ app_acc({application, Opts} = T, Acc) ->
Alias = get_opt(alias, Opts, Dict),
ModS = get_opt(state, Opts, Alias),
M = get_opt(call_mutates_state, Opts, false, [true]),
- A = get_opt(answer_errors, Opts, report, [callback, discard]),
+ A = get_opt(answer_errors, Opts, discard, [callback, report]),
P = get_opt(request_errors, Opts, answer_3xxx, [answer, callback]),
[#diameter_app{alias = Alias,
dictionary = Dict,
diff --git a/lib/diameter/src/base/diameter_lib.erl b/lib/diameter/src/base/diameter_lib.erl
index 44d81e2778..3f327f3653 100644
--- a/lib/diameter/src/base/diameter_lib.erl
+++ b/lib/diameter/src/base/diameter_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,20 +18,46 @@
%%
-module(diameter_lib).
+-compile({no_auto_import, [now/0]}).
-export([info_report/2,
error_report/2,
warning_report/2,
+ now/0,
+ timestamp/1,
now_diff/1,
+ micro_diff/1,
+ micro_diff/2,
time/1,
+ seed/0,
eval/1,
+ eval_name/1,
+ get_stacktrace/0,
ipaddr/1,
spawn_opts/2,
wait/1,
fold_tuple/3,
+ fold_n/3,
+ for_n/2,
log/4]).
%% ---------------------------------------------------------------------------
+%% # get_stacktrace/0
+%% ---------------------------------------------------------------------------
+
+%% Return a stacktrace with a leading, potentially large, argument
+%% list replaced by an arity. Trace on stacktrace/0 to see the
+%% original.
+
+get_stacktrace() ->
+ stacktrace(erlang:get_stacktrace()).
+
+stacktrace([{M,F,A,L} | T]) when is_list(A) ->
+ [{M, F, length(A), L} | T];
+stacktrace(L) ->
+ L.
+
+%% ---------------------------------------------------------------------------
%% # info_report/2
%% ---------------------------------------------------------------------------
@@ -60,17 +86,63 @@ warning_report(Reason, T) ->
report(fun error_logger:warning_report/1, Reason, T).
report(Fun, Reason, T) ->
- Fun([{why, Reason}, {who, self()}, {what, T}]),
+ Fun(io_lib:format("diameter: ~" ++ fmt(Reason) ++ "~n ~p~n",
+ [Reason, T])),
false.
+fmt(T) ->
+ if is_list(T) ->
+ "s";
+ true ->
+ "p"
+ end.
+
+%% ---------------------------------------------------------------------------
+%% # now/0
+%% ---------------------------------------------------------------------------
+
+-type timestamp() :: {non_neg_integer(), 0..999999, 0..999999}.
+-type now() :: integer() %% monotonic time
+ | timestamp().
+
+-spec now()
+ -> now().
+
+%% Use monotonic time if it exists, fall back to erlang:now()
+%% otherwise.
+
+now() ->
+ try
+ erlang:monotonic_time()
+ catch
+ error: undef -> erlang:now()
+ end.
+
+%% ---------------------------------------------------------------------------
+%% # timestamp/1
+%% ---------------------------------------------------------------------------
+
+-spec timestamp(NowT :: now())
+ -> timestamp().
+
+timestamp({_,_,_} = T) -> %% erlang:now()
+ T;
+
+timestamp(MonoT) -> %% monotonic time
+ MicroSecs = monotonic_to_microseconds(MonoT + erlang:time_offset()),
+ Secs = MicroSecs div 1000000,
+ {Secs div 1000000, Secs rem 1000000, MicroSecs rem 1000000}.
+
+monotonic_to_microseconds(MonoT) ->
+ erlang:convert_time_unit(MonoT, native, micro_seconds).
+
%% ---------------------------------------------------------------------------
%% # now_diff/1
%% ---------------------------------------------------------------------------
--spec now_diff(NowT)
+-spec now_diff(NowT :: now())
-> {Hours, Mins, Secs, MicroSecs}
- when NowT :: {non_neg_integer(), 0..999999, 0..999999},
- Hours :: non_neg_integer(),
+ when Hours :: non_neg_integer(),
Mins :: 0..59,
Secs :: 0..59,
MicroSecs :: 0..999999.
@@ -78,8 +150,37 @@ report(Fun, Reason, T) ->
%% Return timer:now_diff(now(), NowT) as an {H, M, S, MicroS} tuple
%% instead of as integer microseconds.
-now_diff({_,_,_} = Time) ->
- time(timer:now_diff(now(), Time)).
+now_diff(Time) ->
+ time(micro_diff(Time)).
+
+%% ---------------------------------------------------------------------------
+%% # micro_diff/1
+%% ---------------------------------------------------------------------------
+
+-spec micro_diff(NowT :: now())
+ -> MicroSecs
+ when MicroSecs :: non_neg_integer().
+
+micro_diff({_,_,_} = T0) ->
+ timer:now_diff(erlang:now(), T0);
+
+micro_diff(T0) -> %% monotonic time
+ monotonic_to_microseconds(erlang:monotonic_time() - T0).
+
+%% ---------------------------------------------------------------------------
+%% # micro_diff/2
+%% ---------------------------------------------------------------------------
+
+-spec micro_diff(T1 :: now(), T0 :: now())
+ -> MicroSecs
+ when MicroSecs :: non_neg_integer().
+
+micro_diff(T1, T0)
+ when is_integer(T1), is_integer(T0) -> %% monotonic time
+ monotonic_to_microseconds(T1 - T0);
+
+micro_diff(T1, T0) -> %% at least one erlang:now()
+ timer:now_diff(timestamp(T1), timestamp(T0)).
%% ---------------------------------------------------------------------------
%% # time/1
@@ -89,7 +190,7 @@ now_diff({_,_,_} = Time) ->
-spec time(NowT | Diff)
-> {Hours, Mins, Secs, MicroSecs}
- when NowT :: {non_neg_integer(), 0..999999, 0..999999},
+ when NowT :: timestamp(),
Diff :: non_neg_integer(),
Hours :: non_neg_integer(),
Mins :: 0..59,
@@ -108,6 +209,27 @@ time(Micro) -> %% elapsed time
{H, M, S, Micro rem 1000000}.
%% ---------------------------------------------------------------------------
+%% # seed/0
+%% ---------------------------------------------------------------------------
+
+-spec seed()
+ -> {timestamp(), {integer(), integer(), integer()}}.
+
+%% Return an argument for random:seed/1.
+
+seed() ->
+ T = now(),
+ {timestamp(T), seed(T)}.
+
+%% seed/1
+
+seed({_,_,_} = T) ->
+ T;
+
+seed(T) -> %% monotonic time
+ {erlang:phash2(node()), T, erlang:unique_integer()}.
+
+%% ---------------------------------------------------------------------------
%% # eval/1
%%
%% Evaluate a function in various forms.
@@ -129,8 +251,8 @@ eval({M,F,A}) ->
eval([{M,F,A} | X]) ->
apply(M, F, X ++ A);
-eval([[F|A] | X]) ->
- eval([F | X ++ A]);
+eval([[F|X] | A]) ->
+ eval([F | A ++ X]);
eval([F|A]) ->
apply(F,A);
@@ -142,6 +264,28 @@ eval(F) ->
F().
%% ---------------------------------------------------------------------------
+%% eval_name/1
+%% ---------------------------------------------------------------------------
+
+eval_name({M,F,A}) ->
+ {M, F, length(A)};
+
+eval_name([{M,F,A} | X]) ->
+ {M, F, length(A) + length(X)};
+
+eval_name([[F|A] | X]) ->
+ eval_name([F | X ++ A]);
+
+eval_name([F|_]) ->
+ F;
+
+eval_name({F}) ->
+ eval_name(F);
+
+eval_name(F) ->
+ F.
+
+%% ---------------------------------------------------------------------------
%% # ipaddr/1
%%
%% Parse an IP address.
@@ -199,17 +343,19 @@ opts(HeapSize, Opts) ->
%% # wait/1
%% ---------------------------------------------------------------------------
--spec wait([pid()])
+-spec wait([pid() | reference()])
-> ok.
wait(L) ->
- down([erlang:monitor(process, P) || P <- L]).
+ lists:foreach(fun down/1, L).
+
+down(Pid)
+ when is_pid(Pid) ->
+ down(monitor(process, Pid));
-down([]) ->
- ok;
-down([MRef|T]) ->
- receive {'DOWN', MRef, process, _, _} -> ok end,
- down(T).
+down(MRef)
+ when is_reference(MRef) ->
+ receive {'DOWN', MRef, process, _, _} = T -> T end.
%% ---------------------------------------------------------------------------
%% # fold_tuple/3
@@ -242,6 +388,35 @@ ft(Value, {Idx, T}) ->
setelement(Idx, T, Value).
%% ---------------------------------------------------------------------------
+%% # fold_n/3
+%% ---------------------------------------------------------------------------
+
+-spec fold_n(F, Acc0, N)
+ -> term()
+ when F :: fun((non_neg_integer(), term()) -> term()),
+ Acc0 :: term(),
+ N :: non_neg_integer().
+
+fold_n(F, Acc, N)
+ when is_integer(N), 0 < N ->
+ fold_n(F, F(N, Acc), N-1);
+
+fold_n(_, Acc, _) ->
+ Acc.
+
+%% ---------------------------------------------------------------------------
+%% # for_n/2
+%% ---------------------------------------------------------------------------
+
+-spec for_n(F, N)
+ -> non_neg_integer()
+ when F :: fun((non_neg_integer()) -> term()),
+ N :: non_neg_integer().
+
+for_n(F, N) ->
+ fold_n(fun(M,A) -> F(M), A+1 end, 0, N).
+
+%% ---------------------------------------------------------------------------
%% # log/4
%%
%% Called to have something to trace on for happenings of interest.
diff --git a/lib/diameter/src/base/diameter_peer.erl b/lib/diameter/src/base/diameter_peer.erl
index e5d4b28766..89b63c8a92 100644
--- a/lib/diameter/src/base/diameter_peer.erl
+++ b/lib/diameter/src/base/diameter_peer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,9 +18,11 @@
%%
-module(diameter_peer).
-
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
%% Interface towards transport modules ...
-export([recv/2,
up/1,
@@ -230,12 +232,22 @@ recv(Pid, Pkt) ->
%% # send/2
%% ---------------------------------------------------------------------------
-send(Pid, #diameter_packet{transport_data = undefined,
- bin = Bin}) ->
- send(Pid, Bin);
+send(Pid, Msg) ->
+ ifc_send(Pid, {send, strip(Msg)}).
+
+%% Send only binary when possible.
+strip(#diameter_packet{transport_data = undefined,
+ bin = Bin}) ->
+ Bin;
+
+%% Strip potentially large message terms.
+strip(#diameter_packet{transport_data = T,
+ bin = Bin}) ->
+ #diameter_packet{transport_data = T,
+ bin = Bin};
-send(Pid, Pkt) ->
- ifc_send(Pid, {send, Pkt}).
+strip(Msg) ->
+ Msg.
%% ---------------------------------------------------------------------------
%% # close/1
@@ -324,7 +336,6 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%% ---------------------------------------------------------
-%% INTERNAL FUNCTIONS
%% ---------------------------------------------------------
%% ifc_send/2
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index 282276827f..2255d0a76b 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -63,6 +63,8 @@
%% Keys in process dictionary.
-define(CB_KEY, cb). %% capabilities callback
-define(DPR_KEY, dpr). %% disconnect callback
+-define(DPA_KEY, dpa). %% timeout for incoming DPA, or shutdown after
+ %% outgoing DPA
-define(REF_KEY, ref). %% transport_ref()
-define(Q_KEY, q). %% transport start queue
-define(START_KEY, start). %% start of connected transport
@@ -82,18 +84,26 @@
N == ?GOAWAY; N == goaway;
N == ?BUSY; N == busy).
-%% RFC 3588:
+%% RFC 6733:
%%
%% Timeout An application-defined timer has expired while waiting
%% for some event.
%%
--define(EVENT_TIMEOUT, 10000).
+
%% Default timeout for reception of CER/CEA.
+-define(CAPX_TIMEOUT, 10000).
-%% Default timeout for DPA in response to DPR. A bit short but the
-%% timeout used to be hardcoded. (So it could be worse.)
+%% Default timeout for DPA to be received in response to an outgoing
+%% DPR. A bit short but the timeout used to be hardcoded. (So it could
+%% be worse.)
-define(DPA_TIMEOUT, 1000).
+%% Default timeout for the connection to be closed by the peer
+%% following an outgoing DPA in response to an incoming DPR. It's the
+%% recipient of DPA that should close the connection according to the
+%% RFC.
+-define(DPR_TIMEOUT, 5000).
+
-type uint32() :: diameter:'Unsigned32'().
-record(state,
@@ -107,9 +117,16 @@
transport :: pid(), %% transport process
dictionary :: module(), %% common dictionary
service :: #diameter_service{},
- dpr = false :: false | {uint32(), uint32()},
- %% | hop by hop and end to end identifiers
- length_errors :: exit | handle | discard}).
+ dpr = false :: false
+ | true %% DPR received, DPA sent
+ | {uint32(), uint32()} %% set in old code
+ | {boolean(), uint32(), uint32()},
+ %% hop by hop and end to end identifiers in
+ %% outgoing DPR; boolean says whether or not
+ %% the request was sent explicitly with
+ %% diameter:call/4.
+ length_errors :: exit | handle | discard,
+ incoming_maxlen :: integer() | infinity}).
%% There are non-3588 states possible as a consequence of 5.6.1 of the
%% standard and the corresponding problem for incoming CEA's: we don't
@@ -138,7 +155,8 @@
%% # start/3
%% ---------------------------------------------------------------------------
--spec start(T, [Opt], {diameter:sequence(),
+-spec start(T, [Opt], {[diameter:service_opt()]
+ | diameter:sequence(), %% from old code
[node()],
module(),
#diameter_service{}})
@@ -177,23 +195,27 @@ init(T) ->
proc_lib:init_ack({ok, self()}),
gen_server:enter_loop(?MODULE, [], i(T)).
-i({Ack, WPid, {M, Ref} = T, Opts, {Mask, Nodes, Dict0, Svc}}) ->
+i({Ack, WPid, T, Opts, {{_,_} = Mask, Nodes, Dict0, Svc}}) -> %% from old code
+ i({Ack, WPid, T, Opts, {[{sequence, Mask}], Nodes, Dict0, Svc}});
+
+i({Ack, WPid, {M, Ref} = T, Opts, {SvcOpts, Nodes, Dict0, Svc}}) ->
erlang:monitor(process, WPid),
wait(Ack, WPid),
diameter_stats:reg(Ref),
+ diameter_codec:setopts([{common_dictionary, Dict0} | SvcOpts]),
+ {_,_} = Mask = proplists:get_value(sequence, SvcOpts),
+ Maxlen = proplists:get_value(incoming_maxlen, SvcOpts, 16#FFFFFF),
{[Cs,Ds], Rest} = proplists:split(Opts, [capabilities_cb, disconnect_cb]),
putr(?CB_KEY, {Ref, [F || {_,F} <- Cs]}),
putr(?DPR_KEY, [F || {_, F} <- Ds]),
putr(?REF_KEY, Ref),
putr(?SEQUENCE_KEY, Mask),
putr(?RESTRICT_KEY, Nodes),
+ putr(?DPA_KEY, {proplists:get_value(dpr_timeout, Opts, ?DPR_TIMEOUT),
+ proplists:get_value(dpa_timeout, Opts, ?DPA_TIMEOUT)}),
- Tmo = proplists:get_value(capx_timeout, Opts, ?EVENT_TIMEOUT),
- ?IS_TIMEOUT(Tmo) orelse ?ERROR({invalid, {capx_timeout, Tmo}}),
+ Tmo = proplists:get_value(capx_timeout, Opts, ?CAPX_TIMEOUT),
OnLengthErr = proplists:get_value(length_errors, Opts, exit),
- lists:member(OnLengthErr, [exit, handle, discard])
- orelse ?ERROR({invalid, {length_errors, OnLengthErr}}),
- %% Error checking is for configuration added in old code.
{TPid, Addrs} = start_transport(T, Rest, Svc),
@@ -203,7 +225,8 @@ i({Ack, WPid, {M, Ref} = T, Opts, {Mask, Nodes, Dict0, Svc}}) ->
dictionary = Dict0,
mode = M,
service = svc(Svc, Addrs),
- length_errors = OnLengthErr}.
+ length_errors = OnLengthErr,
+ incoming_maxlen = Maxlen}.
%% The transport returns its local ip addresses so that different
%% transports on the same service can use different local addresses.
%% The local addresses are put into Host-IP-Address avps here when
@@ -216,9 +239,12 @@ wait(Ref, Pid) ->
Ref ->
ok;
{'DOWN', _, process, Pid, _} = D ->
- exit({shutdown, D})
+ x(D)
end.
+x(T) ->
+ exit({shutdown, T}).
+
start_transport(T, Opts, #diameter_service{capabilities = LCaps} = Svc) ->
Addrs0 = LCaps#diameter_caps.host_ip_address,
start_transport(Addrs0, {T, Opts, Svc}).
@@ -229,8 +255,8 @@ start_transport(Addrs0, T) ->
erlang:monitor(process, TPid),
q_next(TPid, Addrs0, Tmo, Data),
{TPid, Addrs};
- No ->
- exit({shutdown, No})
+ {error, No} ->
+ x({no_connection, No})
end.
svc(#diameter_service{capabilities = LCaps0} = Svc, Addrs) ->
@@ -287,7 +313,7 @@ handle_info(T, #state{} = State) ->
ok ->
{noreply, State};
#state{state = X} = S ->
- ?LOGC(X =/= State#state.state, transition, X),
+ ?LOGC(X /= State#state.state, transition, X),
{noreply, S};
{stop, Reason} ->
?LOG(stop, Reason),
@@ -296,21 +322,21 @@ handle_info(T, #state{} = State) ->
?LOG(stop, T),
{stop, {shutdown, T}, State}
catch
- exit: {diameter_codec, encode, _} = Reason ->
+ exit: {diameter_codec, encode, T} = Reason ->
+ incr_error(send, T, State#state.dictionary),
?LOG(stop, Reason),
- %% diameter_codec:encode/2 emits an error report. Only
- %% indicate the probable reason here.
- diameter_lib:info_report(probable_configuration_error,
- insufficient_capabilities),
{stop, {shutdown, Reason}, State};
{?MODULE, Tag, Reason} ->
- ?LOG(Tag, {Reason, T}),
+ ?LOG(stop, Tag),
{stop, {shutdown, Reason}, State}
- end.
+ end;
%% The form of the throw caught here is historical. It's
%% significant that it's not a 2-tuple, as in ?FAILURE(Reason),
%% since these are caught elsewhere.
+handle_info(T, S) -> %% started in old code
+ handle_info(T, #state{} = erlang:append_element(S, infinity)).
+
%% Note that there's no guarantee that the service and transport
%% capabilities are good enough to build a CER/CEA that can be
%% succesfully encoded. It's not checked at diameter:add_transport/2
@@ -340,6 +366,9 @@ eraser(Key) ->
%% transition/2
+transition(T, #state{dpr = {Hid, Eid}} = S) -> %% DPR sent from old code
+ transition(T, S#state{dpr = {false, Hid, Eid}});
+
%% Connection to peer.
transition({diameter, {TPid, connected, Remote}},
#state{transport = TPid,
@@ -375,11 +404,8 @@ transition({diameter, {TPid, connected}},
%% message. This may be followed by an incoming message which arrived
%% before the transport was killed and this can't be distinguished
%% from one from the transport that's been started to replace it.
-transition({diameter, {_, connected}}, _) ->
- {stop, connection_timeout};
-transition({diameter, {_, connected, _}}, _) ->
- {stop, connection_timeout};
-transition({diameter, {_, connected, _, _}}, _) ->
+transition({diameter, T}, _)
+ when tuple_size(T) < 5, connected == element(2,T) ->
{stop, connection_timeout};
%% Connection has timed out: start an alternate.
@@ -407,9 +433,8 @@ transition({timeout, _}, _) ->
ok;
%% Outgoing message.
-transition({send, Msg}, #state{transport = TPid}) ->
- send(TPid, Msg),
- ok;
+transition({send, Msg}, S) ->
+ outgoing(Msg, S);
%% Request for graceful shutdown at remove_transport, stop_service of
%% application shutdown.
@@ -418,7 +443,8 @@ transition({shutdown, Pid, Reason}, #state{parent = Pid, dpr = false} = S) ->
transition({shutdown, Pid, _}, #state{parent = Pid}) ->
ok;
-%% DPA reception has timed out.
+%% DPA reception has timed out, or peer has not closed the connection
+%% as a result of outgoing DPA.
transition(dpa_timeout, _) ->
stop;
@@ -480,12 +506,13 @@ send_CER(#state{state = {'Wait-Conn-Ack', Tmo},
orelse
close({already_connected, Remote, LCaps}),
CER = build_CER(S),
- ?LOG(send, 'CER'),
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
hop_by_hop_id = Hid}}
= Pkt
= encode(CER, Dict),
+ incr(send, Pkt, Dict),
send(TPid, Pkt),
+ ?LOG(send, 'CER'),
start_timer(Tmo, S#state{state = {'Wait-CEA', Hid, Eid}}).
%% Register ourselves as connecting to the remote endpoint in
@@ -525,13 +552,9 @@ encode(Rec, Dict) ->
recv(#diameter_packet{header = #diameter_header{} = Hdr}
= Pkt,
- #state{parent = Pid,
- dictionary = Dict0}
+ #state{dictionary = Dict0}
= S) ->
- Name = diameter_codec:msg_name(Dict0, Hdr),
- Pid ! {recv, self(), Name, Pkt},
- diameter_stats:incr({msg_id(Name, Hdr), recv}), %% count received
- rcv(Name, Pkt, S);
+ recv1(diameter_codec:msg_name(Dict0, Hdr), Pkt, S);
recv(#diameter_packet{header = undefined,
bin = Bin}
@@ -542,6 +565,47 @@ recv(#diameter_packet{header = undefined,
recv(Bin, S) ->
recv(#diameter_packet{bin = Bin}, S).
+%% recv1/3
+
+recv1(_,
+ #diameter_packet{header = H, bin = Bin},
+ #state{incoming_maxlen = M})
+ when M < size(Bin) ->
+ invalid(false, incoming_maxlen_exceeded, {size(Bin), H});
+
+%% Incoming request after outgoing DPR: discard. Don't discard DPR, so
+%% both ends don't do so when sending simultaneously.
+recv1(Name,
+ #diameter_packet{header = #diameter_header{is_request = true} = H},
+ #state{dpr = {_,_,_}})
+ when Name /= 'DPR' ->
+ invalid(false, recv_after_outgoing_dpr, H);
+
+%% Incoming request after incoming DPR: discard.
+recv1(_,
+ #diameter_packet{header = #diameter_header{is_request = true} = H},
+ #state{dpr = true}) ->
+ invalid(false, recv_after_incoming_dpr, H);
+
+%% DPA with identifier mismatch, or in response to a DPR initiated by
+%% the service.
+recv1('DPA' = N,
+ #diameter_packet{header = #diameter_header{hop_by_hop_id = Hid,
+ end_to_end_id = Eid}}
+ = Pkt,
+ #state{dpr = {X,H,E}}
+ = S)
+ when H /= Hid;
+ E /= Eid;
+ not X ->
+ rcv(N, Pkt, S);
+
+%% Any other message with a header and no length errors: send to the
+%% parent.
+recv1(Name, Pkt, #state{parent = Pid} = S) ->
+ Pid ! {recv, self(), Name, Pkt},
+ rcv(Name, Pkt, S).
+
%% recv/3
recv(#diameter_header{length = Len}
@@ -557,42 +621,30 @@ recv(#diameter_header{length = Len}
recv(#diameter_header{}
= H,
#diameter_packet{bin = Bin},
- #state{length_errors = E}
- = S) ->
- invalid(E,
- invalid_message_length,
- recv,
- [size(Bin), bit_size(Bin) rem 8, H, S]);
+ #state{length_errors = E}) ->
+ T = {size(Bin), bit_size(Bin) rem 8, H},
+ invalid(E, message_length_mismatch, T);
-recv(false, Pkt, #state{length_errors = E} = S) ->
- invalid(E, truncated_header, recv, [Pkt, S]).
+recv(false, #diameter_packet{bin = Bin}, #state{length_errors = E}) ->
+ invalid(E, truncated_header, Bin).
%% Note that counters here only count discarded messages.
-invalid(E, Reason, F, A) ->
+invalid(E, Reason, T) ->
diameter_stats:incr(Reason),
- abort(E, Reason, F, A).
-
-abort(exit, Reason, F, A) ->
- diameter_lib:warning_report(Reason, {?MODULE, F, A}),
- throw({?MODULE, abort, Reason});
-
-abort(_, _, _, _) ->
+ E == exit andalso close({Reason, T}),
+ ?LOG(Reason, T),
ok.
-msg_id({_,_,_} = T, _) ->
- T;
-msg_id(_, Hdr) ->
- {_,_,_} = diameter_codec:msg_id(Hdr).
-
%% rcv/3
%% Incoming CEA.
-rcv('CEA',
+rcv('CEA' = N,
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
hop_by_hop_id = Hid}}
= Pkt,
#state{state = {'Wait-CEA', Hid, Eid}}
= S) ->
+ ?LOG(recv, N),
handle_CEA(Pkt, S);
%% Incoming CER
@@ -610,37 +662,133 @@ rcv(Name, _, #state{state = PS})
rcv('DPR' = N, Pkt, S) ->
handle_request(N, Pkt, S);
-%% DPA in response to DPR and with the expected identifiers.
+%% DPA in response to DPR, with the expected identifiers.
rcv('DPA' = N,
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
- hop_by_hop_id = Hid}},
- #state{transport = TPid,
- dpr = {Hid, Eid}}) ->
+ hop_by_hop_id = Hid}
+ = H}
+ = Pkt,
+ #state{dictionary = Dict0,
+ transport = TPid,
+ dpr = {X, Hid, Eid}}) ->
+ ?LOG(recv, N),
+ X orelse begin
+ %% Only count DPA in response to a DPR sent by the
+ %% service: explicit DPR is counted in the same way
+ %% as other explicitly sent requests.
+ incr(recv, H, Dict0),
+ incr_rc(recv, diameter_codec:decode(Dict0, Pkt), Dict0)
+ end,
diameter_peer:close(TPid),
{stop, N};
-%% Ignore anything else, an unsolicited DPA in particular.
+%% Ignore anything else, an unsolicited DPA in particular. Note that
+%% dpa_timeout deals with the case in which the peer sends the wrong
+%% identifiers in DPA.
+rcv(N, #diameter_packet{header = H}, _)
+ when N == 'CER';
+ N == 'CEA';
+ N == 'DPR';
+ N == 'DPA' ->
+ ?LOG(ignored, N),
+ %% Note that these aren't counted in the normal recv counter.
+ diameter_stats:incr({diameter_codec:msg_id(H), recv, ignored}),
+ ok;
+
rcv(_, _, _) ->
ok.
+%% incr/3
+
+incr(Dir, Hdr, Dict0) ->
+ diameter_traffic:incr(Dir, Hdr, self(), Dict0).
+
+%% incr_rc/3
+
+incr_rc(Dir, Pkt, Dict0) ->
+ diameter_traffic:incr_rc(Dir, Pkt, self(), Dict0).
+
+%% incr_error/3
+
+incr_error(Dir, Pkt, Dict0) ->
+ diameter_traffic:incr_error(Dir, Pkt, self(), Dict0).
+
%% send/2
%% Msg here could be a #diameter_packet or a binary depending on who's
%% sending. In particular, the watchdog will send DWR as a binary
%% while messages coming from clients will be in a #diameter_packet.
+
send(Pid, Msg) ->
- diameter_stats:incr({diameter_codec:msg_id(Msg), send}),
diameter_peer:send(Pid, Msg).
+%% outgoing/2
+
+%% Explicit DPR.
+outgoing(#diameter_packet{header = #diameter_header{application_id = 0,
+ cmd_code = 282,
+ is_request = true}
+ = H}
+ = Pkt,
+ #state{dpr = T,
+ parent = Pid}
+ = S) ->
+ if T == false ->
+ inform_dpr(Pid),
+ send_dpr(true, Pkt, dpa_timeout(), S);
+ T == true ->
+ invalid(false, dpr_after_dpa, H); %% DPA sent: discard
+ true ->
+ invalid(false, dpr_after_dpr, H) %% DPR sent: discard
+ end;
+
+%% Explict CER or DWR: discard. These are sent by us.
+outgoing(#diameter_packet{header = #diameter_header{application_id = 0,
+ cmd_code = C,
+ is_request = true}
+ = H},
+ _)
+ when 257 == C; %% CER
+ 280 == C -> %% DWR
+ invalid(false, invalid_request, H);
+
+%% DPR not sent: send.
+outgoing(Msg, #state{transport = TPid, dpr = false}) ->
+ send(TPid, Msg),
+ ok;
+
+%% Outgoing answer: send.
+outgoing(#diameter_packet{header = #diameter_header{is_request = false}}
+ = Pkt,
+ #state{transport = TPid}) ->
+ send(TPid, Pkt),
+ ok;
+
+%% Outgoing request: discard.
+outgoing(Msg, #state{dpr = {_,_,_}}) ->
+ invalid(false, send_after_dpr, header(Msg)).
+
+header(#diameter_packet{header = H}) ->
+ H;
+header(Bin) -> %% DWR
+ diameter_codec:decode_header(Bin).
+
%% handle_request/3
+%%
+%% Incoming CER or DPR.
-handle_request(Type, #diameter_packet{} = Pkt, #state{dictionary = D} = S) ->
- ?LOG(recv, Type),
- send_answer(Type, diameter_codec:decode(D, Pkt), S).
+handle_request(Name,
+ #diameter_packet{header = H} = Pkt,
+ #state{dictionary = Dict0} = S) ->
+ ?LOG(recv, Name),
+ incr(recv, H, Dict0),
+ send_answer(Name, diameter_codec:decode(Dict0, Pkt), S).
%% send_answer/3
send_answer(Type, ReqPkt, #state{transport = TPid, dictionary = Dict} = S) ->
+ incr_error(recv, ReqPkt, Dict),
+
#diameter_packet{header = H,
transport_data = TD}
= ReqPkt,
@@ -657,13 +805,19 @@ send_answer(Type, ReqPkt, #state{transport = TPid, dictionary = Dict} = S) ->
msg = Msg,
transport_data = TD},
- send(TPid, diameter_codec:encode(Dict, Pkt)),
+ AnsPkt = diameter_codec:encode(Dict, Pkt),
+
+ incr(send, AnsPkt, Dict),
+ incr_rc(send, AnsPkt, Dict),
+ send(TPid, AnsPkt),
+ ?LOG(send, ans(Type)),
eval(PostF, S).
+ans('CER') -> 'CEA';
+ans('DPR') -> 'DPA'.
+
eval([F|A], S) ->
apply(F, A ++ [S]);
-eval(ok, S) ->
- S;
eval(T, _) ->
close(T).
@@ -678,6 +832,8 @@ build_answer('CER',
= Pkt,
#state{dictionary = Dict0}
= S) ->
+ diameter_codec:setopts([{string_decode, false}]),
+
{SupportedApps, RCaps, CEA} = recv_CER(CER, S),
[RC, IS] = Dict0:'#get-'(['Result-Code', 'Inband-Security-Id'], CEA),
@@ -710,7 +866,7 @@ build_answer(Type,
errors = Es}
= Pkt,
S) ->
- {RC, FailedAVP} = result_code(H, Es),
+ {RC, FailedAVP} = result_code(Type, H, Es),
{answer(Type, RC, FailedAVP, S), post(Type, RC, Pkt, S)}.
inband_security([]) ->
@@ -727,8 +883,16 @@ cea(CEA, RC, Dict0) ->
post('CER' = T, RC, Pkt, S) ->
{T, caps(S), {RC, Pkt}};
-post('DPR', _, _, _) ->
- ok.
+post('DPR', _, _, #state{parent = Pid}) ->
+ [fun(S) -> dpr_timer(), inform_dpr(Pid), dpr(S) end].
+
+dpr(#state{dpr = false} = S) -> %% not awaiting DPA
+ S#state{dpr = true}; %% DPR received
+dpr(S) -> %% DPR already sent or received
+ S.
+
+inform_dpr(Pid) ->
+ Pid ! {'DPR', self()}. %% tell watchdog to die with us
rejected({capabilities_cb, _F, Reason}, T, S) ->
rejected(Reason, T, S);
@@ -738,7 +902,7 @@ rejected(discard, T, _) ->
rejected({N, Es}, T, S) ->
{answer('CER', N, failed_avp(N, Es), S), T};
rejected(N, T, S) ->
- rejected({N, []}, T, S).
+ {answer('CER', N, [], S), T}.
failed_avp(RC, [{RC, Avp} | _]) ->
[{'Failed-AVP', [[{'AVP', [Avp]}]]}];
@@ -777,15 +941,24 @@ set(['answer-message' | _] = Ans, FailedAvp) ->
set([_|_] = Ans, FailedAvp) ->
Ans ++ FailedAvp.
+%% result_code/3
+
+%% Be lenient with errors in DPR since there's no reason to be
+%% otherwise. Rejecting may cause the peer to missinterpret the error
+%% as meaning that the connection should not be closed, which may well
+%% lead to more problems than any errors in the DPR.
+
+result_code('DPR', _, _) ->
+ {2001, []};
+
+result_code('CER', H, Es) ->
+ result_code(H, Es).
+
%% result_code/2
result_code(#diameter_header{is_error = true}, _) ->
{3008, []}; %% DIAMETER_INVALID_HDR_BITS
-result_code(_, [Bs|_])
- when is_bitstring(Bs) -> %% from old code
- {3009, []}; %% DIAMETER_INVALID_HDR_BITS
-
result_code(#diameter_header{version = ?DIAMETER_VERSION}, Es) ->
rc(Es);
@@ -856,28 +1029,29 @@ recv_CER(CER, #state{service = Svc, dictionary = Dict}) ->
close({'CER', CER, Svc, Dict, Reason})
end.
-%% handle_CEA/1
+%% handle_CEA/2
-handle_CEA(#diameter_packet{bin = Bin}
+handle_CEA(#diameter_packet{header = H}
= Pkt,
#state{dictionary = Dict0,
service = #diameter_service{capabilities = LCaps}}
- = S)
- when is_binary(Bin) ->
- ?LOG(recv, 'CEA'),
+ = S) ->
+ incr(recv, H, Dict0),
- #diameter_packet{msg = CEA}
+ #diameter_packet{}
= DPkt
= diameter_codec:decode(Dict0, Pkt),
+ diameter_codec:setopts([{string_decode, false}]),
+
+ RC = result_code(incr_rc(recv, DPkt, Dict0)),
+
{SApps, IS, RCaps} = recv_CEA(DPkt, S),
#diameter_caps{origin_host = {OH, DH}}
= Caps
= capz(LCaps, RCaps),
- RC = Dict0:'#get-'('Result-Code', CEA),
-
%% Ensure that we don't already have a connection to the peer in
%% question. This isn't the peer election of 3588 except in the
%% sense that, since we don't know who we're talking to until we
@@ -885,7 +1059,7 @@ handle_CEA(#diameter_packet{bin = Bin}
%% connection with the peer.
try
- ?IS_SUCCESS(RC)
+ is_integer(RC) andalso ?IS_SUCCESS(RC)
orelse ?THROW(RC),
[] == SApps
andalso ?THROW(no_common_application),
@@ -905,6 +1079,11 @@ handle_CEA(#diameter_packet{bin = Bin}
%% capabilities exchange could send DIAMETER_LIMITED_SUCCESS = 2002,
%% even if this isn't required by RFC 3588.
+result_code({'Result-Code', N}) ->
+ N;
+result_code(_) ->
+ undefined.
+
%% recv_CEA/2
recv_CEA(#diameter_packet{header = #diameter_header{version
@@ -996,22 +1175,16 @@ capz(#diameter_caps{} = L, #diameter_caps{} = R) ->
tl(tuple_to_list(R)))]).
%% close/1
+%%
+%% A good function to trace on in case of problems with capabilities
+%% exchange.
close(Reason) ->
- report(Reason),
throw({?MODULE, close, Reason}).
-%% Could possibly log more here.
-report({M, _, _, _, _} = T)
- when M == 'CER';
- M == 'CEA' ->
- diameter_lib:error_report(failure, T);
-report(_) ->
- ok.
-
%% dpr/2
%%
-%% The RFC isn't clear on whether DPR should be send in a non-Open
+%% The RFC isn't clear on whether DPR should be sent in a non-Open
%% state. The Peer State Machine transitions it documents aren't
%% exhaustive (no Stop in Wait-I-CEA for example) so assume it's up to
%% the implementation and transition to Closed (ie. die) if we haven't
@@ -1027,7 +1200,7 @@ dpr(Reason, #state{state = 'Open',
Peer = {self(), Caps},
dpr(CBs, [Reason, Ref, Peer], S);
-%% Connection is open, DPR already sent.
+%% Connection is open, DPR already sent or received.
dpr(_, #state{state = 'Open'}) ->
ok;
@@ -1042,7 +1215,7 @@ dpr(_Reason, _S) ->
%% process and contact it. (eg. diameter:service_info/2)
dpr([CB|Rest], [Reason | _] = Args, S) ->
- try diameter_lib:eval([CB | Args]) of
+ case diameter_lib:eval([CB | Args]) of
{dpr, Opts} when is_list(Opts) ->
send_dpr(Reason, Opts, S);
dpr ->
@@ -1052,23 +1225,15 @@ dpr([CB|Rest], [Reason | _] = Args, S) ->
ignore ->
dpr(Rest, Args, S);
T ->
- No = {disconnect_cb, T},
- diameter_lib:error_report(invalid, No),
- {stop, No}
- catch
- E:R ->
- No = {disconnect_cb, E, R, ?STACK},
- diameter_lib:error_report(failure, No),
- {stop, No}
+ ?ERROR({disconnect_cb, CB, Args, T})
end;
dpr([], [Reason | _], S) ->
send_dpr(Reason, [], S).
--record(opts, {cause, timeout = ?DPA_TIMEOUT}).
+-record(opts, {cause, timeout}).
-send_dpr(Reason, Opts, #state{transport = TPid,
- dictionary = Dict,
+send_dpr(Reason, Opts, #state{dictionary = Dict,
service = #diameter_service{capabilities = Caps}}
= S) ->
#opts{cause = Cause, timeout = Tmo}
@@ -1077,23 +1242,37 @@ send_dpr(Reason, Opts, #state{transport = TPid,
transport -> ?GOAWAY;
_ -> ?REBOOT
end,
- timeout = ?DPA_TIMEOUT},
+ timeout = dpa_timeout()},
Opts),
#diameter_caps{origin_host = {OH, _},
origin_realm = {OR, _}}
= Caps,
- #diameter_packet{header = #diameter_header{end_to_end_id = Eid,
- hop_by_hop_id = Hid}}
- = Pkt
- = encode(['DPR', {'Origin-Host', OH},
+ Pkt = encode(['DPR', {'Origin-Host', OH},
{'Origin-Realm', OR},
{'Disconnect-Cause', Cause}],
Dict),
+ send_dpr(false, Pkt, Tmo, S).
+
+%% send_dpr/4
+
+send_dpr(X,
+ #diameter_packet{header = #diameter_header{end_to_end_id = Eid,
+ hop_by_hop_id = Hid}}
+ = Pkt,
+ Tmo,
+ #state{transport = TPid,
+ dictionary = Dict}
+ = S) ->
+ %% Only count DPR sent by the service: explicit DPR is counted in
+ %% the same way as other explicitly sent requests.
+ X orelse incr(send, Pkt, Dict),
send(TPid, Pkt),
dpa_timer(Tmo),
?LOG(send, 'DPR'),
- S#state{dpr = {Hid, Eid}}.
+ S#state{dpr = {X, Hid, Eid}}.
+
+%% opt/2
opt({timeout, Tmo}, Rec)
when ?IS_TIMEOUT(Tmo) ->
@@ -1116,6 +1295,27 @@ cause(N) ->
dpa_timer(Tmo) ->
erlang:send_after(Tmo, self(), dpa_timeout).
+dpa_timeout() ->
+ dpa_timeout(getr(?DPA_KEY)).
+
+dpa_timeout({_, Tmo}) ->
+ Tmo;
+dpa_timeout(undefined) -> %% set in old code
+ ?DPA_TIMEOUT;
+dpa_timeout(Tmo) -> %% ditto
+ Tmo.
+
+dpr_timer() ->
+ dpa_timer(dpr_timeout()).
+
+dpr_timeout() ->
+ dpr_timeout(getr(?DPA_KEY)).
+
+dpr_timeout({Tmo, _}) ->
+ Tmo;
+dpr_timeout(_) -> %% set in old code
+ ?DPR_TIMEOUT.
+
%% register_everywhere/1
%%
%% Register a term and ensure it's not registered elsewhere. Note that
diff --git a/lib/diameter/src/base/diameter_reg.erl b/lib/diameter/src/base/diameter_reg.erl
index 3197c1aee1..f785777874 100644
--- a/lib/diameter/src/base/diameter_reg.erl
+++ b/lib/diameter/src/base/diameter_reg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,10 +22,11 @@
%%
-module(diameter_reg).
--compile({no_auto_import, [monitor/2]}).
-
-behaviour(gen_server).
+-compile({no_auto_import, [monitor/2, now/0]}).
+-import(diameter_lib, [now/0]).
+
-export([add/1,
add_new/1,
del/1,
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 70e66537ed..86e744dfbe 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,6 +24,9 @@
-module(diameter_service).
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
%% towards diameter_service_sup
-export([start_link/1]).
@@ -127,7 +130,9 @@
:: [{sequence, diameter:sequence()} %% sequence mask
| {share_peers, diameter:remotes()} %% broadcast to
| {use_shared_peers, diameter:remotes()} %% use from
- | {restrict_connections, diameter:restriction()}]}).
+ | {restrict_connections, diameter:restriction()}
+ | {string_decode, boolean()}
+ | {incoming_maxlen, diameter:message_length()}]}).
%% shared_peers reflects the peers broadcast from remote nodes.
%% Record representing an RFC 3539 watchdog process implemented by
@@ -258,16 +263,22 @@ whois(SvcName) ->
%% ---------------------------------------------------------------------------
-spec pick_peer(SvcName, AppOrAlias, Opts)
- -> {{TPid, Caps, App}, Mask}
- | false
- | {error, term()}
+ -> {{TPid, Caps, App}, Mask, SvcOpts}
+ | false %% no selection
+ | {error, no_service}
when SvcName :: diameter:service_name(),
- AppOrAlias :: {alias, diameter:app_alias()} | #diameter_app{},
- Opts :: tuple(),
+ AppOrAlias :: #diameter_app{}
+ | {alias, diameter:app_alias()},
+ Opts :: {fun((Dict :: module()) -> [term()]),
+ diameter:peer_filter(),
+ Xtra :: list()},
TPid :: pid(),
Caps :: #diameter_caps{},
App :: #diameter_app{},
- Mask :: diameter:sequence().
+ Mask :: diameter:sequence(),
+ SvcOpts :: [diameter:service_opt()].
+%% Extract Mask in the returned tuple so that diameter_traffic doesn't
+%% need to know about the ordering of SvcOpts used here.
pick_peer(SvcName, App, Opts) ->
pick(lookup_state(SvcName), App, Opts).
@@ -284,10 +295,10 @@ pick(#state{service = #diameter_service{applications = Apps}}
Opts) -> %% initial call from diameter:call/4
pick(S, find_outgoing_app(Alias, Apps), Opts);
-pick(_, false, _) ->
- false;
+pick(_, false = No, _) ->
+ No;
-pick(#state{options = [{_, Mask} | _]}
+pick(#state{options = [{_, Mask} | SvcOpts]}
= S,
#diameter_app{module = ModX, dictionary = Dict}
= App0,
@@ -296,7 +307,7 @@ pick(#state{options = [{_, Mask} | _]}
[_,_] = RealmAndHost = diameter_lib:eval([DestF, Dict]),
case pick_peer(App, RealmAndHost, Filter, S) of
{TPid, Caps} ->
- {{TPid, Caps, App}, Mask};
+ {{TPid, Caps, App}, Mask, SvcOpts};
false = No ->
No
end.
@@ -499,9 +510,21 @@ transition(Req, S) ->
%% # terminate/2
%% ---------------------------------------------------------------------------
-terminate(Reason, #state{service_name = Name} = S) ->
+terminate(Reason, #state{service_name = Name, peerT = PeerT} = S) ->
send_event(Name, stop),
ets:delete(?STATE_TABLE, Name),
+
+ %% Communicate pending loss of any peers that connection_down/3
+ %% won't. This is needed when stopping a service since we don't
+ %% wait for watchdog state changes to take care of if. That this
+ %% takes place after deleting the state entry ensures that the
+ %% resulting failover by request processes accomplishes nothing.
+ ets:foldl(fun(#peer{pid = TPid}, _) ->
+ diameter_traffic:peer_down(TPid)
+ end,
+ ok,
+ PeerT),
+
shutdown == Reason %% application shutdown
andalso shutdown(application, S).
@@ -598,8 +621,9 @@ st(#watchdog{ref = Ref, pid = Pid}, Refs) ->
%% st/3
st(#watchdog{pid = Pid}, Reason, Acc) ->
+ MRef = monitor(process, Pid),
Pid ! {shutdown, self(), Reason},
- [Pid | Acc].
+ [MRef | Acc].
%% ---------------------------------------------------------------------------
%% # call_service/2
@@ -674,7 +698,9 @@ service_options(Opts) ->
{restrict_connections, proplists:get_value(restrict_connections,
Opts,
?RESTRICT)},
- {spawn_opt, proplists:get_value(spawn_opt, Opts, [])}].
+ {spawn_opt, proplists:get_value(spawn_opt, Opts, [])},
+ {string_decode, proplists:get_value(string_decode, Opts, true)},
+ {incoming_maxlen, proplists:get_value(incoming_maxlen, Opts, 16#FFFFFF)}].
%% The order of options is significant since we match against the list.
mref(false = No) ->
@@ -701,8 +727,7 @@ notify(Share, SvcName, T) ->
Nodes = remotes(Share),
[] /= Nodes andalso diameter_peer:notify(Nodes, SvcName, T).
%% Test for the empty list for upgrade reasons: there's no
-%% diameter_peer:notify/3 in old code so no call means no load order
-%% requirement.
+%% diameter_peer:notify/3 in old code.
remotes(false) ->
[];
@@ -720,14 +745,27 @@ remotes(F) ->
L when is_list(L) ->
L;
T ->
- diameter_lib:error_report({invalid_return, T}, F),
+ ?LOG(invalid_return, {F,T}),
+ error_report(invalid_return, share_peers, F),
[]
catch
E:R ->
- diameter_lib:error_report({failure, {E, R, ?STACK}}, F),
+ ?LOG(failure, {E, R, F, diameter_lib:get_stacktrace()}),
+ error_report(failure, share_peers, F),
[]
end.
+%% error_report/3
+
+error_report(T, What, F) ->
+ Reason = io_lib:format("~s from ~p callback", [reason(T), What]),
+ diameter_lib:error_report(Reason, diameter_lib:eval_name(F)).
+
+reason(invalid_return) ->
+ "invalid return";
+reason(failure) ->
+ "failure".
+
%% ---------------------------------------------------------------------------
%% # start/3
%% ---------------------------------------------------------------------------
@@ -741,8 +779,9 @@ remotes(F) ->
start(Ref, {T, Opts}, S)
when T == connect;
T == listen ->
+ N = proplists:get_value(pool_size, Opts, 1),
try
- {ok, start(Ref, type(T), Opts, S)}
+ {ok, start(Ref, type(T), Opts, N, S)}
catch
?FAILURE(Reason) ->
{error, Reason}
@@ -760,26 +799,44 @@ type(connect = T) -> T.
%% start/4
-start(Ref, Type, Opts, #state{watchdogT = WatchdogT,
- peerT = PeerT,
- options = SvcOpts,
- service_name = SvcName,
- service = Svc0})
+start(Ref, Type, Opts, State) ->
+ start(Ref, Type, Opts, 1, State).
+
+%% start/5
+
+start(Ref, Type, Opts, N, #state{watchdogT = WatchdogT,
+ peerT = PeerT,
+ options = SvcOpts,
+ service_name = SvcName,
+ service = Svc0})
when Type == connect;
Type == accept ->
#diameter_service{applications = Apps}
- = Svc
+ = Svc1
= merge_service(Opts, Svc0),
- {_,_} = Mask = proplists:get_value(sequence, SvcOpts),
- RecvData = diameter_traffic:make_recvdata([SvcName, PeerT, Apps, Mask]),
- Pid = s(Type, Ref, {{spawn_opts([Opts, SvcOpts]), RecvData},
- Opts,
- SvcOpts,
- Svc}),
- insert(WatchdogT, #watchdog{pid = Pid,
- type = Type,
- ref = Ref,
- options = Opts}),
+ Svc = binary_caps(Svc1, proplists:get_value(string_decode, SvcOpts, true)),
+ RecvData = diameter_traffic:make_recvdata([SvcName,
+ PeerT,
+ Apps,
+ SvcOpts]),
+ T = {{spawn_opts([Opts, SvcOpts]), RecvData}, Opts, SvcOpts, Svc},
+ Rec = #watchdog{type = Type,
+ ref = Ref,
+ options = Opts},
+ diameter_lib:fold_n(fun(_,A) ->
+ [wd(Type, Ref, T, WatchdogT, Rec) | A]
+ end,
+ [],
+ N).
+
+binary_caps(Svc, true) ->
+ Svc;
+binary_caps(#diameter_service{capabilities = Caps} = Svc, false) ->
+ Svc#diameter_service{capabilities = diameter_capx:binary_caps(Caps)}.
+
+wd(Type, Ref, T, WatchdogT, Rec) ->
+ Pid = start_watchdog(Type, Ref, T),
+ insert(WatchdogT, Rec#watchdog{pid = Pid}),
Pid.
%% Note that the service record passed into the watchdog is the merged
@@ -792,7 +849,7 @@ spawn_opts(Optss) ->
T /= link,
T /= monitor].
-s(Type, Ref, T) ->
+start_watchdog(Type, Ref, T) ->
{_MRef, Pid} = diameter_watchdog:start({Type, Ref}, T),
Pid.
@@ -813,7 +870,7 @@ ms({applications, As}, #diameter_service{applications = Apps} = S)
%% The fact that all capabilities can be configured on the transports
%% means that the service doesn't necessarily represent a single
-%% locally implemented Diameter peer as identified by Origin-Host: a
+%% locally implemented Diameter node as identified by Origin-Host: a
%% transport can configure its own Origin-Host. This means that the
%% service little more than a placeholder for default capabilities
%% plus a list of applications that individual transports can choose
@@ -870,7 +927,7 @@ watchdog(TPid, [], ?WD_OKAY, ?WD_SUSPECT = To, Wd, State) ->
%% Watchdog has lost its connection.
watchdog(TPid, [], _, ?WD_DOWN = To, Wd, #state{peerT = PeerT} = S) ->
- close(Wd, S),
+ close(Wd),
watchdog_down(Wd, To, S),
ets:delete(PeerT, TPid);
@@ -1027,8 +1084,11 @@ peer_cb(App, F, A) ->
true
catch
E:R ->
- diameter_lib:error_report({failure, {E, R, ?STACK}},
- {App, F, A}),
+ %% Don't include arguments since a #diameter_caps{} strings
+ %% from the peer, which could be anything (especially, large).
+ [Mod|X] = App#diameter_app.module,
+ ?LOG(failure, {E, R, Mod, F, diameter_lib:get_stacktrace()}),
+ error_report(failure, F, {Mod, F, A ++ X}),
false
end.
@@ -1158,7 +1218,7 @@ connect_timer(Opts, Def0) ->
%% continuous restarted in case of faulty config or other problems.
tc(Time, Tc) ->
choose(Tc > ?RESTART_TC
- orelse timer:now_diff(now(), Time) > 1000*?RESTART_TC,
+ orelse diameter_lib:micro_diff(Time) > 1000*?RESTART_TC,
Tc,
?RESTART_TC).
@@ -1188,26 +1248,16 @@ tc(false = No, _, _) -> %% removed
%% another watchdog to be able to detect that it should transition
%% from initial into reopen rather than okay. That someone is either
%% the accepting watchdog upon reception of a CER from the previously
-%% connected peer, or us after connect_timer timeout.
+%% connected peer, or us after connect_timer timeout or immediately.
-close(#watchdog{type = connect}, _) ->
+close(#watchdog{type = connect}) ->
ok;
+
close(#watchdog{type = accept,
pid = Pid,
- ref = Ref,
- options = Opts},
- #state{service_name = SvcName}) ->
- c(Pid, diameter_config:have_transport(SvcName, Ref), Opts).
-
-%% Tell watchdog to (maybe) die later ...
-c(Pid, true, Opts) ->
+ options = Opts}) ->
Tc = connect_timer(Opts, 2*?DEFAULT_TC),
- erlang:send_after(Tc, Pid, close);
-
-%% ... or now.
-c(Pid, false, _Opts) ->
- Pid ! close.
-
+ erlang:send_after(Tc, Pid, close).
%% The RFC's only document the behaviour of Tc, our connect_timer,
%% for the establishment of connections but we also give
%% connect_timer semantics for a listener, being the time within
@@ -1261,13 +1311,14 @@ cm([#diameter_app{alias = Alias} = App], Req, From, Svc) ->
mod_state(Alias, ModS),
{T, RC};
T ->
- diameter_lib:error_report({invalid, T},
- {App, handle_call, Args}),
+ ModX = App#diameter_app.module,
+ ?LOG(invalid_return, {ModX, handle_call, Args, T}),
invalid
catch
E: Reason ->
- diameter_lib:error_report({failure, {E, Reason, ?STACK}},
- {App, handle_call, Args}),
+ ModX = App#diameter_app.module,
+ Stack = diameter_lib:get_stacktrace(),
+ ?LOG(failure, {E, Reason, ModX, handle_call, Stack}),
failure
end;
@@ -1390,6 +1441,8 @@ pick_peer(Local, Remote, Pid, _SvcName, #diameter_app{mutable = true} = App)
case call_service(Pid, {pick_peer, Local, Remote, App}) of
{TPid, _} = T when is_pid(TPid) ->
T;
+ false = No ->
+ No;
{error, _} ->
false
end;
@@ -1423,13 +1476,16 @@ pick_peer(Local,
T; %% Accept returned state in the immutable
{false = No, S} -> %% case as long it isn't changed.
No;
- T ->
- diameter_lib:error_report({invalid, T, App},
- {App, pick_peer, Args})
+ T when M ->
+ ModX = App#diameter_app.module,
+ ?LOG(invalid_return, {ModX, pick_peer, T}),
+ false
catch
- E: Reason ->
- diameter_lib:error_report({failure, {E, Reason, ?STACK}},
- {App, pick_peer, Args})
+ E: Reason when M ->
+ ModX = App#diameter_app.module,
+ Stack = diameter_lib:get_stacktrace(),
+ ?LOG(failure, {E, Reason, ModX, pick_peer, Stack}),
+ false
end.
%% peers/4
@@ -1437,42 +1493,52 @@ pick_peer(Local,
peers(Alias, RH, Filter, Peers) ->
case ?Dict:find(Alias, Peers) of
{ok, L} ->
- ps(L, RH, Filter, {[],[]});
+ filter(L, RH, Filter);
error ->
[]
end.
-%% Place a peer whose Destination-Host/Realm matches those of the
-%% request at the front of the result list. Could add some sort of
-%% 'sort' option to allow more control.
-
-ps([], _, _, {Ys, Ns}) ->
- lists:reverse(Ys, Ns);
-ps([{_TPid, #diameter_caps{} = Caps} = TC | Rest], RH, Filter, Acc) ->
- ps(Rest, RH, Filter, pacc(caps_filter(Caps, RH, Filter),
- caps_filter(Caps, RH, {all, [host, realm]}),
- TC,
- Acc)).
-
-pacc(true, true, Peer, {Ts, Fs}) ->
- {[Peer|Ts], Fs};
-pacc(true, false, Peer, {Ts, Fs}) ->
- {Ts, [Peer|Fs]};
-pacc(_, _, _, Acc) ->
- Acc.
+%% filter/3
+%%
+%% Return peers in match order.
-%% caps_filter/3
+filter(Peers, RH, Filter) ->
+ {Ts, _} = fltr(Peers, RH, Filter),
+ Ts.
-caps_filter(C, RH, {neg, F}) ->
- not caps_filter(C, RH, F);
+%% fltr/4
-caps_filter(C, RH, {all, L})
+fltr(Peers, _, none) ->
+ {Peers, []};
+
+fltr(Peers, RH, {neg, F}) ->
+ {Ts, Fs} = fltr(Peers, RH, F),
+ {Fs, Ts};
+
+fltr(Peers, RH, {all, L})
when is_list(L) ->
- lists:all(fun(F) -> caps_filter(C, RH, F) end, L);
+ lists:foldl(fun(F,A) -> fltr_all(F, A, RH) end,
+ {Peers, []},
+ L);
-caps_filter(C, RH, {any, L})
+fltr(Peers, RH, {any, L})
when is_list(L) ->
- lists:any(fun(F) -> caps_filter(C, RH, F) end, L);
+ lists:foldl(fun(F,A) -> fltr_any(F, A, RH) end,
+ {[], Peers},
+ L);
+
+fltr(Peers, RH, F) ->
+ lists:partition(fun({_,C}) -> caps_filter(C, RH, F) end, Peers).
+
+fltr_all(F, {Ts0, Fs0}, RH) ->
+ {Ts1, Fs1} = fltr(Ts0, RH, F),
+ {Ts1, Fs0 ++ Fs1}.
+
+fltr_any(F, {Ts0, Fs0}, RH) ->
+ {Ts1, Fs1} = fltr(Fs0, RH, F),
+ {Ts0 ++ Ts1, Fs1}.
+
+%% caps_filter/3
caps_filter(#diameter_caps{origin_host = {_,OH}}, [_,DH], host) ->
eq(undefined, DH, OH);
@@ -1485,9 +1551,6 @@ caps_filter(C, _, Filter) ->
%% caps_filter/2
-caps_filter(_, none) ->
- true;
-
caps_filter(#diameter_caps{origin_host = {_,OH}}, {host, H}) ->
eq(any, H, OH);
@@ -1550,7 +1613,8 @@ transports(#state{watchdogT = WatchdogT}) ->
-define(OTHER_INFO, [connections,
name,
peers,
- statistics]).
+ statistics,
+ info]).
service_info(Item, S)
when is_atom(Item) ->
@@ -1640,6 +1704,7 @@ complete_info(Item, #state{service = Svc} = S) ->
keys -> ?ALL_INFO ++ ?CAP_INFO ++ ?OTHER_INFO;
all -> service_info(?ALL_INFO, S);
statistics -> info_stats(S);
+ info -> info_info(S);
connections -> info_connections(S);
peers -> info_peers(S)
end.
@@ -1686,31 +1751,43 @@ info_transport(S) ->
[],
PeerD).
-%% Only a config entry for a listening transport: use it.
-transport([[{type, listen}, _] = L]) ->
- L ++ [{accept, []}];
-
-%% Only one config or peer entry for a connecting transport: use it.
-transport([[{type, connect} | _] = L]) ->
- L;
+%% Single config entry. Distinguish between pool_size config or not on
+%% a connecting transport for backwards compatibility: with the option
+%% the form is similar to the listening case, with connections grouped
+%% in a pool tuple (for lack of a better name), without as before.
+transport([[{type, Type}, {options, Opts}] = L])
+ when Type == listen;
+ Type == connect ->
+ L ++ [{K, []} || [{_,K}] <- [keys(Type, Opts)]];
%% Peer entries: discard config. Note that the peer entries have
%% length at least 3.
transport([[_,_] | L]) ->
transport(L);
-%% Possibly many peer entries for a listening transport. Note that all
-%% have the same options by construction, which is not terribly space
-%% efficient.
-transport([[{type, accept}, {options, Opts} | _] | _] = Ls) ->
- [{type, listen},
+%% Multiple tranports. Note that all have the same options by
+%% construction, which is not terribly space efficient.
+transport([[{type, Type}, {options, Opts} | _] | _] = Ls) ->
+ transport(keys(Type, Opts), Ls).
+
+%% Group transports in an accept or pool tuple ...
+transport([{Type, Key}], [[{type, _}, {options, Opts} | _] | _] = Ls) ->
+ [{type, Type},
{options, Opts},
- {accept, [lists:nthtail(2,L) || L <- Ls]}].
+ {Key, [tl(tl(L)) || L <- Ls]}];
+
+%% ... or not: there can only be one.
+transport([], [L]) ->
+ L.
+
+keys(connect = T, Opts) ->
+ [{T, pool} || lists:keymember(pool_size, 1, Opts)];
+keys(_, _) ->
+ [{listen, accept}].
peer_dict(#state{watchdogT = WatchdogT, peerT = PeerT}, Dict0) ->
try ets:tab2list(WatchdogT) of
- L ->
- lists:foldl(fun(T,A) -> peer_acc(PeerT, A, T) end, Dict0, L)
+ L -> lists:foldl(fun(T,A) -> peer_acc(PeerT, A, T) end, Dict0, L)
catch
error: badarg -> Dict0 %% service has gone down
end.
@@ -1722,12 +1799,11 @@ peer_acc(PeerT, Acc, #watchdog{pid = Pid,
state = WS,
started = At,
peer = TPid}) ->
- dict:append(Ref,
- [{type, Type},
- {options, Opts},
- {watchdog, {Pid, At, WS}}
- | info_peer(PeerT, TPid, WS)],
- Acc).
+ Info = [{type, Type},
+ {options, Opts},
+ {watchdog, {Pid, At, WS}}
+ | info_peer(PeerT, TPid, WS)],
+ dict:append(Ref, Info ++ [{info, info_process_info(Info)}], Acc).
info_peer(PeerT, TPid, WS)
when is_pid(TPid), WS /= ?WD_DOWN ->
@@ -1739,6 +1815,49 @@ info_peer(PeerT, TPid, WS)
info_peer(_, _, _) ->
[].
+info_process_info(Info) ->
+ lists:flatmap(fun ipi/1, Info).
+
+ipi({watchdog, {Pid, _, _}}) ->
+ info_pid(Pid);
+
+ipi({peer, {Pid, _}}) ->
+ info_pid(Pid);
+
+ipi({port, [{owner, Pid} | _]}) ->
+ info_pid(Pid);
+
+ipi(_) ->
+ [].
+
+info_pid(Pid) ->
+ case process_info(Pid, [message_queue_len, memory, binary]) of
+ undefined ->
+ [];
+ L ->
+ [{Pid, lists:map(fun({K,V}) -> {K, map_info(K,V)} end, L)}]
+ end.
+
+%% The binary list consists of 3-tuples {Ptr, Size, Count}, where Ptr
+%% is a C pointer value, Size is the size of a referenced binary in
+%% bytes, and Count is a global reference count. The same Ptr can
+%% occur multiple times, once for each reference on the process heap.
+%% In this case, the corresponding tuples will have Size in common but
+%% Count may differ just because no global lock is taken when the
+%% value is retrieved.
+%%
+%% The list can be quite large, and we aren't often interested in the
+%% pointers or counts, so whittle this down to the number of binaries
+%% referenced and their total byte count.
+map_info(binary, L) ->
+ SzD = lists:foldl(fun({P,S,_}, D) -> dict:store(P,S,D) end,
+ dict:new(),
+ L),
+ {dict:size(SzD), dict:fold(fun(_,S,N) -> S + N end, 0, SzD)};
+
+map_info(_, T) ->
+ T.
+
%% The point of extracting the config here is so that 'transport' info
%% has one entry for each transport ref, the peer table only
%% containing entries that have a living watchdog.
@@ -1796,6 +1915,13 @@ mk_app(#diameter_app{} = A) ->
info_pending(#state{} = S) ->
diameter_traffic:pending(transports(S)).
+%% info_info/1
+%%
+%% Extract process_info from connections info.
+
+info_info(S) ->
+ [I || L <- conn_list(S), {info, I} <- L].
+
%% info_connections/1
%%
%% One entry per transport connection. Statistics for each entry are
diff --git a/lib/diameter/src/base/diameter_service_sup.erl b/lib/diameter/src/base/diameter_service_sup.erl
index 153fff902f..e3177f0083 100644
--- a/lib/diameter/src/base/diameter_service_sup.erl
+++ b/lib/diameter/src/base/diameter_service_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -58,7 +58,7 @@ init([]) ->
ChildSpec = {Mod,
{Mod, start_link, []},
temporary,
- 1000,
+ 5000,
worker,
[Mod]},
{ok, {Flags, [ChildSpec]}}.
diff --git a/lib/diameter/src/base/diameter_session.erl b/lib/diameter/src/base/diameter_session.erl
index 3b236f109a..c5ea0428b5 100644
--- a/lib/diameter/src/base/diameter_session.erl
+++ b/lib/diameter/src/base/diameter_session.erl
@@ -157,8 +157,8 @@ session_id(Host) ->
%% ---------------------------------------------------------------------------
init() ->
- Now = now(),
- random:seed(Now),
+ {Now, Seed} = diameter_lib:seed(),
+ random:seed(Seed),
Time = time32(Now),
Seq = (?INT32 band (Time bsl 20)) bor (random:uniform(1 bsl 20) - 1),
ets:insert(diameter_sequence, [{origin_state_id, Time},
diff --git a/lib/diameter/src/base/diameter_stats.erl b/lib/diameter/src/base/diameter_stats.erl
index b68d4af11f..64ea082be0 100644
--- a/lib/diameter/src/base/diameter_stats.erl
+++ b/lib/diameter/src/base/diameter_stats.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,9 +22,11 @@
%%
-module(diameter_stats).
-
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
-export([reg/2, reg/1,
incr/3, incr/1,
read/1,
@@ -245,9 +247,6 @@ handle_call({read, Refs, Del}, _From, State) ->
handle_call({read, Refs}, _, State) ->
{reply, read_refs(Refs), State};
-handle_call({flush, Refs}, _From, State) -> %% from old code
- {reply, to_refdict(read(Refs, true)), State};
-
handle_call(Req, From, State) ->
?UNEXPECTED([Req, From]),
{reply, nok, State}.
diff --git a/lib/diameter/src/base/diameter_sup.erl b/lib/diameter/src/base/diameter_sup.erl
index e5afd23dcd..4ede4086d8 100644
--- a/lib/diameter/src/base/diameter_sup.erl
+++ b/lib/diameter/src/base/diameter_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -64,7 +64,7 @@ spec(Mod) ->
{Mod,
{Mod, start_link, []},
permanent,
- 1000,
+ infinity,
supervisor,
[Mod]}.
diff --git a/lib/diameter/src/base/diameter_sync.erl b/lib/diameter/src/base/diameter_sync.erl
index ce2db4b3a2..90eabece3d 100644
--- a/lib/diameter/src/base/diameter_sync.erl
+++ b/lib/diameter/src/base/diameter_sync.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,6 +27,9 @@
-module(diameter_sync).
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
-export([call/4, call/5,
cast/4, cast/5,
carp/1, carp/2]).
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index 8b6f026b34..eb4bbae931 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,11 @@
%% towards diameter_watchdog
-export([receive_message/4]).
+%% towards diameter_peer_fsm and diameter_watchdog
+-export([incr/4,
+ incr_error/4,
+ incr_rc/4]).
+
%% towards diameter_service
-export([make_recvdata/1,
peer_up/1,
@@ -44,6 +49,8 @@
-include_lib("diameter/include/diameter.hrl").
-include("diameter_internal.hrl").
+-define(LOGX(Reason, T), begin ?LOG(Reason, T), x({Reason, T}) end).
+
-define(RELAY, ?DIAMETER_DICT_RELAY).
-define(BASE, ?DIAMETER_DICT_COMMON). %% Note: the RFC 3588 dictionary
@@ -70,7 +77,12 @@
{peerT :: ets:tid(),
service_name :: diameter:service_name(),
apps :: [#diameter_app{}],
- sequence :: diameter:sequence()}).
+ sequence :: diameter:sequence(),
+ codec :: [{string_decode, boolean()}
+ | {incoming_maxlen, diameter:message_length()}]}).
+%% Note that incoming_maxlen is currently handled in diameter_peer_fsm,
+%% so that any message exceeding the maximum is discarded. Retain the
+%% option in case we want to extend the values and semantics.
%% Record stored in diameter_request for each outgoing request.
-record(request,
@@ -85,14 +97,18 @@
%% # make_recvdata/1
%% ---------------------------------------------------------------------------
-make_recvdata([SvcName, PeerT, Apps, Mask | _]) ->
+make_recvdata([SvcName, PeerT, Apps, {_,_} = Mask | _]) -> %% from old code
+ make_recvdata([SvcName, PeerT, Apps, [{sequence, Mask}]]);
+
+make_recvdata([SvcName, PeerT, Apps, SvcOpts | _]) ->
+ {_,_} = Mask = proplists:get_value(sequence, SvcOpts),
#recvdata{service_name = SvcName,
peerT = PeerT,
apps = Apps,
- sequence = Mask}.
-%% Take a list so that the caller (diameter_service) can be upgraded
-%% first if new members are added. Note that receive_message/4 might
-%% still get an old term from any watchdog started in old code.
+ sequence = Mask,
+ codec = [T || {K,_} = T <- SvcOpts,
+ lists:member(K, [string_decode,
+ incoming_maxlen])]}.
%% ---------------------------------------------------------------------------
%% peer_up/1
@@ -112,6 +128,78 @@ peer_down(TPid) ->
failover(TPid).
%% ---------------------------------------------------------------------------
+%% incr/4
+%% ---------------------------------------------------------------------------
+
+incr(Dir, #diameter_packet{header = H}, TPid, AppDict) ->
+ incr(Dir, H, TPid, AppDict);
+
+incr(Dir, #diameter_header{} = H, TPid, AppDict) ->
+ incr(TPid, {msg_id(H, AppDict), Dir}).
+
+%% ---------------------------------------------------------------------------
+%% incr_error/4
+%% ---------------------------------------------------------------------------
+
+%% Identify messages using the application dictionary, not the encode
+%% dictionary, which may differ in the case of answer-message.
+incr_error(Dir, T, Pid, {_MsgDict, AppDict}) ->
+ incr_error(Dir, T, Pid, AppDict);
+
+%% Decoded message without errors.
+incr_error(recv, #diameter_packet{errors = []}, _, _) ->
+ ok;
+
+incr_error(recv = D, #diameter_packet{header = H}, TPid, AppDict) ->
+ incr_error(D, H, TPid, AppDict);
+
+%% Encoded message with errors and an identifiable header ...
+incr_error(send = D, {_, _, #diameter_header{} = H}, TPid, AppDict) ->
+ incr_error(D, H, TPid, AppDict);
+
+%% ... or not.
+incr_error(send = D, {_,_}, TPid, _) ->
+ incr_error(D, unknown, TPid);
+
+incr_error(Dir, #diameter_header{} = H, TPid, AppDict) ->
+ incr_error(Dir, msg_id(H, AppDict), TPid);
+
+incr_error(Dir, Id, TPid, _) ->
+ incr_error(Dir, Id, TPid).
+
+incr_error(Dir, Id, TPid) ->
+ incr(TPid, {Id, Dir, error}).
+
+%% ---------------------------------------------------------------------------
+%% incr_rc/4
+%% ---------------------------------------------------------------------------
+
+-spec incr_rc(send|recv, Pkt, TPid, DictT)
+ -> {Counter, non_neg_integer()}
+ | Reason
+ when Pkt :: #diameter_packet{},
+ TPid :: pid(),
+ DictT :: module() | {MsgDict :: module(),
+ AppDict :: module(),
+ CommonDict:: module()},
+ Counter :: {'Result-Code', integer()}
+ | {'Experimental-Result', integer(), integer()},
+ Reason :: atom().
+
+incr_rc(Dir, Pkt, TPid, {_, AppDict, _} = DictT) ->
+ try
+ incr_result(Dir, Pkt, TPid, DictT)
+ catch
+ exit: {E,_} when E == no_result_code;
+ E == invalid_error_bit ->
+ incr(TPid, {msg_id(Pkt#diameter_packet.header, AppDict), Dir, E}),
+ E
+ end;
+
+incr_rc(Dir, Pkt, TPid, Dict0) ->
+ incr_rc(Dir, Pkt, TPid, {Dict0, Dict0, Dict0}).
+
+%% ---------------------------------------------------------------------------
%% pending/1
%% ---------------------------------------------------------------------------
@@ -153,6 +241,8 @@ receive_message(TPid, Pkt, Dict0, RecvData)
Dict0,
RecvData).
+%% recv/6
+
%% Incoming request ...
recv(true, false, TPid, Pkt, Dict0, T) ->
spawn_request(TPid, Pkt, Dict0, T);
@@ -160,6 +250,7 @@ recv(true, false, TPid, Pkt, Dict0, T) ->
%% ... answer to known request ...
recv(false, #request{ref = Ref, handler = Pid} = Req, _, Pkt, Dict0, _) ->
Pid ! {answer, Ref, Req, Dict0, Pkt};
+
%% Note that failover could have happened prior to this message being
%% received and triggering failback. That is, both a failover message
%% and answer may be on their way to the handler process. In the worst
@@ -170,7 +261,8 @@ recv(false, #request{ref = Ref, handler = Pid} = Req, _, Pkt, Dict0, _) ->
%% any others are discarded.
%% ... or not.
-recv(false, false, _, _, _, _) ->
+recv(false, false, TPid, _, _, _) ->
+ incr(TPid, {{unknown, 0}, recv, discarded}),
ok.
%% spawn_request/4
@@ -185,7 +277,7 @@ spawn_request(TPid, Pkt, Dict0, Opts, RecvData) ->
spawn_opt(fun() -> recv_request(TPid, Pkt, Dict0, RecvData) end, Opts)
catch
error: system_limit = E -> %% discard
- ?LOG({error, E}, now())
+ ?LOG(error, E)
end.
%% ---------------------------------------------------------------------------
@@ -196,8 +288,11 @@ recv_request(TPid,
#diameter_packet{header = #diameter_header{application_id = Id}}
= Pkt,
Dict0,
- #recvdata{peerT = PeerT, apps = Apps}
+ #recvdata{peerT = PeerT,
+ apps = Apps,
+ codec = Opts}
= RecvData) ->
+ diameter_codec:setopts([{common_dictionary, Dict0} | Opts]),
send_A(recv_R(diameter_service:find_incoming_app(PeerT, TPid, Id, Apps),
TPid,
Pkt,
@@ -205,16 +300,24 @@ recv_request(TPid,
RecvData),
TPid,
Dict0,
- RecvData).
+ RecvData);
+
+recv_request(TPid, Pkt, Dict0, RecvData) -> %% from old code
+ recv_request(TPid,
+ Pkt,
+ Dict0,
+ #recvdata{} = erlang:append_element(RecvData, [])).
%% recv_R/5
-recv_R({#diameter_app{id = Id, dictionary = Dict} = App, Caps},
+recv_R({#diameter_app{id = Id, dictionary = AppDict} = App, Caps},
TPid,
Pkt0,
Dict0,
RecvData) ->
- Pkt = errors(Id, diameter_codec:decode(Id, Dict, Pkt0)),
+ incr(recv, Pkt0, TPid, AppDict),
+ Pkt = errors(Id, diameter_codec:decode(Id, AppDict, Pkt0)),
+ incr_error(recv, Pkt, TPid, AppDict),
{Caps, Pkt, App, recv_R(App, TPid, Dict0, Caps, RecvData, Pkt)};
%% Note that the decode is different depending on whether or not Id is
%% ?APP_ID_RELAY.
@@ -286,45 +389,39 @@ rc(N) ->
%% This error is returned when a request is received with an invalid
%% message length.
-errors(_, #diameter_packet{header = #diameter_header{length = Len},
+errors(_, #diameter_packet{header = #diameter_header{length = Len} = H,
bin = Bin,
errors = Es}
= Pkt)
when Len < 20;
0 /= Len rem 4;
8*Len /= bit_size(Bin) ->
+ ?LOG(invalid_message_length, {H, bit_size(Bin)}),
Pkt#diameter_packet{errors = [5015 | Es]};
%% DIAMETER_UNSUPPORTED_VERSION 5011
%% This error is returned when a request was received, whose version
%% number is unsupported.
-errors(_, #diameter_packet{header = #diameter_header{version = V},
+errors(_, #diameter_packet{header = #diameter_header{version = V} = H,
errors = Es}
= Pkt)
when V /= ?DIAMETER_VERSION ->
+ ?LOG(unsupported_version, H),
Pkt#diameter_packet{errors = [5011 | Es]};
-%% DIAMETER_INVALID_AVP_BITS 3009
-%% A request was received that included an AVP whose flag bits are
-%% set to an unrecognized value, or that is inconsistent with the
-%% AVP's definition.
-
-errors(_, #diameter_packet{errors = [Bs | Es]} = Pkt)
- when is_bitstring(Bs) -> %% from old code
- Pkt#diameter_packet{errors = [3009 | Es]};
-
%% DIAMETER_COMMAND_UNSUPPORTED 3001
%% The Request contained a Command-Code that the receiver did not
%% recognize or support. This MUST be used when a Diameter node
%% receives an experimental command that it does not understand.
-errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P},
+errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P} = H,
msg = M,
errors = Es}
= Pkt)
when ?APP_ID_RELAY /= Id, undefined == M; %% don't know the command
?APP_ID_RELAY == Id, not P -> %% command isn't proxiable
+ ?LOG(command_unsupported, H),
Pkt#diameter_packet{errors = [3001 | Es]};
%% DIAMETER_INVALID_HDR_BITS 3008
@@ -333,9 +430,11 @@ errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P},
%% inconsistent with the command code's definition.
errors(_, #diameter_packet{header = #diameter_header{is_request = true,
- is_error = true},
+ is_error = true}
+ = H,
errors = Es}
= Pkt) ->
+ ?LOG(invalid_hdr_bits, H),
Pkt#diameter_packet{errors = [3008 | Es]};
%% Green.
@@ -408,7 +507,7 @@ send_A({Caps, Pkt}, TPid, Dict0, _RecvData) -> %% unsupported application
#diameter_packet{errors = [RC|_]} = Pkt,
send_A(answer_message(RC, Caps, Dict0, Pkt),
TPid,
- Dict0,
+ {Dict0, Dict0},
Pkt,
[],
[]);
@@ -416,7 +515,7 @@ send_A({Caps, Pkt}, TPid, Dict0, _RecvData) -> %% unsupported application
send_A({Caps, Pkt, App, {T, EvalPktFs, EvalFs}}, TPid, Dict0, RecvData) ->
send_A(answer(T, Caps, Pkt, App, Dict0, RecvData),
TPid,
- Dict0,
+ {App#diameter_app.dictionary, Dict0},
Pkt,
EvalPktFs,
EvalFs);
@@ -426,14 +525,17 @@ send_A(_, _, _, _) ->
%% send_A/6
-send_A(T, TPid, Dict0, ReqPkt, EvalPktFs, EvalFs) ->
- reply(T, TPid, Dict0, EvalPktFs, ReqPkt),
+send_A(T, TPid, {AppDict, Dict0} = DictT0, ReqPkt, EvalPktFs, EvalFs) ->
+ {MsgDict, Pkt} = reply(T, TPid, DictT0, EvalPktFs, ReqPkt),
+ incr(send, Pkt, TPid, AppDict),
+ incr_rc(send, Pkt, TPid, {MsgDict, AppDict, Dict0}), %% count outgoing
+ send(TPid, Pkt),
lists:foreach(fun diameter_lib:eval/1, EvalFs).
%% answer/6
answer({reply, Ans}, _Caps, _Pkt, App, Dict0, _RecvData) ->
- {dict(App#diameter_app.dictionary, Dict0, Ans), Ans};
+ {msg_dict(App#diameter_app.dictionary, Dict0, Ans), Ans};
answer({call, Opts}, Caps, Pkt, App, Dict0, RecvData) ->
#diameter_caps{origin_host = {OH,_}}
@@ -456,27 +558,37 @@ answer({answer_message, RC} = T, Caps, Pkt, App, Dict0, _RecvData) ->
orelse ?ERROR({invalid_return, T, handle_request, App}),
answer_message(RC, Caps, Dict0, Pkt).
-%% dict/3
+%% msg_dict/3
+%%
+%% Return the dictionary defining the message grammar in question: the
+%% application dictionary or the common dictionary.
+
+msg_dict(AppDict, Dict0, [Msg])
+ when is_list(Msg);
+ is_tuple(Msg) ->
+ msg_dict(AppDict, Dict0, Msg);
-%% An incoming answer, not yet decoded.
-dict(Dict, Dict0, #diameter_packet{header
- = #diameter_header{is_request = false,
- is_error = E},
- msg = undefined}) ->
- if E -> Dict0; true -> Dict end;
+msg_dict(AppDict, Dict0, Msg) ->
+ choose(is_answer_message(Msg, Dict0), Dict0, AppDict).
-dict(Dict, Dict0, [Msg]) ->
- dict(Dict, Dict0, Msg);
+%% Incoming, not yet decoded.
+is_answer_message(#diameter_packet{header = #diameter_header{} = H,
+ msg = undefined},
+ Dict0) ->
+ is_answer_message([H], Dict0);
-dict(Dict, Dict0, #diameter_packet{msg = Msg}) ->
- dict(Dict, Dict0, Msg);
+is_answer_message(#diameter_packet{msg = Msg}, Dict0) ->
+ is_answer_message(Msg, Dict0);
-dict(Dict, Dict0, Msg) ->
- choose(is_answer_message(Msg, Dict0), Dict0, Dict).
+%% Message sent as a header/avps list.
+is_answer_message([#diameter_header{is_request = R, is_error = E} | _], _) ->
+ E andalso not R;
+%% Message sent as a tagged avp/value list.
is_answer_message([Name | _], _) ->
Name == 'answer-message';
+%% Message sent as a record.
is_answer_message(Rec, Dict) ->
try
'answer-message' == Dict:rec2msg(element(1,Rec))
@@ -491,7 +603,6 @@ answer_message(RC,
origin_realm = {OR,_}},
Dict0,
Pkt) ->
- ?LOG({error, RC}, Pkt),
{Dict0, answer_message(OH, OR, RC, Dict0, Pkt)}.
%% resend/7
@@ -525,7 +636,7 @@ resend(false,
Route = #diameter_avp{data = {Dict0, 'Route-Record', OH}},
Seq = diameter_session:sequence(Mask),
Hdr = Hdr0#diameter_header{hop_by_hop_id = Seq},
- Msg = [Hdr, Route | Avps],
+ Msg = [Hdr, Route | Avps], %% reordered at encode
resend(send_request(SvcName, App, Msg, Opts), Caps, Dict0, Pkt).
%% The incoming request is relayed with the addition of a
%% Route-Record. Note the requirement on the return from call/4 below,
@@ -547,7 +658,7 @@ resend(false,
%%
%% Relay a reply to a relayed request.
-%% Answer from the peer: reset the hop by hop identifier and send.
+%% Answer from the peer: reset the hop by hop identifier.
resend(#diameter_packet{bin = B}
= Pkt,
_Caps,
@@ -586,31 +697,31 @@ is_loop(Code, Vid, OH, Dict0, Avps) ->
%% reply/5
%% Local answer ...
-reply({Dict, Ans}, TPid, Dict0, Fs, ReqPkt) ->
- reply(Ans, Dict, TPid, Dict0, Fs, ReqPkt);
+reply({MsgDict, Ans}, TPid, {AppDict, Dict0}, Fs, ReqPkt) ->
+ local(Ans, TPid, {MsgDict, AppDict, Dict0}, Fs, ReqPkt);
%% ... or relayed.
-reply(#diameter_packet{} = Pkt, TPid, _Dict0, Fs, _ReqPkt) ->
+reply(#diameter_packet{} = Pkt, _TPid, {AppDict, Dict0}, Fs, _ReqPkt) ->
eval_packet(Pkt, Fs),
- send(TPid, Pkt).
+ {msg_dict(AppDict, Dict0, Pkt), Pkt}.
-%% reply/6
+%% local/5
%%
%% Send a locally originating reply.
%% Skip the setting of Result-Code and Failed-AVP's below. This is
%% undocumented and shouldn't be relied on.
-reply([Msg], Dict, TPid, Dict0, Fs, ReqPkt)
+local([Msg], TPid, DictT, Fs, ReqPkt)
when is_list(Msg);
is_tuple(Msg) ->
- reply(Msg, Dict, TPid, Dict0, Fs, ReqPkt#diameter_packet{errors = []});
+ local(Msg, TPid, DictT, Fs, ReqPkt#diameter_packet{errors = []});
-reply(Msg, Dict, TPid, Dict0, Fs, ReqPkt) ->
- Pkt = encode(Dict,
- reset(make_answer_packet(Msg, ReqPkt), Dict, Dict0),
+local(Msg, TPid, {MsgDict, AppDict, Dict0}, Fs, ReqPkt) ->
+ Pkt = encode({MsgDict, AppDict},
+ TPid,
+ reset(make_answer_packet(Msg, ReqPkt), MsgDict, Dict0),
Fs),
- incr(send, Pkt, Dict, TPid, Dict0), %% count outgoing result codes
- send(TPid, Pkt).
+ {MsgDict, Pkt}.
%% reset/3
@@ -883,8 +994,8 @@ answer_message(OH, OR, RC, Dict0, #diameter_packet{avps = Avps,
session_id(Code, Vid, Dict0, Avps)
when is_list(Avps) ->
try
- {value, #diameter_avp{data = D}} = find_avp(Code, Vid, Avps),
- [{'Session-Id', [Dict0:avp(decode, D, 'Session-Id')]}]
+ #diameter_avp{data = Bin} = find_avp(Code, Vid, Avps),
+ [{'Session-Id', [Dict0:avp(decode, Bin, 'Session-Id')]}]
catch
error: _ ->
[]
@@ -901,26 +1012,17 @@ failed_avp(_, [] = No) ->
%% find_avp/3
-find_avp(Code, Vid, Avps)
- when is_integer(Code), (undefined == Vid orelse is_integer(Vid)) ->
- find(fun(A) -> is_avp(Code, Vid, A) end, Avps).
+%% Grouped ...
+find_avp(Code, VId, [[#diameter_avp{code = Code, vendor_id = VId} | _] = As
+ | _]) ->
+ As;
-%% The final argument here could be a list of AVP's, depending on the case,
-%% but we're only searching at the top level.
-is_avp(Code, Vid, #diameter_avp{code = Code, vendor_id = Vid}) ->
- true;
-is_avp(_, _, _) ->
- false.
+%% ... or not.
+find_avp(Code, VId, [#diameter_avp{code = Code, vendor_id = VId} = A | _]) ->
+ A;
-find(_, []) ->
- false;
-find(Pred, [H|T]) ->
- case Pred(H) of
- true ->
- {value, H};
- false ->
- find(Pred, T)
- end.
+find_avp(Code, VId, [_ | Avps]) ->
+ find_avp(Code, VId, Avps).
%% 7. Error Handling
%%
@@ -974,35 +1076,79 @@ find(Pred, [H|T]) ->
%% code, the missing vendor id, and a zero filled payload of the minimum
%% required length for the omitted AVP will be added.
-%% incr/4
+%% incr_result/5
%%
%% Increment a stats counter for result codes in incoming and outgoing
%% answers.
+%% Message sent as a header/avps list.
+incr_result(send = Dir,
+ #diameter_packet{msg = [#diameter_header{} = H | _]}
+ = Pkt,
+ TPid,
+ DictT) ->
+ incr_res(Dir, Pkt#diameter_packet{header = H}, TPid, DictT);
+
%% Outgoing message as binary: don't count. (Sending binaries is only
%% partially supported.)
-incr(_, #diameter_packet{msg = undefined}, _, _, _) ->
- ok;
+incr_result(send, #diameter_packet{header = undefined = No}, _, _) ->
+ No;
-%% Incoming with decode errors.
-incr(recv = D, #diameter_packet{header = H, errors = [_|_]}, _, TPid, _) ->
- incr(TPid, {diameter_codec:msg_id(H), D, error});
+%% Incoming or outgoing. Outgoing with encode errors never gets here
+%% since encode fails.
+incr_result(Dir, Pkt, TPid, DictT) ->
+ incr_res(Dir, Pkt, TPid, DictT).
-%% Incoming without errors or outgoing. Outgoing with encode errors
-%% never gets here since encode fails.
-incr(Dir, Pkt, Dict, TPid, Dict0) ->
- #diameter_packet{header = #diameter_header{is_error = E}
- = Hdr,
- msg = Rec}
- = Pkt,
+incr_res(Dir,
+ #diameter_packet{header = #diameter_header{is_error = E}
+ = Hdr,
+ errors = Es}
+ = Pkt,
+ TPid,
+ DictT) ->
+ {MsgDict, AppDict, Dict0} = DictT,
+
+ Id = msg_id(Hdr, AppDict),
+ %% Could be {relay, 0}, in which case the R-bit is redundant since
+ %% only answers are being counted. Let it be however, so that the
+ %% same tuple is in both send/recv and result code counters.
- RC = int(get_avp_value(Dict, 'Result-Code', Rec)),
+ %% Count incoming decode errors.
+ recv /= Dir orelse [] == Es orelse incr_error(Dir, Id, TPid, AppDict),
- %% Exit on an improper Result-Code.
+ %% Exit on a missing result code.
+ T = rc_counter(MsgDict, Dir, Pkt),
+ T == false andalso ?LOGX(no_result_code, {MsgDict, Dir, Hdr}),
+ {Ctr, RC, Avp} = T,
+
+ %% Or on an inappropriate value.
is_result(RC, E, Dict0)
- orelse x({invalid_error_bit, RC}, answer, [Dir, Pkt]),
+ orelse ?LOGX(invalid_error_bit, {MsgDict, Dir, Hdr, Avp}),
+
+ incr(TPid, {Id, Dir, Ctr}),
+ Ctr.
+
+%% msg_id/2
+
+msg_id(#diameter_packet{header = H}, AppDict) ->
+ msg_id(H, AppDict);
+
+%% Only count on known keys so as not to be vulnerable to attack:
+%% there are 2^32 (application ids) * 2^24 (command codes) = 2^56
+%% pairs for an attacker to choose from.
+msg_id(Hdr, AppDict) ->
+ {Aid, Code, R} = Id = diameter_codec:msg_id(Hdr),
+ case AppDict:id() of
+ ?APP_ID_RELAY ->
+ {relay, R};
+ A ->
+ unknown(A /= Aid orelse '' == AppDict:msg_name(Code, 0 == R), Id)
+ end.
- irc(TPid, Hdr, Dir, rc_counter(Dict, Rec, RC)).
+unknown(true, {_, _, R}) ->
+ {unknown, R};
+unknown(false, Id) ->
+ Id.
%% No E-bit: can't be 3xxx.
is_result(RC, false, _Dict0) ->
@@ -1018,63 +1164,62 @@ is_result(RC, true, _) ->
orelse
5000 =< RC andalso RC < 6000.
-irc(_, _, _, undefined) ->
- false;
-
-irc(TPid, Hdr, Dir, Ctr) ->
- incr(TPid, {diameter_codec:msg_id(Hdr), Dir, Ctr}).
-
%% incr/2
incr(TPid, Counter) ->
diameter_stats:incr(Counter, TPid, 1).
-%% rc_counter/2
+%% rc_counter/3
%% RFC 3588, 7.6:
%%
%% All Diameter answer messages defined in vendor-specific
%% applications MUST include either one Result-Code AVP or one
%% Experimental-Result AVP.
-%%
-%% Maintain statistics assuming one or the other, not both, which is
-%% surely the intent of the RFC.
-rc_counter(Dict, Rec, undefined) ->
- rcc(get_avp_value(Dict, 'Experimental-Result', Rec));
-rc_counter(_, _, RC) ->
- {'Result-Code', RC}.
+rc_counter(Dict, Dir, #diameter_packet{header = H,
+ avps = As,
+ msg = Msg})
+ when Dir == recv; %% decoded incoming
+ Msg == undefined -> %% relayed outgoing
+ rc_counter(Dict, [H|As]);
+
+rc_counter(Dict, _, #diameter_packet{msg = Msg}) ->
+ rc_counter(Dict, Msg).
-%% Outgoing answers may be in any of the forms messages can be sent
-%% in. Incoming messages will be records. We're assuming here that the
-%% arity of the result code AVP's is 0 or 1.
+rc_counter(Dict, Msg) ->
+ rcc(get_result(Dict, Msg)).
-rcc([{_,_,N} = T | _])
+rcc(#diameter_avp{name = 'Result-Code' = Name, value = N} = A)
when is_integer(N) ->
- T;
-rcc({_,_,N} = T)
+ {{Name, N}, N, A};
+
+rcc(#diameter_avp{name = 'Result-Code' = Name, value = [N|_]} = A)
when is_integer(N) ->
- T;
-rcc(_) ->
- undefined.
+ {{Name, N}, N, A};
-%% Extract the first good looking integer. There's no guarantee
-%% that what we're looking for has arity 1.
-int([N|_])
+rcc(#diameter_avp{name = 'Experimental-Result', value = {_,_,N} = T} = A)
when is_integer(N) ->
- N;
-int(N)
+ {T, N, A};
+
+rcc(#diameter_avp{name = 'Experimental-Result', value = [{_,_,N} = T|_]} = A)
when is_integer(N) ->
- N;
-int(_) ->
- undefined.
+ {T, N, A};
--spec x(any(), atom(), list()) -> no_return().
+rcc(_) ->
+ false.
-%% Warn and exit request process on errors in an incoming answer.
-x(Reason, F, A) ->
- diameter_lib:warning_report(Reason, {?MODULE, F, A}),
- x(Reason).
+%% get_result/2
+
+get_result(Dict, Msg) ->
+ try
+ [throw(A) || N <- ['Result-Code', 'Experimental-Result'],
+ #diameter_avp{} = A <- [get_avp(Dict, N, Msg)]]
+ of
+ [] -> false
+ catch
+ #diameter_avp{} = A -> A
+ end.
x(T) ->
exit(T).
@@ -1135,10 +1280,9 @@ answer_rc(_, _, Sent) ->
send_R(SvcName, AppOrAlias, Msg, Opts, Caller) ->
case pick_peer(SvcName, AppOrAlias, Msg, Opts) of
- {{_,_,_} = Transport, Mask} ->
+ {Transport, Mask, SvcOpts} ->
+ diameter_codec:setopts(SvcOpts),
send_request(Transport, Mask, Msg, Opts, Caller, SvcName);
- false ->
- {error, no_connection};
{error, _} = No ->
No
end.
@@ -1200,6 +1344,8 @@ send_request({TPid, Caps, App}
SvcName,
[]).
+%% send_R/7
+
send_R({send, Msg}, Pkt, Transport, Opts, Caller, SvcName, Fs) ->
send_R(make_request_packet(Msg, Pkt),
Transport,
@@ -1302,6 +1448,21 @@ make_request_packet(#diameter_packet{header = Hdr} = Pkt,
make_request_packet(Msg, Pkt) ->
Pkt#diameter_packet{msg = Msg}.
+%% make_retransmit_packet/2
+
+make_retransmit_packet(#diameter_packet{msg = [#diameter_header{} = Hdr
+ | Avps]}
+ = Pkt) ->
+ Pkt#diameter_packet{msg = [make_retransmit_header(Hdr) | Avps]};
+
+make_retransmit_packet(#diameter_packet{header = Hdr} = Pkt) ->
+ Pkt#diameter_packet{header = make_retransmit_header(Hdr)}.
+
+%% make_retransmit_header/1
+
+make_retransmit_header(Hdr) ->
+ Hdr#diameter_header{is_retransmitted = true}.
+
%% fold_record/2
fold_record(undefined, R) ->
@@ -1312,12 +1473,12 @@ fold_record(Rec, R) ->
%% send_R/6
send_R(Pkt0,
- {TPid, Caps, #diameter_app{dictionary = Dict} = App},
+ {TPid, Caps, #diameter_app{dictionary = AppDict} = App},
Opts,
{Pid, Ref},
SvcName,
Fs) ->
- Pkt = encode(Dict, Pkt0, Fs),
+ Pkt = encode(AppDict, TPid, Pkt0, Fs),
#options{timeout = Timeout}
= Opts,
@@ -1330,6 +1491,7 @@ send_R(Pkt0,
packet = Pkt0},
try
+ incr(send, Pkt, TPid, AppDict),
TRef = send_request(TPid, Pkt, Req, SvcName, Timeout),
Pid ! Ref, %% tell caller a send has been attempted
handle_answer(SvcName,
@@ -1365,14 +1527,14 @@ handle_answer(SvcName, App, {error, Req, Reason}) ->
handle_error(App, Req, Reason, SvcName);
handle_answer(SvcName,
- #diameter_app{dictionary = Dict,
+ #diameter_app{dictionary = AppDict,
id = Id}
= App,
{answer, Req, Dict0, Pkt}) ->
- Mod = dict(Dict, Dict0, Pkt),
- handle_A(errors(Id, diameter_codec:decode(Mod, Pkt)),
+ MsgDict = msg_dict(AppDict, Dict0, Pkt),
+ handle_A(errors(Id, diameter_codec:decode({MsgDict, AppDict}, Pkt)),
SvcName,
- Mod,
+ MsgDict,
Dict0,
App,
Req).
@@ -1382,18 +1544,30 @@ handle_answer(SvcName,
%% want to examine the answer?
handle_A(Pkt, SvcName, Dict, Dict0, App, #request{transport = TPid} = Req) ->
+ AppDict = App#diameter_app.dictionary,
+
+ incr(recv, Pkt, TPid, AppDict),
+
try
- incr(recv, Pkt, Dict, TPid, Dict0) %% count incoming result codes
+ incr_result(recv, Pkt, TPid, {Dict, AppDict, Dict0}) %% count incoming
of
_ -> answer(Pkt, SvcName, App, Req)
catch
- exit: {invalid_error_bit, RC} ->
+ exit: {no_result_code, _} ->
+ %% RFC 6733 requires one of Result-Code or
+ %% Experimental-Result, but the decode will have detected
+ %% a missing AVP. If both are optional in the dictionary
+ %% then this isn't a decode error: just continue on.
+ answer(Pkt, SvcName, App, Req);
+ exit: {invalid_error_bit, {_, _, _, Avp}} ->
#diameter_packet{errors = Es}
= Pkt,
- E = {5004, #diameter_avp{name = 'Result-Code', value = RC}},
+ E = {5004, Avp},
answer(Pkt#diameter_packet{errors = [E|Es]}, SvcName, App, Req)
end.
+%% answer/4
+
answer(Pkt,
SvcName,
#diameter_app{module = ModX,
@@ -1413,11 +1587,16 @@ a(#diameter_packet{errors = Es}
callback == AE ->
cb(ModX, handle_answer, [Pkt, msg(P), SvcName, {TPid, Caps}]);
-a(Pkt, SvcName, _, report, Req) ->
- x(errors, handle_answer, [SvcName, Req, Pkt]);
+a(Pkt, SvcName, _, AE, _) ->
+ a(Pkt#diameter_packet.header, SvcName, AE).
-a(Pkt, SvcName, _, discard, Req) ->
- x({errors, handle_answer, [SvcName, Req, Pkt]}).
+a(Hdr, SvcName, report) ->
+ MFA = {?MODULE, handle_answer, [SvcName, Hdr]},
+ diameter_lib:warning_report(errors, MFA),
+ a(Hdr, SvcName, discard);
+
+a(Hdr, SvcName, discard) ->
+ x({answer_errors, {SvcName, Hdr}}).
%% Note that we don't check that the application id in the answer's
%% header is what we expect. (TODO: Does the rfc says anything about
@@ -1427,7 +1606,9 @@ a(Pkt, SvcName, _, discard, Req) ->
%% timer value is ignored. This means that an answer could be accepted
%% from a peer after timeout in the case of failover.
-retransmit({{_,_,App} = Transport, _Mask}, Req, Opts, SvcName, Timeout) ->
+%% retransmit/5
+
+retransmit({{_,_,App} = Transport, _, _}, Req, Opts, SvcName, Timeout) ->
try retransmit(Transport, Req, SvcName, Timeout) of
T -> recv_A(Timeout, SvcName, App, Opts, T)
catch
@@ -1448,17 +1629,26 @@ pick_peer(SvcName,
pick_peer(SvcName, App, Msg, Opts#options{extra = []});
pick_peer(_, _, undefined, _) ->
- false;
+ {error, no_connection};
pick_peer(SvcName,
AppOrAlias,
Msg,
#options{filter = Filter, extra = Xtra}) ->
- diameter_service:pick_peer(SvcName,
- AppOrAlias,
- {fun(D) -> get_destination(D, Msg) end,
- Filter,
- Xtra}).
+ pick(diameter_service:pick_peer(SvcName,
+ AppOrAlias,
+ {fun(D) -> get_destination(D, Msg) end,
+ Filter,
+ Xtra})).
+
+pick({{_,_,_} = Transport, Mask}) -> %% from old code; dialyzer complains
+ {Transport, Mask, []}; %% about this
+
+pick(false) ->
+ {error, no_connection};
+
+pick(T) ->
+ T.
%% handle_error/4
@@ -1475,10 +1665,10 @@ msg(#diameter_packet{msg = undefined, bin = Bin}) ->
msg(#diameter_packet{msg = Msg}) ->
Msg.
-%% encode/3
+%% encode/4
-encode(Dict, Pkt, Fs) ->
- P = encode(Dict, Pkt),
+encode(Dict, TPid, Pkt, Fs) ->
+ P = encode(Dict, TPid, Pkt),
eval_packet(P, Fs),
P.
@@ -1489,12 +1679,23 @@ encode(Dict, Pkt, Fs) ->
%% an encoded binary. This isn't the usual case and doesn't properly
%% support retransmission but is useful for test.
+encode(Dict, TPid, Pkt)
+ when is_atom(Dict) ->
+ encode({Dict, Dict}, TPid, Pkt);
+
%% A message to be encoded.
-encode(Dict, #diameter_packet{bin = undefined} = Pkt) ->
- diameter_codec:encode(Dict, Pkt);
+encode(DictT, TPid, #diameter_packet{bin = undefined} = Pkt) ->
+ {Dict, AppDict} = DictT,
+ try
+ diameter_codec:encode(Dict, Pkt)
+ catch
+ exit: {diameter_codec, encode, T} = Reason ->
+ incr_error(send, T, TPid, AppDict),
+ exit(Reason)
+ end;
%% An encoded binary: just send.
-encode(_, #diameter_packet{} = Pkt) ->
+encode(_, _, #diameter_packet{} = Pkt) ->
Pkt.
%% send_request/5
@@ -1517,12 +1718,25 @@ send_request(TPid, #diameter_packet{} = Pkt, Req, SvcName, Timeout) ->
%% send/1
-send({TPid, Pkt, #request{handler = Pid} = Req, SvcName, Timeout, TRef}) ->
- Ref = send_request(TPid,
- Pkt,
- Req#request{handler = self()},
- SvcName,
- Timeout),
+send({TPid, Pkt, #request{handler = Pid} = Req0, SvcName, Timeout, TRef}) ->
+ Seqs = diameter_codec:sequence_numbers(Pkt),
+ Req = Req0#request{handler = self()},
+ Ref = send_request(TPid, Pkt, Req, SvcName, Timeout),
+
+ try
+ recv(TPid, Pid, TRef, Ref)
+ after
+ %% Remove only the entry for this specific send since a resend
+ %% from the originating node can pick another transport on
+ %% this one.
+ ets:delete_object(?REQUEST_TABLE, {Seqs, Req, Ref})
+ end.
+
+%% recv/4
+%%
+%% Relay an answer from a remote node.
+
+recv(TPid, Pid, TRef, Ref) ->
receive
{answer, _, _, _, _} = A ->
Pid ! A;
@@ -1534,8 +1748,14 @@ send({TPid, Pkt, #request{handler = Pid} = Req, SvcName, Timeout, TRef}) ->
%% send/2
-send(Pid, Pkt) ->
- Pid ! {send, Pkt}.
+send(Pid, Pkt) -> %% Strip potentially large message terms.
+ #diameter_packet{header = H,
+ bin = Bin,
+ transport_data = T}
+ = Pkt,
+ Pid ! {send, #diameter_packet{header = H,
+ bin = Bin,
+ transport_data = T}}.
%% retransmit/4
@@ -1548,9 +1768,7 @@ retransmit({TPid, Caps, App}
have_request(Pkt0, TPid) %% Don't failover to a peer we've
andalso ?THROW(timeout), %% already sent to.
- #diameter_packet{header = Hdr0} = Pkt0,
- Hdr = Hdr0#diameter_header{is_retransmitted = true},
- Pkt = Pkt0#diameter_packet{header = Hdr},
+ Pkt = make_retransmit_packet(Pkt0),
retransmit(cb(App, prepare_retransmit, [Pkt, SvcName, {TPid, Caps}]),
Transport,
@@ -1586,18 +1804,19 @@ retransmit(T, {_, _, App}, _, _, _, _) ->
?ERROR({invalid_return, T, prepare_retransmit, App}).
resend_request(Pkt0,
- {TPid, Caps, #diameter_app{dictionary = Dict}},
+ {TPid, Caps, #diameter_app{dictionary = AppDict}},
Req0,
SvcName,
Tmo,
Fs) ->
- Pkt = encode(Dict, Pkt0, Fs),
+ Pkt = encode(AppDict, TPid, Pkt0, Fs),
Req = Req0#request{transport = TPid,
packet = Pkt0,
caps = Caps},
- ?LOG(retransmission, Req),
+ ?LOG(retransmission, Pkt#diameter_packet.header),
+ incr(TPid, {msg_id(Pkt, AppDict), send, retransmission}),
TRef = send_request(TPid, Pkt, Req, SvcName, Tmo),
{TRef, Req}.
@@ -1680,7 +1899,7 @@ str([]) ->
str(T) ->
T.
-%% get_avp_value/3
+%% get_avp/3
%%
%% Find an AVP in a message of one of three forms:
%%
@@ -1697,47 +1916,71 @@ str(T) ->
%% look for are in the common dictionary. This is required since the
%% relay dictionary doesn't inherit the common dictionary (which maybe
%% it should).
-get_avp_value(?RELAY, Name, Msg) ->
- get_avp_value(?BASE, Name, Msg);
+get_avp(?RELAY, Name, Msg) ->
+ get_avp(?BASE, Name, Msg);
-%% Message sent as a header/avps list, probably a relay case but not
-%% necessarily.
-get_avp_value(Dict, Name, [#diameter_header{} | Avps]) ->
+%% Message as a header/avps list.
+get_avp(Dict, Name, [#diameter_header{} | Avps]) ->
try
{Code, _, VId} = Dict:avp_header(Name),
- [A|_] = lists:dropwhile(fun(#diameter_avp{code = C, vendor_id = V}) ->
- C /= Code orelse V /= VId
- end,
- Avps),
- avp_decode(Dict, Name, A)
+ find_avp(Code, VId, Avps)
+ of
+ A ->
+ (avp_decode(Dict, Name, ungroup(A)))#diameter_avp{name = Name}
catch
error: _ ->
undefined
end;
%% Outgoing message as a name/values list.
-get_avp_value(_, Name, [_MsgName | Avps]) ->
+get_avp(_, Name, [_MsgName | Avps]) ->
case lists:keyfind(Name, 1, Avps) of
{_, V} ->
- V;
+ #diameter_avp{name = Name, value = V};
_ ->
undefined
end;
%% Message is typically a record but not necessarily.
-get_avp_value(Dict, Name, Rec) ->
+get_avp(Dict, Name, Rec) ->
try
- Dict:'#get-'(Name, Rec)
+ #diameter_avp{name = Name, value = Dict:'#get-'(Name, Rec)}
catch
error:_ ->
undefined
end.
+%% get_avp_value/3
+
+get_avp_value(Dict, Name, Msg) ->
+ case get_avp(Dict, Name, Msg) of
+ #diameter_avp{value = V} ->
+ V;
+ undefined = No ->
+ No
+ end.
+
+%% ungroup/1
+
+ungroup([Avp|_]) ->
+ Avp;
+ungroup(Avp) ->
+ Avp.
+
+%% avp_decode/3
+
avp_decode(Dict, Name, #diameter_avp{value = undefined,
- data = Bin}) ->
- Dict:avp(decode, Bin, Name);
-avp_decode(_, _, #diameter_avp{value = V}) ->
- V.
+ data = Bin}
+ = Avp) ->
+ try Dict:avp(decode, Bin, Name) of
+ V ->
+ Avp#diameter_avp{value = V}
+ catch
+ error:_ ->
+ Avp
+ end;
+avp_decode(_, _, #diameter_avp{} = Avp) ->
+ Avp.
cb(#diameter_app{module = [_|_] = M}, F, A) ->
eval(M, F, A);
diff --git a/lib/diameter/src/base/diameter_types.erl b/lib/diameter/src/base/diameter_types.erl
index ca3338be5f..87a0f0663d 100644
--- a/lib/diameter/src/base/diameter_types.erl
+++ b/lib/diameter/src/base/diameter_types.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -75,7 +75,7 @@
%% message indicating this error MUST include the offending AVPs
%% within a Failed-AVP AVP.
%%
--define(INVALID_LENGTH(Bin), erlang:error({'DIAMETER', 5014, Bin})).
+-define(INVALID_LENGTH(Bitstr), erlang:error({'DIAMETER', 5014, Bitstr})).
%% -------------------------------------------------------------------------
%% 3588, 4.2. Basic AVP Data Formats
@@ -90,7 +90,12 @@
'OctetString'(decode, Bin)
when is_binary(Bin) ->
- binary_to_list(Bin);
+ case diameter_codec:getopt(string_decode) of
+ true ->
+ binary_to_list(Bin);
+ false ->
+ Bin
+ end;
'OctetString'(decode, B) ->
?INVALID_LENGTH(B);
@@ -298,21 +303,29 @@
'OctetString'(M, lists:duplicate(0,7));
'DiameterURI'(encode, #diameter_uri{type = Type,
- fqdn = D,
- port = P,
+ fqdn = DN,
+ port = PN,
transport = T,
- protocol = Prot}
- = U) ->
- S = lists:append([atom_to_list(Type), "://", D,
- ":", integer_to_list(P),
+ protocol = P})
+ when (Type == 'aaa' orelse Type == 'aaas'),
+ is_integer(PN),
+ 0 =< PN,
+ (T == tcp orelse T == sctp orelse T == udp),
+ (P == diameter orelse P == radius orelse P == 'tacacs+'),
+ (P /= diameter orelse T /= udp) ->
+ iolist_to_binary([atom_to_list(Type), "://", DN,
+ ":", integer_to_list(PN),
";transport=", atom_to_list(T),
- ";protocol=", atom_to_list(Prot)]),
- U = scan_uri(S), %% assert
- list_to_binary(S);
+ ";protocol=", atom_to_list(P)]);
+%% Don't omit defaults since they're dependent on whether RFC 3588 or
+%% 6733 is being followed. For one, we don't know this at encode; for
+%% two (more importantly), we don't know how the peer will interpret
+%% defaults, so it's best to be explicit. Interpret defaults on decode
+%% since there's no choice.
'DiameterURI'(encode, Str) ->
Bin = iolist_to_binary(Str),
- #diameter_uri{} = scan_uri(Bin), %% type check
+ #diameter_uri{} = scan_uri(Bin), %% assert
Bin.
%% --------------------
@@ -321,7 +334,6 @@
'IPFilterRule'(encode = M, zero) ->
'OctetString'(M, lists:duplicate(0,33));
-%% TODO: parse grammar.
'IPFilterRule'(M, X) ->
'OctetString'(M, X).
@@ -331,7 +343,6 @@
'QoSFilterRule'(encode = M, zero = X) ->
'IPFilterRule'(M, X);
-%% TODO: parse grammar.
'QoSFilterRule'(M, X) ->
'OctetString'(M, X).
@@ -339,7 +350,13 @@
'UTF8String'(decode, Bin)
when is_binary(Bin) ->
- tl([0|_] = unicode:characters_to_list([0, Bin])); %% assert list return
+ case diameter_codec:getopt(string_decode) of
+ true ->
+ %% assert list return
+ tl([0|_] = unicode:characters_to_list([0, Bin]));
+ false ->
+ <<_/binary>> = unicode:characters_to_binary(Bin)
+ end;
'UTF8String'(decode, B) ->
?INVALID_LENGTH(B);
@@ -507,55 +524,90 @@ msb(false) -> ?TIME_2036.
%%
%% aaa-protocol = ( "diameter" / "radius" / "tacacs+" )
-scan_uri(Bin)
- when is_binary(Bin) ->
- scan_uri(binary_to_list(Bin));
-scan_uri("aaa://" ++ Rest) ->
- scan_fqdn(Rest, #diameter_uri{type = aaa});
-scan_uri("aaas://" ++ Rest) ->
- scan_fqdn(Rest, #diameter_uri{type = aaas}).
-
-scan_fqdn(S, U) ->
- {[_|_] = F, Rest} = lists:splitwith(fun is_fqdn/1, S),
- scan_opt_port(Rest, U#diameter_uri{fqdn = F}).
-
-scan_opt_port(":" ++ S, U) ->
- {[_|_] = P, Rest} = lists:splitwith(fun is_digit/1, S),
- scan_opt_transport(Rest, U#diameter_uri{port = list_to_integer(P)});
-scan_opt_port(S, U) ->
- scan_opt_transport(S, U).
-
-scan_opt_transport(";transport=" ++ S, U) ->
- {P, Rest} = transport(S),
- scan_opt_protocol(Rest, U#diameter_uri{transport = P});
-scan_opt_transport(S, U) ->
- scan_opt_protocol(S, U).
-
-scan_opt_protocol(";protocol=" ++ S, U) ->
- {P, ""} = protocol(S),
- U#diameter_uri{protocol = P};
-scan_opt_protocol("", U) ->
- U.
-
-transport("tcp" ++ S) ->
- {tcp, S};
-transport("sctp" ++ S) ->
- {sctp, S};
-transport("udp" ++ S) ->
- {udp, S}.
-
-protocol("diameter" ++ S) ->
- {diameter, S};
-protocol("radius" ++ S) ->
- {radius, S};
-protocol("tacacs+" ++ S) ->
- {'tacacs+', S}.
-
-is_fqdn(C) ->
- is_digit(C) orelse is_alpha(C) orelse C == $. orelse C == $-.
-
-is_alpha(C) ->
- ($a =< C andalso C =< $z) orelse ($A =< C andalso C =< $Z).
-
-is_digit(C) ->
- $0 =< C andalso C =< $9.
+%% RFC 6733, 4.3.1, changes the defaults:
+%%
+%% "aaa://" FQDN [ port ] [ transport ] [ protocol ]
+%%
+%% ; No transport security
+%%
+%% "aaas://" FQDN [ port ] [ transport ] [ protocol ]
+%%
+%% ; Transport security used
+%%
+%% FQDN = < Fully Qualified Domain Name >
+%%
+%% port = ":" 1*DIGIT
+%%
+%% ; One of the ports used to listen for
+%% ; incoming connections.
+%% ; If absent, the default Diameter port
+%% ; (3868) is assumed if no transport
+%% ; security is used and port 5658 when
+%% ; transport security (TLS/TCP and DTLS/SCTP)
+%% ; is used.
+%%
+%% transport = ";transport=" transport-protocol
+%%
+%% ; One of the transports used to listen
+%% ; for incoming connections. If absent,
+%% ; the default protocol is assumed to be TCP.
+%% ; UDP MUST NOT be used when the aaa-protocol
+%% ; field is set to diameter.
+%%
+%% transport-protocol = ( "tcp" / "sctp" / "udp" )
+%%
+%% protocol = ";protocol=" aaa-protocol
+%%
+%% ; If absent, the default AAA protocol
+%% ; is Diameter.
+%%
+%% aaa-protocol = ( "diameter" / "radius" / "tacacs+" )
+
+scan_uri(Bin) ->
+ RE = "^(aaas?)://"
+ "([-a-zA-Z0-9.]{1,255})"
+ "(:0{0,5}([0-9]{1,5}))?"
+ "(;transport=(tcp|sctp|udp))?"
+ "(;protocol=(diameter|radius|tacacs\\+))?$",
+ %% A port number is 16-bit, so an arbitrary number of digits is
+ %% just a vulnerability, but provide a little slack with leading
+ %% zeros in a port number just because the regexp was previously
+ %% [0-9]+ and it's not inconceivable that a value might be padded.
+ %% Don't fantasize about this padding being more than the number
+ %% of digits in the port number proper.
+ %%
+ %% Similarly, a FQDN can't be arbitrarily long: at most 255
+ %% octets.
+ {match, [A, DN, PN, T, P]} = re:run(Bin,
+ RE,
+ [{capture, [1,2,4,6,8], binary}]),
+ Type = to_atom(A),
+ {PN0, T0} = defaults(diameter_codec:getopt(rfc), Type),
+ PortNr = to_int(PN, PN0),
+ 0 = PortNr bsr 16, %% assert
+ #diameter_uri{type = Type,
+ fqdn = 'OctetString'(decode, DN),
+ port = PortNr,
+ transport = to_atom(T, T0),
+ protocol = to_atom(P, diameter)}.
+
+%% Choose defaults based on the RFC, since 6733 has changed them.
+defaults(3588, _) ->
+ {3868, sctp};
+defaults(6733, aaa) ->
+ {3868, tcp};
+defaults(6733, aaas) ->
+ {5658, tcp}.
+
+to_int(<<>>, N) ->
+ N;
+to_int(B, _) ->
+ binary_to_integer(B).
+
+to_atom(<<>>, A) ->
+ A;
+to_atom(B, _) ->
+ to_atom(B).
+
+to_atom(B) ->
+ binary_to_atom(B, latin1).
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 9a1c8b6585..de9c4bca33 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -49,8 +49,6 @@
-define(IS_NATURAL(N), (is_integer(N) andalso 0 =< N)).
--define(CHOOSE(B,T,F), if (B) -> T; true -> F end).
-
-record(config,
{suspect = 1 :: non_neg_integer(), %% OKAY -> SUSPECT
okay = 3 :: non_neg_integer()}). %% REOPEN -> OKAY
@@ -124,15 +122,18 @@ i({Ack, T, Pid, {RecvData,
= Svc}}) ->
erlang:monitor(process, Pid),
wait(Ack, Pid),
- random:seed(now()),
- putr(restart, {T, Opts, Svc}), %% save seeing it in trace
- putr(dwr, dwr(Caps)), %%
+ {_, Seed} = diameter_lib:seed(),
+ random:seed(Seed),
+ putr(restart, {T, Opts, Svc, SvcOpts}), %% save seeing it in trace
+ putr(dwr, dwr(Caps)), %%
{_,_} = Mask = proplists:get_value(sequence, SvcOpts),
Restrict = proplists:get_value(restrict_connections, SvcOpts),
Nodes = restrict_nodes(Restrict),
Dict0 = common_dictionary(Apps),
+ diameter_codec:setopts([{common_dictionary, Dict0},
+ {string_decode, false}]),
#watchdog{parent = Pid,
- transport = start(T, Opts, Mask, Nodes, Dict0, Svc),
+ transport = start(T, Opts, SvcOpts, Nodes, Dict0, Svc),
tw = proplists:get_value(watchdog_timer,
Opts,
?DEFAULT_TW_INIT),
@@ -157,8 +158,7 @@ wait(Ref, Pid) ->
config(Opts) ->
Config = proplists:get_value(watchdog_config, Opts, []),
- is_list(Config) orelse config_error({watchdog_config, Config}),
- lists:foldl(fun config/2, #config{}, Config). %% ^ added in old code
+ lists:foldl(fun config/2, #config{}, Config).
config({suspect, N}, Rec)
when ?IS_NATURAL(N) ->
@@ -166,16 +166,13 @@ config({suspect, N}, Rec)
config({okay, N}, Rec)
when ?IS_NATURAL(N) ->
- Rec#config{okay = N};
-
-config(T, _) -> %% added in old code
- config_error(T).
+ Rec#config{okay = N}.
-%% start/5
+%% start/6
-start(T, Opts, Mask, Nodes, Dict0, Svc) ->
+start(T, Opts, SvcOpts, Nodes, Dict0, Svc) ->
{_MRef, Pid}
- = diameter_peer_fsm:start(T, Opts, {Mask, Nodes, Dict0, Svc}),
+ = diameter_peer_fsm:start(T, Opts, {SvcOpts, Nodes, Dict0, Svc}),
Pid.
%% common_dictionary/1
@@ -225,7 +222,6 @@ dict0(_, _, Acc) ->
Acc.
config_error(T) ->
- diameter_lib:error_report(configuration_error, T),
exit({shutdown, {configuration_error, T}}).
%% handle_call/3
@@ -252,17 +248,6 @@ handle_info(T, #watchdog{} = State) ->
?LOG(stop, T),
event(T, State, State#watchdog{status = down}),
{stop, {shutdown, T}, State}
- end;
-
-handle_info(T, State) -> %% started in old code
- handle_info(T, upgrade(State)).
-
-upgrade(State) ->
- case erlang:append_element(State, #config{}) of
- #watchdog{status = okay, config = #config{suspect = OS}} = S ->
- S#watchdog{num_dwa = OS};
- #watchdog{} = S ->
- S
end.
close({'DOWN', _, process, TPid, {shutdown, Reason}},
@@ -273,11 +258,15 @@ close({'DOWN', _, process, TPid, {shutdown, Reason}},
close(_, _) ->
ok.
-event(_, #watchdog{status = T}, #watchdog{status = T}) ->
- ok;
-
-event(_, #watchdog{transport = undefined}, #watchdog{transport = undefined}) ->
+event(_,
+ #watchdog{status = From, transport = F},
+ #watchdog{status = To, transport = T})
+ when F == undefined, T == undefined; %% transport not started
+ From == initial, To == down; %% never really left INITIAL
+ From == To -> %% no state transition
ok;
+%% Note that there is no INITIAL -> DOWN transition in RFC 3539: ours
+%% is just a consequence of stop.
event(Msg,
#watchdog{status = From, transport = F, parent = Pid},
@@ -285,7 +274,7 @@ event(Msg,
TPid = tpid(F,T),
E = {[TPid | data(Msg, TPid, From, To)], From, To},
send(Pid, {watchdog, self(), E}),
- ?LOG(transition, {self(), E}).
+ ?LOG(transition, {From, To}).
data(Msg, TPid, reopen, okay) ->
{recv, TPid, 'DWA', _Pkt} = Msg, %% assert
@@ -328,14 +317,13 @@ code_change(_, State, _) ->
%% The state transitions documented here are extracted from RFC 3539,
%% the commentary is ours.
-%% Service or watchdog is telling the watchdog of an accepting
-%% transport to die after connect_timer expiry or reestablished
-%% connection (in another transport process) respectively.
-transition(close, #watchdog{status = down}) ->
- {{accept, _}, _, _} = getr(restart), %% assert
- stop;
+%% Service is telling the watchdog of an accepting transport to die
+%% following transport death in state INITIAL, or after connect_timer
+%% expiry; or another watchdog is saying the same after reestablishing
+%% a connection previously had by this one.
transition(close, #watchdog{}) ->
- ok;
+ {accept, _} = role(), %% assert
+ stop;
%% Service is asking for the peer to be taken down gracefully.
transition({shutdown, Pid, _}, #watchdog{parent = Pid,
@@ -347,6 +335,12 @@ transition({shutdown = T, Pid, Reason}, #watchdog{parent = Pid,
send(TPid, {T, self(), Reason}),
S#watchdog{shutdown = true};
+%% Transport is telling us that DPA has been sent in response to DPR,
+%% or that DPR has been explicitly sent: transport death should lead
+%% to ours.
+transition({'DPR', TPid}, #watchdog{transport = TPid} = S) ->
+ S#watchdog{shutdown = true};
+
%% Parent process has died,
transition({'DOWN', _, process, Pid, _Reason},
#watchdog{parent = Pid}) ->
@@ -378,7 +372,7 @@ transition({open, TPid, Hosts, _} = Open,
restrict = {_,R},
config = #config{suspect = OS}}
= S) ->
- case okay(getr(restart), Hosts, R) of
+ case okay(role(), Hosts, R) of
okay ->
set_watchdog(S#watchdog{status = okay,
num_dwa = OS});
@@ -418,18 +412,33 @@ transition({open = Key, TPid, _Hosts, T},
%% REOPEN Connection down CloseConnection()
%% SetWatchdog() DOWN
+%% Transport has died after DPA or service requested termination ...
transition({'DOWN', _, process, TPid, _Reason},
#watchdog{transport = TPid,
shutdown = true}) ->
stop;
-transition({'DOWN', _, process, TPid, _Reason},
+%% ... or not.
+transition({'DOWN', _, process, TPid, _Reason} = D,
#watchdog{transport = TPid,
- status = T}
- = S) ->
- set_watchdog(S#watchdog{status = ?CHOOSE(initial == T, T, down),
- pending = false,
- transport = undefined});
+ status = T,
+ restrict = {_,R}}
+ = S0) ->
+ S = S0#watchdog{pending = false,
+ transport = undefined},
+ {M,_} = role(),
+
+ %% Close an accepting watchdog immediately if there's no
+ %% restriction on the number of connections to the same peer: the
+ %% state machine never enters state REOPEN in this case.
+
+ if T == initial;
+ M == accept, not R ->
+ close(D, S0),
+ stop;
+ true ->
+ set_watchdog(S#watchdog{status = down})
+ end;
%% Incoming message.
transition({recv, TPid, Name, Pkt}, #watchdog{transport = TPid} = S) ->
@@ -469,9 +478,7 @@ encode(dwr = M, Dict0, Mask) ->
hop_by_hop_id = Seq},
Pkt = #diameter_packet{header = Hdr,
msg = Msg},
- #diameter_packet{bin = Bin} = diameter_codec:encode(Dict0, Pkt),
- Bin;
-
+ diameter_codec:encode(Dict0, Pkt);
encode(dwa, Dict0, #diameter_packet{header = H, transport_data = TD}
= ReqPkt) ->
@@ -486,7 +493,7 @@ encode(dwa, Dict0, #diameter_packet{header = H, transport_data = TD}
%% okay/3
-okay({{accept, Ref}, _, _}, Hosts, Restrict) ->
+okay({accept, Ref}, Hosts, Restrict) ->
T = {?MODULE, connection, Ref, Hosts},
diameter_reg:add(T),
if Restrict ->
@@ -497,7 +504,7 @@ okay({{accept, Ref}, _, _}, Hosts, Restrict) ->
%% Register before matching so that at least one of two registering
%% processes will match the other.
-okay({{connect, _}, _, _}, _, _) ->
+okay({connect, _}, _, _) ->
okay.
%% okay/2
@@ -512,6 +519,11 @@ okay(C) ->
[_|_] = [send(P, close) || {_,P} <- C, self() /= P],
reopen.
+%% role/0
+
+role() ->
+ element(1, getr(restart)).
+
%% set_watchdog/1
set_watchdog(#watchdog{tw = TwInit,
@@ -540,10 +552,14 @@ send_watchdog(#watchdog{pending = false,
dictionary = Dict0,
sequence = Mask}
= S) ->
- send(TPid, {send, encode(dwr, Dict0, Mask)}),
+ #diameter_packet{bin = Bin} = EPkt = encode(dwr, Dict0, Mask),
+ diameter_traffic:incr(send, EPkt, TPid, Dict0),
+ send(TPid, {send, Bin}),
?LOG(send, 'DWR'),
S#watchdog{pending = true}.
+%% Don't count encode errors since we don't expect any on DWR/DWA.
+
%% recv/3
recv(Name, Pkt, S) ->
@@ -560,16 +576,40 @@ recv(Name, Pkt, S) ->
rcv('DWR', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
- send(TPid, {send, encode(dwa, Dict0, Pkt)}),
+ ?LOG(recv, 'DWR'),
+ DPkt = diameter_codec:decode(Dict0, Pkt),
+ diameter_traffic:incr(recv, DPkt, TPid, Dict0),
+ diameter_traffic:incr_error(recv, DPkt, TPid, Dict0),
+ #diameter_packet{header = H,
+ transport_data = T,
+ bin = Bin}
+ = EPkt
+ = encode(dwa, Dict0, Pkt),
+ diameter_traffic:incr(send, EPkt, TPid, Dict0),
+ diameter_traffic:incr_rc(send, EPkt, TPid, Dict0),
+
+ %% Strip potentially large message terms.
+ send(TPid, {send, #diameter_packet{header = H,
+ transport_data = T,
+ bin = Bin}}),
?LOG(send, 'DWA');
+rcv('DWA', Pkt, #watchdog{transport = TPid,
+ dictionary = Dict0}) ->
+ ?LOG(recv, 'DWA'),
+ diameter_traffic:incr(recv, Pkt, TPid, Dict0),
+ diameter_traffic:incr_rc(recv,
+ diameter_codec:decode(Dict0, Pkt),
+ TPid,
+ Dict0);
+
rcv(N, _, _)
when N == 'CER';
N == 'CEA';
- N == 'DWA';
- N == 'DPR';
- N == 'DPA' ->
+ N == 'DPR' ->
false;
+%% DPR can be sent explicitly with diameter:call/4. Only the
+%% corresponding DPAs arrive here.
rcv(_, Pkt, #watchdog{transport = TPid,
dictionary = Dict0,
@@ -755,7 +795,7 @@ timeout(#watchdog{status = T} = S)
restart(#watchdog{transport = undefined} = S) ->
restart(getr(restart), S);
-restart(S) ->
+restart(S) -> %% reconnect has won race with timeout
S.
%% restart/2
@@ -770,25 +810,28 @@ restart(S) ->
%% state down rather then initial when receiving notification of an
%% open connection.
-restart({{connect, _} = T, Opts, Svc},
+restart({T, Opts, Svc}, S) -> %% put in old code
+ restart({T, Opts, Svc, []}, S);
+
+restart({{connect, _} = T, Opts, Svc, SvcOpts},
#watchdog{parent = Pid,
- sequence = Mask,
restrict = {R,_},
dictionary = Dict0}
= S) ->
send(Pid, {reconnect, self()}),
Nodes = restrict_nodes(R),
- S#watchdog{transport = start(T, Opts, Mask, Nodes, Dict0, Svc),
+ S#watchdog{transport = start(T, Opts, SvcOpts, Nodes, Dict0, Svc),
restrict = {R, lists:member(node(), Nodes)}};
%% No restriction on the number of connections to the same peer: just
%% die. Note that a state machine never enters state REOPEN in this
%% case.
-restart({{accept, _}, _, _}, #watchdog{restrict = {_, false}}) ->
- stop;
+restart({{accept, _}, _, _, _}, #watchdog{restrict = {_, false}}) ->
+ stop; %% 'DOWN' was in old code: 'close' was not sent
-%% Otherwise hang around until told to die.
-restart({{accept, _}, _, _}, S) ->
+%% Otherwise hang around until told to die, either by the service or
+%% by another watchdog.
+restart({{accept, _}, _, _, _}, S) ->
S.
%% Don't currently use Opts/Svc in the accept case.
diff --git a/lib/diameter/src/compiler/diameter_codegen.erl b/lib/diameter/src/compiler/diameter_codegen.erl
index 22422f2ef2..d91a776321 100644
--- a/lib/diameter/src/compiler/diameter_codegen.erl
+++ b/lib/diameter/src/compiler/diameter_codegen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,7 +31,8 @@
%% on the beam file of another dictionary.
%%
--export([from_dict/4]).
+-export([from_dict/4,
+ is_printable_ascii/1]). %% used by ?TERM/1 in diameter_forms.hrl
-include("diameter_forms.hrl").
-include("diameter_vsn.hrl").
@@ -121,6 +122,9 @@ eraser(Key) ->
%% ===========================================================================
%% ===========================================================================
+is_printable_ascii(C) ->
+ 16#20 =< C andalso C =< 16#7F.
+
get_value(Key, Plist) ->
proplists:get_value(Key, Plist, []).
@@ -128,7 +132,7 @@ gen(parse, ParseD, _Mod) ->
[?VERSION | ParseD];
gen(forms, ParseD, Mod) ->
- pp(erl_forms(Mod, ParseD));
+ preprocess(Mod, erl_forms(Mod, ParseD));
gen(hrl, ParseD, Mod) ->
gen_hrl(Mod, ParseD);
@@ -834,19 +838,19 @@ rec_name(Name, Prefix) ->
Prefix ++ Name.
%% ===========================================================================
-%% pp/1
+%% preprocess/2
%%
%% Preprocess forms as generated by 'forms' option. In particular,
%% replace the include_lib attributes in generated forms by the
%% corresponding forms, extracting the latter from an existing
%% dictionary (diameter_gen_relay). The resulting forms can be
%% compiled to beam using compile:forms/2 (which does no preprocessing
-%% or it's own; DiY currently appears to be the only way to preprocess
+%% of it's own; DiY currently appears to be the only way to preprocess
%% a forms list).
-pp(Forms) ->
+preprocess(Mod, Forms) ->
{_, Beam, _} = code:get_object_code(diameter_gen_relay),
- pp(Forms, abstract_code(Beam)).
+ pp(Forms, remod(Mod, abstract_code(Beam))).
pp(Forms, {ok, Code}) ->
Files = files(Code, []),
@@ -855,6 +859,25 @@ pp(Forms, {ok, Code}) ->
pp(Forms, {error, Reason}) ->
erlang:error({forms, Reason, Forms}).
+%% Replace literal diameter_gen_relay atoms in the extracted forms.
+%% ?MODULE for example.
+
+remod(Mod, L)
+ when is_list(L) ->
+ [remod(Mod, T) || T <- L];
+
+remod(Mod, {atom, _, diameter_gen_relay} = T) ->
+ setelement(3, T, Mod);
+
+remod(Mod, T)
+ when is_tuple(T) ->
+ list_to_tuple(remod(Mod, tuple_to_list(T)));
+
+remod(_, T) ->
+ T.
+
+%% Replace include_lib by the corresponding forms.
+
include({attribute, _, include_lib, Path}, Files) ->
Inc = filename:basename(Path),
[{Inc, Forms}] = [T || {F, _} = T <- Files, F == Inc], %% expect one
@@ -863,6 +886,8 @@ include({attribute, _, include_lib, Path}, Files) ->
include(T, _) ->
[T].
+%% Extract abstract code.
+
abstract_code(Beam) ->
case beam_lib:chunks(Beam, [abstract_code]) of
{ok, {_Mod, [{abstract_code, {_Vsn, Code}}]}} ->
@@ -873,6 +898,8 @@ abstract_code(Beam) ->
{E, Reason}
end.
+%% Extract filename/forms pairs for included forms.
+
files([{attribute, _, file, {Path, _}} | T], Acc) ->
{Body, Rest} = lists:splitwith(fun({attribute, _, file, _}) -> false;
(_) -> true
diff --git a/lib/diameter/src/compiler/diameter_dict_util.erl b/lib/diameter/src/compiler/diameter_dict_util.erl
index 3941f30e03..cf4741e563 100644
--- a/lib/diameter/src/compiler/diameter_dict_util.erl
+++ b/lib/diameter/src/compiler/diameter_dict_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -155,6 +155,8 @@ fmt(grouped_avp_has_wrong_type) ->
"Grouped AVP ~s at line ~p defined with type ~s at line ~p";
fmt(grouped_avp_not_defined) ->
"Grouped AVP ~s on line ~p not defined in @avp_types";
+fmt(grouped_avp_not_grouped) ->
+ "Grouped AVP ~s on line ~p not defined in @grouped";
fmt(grouped_vendor_id_without_flag) ->
"Grouped AVP ~s at line ~p has vendor id "
"but definition at line ~p does not specify V flag";
@@ -401,9 +403,9 @@ read(File) ->
{ok, iolist_to_binary([File])}.
make_dict(Parse, Opts) ->
- make_orddict(pass4(pass3(pass2(pass1(reset(make_dict(Parse),
- Opts))),
- Opts))).
+ Dict = pass3(pass2(pass1(reset(make_dict(Parse), Opts))), Opts),
+ ok = examine(Dict),
+ make_orddict(Dict).
%% make_orddict/1
@@ -729,8 +731,8 @@ no_messages_without_id(Dict) ->
%% explode/4
%%
-%% {avp_vendor_id, AvpName} -> [Lineno, Id::integer()]
-%% {custom_types|codecs|inherits, AvpName} -> [Lineno, Mod::string()]
+%% {avp_vendor_id, AvpName} -> [Lineno, Id::integer()]
+%% {custom|inherits, AvpName} -> [Lineno, Mod::string()]
explode({_, Line, AvpName}, Dict, {_, _, X} = T, K) ->
true = K /= avp_vendor_id orelse is_uint32(T, [K]),
@@ -1092,7 +1094,7 @@ explode_avps([{_, Line, Name} | Toks], Dict) ->
Vid = avp_vendor_id(Flags, Name, Line, Dict),
%% An AVP is uniquely defined by its AVP code and vendor id (if any).
- %% Ensure there are no duplicate.
+ %% Ensure there are no duplicates.
store_new({avp_types, {Code, Vid}},
[Line, Name],
Dict,
@@ -1168,7 +1170,7 @@ import_avps(Dict, Opts) ->
Import = inherit(Dict, Opts),
report(imported, Import),
- %% pass4/1 tests that all referenced AVP's are either defined
+ %% examine/1 tests that all referenced AVP's are either defined
%% or imported.
dict:store(import_avps,
@@ -1276,21 +1278,21 @@ dict(Mod) ->
end.
%% ===========================================================================
-%% pass4/1
+%% examine/1
%%
%% Sanity checks.
-pass4(Dict) ->
- dict:fold(fun(K, V, _) -> p4(K, V, Dict) end, ok, Dict),
- Dict.
+examine(Dict) ->
+ dict:fold(fun(K, V, _) -> x(K, V, Dict) end, ok, Dict),
+ ok.
%% Ensure enum AVP's have type Enumerated.
-p4({enum, Name}, [Line | _], Dict)
+x({enum, Name}, [Line | _], Dict)
when is_list(Name) ->
true = is_enumerated_avp(Name, Dict, Line);
%% Ensure all referenced AVP's are either defined locally or imported.
-p4({K, {Name, AvpName}}, [Line | _], Dict)
+x({K, {Name, AvpName}}, [Line | _], Dict)
when (K == grouped orelse K == messages),
is_list(Name),
is_list(AvpName),
@@ -1298,13 +1300,21 @@ p4({K, {Name, AvpName}}, [Line | _], Dict)
true = avp_is_defined(AvpName, Dict, Line);
%% Ditto.
-p4({K, AvpName}, [Line | _], Dict)
+x({K, AvpName}, [Line | _], Dict)
when K == avp_vendor_id;
- K == custom_types;
- K == codecs ->
+ K == custom ->
true = avp_is_defined(AvpName, Dict, Line);
-p4(_, _, _) ->
+%% Ensure that all local AVP's of type Grouped are also present in @grouped.
+x({avp_types, Name}, [Line | Toks], Dict)
+ when 0 < Line, is_list(Name) ->
+ [{number, _, _Code}, {word, _, Type}, {word, _, _Flags}] = Toks,
+ "Grouped" == Type
+ andalso error == dict:find({grouped, Name}, Dict)
+ andalso ?RETURN(grouped_avp_not_grouped, [Name, Line]),
+ ok;
+
+x(_, _, _) ->
ok.
%% has_enumerated_type/3
diff --git a/lib/diameter/src/compiler/diameter_forms.hrl b/lib/diameter/src/compiler/diameter_forms.hrl
index 9b14c1715a..dd03401b9e 100644
--- a/lib/diameter/src/compiler/diameter_forms.hrl
+++ b/lib/diameter/src/compiler/diameter_forms.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -57,4 +57,6 @@
-define(FIELDS(Fs), [{?record_field, ?ATOM(F), V} || {F,V} <- Fs]).
%% Literal term.
--define(TERM(T), erl_parse:abstract(T, ?LINE)).
+-define(TERM(T), erl_parse:abstract(T, [
+ {line, ?LINE},
+ {encoding, fun diameter_codegen:is_printable_ascii/1}])).
diff --git a/lib/diameter/src/compiler/diameter_make.erl b/lib/diameter/src/compiler/diameter_make.erl
index 2f314b7e57..72f5d36da4 100644
--- a/lib/diameter/src/compiler/diameter_make.erl
+++ b/lib/diameter/src/compiler/diameter_make.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,7 +33,8 @@
-export([codec/2,
codec/1,
format/1,
- flatten/1]).
+ flatten/1,
+ format_error/1]).
-export_type([opt/0]).
@@ -81,8 +82,8 @@ codec(File, Opts) ->
case parse(Dict, Opts) of
{ok, ParseD} ->
make(Path, default(Opts), ParseD);
- {error = E, Reason} ->
- {E, diameter_dict_util:format_error(Reason)}
+ {error, _} = E ->
+ E
end.
codec(File) ->
@@ -115,6 +116,11 @@ flatten([?VERSION = V | Dict]) ->
[grouped, import_groups],
[enum, import_enums]])].
+%% format_error/1
+
+format_error(T) ->
+ diameter_dict_util:format_error(T).
+
%% ===========================================================================
%% flatten/2
@@ -226,21 +232,29 @@ identify([Vsn | [T|_] = ParseD])
identify({path, File} = T) ->
{T, File};
identify(File) ->
- Bin = iolist_to_binary([File]),
- case is_path(Bin) of
+ case is_path([File]) of
true -> {{path, File}, File};
- false -> {Bin, ?DEFAULT_DICT_FILE}
+ false -> {File, ?DEFAULT_DICT_FILE}
end.
-%% Interpret anything containing \n or \r as a literal dictionary,
-%% otherwise a path. (Which might be the wrong guess in the worst case.)
-is_path(Bin) ->
- try
- [throw(C) || <<C>> <= Bin, $\n == C orelse $\r == C],
- true
- catch
- throw:_ -> false
- end.
+%% Interpret anything containing \n or \r as a literal dictionary.
+
+is_path([<<C,B/binary>> | T]) ->
+ is_path([C, B | T]);
+
+is_path([[C|L] | T]) ->
+ is_path([C, L | T]);
+
+is_path([C|_])
+ when $\n == C;
+ $\r == C ->
+ false;
+
+is_path([_|T]) ->
+ is_path(T);
+
+is_path([]) ->
+ true.
make(File, Opts, Dict) ->
ok(lists:foldl(fun(M,A) -> [make(File, Opts, Dict, M) | A] end,
diff --git a/lib/diameter/src/diameter.app.src b/lib/diameter/src/diameter.app.src
index ceefb9b398..ac1d847753 100644
--- a/lib/diameter/src/diameter.app.src
+++ b/lib/diameter/src/diameter.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,9 +20,27 @@
{application, diameter,
[{description, "Diameter protocol"},
{vsn, "%VSN%"},
- {modules, [%MODULES%]},
+ {modules, [
+ %MODULES%
+ %,%COMPILER%
+ %,%INFO%
+ ]},
{registered, [%REGISTERED%]},
- {applications, [stdlib, kernel]},
+ {applications, [
+ {stdlib, "2.0"}, {kernel, "3.0"}%, {erts, "6.0"}
+ %% {syntax-tools, "1.6.14"}
+ %% {runtime-tools, "1.8.14"}
+ %, {ssl, "5.3.4"}
+ ]},
{env, []},
- {mod, {diameter_app, []}}
+ {mod, {diameter_app, []}},
+ {runtime_dependencies, [
+ ]}
+ %%
+ %% Note that ssl is only required if configured on TCP transports,
+ %% and syntax-tools and runtime-tools are only required if the
+ %% dictionary compiler and debug modules (respectively) are
+ %% needed/wanted at runtime, which they typically aren't. These
+ %% modules are the two commented lines in the 'modules' tuple.
+ %%
]}.
diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src
index c7ae8a2828..b89859ed24 100644
--- a/lib/diameter/src/diameter.appup.src
+++ b/lib/diameter/src/diameter.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,62 +20,113 @@
{"%VSN%",
[
- {"0.9", [{restart_application, diameter}]}, %% R14B03
- {"0.10", [{restart_application, diameter}]}, %% R14B04
- {"1.0", [{restart_application, diameter}]}, %% R15B
- {"1.1", [{restart_application, diameter}]}, %% R15B01
- {"1.2", [{restart_application, diameter}]}, %% R15B02
- {"1.2.1", [{restart_application, diameter}]},
- {"1.3", [{restart_application, diameter}]}, %% R15B03
- {"1.3.1", [{restart_application, diameter}]},
- {"1.4", [{restart_application, diameter}]}, %% R16A
- {"1.4.1", [{restart_application, diameter}]}, %% R16B
+ {"0.9", [{restart_application, diameter}]}, %% R14B03
+ {"0.10", [{restart_application, diameter}]}, %% R14B04
+ {"1.0", [{restart_application, diameter}]}, %% R15B
+ {"1.1", [{restart_application, diameter}]}, %% R15B01
+ {"1.2", [{restart_application, diameter}]}, %% R15B02
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{restart_application, diameter}]}, %% R15B03
+ {"1.3.1", [{restart_application, diameter}]},
+ {"1.4", [{restart_application, diameter}]}, %% R16A
+ {"1.4.1", [{restart_application, diameter}]}, %% R16B
{"1.4.1.1", [{restart_application, diameter}]},
- {"1.4.2", [{load_module, diameter_codec}, %% R16B01
- {load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter_capx},
- {load_module, diameter_service},
- {load_module, diameter_peer_fsm},
- {load_module, diameter_watchdog},
- {load_module, diameter}]},
- {"1.4.3", [{load_module, diameter_capx}, %% R16B02
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_codec},
- {load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter}]},
- {"1.4.4", [{load_module, diameter_capx},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_config},
- {load_module, diameter}]}
+ {"1.4.2", [{restart_application, diameter}]}, %% R16B01
+ {"1.4.3", [{restart_application, diameter}]}, %% R16B02
+ {"1.4.4", [{restart_application, diameter}]},
+ {"1.5", [{restart_application, diameter}]}, %% R16B03
+ {"1.6", [{restart_application, diameter}]}, %% 17.0
+ {"1.7", [{restart_application, diameter}]}, %% 17.[12]
+ {<<"^1\\.(7\\.1|8)$">>, %% 17.[34]
+ [{load_module, diameter_lib},
+ {load_module, diameter_peer},
+ {load_module, diameter_reg},
+ {load_module, diameter_session},
+ {load_module, diameter_stats},
+ {load_module, diameter_sync},
+ {load_module, diameter_capx},
+ {load_module, diameter_codec},
+ {load_module, diameter_types},
+ {load_module, diameter_traffic},
+ {load_module, diameter_service},
+ {load_module, diameter_peer_fsm},
+ {load_module, diameter_watchdog},
+ {load_module, diameter_tcp},
+ {load_module, diameter_sctp},
+ {load_module, diameter_config},
+ {load_module, diameter},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_base_accounting},
+ {load_module, diameter_gen_relay},
+ {update, diameter_transport_sup, supervisor},
+ {update, diameter_service_sup, supervisor},
+ {update, diameter_sup, supervisor}]},
+ {"1.9", [{load_module, diameter_codec}, %% 17.5
+ {load_module, diameter_traffic},
+ {load_module, diameter_sctp},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_base_accounting},
+ {load_module, diameter_gen_relay}]},
+ {"1.9.1", [{load_module, diameter_traffic}, %% 17.5.3
+ {load_module, diameter_sctp}]}
],
[
- {"0.9", [{restart_application, diameter}]},
- {"0.10", [{restart_application, diameter}]},
- {"1.0", [{restart_application, diameter}]},
- {"1.1", [{restart_application, diameter}]},
- {"1.2", [{restart_application, diameter}]},
- {"1.2.1", [{restart_application, diameter}]},
- {"1.3", [{restart_application, diameter}]},
- {"1.3.1", [{restart_application, diameter}]},
- {"1.4", [{restart_application, diameter}]},
- {"1.4.1", [{restart_application, diameter}]},
+ {"0.9", [{restart_application, diameter}]},
+ {"0.10", [{restart_application, diameter}]},
+ {"1.0", [{restart_application, diameter}]},
+ {"1.1", [{restart_application, diameter}]},
+ {"1.2", [{restart_application, diameter}]},
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{restart_application, diameter}]},
+ {"1.3.1", [{restart_application, diameter}]},
+ {"1.4", [{restart_application, diameter}]},
+ {"1.4.1", [{restart_application, diameter}]},
{"1.4.1.1", [{restart_application, diameter}]},
- {"1.4.2", [{restart_application, diameter}]},
- {"1.4.3", [{load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter_codec},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_capx},
- {load_module, diameter}]},
- {"1.4.4", [{load_module, diameter_capx},
- {load_module, diameter_config},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter}]}
+ {"1.4.2", [{restart_application, diameter}]},
+ {"1.4.3", [{restart_application, diameter}]},
+ {"1.4.4", [{restart_application, diameter}]},
+ {"1.5", [{restart_application, diameter}]},
+ {"1.6", [{restart_application, diameter}]},
+ {"1.7", [{restart_application, diameter}]},
+ {<<"^1\\.(7\\.1|8)$">>,
+ [{update, diameter_sup, supervisor},
+ {update, diameter_service_sup, supervisor},
+ {update, diameter_transport_sup, supervisor},
+ {load_module, diameter_gen_relay},
+ {load_module, diameter_gen_base_accounting},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter},
+ {load_module, diameter_config},
+ {load_module, diameter_sctp},
+ {load_module, diameter_tcp},
+ {load_module, diameter_watchdog},
+ {load_module, diameter_peer_fsm},
+ {load_module, diameter_service},
+ {load_module, diameter_traffic},
+ {load_module, diameter_types},
+ {load_module, diameter_codec},
+ {load_module, diameter_capx},
+ {load_module, diameter_sync},
+ {load_module, diameter_stats},
+ {load_module, diameter_session},
+ {load_module, diameter_reg},
+ {load_module, diameter_peer},
+ {load_module, diameter_lib}]},
+ {"1.9", [{load_module, diameter_gen_relay},
+ {load_module, diameter_gen_base_accounting},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter_sctp},
+ {load_module, diameter_traffic},
+ {load_module, diameter_codec}]},
+ {"1.9.1", [{load_module, diameter_sctp},
+ {load_module, diameter_traffic}]}
]
}.
diff --git a/lib/diameter/src/base/diameter_dbg.erl b/lib/diameter/src/info/diameter_dbg.erl
index 5b0ac3a3b6..b536e5e80b 100644
--- a/lib/diameter/src/base/diameter_dbg.erl
+++ b/lib/diameter/src/info/diameter_dbg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,12 +17,15 @@
%% %CopyrightEnd%
%%
+%%
+%% Information and debug functions.
+%%
+
-module(diameter_dbg).
-export([table/1,
tables/0,
fields/1,
- help/0,
modules/0,
versions/0,
version_info/0,
@@ -30,7 +33,7 @@
procs/0,
latest/0,
nl/0,
- log/4]).
+ sizes/0]).
-export([diameter_config/0,
diameter_peer/0,
@@ -52,11 +55,9 @@
tp/1]).
-include_lib("diameter/include/diameter.hrl").
--include("diameter_internal.hrl").
-
--define(INFO, diameter_info).
--define(SEP(), ?INFO:sep()).
+-define(APP, diameter).
+-define(I, diameter_info).
-define(LOCAL, [diameter_config,
diameter_peer,
@@ -68,27 +69,25 @@
-define(VALUES(Rec), tl(tuple_to_list(Rec))).
-log(_Slogan, _Mod, _Line, _Details) ->
- ok.
-
-%%% ----------------------------------------------------------
-%%% # help()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # sizes/0
+%%
+%% Return sizes of named tables.
+%% ----------------------------------------------------------
-help() ->
- not_yet_implemented.
+sizes() ->
+ [{T, ets:info(T, size)} || T <- ?LOCAL, T /= diameter_peer].
-%%% ----------------------------------------------------------
-%%% # table(TableName)
-%%%
-%%% Input: TableName = diameter table containing record entries.
-%%%
-%%% Output: Count | undefined
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # table/1
+%%
+%% Pretty-print a diameter table. Returns the number of records
+%% printed, or undefined.
+%% ----------------------------------------------------------
table(T)
when (T == diameter_peer) orelse (T == diameter_reg) ->
- ?INFO:format(collect(T), fields(T), fun ?INFO:split/2);
+ ?I:format(collect(T), fields(T), fun ?I:split/2);
table(Table)
when is_atom(Table) ->
@@ -96,7 +95,7 @@ table(Table)
undefined = No ->
No;
Fields ->
- ?INFO:format(Table, Fields, fun split/2)
+ ?I:format(Table, Fields, fun split/2)
end.
split([started, name | Fs], [S, N | Vs]) ->
@@ -107,9 +106,9 @@ split([[F|FT]|Fs], [Rec|Vs]) ->
split([F|Fs], [V|Vs]) ->
{F, Fs, V, Vs}.
-%%% ----------------------------------------------------------
-%%% # TableName()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # TableName/0
+%% ----------------------------------------------------------
-define(TABLE(Name), Name() -> table(Name)).
@@ -121,16 +120,15 @@ split([F|Fs], [V|Vs]) ->
?TABLE(diameter_service).
?TABLE(diameter_stats).
-%%% ----------------------------------------------------------
-%%% # tables()
-%%%
-%%% Output: Number of records output.
-%%%
-%%% Description: Pretty-print records in diameter tables from all nodes.
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # tables/0
+%%
+%% Pretty-print diameter tables from all nodes. Returns the number of
+%% records printed.
+%% ----------------------------------------------------------
tables() ->
- ?INFO:format(field(?LOCAL), fun split/3, fun collect/1).
+ ?I:format(field(?LOCAL), fun split/3, fun collect/1).
field(Tables) ->
lists:map(fun(T) -> {T, fields(T)} end, lists:sort(Tables)).
@@ -138,66 +136,66 @@ field(Tables) ->
split(_, Fs, Vs) ->
split(Fs, Vs).
-%%% ----------------------------------------------------------
-%%% # modules()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # modules/0
+%% ----------------------------------------------------------
modules() ->
- Path = filename:join([appdir(), atom_to_list(?APPLICATION) ++ ".app"]),
- {ok, [{application, ?APPLICATION, Attrs}]} = file:consult(Path),
+ Path = filename:join([appdir(), atom_to_list(?APP) ++ ".app"]),
+ {ok, [{application, ?APP, Attrs}]} = file:consult(Path),
{modules, Mods} = lists:keyfind(modules, 1, Attrs),
Mods.
appdir() ->
- [_|_] = code:lib_dir(?APPLICATION, ebin).
+ [_|_] = code:lib_dir(?APP, ebin).
-%%% ----------------------------------------------------------
-%%% # versions()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # versions/0
+%% ----------------------------------------------------------
versions() ->
- ?INFO:versions(modules()).
+ ?I:versions(modules()).
-%%% ----------------------------------------------------------
-%%% # versions()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # version_info/0
+%% ----------------------------------------------------------
version_info() ->
- ?INFO:version_info(modules()).
+ ?I:version_info(modules()).
-%%% ----------------------------------------------------------
-%%% # compiled()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # compiled/0
+%% ----------------------------------------------------------
compiled() ->
- ?INFO:compiled(modules()).
+ ?I:compiled(modules()).
-%%% ----------------------------------------------------------
-%%% procs()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # procs/0
+%% ----------------------------------------------------------
procs() ->
- ?INFO:procs(?APPLICATION).
+ ?I:procs(?APP).
-%%% ----------------------------------------------------------
-%%% # latest()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # latest/0
+%% ----------------------------------------------------------
latest() ->
- ?INFO:latest(modules()).
+ ?I:latest(modules()).
-%%% ----------------------------------------------------------
-%%% # nl()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # nl/0
+%% ----------------------------------------------------------
nl() ->
lists:foreach(fun(M) -> abcast = c:nl(M) end, modules()).
-%%% ----------------------------------------------------------
-%%% # pp(Bin)
-%%%
-%%% Description: Pretty-print a message binary.
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # pp/1
+%%
+%% Description: Pretty-print a message binary.
+%% ----------------------------------------------------------
%% Network byte order = big endian.
@@ -207,7 +205,7 @@ pp(<<Version:8, MsgLength:24,
HbHid:32,
E2Eid:32,
AVPs/binary>>) ->
- ?SEP(),
+ ?I:sep(),
ppp(["Version",
"Message length",
"[Actual length]",
@@ -227,7 +225,7 @@ pp(<<Version:8, MsgLength:24,
HbHid,
E2Eid]),
N = avp_loop({AVPs, MsgLength - 20}, 0),
- ?SEP(),
+ ?I:sep(),
N;
pp(<<_Version:8, MsgLength:24, _/binary>> = Bin) ->
@@ -328,23 +326,23 @@ ppp(Fields, Values) ->
ppp({Field, Value}) ->
io:format(": ~-22s : ~p~n", [Field, Value]).
-%%% ----------------------------------------------------------
-%%% # subscriptions()
-%%%
-%%% Output: list of {SvcName, Pid}
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # subscriptions/0
+%%
+%% Returns a list of {SvcName, Pid}.
+%% ----------------------------------------------------------
subscriptions() ->
diameter_service:subscriptions().
-%%% ----------------------------------------------------------
-%%% # children()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # children/0
+%% ----------------------------------------------------------
children() ->
diameter_sup:tree().
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
%% tracer/[12]
@@ -430,7 +428,7 @@ peers(Name, Ts) ->
mk_peers(Name, [_, {type, connect} | _] = Ts) ->
[[Name | mk_peer(Ts)]];
-mk_peers(Name, [R, {type, listen}, O, {accept = A, As}]) ->
+mk_peers(Name, [R, {type, listen}, O, {accept = A, As} | _]) ->
[[Name | mk_peer([R, {type, A}, O | Ts])] || Ts <- As].
%% This is a bit lame: service_info works to build this list and out
%% of something like what we want here and then we take it apart.
@@ -485,13 +483,12 @@ fields(diameter_service) ->
[started,
name,
record_info(fields, diameter_service),
+ watchdogT,
peerT,
- connT,
- share_peers,
- use_shared_peers,
shared_peers,
local_peers,
- monitor];
+ monitor,
+ options];
?FIELDS(diameter_event);
?FIELDS(diameter_uri);
diff --git a/lib/diameter/src/base/diameter_info.erl b/lib/diameter/src/info/diameter_info.erl
index 39d32d07cd..10972f3231 100644
--- a/lib/diameter/src/base/diameter_info.erl
+++ b/lib/diameter/src/info/diameter_info.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,6 +17,11 @@
%% %CopyrightEnd%
%%
+%%
+%% Generic functions for formatting table listings and more. Used by
+%% diameter_dbg.
+%%
+
-module(diameter_info).
-export([usage/1,
@@ -573,12 +578,7 @@ sys_info() ->
{A,V}.
os_info() ->
- {os:version(), case os:type() of
- {_Fam, _Name} = T ->
- T;
- Fam ->
- {Fam, ""}
- end}.
+ {os:version(), os:type()}.
chomp(S) ->
string:strip(S, right, $\n).
diff --git a/lib/diameter/src/modules.mk b/lib/diameter/src/modules.mk
index f8d3cf1d6f..c9dd4e683a 100644
--- a/lib/diameter/src/modules.mk
+++ b/lib/diameter/src/modules.mk
@@ -1,8 +1,7 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -64,16 +63,19 @@ RT_MODULES = \
transport/diameter_transport \
transport/diameter_transport_sup
-# Handwritten (compile time) modules not included in the app file.
+# Handwritten compiler modules not included in the app file.
CT_MODULES = \
- base/diameter_dbg \
- base/diameter_info \
compiler/diameter_codegen \
compiler/diameter_exprecs \
compiler/diameter_dict_scanner \
compiler/diameter_dict_util \
compiler/diameter_make
+# Info/debug modules, also not included in the app file.
+INFO_MODULES = \
+ info/diameter_dbg \
+ info/diameter_info
+
# Released hrl files in ../include intended for public consumption.
EXTERNAL_HRLS = \
diameter.hrl \
@@ -92,7 +94,7 @@ BINS = \
# Released files relative to ../examples.
EXAMPLES = \
code/GNUmakefile \
- code/peer.erl \
+ code/node.erl \
code/client.erl \
code/client_cb.erl \
code/server.erl \
diff --git a/lib/diameter/src/transport/diameter_sctp.erl b/lib/diameter/src/transport/diameter_sctp.erl
index 49a530b4eb..f80de0a816 100644
--- a/lib/diameter/src/transport/diameter_sctp.erl
+++ b/lib/diameter/src/transport/diameter_sctp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,9 +18,11 @@
%%
-module(diameter_sctp).
-
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
%% interface
-export([start/3]).
@@ -37,7 +39,8 @@
code_change/3,
terminate/2]).
--export([info/1]). %% service_info callback
+-export([listener/1,%% diameter_sync callback
+ info/1]). %% service_info callback
-export([ports/0,
ports/1]).
@@ -70,14 +73,14 @@
-type connect_option() :: {raddr, inet:ip_address()}
| {rport, inet:port_number()}
- | gen_sctp:open_option().
+ | term(). %% gen_sctp:open_option().
-type match() :: inet:ip_address()
| string()
| [match()].
-type listen_option() :: {accept, match()}
- | gen_sctp:open_option().
+ | term(). %% gen_sctp:open_option().
-type uint() :: non_neg_integer().
@@ -99,22 +102,31 @@
-record(listener,
{ref :: reference(),
socket :: gen_sctp:sctp_socket(),
- count = 0 :: uint(),
+ count = 0 :: uint(), %% attached transport processes
tmap = ets:new(?MODULE, []) :: ets:tid(),
%% {MRef, Pid|AssocId}, {AssocId, Pid}
pending = {0, ets:new(?MODULE, [ordered_set])},
tref :: reference(),
accept :: [match()]}).
%% Field tmap is used to map an incoming message or event to the
-%% relevent transport process. Field pending implements a queue of
-%% transport processes to which an association has been assigned (at
-%% comm_up and written into tmap) but for which diameter hasn't yet
-%% spawned a transport process: a short-lived state of affairs as a
-%% new transport is spawned as a consequence of a peer being taken up,
-%% transport processes being spawned by the listener on demand. In
-%% case diameter starts a transport before comm_up on a new
-%% association, pending is set to an improper list with the spawned
-%% transport as head and the queue as tail.
+%% relevant transport process. Field pending implements two queues:
+%% the first of transport-to-be processes to which an association has
+%% been assigned (at comm_up and written into tmap) but for which
+%% diameter hasn't yet spawned a transport process, a short-lived
+%% state of affairs as a new transport is spawned as a consequence of
+%% a peer being taken up, transport processes being spawned by the
+%% listener on demand; the second of started transport processes that
+%% have not yet been assigned an association.
+%%
+%% When diameter calls start/3, the transport process is either taken
+%% from the first queue or spawned and placed in the second queue
+%% until an association is established. When an association is
+%% established, a controlling process is either taken from the second
+%% queue or spawned and placed in the first queue. Thus, there are
+%% only elements in one queue at a time, so share an ets table queue
+%% and tag it with a positive length if it contains the first queue, a
+%% negative length if it contains the second queue. The case -1 is
+%% handled differently for backwards compatibility reasons.
%% ---------------------------------------------------------------------------
%% # start/3
@@ -139,9 +151,9 @@ ip(T) ->
T.
%% A listener spawns transports either as a consequence of this call
-%% when there is not yet an association to associate with it, or at
-%% comm_up on a new association in which case the call retrieves a
-%% transport from the pending queue.
+%% when there is not yet an association to assign it, or at comm_up on
+%% a new association in which case the call retrieves a transport from
+%% the pending queue.
s({accept, Ref} = A, Addrs, Opts) ->
{LPid, LAs} = listener(Ref, {Opts, Addrs}),
try gen_server:call(LPid, {A, self()}, infinity) of
@@ -171,18 +183,33 @@ start_link(T) ->
info({gen_sctp, Sock}) ->
lists:flatmap(fun(K) -> info(K, Sock) end,
- [{socket, sockname},
- {peer, peername},
+ [{socket, socknames},
+ {peer, peernames},
{statistics, getstat}]).
info({K,F}, Sock) ->
case inet:F(Sock) of
{ok, V} ->
- [{K,V}];
+ [{K, map(F,V)}];
_ ->
[]
end.
+%% inet:{sock,peer}names/1 returns [{Addr, Port}] but the port number
+%% should be the same in each tuple. Map to a {[Addr], Port} tuple if
+%% so.
+map(K, [{_, Port} | _] = APs)
+ when K == socknames;
+ K == peernames ->
+ try [A || {A,P} <- APs, P == Port orelse throw(?MODULE)] of
+ As -> {As, Port}
+ catch
+ ?MODULE -> APs
+ end;
+
+map(_, V) ->
+ V.
+
%% ---------------------------------------------------------------------------
%% # init/1
%% ---------------------------------------------------------------------------
@@ -196,9 +223,9 @@ init(T) ->
i({listen, Ref, {Opts, Addrs}}) ->
{[Matches], Rest} = proplists:split(Opts, [accept]),
{LAs, Sock} = AS = open(Addrs, Rest, ?DEFAULT_PORT),
- proc_lib:init_ack({ok, self(), LAs}),
ok = gen_sctp:listen(Sock, true),
true = diameter_reg:add_new({?MODULE, listener, {Ref, AS}}),
+ proc_lib:init_ack({ok, self(), LAs}),
start_timer(#listener{ref = Ref,
socket = Sock,
accept = accept(Matches)});
@@ -211,7 +238,7 @@ i({connect, Pid, Opts, Addrs, Ref}) ->
{LAs, Sock} = open(Addrs, Rest, 0),
putr(?REF_KEY, Ref),
proc_lib:init_ack({ok, self(), LAs}),
- erlang:monitor(process, Pid),
+ monitor(process, Pid),
#transport{parent = Pid,
mode = {connect, connect(Sock, RAs, RP, [])},
socket = Sock};
@@ -221,8 +248,8 @@ i({accept, Pid, LPid, Sock, Ref})
when is_pid(Pid) ->
putr(?REF_KEY, Ref),
proc_lib:init_ack({ok, self()}),
- erlang:monitor(process, Pid),
- erlang:monitor(process, LPid),
+ monitor(process, Pid),
+ monitor(process, LPid),
#transport{parent = Pid,
mode = {accept, LPid},
socket = Sock};
@@ -231,7 +258,7 @@ i({accept, Pid, LPid, Sock, Ref})
i({accept, Ref, LPid, Sock, Id}) ->
putr(?REF_KEY, Ref),
proc_lib:init_ack({ok, self()}),
- MRef = erlang:monitor(process, LPid),
+ MRef = monitor(process, LPid),
%% Wait for a signal that the transport has been started before
%% processing other messages.
receive
@@ -255,15 +282,23 @@ close(Sock, Id) ->
%% listener/2
+%% Accepting processes can be started concurrently: ensure only one
+%% listener is started.
listener(LRef, T) ->
+ diameter_sync:call({?MODULE, listener, LRef},
+ {?MODULE, listener, [{LRef, T}]},
+ infinity,
+ infinity).
+
+listener({LRef, T}) ->
l(diameter_reg:match({?MODULE, listener, {LRef, '_'}}), LRef, T).
-%% Existing process with the listening socket ...
+%% Existing listening process ...
l([{{?MODULE, listener, {_, AS}}, LPid}], _, _) ->
- {LAs, _Sock} = AS,
- {LPid, LAs};
-
-%% ... or not: start one.
+ {LAs, _Sock} = AS,
+ {LPid, LAs};
+
+%% ... or not.
l([], LRef, T) ->
{ok, LPid, LAs} = diameter_sctp_sup:start_child({listen, LRef, T}),
{LPid, LAs}.
@@ -332,14 +367,17 @@ type(T) ->
%% # handle_call/3
%% ---------------------------------------------------------------------------
+handle_call(T, From, #listener{pending = L} = S)
+ when is_list(L) ->
+ handle_call(T, From, upgrade(S));
+
handle_call({{accept, Ref}, Pid}, _, #listener{ref = Ref,
- count = N}
+ pending = {N,Q},
+ count = K}
= S) ->
- {TPid, NewS} = accept(Ref, Pid, S),
- {reply, {ok, TPid}, NewS#listener{count = N+1}};
-
-handle_call(T, From, {listener,_,_,_,_,_,_} = S) -> % started in old code
- handle_call(T, From, upgrade(S));
+ TPid = accept(Ref, Pid, S),
+ {reply, {ok, TPid}, downgrade(S#listener{pending = {N-1,Q},
+ count = K+1})};
handle_call(_, _, State) ->
{reply, nok, State}.
@@ -358,11 +396,46 @@ handle_cast(_, State) ->
handle_info(T, #transport{} = S) ->
{noreply, #transport{} = t(T,S)};
+handle_info(T, #listener{pending = L} = S)
+ when is_list(L) ->
+ handle_info(T, upgrade(S));
+
handle_info(T, #listener{} = S) ->
- {noreply, #listener{} = l(T,S)};
+ {noreply, downgrade(#listener{} = l(T,S))}.
+
+%% upgrade/1
+
+upgrade(#listener{pending = [TPid | {0,Q}]} = S) ->
+ ets:insert(Q, {TPid, now()}),
+ S#listener{pending = {-1,Q}}.
+%% Prior to the possiblity of setting pool_size on in transport
+%% configuration, a new accepting transport was only started following
+%% the death of a predecessor, so that there was only at most one
+%% previously started transport process waiting for an association.
+%% This assumption no longer holds with pool_size > 1, in which case
+%% several accepting transports are started concurrently. Deal with
+%% this by placing the started transports in a new queue of transport
+%% processes waiting for an association.
+%%
+%% Since only one of this queue and the existing queue of controlling
+%% processes waiting for a transport to be started can be non-empty at
+%% any given time, implement both queues in the same ets table. The
+%% absolute value of the first element of the 2-tuple is the queue
+%% length, the sign says which queue it is.
+
+%% downgrade/1
+%%
+%% Revert to the pre-pool_size representation when possible, for
+%% backwards compatibility in the case that the pool_size option
+%% hasn't been used.
+
+downgrade(#listener{pending = {-1,Q}} = S) ->
+ TPid = ets:first(Q),
+ ets:delete(Q, TPid),
+ S#listener{pending = [TPid | {0,Q}]};
-handle_info(T, {listener,_,_,_,_,_,_} = S) -> % started in old code
- handle_info(T, upgrade(S)).
+downgrade(S) ->
+ S.
%% ---------------------------------------------------------------------------
%% # code_change/3
@@ -396,9 +469,6 @@ terminate(_, #listener{socket = Sock}) ->
%% ---------------------------------------------------------------------------
-upgrade(S) ->
- #listener{} = erlang:append_element(S, ?DEFAULT_ACCEPT).
-
putr(Key, Val) ->
put({?MODULE, Key}, Val).
@@ -430,54 +500,46 @@ l({sctp, Sock, _RA, _RP, Data} = Msg, #listener{socket = Sock} = S) ->
setopts(Sock)
end;
-%% Transport is asking message to be sent. See send/3 for why the send
-%% isn't directly from the transport.
-l({send, AssocId, StreamId, Bin}, #listener{socket = Sock} = S) ->
- send(Sock, AssocId, StreamId, Bin),
- S;
+l({'DOWN', MRef, process, TPid, _}, #listener{pending = {_,Q}} = S) ->
+ down(ets:member(Q, TPid), MRef, TPid, S);
+
+%% Timeout after the last accepting process has died.
+l({timeout, TRef, close = T}, #listener{tref = TRef,
+ count = 0}) ->
+ x(T);
+l({timeout, _, close}, #listener{} = S) ->
+ S.
+
+%% down/4
%% Accepting transport has died. One that's awaiting an association ...
-l({'DOWN', MRef, process, TPid, _}, #listener{pending = [TPid | Q],
- tmap = T,
- count = N}
- = S) ->
+down(true, MRef, TPid, #listener{pending = {N,Q},
+ tmap = T,
+ count = K}
+ = S)
+ when N < 0 ->
+ ets:delete(Q, TPid),
ets:delete(T, MRef),
ets:delete(T, TPid),
- start_timer(S#listener{count = N-1,
- pending = Q});
-
-%% ... ditto and a new transport has already been started ...
-l({'DOWN', _, process, _, _} = T, #listener{pending = [TPid | Q]}
- = S) ->
- #listener{pending = NQ}
- = NewS
- = l(T, S#listener{pending = Q}),
- NewS#listener{pending = [TPid | NQ]};
-
-%% ... or not.
-l({'DOWN', MRef, process, TPid, _}, #listener{socket = Sock,
- tmap = T,
- count = N,
- pending = {P,Q}}
- = S) ->
+ start_timer(S#listener{count = K-1,
+ pending = {N+1,Q}});
+
+%% ... or one that already has one.
+down(B, MRef, TPid, #listener{socket = Sock,
+ tmap = T,
+ count = K,
+ pending = {N,Q}}
+ = S) ->
[{MRef, Id}] = ets:lookup(T, MRef), %% Id = TPid | AssocId
ets:delete(T, MRef),
ets:delete(T, Id),
Id == TPid orelse close(Sock, Id),
- case ets:lookup(Q, TPid) of
- [{TPid, _}] -> %% transport in the pending queue ...
+ if B -> %% Waiting for attachment in the pending queue ...
ets:delete(Q, TPid),
- S#listener{pending = {P-1, Q}};
- [] -> %% ... or not
- start_timer(S#listener{count = N-1})
- end;
-
-%% Timeout after the last accepting process has died.
-l({timeout, TRef, close = T}, #listener{tref = TRef,
- count = 0}) ->
- x(T);
-l({timeout, _, close}, #listener{} = S) ->
- S.
+ S#listener{pending = {N-1,Q}};
+ true -> %% ... or already attached
+ start_timer(S#listener{count = K-1})
+ end.
%% t/2
%%
@@ -502,8 +564,6 @@ transition({peeloff, Sock, {sctp, LSock, _RA, _RP, _Data} = Msg, Matches},
= S) ->
ok = accept_peer(Sock, Matches),
transition(Msg, S#transport{socket = Sock});
-transition({peeloff = T, _Sock, _Msg} = T, #transport{} = S) ->% from old code
- transition(erlang:append_element(T, ?DEFAULT_ACCEPT), S);
%% Incoming message.
transition({sctp, _Sock, _RA, _RP, Data}, #transport{socket = Sock} = S) ->
@@ -560,7 +620,7 @@ accept_peer(_, []) ->
ok;
accept_peer(Sock, Matches) ->
- {RAddrs, _} = ok(inet:peername(Sock)),
+ RAddrs = [A || {A,_} <- ok(inet:peernames(Sock))],
diameter_peer:match(RAddrs, Matches)
orelse x({accept, RAddrs, Matches}),
ok.
@@ -578,38 +638,37 @@ accept(Opts) ->
%% No pending associations: spawn a new transport.
accept(Ref, Pid, #listener{socket = Sock,
tmap = T,
- pending = {0,_} = Q}
- = S) ->
+ pending = {N,Q}})
+ when N =< 0 ->
Arg = {accept, Pid, self(), Sock, Ref},
{ok, TPid} = diameter_sctp_sup:start_child(Arg),
- MRef = erlang:monitor(process, TPid),
+ MRef = monitor(process, TPid),
ets:insert(T, [{MRef, TPid}, {TPid, MRef}]),
- {TPid, S#listener{pending = [TPid | Q]}};
-%% Placing the transport in the pending field makes it available to
-%% the next association. The stack starts a new accepting transport
-%% only after this one brings the connection up (or dies).
-
-%% Accepting transport has died. This can happen if a new transport is
-%% started before the DOWN has arrived.
-accept(Ref, Pid, #listener{pending = [TPid | {0,_} = Q]} = S) ->
- false = is_process_alive(TPid), %% assert
- accept(Ref, Pid, S#listener{pending = Q});
+ ets:insert(Q, {TPid, now()}),
+ TPid;
+%% Placing the transport in the second pending table makes it
+%% available to the next association.
%% Pending associations: attach to the first in the queue.
-accept(_, Pid, #listener{ref = Ref, pending = {N,Q}} = S) ->
+accept(_, Pid, #listener{ref = Ref,
+ pending = {_,Q}}) ->
TPid = ets:first(Q),
TPid ! {Ref, Pid},
ets:delete(Q, TPid),
- {TPid, S#listener{pending = {N-1, Q}}}.
+ TPid.
%% send/2
%% Outbound Diameter message on a specified stream ...
-send(#diameter_packet{bin = Bin, transport_data = {stream, SId}}, S) ->
- send(SId, Bin, S),
+send(#diameter_packet{bin = Bin, transport_data = {outstream, SId}},
+ #transport{streams = {_, OS}}
+ = S) ->
+ send(SId rem OS, Bin, S),
S;
-%% ... or not: rotate through all steams.
+%% ... or not: rotate through all streams.
+send(#diameter_packet{bin = Bin}, S) ->
+ send(Bin, S);
send(Bin, #transport{streams = {_, OS},
os = N}
= S)
@@ -710,34 +769,12 @@ up(#transport{parent = Pid,
find(Id, Data, #listener{tmap = T} = S) ->
f(ets:lookup(T, Id), Data, S).
-%% New association and a transport waiting for one: use it.
+%% New association ...
f([],
- {_, #sctp_assoc_change{state = comm_up,
- assoc_id = Id}},
- #listener{tmap = T,
- pending = [TPid | {_,_} = Q]}
+ {_, #sctp_assoc_change{state = comm_up, assoc_id = Id}},
+ #listener{pending = {N,Q}}
= S) ->
- [{TPid, MRef}] = ets:lookup(T, TPid),
- ets:insert(T, [{MRef, Id}, {Id, TPid}]),
- ets:delete(T, TPid),
- {TPid, S#listener{pending = Q}};
-
-%% New association and no transport start yet: spawn one and place it
-%% in the queue.
-f([],
- {_, #sctp_assoc_change{state = comm_up,
- assoc_id = Id}},
- #listener{ref = Ref,
- socket = Sock,
- tmap = T,
- pending = {N,Q}}
- = S) ->
- Arg = {accept, Ref, self(), Sock, Id},
- {ok, TPid} = diameter_sctp_sup:start_child(Arg),
- MRef = erlang:monitor(process, TPid),
- ets:insert(T, [{MRef, Id}, {Id, TPid}]),
- ets:insert(Q, {TPid, now()}),
- {TPid, S#listener{pending = {N+1, Q}}};
+ {find(Id, S), S#listener{pending = {N+1,Q}}};
%% Known association ...
f([{_, TPid}], _, S) ->
@@ -747,6 +784,31 @@ f([{_, TPid}], _, S) ->
f([], _, _) ->
false.
+%% find/2
+
+%% Transport waiting for an association: use it.
+find(Id, #listener{tmap = T,
+ pending = {N,Q}})
+ when N < 0 ->
+ TPid = ets:first(Q),
+ [{TPid, MRef}] = ets:lookup(T, TPid),
+ ets:insert(T, [{MRef, Id}, {Id, TPid}]),
+ ets:delete(T, TPid),
+ ets:delete(Q, TPid),
+ TPid;
+
+%% No transport start yet: spawn one and queue.
+find(Id, #listener{ref = Ref,
+ socket = Sock,
+ tmap = T,
+ pending = {_,Q}}) ->
+ Arg = {accept, Ref, self(), Sock, Id},
+ {ok, TPid} = diameter_sctp_sup:start_child(Arg),
+ MRef = monitor(process, TPid),
+ ets:insert(T, [{MRef, Id}, {Id, TPid}]),
+ ets:insert(Q, {TPid, now()}),
+ TPid.
+
%% assoc_id/1
assoc_id({[#sctp_sndrcvinfo{assoc_id = Id}], _}) ->
diff --git a/lib/diameter/src/transport/diameter_tcp.erl b/lib/diameter/src/transport/diameter_tcp.erl
index 4d1b8bec51..0b26f429fb 100644
--- a/lib/diameter/src/transport/diameter_tcp.erl
+++ b/lib/diameter/src/transport/diameter_tcp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,7 +37,8 @@
code_change/3,
terminate/2]).
--export([info/1]). %% service_info callback
+-export([listener/1,%% diameter_sync callback
+ info/1]). %% service_info callback
-export([ports/0,
ports/1]).
@@ -191,7 +192,7 @@ init(T) ->
i({T, Ref, Mod, Pid, Opts, Addrs})
when T == accept;
T == connect ->
- erlang:monitor(process, Pid),
+ monitor(process, Pid),
%% Since accept/connect might block indefinitely, spawn a process
%% that does nothing but kill us with the parent until call
%% returns.
@@ -218,8 +219,8 @@ i({T, Ref, Mod, Pid, Opts, Addrs})
%% A monitor process to kill the transport if the parent dies.
i(#monitor{parent = Pid, transport = TPid} = S) ->
proc_lib:init_ack({ok, self()}),
- erlang:monitor(process, Pid),
- erlang:monitor(process, TPid),
+ monitor(process, Pid),
+ monitor(process, TPid),
S;
%% In principle a link between the transport and killer processes
%% could do the same thing: have the accepting/connecting process be
@@ -235,7 +236,7 @@ i({listen, LRef, APid, {Mod, Opts, Addrs}}) ->
LAddr = laddr(LAddrOpt, Mod, LSock),
true = diameter_reg:add_new({?MODULE, listener, {LRef, {LAddr, LSock}}}),
proc_lib:init_ack({ok, self(), {LAddr, LSock}}),
- erlang:monitor(process, APid),
+ monitor(process, APid),
start_timer(#listener{socket = LSock}).
laddr([], Mod, Sock) ->
@@ -336,17 +337,25 @@ accept(Opts) ->
%% listener/2
+%% Accepting processes can be started concurrently: ensure only one
+%% listener is started.
listener(LRef, T) ->
- l(diameter_reg:match({?MODULE, listener, {LRef, '_'}}), LRef, T).
+ diameter_sync:call({?MODULE, listener, LRef},
+ {?MODULE, listener, [{LRef, T, self()}]},
+ infinity,
+ infinity).
-%% Existing process with the listening socket ...
-l([{{?MODULE, listener, {_, AS}}, LPid}], _, _) ->
- LPid ! {accept, self()},
+listener({LRef, T, TPid}) ->
+ l(diameter_reg:match({?MODULE, listener, {LRef, '_'}}), LRef, T, TPid).
+
+%% Existing listening process ...
+l([{{?MODULE, listener, {_, AS}}, LPid}], _, _, TPid) ->
+ LPid ! {accept, TPid},
AS;
-%% ... or not: start one.
-l([], LRef, T) ->
- {ok, _, AS} = diameter_tcp_sup:start_child({listen, LRef, self(), T}),
+%% ... or not.
+l([], LRef, T, TPid) ->
+ {ok, _, AS} = diameter_tcp_sup:start_child({listen, LRef, TPid, T}),
AS.
%% get_addr/1
@@ -502,7 +511,7 @@ m({'DOWN', _, process, Pid, _}, #monitor{parent = Pid,
%% Another accept transport is attaching.
l({accept, TPid}, #listener{count = N} = S) ->
- erlang:monitor(process, TPid),
+ monitor(process, TPid),
S#listener{count = N+1};
%% Accepting process has died.
diff --git a/lib/diameter/src/transport/diameter_transport_sup.erl b/lib/diameter/src/transport/diameter_transport_sup.erl
index 6457ab78b0..284a41a752 100644
--- a/lib/diameter/src/transport/diameter_transport_sup.erl
+++ b/lib/diameter/src/transport/diameter_transport_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,7 +54,7 @@ start_child(Name, Module) ->
Spec = {Name,
{Module, start_link, [Name]},
permanent,
- 1000,
+ infinity,
supervisor,
[Module]},
supervisor:start_child(?MODULE, Spec).
diff --git a/lib/diameter/test/diameter_3xxx_SUITE.erl b/lib/diameter/test/diameter_3xxx_SUITE.erl
index 071b1a1177..44cb0cc484 100644
--- a/lib/diameter/test/diameter_3xxx_SUITE.erl
+++ b/lib/diameter/test/diameter_3xxx_SUITE.erl
@@ -47,6 +47,7 @@
send_double_error/1,
send_3xxx/1,
send_5xxx/1,
+ counters/1,
stop/1]).
%% diameter callbacks
@@ -111,7 +112,7 @@ all() ->
groups() ->
Tc = tc(),
- [{?util:name([E,D]), [], [start] ++ Tc ++ [stop]}
+ [{?util:name([E,D]), [], [start] ++ Tc ++ [counters, stop]}
|| E <- ?ERRORS, D <- ?RFCS].
init_per_suite(Config) ->
@@ -169,6 +170,203 @@ stop(_Config) ->
ok = diameter:stop_service(?SERVER),
ok = diameter:stop_service(?CLIENT).
+%% counters/1
+%%
+%% Check that counters are as expected.
+
+counters(Config) ->
+ Group = proplists:get_value(group, Config),
+ [_Errors, _Rfc] = G = ?util:name(Group),
+ [] = ?util:run([[fun counters/3, K, S, G]
+ || K <- [statistics, transport, connections],
+ S <- [?CLIENT, ?SERVER]]).
+
+counters(Key, Svc, Group) ->
+ counters(Key, Svc, Group, [_|_] = diameter:service_info(Svc, Key)).
+
+counters(statistics, Svc, [Errors, Rfc], L) ->
+ [{P, Stats}] = L,
+ true = is_pid(P),
+ stats(Svc, Errors, Rfc, lists:sort(Stats));
+
+counters(_, _, _, _) ->
+ todo.
+
+stats(?CLIENT, E, rfc3588, L)
+ when E == answer;
+ E == answer_3xxx ->
+ [{{{unknown,0},recv},2},
+ {{{0,257,0},recv},1},
+ {{{0,257,1},send},1},
+ {{{0,275,0},recv},6},
+ {{{0,275,1},send},10},
+ {{{unknown,0},recv,{'Result-Code',3001}},1},
+ {{{unknown,0},recv,{'Result-Code',3007}},1},
+ {{{0,257,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',3008}},2},
+ {{{0,275,0},recv,{'Result-Code',3999}},1},
+ {{{0,275,0},recv,{'Result-Code',5002}},1},
+ {{{0,275,0},recv,{'Result-Code',5005}},1}]
+ = L;
+
+stats(?SERVER, E, rfc3588, L)
+ when E == answer;
+ E == answer_3xxx ->
+ [{{{unknown,0},send},2},
+ {{{unknown,1},recv},1},
+ {{{0,257,0},send},1},
+ {{{0,257,1},recv},1},
+ {{{0,275,0},send},6},
+ {{{0,275,1},recv},8},
+ {{{unknown,0},send,{'Result-Code',3001}},1},
+ {{{unknown,0},send,{'Result-Code',3007}},1},
+ {{{unknown,1},recv,error},1},
+ {{{0,257,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',3008}},2},
+ {{{0,275,0},send,{'Result-Code',3999}},1},
+ {{{0,275,0},send,{'Result-Code',5002}},1},
+ {{{0,275,0},send,{'Result-Code',5005}},1},
+ {{{0,275,1},recv,error},5}]
+ = L;
+
+stats(?CLIENT, answer, rfc6733, L) ->
+ [{{{unknown,0},recv},2},
+ {{{0,257,0},recv},1},
+ {{{0,257,1},send},1},
+ {{{0,275,0},recv},8},
+ {{{0,275,1},send},10},
+ {{{unknown,0},recv,{'Result-Code',3001}},1},
+ {{{unknown,0},recv,{'Result-Code',3007}},1},
+ {{{0,257,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',3008}},2},
+ {{{0,275,0},recv,{'Result-Code',3999}},1},
+ {{{0,275,0},recv,{'Result-Code',5002}},1},
+ {{{0,275,0},recv,{'Result-Code',5005}},3},
+ {{{0,275,0},recv,{'Result-Code',5999}},1}]
+ = L;
+
+stats(?SERVER, answer, rfc6733, L) ->
+ [{{{unknown,0},send},2},
+ {{{unknown,1},recv},1},
+ {{{0,257,0},send},1},
+ {{{0,257,1},recv},1},
+ {{{0,275,0},send},8},
+ {{{0,275,1},recv},8},
+ {{{unknown,0},send,{'Result-Code',3001}},1},
+ {{{unknown,0},send,{'Result-Code',3007}},1},
+ {{{unknown,1},recv,error},1},
+ {{{0,257,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',3008}},2},
+ {{{0,275,0},send,{'Result-Code',3999}},1},
+ {{{0,275,0},send,{'Result-Code',5002}},1},
+ {{{0,275,0},send,{'Result-Code',5005}},3},
+ {{{0,275,0},send,{'Result-Code',5999}},1},
+ {{{0,275,1},recv,error},5}]
+ = L;
+
+stats(?CLIENT, answer_3xxx, rfc6733, L) ->
+ [{{{unknown,0},recv},2},
+ {{{0,257,0},recv},1},
+ {{{0,257,1},send},1},
+ {{{0,275,0},recv},8},
+ {{{0,275,1},send},10},
+ {{{unknown,0},recv,{'Result-Code',3001}},1},
+ {{{unknown,0},recv,{'Result-Code',3007}},1},
+ {{{0,257,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',3008}},2},
+ {{{0,275,0},recv,{'Result-Code',3999}},1},
+ {{{0,275,0},recv,{'Result-Code',5002}},1},
+ {{{0,275,0},recv,{'Result-Code',5005}},2},
+ {{{0,275,0},recv,{'Result-Code',5999}},1}]
+ = L;
+
+stats(?SERVER, answer_3xxx, rfc6733, L) ->
+ [{{{unknown,0},send},2},
+ {{{unknown,1},recv},1},
+ {{{0,257,0},send},1},
+ {{{0,257,1},recv},1},
+ {{{0,275,0},send},8},
+ {{{0,275,1},recv},8},
+ {{{unknown,0},send,{'Result-Code',3001}},1},
+ {{{unknown,0},send,{'Result-Code',3007}},1},
+ {{{unknown,1},recv,error},1},
+ {{{0,257,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',3008}},2},
+ {{{0,275,0},send,{'Result-Code',3999}},1},
+ {{{0,275,0},send,{'Result-Code',5002}},1},
+ {{{0,275,0},send,{'Result-Code',5005}},2},
+ {{{0,275,0},send,{'Result-Code',5999}},1},
+ {{{0,275,1},recv,error},5}]
+ = L;
+
+stats(?CLIENT, callback, rfc3588, L) ->
+ [{{{unknown,0},recv},1},
+ {{{0,257,0},recv},1},
+ {{{0,257,1},send},1},
+ {{{0,275,0},recv},6},
+ {{{0,275,1},send},10},
+ {{{unknown,0},recv,{'Result-Code',3007}},1},
+ {{{0,257,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',2001}},2},
+ {{{0,275,0},recv,{'Result-Code',3999}},1},
+ {{{0,275,0},recv,{'Result-Code',5002}},1},
+ {{{0,275,0},recv,{'Result-Code',5005}},2}]
+ = L;
+
+stats(?SERVER, callback, rfc3588, L) ->
+ [{{{unknown,0},send},1},
+ {{{unknown,1},recv},1},
+ {{{0,257,0},send},1},
+ {{{0,257,1},recv},1},
+ {{{0,275,0},send},6},
+ {{{0,275,1},recv},8},
+ {{{unknown,0},send,{'Result-Code',3007}},1},
+ {{{unknown,1},recv,error},1},
+ {{{0,257,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',2001}},2},
+ {{{0,275,0},send,{'Result-Code',3999}},1},
+ {{{0,275,0},send,{'Result-Code',5002}},1},
+ {{{0,275,0},send,{'Result-Code',5005}},2},
+ {{{0,275,1},recv,error},5}]
+ = L;
+
+stats(?CLIENT, callback, rfc6733, L) ->
+ [{{{unknown,0},recv},1},
+ {{{0,257,0},recv},1},
+ {{{0,257,1},send},1},
+ {{{0,275,0},recv},8},
+ {{{0,275,1},send},10},
+ {{{unknown,0},recv,{'Result-Code',3007}},1},
+ {{{0,257,0},recv,{'Result-Code',2001}},1},
+ {{{0,275,0},recv,{'Result-Code',2001}},2},
+ {{{0,275,0},recv,{'Result-Code',3999}},1},
+ {{{0,275,0},recv,{'Result-Code',5002}},1},
+ {{{0,275,0},recv,{'Result-Code',5005}},3},
+ {{{0,275,0},recv,{'Result-Code',5999}},1}]
+ = L;
+
+stats(?SERVER, callback, rfc6733, L) ->
+ [{{{unknown,0},send},1},
+ {{{unknown,1},recv},1},
+ {{{0,257,0},send},1},
+ {{{0,257,1},recv},1},
+ {{{0,275,0},send},8},
+ {{{0,275,1},recv},8},
+ {{{unknown,0},send,{'Result-Code',3007}},1},
+ {{{unknown,1},recv,error},1},
+ {{{0,257,0},send,{'Result-Code',2001}},1},
+ {{{0,275,0},send,{'Result-Code',2001}},2},
+ {{{0,275,0},send,{'Result-Code',3999}},1},
+ {{{0,275,0},send,{'Result-Code',5002}},1},
+ {{{0,275,0},send,{'Result-Code',5005}},3},
+ {{{0,275,0},send,{'Result-Code',5999}},1},
+ {{{0,275,1},recv,error},5}]
+ = L.
+
%% send_unknown_application/1
%%
%% Send an unknown application that a callback (which shouldn't take
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 1e262895a6..84f8a66a8a 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,7 @@
diameter_exprecs,
diameter_make]).
--define(HELP_MODULES, [diameter_dbg,
+-define(INFO_MODULES, [diameter_dbg,
diameter_info]).
%% ===========================================================================
@@ -99,13 +99,13 @@ vsn(Config) ->
%% # modules/1
%%
%% Ensure that the app file modules and installed modules differ by
-%% compiler/help modules.
+%% compiler/info modules.
%% ===========================================================================
modules(Config) ->
Mods = fetch(modules, fetch(app, Config)),
Installed = code_mods(),
- Help = lists:sort(?HELP_MODULES ++ ?COMPILER_MODULES),
+ Help = lists:sort(?INFO_MODULES ++ ?COMPILER_MODULES),
{[], Help} = {Mods -- Installed, lists:sort(Installed -- Mods)}.
@@ -158,12 +158,15 @@ appvsn(Name) ->
%% # xref/1
%%
%% Ensure that no function in our application calls an undefined function
-%% or one in an application we haven't specified as a dependency. (Almost.)
+%% or one in an application we haven't declared as a dependency. (Almost.)
%% ===========================================================================
xref(Config) ->
App = fetch(app, Config),
- Mods = fetch(modules, App),
+ Mods = fetch(modules, App), %% modules listed in the app file
+
+ %% List of application names extracted from runtime_dependencies.
+ Deps = lists:map(fun unversion/1, fetch(runtime_dependencies, App)),
{ok, XRef} = xref:start(make_name(xref_test_name)),
ok = xref:set_default(XRef, [{verbose, false}, {warnings, false}]),
@@ -178,30 +181,88 @@ xref(Config) ->
[?APP, erts | fetch(applications, App)]),
{ok, Undefs} = xref:analyze(XRef, undefined_function_calls),
- {ok, Called} = xref:analyze(XRef, {module_call, ?COMPILER_MODULES}),
+ {ok, RTmods} = xref:analyze(XRef, {module_use, Mods}),
+ {ok, CTmods} = xref:analyze(XRef, {module_use, ?COMPILER_MODULES}),
+ {ok, RTdeps} = xref:analyze(XRef, {module_call, Mods}),
xref:stop(XRef),
+ Rel = release(), %% otp_release-ish
+
%% Only care about calls from our own application.
- [] = lists:filter(fun({{F,_,_},{T,_,_}}) ->
+ [] = lists:filter(fun({{F,_,_} = From, {_,_,_} = To}) ->
lists:member(F, Mods)
- andalso {F,T} /= {diameter_tcp, ssl}
+ andalso not ignored(From, To, Rel)
end,
Undefs),
+
+ %% Ensure that only runtime or info modules call runtime modules.
+ %% It's not strictly necessary that diameter compiler modules not
+ %% depend on other diameter modules but it's a simple source of
+ %% build errors if not properly encoded in the makefile so guard
+ %% against it.
+ [] = (RTmods -- Mods) -- ?INFO_MODULES,
+
+ %% Ensure that runtime modules don't call compiler modules.
+ CTmods = CTmods -- Mods,
+
+ %% Ensure that runtime modules only call other runtime modules, or
+ %% applications declared as in runtime_dependencies in the app
+ %% file. Note that the declared application versions are ignored
+ %% since we only know what we can see now.
+ [] = lists:filter(fun(M) -> not lists:member(app(M), Deps) end,
+ RTdeps -- Mods).
+
+ignored({FromMod,_,_}, {ToMod,_,_} = To, Rel)->
%% diameter_tcp does call ssl despite the latter not being listed
%% as a dependency in the app file since ssl is only required for
- %% TLS security: it's up to a client who wants TLS it to start
- %% ssl.
-
- [] = lists:filter(fun is_bad_dependency/1, Called).
+ %% TLS security: it's up to a client who wants TLS to start ssl.
+ %% The OTP 18 time api is also called if it exists, so that the
+ %% same code can be run on older releases.
+ {FromMod, ToMod} == {diameter_tcp, ssl}
+ orelse (FromMod == diameter_lib
+ andalso Rel < 18
+ andalso lists:member(To, time_api())).
+
+%% New time api in OTP 18.
+time_api() ->
+ [{erlang, F, A} || {F,A} <- [{convert_time_unit,3},
+ {monotonic_time,0},
+ {monotonic_time,1},
+ {system_time,0},
+ {system_time,1},
+ {time_offset,0},
+ {time_offset,1},
+ {timestamp,0},
+ {unique_integer,0},
+ {unique_integer,1}]]
+ ++ [{os, system_time, 0},
+ {os, system_time, 1}].
+
+release() ->
+ Rel = erlang:system_info(otp_release),
+ try list_to_integer(Rel) of
+ N -> N
+ catch
+ error:_ ->
+ 0 %% aka < 17
+ end.
+
+unversion(App) ->
+ {Name, [$-|Vsn]} = lists:splitwith(fun(C) -> C /= $- end, App),
+ true = is_app(Name), %% assert
+ Vsn = vsn_str(Vsn), %%
+ Name.
-%% It's not strictly necessary that diameter compiler modules not
-%% depend on other diameter modules but it's a simple source of build
-%% errors if not encoded in the makefile (hence the test) so guard
-%% against it.
-is_bad_dependency(Mod) ->
- lists:prefix("diameter", atom_to_list(Mod))
- andalso not lists:member(Mod, ?COMPILER_MODULES).
+app('$M_EXPR') -> %% could be anything but assume it's ok
+ "erts";
+app(Mod) ->
+ case code:which(Mod) of
+ preloaded ->
+ "erts";
+ Path ->
+ unversion(lists:nth(3, lists:reverse(filename:split(Path))))
+ end.
add_application(XRef, App) ->
add_application(XRef, App, code:lib_dir(App)).
@@ -260,11 +321,11 @@ acc_rel(Dir, Rel, {Vsn, _}, Acc) ->
%% Write a rel file and return its name.
write_rel(Dir, [Erts | Apps], Vsn) ->
- true = is_vsn(Vsn),
- Name = "diameter_test_" ++ Vsn,
+ VS = vsn_str(Vsn),
+ Name = "diameter_test_" ++ VS,
ok = write_file(filename:join([Dir, Name ++ ".rel"]),
{release,
- {"diameter " ++ Vsn ++ " test release", Vsn},
+ {"diameter " ++ VS ++ " test release", VS},
Erts,
Apps}),
Name.
@@ -279,10 +340,34 @@ fetch(Key, List) ->
write_file(Path, T) ->
file:write_file(Path, io_lib:format("~p.", [T])).
-%% Is a version string of the expected form? Return the argument
-%% itself for 'false' for a useful badmatch.
+%% Is a version string of the expected form?
is_vsn(V) ->
- is_list(V)
- andalso length(V) == string:span(V, "0123456789.")
- andalso V == string:join(string:tokens(V, [$.]), ".") %% no ".."
- orelse {error, V}.
+ V = vsn_str(V),
+ true.
+
+%% Turn a from/to version in appup to a version string after ensuring
+%% that it's valid version number of regexp. In the regexp case, the
+%% regexp itself becomes the version string since there's no
+%% requirement that a version in appup be anything but a string. The
+%% restrictions placed on string-valued version numbers (that they be
+%% '.'-separated integers) are our own.
+
+vsn_str(S)
+ when is_list(S) ->
+ {_, match} = {S, match(S, "^(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*$")},
+ {_, nomatch} = {S, match(S, "\\.0\\.0$")},
+ S;
+
+vsn_str(B)
+ when is_binary(B) ->
+ {ok, _} = re:compile(B),
+ binary_to_list(B).
+
+match(S, RE) ->
+ re:run(S, RE, [{capture, none}]).
+
+%% Is an application name of the expected form?
+is_app(S)
+ when is_list(S) ->
+ {_, match} = {S, match(S, "^([a-z]([a-z_]*|[a-zA-Z]*))$")},
+ true.
diff --git a/lib/diameter/test/diameter_capx_SUITE.erl b/lib/diameter/test/diameter_capx_SUITE.erl
index deabdd720b..02501ce779 100644
--- a/lib/diameter/test/diameter_capx_SUITE.erl
+++ b/lib/diameter/test/diameter_capx_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -144,8 +144,8 @@ end_per_suite(_Config) ->
%% Generate a unique hostname for each testcase so that watchdogs
%% don't prevent a connection from being brought up immediately.
init_per_testcase(Name, Config) ->
- Uniq = ["." ++ integer_to_list(N) || N <- tuple_to_list(now())],
- [{host, lists:flatten([?L(Name) | Uniq])} | Config].
+ [{host, ?L(Name) ++ "." ++ diameter_util:unique_string()}
+ | Config].
init_per_group(Name, Config) ->
[{rfc, Name} | Config].
diff --git a/lib/diameter/test/diameter_codec_SUITE.erl b/lib/diameter/test/diameter_codec_SUITE.erl
index cd8ca41f66..64ea90554d 100644
--- a/lib/diameter/test/diameter_codec_SUITE.erl
+++ b/lib/diameter/test/diameter_codec_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,9 @@
-export([suite/0,
all/0,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2,
init_per_testcase/2,
end_per_testcase/2]).
@@ -36,9 +39,13 @@
-export([base/1,
gen/1,
lib/1,
- unknown/1]).
+ unknown/1,
+ success/1,
+ grouped_error/1,
+ failed_error/1]).
-include("diameter_ct.hrl").
+-include("diameter.hrl").
-define(L, atom_to_list).
@@ -48,7 +55,19 @@ suite() ->
[{timetrap, {seconds, 10}}].
all() ->
- [base, gen, lib, unknown].
+ [base, gen, lib, unknown, {group, recode}].
+
+groups() ->
+ [{recode, [], [success,
+ grouped_error,
+ failed_error]}].
+
+init_per_group(recode, Config) ->
+ ok = diameter:start(),
+ Config.
+
+end_per_group(_, _) ->
+ ok = diameter:stop().
init_per_testcase(gen, Config) ->
[{application, ?APP, App}] = diameter_util:consult(?APP, app),
@@ -98,3 +117,166 @@ compile(File) ->
compile(File, Opts) ->
compile:file(File, [return | Opts]).
+
+%% ===========================================================================
+
+%% Ensure a Grouped AVP is represented by a list in the avps field.
+success(_) ->
+ Avps = [{295, <<1:32>>}, %% Termination-Cause
+ {284, [{280, "Proxy-Host"}, %% Proxy-Info
+ {33, "Proxy-State"}, %%
+ {295, <<2:32>>}]}], %% Termination-Cause
+ #diameter_packet{avps = [#diameter_avp{code = 295,
+ value = 1,
+ data = <<1:32>>},
+ [#diameter_avp{code = 284},
+ #diameter_avp{code = 280},
+ #diameter_avp{code = 33},
+ #diameter_avp{code = 295,
+ value = 2,
+ data = <<2:32>>}]],
+ errors = []}
+ = str(recode(str(Avps))).
+
+%% ===========================================================================
+
+%% Ensure a Grouped AVP is represented by a list in the avps field
+%% even in the case of a decode error on a component AVP.
+grouped_error(_) ->
+ Avps = [{295, <<1:32>>}, %% Termination-Cause
+ {284, [{295, <<0:32>>}, %% Proxy-Info, Termination-Cause
+ {280, "Proxy-Host"},
+ {33, "Proxy-State"}]}],
+ #diameter_packet{avps = [#diameter_avp{code = 295,
+ value = 1,
+ data = <<1:32>>},
+ [#diameter_avp{code = 284},
+ #diameter_avp{code = 295,
+ value = undefined,
+ data = <<0:32>>},
+ #diameter_avp{code = 280},
+ #diameter_avp{code = 33}]],
+ errors = [{5004, #diameter_avp{code = 284}}]}
+ = str(recode(str(Avps))).
+
+%% ===========================================================================
+
+%% Ensure that a failed decode in Failed-AVP is acceptable, and that
+%% the component AVPs are decoded if possible.
+failed_error(_) ->
+ Avps = [{279, [{295, <<0:32>>}, %% Failed-AVP, Termination-Cause
+ {258, <<1:32>>}, %% Auth-Application-Id
+ {284, [{280, "Proxy-Host"}, %% Proxy-Info
+ {33, "Proxy-State"},
+ {295, <<0:32>>}, %% Termination-Cause, invalid
+ {258, <<2:32>>}]}]}], %% Auth-Application-Id
+ #diameter_packet{avps = [[#diameter_avp{code = 279},
+ #diameter_avp{code = 295,
+ value = undefined,
+ data = <<0:32>>},
+ #diameter_avp{code = 258,
+ value = 1,
+ data = <<1:32>>},
+ [#diameter_avp{code = 284},
+ #diameter_avp{code = 280},
+ #diameter_avp{code = 33},
+ #diameter_avp{code = 295,
+ value = undefined},
+ #diameter_avp{code = 258,
+ value = 2,
+ data = <<2:32>>}]]],
+ errors = []}
+ = sta(recode(sta(Avps))).
+
+%% ===========================================================================
+
+%% str/1
+
+str(#diameter_packet{avps = [#diameter_avp{code = 263},
+ #diameter_avp{code = 264},
+ #diameter_avp{code = 296},
+ #diameter_avp{code = 283},
+ #diameter_avp{code = 258,
+ value = 0}
+ | T]}
+ = Pkt) ->
+ Pkt#diameter_packet{avps = T};
+
+str(Avps) ->
+ OH = "diameter.erlang.org",
+ OR = "erlang.org",
+ DR = "example.com",
+ Sid = "diameter.erlang.org;123;456",
+
+ [#diameter_header{version = 1,
+ cmd_code = 275, %% STR
+ is_request = true,
+ application_id = 0,
+ hop_by_hop_id = 17,
+ end_to_end_id = 42,
+ is_proxiable = false,
+ is_error = false,
+ is_retransmitted = false}
+ | avp([{263, Sid}, %% Session-Id
+ {264, OH}, %% Origin-Host
+ {296, OR}, %% Origin-Realm
+ {283, DR}, %% Destination-Realm
+ {258, <<0:32>>}] %% Auth-Application-Id
+ ++ Avps)].
+
+%% sta/1
+
+sta(#diameter_packet{avps = [#diameter_avp{code = 263},
+ #diameter_avp{code = 268},
+ #diameter_avp{code = 264},
+ #diameter_avp{code = 296},
+ #diameter_avp{code = 278,
+ value = 4}
+ | T]}
+ = Pkt) ->
+ Pkt#diameter_packet{avps = T};
+
+sta(Avps) ->
+ OH = "diameter.erlang.org",
+ OR = "erlang.org",
+ Sid = "diameter.erlang.org;123;456",
+
+ [#diameter_header{version = 1,
+ cmd_code = 275, %% STA
+ is_request = false,
+ application_id = 0,
+ hop_by_hop_id = 17,
+ end_to_end_id = 42,
+ is_proxiable = false,
+ is_error = false,
+ is_retransmitted = false}
+ | avp([{263, Sid}, %% Session-Id
+ {268, <<2002:32>>}, %% Result-Code
+ {264, OH}, %% Origin-Host
+ {296, OR}, %% Origin-Realm
+ {278, <<4:32>>}] %% Origin-State-Id
+ ++ Avps)].
+
+avp({Code, Data}) ->
+ #diameter_avp{code = Code,
+ data = avp(Data)};
+
+avp(#diameter_avp{} = A) ->
+ A;
+
+avp([{_,_} | _] = Avps) ->
+ lists:map(fun avp/1, Avps);
+
+avp(V) ->
+ V.
+
+%% recode/1
+
+recode(Msg) ->
+ recode(Msg, diameter_gen_base_rfc6733).
+
+recode(#diameter_packet{} = Pkt, Dict) ->
+ diameter_codec:decode(Dict, diameter_codec:encode(Dict, Pkt));
+
+recode(Msg, Dict) ->
+ recode(#diameter_packet{msg = Msg}, Dict).
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index 0b4568a9e5..5f1dbfbd61 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -1,8 +1,7 @@
-%% coding: utf-8
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -230,8 +229,7 @@ v(Max, Ord, E)
when Ord =< Max ->
diameter_enum:to_list(E);
v(Max, Ord, E) ->
- {M,S,U} = now(),
- random:seed(M,S,U),
+ random:seed(diameter_util:seed()),
v(Max, Ord, E, []).
v(0, _, _, Acc) ->
@@ -354,12 +352,23 @@ values('DiameterURI') ->
{[],
["aaa" ++ S ++ "://diameter.se" ++ P ++ Tr ++ Pr
|| S <- ["", "s"],
- P <- ["", ":1234"],
+ P <- ["", ":1234", ":0", ":65535"],
Tr <- ["" | [";transport=" ++ X
|| X <- ["tcp", "sctp", "udp"]]],
Pr <- ["" | [";protocol=" ++ X
- || X <- ["diameter","radius","tacacs+"]]]],
- []};
+ || X <- ["diameter","radius","tacacs+"]]],
+ Tr /= ";transport=udp"
+ orelse (Pr /= ";protocol=diameter" andalso Pr /= "")]
+ ++ ["aaa://" ++ lists:duplicate(255, $x)],
+ ["aaa://diameter.se:65536",
+ "aaa://diameter.se:-1",
+ "aaa://diameter.se;transport=udp;protocol=diameter",
+ "aaa://diameter.se;transport=udp",
+ "aaa://" ++ lists:duplicate(256, $x),
+ "aaa://:3868",
+ "aaax://diameter.se",
+ "aaa://diameter.se;transport=tcpx",
+ "aaa://diameter.se;transport=tcp;protocol=diameter "]};
values(T)
when T == 'IPFilterRule';
@@ -513,7 +522,7 @@ random(Mn,Mx) ->
seed(undefined) ->
put({?MODULE, seed}, true),
- random:seed(now());
+ random:seed(diameter_util:seed());
seed(true) ->
ok.
diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl
index ed369e8af3..20c9275808 100644
--- a/lib/diameter/test/diameter_compiler_SUITE.erl
+++ b/lib/diameter/test/diameter_compiler_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -120,6 +120,16 @@
{avp_has_duplicate_flag,
" -",
" MM"},
+ {ok,
+ "@vendor 0",
+ "@vendor 10415"},
+ {ok,
+ [{"@vendor 0", "@vendor 10415"},
+ {"Proxy-Info .*M$", "&V"},
+ {"Proxy-Info ::= [^>]*", "& 10415 "}]},
+ {grouped_vendor_id_without_flag,
+ [{"@vendor 0", "@vendor 10415"},
+ {"Proxy-Info ::= [^>]*", "& 10415 "}]},
{avp_has_vendor_id,
"@avp_types",
"@avp_vendor_id 667 Class\n&"},
@@ -138,6 +148,9 @@
{grouped_avp_not_defined,
"Failed-AVP *.*",
""},
+ {grouped_avp_not_grouped,
+ "Failed-AVP ::=.*\n.*}",
+ ""},
{grouped_vendor_id_without_flag,
"(Failed-AVP .*)>",
"\\1 668>"},
@@ -304,6 +317,21 @@
{avp_not_defined,
"CEA ::=",
"<XXX> &"},
+ {ok,
+ "@avp_types",
+ "@codecs tmod Session-Id &"},
+ {ok,
+ "@avp_types",
+ "@custom_types tmod Session-Id &"},
+ {avp_not_defined,
+ "@avp_types",
+ "@codecs tmod OctetString &"},
+ {avp_not_defined,
+ "@avp_types",
+ "@custom_types tmod OctetString &"},
+ {avp_already_defined,
+ "@avp_types",
+ "@codecs tmod Session-Id @custom_types tmod Session-Id &"},
{not_loaded,
[{"@avp_types", "@inherits nomod XXX &"},
{"CEA ::=", "<XXX> &"}]},
@@ -397,8 +425,8 @@ replace({E, Mods}, Bin) ->
case {E, parse(B, [{include, here()}]), Mods} of
{ok, {ok, Dict}, _} ->
Dict;
- {_, {error, S}, _} ->
- S
+ {_, {error, {E,_} = T}, _} when E /= ok ->
+ diameter_make:format_error(T)
end.
re({RE, Repl}, Bin) ->
diff --git a/lib/diameter/test/diameter_config_SUITE.erl b/lib/diameter/test/diameter_config_SUITE.erl
index 46ff63756d..4bcaa8119f 100644
--- a/lib/diameter/test/diameter_config_SUITE.erl
+++ b/lib/diameter/test/diameter_config_SUITE.erl
@@ -1,8 +1,7 @@
-%% coding: utf-8
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -51,7 +50,7 @@
{request_errors, RE},
{call_mutates_state, C}]]
|| D <- [diameter_gen_base_rfc3588, diameter_gen_base_rfc6733],
- M <- [?MODULE, [?MODULE, now()]],
+ M <- [?MODULE, [?MODULE, diameter_lib:now()]],
A <- [0, common, make_ref()],
S <- [[], make_ref()],
AE <- [report, callback, discard],
@@ -83,6 +82,15 @@
[false],
[[node(), node()]]],
[[x]]},
+ {string_decode,
+ [[true], [false]],
+ [[0], [x]]},
+ {incoming_maxlen,
+ [[0], [65536], [16#FFFFFF]],
+ [[-1], [1 bsl 24], [infinity], [false]]},
+ {spawn_opt,
+ [[[]], [[monitor, link]]],
+ [[false]]},
{invalid_option, %% invalid service options are rejected
[],
[[x],
@@ -158,7 +166,13 @@
{length_errors,
[[exit], [handle], [discard]],
[[x]]},
- {reconnect_timer,
+ {dpr_timeout,
+ [[0], [3000], [16#FFFFFFFF]],
+ [[infinity], [-1], [1 bsl 32], [x]]},
+ {dpa_timeout,
+ [[0], [3000], [16#FFFFFFFF]],
+ [[infinity], [-1], [1 bsl 32], [x]]},
+ {connect_timer,
[[3000]],
[[infinity]]},
{watchdog_timer,
@@ -172,9 +186,15 @@
[[{suspect, 2}]]],
[[x],
[[{open, 0}]]]},
+ {pool_size,
+ [[1], [100]],
+ [[0], [infinity], [-1], [x]]},
{private,
[[x]],
[]},
+ {spawn_opt,
+ [[[]], [[monitor, link]]],
+ [[false]]},
{invalid_option, %% invalid transport options are silently ignored
[[x],
[x,x]],
diff --git a/lib/diameter/test/diameter_ct.erl b/lib/diameter/test/diameter_ct.erl
index ed2f884681..85c502ea7f 100644
--- a/lib/diameter/test/diameter_ct.erl
+++ b/lib/diameter/test/diameter_ct.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -43,7 +43,7 @@ ct_run(Opts) ->
info(Start , info()).
info() ->
- [{time, now()},
+ [{time, diameter_lib:now()},
{process_count, erlang:system_info(process_count)}
| erlang:memory()].
@@ -56,6 +56,6 @@ info(L0, L1) ->
io:format("INFO: ~p~n", [Diff]).
diff(time, T0, T1) ->
- timer:now_diff(T1, T0);
+ diameter_lib:micro_diff(T1, T0);
diff(_, N0, N1) ->
N1 - N0.
diff --git a/lib/diameter/test/diameter_dpr_SUITE.erl b/lib/diameter/test/diameter_dpr_SUITE.erl
index 9252650bf7..81178e2bda 100644
--- a/lib/diameter/test/diameter_dpr_SUITE.erl
+++ b/lib/diameter/test/diameter_dpr_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,6 +32,7 @@
%% testcases
-export([start/1,
connect/1,
+ send_dpr/1,
remove_transport/1,
stop_service/1,
check/1,
@@ -41,6 +42,7 @@
-export([disconnect/5]).
-include("diameter.hrl").
+-include("diameter_gen_base_rfc6733.hrl").
%% ===========================================================================
@@ -51,9 +53,6 @@
-define(CLIENT, "CLIENT").
-define(SERVER, "SERVER").
--define(DICT_COMMON, ?DIAMETER_DICT_COMMON).
--define(APP_ID, ?DICT_COMMON:id()).
-
%% Config for diameter:start_service/2.
-define(SERVICE(Host),
[{'Origin-Host', Host},
@@ -61,9 +60,10 @@
{'Host-IP-Address', [?ADDR]},
{'Vendor-Id', hd(Host)}, %% match this in disconnect/5
{'Product-Name', "OTP/diameter"},
- {'Acct-Application-Id', [?APP_ID]},
+ {'Acct-Application-Id', [0]},
{restrict_connections, false},
- {application, [{dictionary, ?DICT_COMMON},
+ {application, [{dictionary, diameter_gen_base_rfc6733},
+ {alias, common},
{module, #diameter_callback{_ = false}}]}]).
%% Disconnect reasons that diameter passes as the first argument of a
@@ -73,11 +73,13 @@
%% Valid values for Disconnect-Cause.
-define(CAUSES, [0, rebooting, 1, busy, 2, goaway]).
-%% Establish one client connection for element of this list,
-%% configured with disconnect/5 as disconnect_cb and returning the
-%% specified value.
+%% Establish one client connection for each element of this list,
+%% configured with disconnect/5, disconnect_cb returning the specified
+%% value.
-define(RETURNS,
- [[close, {dpr, [{cause, invalid}]}], [ignore, close], []]
+ [[close, {dpr, [{cause, invalid}]}],
+ [ignore, close],
+ []]
++ [[{dpr, [{timeout, 5000}, {cause, T}]}] || T <- ?CAUSES]).
%% ===========================================================================
@@ -86,7 +88,7 @@ suite() ->
[{timetrap, {seconds, 60}}].
all() ->
- [{group, R} || R <- ?REASONS].
+ [start, send_dpr, stop | [{group, R} || R <- ?REASONS]].
%% The group determines how transports are terminated: by remove_transport,
%% stop_service or application stop.
@@ -111,6 +113,22 @@ start(_Config) ->
ok = diameter:start_service(?SERVER, ?SERVICE(?SERVER)),
ok = diameter:start_service(?CLIENT, ?SERVICE(?CLIENT)).
+send_dpr(_Config) ->
+ LRef = ?util:listen(?SERVER, tcp),
+ Ref = ?util:connect(?CLIENT, tcp, LRef, [{dpa_timeout, 10000}]),
+ #diameter_base_DPA{'Result-Code' = 2001}
+ = diameter:call(?CLIENT,
+ common,
+ ['DPR', {'Origin-Host', "CLIENT.erlang.org"},
+ {'Origin-Realm', "erlang.org"},
+ {'Disconnect-Cause', 0}]),
+ ok = receive %% endure the transport dies on DPA
+ #diameter_event{service = ?CLIENT, info = {down, Ref, _, _}} ->
+ ok
+ after 5000 ->
+ erlang:process_info(self(), messages)
+ end.
+
connect(Config) ->
Pid = spawn(fun init/0), %% process for disconnect_cb to bang
Grp = group(Config),
@@ -129,8 +147,8 @@ stop_service(Config) ->
service == group(Config)
andalso (ok = diameter:stop_service(?CLIENT)).
-%% Check for callbacks and stop the service. (Not the other way around
-%% for the timing reason explained below.)
+%% Check for callbacks before diameter:stop/0, not the other way around
+%% for the timing reason explained below.
check(Config) ->
Grp = group(Config),
[Pid | Refs] = ?util:read_priv(Config, config),
diff --git a/lib/diameter/test/diameter_event_SUITE.erl b/lib/diameter/test/diameter_event_SUITE.erl
index 94b4967921..bfe160203c 100644
--- a/lib/diameter/test/diameter_event_SUITE.erl
+++ b/lib/diameter/test/diameter_event_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-15. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -107,29 +107,38 @@ start_server(Config) ->
%% Connect with matching capabilities and expect the connection to
%% come up.
up(Config) ->
- {Svc, Ref} = connect(Config, []),
+ {Svc, Ref} = connect(Config, [{connect_timer, 5000},
+ {watchdog_timer, 15000}]),
start = event(Svc),
- {up, Ref, {_,_Caps}, _Config, #diameter_packet{}} = event(Svc),
- {watchdog, Ref, _, {initial, okay}, _} = event(Svc).
+ {up, Ref, {TPid, Caps}, Cfg, #diameter_packet{}} = event(Svc),
+ {watchdog, Ref, _, {initial, okay}, _} = event(Svc),
+ %% Kill the transport process and see that the connection is
+ %% reestablished after a watchdog timeout, not after connect_timer
+ %% expiry.
+ exit(TPid, kill),
+ {down, Ref, {TPid, Caps}, Cfg} = event(Svc),
+ {watchdog, Ref, _, {okay, down}, _} = event(Svc),
+ {reconnect, Ref, _} = event(Svc, 10000, 20000).
%% Connect with non-matching capabilities and expect CEA from the peer
%% to indicate as much and then for the transport to be restarted
-%% (after reconnect_timer).
+%% (after connect_timer).
down(Config) ->
{Svc, Ref} = connect(Config, [{capabilities, [{'Acct-Application-Id',
[?DICT_ACCT:id()]}]},
{applications, [?DICT_ACCT]},
- {reconnect_timer, 5000}]),
+ {connect_timer, 5000},
+ {watchdog_timer, 20000}]),
start = event(Svc),
{closed, Ref, {'CEA', ?NO_COMMON_APP, _, #diameter_packet{}}, _}
= event(Svc),
- {reconnect, Ref, _} = event(Svc).
+ {reconnect, Ref, _} = event(Svc, 4000, 10000).
%% Connect with matching capabilities but have the server delay its
%% CEA and cause the client to timeout.
cea_timeout(Config) ->
{Svc, Ref} = connect(Config, [{capx_timeout, ?SERVER_CAPX_TMO div 2},
- {reconnect_timer, 2*?SERVER_CAPX_TMO}]),
+ {connect_timer, 2*?SERVER_CAPX_TMO}]),
start = event(Svc),
{closed, Ref, {'CEA', timeout}, _} = event(Svc).
@@ -159,12 +168,18 @@ connect(Config, Opts) ->
{Name, Ref}.
uniq() ->
- {MS,S,US} = now(),
- lists:flatten(io_lib:format("-~p-~p-~p-", [MS,S,US])).
+ "-" ++ diameter_util:unique_string().
event(Name) ->
receive #diameter_event{service = Name, info = T} -> T end.
+event(Name, TL, TH) ->
+ T0 = diameter_lib:now(),
+ Event = event(Name),
+ DT = diameter_lib:micro_diff(T0) div 1000,
+ {true, true, DT, Event} = {TL < DT, DT < TH, DT, Event},
+ Event.
+
start_service(Name, Opts) ->
diameter:start_service(Name, [{monitor, self()} | Opts]).
diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl
index 02c8d34361..ef8e459175 100644
--- a/lib/diameter/test/diameter_examples_SUITE.erl
+++ b/lib/diameter/test/diameter_examples_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,7 +24,10 @@
-module(diameter_examples_SUITE).
-export([suite/0,
- all/0]).
+ all/0,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2]).
%% testcases
-export([dict/1, dict/0,
@@ -46,7 +49,7 @@
%% The order here is significant and causes the server to listen
%% before the clients connect.
--define(NODES, [compile, server, client]).
+-define(NODES, [server, client]).
%% Options to ct_slave:start/2.
-define(TIMEOUTS, [{T, 15000} || T <- [boot_timeout,
@@ -63,6 +66,9 @@
%% Common dictionaries to inherit from examples.
-define(DICT0, [rfc3588_base, rfc6733_base]).
+%% Transport protocols over which the example Diameter nodes are run.
+-define(PROTS, [tcp, sctp]).
+
%% ===========================================================================
suite() ->
@@ -71,7 +77,34 @@ suite() ->
all() ->
[dict,
code,
- slave,
+ {group, all}].
+
+groups() ->
+ Tc = tc(),
+ [{all, [parallel], [{group, P} || P <- ?PROTS]}
+ | [{P, [], Tc} || P <- ?PROTS]].
+
+init_per_group(all, Config) ->
+ Config;
+
+init_per_group(tcp = N, Config) ->
+ [{group, N} | Config];
+
+init_per_group(sctp = N, Config) ->
+ case gen_sctp:open() of
+ {ok, Sock} ->
+ gen_sctp:close(Sock),
+ [{group, N} | Config];
+ {error, E} when E == eprotonosupport;
+ E == esocktnosupport -> %% fail on any other reason
+ {skip, no_sctp}
+ end.
+
+end_per_group(_, _) ->
+ ok.
+
+tc() ->
+ [slave,
enslave,
start,
traffic,
@@ -88,7 +121,7 @@ dict() ->
dict(_Config) ->
Dirs = [filename:join(H ++ ["examples", "dict"])
|| H <- [[code:lib_dir(diameter)], [here(), ".."]]],
- [] = [{F,D,RC} || {_,F} <- sort(find_files(Dirs, ".*\\.dia")),
+ [] = [{F,D,RC} || {_,F} <- sort(find_files(Dirs, ".*\\.dia$")),
D <- ?DICT0,
RC <- [make(F,D)],
RC /= ok].
@@ -184,17 +217,18 @@ make_name(Dict) ->
%% Compile example code under examples/code.
code(Config) ->
- Node = slave(hd(?NODES), here()),
+ Node = slave(compile, here()),
[] = rpc:call(Node,
?MODULE,
install,
- [proplists:get_value(priv_dir, Config)]).
+ [proplists:get_value(priv_dir, Config)]),
+ {ok, Node} = ct_slave:stop(compile).
%% Compile on another node since the code path may be modified.
install(PrivDir) ->
Top = install(here(), PrivDir),
Src = filename:join([Top, "examples", "code"]),
- Files = find_files([Src], ".*\\.erl"),
+ Files = find_files([Src], ".*\\.erl$"),
[] = [{F,E} || {_,F} <- Files,
{error, _, _} = E <- [compile:file(F, [warnings_as_errors,
return_errors])]].
@@ -226,7 +260,7 @@ install(Dir, PrivDir) ->
Inc = filename:join([Top, "include"]),
Gen = filename:join([Top, "src", "gen"]),
- Files = find_files([Inc, Gen], ".*\\.hrl"),
+ Files = find_files([Inc, Gen], ".*\\.hrl$"),
[] = [{F,E} || {_,F} <- Files,
B <- [filename:basename(F)],
D <- [filename:join([TmpInc, B])],
@@ -261,15 +295,15 @@ slave() ->
[{timetrap, {minutes, 10}}].
slave(_) ->
- T0 = now(),
+ T0 = diameter_lib:now(),
{ok, Node} = ct_slave:start(?MODULE, ?TIMEOUTS),
- T1 = now(),
+ T1 = diameter_lib:now(),
T2 = rpc:call(Node, erlang, now, []),
{ok, Node} = ct_slave:stop(?MODULE),
- now_diff([T0, T1, T2, now()]).
+ now_diff([T0, T1, T2, diameter_lib:now()]).
now_diff([T1,T2|_] = Ts) ->
- [timer:now_diff(T2,T1) | now_diff(tl(Ts))];
+ [diameter_lib:micro_diff(T2,T1) | now_diff(tl(Ts))];
now_diff(_) ->
[].
@@ -280,9 +314,10 @@ now_diff(_) ->
%% Start two nodes: one for the server, one for the client.
enslave(Config) ->
+ Prot = proplists:get_value(group, Config),
Dir = here(),
- Nodes = [{N, slave(N, Dir)} || N <- tl(?NODES)],
- ?util:write_priv(Config, nodes, Nodes).
+ Nodes = [{S, slave(N, Dir)} || S <- ?NODES, N <- [concat(Prot, S)]],
+ ?util:write_priv(Config, Prot, Nodes).
slave(Name, Dir) ->
{ok, Node} = ct_slave:start(Name, ?TIMEOUTS),
@@ -292,6 +327,9 @@ slave(Name, Dir) ->
[[Dir, filename:join([Dir, "..", "ebin"])]]),
Node.
+concat(Prot, Svc) ->
+ list_to_atom(atom_to_list(Prot) ++ atom_to_list(Svc)).
+
here() ->
filename:dirname(code:which(?MODULE)).
@@ -304,24 +342,25 @@ top(Dir, LibDir) ->
%% start/1
-start(server) ->
+start({server, Prot}) ->
ok = diameter:start(),
ok = server:start(),
- {ok, Ref} = server:listen(tcp),
- [_] = ?util:lport(tcp, Ref),
+ {ok, Ref} = server:listen(Prot),
+ [_] = ?util:lport(Prot, Ref),
ok;
-start(client) ->
+start({client = Svc, Prot}) ->
ok = diameter:start(),
- true = diameter:subscribe(client),
+ true = diameter:subscribe(Svc),
ok = client:start(),
- {ok, Ref} = client:connect(tcp),
+ {ok, Ref} = client:connect(Prot),
receive #diameter_event{info = {up, Ref, _, _, _}} -> ok end;
start(Config) ->
- Nodes = ?util:read_priv(Config, nodes),
+ Prot = proplists:get_value(group, Config),
+ Nodes = ?util:read_priv(Config, Prot),
[] = [RC || {T,N} <- Nodes,
- RC <- [rpc:call(N, ?MODULE, start, [T])],
+ RC <- [rpc:call(N, ?MODULE, start, [{T, Prot}])],
RC /= ok].
%% traffic/1
@@ -336,7 +375,8 @@ traffic(client) ->
receive {'DOWN', MRef, process, _, Reason} -> Reason end;
traffic(Config) ->
- Nodes = ?util:read_priv(Config, nodes),
+ Prot = proplists:get_value(group, Config),
+ Nodes = ?util:read_priv(Config, Prot),
[] = [RC || {T,N} <- Nodes,
RC <- [rpc:call(N, ?MODULE, traffic, [T])],
RC /= ok].
@@ -355,5 +395,6 @@ stop(Name)
{ok, _Node} = ct_slave:stop(Name),
ok;
-stop(_Config) ->
- [] = [RC || N <- ?NODES, RC <- [stop(N)], RC /= ok].
+stop(Config) ->
+ Prot = proplists:get_value(group, Config),
+ [] = [RC || N <- ?NODES, RC <- [catch stop(concat(Prot, N))], RC /= ok].
diff --git a/lib/diameter/test/diameter_failover_SUITE.erl b/lib/diameter/test/diameter_failover_SUITE.erl
index dfd3253827..c1494dcdb1 100644
--- a/lib/diameter/test/diameter_failover_SUITE.erl
+++ b/lib/diameter/test/diameter_failover_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,6 +47,7 @@
send_discard_1/1,
send_discard_2/1,
stop_services/1,
+ empty/1,
stop/1]).
%% diameter callbacks
@@ -121,6 +122,7 @@ all() ->
send_discard_1,
send_discard_2,
stop_services,
+ empty,
stop].
%% ===========================================================================
@@ -147,6 +149,10 @@ stop_services(_Config) ->
T <- [diameter:stop_service(H)],
T /= ok].
+%% Ensure transports have been removed from request table.
+empty(_Config) ->
+ [] = ets:tab2list(diameter_request).
+
stop(_Config) ->
ok = diameter:stop().
diff --git a/lib/diameter/test/diameter_gen_sctp_SUITE.erl b/lib/diameter/test/diameter_gen_sctp_SUITE.erl
index 51ccb1e6ec..4ea5e80095 100644
--- a/lib/diameter/test/diameter_gen_sctp_SUITE.erl
+++ b/lib/diameter/test/diameter_gen_sctp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -119,10 +119,10 @@ send_not_from_controlling_process(_) ->
send_not_from_controlling_process() ->
FPid = self(),
- {L, MRef} = spawn_monitor(fun() -> listen(FPid) end),%% listening process
+ {L, MRef} = spawn_monitor(fun() -> listen(FPid) end),
receive
{?MODULE, C, S} ->
- erlang:demonitor(MRef, [flush]),
+ demonitor(MRef, [flush]),
[L,C,S];
{'DOWN', MRef, process, _, _} = T ->
error(T)
@@ -137,13 +137,7 @@ listen(FPid) ->
LPid = self(),
spawn(fun() -> connect1(PortNr, FPid, LPid) end), %% connecting process
Id = assoc(Sock),
- ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], _Bin})
- = recv(). %% Waits with this as current_function.
-
-%% recv/0
-
-recv() ->
- receive T -> T end.
+ recv(Sock, Id).
%% connect1/3
@@ -154,7 +148,7 @@ connect1(PortNr, FPid, LPid) ->
FPid ! {?MODULE,
self(),
spawn(fun() -> send(Sock, Id) end)}, %% sending process
- MRef = erlang:monitor(process, LPid),
+ MRef = monitor(process, LPid),
down(MRef). %% Waits with this as current_function.
%% down/1
@@ -277,7 +271,8 @@ acc(N, Acc) ->
loop(Sock, MRef, Bin) ->
receive
- ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], B}) ->
+ ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], B})
+ when is_binary(B) ->
Sz = size(Bin),
{Sz, Bin} = {size(B), B}, %% assert
ok = send(Sock, Id, mark(Bin)),
@@ -291,7 +286,7 @@ loop(Sock, MRef, Bin) ->
%% connect2/3
connect2(Pid, PortNr, Bin) ->
- erlang:monitor(process, Pid),
+ monitor(process, Pid),
{ok, Sock} = open(),
ok = gen_sctp:connect_init(Sock, ?ADDR, PortNr, []),
@@ -301,19 +296,25 @@ connect2(Pid, PortNr, Bin) ->
%% T2 = time after listening process received our message
%% T3 = time after reply is received
- T1 = now(),
+ T1 = diameter_util:timestamp(),
ok = send(Sock, Id, Bin),
T2 = unmark(recv(Sock, Id)),
- T3 = now(),
- {timer:now_diff(T2, T1), timer:now_diff(T3, T2)}. %% {Outbound, Inbound}
+ T3 = diameter_util:timestamp(),
+ {diameter_lib:micro_diff(T2, T1), %% Outbound
+ diameter_lib:micro_diff(T3, T2)}. %% Inbound
%% recv/2
recv(Sock, Id) ->
receive
- ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], Bin}) ->
+ ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = I}], Bin})
+ when is_binary(Bin) ->
+ Id = I, %% assert
Bin;
- T -> %% eg. 'DOWN'
+ ?SCTP(S, _) ->
+ Sock = S, %% assert
+ recv(Sock, Id);
+ T ->
exit(T)
end.
@@ -325,7 +326,7 @@ send(Sock, Id, Bin) ->
%% mark/1
mark(Bin) ->
- Info = term_to_binary(now()),
+ Info = term_to_binary(diameter_util:timestamp()),
<<Info/binary, Bin/binary>>.
%% unmark/1
diff --git a/lib/diameter/test/diameter_gen_tcp_SUITE.erl b/lib/diameter/test/diameter_gen_tcp_SUITE.erl
index 7e232edb44..4b542e0156 100644
--- a/lib/diameter/test/diameter_gen_tcp_SUITE.erl
+++ b/lib/diameter/test/diameter_gen_tcp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2014-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,10 +18,10 @@
%%
%%
-%% Some gen_sctp-specific tests demonstrating problems that were
+%% Some gen_tcp-specific tests demonstrating problems that were
%% encountered during diameter development but have nothing
-%% specifically to do with diameter. At least one of them can cause
-%% diameter_traffic_SUITE testcases to fail.
+%% specifically to do with diameter. These can cause testcases in
+%% other suites to fail.
%%
-module(diameter_gen_tcp_SUITE).
@@ -30,7 +30,8 @@
all/0]).
%% testcases
--export([send_long/1]).
+-export([send_long/1,
+ connect/1]).
-define(LOOPBACK, {127,0,0,1}).
-define(GEN_OPTS, [binary, {active, true}, {ip, ?LOOPBACK}]).
@@ -41,7 +42,8 @@ suite() ->
[{timetrap, {minutes, 2}}].
all() ->
- [send_long].
+ [connect, %% Appears to fail only when run first.
+ send_long].
%% ===========================================================================
@@ -87,15 +89,6 @@ connect(PortNr, LPid) ->
LPid ! {self(), fun(B) -> send(Sock, B) end},
down(LPid).
-%% down/1
-
-down(Pid)
- when is_pid(Pid) ->
- down(erlang:monitor(process, Pid));
-
-down(MRef) ->
- receive {'DOWN', MRef, process, _, Reason} -> Reason end.
-
%% send/2
%%
%% Send from a spawned process just to avoid sending from the
@@ -104,3 +97,47 @@ down(MRef) ->
send(Sock, Bin) ->
{_, MRef} = spawn_monitor(fun() -> exit(gen_tcp:send(Sock, Bin)) end),
down(MRef).
+
+%% ===========================================================================
+
+%% connect/1
+%%
+%% Test that simultaneous connections succeed. This fails sporadically
+%% on OS X at the time of writing, when gen_tcp:connect/2 returns
+%% {error, econnreset}.
+
+connect(_) ->
+ {ok, LSock} = gen_tcp:listen(0, ?GEN_OPTS),
+ {ok, {_,PortNr}} = inet:sockname(LSock),
+ Count = lists:seq(1,8), %% 8 simultaneous connects
+ As = [gen_accept(LSock) || _ <- Count],
+ %% Wait for spawned processes to have called gen_tcp:accept/1
+ %% (presumably).
+ receive after 2000 -> ok end,
+ Cs = [gen_connect(PortNr) || _ <- Count],
+ [] = failures(Cs),
+ [] = failures(As).
+
+failures(Monitors) ->
+ [RC || {_, MRef} <- Monitors, RC <- [down(MRef)], ok /= element(1, RC)].
+
+gen_accept(LSock) ->
+ spawn_monitor(fun() ->
+ exit(gen_tcp:accept(LSock))
+ end).
+
+gen_connect(PortNr) ->
+ spawn_monitor(fun() ->
+ exit(gen_tcp:connect(?LOOPBACK, PortNr, ?GEN_OPTS))
+ end).
+
+%% ===========================================================================
+
+%% down/1
+
+down(Pid)
+ when is_pid(Pid) ->
+ down(monitor(process, Pid));
+
+down(MRef) ->
+ receive {'DOWN', MRef, process, _, Reason} -> Reason end.
diff --git a/lib/diameter/test/diameter_pool_SUITE.erl b/lib/diameter/test/diameter_pool_SUITE.erl
new file mode 100644
index 0000000000..a59cd66a2e
--- /dev/null
+++ b/lib/diameter/test/diameter_pool_SUITE.erl
@@ -0,0 +1,133 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%% Test of the pool_size option in connecting nodes with multiple
+%% connections.
+%%
+
+-module(diameter_pool_SUITE).
+
+-export([suite/0,
+ all/0,
+ init_per_testcase/2,
+ end_per_testcase/2,
+ init_per_suite/1,
+ end_per_suite/1]).
+
+%% testcases
+-export([tcp_connect/1,
+ sctp_connect/1,
+ any_connect/1]).
+
+%% ===========================================================================
+
+-define(util, diameter_util).
+
+%% Config for diameter:start_service/2.
+-define(SERVICE(Host),
+ [{'Origin-Host', Host ++ ".ericsson.com"},
+ {'Origin-Realm', "ericsson.com"},
+ {'Host-IP-Address', [{127,0,0,1}]},
+ {'Vendor-Id', 12345},
+ {'Product-Name', "OTP/diameter"},
+ {'Auth-Application-Id', [0]}, %% common
+ {'Acct-Application-Id', [3]}, %% accounting
+ {restrict_connections, false},
+ {application, [{alias, common},
+ {dictionary, diameter_gen_base_rfc6733},
+ {module, diameter_callback}]},
+ {application, [{alias, accounting},
+ {dictionary, diameter_gen_acct_rfc6733},
+ {module, diameter_callback}]}]).
+
+%% ===========================================================================
+
+suite() ->
+ [{timetrap, {seconds, 30}}].
+
+all() ->
+ [tcp_connect,
+ sctp_connect,
+ any_connect].
+
+init_per_testcase(_Name, Config) ->
+ Config.
+
+end_per_testcase(_Name, _Config) ->
+ diameter:stop().
+
+init_per_suite(Config) ->
+ [{sctp, ?util:have_sctp()} | Config].
+
+end_per_suite(_Config) ->
+ ok.
+
+%% ===========================================================================
+
+tcp_connect(_Config) ->
+ connect(tcp, tcp).
+
+sctp_connect(Config) ->
+ case lists:member({sctp, true}, Config) of
+ true -> connect(sctp, sctp);
+ false -> {skip, no_sctp}
+ end.
+
+any_connect(_Config) ->
+ connect(any, tcp).
+
+%% connect/2
+
+%% Establish multiple connections between a client and server.
+connect(ClientProt, ServerProt) ->
+ ok = diameter:start(),
+ [] = [{S,T} || S <- ["server", "client"],
+ T <- [diameter:start_service(S, ?SERVICE(S))],
+ T /= ok],
+ %% Listen with a single transport with pool_size = 4. Ensure the
+ %% expected number of transport processes are started.
+ LRef = ?util:listen("server", ServerProt, [{pool_size, 4}]),
+ {4,0} = count("server", LRef, accept), %% 4 transports, no connections
+ %% Establish 5 connections.
+ Ref = ?util:connect("client", ClientProt, LRef, [{pool_size, 5}]),
+ {5,5} = count("client", Ref, pool), %% 5 connections
+ %% Ensure the server has started replacement transports within a
+ %% reasonable time. Sleepsince there's no guarantee the
+ %% replacements have been started before the client has received
+ %% 'up' events. (Although it's likely.)
+ sleep(),
+ {9,5} = count("server", LRef, accept), %% 5 connections + 4 accepting
+ %% Ensure ther are still the expected number of accepting transports
+ %% after stopping the client service.
+ ok = diameter:stop_service("client"),
+ sleep(),
+ {4,0} = count("server", LRef, accept), %% 4 transports, no connections
+ %% Done.
+ ok = diameter:stop_service("server").
+
+count(Name, Ref, Key) ->
+ [{transport, [[{ref, Ref} | T]]},
+ {connections, Cs}]
+ = diameter:service_info(Name, [transport, connections]),
+ {Key, Ps} = lists:keyfind(Key, 1, T),
+ {length(Ps), length(Cs)}. %% number of processes, connections
+
+sleep() ->
+ receive after 1000 -> ok end.
diff --git a/lib/diameter/test/diameter_relay_SUITE.erl b/lib/diameter/test/diameter_relay_SUITE.erl
index 735a908d97..7142239bbb 100644
--- a/lib/diameter/test/diameter_relay_SUITE.erl
+++ b/lib/diameter/test/diameter_relay_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -49,6 +49,7 @@
send_timeout_1/1,
send_timeout_2/1,
info/1,
+ counters/1,
disconnect/1,
stop_services/1,
stop/1]).
@@ -120,6 +121,7 @@ all() ->
start_services,
connect,
{group, all},
+ counters,
{group, all, [parallel]},
disconnect,
stop_services,
@@ -201,8 +203,8 @@ send3(_Config) ->
send4(_Config) ->
call(?SERVER4).
-%% Send an ASR that loops between the relays and expect the loop to
-%% be detected.
+%% Send an ASR that loops between the relays (RELAY1 -> RELAY2 ->
+%% RELAY1) and expect the loop to be detected.
send_loop(_Config) ->
Req = ['ASR', {'Destination-Realm', realm(?SERVER1)},
{'Destination-Host', ?SERVER1},
@@ -227,8 +229,103 @@ send_timeout(Tmo) ->
call(Req, [{filter, realm}, {timeout, Tmo}]).
info(_Config) ->
+ %% Wait for RELAY1 to have answered all requests, so that the
+ %% suite doesn't end before all answers are sent and counted.
+ receive after 6000 -> ok end,
[] = ?util:info().
+counters(_Config) ->
+ [] = ?util:run([[fun counters/2, K, S]
+ || K <- [statistics, transport, connections],
+ S <- ?SERVICES]).
+
+counters(Key, Svc) ->
+ counters(Key, Svc, [_|_] = diameter:service_info(Svc, Key)).
+
+counters(statistics, Svc, Stats) ->
+ stats(Svc, lists:foldl(fun({K,N},D) -> orddict:update_counter(K, N, D) end,
+ orddict:new(),
+ lists:append([L || {P,L} <- Stats, is_pid(P)])));
+
+counters(_, _, _) ->
+ todo.
+
+stats(?CLIENT, L) ->
+ [{{{0,257,0},recv},2}, %% CEA
+ {{{0,257,1},send},2}, %% CER
+ {{{0,258,0},recv},1}, %% RAA (send_timeout_1)
+ {{{0,258,1},send},2}, %% RAR (send_timeout_[12])
+ {{{0,274,0},recv},1}, %% ASA (send_loop)
+ {{{0,274,1},send},1}, %% ASR (send_loop)
+ {{{0,275,0},recv},4}, %% STA (send[1-4])
+ {{{0,275,1},send},4}, %% STR (send[1-4])
+ {{{unknown,0},recv,discarded},1}, %% RAR (send_timeout_2)
+ {{{0,257,0},recv,{'Result-Code',2001}},2}, %% CEA
+ {{{0,258,0},recv,{'Result-Code',3002}},1}, %% RAA (send_timeout_1)
+ {{{0,274,0},recv,{'Result-Code',3005}},1}, %% ASA (send_loop)
+ {{{0,275,0},recv,{'Result-Code',2001}},4}] %% STA (send[1-4])
+ = L;
+
+stats(S, L)
+ when S == ?SERVER1;
+ S == ?SERVER2;
+ S == ?SERVER3;
+ S == ?SERVER4 ->
+ [{{{0,257,0},send},1}, %% CEA
+ {{{0,257,1},recv},1}, %% CER
+ {{{0,275,0},send},1}, %% STA (send[1-4])
+ {{{0,275,1},recv},1}, %% STR (send[1-4])
+ {{{0,257,0},send,{'Result-Code',2001}},1}, %% CEA
+ {{{0,275,0},send,{'Result-Code',2001}},1}] %% STA (send[1-4])
+ = L;
+
+stats(?RELAY1, L) ->
+ [{{{relay,0},recv},3}, %% STA x 2 (send[12])
+ %% ASA (send_loop)
+ {{{relay,0},send},6}, %% STA x 2 (send[12])
+ %% ASA x 2 (send_loop)
+ %% RAA x 2 (send_timeout_[12])
+ {{{relay,1},recv},6}, %% STR x 2 (send[12])
+ %% ASR x 2 (send_loop)
+ %% RAR x 2 (send_timeout_[12])
+ {{{relay,1},send},5}, %% STR x 2 (send[12])
+ %% ASR (send_loop)
+ %% RAR x 2 (send_timeout_[12])
+ {{{0,257,0},recv},3}, %% CEA
+ {{{0,257,0},send},1}, %% "
+ {{{0,257,1},recv},1}, %% CER
+ {{{0,257,1},send},3}, %% "
+ {{{relay,0},recv,{'Result-Code',2001}},2}, %% STA x 2 (send[34])
+ {{{relay,0},recv,{'Result-Code',3005}},1}, %% ASA (send_loop)
+ {{{relay,0},send,{'Result-Code',2001}},2}, %% STA x 2 (send[34])
+ {{{relay,0},send,{'Result-Code',3002}},2}, %% RAA (send_timeout_[12])
+ {{{relay,0},send,{'Result-Code',3005}},2}, %% ASA (send_loop)
+ {{{0,257,0},recv,{'Result-Code',2001}},3}, %% CEA
+ {{{0,257,0},send,{'Result-Code',2001}},1}] %% "
+ = L;
+
+stats(?RELAY2, L) ->
+ [{{{relay,0},recv},3}, %% STA x 2 (send[34])
+ %% ASA (send_loop)
+ {{{relay,0},send},3}, %% STA x 2 (send[34])
+ %% ASA (send_loop)
+ {{{relay,1},recv},5}, %% STR x 2 (send[34])
+ %% RAR x 2 (send_timeout_[12])
+ %% ASR (send_loop)
+ {{{relay,1},send},3}, %% STR x 2 (send[34])
+ %% ASR (send_loop)
+ {{{0,257,0},recv},2}, %% CEA
+ {{{0,257,0},send},2}, %% "
+ {{{0,257,1},recv},2}, %% CER
+ {{{0,257,1},send},2}, %% "
+ {{{relay,0},recv,{'Result-Code',2001}},2}, %% STA x 2 (send[34])
+ {{{relay,0},recv,{'Result-Code',3005}},1}, %% ASA (send_loop)
+ {{{relay,0},send,{'Result-Code',2001}},2}, %% STA x 2 (send[34])
+ {{{relay,0},send,{'Result-Code',3005}},1}, %% ASA (send_loop)
+ {{{0,257,0},recv,{'Result-Code',2001}},2}, %% CEA
+ {{{0,257,0},send,{'Result-Code',2001}},2}] %% "
+ = L.
+
%% ===========================================================================
realm(Host) ->
@@ -303,18 +400,24 @@ handle_request(Pkt, OH, {_Ref, #diameter_caps{origin_host = {OH,_}} = Caps})
when OH /= ?CLIENT ->
request(Pkt, Caps).
-%% RELAY1 routes any ASR or RAR to RELAY2 ...
+%% RELAY1 answers ACR after it's timed out at the client.
+request(#diameter_packet{header = #diameter_header{cmd_code = 271}},
+ #diameter_caps{origin_host = {?RELAY1, _}}) ->
+ receive after 1000 -> {answer_message, 3004} end; %% TOO_BUSY
+
+%% RELAY1 routes any ASR or RAR to RELAY2.
request(#diameter_packet{header = #diameter_header{cmd_code = C}},
#diameter_caps{origin_host = {?RELAY1, _}})
when C == 274; %% ASR
C == 258 -> %% RAR
{relay, [{filter, {realm, realm(?RELAY2)}}]};
-%% ... which in turn routes it back. Expect diameter to either answer
-%% either with DIAMETER_LOOP_DETECTED/DIAMETER_UNABLE_TO_COMPLY.
+%% RELAY2 routes ASR back to RELAY1 to induce DIAMETER_LOOP_DETECTED.
request(#diameter_packet{header = #diameter_header{cmd_code = 274}},
#diameter_caps{origin_host = {?RELAY2, _}}) ->
{relay, [{filter, {host, ?RELAY1}}]};
+
+%% RELAY2 discards RAR to induce DIAMETER_UNABLE_TO_DELIVER.
request(#diameter_packet{header = #diameter_header{cmd_code = 258}},
#diameter_caps{origin_host = {?RELAY2, _}}) ->
discard;
diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl
index 55565692ec..e5bbda9c91 100644
--- a/lib/diameter/test/diameter_tls_SUITE.erl
+++ b/lib/diameter/test/diameter_tls_SUITE.erl
@@ -319,19 +319,19 @@ make_cert(Dir, Base) ->
make_cert(Dir, Base ++ "_key.pem", Base ++ "_ca.pem").
make_cert(Dir, Keyfile, Certfile) ->
- [K,C] = Paths = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]],
+ [KP,CP] = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]],
- KCmd = join(["openssl genrsa -out", K, "2048"]),
- CCmd = join(["openssl req -new -x509 -key", K, "-out", C, "-days 7",
- "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]),
+ KC = join(["openssl genrsa -out", KP, "2048"]),
+ CC = join(["openssl req -new -x509 -key", KP, "-out", CP, "-days 7",
+ "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]),
%% Hope for the best and only check that files are written.
- os:cmd(KCmd),
- os:cmd(CCmd),
+ [{_, _, {ok,_}},{_, _, {ok,_}}]
+ = [{P,O,T} || {P,C} <- [{KP,KC}, {CP,CC}],
+ O <- [os:cmd(C)],
+ T <- [file:read_file_info(P)]],
- [_,_] = [T || P <- Paths, {ok, T} <- [file:read_file_info(P)]],
-
- {K,C}.
+ {KP,CP}.
join(Strs) ->
string:join(Strs, " ").
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index a97c54fc04..17faf30a9b 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,9 +41,12 @@
send_eval/1,
send_bad_answer/1,
send_protocol_error/1,
+ send_experimental_result/1,
send_arbitrary/1,
send_unknown/1,
+ send_unknown_short/1,
send_unknown_mandatory/1,
+ send_unknown_short_mandatory/1,
send_noreply/1,
send_unsupported/1,
send_unsupported_app/1,
@@ -54,8 +57,10 @@
send_zero_avp_length/1,
send_invalid_avp_length/1,
send_invalid_reject/1,
- send_unrecognized_mandatory/1,
+ send_unexpected_mandatory_decode/1,
+ send_unexpected_mandatory/1,
send_long/1,
+ send_maxlen/1,
send_nopeer/1,
send_noapp/1,
send_discard/1,
@@ -119,8 +124,6 @@
-define(ADDR, {127,0,0,1}).
--define(CLIENT, "CLIENT").
--define(SERVER, "SERVER").
-define(REALM, "erlang.org").
-define(HOST(Host, Realm), Host ++ [$.|Realm]).
@@ -138,11 +141,23 @@
%% Which common dictionary to use in the clients.
-define(RFCS, [rfc3588, rfc6733]).
+%% Whether to decode stringish Diameter types to strings, or leave
+%% them as binary.
+-define(STRING_DECODES, [true, false]).
+
+%% Which transport protocol to use.
+-define(TRANSPORTS, [tcp, sctp]).
+
-record(group,
- {client_encoding,
+ {transport,
+ client_service,
+ client_encoding,
client_dict0,
+ client_strings,
+ server_service,
server_encoding,
- server_container}).
+ server_container,
+ server_strings}).
%% Not really what we should be setting unless the message is sent in
%% the common application but diameter doesn't care.
@@ -163,7 +178,7 @@
?answer_message(_, ResultCode)).
%% Config for diameter:start_service/2.
--define(SERVICE(Name),
+-define(SERVICE(Name, Decode),
[{'Origin-Host', Name ++ "." ++ ?REALM},
{'Origin-Realm', ?REALM},
{'Host-IP-Address', [?ADDR]},
@@ -172,6 +187,8 @@
{'Auth-Application-Id', [?DIAMETER_APP_ID_COMMON]},
{'Acct-Application-Id', [?DIAMETER_APP_ID_ACCOUNTING]},
{restrict_connections, false},
+ {string_decode, Decode},
+ {incoming_maxlen, 1 bsl 21},
{spawn_opt, [{min_heap_size, 5000}]}
| [{application, [{dictionary, D},
{module, ?MODULE},
@@ -221,37 +238,78 @@
%% ===========================================================================
suite() ->
- [{timetrap, {seconds, 60}}].
+ [{timetrap, {seconds, 10}}].
all() ->
- [start, start_services, add_transports, result_codes]
- ++ [{group, ?util:name([R,D,A,C]), P} || R <- ?ENCODINGS,
- D <- ?RFCS,
- A <- ?ENCODINGS,
- C <- ?CONTAINERS,
- P <- [[], [parallel]]]
- ++ [outstanding, remove_transports, empty, stop_services, stop].
+ [start, result_codes, {group, traffic}, outstanding, empty, stop].
groups() ->
Ts = tc(),
- [{?util:name([R,D,A,C]), [], Ts} || R <- ?ENCODINGS,
- D <- ?RFCS,
- A <- ?ENCODINGS,
- C <- ?CONTAINERS].
+ Sctp = ?util:have_sctp(),
+ [{?util:name([R,D,A,C]), [parallel], Ts} || R <- ?ENCODINGS,
+ D <- ?RFCS,
+ A <- ?ENCODINGS,
+ C <- ?CONTAINERS]
+ ++
+ [{?util:name([T,R,D,A,C,SD,CD]),
+ [],
+ [start_services,
+ add_transports,
+ result_codes,
+ {group, ?util:name([R,D,A,C])},
+ remove_transports,
+ stop_services]}
+ || T <- ?TRANSPORTS,
+ T /= sctp orelse Sctp,
+ R <- ?ENCODINGS,
+ D <- ?RFCS,
+ A <- ?ENCODINGS,
+ C <- ?CONTAINERS,
+ SD <- ?STRING_DECODES,
+ CD <- ?STRING_DECODES]
+ ++
+ [{traffic, [parallel], [{group, ?util:name([T,R,D,A,C,SD,CD])}
+ || T <- ?TRANSPORTS,
+ T /= sctp orelse Sctp,
+ R <- ?ENCODINGS,
+ D <- ?RFCS,
+ A <- ?ENCODINGS,
+ C <- ?CONTAINERS,
+ SD <- ?STRING_DECODES,
+ CD <- ?STRING_DECODES]}].
init_per_group(Name, Config) ->
- [R,D,A,C] = ?util:name(Name),
- G = #group{client_encoding = R,
- client_dict0 = dict0(D),
- server_encoding = A,
- server_container = C},
- [{group, G} | Config].
+ case ?util:name(Name) of
+ [T,R,D,A,C,SD,CD] ->
+ G = #group{transport = T,
+ client_service = [$C|?util:unique_string()],
+ client_encoding = R,
+ client_dict0 = dict0(D),
+ client_strings = CD,
+ server_service = [$S|?util:unique_string()],
+ server_encoding = A,
+ server_container = C,
+ server_strings = SD},
+ [{group, G} | Config];
+ _ ->
+ Config
+ end.
end_per_group(_, _) ->
ok.
+%% Skip testcases that can reasonably fail under SCTP.
init_per_testcase(Name, Config) ->
- [{testcase, Name} | Config].
+ case [skip || #group{transport = sctp}
+ <- [proplists:get_value(group, Config)],
+ send_maxlen == Name
+ orelse send_long == Name]
+ of
+ [skip] ->
+ {skip, sctp};
+ [] ->
+ [{testcase, Name} | Config]
+ end.
end_per_testcase(_, _) ->
ok.
@@ -264,9 +322,12 @@ tc() ->
send_eval,
send_bad_answer,
send_protocol_error,
+ send_experimental_result,
send_arbitrary,
send_unknown,
+ send_unknown_short,
send_unknown_mandatory,
+ send_unknown_short_mandatory,
send_noreply,
send_unsupported,
send_unsupported_app,
@@ -277,8 +338,10 @@ tc() ->
send_zero_avp_length,
send_invalid_avp_length,
send_invalid_reject,
- send_unrecognized_mandatory,
+ send_unexpected_mandatory_decode,
+ send_unexpected_mandatory,
send_long,
+ send_maxlen,
send_nopeer,
send_noapp,
send_discard,
@@ -313,19 +376,29 @@ tc() ->
start(_Config) ->
ok = diameter:start().
-start_services(_Config) ->
- ok = diameter:start_service(?SERVER, ?SERVICE(?SERVER)),
- ok = diameter:start_service(?CLIENT, [{sequence, ?CLIENT_MASK}
- | ?SERVICE(?CLIENT)]).
+start_services(Config) ->
+ #group{client_service = CN,
+ client_strings = CD,
+ server_service = SN,
+ server_strings = SD}
+ = group(Config),
+ ok = diameter:start_service(SN, ?SERVICE(SN, SD)),
+ ok = diameter:start_service(CN, [{sequence, ?CLIENT_MASK}
+ | ?SERVICE(CN, CD)]).
add_transports(Config) ->
- LRef = ?util:listen(?SERVER,
- tcp,
+ #group{transport = T,
+ client_service = CN,
+ server_service = SN}
+ = group(Config),
+ LRef = ?util:listen(SN,
+ T,
[{capabilities_cb, fun capx/2},
+ {pool_size, 8},
{spawn_opt, [{min_heap_size, 8096}]},
{applications, apps(rfc3588)}]),
- Cs = [?util:connect(?CLIENT,
- tcp,
+ Cs = [?util:connect(CN,
+ T,
LRef,
[{id, Id},
{capabilities, [{'Origin-State-Id', origin(Id)}]},
@@ -348,12 +421,18 @@ outstanding(_Config) ->
is_atom(element(1,T))].
remove_transports(Config) ->
+ #group{client_service = CN,
+ server_service = SN}
+ = group(Config),
[LRef | Cs] = ?util:read_priv(Config, "transport"),
- [?util:disconnect(?CLIENT, C, ?SERVER, LRef) || C <- Cs].
+ [?util:disconnect(CN, C, SN, LRef) || C <- Cs].
-stop_services(_Config) ->
- ok = diameter:stop_service(?CLIENT),
- ok = diameter:stop_service(?SERVER).
+stop_services(Config) ->
+ #group{client_service = CN,
+ server_service = SN}
+ = group(Config),
+ ok = diameter:stop_service(CN),
+ ok = diameter:stop_service(SN).
%% Ensure even transports have been removed from request table.
empty(_Config) ->
@@ -388,7 +467,7 @@ send_ok(Config) ->
Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD},
{'Accounting-Record-Number', 1}],
- ['ACA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['ACA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req).
%% Send an accounting ACR that the server answers badly to.
@@ -404,16 +483,17 @@ send_eval(Config) ->
Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD},
{'Accounting-Record-Number', 3}],
- ['ACA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['ACA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req).
%% Send an accounting ACR that the server tries to answer with an
-%% inappropriate header, resulting in no answer being sent and the
-%% request timing out.
+%% inappropriate header. That the error is detected is coded in
+%% handle_answer.
send_bad_answer(Config) ->
Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD},
{'Accounting-Record-Number', 2}],
- {timeout, _} = call(Config, Req).
+ ?answer_message(?SUCCESS)
+ = call(Config, Req).
%% Send an ACR that the server callback answers explicitly with a
%% protocol error.
@@ -424,35 +504,62 @@ send_protocol_error(Config) ->
?answer_message(?TOO_BUSY)
= call(Config, Req).
+%% Send a 3xxx Experimental-Result in an answer not setting the E-bit
+%% and missing a Result-Code.
+send_experimental_result(Config) ->
+ Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD},
+ {'Accounting-Record-Number', 5}],
+ ['ACA', {'Session-Id', _} | _]
+ = call(Config, Req).
+
%% Send an ASR with an arbitrary non-mandatory AVP and expect success
%% and the same AVP in the reply.
send_arbitrary(Config) ->
Req = ['ASR', {'AVP', [#diameter_avp{name = 'Product-Name',
value = "XXX"}]}],
- ['ASA', _SessionId, {'Result-Code', ?SUCCESS} | Avps]
+ ['ASA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | Avps]
= call(Config, Req),
{'AVP', [#diameter_avp{name = 'Product-Name',
- value = "XXX"}]}
- = lists:last(Avps).
+ value = V}]}
+ = lists:last(Avps),
+ "XXX" = string(V, Config).
%% Send an unknown AVP (to some client) and check that it comes back.
send_unknown(Config) ->
Req = ['ASR', {'AVP', [#diameter_avp{code = 999,
is_mandatory = false,
data = <<17>>}]}],
- ['ASA', _SessionId, {'Result-Code', ?SUCCESS} | Avps]
+ ['ASA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | Avps]
= call(Config, Req),
{'AVP', [#diameter_avp{code = 999,
is_mandatory = false,
data = <<17>>}]}
= lists:last(Avps).
+%% Ditto, and point the AVP length past the end of the message. Expect
+%% 5014.
+send_unknown_short(Config) ->
+ send_unknown_short(Config, false, ?INVALID_AVP_LENGTH).
+
+send_unknown_short(Config, M, RC) ->
+ Req = ['ASR', {'AVP', [#diameter_avp{code = 999,
+ is_mandatory = M,
+ data = <<17>>}]}],
+ ['ASA', {'Session-Id', _}, {'Result-Code', RC} | Avps]
+ = call(Config, Req),
+ [#'diameter_base_Failed-AVP'{'AVP' = As}]
+ = proplists:get_value('Failed-AVP', Avps),
+ [#diameter_avp{code = 999,
+ is_mandatory = M,
+ data = <<17, _/binary>>}] %% extra bits from padding
+ = As.
+
%% Ditto but set the M flag.
send_unknown_mandatory(Config) ->
Req = ['ASR', {'AVP', [#diameter_avp{code = 999,
is_mandatory = true,
data = <<17>>}]}],
- ['ASA', _SessionId, {'Result-Code', ?AVP_UNSUPPORTED} | Avps]
+ ['ASA', {'Session-Id', _}, {'Result-Code', ?AVP_UNSUPPORTED} | Avps]
= call(Config, Req),
[#'diameter_base_Failed-AVP'{'AVP' = As}]
= proplists:get_value('Failed-AVP', Avps),
@@ -461,6 +568,27 @@ send_unknown_mandatory(Config) ->
data = <<17>>}]
= As.
+%% Ditto, and point the AVP length past the end of the message. Expect
+%% 5014 instead of 5001.
+send_unknown_short_mandatory(Config) ->
+ send_unknown_short(Config, true, ?INVALID_AVP_LENGTH).
+
+%% Send an ACR containing an unexpected mandatory Session-Timeout.
+%% Expect 5001, and check that the value in Failed-AVP was decoded.
+send_unexpected_mandatory_decode(Config) ->
+ Req = ['ASR', {'AVP', [#diameter_avp{code = 27, %% Session-Timeout
+ is_mandatory = true,
+ data = <<12:32>>}]}],
+ ['ASA', {'Session-Id', _}, {'Result-Code', ?AVP_UNSUPPORTED} | Avps]
+ = call(Config, Req),
+ [#'diameter_base_Failed-AVP'{'AVP' = As}]
+ = proplists:get_value('Failed-AVP', Avps),
+ [#diameter_avp{code = 27,
+ is_mandatory = true,
+ value = 12,
+ data = <<12:32>>}]
+ = As.
+
%% Send an STR that the server ignores.
send_noreply(Config) ->
Req = ['STR', {'Termination-Cause', ?BAD_ANSWER}],
@@ -487,7 +615,7 @@ send_error_bit(Config) ->
%% Send a bad version and check that we get 5011.
send_unsupported_version(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
- ['STA', _SessionId, {'Result-Code', ?UNSUPPORTED_VERSION} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?UNSUPPORTED_VERSION} | _]
= call(Config, Req).
%% Send a request containing an AVP length > data size.
@@ -507,14 +635,14 @@ send_zero_avp_length(Config) ->
send_invalid_avp_length(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
- ['STA', _SessionId,
+ ['STA', {'Session-Id', _},
{'Result-Code', ?INVALID_AVP_LENGTH},
- _OriginHost,
- _OriginRealm,
- _UserName,
- _Class,
- _ErrorMessage,
- _ErrorReportingHost,
+ {'Origin-Host', _},
+ {'Origin-Realm', _},
+ {'User-Name', _},
+ {'Class', _},
+ {'Error-Message', _},
+ {'Error-Reporting-Host', _},
{'Failed-AVP', [#'diameter_base_Failed-AVP'{'AVP' = [_]}]}
| _]
= call(Config, Req).
@@ -527,30 +655,38 @@ send_invalid_reject(Config) ->
?answer_message(?TOO_BUSY)
= call(Config, Req).
-%% Send an STR containing a known AVP, but one that's not allowed and
-%% sets the M-bit.
-send_unrecognized_mandatory(Config) ->
+%% Send an STR containing a known AVP, but one that's not expected and
+%% that sets the M-bit.
+send_unexpected_mandatory(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
- ['STA', _SessionId, {'Result-Code', ?AVP_UNSUPPORTED} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?AVP_UNSUPPORTED} | _]
= call(Config, Req).
%% Send something long that will be fragmented by TCP.
send_long(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT},
{'User-Name', [lists:duplicate(1 bsl 20, $X)]}],
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req).
+%% Send something longer than the configure incoming_maxlen.
+send_maxlen(Config) ->
+ Req = ['STR', {'Termination-Cause', ?LOGOUT},
+ {'User-Name', [lists:duplicate(1 bsl 21, $X)]}],
+ {timeout, _} = call(Config, Req).
+
%% Send something for which pick_peer finds no suitable peer.
send_nopeer(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
{error, no_connection} = call(Config, Req, [{extra, [?EXTRA]}]).
%% Send something on an unconfigured application.
-send_noapp(_Config) ->
+send_noapp(Config) ->
+ #group{client_service = CN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
- {error, no_connection} = diameter:call(?CLIENT, unknown_alias, Req).
+ {error, no_connection} = diameter:call(CN, unknown_alias, Req).
%% Send something that's discarded by prepare_request.
send_discard(Config) ->
@@ -562,8 +698,10 @@ send_any_1(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
{error, no_connection} = call(Config, Req, [{filter, {any, []}}]).
send_any_2(Config) ->
+ #group{server_service = SN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT},
- {'Destination-Host', [?HOST(?SERVER, "unknown.org")]}],
+ {'Destination-Host', [?HOST(SN, "unknown.org")]}],
?answer_message(?UNABLE_TO_DELIVER)
= call(Config, Req, [{filter, {any, [host, realm]}}]).
@@ -571,12 +709,14 @@ send_any_2(Config) ->
send_all_1(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
Realm = lists:foldr(fun(C,A) -> [C,A] end, [], ?REALM),
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req, [{filter, {all, [{host, any},
{realm, Realm}]}}]).
send_all_2(Config) ->
+ #group{server_service = SN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT},
- {'Destination-Host', [?HOST(?SERVER, "unknown.org")]}],
+ {'Destination-Host', [?HOST(SN, "unknown.org")]}],
{error, no_connection}
= call(Config, Req, [{filter, {all, [host, realm]}}]).
@@ -589,9 +729,8 @@ send_timeout(Config) ->
%% received the Session-Id.
send_error(Config) ->
Req = ['RAR', {'Re-Auth-Request-Type', ?AUTHORIZE_AUTHENTICATE}],
- ?answer_message(SId, ?TOO_BUSY)
- = call(Config, Req),
- true = undefined /= SId.
+ ?answer_message([_], ?TOO_BUSY)
+ = call(Config, Req).
%% Send a request with the detached option and receive it as a message
%% from handle_answer instead.
@@ -600,7 +739,7 @@ send_detach(Config) ->
Ref = make_ref(),
ok = call(Config, Req, [{extra, [{self(), Ref}]}, detach]),
Ans = receive {Ref, T} -> T end,
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= Ans.
%% Send a request which can't be encoded and expect {error, encode}.
@@ -609,13 +748,15 @@ send_encode_error(Config) ->
%% Send with filtering and expect success.
send_destination_1(Config) ->
+ #group{server_service = SN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT},
- {'Destination-Host', [?HOST(?SERVER, ?REALM)]}],
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ {'Destination-Host', [?HOST(SN, ?REALM)]}],
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req, [{filter, {all, [host, realm]}}]).
send_destination_2(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, Req, [{filter, {all, [host, realm]}}]).
%% Send with filtering on and expect failure when specifying an
@@ -626,8 +767,10 @@ send_destination_3(Config) ->
{error, no_connection}
= call(Config, Req, [{filter, {all, [host, realm]}}]).
send_destination_4(Config) ->
+ #group{server_service = SN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT},
- {'Destination-Host', [?HOST(?SERVER, "unknown.org")]}],
+ {'Destination-Host', [?HOST(SN, "unknown.org")]}],
{error, no_connection}
= call(Config, Req, [{filter, {all, [host, realm]}}]).
@@ -639,8 +782,10 @@ send_destination_5(Config) ->
?answer_message(?REALM_NOT_SERVED)
= call(Config, Req).
send_destination_6(Config) ->
+ #group{server_service = SN}
+ = group(Config),
Req = ['STR', {'Termination-Cause', ?LOGOUT},
- {'Destination-Host', [?HOST(?SERVER, "unknown.org")]}],
+ {'Destination-Host', [?HOST(SN, "unknown.org")]}],
?answer_message(?UNABLE_TO_DELIVER)
= call(Config, Req).
@@ -675,7 +820,7 @@ send_bad_filter(Config, F) ->
%% Specify multiple filter options and expect them be conjunctive.
send_multiple_filters_1(Config) ->
Fun = fun(#diameter_caps{}) -> true end,
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= send_multiple_filters(Config, [host, {eval, Fun}]).
send_multiple_filters_2(Config) ->
E = {erlang, is_tuple, []},
@@ -686,7 +831,7 @@ send_multiple_filters_3(Config) ->
E2 = {erlang, is_tuple, []},
E3 = {erlang, is_record, [diameter_caps]},
E4 = [{erlang, is_record, []}, diameter_caps],
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= send_multiple_filters(Config, [{eval, E} || E <- [E1,E2,E3,E4]]).
send_multiple_filters(Config, Fs) ->
@@ -697,24 +842,39 @@ send_multiple_filters(Config, Fs) ->
%% only the return value from the prepare_request callback being
%% significant.
send_anything(Config) ->
- ['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
+ ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
= call(Config, anything).
%% ===========================================================================
+group(Config) ->
+ #group{} = proplists:get_value(group, Config).
+
+string(V, Config) ->
+ #group{client_strings = B} = group(Config),
+ decode(V,B).
+
+decode(S, true)
+ when is_list(S) ->
+ S;
+decode(B, false)
+ when is_binary(B) ->
+ binary_to_list(B).
+
call(Config, Req) ->
call(Config, Req, []).
call(Config, Req, Opts) ->
Name = proplists:get_value(testcase, Config),
- #group{client_encoding = ReqEncoding,
+ #group{client_service = CN,
+ client_encoding = ReqEncoding,
client_dict0 = Dict0}
= Group
- = proplists:get_value(group, Config),
- diameter:call(?CLIENT,
+ = group(Config),
+ diameter:call(CN,
dict(Req, Dict0),
msg(Req, ReqEncoding, Dict0),
- [{extra, [{Name, Group}, now()]} | Opts]).
+ [{extra, [{Name, Group}, diameter_lib:now()]} | Opts]).
origin({A,C}) ->
2*codec(A) + container(C);
@@ -798,35 +958,38 @@ peer_down(_SvcName, _Peer, State) ->
%% pick_peer/6-7
-pick_peer(Peers, _, ?CLIENT, _State, {Name, Group}, _)
+pick_peer(Peers, _, [$C|_], _State, {Name, Group}, _)
when Name /= send_detach ->
find(Group, Peers).
-pick_peer(_Peers, _, ?CLIENT, _State, {send_nopeer, _}, _, ?EXTRA) ->
+pick_peer(_Peers, _, [$C|_], _State, {send_nopeer, _}, _, ?EXTRA) ->
false;
-pick_peer(Peers, _, ?CLIENT, _State, {send_detach, Group}, _, {_,_}) ->
+pick_peer(Peers, _, [$C|_], _State, {send_detach, Group}, _, {_,_}) ->
find(Group, Peers).
-find(#group{server_encoding = A, server_container = C}, Peers) ->
+find(#group{client_service = CN,
+ server_encoding = A,
+ server_container = C},
+ Peers) ->
Id = {A,C},
- [P] = [P || P <- Peers, id(Id, P)],
+ [P] = [P || P <- Peers, id(Id, P, CN)],
{ok, P}.
-id(Id, {Pid, _Caps}) ->
+id(Id, {Pid, _Caps}, SvcName) ->
[{ref, _}, {type, _}, {options, Opts} | _]
- = diameter:service_info(?CLIENT, Pid),
+ = diameter:service_info(SvcName, Pid),
lists:member({id, Id}, Opts).
%% prepare_request/5-6
-prepare_request(_Pkt, ?CLIENT, {_Ref, _Caps}, {send_discard, _}, _) ->
+prepare_request(_Pkt, [$C|_], {_Ref, _Caps}, {send_discard, _}, _) ->
{discard, unprepared};
-prepare_request(Pkt, ?CLIENT, {_Ref, Caps}, {Name, Group}, _) ->
+prepare_request(Pkt, [$C|_], {_Ref, Caps}, {Name, Group}, _) ->
{send, prepare(Pkt, Caps, Name, Group)}.
-prepare_request(Pkt, ?CLIENT, {_Ref, Caps}, {send_detach, Group}, _, _) ->
+prepare_request(Pkt, [$C|_], {_Ref, Caps}, {send_detach, Group}, _, _) ->
{eval_packet, {send, prepare(Pkt, Caps, Group)}, [fun log/2, detach]}.
log(#diameter_packet{bin = Bin} = P, T)
@@ -836,6 +999,26 @@ log(#diameter_packet{bin = Bin} = P, T)
%% prepare/4
prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
+ when N == send_unknown_short_mandatory;
+ N == send_unknown_short ->
+ Req = prepare(Pkt, Caps, Group),
+
+ #diameter_packet{header = #diameter_header{length = L},
+ bin = Bin}
+ = E
+ = diameter_codec:encode(Dict0, Pkt#diameter_packet{msg = Req}),
+
+ %% Find the unknown AVP data at the end of the message and alter
+ %% its length header.
+
+ {Padding, [17|_]} = lists:splitwith(fun(C) -> C == 0 end,
+ lists:reverse(binary_to_list(Bin))),
+
+ Offset = L - length(Padding) - 4,
+ <<H:Offset/binary, Len:24, T/binary>> = Bin,
+ E#diameter_packet{bin = <<H/binary, (Len+9):24, T/binary>>};
+
+prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
when N == send_long_avp_length;
N == send_short_avp_length;
N == send_zero_avp_length ->
@@ -876,8 +1059,8 @@ prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
<<V, L:24, H/binary>> = H0, %% assert
E#diameter_packet{bin = <<V, (L+4):24, H/binary, 16:24, 0:32, T/binary>>};
-prepare(Pkt, Caps, send_unrecognized_mandatory, #group{client_dict0 = Dict0}
- = Group) ->
+prepare(Pkt, Caps, send_unexpected_mandatory, #group{client_dict0 = Dict0}
+ = Group) ->
Req = prepare(Pkt, Caps, Group),
#diameter_packet{bin = <<V, Len:24, T/binary>>}
= E
@@ -977,10 +1160,10 @@ prepare_retransmit(_Pkt, false, _Peer, _Name, _Group) ->
%% handle_answer/6-7
-handle_answer(Pkt, Req, ?CLIENT, Peer, {Name, Group}, _) ->
+handle_answer(Pkt, Req, [$C|_], Peer, {Name, Group}, _) ->
answer(Pkt, Req, Peer, Name, Group).
-handle_answer(Pkt, Req, ?CLIENT, Peer, {send_detach = Name, Group}, _, X) ->
+handle_answer(Pkt, Req, [$C|_], Peer, {send_detach = Name, Group}, _, X) ->
{Pid, Ref} = X,
Pid ! {Ref, answer(Pkt, Req, Peer, Name, Group)}.
@@ -992,13 +1175,19 @@ answer(Pkt, Req, _Peer, Name, #group{client_dict0 = Dict0}) ->
[R | Vs] = Dict:'#get-'(answer(Ans, Es, Name)),
[Dict:rec2msg(R) | Vs].
-answer(Rec, [_|_], N)
- when N == send_long_avp_length;
- N == send_short_avp_length;
- N == send_zero_avp_length;
- N == send_invalid_avp_length;
- N == send_invalid_reject ->
+%% Missing Result-Codec and inapproriate Experimental-Result-Code.
+answer(Rec, Es, send_experimental_result) ->
+ [{5004, #diameter_avp{name = 'Experimental-Result'}},
+ {5005, #diameter_avp{name = 'Result-Code'}}]
+ = Es,
Rec;
+
+%% An inappropriate E-bit results in a decode error ...
+answer(Rec, Es, send_bad_answer) ->
+ [{5004, #diameter_avp{name = 'Result-Code'}} | _] = Es,
+ Rec;
+
+%% ... while other errors are reflected in Failed-AVP.
answer(Rec, [], _) ->
Rec.
@@ -1010,11 +1199,13 @@ app(Req, _, Dict0) ->
%% handle_error/6
-handle_error(timeout = Reason, _Req, ?CLIENT, _Peer, _, Time) ->
- Now = now(),
- {Reason, {Time, Now, timer:now_diff(Now, Time)}};
+handle_error(timeout = Reason, _Req, [$C|_], _Peer, _, Time) ->
+ Now = diameter_lib:now(),
+ {Reason, {diameter_lib:timestamp(Time),
+ diameter_lib:timestamp(Now),
+ diameter_lib:micro_diff(Now, Time)}};
-handle_error(Reason, _Req, ?CLIENT, _Peer, _, _Time) ->
+handle_error(Reason, _Req, [$C|_], _Peer, _, _Time) ->
{error, Reason}.
%% handle_request/3
@@ -1022,7 +1213,9 @@ handle_error(Reason, _Req, ?CLIENT, _Peer, _, _Time) ->
%% Note that diameter will set Result-Code and Failed-AVPs if
%% #diameter_packet.errors is non-null.
-handle_request(#diameter_packet{header = H, msg = M}, ?SERVER, {_Ref, Caps}) ->
+handle_request(#diameter_packet{header = H, msg = M, avps = As},
+ _,
+ {_Ref, Caps}) ->
#diameter_header{end_to_end_id = EI,
hop_by_hop_id = HI}
= H,
@@ -1030,10 +1223,12 @@ handle_request(#diameter_packet{header = H, msg = M}, ?SERVER, {_Ref, Caps}) ->
V = EI bsr B, %% assert
V = HI bsr B, %%
#diameter_caps{origin_state_id = {_,[Id]}} = Caps,
- answer(origin(Id), request(M, Caps)).
+ answer(origin(Id), request(M, [H|As], Caps)).
answer(T, {Tag, Action, Post}) ->
{Tag, answer(T, Action), Post};
+answer(_, {reply, [#diameter_header{} | _]} = T) ->
+ T;
answer({A,C}, {reply, Ans}) ->
answer(C, {reply, msg(Ans, A, diameter_gen_base_rfc3588)});
answer(pkt, {reply, Ans})
@@ -1042,6 +1237,41 @@ answer(pkt, {reply, Ans})
answer(_, T) ->
T.
+%% request/3
+
+%% send_experimental_result
+request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 5},
+ [Hdr | Avps],
+ #diameter_caps{origin_host = {OH, _},
+ origin_realm = {OR, _}}) ->
+ [H,R|T] = [A || N <- ['Origin-Host',
+ 'Origin-Realm',
+ 'Session-Id',
+ 'Accounting-Record-Type',
+ 'Accounting-Record-Number'],
+ #diameter_avp{} = A
+ <- [lists:keyfind(N, #diameter_avp.name, Avps)]],
+ Ans = [Hdr#diameter_header{is_request = false},
+ H#diameter_avp{data = OH},
+ R#diameter_avp{data = OR},
+ #diameter_avp{name = 'Experimental-Result',
+ code = 297,
+ need_encryption = false,
+ data = [#diameter_avp{data = {?DIAMETER_DICT_COMMON,
+ 'Vendor-Id',
+ 123}},
+ #diameter_avp{data
+ = {?DIAMETER_DICT_COMMON,
+ 'Experimental-Result-Code',
+ 3987}}]}
+ | T],
+ {reply, Ans};
+
+request(Msg, _Avps, Caps) ->
+ request(Msg, Caps).
+
+%% request/2
+
%% send_nok
request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 0},
_) ->
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl
index 9408fae62c..78bddbd1cf 100644
--- a/lib/diameter/test/diameter_transport_SUITE.erl
+++ b/lib/diameter/test/diameter_transport_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,7 +53,7 @@
%% Receive a message.
-define(RECV(Pat, Ret), receive Pat -> Ret end).
--define(RECV(Pat), ?RECV(Pat, now())).
+-define(RECV(Pat), ?RECV(Pat, diameter_util:timestamp())).
%% Sockets are opened on the loopback address.
-define(ADDR, {127,0,0,1}).
@@ -64,7 +64,7 @@
= #diameter_caps{host_ip_address
= Addrs}}).
-%% The term we register after open a listening port with gen_tcp.
+%% The term we register after open a listening port with gen_{tcp,sctp}.
-define(TEST_LISTENER(Ref, PortNr),
{?MODULE, listen, Ref, PortNr}).
@@ -85,7 +85,7 @@
%% ===========================================================================
suite() ->
- [{timetrap, {minutes, 2}}].
+ [{timetrap, {seconds, 15}}].
all() ->
[start,
@@ -104,7 +104,7 @@ tc() ->
reconnect].
init_per_suite(Config) ->
- [{sctp, have_sctp()} | Config].
+ [{sctp, ?util:have_sctp()} | Config].
end_per_suite(_Config) ->
ok.
@@ -127,7 +127,10 @@ tcp_accept(_) ->
accept(tcp).
sctp_accept(Config) ->
- if_sctp(fun accept/1, Config).
+ case lists:member({sctp, true}, Config) of
+ true -> accept(sctp);
+ false -> {skip, no_sctp}
+ end.
%% Start multiple accepting transport processes that are connected to
%% with an equal number of connecting processes using gen_tcp/sctp
@@ -157,7 +160,10 @@ tcp_connect(_) ->
connect(tcp).
sctp_connect(Config) ->
- if_sctp(fun connect/1, Config).
+ case lists:member({sctp, true}, Config) of
+ true -> connect(sctp);
+ false -> {skip, no_sctp}
+ end.
connect(Prot) ->
T = {Prot, make_ref()},
@@ -194,7 +200,7 @@ reconnect({connect, Ref}) ->
true = diameter:subscribe(SvcName),
ok = start_service(SvcName),
[{{_, _, LRef}, Pid}] = diameter_reg:wait({?MODULE, Ref, '_'}),
- CRef = ?util:connect(SvcName, tcp, LRef, [{reconnect_timer, 2000},
+ CRef = ?util:connect(SvcName, tcp, LRef, [{connect_timer, 2000},
{watchdog_timer, 6000}]),
%% Tell partner to kill transport after seeing that there are no
@@ -219,7 +225,7 @@ reconnect(_) ->
|| T <- [listen, connect]]).
start_service(SvcName) ->
- OH = io_lib:format("~p-~p-~p", tuple_to_list(now())),
+ OH = diameter_util:unique_string(),
Opts = [{application, [{dictionary, diameter_gen_base_rfc6733},
{module, diameter_callback}]},
{'Origin-Host', OH},
@@ -251,28 +257,6 @@ abort(SvcName, LRef, Ref)
%% ===========================================================================
%% ===========================================================================
-%% have_sctp/0
-
-have_sctp() ->
- case gen_sctp:open() of
- {ok, Sock} ->
- gen_sctp:close(Sock),
- true;
- {error, E} when E == eprotonosupport;
- E == esocktnosupport -> %% fail on any other reason
- false
- end.
-
-%% if_sctp/2
-
-if_sctp(F, Config) ->
- case proplists:get_value(sctp, Config) of
- true ->
- F(sctp);
- false ->
- {skip, no_sctp}
- end.
-
%% init/2
init(accept, {Prot, Ref}) ->
@@ -351,7 +335,7 @@ make_msg() ->
%% crypto:rand_bytes/1 isn't available on all platforms (since openssl
%% isn't) so roll our own.
rand_bytes(N) ->
- random:seed(now()),
+ random:seed(diameter_util:seed()),
rand_bytes(N, <<>>).
rand_bytes(0, Bin) ->
@@ -381,37 +365,14 @@ start_connect(tcp, T, Svc, Opts) ->
diameter_tcp:start(T, Svc, Opts).
%% start_accept/2
-%%
-%% Start transports sequentially by having each wait for a message
-%% from a job in a queue before commencing. Only one transport with a
-%% pending accept is started at a time since diameter_{tcp,sctp}
-%% currently assume (and diameter currently implements) this.
start_accept(Prot, Ref) ->
- Pid = sync(accept, Ref),
{Mod, Opts} = tmod(Prot),
-
- try
- {ok, TPid, [?ADDR]} = Mod:start({accept, Ref},
- ?SVC([?ADDR]),
- [{port, 0} | Opts]),
- ?RECV(?TMSG({TPid, connected})),
- TPid
- after
- Pid ! Ref
- end.
-
-sync(What, Ref) ->
- ok = diameter_sync:cast({?MODULE, What, Ref},
- [fun lock/2, Ref, self()],
- infinity,
- infinity),
- receive {start, Ref, Pid} -> Pid end.
-
-lock(Ref, Pid) ->
- Pid ! {start, Ref, self()},
- erlang:monitor(process, Pid),
- Ref = receive T -> T end.
+ {ok, TPid, [?ADDR]} = Mod:start({accept, Ref},
+ ?SVC([?ADDR]),
+ [{port, 0} | Opts]),
+ ?RECV(?TMSG({TPid, connected})),
+ TPid.
tmod(sctp) ->
{diameter_sctp, [{sctp_initmsg, ?SCTP_INIT}]};
@@ -440,12 +401,13 @@ gen_listen(tcp) ->
%% gen_accept/2
gen_accept(sctp, Sock) ->
- Assoc = ?RECV(?SCTP(Sock, {_, #sctp_assoc_change{state = comm_up,
- outbound_streams = O,
- inbound_streams = I,
- assoc_id = A}}),
- {O, I, A}),
- putr(assoc, Assoc),
+ #sctp_assoc_change{state = comm_up,
+ outbound_streams = OS,
+ inbound_streams = IS,
+ assoc_id = Id}
+ = ?RECV(?SCTP(Sock, {_, #sctp_assoc_change{} = S}), S),
+
+ putr(assoc, {OS, IS, Id}),
{ok, Sock};
gen_accept(tcp, LSock) ->
gen_tcp:accept(LSock).
@@ -454,7 +416,7 @@ gen_accept(tcp, LSock) ->
gen_send(sctp, Sock, Bin) ->
{OS, _IS, Id} = getr(assoc),
- {_, _, Us} = now(),
+ {_, _, Us} = diameter_util:timestamp(),
gen_sctp:send(Sock, Id, Us rem OS, Bin);
gen_send(tcp, Sock, Bin) ->
gen_tcp:send(Sock, Bin).
@@ -463,7 +425,11 @@ gen_send(tcp, Sock, Bin) ->
gen_recv(sctp, Sock) ->
{_OS, _IS, Id} = getr(assoc),
- ?RECV(?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], Bin}), Bin);
+ receive
+ ?SCTP(Sock, {[#sctp_sndrcvinfo{assoc_id = Id}], Bin})
+ when is_binary(Bin) ->
+ Bin
+ end;
gen_recv(tcp, Sock) ->
tcp_recv(Sock, <<>>).
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 92c72c84e7..df7d268429 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,7 +29,11 @@
run/1,
fold/3,
foldl/3,
- scramble/1]).
+ scramble/1,
+ timestamp/0,
+ seed/0,
+ unique_string/0,
+ have_sctp/0]).
%% diameter-specific
-export([lport/2,
@@ -174,7 +178,7 @@ scramble(L) ->
[[fun s/1, L]]).
s(L) ->
- random:seed(now()),
+ random:seed(seed()),
s([], L).
s(Acc, []) ->
@@ -184,6 +188,45 @@ s(Acc, L) ->
s([T|Acc], H ++ Rest).
%% ---------------------------------------------------------------------------
+%% timestamp/0
+
+timestamp() ->
+ diameter_lib:timestamp(diameter_lib:now()).
+
+%% ---------------------------------------------------------------------------
+%% seed/0
+
+seed() ->
+ {_,T} = diameter_lib:seed(),
+ T.
+
+%% ---------------------------------------------------------------------------
+%% unique_string/0
+
+unique_string() ->
+ try erlang:unique_integer() of
+ N ->
+ integer_to_list(N)
+ catch
+ error: undef -> %% OTP < 18
+ {M,S,U} = timestamp(),
+ tl(lists:append(["-" ++ integer_to_list(N) || N <- [M,S,U]]))
+ end.
+
+%% ---------------------------------------------------------------------------
+%% have_sctp/0
+
+have_sctp() ->
+ case gen_sctp:open() of
+ {ok, Sock} ->
+ gen_sctp:close(Sock),
+ true;
+ {error, E} when E == eprotonosupport;
+ E == esocktnosupport -> %% fail on any other reason
+ false
+ end.
+
+%% ---------------------------------------------------------------------------
%% eval/1
%%
%% Evaluate a function in one of a number of forms.
@@ -254,13 +297,12 @@ path(Config, Name) ->
%%
%% Lookup the port number of a tcp/sctp listening transport.
-lport(M, {Node, Ref}) ->
- rpc:call(Node, ?MODULE, lport, [M, Ref]);
+lport(Prot, {Node, Ref}) ->
+ rpc:call(Node, ?MODULE, lport, [Prot, Ref]);
lport(Prot, Ref) ->
- Mod = tmod(Prot),
[_] = diameter_reg:wait({'_', listener, {Ref, '_'}}),
- [N || {listen, N, _} <- Mod:ports(Ref)].
+ [N || M <- tmod(Prot), {listen, N, _} <- M:ports(Ref)].
%% ---------------------------------------------------------------------------
%% listen/2-3
@@ -292,13 +334,17 @@ connect(Client, Prot, LRef, Opts) ->
Ref = add_transport(Client, {connect, opts(Prot, PortNr) ++ Opts}),
true = transport(Client, Ref), %% assert
- ok = receive
- {diameter_event, Client, {up, Ref, _, _, _}} -> ok
- after 10000 ->
- {Client, Prot, PortNr, process_info(self(), messages)}
- end,
+ diameter_lib:for_n(fun(_) -> ok = up(Client, Ref, Prot, PortNr) end,
+ proplists:get_value(pool_size, Opts, 1)),
Ref.
+up(Client, Ref, Prot, PortNr) ->
+ receive
+ {diameter_event, Client, {up, Ref, _, _, _}} -> ok
+ after 10000 ->
+ {Client, Prot, PortNr, process_info(self(), messages)}
+ end.
+
transport(SvcName, Ref) ->
[Ref] == [R || [{ref, R} | _] <- diameter:service_info(SvcName, transport),
R == Ref].
@@ -327,13 +373,15 @@ add_transport(SvcName, T) ->
Ref.
tmod(tcp) ->
- diameter_tcp;
+ [diameter_tcp];
tmod(sctp) ->
- diameter_sctp.
+ [diameter_sctp];
+tmod(any) ->
+ [diameter_sctp, diameter_tcp].
opts(Prot, T) ->
- [{transport_module, tmod(Prot)},
- {transport_config, [{ip, ?ADDR}, {port, 0} | opts(T)]}].
+ [{transport_module, M} || M <- tmod(Prot)]
+ ++ [{transport_config, [{ip, ?ADDR}, {port, 0} | opts(T)]}].
opts(listen) ->
[{accept, M} || M <- [{256,0,0,1}, ["256.0.0.1", ["^.+$"]]]];
diff --git a/lib/diameter/test/diameter_watchdog_SUITE.erl b/lib/diameter/test/diameter_watchdog_SUITE.erl
index b6e8730ec2..f39e12686e 100644
--- a/lib/diameter/test/diameter_watchdog_SUITE.erl
+++ b/lib/diameter/test/diameter_watchdog_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -420,6 +420,7 @@ suspect(TRef, false, SvcName, N) ->
%% abuse/1
abuse(F) ->
+
[] = run([[abuse, F, T] || T <- [listen, connect]]).
abuse(F, [_,_,_|_] = Args) ->
@@ -672,7 +673,7 @@ jitter(T,D) ->
%% Generate a unique hostname for the faked peer.
hostname() ->
- lists:flatten(io_lib:format("~p-~p-~p", tuple_to_list(now()))).
+ ?util:unique_string().
putr(Key, Val) ->
put({?MODULE, Key}, Val).
diff --git a/lib/diameter/test/modules.mk b/lib/diameter/test/modules.mk
index 4fea62461c..6da96bd676 100644
--- a/lib/diameter/test/modules.mk
+++ b/lib/diameter/test/modules.mk
@@ -1,8 +1,7 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -40,6 +39,7 @@ MODULES = \
diameter_gen_sctp_SUITE \
diameter_gen_tcp_SUITE \
diameter_length_SUITE \
+ diameter_pool_SUITE \
diameter_reg_SUITE \
diameter_relay_SUITE \
diameter_stats_SUITE \
diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk
index 9fda067f2b..c278e74dca 100644
--- a/lib/diameter/vsn.mk
+++ b/lib/diameter/vsn.mk
@@ -1,8 +1,6 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
-
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,5 +16,5 @@
# %CopyrightEnd%
APPLICATION = diameter
-DIAMETER_VSN = 1.5
+DIAMETER_VSN = 1.9.2
APP_VSN = $(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)
diff --git a/lib/edoc/doc/src/book.xml b/lib/edoc/doc/src/book.xml
index 67b7cdb2d7..1a11629e6d 100644
--- a/lib/edoc/doc/src/book.xml
+++ b/lib/edoc/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/edoc/doc/src/fascicules.xml b/lib/edoc/doc/src/fascicules.xml
index 1b9d6bc94d..154c8a3b6d 100644
--- a/lib/edoc/doc/src/fascicules.xml
+++ b/lib/edoc/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/edoc/doc/src/notes.xml b/lib/edoc/doc/src/notes.xml
index 394e7af09c..e350adb540 100644
--- a/lib/edoc/doc/src/notes.xml
+++ b/lib/edoc/doc/src/notes.xml
@@ -31,6 +31,86 @@
<p>This document describes the changes made to the EDoc
application.</p>
+<section><title>Edoc 0.7.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Maps: Properly align union typed assoc values in
+ documentation</p>
+ <p>
+ Own Id: OTP-12190</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Edoc 0.7.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix spec to doc generation from erl_docgen and edoc for
+ maps</p>
+ <p>
+ Own Id: OTP-12058</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Edoc 0.7.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> The default encoding for Erlang source files is now
+ UTF-8. As a temporary measure to ease the transition from
+ the old default of Latin-1, if EDoc encounters byte
+ sequences that are not valid UTF-8 sequences, EDoc will
+ re-try in Latin-1 mode. This workaround will be removed
+ in a future release. </p>
+ <p>
+ Own Id: OTP-12008</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Edoc 0.7.13</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Edoc 0.7.12.1</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/edoc/doc/src/part.xml b/lib/edoc/doc/src/part.xml
index a71b4eda13..876ae858f9 100644
--- a/lib/edoc/doc/src/part.xml
+++ b/lib/edoc/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/edoc/doc/src/part_notes.xml b/lib/edoc/doc/src/part_notes.xml
index 42fc39af42..41e6c1c7f7 100644
--- a/lib/edoc/doc/src/part_notes.xml
+++ b/lib/edoc/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2007</year><year>2009</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/edoc/doc/src/ref_man.xml b/lib/edoc/doc/src/ref_man.xml
index a9af8740b9..a71b35d118 100644
--- a/lib/edoc/doc/src/ref_man.xml
+++ b/lib/edoc/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/edoc/src/edoc.app.src b/lib/edoc/src/edoc.app.src
index 0c8d5b85f8..9e1155d3e8 100644
--- a/lib/edoc/src/edoc.app.src
+++ b/lib/edoc/src/edoc.app.src
@@ -22,4 +22,6 @@
otpsgml_layout]},
{registered,[]},
{applications, [compiler,kernel,stdlib,syntax_tools]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["xmerl-1.3.7","syntax_tools-1.6.14","stdlib-2.0",
+ "kernel-3.0","inets-5.10","erts-6.0"]}]}.
diff --git a/lib/edoc/src/edoc.appup.src b/lib/edoc/src/edoc.appup.src
index 54a63833e6..45b4046ed8 100644
--- a/lib/edoc/src/edoc.appup.src
+++ b/lib/edoc/src/edoc.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, edoc}]}],
+ [{<<".*">>,[{restart_application, edoc}]}]
+}.
diff --git a/lib/edoc/src/edoc.erl b/lib/edoc/src/edoc.erl
index a87a8471e3..983f04e8b6 100644
--- a/lib/edoc/src/edoc.erl
+++ b/lib/edoc/src/edoc.erl
@@ -696,15 +696,44 @@ read_source_2(Name, Opts) ->
%% The line of the dot token will be copied to the integer token.
parse_file(Name, Includes, Macros) ->
- case epp:open(Name, Includes, Macros) of
- {ok, Epp} ->
- try {ok, parse_file(Epp)}
+ case parse_file(utf8, Name, Includes, Macros) of
+ invalid_unicode ->
+ parse_file(latin1, Name, Includes, Macros);
+ Ret ->
+ Ret
+ end.
+
+parse_file(DefEncoding, Name, Includes, Macros) ->
+ Options = [{name, Name},
+ {includes, Includes},
+ {macros, Macros},
+ {default_encoding, DefEncoding}],
+ case epp:open([extra | Options]) of
+ {ok, Epp, Extra} ->
+ try parse_file(Epp) of
+ Forms ->
+ Encoding = proplists:get_value(encoding, Extra),
+ case find_invalid_unicode(Forms) of
+ invalid_unicode when Encoding =/= utf8 ->
+ invalid_unicode;
+ _ ->
+ {ok, Forms}
+ end
after _ = epp:close(Epp)
end;
Error ->
Error
end.
+find_invalid_unicode([H|T]) ->
+ case H of
+ {error,{_Line,file_io_server,invalid_unicode}} ->
+ invalid_unicode;
+ _Other ->
+ find_invalid_unicode(T)
+ end;
+find_invalid_unicode([]) -> none.
+
parse_file(Epp) ->
case scan_and_parse(Epp) of
{ok, Form} ->
diff --git a/lib/edoc/src/edoc_doclet.erl b/lib/edoc/src/edoc_doclet.erl
index ce1e94a26a..5653b5894b 100644
--- a/lib/edoc/src/edoc_doclet.erl
+++ b/lib/edoc/src/edoc_doclet.erl
@@ -200,7 +200,7 @@ source({M, P, Name, Path}, Dir, Suffix, Env, Set, Private, Hidden,
{Set, Error}
end;
R ->
- report("skipping source file '~ts': ~W.", [File, R, 15]),
+ report("skipping source file '~ts': ~P.", [File, R, 15]),
{Set, true}
end.
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index 7bd0615f5c..a102d432bc 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -829,6 +829,8 @@ 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 = map, content = Es}]) ->
+ t_map(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
@@ -877,6 +879,13 @@ 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_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
case get_elem(field, Es) of
@@ -1072,6 +1081,8 @@ ot_type([#xmlElement{name = nonempty_list, content = Es}]) ->
ot_nonempty_list(Es);
ot_type([#xmlElement{name = tuple, content = Es}]) ->
ot_tuple(Es);
+ot_type([#xmlElement{name = map, content = Es}]) ->
+ ot_map(Es);
ot_type([#xmlElement{name = 'fun', content = Es}]) ->
ot_fun(Es);
ot_type([#xmlElement{name = record, content = Es}]) ->
@@ -1128,6 +1139,12 @@ ot_nonempty_list(Es) ->
ot_tuple(Es) ->
{type,0,tuple,[ot_utype_elem(E) || E <- 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_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
Args = [ot_utype_elem(A) || A <- get_content(argtypes, Es)],
diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl
index 276f48453e..c46338a2e1 100644
--- a/lib/edoc/src/edoc_lib.erl
+++ b/lib/edoc/src/edoc_lib.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% =====================================================================
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
@@ -1033,7 +1032,7 @@ run_plugin(Name, Key, Default, Fun, Opts) when is_atom(Name) ->
{ok, Value} ->
Value;
R ->
- report("error in ~ts '~w': ~W.", [Name, Module, R, 20]),
+ report("error in ~ts '~w': ~P.", [Name, Module, R, 20]),
exit(error)
end.
diff --git a/lib/edoc/src/edoc_parser.yrl b/lib/edoc/src/edoc_parser.yrl
index a20f152f34..c6f8a04775 100644
--- a/lib/edoc/src/edoc_parser.yrl
+++ b/lib/edoc/src/edoc_parser.yrl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% ========================== -*-Erlang-*- =============================
%% EDoc type specification grammar for the Yecc parser generator,
%% adapted from Sven-Olof Nyström's type specification parser.
@@ -30,13 +29,14 @@ Nonterminals
start spec func_type utype_list utype_tuple utypes utype ptypes ptype
nutype function_name where_defs defs defs2 def typedef etype
throws qname ref aref mref lref pref var_list vars fields field
+utype_map utype_map_fields utype_map_field
futype_list bin_base_type bin_unit_type.
Terminals
atom float integer var an_var string start_spec start_typedef start_throws
start_ref
-'(' ')' ',' '.' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//' '*'
+'(' ')' ',' '.' '=>' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//' '*'
'#' 'where' '<<' '>>' '..' '...'.
Rootsymbol start.
@@ -70,6 +70,14 @@ utype_list -> '(' utypes ')' : {lists:reverse('$2'), tok_line('$1')}.
futype_list -> utype_list : '$1'.
futype_list -> '(' '...' ')' : {[#t_var{name = '...'}], tok_line('$1')}.
+utype_map -> '#' '{' utype_map_fields '}' : lists:reverse('$3').
+
+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_tuple -> '{' utypes '}' : lists:reverse('$2').
%% Produced in reverse order.
@@ -92,9 +100,10 @@ ptype -> var : #t_var{name = tok_val('$1')}.
ptype -> atom : #t_atom{val = tok_val('$1')}.
ptype -> integer: #t_integer{val = tok_val('$1')}.
ptype -> integer '..' integer: #t_integer_range{from = tok_val('$1'),
- to = tok_val('$3')}.
+ to = tok_val('$3')}.
ptype -> float: #t_float{val = tok_val('$1')}.
ptype -> utype_tuple : #t_tuple{types = '$1'}.
+ptype -> utype_map : #t_map{types = '$1'}.
ptype -> '[' ']' : #t_nil{}.
ptype -> '[' utype ']' : #t_list{type = '$2'}.
ptype -> '[' utype ',' '...' ']' : #t_nonempty_list{type = '$2'}.
@@ -463,3 +472,5 @@ throw_error(parse_param, L) ->
throw({error, L, "missing parameter name"});
throw_error({Where, E}, L) when is_list(Where) ->
throw({error,L,{"unknown error parsing ~ts: ~P.",[Where,E,15]}}).
+
+%% vim: ft=erlang
diff --git a/lib/edoc/src/edoc_scanner.erl b/lib/edoc/src/edoc_scanner.erl
index 754fcef643..6ff97a134c 100644
--- a/lib/edoc/src/edoc_scanner.erl
+++ b/lib/edoc/src/edoc_scanner.erl
@@ -137,6 +137,8 @@ scan1([$"|Cs0], Toks, Pos) -> % String
scan_error({illegal, string}, Pos)
end;
%% Punctuation characters and operators, first recognise multiples.
+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 5acf8ac0d5..211a354c74 100644
--- a/lib/edoc/src/edoc_specs.erl
+++ b/lib/edoc/src/edoc_specs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,7 @@
%% Exported functions
%%
--spec type(Form::syntaxTree(), TypeDocs::dict()) -> #tag{}.
+-spec type(Form::syntaxTree(), TypeDocs::dict:dict()) -> #tag{}.
%% @doc Convert an Erlang type to EDoc representation.
%% TypeDocs is a dict of {Name, Doc}.
@@ -88,7 +88,7 @@ dummy_spec(Form) ->
-spec docs(Forms::[syntaxTree()],
CommentFun :: fun( ([syntaxTree()], Line :: term()) -> #tag{} ))
- -> dict().
+ -> dict:dict().
%% @doc Find comments after -type/-opaque declarations.
%% Postcomments "inside" the type are skipped.
@@ -358,6 +358,14 @@ d2e({type,_,tuple,any}) ->
d2e({type,_,binary,[Base,Unit]}) ->
#t_binary{base_size = element(3, Base),
unit_size = element(3, Unit)};
+d2e({type,_,map,any}) ->
+ #t_map{ types = []};
+d2e({type,_,map,Es}) ->
+ #t_map{ types = d2e(Es) };
+d2e({type,_,map_field_assoc,K,V}) ->
+ #t_map_field{ k_type = d2e(K), v_type=d2e(V) };
+d2e({type,_,map_field_exact,K,V}) ->
+ #t_map_field{ k_type = d2e(K), v_type=d2e(V) };
d2e({type,_,tuple,Ts0}) ->
Ts = d2e(Ts0),
typevar_anno(#t_tuple{types = Ts}, Ts);
@@ -476,6 +484,11 @@ xrecs(#t_fun{args = Args0, range = Range0}=T, P) ->
Args = xrecs(Args0, P),
Range = xrecs(Range0, P),
T#t_fun{args = Args, range = Range};
+xrecs(#t_map{ types = Ts0 }=T,P) ->
+ Ts = xrecs(Ts0, P),
+ T#t_map{ types = Ts };
+xrecs(#t_map_field{ k_type=Kt, v_type=Vt}=T, P) ->
+ T#t_map_field{ k_type=xrecs(Kt,P), v_type=xrecs(Vt,P)};
xrecs(#t_tuple{types = Types0}=T, P) ->
Types = xrecs(Types0, P),
T#t_tuple{types = Types};
diff --git a/lib/edoc/src/edoc_tags.erl b/lib/edoc/src/edoc_tags.erl
index eb41f1922a..264a533a52 100644
--- a/lib/edoc/src/edoc_tags.erl
+++ b/lib/edoc/src/edoc_tags.erl
@@ -454,12 +454,14 @@ check_type(#tag{line = L, data = Data}, P0, Ls, Ts) ->
check_type(#t_def{type = Type}, P, Ls, Ts) ->
check_type(Type, P, Ls, Ts);
check_type(#t_type{name = Name, args = Args}, P, Ls, Ts) ->
- check_used_type(Name, Args, P, Ls),
+ _ = check_used_type(Name, Args, P, Ls),
check_types3(Args++Ts, P, Ls);
check_type(#t_var{}, P, Ls, Ts) ->
check_types3(Ts, P, Ls);
check_type(#t_fun{args = Args, range = Range}, P, Ls, Ts) ->
check_type(Range, P, Ls, Args++Ts);
+check_type(#t_map{}, P, Ls, Ts) ->
+ check_types3(Ts, P, Ls);
check_type(#t_tuple{types = Types}, P, Ls, Ts) ->
check_types3(Types ++Ts, P, Ls);
check_type(#t_list{type = Type}, P, Ls, Ts) ->
diff --git a/lib/edoc/src/edoc_types.erl b/lib/edoc/src/edoc_types.erl
index 60c6cecb97..8a6c8eb33e 100644
--- a/lib/edoc/src/edoc_types.erl
+++ b/lib/edoc/src/edoc_types.erl
@@ -66,6 +66,7 @@ is_new_predefined(boolean, 0) -> true;
is_new_predefined(byte, 0) -> true;
is_new_predefined(iodata, 0) -> true;
is_new_predefined(iolist, 0) -> true;
+is_new_predefined(map, 0) -> true;
is_new_predefined(maybe_improper_list, 0) -> true;
is_new_predefined(maybe_improper_list, 2) -> true;
is_new_predefined(mfa, 0) -> true;
@@ -141,6 +142,10 @@ to_xml(#t_type{name = N, args = As}, Env) ->
to_xml(#t_fun{args = As, range = T}, Env) ->
{'fun', [{argtypes, map(fun wrap_utype/2, As, 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_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 05c61d70ff..7fec10d936 100644
--- a/lib/edoc/src/edoc_types.hrl
+++ b/lib/edoc/src/edoc_types.hrl
@@ -155,3 +155,7 @@
%% @type t_paren() = #t_paren{a = list(), type = type()}
-record(t_paren, {a=[], type}). % parentheses
+
+-record(t_map, {a=[], types=[]}).
+-record(t_map_field, {a=[], k_type, v_type}).
+
diff --git a/lib/edoc/test/edoc_SUITE.erl b/lib/edoc/test/edoc_SUITE.erl
index 5b95c35756..c63660c8c0 100644
--- a/lib/edoc/test/edoc_SUITE.erl
+++ b/lib/edoc/test/edoc_SUITE.erl
@@ -22,12 +22,12 @@
init_per_group/2,end_per_group/2]).
%% Test cases
--export([build_std/1]).
+-export([app/1,appup/1,build_std/1,build_map_module/1,otp_12008/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [build_std].
+ [app,appup,build_std,build_map_module,otp_12008].
groups() ->
[].
@@ -44,26 +44,54 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+%% Test that the .app file does not contain any `basic' errors
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(edoc).
-build_std(suite) ->
- [];
-build_std(doc) ->
- ["Build some documentation using standard EDoc layout"];
+%% Test that the .appup file does not contain any `basic' errors
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(edoc).
+
+build_std(suite) -> [];
+build_std(doc) -> ["Build some documentation using standard EDoc layout"];
build_std(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Overview1 = filename:join(DataDir, "overview.edoc"),
+ Overview2 = filename:join(DataDir, "overview.syntax_tools"),
+ PrivDir = ?config(priv_dir, Config),
- ?line DataDir = ?config(data_dir, Config),
- ?line Overview1 = filename:join(DataDir, "overview.edoc"),
- ?line Overview2 = filename:join(DataDir, "overview.syntax_tools"),
- ?line PrivDir = ?config(priv_dir, Config),
+ ok = edoc:application(edoc, [{overview, Overview1},
+ {def, {vsn,"TEST"}},
+ {dir, PrivDir}]),
- ?line ok = edoc:application(edoc, [{overview, Overview1},
- {def, {vsn,"TEST"}},
- {dir, PrivDir}]),
+ ok = edoc:application(syntax_tools, [{overview, Overview2},
+ {def, {vsn,"TEST"}},
+ {dir, PrivDir}]),
- ?line ok = edoc:application(syntax_tools, [{overview, Overview2},
- {def, {vsn,"TEST"}},
- {dir, PrivDir}]),
+ ok = edoc:application(xmerl, [{dir, PrivDir}]),
+ ok.
- ?line ok = edoc:application(xmerl, [{dir, PrivDir}]),
+build_map_module(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ Filename = filename:join(DataDir, "map_module.erl"),
+ ok = edoc:file(Filename, [{dir, PrivDir}]),
+ ok.
+otp_12008(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ Un1 = filename:join(DataDir, "un1.erl"),
+ Un2 = filename:join(DataDir, "un2.erl"),
+ Un3 = filename:join(DataDir, "un3.erl"),
+ %% epp_dodger
+ Opts1 = [{dir, PrivDir}],
+ ok = edoc:files([Un1], Opts1),
+ ok = edoc:files([Un2], Opts1),
+ {'EXIT', error} = (catch edoc:files([Un3], Opts1)),
+ %% epp
+ Opts2 = [{preprocess, true}, {dir, PrivDir}],
+ ok = edoc:files([Un1], Opts2),
+ ok = edoc:files([Un2], Opts2),
+ {'EXIT', error} = (catch edoc:files([Un3], Opts2)),
ok.
diff --git a/lib/edoc/test/edoc_SUITE_data/map_module.erl b/lib/edoc/test/edoc_SUITE_data/map_module.erl
new file mode 100644
index 0000000000..f242721637
--- /dev/null
+++ b/lib/edoc/test/edoc_SUITE_data/map_module.erl
@@ -0,0 +1,67 @@
+-module(map_module).
+
+-export([foo1/1,foo2/3,start_child/2]).
+
+%% @type wazzup() = integer()
+%% @type some_type() = map()
+%% @type some_other_type() = {a, #{ list() => term()}}
+
+-type some_type() :: map().
+-type some_other_type() :: {'a', #{ list() => term()} }.
+-type wazzup() :: integer().
+
+-spec foo1(Map :: #{ 'a' => integer(), 'b' => term()}) -> term().
+
+%% @doc Gets value from map.
+
+foo1(#{ a:= 1, b := V}) -> V.
+
+%% @spec foo2(some_type(), Type2 :: some_other_type(), map()) -> Value
+%% @doc Gets value from map.
+
+-spec foo2(
+ Type1 :: some_type(),
+ Type2 :: some_other_type(),
+ Map :: #{ get => 'value', 'value' => binary()}) -> binary().
+
+foo2(Type1, {a,#{ "a" := _}}, #{get := value, value := B}) when is_map(Type1) -> B.
+
+%% from supervisor 18.0
+
+-type child() :: 'undefined' | pid().
+-type child_id() :: term().
+-type mfargs() :: {M :: module(), F :: atom(), A :: [term()] | undefined}.
+-type modules() :: [module()] | 'dynamic'.
+-type restart() :: 'permanent' | 'transient' | 'temporary'.
+-type shutdown() :: 'brutal_kill' | timeout().
+-type worker() :: 'worker' | 'supervisor'.
+-type sup_ref() :: (Name :: atom())
+ | {Name :: atom(), Node :: node()}
+ | {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}
+ | pid().
+-type child_spec() :: #{name => child_id(), % mandatory
+ start => mfargs(), % mandatory
+ restart => restart(), % optional
+ shutdown => shutdown(), % optional
+ type => worker(), % optional
+ modules => modules()} % optional
+ | {Id :: child_id(),
+ StartFunc :: mfargs(),
+ Restart :: restart(),
+ Shutdown :: shutdown(),
+ Type :: worker(),
+ Modules :: modules()}.
+
+-type startchild_err() :: 'already_present'
+ | {'already_started', Child :: child()} | term().
+-type startchild_ret() :: {'ok', Child :: child()}
+ | {'ok', Child :: child(), Info :: term()}
+ | {'error', startchild_err()}.
+
+
+-spec start_child(SupRef, ChildSpec) -> startchild_ret() when
+ SupRef :: sup_ref(),
+ ChildSpec :: child_spec() | (List :: [term()]).
+start_child(Supervisor, ChildSpec) ->
+ {Supervisor,ChildSpec}.
diff --git a/lib/edoc/test/edoc_SUITE_data/un1.erl b/lib/edoc/test/edoc_SUITE_data/un1.erl
new file mode 100644
index 0000000000..0c48e7f940
--- /dev/null
+++ b/lib/edoc/test/edoc_SUITE_data/un1.erl
@@ -0,0 +1,7 @@
+-module(un1).
+
+-export([t/0]).
+
+%% @doc F�pp
+t() ->
+ �rlig.
diff --git a/lib/edoc/test/edoc_SUITE_data/un2.erl b/lib/edoc/test/edoc_SUITE_data/un2.erl
new file mode 100644
index 0000000000..a6d13f4723
--- /dev/null
+++ b/lib/edoc/test/edoc_SUITE_data/un2.erl
@@ -0,0 +1,8 @@
+-module(un2).
+%% coding: latin-1
+
+-export([t/0]).
+
+%% @doc F�pp
+t() ->
+ �rlig.
diff --git a/lib/edoc/test/edoc_SUITE_data/un3.erl b/lib/edoc/test/edoc_SUITE_data/un3.erl
new file mode 100644
index 0000000000..fbe9591dce
--- /dev/null
+++ b/lib/edoc/test/edoc_SUITE_data/un3.erl
@@ -0,0 +1,8 @@
+-module(un3).
+%% coding: utf-8
+
+-export([t/0]).
+
+%% @doc F�pp
+t() ->
+ �rlig.
diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk
index 2fcc97e406..24cfbf16d5 100644
--- a/lib/edoc/vsn.mk
+++ b/lib/edoc/vsn.mk
@@ -1 +1 @@
-EDOC_VSN = 0.7.12.1
+EDOC_VSN = 0.7.16
diff --git a/lib/eldap/doc/src/book.xml b/lib/eldap/doc/src/book.xml
index 74f1c37cdc..0056d99d9b 100644
--- a/lib/eldap/doc/src/book.xml
+++ b/lib/eldap/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/eldap/doc/src/eldap.xml b/lib/eldap/doc/src/eldap.xml
index 5b81716543..945379d5d2 100644
--- a/lib/eldap/doc/src/eldap.xml
+++ b/lib/eldap/doc/src/eldap.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -48,7 +48,7 @@ scope() See baseObject/0, singleLevel/0, wholeSubtree/0
dereference() See neverDerefAliases/0, derefInSearching/0, derefFindingBaseObj/0, derefAlways/0
filter() See present/1, substrings/2,
equalityMatch/2, greaterOrEqual/2, lessOrEqual/2,
- approxMatch/2,
+ approxMatch/2, extensibleMatch/2,
'and'/1, 'or'/1, 'not'/1.
</pre>
<p></p>
@@ -69,12 +69,15 @@ filter() See present/1, substrings/2,
<fsummary>Open a connection to an LDAP server.</fsummary>
<type>
<v>Handle = handle()</v>
- <v>Option = {port, integer()} | {log, function()} | {timeout, integer()} | {ssl, boolean()} | {sslopts, list()}</v>
+ <v>Option = {port, integer()} | {log, function()} | {timeout, integer()} | {ssl, boolean()} | {sslopts, list()} | {tcpopts, list()}</v>
</type>
<desc>
<p>Setup a connection to an LDAP server, the <c>HOST</c>'s are tried in order.</p>
<p>The log function takes three arguments, <c>fun(Level, FormatString, [FormatArg]) end</c>.</p>
<p>Timeout set the maximum time in milliseconds that each server request may take.</p>
+ <p>All TCP socket options are accepted except
+ <c>active</c>, <c>binary</c>, <c>deliver</c>, <c>list</c>, <c>mode</c> and <c>packet</c>
+ </p>
</desc>
</func>
<func>
@@ -100,23 +103,27 @@ filter() See present/1, substrings/2,
<type>
<v>Handle = handle()</v>
<v>Options = ssl:ssl_options()</v>
- <v>Timeout = inifinity | positive_integer()</v>
+ <v>Timeout = infinity | positive_integer()</v>
</type>
<desc>
<p>Upgrade the connection associated with <c>Handle</c> to a tls connection if possible.</p>
- <p>The upgrade is done in two phases: first the server is asked for permission to upgrade. Second, if the request is acknowledged, the upgrade is performed.</p>
- <p>Error responese from phase one will not affect the current encryption state of the connection. Those responses are:</p>
+ <p>The upgrade is done in two phases: first the server is asked for permission to upgrade. Second, if the request is acknowledged, the upgrade to tls is performed.</p>
+ <p>Error responses from phase one will not affect the current encryption state of the connection. Those responses are:</p>
<taglist>
<tag><c>tls_already_started</c></tag>
<item>The connection is already encrypted. The connection is not affected.</item>
<tag><c>{response,ResponseFromServer}</c></tag>
<item>The upgrade was refused by the LDAP server. The <c>ResponseFromServer</c> is an atom delivered byt the LDAP server explained in section 2.3 of rfc 2830. The connection is not affected, so it is still un-encrypted.</item>
</taglist>
- <p>Errors in the seconde phase will however end the connection:</p>
+ <p>Errors in the second phase will however end the connection:</p>
<taglist>
<tag><c>Error</c></tag>
<item>Any error responded from ssl:connect/3</item>
</taglist>
+ <p>The <c>Timeout</c> parameter is for the actual tls upgrade (phase 2) while the timeout in
+ <seealso marker="#open/2">erl_tar:open/2</seealso> is used for the initial negotiation about
+ upgrade (phase 1).
+ </p>
</desc>
</func>
<func>
@@ -221,9 +228,9 @@ filter() See present/1, substrings/2,
</type>
<desc>
<p> Modify the DN of an entry. <c>DeleteOldRDN</c> indicates
- whether the current RDN should be removed after operation.
- <c>NewSupDN</c> should be "" if the RDN should not be moved or the new parent which
- the RDN will be moved to.</p>
+ whether the current RDN should be removed from the attribute list after the after operation.
+ <c>NewSupDN</c> is the new parent that the RDN shall be moved to. If the old parent should
+ remain as parent, <c>NewSupDN</c> shall be "".</p>
<pre>
modify_dn(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com ",
"cn=Bill Jr Valentine", true, "")
@@ -250,6 +257,10 @@ filter() See present/1, substrings/2,
Filter = eldap:substrings("cn", [{any,"V"}]),
search(Handle, [{base, "dc=example, dc=com"}, {filter, Filter}, {attributes, ["cn"]}]),
</pre>
+ <p>The <c>timeout</c> option in the <c>SearchOptions</c> is for the ldap server, while
+ the timeout in <seealso marker="#open/2">erl_tar:open/2</seealso> is used for each
+ individual request in the search operation.
+ </p>
</desc>
</func>
@@ -345,6 +356,16 @@ filter() See present/1, substrings/2,
<desc> <p>Create a approximation match filter.</p> </desc>
</func>
<func>
+ <name>extensibleMatch(MatchValue, OptionalAttrs) -> filter()</name>
+ <fsummary>Create search filter option.</fsummary>
+ <type>
+ <v>MatchValue = string()</v>
+ <v>OptionalAttrs = [Attr]</v>
+ <v>Attr = {matchingRule,string()} | {type,string()} | {dnAttributes,boolean()}</v>
+ </type>
+ <desc> <p>Creates an extensible match filter. For example, <c>eldap:extensibleMatch("Bar",[{type,"sn"},{matchingRule,"caseExactMatch"}]))</c> creates a filter which performs a <c>caseExactMatch</c> on the attribute <c>sn</c> and matches with the value <c>"Bar"</c>. The default value of <c>dnAttributes</c> is <c>false</c>.</p> </desc>
+ </func>
+ <func>
<name>'and'([Filter]) -> filter()</name>
<fsummary>Create search filter option.</fsummary>
<type>
diff --git a/lib/eldap/doc/src/fascicules.xml b/lib/eldap/doc/src/fascicules.xml
index 8fc250bc75..cbc266cd30 100644
--- a/lib/eldap/doc/src/fascicules.xml
+++ b/lib/eldap/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/eldap/doc/src/notes.xml b/lib/eldap/doc/src/notes.xml
index 2240d74aa6..e76101c30e 100644
--- a/lib/eldap/doc/src/notes.xml
+++ b/lib/eldap/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,7 +30,145 @@
</header>
<p>This document describes the changes made to the Eldap application.</p>
- <section><title>Eldap 1.0.2</title>
+<section><title>Eldap 1.1.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Corrects that <c>eldap:close/1</c> returned a tuple
+ instead of the specified atom <c>ok</c>.</p>
+ <p>
+ Own Id: OTP-12349</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Clarification in the reference manual for
+ <c>eldap:modify_dn/5</c>, <c>eldap:search/2</c> and
+ <c>eldap:start_tls/3</c>.</p>
+ <p>
+ Own Id: OTP-12354</p>
+ </item>
+ <item>
+ <p>
+ The eldap test suites are extended and re-organized.</p>
+ <p>
+ Own Id: OTP-12355</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eldap 1.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed that eldap:open did not use the Timeout parameter
+ when calling ssl:connect. (Thanks Wiesław Bieniek for
+ reporting)</p>
+ <p>
+ Own Id: OTP-12311</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added the LDAP filter <c>extensibleMatch</c>.</p>
+ <p>
+ Own Id: OTP-12174</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+ <section><title>Eldap 1.0.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ <c>eldap:open/2</c> and <c>eldap:open/3</c> gave wrong
+ return values for option errors.</p>
+ <p>
+ Own Id: OTP-12182</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Nearly all TCP options are possible to give in the
+ <c>eldap:open/2</c> call.</p>
+ <p>
+ Own Id: OTP-12171</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eldap 1.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Add support for IPv6 connections, By including the
+ [inet6] option in eldap:open/2. Default value is still
+ [inet] (Thanks to Edwin Fine)</p>
+ <p>
+ Own Id: OTP-11753</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug where eldap:search returned binaries instead of
+ strings. (Thanks Simon MacMullen for the report)</p>
+ <p>
+ Own Id: OTP-11768</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eldap 1.0.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/eldap/doc/src/ref_man.xml b/lib/eldap/doc/src/ref_man.xml
index 70c4cee16d..8af5030c58 100644
--- a/lib/eldap/doc/src/ref_man.xml
+++ b/lib/eldap/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/eldap/doc/src/release_notes.xml b/lib/eldap/doc/src/release_notes.xml
index 778a49b894..e29a0ffce7 100644
--- a/lib/eldap/doc/src/release_notes.xml
+++ b/lib/eldap/doc/src/release_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/eldap/doc/src/usersguide.xml b/lib/eldap/doc/src/usersguide.xml
index 828588e88e..3a9a8e1060 100644
--- a/lib/eldap/doc/src/usersguide.xml
+++ b/lib/eldap/doc/src/usersguide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile
index ebb7967e11..2e1110ec2c 100644
--- a/lib/eldap/src/Makefile
+++ b/lib/eldap/src/Makefile
@@ -88,7 +88,7 @@ $(TARGET_FILES): $(HRL_FILES)
# Special Build Targets
# ----------------------------------------------------
$(ASN1_HRL): ../asn1/$(ASN1_FILES)
- $(asn_verbose)$(ERLC) -o $(EBIN) -bber $(ERL_COMPILE_FLAGS) ../asn1/ELDAPv3.asn1
+ $(asn_verbose)$(ERLC) -o $(EBIN) +legacy_erlang_types -bber $(ERL_COMPILE_FLAGS) ../asn1/ELDAPv3.asn1
# ----------------------------------------------------
# Release Target
diff --git a/lib/eldap/src/eldap.app.src b/lib/eldap/src/eldap.app.src
index 8215328910..03a7d7c562 100644
--- a/lib/eldap/src/eldap.app.src
+++ b/lib/eldap/src/eldap.app.src
@@ -4,5 +4,7 @@
{modules, [eldap, 'ELDAPv3']},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","kernel-3.0","erts-6.0",
+ "asn1-3.0"]}
]}.
diff --git a/lib/eldap/src/eldap.appup.src b/lib/eldap/src/eldap.appup.src
index 8d33482f11..9d77faf740 100644
--- a/lib/eldap/src/eldap.appup.src
+++ b/lib/eldap/src/eldap.appup.src
@@ -1,6 +1,25 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
{"%VSN%",
[
+ {<<".*">>,[{restart_application, eldap}]}
],
[
- ]}.
+ {<<".*">>,[{restart_application, eldap}]}
+ ]
+}.
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl
index af5bf94c97..80718bc106 100644
--- a/lib/eldap/src/eldap.erl
+++ b/lib/eldap/src/eldap.erl
@@ -12,8 +12,10 @@
-vc('$Id$ ').
-export([open/1,open/2,simple_bind/3,controlling_process/2,
start_tls/2, start_tls/3,
+ getopts/2,
baseObject/0,singleLevel/0,wholeSubtree/0,close/1,
equalityMatch/2,greaterOrEqual/2,lessOrEqual/2,
+ extensibleMatch/2,
approxMatch/2,search/2,substrings/2,present/1,
'and'/1,'or'/1,'not'/1,modify/3, mod_add/2, mod_delete/2,
mod_replace/2, add/3, delete/2, modify_dn/5,parse_dn/1,
@@ -45,9 +47,10 @@
log, % User provided log function
timeout = infinity, % Request timeout
anon_auth = false, % Allow anonymous authentication
- ldaps = false, % LDAP/LDAPS
+ ldaps = false, % LDAP/LDAPS
using_tls = false, % true if LDAPS or START_TLS executed
- tls_opts = [] % ssl:ssloption()
+ tls_opts = [], % ssl:ssloption()
+ tcp_opts = [] % inet6 support
}).
%%% For debug purposes
@@ -91,11 +94,21 @@ start_tls(Handle, TlsOptions, Timeout) ->
recv(Handle).
%%% --------------------------------------------------------------------
+%%% Ask for option values on the socket.
+%%% Warning: This is an undocumented function for testing purposes only.
+%%% Use at own risk...
+%%% --------------------------------------------------------------------
+getopts(Handle, OptNames) when is_pid(Handle), is_list(OptNames) ->
+ send(Handle, {getopts, OptNames}),
+ recv(Handle).
+
+%%% --------------------------------------------------------------------
%%% Shutdown connection (and process) asynchronous.
%%% --------------------------------------------------------------------
close(Handle) when is_pid(Handle) ->
- send(Handle, close).
+ send(Handle, close),
+ ok.
%%% --------------------------------------------------------------------
%%% Set who we should link ourselves to
@@ -339,6 +352,27 @@ substrings(Type, SubStr) when is_list(Type), is_list(SubStr) ->
{substrings,#'SubstringFilter'{type = Type,
substrings = Ss}}.
+%%%
+%%% Filter for extensibleMatch
+%%%
+extensibleMatch(MatchValue, OptArgs) ->
+ MatchingRuleAssertion =
+ mra(OptArgs, #'MatchingRuleAssertion'{matchValue = MatchValue}),
+ {extensibleMatch, MatchingRuleAssertion}.
+
+mra([{matchingRule,Val}|T], Ack) when is_list(Val) ->
+ mra(T, Ack#'MatchingRuleAssertion'{matchingRule=Val});
+mra([{type,Val}|T], Ack) when is_list(Val) ->
+ mra(T, Ack#'MatchingRuleAssertion'{type=Val});
+mra([{dnAttributes,true}|T], Ack) ->
+ mra(T, Ack#'MatchingRuleAssertion'{dnAttributes="TRUE"});
+mra([{dnAttributes,false}|T], Ack) ->
+ mra(T, Ack#'MatchingRuleAssertion'{dnAttributes="FALSE"});
+mra([H|_], _) ->
+ throw({error,{extensibleMatch_arg,H}});
+mra([], Ack) ->
+ Ack.
+
%%% --------------------------------------------------------------------
%%% Worker process. We keep track of a controlling process to
%%% be able to terminate together with it.
@@ -361,7 +395,7 @@ parse_args([{port, Port}|T], Cpid, Data) when is_integer(Port) ->
parse_args([{timeout, Timeout}|T], Cpid, Data) when is_integer(Timeout),Timeout>0 ->
parse_args(T, Cpid, Data#eldap{timeout = Timeout});
parse_args([{anon_auth, true}|T], Cpid, Data) ->
- parse_args(T, Cpid, Data#eldap{anon_auth = false});
+ parse_args(T, Cpid, Data#eldap{anon_auth = true});
parse_args([{anon_auth, _}|T], Cpid, Data) ->
parse_args(T, Cpid, Data);
parse_args([{ssl, true}|T], Cpid, Data) ->
@@ -372,16 +406,37 @@ parse_args([{sslopts, Opts}|T], Cpid, Data) when is_list(Opts) ->
parse_args(T, Cpid, Data#eldap{ldaps = true, using_tls=true, tls_opts = Opts ++ Data#eldap.tls_opts});
parse_args([{sslopts, _}|T], Cpid, Data) ->
parse_args(T, Cpid, Data);
+parse_args([{tcpopts, Opts}|T], Cpid, Data) when is_list(Opts) ->
+ parse_args(T, Cpid, Data#eldap{tcp_opts = tcp_opts(Opts,Cpid,Data#eldap.tcp_opts)});
parse_args([{log, F}|T], Cpid, Data) when is_function(F) ->
parse_args(T, Cpid, Data#eldap{log = F});
parse_args([{log, _}|T], Cpid, Data) ->
parse_args(T, Cpid, Data);
parse_args([H|_], Cpid, _) ->
send(Cpid, {error,{wrong_option,H}}),
+ unlink(Cpid),
exit(wrong_option);
parse_args([], _, Data) ->
Data.
+tcp_opts([Opt|Opts], Cpid, Acc) ->
+ Key = if is_atom(Opt) -> Opt;
+ is_tuple(Opt) -> element(1,Opt)
+ end,
+ case lists:member(Key,[active,binary,deliver,list,mode,packet]) of
+ false ->
+ tcp_opts(Opts, Cpid, [Opt|Acc]);
+ true ->
+ tcp_opts_error(Opt, Cpid)
+ end;
+tcp_opts([], _Cpid, Acc) -> Acc.
+
+tcp_opts_error(Opt, Cpid) ->
+ send(Cpid, {error, {{forbidden_tcp_option,Opt},
+ "This option affects the eldap functionality and can't be set by user"}}),
+ unlink(Cpid),
+ exit(forbidden_tcp_option).
+
%%% Try to connect to the hosts in the listed order,
%%% and stop with the first one to which a successful
%%% connection is made.
@@ -401,9 +456,12 @@ try_connect([],_) ->
{error,"connect failed"}.
do_connect(Host, Data, Opts) when Data#eldap.ldaps == false ->
- gen_tcp:connect(Host, Data#eldap.port, Opts, Data#eldap.timeout);
+ gen_tcp:connect(Host, Data#eldap.port, Opts ++ Data#eldap.tcp_opts,
+ Data#eldap.timeout);
do_connect(Host, Data, Opts) when Data#eldap.ldaps == true ->
- ssl:connect(Host, Data#eldap.port, Opts++Data#eldap.tls_opts).
+ ssl:connect(Host, Data#eldap.port,
+ Opts ++ Data#eldap.tls_opts ++ Data#eldap.tcp_opts,
+ Data#eldap.timeout).
loop(Cpid, Data) ->
receive
@@ -453,6 +511,36 @@ loop(Cpid, Data) ->
unlink(Cpid),
exit(closed);
+ {From, {getopts, OptNames}} ->
+ Result =
+ try
+ [case OptName of
+ port -> {port, Data#eldap.port};
+ log -> {log, Data#eldap.log};
+ timeout -> {timeout, Data#eldap.timeout};
+ ssl -> {ssl, Data#eldap.ldaps};
+ {sslopts, SslOptNames} when Data#eldap.using_tls==true ->
+ case ssl:getopts(Data#eldap.fd, SslOptNames) of
+ {ok,SslOptVals} -> {sslopts, SslOptVals};
+ {error,Reason} -> throw({error,Reason})
+ end;
+ {sslopts, _} ->
+ throw({error,no_tls});
+ {tcpopts, TcpOptNames} ->
+ case inet:getopts(Data#eldap.fd, TcpOptNames) of
+ {ok,TcpOptVals} -> {tcpopts, TcpOptVals};
+ {error,Posix} -> throw({error,Posix})
+ end
+ end || OptName <- OptNames]
+ of
+ OptsList -> {ok,OptsList}
+ catch
+ throw:Error -> Error;
+ Class:Error -> {error,{Class,Error}}
+ end,
+ send(From, Result),
+ ?MODULE:loop(Cpid, Data);
+
{Cpid, 'EXIT', Reason} ->
?PRINT("Got EXIT from Cpid, reason=~p~n",[Reason]),
exit(Reason);
@@ -743,7 +831,7 @@ request(S, Data, ID, Request) ->
send_request(S, Data, ID, Request) ->
Message = #'LDAPMessage'{messageID = ID,
protocolOp = Request},
- {ok,Bytes} = asn1rt:encode('ELDAPv3', 'LDAPMessage', Message),
+ {ok,Bytes} = 'ELDAPv3':encode('LDAPMessage', Message),
case do_send(S, Data, Bytes) of
{error,Reason} -> throw({gen_tcp_error,Reason});
Else -> Else
@@ -762,7 +850,7 @@ do_recv(S, #eldap{using_tls=true, timeout=Timeout}, Len) ->
recv_response(S, Data) ->
case do_recv(S, Data, 0) of
{ok, Packet} ->
- case asn1rt:decode('ELDAPv3', 'LDAPMessage', Packet) of
+ case 'ELDAPv3':decode('LDAPMessage', Packet) of
{ok,Resp} -> {ok,Resp};
Error -> throw(Error)
end;
@@ -798,6 +886,7 @@ v_filter({lessOrEqual,AV}) -> {lessOrEqual,AV};
v_filter({approxMatch,AV}) -> {approxMatch,AV};
v_filter({present,A}) -> {present,A};
v_filter({substrings,S}) when is_record(S,'SubstringFilter') -> {substrings,S};
+v_filter({extensibleMatch,S}) when is_record(S,'MatchingRuleAssertion') -> {extensibleMatch,S};
v_filter(_Filter) -> throw({error,concat(["unknown filter: ",_Filter])}).
v_modifications(Mods) ->
diff --git a/lib/eldap/test/Makefile b/lib/eldap/test/Makefile
index 3c5810eece..28a7a107e1 100644
--- a/lib/eldap/test/Makefile
+++ b/lib/eldap/test/Makefile
@@ -28,7 +28,9 @@ INCLUDES= -I. -I ../include
# ----------------------------------------------------
MODULES= \
- eldap_basic_SUITE
+ eldap_basic_SUITE \
+ make_certs
+
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/lib/eldap/test/README b/lib/eldap/test/README
index 8774db1504..ec774c1ae3 100644
--- a/lib/eldap/test/README
+++ b/lib/eldap/test/README
@@ -19,7 +19,7 @@ This will however not work, since slapd is guarded by apparmor that checks that
To make a local extension of alowed operations:
sudo emacs /etc/apparmor.d/local/usr.sbin.slapd
-and, after the change (yes, at least on Ubuntu it is right to edit ../local/.. but run with an other file) :
+and, after the change (yes, at least on Ubuntu it is right to edit ../local/.. but run with another file):
sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.slapd
diff --git a/lib/eldap/test/eldap_basic_SUITE.erl b/lib/eldap/test/eldap_basic_SUITE.erl
index bf5fa83c3c..137c61b2d9 100644
--- a/lib/eldap/test/eldap_basic_SUITE.erl
+++ b/lib/eldap/test/eldap_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,292 +24,919 @@
%%-include_lib("common_test/include/ct.hrl").
-include_lib("test_server/include/test_server.hrl").
-include_lib("eldap/include/eldap.hrl").
+-include_lib("eldap/ebin/ELDAPv3.hrl").
+
-define(TIMEOUT, 120000). % 2 min
+all() ->
+ [app,
+ appup,
+ {group, encode_decode},
+ {group, return_values},
+ {group, v4_connections},
+ {group, v6_connections},
+ {group, plain_api},
+ {group, ssl_api},
+ {group, start_tls_api}
+ ].
+
+groups() ->
+ [{encode_decode, [], [encode,
+ decode
+ ]},
+ {plain_api, [], [{group,api}]},
+ {ssl_api, [], [{group,api}, start_tls_on_ssl_should_fail]},
+ {start_tls_api, [], [{group,api}, start_tls_twice_should_fail]},
+
+ {api, [], [{group,api_not_bound},
+ {group,api_bound}]},
+
+ {api_not_bound, [], [elementary_search, search_non_existant,
+ add_when_not_bound,
+ bind]},
+ {api_bound, [], [add_when_bound,
+ add_already_exists,
+ more_add,
+ search_filter_equalityMatch,
+ search_filter_substring_any,
+ search_filter_initial,
+ search_filter_final,
+ search_filter_and,
+ search_filter_or,
+ search_filter_and_not,
+ search_two_hits,
+ modify,
+ delete,
+ modify_dn_delete_old,
+ modify_dn_keep_old]},
+ {v4_connections, [], connection_tests()},
+ {v6_connections, [], connection_tests()},
+ {return_values, [], [open_ret_val_success,
+ open_ret_val_error,
+ close_ret_val]}
+ ].
+
+connection_tests() ->
+ [tcp_connection,
+ tcp_connection_option,
+ ssl_connection,
+ client_side_start_tls_timeout,
+ client_side_bind_timeout,
+ client_side_add_timeout,
+ client_side_search_timeout
+ ].
+
+
+
init_per_suite(Config) ->
- StartSsl = try ssl:start()
- catch
- Error:Reason ->
- {skip, lists:flatten(io_lib:format("eldap init_per_suite failed to start ssl Error=~p Reason=~p", [Error, Reason]))}
- end,
- case StartSsl of
- ok ->
- chk_config(ldap_server, {"localhost",9876},
- chk_config(ldaps_server, {"localhost",9877},
- Config));
- _ ->
- StartSsl
- end.
+ SSL_available = init_ssl_certs_et_al(Config),
+ LDAP_server = find_first_server(false, [{config,eldap_server}, {config,ldap_server}, {"localhost",9876}]),
+ LDAPS_server =
+ case SSL_available of
+ true ->
+ find_first_server(true, [{config,ldaps_server}, {"localhost",9877}]);
+ false ->
+ undefined
+ end,
+ [{ssl_available, SSL_available},
+ {ldap_server, LDAP_server},
+ {ldaps_server, LDAPS_server} | Config].
end_per_suite(_Config) ->
- ok.
-
-init_per_testcase(_TestCase, Config0) ->
- {EldapHost,Port} = proplists:get_value(ldap_server,Config0),
- try
- {ok, Handle} = eldap:open([EldapHost], [{port,Port}]),
- ok = eldap:simple_bind(Handle, "cn=Manager,dc=ericsson,dc=se", "hejsan"),
- {ok, MyHost} = inet:gethostname(),
- Path = "dc="++MyHost++",dc=ericsson,dc=se",
- eldap:add(Handle,"dc=ericsson,dc=se",
- [{"objectclass", ["dcObject", "organization"]},
- {"dc", ["ericsson"]}, {"o", ["Testing"]}]),
- eldap:add(Handle,Path,
- [{"objectclass", ["dcObject", "organization"]},
- {"dc", [MyHost]}, {"o", ["Test machine"]}]),
- [{eldap_path,Path}|Config0]
- catch error:{badmatch,Error} ->
- io:format("Eldap init error ~p~n ~p~n",[Error, erlang:get_stacktrace()]),
- {skip, lists:flatten(io_lib:format("Ldap init failed with host ~p:~p. Error=~p", [EldapHost,Port,Error]))}
+ ssl:stop().
+
+
+init_per_group(return_values, Config) ->
+ case ?config(ldap_server,Config) of
+ undefined ->
+ {skip, "LDAP server not availble"};
+ {Host,Port} ->
+ ct:comment("ldap://~s:~p",[Host,Port]),
+ Config
+ end;
+init_per_group(plain_api, Config0) ->
+ case ?config(ldap_server,Config0) of
+ undefined ->
+ {skip, "LDAP server not availble"};
+ Server = {Host,Port} ->
+ ct:comment("ldap://~s:~p",[Host,Port]),
+ initialize_db([{server,Server}, {ssl_flag,false}, {start_tls,false} | Config0])
+ end;
+init_per_group(ssl_api, Config0) ->
+ case ?config(ldaps_server,Config0) of
+ undefined ->
+ {skip, "LDAPS server not availble"};
+ Server = {Host,Port} ->
+ ct:comment("ldaps://~s:~p",[Host,Port]),
+ 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
+ {undefined,true} ->
+ {skip, "LDAP server not availble"};
+ {_,false} ->
+ {skip, "TLS not availble"};
+ {Server={Host,Port}, true} ->
+ ct:comment("ldap://~s:~p + start_tls",[Host,Port]),
+ Config = [{server,Server}, {ssl_flag,false} | Config0],
+ case supported_extension("1.3.6.1.4.1.1466.20037", Config) of
+ true -> initialize_db([{start_tls,true} | Config]);
+ false -> {skip, "start_tls not supported according to the server"}
+ end
+ end;
+init_per_group(v4_connections, Config) ->
+ [{tcp_listen_opts, [{reuseaddr, true}]},
+ {listen_host, "localhost"},
+ {tcp_connect_opts, []}
+ | Config];
+init_per_group(v6_connections, Config) ->
+ {ok, Hostname} = inet:gethostname(),
+ case lists:member(list_to_atom(Hostname), ct:get_config(ipv6_hosts,[])) of
+ true ->
+ [{tcp_listen_opts, [inet6,{reuseaddr, true}]},
+ {listen_host, "::"},
+ {tcp_connect_opts, [{tcpopts,[inet6]}]}
+ | Config];
+ false ->
+ {skip, io_lib:format("~p is not an ipv6_host",[Hostname])}
+ end;
+init_per_group(_, Config) ->
+ Config.
+
+end_per_group(plain_api, Config) -> clear_db(Config);
+end_per_group(ssl_api, Config) -> clear_db(Config);
+end_per_group(start_tls_api, Config) -> clear_db(Config);
+end_per_group(_Group, Config) -> Config.
+
+
+init_per_testcase(ssl_connection, Config) ->
+ case ?config(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"),
+
+ Parent = self(),
+ Listener = spawn_link(
+ fun() ->
+ case ssl:listen(SSL_Port, [{certfile, CertFile},
+ {keyfile, KeyFile}
+ | ?config(tcp_listen_opts,Config)
+ ]) of
+ {ok,SSL_LSock} ->
+ Parent ! {ok,self()},
+ (fun L() ->
+ ct:log("ssl server waiting for connections...",[]),
+ {ok, S} = ssl:transport_accept(SSL_LSock),
+ ct:log("ssl:transport_accept/1 ok",[]),
+ ok = ssl:ssl_accept(S),
+ ct:log("ssl:ssl_accept/1 ok",[]),
+ L()
+ end)();
+ Other ->
+ Parent ! {not_ok,Other,self()}
+ end
+ end),
+ receive
+ {ok,Listener} ->
+ ct:log("SSL listening to port ~p (process ~p)",[SSL_Port, Listener]),
+ [{ssl_listener,Listener},
+ {ssl_listen_port,SSL_Port},
+ {ssl_connect_opts,[]}
+ | Config];
+ {no_ok,SSL_Other,Listener} ->
+ ct:log("ssl:listen on port ~p failed: ~p",[SSL_Port,SSL_Other]),
+ {fail, "ssl:listen/2 failed"}
+ after 5000 ->
+ {fail, "Waiting for ssl:listen timeout"}
+ end;
+ false ->
+ {skip, "ssl not available"}
+ end;
+
+init_per_testcase(TC, Config) ->
+ case lists:member(TC,connection_tests()) of
+ true ->
+ case gen_tcp:listen(0, proplists:get_value(tcp_listen_opts,Config)) of
+ {ok,LSock} ->
+ {ok,{_,Port}} = inet:sockname(LSock),
+ [{listen_socket,LSock},
+ {listen_port,Port}
+ | Config];
+ Other ->
+ {fail, Other}
+ end;
+
+ false ->
+ case proplists:get_value(name,?config(tc_group_properties, Config)) of
+ api_not_bound ->
+ {ok,H} = open(Config),
+ [{handle,H} | Config];
+ api_bound ->
+ {ok,H} = open(Config),
+ ok = eldap:simple_bind(H,
+ "cn=Manager,dc=ericsson,dc=se",
+ "hejsan"),
+ [{handle,H} | Config];
+ _Name ->
+ Config
+ end
end.
-end_per_testcase(_TestCase, Config) ->
- {EHost, Port} = proplists:get_value(ldap_server, Config),
- Path = proplists:get_value(eldap_path, Config),
- {ok, H} = eldap:open([EHost], [{port, Port}]),
- ok = eldap:simple_bind(H, "cn=Manager,dc=ericsson,dc=se", "hejsan"),
- case eldap:search(H, [{base, Path},
- {filter, eldap:present("objectclass")},
- {scope, eldap:wholeSubtree()}])
- of
- {ok, {eldap_search_result, Entries, _}} ->
- [ok = eldap:delete(H, Entry) || {eldap_entry, Entry, _} <- Entries];
- _ -> ignore
- end,
-
- ok.
+end_per_testcase(_, Config) ->
+ catch gen_tcp:close( proplists:get_value(listen_socket, Config) ),
+ catch eldap:close( proplists:get_value(handle,Config) ).
-%% suite() ->
-all() ->
- [app,
- api,
- ssl_api,
- start_tls,
- tls_operations,
- start_tls_twice,
- start_tls_on_ssl
- ].
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%
+%%% Test cases
+%%%
-app(doc) -> "Test that the eldap app file is ok";
-app(suite) -> [];
+%%%----------------------------------------------------------------
+%%% Test that the eldap app file is ok
app(Config) when is_list(Config) ->
- ok = test_server:app_test(public_key).
-
-api(doc) -> "Basic test that all api functions works as expected";
-api(suite) -> [];
-api(Config) ->
- {Host,Port} = proplists:get_value(ldap_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}]),
- %% {ok, H} = eldap:open([Host], [{port,Port+1}, {ssl, true}]),
- do_api_checks(H, Config),
- eldap:close(H),
- ok.
+ ok = test_server:app_test(eldap).
+
+%%%----------------------------------------------------------------
+%%% Test that the eldap appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = test_server:appup_test(eldap).
+
+%%%----------------------------------------------------------------
+open_ret_val_success(Config) ->
+ {Host,Port} = ?config(ldap_server,Config),
+ {ok,H} = eldap:open([Host], [{port,Port}]),
+ catch eldap:close(H).
+
+%%%----------------------------------------------------------------
+open_ret_val_error(_Config) ->
+ {error,_} = eldap:open(["nohost.example.com"], [{port,65535}]).
+
+%%%----------------------------------------------------------------
+close_ret_val(Config) ->
+ {Host,Port} = ?config(ldap_server,Config),
+ {ok,H} = eldap:open([Host], [{port,Port}]),
+ ok = eldap:close(H).
+
+%%%----------------------------------------------------------------
+tcp_connection(Config) ->
+ Host = proplists:get_value(listen_host, Config),
+ Port = proplists:get_value(listen_port, Config),
+ Opts = proplists:get_value(tcp_connect_opts, Config),
+ case eldap:open([Host], [{port,Port}|Opts]) of
+ {ok,_H} ->
+ Sl = proplists:get_value(listen_socket, Config),
+ case gen_tcp:accept(Sl,1000) of
+ {ok,_S} -> ok;
+ {error,timeout} -> ct:fail("server side accept timeout",[]);
+ Other -> ct:fail("gen_tdp:accept failed: ~p",[Other])
+ end;
+ Other -> ct:fail("eldap:open failed: ~p",[Other])
+ end.
+%%%----------------------------------------------------------------
+ssl_connection(Config) ->
+ Host = proplists:get_value(listen_host, Config),
+ Port = proplists:get_value(ssl_listen_port, Config),
+ Opts = proplists:get_value(tcp_connect_opts, Config),
+ SSLOpts = proplists:get_value(ssl_connect_opts, Config),
+ case eldap:open([Host], [{port,Port},
+ {ssl,true},
+ {timeout,5000},
+ {sslopts,SSLOpts}|Opts]) of
+ {ok,_H} -> ok;
+ Other -> ct:fail("eldap:open failed: ~p",[Other])
+ end.
-ssl_api(doc) -> "Basic test that all api functions works as expected";
-ssl_api(suite) -> [];
-ssl_api(Config) ->
- {Host,Port} = proplists:get_value(ldaps_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}, {ssl,true}]),
- do_api_checks(H, Config),
- eldap:close(H),
- ok.
+%%%----------------------------------------------------------------
+client_side_add_timeout(Config) ->
+ client_timeout(
+ fun(H) ->
+ eldap:add(H, "cn=Foo Bar,dc=host,dc=ericsson,dc=se",
+ [{"objectclass", ["person"]},
+ {"cn", ["Foo Bar"]},
+ {"sn", ["Bar"]},
+ {"telephoneNumber", ["555-1232", "555-5432"]}])
+ end, Config).
+
+%%%----------------------------------------------------------------
+client_side_bind_timeout(Config) ->
+ client_timeout(
+ fun(H) ->
+ eldap:simple_bind(H, anon, anon)
+ end, Config).
+
+%%%----------------------------------------------------------------
+client_side_search_timeout(Config) ->
+ client_timeout(
+ fun(H) ->
+ eldap:search(H, [{base,"dc=host,dc=ericsson,dc=se"},
+ {filter, eldap:present("objectclass")},
+ {scope, eldap:wholeSubtree()}])
+ end, Config).
+
+%%%----------------------------------------------------------------
+client_side_start_tls_timeout(Config) ->
+ client_timeout(
+ fun(H) ->
+ eldap:start_tls(H, [])
+ end, Config).
+
+%%%----------------------------------------------------------------
+tcp_connection_option(Config) ->
+ Host = proplists:get_value(listen_host, Config),
+ Port = proplists:get_value(listen_port, Config),
+ Opts = proplists:get_value(tcp_connect_opts, Config),
+ Sl = proplists:get_value(listen_socket, Config),
+
+ %% Make an option value to test. The option must be implemented on all
+ %% platforms that we test on. Must check what the default value is
+ %% so we don't happen to choose that particular value.
+ {ok,[{linger,DefaultLinger}]} = inet:getopts(Sl, [linger]),
+ TestLinger = case DefaultLinger of
+ {false,_} -> {true,5};
+ {true,_} -> {false,0}
+ end,
+
+ case catch eldap:open([Host],
+ [{port,Port},{tcpopts,[{linger,TestLinger}]}|Opts]) of
+ {ok,H} ->
+ case gen_tcp:accept(Sl,1000) of
+ {ok,_} ->
+ case eldap:getopts(H, [{tcpopts,[linger]}]) of
+ {ok,[{tcpopts,[{linger,ActualLinger}]}]} ->
+ case ActualLinger of
+ TestLinger ->
+ ok;
+ DefaultLinger ->
+ ct:fail("eldap:getopts: 'linger' didn't change,"
+ " got ~p (=default) expected ~p",
+ [ActualLinger,TestLinger]);
+ _ ->
+ ct:fail("eldap:getopts: bad 'linger', got ~p expected ~p",
+ [ActualLinger,TestLinger])
+ end;
+ Other ->
+ ct:fail("eldap:getopts: bad result ~p",[Other])
+ end;
+ {error,timeout} ->
+ ct:fail("server side accept timeout",[])
+ end;
+
+ Other ->
+ ct:fail("eldap:open failed: ~p",[Other])
+ end.
-start_tls(doc) -> "Test that an existing (tcp) connection can be upgraded to tls";
-start_tls(suite) -> [];
-start_tls(Config) ->
- {Host,Port} = proplists:get_value(ldap_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}]),
- ok = eldap:start_tls(H, [
- {keyfile, filename:join([proplists:get_value(data_dir,Config),
- "certs/client/key.pem"])}
- ]),
- eldap:close(H).
+%%%----------------------------------------------------------------
+%%% Basic test that all api functions works as expected
+
+%%%----------------------------------------------------------------
+elementary_search(Config) ->
+ {ok, #eldap_search_result{entries=[_]}} =
+ eldap:search(?config(handle,Config),
+ #eldap_search{base = ?config(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),
+ 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),
+ [{"objectclass", ["person"]},
+ {"cn", ["Jonas Jonsson"]},
+ {"sn", ["Jonsson"]}]).
+
+%%%----------------------------------------------------------------
+bind(Config) ->
+ ok = eldap:simple_bind(?config(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),
+ [{"objectclass", ["person"]},
+ {"cn", ["Jonas Jonsson"]},
+ {"sn", ["Jonsson"]}]).
+
+%%%----------------------------------------------------------------
+add_already_exists(Config) ->
+ {error, entryAlreadyExists} =
+ eldap:add(?config(handle, Config),
+ "cn=Jonas Jonsson," ++ ?config(eldap_path, Config),
+ [{"objectclass", ["person"]},
+ {"cn", ["Jonas Jonsson"]},
+ {"sn", ["Jonsson"]}]).
+
+%%%----------------------------------------------------------------
+more_add(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ ok = eldap:add(H, "cn=Foo Bar," ++ BasePath,
+ [{"objectclass", ["person"]},
+ {"cn", ["Foo Bar"]},
+ {"sn", ["Bar"]},
+ {"telephoneNumber", ["555-1232", "555-5432"]}]),
+ ok = eldap:add(H, "ou=Team," ++ BasePath,
+ [{"objectclass", ["organizationalUnit"]},
+ {"ou", ["Team"]}]).
-tls_operations(doc) -> "Test that an upgraded connection is usable for ldap stuff";
-tls_operations(suite) -> [];
-tls_operations(Config) ->
- {Host,Port} = proplists:get_value(ldap_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}]),
- ok = eldap:start_tls(H, [
- {keyfile, filename:join([proplists:get_value(data_dir,Config),
- "certs/client/key.pem"])}
- ]),
- do_api_checks(H, Config),
+%%%----------------------------------------------------------------
+search_filter_equalityMatch(Config) ->
+ BasePath = ?config(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{base = BasePath,
+ filter = eldap:equalityMatch("sn", "Jonsson"),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_filter_substring_any(Config) ->
+ BasePath = ?config(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{base = BasePath,
+ filter = eldap:substrings("sn", [{any, "ss"}]),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_filter_initial(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ ExpectedDN = "cn=Foo Bar," ++ BasePath,
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{initial, "B"}]),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_filter_final(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ ExpectedDN = "cn=Foo Bar," ++ BasePath,
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{final, "r"}]),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_filter_and(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ ExpectedDN = "cn=Foo Bar," ++ BasePath,
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:'and'([eldap:substrings("sn", [{any, "a"}]),
+ eldap:equalityMatch("cn","Foo Bar")]),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_filter_or(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ ExpectedDNs = lists:sort(["cn=Foo Bar," ++ BasePath,
+ "ou=Team," ++ BasePath]),
+ {ok, #eldap_search_result{entries=Es}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:'or'([eldap:substrings("sn", [{any, "a"}]),
+ eldap:equalityMatch("ou","Team")]),
+ scope=eldap:singleLevel()}),
+ ExpectedDNs = lists:sort([DN || #eldap_entry{object_name=DN} <- Es]).
+
+%%%----------------------------------------------------------------
+search_filter_and_not(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ {ok, #eldap_search_result{entries=[]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:'and'([eldap:substrings("sn", [{any, "a"}]),
+ eldap:'not'(
+ eldap:equalityMatch("cn","Foo Bar")
+ )]),
+ scope=eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+search_two_hits(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ DN1 = "cn=Santa Claus," ++ BasePath,
+ DN2 = "cn=Jultomten," ++ BasePath,
+ %% Add two objects:
+ ok = eldap:add(H, DN1,
+ [{"objectclass", ["person"]},
+ {"cn", ["Santa Claus"]},
+ {"sn", ["Santa"]},
+ {"description", ["USA"]}]),
+ ok = eldap:add(H, DN2,
+ [{"objectclass", ["person"]},
+ {"cn", ["Jultomten"]},
+ {"sn", ["Tomten"]},
+ {"description", ["Sweden"]}]),
+
+ %% Search for them:
+ {ok, #eldap_search_result{entries=Es}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:present("description"),
+ scope=eldap:singleLevel()}),
+
+ %% And check that they are the expected ones:
+ ExpectedDNs = lists:sort([DN1, DN2]),
+ ExpectedDNs = lists:sort([D || #eldap_entry{object_name=D} <- Es]),
+
+ %% Restore the database:
+ [ok=eldap:delete(H,DN) || DN <- ExpectedDNs].
+
+%%%----------------------------------------------------------------
+modify(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ %% The object to modify
+ DN = "cn=Foo Bar," ++ BasePath,
+
+ %% Save a copy to restore later:
+ {ok,OriginalAttrs} = attributes(H, DN),
+
+ %% Do a change
+ Mod = [eldap:mod_replace("telephoneNumber", ["555-12345"]),
+ eldap:mod_add("description", ["Nice guy"])],
+ ok = eldap:modify(H, DN, Mod),
+
+ %% Check that the object was changed
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=DN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:equalityMatch("telephoneNumber", "555-12345"),
+ scope=eldap:singleLevel()}),
+
+ %% Do another type of change
+ ok = eldap:modify(H, DN, [eldap:mod_delete("telephoneNumber", [])]),
+ %% and check that it worked by repeating the test above
+ {ok, #eldap_search_result{entries=[]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:equalityMatch("telephoneNumber", "555-12345"),
+ scope=eldap:singleLevel()}),
+ %% restore the orignal version:
+ restore_original_object(H, DN, OriginalAttrs).
+
+%%%----------------------------------------------------------------
+delete(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ %% The element to play with:
+ DN = "cn=Jonas Jonsson," ++ BasePath,
+
+ %% Prove that the element is present before deletion
+ {ok,OriginalAttrs} = attributes(H, DN),
+
+ %% Do what the test has to do:
+ ok = eldap:delete(H, DN),
+ %% check that it really was deleted:
+ {error, noSuchObject} = eldap:delete(H, DN),
+
+ %% And restore the object for subsequent tests
+ restore_original_object(H, DN, OriginalAttrs).
+
+%%%----------------------------------------------------------------
+modify_dn_delete_old(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ OrigCN = "Foo Bar",
+ OriginalRDN = "cn="++OrigCN,
+ DN = OriginalRDN ++ "," ++ BasePath,
+ NewCN = "Niclas Andre",
+ NewRDN = "cn="++NewCN,
+ NewDN = NewRDN ++ "," ++BasePath,
+
+ %% Check that the object to modify_dn of exists:
+ {ok,OriginalAttrs} = attributes(H, DN),
+ CN_orig = lists:sort(proplists:get_value("cn",OriginalAttrs)),
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=DN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{any, "a"}]),
+ scope = eldap:singleLevel()}),
+
+ %% Modify and delete the old one:
+ ok = eldap:modify_dn(H, DN, NewRDN, true, ""),
+
+ %% Check that DN was modified and the old one was deleted:
+ {ok,NewAttrs} = attributes(H, NewDN),
+ CN_new = lists:sort(proplists:get_value("cn",NewAttrs)),
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=NewDN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{any, "a"}]),
+ scope = eldap:singleLevel()}),
+ %% What we expect:
+ CN_new = lists:sort([NewCN | CN_orig -- [OrigCN]]),
+
+ %% Change back:
+ ok = eldap:modify_dn(H, NewDN, OriginalRDN, true, ""),
+
+ %% Check that DN was modified and the new one was deleted:
+ {ok,SameAsOriginalAttrs} = attributes(H, DN),
+ CN_orig = lists:sort(proplists:get_value("cn",SameAsOriginalAttrs)),
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=DN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{any, "a"}]),
+ scope = eldap:singleLevel()}).
+
+%%%----------------------------------------------------------------
+modify_dn_keep_old(Config) ->
+ H = ?config(handle, Config),
+ BasePath = ?config(eldap_path, Config),
+ OriginalRDN = "cn=Foo Bar",
+ DN = OriginalRDN ++ "," ++ BasePath,
+ NewCN = "Niclas Andre",
+ NewRDN = "cn="++NewCN,
+ NewDN = NewRDN ++ "," ++BasePath,
+
+ %% Check that the object to modify_dn of exists but the new one does not:
+ {ok,OriginalAttrs} = attributes(H, DN),
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=DN}]}} =
+ eldap:search(H,
+ #eldap_search{base = BasePath,
+ filter = eldap:substrings("sn", [{any, "a"}]),
+ scope = eldap:singleLevel()}),
+
+ %% Modify but keep the old "cn" attr:
+ ok = eldap:modify_dn(H, DN, NewRDN, false, ""),
+
+ %% Check that DN was modified and the old CN entry is not deleted:
+ {ok,NewAttrs} = attributes(H, NewDN),
+ CN_orig = proplists:get_value("cn",OriginalAttrs),
+ CN_new = proplists:get_value("cn",NewAttrs),
+ Expected = lists:sort([NewCN|CN_orig]),
+ Expected = lists:sort(CN_new),
+
+ %% Restore db:
+ ok = eldap:delete(H, NewDN),
+ restore_original_object(H, DN, OriginalAttrs).
+
+%%%----------------------------------------------------------------
+%%% Test that start_tls on an already upgraded connection makes no noise
+start_tls_twice_should_fail(Config) ->
+ {ok,H} = open_bind(Config),
+ {error,tls_already_started} = eldap:start_tls(H, []),
eldap:close(H).
-start_tls_twice(doc) -> "Test that start_tls on an already upgraded connection fails";
-start_tls_twice(suite) -> [];
-start_tls_twice(Config) ->
- {Host,Port} = proplists:get_value(ldap_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}]),
- ok = eldap:start_tls(H, []),
+%%%----------------------------------------------------------------
+%%% Test that start_tls on an ldaps connection fails
+start_tls_on_ssl_should_fail(Config) ->
+ {ok,H} = open_bind(Config),
{error,tls_already_started} = eldap:start_tls(H, []),
- do_api_checks(H, Config),
eldap:close(H).
+%%%----------------------------------------------------------------
+encode(_Config) ->
+ {ok,Bin} = 'ELDAPv3':encode('AddRequest', #'AddRequest'{entry="hejHopp" ,attributes=[]} ),
+ Expected = <<104,11,4,7,104,101,106,72,111,112,112,48,0>>,
+ case Bin of
+ Expected -> ok;
+ _ -> ct:log("Encoded erroneously to:~n~p~nExpected:~n~p",[Bin,Expected]),
+ {fail, "Bad encode"}
+ end.
+
+%%%----------------------------------------------------------------
+decode(_Config) ->
+ {ok,Res} = 'ELDAPv3':decode('AddRequest', <<104,11,4,7,104,101,106,72,111,112,112,48,0>>),
+ ct:log("Res = ~p", [Res]),
+ Expected = #'AddRequest'{entry = "hejHopp",attributes = []},
+ case Res of
+ Expected -> ok;
+ #'AddRequest'{entry= <<"hejHopp">>, attributes=[]} ->
+ {fail, "decoded to (correct) binary!!"};
+ _ ->
+ {fail, "Bad decode"}
+ end.
+
-start_tls_on_ssl(doc) -> "Test that start_tls on an ldaps connection fails";
-start_tls_on_ssl(suite) -> [];
-start_tls_on_ssl(Config) ->
- {Host,Port} = proplists:get_value(ldaps_server, Config),
- {ok, H} = eldap:open([Host], [{port,Port}, {ssl,true}]),
- {error,tls_already_started} = eldap:start_tls(H, []),
- do_api_checks(H, Config),
- eldap:close(H).
+%%%****************************************************************
+%%% Private
-%%%--------------------------------------------------------------------------------
-chk_config(Key, Default, Config) ->
- case catch ct:get_config(ldap_server, undefined) of
- undefined -> [{Key,Default} | Config ];
- {'EXIT',_} -> [{Key,Default} | Config ];
- Value -> [{Key,Value} | Config]
+attributes(H, DN) ->
+ case eldap:search(H,
+ #eldap_search{base = DN,
+ filter= eldap:present("objectclass"),
+ scope = eldap:wholeSubtree()}) of
+ {ok, #eldap_search_result{entries=[#eldap_entry{object_name=DN,
+ attributes=OriginalAttrs}]}} ->
+ {ok, OriginalAttrs};
+ Other ->
+ Other
end.
+restore_original_object(H, DN, Attrs) ->
+ eldap:delete(H, DN),
+ ok = eldap:add(H, DN, Attrs).
+
+
+find_first_server(UseSSL, [{config,Key}|Ss]) ->
+ case ct:get_config(Key) of
+ {Host,Port} ->
+ ct:log("find_first_server config ~p -> ~p",[Key,{Host,Port}]),
+ find_first_server(UseSSL, [{Host,Port}|Ss]);
+ undefined ->
+ ct:log("find_first_server config ~p is undefined",[Key]),
+ find_first_server(UseSSL, Ss)
+ end;
+find_first_server(UseSSL, [{Host,Port}|Ss]) ->
+ case eldap:open([Host],[{port,Port},{ssl,UseSSL}]) of
+ {ok,H} when UseSSL==false, Ss=/=[] ->
+ case eldap:start_tls(H,[]) of
+ ok ->
+ ct:log("find_first_server ~p UseSSL=~p -> ok",[{Host,Port},UseSSL]),
+ eldap:close(H),
+ {Host,Port};
+ Res ->
+ ct:log("find_first_server ~p UseSSL=~p failed with~n~p~nSave as spare host.",[{Host,Port},UseSSL,Res]),
+ eldap:close(H),
+ find_first_server(UseSSL, Ss++[{spare_host,Host,Port}])
+ end;
+ {ok,H} ->
+ ct:log("find_first_server ~p UseSSL=~p -> ok",[{Host,Port},UseSSL]),
+ eldap:close(H),
+ {Host,Port};
+ Res ->
+ ct:log("find_first_server ~p UseSSL=~p failed with~n~p",[{Host,Port},UseSSL,Res]),
+ find_first_server(UseSSL, Ss)
+ end;
+find_first_server(false, [{spare_host,Host,Port}|_]) ->
+ ct:log("find_first_server can't find start_tls host, use the spare non-start_tls host for plain ldap: ~p",[{Host,Port}]),
+ {Host,Port};
+find_first_server(_, []) ->
+ ct:log("find_first_server, nothing left to try",[]),
+ undefined.
+
+initialize_db(Config) ->
+ case {open_bind(Config), inet:gethostname()} of
+ {{ok,H}, {ok,MyHost}} ->
+ Path = "dc="++MyHost++",dc=ericsson,dc=se",
+ delete_old_contents(H, Path),
+ add_new_contents(H, Path, MyHost),
+ eldap:close(H),
+ [{eldap_path,Path}|Config];
+ Other ->
+ ct:fail("initialize_db failed: ~p",[Other])
+ end.
+clear_db(Config) ->
+ {ok,H} = open_bind(Config),
+ Path = ?config(eldap_path, Config),
+ delete_old_contents(H, Path),
+ eldap:close(H),
+ Config.
-do_api_checks(H, Config) ->
- BasePath = proplists:get_value(eldap_path, Config),
+delete_old_contents(H, Path) ->
+ case eldap:search(H, [{base, Path},
+ {filter, eldap:present("objectclass")},
+ {scope, eldap:wholeSubtree()}])
+ of
+ {ok, #eldap_search_result{entries=Entries}} ->
+ [ok = eldap:delete(H,DN) || #eldap_entry{object_name=DN} <- Entries];
+ _Res ->
+ ignore
+ end.
- All = fun(Where) ->
- eldap:search(H, #eldap_search{base=Where,
- filter=eldap:present("objectclass"),
- scope= eldap:wholeSubtree()})
- end,
- {ok, #eldap_search_result{entries=[_XYZ]}} = All(BasePath),
-%% ct:log("XYZ=~p",[_XYZ]),
- {error, noSuchObject} = All("cn=Bar,"++BasePath),
+add_new_contents(H, Path, MyHost) ->
+ ok(eldap:add(H,"dc=ericsson,dc=se",
+ [{"objectclass", ["dcObject", "organization"]},
+ {"dc", ["ericsson"]},
+ {"o", ["Testing"]}])),
+ ok(eldap:add(H,Path,
+ [{"objectclass", ["dcObject", "organization"]},
+ {"dc", [MyHost]},
+ {"o", ["Test machine"]}])).
- {error, _} = eldap:add(H, "cn=Jonas Jonsson," ++ BasePath,
- [{"objectclass", ["person"]},
- {"cn", ["Jonas Jonsson"]}, {"sn", ["Jonsson"]}]),
- eldap:simple_bind(H, "cn=Manager,dc=ericsson,dc=se", "hejsan"),
- chk_add(H, BasePath),
- {ok,FB} = chk_search(H, BasePath),
- chk_modify(H, FB),
- chk_delete(H, BasePath),
- chk_modify_dn(H, FB).
+ok({error,entryAlreadyExists}) -> ok;
+ok(X) -> ok=X.
-chk_add(H, BasePath) ->
- ok = eldap:add(H, "cn=Jonas Jonsson," ++ BasePath,
- [{"objectclass", ["person"]},
- {"cn", ["Jonas Jonsson"]}, {"sn", ["Jonsson"]}]),
- {error, entryAlreadyExists} = eldap:add(H, "cn=Jonas Jonsson," ++ BasePath,
- [{"objectclass", ["person"]},
- {"cn", ["Jonas Jonsson"]}, {"sn", ["Jonsson"]}]),
- ok = eldap:add(H, "cn=Foo Bar," ++ BasePath,
- [{"objectclass", ["person"]},
- {"cn", ["Foo Bar"]}, {"sn", ["Bar"]}, {"telephoneNumber", ["555-1232", "555-5432"]}]),
- ok = eldap:add(H, "ou=Team," ++ BasePath,
- [{"objectclass", ["organizationalUnit"]},
- {"ou", ["Team"]}]).
-chk_search(H, BasePath) ->
- Search = fun(Filter) ->
- eldap:search(H, #eldap_search{base=BasePath,
- filter=Filter,
- scope=eldap:singleLevel()})
- end,
- JJSR = {ok, #eldap_search_result{entries=[#eldap_entry{}]}} = Search(eldap:equalityMatch("sn", "Jonsson")),
- JJSR = Search(eldap:substrings("sn", [{any, "ss"}])),
- FBSR = {ok, #eldap_search_result{entries=[#eldap_entry{object_name=FB}]}} =
- Search(eldap:substrings("sn", [{any, "a"}])),
- FBSR = Search(eldap:substrings("sn", [{initial, "B"}])),
- FBSR = Search(eldap:substrings("sn", [{final, "r"}])),
- F_AND = eldap:'and'([eldap:present("objectclass"), eldap:present("ou")]),
- {ok, #eldap_search_result{entries=[#eldap_entry{}]}} = Search(F_AND),
- F_NOT = eldap:'and'([eldap:present("objectclass"), eldap:'not'(eldap:present("ou"))]),
- {ok, #eldap_search_result{entries=[#eldap_entry{}, #eldap_entry{}]}} = Search(F_NOT),
- {ok,FB}. %% FIXME
-
-chk_modify(H, FB) ->
- Mod = [eldap:mod_replace("telephoneNumber", ["555-12345"]),
- eldap:mod_add("description", ["Nice guy"])],
- %% io:format("MOD ~p ~p ~n",[FB, Mod]),
- ok = eldap:modify(H, FB, Mod),
- %% DELETE ATTR
- ok = eldap:modify(H, FB, [eldap:mod_delete("telephoneNumber", [])]).
-
-
-chk_delete(H, BasePath) ->
- {error, entryAlreadyExists} = eldap:add(H, "cn=Jonas Jonsson," ++ BasePath,
- [{"objectclass", ["person"]},
- {"cn", ["Jonas Jonsson"]}, {"sn", ["Jonsson"]}]),
- ok = eldap:delete(H, "cn=Jonas Jonsson," ++ BasePath),
- {error, noSuchObject} = eldap:delete(H, "cn=Jonas Jonsson," ++ BasePath).
-
-chk_modify_dn(H, FB) ->
- ok = eldap:modify_dn(H, FB, "cn=Niclas Andre", true, "").
- %%io:format("Res ~p~n ~p~n",[R, All(BasePath)]).
-
-
-%%%----------------
-add(H, Attr, Value, Path0, Attrs, Class) ->
- Path = case Path0 of
- [] -> Attr ++ "=" ++ Value;
- _ -> Attr ++ "=" ++ Value ++ "," ++ Path0
- end,
- case eldap:add(H, Path, [{"objectclass", Class}, {Attr, [Value]}] ++ Attrs)
- of
- ok -> {ok, Path};
- {error, E = entryAlreadyExists} -> {E, Path};
- R = {error, Reason} ->
- io:format("~p:~p: ~s,~s =>~n ~p~n",
- [?MODULE,?LINE, Attr, Value, R]),
- exit({ldap, add, Reason})
+cond_start_tls(H, Config) ->
+ case ?config(start_tls,Config) of
+ true -> start_tls(H,Config);
+ _ -> Config
+ end.
+
+start_tls(H, Config) ->
+ KeyFile = filename:join([?config(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:fail("start_tls failed")
+ end.
+
+
+%%%----------------------------------------------------------------
+open_bind(Config) ->
+ {ok,H} = open(Config),
+ ok = eldap:simple_bind(H, "cn=Manager,dc=ericsson,dc=se", "hejsan"),
+ {ok,H}.
+
+open(Config) ->
+ {Host,Port} = ?config(server,Config),
+ SSLflag = ?config(ssl_flag,Config),
+ {ok,H} = eldap:open([Host], [{port,Port},{ssl,SSLflag}]),
+ cond_start_tls(H, Config),
+ {ok,H}.
+
+%%%----------------------------------------------------------------
+supported_extension(OID, Config) ->
+ {ok,H} = open_bind(Config),
+ case eldap:search(H, [{scope, eldap:baseObject()},
+ {filter, eldap:present("objectclass")},
+ {deref, eldap:neverDerefAliases()},
+ {attributes, ["+"]}]) of
+ {ok,R=#eldap_search_result{}} ->
+ eldap:close(H),
+ lists:member(OID,
+ [SE || EE <- R#eldap_search_result.entries,
+ {"supportedExtension",SEs} <- EE#eldap_entry.attributes,
+ SE<-SEs]);
+ _ ->
+ eldap:close(H),
+ false
end.
+%%%----------------------------------------------------------------
+client_timeout(Fun, Config) ->
+ Host = proplists:get_value(listen_host, Config),
+ Port = proplists:get_value(listen_port, Config),
+ Opts = proplists:get_value(tcp_connect_opts, Config),
+ T = 1000,
+ case eldap:open([Host], [{timeout,T},{port,Port}|Opts]) of
+ {ok,H} ->
+ T0 = now(),
+ {error,{gen_tcp_error,timeout}} = Fun(H),
+ T_op = diff(T0,now()),
+ ct:log("Time = ~p, Timeout spec = ~p",[T_op,T]),
+ if
+ T_op < T ->
+ {fail, "Timeout too early"};
+ true ->
+ ok
+ end;
+
+ Other -> ct:fail("eldap:open failed: ~p",[Other])
+ end.
+diff({M1,S1,U1},{M2,S2,U2}) ->
+ ( ((M2-M1)*1000 + (S2-S1))*1000 + (U2-U1) ).
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Develop
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-test() ->
- run().
-
-run() ->
- Cases = all(),
- run(Cases).
-
-run(Case) when is_atom(Case) ->
- run([Case]);
-run(Cases) when is_list(Cases) ->
- Run = fun(Test, Config0) ->
- Config = init_per_testcase(Test, Config0),
- try
- io:format("~nTest ~p ... ",[Test]),
- ?MODULE:Test(Config),
- end_per_testcase(Test, Config),
- io:format("ok~n",[])
- catch _:Reason ->
- io:format("~n FAIL (~p): ~p~n ~p~n",
- [Test, Reason, erlang:get_stacktrace()])
- end
- end,
- process_flag(trap_exit, true),
- Pid = spawn_link(fun() ->
- case init_per_suite([]) of
- {skip, Reason} -> io:format("Skip ~s~n",[Reason]);
- Config ->
- try
- [Run(Test, Config) || Test <- Cases]
- catch _:Err ->
- io:format("Error ~p in ~p~n",[Err, erlang:get_stacktrace()])
- end,
- end_per_suite(Config)
- end
- end),
- receive
- {'EXIT', Pid, normal} -> ok;
- Msg -> io:format("Received ~p (~p)~n",[Msg, Pid])
- after 100 -> ok end,
- process_flag(trap_exit, false),
- ok.
+%%%----------------------------------------------------------------
+init_ssl_certs_et_al(Config) ->
+ try ssl:start()
+ of
+ R when R==ok ; R=={error,{already_started,ssl}} ->
+ try make_certs:all("/dev/null",
+ filename:join(?config(data_dir,Config), "certs"))
+ of
+ {ok,_} -> true;
+ Other ->
+ ct:comment("make_certs failed"),
+ ct:log("make_certs failed ~p", [Other]),
+ false
+ catch
+ C:E ->
+ ct:comment("make_certs crashed"),
+ ct:log("make_certs failed ~p:~p", [C,E]),
+ false
+ end;
+ _ ->
+ false
+ catch
+ Error:Reason ->
+ ct:comment("ssl failed to start"),
+ ct:log("init_per_suite failed to start ssl Error=~p Reason=~p", [Error, Reason]),
+ false
+ end.
diff --git a/lib/eldap/test/eldap_basic_SUITE_data/RAND b/lib/eldap/test/eldap_basic_SUITE_data/RAND
new file mode 100644
index 0000000000..70997bd01f
--- /dev/null
+++ b/lib/eldap/test/eldap_basic_SUITE_data/RAND
Binary files differ
diff --git a/lib/eldap/test/make_certs.erl b/lib/eldap/test/make_certs.erl
index f963af180d..15a7e118ff 100644
--- a/lib/eldap/test/make_certs.erl
+++ b/lib/eldap/test/make_certs.erl
@@ -1,41 +1,89 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(make_certs).
+-compile([export_all]).
--export([all/2]).
+%-export([all/1, all/2, rootCA/2, intermediateCA/3, endusers/3, enduser/3, revoke/3, gencrl/2, verify/3]).
--record(dn, {commonName,
+-record(config, {commonName,
organizationalUnitName = "Erlang OTP",
organizationName = "Ericsson AB",
localityName = "Stockholm",
countryName = "SE",
- emailAddress = "[email protected]"}).
+ emailAddress = "[email protected]",
+ default_bits = 2048,
+ v2_crls = true,
+ ecc_certs = false,
+ issuing_distribution_point = false,
+ crl_port = 8000,
+ openssl_cmd = "openssl"}).
+
+
+default_config() ->
+ #config{}.
+
+make_config(Args) ->
+ make_config(Args, #config{}).
+
+make_config([], C) ->
+ C;
+make_config([{organizationalUnitName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationalUnitName = Name});
+make_config([{organizationName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationName = Name});
+make_config([{localityName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{localityName = Name});
+make_config([{countryName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{countryName = Name});
+make_config([{emailAddress, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{emailAddress = Name});
+make_config([{default_bits, Bits}|T], C) when is_integer(Bits) ->
+ make_config(T, C#config{default_bits = Bits});
+make_config([{v2_crls, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{v2_crls = Bool});
+make_config([{crl_port, Port}|T], C) when is_integer(Port) ->
+ make_config(T, C#config{crl_port = Port});
+make_config([{ecc_certs, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{ecc_certs = Bool});
+make_config([{issuing_distribution_point, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{issuing_distribution_point = Bool});
+make_config([{openssl_cmd, Cmd}|T], C) when is_list(Cmd) ->
+ make_config(T, C#config{openssl_cmd = Cmd}).
+
+
+all([DataDir, PrivDir]) ->
+ all(DataDir, PrivDir).
all(DataDir, PrivDir) ->
- OpenSSLCmd = "openssl",
+ all(DataDir, PrivDir, #config{}).
+
+all(DataDir, PrivDir, C) when is_list(C) ->
+ all(DataDir, PrivDir, make_config(C));
+all(DataDir, PrivDir, C = #config{}) ->
+ ok = filelib:ensure_dir(filename:join(PrivDir, "erlangCA")),
create_rnd(DataDir, PrivDir), % For all requests
- rootCA(PrivDir, OpenSSLCmd, "erlangCA"),
- intermediateCA(PrivDir, OpenSSLCmd, "otpCA", "erlangCA"),
- endusers(PrivDir, OpenSSLCmd, "otpCA", ["client", "server"]),
- collect_certs(PrivDir, ["erlangCA", "otpCA"], ["client", "server"]),
- %% Create keycert files
+ rootCA(PrivDir, "erlangCA", C),
+ intermediateCA(PrivDir, "otpCA", "erlangCA", C),
+ endusers(PrivDir, "otpCA", ["client", "server", "revoked"], C),
+ endusers(PrivDir, "erlangCA", ["localhost"], C),
+ %% Create keycert files
SDir = filename:join([PrivDir, "server"]),
SC = filename:join([SDir, "cert.pem"]),
SK = filename:join([SDir, "key.pem"]),
@@ -46,7 +94,14 @@ all(DataDir, PrivDir) ->
CK = filename:join([CDir, "key.pem"]),
CKC = filename:join([CDir, "keycert.pem"]),
append_files([CK, CC], CKC),
- remove_rnd(PrivDir).
+ RDir = filename:join([PrivDir, "revoked"]),
+ RC = filename:join([RDir, "cert.pem"]),
+ RK = filename:join([RDir, "key.pem"]),
+ RKC = filename:join([RDir, "keycert.pem"]),
+ revoke(PrivDir, "otpCA", "revoked", C),
+ append_files([RK, RC], RKC),
+ remove_rnd(PrivDir),
+ {ok, C}.
append_files(FileNames, ResultFileName) ->
{ok, ResultFile} = file:open(ResultFileName, [write]),
@@ -59,117 +114,182 @@ do_append_files([F|Fs], RF) ->
ok = file:write(RF, Data),
do_append_files(Fs, RF).
-rootCA(Root, OpenSSLCmd, Name) ->
- create_ca_dir(Root, Name, ca_cnf(Name)),
- DN = #dn{commonName = Name},
- create_self_signed_cert(Root, OpenSSLCmd, Name, req_cnf(DN)),
- ok.
+rootCA(Root, Name, C) ->
+ create_ca_dir(Root, Name, ca_cnf(C#config{commonName = Name})),
+ create_self_signed_cert(Root, Name, req_cnf(C#config{commonName = Name}), C),
+ file:copy(filename:join([Root, Name, "cert.pem"]), filename:join([Root, Name, "cacerts.pem"])),
+ gencrl(Root, Name, C).
-intermediateCA(Root, OpenSSLCmd, CA, ParentCA) ->
- CA = "otpCA",
- create_ca_dir(Root, CA, ca_cnf(CA)),
+intermediateCA(Root, CA, ParentCA, C) ->
+ create_ca_dir(Root, CA, ca_cnf(C#config{commonName = CA})),
CARoot = filename:join([Root, CA]),
- DN = #dn{commonName = CA},
CnfFile = filename:join([CARoot, "req.cnf"]),
- file:write_file(CnfFile, req_cnf(DN)),
- KeyFile = filename:join([CARoot, "private", "key.pem"]),
- ReqFile = filename:join([CARoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = CA})),
+ KeyFile = filename:join([CARoot, "private", "key.pem"]),
+ ReqFile = filename:join([CARoot, "req.pem"]),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
CertFile = filename:join([CARoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, ParentCA, "ca_cert", ReqFile, CertFile).
-
-endusers(Root, OpenSSLCmd, CA, Users) ->
- lists:foreach(fun(User) -> enduser(Root, OpenSSLCmd, CA, User) end, Users).
-
-enduser(Root, OpenSSLCmd, CA, User) ->
+ sign_req(Root, ParentCA, "ca_cert", ReqFile, CertFile, C),
+ CACertsFile = filename:join(CARoot, "cacerts.pem"),
+ file:copy(filename:join([Root, ParentCA, "cacerts.pem"]), CACertsFile),
+ %% append this CA's cert to the cacerts file
+ {ok, Bin} = file:read_file(CertFile),
+ {ok, FD} = file:open(CACertsFile, [append]),
+ file:write(FD, ["\n", Bin]),
+ file:close(FD),
+ gencrl(Root, CA, C).
+
+endusers(Root, CA, Users, C) ->
+ [enduser(Root, CA, User, C) || User <- Users].
+
+enduser(Root, CA, User, C) ->
UsrRoot = filename:join([Root, User]),
file:make_dir(UsrRoot),
CnfFile = filename:join([UsrRoot, "req.cnf"]),
- DN = #dn{commonName = User},
- file:write_file(CnfFile, req_cnf(DN)),
- KeyFile = filename:join([UsrRoot, "key.pem"]),
- ReqFile = filename:join([UsrRoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = User})),
+ KeyFile = filename:join([UsrRoot, "key.pem"]),
+ ReqFile = filename:join([UsrRoot, "req.pem"]),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
+ %create_req(Root, CnfFile, KeyFile, ReqFile),
CertFileAllUsage = filename:join([UsrRoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert", ReqFile, CertFileAllUsage),
+ sign_req(Root, CA, "user_cert", ReqFile, CertFileAllUsage, C),
CertFileDigitalSigOnly = filename:join([UsrRoot, "digital_signature_only_cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly).
-
-collect_certs(Root, CAs, Users) ->
- Bins = lists:foldr(
- fun(CA, Acc) ->
- File = filename:join([Root, CA, "cert.pem"]),
- {ok, Bin} = file:read_file(File),
- [Bin, "\n" | Acc]
- end, [], CAs),
- lists:foreach(
- fun(User) ->
- File = filename:join([Root, User, "cacerts.pem"]),
- file:write_file(File, Bins)
- end, Users).
+ sign_req(Root, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly, C),
+ CACertsFile = filename:join(UsrRoot, "cacerts.pem"),
+ file:copy(filename:join([Root, CA, "cacerts.pem"]), CACertsFile),
+ ok.
-create_self_signed_cert(Root, OpenSSLCmd, CAName, Cnf) ->
+revoke(Root, CA, User, C) ->
+ UsrCert = filename:join([Root, User, "cert.pem"]),
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -revoke ", UsrCert,
+ [" -crl_reason keyCompromise" || C#config.v2_crls ],
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ gencrl(Root, CA, C).
+
+gencrl(Root, CA, C) ->
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -gencrl ",
+ " -crlhours 24",
+ " -out ", CACRLFile,
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+
+verify(Root, CA, User, C) ->
+ CAFile = filename:join([Root, User, "cacerts.pem"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ CertFile = filename:join([Root, User, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " verify"
+ " -CAfile ", CAFile,
+ " -CRLfile ", CACRLFile, %% this is undocumented, but seems to work
+ " -crl_check ",
+ CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ try cmd(Cmd, Env) catch
+ exit:{eval_cmd, _, _} ->
+ invalid
+ end.
+
+create_self_signed_cert(Root, CAName, Cnf, C = #config{ecc_certs = true}) ->
CARoot = filename:join([Root, CAName]),
CnfFile = filename:join([CARoot, "req.cnf"]),
file:write_file(CnfFile, Cnf),
- KeyFile = filename:join([CARoot, "private", "key.pem"]),
- CertFile = filename:join([CARoot, "cert.pem"]),
- Cmd = [OpenSSLCmd, " req"
+ KeyFile = filename:join([CARoot, "private", "key.pem"]),
+ CertFile = filename:join([CARoot, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+
+ Cmd2 = [C#config.openssl_cmd, " req"
+ " -new"
+ " -x509"
+ " -config ", CnfFile,
+ " -key ", KeyFile,
+ " -outform PEM ",
+ " -out ", CertFile],
+ cmd(Cmd2, Env);
+create_self_signed_cert(Root, CAName, Cnf, C) ->
+ CARoot = filename:join([Root, CAName]),
+ CnfFile = filename:join([CARoot, "req.cnf"]),
+ file:write_file(CnfFile, Cnf),
+ KeyFile = filename:join([CARoot, "private", "key.pem"]),
+ CertFile = filename:join([CARoot, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " req"
" -new"
" -x509"
" -config ", CnfFile,
" -keyout ", KeyFile,
- " -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
-
-% openssl 1.0 generates key files in pkcs8 format by default and we don't handle this format
-fix_key_file(OpenSSLCmd, KeyFile) ->
- KeyFileTmp = KeyFile ++ ".tmp",
- Cmd = [OpenSSLCmd, " rsa",
- " -in ",
- KeyFile,
- " -out ",
- KeyFileTmp],
- cmd(Cmd, []),
- ok = file:rename(KeyFileTmp, KeyFile).
+ " -outform PEM",
+ " -out ", CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+
create_ca_dir(Root, CAName, Cnf) ->
CARoot = filename:join([Root, CAName]),
+ ok = filelib:ensure_dir(CARoot),
file:make_dir(CARoot),
create_dirs(CARoot, ["certs", "crl", "newcerts", "private"]),
create_rnd(Root, filename:join([CAName, "private"])),
create_files(CARoot, [{"serial", "01\n"},
+ {"crlnumber", "01"},
{"index.txt", ""},
{"ca.cnf", Cnf}]).
-create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile) ->
- Cmd = [OpenSSLCmd, " req"
+create_req(Root, CnfFile, KeyFile, ReqFile, C = #config{ecc_certs = true}) ->
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ Cmd2 = [C#config.openssl_cmd, " req"
+ " -new ",
+ " -key ", KeyFile,
+ " -outform PEM ",
+ " -out ", ReqFile,
+ " -config ", CnfFile],
+ cmd(Cmd2, Env);
+ %fix_key_file(KeyFile).
+create_req(Root, CnfFile, KeyFile, ReqFile, C) ->
+ Cmd = [C#config.openssl_cmd, " req"
" -new"
" -config ", CnfFile,
- " -keyout ", KeyFile,
- " -out ", ReqFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
+ " -outform PEM ",
+ " -keyout ", KeyFile,
+ " -out ", ReqFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+ %fix_key_file(KeyFile).
+
-sign_req(Root, OpenSSLCmd, CA, CertType, ReqFile, CertFile) ->
+sign_req(Root, CA, CertType, ReqFile, CertFile, C) ->
CACnfFile = filename:join([Root, CA, "ca.cnf"]),
- Cmd = [OpenSSLCmd, " ca"
+ Cmd = [C#config.openssl_cmd, " ca"
" -batch"
" -notext"
- " -config ", CACnfFile,
+ " -config ", CACnfFile,
" -extensions ", CertType,
- " -in ", ReqFile,
+ " -in ", ReqFile,
" -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
cmd(Cmd, Env).
-
+
%%
%% Misc
%%
-
+
create_dirs(Root, Dirs) ->
lists:foreach(fun(Dir) ->
file:make_dir(filename:join([Root, Dir])) end,
@@ -192,30 +312,30 @@ remove_rnd(Dir) ->
cmd(Cmd, Env) ->
FCmd = lists:flatten(Cmd),
- Port = open_port({spawn, FCmd}, [stream, eof, exit_status, stderr_to_stdout,
+ Port = open_port({spawn, FCmd}, [stream, eof, exit_status, stderr_to_stdout,
{env, Env}]),
- eval_cmd(Port).
+ eval_cmd(Port, FCmd).
-eval_cmd(Port) ->
- receive
+eval_cmd(Port, Cmd) ->
+ receive
{Port, {data, _}} ->
- eval_cmd(Port);
+ eval_cmd(Port, Cmd);
{Port, eof} ->
ok
end,
receive
{Port, {exit_status, Status}} when Status /= 0 ->
%% io:fwrite("exit status: ~w~n", [Status]),
- exit({eval_cmd, Status})
+ exit({eval_cmd, Cmd, Status})
after 0 ->
ok
end.
%%
-%% Contents of configuration files
+%% Contents of configuration files
%%
-req_cnf(DN) ->
+req_cnf(C) ->
["# Purpose: Configuration for requests (end users and CAs)."
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -224,10 +344,10 @@ req_cnf(DN) ->
"[req]\n"
"input_password = secret\n"
"output_password = secret\n"
- "default_bits = 1024\n"
+ "default_bits = ", integer_to_list(C#config.default_bits), "\n"
"RANDFILE = $ROOTDIR/RAND\n"
"encrypt_key = no\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"#string_mask = pkix\n"
"x509_extensions = ca_ext\n"
"prompt = no\n"
@@ -235,12 +355,12 @@ req_cnf(DN) ->
"\n"
"[name]\n"
- "commonName = ", DN#dn.commonName, "\n"
- "organizationalUnitName = ", DN#dn.organizationalUnitName, "\n"
- "organizationName = ", DN#dn.organizationName, "\n"
- "localityName = ", DN#dn.localityName, "\n"
- "countryName = ", DN#dn.countryName, "\n"
- "emailAddress = ", DN#dn.emailAddress, "\n"
+ "commonName = ", C#config.commonName, "\n"
+ "organizationalUnitName = ", C#config.organizationalUnitName, "\n"
+ "organizationName = ", C#config.organizationName, "\n"
+ "localityName = ", C#config.localityName, "\n"
+ "countryName = ", C#config.countryName, "\n"
+ "emailAddress = ", C#config.emailAddress, "\n"
"\n"
"[ca_ext]\n"
@@ -249,8 +369,7 @@ req_cnf(DN) ->
"subjectKeyIdentifier = hash\n"
"subjectAltName = email:copy\n"].
-
-ca_cnf(CA) ->
+ca_cnf(C) ->
["# Purpose: Configuration for CAs.\n"
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -258,21 +377,23 @@ ca_cnf(CA) ->
"\n"
"[ca]\n"
- "dir = $ROOTDIR/", CA, "\n"
+ "dir = $ROOTDIR/", C#config.commonName, "\n"
"certs = $dir/certs\n"
"crl_dir = $dir/crl\n"
"database = $dir/index.txt\n"
"new_certs_dir = $dir/newcerts\n"
"certificate = $dir/cert.pem\n"
"serial = $dir/serial\n"
- "crl = $dir/crl.pem\n"
+ "crl = $dir/crl.pem\n",
+ ["crlnumber = $dir/crlnumber\n" || C#config.v2_crls],
"private_key = $dir/private/key.pem\n"
"RANDFILE = $dir/private/RAND\n"
"\n"
- "x509_extensions = user_cert\n"
+ "x509_extensions = user_cert\n",
+ ["crl_extensions = crl_ext\n" || C#config.v2_crls],
"unique_subject = no\n"
"default_days = 3600\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"preserve = no\n"
"policy = policy_match\n"
"\n"
@@ -286,6 +407,13 @@ ca_cnf(CA) ->
"emailAddress = supplied\n"
"\n"
+ "[crl_ext]\n"
+ "authorityKeyIdentifier=keyid:always,issuer:always\n",
+ ["issuingDistributionPoint=critical, @idpsec\n" || C#config.issuing_distribution_point],
+
+ "[idpsec]\n"
+ "fullname=URI:http://localhost:8000/",C#config.commonName,"/crl.pem\n"
+
"[user_cert]\n"
"basicConstraints = CA:false\n"
"keyUsage = nonRepudiation, digitalSignature, keyEncipherment\n"
@@ -293,6 +421,12 @@ ca_cnf(CA) ->
"authorityKeyIdentifier = keyid,issuer:always\n"
"subjectAltName = email:copy\n"
"issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+
+ "[crl_section]\n"
+ %% intentionally invalid
+ "URI.1=http://localhost/",C#config.commonName,"/crl.pem\n"
+ "URI.2=http://localhost:",integer_to_list(C#config.crl_port),"/",C#config.commonName,"/crl.pem\n"
"\n"
"[user_cert_digital_signature_only]\n"
@@ -310,4 +444,7 @@ ca_cnf(CA) ->
"subjectKeyIdentifier = hash\n"
"authorityKeyIdentifier = keyid:always,issuer:always\n"
"subjectAltName = email:copy\n"
- "issuerAltName = issuer:copy\n"].
+ "issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+ ].
+
diff --git a/lib/eldap/vsn.mk b/lib/eldap/vsn.mk
index dd1f50653c..adca41ed63 100644
--- a/lib/eldap/vsn.mk
+++ b/lib/eldap/vsn.mk
@@ -1 +1 @@
-ELDAP_VSN = 1.0.2
+ELDAP_VSN = 1.1.1
diff --git a/lib/erl_docgen/doc/src/block_tags.xml b/lib/erl_docgen/doc/src/block_tags.xml
index 0900d7f008..9048d89e87 100644
--- a/lib/erl_docgen/doc/src/block_tags.xml
+++ b/lib/erl_docgen/doc/src/block_tags.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/book.xml b/lib/erl_docgen/doc/src/book.xml
index 73bfb7916d..2ff26ba5a1 100644
--- a/lib/erl_docgen/doc/src/book.xml
+++ b/lib/erl_docgen/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/character_entities.xml b/lib/erl_docgen/doc/src/character_entities.xml
index 9f55b68d18..f484ac2201 100644
--- a/lib/erl_docgen/doc/src/character_entities.xml
+++ b/lib/erl_docgen/doc/src/character_entities.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/doc-build.xml b/lib/erl_docgen/doc/src/doc-build.xml
index ae1b17dff5..95cfd367aa 100644
--- a/lib/erl_docgen/doc/src/doc-build.xml
+++ b/lib/erl_docgen/doc/src/doc-build.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/erl_docgen/doc/src/docgen_xml_check.xml b/lib/erl_docgen/doc/src/docgen_xml_check.xml
index 58cf069d81..04ff25c8af 100644
--- a/lib/erl_docgen/doc/src/docgen_xml_check.xml
+++ b/lib/erl_docgen/doc/src/docgen_xml_check.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/erl_docgen_app.xml b/lib/erl_docgen/doc/src/erl_docgen_app.xml
index 25c473bb7e..bf12f69534 100644
--- a/lib/erl_docgen/doc/src/erl_docgen_app.xml
+++ b/lib/erl_docgen/doc/src/erl_docgen_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>2011</year><year>2011</year>
+ <year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/fasc_dtds.xml b/lib/erl_docgen/doc/src/fasc_dtds.xml
index 86eeb958f6..a00def1644 100644
--- a/lib/erl_docgen/doc/src/fasc_dtds.xml
+++ b/lib/erl_docgen/doc/src/fasc_dtds.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2007</year><year>2011</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/fascicules.xml b/lib/erl_docgen/doc/src/fascicules.xml
index 1b9d6bc94d..154c8a3b6d 100644
--- a/lib/erl_docgen/doc/src/fascicules.xml
+++ b/lib/erl_docgen/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/erl_docgen/doc/src/header_tags.xml b/lib/erl_docgen/doc/src/header_tags.xml
index dfae15107f..70f7588675 100644
--- a/lib/erl_docgen/doc/src/header_tags.xml
+++ b/lib/erl_docgen/doc/src/header_tags.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/inline_tags.xml b/lib/erl_docgen/doc/src/inline_tags.xml
index 9b27da659b..2aff8bae68 100644
--- a/lib/erl_docgen/doc/src/inline_tags.xml
+++ b/lib/erl_docgen/doc/src/inline_tags.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/notes.xml b/lib/erl_docgen/doc/src/notes.xml
index 24d12b2bb7..c2f81dfcc1 100644
--- a/lib/erl_docgen/doc/src/notes.xml
+++ b/lib/erl_docgen/doc/src/notes.xml
@@ -30,7 +30,80 @@
</header>
<p>This document describes the changes made to the <em>erl_docgen</em> application.</p>
- <section><title>Erl_Docgen 0.3.4.1</title>
+ <section><title>Erl_Docgen 0.3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Maps: Properly align union typed assoc values in
+ documentation</p>
+ <p>
+ Own Id: OTP-12190</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.3.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix spec to doc generation from erl_docgen and edoc for
+ maps</p>
+ <p>
+ Own Id: OTP-12058</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.3.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle map types in docgen_edoc_xml_cb</p>
+ <p>
+ Own Id: OTP-11776</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.3.4.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/erl_docgen/doc/src/overview.xml b/lib/erl_docgen/doc/src/overview.xml
index 2a420c53d9..9985141e75 100644
--- a/lib/erl_docgen/doc/src/overview.xml
+++ b/lib/erl_docgen/doc/src/overview.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/part.xml b/lib/erl_docgen/doc/src/part.xml
index 26d660df08..36d0baabd0 100644
--- a/lib/erl_docgen/doc/src/part.xml
+++ b/lib/erl_docgen/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2011</year><year>2011</year>
+ <year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/ref_man.xml b/lib/erl_docgen/doc/src/ref_man.xml
index a2bc1a10a0..735fb7d1c9 100644
--- a/lib/erl_docgen/doc/src/ref_man.xml
+++ b/lib/erl_docgen/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2011</year><year>2011</year>
+ <year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/refman_dtds.xml b/lib/erl_docgen/doc/src/refman_dtds.xml
index 4f0e388a8a..86d4272e8c 100644
--- a/lib/erl_docgen/doc/src/refman_dtds.xml
+++ b/lib/erl_docgen/doc/src/refman_dtds.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/user_guide_dtds.xml b/lib/erl_docgen/doc/src/user_guide_dtds.xml
index 79a7701ce8..e533fbd96c 100644
--- a/lib/erl_docgen/doc/src/user_guide_dtds.xml
+++ b/lib/erl_docgen/doc/src/user_guide_dtds.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index 33808859c7..3bcdd11c35 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -454,13 +454,21 @@
<!-- *ref/Section -->
<xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
- <xsl:text>&#10;.SH "</xsl:text><xsl:value-of select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>"&#10;</xsl:text>
+ <xsl:text>&#10;.SH "</xsl:text><xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+ <xsl:with-param name="replace" select="&quot;\&quot;" />
+ <xsl:with-param name="with" select="&quot;\\\&quot;" />
+ </xsl:call-template><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- *ref/Subsection -->
<xsl:template match="section/section">
- <xsl:text>&#10;.SS "</xsl:text><xsl:value-of select="title"/><xsl:text>"&#10;</xsl:text>
+ <xsl:text>&#10;.SS "</xsl:text><xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="title" />
+ <xsl:with-param name="replace" select="&quot;\&quot;" />
+ <xsl:with-param name="with" select="&quot;\\\&quot;" />
+ </xsl:call-template><xsl:text>"&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index e3cc354206..e6bf9ce20e 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1014,6 +1014,8 @@ t_type([#xmlElement{name = nil}]) ->
t_nil();
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 = 'fun', content = Es}]) ->
@@ -1023,7 +1025,11 @@ t_type([#xmlElement{name = abstype, content = Es}]) ->
t_type([#xmlElement{name = union, content = Es}]) ->
t_union(Es);
t_type([#xmlElement{name = record, content = Es}]) ->
- t_record(Es).
+ t_record(Es);
+t_type([#xmlElement{name = map, content = Es}]) ->
+ t_map(Es);
+t_type([#xmlElement{name = map_field, content = Es}]) ->
+ t_map_field(Es).
t_var(E) ->
[get_attrval(name, E)].
@@ -1046,6 +1052,9 @@ t_nil() ->
t_list(Es) ->
["["] ++ t_utype(get_elem(type, Es)) ++ ["]"].
+t_nonempty_list(Es) ->
+ ["["] ++ t_utype(get_elem(type, Es)) ++ [", ...]"].
+
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
@@ -1058,6 +1067,12 @@ t_record([E|Es]) ->
t_field(#xmlElement{name=field, content=[Atom,Type]}) ->
[get_attrval(value, Atom), "="] ++ t_utype_elem(Type).
+t_map(Es) ->
+ ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+
+t_map_field([K,V]) ->
+ [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+
t_abstype(Es) ->
case split_at_colon(t_name(get_elem(erlangName, Es)),[]) of
{Mod,Type} ->
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index 3929e66515..1075c47801 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -388,6 +388,8 @@ 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 = 'fun', content = Es}]) ->
["fun("] ++ t_fun(Es) ++ [")"];
t_type([E = #xmlElement{name = record, content = Es}]) ->
@@ -430,6 +432,13 @@ t_nonempty_list(Es) ->
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, 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))).
@@ -545,12 +554,14 @@ ot_type([#xmlElement{name = nonempty_list, content = Es}]) ->
ot_nonempty_list(Es);
ot_type([#xmlElement{name = tuple, content = Es}]) ->
ot_tuple(Es);
+ot_type([#xmlElement{name = map, content = Es}]) ->
+ ot_map(Es);
ot_type([#xmlElement{name = 'fun', content = Es}]) ->
ot_fun(Es);
ot_type([#xmlElement{name = record, content = Es}]) ->
ot_record(Es);
ot_type([#xmlElement{name = abstype, content = Es}]) ->
- ot_abstype(Es);
+ ot_abstype(Es);
ot_type([#xmlElement{name = union, content = Es}]) ->
ot_union(Es).
@@ -601,6 +612,12 @@ ot_nonempty_list(Es) ->
ot_tuple(Es) ->
{type,0,tuple,[ot_utype_elem(E) || E <- 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_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
Args = [ot_utype_elem(A) || A <- get_content(argtypes, Es)],
diff --git a/lib/erl_docgen/src/erl_docgen.app.src b/lib/erl_docgen/src/erl_docgen.app.src
index daad172106..e2830b2692 100644
--- a/lib/erl_docgen/src/erl_docgen.app.src
+++ b/lib/erl_docgen/src/erl_docgen.app.src
@@ -8,7 +8,7 @@
},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []
- }
+ {env, []},
+ {runtime_dependencies, ["xmerl-1.3.7","stdlib-2.0","edoc-0.7.13","erts-6.0"]}
]
}.
diff --git a/lib/erl_docgen/src/erl_docgen.appup.src b/lib/erl_docgen/src/erl_docgen.appup.src
index 54a63833e6..972a881c41 100644
--- a/lib/erl_docgen/src/erl_docgen.appup.src
+++ b/lib/erl_docgen/src/erl_docgen.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, erl_docgen}]}],
+ [{<<".*">>,[{restart_application, erl_docgen}]}]
+}.
diff --git a/lib/erl_docgen/test/Makefile b/lib/erl_docgen/test/Makefile
new file mode 100644
index 0000000000..9f4cc04105
--- /dev/null
+++ b/lib/erl_docgen/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ erl_docgen_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/erl_docgen_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) erl_docgen.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/erl_docgen/test/erl_docgen.spec b/lib/erl_docgen/test/erl_docgen.spec
new file mode 100644
index 0000000000..98833614df
--- /dev/null
+++ b/lib/erl_docgen/test/erl_docgen.spec
@@ -0,0 +1 @@
+{suites,"../erl_docgen_test",all}.
diff --git a/lib/erl_docgen/test/erl_docgen_SUITE.erl b/lib/erl_docgen/test/erl_docgen_SUITE.erl
new file mode 100644
index 0000000000..20fbc1229b
--- /dev/null
+++ b/lib/erl_docgen/test/erl_docgen_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(erl_docgen_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the erl_docgen app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(erl_docgen).
+
+appup() ->
+ [{doc, "Test that the erl_docgen appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(erl_docgen).
diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk
index cda8671cfd..8957d6ac40 100644
--- a/lib/erl_docgen/vsn.mk
+++ b/lib/erl_docgen/vsn.mk
@@ -1 +1 @@
-ERL_DOCGEN_VSN = 0.3.4.1
+ERL_DOCGEN_VSN = 0.3.7
diff --git a/lib/erl_interface/aclocal.m4 b/lib/erl_interface/aclocal.m4
deleted file mode 100644
index 46b30a16b3..0000000000
--- a/lib/erl_interface/aclocal.m4
+++ /dev/null
@@ -1,1914 +0,0 @@
-dnl
-dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 1998-2013. All Rights Reserved.
-dnl
-dnl The contents of this file are subject to the Erlang Public License,
-dnl Version 1.1, (the "License"); you may not use this file except in
-dnl compliance with the License. You should have received a copy of the
-dnl Erlang Public License along with this software. If not, it can be
-dnl retrieved online at http://www.erlang.org/.
-dnl
-dnl Software distributed under the License is distributed on an "AS IS"
-dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-dnl the License for the specific language governing rights and limitations
-dnl under the License.
-dnl
-dnl %CopyrightEnd%
-dnl
-
-dnl
-dnl aclocal.m4
-dnl
-dnl Local macros used in configure.in. The Local Macros which
-dnl could/should be part of autoconf are prefixed LM_, macros specific
-dnl to the Erlang system are prefixed ERL_.
-dnl
-
-AC_DEFUN(LM_PRECIOUS_VARS,
-[
-
-dnl ERL_TOP
-AC_ARG_VAR(ERL_TOP, [Erlang/OTP top source directory])
-
-dnl Tools
-AC_ARG_VAR(CC, [C compiler])
-AC_ARG_VAR(CFLAGS, [C compiler flags])
-AC_ARG_VAR(STATIC_CFLAGS, [C compiler static flags])
-AC_ARG_VAR(CFLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag passed via C compiler])
-AC_ARG_VAR(CPP, [C/C++ preprocessor])
-AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
-AC_ARG_VAR(CXX, [C++ compiler])
-AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
-AC_ARG_VAR(LD, [linker (is often overridden by configure)])
-AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
-AC_ARG_VAR(LIBS, [libraries])
-AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LD_FLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(LFS_CFLAGS, [large file support C compiler flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LDFLAGS, [large file support linker flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LIBS, [large file support libraries (set all LFS_* variables or none)])
-AC_ARG_VAR(RANLIB, [ranlib])
-AC_ARG_VAR(AR, [ar])
-AC_ARG_VAR(GETCONF, [getconf])
-
-dnl Cross system root
-AC_ARG_VAR(erl_xcomp_sysroot, [Absolute cross system root path (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_isysroot, [Absolute cross system root include path (only used when cross compiling)])
-
-dnl Cross compilation variables
-AC_ARG_VAR(erl_xcomp_bigendian, [big endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_double_middle_endian, [double-middle-endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_clock_gettime_correction, [clock_gettime() can be used for time correction: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_nptl, [have Native POSIX Thread Library: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigusrx, [SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigaltstack, [have working sigaltstack(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_poll, [have working poll(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_kqueue, [have working kqueue(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_putenv_copy, [putenv() stores key-value copy: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_reliable_fpe, [have reliable floating point exceptions: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_getaddrinfo, [have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_gethrvtime_procfs_ioctl, [have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-
-])
-
-AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
-[
-erl_xcomp_without_sysroot=no
-if test "$cross_compiling" = "yes"; then
- test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
- test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
-else
- erl_xcomp_sysroot=
- erl_xcomp_isysroot=
-fi
-])
-
-AC_DEFUN(LM_CHECK_GETCONF,
-[
-if test "$cross_compiling" != "yes"; then
- AC_CHECK_PROG([GETCONF], [getconf], [getconf], [false])
-else
- dnl First check if we got a `<HOST>-getconf' in $PATH
- host_getconf="$host_alias-getconf"
- AC_CHECK_PROG([GETCONF], [$host_getconf], [$host_getconf], [false])
- if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
- dnl We should perhaps give up if we have'nt found it by now, but at
- dnl least in one Tilera MDE `getconf' under sysroot is a bourne
- dnl shell script which we can use. We try to find `<HOST>-getconf'
- dnl or `getconf' under sysconf, but only under sysconf since
- dnl `getconf' in $PATH is almost guaranteed to be for the build
- dnl machine.
- GETCONF=
- prfx="$erl_xcomp_sysroot"
- AC_PATH_TOOL([GETCONF], [getconf], [false],
- ["$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"])
- fi
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_WINDOWS_ENVIRONMENT
-dnl
-dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
-dnl
-
-AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
-[
-MIXED_CYGWIN=no
-MIXED_MSYS=no
-
-AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
-if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- elif test -x /usr/bin/msysinfo; then
- CFLAGS="-O2"
- MIXED_MSYS=yes
- AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
-else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
-fi
-
-AC_SUBST(MIXED_VC)
-
-if test "x$MIXED_MSYS" != "xyes"; then
- AC_MSG_CHECKING(for mixed cygwin and native MinGW environment)
- if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
- else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
- fi
-else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
-
-AC_MSG_CHECKING(if we mix cygwin with any native compiler)
-if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_CYGWIN)
-
-AC_MSG_CHECKING(if we mix msys with another native compiler)
-if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_MSYS)
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_FIND_EMU_CC
-dnl
-dnl
-dnl Tries fairly hard to find a C compiler that can handle jump tables.
-dnl Defines the @EMU_CC@ variable for the makefiles and
-dnl inserts NO_JUMP_TABLE in the header if one cannot be found...
-dnl
-
-AC_DEFUN(LM_FIND_EMU_CC,
- [AC_CACHE_CHECK(for a compiler that handles jumptables,
- ac_cv_prog_emu_cc,
- [
-AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
-lbl1:
- return 1;
-lbl2:
- return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
-
-if test $ac_cv_prog_emu_cc = no; then
- for ac_progname in emu_cc.sh gcc-4.2 gcc; do
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
- break
- fi
- done
-fi
-
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
- CFLAGS=""
- CPPFLAGS=""
- AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
- lbl1:
- return 1;
- lbl2:
- return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
- CC=$save_CC
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-])
-if test $ac_cv_prog_emu_cc = no; then
- AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
-else
- EMU_CC=$ac_cv_prog_emu_cc
-fi
-AC_SUBST(EMU_CC)
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_INSTALL_DIR
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl Figure out how to create directories with parents.
-dnl (In my opinion INSTALL_DIR is a bad name, MKSUBDIRS or something is better)
-dnl
-dnl We prefer 'install -d', but use 'mkdir -p' if it exists.
-dnl If none of these methods works, we give up.
-dnl
-
-
-AC_DEFUN(LM_PROG_INSTALL_DIR,
-[AC_CACHE_CHECK(how to create a directory including parents,
-ac_cv_prog_mkdir_p,
-[
-temp_name_base=config.$$
-temp_name=$temp_name_base/x/y/z
-$INSTALL -d $temp_name >/dev/null 2>&1
-ac_cv_prog_mkdir_p=none
-if test -d $temp_name; then
- ac_cv_prog_mkdir_p="$INSTALL -d"
-else
- mkdir -p $temp_name >/dev/null 2>&1
- if test -d $temp_name; then
- ac_cv_prog_mkdir_p="mkdir -p"
- fi
-fi
-rm -fr $temp_name_base
-])
-
-case "${ac_cv_prog_mkdir_p}" in
- none) AC_MSG_ERROR(don't know how create directories with parents) ;;
- *) INSTALL_DIR="$ac_cv_prog_mkdir_p" AC_SUBST(INSTALL_DIR) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_PERL5
-dnl
-dnl Try to find perl version 5. If found set PERL to the absolute path
-dnl of the program, if not found set PERL to false.
-dnl
-dnl On some systems /usr/bin/perl is perl 4 and e.g.
-dnl /usr/local/bin/perl is perl 5. We try to handle this case by
-dnl putting a couple of
-dnl Tries to handle the case that there are two programs called perl
-dnl in the path and one of them is perl 5 and the other isn't.
-dnl
-AC_DEFUN(LM_PROG_PERL5,
-[AC_PATH_PROGS(PERL, perl5 perl, false,
- /usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH})
-changequote(, )dnl
-dnl[ That bracket is needed to balance the right bracket below
-if test "$PERL" = "false" || $PERL -e 'exit ($] >= 5)'; then
-changequote([, ])dnl
- ac_cv_path_PERL=false
- PERL=false
-dnl AC_MSG_WARN(perl version 5 not found)
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SO_BSDCOMPAT
-dnl
-dnl Check if the system has the SO_BSDCOMPAT flag on sockets (linux)
-dnl
-AC_DEFUN(LM_DECL_SO_BSDCOMPAT,
-[AC_CACHE_CHECK([for SO_BSDCOMPAT declaration], ac_cv_decl_so_bsdcompat,
-AC_TRY_COMPILE([#include <sys/socket.h>], [int i = SO_BSDCOMPAT;],
- ac_cv_decl_so_bsdcompat=yes,
- ac_cv_decl_so_bsdcompat=no))
-
-case "${ac_cv_decl_so_bsdcompat}" in
- "yes" ) AC_DEFINE(HAVE_SO_BSDCOMPAT,[],
- [Define if you have SO_BSDCOMPAT flag on sockets]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_INADDR_LOOPBACK
-dnl
-dnl Try to find declaration of INADDR_LOOPBACK, if nowhere provide a default
-dnl
-
-AC_DEFUN(LM_DECL_INADDR_LOOPBACK,
-[AC_CACHE_CHECK([for INADDR_LOOPBACK in netinet/in.h],
- ac_cv_decl_inaddr_loopback,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>], [int i = INADDR_LOOPBACK;],
-ac_cv_decl_inaddr_loopback=yes, ac_cv_decl_inaddr_loopback=no)
-])
-
-if test ${ac_cv_decl_inaddr_loopback} = no; then
- AC_CACHE_CHECK([for INADDR_LOOPBACK in rpc/types.h],
- ac_cv_decl_inaddr_loopback_rpc,
- AC_TRY_COMPILE([#include <rpc/types.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_rpc=yes,
- ac_cv_decl_inaddr_loopback_rpc=no))
-
- case "${ac_cv_decl_inaddr_loopback_rpc}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H,[],
- [Define if you need to include rpc/types.h to get INADDR_LOOPBACK defined]) ;;
- * )
- AC_CACHE_CHECK([for INADDR_LOOPBACK in winsock2.h],
- ac_cv_decl_inaddr_loopback_winsock2,
- AC_TRY_COMPILE([#define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_winsock2=yes,
- ac_cv_decl_inaddr_loopback_winsock2=no))
- case "${ac_cv_decl_inaddr_loopback_winsock2}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_WINSOCK2_H,[],
- [Define if you need to include winsock2.h to get INADDR_LOOPBACK defined]) ;;
- * )
- # couldn't find it anywhere
- AC_DEFINE(HAVE_NO_INADDR_LOOPBACK,[],
- [Define if you don't have a definition of INADDR_LOOPBACK]) ;;
- esac;;
- esac
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_SOCKADDR_SA_LEN
-dnl
-dnl Check if the sockaddr structure has the field sa_len
-dnl
-
-AC_DEFUN(LM_STRUCT_SOCKADDR_SA_LEN,
-[AC_CACHE_CHECK([whether struct sockaddr has sa_len field],
- ac_cv_struct_sockaddr_sa_len,
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>], [struct sockaddr s; s.sa_len = 10;],
- ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no))
-
-dnl FIXME convbreak
-case ${ac_cv_struct_sockaddr_sa_len} in
- "no" ) AC_DEFINE(NO_SA_LEN,[1],[Define if you dont have salen]) ;;
- *) ;;
-esac
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_EXCEPTION
-dnl
-dnl Check to see whether the system supports the matherr function
-dnl and its associated type "struct exception".
-dnl
-
-AC_DEFUN(LM_STRUCT_EXCEPTION,
-[AC_CACHE_CHECK([for struct exception (and matherr function)],
- ac_cv_struct_exception,
-AC_TRY_COMPILE([#include <math.h>],
- [struct exception x; x.type = DOMAIN; x.type = SING;],
- ac_cv_struct_exception=yes, ac_cv_struct_exception=no))
-
-case "${ac_cv_struct_exception}" in
- "yes" ) AC_DEFINE(USE_MATHERR,[1],[Define if you have matherr() function and struct exception type]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_IPV6
-dnl
-dnl Check for ipv6 support and what the in6_addr structure is called.
-dnl (early linux used in_addr6 insted of in6_addr)
-dnl
-
-AC_DEFUN(LM_SYS_IPV6,
-[AC_MSG_CHECKING(for IP version 6 support)
-AC_CACHE_VAL(ac_cv_sys_ipv6_support,
-[ok_so_far=yes
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in6_addr a6; struct sockaddr_in6 s6;], ok_so_far=yes, ok_so_far=no)
-
-if test $ok_so_far = yes; then
- ac_cv_sys_ipv6_support=yes
-else
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in_addr6 a6; struct sockaddr_in6 s6;],
- ac_cv_sys_ipv6_support=in_addr6, ac_cv_sys_ipv6_support=no)
-fi
-])dnl
-
-dnl
-dnl Have to use old style AC_DEFINE due to BC with old autoconf.
-dnl
-
-case ${ac_cv_sys_ipv6_support} in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- ;;
- in_addr6)
- AC_MSG_RESULT([yes (but I am redefining in_addr6 to in6_addr)])
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- AC_DEFINE(HAVE_IN_ADDR6_STRUCT,[],[Early linux used in_addr6 instead of in6_addr, define if you have this])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_MULTICAST
-dnl
-dnl Check for multicast support. Only checks for multicast options in
-dnl setsockopt(), no check is performed that multicasting actually works.
-dnl If options are found defines HAVE_MULTICAST_SUPPORT
-dnl
-
-AC_DEFUN(LM_SYS_MULTICAST,
-[AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support,
-[AC_EGREP_CPP(yes,
-[#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP)
-yes
-#endif
-], ac_cv_sys_multicast_support=yes, ac_cv_sys_multicast_support=no)])
-if test $ac_cv_sys_multicast_support = yes; then
- AC_DEFINE(HAVE_MULTICAST_SUPPORT,[1],
- [Define if setsockopt() accepts multicast options])
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SYS_ERRLIST
-dnl
-dnl Define SYS_ERRLIST_DECLARED if the variable sys_errlist is declared
-dnl in a system header file, stdio.h or errno.h.
-dnl
-
-AC_DEFUN(LM_DECL_SYS_ERRLIST,
-[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h or errno.h],
- ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#include <errno.h>], [char *msg = *(sys_errlist + 1);],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-if test $ac_cv_decl_sys_errlist = yes; then
- AC_DEFINE(SYS_ERRLIST_DECLARED,[],
- [define if the variable sys_errlist is declared in a system header file])
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_FUNC_DECL( funname, declaration [, extra includes
-dnl [, action-if-found [, action-if-not-found]]] )
-dnl
-dnl Checks if the declaration "declaration" of "funname" conflicts
-dnl with the header files idea of how the function should be
-dnl declared. It is useful on systems which lack prototypes and you
-dnl need to provide your own (e.g. when you want to take the address
-dnl of a function). The 4'th argument is expanded if conflicting,
-dnl the 5'th argument otherwise
-dnl
-dnl
-
-AC_DEFUN(LM_CHECK_FUNC_DECL,
-[AC_MSG_CHECKING([for conflicting declaration of $1])
-AC_CACHE_VAL(ac_cv_func_decl_$1,
-[AC_TRY_COMPILE([#include <stdio.h>
-$3],[$2
-char *c = (char *)$1;
-], eval "ac_cv_func_decl_$1=no", eval "ac_cv_func_decl_$1=yes")])
-if eval "test \"`echo '$ac_cv_func_decl_'$1`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$4], , :, [$4])
-else
- AC_MSG_RESULT(no)
-ifelse([$5], , , [$5
-])dnl
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl AC_DOUBLE_MIDDLE_ENDIAN
-dnl
-dnl Checks whether doubles are represented in "middle-endian" format.
-dnl Sets ac_cv_double_middle_endian={no,yes,unknown} accordingly,
-dnl as well as DOUBLE_MIDDLE_ENDIAN.
-dnl
-dnl
-
-AC_DEFUN([AC_C_DOUBLE_MIDDLE_ENDIAN],
-[AC_CACHE_CHECK(whether double word ordering is middle-endian, ac_cv_c_double_middle_endian,
-[# It does not; compile a test program.
-AC_RUN_IFELSE(
-[AC_LANG_SOURCE([[#include <stdlib.h>
-
-int
-main(void)
-{
- int i = 0;
- int zero = 0;
- int bigendian;
- int zero_index = 0;
-
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
-
- /* we'll use the one with 32-bit words */
- union
- {
- double d;
- unsigned int c[2];
- } vint;
-
- union
- {
- double d;
- unsigned long c[2];
- } vlong;
-
- union
- {
- double d;
- unsigned short c[2];
- } vshort;
-
-
- /* Are we little or big endian? From Harbison&Steele. */
- u.l = 1;
- bigendian = (u.c[sizeof (long int) - 1] == 1);
-
- zero_index = bigendian ? 1 : 0;
-
- vint.d = 1.0;
- vlong.d = 1.0;
- vshort.d = 1.0;
-
- if (sizeof(unsigned int) == 4)
- {
- if (vint.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned long) == 4)
- {
- if (vlong.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned short) == 4)
- {
- if (vshort.c[zero_index] != 0)
- zero = 1;
- }
-
- exit (zero);
-}
-]])],
- [ac_cv_c_double_middle_endian=no],
- [ac_cv_c_double_middle_endian=yes],
- [ac_cv_c_double_middle=unknown])])
-case $ac_cv_c_double_middle_endian in
- yes)
- m4_default([$1],
- [AC_DEFINE([DOUBLE_MIDDLE_ENDIAN], 1,
- [Define to 1 if your processor stores the words in a double in
- middle-endian format (like some ARMs).])]) ;;
- no)
- $2 ;;
- *)
- m4_default([$3],
- [AC_MSG_WARN([unknown double endianness
-presetting ac_cv_c_double_middle_endian=no (or yes) will help])]) ;;
-esac
-])# AC_C_DOUBLE_MIDDLE_ENDIAN
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_THR_LIB
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl LM_CHECK_THR_LIB sets THR_LIBS, THR_DEFS, and THR_LIB_NAME. It also
-dnl checks for some pthread headers which will appear in DEFS or config.h.
-dnl
-
-AC_DEFUN(LM_CHECK_THR_LIB,
-[
-
-NEED_NPTL_PTHREAD_H=no
-
-dnl win32?
-AC_MSG_CHECKING([for native win32 threads])
-if test "X$host_os" = "Xwin32"; then
- AC_MSG_RESULT(yes)
- THR_DEFS="-DWIN32_THREADS"
- THR_LIBS=
- THR_LIB_NAME=win32_threads
- THR_LIB_TYPE=win32_threads
-else
- AC_MSG_RESULT(no)
- THR_DEFS=
- THR_LIBS=
- THR_LIB_NAME=
- THR_LIB_TYPE=posix_unknown
-
-dnl Try to find POSIX threads
-
-dnl The usual pthread lib...
- AC_CHECK_LIB(pthread, pthread_create, THR_LIBS="-lpthread")
-
-dnl Very old versions of FreeBSD have pthreads in special c library, c_r...
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_LIB(c_r, pthread_create, THR_LIBS="-lc_r")
- fi
-
-dnl QNX has pthreads in standard C library
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_FUNC(pthread_create, THR_LIBS="none_needed")
- fi
-
-dnl On ofs1 the '-pthread' switch should be used
- if test "x$THR_LIBS" = "x"; then
- AC_MSG_CHECKING([if the '-pthread' switch can be used])
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -pthread"
- AC_TRY_LINK([#include <pthread.h>],
- pthread_create((void*)0,(void*)0,(void*)0,(void*)0);,
- [THR_DEFS="-pthread"
- THR_LIBS="-pthread"])
- CFLAGS=$saved_cflags
- if test "x$THR_LIBS" != "x"; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
- if test "x$THR_LIBS" != "x"; then
- THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
- THR_LIB_NAME=pthread
- if test "x$THR_LIBS" = "xnone_needed"; then
- THR_LIBS=
- fi
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
- linux*)
- THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
-
- LM_CHECK_GETCONF
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
- if test $? -eq 0; then
- case "$libpthr_vsn" in
- *nptl*|*NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- elif test "$cross_compiling" = "yes"; then
- case "$erl_xcomp_linux_nptl" in
- "") nptl=cross;;
- yes|no) nptl=$erl_xcomp_linux_nptl;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl]);;
- esac
- else
- nptl=no
- fi
- AC_MSG_RESULT($nptl)
- if test $nptl = cross; then
- nptl=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $nptl = yes; then
- THR_LIB_TYPE=posix_nptl
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h,
- [need_nptl_incldir=yes
- NEED_NPTL_PTHREAD_H=yes])
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH"
- if test X$cross_compiling != Xyes; then
- nptl_path="$nptl_path:/usr/local/include:/usr/include"
- else
- IROOT="$erl_xcomp_isysroot"
- test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
- test "$IROOT" != "" || AC_MSG_ERROR([Don't know where to search for includes! Please set erl_xcomp_isysroot])
- nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
- fi
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need THR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $THR_DEFS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h,
- AC_DEFINE(HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- fi
-fi
-
-])
-
-AC_DEFUN(ERL_INTERNAL_LIBS,
-[
-
-ERTS_INTERNAL_X_LIBS=
-
-AC_CHECK_LIB(kstat, kstat_open,
-[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat])
-ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"])
-
-AC_SUBST(ERTS_INTERNAL_X_LIBS)
-
-])
-
-AC_DEFUN(ETHR_CHK_SYNC_OP,
-[
- AC_MSG_CHECKING([for $3-bit $1()])
- case "$2" in
- "1") sync_call="$1(&var);";;
- "2") sync_call="$1(&var, ($4) 0);";;
- "3") sync_call="$1(&var, ($4) 0, ($4) 0);";;
- esac
- have_sync_op=no
- AC_TRY_LINK([],
- [
- $4 res;
- volatile $4 var;
- res = $sync_call
- ],
- [have_sync_op=yes])
- test $have_sync_op = yes && $5
- AC_MSG_RESULT([$have_sync_op])
-])
-
-AC_DEFUN(ETHR_CHK_INTERLOCKED,
-[
- ilckd="$1"
- AC_MSG_CHECKING([for ${ilckd}()])
- case "$2" in
- "1") ilckd_call="${ilckd}(var);";;
- "2") ilckd_call="${ilckd}(var, ($3) 0);";;
- "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";;
- "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";;
- esac
- have_interlocked_op=no
- AC_TRY_LINK(
- [
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <intrin.h>
- ],
- [
- volatile $3 *var;
- volatile $3 arr[2];
-
- $ilckd_call
- return 0;
- ],
- [have_interlocked_op=yes])
- test $have_interlocked_op = yes && $4
- AC_MSG_RESULT([$have_interlocked_op])
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_FIND_ETHR_LIB
-dnl
-dnl NOTE! This macro may be changed at any time! Should *only* be used by
-dnl ERTS!
-dnl
-dnl Find a thread library to use. Sets ETHR_LIBS to libraries to link
-dnl with, ETHR_X_LIBS to extra libraries to link with (same as ETHR_LIBS
-dnl except that the ethread lib itself is not included), ETHR_DEFS to
-dnl defines to compile with, ETHR_THR_LIB_BASE to the name of the
-dnl thread library which the ethread library is based on, and ETHR_LIB_NAME
-dnl to the name of the library where the ethread implementation is located.
-dnl ERL_FIND_ETHR_LIB currently searches for 'pthreads', and
-dnl 'win32_threads'. If no thread library was found ETHR_LIBS, ETHR_X_LIBS,
-dnl ETHR_DEFS, ETHR_THR_LIB_BASE, and ETHR_LIB_NAME are all set to the
-dnl empty string.
-dnl
-
-AC_DEFUN(ERL_FIND_ETHR_LIB,
-[
-
-AC_ARG_ENABLE(native-ethr-impls,
- AS_HELP_STRING([--disable-native-ethr-impls],
- [disable native ethread implementations]),
-[ case "$enableval" in
- no) disable_native_ethr_impls=yes ;;
- *) disable_native_ethr_impls=no ;;
- esac ], disable_native_ethr_impls=no)
-
-test "X$disable_native_ethr_impls" = "Xyes" &&
- AC_DEFINE(ETHR_DISABLE_NATIVE_IMPLS, 1, [Define if you want to disable native ethread implementations])
-
-AC_ARG_ENABLE(x86-out-of-order,
- AS_HELP_STRING([--enable-x86-out-of-order],
- [enable x86/x84_64 out of order support (default disabled)]))
-
-AC_ARG_ENABLE(prefer-gcc-native-ethr-impls,
- AS_HELP_STRING([--enable-prefer-gcc-native-ethr-impls],
- [prefer gcc native ethread implementations]),
-[ case "$enableval" in
- yes) enable_prefer_gcc_native_ethr_impls=yes ;;
- *) enable_prefer_gcc_native_ethr_impls=no ;;
- esac ], enable_prefer_gcc_native_ethr_impls=no)
-
-test $enable_prefer_gcc_native_ethr_impls = yes &&
- AC_DEFINE(ETHR_PREFER_GCC_NATIVE_IMPLS, 1, [Define if you prefer gcc native ethread implementations])
-
-AC_ARG_WITH(libatomic_ops,
- AS_HELP_STRING([--with-libatomic_ops=PATH],
- [specify and prefer usage of libatomic_ops in the ethread library]))
-
-AC_ARG_WITH(with_sparc_memory_order,
- AS_HELP_STRING([--with-sparc-memory-order=TSO|PSO|RMO],
- [specify sparc memory order (defaults to RMO)]))
-
-LM_CHECK_THR_LIB
-ERL_INTERNAL_LIBS
-
-ethr_have_native_atomics=no
-ethr_have_native_spinlock=no
-ETHR_THR_LIB_BASE="$THR_LIB_NAME"
-ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
-ETHR_DEFS="$THR_DEFS"
-ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
-ETHR_LIBS=
-ETHR_LIB_NAME=
-
-ethr_modified_default_stack_size=
-
-dnl Name of lib where ethread implementation is located
-ethr_lib_name=ethread
-
-case "$THR_LIB_NAME" in
-
- win32_threads)
- ETHR_THR_LIB_BASE_DIR=win
- # * _WIN32_WINNT >= 0x0400 is needed for
- # TryEnterCriticalSection
- # * _WIN32_WINNT >= 0x0403 is needed for
- # InitializeCriticalSectionAndSpinCount
- # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
- #
- # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
- # and save it in ETHR_DEFS.
- found_win32_winnt=no
- for cppflag in $CPPFLAGS; do
- case $cppflag in
- -DWINVER*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- ;;
- -D_WIN32_WINNT*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- found_win32_winnt=yes
- ;;
- *)
- ;;
- esac
- done
- if test $found_win32_winnt = no; then
- AC_MSG_ERROR([-D_WIN32_WINNT missing in CPPFLAGS])
- fi
-
- AC_DEFINE(ETHR_WIN32_THREADS, 1, [Define if you have win32 threads])
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- have_interlocked_op=no
- ethr_have_native_atomics=no
- else
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT, 1, [Define if you have _InterlockedDecrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement_rel], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT_REL, 1, [Define if you have _InterlockedDecrement_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT, 1, [Define if you have _InterlockedIncrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement_acq], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ, 1, [Define if you have _InterlockedIncrement_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD, 1, [Define if you have _InterlockedExchangeAdd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd_acq], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ, 1, [Define if you have _InterlockedExchangeAdd_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64_acq], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ, 1, [Define if you have _InterlockedIncrement64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64, 1, [Define if you have _InterlockedExchangeAdd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64_acq], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ, 1, [Define if you have _InterlockedExchangeAdd64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()]))
- fi
- test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
- ;;
-
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
- case $host_os in
- openbsd*)
- # The default stack size is insufficient for our needs
- # on OpenBSD. We increase it to 256 kilo words.
- ethr_modified_default_stack_size=256;;
- linux*)
- ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
-
- if test X$cross_compiling = Xyes; then
- case X$erl_xcomp_linux_usable_sigusrx in
- X) usable_sigusrx=cross;;
- Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx]);;
- esac
- case X$erl_xcomp_linux_usable_sigaltstack in
- X) usable_sigaltstack=cross;;
- Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack]);;
- esac
- else
- # FIXME: Test for actual problems instead of kernel versions
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- usable_sigusrx=no
- usable_sigaltstack=no;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- usable_sigaltstack=no;;
- *)
- usable_sigusrx=yes
- usable_sigaltstack=yes;;
- esac
- fi
-
- AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
- AC_MSG_RESULT($usable_sigusrx)
- if test $usable_sigusrx = cross; then
- usable_sigusrx=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigusrx = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
- fi
-
- AC_MSG_CHECKING(if sigaltstack can be used)
- AC_MSG_RESULT($usable_sigaltstack)
- if test $usable_sigaltstack = cross; then
- usable_sigaltstack=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigaltstack = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need ETHR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
-
- dnl We need the thread library in order to find some functions
- saved_libs="$LIBS"
- LIBS="$LIBS $ETHR_X_LIBS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(ETHR_HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- if test $NEED_NPTL_PTHREAD_H = yes; then
- AC_DEFINE(ETHR_NEED_NPTL_PTHREAD_H, 1, \
-[Define if you need the <nptl/pthread.h> header file.])
- fi
-
- AC_CHECK_HEADER(sched.h, \
- AC_DEFINE(ETHR_HAVE_SCHED_H, 1, \
-[Define if you have the <sched.h> header file.]))
-
- AC_CHECK_HEADER(sys/time.h, \
- AC_DEFINE(ETHR_HAVE_SYS_TIME_H, 1, \
-[Define if you have the <sys/time.h> header file.]))
-
- AC_TRY_COMPILE([#include <time.h>
- #include <sys/time.h>],
- [struct timeval *tv; return 0;],
- AC_DEFINE(ETHR_TIME_WITH_SYS_TIME, 1, \
-[Define if you can safely include both <sys/time.h> and <time.h>.]))
-
-
- dnl
- dnl Check for functions
- dnl
-
- AC_CHECK_FUNC(pthread_spin_lock, \
- [ethr_have_native_spinlock=yes \
- AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
-[Define if you have the pthread_spin_lock function.])])
-
- have_sched_yield=no
- have_librt_sched_yield=no
- AC_CHECK_FUNC(sched_yield, [have_sched_yield=yes])
- if test $have_sched_yield = no; then
- AC_CHECK_LIB(rt, sched_yield,
- [have_librt_sched_yield=yes
- ETHR_X_LIBS="$ETHR_X_LIBS -lrt"])
- fi
- if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
- AC_DEFINE(ETHR_HAVE_SCHED_YIELD, 1, [Define if you have the sched_yield() function.])
- AC_MSG_CHECKING([whether sched_yield() returns an int])
- sched_yield_ret_int=no
- AC_TRY_COMPILE([
- #ifdef ETHR_HAVE_SCHED_H
- #include <sched.h>
- #endif
- ],
- [int sched_yield();],
- [sched_yield_ret_int=yes])
- AC_MSG_RESULT([$sched_yield_ret_int])
- if test $sched_yield_ret_int = yes; then
- AC_DEFINE(ETHR_SCHED_YIELD_RET_INT, 1, [Define if sched_yield() returns an int.])
- fi
- fi
-
- have_pthread_yield=no
- AC_CHECK_FUNC(pthread_yield, [have_pthread_yield=yes])
- if test $have_pthread_yield = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_YIELD, 1, [Define if you have the pthread_yield() function.])
- AC_MSG_CHECKING([whether pthread_yield() returns an int])
- pthread_yield_ret_int=no
- AC_TRY_COMPILE([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [int pthread_yield();],
- [pthread_yield_ret_int=yes])
- AC_MSG_RESULT([$pthread_yield_ret_int])
- if test $pthread_yield_ret_int = yes; then
- AC_DEFINE(ETHR_PTHREAD_YIELD_RET_INT, 1, [Define if pthread_yield() returns an int.])
- fi
- fi
-
- have_pthread_rwlock_init=no
- AC_CHECK_FUNC(pthread_rwlock_init, [have_pthread_rwlock_init=yes])
- if test $have_pthread_rwlock_init = yes; then
-
- ethr_have_pthread_rwlockattr_setkind_np=no
- AC_CHECK_FUNC(pthread_rwlockattr_setkind_np,
- [ethr_have_pthread_rwlockattr_setkind_np=yes])
-
- if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP, 1, \
-[Define if you have the pthread_rwlockattr_setkind_np() function.])
-
- AC_MSG_CHECKING([for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP])
- ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
- AC_TRY_LINK([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [
- pthread_rwlockattr_t *attr;
- return pthread_rwlockattr_setkind_np(attr,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- ],
- [ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes])
- AC_MSG_RESULT([$ethr_pthread_rwlock_writer_nonrecursive_initializer_np])
- if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 1, \
-[Define if you have the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP rwlock attribute.])
- fi
- fi
- fi
-
- if test "$force_pthread_rwlocks" = "yes"; then
-
- AC_DEFINE(ETHR_FORCE_PTHREAD_RWLOCK, 1, \
-[Define if you want to force usage of pthread rwlocks])
-
- if test $have_pthread_rwlock_init = yes; then
- AC_MSG_WARN([Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues.])
- else
- AC_MSG_ERROR([User forced usage of pthread rwlock, but no such implementation was found])
- fi
- fi
-
- AC_CHECK_FUNC(pthread_attr_setguardsize, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE, 1, \
-[Define if you have the pthread_attr_setguardsize function.]))
-
- linux_futex=no
- AC_MSG_CHECKING([for Linux futexes])
- AC_TRY_LINK([
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <linux/futex.h>
- #include <sys/time.h>
- ],
- [
- int i = 1;
- syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
- (void*)0,(void*)0, 0);
- syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
- (void*)0,(void*)0, 0);
- return 0;
- ],
- linux_futex=yes)
- AC_MSG_RESULT([$linux_futex])
- test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
-
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int128_t)
-
- if test "$ac_cv_sizeof_int" = "4"; then
- int32="int"
- elif test "$ac_cv_sizeof_long" = "4"; then
- int32="long"
- elif test "$ac_cv_sizeof_long_long" = "4"; then
- int32="long long"
- else
- AC_MSG_ERROR([No 32-bit type found])
- fi
-
- if test "$ac_cv_sizeof_int" = "8"; then
- int64="int"
- elif test "$ac_cv_sizeof_long" = "8"; then
- int64="long"
- elif test "$ac_cv_sizeof_long_long" = "8"; then
- int64="long long"
- else
- AC_MSG_ERROR([No 64-bit type found])
- fi
-
- int128=no
- if test "$ac_cv_sizeof___int128_t" = "16"; then
- int128="__int128_t"
- fi
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- ethr_have_native_atomics=no
- else
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP32, 1, [Define if you have __sync_val_compare_and_swap() for 32-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH32, 1, [Define if you have __sync_add_and_fetch() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND32, 1, [Define if you have __sync_fetch_and_and() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR32, 1, [Define if you have __sync_fetch_and_or() for 32-bit integers]))
-
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP64, 1, [Define if you have __sync_val_compare_and_swap() for 64-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH64, 1, [Define if you have __sync_add_and_fetch() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND64, 1, [Define if you have __sync_fetch_and_and() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR64, 1, [Define if you have __sync_fetch_and_or() for 64-bit integers]))
-
- if test $int128 != no; then
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [128], [$int128], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP128, 1, [Define if you have __sync_val_compare_and_swap() for 128-bit integers]))
- fi
-
- AC_MSG_CHECKING([for a usable libatomic_ops implementation])
- case "x$with_libatomic_ops" in
- xno | xyes | x)
- libatomic_ops_include=
- ;;
- *)
- if test -d "${with_libatomic_ops}/include"; then
- libatomic_ops_include="-I$with_libatomic_ops/include"
- CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
- else
- AC_MSG_ERROR([libatomic_ops include directory $with_libatomic_ops/include not found])
- fi;;
- esac
- ethr_have_libatomic_ops=no
- AC_TRY_LINK([#include "atomic_ops.h"],
- [
- volatile AO_t x;
- AO_t y;
- int z;
-
- AO_nop_full();
- AO_store(&x, (AO_t) 0);
- z = AO_load(&x);
- z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
- ],
- [ethr_have_native_atomics=yes
- ethr_have_libatomic_ops=yes])
- AC_MSG_RESULT([$ethr_have_libatomic_ops])
- if test $ethr_have_libatomic_ops = yes; then
- AC_CHECK_SIZEOF(AO_t, ,
- [
- #include <stdio.h>
- #include "atomic_ops.h"
- ])
- AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used])
-
- AC_DEFINE(ETHR_HAVE_LIBATOMIC_OPS, 1, [Define if you have libatomic_ops atomic operations])
- if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_DEFINE(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS, 1, [Define if you prefer libatomic_ops native ethread implementations])
- fi
- ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
- elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_MSG_ERROR([No usable libatomic_ops implementation found])
- fi
-
- case "$host_cpu" in
- sparc | sun4u | sparc64 | sun4v)
- case "$with_sparc_memory_order" in
- "TSO")
- AC_DEFINE(ETHR_SPARC_TSO, 1, [Define if only run in Sparc TSO mode]);;
- "PSO")
- AC_DEFINE(ETHR_SPARC_PSO, 1, [Define if only run in Sparc PSO, or TSO mode]);;
- "RMO"|"")
- AC_DEFINE(ETHR_SPARC_RMO, 1, [Define if run in Sparc RMO, PSO, or TSO mode]);;
- *)
- AC_MSG_ERROR([Unsupported Sparc memory order: $with_sparc_memory_order]);;
- esac
- ethr_have_native_atomics=yes;;
- i86pc | i*86 | x86_64 | amd64)
- if test "$enable_x86_out_of_order" = "yes"; then
- AC_DEFINE(ETHR_X86_OUT_OF_ORDER, 1, [Define if x86/x86_64 out of order instructions should be synchronized])
- fi
- ethr_have_native_atomics=yes;;
- macppc | ppc | powerpc | "Power Macintosh")
- ethr_have_native_atomics=yes;;
- tile)
- ethr_have_native_atomics=yes;;
- *)
- ;;
- esac
-
- fi
-
- test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes
-
- dnl Restore LIBS
- LIBS=$saved_libs
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- ;;
- *)
- ;;
-esac
-
-AC_MSG_CHECKING([whether default stack size should be modified])
-if test "x$ethr_modified_default_stack_size" != "x"; then
- AC_DEFINE_UNQUOTED(ETHR_MODIFIED_DEFAULT_STACK_SIZE, $ethr_modified_default_stack_size, [Define if you want to modify the default stack size])
- AC_MSG_RESULT([yes; to $ethr_modified_default_stack_size kilo words])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$ETHR_THR_LIB_BASE" != "x"; then
- ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
- ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
- ETHR_LIB_NAME=$ethr_lib_name
-fi
-
-AC_CHECK_SIZEOF(void *)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
-
-AC_CHECK_SIZEOF(int)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_INT, $ac_cv_sizeof_int, [Define to the size of int])
-AC_CHECK_SIZEOF(long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG, $ac_cv_sizeof_long, [Define to the size of long])
-AC_CHECK_SIZEOF(long long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long, [Define to the size of long long])
-AC_CHECK_SIZEOF(__int64)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT64, $ac_cv_sizeof___int64, [Define to the size of __int64])
-AC_CHECK_SIZEOF(__int128_t)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT128_T, $ac_cv_sizeof___int128_t, [Define to the size of __int128_t])
-
-
-case X$erl_xcomp_bigendian in
- X) ;;
- Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian]);;
-esac
-
-AC_C_BIGENDIAN
-
-if test "$ac_cv_c_bigendian" = "yes"; then
- AC_DEFINE(ETHR_BIGENDIAN, 1, [Define if bigendian])
-fi
-
-case X$erl_xcomp_double_middle_endian in
- X) ;;
- Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian]);;
-esac
-
-AC_C_DOUBLE_MIDDLE_ENDIAN
-
-ETHR_X86_SSE2_ASM=no
-case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in
- yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64)
- AC_MSG_CHECKING([for gcc sse2 asm support])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -msse2"
- gcc_sse2_asm=no
- AC_TRY_COMPILE([],
- [
- long long x, *y;
- __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory");
- ],
- [gcc_sse2_asm=yes])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$gcc_sse2_asm])
- if test "$gcc_sse2_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_SSE2_ASM_SUPPORT, 1, [Define if you use a gcc that supports -msse2 and understand sse2 specific asm statements])
- ETHR_X86_SSE2_ASM=yes
- fi
- ;;
- *)
- ;;
-esac
-
-case "$GCC-$host_cpu" in
- yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64)
- gcc_dw_cmpxchg_asm=no
- AC_MSG_CHECKING([for gcc double word cmpxchg asm support])
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
- __asm__ __volatile__(
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "pushl %%ebx\n\t"
- "movl %8, %%ebx\n\t"
-#endif
-#if ETHR_SIZEOF_PTR == 4
- "lock; cmpxchg8b %0\n\t"
-#else
- "lock; cmpxchg16b %0\n\t"
-#endif
- "setz %3\n\t"
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "popl %%ebx\n\t"
-#endif
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]),
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "r"(new[0])
-#else
- "b"(new[0])
-#endif
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test $gcc_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
-#if !defined(__PIC__) || !__PIC__
-# error nope
-#endif
- __asm__ __volatile__(
- "pushl %%ebx\n\t"
- "movl (%7), %%ebx\n\t"
- "movl 4(%7), %%ecx\n\t"
- "lock; cmpxchg8b %0\n\t"
- "setz %3\n\t"
- "popl %%ebx\n\t"
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new)
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_CMPXCHG8B_REGISTER_SHORTAGE, 1, [Define if you get a register shortage with cmpxchg8b and position independent code])
- fi
- fi
- AC_MSG_RESULT([$gcc_dw_cmpxchg_asm])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT, 1, [Define if you use a gcc that supports the double word cmpxchg instruction])
- fi;;
- *)
- ;;
-esac
-
-AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \
-[Define if you have all ethread defines])
-
-AC_SUBST(ETHR_X_LIBS)
-AC_SUBST(ETHR_LIBS)
-AC_SUBST(ETHR_LIB_NAME)
-AC_SUBST(ETHR_DEFS)
-AC_SUBST(ETHR_THR_LIB_BASE)
-AC_SUBST(ETHR_THR_LIB_BASE_DIR)
-AC_SUBST(ETHR_X86_SSE2_ASM)
-
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_TIME_CORRECTION
-dnl
-dnl In the presence of a high resolution realtime timer Erlang can adapt
-dnl its view of time relative to this timer. On solaris such a timer is
-dnl available with the syscall gethrtime(). On other OS's a fallback
-dnl solution using times() is implemented. (However on e.g. FreeBSD times()
-dnl is implemented using gettimeofday so it doesn't make much sense to
-dnl use it there...) On second thought, it seems to be safer to do it the
-dnl other way around. I.e. only use times() on OS's where we know it will
-dnl work...
-dnl
-
-AC_DEFUN(ERL_TIME_CORRECTION,
-[if test x$ac_cv_func_gethrtime = x; then
- AC_CHECK_FUNC(gethrtime)
-fi
-if test x$clock_gettime_correction = xunknown; then
- AC_TRY_COMPILE([#include <time.h>],
- [struct timespec ts;
- long long result;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- result = ((long long) ts.tv_sec) * 1000000000LL +
- ((long long) ts.tv_nsec);],
- clock_gettime_compiles=yes,
- clock_gettime_compiles=no)
-else
- clock_gettime_compiles=no
-fi
-
-
-AC_CACHE_CHECK([how to correct for time adjustments], erl_cv_time_correction,
-[
-case $clock_gettime_correction in
- yes)
- erl_cv_time_correction=clock_gettime;;
- no|unknown)
- case $ac_cv_func_gethrtime in
- yes)
- erl_cv_time_correction=hrtime ;;
- no)
- case $host_os in
- linux*)
- case $clock_gettime_correction in
- unknown)
- if test x$clock_gettime_compiles = xyes; then
- if test X$cross_compiling != Xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
- else
- case X$erl_xcomp_linux_clock_gettime_correction in
- X)
- erl_cv_time_correction=cross;;
- Xyes|Xno)
- if test $erl_xcomp_linux_clock_gettime_correction = yes; then
- erl_cv_time_correction=clock_gettime
- else
- erl_cv_time_correction=times
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction]);;
- esac
- fi
- else
- erl_cv_time_correction=times
- fi
- ;;
- *)
- erl_cv_time_correction=times ;;
- esac
- ;;
- *)
- erl_cv_time_correction=none ;;
- esac
- ;;
- esac
- ;;
-esac
-])
-
-xrtlib=""
-case $erl_cv_time_correction in
- times)
- AC_DEFINE(CORRECT_USING_TIMES,[],
- [Define if you do not have a high-res. timer & want to use times() instead])
- ;;
- clock_gettime|cross)
- if test $erl_cv_time_correction = cross; then
- erl_cv_time_correction=clock_gettime
- AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
- fi
- xrtlib="-lrt"
- AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
- [Define if you want to use clock_gettime to simulate gethrtime])
- ;;
-esac
-dnl
-dnl Check if gethrvtime is working, and if to use procfs ioctl
-dnl or (yet to be written) write to the procfs ctl file.
-dnl
-
-AC_MSG_CHECKING([if gethrvtime works and how to use it])
-AC_TRY_RUN([
-/* gethrvtime procfs ioctl test */
-/* These need to be undef:ed to not break activation of
- * micro level process accounting on /proc/self
- */
-#ifdef _LARGEFILE_SOURCE
-# undef _LARGEFILE_SOURCE
-#endif
-#ifdef _FILE_OFFSET_BITS
-# undef _FILE_OFFSET_BITS
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-int main() {
- long msacct = PR_MSACCT;
- int fd;
- long long start, stop;
- int i;
- pid_t pid = getpid();
- char proc_self[30] = "/proc/";
-
- sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid);
- if ( (fd = open(proc_self, O_WRONLY)) == -1)
- exit(1);
- if (ioctl(fd, PIOCSET, &msacct) < 0)
- exit(2);
- if (close(fd) < 0)
- exit(3);
- start = gethrvtime();
- for (i = 0; i < 100; i++)
- stop = gethrvtime();
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
-}
-],
-erl_gethrvtime=procfs_ioctl,
-erl_gethrvtime=false,
-[
-case X$erl_xcomp_gethrvtime_procfs_ioctl in
- X)
- erl_gethrvtime=cross;;
- Xyes|Xno)
- if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
- erl_gethrvtime=procfs_ioctl
- else
- erl_gethrvtime=false
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl]);;
-esac
-])
-
-case $erl_gethrvtime in
- procfs_ioctl)
- AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
- [define if gethrvtime() works and uses ioctl() to /proc/self])
- AC_MSG_RESULT(uses ioctl to procfs)
- ;;
- *)
- if test $erl_gethrvtime = cross; then
- erl_gethrvtime=false
- AC_MSG_RESULT(cross)
- AC_MSG_WARN([result 'not working' guessed because of cross compilation])
- else
- AC_MSG_RESULT(not working)
- fi
-
- dnl
- dnl Check if clock_gettime (linux) is working
- dnl
-
- AC_MSG_CHECKING([if clock_gettime can be used to get process CPU time])
- save_libs=$LIBS
- LIBS="-lrt"
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
- #include <time.h>
- int main() {
- long long start, stop;
- int i;
- struct timespec tp;
-
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) < 0)
- exit(1);
- start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- for (i = 0; i < 100; i++)
- clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
- stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
- }
- ],
- erl_clock_gettime=yes,
- erl_clock_gettime=no,
- [
- case X$erl_xcomp_clock_gettime_cpu_time in
- X) erl_clock_gettime=cross;;
- Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
- *) AC_MSG_ERROR([Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time]);;
- esac
- ])
- LIBS=$save_libs
- case $host_os in
- linux*)
- AC_MSG_RESULT([no; not stable])
- LIBRT=$xrtlib
- ;;
- *)
- AC_MSG_RESULT($erl_clock_gettime)
- case $erl_clock_gettime in
- yes)
- AC_DEFINE(HAVE_CLOCK_GETTIME,[],
- [define if clock_gettime() works for getting process time])
- LIBRT=-lrt
- ;;
- cross)
- erl_clock_gettime=no
- AC_MSG_WARN([result no guessed because of cross compilation])
- LIBRT=$xrtlib
- ;;
- *)
- LIBRT=$xrtlib
- ;;
- esac
- ;;
- esac
- AC_SUBST(LIBRT)
- ;;
-esac
-])dnl
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_TRY_ENABLE_CFLAG
-dnl
-dnl
-dnl Tries a CFLAG and sees if it can be enabled without compiler errors
-dnl $1: textual cflag to add
-dnl $2: variable to store the modified CFLAG in
-dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
-dnl
-dnl
-AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
- saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $$2";
- AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
- CFLAGS=$saved_CFLAGS;
- if test "X$can_enable_flag" = "Xtrue"; then
- AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $$2")
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl ERL_TRY_LINK_JAVA(CLASSES, FUNCTION-BODY
-dnl [ACTION_IF_FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Freely inspired by AC_TRY_LINK. (Maybe better to create a
-dnl AC_LANG_JAVA instead...)
-AC_DEFUN(ERL_TRY_LINK_JAVA,
-[java_link='$JAVAC conftest.java 1>&AC_FD_CC'
-changequote(, )dnl
-cat > conftest.java <<EOF
-$1
-class conftest { public static void main(String[] args) {
- $2
- ; return; }}
-EOF
-changequote([, ])dnl
-if AC_TRY_EVAL(java_link) && test -s conftest.class; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
-else
- echo "configure: failed program was:" 1>&AC_FD_CC
- cat conftest.java 1>&AC_FD_CC
- echo "configure: PATH was $PATH" 1>&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
- $4
-])dnl
-fi
-rm -f conftest*])
-#define UNSAFE_MASK 0xc0000000 /* Mask for bits that must be constant */
-
-
diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in
index d511f2e240..ef78f0f87b 100644
--- a/lib/erl_interface/configure.in
+++ b/lib/erl_interface/configure.in
@@ -311,6 +311,26 @@ else
fi
fi
+dnl ----------------------------------------------------------------------
+dnl Enable -fsanitize= flags.
+dnl ----------------------------------------------------------------------
+
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(
+ sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]),
+[
+case "$enableval" in
+ no) sanitizers= ;;
+ yes) sanitizers="-fsanitize=DEFAULT_SANITIZERS" ;;
+ *) sanitizers="-fsanitize=$enableval" ;;
+esac
+CFLAGS="$CFLAGS $sanitizers"
+LDFLAGS="$LDFLAGS $sanitizers"
+])
+
# ---------------------------------------------------------------------------
# XXX
# ---------------------------------------------------------------------------
diff --git a/lib/erl_interface/doc/src/book.xml b/lib/erl_interface/doc/src/book.xml
index e911b6aa2b..e6a00012d5 100644
--- a/lib/erl_interface/doc/src/book.xml
+++ b/lib/erl_interface/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index 6c340378d4..90495eebd6 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2001</year><year>2013</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -417,6 +417,26 @@ ei_x_encode_empty_list(&amp;x);
</desc>
</func>
<func>
+ <name><ret>int</ret><nametext>ei_encode_map_header(char *buf, int *index, int arity)</nametext></name>
+ <name><ret>int</ret><nametext>ei_x_encode_map_header(ei_x_buff* x, int arity)</nametext></name>
+ <fsummary>Encode a map</fsummary>
+ <desc>
+ <p>This function encodes a map header, with a specified arity. The next
+ <c>arity*2</c> terms encoded will be the keys and values of the map
+ encoded in the following order: <c>K1, V1, K2, V2, ..., Kn, Vn</c>.
+ </p>
+ <p>E.g. to encode the map <c>#{a => "Apple", b => "Banana"}</c>:</p>
+ <pre>
+ei_x_encode_map_header(&amp;x, 2);
+ei_x_encode_atom(&amp;x, "a");
+ei_x_encode_string(&amp;x, "Apple");
+ei_x_encode_atom(&amp;x, "b");
+ei_x_encode_string(&amp;x, "Banana");
+ </pre>
+ <p>A correctly encoded map can not have duplicate keys.</p>
+ </desc>
+ </func>
+ <func>
<name><ret>int</ret><nametext>ei_get_type(const char *buf, const int *index, int *type, int *size)</nametext></name>
<fsummary>Fetch the type and size of an encoded term</fsummary>
<desc>
@@ -638,6 +658,18 @@ ei_x_encode_empty_list(&amp;x);
</desc>
</func>
<func>
+ <name><ret>int</ret><nametext>ei_decode_map_header(const char *buf, int *index, int *arity)</nametext></name>
+ <fsummary>Decode a map</fsummary>
+ <desc>
+ <p>This function decodes a map header from the binary
+ format. The number of key-value pairs is returned in
+ <c>*arity</c>. Keys and values follow in the following order:
+ <c>K1, V1, K2, V2, ..., Kn, Vn</c>. This makes a total of
+ <c>arity*2</c> terms. If <c>arity</c> is zero, it's an empty map.
+ A correctly encoded map does not have duplicate keys.</p>
+ </desc>
+ </func>
+ <func>
<name><ret>int</ret><nametext>ei_decode_ei_term(const char* buf, int* index, ei_term* term)</nametext></name>
<fsummary>Decode a term, without prior knowledge of type</fsummary>
<desc>
diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml
index f562615ddd..e8838da004 100644
--- a/lib/erl_interface/doc/src/ei_connect.xml
+++ b/lib/erl_interface/doc/src/ei_connect.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2001</year><year>2010</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/ei_users_guide.xml b/lib/erl_interface/doc/src/ei_users_guide.xml
index 5d18e356cb..b6d3cc3209 100644
--- a/lib/erl_interface/doc/src/ei_users_guide.xml
+++ b/lib/erl_interface/doc/src/ei_users_guide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_call.xml b/lib/erl_interface/doc/src/erl_call.xml
index c597e11481..4ab5153d30 100644
--- a/lib/erl_interface/doc/src/erl_call.xml
+++ b/lib/erl_interface/doc/src/erl_call.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_connect.xml b/lib/erl_interface/doc/src/erl_connect.xml
index bd5e637244..c8dc43fcc8 100644
--- a/lib/erl_interface/doc/src/erl_connect.xml
+++ b/lib/erl_interface/doc/src/erl_connect.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_error.xml b/lib/erl_interface/doc/src/erl_error.xml
index 4a3f34fac7..ee21c640e9 100644
--- a/lib/erl_interface/doc/src/erl_error.xml
+++ b/lib/erl_interface/doc/src/erl_error.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_eterm.xml b/lib/erl_interface/doc/src/erl_eterm.xml
index a7921ea9d2..429f77501c 100644
--- a/lib/erl_interface/doc/src/erl_eterm.xml
+++ b/lib/erl_interface/doc/src/erl_eterm.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
diff --git a/lib/erl_interface/doc/src/erl_format.xml b/lib/erl_interface/doc/src/erl_format.xml
index f036b12879..ff3274047a 100644
--- a/lib/erl_interface/doc/src/erl_format.xml
+++ b/lib/erl_interface/doc/src/erl_format.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_global.xml b/lib/erl_interface/doc/src/erl_global.xml
index 8f9a354b4f..71c7feb9cc 100644
--- a/lib/erl_interface/doc/src/erl_global.xml
+++ b/lib/erl_interface/doc/src/erl_global.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_interface.xml b/lib/erl_interface/doc/src/erl_interface.xml
index 850a4127f4..5c3d8bc218 100644
--- a/lib/erl_interface/doc/src/erl_interface.xml
+++ b/lib/erl_interface/doc/src/erl_interface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_malloc.xml b/lib/erl_interface/doc/src/erl_malloc.xml
index 8c8750d62a..f387a887cb 100644
--- a/lib/erl_interface/doc/src/erl_malloc.xml
+++ b/lib/erl_interface/doc/src/erl_malloc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/erl_marshal.xml b/lib/erl_interface/doc/src/erl_marshal.xml
index a7eaf78f35..173e609b83 100644
--- a/lib/erl_interface/doc/src/erl_marshal.xml
+++ b/lib/erl_interface/doc/src/erl_marshal.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/fascicules.xml b/lib/erl_interface/doc/src/fascicules.xml
index 3d6219a2bd..f7edd8a973 100644
--- a/lib/erl_interface/doc/src/fascicules.xml
+++ b/lib/erl_interface/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml
index 4eb61015cc..29a9d71041 100644
--- a/lib/erl_interface/doc/src/notes.xml
+++ b/lib/erl_interface/doc/src/notes.xml
@@ -30,6 +30,105 @@
</header>
<p>This document describes the changes made to the Erl_interface application.</p>
+<section><title>Erl_Interface 3.7.20</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Use C99 function isfinite() instead of finite() when
+ available on non GCC compilers.</p>
+ <p>
+ Own Id: OTP-12268</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ <item>
+ <p>
+ Added an .appup file for the application.</p>
+ <p>
+ Own Id: OTP-12358 Aux Id: OTP-12178 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Interface 3.7.19</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Added a <c>.app</c> file for the application.</p>
+ <p>
+ Own Id: OTP-12178</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Interface 3.7.18</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Implement --enable-sanitizers[=sanitizers]. Similar to
+ debugging with Valgrind, it's very useful to enable
+ -fsanitize= switches to catch bugs at runtime.</p>
+ <p>
+ Own Id: OTP-12153</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Interface 3.7.17</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Now works with Visual Studio.</p>
+ <p>
+ Own Id: OTP-11984</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Interface 3.7.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix memcheck warning in gen_challange (Thanks to Olivier
+ Girondel)</p>
+ <p>
+ Own Id: OTP-11608</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erl_Interface 3.7.15</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/erl_interface/doc/src/notes_history.xml b/lib/erl_interface/doc/src/notes_history.xml
index f484f3c04e..3aec9d051a 100644
--- a/lib/erl_interface/doc/src/notes_history.xml
+++ b/lib/erl_interface/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/part.xml b/lib/erl_interface/doc/src/part.xml
index e38b9164b8..b3cee31720 100644
--- a/lib/erl_interface/doc/src/part.xml
+++ b/lib/erl_interface/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/part_erl_interface.xml b/lib/erl_interface/doc/src/part_erl_interface.xml
index c69cc85c63..c382dce447 100644
--- a/lib/erl_interface/doc/src/part_erl_interface.xml
+++ b/lib/erl_interface/doc/src/part_erl_interface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/part_notes.xml b/lib/erl_interface/doc/src/part_notes.xml
index 14c1de1d6e..79dc973d5e 100644
--- a/lib/erl_interface/doc/src/part_notes.xml
+++ b/lib/erl_interface/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/part_notes_history.xml b/lib/erl_interface/doc/src/part_notes_history.xml
index 612b4a9e1e..95f8c773cf 100644
--- a/lib/erl_interface/doc/src/part_notes_history.xml
+++ b/lib/erl_interface/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/ref_man.xml b/lib/erl_interface/doc/src/ref_man.xml
index 9ae4cf27f5..354313127d 100644
--- a/lib/erl_interface/doc/src/ref_man.xml
+++ b/lib/erl_interface/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/ref_man_ei.xml b/lib/erl_interface/doc/src/ref_man_ei.xml
index ff161f9e7f..b4fbc4b2c6 100644
--- a/lib/erl_interface/doc/src/ref_man_ei.xml
+++ b/lib/erl_interface/doc/src/ref_man_ei.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/ref_man_erl_interface.xml b/lib/erl_interface/doc/src/ref_man_erl_interface.xml
index 7ffa0cfb23..2641475415 100644
--- a/lib/erl_interface/doc/src/ref_man_erl_interface.xml
+++ b/lib/erl_interface/doc/src/ref_man_erl_interface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_interface/doc/src/registry.xml b/lib/erl_interface/doc/src/registry.xml
index 8aeb378d95..d06ceb095a 100644
--- a/lib/erl_interface/doc/src/registry.xml
+++ b/lib/erl_interface/doc/src/registry.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/appmon/doc/man3/.gitignore b/lib/erl_interface/ebin/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/appmon/doc/man3/.gitignore
+++ b/lib/erl_interface/ebin/.gitignore
diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h
index 9b83385a46..3f3435977d 100644
--- a/lib/erl_interface/include/ei.h
+++ b/lib/erl_interface/include/ei.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@
#include <stdio.h> /* Need type FILE */
#include <errno.h> /* Need EHOSTUNREACH, ENOMEM, ... */
-#if !defined(__WIN32__) && !defined(VXWORKS) || (defined(VXWORKS) && defined(HAVE_SENS))
+#if !(defined(__WIN32__) || defined(_WIN32)) && !defined(VXWORKS) || (defined(VXWORKS) && defined(HAVE_SENS))
# include <netdb.h>
#endif
@@ -131,6 +131,7 @@
#define ERL_SMALL_BIG_EXT 'n'
#define ERL_LARGE_BIG_EXT 'o'
#define ERL_NEW_FUN_EXT 'p'
+#define ERL_MAP_EXT 't'
#define ERL_FUN_EXT 'u'
#define ERL_NEW_CACHE 'N' /* c nodes don't know these two */
@@ -467,6 +468,8 @@ int ei_encode_list_header(char *buf, int *index, int arity);
int ei_x_encode_list_header(ei_x_buff* x, long n);
#define ei_encode_empty_list(buf,i) ei_encode_list_header(buf,i,0)
int ei_x_encode_empty_list(ei_x_buff* x);
+int ei_encode_map_header(char *buf, int *index, int arity);
+int ei_x_encode_map_header(ei_x_buff* x, long n);
/*
* ei_get_type() returns the type and "size" of the item at
@@ -507,6 +510,7 @@ int ei_decode_term(const char *buf, int *index, void *t); /* ETERM** actually */
int ei_decode_trace(const char *buf, int *index, erlang_trace *p);
int ei_decode_tuple_header(const char *buf, int *index, int *arity);
int ei_decode_list_header(const char *buf, int *index, int *arity);
+int ei_decode_map_header(const char *buf, int *index, int *arity);
/*
* ei_decode_ei_term() returns 1 if term is decoded, 0 if term is OK,
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
index e36b39c1fb..7c09b605fa 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
@@ -40,6 +40,16 @@ include $(TARGET)/eidefs.mk
include $(ERL_TOP)/make/output.mk
+EBINDIR=../ebin
+
+APP_FILE= erl_interface.app
+APP_SRC= $(APP_FILE).src
+APP_TARGET= $(EBINDIR)/$(APP_FILE)
+
+APPUP_FILE= erl_interface.appup
+APPUP_SRC= $(APPUP_FILE).src
+APPUP_TARGET= $(EBINDIR)/$(APPUP_FILE)
+
USING_MINGW=@MIXED_CYGWIN_MINGW@
USING_MSYS_VC==@MIXED_MSYS_VC@
USING_CYGWIN_VC==@MIXED_MSYS_VC@
@@ -212,7 +222,9 @@ ifeq ($(USING_VC),yes)
TARGETS = \
$(OBJ_TARGETS) \
- $(EXE_TARGETS)
+ $(EXE_TARGETS) \
+ $(APP_TARGET) \
+ $(APPUP_TARGET)
OBJ_TARGETS = \
$(MT_EILIB) \
@@ -241,7 +253,9 @@ else
ifeq ($USING_MINGW,yes)
TARGETS = \
$(OBJ_TARGETS) \
- $(EXE_TARGETS)
+ $(EXE_TARGETS) \
+ $(APP_TARGET) \
+ $(APPUP_TARGET)
OBJ_TARGETS = \
$(MD_EILIB) \
@@ -259,7 +273,9 @@ ifdef THR_DEFS
TARGETS = \
$(OBJ_TARGETS) \
- $(EXE_TARGETS)
+ $(EXE_TARGETS) \
+ $(APP_TARGET) \
+ $(APPUP_TARGET)
OBJ_TARGETS = \
$(ST_EILIB) \
@@ -281,7 +297,9 @@ else
TARGETS = \
$(OBJ_TARGETS) \
- $(EXE_TARGETS)
+ $(EXE_TARGETS) \
+ $(APP_TARGET) \
+ $(APPUP_TARGET)
OBJ_TARGETS = \
$(ST_EILIB) \
@@ -547,6 +565,8 @@ clean:
rm -f $(MDD_EIOBJECTS) $(MDD_ERLOBJECTS) $(MDD_EILIB) $(MDD_ERLLIB)
rm -f $(ERL_CALL)
rm -f $(FAKE_TARGETS)
+ rm -f $(APP_TARGET)
+ rm -f $(APPUP_TARGET)
distclean: clean
rm -f config.h config.log config.status configure
@@ -597,12 +617,17 @@ $(MDD_OBJDIR)/%.o: %.c
# Create directories
###########################################################################
-_create_dirs := $(shell mkdir -p $(BINDIR) $(OBJDIR) $(ST_OBJDIR) $(MT_OBJDIR) $(MD_OBJDIR) $(MDD_OBJDIR))
+_create_dirs := $(shell mkdir -p $(EBINDIR) $(BINDIR) $(OBJDIR) $(ST_OBJDIR) $(MT_OBJDIR) $(MD_OBJDIR) $(MDD_OBJDIR))
###########################################################################
# Special rules
###########################################################################
+$(APP_TARGET): $(APP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(ERL_INTERFACE_VSN);' $< > $@
+$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(ERL_INTERFACE_VSN);' $< > $@
+
ifeq ($(TARGET),win32)
# Windows archive creation
@@ -857,6 +882,7 @@ release: opt
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/lib"
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src/auxdir"
$(INSTALL_DIR) "$(RELSYSDIR)/src/connect"
$(INSTALL_DIR) "$(RELSYSDIR)/src/decode"
@@ -868,6 +894,8 @@ release: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src/registry"
$(INSTALL_DIR) "$(RELEASE_PATH)/usr/include"
$(INSTALL_DIR) "$(RELEASE_PATH)/usr/lib"
+ $(INSTALL_DATA) $(APP_TARGET) "$(RELSYSDIR)/ebin/$(APP_FILE)"
+ $(INSTALL_DATA) $(APPUP_TARGET) "$(RELSYSDIR)/ebin/$(APPUP_FILE)"
$(INSTALL_DATA) $(HEADERS) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HEADERS) "$(RELEASE_PATH)/usr/include"
$(INSTALL_DATA) $(OBJ_TARGETS) "$(RELSYSDIR)/lib"
diff --git a/lib/erl_interface/src/auxdir/config.guess b/lib/erl_interface/src/auxdir/config.guess
deleted file mode 100755
index f475ceb413..0000000000
--- a/lib/erl_interface/src/auxdir/config.guess
+++ /dev/null
@@ -1,1534 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-#
-# Please send patches with a ChangeLog entry to [email protected].
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# ([email protected] 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # [email protected] (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <[email protected]>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <[email protected]> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/lib/erl_interface/src/auxdir/config.sub b/lib/erl_interface/src/auxdir/config.sub
deleted file mode 100755
index bb6edbdb47..0000000000
--- a/lib/erl_interface/src/auxdir/config.sub
+++ /dev/null
@@ -1,1789 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches with a ChangeLog entry to [email protected].
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
- ;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- xscaleeb)
- basic_machine=armeb-unknown
- ;;
-
- xscaleel)
- basic_machine=armel-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i386-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- hexagon-*)
- os=-elf
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
-
diff --git a/lib/erl_interface/src/auxdir/install-sh b/lib/erl_interface/src/auxdir/install-sh
deleted file mode 100755
index a5897de6ea..0000000000
--- a/lib/erl_interface/src/auxdir/install-sh
+++ /dev/null
@@ -1,519 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2006-12-25.00
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c
index 8f1f231b82..45c000ef76 100644
--- a/lib/erl_interface/src/connect/ei_connect.c
+++ b/lib/erl_interface/src/connect/ei_connect.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2000-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -761,7 +761,7 @@ int ei_close_connection(int fd)
#endif
/*
- * Accept and initiate a connection from an other
+ * Accept and initiate a connection from another
* Erlang node. Return a file descriptor at success,
* otherwise -1;
*/
@@ -1161,11 +1161,16 @@ static unsigned int gen_challenge(void)
struct utsname name;
} s;
+ memset(&s, 0, sizeof(s));
gettimeofday(&s.tv, 0);
uname(&s.name);
s.cpu = clock();
s.pid = getpid();
+#ifndef __ANDROID__
s.hid = gethostid();
+#else
+ s.hid = 0;
+#endif
s.uid = getuid();
s.gid = getgid();
@@ -1335,7 +1340,8 @@ static int send_name_or_challenge(int fd, char *nodename,
| DFLAG_NEW_FUN_TAGS
| DFLAG_NEW_FLOATS
| DFLAG_SMALL_ATOM_TAGS
- | DFLAG_UTF8_ATOMS));
+ | DFLAG_UTF8_ATOMS
+ | DFLAG_MAP_TAG));
if (f_chall)
put32be(s, challenge);
memcpy(s, nodename, strlen(nodename));
diff --git a/lib/erl_interface/src/connect/ei_connect_int.h b/lib/erl_interface/src/connect/ei_connect_int.h
index 42ab9b58d7..8fab47a787 100644
--- a/lib/erl_interface/src/connect/ei_connect_int.h
+++ b/lib/erl_interface/src/connect/ei_connect_int.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -104,6 +104,7 @@ extern int h_errno;
#define DFLAG_NEW_FLOATS 0x800
#define DFLAG_SMALL_ATOM_TAGS 0x4000
#define DFLAG_UTF8_ATOMS 0x10000
+#define DFLAG_MAP_TAG 0x20000
ei_cnode *ei_fd_to_cnode(int fd);
int ei_distversion(int fd);
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c
index 74dcba61a7..cffcac801c 100644
--- a/lib/erl_interface/src/connect/ei_resolve.c
+++ b/lib/erl_interface/src/connect/ei_resolve.c
@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const char *name,
#ifndef HAVE_GETHOSTBYNAME_R
return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
#else
-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
+#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
struct hostent *result;
gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);
diff --git a/lib/erl_interface/src/decode/decode_big.c b/lib/erl_interface/src/decode/decode_big.c
index b54ac85be2..477880b331 100644
--- a/lib/erl_interface/src/decode/decode_big.c
+++ b/lib/erl_interface/src/decode/decode_big.c
@@ -151,13 +151,29 @@ int ei_big_comp(erlang_big *x, erlang_big *y)
#endif
#ifdef USE_ISINF_ISNAN /* simulate finite() */
-# define finite(f) (!isinf(f) && !isnan(f))
-# define HAVE_FINITE
+# define isfinite(f) (!isinf(f) && !isnan(f))
+# define HAVE_ISFINITE
+#elif defined(__GNUC__) && defined(HAVE_FINITE)
+/* We use finite in gcc as it emits assembler instead of
+ the function call that isfinite emits. The assembler is
+ significantly faster. */
+# ifdef isfinite
+# undef isfinite
+# endif
+# define isfinite finite
+# ifndef HAVE_ISFINITE
+# define HAVE_ISFINITE
+# endif
+#elif defined(isfinite) && !defined(HAVE_ISFINITE)
+# define HAVE_ISFINITE
+#elif !defined(HAVE_ISFINITE) && defined(HAVE_FINITE)
+# define isfinite finite
+# define HAVE_ISFINITE
#endif
#ifdef NO_FPE_SIGNALS
# define ERTS_FP_CHECK_INIT() do {} while (0)
-# define ERTS_FP_ERROR(f, Action) if (!finite(f)) { Action; } else {}
+# define ERTS_FP_ERROR(f, Action) if (!isfinite(f)) { Action; } else {}
# define ERTS_SAVE_FP_EXCEPTION()
# define ERTS_RESTORE_FP_EXCEPTION()
#else
diff --git a/lib/erl_interface/src/decode/decode_skip.c b/lib/erl_interface/src/decode/decode_skip.c
index 553266471c..2260394da1 100644
--- a/lib/erl_interface/src/decode/decode_skip.c
+++ b/lib/erl_interface/src/decode/decode_skip.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2002-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2002-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -61,7 +61,13 @@ int ei_skip_term(const char* buf, int* index)
break;
case ERL_SMALL_TUPLE_EXT:
case ERL_LARGE_TUPLE_EXT:
- if (ei_decode_tuple_header(buf, index, &n) < 0) return -1;
+ if (ei_decode_tuple_header(buf, index, &n) < 0) return -1;
+ for (i = 0; i < n; ++i)
+ ei_skip_term(buf, index);
+ break;
+ case ERL_MAP_EXT:
+ if (ei_decode_map_header(buf, index, &n) < 0) return -1;
+ n *= 2;
for (i = 0; i < n; ++i)
ei_skip_term(buf, index);
break;
diff --git a/lib/erl_interface/src/decode/decode_tuple_header.c b/lib/erl_interface/src/decode/decode_tuple_header.c
index c0ba14ea47..698be1b97a 100644
--- a/lib/erl_interface/src/decode/decode_tuple_header.c
+++ b/lib/erl_interface/src/decode/decode_tuple_header.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -45,3 +45,24 @@ int ei_decode_tuple_header(const char *buf, int *index, int *arity)
return 0;
}
+
+int ei_decode_map_header(const char *buf, int *index, int *arity)
+{
+ const char *s = buf + *index;
+ const char *s0 = s;
+ int i;
+
+ switch ((i=get8(s))) {
+ case ERL_MAP_EXT:
+ if (arity) *arity = get32be(s);
+ else s += 4;
+ break;
+
+ default:
+ return -1;
+ }
+
+ *index += s-s0;
+
+ return 0;
+}
diff --git a/lib/erl_interface/src/encode/encode_tuple_header.c b/lib/erl_interface/src/encode/encode_tuple_header.c
index 97a3d1f808..5b11e60447 100644
--- a/lib/erl_interface/src/encode/encode_tuple_header.c
+++ b/lib/erl_interface/src/encode/encode_tuple_header.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -47,3 +47,20 @@ int ei_encode_tuple_header(char *buf, int *index, int arity)
return 0;
}
+int ei_encode_map_header(char *buf, int *index, int arity)
+{
+ char *s = buf + *index;
+ char *s0 = s;
+
+ if (arity < 0) return -1;
+
+ if (!buf) s += 5;
+ else {
+ put8(s,ERL_MAP_EXT);
+ put32be(s,arity);
+ }
+
+ *index += s-s0;
+
+ return 0;
+}
diff --git a/lib/erl_interface/src/erl_interface.app.src b/lib/erl_interface/src/erl_interface.app.src
new file mode 100644
index 0000000000..11f884c36b
--- /dev/null
+++ b/lib/erl_interface/src/erl_interface.app.src
@@ -0,0 +1,32 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% This is an -*- erlang -*- file.
+%%
+
+{application, erl_interface,
+ [
+ {description, "Erl Interface"},
+ {vsn, "%VSN%"},
+ {modules, []},
+ {registered, []},
+ {applications, []},
+ {env, []},
+ {runtime_dependencies, []}
+ ]
+}.
diff --git a/lib/tv/src/tv.appup.src b/lib/erl_interface/src/erl_interface.appup.src
index 0d918b6081..d267e3d3d5 100644
--- a/lib/tv/src/tv.appup.src
+++ b/lib/erl_interface/src/erl_interface.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,4 +15,4 @@
%% under the License.
%%
%% %CopyrightEnd%
-{"%VSN%",[],[]}.
+{"%VSN%", [], []}.
diff --git a/lib/erl_interface/src/legacy/erl_connect.c b/lib/erl_interface/src/legacy/erl_connect.c
index ae0265a388..d70d914b79 100644
--- a/lib/erl_interface/src/legacy/erl_connect.c
+++ b/lib/erl_interface/src/legacy/erl_connect.c
@@ -190,7 +190,7 @@ int erl_close_connection(int fd)
}
/*
- * Accept and initiate a connection from an other
+ * Accept and initiate a connection from another
* Erlang node. Return a file descriptor at success,
* otherwise -1;
*/
diff --git a/lib/erl_interface/src/misc/ei_decode_term.c b/lib/erl_interface/src/misc/ei_decode_term.c
index ce5ae5b19d..2e7317f781 100644
--- a/lib/erl_interface/src/misc/ei_decode_term.c
+++ b/lib/erl_interface/src/misc/ei_decode_term.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -100,6 +100,7 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term)
term->size = get16be(s);
return 0;
case ERL_LIST_EXT:
+ case ERL_MAP_EXT:
term->arity = get32be(s);
break;
case ERL_BINARY_EXT:
diff --git a/lib/erl_interface/src/misc/ei_x_encode.c b/lib/erl_interface/src/misc/ei_x_encode.c
index 14d0b56b8f..10542c88a5 100644
--- a/lib/erl_interface/src/misc/ei_x_encode.c
+++ b/lib/erl_interface/src/misc/ei_x_encode.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -206,6 +206,16 @@ int ei_x_encode_tuple_header(ei_x_buff* x, long n)
return ei_encode_tuple_header(x->buff, &x->index, n);
}
+int ei_x_encode_map_header(ei_x_buff* x, long n)
+{
+ int i = x->index;
+ if (ei_encode_map_header(NULL, &i, n) == -1)
+ return -1;
+ if (!x_fix_buff(x, i))
+ return -1;
+ return ei_encode_map_header(x->buff, &x->index, n);
+}
+
int ei_x_encode_atom(ei_x_buff* x, const char* s)
{
return ei_x_encode_atom_len_as(x, s, strlen(s), ERLANG_LATIN1, ERLANG_LATIN1);
diff --git a/lib/erl_interface/test/Makefile.src b/lib/erl_interface/test/Makefile.src
index 9c620bb8d9..4f11b5675e 100644
--- a/lib/erl_interface/test/Makefile.src
+++ b/lib/erl_interface/test/Makefile.src
@@ -17,7 +17,7 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
diff --git a/lib/erl_interface/test/all_SUITE_data/Makefile.src b/lib/erl_interface/test/all_SUITE_data/Makefile.src
index d2f57c8149..5efe7d42db 100644
--- a/lib/erl_interface/test/all_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/all_SUITE_data/Makefile.src
@@ -16,7 +16,7 @@
#
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = .@DS@gccifier@exe@ -CC"$(CC0)"
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.c b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
index cdf32b48c4..196a77dce5 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.c
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -182,6 +182,10 @@ char *read_packet(int *len)
return io_buf;
}
+void free_packet(char* packet)
+{
+ free(packet);
+}
/***********************************************************************
* S e n d i n g r e p l i e s
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.h b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
index 96d6a1cbf7..a037341d57 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.h
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -44,6 +44,7 @@ void run_tests(char* argv0, TestCase cases[], unsigned number);
int get_bin_term(ei_x_buff* x, ei_term* term);
char *read_packet(int *len);
+void free_packet(char*);
/*
* Sending replies.
diff --git a/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src
index 9b751d8f65..d6e58559cd 100644
--- a/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src
index a6525a9138..c2db6436f3 100644
--- a/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_decode_SUITE.erl b/lib/erl_interface/test/ei_decode_SUITE.erl
index d7df63cc88..ccdc19dbbd 100644
--- a/lib/erl_interface/test/ei_decode_SUITE.erl
+++ b/lib/erl_interface/test/ei_decode_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src
index 76e55750c3..0b2b0560bf 100644
--- a/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
index a676e59470..3f6cbbe186 100644
--- a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
+++ b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
@@ -603,9 +603,9 @@ TESTCASE(test_ei_decode_misc)
/*
EI_DECODE_0(decode_version);
*/
- EI_DECODE_2(decode_double, 32, double, 0.0);
- EI_DECODE_2(decode_double, 32, double, -1.0);
- EI_DECODE_2(decode_double, 32, double, 1.0);
+ EI_DECODE_2(decode_double, 9, double, 0.0);
+ EI_DECODE_2(decode_double, 9, double, -1.0);
+ EI_DECODE_2(decode_double, 9, double, 1.0);
EI_DECODE_2(decode_boolean, 8, int, 0);
EI_DECODE_2(decode_boolean, 7, int, 1);
diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE.erl b/lib/erl_interface/test/ei_decode_encode_SUITE.erl
index c7830f58f2..7caec6ac04 100644
--- a/lib/erl_interface/test/ei_decode_encode_SUITE.erl
+++ b/lib/erl_interface/test/ei_decode_encode_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -127,6 +127,15 @@ test_ei_decode_encode(Config) when is_list(Config) ->
send_rec(P, mk_ref({Atom,1}, [262143, 8723648, 24097245])),
void
end || Atom <- unicode_atom_data()],
+
+ send_rec(P, {}),
+ send_rec(P, {atom, Pid, Port, Ref}),
+ send_rec(P, [atom, Pid, Port, Ref]),
+ send_rec(P, [atom | Fun]),
+ send_rec(P, #{}),
+ send_rec(P, #{key => value}),
+ send_rec(P, maps:put(Port, Ref, #{key => value, key2 => Pid})),
+
?line runner:recv_eot(P),
ok.
diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src
index d43e834558..d9464f3b75 100644
--- a/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c b/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
index 317e5edecd..fcf546105b 100644
--- a/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
+++ b/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2004-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2004-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -32,9 +32,33 @@
/*#define MESSAGE(FMT,A1,A2) message(FMT,A1,A2)*/
#define MESSAGE(FMT,A1,A2)
-typedef int decodeFT(const char *buf, int *index, void*);
-typedef int encodeFT(char *buf, int *index, void*);
-typedef int x_encodeFT(ei_x_buff*, void*);
+
+typedef struct
+{
+ char name[MAXATOMLEN_UTF8];
+ erlang_char_encoding enc;
+}my_atom;
+
+struct my_obj {
+ union {
+ erlang_fun fun;
+ erlang_pid pid;
+ erlang_port port;
+ erlang_ref ref;
+ erlang_trace trace;
+ erlang_big big;
+ my_atom atom;
+
+ int arity;
+ }u;
+
+ int nterms; /* 0 for non-containers */
+ char* startp; /* container start position in decode buffer */
+};
+
+typedef int decodeFT(const char *buf, int *index, struct my_obj*);
+typedef int encodeFT(char *buf, int *index, struct my_obj*);
+typedef int x_encodeFT(ei_x_buff*, struct my_obj*);
struct Type {
char* name;
@@ -44,11 +68,36 @@ struct Type {
x_encodeFT* ei_x_encode_fp;
};
-typedef struct
-{
- char name[MAXATOMLEN_UTF8];
- erlang_char_encoding enc;
-}my_atom;
+
+struct Type fun_type = {
+ "fun", "erlang_fun", (decodeFT*)ei_decode_fun,
+ (encodeFT*)ei_encode_fun, (x_encodeFT*)ei_x_encode_fun
+};
+
+struct Type pid_type = {
+ "pid", "erlang_pid", (decodeFT*)ei_decode_pid,
+ (encodeFT*)ei_encode_pid, (x_encodeFT*)ei_x_encode_pid
+};
+
+struct Type port_type = {
+ "port", "erlang_port", (decodeFT*)ei_decode_port,
+ (encodeFT*)ei_encode_port, (x_encodeFT*)ei_x_encode_port
+};
+
+struct Type ref_type = {
+ "ref", "erlang_ref", (decodeFT*)ei_decode_ref,
+ (encodeFT*)ei_encode_ref, (x_encodeFT*)ei_x_encode_ref
+};
+
+struct Type trace_type = {
+ "trace", "erlang_trace", (decodeFT*)ei_decode_trace,
+ (encodeFT*)ei_encode_trace, (x_encodeFT*)ei_x_encode_trace
+};
+
+struct Type big_type = {
+ "big", "erlang_big", (decodeFT*)ei_decode_big,
+ (encodeFT*)ei_encode_big, (x_encodeFT*)ei_x_encode_big
+};
int ei_decode_my_atom(const char *buf, int *index, my_atom* a)
{
@@ -64,130 +113,274 @@ int ei_x_encode_my_atom(ei_x_buff* x, my_atom* a)
return ei_x_encode_atom_as(x, a->name, ERLANG_UTF8, a->enc);
}
+struct Type my_atom_type = {
+ "atom", "my_atom", (decodeFT*)ei_decode_my_atom,
+ (encodeFT*)ei_encode_my_atom, (x_encodeFT*)ei_x_encode_my_atom
+};
+
+
+int my_decode_tuple_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_tuple_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj)
+ obj->nterms = obj->u.arity;
+ return ret;
+}
+
+int my_encode_tuple_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_tuple_header(buf, index, obj->u.arity);
+}
+int my_x_encode_tuple_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_tuple_header(x, (long)obj->u.arity);
+}
+
+struct Type tuple_type = {
+ "tuple_header", "arity", my_decode_tuple_header,
+ my_encode_tuple_header, my_x_encode_tuple_header
+};
+
+
+int my_decode_list_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_list_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj) {
+ obj->nterms = obj->u.arity + 1;
+ }
+ return ret;
+}
+int my_encode_list_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_list_header(buf, index, obj->u.arity);
+}
+int my_x_encode_list_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_list_header(x, (long)obj->u.arity);
+}
+
+struct Type list_type = {
+ "list_header", "arity", my_decode_list_header,
+ my_encode_list_header, my_x_encode_list_header
+};
+
+
+int my_decode_nil(const char *buf, int *index, struct my_obj* dummy)
+{
+ int type, size, ret;
+ ret = ei_get_type(buf, index, &type, &size);
+ (*index)++;
+ return ret ? ret : !(type == ERL_NIL_EXT);
+
+}
+int my_encode_nil(char *buf, int *index, struct my_obj* dummy)
+{
+ return ei_encode_empty_list(buf, index);
+}
+
+int my_x_encode_nil(ei_x_buff* x, struct my_obj* dummy)
+{
+ return ei_x_encode_empty_list(x);
+}
+
+struct Type nil_type = {
+ "empty_list", "nil", my_decode_nil,
+ my_encode_nil, my_x_encode_nil
+};
+
+int my_decode_map_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_map_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj)
+ obj->nterms = obj->u.arity * 2;
+ return ret;
+}
+int my_encode_map_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_map_header(buf, index, obj->u.arity);
+}
+int my_x_encode_map_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_map_header(x, (long)obj->u.arity);
+}
+
+struct Type map_type = {
+ "map_header", "arity", my_decode_map_header,
+ my_encode_map_header, my_x_encode_map_header
+};
+
+
#define BUFSZ 2000
-void decode_encode(struct Type* t, void* obj)
+void decode_encode(struct Type** tv, int nobj)
{
- char *buf;
- char buf2[BUFSZ];
- int size1 = 0;
- int size2 = 0;
- int size3 = 0;
- int err;
+ struct my_obj objv[10];
+ int oix = 0;
+ char* packet;
+ char* inp;
+ char* outp;
+ char out_buf[BUFSZ];
+ int size1, size2, size3;
+ int err, i;
ei_x_buff arg;
- MESSAGE("ei_decode_%s, arg is type %s", t->name, t->type);
- buf = read_packet(NULL);
- err = t->ei_decode_fp(buf+1, &size1, NULL);
- if (err != 0) {
- if (err != -1) {
- fail("decode returned non zero but not -1");
- } else {
- fail("decode returned non zero");
+ packet = read_packet(NULL);
+ inp = packet+1;
+ outp = out_buf;
+ ei_x_new(&arg);
+ for (i=0; i<nobj; i++) {
+ struct Type* t = tv[i];
+
+ MESSAGE("ei_decode_%s, arg is type %s", t->name, t->type);
+
+ size1 = 0;
+ err = t->ei_decode_fp(inp, &size1, NULL);
+ if (err != 0) {
+ if (err != -1) {
+ fail("decode returned non zero but not -1");
+ } else {
+ fail("decode returned non zero");
+ }
+ return;
+ }
+ if (size1 < 1) {
+ fail("size is < 1");
+ return;
}
- return;
- }
- if (size1 < 1) {
- fail("size is < 1");
- return;
- }
- if (size1 > BUFSZ) {
- fail("size is > BUFSZ");
- return;
- }
+ if (size1 > BUFSZ) {
+ fail("size is > BUFSZ");
+ return;
+ }
- err = t->ei_decode_fp(buf+1, &size2, obj);
- if (err != 0) {
- if (err != -1) {
- fail("decode returned non zero but not -1");
- } else {
- fail("decode returned non zero");
+ size2 = 0;
+ objv[oix].nterms = 0;
+ objv[oix].startp = inp;
+ err = t->ei_decode_fp(inp, &size2, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("decode returned non zero but not -1");
+ } else {
+ fail("decode returned non zero");
+ }
+ return;
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("decode sizes differs");
+ return;
}
- return;
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("decode sizes differs");
- return;
- }
- size2 = 0;
- err = ei_skip_term(buf+1, &size2);
- if (err != 0) {
- fail("ei_skip_term returned non zero");
- return;
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("skip size differs");
- return;
- }
+ if (!objv[oix].nterms) {
+ size2 = 0;
+ err = ei_skip_term(inp, &size2);
+ if (err != 0) {
+ fail("ei_skip_term returned non zero");
+ return;
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("skip size differs");
+ return;
+ }
+ }
- MESSAGE("ei_encode_%s buf is NULL, arg is type %s", t->name, t->type);
- size2 = 0;
- err = t->ei_encode_fp(NULL, &size2, obj);
- if (err != 0) {
- if (err != -1) {
- fail("size calculation returned non zero but not -1");
+ MESSAGE("ei_encode_%s buf is NULL, arg is type %s", t->name, t->type);
+ size2 = 0;
+ err = t->ei_encode_fp(NULL, &size2, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("size calculation returned non zero but not -1");
+ return;
+ } else {
+ fail("size calculation returned non zero");
+ return;
+ }
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("decode and encode size differs when buf is NULL");
return;
- } else {
- fail("size calculation returned non zero");
+ }
+ MESSAGE("ei_encode_%s, arg is type %s", t->name, t->type);
+ size3 = 0;
+ err = t->ei_encode_fp(outp, &size3, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("returned non zero but not -1");
+ } else {
+ fail("returned non zero");
+ }
return;
}
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("decode and encode size differs when buf is NULL");
- return;
- }
- MESSAGE("ei_encode_%s, arg is type %s", t->name, t->type);
- err = t->ei_encode_fp(buf2, &size3, obj);
- if (err != 0) {
- if (err != -1) {
- fail("returned non zero but not -1");
- } else {
- fail("returned non zero");
+ if (size1 != size3) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size3);
+ fail("decode and encode size differs");
+ return;
}
- return;
- }
- if (size1 != size3) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size3);
- fail("decode and encode size differs");
- return;
- }
- send_buffer(buf2, size1);
- MESSAGE("ei_x_encode_%s, arg is type %s", t->name, t->type);
- ei_x_new(&arg);
- err = t->ei_x_encode_fp(&arg, obj);
- if (err != 0) {
- if (err != -1) {
- fail("returned non zero but not -1");
- } else {
- fail("returned non zero");
+ MESSAGE("ei_x_encode_%s, arg is type %s", t->name, t->type);
+ err = t->ei_x_encode_fp(&arg, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("returned non zero but not -1");
+ } else {
+ fail("returned non zero");
+ }
+ ei_x_free(&arg);
+ return;
}
- ei_x_free(&arg);
- return;
+ if (arg.index < 1) {
+ fail("size is < 1");
+ ei_x_free(&arg);
+ return;
+ }
+
+ inp += size1;
+ outp += size1;
+
+ if (objv[oix].nterms) { /* container term */
+ if (++oix >= sizeof(objv)/sizeof(*objv))
+ fail("Term too deep");
+ }
+ else { /* "leaf" term */
+ while (oix > 0) {
+ if (--(objv[oix - 1].nterms) == 0) {
+ /* last element in container */
+ --oix;
+
+ size2 = 0;
+ err = ei_skip_term(objv[oix].startp, &size2);
+ if (err != 0) {
+ fail("ei_skip_term returned non zero");
+ return;
+ }
+ if (objv[oix].startp + size2 != inp) {
+ MESSAGE("size1 = %d, size2 = %d\n", size1, size2);
+ fail("container skip size differs");
+ return;
+ }
+ }
+ else
+ break; /* more elements in container */
+ }
+ }
+
}
- if (arg.index < 1) {
- fail("size is < 1");
- ei_x_free(&arg);
- return;
+ if (oix > 0) {
+ fail("Container not complete");
}
+ send_buffer(out_buf, outp - out_buf);
send_buffer(arg.buff, arg.index);
ei_x_free(&arg);
+ free_packet(packet);
}
+void decode_encode_one(struct Type* t)
+{
+ decode_encode(&t, 1);
+}
-#define EI_DECODE_ENCODE(TYPE, ERLANG_TYPE) { \
- struct Type type_struct = {#TYPE, #ERLANG_TYPE, \
- (decodeFT*)ei_decode_##TYPE, \
- (encodeFT*)ei_encode_##TYPE, \
- (x_encodeFT*)ei_x_encode_##TYPE }; \
- ERLANG_TYPE type_obj; \
- decode_encode(&type_struct, &type_obj); \
- }
void decode_encode_big(struct Type* t)
@@ -274,14 +467,6 @@ void decode_encode_big(struct Type* t)
ei_free_big(p);
}
-#define EI_DECODE_ENCODE_BIG(TYPE, ERLANG_TYPE) { \
- struct Type type_struct = {#TYPE, #ERLANG_TYPE, \
- (decodeFT*)ei_decode_##TYPE, \
- (encodeFT*)ei_encode_##TYPE, \
- (x_encodeFT*)ei_x_encode_##TYPE }; \
- decode_encode_big(&type_struct); \
- }
-
/* ******************************************************************** */
@@ -290,34 +475,63 @@ TESTCASE(test_ei_decode_encode)
{
int i;
- EI_DECODE_ENCODE(fun , erlang_fun);
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
- EI_DECODE_ENCODE(trace, erlang_trace);
+ decode_encode_one(&fun_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ decode_encode_one(&trace_type);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
/* Test large node containers... */
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
/* Unicode atoms */
for (i=0; i<24; i++) {
- EI_DECODE_ENCODE(my_atom, my_atom);
- EI_DECODE_ENCODE(pid, erlang_pid);
- EI_DECODE_ENCODE(port, erlang_port);
- EI_DECODE_ENCODE(ref, erlang_ref);
+ decode_encode_one(&my_atom_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ }
+
+ decode_encode_one(&tuple_type); /* {} */
+ {
+ struct Type* tpl[] = { &tuple_type, &my_atom_type, &pid_type, &port_type, &ref_type };
+ decode_encode(tpl, 5);
+ }
+
+ {
+ struct Type* list[] = { &list_type, &my_atom_type, &pid_type, &port_type, &ref_type, &nil_type };
+ decode_encode(list, 6);
+ }
+ {
+ struct Type* list[] = { &list_type, &my_atom_type, &fun_type };
+ decode_encode(list, 3);
+ }
+ decode_encode_one(&map_type); /* #{} */
+ { /* #{atom => atom}*/
+ struct Type* map[] = { &map_type, &my_atom_type, &my_atom_type };
+ decode_encode(map, 3);
+ }
+
+ { /* #{atom => atom, atom => pid, port => ref }*/
+ struct Type* map[] = { &map_type,
+ &my_atom_type, &my_atom_type,
+ &my_atom_type, &pid_type,
+ &port_type, &ref_type
+ };
+ decode_encode(map, 7);
}
report(1);
diff --git a/lib/erl_interface/test/ei_encode_SUITE.erl b/lib/erl_interface/test/ei_encode_SUITE.erl
index 8d622a9e65..50dc8b6a3c 100644
--- a/lib/erl_interface/test/ei_encode_SUITE.erl
+++ b/lib/erl_interface/test/ei_encode_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src
index f2a2c40615..6e98bb968b 100644
--- a/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src
index 73d51794e9..de062914c5 100644
--- a/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src
index 6eec4b1990..469b49a581 100644
--- a/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src
index a49eeccc02..4e8018b515 100644
--- a/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src
@@ -17,13 +17,12 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \
$(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src
index 047a734ecb..dad2b5ea90 100644
--- a/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src
index 89931c7701..8f27e5495b 100644
--- a/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @erl_interface_sock_libs@ @LIBS@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src
index 6f363ccd6f..7a532ea0ed 100644
--- a/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src
index 0cd1ab512d..73f4b1c685 100644
--- a/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src
index ef846bc440..ec159b0be0 100644
--- a/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src
index 8ce6c9c985..dd5ea98d71 100644
--- a/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib@
-LIBEI = $(LIBPATH)/@erl_interface_eilib@
+LIBERL = @erl_interface_lib@
+LIBEI = @erl_interface_eilib@
LIBFLAGS = ../all_SUITE_data/runner@obj@ \
$(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \
@erl_interface_threadlib@
diff --git a/lib/erl_interface/test/port_call_SUITE_data/Makefile.src b/lib/erl_interface/test/port_call_SUITE_data/Makefile.src
index a512494aa3..7672b3dcd2 100644
--- a/lib/erl_interface/test/port_call_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/port_call_SUITE_data/Makefile.src
@@ -17,14 +17,13 @@
# %CopyrightEnd%
#
-include @erl_interface_mk_include@@[email protected]
+include @erl_interface_mk_include@
CC0 = @CC@
CC = ..@DS@all_SUITE_data@DS@gccifier@exe@ -CC"$(CC0)"
LD = @LD@
-LIBPATH = @erl_interface_libpath@
-LIBERL = $(LIBPATH)/@erl_interface_lib_drv@
-LIBEI = $(LIBPATH)/@erl_interface_eilib_drv@
+LIBERL = @erl_interface_lib_drv@
+LIBEI = @erl_interface_eilib_drv@
SHLIB_EXTRA_LDLIBS = $(LIBERL) $(LIBEI) @erl_interface_threadlib@
SHLIB_EXTRA_CFLAGS = -I@erl_interface_include@ -I../all_SUITE_data
diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk
index f386ce09a8..c809d5421e 100644
--- a/lib/erl_interface/vsn.mk
+++ b/lib/erl_interface/vsn.mk
@@ -1 +1,2 @@
-EI_VSN = 3.7.15
+EI_VSN = 3.7.20
+ERL_INTERFACE_VSN = $(EI_VSN)
diff --git a/lib/et/doc/src/book.xml b/lib/et/doc/src/book.xml
index 222fbda046..6c78f2ca07 100644
--- a/lib/et/doc/src/book.xml
+++ b/lib/et/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et.xml b/lib/et/doc/src/et.xml
index 5e3453c348..f1f74df1b1 100644
--- a/lib/et/doc/src/et.xml
+++ b/lib/et/doc/src/et.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml
index e9885dcbb3..8b4592ac63 100644
--- a/lib/et/doc/src/et_collector.xml
+++ b/lib/et/doc/src/et_collector.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc
index 68017b972e..a4240db2ba 100644
--- a/lib/et/doc/src/et_desc.xmlsrc
+++ b/lib/et/doc/src/et_desc.xmlsrc
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/et/doc/src/et_examples.xmlsrc b/lib/et/doc/src/et_examples.xmlsrc
index 7678184515..3bd95bcb06 100644
--- a/lib/et/doc/src/et_examples.xmlsrc
+++ b/lib/et/doc/src/et_examples.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_intro.xml b/lib/et/doc/src/et_intro.xml
index f90a6d2b5c..62cc291d4c 100644
--- a/lib/et/doc/src/et_intro.xml
+++ b/lib/et/doc/src/et_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2012</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_selector.xml b/lib/et/doc/src/et_selector.xml
index 34203306bb..72392fdfe4 100644
--- a/lib/et/doc/src/et_selector.xml
+++ b/lib/et/doc/src/et_selector.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc
index 1337af76d1..02c303f66e 100644
--- a/lib/et/doc/src/et_tutorial.xmlsrc
+++ b/lib/et/doc/src/et_tutorial.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2009</year><year>2011</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/et_viewer.xml b/lib/et/doc/src/et_viewer.xml
index d4cfbdfa31..695725f281 100644
--- a/lib/et/doc/src/et_viewer.xml
+++ b/lib/et/doc/src/et_viewer.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml
index 815dfada5e..e122187cf3 100644
--- a/lib/et/doc/src/notes.xml
+++ b/lib/et/doc/src/notes.xml
@@ -36,6 +36,51 @@
one section in this document. The title of each section is the
version number of <c>Event Tracer (ET)</c>.</p>
+<section><title>ET 1.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>ET 1.4.4.5</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/et/doc/src/part.xml b/lib/et/doc/src/part.xml
index 627aee866d..7048e3a401 100644
--- a/lib/et/doc/src/part.xml
+++ b/lib/et/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/doc/src/ref_man.xml b/lib/et/doc/src/ref_man.xml
index 344b4fabed..47706339b6 100644
--- a/lib/et/doc/src/ref_man.xml
+++ b/lib/et/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile
index 386169fe95..377e593712 100644
--- a/lib/et/src/Makefile
+++ b/lib/et/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2000-2012. All Rights Reserved.
+# Copyright Ericsson AB 2000-2013. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -127,15 +127,12 @@ $(EBIN)/et_selector.$(EMULATOR): et_selector.erl ../include/et.hrl
$(EBIN)/et_contents_viewer.$(EMULATOR): et_contents_viewer.erl ../include/et.hrl et_internal.hrl
-$(EBIN)/et_gs_contents_viewer.$(EMULATOR): et_gs_contents_viewer.erl ../include/et.hrl et_internal.hrl
$(EBIN)/et_wx_contents_viewer.$(EMULATOR): et_wx_contents_viewer.erl ../include/et.hrl et_internal.hrl
$(EBIN)/et_collector.$(EMULATOR): et_collector.erl ../include/et.hrl et_internal.hrl
$(EBIN)/et_viewer.$(EMULATOR): et_viewer.erl ../include/et.hrl et_internal.hrl
-$(EBIN)/et_gs_viewer.$(EMULATOR): et_gs_viewer.erl ../include/et.hrl et_internal.hrl
-
$(EBIN)/et_wx_viewer.$(EMULATOR): et_wx_viewer.erl ../include/et.hrl et_internal.hrl
diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src
index fd203e3e44..c26d9320d8 100644
--- a/lib/et/src/et.app.src
+++ b/lib/et/src/et.app.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,8 +24,6 @@
[
et,
et_collector,
- et_gs_contents_viewer,
- et_gs_viewer,
et_selector,
et_viewer,
et_wx_contents_viewer,
@@ -33,5 +31,7 @@
]},
{registered, [et_collector]},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/et/src/et.appup.src b/lib/et/src/et.appup.src
index b6344a9387..5f15b00386 100644
--- a/lib/et/src/et.appup.src
+++ b/lib/et/src/et.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,8 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ]
+ [{<<".*">>,[{restart_application, et}]}],
+ [{<<".*">>,[{restart_application, et}]}]
}.
-
diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl
index a78b30c419..e05c67be60 100644
--- a/lib/et/src/et_collector.erl
+++ b/lib/et/src/et_collector.erl
@@ -409,8 +409,6 @@ report(TH, TraceOrEvent) when is_record(TH, table_handle) ->
report(TH#table_handle.collector_pid, TraceOrEvent)
end
end;
-report(TH, end_of_trace) when is_record(TH, table_handle) ->
- {ok, TH};
report(_, Bad) ->
exit({bad_event, Bad}).
diff --git a/lib/et/src/et_gs_contents_viewer.erl b/lib/et/src/et_gs_contents_viewer.erl
deleted file mode 100644
index 2d414f10b4..0000000000
--- a/lib/et/src/et_gs_contents_viewer.erl
+++ /dev/null
@@ -1,602 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%% Purpose: Displays details of a trace event
-%%----------------------------------------------------------------------
-
--module(et_gs_contents_viewer).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,editor,2}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menubar,2}},
- {nowarn_deprecated_function,{gs,menubutton,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,menuitem,3}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
--behaviour(gen_server).
-
-%% External exports
--export([start_link/1,
- stop/1]).
-
-%% gen_server callbacks
--export([init/1, terminate/2, code_change/3,
- handle_call/3, handle_cast/2, handle_info/2]).
-
--include("../include/et.hrl").
--include("et_internal.hrl").
-
--record(state, {parent_pid, % Pid of parent process
- viewer_pid, % Pid of viewer process
- event_order, % Field to be used as primary key
- event, % The original event
- filtered_event, % Event processed by active filter
- active_filter, % Name of the active filter
- filters, % List of possible filters
- win, % GUI: Window object
- packer, % GUI: Packer object
- width, % GUI: Window width
- height}). % GUI: Window height
-
-%%%----------------------------------------------------------------------
-%%% Client side
-%%%----------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% start_link(Options) -> {ok, ContentsPid} | {error, Reason}
-%%
-%% Start an viewer for the event contents as window in GS
-%%
-%% Options = [option()]
-%%
-%% option() =
-%%
-%% {parent_pid, pid()} | % Pid of parent process
-%% {viewer_pid, pid()} | % Pid of viewer process
-%% {event_order, event_order()} | % Field to be used as primary key
-%% {active_filter, atom()} | % Name of the active filter
-%% {filter, atom(), fun()} % A named filter fun
-%%
-%% event_order() = 'trace_ts' | 'event_ts'
-%% ContentsPid = pid()
-%% Reason = term()
-%%----------------------------------------------------------------------
-
-start_link(Options) ->
- case parse_opt(Options, default_state()) of
- {ok, S} ->
- case gen_server:start_link(?MODULE, [S], []) of
- {ok, ContentsPid} when S#state.parent_pid =/= self() ->
- unlink(ContentsPid),
- {ok, ContentsPid};
- Other ->
- Other
- end;
- {error, Reason} ->
- {error, Reason}
- end.
-
-default_state() ->
- #state{parent_pid = self(),
- viewer_pid = undefined,
- active_filter = ?DEFAULT_FILTER_NAME,
- filters = [?DEFAULT_FILTER],
- width = 600,
- height = 300}.
-
-parse_opt([], S) ->
- Name = S#state.active_filter,
- Filters = S#state.filters,
- if
- S#state.event =:= undefined ->
- {error, {badarg, no_event}};
- is_atom(Name) ->
- case lists:keysearch(Name, #filter.name, Filters) of
- {value, F} when is_record(F, filter) ->
- {ok, S#state{active_filter = Name}};
- false ->
- {error, {badarg, {no_such_filter, Name, Filters}}}
- end
- end;
-parse_opt([H | T], S) ->
- case H of
- {parent_pid, ParentPid} when is_pid(ParentPid) ->
- parse_opt(T, S#state{parent_pid = ParentPid});
- {viewer_pid, ViewerPid} when is_pid(ViewerPid) ->
- parse_opt(T, S#state{viewer_pid = ViewerPid});
- {event_order, trace_ts} ->
- parse_opt(T, S#state{event_order = trace_ts});
- {event_order, event_ts} ->
- parse_opt(T, S#state{event_order = event_ts});
- {event, Event} when is_record(Event, event) ->
- parse_opt(T, S#state{event = Event});
- {active_filter, Name} when is_atom(Name) ->
- parse_opt(T, S#state{active_filter = Name});
- F when is_record(F, filter),
- is_atom(F#filter.name),
- is_function(F#filter.function) ->
- Filters = lists:keydelete(F#filter.name, #filter.name, S#state.filters),
- Filters2 = lists:keysort(#filter.name, [F | Filters]),
- parse_opt(T, S#state{filters = Filters2});
- {width, Width} when is_integer(Width), Width > 0 ->
- parse_opt(T, S#state{width = Width});
- {height, Height} when is_integer(Height), Height > 0 ->
- parse_opt(T, S#state{height = Height});
- Bad ->
- {error, {bad_option, Bad}}
- end;
-parse_opt(BadList, _S) ->
- {error, {bad_option_list, BadList}}.
-
-%%----------------------------------------------------------------------
-%% stop(ContentsPid) -> ok
-%%
-%% Stops a contents viewer process
-%%
-%% ContentsPid = pid()
-%%----------------------------------------------------------------------
-
-stop(ContentsPid) ->
- unlink(ContentsPid),
- call(ContentsPid, stop).
-
-call(ContentsPid, Request) ->
- gen_server:call(ContentsPid, Request, infinity).
-
-%%%----------------------------------------------------------------------
-%%% Callback functions from gen_server
-%%%----------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% Func: init/1
-%% Returns: {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%%----------------------------------------------------------------------
-
-init([S]) when is_record(S, state) ->
- process_flag(trap_exit, true),
- S2 = create_window(S),
- {ok, S2}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_call/3
-%% Returns: {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} | (terminate/2 is called)
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_call(stop, _From, S) ->
- unlink(S#state.parent_pid),
- {stop, shutdown, ok, S};
-handle_call(Request, From, S) ->
- ok = error_logger:format("~p(~p): handle_call(~p, ~p, ~p)~n",
- [?MODULE, self(), Request, From, S]),
- Reply = {error, {bad_request, Request}},
- {reply, Reply, S}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_cast/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_cast(Msg, S) ->
- ok = error_logger:format("~p(~p): handle_cast(~p, ~p)~n",
- [?MODULE, self(), Msg, S]),
- {noreply, S}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_info/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_info({gs, Button, click, Data, _Other}, S) ->
- case Button of
- close ->
- gs:destroy(S#state.win),
- {stop, normal, S};
- save ->
- Event = S#state.event,
- Bin = list_to_binary(event_to_string(Event, S#state.event_order)),
- TimeStamp =
- case S#state.event_order of
- trace_ts -> Event#event.trace_ts;
- event_ts -> Event#event.event_ts
- end,
- FileName = ["et_contents_viewer_", now_to_string(TimeStamp), ".save"],
- file:write_file(lists:flatten(FileName), Bin),
- {noreply, S};
- _PopupMenuItem when is_record(Data, filter) ->
- F = Data,
- ChildState= S#state{active_filter = F#filter.name},
- case gen_server:start_link(?MODULE, [ChildState], []) of
- {ok, Pid} when S#state.parent_pid =/= self() ->
- unlink(Pid),
- {noreply, S};
- _ ->
- {noreply, S}
- end;
- {hide, Actors} ->
- send_viewer_event(S, {delete_actors, Actors}),
- {noreply, S};
- {show, Actors} ->
- send_viewer_event(S, {insert_actors, Actors}),
- {noreply, S};
- {mode, Mode} ->
- send_viewer_event(S, {mode, Mode}),
- {noreply, S};
- Nyi ->
- ok = error_logger:format("~p: click ~p ignored (nyi)~n",
- [?MODULE, Nyi]),
- {noreply, S}
- end;
-handle_info({gs, _Obj, destroy,_, _}, S) ->
- unlink(S#state.parent_pid),
- gs:destroy(S#state.win),
- {stop, normal, S};
-handle_info({gs, _Obj, keypress, _, [KeySym, _Keycode, _Shift, _Control | _]}, S) ->
- case KeySym of
- 'c' ->
- gs:destroy(S#state.win),
- {stop, normal, S};
-
- 'f' ->
- E = S#state.filtered_event,
- From = E#event.from,
- send_viewer_event(S, {delete_actors, [From]}),
- {noreply, S};
- 't' ->
- E = S#state.filtered_event,
- To = E#event.to,
- send_viewer_event(S, {delete_actors, [To]}),
- {noreply, S};
- 'b' ->
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- send_viewer_event(S, {delete_actors, [From, To]}),
- {noreply, S};
-
- 'F' ->
- E = S#state.filtered_event,
- From = E#event.from,
- send_viewer_event(S, {insert_actors, [From]}),
- {noreply, S};
- 'T' ->
- E = S#state.filtered_event,
- To = E#event.to,
- send_viewer_event(S, {insert_actors, [To]}),
- {noreply, S};
- 'B' ->
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- send_viewer_event(S, {insert_actors, [From, To]}),
- {noreply, S};
-
- 's' ->
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- First = et_collector:make_key(S#state.event_order, E),
- Mode = {search_actors, forward, First, [From, To]},
- send_viewer_event(S, {mode, Mode}),
- {noreply, S};
- 'r' ->
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- First = et_collector:make_key(S#state.event_order, E),
- Mode = {search_actors, reverse, First, [From, To]},
- send_viewer_event(S, {mode, Mode}),
- {noreply, S};
- 'a' ->
- send_viewer_event(S, {mode, all}),
- {noreply, 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},
- case gen_server:start_link(?MODULE, [ChildState], []) of
- {ok, Pid} when S#state.parent_pid =/= self() ->
- unlink(Pid);
- _ ->
- ignore
- end;
- false ->
- ignore
- end,
- {noreply, S};
- Int when is_integer(Int), Int > 0, Int =< 9 ->
- case catch lists:nth(Int, S#state.filters) of
- F when is_record(F, filter) ->
- ChildState= S#state{active_filter = F#filter.name},
- case gen_server:start_link(?MODULE, [ChildState], []) of
- {ok, Pid} when S#state.parent_pid =/= self() ->
- unlink(Pid);
- _ ->
- ignore
- end;
- {'EXIT', _} ->
- ignore
- end,
- {noreply, S};
-
- 'Shift_L' ->
- {noreply, S};
- 'Shift_R' ->
- {noreply, S};
- 'Caps_Lock' ->
- {noreply, S};
- _ ->
- io:format("~p: ignored: ~p~n", [?MODULE, KeySym]),
- {noreply, S}
- end;
-handle_info({gs, _Obj, configure, [], [W, H | _]}, S) ->
- gs:config(S#state.packer, [{width, W},{height, H}]),
- S2 = S#state{width = W, height = H},
- {noreply, S2};
-handle_info({'EXIT', Pid, Reason}, S) ->
- if
- Pid =:= S#state.parent_pid ->
- unlink(Pid),
- {stop, Reason, S};
- true ->
- {noreply, S}
- end;
-handle_info(Info, S) ->
- ok = error_logger:format("~p(~p): handle_info(~p, ~p)~n",
- [?MODULE, self(), Info, S]),
- {noreply, S}.
-
-%%----------------------------------------------------------------------
-%% Func: terminate/2
-%% Purpose: Shutdown the server
-%% Returns: any (ignored by gen_server)
-%%----------------------------------------------------------------------
-
-terminate(_Reason, _S) ->
- ignore.
-
-%%----------------------------------------------------------------------
-%% Func: code_change/3
-%% Purpose: Convert process state when code is changed
-%% Returns: {ok, NewState}
-%%----------------------------------------------------------------------
-
-code_change(_OldVsn, S, _Extra) ->
- {ok, S}.
-
-%%%----------------------------------------------------------------------
-%%% Handle graphics
-%%%----------------------------------------------------------------------
-
-create_window(S) ->
- H = S#state.height,
- W = S#state.width,
- Name = S#state.active_filter,
- Title = lists:concat([?MODULE, " (filter: ", Name, ")"]),
- WinOpt = [{title, Title}, {configure, true},
- {width, W}, {height, H}],
- GS = gs:start(),
- Win = gs:window(GS, WinOpt),
- Bar = gs:menubar(Win, []),
- create_file_menu(Bar),
- PackerOpt = [{packer_x, [{stretch, 1}]},
- {packer_y, [{stretch, 1}, {fixed, 25}]},
- {x, 0}, {y, 25}],
- Packer = gs:frame(Win, PackerOpt),
- EditorOpt = [{pack_xy, {1, 1}}, {vscroll, right}, {hscroll, bottom},
- {wrap, none},
- {bg, lightblue}, {font, {courier, 12}}],
- Editor = gs:editor(Packer, EditorOpt),
- FilteredEvent = config_editor(Editor, S),
- S2 = S#state{win = Win, packer = Packer, filtered_event = FilteredEvent},
- create_hide_menu(Bar, S2),
- create_search_menu(Bar, S2),
- create_filter_menu(Bar, S#state.filters),
- gs:config(Packer, [{width, W}, {height, H}]),
- gs:config(Win, [{map,true}, {keypress, true}]),
- S2.
-
-create_file_menu(Bar) ->
- Button = gs:menubutton(Bar, [{label, {text, "File"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(close, Menu, [{label, {text,"Close (c)"}}]),
- gs:menuitem(save, Menu, [{label, {text,"Save"}}]).
-
-create_filter_menu(Bar, Filters) ->
- Button = gs:menubutton(Bar, [{label, {text, "Filters"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(Menu, [{label, {text, "Select Filter"}}, {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- Item = fun(F, N) when F#filter.name =:= ?DEFAULT_FILTER_NAME->
- Label = lists:concat([pad_string(F#filter.name, 20), "(0)"]),
- gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]),
- N + 1;
- (F, N) ->
- Name = F#filter.name,
- Label = lists:concat([pad_string(Name, 20), "(", N, ")"]),
- gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]),
- N + 1
- end,
- Filters2 = lists:keysort(#filter.name, Filters),
- lists:foldl(Item, 1, Filters2),
- Menu.
-
-create_hide_menu(Bar, S) ->
- Button = gs:menubutton(Bar, [{label, {text, "Hide"}}]),
- Menu = gs:menu(Button, []),
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- if
- S#state.viewer_pid =:= undefined ->
- ignore;
- From =:= To ->
- gs:menuitem(Menu, [{label, {text, "Hide actor in Viewer "}}, {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem({hide, [From]}, Menu, [{label, {text,"From=To (f|t|b)"}}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "Show actor in Viewer "}}, {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem({show, [From]}, Menu, [{label, {text,"From=To (F|T|B)"}}]);
- true ->
- gs:menuitem(Menu, [{label, {text, "Hide actor in Viewer "}}, {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem({hide, [From]}, Menu, [{label, {text,"From (f)"}}]),
- gs:menuitem({hide, [To]}, Menu, [{label, {text,"To (t)"}}]),
- gs:menuitem({hide, [From, To]}, Menu, [{label, {text,"Both (b)"}}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "Show actor in Viewer "}}, {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem({show, [From]}, Menu, [{label, {text,"From (F)"}}]),
- gs:menuitem({show, [To]}, Menu, [{label, {text,"To (T)"}}]),
- gs:menuitem({show, [From, To]}, Menu, [{label, {text,"Both (B)"}}])
- end.
-
-create_search_menu(Bar, S) ->
- Button = gs:menubutton(Bar, [{label, {text, "Search"}}]),
- Menu = gs:menu(Button, []),
- E = S#state.filtered_event,
- From = E#event.from,
- To = E#event.to,
- gs:menuitem(Menu, [{label, {text, "Search in Viewer "}},
- {bg, lightblue}, {enable, false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- if
- S#state.viewer_pid =:= undefined ->
- S;
- From =:= To ->
- Key = et_collector:make_key(S#state.event_order, E),
- ModeS = {search_actors, forward, Key, [From]},
- ModeR = {search_actors, reverse, Key, [From]},
- gs:menuitem({mode, ModeS}, Menu, [{label, {text,"Forward from this event (s)"}}]),
- gs:menuitem({mode, ModeR}, Menu, [{label, {text,"Reverse from this event (r)"}}]);
- true ->
- Key = et_collector:make_key(S#state.event_order, E),
- ModeS = {search_actors, forward, Key, [From, To]},
- ModeR = {search_actors, reverse, Key, [From, To]},
- gs:menuitem({mode, ModeS}, Menu, [{label, {text,"Forward from this event (s)"}}]),
- gs:menuitem({mode, ModeR}, Menu, [{label, {text,"Reverse from this event (r)"}}])
- end,
- gs:menuitem({mode, all}, Menu, [{label, {text,"Abort search. Display all (a)"}}]).
-
-config_editor(Editor, S) ->
- Event = S#state.event,
- Name = S#state.active_filter,
- {value, F} = lists:keysearch(Name, #filter.name, S#state.filters),
- FilterFun = F#filter.function,
- case catch FilterFun(Event) of
- true ->
- do_config_editor(Editor, Event, lightblue, S#state.event_order);
- {true, Event2} when is_record(Event2, event) ->
- do_config_editor(Editor, Event2, lightblue, S#state.event_order);
- false ->
- do_config_editor(Editor, Event, red, S#state.event_order);
- Bad ->
- Contents = {bad_filter, Name, Bad},
- BadEvent = Event#event{contents = Contents},
- do_config_editor(Editor, BadEvent, red, S#state.event_order)
- end.
-
-do_config_editor(Editor, Event, Colour, TsKey) ->
- String = event_to_string(Event, TsKey),
- gs:config(Editor, {insert, {'end', String}}),
- gs:config(Editor, {enable, false}),
- gs:config(Editor, {bg, Colour}),
- Event.
-
-%%%----------------------------------------------------------------------
-%%% String handling
-%%%----------------------------------------------------------------------
-
-term_to_string(Term) ->
- case catch io_lib:format("~s", [Term]) of
- {'EXIT', _} -> io_lib:format("~p", [Term]);
- GoodString -> GoodString
- end.
-
-now_to_string({Mega, Sec, Micro} = Now)
- when is_integer(Mega), is_integer(Sec), is_integer(Micro) ->
- {{Y, Mo, D}, {H, Mi, S}} = calendar:now_to_universal_time(Now),
- lists:concat([Y, "-", Mo, "-", D, " ", H, ".", Mi, ".", S, ".", Micro]);
-now_to_string(Other) ->
- term_to_string(Other).
-
-event_to_string(Event, TsKey) ->
- ReportedTs = Event#event.trace_ts,
- ParsedTs = Event#event.event_ts,
- Deep =
- ["DETAIL LEVEL: ", term_to_string(Event#event.detail_level),
- "\nLABEL: ", term_to_string(Event#event.label),
- case Event#event.from =:= Event#event.to of
- true ->
- ["\nACTOR: ", term_to_string(Event#event.from)];
- false ->
- ["\nFROM: ", term_to_string(Event#event.from),
- "\nTO: ", term_to_string(Event#event.to)]
- end,
- case ReportedTs =:= ParsedTs of
- true ->
- ["\nPARSED: ", now_to_string(ParsedTs)];
- false ->
- case TsKey of
- trace_ts ->
- ["\nTRACE_TS: ", now_to_string(ReportedTs),
- "\nEVENT_TS: ", now_to_string(ParsedTs)];
- event_ts ->
- ["\nEVENT_TS: ", now_to_string(ParsedTs),
- "\nTRACE_TS: ", now_to_string(ReportedTs)]
- end
- end,
- "\nCONTENTS:\n\n", term_to_string(Event#event.contents)],
- lists:flatten(Deep).
-
-pad_string(Atom, MinLen) when is_atom(Atom) ->
- pad_string(atom_to_list(Atom), MinLen);
-pad_string(String, MinLen) when is_integer(MinLen), MinLen >= 0 ->
- Len = length(String),
- case Len >= MinLen of
- true ->
- String;
- false ->
- String ++ lists:duplicate(MinLen - Len, $ )
- end.
-
-send_viewer_event(S, Event) ->
- case S#state.viewer_pid of
- ViewerPid when is_pid(ViewerPid) ->
- ViewerPid ! {et, Event};
- undefined ->
- ignore
- end.
diff --git a/lib/et/src/et_gs_viewer.erl b/lib/et/src/et_gs_viewer.erl
deleted file mode 100644
index ce8634d09f..0000000000
--- a/lib/et/src/et_gs_viewer.erl
+++ /dev/null
@@ -1,1498 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%% Purpose: Displays a sequence chart for trace events (messages/actions)
-%%----------------------------------------------------------------------
-
--module(et_gs_viewer).
--compile([{nowarn_deprecated_function,{gs,canvas,2}},
- {nowarn_deprecated_function,{gs,checkbutton,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,line,2}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menu,3}},
- {nowarn_deprecated_function,{gs,menubar,2}},
- {nowarn_deprecated_function,{gs,menubutton,2}},
- {nowarn_deprecated_function,{gs,menubutton,3}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,menuitem,3}},
- {nowarn_deprecated_function,{gs,scale,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,text,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
--behaviour(gen_server).
-
-%% External exports
--export([start_link/1]).
-
-%% gen_server callbacks
--export([init/1, terminate/2, code_change/3,
- handle_call/3, handle_cast/2, handle_info/2]).
-
--include("../include/et.hrl").
--include("et_internal.hrl").
-
--define(unknown, "UNKNOWN").
-
--record(state,
- {parent_pid, % Pid of parent process
- collector_pid, % Pid of collector process
- event_order, % Field to be used as primary key
- trace_pattern, % Collector trace pattern
- active_filter, % Name of the active filter
- filters, % List of possible filters
- selected_actor, % Actor selected by user
- first_event, % Key of first event (regardless of visibility)
- last_event, % Key of last event (regardless of visibility)
- max_events, % Maximum number of shown events
- events, % Queue containg all event keys (regardless of visibility)
- max_actors, % Maximum number of shown actors
- actors, % List of known actors
- refresh_needed, % Refresh is needed in order to show all actors
- display_mode, % Display all or only matching actors
- detail_level, % Show only events with lesser detail level
- hide_actions, % Hide/show events where to == from actor (bool)
- hide_unknown, % Hide/show events with unknown actor (bool)
- is_suspended, % Suspend viewer updates (bool)
- title, % GUI: Window title
- win, % GUI: Window object
- menubar, % GUI: Menu bar object
- packer, % GUI: Packer object
- width, % GUI: Window width
- height, % GUI: Window height
- scale, % GUI: Scaling factor on canvas
- font, % GUI: Font to be used on text labels
- canvas_width, % GUI: Canvas width
- canvas_height, % GUI: Canvas height
- canvas, % GUI: Canvas object
- y_pos}). % GUI: Current y position on canvas
-
--record(actor, {name, string}).
-
--define(initial_x, 10).
--define(incr_x, 60).
--define(initial_y, 15).
--define(incr_y, 15).
-
-%%%----------------------------------------------------------------------
-%%% Client side
-%%%----------------------------------------------------------------------
-
-start_link(Options) ->
- case parse_opt(Options, default_state(), []) of
- {ok, S, CollectorOpt} ->
- case S#state.collector_pid of
- CollectorPid when is_pid(CollectorPid) ->
- case gen_server:start_link(?MODULE, [S], []) of
- {ok, Pid} when S#state.parent_pid =/= self() ->
- unlink(Pid),
- {ok, Pid};
- Other ->
- Other
- end;
- undefined ->
- case et_collector:start_link(CollectorOpt) of
- {ok, CollectorPid} ->
- S2 = S#state{collector_pid = CollectorPid},
- case gen_server:start_link(?MODULE, [S2], []) of
- {ok, Pid} when S#state.parent_pid =/= self() ->
- unlink(Pid),
- {ok, Pid};
- Other ->
- Other
- end;
- {error, Reason} ->
- {error, {et_collector, Reason}}
- end
- end;
- {error, Reason} ->
- {error, Reason}
- end.
-
-default_state() ->
- #state{parent_pid = self(),
- collector_pid = undefined,
- detail_level = ?detail_level_max,
- active_filter = ?DEFAULT_FILTER_NAME,
- filters = [?DEFAULT_FILTER],
- event_order = trace_ts,
- is_suspended = false,
- max_events = 100,
- first_event = first,
- last_event = first,
- events = queue_new(),
- max_actors = 5,
- actors = [create_actor(?unknown)],
- selected_actor = ?unknown,
- hide_actions = false,
- hide_unknown = false,
- refresh_needed = false,
- display_mode = all,
- scale = 2,
- canvas_height = 0,
- canvas_width = 0,
- width = 800,
- height = 600}.
-
-parse_opt([], S, CollectorOpt) ->
- {ok, S, [{parent_pid, S#state.parent_pid} | CollectorOpt]};
-parse_opt([H | T], S, CollectorOpt) ->
- case H of
- {parent_pid, Parent} when Parent =:= undefined ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{parent_pid = Parent}, CollectorOpt2);
- {parent_pid, Parent} when is_pid(Parent) ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{parent_pid = Parent}, CollectorOpt2);
- {title, Title} ->
- parse_opt(T, S#state{title = name_to_string(Title)}, CollectorOpt);
- {detail_level, Level} when is_integer(Level),
- Level >= ?detail_level_min,
- Level =< ?detail_level_max ->
- parse_opt(T, S#state{detail_level = Level}, CollectorOpt);
- {detail_level, max} ->
- parse_opt(T, S#state{detail_level = ?detail_level_max}, CollectorOpt);
- {detail_level, min} ->
- parse_opt(T, S#state{detail_level = ?detail_level_min}, CollectorOpt);
- {is_suspended, true} ->
- parse_opt(T, S#state{is_suspended = true}, CollectorOpt);
- {is_suspended, false} ->
- parse_opt(T, S#state{is_suspended = false}, CollectorOpt);
- {scale, Scale} when is_integer(Scale), Scale > 0 ->
- parse_opt(T, S#state{scale = Scale}, CollectorOpt);
- {width, W} when is_integer(W), W > 0 ->
- parse_opt(T, S#state{width = W, canvas_width = W}, CollectorOpt);
- {height, WH} when is_integer(WH), WH > 0 ->
- parse_opt(T, S#state{height = WH, canvas_height = WH}, CollectorOpt);
- {collector_pid, Pid} when is_pid(Pid) ->
- parse_opt(T, S#state{collector_pid = Pid}, CollectorOpt);
- {collector_pid, undefined} ->
- parse_opt(T, S#state{collector_pid = undefined}, CollectorOpt);
- {active_filter, Name} when is_atom(Name) ->
- parse_opt(T, S#state{active_filter = Name}, CollectorOpt);
- {event_order, trace_ts} -> %% BUGBUG: Verify event_order with collector
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{event_order = trace_ts}, CollectorOpt2);
- {event_order, event_ts} -> %% BUGBUG: Verify event_order with collector
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{event_order = event_ts}, CollectorOpt2);
- {trace_port, _Port} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {trace_max_queue, _Queue} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {trace_pattern, _Pattern} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {trace_global, _Boolean} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {trace_client, _Client} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {dict_insert, {filter, Name}, Fun} ->
- if
- is_atom(Name), is_function(Fun) ->
- F = #filter{name = Name, function = Fun},
- Filters = lists:keydelete(Name, #filter.name, S#state.filters),
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{filters = Filters ++ [F]}, CollectorOpt2);
- true ->
- {error, {bad_option, H}}
- end;
- {dict_insert, {subscriber, Pid}, _Val} ->
- if
- is_pid(Pid) ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- true ->
- {error, {bad_option, H}}
- end;
- {dict_insert, _Key, _Val} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {dict_delete, {filter, Name}} ->
- Filters = lists:keydelete(Name, #filter.name, S#state.filters),
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S#state{filters = Filters}, CollectorOpt2);
- {dict_delete, _Key} ->
- CollectorOpt2 = [H | CollectorOpt],
- parse_opt(T, S, CollectorOpt2);
- {max_events, Max} when is_integer(Max), Max > 0->
- parse_opt(T, S#state{max_events = Max}, CollectorOpt);
- {max_events, Max} when Max =:= infinity ->
- parse_opt(T, S#state{max_events = Max}, CollectorOpt);
- {max_actors, Max} when is_integer(Max), Max >= 0->
- parse_opt(T, S#state{max_actors = Max}, CollectorOpt);
- {max_actors, Max} when Max =:= infinity ->
- parse_opt(T, S#state{max_actors = Max}, CollectorOpt);
- {actors, ActorNames} when is_list(ActorNames) ->
- ActorNames2 =
- case lists:member(?unknown, ActorNames) of
- false -> [?unknown | ActorNames];
- true -> ActorNames
- end,
- Actors = [create_actor(Name) || Name <- ActorNames2],
- parse_opt(T, S#state{actors = Actors}, CollectorOpt);
- {first_event, First} ->
- parse_opt(T, S#state{first_event = First}, CollectorOpt);
- {hide_unknown, Bool} when Bool =:= false ->
- parse_opt(T, S#state{hide_unknown = Bool}, CollectorOpt);
- {hide_unknown, Bool} when Bool =:= true ->
- parse_opt(T, S#state{hide_unknown = Bool}, CollectorOpt);
- {hide_actions, Bool} when Bool =:= false ->
- parse_opt(T, S#state{hide_actions = Bool}, CollectorOpt);
- {hide_actions, Bool} when Bool =:= true ->
- parse_opt(T, S#state{hide_actions = Bool}, CollectorOpt);
- {display_mode, Mode = all} ->
- parse_opt(T, S#state{display_mode = Mode}, CollectorOpt);
- {display_mode, Mode = {search_actors, Dir, _Key, Actors}} when is_list(Actors), Dir =:= forward ->
- parse_opt(T, S#state{display_mode = Mode}, CollectorOpt);
- {display_mode, Mode = {search_actors, Dir, _Key, Actors}} when is_list(Actors), Dir =:= reverse ->
- parse_opt(T, S#state{display_mode = Mode}, CollectorOpt);
-
- Bad ->
- {error, {bad_option, Bad}}
- end;
-parse_opt(BadList, _S, _CollectorOpt) ->
- {error, {bad_option_list, BadList}}.
-
-do_dict_insert({filter, Name}, Fun, S) when is_atom(Name), is_function(Fun) ->
- F = #filter{name = Name, function = Fun},
- Filters = lists:keydelete(Name, #filter.name, S#state.filters),
- Filters2 = lists:keysort(#filter.name, [F | Filters]),
- gs:destroy(filter_menu),
- create_filter_menu(S#state.active_filter, Filters2),
- S#state{filters = Filters2};
-do_dict_insert(_Key, _Val, S) ->
- %% ok = error_logger:format("~p(~p): handle_info({et, {dict_insert, ~p, ~p}})~n",
- %% [?MODULE, self(), Key, Val]),
- S.
-
-do_dict_delete({filter, Name}, S) when is_atom(Name), Name =/= S#state.active_filter ->
- Filters = lists:keydelete(Name, #filter.name, S#state.filters),
- gs:destroy(filter_menu),
- create_filter_menu(S#state.active_filter, Filters),
- S#state{filters = Filters};
-do_dict_delete(_Key, S) ->
- %% ok = error_logger:format("~p(~p): handle_info({et, {dict_delete, ~p}})~n",
- %% [?MODULE, self(), Key]),
- S.
-
-%%%----------------------------------------------------------------------
-%%% Callback functions from gen_server
-%%%----------------------------------------------------------------------
-
-%%----------------------------------------------------------------------
-%% Func: init/1
-%% Returns: {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%%----------------------------------------------------------------------
-
-init([S]) when is_record(S, state) ->
- process_flag(trap_exit, true),
- InitialTimeout = 0,
- case S#state.parent_pid of
- undefined ->
- ignore;
- Pid when is_pid(Pid) ->
- link(Pid)
- end,
- et_collector:dict_insert(S#state.collector_pid,
- {subscriber, self()},
- ?MODULE),
- {ok, create_main_window(S), InitialTimeout}.
-
-%%----------------------------------------------------------------------
-%% Func: handle_call/3
-%% Returns: {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} | (terminate/2 is called)
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_call(get_collector_pid, _From, S) ->
- Reply = S#state.collector_pid,
- reply(Reply, S);
-handle_call(stop, _From, S) ->
- gs:destroy(S#state.win),
- {stop, shutdown, ok, S};
-handle_call(Request, From, S) ->
- ok = error_logger:format("~p(~p): handle_call(~p, ~p, ~p)~n",
- [?MODULE, self(), Request, From, S]),
- Reply = {error, {bad_request, Request}},
- reply(Reply, S).
-
-%%----------------------------------------------------------------------
-%% Func: handle_cast/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_cast(Msg, S) ->
- ok = error_logger:format("~p(~p): handle_cast(~p, ~p)~n",
- [?MODULE, self(), Msg, S]),
- noreply(S).
-
-%%----------------------------------------------------------------------
-%% Func: handle_info/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%----------------------------------------------------------------------
-
-handle_info({et, {more_events, _Size}}, S) ->
- noreply(S);
-handle_info({et, {insert_actors, ActorNames}}, S) when is_list(ActorNames) ->
- Fun = fun(N, Actors) ->
- case lists:keymember(N, #actor.name, Actors) of
- true -> Actors;
- false -> Actors ++ [create_actor(N)]
- end
- end,
- Actors = lists:foldl(Fun, S#state.actors, ActorNames),
- S2 = refresh_main_window(S#state{actors = Actors}),
- noreply(S2);
-handle_info({et, {delete_actors, ActorNames}}, S) when is_list(ActorNames)->
- Fun = fun(N, Actors) when N =:= ?unknown ->
- Actors;
- (N, Actors) ->
- lists:keydelete(N, #actor.name, Actors)
- end,
- New = lists:foldl(Fun, S#state.actors, ActorNames),
- S2 = refresh_main_window(S#state{actors = New}),
- noreply(S2);
-handle_info({et, {dict_insert, Key, Val}}, S) ->
- S2 = do_dict_insert(Key, Val, S),
- noreply(S2);
-handle_info({et, {dict_delete, Key}}, S) ->
- S2 = do_dict_delete(Key, S),
- noreply(S2);
-handle_info({et, first}, S) ->
- S2 = scroll_first(S),
- noreply(S2);
-handle_info({et, prev}, S) ->
- S2 = scroll_prev(S),
- noreply(S2);
-handle_info({et, next}, S) ->
- S2 = scroll_next(S),
- noreply(S2);
-handle_info({et, last}, S) ->
- S2 = scroll_last(S),
- noreply(S2);
-handle_info({et, refresh}, S) ->
- S2 = refresh_main_window(S),
- noreply(S2);
-handle_info({et, {display_mode, Mode}}, S) ->
- S2 = change_display_mode(Mode, S),
- noreply(S2);
-handle_info({et, close}, S) ->
- gs:destroy(S#state.win),
- {stop, shutdown, S};
-handle_info({gs, Button, click, Data, Other} = Click, S) ->
- CollectorPid = S#state.collector_pid,
- case Button of
- close ->
- gs:destroy(S#state.win),
- {stop, shutdown, S};
- suspended ->
- case Other of
- [_Text, _Group, Bool | _] when Bool =:= true ->
- S2 = do_suspend(S),
- noreply(S2);
- [_Text, _Group, Bool | _] when Bool =:= false ->
- S2 = do_resume(S),
- noreply(S2);
- _ ->
- click_error(Click, S),
- noreply(S)
- end;
- hide_actions ->
- case Other of
- [_Text, _Group, Bool | _] when Bool =:= true ->
- S2 = refresh_main_window(S#state{hide_actions = Bool}),
- noreply(S2);
- [_Text, _Group, Bool | _] when Bool =:= false ->
- S2 = refresh_main_window(S#state{hide_actions = Bool}),
- noreply(S2);
- _ ->
- click_error(Click, S),
- noreply(S)
- end;
- hide_unknown ->
- case Other of
- [_Text, _Group, Bool | _] when Bool =:= true ->
- S2 = refresh_main_window(S#state{hide_unknown = Bool}),
- noreply(S2);
- [_Text, _Group, Bool | _] when Bool =:= false ->
- S2 = refresh_main_window(S#state{hide_unknown = Bool}),
- noreply(S2);
- _ ->
- click_error(Click, S),
- noreply(S)
- end;
- up ->
- S2 = scroll_up(S),
- noreply(S2);
- down ->
- S2 = scroll_down(S),
- noreply(S2);
- first ->
- S2 = scroll_first(S),
- noreply(S2);
- prev ->
- S2 = scroll_prev(S),
- noreply(S2);
- next ->
- S2 = scroll_next(S),
- noreply(S2);
- last ->
- S2 = scroll_last(S),
- noreply(S2);
- refresh ->
- S2 = refresh_main_window(S),
- noreply(S2);
- {display_mode, Mode} ->
- S2 = change_display_mode(Mode, S),
- noreply(S2);
- close_all ->
- close_all(S);
- close_all_others ->
- close_all_others(S);
- first_all ->
- et_collector:multicast(CollectorPid, first),
- noreply(S);
- prev_all ->
- et_collector:multicast(CollectorPid, prev),
- noreply(S);
- next_all ->
- et_collector:multicast(CollectorPid, next),
- noreply(S);
- last_all ->
- et_collector:multicast(CollectorPid, last),
- noreply(S);
- refresh_all ->
- et_collector:multicast(CollectorPid, refresh),
- noreply(S);
- clear_all ->
- et_collector:clear_table(CollectorPid),
- et_collector:multicast(CollectorPid, refresh),
- noreply(S);
- load_all ->
- et_collector:start_trace_client(CollectorPid, event_file, "et_viewer.log"),
- noreply(S);
- save_all ->
- et_collector:save_event_file(CollectorPid,
- "et_viewer.log",
- [existing, write, keep]),
- noreply(S);
- {open_viewer, Scale} ->
- Actors = [A#actor.name || A <- S#state.actors],
- open_viewer(Scale, S#state.active_filter, Actors, S),
- noreply(S);
- _Level when Data =:= detail_level, is_integer(hd(Other)),
- hd(Other) >= ?detail_level_min,
- hd(Other) =< ?detail_level_max ->
- S2 = S#state{detail_level = hd(Other)},
- noreply(S2);
- _PopupMenuItem when is_record(Data, filter) ->
- open_viewer(S#state.scale, Data#filter.name, [?unknown], S),
- noreply(S);
- _ ->
- click_error(Click, S),
- noreply(S)
- end;
-handle_info({gs, _Obj, destroy,_, _}, S) ->
- gs:destroy(S#state.win),
- {stop, shutdown, S};
-handle_info({gs, _Obj, buttonpress, _, [_Button, X, Y | _]}, S) ->
- S3 =
- case y_to_n(Y, S) of
- actor ->
- %% Actor click
- case S#state.actors of
- [] ->
- S;
- _ ->
- N = x_to_n(X, S),
- A = lists:nth(N, S#state.actors),
- S#state{selected_actor = A}
- end;
- {event, N} ->
- %% Event click
- List = queue_to_list(S#state.events),
- S2 = S#state{events = list_to_queue(List)},
-
- Key = lists:nth(N, List),
- Pid = S#state.collector_pid,
- Fun = fun create_contents_window/2,
- case et_collector:iterate(Pid, Key, -1) of
- Prev when Prev =:= Key ->
- et_collector:iterate(Pid, first, 1, Fun, S2);
- Prev ->
- et_collector:iterate(Pid, Prev, 1, Fun, S2)
- end
- end,
- noreply(S3);
-handle_info({gs, _Obj, buttonrelease, _, [_Button, X, Y | _]}, S) ->
- S2 =
- case y_to_n(Y, S) of
- actor ->
- %% Actor click
- case S#state.actors of
- [] ->
- S;
- Actors ->
- N = x_to_n(X, S),
- New = lists:nth(N, S#state.actors),
- Old = S#state.selected_actor,
- case New#actor.name =:= Old#actor.name of
- true ->
- A = S#state.selected_actor,
- toggle_search_for_actor(A#actor.name, S);
- false ->
- move_actor(Old, New, Actors, S)
- end
- end;
- {event, _N} ->
- %% Event click ignored
- S
- end,
- noreply(S2);
-handle_info({gs, _Obj, keypress, _, [KeySym, _Keycode, _Shift, _Control | _]} = Key, S) ->
- case KeySym of
- 'c' ->
- close_all_others(S);
- 'C' ->
- close_all(S);
- 'Up' ->
- S2 = scroll_up(S),
- noreply(S2);
- 'Down' ->
- S2 = scroll_down(S),
- noreply(S2);
- 'f' ->
- S2 = scroll_first(S),
- noreply(S2);
- 'p' ->
- S2 = scroll_prev(S),
- noreply(S2);
- 'Prior' ->
- S2 = scroll_prev(S),
- noreply(S2);
- 'n' ->
- S2 = scroll_next(S),
- noreply(S2);
- 'Next' ->
- S2 = scroll_next(S),
- noreply(S2);
- 'l' ->
- S2 = scroll_last(S),
- noreply(S2);
- 'r' ->
- S2 = refresh_main_window(S),
- noreply(S2);
- 'F' ->
- et_collector:multicast(S#state.collector_pid, first),
- noreply(S);
- 'P' ->
- et_collector:multicast(S#state.collector_pid, prev),
- noreply(S);
- 'N' ->
- et_collector:multicast(S#state.collector_pid, next),
- noreply(S);
- 'L' ->
- et_collector:multicast(S#state.collector_pid, last),
- noreply(S);
- 'R' ->
- et_collector:multicast(S#state.collector_pid, refresh),
- noreply(S);
-
- 'a' ->
- S2 = S#state{display_mode = all},
- S3 = refresh_main_window(S2),
- noreply(S3);
-
- 'equal' ->
- Scale = S#state.scale,
- Actors = [A#actor.name || A <- S#state.actors],
- open_viewer(Scale, S#state.active_filter, Actors, S),
- noreply(S);
- 'plus' ->
- Scale = S#state.scale + 1,
- Actors = [A#actor.name || A <- S#state.actors],
- open_viewer(Scale, S#state.active_filter, Actors, S),
- noreply(S);
- 'minus' ->
- case S#state.scale of
- 1 ->
- gs:config(S#state.canvas, beep);
- Scale ->
- Actors = [A#actor.name || A <- S#state.actors],
- open_viewer(Scale - 1, S#state.active_filter, Actors, S)
- end,
- noreply(S);
- 0 ->
- case lists:keysearch(?DEFAULT_FILTER_NAME, #filter.name, S#state.filters) of
- {value, F} when is_record(F, filter) ->
- open_viewer(S#state.scale, F#filter.name, [?unknown], S);
- false ->
- gs:config(S#state.canvas, beep)
- end,
- noreply(S);
- Int when is_integer(Int), Int > 0, Int =< 9 ->
- case catch lists:nth(Int, S#state.filters) of
- F when is_record(F, filter) ->
- open_viewer(S#state.scale, F#filter.name, [?unknown], S);
- {'EXIT', _} ->
- gs:config(S#state.canvas, beep)
- end,
- noreply(S);
-
- 'Shift_L' ->
- noreply(S);
- 'Shift_R' ->
- noreply(S);
- 'Caps_Lock' ->
- noreply(S);
-
- _ ->
- click_error(Key, S),
- noreply(S)
- end;
-handle_info({gs, _Obj,configure, [], [W, H | _]}, S) ->
- gs:config(S#state.packer, [{width, W}, {height, H}]),
- S2 = S#state{width = W, height = H},
- noreply(S2);
-handle_info(timeout, S) ->
- Try =
- case S#state.display_mode of
- {search_actors, reverse, _, _} ->
- -10;
- _ ->
- 10
- end,
- if
- S#state.is_suspended =:= true ->
- {noreply, S, infinity};
- S#state.max_events =:= infinity ->
- display_more_events(Try, S);
- true ->
- Needed = S#state.max_events - queue_length(S#state.events),
- if
- Needed =< 0 -> {noreply, S, infinity};
- Needed > 10 -> display_more_events(Try, S);
- Needed =< 10 -> display_more_events(Needed, S)
- end
- end;
-
-handle_info({'EXIT', Pid, Reason}, S) ->
- if
- Pid =:= S#state.collector_pid ->
- unlink(Pid),
- gs:destroy(S#state.win),
- {stop, Reason, S};
- Pid =:= S#state.parent_pid ->
- unlink(Pid),
- gs:destroy(S#state.win),
- {stop, Reason, S};
- true ->
- noreply(S)
- end;
-handle_info(Info, S) ->
- ok = error_logger:format("~p(~p): handle_info(~p, ~p)~n",
- [?MODULE, self(), Info, S]),
- noreply(S).
-
-%%----------------------------------------------------------------------
-%% Func: terminate/2
-%% Purpose: Shutdown the server
-%% Returns: any (ignored by gen_server)
-%%----------------------------------------------------------------------
-
-terminate(_Reason, _S) ->
- ignore.
-
-%%----------------------------------------------------------------------
-%% Func: code_change/3
-%% Purpose: Convert process state when code is changed
-%% Returns: {ok, NewState}
-%%----------------------------------------------------------------------
-
-code_change(_OldVsn, S, _Extra) ->
- {ok, S}.
-
-%%%----------------------------------------------------------------------
-%%% Handle suspend/resume
-%%%----------------------------------------------------------------------
-
-reply(Reply, S) ->
- case queue_length(S#state.events) of
- _ when S#state.is_suspended =:= true ->
- {reply, Reply, S, infinity};
- _ when S#state.max_events =:= infinity ->
- {reply, Reply, S, 500};
- N when N >= S#state.max_events ->
- {reply, Reply, S, infinity};
- _ ->
- {reply, Reply, S, 0}
- end.
-
-noreply(S) ->
- case queue_length(S#state.events) of
- _ when S#state.is_suspended =:= true ->
- {noreply, S, infinity};
- _ when S#state.max_events =:= infinity ->
- {noreply, S, 500};
- N when N >= S#state.max_events ->
- {noreply, S, infinity};
- _ ->
- {noreply, S, 0}
- end.
-
-do_suspend(S) ->
- config_suspend(S#state{is_suspended = true}).
-
-do_resume(S) ->
- config_suspend(S#state{is_suspended = false}).
-
-config_suspend(S) ->
- Suspended = S#state.is_suspended,
- gs:config(refresh, [{enable, not Suspended}]),
- gs:config(refresh_all, [{enable, not Suspended}]),
- gs:config(clear_all, [{enable, not Suspended}]),
- S.
-
-refresh_main_window(S) ->
- Pid = S#state.collector_pid,
- Key = S#state.first_event,
- case et_collector:iterate(Pid, Key, -1) of
- Prev when Prev =:= Key ->
- scroll_first(S);
- _Prev ->
- S2 = S#state{last_event = S#state.first_event},
- clear_canvas(S2)
- end.
-
-scroll_first(S) ->
- S2 = S#state{first_event = first, last_event = first},
- clear_canvas(S2).
-
-scroll_prev(S) ->
- Try =
- case S#state.max_events of
- infinity -> -10;
- Max -> -Max
- end,
- Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, Try),
- S2 = S#state{first_event = Key, last_event = Key},
- clear_canvas(S2).
-
-scroll_next(S) ->
- S2 = S#state{first_event = S#state.last_event},
- clear_canvas(S2).
-
-scroll_up(S) ->
- Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, -5),
- S2 = S#state{first_event = Key, last_event = Key},
- clear_canvas(S2).
-
-scroll_down(S) ->
- Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, 5),
- S2 = S#state{first_event = Key, last_event = Key},
- clear_canvas(S2).
-
-scroll_last(S) ->
- S2 = S#state{first_event = last, last_event = last},
- clear_canvas(S2).
-
-change_display_mode(Mode, S) ->
- case Mode of
- all ->
- S2 = S#state{display_mode = Mode},
- refresh_main_window(S2);
- {search_actors, _Dir, _Key, []} ->
- S2 = S#state{display_mode = all},
- refresh_main_window(S2);
- {search_actors, _Dir, Key, Actors} when is_list(Actors) ->
- Pid = S#state.collector_pid,
- Prev = et_collector:iterate(Pid, Key, -1),
- S2 = S#state{first_event = Prev,
- last_event = Prev,
- display_mode = Mode},
- clear_canvas(S2)
- end.
-
-close_all(S) ->
- et_collector:multicast(S#state.collector_pid, close),
- timer:sleep(timer:seconds(1)),
- spawn(et_collector, stop, [S#state.collector_pid]),
- gs:destroy(S#state.win),
- {stop, shutdown, S}.
-
-close_all_others(S) ->
- Fun =
- fun({{subscriber, Pid}, _}) ->
- if
- Pid =:= self() ->
- ignore;
- true ->
- unlink(Pid),
- Pid ! {et, close}
- end
- end,
- All = et_collector:dict_match(S#state.collector_pid,
- {{subscriber, '_'}, '_'}),
- lists:foreach(Fun, All),
- noreply(S).
-
-click_error(Click, S) ->
- gs:config(S#state.canvas, beep),
- io:format("~p: ignored: ~p~n", [?MODULE, Click]).
-
-%%%----------------------------------------------------------------------
-%%% Clone viewer
-%%%----------------------------------------------------------------------
-
-open_viewer(Scale, FilterName, Actors, S) ->
- Filters = [{dict_insert, {filter, F#filter.name}, F#filter.function}
- || F <- S#state.filters],
- Options =
- [{parent_pid, S#state.parent_pid},
- {title, S#state.title},
- {collector_pid, S#state.collector_pid},
- {is_suspended, S#state.is_suspended},
- {detail_level, S#state.detail_level},
- {active_filter, FilterName},
- {event_order, S#state.event_order},
- {first_event, S#state.first_event},
- {max_events, S#state.max_events},
- {max_actors, S#state.max_actors},
- {hide_actions, S#state.hide_actions},
- {hide_unknown, S#state.hide_unknown},
- {is_suspended, S#state.is_suspended},
- {actors, Actors},
- {scale, Scale},
- {width, S#state.width},
- {height, S#state.height} | Filters],
- case start_link(Options) of
- {ok, ViewerPid} ->
- unlink(ViewerPid),
- ok;
- {error, Reason} ->
- ok = error_logger:format("~p: Failed to start a new window: ~p~n",
- [?MODULE, Reason])
- end.
-
-%%%----------------------------------------------------------------------
-%%% Handle graphics
-%%%----------------------------------------------------------------------
-
-create_main_window(S) ->
- Font = select_font(S#state.scale),
- GS = gs:start(),
- Name = name_to_string(S#state.active_filter),
- Title = case S#state.title of
- undefined -> atom_to_list(?MODULE);
- Explicit -> name_to_string(Explicit)
- end,
- WinOpt = [{title, Title ++ " (filter: " ++ Name ++ ")"},
- {configure, true},
- {width, S#state.width},
- {height, S#state.height}],
- Win = gs:window(GS, WinOpt),
- Bar = gs:menubar(Win, []),
-
- create_file_menu(Bar),
- create_viewer_menu(Bar),
- create_collector_menu(Bar),
- gs:menubutton(filter_button, Bar, [{label, {text, "Filter"}}]),
- create_filter_menu(S#state.active_filter, S#state.filters),
- create_help_menu(Bar),
-
- config_suspend(S),
-
- PackerOpt = [{packer_x, [{fixed, 5}, {fixed, 40}, {fixed, 40},
- {stretch, 1}, {fixed, 5}]},
- {packer_y, [{fixed, 30}, {fixed, 30},
- {stretch, 1}, {fixed, 30}]},
- {x, 0}, {y, 30}],
- Packer = gs:frame(Win, PackerOpt),
- gs:checkbutton(suspended, Packer, [{label,{text,"Freeze"}},
- {x, 10}, {y, 0},
- {width, 120}, {align, w},
- {select, S#state.is_suspended}]),
- gs:checkbutton(hide_actions, Packer, [{label,{text,"Hide From=To"}},
- {x, 10}, {y, 20},
- {width, 120}, {align, w},
- {select, S#state.hide_actions}]),
- gs:checkbutton(hide_unknown, Packer, [{label,{text,"Hide Unknown"}},
- {x, 10}, {y, 40},
- {width, 120}, {align, w},
- {select, S#state.hide_unknown}]),
- gs:scale(Packer, [{text,"Detail Level"},
- {range, {?detail_level_min, ?detail_level_max}},
- {orient, horizontal},
- {x, 150}, {y, 0}, {height, 65}, {width, 200},
- {pos, S#state.detail_level}, {data, detail_level}]),
- CanvasW = calc_canvas_width(S),
- CanvasH = calc_canvas_height(S),
- CanOpt = [{pack_xy, {{2, 4}, 3}}, {vscroll, right}, {hscroll, bottom},
- {scrollregion, {2, 2, CanvasW, CanvasH}}],
- Canvas = gs:canvas(Packer, CanOpt),
- gs:config(Canvas, [{buttonpress, true}, {buttonrelease, true}]),
- gs:config(Packer, [{width, S#state.width}, {height, S#state.height}]),
- gs:config(Win, [{map, true}, {keypress, true}]),
- S2 = S#state{title = Title,
- win = Win, font = Font, packer = Packer,
- canvas_width = CanvasW, canvas_height = CanvasH,
- canvas = Canvas,
- y_pos = ?initial_y * S#state.scale},
- draw_all_actors(S2).
-
-select_font(Scale) when is_integer(Scale) ->
- case Scale of
- 1 -> {courier, 7};
- 2 -> {courier, 10};
- 3 -> {courier, 12};
- 4 -> {courier, 14};
- S -> {courier, S * 4}
- end.
-
-create_file_menu(Bar) ->
- Button = gs:menubutton(Bar, [{label, {text, "File"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(close_all, Menu, [{label, {text, "Close Collector and all Viewers (C) "}}]),
- gs:menuitem(close_all_others, Menu, [{label, {text, "Close other Viewers, but keep Collector (c)"}}]),
- gs:menuitem(close, Menu, [{label, {text, "Close this Viewer, but keep Collector"}}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
-
- gs:menuitem(clear_all, Menu, [{label, {text, "Clear Collector"}}]),
- gs:menuitem(load_all, Menu, [{label, {text, "Load Collector from the file \"et_viewer.log\""}}]),
- gs:menuitem(save_all, Menu, [{label, {text, "Save Collector to the file \"et_viewer.log\""}}]).
-
-create_viewer_menu(Bar) ->
- Button = gs:menubutton(Bar, [{label, {text, "Viewer"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(Menu, [{label, {text, "Scroll this Viewer"}}, {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(first, Menu, [{label, {text, "First (f)"}}]),
- gs:menuitem(prev, Menu, [{label, {text, "Prev (p)"}}]),
- gs:menuitem(next, Menu, [{label, {text, "Next (n)"}}]),
- gs:menuitem(last, Menu, [{label, {text, "Last (l)"}}]),
- gs:menuitem(refresh, Menu, [{label, {text, "Refresh (r)"}}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(up, Menu, [{label, {text, "Up 5 (Up)"}}]),
- gs:menuitem(down, Menu, [{label, {text, "Down 5 (Down)"}}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "Search in this Viewer"}}, {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem({mode, all}, Menu, [{label, {text, "Abort search. Display all (a)"}}]).
-
-create_collector_menu(Bar) ->
- Button = gs:menubutton(Bar, [{label, {text, "Collector"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(Menu, [{label, {text, "Scroll all Viewers"}}, {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(first_all, Menu, [{label, {text, "First (F)"}}]),
- gs:menuitem(prev_all, Menu, [{label, {text, "Prev (P)"}}]),
- gs:menuitem(next_all, Menu, [{label, {text, "Next (N)"}}]),
- gs:menuitem(last_all, Menu, [{label, {text, "Last (L)"}}]),
- gs:menuitem(refresh_all, Menu, [{label, {text, "Refresh (R)"}}]).
-
-create_filter_menu(ActiveFilterName, Filters) ->
- Menu = gs:menu(filter_menu, filter_button, []),
- Item = fun(F, N) when F#filter.name =:= collector ->
- Label = lists:concat([pad_string(F#filter.name, 20), "(0)"]),
- gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]),
- N + 1;
- (F, N) ->
- Label = lists:concat([pad_string(F#filter.name, 20), "(", N, ")"]),
- gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]),
- N + 1
- end,
- gs:menuitem(Menu, [{label, {text, "Same Filter New Scale"}}, {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- {value, Filter} = lists:keysearch(ActiveFilterName, #filter.name, Filters),
- Same = lists:concat([pad_string(ActiveFilterName, 20), "(=)"]),
- Larger = lists:concat([pad_string(ActiveFilterName, 20), "(+)"]),
- Smaller = lists:concat([pad_string(ActiveFilterName, 20), "(-)"]),
- gs:menuitem(Menu, [{label, {text, Same}}, {data, Filter}]),
- gs:menuitem(Menu, [{label, {text, Smaller}}, {data, Filter}]),
- gs:menuitem(Menu, [{label, {text, Larger}}, {data, Filter}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "New Filter Same Scale"}}, {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- lists:foldl(Item, 1, Filters).
-
-create_help_menu(Bar) ->
- Button = gs:menubutton(Bar, [{label, {text, "Help"}}]),
- Menu = gs:menu(Button, []),
- gs:menuitem(Menu, [{label, {text, "Display details of an event"}},
- {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{label, {text, " Single click on the name tag or the arrow (Mouse-1)"}},
- {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "Toggle actor search"}},
- {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{label, {text, " Single click on the name tag (Mouse-1)"}},
- {enable,false}]),
- gs:menuitem(Menu, [{itemtype, separator}]),
- gs:menuitem(Menu, [{label, {text, "Move actor"}},
- {bg, lightblue}, {enable,false}]),
- gs:menuitem(Menu, [{label, {text, " se drag and drop on name tag (Mouse-1)"}},
- {enable,false}]).
-
-clear_canvas(S) ->
- gs:destroy(S#state.canvas),
- CanvasW = calc_canvas_width(S),
- CanvasH = calc_canvas_height(S),
- CanOpt = [{pack_xy, {{2, 4}, 3}}, {vscroll, right}, {hscroll, bottom},
- {scrollregion, {2, 2, CanvasW, CanvasH}}],
- Canvas = gs:canvas(S#state.packer, CanOpt),
- gs:config(S#state.packer, [{width, S#state.width}, {height, S#state.height}]),
- gs:config(Canvas, [{buttonpress, true}, {buttonrelease, true}]),
- S2 = S#state{refresh_needed = false,
- y_pos = ?initial_y * S#state.scale,
- canvas = Canvas,
- canvas_width = CanvasW,
- canvas_height = CanvasH,
- events = queue_new()},
- draw_all_actors(S2).
-
-calc_canvas_width(S) ->
- Min = calc_min_actors(S),
- CanvasW = ((2 * ?initial_x) + (Min * ?incr_x)) * S#state.scale,
- lists:max([CanvasW, S#state.width - (15 * S#state.scale), S#state.canvas_width]).
-
-calc_canvas_height(S) ->
- Min = calc_min_events(S),
- CanvasH = ((2 * ?initial_y) + (Min * ?incr_y)) * S#state.scale,
- lists:max([CanvasH, S#state.height - (4 * 30), S#state.canvas_height]).
-
-calc_min_actors(S) ->
- Max = S#state.max_actors,
- N = length(S#state.actors),
- if
- Max =:= infinity ->
- N * 2;
- Max < N ->
- N;
- true ->
- Max
- end.
-
-calc_min_events(S) ->
- Max = S#state.max_events,
- N = queue_length(S#state.events),
- if
- Max =:= infinity ->
- N * 2;
- Max < N ->
- N;
- true ->
- Max
- end.
-
-display_more_events(Try, S) ->
- Name = S#state.active_filter,
- {value, F} = lists:keysearch(Name, #filter.name, S#state.filters),
- FilterFun = F#filter.function,
- Fun = fun(Event, State) ->
- case catch FilterFun(Event) of
- true ->
- State2 = ensure_key(Event, State),
- opt_display_event(Event, State2);
- {true, Event2} ->
- State2 = ensure_key(Event2, State),
- opt_display_event(Event2, State2);
- false ->
- ensure_key(Event, State);
- Bad ->
- Contents = {bad_filter, Name, Bad, Event},
- Event2 = Event#event{contents = Contents,
- from = bad_filter,
- to = bad_filter},
- State2 = ensure_key(Event2, State),
- opt_display_event(Event2, State2)
- end
- end,
- Pid = S#state.collector_pid,
- S2 = et_collector:iterate(Pid, S#state.last_event, Try, Fun, S),
- case queue_length(S2#state.events) - queue_length(S#state.events) of
- Diff when Diff =:= Try ->
- %% Got as much as requested, look for more
- %% io:format("Done: ~p~n", [{Try, Diff}]),
- {noreply, S2, 0};
- _Diff when S2#state.first_event =:= S#state.first_event,
- S2#state.last_event =:= S#state.last_event ->
- %% Got lesser than requested, wait a while before looking for more
- %% io:format("More: ~p~n", [{Try, Diff}]),
- {noreply, S2, 500};
- _Diff ->
- %% Got lesser than requested, look for more
- %% io:format("More2: ~p~n", [{Try, Diff}]),
- {noreply, S2, 0}
- end.
-
-ensure_key(E, S) when is_record(E, event), is_record(S, state) ->
- Key = et_collector:make_key(S#state.event_order, E),
- case S#state.first_event of
- first ->
- S#state{first_event = Key, last_event = Key};
- last ->
- S#state{first_event = Key, last_event = Key};
- _ ->
- S#state{last_event = Key}
- end.
-
-opt_display_event(E, S) ->
- case S#state.display_mode of
- all ->
- display_event(E, S);
- {search_actors, _Dir, _FirstKey, Actors} ->
- %% Key = S#state.last_event,
- From = select_actor_name(E#event.from, S),
- case lists:member(From, Actors) of
- true ->
- display_event(E, S);
- false ->
- To = select_actor_name(E#event.to, S),
- case lists:member(To, Actors) of
- true ->
- display_event(E, S);
- false ->
- S
- end
- end
- end.
-
-select_actor_name(Name, S) ->
- case lists:keymember(Name, #actor.name, S#state.actors) of
- true -> Name;
- false -> ?unknown
- end.
-
-display_event(E, S) when E#event.detail_level < S#state.detail_level ->
- {FromRefresh, From} = ensure_actor(E#event.from, S),
- {FromName, FromPos, S2} = From,
- {ToRefresh, To} = ensure_actor(E#event.to, S2),
- {ToName, ToPos, S3} = To,
- if
- FromRefresh =/= false, ToRefresh =/= false ->
- Key = S#state.last_event,
- refresh_beep(S),
- S3#state{refresh_needed = true,
- events = queue_in(Key, S3#state.events)};
- FromName =:= ToName ->
- case S#state.hide_actions of
- true ->
- S3;
- false ->
- Label = name_to_string(E#event.label),
- draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S3)
- end;
- true ->
- Label = name_to_string(E#event.label),
- draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S3)
- end;
-display_event(_, S) ->
- S.
-
-draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S) ->
- Key = S#state.last_event,
- case S#state.y_pos + (?incr_y * S#state.scale) of
- _ when S#state.hide_unknown =:= true, FromName =:= ?unknown ->
- S;
- _ when S#state.hide_unknown =:= true, ToName =:= ?unknown ->
- S;
- Y when Y > S#state.canvas_height ->
- refresh_beep(S),
- S#state{refresh_needed = true,
- events = queue_in(Key, S#state.events)};
- Y ->
- S2 = S#state{y_pos = Y, events = queue_in(Key, S#state.events)},
- S3 = draw_arrow(FromPos, ToPos, S2),
- draw_label(Label, FromName, ToName, FromPos, ToPos, S3)
- end.
-
-refresh_beep(S) ->
- case S#state.refresh_needed of
- false ->
- gs:config(S#state.canvas, beep),
- gs:config(S#state.canvas, beep),
- gs:config(S#state.canvas, beep);
- true ->
- ignore
- end.
-
-draw_arrow(Pos, Pos, S) ->
- S;
-draw_arrow(FromPos, ToPos, S) ->
- Y = S#state.y_pos,
- CanOpts = [{coords, [{FromPos , Y}, {ToPos, Y}]},
- {arrow, last},{width, 1}, {fg, black}],
- gs:line(S#state.canvas, CanOpts),
- S.
-
-draw_label(Label, FromName, ToName, FromPos, ToPos, S) ->
- Colour =
- if
- FromName =:= ?unknown,
- ToName =:= ?unknown -> blue; %turquoise;
- FromName =:= ?unknown -> orange;
- ToName =:= ?unknown -> orange;
- FromPos =:= ToPos -> blue;
- true -> red
- end,
- Scale = S#state.scale,
- X = lists:min([FromPos, ToPos]) + (6 * Scale),
- Y = S#state.y_pos,
- write_text(Label, X, Y, Colour, S),
- S.
-
-draw_all_actors(State) ->
- Scale = State#state.scale,
- Fun = fun(A, X) ->
- draw_actor(A, X, State),
- X + (?incr_x * Scale)
- end,
- lists:foldl(Fun, ?initial_x * Scale, State#state.actors),
- State.
-
-%% Returns: {NeedsRefreshBool, {ActorPos, NewsS, NewActors}}
-ensure_actor(Name, S) ->
- do_ensure_actor(Name, S, S#state.actors, 0).
-
-do_ensure_actor(Name, S, [H | _], N) when H#actor.name =:= Name ->
- Pos = (?initial_x + (N * ?incr_x)) * S#state.scale,
- {false, {Name, Pos, S}};
-do_ensure_actor(Name, S, [_ | T], N) ->
- do_ensure_actor(Name, S, T, N + 1);
-do_ensure_actor(Name, S, [], N) ->
- %% A brand new actor, let's see if it does fit
- Pos = (?initial_x + (N * ?incr_x)) * S#state.scale,
- MaxActors = S#state.max_actors,
- if
- is_integer(MaxActors), N > MaxActors ->
- %% Failed on max_actors limit, put into unknown
- %% Assume that unknown always is in actor list
- ensure_actor(?unknown, S);
- Pos > (S#state.canvas_width - ((?initial_x - 15) * S#state.scale)) ->
- %% New actor does not fit in canvas, refresh needed
- A = create_actor(Name),
- draw_actor(A, Pos, S),
- {true, {Name, Pos, S#state{actors = S#state.actors ++ [A]}}};
- true ->
- %% New actor fits in canvas. Draw the new actor.
- A = create_actor(Name),
- draw_actor(A, Pos, S),
- {false, {Name, Pos, S#state{actors = S#state.actors ++ [A]}}}
- end.
-
-draw_actor(A, LineX, S) ->
- Scale = S#state.scale,
- TextX = LineX - (5 * Scale),
- TextY = ?initial_y * Scale,
- LineTopY = TextY + ((?incr_y / 2) * Scale),
- LineBotY = S#state.canvas_height - ((?incr_y / 2) * Scale),
- Colour = case A#actor.name of
- ?unknown -> orange;
- _ -> red
- end,
- write_text(A#actor.string, TextX, TextY, Colour, S),
- LineOpt = [{coords, [{LineX, LineTopY}, {LineX, LineBotY}]},
- {width, 1}, {fg, Colour}],
- gs:line(S#state.canvas, LineOpt).
-
-toggle_search_for_actor(ActorName,S) ->
- case S#state.display_mode of
- all ->
- io:format("~p: search for: ~p ++ ~p~n", [?MODULE, [], [ActorName]]),
- %% Search for this actor
- Key = S#state.first_event,
- Actors = [ActorName],
- Mode = {search_actors, forward, Key, Actors},
- change_display_mode(Mode, S);
- {search_actors, Dir, Key, Actors}->
- Actors2 =
- case lists:member(ActorName, Actors) of
- true ->
- io:format("~p: search for: ~p -- ~p~n", [?MODULE, Actors, [ActorName]]),
- %% Remove actor from search list
- Actors -- [ActorName];
- false ->
- io:format("~p: search for: ~p ++ ~p~n", [?MODULE, Actors, [ActorName]]),
- %% Add actor from search list
- [ActorName | Actors]
- end,
- Mode2 = {search_actors, Dir, Key, Actors2},
- change_display_mode(Mode2, S)
- end.
-
-move_actor(From, To, Actors, S) ->
- Pos = #actor.name,
- ToName = To#actor.name,
- FromName = From#actor.name,
- ToIx = actor_index(ToName, Pos, Actors),
- FromIx = actor_index(FromName, Pos, Actors),
- if
- FromIx =/= 0, ToIx =/= 0, ToIx > FromIx ->
- Actors2 = lists:keydelete(FromName, Pos, Actors),
- Actors3 = insert_actor_after(From, To, Actors2),
- S2 = S#state{actors = Actors3},
- refresh_main_window(S2);
- FromIx =/= 0, ToIx =/= 0 ->
- Actors2 = lists:keydelete(FromName, Pos, Actors),
- Actors3 = insert_actor_before(From, To, Actors2),
- S2 = S#state{actors = Actors3},
- refresh_main_window(S2);
- true ->
- %% Ignore
- S
- end.
-
-insert_actor_after(From, To, [H | T]) ->
- case To#actor.name =:= H#actor.name of
- true -> [H, From | T];
- false -> [H | insert_actor_after(From, To, T)]
- end;
-insert_actor_after(_From, _To, []) ->
- [].
-
-insert_actor_before(From, To, [H | T]) ->
- case To#actor.name =:= H#actor.name of
- true -> [From, H | T];
- false -> [H | insert_actor_before(From, To, T)]
- end;
-insert_actor_before(_From, _To, []) ->
- [].
-
-actor_index(_Key, _Pos, []) ->
- 0;
-actor_index(Key, Pos, [H | T]) ->
- case Key =:= element(Pos, H) of
- false -> actor_index(Key, Pos, T) + 1;
- true -> 1
- end.
-
-y_to_n(Y, S) ->
- Y2 = ((Y / S#state.scale) - ?initial_y + (?incr_y / 2)),
- N = round(Y2 / ?incr_y - 0.2),
- MaxN = queue_length(S#state.events),
- if
- N =< 0 -> actor;
- N > MaxN -> actor;
- true -> {event, N}
- end.
-
-x_to_n(X, S) ->
- Scale = S#state.scale,
- Len = length(S#state.actors),
- X2 = X - (?initial_x * Scale),
- N = X2 / (?incr_x * Scale),
- N2 = trunc(N + 1.5),
- if
- N2 > Len -> Len;
- N2 < 1 -> 1;
- true -> N2
- end.
-
-write_text(Text, X, Y, Colour, S) ->
- Opt = [{coords, [{X, Y - (?incr_y * S#state.scale / 2)}]},
- {font, S#state.font}, {fg, Colour}, {text, Text}],
- gs:text(S#state.canvas, Opt).
-
-create_contents_window(Event, S) ->
- Options = [{viewer_pid, self()},
- {event, Event},
- {event_order, S#state.event_order},
- {active_filter, S#state.active_filter}
- | S#state.filters],
- case et_gs_contents_viewer:start_link(Options) of
- {ok, _Pid} ->
- S;
- {error, Reason} ->
- ok = error_logger:format("~p(~p): create_contents_window(~p) ->~n ~p~n",
- [?MODULE, self(), Options, Reason]),
- S
- end.
-
-%%%----------------------------------------------------------------------
-%%% String padding of actors
-%%%----------------------------------------------------------------------
-
-create_actor(Name) ->
- String = name_to_string(Name),
- PaddedString = pad_string(String, 8),
- #actor{name = Name, string = PaddedString}.
-
-name_to_string(Name) ->
- case catch io_lib:format("~s", [Name]) of
- {'EXIT', _} -> lists:flatten(io_lib:format("~w", [Name]));
- GoodString -> lists:flatten(GoodString)
- end.
-
-pad_string(Atom, MinLen) when is_atom(Atom) ->
- pad_string(atom_to_list(Atom), MinLen);
-pad_string(String, MinLen) when is_integer(MinLen), MinLen >= 0 ->
- Len = length(String),
- case Len >= MinLen of
- true ->
- String;
- false ->
- String ++ lists:duplicate(MinLen - Len, $ )
- end.
-
-%%%----------------------------------------------------------------------
-%%% Queue management
-%%%----------------------------------------------------------------------
-
-queue_new() ->
- {0, [], []}.
-
-queue_in(X, {Size, In, Out}) ->
- {Size + 1, [X | In], Out}.
-
-%% queue_out(Q) ->
-%% case Q of
-%% {Size, In, [H | Out]} -> {{value, H}, {Size - 1, In, Out}};
-%% {Size, [], []} -> {empty, {Size, [], []}};
-%% {Size, In, _} -> queue_out({Size, [], lists:reverse(In)})
-%% end.
-
-queue_to_list({_Size, [], Out}) ->
- Out;
-queue_to_list({_Size, In, Out}) ->
- Out ++ lists:reverse(In).
-
-queue_length({Size, _In, _Out}) ->
- Size.
-
-list_to_queue(List) when is_list(List) ->
- {length(List), [], List}.
diff --git a/lib/et/src/et_viewer.erl b/lib/et/src/et_viewer.erl
index d9bd01f8d0..ead5639da6 100644
--- a/lib/et/src/et_viewer.erl
+++ b/lib/et/src/et_viewer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,7 +76,7 @@ start() ->
%% start(Options) -> {ok, ViewerPid} | {error, Reason}
%%----------------------------------------------------------------------
-start(GUI) when GUI =:= wx; GUI =:= gs; GUI =:= default ->
+start(GUI) when GUI =:= wx; GUI =:= default ->
start_link([{trace_global, true}], GUI);
start(Options) ->
start_link([{parent_pid, undefined} | Options], default).
@@ -139,7 +139,7 @@ start(Options, GUI) ->
%% and returns false | true | {true, NewEvent}.
%%----------------------------------------------------------------------
-start_link(GUI) when GUI =:= wx; GUI =:= gs; GUI =:= default ->
+start_link(GUI) when GUI =:= wx; GUI =:= default ->
start_link([{trace_global, true}], GUI);
start_link(Options) ->
start_link(Options, default).
@@ -148,22 +148,11 @@ start_link(Options, GUI) ->
case GUI of
wx ->
et_wx_viewer:start_link(Options);
- gs ->
- et_gs_viewer:start_link(Options);
default ->
start_link(Options, which_gui())
end.
-
-which_gui() ->
- try
- wx:new(),
- wx:destroy(),
- wx
- catch _:_ ->
- gs
- end.
-
+which_gui() -> wx.
get_collector_pid(ViewerPid) ->
call(ViewerPid, get_collector_pid).
diff --git a/lib/et/src/modules.mk b/lib/et/src/modules.mk
index 8d6c0902fb..b2d2f0b481 100644
--- a/lib/et/src/modules.mk
+++ b/lib/et/src/modules.mk
@@ -1,7 +1,7 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2001-2010. All Rights Reserved.
+# Copyright Ericsson AB 2001-2013. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -19,8 +19,6 @@
MODULES = \
et \
et_collector \
- et_gs_contents_viewer \
- et_gs_viewer \
et_selector \
et_viewer \
et_wx_contents_viewer \
diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile
index 3817079b5f..1be5aac3fd 100644
--- a/lib/et/test/Makefile
+++ b/lib/et/test/Makefile
@@ -25,6 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
MODULES= \
ett \
+ et_SUITE \
et_wx_SUITE \
et_test_lib
diff --git a/lib/et/test/et_SUITE.erl b/lib/et/test/et_SUITE.erl
new file mode 100644
index 0000000000..e0bce41e15
--- /dev/null
+++ b/lib/et/test/et_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(et_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the et app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(et).
+
+appup() ->
+ [{doc, "Test that the et appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(et).
diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk
index 282991aa49..a47be678ca 100644
--- a/lib/et/vsn.mk
+++ b/lib/et/vsn.mk
@@ -1 +1 @@
-ET_VSN = 1.4.4.5
+ET_VSN = 1.5
diff --git a/lib/eunit/doc/overview.edoc b/lib/eunit/doc/overview.edoc
index b4af31ae6a..872a017440 100644
--- a/lib/eunit/doc/overview.edoc
+++ b/lib/eunit/doc/overview.edoc
@@ -6,9 +6,9 @@
@title EUnit - a Lightweight Unit Testing Framework for Erlang
@author Richard Carlsson <[email protected]>
-@author Micka�l R�mond <[email protected]>
+@author Mickaël Rémond <[email protected]>
[http://www.process-one.net/]
-@copyright 2004-2007 Micka�l R�mond, Richard Carlsson
+@copyright 2004-2007 Mickaël Rémond, Richard Carlsson
@version {@version}, {@date} {@time}
@doc EUnit is a unit testing framework for Erlang. It is very powerful
diff --git a/lib/eunit/doc/src/book.xml b/lib/eunit/doc/src/book.xml
index eb044c1a66..c9bd320d5a 100644
--- a/lib/eunit/doc/src/book.xml
+++ b/lib/eunit/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>EUnit</title>
- <prepared>Richard Carlsson, Micka�l R�mond</prepared>
+ <prepared>Richard Carlsson, Mickaël Rémond</prepared>
<docno></docno>
<date>2008-10-29</date>
<rev>2.0</rev>
diff --git a/lib/eunit/doc/src/fascicules.xml b/lib/eunit/doc/src/fascicules.xml
index bbe1e6c5cc..217228785c 100644
--- a/lib/eunit/doc/src/fascicules.xml
+++ b/lib/eunit/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/eunit/doc/src/notes.xml b/lib/eunit/doc/src/notes.xml
index 941ff6e84c..6b76e097b6 100644
--- a/lib/eunit/doc/src/notes.xml
+++ b/lib/eunit/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,6 +32,72 @@
</header>
<p>This document describes the changes made to the EUnit application.</p>
+<section><title>Eunit 2.2.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure to install .hrl files when needed</p>
+ <p>
+ Own Id: OTP-12197</p>
+ </item>
+ <item>
+ <p>
+ Make sure the clean rule for ssh, ssl, eunit and otp_mibs
+ actually removes generated files.</p>
+ <p>
+ Own Id: OTP-12200</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eunit 2.2.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Minor refactoring.</p>
+ <p>
+ Own Id: OTP-12051</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eunit 2.2.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Eunit 2.2.6</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/eunit/doc/src/part.xml b/lib/eunit/doc/src/part.xml
index 84e5aec039..4ce63f7a94 100644
--- a/lib/eunit/doc/src/part.xml
+++ b/lib/eunit/doc/src/part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/eunit/doc/src/part_notes.xml b/lib/eunit/doc/src/part_notes.xml
index 191d69b915..149a4f79f0 100644
--- a/lib/eunit/doc/src/part_notes.xml
+++ b/lib/eunit/doc/src/part_notes.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/eunit/doc/src/ref_man.xml b/lib/eunit/doc/src/ref_man.xml
index eb46ceda1e..1e59ad1c7d 100644
--- a/lib/eunit/doc/src/ref_man.xml
+++ b/lib/eunit/doc/src/ref_man.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/eunit/include/eunit.hrl b/lib/eunit/include/eunit.hrl
index 84242a09aa..9e8d34567a 100644
--- a/lib/eunit/include/eunit.hrl
+++ b/lib/eunit/include/eunit.hrl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
%% published by the Free Software Foundation; either version 2 of the
diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile
index e6dab67363..47aef104ff 100644
--- a/lib/eunit/src/Makefile
+++ b/lib/eunit/src/Makefile
@@ -46,6 +46,8 @@ SOURCES= \
INCLUDE_FILES = eunit.hrl
+INTERNAL_HRL_FILES= eunit_internal.hrl
+
PARSE_TRANSFORM_BIN = $(PARSE_TRANSFORM:%.erl=$(EBIN)/%.$(EMULATOR))
TARGET_FILES= $(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR))
@@ -78,7 +80,7 @@ all: $(OBJECTS)
clean:
- rm -f $(OBJECTS)
+ rm -f $(OBJECTS) $(PARSE_TRANSFORM_BIN)
rm -f core *~
distclean: clean
@@ -119,6 +121,7 @@ release_spec: opt
$(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DATA) $(PARSE_TRANSFORM) $(SOURCES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
diff --git a/lib/eunit/src/eunit.app.src b/lib/eunit/src/eunit.app.src
index 431abac98b..7a3978e200 100644
--- a/lib/eunit/src/eunit.app.src
+++ b/lib/eunit/src/eunit.app.src
@@ -14,7 +14,9 @@
eunit_striptests,
eunit_surefire,
eunit_test,
+ eunit_tests,
eunit_tty]},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/eunit/src/eunit.appup.src b/lib/eunit/src/eunit.appup.src
index 54a63833e6..18934d44c2 100644
--- a/lib/eunit/src/eunit.appup.src
+++ b/lib/eunit/src/eunit.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, eunit}]}],
+ [{<<".*">>,[{restart_application, eunit}]}]
+}.
diff --git a/lib/eunit/src/eunit.erl b/lib/eunit/src/eunit.erl
index 5763949519..9c589dfa86 100644
--- a/lib/eunit/src/eunit.erl
+++ b/lib/eunit/src/eunit.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
%% published by the Free Software Foundation; either version 2 of the
diff --git a/lib/eunit/src/eunit_data.erl b/lib/eunit/src/eunit_data.erl
index 0350f9bf6e..cbbc6fbc15 100644
--- a/lib/eunit/src/eunit_data.erl
+++ b/lib/eunit/src/eunit_data.erl
@@ -440,13 +440,8 @@ parse_function({M, F}) when is_atom(M), is_atom(F) ->
parse_function(F) ->
bad_test(F).
-check_arity(F, N, T) when is_function(F) ->
- case erlang:fun_info(F, arity) of
- {arity, N} ->
- ok;
- _ ->
- bad_test(T)
- end;
+check_arity(F, N, _) when is_function(F, N) ->
+ ok;
check_arity(_, _, T) ->
bad_test(T).
diff --git a/lib/eunit/src/eunit_lib.erl b/lib/eunit/src/eunit_lib.erl
index 809cb7ab7b..40bae93298 100644
--- a/lib/eunit/src/eunit_lib.erl
+++ b/lib/eunit/src/eunit_lib.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
%% published by the Free Software Foundation; either version 2 of the
diff --git a/lib/eunit/src/eunit_serial.erl b/lib/eunit/src/eunit_serial.erl
index 80e79116e3..1a0179a5df 100644
--- a/lib/eunit/src/eunit_serial.erl
+++ b/lib/eunit/src/eunit_serial.erl
@@ -56,9 +56,9 @@
%% future use, and/or cancel the current item and possibly one or more
%% of its parent groups.
--record(state, {listeners :: set(),
- cancelled = eunit_lib:trie_new() :: gb_tree(),
- messages = dict:new() :: dict()}).
+-record(state, {listeners :: sets:set(),
+ cancelled = eunit_lib:trie_new() :: gb_trees:tree(),
+ messages = dict:new() :: dict:dict()}).
start(Pids) ->
spawn(fun () -> serializer(Pids) end).
diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl
index a2463d32e8..2d1f0b1497 100644
--- a/lib/eunit/src/eunit_surefire.erl
+++ b/lib/eunit/src/eunit_surefire.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%% This library is free software; you can redistribute it and/or modify
%% it under the terms of the GNU Lesser General Public License as
%% published by the Free Software Foundation; either version 2 of the
diff --git a/lib/eunit/test/eunit_SUITE.erl b/lib/eunit/test/eunit_SUITE.erl
index 47c2435d63..d13dc73923 100644
--- a/lib/eunit/test/eunit_SUITE.erl
+++ b/lib/eunit/test/eunit_SUITE.erl
@@ -19,14 +19,15 @@
-module(eunit_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,eunit_test/1]).
+ init_per_group/2,end_per_group/2,
+ app_test/1,appup_test/1,eunit_test/1]).
-include_lib("common_test/include/ct.hrl").
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [eunit_test].
+ [app_test, appup_test, eunit_test].
groups() ->
[].
@@ -43,6 +44,11 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+app_test(Config) when is_list(Config) ->
+ ok = ?t:app_test(eunit).
+
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(eunit).
eunit_test(Config) when is_list(Config) ->
ok = file:set_cwd(code:lib_dir(eunit)),
diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk
index 8f816b3b94..dca8b3ece0 100644
--- a/lib/eunit/vsn.mk
+++ b/lib/eunit/vsn.mk
@@ -1 +1 @@
-EUNIT_VSN = 2.2.6
+EUNIT_VSN = 2.2.9
diff --git a/lib/gs/contribs/mandel/mandel.erl b/lib/gs/contribs/mandel/mandel.erl
index a7a786ce98..a4feaa87ec 100644
--- a/lib/gs/contribs/mandel/mandel.erl
+++ b/lib/gs/contribs/mandel/mandel.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/gs/doc/src/book.xml b/lib/gs/doc/src/book.xml
index 89f356d131..dbc869751a 100644
--- a/lib/gs/doc/src/book.xml
+++ b/lib/gs/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/fascicules.xml b/lib/gs/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/gs/doc/src/fascicules.xml
+++ b/lib/gs/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/gs/doc/src/gs.xml b/lib/gs/doc/src/gs.xml
index 417163e963..7b589d002d 100644
--- a/lib/gs/doc/src/gs.xml
+++ b/lib/gs/doc/src/gs.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2012</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -39,7 +39,7 @@
graphical user interface.
</p>
<p>
- GS is deprecated and will be removed in the R16 release.
+ GS is deprecated and will be removed in the 18.0 release.
</p>
</warning>
<p>The Graphics System, GS, is easy to learn and
diff --git a/lib/gs/doc/src/gs_chapter1.xml b/lib/gs/doc/src/gs_chapter1.xml
index 912d6e1ef9..71f213b34d 100644
--- a/lib/gs/doc/src/gs_chapter1.xml
+++ b/lib/gs/doc/src/gs_chapter1.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter2.xmlsrc b/lib/gs/doc/src/gs_chapter2.xmlsrc
index 9a8ffce35b..d37065d954 100644
--- a/lib/gs/doc/src/gs_chapter2.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter2.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter3.xml b/lib/gs/doc/src/gs_chapter3.xml
index 66b1b975a8..a124354e7d 100644
--- a/lib/gs/doc/src/gs_chapter3.xml
+++ b/lib/gs/doc/src/gs_chapter3.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter4.xmlsrc b/lib/gs/doc/src/gs_chapter4.xmlsrc
index 011b23f547..9747382655 100644
--- a/lib/gs/doc/src/gs_chapter4.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter4.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter5.xmlsrc b/lib/gs/doc/src/gs_chapter5.xmlsrc
index fb60272598..f2ccedae2d 100644
--- a/lib/gs/doc/src/gs_chapter5.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter5.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter6.xmlsrc b/lib/gs/doc/src/gs_chapter6.xmlsrc
index 9fd9fdc414..807d82589d 100644
--- a/lib/gs/doc/src/gs_chapter6.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter6.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter7.xmlsrc b/lib/gs/doc/src/gs_chapter7.xmlsrc
index d6af68f8b0..63ee4c472c 100644
--- a/lib/gs/doc/src/gs_chapter7.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter7.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/gs_chapter8.xmlsrc b/lib/gs/doc/src/gs_chapter8.xmlsrc
index 3cffd5bb32..db69395102 100644
--- a/lib/gs/doc/src/gs_chapter8.xmlsrc
+++ b/lib/gs/doc/src/gs_chapter8.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/notes.xml b/lib/gs/doc/src/notes.xml
index f778c010e9..e40310d36e 100644
--- a/lib/gs/doc/src/notes.xml
+++ b/lib/gs/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,7 +30,36 @@
</header>
<p>This document describes the changes made to the GS application.</p>
- <section><title>GS 1.5.15.2</title>
+ <section><title>GS 1.5.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>GS 1.5.15.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/gs/doc/src/part.xml b/lib/gs/doc/src/part.xml
index 5e28723665..ac8e40ecde 100644
--- a/lib/gs/doc/src/part.xml
+++ b/lib/gs/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/part_notes.xml b/lib/gs/doc/src/part_notes.xml
index e0cf7fef0b..23ef749bff 100644
--- a/lib/gs/doc/src/part_notes.xml
+++ b/lib/gs/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/doc/src/ref_man.xml b/lib/gs/doc/src/ref_man.xml
index 9e111f0c5b..b57ad7db3b 100644
--- a/lib/gs/doc/src/ref_man.xml
+++ b/lib/gs/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile
index 0a63d5466e..f0200caf01 100644
--- a/lib/gs/src/Makefile
+++ b/lib/gs/src/Makefile
@@ -72,7 +72,7 @@ IMAGES=../priv/bitmap/fup.bm
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
+ERL_COMPILE_FLAGS += +warn_obsolete_guard -Werror
# ----------------------------------------------------
# Targets
diff --git a/lib/gs/src/gs.app.src b/lib/gs/src/gs.app.src
index c83c9b54d7..c6f88e5144 100644
--- a/lib/gs/src/gs.app.src
+++ b/lib/gs/src/gs.app.src
@@ -10,4 +10,5 @@
gstk_window,tcl2erl,tool_file_dialog,tool_utils,
gs_packer,gse]},
{registered, [gs_frontend]},
- {applications, [kernel, stdlib]}]}.
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/gs/src/gs.appup.src b/lib/gs/src/gs.appup.src
index 54a63833e6..2cb3b547e8 100644
--- a/lib/gs/src/gs.appup.src
+++ b/lib/gs/src/gs.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, gs}]}],
+ [{<<".*">>,[{restart_application, gs}]}]
+}.
diff --git a/lib/gs/src/gstk_generic.erl b/lib/gs/src/gstk_generic.erl
index 9b0efd07c1..573b4e05bb 100644
--- a/lib/gs/src/gstk_generic.erl
+++ b/lib/gs/src/gstk_generic.erl
@@ -323,11 +323,11 @@ handle_external_opt_call([Opt|Options],Gstkid,TkW,DB,ExtraArg,ExtRes,S,P,C) ->
end.
handle_external_read(Res) ->
- _ = case Res of
- {bad_result,{Objtype,Reason,Option}} ->
- {error,{Objtype,Reason,Option}};
- _ -> ok
- end,
+ %% We have removed dead code here that attempted to translate
+ %% a bad return value from {bad_result,{A,B,C}} to {error,{A,B,C}}.
+ %% Since the gs application is deprecated, we don't want to introduce
+ %% a potential incompatibility; thus we have removed the dead code
+ %% instead of correcting it.
Res.
%%----------------------------------------------------------------------
diff --git a/lib/gs/test/Makefile b/lib/gs/test/Makefile
new file mode 100644
index 0000000000..493770745f
--- /dev/null
+++ b/lib/gs/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ gs_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/gs_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) gs.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/gs/test/gs.spec b/lib/gs/test/gs.spec
new file mode 100644
index 0000000000..46e6b2061e
--- /dev/null
+++ b/lib/gs/test/gs.spec
@@ -0,0 +1 @@
+{suites,"../gs_test",all}.
diff --git a/lib/gs/test/gs_SUITE.erl b/lib/gs/test/gs_SUITE.erl
new file mode 100644
index 0000000000..01ce90df0b
--- /dev/null
+++ b/lib/gs/test/gs_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(gs_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the gs app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(gs, tolerant).
+
+appup() ->
+ [{doc, "Test that the gs appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(gs).
diff --git a/lib/gs/vsn.mk b/lib/gs/vsn.mk
index 5c18153c34..96786b300c 100644
--- a/lib/gs/vsn.mk
+++ b/lib/gs/vsn.mk
@@ -1,2 +1,2 @@
-GS_VSN = 1.5.15.2
+GS_VSN = 1.5.16
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index a9e24f4d17..46cbc33ae2 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -22,7 +22,7 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
ifdef HIPE_ENABLED
-HIPE_SUBDIRS = regalloc sparc ppc x86 amd64 arm opt tools
+HIPE_SUBDIRS = regalloc sparc ppc x86 amd64 arm opt tools llvm
else
HIPE_SUBDIRS =
endif
diff --git a/lib/hipe/arm/hipe_arm_assemble.erl b/lib/hipe/arm/hipe_arm_assemble.erl
index 2af786994e..e9de96a927 100644
--- a/lib/hipe/arm/hipe_arm_assemble.erl
+++ b/lib/hipe/arm/hipe_arm_assemble.erl
@@ -44,8 +44,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -320,7 +320,7 @@ do_pseudo_li(I, MFA, ConstMap, Address, PrevImms, PendImms) ->
Atom when is_atom(Atom) ->
{load_atom, Atom};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -518,37 +518,6 @@ fix_pc_refs(I, InsnAddress, FunAddress, LabelMap) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL, LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -594,17 +563,6 @@ fill_spaces(N) when N > 0 ->
fill_spaces(0) ->
[].
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 506e993ff4..d13dfb33c2 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -42,8 +42,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-MODULES = cerl_cconv cerl_closurean cerl_hipeify \
- cerl_lib cerl_messagean cerl_pmatch cerl_prettypr cerl_to_icode \
+MODULES = cerl_cconv cerl_closurean cerl_hipeify cerl_lib \
+ cerl_messagean cerl_pmatch cerl_prettypr cerl_to_icode \
cerl_typean erl_bif_types erl_types
HRL_FILES= cerl_hipe_primops.hrl
@@ -65,7 +65,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +inline +warn_exported_vars +warn_unused_import +warn_missing_spec# +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +inline +warn_exported_vars +warn_unused_import +warn_missing_spec #+warn_untyped_record
# ----------------------------------------------------
# Targets
@@ -107,7 +107,6 @@ release_spec: opt
release_docs_spec:
-$(EBIN)/cerl_to_icode.beam: cerl_hipe_primops.hrl ../icode/hipe_icode_primops.hrl
+$(EBIN)/cerl_cconv.beam: cerl_hipe_primops.hrl
$(EBIN)/cerl_hipeify.beam: cerl_hipe_primops.hrl
-$(EBIN)/cerl_lambdalift.beam: cerl_hipe_primops.hrl
-$(EBIN)/erl_bif_types.beam: ../icode/hipe_icode_primops.hrl
+$(EBIN)/cerl_to_icode.beam: cerl_hipe_primops.hrl ../icode/hipe_icode_primops.hrl
diff --git a/lib/hipe/cerl/cerl_closurean.erl b/lib/hipe/cerl/cerl_closurean.erl
index 021acd5b35..1b325703ae 100644
--- a/lib/hipe/cerl/cerl_closurean.erl
+++ b/lib/hipe/cerl/cerl_closurean.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -78,7 +78,8 @@
%% function; see `analyze' for details.
-spec annotate(cerl:cerl()) ->
- {cerl:cerl(), outlist(), dict(), escapes(), dict(), dict()}.
+ {cerl:cerl(), outlist(), dict:dict(),
+ escapes(), dict:dict(), dict:dict()}.
annotate(Tree) ->
{Xs, Out, Esc, Deps, Par} = analyze(Tree),
@@ -206,7 +207,8 @@ append_ann(Tag, Val, []) ->
%% variable labeled `escape', which will hold the set of escaped labels.
%% initially it contains `top' and `external'.
--spec analyze(cerl:cerl()) -> {outlist(), dict(), escapes(), dict(), dict()}.
+-spec analyze(cerl:cerl()) ->
+ {outlist(), dict:dict(), escapes(), dict:dict(), dict:dict()}.
analyze(Tree) ->
%% Note that we use different name spaces for variable labels and
diff --git a/lib/hipe/cerl/cerl_messagean.erl b/lib/hipe/cerl/cerl_messagean.erl
index ca812a0f0d..7911b875a9 100644
--- a/lib/hipe/cerl/cerl_messagean.erl
+++ b/lib/hipe/cerl/cerl_messagean.erl
@@ -1,7 +1,7 @@
%% =====================================================================
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -182,7 +182,7 @@
-type label() :: integer() | 'external' | 'top'.
-type ordset(X) :: [X]. % XXX: TAKE ME OUT
--spec annotate(cerl:cerl()) -> {cerl:cerl(), ordset(label()), dict()}.
+-spec annotate(cerl:cerl()) -> {cerl:cerl(), ordset(label()), dict:dict()}.
annotate(Tree) ->
{Esc0, Vars} = analyze(Tree),
diff --git a/lib/hipe/cerl/cerl_prettypr.erl b/lib/hipe/cerl/cerl_prettypr.erl
index fba9a48cda..f4a67439d6 100644
--- a/lib/hipe/cerl/cerl_prettypr.erl
+++ b/lib/hipe/cerl/cerl_prettypr.erl
@@ -1,7 +1,7 @@
%% =====================================================================
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -62,7 +62,10 @@
receive_action/1, receive_clauses/1, receive_timeout/1,
seq_arg/1, seq_body/1, string_lit/1, try_arg/1,
try_body/1, try_vars/1, try_evars/1, try_handler/1,
- tuple_es/1, type/1, values_es/1, var_name/1]).
+ tuple_es/1, type/1, values_es/1, var_name/1,
+ c_map/1, map_arg/1, map_es/1, is_c_map_empty/1,
+ c_map_pair/2, map_pair_key/1, map_pair_val/1, map_pair_op/1
+ ]).
-define(PAPER, 76).
-define(RIBBON, 45).
@@ -424,6 +427,10 @@ lay_1(Node, Ctxt) ->
lay_cons(Node, Ctxt);
tuple ->
lay_tuple(Node, Ctxt);
+ map ->
+ lay_map(Node, Ctxt);
+ map_pair ->
+ lay_map_pair(Node, Ctxt);
'let' ->
lay_let(Node, Ctxt);
seq ->
@@ -469,13 +476,20 @@ lay_literal(Node, Ctxt) ->
%% that could represent printable characters - we
%% always print an integer.
text(int_lit(Node));
- V when is_binary(V) ->
- lay_binary(c_binary([c_bitstr(abstract(B),
- abstract(8),
+ V when is_bitstring(V) ->
+ Val = fun(I) when is_integer(I) -> I;
+ (B) when is_bitstring(B) ->
+ BZ = bit_size(B), <<BV:BZ>> = B, BV
+ end,
+ Sz = fun(I) when is_integer(I) -> 8;
+ (B) when is_bitstring(B) -> bit_size(B)
+ end,
+ lay_binary(c_binary([c_bitstr(abstract(Val(B)),
+ abstract(Sz(B)),
abstract(1),
abstract(integer),
abstract([unsigned, big]))
- || B <- binary_to_list(V)]),
+ || B <- bitstring_to_list(V)]),
Ctxt);
[] ->
text("[]");
@@ -483,7 +497,13 @@ lay_literal(Node, Ctxt) ->
%% `lay_cons' will check for strings.
lay_cons(Node, Ctxt);
V when is_tuple(V) ->
- lay_tuple(Node, Ctxt)
+ lay_tuple(Node, Ctxt);
+ M when is_map(M), map_size(M) =:= 0 ->
+ text("~{}~");
+ M when is_map(M) ->
+ lay_map(c_map([c_map_pair(abstract(K),abstract(V))
+ || {K,V} <- maps:to_list(M)]),
+ Ctxt)
end.
lay_var(Node, Ctxt) ->
@@ -589,6 +609,30 @@ lay_tuple(Node, Ctxt) ->
Ctxt, fun lay/2)),
floating(text("}")))).
+lay_map(Node, Ctxt) ->
+ Arg = map_arg(Node),
+ After = case is_c_map_empty(Arg) of
+ true -> floating(text("}~"));
+ false ->
+ beside(floating(text(" | ")),
+ beside(lay(Arg,Ctxt),
+ floating(text("}~"))))
+ end,
+ beside(floating(text("~{")),
+ beside(par(seq(map_es(Node), floating(text(",")), Ctxt, fun lay/2)),
+ After)).
+
+lay_map_pair(Node, Ctxt) ->
+ K = map_pair_key(Node),
+ V = map_pair_val(Node),
+ OpTxt = case concrete(map_pair_op(Node)) of
+ assoc -> "::<";
+ exact -> "~<"
+ end,
+ beside(floating(text(OpTxt)),
+ beside(lay(K,Ctxt),beside(floating(text(",")), beside(lay(V,Ctxt),
+ floating(text(">")))))).
+
lay_let(Node, Ctxt) ->
V = lay_value_list(let_vars(Node), Ctxt),
D1 = par([follow(text("let"),
diff --git a/lib/hipe/cerl/cerl_to_icode.erl b/lib/hipe/cerl/cerl_to_icode.erl
index 1c1c10d9b0..2645056be1 100644
--- a/lib/hipe/cerl/cerl_to_icode.erl
+++ b/lib/hipe/cerl/cerl_to_icode.erl
@@ -29,9 +29,9 @@
-define(NO_UNUSED, true).
--export([module/2]).
+-export([module/1, module/2]).
-ifndef(NO_UNUSED).
--export([function/3, function/4, module/1]).
+-export([function/3, function/4]).
-endif.
%% Added in an attempt to suppress message by Dialyzer, but I run into
@@ -102,36 +102,32 @@
%% Record definitions
--record(ctxt, {final = false :: boolean(),
- effect = false,
- fail = [], % [] or fail-to label
- class = expr, % expr | guard
- line = 0, % current line number
- 'receive' % undefined | #receive{}
- }).
-
-record('receive', {loop}).
-record(cerl_to_icode__var, {name}).
-record('fun', {label, vars}).
+-record(ctxt, {final = false :: boolean(),
+ effect = false :: boolean(),
+ fail = [], % [] or fail-to label
+ class = expr :: 'expr' | 'guard',
+ line = 0 :: erl_scan:line(), % current line number
+ 'receive' :: 'undefined' | #'receive'{}
+ }).
%% ---------------------------------------------------------------------
%% Code
-
-%% @spec module(Module::cerl()) -> [icode()]
+%% @spec module(Module::cerl()) -> [{mfa(), icode()}]
%% @equiv module(Module, [])
--ifndef(NO_UNUSED).
+-spec module(cerl:c_module()) -> [{mfa(), hipe_icode:icode()}].
+
module(E) ->
module(E, []).
--endif.
-%% @clear
-
-%% @spec module(Module::cerl(), Options::[term()]) -> [icode()]
+%% @spec module(Module::cerl(), Options::[term()]) -> [{mfa(), icode()}]
%%
-%% cerl() = cerl:cerl()
+%% cerl() = cerl:c_module()
%% icode() = hipe_icode:icode()
%%
%% @doc Transforms a Core Erlang module to linear HiPE Icode. The result
@@ -149,7 +145,7 @@ module(E) ->
%% @see function/4
%% @see cerl_hipeify:transform/1
-%% -spec module(cerl:c_module(), [term()]) -> [{mfa(), hipe_icode:icode()}].
+-spec module(cerl:c_module(), [term()]) -> [{mfa(), hipe_icode:icode()}].
module(E, Options) ->
module_1(cerl_hipeify:transform(E, Options), Options).
@@ -163,8 +159,8 @@ module_1(E, Options) ->
throw(error)
end,
S0 = init(M),
- S1 = s__set_pmatch(proplists:get_value(pmatch, Options), S0),
- S2 = s__set_bitlevel_binaries(proplists:get_value(
+ S1 = s__set_pmatch(proplists:get_value(pmatch, Options), S0),
+ S2 = s__set_bitlevel_binaries(proplists:get_value(
bitlevel_binaries, Options), S1),
{Icode, _} = lists:mapfoldl(fun function_definition/2,
S2, cerl:module_defs(E)),
diff --git a/lib/hipe/cerl/cerl_typean.erl b/lib/hipe/cerl/cerl_typean.erl
index ccd8903658..f694c07c82 100644
--- a/lib/hipe/cerl/cerl_typean.erl
+++ b/lib/hipe/cerl/cerl_typean.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -242,7 +242,7 @@ delete_ann(_, []) ->
-type labelset() :: ordset(label()).
-type outlist() :: [labelset()] | 'none'.
--spec analyze(cerl:cerl()) -> {outlist(), dict(), dict()}.
+-spec analyze(cerl:cerl()) -> {outlist(), dict:dict(), dict:dict()}.
analyze(Tree) ->
analyze(Tree, ?DEF_LIMIT).
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 42c7e360c1..74e93bf098 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,19 +30,17 @@
%-define(BITS, (hipe_rtl_arch:word_size() * 8) - ?TAG_IMMED1_SIZE).
-define(BITS, 128). %This is only in bsl to convert answer to pos_inf/neg_inf.
--define(TAG_IMMED1_SIZE, 4).
+-export([type/3, type/4, type/5, arg_types/3,
+ is_known/3, opaque_args/5, infinity_add/2]).
--export([type/3, type/4, arg_types/3,
- is_known/3, structure_inspecting_args/3, infinity_add/2]).
-
--import(erl_types, [number_max/1,
- number_min/1,
+-import(erl_types, [number_max/2,
+ number_min/2,
t_any/0,
t_arity/0,
t_atom/0,
t_atom/1,
t_atoms/1,
- t_atom_vals/1,
+ t_atom_vals/2,
t_binary/0,
t_bitstr/0,
t_boolean/0,
@@ -60,10 +58,11 @@
t_from_term/1,
t_fun/0,
t_fun/2,
- t_fun_args/1,
- t_fun_range/1,
+ t_fun_args/2,
+ t_fun_range/2,
t_identifier/0,
- t_inf/2,
+ t_has_opaque_subtype/2,
+ t_inf/3,
t_integer/0,
t_integer/1,
t_non_neg_fixnum/0,
@@ -71,30 +70,28 @@
t_pos_integer/0,
t_integers/1,
t_is_any/1,
- t_is_atom/1,
- t_is_binary/1,
- t_is_bitstr/1,
- t_is_boolean/1,
- t_is_cons/1,
- t_is_float/1,
- t_is_float/1,
- t_is_fun/1,
- t_is_integer/1,
- t_is_integer/1,
- t_is_nil/1,
+ t_is_atom/2,
+ t_is_binary/2,
+ t_is_bitstr/2,
+ t_is_boolean/2,
+ t_is_cons/2,
+ t_is_float/2,
+ t_is_fun/2,
+ t_is_integer/2,
+ t_is_nil/1, t_is_nil/2,
t_is_none/1,
t_is_none_or_unit/1,
- t_is_number/1,
- t_is_pid/1,
- t_is_port/1,
- t_is_maybe_improper_list/1,
- t_is_reference/1,
+ t_is_number/2,
+ t_is_pid/2,
+ t_is_port/2,
+ t_is_maybe_improper_list/2,
+ t_is_reference/2,
t_is_string/1,
t_is_subtype/2,
- t_is_tuple/1,
+ t_is_tuple/2,
t_list/0,
t_list/1,
- t_list_elements/1,
+ t_list_elements/2,
t_list_termination/1,
t_mfa/0,
t_module/0,
@@ -104,7 +101,7 @@
t_nonempty_list/0,
t_nonempty_list/1,
t_number/0,
- t_number_vals/1,
+ t_number_vals/2,
t_pid/0,
t_port/0,
t_maybe_improper_list/0,
@@ -115,9 +112,11 @@
t_sup/2,
t_tuple/0,
t_tuple/1,
- t_tuple_args/1,
- t_tuple_size/1,
- t_tuple_subtypes/1
+ t_tuple_args/2,
+ t_tuple_size/2,
+ t_tuple_subtypes/2,
+ t_is_map/2,
+ t_map/0
]).
-ifdef(DO_ERL_BIF_TYPES_TEST).
@@ -129,47 +128,61 @@
-spec type(atom(), atom(), arity()) -> erl_types:erl_type().
type(M, F, A) ->
- type(M, F, A, any_list(A)).
+ type(M, F, A, any_list(A), []).
%% Arguments should be checked for undefinedness, so we do not make
%% unnecessary overapproximations.
-spec type(atom(), atom(), arity(), [erl_types:erl_type()]) -> erl_types:erl_type().
+type(M, F, A, Xs) ->
+ type(M, F, A, Xs, 'universe').
+
+-type opaques() :: 'universe' | [erl_types:erl_type()].
+
+-type arg_types() :: [erl_types:erl_type()].
+
+-spec type(atom(), atom(), arity(), arg_types(), opaques()) ->
+ erl_types:erl_type().
+
%%-- erlang -------------------------------------------------------------------
-type(erlang, halt, 0, _) -> t_none();
-type(erlang, halt, 1, _) -> t_none();
-type(erlang, halt, 2, _) -> t_none();
-type(erlang, exit, 1, _) -> t_none();
-type(erlang, error, 1, _) -> t_none();
-type(erlang, error, 2, _) -> t_none();
-type(erlang, throw, 1, _) -> t_none();
-type(erlang, '==', 2, Xs = [X1, X2]) ->
- case t_is_atom(X1) andalso t_is_atom(X2) of
- true -> type(erlang, '=:=', 2, Xs);
+type(erlang, halt, 0, _, _) -> t_none();
+type(erlang, halt, 1, _, _) -> t_none();
+type(erlang, halt, 2, _, _) -> t_none();
+type(erlang, exit, 1, _, _) -> t_none();
+type(erlang, error, 1, _, _) -> t_none();
+type(erlang, error, 2, _, _) -> t_none();
+type(erlang, throw, 1, _, _) -> t_none();
+type(erlang, '==', 2, Xs = [X1, X2], Opaques) ->
+ case
+ t_is_atom(X1, Opaques) andalso t_is_atom(X2, Opaques)
+ of
+ true -> type(erlang, '=:=', 2, Xs, Opaques);
false ->
- case t_is_integer(X1) andalso t_is_integer(X2) of
- true -> type(erlang, '=:=', 2, Xs);
- false -> strict(Xs, t_boolean())
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
+ true -> type(erlang, '=:=', 2, Xs, Opaques);
+ false -> strict2(Xs, t_boolean())
end
end;
-type(erlang, '/=', 2, Xs = [X1, X2]) ->
- case t_is_atom(X1) andalso t_is_atom(X2) of
- true -> type(erlang, '=/=', 2, Xs);
+type(erlang, '/=', 2, Xs = [X1, X2], Opaques) ->
+ case
+ t_is_atom(X1, Opaques) andalso t_is_atom(X2, Opaques)
+ of
+ true -> type(erlang, '=/=', 2, Xs, Opaques);
false ->
- case t_is_integer(X1) andalso t_is_integer(X2) of
- true -> type(erlang, '=/=', 2, Xs);
- false -> strict(Xs, t_boolean())
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
+ true -> type(erlang, '=/=', 2, Xs, Opaques);
+ false -> strict2(Xs, t_boolean())
end
end;
-type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
+type(erlang, '=:=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_none(t_inf(Lhs, Rhs)) of
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
true -> t_atom('false');
false ->
- case t_is_atom(Lhs) andalso t_is_atom(Rhs) of
+ case t_is_atom(Lhs, Opaques) andalso t_is_atom(Rhs, Opaques) of
true ->
- case {t_atom_vals(Lhs), t_atom_vals(Rhs)} of
+ case {t_atom_vals(Lhs, Opaques), t_atom_vals(Rhs, Opaques)} of
{unknown, _} -> t_boolean();
{_, unknown} -> t_boolean();
{[X], [X]} -> t_atom('true');
@@ -181,16 +194,20 @@ type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
end
end;
false ->
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case
+ t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques)
+ of
false -> t_boolean();
true ->
- case {t_number_vals(Lhs), t_number_vals(Rhs)} of
+ case
+ {t_number_vals(Lhs, Opaques), t_number_vals(Rhs, Opaques)}
+ of
{[X], [X]} when is_integer(X) -> t_atom('true');
_ ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
Ans1 = (is_integer(LhsMin)
andalso is_integer(RhsMax)
andalso (LhsMin > RhsMax)),
@@ -205,15 +222,15 @@ type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
end
end
end,
- strict(Xs, Ans);
-type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '=/=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_none(t_inf(Lhs, Rhs)) of
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
true -> t_atom('true');
false ->
- case t_is_atom(Lhs) andalso t_is_atom(Rhs) of
+ case t_is_atom(Lhs, Opaques) andalso t_is_atom(Rhs, Opaques) of
true ->
- case {t_atom_vals(Lhs), t_atom_vals(Rhs)} of
+ case {t_atom_vals(Lhs, Opaques), t_atom_vals(Rhs, Opaques)} of
{unknown, _} -> t_boolean();
{_, unknown} -> t_boolean();
{[Val], [Val]} -> t_atom('false');
@@ -221,13 +238,15 @@ type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
t_sup([t_from_term(X =/= Y) || X <- LhsVals, Y <- RhsVals])
end;
false ->
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case
+ t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques)
+ of
false -> t_boolean();
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
Ans1 = (is_integer(LhsMin) andalso is_integer(RhsMax)
andalso (LhsMin > RhsMax)),
Ans2 = (is_integer(LhsMax) andalso is_integer(RhsMin)
@@ -244,15 +263,15 @@ type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
end
end
end,
- strict(Xs, Ans);
-type(erlang, '>', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '>', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -260,17 +279,17 @@ type(erlang, '>', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMax), is_integer(RhsMin), RhsMin >= LhsMax -> F;
true -> t_boolean()
end;
- false -> compare('>', Lhs, Rhs)
+ false -> compare('>', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '>=', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '>=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -278,17 +297,17 @@ type(erlang, '>=', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMax), is_integer(RhsMin), RhsMin > LhsMax -> F;
true -> t_boolean()
end;
- false -> compare('>=', Lhs, Rhs)
+ false -> compare('>=', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '<', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '<', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -296,17 +315,17 @@ type(erlang, '<', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMin), is_integer(RhsMax), RhsMax =< LhsMin -> F;
true -> t_boolean()
end;
- false -> compare('<', Lhs, Rhs)
+ false -> compare('<', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '=<', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '=<', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -314,232 +333,237 @@ type(erlang, '=<', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMin), is_integer(RhsMax), RhsMax < LhsMin -> F;
true -> t_boolean()
end;
- false -> compare('=<', Lhs, Rhs)
+ false -> compare('=<', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '+', 1, Xs) ->
- strict(arg_types(erlang, '+', 1), Xs,
- fun ([X]) -> X end);
-type(erlang, '-', 1, Xs) ->
- strict(arg_types(erlang, '-', 1), Xs,
+ strict2(Xs, Ans);
+type(erlang, '+', 1, Xs, Opaques) ->
+ strict(erlang, '+', 1, Xs, fun ([X]) -> X end, Opaques);
+type(erlang, '-', 1, Xs, Opaques) ->
+ strict(erlang, '-', 1, Xs,
fun ([X]) ->
- case t_is_integer(X) of
+ case t_is_integer(X, Opaques) of
true -> type(erlang, '-', 2, [t_integer(0), X]);
false -> X
end
- end);
-type(erlang, '!', 2, Xs) ->
- strict(arg_types(erlang, '!', 2), Xs, fun ([_, X2]) -> X2 end);
-type(erlang, '+', 2, Xs) ->
- strict(arg_types(erlang, '+', 2), Xs,
+ end, Opaques);
+type(erlang, '!', 2, Xs, Opaques) ->
+ strict(erlang, '!', 2, Xs, fun ([_, X2]) -> X2 end, Opaques);
+type(erlang, '+', 2, Xs, Opaques) ->
+ strict(erlang, '+', 2, Xs,
fun ([X1, X2]) ->
- case arith('+', X1, X2) of
+ case arith('+', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '-', 2, Xs) ->
- strict(arg_types(erlang, '-', 2), Xs,
+ end, Opaques);
+type(erlang, '-', 2, Xs, Opaques) ->
+ strict(erlang, '-', 2, Xs,
fun ([X1, X2]) ->
- case arith('-', X1, X2) of
+ case arith('-', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '*', 2, Xs) ->
- strict(arg_types(erlang, '*', 2), Xs,
+ end, Opaques);
+type(erlang, '*', 2, Xs, Opaques) ->
+ strict(erlang, '*', 2, Xs,
fun ([X1, X2]) ->
- case arith('*', X1, X2) of
+ case arith('*', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '/', 2, Xs) ->
- strict(arg_types(erlang, '/', 2), Xs,
- fun (_) -> t_float() end);
-type(erlang, 'div', 2, Xs) ->
- strict(arg_types(erlang, 'div', 2), Xs,
+ end, Opaques);
+type(erlang, '/', 2, Xs, Opaques) ->
+ strict(erlang, '/', 2, Xs, fun (_) -> t_float() end, Opaques);
+type(erlang, 'div', 2, Xs, Opaques) ->
+ strict(erlang, 'div', 2, Xs,
fun ([X1, X2]) ->
- case arith('div', X1, X2) of
+ case arith('div', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
-type(erlang, 'rem', 2, Xs) ->
- strict(arg_types(erlang, 'rem', 2), Xs,
+ end, Opaques);
+type(erlang, 'rem', 2, Xs, Opaques) ->
+ strict(erlang, 'rem', 2, Xs,
fun ([X1, X2]) ->
- case arith('rem', X1, X2) of
+ case arith('rem', X1, X2, Opaques) of
error -> t_non_neg_integer();
{ok, T} -> T
end
- end);
-type(erlang, '++', 2, Xs) ->
- strict(arg_types(erlang, '++', 2), Xs,
+ end, Opaques);
+type(erlang, '++', 2, Xs, Opaques) ->
+ strict(erlang, '++', 2, Xs,
fun ([X1, X2]) ->
- case t_is_nil(X1) of
+ case t_is_nil(X1, Opaques) of
true -> X2; % even if X2 is not a list
false ->
- case t_is_nil(X2) of
+ case t_is_nil(X2, Opaques) of
true -> X1;
false ->
- E1 = t_list_elements(X1),
- case t_is_cons(X1) of
+ E1 = t_list_elements(X1, Opaques),
+ case t_is_cons(X1, Opaques) of
true -> t_cons(E1, X2);
false ->
t_sup(X2, t_cons(E1, X2))
end
end
end
- end);
-type(erlang, '--', 2, Xs) ->
+ end, Opaques);
+type(erlang, '--', 2, Xs, Opaques) ->
%% We don't know which elements (if any) in X2 will be found and
%% removed from X1, even if they would have the same type. Thus, we
%% must assume that X1 can remain unchanged. However, if we succeed,
%% we know that X1 must be a proper list, but the result could
%% possibly be empty even if X1 is nonempty.
- strict(arg_types(erlang, '--', 2), Xs,
+ strict(erlang, '--', 2, Xs,
fun ([X1, X2]) ->
- case t_is_nil(X1) of
+ case t_is_nil(X1, Opaques) of
true -> t_nil();
false ->
- case t_is_nil(X2) of
+ case t_is_nil(X2, Opaques) of
true -> X1;
- false -> t_list(t_list_elements(X1))
+ false -> t_list(t_list_elements(X1, Opaques))
end
end
- end);
-type(erlang, 'and', 2, Xs) ->
- strict(arg_types(erlang, 'and', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'or', 2, Xs) ->
- strict(arg_types(erlang, 'or', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'xor', 2, Xs) ->
- strict(arg_types(erlang, 'xor', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'not', 1, Xs) ->
- strict(arg_types(erlang, 'not', 1), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'band', 2, Xs) ->
- strict(arg_types(erlang, 'band', 2), Xs,
+ end, Opaques);
+type(erlang, 'and', 2, Xs, Opaques) ->
+ strict(erlang, 'and', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'or', 2, Xs, Opaques) ->
+ strict(erlang, 'or', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'xor', 2, Xs, Opaques) ->
+ strict(erlang, 'xor', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'not', 1, Xs, Opaques) ->
+ strict(erlang, 'not', 1, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'band', 2, Xs, Opaques) ->
+ strict(erlang, 'band', 2, Xs,
fun ([X1, X2]) ->
- case arith('band', X1, X2) of
+ case arith('band', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the smallest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'band', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_inf(X1, X2), t_byte()) end);
-type(erlang, 'bor', 2, Xs) ->
- strict(arg_types(erlang, 'bor', 2), Xs,
+%% strict(erlang, 'band', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_inf(X1, X2, Opaques), t_byte()) end, Opaques);
+type(erlang, 'bor', 2, Xs, Opaques) ->
+ strict(erlang, 'bor', 2, Xs,
fun ([X1, X2]) ->
- case arith('bor', X1, X2) of
+ case arith('bor', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the largest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'bor', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end);
-type(erlang, 'bxor', 2, Xs) ->
- strict(arg_types(erlang, 'bxor', 2), Xs,
+%% strict(erlang, 'bor', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end, Opaques);
+type(erlang, 'bxor', 2, Xs, Opaques) ->
+ strict(erlang, 'bxor', 2, Xs,
fun ([X1, X2]) ->
- case arith('bxor', X1, X2) of
+ case arith('bxor', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the largest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'bxor', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end);
-type(erlang, 'bsr', 2, Xs) ->
- strict(arg_types(erlang, 'bsr', 2), Xs,
+%% strict(erlang, 'bxor', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end, Opaques);
+type(erlang, 'bsr', 2, Xs, Opaques) ->
+ strict(erlang, 'bsr', 2, Xs,
fun ([X1, X2]) ->
- case arith('bsr', X1, X2) of
+ case arith('bsr', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% If the first argument is unsigned (which is the case for
%% characters and bytes), the result is never wider. We need to kill
%% any value-sets in the result.
-%% strict(arg_types(erlang, 'bsr', 2), Xs,
-%% fun ([X, _]) -> t_sup(X, t_byte()) end);
-type(erlang, 'bsl', 2, Xs) ->
- strict(arg_types(erlang, 'bsl', 2), Xs,
+%% strict(erlang, 'bsr', 2, Xs,
+%% fun ([X, _]) -> t_sup(X, t_byte()) end, Opaques);
+type(erlang, 'bsl', 2, Xs, Opaques) ->
+ strict(erlang, 'bsl', 2, Xs,
fun ([X1, X2]) ->
- case arith('bsl', X1, X2) of
+ case arith('bsl', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% Not worth doing anything special here.
-%% strict(arg_types(erlang, 'bsl', 2), Xs, fun (_) -> t_integer() end);
-type(erlang, 'bnot', 1, Xs) ->
- strict(arg_types(erlang, 'bnot', 1), Xs,
+%% strict(erlang, 'bsl', 2, Xs, fun (_) -> t_integer() end, Opaques);
+type(erlang, 'bnot', 1, Xs, Opaques) ->
+ strict(erlang, 'bnot', 1, Xs,
fun ([X1]) ->
- case arith('bnot', X1) of
+ case arith('bnot', X1, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, abs, 1, Xs) ->
- strict(arg_types(erlang, abs, 1), Xs, fun ([X]) -> X end);
+type(erlang, abs, 1, Xs, Opaques) ->
+ strict(erlang, abs, 1, Xs, fun ([X]) -> X end, Opaques);
%% This returns (-X)-1, so it often gives a negative result.
-%% strict(arg_types(erlang, 'bnot', 1), Xs, fun (_) -> t_integer() end);
-type(erlang, append, 2, Xs) -> type(erlang, '++', 2, Xs); % alias
-type(erlang, apply, 2, Xs) ->
+%% strict(erlang, 'bnot', 1, Xs, fun (_) -> t_integer() end, Opaques);
+type(erlang, append, 2, Xs, _Opaques) -> type(erlang, '++', 2, Xs); % alias
+type(erlang, apply, 2, Xs, Opaques) ->
Fun = fun ([X, _Y]) ->
- case t_is_fun(X) of
+ case t_is_fun(X, Opaques) of
true ->
- t_fun_range(X);
+ t_fun_range(X, Opaques);
false ->
t_any()
end
end,
- strict(arg_types(erlang, apply, 2), Xs, Fun);
-type(erlang, apply, 3, Xs) ->
- strict(arg_types(erlang, apply, 3), Xs, fun (_) -> t_any() end);
+ strict(erlang, apply, 2, Xs, Fun, Opaques);
+type(erlang, apply, 3, Xs, Opaques) ->
+ strict(erlang, apply, 3, Xs, fun (_) -> t_any() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, binary_part, 2, Xs) ->
- strict(arg_types(erlang, binary_part, 2), Xs, fun (_) -> t_binary() end);
+type(erlang, binary_part, 2, Xs, Opaques) ->
+ strict(erlang, binary_part, 2, Xs, fun (_) -> t_binary() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, binary_part, 3, Xs) ->
- strict(arg_types(erlang, binary_part, 3), Xs, fun (_) -> t_binary() end);
+type(erlang, binary_part, 3, Xs, Opaques) ->
+ strict(erlang, binary_part, 3, Xs, fun (_) -> t_binary() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, bit_size, 1, Xs) ->
- strict(arg_types(erlang, bit_size, 1), Xs,
- fun (_) -> t_non_neg_integer() end);
+type(erlang, bit_size, 1, Xs, Opaques) ->
+ strict(erlang, bit_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, byte_size, 1, Xs) ->
- strict(arg_types(erlang, byte_size, 1), Xs,
- fun (_) -> t_non_neg_integer() end);
-type(erlang, disconnect_node, 1, Xs) ->
- strict(arg_types(erlang, disconnect_node, 1), Xs, fun (_) -> t_sup([t_boolean(), t_atom('ignored')]) end);
+type(erlang, byte_size, 1, Xs, Opaques) ->
+ strict(erlang, byte_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, disconnect_node, 1, Xs, Opaques) ->
+ strict(erlang, disconnect_node, 1, Xs,
+ fun (_) -> t_sup([t_boolean(), t_atom('ignored')]) end, Opaques);
%% Guard bif, needs to be here.
%% Also much more expressive than anything you could write in a spec...
-type(erlang, element, 2, Xs) ->
- strict(arg_types(erlang, element, 2), Xs,
+type(erlang, element, 2, Xs, Opaques) ->
+ strict(erlang, element, 2, Xs,
fun ([X1, X2]) ->
- case t_tuple_subtypes(X2) of
+ case t_tuple_subtypes(X2, Opaques) of
unknown -> t_any();
[_] ->
- Sz = t_tuple_size(X2),
- As = t_tuple_args(X2),
- case t_number_vals(X1) of
+ Sz = t_tuple_size(X2, Opaques),
+ As = t_tuple_args(X2, Opaques),
+ case t_number_vals(X1, Opaques) of
unknown -> t_sup(As);
Ns when is_list(Ns) ->
Fun = fun
@@ -553,165 +577,166 @@ type(erlang, element, 2, Xs) ->
Ts when is_list(Ts) ->
t_sup([type(erlang, element, 2, [X1, Y]) || Y <- Ts])
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, float, 1, Xs) ->
- strict(arg_types(erlang, float, 1), Xs, fun (_) -> t_float() end);
-type(erlang, fun_info, 1, Xs) ->
- strict(arg_types(erlang, fun_info, 1), Xs,
- fun (_) -> t_list(t_tuple([t_atom(), t_any()])) end);
-type(erlang, get_cookie, 0, _) -> t_atom(); % | t_atom('nocookie')
+type(erlang, float, 1, Xs, Opaques) ->
+ strict(erlang, float, 1, Xs, fun (_) -> t_float() end, Opaques);
+type(erlang, fun_info, 1, Xs, Opaques) ->
+ strict(erlang, fun_info, 1, Xs,
+ fun (_) -> t_list(t_tuple([t_atom(), t_any()])) end, Opaques);
+type(erlang, get_cookie, 0, _, _Opaques) -> t_atom(); % | t_atom('nocookie')
%% Guard bif, needs to be here.
-type(erlang, hd, 1, Xs) ->
- strict(arg_types(erlang, hd, 1), Xs, fun ([X]) -> t_cons_hd(X) end);
-type(erlang, integer_to_list, 2, Xs) ->
- strict(arg_types(erlang, integer_to_list, 2), Xs,
- fun (_) -> t_string() end);
-type(erlang, info, 1, Xs) -> type(erlang, system_info, 1, Xs); % alias
+type(erlang, hd, 1, Xs, Opaques) ->
+ strict(erlang, hd, 1, Xs, fun ([X]) -> t_cons_hd(X) end, Opaques);
+type(erlang, integer_to_list, 2, Xs, Opaques) ->
+ strict(erlang, integer_to_list, 2, Xs,
+ fun (_) -> t_string() end, Opaques);
+type(erlang, info, 1, Xs, _) -> type(erlang, system_info, 1, Xs); % alias
%% All type tests are guard BIF's and may be implemented in ways that
%% cannot be expressed in a type spec, why they are kept in erl_bif_types.
-type(erlang, is_atom, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_atom(Y) end, t_atom()) end,
- strict(arg_types(erlang, is_atom, 1), Xs, Fun);
-type(erlang, is_binary, 1, Xs) ->
+type(erlang, is_atom, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_binary(Y) end, t_binary())
+ check_guard(X, fun (Y) -> t_is_atom(Y, Opaques) end,
+ t_atom(), Opaques)
+ end,
+ strict(erlang, is_atom, 1, Xs, Fun, Opaques);
+type(erlang, is_binary, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_binary(Y, Opaques) end,
+ t_binary(), Opaques)
end,
- strict(arg_types(erlang, is_binary, 1), Xs, Fun);
-type(erlang, is_bitstring, 1, Xs) ->
+ strict(erlang, is_binary, 1, Xs, Fun, Opaques);
+type(erlang, is_bitstring, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_bitstr(Y) end, t_bitstr())
+ check_guard(X, fun (Y) -> t_is_bitstr(Y, Opaques) end,
+ t_bitstr(), Opaques)
end,
- strict(arg_types(erlang, is_bitstring, 1), Xs, Fun);
-type(erlang, is_boolean, 1, Xs) ->
+ strict(erlang, is_bitstring, 1, Xs, Fun, Opaques);
+type(erlang, is_boolean, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_boolean(Y) end, t_boolean())
+ check_guard(X, fun (Y) -> t_is_boolean(Y, Opaques) end,
+ t_boolean(), Opaques)
end,
- strict(arg_types(erlang, is_boolean, 1), Xs, Fun);
-type(erlang, is_float, 1, Xs) ->
+ strict(erlang, is_boolean, 1, Xs, Fun, Opaques);
+type(erlang, is_float, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_float(Y) end, t_float())
+ check_guard(X, fun (Y) -> t_is_float(Y, Opaques) end,
+ t_float(), Opaques)
end,
- strict(arg_types(erlang, is_float, 1), Xs, Fun);
-type(erlang, is_function, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_fun(Y) end, t_fun()) end,
- strict(arg_types(erlang, is_function, 1), Xs, Fun);
-type(erlang, is_function, 2, Xs) ->
+ strict(erlang, is_float, 1, Xs, Fun, Opaques);
+type(erlang, is_function, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_fun(Y, Opaques) end,
+ t_fun(), Opaques)
+ end,
+ strict(erlang, is_function, 1, Xs, Fun, Opaques);
+type(erlang, is_function, 2, Xs, Opaques) ->
Fun = fun ([FunType, ArityType]) ->
- case t_number_vals(ArityType) of
+ case t_number_vals(ArityType, Opaques) of
unknown -> t_boolean();
[Val] ->
FunConstr = t_fun(any_list(Val), t_any()),
Fun2 = fun (X) ->
t_is_subtype(X, FunConstr) andalso (not t_is_none(X))
end,
- check_guard_single(FunType, Fun2, FunConstr);
+ check_guard_single(FunType, Fun2, FunConstr, Opaques);
IntList when is_list(IntList) -> t_boolean() %% true?
end
end,
- strict(arg_types(erlang, is_function, 2), Xs, Fun);
-type(erlang, is_integer, 1, Xs) ->
+ strict(erlang, is_function, 2, Xs, Fun, Opaques);
+type(erlang, is_integer, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_integer(Y) end, t_integer())
+ check_guard(X, fun (Y) -> t_is_integer(Y, Opaques) end,
+ t_integer(), Opaques)
end,
- strict(arg_types(erlang, is_integer, 1), Xs, Fun);
-type(erlang, is_list, 1, Xs) ->
+ strict(erlang, is_integer, 1, Xs, Fun, Opaques);
+type(erlang, is_list, 1, Xs, Opaques) ->
Fun = fun (X) ->
- Fun2 = fun (Y) -> t_is_maybe_improper_list(Y) end,
- check_guard(X, Fun2, t_maybe_improper_list())
+ Fun2 = fun (Y) -> t_is_maybe_improper_list(Y, Opaques) end,
+ check_guard(X, Fun2, t_maybe_improper_list(), Opaques)
end,
- strict(arg_types(erlang, is_list, 1), Xs, Fun);
-type(erlang, is_number, 1, Xs) ->
+ strict(erlang, is_list, 1, Xs, Fun, Opaques);
+type(erlang, is_map, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_map(Y, Opaques) end,
+ t_map(), Opaques) end,
+ strict(erlang, is_map, 1, Xs, Fun, Opaques);
+type(erlang, is_number, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_number(Y) end, t_number())
+ check_guard(X, fun (Y) -> t_is_number(Y, Opaques) end,
+ t_number(), Opaques)
end,
- strict(arg_types(erlang, is_number, 1), Xs, Fun);
-type(erlang, is_pid, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_pid(Y) end, t_pid()) end,
- strict(arg_types(erlang, is_pid, 1), Xs, Fun);
-type(erlang, is_port, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_port(Y) end, t_port()) end,
- strict(arg_types(erlang, is_port, 1), Xs, Fun);
-type(erlang, is_record, 2, Xs) ->
+ strict(erlang, is_number, 1, Xs, Fun, Opaques);
+type(erlang, is_pid, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_pid(Y, Opaques) end,
+ t_pid(), Opaques)
+ end,
+ strict(erlang, is_pid, 1, Xs, Fun, Opaques);
+type(erlang, is_port, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_port(Y, Opaques) end,
+ t_port(), Opaques)
+ end,
+ strict(erlang, is_port, 1, Xs, Fun, Opaques);
+type(erlang, is_record, 2, Xs, Opaques) ->
Fun = fun ([X, Y]) ->
- case t_is_tuple(X) of
+ case t_is_tuple(X, Opaques) of
false ->
- case t_is_none(t_inf(t_tuple(), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
true ->
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_boolean();
[Tuple] ->
- case t_tuple_args(Tuple) of
+ case t_tuple_args(Tuple, Opaques) of
%% any -> t_boolean();
- [Tag|_] ->
- case t_is_atom(Tag) of
- false ->
- TagAtom = t_inf(Tag, t_atom()),
- case t_is_none(TagAtom) of
- true -> t_atom('false');
- false -> t_boolean()
- end;
- true ->
- case t_atom_vals(Tag) of
- [RealTag] ->
- case t_atom_vals(Y) of
- [RealTag] -> t_atom('true');
- _ -> t_boolean()
- end;
- _ -> t_boolean()
- end
- end
+ [Tag|_] -> check_record_tag(Tag, Y, Opaques)
end;
List when length(List) >= 2 ->
t_sup([type(erlang, is_record, 2, [T, Y]) || T <- List])
end
end
end,
- strict(arg_types(erlang, is_record, 2), Xs, Fun);
-type(erlang, is_record, 3, Xs) ->
+ strict(erlang, is_record, 2, Xs, Fun, Opaques);
+type(erlang, is_record, 3, Xs, Opaques) ->
Fun = fun ([X, Y, Z]) ->
- Arity = t_number_vals(Z),
- case t_is_tuple(X) of
+ Arity = t_number_vals(Z, Opaques),
+ case t_is_tuple(X, Opaques) of
false when length(Arity) =:= 1 ->
[RealArity] = Arity,
- case t_is_none(t_inf(t_tuple(RealArity), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(RealArity), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
false ->
- case t_is_none(t_inf(t_tuple(), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
true when length(Arity) =:= 1 ->
[RealArity] = Arity,
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_boolean();
[Tuple] ->
- case t_tuple_args(Tuple) of
+ case t_tuple_args(Tuple, Opaques) of
%% any -> t_boolean();
Args when length(Args) =:= RealArity ->
- Tag = hd(Args),
- case t_is_atom(Tag) of
- false ->
- TagAtom = t_inf(Tag, t_atom()),
- case t_is_none(TagAtom) of
- true -> t_atom('false');
- false -> t_boolean()
- end;
- true ->
- case t_atom_vals(Tag) of
- [RealTag] ->
- case t_atom_vals(Y) of
- [RealTag] -> t_atom('true');
- _ -> t_boolean()
- end;
- _ -> t_boolean()
- end
- end;
+ check_record_tag(hd(Args), Y, Opaques);
Args when length(Args) =/= RealArity ->
t_atom('false')
end;
@@ -722,62 +747,69 @@ type(erlang, is_record, 3, Xs) ->
t_boolean()
end
end,
- strict(arg_types(erlang, is_record, 3), Xs, Fun);
-type(erlang, is_reference, 1, Xs) ->
+ strict(erlang, is_record, 3, Xs, Fun, Opaques);
+type(erlang, is_reference, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_reference(Y) end, t_reference())
+ check_guard(X, fun (Y) -> t_is_reference(Y, Opaques) end,
+ t_reference(), Opaques)
end,
- strict(arg_types(erlang, is_reference, 1), Xs, Fun);
-type(erlang, is_tuple, 1, Xs) ->
+ strict(erlang, is_reference, 1, Xs, Fun, Opaques);
+type(erlang, is_tuple, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_tuple(Y) end, t_tuple())
+ check_guard(X, fun (Y) -> t_is_tuple(Y, Opaques) end,
+ t_tuple(), Opaques)
end,
- strict(arg_types(erlang, is_tuple, 1), Xs, Fun);
+ strict(erlang, is_tuple, 1, Xs, Fun, Opaques);
%% Guard bif, needs to be here.
-type(erlang, length, 1, Xs) ->
- strict(arg_types(erlang, length, 1), Xs, fun (_) -> t_non_neg_fixnum() end);
-type(erlang, make_tuple, 2, Xs) ->
- strict(arg_types(erlang, make_tuple, 2), Xs,
+type(erlang, length, 1, Xs, Opaques) ->
+ strict(erlang, length, 1, Xs, fun (_) -> t_non_neg_fixnum() end, Opaques);
+%% Guard bif, needs to be here.
+type(erlang, map_size, 1, Xs, Opaques) ->
+ strict(erlang, map_size, 1, Xs, fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, make_tuple, 2, Xs, Opaques) ->
+ strict(erlang, make_tuple, 2, Xs,
fun ([Int, _]) ->
- case t_number_vals(Int) of
+ case t_number_vals(Int, Opaques) of
[N] when is_integer(N), N >= 0 -> t_tuple(N);
_Other -> t_tuple()
end
- end);
-type(erlang, make_tuple, 3, Xs) ->
- strict(arg_types(erlang, make_tuple, 3), Xs,
+ end, Opaques);
+type(erlang, make_tuple, 3, Xs, Opaques) ->
+ strict(erlang, make_tuple, 3, Xs,
fun ([Int, _, _]) ->
- case t_number_vals(Int) of
+ case t_number_vals(Int, Opaques) of
[N] when is_integer(N), N >= 0 -> t_tuple(N);
_Other -> t_tuple()
end
- end);
-type(erlang, memory, 0, _) -> t_list(t_tuple([t_atom(), t_non_neg_fixnum()]));
-type(erlang, nif_error, 1, _) ->
- t_any(); % this BIF and the next one are stubs for NIFs and never return
-type(erlang, nif_error, 2, Xs) ->
- strict(arg_types(erlang, nif_error, 2), Xs, fun (_) -> t_any() end);
+ end, Opaques);
+type(erlang, memory, 0, _, _Opaques) ->
+ t_list(t_tuple([t_atom(), t_non_neg_fixnum()]));
+type(erlang, nif_error, 1, Xs, Opaques) ->
+ %% this BIF and the next one are stubs for NIFs and never return
+ strict(erlang, nif_error, 1, Xs, fun (_) -> t_any() end, Opaques);
+type(erlang, nif_error, 2, Xs, Opaques) ->
+ strict(erlang, nif_error, 2, Xs, fun (_) -> t_any() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, node, 0, _) -> t_node();
+type(erlang, node, 0, _, _Opaques) -> t_node();
%% Guard bif, needs to be here.
-type(erlang, node, 1, Xs) ->
- strict(arg_types(erlang, node, 1), Xs, fun (_) -> t_node() end);
+type(erlang, node, 1, Xs, Opaques) ->
+ strict(erlang, node, 1, Xs, fun (_) -> t_node() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, round, 1, Xs) ->
- strict(arg_types(erlang, round, 1), Xs, fun (_) -> t_integer() end);
+type(erlang, round, 1, Xs, Opaques) ->
+ strict(erlang, round, 1, Xs, fun (_) -> t_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, self, 0, _) -> t_pid();
-type(erlang, set_cookie, 2, Xs) ->
- strict(arg_types(erlang, set_cookie, 2), Xs, fun (_) -> t_atom('true') end);
-type(erlang, setelement, 3, Xs) ->
- strict(arg_types(erlang, setelement, 3), Xs,
+type(erlang, self, 0, _, _Opaques) -> t_pid();
+type(erlang, set_cookie, 2, Xs, Opaques) ->
+ strict(erlang, set_cookie, 2, Xs, fun (_) -> t_atom('true') end, Opaques);
+type(erlang, setelement, 3, Xs, Opaques) ->
+ strict(erlang, setelement, 3, Xs,
fun ([X1, X2, X3]) ->
- case t_tuple_subtypes(X2) of
+ case t_tuple_subtypes(X2, Opaques) of
unknown -> t_tuple();
[_] ->
- Sz = t_tuple_size(X2),
- As = t_tuple_args(X2),
- case t_number_vals(X1) of
+ Sz = t_tuple_size(X2, Opaques),
+ As = t_tuple_args(X2, Opaques),
+ case t_number_vals(X1, Opaques) of
unknown ->
t_tuple([t_sup(X, X3) || X <- As]);
[N] when is_integer(N), 1 =< N, N =< Sz ->
@@ -799,29 +831,29 @@ type(erlang, setelement, 3, Xs) ->
Ts when is_list(Ts) ->
t_sup([type(erlang, setelement, 3, [X1, Y, X3]) || Y <- Ts])
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, size, 1, Xs) ->
- strict(arg_types(erlang, size, 1), Xs, fun (_) -> t_non_neg_integer() end);
-type(erlang, spawn, 1, Xs) ->
- strict(arg_types(erlang, spawn, 1), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn, 2, Xs) ->
- strict(arg_types(erlang, spawn, 2), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn, 4, Xs) ->
- strict(arg_types(erlang, spawn, 4), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn_link, 1, Xs) -> type(erlang, spawn, 1, Xs); % same
-type(erlang, spawn_link, 2, Xs) -> type(erlang, spawn, 2, Xs); % same
-type(erlang, spawn_link, 4, Xs) -> type(erlang, spawn, 4, Xs); % same
-type(erlang, subtract, 2, Xs) -> type(erlang, '--', 2, Xs); % alias
-type(erlang, suspend_process, 1, Xs) ->
- strict(arg_types(erlang, suspend_process, 1), Xs,
- fun (_) -> t_atom('true') end);
-type(erlang, system_info, 1, Xs) ->
- strict(arg_types(erlang, system_info, 1), Xs,
+type(erlang, size, 1, Xs, Opaques) ->
+ strict(erlang, size, 1, Xs, fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, spawn, 1, Xs, Opaques) ->
+ strict(erlang, spawn, 1, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn, 2, Xs, Opaques) ->
+ strict(erlang, spawn, 2, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn, 4, Xs, Opaques) ->
+ strict(erlang, spawn, 4, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn_link, 1, Xs, _) -> type(erlang, spawn, 1, Xs); % same
+type(erlang, spawn_link, 2, Xs, _) -> type(erlang, spawn, 2, Xs); % same
+type(erlang, spawn_link, 4, Xs, _) -> type(erlang, spawn, 4, Xs); % same
+type(erlang, subtract, 2, Xs, _Opaques) -> type(erlang, '--', 2, Xs); % alias
+type(erlang, suspend_process, 1, Xs, Opaques) ->
+ strict(erlang, suspend_process, 1, Xs,
+ fun (_) -> t_atom('true') end, Opaques);
+type(erlang, system_info, 1, Xs, Opaques) ->
+ strict(erlang, system_info, 1, Xs,
fun ([Type]) ->
- case t_is_atom(Type) of
+ case t_is_atom(Type, Opaques) of
true ->
- case t_atom_vals(Type) of
+ case t_atom_vals(Type, Opaques) of
['allocated_areas'] ->
t_list(t_sup([t_tuple([t_atom(),t_non_neg_integer()]),
t_tuple([t_atom(),
@@ -880,7 +912,8 @@ type(erlang, system_info, 1, Xs) ->
t_list(t_pid());
['os_type'] ->
t_tuple([t_sup([t_atom('unix'),
- t_atom('win32')]),
+ t_atom('win32'),
+ t_atom('ose')]),
t_atom()]);
['os_version'] ->
t_sup(t_tuple([t_non_neg_fixnum(),
@@ -936,26 +969,28 @@ type(erlang, system_info, 1, Xs) ->
false -> %% This currently handles only {allocator, Alloc}
t_any() %% overapproximation as the return value might change
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, tl, 1, Xs) ->
- strict(arg_types(erlang, tl, 1), Xs, fun ([X]) -> t_cons_tl(X) end);
+type(erlang, tl, 1, Xs, Opaques) ->
+ strict(erlang, tl, 1, Xs, fun ([X]) -> t_cons_tl(X) end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, trunc, 1, Xs) ->
- strict(arg_types(erlang, trunc, 1), Xs, fun (_) -> t_integer() end);
+type(erlang, trunc, 1, Xs, Opaques) ->
+ strict(erlang, trunc, 1, Xs, fun (_) -> t_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, tuple_size, 1, Xs) ->
- strict(arg_types(erlang, tuple_size, 1), Xs, fun (_) -> t_non_neg_integer() end);
-type(erlang, tuple_to_list, 1, Xs) ->
- strict(arg_types(erlang, tuple_to_list, 1), Xs,
+type(erlang, tuple_size, 1, Xs, Opaques) ->
+ strict(erlang, tuple_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, tuple_to_list, 1, Xs, Opaques) ->
+ strict(erlang, tuple_to_list, 1, Xs,
fun ([X]) ->
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_list();
SubTypes ->
- Args = lists:flatten([t_tuple_args(ST) || ST <- SubTypes]),
+ Args = lists:append([t_tuple_args(ST, Opaques) ||
+ ST <- SubTypes]),
%% Can be nil if the tuple can be {}
case lists:any(fun (T) ->
- t_tuple_size(T) =:= 0
+ t_tuple_size(T, Opaques) =:= 0
end, SubTypes) of
true ->
%% Be careful here. If we had only {} we need to
@@ -965,279 +1000,287 @@ type(erlang, tuple_to_list, 1, Xs) ->
t_nonempty_list(t_sup(Args))
end
end
- end);
-type(erlang, yield, 0, _) -> t_atom('true');
+ end, Opaques);
+type(erlang, yield, 0, _, _Opaques) -> t_atom('true');
%%-- ets ----------------------------------------------------------------------
-type(ets, rename, 2, Xs) ->
- strict(arg_types(ets, rename, 2), Xs, fun ([_, Name]) -> Name end);
+type(ets, rename, 2, Xs, Opaques) ->
+ strict(ets, rename, 2, Xs, fun ([_, Name]) -> Name end, Opaques);
%%-- hipe_bifs ----------------------------------------------------------------
-type(hipe_bifs, add_ref, 2, Xs) ->
- strict(arg_types(hipe_bifs, add_ref, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, alloc_data, 2, Xs) ->
- strict(arg_types(hipe_bifs, alloc_data, 2), Xs,
- fun (_) -> t_integer() end); % address
-type(hipe_bifs, array, 2, Xs) ->
- strict(arg_types(hipe_bifs, array, 2), Xs, fun (_) -> t_immarray() end);
-type(hipe_bifs, array_length, 1, Xs) ->
- strict(arg_types(hipe_bifs, array_length, 1), Xs,
- fun (_) -> t_non_neg_fixnum() end);
-type(hipe_bifs, array_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, array_sub, 2), Xs, fun (_) -> t_immediate() end);
-type(hipe_bifs, array_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, array_update, 3), Xs,
- fun (_) -> t_immarray() end);
-type(hipe_bifs, atom_to_word, 1, Xs) ->
- strict(arg_types(hipe_bifs, atom_to_word, 1), Xs,
- fun (_) -> t_integer() end);
-type(hipe_bifs, bif_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, bif_address, 3), Xs,
- fun (_) -> t_sup(t_integer(), t_atom('false')) end);
-type(hipe_bifs, bitarray, 2, Xs) ->
- strict(arg_types(hipe_bifs, bitarray, 2), Xs, fun (_) -> t_bitarray() end);
-type(hipe_bifs, bitarray_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, bitarray_sub, 2), Xs, fun (_) -> t_boolean() end);
-type(hipe_bifs, bitarray_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, bitarray_update, 3), Xs,
- fun (_) -> t_bitarray() end);
-type(hipe_bifs, bytearray, 2, Xs) ->
- strict(arg_types(hipe_bifs, bytearray, 2), Xs, fun (_) -> t_bytearray() end);
-type(hipe_bifs, bytearray_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, bytearray_sub, 2), Xs, fun (_) -> t_byte() end);
-type(hipe_bifs, bytearray_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, bytearray_update, 3), Xs,
- fun (_) -> t_bytearray() end);
-type(hipe_bifs, call_count_clear, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_clear, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_get, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_get, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_off, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_off, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_on, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_on, 1), Xs,
- fun (_) -> t_sup(t_atom('true'), t_nil()) end);
-type(hipe_bifs, check_crc, 1, Xs) ->
- strict(arg_types(hipe_bifs, check_crc, 1), Xs, fun (_) -> t_boolean() end);
-type(hipe_bifs, enter_code, 2, Xs) ->
- strict(arg_types(hipe_bifs, enter_code, 2), Xs,
+type(hipe_bifs, add_ref, 2, Xs, Opaques) ->
+ strict(hipe_bifs, add_ref, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, alloc_data, 2, Xs, Opaques) ->
+ strict(hipe_bifs, alloc_data, 2, Xs,
+ fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, array, 2, Xs, Opaques) ->
+ strict(hipe_bifs, array, 2, Xs, fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, array_length, 1, Xs, Opaques) ->
+ strict(hipe_bifs, array_length, 1, Xs,
+ fun (_) -> t_non_neg_fixnum() end, Opaques);
+type(hipe_bifs, array_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, array_sub, 2, Xs, fun (_) -> t_immediate() end, Opaques);
+type(hipe_bifs, array_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, array_update, 3, Xs,
+ fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, atom_to_word, 1, Xs, Opaques) ->
+ strict(hipe_bifs, atom_to_word, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, bif_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bif_address, 3, Xs,
+ fun (_) -> t_sup(t_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, bitarray, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray, 2, Xs, fun (_) -> t_bitarray() end, Opaques);
+type(hipe_bifs, bitarray_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray_sub, 2, Xs,
+ fun (_) -> t_boolean() end, Opaques);
+type(hipe_bifs, bitarray_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray_update, 3, Xs,
+ fun (_) -> t_bitarray() end, Opaques);
+type(hipe_bifs, bytearray, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray, 2, Xs, fun (_) -> t_bytearray() end, Opaques);
+type(hipe_bifs, bytearray_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray_sub, 2, Xs, fun (_) -> t_byte() end, Opaques);
+type(hipe_bifs, bytearray_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray_update, 3, Xs,
+ fun (_) -> t_bytearray() end, Opaques);
+type(hipe_bifs, call_count_clear, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_clear, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_get, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_get, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_off, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_off, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_on, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_on, 1, Xs,
+ fun (_) -> t_sup(t_atom('true'), t_nil()) end, Opaques);
+type(hipe_bifs, check_crc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, check_crc, 1, Xs, fun (_) -> t_boolean() end, Opaques);
+type(hipe_bifs, enter_code, 2, Xs, Opaques) ->
+ strict(hipe_bifs, enter_code, 2, Xs,
fun (_) -> t_tuple([t_integer(),
%% XXX: The tuple below contains integers and
%% is of size same as the length of the MFA list
- t_sup(t_nil(), t_binary())]) end);
-type(hipe_bifs, enter_sdesc, 1, Xs) ->
- strict(arg_types(hipe_bifs, enter_sdesc, 1), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, find_na_or_make_stub, 2, Xs) ->
- strict(arg_types(hipe_bifs, find_na_or_make_stub, 2), Xs,
- fun (_) -> t_integer() end); % address
-type(hipe_bifs, fun_to_address, 1, Xs) ->
- strict(arg_types(hipe_bifs, fun_to_address, 1), Xs,
- fun (_) -> t_integer() end);
-%% type(hipe_bifs, get_emu_address, 1, Xs) ->
-%% strict(arg_types(hipe_bifs, get_emu_address, 1), Xs,
-%% fun (_) -> t_integer() end); % address
-type(hipe_bifs, get_rts_param, 1, Xs) ->
- strict(arg_types(hipe_bifs, get_rts_param, 1), Xs,
- fun (_) -> t_sup(t_integer(), t_nil()) end);
-type(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs) ->
- strict(arg_types(hipe_bifs, invalidate_funinfo_native_addresses, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, make_fe, 3, Xs) ->
- strict(arg_types(hipe_bifs, make_fe, 3), Xs, fun (_) -> t_integer() end);
-%% type(hipe_bifs, make_native_stub, 2, Xs) ->
-%% strict(arg_types(hipe_bifs, make_native_stub, 2), Xs,
-%% fun (_) -> t_integer() end); % address
-type(hipe_bifs, mark_referred_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, mark_referred_from, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, merge_term, 1, Xs) ->
- strict(arg_types(hipe_bifs, merge_term, 1), Xs, fun ([X]) -> X end);
-type(hipe_bifs, nstack_used_size, 0, _) ->
+ t_sup(t_nil(), t_binary())]) end, Opaques);
+type(hipe_bifs, enter_sdesc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, enter_sdesc, 1, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, find_na_or_make_stub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, find_na_or_make_stub, 2, Xs,
+ fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, fun_to_address, 1, Xs, Opaques) ->
+ strict(hipe_bifs, fun_to_address, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+%% type(hipe_bifs, get_emu_address, 1, Xs, Opaques) ->
+%% strict(hipe_bifs, get_emu_address, 1, Xs,
+%% fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, get_fe, 2, Xs, Opaques) ->
+ strict(hipe_bifs, get_fe, 2, Xs, fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, get_rts_param, 1, Xs, Opaques) ->
+ strict(hipe_bifs, get_rts_param, 1, Xs,
+ fun (_) -> t_sup(t_integer(), t_nil()) end, Opaques);
+type(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs, Opaques) ->
+ strict(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+%% type(hipe_bifs, make_native_stub, 2, Xs, Opaques) ->
+%% strict(hipe_bifs, make_native_stub, 2, Xs,
+%% fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, mark_referred_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, mark_referred_from, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, merge_term, 1, Xs, Opaques) ->
+ strict(hipe_bifs, merge_term, 1, Xs, fun ([X]) -> X end, Opaques);
+type(hipe_bifs, nstack_used_size, 0, _, _Opaques) ->
t_non_neg_fixnum();
-type(hipe_bifs, patch_call, 3, Xs) ->
- strict(arg_types(hipe_bifs, patch_call, 3), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, patch_insn, 3, Xs) ->
- strict(arg_types(hipe_bifs, patch_insn, 3), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, primop_address, 1, Xs) ->
- strict(arg_types(hipe_bifs, primop_address, 1), Xs,
- fun (_) -> t_sup(t_integer(), t_atom('false')) end);
-type(hipe_bifs, redirect_referred_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, redirect_referred_from, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, ref, 1, Xs) ->
- strict(arg_types(hipe_bifs, ref, 1), Xs, fun (_) -> t_immarray() end);
-type(hipe_bifs, ref_get, 1, Xs) ->
- strict(arg_types(hipe_bifs, ref_get, 1), Xs, fun (_) -> t_immediate() end);
-type(hipe_bifs, ref_set, 2, Xs) ->
- strict(arg_types(hipe_bifs, ref_set, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, remove_refs_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, remove_refs_from, 1), Xs,
- fun (_) -> t_atom('ok') end);
-type(hipe_bifs, set_funinfo_native_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, set_funinfo_native_address, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, set_native_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, set_native_address, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, system_crc, 1, Xs) ->
- strict(arg_types(hipe_bifs, system_crc, 1), Xs, fun (_) -> t_crc32() end);
-type(hipe_bifs, term_to_word, 1, Xs) ->
- strict(arg_types(hipe_bifs, term_to_word, 1), Xs,
- fun (_) -> t_integer() end);
-type(hipe_bifs, update_code_size, 3, Xs) ->
- strict(arg_types(hipe_bifs, update_code_size, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, write_u8, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u8, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, write_u32, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u32, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, write_u64, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u64, 2), Xs, fun (_) -> t_nil() end);
+type(hipe_bifs, patch_call, 3, Xs, Opaques) ->
+ strict(hipe_bifs, patch_call, 3, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, patch_insn, 3, Xs, Opaques) ->
+ strict(hipe_bifs, patch_insn, 3, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, primop_address, 1, Xs, Opaques) ->
+ strict(hipe_bifs, primop_address, 1, Xs,
+ fun (_) -> t_sup(t_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, redirect_referred_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, redirect_referred_from, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, ref, 1, Xs, Opaques) ->
+ strict(hipe_bifs, ref, 1, Xs, fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, ref_get, 1, Xs, Opaques) ->
+ strict(hipe_bifs, ref_get, 1, Xs, fun (_) -> t_immediate() end, Opaques);
+type(hipe_bifs, ref_set, 2, Xs, Opaques) ->
+ strict(hipe_bifs, ref_set, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, remove_refs_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, remove_refs_from, 1, Xs,
+ fun (_) -> t_atom('ok') end, Opaques);
+type(hipe_bifs, set_funinfo_native_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, set_funinfo_native_address, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, set_native_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, set_native_address, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, set_native_address_in_fe, 2, Xs, Opaques) ->
+ strict(hipe_bifs, set_native_address_in_fe, 2, Xs,
+ fun (_) -> t_atom('true') end, Opaques);
+type(hipe_bifs, system_crc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, system_crc, 1, Xs, fun (_) -> t_crc32() end, Opaques);
+type(hipe_bifs, term_to_word, 1, Xs, Opaques) ->
+ strict(hipe_bifs, term_to_word, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, update_code_size, 3, Xs, Opaques) ->
+ strict(hipe_bifs, update_code_size, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u8, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u8, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u32, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u32, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u64, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u64, 2, Xs, fun (_) -> t_nil() end, Opaques);
%%-- lists --------------------------------------------------------------------
-type(lists, all, 2, Xs) ->
- strict(arg_types(lists, all, 2), Xs,
+type(lists, all, 2, Xs, Opaques) ->
+ strict(lists, all, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_atom('true');
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
ok ->
- case t_is_cons(L) of
- true -> t_fun_range(F);
+ case t_is_cons(L, Opaques) of
+ true -> t_fun_range(F, Opaques);
false ->
%% The list can be empty.
- t_sup(t_atom('true'), t_fun_range(F))
+ t_sup(t_atom('true'), t_fun_range(F, Opaques))
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
- false -> t_fun_range(F)
+ false -> t_fun_range(F, Opaques)
end
end
end
- end);
-type(lists, any, 2, Xs) ->
- strict(arg_types(lists, any, 2), Xs,
+ end, Opaques);
+type(lists, any, 2, Xs, Opaques) ->
+ strict(lists, any, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_atom('false');
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
ok ->
- case t_is_cons(L) of
- true -> t_fun_range(F);
+ case t_is_cons(L, Opaques) of
+ true -> t_fun_range(F, Opaques);
false ->
%% The list can be empty
- t_sup(t_atom('false'), t_fun_range(F))
+ t_sup(t_atom('false'), t_fun_range(F, Opaques))
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
- false -> t_fun_range(F)
+ false -> t_fun_range(F, Opaques)
end
end
end
- end);
-type(lists, append, 2, Xs) -> type(erlang, '++', 2, Xs); % alias
-type(lists, delete, 2, Xs) ->
- strict(arg_types(lists, delete, 2), Xs,
+ end, Opaques);
+type(lists, append, 2, Xs, _Opaques) -> type(erlang, '++', 2, Xs); % alias
+type(lists, delete, 2, Xs, Opaques) ->
+ strict(lists, delete, 2, Xs,
fun ([_, List]) ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_cons_tl(List);
false -> List
end
- end);
-type(lists, dropwhile, 2, Xs) ->
- strict(arg_types(lists, dropwhile, 2), Xs,
+ end, Opaques);
+type(lists, dropwhile, 2, Xs, Opaques) ->
+ strict(lists, dropwhile, 2, Xs,
fun ([F, X]) ->
- case t_is_nil(X) of
+ case t_is_nil(X, Opaques) of
true -> t_nil();
false ->
- X1 = t_list_elements(X),
- case check_fun_application(F, [X1]) of
+ X1 = t_list_elements(X, Opaques),
+ case check_fun_application(F, [X1], Opaques) of
ok ->
- case t_atom_vals(t_fun_range(F)) of
+ case t_atom_vals(t_fun_range(F, Opaques), Opaques) of
['true'] ->
- case t_is_none(t_inf(t_list(), X)) of
+ case t_is_none(t_inf(t_list(), X, Opaques)) of
true -> t_none();
false -> t_nil()
end;
['false'] ->
- case t_is_none(t_inf(t_list(), X)) of
+ case t_is_none(t_inf(t_list(), X, Opaques)) of
true -> t_none();
false -> X
end;
_ ->
- t_inf(t_cons_tl(t_inf(X, t_cons())),
- t_maybe_improper_list())
+ t_inf(t_cons_tl(t_inf(X, t_cons(), Opaques)),
+ t_maybe_improper_list(), Opaques)
end;
error ->
- case t_is_cons(X) of
+ case t_is_cons(X, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, filter, 2, Xs) ->
- strict(arg_types(lists, filter, 2), Xs,
+ end, Opaques);
+type(lists, filter, 2, Xs, Opaques) ->
+ strict(lists, filter, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_nil();
false ->
- T = t_list_elements(L),
- case check_fun_application(F, [T]) of
+ T = t_list_elements(L, Opaques),
+ case check_fun_application(F, [T], Opaques) of
ok ->
- case t_atom_vals(t_fun_range(F)) =:= ['false'] of
+ RangeVals = t_atom_vals(t_fun_range(F, Opaques), Opaques),
+ case RangeVals =:= ['false'] of
true -> t_nil();
false ->
- case t_atom_vals(t_fun_range(F)) =:= ['true'] of
+ case RangeVals =:= ['true'] of
true -> L;
false -> t_list(T)
end
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, flatten, 1, Xs) ->
- strict(arg_types(lists, flatten, 1), Xs,
+ end, Opaques);
+type(lists, flatten, 1, Xs, Opaques) ->
+ strict(lists, flatten, 1, Xs,
fun ([L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L; % (nil has undefined elements)
false ->
%% Avoiding infinite recursion is tricky
- X1 = t_list_elements(L),
+ X1 = t_list_elements(L, Opaques),
case t_is_any(X1) of
true ->
t_list();
false ->
- X2 = type(lists, flatten, 1, [t_inf(X1, t_list())]),
+ X2 = type(lists, flatten, 1, [t_inf(X1, t_list(), Opaques)]),
t_sup(t_list(t_subtract(X1, t_list())), X2)
end
end
- end);
-type(lists, flatmap, 2, Xs) ->
- strict(arg_types(lists, flatmap, 2), Xs,
+ end, Opaques);
+type(lists, flatmap, 2, Xs, Opaques) ->
+ strict(lists, flatmap, 2, Xs,
fun ([F, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> t_nil();
false ->
- case check_fun_application(F, [t_list_elements(List)]) of
+ case
+ check_fun_application(F, [t_list_elements(List, Opaques)],
+ Opaques)
+ of
ok ->
- R = t_fun_range(F),
+ R = t_fun_range(F, Opaques),
case t_is_nil(R) of
true -> t_nil();
false ->
- Elems = t_list_elements(R),
- case t_is_cons(List) of
+ Elems = t_list_elements(R, Opaques),
+ case t_is_cons(List, Opaques) of
true ->
case t_is_subtype(t_nil(), R) of
true -> t_list(Elems);
@@ -1247,58 +1290,65 @@ type(lists, flatmap, 2, Xs) ->
end
end;
error ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, foreach, 2, Xs) ->
- strict(arg_types(lists, foreach, 2), Xs,
+ end, Opaques);
+type(lists, foreach, 2, Xs, Opaques) ->
+ strict(lists, foreach, 2, Xs,
fun ([F, List]) ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true ->
- case check_fun_application(F, [t_list_elements(List)]) of
+ case
+ check_fun_application(F, [t_list_elements(List, Opaques)],
+ Opaques)
+ of
ok -> t_atom('ok');
error -> t_none()
end;
false ->
t_atom('ok')
end
- end);
-type(lists, foldl, 3, Xs) ->
- strict(arg_types(lists, foldl, 3), Xs,
+ end, Opaques);
+type(lists, foldl, 3, Xs, Opaques) ->
+ strict(lists, foldl, 3, Xs,
fun ([F, Acc, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> Acc;
false ->
- case check_fun_application(F, [t_list_elements(List), Acc]) of
+ case
+ check_fun_application(F,
+ [t_list_elements(List, Opaques),Acc],
+ Opaques)
+ of
ok ->
- case t_is_cons(List) of
- true -> t_fun_range(F);
- false -> t_sup(t_fun_range(F), Acc)
+ case t_is_cons(List, Opaques) of
+ true -> t_fun_range(F, Opaques);
+ false -> t_sup(t_fun_range(F, Opaques), Acc)
end;
error ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_none();
false -> Acc
end
end
end
- end);
-type(lists, foldr, 3, Xs) -> type(lists, foldl, 3, Xs); % same
-type(lists, keydelete, 3, Xs) ->
- strict(arg_types(lists, keydelete, 3), Xs,
+ end, Opaques);
+type(lists, foldr, 3, Xs, _Opaques) -> type(lists, foldl, 3, Xs); % same
+type(lists, keydelete, 3, Xs, Opaques) ->
+ strict(lists, keydelete, 3, Xs,
fun ([_, _, L]) ->
Term = t_list_termination(L),
t_sup(Term, erl_types:lift_list_to_pos_empty(L))
- end);
-type(lists, keyfind, 3, Xs) ->
- strict(arg_types(lists, keyfind, 3), Xs,
+ end, Opaques);
+type(lists, keyfind, 3, Xs, Opaques) ->
+ strict(lists, keyfind, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
@@ -1308,58 +1358,61 @@ type(lists, keyfind, 3, Xs) ->
case t_is_any(X) of
true -> Ret;
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> Ret;
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> Ret
end
end
end
end
- end);
-type(lists, keymap, 3, Xs) ->
- strict(arg_types(lists, keymap, 3), Xs,
+ end, Opaques);
+type(lists, keymap, 3, Xs, Opaques) ->
+ strict(lists, keymap, 3, Xs,
fun ([F, _I, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L;
- false -> t_list(t_sup(t_fun_range(F), t_list_elements(L)))
+ false -> t_list(t_sup(t_fun_range(F, Opaques),
+ t_list_elements(L, Opaques)))
end
- end);
-type(lists, keymember, 3, Xs) ->
- strict(arg_types(lists, keymember, 3), Xs,
+ end, Opaques);
+type(lists, keymember, 3, Xs, Opaques) ->
+ strict(lists, keymember, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
case t_is_any(X) of
true -> t_boolean();
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> t_boolean();
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> t_boolean()
end
end
end
end
- end);
-type(lists, keymerge, 3, Xs) ->
- strict(arg_types(lists, keymerge, 3), Xs,
- fun ([_I, L1, L2]) -> type(lists, merge, 2, [L1, L2]) end);
-type(lists, keyreplace, 4, Xs) ->
- strict(arg_types(lists, keyreplace, 4), Xs,
- fun ([_K, _I, L, T]) -> t_list(t_sup(t_list_elements(L), T)) end);
-type(lists, keysearch, 3, Xs) ->
- strict(arg_types(lists, keysearch, 3), Xs,
+ end, Opaques);
+type(lists, keymerge, 3, Xs, Opaques) ->
+ strict(lists, keymerge, 3, Xs,
+ fun ([_I, L1, L2]) -> type(lists, merge, 2, [L1, L2]) end, Opaques);
+type(lists, keyreplace, 4, Xs, Opaques) ->
+ strict(lists, keyreplace, 4, Xs,
+ fun ([_K, _I, L, T]) ->
+ t_list(t_sup(t_list_elements(L, Opaques), T))
+ end, Opaques);
+type(lists, keysearch, 3, Xs, Opaques) ->
+ strict(lists, keysearch, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
@@ -1368,91 +1421,93 @@ type(lists, keysearch, 3, Xs) ->
case t_is_any(X) of
true -> Ret;
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> Ret;
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> Ret
end
end
end
end
- end);
-type(lists, keysort, 2, Xs) ->
- strict(arg_types(lists, keysort, 2), Xs, fun ([_, L]) -> L end);
-type(lists, last, 1, Xs) ->
- strict(arg_types(lists, last, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, map, 2, Xs) ->
- strict(arg_types(lists, map, 2), Xs,
+ end, Opaques);
+type(lists, keysort, 2, Xs, Opaques) ->
+ strict(lists, keysort, 2, Xs, fun ([_, L]) -> L end, Opaques);
+type(lists, last, 1, Xs, Opaques) ->
+ strict(lists, last, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, map, 2, Xs, Opaques) ->
+ strict(lists, map, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L;
false ->
- El = t_list_elements(L),
- case t_is_cons(L) of
+ El = t_list_elements(L, Opaques),
+ case t_is_cons(L, Opaques) of
true ->
- case check_fun_application(F, [El]) of
- ok -> t_nonempty_list(t_fun_range(F));
+ case check_fun_application(F, [El], Opaques) of
+ ok -> t_nonempty_list(t_fun_range(F, Opaques));
error -> t_none()
end;
false ->
- case check_fun_application(F, [El]) of
- ok -> t_list(t_fun_range(F));
+ case check_fun_application(F, [El], Opaques) of
+ ok -> t_list(t_fun_range(F, Opaques));
error -> t_nil()
end
end
end
- end);
-type(lists, mapfoldl, 3, Xs) ->
- strict(arg_types(lists, mapfoldl, 3), Xs,
+ end, Opaques);
+type(lists, mapfoldl, 3, Xs, Opaques) ->
+ strict(lists, mapfoldl, 3, Xs,
fun ([F, Acc, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> t_tuple([List, Acc]);
false ->
- El = t_list_elements(List),
- R = t_fun_range(F),
- case t_is_cons(List) of
+ El = t_list_elements(List, Opaques),
+ R = t_fun_range(F, Opaques),
+ case t_is_cons(List, Opaques) of
true ->
- case check_fun_application(F, [El, Acc]) of
+ case check_fun_application(F, [El, Acc], Opaques) of
ok ->
Fun = fun (RangeTuple) ->
- [T1, T2] = t_tuple_args(RangeTuple),
+ [T1, T2] = t_tuple_args(RangeTuple, Opaques),
t_tuple([t_nonempty_list(T1), T2])
end,
- t_sup([Fun(ST) || ST <- t_tuple_subtypes(R)]);
+ t_sup([Fun(ST) || ST <- t_tuple_subtypes(R, Opaques)]);
error ->
t_none()
end;
false ->
- case check_fun_application(F, [El, Acc]) of
+ case check_fun_application(F, [El, Acc], Opaques) of
ok ->
Fun = fun (RangeTuple) ->
- [T1, T2] = t_tuple_args(RangeTuple),
+ [T1, T2] = t_tuple_args(RangeTuple, Opaques),
t_tuple([t_list(T1), t_sup(Acc, T2)])
end,
- t_sup([Fun(ST) || ST <- t_tuple_subtypes(R)]);
+ t_sup([Fun(ST) || ST <- t_tuple_subtypes(R, Opaques)]);
error ->
t_tuple([t_nil(), Acc])
end
end
end
- end);
-type(lists, mapfoldr, 3, Xs) -> type(lists, mapfoldl, 3, Xs); % same
-type(lists, max, 1, Xs) ->
- strict(arg_types(lists, max, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, member, 2, Xs) ->
- strict(arg_types(lists, member, 2), Xs,
+ end, Opaques);
+type(lists, mapfoldr, 3, Xs, _Opaques) -> type(lists, mapfoldl, 3, Xs); % same
+type(lists, max, 1, Xs, Opaques) ->
+ strict(lists, max, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, member, 2, Xs, Opaques) ->
+ strict(lists, member, 2, Xs,
fun ([X, Y]) ->
- Y1 = t_list_elements(Y),
- case t_is_none(t_inf(Y1, X)) of
+ Y1 = t_list_elements(Y, Opaques),
+ case t_is_none(t_inf(Y1, X, Opaques)) of
true -> t_atom('false');
false -> t_boolean()
end
- end);
-%% type(lists, merge, 1, Xs) ->
-type(lists, merge, 2, Xs) ->
- strict(arg_types(lists, merge, 2), Xs,
+ end, Opaques);
+%% type(lists, merge, 1, Xs, Opaques) ->
+type(lists, merge, 2, Xs, Opaques) ->
+ strict(lists, merge, 2, Xs,
fun ([L1, L2]) ->
case t_is_none(L1) of
true -> L2;
@@ -1462,30 +1517,31 @@ type(lists, merge, 2, Xs) ->
false -> t_sup(L1, L2)
end
end
- end);
-type(lists, min, 1, Xs) ->
- strict(arg_types(lists, min, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, nth, 2, Xs) ->
- strict(arg_types(lists, nth, 2), Xs,
- fun ([_, Y]) -> t_list_elements(Y) end);
-type(lists, nthtail, 2, Xs) ->
- strict(arg_types(lists, nthtail, 2), Xs,
- fun ([_, Y]) -> t_sup(Y, t_list()) end);
-type(lists, partition, 2, Xs) ->
- strict(arg_types(lists, partition, 2), Xs,
+ end, Opaques);
+type(lists, min, 1, Xs, Opaques) ->
+ strict(lists, min, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, nth, 2, Xs, Opaques) ->
+ strict(lists, nth, 2, Xs,
+ fun ([_, Y]) -> t_list_elements(Y, Opaques) end, Opaques);
+type(lists, nthtail, 2, Xs, Opaques) ->
+ strict(lists, nthtail, 2, Xs,
+ fun ([_, Y]) -> t_sup(Y, t_list()) end, Opaques);
+type(lists, partition, 2, Xs, Opaques) ->
+ strict(lists, partition, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_tuple([L,L]);
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
false -> t_tuple([t_nil(), t_nil()])
end;
ok ->
- case t_atom_vals(t_fun_range(F)) of
+ case t_atom_vals(t_fun_range(F, Opaques), Opaques) of
['true'] -> t_tuple([L, t_nil()]);
['false'] -> t_tuple([t_nil(), L]);
[_, _] ->
@@ -1494,123 +1550,131 @@ type(lists, partition, 2, Xs) ->
end
end
end
- end);
-type(lists, reverse, 1, Xs) ->
- strict(arg_types(lists, reverse, 1), Xs, fun ([X]) -> X end);
-type(lists, reverse, 2, Xs) ->
+ end, Opaques);
+type(lists, reverse, 1, Xs, Opaques) ->
+ strict(lists, reverse, 1, Xs, fun ([X]) -> X end, Opaques);
+type(lists, reverse, 2, Xs, _Opaques) ->
type(erlang, '++', 2, Xs); % reverse-onto is just like append
-type(lists, sort, 1, Xs) ->
- strict(arg_types(lists, sort, 1), Xs, fun ([X]) -> X end);
-type(lists, sort, 2, Xs) ->
- strict(arg_types(lists, sort, 2), Xs,
+type(lists, sort, 1, Xs, Opaques) ->
+ strict(lists, sort, 1, Xs, fun ([X]) -> X end, Opaques);
+type(lists, sort, 2, Xs, Opaques) ->
+ strict(lists, sort, 2, Xs,
fun ([F, L]) ->
- R = t_fun_range(F),
- case t_is_boolean(R) of
+ R = t_fun_range(F, Opaques),
+ case t_is_boolean(R, Opaques) of
true -> L;
false ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_nil();
false -> t_none()
end
end
- end);
-type(lists, split, 2, Xs) ->
- strict(arg_types(lists, split, 2), Xs,
+ end, Opaques);
+type(lists, split, 2, Xs, Opaques) ->
+ strict(lists, split, 2, Xs,
fun ([_, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_tuple([L, L]);
false ->
- T = t_list_elements(L),
+ T = t_list_elements(L, Opaques),
t_tuple([t_list(T), t_list(T)])
end
- end);
-type(lists, splitwith, 2, Xs) ->
+ end, Opaques);
+type(lists, splitwith, 2, Xs, _Opaques) ->
T1 = type(lists, takewhile, 2, Xs),
T2 = type(lists, dropwhile, 2, Xs),
case t_is_none(T1) orelse t_is_none(T2) of
true -> t_none();
false -> t_tuple([T1, T2])
end;
-type(lists, subtract, 2, Xs) -> type(erlang, '--', 2, Xs); % alias
-type(lists, takewhile, 2, Xs) ->
- strict(arg_types(lists, takewhile, 2), Xs,
+type(lists, subtract, 2, Xs, _Opaques) -> type(erlang, '--', 2, Xs); % alias
+type(lists, takewhile, 2, Xs, Opaques) ->
+ strict(lists, takewhile, 2, Xs,
fun([F, L]) ->
- case t_is_none(t_inf(t_list(), L)) of
+ case t_is_none(t_inf(t_list(), L, Opaques)) of
false -> type(lists, filter, 2, Xs);
true ->
%% This works for non-proper lists as well.
- El = t_list_elements(L),
+ El = t_list_elements(L, Opaques),
type(lists, filter, 2, [F, t_list(El)])
end
- end);
-type(lists, usort, 1, Xs) -> type(lists, sort, 1, Xs); % same
-type(lists, usort, 2, Xs) -> type(lists, sort, 2, Xs); % same
-type(lists, unzip, 1, Xs) ->
- strict(arg_types(lists, unzip, 1), Xs,
+ end, Opaques);
+type(lists, usort, 1, Xs, _Opaques) -> type(lists, sort, 1, Xs); % same
+type(lists, usort, 2, Xs, _Opaques) -> type(lists, sort, 2, Xs); % same
+type(lists, unzip, 1, Xs, Opaques) ->
+ strict(lists, unzip, 1, Xs,
fun ([Ps]) ->
- case t_is_nil(Ps) of
+ case t_is_nil(Ps, Opaques) of
true ->
t_tuple([t_nil(), t_nil()]);
false -> % Ps is a proper list of pairs
- TupleTypes = t_tuple_subtypes(t_list_elements(Ps)),
+ TupleTypes = t_tuple_subtypes(t_list_elements(Ps, Opaques),
+ Opaques),
lists:foldl(fun(Tuple, Acc) ->
- [A, B] = t_tuple_args(Tuple),
+ [A, B] = t_tuple_args(Tuple, Opaques),
t_sup(t_tuple([t_list(A), t_list(B)]), Acc)
end, t_none(), TupleTypes)
end
- end);
-type(lists, unzip3, 1, Xs) ->
- strict(arg_types(lists, unzip3, 1), Xs,
+ end, Opaques);
+type(lists, unzip3, 1, Xs, Opaques) ->
+ strict(lists, unzip3, 1, Xs,
fun ([Ts]) ->
- case t_is_nil(Ts) of
+ case t_is_nil(Ts, Opaques) of
true ->
t_tuple([t_nil(), t_nil(), t_nil()]);
false -> % Ps is a proper list of triples
- TupleTypes = t_tuple_subtypes(t_list_elements(Ts)),
+ TupleTypes = t_tuple_subtypes(t_list_elements(Ts, Opaques),
+ Opaques),
lists:foldl(fun(T, Acc) ->
- [A, B, C] = t_tuple_args(T),
+ [A, B, C] = t_tuple_args(T, Opaques),
t_sup(t_tuple([t_list(A),
t_list(B),
t_list(C)]),
Acc)
end, t_none(), TupleTypes)
end
- end);
-type(lists, zip, 2, Xs) ->
- strict(arg_types(lists, zip, 2), Xs,
+ end, Opaques);
+type(lists, zip, 2, Xs, Opaques) ->
+ strict(lists, zip, 2, Xs,
fun ([As, Bs]) ->
- case (t_is_nil(As) orelse t_is_nil(Bs)) of
+ case (t_is_nil(As, Opaques) orelse t_is_nil(Bs, Opaques)) of
true -> t_nil();
false ->
- A = t_list_elements(As),
- B = t_list_elements(Bs),
+ A = t_list_elements(As, Opaques),
+ B = t_list_elements(Bs, Opaques),
t_list(t_tuple([A, B]))
end
- end);
-type(lists, zip3, 3, Xs) ->
- strict(arg_types(lists, zip3, 3), Xs,
+ end, Opaques);
+type(lists, zip3, 3, Xs, Opaques) ->
+ strict(lists, zip3, 3, Xs,
fun ([As, Bs, Cs]) ->
- case (t_is_nil(As) orelse t_is_nil(Bs) orelse t_is_nil(Cs)) of
+ case
+ (t_is_nil(As, Opaques)
+ orelse t_is_nil(Bs, Opaques)
+ orelse t_is_nil(Cs, Opaques))
+ of
true -> t_nil();
false ->
- A = t_list_elements(As),
- B = t_list_elements(Bs),
- C = t_list_elements(Cs),
+ A = t_list_elements(As, Opaques),
+ B = t_list_elements(Bs, Opaques),
+ C = t_list_elements(Cs, Opaques),
t_list(t_tuple([A, B, C]))
end
- end);
-type(lists, zipwith, 3, Xs) ->
- strict(arg_types(lists, zipwith, 3), Xs,
- fun ([F, _As, _Bs]) -> t_sup(t_list(t_fun_range(F)), t_nil()) end);
-type(lists, zipwith3, 4, Xs) ->
- strict(arg_types(lists, zipwith3, 4), Xs,
- fun ([F,_As,_Bs,_Cs]) -> t_sup(t_list(t_fun_range(F)), t_nil()) end);
+ end, Opaques);
+type(lists, zipwith, 3, Xs, Opaques) ->
+ strict(lists, zipwith, 3, Xs,
+ fun ([F, _As, _Bs]) -> t_sup(t_list(t_fun_range(F, Opaques)),
+ t_nil()) end, Opaques);
+type(lists, zipwith3, 4, Xs, Opaques) ->
+ strict(lists, zipwith3, 4, Xs,
+ fun ([F,_As,_Bs,_Cs]) -> t_sup(t_list(t_fun_range(F, Opaques)),
+ t_nil()) end, Opaques);
%%-- string -------------------------------------------------------------------
-type(string, chars, 2, Xs) -> % NOTE: added to avoid loss of information
- strict(arg_types(string, chars, 2), Xs, fun (_) -> t_string() end);
-type(string, chars, 3, Xs) -> % NOTE: added to avoid loss of information
- strict(arg_types(string, chars, 3), Xs,
+type(string, chars, 2, Xs, Opaques) -> % NOTE: added to avoid loss of info
+ strict(string, chars, 2, Xs, fun (_) -> t_string() end, Opaques);
+type(string, chars, 3, Xs, Opaques) -> % NOTE: added to avoid loss of info
+ strict(string, chars, 3, Xs,
fun ([Char, N, Tail]) ->
case t_is_nil(Tail) of
true ->
@@ -1623,10 +1687,10 @@ type(string, chars, 3, Xs) -> % NOTE: added to avoid loss of information
t_sup(t_sup(t_string(), Tail), t_cons(Char, Tail))
end
end
- end);
+ end, Opaques);
%%-----------------------------------------------------------------------------
-type(M, F, A, Xs) when is_atom(M), is_atom(F),
+type(M, F, A, Xs, _O) when is_atom(M), is_atom(F),
is_integer(A), 0 =< A, A =< 255 ->
strict(Xs, t_any()). % safe approximation for all functions.
@@ -1635,13 +1699,20 @@ type(M, F, A, Xs) when is_atom(M), is_atom(F),
%% Auxiliary functions
%%-----------------------------------------------------------------------------
-strict(Xs, Ts, F) ->
- %% io:format("inf lists arg~n1:~p~n2:~p ~n", [Xs, Ts]),
- Xs1 = inf_lists(Xs, Ts),
+strict(M, F, A, Xs, Fun, Opaques) ->
+ Ts = arg_types(M, F, A),
+ %% io:format("inf lists arg~nXs: ~p~nTs: ~p ~n", [Xs, Ts]),
+ Xs1 = inf_lists(Xs, Ts, Opaques),
%% io:format("inf lists return ~p ~n", [Xs1]),
case any_is_none_or_unit(Xs1) of
true -> t_none();
- false -> F(Xs1)
+ false -> Fun(Xs1)
+ end.
+
+strict2(Xs, X) ->
+ case any_is_none_or_unit(Xs) of
+ true -> t_none();
+ false -> X
end.
strict(Xs, X) ->
@@ -1650,9 +1721,9 @@ strict(Xs, X) ->
false -> X
end.
-inf_lists([X | Xs], [T | Ts]) ->
- [t_inf(X, T) | inf_lists(Xs, Ts)];
-inf_lists([], []) ->
+inf_lists([X | Xs], [T | Ts], Opaques) ->
+ [t_inf(X, T, Opaques) | inf_lists(Xs, Ts, Opaques)];
+inf_lists([], [], _Opaques) ->
[].
any_list(N) -> any_list(N, t_any()).
@@ -1670,20 +1741,43 @@ list_replace(1, E, [_X | Xs]) ->
any_is_none_or_unit(Ts) ->
lists:any(fun erl_types:t_is_none_or_unit/1, Ts).
-check_guard([X], Test, Type) ->
- check_guard_single(X, Test, Type).
+check_guard([X], Test, Type, Opaques) ->
+ check_guard_single(X, Test, Type, Opaques).
-check_guard_single(X, Test, Type) ->
+check_guard_single(X, Test, Type, Opaques) ->
case Test(X) of
true -> t_atom('true');
false ->
- case erl_types:t_is_opaque(X) of
- true -> t_none();
- false ->
- case t_is_none(t_inf(Type, X)) of
- true -> t_atom('false');
- false -> t_boolean()
- end
+ case t_is_none(t_inf(Type, X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
+ false -> t_boolean()
+ end
+ end.
+
+check_record_tag(Tag, Y, Opaques) ->
+ case t_is_atom(Tag, Opaques) of
+ false ->
+ TagAtom = t_inf(Tag, t_atom(), Opaques),
+ case t_is_none(TagAtom) of
+ true ->
+ case t_has_opaque_subtype(Tag, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
+ false -> t_boolean()
+ end;
+ true ->
+ case t_atom_vals(Tag, Opaques) of
+ [RealTag] ->
+ case t_atom_vals(Y, Opaques) of
+ [RealTag] -> t_atom('true');
+ _ -> t_boolean()
+ end;
+ _ -> t_boolean()
end
end.
@@ -1797,7 +1891,11 @@ infinity_add(neg_inf, _Number) -> neg_inf;
infinity_add(_Number, pos_inf) -> pos_inf;
infinity_add(_Number, neg_inf) -> neg_inf;
infinity_add(Number1, Number2) when is_integer(Number1), is_integer(Number2) ->
- Number1 + Number2.
+ try Number1 + Number2
+ catch
+ error:system_limit when Number1 < 0 -> neg_inf;
+ error:system_limit -> pos_inf
+ end.
infinity_mult(neg_inf, Number) ->
Greater = infinity_geq(Number, 0),
@@ -1808,7 +1906,13 @@ infinity_mult(pos_inf, Number) -> infinity_inv(infinity_mult(neg_inf, Number));
infinity_mult(Number, pos_inf) -> infinity_inv(infinity_mult(neg_inf, Number));
infinity_mult(Number, neg_inf) -> infinity_mult(neg_inf, Number);
infinity_mult(Number1, Number2) when is_integer(Number1), is_integer(Number2)->
- Number1 * Number2.
+ try Number1 * Number2
+ catch
+ error:system_limit ->
+ if (Number1 >= 0) =:= (Number2 >= 0) -> pos_inf;
+ true -> neg_inf
+ end
+ end.
width({Min, Max}) -> infinity_max([width(Min), width(Max)]);
width(pos_inf) -> pos_inf;
@@ -1828,12 +1932,12 @@ negwidth(X, N) ->
false -> negwidth(X, N+1)
end.
-arith('bnot', X1) ->
- case t_is_integer(X1) of
+arith('bnot', X1, Opaques) ->
+ case t_is_integer(X1, Opaques) of
false -> error;
true ->
- Min1 = number_min(X1),
- Max1 = number_max(X1),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
{ok, t_from_range(infinity_add(infinity_inv(Max1), -1),
infinity_add(infinity_inv(Min1), -1))}
end.
@@ -1907,13 +2011,13 @@ arith_bor_range_set({Min, Max}, [Int|IntList]) ->
IntList),
{infinity_bor(Min, SafeAnd), infinity_bor(Max, SafeAnd)}.
-arith_band(X1, X2) ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+arith_band(X1, X2, Opaques) ->
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
case {L1 =:= unknown, L2 =:= unknown} of
{true, false} ->
arith_band_range_set(arith_band_ranges(Min1, Max1, Min2, Max2), L2);
@@ -1923,13 +2027,13 @@ arith_band(X1, X2) ->
arith_band_ranges(Min1, Max1, Min2, Max2)
end.
-arith_bor(X1, X2) ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+arith_bor(X1, X2, Opaques) ->
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
case {L1 =:= unknown, L2 =:= unknown} of
{true, false} ->
arith_bor_range_set(arith_bor_ranges(Min1, Max1, Min2, Max2), L2);
@@ -1967,19 +2071,19 @@ arith_bor_ranges(Min1, Max1, Min2, Max2) ->
end,
{Min, Max}.
-arith(Op, X1, X2) ->
+arith(Op, X1, X2, Opaques) ->
%% io:format("arith ~p ~p ~p~n", [Op, X1, X2]),
- case t_is_integer(X1) andalso t_is_integer(X2) of
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
false -> error;
true ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
case (L1 =:= unknown) orelse (L2 =:= unknown) of
true ->
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
{NewMin, NewMax} =
case Op of
'+' -> {infinity_add(Min1, Min2), infinity_add(Max1, Max2)};
@@ -1992,8 +2096,8 @@ arith(Op, X1, X2) ->
'bsr' -> NewMin2 = infinity_inv(Max2),
NewMax2 = infinity_inv(Min2),
arith_bsl(Min1, Max1, NewMin2, NewMax2);
- 'band' -> arith_band(X1, X2);
- 'bor' -> arith_bor(X1, X2);
+ 'band' -> arith_band(X1, X2, Opaques);
+ 'bor' -> arith_bor(X1, X2, Opaques);
'bxor' -> arith_bor_ranges(Min1, Max1, Min2, Max2) %% overaprox.
end,
%% io:format("done arith ~p = ~p~n", [Op, {NewMin, NewMax}]),
@@ -2025,58 +2129,62 @@ arith(Op, X1, X2) ->
%% Comparison of terms
%%=============================================================================
-compare(Op, Lhs, Rhs) ->
- case t_is_none(t_inf(Lhs, Rhs)) of
+compare(Op, Lhs, Rhs, Opaques) ->
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
false -> t_boolean();
true ->
- case Op of
- '<' -> always_smaller(Lhs, Rhs);
- '>' -> always_smaller(Rhs, Lhs);
- '=<' -> always_smaller(Lhs, Rhs);
- '>=' -> always_smaller(Rhs, Lhs)
+ case opaque_args(erlang, Op, 2, [Lhs, Rhs], Opaques) =:= [] of
+ true ->
+ case Op of
+ '<' -> always_smaller(Lhs, Rhs, Opaques);
+ '>' -> always_smaller(Rhs, Lhs, Opaques);
+ '=<' -> always_smaller(Lhs, Rhs, Opaques);
+ '>=' -> always_smaller(Rhs, Lhs, Opaques)
+ end;
+ false -> t_none()
end
end.
-always_smaller(Type1, Type2) ->
- {Min1, Max1} = type_ranks(Type1),
- {Min2, Max2} = type_ranks(Type2),
+always_smaller(Type1, Type2, Opaques) ->
+ {Min1, Max1} = type_ranks(Type1, Opaques),
+ {Min2, Max2} = type_ranks(Type2, Opaques),
if Max1 < Min2 -> t_atom('true');
Min1 > Max2 -> t_atom('false');
true -> t_boolean()
end.
-type_ranks(Type) ->
- type_ranks(Type, 1, 0, 0, type_order()).
+type_ranks(Type, Opaques) ->
+ type_ranks(Type, 1, 0, 0, type_order(), Opaques).
-type_ranks(_Type, _I, Min, Max, []) -> {Min, Max};
-type_ranks(Type, I, Min, Max, [TypeClass|Rest]) ->
+type_ranks(_Type, _I, Min, Max, [], _Opaques) -> {Min, Max};
+type_ranks(Type, I, Min, Max, [TypeClass|Rest], Opaques) ->
{NewMin, NewMax} =
- case t_is_none(t_inf(Type, TypeClass)) of
+ case t_is_none(t_inf(Type, TypeClass, Opaques)) of
true -> {Min, Max};
false -> case Min of
0 -> {I, I};
_ -> {Min, I}
end
end,
- type_ranks(Type, I+1, NewMin, NewMax, Rest).
+ type_ranks(Type, I+1, NewMin, NewMax, Rest, Opaques).
type_order() ->
[t_number(), t_atom(), t_reference(), t_fun(), t_port(), t_pid(), t_tuple(),
t_list(), t_binary()].
-key_comparisons_fail(X0, KeyPos, TupleList) ->
- X = case t_is_number(t_inf(X0, t_number())) of
+key_comparisons_fail(X0, KeyPos, TupleList, Opaques) ->
+ X = case t_is_number(t_inf(X0, t_number(), Opaques), Opaques) of
false -> X0;
true -> t_number()
end,
lists:all(fun(Tuple) ->
Key = type(erlang, element, 2, [KeyPos, Tuple]),
- t_is_none(t_inf(Key, X))
+ t_is_none(t_inf(Key, X, Opaques))
end, TupleList).
%%=============================================================================
--spec arg_types(atom(), atom(), arity()) -> [erl_types:erl_type()] | 'unknown'.
+-spec arg_types(atom(), atom(), arity()) -> arg_types() | 'unknown'.
%%------- erlang --------------------------------------------------------------
arg_types(erlang, '!', 2) ->
@@ -2213,6 +2321,8 @@ arg_types(erlang, is_integer, 1) ->
[t_any()];
arg_types(erlang, is_list, 1) ->
[t_any()];
+arg_types(erlang, is_map, 1) ->
+ [t_any()];
arg_types(erlang, is_number, 1) ->
[t_any()];
arg_types(erlang, is_pid, 1) ->
@@ -2230,6 +2340,9 @@ arg_types(erlang, is_tuple, 1) ->
%% Guard bif, needs to be here.
arg_types(erlang, length, 1) ->
[t_list()];
+%% Guard bif, needs to be here.
+arg_types(erlang, map_size, 1) ->
+ [t_map()];
arg_types(erlang, make_tuple, 2) ->
[t_non_neg_fixnum(), t_any()]; % the value 0 is OK as first argument
arg_types(erlang, make_tuple, 3) ->
@@ -2351,12 +2464,12 @@ arg_types(hipe_bifs, fun_to_address, 1) ->
[t_mfa()];
%% arg_types(hipe_bifs, get_emu_address, 1) ->
%% [t_mfa()];
+arg_types(hipe_bifs, get_fe, 2) ->
+ [t_atom(), t_tuple([t_integer(), t_integer(), t_integer()])];
arg_types(hipe_bifs, get_rts_param, 1) ->
[t_fixnum()];
arg_types(hipe_bifs, invalidate_funinfo_native_addresses, 1) ->
[t_list(t_mfa())];
-arg_types(hipe_bifs, make_fe, 3) ->
- [t_integer(), t_atom(), t_tuple([t_integer(), t_integer(), t_integer()])];
%% arg_types(hipe_bifs, make_native_stub, 2) ->
%% [t_integer(), t_arity()];
arg_types(hipe_bifs, mark_referred_from, 1) ->
@@ -2385,6 +2498,8 @@ arg_types(hipe_bifs, set_funinfo_native_address, 3) ->
arg_types(hipe_bifs, set_native_address, 3);
arg_types(hipe_bifs, set_native_address, 3) ->
[t_mfa(), t_integer(), t_boolean()];
+arg_types(hipe_bifs, set_native_address_in_fe, 2) ->
+ [t_integer(), t_integer()];
arg_types(hipe_bifs, system_crc, 1) ->
[t_crc32()];
arg_types(hipe_bifs, term_to_word, 1) ->
@@ -2508,47 +2623,80 @@ arg_types(M, F, A) when is_atom(M), is_atom(F),
unknown. % safe approximation for all functions.
--spec is_known(atom(), atom(), arity()) -> boolean().
+-spec is_known(module(), atom(), arity()) -> boolean().
is_known(M, F, A) ->
arg_types(M, F, A) =/= unknown.
+-spec opaque_args(module(), atom(), arity(),
+ arg_types(), opaques()) -> [pos_integer()].
+
+%% Use this function to find out which argument caused empty type.
+
+opaque_args(_M, _F, _A, _Xs, 'universe') -> [];
+opaque_args(M, F, A, Xs, Opaques) ->
+ case kind_of_check(M, F, A) of
+ record ->
+ [X,Y|_] = Xs,
+ [1 ||
+ case t_is_tuple(X, Opaques) of
+ true ->
+ case t_tuple_subtypes(X, Opaques) of
+ unknown -> false;
+ List when length(List) >= 1 ->
+ (t_is_atom(Y, Opaques) andalso
+ opaque_recargs(List, Y, Opaques))
+ end;
+ false -> t_has_opaque_subtype(X, Opaques)
+ end];
+ subtype ->
+ [N ||
+ {N, X} <- lists:zip(lists:seq(1, length(Xs)), Xs),
+ t_has_opaque_subtype(X, Opaques)];
+ find_unknown ->
+ [L, R] = Xs,
+ erl_types:t_find_unknown_opaque(L, R, Opaques);
+ no_check -> []
+ end.
--spec structure_inspecting_args(atom(), atom(), arity()) -> [1..255].
-
-structure_inspecting_args(erlang, element, 2) -> [2];
-structure_inspecting_args(erlang, is_atom, 1) -> [1];
-structure_inspecting_args(erlang, is_boolean, 1) -> [1];
-structure_inspecting_args(erlang, is_binary, 1) -> [1];
-structure_inspecting_args(erlang, is_bitstring, 1) -> [1];
-structure_inspecting_args(erlang, is_float, 1) -> [1];
-structure_inspecting_args(erlang, is_function, 1) -> [1];
-structure_inspecting_args(erlang, is_integer, 1) -> [1];
-structure_inspecting_args(erlang, is_list, 1) -> [1];
-structure_inspecting_args(erlang, is_number, 1) -> [1];
-structure_inspecting_args(erlang, is_pid, 1) -> [1];
-structure_inspecting_args(erlang, is_port, 1) -> [1];
-structure_inspecting_args(erlang, is_reference, 1) -> [1];
-structure_inspecting_args(erlang, is_tuple, 1) -> [1];
-structure_inspecting_args(erlang, length, 1) -> [1];
-%%structure_inspecting_args(erlang, setelement, 3) -> [2].
-structure_inspecting_args(_, _, _) -> []. % XXX: assume no arg needs inspection
-
-
-check_fun_application(Fun, Args) ->
- case t_is_fun(Fun) of
+kind_of_check(erlang, is_record, 3) ->
+ record;
+kind_of_check(erlang, is_record, 2) ->
+ record;
+kind_of_check(erlang, F, A) ->
+ case erl_internal:guard_bif(F, A) orelse erl_internal:bool_op(F, A) of
+ true -> subtype;
+ false ->
+ case erl_internal:comp_op(F, A) of
+ true -> find_unknown;
+ false -> no_check
+ end
+ end;
+kind_of_check(_M, _F, _A) -> no_check.
+
+opaque_recargs(Tuples, Y, Opaques) ->
+ Fun = fun(Tuple) ->
+ case t_tuple_args(Tuple, Opaques) of
+ [Tag|_] -> t_is_none(check_record_tag(Tag, Y, Opaques));
+ _ -> false
+ end
+ end,
+ lists:all(Fun, Tuples).
+
+check_fun_application(Fun, Args, Opaques) ->
+ case t_is_fun(Fun, Opaques) of
true ->
- case t_fun_args(Fun) of
+ case t_fun_args(Fun, Opaques) of
unknown ->
- case t_is_none_or_unit(t_fun_range(Fun)) of
+ case t_is_none_or_unit(t_fun_range(Fun, Opaques)) of
true -> error;
false -> ok
end;
FunDom when length(FunDom) =:= length(Args) ->
- case any_is_none_or_unit(inf_lists(FunDom, Args)) of
+ case any_is_none_or_unit(inf_lists(FunDom, Args, Opaques)) of
true -> error;
false ->
- case t_is_none_or_unit(t_fun_range(Fun)) of
+ case t_is_none_or_unit(t_fun_range(Fun, Opaques)) of
true -> error;
false -> ok
end
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index d7d8a878c5..4215448c61 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,15 +42,15 @@
max/2,
module_builtin_opaques/1,
min/2,
- number_max/1,
- number_min/1,
+ number_max/1, number_max/2,
+ number_min/1, number_min/2,
t_abstract_records/2,
t_any/0,
t_arity/0,
t_atom/0,
t_atom/1,
t_atoms/1,
- t_atom_vals/1,
+ t_atom_vals/1, t_atom_vals/2,
t_binary/0,
t_bitstr/0,
t_bitstr/2,
@@ -66,12 +66,14 @@
t_collect_vars/1,
t_cons/0,
t_cons/2,
- t_cons_hd/1,
- t_cons_tl/1,
+ t_cons_hd/1, t_cons_hd/2,
+ t_cons_tl/1, t_cons_tl/2,
t_constant/0,
- t_contains_opaque/1,
+ t_contains_opaque/1, t_contains_opaque/2,
+ t_decorate_with_opaque/3,
t_elements/1,
- t_find_opaque_mismatch/2,
+ t_find_opaque_mismatch/3,
+ t_find_unknown_opaque/3,
t_fixnum/0,
t_map/2,
t_non_neg_fixnum/0,
@@ -87,18 +89,18 @@
t_fun/0,
t_fun/1,
t_fun/2,
- t_fun_args/1,
- t_fun_arity/1,
- t_fun_range/1,
- t_has_opaque_subtype/1,
+ t_fun_args/1, t_fun_args/2,
+ t_fun_arity/1, t_fun_arity/2,
+ t_fun_range/1, t_fun_range/2,
+ t_has_opaque_subtype/2,
t_has_var/1,
t_identifier/0,
%% t_improper_list/2,
- t_inf/2,
- t_inf/3,
- t_inf_lists/2,
- t_inf_lists/3,
- t_inf_lists_masked/3,
+ t_inf/1,
+ t_inf/2,
+ t_inf/3,
+ t_inf_lists/2,
+ t_inf_lists/3,
t_integer/0,
t_integer/1,
t_non_neg_integer/0,
@@ -107,45 +109,49 @@
t_iodata/0,
t_iolist/0,
t_is_any/1,
- t_is_atom/1,
- t_is_atom/2,
- t_is_binary/1,
- t_is_bitstr/1,
+ t_is_atom/1, t_is_atom/2,
+ t_is_any_atom/2, t_is_any_atom/3,
+ t_is_binary/1, t_is_binary/2,
+ t_is_bitstr/1, t_is_bitstr/2,
t_is_bitwidth/1,
- t_is_boolean/1,
+ t_is_boolean/1, t_is_boolean/2,
%% t_is_byte/1,
%% t_is_char/1,
- t_is_cons/1,
+ t_is_cons/1, t_is_cons/2,
t_is_constant/1,
t_is_equal/2,
t_is_fixnum/1,
- t_is_float/1,
- t_is_fun/1,
+ t_is_float/1, t_is_float/2,
+ t_is_fun/1, t_is_fun/2,
t_is_instance/2,
- t_is_integer/1,
+ t_is_integer/1, t_is_integer/2,
t_is_list/1,
+ t_is_map/1,
+ t_is_map/2,
t_is_matchstate/1,
- t_is_nil/1,
+ t_is_nil/1, t_is_nil/2,
t_is_non_neg_integer/1,
t_is_none/1,
t_is_none_or_unit/1,
- t_is_number/1,
- t_is_opaque/1,
- t_is_pid/1,
- t_is_port/1,
- t_is_maybe_improper_list/1,
- t_is_reference/1,
+ t_is_number/1, t_is_number/2,
+ t_is_opaque/1, t_is_opaque/2,
+ t_is_pid/1, t_is_pid/2,
+ t_is_port/1, t_is_port/2,
+ t_is_maybe_improper_list/1, t_is_maybe_improper_list/2,
+ t_is_reference/1, t_is_reference/2,
t_is_remote/1,
t_is_string/1,
t_is_subtype/2,
- t_is_tuple/1,
+ t_is_tuple/1, t_is_tuple/2,
t_is_unit/1,
t_is_var/1,
t_limit/2,
t_list/0,
t_list/1,
- t_list_elements/1,
+ t_list_elements/1, t_list_elements/2,
t_list_termination/1,
+ t_map/0,
+ t_map/1,
t_matchstate/0,
t_matchstate/2,
t_matchstate_present/1,
@@ -163,11 +169,8 @@
t_nonempty_string/0,
t_number/0,
t_number/1,
- t_number_vals/1,
+ t_number_vals/1, t_number_vals/2,
t_opaque_from_records/1,
- t_opaque_match_atom/2,
- t_opaque_match_record/2,
- t_opaque_matching_structure/2,
t_opaque_structure/1,
%% t_parameterized_module/0,
t_pid/0,
@@ -192,23 +195,23 @@
t_to_tlist/1,
t_tuple/0,
t_tuple/1,
- t_tuple_args/1,
- t_tuple_size/1,
+ t_tuple_args/1, t_tuple_args/2,
+ t_tuple_size/1, t_tuple_size/2,
t_tuple_sizes/1,
t_tuple_subtypes/1,
+ t_tuple_subtypes/2,
t_unify/2,
- t_unify/3,
t_unit/0,
- t_unopaque/1,
- t_unopaque/2,
- t_unopaque_on_mismatch/3,
+ t_unopaque/1, t_unopaque/2,
t_var/1,
t_var_name/1,
%% t_assign_variables_to_subtype/2,
type_is_defined/4,
record_field_diffs_to_string/2,
subst_all_vars_to_any/1,
+ subst_all_remote/2,
lift_list_to_pos_empty/1,
+ is_opaque_type/2,
is_erl_type/1,
atom_to_string/1
]).
@@ -226,7 +229,15 @@
-export([t_is_identifier/1]).
-endif.
--export_type([erl_type/0]).
+-export_type([erl_type/0, type_table/0, var_table/0]).
+
+%%-define(DEBUG, true).
+
+-ifdef(DEBUG).
+-define(debug(__A), __A).
+-else.
+-define(debug(__A), ok).
+-endif.
%%=============================================================================
%%
@@ -251,6 +262,8 @@
-define(TAG_IMMED1_SIZE, 4).
-define(BITS, (erlang:system_info(wordsize) * 8) - ?TAG_IMMED1_SIZE).
+-define(MAX_TUPLE_SIZE, (1 bsl 10)).
+
%%-----------------------------------------------------------------------------
%% Type tags and qualifiers
%%
@@ -260,6 +273,7 @@
-define(function_tag, function).
-define(identifier_tag, identifier).
-define(list_tag, list).
+-define(map_tag, map).
-define(matchstate_tag, matchstate).
-define(nil_tag, nil).
-define(number_tag, number).
@@ -272,7 +286,7 @@
-define(var_tag, var).
-type tag() :: ?atom_tag | ?binary_tag | ?function_tag | ?identifier_tag
- | ?list_tag | ?matchstate_tag | ?nil_tag | ?number_tag
+ | ?list_tag | ?map_tag | ?matchstate_tag | ?nil_tag | ?number_tag
| ?opaque_tag | ?product_tag | ?remote_tag
| ?tuple_tag | ?tuple_set_tag | ?union_tag | ?var_tag.
@@ -310,6 +324,9 @@
-record(int_set, {set :: [integer()]}).
-record(int_rng, {from :: rng_elem(), to :: rng_elem()}).
+%% Note: the definition of #opaque{} was changed to 'mod' and 'name';
+%% it used to be an ordsets of {Mod, Name} pairs. The Dialyzer version
+%% was updated to 2.7 due to this change.
-record(opaque, {mod :: module(), name :: atom(),
args = [] :: [erl_type()], struct :: erl_type()}).
-record(remote, {mod:: module(), name :: atom(), args = [] :: [erl_type()]}).
@@ -329,6 +346,7 @@
-define(nonempty_list(Types, Term),?list(Types, Term, ?nonempty_qual)).
-define(number(Set, Qualifier), #c{tag=?number_tag, elements=Set,
qualifier=Qualifier}).
+-define(map(Pairs), #c{tag=?map_tag, elements=Pairs}).
-define(opaque(Optypes), #c{tag=?opaque_tag, elements=Optypes}).
-define(product(Types), #c{tag=?product_tag, elements=Types}).
-define(remote(RemTypes), #c{tag=?remote_tag, elements=RemTypes}).
@@ -346,22 +364,34 @@
-define(integer_non_neg, ?int_range(0, pos_inf)).
-define(integer_neg, ?int_range(neg_inf, -1)).
+-type opaques() :: [erl_type()] | 'universe'.
+
+-type record_key() :: {'record', atom()}.
+-type type_key() :: {'type' | 'opaque', atom(), arity()}.
+-type record_value() :: orddict:orddict(). % XXX. To be refined
+-type type_value() :: {module(), erl_type(), atom()}.
+-type type_table() :: dict:dict(record_key(), record_value())
+ | dict:dict(type_key(), type_value()).
+
+-type var_table() :: dict:dict(atom(), erl_type()).
+
%%-----------------------------------------------------------------------------
%% Unions
%%
--define(union(List), #c{tag=?union_tag, elements=[_,_,_,_,_,_,_,_,_,_]=List}).
-
--define(atom_union(T), ?union([T,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
--define(bitstr_union(T), ?union([?none,T,?none,?none,?none,?none,?none,?none,?none,?none])).
--define(function_union(T), ?union([?none,?none,T,?none,?none,?none,?none,?none,?none,?none])).
--define(identifier_union(T), ?union([?none,?none,?none,T,?none,?none,?none,?none,?none,?none])).
--define(list_union(T), ?union([?none,?none,?none,?none,T,?none,?none,?none,?none,?none])).
--define(number_union(T), ?union([?none,?none,?none,?none,?none,T,?none,?none,?none,?none])).
--define(tuple_union(T), ?union([?none,?none,?none,?none,?none,?none,T,?none,?none,?none])).
--define(matchstate_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,T,?none,?none])).
--define(opaque_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,T,?none])).
--define(remote_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,T])).
+-define(union(List), #c{tag=?union_tag, elements=[_,_,_,_,_,_,_,_,_,_,_]=List}).
+
+-define(atom_union(T), ?union([T,?none,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(bitstr_union(T), ?union([?none,T,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(function_union(T), ?union([?none,?none,T,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(identifier_union(T), ?union([?none,?none,?none,T,?none,?none,?none,?none,?none,?none,?none])).
+-define(list_union(T), ?union([?none,?none,?none,?none,T,?none,?none,?none,?none,?none,?none])).
+-define(number_union(T), ?union([?none,?none,?none,?none,?none,T,?none,?none,?none,?none,?none])).
+-define(tuple_union(T), ?union([?none,?none,?none,?none,?none,?none,T,?none,?none,?none,?none])).
+-define(matchstate_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,T,?none,?none,?none])).
+-define(opaque_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,T,?none,?none])).
+-define(remote_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,T,?none])).
+-define(map_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,?none,T])).
-define(integer_union(T), ?number_union(T)).
-define(float_union(T), ?number_union(T)).
-define(nil_union(T), ?list_union(T)).
@@ -384,8 +414,11 @@ t_any() ->
-spec t_is_any(erl_type()) -> boolean().
-t_is_any(?any) -> true;
-t_is_any(_) -> false.
+t_is_any(Type) ->
+ do_opaque(Type, 'universe', fun is_any/1).
+
+is_any(?any) -> true;
+is_any(_) -> false.
-spec t_none() -> erl_type().
@@ -407,16 +440,25 @@ t_opaque(Mod, Name, Args, Struct) ->
O = #opaque{mod = Mod, name = Name, args = Args, struct = Struct},
?opaque(set_singleton(O)).
+-spec t_is_opaque(erl_type(), [erl_type()]) -> boolean().
+
+t_is_opaque(?opaque(_) = Type, Opaques) ->
+ not is_opaque_type(Type, Opaques);
+t_is_opaque(_Type, _Opaques) -> false.
+
-spec t_is_opaque(erl_type()) -> boolean().
t_is_opaque(?opaque(_)) -> true;
t_is_opaque(_) -> false.
--spec t_has_opaque_subtype(erl_type()) -> boolean().
+-spec t_has_opaque_subtype(erl_type(), opaques()) -> boolean().
-t_has_opaque_subtype(?union(Ts)) ->
+t_has_opaque_subtype(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun has_opaque_subtype/1).
+
+has_opaque_subtype(?union(Ts)) ->
lists:any(fun t_is_opaque/1, Ts);
-t_has_opaque_subtype(T) ->
+has_opaque_subtype(T) ->
t_is_opaque(T).
-spec t_opaque_structure(erl_type()) -> erl_type().
@@ -424,74 +466,65 @@ t_has_opaque_subtype(T) ->
t_opaque_structure(?opaque(Elements)) ->
t_sup([Struct || #opaque{struct = Struct} <- ordsets:to_list(Elements)]).
--spec t_opaque_module(erl_type()) -> module().
+-spec t_opaque_modules(erl_type()) -> [module()].
-t_opaque_module(?opaque(Elements)) ->
+t_opaque_modules(?opaque(Elements)) ->
case ordsets:size(Elements) of
1 ->
- [#opaque{mod = Module}] = ordsets:to_list(Elements),
- Module;
+ [#opaque{mod = Mod}] = set_to_list(Elements),
+ [Mod];
_ -> throw({error, "Unexpected multiple opaque types"})
end.
-%% This only makes sense if we know that Type matches Opaque
--spec t_opaque_matching_structure(erl_type(), erl_type()) -> erl_type().
-
-t_opaque_matching_structure(Type, Opaque) ->
- OpaqueStruct = t_opaque_structure(Opaque),
- case OpaqueStruct of
- ?union(L1) ->
- case Type of
- ?union(_L2) -> OpaqueStruct;
- _OtherType -> t_opaque_matching_structure_list(Type, L1)
- end;
- ?tuple_set(_Set1) = TupleSet ->
- case Type of
- ?tuple_set(_Set2) -> OpaqueStruct;
- _ -> t_opaque_matching_structure_list(Type, t_tuple_subtypes(TupleSet))
- end;
- _Other -> OpaqueStruct
- end.
-
-t_opaque_matching_structure_list(Type, List) ->
- NewList = [t_inf(Element, Type) || Element <- List],
- Results = [NotNone || NotNone <- NewList, NotNone =/= ?none],
- case Results of
- [] -> ?none;
- [First|_] -> First
- end.
-
-spec t_contains_opaque(erl_type()) -> boolean().
-t_contains_opaque(?any) -> false;
-t_contains_opaque(?none) -> false;
-t_contains_opaque(?unit) -> false;
-t_contains_opaque(?atom(_Set)) -> false;
-t_contains_opaque(?bitstr(_Unit, _Base)) -> false;
-t_contains_opaque(?float) -> false;
-t_contains_opaque(?function(Domain, Range)) ->
- t_contains_opaque(Domain) orelse t_contains_opaque(Range);
-t_contains_opaque(?identifier(_Types)) -> false;
-t_contains_opaque(?integer(_Types)) -> false;
-t_contains_opaque(?int_range(_From, _To)) -> false;
-t_contains_opaque(?int_set(_Set)) -> false;
-t_contains_opaque(?list(Type, _, _)) -> t_contains_opaque(Type);
-t_contains_opaque(?matchstate(_P, _Slots)) -> false;
-t_contains_opaque(?nil) -> false;
-t_contains_opaque(?number(_Set, _Tag)) -> false;
-t_contains_opaque(?opaque(_)) -> true;
-t_contains_opaque(?product(Types)) -> list_contains_opaque(Types);
-t_contains_opaque(?tuple(?any, _, _)) -> false;
-t_contains_opaque(?tuple(Types, _, _)) -> list_contains_opaque(Types);
-t_contains_opaque(?tuple_set(_Set) = T) ->
- list_contains_opaque(t_tuple_subtypes(T));
-t_contains_opaque(?union(List)) -> list_contains_opaque(List);
-t_contains_opaque(?var(_Id)) -> false.
-
--spec list_contains_opaque([erl_type()]) -> boolean().
-
-list_contains_opaque(List) ->
- lists:any(fun t_contains_opaque/1, List).
+t_contains_opaque(Type) ->
+ t_contains_opaque(Type, []).
+
+%% Returns 'true' iff there is an opaque type that is *not* one of
+%% the types of the second argument.
+
+-spec t_contains_opaque(erl_type(), [erl_type()]) -> boolean().
+
+t_contains_opaque(?any, _Opaques) -> false;
+t_contains_opaque(?none, _Opaques) -> false;
+t_contains_opaque(?unit, _Opaques) -> false;
+t_contains_opaque(?atom(_Set), _Opaques) -> false;
+t_contains_opaque(?bitstr(_Unit, _Base), _Opaques) -> false;
+t_contains_opaque(?float, _Opaques) -> false;
+t_contains_opaque(?function(Domain, Range), Opaques) ->
+ t_contains_opaque(Domain, Opaques)
+ orelse t_contains_opaque(Range, Opaques);
+t_contains_opaque(?identifier(_Types), _Opaques) -> false;
+t_contains_opaque(?integer(_Types), _Opaques) -> false;
+t_contains_opaque(?int_range(_From, _To), _Opaques) -> false;
+t_contains_opaque(?int_set(_Set), _Opaques) -> false;
+t_contains_opaque(?list(Type, Tail, _), Opaques) ->
+ t_contains_opaque(Type, Opaques) orelse t_contains_opaque(Tail, Opaques);
+t_contains_opaque(?map(_) = Map, Opaques) ->
+ list_contains_opaque(map_values(Map), Opaques) orelse
+ list_contains_opaque(map_keys(Map), Opaques);
+t_contains_opaque(?matchstate(_P, _Slots), _Opaques) -> false;
+t_contains_opaque(?nil, _Opaques) -> false;
+t_contains_opaque(?number(_Set, _Tag), _Opaques) -> false;
+t_contains_opaque(?opaque(_)=T, Opaques) ->
+ not is_opaque_type(T, Opaques)
+ orelse t_contains_opaque(t_opaque_structure(T));
+t_contains_opaque(?product(Types), Opaques) ->
+ list_contains_opaque(Types, Opaques);
+t_contains_opaque(?tuple(?any, _, _), _Opaques) -> false;
+t_contains_opaque(?tuple(Types, _, _), Opaques) ->
+ list_contains_opaque(Types, Opaques);
+t_contains_opaque(?tuple_set(_Set) = T, Opaques) ->
+ list_contains_opaque(t_tuple_subtypes(T), Opaques);
+t_contains_opaque(?union(List), Opaques) ->
+ list_contains_opaque(List, Opaques);
+t_contains_opaque(?var(_Id), _Opaques) -> false.
+
+-spec list_contains_opaque([erl_type()], [erl_type()]) -> boolean().
+
+list_contains_opaque(List, Opaques) ->
+ lists:any(fun(E) -> t_contains_opaque(E, Opaques) end, List).
%% t_find_opaque_mismatch/2 of two types should only be used if their
%% t_inf is t_none() due to some opaque type violation.
@@ -499,36 +532,51 @@ list_contains_opaque(List) ->
%% The first argument of the function is the pattern and its second
%% argument the type we are matching against the pattern.
--spec t_find_opaque_mismatch(erl_type(), erl_type()) -> 'error' | {'ok', erl_type(), erl_type()}.
-
-t_find_opaque_mismatch(T1, T2) ->
- t_find_opaque_mismatch(T1, T2, T2).
-
-t_find_opaque_mismatch(?any, _Type, _TopType) -> error;
-t_find_opaque_mismatch(?none, _Type, _TopType) -> error;
-t_find_opaque_mismatch(?list(T1, _, _), ?list(T2, _, _), TopType) ->
- t_find_opaque_mismatch(T1, T2, TopType);
-t_find_opaque_mismatch(_T1, ?opaque(_) = T2, TopType) -> {ok, TopType, T2};
-t_find_opaque_mismatch(?product(T1), ?product(T2), TopType) ->
- t_find_opaque_mismatch_ordlists(T1, T2, TopType);
-t_find_opaque_mismatch(?tuple(T1, Arity, _), ?tuple(T2, Arity, _), TopType) ->
- t_find_opaque_mismatch_ordlists(T1, T2, TopType);
-t_find_opaque_mismatch(?tuple(_, _, _) = T1, ?tuple_set(_) = T2, TopType) ->
+-spec t_find_opaque_mismatch(erl_type(), erl_type(), [erl_type()]) ->
+ 'error' | {'ok', erl_type(), erl_type()}.
+
+t_find_opaque_mismatch(T1, T2, Opaques) ->
+ t_find_opaque_mismatch(T1, T2, T2, Opaques).
+
+t_find_opaque_mismatch(?any, _Type, _TopType, _Opaques) -> error;
+t_find_opaque_mismatch(?none, _Type, _TopType, _Opaques) -> error;
+t_find_opaque_mismatch(?list(T1, Tl1, _), ?list(T2, Tl2, _), TopType, Opaques) ->
+ t_find_opaque_mismatch_ordlists([T1, Tl1], [T2, Tl2], TopType, Opaques);
+t_find_opaque_mismatch(T1, ?opaque(_) = T2, TopType, Opaques) ->
+ case is_opaque_type(T2, Opaques) of
+ false -> {ok, TopType, T2};
+ true ->
+ t_find_opaque_mismatch(T1, t_opaque_structure(T2), TopType, Opaques)
+ end;
+t_find_opaque_mismatch(?opaque(_) = T1, T2, TopType, Opaques) ->
+ %% The generated message is somewhat misleading:
+ case is_opaque_type(T1, Opaques) of
+ false -> {ok, TopType, T1};
+ true ->
+ t_find_opaque_mismatch(t_opaque_structure(T1), T2, TopType, Opaques)
+ end;
+t_find_opaque_mismatch(?product(T1), ?product(T2), TopType, Opaques) ->
+ t_find_opaque_mismatch_ordlists(T1, T2, TopType, Opaques);
+t_find_opaque_mismatch(?tuple(T1, Arity, _), ?tuple(T2, Arity, _),
+ TopType, Opaques) ->
+ t_find_opaque_mismatch_ordlists(T1, T2, TopType, Opaques);
+t_find_opaque_mismatch(?tuple(_, _, _) = T1, ?tuple_set(_) = T2,
+ TopType, Opaques) ->
Tuples1 = t_tuple_subtypes(T1),
Tuples2 = t_tuple_subtypes(T2),
- t_find_opaque_mismatch_lists(Tuples1, Tuples2, TopType);
-t_find_opaque_mismatch(T1, ?union(U2), TopType) ->
- t_find_opaque_mismatch_lists([T1], U2, TopType);
-t_find_opaque_mismatch(_T1, _T2, _TopType) -> error.
+ t_find_opaque_mismatch_lists(Tuples1, Tuples2, TopType, Opaques);
+t_find_opaque_mismatch(T1, ?union(U2), TopType, Opaques) ->
+ t_find_opaque_mismatch_lists([T1], U2, TopType, Opaques);
+t_find_opaque_mismatch(_T1, _T2, _TopType, _Opaques) -> error.
-t_find_opaque_mismatch_ordlists(L1, L2, TopType) ->
+t_find_opaque_mismatch_ordlists(L1, L2, TopType, Opaques) ->
List = lists:zipwith(fun(T1, T2) ->
- t_find_opaque_mismatch(T1, T2, TopType)
+ t_find_opaque_mismatch(T1, T2, TopType, Opaques)
end, L1, L2),
t_find_opaque_mismatch_list(List).
-t_find_opaque_mismatch_lists(L1, L2, _TopType) ->
- List = [t_find_opaque_mismatch(T1, T2, T2) || T1 <- L1, T2 <- L2],
+t_find_opaque_mismatch_lists(L1, L2, _TopType, Opaques) ->
+ List = [t_find_opaque_mismatch(T1, T2, T2, Opaques) || T1 <- L1, T2 <- L2],
t_find_opaque_mismatch_list(List).
t_find_opaque_mismatch_list([]) -> error;
@@ -538,7 +586,169 @@ t_find_opaque_mismatch_list([H|T]) ->
error -> t_find_opaque_mismatch_list(T)
end.
--spec t_opaque_from_records(dict()) -> [erl_type()].
+-spec t_find_unknown_opaque(erl_type(), erl_type(), opaques()) ->
+ [pos_integer()].
+
+%% The nice thing about using two types and t_inf() as compared to
+%% calling t_contains_opaque/2 is that the traversal stops when
+%% there is a mismatch which means that unknown opaque types "below"
+%% the mismatch are not found.
+%% XXX. Returns one element even if both oparands contain opaque types.
+%% XXX. Slow since t_inf() is called but the results are ignored.
+t_find_unknown_opaque(_T1, _T2, 'universe') -> [];
+t_find_unknown_opaque(T1, T2, Opaques) ->
+ try t_inf(T1, T2, {match, Opaques}) of
+ _ -> []
+ catch throw:N when is_integer(N) -> [N]
+ end.
+
+-spec t_decorate_with_opaque(erl_type(), erl_type(), [erl_type()]) -> erl_type().
+
+%% The first argument can contain opaque types. The second argument
+%% is assumed to be taken from the contract.
+
+t_decorate_with_opaque(T1, T2, Opaques) ->
+ case t_is_equal(T1, T2) orelse not t_contains_opaque(T2) of
+ true -> T1;
+ false ->
+ T = t_inf(T1, T2),
+ case t_contains_opaque(T) of
+ false -> T1;
+ true ->
+ R = decorate(T1, T, Opaques),
+ ?debug(case catch t_is_equal(t_unopaque(R), t_unopaque(T1)) of
+ true -> ok;
+ false ->
+ io:format("T1 = ~p,\n", [T1]),
+ io:format("T2 = ~p,\n", [T2]),
+ io:format("O = ~p,\n", [Opaques]),
+ io:format("erl_types:t_decorate_with_opaque(T1,T2,O).\n"),
+ throw({error, "Failed to handle opaque types"})
+ end),
+ R
+ end
+ end.
+
+decorate(Type, ?none, _Opaques) -> Type;
+decorate(?function(Domain, Range), ?function(D, R), Opaques) ->
+ ?function(decorate(Domain, D, Opaques), decorate(Range, R, Opaques));
+decorate(?list(Types, Tail, Size), ?list(Ts, Tl, _Sz), Opaques) ->
+ ?list(decorate(Types, Ts, Opaques), decorate(Tail, Tl, Opaques), Size);
+decorate(?product(Types), ?product(Ts), Opaques) ->
+ ?product(list_decorate(Types, Ts, Opaques));
+decorate(?tuple(_, _, _)=T, ?tuple(?any, _, _), _Opaques) -> T;
+decorate(?tuple(?any, _, _)=T, ?tuple(_, _, _), _Opaques) -> T;
+decorate(?tuple(Types, Arity, Tag), ?tuple(Ts, Arity, _), Opaques) ->
+ ?tuple(list_decorate(Types, Ts, Opaques), Arity, Tag);
+decorate(?tuple_set(List), ?tuple(_, Arity, _) = T, Opaques) ->
+ decorate_tuple_sets(List, [{Arity, [T]}], Opaques);
+decorate(?tuple_set(List), ?tuple_set(L), Opaques) ->
+ decorate_tuple_sets(List, L, Opaques);
+decorate(?union(List), T, Opaques) when T =/= ?any ->
+ ?union(L) = force_union(T),
+ union_decorate(List, L, Opaques);
+decorate(?opaque(_)=T, _, _Opaques) -> T;
+decorate(T, ?union(L), Opaques) when T =/= ?any ->
+ ?union(List) = force_union(T),
+ union_decorate(List, L, Opaques);
+decorate(Type, ?opaque(_)=T, Opaques) ->
+ decorate_with_opaque(Type, T, Opaques);
+decorate(Type, _T, _Opaques) -> Type.
+
+%% Note: it is important that #opaque.struct is a subtype of the
+%% opaque type.
+decorate_with_opaque(Type, ?opaque(Set2), Opaques) ->
+ case decoration(set_to_list(Set2), Type, Opaques, [], false) of
+ {[], false} -> Type;
+ {List, All} when List =/= [] ->
+ NewType = ?opaque(ordsets:from_list(List)),
+ case All of
+ true -> NewType;
+ false -> t_sup(NewType, Type)
+ end
+ end.
+
+decoration([#opaque{struct = S} = Opaque|OpaqueTypes], Type, Opaques,
+ NewOpaqueTypes0, All) ->
+ IsOpaque = is_opaque_type2(Opaque, Opaques),
+ I = t_inf(Type, S),
+ case not IsOpaque orelse t_is_none(I) of
+ true -> decoration(OpaqueTypes, Type, Opaques, NewOpaqueTypes0, All);
+ false ->
+ NewOpaque = Opaque#opaque{struct = decorate(I, S, Opaques)},
+ NewAll = All orelse t_is_equal(I, Type),
+ NewOpaqueTypes = [NewOpaque|NewOpaqueTypes0],
+ decoration(OpaqueTypes, Type, Opaques, NewOpaqueTypes, NewAll)
+ end;
+decoration([], _Type, _Opaques, NewOpaqueTypes, All) ->
+ {NewOpaqueTypes, All}.
+
+-spec list_decorate([erl_type()], [erl_type()], opaques()) -> [erl_type()].
+
+list_decorate(List, L, Opaques) ->
+ [decorate(Elem, E, Opaques) || {Elem, E} <- lists:zip(List, L)].
+
+union_decorate(U1, U2, Opaques) ->
+ Union = union_decorate(U1, U2, Opaques, 0, []),
+ [A,B,F,I,L,N,T,M,_,_R,Map] = U1,
+ [_,_,_,_,_,_,_,_,Opaque,_,_] = U2,
+ List = [A,B,F,I,L,N,T,M,Map],
+ DecList = [Dec ||
+ E <- List,
+ not t_is_none(E),
+ not t_is_none(Dec = decorate(E, Opaque, Opaques))],
+ t_sup([Union|DecList]).
+
+union_decorate([?none|Left1], [_|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N, [?none|Acc]);
+union_decorate([T1|Left1], [?none|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N+1, [T1|Acc]);
+union_decorate([T1|Left1], [T2|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N+1, [decorate(T1, T2, Opaques)|Acc]);
+union_decorate([], [], _Opaques, N, Acc) ->
+ if N =:= 0 -> ?none;
+ N =:= 1 ->
+ [Type] = [T || T <- Acc, T =/= ?none],
+ Type;
+ N >= 2 -> ?union(lists:reverse(Acc))
+ end.
+
+decorate_tuple_sets(List, L, Opaques) ->
+ decorate_tuple_sets(List, L, Opaques, []).
+
+decorate_tuple_sets([{Arity, Tuples}|List], [{Arity, Ts}|L], Opaques, Acc) ->
+ DecTs = decorate_tuples_in_sets(Tuples, Ts, Opaques),
+ decorate_tuple_sets(List, L, Opaques, [{Arity, DecTs}|Acc]);
+decorate_tuple_sets([ArTup|List], L, Opaques, Acc) ->
+ decorate_tuple_sets(List, L, Opaques, [ArTup|Acc]);
+decorate_tuple_sets([], _L, _Opaques, Acc) ->
+ ?tuple_set(lists:reverse(Acc)).
+
+decorate_tuples_in_sets([?tuple(Elements, _, ?any)], Ts, Opaques) ->
+ NewList = [list_decorate(Elements, Es, Opaques) || ?tuple(Es, _, _) <- Ts],
+ case t_sup([t_tuple(Es) || Es <- NewList]) of
+ ?tuple_set([{_Arity, Tuples}]) -> Tuples;
+ ?tuple(_, _, _)=Tuple -> [Tuple]
+ end;
+decorate_tuples_in_sets(Tuples, Ts, Opaques) ->
+ decorate_tuples_in_sets(Tuples, Ts, Opaques, []).
+
+decorate_tuples_in_sets([?tuple(Elements, Arity, Tag1) = T1|Tuples] = L1,
+ [?tuple(Es, Arity, Tag2)|Ts] = L2, Opaques, Acc) ->
+ if
+ Tag1 < Tag2 -> decorate_tuples_in_sets(Tuples, L2, Opaques, [T1|Acc]);
+ Tag1 > Tag2 -> decorate_tuples_in_sets(L1, Ts, Opaques, Acc);
+ Tag1 =:= Tag2 ->
+ NewElements = list_decorate(Elements, Es, Opaques),
+ NewAcc = [?tuple(NewElements, Arity, Tag1)|Acc],
+ decorate_tuples_in_sets(Tuples, Ts, Opaques, NewAcc)
+ end;
+decorate_tuples_in_sets([T1|Tuples], L2, Opaques, Acc) ->
+ decorate_tuples_in_sets(Tuples, L2, Opaques, [T1|Acc]);
+decorate_tuples_in_sets([], _L, _Opaques, Acc) ->
+ lists:reverse(Acc).
+
+-spec t_opaque_from_records(type_table()) -> [erl_type()].
t_opaque_from_records(RecDict) ->
OpaqueRecDict =
@@ -549,54 +759,17 @@ t_opaque_from_records(RecDict) ->
end
end, RecDict),
OpaqueTypeDict =
- dict:map(fun({opaque, Name, _Arity}, {Module, Type, ArgNames}) ->
- case ArgNames of
- [] ->
- t_opaque(Module, Name, [], t_from_form(Type, RecDict));
- _ ->
- throw({error,"Polymorphic opaque types not supported yet"})
- end
+ dict:map(fun({opaque, Name, _Arity}, {Module, _Type, ArgNames}) ->
+ %% Args = args_to_types(ArgNames),
+ %% List = lists:zip(ArgNames, Args),
+ %% TmpVarDict = dict:from_list(List),
+ %% Rep = t_from_form(Type, RecDict, TmpVarDict),
+ Rep = t_none(), % not used for anything right now
+ Args = [t_any() || _ <- ArgNames],
+ skip_opaque_alias(Rep, Module, Name, Args)
end, OpaqueRecDict),
[OpaqueType || {_Key, OpaqueType} <- dict:to_list(OpaqueTypeDict)].
--spec t_opaque_match_atom(erl_type(), [erl_type()]) -> [erl_type()].
-
-t_opaque_match_atom(?atom(_) = Atom, Opaques) ->
- case t_atom_vals(Atom) of
- unknown -> [];
- _ -> [O || O <- Opaques, t_inf(Atom, O, opaque) =/= ?none,
- t_opaque_atom_vals(t_opaque_structure(O)) =/= unknown]
- end;
-t_opaque_match_atom(_, _) -> [].
-
--spec t_opaque_atom_vals(erl_type()) -> 'unknown' | [atom(),...].
-
-t_opaque_atom_vals(OpaqueStruct) ->
- case OpaqueStruct of
- ?atom(_) -> t_atom_vals(OpaqueStruct);
- ?union([Atom,_,_,_,_,_,_,_,_,_]) -> t_atom_vals(Atom);
- _ -> unknown
- end.
-
--spec t_opaque_match_record(erl_type(), [erl_type()]) -> [erl_type()].
-
-t_opaque_match_record(?tuple([?atom(_) = Tag|_Fields], _, _) = Rec, Opaques) ->
- [O || O <- Opaques, t_inf(Rec, O, opaque) =/= ?none,
- lists:member(Tag, t_opaque_tuple_tags(t_opaque_structure(O)))];
-t_opaque_match_record(_, _) -> [].
-
--spec t_opaque_tuple_tags(erl_type()) -> [erl_type()].
-
-t_opaque_tuple_tags(OpaqueStruct) ->
- case OpaqueStruct of
- ?tuple([?atom(_) = Tag|_Fields], _, _) -> [Tag];
- ?tuple_set(_) = TupleSet ->
- Tuples = t_tuple_subtypes(TupleSet),
- lists:flatten([t_opaque_tuple_tags(T) || T <- Tuples]);
- ?union([_,_,_,_,_,_,Tuples,_,_,_]) -> t_opaque_tuple_tags(Tuples);
- _ -> []
- end.
-
%% Decompose opaque instances of type arg2 to structured types, in arg1
%% XXX: Same as t_unopaque
-spec t_struct_from_opaque(erl_type(), [erl_type()]) -> erl_type().
@@ -605,9 +778,10 @@ t_struct_from_opaque(?function(Domain, Range), Opaques) ->
?function(t_struct_from_opaque(Domain, Opaques),
t_struct_from_opaque(Range, Opaques));
t_struct_from_opaque(?list(Types, Term, Size), Opaques) ->
- ?list(t_struct_from_opaque(Types, Opaques), Term, Size);
+ ?list(t_struct_from_opaque(Types, Opaques),
+ t_struct_from_opaque(Term, Opaques), Size);
t_struct_from_opaque(?opaque(_) = T, Opaques) ->
- case lists:member(T, Opaques) of
+ case is_opaque_type(T, Opaques) of
true -> t_opaque_structure(T);
false -> T
end;
@@ -627,24 +801,10 @@ t_struct_from_opaque(Type, _Opaques) -> Type.
list_struct_from_opaque(Types, Opaques) ->
[t_struct_from_opaque(Type, Opaques) || Type <- Types].
--spec t_unopaque_on_mismatch(erl_type(), erl_type(), [erl_type()]) -> erl_type().
-
-t_unopaque_on_mismatch(GenType, Type, Opaques) ->
- case t_inf(GenType, Type) of
- ?none ->
- Unopaqued = t_unopaque(Type, Opaques),
- %% XXX: Unions might be a problem, must investigate.
- case t_inf(GenType, Unopaqued) of
- ?none -> Type;
- _ -> Unopaqued
- end;
- _ -> Type
- end.
-
-spec module_builtin_opaques(module()) -> [erl_type()].
module_builtin_opaques(Module) ->
- [O || O <- all_opaque_builtins(), t_opaque_module(O) =:= Module].
+ [O || O <- all_opaque_builtins(), lists:member(Module, t_opaque_modules(O))].
%%-----------------------------------------------------------------------------
%% Remote types: these types are used for preprocessing;
@@ -657,10 +817,15 @@ t_remote(Mod, Name, Args) ->
-spec t_is_remote(erl_type()) -> boolean().
-t_is_remote(?remote(_)) -> true;
-t_is_remote(_) -> false.
+t_is_remote(Type) ->
+ do_opaque(Type, 'universe', fun is_remote/1).
+
+is_remote(?remote(_)) -> true;
+is_remote(_) -> false.
--spec t_solve_remote(erl_type(), set(), dict()) -> erl_type().
+-type mod_records() :: dict:dict(module(), type_table()).
+
+-spec t_solve_remote(erl_type(), sets:set(mfa()), mod_records()) -> erl_type().
t_solve_remote(Type, ExpTypes, Records) ->
{RT, _RR} = t_solve_remote(Type, ExpTypes, Records, []),
@@ -697,8 +862,12 @@ t_solve_remote(?union(List), ET, R, C) ->
{t_sup(RL), RR};
t_solve_remote(T, _ET, _R, _C) -> {T, []}.
-t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args} = RemType,
+t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args0} = RemType,
ET, R, C) ->
+ Args = lists:map(fun(A) ->
+ {Arg, _} = t_solve_remote(A, ET, R, C),
+ Arg
+ end, Args0),
ArgsLen = length(Args),
case dict:find(RemMod, R) of
error ->
@@ -744,9 +913,7 @@ t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args} = RemType,
true -> t_limit(NewRep, ?REC_TYPE_LIMIT);
false -> NewRep
end,
- {t_from_form({opaque, -1, Name, {Mod, Args, RT1}},
- RemDict, TmpVarDict),
- RetRR};
+ {skip_opaque_alias(RT1, Mod, Name, Args), RetRR};
error ->
Msg = io_lib:format("Unable to find remote type ~w:~w()\n",
[RemMod, Name]),
@@ -827,40 +994,75 @@ t_atoms(List) when is_list(List) ->
-spec t_atom_vals(erl_type()) -> 'unknown' | [atom(),...].
-t_atom_vals(?atom(?any)) -> unknown;
-t_atom_vals(?atom(Set)) -> set_to_list(Set);
-t_atom_vals(Other) ->
+t_atom_vals(Type) ->
+ t_atom_vals(Type, 'universe').
+
+-spec t_atom_vals(erl_type(), opaques()) -> 'unknown' | [atom(),...].
+
+t_atom_vals(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun atom_vals/1).
+
+atom_vals(?atom(?any)) -> unknown;
+atom_vals(?atom(Set)) -> set_to_list(Set);
+atom_vals(?opaque(_)) -> unknown;
+atom_vals(Other) ->
?atom(_) = Atm = t_inf(t_atom(), Other),
- t_atom_vals(Atm).
+ atom_vals(Atm).
-spec t_is_atom(erl_type()) -> boolean().
-t_is_atom(?atom(_)) -> true;
-t_is_atom(_) -> false.
+t_is_atom(Type) ->
+ t_is_atom(Type, 'universe').
+
+-spec t_is_atom(erl_type(), opaques()) -> boolean().
+
+t_is_atom(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_atom1/1).
+
+is_atom1(?atom(_)) -> true;
+is_atom1(_) -> false.
--spec t_is_atom(atom(), erl_type()) -> boolean().
+-spec t_is_any_atom(atom(), erl_type()) -> boolean().
-t_is_atom(Atom, ?atom(?any)) when is_atom(Atom) -> false;
-t_is_atom(Atom, ?atom(Set)) when is_atom(Atom) -> set_is_singleton(Atom, Set);
-t_is_atom(Atom, _) when is_atom(Atom) -> false.
+t_is_any_atom(Atom, SomeAtomsType) ->
+ t_is_any_atom(Atom, SomeAtomsType, 'universe').
+
+-spec t_is_any_atom(atom(), erl_type(), opaques()) -> boolean().
+
+t_is_any_atom(Atom, SomeAtomsType, Opaques) ->
+ do_opaque(SomeAtomsType, Opaques,
+ fun(AtomsType) -> is_any_atom(Atom, AtomsType) end).
+
+is_any_atom(Atom, ?atom(?any)) when is_atom(Atom) -> false;
+is_any_atom(Atom, ?atom(Set)) when is_atom(Atom) ->
+ set_is_singleton(Atom, Set);
+is_any_atom(Atom, _) when is_atom(Atom) -> false.
%%------------------------------------
+-spec t_is_boolean(erl_type()) -> boolean().
+
+t_is_boolean(Type) ->
+ t_is_boolean(Type, 'universe').
+
+-spec t_is_boolean(erl_type(), opaques()) -> boolean().
+
+t_is_boolean(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_boolean/1).
+
-spec t_boolean() -> erl_type().
t_boolean() ->
?atom(set_from_list([false, true])).
--spec t_is_boolean(erl_type()) -> boolean().
-
-t_is_boolean(?atom(?any)) -> false;
-t_is_boolean(?atom(Set)) ->
+is_boolean(?atom(?any)) -> false;
+is_boolean(?atom(Set)) ->
case set_size(Set) of
1 -> set_is_element(true, Set) orelse set_is_element(false, Set);
2 -> set_is_element(true, Set) andalso set_is_element(false, Set);
N when is_integer(N), N > 2 -> false
end;
-t_is_boolean(_) -> false.
+is_boolean(_) -> false.
%%-----------------------------------------------------------------------------
%% Binaries
@@ -873,9 +1075,17 @@ t_binary() ->
-spec t_is_binary(erl_type()) -> boolean().
-t_is_binary(?bitstr(U, B)) ->
+t_is_binary(Type) ->
+ t_is_binary(Type, 'universe').
+
+-spec t_is_binary(erl_type(), opaques()) -> boolean().
+
+t_is_binary(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_binary/1).
+
+is_binary(?bitstr(U, B)) ->
((U rem 8) =:= 0) andalso ((B rem 8) =:= 0);
-t_is_binary(_) -> false.
+is_binary(_) -> false.
%%-----------------------------------------------------------------------------
%% Bitstrings
@@ -922,19 +1132,27 @@ t_bitstr_concat_1([], Acc) ->
t_bitstr_concat(T1, T2) ->
T1p = t_inf(t_bitstr(), T1),
T2p = t_inf(t_bitstr(), T2),
- bitstr_concat(T1p, T2p).
+ bitstr_concat(t_unopaque(T1p), t_unopaque(T2p)).
-spec t_bitstr_match(erl_type(), erl_type()) -> erl_type().
t_bitstr_match(T1, T2) ->
T1p = t_inf(t_bitstr(), T1),
T2p = t_inf(t_bitstr(), T2),
- bitstr_match(T1p, T2p).
+ bitstr_match(t_unopaque(T1p), t_unopaque(T2p)).
-spec t_is_bitstr(erl_type()) -> boolean().
-t_is_bitstr(?bitstr(_, _)) -> true;
-t_is_bitstr(_) -> false.
+t_is_bitstr(Type) ->
+ t_is_bitstr(Type, 'universe').
+
+-spec t_is_bitstr(erl_type(), opaques()) -> boolean().
+
+t_is_bitstr(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_bitstr/1).
+
+is_bitstr(?bitstr(_, _)) -> true;
+is_bitstr(_) -> false.
%%-----------------------------------------------------------------------------
%% Matchstates
@@ -1045,27 +1263,59 @@ t_fun(Arity, Range) when is_integer(Arity), 0 =< Arity, Arity =< 255 ->
-spec t_fun_args(erl_type()) -> 'unknown' | [erl_type()].
-t_fun_args(?function(?any, _)) ->
+t_fun_args(Type) ->
+ t_fun_args(Type, 'universe').
+
+-spec t_fun_args(erl_type(), opaques()) -> 'unknown' | [erl_type()].
+
+t_fun_args(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_args/1).
+
+fun_args(?function(?any, _)) ->
unknown;
-t_fun_args(?function(?product(Domain), _)) when is_list(Domain) ->
+fun_args(?function(?product(Domain), _)) when is_list(Domain) ->
Domain.
-spec t_fun_arity(erl_type()) -> 'unknown' | non_neg_integer().
-t_fun_arity(?function(?any, _)) ->
+t_fun_arity(Type) ->
+ t_fun_arity(Type, 'universe').
+
+-spec t_fun_arity(erl_type(), opaques()) -> 'unknown' | non_neg_integer().
+
+t_fun_arity(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_arity/1).
+
+fun_arity(?function(?any, _)) ->
unknown;
-t_fun_arity(?function(?product(Domain), _)) ->
+fun_arity(?function(?product(Domain), _)) ->
length(Domain).
-spec t_fun_range(erl_type()) -> erl_type().
-t_fun_range(?function(_, Range)) ->
+t_fun_range(Type) ->
+ t_fun_range(Type, 'universe').
+
+-spec t_fun_range(erl_type(), opaques()) -> erl_type().
+
+t_fun_range(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_range/1).
+
+fun_range(?function(_, Range)) ->
Range.
-spec t_is_fun(erl_type()) -> boolean().
-t_is_fun(?function(_, _)) -> true;
-t_is_fun(_) -> false.
+t_is_fun(Type) ->
+ t_is_fun(Type, 'universe').
+
+-spec t_is_fun(erl_type(), opaques()) -> boolean().
+
+t_is_fun(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_fun/1).
+
+is_fun(?function(_, _)) -> true;
+is_fun(_) -> false.
%%-----------------------------------------------------------------------------
%% Identifiers. Includes ports, pids and refs.
@@ -1092,9 +1342,17 @@ t_port() ->
-spec t_is_port(erl_type()) -> boolean().
-t_is_port(?identifier(?any)) -> false;
-t_is_port(?identifier(Set)) -> set_is_singleton(?port_qual, Set);
-t_is_port(_) -> false.
+t_is_port(Type) ->
+ t_is_port(Type, 'universe').
+
+-spec t_is_port(erl_type(), opaques()) -> boolean().
+
+t_is_port(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_port1/1).
+
+is_port1(?identifier(?any)) -> false;
+is_port1(?identifier(Set)) -> set_is_singleton(?port_qual, Set);
+is_port1(_) -> false.
%%------------------------------------
@@ -1105,9 +1363,17 @@ t_pid() ->
-spec t_is_pid(erl_type()) -> boolean().
-t_is_pid(?identifier(?any)) -> false;
-t_is_pid(?identifier(Set)) -> set_is_singleton(?pid_qual, Set);
-t_is_pid(_) -> false.
+t_is_pid(Type) ->
+ t_is_pid(Type, 'universe').
+
+-spec t_is_pid(erl_type(), opaques()) -> boolean().
+
+t_is_pid(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_pid1/1).
+
+is_pid1(?identifier(?any)) -> false;
+is_pid1(?identifier(Set)) -> set_is_singleton(?pid_qual, Set);
+is_pid1(_) -> false.
%%------------------------------------
@@ -1118,9 +1384,17 @@ t_reference() ->
-spec t_is_reference(erl_type()) -> boolean().
-t_is_reference(?identifier(?any)) -> false;
-t_is_reference(?identifier(Set)) -> set_is_singleton(?reference_qual, Set);
-t_is_reference(_) -> false.
+t_is_reference(Type) ->
+ t_is_reference(Type, 'universe').
+
+-spec t_is_reference(erl_type(), opaques()) -> boolean().
+
+t_is_reference(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_reference1/1).
+
+is_reference1(?identifier(?any)) -> false;
+is_reference1(?identifier(Set)) -> set_is_singleton(?reference_qual, Set);
+is_reference1(_) -> false.
%%-----------------------------------------------------------------------------
%% Numbers are divided into floats, integers, chars and bytes.
@@ -1138,21 +1412,38 @@ t_number(X) when is_integer(X) ->
-spec t_is_number(erl_type()) -> boolean().
-t_is_number(?number(_, _)) -> true;
-t_is_number(_) -> false.
+t_is_number(Type) ->
+ t_is_number(Type, 'universe').
+
+-spec t_is_number(erl_type(), opaques()) -> boolean().
+
+t_is_number(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_number/1).
+
+is_number(?number(_, _)) -> true;
+is_number(_) -> false.
%% Currently, the type system collapses all floats to ?float and does
%% not keep any information about their values. As a result, the list
%% that this function returns contains only integers.
+
-spec t_number_vals(erl_type()) -> 'unknown' | [integer(),...].
-t_number_vals(?int_set(?any)) -> unknown;
-t_number_vals(?int_set(Set)) -> set_to_list(Set);
-t_number_vals(?number(_, _)) -> unknown;
-t_number_vals(Other) ->
+t_number_vals(Type) ->
+ t_number_vals(Type, 'universe').
+
+-spec t_number_vals(erl_type(), opaques()) -> 'unknown' | [integer(),...].
+
+t_number_vals(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_vals/1).
+
+number_vals(?int_set(Set)) -> set_to_list(Set);
+number_vals(?number(_, _)) -> unknown;
+number_vals(?opaque(_)) -> unknown;
+number_vals(Other) ->
Inf = t_inf(Other, t_number()),
false = t_is_none(Inf), % sanity check
- t_number_vals(Inf).
+ number_vals(Inf).
%%------------------------------------
@@ -1163,8 +1454,16 @@ t_float() ->
-spec t_is_float(erl_type()) -> boolean().
-t_is_float(?float) -> true;
-t_is_float(_) -> false.
+t_is_float(Type) ->
+ t_is_float(Type, 'universe').
+
+-spec t_is_float(erl_type(), opaques()) -> boolean().
+
+t_is_float(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_float1/1).
+
+is_float1(?float) -> true;
+is_float1(_) -> false.
%%------------------------------------
@@ -1185,8 +1484,16 @@ t_integers(List) when is_list(List) ->
-spec t_is_integer(erl_type()) -> boolean().
-t_is_integer(?integer(_)) -> true;
-t_is_integer(_) -> false.
+t_is_integer(Type) ->
+ t_is_integer(Type, 'universe').
+
+-spec t_is_integer(erl_type(), opaques()) -> boolean().
+
+t_is_integer(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_integer1/1).
+
+is_integer1(?integer(_)) -> true;
+is_integer1(_) -> false.
%%------------------------------------
@@ -1250,7 +1557,7 @@ t_cons(Hd, ?nil) ->
t_cons(Hd, ?list(Contents, Termination, _)) ->
?nonempty_list(t_sup(Contents, Hd), Termination);
t_cons(Hd, Tail) ->
- case t_inf(Tail, t_maybe_improper_list()) of
+ case cons_tail(t_inf(Tail, t_maybe_improper_list())) of
?list(Contents, Termination, _Size) ->
%% Collapse the list part of the termination but keep the
%% non-list part intact.
@@ -1262,18 +1569,45 @@ t_cons(Hd, Tail) ->
?unit -> ?none
end.
+cons_tail(Type) ->
+ do_opaque(Type, 'universe', fun(T) -> T end).
+
-spec t_is_cons(erl_type()) -> boolean().
-t_is_cons(?nonempty_list(_, _)) -> true;
-t_is_cons(_) -> false.
+t_is_cons(Type) ->
+ t_is_cons(Type, 'universe').
+
+-spec t_is_cons(erl_type(), opaques()) -> boolean().
+
+t_is_cons(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_cons/1).
+
+is_cons(?nonempty_list(_, _)) -> true;
+is_cons(_) -> false.
-spec t_cons_hd(erl_type()) -> erl_type().
-t_cons_hd(?nonempty_list(Contents, _Termination)) -> Contents.
+t_cons_hd(Type) ->
+ t_cons_hd(Type, 'universe').
+
+-spec t_cons_hd(erl_type(), opaques()) -> erl_type().
+
+t_cons_hd(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun cons_hd/1).
+
+cons_hd(?nonempty_list(Contents, _Termination)) -> Contents.
-spec t_cons_tl(erl_type()) -> erl_type().
-t_cons_tl(?nonempty_list(_Contents, Termination) = T) ->
+t_cons_tl(Type) ->
+ t_cons_tl(Type, 'universe').
+
+-spec t_cons_tl(erl_type(), opaques()) -> erl_type().
+
+t_cons_tl(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun cons_tl/1).
+
+cons_tl(?nonempty_list(_Contents, Termination) = T) ->
t_sup(Termination, T).
-spec t_nil() -> erl_type().
@@ -1283,8 +1617,16 @@ t_nil() ->
-spec t_is_nil(erl_type()) -> boolean().
-t_is_nil(?nil) -> true;
-t_is_nil(_) -> false.
+t_is_nil(Type) ->
+ t_is_nil(Type, 'universe').
+
+-spec t_is_nil(erl_type(), opaques()) -> boolean().
+
+t_is_nil(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_nil/1).
+
+is_nil(?nil) -> true;
+is_nil(_) -> false.
-spec t_list() -> erl_type().
@@ -1300,8 +1642,16 @@ t_list(Contents) ->
-spec t_list_elements(erl_type()) -> erl_type().
-t_list_elements(?list(Contents, _, _)) -> Contents;
-t_list_elements(?nil) -> ?none.
+t_list_elements(Type) ->
+ t_list_elements(Type, 'universe').
+
+-spec t_list_elements(erl_type(), opaques()) -> erl_type().
+
+t_list_elements(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun list_elements/1).
+
+list_elements(?list(Contents, _, _)) -> Contents;
+list_elements(?nil) -> ?none.
-spec t_list_termination(erl_type()) -> erl_type().
@@ -1356,9 +1706,17 @@ t_maybe_improper_list(Content, Termination) ->
-spec t_is_maybe_improper_list(erl_type()) -> boolean().
-t_is_maybe_improper_list(?list(_, _, _)) -> true;
-t_is_maybe_improper_list(?nil) -> true;
-t_is_maybe_improper_list(_) -> false.
+t_is_maybe_improper_list(Type) ->
+ t_is_maybe_improper_list(Type, 'universe').
+
+-spec t_is_maybe_improper_list(erl_type(), opaques()) -> boolean().
+
+t_is_maybe_improper_list(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_maybe_improper_list/1).
+
+is_maybe_improper_list(?list(_, _, _)) -> true;
+is_maybe_improper_list(?nil) -> true;
+is_maybe_improper_list(_) -> false.
%% %% Should only be used if you know what you are doing. See t_cons/2
%% -spec t_improper_list(erl_type(), erl_type()) -> erl_type().
@@ -1377,6 +1735,33 @@ lift_list_to_pos_empty(?list(Content, Termination, _)) ->
?list(Content, Termination, ?unknown_qual).
%%-----------------------------------------------------------------------------
+%% Maps
+%%
+
+-spec t_map() -> erl_type().
+
+t_map() ->
+ ?map([]).
+
+-spec t_map([{erl_type(), erl_type()}]) -> erl_type().
+
+t_map(_) ->
+ ?map([]).
+
+-spec t_is_map(erl_type()) -> boolean().
+
+t_is_map(Type) ->
+ t_is_map(Type, 'universe').
+
+-spec t_is_map(erl_type(), opaques()) -> boolean().
+
+t_is_map(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_map1/1).
+
+is_map1(?map(_)) -> true;
+is_map1(_) -> false.
+
+%%-----------------------------------------------------------------------------
%% Tuples
%%
@@ -1387,6 +1772,8 @@ t_tuple() ->
-spec t_tuple(non_neg_integer() | [erl_type()]) -> erl_type().
+t_tuple(N) when is_integer(N), N > ?MAX_TUPLE_SIZE ->
+ t_tuple();
t_tuple(N) when is_integer(N) ->
?tuple(lists:duplicate(N, ?any), N, ?any);
t_tuple(List) ->
@@ -1405,32 +1792,77 @@ t_tuple(List) ->
-spec get_tuple_tags([erl_type()]) -> [erl_type(),...].
-get_tuple_tags([?atom(?any)|_]) -> [?any];
-get_tuple_tags([?atom(Set)|_]) ->
+get_tuple_tags([Tag|_]) ->
+ do_opaque(Tag, 'universe', fun tuple_tags/1);
+get_tuple_tags(_) -> [?any].
+
+tuple_tags(?atom(?any)) -> [?any];
+tuple_tags(?atom(Set)) ->
case set_size(Set) > ?TUPLE_TAG_LIMIT of
true -> [?any];
false -> [t_atom(A) || A <- set_to_list(Set)]
end;
-get_tuple_tags(_) -> [?any].
+tuple_tags(_) -> [?any].
%% to be used for a tuple with known types for its arguments (not ?any)
-spec t_tuple_args(erl_type()) -> [erl_type()].
-t_tuple_args(?tuple(Args, _, _)) when is_list(Args) -> Args.
+t_tuple_args(Type) ->
+ t_tuple_args(Type, 'universe').
+
+%% to be used for a tuple with known types for its arguments (not ?any)
+-spec t_tuple_args(erl_type(), opaques()) -> [erl_type()].
+
+t_tuple_args(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun tuple_args/1).
+
+tuple_args(?tuple(Args, _, _)) when is_list(Args) -> Args.
%% to be used for a tuple with a known size (not ?any)
-spec t_tuple_size(erl_type()) -> non_neg_integer().
-t_tuple_size(?tuple(_, Size, _)) when is_integer(Size) -> Size.
+t_tuple_size(Type) ->
+ t_tuple_size(Type, 'universe').
+
+%% to be used for a tuple with a known size (not ?any)
+-spec t_tuple_size(erl_type(), opaques()) -> non_neg_integer().
+
+t_tuple_size(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun tuple_size1/1).
+
+tuple_size1(?tuple(_, Size, _)) when is_integer(Size) -> Size.
-spec t_tuple_sizes(erl_type()) -> 'unknown' | [non_neg_integer(),...].
-t_tuple_sizes(?tuple(?any, ?any, ?any)) -> unknown;
-t_tuple_sizes(?tuple(_, Size, _)) when is_integer(Size) -> [Size];
-t_tuple_sizes(?tuple_set(List)) -> [Size || {Size, _} <- List].
+t_tuple_sizes(Type) ->
+ do_opaque(Type, 'universe', fun tuple_sizes/1).
+
+tuple_sizes(?tuple(?any, ?any, ?any)) -> unknown;
+tuple_sizes(?tuple(_, Size, _)) when is_integer(Size) -> [Size];
+tuple_sizes(?tuple_set(List)) -> [Size || {Size, _} <- List].
+
+-spec t_tuple_subtypes(erl_type(), opaques()) ->
+ 'unknown' | [erl_type(),...].
+
+t_tuple_subtypes(Type, Opaques) ->
+ Fun = fun(?tuple_set(List)) ->
+ t_tuple_subtypes_tuple_list(List, Opaques);
+ (?opaque(_)) -> unknown;
+ (T) -> t_tuple_subtypes(T)
+ end,
+ do_opaque(Type, Opaques, Fun).
+
+t_tuple_subtypes_tuple_list(List, Opaques) ->
+ lists:append([t_tuple_subtypes_list(Tuples, Opaques) ||
+ {_Size, Tuples} <- List]).
+
+t_tuple_subtypes_list(List, Opaques) ->
+ ListOfLists = [t_tuple_subtypes(E, Opaques) || E <- List, E =/= ?none],
+ lists:append([L || L <- ListOfLists, L =/= 'unknown']).
-spec t_tuple_subtypes(erl_type()) -> 'unknown' | [erl_type(),...].
+%% XXX. Not the same as t_tuple_subtypes(T, 'universe')...
t_tuple_subtypes(?tuple(?any, ?any, ?any)) -> unknown;
t_tuple_subtypes(?tuple(_, _, _) = T) -> [T];
t_tuple_subtypes(?tuple_set(List)) ->
@@ -1438,9 +1870,17 @@ t_tuple_subtypes(?tuple_set(List)) ->
-spec t_is_tuple(erl_type()) -> boolean().
-t_is_tuple(?tuple(_, _, _)) -> true;
-t_is_tuple(?tuple_set(_)) -> true;
-t_is_tuple(_) -> false.
+t_is_tuple(Type) ->
+ t_is_tuple(Type, 'universe').
+
+-spec t_is_tuple(erl_type(), opaques()) -> boolean().
+
+t_is_tuple(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_tuple1/1).
+
+is_tuple1(?tuple(_, _, _)) -> true;
+is_tuple1(?tuple_set(_)) -> true;
+is_tuple1(_) -> false.
%%-----------------------------------------------------------------------------
%% Non-primitive types, including some handy syntactic sugar types
@@ -1451,6 +1891,7 @@ t_is_tuple(_) -> false.
t_bitstrlist() ->
t_iolist(1, t_bitstr()).
+%% XXX. To be removed.
-spec t_constant() -> erl_type().
t_constant() ->
@@ -1553,20 +1994,26 @@ t_timeout() ->
-spec t_array() -> erl_type().
t_array() ->
- t_opaque(array, array, [],
+ t_opaque(array, array, [t_any()],
t_tuple([t_atom('array'),
- t_non_neg_integer(), t_non_neg_integer(),
- t_any(), t_any()])).
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_any(),
+ t_any()])).
-spec t_dict() -> erl_type().
t_dict() ->
- t_opaque(dict, dict, [],
+ t_opaque(dict, dict, [t_any(), t_any()],
t_tuple([t_atom('dict'),
- t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_non_neg_integer(),
- t_tuple(), t_tuple()])).
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_tuple()]),
+ t_sup([t_atom('undefined'), t_tuple()])])).
-spec t_digraph() -> erl_type().
@@ -1593,15 +2040,17 @@ t_gb_tree() ->
-spec t_queue() -> erl_type().
t_queue() ->
- t_opaque(queue, queue, [], t_tuple([t_list(), t_list()])).
+ t_opaque(queue, queue, [t_any()], t_tuple([t_list(), t_list()])).
-spec t_set() -> erl_type().
t_set() ->
- t_opaque(sets, set, [],
+ t_opaque(sets, set, [t_any()],
t_tuple([t_atom('set'), t_non_neg_integer(), t_non_neg_integer(),
t_pos_integer(), t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_tuple(), t_tuple()])).
+ t_non_neg_integer(),
+ t_sup([t_atom('undefined'), t_tuple()]),
+ t_sup([t_atom('undefined'), t_tuple()])])).
-spec t_tid() -> erl_type().
@@ -1614,18 +2063,6 @@ all_opaque_builtins() ->
[t_array(), t_dict(), t_digraph(), t_gb_set(),
t_gb_tree(), t_queue(), t_set(), t_tid()].
--spec is_opaque_builtin(atom(), atom()) -> boolean().
-
-is_opaque_builtin(array, array) -> true;
-is_opaque_builtin(dict, dict) -> true;
-is_opaque_builtin(digraph, digraph) -> true;
-is_opaque_builtin(gb_sets, gb_set) -> true;
-is_opaque_builtin(gb_trees, gb_tree) -> true;
-is_opaque_builtin(queue, queue) -> true;
-is_opaque_builtin(sets, set) -> true;
-is_opaque_builtin(ets, tid) -> true;
-is_opaque_builtin(_, _) -> false.
-
%%------------------------------------
%% ?none is allowed in products. A product of size 1 is not a product.
@@ -1673,8 +2110,13 @@ t_has_var(?tuple(Elements, _, _)) ->
t_has_var_list(Elements);
t_has_var(?tuple_set(_) = T) ->
t_has_var_list(t_tuple_subtypes(T));
-%% t_has_var(?union(_) = U) ->
-%% exit(lists:flatten(io_lib:format("Union happens in t_has_var/1 ~p\n",[U])));
+t_has_var(?map(_)= Map) ->
+ t_has_var_list(map_keys(Map)) orelse t_has_var_list(map_values(Map));
+t_has_var(?opaque(Set)) ->
+ %% Assume variables in 'args' are also present i 'struct'
+ t_has_var_list([O#opaque.struct || O <- set_to_list(Set)]);
+t_has_var(?union(List)) ->
+ t_has_var_list(List);
t_has_var(_) -> false.
-spec t_has_var_list([erl_type()]) -> boolean().
@@ -1697,17 +2139,28 @@ t_collect_vars(?function(Domain, Range), Acc) ->
t_collect_vars(?list(Contents, Termination, _), Acc) ->
ordsets:union(t_collect_vars(Contents, Acc), t_collect_vars(Termination, []));
t_collect_vars(?product(Types), Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc, Types);
+ t_collect_vars_list(Types, Acc);
t_collect_vars(?tuple(?any, ?any, ?any), Acc) ->
Acc;
t_collect_vars(?tuple(Types, _, _), Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc, Types);
+ t_collect_vars_list(Types, Acc);
t_collect_vars(?tuple_set(_) = TS, Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc,
- t_tuple_subtypes(TS));
+ t_collect_vars_list(t_tuple_subtypes(TS), Acc);
+t_collect_vars(?map(_) = Map, Acc0) ->
+ Acc = t_collect_vars_list(map_keys(Map), Acc0),
+ t_collect_vars_list(map_values(Map), Acc);
+t_collect_vars(?opaque(Set), Acc) ->
+ %% Assume variables in 'args' are also present i 'struct'
+ t_collect_vars_list([O#opaque.struct || O <- set_to_list(Set)], Acc);
+t_collect_vars(?union(List), Acc) ->
+ t_collect_vars_list(List, Acc);
t_collect_vars(_, Acc) ->
Acc.
+t_collect_vars_list([T|Ts], Acc0) ->
+ Acc = t_collect_vars(T, Acc0),
+ t_collect_vars_list(Ts, Acc);
+t_collect_vars_list([], Acc) -> Acc.
%%=============================================================================
%%
@@ -1730,6 +2183,7 @@ t_from_term(T) when is_function(T) ->
{arity, Arity} = erlang:fun_info(T, arity),
t_fun(Arity, t_any());
t_from_term(T) when is_integer(T) -> t_integer(T);
+t_from_term(T) when is_map(T) -> t_map();
t_from_term(T) when is_pid(T) -> t_pid();
t_from_term(T) when is_port(T) -> t_port();
t_from_term(T) when is_reference(T) -> t_reference();
@@ -1827,15 +2281,31 @@ t_is_bitwidth(_) -> false.
-spec number_min(erl_type()) -> rng_elem().
-number_min(?int_range(From, _)) -> From;
-number_min(?int_set(Set)) -> set_min(Set);
-number_min(?number(?any, _Tag)) -> neg_inf.
+number_min(Type) ->
+ number_min(Type, 'universe').
+
+-spec number_min(erl_type(), opaques()) -> rng_elem().
+
+number_min(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_min2/1).
+
+number_min2(?int_range(From, _)) -> From;
+number_min2(?int_set(Set)) -> set_min(Set);
+number_min2(?number(?any, _Tag)) -> neg_inf.
-spec number_max(erl_type()) -> rng_elem().
-number_max(?int_range(_, To)) -> To;
-number_max(?int_set(Set)) -> set_max(Set);
-number_max(?number(?any, _Tag)) -> pos_inf.
+number_max(Type) ->
+ number_max(Type, 'universe').
+
+-spec number_max(erl_type(), opaques()) -> rng_elem().
+
+number_max(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_max2/1).
+
+number_max2(?int_range(_, To)) -> To;
+number_max2(?int_set(Set)) -> set_max(Set);
+number_max2(?number(?any, _Tag)) -> pos_inf.
%% -spec int_range(rgn_elem(), rng_elem()) -> erl_type().
%%
@@ -1917,7 +2387,7 @@ t_sup(?function(Domain1, Range1), ?function(Domain2, Range2)) ->
t_sup(?identifier(Set1), ?identifier(Set2)) ->
?identifier(set_union(Set1, Set2));
t_sup(?opaque(Set1), ?opaque(Set2)) ->
- ?opaque(set_union_no_limit(Set1, Set2));
+ sup_opaque(set_to_list(ordsets:union(Set1, Set2)));
%%Disallow unions with opaque types
%%t_sup(T1=?opaque(_,_,_), T2) ->
%% io:format("Debug: t_sup executed with args ~w and ~w~n",[T1, T2]), ?none;
@@ -2005,6 +2475,27 @@ t_sup(T1, T2) ->
?union(U2) = force_union(T2),
sup_union(U1, U2).
+sup_opaque([]) -> ?none;
+sup_opaque(List) ->
+ L = sup_opaq(List),
+ ?opaque(ordsets:from_list(L)).
+
+sup_opaq(L0) ->
+ L1 = [{{Mod,Name,Args}, T} ||
+ #opaque{mod = Mod, name = Name, args = Args}=T <- L0],
+ F = family(L1),
+ [supl(Ts) || {_, Ts} <- F].
+
+supl([O]) -> O;
+supl(Ts) -> supl(Ts, t_none()).
+
+supl([#opaque{struct = S}=O|L], S0) ->
+ S1 = t_sup(S, S0),
+ case L =:= [] of
+ true -> O#opaque{struct = S1};
+ false -> supl(L, S1)
+ end.
+
-spec t_sup_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_sup_lists([T1|Left1], [T2|Left2]) ->
@@ -2095,9 +2586,10 @@ force_union(T = ?function(_, _)) -> ?function_union(T);
force_union(T = ?identifier(_)) -> ?identifier_union(T);
force_union(T = ?list(_, _, _)) -> ?list_union(T);
force_union(T = ?nil) -> ?list_union(T);
-force_union(T = ?number(_,_)) -> ?number_union(T);
+force_union(T = ?number(_, _)) -> ?number_union(T);
force_union(T = ?opaque(_)) -> ?opaque_union(T);
force_union(T = ?remote(_)) -> ?remote_union(T);
+force_union(T = ?map(_)) -> ?map_union(T);
force_union(T = ?tuple(_, _, _)) -> ?tuple_union(T);
force_union(T = ?tuple_set(_)) -> ?tuple_union(T);
force_union(T = ?matchstate(_, _)) -> ?matchstate_union(T);
@@ -2132,19 +2624,27 @@ t_elements(?number(_, _) = T) ->
?int_set(Set) ->
[t_integer(I) || I <- Set]
end;
-t_elements(?opaque(_) = T) -> [T];
+t_elements(?opaque(_) = T) ->
+ do_elements(T);
+t_elements(?map(_) = T) -> [T];
t_elements(?tuple(_, _, _) = T) -> [T];
t_elements(?tuple_set(_) = TS) ->
case t_tuple_subtypes(TS) of
unknown -> [];
Elems -> Elems
end;
-t_elements(?union(List)) ->
- lists:append([t_elements(T) || T <- List]);
+t_elements(?union(_) = T) ->
+ do_elements(T);
t_elements(?var(_)) -> [?any]. %% yes, vars exist -- what else to do here?
%% t_elements(T) ->
%% io:format("T_ELEMENTS => ~p\n", [T]).
+do_elements(Type0) ->
+ case do_opaque(Type0, 'universe', fun(T) -> T end) of
+ ?union(List) -> lists:append([t_elements(T) || T <- List]);
+ Type -> t_elements(Type)
+ end.
+
%%-----------------------------------------------------------------------------
%% Infimum
%%
@@ -2162,74 +2662,77 @@ t_inf([]) -> ?none.
-spec t_inf(erl_type(), erl_type()) -> erl_type().
t_inf(T1, T2) ->
- t_inf(T1, T2, structured).
-
--type t_inf_mode() :: 'opaque' | 'structured'.
--spec t_inf(erl_type(), erl_type(), t_inf_mode()) -> erl_type().
-
-t_inf(?var(_), ?var(_), _Mode) -> ?any;
-t_inf(?var(_), T, _Mode) -> subst_all_vars_to_any(T);
-t_inf(T, ?var(_), _Mode) -> subst_all_vars_to_any(T);
-t_inf(?any, T, _Mode) -> subst_all_vars_to_any(T);
-t_inf(T, ?any, _Mode) -> subst_all_vars_to_any(T);
-t_inf(?none, _, _Mode) -> ?none;
-t_inf(_, ?none, _Mode) -> ?none;
-t_inf(?unit, _, _Mode) -> ?unit; % ?unit cases should appear below ?none
-t_inf(_, ?unit, _Mode) -> ?unit;
-t_inf(T, T, _Mode) -> subst_all_vars_to_any(T);
+ t_inf(T1, T2, 'universe').
+
+%% 'match' should be used from t_find_unknown_opaque() only
+-type t_inf_opaques() :: 'universe'
+ | [erl_type()] | {'match', [erl_type() | 'universe']}.
+
+-spec t_inf(erl_type(), erl_type(), t_inf_opaques()) -> erl_type().
+
+t_inf(?var(_), ?var(_), _Opaques) -> ?any;
+t_inf(?var(_), T, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(T, ?var(_), _Opaques) -> subst_all_vars_to_any(T);
+t_inf(?any, T, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(T, ?any, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(?none, _, _Opaques) -> ?none;
+t_inf(_, ?none, _Opaques) -> ?none;
+t_inf(?unit, _, _Opaques) -> ?unit; % ?unit cases should appear below ?none
+t_inf(_, ?unit, _Opaques) -> ?unit;
+t_inf(T, T, _Opaques) -> subst_all_vars_to_any(T);
t_inf(?atom(Set1), ?atom(Set2), _) ->
case set_intersection(Set1, Set2) of
?none -> ?none;
NewSet -> ?atom(NewSet)
end;
-t_inf(?bitstr(U1, B1), ?bitstr(0, B2), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(0, B2), _Opaques) ->
if B2 >= B1 andalso (B2-B1) rem U1 =:= 0 -> t_bitstr(0, B2);
true -> ?none
end;
-t_inf(?bitstr(0, B1), ?bitstr(U2, B2), _Mode) ->
+t_inf(?bitstr(0, B1), ?bitstr(U2, B2), _Opaques) ->
if B1 >= B2 andalso (B1-B2) rem U2 =:= 0 -> t_bitstr(0, B1);
true -> ?none
end;
-t_inf(?bitstr(U1, B1), ?bitstr(U1, B1), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(U1, B1), _Opaques) ->
t_bitstr(U1, B1);
-t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Mode) when U2 > U1 ->
+t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Opaques) when U2 > U1 ->
inf_bitstr(U2, B2, U1, B1);
-t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Opaques) ->
inf_bitstr(U1, B1, U2, B2);
-t_inf(?function(Domain1, Range1), ?function(Domain2, Range2), Mode) ->
- case t_inf(Domain1, Domain2, Mode) of
+t_inf(?function(Domain1, Range1), ?function(Domain2, Range2), Opaques) ->
+ case t_inf(Domain1, Domain2, Opaques) of
?none -> ?none;
- Domain -> ?function(Domain, t_inf(Range1, Range2, Mode))
+ Domain -> ?function(Domain, t_inf(Range1, Range2, Opaques))
end;
-t_inf(?identifier(Set1), ?identifier(Set2), _Mode) ->
+t_inf(?identifier(Set1), ?identifier(Set2), _Opaques) ->
case set_intersection(Set1, Set2) of
?none -> ?none;
Set -> ?identifier(Set)
end;
-t_inf(?matchstate(Pres1, Slots1), ?matchstate(Pres2, Slots2), _Mode) ->
+t_inf(?matchstate(Pres1, Slots1), ?matchstate(Pres2, Slots2), _Opaques) ->
?matchstate(t_inf(Pres1, Pres2), t_inf(Slots1, Slots2));
-t_inf(?nil, ?nil, _Mode) -> ?nil;
-t_inf(?nil, ?nonempty_list(_, _), _Mode) ->
+t_inf(?nil, ?nil, _Opaques) -> ?nil;
+t_inf(?nil, ?nonempty_list(_, _), _Opaques) ->
?none;
-t_inf(?nonempty_list(_, _), ?nil, _Mode) ->
+t_inf(?nonempty_list(_, _), ?nil, _Opaques) ->
?none;
-t_inf(?nil, ?list(_Contents, Termination, _), Mode) ->
- t_inf(?nil, Termination, Mode);
-t_inf(?list(_Contents, Termination, _), ?nil, Mode) ->
- t_inf(?nil, Termination, Mode);
+t_inf(?nil, ?list(_Contents, Termination, _), Opaques) ->
+ t_inf(?nil, t_unopaque(Termination), Opaques);
+t_inf(?list(_Contents, Termination, _), ?nil, Opaques) ->
+ t_inf(?nil, t_unopaque(Termination), Opaques);
t_inf(?list(Contents1, Termination1, Size1),
- ?list(Contents2, Termination2, Size2), Mode) ->
- case t_inf(Termination1, Termination2, Mode) of
+ ?list(Contents2, Termination2, Size2), Opaques) ->
+ case t_inf(Termination1, Termination2, Opaques) of
?none -> ?none;
Termination ->
- case t_inf(Contents1, Contents2, Mode) of
- ?none ->
+ case t_inf(Contents1, Contents2, Opaques) of
+ ?none ->
%% If none of the lists are nonempty, then the infimum is nil.
case (Size1 =:= ?unknown_qual) andalso (Size2 =:= ?unknown_qual) of
true -> t_nil();
false -> ?none
end;
- Contents ->
+ Contents ->
Size =
case {Size1, Size2} of
{?unknown_qual, ?unknown_qual} -> ?unknown_qual;
@@ -2240,7 +2743,7 @@ t_inf(?list(Contents1, Termination1, Size1),
?list(Contents, Termination, Size)
end
end;
-t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
+t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Opaques) ->
case {T1, T2} of
{T, T} -> T;
{_, ?number(?any, ?unknown_qual)} -> T1;
@@ -2249,16 +2752,16 @@ t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
{?integer(_), ?float} -> ?none;
{?integer(?any), ?integer(_)} -> T2;
{?integer(_), ?integer(?any)} -> T1;
- {?int_set(Set1), ?int_set(Set2)} ->
+ {?int_set(Set1), ?int_set(Set2)} ->
case set_intersection(Set1, Set2) of
?none -> ?none;
Set -> ?int_set(Set)
end;
- {?int_range(From1, To1), ?int_range(From2, To2)} ->
+ {?int_range(From1, To1), ?int_range(From2, To2)} ->
t_from_range(max(From1, From2), min(To1, To2));
{Range = ?int_range(_, _), ?int_set(Set)} ->
%% io:format("t_inf range, set args ~p ~p ~n", [T1, T2]),
- Ans2 =
+ Ans2 =
case set_filter(fun(X) -> in_range(X, Range) end, Set) of
?none -> ?none;
NewSet -> ?int_set(NewSet)
@@ -2271,198 +2774,271 @@ t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
NewSet -> ?int_set(NewSet)
end
end;
-t_inf(?product(Types1), ?product(Types2), Mode) ->
+t_inf(?product(Types1), ?product(Types2), Opaques) ->
L1 = length(Types1),
L2 = length(Types2),
- if L1 =:= L2 -> ?product(t_inf_lists(Types1, Types2, Mode));
+ if L1 =:= L2 -> ?product(t_inf_lists(Types1, Types2, Opaques));
true -> ?none
end;
-t_inf(?product(_), _, _Mode) ->
+t_inf(?product(_), _, _Opaques) ->
?none;
-t_inf(_, ?product(_), _Mode) ->
+t_inf(_, ?product(_), _Opaques) ->
?none;
-t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Mode) ->
+t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Mode) ->
+t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Mode) ->
+t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Mode) ->
+t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(Elements1, Arity, _Tag1), ?tuple(Elements2, Arity, _Tag2), Mode) ->
- case t_inf_lists_strict(Elements1, Elements2, Mode) of
+t_inf(?tuple(Elements1, Arity, _Tag1), ?tuple(Elements2, Arity, _Tag2), Opaques) ->
+ case t_inf_lists_strict(Elements1, Elements2, Opaques) of
bottom -> ?none;
NewElements -> t_tuple(NewElements)
end;
-t_inf(?tuple_set(List1), ?tuple_set(List2), Mode) ->
- inf_tuple_sets(List1, List2, Mode);
-t_inf(?tuple_set(List), ?tuple(_, Arity, _) = T, Mode) ->
- inf_tuple_sets(List, [{Arity, [T]}], Mode);
-t_inf(?tuple(_, Arity, _) = T, ?tuple_set(List), Mode) ->
- inf_tuple_sets(List, [{Arity, [T]}], Mode);
+t_inf(?tuple_set(List1), ?tuple_set(List2), Opaques) ->
+ inf_tuple_sets(List1, List2, Opaques);
+t_inf(?tuple_set(List), ?tuple(_, Arity, _) = T, Opaques) ->
+ inf_tuple_sets(List, [{Arity, [T]}], Opaques);
+t_inf(?tuple(_, Arity, _) = T, ?tuple_set(List), Opaques) ->
+ inf_tuple_sets(List, [{Arity, [T]}], Opaques);
%% be careful: here and in the next clause T can be ?opaque
-t_inf(?union(U1), T, Mode) ->
+t_inf(?union(U1), T, Opaques) ->
?union(U2) = force_union(T),
- inf_union(U1, U2, Mode);
-t_inf(T, ?union(U2), Mode) ->
+ inf_union(U1, U2, Opaques);
+t_inf(T, ?union(U2), Opaques) ->
?union(U1) = force_union(T),
- inf_union(U1, U2, Mode);
+ inf_union(U1, U2, Opaques);
+t_inf(?opaque(Set1), ?opaque(Set2), Opaques) ->
+ inf_opaque(Set1, Set2, Opaques);
+t_inf(?opaque(_) = T1, T2, Opaques) ->
+ inf_opaque1(T2, T1, 1, Opaques);
+t_inf(T1, ?opaque(_) = T2, Opaques) ->
+ inf_opaque1(T1, T2, 2, Opaques);
%% and as a result, the cases for ?opaque should appear *after* ?union
-t_inf(?opaque(Set1) = T1, ?opaque(Set2) = T2, Mode) ->
- case set_intersection(Set1, Set2) of
- ?none ->
- case Mode =:= opaque of
- true ->
- Struct1 = t_opaque_structure(T1),
- case t_inf(Struct1, T2) of
- ?none ->
- Struct2 = t_opaque_structure(T2),
- case t_inf(Struct2, T1) of
- ?none -> ?none;
- _ -> T2
- end;
- _ -> T1
- end;
- false -> ?none
- end;
- NewSet -> ?opaque(NewSet)
- end;
-t_inf(?opaque(_) = T1, T2, opaque) ->
- case t_inf(t_opaque_structure(T1), T2, structured) of
- ?none -> ?none;
- _Type -> T1
- end;
-t_inf(T1, ?opaque(_) = T2, opaque) ->
- case t_inf(T1, t_opaque_structure(T2), structured) of
- ?none -> ?none;
- _Type -> T2
- end;
t_inf(#c{}, #c{}, _) ->
?none.
+inf_opaque1(T1, ?opaque(Set2)=T2, Pos, Opaques) ->
+ case Opaques =:= 'universe' orelse inf_is_opaque_type(T2, Pos, Opaques) of
+ false -> ?none;
+ true ->
+ List2 = set_to_list(Set2),
+ case inf_collect(T1, List2, Opaques, []) of
+ [] -> ?none;
+ OpL -> ?opaque(ordsets:from_list(OpL))
+ end
+ end.
+
+inf_is_opaque_type(T, Pos, {match, Opaques}) ->
+ is_opaque_type(T, Opaques) orelse throw(Pos);
+inf_is_opaque_type(T, _Pos, Opaques) ->
+ is_opaque_type(T, Opaques).
+
+inf_collect(T1, [T2|List2], Opaques, OpL) ->
+ #opaque{struct = S2} = T2,
+ case t_inf(T1, S2, Opaques) of
+ ?none -> inf_collect(T1, List2, Opaques, OpL);
+ Inf ->
+ Op = T2#opaque{struct = Inf},
+ inf_collect(T1, List2, Opaques, [Op|OpL])
+ end;
+inf_collect(_T1, [], _Opaques, OpL) ->
+ OpL.
+
+combine(S, T1, T2) ->
+ #opaque{mod = Mod1, name = Name1, args = Args1} = T1,
+ #opaque{mod = Mod2, name = Name2, args = Args2} = T2,
+ case is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2}) of
+ true -> [comb(Mod1, Name1, Args1, S, T1)];
+ false -> [comb(Mod1, Name1, Args1, S, T1), comb(Mod2, Name2, Args2, S, T2)]
+ end.
+
+comb(Mod, Name, Args, S, T) ->
+ case is_same_name(Mod, Name, Args, S) of
+ true -> S;
+ false -> T#opaque{struct = S}
+ end.
+
+is_same_name(Mod1, Name1, Args1,
+ ?opaque([#opaque{mod = Mod2, name = Name2, args = Args2}])) ->
+ is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2});
+is_same_name(_, _, _, _) -> false.
+
+%% Combining two lists this way can be very time consuming...
+%% Note: two parameterized opaque types are not the same if their
+%% actual parameters differ
+inf_opaque(Set1, Set2, Opaques) ->
+ List1 = inf_look_up(Set1, 1, Opaques),
+ List2 = inf_look_up(Set2, 2, Opaques),
+ List0 = [combine(Inf, T1, T2) ||
+ {Is1, ModNameArgs1, T1} <- List1,
+ {Is2, ModNameArgs2, T2} <- List2,
+ not t_is_none(Inf = inf_opaque_types(Is1, ModNameArgs1, T1,
+ Is2, ModNameArgs2, T2,
+ Opaques))],
+ List = lists:sort(lists:append(List0)),
+ sup_opaque(List).
+
+%% Optimization: do just one lookup.
+inf_look_up(Set, Pos, Opaques) ->
+ [{Opaques =:= 'universe' orelse inf_is_opaque_type2(T, Pos, Opaques),
+ {M, N, Args}, T} ||
+ #opaque{mod = M, name = N, args = Args} = T <- set_to_list(Set)].
+
+inf_is_opaque_type2(T, Pos, {match, Opaques}) ->
+ is_opaque_type2(T, Opaques) orelse throw(Pos);
+inf_is_opaque_type2(T, _Pos, Opaques) ->
+ is_opaque_type2(T, Opaques).
+
+inf_opaque_types(IsOpaque1, ModNameArgs1, T1,
+ IsOpaque2, ModNameArgs2, T2, Opaques) ->
+ #opaque{struct = S1}=T1,
+ #opaque{struct = S2}=T2,
+ case
+ Opaques =:= 'universe' orelse
+ is_same_type_name(ModNameArgs1, ModNameArgs2)
+ of
+ true -> t_inf(S1, S2, Opaques);
+ false ->
+ case {IsOpaque1, IsOpaque2} of
+ {true, true} -> t_inf(S1, S2, Opaques);
+ {true, false} -> t_inf(S1, ?opaque(set_singleton(T2)), Opaques);
+ {false, true} -> t_inf(?opaque(set_singleton(T1)), S2, Opaques);
+ {false, false} -> t_none()
+ end
+ end.
+
-spec t_inf_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_inf_lists(L1, L2) ->
- t_inf_lists(L1, L2, structured).
+ t_inf_lists(L1, L2, 'universe').
--spec t_inf_lists([erl_type()], [erl_type()], t_inf_mode()) -> [erl_type()].
+-spec t_inf_lists([erl_type()], [erl_type()], t_inf_opaques()) -> [erl_type()].
-t_inf_lists(L1, L2, Mode) ->
- t_inf_lists(L1, L2, [], Mode).
+t_inf_lists(L1, L2, Opaques) ->
+ t_inf_lists(L1, L2, [], Opaques).
--spec t_inf_lists([erl_type()], [erl_type()], [erl_type()], t_inf_mode()) -> [erl_type()].
+-spec t_inf_lists([erl_type()], [erl_type()], [erl_type()], [erl_type()]) -> [erl_type()].
-t_inf_lists([T1|Left1], [T2|Left2], Acc, Mode) ->
- t_inf_lists(Left1, Left2, [t_inf(T1, T2, Mode)|Acc], Mode);
-t_inf_lists([], [], Acc, _Mode) ->
+t_inf_lists([T1|Left1], [T2|Left2], Acc, Opaques) ->
+ t_inf_lists(Left1, Left2, [t_inf(T1, T2, Opaques)|Acc], Opaques);
+t_inf_lists([], [], Acc, _Opaques) ->
lists:reverse(Acc).
%% Infimum of lists with strictness.
%% If any element is the ?none type, the value 'bottom' is returned.
--spec t_inf_lists_strict([erl_type()], [erl_type()], t_inf_mode()) -> 'bottom' | [erl_type()].
+-spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()]) -> 'bottom' | [erl_type()].
-t_inf_lists_strict(L1, L2, Mode) ->
- t_inf_lists_strict(L1, L2, [], Mode).
+t_inf_lists_strict(L1, L2, Opaques) ->
+ t_inf_lists_strict(L1, L2, [], Opaques).
--spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()], t_inf_mode()) -> 'bottom' | [erl_type()].
+-spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()], [erl_type()]) -> 'bottom' | [erl_type()].
-t_inf_lists_strict([T1|Left1], [T2|Left2], Acc, Mode) ->
- case t_inf(T1, T2, Mode) of
+t_inf_lists_strict([T1|Left1], [T2|Left2], Acc, Opaques) ->
+ case t_inf(T1, T2, Opaques) of
?none -> bottom;
- T -> t_inf_lists_strict(Left1, Left2, [T|Acc], Mode)
+ T -> t_inf_lists_strict(Left1, Left2, [T|Acc], Opaques)
end;
-t_inf_lists_strict([], [], Acc, _Mode) ->
+t_inf_lists_strict([], [], Acc, _Opaques) ->
lists:reverse(Acc).
--spec t_inf_lists_masked([erl_type()], [erl_type()], [t_inf_mode()]) -> [erl_type()].
-
-t_inf_lists_masked(List1, List2, Mask) ->
- List = lists:zip3(List1, List2, Mask),
- [t_inf(T1, T2, Mode) || {T1, T2, Mode} <- List].
-
-inf_tuple_sets(L1, L2, Mode) ->
- case inf_tuple_sets(L1, L2, [], Mode) of
+inf_tuple_sets(L1, L2, Opaques) ->
+ case inf_tuple_sets(L1, L2, [], Opaques) of
[] -> ?none;
[{_Arity, [?tuple(_, _, _) = OneTuple]}] -> OneTuple;
List -> ?tuple_set(List)
end.
-inf_tuple_sets([{Arity, Tuples1}|Ts1], [{Arity, Tuples2}|Ts2], Acc, Mode) ->
- case inf_tuples_in_sets(Tuples1, Tuples2, Mode) of
- [] -> inf_tuple_sets(Ts1, Ts2, Acc, Mode);
+inf_tuple_sets([{Arity, Tuples1}|Ts1], [{Arity, Tuples2}|Ts2], Acc, Opaques) ->
+ case inf_tuples_in_sets(Tuples1, Tuples2, Opaques) of
+ [] -> inf_tuple_sets(Ts1, Ts2, Acc, Opaques);
[?tuple_set([{Arity, NewTuples}])] ->
- inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Mode);
- NewTuples -> inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Mode)
+ inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Opaques);
+ NewTuples -> inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Opaques)
end;
-inf_tuple_sets([{Arity1, _}|Ts1] = L1, [{Arity2, _}|Ts2] = L2, Acc, Mode) ->
- if Arity1 < Arity2 -> inf_tuple_sets(Ts1, L2, Acc, Mode);
- Arity1 > Arity2 -> inf_tuple_sets(L1, Ts2, Acc, Mode)
+inf_tuple_sets([{Arity1, _}|Ts1] = L1, [{Arity2, _}|Ts2] = L2, Acc, Opaques) ->
+ if Arity1 < Arity2 -> inf_tuple_sets(Ts1, L2, Acc, Opaques);
+ Arity1 > Arity2 -> inf_tuple_sets(L1, Ts2, Acc, Opaques)
end;
-inf_tuple_sets([], _, Acc, _Mode) -> lists:reverse(Acc);
-inf_tuple_sets(_, [], Acc, _Mode) -> lists:reverse(Acc).
-
-inf_tuples_in_sets([?tuple(Elements1, _, ?any)], L2, Mode) ->
- NewList = [t_inf_lists_strict(Elements1, Elements2, Mode)
+inf_tuple_sets([], _, Acc, _Opaques) -> lists:reverse(Acc);
+inf_tuple_sets(_, [], Acc, _Opaques) -> lists:reverse(Acc).
+
+inf_tuples_in_sets([?tuple(Elements1, _, ?any)], L2, Opaques) ->
+ NewList = [t_inf_lists_strict(Elements1, Elements2, Opaques)
|| ?tuple(Elements2, _, _) <- L2],
[t_tuple(Es) || Es <- NewList, Es =/= bottom];
-inf_tuples_in_sets(L1, [?tuple(Elements2, _, ?any)], Mode) ->
- NewList = [t_inf_lists_strict(Elements1, Elements2, Mode)
+inf_tuples_in_sets(L1, [?tuple(Elements2, _, ?any)], Opaques) ->
+ NewList = [t_inf_lists_strict(Elements1, Elements2, Opaques)
|| ?tuple(Elements1, _, _) <- L1],
[t_tuple(Es) || Es <- NewList, Es =/= bottom];
-inf_tuples_in_sets(L1, L2, Mode) ->
- inf_tuples_in_sets(L1, L2, [], Mode).
+inf_tuples_in_sets(L1, L2, Opaques) ->
+ inf_tuples_in_sets2(L1, L2, [], Opaques).
-inf_tuples_in_sets([?tuple(Elements1, Arity, Tag)|Ts1],
- [?tuple(Elements2, Arity, Tag)|Ts2], Acc, Mode) ->
- case t_inf_lists_strict(Elements1, Elements2, Mode) of
- bottom -> inf_tuples_in_sets(Ts1, Ts2, Acc, Mode);
+inf_tuples_in_sets2([?tuple(Elements1, Arity, Tag)|Ts1],
+ [?tuple(Elements2, Arity, Tag)|Ts2], Acc, Opaques) ->
+ case t_inf_lists_strict(Elements1, Elements2, Opaques) of
+ bottom -> inf_tuples_in_sets2(Ts1, Ts2, Acc, Opaques);
NewElements ->
- inf_tuples_in_sets(Ts1, Ts2, [?tuple(NewElements, Arity, Tag)|Acc], Mode)
+ inf_tuples_in_sets2(Ts1, Ts2, [?tuple(NewElements, Arity, Tag)|Acc],
+ Opaques)
end;
-inf_tuples_in_sets([?tuple(_, _, Tag1)|Ts1] = L1,
- [?tuple(_, _, Tag2)|Ts2] = L2, Acc, Mode) ->
- if Tag1 < Tag2 -> inf_tuples_in_sets(Ts1, L2, Acc, Mode);
- Tag1 > Tag2 -> inf_tuples_in_sets(L1, Ts2, Acc, Mode)
+inf_tuples_in_sets2([?tuple(_, _, Tag1)|Ts1] = L1,
+ [?tuple(_, _, Tag2)|Ts2] = L2, Acc, Opaques) ->
+ if Tag1 < Tag2 -> inf_tuples_in_sets2(Ts1, L2, Acc, Opaques);
+ Tag1 > Tag2 -> inf_tuples_in_sets2(L1, Ts2, Acc, Opaques)
end;
-inf_tuples_in_sets([], _, Acc, _Mode) -> lists:reverse(Acc);
-inf_tuples_in_sets(_, [], Acc, _Mode) -> lists:reverse(Acc).
-
-inf_union(U1, U2, opaque) ->
-%%---------------------------------------------------------------------
-%% Under Testing
-%%----------------------------------------------------------------------
-%% OpaqueFun =
-%% fun(Union1, Union2) ->
-%% [_,_,_,_,_,_,_,_,Opaque,_] = Union1,
-%% [A,B,F,I,L,N,T,M,_,_R] = Union2,
-%% List = [A,B,F,I,L,N,T,M],
-%% case [T || T <- List, t_inf(T, Opaque, opaque) =/= ?none] of
-%% [] -> ?none;
-%% _ -> Opaque
-%% end
-%% end,
-%% O1 = OpaqueFun(U1, U2),
-%% O2 = OpaqueFun(U2, U1),
-%% Union = inf_union(U1, U2, 0, [], opaque),
-%% t_sup([O1, O2, Union]);
- inf_union(U1, U2, 0, [], opaque);
-inf_union(U1, U2, OtherMode) ->
- inf_union(U1, U2, 0, [], OtherMode).
-
-inf_union([?none|Left1], [?none|Left2], N, Acc, Mode) ->
- inf_union(Left1, Left2, N, [?none|Acc], Mode);
-inf_union([T1|Left1], [T2|Left2], N, Acc, Mode) ->
- case t_inf(T1, T2, Mode) of
- ?none -> inf_union(Left1, Left2, N, [?none|Acc], Mode);
- T -> inf_union(Left1, Left2, N+1, [T|Acc], Mode)
+inf_tuples_in_sets2([], _, Acc, _Opaques) -> lists:reverse(Acc);
+inf_tuples_in_sets2(_, [], Acc, _Opaques) -> lists:reverse(Acc).
+
+inf_union(U1, U2, Opaques) ->
+ OpaqueFun =
+ fun(Union1, Union2, InfFun) ->
+ [_,_,_,_,_,_,_,_,Opaque,_,_] = Union1,
+ [A,B,F,I,L,N,T,M,_,_R,Map] = Union2,
+ List = [A,B,F,I,L,N,T,M,Map],
+ inf_union_collect(List, Opaque, InfFun, [], [])
+ end,
+ {O1, ThrowList1} =
+ OpaqueFun(U1, U2, fun(E, Opaque) -> t_inf(Opaque, E, Opaques) end),
+ {O2, ThrowList2}
+ = OpaqueFun(U2, U1, fun(E, Opaque) -> t_inf(E, Opaque, Opaques) end),
+ {Union, ThrowList3} = inf_union(U1, U2, 0, [], [], Opaques),
+ ThrowList = lists:merge3(ThrowList1, ThrowList2, ThrowList3),
+ case t_sup([O1, O2, Union]) of
+ ?none when ThrowList =/= [] -> throw(hd(ThrowList));
+ Sup -> Sup
+ end.
+
+inf_union_collect([], _Opaque, _InfFun, InfList, ThrowList) ->
+ {t_sup(InfList), lists:usort(ThrowList)};
+inf_union_collect([?none|L], Opaque, InfFun, InfList, ThrowList) ->
+ inf_union_collect(L, Opaque, InfFun, [?none|InfList], ThrowList);
+inf_union_collect([E|L], Opaque, InfFun, InfList, ThrowList) ->
+ try InfFun(E, Opaque)of
+ Inf ->
+ inf_union_collect(L, Opaque, InfFun, [Inf|InfList], ThrowList)
+ catch throw:N when is_integer(N) ->
+ inf_union_collect(L, Opaque, InfFun, InfList, [N|ThrowList])
+ end.
+
+inf_union([?none|Left1], [?none|Left2], N, Acc, ThrowList, Opaques) ->
+ inf_union(Left1, Left2, N, [?none|Acc], ThrowList, Opaques);
+inf_union([T1|Left1], [T2|Left2], N, Acc, ThrowList, Opaques) ->
+ try t_inf(T1, T2, Opaques) of
+ ?none -> inf_union(Left1, Left2, N, [?none|Acc], ThrowList, Opaques);
+ T -> inf_union(Left1, Left2, N+1, [T|Acc], ThrowList, Opaques)
+ catch throw:N when is_integer(N) ->
+ inf_union(Left1, Left2, N, [?none|Acc], [N|ThrowList], Opaques)
end;
-inf_union([], [], N, Acc, _Mode) ->
- if N =:= 0 -> ?none;
+inf_union([], [], N, Acc, ThrowList, _Opaques) ->
+ if N =:= 0 -> {?none, ThrowList};
N =:= 1 ->
[Type] = [T || T <- Acc, T =/= ?none],
- Type;
- N >= 2 -> ?union(lists:reverse(Acc))
+ {Type, ThrowList};
+ N >= 2 -> {?union(lists:reverse(Acc)), ThrowList}
end.
inf_bitstr(U1, B1, U2, B2) ->
@@ -2494,13 +3070,13 @@ findfirst(N1, N2, U1, B1, U2, B2) ->
%% to types. Hans Bolinder suggested the use of lists of Key-Value pairs for
%% this data structure and measurements showed a non-trivial speedup when using
%% them for operations within this module (e.g. in t_unify/2). However, there
-%% is code outside erl_types that still passes a dict() in the 2nd argument.
+%% is code outside erl_types that still passes a dict:dict() in the 2nd argument.
%% So, for the time being, this module provides a t_subst/2 function for these
%% external calls and a clone of it (t_subst_kv/2) which is used from all calls
%% from within this module. This code duplication needs to be eliminated at
%% some point.
--spec t_subst(erl_type(), dict()) -> erl_type().
+-spec t_subst(erl_type(), dict:dict(atom(), erl_type())) -> erl_type().
t_subst(T, Dict) ->
case t_has_var(T) of
@@ -2536,6 +3112,16 @@ t_subst_dict(?tuple(Elements, _Arity, _Tag), Dict) ->
t_tuple([t_subst_dict(E, Dict) || E <- Elements]);
t_subst_dict(?tuple_set(_) = TS, Dict) ->
t_sup([t_subst_dict(T, Dict) || T <- t_tuple_subtypes(TS)]);
+t_subst_dict(?map(Pairs), Dict) ->
+ ?map([{t_subst_dict(K, Dict), t_subst_dict(V, Dict)} ||
+ {K, V} <- Pairs]);
+t_subst_dict(?opaque(Es), Dict) ->
+ List = [Opaque#opaque{args = [t_subst_dict(Arg, Dict) || Arg <- Args],
+ struct = t_subst_dict(S, Dict)} ||
+ Opaque = #opaque{args = Args, struct = S} <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
+t_subst_dict(?union(List), Dict) ->
+ ?union([t_subst_dict(E, Dict) || E <- List]);
t_subst_dict(T, _Dict) ->
T.
@@ -2578,9 +3164,31 @@ t_subst_aux(?tuple(Elements, _Arity, _Tag), VarMap) ->
t_tuple([t_subst_aux(E, VarMap) || E <- Elements]);
t_subst_aux(?tuple_set(_) = TS, VarMap) ->
t_sup([t_subst_aux(T, VarMap) || T <- t_tuple_subtypes(TS)]);
+t_subst_aux(?map(Pairs), VarMap) ->
+ ?map([{t_subst_aux(K, VarMap), t_subst_aux(V, VarMap)} ||
+ {K, V} <- Pairs]);
+t_subst_aux(?opaque(Es), VarMap) ->
+ List = [Opaque#opaque{args = [t_subst_aux(Arg, VarMap) || Arg <- Args],
+ struct = t_subst_aux(S, VarMap)} ||
+ Opaque = #opaque{args = Args, struct = S} <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
+t_subst_aux(?union(List), VarMap) ->
+ ?union([t_subst_aux(E, VarMap) || E <- List]);
t_subst_aux(T, _VarMap) ->
T.
+-spec subst_all_remote(erl_type(), erl_type()) -> erl_type().
+
+subst_all_remote(Type0, Substitute) ->
+ Map =
+ fun(Type) ->
+ case erl_types:t_is_remote(Type) of
+ true -> Substitute;
+ false -> Type
+ end
+ end,
+ erl_types:t_map(Map, Type0).
+
%%-----------------------------------------------------------------------------
%% Unification
%%
@@ -2590,112 +3198,152 @@ t_subst_aux(T, _VarMap) ->
-spec t_unify(erl_type(), erl_type()) -> t_unify_ret().
t_unify(T1, T2) ->
- t_unify(T1, T2, []).
-
--spec t_unify(erl_type(), erl_type(), [erl_type()]) -> t_unify_ret().
-
-t_unify(T1, T2, Opaques) ->
- {T, VarMap} = t_unify(T1, T2, [], Opaques),
+ {T, VarMap} = t_unify(T1, T2, []),
{t_subst_kv(T, VarMap), lists:keysort(1, VarMap)}.
-t_unify(?var(Id) = T, ?var(Id), VarMap, _Opaques) ->
+t_unify(?var(Id) = T, ?var(Id), VarMap) ->
{T, VarMap};
-t_unify(?var(Id1) = T, ?var(Id2), VarMap, Opaques) ->
+t_unify(?var(Id1) = T, ?var(Id2), VarMap) ->
case lists:keyfind(Id1, 1, VarMap) of
false ->
case lists:keyfind(Id2, 1, VarMap) of
false -> {T, [{Id2, T} | VarMap]};
- {Id2, Type} -> t_unify(T, Type, VarMap, Opaques)
+ {Id2, Type} -> t_unify(T, Type, VarMap)
end;
{Id1, Type1} ->
case lists:keyfind(Id2, 1, VarMap) of
false -> {Type1, [{Id2, T} | VarMap]};
- {Id2, Type2} -> t_unify(Type1, Type2, VarMap, Opaques)
+ {Id2, Type2} -> t_unify(Type1, Type2, VarMap)
end
end;
-t_unify(?var(Id), Type, VarMap, Opaques) ->
+t_unify(?var(Id), Type, VarMap) ->
case lists:keyfind(Id, 1, VarMap) of
false -> {Type, [{Id, Type} | VarMap]};
- {Id, VarType} -> t_unify(VarType, Type, VarMap, Opaques)
+ {Id, VarType} -> t_unify(VarType, Type, VarMap)
end;
-t_unify(Type, ?var(Id), VarMap, Opaques) ->
+t_unify(Type, ?var(Id), VarMap) ->
case lists:keyfind(Id, 1, VarMap) of
false -> {Type, [{Id, Type} | VarMap]};
- {Id, VarType} -> t_unify(VarType, Type, VarMap, Opaques)
+ {Id, VarType} -> t_unify(VarType, Type, VarMap)
end;
-t_unify(?function(Domain1, Range1), ?function(Domain2, Range2), VarMap, Opaques) ->
- {Domain, VarMap1} = t_unify(Domain1, Domain2, VarMap, Opaques),
- {Range, VarMap2} = t_unify(Range1, Range2, VarMap1, Opaques),
+t_unify(?function(Domain1, Range1), ?function(Domain2, Range2), VarMap) ->
+ {Domain, VarMap1} = t_unify(Domain1, Domain2, VarMap),
+ {Range, VarMap2} = t_unify(Range1, Range2, VarMap1),
{?function(Domain, Range), VarMap2};
t_unify(?list(Contents1, Termination1, Size),
- ?list(Contents2, Termination2, Size), VarMap, Opaques) ->
- {Contents, VarMap1} = t_unify(Contents1, Contents2, VarMap, Opaques),
- {Termination, VarMap2} = t_unify(Termination1, Termination2, VarMap1, Opaques),
+ ?list(Contents2, Termination2, Size), VarMap) ->
+ {Contents, VarMap1} = t_unify(Contents1, Contents2, VarMap),
+ {Termination, VarMap2} = t_unify(Termination1, Termination2, VarMap1),
{?list(Contents, Termination, Size), VarMap2};
-t_unify(?product(Types1), ?product(Types2), VarMap, Opaques) ->
- {Types, VarMap1} = unify_lists(Types1, Types2, VarMap, Opaques),
+t_unify(?product(Types1), ?product(Types2), VarMap) ->
+ {Types, VarMap1} = unify_lists(Types1, Types2, VarMap),
{?product(Types), VarMap1};
-t_unify(?tuple(?any, ?any, ?any) = T, ?tuple(?any, ?any, ?any), VarMap, _Opaques) ->
+t_unify(?tuple(?any, ?any, ?any) = T, ?tuple(?any, ?any, ?any), VarMap) ->
{T, VarMap};
t_unify(?tuple(Elements1, Arity, _),
- ?tuple(Elements2, Arity, _), VarMap, Opaques) when Arity =/= ?any ->
- {NewElements, VarMap1} = unify_lists(Elements1, Elements2, VarMap, Opaques),
+ ?tuple(Elements2, Arity, _), VarMap) when Arity =/= ?any ->
+ {NewElements, VarMap1} = unify_lists(Elements1, Elements2, VarMap),
{t_tuple(NewElements), VarMap1};
t_unify(?tuple_set([{Arity, _}]) = T1,
- ?tuple(_, Arity, _) = T2, VarMap, Opaques) when Arity =/= ?any ->
- unify_tuple_set_and_tuple(T1, T2, VarMap, Opaques);
+ ?tuple(_, Arity, _) = T2, VarMap) when Arity =/= ?any ->
+ unify_tuple_set_and_tuple1(T1, T2, VarMap);
t_unify(?tuple(_, Arity, _) = T1,
- ?tuple_set([{Arity, _}]) = T2, VarMap, Opaques) when Arity =/= ?any ->
- unify_tuple_set_and_tuple(T2, T1, VarMap, Opaques);
-t_unify(?tuple_set(List1), ?tuple_set(List2), VarMap, Opaques) ->
- {Tuples, NewVarMap} =
- unify_lists(lists:append([T || {_Arity, T} <- List1]),
- lists:append([T || {_Arity, T} <- List2]), VarMap, Opaques),
- {t_sup(Tuples), NewVarMap};
-t_unify(?opaque(Elements) = T, ?opaque(Elements), VarMap, _Opaques) ->
- {T, VarMap};
-t_unify(?opaque(_) = T1, ?opaque(_) = T2, _VarMap, _Opaques) ->
- throw({mismatch, T1, T2});
-t_unify(Type, ?opaque(_) = OpType, VarMap, Opaques) ->
- t_unify_with_opaque(Type, OpType, VarMap, Opaques);
-t_unify(?opaque(_) = OpType, Type, VarMap, Opaques) ->
- t_unify_with_opaque(Type, OpType, VarMap, Opaques);
-t_unify(T, T, VarMap, _Opaques) ->
+ ?tuple_set([{Arity, _}]) = T2, VarMap) when Arity =/= ?any ->
+ unify_tuple_set_and_tuple2(T1, T2, VarMap);
+t_unify(?tuple_set(List1) = T1, ?tuple_set(List2) = T2, VarMap) ->
+ try
+ unify_lists(lists:append([T || {_Arity, T} <- List1]),
+ lists:append([T || {_Arity, T} <- List2]), VarMap)
+ of
+ {Tuples, NewVarMap} -> {t_sup(Tuples), NewVarMap}
+ catch _:_ -> throw({mismatch, T1, T2})
+ end;
+t_unify(?opaque(_) = T1, ?opaque(_) = T2, VarMap) ->
+ t_unify(t_opaque_structure(T1), t_opaque_structure(T2), VarMap);
+t_unify(T1, ?opaque(_) = T2, VarMap) ->
+ t_unify(T1, t_opaque_structure(T2), VarMap);
+t_unify(?opaque(_) = T1, T2, VarMap) ->
+ t_unify(t_opaque_structure(T1), T2, VarMap);
+t_unify(T, T, VarMap) ->
{T, VarMap};
-t_unify(T1, T2, _, _) ->
+t_unify(?union(_)=T1, ?union(_)=T2, VarMap) ->
+ {Type1, Type2} = unify_union2(T1, T2),
+ t_unify(Type1, Type2, VarMap);
+t_unify(?union(_)=T1, T2, VarMap) ->
+ t_unify(unify_union1(T1, T1, T2), T2, VarMap);
+t_unify(T1, ?union(_)=T2, VarMap) ->
+ t_unify(T1, unify_union1(T2, T1, T2), VarMap);
+t_unify(T1, T2, _) ->
throw({mismatch, T1, T2}).
-t_unify_with_opaque(Type, OpType, VarMap, Opaques) ->
- case lists:member(OpType, Opaques) of
+unify_union2(?union(List1)=T1, ?union(List2)=T2) ->
+ case {unify_union(List1), unify_union(List2)} of
+ {{yes, Type1}, {yes, Type2}} -> {Type1, Type2};
+ {{yes, Type1}, no} -> {Type1, T2};
+ {no, {yes, Type2}} -> {T1, Type2};
+ {no, no} -> throw({mismatch, T1, T2})
+ end.
+
+unify_union1(?union(List), T1, T2) ->
+ case unify_union(List) of
+ {yes, Type} -> Type;
+ no -> throw({mismatch, T1, T2})
+ end.
+
+unify_union(List) ->
+ [A,B,F,I,L,N,T,M,O,R,Map] = List,
+ if O =:= ?none -> no;
true ->
- Struct = t_opaque_structure(OpType),
- try t_unify(Type, Struct, VarMap, Opaques) of
- {_T, VarMap1} -> {OpType, VarMap1}
- catch
- throw:{mismatch, _T1, _T2} ->
- case t_inf(OpType, Type, opaque) of
- ?none -> throw({mismatch, Type, OpType});
- _ -> {OpType, VarMap}
- end
- end;
- false ->
- throw({mismatch, Type, OpType})
+ S = t_opaque_structure(O),
+ {yes, t_sup([A,B,F,I,L,N,T,M,S,R,Map])}
end.
-unify_tuple_set_and_tuple(?tuple_set([{Arity, List}]),
- ?tuple(Elements2, Arity, _), VarMap, Opaques) ->
+-spec is_opaque_type(erl_type(), [erl_type()]) -> boolean().
+
+%% An opaque type is a union of types. Returns true iff any of the type
+%% names (Module and Name) of the first argument (the opaque type to
+%% check) occurs in any of the opaque types of the second argument.
+is_opaque_type(?opaque(Elements), Opaques) ->
+ lists:any(fun(Opaque) -> is_opaque_type2(Opaque, Opaques) end, Elements).
+
+is_opaque_type2(#opaque{mod = Mod1, name = Name1, args = Args1}, Opaques) ->
+ F1 = fun(?opaque(Es)) ->
+ F2 = fun(#opaque{mod = Mod, name = Name, args = Args}) ->
+ is_type_name(Mod1, Name1, Args1, Mod, Name, Args)
+ end,
+ lists:any(F2, Es)
+ end,
+ lists:any(F1, Opaques).
+
+is_type_name(Mod, Name, Args1, Mod, Name, Args2) ->
+ length(Args1) =:= length(Args2);
+is_type_name(Mod1, Name1, Args1, Mod2, Name2, Args2) ->
+ is_same_type_name2(Mod1, Name1, Args1, Mod2, Name2, Args2).
+
+%% Two functions since t_unify is not symmetric.
+unify_tuple_set_and_tuple1(?tuple_set([{Arity, List}]),
+ ?tuple(Elements2, Arity, _), VarMap) ->
+ %% Can only work if the single tuple has variables at correct places.
+ %% Collapse the tuple set.
+ {NewElements, VarMap1} =
+ unify_lists(sup_tuple_elements(List), Elements2, VarMap),
+ {t_tuple(NewElements), VarMap1}.
+
+unify_tuple_set_and_tuple2(?tuple(Elements2, Arity, _),
+ ?tuple_set([{Arity, List}]), VarMap) ->
%% Can only work if the single tuple has variables at correct places.
%% Collapse the tuple set.
- {NewElements, VarMap1} = unify_lists(sup_tuple_elements(List), Elements2, VarMap, Opaques),
+ {NewElements, VarMap1} =
+ unify_lists(Elements2, sup_tuple_elements(List), VarMap),
{t_tuple(NewElements), VarMap1}.
-unify_lists(L1, L2, VarMap, Opaques) ->
- unify_lists(L1, L2, VarMap, [], Opaques).
+unify_lists(L1, L2, VarMap) ->
+ unify_lists(L1, L2, VarMap, []).
-unify_lists([T1|Left1], [T2|Left2], VarMap, Acc, Opaques) ->
- {NewT, NewVarMap} = t_unify(T1, T2, VarMap, Opaques),
- unify_lists(Left1, Left2, NewVarMap, [NewT|Acc], Opaques);
-unify_lists([], [], VarMap, Acc, _Opaques) ->
+unify_lists([T1|Left1], [T2|Left2], VarMap, Acc) ->
+ {NewT, NewVarMap} = t_unify(T1, T2, VarMap),
+ unify_lists(Left1, Left2, NewVarMap, [NewT|Acc]);
+unify_lists([], [], VarMap, Acc) ->
{lists:reverse(Acc), VarMap}.
%%t_assign_variables_to_subtype(T1, T2) ->
@@ -2837,11 +3485,12 @@ t_subtract(?identifier(Set1), ?identifier(Set2)) ->
?none -> ?none;
Set -> ?identifier(Set)
end;
-t_subtract(?opaque(Set1), ?opaque(Set2)) ->
- case set_subtract(Set1, Set2) of
- ?none -> ?none;
- Set -> ?opaque(Set)
- end;
+t_subtract(?opaque(_)=T1, ?opaque(_)=T2) ->
+ opaque_subtract(T1, t_opaque_structure(T2));
+t_subtract(?opaque(_)=T1, T2) ->
+ opaque_subtract(T1, T2);
+t_subtract(T1, ?opaque(_)=T2) ->
+ t_subtract(T1, t_opaque_structure(T2));
t_subtract(?matchstate(Pres1, Slots1), ?matchstate(Pres2, _Slots2)) ->
Pres = t_subtract(Pres1, Pres2),
case t_is_none(Pres) of
@@ -2965,6 +3614,8 @@ t_subtract(?product(Elements1) = T1, ?product(Elements2)) ->
_ -> T1
end
end;
+t_subtract(?map(_) = T, _) -> % XXX: very crude; will probably need refinement
+ T;
t_subtract(?product(P1), _) ->
?product(P1);
t_subtract(T, ?product(_)) ->
@@ -2976,6 +3627,17 @@ t_subtract(T1, T2) ->
?union(U2) = force_union(T2),
subtract_union(U1, U2).
+-spec opaque_subtract(erl_type(), erl_type()) -> erl_type().
+
+opaque_subtract(?opaque(Set1), T2) ->
+ List = [T1#opaque{struct = Sub} ||
+ #opaque{struct = S1}=T1 <- set_to_list(Set1),
+ not t_is_none(Sub = t_subtract(S1, T2))],
+ case List of
+ [] -> ?none;
+ _ -> ?opaque(ordsets:from_list(List))
+ end.
+
-spec t_subtract_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_subtract_lists(L1, L2) ->
@@ -2991,7 +3653,18 @@ t_subtract_lists([], [], Acc) ->
-spec subtract_union([erl_type(),...], [erl_type(),...]) -> erl_type().
subtract_union(U1, U2) ->
- subtract_union(U1, U2, 0, []).
+ [A1,B1,F1,I1,L1,N1,T1,M1,O1,R1,Map1] = U1,
+ [A2,B2,F2,I2,L2,N2,T2,M2,O2,R2,Map2] = U2,
+ List1 = [A1,B1,F1,I1,L1,N1,T1,M1,?none,R1,Map1],
+ List2 = [A2,B2,F2,I2,L2,N2,T2,M2,?none,R2,Map2],
+ Sub1 = subtract_union(List1, List2, 0, []),
+ O = if O1 =:= ?none -> O1;
+ true -> t_subtract(O1, ?union(U2))
+ end,
+ Sub2 = if O2 =:= ?none -> Sub1;
+ true -> t_subtract(Sub1, t_opaque_structure(O2))
+ end,
+ t_sup(O, Sub2).
-spec subtract_union([erl_type()], [erl_type()], non_neg_integer(), [erl_type()]) -> erl_type().
@@ -3052,10 +3725,24 @@ t_is_equal(_, _) -> false.
t_is_subtype(T1, T2) ->
Inf = t_inf(T1, T2),
- t_is_equal(T1, Inf).
+ subtype_is_equal(T1, Inf).
+
+%% The subtype relation has to behave correctly irrespective of opaque
+%% types.
+subtype_is_equal(T, T) -> true;
+subtype_is_equal(T1, T2) ->
+ t_is_equal(case t_contains_opaque(T1) of
+ true -> t_unopaque(T1);
+ false -> T1
+ end,
+ case t_contains_opaque(T2) of
+ true -> t_unopaque(T2);
+ false -> T2
+ end).
-spec t_is_instance(erl_type(), erl_type()) -> boolean().
+%% XXX. To be removed.
t_is_instance(ConcreteType, Type) ->
t_is_subtype(ConcreteType, t_unopaque(Type)).
@@ -3067,12 +3754,12 @@ t_unopaque(T) ->
-spec t_unopaque(erl_type(), 'universe' | [erl_type()]) -> erl_type().
t_unopaque(?opaque(_) = T, Opaques) ->
- case Opaques =:= universe orelse lists:member(T, Opaques) of
+ case Opaques =:= 'universe' orelse is_opaque_type(T, Opaques) of
true -> t_unopaque(t_opaque_structure(T), Opaques);
- false -> T % XXX: needs revision for parametric opaque data types
+ false -> T
end;
t_unopaque(?list(ElemT, Termination, Sz), Opaques) ->
- ?list(t_unopaque(ElemT, Opaques), Termination, Sz);
+ ?list(t_unopaque(ElemT, Opaques), t_unopaque(Termination, Opaques), Sz);
t_unopaque(?tuple(?any, _, _) = T, _) -> T;
t_unopaque(?tuple(ArgTs, Sz, Tag), Opaques) when is_list(ArgTs) ->
NewArgTs = [t_unopaque(A, Opaques) || A <- ArgTs],
@@ -3081,14 +3768,20 @@ t_unopaque(?tuple_set(Set), Opaques) ->
NewSet = [{Sz, [t_unopaque(T, Opaques) || T <- Tuples]}
|| {Sz, Tuples} <- Set],
?tuple_set(NewSet);
-t_unopaque(?union([A,B,F,I,L,N,T,M,O,R]), Opaques) ->
+t_unopaque(?product(Types), Opaques) ->
+ ?product([t_unopaque(T, Opaques) || T <- Types]);
+t_unopaque(?function(Domain, Range), Opaques) ->
+ ?function(t_unopaque(Domain, Opaques), t_unopaque(Range, Opaques));
+t_unopaque(?union([A,B,F,I,L,N,T,M,O,R,Map]), Opaques) ->
UL = t_unopaque(L, Opaques),
UT = t_unopaque(T, Opaques),
- UO = case O of
- ?none -> [];
- ?opaque(Os) -> [t_unopaque(S, Opaques) || #opaque{struct = S} <- Os]
- end,
- t_sup([?union([A,B,F,I,UL,N,UT,M,?none,R])|UO]);
+ UF = t_unopaque(F, Opaques),
+ UMap = t_unopaque(Map, Opaques),
+ {OF,UO} = case t_unopaque(O, Opaques) of
+ ?opaque(_) = O1 -> {O1, []};
+ Type -> {?none, [Type]}
+ end,
+ t_sup([?union([A,B,UF,I,UL,N,UT,M,OF,R,UMap])|UO]);
t_unopaque(T, _) ->
T.
@@ -3134,6 +3827,12 @@ t_limit_k(?product(Elements), K) ->
?product([t_limit_k(X, K - 1) || X <- Elements]);
t_limit_k(?union(Elements), K) ->
?union([t_limit_k(X, K) || X <- Elements]);
+t_limit_k(?opaque(Es), K) ->
+ List = [begin
+ NewS = t_limit_k(S, K),
+ Opaque#opaque{struct = NewS}
+ end || #opaque{struct = S} = Opaque <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
t_limit_k(T, _K) -> T.
%%============================================================================
@@ -3142,7 +3841,7 @@ t_limit_k(T, _K) -> T.
%%
%%============================================================================
--spec t_abstract_records(erl_type(), dict()) -> erl_type().
+-spec t_abstract_records(erl_type(), type_table()) -> erl_type().
t_abstract_records(?list(Contents, Termination, Size), RecDict) ->
case t_abstract_records(Contents, RecDict) of
@@ -3167,7 +3866,7 @@ t_abstract_records(?union(Types), RecDict) ->
t_abstract_records(?tuple(?any, ?any, ?any) = T, _RecDict) ->
T;
t_abstract_records(?tuple(Elements, Arity, ?atom(_) = Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
case lookup_record(TagAtom, Arity - 1, RecDict) of
error -> t_tuple([t_abstract_records(E, RecDict) || E <- Elements]);
{ok, Fields} -> t_tuple([Tag|[T || {_Name, T} <- Fields]])
@@ -3176,6 +3875,8 @@ t_abstract_records(?tuple(Elements, _Arity, _Tag), RecDict) ->
t_tuple([t_abstract_records(E, RecDict) || E <- Elements]);
t_abstract_records(?tuple_set(_) = Tuples, RecDict) ->
t_sup([t_abstract_records(T, RecDict) || T <- t_tuple_subtypes(Tuples)]);
+t_abstract_records(?opaque(_)=Type, RecDict) ->
+ t_abstract_records(t_opaque_structure(Type), RecDict);
t_abstract_records(T, _RecDict) ->
T.
@@ -3198,6 +3899,14 @@ t_map(Fun, ?tuple(Elements, _Arity, _Tag)) ->
Fun(t_tuple([t_map(Fun, E) || E <- Elements]));
t_map(Fun, ?tuple_set(_) = Tuples) ->
Fun(t_sup([t_map(Fun, T) || T <- t_tuple_subtypes(Tuples)]));
+t_map(Fun, ?opaque(Set)) ->
+ L = [Opaque#opaque{struct = NewS} ||
+ #opaque{struct = S} = Opaque <- set_to_list(Set),
+ not t_is_none(NewS = t_map(Fun, S))],
+ Fun(case L of
+ [] -> ?none;
+ _ -> ?opaque(ordsets:from_list(L))
+ end);
t_map(Fun, T) ->
Fun(T).
@@ -3212,7 +3921,7 @@ t_map(Fun, T) ->
t_to_string(T) ->
t_to_string(T, dict:new()).
--spec t_to_string(erl_type(), dict()) -> string().
+-spec t_to_string(erl_type(), type_table()) -> string().
t_to_string(?any, _RecDict) ->
"any()";
@@ -3239,11 +3948,11 @@ t_to_string(?bitstr(8, 0), _RecDict) ->
t_to_string(?bitstr(1, 0), _RecDict) ->
"bitstring()";
t_to_string(?bitstr(0, B), _RecDict) ->
- lists:flatten(io_lib:format("<<_:~w>>", [B]));
+ flat_format("<<_:~w>>", [B]);
t_to_string(?bitstr(U, 0), _RecDict) ->
- lists:flatten(io_lib:format("<<_:_*~w>>", [U]));
+ flat_format("<<_:_*~w>>", [U]);
t_to_string(?bitstr(U, B), _RecDict) ->
- lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U]));
+ flat_format("<<_:~w,_:_*~w>>", [B, U]);
t_to_string(?function(?any, ?any), _RecDict) ->
"fun()";
t_to_string(?function(?any, Range), RecDict) ->
@@ -3255,18 +3964,16 @@ t_to_string(?identifier(Set), _RecDict) ->
case Set of
?any -> "identifier()";
_ ->
- string:join([io_lib:format("~w()", [T]) || T <- set_to_list(Set)], " | ")
+ string:join([flat_format("~w()", [T]) || T <- set_to_list(Set)], " | ")
end;
-t_to_string(?opaque(Set), _RecDict) ->
- string:join([case is_opaque_builtin(Mod, Name) of
- true -> io_lib:format("~w()", [Name]);
- false -> io_lib:format("~w:~w()", [Mod, Name])
- end
- || #opaque{mod = Mod, name = Name} <- set_to_list(Set)],
+t_to_string(?opaque(Set), RecDict) ->
+ string:join([opaque_type(Mod, Name, Args, S, RecDict) ||
+ #opaque{mod = Mod, name = Name, struct = S, args = Args}
+ <- set_to_list(Set)],
" | ");
t_to_string(?matchstate(Pres, Slots), RecDict) ->
- io_lib:format("ms(~s,~s)", [t_to_string(Pres, RecDict),
- t_to_string(Slots,RecDict)]);
+ flat_format("ms(~s,~s)", [t_to_string(Pres, RecDict),
+ t_to_string(Slots,RecDict)]);
t_to_string(?nil, _RecDict) ->
"[]";
t_to_string(?nonempty_list(Contents, Termination), RecDict) ->
@@ -3282,7 +3989,9 @@ t_to_string(?nonempty_list(Contents, Termination), RecDict) ->
case Contents =:= ?any of
true -> ok;
false ->
- erlang:error({illegal_list, ?nonempty_list(Contents, Termination)})
+ %% XXX. See comment below.
+ %% erlang:error({illegal_list, ?nonempty_list(Contents, Termination)})
+ ok
end,
"nonempty_maybe_improper_list()";
_ ->
@@ -3305,11 +4014,14 @@ t_to_string(?list(Contents, Termination, ?unknown_qual), RecDict) ->
end;
?any ->
%% Just a safety check.
+ %% XXX. Types such as "maybe_improper_list(integer(), any())"
+ %% are OK, but cannot be printed!?
case Contents =:= ?any of
true -> ok;
false ->
- L = ?list(Contents, Termination, ?unknown_qual),
- erlang:error({illegal_list, L})
+ ok
+ %% L = ?list(Contents, Termination, ?unknown_qual),
+ %% erlang:error({illegal_list, L})
end,
"maybe_improper_list()";
_ ->
@@ -3330,7 +4042,7 @@ t_to_string(?integer_pos, _RecDict) -> "pos_integer()";
t_to_string(?integer_non_neg, _RecDict) -> "non_neg_integer()";
t_to_string(?integer_neg, _RecDict) -> "neg_integer()";
t_to_string(?int_range(From, To), _RecDict) ->
- lists:flatten(io_lib:format("~w..~w", [From, To]));
+ flat_format("~w..~w", [From, To]);
t_to_string(?integer(?any), _RecDict) -> "integer()";
t_to_string(?float, _RecDict) -> "float()";
t_to_string(?number(?any, ?unknown_qual), _RecDict) -> "number()";
@@ -3338,19 +4050,21 @@ t_to_string(?product(List), RecDict) ->
"<" ++ comma_sequence(List, RecDict) ++ ">";
t_to_string(?remote(Set), RecDict) ->
string:join([case Args =:= [] of
- true -> io_lib:format("~w:~w()", [Mod, Name]);
+ true -> flat_format("~w:~w()", [Mod, Name]);
false ->
ArgString = comma_sequence(Args, RecDict),
- io_lib:format("~w:~w(~s)", [Mod, Name, ArgString])
+ flat_format("~w:~w(~s)", [Mod, Name, ArgString])
end
|| #remote{mod = Mod, name = Name, args = Args} <-
set_to_list(Set)],
" | ");
+t_to_string(?map(Pairs), RecDict) ->
+ "#{" ++ map_pairs_to_string(Pairs,RecDict) ++ "}";
t_to_string(?tuple(?any, ?any, ?any), _RecDict) -> "tuple()";
t_to_string(?tuple(Elements, _Arity, ?any), RecDict) ->
"{" ++ comma_sequence(Elements, RecDict) ++ "}";
t_to_string(?tuple(Elements, Arity, Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
case lookup_record(TagAtom, Arity-1, RecDict) of
error -> "{" ++ comma_sequence(Elements, RecDict) ++ "}";
{ok, FieldNames} ->
@@ -3361,9 +4075,16 @@ t_to_string(?tuple_set(_) = T, RecDict) ->
t_to_string(?union(Types), RecDict) ->
union_sequence([T || T <- Types, T =/= ?none], RecDict);
t_to_string(?var(Id), _RecDict) when is_atom(Id) ->
- io_lib:format("~s", [atom_to_list(Id)]);
+ flat_format("~s", [atom_to_list(Id)]);
t_to_string(?var(Id), _RecDict) when is_integer(Id) ->
- io_lib:format("var(~w)", [Id]).
+ flat_format("var(~w)", [Id]).
+
+
+map_pairs_to_string([],_) -> [];
+map_pairs_to_string(Pairs,RecDict) ->
+ StrPairs = [{t_to_string(K,RecDict),t_to_string(V,RecDict)}||{K,V}<-Pairs],
+ string:join([K ++ "=>" ++ V||{K,V}<-StrPairs], ", ").
+
record_to_string(Tag, [_|Fields], FieldNames, RecDict) ->
FieldStrings = record_fields_to_string(Fields, FieldNames, RecDict, []),
@@ -3371,7 +4092,7 @@ record_to_string(Tag, [_|Fields], FieldNames, RecDict) ->
record_fields_to_string([F|Fs], [{FName, _DefType}|FDefs], RecDict, Acc) ->
NewAcc =
- case t_is_any(F) orelse t_is_atom('undefined', F) of
+ case t_is_equal(F, t_any()) orelse t_is_any_atom('undefined', F) of
true -> Acc;
false ->
StrFV = atom_to_string(FName) ++ "::" ++ t_to_string(F, RecDict),
@@ -3386,16 +4107,17 @@ record_fields_to_string([F|Fs], [{FName, _DefType}|FDefs], RecDict, Acc) ->
record_fields_to_string([], [], _RecDict, Acc) ->
lists:reverse(Acc).
--spec record_field_diffs_to_string(erl_type(), dict()) -> string().
+-spec record_field_diffs_to_string(erl_type(), type_table()) -> string().
record_field_diffs_to_string(?tuple([_|Fs], Arity, Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
{ok, FieldNames} = lookup_record(TagAtom, Arity-1, RecDict),
%% io:format("RecCElems = ~p\nRecTypes = ~p\n", [Fs, FieldNames]),
FieldDiffs = field_diffs(Fs, FieldNames, RecDict, []),
string:join(FieldDiffs, " and ").
field_diffs([F|Fs], [{FName, DefType}|FDefs], RecDict, Acc) ->
+ %% Don't care about opaqueness for now.
NewAcc =
case not t_is_none(t_inf(F, DefType)) of
true -> Acc;
@@ -3418,6 +4140,32 @@ union_sequence(Types, RecDict) ->
List = [t_to_string(T, RecDict) || T <- Types],
string:join(List, " | ").
+-ifdef(DEBUG).
+opaque_type(Mod, Name, _Args, S, RecDict) ->
+ ArgsString = comma_sequence(_Args, RecDict),
+ String = t_to_string(S, RecDict),
+ opaque_name(Mod, Name, ArgsString) ++ "[" ++ String ++ "]".
+-else.
+opaque_type(Mod, Name, Args, _S, RecDict) ->
+ ArgsString = comma_sequence(Args, RecDict),
+ opaque_name(Mod, Name, ArgsString).
+-endif.
+
+opaque_name(Mod, Name, Extra) ->
+ S = mod_name(Mod, Name),
+ flat_format("~s(~s)", [S, Extra]).
+
+mod_name(Mod, Name) ->
+ case is_obsolete_opaque_builtin(Mod, Name) of
+ true -> flat_format("~w", [Name]);
+ false -> flat_format("~w:~w", [Mod, Name])
+ end.
+
+is_obsolete_opaque_builtin(digraph, digraph) -> true;
+is_obsolete_opaque_builtin(gb_sets, gb_set) -> true;
+is_obsolete_opaque_builtin(gb_trees, gb_tree) -> true;
+is_obsolete_opaque_builtin(_, _) -> false.
+
%%=============================================================================
%%
%% Build a type from parse forms.
@@ -3429,318 +4177,274 @@ union_sequence(Types, RecDict) ->
t_from_form(Form) ->
t_from_form(Form, dict:new()).
--spec t_from_form(parse_form(), dict()) -> erl_type().
+-spec t_from_form(parse_form(), type_table()) -> erl_type().
t_from_form(Form, RecDict) ->
t_from_form(Form, RecDict, dict:new()).
--spec t_from_form(parse_form(), dict(), dict()) -> erl_type().
+-spec t_from_form(parse_form(), type_table(), var_table()) -> erl_type().
t_from_form(Form, RecDict, VarDict) ->
- {T, _R} = t_from_form(Form, [], false, RecDict, VarDict),
+ {T, _R} = t_from_form(Form, [], RecDict, VarDict),
T.
--type type_names() :: [{'type' | 'opaque' | 'record', atom()}].
--spec t_from_form(parse_form(), type_names(), boolean(), dict(), dict()) ->
+-type type_names() :: [type_key() | record_key()].
+
+-spec t_from_form(parse_form(), type_names(), type_table(), var_table()) ->
{erl_type(), type_names()}.
-t_from_form({var, _L, '_'}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({var, _L, '_'}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({var, _L, Name}, _TypeNames, _InOpaque, _RecDict, VarDict) ->
+t_from_form({var, _L, Name}, _TypeNames, _RecDict, VarDict) ->
case dict:find(Name, VarDict) of
error -> {t_var(Name), []};
{ok, Val} -> {Val, []}
end;
-t_from_form({ann_type, _L, [_Var, Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict);
-t_from_form({paren_type, _L, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict);
+t_from_form({ann_type, _L, [_Var, Type]}, TypeNames, RecDict, VarDict) ->
+ t_from_form(Type, TypeNames, RecDict, VarDict);
+t_from_form({paren_type, _L, [Type]}, TypeNames, RecDict, VarDict) ->
+ t_from_form(Type, TypeNames, RecDict, VarDict);
t_from_form({remote_type, _L, [{atom, _, Module}, {atom, _, Type}, Args]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_remote(Module, Type, L), R};
-t_from_form({atom, _L, Atom}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({atom, _L, Atom}, _TypeNames, _RecDict, _VarDict) ->
{t_atom(Atom), []};
-t_from_form({integer, _L, Int}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({integer, _L, Int}, _TypeNames, _RecDict, _VarDict) ->
{t_integer(Int), []};
-t_from_form({op, _L, _Op, _Arg} = Op, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({op, _L, _Op, _Arg} = Op, _TypeNames, _RecDict, _VarDict) ->
case erl_eval:partial_eval(Op) of
{integer, _, Val} ->
{t_integer(Val), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Op])})
end;
-t_from_form({op, _L, _Op, _Arg1, _Arg2} = Op, _TypeNames, _InOpaque,
+t_from_form({op, _L, _Op, _Arg1, _Arg2} = Op, _TypeNames,
_RecDict, _VarDict) ->
case erl_eval:partial_eval(Op) of
{integer, _, Val} ->
{t_integer(Val), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Op])})
end;
-t_from_form({type, _L, any, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, any, []}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({type, _L, arity, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, arity, []}, _TypeNames, _RecDict, _VarDict) ->
{t_arity(), []};
-t_from_form({type, _L, array, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_array(), []};
-t_from_form({type, _L, atom, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, array, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(array, t_array(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, atom, []}, _TypeNames, _RecDict, _VarDict) ->
{t_atom(), []};
-t_from_form({type, _L, binary, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, binary, []}, _TypeNames, _RecDict, _VarDict) ->
{t_binary(), []};
t_from_form({type, _L, binary, [Base, Unit]} = Type,
- _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+ _TypeNames, _RecDict, _VarDict) ->
case {erl_eval:partial_eval(Base), erl_eval:partial_eval(Unit)} of
{{integer, _, B}, {integer, _, U}} when B >= 0, U >= 0 ->
{t_bitstr(U, B), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Type])})
end;
-t_from_form({type, _L, bitstring, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, bitstring, []}, _TypeNames, _RecDict, _VarDict) ->
{t_bitstr(), []};
-t_from_form({type, _L, bool, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, bool, []}, _TypeNames, _RecDict, _VarDict) ->
{t_boolean(), []}; % XXX: Temporarily
-t_from_form({type, _L, boolean, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, boolean, []}, _TypeNames, _RecDict, _VarDict) ->
{t_boolean(), []};
-t_from_form({type, _L, byte, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, byte, []}, _TypeNames, _RecDict, _VarDict) ->
{t_byte(), []};
-t_from_form({type, _L, char, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, char, []}, _TypeNames, _RecDict, _VarDict) ->
{t_char(), []};
-t_from_form({type, _L, dict, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_dict(), []};
-t_from_form({type, _L, digraph, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_digraph(), []};
-t_from_form({type, _L, float, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, dict, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(dict, t_dict(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, digraph, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(digraph, t_digraph(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, float, []}, _TypeNames, _RecDict, _VarDict) ->
{t_float(), []};
-t_from_form({type, _L, function, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, function, []}, _TypeNames, _RecDict, _VarDict) ->
{t_fun(), []};
-t_from_form({type, _L, 'fun', []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, 'fun', []}, _TypeNames, _RecDict, _VarDict) ->
{t_fun(), []};
t_from_form({type, _L, 'fun', [{type, _, any}, Range]}, TypeNames,
- InOpaque, RecDict, VarDict) ->
- {T, R} = t_from_form(Range, TypeNames, InOpaque, RecDict, VarDict),
+ RecDict, VarDict) ->
+ {T, R} = t_from_form(Range, TypeNames, RecDict, VarDict),
{t_fun(T), R};
t_from_form({type, _L, 'fun', [{type, _, product, Domain}, Range]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R1} = list_from_form(Domain, TypeNames, InOpaque, RecDict, VarDict),
- {T, R2} = t_from_form(Range, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {L, R1} = list_from_form(Domain, TypeNames, RecDict, VarDict),
+ {T, R2} = t_from_form(Range, TypeNames, RecDict, VarDict),
{t_fun(L, T), R1 ++ R2};
-t_from_form({type, _L, gb_set, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_gb_set(), []};
-t_from_form({type, _L, gb_tree, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_gb_tree(), []};
-t_from_form({type, _L, identifier, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, gb_set, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(gb_set, t_gb_set(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, gb_tree, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(gb_tree, t_gb_tree(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, identifier, []}, _TypeNames, _RecDict, _VarDict) ->
{t_identifier(), []};
-t_from_form({type, _L, integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_integer(), []};
-t_from_form({type, _L, iodata, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, iodata, []}, _TypeNames, _RecDict, _VarDict) ->
{t_iodata(), []};
-t_from_form({type, _L, iolist, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, iolist, []}, _TypeNames, _RecDict, _VarDict) ->
{t_iolist(), []};
-t_from_form({type, _L, list, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, list, []}, _TypeNames, _RecDict, _VarDict) ->
{t_list(), []};
-t_from_form({type, _L, list, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {T, R} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, list, [Type]}, TypeNames, RecDict, VarDict) ->
+ {T, R} = t_from_form(Type, TypeNames, RecDict, VarDict),
{t_list(T), R};
-t_from_form({type, _L, mfa, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, map, As0}, TypeNames, RecDict, VarDict) ->
+ As = case is_list(As0) of
+ true -> As0;
+ false -> []
+ end,
+ builtin_type(map, t_map([]), As, TypeNames, RecDict, VarDict);
+t_from_form({type, _L, mfa, []}, _TypeNames, _RecDict, _VarDict) ->
{t_mfa(), []};
-t_from_form({type, _L, module, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, module, []}, _TypeNames, _RecDict, _VarDict) ->
{t_module(), []};
-t_from_form({type, _L, nil, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, nil, []}, _TypeNames, _RecDict, _VarDict) ->
{t_nil(), []};
-t_from_form({type, _L, neg_integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, neg_integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_neg_integer(), []};
-t_from_form({type, _L, non_neg_integer, []}, _TypeNames, _InOpaque, _RecDict,
+t_from_form({type, _L, non_neg_integer, []}, _TypeNames, _RecDict,
_VarDict) ->
{t_non_neg_integer(), []};
-t_from_form({type, _L, no_return, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, no_return, []}, _TypeNames, _RecDict, _VarDict) ->
{t_unit(), []};
-t_from_form({type, _L, node, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, node, []}, _TypeNames, _RecDict, _VarDict) ->
{t_node(), []};
-t_from_form({type, _L, none, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, none, []}, _TypeNames, _RecDict, _VarDict) ->
{t_none(), []};
-t_from_form({type, _L, nonempty_list, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, nonempty_list, []}, _TypeNames, _RecDict, _VarDict) ->
{t_nonempty_list(), []};
-t_from_form({type, _L, nonempty_list, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {T, R} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, nonempty_list, [Type]}, TypeNames, RecDict, VarDict) ->
+ {T, R} = t_from_form(Type, TypeNames, RecDict, VarDict),
{t_nonempty_list(T), R};
t_from_form({type, _L, nonempty_improper_list, [Cont, Term]}, TypeNames,
- InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Cont, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Term, TypeNames, InOpaque, RecDict, VarDict),
+ RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Cont, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Term, TypeNames, RecDict, VarDict),
{t_cons(T1, T2), R1 ++ R2};
t_from_form({type, _L, nonempty_maybe_improper_list, []}, _TypeNames,
- _InOpaque, _RecDict, _VarDict) ->
+ _RecDict, _VarDict) ->
{t_cons(?any, ?any), []};
t_from_form({type, _L, nonempty_maybe_improper_list, [Cont, Term]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Cont, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Term, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Cont, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Term, TypeNames, RecDict, VarDict),
{t_cons(T1, T2), R1 ++ R2};
-t_from_form({type, _L, nonempty_string, []}, _TypeNames, _InOpaque, _RecDict,
+t_from_form({type, _L, nonempty_string, []}, _TypeNames, _RecDict,
_VarDict) ->
{t_nonempty_string(), []};
-t_from_form({type, _L, number, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, number, []}, _TypeNames, _RecDict, _VarDict) ->
{t_number(), []};
-t_from_form({type, _L, pid, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, pid, []}, _TypeNames, _RecDict, _VarDict) ->
{t_pid(), []};
-t_from_form({type, _L, port, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, port, []}, _TypeNames, _RecDict, _VarDict) ->
{t_port(), []};
-t_from_form({type, _L, pos_integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, pos_integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_pos_integer(), []};
-t_from_form({type, _L, maybe_improper_list, []}, _TypeNames, _InOpaque,
+t_from_form({type, _L, maybe_improper_list, []}, _TypeNames,
_RecDict, _VarDict) ->
{t_maybe_improper_list(), []};
t_from_form({type, _L, maybe_improper_list, [Content, Termination]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Content, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Termination, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Content, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Termination, TypeNames, RecDict, VarDict),
{t_maybe_improper_list(T1, T2), R1 ++ R2};
-t_from_form({type, _L, product, Elements}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {L, R} = list_from_form(Elements, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, product, Elements}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Elements, TypeNames, RecDict, VarDict),
{t_product(L), R};
-t_from_form({type, _L, queue, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_queue(), []};
+t_from_form({type, _L, queue, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(queue, t_queue(), [], TypeNames, RecDict, VarDict);
t_from_form({type, _L, range, [From, To]} = Type,
- _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+ _TypeNames, _RecDict, _VarDict) ->
case {erl_eval:partial_eval(From), erl_eval:partial_eval(To)} of
{{integer, _, FromVal}, {integer, _, ToVal}} ->
{t_from_range(FromVal, ToVal), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Type])})
end;
-t_from_form({type, _L, record, [Name|Fields]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- record_from_form(Name, Fields, TypeNames, InOpaque, RecDict, VarDict);
-t_from_form({type, _L, reference, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, record, [Name|Fields]}, TypeNames, RecDict, VarDict) ->
+ record_from_form(Name, Fields, TypeNames, RecDict, VarDict);
+t_from_form({type, _L, reference, []}, _TypeNames, _RecDict, _VarDict) ->
{t_reference(), []};
-t_from_form({type, _L, set, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_set(), []};
-t_from_form({type, _L, string, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, set, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(set, t_set(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, string, []}, _TypeNames, _RecDict, _VarDict) ->
{t_string(), []};
-t_from_form({type, _L, term, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, term, []}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({type, _L, tid, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_tid(), []};
-t_from_form({type, _L, timeout, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, tid, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(tid, t_tid(), [], TypeNames, RecDict, VarDict);
+t_from_form({type, _L, timeout, []}, _TypeNames, _RecDict, _VarDict) ->
{t_timeout(), []};
-t_from_form({type, _L, tuple, any}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, tuple, any}, _TypeNames, _RecDict, _VarDict) ->
{t_tuple(), []};
-t_from_form({type, _L, tuple, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, tuple, Args}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_tuple(L), R};
-t_from_form({type, _L, union, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, union, Args}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_sup(L), R};
-t_from_form({type, _L, Name, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
+t_from_form({type, _L, Name, Args}, TypeNames, RecDict, VarDict) ->
+ type_from_form(Name, Args, TypeNames, RecDict, VarDict);
+t_from_form({opaque, _L, Name, {Mod, Args, Rep}}, _TypeNames,
+ _RecDict, _VarDict) ->
+ {t_opaque(Mod, Name, Args, Rep), []}.
+
+builtin_type(Name, Type, Args, TypeNames, RecDict, VarDict) ->
+ case lookup_type(Name, length(Args), RecDict) of
+ {_, {_M, _T, _A}} ->
+ type_from_form(Name, Args, TypeNames, RecDict, VarDict);
+ error ->
+ {Type, []}
+ end.
+
+type_from_form(Name, Args, TypeNames, RecDict, VarDict) ->
ArgsLen = length(Args),
+ ArgTypes = forms_to_types(Args, TypeNames, RecDict, VarDict),
case lookup_type(Name, ArgsLen, RecDict) of
{type, {_Module, Type, ArgNames}} ->
- case can_unfold_more({type, Name}, TypeNames) of
+ TypeName = {type, Name, ArgsLen},
+ case can_unfold_more(TypeName, TypeNames) of
true ->
- List = lists:zipwith(
- fun(ArgName, ArgType) ->
- {Ttemp, _R} = t_from_form(ArgType, TypeNames,
- InOpaque, RecDict,
- VarDict),
- {ArgName, Ttemp}
- end,
- ArgNames, Args),
+ List = lists:zip(ArgNames, ArgTypes),
TmpVarDict = dict:from_list(List),
- {T, R} = t_from_form(Type, [{type, Name}|TypeNames], InOpaque,
+ {T, R} = t_from_form(Type, [TypeName|TypeNames],
RecDict, TmpVarDict),
- case lists:member({type, Name}, R) of
+ case lists:member(TypeName, R) of
true -> {t_limit(T, ?REC_TYPE_LIMIT), R};
false -> {T, R}
end;
- false -> {t_any(), [{type, Name}]}
+ false -> {t_any(), [TypeName]}
end;
{opaque, {Module, Type, ArgNames}} ->
+ TypeName = {opaque, Name, ArgsLen},
{Rep, Rret} =
- case can_unfold_more({opaque, Name}, TypeNames) of
+ case can_unfold_more(TypeName, TypeNames) of
true ->
- List = lists:zipwith(
- fun(ArgName, ArgType) ->
- {Ttemp, _R} = t_from_form(ArgType, TypeNames,
- InOpaque, RecDict,
- VarDict),
- {ArgName, Ttemp}
- end,
- ArgNames, Args),
+ List = lists:zip(ArgNames, ArgTypes),
TmpVarDict = dict:from_list(List),
- {T, R} = t_from_form(Type, [{opaque, Name}|TypeNames], true,
+ {T, R} = t_from_form(Type, [TypeName|TypeNames],
RecDict, TmpVarDict),
- case lists:member({opaque, Name}, R) of
+ case lists:member(TypeName, R) of
true -> {t_limit(T, ?REC_TYPE_LIMIT), R};
false -> {T, R}
end;
- false -> {t_any(), [{opaque, Name}]}
+ false -> {t_any(), [TypeName]}
end,
- Tret =
- case InOpaque of
- true -> Rep;
- false ->
- t_from_form({opaque, -1, Name, {Module, Args, Rep}},
- RecDict, VarDict)
- end,
- {Tret, Rret};
+ Args2 = [subst_all_vars_to_any(ArgType) || ArgType <- ArgTypes],
+ {skip_opaque_alias(Rep, Module, Name, Args2), Rret};
error ->
Msg = io_lib:format("Unable to find type ~w/~w\n", [Name, ArgsLen]),
throw({error, Msg})
- end;
-t_from_form({opaque, _L, Name, {Mod, Args, Rep}}, _TypeNames, _InOpaque,
- _RecDict, _VarDict) ->
- case Args of
- [] -> {t_opaque(Mod, Name, Args, Rep), []};
- _ -> throw({error, "Polymorphic opaque types not supported yet"})
end.
-record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
- VarDict) ->
+forms_to_types(Forms, TypeNames, RecDict, VarDict) ->
+ {Types, _} = list_from_form(Forms, TypeNames, RecDict, VarDict),
+ Types.
+
+skip_opaque_alias(?opaque(_) = T, _Mod, _Name, _Args) -> T;
+skip_opaque_alias(T, Module, Name, Args) ->
+ t_opaque(Module, Name, Args, T).
+
+record_from_form({atom, _, Name}, ModFields, TypeNames, RecDict, VarDict) ->
case can_unfold_more({record, Name}, TypeNames) of
true ->
case lookup_record(Name, RecDict) of
@@ -3751,11 +4455,11 @@ record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
{DeclFields1, R1} =
case lists:all(fun(Elem) -> Elem end, AreTyped) of
true -> {DeclFields, []};
- false -> fields_from_form(DeclFields, TypeNames1, InOpaque,
+ false -> fields_from_form(DeclFields, TypeNames1,
RecDict, dict:new())
end,
{GetModRec, R2} = get_mod_record(ModFields, DeclFields1,
- TypeNames1, InOpaque,
+ TypeNames1,
RecDict, VarDict),
case GetModRec of
{error, FieldName} ->
@@ -3772,13 +4476,11 @@ record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
false -> {t_any(), []}
end.
-get_mod_record([], DeclFields, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+get_mod_record([], DeclFields, _TypeNames, _RecDict, _VarDict) ->
{{ok, DeclFields}, []};
-get_mod_record(ModFields, DeclFields, TypeNames, InOpaque, RecDict,
- VarDict) ->
+get_mod_record(ModFields, DeclFields, TypeNames, RecDict, VarDict) ->
DeclFieldsDict = orddict:from_list(DeclFields),
- {ModFieldsDict, R} = build_field_dict(ModFields, TypeNames, InOpaque,
+ {ModFieldsDict, R} = build_field_dict(ModFields, TypeNames,
RecDict, VarDict),
case get_mod_record(DeclFieldsDict, ModFieldsDict, []) of
{error, _FieldName} = Error -> {Error, R};
@@ -3788,23 +4490,26 @@ get_mod_record(ModFields, DeclFields, TypeNames, InOpaque, RecDict,
R}
end.
-build_field_dict(FieldTypes, TypeNames, InOpaque, RecDict, VarDict) ->
- build_field_dict(FieldTypes, TypeNames, InOpaque, RecDict, VarDict, []).
+build_field_dict(FieldTypes, TypeNames, RecDict, VarDict) ->
+ build_field_dict(FieldTypes, TypeNames, RecDict, VarDict, []).
build_field_dict([{type, _, field_type, [{atom, _, Name}, Type]}|Left],
- TypeNames, InOpaque, RecDict, VarDict, Acc) ->
- {T, R1} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict, Acc) ->
+ {T, R1} = t_from_form(Type, TypeNames, RecDict, VarDict),
NewAcc = [{Name, T}|Acc],
- {D, R2} = build_field_dict(Left, TypeNames, InOpaque, RecDict, VarDict,
- NewAcc),
+ {D, R2} = build_field_dict(Left, TypeNames, RecDict, VarDict, NewAcc),
{D, R1 ++ R2};
-build_field_dict([], _TypeNames, _InOpaque, _RecDict, _VarDict, Acc) ->
+build_field_dict([], _TypeNames, _RecDict, _VarDict, Acc) ->
{orddict:from_list(Acc), []}.
get_mod_record([{FieldName, DeclType}|Left1],
[{FieldName, ModType}|Left2], Acc) ->
- case t_is_var(ModType) orelse t_is_remote(ModType) orelse
- t_is_subtype(ModType, DeclType) of
+ ModTypeNoVars = subst_all_vars_to_any(ModType),
+ case
+ contains_remote(ModTypeNoVars)
+ orelse contains_remote(DeclType)
+ orelse t_is_subtype(ModTypeNoVars, DeclType)
+ of
false -> {error, FieldName};
true -> get_mod_record(Left1, Left2, [{FieldName, ModType}|Acc])
end;
@@ -3817,19 +4522,23 @@ get_mod_record(DeclFields, [], Acc) ->
get_mod_record(_, [{FieldName2, _ModType}|_], _Acc) ->
{error, FieldName2}.
-fields_from_form([], _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+contains_remote(Type) ->
+ TypeNoRemote = subst_all_remote(Type, t_none()),
+ not t_is_equal(Type, TypeNoRemote).
+
+fields_from_form([], _TypeNames, _RecDict, _VarDict) ->
{[], []};
-fields_from_form([{Name, Type}|Tail], TypeNames, InOpaque, RecDict,
+fields_from_form([{Name, Type}|Tail], TypeNames, RecDict,
VarDict) ->
- {T, R1} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
- {F, R2} = fields_from_form(Tail, TypeNames, InOpaque, RecDict, VarDict),
+ {T, R1} = t_from_form(Type, TypeNames, RecDict, VarDict),
+ {F, R2} = fields_from_form(Tail, TypeNames, RecDict, VarDict),
{[{Name, T}|F], R1 ++ R2}.
-list_from_form([], _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+list_from_form([], _TypeNames, _RecDict, _VarDict) ->
{[], []};
-list_from_form([H|Tail], TypeNames, InOpaque, RecDict, VarDict) ->
- {T, R1} = t_from_form(H, TypeNames, InOpaque, RecDict, VarDict),
- {L, R2} = list_from_form(Tail, TypeNames, InOpaque, RecDict, VarDict),
+list_from_form([H|Tail], TypeNames, RecDict, VarDict) ->
+ {T, R1} = t_from_form(H, TypeNames, RecDict, VarDict),
+ {L, R2} = list_from_form(Tail, TypeNames, RecDict, VarDict),
{[T|L], R1 ++ R2}.
-spec t_form_to_string(parse_form()) -> string().
@@ -3852,10 +4561,10 @@ t_form_to_string({op, _L, _Op, _Arg1, _Arg2} = Op) ->
t_form_to_string({ann_type, _L, [Var, Type]}) ->
t_form_to_string(Var) ++ "::" ++ t_form_to_string(Type);
t_form_to_string({paren_type, _L, [Type]}) ->
- io_lib:format("(~s)", [t_form_to_string(Type)]);
+ flat_format("(~s)", [t_form_to_string(Type)]);
t_form_to_string({remote_type, _L, [{atom, _, Mod}, {atom, _, Name}, Args]}) ->
ArgString = "(" ++ string:join(t_form_to_string_list(Args), ",") ++ ")",
- io_lib:format("~w:~w", [Mod, Name]) ++ ArgString;
+ flat_format("~w:~w", [Mod, Name]) ++ ArgString;
t_form_to_string({type, _L, arity, []}) -> "arity()";
t_form_to_string({type, _L, binary, []}) -> "binary()";
t_form_to_string({type, _L, binary, [Base, Unit]} = Type) ->
@@ -3866,9 +4575,9 @@ t_form_to_string({type, _L, binary, [Base, Unit]} = Type) ->
{0, 0} -> "<<>>";
{8, 0} -> "binary()";
{1, 0} -> "bitstring()";
- {0, B} -> lists:flatten(io_lib:format("<<_:~w>>", [B]));
- {U, 0} -> lists:flatten(io_lib:format("<<_:_*~w>>", [U]));
- {U, B} -> lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U]))
+ {0, B} -> flat_format("<<_:~w>>", [B]);
+ {U, 0} -> flat_format("<<_:_*~w>>", [U]);
+ {U, B} -> flat_format("<<_:~w,_:_*~w>>", [B, U])
end;
_ -> io_lib:format("Badly formed bitstr type ~w", [Type])
end;
@@ -3883,6 +4592,8 @@ t_form_to_string({type, _L, iodata, []}) -> "iodata()";
t_form_to_string({type, _L, iolist, []}) -> "iolist()";
t_form_to_string({type, _L, list, [Type]}) ->
"[" ++ t_form_to_string(Type) ++ "]";
+t_form_to_string({type, _L, map, Args}) when not is_list(Args) ->
+ "#{}";
t_form_to_string({type, _L, mfa, []}) -> "mfa()";
t_form_to_string({type, _L, module, []}) -> "module()";
t_form_to_string({type, _L, node, []}) -> "node()";
@@ -3894,16 +4605,16 @@ t_form_to_string({type, _L, product, Elements}) ->
t_form_to_string({type, _L, range, [From, To]} = Type) ->
case {erl_eval:partial_eval(From), erl_eval:partial_eval(To)} of
{{integer, _, FromVal}, {integer, _, ToVal}} ->
- io_lib:format("~w..~w", [FromVal, ToVal]);
- _ -> io_lib:format("Badly formed type ~w",[Type])
+ flat_format("~w..~w", [FromVal, ToVal]);
+ _ -> flat_format("Badly formed type ~w",[Type])
end;
t_form_to_string({type, _L, record, [{atom, _, Name}]}) ->
- io_lib:format("#~w{}", [Name]);
+ flat_format("#~w{}", [Name]);
t_form_to_string({type, _L, record, [{atom, _, Name}|Fields]}) ->
FieldString = string:join(t_form_to_string_list(Fields), ","),
- io_lib:format("#~w{~s}", [Name, FieldString]);
+ flat_format("#~w{~s}", [Name, FieldString]);
t_form_to_string({type, _L, field_type, [{atom, _, Name}, Type]}) ->
- io_lib:format("~w::~s", [Name, t_form_to_string(Type)]);
+ flat_format("~w::~s", [Name, t_form_to_string(Type)]);
t_form_to_string({type, _L, term, []}) -> "term()";
t_form_to_string({type, _L, timeout, []}) -> "timeout()";
t_form_to_string({type, _L, tuple, any}) -> "tuple()";
@@ -3916,8 +4627,8 @@ t_form_to_string({type, _L, Name, []} = T) ->
catch throw:{error, _} -> atom_to_string(Name) ++ "()"
end;
t_form_to_string({type, _L, Name, List}) ->
- io_lib:format("~w(~s)",
- [Name, string:join(t_form_to_string_list(List), ",")]).
+ flat_format("~w(~s)",
+ [Name, string:join(t_form_to_string_list(List), ",")]).
t_form_to_string_list(List) ->
t_form_to_string_list(List, []).
@@ -3930,7 +4641,7 @@ t_form_to_string_list([], Acc) ->
-spec atom_to_string(atom()) -> string().
atom_to_string(Atom) ->
- lists:flatten(io_lib:format("~w", [Atom])).
+ flat_format("~w", [Atom]).
%%=============================================================================
%%
@@ -3959,7 +4670,7 @@ is_erl_type(?unit) -> true;
is_erl_type(#c{}) -> true;
is_erl_type(_) -> false.
--spec lookup_record(atom(), dict()) ->
+-spec lookup_record(atom(), type_table()) ->
'error' | {'ok', [{atom(), parse_form() | erl_type()}]}.
lookup_record(Tag, RecDict) when is_atom(Tag) ->
@@ -3974,7 +4685,8 @@ lookup_record(Tag, RecDict) when is_atom(Tag) ->
error
end.
--spec lookup_record(atom(), arity(), dict()) -> 'error' | {'ok', [{atom(), erl_type()}]}.
+-spec lookup_record(atom(), arity(), type_table()) ->
+ 'error' | {'ok', [{atom(), erl_type()}]}.
lookup_record(Tag, Arity, RecDict) when is_atom(Tag) ->
case dict:find({record, Tag}, RecDict) of
@@ -3993,7 +4705,8 @@ lookup_type(Name, Arity, RecDict) ->
{ok, Found} -> {type, Found}
end.
--spec type_is_defined('type' | 'opaque', atom(), arity(), dict()) -> boolean().
+-spec type_is_defined('type' | 'opaque', atom(), arity(), type_table()) ->
+ boolean().
type_is_defined(TypeOrOpaque, Name, Arity, RecDict) ->
dict:is_key({TypeOrOpaque, Name, Arity}, RecDict).
@@ -4002,6 +4715,59 @@ can_unfold_more(TypeName, TypeNames) ->
Fun = fun(E, Acc) -> case E of TypeName -> Acc + 1; _ -> Acc end end,
lists:foldl(Fun, 0, TypeNames) < ?REC_TYPE_LIMIT.
+-spec do_opaque(erl_type(), opaques(), fun((_) -> T)) -> T.
+
+%% Probably a little faster than calling t_unopaque/2.
+%% Unions that are due to opaque types are unopaqued.
+do_opaque(?opaque(_) = Type, Opaques, Pred) ->
+ case Opaques =:= 'universe' orelse is_opaque_type(Type, Opaques) of
+ true -> do_opaque(t_opaque_structure(Type), Opaques, Pred);
+ false -> Pred(Type)
+ end;
+do_opaque(?union(List) = Type, Opaques, Pred) ->
+ [A,B,F,I,L,N,T,M,O,R,Map] = List,
+ if O =:= ?none -> Pred(Type);
+ true ->
+ case Opaques =:= 'universe' orelse is_opaque_type(O, Opaques) of
+ true ->
+ S = t_opaque_structure(O),
+ do_opaque(t_sup([A,B,F,I,L,N,T,M,S,R,Map]), Opaques, Pred);
+ false -> Pred(Type)
+ end
+ end;
+do_opaque(Type, _Opaques, Pred) ->
+ Pred(Type).
+
+is_same_type_name(ModNameArgs, ModNameArgs) -> true;
+is_same_type_name({Mod, Name, Args1}, {Mod, Name, Args2}) ->
+ all_any(Args1) orelse all_any(Args2);
+is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2}) ->
+ is_same_type_name2(Mod1, Name1, Args1, Mod2, Name2, Args2).
+
+all_any([]) -> true;
+all_any([T|L]) ->
+ t_is_any(T) andalso all_any(L);
+all_any(_) -> false.
+
+%% Compatibility. In Erlang/OTP 17 the pre-defined opaque types
+%% digraph() and so on can be used, but there are also new types such
+%% as digraph:graph() with the exact same meaning. In Erlang/OTP R18.0
+%% all but the last clause can be removed.
+
+is_same_type_name2(digraph, digraph, [], digraph, graph, []) -> true;
+is_same_type_name2(digraph, graph, [], digraph, digraph, []) -> true;
+is_same_type_name2(gb_sets, gb_set, [], gb_sets, set, [_]) -> true;
+is_same_type_name2(gb_sets, set, [_], gb_sets, gb_set, []) -> true;
+is_same_type_name2(gb_trees, gb_tree, [], gb_trees, tree, [_, _]) -> true;
+is_same_type_name2(gb_trees, tree, [_, _], gb_trees, gb_tree, []) -> true;
+is_same_type_name2(_, _, _, _, _, _) -> false.
+
+map_keys(?map(Pairs)) ->
+ [K || {K, _} <- Pairs].
+
+map_values(?map(Pairs)) ->
+ [V || {_, V} <- Pairs].
+
%% -----------------------------------
%% Set
%%
@@ -4068,7 +4834,7 @@ set_size(Set) ->
set_to_string(Set) ->
L = [case is_atom(X) of
true -> io_lib:write_string(atom_to_list(X), $'); % stupid emacs '
- false -> io_lib:format("~w", [X])
+ false -> flat_format("~w", [X])
end || X <- set_to_list(Set)],
string:join(L, " | ").
@@ -4077,6 +4843,9 @@ set_min([H|_]) -> H.
set_max(Set) ->
hd(lists:reverse(Set)).
+flat_format(F, S) ->
+ lists:flatten(io_lib:format(F, S)).
+
%%=============================================================================
%%
%% Utilities for the binary type
@@ -4131,6 +4900,11 @@ handle_base(Unit, Pos) when Pos >= 0 ->
handle_base(Unit, Neg) ->
(Unit+(Neg rem Unit)) rem Unit.
+family(L) ->
+ R = sofs:relation(L),
+ F = sofs:relation_to_family(R),
+ sofs:to_external(F).
+
%%=============================================================================
%% Consistency-testing function(s) below
%%=============================================================================
diff --git a/lib/hipe/doc/src/book.xml b/lib/hipe/doc/src/book.xml
index 9c95e3a827..438be134a2 100644
--- a/lib/hipe/doc/src/book.xml
+++ b/lib/hipe/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2006</year><year>2010</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/hipe/doc/src/fascicules.xml b/lib/hipe/doc/src/fascicules.xml
index 28acc14624..b15610fa8b 100644
--- a/lib/hipe/doc/src/fascicules.xml
+++ b/lib/hipe/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/hipe/doc/src/hipe_app.xml b/lib/hipe/doc/src/hipe_app.xml
index 0612392c3f..2ddce664cc 100644
--- a/lib/hipe/doc/src/hipe_app.xml
+++ b/lib/hipe/doc/src/hipe_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
diff --git a/lib/hipe/doc/src/notes.xml b/lib/hipe/doc/src/notes.xml
index e0b1622d19..8d3358533b 100644
--- a/lib/hipe/doc/src/notes.xml
+++ b/lib/hipe/doc/src/notes.xml
@@ -30,6 +30,240 @@
</header>
<p>This document describes the changes made to HiPE.</p>
+<section><title>Hipe 3.11.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix HiPE for ARM when Erlang VM is compiled for Thumb
+ execution mode. This was a problem on e.g. Ubuntu which
+ configures its system GCC to generate Thumb by default.</p>
+ <p>
+ Own Id: OTP-12405</p>
+ </item>
+ <item>
+ <p>
+ Reduced lock contention of dynamic function lookups (like
+ apply) from hipe compiled code.</p>
+ <p>
+ Own Id: OTP-12557</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Fix two bugs in HiPE compiler regarding floating-points,
+ both leading to crash during compilation. The
+ target-specific code generators failed to handle integer
+ to floating-point conversion instructions with constant
+ operands. The middle-end could use an incorrect
+ representation for copies between floating-point
+ registers.</p>
+ <p>
+ Own Id: OTP-12413</p>
+ </item>
+ <item>
+ <p>
+ Improved error handling when memory allocation for HiPE
+ code fails.</p>
+ <p>
+ Own Id: OTP-12448</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Hipe 3.11.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed internal elf_format hrl file to contain valid
+ erlang</p>
+ <p>
+ Own Id: OTP-12322</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Hipe 3.11.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> The pretty-printing of bitstrings has been corrected.
+ </p>
+ <p>
+ Own Id: OTP-12015</p>
+ </item>
+ <item>
+ <p> A bug concerning <c>is_record/2,3</c> has been fixed,
+ as well as some cases where Dialyzer could crash due to
+ reaching system limits. </p>
+ <p>
+ Own Id: OTP-12018</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Hipe 3.11</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A Dialyzer crash involving analysis of Map types has now
+ been fixed.</p>
+ <p>
+ Own Id: OTP-11947</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle Maps instructions get_map_elements, put_map_assoc,
+ put_map_exact in HiPE compiler.</p>
+ <p>
+ Own Id: OTP-11900</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Hipe 3.10.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix compilation with 'no_remove_comments' (Thanks to
+ Johannes Weißl)</p>
+ <p>
+ Own Id: OTP-11564</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ There is now a test suite for the Hipe application</p>
+ <p>
+ Own Id: OTP-11748</p>
+ </item>
+ <item>
+ <p>
+ Support for a LLVM backend has been added in HiPE</p>
+ <p>
+ Own Id: OTP-11801</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see Map Expressions in the
+ <seealso marker="doc/reference_manual:expressions#map_expressions">
+ Reference Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p> Parameterized opaque types have been introduced. </p>
+ <p>
+ Own Id: OTP-11625</p>
+ </item>
+ <item>
+ <p>
+ Add support for the compilation of the is_map/1 and
+ map_size/1 guards to native code.</p>
+ <p>
+ Own Id: OTP-11831</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Hipe 3.10.2.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/hipe/doc/src/part_notes.xml b/lib/hipe/doc/src/part_notes.xml
index 8a3e82027b..f912fcfcdb 100644
--- a/lib/hipe/doc/src/part_notes.xml
+++ b/lib/hipe/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/hipe/doc/src/ref_man.xml b/lib/hipe/doc/src/ref_man.xml
index bdafb61d08..0e1288b4c4 100644
--- a/lib/hipe/doc/src/ref_man.xml
+++ b/lib/hipe/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/hipe/flow/cfg.hrl b/lib/hipe/flow/cfg.hrl
index 95bf5f7194..1f7a162f27 100644
--- a/lib/hipe/flow/cfg.hrl
+++ b/lib/hipe/flow/cfg.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,12 +42,12 @@
%%
%% Data is a triple with a dict of constants, a list of labels and an integer
%%
--type cfg_data() :: {dict(), [cfg_lbl()], non_neg_integer()}.
+-type cfg_data() :: {dict:dict(), [cfg_lbl()], non_neg_integer()}.
%%
%% The following is to be used by other modules
%%
--record(cfg, {table = gb_trees:empty() :: gb_tree(),
+-record(cfg, {table = gb_trees:empty() :: gb_trees:tree(),
info :: #cfg_info{},
data :: cfg_data()}).
-type cfg() :: #cfg{}.
diff --git a/lib/hipe/flow/cfg.inc b/lib/hipe/flow/cfg.inc
index 62f399a81c..f0b1a75737 100644
--- a/lib/hipe/flow/cfg.inc
+++ b/lib/hipe/flow/cfg.inc
@@ -4,7 +4,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -534,7 +534,7 @@ breadth_list([], Vis, _CFG, BO) ->
{Vis, BO}.
-endif.
--spec none_visited() -> gb_set().
+-spec none_visited() -> gb_sets:set().
none_visited() ->
gb_sets:empty().
diff --git a/lib/hipe/flow/hipe_dominators.erl b/lib/hipe/flow/hipe_dominators.erl
index 1f2c830eaf..50d45c7c72 100644
--- a/lib/hipe/flow/hipe_dominators.erl
+++ b/lib/hipe/flow/hipe_dominators.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -57,7 +57,7 @@
-record(domTree, {root :: cfg_lbl(),
size = 0 :: non_neg_integer(),
- nodes = gb_trees:empty() :: gb_tree()}).
+ nodes = gb_trees:empty() :: gb_trees:tree()}).
-type domTree() :: #domTree{}.
%%>----------------------------------------------------------------------<
@@ -590,7 +590,7 @@ domTree_pp_children([], _) ->
%%
%%========================================================================
--type domFrontier() :: gb_tree().
+-type domFrontier() :: gb_trees:tree().
%%>----------------------------------------------------------------------<
%% Procedure : domFrontier_create
diff --git a/lib/hipe/flow/liveness.inc b/lib/hipe/flow/liveness.inc
index 9c5eaf3e68..6f161fb269 100644
--- a/lib/hipe/flow/liveness.inc
+++ b/lib/hipe/flow/liveness.inc
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,7 +71,7 @@
%% The generic liveness analysis
%%
--spec analyze(cfg()) -> gb_tree().
+-spec analyze(cfg()) -> gb_trees:tree().
-ifdef(HIPE_LIVENESS_CALC_LARGEST_LIVESET).
analyze(CFG) ->
@@ -209,7 +209,7 @@ successors(L, Liveness) ->
{_GK, _LiveIn, Successors} = liveness_lookup(L, Liveness),
Successors.
--spec livein(gb_tree(), _) -> [_].
+-spec livein(gb_trees:tree(), _) -> [_].
livein(Liveness, L) ->
{_GK, LiveIn, _Successors} = liveness_lookup(L, Liveness),
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl
index 81249c958e..4691662f9f 100644
--- a/lib/hipe/icode/hipe_beam_to_icode.erl
+++ b/lib/hipe/icode/hipe_beam_to_icode.erl
@@ -509,6 +509,10 @@ trans_fun([{test,test_arity,{f,Lbl},[Reg,N]}|Instructions], Env) ->
I = hipe_icode:mk_type([trans_arg(Reg)],{tuple,N},
hipe_icode:label_name(True),map_label(Lbl)),
[I,True | trans_fun(Instructions,Env)];
+%%--- is_map ---
+trans_fun([{test,is_map,{f,Lbl},[Arg]}|Instructions], Env) ->
+ {Code,Env1} = trans_type_test(map,Lbl,Arg,Env),
+ [Code | trans_fun(Instructions,Env1)];
%%--------------------------------------------------------------------
%%--- select_val ---
trans_fun([{select_val,Reg,{f,Lbl},{list,Cases}}|Instructions], Env) ->
@@ -1121,6 +1125,49 @@ trans_fun([{trim,N,NY}|Instructions], Env) ->
trans_fun([{line,_}|Instructions], Env) ->
trans_fun(Instructions,Env);
%%--------------------------------------------------------------------
+%% Map instructions added in Spring 2014 (17.0).
+%%--------------------------------------------------------------------
+trans_fun([{test,has_map_fields,{f,Lbl},Map,{list,Keys}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ %% We assume that hipe_icode:mk_call has no side-effects, and reuse
+ %% the help function of get_map_elements below, discarding the value
+ %% assignment instruction list.
+ {TestInstructions, _GetInstructions, Env2} =
+ trans_map_query(MapVar, map_label(Lbl), Env1,
+ lists:flatten([[K, {r, 0}] || K <- Keys])),
+ [MapMove, TestInstructions | trans_fun(Instructions, Env2)];
+trans_fun([{get_map_elements,{f,Lbl},Map,{list,KVPs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ {TestInstructions, GetInstructions, Env2} =
+ trans_map_query(MapVar, map_label(Lbl), Env1, KVPs),
+ [MapMove, TestInstructions, GetInstructions | trans_fun(Instructions, Env2)];
+%%--- put_map_assoc ---
+trans_fun([{put_map_assoc,{f,Lbl},Map,Dst,_N,{list,Pairs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ TempMapVar = mk_var(new),
+ TempMapMove = hipe_icode:mk_move(TempMapVar, MapVar),
+ {PutInstructions, Env2}
+ = case Lbl > 0 of
+ true ->
+ gen_put_map_instrs(exists, assoc, TempMapVar, Dst, Lbl, Pairs, Env1);
+ false ->
+ gen_put_map_instrs(new, assoc, TempMapVar, Dst, new, Pairs, Env1)
+ end,
+ [MapMove, TempMapMove, PutInstructions | trans_fun(Instructions, Env2)];
+%%--- put_map_exact ---
+trans_fun([{put_map_exact,{f,Lbl},Map,Dst,_N,{list,Pairs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ TempMapVar = mk_var(new),
+ TempMapMove = hipe_icode:mk_move(TempMapVar, MapVar),
+ {PutInstructions, Env2}
+ = case Lbl > 0 of
+ true ->
+ gen_put_map_instrs(exists, exact, TempMapVar, Dst, Lbl, Pairs, Env1);
+ false ->
+ gen_put_map_instrs(new, exact, TempMapVar, Dst, new, Pairs, Env1)
+ end,
+ [MapMove, TempMapMove, PutInstructions | trans_fun(Instructions, Env2)];
+%%--------------------------------------------------------------------
%%--- ERROR HANDLING ---
%%--------------------------------------------------------------------
trans_fun([X|_], _) ->
@@ -1500,6 +1547,102 @@ trans_type_test2(function2, Lbl, Arg, Arity, Env) ->
hipe_icode:label_name(True), map_label(Lbl)),
{[Move1,Move2,I,True],Env2}.
+%%
+%% Handles the get_map_elements instruction and the has_map_fields
+%% test instruction.
+%%
+trans_map_query(_MapVar, _FailLabel, Env, []) ->
+ {[], [], Env};
+trans_map_query(MapVar, FailLabel, Env, [Key,Val|KVPs]) ->
+ {Move,KeyVar,Env1} = mk_move_and_var(Key,Env),
+ PassLabel = mk_label(new),
+ BoolVar = hipe_icode:mk_new_var(),
+ ValVar = mk_var(Val),
+ IsKeyCall = hipe_icode:mk_call([BoolVar], maps, is_key, [KeyVar, MapVar],
+ remote),
+ TrueTest = hipe_icode:mk_if('=:=', [BoolVar, hipe_icode:mk_const(true)],
+ hipe_icode:label_name(PassLabel), FailLabel),
+ GetCall = hipe_icode:mk_call([ValVar], maps, get, [KeyVar, MapVar], remote),
+ {TestList, GetList, Env2} = trans_map_query(MapVar, FailLabel, Env1, KVPs),
+ {[Move, IsKeyCall, TrueTest, PassLabel|TestList], [GetCall|GetList], Env2}.
+
+%%
+%% Generates a fail label if necessary when translating put_map_* instructions.
+%%
+gen_put_map_instrs(exists, Op, TempMapVar, Dst, FailLbl, Pairs, Env) ->
+ TrueLabel = mk_label(new),
+ IsMapCode = hipe_icode:mk_type([TempMapVar], map,
+ hipe_icode:label_name(TrueLabel), map_label(FailLbl)),
+ DstMapVar = mk_var(Dst),
+ {ReturnLbl, PutInstructions, Env1}
+ = case Op of
+ assoc ->
+ trans_put_map_assoc(TempMapVar, DstMapVar, Pairs, Env, []);
+ exact ->
+ trans_put_map_exact(TempMapVar, DstMapVar,
+ map_label(FailLbl), Pairs, Env, [])
+ end,
+ {[IsMapCode, TrueLabel, PutInstructions, ReturnLbl], Env1};
+gen_put_map_instrs(new, Op, TempMapVar, Dst, new, Pairs, Env) ->
+ TrueLabel = mk_label(new),
+ FailLbl = mk_label(new),
+ IsMapCode = hipe_icode:mk_type([TempMapVar], map,
+ hipe_icode:label_name(TrueLabel),
+ hipe_icode:label_name(FailLbl)),
+ DstMapVar = mk_var(Dst),
+ {ReturnLbl, PutInstructions, Env1}
+ = case Op of
+ assoc ->
+ trans_put_map_assoc(TempMapVar, DstMapVar, Pairs, Env, []);
+ exact ->
+ trans_put_map_exact(TempMapVar, DstMapVar,
+ hipe_icode:label_name(FailLbl), Pairs, Env, [])
+ end,
+ Fail = hipe_icode:mk_fail([hipe_icode:mk_const(badarg)], error),
+ {[IsMapCode, TrueLabel, PutInstructions, FailLbl, Fail, ReturnLbl], Env1}.
+
+%%-----------------------------------------------------------------------
+%% This function generates the instructions needed to insert several
+%% (Key, Value) pairs into an existing map, each recursive call inserts
+%% one (Key, Value) pair.
+%%-----------------------------------------------------------------------
+trans_put_map_assoc(MapVar, DestMapVar, [], Env, Acc) ->
+ MoveToReturnVar = hipe_icode:mk_move(DestMapVar, MapVar),
+ ReturnLbl = mk_label(new),
+ GotoReturn = hipe_icode:mk_goto(hipe_icode:label_name(ReturnLbl)),
+ {ReturnLbl, lists:reverse([GotoReturn, MoveToReturnVar | Acc]), Env};
+trans_put_map_assoc(MapVar, DestMapVar, [Key, Value | Rest], Env, Acc) ->
+ {MoveKey, KeyVar, Env1} = mk_move_and_var(Key, Env),
+ {MoveVal, ValVar, Env2} = mk_move_and_var(Value, Env1),
+ BifCall = hipe_icode:mk_call([MapVar], maps, put,
+ [KeyVar, ValVar, MapVar], remote),
+ trans_put_map_assoc(MapVar, DestMapVar, Rest, Env2,
+ [BifCall, MoveVal, MoveKey | Acc]).
+
+%%-----------------------------------------------------------------------
+%% This function generates the instructions needed to update several
+%% (Key, Value) pairs in an existing map, each recursive call inserts
+%% one (Key, Value) pair.
+%%-----------------------------------------------------------------------
+trans_put_map_exact(MapVar, DestMapVar, _FLbl, [], Env, Acc) ->
+ MoveToReturnVar = hipe_icode:mk_move(DestMapVar, MapVar),
+ ReturnLbl = mk_label(new),
+ GotoReturn = hipe_icode:mk_goto(hipe_icode:label_name(ReturnLbl)),
+ {ReturnLbl, lists:reverse([GotoReturn, MoveToReturnVar | Acc]), Env};
+trans_put_map_exact(MapVar, DestMapVar, FLbl, [Key, Value | Rest], Env, Acc) ->
+ SuccLbl = mk_label(new),
+ {MoveKey, KeyVar, Env1} = mk_move_and_var(Key, Env),
+ {MoveVal, ValVar, Env2} = mk_move_and_var(Value, Env1),
+ IsKey = hipe_icode:mk_new_var(),
+ BifCallIsKey = hipe_icode:mk_call([IsKey], maps, is_key,
+ [KeyVar, MapVar], remote),
+ IsKeyTest = hipe_icode:mk_if('=:=', [IsKey, hipe_icode:mk_const(true)],
+ hipe_icode:label_name(SuccLbl), FLbl),
+ BifCallPut = hipe_icode:mk_call([MapVar], maps, put,
+ [KeyVar, ValVar, MapVar], remote),
+ Acc1 = [BifCallPut, SuccLbl, IsKeyTest, BifCallIsKey, MoveVal, MoveKey | Acc],
+ trans_put_map_exact(MapVar, DestMapVar, FLbl, Rest, Env2, Acc1).
+
%%-----------------------------------------------------------------------
%% trans_puts(Code, Environment) ->
%% {Movs, Code, Vars, NewEnv}
diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl
index 6d4758bbf1..7b3d087e2d 100644
--- a/lib/hipe/icode/hipe_icode.erl
+++ b/lib/hipe/icode/hipe_icode.erl
@@ -503,7 +503,6 @@
enter_args_update/2,
enter_type/1,
is_enter/1,
-
mk_return/1, %% mk_return(Vars)
%% mk_fail/1, %% mk_fail(Args) class = exit
@@ -606,6 +605,12 @@
-export([highest_var/1, highest_label/1]).
+%%
+%% Exported types
+%%
+
+-export_type([icode/0]).
+
%%---------------------------------------------------------------------
%%
%% Icode
@@ -614,7 +619,7 @@
-spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()],
{non_neg_integer(),non_neg_integer()},
- {icode_lbl(),icode_lbl()}) -> #icode{}.
+ {icode_lbl(),icode_lbl()}) -> icode().
mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) ->
#icode{'fun'=Fun, params=Params, code=Code,
is_closure=IsClosure,
@@ -1434,8 +1439,8 @@ subst1([_|Pairs], I) -> subst1(Pairs, I).
%%
%% @doc Returns the successors of an Icode instruction.
%% In CFG form only branch instructions have successors,
-%% but in linear form other instructions like e.g. moves and
-%% others might be the last instruction of some basic block.
+%% but in linear form other instructions like e.g. moves
+%% might be the last instruction of some basic block.
%%
-spec successors(icode_instr()) -> [icode_lbl()].
@@ -1464,6 +1469,7 @@ successors(I) ->
case fail_label(I) of [] -> []; L when is_integer(L) -> [L] end;
#icode_enter{} -> [];
#icode_return{} -> [];
+ #icode_comment{} -> [];
%% the following are included here for handling linear code
#icode_move{} -> [];
#icode_begin_handler{} -> []
diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl
index 060493e61e..46c04beb40 100644
--- a/lib/hipe/icode/hipe_icode.hrl
+++ b/lib/hipe/icode/hipe_icode.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -61,8 +61,8 @@
| 'op_exact_eqeq_2' | 'suspend_msg_timeout'.
-type icode_type_test() :: 'atom' | 'bignum' | 'binary' | 'bitstr' | 'boolean'
- | 'cons' | 'fixnum' | 'float'
- | 'function' | 'function2' | 'integer' | 'list' | 'nil'
+ | 'cons' | 'fixnum' | 'float' | 'function'
+ | 'function2' | 'integer' | 'list' | 'map' | 'nil'
| 'number' | 'pid' | 'port' | 'reference' | 'tuple'
| {'atom', atom()} | {'integer', integer()}
| {'record', atom(), non_neg_integer()}
@@ -108,7 +108,6 @@
length :: non_neg_integer(),
cases :: [icode_switch_case()]}).
-
-record(icode_type, {test :: icode_type_test(),
args :: [icode_term_arg()],
true_label :: icode_lbl(),
@@ -178,5 +177,6 @@
var_range :: {non_neg_integer(), non_neg_integer()},
label_range :: {icode_lbl(), icode_lbl()},
info = [] :: icode_info()}).
+-type icode() :: #icode{}.
%%---------------------------------------------------------------------
diff --git a/lib/hipe/icode/hipe_icode_callgraph.erl b/lib/hipe/icode/hipe_icode_callgraph.erl
index 5789328f47..ccf97ecc17 100644
--- a/lib/hipe/icode/hipe_icode_callgraph.erl
+++ b/lib/hipe/icode/hipe_icode_callgraph.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -46,7 +46,7 @@
-type mfa_icode() :: {mfa(), #icode{}}.
--record(icode_callgraph, {codedict :: dict(), ordered_sccs :: [[mfa()]]}).
+-record(icode_callgraph, {codedict :: dict:dict(), ordered_sccs :: [[mfa()]]}).
%%------------------------------------------------------------------------
%% Exported functions
diff --git a/lib/hipe/icode/hipe_icode_cfg.erl b/lib/hipe/icode/hipe_icode_cfg.erl
index 9b4a10e273..f6c2b0600b 100644
--- a/lib/hipe/icode/hipe_icode_cfg.erl
+++ b/lib/hipe/icode/hipe_icode_cfg.erl
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,8 +54,8 @@
-spec postorder(cfg()) -> [icode_lbl()].
-spec reverse_postorder(cfg()) -> [icode_lbl()].
--spec is_visited(icode_lbl(), gb_set()) -> boolean().
--spec visit(icode_lbl(), gb_set()) -> gb_set().
+-spec is_visited(icode_lbl(), gb_sets:set()) -> boolean().
+-spec visit(icode_lbl(), gb_sets:set()) -> gb_sets:set().
-spec bb(cfg(), icode_lbl()) -> 'not_found' | bb().
-spec bb_add(cfg(), icode_lbl(), bb()) -> cfg().
diff --git a/lib/hipe/icode/hipe_icode_coordinator.erl b/lib/hipe/icode/hipe_icode_coordinator.erl
index 79e3304e6f..c69db9afa9 100644
--- a/lib/hipe/icode/hipe_icode_coordinator.erl
+++ b/lib/hipe/icode/hipe_icode_coordinator.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -49,9 +49,9 @@ coordinate(CG, Escaping, NonEscaping, Mod) ->
-type mfalists() :: {[mfa()], [mfa()]}.
--spec coordinate(mfalists(), hipe_digraph:hdg(), gb_tree(),
- fun((mfalists(), gb_tree()) -> mfalists()),
- fun((gb_tree()) -> 'ok'), pid()) -> no_return().
+-spec coordinate(mfalists(), hipe_digraph:hdg(), gb_trees:tree(),
+ fun((mfalists(), gb_trees:tree()) -> mfalists()),
+ fun((gb_trees:tree()) -> 'ok'), pid()) -> no_return().
coordinate(MFALists, CG, PM, Restart, LastAction, ServerPid) ->
case MFALists of
diff --git a/lib/hipe/icode/hipe_icode_exceptions.erl b/lib/hipe/icode/hipe_icode_exceptions.erl
index 00caffb24b..6191c536ad 100644
--- a/lib/hipe/icode/hipe_icode_exceptions.erl
+++ b/lib/hipe/icode/hipe_icode_exceptions.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -397,9 +397,9 @@ get_renaming(C, Map) ->
succ :: #cfg{},
pred :: #cfg{},
start_labels :: [icode_lbl(),...],
- visited = hipe_icode_cfg:none_visited() :: gb_set(),
- out = gb_trees:empty() :: gb_tree(),
- in = gb_trees:empty() :: gb_tree()
+ visited = hipe_icode_cfg:none_visited() :: gb_sets:set(),
+ out = gb_trees:empty() :: gb_trees:tree(),
+ in = gb_trees:empty() :: gb_trees:tree()
}).
init_state(CFG) ->
diff --git a/lib/hipe/icode/hipe_icode_fp.erl b/lib/hipe/icode/hipe_icode_fp.erl
index a2ca6132d1..38b3881a77 100644
--- a/lib/hipe/icode/hipe_icode_fp.erl
+++ b/lib/hipe/icode/hipe_icode_fp.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,8 +33,8 @@
-include("hipe_icode.hrl").
-include("../flow/cfg.hrl").
--record(state, {edge_map = gb_trees:empty() :: gb_tree(),
- fp_ebb_map = gb_trees:empty() :: gb_tree(),
+-record(state, {edge_map = gb_trees:empty() :: gb_trees:tree(),
+ fp_ebb_map = gb_trees:empty() :: gb_trees:tree(),
cfg :: #cfg{}}).
%%--------------------------------------------------------------------
@@ -424,7 +424,7 @@ redirect_phis([I|Is] = Code, OldFrom, NewFrom, Acc) ->
NewI = hipe_icode:phi_redirect_pred(I, OldFrom, NewFrom),
redirect_phis(Is, OldFrom, NewFrom, [NewI|Acc]);
_ ->
- lists:reverse(Acc) ++ Code
+ lists:reverse(Acc, Code)
end;
redirect_phis([], _OldFrom, _NewFrom, Acc) ->
lists:reverse(Acc).
diff --git a/lib/hipe/icode/hipe_icode_instruction_counter.erl b/lib/hipe/icode/hipe_icode_instruction_counter.erl
index 92658d294a..f44adfe149 100644
--- a/lib/hipe/icode/hipe_icode_instruction_counter.erl
+++ b/lib/hipe/icode/hipe_icode_instruction_counter.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -64,7 +64,8 @@ walktrough_bb(BB, Info) ->
%% The counter specific functions
%%-------------------------------------------------------------------
--spec compare(gb_tree(), gb_tree(), gb_tree()) -> gb_tree().
+-spec compare(gb_trees:tree(), gb_trees:tree(), gb_trees:tree()) ->
+ gb_trees:tree().
compare(Name, Old, New) ->
NewList = gb_trees:to_list(New),
diff --git a/lib/hipe/icode/hipe_icode_mulret.erl b/lib/hipe/icode/hipe_icode_mulret.erl
index 0bf9f89994..99522f6430 100644
--- a/lib/hipe/icode/hipe_icode_mulret.erl
+++ b/lib/hipe/icode/hipe_icode_mulret.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1166,9 +1166,9 @@ printCallList([]) -> io:format("~n").
%% removeUnElems([#icode_call{'fun'={unsafe_element,_}, args=Var}|List], Var, Res) ->
%% removeUnElems(List, Var, Res);
%% removeUnElems([I=#icode_move{dst=Var}|List], [Var], Res) ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% removeUnElems([I=#icode_call{dstlist=Var}|List], Var, Res) ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% removeUnElems([I|List], Var, Res) ->
%% removeUnElems(List, Var, [I|Res]);
%% removeUnElems([], _, Res) -> lists:reverse(Res).
@@ -1187,7 +1187,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1195,7 +1195,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1203,7 +1203,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1248,16 +1248,16 @@ printCallList([]) -> io:format("~n").
%% modifyCode([I|Code], Var, Res) ->
%% case scanInstr(I, Var) of
%% {move, Arity, VarLst} ->
-%% Code2 = [#icode_return{vars=VarLst}, I |lists:reverse(Res) ++ Code],
+%% Code2 = [#icode_return{vars=VarLst}, I |lists:reverse(Res, Code)],
%% {Arity, lists:reverse(Code2)};
%% {mktuple, Arity, VarLst} ->
-%% Code2 = [#icode_return{vars=VarLst}|lists:reverse(Res) ++ Code],
+%% Code2 = [#icode_return{vars=VarLst}|lists:reverse(Res, Code)],
%% {Arity, lists:reverse(Code2)};
%% other ->
%% modifyCode(Code, Var, [I|Res])
%% end;
%% modifyCode([], Var, Res) ->
-%% {1, lists:reverse(Res) ++ [#icode_return{vars=Var}]}.
+%% {1, lists:reverse(Res, [#icode_return{vars=Var}]}.
%% scanInstr(#icode_call{dstlist=Var, 'fun'=mktuple, args=Lst}, Var) ->
%% {mktuple, length(Lst), Lst};
diff --git a/lib/hipe/icode/hipe_icode_range.erl b/lib/hipe/icode/hipe_icode_range.erl
index 1a2cbfae31..fbc58f3568 100644
--- a/lib/hipe/icode/hipe_icode_range.erl
+++ b/lib/hipe/icode/hipe_icode_range.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,8 +72,8 @@
-type final_fun() :: fun((mfa(), [range()]) -> 'ok').
-type data() :: {mfa(), args_fun(), call_fun(), final_fun()}.
-type label() :: non_neg_integer().
--type info() :: gb_tree().
--type work_list() :: {[label()], [label()], set()}.
+-type info() :: gb_trees:tree().
+-type work_list() :: {[label()], [label()], sets:set()}.
-type variable() :: #icode_variable{}.
-type annotated_variable() :: #icode_variable{}.
-type argument() :: #icode_const{} | variable().
@@ -82,9 +82,9 @@
-type last_instr_return() :: {instr_split_info(), range()}.
-record(state, {info_map = gb_trees:empty() :: info(),
- counter = dict:new() :: dict(),
+ counter = dict:new() :: dict:dict(),
cfg :: cfg(),
- liveness = gb_trees:empty() :: gb_tree(),
+ liveness = gb_trees:empty() :: gb_trees:tree(),
ret_type :: range(),
lookup_fun :: call_fun(),
result_action :: final_fun()}).
diff --git a/lib/hipe/icode/hipe_icode_ssa.erl b/lib/hipe/icode/hipe_icode_ssa.erl
index 4607a96dda..2c4b6d9409 100644
--- a/lib/hipe/icode/hipe_icode_ssa.erl
+++ b/lib/hipe/icode/hipe_icode_ssa.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,7 +37,7 @@
-include("../ssa/hipe_ssa.inc").
%% Declarations for exported functions which are Icode-specific.
--spec ssa_liveness__analyze(#cfg{}) -> gb_tree().
+-spec ssa_liveness__analyze(#cfg{}) -> gb_trees:tree().
-spec ssa_liveness__livein(_, icode_lbl()) -> [#icode_variable{}].
%% -spec ssa_liveness__livein(_, icode_lbl(), _) -> [#icode_var{}].
diff --git a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
index 2337ef9323..772e30eada 100644
--- a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
+++ b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,9 +70,9 @@
%% var - maps variables to expression value numbers. These variables are
%% defined or used by the structure expressions.
--record(maps, {var = gb_trees:empty() :: gb_tree(),
- instr = gb_trees:empty() :: gb_tree(),
- expr = gb_trees:empty() :: gb_tree()}).
+-record(maps, {var = gb_trees:empty() :: gb_trees:tree(),
+ instr = gb_trees:empty() :: gb_trees:tree(),
+ expr = gb_trees:empty() :: gb_trees:tree()}).
maps_var(#maps{var = Out}) -> Out.
maps_instr(#maps{instr = Out}) -> Out.
@@ -211,10 +211,10 @@ varinfo_use_add(#varinfo{use = UseSet} = I, Use) ->
pred = none :: 'none' | [icode_lbl()],
succ = none :: 'none' | [icode_lbl()],
code = [] :: [tuple()], % [illegal_icode_instr()]
- phi = gb_trees:empty() :: gb_tree(),
+ phi = gb_trees:empty() :: gb_trees:tree(),
varmap = [] :: [{icode_var(), icode_var()}],
pre_loop = false :: boolean(),
- non_struct_defs = gb_sets:new() :: gb_set(),
+ non_struct_defs = gb_sets:new() :: gb_sets:set(),
up_expr = none :: 'none' | ?SETS:?SET(_),
killed_expr = none :: 'none' | ?SETS:?SET(_),
sub_inserts = ?SETS:new() :: ?SETS:?SET(_),
@@ -319,7 +319,7 @@ node_create(Label, Pred, Succ) ->
start_label = none :: 'none' | icode_lbl(),
rev_postorder = none :: 'none' | [icode_lbl()],
all_expr = none :: 'none' | [non_neg_integer()],
- tree = gb_trees:empty() :: gb_tree()}).
+ tree = gb_trees:empty() :: gb_trees:tree()}).
nodes_postorder(#nodes{postorder = Out}) -> Out.
nodes_rev_postorder(#nodes{rev_postorder = Out}) -> Out.
@@ -356,7 +356,7 @@ nodes_create() -> #nodes{}.
%% del_red_test - flag that is set to true when the reduction test
%% has been inserted is used to move the reduction test.
--record(update, {inserted = gb_trees:empty() :: gb_tree(),
+-record(update, {inserted = gb_trees:empty() :: gb_trees:tree(),
del_red_test = false :: boolean()}).
update_inserted_lookup(#update{inserted = Inserted}, ExprId) ->
diff --git a/lib/hipe/icode/hipe_icode_type.erl b/lib/hipe/icode/hipe_icode_type.erl
index 046949d2f2..ebeb5e2c10 100644
--- a/lib/hipe/icode/hipe_icode_type.erl
+++ b/lib/hipe/icode/hipe_icode_type.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -84,22 +84,22 @@
t_fun/0, t_fun/1, t_fun/2, t_fun_args/1, t_fun_arity/1,
t_inf/2, t_inf_lists/2, t_integer/0,
t_integer/1, t_is_atom/1, t_is_any/1,
- t_is_binary/1, t_is_bitstr/1, t_is_bitwidth/1, t_is_boolean/1,
- t_is_fixnum/1, t_is_cons/1,
+ t_is_binary/1, t_is_bitstr/1, t_is_bitwidth/1,
+ t_is_boolean/1, t_is_fixnum/1, t_is_cons/1, t_is_map/1,
t_is_maybe_improper_list/1, t_is_equal/2, t_is_float/1,
t_is_fun/1, t_is_integer/1, t_is_non_neg_integer/1,
t_is_number/1, t_is_matchstate/1,
- t_is_nil/1, t_is_none/1, t_is_port/1, t_is_pid/1,
+ t_is_none/1, t_is_port/1, t_is_pid/1,
t_is_reference/1, t_is_subtype/2, t_is_tuple/1,
t_limit/2, t_matchstate_present/1, t_matchstate/0,
- t_matchstate_slots/1, t_maybe_improper_list/0,
+ t_matchstate_slots/1, t_maybe_improper_list/0, t_map/0,
t_nil/0, t_none/0, t_number/0, t_number/1, t_number_vals/1,
t_pid/0, t_port/0, t_reference/0, t_subtract/2, t_sup/2,
t_to_tlist/1, t_tuple/0, t_tuple/1, t_tuple_sizes/1]).
--record(state, {info_map = gb_trees:empty() :: gb_tree(),
+-record(state, {info_map = gb_trees:empty() :: gb_trees:tree(),
cfg :: cfg(),
- liveness = gb_trees:empty() :: gb_tree(),
+ liveness = gb_trees:empty() :: gb_trees:tree(),
arg_types :: [erl_types:erl_type()],
ret_type = [t_none()] :: [erl_types:erl_type()],
lookupfun :: call_fun(),
@@ -213,7 +213,7 @@ analyse_blocks(Work, State, MFA) ->
{NewState, NewLabels} =
try analyse_block(Label, Info, State)
catch throw:none_type ->
- %% io:format("received none type at label: ~p~n",[Label]),
+ %% io:format("received none type at label: ~p~n", [Label]),
{State,[]}
end,
NewWork2 = add_work(NewWork, NewLabels),
@@ -265,7 +265,7 @@ analyse_insn(I, Info, LookupFun) ->
do_move(I, Info);
#icode_call{} ->
NewInfo = do_call(I, Info, LookupFun),
- %%io:format("Analysing Call: ~w~n~w~n", [I,NewInfo]),
+ %% io:format("Analysing Call: ~w~n~w~n", [I, NewInfo]),
update_call_arguments(I, NewInfo);
#icode_phi{} ->
Type = t_limit(join_list(hipe_icode:args(I), Info), ?TYPE_DEPTH),
@@ -788,16 +788,16 @@ test_record(Atom, Size, Var, VarInfo, TrueLab, FalseLab, Info) ->
end.
test_type(Test, Type) ->
- %%io:format("Test is: ~w\n", [Test]),
- %%io:format("Type is: ~s\n", [format_type(Type)]),
+ %% io:format("Test is: ~w\n", [Test]),
+ %% io:format("Type is: ~s\n", [format_type(Type)]),
Ans =
case t_is_any(Type) of
true -> maybe;
false ->
TrueTest = true_branch_info(Test),
Inf = t_inf(TrueTest, Type),
- %%io:format("TrueTest is: ~s\n", [format_type(TrueTest)]),
- %%io:format("Inf is: ~s\n", [format_type(Inf)]),
+ %% io:format("TrueTest is: ~s\n", [format_type(TrueTest)]),
+ %% io:format("Inf is: ~s\n", [format_type(Inf)]),
case t_is_equal(Type, Inf) of
true ->
not t_is_none(Type);
@@ -895,11 +895,12 @@ test_type0(boolean, T) ->
t_is_boolean(T);
test_type0(list, T) ->
t_is_maybe_improper_list(T);
-test_type0(cons, T) ->
- t_is_cons(T);
-test_type0(nil, T) ->
- t_is_nil(T).
-
+%% test_type0(cons, T) ->
+%% t_is_cons(T);
+%% test_type0(nil, T) ->
+%% t_is_nil(T).
+test_type0(map, T) ->
+ t_is_map(T).
true_branch_info(integer) ->
t_integer();
@@ -931,22 +932,24 @@ true_branch_info(reference) ->
t_reference();
true_branch_info(function) ->
t_fun();
-true_branch_info(cons) ->
- t_cons();
-true_branch_info(nil) ->
- t_nil();
+%% true_branch_info(cons) ->
+%% t_cons();
+%% true_branch_info(nil) ->
+%% t_nil();
true_branch_info(boolean) ->
t_boolean();
+true_branch_info(map) ->
+ t_map();
true_branch_info(T) ->
- exit({?MODULE,unknown_typetest,T}).
+ exit({?MODULE, unknown_typetest, T}).
%% _________________________________________________________________
%%
%% Remove the redundant type tests. If a test is removed, the trace
-%% that isn't taken is explicitly removed from the CFG to simpilify
+%% that isn't taken is explicitly removed from the CFG to simplify
%% the handling of Phi nodes. If a Phi node is left and at least one
-%% branch into it has disappeared, the SSA propagation pass can't
+%% branch into it has disappeared, the SSA propagation pass cannot
%% handle it.
%%
%% If the CFG has changed at the end of this pass, the analysis is
diff --git a/lib/tv/src/Makefile b/lib/hipe/llvm/Makefile
index 3d680c1eaf..92f378924a 100644
--- a/lib/tv/src/Makefile
+++ b/lib/hipe/llvm/Makefile
@@ -1,20 +1,26 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2001-2014. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
+#
+
+ifndef EBIN
+EBIN = ../ebin
+endif
+
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -22,81 +28,55 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Application version
# ----------------------------------------------------
include ../vsn.mk
-VSN=$(TV_VSN)
+VSN=$(HIPE_VSN)
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/tv-$(VSN)
+RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
# ----------------------------------------------------
-# Common Macros
+# Target Specs
# ----------------------------------------------------
-
-MODULES= \
- tv \
- tv_comm_func \
- tv_db \
- tv_db_search \
- tv_db_sort \
- tv_ets_rpc \
- tv_etsread \
- tv_info \
- tv_io_lib \
- tv_io_lib_format \
- tv_io_lib_pretty \
- tv_ip \
- tv_main \
- tv_mnesia_rpc \
- tv_new_table \
- tv_nodewin \
- tv_pb \
- tv_pb_funcs \
- tv_pc \
- tv_pc_graph_ctrl \
- tv_pc_menu_handling \
- tv_pd \
- tv_pd_display \
- tv_pd_frames \
- tv_pd_scale \
- tv_pg \
- tv_pg_gridfcns \
- tv_poll_dialog \
- tv_pw \
- tv_pw_window \
- tv_rec_edit \
- tv_table_owner \
- tv_utils
-
-
-
-HRL_FILES= \
- tv_db_int_def.hrl \
- tv_int_def.hrl \
- tv_int_msg.hrl \
- tv_main.hrl \
- tv_pb_int_def.hrl \
- tv_pc_int_def.hrl \
- tv_pd_int_def.hrl \
- tv_pd_int_msg.hrl \
- tv_pg_int_def.hrl \
- tv_pw_int_def.hrl
-
+ifdef HIPE_ENABLED
+HIPE_MODULES = hipe_rtl_to_llvm \
+ hipe_llvm \
+ elf_format \
+ hipe_llvm_main \
+ hipe_llvm_merge \
+ hipe_llvm_liveness
+else
+HIPE_MODULES =
+endif
+
+MODULES = $(HIPE_MODULES)
+
+HRL_FILES= elf_format.hrl elf32_format.hrl elf64_format.hrl \
+ hipe_llvm_arch.hrl
ERL_FILES= $(MODULES:%=%.erl)
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
-TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
-
-APP_FILE = tv.app
-APP_SRC = $(APP_FILE).src
-APP_TARGET = $(EBIN)/$(APP_FILE)
+# APP_FILE=
+# App_SRC= $(APP_FILE).src
+# APP_TARGET= $(EBIN)/$(APP_FILE)
+#
+# APPUP_FILE=
+# APPUP_SRC= $(APPUP_FILE).src
+# APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
-APPUP_FILE = tv.appup
-APPUP_SRC = $(APPUP_FILE).src
-APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
-# FLAGS
+# FLAGS: Please keep +inline below
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
+
+include ../native.mk
+
+ERL_COMPILE_FLAGS += +inline #+warn_missing_spec
+
+# if in 32 bit backend define BIT32 symbol
+ARCH = $(shell echo $(TARGET) | sed 's/^\(x86_64\)-.*/64bit/')
+ifneq ($(ARCH), 64bit)
+ERL_COMPILE_FLAGS += -DBIT32
+endif
# ----------------------------------------------------
# Targets
@@ -104,32 +84,26 @@ ERL_COMPILE_FLAGS += +warn_obsolete_guard
debug opt: $(TARGET_FILES)
+docs:
+
clean:
rm -f $(TARGET_FILES)
- rm -f errs core *~
-
-$(APP_TARGET): $(APP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
-
-$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
-
-docs:
+ rm -f core erl_crash.dump
# ----------------------------------------------------
-# Special Targets
+# Special Build Targets
# ----------------------------------------------------
+
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) $(RELSYSDIR)/llvm
+ $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)/llvm
+ $(INSTALL_DIR) $(RELSYSDIR)/ebin
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
release_docs_spec:
-
diff --git a/lib/hipe/llvm/elf32_format.hrl b/lib/hipe/llvm/elf32_format.hrl
new file mode 100644
index 0000000000..af1d95bf5b
--- /dev/null
+++ b/lib/hipe/llvm/elf32_format.hrl
@@ -0,0 +1,59 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This header file contains very very useful macros for handling
+%%% various segments of an ELF-32 formated object file, such as sizes,
+%%% offsets and predefined constants. For further information about
+%%% each field take a quick look at
+%%% "[http://www.sco.com/developers/gabi/latest/contents.html]"
+%%% that contain the current HP/Intel definition of the ELF object
+%%% file format.
+
+%%------------------------------------------------------------------------------
+%% ELF-32 Data Types (in bytes)
+%%------------------------------------------------------------------------------
+-define(ELF_ADDR_SIZE, 4).
+-define(ELF_OFF_SIZE, 4).
+-define(ELF_HALF_SIZE, 2).
+-define(ELF_WORD_SIZE, 4).
+-define(ELF_SWORD_SIZE, 4).
+-define(ELF_XWORD_SIZE, ?ELF_WORD_SIZE). % for compatibility
+-define(ELF_SXWORD_SIZE, ?ELF_WORD_SIZE).
+-define(ELF_UNSIGNED_CHAR_SIZE, 1).
+
+%%------------------------------------------------------------------------------
+%% ELF-32 Symbol Table Entries
+%%------------------------------------------------------------------------------
+%% Precomputed offset for Symbol Table entries in SymTab binary (needed because
+%% of the different offsets in 32 and 64 bit formats).
+-define(ST_NAME_OFFSET, 0).
+-define(ST_VALUE_OFFSET, (?ST_NAME_OFFSET + ?ST_NAME_SIZE) ).
+-define(ST_SIZE_OFFSET, (?ST_VALUE_OFFSET + ?ST_VALUE_SIZE) ).
+-define(ST_INFO_OFFSET, (?ST_SIZE_OFFSET + ?ST_SIZE_SIZE) ).
+-define(ST_OTHER_OFFSET, (?ST_INFO_OFFSET + ?ST_INFO_SIZE) ).
+-define(ST_SHNDX_OFFSET, (?ST_OTHER_OFFSET + ?ST_OTHER_SIZE) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Relocation Entries
+%%------------------------------------------------------------------------------
+%% Useful macros to extract information from r_info field
+-define(ELF_R_SYM(I), (I bsr 8) ).
+-define(ELF_R_TYPE(I), (I band 16#ff) ).
+-define(ELF_R_INFO(S, T), ((S bsl 8) + (T band 16#ff)) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Program Header Table
+%%------------------------------------------------------------------------------
+%% Offsets of various fields in a Program Header Table entry binary.
+-define(P_TYPE_OFFSET, 0).
+-define(P_OFFSET_OFFSET, (?P_FLAGS_OFFSET + ?P_FLAGS_SIZE) ).
+-define(P_VADDR_OFFSET, (?P_OFFSET_OFFSET + ?P_OFFSET_SIZE) ).
+-define(P_PADDR_OFFSET, (?P_VADDR_OFFSET + ?P_VADDR_SIZE) ).
+-define(P_FILESZ_OFFSET, (?P_PVADDR_OFFSET + ?P_PVADDR_SIZE) ).
+-define(P_MEMSZ_OFFSET, (?P_FILESZ_OFFSET + ?P_FILESZ_SIZE) ).
+-define(P_FLAGS_OFFSET, (?P_TYPE_OFFSET + ?P_TYPE_SIZE) ).
+-define(P_ALIGN_OFFSET, (?P_MEMSZ_OFFSET + ?P_MEMSZ_SIZE) ).
diff --git a/lib/hipe/llvm/elf64_format.hrl b/lib/hipe/llvm/elf64_format.hrl
new file mode 100644
index 0000000000..794746ffdc
--- /dev/null
+++ b/lib/hipe/llvm/elf64_format.hrl
@@ -0,0 +1,58 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This header file contains very very useful macros for handling
+%%% various segments of an ELF-64 formated object file, such as sizes,
+%%% offsets and predefined constants. For further information about
+%%% each field take a quick look at
+%%% "[http://downloads.openwatcom.org/ftp/devel/docs/elf-64-gen.pdf]"
+%%% that contain the current HP/Intel definition of the ELF object
+%%% file format.
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Data Types (in bytes)
+%%------------------------------------------------------------------------------
+-define(ELF_ADDR_SIZE, 8).
+-define(ELF_OFF_SIZE, 8).
+-define(ELF_HALF_SIZE, 2).
+-define(ELF_WORD_SIZE, 4).
+-define(ELF_SWORD_SIZE, 4).
+-define(ELF_XWORD_SIZE, 8).
+-define(ELF_SXWORD_SIZE, 8).
+-define(ELF_UNSIGNED_CHAR_SIZE, 1).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Symbol Table Entries
+%%------------------------------------------------------------------------------
+%% Precomputed offset for Symbol Table entries in SymTab binary
+-define(ST_NAME_OFFSET, 0).
+-define(ST_INFO_OFFSET, (?ST_NAME_OFFSET + ?ST_NAME_SIZE) ).
+-define(ST_OTHER_OFFSET, (?ST_INFO_OFFSET + ?ST_INFO_SIZE) ).
+-define(ST_SHNDX_OFFSET, (?ST_OTHER_OFFSET + ?ST_OTHER_SIZE) ).
+-define(ST_VALUE_OFFSET, (?ST_SHNDX_OFFSET + ?ST_SHNDX_SIZE) ).
+-define(ST_SIZE_OFFSET, (?ST_VALUE_OFFSET + ?ST_VALUE_SIZE) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Relocation Entries
+%%------------------------------------------------------------------------------
+%% Useful macros to extract information from r_info field
+-define(ELF_R_SYM(I), (I bsr 32) ).
+-define(ELF_R_TYPE(I), (I band 16#ffffffff) ).
+-define(ELF_R_INFO(S, T), ((S bsl 32) + (T band 16#ffffffff)) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Program Header Table
+%%------------------------------------------------------------------------------
+%% Offsets of various fields in a Program Header Table entry binary.
+-define(P_TYPE_OFFSET, 0).
+-define(P_FLAGS_OFFSET, (?P_TYPE_OFFSET + ?P_TYPE_SIZE) ).
+-define(P_OFFSET_OFFSET, (?P_FLAGS_OFFSET + ?P_FLAGS_SIZE) ).
+-define(P_VADDR_OFFSET, (?P_OFFSET_OFFSET + ?P_OFFSET_SIZE) ).
+-define(P_PADDR_OFFSET, (?P_VADDR_OFFSET + ?P_VADDR_SIZE) ).
+-define(P_FILESZ_OFFSET, (?P_PVADDR_OFFSET + ?P_PVADDR_SIZE) ).
+-define(P_MEMSZ_OFFSET, (?P_FILESZ_OFFSET + ?P_FILESZ_SIZE) ).
+-define(P_ALIGN_OFFSET, (?P_MEMSZ_OFFSET + ?P_MEMSZ_SIZE) ).
diff --git a/lib/hipe/llvm/elf_format.erl b/lib/hipe/llvm/elf_format.erl
new file mode 100644
index 0000000000..260da9b5e6
--- /dev/null
+++ b/lib/hipe/llvm/elf_format.erl
@@ -0,0 +1,790 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>,
+%%% Kostis Sagonas <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This module contains functions for extracting various pieces of
+%%% information from an ELF formated Object file. To fully understand
+%%% the ELF format and the use of these functions please read
+%%% "[http://www.linuxjournal.com/article/1060?page=0,0]" carefully.
+
+-module(elf_format).
+
+-export([get_tab_entries/1,
+ %% Relocations
+ get_rodata_relocs/1,
+ get_text_relocs/1,
+ 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
+ ]).
+
+-include("elf_format.hrl").
+
+%%------------------------------------------------------------------------------
+%% 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()].
+
+%%------------------------------------------------------------------------------
+%% Abstract Data Types and Accessors for ELF Structures.
+%%------------------------------------------------------------------------------
+
+%% File header
+-record(elf_ehdr, {ident, % ELF identification
+ type, % Object file type
+ machine, % Machine Type
+ version, % Object file version
+ entry, % Entry point address
+ phoff, % Program header offset
+ shoff :: offset(), % Section header offset
+ flags, % Processor-specific flags
+ ehsize :: size(), % ELF header size
+ phentsize :: size(), % Size of program header entry
+ phnum :: num(), % Number of program header entries
+ shentsize :: size(), % Size of section header entry
+ shnum :: num(), % Number of section header entries
+ shstrndx :: index() % Section name string table index
+ }).
+-type elf_ehdr() :: #elf_ehdr{}.
+
+-record(elf_ehdr_ident, {class, % File class
+ data, % Data encoding
+ version, % File version
+ osabi, % OS/ABI identification
+ abiversion, % ABI version
+ pad, % Start of padding bytes
+ nident % Size of e_ident[]
+ }).
+%% -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
+%% offset, % Offset in file
+%% vaddr, % Virtual address in memory
+%% paddr, % Reserved
+%% filesz, % Size of segment in file
+%% memsz, % Size of segment in memory
+%% align % Alignment of segment
+%% }).
+
+%% %% GCC exception table
+%% -record(elf_gccexntab, {lpbenc, % Landing pad base encoding
+%% lpbase, % Landing pad base
+%% ttenc, % Type table encoding
+%% ttoff, % Type table offset
+%% csenc, % Call-site table encoding
+%% cstabsize, % Call-site table size
+%% cstab :: cstab() % Call-site table
+%% }).
+%% -type elf_gccexntab() :: #elf_gccexntab{}.
+
+-record(elf_gccexntab_callsite, {start :: start(), % Call-site start
+ size :: size(), % Call-site size
+ lp :: lp(), % Call-site landing pad
+ % (exception handler)
+ onaction % On action (e.g. cleanup)
+ }).
+%% -type elf_gccexntab_callsite() :: #elf_gccexntab_callsite{}.
+
+%%------------------------------------------------------------------------------
+%% Accessor Functions
+%%------------------------------------------------------------------------------
+
+%% File header
+%% -spec mk_ehdr(...) -> elf_ehrd().
+mk_ehdr(Ident, Type, Machine, Version, Entry, Phoff, Shoff, Flags, Ehsize,
+ Phentsize, Phnum, Shentsize, Shnum, Shstrndx) ->
+ #elf_ehdr{ident = Ident, type = Type, machine = Machine, version = Version,
+ entry = Entry, phoff = Phoff, shoff = Shoff, flags = Flags,
+ ehsize = Ehsize, phentsize = Phentsize, phnum = Phnum,
+ shentsize = Shentsize, shnum = Shnum, shstrndx = Shstrndx}.
+
+%% -spec ehdr_shoff(elf_ehdr()) -> offset().
+%% ehdr_shoff(#elf_ehdr{shoff = Offset}) -> Offset.
+%%
+%% -spec ehdr_shentsize(elf_ehdr()) -> size().
+%% ehdr_shentsize(#elf_ehdr{shentsize = Size}) -> Size.
+%%
+%% -spec ehdr_shnum(elf_ehdr()) -> num().
+%% ehdr_shnum(#elf_ehdr{shnum = Num}) -> Num.
+%%
+%% -spec ehdr_shstrndx(elf_ehdr()) -> index().
+%% ehdr_shstrndx(#elf_ehdr{shstrndx = Index}) -> Index.
+
+
+%%-spec mk_ehdr_ident(...) -> elf_ehdr_ident().
+mk_ehdr_ident(Class, Data, Version, OsABI, AbiVersion, Pad, Nident) ->
+ #elf_ehdr_ident{class = Class, data = Data, version = Version, osabi = OsABI,
+ abiversion = AbiVersion, pad = Pad, nident = Nident}.
+
+%%%-------------------------
+%%% Section header entries
+%%%-------------------------
+mk_shdr(Name, Type, Flags, Addr, Offset, Size, Link, Info, AddrAlign, EntSize) ->
+ #elf_shdr{name = Name, type = Type, flags = Flags, addr = Addr,
+ offset = Offset, size = Size, link = Link, info = Info,
+ addralign = AddrAlign, entsize = EntSize}.
+
+%% -spec shdr_offset(elf_shdr()) -> offset().
+%% shdr_offset(#elf_shdr{offset = Offset}) -> Offset.
+%%
+%% -spec shdr_size(elf_shdr()) -> size().
+%% shdr_size(#elf_shdr{size = Size}) -> Size.
+
+%%%-------------------------
+%%% 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.
+
+%% -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
+%% %%%-------------------------
+%% -type cstab() :: [elf_gccexntab_callsite()].
+%%
+%% mk_gccexntab(LPbenc, LPbase, TTenc, TToff, CSenc, CStabsize, CStab) ->
+%% #elf_gccexntab{lpbenc = LPbenc, lpbase = LPbase, ttenc = TTenc,
+%% ttoff = TToff, csenc = CSenc, cstabsize = CStabsize,
+%% cstab = CStab}.
+%%
+%% -spec gccexntab_cstab(elf_gccexntab()) -> cstab().
+%% gccexntab_cstab(#elf_gccexntab{cstab = CSTab}) -> CSTab.
+
+mk_gccexntab_callsite(Start, Size, LP, Action) ->
+ #elf_gccexntab_callsite{start = Start, size=Size, lp=LP, onaction=Action}.
+
+%% -spec gccexntab_callsite_start(elf_gccexntab_callsite()) -> start().
+%% gccexntab_callsite_start(#elf_gccexntab_callsite{start = Start}) -> Start.
+%%
+%% -spec gccexntab_callsite_size(elf_gccexntab_callsite()) -> size().
+%% gccexntab_callsite_size(#elf_gccexntab_callsite{size = Size}) -> Size.
+%%
+%% -spec gccexntab_callsite_lp(elf_gccexntab_callsite()) -> lp().
+%% gccexntab_callsite_lp(#elf_gccexntab_callsite{lp = LP}) -> LP.
+
+%%------------------------------------------------------------------------------
+%% 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),
+ << %% Structural pattern matching on fields.
+ Ident_bin:?E_IDENT_SIZE/binary,
+ Type:?bits(?E_TYPE_SIZE)/integer-little,
+ Machine:?bits(?E_MACHINE_SIZE)/integer-little,
+ Version:?bits(?E_VERSION_SIZE)/integer-little,
+ Entry:?bits(?E_ENTRY_SIZE)/integer-little,
+ Phoff:?bits(?E_PHOFF_SIZE)/integer-little,
+ Shoff:?bits(?E_SHOFF_SIZE)/integer-little,
+ Flags:?bits(?E_FLAGS_SIZE)/integer-little,
+ Ehsize:?bits(?E_EHSIZE_SIZE)/integer-little,
+ Phentsize:?bits(?E_PHENTSIZE_SIZE)/integer-little,
+ Phnum:?bits(?E_PHNUM_SIZE)/integer-little,
+ Shentsize:?bits(?E_SHENTSIZE_SIZE)/integer-little,
+ Shnum:?bits(?E_SHENTSIZE_SIZE)/integer-little,
+ Shstrndx:?bits(?E_SHSTRNDX_SIZE)/integer-little
+ >> = Ehdr_bin,
+ <<16#7f, $E, $L, $F, Class, Data, Version, Osabi, Abiversion,
+ Pad:6/binary, Nident
+ >> = Ident_bin,
+ Ident = mk_ehdr_ident(Class, Data, Version, Osabi,
+ Abiversion, Pad, Nident),
+ mk_ehdr(Ident, Type, Machine, Version, Entry, Phoff, Shoff, Flags,
+ Ehsize, Phentsize, Phnum, Shentsize, Shnum, Shstrndx).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Section Header Entries
+%%------------------------------------------------------------------------------
+
+%% @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),
+ %% 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) ->
+ <<%% Structural pattern matching on fields.
+ Name:?bits(?SH_NAME_SIZE)/integer-little,
+ Type:?bits(?SH_TYPE_SIZE)/integer-little,
+ Flags:?bits(?SH_FLAGS_SIZE)/integer-little,
+ Addr:?bits(?SH_ADDR_SIZE)/integer-little,
+ Offset:?bits(?SH_OFFSET_SIZE)/integer-little,
+ Size:?bits(?SH_SIZE_SIZE)/integer-little,
+ Link:?bits(?SH_LINK_SIZE)/integer-little,
+ 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).
+
+%%------------------------------------------------------------------------------
+%% 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).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate String Table
+%%------------------------------------------------------------------------------
+
+%% @doc Extracts String Table from an ELF formated Object File.
+-spec extract_strtab(elf()) -> [{string(), offset()}].
+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.
+
+%%------------------------------------------------------------------------------
+%% 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()].
+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).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Executable Code segment
+%%------------------------------------------------------------------------------
+
+%% @doc This function gets as arguments an ELF formated binary file and
+%% returns the Executable Code (".text" segment) or an empty binary if it
+%% is not found.
+-spec extract_text(elf()) -> binary().
+extract_text(Elf) ->
+ extract_segment_by_name(Elf, ?TEXT).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Note Section
+%%------------------------------------------------------------------------------
+
+%% @doc Extract specific Note Section from an ELF Object file. The function
+%% takes as first argument the object file (`Elf') and the `Name' of the
+%% wanted Note Section (<b>without</b> the ".note" prefix!). It returns
+%% the specified binary segment or an empty binary if no such section
+%% exists.
+-spec extract_note(elf(), string()) -> binary().
+extract_note(Elf, Name) ->
+ extract_segment_by_name(Elf, ?NOTE(Name)).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate GCC Exception Table segment
+%%------------------------------------------------------------------------------
+
+%% A description for the C++ exception table formats can be found at Exception
+%% Handling Tables (http://www.codesourcery.com/cxx-abi/exceptions.pdf).
+
+%% A list with `{Start, End, HandlerOffset}' for all call sites in the code
+-spec get_exn_handlers(elf()) -> [{start(), start(), lp()}].
+get_exn_handlers(Elf) ->
+ CallSites = extract_gccexntab_callsites(Elf),
+ [{Start, Start + Size, LP}
+ || #elf_gccexntab_callsite{start = Start, size = Size, lp = LP} <- CallSites].
+
+%% @doc This function gets as argument an ELF binary file and returns
+%% the table (list) of call sites which is stored in GCC
+%% Exception Table (".gcc_except_table") section.
+%% It returns an empty list if the Exception Table is not found.
+%% XXX: Assumes there is *no* Action Record Table.
+extract_gccexntab_callsites(Elf) ->
+ case extract_segment_by_name(Elf, ?GCC_EXN_TAB) of
+ <<>> ->
+ [];
+ ExnTab ->
+ %% First byte of LSDA is Landing Pad base encoding.
+ <<LBenc:8, More/binary>> = ExnTab,
+ %% Second byte is the Landing Pad base (if its encoding is not
+ %% DW_EH_PE_omit) (optional).
+ {_LPBase, LSDACont} =
+ case LBenc =:= ?DW_EH_PE_omit of
+ true -> % No landing pad base byte. (-1 denotes that)
+ {-1, More};
+ false -> % Landing pad base.
+ <<Base:8, More2/binary>> = More,
+ {Base, More2}
+ end,
+ %% Next byte of LSDA is the encoding of the Type Table.
+ <<TTenc:8, More3/binary>> = LSDACont,
+ %% Next byte is the Types Table offset encoded in U-LEB128 (optional).
+ {_TTOff, LSDACont2} =
+ case TTenc =:= ?DW_EH_PE_omit of
+ true -> % There is no Types Table pointer. (-1 denotes that)
+ {-1, More3};
+ false -> % The byte offset from this field to the start of the Types
+ % Table used for exception matching.
+ leb128_decode(More3)
+ end,
+ %% Next byte of LSDA is the encoding of the fields in the Call-site Table.
+ <<_CSenc:8, More4/binary>> = LSDACont2,
+ %% Sixth byte is the size (in bytes) of the Call-site Table encoded in
+ %% U-LEB128.
+ {_CSTabSize, CSTab} = leb128_decode(More4),
+ %% Extract all call site information
+ get_gccexntab_callsites(CSTab, [])
+ end.
+
+get_gccexntab_callsites(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_gccexntab_callsites(CSTab, Acc) ->
+ %% We are only interested in the Landing Pad of every entry.
+ <<Start:32/integer-little, Size:32/integer-little,
+ LP:32/integer-little, OnAction:8, More/binary
+ >> = CSTab,
+ GccCS = mk_gccexntab_callsite(Start, Size, LP, OnAction),
+ 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
+%%------------------------------------------------------------------------------
+
+%% @doc Returns the binary segment starting at `Offset' with length `Size'
+%% (bytes) from a binary file. If `Offset' is bigger than the byte size of
+%% the binary, an empty binary (`<<>>') is returned.
+-spec get_binary_segment(binary(), offset(), size()) -> binary().
+get_binary_segment(Bin, Offset, _Size) when Offset > byte_size(Bin) ->
+ <<>>;
+get_binary_segment(Bin, Offset, Size) ->
+ <<_Hdr:Offset/binary, BinSeg:Size/binary, _More/binary>> = Bin,
+ BinSeg.
+
+%% @doc This function gets as arguments an ELF formated binary object and
+%% a string with the segments' name and returns the specified segment or
+%% an empty binary (`<<>>') if there exists no segment with that name.
+%% 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),
+ %% 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.
+ <<>>
+ 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
+%% done because a LEB128 number has variable bit-size and that is a way of
+%% extracting only one number in a binary and continuing parsing the binary
+%% for other kind of data (e.g. different encoding).
+%% FIXME: Only decodes unsigned data!
+-spec leb128_decode(binary()) -> {integer(), binary()}.
+leb128_decode(LebNum) ->
+ leb128_decode(LebNum, 0, <<>>).
+
+-spec leb128_decode(binary(), integer(), binary()) -> {integer(), binary()}.
+leb128_decode(LebNum, NoOfBits, Acc) ->
+ <<Sentinel:1/bits, NextBundle:7/bits, MoreLebNums/bits>> = LebNum,
+ case Sentinel of
+ <<1:1>> -> % more bytes to follow
+ leb128_decode(MoreLebNums, NoOfBits+7, <<NextBundle:7/bits, Acc/bits>>);
+ <<0:1>> -> % byte bundle stop
+ Size = NoOfBits+7,
+ <<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
new file mode 100644
index 0000000000..7a3cdfead6
--- /dev/null
+++ b/lib/hipe/llvm/elf_format.hrl
@@ -0,0 +1,488 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%------------------------------------------------------------------------------
+%%
+%% ELF Header File
+%%
+%%------------------------------------------------------------------------------
+
+-ifdef(BIT32).
+-include("elf32_format.hrl"). % ELF32-specific definitions.
+-else.
+-include("elf64_format.hrl"). % ELF64-specific definitions.
+-endif.
+
+%%------------------------------------------------------------------------------
+%% ELF Data Types (in bytes)
+%%------------------------------------------------------------------------------
+%%XXX: Included in either elf32_format or elf64_format.
+
+%%------------------------------------------------------------------------------
+%% ELF File Header
+%%------------------------------------------------------------------------------
+-define(ELF_EHDR_SIZE, (?E_IDENT_SIZE + ?E_TYPE_SIZE + ?E_MACHINE_SIZE
+ +?E_VERSION_SIZE + ?E_ENTRY_SIZE + ?E_PHOFF_SIZE
+ +?E_SHOFF_SIZE + ?E_FLAGS_SIZE + ?E_EHSIZE_SIZE
+ +?E_PHENTSIZE_SIZE + ?E_PHNUM_SIZE + ?E_SHENTSIZE_SIZE
+ +?E_SHNUM_SIZE + ?E_SHSTRNDX_SIZE) ).
+
+-define(E_IDENT_SIZE, (16 * ?ELF_UNSIGNED_CHAR_SIZE) ).
+-define(E_TYPE_SIZE, ?ELF_HALF_SIZE).
+-define(E_MACHINE_SIZE, ?ELF_HALF_SIZE).
+-define(E_VERSION_SIZE, ?ELF_WORD_SIZE).
+-define(E_ENTRY_SIZE, ?ELF_ADDR_SIZE).
+-define(E_PHOFF_SIZE, ?ELF_OFF_SIZE).
+-define(E_SHOFF_SIZE, ?ELF_OFF_SIZE).
+-define(E_FLAGS_SIZE, ?ELF_WORD_SIZE).
+-define(E_EHSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_PHENTSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_PHNUM_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHENTSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHNUM_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHSTRNDX_SIZE, ?ELF_HALF_SIZE).
+
+%% Useful arithmetics for computing byte offsets for various File Header
+%% entries from a File Header (erlang) binary
+-define(E_IDENT_OFFSET, 0).
+-define(E_TYPE_OFFSET, (?E_IDENT_OFFSET + ?E_IDENT_SIZE) ).
+-define(E_MACHINE_OFFSET, (?E_TYPE_OFFSET + ?E_TYPE_SIZE) ).
+-define(E_VERSION_OFFSET, (?E_MACHINE_OFFSET + ?E_MACHINE_SIZE) ).
+-define(E_ENTRY_OFFSET, (?E_VERSION_OFFSET + ?E_VERSION_SIZE) ).
+-define(E_PHOFF_OFFSET, (?E_ENTRY_OFFSET + ?E_ENTRY_SIZE) ).
+-define(E_SHOFF_OFFSET, (?E_PHOFF_OFFSET + ?E_PHOFF_SIZE) ).
+-define(E_FLAGS_OFFSET, (?E_SHOFF_OFFSET + ?E_SHOFF_SIZE) ).
+-define(E_EHSIZE_OFFSET, (?E_FLAGS_OFFSET + ?E_FLAGS_SIZE) ).
+-define(E_PHENTSIZE_OFFSET, (?E_EHSIZE_OFFSET + ?E_EHSIZE_SIZE) ).
+-define(E_PHNUM_OFFSET, (?E_PHENTSIZE_OFFSET + ?E_PHENTSIZE_SIZE) ).
+-define(E_SHENTSIZE_OFFSET, (?E_PHNUM_OFFSET + ?E_PHNUM_SIZE) ).
+-define(E_SHNUM_OFFSET, (?E_SHENTSIZE_OFFSET + ?E_SHENTSIZE_SIZE) ).
+-define(E_SHSTRNDX_OFFSET, (?E_SHNUM_OFFSET + ?E_SHNUM_SIZE) ).
+
+%% Name aliases of File Header fields information used in get_header_field
+%% function of elf64_format module.
+-define(E_IDENT, {?E_IDENT_OFFSET, ?E_IDENT_SIZE}).
+-define(E_TYPE, {?E_TYPE_OFFSET, ?E_TYPE_SIZE}).
+-define(E_MACHINE, {?E_MACHINE_OFFSET, ?E_MACHINE_SIZE}).
+-define(E_VERSION, {?E_VERSION_OFFSET, ?E_VERSION_SIZE}).
+-define(E_ENTRY, {?E_ENTRY_OFFSET, ?E_ENTRY_SIZE}).
+-define(E_PHOFF, {?E_PHOFF_OFFSET, ?E_PHOFF_SIZE}).
+-define(E_SHOFF, {?E_SHOFF_OFFSET, ?E_SHOFF_SIZE}).
+-define(E_FLAGS, {?E_FLAGS_OFFSET, ?E_FLAGS_SIZE}).
+-define(E_EHSIZE, {?E_EHSIZE_OFFSET, ?E_EHSIZE_SIZE}).
+-define(E_PHENTSIZE, {?E_PHENTSIZE_OFFSET, ?E_PHENTSIZE_SIZE}).
+-define(E_PHNUM, {?E_PHNUM_OFFSET, ?E_PHNUM_SIZE}).
+-define(E_SHENTSIZE, {?E_SHENTSIZE_OFFSET, ?E_SHENTSIZE_SIZE}).
+-define(E_SHNUM, {?E_SHNUM_OFFSET, ?E_SHNUM_SIZE}).
+-define(E_SHSTRNDX, {?E_SHSTRNDX_OFFSET, ?E_SHSTRNDX_SIZE}).
+
+%% ELF Identification (e_ident)
+-define(EI_MAG0, 0).
+-define(EI_MAG1, 1).
+-define(EI_MAG2, 2).
+-define(EI_MAG3, 3).
+-define(EI_CLASS, 4).
+-define(EI_DATA, 5).
+-define(EI_VERSION, 6).
+-define(EI_OSABI, 7).
+-define(EI_ABIVERSION, 8).
+-define(EI_PAD, 9).
+-define(EI_NIDENT, 16).
+
+%% Object File Classes (e_ident[EI_CLASS])
+-define(ELFCLASSNONE, 0).
+-define(ELFCLASS32, 1).
+-define(ELFCLASS64, 2).
+
+%% Data Encodings (e_ident[EI_DATA])
+-define(ELFDATA2LSB, 1).
+-define(ELFDATA2MSB, 2).
+
+%% Operating System and ABI Identifiers (e_ident[EI_OSABI])
+-define(ELFOSABI_SYSV, 0).
+-define(ELFOSABI_HPUX, 1).
+-define(ELFOSABI_STANDALONE, 255).
+
+%% Object File Types (e_type)
+-define(ET_NONE, 0).
+-define(ET_REL, 1).
+-define(ET_EXEC, 2).
+-define(ET_DYN, 3).
+-define(ET_CORE, 4).
+-define(ET_LOOS, 16#FE00).
+-define(ET_HIOS, 16#FEFF).
+-define(ET_LOPROC, 16#FF00).
+-define(ET_HIPROC, 16#FFFF).
+
+%%------------------------------------------------------------------------------
+%% ELF Section Header
+%%------------------------------------------------------------------------------
+-define(ELF_SHDRENTRY_SIZE, (?SH_NAME_SIZE + ?SH_TYPE_SIZE + ?SH_FLAGS_SIZE
+ +?SH_ADDR_SIZE + ?SH_OFFSET_SIZE + ?SH_SIZE_SIZE
+ +?SH_LINK_SIZE + ?SH_INFO_SIZE
+ +?SH_ADDRALIGN_SIZE + ?SH_ENTSIZE_SIZE) ).
+
+-define(SH_NAME_SIZE, ?ELF_WORD_SIZE).
+-define(SH_TYPE_SIZE, ?ELF_WORD_SIZE).
+-define(SH_FLAGS_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_ADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(SH_OFFSET_SIZE, ?ELF_OFF_SIZE).
+-define(SH_SIZE_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_LINK_SIZE, ?ELF_WORD_SIZE).
+-define(SH_INFO_SIZE, ?ELF_WORD_SIZE).
+-define(SH_ADDRALIGN_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_ENTSIZE_SIZE, ?ELF_XWORD_SIZE).
+
+%% Useful arithmetics for computing byte offsets for various fields from a
+%% Section Header Entry (erlang) binary
+-define(SH_NAME_OFFSET, 0).
+-define(SH_TYPE_OFFSET, (?SH_NAME_OFFSET + ?SH_NAME_SIZE) ).
+-define(SH_FLAGS_OFFSET, (?SH_TYPE_OFFSET + ?SH_TYPE_SIZE) ).
+-define(SH_ADDR_OFFSET, (?SH_FLAGS_OFFSET + ?SH_FLAGS_SIZE) ).
+-define(SH_OFFSET_OFFSET, (?SH_ADDR_OFFSET + ?SH_ADDR_SIZE) ).
+-define(SH_SIZE_OFFSET, (?SH_OFFSET_OFFSET + ?SH_OFFSET_SIZE) ).
+-define(SH_LINK_OFFSET, (?SH_SIZE_OFFSET + ?SH_SIZE_SIZE) ).
+-define(SH_INFO_OFFSET, (?SH_LINK_OFFSET + ?SH_LINK_SIZE) ).
+-define(SH_ADDRALIGN_OFFSET, (?SH_INFO_OFFSET + ?SH_INFO_SIZE) ).
+-define(SH_ENTSIZE_OFFSET, (?SH_ADDRALIGN_OFFSET + ?SH_ADDRALIGN_SIZE) ).
+
+%% Name aliases of Section Header Table entry information used in
+%% get_shdrtab_entry function of elf64_format module.
+-define(SH_NAME, {?SH_NAME_OFFSET, ?SH_NAME_SIZE}).
+-define(SH_TYPE, {?SH_TYPE_OFFSET, ?SH_TYPE_SIZE}).
+-define(SH_FLAGS, {?SH_FLAGS_OFFSET, ?SH_FLAGS_SIZE}).
+-define(SH_ADDR, {?SH_ADDR_OFFSET, ?SH_ADDR_SIZE}).
+-define(SH_OFFSET, {?SH_OFFSET_OFFSET, ?SH_OFFSET_SIZE}).
+-define(SH_SIZE, {?SH_SIZE_OFFSET, ?SH_SIZE_SIZE}).
+-define(SH_LINK, {?SH_LINK_OFFSET, ?SH_LINK_SIZE}).
+-define(SH_INFO, {?SH_INFO_OFFSET, ?SH_INFO_SIZE}).
+-define(SH_ADDRALIGN, {?SH_ADDRALIGN_OFFSET, ?SH_ADDRALIGN_SIZE}).
+-define(SH_ENTSIZE, {?SH_ENTSIZE_OFFSET, ?SH_ENTSIZE_SIZE}).
+
+%% Section Indices
+-define(SHN_UNDEF, 0).
+-define(SHN_LOPROC, 16#FF00).
+-define(SHN_HIPROC, 16#FF1F).
+-define(SHN_LOOS, 16#FF20).
+-define(SHN_HIOS, 16#FF3F).
+-define(SHN_ABS, 16#FFF1).
+-define(SHN_COMMON, 16#FFF2).
+
+%% Section Types (sh_type)
+-define(SHT_NULL, 0).
+-define(SHT_PROGBITS, 1).
+-define(SHT_SYMTAB, 2).
+-define(SHT_STRTAB, 3).
+-define(SHT_RELA, 4).
+-define(SHT_HASH, 5).
+-define(SHT_DYNAMIC, 6).
+-define(SHT_NOTE, 7).
+-define(SHT_NOBITS, 8).
+-define(SHT_REL, 9).
+-define(SHT_SHLIB, 10).
+-define(SHT_DYNSYM, 11).
+-define(SHT_LOOS, 16#60000000).
+-define(SHT_HIOS, 16#6FFFFFFF).
+-define(SHT_LOPROC, 16#70000000).
+-define(SHT_HIPROC, 16#7FFFFFFF).
+
+%% Section Attributes (sh_flags)
+-define(SHF_WRITE, 16#1).
+-define(SHF_ALLOC, 16#2).
+-define(SHF_EXECINSTR, 16#4).
+-define(SHF_MASKOS, 16#0F000000).
+-define(SHF_MASKPROC, 16#F0000000).
+
+%%
+%% Standard Section names for Code and Data
+%%
+-define(BSS, ".bss").
+-define(DATA, ".data").
+-define(INTERP, ".interp").
+-define(RODATA, ".rodata").
+-define(TEXT, ".text").
+%% Other Standard Section names
+-define(COMMENT, ".comment").
+-define(DYNAMIC, ".dynamic").
+-define(DYNSTR, ".dynstr").
+-define(GOT, ".got").
+-define(HASH, ".hash").
+-define(NOTE(Name), (".note" ++ Name)).
+-define(PLT, ".plt").
+-define(REL(Name), (".rel" ++ Name) ).
+-define(RELA(Name), (".rela" ++ Name) ).
+-define(SHSTRTAB, ".shstrtab").
+-define(STRTAB, ".strtab").
+-define(SYMTAB, ".symtab").
+-define(GCC_EXN_TAB, ".gcc_except_table").
+
+%%------------------------------------------------------------------------------
+%% ELF Symbol Table Entries
+%%------------------------------------------------------------------------------
+-define(ELF_SYM_SIZE, (?ST_NAME_SIZE + ?ST_INFO_SIZE + ?ST_OTHER_SIZE
+ +?ST_SHNDX_SIZE + ?ST_VALUE_SIZE + ?ST_SIZE_SIZE) ).
+
+-define(ST_NAME_SIZE, ?ELF_WORD_SIZE).
+-define(ST_INFO_SIZE, ?ELF_UNSIGNED_CHAR_SIZE).
+-define(ST_OTHER_SIZE, ?ELF_UNSIGNED_CHAR_SIZE).
+-define(ST_SHNDX_SIZE, ?ELF_HALF_SIZE).
+-define(ST_VALUE_SIZE, ?ELF_ADDR_SIZE).
+-define(ST_SIZE_SIZE, ?ELF_XWORD_SIZE).
+
+%% Precomputed offset for Symbol Table entries in SymTab binary
+%%XXX: Included in either elf32_format or elf64_format.
+
+%% Name aliases for Symbol Table entry information
+-define(ST_NAME, {?ST_NAME_OFFSET, ?ST_NAME_SIZE}).
+-define(ST_INFO, {?ST_INFO_OFFSET, ?ST_INFO_SIZE}).
+-define(ST_OTHER, {?ST_OTHER_OFFSET, ?ST_OTHER_SIZE}).
+-define(ST_SHNDX, {?ST_SHNDX_OFFSET, ?ST_SHNDX_SIZE}).
+-define(ST_VALUE, {?ST_VALUE_OFFSET, ?ST_VALUE_SIZE}).
+-define(ST_SIZE, {?ST_SIZE_OFFSET, ?ST_SIZE_SIZE}).
+
+%% Macros to extract information from st_type
+-define(ELF_ST_BIND(I), (I bsr 4) ).
+-define(ELF_ST_TYPE(I), (I band 16#f) ).
+-define(ELF_ST_INFO(B,T), (B bsl 4 + T band 16#f) ).
+
+%% Symbol Bindings
+-define(STB_LOCAL, 0).
+-define(STB_GLOBAL, 1).
+-define(STB_WEAK, 2).
+-define(STB_LOOS, 10).
+-define(STB_HIOS, 12).
+-define(STB_LOPROC, 13).
+-define(STB_HIPROC, 15).
+
+%% Symbol Types
+-define(STT_NOTYPE, 0).
+-define(STT_OBJECT, 1).
+-define(STT_FUNC, 2).
+-define(STT_SECTION, 3).
+-define(STT_FILE, 4).
+-define(STT_LOOS, 10).
+-define(STT_HIOS, 12).
+-define(STT_LOPROC, 13).
+-define(STT_HIPROC, 15).
+
+%%------------------------------------------------------------------------------
+%% ELF Relocation Entries
+%%------------------------------------------------------------------------------
+-define(ELF_REL_SIZE, (?R_OFFSET_SIZE + ?R_INFO_SIZE) ).
+-define(ELF_RELA_SIZE, (?R_OFFSET_SIZE + ?R_INFO_SIZE + ?R_ADDEND_SIZE) ).
+
+-define(R_OFFSET_SIZE, ?ELF_ADDR_SIZE).
+-define(R_INFO_SIZE, ?ELF_XWORD_SIZE).
+-define(R_ADDEND_SIZE, ?ELF_SXWORD_SIZE).
+
+%% Arithmetics for computing byte offsets in a Relocation entry binary
+-define(R_OFFSET_OFFSET, 0).
+-define(R_INFO_OFFSET, (?R_OFFSET_OFFSET + ?R_OFFSET_SIZE) ).
+-define(R_ADDEND_OFFSET, (?R_INFO_OFFSET + ?R_INFO_SIZE) ).
+
+%% Name aliases for Relocation field information
+-define(R_OFFSET, {?R_OFFSET_OFFSET, ?R_OFFSET_SIZE}).
+-define(R_INFO, {?R_INFO_OFFSET, ?R_INFO_SIZE}).
+-define(R_ADDEND, {?R_ADDEND_OFFSET, ?R_ADDEND_SIZE}).
+
+%% Useful macros to extract information from r_info field
+%%XXX: Included in either elf32_format or elf64_format.
+
+%%------------------------------------------------------------------------------
+%% ELF Program Header Table
+%%------------------------------------------------------------------------------
+-define(ELF_PHDR_SIZE, (?P_TYPE_SIZE + ?P_FLAGS_SIZE + ?P_OFFSET_SIZE
+ +?P_VADDR_SIZE + ?P_PADDR_SIZE + ?P_FILESZ_SIZE
+ +?P_MEMSZ_SIZE + ?P_ALIGN_SIZE) ).
+
+-define(P_TYPE_SIZE, ?ELF_WORD_SIZE).
+-define(P_FLAGS_SIZE, ?ELF_WORD_SIZE).
+-define(P_OFFSET_SIZE, ?ELF_OFF_SIZE).
+-define(P_VADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(P_PADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(P_FILESZ_SIZE, ?ELF_XWORD_SIZE).
+-define(P_MEMSZ_SIZE, ?ELF_XWORD_SIZE).
+-define(P_ALIGN_SIZE, ?ELF_XWORD_SIZE).
+
+%% Offsets of various fields in a Program Header Table entry binary.
+%%XXX: Included in either elf32_format or elf64_format.
+
+%% Name aliases for each Program Header Table entry field information.
+-define(P_TYPE, {?P_TYPE_OFFSET, ?P_TYPE_SIZE} ).
+-define(P_FLAGS, {?P_FLAGS_OFFSET, ?P_FLAGS_SIZE} ).
+-define(P_OFFSET, {?P_OFFSET_OFFSET, ?P_OFFSET_SIZE} ).
+-define(P_VADDR, {?P_VADDR_OFFSET, ?P_VADDR_SIZE} ).
+-define(P_PADDR, {?P_PADDR_OFFSET, ?P_PADDR_SIZE} ).
+-define(P_FILESZ, {?P_FILESZ_OFFSET, ?P_FILESZ_SIZE} ).
+-define(P_MEMSZ, {?P_MEMSZ_OFFSET, ?P_MEMSZ_SIZE} ).
+-define(P_ALIGN, {?P_ALIGN_OFFSET, ?P_ALIGN_SIZE} ).
+
+%% Segment Types (p_type)
+-define(PT_NULL, 0).
+-define(PT_LOAD, 1).
+-define(PT_DYNAMIC, 2).
+-define(PT_INTERP, 3).
+-define(PT_NOTE, 4).
+-define(PT_SHLIB, 5).
+-define(PT_PHDR, 6).
+-define(PT_LOOS, 16#60000000).
+-define(PT_HIOS, 16#6FFFFFFF).
+-define(PT_LOPROC, 16#70000000).
+-define(PT_HIPROC, 16#7FFFFFFF).
+
+%% Segment Attributes (p_flags)
+-define(PF_X, 16#1).
+-define(PF_W, 16#2).
+-define(PF_R, 16#4).
+-define(PF_MASKOS, 16#00FF0000).
+-define(PF_MASKPROC, 16#FF000000).
+
+%%------------------------------------------------------------------------------
+%% ELF Dynamic Table
+%%------------------------------------------------------------------------------
+-define(ELF_DYN_SIZE, (?D_TAG_SIZE + ?D_VAL_PTR_SIZE) ).
+
+-define(D_TAG_SIZE, ?ELF_SXWORD_SIZE).
+-define(D_VAL_PTR_SIZE, ?ELF_ADDR_SIZE).
+
+%% Offsets of each field in Dynamic Table entry in binary
+-define(D_TAG_OFFSET, 0).
+-define(D_VAL_PTR_OFFSET, (?D_TAG_OFFSET + ?D_TAG_SIZE)).
+
+%% Name aliases for each field of a Dynamic Table entry information
+-define(D_TAG, {?D_TAG_OFFSET, ?D_TAG_SIZE} ).
+-define(D_VAL_PTR, {?D_VAL_PTR_OFFSET, ?D_VAL_PTR_SIZE} ).
+
+%% Dynamic Table Entries
+-define(DT_NULL, 0).
+-define(DT_NEEDED, 1).
+-define(DT_PLTRELSZ, 2).
+-define(DT_PLTGOT, 3).
+-define(DT_HASH, 4).
+-define(DT_STRTAB, 5).
+-define(DT_SYMTAB, 6).
+-define(DT_RELA, 7).
+-define(DT_RELASZ, 8).
+-define(DT_RELAENT, 9).
+-define(DT_STRSZ, 10).
+-define(DT_SYMENT, 11).
+-define(DT_INIT, 12).
+-define(DT_FINI, 13).
+-define(DT_SONAME, 14).
+-define(DT_RPATH, 15).
+-define(DT_SYMBOLIC, 16).
+-define(DT_REL, 17).
+-define(DT_RELSZ, 18).
+-define(DT_RELENT, 19).
+-define(DT_PLTREL, 20).
+-define(DT_DEBUG, 21).
+-define(DT_TEXTREL, 22).
+-define(DT_JMPREL, 23).
+-define(DT_BIND_NOW, 24).
+-define(DT_INIT_ARRAY, 25).
+-define(DT_FINI_ARRAY, 26).
+-define(DT_INIT_ARRAYSZ, 27).
+-define(DT_FINI_ARRAYSZ, 28).
+-define(DT_LOOS, 16#60000000).
+-define(DT_HIOS, 16#6FFFFFFF).
+-define(DT_LOPROC, 16#700000000).
+-define(DT_HIPROC, 16#7FFFFFFFF).
+
+%%------------------------------------------------------------------------------
+%% ELF GCC Exception Table
+%%------------------------------------------------------------------------------
+
+%% The DWARF Exception Header Encoding is used to describe the type of data used
+%% in the .eh_frame_hdr (and .gcc_except_table) section. The upper 4 bits
+%% indicate how the value is to be applied. The lower 4 bits indicate the format
+%% of the data.
+
+%% DWARF Exception Header value format
+-define(DW_EH_PE_omit, 16#ff). % No value is present.
+-define(DW_EH_PE_uleb128, 16#01). % Unsigned value encoded using LEB128.
+-define(DW_EH_PE_udata2, 16#02). % A 2 bytes unsigned value.
+-define(DW_EH_PE_udata4, 16#03). % A 4 bytes unsigned value.
+-define(DW_EH_PE_udata8, 16#04). % An 8 bytes unsigned value.
+-define(DW_EH_PE_sleb128, 16#09). % Signed value encoded using LEB128.
+-define(DW_EH_PE_sdata2, 16#0a). % A 2 bytes signed value.
+-define(DW_EH_PE_sdata4, 16#0b). % A 4 bytes signed value.
+-define(DW_EH_PE_sdata8, 16#0c). % An 8 bytes signed value.
+
+%% DWARF Exception Header application
+-define(DW_EH_PE_absptr, 16#00). % Value is used with no modification.
+-define(DW_EH_PE_pcrel, 16#10). % Value is relative to the current PC.
+-define(DW_EH_PE_datarel, 16#30). % Value is relative to the beginning of the
+ % section.
+
+%%------------------------------------------------------------------------------
+%% ELF Read-only data (constants, literlas etc.)
+%%------------------------------------------------------------------------------
+-define(RO_ENTRY_SIZE, 8).
+
+%%------------------------------------------------------------------------------
+%% Custom Note section: ".note.gc" for Erlang GC
+%%------------------------------------------------------------------------------
+
+%% The structure of this section is the following:
+%%
+%% .short <n> # number of safe points in code
+%%
+%% .long .L<label1> # safe point address |
+%% .long .L<label2> # safe point address |-> safe point addrs
+%% ..... |
+%% .long .L<label3> # safe point address |
+%%
+%% .short <n> # stack frame size (in words) |-> fixed-size part
+%% .short <n> # stack arity |
+%% .short <n> # number of live roots that follow |
+%%
+%% .short <n> # live root's stack index |
+%% ..... |-> live root indices
+%% .short <n> # >> |
+
+%% The name of the custom Note Section
+-define(NOTE_ERLGC_NAME, ".gc").
+
+%% The first word of a Note Section for Erlang GC (".note.gc") is always the
+%% number of safepoints in code.
+-define(SP_COUNT, {?SP_COUNT_OFFSET, ?SP_COUNT_SIZE}).
+-define(SP_COUNT_SIZE, ?ELF_HALF_SIZE).
+-define(SP_COUNT_OFFSET, 0). %(always the first entry in sdesc)
+
+%% The fixed-size part of a safe point (SP) entry consists of 4 words: the SP
+%% address (offset in code), the stack frame size of the function (where the SP
+%% is located), the stack arity of the function (the registered values are *not*
+%% counted), the number of live roots in the specific SP.
+-define(SP_FIXED, {?SP_FIXED_OFF, ?SP_FIXED_SIZE}).
+-define(SP_FIXED_OFF, 0).
+%%XXX: Exclude SP_ADDR_SIZE from SP_FIXED_SIZE in lew of new GC layout
+-define(SP_FIXED_SIZE, (?SP_STKFRAME_SIZE + ?SP_STKARITY_SIZE
+ + ?SP_LIVEROOTCNT_SIZE)).
+
+-define(SP_ADDR_SIZE, ?ELF_WORD_SIZE).
+-define(SP_STKFRAME_SIZE, ?ELF_HALF_SIZE).
+-define(SP_STKARITY_SIZE, ?ELF_HALF_SIZE).
+-define(SP_LIVEROOTCNT_SIZE, ?ELF_HALF_SIZE).
+
+%%XXX: SP_STKFRAME is the first piece of information in the new GC layout
+-define(SP_STKFRAME_OFFSET, 0).
+-define(SP_STKARITY_OFFSET, (?SP_STKFRAME_OFFSET + ?SP_STKFRAME_SIZE) ).
+-define(SP_LIVEROOTCNT_OFFSET, (?SP_STKARITY_OFFSET + ?SP_STKARITY_SIZE) ).
+
+%% Name aliases for safepoint fields.
+-define(SP_STKFRAME, {?SP_STKFRAME_OFFSET, ?SP_STKFRAME_SIZE}).
+-define(SP_STKARITY, {?SP_STKARITY_OFFSET, ?SP_STKARITY_SIZE}).
+-define(SP_LIVEROOTCNT, {?SP_LIVEROOTCNT_OFFSET, ?SP_LIVEROOTCNT_SIZE}).
+
+%% After the fixed-size part a variable-size part exists. This part holds the
+%% stack frame index of every live root in the specific SP.
+-define(LR_STKINDEX_SIZE, ?ELF_HALF_SIZE).
+
+%%------------------------------------------------------------------------------
+%% Misc.
+%%------------------------------------------------------------------------------
+-define(bits(Bytes), ((Bytes) bsl 3)).
diff --git a/lib/hipe/llvm/hipe_llvm.erl b/lib/hipe/llvm/hipe_llvm.erl
new file mode 100644
index 0000000000..5e33731a2b
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm.erl
@@ -0,0 +1,1131 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(hipe_llvm).
+
+-export([
+ mk_ret/1,
+ ret_ret_list/1,
+
+ mk_br/1,
+ br_dst/1,
+
+ mk_br_cond/3,
+ mk_br_cond/4,
+ br_cond_cond/1,
+ br_cond_true_label/1,
+ br_cond_false_label/1,
+ br_cond_meta/1,
+
+ mk_indirectbr/3,
+ indirectbr_type/1,
+ indirectbr_address/1,
+ indirectbr_label_list/1,
+
+ mk_switch/4,
+ switch_type/1,
+ switch_value/1,
+ switch_default_label/1,
+ switch_value_label_list/1,
+
+ mk_invoke/9,
+ invoke_dst/1,
+ invoke_cconv/1,
+ invoke_ret_attrs/1,
+ invoke_type/1,
+ invoke_fnptrval/1,
+ invoke_arglist/1,
+ invoke_fn_attrs/1,
+ invoke_to_label/1,
+ invoke_unwind_label/1,
+
+ mk_operation/6,
+ operation_dst/1,
+ operation_op/1,
+ operation_type/1,
+ operation_src1/1,
+ operation_src2/1,
+ operation_options/1,
+
+ mk_extractvalue/5,
+ extractvalue_dst/1,
+ extractvalue_type/1,
+ extractvalue_val/1,
+ extractvalue_idx/1,
+ extractvalue_idxs/1,
+
+ mk_insertvalue/7,
+ insertvalue_dst/1,
+ insertvalue_val_type/1,
+ insertvalue_val/1,
+ insertvalue_elem_type/1,
+ insertvalue_elem/1,
+ insertvalue_idx/1,
+ insertvalue_idxs/1,
+
+ mk_alloca/4,
+ alloca_dst/1,
+ alloca_type/1,
+ alloca_num/1,
+ alloca_align/1,
+
+ mk_load/6,
+ load_dst/1,
+ load_p_type/1,
+ load_pointer/1,
+ load_alignment/1,
+ load_nontemporal/1,
+ load_volatile/1,
+
+ mk_store/7,
+ store_type/1,
+ store_value/1,
+ store_p_type/1,
+ store_pointer/1,
+ store_alignment/1,
+ store_nontemporal/1,
+ store_volatile/1,
+
+ mk_getelementptr/5,
+ getelementptr_dst/1,
+ getelementptr_p_type/1,
+ getelementptr_value/1,
+ getelementptr_typed_idxs/1,
+ getelementptr_inbounds/1,
+
+ mk_conversion/5,
+ conversion_dst/1,
+ conversion_op/1,
+ conversion_src_type/1,
+ conversion_src/1,
+ conversion_dst_type/1,
+
+ mk_sitofp/4,
+ sitofp_dst/1,
+ sitofp_src_type/1,
+ sitofp_src/1,
+ sitofp_dst_type/1,
+
+ mk_ptrtoint/4,
+ ptrtoint_dst/1,
+ ptrtoint_src_type/1,
+ ptrtoint_src/1,
+ ptrtoint_dst_type/1,
+
+ mk_inttoptr/4,
+ inttoptr_dst/1,
+ inttoptr_src_type/1,
+ inttoptr_src/1,
+ inttoptr_dst_type/1,
+
+ mk_icmp/5,
+ icmp_dst/1,
+ icmp_cond/1,
+ icmp_type/1,
+ icmp_src1/1,
+ icmp_src2/1,
+
+ mk_fcmp/5,
+ fcmp_dst/1,
+ fcmp_cond/1,
+ fcmp_type/1,
+ fcmp_src1/1,
+ fcmp_src2/1,
+
+ mk_phi/3,
+ phi_dst/1,
+ phi_type/1,
+ phi_value_label_list/1,
+
+ mk_select/6,
+ select_dst/1,
+ select_cond/1,
+ select_typ1/1,
+ select_val1/1,
+ select_typ2/1,
+ select_val2/1,
+
+ mk_call/8,
+ call_dst/1,
+ call_is_tail/1,
+ call_cconv/1,
+ call_ret_attrs/1,
+ call_type/1,
+ call_fnptrval/1,
+ call_arglist/1,
+ call_fn_attrs/1,
+
+ mk_fun_def/10,
+ fun_def_linkage/1,
+ fun_def_visibility/1,
+ fun_def_cconv/1,
+ fun_def_ret_attrs/1,
+ fun_def_type/1,
+ fun_def_name/1,
+ fun_def_arglist/1,
+ fun_def_fn_attrs/1,
+ fun_def_align/1,
+ fun_def_body/1,
+
+ mk_fun_decl/8,
+ fun_decl_linkage/1,
+ fun_decl_visibility/1,
+ fun_decl_cconv/1,
+ fun_decl_ret_attrs/1,
+ fun_decl_type/1,
+ fun_decl_name/1,
+ fun_decl_arglist/1,
+ fun_decl_align/1,
+
+ mk_landingpad/0,
+
+ mk_comment/1,
+ comment_text/1,
+
+ mk_label/1,
+ label_label/1,
+ is_label/1,
+
+ mk_const_decl/4,
+ const_decl_dst/1,
+ const_decl_decl_type/1,
+ const_decl_type/1,
+ const_decl_value/1,
+
+ mk_asm/1,
+ asm_instruction/1,
+
+ mk_adj_stack/3,
+ adj_stack_offset/1,
+ 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
+ ]).
+
+-export([
+ mk_void/0,
+
+ mk_label_type/0,
+
+ mk_int/1,
+ int_width/1,
+
+ mk_double/0,
+
+ mk_pointer/1,
+ pointer_type/1,
+
+ mk_array/2,
+ array_size/1,
+ array_type/1,
+
+ mk_vector/2,
+ vector_size/1,
+ vector_type/1,
+
+ mk_struct/1,
+ struct_type_list/1,
+
+ mk_fun/2,
+ function_ret_type/1,
+ function_arg_type_list/1
+ ]).
+
+-export([pp_ins_list/2, pp_ins/2]).
+
+
+%%-----------------------------------------------------------------------------
+%% Abstract Data Types for LLVM Assembly.
+%%-----------------------------------------------------------------------------
+
+%% Terminator Instructions
+-record(llvm_ret, {ret_list=[]}).
+-type llvm_ret() :: #llvm_ret{}.
+
+-record(llvm_br, {dst}).
+-type llvm_br() :: #llvm_br{}.
+
+-record(llvm_br_cond, {'cond', true_label, false_label, meta=[]}).
+-type llvm_br_cond() :: #llvm_br_cond{}.
+
+-record(llvm_indirectbr, {type, address, label_list}).
+-type llvm_indirectbr() :: #llvm_indirectbr{}.
+
+-record(llvm_switch, {type, value, default_label, value_label_list=[]}).
+-type llvm_switch() :: #llvm_switch{}.
+
+-record(llvm_invoke, {dst, cconv=[], ret_attrs=[], type, fnptrval, arglist=[],
+ fn_attrs=[], to_label, unwind_label}).
+-type llvm_invoke() :: #llvm_invoke{}.
+
+%% Binary Operations
+-record(llvm_operation, {dst, op, type, src1, src2, options=[]}).
+-type llvm_operation() :: #llvm_operation{}.
+
+%% Aggregate Operations
+-record(llvm_extractvalue, {dst, type, val, idx, idxs=[]}).
+-type llvm_extractvalue() :: #llvm_extractvalue{}.
+
+-record(llvm_insertvalue, {dst, val_type, val, elem_type, elem, idx, idxs=[]}).
+-type llvm_insertvalue() :: #llvm_insertvalue{}.
+
+%% Memory Access and Addressing Operations
+-record(llvm_alloca, {dst, type, num=[], align=[]}).
+-type llvm_alloca() :: #llvm_alloca{}.
+
+-record(llvm_load, {dst, p_type, pointer, alignment=[], nontemporal=[],
+ volatile=false}).
+-type llvm_load() :: #llvm_load{}.
+
+-record(llvm_store, {type, value, p_type, pointer, alignment=[],
+ nontemporal=[], volatile=false}).
+-type llvm_store() :: #llvm_store{}.
+
+-record(llvm_getelementptr, {dst, p_type, value, typed_idxs, inbounds}).
+-type llvm_getelementptr() :: #llvm_getelementptr{}.
+
+%% Conversion Operations
+-record(llvm_conversion, {dst, op, src_type, src, dst_type}).
+-type llvm_conversion() :: #llvm_conversion{}.
+
+-record(llvm_sitofp, {dst, src_type, src, dst_type}).
+-type llvm_sitofp() :: #llvm_sitofp{}.
+
+-record(llvm_ptrtoint, {dst, src_type, src, dst_type}).
+-type llvm_ptrtoint() :: #llvm_ptrtoint{}.
+
+-record(llvm_inttoptr, {dst, src_type, src, dst_type}).
+-type llvm_inttoptr() :: #llvm_inttoptr{}.
+
+%% Other Operations
+-record(llvm_icmp, {dst, 'cond', type, src1, src2}).
+-type llvm_icmp() :: #llvm_icmp{}.
+
+-record(llvm_fcmp, {dst, 'cond', type, src1, src2}).
+-type llvm_fcmp() :: #llvm_fcmp{}.
+
+-record(llvm_phi, {dst, type, value_label_list}).
+-type llvm_phi() :: #llvm_phi{}.
+
+-record(llvm_select, {dst, 'cond', typ1, val1, typ2, val2}).
+-type llvm_select() :: #llvm_select{}.
+
+-record(llvm_call, {dst=[], is_tail = false, cconv = [], ret_attrs = [], type,
+ fnptrval, arglist = [], fn_attrs = []}).
+-type llvm_call() :: #llvm_call{}.
+
+-record(llvm_fun_def, {linkage=[], visibility=[], cconv=[], ret_attrs=[],
+ type, 'name', arglist=[], fn_attrs=[], align=[], body=[]}).
+-type llvm_fun_def() :: #llvm_fun_def{}.
+
+-record(llvm_fun_decl, {linkage=[], visibility=[], cconv=[], ret_attrs=[],
+ type, 'name', arglist=[], align=[]}).
+-type llvm_fun_decl() :: #llvm_fun_decl{}.
+
+-record(llvm_landingpad, {}).
+-type llvm_landingpad() :: #llvm_landingpad{}.
+
+-record(llvm_comment, {text}).
+-type llvm_comment() :: #llvm_comment{}.
+
+-record(llvm_label, {label}).
+-type llvm_label() :: #llvm_label{}.
+
+-record(llvm_const_decl, {dst, decl_type, type, value}).
+-type llvm_const_decl() :: #llvm_const_decl{}.
+
+-record(llvm_asm, {instruction}).
+-type llvm_asm() :: #llvm_asm{}.
+
+-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{}.
+
+%% A type for any LLVM instruction
+-type llvm_instr() :: llvm_ret() | llvm_br() | llvm_br_cond()
+ | llvm_indirectbr() | llvm_switch() | llvm_invoke()
+ | llvm_operation() | llvm_extractvalue()
+ | llvm_insertvalue() | llvm_alloca() | llvm_load()
+ | llvm_store() | llvm_getelementptr() | llvm_conversion()
+ | llvm_sitofp() | llvm_ptrtoint() | llvm_inttoptr()
+ | llvm_icmp() | llvm_fcmp() | llvm_phi() | llvm_select()
+ | 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().
+
+%% Types
+-record(llvm_void, {}).
+%-type llvm_void() :: #llvm_void{}.
+
+-record(llvm_label_type, {}).
+%-type llvm_label_type() :: #llvm_label_type{}.
+
+-record(llvm_int, {width}).
+%-type llvm_int() :: #llvm_int{}.
+
+-record(llvm_float, {}).
+%-type llvm_float() :: #llvm_float{}.
+
+-record(llvm_double, {}).
+%-type llvm_double() :: #llvm_double{}.
+
+-record(llvm_fp80, {}).
+%-type llvm_fp80() :: #llvm_fp80{}.
+
+-record(llvm_fp128, {}).
+%-type llvm_fp128() :: #llvm_fp128{}.
+
+-record(llvm_ppc_fp128, {}).
+%-type llvm_ppc_fp128() :: #llvm_ppc_fp128{}.
+
+-record(llvm_pointer, {type}).
+%-type llvm_pointer() :: #llvm_pointer{}.
+
+-record(llvm_vector, {'size', type}).
+%-type llvm_vector() :: #llvm_vector{}.
+
+-record(llvm_struct, {type_list}).
+%-type llvm_struct() :: #llvm_struct{}.
+
+-record(llvm_array, {'size', type}).
+%-type llvm_array() :: #llvm_array{}.
+
+-record(llvm_fun, {ret_type, arg_type_list}).
+%-type llvm_fun() :: #llvm_fun{}.
+
+%%-----------------------------------------------------------------------------
+%% Accessor Functions
+%%-----------------------------------------------------------------------------
+
+%% ret
+mk_ret(Ret_list) -> #llvm_ret{ret_list=Ret_list}.
+ret_ret_list(#llvm_ret{ret_list=Ret_list}) -> Ret_list.
+
+%% br
+mk_br(Dst) -> #llvm_br{dst=Dst}.
+br_dst(#llvm_br{dst=Dst}) -> Dst.
+
+%% br_cond
+mk_br_cond(Cond, True_label, False_label) ->
+ #llvm_br_cond{'cond'=Cond, true_label=True_label, false_label=False_label}.
+mk_br_cond(Cond, True_label, False_label, Metadata) ->
+ #llvm_br_cond{'cond'=Cond, true_label=True_label, false_label=False_label,
+ meta=Metadata}.
+br_cond_cond(#llvm_br_cond{'cond'=Cond}) -> Cond.
+br_cond_true_label(#llvm_br_cond{true_label=True_label}) -> True_label.
+br_cond_false_label(#llvm_br_cond{false_label=False_label}) ->
+ False_label.
+br_cond_meta(#llvm_br_cond{meta=Metadata}) -> Metadata.
+
+%% indirectbr
+mk_indirectbr(Type, Address, Label_list) -> #llvm_indirectbr{type=Type, address=Address, label_list=Label_list}.
+indirectbr_type(#llvm_indirectbr{type=Type}) -> Type.
+indirectbr_address(#llvm_indirectbr{address=Address}) -> Address.
+indirectbr_label_list(#llvm_indirectbr{label_list=Label_list}) -> Label_list.
+
+%% invoke
+mk_invoke(Dst, Cconv, Ret_attrs, Type, Fnptrval, Arglist, Fn_attrs, To_label, Unwind_label) ->
+ #llvm_invoke{dst=Dst, cconv=Cconv, ret_attrs=Ret_attrs, type=Type,
+ fnptrval=Fnptrval, arglist=Arglist, fn_attrs=Fn_attrs, to_label=To_label,
+ unwind_label=Unwind_label}.
+invoke_dst(#llvm_invoke{dst=Dst}) -> Dst.
+invoke_cconv(#llvm_invoke{cconv=Cconv}) -> Cconv.
+invoke_ret_attrs(#llvm_invoke{ret_attrs=Ret_attrs}) -> Ret_attrs.
+invoke_type(#llvm_invoke{type=Type}) -> Type.
+invoke_fnptrval(#llvm_invoke{fnptrval=Fnptrval}) -> Fnptrval.
+invoke_arglist(#llvm_invoke{arglist=Arglist}) -> Arglist.
+invoke_fn_attrs(#llvm_invoke{fn_attrs=Fn_attrs}) -> Fn_attrs.
+invoke_to_label(#llvm_invoke{to_label=To_label}) -> To_label.
+invoke_unwind_label(#llvm_invoke{unwind_label=Unwind_label}) -> Unwind_label.
+
+%% switch
+mk_switch(Type, Value, Default_label, Value_label_list) ->
+ #llvm_switch{type=Type, value=Value, default_label=Default_label,
+ value_label_list=Value_label_list}.
+switch_type(#llvm_switch{type=Type}) -> Type.
+switch_value(#llvm_switch{value=Value}) -> Value.
+switch_default_label(#llvm_switch{default_label=Default_label}) ->
+ Default_label.
+switch_value_label_list(#llvm_switch{value_label_list=Value_label_list}) ->
+ Value_label_list.
+
+%% operation
+mk_operation(Dst, Op, Type, Src1, Src2, Options) ->
+ #llvm_operation{dst=Dst, op=Op, type=Type, src1=Src1, src2=Src2,
+ options=Options}.
+operation_dst(#llvm_operation{dst=Dst}) -> Dst.
+operation_op(#llvm_operation{op=Op}) -> Op.
+operation_type(#llvm_operation{type=Type}) -> Type.
+operation_src1(#llvm_operation{src1=Src1}) -> Src1.
+operation_src2(#llvm_operation{src2=Src2}) -> Src2.
+operation_options(#llvm_operation{options=Options}) -> Options.
+
+%% extractvalue
+mk_extractvalue(Dst, Type, Val, Idx, Idxs) ->
+ #llvm_extractvalue{dst=Dst,type=Type,val=Val,idx=Idx,idxs=Idxs}.
+extractvalue_dst(#llvm_extractvalue{dst=Dst}) -> Dst.
+extractvalue_type(#llvm_extractvalue{type=Type}) -> Type.
+extractvalue_val(#llvm_extractvalue{val=Val}) -> Val.
+extractvalue_idx(#llvm_extractvalue{idx=Idx}) -> Idx.
+extractvalue_idxs(#llvm_extractvalue{idxs=Idxs}) -> Idxs.
+
+%% insertvalue
+mk_insertvalue(Dst, Val_type, Val, Elem_type, Elem, Idx, Idxs) ->
+ #llvm_insertvalue{dst=Dst, val_type=Val_type, val=Val, elem_type=Elem_type,
+ elem=Elem, idx=Idx, idxs=Idxs}.
+insertvalue_dst(#llvm_insertvalue{dst=Dst}) -> Dst.
+insertvalue_val_type(#llvm_insertvalue{val_type=Val_type}) -> Val_type.
+insertvalue_val(#llvm_insertvalue{val=Val}) -> Val.
+insertvalue_elem_type(#llvm_insertvalue{elem_type=Elem_type}) -> Elem_type.
+insertvalue_elem(#llvm_insertvalue{elem=Elem}) -> Elem.
+insertvalue_idx(#llvm_insertvalue{idx=Idx}) -> Idx.
+insertvalue_idxs(#llvm_insertvalue{idxs=Idxs}) -> Idxs.
+
+%% alloca
+mk_alloca(Dst, Type, Num, Align) ->
+ #llvm_alloca{dst=Dst, type=Type, num=Num, align=Align}.
+alloca_dst(#llvm_alloca{dst=Dst}) -> Dst.
+alloca_type(#llvm_alloca{type=Type}) -> Type.
+alloca_num(#llvm_alloca{num=Num}) -> Num.
+alloca_align(#llvm_alloca{align=Align}) -> Align.
+
+%% load
+mk_load(Dst, Type, Pointer, Alignment, Nontemporal, Volatile) ->
+ #llvm_load{dst=Dst, p_type=Type, pointer=Pointer, alignment=Alignment,
+ nontemporal=Nontemporal, volatile=Volatile}.
+load_dst(#llvm_load{dst=Dst}) -> Dst.
+load_p_type(#llvm_load{p_type=Type}) -> Type.
+load_pointer(#llvm_load{pointer=Pointer}) -> Pointer.
+load_alignment(#llvm_load{alignment=Alignment}) -> Alignment.
+load_nontemporal(#llvm_load{nontemporal=Nontemporal}) -> Nontemporal.
+load_volatile(#llvm_load{volatile=Volatile}) -> Volatile.
+
+%% store
+mk_store(Type, Value, P_Type, Pointer, Alignment, Nontemporal, Volatile) ->
+ #llvm_store{type=Type, value=Value, p_type=P_Type, pointer=Pointer, alignment=Alignment,
+ nontemporal=Nontemporal, volatile=Volatile}.
+store_type(#llvm_store{type=Type}) -> Type.
+store_value(#llvm_store{value=Value}) -> Value.
+store_p_type(#llvm_store{p_type=P_Type}) -> P_Type.
+store_pointer(#llvm_store{pointer=Pointer}) -> Pointer.
+store_alignment(#llvm_store{alignment=Alignment}) -> Alignment.
+store_nontemporal(#llvm_store{nontemporal=Nontemporal}) -> Nontemporal.
+store_volatile(#llvm_store{volatile=Volatile}) -> Volatile.
+
+%% getelementptr
+mk_getelementptr(Dst, P_Type, Value, Typed_Idxs, Inbounds) ->
+ #llvm_getelementptr{dst=Dst,p_type=P_Type, value=Value,
+ typed_idxs=Typed_Idxs, inbounds=Inbounds}.
+getelementptr_dst(#llvm_getelementptr{dst=Dst}) -> Dst.
+getelementptr_p_type(#llvm_getelementptr{p_type=P_Type}) -> P_Type.
+getelementptr_value(#llvm_getelementptr{value=Value}) -> Value.
+getelementptr_typed_idxs(#llvm_getelementptr{typed_idxs=Typed_Idxs}) -> Typed_Idxs.
+getelementptr_inbounds(#llvm_getelementptr{inbounds=Inbounds}) -> Inbounds.
+
+%% conversion
+mk_conversion(Dst, Op, Src_type, Src, Dst_type) ->
+ #llvm_conversion{dst=Dst, op=Op, src_type=Src_type, src=Src, dst_type=Dst_type}.
+conversion_dst(#llvm_conversion{dst=Dst}) -> Dst.
+conversion_op(#llvm_conversion{op=Op}) -> Op.
+conversion_src_type(#llvm_conversion{src_type=Src_type}) -> Src_type.
+conversion_src(#llvm_conversion{src=Src}) -> Src.
+conversion_dst_type(#llvm_conversion{dst_type=Dst_type}) -> Dst_type.
+
+%% sitofp
+mk_sitofp(Dst, Src_type, Src, Dst_type) ->
+ #llvm_sitofp{dst=Dst, src_type=Src_type, src=Src, dst_type=Dst_type}.
+sitofp_dst(#llvm_sitofp{dst=Dst}) -> Dst.
+sitofp_src_type(#llvm_sitofp{src_type=Src_type}) -> Src_type.
+sitofp_src(#llvm_sitofp{src=Src}) -> Src.
+sitofp_dst_type(#llvm_sitofp{dst_type=Dst_type}) -> Dst_type.
+
+%% ptrtoint
+mk_ptrtoint(Dst, Src_Type, Src, Dst_Type) ->
+ #llvm_ptrtoint{dst=Dst, src_type=Src_Type, src=Src, dst_type=Dst_Type}.
+ptrtoint_dst(#llvm_ptrtoint{dst=Dst}) -> Dst.
+ptrtoint_src_type(#llvm_ptrtoint{src_type=Src_Type}) -> Src_Type.
+ptrtoint_src(#llvm_ptrtoint{src=Src}) -> Src.
+ptrtoint_dst_type(#llvm_ptrtoint{dst_type=Dst_Type}) -> Dst_Type .
+
+%% inttoptr
+mk_inttoptr(Dst, Src_Type, Src, Dst_Type) ->
+ #llvm_inttoptr{dst=Dst, src_type=Src_Type, src=Src, dst_type=Dst_Type}.
+inttoptr_dst(#llvm_inttoptr{dst=Dst}) -> Dst.
+inttoptr_src_type(#llvm_inttoptr{src_type=Src_Type}) -> Src_Type.
+inttoptr_src(#llvm_inttoptr{src=Src}) -> Src.
+inttoptr_dst_type(#llvm_inttoptr{dst_type=Dst_Type}) -> Dst_Type .
+
+%% icmp
+mk_icmp(Dst, Cond, Type, Src1, Src2) ->
+ #llvm_icmp{dst=Dst,'cond'=Cond,type=Type,src1=Src1,src2=Src2}.
+icmp_dst(#llvm_icmp{dst=Dst}) -> Dst.
+icmp_cond(#llvm_icmp{'cond'=Cond}) -> Cond.
+icmp_type(#llvm_icmp{type=Type}) -> Type.
+icmp_src1(#llvm_icmp{src1=Src1}) -> Src1.
+icmp_src2(#llvm_icmp{src2=Src2}) -> Src2.
+
+%% fcmp
+mk_fcmp(Dst, Cond, Type, Src1, Src2) ->
+ #llvm_fcmp{dst=Dst,'cond'=Cond,type=Type,src1=Src1,src2=Src2}.
+fcmp_dst(#llvm_fcmp{dst=Dst}) -> Dst.
+fcmp_cond(#llvm_fcmp{'cond'=Cond}) -> Cond.
+fcmp_type(#llvm_fcmp{type=Type}) -> Type.
+fcmp_src1(#llvm_fcmp{src1=Src1}) -> Src1.
+fcmp_src2(#llvm_fcmp{src2=Src2}) -> Src2.
+
+%% phi
+mk_phi(Dst, Type, Value_label_list) ->
+ #llvm_phi{dst=Dst, type=Type,value_label_list=Value_label_list}.
+phi_dst(#llvm_phi{dst=Dst}) -> Dst.
+phi_type(#llvm_phi{type=Type}) -> Type.
+phi_value_label_list(#llvm_phi{value_label_list=Value_label_list}) ->
+ Value_label_list.
+
+%% select
+mk_select(Dst, Cond, Typ1, Val1, Typ2, Val2) ->
+ #llvm_select{dst=Dst, 'cond'=Cond, typ1=Typ1, val1=Val1, typ2=Typ2, val2=Val2}.
+select_dst(#llvm_select{dst=Dst}) -> Dst.
+select_cond(#llvm_select{'cond'=Cond}) -> Cond.
+select_typ1(#llvm_select{typ1=Typ1}) -> Typ1.
+select_val1(#llvm_select{val1=Val1}) -> Val1.
+select_typ2(#llvm_select{typ2=Typ2}) -> Typ2.
+select_val2(#llvm_select{val2=Val2}) -> Val2.
+
+%% call
+mk_call(Dst, Is_tail, Cconv, Ret_attrs, Type, Fnptrval, Arglist, Fn_attrs) ->
+ #llvm_call{dst=Dst, is_tail=Is_tail, cconv=Cconv, ret_attrs=Ret_attrs,
+ type=Type, fnptrval=Fnptrval, arglist=Arglist, fn_attrs=Fn_attrs}.
+call_dst(#llvm_call{dst=Dst}) -> Dst.
+call_is_tail(#llvm_call{is_tail=Is_tail}) -> Is_tail.
+call_cconv(#llvm_call{cconv=Cconv}) -> Cconv.
+call_ret_attrs(#llvm_call{ret_attrs=Ret_attrs}) -> Ret_attrs.
+call_type(#llvm_call{type=Type}) -> Type.
+call_fnptrval(#llvm_call{fnptrval=Fnptrval}) -> Fnptrval.
+call_arglist(#llvm_call{arglist=Arglist}) -> Arglist.
+call_fn_attrs(#llvm_call{fn_attrs=Fn_attrs}) -> Fn_attrs.
+
+%% fun_def
+mk_fun_def(Linkage, Visibility, Cconv, Ret_attrs, Type, Name, Arglist,
+ Fn_attrs, Align, Body) ->
+ #llvm_fun_def{
+ linkage=Linkage,
+ visibility=Visibility,
+ cconv=Cconv,
+ ret_attrs=Ret_attrs,
+ type=Type,
+ 'name'=Name,
+ arglist=Arglist,
+ fn_attrs=Fn_attrs,
+ align=Align,
+ body=Body
+ }.
+
+fun_def_linkage(#llvm_fun_def{linkage=Linkage}) -> Linkage.
+fun_def_visibility(#llvm_fun_def{visibility=Visibility}) -> Visibility.
+fun_def_cconv(#llvm_fun_def{cconv=Cconv}) -> Cconv .
+fun_def_ret_attrs(#llvm_fun_def{ret_attrs=Ret_attrs}) -> Ret_attrs.
+fun_def_type(#llvm_fun_def{type=Type}) -> Type.
+fun_def_name(#llvm_fun_def{'name'=Name}) -> Name.
+fun_def_arglist(#llvm_fun_def{arglist=Arglist}) -> Arglist.
+fun_def_fn_attrs(#llvm_fun_def{fn_attrs=Fn_attrs}) -> Fn_attrs.
+fun_def_align(#llvm_fun_def{align=Align}) -> Align.
+fun_def_body(#llvm_fun_def{body=Body}) -> Body.
+
+%% fun_decl
+mk_fun_decl(Linkage, Visibility, Cconv, Ret_attrs, Type, Name, Arglist, Align)->
+ #llvm_fun_decl{
+ linkage=Linkage,
+ visibility=Visibility,
+ cconv=Cconv,
+ ret_attrs=Ret_attrs,
+ type=Type,
+ 'name'=Name,
+ arglist=Arglist,
+ align=Align
+ }.
+
+fun_decl_linkage(#llvm_fun_decl{linkage=Linkage}) -> Linkage.
+fun_decl_visibility(#llvm_fun_decl{visibility=Visibility}) -> Visibility.
+fun_decl_cconv(#llvm_fun_decl{cconv=Cconv}) -> Cconv .
+fun_decl_ret_attrs(#llvm_fun_decl{ret_attrs=Ret_attrs}) -> Ret_attrs.
+fun_decl_type(#llvm_fun_decl{type=Type}) -> Type.
+fun_decl_name(#llvm_fun_decl{'name'=Name}) -> Name.
+fun_decl_arglist(#llvm_fun_decl{arglist=Arglist}) -> Arglist.
+fun_decl_align(#llvm_fun_decl{align=Align}) -> Align.
+
+%% landingpad
+mk_landingpad() -> #llvm_landingpad{}.
+
+%% comment
+mk_comment(Text) -> #llvm_comment{text=Text}.
+comment_text(#llvm_comment{text=Text}) -> Text.
+
+%% label
+mk_label(Label) -> #llvm_label{label=Label}.
+label_label(#llvm_label{label=Label}) -> Label.
+
+-spec is_label(llvm_instr()) -> boolean().
+is_label(#llvm_label{}) -> true;
+is_label(#llvm_ret{}) -> false;
+is_label(#llvm_br{}) -> false;
+is_label(#llvm_br_cond{}) -> false;
+is_label(#llvm_indirectbr{}) -> false;
+is_label(#llvm_switch{}) -> false;
+is_label(#llvm_invoke{}) -> false;
+is_label(#llvm_operation{}) -> false;
+is_label(#llvm_extractvalue{}) -> false;
+is_label(#llvm_insertvalue{}) -> false;
+is_label(#llvm_alloca{}) -> false;
+is_label(#llvm_load{}) -> false;
+is_label(#llvm_store{}) -> false;
+is_label(#llvm_getelementptr{}) -> false;
+is_label(#llvm_conversion{}) -> false;
+is_label(#llvm_sitofp{}) -> false;
+is_label(#llvm_ptrtoint{}) -> false;
+is_label(#llvm_inttoptr{}) -> false;
+is_label(#llvm_icmp{}) -> false;
+is_label(#llvm_fcmp{}) -> false;
+is_label(#llvm_phi{}) -> false;
+is_label(#llvm_select{}) -> false;
+is_label(#llvm_call{}) -> false;
+is_label(#llvm_fun_def{}) -> false;
+is_label(#llvm_fun_decl{}) -> false;
+is_label(#llvm_landingpad{}) -> false;
+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.
+
+%% const_decl
+mk_const_decl(Dst, Decl_type, Type, Value) ->
+ #llvm_const_decl{dst=Dst, decl_type=Decl_type, type=Type, value=Value}.
+const_decl_dst(#llvm_const_decl{dst=Dst}) -> Dst.
+const_decl_decl_type(#llvm_const_decl{decl_type=Decl_type}) -> Decl_type.
+const_decl_type(#llvm_const_decl{type=Type}) -> Type.
+const_decl_value(#llvm_const_decl{value=Value}) -> Value.
+
+%% asm
+mk_asm(Instruction) -> #llvm_asm{instruction=Instruction}.
+asm_instruction(#llvm_asm{instruction=Instruction}) -> Instruction.
+
+%% adj_stack
+mk_adj_stack(Offset, Register, Type) ->
+ #llvm_adj_stack{offset=Offset, 'register'=Register, type=Type}.
+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.
+
+%% types
+mk_void() -> #llvm_void{}.
+
+mk_label_type() -> #llvm_label_type{}.
+
+mk_int(Width) -> #llvm_int{width=Width}.
+int_width(#llvm_int{width=Width}) -> Width.
+
+mk_double() -> #llvm_double{}.
+
+mk_pointer(Type) -> #llvm_pointer{type=Type}.
+pointer_type(#llvm_pointer{type=Type}) -> Type.
+
+mk_array(Size, Type) -> #llvm_array{'size'=Size, type=Type}.
+array_size(#llvm_array{'size'=Size}) -> Size.
+array_type(#llvm_array{type=Type}) -> Type.
+
+mk_vector(Size, Type) -> #llvm_vector{'size'=Size, type=Type}.
+vector_size(#llvm_vector{'size'=Size}) -> Size.
+vector_type(#llvm_vector{type=Type}) -> Type.
+
+mk_struct(Type_list) -> #llvm_struct{type_list=Type_list}.
+struct_type_list(#llvm_struct{type_list=Type_list}) -> Type_list.
+
+mk_fun(Ret_type, Arg_type_list) ->
+ #llvm_fun{ret_type=Ret_type, arg_type_list=Arg_type_list}.
+function_ret_type(#llvm_fun{ret_type=Ret_type}) -> Ret_type.
+function_arg_type_list(#llvm_fun{arg_type_list=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).
+
+pp_ins(Dev, I) ->
+ case indent(I) of
+ true -> write(Dev, " ");
+ false -> ok
+ end,
+ case I of
+ #llvm_ret{} ->
+ write(Dev, "ret "),
+ case ret_ret_list(I) of
+ [] -> write(Dev, "void");
+ List -> pp_args(Dev, List)
+ end,
+ write(Dev, "\n");
+ #llvm_br{} ->
+ write(Dev, ["br label ", br_dst(I), "\n"]);
+ #llvm_switch{} ->
+ write(Dev, "switch "),
+ pp_type(Dev, switch_type(I)),
+ write(Dev, [" ", switch_value(I), ", label ", switch_default_label(I),
+ " \n [\n"]),
+ pp_switch_value_label_list(Dev, switch_type(I),
+ switch_value_label_list(I)),
+ write(Dev, " ]\n");
+ #llvm_invoke{} ->
+ write(Dev, [invoke_dst(I), " = invoke ", invoke_cconv(I), " "]),
+ pp_options(Dev, invoke_ret_attrs(I)),
+ pp_type(Dev, invoke_type(I)),
+ write(Dev, [" ", invoke_fnptrval(I), "("]),
+ pp_args(Dev, invoke_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, invoke_fn_attrs(I)),
+ write(Dev, [" to label ", invoke_to_label(I)," unwind label ",
+ invoke_unwind_label(I), " \n"]);
+ #llvm_br_cond{} ->
+ write(Dev, ["br i1 ", br_cond_cond(I), ", label ", br_cond_true_label(I),
+ ", label ", br_cond_false_label(I)]),
+ case br_cond_meta(I) of
+ [] -> ok;
+ Metadata ->
+ write(Dev, [", !prof !", Metadata])
+ end,
+ write(Dev, "\n");
+ #llvm_indirectbr{} ->
+ write(Dev, "indirectbr "),
+ pp_type(Dev, indirectbr_type(I)),
+ write(Dev, [" ", indirectbr_address(I), ", [ "]),
+ pp_args(Dev, indirectbr_label_list(I)),
+ write(Dev, " ]\n");
+ #llvm_operation{} ->
+ write(Dev, [operation_dst(I), " = ", atom_to_list(operation_op(I)), " "]),
+ case op_has_options(operation_op(I)) of
+ true -> pp_options(Dev, operation_options(I));
+ false -> ok
+ end,
+ pp_type(Dev, operation_type(I)),
+ write(Dev, [" ", operation_src1(I), ", ", operation_src2(I), "\n"]);
+ #llvm_extractvalue{} ->
+ write(Dev, [extractvalue_dst(I), " = extractvalue "]),
+ pp_type(Dev, extractvalue_type(I)),
+ %% TODO Print idxs
+ write(Dev, [" ", extractvalue_val(I), ", ", extractvalue_idx(I), "\n"]);
+ #llvm_insertvalue{} ->
+ write(Dev, [insertvalue_dst(I), " = insertvalue "]),
+ pp_type(Dev, insertvalue_val_type(I)),
+ write(Dev, [" ", insertvalue_val(I), ", "]),
+ pp_type(Dev, insertvalue_elem_type(I)),
+ %%TODO Print idxs
+ write(Dev, [" ", insertvalue_elem(I), ", ", insertvalue_idx(I), "\n"]);
+ #llvm_alloca{} ->
+ write(Dev, [alloca_dst(I), " = alloca "]),
+ pp_type(Dev, alloca_type(I)),
+ case alloca_num(I) of
+ [] -> ok;
+ Num ->
+ write(Dev, ", "),
+ pp_type(Dev, alloca_type(I)),
+ write(Dev, [" ", Num, " "])
+ end,
+ case alloca_align(I) of
+ [] -> ok;
+ Align -> write(Dev, [",align ", Align])
+ end,
+ write(Dev, "\n");
+ #llvm_load{} ->
+ write(Dev, [load_dst(I), " = "]),
+ write(Dev, "load "),
+ case load_volatile(I) of
+ true -> write(Dev, "volatile ");
+ false -> ok
+ end,
+ pp_type(Dev, load_p_type(I)),
+ write(Dev, [" ", load_pointer(I), " "]),
+ case load_alignment(I) of
+ [] -> ok;
+ Al -> write(Dev, [", align ", Al, " "])
+ end,
+ case load_nontemporal(I) of
+ [] -> ok;
+ In -> write(Dev, [", !nontemporal !", In])
+ end,
+ write(Dev, "\n");
+ #llvm_store{} ->
+ write(Dev, "store "),
+ case store_volatile(I) of
+ true -> write(Dev, "volatile ");
+ false -> ok
+ end,
+ pp_type(Dev, store_type(I)),
+ write(Dev, [" ", store_value(I), ", "]),
+ pp_type(Dev, store_p_type(I)),
+ write(Dev, [" ", store_pointer(I), " "]),
+ case store_alignment(I) of
+ [] -> ok;
+ Al -> write(Dev, [", align ", Al, " "])
+ end,
+ case store_nontemporal(I) of
+ [] -> ok;
+ In -> write(Dev, [", !nontemporal !", In])
+ end,
+ write(Dev, "\n");
+ #llvm_getelementptr{} ->
+ write(Dev, [getelementptr_dst(I), " = getelementptr "]),
+ case getelementptr_inbounds(I) of
+ true -> write(Dev, "inbounds ");
+ false -> ok
+ end,
+ pp_type(Dev, getelementptr_p_type(I)),
+ write(Dev, [" ", getelementptr_value(I)]),
+ pp_typed_idxs(Dev, getelementptr_typed_idxs(I)),
+ write(Dev, "\n");
+ #llvm_conversion{} ->
+ write(Dev, [conversion_dst(I), " = ", atom_to_list(conversion_op(I)), " "]),
+ pp_type(Dev, conversion_src_type(I)),
+ write(Dev, [" ", conversion_src(I), " to "]),
+ pp_type(Dev, conversion_dst_type(I)),
+ write(Dev, "\n");
+ #llvm_icmp{} ->
+ write(Dev, [icmp_dst(I), " = icmp ", atom_to_list(icmp_cond(I)), " "]),
+ pp_type(Dev, icmp_type(I)),
+ write(Dev, [" ", icmp_src1(I), ", ", icmp_src2(I), "\n"]);
+ #llvm_fcmp{} ->
+ write(Dev, [fcmp_dst(I), " = fcmp ", atom_to_list(fcmp_cond(I)), " "]),
+ pp_type(Dev, fcmp_type(I)),
+ write(Dev, [" ", fcmp_src1(I), ", ", fcmp_src2(I), "\n"]);
+ #llvm_phi{} ->
+ write(Dev, [phi_dst(I), " = phi "]),
+ pp_type(Dev, phi_type(I)),
+ pp_phi_value_labels(Dev, phi_value_label_list(I)),
+ write(Dev, "\n");
+ #llvm_select{} ->
+ write(Dev, [select_dst(I), " = select i1 ", select_cond(I), ", "]),
+ pp_type(Dev, select_typ1(I)),
+ write(Dev, [" ", select_val1(I), ", "]),
+ pp_type(Dev, select_typ2(I)),
+ write(Dev, [" ", select_val2(I), "\n"]);
+ #llvm_call{} ->
+ case call_dst(I) of
+ [] -> ok;
+ Dst -> write(Dev, [Dst, " = "])
+ end,
+ case call_is_tail(I) of
+ true -> write(Dev, "tail ");
+ false -> ok
+ end,
+ write(Dev, ["call ", call_cconv(I), " "]),
+ pp_options(Dev, call_ret_attrs(I)),
+ pp_type(Dev, call_type(I)),
+ write(Dev, [" ", call_fnptrval(I), "("]),
+ pp_args(Dev, call_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, call_fn_attrs(I)),
+ write(Dev, "\n");
+ #llvm_fun_def{} ->
+ write(Dev, "define "),
+ pp_options(Dev, fun_def_linkage(I)),
+ pp_options(Dev, fun_def_visibility(I)),
+ case fun_def_cconv(I) of
+ [] -> ok;
+ Cc -> write(Dev, [Cc, " "])
+ end,
+ pp_options(Dev, fun_def_ret_attrs(I)),
+ write(Dev, " "),
+ pp_type(Dev, fun_def_type(I)),
+ write(Dev, [" @", fun_def_name(I), "("]),
+ pp_args(Dev, fun_def_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, fun_def_fn_attrs(I)),
+ case fun_def_align(I) of
+ [] -> ok;
+ N -> write(Dev, ["align ", N])
+ end,
+ write(Dev, "{\n"),
+ pp_ins_list(Dev, fun_def_body(I)),
+ write(Dev, "}\n");
+ #llvm_fun_decl{} ->
+ write(Dev, "declare "),
+ pp_options(Dev, fun_decl_linkage(I)),
+ pp_options(Dev, fun_decl_visibility(I)),
+ case fun_decl_cconv(I) of
+ [] -> ok;
+ Cc -> write(Dev, [Cc, " "])
+ end,
+ pp_options(Dev, fun_decl_ret_attrs(I)),
+ pp_type(Dev, fun_decl_type(I)),
+ write(Dev, [" ", fun_decl_name(I), "("]),
+ pp_type_list(Dev, fun_decl_arglist(I)),
+ write(Dev, ") "),
+ case fun_decl_align(I) of
+ [] -> ok;
+ N -> write(Dev, ["align ", N])
+ end,
+ write(Dev, "\n");
+ #llvm_comment{} ->
+ write(Dev, ["; ", atom_to_list(comment_text(I)), "\n"]);
+ #llvm_label{} ->
+ write(Dev, [label_label(I), ":\n"]);
+ #llvm_const_decl{} ->
+ write(Dev, [const_decl_dst(I), " = ", const_decl_decl_type(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");
+ #llvm_asm{} ->
+ write(Dev, [asm_instruction(I), "\n"]);
+ #llvm_adj_stack{} ->
+ write(Dev, ["call void asm sideeffect \"sub $0, ",
+ 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"]);
+ Other ->
+ exit({?MODULE, pp_ins, {"Unknown LLVM instruction", Other}})
+ end.
+
+%% @doc Pretty-print a list of types
+pp_type_list(_Dev, []) -> ok;
+pp_type_list(Dev, [T]) ->
+ pp_type(Dev, T);
+pp_type_list(Dev, [T|Ts]) ->
+ pp_type(Dev, T),
+ write(Dev, ", "),
+ pp_type_list(Dev, Ts).
+
+pp_type(Dev, Type) ->
+ case Type of
+ #llvm_void{} ->
+ write(Dev, "void");
+ #llvm_label_type{} ->
+ write(Dev, "label");
+ %% Integer
+ #llvm_int{} ->
+ write(Dev, ["i", integer_to_list(int_width(Type))]);
+ %% Float
+ #llvm_float{} ->
+ write(Dev, "float");
+ #llvm_double{} ->
+ write(Dev, "double");
+ #llvm_fp80{} ->
+ write(Dev, "x86_fp80");
+ #llvm_fp128{} ->
+ write(Dev, "fp128");
+ #llvm_ppc_fp128{} ->
+ write(Dev, "ppc_fp128");
+ %% Pointer
+ #llvm_pointer{} ->
+ pp_type(Dev, pointer_type(Type)),
+ write(Dev, "*");
+ %% Function
+ #llvm_fun{} ->
+ pp_type(Dev, function_ret_type(Type)),
+ write(Dev, " ("),
+ pp_type_list(Dev, function_arg_type_list(Type)),
+ write(Dev, ")");
+ %% Aggregate
+ #llvm_array{} ->
+ write(Dev, ["[", integer_to_list(array_size(Type)), " x "]),
+ pp_type(Dev, array_type(Type)),
+ write(Dev, "]");
+ #llvm_struct{} ->
+ write(Dev, "{"),
+ pp_type_list(Dev, struct_type_list(Type)),
+ write(Dev, "}");
+ #llvm_vector{} ->
+ write(Dev, ["{", integer_to_list(vector_size(Type)), " x "]),
+ pp_type(Dev, vector_type(Type)),
+ write(Dev, "}")
+ end.
+
+%% @doc Pretty-print a list of typed arguments
+pp_args(_Dev, []) -> ok;
+pp_args(Dev, [{Type, Arg} | []]) ->
+ pp_type(Dev, Type),
+ write(Dev, [" ", Arg]);
+pp_args(Dev, [{Type, Arg} | Args]) ->
+ pp_type(Dev, Type),
+ write(Dev, [" ", Arg, ", "]),
+ pp_args(Dev, Args).
+
+%% @doc Pretty-print a list of options
+pp_options(_Dev, []) -> ok;
+pp_options(Dev, [O|Os]) ->
+ write(Dev, [atom_to_list(O), " "]),
+ pp_options(Dev, Os).
+
+%% @doc Pretty-print a list of phi value-labels
+pp_phi_value_labels(_Dev, []) -> ok;
+pp_phi_value_labels(Dev, [{Value, Label}|[]]) ->
+ write(Dev, ["[ ", Value, ", ", Label, " ]"]);
+pp_phi_value_labels(Dev,[{Value, Label}|VL]) ->
+ write(Dev, ["[ ", Value, ", ", Label, " ], "]),
+ pp_phi_value_labels(Dev, VL).
+
+%% @doc Pretty-print a list of typed indexes
+pp_typed_idxs(_Dev, []) -> ok;
+pp_typed_idxs(Dev, [{Type, Id} | Tids]) ->
+ write(Dev, ", "),
+ pp_type(Dev, Type),
+ write(Dev, [" ", Id]),
+ pp_typed_idxs(Dev, Tids).
+
+%% @doc Pretty-print a switch label list
+pp_switch_value_label_list(_Dev, _Type, []) -> ok;
+pp_switch_value_label_list(Dev, Type, [{Value, Label} | VLs]) ->
+ write(Dev, " "),
+ pp_type(Dev, Type),
+ write(Dev, [" ", Value, ", label ", Label, "\n"]),
+ pp_switch_value_label_list(Dev, Type, VLs).
+
+%%----------------------------------------------------------------------------
+%% Auxiliary Functions
+%%----------------------------------------------------------------------------
+
+%% @doc Returns if an instruction needs to be intended
+indent(I) ->
+ case I of
+ #llvm_label{} -> false;
+ #llvm_fun_def{} -> false;
+ #llvm_fun_decl{} -> false;
+ #llvm_const_decl{} -> false;
+ #llvm_branch_meta{} -> false;
+ _ -> true
+ end.
+
+op_has_options(Op) ->
+ case Op of
+ 'and' -> false;
+ 'or' -> false;
+ 'xor' -> false;
+ _ -> true
+ end.
+
+%% @doc Abstracts actual writing to file operations
+write(Dev, Msg) ->
+ ok = file:write(Dev, Msg).
diff --git a/lib/hipe/llvm/hipe_llvm_arch.hrl b/lib/hipe/llvm/hipe_llvm_arch.hrl
new file mode 100644
index 0000000000..689a5a52ea
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_arch.hrl
@@ -0,0 +1,11 @@
+-ifdef(BIT32).
+-define(NR_PINNED_REGS, 2).
+-define(NR_ARG_REGS, 3).
+-define(ARCH_REGISTERS, hipe_x86_registers).
+-define(FLOAT_OFFSET, 2).
+-else.
+-define(NR_PINNED_REGS, 2).
+-define(NR_ARG_REGS, 4).
+-define(ARCH_REGISTERS, hipe_amd64_registers).
+-define(FLOAT_OFFSET, 6).
+-endif.
diff --git a/lib/hipe/llvm/hipe_llvm_liveness.erl b/lib/hipe/llvm/hipe_llvm_liveness.erl
new file mode 100644
index 0000000000..d1c90ed4c9
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_liveness.erl
@@ -0,0 +1,112 @@
+-module(hipe_llvm_liveness).
+
+-export([analyze/1]).
+
+%% @doc Find gc roots and explicitly mark when they go out of scope, based
+%% on the liveness analyzis performed by the hipe_rtl_liveness:analyze/1.
+analyze(RtlCfg) ->
+ Liveness = hipe_rtl_liveness:analyze(RtlCfg),
+ Roots = find_roots(RtlCfg, Liveness),
+ %% erlang:display(Roots),
+ NewRtlCfg = mark_dead_roots(RtlCfg, Liveness, Roots),
+ {NewRtlCfg, Roots}.
+
+%% @doc Determine which are the GC Roots.Possible roots are all
+%% RTL variables (rtl_var). However, since safe points are function calls, we
+%% consider as possible GC roots only RTL variables that are live around
+%% function calls.
+find_roots(Cfg, Liveness) ->
+ Labels = hipe_rtl_cfg:postorder(Cfg),
+ Roots = find_roots_bb(Labels, Cfg, Liveness, []),
+ lists:usort(lists:flatten(Roots)).
+
+find_roots_bb([], _Cfg, _Liveness, RootAcc) ->
+ RootAcc;
+find_roots_bb([L|Ls], Cfg, Liveness, RootAcc) ->
+ Block = hipe_rtl_cfg:bb(Cfg, L),
+ BlockCode = hipe_bb:code(Block),
+ LiveIn = ordsets:from_list(strip(hipe_rtl_liveness:livein(Liveness, L))),
+ LiveOut = ordsets:from_list(strip(hipe_rtl_liveness:liveout(Liveness, L))),
+ Roots = do_find_roots_bb(BlockCode, L, LiveOut, LiveIn, []),
+ find_roots_bb(Ls, Cfg, Liveness, Roots++RootAcc).
+
+%% For each call inside a BB the GC roots are those RTL variables that
+%% are live before and after the call.
+%% --> Live Before Call: These are the RTL variables that belong to the
+%% LiveIn list or are initialized inside the BB before the call
+%% --> Live After Call: These are the RTL variables that belong to the
+%% LiveOut list or are used after the call inside the BB (they die
+%% inside the BB and so do not belong to the LiveOut list)
+do_find_roots_bb([], _Label, _LiveOut, _LiveBefore, RootAcc) ->
+ RootAcc;
+do_find_roots_bb([I|Is], L, LiveOut, LiveBefore, RootAcc) ->
+ case hipe_rtl:is_call(I) of
+ true ->
+ %% Used inside the BB after the call
+ UsedAfterCall_ = strip(lists:flatten([hipe_rtl:uses(V) || V <- Is])),
+ UsedAfterCall = ordsets:from_list(UsedAfterCall_),
+ LiveAfter = ordsets:union(UsedAfterCall, LiveOut),
+ %% The Actual Roots
+ Roots = ordsets:intersection(LiveBefore, LiveAfter),
+ %% The result of the instruction
+ Defines = ordsets:from_list(strip(hipe_rtl:defines(I))),
+ LiveBefore1 = ordsets:union(LiveBefore, Defines),
+ do_find_roots_bb(Is, L, LiveOut, LiveBefore1, [Roots|RootAcc]);
+ false ->
+ %% The result of the instruction
+ Defines = ordsets:from_list(strip(hipe_rtl:defines(I))),
+ LiveBefore1 = ordsets:union(LiveBefore, Defines),
+ do_find_roots_bb(Is, L, LiveOut, LiveBefore1, RootAcc)
+ end.
+
+%% @doc This function is responsible for marking when GC Roots, which can be
+%% only RTL variables go out of scope (dead). This pass is needed for the LLVM
+%% back end because the LLVM framework forces us to explicit mark when gc roots
+%% are no longer live.
+mark_dead_roots(CFG, Liveness, Roots) ->
+ Labels = hipe_rtl_cfg:postorder(CFG),
+ mark_dead_bb(Labels, CFG, Liveness, Roots).
+
+mark_dead_bb([], Cfg, _Liveness, _Roots) ->
+ Cfg;
+mark_dead_bb([L|Ls], Cfg, Liveness, Roots) ->
+ Block = hipe_rtl_cfg:bb(Cfg, L),
+ BlockCode = hipe_bb:code(Block),
+ LiveOut = ordsets:from_list(strip(hipe_rtl_liveness:liveout(Liveness, L))),
+ NewBlockCode = do_mark_dead_bb(BlockCode, LiveOut, Roots, []),
+ %% Update the CFG
+ NewBB = hipe_bb:code_update(Block, NewBlockCode),
+ NewCFG = hipe_rtl_cfg:bb_add(Cfg, L, NewBB),
+ mark_dead_bb(Ls, NewCFG, Liveness, Roots).
+
+do_mark_dead_bb([], _LiveOut, _Roots, NewBlockCode) ->
+ lists:reverse(NewBlockCode);
+do_mark_dead_bb([I|Is], LiveOut ,Roots, NewBlockCode) ->
+ Uses = ordsets:from_list(strip(hipe_rtl:uses(I))),
+ %% GC roots that are used in this instruction
+ RootsUsed = ordsets:intersection(Roots, Uses),
+ UsedAfter_ = strip(lists:flatten([hipe_rtl:uses(V) || V <- Is])),
+ UsedAfter = ordsets:from_list(UsedAfter_),
+ %% GC roots that are live after this instruction
+ LiveAfter = ordsets:union(LiveOut, UsedAfter),
+ %% GC roots that their last use is in this instruction
+ DeadRoots = ordsets:subtract(RootsUsed, LiveAfter),
+ %% Recreate the RTL variable from the corresponding Index
+ OldVars = [hipe_rtl:mk_var(V1) || V1 <- DeadRoots],
+ %% Mark the RTL variable as DEAD (last use)
+ NewVars = [kill_var(V2) || V2 <- OldVars],
+ %% Create a list with the substitution of the old vars with the new
+ %% ones which are marked with the dead keyword
+ Subtitution = lists:zip(OldVars, NewVars),
+ NewI = case Subtitution of
+ [] -> I;
+ _ -> hipe_rtl:subst_uses_llvm(Subtitution, I)
+ end,
+ do_mark_dead_bb(Is, LiveOut, Roots, [NewI|NewBlockCode]).
+
+%% Update the liveness of a var,in order to mark that this is the last use.
+kill_var(Var) -> hipe_rtl:var_liveness_update(Var, dead).
+
+%% We are only interested for rtl_vars, since only rtl_vars are possible gc
+%% roots.
+strip(L) -> [Y || {rtl_var, Y, _} <- L].
diff --git a/lib/hipe/llvm/hipe_llvm_main.erl b/lib/hipe/llvm/hipe_llvm_main.erl
new file mode 100644
index 0000000000..0e50c9539b
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_main.erl
@@ -0,0 +1,506 @@
+%% -*- erlang-indent-level: 2 -*-
+-module(hipe_llvm_main).
+
+-export([rtl_to_native/4]).
+
+-include("../../kernel/src/hipe_ext_format.hrl").
+-include("hipe_llvm_arch.hrl").
+-include("elf_format.hrl").
+
+%% @doc Translation of RTL to a loadable object. This function takes the RTL
+%% code and calls hipe_rtl_to_llvm:translate/2 to translate the RTL code to
+%% LLVM code. After this, LLVM asm is printed to a file and the LLVM tool
+%% 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} =
+ 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),
+ %% Write LLVM Assembly to intermediate file (on disk)
+ {ok, Dir, ObjectFile} =
+ compile_with_llvm(Fun, Arity, LLVMCode, Options, false),
+ %%
+ %% Extract information from object file
+ %%
+ ObjBin = open_object_file(ObjectFile),
+ %% Read and set the ELF class
+ elf_format:set_architecture_flag(ObjBin),
+ %% Get labels info (for switches and jump tables)
+ Labels = elf_format:get_rodata_relocs(ObjBin),
+ {Switches, Closures} = get_tables(ObjBin),
+ %% Associate Labels with Switches and Closures with stack args
+ {SwitchInfos, ExposedClosures} =
+ correlate_labels(Switches ++ Closures, 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),
+ %% Get relocation info
+ TextRelocs = elf_format:get_text_relocs(ObjBin),
+ %% 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),
+ %% 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),
+ %% Remove temp files (if needed)
+ ok = remove_temp_folder(Dir, Options),
+ %% Return the code together with information that will be used in the
+ %% hipe_llvm_merge module to produce the final binary that will be loaded
+ %% by the hipe unified loader.
+ {MFA, BinCode, byte_size(BinCode), ConstTab, Refs, LabelMap}.
+
+%%------------------------------------------------------------------------------
+%% LLVM tool chain
+%%------------------------------------------------------------------------------
+
+%% @doc Compile function FunName/Arity to LLVM. Return Dir (in order to remove
+%% it if we do not want to store temporary files) and ObjectFile name that
+%% is created by the LLVM tools.
+compile_with_llvm(FunName, Arity, LLVMCode, Options, UseBuffer) ->
+ Filename = atom_to_list(FunName) ++ "_" ++ integer_to_list(Arity),
+ %% Save temp files in a unique folder
+ Dir = unique_folder(FunName, Arity, Options),
+ ok = file:make_dir(Dir),
+ %% Print LLVM assembly to file
+ OpenOpts = [append, raw] ++
+ case UseBuffer of
+ %% true -> [delayed_write]; % Use delayed_write!
+ false -> []
+ end,
+ {ok, File_llvm} = file:open(Dir ++ Filename ++ ".ll", OpenOpts),
+ hipe_llvm:pp_ins_list(File_llvm, 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),
+ %% Invoke LLVM compiler tools to produce an object file
+ llvm_opt(Dir, Filename, Options),
+ llvm_llc(Dir, Filename, Options),
+ compile(Dir, Filename, "gcc"), %%FIXME: use llc -filetype=obj and skip this!
+ {ok, Dir, Dir ++ Filename ++ ".o"}.
+
+%% @doc Invoke opt tool to optimize the bitcode (_name.ll -> _name.bc).
+llvm_opt(Dir, Filename, Options) ->
+ Source = Dir ++ Filename ++ ".ll",
+ Dest = Dir ++ Filename ++ ".bc",
+ OptLevel = trans_optlev_flag(opt, Options),
+ OptFlags = [OptLevel, "-mem2reg", "-strip"],
+ Command = "opt " ++ fix_opts(OptFlags) ++ " " ++ Source ++ " -o " ++ Dest,
+ %% io:format("OPT: ~s~n", [Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, opt, Error})
+ end.
+
+%% @doc Invoke llc tool to compile the bitcode to object file
+%% (_name.bc -> _name.o).
+llvm_llc(Dir, Filename, Options) ->
+ Source = Dir ++ Filename ++ ".bc",
+ OptLevel = trans_optlev_flag(llc, Options),
+ Align = find_stack_alignment(),
+ LlcFlags = [OptLevel, "-code-model=medium", "-stack-alignment=" ++ Align
+ , "-tailcallopt", "-filetype=asm"], %%FIXME
+ Command = "llc " ++ fix_opts(LlcFlags) ++ " " ++ Source,
+ %% io:format("LLC: ~s~n", [Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, llc, Error})
+ end.
+
+%% @doc Invoke the compiler tool ("gcc", "llvmc", etc.) to generate an object
+%% file from native assembly.
+compile(Dir, Fun_Name, Compiler) ->
+ Source = Dir ++ Fun_Name ++ ".s",
+ Dest = Dir ++ Fun_Name ++ ".o",
+ Command = Compiler ++ " -c " ++ Source ++ " -o " ++ Dest,
+ %% io:format("~s: ~s~n", [Compiler, Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, cc, Error})
+ end.
+
+find_stack_alignment() ->
+ case get(hipe_target_arch) of
+ x86 -> "4";
+ amd64 -> "8";
+ _ -> exit({?MODULE, find_stack_alignment, "Unimplemented architecture"})
+ end.
+
+%% @doc Join options.
+fix_opts(Opts) ->
+ string:join(Opts, " ").
+
+%% @doc Translate optimization-level flag (default is "O2").
+trans_optlev_flag(Tool, Options) ->
+ Flag = case Tool of
+ opt -> llvm_opt;
+ llc -> llvm_llc
+ end,
+ case proplists:get_value(Flag, Options) of
+ o0 -> ""; % "-O0" does not exist in opt tool
+ o1 -> "-O1";
+ o2 -> "-O2";
+ o3 -> "-O3";
+ undefined -> "-O2"
+ end.
+
+%%------------------------------------------------------------------------------
+%% Functions to manage Relocations
+%%------------------------------------------------------------------------------
+
+%% @doc Get switch table and closure table.
+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}.
+
+%% @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
+%% either be jump tables for switches or a table which contains the labels
+%% 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),
+ case lists:keytake("table_closures", 1, NamesValues) of
+ false -> %% No closures in the code, no closure table
+ {NamesValues, []};
+ {value, ClosureTableNV, SwitchesNV} ->
+ {SwitchesNV, ClosureTableNV}
+ 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.
+create_labelmap(MFA, SwitchInfos, RelocsDict) ->
+ create_labelmap(MFA, SwitchInfos, RelocsDict, gb_trees:empty()).
+
+create_labelmap(_, [], _, LabelMap) -> LabelMap;
+create_labelmap(MFA, [{Name, Offsets} | Rest], RelocsDict, LabelMap) ->
+ case dict:fetch(Name, RelocsDict) of
+ {switch, {_TableType, LabelList, _NrLabels, _SortOrder}, _JTabLab} ->
+ KVDict = lists:ukeysort(1, lists:zip(LabelList, Offsets)),
+ NewLabelMap = insert_to_labelmap(KVDict, LabelMap),
+ create_labelmap(MFA, Rest, RelocsDict, NewLabelMap);
+ _ ->
+ exit({?MODULE, create_labelmap, "Not a jump table!"})
+ end.
+
+%% @doc Insert a list of [{Key,Value}] to a LabelMap (gb_tree).
+insert_to_labelmap([], LabelMap) -> LabelMap;
+insert_to_labelmap([{Key, Value}|Rest], LabelMap) ->
+ case gb_trees:lookup(Key, LabelMap) of
+ none ->
+ insert_to_labelmap(Rest, gb_trees:insert(Key, Value, LabelMap));
+ {value, Value} -> %% Exists with the *exact* same Value.
+ insert_to_labelmap(Rest, LabelMap)
+ end.
+
+%% @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) ->
+ 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]);
+ %% 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}})
+ end.
+
+%%------------------------------------------------------------------------------
+%% Functions to manage Stack Descriptors
+%%------------------------------------------------------------------------------
+
+%% @doc This function takes an ELF Object File binary and returns a proper sdesc
+%% list for Erlang/OTP System's loader. The return value should be of the
+%% form:
+%% {
+%% 4, Safepoint Address,
+%% {ExnLabel OR [], FrameSize, StackArity, {Liveroot stack frame indexes}},
+%% }
+get_sdescs(Elf) ->
+ case elf_format:extract_note(Elf, ?NOTE_ERLGC_NAME) of
+ <<>> -> % Object file has no ".note.gc" section!
+ [];
+ NoteGC_bin ->
+ %% Get safe point addresses (stored in ".rela.note.gc" section):
+ RelaNoteGC = elf_format:extract_rela(Elf, ?NOTE(?NOTE_ERLGC_NAME)),
+ SPCount = length(RelaNoteGC),
+ 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!
+ 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 Exception Handler labels:
+ ExnHandlers = elf_format:get_exn_handlers(Elf),
+ %% Combine ExnHandlers and Safe point addresses (return addresses):
+ ExnAndSPOffs = combine_ras_and_exns(ExnHandlers, SPOffs, []),
+ create_sdesc_list(ExnAndSPOffs, StkFrameSize, StkArity, LiveRoots, [])
+ end.
+
+%% @doc Extracts a bunch of integers (live roots) from a binary. Returns a tuple
+%% as need for stack descriptors.
+get_liveroots(<<>>, Acc) ->
+ list_to_tuple(Acc);
+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) ->
+ %% FIXME: do something better than O(n^2) by taking advantage of the property
+ %% ||ExnHandlers|| <= ||RAs||
+ Handler = find_exn_handler(RA, ExnHandlers),
+ combine_ras_and_exns(ExnHandlers, MoreRAs, [{Handler, RA} | Acc]).
+
+find_exn_handler(_, []) ->
+ [];
+find_exn_handler(RA, [{Start, End, Handler} | MoreExnHandlers]) ->
+ case (RA >= Start andalso RA =< End) of
+ true ->
+ Handler;
+ false ->
+ find_exn_handler(RA, MoreExnHandlers)
+ end.
+
+create_sdesc_list([], _, _, _, Acc) ->
+ lists:reverse(Acc);
+create_sdesc_list([{ExnLbl, SPOff} | MoreExnAndSPOffs],
+ StkFrameSize, StkArity, LiveRoots, Acc) ->
+ Hdlr = case ExnLbl of
+ 0 -> [];
+ N -> N
+ end,
+ create_sdesc_list(MoreExnAndSPOffs, StkFrameSize, StkArity, LiveRoots,
+ [{?SDESC, SPOff, {Hdlr, StkFrameSize, StkArity, LiveRoots}}
+ | Acc]).
+
+%% @doc This function is responsible for correcting the stack descriptors of
+%% the calls that are found in the code and have more than NR_ARG_REGS
+%% (thus, some of their arguments are passed to the stack). Because of the
+%% Reserved Call Frame feature that the LLVM uses, the stack descriptors
+%% are not correct since at the point of call the frame size is reduced
+%% by the number of arguments that are passed on the stack. Also, the
+%% offsets of the roots need to be re-adjusted.
+fix_stack_descriptors(_, _, [], _) ->
+ [];
+fix_stack_descriptors(RelocsDict, Relocs, SDescs, ExposedClosures) ->
+ %% NamedCalls are MFA and BIF calls that need fix
+ NamedCalls = calls_with_stack_args(RelocsDict),
+ NamedCallsOffs = calls_offsets_arity(Relocs, NamedCalls),
+ ExposedClosures1 =
+ case dict:is_key("table_closures", RelocsDict) of
+ true -> %% A Table with closures exists
+ {table_closures, ArityList} = dict:fetch("table_closures", RelocsDict),
+ case ExposedClosures of
+ {_, Offsets} ->
+ lists:zip(Offsets, ArityList);
+ _ ->
+ exit({?MODULE, fix_stack_descriptors,
+ {"Wrong exposed closures", ExposedClosures}})
+ end;
+ false ->
+ []
+ end,
+ ClosuresOffs = closures_offsets_arity(ExposedClosures1, SDescs),
+ fix_sdescs(NamedCallsOffs ++ ClosuresOffs, SDescs).
+
+%% @doc This function takes as argument the relocation dictionary as produced by
+%% the translation of RTL code to LLVM and finds the names of the calls
+%% (MFA and BIF calls) that have more than NR_ARG_REGS.
+calls_with_stack_args(Dict) ->
+ calls_with_stack_args(dict:to_list(Dict), []).
+
+calls_with_stack_args([], Calls) -> Calls;
+calls_with_stack_args([ {_Name, {call, {M, F, A}}} | Rest], Calls)
+ when A > ?NR_ARG_REGS ->
+ Call =
+ case M of
+ bif -> {F,A};
+ _ -> {M,F,A}
+ end,
+ calls_with_stack_args(Rest, [Call|Calls]);
+calls_with_stack_args([_|Rest], Calls) ->
+ calls_with_stack_args(Rest, Calls).
+
+%% @doc This function extracts the stack arity and the offset in the code of
+%% the named calls (MFAs, BIFs) that have stack arguments.
+calls_offsets_arity(AccRefs, CallsWithStackArgs) ->
+ calls_offsets_arity(AccRefs, CallsWithStackArgs, []).
+
+calls_offsets_arity([], _, Acc) -> Acc;
+calls_offsets_arity([{Type, Offset, Term} | Rest], CallsWithStackArgs, Acc)
+ when Type =:= ?CALL_REMOTE orelse Type =:= ?CALL_LOCAL ->
+ case lists:member(Term, CallsWithStackArgs) of
+ true ->
+ Arity =
+ case Term of
+ {_M, _F, A} -> A;
+ {_F, A} -> A
+ end,
+ calls_offsets_arity(Rest, CallsWithStackArgs,
+ [{Offset + 4, Arity - ?NR_ARG_REGS} | Acc]);
+ false ->
+ calls_offsets_arity(Rest, CallsWithStackArgs, Acc)
+ end;
+calls_offsets_arity([_|Rest], CallsWithStackArgs, Acc) ->
+ calls_offsets_arity(Rest, CallsWithStackArgs, Acc).
+
+%% @doc This function extracts the stack arity and the offsets of closures that
+%% have stack arity. The Closures argument represents the
+%% hipe_bifs:llvm_exposure_closure/0 calls in the code. The actual closure
+%% is the next call in the code, so the offset of the next call must be
+%% calculated from the stack descriptors.
+closures_offsets_arity([], _) ->
+ [];
+closures_offsets_arity(ExposedClosures, SDescs) ->
+ Offsets = [Offset || {_, Offset, _} <- SDescs],
+ %% Offsets and closures must be sorted in order for find_offsets/3 to work
+ SortedOffsets = lists:sort(Offsets),
+ SortedExposedClosures = lists:keysort(1, ExposedClosures),
+ find_offsets(SortedExposedClosures, SortedOffsets, []).
+
+find_offsets([], _, Acc) -> Acc;
+find_offsets([{Off,Arity}|Rest], Offsets, Acc) ->
+ [I | RestOffsets] = lists:dropwhile(fun (Y) -> Y<Off end, Offsets),
+ find_offsets(Rest, RestOffsets, [{I, Arity}|Acc]).
+
+%% The function below corrects the stack descriptors of calls with arguments
+%% that are passed on the stack (more than NR_ARG_REGS) by subtracting the
+%% number of stacked arguments from the frame size and from the offset of the
+%% roots.
+fix_sdescs([], SDescs) -> SDescs;
+fix_sdescs([{Offset, Arity} | Rest], SDescs) ->
+ case lists:keyfind(Offset, 2, SDescs) of
+ false ->
+ fix_sdescs(Rest, SDescs);
+ {?SDESC, Offset, {ExnHandler, FrameSize, StkArity, Roots}} ->
+ FixedRoots = list_to_tuple([Ri - Arity || Ri <- tuple_to_list(Roots)]),
+ FixedSDesc =
+ {?SDESC, Offset, {ExnHandler, FrameSize - Arity, StkArity, FixedRoots}},
+ fix_sdescs(Rest, [FixedSDesc | lists:keydelete(Offset, 2, SDescs)])
+ end.
+
+%%------------------------------------------------------------------------------
+%% Miscellaneous functions
+%%------------------------------------------------------------------------------
+
+%% @doc A function that opens a file as binary. The function takes as argument
+%% the name of the file and returns an Erlang binary.
+-spec open_object_file(string()) -> binary().
+open_object_file(ObjFile) ->
+ case file:read_file(ObjFile) of
+ {ok, Binary} ->
+ Binary;
+ {error, Reason} ->
+ exit({?MODULE, open_file, Reason})
+ end.
+
+remove_temp_folder(Dir, Options) ->
+ case proplists:get_bool(llvm_save_temps, Options) of
+ true -> ok;
+ false -> spawn(fun () -> "" = os:cmd("rm -rf " ++ Dir) end), ok
+ end.
+
+unique_id(FunName, Arity) ->
+ integer_to_list(erlang:phash2({FunName, Arity, now()})).
+
+unique_folder(FunName, Arity, Options) ->
+ DirName = "llvm_" ++ unique_id(FunName, Arity) ++ "/",
+ Dir =
+ case proplists:get_bool(llvm_save_temps, Options) of
+ true -> %% Store folder in current directory
+ DirName;
+ false -> %% Temporarily store folder in tempfs (/dev/shm/)
+ "/dev/shm/" ++ DirName
+ end,
+ %% Make sure it does not exist
+ case dir_exists(Dir) of
+ true -> %% Dir already exists! Generate again.
+ unique_folder(FunName, Arity, Options);
+ false ->
+ Dir
+ end.
+
+%% @doc Function that checks that a given Filename is an existing Directory
+%% Name (from http://rosettacode.org/wiki/Ensure_that_a_file_exists#Erlang)
+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_llvm_merge.erl b/lib/hipe/llvm/hipe_llvm_merge.erl
new file mode 100644
index 0000000000..3ababfc21a
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_merge.erl
@@ -0,0 +1,114 @@
+%%% -*- erlang-indent-level: 2 -*-
+-module(hipe_llvm_merge).
+
+-export([finalize/3]).
+
+-include("hipe_llvm_arch.hrl").
+-include("../../kernel/src/hipe_ext_format.hrl").
+-include("../rtl/hipe_literals.hrl").
+-include("../main/hipe.hrl").
+
+finalize(CompiledCode, Closures, Exports) ->
+ CompiledCode1 = [CodePack || {_, CodePack} <- CompiledCode],
+ Code = [{MFA, [], ConstTab}
+ || {MFA, _, _ , ConstTab, _, _} <- CompiledCode1],
+ {ConstAlign, ConstSize, ConstMap, RefsFromConsts} =
+ hipe_pack_constants:pack_constants(Code, ?ARCH_REGISTERS:alignment()),
+ %% Compute total code size separately as a sanity check for alignment
+ CodeSize = compute_code_size(CompiledCode1, 0),
+ %% io:format("Code Size (pre-computed): ~w~n", [CodeSize]),
+ {CodeBinary, ExportMap} = merge_mfas(CompiledCode1, 0, <<>>, []),
+ %% io:format("Code Size (post-computed): ~w~n", [byte_size(CodeBinary)]),
+ ?VERBOSE_ASSERT(CodeSize =:= byte_size(CodeBinary)),
+ AccRefs = merge_refs(CompiledCode1, ConstMap, 0, []),
+ %% Bring CompiledCode to a combine_label_maps-acceptable form.
+ LabelMap = combine_label_maps(CompiledCode1, 0, gb_trees:empty()),
+ SC = hipe_pack_constants:slim_constmap(ConstMap),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap, Closures, Exports),
+ SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
+ term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
+ ConstAlign, ConstSize,
+ SC, % ConstMap
+ DataRelocs, % LabelMap
+ SSE, % ExportMap
+ CodeSize, CodeBinary, SlimRefs,
+ 0,[] % ColdCodeSize, SlimColdRefs
+ ]).
+
+%% Copied from hipe_x86_assemble.erl
+nr_pad_bytes(Address) ->
+ (4 - (Address rem 4)) rem 4. % XXX: 16 or 32 instead?
+
+align_entry(Address) ->
+ Address + nr_pad_bytes(Address).
+
+compute_code_size([{_MFA, _BinaryCode, CodeSize, _, _, _}|Code], Size) ->
+ compute_code_size(Code, align_entry(Size+CodeSize));
+compute_code_size([], Size) -> Size.
+
+combine_label_maps([{MFA, _, CodeSize, _, _, LabelMap}|Code], Address, CLM) ->
+ NewCLM = merge_label_map(gb_trees:to_list(LabelMap), MFA, Address, CLM),
+ combine_label_maps(Code, align_entry(Address+CodeSize), NewCLM);
+combine_label_maps([], _Address, CLM) -> CLM.
+
+merge_label_map([{Label,Offset}|Rest], MFA, Address, CLM) ->
+ NewCLM = gb_trees:insert({MFA,Label}, Address+Offset, CLM),
+ merge_label_map(Rest, MFA, Address, NewCLM);
+merge_label_map([], _MFA, _Address, CLM) -> CLM.
+
+%% @doc Merge the MFAs' binary code to one continuous binary and compute the
+%% size of this binary. At the same time create an exportmap in a form
+%% of {Address, M, F, A}.
+%% XXX: Is alignment correct/optimal for X86/AMD64?
+merge_mfas([{{M,F,A}, CodeBinary, CodeSize, _, _, _}|Code],
+ Address, AccCode, AccExportMap) ->
+ ?VERBOSE_ASSERT(CodeSize =:= byte_size(CodeBinary)),
+ {Address1, Code1} =
+ case nr_pad_bytes(Address + CodeSize) of
+ 0 -> %% Retains alignment:
+ {Address + CodeSize, CodeBinary};
+ NrPadBytes -> %% Needs padding!
+ Padding = list_to_binary(lists:duplicate(NrPadBytes, 0)),
+ {Address + CodeSize + NrPadBytes, % =:= align_entry(Address+CodeSize)
+ <<CodeBinary/binary, Padding/binary>>}
+ end,
+ ?VERBOSE_ASSERT(Address1 =:=
+ align_entry(Address + CodeSize)), %XXX: Should address be aligned?
+ AccCode1 = <<AccCode/binary, Code1/binary>>,
+ merge_mfas(Code, Address1, AccCode1, [{Address, M, F, A}|AccExportMap]);
+merge_mfas([], _Address, AccCode, AccExportMap) ->
+ {AccCode, AccExportMap}.
+
+%% @doc Merge the references of relocatable symbols in the binary code. The
+%% offsets must be updated because of the merging of the code binaries!
+merge_refs([], _ConstMap, _Addr, AccRefs) -> AccRefs;
+merge_refs([{MFA, _, CodeSize, _, Refs, _}|Rest], ConstMap, Address, AccRefs) ->
+ %% Important!: The hipe_pack_constants:pack_constants/2 function assignes
+ %% unique numbers to constants (ConstNo). This numbers are used from now on,
+ %% instead of labels that were used before. So, in order to be compatible, we
+ %% must change all the constant labels in the Refs to the corresponding
+ %% ConstNo, that can be found in the ConstMap (#pcm_entry{}).
+ UpdatedRefs = [update_ref(label_to_constno(Ref, MFA, ConstMap), Address)
+ || Ref <- Refs],
+ merge_refs(Rest, ConstMap, align_entry(Address+CodeSize),
+ UpdatedRefs++AccRefs).
+
+label_to_constno({Type, Offset, {constant, Label}}, MFA, ConstMap) ->
+ ConstNo = hipe_pack_constants:find_const({MFA, Label}, ConstMap),
+ {Type, Offset, {constant, ConstNo}};
+label_to_constno(Other, _MFA, _ConstMap) ->
+ Other.
+
+%% @doc Update offset to a reference. In case of stack descriptors we must check
+%% if there exists an exception handler, because it must also be updated.
+update_ref({?SDESC, Offset, SDesc}, CodeAddr) ->
+ NewRefAddr = Offset+CodeAddr,
+ case SDesc of
+ {[], _, _, _} -> % No handler; only update offset
+ {?SDESC, NewRefAddr, SDesc};
+ {ExnHandler, FrameSize, StackArity, Roots} -> % Update exception handler
+ {?SDESC, NewRefAddr, {ExnHandler+CodeAddr, FrameSize, StackArity, Roots}}
+ end;
+update_ref({Type, Offset, Term}, CodeAddr) ->
+ {Type, Offset+CodeAddr, Term}.
diff --git a/lib/hipe/llvm/hipe_rtl_to_llvm.erl b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
new file mode 100644
index 0000000000..d7d8d1b049
--- /dev/null
+++ b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
@@ -0,0 +1,1613 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(hipe_rtl_to_llvm).
+-author("Chris Stavrakakis, Yiannis Tsiouris").
+
+-export([translate/2]). % the main function of this module
+-export([fix_mfa_name/1]). % a help function used in hipe_llvm_main
+
+-include("../rtl/hipe_rtl.hrl").
+-include("../rtl/hipe_literals.hrl").
+-include("hipe_llvm_arch.hrl").
+
+-define(WORD_WIDTH, (?bytes_to_bits(hipe_rtl_arch:word_size()))).
+-define(BRANCH_META_TAKEN, "0").
+-define(BRANCH_META_NOT_TAKEN, "1").
+
+%%------------------------------------------------------------------------------
+%% @doc Main function for translating an RTL function to LLVM Assembly. Takes as
+%% input the RTL code and the variable indexes of possible garbage
+%% collection roots and returns the corresponing LLVM, a dictionary with
+%% all the relocations in the code and a hipe_consttab() with informaton
+%% about data.
+%%------------------------------------------------------------------------------
+translate(RTL, Roots) ->
+ Fun = hipe_rtl:rtl_fun(RTL),
+ Params = hipe_rtl:rtl_params(RTL),
+ Data = hipe_rtl:rtl_data(RTL),
+ Code = hipe_rtl:rtl_code(RTL),
+ %% Init unique symbol generator and initialize the label counter to the last
+ %% RTL label.
+ hipe_gensym:init(llvm),
+ {_, MaxLabel} = hipe_rtl:rtl_label_range(RTL),
+ put({llvm,label_count}, MaxLabel + 1),
+ %% Put first label of RTL code in process dictionary
+ find_code_entry_label(Code),
+ %% Initialize relocations symbol dictionary
+ Relocs = dict:new(),
+ %% Print RTL to file
+ %% {ok, File_rtl} = file:open("rtl_" ++integer_to_list(random:uniform(2000))
+ %% ++ ".rtl", [write]),
+ %% hipe_rtl:pp(File_rtl, RTL),
+ %% file:close(File_rtl),
+
+ %% Pass on RTL code to handle exception handling and identify labels of Fail
+ %% Blocks
+ {Code1, FailLabels} = fix_code(Code),
+ %% Allocate stack slots for each virtual register and declare gc roots
+ AllocaStackCode = alloca_stack(Code1, Params, Roots),
+ %% Translate Code
+ {LLVM_Code1, Relocs1, NewData} =
+ 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} =
+ handle_relocations(Relocs1, Data, Fun),
+ %% Pass on LLVM code in order to create Fail blocks and a landingpad
+ %% instruction to each one
+ LLVM_Code2 = add_landingpads(LLVM_Code1, FailLabels),
+ %% Create LLVM Code for the compiled function
+ LLVM_Code3 = create_function_definition(Fun, Params, LLVM_Code2,
+ AllocaStackCode ++ LocalVars),
+ %% Final Code = CompiledFunction + External Declarations
+ FinalLLVMCode = [LLVM_Code3 | ExternalDecl],
+ {FinalLLVMCode, FinalRelocs, NewData}.
+
+find_code_entry_label([]) ->
+ exit({?MODULE, find_code_entry_label, "Empty code"});
+find_code_entry_label([I|_]) ->
+ case hipe_rtl:is_label(I) of
+ true ->
+ put(first_label, hipe_rtl:label_name(I));
+ false ->
+ exit({?MODULE, find_code_entry_label, "First instruction is not a label"})
+ end.
+
+%% @doc Create a stack slot for each virtual register. The stack slots
+%% that correspond to possible garbage collection roots must be
+%% marked as such.
+alloca_stack(Code, Params, Roots) ->
+ %% Find all assigned virtual registers
+ Destinations = collect_destinations(Code),
+ %% Declare virtual registers, and declare garbage collection roots
+ do_alloca_stack(Destinations++Params, Params, Roots).
+
+collect_destinations(Code) ->
+ lists:usort(lists:flatmap(fun insn_dst/1, Code)).
+
+do_alloca_stack(Destinations, Params, Roots) ->
+ do_alloca_stack(Destinations, Params, Roots, []).
+
+do_alloca_stack([], _, _, Acc) ->
+ Acc;
+do_alloca_stack([D|Ds], Params, Roots, Acc) ->
+ {Name, _I} = trans_dst(D),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ case hipe_rtl:is_var(D) of
+ true ->
+ Num = hipe_rtl:var_index(D),
+ I1 = hipe_llvm:mk_alloca(Name, WordTy, [], []),
+ case lists:member(Num, Roots) of
+ true -> %% Variable is a possible Root
+ T1 = mk_temp(),
+ BYTE_TYPE_PP = hipe_llvm:mk_pointer(ByteTyPtr),
+ I2 =
+ hipe_llvm:mk_conversion(T1, bitcast, WordTyPtr, Name, BYTE_TYPE_PP),
+ GcRootArgs = [{BYTE_TYPE_PP, T1}, {ByteTyPtr, "@gc_metadata"}],
+ I3 = hipe_llvm:mk_call([], false, [], [], hipe_llvm:mk_void(),
+ "@llvm.gcroot", GcRootArgs, []),
+ I4 = case lists:member(D, Params) of
+ false ->
+ hipe_llvm:mk_store(WordTy, "-5", WordTyPtr, Name,
+ [], [], false);
+ true -> []
+ end,
+ do_alloca_stack(Ds, Params, Roots, [I1, I2, I3, I4 | Acc]);
+ false ->
+ do_alloca_stack(Ds, Params, Roots, [I1|Acc])
+ end;
+ false ->
+ case hipe_rtl:is_reg(D) andalso isPrecoloured(D) of
+ true -> %% Precoloured registers are mapped to "special" stack slots
+ do_alloca_stack(Ds, Params, Roots, Acc);
+ false ->
+ I1 = case hipe_rtl:is_fpreg(D) of
+ true ->
+ FloatTy = hipe_llvm:mk_double(),
+ hipe_llvm:mk_alloca(Name, FloatTy, [], []);
+ false -> hipe_llvm:mk_alloca(Name, WordTy, [], [])
+ end,
+ do_alloca_stack(Ds, Params, Roots, [I1|Acc])
+ end
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Translation of the linearized RTL Code. Each RTL instruction is
+%% translated to a list of LLVM Assembly instructions. The relocation
+%% dictionary is updated when needed.
+%%------------------------------------------------------------------------------
+translate_instr_list([], Acc, Relocs, Data) ->
+ {lists:reverse(lists:flatten(Acc)), Relocs, Data};
+translate_instr_list([I | Is], Acc, Relocs, Data) ->
+ {Acc1, NewRelocs, NewData} = translate_instr(I, Relocs, Data),
+ translate_instr_list(Is, [Acc1 | Acc], NewRelocs, NewData).
+
+translate_instr(I, Relocs, Data) ->
+ case I of
+ #alu{} ->
+ {I2, Relocs2} = trans_alu(I, Relocs),
+ {I2, Relocs2, Data};
+ #alub{} ->
+ {I2, Relocs2} = trans_alub(I, Relocs),
+ {I2, Relocs2, Data};
+ #branch{} ->
+ {I2, Relocs2} = trans_branch(I, Relocs),
+ {I2, Relocs2, Data};
+ #call{} ->
+ {I2, Relocs2} =
+ case hipe_rtl:call_fun(I) of
+ %% In AMD64 this instruction does nothing!
+ %% TODO: chech use of fwait in other architectures!
+ fwait ->
+ {[], Relocs};
+ _ ->
+ trans_call(I, Relocs)
+ end,
+ {I2, Relocs2, Data};
+ #comment{} ->
+ {I2, Relocs2} = trans_comment(I, Relocs),
+ {I2, Relocs2, Data};
+ #enter{} ->
+ {I2, Relocs2} = trans_enter(I, Relocs),
+ {I2, Relocs2, Data};
+ #fconv{} ->
+ {I2, Relocs2} = trans_fconv(I, Relocs),
+ {I2, Relocs2, Data};
+ #fload{} ->
+ {I2, Relocs2} = trans_fload(I, Relocs),
+ {I2, Relocs2, Data};
+ #fmove{} ->
+ {I2, Relocs2} = trans_fmove(I, Relocs),
+ {I2, Relocs2, Data};
+ #fp{} ->
+ {I2, Relocs2} = trans_fp(I, Relocs),
+ {I2, Relocs2, Data};
+ #fp_unop{} ->
+ {I2, Relocs2} = trans_fp_unop(I, Relocs),
+ {I2, Relocs2, Data};
+ #fstore{} ->
+ {I2, Relocs2} = trans_fstore(I, Relocs),
+ {I2, Relocs2, Data};
+ #goto{} ->
+ {I2, Relocs2} = trans_goto(I, Relocs),
+ {I2, Relocs2, Data};
+ #label{} ->
+ {I2, Relocs2} = trans_label(I, Relocs),
+ {I2, Relocs2, Data};
+ #load{} ->
+ {I2, Relocs2} = trans_load(I, Relocs),
+ {I2, Relocs2, Data};
+ #load_address{} ->
+ {I2, Relocs2} = trans_load_address(I, Relocs),
+ {I2, Relocs2, Data};
+ #load_atom{} ->
+ {I2, Relocs2} = trans_load_atom(I, Relocs),
+ {I2, Relocs2, Data};
+ #move{} ->
+ {I2, Relocs2} = trans_move(I, Relocs),
+ {I2, Relocs2, Data};
+ #return{} ->
+ {I2, Relocs2} = trans_return(I, Relocs),
+ {I2, Relocs2, Data};
+ #store{} ->
+ {I2, Relocs2} = trans_store(I, Relocs),
+ {I2, Relocs2, Data};
+ #switch{} -> %% Only switch instruction updates Data
+ {I2, Relocs2, NewData} = trans_switch(I, Relocs, Data),
+ {I2, Relocs2, NewData};
+ Other ->
+ exit({?MODULE, translate_instr, {"Unknown RTL instruction", Other}})
+ end.
+
+%%
+%% alu
+%%
+trans_alu(I, Relocs) ->
+ RtlDst = hipe_rtl:alu_dst(I),
+ TmpDst = mk_temp(),
+ {Src1, I1} = trans_src(hipe_rtl:alu_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:alu_src2(I)),
+ Op = trans_op(hipe_rtl:alu_op(I)),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I3 = hipe_llvm:mk_operation(TmpDst, Op, WordTy, Src1, Src2, []),
+ I4 = store_stack_dst(TmpDst, RtlDst),
+ {[I4, I3, I2, I1], Relocs}.
+
+%%
+%% alub
+%%
+trans_alub(I, Relocs) ->
+ case hipe_rtl:alub_cond(I) of
+ Op when Op =:= overflow orelse Op =:= not_overflow ->
+ trans_alub_overflow(I, signed, Relocs);
+ ltu -> %% ltu means unsigned overflow
+ trans_alub_overflow(I, unsigned, Relocs);
+ _ ->
+ trans_alub_no_overflow(I, Relocs)
+ end.
+
+trans_alub_overflow(I, Sign, Relocs) ->
+ {Src1, I1} = trans_src(hipe_rtl:alub_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:alub_src2(I)),
+ RtlDst = hipe_rtl:alub_dst(I),
+ TmpDst = mk_temp(),
+ Name = trans_alub_op(I, Sign),
+ NewRelocs = relocs_store(Name, {call, {llvm, Name, 2}}, Relocs),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ReturnType = hipe_llvm:mk_struct([WordTy, hipe_llvm:mk_int(1)]),
+ T1 = mk_temp(),
+ I3 = hipe_llvm:mk_call(T1, false, [], [], ReturnType, "@" ++ Name,
+ [{WordTy, Src1}, {WordTy, Src2}], []),
+ %% T1{0}: result of the operation
+ I4 = hipe_llvm:mk_extractvalue(TmpDst, ReturnType, T1 , "0", []),
+ I5 = store_stack_dst(TmpDst, RtlDst),
+ 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),
+ {[I7, I6, I5, I4, I3, I2, I1], NewRelocs}.
+
+trans_alub_op(I, Sign) ->
+ Name =
+ case Sign of
+ signed ->
+ case hipe_rtl:alub_op(I) of
+ add -> "llvm.sadd.with.overflow.";
+ mul -> "llvm.smul.with.overflow.";
+ sub -> "llvm.ssub.with.overflow.";
+ Op -> exit({?MODULE, trans_alub_op, {"Unknown alub operator", Op}})
+ end;
+ unsigned ->
+ case hipe_rtl:alub_op(I) of
+ add -> "llvm.uadd.with.overflow.";
+ mul -> "llvm.umul.with.overflow.";
+ sub -> "llvm.usub.with.overflow.";
+ Op -> exit({?MODULE, trans_alub_op, {"Unknown alub operator", Op}})
+ end
+ end,
+ Type =
+ case hipe_rtl_arch:word_size() of
+ 4 -> "i32";
+ 8 -> "i64"
+ %% Other -> exit({?MODULE, trans_alub_op, {"Unknown type", Other}})
+ end,
+ Name ++ Type.
+
+trans_alub_no_overflow(I, Relocs) ->
+ %% alu
+ T = hipe_rtl:mk_alu(hipe_rtl:alub_dst(I), hipe_rtl:alub_src1(I),
+ hipe_rtl:alub_op(I), hipe_rtl:alub_src2(I)),
+ %% A trans_alu instruction cannot change relocations
+ {I1, _} = trans_alu(T, Relocs),
+ %% icmp
+ %% Translate destination as src, to match with the semantics of instruction
+ {Dst, I2} = trans_src(hipe_rtl:alub_dst(I)),
+ Cond = trans_rel_op(hipe_rtl:alub_cond(I)),
+ T3 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I5 = hipe_llvm:mk_icmp(T3, Cond, WordTy, Dst, "0"),
+ %% br
+ Metadata = branch_metadata(hipe_rtl:alub_pred(I)),
+ True_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
+ False_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
+ I6 = hipe_llvm:mk_br_cond(T3, True_label, False_label, Metadata),
+ {[I6, I5, I2, I1], Relocs}.
+
+%%
+%% branch
+%%
+trans_branch(I, Relocs) ->
+ {Src1, I1} = trans_src(hipe_rtl:branch_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:branch_src2(I)),
+ Cond = trans_rel_op(hipe_rtl:branch_cond(I)),
+ %% icmp
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I3 = hipe_llvm:mk_icmp(T1, Cond, WordTy, Src1, Src2),
+ %% br
+ True_label = mk_jump_label(hipe_rtl:branch_true_label(I)),
+ False_label = mk_jump_label(hipe_rtl:branch_false_label(I)),
+ Metadata = branch_metadata(hipe_rtl:branch_pred(I)),
+ I4 = hipe_llvm:mk_br_cond(T1, True_label, False_label, Metadata),
+ {[I4, I3, I2, I1], Relocs}.
+
+branch_metadata(X) when X =:= 0.5 -> [];
+branch_metadata(X) when X > 0.5 -> ?BRANCH_META_TAKEN;
+branch_metadata(X) when X < 0.5 -> ?BRANCH_META_NOT_TAKEN.
+
+%%
+%% call
+%%
+trans_call(I, Relocs) ->
+ RtlCallArgList= hipe_rtl:call_arglist(I),
+ RtlCallName = hipe_rtl:call_fun(I),
+ {I0, Relocs1} = expose_closure(RtlCallName, RtlCallArgList, Relocs),
+ TmpDst = mk_temp(),
+ {CallArgs, I1} = trans_call_args(RtlCallArgList),
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I2} = load_fixed_regs(FixedRegs),
+ FinalArgs = fix_reg_args(LoadedFixedRegs) ++ CallArgs,
+ {Name, I3, Relocs2} =
+ trans_call_name(RtlCallName, Relocs1, CallArgs, FinalArgs),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I4 =
+ case hipe_rtl:call_fail(I) of
+ %% Normal Call
+ [] ->
+ hipe_llvm:mk_call(T1, false, "cc 11", [], FunRetTy, Name, FinalArgs,
+ []);
+ %% Call With Exception
+ FailLabelNum ->
+ TrueLabel = "L" ++ integer_to_list(hipe_rtl:call_normal(I)),
+ FailLabel = "%FL" ++ integer_to_list(FailLabelNum),
+ II1 =
+ hipe_llvm:mk_invoke(T1, "cc 11", [], FunRetTy, Name, FinalArgs, [],
+ "%" ++ TrueLabel, FailLabel),
+ II2 = hipe_llvm:mk_label(TrueLabel),
+ [II2, II1]
+ end,
+ I5 = store_fixed_regs(FixedRegs, T1),
+ I6 =
+ case hipe_rtl:call_dstlist(I) of
+ [] -> []; %% No return value
+ [Destination] ->
+ II3 =
+ hipe_llvm:mk_extractvalue(TmpDst, FunRetTy, T1,
+ integer_to_list(?NR_PINNED_REGS), []),
+ II4 = store_stack_dst(TmpDst, Destination),
+ [II4, II3]
+ end,
+ I7 =
+ case hipe_rtl:call_continuation(I) of
+ [] -> []; %% No continuation
+ CC ->
+ {II5, _} = trans_goto(hipe_rtl:mk_goto(CC), Relocs2),
+ II5
+ end,
+ {[I7, I6, I5, I4, I3, I2, I1, I0], Relocs2}.
+
+%% In case of call to a register (closure call) with more than ?NR_ARG_REGS
+%% arguments we must track the offset this call in the code, in order to
+%% to correct the stack descriptor. So, we insert a new Label and add this label
+%% to the "table_closures"
+%% --------------------------------|--------------------------------------------
+%% Old Code | New Code
+%% --------------------------------|--------------------------------------------
+%% | br %ClosureLabel
+%% call %reg(Args) | ClosureLabel:
+%% | call %reg(Args)
+expose_closure(CallName, CallArgs, Relocs) ->
+ CallArgsNr = length(CallArgs),
+ case hipe_rtl:is_reg(CallName) andalso CallArgsNr > ?NR_ARG_REGS of
+ true ->
+ LabelNum = hipe_gensym:new_label(llvm),
+ ClosureLabel = hipe_llvm:mk_label(mk_label(LabelNum)),
+ JumpIns = hipe_llvm:mk_br(mk_jump_label(LabelNum)),
+ Relocs1 =
+ relocs_store({CallName, LabelNum},
+ {closure_label, LabelNum, CallArgsNr - ?NR_ARG_REGS},
+ Relocs),
+ {[ClosureLabel, JumpIns], Relocs1};
+ false ->
+ {[], Relocs}
+ end.
+
+trans_call_name(RtlCallName, Relocs, CallArgs, FinalArgs) ->
+ case RtlCallName of
+ PrimOp when is_atom(PrimOp) ->
+ LlvmName = trans_prim_op(PrimOp),
+ Relocs1 =
+ relocs_store(LlvmName, {call, {bif, PrimOp, length(CallArgs)}}, Relocs),
+ {"@" ++ LlvmName, [], Relocs1};
+ {M, F, A} when is_atom(M), is_atom(F), is_integer(A) ->
+ LlvmName = trans_mfa_name({M, F, A}),
+ Relocs1 =
+ relocs_store(LlvmName, {call, {M, F, length(CallArgs)}}, Relocs),
+ {"@" ++ LlvmName, [], Relocs1};
+ Reg ->
+ case hipe_rtl:is_reg(Reg) of
+ true ->
+ %% In case of a closure call, the register holding the address
+ %% of the closure must be converted to function type in
+ %% order to make the call
+ TT1 = mk_temp(),
+ {RegName, II1} = trans_src(Reg),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ II2 =
+ hipe_llvm:mk_conversion(TT1, inttoptr, WordTy, RegName, WordTyPtr),
+ TT2 = mk_temp(),
+ ArgsTypeList = lists:duplicate(length(FinalArgs), WordTy),
+ FunRetTy =
+ hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ FunType = hipe_llvm:mk_fun(FunRetTy, ArgsTypeList),
+ FunTypeP = hipe_llvm:mk_pointer(FunType),
+ II3 = hipe_llvm:mk_conversion(TT2, bitcast, WordTyPtr, TT1, FunTypeP),
+ {TT2, [II3, II2, II1], Relocs};
+ false ->
+ exit({?MODULE, trans_call, {"Unimplemented call to", RtlCallName}})
+ end
+ end.
+
+%%
+trans_call_args(ArgList) ->
+ {Args, I} = lists:unzip(trans_args(ArgList)),
+ %% Reverse arguments that are passed to stack to match with the Erlang
+ %% calling convention. (Propably not needed in prim calls.)
+ ReversedArgs =
+ case erlang:length(Args) > ?NR_ARG_REGS of
+ false ->
+ Args;
+ true ->
+ {ArgsInRegs, ArgsInStack} = lists:split(?NR_ARG_REGS, Args),
+ ArgsInRegs ++ lists:reverse(ArgsInStack)
+ end,
+ %% Reverse I, because some of the arguments may go out of scope and
+ %% should be killed(store -5). When two or more arguments are they
+ %% same, then order matters!
+ {ReversedArgs, lists:reverse(I)}.
+
+%%
+%% trans_comment
+%%
+trans_comment(I, Relocs) ->
+ I1 = hipe_llvm:mk_comment(hipe_rtl:comment_text(I)),
+ {I1, Relocs}.
+
+%%
+%% enter
+%%
+trans_enter(I, Relocs) ->
+ {CallArgs, I0} = trans_call_args(hipe_rtl:enter_arglist(I)),
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I1} = load_fixed_regs(FixedRegs),
+ FinalArgs = fix_reg_args(LoadedFixedRegs) ++ CallArgs,
+ {Name, I2, NewRelocs} =
+ trans_call_name(hipe_rtl:enter_fun(I), Relocs, CallArgs, FinalArgs),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I3 = hipe_llvm:mk_call(T1, true, "cc 11", [], FunRetTy, Name, FinalArgs, []),
+ I4 = hipe_llvm:mk_ret([{FunRetTy, T1}]),
+ {[I4, I3, I2, I1, I0], NewRelocs}.
+
+%%
+%% fconv
+%%
+trans_fconv(I, Relocs) ->
+ %% XXX: Can a fconv destination be a precoloured reg?
+ RtlDst = hipe_rtl:fconv_dst(I),
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(hipe_rtl:fconv_src(I)),
+ FloatTy = hipe_llvm:mk_double(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I2 = hipe_llvm:mk_conversion(TmpDst, sitofp, WordTy, Src, FloatTy),
+ I3 = store_float_stack(TmpDst, RtlDst),
+ {[I3, I2, I1], Relocs}.
+
+
+%% TODO: fload, fstore, fmove, and fp are almost the same with load, store, move
+%% and alu. Maybe we should join them.
+
+%%
+%% fload
+%%
+trans_fload(I, Relocs) ->
+ RtlDst = hipe_rtl:fload_dst(I),
+ RtlSrc = hipe_rtl:fload_src(I),
+ _Offset = hipe_rtl:fload_offset(I),
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(RtlSrc),
+ {Offset, I2} = trans_float_src(_Offset),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FloatTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_double()),
+ I3 = hipe_llvm:mk_operation(T1, add, WordTy, Src, Offset, []),
+ T2 = mk_temp(),
+ I4 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, FloatTyPtr),
+ I5 = hipe_llvm:mk_load(TmpDst, FloatTyPtr, T2, [], [], false),
+ I6 = store_float_stack(TmpDst, RtlDst),
+ {[I6, I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% fmove
+%%
+trans_fmove(I, Relocs) ->
+ RtlDst = hipe_rtl:fmove_dst(I),
+ RtlSrc = hipe_rtl:fmove_src(I),
+ {Src, I1} = trans_float_src(RtlSrc),
+ I2 = store_float_stack(Src, RtlDst),
+ {[I2, I1], Relocs}.
+
+%%
+%% fp
+%%
+trans_fp(I, Relocs) ->
+ %% XXX: Just copied trans_alu...think again..
+ RtlDst = hipe_rtl:fp_dst(I),
+ RtlSrc1 = hipe_rtl:fp_src1(I),
+ RtlSrc2 = hipe_rtl:fp_src2(I),
+ %% Destination cannot be a precoloured register
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ TmpDst = mk_temp(),
+ {Src1, I1} = trans_float_src(RtlSrc1),
+ {Src2, I2} = trans_float_src(RtlSrc2),
+ Op = trans_fp_op(hipe_rtl:fp_op(I)),
+ I3 = hipe_llvm:mk_operation(TmpDst, Op, FloatTy, Src1, Src2, []),
+ I4 = store_float_stack(TmpDst, RtlDst),
+ %% Synchronization for floating point exceptions
+ I5 = hipe_llvm:mk_store(FloatTy, TmpDst, FloatTyPtr, "%exception_sync", [],
+ [], true),
+ T1 = mk_temp(),
+ I6 = hipe_llvm:mk_load(T1, FloatTyPtr, "%exception_sync", [], [], true),
+ {[I6, I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% fp_unop
+%%
+trans_fp_unop(I, Relocs) ->
+ RtlDst = hipe_rtl:fp_unop_dst(I),
+ RtlSrc = hipe_rtl:fp_unop_src(I),
+ %% Destination cannot be a precoloured register
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(RtlSrc),
+ Op = trans_fp_op(hipe_rtl:fp_unop_op(I)),
+ FloatTy = hipe_llvm:mk_double(),
+ I2 = hipe_llvm:mk_operation(TmpDst, Op, FloatTy, "0.0", Src, []),
+ I3 = store_float_stack(TmpDst, RtlDst),
+ {[I3, I2, I1], Relocs}.
+%% TODO: Fix fp_unop in a way like the following. You must change trans_dest,
+%% in order to call float_to_list in a case of float constant. Maybe the type
+%% check is expensive...
+%% Dst = hipe_rtl:fp_unop_dst(I),
+%% Src = hipe_rtl:fp_unop_src(I),
+%% Op = hipe_rtl:fp_unop_op(I),
+%% Zero = hipe_rtl:mk_imm(0.0),
+%% I1 = hipe_rtl:mk_fp(Dst, Zero, Op, Src),
+%% trans_fp(I, Relocs1).
+
+%%
+%% fstore
+%%
+trans_fstore(I, Relocs) ->
+ Base = hipe_rtl:fstore_base(I),
+ case isPrecoloured(Base) of
+ true ->
+ trans_fstore_reg(I, Relocs);
+ false ->
+ exit({?MODULE, trans_fstore ,{"Not implemented yet", false}})
+ end.
+
+trans_fstore_reg(I, Relocs) ->
+ {Base, I0} = trans_reg(hipe_rtl:fstore_base(I), dst),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, Base, [], [], false),
+ {Offset, I2} = trans_src(hipe_rtl:fstore_offset(I)),
+ T2 = mk_temp(),
+ I3 = hipe_llvm:mk_operation(T2, add, WordTy, T1, Offset, []),
+ T3 = mk_temp(),
+ I4 = hipe_llvm:mk_conversion(T3, inttoptr, WordTy, T2, FloatTyPtr),
+ {Value, I5} = trans_src(hipe_rtl:fstore_src(I)),
+ I6 = hipe_llvm:mk_store(FloatTy, Value, FloatTyPtr, T3, [], [], false),
+ {[I6, I5, I4, I3, I2, I1, I0], Relocs}.
+
+%%
+%% goto
+%%
+trans_goto(I, Relocs) ->
+ I1 = hipe_llvm:mk_br(mk_jump_label(hipe_rtl:goto_label(I))),
+ {I1, Relocs}.
+
+%%
+%% label
+%%
+trans_label(I, Relocs) ->
+ Label = mk_label(hipe_rtl:label_name(I)),
+ I1 = hipe_llvm:mk_label(Label),
+ {I1, Relocs}.
+
+%%
+%% load
+%%
+trans_load(I, Relocs) ->
+ RtlDst = hipe_rtl:load_dst(I),
+ TmpDst = mk_temp(),
+ %% XXX: Why translate them independently? ------------------------
+ {Src, I1} = trans_src(hipe_rtl:load_src(I)),
+ {Offset, I2} = trans_src(hipe_rtl:load_offset(I)),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ I3 = hipe_llvm:mk_operation(T1, add, WordTy, Src, Offset, []),
+ %%----------------------------------------------------------------
+ I4 = case hipe_rtl:load_size(I) of
+ word ->
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, WordTyPtr),
+ II2 = hipe_llvm:mk_load(TmpDst, WordTyPtr, T2, [], [], false),
+ [II2, II1];
+ Size ->
+ LoadType = llvm_type_from_size(Size),
+ LoadTypeP = hipe_llvm:mk_pointer(LoadType),
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, LoadTypeP),
+ T3 = mk_temp(),
+ LoadTypePointer = hipe_llvm:mk_pointer(LoadType),
+ II2 = hipe_llvm:mk_load(T3, LoadTypePointer, T2, [], [], false),
+ Conversion =
+ case hipe_rtl:load_sign(I) of
+ signed -> sext;
+ unsigned -> zext
+ end,
+ II3 =
+ hipe_llvm:mk_conversion(TmpDst, Conversion, LoadType, T3, WordTy),
+ [II3, II2, II1]
+ end,
+ I5 = store_stack_dst(TmpDst, RtlDst),
+ {[I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% load_address
+%%
+trans_load_address(I, Relocs) ->
+ RtlDst = hipe_rtl:load_address_dst(I),
+ RtlAddr = hipe_rtl:load_address_addr(I),
+ {Addr, NewRelocs} =
+ case hipe_rtl:load_address_type(I) of
+ constant ->
+ {"%DL" ++ integer_to_list(RtlAddr) ++ "_var", Relocs};
+ closure ->
+ {{_, ClosureName, _}, _, _} = RtlAddr,
+ FixedClosureName = fix_closure_name(ClosureName),
+ Relocs1 = relocs_store(FixedClosureName, {closure, RtlAddr}, Relocs),
+ {"%" ++ FixedClosureName ++ "_var", Relocs1};
+ type ->
+ exit({?MODULE, trans_load_address,
+ {"Type not implemented in load_address", RtlAddr}})
+ end,
+ I1 = store_stack_dst(Addr, RtlDst),
+ {[I1], NewRelocs}.
+
+%%
+%% load_atom
+%%
+trans_load_atom(I, Relocs) ->
+ RtlDst = hipe_rtl:load_atom_dst(I),
+ RtlAtom = hipe_rtl:load_atom_atom(I),
+ AtomName = "atom_" ++ make_llvm_id(atom_to_list(RtlAtom)),
+ AtomVar = "%" ++ AtomName ++ "_var",
+ NewRelocs = relocs_store(AtomName, {atom, RtlAtom}, Relocs),
+ I1 = store_stack_dst(AtomVar, RtlDst),
+ {[I1], NewRelocs}.
+
+%%
+%% move
+%%
+trans_move(I, Relocs) ->
+ RtlDst = hipe_rtl:move_dst(I),
+ RtlSrc = hipe_rtl:move_src(I),
+ {Src, I1} = trans_src(RtlSrc),
+ I2 = store_stack_dst(Src, RtlDst),
+ {[I2, I1], Relocs}.
+
+%%
+%% return
+%%
+trans_return(I, Relocs) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ {VarRet, I1} =
+ case hipe_rtl:return_varlist(I) of
+ [] ->
+ {[], []};
+ [A] ->
+ {Name, II1} = trans_src(A),
+ {[{WordTy, Name}], II1}
+ end,
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I2} = load_fixed_regs(FixedRegs),
+ FixedRet = [{WordTy, X} || X <- LoadedFixedRegs],
+ Ret = FixedRet ++ VarRet,
+ {RetTypes, _RetNames} = lists:unzip(Ret),
+ Type = hipe_llvm:mk_struct(RetTypes),
+ {RetStruct, I3} = mk_return_struct(Ret, Type),
+ I4 = hipe_llvm:mk_ret([{Type, RetStruct}]),
+ {[I4, I3, I2, I1], Relocs}.
+
+%% @doc Create a structure to hold the return value and the precoloured
+%% registers.
+mk_return_struct(RetValues, Type) ->
+ mk_return_struct(RetValues, Type, [], "undef", 0).
+
+mk_return_struct([], _, Acc, StructName, _) ->
+ {StructName, Acc};
+mk_return_struct([{ElemType, ElemName}|Rest], Type, Acc, StructName, Index) ->
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_insertvalue(T1, Type, StructName, ElemType, ElemName,
+ integer_to_list(Index), []),
+ mk_return_struct(Rest, Type, [I1 | Acc], T1, Index+1).
+
+%%
+%% store
+%%
+trans_store(I, Relocs) ->
+ {Base, I1} = trans_src(hipe_rtl:store_base(I)),
+ {Offset, I2} = trans_src(hipe_rtl:store_offset(I)),
+ {Value, I3} = trans_src(hipe_rtl:store_src(I)),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ I4 = hipe_llvm:mk_operation(T1, add, WordTy, Base, Offset, []),
+ I5 =
+ case hipe_rtl:store_size(I) of
+ word ->
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, WordTyPtr),
+ II2 = hipe_llvm:mk_store(WordTy, Value, WordTyPtr, T2, [], [],
+ false),
+ [II2, II1];
+ Size ->
+ %% XXX: Is always trunc correct ?
+ LoadType = llvm_type_from_size(Size),
+ LoadTypePointer = hipe_llvm:mk_pointer(LoadType),
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, LoadTypePointer),
+ T3 = mk_temp(),
+ II2 = hipe_llvm:mk_conversion(T3, 'trunc', WordTy, Value, LoadType),
+ II3 = hipe_llvm:mk_store(LoadType, T3, LoadTypePointer, T2, [], [], false),
+ [II3, II2, II1]
+ end,
+ {[I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% switch
+%%
+trans_switch(I, Relocs, Data) ->
+ RtlSrc = hipe_rtl:switch_src(I),
+ {Src, I1} = trans_src(RtlSrc),
+ Labels = hipe_rtl:switch_labels(I),
+ JumpLabels = [mk_jump_label(L) || L <- Labels],
+ SortOrder = hipe_rtl:switch_sort_order(I),
+ NrLabels = length(Labels),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ TableType = hipe_llvm:mk_array(NrLabels, ByteTyPtr),
+ TableTypeP = hipe_llvm:mk_pointer(TableType),
+ TypedJumpLabels = [{hipe_llvm:mk_label_type(), X} || X <- JumpLabels],
+ T1 = mk_temp(),
+ {Src2, []} = trans_dst(RtlSrc),
+ TableName = "table_" ++ tl(Src2),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I2 = hipe_llvm:mk_getelementptr(T1, TableTypeP, "@"++TableName,
+ [{WordTy, "0"}, {WordTy, Src}], false),
+ T2 = mk_temp(),
+ BYTE_TYPE_PP = hipe_llvm:mk_pointer(ByteTyPtr),
+ I3 = hipe_llvm:mk_load(T2, BYTE_TYPE_PP, T1, [], [], false),
+ I4 = hipe_llvm:mk_indirectbr(ByteTyPtr, T2, TypedJumpLabels),
+ LMap = [{label, L} || L <- Labels],
+ %% Update data with the info for the jump table
+ {NewData, JTabLab} =
+ case hipe_rtl:switch_sort_order(I) of
+ [] ->
+ hipe_consttab:insert_block(Data, word, LMap);
+ SortOrder ->
+ hipe_consttab:insert_sorted_block(Data, word, LMap, SortOrder)
+ end,
+ Relocs2 = relocs_store(TableName, {switch, {TableType, Labels, NrLabels,
+ SortOrder}, JTabLab}, Relocs),
+ {[I4, I3, I2, I1], Relocs2, NewData}.
+
+%% @doc Pass on RTL code in order to fix invoke and closure calls.
+fix_code(Code) ->
+ fix_calls(Code).
+
+%% @doc Fix invoke calls and closure calls with more than ?NR_ARG_REGS
+%% arguments.
+fix_calls(Code) ->
+ fix_calls(Code, [], []).
+
+fix_calls([], Acc, FailLabels) ->
+ {lists:reverse(Acc), FailLabels};
+fix_calls([I | Is], Acc, FailLabels) ->
+ case hipe_rtl:is_call(I) of
+ true ->
+ {NewCall, NewFailLabels} =
+ case hipe_rtl:call_fail(I) of
+ [] ->
+ {I, FailLabels};
+ FailLabel ->
+ fix_invoke_call(I, FailLabel, FailLabels)
+ end,
+ fix_calls(Is, [NewCall|Acc], NewFailLabels);
+ false ->
+ fix_calls(Is, [I|Acc], FailLabels)
+ end.
+
+%% @doc When a call has a fail continuation label it must be extended with a
+%% normal continuation label to go with the LLVM's invoke instruction.
+%% FailLabels is the list of labels of all fail blocks, which are needed to
+%% be declared as landing pads. Furtermore, we must add to fail labels a
+%% call to hipe_bifs:llvm_fix_pinned_regs/0 in order to avoid reloading old
+%% values of pinned registers. This may happen because the result of an
+%% invoke instruction is not available at fail-labels, and, thus, we cannot
+%% get the correct values of pinned registers. Finally, the stack needs to
+%% be re-adjusted when there are stack arguments.
+fix_invoke_call(I, FailLabel, FailLabels) ->
+ NewLabel = hipe_gensym:new_label(llvm),
+ NewCall1 = hipe_rtl:call_normal_update(I, NewLabel),
+ SpAdj = find_sp_adj(hipe_rtl:call_arglist(I)),
+ case lists:keyfind(FailLabel, 1, FailLabels) of
+ %% Same fail label with same Stack Pointer adjustment
+ {FailLabel, NewFailLabel, SpAdj} ->
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, FailLabels};
+ %% Same fail label but with different Stack Pointer adjustment
+ {_, _, _} ->
+ NewFailLabel = hipe_gensym:new_label(llvm),
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, [{FailLabel, NewFailLabel, SpAdj} | FailLabels]};
+ %% New Fail label
+ false ->
+ NewFailLabel = hipe_gensym:new_label(llvm),
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, [{FailLabel, NewFailLabel, SpAdj} | FailLabels]}
+ end.
+
+find_sp_adj(ArgList) ->
+ NrArgs = length(ArgList),
+ case NrArgs > ?NR_ARG_REGS of
+ true ->
+ (NrArgs - ?NR_ARG_REGS) * hipe_rtl_arch:word_size();
+ false ->
+ 0
+ end.
+
+%% @doc Add landingpad instruction in Fail Blocks.
+add_landingpads(LLVM_Code, FailLabels) ->
+ FailLabels2 = [convert_label(T) || T <- FailLabels],
+ add_landingpads(LLVM_Code, FailLabels2, []).
+
+add_landingpads([], _, Acc) ->
+ lists:reverse(Acc);
+add_landingpads([I | Is], FailLabels, Acc) ->
+ case hipe_llvm:is_label(I) of
+ true ->
+ Label = hipe_llvm:label_label(I),
+ Ins = create_fail_blocks(Label, FailLabels),
+ add_landingpads(Is, FailLabels, [I | Ins] ++ Acc);
+ false ->
+ add_landingpads(Is, FailLabels, [I | Acc])
+ end.
+
+convert_label({X,Y,Z}) ->
+ {"L" ++ integer_to_list(X), "FL" ++ integer_to_list(Y), Z}.
+
+%% @doc Create a fail block wich.
+create_fail_blocks(_, []) -> [];
+create_fail_blocks(Label, FailLabels) ->
+ create_fail_blocks(Label, FailLabels, []).
+
+create_fail_blocks(Label, FailLabels, Acc) ->
+ case lists:keytake(Label, 1, FailLabels) of
+ false ->
+ Acc;
+ {value, {Label, FailLabel, SpAdj}, RestFailLabels} ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I1 = hipe_llvm:mk_label(FailLabel),
+ LP = hipe_llvm:mk_landingpad(),
+ I2 =
+ case SpAdj > 0 of
+ true ->
+ StackPointer = ?ARCH_REGISTERS:reg_name(?ARCH_REGISTERS:sp()),
+ hipe_llvm:mk_adj_stack(integer_to_list(SpAdj), StackPointer,
+ WordTy);
+ false -> []
+ end,
+ T1 = mk_temp(),
+ FixedRegs = fixed_registers(),
+ FunRetTy =
+ hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I3 = hipe_llvm:mk_call(T1, false, "cc 11", [], FunRetTy,
+ "@hipe_bifs.llvm_fix_pinned_regs.0", [], []),
+ I4 = store_fixed_regs(FixedRegs, T1),
+ I5 = hipe_llvm:mk_br("%" ++ Label),
+ Ins = lists:flatten([I5, I4, I3, I2, LP,I1]),
+ create_fail_blocks(Label, RestFailLabels, Ins ++ Acc)
+ end.
+
+%%------------------------------------------------------------------------------
+%% Miscellaneous Functions
+%%------------------------------------------------------------------------------
+
+%% @doc Convert RTL argument list to LLVM argument list.
+trans_args(ArgList) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ MakeArg =
+ fun(A) ->
+ {Name, I1} = trans_src(A),
+ {{WordTy, Name}, I1}
+ end,
+ [MakeArg(A) || A <- ArgList].
+
+%% @doc Convert a list of Precoloured registers to LLVM argument list.
+fix_reg_args(ArgList) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, A} || A <- ArgList].
+
+%% @doc Load Precoloured registers.
+load_fixed_regs(RegList) ->
+ Names = [mk_temp_reg(R) || R <- RegList],
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ Fun1 =
+ fun (X, Y) ->
+ hipe_llvm:mk_load(X, WordTyPtr, "%" ++ Y ++ "_reg_var", [], [], false)
+ end,
+ Ins = lists:zipwith(Fun1, Names, RegList),
+ {Names, Ins}.
+
+%% @doc Store Precoloured registers.
+store_fixed_regs(RegList, Name) ->
+ Names = [mk_temp_reg(R) || R <- RegList],
+ Indexes = lists:seq(0, erlang:length(RegList) - 1),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ Fun1 =
+ fun(X,Y) ->
+ hipe_llvm:mk_extractvalue(X, FunRetTy, Name, integer_to_list(Y), [])
+ end,
+ I1 = lists:zipwith(Fun1, Names, Indexes),
+ Fun2 =
+ fun (X, Y) ->
+ hipe_llvm:mk_store(WordTy, X, WordTyPtr, "%" ++ Y ++ "_reg_var", [], [],
+ false)
+ end,
+ I2 = lists:zipwith(Fun2, Names, RegList),
+ [I2, I1].
+
+%%------------------------------------------------------------------------------
+%% Translation of Names
+%%------------------------------------------------------------------------------
+
+%% @doc Fix F in MFA tuple to acceptable LLVM identifier (case of closure).
+-spec fix_mfa_name(mfa()) -> mfa().
+fix_mfa_name({Mod_Name, Closure_Name, Arity}) ->
+ Fun_Name = list_to_atom(fix_closure_name(Closure_Name)),
+ {Mod_Name, Fun_Name, Arity}.
+
+%% @doc Make an acceptable LLVM identifier for a closure name.
+fix_closure_name(ClosureName) ->
+ make_llvm_id(atom_to_list(ClosureName)).
+
+%% @doc Create an acceptable LLVM identifier.
+make_llvm_id(Name) ->
+ case Name of
+ "" -> "Empty";
+ Other -> lists:flatten([llvm_id(C) || C <- Other])
+ end.
+
+llvm_id(C) when C=:=46; C>47 andalso C<58; C>64 andalso C<91; C=:=95;
+ C>96 andalso C<123 ->
+ C;
+llvm_id(C) ->
+ io_lib:format("_~2.16.0B_",[C]).
+
+%% @doc Create an acceptable LLVM identifier for an MFA.
+trans_mfa_name({M,F,A}) ->
+ N = atom_to_list(M) ++ "." ++ atom_to_list(F) ++ "." ++ integer_to_list(A),
+ make_llvm_id(N).
+
+%%------------------------------------------------------------------------------
+%% Creation of Labels and Temporaries
+%%------------------------------------------------------------------------------
+mk_label(N) ->
+ "L" ++ integer_to_list(N).
+
+mk_jump_label(N) ->
+ "%L" ++ integer_to_list(N).
+
+mk_temp() ->
+ "%t" ++ integer_to_list(hipe_gensym:new_var(llvm)).
+
+mk_temp_reg(Name) ->
+ "%" ++ Name ++ integer_to_list(hipe_gensym:new_var(llvm)).
+
+%%----------------------------------------------------------------------------
+%% Translation of Operands
+%%----------------------------------------------------------------------------
+
+store_stack_dst(TempDst, Dst) ->
+ {Dst2, II1} = trans_dst(Dst),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ II2 = hipe_llvm:mk_store(WordTy, TempDst, WordTyPtr, Dst2, [], [], false),
+ [II2, II1].
+
+store_float_stack(TempDst, Dst) ->
+ {Dst2, II1} = trans_dst(Dst),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ II2 = hipe_llvm:mk_store(FloatTy, TempDst, FloatTyPtr, Dst2, [], [], false),
+ [II2, II1].
+
+trans_float_src(Src) ->
+ case hipe_rtl:is_const_label(Src) of
+ true ->
+ Name = "@DL" ++ integer_to_list(hipe_rtl:const_label_label(Src)),
+ T1 = mk_temp(),
+ %% XXX: Hardcoded offset
+ ByteTy = hipe_llvm:mk_int(8),
+ ByteTyPtr = hipe_llvm:mk_pointer(ByteTy),
+ I1 = hipe_llvm:mk_getelementptr(T1, ByteTyPtr, Name,
+ [{ByteTy, integer_to_list(?FLOAT_OFFSET)}], true),
+ T2 = mk_temp(),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ I2 = hipe_llvm:mk_conversion(T2, bitcast, ByteTyPtr, T1, FloatTyPtr),
+ T3 = mk_temp(),
+ I3 = hipe_llvm:mk_load(T3, FloatTyPtr, T2, [], [], false),
+ {T3, [I3, I2, I1]};
+ false ->
+ trans_src(Src)
+ end.
+
+trans_src(A) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ case hipe_rtl:is_imm(A) of
+ true ->
+ Value = integer_to_list(hipe_rtl:imm_value(A)),
+ {Value, []};
+ false ->
+ case hipe_rtl:is_reg(A) of
+ true ->
+ case isPrecoloured(A) of
+ true -> trans_reg(A, src);
+ false ->
+ {Name, []} = trans_reg(A, src),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, Name, [], [], false),
+ {T1, [I1]}
+ end;
+ false ->
+ case hipe_rtl:is_var(A) of
+ true ->
+ RootName = "%vr" ++ integer_to_list(hipe_rtl:var_index(A)),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, RootName, [], [], false),
+ I2 =
+ case hipe_rtl:var_liveness(A) of
+ live ->
+ [];
+ dead ->
+ NilValue = hipe_tagscheme:mk_nil(),
+ hipe_llvm:mk_store(WordTy, integer_to_list(NilValue), WordTyPtr, RootName,
+ [], [], false)
+ end,
+ {T1, [I2, I1]};
+ false ->
+ case hipe_rtl:is_fpreg(A) of
+ true ->
+ {Name, []} = trans_dst(A),
+ T1 = mk_temp(),
+ FloatTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_double()),
+ I1 = hipe_llvm:mk_load(T1, FloatTyPtr, Name, [], [], false),
+ {T1, [I1]};
+ false -> trans_dst(A)
+ end
+ end
+ end
+ end.
+
+trans_dst(A) ->
+ case hipe_rtl:is_reg(A) of
+ true ->
+ trans_reg(A, dst);
+ false ->
+ Name = case hipe_rtl:is_var(A) of
+ true ->
+ "%vr" ++ integer_to_list(hipe_rtl:var_index(A));
+ false ->
+ case hipe_rtl:is_fpreg(A) of
+ true -> "%fr" ++ integer_to_list(hipe_rtl:fpreg_index(A));
+ false ->
+ case hipe_rtl:is_const_label(A) of
+ true ->
+ "%DL" ++ integer_to_list(hipe_rtl:const_label_label(A)) ++ "_var";
+ false ->
+ exit({?MODULE, trans_dst, {"Bad RTL argument",A}})
+ end
+ end
+ end,
+ {Name, []}
+ end.
+
+%% @doc Translate a register. If it is precoloured it must be mapped to the
+%% correct stack slot that holds the precoloured register value.
+trans_reg(Arg, Position) ->
+ Index = hipe_rtl:reg_index(Arg),
+ case isPrecoloured(Arg) of
+ true ->
+ Name = map_precoloured_reg(Index),
+ case Position of
+ src -> fix_reg_src(Name);
+ dst -> fix_reg_dst(Name)
+ end;
+ false ->
+ {hipe_rtl_arch:reg_name(Index), []}
+ end.
+
+map_precoloured_reg(Index) ->
+ case hipe_rtl_arch:reg_name(Index) of
+ "%r15" -> "%hp_reg_var";
+ "%rbp" -> "%p_reg_var";
+ "%esi" -> "%hp_reg_var";
+ "%ebp" -> "%p_reg_var";
+ "%fcalls" ->
+ {"%p_reg_var", ?ARCH_REGISTERS:proc_offset(?ARCH_REGISTERS:fcalls())};
+ "%hplim" ->
+ {"%p_reg_var", ?ARCH_REGISTERS:proc_offset(?ARCH_REGISTERS:heap_limit())};
+ _ ->
+ exit({?MODULE, map_precoloured_reg, {"Register not mapped yet", Index}})
+ end.
+
+%% @doc Load precoloured dst register.
+fix_reg_dst(Register) ->
+ case Register of
+ {Name, Offset} -> %% Case of %fcalls, %hplim
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ pointer_from_reg(Name, WordTy, Offset);
+ Name -> %% Case of %p and %hp
+ {Name, []}
+ end.
+
+%% @doc Load precoloured src register.
+fix_reg_src(Register) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ case Register of
+ {Name, Offset} -> %% Case of %fcalls, %hplim
+ {T1, I1} = pointer_from_reg(Name, WordTy, Offset),
+ T2 = mk_temp(),
+ I2 = hipe_llvm:mk_load(T2, WordTyPtr, T1, [], [] , false),
+ {T2, [I2, I1]};
+ Name -> %% Case of %p and %hp
+ T1 = mk_temp(),
+ {T1, hipe_llvm:mk_load(T1, WordTyPtr, Name, [], [], false)}
+ end.
+
+%% @doc Load %fcalls and %hplim.
+pointer_from_reg(RegName, Type, Offset) ->
+ PointerType = hipe_llvm:mk_pointer(Type),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, PointerType, RegName, [], [] ,false),
+ T2 = mk_temp(),
+ I2 = hipe_llvm:mk_conversion(T2, inttoptr, Type, T1, PointerType),
+ T3 = mk_temp(),
+ %% XXX: Offsets should be a power of 2.
+ I3 = hipe_llvm:mk_getelementptr(T3, PointerType, T2,
+ [{Type, integer_to_list(Offset div hipe_rtl_arch:word_size())}], true),
+ {T3, [I3, I2, I1]}.
+
+isPrecoloured(X) ->
+ hipe_rtl_arch:is_precoloured(X).
+
+%%------------------------------------------------------------------------------
+%% Translation of operators
+%%------------------------------------------------------------------------------
+
+trans_op(Op) ->
+ case Op of
+ add -> add;
+ sub -> sub;
+ 'or' -> 'or';
+ 'and' -> 'and';
+ 'xor' -> 'xor';
+ sll -> shl;
+ srl -> lshr;
+ sra -> ashr;
+ mul -> mul;
+ 'fdiv' -> fdiv;
+ 'sdiv' -> sdiv;
+ 'srem' -> srem;
+ Other -> exit({?MODULE, trans_op, {"Unknown RTL operator", Other}})
+ end.
+
+trans_rel_op(Op) ->
+ case Op of
+ eq -> eq;
+ ne -> ne;
+ gtu -> ugt;
+ geu -> uge;
+ ltu -> ult;
+ leu -> ule;
+ gt -> sgt;
+ ge -> sge;
+ lt -> slt;
+ le -> sle
+ end.
+
+trans_prim_op(Op) ->
+ case Op of
+ '+' -> "bif_add";
+ '-' -> "bif_sub";
+ '*' -> "bif_mul";
+ 'div' -> "bif_div";
+ '/' -> "bif_div";
+ Other -> atom_to_list(Other)
+ end.
+
+trans_fp_op(Op) ->
+ case Op of
+ fadd -> fadd;
+ fsub -> fsub;
+ fdiv -> fdiv;
+ fmul -> fmul;
+ fchs -> fsub;
+ Other -> exit({?MODULE, trans_fp_op, {"Unknown RTL float operator",Other}})
+ end.
+
+%% Misc.
+insn_dst(I) ->
+ case I of
+ #alu{} ->
+ [hipe_rtl:alu_dst(I)];
+ #alub{} ->
+ [hipe_rtl:alub_dst(I)];
+ #call{} ->
+ case hipe_rtl:call_dstlist(I) of
+ [] -> [];
+ [Dst] -> [Dst]
+ end;
+ #load{} ->
+ [hipe_rtl:load_dst(I)];
+ #load_address{} ->
+ [hipe_rtl:load_address_dst(I)];
+ #load_atom{} ->
+ [hipe_rtl:load_atom_dst(I)];
+ #move{} ->
+ [hipe_rtl:move_dst(I)];
+ #phi{} ->
+ [hipe_rtl:phi_dst(I)];
+ #fconv{} ->
+ [hipe_rtl:fconv_dst(I)];
+ #fload{} ->
+ [hipe_rtl:fload_dst(I)];
+ #fmove{} ->
+ [hipe_rtl:fmove_dst(I)];
+ #fp{} ->
+ [hipe_rtl:fp_dst(I)];
+ #fp_unop{} ->
+ [hipe_rtl:fp_unop_dst(I)];
+ _ ->
+ []
+ end.
+
+llvm_type_from_size(Size) ->
+ case Size of
+ byte -> hipe_llvm:mk_int(8);
+ int16 -> hipe_llvm:mk_int(16);
+ int32 -> hipe_llvm:mk_int(32);
+ word -> hipe_llvm:mk_int(64)
+ end.
+
+%% @doc Create definition for the compiled function. The parameters that are
+%% passed to the stack must be reversed to match with the CC. Also
+%% precoloured registers that are passed as arguments must be stored to
+%% the corresonding stack slots.
+create_function_definition(Fun, Params, Code, LocalVars) ->
+ FunctionName = trans_mfa_name(Fun),
+ FixedRegs = fixed_registers(),
+ %% Reverse parameters to match with the Erlang calling convention
+ ReversedParams =
+ case erlang:length(Params) > ?NR_ARG_REGS of
+ false ->
+ Params;
+ true ->
+ {ParamsInRegs, ParamsInStack} = lists:split(?NR_ARG_REGS, Params),
+ ParamsInRegs ++ lists:reverse(ParamsInStack)
+ end,
+ Args = header_regs(FixedRegs) ++ header_params(ReversedParams),
+ EntryLabel = hipe_llvm:mk_label("Entry"),
+ FloatTy = hipe_llvm:mk_double(),
+ ExceptionSync = hipe_llvm:mk_alloca("%exception_sync", FloatTy, [], []),
+ I2 = load_regs(FixedRegs),
+ I3 = hipe_llvm:mk_br(mk_jump_label(get(first_label))),
+ StoredParams = store_params(Params),
+ EntryBlock =
+ lists:flatten([EntryLabel, ExceptionSync, I2, LocalVars, StoredParams, I3]),
+ Final_Code = EntryBlock ++ Code,
+ FunctionOptions = [nounwind, noredzone, list_to_atom("gc \"erlang\"")],
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ hipe_llvm:mk_fun_def([], [], "cc 11", [], FunRetTy, FunctionName, Args,
+ FunctionOptions, [], Final_Code).
+
+header_params(Params) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, "%v" ++ integer_to_list(hipe_rtl:var_index(P))} || P <- Params].
+
+store_params(Params) ->
+ Fun1 =
+ fun(X) ->
+ Index = hipe_rtl:var_index(X),
+ {Name, _} = trans_dst(X),
+ ParamName = "%v" ++ integer_to_list(Index),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ hipe_llvm:mk_store(WordTy, ParamName, WordTyPtr, Name, [], [], false)
+ end,
+ lists:map(Fun1, Params).
+
+fixed_registers() ->
+ case get(hipe_target_arch) of
+ x86 ->
+ ["hp", "p"];
+ amd64 ->
+ ["hp", "p"];
+ Other ->
+ exit({?MODULE, map_registers, {"Unknown architecture", Other}})
+ end.
+
+header_regs(Registers) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, "%" ++ X ++ "_in"} || X <- Registers].
+
+load_regs(Registers) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ Fun1 =
+ fun(X) ->
+ I1 = hipe_llvm:mk_alloca("%" ++ X ++ "_reg_var", WordTy, [], []),
+ I2 = hipe_llvm:mk_store(WordTy, "%" ++ X ++ "_in", WordTyPtr,
+ "%" ++ X ++ "_reg_var", [], [], false),
+ [I1, I2]
+ end,
+ lists:map(Fun1, Registers).
+
+%%------------------------------------------------------------------------------
+%% Relocation-specific Stuff
+%%------------------------------------------------------------------------------
+
+relocs_store(Key, Value, Relocs) ->
+ dict:store(Key, Value, Relocs).
+
+relocs_to_list(Relocs) ->
+ dict:to_list(Relocs).
+
+%% @doc This function is responsible for the actions needed to handle
+%% relocations:
+%% 1) Updates relocations with constants and switch jump tables.
+%% 2) Creates LLVM code to declare relocations as external
+%% functions/constants.
+%% 3) Creates LLVM code in order to create local variables for the external
+%% constants/labels.
+handle_relocations(Relocs, Data, Fun) ->
+ RelocsList = relocs_to_list(Relocs),
+ %% Seperate Relocations according to their type
+ {CallList, AtomList, ClosureList, ClosureLabels, SwitchList} =
+ seperate_relocs(RelocsList),
+ %% Create code to declare atoms
+ AtomDecl = [declare_atom(A) || A <- AtomList],
+ %% Create code to create local name for atoms
+ AtomLoad = [load_atom(A) || A <- AtomList],
+ %% Create code to declare closures
+ ClosureDecl = [declare_closure(C) || C <- ClosureList],
+ %% Create code to create local name for closures
+ ClosureLoad = [load_closure(C) || C <- ClosureList],
+ %% Find function calls
+ IsExternalCall = fun (X) -> is_external_call(X, Fun) end,
+ ExternalCallList = lists:filter(IsExternalCall, CallList),
+ %% Create code to declare external function
+ FunDecl = fixed_fun_decl() ++ [call_to_decl(C) || C <- ExternalCallList],
+ %% Extract constant labels from Constant Map (remove duplicates)
+ ConstLabels = hipe_consttab:labels(Data),
+ %% Create code to declare constants
+ ConstDecl = [declare_constant(C) || C <- ConstLabels],
+ %% Create code to create local name for constants
+ ConstLoad = [load_constant(C) || C <- ConstLabels],
+ %% Create code to create jump tables
+ SwitchDecl = declare_switches(SwitchList, Fun),
+ %% Create code to create a table with the labels of all closure calls
+ {ClosureLabelDecl, Relocs1} =
+ declare_closure_labels(ClosureLabels, Relocs, Fun),
+ %% Enter constants to relocations
+ Relocs2 = lists:foldl(fun const_to_dict/2, Relocs1, ConstLabels),
+ %% Temporary Store inc_stack and llvm_fix_pinned_regs to Dictionary
+ %% TODO: Remove this
+ Relocs3 = dict:store("inc_stack_0", {call, {bif, inc_stack_0, 0}}, Relocs2),
+ 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")
+ ],
+ ExternalDeclarations = AtomDecl ++ ClosureDecl ++ ConstDecl ++ FunDecl ++
+ ClosureLabelDecl ++ SwitchDecl ++ BranchMetaData,
+ LocalVariables = AtomLoad ++ ClosureLoad ++ ConstLoad,
+ {Relocs4, ExternalDeclarations, LocalVariables}.
+
+%% @doc Seperate relocations according to their type.
+seperate_relocs(Relocs) ->
+ seperate_relocs(Relocs, [], [], [], [], []).
+
+seperate_relocs([], CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc) ->
+ {CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc};
+seperate_relocs([R|Rs], CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc) ->
+ case R of
+ {_, {call, _}} ->
+ seperate_relocs(Rs, [R | CallAcc], AtomAcc, ClosureAcc, LabelAcc,
+ JmpTableAcc);
+ {_, {atom, _}} ->
+ seperate_relocs(Rs, CallAcc, [R | AtomAcc], ClosureAcc, LabelAcc,
+ JmpTableAcc);
+ {_, {closure, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, [R | ClosureAcc], LabelAcc,
+ JmpTableAcc);
+ {_, {switch, _, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, ClosureAcc, LabelAcc,
+ [R | JmpTableAcc]);
+ {_, {closure_label, _, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, ClosureAcc, [R | LabelAcc],
+ JmpTableAcc)
+ end.
+
+%% @doc External declaration of an atom.
+declare_atom({AtomName, _}) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ hipe_llvm:mk_const_decl("@" ++ AtomName, "external constant", WordTy, "").
+
+%% @doc Creation of local variable for an atom.
+load_atom({AtomName, _}) ->
+ Dst = "%" ++ AtomName ++ "_var",
+ Name = "@" ++ AtomName,
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, WordTyPtr, Name, WordTy).
+
+%% @doc External declaration of a closure.
+declare_closure({ClosureName, _})->
+ ByteTy = hipe_llvm:mk_int(8),
+ hipe_llvm:mk_const_decl("@" ++ ClosureName, "external constant", ByteTy, "").
+
+%% @doc Creation of local variable for a closure.
+load_closure({ClosureName, _})->
+ Dst = "%" ++ ClosureName ++ "_var",
+ Name = "@" ++ ClosureName,
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, ByteTyPtr, Name, WordTy).
+
+%% @doc Declaration of a local variable for a switch jump table.
+declare_switches(JumpTableList, Fun) ->
+ FunName = trans_mfa_name(Fun),
+ [declare_switch_table(X, FunName) || X <- JumpTableList].
+
+declare_switch_table({Name, {switch, {TableType, Labels, _, _}, _}}, FunName) ->
+ LabelList = [mk_jump_label(L) || L <- Labels],
+ Fun1 = fun(X) -> "i8* blockaddress(@" ++ FunName ++ ", " ++ X ++ ")" end,
+ List2 = lists:map(Fun1, LabelList),
+ List3 = string:join(List2, ",\n"),
+ List4 = "[\n" ++ List3 ++ "\n]\n",
+ hipe_llvm:mk_const_decl("@" ++ Name, "constant", TableType, List4).
+
+%% @doc Declaration of a variable for a table with the labels of all closure
+%% calls in the code.
+declare_closure_labels([], Relocs, _Fun) ->
+ {[], Relocs};
+declare_closure_labels(ClosureLabels, Relocs, Fun) ->
+ FunName = trans_mfa_name(Fun),
+ {LabelList, ArityList} =
+ lists:unzip([{mk_jump_label(Label), A} ||
+ {_, {closure_label, Label, A}} <- ClosureLabels]),
+ Relocs1 = relocs_store("table_closures", {table_closures, ArityList}, Relocs),
+ List2 =
+ ["i8* blockaddress(@" ++ FunName ++ ", " ++ L ++ ")" || L <- LabelList],
+ List3 = string:join(List2, ",\n"),
+ List4 = "[\n" ++ List3 ++ "\n]\n",
+ NrLabels = length(LabelList),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ TableType = hipe_llvm:mk_array(NrLabels, ByteTyPtr),
+ ConstDecl =
+ hipe_llvm:mk_const_decl("@table_closures", "constant", TableType, List4),
+ {[ConstDecl], Relocs1}.
+
+%% @doc A call is treated as non external only in a case of a recursive
+%% function.
+is_external_call({_, {call, Fun}}, Fun) -> false;
+is_external_call(_, _) -> true.
+
+%% @doc External declaration of a function.
+call_to_decl({Name, {call, MFA}}) ->
+ {M, _F, A} = MFA,
+ CConv = "cc 11",
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ {Type, Args} =
+ case M of
+ llvm ->
+ {hipe_llvm:mk_struct([WordTy, hipe_llvm:mk_int(1)]), [1, 2]};
+ %% +precoloured regs
+ _ ->
+ {FunRetTy, lists:seq(1, A + ?NR_PINNED_REGS)}
+ end,
+ ArgsTypes = lists:duplicate(length(Args), WordTy),
+ hipe_llvm:mk_fun_decl([], [], CConv, [], Type, "@" ++ Name, ArgsTypes, []).
+
+%% @doc These functions are always declared, even if not used.
+fixed_fun_decl() ->
+ ByteTy = hipe_llvm:mk_int(8),
+ ByteTyPtr = hipe_llvm:mk_pointer(ByteTy),
+ LandPad = hipe_llvm:mk_fun_decl([], [], [], [], hipe_llvm:mk_int(32),
+ "@__gcc_personality_v0", [hipe_llvm:mk_int(32), hipe_llvm:mk_int(64),
+ ByteTyPtr, ByteTyPtr], []),
+ GCROOTDecl = hipe_llvm:mk_fun_decl([], [], [], [], hipe_llvm:mk_void(),
+ "@llvm.gcroot", [hipe_llvm:mk_pointer(ByteTyPtr), ByteTyPtr], []),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ FixPinnedRegs = hipe_llvm:mk_fun_decl([], [], [], [], FunRetTy,
+ "@hipe_bifs.llvm_fix_pinned_regs.0", [], []),
+ GcMetadata = hipe_llvm:mk_const_decl("@gc_metadata", "external constant",
+ ByteTy, ""),
+ [LandPad, GCROOTDecl, FixPinnedRegs, GcMetadata].
+
+%% @doc Declare an External Consant. We declare all constants as i8 in order to
+%% be able to calcucate pointers of the form DL+6, with the getelementptr
+%% instruction. Otherwise we have to convert constants form pointers to
+%% values, add the offset and convert them again to pointers.
+declare_constant(Label) ->
+ Name = "@DL" ++ integer_to_list(Label),
+ ByteTy = hipe_llvm:mk_int(8),
+ hipe_llvm:mk_const_decl(Name, "external constant", ByteTy, "").
+
+%% @doc Load a constant is achieved by converting a pointer to an integer of
+%% the correct width.
+load_constant(Label) ->
+ Dst = "%DL" ++ integer_to_list(Label) ++ "_var",
+ Name = "@DL" ++ integer_to_list(Label),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, ByteTyPtr, Name, WordTy).
+
+%% @doc Store external constants and calls to dictionary.
+const_to_dict(Elem, Dict) ->
+ Name = "DL" ++ integer_to_list(Elem),
+ dict:store(Name, {'constant', Elem}, Dict).
diff --git a/lib/hipe/main/hipe.app.src b/lib/hipe/main/hipe.app.src
index 7db4db8a57..e81212d4dc 100644
--- a/lib/hipe/main/hipe.app.src
+++ b/lib/hipe/main/hipe.app.src
@@ -30,6 +30,7 @@
cerl_prettypr,
cerl_to_icode,
cerl_typean,
+ elf_format,
erl_bif_types,
erl_types,
hipe,
@@ -108,6 +109,10 @@
hipe_ig,
hipe_ig_moves,
hipe_jit,
+ hipe_llvm,
+ hipe_llvm_liveness,
+ hipe_llvm_main,
+ hipe_llvm_merge,
hipe_ls_regalloc,
hipe_main,
hipe_moves,
@@ -159,6 +164,7 @@
hipe_rtl_symbolic,
hipe_rtl_to_amd64,
hipe_rtl_to_arm,
+ hipe_rtl_to_llvm,
hipe_rtl_to_ppc,
hipe_rtl_to_sparc,
hipe_rtl_to_x86,
@@ -192,7 +198,6 @@
hipe_tagscheme,
hipe_temp_map,
hipe_timing,
- hipe_tool,
hipe_vectors,
hipe_x86,
hipe_x86_assemble,
@@ -217,4 +222,6 @@
hipe_x86_x87]},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["syntax_tools-1.6.14","stdlib-2.0","kernel-3.0",
+ "erts-6.0","compiler-5.0"]}]}.
diff --git a/lib/hipe/main/hipe.appup.src b/lib/hipe/main/hipe.appup.src
index 1d5a0d93f5..02679fab21 100644
--- a/lib/hipe/main/hipe.appup.src
+++ b/lib/hipe/main/hipe.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,4 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%", [], []}.
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 434d5c3061..539ce883c0 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -200,6 +200,7 @@
compile_core/4,
file/1,
file/2,
+ llvm_support_available/0,
load/1,
help/0,
help_hiper/0,
@@ -648,7 +649,18 @@ run_compiler_1(DisasmFun, IcodeFun, Options) ->
%% The full option expansion is not done
%% until the DisasmFun returns.
{Code, CompOpts} = DisasmFun(Options),
- Opts = expand_options(Options ++ CompOpts),
+ Opts0 = expand_options(Options ++ CompOpts),
+ Opts =
+ case proplists:get_bool(to_llvm, Opts0) andalso
+ not llvm_support_available() of
+ true ->
+ ?error_msg("No LLVM version 3.4 or greater "
+ "found in $PATH; aborting "
+ "native code compilation.\n", []),
+ ?EXIT(cant_find_required_llvm_version);
+ false ->
+ Opts0
+ end,
check_options(Opts),
?when_option(verbose, Options,
?debug_msg("Options: ~p.\n",[Opts])),
@@ -821,7 +833,9 @@ finalize_fun_sequential({MFA, Icode}, Opts, Servers) ->
?debug_msg("Compiled ~w in ~.2f s\n", [MFA,(T2-T1)/1000])),
{MFA, Code};
{rtl, LinearRtl} ->
- {MFA, LinearRtl}
+ {MFA, LinearRtl};
+ {llvm_binary, Binary} ->
+ {MFA, Binary}
catch
error:Error ->
?when_option(verbose, Opts, ?debug_untagged_msg("\n", [])),
@@ -890,21 +904,27 @@ do_load(Mod, Bin, BeamBinOrPath) when is_binary(BeamBinOrPath);
end.
assemble(CompiledCode, Closures, Exports, Options) ->
- case get(hipe_target_arch) of
- ultrasparc ->
- hipe_sparc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- powerpc ->
- hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- ppc64 ->
- hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- arm ->
- hipe_arm_assemble:assemble(CompiledCode, Closures, Exports, Options);
- x86 ->
- hipe_x86_assemble:assemble(CompiledCode, Closures, Exports, Options);
- amd64 ->
- hipe_amd64_assemble:assemble(CompiledCode, Closures, Exports, Options);
- Arch ->
- ?EXIT({executing_on_an_unsupported_architecture, Arch})
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ case get(hipe_target_arch) of
+ ultrasparc ->
+ hipe_sparc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ powerpc ->
+ hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ ppc64 ->
+ hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ arm ->
+ hipe_arm_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ x86 ->
+ hipe_x86_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ amd64 ->
+ hipe_amd64_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ Arch ->
+ ?EXIT({executing_on_an_unsupported_architecture, Arch})
+ end;
+ true ->
+ %% Merge already compiled code (per MFA) to a single binary.
+ hipe_llvm_merge:finalize(CompiledCode, Closures, Exports)
end.
%% --------------------------------------------------------------------
@@ -1330,6 +1350,11 @@ opt_keys() ->
timeregalloc,
timers,
to_rtl,
+ to_llvm, % Use the LLVM backend for compilation.
+ llvm_save_temps, % Save the LLVM intermediate files in the current
+ % directory; useful for debugging.
+ llvm_llc, % Specify llc optimization-level: o1, o2, o3, undefined.
+ llvm_opt, % Specify opt optimization-level: o1, o2, o3, undefined.
use_indexing,
use_inline_atom_search,
use_callgraph,
@@ -1468,11 +1493,19 @@ opt_expansions() ->
[{o1, o1_opts()},
{o2, o2_opts()},
{o3, o3_opts()},
+ {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)},
{x87, [x87, inline_fp]},
{inline_fp, case get(hipe_target_arch) of %% XXX: Temporary until x86
x86 -> [x87, inline_fp]; %% has sse2
_ -> [inline_fp] end}].
+llvm_opts(O) ->
+ [to_llvm, {llvm_opt, O}, {llvm_llc, O}].
+
%% This expands "basic" options, which may be tested early and cannot be
%% in conflict with options found in the source code.
@@ -1516,4 +1549,22 @@ check_options(Opts) ->
ok
end.
+-spec llvm_support_available() -> boolean().
+
+llvm_support_available() ->
+ get_llvm_version() >= 3.4.
+
+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;
+ S ->
+ case string:to_float(string:sub_string(OptStr, S + N)) of
+ {error, _} -> 0.0; %XXX: Assumes no revision numbers in versioning
+ {Float, _} -> Float
+ end
+ end.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/hipe/main/hipe_main.erl b/lib/hipe/main/hipe_main.erl
index 99028cc3c1..89b79998be 100644
--- a/lib/hipe/main/hipe_main.erl
+++ b/lib/hipe/main/hipe_main.erl
@@ -49,7 +49,7 @@
%%=====================================================================
-type comp_icode_ret() :: {'native',hipe_architecture(),{'unprofiled',_}}
- | {'rtl',tuple()}.
+ | {'rtl',tuple()} | {'llvm_binary',term()}.
%%=====================================================================
@@ -115,11 +115,18 @@ compile_icode(MFA, LinearIcode0, Options, Servers, DebugState) ->
pp(IcodeCfg7, MFA, icode_liveness, pp_icode_liveness, Options, Servers),
FinalIcode = hipe_icode_cfg:cfg_to_linear(IcodeCfg7),
?opt_stop_timer("Icode"),
- LinearRTL = ?option_time(icode_to_rtl(MFA,FinalIcode,Options, Servers),
- "RTL", Options),
+ {LinearRTL, Roots} = ?option_time(icode_to_rtl(MFA, FinalIcode, Options, Servers),
+ "RTL", Options),
case proplists:get_bool(to_rtl, Options) of
false ->
- rtl_to_native(MFA, LinearRTL, Options, DebugState);
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ rtl_to_native(MFA, LinearRTL, Options, DebugState);
+ true ->
+ %% The LLVM backend returns binary code, unlike the rest of the HiPE
+ %% backends which return native assembly.
+ rtl_to_llvm_to_binary(MFA, LinearRTL, Roots, Options, DebugState)
+ end;
true ->
put(hipe_debug, DebugState),
{rtl, LinearRTL}
@@ -385,11 +392,21 @@ icode_to_rtl(MFA, Icode, Options, Servers) ->
%% hipe_rtl_cfg:pp(RtlCfg3),
pp(RtlCfg3, MFA, rtl_liveness, pp_rtl_liveness, Options, Servers),
RtlCfg4 = rtl_lcm(RtlCfg3, Options),
- pp(RtlCfg4, MFA, rtl, pp_rtl, Options, Servers),
- LinearRTL1 = hipe_rtl_cfg:linearize(RtlCfg4),
+ %% LLVM: A liveness analysis on RTL must be performed in order to find the GC
+ %% roots and explicitly mark them (in RTL) when they go out of scope (only
+ %% when the LLVM backend is used).
+ {RtlCfg5, Roots} =
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ {RtlCfg4, []};
+ true ->
+ hipe_llvm_liveness:analyze(RtlCfg4)
+ end,
+ pp(RtlCfg5, MFA, rtl, pp_rtl, Options, Servers),
+ LinearRTL1 = hipe_rtl_cfg:linearize(RtlCfg5),
LinearRTL2 = hipe_rtl_cleanup_const:cleanup(LinearRTL1),
%% hipe_rtl:pp(standard_io, LinearRTL2),
- LinearRTL2.
+ {LinearRTL2, Roots}.
translate_to_rtl(Icode, Options) ->
%% GC tests should have been added in the conversion to Icode.
@@ -540,6 +557,17 @@ rtl_to_native(MFA, LinearRTL, Options, DebugState) ->
put(hipe_debug, DebugState),
LinearNativeCode.
+%% Translate Linear RTL to binary code using LLVM.
+rtl_to_llvm_to_binary(MFA, LinearRTL, Roots, Options, DebugState) ->
+ ?opt_start_timer("LLVM native code"),
+ %% BinaryCode is a tuple, as defined in llvm/hipe_llvm_main module, which
+ %% contains the binary code together with info needed by the loader, e.g.
+ %% ConstTab, Refs, LabelMap, etc.
+ BinaryCode = hipe_llvm_main:rtl_to_native(MFA, LinearRTL, Roots, Options),
+ ?opt_stop_timer("LLVM native code"),
+ put(hipe_debug, DebugState),
+ {llvm_binary, BinaryCode}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Debugging stuff ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/hipe/misc/hipe_consttab.erl b/lib/hipe/misc/hipe_consttab.erl
index c381e6a057..2b02f54b5c 100644
--- a/lib/hipe/misc/hipe_consttab.erl
+++ b/lib/hipe/misc/hipe_consttab.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -462,7 +462,7 @@ update_referred_labels(Table, LabelMap) ->
tree_keys(T) ->
dict:fetch_keys(T).
--spec tree_to_list(dict()) -> [{_, _}].
+-spec tree_to_list(dict:dict()) -> [{_, _}].
tree_to_list(T) ->
dict:to_list(T).
@@ -486,11 +486,11 @@ tree_lookup(Key, T) ->
none
end.
--spec tree_empty() -> dict().
+-spec tree_empty() -> dict:dict().
tree_empty() ->
dict:new().
--spec tree_lookup_key_for_value(ctdata(), dict()) -> 'none' | {'value', _}.
+-spec tree_lookup_key_for_value(ctdata(), dict:dict()) -> 'none' | {'value', _}.
tree_lookup_key_for_value(Val, T) ->
tree_lookup_key_for_value_1(tree_to_list(T), Val).
diff --git a/lib/hipe/misc/hipe_consttab.hrl b/lib/hipe/misc/hipe_consttab.hrl
index 39018dac34..aea3c5bc88 100644
--- a/lib/hipe/misc/hipe_consttab.hrl
+++ b/lib/hipe/misc/hipe_consttab.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,6 +22,6 @@
-type ct_alignment() :: 4 | 8.
-type hipe_constlbl() :: non_neg_integer().
--type hipe_consttab() :: {dict(), [hipe_constlbl()], hipe_constlbl()}.
+-type hipe_consttab() :: {dict:dict(), [hipe_constlbl()], hipe_constlbl()}.
%%-----------------------------------------------------------------------------
diff --git a/lib/hipe/misc/hipe_gensym.erl b/lib/hipe/misc/hipe_gensym.erl
index 84fc8fa7e8..4d2a237188 100644
--- a/lib/hipe/misc/hipe_gensym.erl
+++ b/lib/hipe/misc/hipe_gensym.erl
@@ -44,7 +44,7 @@
%% Types of allowable entities to set global variables for
%%-----------------------------------------------------------------------
--type gvarname() :: 'icode' | 'rtl' | 'arm' | 'ppc' | 'sparc' | 'x86'.
+-type gvarname() :: 'icode' | 'rtl' | 'arm' | 'ppc' | 'sparc' | 'x86' | 'llvm'.
%%-----------------------------------------------------------------------
diff --git a/lib/hipe/misc/hipe_pack_constants.erl b/lib/hipe/misc/hipe_pack_constants.erl
index e214d7ebbc..300f9ae43a 100644
--- a/lib/hipe/misc/hipe_pack_constants.erl
+++ b/lib/hipe/misc/hipe_pack_constants.erl
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,30 +20,48 @@
%%
-module(hipe_pack_constants).
--export([pack_constants/2, slim_refs/1, slim_constmap/1]).
+-export([pack_constants/2, slim_refs/1, slim_constmap/1,
+ find_const/2, mk_data_relocs/2, slim_sorted_exportmap/3]).
-include("hipe_consttab.hrl").
-include("../../kernel/src/hipe_ext_format.hrl").
+-include("../main/hipe.hrl"). % Needed for the EXIT macro in find_const/2.
%%-----------------------------------------------------------------------------
--type raw_data() :: binary() | number() | list() | tuple().
--type tbl_ref() :: {hipe_constlbl(), non_neg_integer()}.
+-type const_num() :: non_neg_integer().
+-type raw_data() :: binary() | number() | list() | tuple().
+
+-type addr() :: non_neg_integer().
+-type ref_p() :: {DataPos :: hipe_constlbl(), CodeOffset :: addr()}.
+-type ref() :: ref_p() | {'sorted', Base :: addr(), [ref_p()]}.
+
+-type mfa_refs() :: {mfa(), [ref()]}.
+
+%% XXX: these types may not belong here: FIX!
+-type fa() :: {atom(), arity()}.
+-type export_map() :: [{addr(), module(), atom(), arity()}].
-record(pcm_entry, {mfa :: mfa(),
label :: hipe_constlbl(),
- const_num :: non_neg_integer(),
- start :: non_neg_integer(),
+ const_num :: const_num(),
+ start :: addr(),
type :: 0 | 1 | 2,
raw_data :: raw_data()}).
+-type pcm_entry() :: #pcm_entry{}.
+
+-type label_map() :: gb_trees:tree({mfa(), hipe_constlbl()}, addr()).
+
+%% Some of the following types may possibly need to be exported
+-type data_relocs() :: [ref()].
+-type packed_const_map() :: [pcm_entry()].
+-type mfa_refs_map() :: [mfa_refs()].
+-type slim_export_map() :: [addr() | module() | atom() | arity() | boolean()].
%%-----------------------------------------------------------------------------
-spec pack_constants([{mfa(),[_],hipe_consttab()}], ct_alignment()) ->
- {ct_alignment(),
- non_neg_integer(),
- [#pcm_entry{}],
- [{mfa(),[tbl_ref() | {'sorted',non_neg_integer(),[tbl_ref()]}]}]}.
+ {ct_alignment(), non_neg_integer(), packed_const_map(), mfa_refs_map()}.
pack_constants(Data, Align) ->
pack_constants(Data, 0, Align, 0, [], []).
@@ -194,13 +212,12 @@ compact_dests([], Dest, AccofDest, Acc) ->
%% to the slimmed and flattened format ConstMap which is put in object
%% files.
%%
--spec slim_constmap([#pcm_entry{}]) -> [raw_data()].
+-spec slim_constmap(packed_const_map()) -> [raw_data()].
slim_constmap(Map) ->
slim_constmap(Map, gb_sets:new(), []).
--spec slim_constmap([#pcm_entry{}], gb_set(), [raw_data()]) -> [raw_data()].
-slim_constmap([#pcm_entry{const_num=ConstNo, start=Offset,
- type=Type, raw_data=Term}|Rest], Inserted, Acc) ->
+slim_constmap([#pcm_entry{const_num = ConstNo, start = Offset,
+ type = Type, raw_data = Term}|Rest], Inserted, Acc) ->
case gb_sets:is_member(ConstNo, Inserted) of
true ->
slim_constmap(Rest, Inserted, Acc);
@@ -209,3 +226,60 @@ slim_constmap([#pcm_entry{const_num=ConstNo, start=Offset,
slim_constmap(Rest, NewInserted, [ConstNo, Offset, Type, Term|Acc])
end;
slim_constmap([], _Inserted, Acc) -> Acc.
+
+%%
+%% Lookup a constant in a ConstMap.
+%%
+-spec find_const({mfa(), hipe_constlbl()}, packed_const_map()) -> const_num().
+
+find_const({MFA, Label}, [E = #pcm_entry{mfa = MFA, label = Label}|_]) ->
+ E#pcm_entry.const_num;
+find_const(N, [_|R]) ->
+ find_const(N, R);
+find_const(C, []) ->
+ ?EXIT({constant_not_found, C}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%
+%% Functions to build and handle Refs, ExportMap and LabelMap.
+%% Note: Moved here because they are used by all backends in
+%% hipe_{arm,sparc,ppc,x86}_assemble.erl
+%% XXX: Is this the right place for them?
+%%
+
+-spec mk_data_relocs(mfa_refs_map(), label_map()) -> data_relocs().
+
+mk_data_relocs(RefsFromConsts, LabelMap) ->
+ lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
+
+mk_data_relocs([{MFA, Labels} | Rest], LabelMap, Acc) ->
+ Map = [case Label of
+ {L,Pos} ->
+ Offset = find({MFA,L}, LabelMap),
+ {Pos,Offset};
+ {sorted,Base,OrderedLabels} ->
+ {sorted, Base, [begin
+ Offset = find({MFA,L}, LabelMap),
+ {Order, Offset}
+ end
+ || {L,Order} <- OrderedLabels]}
+ end
+ || Label <- Labels],
+ %% msg("Map: ~w Map\n", [Map]),
+ mk_data_relocs(Rest, LabelMap, [Map,Acc]);
+mk_data_relocs([], _, Acc) -> Acc.
+
+find({MFA,L}, LabelMap) ->
+ gb_trees:get({MFA,L}, LabelMap).
+
+-spec slim_sorted_exportmap(export_map(), [mfa()], [fa()]) -> slim_export_map().
+
+slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
+ IsClosure = lists:member({M,F,A}, Closures),
+ IsExported = is_exported(F, A, Exports),
+ [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
+slim_sorted_exportmap([], _, _) -> [].
+
+is_exported(F, A, Exports) ->
+ lists:member({F,A}, Exports).
diff --git a/lib/hipe/misc/hipe_sdi.erl b/lib/hipe/misc/hipe_sdi.erl
index ef1b5b48c5..9a2ff78ecf 100644
--- a/lib/hipe/misc/hipe_sdi.erl
+++ b/lib/hipe/misc/hipe_sdi.erl
@@ -3,7 +3,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%%
%%% The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,7 @@
-record(pass1, {prevSdi :: integer(),
preS = [] :: [#pre_sdi_data{}],
- labelMap = gb_trees:empty() :: gb_tree()}).
+ labelMap = gb_trees:empty() :: gb_trees:tree()}).
-record(sdi_data, {address :: address(),
label_address :: address(),
@@ -105,11 +105,11 @@ pass1_add_sdi(Pass1, Address, Label, SdiInfo) ->
PreSdiData = #pre_sdi_data{address=Address, label=Label, si=SdiInfo},
Pass1#pass1{prevSdi=PrevSdi+1, preS=[PreSdiData|PreS]}.
--spec pass1_finalise(#pass1{}) -> {non_neg_integer(),tuple(),gb_tree()}.
+-spec pass1_finalise(#pass1{}) -> {non_neg_integer(),tuple(),gb_trees:tree()}.
pass1_finalise(#pass1{prevSdi=PrevSdi, preS=PreS, labelMap=LabelMap}) ->
{PrevSdi+1, pass1_finalise_preS(PreS, LabelMap, []), LabelMap}.
--spec pass1_finalise_preS([#pre_sdi_data{}], gb_tree(), [#sdi_data{}]) ->
+-spec pass1_finalise_preS([#pre_sdi_data{}], gb_trees:tree(), [#sdi_data{}]) ->
tuple().
pass1_finalise_preS([], _LabelMap, S) -> vector_from_list(S);
pass1_finalise_preS([PreSdiData|PreS], LabelMap, S) ->
@@ -122,7 +122,7 @@ pass1_finalise_preS([PreSdiData|PreS], LabelMap, S) ->
%%% Pass2.
--spec pass2(#pass1{}) -> {gb_tree(), non_neg_integer()}.
+-spec pass2(#pass1{}) -> {gb_trees:tree(), non_neg_integer()}.
pass2(Pass1) ->
{N,SDIS,LabelMap} = pass1_finalise(Pass1),
LONG = mk_long(N),
@@ -339,13 +339,14 @@ initINCR(SdiNr, PrevIncr, N, LONG, INCREMENT) ->
%%% a and previous sdi i is remapped to a+incr(i), where
%%% incr(i) = if i < 0 then 0 else INCREMENT[i].
--spec adjust_label_map(gb_tree(), hipe_array()) -> gb_tree().
+-spec adjust_label_map(gb_trees:tree(), hipe_array()) -> gb_trees:tree().
adjust_label_map(LabelMap, INCREMENT) ->
applyIncr(gb_trees:to_list(LabelMap), INCREMENT, gb_trees:empty()).
-type label_pair() :: {label(), #label_data{}}.
--spec applyIncr([label_pair()], hipe_array(), gb_tree()) -> gb_tree().
+-spec applyIncr([label_pair()], hipe_array(), gb_trees:tree()) ->
+ gb_trees:tree().
applyIncr([], _INCREMENT, LabelMap) -> LabelMap;
applyIncr([{Label,LabelData}|List], INCREMENT, LabelMap) ->
#label_data{address=Address, prevSdi=PrevSdi} = LabelData,
diff --git a/lib/hipe/ppc/hipe_ppc_assemble.erl b/lib/hipe/ppc/hipe_ppc_assemble.erl
index b2fd50517b..3ad91f4051 100644
--- a/lib/hipe/ppc/hipe_ppc_assemble.erl
+++ b/lib/hipe/ppc/hipe_ppc_assemble.erl
@@ -46,8 +46,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -288,7 +288,7 @@ do_pseudo_li(I, MFA, ConstMap) ->
%%% end,
%%% {load_address, {Tag,untag_mfa_or_prim(MFAorPrim)}};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -574,37 +574,6 @@ mk_y(Pred, BD) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL,LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -642,14 +611,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label}, [{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N, [_|R]) ->
- find_const(N, R);
-find_const(C, []) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/hipe/ppc/hipe_rtl_to_ppc.erl b/lib/hipe/ppc/hipe_rtl_to_ppc.erl
index 7dfa56df29..a55fc137c3 100644
--- a/lib/hipe/ppc/hipe_rtl_to_ppc.erl
+++ b/lib/hipe/ppc/hipe_rtl_to_ppc.erl
@@ -102,10 +102,18 @@ conv_insn(I, Map, Data) ->
end.
conv_fconv(I, Map, Data) ->
- %% Dst := (double)Src, where Dst is FP reg and Src is int reg
+ %% Dst := (double)Src, where Dst is FP reg and Src is GP reg or imm
{Dst, Map0} = conv_fpreg(hipe_rtl:fconv_dst(I), Map),
- {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map0), % exclude imm src
- I2 = mk_fconv(Dst, Src),
+ {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map0),
+ I2 =
+ case hipe_ppc:is_temp(Src) of
+ true ->
+ mk_fconv(Dst, Src);
+ false ->
+ Tmp = new_untagged_temp(),
+ mk_li(Tmp, Src,
+ mk_fconv(Dst, Tmp))
+ end,
{I2, Map1, Data}.
mk_fconv(Dst, Src) ->
diff --git a/lib/hipe/regalloc/hipe_coalescing_regalloc.erl b/lib/hipe/regalloc/hipe_coalescing_regalloc.erl
index 7169dd18f3..e231098e0a 100644
--- a/lib/hipe/regalloc/hipe_coalescing_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_coalescing_regalloc.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/regalloc/hipe_ig_moves.erl b/lib/hipe/regalloc/hipe_ig_moves.erl
index 186c87a690..ebc6ebc20d 100644
--- a/lib/hipe/regalloc/hipe_ig_moves.erl
+++ b/lib/hipe/regalloc/hipe_ig_moves.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,7 +36,7 @@
-record(ig_moves, {movelist :: hipe_vector(),
nrmoves = 0 :: non_neg_integer(),
moveinsns = [] :: [{_,_}],
- moveset = gb_sets:empty() :: gb_set()}).
+ moveset = gb_sets:empty() :: gb_sets:set()}).
%%-----------------------------------------------------------------------------
diff --git a/lib/hipe/regalloc/hipe_ls_regalloc.erl b/lib/hipe/regalloc/hipe_ls_regalloc.erl
index 4276b8f968..7a00a0534a 100644
--- a/lib/hipe/regalloc/hipe_ls_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_ls_regalloc.erl
@@ -722,7 +722,7 @@ is_free(R, Free) ->
is_free(R, Free, []).
is_free(R, [{R,_}|Rest], Acc) ->
- {true,lists:reverse(Acc)++Rest};
+ {true, lists:reverse(Acc, Rest)};
is_free(R, [X|Rs],Acc) ->
is_free(R, Rs, [X|Acc]);
is_free(_, [], _) ->
@@ -733,7 +733,7 @@ exists_free_register(Start, Regs) ->
exists_free_register(Start, [{Phys, Start0}|Rest], Acc)
when Start > Start0 ->
- {true, Phys, lists:reverse(Acc)++Rest};
+ {true, Phys, lists:reverse(Acc, Rest)};
exists_free_register(Start, [Free|Rest], Acc) ->
exists_free_register(Start, Rest, [Free|Acc]);
exists_free_register(_, [], _) ->
diff --git a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
index fc3718cbc0..0278a896d2 100644
--- a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -958,9 +958,9 @@ splits_2({Cols, NonCols, OldSpillCost}, L, SpillCost) ->
%% Merge two ordered sub-splits into one.
spillCostOrderedMerge(Spl1, [], Spl) ->
- lists:reverse(Spl) ++ Spl1;
+ lists:reverse(Spl, Spl1);
spillCostOrderedMerge([], Spl2, Spl) ->
- lists:reverse(Spl) ++ Spl2;
+ lists:reverse(Spl, Spl2);
spillCostOrderedMerge(Spl1, Spl2, Spl) ->
{_, _, SpillCost1} = hd(Spl1),
{_, _, SpillCost2} = hd(Spl2),
diff --git a/lib/hipe/regalloc/hipe_reg_worklists.erl b/lib/hipe/regalloc/hipe_reg_worklists.erl
index e22cc8dc07..897bf0ef77 100644
--- a/lib/hipe/regalloc/hipe_reg_worklists.erl
+++ b/lib/hipe/regalloc/hipe_reg_worklists.erl
@@ -1,8 +1,8 @@
-%%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%%% -*- erlang-indent-level: 2 -*-
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
%%%
%%% The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/rtl/hipe_icode2rtl.erl b/lib/hipe/rtl/hipe_icode2rtl.erl
index 034153a3cb..483d0b37f7 100644
--- a/lib/hipe/rtl/hipe_icode2rtl.erl
+++ b/lib/hipe/rtl/hipe_icode2rtl.erl
@@ -427,8 +427,6 @@ gen_type_test([X], Type, TrueLbl, FalseLbl, Pred, ConstTab) ->
hipe_rtl:mk_branch(X, eq, TmpF, TrueLbl, FalseLbl, Pred)], ConstTab};
cons ->
{hipe_tagscheme:test_cons(X, TrueLbl, FalseLbl, Pred), ConstTab};
- constant ->
- {hipe_tagscheme:test_constant(X, TrueLbl, FalseLbl, Pred), ConstTab};
fixnum ->
{hipe_tagscheme:test_fixnum(X, TrueLbl, FalseLbl, Pred), ConstTab};
float ->
@@ -439,6 +437,8 @@ gen_type_test([X], Type, TrueLbl, FalseLbl, Pred, ConstTab) ->
{hipe_tagscheme:test_integer(X, TrueLbl, FalseLbl, Pred), ConstTab};
list ->
{hipe_tagscheme:test_list(X, TrueLbl, FalseLbl, Pred), ConstTab};
+ map ->
+ {hipe_tagscheme:test_map(X, TrueLbl, FalseLbl, Pred), ConstTab};
nil ->
{hipe_tagscheme:test_nil(X, TrueLbl, FalseLbl, Pred), ConstTab};
number ->
diff --git a/lib/hipe/rtl/hipe_rtl.erl b/lib/hipe/rtl/hipe_rtl.erl
index 4bf4eb6bd7..2f62dd79ad 100644
--- a/lib/hipe/rtl/hipe_rtl.erl
+++ b/lib/hipe/rtl/hipe_rtl.erl
@@ -29,7 +29,7 @@
%% <li> {alu, Dst, Src1, Op, Src2} </li>
%% <li> {alub, Dst, Src1, Op, Src2, RelOp, TrueLabel, FalseLabel, P} </li>
%% <li> {branch, Src1, Src2, RelOp, TrueLabel, FalseLabel, P} </li>
-%% <li> {call, DsListt, Fun, ArgList, Type, Continuation, FailContinuation}
+%% <li> {call, DsListt, Fun, ArgList, Type, Continuation, FailContinuation, NormalContinuation}
%% Type is one of {local, remote, primop, closure} </li>
%% <li> {comment, Text} </li>
%% <li> {enter, Fun, ArgList, Type}
@@ -106,7 +106,7 @@
%% rtl_data_update/2,
%% rtl_var_range/1,
%% rtl_var_range_update/2,
- %% rtl_label_range/1,
+ rtl_label_range/1,
%% rtl_label_range_update/2,
rtl_info/1,
rtl_info_update/2]).
@@ -226,6 +226,7 @@
%% goto_label_update/2,
mk_call/6,
+ mk_call/7,
call_fun/1,
call_dstlist/1,
call_dstlist_update/2,
@@ -233,8 +234,10 @@
call_continuation/1,
call_fail/1,
call_type/1,
+ call_normal/1,
+ call_normal_update/2,
%% call_continuation_update/2,
- %% call_fail_update/2,
+ call_fail_update/2,
is_call/1,
mk_enter/3,
@@ -290,10 +293,13 @@
%% fconv_src_update/2,
%% is_fconv/1,
- %% mk_var/1,
+ mk_var/1,
+ mk_var/2,
mk_new_var/0,
is_var/1,
var_index/1,
+ var_liveness/1,
+ var_liveness_update/2,
%% change_vars_to_regs/1,
@@ -350,10 +356,15 @@
%% move_dst_update/2,
fixnumop_dst_update/2,
pp_instr/2,
- %% pp_arg/2,
+ %% Uber hack!
+ pp_var/2,
+ pp_reg/2,
+ pp_arg/2,
phi_arglist_update/2,
phi_redirect_pred/3]).
+-export([subst_uses_llvm/2]).
+
-export_type([alub_cond/0]).
%%
@@ -387,7 +398,7 @@ rtl_data(#rtl{data=Data}) -> Data.
%% rtl_data_update(Rtl, Data) -> Rtl#rtl{data=Data}.
%% rtl_var_range(#rtl{var_range=VarRange}) -> VarRange.
%% rtl_var_range_update(Rtl, VarRange) -> Rtl#rtl{var_range=VarRange}.
-%% rtl_label_range(#rtl{label_range=LabelRange}) -> LabelRange.
+rtl_label_range(#rtl{label_range=LabelRange}) -> LabelRange.
%% rtl_label_range_update(Rtl, LabelRange) -> Rtl#rtl{label_range=LabelRange}.
rtl_info(#rtl{info=Info}) -> Info.
rtl_info_update(Rtl, Info) -> Rtl#rtl{info=Info}.
@@ -402,11 +413,11 @@ rtl_info_update(Rtl, Info) -> Rtl#rtl{info=Info}.
%% move
%%
-mk_move(Dst, 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) -> M#move{dst=NewDst}.
+move_dst_update(M, NewDst) -> false = is_fpreg(NewDst), M#move{dst=NewDst}.
move_src(#move{src=Src}) -> Src.
-move_src_update(M, NewSrc) -> M#move{src=NewSrc}.
+move_src_update(M, NewSrc) -> false = is_fpreg(NewSrc), M#move{src=NewSrc}.
%% is_move(#move{}) -> true;
%% is_move(_) -> false.
@@ -458,7 +469,11 @@ phi_remove_pred(Phi, Pred) ->
case NewArgList of
[Arg] -> %% the phi should be turned into a move instruction
{_Label,Var} = Arg,
- mk_move(phi_dst(Phi), Var);
+ Dst = phi_dst(Phi),
+ case {is_fpreg(Dst), is_fpreg(Var)} of
+ {true, true} -> mk_fmove(Dst, Var);
+ {false, false} -> mk_move(Dst, Var)
+ end;
%% io:format("~nPhi (~w) turned into move (~w) when removing pred ~w~n",[Phi,Move,Pred]),
[_|_] ->
Phi#phi{arglist=NewArgList}
@@ -643,6 +658,17 @@ is_goto(_) -> false.
%% call
%%
+%% LLVM: Call with normal continuation
+mk_call(DstList, Fun, ArgList, Continuation, FailContinuation,
+ NormalContinuation, Type) ->
+ case Type of
+ remote -> ok;
+ not_remote -> ok
+ end,
+ #call{dstlist=DstList, 'fun'=Fun, arglist=ArgList, type=Type,
+ continuation=Continuation, failcontinuation=FailContinuation,
+ normalcontinuation=NormalContinuation}.
+
mk_call(DstList, Fun, ArgList, Continuation, FailContinuation, Type) ->
case Type of
remote -> ok;
@@ -651,6 +677,10 @@ mk_call(DstList, Fun, ArgList, Continuation, FailContinuation, Type) ->
#call{dstlist=DstList, 'fun'=Fun, arglist=ArgList, type=Type,
continuation=Continuation,
failcontinuation=FailContinuation}.
+
+call_normal(#call{normalcontinuation=NormalContinuation}) -> NormalContinuation.
+call_normal_update(C, NewNormalContinuation) ->
+ C#call{normalcontinuation=NewNormalContinuation}.
call_dstlist(#call{dstlist=DstList}) -> DstList.
call_dstlist_update(C, NewDstList) -> C#call{dstlist=NewDstList}.
call_fun(#call{'fun'=Fun}) -> Fun.
@@ -810,11 +840,11 @@ fp_unop_op(#fp_unop{op=Op}) -> Op.
%% fmove
%%
-mk_fmove(X, Y) -> #fmove{dst=X, src=Y}.
+mk_fmove(X, Y) -> true = is_fpreg(X), true = is_fpreg(Y), #fmove{dst=X, src=Y}.
fmove_dst(#fmove{dst=Dst}) -> Dst.
-fmove_dst_update(M, NewDst) -> M#fmove{dst=NewDst}.
+fmove_dst_update(M, NewDst) -> true = is_fpreg(NewDst), M#fmove{dst=NewDst}.
fmove_src(#fmove{src=Src}) -> Src.
-fmove_src_update(M, NewSrc) -> M#fmove{src=NewSrc}.
+fmove_src_update(M, NewSrc) -> true = is_fpreg(NewSrc), M#fmove{src=NewSrc}.
%%
%% fconv
@@ -853,11 +883,14 @@ reg_is_gcsafe(#rtl_reg{is_gc_safe=IsGcSafe}) -> IsGcSafe.
is_reg(#rtl_reg{}) -> true;
is_reg(_) -> false.
--record(rtl_var, {index :: non_neg_integer()}).
+-record(rtl_var, {index :: non_neg_integer(), liveness=live :: dead | live}).
mk_var(Num) when is_integer(Num), Num >= 0 -> #rtl_var{index=Num}.
+mk_var(Num, Liveness) when is_integer(Num), Num>=0 -> #rtl_var{index=Num, liveness=Liveness}.
mk_new_var() -> mk_var(hipe_gensym:get_next_var(rtl)).
var_index(#rtl_var{index=Index}) -> Index.
+var_liveness(#rtl_var{liveness=Liveness}) -> Liveness.
+var_liveness_update(RtlVar, Liveness) -> RtlVar#rtl_var{liveness=Liveness}.
is_var(#rtl_var{}) -> true;
is_var(_) -> false.
@@ -1077,6 +1110,131 @@ subst_uses(Subst, I) ->
switch_src_update(I, subst1(Subst, switch_src(I)))
end.
+subst_uses_llvm(Subst, I) ->
+ case I of
+ #alu{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, alu_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, alu_src1(I)),
+ I0 = alu_src1_update(I, NewSrc1),
+ alu_src2_update(I0, NewSrc2);
+ #alub{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, alub_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, alub_src1(I)),
+ I0 = alub_src1_update(I, NewSrc1),
+ alub_src2_update(I0, NewSrc2);
+ #branch{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, branch_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, branch_src1(I)),
+ I0 = branch_src1_update(I, NewSrc1),
+ branch_src2_update(I0, NewSrc2);
+ #call{} ->
+ case call_is_known(I) of
+ false ->
+ {NewFun, Subst1} = subst1_llvm(Subst, call_fun(I)),
+ {NewArgList, _} = subst_list_llvm(Subst1, call_arglist(I)),
+ I0 = call_fun_update(I, NewFun),
+ call_arglist_update(I0, NewArgList);
+ true ->
+ {NewArgList, _} = subst_list_llvm(Subst, call_arglist(I)),
+ call_arglist_update(I, NewArgList)
+ end;
+ #comment{} ->
+ I;
+ #enter{} ->
+ case enter_is_known(I) of
+ false ->
+ {NewFun, Subst1} = subst1_llvm(Subst, enter_fun(I)),
+ {NewArgList, _} = subst_list_llvm(Subst1, enter_arglist(I)),
+ I0 = enter_fun_update(I, NewFun),
+ enter_arglist_update(I0, NewArgList);
+ true ->
+ {NewArgList, _} = subst_list_llvm(Subst, enter_arglist(I)),
+ enter_arglist_update(I, NewArgList)
+ end;
+ #fconv{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fconv_src(I)),
+ fconv_src_update(I, NewSrc);
+ #fixnumop{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fixnumop_src(I)),
+ fixnumop_src_update(I, NewSrc);
+ #fload{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, fload_src(I)),
+ {NewOffset, _ } = subst1_llvm(Subst1, fload_offset(I)),
+ I0 = fload_src_update(I, NewSrc),
+ fload_offset_update(I0, NewOffset);
+ #fmove{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fmove_src(I)),
+ fmove_src_update(I, NewSrc);
+ #fp{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, fp_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, fp_src1(I)),
+ I0 = fp_src1_update(I, NewSrc1),
+ fp_src2_update(I0, NewSrc2);
+ #fp_unop{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fp_unop_src(I)),
+ fp_unop_src_update(I, NewSrc);
+ #fstore{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, fstore_src(I)),
+ {NewBase, Subst2} = subst1_llvm(Subst1, fstore_base(I)),
+ {NewOffset, _ } = subst1_llvm(Subst2, fstore_offset(I)),
+ I0 = fstore_src_update(I, NewSrc),
+ I1 = fstore_base_update(I0, NewBase),
+ fstore_offset_update(I1, NewOffset);
+ #goto{} ->
+ I;
+ #goto_index{} ->
+ I;
+ #gctest{} ->
+ {NewWords, _ } = subst1_llvm(Subst, gctest_words(I)),
+ gctest_words_update(I, NewWords);
+ #label{} ->
+ I;
+ #load{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, load_src(I)),
+ {NewOffset, _ } = subst1_llvm(Subst1, load_offset(I)),
+ I0 = load_src_update(I, NewSrc),
+ load_offset_update(I0, NewOffset);
+ #load_address{} ->
+ I;
+ #load_atom{} ->
+ I;
+ #load_word_index{} ->
+ I;
+ #move{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, move_src(I)),
+ move_src_update(I, NewSrc);
+ #multimove{} ->
+ {NewSrcList, _} = subst_list_llvm(Subst, multimove_srclist(I)),
+ multimove_srclist_update(I, NewSrcList);
+ #phi{} ->
+ phi_argvar_subst(I, Subst);
+ #return{} ->
+ {NewVarList, _} = subst_list_llvm(Subst, return_varlist(I)),
+ return_varlist_update(I, NewVarList);
+ #store{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, store_src(I)),
+ {NewBase, Subst2} = subst1_llvm(Subst1, store_base(I)),
+ {NewOffset, _ } = subst1_llvm(Subst2, store_offset(I)),
+ I0 = store_src_update(I, NewSrc),
+ I1 = store_base_update(I0, NewBase),
+ store_offset_update(I1, NewOffset);
+ #switch{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, switch_src(I)),
+ switch_src_update(I, NewSrc)
+ end.
+
+subst_list_llvm(S,X) -> subst_list_llvm(S, lists:reverse(X), []).
+subst_list_llvm(S, [], Acc) -> {Acc, S};
+subst_list_llvm(S, [X|Xs], Acc) ->
+ {NewX, RestS} = subst1_llvm(S, X),
+ subst_list_llvm(RestS, Xs, [NewX|Acc]).
+
+subst1_llvm(A,B) -> subst1_llvm(A,B,[]).
+
+subst1_llvm([], X, Acc) -> {X, Acc};
+subst1_llvm([{X,Y}|Rs], X, Acc) -> {Y, Acc++Rs};
+subst1_llvm([R|Xs], X, Acc) -> subst1_llvm(Xs,X,[R|Acc]).
+
subst_defines(Subst, I)->
case I of
#alu{} ->
@@ -1614,7 +1772,11 @@ pp_var(Dev, Arg) ->
true ->
pp_hard_reg(Dev, var_index(Arg));
false ->
- io:format(Dev, "v~w", [var_index(Arg)])
+ io:format(Dev, "v~w", [var_index(Arg)]),
+ case var_liveness(Arg) of
+ dead -> io:format(Dev, "(dead)", []);
+ _ -> ok
+ end
end.
pp_arg(Dev, A) ->
diff --git a/lib/hipe/rtl/hipe_rtl.hrl b/lib/hipe/rtl/hipe_rtl.hrl
index 974e40f830..fbdf9ac524 100644
--- a/lib/hipe/rtl/hipe_rtl.hrl
+++ b/lib/hipe/rtl/hipe_rtl.hrl
@@ -28,7 +28,8 @@
-record(alu, {dst, src1, op, src2}).
-record(alub, {dst, src1, op, src2, 'cond', true_label, false_label, p}).
-record(branch, {src1, src2, 'cond', true_label, false_label, p}).
--record(call, {dstlist, 'fun', arglist, type, continuation, failcontinuation}).
+-record(call, {dstlist, 'fun', arglist, type, continuation,
+ failcontinuation, normalcontinuation = []}).
-record(comment, {text}).
-record(enter, {'fun', arglist, type}).
-record(fconv, {dst, src}).
diff --git a/lib/hipe/rtl/hipe_rtl_arith.inc b/lib/hipe/rtl/hipe_rtl_arith.inc
index 7b587e882d..1d13e59420 100644
--- a/lib/hipe/rtl/hipe_rtl_arith.inc
+++ b/lib/hipe/rtl/hipe_rtl_arith.inc
@@ -1,9 +1,9 @@
%% -*- Erlang -*-
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/rtl/hipe_rtl_binary_match.erl b/lib/hipe/rtl/hipe_rtl_binary_match.erl
index 8831199244..af8903904b 100644
--- a/lib/hipe/rtl/hipe_rtl_binary_match.erl
+++ b/lib/hipe/rtl/hipe_rtl_binary_match.erl
@@ -990,19 +990,19 @@ unsigned_bignum(Dst1, Src, TrueLblName) ->
hipe_tagscheme:unsafe_mk_big(Dst1, Src, unsigned),
hipe_rtl:mk_goto(TrueLblName)].
-load_bytes(Dst, Base, Offset, {Signedness, _Endianess},1) ->
+load_bytes(Dst, Base, Offset, {Signedness, _Endianness},1) ->
[hipe_rtl:mk_load(Dst, Base, Offset, byte, Signedness),
hipe_rtl:mk_alu(Offset, Offset, add, hipe_rtl:mk_imm(1))];
-load_bytes(Dst, Base, Offset, {Signedness, Endianess},2) ->
- case Endianess of
+load_bytes(Dst, Base, Offset, {Signedness, Endianness},2) ->
+ case Endianness of
big ->
hipe_rtl_arch:load_big_2(Dst, Base, Offset, Signedness);
little ->
hipe_rtl_arch:load_little_2(Dst, Base, Offset, Signedness)
end;
-load_bytes(Dst, Base, Offset, {Signedness, Endianess},3) ->
+load_bytes(Dst, Base, Offset, {Signedness, Endianness},3) ->
Tmp1 = hipe_rtl:mk_new_reg(),
- case Endianess of
+ case Endianness of
big ->
[hipe_rtl:mk_load(Dst, Base, Offset, byte, Signedness),
hipe_rtl:mk_alu(Offset, Offset, add, hipe_rtl:mk_imm(1)),
@@ -1026,18 +1026,18 @@ load_bytes(Dst, Base, Offset, {Signedness, Endianess},3) ->
hipe_rtl:mk_alu(Dst, Dst, 'or', Tmp1),
hipe_rtl:mk_alu(Offset, Offset, add, hipe_rtl:mk_imm(1))]
end;
-load_bytes(Dst, Base, Offset, {Signedness, Endianess}, 4) ->
- case Endianess of
+load_bytes(Dst, Base, Offset, {Signedness, Endianness}, 4) ->
+ case Endianness of
big ->
hipe_rtl_arch:load_big_4(Dst, Base, Offset, Signedness);
little ->
hipe_rtl_arch:load_little_4(Dst, Base, Offset, Signedness)
end;
-load_bytes(Dst, Base, Offset, {Signedness, Endianess}, X) when X > 1 ->
+load_bytes(Dst, Base, Offset, {Signedness, Endianness}, X) when X > 1 ->
[LoopLbl, EndLbl] = create_lbls(2),
[Tmp1, Limit, TmpOffset] = create_regs(3),
- case Endianess of
+ case Endianness of
big ->
[hipe_rtl:mk_alu(Limit, Offset, add, hipe_rtl:mk_imm(X)),
hipe_rtl:mk_load(Dst, Base, Offset, byte, Signedness),
diff --git a/lib/hipe/rtl/hipe_rtl_liveness.erl b/lib/hipe/rtl/hipe_rtl_liveness.erl
index 3cfada9d6c..0c4b6b2e11 100644
--- a/lib/hipe/rtl/hipe_rtl_liveness.erl
+++ b/lib/hipe/rtl/hipe_rtl_liveness.erl
@@ -34,7 +34,8 @@
-module(hipe_rtl_liveness).
-%% -define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
+%% -define(DEBUG_LIVENESS,true).
+-define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
-define(PRETTY_PRINT,false).
-include("hipe_rtl.hrl").
diff --git a/lib/hipe/rtl/hipe_rtl_mk_switch.erl b/lib/hipe/rtl/hipe_rtl_mk_switch.erl
index d859c50b7d..c14fa5628e 100644
--- a/lib/hipe/rtl/hipe_rtl_mk_switch.erl
+++ b/lib/hipe/rtl/hipe_rtl_mk_switch.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/rtl/hipe_rtl_ssa_const_prop.erl b/lib/hipe/rtl/hipe_rtl_ssa_const_prop.erl
index 1c900d767e..2f594333c1 100644
--- a/lib/hipe/rtl/hipe_rtl_ssa_const_prop.erl
+++ b/lib/hipe/rtl/hipe_rtl_ssa_const_prop.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/rtl/hipe_rtl_ssapre.erl b/lib/hipe/rtl/hipe_rtl_ssapre.erl
index 34897ba4b7..2ebebb5197 100644
--- a/lib/hipe/rtl/hipe_rtl_ssapre.erl
+++ b/lib/hipe/rtl/hipe_rtl_ssapre.erl
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/rtl/hipe_tagscheme.erl b/lib/hipe/rtl/hipe_tagscheme.erl
index f1e8d1ef41..c27c682915 100644
--- a/lib/hipe/rtl/hipe_tagscheme.erl
+++ b/lib/hipe/rtl/hipe_tagscheme.erl
@@ -39,14 +39,13 @@
test_tuple/4, test_atom/4, test_bignum/4, test_pos_bignum/4,
test_any_pid/4, test_any_port/4,
test_ref/4, test_fun/4, test_fun2/5, test_matchstate/4,
- test_binary/4, test_bitstr/4, test_list/4,
- test_integer/4, test_number/4, test_constant/4, test_tuple_N/5]).
+ test_binary/4, test_bitstr/4, test_list/4, test_map/4,
+ test_integer/4, test_number/4, test_tuple_N/5]).
-export([realtag_fixnum/2, tag_fixnum/2, realuntag_fixnum/2, untag_fixnum/2]).
-export([test_two_fixnums/3, test_fixnums/4, unsafe_fixnum_add/3,
unsafe_fixnum_sub/3,
fixnum_gt/5, fixnum_lt/5, fixnum_ge/5, fixnum_le/5, fixnum_val/1,
- fixnum_mul/4,
- fixnum_addsub/5, fixnum_andorxor/4, fixnum_not/2,
+ fixnum_mul/4, fixnum_addsub/5, fixnum_andorxor/4, fixnum_not/2,
fixnum_bsr/3, fixnum_bsl/3]).
-export([unsafe_car/2, unsafe_cdr/2,
unsafe_constant_element/3, unsafe_update_element/3, element/6]).
@@ -113,13 +112,15 @@
-define(TAG_HEADER_EXTERNAL_PID, ((16#C bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_EXTERNAL_PORT,((16#D bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_EXTERNAL_REF, ((16#E bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
+-define(TAG_HEADER_MAP, ((16#F bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_MASK, 16#3F).
-define(HEADER_ARITY_OFFS, 6).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_header(SZ,TAG) -> (SZ bsl ?HEADER_ARITY_OFFS) + TAG.
+mk_header(SZ, TAG) -> (SZ bsl ?HEADER_ARITY_OFFS) + TAG.
+
mk_arityval(SZ) -> mk_header(SZ, ?TAG_HEADER_ARITYVAL).
size_from_header(Sz, Header) ->
@@ -133,9 +134,9 @@ mk_var_header(Header, Size, Tag) ->
mk_fixnum(X) -> (X bsl ?TAG_IMMED1_SIZE) + ?TAG_IMMED1_SMALL.
-define(NIL, ((-1 bsl ?TAG_IMMED2_SIZE) bor ?TAG_IMMED2_NIL)).
-mk_nil() -> ?NIL.
-%% mk_atom(X) -> (X bsl ?TAG_IMMED2_SIZE) + ?TAG_IMMED2_ATOM.
-mk_non_value() -> ?THE_NON_VALUE.
+mk_nil() -> ?NIL.
+%% mk_atom(X) -> (X bsl ?TAG_IMMED2_SIZE) + ?TAG_IMMED2_ATOM.
+mk_non_value() -> ?THE_NON_VALUE.
-spec is_fixnum(integer()) -> boolean().
is_fixnum(N) when is_integer(N) ->
@@ -253,6 +254,15 @@ test_tuple_N(X, N, TrueLab, FalseLab, Pred) ->
hipe_rtl:mk_branch(Tmp, 'eq', hipe_rtl:mk_imm(mk_arityval(N)),
TrueLab, FalseLab, Pred)].
+test_map(X, TrueLab, FalseLab, Pred) ->
+ Tmp = hipe_rtl:mk_new_reg_gcsafe(),
+ HalfTrueLab = hipe_rtl:mk_new_label(),
+ MapMask = ?TAG_HEADER_MASK,
+ [test_is_boxed(X, hipe_rtl:label_name(HalfTrueLab), FalseLab, Pred),
+ HalfTrueLab,
+ get_header(Tmp, X),
+ mask_and_compare(Tmp, MapMask, ?TAG_HEADER_MAP, TrueLab, FalseLab, Pred)].
+
test_ref(X, TrueLab, FalseLab, Pred) ->
Hdr = hipe_rtl:mk_new_reg_gcsafe(),
Tag = hipe_rtl:mk_new_reg_gcsafe(),
@@ -405,17 +415,6 @@ test_number(X, TrueLab, FalseLab, Pred) ->
hipe_rtl:mk_branch(Tmp, 'eq', hipe_rtl:mk_imm(HeaderFlonum),
TrueLab, FalseLab, Pred)].
-%% CONS, NIL, and TUPLE are not constants, everything else is
-test_constant(X, TrueLab, FalseLab, Pred) ->
- Lab1 = hipe_rtl:mk_new_label(),
- Lab2 = hipe_rtl:mk_new_label(),
- Pred1 = 1-Pred,
- [test_cons(X, FalseLab, hipe_rtl:label_name(Lab1), Pred1),
- Lab1,
- test_nil(X, FalseLab, hipe_rtl:label_name(Lab2), Pred1),
- Lab2,
- test_tuple(X, FalseLab, TrueLab, Pred1)].
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tag_fixnum(DestVar, SrcReg) ->
diff --git a/lib/hipe/sparc/hipe_rtl_to_sparc.erl b/lib/hipe/sparc/hipe_rtl_to_sparc.erl
index dc001f865e..fd21be3ae7 100644
--- a/lib/hipe/sparc/hipe_rtl_to_sparc.erl
+++ b/lib/hipe/sparc/hipe_rtl_to_sparc.erl
@@ -85,17 +85,17 @@ conv_insn(I, Map, Data) ->
end.
conv_fconv(I, Map, Data) ->
- %% Dst := (double)Src, where Dst is FP reg and Src is int reg
- {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map), % exclude imm src
+ %% Dst := (double)Src, where Dst is FP reg and Src is GP reg or imm
+ {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map),
{Dst, Map2} = conv_fpreg(hipe_rtl:fconv_dst(I), Map1),
I2 = mk_fconv(Src, Dst),
{I2, Map2, Data}.
mk_fconv(Src, Dst) ->
CSP = hipe_sparc:mk_temp(14, 'untagged'), % o6
- Disp = hipe_sparc:mk_simm13(100),
- [hipe_sparc:mk_store('stw', Src, CSP, Disp),
- hipe_sparc:mk_pseudo_fload(CSP, Disp, Dst, true),
+ Offset = 100,
+ mk_store('stw', Src, CSP, Offset) ++
+ [hipe_sparc:mk_pseudo_fload(CSP, hipe_sparc:mk_simm13(Offset), Dst, true),
hipe_sparc:mk_fp_unary('fitod', Dst, Dst)].
conv_fmove(I, Map, Data) ->
diff --git a/lib/hipe/sparc/hipe_sparc_assemble.erl b/lib/hipe/sparc/hipe_sparc_assemble.erl
index b534fe20ec..68a4e1b349 100644
--- a/lib/hipe/sparc/hipe_sparc_assemble.erl
+++ b/lib/hipe/sparc/hipe_sparc_assemble.erl
@@ -45,8 +45,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -222,7 +222,7 @@ do_pseudo_set(I, MFA, ConstMap) ->
%%% end,
%%% {load_address, {Tag,untag_mfa_or_prim(MFAorPrim)}};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -507,37 +507,6 @@ px({pred,Pred}) -> % XXX: use pt/pn throughout entire backend
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL, LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -575,14 +544,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/hipe/ssa/hipe_ssa.inc b/lib/hipe/ssa/hipe_ssa.inc
index e766a83c41..2766c10e4f 100644
--- a/lib/hipe/ssa/hipe_ssa.inc
+++ b/lib/hipe/ssa/hipe_ssa.inc
@@ -1,8 +1,8 @@
-%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/hipe/ssa/hipe_ssa_const_prop.inc b/lib/hipe/ssa/hipe_ssa_const_prop.inc
index 2fce384197..0876fca34a 100644
--- a/lib/hipe/ssa/hipe_ssa_const_prop.inc
+++ b/lib/hipe/ssa/hipe_ssa_const_prop.inc
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,10 +72,10 @@ visit_expressions([Inst | Insts], Environment, FlowWork, SSAWork) ->
%%-----------------------------------------------------------------------------
-record(env, {cfg :: #cfg{},
- executable_flags = gb_sets:empty() :: gb_set(),
- handled_blocks = gb_sets:empty() :: gb_set(),
- lattice_values = gb_trees:empty() :: gb_tree(),
- ssa_edges = gb_trees:empty() :: gb_tree()
+ executable_flags = gb_sets:empty() :: gb_sets:set(),
+ handled_blocks = gb_sets:empty() :: gb_sets:set(),
+ lattice_values = gb_trees:empty() :: gb_trees:tree(),
+ ssa_edges = gb_trees:empty() :: gb_trees:tree()
}).
create_env(CFG) ->
diff --git a/lib/hipe/test/Makefile b/lib/hipe/test/Makefile
new file mode 100644
index 0000000000..009f503abb
--- /dev/null
+++ b/lib/hipe/test/Makefile
@@ -0,0 +1,80 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ hipe_SUITE
+
+# .erl files for these modules are automatically generated
+GEN_MODULES= \
+ bs_SUITE \
+ maps_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+# ----------------------------------------------------
+# Files
+# ----------------------------------------------------
+EMAKEFILE = Emakefile
+AUXILIARY_FILES = hipe.spec hipe_testsuite_driver.erl $(EMAKEFILE)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/hipe_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(GEN_MODULES) \
+ >> $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_docs_spec:
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(AUXILIARY_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)"
+ @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
diff --git a/lib/hipe/test/bs_SUITE_data/bs_add.erl b/lib/hipe/test/bs_SUITE_data/bs_add.erl
new file mode 100644
index 0000000000..af5a3b2f23
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_add.erl
@@ -0,0 +1,18 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+%% The guard in f/3 revealed a problem in the translation of the 'bs_add'
+%% BEAM instruction to Icode. The fail label was not properly translated.
+%% Fixed 3/2/2011.
+%%-------------------------------------------------------------------------
+-module(bs_add).
+
+-export([test/0]).
+
+test() ->
+ 42 = f(<<12345:16>>, 4711, <<42>>),
+ ok.
+
+f(Bin, A, B) when <<A:9, B:7/binary>> == Bin ->
+ gazonk;
+f(Bin, _, _) when is_binary(Bin) ->
+ 42.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl b/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl
new file mode 100644
index 0000000000..082b83bab9
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl
@@ -0,0 +1,79 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_bincomp.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Test bit comprehensions
+%%% Created : 13 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_bincomp).
+
+-export([test/0]).
+
+test() ->
+ ok = byte_aligned(),
+ ok = bit_aligned(),
+ ok = extended_byte_aligned(),
+ ok = extended_bit_aligned(),
+ ok = mixed(),
+ ok.
+
+byte_aligned() ->
+ <<"abcdefg">> = << <<(X+32)>> || <<X>> <= <<"ABCDEFG">> >>,
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:32>> <= <<1:32,2:32,3:32,4:32>> >>,
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:16>> <= <<1:16,2:16,3:16,4:16>> >>,
+ ok.
+
+bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || <<X>> <= <<"ABCDEFG">> >>,
+ <<"ABCDEFG">> =
+ << <<(X-32)>> || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> >>,
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:31>> <= <<1:31,2:31,3:31,4:31>> >>,
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:15>> <= <<1:15,2:15,3:15,4:15>> >>,
+ ok.
+
+extended_byte_aligned() ->
+ <<"abcdefg">> = << <<(X+32)>> || X <- "ABCDEFG" >>,
+ "abcdefg" = [(X+32) || <<X>> <= <<"ABCDEFG">>],
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || X <- [1,2,3,4] >>,
+ [256,512,768,1024] =
+ [X || <<X:16/little>> <= <<1:16,2:16,3:16,4:16>>],
+ ok.
+
+extended_bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || X <- "ABCDEFG" >>,
+ "ABCDEFG" = [(X-32) || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>>],
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || X <- [1,2,3,4] >>,
+ [256,512,768,1024] =
+ [X || <<X:15/little>> <= <<1:15,2:15,3:15,4:15>>],
+ ok.
+
+mixed() ->
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>> >>,
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, Y <- [1,2] >>,
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || X <- [1,2,3,4], Y <- [1,2] >>,
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>>],
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, Y <- [1,2]],
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>> >>,
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2] >>,
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || X <- [1,2,3,4], Y <- [1,2] >>,
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>>],
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2]],
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bits.erl b/lib/hipe/test/bs_SUITE_data/bs_bits.erl
new file mode 100644
index 0000000000..ef9a6bb137
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bits.erl
@@ -0,0 +1,150 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_bits.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests for bit stream operations including matching,
+%%% construction, binary_to_list and list_to_binary
+%%% Created : 6 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_bits).
+
+-export([test/0]).
+
+test() ->
+ <<1:100>> = <<1:100>>,
+ ok = match(7),
+ ok = match(9),
+ ok = match1(15),
+ ok = match1(31),
+ ok = horrid_match(),
+ ok = test_bitstr(),
+ ok = test_is_bitstr(<<1:1>>,<<8>>),
+ ok = test_is_binary(<<1:1>>,<<8>>),
+ ok = test_bitsize(),
+ ok = asymmetric_tests(),
+ ok = big_asymmetric_tests(),
+ ok = bitstr_to_and_from_list(),
+ ok = big_bitstr_to_and_from_list(),
+ ok = send_and_receive(),
+ ok = send_and_receive_alot(),
+ ok.
+
+match(N) ->
+ <<0:N>> = <<0:N>>,
+ ok.
+
+match1(N) ->
+ <<42:N/little>> = <<42:N/little>>,
+ ok.
+
+test_is_bitstr(Bitstr, Binary) ->
+ true = is_bitstring(Bitstr),
+ true = is_bitstring(Binary),
+ ok = if is_bitstring(Bitstr) -> ok end,
+ ok = if is_bitstring(Binary) -> ok end.
+
+test_is_binary(Bitstr, Binary) ->
+ false = is_binary(Bitstr),
+ true = is_binary(Binary),
+ ok = if is_binary(Bitstr) -> not_ok; true -> ok end,
+ ok = if is_binary(Binary) -> ok end.
+
+test_bitsize() ->
+ 101 = erlang:bit_size(<<1:101>>),
+ 1001 = erlang:bit_size(<<1:1001>>),
+ 80 = erlang:bit_size(<<1:80>>),
+ 800 = erlang:bit_size(<<1:800>>),
+ Bin = <<0:16#1000000>>,
+ BigBin = list_to_bitstring([Bin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ 16#10000001 = bit_size(BigBin),
+ %% Only run these on computers with lots of memory
+ %% HugeBin = list_to_bitstring([BigBin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ %% 16#100000011 = bit_size(HugeBin),
+ 0 = erlang:bit_size(<<>>),
+ ok.
+
+horrid_match() ->
+ <<1:4,B:24/bitstring>> = <<1:4,42:24/little>>,
+ <<42:24/little>> = B,
+ ok.
+
+test_bitstr() ->
+ <<1:7,B/bitstring>> = <<1:7,<<1:1,6>>/bitstring>>,
+ <<1:1,6>> = B,
+ B = <<1:1,6>>,
+ ok.
+
+asymmetric_tests() ->
+ <<1:12>> = <<0,1:4>>,
+ <<0,1:4>> = <<1:12>>,
+ <<1:1,X/bitstring>> = <<128,255,0,0:2>>,
+ <<1,254,0,0:1>> = X,
+ X = <<1,254,0,0:1>>,
+ <<1:1,X1:25/bitstring>> = <<128,255,0,0:2>>,
+ <<1,254,0,0:1>> = X1,
+ X1 = <<1,254,0,0:1>>,
+ ok.
+
+big_asymmetric_tests() ->
+ <<1:875,1:12>> = <<1:875,0,1:4>>,
+ <<1:875,0,1:4>> = <<1:875,1:12>>,
+ <<1:1,X/bitstring>> = <<128,255,0,0:2,1:875>>,
+ <<1,254,0,0:1,1:875>> = X,
+ X = <<1,254,0,0:1,1:875>>,
+ <<1:1,X1:900/bitstring>> = <<128,255,0,0:2,1:875>>,
+ <<1,254,0,0:1,1:875>> = X1,
+ X1 = <<1,254,0,0:1,1:875>>,
+ ok.
+
+bitstr_to_and_from_list() ->
+ <<1:7>> = list_to_bitstring(bitstring_to_list(<<1:7>>)),
+ <<1,2,3,4,1:1>> = list_to_bitstring(bitstring_to_list(<<1,2,3,4,1:1>>)),
+ [1,2,3,4,<<1:1>>] = bitstring_to_list(<<1,2,3,4,1:1>>),
+ <<1:1,1,2,3,4>> = list_to_bitstring([<<1:1>>,1,2,3,4]),
+ [128,129,1,130,<<0:1>>] = bitstring_to_list(<<1:1,1,2,3,4>>),
+ ok.
+
+big_bitstr_to_and_from_list() ->
+ <<1:800,2,3,4,1:1>> = list_to_bitstring(bitstring_to_list(<<1:800,2,3,4,1:1>>)),
+ [1,2,3,4|_Rest1] = bitstring_to_list(<<1,2,3,4,1:800,1:1>>),
+ <<1:801,1,2,3,4>> = list_to_bitstring([<<1:801>>,1,2,3,4]),
+ ok.
+
+send_and_receive() ->
+ Bin = <<1,2:7>>,
+ Pid = spawn(fun() -> receiver(Bin) end),
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end.
+
+receiver(Bin) ->
+ receive
+ {Pid,<<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok
+ end.
+
+send_and_receive_alot() ->
+ Bin = <<1:1000001>>,
+ Pid = spawn(fun() -> receiver_alot(Bin) end),
+ send_alot(100,Bin,Pid).
+
+send_alot(N,Bin,Pid) when N > 0 ->
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end,
+ send_alot(N-1,Bin,Pid);
+send_alot(0,_Bin,Pid) ->
+ Pid ! no_more,
+ ok.
+
+receiver_alot(Bin) ->
+ receive
+ {Pid,<<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok;
+ no_more -> ok
+ end,
+ receiver_alot(Bin).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl b/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl
new file mode 100644
index 0000000000..c0774e7279
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+-module(bs_bitsize).
+
+-export([test/0]).
+
+test() ->
+ true = bitsize_in_body(<<1:42>>),
+ true = bitsize_in_guard(<<1:7>>),
+ 8 = constant_binary(42),
+ ok.
+
+bitsize_in_body(Bin) ->
+ 42 =:= erlang:bit_size(Bin).
+
+bitsize_in_guard(Bin) when erlang:bit_size(Bin) rem 7 =:= 0 ->
+ true;
+bitsize_in_guard(Bin) when is_bitstring(Bin) ->
+ false.
+
+%% Tests that binary constants can properly be treated in Icode
+constant_binary(N) when N > 0 ->
+ bit_size(<<42>>).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl
new file mode 100644
index 0000000000..7b62a17cfb
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl
@@ -0,0 +1,32 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% When executing this in R8 (and compiled with R8) the result was
+%% {ok,[148,129,0,0]} but should be {ok,[145,148,113,129,0,0,0,0]}
+%% Thanks to Kenneth Lundin for sending this to us.
+%%-------------------------------------------------------------------
+
+-module(bs_bugs_R08).
+
+-export([test/0]).
+
+test() ->
+ List = [145,148,113,129,0,0,0,0],
+ {ok, List} = msisdn_internal_storage(<<145,148,113,129,0,0,0,0>>, []),
+ ok.
+
+%% msisdn_internal_storage/3
+%% Convert MSISDN binary to internal datatype (TBCD-octet list)
+
+msisdn_internal_storage(<<>>, MSISDN) ->
+ {ok, lists:reverse(MSISDN)};
+msisdn_internal_storage(<<2#11111111:8,_Rest/binary>>, MSISDN) ->
+ {ok, lists:reverse(MSISDN)};
+msisdn_internal_storage(<<2#1111:4,DigitN:4,_Rest/binary>>, MSISDN) when
+ DigitN < 10 ->
+ {ok, lists:reverse([(DigitN bor 2#11110000)|MSISDN])};
+msisdn_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>, MSISDN) when
+ DigitNplus1 < 10, DigitN < 10 ->
+ NewMSISDN = [((DigitNplus1 bsl 4) bor DigitN)|MSISDN],
+ msisdn_internal_storage(Rest, NewMSISDN);
+msisdn_internal_storage(_Rest, _MSISDN) ->
+ {fault}. %% Mandatory IE incorrect
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl
new file mode 100644
index 0000000000..670f2a08bb
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl
@@ -0,0 +1,35 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Date: Mon, 7 Jun 2004 13:07:39 +0300
+%% From: Einar Karttunen
+%% To: Erlang ML <[email protected]>
+%% Subject: Apparent binary matching bug with native compilation
+%%
+%% It seems that there is a problem with binary matching when
+%% compiling native code. A length prefixed field matches one
+%% byte too short in the native case.
+%%
+%% The test module works when compiled with no options, but
+%% crashes with case_clause when compiled with [native].
+%% This has been confirmed with R9C-0 and hipe snapshot 5/4/2004.
+%%--------------------------------------------------------------------
+
+-module(bs_bugs_R09).
+
+-export([test/0]).
+
+test() ->
+ ["rei",".",[]] = pp(<<3,$r,$e,$i,0>>),
+ ok.
+
+pp(Bin) ->
+ %% io:format("PP with ~p~n", [Bin]),
+ case Bin of
+ <<>> ->
+ ["."];
+ <<_:2, Len:6, Part:Len/binary>> ->
+ [binary_to_list(Part)];
+ <<_:2, Len:6, Part:Len/binary, Rest/binary>> ->
+ %% io:format("Len ~p Part ~p Rest ~p~n", [Len,Part,Rest]),
+ [binary_to_list(Part), "." | pp(Rest)]
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl
new file mode 100644
index 0000000000..43ee9eb85b
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl
@@ -0,0 +1,133 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Contains three cases of bugs that were reported for R12B
+%%--------------------------------------------------------------------
+-module(bs_bugs_R12).
+
+-export([test/0]).
+
+test() ->
+ ok = test_beam_bug(),
+ ok = test_v3_codegen(),
+ ok = test_hipe_bug(),
+ ok.
+
+%%--------------------------------
+%% First test case: a bug in BEAM
+%%--------------------------------
+test_beam_bug() ->
+ lists:foreach(fun (_) -> ok = run(100) end, [1,2,3,4]).
+
+%% For testing - runs scanner N number of times with same input
+run(N) ->
+ lists:foreach(fun(_) -> scan(<<"region:whatever">>, []) end, lists:seq(1, N)).
+
+scan(<<>>, TokAcc) ->
+ lists:reverse(['$thats_all_folks$' | TokAcc]);
+scan(<<D, Z, Rest/binary>>, TokAcc)
+ when (D =:= $D orelse D =:= $d) and
+ ((Z =:= $\s) or (Z =:= $() or (Z =:= $))) ->
+ scan(<<Z, Rest/binary>>, ['AND' | TokAcc]);
+scan(<<D>>, TokAcc) when (D =:= $D) or (D =:= $d) ->
+ scan(<<>>, ['AND' | TokAcc]);
+scan(<<N, Z, Rest/binary>>, TokAcc)
+ when (N =:= $N orelse N =:= $n) and
+ ((Z =:= $\s) or (Z =:= $() or (Z =:= $))) ->
+ scan(<<Z, Rest/binary>>, ['NOT' | TokAcc]);
+scan(<<C, Rest/binary>>, TokAcc) when (C >= $A) and (C =< $Z);
+ (C >= $a) and (C =< $z);
+ (C >= $0) and (C =< $9) ->
+ case Rest of
+ <<$:, R/binary>> ->
+ scan(R, [{'FIELD', C} | TokAcc]);
+ _ ->
+ scan(Rest, [{'KEYWORD', C} | TokAcc])
+ end.
+
+%%---------------------------------------------------
+%% Second test case: an internal error in v3_codegen
+%% Reported by Mateusz Berezecki on 19/1/2008
+%%---------------------------------------------------
+-define(S, {42, 4242, 4711}).
+-define(R, <<90,164,116>>).
+
+test_v3_codegen() ->
+ _ = random:seed(?S),
+ B0 = gen_bit(120, <<>>),
+ B1 = set_bit(B0, 5),
+ B2 = clr_bit(B1, 5),
+ ?R = set_bit(B2, 5),
+ ok.
+
+gen_bit(0, Acc) -> Acc;
+gen_bit(N, Acc) when is_integer(N), N > 0 ->
+ gen_bit(N-1, <<Acc/bits, (random:uniform(2)-1):1>>).
+
+%% sets bit K in the Bitmap
+set_bit(<<_Start:32/unsigned-little-integer, Bitmap/bits>>, K)
+ when is_integer(K), 0 < K, K =< bit_size(Bitmap) ->
+ Before = K-1,
+ After = bit_size(Bitmap) - K,
+ <<BeforeBits:Before/bits, _:1, AfterBits:After/bits>> = Bitmap,
+ <<BeforeBits/bits, 1:1, AfterBits/bits>>.
+
+%% clears bit K in the Bitmap
+clr_bit(<<_Start:32/unsigned-little-integer, Bitmap/bits>>, K)
+ when is_integer(K), 0 < K, K =< bit_size(Bitmap) ->
+ Before = K-1,
+ After = bit_size(Bitmap) - K,
+ <<BeforeBits:Before/bits, _:1, AfterBits:After/bits>> = Bitmap,
+ <<BeforeBits/bits, 0:1, AfterBits/bits>>.
+
+%%--------------------------------------------------------------------
+%% Third test case: a bug in HiPE
+%% Reported by Steve Vinoski on 1/3/2008
+%%
+%% Below find the results of compiling and running the example code at
+%% the bottom of this message. Using "c" to compile gives the right
+%% answer; using "hipe:c" gives the wrong answer. This is with R12B-1.
+%%
+%% Within the code, on the second instance of function check/2 you'll
+%% find a commented-out guard. If you uncomment the guard, then the
+%% code works correctly with both "c" and "hipe:c".
+%%---------------------------------------------------------------------
+
+test_hipe_bug() ->
+ String = "2006/10/02/Linux-Journal",
+ Binary = list_to_binary(String),
+ StringToMatch = "200x/" ++ String ++ " ",
+ BinaryToMatch = list_to_binary(StringToMatch),
+ {ok, Binary} = match(BinaryToMatch),
+ ok.
+
+match(<<>>) ->
+ nomatch;
+match(Bin) ->
+ <<Front:16/binary, Tail/binary>> = Bin,
+ case Front of
+ <<_:3/binary,"x/",Y:4/binary,$/,M:2/binary,$/,D:2/binary,$/>> ->
+ case check(Tail) of
+ {ok, Match} ->
+ {ok, <<Y/binary,$/,M/binary,$/,D/binary,$/,Match/binary>>};
+ {nomatch, Skip} ->
+ {skip, Skip+size(Front)};
+ _ ->
+ wrong_answer
+ end;
+ _ ->
+ nomatch
+ end.
+
+check(Bin) ->
+ check(Bin, 0).
+check(<<$ , _/binary>>, 0) ->
+ {nomatch, 0};
+check(Bin, Len) -> %when Len < size(Bin) ->
+ case Bin of
+ <<Front:Len/binary, $ , _/binary>> ->
+ {ok, Front};
+ <<_:Len/binary, $., _/binary>> ->
+ {nomatch, Len};
+ _ ->
+ check(Bin, Len+1)
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_build.erl b/lib/hipe/test/bs_SUITE_data/bs_build.erl
new file mode 100644
index 0000000000..256cea9403
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_build.erl
@@ -0,0 +1,41 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_build.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose :
+%%%
+%%% Created : 12 Sep 2007
+%%%-------------------------------------------------------------------
+-module(bs_build).
+
+-export([test/0]).
+
+test() ->
+ <<0,1,2,3,4,5,6>> = Bin = << <<X>> || X <- lists:seq(0, 6)>>,
+ test(Bin).
+
+test(Bin) ->
+ <<0,1,2,3,4,5,6,0,1,2,3,4,5,6>> = RealBin = multiply(Bin, 2),
+ <<6,5,4,3,2,1,0,6,5,4,3,2,1,0>> = reverse(RealBin),
+ RealBin = copy(RealBin),
+ RealBin = bc(RealBin),
+ ok.
+
+multiply(Bin, 1) ->
+ Bin;
+multiply(Bin, N) when N > 0 ->
+ <<(multiply(Bin, N-1))/binary, Bin/binary>>.
+
+bc(Bin) ->
+ << <<X>> || <<X>> <= Bin >>.
+
+reverse(<<X, Rest/binary>>) ->
+ <<(reverse(Rest))/binary, X>>;
+reverse(<<>>) -> <<>>.
+
+copy(Bin) ->
+ copy(Bin, <<>>).
+
+copy(<<X, Rest/binary>>, Bin) ->
+ copy(Rest, <<Bin/binary, X>>);
+copy(<<>>, Bin) -> Bin.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl b/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl
new file mode 100644
index 0000000000..6125f8f87f
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl
@@ -0,0 +1,25 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_catch_bug.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests a catch-related bug which might destroy properties
+%%% of ICode CFGs which are assumed by the subsequent ICode
+%%% binary pass.
+%%% Created : 22 Jan 2004
+%%% -------------------------------------------------------------------
+-module(bs_catch_bug).
+
+-export([test/0]).
+
+test() ->
+ test(foo, <<>>).
+
+%% Introduced auxiliary test/2 function so that constant propagation
+%% does not destroy the properties of the test. - Kostis 26/1/2004
+test(X, Bin) ->
+ catch (<<_/binary>> = X),
+ X = case Bin of
+ <<42,_/binary>> -> weird_bs_match;
+ _ -> X
+ end,
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_checksum.erl b/lib/hipe/test/bs_SUITE_data/bs_checksum.erl
new file mode 100644
index 0000000000..ca4f254f12
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_checksum.erl
@@ -0,0 +1,35 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Code from Zoltan Toth that crashed the HiPE compiler (in R11B-3).
+%% The problem was that the binary matching produces a pretty large
+%% integer and we tried to find the range for this integer in a bad way.
+%% Fixed on the same day -- 6th March 2007.
+%%--------------------------------------------------------------------
+
+-module(bs_checksum).
+
+-export([test/0]).
+
+test() ->
+ "3389DAE361AF79B04C9C8E7057F60CC6" = checksum(<<42>>),
+ ok.
+
+checksum(Bin) ->
+ Context = erlang:md5_init(),
+ checksum(Context, Bin).
+
+checksum(Context, <<>>) ->
+ bin_to_hex(erlang:md5_final(Context));
+checksum(Context, <<Bin:20480/binary,Rest/binary>>) ->
+ checksum(erlang:md5_update(Context, Bin), Rest);
+checksum(Context,Bin) ->
+ checksum(erlang:md5_update(Context, Bin), <<>>).
+
+bin_to_hex(Bin) ->
+ lists:flatten([byte_to_hex(X) || X <- binary_to_list(Bin)]).
+
+byte_to_hex(Byte) ->
+ [int_to_hex(Byte div 16), int_to_hex(Byte rem 16)].
+
+int_to_hex(Int) when Int < 10 -> $0 + Int;
+int_to_hex(Int) when Int > 9 -> $A + Int - 10.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_construct.erl b/lib/hipe/test/bs_SUITE_data/bs_construct.erl
new file mode 100644
index 0000000000..9cc9ac848c
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_construct.erl
@@ -0,0 +1,128 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary construction work
+%%--------------------------------------------------------------------
+-module(bs_construct).
+
+-export([test/0]).
+
+test() ->
+ <<42>> = sz(8),
+ <<42:8/little>> = sz_little(8),
+ <<55>> = take_five(1, 3, 1, 7, 4),
+ ok = bs5(),
+ 16#10000008 = bit_size(large_bin(1, 2, 3, 4)),
+ ok = bad_ones(),
+ ok.
+
+%%--------------------------------------------------------------------
+%% Taken from a bug report submitted by Dan Wallin (24 Oct 2003), the
+%% following cases test construction of binaries whose segments have
+%% sizes that are statically unknown.
+
+sz(S) ->
+ <<42:S>>.
+
+sz_little(S) ->
+ <<42:S/little>>.
+
+take_five(A, Head, FB, C, Tail) ->
+ <<A:Head, FB:1, C:Tail>>.
+
+%%--------------------------------------------------------------------
+
+bs5() ->
+ Const = mk_constant(),
+ Pairs = mk_pairs(),
+ true = are_same(Const, Pairs),
+ true = lists:all(fun ({B, L}) -> binary_to_list(B) =:= L end, Pairs),
+ ok.
+
+are_same(C, L) ->
+ C =:= L.
+
+mk_constant() ->
+ [{<<213>>,[213]},
+ {<<56>>,[56]},
+ {<<1,2>>,[1,2]},
+ {<<71>>,[71]},
+ {<<8,1>>,[8,1]},
+ {<<3,9>>,[3,9]},
+ {<<9,3>>,[9,3]},
+ {<<0,0,0,0>>,[0,0,0,0]},
+ {<<62,0,0,0>>,[62,0,0,0]},
+ {<<0,0,0,62>>,[0,0,0,62]},
+ {<<138,99,0,147>>,[138,99,0,147]},
+ {<<138,99,0,148>>,[138,99,0,148]},
+ {<<147,0,99,138>>,[147,0,99,138]},
+ {<<255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255>>,
+ [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]},
+ {<<13>>,[13]},
+ {<<0,4,0,5>>,[0,4,0,5]},
+ {<<129>>,[129]},
+ {<<129>>,[129]},
+ {<<1,2>>,[1,2]},
+ {<<1>>,[1]},
+ {<<4,3,1>>,[4,3,1]},
+ {<<47>>,[47]},
+ {<<>>,[]},
+ {<<97,112,97>>,[97,112,97]},
+ {<<46,110,142,77,45,204,233>>,[46,110,142,77,45,204,233]},
+ {<<>>,[]}].
+
+mk_pairs() ->
+ L4 = [138,99,0,147],
+ [{<<-43>>,[256-43]},
+ {<<56>>,[56]},
+ {<<1,2>>,[1,2]},
+ {<<4:4,7:4>>,[4*16+7]},
+ {<<1:5,1:11>>,[1*8,1]},
+ {<<777:16/big>>,[3,9]},
+ {<<777:16/little>>,[9,3]},
+ {<<0.0:32/float>>,[0,0,0,0]},
+ {<<0.125:32/float>>,[62,0,0,0]},
+ {<<0.125:32/little-float>>,[0,0,0,62]},
+ {<<57285702734876389752897683:32>>,L4},
+ {<<57285702734876389752897684:32>>,[138,99,0,148]},
+ {<<57285702734876389752897683:32/little>>,lists:reverse(L4)},
+ {<<-1:17/unit:8>>,lists:duplicate(17,255)},
+ {<<13>>,[13]},
+ {<<4:8/unit:2,5:2/unit:8>>,[0,4,0,5]},
+ {<<1:1,0:6,1:1>>,[129]},
+ {<<1:1/little,0:6/little,1:1/little>>,[129]},
+ {<<<<1,2>>/binary>>,[1,2]},
+ {<<<<1,2>>:1/binary>>,[1]},
+ {<<4,3,<<1,2>>:1/binary>>,[4,3,1]},
+ {<<(256*45+47)>>,[47]},
+ {<<57:0>>,[]},
+ {<<"apa">>,"apa"},
+ {<<1:3,"string",9:5>>,[46,110,142,77,45,204,233]},
+ {<<>>,[]}].
+
+%%--------------------------------------------------------------------
+%% Constructs a big enough binary to have a bit size that needs a
+%% bignum on 32-bit architectures
+
+large_bin(X1, X2, X3, X4) ->
+ Sz = 16#4000000,
+ <<1, <<X1:Sz, X2:Sz, X3:Sz, X4:Sz>>/bits>>.
+
+%%--------------------------------------------------------------------
+%% Test construction of "bad" binaries
+
+-define(FAIL(Expr), {'EXIT', {badarg, _}} = (catch Expr)).
+
+bad_ones() ->
+ PI = math:pi(),
+ ?FAIL(<<PI>>),
+ Bin12 = <<1,2>>,
+ ?FAIL(<<Bin12>>),
+ E = 2.71,
+ ?FAIL(<<E/binary>>),
+ Int = 24334,
+ ?FAIL(<<Int/binary>>),
+ BigInt = 24334344294788947129487129487219847,
+ ?FAIL(<<BigInt/binary>>),
+ Bin123 = <<1,2,3>>,
+ ?FAIL(<<Bin123/float>>),
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_decode.erl b/lib/hipe/test/bs_SUITE_data/bs_decode.erl
new file mode 100644
index 0000000000..d12654a1e3
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_decode.erl
@@ -0,0 +1,980 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(bs_decode).
+
+-export([test/0]).
+
+-include("bs_decode_extract.hrl").
+
+-define(PDU, <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,0,0,96,
+ 6,12,146,18,14,0,15,252,16,0,0,17,0,0,128,0,2,241,33,131,
+ 0,20,7,97,112,110,48,49,51,97,8,101,114,105,99,115,115,
+ 111,110,2,115,101,132,0,20,128,192,35,16,1,5,0,16,5,117,
+ 115,101,114,53,5,112,97,115,115,53,133,0,4,172,28,12,1,
+ 133,0,4,172,28,12,3,134,0,8,145,148,113,129,0,0,0,0>>).
+
+-define(RES, {ok,{sesT_createReqV0,
+ {mvsgT_tid,{mvsgT_imsi,<<81,67,101,7,0,0,0,240>>},6},
+ [81,67,101,7,0,0,0,96],
+ {sesT_qualityOfServiceV0,1,4,9,2,18},
+ 0,subscribed,0,0,
+ {mvsgT_pdpAddressType,ietf_ipv4,[]},
+ [<<"apn013a">>,<<"ericsson">>,<<"se">>],
+ {masT_protocolConfigOptions,[],
+ {masT_pap,true,1,5,"user5","pass5"},
+ []},
+ {mvsgT_ipAddress,ipv4,172,28,12,1,0,0,0,0},
+ {mvsgT_ipAddress,ipv4,172,28,12,3,0,0,0,0},
+ {mvsT_msisdn,<<145,148,113,129,0,0,0,0>>}},
+ 1}).
+
+test() ->
+ ?RES = decode_v0_opt(42, ?PDU),
+ ok.
+
+decode_v0_opt(0, Pdu) ->
+ decode_gtpc_msg(Pdu);
+decode_v0_opt(N, Pdu) ->
+ decode_gtpc_msg(Pdu),
+ decode_v0_opt(N-1, Pdu).
+
+%%% --------------------------------------------------------------
+%%% #3.1.2 DECODE GTP-C MESSAGE
+%%% --------------------------------------------------------------
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% Function : decode_gtpc_msg(GTP_C_Message)->
+%%% {ok,Request,ControlDataUs} |
+%%% {fault,Cause,Request,ControlDataUs}
+%%%
+%%% Types : GTP_C_Message = binary(), GTP-C message from SGSN
+%%% Request = record(), Containing decoded request
+%%% ControlDataUS = record(), Containing header info
+%%% Cause = integer(), Error code
+%%%
+%%% Description: This function decodes a binary GTP-C message and
+%%% stores it in a record. Different records are used
+%%% for different message types.
+%%%
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+%%% Create PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,16:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ Errors = #protocolErrors{},
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ EmptyCreateReq = #sesT_createReqV0{tid = TID2,
+ tidRaw = binary_to_list(TID)},
+ case catch decode_ie_create(InformationElements,0,Errors,EmptyCreateReq) of
+ {ok,CreateReq} ->
+ {ok,CreateReq,SequenceNumber};
+ {fault,Cause,CreateReq} ->
+ {fault,Cause,CreateReq,SequenceNumber};
+ {'EXIT',_Reason} ->
+ {fault,193,EmptyCreateReq,SequenceNumber}
+ end;
+
+%%% Update PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,18:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ io:format("hej", []),
+ Errors = #protocolErrors{},
+ {ok,TID2}=tid_internal_storage(TID,[]),
+ EmptyUpdateReq=#sesT_updateReqV0{tid=TID2,
+ tidRaw=binary_to_list(TID)},
+ case catch decode_ie_update(InformationElements,0,Errors,
+ EmptyUpdateReq) of
+ {ok,UpdateReq} ->
+ {ok,UpdateReq,SequenceNumber};
+ {fault,Cause,UpdateReq} ->
+ {fault,Cause,UpdateReq,SequenceNumber};
+ {'EXIT',Reason} ->
+ io:format("hej", []),
+ {fault,193,EmptyUpdateReq,SequenceNumber, Reason}
+ end;
+
+%%% Delete PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,20:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ DeleteReq = #sesT_deleteReqV0{tid=TID2},
+ {ok,DeleteReq,SequenceNumber};
+
+%%% Delete PDP Context Response
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,21:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ EmptyDeleteRes = #sesT_deleteResV0{tid=TID2},
+ case catch decode_ie_delete_res(InformationElements,0,EmptyDeleteRes) of
+ {ok, DeleteRes} ->
+ {ok,DeleteRes,SequenceNumber};
+ {fault,Cause,DeleteRes} ->
+ {fault,Cause,DeleteRes,SequenceNumber};
+ {'EXIT',_Reason} ->
+ {fault,193,EmptyDeleteRes,SequenceNumber}
+ end;
+
+%%% Error handling
+decode_gtpc_msg(_GTP_C_Message) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_create/4
+%%% Decode information elements for Create PDP Context Request
+
+%%% All elements decoded
+decode_ie_create(<<>>,PresentIEs,Errors,CreateReq) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#77D) =/= 16#77D ->
+ {fault,202,CreateReq}; %Mandatory IE missing
+ true -> %OK
+ %% Check errors during decoding
+ case Errors of
+ #protocolErrors{invalidManIE=true} -> %Invalid mandatory IE
+ {fault,201,CreateReq}; %Mandatory IE incorrect
+ #protocolErrors{outOfSequence=true} -> %Out of sequence
+ {fault,193,CreateReq}; %Invalid message format
+ #protocolErrors{incorrectOptIE=true} -> %Incorrect optional IE
+ {fault,203,CreateReq}; %Optional IE incorrect
+ _ -> %OK
+ {ok,CreateReq}
+ end
+ end;
+
+%%% Quality of Service Profile, Mandatory
+decode_ie_create(<<6:8,QoSElement:3/binary-unit:8,Rest/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE's, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000001 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{qos=QoS},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000001),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{qos=QoS},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000001),
+ Errors,UpdatedCreateReq)
+ end;
+
+%%% Recovery, Optional
+decode_ie_create(<<14:8,Recovery:8,Rest/binary>>,
+ PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000002) =:= 16#00000002 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000002 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{recovery=Recovery},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000002),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{recovery=Recovery},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000002),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Selection mode, Mandatory
+decode_ie_create(<<15:8,_:6,SelectionMode:2,Rest/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000004) =:= 16#00000004 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000004 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{
+ selMode=selection_mode_internal_storage(SelectionMode)},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000004),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{
+ selMode=selection_mode_internal_storage(SelectionMode)},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000004),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Flow Label Data I, Mandatory
+decode_ie_create(<<16:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000008) =:= 16#00000008 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000008 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblData=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000008),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblData=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000008),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Flow Label Signalling, Mandatory
+decode_ie_create(<<17:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000010) =:= 16#00000010 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000010 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblSig=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblSig=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000010),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% End User Address, Mandatory
+decode_ie_create(<<128:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<PDPElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000020) =:= 16#00000020 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000020 -> %Out of sequence
+ case pdp_addr_internal_storage(PDPElement) of
+ {ok,PDPAddress} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{endUserAdd=PDPAddress},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case pdp_addr_internal_storage(PDPElement) of
+ {ok,PDPAddress} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{endUserAdd=PDPAddress},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% Access Point Name, Mandatory
+decode_ie_create(<<131:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<APNElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000040) =:= 16#00000040 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000040 -> %Out of sequence
+ case catch apn_internal_storage(APNElement,[]) of
+ {ok,APN} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{accPointName=APN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,
+ invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case catch apn_internal_storage(APNElement,[]) of
+ {ok,APN} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{accPointName=APN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ Errors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% Protocol Configuration Options, Optional
+decode_ie_create(<<132:8,Length:16,More/binary>>,PresentIEs,Errors,CreateReq) ->
+ <<ConfigurationElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000080) =:= 16#00000080 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000080 -> %Out of sequence
+ case catch pco_internal_storage(ConfigurationElement) of
+ {ok,PCO} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{protConOpt=PCO},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,
+ incorrectOptIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case catch pco_internal_storage(ConfigurationElement) of
+ {ok,PCO} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{protConOpt=PCO},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ Errors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{incorrectOptIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% SGSN Address for signalling, Mandatory OR SGSN Address for user traffic, Mandatory
+decode_ie_create(<<133:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<AddressElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000300) =:= 16#00000300 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000200 -> %Out of sequence
+ if
+ (PresentIEs band 16#00000100) =:= 16#00000000 -> %Signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> % User traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+ PresentIEs < 16#00000100 -> %OK, SGSN Address for signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK, SGSN Address for user traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% MSISDN, Mandatory
+decode_ie_create(<<134:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<MSISDNElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000400) =:= 16#00000400 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000400 -> %Out of sequence
+ case msisdn_internal_storage(MSISDNElement,[]) of
+ {ok,MSISDN} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{msisdn=MSISDN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{msisdn=#mvsT_msisdn{value=MSISDNElement}},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ Errors,UpdatedCreateReq)
+
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_create(UnexpectedIE,PresentIEs,Errors,CreateReq) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,CreateReq} %Invalid message format
+ end.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_update/4
+%%% Decode information elements for Update PDP Context Request
+
+%%% All elements decoded
+decode_ie_update(<<>>,PresentIEs,Errors,UpdateReq) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#3D) =/= 16#3D ->
+ {fault,202,UpdateReq}; %Mandatory IE missing
+ true -> %OK
+ %% Check errors during decoding
+ case Errors of
+ #protocolErrors{invalidManIE=true} -> %Invalid mandatory IE
+ {fault,201,UpdateReq}; %Mandatory IE incorrect
+ #protocolErrors{outOfSequence=true} -> %Out of sequence
+ {fault,193,UpdateReq}; %Invalid message format
+ _ -> %OK
+ {ok,UpdateReq}
+ end
+ end;
+
+%%% Quality of Service Profile, Mandatory
+decode_ie_update(<<6:8,QoSElement:3/binary-unit:8,Rest/binary>>,PresentIEs,
+ Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE's, ignore
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000001 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{qos=QoS},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000001),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{qos=QoS},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000001),
+ Errors,UpdatedUpdateReq)
+ end;
+
+%%% Recovery, Optional
+decode_ie_update(<<14:8,Recovery:8,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000002) =:= 16#00000002 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000002 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{recovery=Recovery},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000002),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{recovery=Recovery},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000002),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% Flow Label Data I, Mandatory
+decode_ie_update(<<16:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000004) =:= 16#00000004 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000004 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblData=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000004),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblData=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000004),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% Flow Label Signalling, Mandatory
+decode_ie_update(<<17:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000008) =:= 16#00000008 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000008 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblSig=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000008),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblSig=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000008),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% SGSN Address for signalling, Mandatory OR SGSN Address for user traffic, Mandatory
+decode_ie_update(<<133:8,Length:16,More/binary>>,PresentIEs,
+ Errors,UpdateReq) ->
+ <<AddressElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000030) =:= 16#00000030 -> %Repeated IE, ignore
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000020 -> %Out of sequence
+ if
+ (PresentIEs band 16#00000010) =:= 16#00000000 -> %Signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdateReq)
+ end;
+ true -> % User traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdateReq)
+ end
+ end;
+ PresentIEs < 16#00000010 -> %OK, SGSN Address for signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ Errors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdateReq)
+ end;
+ true -> %OK, SGSN Address for user traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ Errors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdateReq)
+ end
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_update(UnexpectedIE,PresentIEs,Errors,UpdateReq) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,UpdateReq} %Invalid message format
+ end.
+
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_delete_req/4
+%%% Decode information elements for Delete PDP Context Request
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_delete_res/4
+%%% Decode information elements for Delete PDP Context Response
+
+%%% All elements decoded
+decode_ie_delete_res(<<>>,PresentIEs,DeleteRes) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#0001) =/= 16#0001 ->
+ {fault,202,DeleteRes}; %Mandatory IE missing
+ true -> %OK
+ {ok,DeleteRes}
+ end;
+
+%%% Cause, Mandatory
+decode_ie_delete_res(<<1:8,Cause:8,Rest/binary>>,PresentIEs,DeleteRes) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ true -> %OK
+ UpdatedDeleteRes=DeleteRes#sesT_deleteResV0{cause=Cause},
+ decode_ie_delete_res(Rest,(PresentIEs bor 16#00000001),
+ UpdatedDeleteRes)
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_delete_res(UnexpectedIE,PresentIEs,DeleteRes) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,DeleteRes} %Invalid message format
+ end.
+
+%%% --------------------------------------------------------------
+%%% #3.2 COMMON INTERNAL FUNCTIONS
+%%% --------------------------------------------------------------
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% check_ie/1
+%%% Check Information Element, Unexpected or Unknown
+check_ie(<<1:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% IMSI
+check_ie(<<2:8,_:8/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% RAI
+check_ie(<<3:8,_:6/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% TTLI
+check_ie(<<4:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% P-TMSI
+check_ie(<<5:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Quality of Service Profile
+check_ie(<<6:8,_:3/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Reordering Required
+check_ie(<<8:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Authentication Triplet
+check_ie(<<9:8,_:28/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MAP Cause
+check_ie(<<11:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% P-TMSI Signature
+check_ie(<<12:8,_:3/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MS Validated
+check_ie(<<13:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Recovery
+check_ie(<<14:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Selection Mode
+check_ie(<<15:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Data I
+check_ie(<<16:8,_:16,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Signalling
+check_ie(<<17:8,_:16,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Data II
+check_ie(<<18:8,_:32,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MS Not Reachable Reason
+check_ie(<<19:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Charging ID
+check_ie(<<127:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% TLV element, skipped using Length
+check_ie(<<1:1,_:7,Length:16,More/binary>>) ->
+ if
+ Length > byte_size(More) ->
+ {unhandled_ie};
+ true ->
+ <<_:Length/binary-unit:8,Rest/binary>> = More,
+ {handled_ie,Rest}
+ end;
+%%% TV element, unknown size. Can not be handled.
+check_ie(_UnhandledIE) ->
+ {unhandled_ie}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% tid_internal_storage/3
+%%% Convert TID binary to internal datatype
+tid_internal_storage(Bin,_) ->
+ Size = byte_size(Bin) - 1,
+ <<Front:Size/binary,NSAPI:4,DigitN:4>> = Bin,
+ Result =
+ case DigitN of
+ 2#1111 ->
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Front}, nsapi = NSAPI};
+ _ ->
+ Value = <<Front/binary,2#1111:4,DigitN:4>>,
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Value}, nsapi = NSAPI}
+ end,
+ {ok,Result}.
+%% tid_internal_storage(<<NSAPI:4,2#1111:4>>,IMSI) ->
+%% {ok,#mvsgT_tid{imsi=#mvsgT_imsi{value=lists:reverse(IMSI)},
+%% nsapi=NSAPI}};
+%% tid_internal_storage(<<NSAPI:4,DigitN:4>>,IMSI) when
+%% DigitN < 10 ->
+%% {ok,#mvsgT_tid{imsi=#mvsgT_imsi{value=lists:reverse([(DigitN bor 2#11110000)|IMSI])},
+%% nsapi=NSAPI}};
+%% tid_internal_storage(<<2#11111111:8,Rest/binary>>,IMSI) ->
+%% tid_internal_storage(Rest,IMSI);
+%% tid_internal_storage(<<2#1111:4,DigitN:4,Rest/binary>>,IMSI) when
+%% DigitN < 10 ->
+%% tid_internal_storage(Rest,[(DigitN bor 2#11110000)|IMSI]);
+%% tid_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>,IMSI) when
+%% DigitNplus1 < 10,
+%% DigitN < 10 ->
+%% tid_internal_storage(Rest,[((DigitNplus1 bsl 4) bor DigitN)|IMSI]);
+%% tid_internal_storage(_Rest,_IMSI) ->
+%% {fault}. %% Mandatory IE incorrect
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% selection_mode_internal_storage/1
+%%% Convert Selection Mode integer to internal datatype (enum)
+selection_mode_internal_storage(0) ->
+ subscribed;
+selection_mode_internal_storage(1) ->
+ msRequested;
+selection_mode_internal_storage(2) ->
+ sgsnSelected;
+selection_mode_internal_storage(3) ->
+ sgsnSelected.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% pdp_addr_internal_storage/1
+%%% Convert PDP address to internal datatype (record containing
+%%% addresstype and value)
+pdp_addr_internal_storage(<<_:4,0:4,1:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=etsi_ppp,address=[]}};
+pdp_addr_internal_storage(<<_:4,0:4,2:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=etsi_osp_ihoss,address=[]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#21:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv4,address=[]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#21:8,IP_A:8,IP_B:8,IP_C:8,IP_D:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv4,
+ address=[IP_A,IP_B,IP_C,IP_D]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#57:8,IP_A:16,IP_B:16,IP_C:16,IP_D:16,
+ IP_E:16,IP_F:16,IP_G:16,IP_H:16>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv6,
+ address=[IP_A,IP_B,IP_C,IP_D,IP_E,IP_F,IP_G,IP_H]}};
+pdp_addr_internal_storage(_PDP_ADDR) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% apn_internal_storage/2
+%%% Convert APN to internal datatype (List containing APN labels)
+apn_internal_storage(<<>>,APN) ->
+ {ok,lists:reverse(APN)};
+apn_internal_storage(<<Length:8,Rest/binary>>,APN) ->
+ <<Label:Length/binary-unit:8,MoreAPNLabels/binary>> = Rest,
+ apn_internal_storage(MoreAPNLabels,[Label|APN]).
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% pco_internal_storage/1
+%%% Convert Protocol Configuration Options to internal datatype.
+%%% Implemented configuration options:
+%%% For PPP:
+%%% LCP - Not implemented
+%%% PAP - Authenticate request
+%%% CHAP - Challenge
+%%% - Response
+%%% IPCP - IP-Address
+%%% For OSP:IHOSS
+%%% Nothing implemented
+pco_internal_storage(<<1:1,_:4,0:3,PPPConfigurationOptions/binary>>) ->
+ case ppp_configuration_options(PPPConfigurationOptions,
+ #masT_pap{exists=false},[],[]) of
+ {ok,PAP,CHAP,IPCP} ->
+ {ok,#masT_protocolConfigOptions{pap=PAP,chap=CHAP,ipcp=IPCP}};
+ {fault} ->
+ {fault}
+ end;
+pco_internal_storage(<<1:1,_:4,1:3,_OSP_IHOSSConfigurationOptions/binary>>) ->
+ {ok,osp_ihoss};
+pco_internal_storage(_UnknownConfigurationOptions) ->
+ {fault}. %% Optional IE incorrect
+
+ppp_configuration_options(<<>>,PAP,CHAP,IPCP) ->
+ {ok,PAP,CHAP,IPCP};
+ppp_configuration_options(<<16#C021:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% LCP - Not implemented
+ <<_LCP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#C023:16,_Length:8,1:8,Identifier:8,DataLength:16,
+ More/binary>>,_PAP,CHAP,IPCP) ->
+ %% PAP - Authenticate request
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<PeerIDLength:8,PeerData/binary>> = Data,
+ <<PeerID:PeerIDLength/binary-unit:8,PasswdLength:8,PasswordData/binary>> = PeerData,
+ <<Password:PasswdLength/binary,_Padding/binary>> = PasswordData,
+ ppp_configuration_options(Rest,#masT_pap{exists=true,code=1,id=Identifier,
+ username=binary_to_list(PeerID),
+ password=binary_to_list(Password)},CHAP,IPCP);
+
+ppp_configuration_options(<<16#C023:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% PAP - Other, not implemented
+ <<_PAP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#C223:16,_Length:8,1:8,Identifier:8,DataLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Challenge
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<ValueSize:8,ValueAndName/binary>> = Data,
+ <<Value:ValueSize/binary-unit:8,Name/binary>> = ValueAndName,
+ ppp_configuration_options(Rest,PAP,[#masT_chap{code=1,id=Identifier,
+ value=binary_to_list(Value),
+ name=binary_to_list(Name)}|CHAP],
+ IPCP);
+ppp_configuration_options(<<16#C223:16,_Length:8,2:8,Identifier:8,DataLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Response
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<ValueSize:8,ValueAndName/binary>> = Data,
+ <<Value:ValueSize/binary-unit:8,Name/binary>> = ValueAndName,
+ ppp_configuration_options(Rest,PAP,[#masT_chap{code=2,id=Identifier,
+ value=binary_to_list(Value),
+ name=binary_to_list(Name)}|CHAP],
+ IPCP);
+ppp_configuration_options(<<16#C223:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Other, not implemented
+ <<_CHAP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#8021:16,_Length:8,1:8,Identifier:8,OptionsLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% IPCP - Configure request
+ ActualOptionsLength=OptionsLength-4, %% OptionsLength includes Code, Identifier and itself
+ <<Options:ActualOptionsLength/binary-unit:8,Rest/binary>> = More,
+ case Options of
+ <<3:8,6:8,A1:8,A2:8,A3:8,A4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=3,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=A1,a2=A2,
+ a3=A3,a4=A4,
+ a5=0,a6=0,
+ a7=0,a8=0},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+ <<129:8,6:8,B1:8,B2:8,B3:8,B4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=129,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=B1,a2=B2,
+ a3=B3,a4=B4},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+
+ <<131:8,6:8,C1:8,C2:8,C3:8,C4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=131,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=C1,a2=C2,
+ a3=C3,a4=C4},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+ _ ->
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP)
+ end;
+ppp_configuration_options(<<_UnknownProtocolID:16,Length:8,More/binary>>,
+ PAP,CHAP,IPCP) ->
+ <<_Skipped:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(_Unhandled,_PAP,_CHAP,_IPCP) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% gsn_addr_internal_storage/1
+%%% Convert GSN Address to internal datatype
+gsn_addr_internal_storage(<<IP_A:8,IP_B:8,IP_C:8,IP_D:8>>) ->
+ {ok,#mvsgT_ipAddress{version=ipv4,a1=IP_A,a2=IP_B,a3=IP_C,a4=IP_D,a5=0,a6=0,a7=0,a8=0}};
+gsn_addr_internal_storage(<<IP_A:16,IP_B:16,IP_C:16,IP_D:16,
+ IP_E:16,IP_F:16,IP_G:16,IP_H:16>>) ->
+ {ok,#mvsgT_ipAddress{version=ipv6,a1=IP_A,a2=IP_B,a3=IP_C,a4=IP_D,
+ a5=IP_E,a6=IP_F,a7=IP_G,a8=IP_H}};
+gsn_addr_internal_storage(_GSN_ADDR) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% msisdn_internal_storage/3
+%%% Convert MSISDN binary to internal datatype (TBCD-octet list)
+
+msisdn_internal_storage(<<>>,MSISDN) ->
+ {ok,#mvsT_msisdn{value=lists:reverse(MSISDN)}};
+msisdn_internal_storage(<<2#11111111:8,_Rest/binary>>,MSISDN) ->
+ {ok,#mvsT_msisdn{value=lists:reverse(MSISDN)}};
+msisdn_internal_storage(<<2#1111:4,DigitN:4,_Rest/binary>>,MSISDN) when
+ DigitN < 10 ->
+ {ok,#mvsT_msisdn{value=lists:reverse([(DigitN bor 2#11110000)|MSISDN])}};
+msisdn_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>,MSISDN) when
+ DigitNplus1 < 10,
+ DigitN < 10 ->
+ NewMSISDN=[((DigitNplus1 bsl 4) bor DigitN)|MSISDN],
+ msisdn_internal_storage(Rest,NewMSISDN);
+msisdn_internal_storage(_Rest,_MSISDN) ->
+ {fault}. %% Mandatory IE incorrect
diff --git a/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl b/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl
new file mode 100644
index 0000000000..80add514a0
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl
@@ -0,0 +1,91 @@
+-ifndef(EXTDEC_HRL).
+-define(EXTDEC_HRL, true).
+
+-record(protocolErrors,{
+ invalidManIE=false,
+ outOfSequence=false,
+ incorrectOptIE=false}).
+-record(mvsT_msisdn, {value}).
+-record(mvsT_isdnAddress, {value}).
+-record(mvsT_hlrAddress, {value}).
+-record(mvsT_authenticationTriplet, {rand, sres, kc}).
+-record(mvsT_authenticationQuintuplet, {rand, xres, ck, ik, autn}).
+-record(mvsT_resynchInfo, {rand, auts}).
+-record(mvsT_resynch, {label, value}).
+-record(mvsT_storeImsiFault, {label, value}).
+-record(mvsT_additionalImsisResults, {roamingStatus, defaultApnOperatorId, misc1, misc2, misc3}).
+-record(mvsT_pdpActiveRecord, {contextId, nsapi, pdpTypeReq, pdpAddrReq, apnReq, qosReq, pdpTypeInUse, pdpAddressNature, pdpAddressInUse, apnInUse, ggsnAddrInUse, qosNegotiated}).
+-record(mvsgT_rai, {mcc, mnc, lac, rac}).
+-record(mvsgT_lai, {mcc, mnc, lac}).
+-record(mvsgT_errorInd, {dummyElement}).
+-record(mvsgT_deleteRes, {cause}).
+-record(mvsgT_deleteReq, {dummyElement}).
+-record(mvsgT_ptmsi, {value}).
+-record(mvsgT_ddRef, {cid, extId, validity}).
+-record(mvsgT_dpRef, {cid, devId}).
+-record(mvsgT_qualityOfService, {delayClass, relClass, peakThrput, precClass, meanThrput}).
+-record(mvsgT_pdpAddressType, {pdpTypeNbr, address}).
+-record(mvsgT_msNetworkCapability, {gea1, smCapDediccatedChannel, smCapGprsChannel, ucs2Support, ssScreenInd}).
+-record(mvsgT_cellId, {mcc, mnc, lac, rac, ci}).
+-record(mvsgT_ipAddress, {version, a1, a2, a3, a4, a5, a6, a7, a8}).
+-record(mvsgT_restartContextData, {gsn_address, restart_counter}).
+-record(mvsgT_updateRes, {cause, qos, ggsnAddSig, ggsnAddUser, recovery, flowLabDataI, flowLabSig, chargId, optFlags}).
+-record(mvsgT_updateReq, {qos, sgsnAddSig, sgsnAddUser, recovery, flowLabDataI, flowLabSig, otpFlags}).
+-record(mvsgT_imsi, {value}).
+-record(mvsgT_tid, {imsi, nsapi}).
+-record(mvsgT_extQualityOfService, {allocRetention, trfClass, delOrder, delOfErrSDU, maxSDUSize, maxBRUp, maxBRDown, residualBER, sduErrorRatio, transferDelay, traffHandlPrio, guarBRUp, guarBRDown}).
+-record(mvsgT_qualServ, {label, value}).
+-record(sesT_gnDevContextData, {numberOfContext, recoveryInfoArray}).
+-record(sesT_tid, {imsi, nsapi}).
+-record(sesT_gnDevContextDataInfo, {dummy}).
+-record(sesT_teid, {value}).
+-record(sesT_qualityOfServiceV1, {allocRetPriority, delayClass, reliabilityClass, peakThroughput, precedenceClass, meanThroughput, trafficClass, deliveryOrder, delivOfErrSDU, maxSDUsize, maxBrUp, maxBrDown, residualBER, sduErrorRatio, transferDelay, trafficHandlPrio, guaranteedBrUp, guaranteedBrDown}).
+-record(sesT_flowLbl, {value}).
+-record(sesT_qualityOfServiceV0, {delayClass, reliabilityClass, peakThroughput, precedenceClass, meanThroughput}).
+-record(sesT_createReq, {dummy}).
+-record(sesT_createRes, {dummy}).
+-record(sesT_deleteReq, {dummy}).
+-record(sesT_deleteRes, {dummy}).
+-record(sesT_gtid, {imsi, nsapi}).
+-record(sesT_updateReq, {dummy}).
+-record(sesT_updateRes, {dummy}).
+-record(sesT_gcontrolDataUs, {gtpSeqNr, gsnAddress, gtunnelId, gsnPort}).
+-record(sesT_gcontrolDataDs, {gtpSeqNr, gsnAddress, protocol, gtunnelId, flowLabSig, gsnPort}).
+-record(sesT_createResV1, {cause, teidSignalling, teidData, ggsnAddSig, ggsnAddUser, reorderingReq, recovery, chargId, endUserAdd, optFlags, protConOpt, qos}).
+-record(sesT_createReqV1, {qos, sgsnAddSig, sgsnAddUser, selMode, recovery, msisdn, endUserAdd, accPointName, optFlags, protConOpt, imsi, teidData, teidSignalling, nsapi}).
+-record(sesT_deleteReqV1, {teardownInd, nsapi}).
+-record(sesT_deleteResV1, {cause}).
+-record(sesT_updateReqV1, {imsi, recovery, teidData, teidSignalling, nsapi, sgsnAddSig, sgsnAddUser, qos}).
+-record(sesT_updateResV1, {cause, recovery, teidData, teidSignalling, chargId, ggsnAddSig, ggsnAddUser, qos}).
+-record(sesT_deleteReqV0, {tid}).
+-record(sesT_deleteResV0, {tid, cause}).
+-record(sesT_createReqV0, {tid, tidRaw, qos, recovery, selMode, flowLblData, flowLblSig, endUserAdd, accPointName, protConOpt, sgsnAddSig, sgsnAddUser, msisdn}).
+-record(sesT_createResV0, {tid, cause, qos, reorderingReq, recovery, flowLblData, flowLblSig, chargId, endUserAdd, protConOpt, ggsnAddSig, ggsnAddUser}).
+-record(sesT_updateReqV0, {tid, tidRaw, qos, recovery, flowLblData, flowLblSig, sgsnAddSig, sgsnAddUser}).
+-record(sesT_updateResV0, {tid, cause, qos, recovery, flowLblData, flowLblSig, chargId, ggsnAddSig, ggsnAddUser}).
+-record(sesT_echoReq, {dummy}).
+-record(sesT_echoRes, {dummy}).
+-record(sesT_echoReqV1, {dummy}).
+-record(sesT_echoResV1, {recovery}).
+-record(sesT_echoReqV0, {dummy}).
+-record(sesT_echoResV0, {recovery}).
+-record(masT_apnSecurity, {sgsnSel, subscribedSel, userSel, ipSpoofing}).
+-record(masT_radiusServer, {radiusApn, radiusAddress, radiusMepAddress, timer, tries, secret}).
+-record(masT_ipSegment, {startSegAddress, stopSegAddress, netmask}).
+-record(masT_llf, {name, metric, id}).
+-record(masT_apnLink, {ggsnAddress, ipSegList, ipAddressOrigin, llfConnName, mepAddress}).
+-record(masT_ispSubObj, {label, value}).
+-record(masT_ipcpData, {type, ipAddress, rawMessage}).
+-record(masT_ipcp, {exists, code, id, ipcpList}).
+-record(masT_pap, {exists, code, id, username, password}).
+-record(masT_chap, {code, id, value, name}).
+-record(masT_ispDevContextData, {nsapi, ipAddress, apnhandle}).
+-record(masT_protocolConfigOptions, {chap, pap, ipcp}).
+-record(masT_apnRadius, {radiusAddress, timer, tries, secret}).
+-record(masT_outbandRadius, {gwAddress, llfConnName, primRadius, secRadius}).
+-record(masT_radiusPair, {primRadius, secRadius}).
+-record(masT_radiusOpt, {dummyMsisdnAuth, dummyMsisdnAcct, msisdnInAuth, msisdnInAcct, sendFullImsi, sendMccMnc, sendSelMode, sendChargingId, asynchAcct}).
+-record(masT_radiusConfig, {hostApn, authPair, acctList, radiusOptions}).
+-record(masT_apnConfig, {link, security, radiusConfig, primDns, secDns, dhcpAddress, indAcct, indAuth, userNameBasedSelection}).
+
+-endif.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_des.erl b/lib/hipe/test/bs_SUITE_data/bs_des.erl
new file mode 100644
index 0000000000..9c495d37ad
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_des.erl
@@ -0,0 +1,734 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_des.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : An implementation of the DES Encryption/Descryption
+%%% algorithm using Erlang binaries.
+%%%
+%%% Created : 14 Apr 2004
+%%%-------------------------------------------------------------------
+-module(bs_des).
+
+-export([encode/2, decode/2, test/0]).
+
+-define(ITERATIONS, 42). %% for benchmarking use a higher number
+
+test() ->
+ Bin = <<1:64>>,
+ Size= byte_size(Bin),
+ Key = <<4704650607608769871263876:64>>,
+ Jumbled = run_encode(?ITERATIONS, Bin, Key),
+ Unjumbled = run_decode(?ITERATIONS, Jumbled, Key),
+ <<Bin:Size/binary,_/binary>> = Unjumbled,
+ ok.
+
+run_encode(1, Bin, Key) ->
+ encode(Bin, Key);
+run_encode(N, Bin, Key) ->
+ encode(Bin, Key),
+ run_encode(N-1, Bin, Key).
+
+run_decode(1, Bin, Key) ->
+ decode(Bin, Key);
+run_decode(N, Bin, Key) ->
+ decode(Bin, Key),
+ run_decode(N-1, Bin, Key).
+
+encode(Data, Key) ->
+ Keys = schedule(Key),
+ list_to_binary(encode_data(Data, Keys)).
+
+decode(Data, Key) ->
+ Keys = lists:reverse(schedule(Key)),
+ list_to_binary(decode_data(Data, Keys)).
+
+encode_data(<<Data:8/binary, Rest/binary>>, Keys) ->
+ [ipinv(des_core(ip(Data), Keys))|encode_data(Rest, Keys)];
+encode_data(<<Rest/binary>>, Keys) ->
+ case byte_size(Rest) of
+ 0 -> [];
+ X ->
+ Y = 8 - X,
+ Data = <<Rest/binary, 0:Y/integer-unit:8>>,
+ [ipinv(des_core(ip(Data), Keys))]
+ end.
+
+decode_data(<<Data:8/binary, Rest/binary>>, Keys) ->
+ [ipinv(dechiper(ip(Data), Keys))|decode_data(Rest, Keys)];
+decode_data(_, _Keys) ->
+ [].
+
+schedule(Key) ->
+ NewKey = pc1(Key),
+ subkeys(NewKey, 1).
+
+subkeys(_Key, 17) ->
+ [];
+subkeys(Key, N) ->
+ TmpKey =
+ case rotate(N) of
+ 1 ->
+ <<X1:1, L:27, X2:1, R:27>> = Key,
+ <<L:27, X1:1, R:27, X2:1>>;
+ 2 ->
+ <<X1:2, L:26, X2:2, R:26>> = Key,
+ <<L:26, X1:2, R:26, X2:2>>
+ end,
+ [pc2(TmpKey)|subkeys(TmpKey, N+1)].
+
+pc2(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ _I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, _I18:1, I19:1, I20:1, I21:1, _I22:1, I23:1, I24:1,
+ _I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, _I35:1, I36:1, I37:1, _I38:1, I39:1, I40:1,
+ I41:1, I42:1, _I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, _I54:1, I55:1, I56:1>>) ->
+ <<I14:1, I17:1, I11:1, I24:1, I1:1, I5:1, I3:1, I28:1,
+ I15:1, I6:1, I21:1, I10:1, I23:1, I19:1, I12:1, I4:1,
+ I26:1, I8:1, I16:1, I7:1, I27:1, I20:1, I13:1, I2:1,
+ I41:1, I52:1, I31:1, I37:1, I47:1, I55:1, I30:1, I40:1,
+ I51:1, I45:1, I33:1, I48:1, I44:1, I49:1, I39:1, I56:1,
+ I34:1, I53:1, I46:1, I42:1, I50:1, I36:1, I29:1, I32:1>>.
+
+pc1(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, _:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, _:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, _:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, _:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, _:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, _:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, _:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, _:1>>) ->
+ <<I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I60:1, I52:1, I44:1, I36:1, I63:1, I55:1, I47:1, I39:1,
+ I31:1, I23:1, I15:1, I7:1, I62:1, I54:1, I46:1, I38:1,
+ I30:1, I22:1, I14:1, I6:1, I61:1, I53:1, I45:1, I37:1,
+ I29:1, I21:1, I13:1, I5:1, I28:1, I20:1, I12:1, I4:1>>.
+
+ip(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, I40:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, I56:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, I64:1>>) ->
+ <<I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I60:1, I52:1, I44:1, I36:1, I28:1, I20:1, I12:1, I4:1,
+ I62:1, I54:1, I46:1, I38:1, I30:1, I22:1, I14:1, I6:1,
+ I64:1, I56:1, I48:1, I40:1, I32:1, I24:1, I16:1, I8:1,
+ I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I61:1, I53:1, I45:1, I37:1, I29:1, I21:1, I13:1, I5:1,
+ I63:1, I55:1, I47:1, I39:1, I31:1, I23:1, I15:1, I7:1>>.
+
+ipinv(<<I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I60:1, I52:1, I44:1, I36:1, I28:1, I20:1, I12:1, I4:1,
+ I62:1, I54:1, I46:1, I38:1, I30:1, I22:1, I14:1, I6:1,
+ I64:1, I56:1, I48:1, I40:1, I32:1, I24:1, I16:1, I8:1,
+ I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I61:1, I53:1, I45:1, I37:1, I29:1, I21:1, I13:1, I5:1,
+ I63:1, I55:1, I47:1, I39:1, I31:1, I23:1, I15:1, I7:1>>) ->
+ <<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, I40:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, I56:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, I64:1>>.
+
+dechiper(<<L:4/binary, R:4/binary>>, Keys) ->
+ dechiper(L, R, Keys, 16).
+
+dechiper(L, R, [], 0) ->
+ <<L:4/binary, R:4/binary>>;
+dechiper(L, R, [Key|Rest], I) ->
+ NewL = ebit(L),
+ XorL = xor48(NewL, Key),
+ Sboxed = sboxing(XorL),
+ Ped = p(Sboxed),
+ EndL = xor32(Ped, R),
+ dechiper(EndL, L, Rest, I-1).
+
+des_core(<<L:4/binary, R:4/binary>>, Keys) ->
+ des_core(L, R, Keys, 0).
+
+des_core(L, R, [], 16) ->
+ <<L:4/binary, R:4/binary>>;
+des_core(L, R, [Key|Rest], I) when I<16 ->
+ NewR = ebit(R),
+ XorR = xor48(NewR, Key),
+ Sboxed = sboxing(XorR),
+ Ped = p(Sboxed),
+ EndR = xor32(Ped, L),
+ des_core(R, EndR, Rest, I+1).
+
+ebit(<<I1:1, I2:2, I3:2,I4:2,I5:2,I6:2,
+ I7:2,I8:2,I9:2,I10:2,I11:2,I12:2,
+ I13:2,I14:2,I15:2,I16:2,I17:1>>) ->
+ <<I17:1, I1:1, I2:2, I3:2, I3:2,
+ I4:2, I5:2, I5:2, I6:2,
+ I7:2, I7:2, I8:2, I9:2,
+ I9:2, I10:2, I11:2, I11:2,
+ I12:2, I13:2, I13:2, I14:2,
+ I15:2, I15:2, I16:2, I17:1, I1:1>>.
+
+p(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1>>) ->
+ <<I16:1, I7:1, I20:1, I21:1, I29:1, I12:1, I28:1, I17:1,
+ I1:1, I15:1, I23:1, I26:1, I5:1, I18:1, I31:1, I10:1,
+ I2:1, I8:1, I24:1, I14:1, I32:1, I27:1, I3:1, I9:1,
+ I19:1, I13:1, I30:1, I6:1, I22:1, I11:1, I4:1, I25:1>>.
+
+rotate(1) -> 1;
+rotate(2) -> 1;
+rotate(9) -> 1;
+rotate(16) -> 1;
+rotate(N) when N>0, N<17 -> 2.
+
+%% xor64(<<I1:16, I2:16, I3:16, I4:16>>,<<J1:16, J2:16, J3:16, J4:16>>) ->
+%% K1 = I1 bxor J1,
+%% K2 = I2 bxor J2,
+%% K3 = I3 bxor J3,
+%% K4 = I4 bxor J4,
+%% <<K1:16, K2:16, K3:16, K4:16>>.
+
+xor48(<<I1:16, I2:16, I3:16>>,<<J1:16, J2:16, J3:16>>) ->
+ K1 = I1 bxor J1,
+ K2 = I2 bxor J2,
+ K3 = I3 bxor J3,
+ <<K1:16, K2:16, K3:16>>.
+
+xor32(<<I1:16, I2:16>>,<<J1:16, J2:16>>) ->
+ K1 = I1 bxor J1,
+ K2 = I2 bxor J2,
+ <<K1:16, K2:16>>.
+
+sboxing(<<A1:6, A2:6, A3:6, A4:6, A5:6, A6:6, A7:6, A8:6>>) ->
+ S1 = sbox(A1, 1),
+ S2 = sbox(A2, 2),
+ S3 = sbox(A3, 3),
+ S4 = sbox(A4, 4),
+ S5 = sbox(A5, 5),
+ S6 = sbox(A6, 6),
+ S7 = sbox(A7, 7),
+ S8 = sbox(A8, 8),
+ <<S1:4,S2:4,S3:4,S4:4,S5:4,S6:4,S7:4,S8:4>>.
+
+sbox(0,1) -> 14;
+sbox(1,1) -> 0;
+sbox(2,1) -> 4;
+sbox(3,1) -> 15;
+sbox(4,1) -> 13;
+sbox(5,1) -> 7;
+sbox(6,1) -> 1;
+sbox(7,1) -> 4;
+sbox(8,1) -> 2;
+sbox(9,1) -> 14;
+sbox(10,1) -> 15;
+sbox(11,1) -> 2;
+sbox(12,1) -> 11;
+sbox(13,1) -> 13;
+sbox(14,1) -> 8;
+sbox(15,1) -> 1;
+sbox(16,1) -> 3;
+sbox(17,1) -> 10;
+sbox(18,1) -> 10;
+sbox(19,1) -> 6;
+sbox(20,1) -> 6;
+sbox(21,1) -> 12;
+sbox(22,1) -> 12;
+sbox(23,1) -> 11;
+sbox(24,1) -> 5;
+sbox(25,1) -> 9;
+sbox(26,1) -> 9;
+sbox(27,1) -> 5;
+sbox(28,1) -> 0;
+sbox(29,1) -> 3;
+sbox(30,1) -> 7;
+sbox(31,1) -> 8;
+sbox(32,1) -> 4;
+sbox(33,1) -> 15;
+sbox(34,1) -> 1;
+sbox(35,1) -> 12;
+sbox(36,1) -> 14;
+sbox(37,1) -> 8;
+sbox(38,1) -> 8;
+sbox(39,1) -> 2;
+sbox(40,1) -> 13;
+sbox(41,1) -> 4;
+sbox(42,1) -> 6;
+sbox(43,1) -> 9;
+sbox(44,1) -> 2;
+sbox(45,1) -> 1;
+sbox(46,1) -> 11;
+sbox(47,1) -> 7;
+sbox(48,1) -> 15;
+sbox(49,1) -> 5;
+sbox(50,1) -> 12;
+sbox(51,1) -> 11;
+sbox(52,1) -> 9;
+sbox(53,1) -> 3;
+sbox(54,1) -> 7;
+sbox(55,1) -> 14;
+sbox(56,1) -> 3;
+sbox(57,1) -> 10;
+sbox(58,1) -> 10;
+sbox(59,1) -> 0;
+sbox(60,1) -> 5;
+sbox(61,1) -> 6;
+sbox(62,1) -> 0;
+sbox(63,1) -> 13;
+sbox(0,2) -> 15;
+sbox(1,2) -> 3;
+sbox(2,2) -> 1;
+sbox(3,2) -> 13;
+sbox(4,2) -> 8;
+sbox(5,2) -> 4;
+sbox(6,2) -> 14;
+sbox(7,2) -> 7;
+sbox(8,2) -> 6;
+sbox(9,2) -> 15;
+sbox(10,2) -> 11;
+sbox(11,2) -> 2;
+sbox(12,2) -> 3;
+sbox(13,2) -> 8;
+sbox(14,2) -> 4;
+sbox(15,2) -> 14;
+sbox(16,2) -> 9;
+sbox(17,2) -> 12;
+sbox(18,2) -> 7;
+sbox(19,2) -> 0;
+sbox(20,2) -> 2;
+sbox(21,2) -> 1;
+sbox(22,2) -> 13;
+sbox(23,2) -> 10;
+sbox(24,2) -> 12;
+sbox(25,2) -> 6;
+sbox(26,2) -> 0;
+sbox(27,2) -> 9;
+sbox(28,2) -> 5;
+sbox(29,2) -> 11;
+sbox(30,2) -> 10;
+sbox(31,2) -> 5;
+sbox(32,2) -> 0;
+sbox(33,2) -> 13;
+sbox(34,2) -> 14;
+sbox(35,2) -> 8;
+sbox(36,2) -> 7;
+sbox(37,2) -> 10;
+sbox(38,2) -> 11;
+sbox(39,2) -> 1;
+sbox(40,2) -> 10;
+sbox(41,2) -> 3;
+sbox(42,2) -> 4;
+sbox(43,2) -> 15;
+sbox(44,2) -> 13;
+sbox(45,2) -> 4;
+sbox(46,2) -> 1;
+sbox(47,2) -> 2;
+sbox(48,2) -> 5;
+sbox(49,2) -> 11;
+sbox(50,2) -> 8;
+sbox(51,2) -> 6;
+sbox(52,2) -> 12;
+sbox(53,2) -> 7;
+sbox(54,2) -> 6;
+sbox(55,2) -> 12;
+sbox(56,2) -> 9;
+sbox(57,2) -> 0;
+sbox(58,2) -> 3;
+sbox(59,2) -> 5;
+sbox(60,2) -> 2;
+sbox(61,2) -> 14;
+sbox(62,2) -> 15;
+sbox(63,2) -> 9;
+sbox(0,3) -> 10;
+sbox(1,3) -> 13;
+sbox(2,3) -> 0;
+sbox(3,3) -> 7;
+sbox(4,3) -> 9;
+sbox(5,3) -> 0;
+sbox(6,3) -> 14;
+sbox(7,3) -> 9;
+sbox(8,3) -> 6;
+sbox(9,3) -> 3;
+sbox(10,3) -> 3;
+sbox(11,3) -> 4;
+sbox(12,3) -> 15;
+sbox(13,3) -> 6;
+sbox(14,3) -> 5;
+sbox(15,3) -> 10;
+sbox(16,3) -> 1;
+sbox(17,3) -> 2;
+sbox(18,3) -> 13;
+sbox(19,3) -> 8;
+sbox(20,3) -> 12;
+sbox(21,3) -> 5;
+sbox(22,3) -> 7;
+sbox(23,3) -> 14;
+sbox(24,3) -> 11;
+sbox(25,3) -> 12;
+sbox(26,3) -> 4;
+sbox(27,3) -> 11;
+sbox(28,3) -> 2;
+sbox(29,3) -> 15;
+sbox(30,3) -> 8;
+sbox(31,3) -> 1;
+sbox(32,3) -> 13;
+sbox(33,3) -> 1;
+sbox(34,3) -> 6;
+sbox(35,3) -> 10;
+sbox(36,3) -> 4;
+sbox(37,3) -> 13;
+sbox(38,3) -> 9;
+sbox(39,3) -> 0;
+sbox(40,3) -> 8;
+sbox(41,3) -> 6;
+sbox(42,3) -> 15;
+sbox(43,3) -> 9;
+sbox(44,3) -> 3;
+sbox(45,3) -> 8;
+sbox(46,3) -> 0;
+sbox(47,3) -> 7;
+sbox(48,3) -> 11;
+sbox(49,3) -> 4;
+sbox(50,3) -> 1;
+sbox(51,3) -> 15;
+sbox(52,3) -> 2;
+sbox(53,3) -> 14;
+sbox(54,3) -> 12;
+sbox(55,3) -> 3;
+sbox(56,3) -> 5;
+sbox(57,3) -> 11;
+sbox(58,3) -> 10;
+sbox(59,3) -> 5;
+sbox(60,3) -> 14;
+sbox(61,3) -> 2;
+sbox(62,3) -> 7;
+sbox(63,3) -> 12;
+sbox(0,4) -> 7;
+sbox(1,4) -> 13;
+sbox(2,4) -> 13;
+sbox(3,4) -> 8;
+sbox(4,4) -> 14;
+sbox(5,4) -> 11;
+sbox(6,4) -> 3;
+sbox(7,4) -> 5;
+sbox(8,4) -> 0;
+sbox(9,4) -> 6;
+sbox(10,4) -> 6;
+sbox(11,4) -> 15;
+sbox(12,4) -> 9;
+sbox(13,4) -> 0;
+sbox(14,4) -> 10;
+sbox(15,4) -> 3;
+sbox(16,4) -> 1;
+sbox(17,4) -> 4;
+sbox(18,4) -> 2;
+sbox(19,4) -> 7;
+sbox(20,4) -> 8;
+sbox(21,4) -> 2;
+sbox(22,4) -> 5;
+sbox(23,4) -> 12;
+sbox(24,4) -> 11;
+sbox(25,4) -> 1;
+sbox(26,4) -> 12;
+sbox(27,4) -> 10;
+sbox(28,4) -> 4;
+sbox(29,4) -> 14;
+sbox(30,4) -> 15;
+sbox(31,4) -> 9;
+sbox(32,4) -> 10;
+sbox(33,4) -> 3;
+sbox(34,4) -> 6;
+sbox(35,4) -> 15;
+sbox(36,4) -> 9;
+sbox(37,4) -> 0;
+sbox(38,4) -> 0;
+sbox(39,4) -> 6;
+sbox(40,4) -> 12;
+sbox(41,4) -> 10;
+sbox(42,4) -> 11;
+sbox(43,4) -> 1;
+sbox(44,4) -> 7;
+sbox(45,4) -> 13;
+sbox(46,4) -> 13;
+sbox(47,4) -> 8;
+sbox(48,4) -> 15;
+sbox(49,4) -> 9;
+sbox(50,4) -> 1;
+sbox(51,4) -> 4;
+sbox(52,4) -> 3;
+sbox(53,4) -> 5;
+sbox(54,4) -> 14;
+sbox(55,4) -> 11;
+sbox(56,4) -> 5;
+sbox(57,4) -> 12;
+sbox(58,4) -> 2;
+sbox(59,4) -> 7;
+sbox(60,4) -> 8;
+sbox(61,4) -> 2;
+sbox(62,4) -> 4;
+sbox(63,4) -> 14;
+sbox(0,5) -> 2;
+sbox(1,5) -> 14;
+sbox(2,5) -> 12;
+sbox(3,5) -> 11;
+sbox(4,5) -> 4;
+sbox(5,5) -> 2;
+sbox(6,5) -> 1;
+sbox(7,5) -> 12;
+sbox(8,5) -> 7;
+sbox(9,5) -> 4;
+sbox(10,5) -> 10;
+sbox(11,5) -> 7;
+sbox(12,5) -> 11;
+sbox(13,5) -> 13;
+sbox(14,5) -> 6;
+sbox(15,5) -> 1;
+sbox(16,5) -> 8;
+sbox(17,5) -> 5;
+sbox(18,5) -> 5;
+sbox(19,5) -> 0;
+sbox(20,5) -> 3;
+sbox(21,5) -> 15;
+sbox(22,5) -> 15;
+sbox(23,5) -> 10;
+sbox(24,5) -> 13;
+sbox(25,5) -> 3;
+sbox(26,5) -> 0;
+sbox(27,5) -> 9;
+sbox(28,5) -> 14;
+sbox(29,5) -> 8;
+sbox(30,5) -> 9;
+sbox(31,5) -> 6;
+sbox(32,5) -> 4;
+sbox(33,5) -> 11;
+sbox(34,5) -> 2;
+sbox(35,5) -> 8;
+sbox(36,5) -> 1;
+sbox(37,5) -> 12;
+sbox(38,5) -> 11;
+sbox(39,5) -> 7;
+sbox(40,5) -> 10;
+sbox(41,5) -> 1;
+sbox(42,5) -> 13;
+sbox(43,5) -> 14;
+sbox(44,5) -> 7;
+sbox(45,5) -> 2;
+sbox(46,5) -> 8;
+sbox(47,5) -> 13;
+sbox(48,5) -> 15;
+sbox(49,5) -> 6;
+sbox(50,5) -> 9;
+sbox(51,5) -> 15;
+sbox(52,5) -> 12;
+sbox(53,5) -> 0;
+sbox(54,5) -> 5;
+sbox(55,5) -> 9;
+sbox(56,5) -> 6;
+sbox(57,5) -> 10;
+sbox(58,5) -> 3;
+sbox(59,5) -> 4;
+sbox(60,5) -> 0;
+sbox(61,5) -> 5;
+sbox(62,5) -> 14;
+sbox(63,5) -> 3;
+sbox(0,6) -> 12;
+sbox(1,6) -> 10;
+sbox(2,6) -> 1;
+sbox(3,6) -> 15;
+sbox(4,6) -> 10;
+sbox(5,6) -> 4;
+sbox(6,6) -> 15;
+sbox(7,6) -> 2;
+sbox(8,6) -> 9;
+sbox(9,6) -> 7;
+sbox(10,6) -> 2;
+sbox(11,6) -> 12;
+sbox(12,6) -> 6;
+sbox(13,6) -> 9;
+sbox(14,6) -> 8;
+sbox(15,6) -> 5;
+sbox(16,6) -> 0;
+sbox(17,6) -> 6;
+sbox(18,6) -> 13;
+sbox(19,6) -> 1;
+sbox(20,6) -> 3;
+sbox(21,6) -> 13;
+sbox(22,6) -> 4;
+sbox(23,6) -> 14;
+sbox(24,6) -> 14;
+sbox(25,6) -> 0;
+sbox(26,6) -> 7;
+sbox(27,6) -> 11;
+sbox(28,6) -> 5;
+sbox(29,6) -> 3;
+sbox(30,6) -> 11;
+sbox(31,6) -> 8;
+sbox(32,6) -> 9;
+sbox(33,6) -> 4;
+sbox(34,6) -> 14;
+sbox(35,6) -> 3;
+sbox(36,6) -> 15;
+sbox(37,6) -> 2;
+sbox(38,6) -> 5;
+sbox(39,6) -> 12;
+sbox(40,6) -> 2;
+sbox(41,6) -> 9;
+sbox(42,6) -> 8;
+sbox(43,6) -> 5;
+sbox(44,6) -> 12;
+sbox(45,6) -> 15;
+sbox(46,6) -> 3;
+sbox(47,6) -> 10;
+sbox(48,6) -> 7;
+sbox(49,6) -> 11;
+sbox(50,6) -> 0;
+sbox(51,6) -> 14;
+sbox(52,6) -> 4;
+sbox(53,6) -> 1;
+sbox(54,6) -> 10;
+sbox(55,6) -> 7;
+sbox(56,6) -> 1;
+sbox(57,6) -> 6;
+sbox(58,6) -> 13;
+sbox(59,6) -> 0;
+sbox(60,6) -> 11;
+sbox(61,6) -> 8;
+sbox(62,6) -> 6;
+sbox(63,6) -> 13;
+sbox(0,7) -> 4;
+sbox(1,7) -> 13;
+sbox(2,7) -> 11;
+sbox(3,7) -> 0;
+sbox(4,7) -> 2;
+sbox(5,7) -> 11;
+sbox(6,7) -> 14;
+sbox(7,7) -> 7;
+sbox(8,7) -> 15;
+sbox(9,7) -> 4;
+sbox(10,7) -> 0;
+sbox(11,7) -> 9;
+sbox(12,7) -> 8;
+sbox(13,7) -> 1;
+sbox(14,7) -> 13;
+sbox(15,7) -> 10;
+sbox(16,7) -> 3;
+sbox(17,7) -> 14;
+sbox(18,7) -> 12;
+sbox(19,7) -> 3;
+sbox(20,7) -> 9;
+sbox(21,7) -> 5;
+sbox(22,7) -> 7;
+sbox(23,7) -> 12;
+sbox(24,7) -> 5;
+sbox(25,7) -> 2;
+sbox(26,7) -> 10;
+sbox(27,7) -> 15;
+sbox(28,7) -> 6;
+sbox(29,7) -> 8;
+sbox(30,7) -> 1;
+sbox(31,7) -> 6;
+sbox(32,7) -> 1;
+sbox(33,7) -> 6;
+sbox(34,7) -> 4;
+sbox(35,7) -> 11;
+sbox(36,7) -> 11;
+sbox(37,7) -> 13;
+sbox(38,7) -> 13;
+sbox(39,7) -> 8;
+sbox(40,7) -> 12;
+sbox(41,7) -> 1;
+sbox(42,7) -> 3;
+sbox(43,7) -> 4;
+sbox(44,7) -> 7;
+sbox(45,7) -> 10;
+sbox(46,7) -> 14;
+sbox(47,7) -> 7;
+sbox(48,7) -> 10;
+sbox(49,7) -> 9;
+sbox(50,7) -> 15;
+sbox(51,7) -> 5;
+sbox(52,7) -> 6;
+sbox(53,7) -> 0;
+sbox(54,7) -> 8;
+sbox(55,7) -> 15;
+sbox(56,7) -> 0;
+sbox(57,7) -> 14;
+sbox(58,7) -> 5;
+sbox(59,7) -> 2;
+sbox(60,7) -> 9;
+sbox(61,7) -> 3;
+sbox(62,7) -> 2;
+sbox(63,7) -> 12;
+sbox(0,8) -> 13;
+sbox(1,8) -> 1;
+sbox(2,8) -> 2;
+sbox(3,8) -> 15;
+sbox(4,8) -> 8;
+sbox(5,8) -> 13;
+sbox(6,8) -> 4;
+sbox(7,8) -> 8;
+sbox(8,8) -> 6;
+sbox(9,8) -> 10;
+sbox(10,8) -> 15;
+sbox(11,8) -> 3;
+sbox(12,8) -> 11;
+sbox(13,8) -> 7;
+sbox(14,8) -> 1;
+sbox(15,8) -> 4;
+sbox(16,8) -> 10;
+sbox(17,8) -> 12;
+sbox(18,8) -> 9;
+sbox(19,8) -> 5;
+sbox(20,8) -> 3;
+sbox(21,8) -> 6;
+sbox(22,8) -> 14;
+sbox(23,8) -> 11;
+sbox(24,8) -> 5;
+sbox(25,8) -> 0;
+sbox(26,8) -> 0;
+sbox(27,8) -> 14;
+sbox(28,8) -> 12;
+sbox(29,8) -> 9;
+sbox(30,8) -> 7;
+sbox(31,8) -> 2;
+sbox(32,8) -> 7;
+sbox(33,8) -> 2;
+sbox(34,8) -> 11;
+sbox(35,8) -> 1;
+sbox(36,8) -> 4;
+sbox(37,8) -> 14;
+sbox(38,8) -> 1;
+sbox(39,8) -> 7;
+sbox(40,8) -> 9;
+sbox(41,8) -> 4;
+sbox(42,8) -> 12;
+sbox(43,8) -> 10;
+sbox(44,8) -> 14;
+sbox(45,8) -> 8;
+sbox(46,8) -> 2;
+sbox(47,8) -> 13;
+sbox(48,8) -> 0;
+sbox(49,8) -> 15;
+sbox(50,8) -> 6;
+sbox(51,8) -> 12;
+sbox(52,8) -> 10;
+sbox(53,8) -> 9;
+sbox(54,8) -> 13;
+sbox(55,8) -> 0;
+sbox(56,8) -> 15;
+sbox(57,8) -> 3;
+sbox(58,8) -> 3;
+sbox(59,8) -> 5;
+sbox(60,8) -> 5;
+sbox(61,8) -> 6;
+sbox(62,8) -> 8;
+sbox(63,8) -> 11.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_extract.erl b/lib/hipe/test/bs_SUITE_data/bs_extract.erl
new file mode 100644
index 0000000000..0492689fa8
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_extract.erl
@@ -0,0 +1,94 @@
+%% -*- erlang-indent-level: 2 -*-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Among testing other things, this module shows why performing LCM on
+%% SPARC is currently problematic. SPARC does not mark untagged values
+%% as dead when they are live over function calls which in turn causes
+%% them to be traced by the garbage collector leading to crashes.
+%%
+%% A simple way to get this behaviour is to compile just the function
+%%
+%% {bsextract,tid_internal_storage,2}
+%%
+%% with the compiler option "rtl_lcm" on and without.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-module(bs_extract).
+
+-export([test/0]).
+
+-include("bs_decode_extract.hrl").
+
+-define(PDU, <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,0,0,96,
+ 6,12,146,18,14,0,15,252,16,0,0,17,0,0,128,0,2,241,33,131,
+ 0,20,7,97,112,110,48,49,51,97,8,101,114,105,99,115,115,
+ 111,110,2,115,101,132,0,20,128,192,35,16,1,5,0,16,5,117,
+ 115,101,114,53,5,112,97,115,115,53,133,0,4,172,28,12,1,
+ 133,0,4,172,28,12,3,134,0,8,145,148,113,129,0,0,0,0>>).
+
+-define(RES, {ok, {mvsgT_imsi, <<81,67,101,7,0,0,0,240>>}}).
+
+test() ->
+ ?RES = extract_v0_opt(1000, ?PDU),
+ ok.
+
+extract_v0_opt(0, Pdu) ->
+ get_external_id(Pdu);
+extract_v0_opt(N, Pdu) ->
+ {ok,_} = get_external_id(Pdu),
+ extract_v0_opt(N-1, Pdu).
+
+get_external_id(<<0:3,_:4,0:1,1:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ _TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {echo,#sesT_echoReqV0{},SequenceNumber};
+%% Create PDP Context Request
+%% GTP97, SNN=0
+%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,16:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Update PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,18:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Delete PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,20:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Error handling: GTP Message Too Short
+%%% Error handling: Unknown GTP Signalling message.
+%%% Error handling: Unexpected GTP Signalling message.
+get_external_id(_GTP_Message) ->
+ fault.
+
+%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%% extract_imsi/1
+%% Get the IMSI element from TID
+extract_imsi(TID) ->
+ {ok,#mvsgT_tid{imsi=IMSI}} = tid_internal_storage(TID,[]),
+ {ok,IMSI}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% tid_internal_storage/3
+%%% Convert TID binary to internal datatype
+tid_internal_storage(Bin,_) ->
+ Size = byte_size(Bin) - 1,
+ <<Front:Size/binary,NSAPI:4,DigitN:4>> = Bin,
+ Result =
+ case DigitN of
+ 2#1111 ->
+ #mvsgT_tid{imsi = #mvsgT_imsi{value=Front}, nsapi = NSAPI};
+ _ ->
+ Value = <<Front/binary,2#1111:4,DigitN:4>>,
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Value}, nsapi = NSAPI}
+ end,
+ {ok,Result}.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_flatb.erl b/lib/hipe/test/bs_SUITE_data/bs_flatb.erl
new file mode 100644
index 0000000000..6163917965
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_flatb.erl
@@ -0,0 +1,29 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------------
+%% Program which resulted in a badarg crash when compiled to native code.
+%% The problem was that hipe_icode_primops was stating that the primop
+%% {bs_start_match, ok_matchstate} could not fail which made the icode_type
+%% pass removing the third clause of flatb/1.
+%%
+%% (The program was working correctly with hipe option 'no_icode_type'.)
+%%
+%% Reported by Andreas Sandberg on 3/1/2011 and fixed by Kostis on 5/1/2011
+%% with the help of Per Gustafsson.
+%% --------------------------------------------------------------------------
+-module(bs_flatb).
+
+-export([hipe_options/0, test/0]).
+
+hipe_options() ->
+ [icode_type].
+
+test() ->
+ [] = flatb([<<>>], []),
+ ok.
+
+flatb(<<X:8, Rest/binary>>, Acc) ->
+ flatb(Rest, [X|Acc]);
+flatb(<<>>, Acc) ->
+ Acc;
+flatb([V], Acc) ->
+ flatb(V, Acc).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_id3.erl b/lib/hipe/test/bs_SUITE_data/bs_id3.erl
new file mode 100644
index 0000000000..a6152f05cd
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_id3.erl
@@ -0,0 +1,75 @@
+%% -*- erlang-indent-level: 2 -*-
+%%==========================================================================
+%% From: Tomas Stejskal -- 23/02/2008
+%% I've found some strange behavior regarding binary matching. The module's
+%% purpose is reading an id3 version 1 or version 1.1 tag from an mp3 bin.
+%% When I use the function read_v1_or_v11_tag on a mp3 binary containing
+%% version 1 tag, it returns an error. However, when the function
+%% read_only_v1_tag is applied on the same file, it reads the tag data
+%% correctly. The only difference between these two functions is that the
+%% former has an extra branch to read version 1.1 tag.
+%% This was a BEAM compiler bug which was fixed by a patch to beam_dead.
+%%==========================================================================
+
+-module(bs_id3).
+
+-export([test/0]).
+
+-define(BIN, <<84,65,71,68,117,154,105,232,107,121,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,68,97,110,105,101,108,32,76,97,110,
+ 100,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,101,115,116,
+ 32,79,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 50,48,48,48,50,48,48,48,32,45,32,66,101,115,116,32,79,102,
+ 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,12>>).
+
+test() ->
+ R1 = parse_only_v1_tag(?BIN),
+ R2 = parse_v1_or_v11_tag(?BIN),
+ %% io:format("~p\n~p\n", [R1, R2]),
+ R1 = R2, % crash if not equal
+ ok.
+
+parse_only_v1_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:30/binary,
+ _Genre:8>>) ->
+ {ok,
+ {"ID3v1",
+ [{title, trim(Title)},
+ {artist, trim(Artist)},
+ {album, trim(Album)}]}};
+parse_only_v1_tag(_) ->
+ error.
+
+parse_v1_or_v11_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:28/binary,
+ 0:8, Track:8, _Genre:8>>) ->
+ {ok,
+ {"ID3v1.1",
+ [{track, Track}, {title, trim(Title)},
+ {artist, trim(Artist)}, {album, trim(Album)}]}};
+parse_v1_or_v11_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:30/binary,
+ _Genre:8>>) ->
+ {ok,
+ {"ID3v1",
+ [{title, trim(Title)},
+ {artist, trim(Artist)},
+ {album, trim(Album)}]}};
+parse_v1_or_v11_tag(_) ->
+ error.
+
+trim(Bin) ->
+ list_to_binary(trim_blanks(binary_to_list(Bin))).
+
+trim_blanks(L) ->
+ lists:reverse(skip_blanks_and_zero(lists:reverse(L))).
+
+skip_blanks_and_zero([$\s|T]) ->
+ skip_blanks_and_zero(T);
+skip_blanks_and_zero([0|T]) ->
+ skip_blanks_and_zero(T);
+skip_blanks_and_zero(L) ->
+ L.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_match.erl b/lib/hipe/test/bs_SUITE_data/bs_match.erl
new file mode 100644
index 0000000000..8194d878b8
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_match.erl
@@ -0,0 +1,175 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_match.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Performs simple matching and construction of binaries
+%%% TODO : Add binary and float tests
+%%% Created : 20 Feb 2004
+%%%-------------------------------------------------------------------
+-module(bs_match).
+
+-export([test/0]).
+
+test() ->
+ Funs = [fun test_aligned/0, fun test_unaligned/0,
+ fun test_zero_tail/0, fun test_integer_matching/0],
+ lists:foreach(fun (F) -> ok = F() end, Funs).
+
+%%-------------------------------------------------------------------
+%% Test aligned accesses
+
+test_aligned() ->
+ 10 = aligned_skip_bits_all(1, <<10,11,12>>),
+ ok = aligned().
+
+aligned_skip_bits_all(N, Bin) ->
+ <<X:N/integer-unit:8, _/binary>> = Bin,
+ X.
+
+aligned() ->
+ Tail1 = mkbin([]),
+ {258, Tail1} = al_get_tail_used(mkbin([1,2])),
+ Tail2 = mkbin(lists:seq(1, 127)),
+ {35091, Tail2} = al_get_tail_used(mkbin([137,19|Tail2])),
+ 64896 = al_get_tail_unused(mkbin([253,128])),
+ 64895 = al_get_tail_unused(mkbin([253,127|lists:seq(42, 255)])),
+ Tail3 = mkbin(lists:seq(0, 19)),
+ {0, Tail1} = get_dyn_tail_used(Tail1, 0),
+ {0, Tail3} = get_dyn_tail_used(mkbin([Tail3]), 0),
+ {73, Tail3} = get_dyn_tail_used(mkbin([73|Tail3]), 8),
+ 0 = get_dyn_tail_unused(mkbin([]), 0),
+ 233 = get_dyn_tail_unused(mkbin([233]), 8),
+ 23 = get_dyn_tail_unused(mkbin([23,22,2]), 8),
+ ok.
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+al_get_tail_used(<<A:16,T/binary>>) -> {A, T}.
+
+al_get_tail_unused(<<A:16,_/binary>>) -> A.
+
+%%-------------------------------------------------------------------
+%% Test unaligned accesses
+
+test_unaligned() ->
+ 10 = unaligned_skip_bits_all(8, <<10,11,12>>),
+ ok = unaligned().
+
+unaligned_skip_bits_all(N, Bin) ->
+ <<X:N, _/binary>> = Bin,
+ X.
+
+unaligned() ->
+ {'EXIT', {function_clause,_}} = (catch get_tail_used(mkbin([42]))),
+ {'EXIT', {{badmatch,_},_}} = (catch get_dyn_tail_used(mkbin([137]), 3)),
+ {'EXIT', {function_clause,_}} = (catch get_tail_unused(mkbin([42,33]))),
+ {'EXIT', {{badmatch,_},_}} = (catch get_dyn_tail_unused(mkbin([44]), 7)),
+ ok.
+
+get_tail_used(<<A:1, T/binary>>) -> {A, T}.
+
+get_tail_unused(<<A:15, _/binary>>) -> A.
+
+get_dyn_tail_used(Bin, Sz) ->
+ <<A:Sz, T/binary>> = Bin,
+ {A,T}.
+
+get_dyn_tail_unused(Bin, Sz) ->
+ <<A:Sz, _T/binary>> = Bin,
+ A.
+
+%%-------------------------------------------------------------------
+%% Test zero tail
+
+test_zero_tail() ->
+ 42 = zt8(mkbin([42])),
+ {'EXIT', {function_clause, _}} = (catch zt8(mkbin([1,2]))),
+ {'EXIT', {function_clause, _}} = (catch zt44(mkbin([1,2]))),
+ ok.
+
+zt8(<<A:8>>) -> A.
+
+zt44(<<_:4,_:4>>) -> ok.
+
+%%-------------------------------------------------------------------
+%% Test integer matching
+
+test_integer_matching() ->
+ ok = test_static_integer_matching_1(),
+ ok = test_static_integer_matching_2(),
+ ok = test_static_integer_matching_3(),
+ ok = test_static_integer_matching_4(),
+ DynFun = fun (N) -> ok = test_dynamic_integer_matching(N) end,
+ lists:foreach(DynFun, [28, 27, 9, 17, 25, 8, 16, 24, 32]).
+
+test_static_integer_matching_1() ->
+ <<0:6, -25:28/integer-signed, 0:6>> = s11(),
+ <<0:6, -25:28/integer-little-signed, 0:6>> = s12(),
+ <<0:6, 25:28/integer-little, 0:6>> = s13(),
+ <<0:6, 25:28, 0:6>> = s14(),
+ ok.
+
+s11() ->
+ <<0:6, -25:28/integer-signed, 0:6>>.
+s12() ->
+ <<0:6, -25:28/integer-little-signed, 0:6>>.
+s13() ->
+ <<0:6, 25:28/integer-little, 0:6>>.
+s14() ->
+ <<0:6, 25:28, 0:6>>.
+
+test_static_integer_matching_2() ->
+ <<0:6, -25:20/integer-signed, 0:6>> = s21(),
+ <<0:6, -25:20/integer-little-signed, 0:6>> = s22(),
+ <<0:6, 25:20/integer-little, 0:6>> = s23(),
+ <<0:6, 25:20, 0:6>> = s24(),
+ ok.
+
+s21() ->
+ <<0:6, -25:20/integer-signed, 0:6>>.
+s22() ->
+ <<0:6, -25:20/integer-little-signed, 0:6>>.
+s23() ->
+ <<0:6, 25:20/integer-little, 0:6>>.
+s24() ->
+ <<0:6, 25:20, 0:6>>.
+
+test_static_integer_matching_3() ->
+ <<0:6, -25:12/integer-signed, 0:6>> = s31(),
+ <<0:6, -25:12/integer-little-signed, 0:6>> = s32(),
+ <<0:6, 25:12/integer-little, 0:6>> = s33(),
+ <<0:6, 25:12, 0:6>> = s34(),
+ ok.
+
+s31() ->
+ <<0:6, -25:12/integer-signed, 0:6>>.
+s32() ->
+ <<0:6, -25:12/integer-little-signed, 0:6>>.
+s33() ->
+ <<0:6, 25:12/integer-little, 0:6>>.
+s34() ->
+ <<0:6, 25:12, 0:6>>.
+
+test_static_integer_matching_4() ->
+ <<0:6, -3:4/integer-signed, 0:6>> = s41(),
+ <<0:6, -3:4/integer-little-signed, 0:6>> = s42(),
+ <<0:6, 7:4/integer-little, 0:6>> = s43(),
+ <<0:6, 7:4, 0:6>> = s44(),
+ ok.
+
+s41() ->
+ <<0:6, -3:4/integer-signed, 0:6>>.
+s42() ->
+ <<0:6, -3:4/integer-little-signed, 0:6>>.
+s43() ->
+ <<0:6, 7:4/integer-little, 0:6>>.
+s44() ->
+ <<0:6, 7:4, 0:6>>.
+
+test_dynamic_integer_matching(N) ->
+ S = 32 - N,
+ <<-12:N/integer-signed, 0:S>> = <<-12:N/integer-signed, 0:S>>,
+ <<-12:N/integer-little-signed, 0:S>> = <<-12:N/integer-little-signed, 0:S>>,
+ <<12:N/integer, 0:S>> = <<12:N/integer, 0:S>>,
+ <<12:N/integer-little, 0:S>> = <<12:N/integer-little, 0:S>>,
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_native_float.erl b/lib/hipe/test/bs_SUITE_data/bs_native_float.erl
new file mode 100644
index 0000000000..15fe0bf0c6
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_native_float.erl
@@ -0,0 +1,22 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% File : bs_native_float.erl
+%% Author : Kostis Sagonas
+%% Description : Test sent by Bjorn Gustavsson to report a bug in the
+%% handling of the 'native' endian specifier.
+%% Created : 28 Nov 2004
+%%-------------------------------------------------------------------
+-module(bs_native_float).
+
+-export([test/0]).
+
+test() ->
+ BeamRes = mk_bin(1.0, 2.0, 3.0),
+ hipe:c(?MODULE), %% Original was: hipe:c({?MODULE,vs_to_bin,1}, [o2]),
+ HipeRes = mk_bin(1.0, 2.0, 3.0),
+ %% io:format("Beam result = ~w\nHiPE result = ~w\n", [BeamRes,HipeRes]),
+ BeamRes = HipeRes,
+ ok.
+
+mk_bin(X, Y, Z) ->
+ <<X:64/native-float, Y:64/native-float, Z:64/native-float>>.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_orber.erl b/lib/hipe/test/bs_SUITE_data/bs_orber.erl
new file mode 100644
index 0000000000..c80ab8928d
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_orber.erl
@@ -0,0 +1,26 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Checks that labels are handled properly from Core
+%%% Created : 2 Nov 2004
+%%%-------------------------------------------------------------------
+-module(bs_orber).
+
+-export([test/0]).
+
+test() ->
+ 1 = dec_giop_message_header(<<1,1:32/little-integer>>),
+ 1 = dec_giop_message_header(<<0,1:32/big-integer>>),
+ {2, 1} = dec_giop_message_header(<<2,1:32/little-integer>>),
+ {3, 1} = dec_giop_message_header(<<3,1:32/big-integer>>),
+ ok.
+
+dec_giop_message_header(<<1:8, MessSize:32/little-integer>>) ->
+ MessSize;
+dec_giop_message_header(<<0:8, MessSize:32/big-integer>>) ->
+ MessSize;
+dec_giop_message_header(<<Flags:8, MessSize:32/little-integer>>) when
+ ((Flags band 16#03) =:= 16#02) ->
+ {Flags, MessSize};
+dec_giop_message_header(<<Flags:8, MessSize:32/big-integer>>) ->
+ {Flags, MessSize}.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl
new file mode 100644
index 0000000000..9474ffea4a
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl
@@ -0,0 +1,269 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary pattern matching work
+%%--------------------------------------------------------------------
+-module(bs_pmatch).
+
+-export([test/0]).
+
+test() ->
+ %% construct some binaries
+ Bin42 = <<42>>,
+ Bin = <<12,17,42,0,0,0>>,
+ BinSS = <<0,1,0,0,0>>,
+ %% do some pattern matching
+ ok = pm_const(Bin42),
+ <<17,42,0,0,0>> = pm_tail(Bin),
+ 42 = pm_little(<<0:1,42:7>>),
+ 42 = pm_rec(Bin),
+ 30 = pm_rec_acc(<<1,2,3,4,5,6,7,8,9,10>>, 0),
+ 42 = pm_binary_tuple(Bin42),
+ -1 = pm_with_illegal_float(),
+ %% do some pattern matching with bound segments
+ ok = pm_bound_var(),
+ ok = pm_bound_tail(),
+ %% do some tests with floating point numbers
+ ok = pm_float(),
+ ok = pm_float_little(),
+ %% do some pattern matching with segments of unknown sizes
+ {<<17>>, <<42,0,0,0>>} = pm_body_s(Bin, 1),
+ {<<17>>, <<42,0,0,0>>} = pm_body_ss(Bin, 1, 4),
+ {<<45>>, <<>>} = pm_size_split(<<1:16,45>>),
+ {<<45>>, <<46,47>>} = pm_size_split(<<1:16,45,46,47>>),
+ {<<45,46>>, <<47>>} = pm_size_split(<<2:16,45,46,47>>),
+ {<<45,46>>, <<47>>} = pm_size_split_2(2, <<2:16,45,46,47>>),
+ {'EXIT',{function_clause,_}} = (catch pm_size_split_2(42, <<2:16,45,46,47>>)),
+ {<<45,46,47>>, <<48>>} = pm_sizes_split(<<16:8,3:16,45,46,47,48>>),
+ <<"cdef">> = pm_skip_segment(<<2:8, "abcdef">>),
+ -1 = pm_double_size_in_head(BinSS),
+ -1 = pm_double_size_in_body(BinSS),
+ %% and finally some cases which were problematic for various reasons
+ ok = pm_bigs(),
+ ok = pm_sean(),
+ ok = pm_bin8(<<1,2,3,4,5,6,7,8>>),
+ ok = pm_bs_match_string(),
+ ok = pm_till_gc(),
+ ok.
+
+%%--------------------
+%% Test cases below
+%%--------------------
+
+pm_const(<<42>>) ->
+ ok.
+
+pm_tail(<<12, Bin/binary>>) ->
+ Bin.
+
+pm_little(<<_:1, X:15/little>>) ->
+ {wrong, X};
+pm_little(<<_:1, X:7/little>>) ->
+ X.
+
+pm_rec(<<12, Bin/binary>>) ->
+ pm_rec(Bin);
+pm_rec(<<17, Word:4/little-signed-integer-unit:8>>) ->
+ Word.
+
+pm_rec_acc(<<_:4, A:4, Rest/binary>>, Acc) ->
+ case Rest of
+ <<X, Y, 9, NewRest/binary>> ->
+ pm_rec_acc(NewRest, X+Y+Acc);
+ <<X, 5, NewRest/binary>> ->
+ pm_rec_acc(NewRest, X+Acc);
+ <<2, NewRest/binary>> ->
+ pm_rec_acc(NewRest, 1+Acc);
+ <<NewRest/binary>> ->
+ pm_rec_acc(NewRest, A+Acc)
+ end;
+pm_rec_acc(<<>>, Acc) ->
+ Acc.
+
+pm_binary_tuple(<<X>>) ->
+ X;
+pm_binary_tuple({Y, Z}) ->
+ Y + Z.
+
+pm_with_illegal_float() ->
+ Bin = <<-1:64>>, % create a binary which is illegal as float
+ pm_float_integer(Bin). % try to match it out as a float
+
+pm_float_integer(<<F:64/float>>) -> F;
+pm_float_integer(<<I:64/integer-signed>>) -> I.
+
+%%--------------------------------------------------------------------
+%% Some tests with bound variables in segments
+
+pm_bound_var() ->
+ ok = pm_bound_var(42, 13, <<42,13>>),
+ no = pm_bound_var(42, 13, <<42,255>>),
+ no = pm_bound_var(42, 13, <<154,255>>),
+ ok.
+
+pm_bound_var(A, B, <<A:8, B:8>>) -> ok;
+pm_bound_var(_, _, _) -> no.
+
+pm_bound_tail() ->
+ ok = pm_bound_tail(<<>>, <<13,14>>),
+ ok = pm_bound_tail(<<2,3>>, <<1,1,2,3>>),
+ no = pm_bound_tail(<<2,3>>, <<1,1,2,7>>),
+ no = pm_bound_tail(<<2,3>>, <<1,1,2,3,4>>),
+ no = pm_bound_tail(<<2,3>>, <<>>),
+ ok.
+
+pm_bound_tail(T, <<_:16, T/binary>>) -> ok;
+pm_bound_tail(_, _) -> no.
+
+%%--------------------------------------------------------------------
+%% Floating point tests
+
+pm_float() ->
+ F = f1(),
+ G = f_one(),
+ G = match_float(<<63,128,0,0>>, 32, 0),
+ G = match_float(<<63,240,0,0,0,0,0,0>>, 64, 0),
+ fcmp(F, match_float(<<F:32/float>>, 32, 0)),
+ fcmp(F, match_float(<<F:64/float>>, 64, 0)),
+ fcmp(F, match_float(<<1:1,F:32/float,127:7>>, 32, 1)),
+ fcmp(F, match_float(<<1:1,F:64/float,127:7>>, 64, 1)),
+ fcmp(F, match_float(<<1:13,F:32/float,127:3>>, 32, 13)),
+ fcmp(F, match_float(<<1:13,F:64/float,127:3>>, 64, 13)),
+ ok.
+
+fcmp(F1, F2) when (F1 - F2) / F2 < 0.0000001 -> ok.
+
+match_float(Bin0, Fsz, I) ->
+ Bin = make_sub_bin(Bin0),
+ Bsz = bit_size(Bin),
+ Tsz = Bsz - Fsz - I,
+ <<_:I,F:Fsz/float,_:Tsz>> = Bin,
+ F.
+
+pm_float_little() ->
+ F = f2(),
+ G = f_one(),
+ G = match_float_little(<<0,0,0,0,0,0,240,63>>, 64, 0),
+ G = match_float_little(<<0,0,128,63>>, 32, 0),
+ fcmp(F, match_float_little(<<F:32/float-little>>, 32, 0)),
+ fcmp(F, match_float_little(<<F:64/float-little>>, 64, 0)),
+ fcmp(F, match_float_little(<<1:1,F:32/float-little,127:7>>, 32, 1)),
+ fcmp(F, match_float_little(<<1:1,F:64/float-little,127:7>>, 64, 1)),
+ fcmp(F, match_float_little(<<1:13,F:32/float-little,127:3>>, 32, 13)),
+ fcmp(F, match_float_little(<<1:13,F:64/float-little,127:3>>, 64, 13)),
+ ok.
+
+match_float_little(Bin0, Fsz, I) ->
+ Bin = make_sub_bin(Bin0),
+ Bsz = bit_size(Bin),
+ Tsz = Bsz - Fsz - I,
+ <<_:I, F:Fsz/float-little, _:Tsz>> = Bin,
+ F.
+
+make_sub_bin(Bin0) ->
+ Sz = byte_size(Bin0),
+ Bin1 = <<37,Bin0/binary,38,39>>,
+ <<_:8,Bin:Sz/binary,_:8,_:8>> = Bin1,
+ Bin.
+
+f1() -> 3.1415.
+
+f2() -> 2.7133.
+
+f_one() -> 1.0.
+
+%%--------------------------------------------------------------------
+%% Some tests using size fields specified within the binary
+pm_body_s(Bin, S1) ->
+ <<12, B1:S1/binary, B2:4/binary>> = Bin, %% 4 is hard-coded
+ {B1, B2}.
+
+pm_body_ss(Bin, S1, S2) ->
+ <<12, B1:S1/binary, B2:S2/binary>> = Bin,
+ {B1, B2}.
+
+pm_size_split(<<N:16, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_size_split_2(N, <<N:16, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_sizes_split(<<N0:8, N:N0, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_skip_segment(<<N:8, _:N/binary, T/binary>>) -> T.
+
+%%--------------------------------------------------------------------
+%% Some tests using multiple occurrences of size fields
+pm_double_size_in_head(<<S:16, _:S/binary, _:S/binary, _/binary>>) ->
+ -S.
+
+pm_double_size_in_body(Bin) ->
+ <<S:16, _:S/binary, _:S/binary, _/binary>> = Bin,
+ -S.
+
+%%--------------------------------------------------------------------
+%% matching with 64-bit integers which become big nums
+-define(BIG, 16#7fffffff7fffffff).
+
+pm_bigs() ->
+ <<X:64/little>> = <<?BIG:64/little>>,
+ true = (X =:= big()),
+ <<Y:64>> = <<?BIG:64>>,
+ true = (Y =:= big()),
+ ok.
+
+big() -> ?BIG.
+
+%%--------------------------------------------------------------------
+
+pm_sean() ->
+ small = sean1(<<>>),
+ small = sean1(<<1>>),
+ small = sean1(<<1,2>>),
+ small = sean1(<<1,2,3>>),
+ large = sean1(<<1,2,3,4>>),
+ small = sean1(<<4>>),
+ small = sean1(<<4,5>>),
+ small = sean1(<<4,5,6>>),
+ {'EXIT', {function_clause, _}} = (catch sean1(<<4,5,6,7>>)),
+ ok.
+
+sean1(<<B/binary>>) when byte_size(B) < 4 -> small;
+sean1(<<1, _/binary>>) -> large.
+
+%%--------------------------------------------------------------------
+%% Crashed on SPARC due to a bug in linear scan register allocator
+pm_bin8(<<A, B, C, D, E, F, G, H>>) ->
+ 10 = add4(A, B, C, D),
+ 26 = add4(E, F, G, H),
+ ok.
+
+add4(X, Y, Z, W) ->
+ X + Y + Z + W.
+
+%%--------------------------------------------------------------------
+%% Cases that exposed bugs in the handling of bs_match_string with an
+%% empty destination list. Reported on 2013/2/12 and fixed 2013/3/10.
+
+pm_bs_match_string() ->
+ Bin = <<42,42>>,
+ Bin = pm_match_string_head(Bin),
+ ok = (pm_match_string_fun())(Bin).
+
+pm_match_string_head(<<42, _/bits>> = B) -> B.
+
+pm_match_string_fun() ->
+ fun (<<X, _/bits>>) when X =:= 42 -> ok end.
+
+%%--------------------------------------------------------------------
+%% Match a lot to force a garbage collection which exposed a bug
+
+pm_till_gc() ->
+ Bin = <<16#76543210:32>>,
+ 16#76543210 = pm_a_lot(Bin, 1000000),
+ ok.
+
+pm_a_lot(<<X:32>>, 0) ->
+ X;
+pm_a_lot(<<X:32>>, N) ->
+ pm_a_lot(<<X:32>>, N-1).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl
new file mode 100644
index 0000000000..b280705a47
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl
@@ -0,0 +1,67 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+-module(bs_pmatch_bugs).
+
+-export([test/0]).
+
+test() ->
+ Bin = <<"123.123">>,
+ <<49,50,51>> = lex_digits1(Bin, 1, []),
+ <<49,50,51>> = lex_digits2(Bin, 1, []),
+ ok = var_bind_bug(<<1, 2, 3, 4, 5, 6, 7, 8>>),
+ ok.
+
+%%--------------------------------------------------------------------
+%% One of the lex_digits functions below gave incorrect results due to
+%% incorrect pattern matching compilation of binaries by the byte code
+%% compiler. Fixed by Bjorn Gustavsson on 5/3/2003.
+%% --------------------------------------------------------------------
+lex_digits1(<<$., Rest/binary>>, _Val, _Acc) ->
+ Rest;
+lex_digits1(<<N, Rest/binary>>, Val, Acc) when N >= $0, N =< $9 ->
+ lex_digits1(Rest, Val * 10 + dec(N), Acc);
+lex_digits1(_Other, _Val, _Acc) ->
+ not_ok.
+
+lex_digits2(<<N, Rest/binary>>,Val, Acc) when N >= $0, N =< $9 ->
+ lex_digits2(Rest, Val * 10 + dec(N), Acc);
+lex_digits2(<<$., Rest/binary>>, _Val, _Acc) ->
+ Rest;
+lex_digits2(_Other, _Val, _Acc) ->
+ not_ok.
+
+dec(A) ->
+ A - $0.
+
+%%--------------------------------------------------------------------
+%% From: Bernard Duggan
+%% Date: 11/3/2011
+%%
+%% I've just run into an interesting little bit of behaviour that
+%% doesn't seem quite right. erlc gives me the warning
+%%
+%% 43: Warning: this clause cannot match because a previous
+%% clause at line 42 always matches
+%% (line 42 is the "B -> wrong;" line).
+%%
+%% And sure enough, if you run test/0 you get 'wrong' back.
+%%
+%% That, in itself, is curious to me since by my understanding B should
+%% be bound by the function header, and have no guarantee of being the
+%% same as A. I can't see how it could be unbound.
+%%
+%% Doubly curious, is that if I stop using B as the size specifier of C,
+%% like this:
+%%
+%% match(<<A:1/binary, B:8/integer, _C:1/binary, _Rest/binary>>) ->
+%%
+%% the warning goes away. And the result becomes 'ok' (in spite of
+%% nothing in the body having changed, and the only thing changing in
+%% the header being the size of an unused variable at the tail of the
+%% binary).
+%%--------------------------------------------------------------------
+var_bind_bug(<<A:1/binary, B:8/integer, _C:B/binary, _Rest/binary>>) ->
+ case A of
+ B -> wrong;
+ _ -> ok
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl
new file mode 100644
index 0000000000..159227bb92
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary pattern matching in guards work
+%%--------------------------------------------------------------------
+-module(bs_pmatch_in_guards).
+
+-export([test/0]).
+
+test() ->
+ 1 = in_guard(<<16#74ad:16>>, 16#e95, 5),
+ 2 = in_guard(<<16#3A,16#F7,"hello">>, 16#3AF7, <<"hello">>),
+ 3 = in_guard(<<16#FBCD:14,3.1415/float,3:2>>, 16#FBCD, 3.1415),
+ nope = in_guard(<<1>>, 42, b),
+ nope = in_guard(<<1>>, a, b),
+ nope = in_guard(<<1,2>>, 1, 1),
+ nope = in_guard(<<4,5>>, 1, 2.71),
+ nope = in_guard(<<4,5>>, 1, <<12,13>>),
+ ok.
+
+in_guard(Bin, A, B) when <<A:13,B:3>> == Bin -> 1;
+in_guard(Bin, A, B) when <<A:16,B/binary>> == Bin -> 2;
+in_guard(Bin, A, B) when <<A:14,B/float,3:2>> == Bin -> 3;
+in_guard(_, _, _) -> nope.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl b/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl
new file mode 100644
index 0000000000..8bc4fe5c88
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl
@@ -0,0 +1,200 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+-module(bs_potpurri).
+
+-export([test/0]).
+
+test() ->
+ ok = integer(),
+ ok = signed_integer(),
+ ok = dynamic(),
+ ok = more_dynamic(),
+ ok = mml(),
+ ok.
+
+%% compile(Opts0) ->
+%% case proplists:get_bool(core, Opts0) of
+%% true ->
+%% test:note(?MODULE, "disabling compilation from core - BUG"),
+%% Opts = [{core,false}|Opts0];
+%% false ->
+%% Opts = Opts0
+%% end,
+%% hipe:c(?MODULE, Opts).
+
+integer() ->
+ 0 = get_int(mkbin([])),
+ 0 = get_int(mkbin([0])),
+ 42 = get_int(mkbin([42])),
+ 255 = get_int(mkbin([255])),
+ 256 = get_int(mkbin([1,0])),
+ 257 = get_int(mkbin([1,1])),
+ 258 = get_int(mkbin([1,2])),
+ 258 = get_int(mkbin([1,2])),
+ 65534 = get_int(mkbin([255,254])),
+ 16776455 = get_int(mkbin([255,253,7])),
+ 4245492555 = get_int(mkbin([253,13,19,75])),
+ L = [200,1,19,128,222,42,97,111,200,1,19,128,222,42,97,111],
+ ok = cmp128(mkbin(L), uint(L)),
+ ok = fun_clause(catch get_int(mkbin(lists:seq(1,5)))),
+ ok.
+
+get_int(<<I:0>>) -> I;
+get_int(<<I:8>>) -> I;
+get_int(<<I:16>>) -> I;
+get_int(<<I:24>>) -> I;
+get_int(<<I:32>>) -> I.
+
+cmp128(<<I:128>>, I) -> ok;
+cmp128(_Bin, _I) -> not_ok.
+
+signed_integer() ->
+ {no_match,_} = sint(mkbin([])),
+ {no_match,_} = sint(mkbin([1,2,3])),
+ 127 = sint(mkbin([127])),
+ -1 = sint(mkbin([255])),
+ -128 = sint(mkbin([128])),
+ 42 = sint(mkbin([42,255])),
+ 127 = sint(mkbin([127,255])),
+ ok.
+
+sint(Bin) ->
+ case Bin of
+ <<I:8/signed>> -> I;
+ <<I:8/signed,_:3,_:5>> -> I;
+ Other -> {no_match,Other}
+ end.
+
+uint(L) -> uint(L, 0).
+
+uint([H|T], Acc) -> uint(T, Acc bsl 8 bor H);
+uint([], Acc) -> Acc.
+
+dynamic() ->
+ ok = dynamic(mkbin([255]), 8),
+ ok = dynamic(mkbin([255,255]), 16),
+ ok = dynamic(mkbin([255,255,255]), 24),
+ ok = dynamic(mkbin([255,255,255,255]), 32),
+ ok.
+
+dynamic(Bin, S1) when S1 >= 0 ->
+ S2 = bit_size(Bin) - S1,
+ dynamic(Bin, S1, S2, (1 bsl S1) - 1, (1 bsl S2) - 1),
+ dynamic(Bin, S1-1);
+dynamic(_Bin, _) -> ok.
+
+dynamic(Bin, S1, S2, A, B) ->
+ %% io:format("~p ~p ~p ~p\n", [S1,S2,A,B]),
+ case Bin of
+ <<A:S1,B:S2>> ->
+ %% io:format("~p ~p ~p ~p\n", [S1,S2,A,B]),
+ ok;
+ <<A1:S1,B2:S2>> -> erlang:error(badmatch, [Bin,S1,S2,A,B,A1,B2])
+ end.
+
+more_dynamic() ->
+ %% Unsigned big-endian numbers.
+ Unsigned = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N,_I2:SkipAft>> = Bin,
+ Int = make_int(List, N, 0)
+ end,
+ ok = more_dynamic1(Unsigned, funny_binary(42)),
+
+ %% Signed big-endian numbers.
+ Signed = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/signed,_I2:SkipAft>> = Bin,
+ case make_signed_int(List, N) of
+ Int -> ok;
+ Other ->
+ io:format("Bin = ~p,", [Bin]),
+ io:format("SkipBef = ~p, N = ~p", [SkipBef,N]),
+ io:format("Expected ~p, got ~p", [Int,Other]),
+ exit(Other)
+ end
+ end,
+ ok = more_dynamic1(Signed, funny_binary(43)),
+
+ %% Unsigned little-endian numbers.
+ UnsLittle = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/little,_I2:SkipAft>> = Bin,
+ Int = make_int(big_to_little(List, N), N, 0)
+ end,
+ more_dynamic1(UnsLittle, funny_binary(44)),
+
+ %% Signed little-endian numbers.
+ SignLittle = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/signed-little,_I2:SkipAft>> = Bin,
+ Little = big_to_little(List, N),
+ Int = make_signed_int(Little, N)
+ end,
+ ok = more_dynamic1(SignLittle, funny_binary(45)),
+
+ ok.
+
+funny_binary(N) ->
+ B0 = erlang:md5([N]),
+ {B1,_B2} = split_binary(B0, byte_size(B0) div 2),
+ B1.
+
+more_dynamic1(Action, Bin) ->
+ BitList = bits_to_list(binary_to_list(Bin), 16#80),
+ more_dynamic2(Action, Bin, BitList, 0).
+
+more_dynamic2(Action, Bin, [_|T]=List, Bef) ->
+ more_dynamic3(Action, Bin, List, Bef, bit_size(Bin)),
+ more_dynamic2(Action, Bin, T, Bef+1);
+more_dynamic2(_Action, _Bin, [], _Bef) -> ok.
+
+more_dynamic3(Action, Bin, List, Bef, Aft) when Bef =< Aft ->
+ %% io:format("~p, ~p", [Bef,Aft-Bef]),
+ Action(Bin, List, Bef, Aft-Bef),
+ more_dynamic3(Action, Bin, List, Bef, Aft-1);
+more_dynamic3(_, _, _, _, _) -> ok.
+
+big_to_little(List, N) -> big_to_little(List, N, []).
+
+big_to_little([B0,B1,B2,B3,B4,B5,B6,B7|T], N, Acc) when N >= 8 ->
+ big_to_little(T, N-8, [B0,B1,B2,B3,B4,B5,B6,B7|Acc]);
+big_to_little(List, N, Acc) -> lists:sublist(List, 1, N) ++ Acc.
+
+make_signed_int(_List, 0) -> 0;
+make_signed_int([0|_]=List, N) -> make_int(List, N, 0);
+make_signed_int([1|_]=List0, N) ->
+ List1 = reversed_sublist(List0, N, []),
+ List2 = two_complement_and_reverse(List1, 1, []),
+ -make_int(List2, length(List2), 0).
+
+reversed_sublist(_List, 0, Acc) -> Acc;
+reversed_sublist([H|T], N, Acc) -> reversed_sublist(T, N-1, [H|Acc]).
+
+two_complement_and_reverse([H|T], Carry, Acc) ->
+ Sum = 1 - H + Carry,
+ two_complement_and_reverse(T, Sum div 2, [Sum rem 2|Acc]);
+two_complement_and_reverse([], Carry, Acc) -> [Carry|Acc].
+
+make_int(_List, 0, Acc) -> Acc;
+make_int([H|T], N, Acc) -> make_int(T, N-1, Acc bsl 1 bor H).
+
+bits_to_list([_|T], 0) -> bits_to_list(T, 16#80);
+bits_to_list([H|_]=List, Mask) ->
+ [case H band Mask of
+ 0 -> 0;
+ _ -> 1
+ end|bits_to_list(List, Mask bsr 1)];
+bits_to_list([], _) -> [].
+
+fun_clause({'EXIT',{function_clause,_}}) -> ok.
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+mml() ->
+ single_byte_binary = mml_choose(<<42>>),
+ multi_byte_binary = mml_choose(<<42,43>>),
+ ok.
+
+mml_choose(<<_:8>>) -> single_byte_binary;
+mml_choose(<<_:8, _T/binary>>) -> multi_byte_binary.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_remove3.erl b/lib/hipe/test/bs_SUITE_data/bs_remove3.erl
new file mode 100644
index 0000000000..a98b0b5b28
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_remove3.erl
@@ -0,0 +1,104 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_remove3.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose :
+%%%
+%%% Created : 13 Apr 2004 by Per Gustafsson
+%%%-------------------------------------------------------------------
+-module(bs_remove3).
+
+-export([test/0]).
+
+-define(A, <<56,0,120,0,0,31,255,255,102,42,12,0,3,3,16,5,24,3,240,0,0,32,0,196,
+ 2,128,4,0,255,255,254,33,68,96,0,8,8,213,40,192,31,196,0,4,0,0>>).
+-define(B, <<28,32,0,96,0,8,0,7,255,255,212,33,98,12,0,0,1,0,48,72,66,3,0,7,240,
+ 64,0,0,8,0,0,224,0,10,128,0,64,0,63,255,254,133,10,80,96,0,0,8,1,6,
+ 18,4,24,0,63,128,0,0,4,64,0,0>>).
+
+test() ->
+ Bin1 = <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,
+ 0,0,96,6,12,146,18,14,0,15,252,16,0,0,17,0,0>>,
+ Bin = <<Bin1/binary, Bin1/binary>>,
+ ?A = loop(Bin, 10, fun run_list/1),
+ ?A = loop(Bin, 10, fun run_bin/1),
+ ?B = loop(Bin, 10, fun r31/1),
+ ok.
+
+loop(Arg, 0, F) ->
+ F(Arg);
+loop(Arg, N, F) ->
+ F(Arg),
+ loop(Arg, N-1, F).
+
+run_list(Bin) ->
+ List = run1(Bin),
+ list_to_binary(List).
+
+run1(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,
+ A5:2,_:1,A6:2,_:1,A7:2,_:1,A8:2,_:1,Rest/binary>>) ->
+ [<<A1:2,A2:2,A3:2,A4:2,A5:2,A6:2,A7:2,A8:2>>, run2(Rest)];
+run1(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,A5:2,_:1,A6:1>>) ->
+ [<<A1:2,A2:2,A3:2,A4:2,A5:2,A6:1,0:5>>];
+run1(<<A1:2,_:1,A2:2,_:1,A3:2>>) ->
+ [<<A1:2,A2:2,A3:2,0:2>>];
+run1(<<>>) ->
+ [].
+
+run_bin(Bin) ->
+ run2(Bin).
+
+run2(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,
+ A5:2,_:1,A6:2,_:1,A7:2,_:1,A8:2,_:1,Rest/binary>>) ->
+ Bin = run2(Rest),
+ <<A1:2,A2:2,A3:2,A4:2,A5:2,A6:2,A7:2,A8:2,Bin/binary>>;
+run2(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,A5:2,_:1,A6:1>>) ->
+ <<A1:2,A2:2,A3:2,A4:2,A5:2,A6:1,0:5>>;
+run2(<<A1:2,_:1,A2:2,_:1,A3:2>>) ->
+ <<A1:2,A2:2,A3:2,0:2>>;
+run2(<<>>) ->
+ <<>>.
+
+r31(Bin) ->
+ List = remove3rd1(0, 0, Bin, [-1]),
+ build(List, Bin, 0, <<>>).
+
+build([N1, N2|Rest], Bin, N, Present) ->
+ X = N1+1, Y = N2-X,
+ S = rest(N2),
+ <<_:X,A:Y,_:S,_/binary>> = Bin,
+ S1 = rest(N+Y),
+ NewPresent = <<Present:N/binary-unit:1, A:Y, 0:S1>>,
+ build([N2|Rest], Bin, N+Y, NewPresent);
+
+build([_], _Bin, _N, Present) ->
+ Present.
+
+rest(X) ->
+ case 8 - (X rem 8) of
+ 8 -> 0;
+ H -> H
+ end.
+
+remove3rd1(N, 2, Bin, List) ->
+ S = rest(N+1),
+ case Bin of
+ <<_:N, 1:1, _:S,_/binary>> ->
+ remove3rd1(N+1, 0, Bin, [N|List]);
+ <<_:N, 0:1, _:S,_/binary>> ->
+ remove3rd1(N+1, 2, Bin, List);
+ _ ->
+ Size = byte_size(Bin) * 8,
+ lists:reverse([Size|List])
+ end;
+remove3rd1(N, I, Bin, List) ->
+ S = rest(N+1),
+ case Bin of
+ <<_:N, 1:1, _:S,_/binary>> ->
+ remove3rd1(N+1, I+1, Bin, List);
+ <<_:N, 0:1, _:S,_/binary>> ->
+ remove3rd1(N+1, I, Bin, List);
+ _ ->
+ Size = byte_size(Bin) * 8,
+ lists:reverse([Size|List])
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_save.erl b/lib/hipe/test/bs_SUITE_data/bs_save.erl
new file mode 100644
index 0000000000..fe2b1105f2
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_save.erl
@@ -0,0 +1,21 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_save.erl
+%%% Author : Per Gustafsson
+%%% Purpose : Tests that compilation works for bs_save
+%%% Created : 1 Nov 2007
+%%%-------------------------------------------------------------------
+-module(bs_save).
+
+-export([test/0]).
+
+test() ->
+ {[16257, 1], <<0>>} = inc_on_ones(<<255,1,128,1,128,0>>, 0, [], 5),
+ ok.
+
+inc_on_ones(Buffer, _Av, Al, 0) ->
+ {lists:reverse(Al), Buffer};
+inc_on_ones(<<1:1, H:7, T/binary>>, Av, Al, Len) ->
+ inc_on_ones(T, (Av bsl 7) bor H, Al, Len-1);
+inc_on_ones(<<H, T/binary>>, Av, Al, Len) ->
+ inc_on_ones(T, 0, [((Av bsl 7) bor H)|Al], Len-1).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl b/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl
new file mode 100644
index 0000000000..b438f8d9ef
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl
@@ -0,0 +1,275 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_shell_native.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests that the Erlang shell works well when in native
+%%% Created : 6 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_shell_native).
+
+-export([prepare_for_test/0, test/0]).
+%% These need to be exported so that we emulate calling them from the shell
+-export([parse_and_eval/1, receiver/1, receiver_alot/1, send_alot/3]).
+
+%% This makes sure the shell runs native code
+prepare_for_test() ->
+ lists:foreach(fun (M) -> {ok, M} = hipe:c(M) end, [erl_bits, erl_eval]).
+
+test() ->
+ ok = eval_bits_in_shell(),
+ ok = eval_bin_comp_in_shell(),
+ ok.
+
+%%--------------------------------------------------------------------
+%% Tests for bit stream operations including matching, construction
+%% and binary_to_list, list_to_binary in the shell
+eval_bits_in_shell() ->
+ <<1:100>> = parse_and_eval("<<1:100>> = <<1:100>>."),
+ ok = match(7),
+ ok = match(9),
+ ok = match1(15),
+ ok = match1(31),
+ ok = horrid_match(),
+ ok = test_bitstr(),
+ ok = test_bitsize(),
+ ok = asymmetric_tests(),
+ ok = big_asymmetric_tests(),
+ ok = binary_to_and_from_list(),
+ ok = big_binary_to_and_from_list(),
+ ok = send_and_receive(),
+ ok = send_and_receive_alot(),
+ ok.
+
+parse_and_eval(String) ->
+ {ok, Toks, _} = erl_scan:string(String),
+ {ok, Exprs} = erl_parse:parse_exprs(Toks),
+ Bnds = erl_eval:new_bindings(),
+ case erl_eval:exprs(Exprs, Bnds) of
+ {value, V, _} ->
+ V;
+ V ->
+ V
+ end.
+
+match(N) ->
+ Str = "N =" ++ integer_to_list(N) ++ ", <<0:N>> = <<0:N>>.",
+ <<0:N>> = parse_and_eval(Str),
+ ok.
+
+match1(N) ->
+ Str = "N =" ++ integer_to_list(N) ++ ", <<42:N/little>> = <<42:N/little>>.",
+ <<42:N/little>> = parse_and_eval(Str),
+ ok.
+
+test_bitsize() ->
+ 101 = parse_and_eval("101 = erlang:bit_size(<<1:101>>)."),
+ 1001 = parse_and_eval("1001 = erlang:bit_size(<<1:1001>>)."),
+ 80 = parse_and_eval("80 = erlang:bit_size(<<1:80>>)."),
+ 800 = parse_and_eval("800 = erlang:bit_size(<<1:800>>)."),
+ S =
+ "Bin = <<0:16#1000000>>,"
+ "BigBin = list_to_bitstring([Bin||_ <- lists:seq(1,16#10)] ++ [<<1:1>>]),"
+ "16#10000001 = erlang:bit_size(BigBin).",
+ 16#10000001 = parse_and_eval(S),
+ %% Only run these on computers with lots of memory
+ %% HugeBin = list_to_bitstring([BigBin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ %% 16#100000011 = erlang:bit_size(HugeBin),
+ 0 = parse_and_eval("0 = erlang:bit_size(<<>>)."),
+ ok.
+
+horrid_match() ->
+ S = "<<1:4,B:24/bitstring>> = <<1:4,42:24/little>>, <<42:24/little>> = B.",
+ <<42:24/little>> = parse_and_eval(S),
+ ok.
+
+test_bitstr() ->
+ S =
+ "<<1:7,B/bitstring>> = <<1:7,<<1:1,6>>/bitstring>>,"
+ "<<1:1,6>> = B,"
+ "B = <<1:1,6>>.",
+ <<1:1,6>> = parse_and_eval(S),
+ ok.
+
+asymmetric_tests() ->
+ <<1:12>> = parse_and_eval("<<1:12>> = <<0,1:4>>."),
+ <<0,1:4>> = parse_and_eval("<<0,1:4>> = <<1:12>>."),
+ S1 =
+ "<<1:1,X/bitstring>> = <<128,255,0,0:2>>,"
+ "<<1,254,0,0:1>> = X,"
+ "X = <<1,254,0,0:1>>.",
+ <<1,254,0,0:1>> = parse_and_eval(S1),
+ S2 =
+ "<<1:1,X1:25/bitstring>> = <<128,255,0,0:2>>,"
+ "<<1,254,0,0:1>> = X1,"
+ "X1 = <<1,254,0,0:1>>.",
+ <<1,254,0,0:1>> = parse_and_eval(S2),
+ ok.
+
+big_asymmetric_tests() ->
+ <<1:875,1:12>> = parse_and_eval("<<1:875,1:12>> = <<1:875,0,1:4>>."),
+ <<1:875,0,1:4>> = parse_and_eval("<<1:875,0,1:4>> = <<1:875,1:12>>."),
+ S1 =
+ "<<1:1,X/bitstring>> = <<128,255,0,0:2,1:875>>,"
+ "<<1,254,0,0:1,1:875>> = X,"
+ "X = <<1,254,0,0:1,1:875>>.",
+ <<1,254,0,0:1,1:875>> = parse_and_eval(S1),
+ S2 =
+ "<<1:1,X1:900/bitstring>> = <<128,255,0,0:2,1:875>>,"
+ "<<1,254,0,0:1,1:875>> = X1,"
+ "X1 = <<1,254,0,0:1,1:875>>.",
+ parse_and_eval(S2),
+ ok.
+
+binary_to_and_from_list() ->
+ <<1:7>> = parse_and_eval("list_to_bitstring(bitstring_to_list(<<1:7>>))."),
+ <<1,2,3,4,1:1>> = parse_and_eval("list_to_bitstring(bitstring_to_list(<<1,2,3,4,1:1>>))."),
+ [1,2,3,4,<<1:1>>] = parse_and_eval("bitstring_to_list(<<1,2,3,4,1:1>>)."),
+ <<1:1,1,2,3,4>> = parse_and_eval("list_to_bitstring([<<1:1>>,1,2,3,4])."),
+ [128,129,1,130,<<0:1>>] = parse_and_eval("bitstring_to_list(<<1:1,1,2,3,4>>)."),
+ ok.
+
+big_binary_to_and_from_list() ->
+ S1 = "erlang:list_to_bitstring(bitstring_to_list(<<1:800,2,3,4,1:1>>)).",
+ <<1:800,2,3,4,1:1>> = parse_and_eval(S1),
+ S2 = "erlang:bitstring_to_list(<<1,2,3,4,1:800,1:1>>).",
+ [1,2,3,4|_Rest1] = parse_and_eval(S2),
+ S3 = "erlang:list_to_bitstring([<<1:801>>,1,2,3,4]).",
+ <<1:801,1,2,3,4>> = parse_and_eval(S3),
+ ok.
+
+send_and_receive() ->
+ S =
+ "Bin = <<1,2:7>>,"
+ "Pid = spawn(fun() -> bs_shell_native:receiver(Bin) end),"
+ "Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},"
+ "receive ok -> ok end.",
+ parse_and_eval(S).
+
+receiver(Bin) ->
+ receive
+ {Pid, <<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok
+ end.
+
+send_and_receive_alot() ->
+ S =
+ "Bin = <<1:1000001>>,"
+ "Pid = spawn(fun() -> bs_shell_native:receiver_alot(Bin) end),"
+ "bs_shell_native:send_alot(100,Bin,Pid).",
+ parse_and_eval(S).
+
+send_alot(N,Bin,Pid) when N > 0 ->
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end,
+ send_alot(N-1,Bin,Pid);
+send_alot(0,_Bin,Pid) ->
+ Pid ! no_more,
+ ok.
+
+receiver_alot(Bin) ->
+ receive
+ {Pid, <<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok;
+ no_more -> ok
+ end,
+ receiver_alot(Bin).
+
+%%--------------------------------------------------------------------
+
+eval_bin_comp_in_shell() ->
+ ok = byte_aligned(),
+ ok = bit_aligned(),
+ ok = extended_byte_aligned(),
+ ok = extended_bit_aligned(),
+ ok = mixed(),
+ ok.
+
+byte_aligned() ->
+ <<"abcdefg">> =
+ parse_and_eval("<<\"abcdefg\">> = << <<(X+32)>> || <<X>> <= <<\"ABCDEFG\">> >>."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:32>> <= <<1:32,2:32,3:32,4:32>> >>."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:16>> <= <<1:16,2:16,3:16,4:16>> >>."),
+ ok.
+
+bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ parse_and_eval("<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || <<X>> <= <<\"ABCDEFG\">> >>."),
+ <<"ABCDEFG">> =
+ parse_and_eval("<<\"ABCDEFG\">> =
+ << <<(X-32)>> || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> >>."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:31>> <= <<1:31,2:31,3:31,4:31>> >>."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:15>> <= <<1:15,2:15,3:15,4:15>> >>."),
+ ok.
+
+extended_byte_aligned() ->
+ <<"abcdefg">> =
+ parse_and_eval("<<\"abcdefg\">> = << <<(X+32)>> || X <- \"ABCDEFG\" >>."),
+ "abcdefg" =
+ parse_and_eval("\"abcdefg\" = [(X+32) || <<X>> <= <<\"ABCDEFG\">>]."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || X <- [1,2,3,4] >>."),
+ [256,512,768,1024] =
+ parse_and_eval("[256,512,768,1024] =
+ [X || <<X:16/little>> <= <<1:16,2:16,3:16,4:16>>]."),
+ ok.
+
+extended_bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ parse_and_eval("<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || X <- \"ABCDEFG\" >>."),
+ "ABCDEFG" =
+ parse_and_eval("\"ABCDEFG\" = [(X-32) || <<X:7>> <=
+<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>>]."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || X <- [1,2,3,4] >>."),
+ [256,512,768,1024] =
+ parse_and_eval("[256,512,768,1024] =
+ [X || <<X:15/little>> <= <<1:15,2:15,3:15,4:15>>]."),
+ ok.
+
+mixed() ->
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>> >>."),
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, Y <- [1,2] >>."),
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || X <- [1,2,3,4], Y <- [1,2] >>."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>>]."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, Y <- [1,2]]."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>> >>."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2] >>."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || X <- [1,2,3,4], Y <- [1,2] >>."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>>]."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2]]."),
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_split.erl b/lib/hipe/test/bs_SUITE_data/bs_split.erl
new file mode 100644
index 0000000000..2e52308a77
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_split.erl
@@ -0,0 +1,105 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+
+-module(bs_split).
+
+-export([test/0]).
+
+test() ->
+ Funs = [fun byte_split_binary/0, fun bit_split_binary/0, fun z_split/0],
+ lists:foreach(fun (F) -> ok = F() end, Funs).
+
+%%--------------------------------------------------------------------
+
+byte_split_binary() ->
+ L = lists:seq(0, 57),
+ B = mkbin(L),
+ byte_split(L, B, byte_size(B)).
+
+byte_split(L, B, Pos) when Pos >= 0 ->
+ Sz1 = Pos,
+ Sz2 = byte_size(B) - Pos,
+ bs1(L, B, Pos, Sz1, Sz2);
+byte_split(_, _, _) -> ok.
+
+bs1(L, B, Pos, Sz1, Sz2) ->
+ <<B1:Sz1/binary, B2:Sz2/binary>> = B,
+ bs2(L, B, Pos, B1, B2).
+
+bs2(L, B, Pos, B1, B2)->
+ B1 = list_to_binary(lists:sublist(L, 1, Pos)),
+ bs3(L, B, Pos, B2).
+
+bs3(L, B, Pos, B2) ->
+ B2 = list_to_binary(lists:nthtail(Pos, L)),
+ byte_split(L, B, Pos-1).
+
+%%--------------------------------------------------------------------
+
+bit_split_binary() ->
+ Fun = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ %% io:format("~p, ~p, ~p", [SkipBef,N,SkipAft]),
+ <<_I1:SkipBef,OutBin:N/binary-unit:1,_I2:SkipAft>> = Bin,
+ OutBin = make_bin_from_list(List, N)
+ end,
+ bit_split_binary1(Fun, erlang:md5(<<1,2,3>>)).
+
+bit_split_binary1(Action, Bin) ->
+ BitList = bits_to_list(binary_to_list(Bin), 16#80),
+ bit_split_binary2(Action, Bin, BitList, 0).
+
+bit_split_binary2(Action, Bin, [_|T]=List, Bef) ->
+ bit_split_binary3(Action, Bin, List, Bef, bit_size(Bin)),
+ bit_split_binary2(Action, Bin, T, Bef+1);
+bit_split_binary2(_Action, _Bin, [], _Bef) -> ok.
+
+bit_split_binary3(Action, Bin, List, Bef, Aft) when Bef =< Aft ->
+ Action(Bin, List, Bef, (Aft-Bef) div 8 * 8),
+ bit_split_binary3(Action, Bin, List, Bef, Aft-8);
+bit_split_binary3(_, _, _, _, _) -> ok.
+
+make_bin_from_list(_List, 0) ->
+ mkbin([]);
+make_bin_from_list(List, N) ->
+ list_to_binary([make_int(List, 8, 0),
+ make_bin_from_list(lists:nthtail(8, List), N-8)]).
+
+make_int(_List, 0, Acc) -> Acc;
+make_int([H|T], N, Acc) -> make_int(T, N-1, Acc bsl 1 bor H).
+
+bits_to_list([_|T], 0) -> bits_to_list(T, 16#80);
+bits_to_list([H|_]=List, Mask) ->
+ [case H band Mask of
+ 0 -> 0;
+ _ -> 1
+ end|bits_to_list(List, Mask bsr 1)];
+bits_to_list([], _) -> [].
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+%%--------------------------------------------------------------------
+%% Splits a series of null terminated segments of a binary without
+%% creating any new sub-binaries until the zero is found.
+
+z_split() ->
+ [<<61,62,63>>] = z_split(<<61,62,63>>),
+ [<<61,62,63>>, <<>>] = z_split(<<61,62,63,0>>),
+ [<<61,62,63>>, <<64>>] = z_split(<<61,62,63,0,64>>),
+ [<<61,62,63>>, <<64,65,66>>] = z_split(<<61,62,63,0,64,65,66>>),
+ [<<61,62>>, <<64>>, <<>>, <<65,66>>] = z_split(<<61,62,0,64,0,0,65,66>>),
+ ok.
+
+z_split(B) when is_binary(B) ->
+ z_split(B, 0).
+
+z_split(B, N) ->
+ case B of
+ <<_B1:N/binary,0,_B2/binary>> -> % use skip_bits for B1, B2
+ <<B1:N/binary,_,B2/binary>> = B, % and postpone the matching
+ [B1 | z_split(B2)];
+ <<_:N/binary>> ->
+ [B];
+ _ ->
+ z_split(B, N+1)
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl b/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl
new file mode 100644
index 0000000000..eccb0083bd
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl
@@ -0,0 +1,26 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_system_limit_32.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Checks binary system limits on 32-bit machines
+%%% Created : 14 May 2008
+%%%-------------------------------------------------------------------
+-module(bs_system_limit_32).
+
+-export([test/0]).
+
+test() ->
+ case erlang:system_info(wordsize) of
+ 4 -> system_limit_32();
+ 8 -> ok
+ end.
+
+system_limit_32() ->
+ {'EXIT', {badarg, _}} = (catch <<42:(id(-1))>>),
+ {'EXIT', {badarg, _}} = (catch <<42:(id(-389739873536870912))/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<32:536870912/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<42:(id(536870912))/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<42:(id(536870912))/unit:8,1:1>>),
+ ok.
+
+id(X) -> X.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_utf.erl b/lib/hipe/test/bs_SUITE_data/bs_utf.erl
new file mode 100644
index 0000000000..f50ae08964
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_utf.erl
@@ -0,0 +1,18 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% Purpose: test support for UTF datatypes in binaries - INCOMPLETE
+%%-------------------------------------------------------------------
+
+-module(bs_utf).
+
+-export([test/0]).
+
+test() ->
+ <<65>> = b65utf8(),
+ ok = m(<<65>>).
+
+m(<<65/utf8>>) ->
+ ok.
+
+b65utf8() ->
+ <<65/utf8>>.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl b/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl
new file mode 100644
index 0000000000..a20df04b53
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl
@@ -0,0 +1,76 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Author : Kostis Sagonas
+%% Purpose : These tests are intended to test the construction and
+%% matching of binaries using variable sizes
+%% Notes :
+%% - Added test that crashed BEAM compiler
+%% - Added test that crashed when segments of size zero were used
+%% and one that did not convert integers to floats when constructing
+%% binaries.
+%% - Added a construction test which crashed from core because of
+%% problems with the effect flag (2004/11/15)
+%%--------------------------------------------------------------------
+-module(bs_var_segs).
+
+-export([test/0]).
+
+test() ->
+ N1 = 18,
+ A1 = 2,
+ A1 = match1(N1, <<1:12, 2:N1, A1:2>>),
+ A1 = match2(N1, <<1:12, 2:N1/integer-little, A1:2>>),
+ N3 = 3,
+ A3 = <<1,2,3>>,
+ B3 = 2,
+ {A3, B3} = match3(N3, <<1:12, A3:N3/binary, B3:4>>),
+ N4 = 12,
+ B4 = <<1,2,3>>,
+ A4 = 2,
+ {A4, B4} = match4(N4, <<1:N4, A4:4, B4/binary>>),
+ Y = <<5>>,
+ Y = match5(a, Y),
+ <<73>> = gen1(8, 0, <<73>>),
+ <<171>> = gen2(8, 7, 2#10101010101010101),
+ <<0:64>> = construct(),
+ <<0:32>> = construct2(0),
+ ok = in_guard(<<16#BCD:14,3:2>>, 16#BCD),
+ ok.
+
+construct() ->
+ <<0:64/float>>.
+
+construct2(X) ->
+ <<X:32/little>>.
+
+match1(N, Bin) ->
+ <<1:12, 2:N, A:2>>=Bin,
+ A.
+
+match2(N, Bin) ->
+ <<1:12, 2:N/integer-little, A:2>>=Bin,
+ A.
+
+match3(N, Bin) ->
+ <<1:12, A:N/binary, B:4>>=Bin,
+ {A,B}.
+
+match4(N, Bin) ->
+ <<1:N, A:4, B/binary>>=Bin,
+ {A,B}.
+
+match5(X, Y) ->
+ case X of
+ a ->
+ Y2 = 8
+ end,
+ <<5:Y2>> = Y.
+
+gen1(N, S, A) ->
+ <<A:S/binary-unit:1, A:(N-S)/binary-unit:1>>.
+
+gen2(N, S, A) ->
+ <<A:S/little, A:(N-S)/little>>.
+
+in_guard(Bin, A) when <<A:14,3:2>> == Bin -> ok;
+in_guard(_, _) -> no.
diff --git a/lib/hipe/test/hipe.spec b/lib/hipe/test/hipe.spec
new file mode 100644
index 0000000000..2894f40354
--- /dev/null
+++ b/lib/hipe/test/hipe.spec
@@ -0,0 +1,6 @@
+%% -*- erlang -*-
+
+{alias, tests, "../hipe_test"}.
+
+{suites, tests, all}.
+
diff --git a/lib/hipe/test/hipe_SUITE.erl b/lib/hipe/test/hipe_SUITE.erl
new file mode 100644
index 0000000000..554bc972f6
--- /dev/null
+++ b/lib/hipe/test/hipe_SUITE.erl
@@ -0,0 +1,55 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(hipe_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+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.
+
+app() ->
+ [{doc, "Test that the hipe app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(hipe, tolerant).
+
+appup() ->
+ [{doc, "Test that the hipe appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ AppupFile = "hipe.appup",
+ AppupPath = filename:join([code:lib_dir(hipe), "ebin", AppupFile]),
+ {ok, [{_Vsn, [], []}]} = file:consult(AppupPath).
diff --git a/lib/hipe/test/hipe_testsuite_driver.erl b/lib/hipe/test/hipe_testsuite_driver.erl
new file mode 100644
index 0000000000..5f05a716bc
--- /dev/null
+++ b/lib/hipe/test/hipe_testsuite_driver.erl
@@ -0,0 +1,201 @@
+-module(hipe_testsuite_driver).
+
+-export([create_all_suites/0, run/3]).
+
+-include_lib("kernel/include/file.hrl").
+
+-type testcase() :: atom().
+-type file_type() :: 'device' | 'directory' | 'regular' | 'other'.
+-type ext_posix() :: file:posix() | 'badarg'.
+
+-define(suite_suffix, "_SUITE").
+-define(data_folder, "_data").
+-define(suite_data, ?suite_suffix ++ ?data_folder).
+
+-record(suite, {suitename :: string(),
+ outputfile :: file:io_device(),
+ testcases :: [testcase()]}).
+
+-spec create_all_suites() -> 'ok'.
+
+create_all_suites() ->
+ {ok, Cwd} = file:get_cwd(),
+ Suites = get_suites(Cwd),
+ lists:foreach(fun create_suite/1, Suites).
+
+-spec get_suites(file:filename()) -> [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.
+
+suffix(String, Suffix) ->
+ case string:rstr(String, Suffix) of
+ 0 -> no;
+ Index ->
+ case string:substr(String, Index) =:= Suffix of
+ true -> {yes, string:sub_string(String, 1, Index-1)};
+ false -> no
+ end
+ end.
+
+-spec file_type(file:filename()) -> {ok, file_type()} | {error, ext_posix()}.
+
+file_type(Filename) ->
+ case file:read_file_info(Filename) of
+ {ok, FI} -> {ok, FI#file_info.type};
+ Error -> Error
+ end.
+
+-spec create_suite(string()) -> 'ok'.
+
+create_suite(SuiteName) ->
+ {ok, Cwd} = file:get_cwd(),
+ SuiteDirN = filename:join(Cwd, SuiteName ++ ?suite_data),
+ OutputFile = generate_suite_file(Cwd, SuiteName),
+ generate_suite(SuiteName, OutputFile, SuiteDirN).
+
+generate_suite_file(Cwd, SuiteName) ->
+ F = filename:join(Cwd, SuiteName ++ ?suite_suffix ++ ".erl"),
+ case file:open(F, [write]) of
+ {ok, IoDevice} -> IoDevice;
+ {error, _} = E -> exit({E, F})
+ end.
+
+generate_suite(SuiteName, OutputFile, SuiteDirN) ->
+ TestCases = list_testcases(SuiteDirN),
+ Suite = #suite{suitename = SuiteName, outputfile = OutputFile,
+ testcases = TestCases},
+ write_suite(Suite),
+ file:close(OutputFile).
+
+list_testcases(Dirname) ->
+ {ok, Files} = list_dir(Dirname, ".erl", true),
+ [list_to_atom(filename:basename(F, ".erl")) || F <- Files].
+
+-spec list_dir(file:filename(), string(), boolean()) ->
+ {error, ext_posix()} | {ok, [file:filename()]}.
+
+list_dir(Dir, Extension, Dirs) ->
+ case file:list_dir(Dir) of
+ {error, _} = Error -> Error;
+ {ok, Filenames} ->
+ FullFilenames = [filename:join(Dir, F) || F <- Filenames],
+ Matches1 = case Dirs of
+ true ->
+ [F || F <- FullFilenames,
+ file_type(F) =:= {ok, 'directory'}];
+ false -> []
+ end,
+ Matches2 = [F || F <- FullFilenames,
+ file_type(F) =:= {ok, 'regular'},
+ filename:extension(F) =:= Extension],
+ {ok, lists:sort(Matches1 ++ Matches2)}
+ end.
+
+write_suite(Suite) ->
+ write_header(Suite),
+ write_testcases(Suite).
+
+write_header(#suite{suitename = SuiteName, outputfile = OutputFile,
+ testcases = TestCases}) ->
+ Exports = format_export(TestCases),
+ TimeLimit = 2, %% with 1 it fails on some slow machines...
+ io:format(OutputFile,
+ "%% ATTENTION!\n"
+ "%% This is an automatically generated file. Do not edit.\n\n"
+ "-module(~s).\n\n"
+ "-export([suite/0, init_per_suite/0, init_per_suite/1,\n"
+ " end_per_suite/1, all/0]).\n"
+ "~s\n\n"
+ "-include_lib(\"common_test/include/ct.hrl\").\n\n"
+ "suite() ->\n"
+ " [{timetrap, {minutes, ~w}}].\n\n"
+ "init_per_suite() ->\n"
+ " [].\n\n"
+ "init_per_suite(Config) ->\n"
+ " case erlang:system_info(hipe_architecture) of\n"
+ " undefined -> {skip, \"HiPE not available or enabled\"};\n"
+ " _ -> Config\n"
+ " end.\n\n"
+ "end_per_suite(_Config) ->\n"
+ " ok.\n\n"
+ "all() ->\n"
+ " ~p.\n\n"
+ "test(Config, TestCase) ->\n"
+ " Dir = ?config(data_dir, Config),\n"
+ " OutDir = ?config(priv_dir, Config),\n"
+ " hipe_testsuite_driver:run(TestCase, Dir, OutDir)."
+ "\n\n",
+ [SuiteName ++ ?suite_suffix, Exports, TimeLimit, TestCases]).
+
+format_export(TestCases) ->
+ TL = [list_to_atom(atom_to_list(N)++"/1") || N <- TestCases],
+ TestCaseString = io_lib:format("-export(~p).", [TL]),
+ strip_quotes(lists:flatten(TestCaseString), []).
+
+strip_quotes([], Result) ->
+ lists:reverse(Result);
+strip_quotes([$' |Rest], Result) ->
+ strip_quotes(Rest, Result);
+strip_quotes([$\, |Rest], Result) ->
+ strip_quotes(Rest, [$\ , $\, |Result]);
+strip_quotes([C|Rest], Result) ->
+ strip_quotes(Rest, [C|Result]).
+
+write_testcases(#suite{outputfile = OutputFile, testcases = TestCases}) ->
+ lists:foreach(fun (T) -> write_testcase(OutputFile, T) end, TestCases).
+
+write_testcase(OutputFile, TestCase) ->
+ io:format(OutputFile,
+ "~p(Config) ->\n"
+ " test(Config, ~p).\n\n",
+ [TestCase, TestCase]).
+
+-spec run(atom(), string(), string()) -> 'ok'.
+
+run(TestCase, Dir, _OutDir) ->
+ F = filename:join(Dir, atom_to_list(TestCase) ++ ".erl"),
+ {ok, TestCase} = compile:file(F),
+ ok = try TestCase:prepare_for_test() catch _:_ -> ok end,
+ %% DataFiles = try TestCase:datafiles() catch _:_ -> [] end,
+ %% lists:foreach(fun (DF) ->
+ %% Src = filename:join(Dir, DF),
+ %% Dst = filename:join(OutDir, DF),
+ %% {ok, _} = file:copy(Src, Dst)
+ %% end, DataFiles),
+ %% try
+ ok = TestCase:test(),
+ HiPEOpts = try TestCase:hipe_options() catch error:undef -> [] end,
+ {ok, TestCase} = hipe:c(TestCase, HiPEOpts),
+ ok = TestCase:test(),
+ case is_llvm_opt_available() of
+ true ->
+ {ok, TestCase} = hipe:c(TestCase, [to_llvm|HiPEOpts]),
+ ok = TestCase:test();
+ false -> ok
+ end.
+ %% after
+ %% lists:foreach(fun (DF) -> ok end, % = file:delete(DF) end,
+ %% [filename:join(OutDir, D) || D <- DataFiles])
+ %% end.
+
+
+%% This function, which is supposed to check whether the right LLVM
+%% infrastructure is available, should be probably written in a better
+%% and more portable way and moved to the hipe application.
+
+is_llvm_opt_available() ->
+ OptStr = os:cmd("opt -version"),
+ SubStr = "LLVM version ", N = length(SubStr),
+ case string:str(OptStr, SubStr) of
+ 0 -> false;
+ S -> P = S + N, string:sub_string(OptStr, P, P + 2) >= "3.4"
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl
new file mode 100644
index 0000000000..14d8320cdf
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl
@@ -0,0 +1,20 @@
+-module(maps_build_and_match_aliasing).
+-export([test/0]).
+
+test() ->
+ M1 = id(#{a=>1,b=>2,c=>3,d=>4}),
+ #{c:=C1=_=_=C2} = M1,
+ true = C1 =:= C2,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B} = M1,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B,b:=2} = M1,
+ #{a:=A=1,a:=A,a:=A,b:=B=2,b:=B,b:=2} = M1,
+ #{c:=C1, c:=_, c:=3, c:=_, c:=C2} = M1,
+ #{c:=C=_=3=_=C} = M1,
+
+ M2 = id(#{"a"=>1,"b"=>2,"c"=>3,"d"=>4}),
+ #{"a":=A2,"a":=A2,"a":=A2,"b":=B2,"b":=B2,"b":=2} = M2,
+ #{"a":=_,"a":=_,"a":=_,"b":=_,"b":=_,"b":=2} = M2,
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl
new file mode 100644
index 0000000000..2abfa4e5b3
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl
@@ -0,0 +1,17 @@
+-module(maps_build_and_match_empty_val).
+-export([test/0]).
+
+test() ->
+ F = fun(#{ "hi":=_,{1,2}:=_,1337:=_}) -> ok end,
+ ok = F(id(#{"hi"=>ok,{1,2}=>ok,1337=>ok})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl
new file mode 100644
index 0000000000..dc2c63fab2
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl
@@ -0,0 +1,40 @@
+-module(maps_build_and_match_literals).
+-export([test/0]).
+
+test() ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% nil key
+ #{[]:=ok,1:=2} = id(#{[]=>ok,1=>2}),
+
+ %% error case
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl
new file mode 100644
index 0000000000..dae6f64e5f
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl
@@ -0,0 +1,16 @@
+-module(maps_build_and_match_over_alloc).
+-export([test/0]).
+
+test() ->
+ Ls = id([1,2,3]),
+ V0 = [a|Ls],
+ M0 = id(#{ "a" => V0 }),
+ #{ "a" := V1 } = M0,
+ V2 = id([c|Ls]),
+ M2 = id(#{ "a" => V2 }),
+ #{ "a" := V3 } = M2,
+ {[a,1,2,3],[c,1,2,3]} = id({V1,V3}),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl
new file mode 100644
index 0000000000..284f69e06c
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl
@@ -0,0 +1,23 @@
+-module(maps_build_and_match_val).
+-export([test/0]).
+
+test() ->
+ F = fun
+ (#{ "hi" := first, v := V}) -> {1,V};
+ (#{ "hi" := second, v := V}) -> {2,V}
+ end,
+
+
+ {1,"hello"} = F(id(#{"hi"=>first,v=>"hello"})),
+ {2,"second"} = F(id(#{"hi"=>second,v=>"second"})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl b/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl
new file mode 100644
index 0000000000..df0f77ea47
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl
@@ -0,0 +1,7 @@
+-module(maps_expand_map_update).
+-export([test/0]).
+
+test() ->
+ M = #{<<"hello">> => <<"world">>}#{<<"hello">> := <<"les gens">>},
+ #{<<"hello">> := <<"les gens">>} = M,
+ ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_export.erl b/lib/hipe/test/maps_SUITE_data/maps_export.erl
new file mode 100644
index 0000000000..4d43fc96ed
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_export.erl
@@ -0,0 +1,11 @@
+-module(maps_export).
+-export([test/0]).
+
+test() ->
+ Raclette = id(#{}),
+ case brie of brie -> Fromage = Raclette end,
+ Raclette = Fromage#{},
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl b/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl
new file mode 100644
index 0000000000..b2d749796a
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_get_map_elements).
+
+-export([test/0]).
+
+test() ->
+ {A, B} = id({"hej", <<123>>}),
+ Map = maps:from_list([{a, A}, {b, B}]),
+ #{a := A, b := B} = id(Map),
+ false = test_pattern(Map),
+ true = test_pattern(#{b => 1, a => "hej"}),
+ case Map of
+ #{a := C, b := <<124>>} -> yay;
+ _ -> C = B, nay
+ end,
+ C = id(B),
+ ok.
+
+id(X) -> X.
+
+test_pattern(#{a := _, b := 1}) -> true;
+test_pattern(#{}) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl
new file mode 100644
index 0000000000..61a0eaa1e7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl
@@ -0,0 +1,31 @@
+-module(maps_guard_bifs).
+-export([test/0]).
+
+test() ->
+ true = map_guard_empty(),
+ true = map_guard_empty_2(),
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ true = map_guard_tautology(),
+ true = map_guard_ill_map_size(),
+ ok.
+
+map_guard_empty() when is_map(#{}); false -> true.
+
+map_guard_empty_2() when true; #{} andalso false -> true.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+map_guard_tautology() when #{} =:= #{}; true -> true.
+
+map_guard_ill_map_size() when true; map_size(0) -> true.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl
new file mode 100644
index 0000000000..9f6eb3a04e
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl
@@ -0,0 +1,36 @@
+-module(maps_guard_fun).
+-export([test/0]).
+
+test() ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ case (catch F1(#{s=>none,v=>none})) of
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} -> ok;
+ {'EXIT', {function_clause,[{?MODULE,_,1,[#{s:=none,v:=none}]}|_]}} -> ok;
+ {'EXIT', {function_clause,[Frame|_]}}
+ when is_tuple(Frame), element(1, Frame) =:= ?MODULE ->
+ test_server:comment("Unexpected trace format, probably using HiPE");
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl
new file mode 100644
index 0000000000..f84ba19c86
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl
@@ -0,0 +1,54 @@
+-module(maps_guard_receive).
+-export([test/0]).
+
+test() ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl
new file mode 100644
index 0000000000..4eb18dcea1
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl
@@ -0,0 +1,35 @@
+-module(maps_guard_sequence).
+-export([test/0]).
+
+test() ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl
new file mode 100644
index 0000000000..254c1c2984
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl
@@ -0,0 +1,14 @@
+-module(maps_guard_update).
+-export([test/0]).
+
+test() ->
+ error = map_guard_update(#{},#{}),
+ 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}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+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.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl b/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl
new file mode 100644
index 0000000000..61653aa519
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl
@@ -0,0 +1,46 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_has_map_fields).
+
+-export([test/0]).
+
+test() ->
+ false = has_a_field(#{}),
+ false = has_a_field(#{b => 2}),
+ true = has_a_field(#{a => 3}),
+ true = has_a_field(#{b => c, a => false}),
+
+ false = has_a_b_field(#{a => true}),
+ false = has_a_b_field(#{b => a}),
+ true = has_a_b_field(#{a => 1, b => 2}),
+ true = has_a_b_field(#{b => 3, a => 4}),
+
+ false = has_binary_field(#{}),
+ false = has_binary_field(#{#{} => yay}),
+ true = has_binary_field(#{<<"true">> => false}),
+
+ false = has_binary_but_no_map_field(#{}),
+ false = has_map_but_no_binary_field(#{}),
+ false = has_binary_but_no_map_field(#{#{} => 1}),
+ false = has_map_but_no_binary_field(#{<<"true">> => true}),
+ true = has_binary_but_no_map_field(#{<<"true">> => false}),
+ true = has_map_but_no_binary_field(#{#{} => 1}),
+ false = has_binary_but_no_map_field(#{<<"true">> => true, #{} => 1}),
+ false = has_map_but_no_binary_field(#{<<"true">> => true, #{} => 1}),
+ ok.
+
+has_a_field(#{a := _}) -> true;
+has_a_field(#{}) -> false.
+
+has_a_b_field(#{a := _, b := _}) -> true;
+has_a_b_field(#{}) -> false.
+
+has_binary_field(#{<<"true">> := _}) -> true;
+has_binary_field(#{}) -> false.
+
+has_map_but_no_binary_field(#{<<"true">> := _}) -> false;
+has_map_but_no_binary_field(#{} = M) -> maps:is_key(#{}, M).
+
+has_binary_but_no_map_field(#{<<"true">> := _} = M) ->
+ not maps:is_key(#{}, M);
+has_binary_but_no_map_field(#{}) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_is_map.erl b/lib/hipe/test/maps_SUITE_data/maps_is_map.erl
new file mode 100644
index 0000000000..e84f4b8c44
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_is_map.erl
@@ -0,0 +1,24 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_is_map).
+
+-export([test/0]).
+
+test() ->
+ true = test_is_map(#{}),
+ false = test_is_map(<<"hej">>),
+ true = test_is_map_guard(#{a => b}),
+ false = test_is_map_guard(3),
+ true = test_is_map_with_binary_guard(#{"a" => <<"b">>}),
+ false = test_is_map_with_binary_guard(12),
+ ok.
+
+test_is_map(X) ->
+ is_map(X).
+
+test_is_map_guard(Map) when is_map(Map) -> true;
+test_is_map_guard(_) -> false.
+
+test_is_map_with_binary_guard(B) when is_binary(B) -> false;
+test_is_map_with_binary_guard(#{}) -> true;
+test_is_map_with_binary_guard(_) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl b/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl
new file mode 100644
index 0000000000..ad2c726d65
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl
@@ -0,0 +1,6 @@
+-module(maps_list_comprehension).
+-export([test/0]).
+
+test() ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_map_size.erl b/lib/hipe/test/maps_SUITE_data/maps_map_size.erl
new file mode 100644
index 0000000000..25c8e5d4c7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_map_size.erl
@@ -0,0 +1,29 @@
+-module(maps_map_size).
+-export([test/0]).
+
+test() ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl
new file mode 100644
index 0000000000..31abf15d49
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl
@@ -0,0 +1,41 @@
+-module(maps_map_sort_literals).
+-export([test/0]).
+
+test() ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = id(#{ a => 1 }) < id(#{ b => 1}),
+ false = id(#{ b => 1 }) < id(#{ a => 1}),
+ true = id(#{ a => 1, b => 1, c => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ b => 1, c => 1, d => 1 }) > id(#{ a => 1, b => 1, c => 1}),
+ true = id(#{ c => 1, b => 1, a => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ "a" => 1 }) < id(#{ <<"a">> => 1}),
+ false = id(#{ <<"a">> => 1 }) < id(#{ "a" => 1}),
+ false = id(#{ 1 => 1 }) < id(#{ 1.0 => 1}),
+ false = id(#{ 1.0 => 1 }) < id(#{ 1 => 1}),
+
+ %% value order
+ true = id(#{ a => 1 }) < id(#{ a => 2}),
+ false = id(#{ a => 2 }) < id(#{ a => 1}),
+ false = id(#{ a => 2, b => 1 }) < id(#{ a => 1, b => 3}),
+ true = id(#{ a => 1, b => 1 }) < id(#{ a => 1, b => 3}),
+
+ true = id(#{ "a" => "hi", b => 134 }) == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl
new file mode 100644
index 0000000000..29a6a29290
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl
@@ -0,0 +1,24 @@
+-module(maps_match_and_update_literals).
+-export([test/0]).
+
+test() ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl b/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl
new file mode 100644
index 0000000000..72ac9ce078
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_put_map_assoc).
+
+-export([test/0]).
+
+test() ->
+ true = assoc_guard(#{}),
+ false = assoc_guard(not_a_map),
+ #{a := true} = assoc_update(#{}),
+ {'EXIT', {badarg, [{?MODULE, assoc_update, 1, _}|_]}}
+ = (catch assoc_update(not_a_map)),
+ ok = assoc_guard_clause(#{}),
+ {'EXIT', {function_clause, [{?MODULE, assoc_guard_clause, _, _}|_]}}
+ = (catch assoc_guard_clause(not_a_map)),
+ ok.
+
+assoc_guard(M) when is_map(M#{a => b}) -> true;
+assoc_guard(_) -> false.
+
+assoc_update(M) -> M#{a => true}.
+
+assoc_guard_clause(M) when is_map(M#{a => 3}) -> ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl b/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl
new file mode 100644
index 0000000000..1cfcd80180
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl
@@ -0,0 +1,28 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_put_map_exact).
+
+-export([test/0]).
+
+test() ->
+ false = exact_guard(#{b => a}),
+ false = exact_guard(not_a_map),
+ true = exact_guard(#{a => false}),
+ #{a := true} = exact_update(#{a => false}),
+ {'EXIT', {badarg, [{?MODULE, exact_update, 1, _}|_]}}
+ = (catch exact_update(not_a_map)),
+ {'EXIT', {badarg, [{?MODULE, exact_update, 1, _}|_]}}
+ = (catch exact_update(#{})),
+ ok = exact_guard_clause(#{a => yes}),
+ {'EXIT', {function_clause, [{?MODULE, exact_guard_clause, _, _}|_]}}
+ = (catch exact_guard_clause(#{})),
+ {'EXIT', {function_clause, [{?MODULE, exact_guard_clause, _, _}|_]}}
+ = (catch exact_guard_clause(not_a_map)),
+ ok.
+
+exact_guard(M) when is_map(M#{a := b}) -> true;
+exact_guard(_) -> false.
+
+exact_update(M) -> M#{a := true}.
+
+exact_guard_clause(M) when is_map(M#{a := 42}) -> ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl b/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl
new file mode 100644
index 0000000000..cc7c1353de
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl
@@ -0,0 +1,22 @@
+-module(maps_update_assoc).
+-export([test/0]).
+
+test() ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{badarg,_}} = (catch BadMap#{nonexisting=>val}),
+
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl b/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl
new file mode 100644
index 0000000000..6e5acb3283
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl
@@ -0,0 +1,32 @@
+-module(maps_update_exact).
+-export([test/0]).
+
+test() ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch ((id(nil))#{ a := b })),
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl
new file mode 100644
index 0000000000..87aea3d8e1
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl
@@ -0,0 +1,13 @@
+-module(maps_update_literals).
+-export([test/0]).
+
+test() ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl b/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl
new file mode 100644
index 0000000000..181e3f18f7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl
@@ -0,0 +1,32 @@
+-module(maps_update_map_expressions).
+-export([test/0]).
+
+test() ->
+ M = maps:new(),
+ X = id(fondue),
+ M1 = #{ a := 1 } = M#{a => 1},
+ #{ b := {X} } = M1#{ a := 1, b => {X} },
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Test need to be in a fun.
+ %% This tests that let expr optimisation in sys_core_fold
+ %% covers maps correctly.
+ F = fun() ->
+ M0 = id(#{ "a" => [1,2,3] }),
+ #{ "a" := _ } = M0,
+ M0#{ "a" := b }
+ end,
+
+ #{ "a" := b } = F(),
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{badarg,_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{badarg,_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_values.erl b/lib/hipe/test/maps_SUITE_data/maps_update_values.erl
new file mode 100644
index 0000000000..bbad5ac19e
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_values.erl
@@ -0,0 +1,28 @@
+-module(maps_update_values).
+-export([test/0]).
+
+test() ->
+ V0 = id(1337),
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1], "wazzup" => 42 },
+ [1337, {some_val, 1337}] = get_val(M1),
+
+ N = 110,
+ List = [{[I,1,2,3,I],{1,2,3,"wat",I}}|| I <- lists:seq(1,N)],
+
+ {_,_,#{val2 := {1,2,3,"wat",N}, val1 := [N,1,2,3,N]}} = lists:foldl(fun
+ ({V2,V3},{Old2,Old3,Mi}) ->
+ ok = check_val(Mi,Old2,Old3),
+ #{ val1 := Old2, val2 := Old3 } = Mi,
+ {V2,V3, Mi#{ val1 := id(V2), val2 := V1, val2 => id(V3)}}
+ end, {none, none, #{val1=>none,val2=>none}},List),
+ ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
+
+check_val(#{val1:=V1, val2:=V2},V1,V2) -> ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl b/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl
new file mode 100644
index 0000000000..76b2a91f94
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl
@@ -0,0 +1,27 @@
+-module(maps_warn_pair_key_overloaded).
+-export([test/0]).
+
+test() ->
+ #{ "hi1" := 42 } = id(#{ "hi1" => 1, "hi1" => 42 }),
+
+ #{ "hi1" := 1337, "hi2" := [2], "hi3" := 3 } = id(#{
+ "hi1" => erlang:atom_to_binary(?MODULE,utf8),
+ "hi1" => erlang:binary_to_atom(<<"wazzup">>,utf8),
+ "hi1" => erlang:binary_to_float(<<"3.1416">>),
+ "hi1" => erlang:float_to_binary(3.1416),
+ "hi2" => erlang:pid_to_list(self()),
+ "hi3" => erlang:float_to_binary(3.1416),
+ "hi2" => lists:subtract([1,2],[1]),
+ "hi3" => +3,
+ "hi1" => erlang:min(1,2),
+ "hi1" => erlang:hash({1,2},35),
+ "hi1" => erlang:phash({1,2},33),
+ "hi1" => erlang:phash2({1,2},34),
+ "hi1" => erlang:integer_to_binary(1337),
+ "hi1" => erlang:binary_to_integer(<<"1337">>),
+ "hi4" => erlang:float_to_binary(3.1416)
+ }),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl b/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl
new file mode 100644
index 0000000000..6cb0366314
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl
@@ -0,0 +1,9 @@
+-module(maps_warn_useless_build).
+-export([test/0]).
+
+test() ->
+ [#{ a => id(I)} || I <- [1,2,3]],
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/tools/Makefile b/lib/hipe/tools/Makefile
index 3ce8ad5dd7..ed80eb075b 100644
--- a/lib/hipe/tools/Makefile
+++ b/lib/hipe/tools/Makefile
@@ -42,7 +42,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-MODULES = hipe_tool hipe_profile hipe_jit
+MODULES = hipe_profile hipe_jit
# hipe_timer
HRL_FILES=
@@ -110,5 +110,4 @@ realclean: clean
# ----------------------------------------------------
$(EBIN)/hipe_ceach.beam: ../main/hipe.hrl
-$(EBIN)/hipe_tool.beam: ../main/hipe.hrl
diff --git a/lib/hipe/tools/hipe_tool.erl b/lib/hipe/tools/hipe_tool.erl
deleted file mode 100644
index efcf073efa..0000000000
--- a/lib/hipe/tools/hipe_tool.erl
+++ /dev/null
@@ -1,525 +0,0 @@
-%% -*- erlang-indent-level: 2 -*-
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Copyright (c) 2002 by Erik Johansson.
-%% ====================================================================
-%% Module : hipe_tool
-%% Purpose :
-%% Notes :
-%% History : * 2002-03-13 Erik Johansson ([email protected]): Created.
-%% ====================================================================
-%% Exports :
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--module(hipe_tool).
--compile([{nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,editor,3}},
- {nowarn_deprecated_function,{gs,label,3}},
- {nowarn_deprecated_function,{gs,listbox,3}},
- {nowarn_deprecated_function,{gs,menu,3}},
- {nowarn_deprecated_function,{gs,menubar,3}},
- {nowarn_deprecated_function,{gs,menubutton,3}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
--export([start/0]).
-
-%%---------------------------------------------------------------------
-
--include("../main/hipe.hrl").
-
-%%---------------------------------------------------------------------
-
--define(WINDOW_WIDTH, 920).
--define(WINDOW_HEIGHT, 460).
--define(DEFAULT_BG_COLOR, {217,217,217}).
--define(POLL_INTERVAL, 5000).
--define(FONT, {screen, 12}).
--define(HEADER_FONT, {screen, [bold], 12}).
--define(NORMAL_FG_COLOR, {0,0,0}).
-
-%%---------------------------------------------------------------------
-
--type fa() :: {atom(), arity()}. % {Fun,Arity}
--type fa_address() :: {atom(), arity(), non_neg_integer()}. % {F,A,Address}
-
-%%---------------------------------------------------------------------
-
--record(state, {win_created = false :: boolean(),
- mindex = 0 :: integer(),
- mod :: atom(),
- funs = [] :: [fa()],
- mods = [] :: [atom()],
- options = [o2] :: comp_options(),
- compiling = false :: 'false' | pid()
- }).
-
-%%---------------------------------------------------------------------
-
--spec start() -> pid().
-
-start() ->
- spawn(fun () -> init() end).
-
-init() ->
- process_flag(trap_exit, true),
- gs:start(),
- S = init_window(#state{}),
- loop(S).
-
--spec loop(#state{}) -> no_return().
-
-loop(State) ->
- receive
- {gs, code_listbox, click, Data, [Idx, Txt | _]} ->
- NewState = update_module_box(State,Idx,Data,Txt),
- loop(NewState);
- {gs, module_listbox, click, Data, [Idx, _Txt | _]} ->
- NewState = update_fun(State,Idx,Data),
- loop(NewState);
- {gs, compmod, click, _, _} ->
- loop(compile(State));
- {gs, prof, click, [], ["Turn off\nProfiling"]} ->
- hipe_profile:prof_module_off(State#state.mod),
- loop(update_module_box(State,State#state.mindex,State#state.mods,""));
- {gs, prof, click, [], _} ->
- hipe_profile:prof_module(State#state.mod),
- loop(update_module_box(State,State#state.mindex,State#state.mods,""));
- {gs, win, configure, _, _} ->
- gs:config(win, [{width, ?WINDOW_WIDTH}, {height, ?WINDOW_HEIGHT}]),
- loop(State);
-
- show_window when State#state.win_created =:= true ->
- gs:config(win, [raise]),
- loop(State);
- show_window when State#state.win_created =:= false ->
- loop((init_window(State))#state{win_created = true});
-
- {gs, _Id, click, close_menu, _Args} ->
- gs:destroy(win),
- loop(State#state{win_created = false});
- {gs, _Id, keypress, _Data, [c, _, 0, 1 | _]} ->
- gs:destroy(win),
- loop(State#state{win_created = false});
- {gs, _Id, keypress, _Data, ['C', _, 1, 1 | _]} ->
- gs:destroy(win),
- loop(State#state{win_created = false});
- {gs, _Id, keypress, _Data, _Args} ->
- loop(State);
- {gs, _, destroy, _, _} ->
- loop(State#state{win_created = false});
-
- {compilation_done, _Res, Sender} ->
- case State#state.compiling of
- Sender ->
- catch gs:config(compmod, [{enable, true}]),
- update_text(compiling, ""),
- loop(update_module_box(State,
- State#state.mindex,
- State#state.mods, ""));
- _ ->
- loop(State)
- end;
-
- {'EXIT', _Pid, _Reason} ->
- exit(normal);
- _Other ->
- io:format("HiPE window received message ~p ~n", [_Other]),
- loop(State)
- after
- ?POLL_INTERVAL ->
- loop(update_code_listbox(State))
- end.
-
--spec init_window(#state{}) -> #state{}.
-
-init_window(State) ->
- create_window(State),
- gs:config(win, [{map,true}]),
- update_code_listbox(State#state{win_created = true}).
-
--spec create_window(#state{}) -> 'ok'.
-
-create_window(State) ->
- gs:window(win, gs:start(), [{width, ?WINDOW_WIDTH},
- {height, ?WINDOW_HEIGHT},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "[HiPE] Code list"},
- {configure, true},
- {destroy, true},
- {cursor, arrow},
- {keypress, true}
- ]),
- create_menu(),
- Xpos = 4,
- Ypos1 = 60,
- Width = (?WINDOW_WIDTH - (Xpos*4)) div 3,
- create_labels([{mods,Ypos1-20,"Loaded Modules"}], Xpos + 1 + 3),
- Xpos2 = Xpos*2+Width,
- create_labels([{mod,Ypos1-20,"Module:"++atom_to_list(State#state.mod)},
- {ver,Ypos1,""},
- {time,Ypos1+20,""},
- {native,Ypos1+40,""},
- {compiling,Ypos1+60,""}], Xpos2),
- create_labels([{function,Ypos1-20,"Function:"},
- {nativefun,Ypos1,""}], Xpos*3+Width*2),
- Ypos = 240,
- Height1 = ?WINDOW_HEIGHT - Ypos1 - Xpos,
- Height = ?WINDOW_HEIGHT - Ypos - Xpos,
- gs:listbox(code_listbox, win, [{x, Xpos},
- {y, Ypos1},
- {width, Width},
- {height, Height1},
- {bg, {255,255,255}},
- {vscroll, right},
- {hscroll, true},
- {click, true}]),
- gs:listbox(module_listbox, win, [{x, Xpos*2+Width},
- {y, Ypos},
- {width, Width},
- {height, Height},
- {bg, {255,255,255}},
- {vscroll, right},
- {hscroll, true},
- {click, true}]),
- gs:listbox(profile_listbox, win, [{x, Xpos*3+Width*2},
- {y, Ypos1+40},
- {width, Width},
- {height, Height-60},
- {bg, {255,255,255}},
- {vscroll, right},
- {hscroll, true},
- {click, true}]),
- gs:button(compmod,win,[{label,{text,"Compile\nModule"}},
- {justify,center},
- {x,Xpos*2+Width*1},
- {height,60},
- {y,Ypos-80}]),
- gs:button(prof,win,[{label,{text,"Profile\nModule"}},
- {justify,center},
- {x,Xpos*2+Width*1+100},
- {height,60},
- {y,Ypos-80}]),
- gs:button(clearprof,win,[{label, {text,"Clear\nProfile"}},
- {justify, center},
- {x, Xpos*2+Width*1+200},
- {height, 60},
- {y, Ypos-80}]),
- gs:editor(edoc,win,[{x, Xpos*3+Width*2}, {y, Ypos},
- {width, Width}, {height, Height},
- {insert, {'end',"Edit this text!"}},
- {vscroll, right},
- {hscroll, true},
- {wrap, none}]),
- ok.
-
--spec create_menu() -> 'ok'.
-
-create_menu() ->
- gs:menubar(menubar, win, [{bg, ?DEFAULT_BG_COLOR}]),
- create_sub_menus([{mbutt, fmenu, " File",
- [{" Close Ctrl-C ",close_menu}]},
- {mbuttc,cmenu, " Compile ",
- [{" Compile Module", comp_mod}]},
- {mbuttp,pmenu, " Profile ",
- [{" Profile Module", prof_mod}]},
- {mbutte,emenu, " Edoc", [separator]},
- {mbutta,amenu, " Analyze ", [separator]},
- {mbuttb,bmenu, " Benchmark ", [separator]},
- {mbuttj,jmenu, " Jit ", [separator]}]),
- ok.
-
-create_menuitems(Parent, [{Text,Data}|Rest]) ->
- gs:menuitem(Parent, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}},
- {label, {text, Text}},
- {data, Data},
- {underline, 1}
- ]),
- create_menuitems(Parent, Rest);
-create_menuitems(Parent, [separator|Rest]) ->
- gs:menuitem(Parent, [{itemtype, separator}]),
- create_menuitems(Parent, Rest);
-create_menuitems(_, []) -> ok.
-
-create_sub_menus([{Parent, Name, Text, Items}|Rest]) ->
- BG = {bg, ?DEFAULT_BG_COLOR},
- FG = {fg, {178, 34, 34}}, % firebrick
- Label = {label, {text, Text}},
- gs:menubutton(Parent, menubar, [BG, FG, Label, {underline, 1}]),
- gs:menu(Name, Parent, [BG, FG]),
- create_menuitems(Name, Items),
- create_sub_menus(Rest);
-create_sub_menus([]) -> ok.
-
-create_labels([{Name,Y,Text}|Rest], Xpos) ->
- gs:label(Name, win, [{width, (?WINDOW_WIDTH - 16) div 3},
- {height, 20},
- {x, Xpos + 1 + 3},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, ?NORMAL_FG_COLOR},
- {font, ?HEADER_FONT},
- {align, w},
- {label, {text, Text}}
- ]),
- create_labels(Rest,Xpos);
-create_labels([],_) -> ok.
-
--spec update_code_listbox(#state{}) -> #state{}.
-
-update_code_listbox(State) ->
- Mods = lists:sort(mods()),
- case State#state.win_created of
- false ->
- State;
- true ->
- case Mods =:= State#state.mods of
- true -> State;
- false ->
- update_text(mods,
- "Loaded Modules ("++
- integer_to_list(length(Mods))++")"),
- catch gs:config(code_listbox, [{data, Mods},
- {items, Mods},
- {selection, 0}]),
- update_module_box(State#state{mods = Mods}, 0, Mods, "")
- end
- end.
-
--spec update_fun(#state{}, integer(), [mfa()]) -> #state{}.
-
-update_fun(State, Idx, Data) ->
- case State#state.win_created of
- false ->
- State;
- true ->
- MFA = {M,F,A} = get_selection(Idx, Data, {?MODULE,start,0}),
- update_text(function, "Function: "++mfa_to_string(MFA)),
- case in_native(F, A, native_code(M)) of
- true -> update_text(nativefun, "Native");
- false -> update_text(nativefun, "Emulated")
- end,
- State
- end.
-
-get_selection(Idx, Data, Default) ->
- try lists:nth(Idx+1, Data) catch _:_ -> Default end.
-
--spec update_module_box(#state{}, integer(), [atom()], string()) -> #state{}.
-
-update_module_box(State, Idx, Data, _Txt) ->
- case State#state.win_created of
- false ->
- State;
- true ->
- Mod = get_selection(Idx, Data, hipe_tool),
- %% io:format("~w\n", [Mod:module_info()]),
- Info = Mod:module_info(),
- Funs = lists:usort(funs(Mod)),
- MFAs = mfas(Mod, Funs),
- ModText = atom_to_list(Mod),
- update_text(mod, "Module:"++ModText),
- update_text(compmod, "Compile\nModule\n"++ModText),
- Options = get_compile(Info),
- update_text(ver, get_version(Options)),
- update_text(time, get_time(Options)),
- NativeCode = native_code(Mod),
-
- Prof = is_profiled(Mod),
- if Prof -> update_text(prof, "Turn off\nProfiling");
- true -> update_text(prof, "Profile\n"++ModText)
- end,
-
- Mode = get_mode(Funs, NativeCode),
-
- update_text(native, Mode),
- Items = fun_names(Mod, Funs, NativeCode, Prof),
-
- Selection = {selection, 0},
- catch gs:config(module_listbox, [{data, MFAs},
- {items, Items},
- Selection]),
- ProfData = [mfa_to_string(element(1, X)) ++ " " ++
- integer_to_list(element(2,X))
- || X <- hipe_profile:res(), element(2, X) > 0],
- catch gs:config(profile_listbox, [{data, ProfData},
- {items, ProfData},
- Selection]),
- get_edoc(Mod),
- update_fun(State#state{mindex = Idx, mod = Mod, funs = Funs}, 0, MFAs)
- end.
-
-update_text(Lab, Text) ->
- catch gs:config(Lab, [{label, {text, Text}}]).
-
-%%---------------------------------------------------------------------
-%% @doc Returns a list of all loaded modules.
-%%---------------------------------------------------------------------
-
--spec mods() -> [atom()].
-
-mods() ->
- [Mod || {Mod,_File} <- code:all_loaded()].
-
--spec funs(module()) -> [fa()].
-
-funs(Mod) ->
- Mod:module_info(functions).
-
--spec native_code(module()) -> [fa_address()].
-
-native_code(Mod) ->
- Mod:module_info(native_addresses).
-
--spec mfas(atom(), [fa()]) -> [mfa()].
-
-mfas(Mod, Funs) ->
- [{Mod,F,A} || {F,A} <- Funs].
-
--spec fun_names(atom(), [fa()], [fa_address()], boolean()) -> [string()].
-
-fun_names(M, Funs, NativeCode, Prof) ->
- [atom_to_list(F) ++ "/" ++ integer_to_list(A)
- ++
- (case in_native(F, A, NativeCode) of
- true -> " [native] ";
- false -> ""
- end)
- ++
- if Prof ->
- (catch integer_to_list(hipe_bifs:call_count_get({M,F,A})));
- true -> ""
- end
- || {F,A} <- Funs].
-
--spec in_native(atom(), arity(), [fa_address()]) -> boolean().
-
-in_native(F, A, NativeCode) ->
- lists:any(fun({Fun,Arity,_}) ->
- (Fun =:= F andalso Arity =:= A)
- end,
- NativeCode).
-
--spec mfa_to_string(mfa()) -> [char(),...].
-
-mfa_to_string({M,F,A}) ->
- atom_to_list(M) ++ ":" ++ atom_to_list(F) ++ "/" ++ integer_to_list(A).
-
-get_mode(Funs, NativeCode) ->
- case NativeCode of
- [] -> "Emulated";
- InNative when is_list(InNative) ->
- if length(InNative) =:= length(Funs) ->
- "Native";
- true -> "Mixed"
- end
- end.
-
-get_time(Comp) ->
- case lists:keyfind(time, 1, Comp) of
- {_, {Y,Month,D,H,Min,S}} ->
- integer_to_list(Y) ++
- "-" ++ integer_to_list(Month) ++
- "-" ++ integer_to_list(D) ++ " " ++
- integer_to_list(H) ++ ":" ++ integer_to_list(Min) ++
- ":" ++ integer_to_list(S);
- false -> ""
- end.
-
-get_version(Comp) ->
- case lists:keyfind(version, 1, Comp) of
- {_, V} when is_list(V) -> V;
- false -> ""
- end.
-
-get_cwd(Options) ->
- case lists:keyfind(cwd, 1, Options) of
- {_, V} when is_atom(V) -> atom_to_list(V);
- {_, V} -> V;
- false -> ""
- end.
-
-get_options(Comp) ->
- case lists:keyfind(options, 1, Comp) of
- {_, V} when is_list(V) -> V;
- false -> ""
- end.
-
-get_compile(Info) ->
- case lists:keyfind(compile, 1, Info) of
- {_, O} when is_list(O) -> O;
- false -> []
- end.
-
--spec is_profiled(atom()) -> boolean().
-
-is_profiled(Mod) ->
- case hipe_bifs:call_count_get({Mod,module_info,0}) of
- false -> false;
- C when is_integer(C) -> true
- end.
-
--spec compile(#state{}) -> #state{}.
-
-compile(State) ->
- catch gs:config(compmod, [{enable, false}]),
- update_text(compiling, "Compiling..."),
- Parent = self(),
- P = spawn(fun() -> c(Parent, State#state.mod, State#state.options) end),
- State#state{compiling = P}.
-
--spec c(pid(), atom(), comp_options()) -> 'ok'.
-
-c(Parent, Mod, Options) ->
- Res = hipe:c(Mod, Options),
- Parent ! {compilation_done,Res,self()},
- ok.
-
-get_edoc(Mod) ->
- Info = Mod:module_info(),
- Comp = get_compile(Info),
- Options = get_options(Comp),
- Dir = get_cwd(Options),
- File =
- case Dir of
- "" -> atom_to_list(Mod) ++ ".erl";
- _ -> Dir ++"/" ++ atom_to_list(Mod) ++ ".erl"
- end,
- %% io:format("Get ~s\n", [File]),
- Text = try edoc(File, [{xml_export,xmerl_text}, no_output])
- catch _:_ -> "error"
- end,
- gs:config(edoc, {enable, true}),
- gs:config(edoc, clear),
- gs:config(edoc, {insert, {insert, Text}}),
- gs:config(edoc, {enable, false}),
- ok.
-
-edoc(Name, Opts) ->
- Doc = edoc:get_doc(Name, Opts),
- %% Comments = edoc:read_comments(Name, Opts),
- %% Text = edoc:forms(Forms, Comments, Name, Opts),
- edoc:layout(Doc, Opts),
- ok.
diff --git a/lib/hipe/util/hipe_digraph.erl b/lib/hipe/util/hipe_digraph.erl
index fcfaa64684..01b1f8c77c 100644
--- a/lib/hipe/util/hipe_digraph.erl
+++ b/lib/hipe/util/hipe_digraph.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,10 +36,10 @@
-type ordset(T) :: [T]. % XXX: temporarily
--record(hipe_digraph, {edges = dict:new() :: dict(),
- rev_edges = dict:new() :: dict(),
+-record(hipe_digraph, {edges = dict:new() :: dict:dict(),
+ rev_edges = dict:new() :: dict:dict(),
leaves = ordsets:new() :: ordset(_), % ???
- nodes = sets:new() :: set()}).
+ nodes = sets:new() :: sets:set()}).
-opaque hdg() :: #hipe_digraph{}.
diff --git a/lib/hipe/util/hipe_dot.erl b/lib/hipe/util/hipe_dot.erl
index e4a47ae0c4..94f7fd60cc 100644
--- a/lib/hipe/util/hipe_dot.erl
+++ b/lib/hipe/util/hipe_dot.erl
@@ -2,7 +2,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%%
%%% The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
@@ -70,13 +70,13 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec translate_digraph(digraph(), string(), string()) -> 'ok'.
+-spec translate_digraph(digraph:graph(), string(), string()) -> 'ok'.
translate_digraph(G, FileName, GName) ->
translate_digraph(G, FileName, GName,
fun(X) -> io_lib:format("~p", [X]) end, []).
--spec translate_digraph(digraph(), string(), string(),
+-spec translate_digraph(digraph:graph(), string(), string(),
fun((_) -> string()), [_]) -> 'ok'.
translate_digraph(G, FileName, GName, Fun, Opts) ->
diff --git a/lib/hipe/util/hipe_vectors.hrl b/lib/hipe/util/hipe_vectors.hrl
index 043faf4c91..5e24db238d 100644
--- a/lib/hipe/util/hipe_vectors.hrl
+++ b/lib/hipe/util/hipe_vectors.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,5 +24,5 @@
-endif.
-ifdef(USE_GBTREES).
--type hipe_vector() :: gb_tree().
+-type hipe_vector() :: gb_trees:tree().
-endif.
diff --git a/lib/hipe/vsn.mk b/lib/hipe/vsn.mk
index ed4b4dc8d2..60b4e0559b 100644
--- a/lib/hipe/vsn.mk
+++ b/lib/hipe/vsn.mk
@@ -1 +1 @@
-HIPE_VSN = 3.10.2.2
+HIPE_VSN = 3.11.3
diff --git a/lib/hipe/x86/hipe_rtl_to_x86.erl b/lib/hipe/x86/hipe_rtl_to_x86.erl
index d77e4fed3b..36da2f4d44 100644
--- a/lib/hipe/x86/hipe_rtl_to_x86.erl
+++ b/lib/hipe/x86/hipe_rtl_to_x86.erl
@@ -236,7 +236,7 @@ conv_insn(I, Map, Data) ->
#fconv{} ->
{Dst, Map0} = conv_dst(hipe_rtl:fconv_dst(I), Map),
{[], Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map0),
- I2 = [hipe_x86:mk_fmove(Src, Dst)],
+ I2 = conv_fconv(Dst, Src),
{I2, Map1, Data};
X ->
%% gctest??
@@ -712,6 +712,19 @@ vmap_lookup(Map, Key) ->
vmap_bind(Map, Key, Val) ->
gb_trees:insert(Key, Val, Map).
+%%% Finalise the conversion of an Integer-to-Float operation.
+
+conv_fconv(Dst, Src) ->
+ case hipe_x86:is_imm(Src) of
+ false ->
+ [hipe_x86:mk_fmove(Src, Dst)];
+ true ->
+ %% cvtsi2sd does not allow src to be an immediate
+ Tmp = new_untagged_temp(),
+ [hipe_x86:mk_move(Src, Tmp),
+ hipe_x86:mk_fmove(Tmp, Dst)]
+ end.
+
%%% Finalise the conversion of a 2-address FP operation.
conv_fp_unary(Dst, Src, FpUnOp) ->
diff --git a/lib/hipe/x86/hipe_x86_assemble.erl b/lib/hipe/x86/hipe_x86_assemble.erl
index 7878c7219d..3f756769c4 100644
--- a/lib/hipe/x86/hipe_x86_assemble.erl
+++ b/lib/hipe/x86/hipe_x86_assemble.erl
@@ -21,7 +21,6 @@
%%%
%%% TODO:
%%% - Simplify combine_label_maps and mk_data_relocs.
-%%% - Move find_const to hipe_pack_constants?
-ifdef(HIPE_AMD64).
-define(HIPE_X86_ASSEMBLE, hipe_amd64_assemble).
@@ -80,8 +79,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
%% ?debug_msg("Constants are ~w bytes\n",[ConstSize])),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -442,7 +441,7 @@ translate_imm(#x86_imm{value=Imm}, Context, MayTrunc8) ->
case Imm of
{Label,constant} ->
{MFA,ConstMap} = Context,
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{constant,ConstNo};
{Label,closure} ->
{closure,Label};
@@ -712,7 +711,7 @@ resolve_jmp_switch_arg(I, _Context) ->
{rm64,hipe_amd64_encode:rm_mem(EA)}.
-else.
resolve_jmp_switch_arg(I, {MFA,ConstMap}) ->
- ConstNo = find_const({MFA,hipe_x86:jmp_switch_jtab(I)}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,hipe_x86:jmp_switch_jtab(I)}, ConstMap),
Disp32 = {?LOAD_ADDRESS,{constant,ConstNo}},
SINDEX = ?HIPE_X86_ENCODE:sindex(2, hipe_x86:temp_reg(hipe_x86:jmp_switch_temp(I))),
EA = ?HIPE_X86_ENCODE:ea_disp32_sindex(Disp32, SINDEX), % this creates a SIB implicitly
@@ -932,37 +931,6 @@ resolve_x87_binop_args(Src=#x86_fpreg{}, Dst=#x86_fpreg{})->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({MFA,L},LabelMap) ->
- gb_trees:get({MFA,L}, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -1001,14 +969,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/hipe/x86/hipe_x86_postpass.erl b/lib/hipe/x86/hipe_x86_postpass.erl
index c0918c4f89..a95a8745ba 100644
--- a/lib/hipe/x86/hipe_x86_postpass.erl
+++ b/lib/hipe/x86/hipe_x86_postpass.erl
@@ -1,8 +1,8 @@
-%%% -*- coding: utf-8; erlang-indent-level: 2 -*-
+%%% -*- erlang-indent-level: 2 -*-
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
%%%
%%% The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/ic/c_src/oe_ei_encode_pid.c b/lib/ic/c_src/oe_ei_encode_pid.c
index b7083f84a0..609f441cf8 100644
--- a/lib/ic/c_src/oe_ei_encode_pid.c
+++ b/lib/ic/c_src/oe_ei_encode_pid.c
@@ -23,7 +23,7 @@
int oe_ei_encode_pid(CORBA_Environment *ev, const erlang_pid *p) {
int size = ev->_iout;
- (int) ei_encode_pid(NULL, &size, p);
+ ei_encode_pid(NULL, &size, p);
if (size >= ev->_outbufsz) {
char *buf = ev->_outbuf;
diff --git a/lib/ic/doc/src/CORBA_Environment_alloc.xml b/lib/ic/doc/src/CORBA_Environment_alloc.xml
index 909379d6dc..ee76739a10 100644
--- a/lib/ic/doc/src/CORBA_Environment_alloc.xml
+++ b/lib/ic/doc/src/CORBA_Environment_alloc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/book.xml b/lib/ic/doc/src/book.xml
index f83bb1c632..066c1d8150 100644
--- a/lib/ic/doc/src/book.xml
+++ b/lib/ic/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/c-part.xml b/lib/ic/doc/src/c-part.xml
index cef4399960..967f17858b 100644
--- a/lib/ic/doc/src/c-part.xml
+++ b/lib/ic/doc/src/c-part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_basic_idl.xml b/lib/ic/doc/src/ch_basic_idl.xml
index d993fa3594..986052bf16 100644
--- a/lib/ic/doc/src/ch_basic_idl.xml
+++ b/lib/ic/doc/src/ch_basic_idl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_c_client.xml b/lib/ic/doc/src/ch_c_client.xml
index 7d4f8ec91a..bbdf502b32 100644
--- a/lib/ic/doc/src/ch_c_client.xml
+++ b/lib/ic/doc/src/ch_c_client.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_c_corba_env.xml b/lib/ic/doc/src/ch_c_corba_env.xml
index bd4b52ca34..69ce0e5e0e 100644
--- a/lib/ic/doc/src/ch_c_corba_env.xml
+++ b/lib/ic/doc/src/ch_c_corba_env.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_c_mapping.xml b/lib/ic/doc/src/ch_c_mapping.xml
index 23a9361c2c..59ab4d9817 100644
--- a/lib/ic/doc/src/ch_c_mapping.xml
+++ b/lib/ic/doc/src/ch_c_mapping.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2010</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_c_server.xml b/lib/ic/doc/src/ch_c_server.xml
index c66ae85fa3..8c64b87dcc 100644
--- a/lib/ic/doc/src/ch_c_server.xml
+++ b/lib/ic/doc/src/ch_c_server.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_erl_genserv.xml b/lib/ic/doc/src/ch_erl_genserv.xml
index 055b751ba1..34de3d64dd 100644
--- a/lib/ic/doc/src/ch_erl_genserv.xml
+++ b/lib/ic/doc/src/ch_erl_genserv.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_erl_plain.xml b/lib/ic/doc/src/ch_erl_plain.xml
index 1d6f84b5ea..0744cb99d1 100644
--- a/lib/ic/doc/src/ch_erl_plain.xml
+++ b/lib/ic/doc/src/ch_erl_plain.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_ic_protocol.xml b/lib/ic/doc/src/ch_ic_protocol.xml
index 68a01a6a46..465e397880 100644
--- a/lib/ic/doc/src/ch_ic_protocol.xml
+++ b/lib/ic/doc/src/ch_ic_protocol.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_introduction.xml b/lib/ic/doc/src/ch_introduction.xml
index 898d2a732a..f2ed61c4ed 100644
--- a/lib/ic/doc/src/ch_introduction.xml
+++ b/lib/ic/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ch_java.xml b/lib/ic/doc/src/ch_java.xml
index a189daa44b..4ee61ddf19 100644
--- a/lib/ic/doc/src/ch_java.xml
+++ b/lib/ic/doc/src/ch_java.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/erl-part.xml b/lib/ic/doc/src/erl-part.xml
index 8dd7001436..470f936ae4 100644
--- a/lib/ic/doc/src/erl-part.xml
+++ b/lib/ic/doc/src/erl-part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/fascicules.xml b/lib/ic/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/ic/doc/src/fascicules.xml
+++ b/lib/ic/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/ic/doc/src/ic.xml b/lib/ic/doc/src/ic.xml
index b743736a66..b11206257f 100644
--- a/lib/ic/doc/src/ic.xml
+++ b/lib/ic/doc/src/ic.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ic_c_protocol.xml b/lib/ic/doc/src/ic_c_protocol.xml
index 26862addf9..460fcdec0d 100644
--- a/lib/ic/doc/src/ic_c_protocol.xml
+++ b/lib/ic/doc/src/ic_c_protocol.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ic_clib.xml b/lib/ic/doc/src/ic_clib.xml
index ebeaabae91..8ac783e5b2 100644
--- a/lib/ic/doc/src/ic_clib.xml
+++ b/lib/ic/doc/src/ic_clib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/java-part.xml b/lib/ic/doc/src/java-part.xml
index ab4049ee2a..69a8e4b55b 100644
--- a/lib/ic/doc/src/java-part.xml
+++ b/lib/ic/doc/src/java-part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml
index 231573e82e..bacac09f11 100644
--- a/lib/ic/doc/src/notes.xml
+++ b/lib/ic/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,7 +30,38 @@
<file>notes.xml</file>
</header>
- <section><title>IC 4.3.4</title>
+ <section><title>IC 4.3.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix compiler warnings reported by LLVM</p>
+ <p>
+ Own Id: OTP-12138</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>IC 4.3.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Added Latin-1 code directive in the generated files
+ to keep old behaviour. Updated IC so it can handle
+ Unicode characters in the path. </p>
+ <p>
+ Own Id: OTP-11783</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>IC 4.3.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/ic/doc/src/part.xml b/lib/ic/doc/src/part.xml
index 376a0b3455..891fc8a7e2 100644
--- a/lib/ic/doc/src/part.xml
+++ b/lib/ic/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/part_notes.xml b/lib/ic/doc/src/part_notes.xml
index 0aac643c7d..e8ddbd3879 100644
--- a/lib/ic/doc/src/part_notes.xml
+++ b/lib/ic/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/doc/src/ref_man.xml b/lib/ic/doc/src/ref_man.xml
index 153b25c609..a43750d495 100644
--- a/lib/ic/doc/src/ref_man.xml
+++ b/lib/ic/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ic/src/ic.app.src b/lib/ic/src/ic.app.src
index 29aa6def00..7dd47ac9c6 100644
--- a/lib/ic/src/ic.app.src
+++ b/lib/ic/src/ic.app.src
@@ -46,7 +46,8 @@
{registered, []},
{applications, [stdlib, kernel]},
{env, []},
- {mod, {ic, []}}
+ {mod, {ic, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/ic/src/ic.erl b/lib/ic/src/ic.erl
index c0742cf7bd..4f3e8d180c 100644
--- a/lib/ic/src/ic.erl
+++ b/lib/ic/src/ic.erl
@@ -250,7 +250,7 @@ make_erl_options(Opts) ->
Optimize = Opts#options.optimize,
PreProc =
lists:flatten(
- lists:map(fun(D) -> io_lib:format("-I\"~s\" ", [ic_util:to_list(D)]) end,
+ lists:map(fun(D) -> io_lib:format("-I\"~ts\" ", [ic_util:to_list(D)]) end,
Includes1)++
lists:map(
fun ({Name, Value}) ->
diff --git a/lib/ic/src/ic_codegen.erl b/lib/ic/src/ic_codegen.erl
index f611c69bea..82431b79a2 100644
--- a/lib/ic/src/ic_codegen.erl
+++ b/lib/ic/src/ic_codegen.erl
@@ -216,12 +216,14 @@ exp_to_string({F,N}) -> io_lib:format("~p/~p", [ic_util:to_atom(F), N]).
%%--------------------------------------------------------------------
emit_stub_head(_G, ignore, _Name, _) -> ignore;
emit_stub_head(G, F1, Name, erlang) ->
+ comment(F1, " coding: latin-1", []),
mcomment(F1, stub_header(G, Name)),
nl(F1),
emit(F1, "-module(~p).\n", [list_to_atom(Name)]),
emit(F1, "-ic_compiled(~p).\n", [compiler_vsn(?COMPILERVSN)]),
emit(F1, "\n\n"), F1;
emit_stub_head(G, F1, Name, erlang_template) ->
+ comment(F1, " coding: latin-1", []),
ic_erl_template:emit_header(G, F1, Name),
F1;
emit_stub_head(_G, F1, _Name, erlang_template_no_gen) ->
@@ -259,6 +261,7 @@ compiler_vsn(Vsn) ->
%% Name is Fully scoped (undescore) name of interface or module
emit_hrl_head(_G, ignore, _Name, _) -> ignore;
emit_hrl_head(G, Fd, Name, erlang) ->
+ comment(Fd, " coding: latin-1", []),
mcomment(Fd, ["Erlang header file" |
hrl_header(G, Name)]),
nl(Fd),
diff --git a/lib/ic/src/ic_pp.erl b/lib/ic/src/ic_pp.erl
index 54701f7438..e54304ebaa 100644
--- a/lib/ic/src/ic_pp.erl
+++ b/lib/ic/src/ic_pp.erl
@@ -257,15 +257,15 @@ run_include(FileName, FileList, _Out, Defs, Err, War, IncLine, IncFile, IncDir,
tokenise(File, FileName) ->
{Result, _L} = token(File, 2, [], not_set, 0),
- FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 ~p~n",[FileName]))),
+ FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 \"~ts\"~n",[FileName]))),
FileInfoStart = {file_info, FI_start},
[FileInfoStart | Result].
tokenise(File, FileName, IncLine, PrevFile) ->
{Result, _L} = token(File, 2, [], not_set, 0),
- FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 ~p 1~n",[FileName]))),
+ FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 \"~ts\" 1~n",[FileName]))),
FileInfoStart = {file_info, FI_start},
- FI_end = lists:reverse(lists:flatten(io_lib:format("# ~p ~p 2~n~n",[IncLine-1,PrevFile]))),
+ FI_end = lists:reverse(lists:flatten(io_lib:format("# ~p \"~ts\" 2~n~n",[IncLine-1,PrevFile]))),
FileInfoEnd = [{file_info, FI_end}],
{Result, FileInfoStart, FileInfoEnd}.
% [FileInfoStart | Result] ++ FileInfoEnd.
@@ -1942,7 +1942,7 @@ read_inc_file(FileName, IncDir, Mio) ->
FileList = binary_to_list(Bin),
{ok, AbsFile, FileList};
{error, Text} ->
- {error, Text}
+ {error, Text}
end;
true ->
skip
diff --git a/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
index f3e6fdb67e..8073e3c97d 100644
--- a/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_SUITE_data/Makefile.src
@@ -37,11 +37,11 @@
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
-IC_LIB = @ic_libpath@@DS@@ic_lib@
+IC_LIB = @ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
-ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
-ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
+ERL_INTERFACE_LIB = @erl_interface_lib@
+ERL_INTERFACE_EILIB = @erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
index 0818be01a6..bd8b2a0972 100644
--- a/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_proto_SUITE_data/Makefile.src
@@ -37,11 +37,11 @@
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
-IC_LIB = @ic_libpath@@DS@@ic_lib@
+IC_LIB = @ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
-ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
-ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
+ERL_INTERFACE_LIB = @erl_interface_lib@
+ERL_INTERFACE_EILIB = @erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
index 07b353bc0a..746991b17f 100644
--- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
+++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/Makefile.src
@@ -37,11 +37,11 @@
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
-IC_LIB = @ic_libpath@@DS@@ic_lib@
+IC_LIB = @ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
-ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
-ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
+ERL_INTERFACE_LIB = @erl_interface_lib@
+ERL_INTERFACE_EILIB = @erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
diff --git a/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src b/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
index e190295d70..997d7a4cdc 100644
--- a/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
+++ b/lib/ic/test/erl_client_c_server_SUITE_data/Makefile.src
@@ -37,11 +37,11 @@
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
-IC_LIB = @ic_libpath@@DS@@ic_lib@
+IC_LIB = @ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
-ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
-ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
+ERL_INTERFACE_LIB = @erl_interface_lib@
+ERL_INTERFACE_EILIB = @erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src b/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
index 86917950c9..1213944383 100644
--- a/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
+++ b/lib/ic/test/erl_client_c_server_proto_SUITE_data/Makefile.src
@@ -37,11 +37,11 @@
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
-IC_LIB = @ic_libpath@@DS@@ic_lib@
+IC_LIB = @ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
-ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
-ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
+ERL_INTERFACE_LIB = @erl_interface_lib@
+ERL_INTERFACE_EILIB = @erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
diff --git a/lib/ic/test/java_client_erl_server_SUITE.erl b/lib/ic/test/java_client_erl_server_SUITE.erl
index 9e49305c3c..cbcf32515e 100644
--- a/lib/ic/test/java_client_erl_server_SUITE.erl
+++ b/lib/ic/test/java_client_erl_server_SUITE.erl
@@ -288,7 +288,7 @@ classpath(Dir) ->
cmd(Cmd) ->
PortOpts = [{line,80},eof,exit_status,stderr_to_stdout],
- io:format("<cmd> ~s~n", [Cmd]),
+ io:format("<cmd> ~ts~n", [Cmd]),
case catch open_port({spawn,Cmd}, PortOpts) of
Port when is_port(Port) ->
Result = cmd_loop(Port, []),
diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk
index fe27d095d3..bb273c7b57 100644
--- a/lib/ic/vsn.mk
+++ b/lib/ic/vsn.mk
@@ -1 +1 @@
-IC_VSN = 4.3.4
+IC_VSN = 4.3.6
diff --git a/lib/inets/doc/src/Makefile b/lib/inets/doc/src/Makefile
index 1a8e1c7ca8..961bfa838d 100644
--- a/lib/inets/doc/src/Makefile
+++ b/lib/inets/doc/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
+# Copyright Ericsson AB 1997-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -52,6 +52,7 @@ XML_REF3_FILES = \
httpc.xml\
httpd.xml \
httpd_conf.xml \
+ httpd_custom_api.xml \
httpd_socket.xml \
httpd_util.xml \
mod_alias.xml \
diff --git a/lib/inets/doc/src/book.xml b/lib/inets/doc/src/book.xml
index 51cbb2d963..eca0c319ef 100644
--- a/lib/inets/doc/src/book.xml
+++ b/lib/inets/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/fascicules.xml b/lib/inets/doc/src/fascicules.xml
index ea3b988882..c075478967 100644
--- a/lib/inets/doc/src/fascicules.xml
+++ b/lib/inets/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/inets/doc/src/ftp.xml b/lib/inets/doc/src/ftp.xml
index 4d559817c4..0cd75ff645 100644
--- a/lib/inets/doc/src/ftp.xml
+++ b/lib/inets/doc/src/ftp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/ftp_client.xml b/lib/inets/doc/src/ftp_client.xml
index b44674d997..e46b354e45 100644
--- a/lib/inets/doc/src/ftp_client.xml
+++ b/lib/inets/doc/src/ftp_client.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/http_client.xml b/lib/inets/doc/src/http_client.xml
index 4542211d71..1c7f76ec28 100644
--- a/lib/inets/doc/src/http_client.xml
+++ b/lib/inets/doc/src/http_client.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2010</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml
index f29b505bc7..e3b763b4f3 100644
--- a/lib/inets/doc/src/http_server.xml
+++ b/lib/inets/doc/src/http_server.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/http_uri.xml b/lib/inets/doc/src/http_uri.xml
index d9e8587bbf..acbd79b201 100644
--- a/lib/inets/doc/src/http_uri.xml
+++ b/lib/inets/doc/src/http_uri.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -63,6 +63,7 @@ host() = string()
port() = pos_integer()
path() = string() - Representing a file path or directory path
query() = string()
+fragment() = string()
]]></code>
<marker id="scheme_defaults"></marker>
@@ -92,13 +93,16 @@ query() = string()
<v>URI = uri() </v>
<v>Options = [Option] </v>
<v>Option = {ipv6_host_with_brackets, boolean()} |
- {scheme_defaults, scheme_defaults()}]</v>
- <v>Result = {Scheme, UserInfo, Host, Port, Path, Query}</v>
+ {scheme_defaults, scheme_defaults()} |
+ {fragment, boolean()}]</v>
+ <v>Result = {Scheme, UserInfo, Host, Port, Path, Query} |
+ {Scheme, UserInfo, Host, Port, Path, Query, Fragment}</v>
<v>UserInfo = user_info()</v>
<v>Host = host()</v>
<v>Port = pos_integer()</v>
<v>Path = path()</v>
<v>Query = query()</v>
+ <v>Fragment = fragment()</v>
<v>Reason = term() </v>
</type>
<desc>
@@ -111,6 +115,9 @@ query() = string()
a scheme not found in the scheme defaults) a port number must be
provided or else the parsing will fail. </p>
+ <p>If the fragment option is true, the URI fragment will be returned as
+ part of the parsing result, otherwise it is completely ignored.</p>
+
<marker id="encode"></marker>
</desc>
</func>
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml
index db68cc3116..4178cb7d4c 100644
--- a/lib/inets/doc/src/httpc.xml
+++ b/lib/inets/doc/src/httpc.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -302,7 +302,7 @@ filename() = string()
will be sent to that process: <c>{http, {RequestId,
stream_start, Headers}}, {http, {RequestId, stream,
BinBodyPart}}, {http, {RequestId, stream_end, Headers}}</c>. When
- streaming to to the calling processes using the option
+ streaming to the calling processes using the option
<c>{self, once}</c> the first message will have an additional
element e.i. <c>{http, {RequestId, stream_start, Headers, Pid}}</c>,
this is the process id that should be used as an argument to
@@ -332,7 +332,7 @@ filename() = string()
<p>Defaults to <c>true</c>. </p>
</item>
- <tag><c><![CDATA[header_as_is]]></c></tag>
+ <tag><c><![CDATA[headers_as_is]]></c></tag>
<item>
<p>Shall the headers provided by the user be made
lower case or be regarded as case sensitive. </p>
@@ -387,7 +387,7 @@ Receiver(ReplyInfo)
</pre>
</item>
- <tag><c><![CDATA[{Module, Funcion, Args}]]></c></tag>
+ <tag><c><![CDATA[{Module, Function, Args}]]></c></tag>
<item>
<p>Information will be delivered to the receiver via calls
to the callback function: </p>
diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml
index 4210aea3ec..435f99ee23 100644
--- a/lib/inets/doc/src/httpd.xml
+++ b/lib/inets/doc/src/httpd.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -139,7 +139,7 @@
<marker id="prop_server_root"></marker>
<tag>{server_root, path()} </tag>
<item>
- <p>Defines the servers home directory where log files etc can
+ <p>Defines the server's home directory where log files etc can
be stored. Relative paths specified in other properties refer
to this directory. </p>
</item>
@@ -204,7 +204,15 @@
<marker id="props_limit"></marker>
<p><em>Limit properties</em> </p>
- <taglist>
+ <taglist>
+
+ <marker id="prop_customize"></marker>
+ <tag>{customize, atom()}</tag>
+ <item>
+ <p>A callback module to customize the inets HTTP servers behaviour
+ see <seealso marker="http_custom_api"> httpd_custom_api</seealso> </p>
+ </item>
+
<marker id="prop_disable_chunked_encoding"></marker>
<tag>{disable_chunked_transfer_encoding_send, boolean()}</tag>
<item>
@@ -249,7 +257,16 @@
<p>Limits the size of the message header of HTTP request.
Defaults to 10240. </p>
</item>
-
+
+ <marker id="prop_max_content_length"></marker>
+ <tag>{max_content_length, integer()}</tag>
+ <item>
+ <p>Maximum Content-Length in an incoming request, in bytes. Requests
+ with content larger than this are answered with Status 413.
+ Defaults to 100000000 (100 MB).
+ </p>
+ </item>
+
<marker id="prop_max_uri"></marker>
<tag>{max_uri_size, integer()}</tag>
<item>
@@ -306,7 +323,7 @@ text/plain asc txt
</item>
<marker id="prop_server_tokens"></marker>
- <tag>{server_tokens, prod|major|minor|minimal|os|full|{private, string()}}</tag>
+ <tag>{server_tokens, none|prod|major|minor|minimal|os|full|{private, string()}}</tag>
<item>
<p>ServerTokens defines how the value of the server header
should look. </p>
@@ -314,6 +331,7 @@ text/plain asc txt
here is what the server header string could look like for
the different values of server-tokens: </p>
<pre>
+none "" % A Server: header will not be generated
prod "inets"
major "inets/5"
minor "inets/5.8"
@@ -904,7 +922,7 @@ bytes
<p>Fetches information about the HTTP server. When called
with only the pid all properties are fetched, when called
with a list of specific properties they are fetched.
- Available properties are the same as the servers start options.
+ Available properties are the same as the server's start options.
</p>
<note><p>Pid is the pid returned from inets:start/[2,3].
@@ -930,7 +948,7 @@ bytes
<p>Fetches information about the HTTP server. When called with
only the Address and Port all properties are fetched, when
called with a list of specific properties they are fetched.
- Available properties are the same as the servers start
+ Available properties are the same as the server's start
options.
</p>
@@ -956,7 +974,7 @@ bytes
server. Incoming requests will be answered with a temporary
down message during the time the it takes to reload.</p>
- <note><p>Available properties are the same as the servers
+ <note><p>Available properties are the same as the server's
start options, although the properties bind_address and
port can not be changed.</p></note>
@@ -1068,7 +1086,7 @@ bytes
<type>
<v>OldData = list()</v>
<v>NewData = [{response,{StatusCode,Body}}] | [{response,{response,Head,Body}}] | [{response,{already_sent,Statuscode,Size}}] </v>
- <v>StausCode = integer()</v>
+ <v>StatusCode = integer()</v>
<v>Body = io_list() | nobody | {Fun, Arg}</v>
<v>Head = [HeaderOption]</v>
<v>HeaderOption = {Option, Value} | {code, StatusCode}</v>
diff --git a/lib/inets/doc/src/httpd_conf.xml b/lib/inets/doc/src/httpd_conf.xml
index fc34f14ec3..60fc2f135e 100644
--- a/lib/inets/doc/src/httpd_conf.xml
+++ b/lib/inets/doc/src/httpd_conf.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -97,7 +97,7 @@
<v>FilePath = string()</v>
<v>Result = {ok,Directory} | {error,Reason}</v>
<v>Directory = string()</v>
- <v>Reason = string() | enoent | eaccess | enotdir | FileInfo</v>
+ <v>Reason = string() | enoent | eacces | enotdir | FileInfo</v>
<v>FileInfo = File info record</v>
</type>
<desc>
@@ -105,7 +105,7 @@
<p><c>is_directory/1</c> checks if <c>FilePath</c> is a
directory in which case it is returned. Please read
<c>file(3)</c> for a description of <c>enoent</c>,
- <c>eaccess</c> and <c>enotdir</c>. The definition of
+ <c>eacces</c> and <c>enotdir</c>. The definition of
the file info record can be found by including <c>file.hrl</c>
from the kernel application, see file(3).</p>
@@ -120,14 +120,14 @@
<v>FilePath = string()</v>
<v>Result = {ok,File} | {error,Reason}</v>
<v>File = string()</v>
- <v>Reason = string() | enoent | eaccess | enotdir | FileInfo</v>
+ <v>Reason = string() | enoent | eacces | enotdir | FileInfo</v>
<v>FileInfo = File info record</v>
</type>
<desc>
<marker id="is_file"></marker>
<p><c>is_file/1</c> checks if <c>FilePath</c> is a regular
file in which case it is returned. Read <c>file(3)</c> for a
- description of <c>enoent</c>, <c>eaccess</c> and
+ description of <c>enoent</c>, <c>eacces</c> and
<c>enotdir</c>. The definition of the file info record can be
found by including <c>file.hrl</c> from the kernel application,
see file(3).</p>
diff --git a/lib/inets/doc/src/httpd_custom_api.xml b/lib/inets/doc/src/httpd_custom_api.xml
new file mode 100644
index 0000000000..faf1d277df
--- /dev/null
+++ b/lib/inets/doc/src/httpd_custom_api.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2015</year><year>2015</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>httpd_custom_api</title>
+ <file>httpd_custom_api.xml</file>
+ </header>
+ <module>httpd_custom_api</module>
+ <modulesummary>Behaviour with optional callbacks to customize the inets HTTP server.</modulesummary>
+ <description>
+ <p> The module implementing this behaviour shall be supplied to to the servers
+ configuration with the option <seealso marker="httpd:prop_customize"> customize</seealso></p>
+
+ </description>
+ <funcs>
+ <func>
+ <name>response_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
+ <fsummary>Filter and possible alter HTTP response headers.</fsummary>
+ <type>
+ <v>Header = {HeaderName :: string(), HeaderValue::string()}</v>
+ <d>The header name will be in lower case and should not be altered.</d>
+ </type>
+ <desc>
+ <p> Filter and possible alter HTTP response headers before they are sent to the client.
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name>request_header({HeaderName, HeaderValue}) -> {true, Header} | false </name>
+ <fsummary>Filter and possible alter HTTP request headers.</fsummary>
+ <type>
+ <v>Header = {HeaderName :: string(), HeaderValue::string()}</v>
+ <d>The header name will be in lower case and should not be altered.</d>
+ </type>
+ <desc>
+ <p> Filter and possible alter HTTP request headers before they are processed by the server.
+ </p>
+ </desc>
+ </func>
+ </funcs>
+</erlref>
+
+
diff --git a/lib/inets/doc/src/httpd_socket.xml b/lib/inets/doc/src/httpd_socket.xml
index 58cd2ec575..70b4a4a842 100644
--- a/lib/inets/doc/src/httpd_socket.xml
+++ b/lib/inets/doc/src/httpd_socket.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml
index 9218ee91e2..1236576ca8 100644
--- a/lib/inets/doc/src/httpd_util.xml
+++ b/lib/inets/doc/src/httpd_util.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/inets.xml b/lib/inets/doc/src/inets.xml
index 079f60779d..8c3a677966 100644
--- a/lib/inets/doc/src/inets.xml
+++ b/lib/inets/doc/src/inets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2011</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/inets_services.xml b/lib/inets/doc/src/inets_services.xml
index e282050b12..8cd0794ff2 100644
--- a/lib/inets/doc/src/inets_services.xml
+++ b/lib/inets/doc/src/inets_services.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/mod_alias.xml b/lib/inets/doc/src/mod_alias.xml
index b38be5db28..e4c78a5b15 100644
--- a/lib/inets/doc/src/mod_alias.xml
+++ b/lib/inets/doc/src/mod_alias.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml
index a176242a72..e941b799a1 100644
--- a/lib/inets/doc/src/mod_auth.xml
+++ b/lib/inets/doc/src/mod_auth.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml
index 9906ae0895..5afe5835c7 100644
--- a/lib/inets/doc/src/mod_esi.xml
+++ b/lib/inets/doc/src/mod_esi.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/mod_security.xml b/lib/inets/doc/src/mod_security.xml
index a3c91dca5b..e67111a73d 100644
--- a/lib/inets/doc/src/mod_security.xml
+++ b/lib/inets/doc/src/mod_security.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index f77214c589..f563a8c4b0 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2002</year><year>2013</year>
+ <year>2002</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -32,7 +32,349 @@
<file>notes.xml</file>
</header>
- <section><title>Inets 5.9.8</title>
+ <section><title>Inets 5.10.9</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add behaviour with optional callbacks to customize the
+ inets HTTP server.</p>
+ <p>
+ Own Id: OTP-12776</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Reject messages with a Content-Length less than 0</p>
+ <p>
+ Own Id: OTP-12739 Aux Id: seq12860 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.7</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ New value in <c>server_tokens</c> config for limiting
+ banner grabbing attempts. </p>
+ <p>
+ By setting <c>{server_tokens, none}</c> in
+ <c>ServiceConfig</c> for <c>inets:start(httpd,
+ ServiceConfig)</c>, the "Server:" header will not be set
+ in messages from the server.</p>
+ <p>
+ Own Id: OTP-12661 Aux Id: seq12840 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ inets: parse correctly 'Set-Cookie' header with empty
+ value</p>
+ <p>
+ httpc_cookie should parse cookies with empty values and
+ no attributes set in the 'Set-Cookie' headers.</p>
+ <p>
+ Own Id: OTP-12455</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add parsing of URI fragments to http_uri:parse</p>
+ <p>
+ This fixes a bug in httpc where redirection URIs could
+ lead to bad requests if they contained fragments.</p>
+ <p>
+ Own Id: OTP-12398</p>
+ </item>
+ <item>
+ <p>
+ httpc: http client now ignores invalid set-cookie headers</p>
+ <p>
+ Own Id: OTP-12430</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ mod_alias now handles https-URIs properly</p>
+ <p>
+ Consistent view of configuration parameter
+ keep_alive_timeout, should be presented in the
+ httpd:info/[1,2] function in the same unit as it is
+ inputted.</p>
+ <p>
+ Own Id: OTP-12436 Aux Id: seq12786 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Gracefully handle invalid content-lenght headers instead
+ of crashing in list_to_integer.</p>
+ <p>
+ Own Id: OTP-12429</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a spelling mistake in httpc documentation.</p>
+ <p>
+ Own Id: OTP-12221</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add option {ftp_extension, boolean} to enable use of
+ extended commands EPSV and EPRT, as specified in RFC
+ 2428, for IPv4 instead of using the legacy commands. Ipv6
+ can not be supported without the extended commands.</p>
+ <p>
+ Own Id: OTP-12255</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix some spelling mistakes in documentation</p>
+ <p>
+ Own Id: OTP-12152</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ httpd: Seperate timeout for TLS/SSL handshake from
+ keepalive timeout</p>
+ <p>
+ Own Id: OTP-12013</p>
+ </item>
+ <item>
+ <p>
+ Warning: this is experimental and may disappear or change
+ without previous warning.</p>
+ <p>
+ Experimental support for running Quickcheck and PropEr
+ tests from common_test suites is added to common_test.
+ See the reference manual for the new module
+ <c>ct_property_testing</c>.</p>
+ <p>
+ Experimental property tests are added under
+ <c>lib/{inet,ssh}/test/property_test</c>. They can be run
+ directly or from the commont_test suites
+ <c>inet/ftp_property_test_SUITE.erl</c> and
+ <c>ssh/test/ssh_property_test_SUITE.erl</c>.</p>
+ <p>
+ See the code in the <c>test</c> directories and the man
+ page for details.</p>
+ <p>
+ (Thanks to Tuncer Ayaz for a patch adding Triq)</p>
+ <p>
+ Own Id: OTP-12119</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ httpc: Fix streaming bugs when handling small responses</p>
+ <p>
+ Own Id: OTP-11992</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Correct distirbing mode for httpd:reload_config/2</p>
+ <p>
+ Own Id: OTP-11914</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improved handling of invalid strings in the HTTP request
+ line.</p>
+ <p>
+ Impact: May improve memory consumption</p>
+ <p>
+ Own Id: OTP-11925 Aux Id: Sequence 12601 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a spelling mistake in httpc doc (Thanks to Wasif
+ Riaz Malik)</p>
+ <p>
+ Own Id: OTP-11538</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ ftp now sanitize file name, user name and passwords from
+ &lt;CR&gt; and &lt;LF&gt; tags (Thanks to Sergei Golovan)</p>
+ <p>
+ Own Id: OTP-11750</p>
+ </item>
+ <item>
+ <p>
+ Corrected error handling in the HTTP client, making it
+ behave more graceful.</p>
+ <p>
+ Thanks to Kirilll Zaborsky</p>
+ <p>
+ Own Id: OTP-11794</p>
+ </item>
+ <item>
+ <p>
+ Support identity transfer-encoding in httpc.</p>
+ <p>
+ Thanks to Anthony Ramine</p>
+ <p>
+ Own Id: OTP-11802</p>
+ </item>
+ <item>
+ <p>
+ Ignore empty Set-Cookie headers to increase
+ interoperability with servers that violate the RFC. </p>
+ <p>
+ Thanks to Kirilll Zaborsky</p>
+ <p>
+ Own Id: OTP-11803</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The commit 6189bc07 "inets: httpc improve pipelining" has
+ been reverted, as it turned out to break things rather
+ than improve pipelining utilization. It is instead up to
+ the user to configure httpc and use it wisely to be able
+ to get the most out of pipelining.</p>
+ <p>
+ Own Id: OTP-11756</p>
+ </item>
+ <item>
+ <p>
+ Handle all response codes in httpd_util:message/3</p>
+ <p>
+ Own Id: OTP-11838</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.9.8</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/inets/doc/src/notes_history.xml b/lib/inets/doc/src/notes_history.xml
index 4162ab97bb..2903b753a1 100644
--- a/lib/inets/doc/src/notes_history.xml
+++ b/lib/inets/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part.xml b/lib/inets/doc/src/part.xml
index 3b6734a9b8..6ebca1f87f 100644
--- a/lib/inets/doc/src/part.xml
+++ b/lib/inets/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part_notes.xml b/lib/inets/doc/src/part_notes.xml
index 81b0dedbfa..35d645e299 100644
--- a/lib/inets/doc/src/part_notes.xml
+++ b/lib/inets/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2012</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/part_notes_history.xml b/lib/inets/doc/src/part_notes_history.xml
index f714a6d2e3..d699f5f60a 100644
--- a/lib/inets/doc/src/part_notes_history.xml
+++ b/lib/inets/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/doc/src/ref_man.xml b/lib/inets/doc/src/ref_man.xml
index e44829827c..3afb020431 100644
--- a/lib/inets/doc/src/ref_man.xml
+++ b/lib/inets/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -39,6 +39,7 @@
<xi:include href="httpc.xml"/>
<xi:include href="httpd.xml"/>
<xi:include href="httpd_conf.xml"/>
+ <xi:include href="httpd_custom_api.xml"/>
<xi:include href="httpd_socket.xml"/>
<xi:include href="httpd_util.xml"/>
<xi:include href="mod_alias.xml"/>
diff --git a/lib/inets/doc/src/tftp.xml b/lib/inets/doc/src/tftp.xml
index 0b3e93a153..42a65ed0c5 100644
--- a/lib/inets/doc/src/tftp.xml
+++ b/lib/inets/doc/src/tftp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2006</year><year>2012</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/inets/examples/httpd_load_test/hdlt_slave.erl b/lib/inets/examples/httpd_load_test/hdlt_slave.erl
index 52af9b5b90..41361418bc 100644
--- a/lib/inets/examples/httpd_load_test/hdlt_slave.erl
+++ b/lib/inets/examples/httpd_load_test/hdlt_slave.erl
@@ -180,7 +180,7 @@ ssh_slave_start(Host, ErlCmd) ->
?DEBUG("ssh_exec_erl -> done", []),
{ok, Connection, Channel};
Error3 ->
- ?LOG("failed exec comand: ~p", [Error3]),
+ ?LOG("failed exec command: ~p", [Error3]),
throw({error, {ssh_exec_failed, Error3}})
end.
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index 520db1b457..8e51b1be5a 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -60,6 +60,7 @@
-define(DATA_ACCEPT_TIMEOUT, infinity).
-define(DEFAULT_MODE, passive).
-define(PROGRESS_DEFAULT, ignore).
+-define(FTP_EXT_DEFAULT, false).
%% Internal Constants
-define(FTP_PORT, 21).
@@ -94,7 +95,8 @@
ipfamily, % inet | inet6 | inet6fb4
progress = ignore, % ignore | pid()
dtimeout = ?DATA_ACCEPT_TIMEOUT, % non_neg_integer() | infinity
- tls_upgrading_data_connection = false
+ tls_upgrading_data_connection = false,
+ ftp_extension = ?FTP_EXT_DEFAULT
}).
@@ -192,7 +194,12 @@ do_open(Pid, OpenOptions, TLSOpts) ->
'ok' | {'error', Reason :: 'euser' | common_reason()}.
user(Pid, User, Pass) ->
- call(Pid, {user, User, Pass}, atom).
+ case {is_name_sane(User), is_name_sane(Pass)} of
+ {true, true} ->
+ call(Pid, {user, User, Pass}, atom);
+ _ ->
+ {error, euser}
+ end.
-spec user(Pid :: pid(),
User :: string(),
@@ -201,7 +208,12 @@ user(Pid, User, Pass) ->
'ok' | {'error', Reason :: 'euser' | common_reason()}.
user(Pid, User, Pass, Acc) ->
- call(Pid, {user, User, Pass, Acc}, atom).
+ case {is_name_sane(User), is_name_sane(Pass), is_name_sane(Acc)} of
+ {true, true, true} ->
+ call(Pid, {user, User, Pass, Acc}, atom);
+ _ ->
+ {error, euser}
+ end.
%%--------------------------------------------------------------------------
@@ -216,7 +228,12 @@ user(Pid, User, Pass, Acc) ->
'ok' | {'error', Reason :: 'eacct' | common_reason()}.
account(Pid, Acc) ->
- call(Pid, {account, Acc}, atom).
+ case is_name_sane(Acc) of
+ true ->
+ call(Pid, {account, Acc}, atom);
+ _ ->
+ {error, eacct}
+ end.
%%--------------------------------------------------------------------------
@@ -262,7 +279,12 @@ lpwd(Pid) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
cd(Pid, Dir) ->
- call(Pid, {cd, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {cd, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -305,7 +327,12 @@ ls(Pid) ->
{'error', Reason :: restriction_reason() | common_reason()}.
ls(Pid, Dir) ->
- call(Pid, {dir, long, Dir}, string).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {dir, long, Dir}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -333,7 +360,12 @@ nlist(Pid) ->
{'error', Reason :: restriction_reason() | common_reason()}.
nlist(Pid, Dir) ->
- call(Pid, {dir, short, Dir}, string).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {dir, short, Dir}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -349,7 +381,12 @@ nlist(Pid, Dir) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
rename(Pid, Old, New) ->
- call(Pid, {rename, Old, New}, string).
+ case {is_name_sane(Old), is_name_sane(New)} of
+ {true, true} ->
+ call(Pid, {rename, Old, New}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -365,7 +402,12 @@ rename(Pid, Old, New) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
delete(Pid, File) ->
- call(Pid, {delete, File}, string).
+ case is_name_sane(File) of
+ true ->
+ call(Pid, {delete, File}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -380,7 +422,12 @@ delete(Pid, File) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
mkdir(Pid, Dir) ->
- call(Pid, {mkdir, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {mkdir, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -395,7 +442,12 @@ mkdir(Pid, Dir) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
rmdir(Pid, Dir) ->
- call(Pid, {rmdir, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {rmdir, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -437,7 +489,12 @@ recv(Pid, RemotFileName) ->
'ok' | {'error', Reason :: term()}.
recv(Pid, RemotFileName, LocalFileName) ->
- call(Pid, {recv, RemotFileName, LocalFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {recv, RemotFileName, LocalFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -456,7 +513,12 @@ recv(Pid, RemotFileName, LocalFileName) ->
{'error', Reason :: restriction_reason() | common_reason()}.
recv_bin(Pid, RemoteFile) ->
- call(Pid, {recv_bin, RemoteFile}, bin).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {recv_bin, RemoteFile}, bin);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -473,7 +535,12 @@ recv_bin(Pid, RemoteFile) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
recv_chunk_start(Pid, RemoteFile) ->
- call(Pid, {recv_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {recv_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -521,7 +588,12 @@ send(Pid, LocalFileName) ->
shortage_reason()}.
send(Pid, LocalFileName, RemotFileName) ->
- call(Pid, {send, LocalFileName, RemotFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {send, LocalFileName, RemotFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -541,7 +613,12 @@ send(Pid, LocalFileName, RemotFileName) ->
shortage_reason()}.
send_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
- call(Pid, {send_bin, Bin, RemoteFile}, atom);
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {send_bin, Bin, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end;
send_bin(_Pid, _Bin, _RemoteFile) ->
{error, enotbinary}.
@@ -559,7 +636,12 @@ send_bin(_Pid, _Bin, _RemoteFile) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
send_chunk_start(Pid, RemoteFile) ->
- call(Pid, {send_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {send_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -575,7 +657,12 @@ send_chunk_start(Pid, RemoteFile) ->
'ok' | {'error', Reason :: term()}.
append_chunk_start(Pid, RemoteFile) ->
- call(Pid, {append_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {append_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -683,7 +770,12 @@ append(Pid, LocalFileName) ->
'ok' | {'error', Reason :: term()}.
append(Pid, LocalFileName, RemotFileName) ->
- call(Pid, {append, LocalFileName, RemotFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {append, LocalFileName, RemotFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -705,7 +797,12 @@ append(Pid, LocalFileName, RemotFileName) ->
shortage_reason()}.
append_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
- call(Pid, {append_bin, Bin, RemoteFile}, atom);
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {append_bin, Bin, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end;
append_bin(_Pid, _Bin, _RemoteFile) ->
{error, enotbinary}.
@@ -874,6 +971,8 @@ start_options(Options) ->
%% timeout
%% dtimeout
%% progress
+%% ftp_extension
+
open_options(Options) ->
?fcrt("open_options", [{options, Options}]),
ValidateMode =
@@ -918,6 +1017,11 @@ open_options(Options) ->
(_) ->
false
end,
+ ValidateFtpExtension =
+ fun(true) -> true;
+ (false) -> true;
+ (_) -> false
+ end,
ValidOptions =
[{mode, ValidateMode, false, ?DEFAULT_MODE},
{host, ValidateHost, true, ehost},
@@ -925,7 +1029,8 @@ open_options(Options) ->
{ipfamily, ValidateIpFamily, false, inet},
{timeout, ValidateTimeout, false, ?CONNECTION_TIMEOUT},
{dtimeout, ValidateDTimeout, false, ?DATA_ACCEPT_TIMEOUT},
- {progress, ValidateProgress, false, ?PROGRESS_DEFAULT}],
+ {progress, ValidateProgress, false, ?PROGRESS_DEFAULT},
+ {ftp_extension, ValidateFtpExtension, false, ?FTP_EXT_DEFAULT}],
validate_options(Options, ValidOptions, []).
tls_options(Options) ->
@@ -1079,12 +1184,14 @@ handle_call({_, {open, ip_comm, Opts}}, From, State) ->
DTimeout = key_search(dtimeout, Opts, ?DATA_ACCEPT_TIMEOUT),
Progress = key_search(progress, Opts, ignore),
IpFamily = key_search(ipfamily, Opts, inet),
+ FtpExt = key_search(ftp_extension, Opts, ?FTP_EXT_DEFAULT),
State2 = State#state{client = From,
mode = Mode,
progress = progress(Progress),
ipfamily = IpFamily,
- dtimeout = DTimeout},
+ dtimeout = DTimeout,
+ ftp_extension = FtpExt},
?fcrd("handle_call(open) -> setup ctrl connection with",
[{host, Host}, {port, Port}, {timeout, Timeout}]),
@@ -1107,11 +1214,13 @@ handle_call({_, {open, ip_comm, Host, Opts}}, From, State) ->
Timeout = key_search(timeout, Opts, ?CONNECTION_TIMEOUT),
DTimeout = key_search(dtimeout, Opts, ?DATA_ACCEPT_TIMEOUT),
Progress = key_search(progress, Opts, ignore),
+ FtpExt = key_search(ftp_extension, Opts, ?FTP_EXT_DEFAULT),
State2 = State#state{client = From,
mode = Mode,
progress = progress(Progress),
- dtimeout = DTimeout},
+ dtimeout = DTimeout,
+ ftp_extension = FtpExt},
case setup_ctrl_connection(Host, Port, Timeout, State2) of
{ok, State3, WaitTimeout} ->
@@ -1690,7 +1799,8 @@ handle_ctrl_result({pos_compl, Lines},
ipfamily = inet,
client = From,
caller = {setup_data_connection, Caller},
- timeout = Timeout} = State) ->
+ timeout = Timeout,
+ ftp_extension = false} = State) ->
{_, [?LEFT_PAREN | Rest]} =
lists:splitwith(fun(?LEFT_PAREN) -> false; (_) -> true end, Lines),
@@ -1711,6 +1821,28 @@ handle_ctrl_result({pos_compl, Lines},
{noreply,State#state{client = undefined, caller = undefined}}
end;
+handle_ctrl_result({pos_compl, Lines},
+ #state{mode = passive,
+ ipfamily = inet,
+ client = From,
+ caller = {setup_data_connection, Caller},
+ csock = CSock,
+ timeout = Timeout,
+ ftp_extension = true} = State) ->
+
+ [_, PortStr | _] = lists:reverse(string:tokens(Lines, "|")),
+ {ok, {IP, _}} = peername(CSock),
+
+ ?DBG('<--data tcp connect to ~p:~p, Caller=~p~n',[IP,PortStr,Caller]),
+ case connect(IP, list_to_integer(PortStr), Timeout, State) of
+ {ok, _, Socket} ->
+ handle_caller(State#state{caller = Caller, dsock = {tcp, Socket}});
+ {error, _Reason} = Error ->
+ gen_server:reply(From, Error),
+ {noreply, State#state{client = undefined, caller = undefined}}
+ end;
+
+
%% FTP server does not support passive mode: try to fallback on active mode
handle_ctrl_result(_,
#state{mode = passive,
@@ -2062,7 +2194,8 @@ setup_ctrl_connection(Host, Port, Timeout, State) ->
setup_data_connection(#state{mode = active,
caller = Caller,
- csock = CSock} = State) ->
+ csock = CSock,
+ ftp_extension = FtpExt} = State) ->
case (catch sockname(CSock)) of
{ok, {{_, _, _, _, _, _, _, _} = IP, _}} ->
{ok, LSock} =
@@ -2079,11 +2212,18 @@ setup_data_connection(#state{mode = active,
{ok, LSock} = gen_tcp:listen(0, [{ip, IP}, {active, false},
binary, {packet, 0}]),
{ok, Port} = inet:port(LSock),
- {IP1, IP2, IP3, IP4} = IP,
- {Port1, Port2} = {Port div 256, Port rem 256},
- send_ctrl_message(State,
- mk_cmd("PORT ~w,~w,~w,~w,~w,~w",
- [IP1, IP2, IP3, IP4, Port1, Port2])),
+ case FtpExt of
+ false ->
+ {IP1, IP2, IP3, IP4} = IP,
+ {Port1, Port2} = {Port div 256, Port rem 256},
+ send_ctrl_message(State,
+ mk_cmd("PORT ~w,~w,~w,~w,~w,~w",
+ [IP1, IP2, IP3, IP4, Port1, Port2]));
+ true ->
+ IpAddress = inet_parse:ntoa(IP),
+ Cmd = mk_cmd("EPRT |1|~s|~p|", [IpAddress, Port]),
+ send_ctrl_message(State, Cmd)
+ end,
activate_ctrl_connection(State),
{noreply, State#state{caller = {setup_data_connection,
{LSock, Caller}}}}
@@ -2096,9 +2236,17 @@ setup_data_connection(#state{mode = passive, ipfamily = inet6,
{noreply, State#state{caller = {setup_data_connection, Caller}}};
setup_data_connection(#state{mode = passive, ipfamily = inet,
- caller = Caller} = State) ->
+ caller = Caller,
+ ftp_extension = false} = State) ->
send_ctrl_message(State, mk_cmd("PASV", [])),
activate_ctrl_connection(State),
+ {noreply, State#state{caller = {setup_data_connection, Caller}}};
+
+setup_data_connection(#state{mode = passive, ipfamily = inet,
+ caller = Caller,
+ ftp_extension = true} = State) ->
+ send_ctrl_message(State, mk_cmd("EPSV", [])),
+ activate_ctrl_connection(State),
{noreply, State#state{caller = {setup_data_connection, Caller}}}.
connect(Host, Port, Timeout, #state{ipfamily = inet = IpFam}) ->
@@ -2302,6 +2450,15 @@ send_bin(State, Bin) ->
mk_cmd(Fmt, Args) ->
[io_lib:format(Fmt, Args)| [?CR, ?LF]]. % Deep list ok.
+is_name_sane([]) ->
+ true;
+is_name_sane([?CR| _]) ->
+ false;
+is_name_sane([?LF| _]) ->
+ false;
+is_name_sane([_| Rest]) ->
+ is_name_sane(Rest).
+
pwd_result(Lines) ->
{_, [?DOUBLE_QUOTE | Rest]} =
lists:splitwith(fun(?DOUBLE_QUOTE) -> false; (_) -> true end, Lines),
diff --git a/lib/inets/src/http_client/httpc_cookie.erl b/lib/inets/src/http_client/httpc_cookie.erl
index 69900bae65..35778d3ed5 100644
--- a/lib/inets/src/http_client/httpc_cookie.erl
+++ b/lib/inets/src/http_client/httpc_cookie.erl
@@ -115,8 +115,8 @@ maybe_dets_close(Db) ->
%%--------------------------------------------------------------------
-%% Func: insert(CookieDb) -> ok
-%% Purpose: Close the cookie db
+%% Func: insert(CookieDb, Cookie) -> ok
+%% Purpose: insert cookies into the cookie db
%%--------------------------------------------------------------------
%% If no persistent cookie database is defined we
@@ -334,8 +334,23 @@ add_domain(Str, #http_cookie{domain_default = true}) ->
add_domain(Str, #http_cookie{domain = Domain}) ->
Str ++ "; $Domain=" ++ Domain.
+is_set_cookie_valid("") ->
+ %% an empty Set-Cookie header is not valid
+ false;
+is_set_cookie_valid([$=|_]) ->
+ %% a Set-Cookie header without name is not valid
+ false;
+is_set_cookie_valid(SetCookieHeader) ->
+ %% a Set-Cookie header without name/value is not valid
+ case string:chr(SetCookieHeader, $=) of
+ 0 -> false;
+ _ -> true
+ end.
+
parse_set_cookies(CookieHeaders, DefaultPathDomain) ->
- SetCookieHeaders = [Value || {"set-cookie", Value} <- CookieHeaders],
+ %% filter invalid Set-Cookie headers
+ SetCookieHeaders = [Value || {"set-cookie", Value} <- CookieHeaders,
+ is_set_cookie_valid(Value)],
Cookies = [parse_set_cookie(SetCookieHeader, DefaultPathDomain) ||
SetCookieHeader <- SetCookieHeaders],
%% print_cookies("Parsed Cookies", Cookies),
@@ -347,6 +362,8 @@ parse_set_cookie(CookieHeader, {DefaultPath, DefaultDomain}) ->
Name = string:substr(CookieHeader, 1, Pos - 1),
{Value, Attrs} =
case string:substr(CookieHeader, Pos + 1) of
+ [] ->
+ {"", ""};
[$;|ValueAndAttrs] ->
{"", string:tokens(ValueAndAttrs, ";")};
ValueAndAttrs ->
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 80c8b2439e..0bbd40d656 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -55,8 +55,8 @@
headers, % #http_response_h{}
body, % binary()
mfa, % {Module, Function, Args}
- pipeline = queue:new(), % queue()
- keep_alive = queue:new(), % queue()
+ pipeline = queue:new(), % queue:queue()
+ keep_alive = queue:new(), % queue:queue()
status, % undefined | new | pipeline | keep_alive | close | {ssl_tunnel, Request}
canceled = [], % [RequestId]
max_header_size = nolimit, % nolimit | integer()
@@ -350,7 +350,7 @@ handle_call(#request{address = Addr} = Request, _,
{reply, ok, State0#state{keep_alive = NewKeepAlive,
session = NewSession}};
undefined ->
- %% Note: tcp-message reciving has already been
+ %% Note: tcp-message receiving has already been
%% activated by handle_pipeline/2.
?hcrd("no current request", []),
cancel_timer(Timers#timers.queue_timer,
@@ -632,7 +632,7 @@ handle_info({timeout, RequestId},
handle_info(timeout_queue, State = #state{request = undefined}) ->
{stop, normal, State};
-%% Timing was such as the pipeline_timout was not canceled!
+%% Timing was such as the queue_timeout was not canceled!
handle_info(timeout_queue, #state{timers = Timers} = State) ->
{noreply, State#state{timers =
Timers#timers{queue_timer = undefined}}};
@@ -1116,18 +1116,19 @@ handle_http_body(Body, #state{headers = Headers,
{new_body, NewBody}]),
NewHeaders = http_chunk:handle_headers(Headers,
ChunkedHeaders),
- handle_response(State#state{headers = NewHeaders,
- body = NewBody})
+ case Body of
+ <<>> ->
+ handle_response(State#state{headers = NewHeaders,
+ body = NewBody});
+ _ ->
+ {NewBody2, NewRequest} =
+ stream(NewBody, Request, Code),
+ handle_response(State#state{headers = NewHeaders,
+ body = NewBody2})
+ end
end;
- Encoding when is_list(Encoding) ->
- ?hcrt("handle_http_body - encoding", [{encoding, Encoding}]),
- NewState = answer_request(Request,
- httpc_response:error(Request,
- unknown_encoding),
- State),
- {stop, normal, NewState};
- _ ->
- ?hcrt("handle_http_body - other", []),
+ Enc when Enc =:= "identity"; Enc =:= undefined ->
+ ?hcrt("handle_http_body - identity", []),
Length =
list_to_integer(Headers#http_response_h.'content-length'),
case ((Length =< MaxBodySize) orelse (MaxBodySize =:= nolimit)) of
@@ -1149,12 +1150,19 @@ handle_http_body(Body, #state{headers = Headers,
body_too_big),
State),
{stop, normal, NewState}
- end
+ end;
+ Encoding when is_list(Encoding) ->
+ ?hcrt("handle_http_body - other", [{encoding, Encoding}]),
+ NewState = answer_request(Request,
+ httpc_response:error(Request,
+ unknown_encoding),
+ State),
+ {stop, normal, NewState}
end.
handle_response(#state{status = new} = State) ->
?hcrd("handle response - status = new", []),
- handle_response(check_persistent(State));
+ handle_response(try_to_enable_pipeline_or_keep_alive(State));
handle_response(#state{request = Request,
status = Status,
@@ -1218,6 +1226,7 @@ handle_response(#state{request = Request,
handle_queue(State#state{request = undefined}, Data);
{ok, Msg, Data} ->
?hcrd("handle response - ok", []),
+ stream_remaining_body(Body, Request, StatusLine),
end_stream(StatusLine, Request),
NewState = maybe_send_answer(Request, Msg, State),
handle_queue(NewState, Data);
@@ -1429,22 +1438,39 @@ is_keep_alive_enabled_server(_,_) ->
is_keep_alive_connection(Headers, #session{client_close = ClientClose}) ->
(not ((ClientClose) orelse httpc_response:is_server_closing(Headers))).
-check_persistent(
- #state{session = #session{type = Type} = Session,
+try_to_enable_pipeline_or_keep_alive(
+ #state{session = Session,
+ request = #request{method = Method},
status_line = {Version, _, _},
headers = Headers,
- profile_name = ProfileName} = State) ->
+ profile_name = ProfileName} = State) ->
+ ?hcrd("try to enable pipeline or keep-alive",
+ [{version, Version},
+ {headers, Headers},
+ {session, Session}]),
case is_keep_alive_enabled_server(Version, Headers) andalso
- is_keep_alive_connection(Headers, Session) of
+ is_keep_alive_connection(Headers, Session) of
true ->
- mark_persistent(ProfileName, Session),
- State#state{status = Type};
+ case (is_pipeline_enabled_client(Session) andalso
+ httpc_request:is_idempotent(Method)) of
+ true ->
+ insert_session(Session, ProfileName),
+ State#state{status = pipeline};
+ false ->
+ insert_session(Session, ProfileName),
+ %% Make sure type is keep_alive in session
+ %% as it in this case might be pipeline
+ NewSession = Session#session{type = keep_alive},
+ State#state{status = keep_alive,
+ session = NewSession}
+ end;
false ->
State#state{status = close}
end.
answer_request(#request{id = RequestId, from = From} = Request, Msg,
- #state{timers = Timers,
+ #state{session = Session,
+ timers = Timers,
profile_name = ProfileName} = State) ->
?hcrt("answer request", [{request, Request}, {msg, Msg}]),
httpc_response:send(From, Msg),
@@ -1454,14 +1480,19 @@ answer_request(#request{id = RequestId, from = From} = Request, Msg,
Timer = {RequestId, TimerRef},
cancel_timer(TimerRef, {timeout, Request#request.id}),
httpc_manager:request_done(RequestId, ProfileName),
+ NewSession = maybe_make_session_available(ProfileName, Session),
Timers2 = Timers#timers{request_timers = lists:delete(Timer,
RequestTimers)},
State#state{request = Request#request{from = answer_sent},
+ session = NewSession,
timers = Timers2}.
-mark_persistent(ProfileName, Session) ->
- update_session(ProfileName, Session, #session.persistent, true),
- Session#session{persistent = true}.
+maybe_make_session_available(ProfileName,
+ #session{available = false} = Session) ->
+ update_session(ProfileName, Session, #session.available, true),
+ Session#session{available = true};
+maybe_make_session_available(_ProfileName, Session) ->
+ Session.
cancel_timers(#timers{request_timers = ReqTmrs, queue_timer = QTmr}) ->
cancel_timer(QTmr, timeout_queue),
@@ -1626,6 +1657,10 @@ start_stream(_StatusLine, _Headers, Request) ->
?hcrt("start stream - no op", []),
{ok, Request}.
+stream_remaining_body(<<>>, _, _) ->
+ ok;
+stream_remaining_body(Body, Request, {_, Code, _}) ->
+ stream(Body, Request, Code).
%% Note the end stream message is handled by httpc_response and will
%% be sent by answer_request
@@ -1758,7 +1793,7 @@ tls_tunnel_request(#request{headers = Headers,
host_header(#http_request_h{host = Host}, _) ->
Host;
-%% Handles header_as_is
+%% Handles headers_as_is
host_header(_, URI) ->
{ok, {_, _, Host, _, _, _}} = http_uri:parse(URI),
Host.
@@ -1829,7 +1864,7 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
[ProfileName, SessionId, Pos, Value,
(catch httpc_manager:which_session_info(ProfileName)),
Session,
- (catch httpc_manager:lookup_session(ProfileName, SessionId)),
+ (catch httpc_manager:lookup_session(SessionId, ProfileName)),
T, E]),
exit({failed_updating_session,
[{profile, ProfileName},
diff --git a/lib/inets/src/http_client/httpc_internal.hrl b/lib/inets/src/http_client/httpc_internal.hrl
index d5b3dd2a2a..add5d11dfa 100644
--- a/lib/inets/src/http_client/httpc_internal.hrl
+++ b/lib/inets/src/http_client/httpc_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -143,8 +143,8 @@
%% true | false
%% This will be true, when a response has been received for
- %% the first request and the server has not closed the connection
- persistent = false
+ %% the first request. See type above.
+ available = false
}).
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl
index a3ed371e61..48a9c32454 100644
--- a/lib/inets/src/http_client/httpc_manager.erl
+++ b/lib/inets/src/http_client/httpc_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -451,7 +451,7 @@ do_init(ProfileName, CookiesDir) ->
%%--------------------------------------------------------------------
handle_call({request, Request}, _, State) ->
?hcri("request", [{request, Request}]),
- case (catch handle_request(Request, State, false)) of
+ case (catch handle_request(Request, State)) of
{reply, Msg, NewState} ->
{reply, Msg, NewState};
Error ->
@@ -511,7 +511,7 @@ handle_cast({retry_or_redirect_request, {Time, Request}},
{noreply, State};
handle_cast({retry_or_redirect_request, Request}, State) ->
- case (catch handle_request(Request, State, true)) of
+ case (catch handle_request(Request, State)) of
{reply, {ok, _}, NewState} ->
{noreply, NewState};
Error ->
@@ -724,7 +724,7 @@ get_handler_info(Tab) ->
handle_request(#request{settings =
#http_options{version = "HTTP/0.9"}} = Request,
- State, _) ->
+ State) ->
%% Act as an HTTP/0.9 client that does not know anything
%% about persistent connections
@@ -737,7 +737,7 @@ handle_request(#request{settings =
handle_request(#request{settings =
#http_options{version = "HTTP/1.0"}} = Request,
- State, _) ->
+ State) ->
%% Act as an HTTP/1.0 client that does not
%% use persistent connections
@@ -748,13 +748,13 @@ handle_request(#request{settings =
start_handler(NewRequest#request{headers = NewHeaders}, State),
{reply, {ok, NewRequest#request.id}, State};
-handle_request(Request, State = #state{options = Options}, Retry) ->
+handle_request(Request, State = #state{options = Options}) ->
NewRequest = handle_cookies(generate_request_id(Request), State),
SessionType = session_type(Options),
case select_session(Request#request.method,
Request#request.address,
- Request#request.scheme, SessionType, State, Retry) of
+ Request#request.scheme, SessionType, State) of
{ok, HandlerPid} ->
pipeline_or_keep_alive(NewRequest, HandlerPid, State);
no_connection ->
@@ -778,7 +778,6 @@ start_handler(#request{id = Id,
#state{profile_name = ProfileName,
handler_db = HandlerDb,
options = Options}) ->
- ClientClose = httpc_request:is_client_closing(Request#request.headers),
{ok, Pid} =
case is_inets_manager() of
true ->
@@ -789,18 +788,13 @@ start_handler(#request{id = Id,
end,
HandlerInfo = {Id, Pid, From},
ets:insert(HandlerDb, HandlerInfo),
- insert_session(#session{id = {Request#request.address, Pid},
- scheme = Request#request.scheme,
- client_close = ClientClose,
- type = session_type(Options)
- }, ProfileName),
erlang:monitor(process, Pid).
select_session(Method, HostPort, Scheme, SessionType,
#state{options = #options{max_pipeline_length = MaxPipe,
max_keep_alive_length = MaxKeepAlive},
- session_db = SessionDb}, Retry) ->
+ session_db = SessionDb}) ->
?hcrd("select session", [{session_type, SessionType},
{max_pipeline_length, MaxPipe},
{max_keep_alive_length, MaxKeepAlive}]),
@@ -813,23 +807,13 @@ select_session(Method, HostPort, Scheme, SessionType,
%% client_close, scheme and type specified.
%% The fields id (part of: HandlerPid) and queue_length
%% specified.
- Pattern = case (Retry andalso SessionType == pipeline) of
- true ->
- #session{id = {HostPort, '$1'},
- client_close = false,
- scheme = Scheme,
- queue_length = '$2',
- type = SessionType,
- persistent = true,
- _ = '_'};
- false ->
- #session{id = {HostPort, '$1'},
- client_close = false,
- scheme = Scheme,
- queue_length = '$2',
- type = SessionType,
- _ = '_'}
- end,
+ Pattern = #session{id = {HostPort, '$1'},
+ client_close = false,
+ scheme = Scheme,
+ queue_length = '$2',
+ type = SessionType,
+ available = true,
+ _ = '_'},
%% {'_', {HostPort, '$1'}, false, Scheme, '_', '$2', SessionTyp},
Candidates = ets:match(SessionDb, Pattern),
?hcrd("select session", [{host_port, HostPort},
diff --git a/lib/inets/src/http_lib/http_internal.hrl b/lib/inets/src/http_lib/http_internal.hrl
index 97cf474ab9..54425740b5 100644
--- a/lib/inets/src/http_lib/http_internal.hrl
+++ b/lib/inets/src/http_lib/http_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,6 +26,9 @@
-define(HTTP_MAX_BODY_SIZE, nolimit).
-define(HTTP_MAX_HEADER_SIZE, 10240).
-define(HTTP_MAX_URI_SIZE, nolimit).
+-define(HTTP_MAX_VERSION_STRING, 8).
+-define(HTTP_MAX_METHOD_STRING, 20).
+-define(HTTP_MAX_CONTENT_LENGTH, 100000000).
-ifndef(HTTP_DEFAULT_SSL_KIND).
-define(HTTP_DEFAULT_SSL_KIND, essl).
diff --git a/lib/inets/src/http_lib/http_request.erl b/lib/inets/src/http_lib/http_request.erl
index f295453bdd..a0833ddf01 100644
--- a/lib/inets/src/http_lib/http_request.erl
+++ b/lib/inets/src/http_lib/http_request.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,8 +21,16 @@
-include("http_internal.hrl").
--export([headers/2, http_headers/1, is_absolut_uri/1]).
+-export([headers/2, http_headers/1, is_absolut_uri/1, key_value/1]).
+
+key_value(KeyValueStr) ->
+ case lists:splitwith(fun($:) -> false; (_) -> true end, KeyValueStr) of
+ {Key, [$: | Value]} ->
+ {http_util:to_lower(string:strip(Key)), string:strip(Value)};
+ {_, []} ->
+ undefined
+ end.
%%-------------------------------------------------------------------------
%% headers(HeaderList, #http_request_h{}) -> #http_request_h{}
%% HeaderList - ["HeaderField:Value"]
@@ -34,14 +42,12 @@
%%-------------------------------------------------------------------------
headers([], Headers) ->
Headers;
-headers([Header | Tail], Headers) ->
- case lists:splitwith(fun($:) -> false; (_) -> true end, Header) of
- {Key, [$: | Value]} ->
- headers(Tail, headers(http_util:to_lower(string:strip(Key)),
- string:strip(Value), Headers));
- {_, []} ->
- headers(Tail, Headers)
- end.
+headers([{Key, Value} | Tail], Headers) ->
+ headers(Tail, headers(Key, Value, Headers));
+headers([undefined], Headers) ->
+ Headers;
+headers(KeyValues, Headers) ->
+ headers([key_value(KeyValue) || KeyValue <- KeyValues], Headers).
%%-------------------------------------------------------------------------
%% headers(#http_request_h{}) -> HeaderList
diff --git a/lib/inets/src/http_lib/http_uri.erl b/lib/inets/src/http_lib/http_uri.erl
index 5962001c3a..350a4bc169 100644
--- a/lib/inets/src/http_lib/http_uri.erl
+++ b/lib/inets/src/http_lib/http_uri.erl
@@ -90,8 +90,8 @@ parse(AbsURI, Opts) ->
{error, Reason};
{Scheme, DefaultPort, Rest} ->
case (catch parse_uri_rest(Scheme, DefaultPort, Rest, Opts)) of
- {ok, {UserInfo, Host, Port, Path, Query}} ->
- {ok, {Scheme, UserInfo, Host, Port, Path, Query}};
+ {ok, Result} ->
+ {ok, Result};
{error, Reason} ->
{error, {Reason, Scheme, AbsURI}};
_ ->
@@ -148,27 +148,22 @@ parse_scheme(AbsURI, Opts) ->
end.
parse_uri_rest(Scheme, DefaultPort, "//" ++ URIPart, Opts) ->
- {Authority, PathQuery} =
- case split_uri(URIPart, "/", URIPart, 1, 0) of
- Split = {_, _} ->
- Split;
- URIPart ->
- case split_uri(URIPart, "\\?", URIPart, 1, 0) of
- Split = {_, _} ->
- Split;
- URIPart ->
- {URIPart,""}
- end
- end,
+ {Authority, PathQueryFragment} =
+ split_uri(URIPart, "[/?#]", {URIPart, ""}, 1, 0),
+ {RawPath, QueryFragment} =
+ split_uri(PathQueryFragment, "[?#]", {PathQueryFragment, ""}, 1, 0),
+ {Query, Fragment} =
+ split_uri(QueryFragment, "#", {QueryFragment, ""}, 1, 0),
{UserInfo, HostPort} = split_uri(Authority, "@", {"", Authority}, 1, 1),
{Host, Port} = parse_host_port(Scheme, DefaultPort, HostPort, Opts),
- {Path, Query} = parse_path_query(PathQuery),
- {ok, {UserInfo, Host, Port, Path, Query}}.
-
+ Path = path(RawPath),
+ case lists:keyfind(fragment, 1, Opts) of
+ {fragment, true} ->
+ {ok, {Scheme, UserInfo, Host, Port, Path, Query, Fragment}};
+ _ ->
+ {ok, {Scheme, UserInfo, Host, Port, Path, Query}}
+ end.
-parse_path_query(PathQuery) ->
- {Path, Query} = split_uri(PathQuery, "\\?", {PathQuery, ""}, 1, 0),
- {path(Path), Query}.
%% In this version of the function, we no longer need
%% the Scheme argument, but just in case...
diff --git a/lib/inets/src/http_server/Makefile b/lib/inets/src/http_server/Makefile
index 2660d04d16..636d580e28 100644
--- a/lib/inets/src/http_server/Makefile
+++ b/lib/inets/src/http_server/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2005-2013. All Rights Reserved.
+# Copyright Ericsson AB 2005-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -46,6 +46,7 @@ MODULES = \
httpd_connection_sup\
httpd_cgi \
httpd_conf \
+ httpd_custom \
httpd_example \
httpd_esi \
httpd_file\
diff --git a/lib/inets/src/http_server/httpd.erl b/lib/inets/src/http_server/httpd.erl
index 6052ae9022..e8148ea362 100644
--- a/lib/inets/src/http_server/httpd.erl
+++ b/lib/inets/src/http_server/httpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -294,9 +294,13 @@ do_reload_config(ConfigList, Mode) ->
{ok, Config} ->
Address = proplists:get_value(bind_address, Config, any),
Port = proplists:get_value(port, Config, 80),
- block(Address, Port, Mode),
- reload(Config, Address, Port),
- unblock(Address, Port);
+ case block(Address, Port, Mode) of
+ ok ->
+ reload(Config, Address, Port),
+ unblock(Address, Port);
+ Error ->
+ Error
+ end;
Error ->
Error
end.
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl
index 27446ca7fe..dbdc1be272 100644
--- a/lib/inets/src/http_server/httpd_conf.erl
+++ b/lib/inets/src/http_server/httpd_conf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,7 +44,7 @@
%% FilePath = string()
%% Result = {ok,Directory} | {error,Reason}
%% Directory = string()
-%% Reason = string() | enoent | eaccess | enotdir | FileInfo
+%% Reason = string() | enoent | eacces | enotdir | FileInfo
%% FileInfo = File info record
%%
%% Description: Checks if FilePath is a directory in which case it is
@@ -71,7 +71,7 @@ is_directory(_Type,_Access,FileInfo,_Directory) ->
%% FilePath = string()
%% Result = {ok,File} | {error,Reason}
%% File = string()
-%% Reason = string() | enoent | eaccess | enotdir | FileInfo
+%% Reason = string() | enoent | eacces | enotdir | FileInfo
%% FileInfo = File info record
%%
%% Description: Checks if FilePath is a regular file in which case it
@@ -205,13 +205,13 @@ load("MaxURISize " ++ MaxHeaderSize, []) ->
" is an invalid number of MaxHeaderSize")}
end;
-load("MaxBodySize " ++ MaxBodySize, []) ->
- case make_integer(MaxBodySize) of
+load("MaxContentLength " ++ Max, []) ->
+ case make_integer(Max) of
{ok, Integer} ->
- {ok, [], {max_body_size,Integer}};
+ {ok, [], {max_content_length, Integer}};
{error, _} ->
- {error, ?NICE(clean(MaxBodySize) ++
- " is an invalid number of MaxBodySize")}
+ {error, ?NICE(clean(Max) ++
+ " is an invalid number of MaxContentLength")}
end;
load("ServerName " ++ ServerName, []) ->
@@ -219,14 +219,14 @@ load("ServerName " ++ ServerName, []) ->
load("ServerTokens " ++ ServerTokens, []) ->
%% These are the valid *plain* server tokens:
- %% sprod, major, minor, minimum, os, full
+ %% none, prod, major, minor, minimum, os, full
%% It can also be a "private" server token: private:<any string>
case string:tokens(ServerTokens, [$:]) of
["private", Private] ->
{ok,[], {server_tokens, clean(Private)}};
[TokStr] ->
Tok = list_to_atom(clean(TokStr)),
- case lists:member(Tok, [prod, major, minor, minimum, os, full]) of
+ case lists:member(Tok, [none, prod, major, minor, minimum, os, full]) of
true ->
{ok,[], {server_tokens, Tok}};
false ->
@@ -337,7 +337,7 @@ load("MaxKeepAliveRequest " ++ MaxRequests, []) ->
load("KeepAliveTimeout " ++ Timeout, []) ->
case make_integer(Timeout) of
{ok, Integer} ->
- {ok, [], {keep_alive_timeout, Integer*1000}};
+ {ok, [], {keep_alive_timeout, Integer}};
{error, _} ->
{error, ?NICE(clean(Timeout)++" is an invalid KeepAliveTimeout")}
end;
@@ -569,6 +569,12 @@ validate_config_params([{max_body_size, Value} | Rest])
validate_config_params([{max_body_size, Value} | _]) ->
throw({max_body_size, Value});
+validate_config_params([{max_content_length, Value} | Rest])
+ when is_integer(Value) andalso (Value > 0) ->
+ validate_config_params(Rest);
+validate_config_params([{max_content_length, Value} | _]) ->
+ throw({max_content_length, Value});
+
validate_config_params([{server_name, Value} | Rest])
when is_list(Value) ->
validate_config_params(Rest);
@@ -635,7 +641,7 @@ validate_config_params([{max_keep_alive_request, Value} | Rest])
when is_integer(Value) andalso (Value > 0) ->
validate_config_params(Rest);
validate_config_params([{max_keep_alive_request, Value} | _]) ->
- throw({max_header_size, Value});
+ throw({max_keep_alive_request, Value});
validate_config_params([{keep_alive_timeout, Value} | Rest])
when is_integer(Value) andalso (Value >= 0) ->
@@ -799,7 +805,7 @@ store({server_tokens, ServerTokens} = Entry, _ConfigList) ->
Server = server(ServerTokens),
{ok, [Entry, {server, Server}]};
store({keep_alive_timeout, KeepAliveTimeout}, _ConfigList) ->
- {ok, {keep_alive_timeout, KeepAliveTimeout * 1000}};
+ {ok, {keep_alive_timeout, KeepAliveTimeout}};
store(ConfigListEntry, _ConfigList) ->
{ok, ConfigListEntry}.
@@ -844,6 +850,8 @@ server(full = _ServerTokens) ->
OS = os_info(full),
lists:flatten(
io_lib:format("~s ~s OTP/~s", [?SERVER_SOFTWARE, OS, OTPRelease]));
+server(none = _ServerTokens) ->
+ "";
server({private, Server} = _ServerTokens) when is_list(Server) ->
%% The user provide its own
Server;
@@ -1293,7 +1301,7 @@ ssl_ca_certificate_file(ConfigDB) ->
end.
plain_server_tokens() ->
- [prod, major, minor, minimum, os, full].
+ [none, prod, major, minor, minimum, os, full].
error_report(Where,M,F,Error) ->
error_logger:error_report([{?MODULE, Where},
diff --git a/lib/inets/src/http_server/httpd_custom.erl b/lib/inets/src/http_server/httpd_custom.erl
new file mode 100644
index 0000000000..342469a579
--- /dev/null
+++ b/lib/inets/src/http_server/httpd_custom.erl
@@ -0,0 +1,69 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2015-2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+-module(httpd_custom).
+
+-export([response_header/1, request_header/1]).
+-export([customize_headers/3]).
+
+-include_lib("inets/src/inets_app/inets_internal.hrl").
+
+response_header(Header) ->
+ {true, httpify(Header)}.
+request_header(Header) ->
+ {true, Header}.
+
+customize_headers(?MODULE, Function, Arg) ->
+ ?MODULE:Function(Arg);
+customize_headers(Module, Function, Arg) ->
+ try Module:Function(Arg) of
+ {true, Value} ->
+ ?MODULE:Function(Value);
+ false ->
+ false
+ catch
+ _:_ ->
+ ?MODULE:Function(Arg)
+ end.
+
+httpify({Key0, Value}) ->
+ %% make sure first letter is capital (defacto standard)
+ Words1 = string:tokens(Key0, "-"),
+ Words2 = upify(Words1, []),
+ Key = new_key(Words2),
+ Key ++ ": " ++ Value ++ ?CRLF .
+
+new_key([]) ->
+ "";
+new_key([W]) ->
+ W;
+new_key([W1,W2]) ->
+ W1 ++ "-" ++ W2;
+new_key([W|R]) ->
+ W ++ "-" ++ new_key(R).
+
+upify([], Acc) ->
+ lists:reverse(Acc);
+upify([Key|Rest], Acc) ->
+ upify(Rest, [upify2(Key)|Acc]).
+
+upify2([C|Rest]) when (C >= $a) andalso (C =< $z) ->
+ [C-($a-$A)|Rest];
+upify2(Str) ->
+ Str.
diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl
index 16a080f8e2..6fc07f033c 100644
--- a/lib/inets/src/http_server/httpd_example.erl
+++ b/lib/inets/src/http_server/httpd_example.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -66,7 +66,7 @@ get_bin(_Env,_Input) ->
<INPUT TYPE=\"text\" NAME=\"input2\">
<INPUT TYPE=\"submit\"><BR>
</FORM>" ++ "\n"),
- footer()].
+ list_to_binary(footer())].
post(_Env,[]) ->
[header(),
diff --git a/lib/inets/src/http_server/httpd_manager.erl b/lib/inets/src/http_server/httpd_manager.erl
index e155498bb8..3da0343401 100644
--- a/lib/inets/src/http_server/httpd_manager.erl
+++ b/lib/inets/src/http_server/httpd_manager.erl
@@ -210,9 +210,10 @@ handle_call({block , Blocker, Mode, Timeout}, From,
handle_call({block , _, _, _}, _, State) ->
{reply, {error, blocked}, State};
-handle_call({unblock, Blocker}, _, #state{blocker_ref = {Blocker,_},
+handle_call({unblock, Blocker}, _, #state{blocker_ref = {Blocker, Monitor},
admin_state = blocked} = State) ->
-
+
+ erlang:demonitor(Monitor),
{reply, ok,
State#state{admin_state = unblocked, blocker_ref = undefined}};
@@ -247,37 +248,36 @@ handle_cast(Message, State) ->
handle_info(connections_terminated, #state{admin_state = shutting_down,
blocking_from = From} = State) ->
gen_server:reply(From, ok),
- {noreply, State#state{admin_state = blocked, blocking_from = undefined,
- blocker_ref = undefined}};
+ {noreply, State#state{admin_state = blocked, blocking_from = undefined}};
handle_info(connections_terminated, State) ->
{noreply, State};
-handle_info({block_timeout, non_disturbing},
+handle_info({block_timeout, non_disturbing, Blocker},
#state{admin_state = shutting_down,
blocking_from = From,
- blocker_ref = {_, Monitor}} = State) ->
+ blocker_ref = {_, Monitor} = Blocker} = State) ->
erlang:demonitor(Monitor),
gen_server:reply(From, {error, timeout}),
{noreply, State#state{admin_state = unblocked, blocking_from = undefined,
blocker_ref = undefined}};
-handle_info({block_timeout, disturbing},
+handle_info({block_timeout, disturbing, Blocker},
#state{admin_state = shutting_down,
blocking_from = From,
- blocker_ref = {_, Monitor},
+ blocker_ref = Blocker,
connection_sup = Sup} = State) ->
SupPid = whereis(Sup),
shutdown_connections(SupPid),
- erlang:demonitor(Monitor),
gen_server:reply(From, ok),
- {noreply, State#state{admin_state = blocked, blocker_ref = undefined,
+ {noreply, State#state{admin_state = blocked,
blocking_from = undefined}};
handle_info({block_timeout, _, _}, State) ->
{noreply, State};
handle_info({'DOWN', _, process, Pid, _Info},
#state{admin_state = Admin,
- blocker_ref = {Pid, _}} = State) when
+ blocker_ref = {Pid, Monitor}} = State) when
Admin =/= unblocked ->
+ erlang:demonitor(Monitor),
{noreply, State#state{admin_state = unblocked,
blocking_from = undefined,
blocker_ref = undefined}};
@@ -333,18 +333,16 @@ handle_new_connection(_UsageState, _AdminState, State, _Handler) ->
handle_block(disturbing, infinity,
#state{connection_sup = CSup,
- blocking_from = From,
- blocker_ref = {_, Monitor}} = State) ->
+ blocking_from = From} = State) ->
SupPid = whereis(CSup),
shutdown_connections(SupPid),
- erlang:demonitor(Monitor),
gen_server:reply(From, ok),
- {noreply, State#state{admin_state = blocked, blocker_ref = undefined,
+ {noreply, State#state{admin_state = blocked,
blocking_from = undefined}};
-handle_block(disturbing, Timeout, #state{connection_sup = CSup} = State) ->
+handle_block(disturbing, Timeout, #state{connection_sup = CSup, blocker_ref = Blocker} = State) ->
Manager = self(),
spawn_link(fun() -> wait_for_shutdown(CSup, Manager) end),
- erlang:send_after(Timeout, self(), {block_timeout, disturbing}),
+ erlang:send_after(Timeout, self(), {block_timeout, disturbing, Blocker}),
{noreply, State#state{admin_state = shutting_down}};
handle_block(non_disturbing, infinity,
@@ -354,10 +352,10 @@ handle_block(non_disturbing, infinity,
{noreply, State#state{admin_state = shutting_down}};
handle_block(non_disturbing, Timeout,
- #state{connection_sup = CSup} = State) ->
+ #state{connection_sup = CSup, blocker_ref = Blocker} = State) ->
Manager = self(),
spawn_link(fun() -> wait_for_shutdown(CSup, Manager) end),
- erlang:send_after(Timeout, self(), {block_timeout, non_disturbing}),
+ erlang:send_after(Timeout, self(), {block_timeout, non_disturbing, Blocker}),
{noreply, State#state{admin_state = shutting_down}}.
handle_reload(undefined, #state{config_file = undefined} = State) ->
diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl
index 5ba79b2706..782120c284 100644
--- a/lib/inets/src/http_server/httpd_request.erl
+++ b/lib/inets/src/http_server/httpd_request.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -42,28 +42,28 @@
%%%=========================================================================
%%% Internal application API
%%%=========================================================================
-parse([Bin, MaxSizes]) ->
- ?hdrt("parse", [{bin, Bin}, {max_sizes, MaxSizes}]),
- parse_method(Bin, [], MaxSizes, []);
+parse([Bin, Options]) ->
+ ?hdrt("parse", [{bin, Bin}, {max_sizes, Options}]),
+ parse_method(Bin, [], 0, proplists:get_value(max_method, Options), Options, []);
parse(Unknown) ->
?hdrt("parse", [{unknown, Unknown}]),
exit({bad_args, Unknown}).
%% Functions that may be returned during the decoding process
%% if the input data is incompleate.
-parse_method([Bin, Method, MaxSizes, Result]) ->
- parse_method(Bin, Method, MaxSizes, Result).
+parse_method([Bin, Method, Current, Max, Options, Result]) ->
+ parse_method(Bin, Method, Current, Max, Options, Result).
-parse_uri([Bin, URI, CurrSize, MaxSizes, Result]) ->
- parse_uri(Bin, URI, CurrSize, MaxSizes, Result).
+parse_uri([Bin, URI, Current, Max, Options, Result]) ->
+ parse_uri(Bin, URI, Current, Max, Options, Result).
-parse_version([Bin, Rest, Version, MaxSizes, Result]) ->
- parse_version(<<Rest/binary, Bin/binary>>, Version, MaxSizes,
+parse_version([Bin, Rest, Version, Current, Max, Options, Result]) ->
+ parse_version(<<Rest/binary, Bin/binary>>, Version, Current, Max, Options,
Result).
-parse_headers([Bin, Rest, Header, Headers, CurrSize, MaxSizes, Result]) ->
+parse_headers([Bin, Rest, Header, Headers, Current, Max, Options, Result]) ->
parse_headers(<<Rest/binary, Bin/binary>>,
- Header, Headers, CurrSize, MaxSizes, Result).
+ Header, Headers, Current, Max, Options, Result).
whole_body([Bin, Body, Length]) ->
whole_body(<<Body/binary, Bin/binary>>, Length).
@@ -107,184 +107,186 @@ validate("POST", Uri, "HTTP/1." ++ _N) ->
validate("TRACE", Uri, "HTTP/1." ++ N) when hd(N) >= $1 ->
validate_uri(Uri);
validate(Method, Uri, Version) ->
- {error, {not_supported, {Method, Uri, Version}}}.
-
+ case validate_version(Version) of
+ true ->
+ {error, {not_supported, {Method, Uri, Version}}};
+ false ->
+ {error, {bad_version, Version}}
+ end.
%%----------------------------------------------------------------------
%% The request is passed through the server as a record of type mod
%% create it.
%% ----------------------------------------------------------------------
update_mod_data(ModData, Method, RequestURI, HTTPVersion, Headers)->
- ParsedHeaders = tagup_header(Headers),
- PersistentConn = get_persistens(HTTPVersion, ParsedHeaders,
+ PersistentConn = get_persistens(HTTPVersion, Headers,
ModData#mod.config_db),
{ok, ModData#mod{data = [],
method = Method,
absolute_uri = format_absolute_uri(RequestURI,
- ParsedHeaders),
+ Headers),
request_uri = format_request_uri(RequestURI),
http_version = HTTPVersion,
request_line = Method ++ " " ++ RequestURI ++
" " ++ HTTPVersion,
- parsed_header = ParsedHeaders,
+ parsed_header = Headers,
connection = PersistentConn}}.
%%%========================================================================
%%% Internal functions
%%%========================================================================
-parse_method(<<>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method - empty bin",
- [{method, Method}, {max_sizes, MaxSizes}, {result, Result}]),
- {?MODULE, parse_method, [Method, MaxSizes, Result]};
-parse_method(<<?SP, Rest/binary>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method - SP begin",
- [{rest, Rest},
- {method, Method},
- {max_sizes, MaxSizes},
- {result, Result}]),
- parse_uri(Rest, [], 0, MaxSizes,
+parse_method(<<>>, Method, Current, Max, Options, Result) ->
+ {?MODULE, parse_method, [Method, Current, Max, Options, Result]};
+parse_method(<<?SP, Rest/binary>>, Method, _Current, _Max, Options, Result) ->
+ parse_uri(Rest, [], 0, proplists:get_value(max_uri, Options), Options,
[string:strip(lists:reverse(Method)) | Result]);
-parse_method(<<Octet, Rest/binary>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method",
- [{octet, Octet},
- {rest, Rest},
- {method, Method},
- {max_sizes, MaxSizes},
- {result, Result}]),
- parse_method(Rest, [Octet | Method], MaxSizes, Result).
-
-parse_uri(_, _, CurrSize, {MaxURI, _}, _)
- when (CurrSize > MaxURI) andalso (MaxURI =/= nolimit) ->
- ?hdrt("parse_uri",
- [{current_size, CurrSize},
- {max_uri, MaxURI}]),
+parse_method(<<Octet, Rest/binary>>, Method, Current, Max, Options, Result) when Current =< Max ->
+ parse_method(Rest, [Octet | Method], Current + 1, Max, Options, Result);
+parse_method(_, _, _, Max, _, _) ->
+ %% We do not know the version of the client as it comes after the
+ %% method send the lowest version in the response so that the client
+ %% will be able to handle it.
+ {error, {size_error, Max, 413, "Method unreasonably long"}, lowest_version()}.
+
+parse_uri(_, _, Current, MaxURI, _, _)
+ when (Current > MaxURI) andalso (MaxURI =/= nolimit) ->
%% We do not know the version of the client as it comes after the
%% uri send the lowest version in the response so that the client
%% will be able to handle it.
- HttpVersion = "HTTP/0.9",
- {error, {uri_too_long, MaxURI}, HttpVersion};
-parse_uri(<<>>, URI, CurrSize, MaxSizes, Result) ->
- ?hdrt("parse_uri - empty bin",
- [{uri, URI},
- {current_size, CurrSize},
- {max_sz, MaxSizes},
- {result, Result}]),
- {?MODULE, parse_uri, [URI, CurrSize, MaxSizes, Result]};
-parse_uri(<<?SP, Rest/binary>>, URI, _, MaxSizes, Result) ->
- ?hdrt("parse_uri - SP begin",
- [{uri, URI},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_version(Rest, [], MaxSizes,
+ {error, {size_error, MaxURI, 414, "URI unreasonably long"},lowest_version()};
+parse_uri(<<>>, URI, Current, Max, Options, Result) ->
+ {?MODULE, parse_uri, [URI, Current, Max, Options, Result]};
+parse_uri(<<?SP, Rest/binary>>, URI, _, _, Options, Result) ->
+ parse_version(Rest, [], 0, proplists:get_value(max_version, Options), Options,
[string:strip(lists:reverse(URI)) | Result]);
%% Can happen if it is a simple HTTP/0.9 request e.i "GET /\r\n\r\n"
-parse_uri(<<?CR, _Rest/binary>> = Data, URI, _, MaxSizes, Result) ->
- ?hdrt("parse_uri - CR begin",
- [{uri, URI},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_version(Data, [], MaxSizes,
+parse_uri(<<?CR, _Rest/binary>> = Data, URI, _, _, Options, Result) ->
+ parse_version(Data, [], 0, proplists:get_value(max_version, Options), Options,
[string:strip(lists:reverse(URI)) | Result]);
-parse_uri(<<Octet, Rest/binary>>, URI, CurrSize, MaxSizes, Result) ->
- ?hdrt("parse_uri",
- [{octet, Octet},
- {uri, URI},
- {curr_sz, CurrSize},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_uri(Rest, [Octet | URI], CurrSize + 1, MaxSizes, Result).
-
-parse_version(<<>>, Version, MaxSizes, Result) ->
- {?MODULE, parse_version, [<<>>, Version, MaxSizes, Result]};
-parse_version(<<?LF, Rest/binary>>, Version, MaxSizes, Result) ->
+parse_uri(<<Octet, Rest/binary>>, URI, Current, Max, Options, Result) ->
+ parse_uri(Rest, [Octet | URI], Current + 1, Max, Options, Result).
+
+parse_version(<<>>, Version, Current, Max, Options, Result) ->
+ {?MODULE, parse_version, [<<>>, Version, Current, Max, Options, Result]};
+parse_version(<<?LF, Rest/binary>>, Version, Current, Max, Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_version(<<?CR, ?LF, Rest/binary>>, Version, MaxSizes, Result);
-parse_version(<<?CR, ?LF, Rest/binary>>, Version, MaxSizes, Result) ->
- parse_headers(Rest, [], [], 0, MaxSizes,
+ parse_version(<<?CR, ?LF, Rest/binary>>, Version, Current, Max, Options, Result);
+parse_version(<<?CR, ?LF, Rest/binary>>, Version, _, _, Options, Result) ->
+ parse_headers(Rest, [], [], 0, proplists:get_value(max_header, Options), Options,
[string:strip(lists:reverse(Version)) | Result]);
-parse_version(<<?CR>> = Data, Version, MaxSizes, Result) ->
- {?MODULE, parse_version, [Data, Version, MaxSizes, Result]};
-parse_version(<<Octet, Rest/binary>>, Version, MaxSizes, Result) ->
- parse_version(Rest, [Octet | Version], MaxSizes, Result).
-
-parse_headers(_, _, _, CurrSize, {_, MaxHeaderSize}, Result)
- when CurrSize > MaxHeaderSize, MaxHeaderSize =/= nolimit ->
+parse_version(<<?CR>> = Data, Version, Current, Max, Options, Result) ->
+ {?MODULE, parse_version, [Data, Version, Current, Max, Options, Result]};
+parse_version(<<Octet, Rest/binary>>, Version, Current, Max, Options, Result) when Current =< Max ->
+ parse_version(Rest, [Octet | Version], Current + 1, Max, Options, Result);
+parse_version(_, _, _, Max,_,_) ->
+ {error, {size_error, Max, 413, "Version string unreasonably long"}, lowest_version()}.
+
+parse_headers(_, _, _, Current, Max, _, Result)
+ when Max =/= nolimit andalso Current > Max ->
HttpVersion = lists:nth(3, lists:reverse(Result)),
- {error, {header_too_long, MaxHeaderSize}, HttpVersion};
+ {error, {size_error, Max, 413, "Headers unreasonably long"}, HttpVersion};
-parse_headers(<<>>, Header, Headers, CurrSize, MaxSizes, Result) ->
- {?MODULE, parse_headers, [<<>>, Header, Headers, CurrSize,
- MaxSizes, Result]};
-parse_headers(<<?CR,?LF,?LF,Body/binary>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<>>, Header, Headers, Current, Max, Options, Result) ->
+ {?MODULE, parse_headers, [<<>>, Header, Headers, Current, Max,
+ Options, Result]};
+parse_headers(<<?CR,?LF,?LF,Body/binary>>, [], [], Current, Max, Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], CurrSize,
- MaxSizes, Result);
+ parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], Current, Max,
+ Options, Result);
-parse_headers(<<?LF,?LF,Body/binary>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<?LF,?LF,Body/binary>>, [], [], Current, Max, Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], CurrSize,
- MaxSizes, Result);
+ parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], Current, Max,
+ Options, Result);
-parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], _, _, Result) ->
+parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], _, _, _, Result) ->
NewResult = list_to_tuple(lists:reverse([Body, {#http_request_h{}, []} |
Result])),
{ok, NewResult};
-parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, Header, Headers, _,
- _, Result) ->
- HTTPHeaders = [lists:reverse(Header) | Headers],
- RequestHeaderRcord =
- http_request:headers(HTTPHeaders, #http_request_h{}),
- NewResult =
- list_to_tuple(lists:reverse([Body, {RequestHeaderRcord,
- HTTPHeaders} | Result])),
- {ok, NewResult};
+parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, Header, Headers, _, _,
+ Options, Result) ->
+ Customize = proplists:get_value(customize, Options),
+ case http_request:key_value(lists:reverse(Header)) of
+ undefined -> %% Skip headers with missing :
+ FinalHeaders = lists:filtermap(fun(H) ->
+ httpd_custom:customize_headers(Customize, request_header, H)
+ end,
+ Headers),
+ {ok, list_to_tuple(lists:reverse([Body, {http_request:headers(FinalHeaders, #http_request_h{}), FinalHeaders} | Result]))};
+ NewHeader ->
+ case check_header(NewHeader, Options) of
+ ok ->
+ FinalHeaders = lists:filtermap(fun(H) ->
+ httpd_custom:customize_headers(Customize, request_header, H)
+ end, [NewHeader | Headers]),
+ {ok, list_to_tuple(lists:reverse([Body, {http_request:headers(FinalHeaders,
+ #http_request_h{}),
+ FinalHeaders} | Result]))};
+
+ {error, Reason} ->
+ HttpVersion = lists:nth(3, lists:reverse(Result)),
+ {error, Reason, HttpVersion}
+ end
+ end;
-parse_headers(<<?CR,?LF,?CR>> = Data, Header, Headers, CurrSize,
- MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
- MaxSizes, Result]};
-parse_headers(<<?LF>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<?CR,?LF,?CR>> = Data, Header, Headers, Current, Max,
+ Options, Result) ->
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
+ Options, Result]};
+parse_headers(<<?LF>>, [], [], Current, Max, Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF>>, [], [], CurrSize, MaxSizes, Result);
+ parse_headers(<<?CR,?LF>>, [], [], Current, Max, Options, Result);
%% There where no headers, which is unlikely to happen.
-parse_headers(<<?CR,?LF>>, [], [], _, _, Result) ->
+parse_headers(<<?CR,?LF>>, [], [], _, _, _, Result) ->
NewResult = list_to_tuple(lists:reverse([<<>>, {#http_request_h{}, []} |
Result])),
{ok, NewResult};
-parse_headers(<<?LF>>, Header, Headers, CurrSize,
- MaxSizes, Result) ->
+parse_headers(<<?LF>>, Header, Headers, Current, Max,
+ Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF>>, Header, Headers, CurrSize, MaxSizes, Result);
-
-parse_headers(<<?CR,?LF>> = Data, Header, Headers, CurrSize,
- MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
- MaxSizes, Result]};
-parse_headers(<<?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
- MaxSizes, Result) ->
+ parse_headers(<<?CR,?LF>>, Header, Headers, Current, Max, Options, Result);
+
+parse_headers(<<?CR,?LF>> = Data, Header, Headers, Current, Max,
+ Options, Result) ->
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
+ Options, Result]};
+parse_headers(<<?LF, Octet, Rest/binary>>, Header, Headers, Current, Max,
+ Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
- MaxSizes, Result);
-parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
- MaxSizes, Result) ->
- parse_headers(Rest, [Octet], [lists:reverse(Header) | Headers],
- CurrSize + 1, MaxSizes, Result);
-
-parse_headers(<<?CR>> = Data, Header, Headers, CurrSize,
- MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
- MaxSizes, Result]};
-parse_headers(<<?LF>>, Header, Headers, CurrSize,
- MaxSizes, Result) ->
+ parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, Current, Max,
+ Options, Result);
+parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, _, Max,
+ Options, Result) ->
+ case http_request:key_value(lists:reverse(Header)) of
+ undefined -> %% Skip headers with missing :
+ parse_headers(Rest, [Octet], Headers,
+ 0, Max, Options, Result);
+ NewHeader ->
+ case check_header(NewHeader, Options) of
+ ok ->
+ parse_headers(Rest, [Octet], [NewHeader | Headers],
+ 0, Max, Options, Result);
+ {error, Reason} ->
+ HttpVersion = lists:nth(3, lists:reverse(Result)),
+ {error, Reason, HttpVersion}
+ end
+ end;
+
+parse_headers(<<?CR>> = Data, Header, Headers, Current, Max,
+ Options, Result) ->
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
+ Options, Result]};
+parse_headers(<<?LF>>, Header, Headers, Current, Max,
+ Options, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR, ?LF>>, Header, Headers, CurrSize,
- MaxSizes, Result);
+ parse_headers(<<?CR, ?LF>>, Header, Headers, Current, Max,
+ Options, Result);
-parse_headers(<<Octet, Rest/binary>>, Header, Headers,
- CurrSize, MaxSizes, Result) ->
- parse_headers(Rest, [Octet | Header], Headers, CurrSize + 1,
- MaxSizes, Result).
+parse_headers(<<Octet, Rest/binary>>, Header, Headers, Current,
+ Max, Options, Result) ->
+ parse_headers(Rest, [Octet | Header], Headers, Current + 1, Max,
+ Options, Result).
whole_body(Body, Length) ->
case size(Body) of
@@ -326,6 +328,14 @@ validate_path([".." | Rest], N, RequestURI) ->
validate_path([_ | Rest], N, RequestURI) ->
validate_path(Rest, N + 1, RequestURI).
+validate_version("HTTP/1.1") ->
+ true;
+validate_version("HTTP/1.0") ->
+ true;
+validate_version("HTTP/0.9") ->
+ true;
+validate_version(_) ->
+ false.
%%----------------------------------------------------------------------
%% There are 3 possible forms of the reuqest URI
%%
@@ -406,27 +416,29 @@ get_persistens(HTTPVersion,ParsedHeader,ConfigDB)->
false
end.
-
-%%----------------------------------------------------------------------
-%% tagup_header
-%%
-%% Parses the header of a HTTP request and returns a key,value tuple
-%% list containing Name and Value of each header directive as of:
-%%
-%% Content-Type: multipart/mixed -> {"Content-Type", "multipart/mixed"}
-%%
-%% But in http/1.1 the field-names are case insencitive so now it must be
-%% Content-Type: multipart/mixed -> {"content-type", "multipart/mixed"}
-%% The standard furthermore says that leading and traling white space
-%% is not a part of the fieldvalue and shall therefore be removed.
-%%----------------------------------------------------------------------
-tagup_header([]) -> [];
-tagup_header([Line|Rest]) -> [tag(Line, [])|tagup_header(Rest)].
-
-tag([], Tag) ->
- {http_util:to_lower(lists:reverse(Tag)), ""};
-tag([$:|Rest], Tag) ->
- {http_util:to_lower(lists:reverse(Tag)), string:strip(Rest)};
-tag([Chr|Rest], Tag) ->
- tag(Rest, [Chr|Tag]).
-
+lowest_version()->
+ "HTTP/0.9".
+
+check_header({"content-length", Value}, Maxsizes) ->
+ Max = proplists:get_value(max_content_length, Maxsizes),
+ MaxLen = length(integer_to_list(Max)),
+ case length(Value) =< MaxLen of
+ true ->
+ try
+ list_to_integer(Value)
+ of
+ I when I>= 0 ->
+ ok;
+ _ ->
+ {error, {size_error, Max, 411, "negative content-length"}}
+ catch _:_ ->
+ {error, {size_error, Max, 411, "content-length not an integer"}}
+ end;
+ false ->
+ {error, {size_error, Max, 413, "content-length unreasonably long"}}
+ end;
+check_header(_, _) ->
+ ok.
+
+
+
diff --git a/lib/inets/src/http_server/httpd_request_handler.erl b/lib/inets/src/http_server/httpd_request_handler.erl
index bd37066ff6..9947e17b47 100644
--- a/lib/inets/src/http_server/httpd_request_handler.erl
+++ b/lib/inets/src/http_server/httpd_request_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,6 +35,7 @@
-include("http_internal.hrl").
-include("httpd_internal.hrl").
+-define(HANDSHAKE_TIMEOUT, 5000).
-record(state, {mod, %% #mod{}
manager, %% pid()
status, %% accept | busy | blocked
@@ -95,16 +96,15 @@ init([Manager, ConfigDB, AcceptTimeout]) ->
proc_lib:init_ack({ok, self()}),
{SocketType, Socket} = await_socket_ownership_transfer(AcceptTimeout),
-
- TimeOut = httpd_util:lookup(ConfigDB, keep_alive_timeout, 150000),
- Then = erlang:now(),
- case http_transport:negotiate(SocketType, Socket, TimeOut) of
+ %%Timeout value is in seconds we want it in milliseconds
+ KeepAliveTimeOut = 1000 * httpd_util:lookup(ConfigDB, keep_alive_timeout, 150),
+
+ case http_transport:negotiate(SocketType, Socket, ?HANDSHAKE_TIMEOUT) of
{error, _Error} ->
exit(shutdown); %% Can be 'normal'.
ok ->
- NewTimeout = TimeOut - timer:now_diff(now(),Then) div 1000,
- continue_init(Manager, ConfigDB, SocketType, Socket, NewTimeout)
+ continue_init(Manager, ConfigDB, SocketType, Socket, KeepAliveTimeOut)
end.
continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) ->
@@ -120,10 +120,17 @@ continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) ->
MaxHeaderSize = max_header_size(ConfigDB),
MaxURISize = max_uri_size(ConfigDB),
NrOfRequest = max_keep_alive_request(ConfigDB),
-
+ MaxContentLen = max_content_length(ConfigDB),
+ Customize = customize(ConfigDB),
+
{_, Status} = httpd_manager:new_connection(Manager),
- MFA = {httpd_request, parse, [{MaxURISize, MaxHeaderSize}]},
+ MFA = {httpd_request, parse, [[{max_uri, MaxURISize}, {max_header, MaxHeaderSize},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, MaxContentLen},
+ {customize, Customize}
+ ]]},
State = #state{mod = Mod,
manager = Manager,
@@ -207,23 +214,15 @@ handle_info({Proto, Socket, Data},
set_new_data_size(cancel_request_timeout(State), NewDataSize)
end,
handle_http_msg(Result, NewState);
-
- {error, {uri_too_long, MaxSize}, Version} ->
+ {error, {size_error, MaxSize, ErrCode, ErrStr}, Version} ->
NewModData = ModData#mod{http_version = Version},
- httpd_response:send_status(NewModData, 414, "URI too long"),
- Reason = io_lib:format("Uri too long, max size is ~p~n",
- [MaxSize]),
- error_log(Reason, NewModData),
- {stop, normal, State#state{response_sent = true,
- mod = NewModData}};
- {error, {header_too_long, MaxSize}, Version} ->
- NewModData = ModData#mod{http_version = Version},
- httpd_response:send_status(NewModData, 413, "Header too long"),
- Reason = io_lib:format("Header too long, max size is ~p~n",
- [MaxSize]),
+ httpd_response:send_status(NewModData, ErrCode, ErrStr),
+ Reason = io_lib:format("~p: ~p max size is ~p~n",
+ [ErrCode, ErrStr, MaxSize]),
error_log(Reason, NewModData),
{stop, normal, State#state{response_sent = true,
mod = NewModData}};
+
NewMFA ->
http_transport:setopts(SockType, Socket, [{active, once}]),
case NewDataSize of
@@ -382,6 +381,11 @@ handle_http_msg({Method, Uri, Version, {RecordHeaders, Headers}, Body},
400, URI),
Reason = io_lib:format("Malformed syntax in URI: ~p~n", [URI]),
error_log(Reason, ModData),
+ {stop, normal, State#state{response_sent = true}};
+ {error, {bad_version, Ver}} ->
+ httpd_response:send_status(ModData#mod{http_version = "HTTP/0.9"}, 400, Ver),
+ Reason = io_lib:format("Malformed syntax version: ~p~n", [Ver]),
+ error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}}
end;
handle_http_msg({ChunkedHeaders, Body},
@@ -447,8 +451,7 @@ handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}};
_ ->
- Length =
- list_to_integer(Headers#http_request_h.'content-length'),
+ Length = list_to_integer(Headers#http_request_h.'content-length'),
case ((Length =< MaxBodySize) or (MaxBodySize == nolimit)) of
true ->
case httpd_request:whole_body(Body, Length) of
@@ -457,7 +460,7 @@ handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
ModData#mod.socket,
[{active, once}]),
{noreply, State#state{mfa =
- {Module, Function, Args}}};
+ {Module, Function, Args}}};
{ok, NewBody} ->
handle_response(
@@ -474,7 +477,7 @@ handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
handle_expect(#state{headers = Headers, mod =
#mod{config_db = ConfigDB} = ModData} = State,
MaxBodySize) ->
- Length = Headers#http_request_h.'content-length',
+ Length = list_to_integer(Headers#http_request_h.'content-length'),
case expect(Headers, ModData#mod.http_version, ConfigDB) of
continue when (MaxBodySize > Length) orelse (MaxBodySize =:= nolimit) ->
httpd_response:send_status(ModData, 100, ""),
@@ -548,8 +551,15 @@ handle_next_request(#state{mod = #mod{connection = true} = ModData,
init_data = ModData#mod.init_data},
MaxHeaderSize = max_header_size(ModData#mod.config_db),
MaxURISize = max_uri_size(ModData#mod.config_db),
-
- MFA = {httpd_request, parse, [{MaxURISize, MaxHeaderSize}]},
+ MaxContentLen = max_content_length(ModData#mod.config_db),
+ Customize = customize(ModData#mod.config_db),
+
+ MFA = {httpd_request, parse, [[{max_uri, MaxURISize}, {max_header, MaxHeaderSize},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, MaxContentLen},
+ {customize, Customize}
+ ]]},
TmpState = State#state{mod = NewModData,
mfa = MFA,
max_keep_alive_request = decrease(Max),
@@ -632,3 +642,8 @@ max_body_size(ConfigDB) ->
max_keep_alive_request(ConfigDB) ->
httpd_util:lookup(ConfigDB, max_keep_alive_request, infinity).
+max_content_length(ConfigDB) ->
+ httpd_util:lookup(ConfigDB, max_content_length, ?HTTP_MAX_CONTENT_LENGTH).
+
+customize(ConfigDB) ->
+ httpd_util:lookup(ConfigDB, customize, httpd_custom).
diff --git a/lib/inets/src/http_server/httpd_response.erl b/lib/inets/src/http_server/httpd_response.erl
index 0895729d05..71dc05e46d 100644
--- a/lib/inets/src/http_server/httpd_response.erl
+++ b/lib/inets/src/http_server/httpd_response.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -176,7 +176,7 @@ send_header(#mod{socket_type = Type,
StatusLine = [NewVer, " ", io_lib:write(NewStatusCode), " ",
httpd_util:reason_phrase(NewStatusCode), ?CRLF],
ConnectionHeader = get_connection(Conn, NewVer),
- Head = list_to_binary([StatusLine, Headers, ConnectionHeader , ?CRLF]),
+ Head = [StatusLine, Headers, ConnectionHeader , ?CRLF],
httpd_socket:deliver(Type, Sock, Head).
map_status_code("HTTP/1.0", Code)
@@ -286,42 +286,21 @@ create_header(ConfigDb, KeyValueTupleHeaders) ->
Date = httpd_util:rfc1123_date(),
ContentType = "text/html",
Server = server(ConfigDb),
- NewHeaders = add_default_headers([{"date", Date},
- {"content-type", ContentType},
- {"server", Server}],
- KeyValueTupleHeaders),
- lists:map(fun fix_header/1, NewHeaders).
-
-
+ Headers0 = add_default_headers([{"date", Date},
+ {"content-type", ContentType}
+ | if Server=="" -> [];
+ true -> [{"server", Server}]
+ end
+ ],
+ KeyValueTupleHeaders),
+ CustomizeCB = httpd_util:lookup(ConfigDb, customize, httpd_custom),
+ lists:filtermap(fun(H) ->
+ httpd_custom:customize_headers(CustomizeCB, response_header, H)
+ end,
+ [Header || Header <- Headers0]).
server(ConfigDb) ->
httpd_util:lookup(ConfigDb, server, ?SERVER_SOFTWARE).
-fix_header({Key0, Value}) ->
- %% make sure first letter is capital
- Words1 = string:tokens(Key0, "-"),
- Words2 = upify(Words1, []),
- Key = new_key(Words2),
- Key ++ ": " ++ Value ++ ?CRLF .
-
-new_key([]) ->
- "";
-new_key([W]) ->
- W;
-new_key([W1,W2]) ->
- W1 ++ "-" ++ W2;
-new_key([W|R]) ->
- W ++ "-" ++ new_key(R).
-
-upify([], Acc) ->
- lists:reverse(Acc);
-upify([Key|Rest], Acc) ->
- upify(Rest, [upify2(Key)|Acc]).
-
-upify2([C|Rest]) when (C >= $a) andalso (C =< $z) ->
- [C-($a-$A)|Rest];
-upify2(Str) ->
- Str.
-
add_default_headers([], Headers) ->
Headers;
diff --git a/lib/inets/src/http_server/httpd_util.erl b/lib/inets/src/http_server/httpd_util.erl
index b0b18b9c3d..0d04a75205 100644
--- a/lib/inets/src/http_server/httpd_util.erl
+++ b/lib/inets/src/http_server/httpd_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -206,9 +206,6 @@ message(413, Reason,_) ->
"Entity: " ++ html_encode(Reason);
message(414,ReasonPhrase,_) ->
"Message " ++ html_encode(ReasonPhrase) ++ ".";
-message(416,ReasonPhrase,_) ->
- html_encode(ReasonPhrase);
-
message(500,_,ConfigDB) ->
ServerAdmin=lookup(ConfigDB,server_admin,"unknown@unknown"),
"The server encountered an internal error or "
@@ -233,7 +230,9 @@ message(501,{Method, RequestURI, HTTPVersion}, _ConfigDB) ->
end;
message(503, String, _ConfigDB) ->
- "This service in unavailable due to: " ++ html_encode(String).
+ "This service in unavailable due to: " ++ html_encode(String);
+message(_, ReasonPhrase, _) ->
+ html_encode(ReasonPhrase).
maybe_encode(URI) ->
Decoded = try http_uri:decode(URI) of
diff --git a/lib/inets/src/http_server/mod_alias.erl b/lib/inets/src/http_server/mod_alias.erl
index 0b9fe4cfe0..5039cd56b5 100644
--- a/lib/inets/src/http_server/mod_alias.erl
+++ b/lib/inets/src/http_server/mod_alias.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -55,6 +55,7 @@ do(#mod{data = Data} = Info) ->
do_alias(#mod{config_db = ConfigDB,
request_uri = ReqURI,
+ socket_type = SocketType,
data = Data}) ->
{ShortPath, Path, AfterPath} =
real_name(ConfigDB, ReqURI, which_alias(ConfigDB)),
@@ -70,8 +71,9 @@ do_alias(#mod{config_db = ConfigDB,
(LastChar =/= $/)) ->
?hdrt("directory and last-char is a /", []),
ServerName = which_server_name(ConfigDB),
- Port = port_string( which_port(ConfigDB) ),
- URL = "http://" ++ ServerName ++ Port ++ ReqURI ++ "/",
+ Port = port_string(which_port(ConfigDB)),
+ Protocol = get_protocol(SocketType),
+ URL = Protocol ++ ServerName ++ Port ++ ReqURI ++ "/",
ReasonPhrase = httpd_util:reason_phrase(301),
Message = httpd_util:message(301, URL, ConfigDB),
{proceed,
@@ -94,6 +96,12 @@ port_string(80) ->
port_string(Port) ->
":" ++ integer_to_list(Port).
+get_protocol(ip_comm) ->
+ "http://";
+get_protocol(_) ->
+ %% Should clean up to have only one ssl type essl vs ssl is not relevant any more
+ "https://".
+
%% real_name
real_name(ConfigDB, RequestURI, []) ->
diff --git a/lib/inets/src/inets_app/inets.app.src b/lib/inets/src/inets_app/inets.app.src
index a6dd364c2d..48660bec62 100644
--- a/lib/inets/src/inets_app/inets.app.src
+++ b/lib/inets/src/inets_app/inets.app.src
@@ -1,7 +1,7 @@
%% This is an -*- erlang -*- file.
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -61,6 +61,7 @@
httpd_cgi,
httpd_connection_sup,
httpd_conf,
+ httpd_custom,
httpd_esi,
httpd_example,
httpd_file,
@@ -110,4 +111,6 @@
{registered,[inets_sup, httpc_manager]},
%% If the "new" ssl is used then 'crypto' must be started before inets.
{applications,[kernel,stdlib]},
- {mod,{inets_app,[]}}]}.
+ {mod,{inets_app,[]}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","runtime_tools-1.8.14",
+ "mnesia-4.12","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index c63dcafa6c..90524ac367 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -1,7 +1,7 @@
-%% This is an -*- erlang -*- file.
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,11 +15,11 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
[
- {<<"5\\.*">>, [{restart_application, inets}]}
- ],
+ {<<"5\\..*">>,[{restart_application, inets}]}
+ ],
[
- {<<"5\\.*">>, [{restart_application, inets}]}
-]}.
+ {<<"5\\..*">>,[{restart_application, inets}]}
+ ]
+}.
diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile
index c156b34406..609396273d 100644
--- a/lib/inets/test/Makefile
+++ b/lib/inets/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/inets/test/ftp_property_test_SUITE.erl b/lib/inets/test/ftp_property_test_SUITE.erl
new file mode 100644
index 0000000000..c7077421f4
--- /dev/null
+++ b/lib/inets/test/ftp_property_test_SUITE.erl
@@ -0,0 +1,52 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+%%% Run like this:
+%%% ct:run_test([{suite,"ftp_property_test_SUITE"}, {logdir,"/ldisk/OTP/LOG"}]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% WARNING %%%
+%%% %%%
+%%% This is experimental code which may be changed or removed %%%
+%%% anytime without any warning. %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-module(ftp_property_test_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+all() -> [prop_ftp_case].
+
+
+init_per_suite(Config) ->
+ inets:start(),
+ ct_property_test:init_per_suite(Config).
+
+
+%%%---- test case
+prop_ftp_case(Config) ->
+ ct_property_test:quickcheck(
+ ftp_simple_client_server:prop_ftp(Config),
+ Config
+ ).
diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
index 35f21cc74d..daee1bdcdc 100644
--- a/lib/inets/test/ftp_suite_lib.erl
+++ b/lib/inets/test/ftp_suite_lib.erl
@@ -1266,6 +1266,8 @@ read_log_6035([]) ->
%%--------------------------------------------------------------------
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.
@@ -1278,6 +1280,7 @@ do_pwd(Pid) ->
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) ->
@@ -1294,11 +1297,14 @@ do_ls(Pid) ->
%% 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
@@ -1324,6 +1330,8 @@ do_rename(Pid, Config) ->
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
@@ -1338,6 +1346,7 @@ do_delete(Pid, Config) ->
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.
@@ -1348,6 +1357,8 @@ do_mkdir(Pid) ->
integer_to_list(B) ++ "_" ++ integer_to_list(C),
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),
@@ -1363,6 +1374,7 @@ do_send(Pid, Config) ->
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),
@@ -1392,6 +1404,7 @@ do_append(Pid, Config) ->
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),
@@ -1413,6 +1426,7 @@ do_send_bin(Pid, Config) ->
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),
@@ -1426,6 +1440,7 @@ do_append_bin(Pid, Config) ->
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
@@ -1438,6 +1453,7 @@ do_send_chunk(Pid, 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),
@@ -1454,6 +1470,7 @@ 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))),
@@ -1480,6 +1497,7 @@ do_recv(Pid, Config) ->
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),
@@ -1495,6 +1513,7 @@ do_recv_bin(Pid, Config) ->
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),
@@ -1520,6 +1539,7 @@ do_recv_chunk(Pid, Config) ->
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
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index c5920a3968..5952e9fd6e 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -355,8 +355,13 @@ http_request(Config) when is_list(Config) ->
"http://www.erlang.org",
"HTTP/1.1",
{#http_request_h{host = "www.erlang.org", te = []},
- ["te: ","host:www.erlang.org"]}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead),
+ [{"te", []}, {"host", "www.erlang.org"}]}, <<>>} =
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH}
+ ]],
+ HttpHead),
HttpHead1 = ["GET http://www.erlang.org HTTP/1.1" ++
[?CR], [?LF, ?CR, ?LF]],
@@ -364,7 +369,11 @@ http_request(Config) when is_list(Config) ->
"http://www.erlang.org",
"HTTP/1.1",
{#http_request_h{}, []}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead1),
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH}
+ ]], HttpHead1),
HttpHead2 = ["GET http://www.erlang.org HTTP/1.1" ++
@@ -373,7 +382,11 @@ http_request(Config) when is_list(Config) ->
"http://www.erlang.org",
"HTTP/1.1",
{#http_request_h{}, []}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead2),
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH}
+ ]], HttpHead2),
%% Note the following body is not related to the headers above
HttpBody = ["<HTML>\n<HEAD>\n<TITLE> dummy </TITLE>\n</HEAD>\n<BODY>\n",
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index fe6edd504e..4b1c6931d2 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,15 +27,14 @@
-include_lib("kernel/include/file.hrl").
-include_lib("common_test/include/ct.hrl").
-include("inets_test_lib.hrl").
-
+-include("http_internal.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
-define(URL_START, "http://").
-define(TLS_URL_START, "https://").
-define(NOT_IN_USE_PORT, 8997).
--define(LF, $\n).
--define(HTTP_MAX_HEADER_SIZE, 10240).
+
-record(sslsocket, {fd = nil, pid = nil}).
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -91,8 +90,12 @@ only_simulated() ->
[
cookie,
cookie_profile,
+ empty_set_cookie,
+ invalid_set_cookie,
trace,
stream_once,
+ stream_single_chunk,
+ stream_no_length,
no_content_204,
tolerate_missing_CR,
userinfo,
@@ -104,6 +107,7 @@ only_simulated() ->
remote_socket_close,
remote_socket_close_async,
transfer_encoding,
+ transfer_encoding_identity,
redirect_loop,
redirect_moved_permanently,
redirect_multiple_choises,
@@ -296,6 +300,9 @@ trace(Config) when is_list(Config) ->
pipeline(Config) when is_list(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), []},
{ok, _} = httpc:request(get, Request, [], [], pipeline),
+
+ %% Make sure pipeline session is registerd
+ test_server:sleep(4000),
keep_alive_requests(Request, pipeline).
%%--------------------------------------------------------------------
@@ -303,6 +310,9 @@ pipeline(Config) when is_list(Config) ->
persistent_connection(Config) when is_list(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), []},
{ok, _} = httpc:request(get, Request, [], [], persistent),
+
+ %% Make sure pipeline session is registerd
+ test_server:sleep(4000),
keep_alive_requests(Request, persistent).
%%-------------------------------------------------------------------------
@@ -379,6 +389,22 @@ stream_once(Config) when is_list(Config) ->
Request2 = {url(group_name(Config), "/once_chunked.html", Config), []},
stream_test(Request2, {stream, {self, once}}).
+%%-------------------------------------------------------------------------
+stream_single_chunk() ->
+ [{doc, "Test the option stream for asynchrony requests"}].
+stream_single_chunk(Config) when is_list(Config) ->
+ Request = {url(group_name(Config), "/single_chunk.html", Config), []},
+ stream_test(Request, {stream, self}).
+%%-------------------------------------------------------------------------
+stream_no_length() ->
+ [{doc, "Test the option stream for asynchrony requests with HTTP 1.0 "
+ "body end on closed connection" }].
+stream_no_length(Config) when is_list(Config) ->
+ Request1 = {url(group_name(Config), "/http_1_0_no_length_single.html", Config), []},
+ stream_test(Request1, {stream, self}),
+ Request2 = {url(group_name(Config), "/http_1_0_no_length_multiple.html", Config), []},
+ stream_test(Request2, {stream, self}).
+
%%-------------------------------------------------------------------------
redirect_multiple_choises() ->
@@ -530,6 +556,31 @@ cookie_profile(Config) when is_list(Config) ->
inets:stop(httpc, cookie_test).
%%-------------------------------------------------------------------------
+empty_set_cookie() ->
+ [{doc, "Test empty Set-Cookie header."}].
+empty_set_cookie(Config) when is_list(Config) ->
+ ok = httpc:set_options([{cookies, enabled}]),
+
+ Request0 = {url(group_name(Config), "/empty_set_cookie.html", Config), []},
+
+ {ok, {{_,200,_}, [_ | _], [_|_]}}
+ = httpc:request(get, Request0, [], []),
+
+ ok = httpc:set_options([{cookies, disabled}]).
+
+%%-------------------------------------------------------------------------
+invalid_set_cookie(doc) ->
+ ["Test ignoring invalid Set-Cookie header"];
+invalid_set_cookie(Config) when is_list(Config) ->
+ ok = httpc:set_options([{cookies, enabled}]),
+
+ URL = url(group_name(Config), "/invalid_set_cookie.html", Config),
+ {ok, {{_,200,_}, [_|_], [_|_]}} =
+ httpc:request(get, {URL, []}, [], []),
+
+ ok = httpc:set_options([{cookies, disabled}]).
+
+%%-------------------------------------------------------------------------
headers_as_is(doc) ->
["Test the option headers_as_is"];
headers_as_is(Config) when is_list(Config) ->
@@ -624,6 +675,12 @@ transfer_encoding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
+transfer_encoding_identity(Config) when is_list(Config) ->
+ URL = url(group_name(Config), "/identity_transfer_encoding.html", Config),
+ {ok, {{_,200,_}, [_|_], "IDENTITY"}} = httpc:request(URL).
+
+%%-------------------------------------------------------------------------
+
empty_response_header() ->
[{doc, "Test the case that the HTTP server does not send any headers. Solves OTP-6830"}].
empty_response_header(Config) when is_list(Config) ->
@@ -1020,7 +1077,7 @@ stream_test(Request, To) ->
ct:fail(Msg)
end,
- Body == binary_to_list(StreamedBody).
+ Body = binary_to_list(StreamedBody).
url(http, End, Config) ->
Port = ?config(port, Config),
@@ -1199,8 +1256,14 @@ dummy_server_init(Caller, ip_comm, Inet, _) ->
{ok, ListenSocket} = gen_tcp:listen(0, [Inet | BaseOpts]),
{ok, Port} = inet:port(ListenSocket),
Caller ! {port, Port},
- dummy_ipcomm_server_loop({httpd_request, parse, [?HTTP_MAX_HEADER_SIZE]},
- [], ListenSocket);
+ dummy_ipcomm_server_loop({httpd_request, parse, [[{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH},
+ {customize, httpd_custom}
+ ]]},
+ [], ListenSocket);
dummy_server_init(Caller, ssl, Inet, SSLOptions) ->
BaseOpts = [binary, {reuseaddr,true}, {active, false} |
@@ -1211,7 +1274,13 @@ dummy_ssl_server_init(Caller, BaseOpts, Inet) ->
{ok, ListenSocket} = ssl:listen(0, [Inet | BaseOpts]),
{ok, {_, Port}} = ssl:sockname(ListenSocket),
Caller ! {port, Port},
- dummy_ssl_server_loop({httpd_request, parse, [?HTTP_MAX_HEADER_SIZE]},
+ dummy_ssl_server_loop({httpd_request, parse, [[{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH},
+ {customize, httpd_custom}
+ ]]},
[], ListenSocket).
dummy_ipcomm_server_loop(MFA, Handlers, ListenSocket) ->
@@ -1241,6 +1310,7 @@ dummy_ssl_server_loop(MFA, Handlers, ListenSocket) ->
From ! {stopped, self()}
after 0 ->
{ok, Socket} = ssl:transport_accept(ListenSocket),
+ ok = ssl:ssl_accept(Socket, infinity),
HandlerPid = dummy_request_handler(MFA, Socket),
ssl:controlling_process(Socket, HandlerPid),
HandlerPid ! ssl_controller,
@@ -1287,10 +1357,22 @@ handle_request(Module, Function, Args, Socket) ->
stop ->
stop;
<<>> ->
- {httpd_request, parse, [[<<>>, ?HTTP_MAX_HEADER_SIZE]]};
+ {httpd_request, parse, [[{max_uri,?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH},
+ {customize, httpd_custom}
+ ]]};
Data ->
handle_request(httpd_request, parse,
- [Data |[?HTTP_MAX_HEADER_SIZE]], Socket)
+ [Data, [{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_content_length, ?HTTP_MAX_CONTENT_LENGTH},
+ {customize, httpd_custom}
+ ]], Socket)
end;
NewMFA ->
NewMFA
@@ -1380,7 +1462,7 @@ dummy_ssl_server_hang_loop(_) ->
ensure_host_header_with_port([]) ->
false;
-ensure_host_header_with_port(["host: " ++ Host| _]) ->
+ensure_host_header_with_port([{"host", Host}| _]) ->
case string:tokens(Host, [$:]) of
[_ActualHost, _Port] ->
true;
@@ -1392,7 +1474,7 @@ ensure_host_header_with_port([_|T]) ->
auth_header([]) ->
auth_header_not_found;
-auth_header(["authorization:" ++ Value | _]) ->
+auth_header([{"authorization", Value} | _]) ->
{ok, string:strip(Value)};
auth_header([_ | Tail]) ->
auth_header(Tail).
@@ -1409,7 +1491,7 @@ handle_auth("Basic " ++ UserInfo, Challange, DefaultResponse) ->
check_cookie([]) ->
ct:fail(no_cookie_header);
-check_cookie(["cookie:" ++ _Value | _]) ->
+check_cookie([{"cookie", _} | _]) ->
ok;
check_cookie([_Head | Tail]) ->
check_cookie(Tail).
@@ -1609,6 +1691,13 @@ handle_uri(_,"/capital_transfer_encoding.html",_,_,Socket,_) ->
send(Socket, http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/identity_transfer_encoding.html",_,_,_,_) ->
+ "HTTP/1.0 200 OK\r\n"
+ "Transfer-Encoding:identity\r\n"
+ "Content-Length:8\r\n"
+ "\r\n"
+ "IDENTITY";
+
handle_uri(_,"/cookie.html",_,_,_,_) ->
"HTTP/1.1 200 ok\r\n" ++
"set-cookie:" ++ "test_cookie=true; path=/;" ++
@@ -1616,6 +1705,20 @@ handle_uri(_,"/cookie.html",_,_,_,_) ->
"Content-Length:32\r\n\r\n"++
"<HTML><BODY>foobar</BODY></HTML>";
+handle_uri(_,"/empty_set_cookie.html",_,_,_,_) ->
+ "HTTP/1.1 200 ok\r\n" ++
+ "set-cookie: \r\n" ++
+ "Content-Length:32\r\n\r\n"++
+ "<HTML><BODY>foobar</BODY></HTML>";
+
+handle_uri(_,"/invalid_set_cookie.html",_,_,_,_) ->
+ "HTTP/1.1 200 ok\r\n" ++
+ "set-cookie: =\r\n" ++
+ "set-cookie: name=\r\n" ++
+ "set-cookie: name-or-value\r\n" ++
+ "Content-Length:32\r\n\r\n"++
+ "<HTML><BODY>foobar</BODY></HTML>";
+
handle_uri(_,"/missing_crlf.html",_,_,_,_) ->
"HTTP/1.1 200 ok" ++
"Content-Length:32\r\n" ++
@@ -1635,6 +1738,30 @@ handle_uri(_,"/once_chunked.html",_,_,Socket,_) ->
http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/single_chunk.html",_,_,Socket,_) ->
+ Chunk = "HTTP/1.1 200 ok\r\n" ++
+ "Transfer-Encoding:Chunked\r\n\r\n" ++
+ http_chunk:encode("<HTML><BODY>fo") ++
+ http_chunk:encode("obar</BODY></HTML>") ++
+ http_chunk:encode_last(),
+ send(Socket, Chunk);
+
+handle_uri(_,"/http_1_0_no_length_single.html",_,_,Socket,_) ->
+ Body = "HTTP/1.0 200 ok\r\n"
+ "Content-type:text/plain\r\n\r\n"
+ "single packet",
+ send(Socket, Body),
+ close(Socket);
+
+handle_uri(_,"/http_1_0_no_length_multiple.html",_,_,Socket,_) ->
+ Head = "HTTP/1.0 200 ok\r\n"
+ "Content-type:text/plain\r\n\r\n"
+ "multiple packets, ",
+ send(Socket, Head),
+ %% long body to make sure it will be sent in multiple tcp packets
+ send(Socket, string:copies("other multiple packets ", 200)),
+ close(Socket);
+
handle_uri(_,"/once.html",_,_,Socket,_) ->
Head = "HTTP/1.1 200 ok\r\n" ++
"Content-Length:32\r\n\r\n",
diff --git a/lib/inets/test/httpd_1_0.erl b/lib/inets/test/httpd_1_0.erl
index 53f23b12e0..0836c9e881 100644
--- a/lib/inets/test/httpd_1_0.erl
+++ b/lib/inets/test/httpd_1_0.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-module(httpd_1_0).
--export([host/4]).
+-export([host/4, trace/4]).
%%-------------------------------------------------------------------------
%% Test cases
@@ -31,3 +31,8 @@ host(Type, Port, Host, Node) ->
"GET / HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]).
+trace(Type, Port, Host, Node)->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "TRACE / HTTP/1.0\r\n\r\n",
+ [{statuscode, 501},
+ {version, "HTTP/1.0"}]).
diff --git a/lib/inets/test/httpd_1_1.erl b/lib/inets/test/httpd_1_1.erl
index 4b2a5f619d..6a5fc4a18f 100644
--- a/lib/inets/test/httpd_1_1.erl
+++ b/lib/inets/test/httpd_1_1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-include_lib("kernel/include/file.hrl").
--export([host/4, chunked/4, expect/4, range/4, if_test/5, http_trace/4,
+-export([host/4, chunked/4, expect/4, range/4, if_test/5, trace/4,
head/4, mod_cgi_chunked_encoding_test/5]).
%% -define(all_keys_lower_case,true).
@@ -152,13 +152,13 @@ if_test(Type, Port, Host, Node, DocRoot)->
calendar:datetime_to_gregorian_seconds(FileInfo#file_info.mtime),
Mod = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
- CreatedSec-1)),
+ CreatedSec-1)),
%% Test that we get the data when the file is modified
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:" ++ Host ++
- "\r\nIf-Modified-Since:" ++
- Mod ++ "\r\n\r\n",
+ "\r\nIf-Modified-Since:" ++
+ Mod ++ "\r\n\r\n",
[{statuscode, 200}]),
Mod1 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec+100)),
@@ -168,74 +168,69 @@ if_test(Type, Port, Host, Node, DocRoot)->
++ Mod1 ++"\r\n\r\n",
[{statuscode, 304}]),
-
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:" ++ Host ++
- "\r\nIf-Modified-Since:" ++
- "AAA[...]AAAA" ++ "\r\n\r\n",
+ "\r\nIf-Modified-Since:" ++
+ "AAA[...]AAAA" ++ "\r\n\r\n",
[{statuscode, 400}]),
-
-
- Mod2 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
+
+ Mod2 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec+1)),
- %% Control that the If-Unmodified-Header lmits the response
- ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++
- "\r\nIf-Unmodified-Since:" ++ Mod2
- ++ "\r\n\r\n",
- [{statuscode, 200}]),
- Mod3 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
+ %% Control that the If-Unmodified-Header lmits the response
+ ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++
+ "\r\nIf-Unmodified-Since:" ++ Mod2
+ ++ "\r\n\r\n",
+ [{statuscode, 200}]),
+ Mod3 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec-1)),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++
- "\r\nIf-Unmodified-Since:"++ Mod3
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++
+ "\r\nIf-Unmodified-Since:"++ Mod3
++"\r\n\r\n",
- [{statuscode, 412}]),
+ [{statuscode, 412}]),
- %% Control that we get the body when the etag match
+ %% Control that we get the body when the etag match
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:" ++ Host
- ++"\r\n"++
- "If-Match:"++
- httpd_util:create_etag(FileInfo)++
- "\r\n\r\n",
- [{statuscode, 200}]),
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:" ++
- Host ++ "\r\n"++
- "If-Match:NotEtag\r\n\r\n",
- [{statuscode, 412}]),
+ "GET / HTTP/1.1\r\nHost:" ++ Host
+ ++"\r\n"++
+ "If-Match:"++
+ httpd_util:create_etag(FileInfo)++
+ "\r\n\r\n",
+ [{statuscode, 200}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET / HTTP/1.1\r\nHost:" ++
+ Host ++ "\r\n"++
+ "If-Match:NotEtag\r\n\r\n",
+ [{statuscode, 412}]),
- %% Control the response when the if-none-match header is there
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++"\r\n"++
- "If-None-Match:NoTaag," ++
- httpd_util:create_etag(FileInfo) ++
- "\r\n\r\n",
- [{statuscode, 304}]),
+ %% Control the response when the if-none-match header is there
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++"\r\n"++
+ "If-None-Match:NoTaag," ++
+ httpd_util:create_etag(FileInfo) ++
+ "\r\n\r\n",
+ [{statuscode, 304}]),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:"
- ++ Host ++ "\r\n"++
- "If-None-Match:NotEtag,"
- "NeihterEtag\r\n\r\n",
+ ++ Host ++ "\r\n"++
+ "If-None-Match:NotEtag,"
+ "NeihterEtag\r\n\r\n",
[{statuscode,200}]),
ok.
-
-http_trace(Type, Port, Host, Node)->
+
+trace(Type, Port, Host, Node)->
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"TRACE / HTTP/1.1\r\n" ++
"Host:" ++ Host ++ "\r\n" ++
"Max-Forwards:2\r\n\r\n",
- [{statuscode, 200}]),
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "TRACE / HTTP/1.0\r\n\r\n",
- [{statuscode, 501},
- {version, "HTTP/1.0"}]).
+ [{statuscode, 200}]).
head(Type, Port, Host, Node)->
%% mod_include
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
@@ -283,7 +278,7 @@ mod_cgi_chunked_encoding_test(Type, Port, Host, Node, [Request| Rest])->
%%--------------------------------------------------------------------
validateRangeRequest(Socket,Response,ValidBody,C,O,DE)->
receive
- {tcp,Socket,Data} ->
+ {_,Socket,Data} ->
case string:str(Data,"\r\n") of
0->
validateRangeRequest(Socket,
@@ -312,7 +307,7 @@ validateRangeRequest1(Socket, Response, ValidBody) ->
case end_of_header(Response) of
false ->
receive
- {tcp,Socket,Data} ->
+ {_,Socket,Data} ->
validateRangeRequest1(Socket, Response ++ Data,
ValidBody);
_->
@@ -331,10 +326,10 @@ validateRangeRequest2(Socket, Head, Body, ValidBody, {multiPart,Boundary})->
validateMultiPartRangeRequest(Body, ValidBody, Boundary);
false->
receive
- {tcp, Socket, Data} ->
+ {_, Socket, Data} ->
validateRangeRequest2(Socket, Head, Body ++ Data,
ValidBody, {multiPart, Boundary});
- {tcp_closed, Socket} ->
+ {_, Socket} ->
error;
_ ->
error
@@ -353,7 +348,7 @@ validateRangeRequest2(Socket, Head, Body, ValidBody, BodySize)
end;
Size when Size < BodySize ->
receive
- {tcp, Socket, Data} ->
+ {_, Socket, Data} ->
validateRangeRequest2(Socket, Head,
Body ++ Data, ValidBody, BodySize);
_ ->
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 34d701eb26..1457f735ad 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,6 +26,7 @@
-include_lib("kernel/include/file.hrl").
-include_lib("common_test/include/ct.hrl").
+-include_lib("public_key/include/public_key.hrl").
-include("inets_test_lib.hrl").
%% Note: This directive should only be used in test suites.
@@ -33,6 +34,12 @@
-record(httpd_user, {user_name, password, user_data}).
-record(httpd_group, {group_name, userlist}).
+-define(MAX_HEADER_SIZE, 256).
+%% Minutes before failed auths timeout.
+-define(FAIL_EXPIRE_TIME,1).
+%% Seconds before successful auths timeout.
+-define(AUTH_TIMEOUT,5).
+-define(URL_START, "http://").
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -42,21 +49,77 @@ suite() ->
all() ->
[
- {group, http}
- %{group, https}
+ {group, http_basic},
+ {group, https_basic},
+ {group, http_limit},
+ {group, https_limit},
+ {group, http_custom},
+ {group, https_custom},
+ {group, http_basic_auth},
+ {group, https_basic_auth},
+ {group, http_auth_api},
+ {group, https_auth_api},
+ {group, http_auth_api_dets},
+ {group, https_auth_api_dets},
+ {group, http_auth_api_mnesia},
+ {group, https_auth_api_mnesia},
+ {group, http_htaccess},
+ {group, https_htaccess},
+ {group, http_security},
+ {group, https_security},
+ {group, http_reload},
+ {group, https_reload}
].
groups() ->
[
- {http, [], all_groups()},
- %{https, [], all_groups()},
- {http_1_1, [], [host, chunked, expect, cgi, max_clients
- ] ++ http_head() ++ http_get()},
- {http_1_0, [], [host, cgi] ++ http_head() ++ http_get()},
- {http_0_9, [], http_head() ++ http_get()}
+ {http_basic, [], basic_groups()},
+ {https_basic, [], basic_groups()},
+ {http_limit, [], [{group, limit}]},
+ {https_limit, [], [{group, limit}]},
+ {http_custom, [], [{group, custom}]},
+ {https_custom, [], [{group, custom}]},
+ {http_basic_auth, [], [{group, basic_auth}]},
+ {https_basic_auth, [], [{group, basic_auth}]},
+ {http_auth_api, [], [{group, auth_api}]},
+ {https_auth_api, [], [{group, auth_api}]},
+ {http_auth_api_dets, [], [{group, auth_api_dets}]},
+ {https_auth_api_dets, [], [{group, auth_api_dets}]},
+ {http_auth_api_mnesia, [], [{group, auth_api_mnesia}]},
+ {https_auth_api_mnesia, [], [{group, auth_api_mnesia}]},
+ {http_htaccess, [], [{group, htaccess}]},
+ {https_htaccess, [], [{group, htaccess}]},
+ {http_security, [], [{group, security}]},
+ {https_security, [], [{group, security}]},
+ {http_reload, [], [{group, reload}]},
+ {https_reload, [], [{group, reload}]},
+ {limit, [], [max_clients_1_1, max_clients_1_0, max_clients_0_9]},
+ {custom, [], [customize]},
+ {reload, [], [non_disturbing_reconfiger_dies,
+ disturbing_reconfiger_dies,
+ non_disturbing_1_1,
+ non_disturbing_1_0,
+ non_disturbing_0_9,
+ disturbing_1_1,
+ disturbing_1_0,
+ disturbing_0_9
+ ]},
+ {basic_auth, [], [basic_auth_1_1, basic_auth_1_0, basic_auth_0_9]},
+ {auth_api, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {auth_api_dets, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {auth_api_mnesia, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {htaccess, [], [htaccess_1_1, htaccess_1_0, htaccess_0_9]},
+ {security, [], [security_1_1, security_1_0]}, %% Skip 0.9 as causes timing issus in test code
+ {http_1_1, [], [host, chunked, expect, cgi, cgi_chunked_encoding_test,
+ trace, range, if_modified_since] ++ http_head() ++ http_get() ++ load()},
+ {http_1_0, [], [host, cgi, trace] ++ http_head() ++ http_get() ++ load()},
+ {http_0_9, [], http_head() ++ http_get() ++ load()}
].
-all_groups ()->
+basic_groups ()->
[{group, http_1_1},
{group, http_1_0},
{group, http_0_9}
@@ -65,61 +128,145 @@ all_groups ()->
http_head() ->
[head].
http_get() ->
- [alias, get,
- basic_auth,
- esi, ssi].
+ [alias,
+ get,
+ %%actions, Add configuration so that this test mod_action
+ esi,
+ ssi,
+ content_length,
+ bad_hex,
+ missing_CR,
+ max_header,
+ max_content_length,
+ ipv6
+ ].
+load() ->
+ [light, medium
+ %%,heavy
+ ].
+
init_per_suite(Config) ->
PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
inets_test_lib:stop_apps([inets]),
- inets_test_lib:start_apps([inets]),
ServerRoot = filename:join(PrivDir, "server_root"),
inets_test_lib:del_dirs(ServerRoot),
DocRoot = filename:join(ServerRoot, "htdocs"),
setup_server_dirs(ServerRoot, DocRoot, DataDir),
+ {ok, Hostname0} = inet:gethostname(),
+ Inet =
+ case (catch ct:get_config(ipv6_hosts)) of
+ undefined ->
+ inet;
+ Hosts when is_list(Hosts) ->
+ case lists:member(list_to_atom(Hostname0), Hosts) of
+ true ->
+ inet6;
+ false ->
+ inet
+ end;
+ _ ->
+ inet
+ end,
[{server_root, ServerRoot},
{doc_root, DocRoot},
+ {ipfamily, Inet},
{node, node()},
- {host, inets_test_lib:hostname()} | Config].
+ {host, inets_test_lib:hostname()},
+ {address, getaddr()} | Config].
end_per_suite(_Config) ->
ok.
%%--------------------------------------------------------------------
-init_per_group(https = Group, Config0) ->
- case start_apps(Group) of
- ok ->
- init_httpd(Group, [{type, ssl} | Config0]);
- _ ->
- {skip, "Could not start https apps"}
- end;
-
-init_per_group(http = Group, Config0) ->
+init_per_group(Group, Config0) when Group == https_basic;
+ Group == https_limit;
+ Group == https_custom;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == https_auth_api_dets;
+ Group == https_auth_api_mnesia;
+ Group == https_security;
+ Group == https_reload
+ ->
+ init_ssl(Group, Config0);
+init_per_group(Group, Config0) when Group == http_basic;
+ Group == http_limit;
+ Group == http_custom;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == http_security;
+ Group == http_reload
+ ->
+ ok = start_apps(Group),
init_httpd(Group, [{type, ip_comm} | Config0]);
init_per_group(http_1_1, Config) ->
[{http_version, "HTTP/1.1"} | Config];
init_per_group(http_1_0, Config) ->
[{http_version, "HTTP/1.0"} | Config];
init_per_group(http_0_9, Config) ->
- [{http_version, "HTTP/0.9"} | Config];
+ case {os:type(), os:version()} of
+ {{win32, _}, {5,1,2600}} ->
+ {skip, "eaddrinuse XP problem"};
+ _ ->
+ [{http_version, "HTTP/0.9"} | Config]
+ end;
+init_per_group(http_htaccess = Group, Config) ->
+ Path = ?config(doc_root, Config),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(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),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(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)),
+ [{auth_prefix, "mnesia_"} | Config];
init_per_group(_, Config) ->
Config.
-end_per_group(http, _Config) ->
+
+end_per_group(Group, _Config) when Group == http_basic;
+ Group == http_limit;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == http_htaccess;
+ Group == http_security;
+ Group == http_reload
+ ->
inets:stop();
-end_per_group(https, _Config) ->
+end_per_group(Group, _Config) when Group == https_basic;
+ Group == https_limit;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == https_auth_api_dets;
+ Group == https_auth_api_mnesia;
+ Group == https_htaccess;
+ Group == https_security;
+ Group == https_reload
+ ->
ssl:stop(),
inets:stop();
+
+end_per_group(auth_api_mnesia, _) ->
+ cleanup_mnesia();
+
end_per_group(_, _) ->
ok.
-init_httpd(Group, Config0) ->
- Config1 = proplists:delete(port, Config0),
- Config = proplists:delete(server_pid, Config1),
- {Pid, Port} = server_start(Group, server_config(Group, Config)),
- [{server_pid, Pid}, {port, Port} | Config].
%%--------------------------------------------------------------------
-init_per_testcase(host = Case, Config) ->
+init_per_testcase(Case, Config) when Case == host; Case == trace ->
Prop = ?config(tc_group_properties, Config),
Name = proplists:get_value(name, Prop),
Cb = case Name of
@@ -128,47 +275,16 @@ init_per_testcase(host = Case, Config) ->
http_1_1 ->
httpd_1_1
end,
- common_init_per_test_case(Case, [{version_cb, Cb} | proplists:delete(version_cb, Config)]);
-
-%% init_per_testcase(basic_auth = Case, Config) ->
-%% start_mnesia(?config(node, Config)),
-%% common_init_per_test_case(Case, Config);
-
-init_per_testcase(max_clients, Config) ->
- Pid = ?config(server_pid, Config),
- Prop = httpd:info(Pid),
- Port = proplists:get_value(port, Prop),
- TempProp = [{port, Port} | proplists:delete(port, server_config(http, Config))],
- NewProp = [{max_clients, 1} | TempProp],
- httpd:reload_config(NewProp, non_disturbing),
- Config;
-
-init_per_testcase(_Case, Config) ->
- common_init_per_test_case(_Case, Config).
-
-%%% Should be run by all test cases except max_clients, to make
-%%% sure failiure of max_clients does not affect other test cases
-common_init_per_test_case(_Case, Config) ->
- Pid = ?config(server_pid, Config),
- Prop = httpd:info(Pid),
- case proplists:get_value(max_clients, Prop, 150) of
- 150 ->
- Config;
- _ ->
- end_per_testcase(max_clients, Config)
- end.
+ [{version_cb, Cb} | proplists:delete(version_cb, Config)];
-end_per_testcase(max_clients, Config) ->
- Pid = ?config(server_pid, Config),
- Prop = httpd:info(Pid),
- Port = proplists:get_value(port, Prop),
- TempProp = [{port, Port} | proplists:delete(port, server_config(http, Config))],
- NewProp = proplists:delete(max_clients, TempProp),
- httpd:reload_config(NewProp, non_disturbing),
+init_per_testcase(range, Config) ->
+ DocRoot = ?config(doc_root, Config),
+ create_range_data(DocRoot),
Config;
-%% end_per_testcase(basic_auth, Config) ->
-%% cleanup_mnesia();
+init_per_testcase(_, Config) ->
+ Config.
+
end_per_testcase(_Case, _Config) ->
ok.
@@ -194,8 +310,11 @@ get() ->
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), ?config(node, Config),
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
http_request("GET /index.html ", Version, Host),
[{statuscode, 200},
{header, "Content-Type", "text/html"},
@@ -203,6 +322,15 @@ get(Config) when is_list(Config) ->
{header, "Server"},
{version, Version}]).
+basic_auth_1_1(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/1.1"} | Config]).
+
+basic_auth_1_0(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/1.0"} | Config]).
+
+basic_auth_0_9(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/0.9"} | Config]).
+
basic_auth() ->
[{doc, "Test Basic authentication with WWW-Authenticate header"}].
@@ -234,13 +362,211 @@ basic_auth(Config) ->
Config, [{statuscode, 200}]),
%% Authentication still required!
basic_auth_requiered(Config).
-
+
+auth_api_1_1(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/1.1"} | Config]).
+
+auth_api_1_0(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/1.0"} | Config]).
+
+auth_api_0_9(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/0.9"} | Config]).
+
+auth_api() ->
+ [{doc, "Test mod_auth API"}].
+
+auth_api(Config) when is_list(Config) ->
+ Prefix = ?config(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),
+ ok = http_status("GET / ", Config,
+ [{statuscode, 200}]),
+ ok = auth_status(auth_request("/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Make sure Authenticate header is received even the second time
+ %% we try a incorrect password! Otherwise a browser client will hang!
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/", "dummy", "WrongPassword",
+ Version, Host), Config, [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+
+ %% Change the password to DummyPassword then try to add a user
+ %% Get an error and set it to NoPassword
+ ok = update_password(Node, ServerRoot, Host, Port, AuthPrefix,
+ "open", "NoPassword", "DummyPassword"),
+ {error,bad_password} =
+ add_user(Node, ServerRoot, Port, AuthPrefix, "open", "one",
+ "onePassword", []),
+ ok = update_password(Node, ServerRoot, Host, Port, AuthPrefix, "open",
+ "DummyPassword", "NoPassword"),
+
+ %% Test /*open, require user one Aladdin
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "open"),
+
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "onePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "one",
+ "onePassword", []),
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "two",
+ "twoPassword", []),
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "Aladdin",
+ "AladdinPassword", []),
+ {ok, [_|_]} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "open"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "WrongPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "two", "twoPassword", Version, Host),
+ Config,[{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "WrongPassword", Version, Host),
+ Config,[{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "open"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "open"),
+
+ %% Phase 2
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port, AuthPrefix,
+ "secret"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret", "one",
+ "onePassword",
+ []),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "two", "twoPassword", []),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret", "Aladdin",
+ "AladdinPassword",[]),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "one", "group1"),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "two", "group1"),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix,
+ "secret", "Aladdin", "group2"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "two", "twoPassword", Version, Host),
+ Config,[{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+
+ %% Phase 3
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_user(Node, ServerRoot, Port, AuthPrefix,
+ "secret/top_secret","three",
+ "threePassword",[]),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret",
+ "two","twoPassword", []),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret", "three", "group3"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "three", "threePassword",
+ Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret", "two", "group3"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/",
+ "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "secret/top_secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/","three", "threePassword", Version, Host),
+ Config, [{statuscde, 401}]).
+%%-------------------------------------------------------------------------
+ipv6() ->
+ [{require, ipv6_hosts},
+ {doc,"Test ipv6."}].
+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),
+ URI = http_request("GET / ", Version, Host),
+ httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), [inet6],
+ ?config(code, Config),
+ URI,
+ [{statuscode, 200}, {version, Version}]);
+ false ->
+ {skip, "Host does not support IPv6"}
+ end.
+
+%%-------------------------------------------------------------------------
ssi() ->
[{doc, "HTTP GET server side include test"}].
ssi(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),
+ transport_opts(Type, Config),
?config(node, Config),
http_request("GET /fsize.shtml ", Version, Host),
[{statuscode, 200},
@@ -248,6 +574,131 @@ ssi(Config) when is_list(Config) ->
{header, "Date"},
{header, "Server"},
{version, Version}]).
+%%-------------------------------------------------------------------------
+htaccess_1_1(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/1.1"} | Config]).
+
+htaccess_1_0(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/1.0"} | Config]).
+
+htaccess_0_9(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/0.9"} | Config]).
+
+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),
+ %% Control that authentication required!
+ %% Control that the pages that shall be
+ %% authenticated really need authenticatin
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/open/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/top_secret/ ",
+ Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+
+ %% Make sure Authenticate header is received even the second time
+ %% we try a incorrect password! Otherwise a browser client will hang!
+ ok = auth_status(auth_request("/ht/open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = auth_status(auth_request("/ht/open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+
+ %% Control that not just the first user in the list is valid
+ %% Control the first user
+ %% Authennticating ["one:OnePassword" user first in user list]
+ ok = auth_status(auth_request("/ht/open/dummy.html", "one", "OnePassword",
+ Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Control the second user
+ %% Authentication OK and a directory listing is supplied!
+ %% ["Aladdin:open sesame" user second in user list]
+ ok = auth_status(auth_request("/ht/open/","Aladdin",
+ "AladdinPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Contro that bad passwords and userids get a good denial
+ %% User correct but wrong password! ["one:one" user first in user list]
+ ok = auth_status(auth_request("/ht/open/", "one", "one", Version, Host), Config,
+ [{statuscode, 401}]),
+ %% Neither user or password correct! ["dummy:dummy"]
+ ok = auth_status(auth_request("/ht/open/", "dummy", "dummy", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% Control that authetication still works, even if its a member in a group
+ %% Authentication OK! ["two:TwoPassword" user in first group]
+ ok = auth_status(auth_request("/ht/secret/dummy.html", "two",
+ "TwoPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Authentication OK and a directory listing is supplied!
+ %% ["three:ThreePassword" user in second group]
+ ok = auth_status(auth_request("/ht/secret/", "three",
+ "ThreePassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Deny users with bad passwords even if the user is a group member
+ %% User correct but wrong password! ["two:two" user in first group]
+ ok = auth_status(auth_request("/ht/secret/", "two", "two", Version, Host), Config,
+ [{statuscode, 401}]),
+ %% Neither user or password correct! ["dummy:dummy"]
+ ok = auth_status(auth_request("/ht/secret/", "dummy", "dummy", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% control that we deny the users that are in subnet above the allowed
+ ok = auth_status(auth_request("/ht/blocknet/dummy.html", "four",
+ "FourPassword", Version, Host), Config,
+ [{statuscode, 403}]),
+ %% Control that we only applies the rules to the right methods
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("HEAD /ht/blocknet/dummy.html ", Version, Host),
+ [{statuscode, head_status(Version)},
+ {version, Version}]),
+
+ %% Control that the rerquire directive can be overrideen
+ ok = auth_status(auth_request("/ht/secret/top_secret/ ", "Aladdin", "AladdinPassword",
+ Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% Authentication still required!
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/open/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/top_secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]).
+
+%%-------------------------------------------------------------------------
host() ->
[{doc, "Test host header"}].
@@ -255,50 +706,39 @@ 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)).
-
+%%-------------------------------------------------------------------------
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)).
-
+%%-------------------------------------------------------------------------
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)).
+%%-------------------------------------------------------------------------
+max_clients_1_1() ->
+ [{doc, "Test max clients limit"}].
-max_clients() ->
+max_clients_1_1(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/1.1"} | Config]).
+
+max_clients_1_0() ->
[{doc, "Test max clients limit"}].
-max_clients(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Pid = ?config(server_pid, Config),
- ct:pal("Configurartion: ~p~n", [httpd:info(Pid)]),
- spawn(fun() -> httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
- http_request("GET /eval?httpd_example:delay(1000) ",
- Version, Host),
- [{statuscode, 200},
- {version, Version}])
- end),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
- http_request("GET /index.html ", Version, Host),
- [{statuscode, 503},
- {version, Version}]),
- receive
- after 1000 ->
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
- http_request("GET /index.html ", Version, Host),
- [{statuscode, 200},
- {version, Version}])
- end.
-
+max_clients_1_0(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/1.0"} | Config]).
+
+max_clients_0_9() ->
+ [{doc, "Test max clients limit"}].
+
+max_clients_0_9(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/0.9"} | Config]).
+%%-------------------------------------------------------------------------
esi() ->
[{doc, "Test mod_esi"}].
@@ -328,7 +768,7 @@ esi(Config) when is_list(Config) ->
ok = http_status("GET /cgi-bin/erl/httpd_example:get ",
Config, [{statuscode, 200},
{no_header, "cache-control"}]).
-
+%%-------------------------------------------------------------------------
cgi() ->
[{doc, "Test mod_cgi"}].
@@ -403,7 +843,27 @@ cgi(Config) when is_list(Config) ->
ok = http_status("GET /cgi-bin/" ++ Script ++ " ", Config,
[{statuscode, 200},
{no_header, "cache-control"}]).
-
+%%-------------------------------------------------------------------------
+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),
+ Script =
+ case test_server:os_type() of
+ {win32, _} ->
+ "/cgi-bin/printenv.bat";
+ _ ->
+ "/cgi-bin/printenv.sh"
+ end,
+ Requests =
+ ["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),
+ Host,
+ ?config(node, Config),
+ Requests).
+%%-------------------------------------------------------------------------
alias() ->
[{doc, "Test mod_alias"}].
@@ -431,165 +891,418 @@ alias(Config) when is_list(Config) ->
[{statuscode, 301},
{header, "Location"},
{header, "Content-Type","text/html"}]).
+%%-------------------------------------------------------------------------
+actions() ->
+ [{doc, "Test mod_actions"}].
+actions(Config) when is_list(Config) ->
+ ok = http_status("GET /", Config, [{statuscode, 200}]).
-%% auth_api() ->
-%% [{doc, "Test mod_auth API"}].
-
-%% auth_api(Config) when is_list(Config) ->
-%% Version = ?config(http_version, Config),
-%% Host = ?config(host, Config),
-%% ok = http_status("GET / ", Config,
-%% [{statuscode, 200}]),
-%% ok = auth_status(auth_request("/", "one", "WrongPassword", Version, Host), Config,
-%% [{statuscode, 200}]),
-
-%% %% Make sure Authenticate header is received even the second time
-%% %% we try a incorrect password! Otherwise a browser client will hang!
-%% ok = auth_status(auth_request("/" ++ AuthStoreType ++ "open/",
-%% "dummy", "WrongPassword", Host), Config,
-%% [{statuscode, 401},
-%% {header, "WWW-Authenticate"}]),
-%% ok = auth_status(auth_request("/" ++ AuthStoreType ++ "open/", "dummy", "WrongPassword",
-%% Host), Config, [{statuscode, 401},
-%% {header, "WWW-Authenticate"}]),
-
-%% %% Change the password to DummyPassword then try to add a user
-%% %% Get an error and set it to NoPassword
-%% ok = update_password(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "open", "NoPassword", "DummyPassword"),
-%% {error,bad_password} =
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "open", "one",
-%% "onePassword", []),
-%% ok = update_password(Node, ServerRoot, Host, Port, AuthStoreType ++"open",
-%% "DummyPassword", "NoPassword"),
-
-%% %% Test /*open, require user one Aladdin
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType ++ "open"),
+%%-------------------------------------------------------------------------
+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)).
+
+%%-------------------------------------------------------------------------
+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)).
+%%-------------------------------------------------------------------------
+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)).
+
+%%-------------------------------------------------------------------------
+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).
+%%-------------------------------------------------------------------------
+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).
+%%-------------------------------------------------------------------------
+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),
+ 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),
+ http_request("GET /cgi-bin/erl/httpd_example:get_bin ",
+ Version, Host),
+ [{statuscode, 200},
+ {content_length, 274},
+ {version, Version}]).
+%%-------------------------------------------------------------------------
+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),
+ http_request("GET http://www.erlang.org/%skalle ",
+ Version, Host),
+ [{statuscode, 400},
+ {version, Version}]).
+%%-------------------------------------------------------------------------
+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),
+ http_request_missing_CR("GET /index.html ", Version, Host),
+ [{statuscode, 200},
+ {version, Version}]).
+
+%%-------------------------------------------------------------------------
+customize() ->
+ [{doc, "Test filtering of headers with custom callback"}].
+
+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),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ http_request("GET /index.html ", Version, Host),
+ [{statuscode, 200},
+ {header, "Content-Type", "text/html"},
+ {header, "Date"},
+ {no_header, "Server"},
+ {version, Version}]).
+
+response_header({"server", _}) ->
+ false;
+response_header(Header) ->
+ {true, Header}.
+
+%%-------------------------------------------------------------------------
+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),
+ 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)
+ 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).
+
+%%-------------------------------------------------------------------------
+security_1_1(Config) when is_list(Config) ->
+ security([{http_version, "HTTP/1.1"} | Config]).
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "open/",
-%% "one", "onePassword", [{statuscode, 401}]),
+security_1_0(Config) when is_list(Config) ->
+ security([{http_version, "HTTP/1.0"} | 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),
+
+ global:register_name(mod_security_test, self()), % Receive events
+
+ test_server:sleep(5000),
+
+ OpenDir = filename:join([ServerRoot, "htdocs", "open"]),
+
+ %% Test blocking / unblocking of users.
+
+ %% /open, require user one Aladdin
+ remove_users(Node, ServerRoot, Host, Port, "", "open"),
+
+ ok = auth_status(auth_request("/open/",
+ "one", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "onePassword"}]},
+ Node, Port),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "open/",
-%% "two", "twoPassword", [{statuscode, 401}]),
+ ok = auth_status(auth_request("/open/",
+ "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "open/",
-%% "Aladdin", "onePassword", [{statuscode, 401}]),
-
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "open", "one",
-%% "onePassword", []),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "open", "two",
-%% "twoPassword", []),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "open", "Aladdin",
-%% "AladdinPassword", []),
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "two"}, {password, "twoPassword"}]},
+ Node, Port),
+
+ ok = auth_status(auth_request("/open/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "Aladdin"},
+ {password, "AladdinPassword"}]},
+ Node, Port),
+
+ add_user(Node, ServerRoot, Port, "", "open", "one", "onePassword", []),
+ add_user(Node, ServerRoot, Port, "", "open", "two", "twoPassword", []),
+
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "WrongPassword"}]},
+ Node, Port),
+
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "WrongPassword"}]},
+ Node, Port),
+ receive_security_event({event, user_block, Port, OpenDir,
+ [{user, "one"}]}, Node, Port),
+
+ global:unregister_name(mod_security_test), % No more events.
+
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% User "one" should be blocked now..
+ case list_blocked_users(Node, Port) of
+ [{"one",_, Port, OpenDir,_}] ->
+ ok;
+ Blocked ->
+ ct:fail({unexpected_blocked, Blocked})
+ end,
+
+ [{"one",_, Port, OpenDir,_}] = list_blocked_users(Node, Port, OpenDir),
+
+ true = unblock_user(Node, "one", Port, OpenDir),
+ %% User "one" should not be blocked any more.
+
+ [] = list_blocked_users(Node, Port),
+
+ ok = auth_status(auth_request("/open/", "one", "onePassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Test list_auth_users & auth_timeout
+
+ ["one"] = list_auth_users(Node, Port),
+
+ ok = auth_status(auth_request("/open/", "two", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ ["one"] = list_auth_users(Node, Port),
+
-%% {ok, [_|_]} = list_users(Node, ServerRoot, Host, Port,
-%% AuthStoreType++"open"),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++ "open/",
-%% "one", "WrongPassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++ "open/",
-%% "one", "onePassword", [{statuscode, 200}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "open/",
-%% "two", "twoPassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++ "open/",
-%% "Aladdin", "WrongPassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "open/",
-%% "Aladdin", "AladdinPassword", [{statuscode, 200}]),
+ ["one"] = list_auth_users(Node, Port, OpenDir),
+
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType++"open"),
-%% {ok, []} = list_users(Node, ServerRoot, Host, Port,
-%% AuthStoreType++"open"),
-
-%% %% Phase 2
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType++"secret"),
-%% {ok, []} = list_users(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "secret"),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "one", "onePassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "two", "twoPassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++ "secret/",
-%% "three", "threePassword", [{statuscode, 401}]),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "secret", "one",
-%% "onePassword",
-%% []),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "secret",
-%% "two", "twoPassword", []),
-%% add_user(Node, ServerRoot, Port, AuthStoreType++"secret", "Aladdin",
-%% "AladdinPassword",[]),
-%% add_group_member(Node, ServerRoot, Port, AuthStoreType ++ "secret",
-%% "one", "group1"),
-%% add_group_member(Node, ServerRoot, Port, AuthStoreType ++ "secret",
-%% "two", "group1"),
-%% add_group_member(Node, ServerRoot, Port, AuthStoreType ++
-%% "secret", "Aladdin", "group2"),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "one", "onePassword", [{statuscode, 200}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "two", "twoPassword", [{statuscode, 200}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "Aladdin", "AladdinPassword", [{statuscode, 200}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++ "secret/",
-%% "three", "threePassword", [{statuscode, 401}]),
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType ++ "secret"),
-%% {ok, []} = list_users(Node, ServerRoot, Host, Port,
-%% AuthStoreType ++ "secret"),
-%% remove_groups(Node, ServerRoot, Host, Port, AuthStoreType ++ "secret"),
-%% Directory = filename:join([ServerRoot, "htdocs", AuthStoreType ++
-%% "secret"]),
-%% {ok, []} = list_groups(Node, ServerRoot, Host, Port, Directory),
-
-%% %% Phase 3
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "secret/top_secret"),
-%% remove_groups(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "secret/top_secret"),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++
-%% "secret/top_secret/",
-%% "three", "threePassword", [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++
-%% "secret/top_secret/", "two", "twoPassword",
-%% [{statuscode, 401}]),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++
-%% "secret/top_secret","three",
-%% "threePassword",[]),
-%% add_user(Node, ServerRoot, Port, AuthStoreType ++ "secret/top_secret",
-%% "two","twoPassword", []),
-%% add_group_member(Node, ServerRoot, Port, AuthStoreType ++
-%% "secret/top_secret",
-%% "three", "group3"),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++
-%% "secret/top_secret/", "three", "threePassword",
-%% [{statuscode, 200}]),
-%% auth_request(Type, Host, Port, Node,"/" ++ AuthStoreType ++
-%% "secret/top_secret/", "two", "twoPassword",
-%% [{statuscode, 401}]),
-%% add_group_member(Node, ServerRoot, Port, AuthStoreType ++
-%% "secret/top_secret",
-%% "two", "group3"),
-%% auth_request(Type,Host,Port,Node,"/" ++ AuthStoreType ++
-%% "secret/top_secret/",
-%% "two", "twoPassword", [{statuscode, 200}]),
-%% remove_users(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "secret/top_secret"),
-%% {ok, []} = list_users(Node, ServerRoot, Host, Port,
-%% AuthStoreType ++ "secret/top_secret"),
-%% remove_groups(Node, ServerRoot, Host, Port, AuthStoreType ++
-%% "secret/top_secret"),
-%% Directory2 = filename:join([ServerRoot, "htdocs",
-%% AuthStoreType ++ "secret/top_secret"]),
-%% {ok, []} = list_groups(Node, ServerRoot, Host, Port, Directory2),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++
-%% "secret/top_secret/", "two", "twoPassword",
-%% [{statuscode, 401}]),
-%% auth_request(Type, Host, Port, Node, "/" ++ AuthStoreType ++
-%% "secret/top_secret/","three", "threePassword",
-%% [{statuscode, 401}]).
+ ok = auth_status(auth_request("/open/", "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ ["one"] = list_auth_users(Node, Port),
+
+
+ ["one"] = list_auth_users(Node, Port, OpenDir),
+
+ %% Wait for successful auth to timeout.
+ test_server:sleep(?AUTH_TIMEOUT*1001),
+
+ [] = list_auth_users(Node, Port),
+
+ [] = list_auth_users(Node, Port, OpenDir),
+
+ %% "two" is blocked.
+
+ true = unblock_user(Node, "two", Port, OpenDir),
+
+
+ %% Test explicit blocking. Block user 'two'.
+
+ [] = list_blocked_users(Node,Port,OpenDir),
+
+ true = block_user(Node, "two", Port, OpenDir, 10),
+
+ ok = auth_status(auth_request("/open/", "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ true = unblock_user(Node, "two", Port, OpenDir).
+
+%%-------------------------------------------------------------------------
+non_disturbing_reconfiger_dies(Config) when is_list(Config) ->
+ do_reconfiger_dies([{http_version, "HTTP/1.1"} | Config], non_disturbing).
+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),
+
+ 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)),
+ inets_test_lib:send(Type, Socket, BlockRequest),
+ ct:sleep(100), %% Avoid possible timing issues
+ Pid = spawn(fun() -> httpd:reload_config([{server_name, "httpd_kill_" ++ Version},
+ {port, Port}|
+ proplists:delete(server_name, HttpdConfig)], DisturbingType)
+ end),
+
+ monitor(process, Pid),
+ exit(Pid, kill),
+ receive
+ {'DOWN', _, _, _, _} ->
+ ok
+ end,
+ inets_test_lib:close(Type, Socket),
+ [{server_name, "httpd_test"}] = httpd:info(Server, [server_name]).
+%%-------------------------------------------------------------------------
+disturbing_1_1(Config) when is_list(Config) ->
+ disturbing([{http_version, "HTTP/1.1"} | Config]).
+
+disturbing_1_0(Config) when is_list(Config) ->
+ disturbing([{http_version, "HTTP/1.0"} | Config]).
+
+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),
+ 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)),
+ inets_test_lib:send(Type, Socket, BlockRequest),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd:reload_config([{server_name, "httpd_disturbing_" ++ Version}, {port, Port}|
+ proplists:delete(server_name, HttpdConfig)], disturbing),
+ Close = list_to_atom((typestr(Type)) ++ "_closed"),
+ receive
+ {Close, Socket} ->
+ ok;
+ Msg ->
+ ct:fail({{expected, {Close, Socket}}, {got, Msg}})
+ end,
+ inets_test_lib:close(Type, Socket),
+ [{server_name, "httpd_disturbing_" ++ Version}] = httpd:info(Server, [server_name]).
+%%-------------------------------------------------------------------------
+non_disturbing_1_1(Config) when is_list(Config) ->
+ non_disturbing([{http_version, "HTTP/1.1"} | Config]).
+
+non_disturbing_1_0(Config) when is_list(Config) ->
+ non_disturbing([{http_version, "HTTP/1.0"} | Config]).
+
+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),
+
+ 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)),
+ inets_test_lib:send(Type, Socket, BlockRequest),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd:reload_config([{server_name, "httpd_non_disturbing_" ++ Version}, {port, Port}|
+ proplists:delete(server_name, HttpdConfig)], non_disturbing),
+ Transport = type(Type),
+ receive
+ {Transport, Socket, Msg} ->
+ ct:pal("Received message ~p~n", [Msg]),
+ ok
+ after 2000 ->
+ ct:fail(timeout)
+ end,
+ inets_test_lib:close(Type, Socket),
+ [{server_name, "httpd_non_disturbing_" ++ Version}] = httpd:info(Server, [server_name]).
%%--------------------------------------------------------------------
%% Internal functions -----------------------------------
%%--------------------------------------------------------------------
+url(http, End, Config) ->
+ Port = ?config(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),
+
+ Request = http_request("GET /index.html ", Version, Host),
+ 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)),
+ inets_test_lib:send(Type, Socket, BlockRequest),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd_test_lib:verify_request(Type, Host,
+ Port,
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ Request,
+ [{statuscode, 503},
+ {version, Version}]),
+ receive
+ {_, Socket, _Msg} ->
+ ok
+ end,
+ inets_test_lib:close(Type, Socket),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd_test_lib:verify_request(Type, Host,
+ Port,
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ Request,
+ [{statuscode, 200},
+ {version, Version}]).
+
setup_server_dirs(ServerRoot, DocRoot, DataDir) ->
CgiDir = filename:join(ServerRoot, "cgi-bin"),
AuthDir = filename:join(ServerRoot, "auth"),
@@ -628,10 +1341,29 @@ setup_server_dirs(ServerRoot, DocRoot, DataDir) ->
ok = file:write_file_info(EnvCGI,
FileInfo1#file_info{mode = 8#00755}).
-start_apps(https) ->
- inets_test_lib:start_apps([crypto, public_key, ssl]);
-start_apps(_) ->
- ok.
+start_apps(Group) when Group == https_basic;
+ Group == https_limit;
+ Group == https_custom;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == https_auth_api_dets;
+ Group == https_auth_api_mnesia;
+ Group == https_htaccess;
+ Group == https_security;
+ Group == https_reload
+ ->
+ inets_test_lib:start_apps([inets, asn1, crypto, public_key, ssl]);
+start_apps(Group) when Group == http_basic;
+ Group == http_limit;
+ Group == http_custom;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == http_htaccess;
+ Group == http_security;
+ Group == http_reload->
+ inets_test_lib:start_apps([inets]).
server_start(_, HttpdConfig) ->
{ok, Pid} = inets:start(httpd, HttpdConfig),
@@ -639,6 +1371,90 @@ server_start(_, HttpdConfig) ->
{value, {_, _, Info}} = lists:keysearch(Pid, 2, Serv),
{Pid, proplists:get_value(port, Info)}.
+init_ssl(Group, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ CaKey = {_Trusted,_} =
+ erl_make_certs:make_cert([{key, dsa},
+ {subject,
+ [{name, "Public Key"},
+ {?'id-at-name',
+ {printableString, "public_key"}},
+ {?'id-at-pseudonym',
+ {printableString, "pubkey"}},
+ {city, "Stockholm"},
+ {country, "SE"},
+ {org, "erlang"},
+ {org_unit, "testing dep"}
+ ]}
+ ]),
+ ok = erl_make_certs:write_pem(PrivDir, "public_key_cacert", CaKey),
+
+ CertK1 = {_Cert1, _} = erl_make_certs:make_cert([{issuer, CaKey}]),
+ CertK2 = {_Cert2,_} = erl_make_certs:make_cert([{issuer, CertK1},
+ {digest, md5},
+ {extensions, false}]),
+ ok = erl_make_certs:write_pem(PrivDir, "public_key_cert", CertK2),
+
+ case start_apps(Group) of
+ ok ->
+ init_httpd(Group, [{type, ssl} | Config]);
+ _ ->
+ {skip, "Could not start https apps"}
+ end.
+
+server_config(http_basic, Config) ->
+ basic_conf() ++ server_config(http, Config);
+server_config(https_basic, Config) ->
+ basic_conf() ++ server_config(https, Config);
+server_config(http_reload, Config) ->
+ [{keep_alive_timeout, 2}] ++ server_config(http, Config);
+server_config(https_reload, Config) ->
+ [{keep_alive_timeout, 2}] ++ server_config(https, Config);
+server_config(http_limit, Config) ->
+ [{max_clients, 1},
+ %% Make sure option checking code is run
+ {max_content_length, 100000002}] ++ server_config(http, Config);
+server_config(http_custom, Config) ->
+ [{custom, ?MODULE}] ++ server_config(http, Config);
+server_config(https_custom, Config) ->
+ [{custom, ?MODULE}] ++ server_config(https, Config);
+server_config(https_limit, Config) ->
+ [{max_clients, 1}] ++ server_config(https, Config);
+server_config(http_basic_auth, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_conf(ServerRoot) ++ server_config(http, Config);
+server_config(https_basic_auth, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_conf(ServerRoot) ++ server_config(https, Config);
+server_config(http_auth_api, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, plain) ++ server_config(http, Config);
+server_config(https_auth_api, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, plain) ++ server_config(https, Config);
+server_config(http_auth_api_dets, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, dets) ++ server_config(http, Config);
+server_config(https_auth_api_dets, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, dets) ++ server_config(https, Config);
+server_config(http_auth_api_mnesia, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, mnesia) ++ server_config(http, Config);
+server_config(https_auth_api_mnesia, Config) ->
+ ServerRoot = ?config(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),
+ tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(http, Config);
+server_config(https_security, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(https, Config);
+
server_config(http, Config) ->
ServerRoot = ?config(server_root, Config),
[{port, 0},
@@ -646,9 +1462,10 @@ server_config(http, Config) ->
{server_root, ServerRoot},
{document_root, ?config(doc_root, Config)},
{bind_address, any},
- {ipfamily, inet},
+ {ipfamily, ?config(ipfamily, Config)},
{max_header_size, 256},
{max_header_action, close},
+ {directory_index, ["index.html", "welcome.html"]},
{mime_types, [{"html","text/html"},{"htm","text/html"}, {"shtml","text/html"},
{"gif", "image/gif"}]},
{alias, {"/icons/", filename:join(ServerRoot,"icons") ++ "/"}},
@@ -657,9 +1474,24 @@ server_config(http, Config) ->
{script_alias, {"/htbin/", filename:join(ServerRoot, "cgi-bin") ++ "/"}},
{erl_script_alias, {"/cgi-bin/erl", [httpd_example, io]}},
{eval_script_alias, {"/eval", [httpd_example, io]}}
- ] ++ auth_conf(ServerRoot);
-server_config(_, _) ->
- [].
+ ];
+
+server_config(https, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ [{socket_type, {essl,
+ [{cacertfile,
+ filename:join(PrivDir, "public_key_cacert.pem")},
+ {certfile,
+ filename:join(PrivDir, "public_key_cert.pem")},
+ {keyfile,
+ filename:join(PrivDir, "public_key_cert_key.pem")}
+ ]}}] ++ server_config(http, Config).
+
+init_httpd(Group, Config0) ->
+ Config1 = proplists:delete(port, Config0),
+ Config = proplists:delete(server_pid, Config1),
+ {Pid, Port} = server_start(Group, server_config(Group, Config)),
+ [{server_pid, Pid}, {port, Port} | Config].
http_request(Request, "HTTP/1.1" = Version, Host, {Headers, Body}) ->
Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n" ++ Headers ++ "\r\n" ++ Body;
@@ -682,19 +1514,33 @@ auth_request(Path, User, Passwd, Version, _Host) ->
base64:encode_to_string(User++":"++Passwd) ++
"\r\n\r\n".
+http_request_missing_CR(Request, "HTTP/1.1" = Version, Host) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n\r\n\n";
+http_request_missing_CR(Request, Version, _) ->
+ Request ++ Version ++ "\r\n\n".
+
head_status("HTTP/0.9") ->
501; %% Not implemented in HTTP/0.9
head_status(_) ->
200.
+basic_conf() ->
+ [{modules, [mod_alias, mod_range, mod_responsecontrol,
+ mod_trace, mod_esi, mod_cgi, mod_dir, mod_get, mod_head]}].
+
+auth_access_conf() ->
+ [{modules, [mod_alias, mod_htaccess, mod_dir, mod_get, mod_head]},
+ {access_files, [".htaccess"]}].
+
auth_conf(Root) ->
- [{directory, {filename:join(Root, "htdocs/open"),
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/open"),
[{auth_type, plain},
{auth_name, "Open Area"},
{auth_user_file, filename:join(Root, "auth/passwd")},
{auth_group_file, filename:join(Root, "auth/group")},
{require_user, ["one", "Aladdin"]}]}},
- {directory, {filename:join(Root, "htdocs/secret"),
+ {directory, {filename:join(Root, "htdocs/secret"),
[{auth_type, plain},
{auth_name, "Secret Area"},
{auth_user_file, filename:join(Root, "auth/passwd")},
@@ -705,43 +1551,134 @@ auth_conf(Root) ->
{auth_name, "Top Secret Area"},
{auth_user_file, filename:join(Root, "auth/passwd")},
{auth_group_file, filename:join(Root, "auth/group")},
- {require_group, ["group3"]}]}},
+ {require_group, ["group3"]}]}}].
+
+auth_api_conf(Root, plain) ->
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
{directory, {filename:join(Root, "htdocs/open"),
- [{auth_type, mnesia},
+ [{auth_type, plain},
{auth_name, "Open Area"},
{auth_user_file, filename:join(Root, "auth/passwd")},
{auth_group_file, filename:join(Root, "auth/group")},
{require_user, ["one", "Aladdin"]}]}},
{directory, {filename:join(Root, "htdocs/secret"),
- [{auth_type, mnesia},
+ [{auth_type, plain},
{auth_name, "Secret Area"},
{auth_user_file, filename:join(Root, "auth/passwd")},
{auth_group_file, filename:join(Root, "auth/group")},
- {require_group, ["group1", "group2"]}]}}
- ].
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/secret/top_secret"),
+ [{auth_type, plain},
+ {auth_name, "Top Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group3"]}]}}];
+auth_api_conf(Root, dets) ->
+ [
+ {modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/dets_open"),
+ [{auth_type, dets},
+ {auth_name, "Dets Open Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/dets_secret"),
+ [{auth_type, dets},
+ {auth_name, "Dests Secret Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/dets_secret/top_secret"),
+ [{auth_type, dets},
+ {auth_name, "Dets Top Secret Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_group, ["group3"]}]}}
+ ];
+
+auth_api_conf(Root, mnesia) ->
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/mnesia_open"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Open Area"},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/mnesia_secret"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Secret Area"},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/mnesia_secret/top_secret"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Top Secret Area"},
+ {require_group, ["group3"]}]}}].
+
+security_conf(Root) ->
+ SecFile = filename:join(Root, "security_data"),
+ Open = filename:join(Root, "htdocs/open"),
+ Secret = filename:join(Root, "htdocs/secret"),
+ TopSecret = filename:join(Root, "htdocs/secret/top_secret"),
+
+ [{modules, [mod_alias, mod_auth, mod_security, mod_dir, mod_get, mod_head]},
+ {security_directory, {Open,
+ [{auth_name, "Open Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_user, ["one", "Aladdin"]} |
+ mod_security_conf(SecFile, Open)]}},
+ {security_directory, {Secret,
+ [{auth_name, "Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group1", "group2"]} |
+ mod_security_conf(SecFile, Secret)]}},
+ {security_directory, {TopSecret,
+ [{auth_name, "Top Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group3"]} |
+ mod_security_conf(SecFile, TopSecret)]}}].
+
+mod_security_conf(SecFile, Dir) ->
+ [{data_file, SecFile},
+ {max_retries, 3},
+ {fail_expire_time, ?FAIL_EXPIRE_TIME},
+ {block_time, 1},
+ {auth_timeout, ?AUTH_TIMEOUT},
+ {callback_module, ?MODULE},
+ {path, Dir} %% This is should not be needed, but is atm, awful design!
+ ].
+
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), ?config(node, Config),
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(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),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(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), ?config(node, Config),
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
AuthRequest,
Expected ++ [{version, Version}]).
@@ -791,3 +1728,290 @@ cleanup_mnesia() ->
stopped = mnesia:stop(),
mnesia:delete_schema([node()]),
ok.
+
+transport_opts(ssl, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ [?config(ipfamily, Config),
+ {cacertfile, filename:join(PrivDir, "public_key_cacert.pem")}];
+transport_opts(_, Config) ->
+ [?config(ipfamily, Config)].
+
+
+%%% mod_range
+create_range_data(Path) ->
+ PathAndFileName=filename:join([Path,"range.txt"]),
+ case file:read_file(PathAndFileName) of
+ {error, enoent} ->
+ file:write_file(PathAndFileName,list_to_binary(["12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890"]));
+ _ ->
+ ok
+ end.
+
+%%% mod_htaccess
+create_htaccess_data(Path, IpAddress)->
+ create_htaccess_dirs(Path),
+
+ create_html_file(filename:join([Path,"ht/open/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/blocknet/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/secret/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/secret/top_secret/dummy.html"])),
+
+ create_htaccess_file(filename:join([Path,"ht/open/.htaccess"]),
+ Path, "user one Aladdin"),
+ create_htaccess_file(filename:join([Path,"ht/secret/.htaccess"]),
+ Path, "group group1 group2"),
+ create_htaccess_file(filename:join([Path,
+ "ht/secret/top_secret/.htaccess"]),
+ Path, "user four"),
+ create_htaccess_file(filename:join([Path,"ht/blocknet/.htaccess"]),
+ Path, nouser, IpAddress),
+
+ create_user_group_file(filename:join([Path,"ht","users.file"]),
+ "one:OnePassword\ntwo:TwoPassword\nthree:"
+ "ThreePassword\nfour:FourPassword\nAladdin:"
+ "AladdinPassword"),
+ create_user_group_file(filename:join([Path,"ht","groups.file"]),
+ "group1: two one\ngroup2: two three").
+
+create_html_file(PathAndFileName)->
+ file:write_file(PathAndFileName,list_to_binary(
+ "<html><head><title>test</title></head>
+ <body>testar</body></html>")).
+
+create_htaccess_file(PathAndFileName, BaseDir, RequireData)->
+ file:write_file(PathAndFileName,
+ list_to_binary(
+ "AuthUserFile "++ BaseDir ++
+ "/ht/users.file\nAuthGroupFile "++ BaseDir
+ ++ "/ht/groups.file\nAuthName Test\nAuthType"
+ " Basic\n<Limit>\nrequire " ++ RequireData ++
+ "\n</Limit>")).
+
+create_htaccess_file(PathAndFileName, BaseDir, nouser, IpAddress)->
+ file:write_file(PathAndFileName,list_to_binary(
+ "AuthUserFile "++ BaseDir ++
+ "/ht/users.file\nAuthGroupFile " ++
+ BaseDir ++ "/ht/groups.file\nAuthName"
+ " Test\nAuthType"
+ " Basic\n<Limit GET>\n\tallow from " ++
+ format_ip(IpAddress,
+ string:rchr(IpAddress,$.)) ++
+ "\n</Limit>")).
+
+create_user_group_file(PathAndFileName, Data)->
+ file:write_file(PathAndFileName, list_to_binary(Data)).
+
+create_htaccess_dirs(Path)->
+ ok = file:make_dir(filename:join([Path,"ht"])),
+ ok = file:make_dir(filename:join([Path,"ht/open"])),
+ ok = file:make_dir(filename:join([Path,"ht/blocknet"])),
+ ok = file:make_dir(filename:join([Path,"ht/secret"])),
+ ok = file:make_dir(filename:join([Path,"ht/secret/top_secret"])).
+
+remove_htaccess_dirs(Path)->
+ file:del_dir(filename:join([Path,"ht/secret/top_secret"])),
+ file:del_dir(filename:join([Path,"ht/secret"])),
+ file:del_dir(filename:join([Path,"ht/blocknet"])),
+ file:del_dir(filename:join([Path,"ht/open"])),
+ file:del_dir(filename:join([Path,"ht"])).
+
+format_ip(IpAddress,Pos)when Pos > 0->
+ case lists:nth(Pos,IpAddress) of
+ $.->
+ case lists:nth(Pos-2,IpAddress) of
+ $.->
+ format_ip(IpAddress,Pos-3);
+ _->
+ lists:sublist(IpAddress,Pos-2) ++ "."
+ end;
+ _ ->
+ format_ip(IpAddress,Pos-1)
+ end;
+
+format_ip(IpAddress, _Pos)->
+ "1" ++ IpAddress.
+
+remove_htaccess(Path)->
+ file:delete(filename:join([Path,"ht/open/dummy.html"])),
+ file:delete(filename:join([Path,"ht/secret/dummy.html"])),
+ file:delete(filename:join([Path,"ht/secret/top_secret/dummy.html"])),
+ file:delete(filename:join([Path,"ht/blocknet/dummy.html"])),
+ file:delete(filename:join([Path,"ht/blocknet/.htaccess"])),
+ file:delete(filename:join([Path,"ht/open/.htaccess"])),
+ file:delete(filename:join([Path,"ht/secret/.htaccess"])),
+ file:delete(filename:join([Path,"ht/secret/top_secret/.htaccess"])),
+ file:delete(filename:join([Path,"ht","users.file"])),
+ file:delete(filename:join([Path,"ht","groups.file"])),
+ remove_htaccess_dirs(Path).
+
+dos_hostname(Type, Port, Host, Node, Version, Max) ->
+ TooLongHeader = lists:append(lists:duplicate(Max + 1, "a")),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request("", Version),
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request("dummy-host.ericsson.se", Version),
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request(TooLongHeader, Version),
+ [{statuscode, request_entity_too_large_code(Version)},
+ {version, Version}]).
+dos_hostname_request(Host, Version) ->
+ dos_http_request("GET / ", Version, Host).
+
+dos_http_request(Request, "HTTP/1.1" = Version, Host) ->
+ http_request(Request, Version, Host);
+dos_http_request(Request, Version, Host) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n\r\n".
+
+request_entity_too_large_code("HTTP/1.0") ->
+ 403; %% 413 not defined in HTTP/1.0
+request_entity_too_large_code(_) ->
+ 413.
+
+length_required_code("HTTP/1.0") ->
+ 403; %% 411 not defined in HTTP/1.0
+length_required_code(_) ->
+ 411.
+
+garbage_content_length(Type, Port, Host, Node, Version) ->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ garbage_content_length_request("GET / ", Version, Host, "aaaa"),
+ [{statuscode, length_required_code(Version)},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ garbage_content_length_request("GET / ", Version, Host,
+ lists:duplicate($a, 100)),
+ [{statuscode, request_entity_too_large_code(Version)},
+ {version, Version}]).
+
+garbage_content_length_request(Request, Version, Host, Garbage) ->
+ http_request(Request, Version, Host,
+ {"content-length:" ++ Garbage, "Body with garbage content length indicator"}).
+
+
+update_password(Node, ServerRoot, _Address, Port, AuthPrefix, Dir, Old, New)->
+ Directory = filename:join([ServerRoot, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, update_password,
+ [undefined, Port, Directory, Old, New, New]).
+
+add_user(Node, Root, Port, AuthPrefix, Dir, User, Password, UserData) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, add_user,
+ [User, Password, UserData, Addr, Port, Directory]).
+
+
+delete_user(Node, Root, _Host, Port, AuthPrefix, Dir, User) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, delete_user, [User, Addr, Port, Directory]).
+remove_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir) ->
+ %% List users, delete them, and make sure they are gone.
+ case list_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir) of
+ {ok, Users} ->
+ lists:foreach(fun(User) ->
+ delete_user(Node, ServerRoot, Host,
+ Port, AuthPrefix, Dir, User)
+ end,
+ Users),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir);
+ _ ->
+ ok
+ end.
+
+list_users(Node, Root, _Host, Port, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, list_users, [Addr, Port, Directory]).
+
+remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir) ->
+ {ok, Groups} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir),
+ lists:foreach(fun(Group) ->
+ delete_group(Node, Group, Port, ServerRoot, AuthPrefix, Dir)
+ end,
+ Groups),
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir).
+
+delete_group(Node, Group, Port, Root, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, delete_group, [Group, Addr, Port, Directory]).
+
+list_groups(Node, Root, _, Port, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, list_groups, [Addr, Port, Directory]).
+
+add_group_member(Node, Root, Port, AuthPrefix, Dir, User, Group) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, add_group_member, [Group, User, Addr, Port,
+ Directory]).
+getaddr() ->
+ {ok,HostName} = inet:gethostname(),
+ {ok,{A1,A2,A3,A4}} = inet:getaddr(HostName,inet),
+ lists:flatten(io_lib:format("~p.~p.~p.~p",[A1,A2,A3,A4])).
+
+receive_security_event(Event, Node, Port) ->
+ receive
+ Event ->
+ ok;
+ {'EXIT', _, _} ->
+ receive_security_event(Event, Node, Port)
+ after 5000 ->
+ %% Flush the message queue, to see if we got something...
+ inets_test_lib:flush()
+ end.
+
+list_blocked_users(Node,Port) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_blocked_users, [Addr,Port]).
+
+list_blocked_users(Node,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_blocked_users, [Addr,Port,Dir]).
+
+block_user(Node,User,Port,Dir,Sec) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, block_user, [User, Addr, Port, Dir, Sec]).
+
+unblock_user(Node,User,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, unblock_user, [User, Addr, Port, Dir]).
+
+list_auth_users(Node,Port) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_auth_users, [Addr,Port]).
+
+list_auth_users(Node,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_auth_users, [Addr,Port,Dir]).
+
+event(What, Port, Dir, Data) ->
+ Msg = {event, What, Port, Dir, Data},
+ case global:whereis_name(mod_security_test) of
+ undefined ->
+ ok;
+ _Pid ->
+ global:send(mod_security_test, Msg)
+ end.
+
+type(ip_comm) ->
+ tcp;
+type(_) ->
+ ssl.
+
+typestr(ip_comm) ->
+ "tcp";
+typestr(_) ->
+ "ssl".
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 2d06f3e70c..baef699629 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,9 +32,9 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [
- uri_too_long_414,
+ [uri_too_long_414,
header_too_long_413,
+ entity_too_long,
erl_script_nocache_opt,
script_nocache,
escaped_url_in_error_body,
@@ -63,14 +63,13 @@ end_per_group(_GroupName, Config) ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- tsp("init_per_suite -> entry with"
- "~n Config: ~p", [Config]),
- ok = inets:start(),
+ inets_test_lib:stop_apps([inets]),
+ inets_test_lib:start_apps([inets]),
PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
-
+
Dummy =
-"<HTML>
+ "<HTML>
<HEAD>
<TITLE>/index.html</TITLE>
</HEAD>
@@ -78,7 +77,7 @@ init_per_suite(Config) ->
DUMMY
</BODY>
</HTML>",
-
+
DummyFile = filename:join([PrivDir,"dummy.html"]),
CgiDir = filename:join(PrivDir, "cgi-bin"),
ok = file:make_dir(CgiDir),
@@ -115,8 +114,6 @@ DUMMY
%% Description: Cleanup after the whole suite
%%--------------------------------------------------------------------
end_per_suite(_Config) ->
- tsp("end_per_suite -> entry with"
- "~n Config: ~p", [_Config]),
inets:stop(),
ok.
@@ -132,9 +129,7 @@ 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(Case, Config) ->
- tsp("init_per_testcase(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
+init_per_testcase(_Case, Config) ->
Config.
@@ -146,22 +141,18 @@ init_per_testcase(Case, Config) ->
%% 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(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
+end_per_testcase(_Case, Config) ->
Config.
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-uri_too_long_414(doc) ->
- ["Test that too long uri's get 414 HTTP code"];
-uri_too_long_414(suite) ->
- [];
+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),
- {ok, Pid} = inets:start(httpd, [{port, 0}, {max_uri_size, 10}
+ {ok, Pid} = inets:start(httpd, [{max_uri_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -177,17 +168,12 @@ uri_too_long_414(Config) when is_list(Config) ->
{version, "HTTP/0.9"}]),
inets:stop(httpd, Pid).
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-
-header_too_long_413(doc) ->
- ["Test that too long headers's get 413 HTTP code"];
-header_too_long_413(suite) ->
- [];
+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),
- {ok, Pid} = inets:start(httpd, [{port, 0}, {max_header_size, 10}
+ {ok, Pid} = inets:start(httpd, [{max_header_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -201,8 +187,72 @@ header_too_long_413(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
+
+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),
+ {ok, Pid} = inets:start(httpd, HttpdConf),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ Address = proplists:get_value(bind_address, Info),
+
+ %% Not so long but wrong
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET / " ++
+ lists:duplicate(5, $A) ++ "\r\n\r\n",
+ [{statuscode, 400},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+
+ %% Too long
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET / " ++
+ lists:duplicate(100, $A) ++ "\r\n\r\n",
+ [{statuscode, 413},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+ %% Not so long but wrong
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ lists:duplicate(5, $A) ++ " / "
+ "HTTP/1.1\r\n\r\n",
+ [{statuscode, 501},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/1.1"}]),
+ %% Too long
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ lists:duplicate(100, $A) ++ " / "
+ "HTTP/1.1\r\n\r\n",
+ [{statuscode, 413},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+ inets:stop(httpd, Pid).
+
%%-------------------------------------------------------------------------
+script_nocache() ->
+ [{doc,"Test nocache option for mod_cgi and mod_esi"}].
+script_nocache(Config) when is_list(Config) ->
+ Normal = {no_header, "cache-control"},
+ NoCache = {header, "cache-control", "no-cache"},
+ verify_script_nocache(Config, false, false, Normal, Normal),
+ verify_script_nocache(Config, true, false, NoCache, Normal),
+ verify_script_nocache(Config, false, true, Normal, NoCache),
+ verify_script_nocache(Config, true, true, NoCache, NoCache).
+
+%%-------------------------------------------------------------------------
erl_script_nocache_opt(doc) ->
["Test that too long headers's get 413 HTTP code"];
erl_script_nocache_opt(suite) ->
@@ -224,155 +274,49 @@ erl_script_nocache_opt(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
-script_nocache(doc) ->
- ["Test nocache option for mod_cgi and mod_esi"];
-script_nocache(suite) ->
- [];
-script_nocache(Config) when is_list(Config) ->
- Normal = {no_header, "cache-control"},
- NoCache = {header, "cache-control", "no-cache"},
- verify_script_nocache(Config, false, false, Normal, Normal),
- verify_script_nocache(Config, true, false, NoCache, Normal),
- verify_script_nocache(Config, false, true, Normal, NoCache),
- verify_script_nocache(Config, true, true, NoCache, NoCache),
- ok.
-verify_script_nocache(Config, CgiNoCache, EsiNoCache, CgiOption, EsiOption) ->
- HttpdConf = ?config(httpd_conf, Config),
- CgiScript = ?config(cgi_printenv, Config),
- CgiDir = ?config(cgi_dir, Config),
- {ok, Pid} = inets:start(httpd, [{port, 0},
- {script_alias,
- {"/cgi-bin/", CgiDir ++ "/"}},
- {script_nocache, CgiNoCache},
- {erl_script_alias,
- {"/cgi-bin/erl", [httpd_example,io]}},
- {erl_script_nocache, EsiNoCache}
- | HttpdConf]),
- Info = httpd:info(Pid),
- Port = proplists:get_value(port, Info),
- Address = proplists:get_value(bind_address, Info),
- ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
- "GET /cgi-bin/" ++ CgiScript ++
- " HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- CgiOption,
- {version, "HTTP/1.0"}]),
- ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
- "GET /cgi-bin/erl/httpd_example:get "
- "HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- EsiOption,
- {version, "HTTP/1.0"}]),
- inets:stop(httpd, Pid).
-
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-escaped_url_in_error_body(doc) ->
- ["Test Url-encoding see OTP-8940"];
-escaped_url_in_error_body(suite) ->
- [];
-escaped_url_in_error_body(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- %% This skip is due to a problem on windows with long path's
- %% If a path is too long file:open fails with, for example, eio.
- %% Until that problem is fixed, we skip this case...
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- tsp("escaped_url_in_error_body -> entry"),
+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),
{ok, Pid} = inets:start(httpd, [{port, 0} | HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
- _Address = proplists:get_value(bind_address, Info),
-
- %% Request 1
- tss(1000),
- tsp("escaped_url_in_error_body -> request 1"),
URL1 = ?URL_START ++ integer_to_list(Port),
- %% Make sure the server is ok, by making a request for a valid page
- case httpc:request(get, {URL1 ++ "/dummy.html", []},
- [{url_encode, false},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {200, _}} ->
- %% Don't care about the the body, just that we get a ok response
- ok;
- {ok, {StatusCode1, Body1}} ->
- tsf({unexpected_ok_1, StatusCode1, Body1})
- end,
-
- %% Request 2
- tss(1000),
- tsp("escaped_url_in_error_body -> request 2"),
- %% Make sure the server is ok, by making a request for a valid page
- case httpc:request(get, {URL1 ++ "/dummy.html", []},
- [{url_encode, true},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {200, _}} ->
- %% Don't care about the the body, just that we get a ok response
- ok;
- {ok, {StatusCode2, Body2}} ->
- tsf({unexpected_ok_2, StatusCode2, Body2})
- end,
-
- %% Request 3
- tss(1000),
- tsp("escaped_url_in_error_body -> request 3"),
+
+ %% Sanity check
+ {ok, {200, _}} = httpc:request(get, {URL1 ++ "/dummy.html", []},
+ [{url_encode, false},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+ {ok, {200, _}} = httpc:request(get, {URL1 ++ "/dummy.html", []},
+ [{url_encode, true},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+
%% Ask for a non-existing page(1)
Path = "/<b>this_is_bold<b>",
HTMLEncodedPath = http_util:html_encode(Path),
URL2 = URL1 ++ Path,
- case httpc:request(get, {URL2, []},
- [{url_encode, true},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {404, Body3}} ->
- case find_URL_path(string:tokens(Body3, " ")) of
- HTMLEncodedPath ->
- ok;
- BadPath3 ->
- tsf({unexpected_path_3, HTMLEncodedPath, BadPath3})
- end;
- {ok, UnexpectedOK3} ->
- tsf({unexpected_ok_3, UnexpectedOK3})
- end,
+ {ok, {404, Body3}} = httpc:request(get, {URL2, []},
+ [{url_encode, true},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
- %% Request 4
- tss(1000),
- tsp("escaped_url_in_error_body -> request 4"),
- %% Ask for a non-existing page(2)
- case httpc:request(get, {URL2, []},
- [{url_encode, false},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {404, Body4}} ->
- case find_URL_path(string:tokens(Body4, " ")) of
- HTMLEncodedPath ->
- ok;
- BadPath4 ->
- tsf({unexpected_path_4, HTMLEncodedPath, BadPath4})
- end;
- {ok, UnexpectedOK4} ->
- tsf({unexpected_ok_4, UnexpectedOK4})
- end,
- tss(1000),
- tsp("escaped_url_in_error_body -> stop inets"),
- inets:stop(httpd, Pid),
- tsp("escaped_url_in_error_body -> done"),
- ok.
+ HTMLEncodedPath = find_URL_path(string:tokens(Body3, " ")),
+ {ok, {404, Body4}} = httpc:request(get, {URL2, []},
+ [{url_encode, false},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+
+ HTMLEncodedPath = find_URL_path(string:tokens(Body4, " ")),
+ inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
keep_alive_timeout(doc) ->
["Test the keep_alive_timeout option"];
@@ -392,7 +336,6 @@ keep_alive_timeout(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
script_timeout(doc) ->
["Test the httpd script_timeout option"];
@@ -422,12 +365,10 @@ verify_script_timeout(Config, ScriptTimeout, StatusCode) ->
{version, "HTTP/1.0"}]),
inets:stop(httpd, Pid).
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-slowdose(doc) ->
- ["Testing minimum bytes per second option"];
+slowdose() ->
+ [{doc, "Testing minimum bytes per second option"}].
slowdose(Config) when is_list(Config) ->
HttpdConf = ?config(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0}, {minimum_bytes_per_second, 200}|HttpdConf]),
@@ -438,6 +379,40 @@ slowdose(Config) when is_list(Config) ->
after 6000 ->
{error, closed} = gen_tcp:send(Socket, "Hey")
end.
+
+%%-------------------------------------------------------------------------
+%% Internal functions
+%%-------------------------------------------------------------------------
+
+verify_script_nocache(Config, CgiNoCache, EsiNoCache, CgiOption, EsiOption) ->
+ HttpdConf = ?config(httpd_conf, Config),
+ CgiScript = ?config(cgi_printenv, Config),
+ CgiDir = ?config(cgi_dir, Config),
+ {ok, Pid} = inets:start(httpd, [{port, 0},
+ {script_alias,
+ {"/cgi-bin/", CgiDir ++ "/"}},
+ {script_nocache, CgiNoCache},
+ {erl_script_alias,
+ {"/cgi-bin/erl", [httpd_example,io]}},
+ {erl_script_nocache, EsiNoCache}
+ | HttpdConf]),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ Address = proplists:get_value(bind_address, Info),
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET /cgi-bin/" ++ CgiScript ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ CgiOption,
+ {version, "HTTP/1.0"}]),
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET /cgi-bin/erl/httpd_example:get "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ EsiOption,
+ {version, "HTTP/1.0"}]),
+ inets:stop(httpd, Pid).
+
find_URL_path([]) ->
"";
find_URL_path(["URL", URL | _]) ->
@@ -445,21 +420,6 @@ find_URL_path(["URL", URL | _]) ->
find_URL_path([_ | Rest]) ->
find_URL_path(Rest).
-
-tsp(F) ->
- inets_test_lib:tsp(F).
-tsp(F, A) ->
- inets_test_lib:tsp(F, A).
-
-tsf(Reason) ->
- inets_test_lib:tsf(Reason).
-
-tss(Time) ->
- inets_test_lib:tss(Time).
-
-
-
-
skip(Reason) ->
{skip, Reason}.
diff --git a/lib/inets/test/httpd_block.erl b/lib/inets/test/httpd_block.erl
index 706d014bda..9790623b6f 100644
--- a/lib/inets/test/httpd_block.erl
+++ b/lib/inets/test/httpd_block.erl
@@ -111,8 +111,7 @@ block_disturbing_active_timeout_not_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
ct:sleep(15000),
- Blocker = blocker(Node, Host, Port, 50000),
- await_normal_process_exit(Blocker, "blocker", 50000),
+ ok = httpd_block(undefined, Port, disturbing, 50000),
await_normal_process_exit(Poller, "poller", 30000),
blocked = get_admin_state(Node, Host, Port),
process_flag(trap_exit, false),
@@ -123,8 +122,7 @@ block_disturbing_active_timeout_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 40000),
ct:sleep(5000),
- Blocker = blocker(Node, Host, Port, 10000),
- await_normal_process_exit(Blocker, "blocker", 15000),
+ ok = httpd_block(undefined, Port, disturbing, 10000),
await_suite_failed_process_exit(Poller, "poller", 40000,
connection_closed),
blocked = get_admin_state(Node, Host, Port),
diff --git a/lib/inets/test/httpd_test_lib.erl b/lib/inets/test/httpd_test_lib.erl
index 6406eeae79..647fa6f6c1 100644
--- a/lib/inets/test/httpd_test_lib.erl
+++ b/lib/inets/test/httpd_test_lib.erl
@@ -91,32 +91,10 @@ verify_request(SocketType, Host, Port, Node, RequestStr, Options, TimeOut)
when (is_integer(TimeOut) orelse (TimeOut =:= infinity)) ->
verify_request(SocketType, Host, Port, [], Node, RequestStr, Options, TimeOut).
-verify_request(SocketType, Host, Port, TranspOpts0, Node, RequestStr, Options, TimeOut) ->
- tsp("verify_request -> entry with"
- "~n SocketType: ~p"
- "~n Host: ~p"
- "~n Port: ~p"
- "~n TranspOpts: ~p"
- "~n Node: ~p"
- "~n Options: ~p"
- "~n TimeOut: ~p",
- [SocketType, Host, Port, TranspOpts0, Node, Options, TimeOut]),
-
- %% For now, until we modernize the httpd tests
- TranspOpts =
- case lists:member(inet6, TranspOpts0) of
- true ->
- TranspOpts0;
- false ->
- [inet | TranspOpts0]
- end,
-
+verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr, Options, TimeOut) ->
try inets_test_lib:connect_bin(SocketType, Host, Port, TranspOpts) of
{ok, Socket} ->
- tsp("verify_request -> connected - now send message"),
- SendRes = inets_test_lib:send(SocketType, Socket, RequestStr),
- tsp("verify_request -> send result: "
- "~n ~p", [SendRes]),
+ ok = inets_test_lib:send(SocketType, Socket, RequestStr),
State = case inets_regexp:match(RequestStr, "printenv") of
nomatch ->
#state{};
@@ -127,37 +105,24 @@ verify_request(SocketType, Host, Port, TranspOpts0, Node, RequestStr, Options, T
case request(State#state{request = RequestStr,
socket = Socket}, TimeOut) of
{error, Reason} ->
- tsp("verify_request -> request failed: "
- "~n Reason: ~p", [Reason]),
{error, Reason};
NewState ->
- tsp("verify_request -> validate reply: "
- "~n NewState: ~p", [NewState]),
ValidateResult =
validate(RequestStr, NewState, Options, Node, Port),
- tsp("verify_request -> validation result: "
- "~n ~p", [ValidateResult]),
inets_test_lib:close(SocketType, Socket),
ValidateResult
end;
ConnectError ->
- tsp("verify_request -> connect error: "
- "~n ~p"
- "~n", [ConnectError]),
- tsf({connect_error, ConnectError,
- [SocketType, Host, Port, TranspOpts]})
+ ct:fail({connect_error, ConnectError,
+ [SocketType, Host, Port, TranspOpts]})
catch
T:E ->
- tsp("verify_request -> connect failed: "
- "~n E: ~p"
- "~n T: ~p"
- "~n", [E, T]),
- tsf({connect_failure,
- [{type, T},
- {error, E},
- {stacktrace, erlang:get_stacktrace()},
- {args, [SocketType, Host, Port, TranspOpts]}]})
+ ct:fail({connect_failure,
+ [{type, T},
+ {error, E},
+ {stacktrace, erlang:get_stacktrace()},
+ {args, [SocketType, Host, Port, TranspOpts]}]})
end.
request(#state{mfa = {Module, Function, Args},
@@ -166,10 +131,6 @@ request(#state{mfa = {Module, Function, Args},
HeadRequest = lists:sublist(RequestStr, 1, 4),
receive
{tcp, Socket, Data} ->
- io:format("~p ~w[~w]request -> received (tcp) data"
- "~n Data: ~p"
- "~n", [self(), ?MODULE, ?LINE, Data]),
- print(tcp, Data, State),
case Module:Function([Data | Args]) of
{ok, Parsed} ->
handle_http_msg(Parsed, State);
@@ -179,22 +140,12 @@ request(#state{mfa = {Module, Function, Args},
request(State#state{mfa = NewMFA}, TimeOut)
end;
{tcp_closed, Socket} when Function =:= whole_body ->
- io:format("~p ~w[~w]request -> "
- "received (tcp) closed when whole_body"
- "~n", [self(), ?MODULE, ?LINE]),
- print(tcp, "closed", State),
State#state{body = hd(Args)};
{tcp_closed, Socket} ->
- io:format("~p ~w[~w]request -> received (tcp) closed"
- "~n", [self(), ?MODULE, ?LINE]),
exit({test_failed, connection_closed});
{tcp_error, Socket, Reason} ->
- io:format("~p ~w[~w]request -> received (tcp) error"
- "~n Reason: ~p"
- "~n", [self(), ?MODULE, ?LINE, Reason]),
ct:fail({tcp_error, Reason});
{ssl, Socket, Data} ->
- print(ssl, Data, State),
case Module:Function([Data | Args]) of
{ok, Parsed} ->
handle_http_msg(Parsed, State);
@@ -204,28 +155,19 @@ request(#state{mfa = {Module, Function, Args},
request(State#state{mfa = NewMFA}, TimeOut)
end;
{ssl_closed, Socket} when Function =:= whole_body ->
- print(ssl, "closed", State),
State#state{body = hd(Args)};
{ssl_closed, Socket} ->
exit({test_failed, connection_closed});
{ssl_error, Socket, Reason} ->
ct:fail({ssl_error, Reason})
after TimeOut ->
- io:format("~p ~w[~w]request -> timeout"
- "~n", [self(), ?MODULE, ?LINE]),
+ ct:pal("~p ~w[~w]request -> timeout"
+ "~n", [self(), ?MODULE, ?LINE]),
ct:fail(connection_timed_out)
end.
handle_http_msg({Version, StatusCode, ReasonPharse, Headers, Body},
State = #state{request = RequestStr}) ->
- io:format("~p ~w[~w]handle_http_msg -> entry with"
- "~n Version: ~p"
- "~n StatusCode: ~p"
- "~n ReasonPharse: ~p"
- "~n Headers: ~p"
- "~n Body: ~p"
- "~n", [self(), ?MODULE, ?LINE,
- Version, StatusCode, ReasonPharse, Headers, Body]),
case is_expect(RequestStr) of
true ->
State#state{status_line = {Version,
@@ -285,11 +227,6 @@ validate(RequestStr, #state{status_line = {Version, StatusCode, _},
headers = Headers,
body = Body}, Options, N, P) ->
- tsp("validate -> entry with"
- "~n StatusCode: ~p"
- "~n Headers: ~p"
- "~n Body: ~p", [StatusCode, Headers, Body]),
-
check_version(Version, Options),
case lists:keysearch(statuscode, 1, Options) of
{value, _} ->
@@ -311,20 +248,20 @@ check_version(Version, Options) ->
{value, {version, Version}} ->
ok;
{value, {version, Ver}} ->
- tsf({wrong_version, [{got, Version},
- {expected, Ver}]});
+ ct:fail({wrong_version, [{got, Version},
+ {expected, Ver}]});
_ ->
- case Version of
- "HTTP/1.1" ->
- ok;
+ case Version of
+ "HTTP/1.1" ->
+ ok;
_ ->
- tsf({wrong_version, [{got, Version},
- {expected, "HTTP/1.1"}]})
- end
+ ct:fail({wrong_version, [{got, Version},
+ {expected, "HTTP/1.1"}]})
+ end
end.
check_status_code(StatusCode, [], Options) ->
- tsf({wrong_status_code, [{got, StatusCode}, {expected, Options}]});
+ ct:fail({wrong_status_code, [{got, StatusCode}, {expected, Options}]});
check_status_code(StatusCode, Current = [_ | Rest], Options) ->
case lists:keysearch(statuscode, 1, Current) of
{value, {statuscode, StatusCode}} ->
@@ -332,7 +269,7 @@ check_status_code(StatusCode, Current = [_ | Rest], Options) ->
{value, {statuscode, _OtherStatus}} ->
check_status_code(StatusCode, Rest, Options);
false ->
- tsf({wrong_status_code, [{got, StatusCode}, {expected, Options}]})
+ ct:fail({wrong_status_code, [{got, StatusCode}, {expected, Options}]})
end.
do_validate(_, [], _, _) ->
@@ -345,9 +282,9 @@ do_validate(Header, [{header, HeaderField}|Rest], N, P) ->
{value, {LowerHeaderField, _Value}} ->
ok;
false ->
- tsf({missing_header_field, LowerHeaderField, Header});
+ ct:fail({missing_header_field, LowerHeaderField, Header});
_ ->
- tsf({missing_header_field, LowerHeaderField, Header})
+ ct:fail({missing_header_field, LowerHeaderField, Header})
end,
do_validate(Header, Rest, N, P);
do_validate(Header, [{header, HeaderField, Value}|Rest],N,P) ->
@@ -356,15 +293,15 @@ do_validate(Header, [{header, HeaderField, Value}|Rest],N,P) ->
{value, {LowerHeaderField, Value}} ->
ok;
false ->
- tsf({wrong_header_field_value, LowerHeaderField, Header});
+ ct:fail({wrong_header_field_value, LowerHeaderField, Header});
_ ->
- tsf({wrong_header_field_value, LowerHeaderField, Header})
+ ct:fail({wrong_header_field_value, LowerHeaderField, Header})
end,
do_validate(Header, Rest, N, P);
do_validate(Header,[{no_header, HeaderField}|Rest],N,P) ->
case lists:keysearch(HeaderField,1,Header) of
{value,_} ->
- tsf({wrong_header_field_value, HeaderField, Header});
+ ct:fail({wrong_header_field_value, HeaderField, Header});
_ ->
ok
end,
@@ -382,14 +319,14 @@ is_expect(RequestStr) ->
%% OTP-5775, content-length
check_body("GET /cgi-bin/erl/httpd_example:get_bin HTTP/1.0\r\n\r\n", 200, "text/html", Length, _Body) when (Length =/= 274) ->
- tsf(content_length_error);
+ ct:fail(content_length_error);
check_body("GET /cgi-bin/cgi_echo HTTP/1.0\r\n\r\n", 200, "text/plain",
_, Body) ->
case size(Body) of
100 ->
ok;
_ ->
- tsf(content_length_error)
+ ct:fail(content_length_error)
end;
check_body(RequestStr, 200, "text/html", _, Body) ->
@@ -404,16 +341,3 @@ check_body(RequestStr, 200, "text/html", _, Body) ->
check_body(_, _, _, _,_) ->
ok.
-print(Proto, Data, #state{print = true}) ->
- ct:pal("Received ~p: ~p~n", [Proto, Data]);
-print(_, _, #state{print = false}) ->
- ok.
-
-
-tsp(F) ->
- inets_test_lib:tsp(F).
-tsp(F, A) ->
- inets_test_lib:tsp(F, A).
-
-tsf(Reason) ->
- inets_test_lib:tsf(Reason).
diff --git a/lib/inets/test/inets_appup_test.erl b/lib/inets/test/inets_appup_test.erl
index d563b52ae7..a8051c6c85 100644
--- a/lib/inets/test/inets_appup_test.erl
+++ b/lib/inets/test/inets_appup_test.erl
@@ -23,13 +23,7 @@
-module(inets_appup_test).
-compile(export_all).
--compile({no_auto_import,[error/1]}).
-
--include("inets_test_lib.hrl").
-
-
- % t() -> megaco_test_lib:t(?MODULE).
- % t(Case) -> megaco_test_lib:t({?MODULE, Case}).
+-include_lib("common_test/include/ct.hrl").
%% Test server callbacks
@@ -59,16 +53,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(inets, ".app"),
- AppupFile = file_name(inets, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
+ Config.
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -77,282 +64,7 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+appup() ->
+ [{doc, "Perform a simple check of the inets appup file"}].
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,inets,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
-% io:format("~p => "
-% "~n ~p"
-% "~n ~p"
-% "~n", [V, UpFrom, DownTo]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(UpDown, {V, Instructions}, Modules) ->
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end;
-check_instructions(UpDown, Instructions, _, _, _, _) ->
- fail({bad_instructions, {UpDown, Instructions}}).
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(up, {load_module, Module, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(down, {load_module, Module, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- % Can not be sure that the the dependent module exists in the new appfile
- %%check_module_depend(Module, Depend, Modules),
- check_purge(Pre),
- check_purge(Post);
-
-
-
-check_instruction(up, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_module_deleted, Module})
- end;
-
-check_instruction(down, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- check_module(Module, Modules);
-
-
-check_instruction(_, {apply, {Module, Function, Args}}, _, _) when is_atom(Module), is_atom(Function), is_list(Args) ->
- ok;
-
-check_instruction(_, {update, Module, supervisor}, _, Modules) when is_atom(Module) ->
- check_module(Module, Modules);
-
-check_instruction(_, {update, Module, {advanced, _}, DepMods}, _, Modules) when is_atom(Module), is_list(DepMods) ->
- check_module(Module, Modules),
- check_module_depend(Module, DepMods, Modules);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {restart_application, inets}, _AllInstr, _Modules) ->
- ok;
-
-check_instruction(_, {update, Module, {advanced, _}}, _, Modules) ->
- check_module(Module, Modules);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- error({error, {unknown_instruction, Instr}}).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(REBin) when is_binary(REBin) ->
- try
- begin
- RE = binary_to_list(REBin),
- case re:compile(RE) of
- {ok, _} ->
- ok;
- {error, _} ->
- error({bad_version, REBin})
- end
- end
- catch
- _T:_E ->
- error({bad_version, REBin})
- end;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-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.
+ ok = ?t:appup_test(inets).
diff --git a/lib/inets/test/inets_sup_SUITE.erl b/lib/inets/test/inets_sup_SUITE.erl
index 12b85a816f..60979278fc 100644
--- a/lib/inets/test/inets_sup_SUITE.erl
+++ b/lib/inets/test/inets_sup_SUITE.erl
@@ -77,75 +77,32 @@ end_per_suite(_) ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_testcase(httpd_subtree, Config) ->
- io:format("init_per_testcase(httpd_subtree) -> entry with"
- "~n Config: ~p"
- "~n", [Config]),
Dog = test_server:timetrap(?t:minutes(1)),
NewConfig = lists:keydelete(watchdog, 1, Config),
-
- DataDir = ?config(data_dir, Config),
PrivDir = ?config(priv_dir, Config),
- ServerROOT = filename:join(PrivDir, "server_root"),
- DocROOT = filename:join(PrivDir, "htdocs"),
- ConfDir = filename:join(ServerROOT, "conf"),
-
- io:format("init_per_testcase(httpd_subtree) -> create dir(s)"
- "~n", []),
- file:make_dir(ServerROOT), %% until http_test is cleaned up!
- ok = file:make_dir(DocROOT),
- ok = file:make_dir(ConfDir),
-
- io:format("init_per_testcase(httpd_subtree) -> copy file(s)"
- "~n", []),
- {ok, _} = inets_test_lib:copy_file("simple.conf", DataDir, PrivDir),
- {ok, _} = inets_test_lib:copy_file("mime.types", DataDir, ConfDir),
-
- io:format("init_per_testcase(httpd_subtree) -> write file(s)"
- "~n", []),
- ConfFile = filename:join(PrivDir, "simple.conf"),
- {ok, Fd} = file:open(ConfFile, [append]),
- ok = file:write(Fd, "ServerRoot " ++ ServerROOT ++ "\n"),
- ok = file:write(Fd, "DocumentRoot " ++ DocROOT ++ "\n"),
- ok = file:close(Fd),
-
- %% To make sure application:set_env is not overwritten by any
- %% app-file settings.
- io:format("init_per_testcase(httpd_subtree) -> load inets app"
- "~n", []),
- application:load(inets),
- io:format("init_per_testcase(httpd_subtree) -> update inets env"
- "~n", []),
- ok = application:set_env(inets, services, [{httpd, ConfFile}]),
-
+
+ SimpleConfig = [{port, 0},
+ {server_name,"www.test"},
+ {modules, [mod_get]},
+ {server_root, PrivDir},
+ {document_root, PrivDir},
+ {bind_address, any},
+ {ipfamily, inet}],
try
- io:format("init_per_testcase(httpd_subtree) -> start inets app"
- "~n", []),
- ok = inets:start(),
- io:format("init_per_testcase(httpd_subtree) -> done"
- "~n", []),
- [{watchdog, Dog}, {server_root, ServerROOT}, {doc_root, DocROOT},
- {conf_dir, ConfDir}| NewConfig]
+ inets:start(),
+ inets:start(httpd, SimpleConfig),
+ [{watchdog, Dog} | NewConfig]
catch
_:Reason ->
- io:format("init_per_testcase(httpd_subtree) -> "
- "failed starting inets - cleanup"
- "~n Reason: ~p"
- "~n", [Reason]),
- application:unset_env(inets, services),
- application:unload(inets),
+ inets:stop(),
exit({failed_starting_inets, Reason})
end;
-init_per_testcase(Case, Config) ->
- io:format("init_per_testcase(~p) -> entry with"
- "~n Config: ~p"
- "~n", [Case, Config]),
+init_per_testcase(_Case, Config) ->
Dog = test_server:timetrap(?t:minutes(5)),
NewConfig = lists:keydelete(watchdog, 1, Config),
- Stop = inets:stop(),
- io:format("init_per_testcase(~p) -> Stop: ~p"
- "~n", [Case, Stop]),
+ inets:stop(),
ok = inets:start(),
[{watchdog, Dog} | NewConfig].
@@ -260,10 +217,10 @@ tftpd_worker(suite) ->
[];
tftpd_worker(Config) when is_list(Config) ->
[] = supervisor:which_children(tftp_sup),
- {ok, Pid0} = inets:start(tftpd, [{host, "localhost"},
- {port, inet_port()}]),
- {ok, _Pid1} = inets:start(tftpd, [{host, "localhost"},
- {port, inet_port()}], stand_alone),
+ {ok, Pid0} = inets:start(tftpd, [{host, inets_test_lib:hostname()},
+ {port, 0}]),
+ {ok, _Pid1} = inets:start(tftpd, [{host, inets_test_lib:hostname()},
+ {port, 0}], stand_alone),
[{_,Pid0, worker, _}] = supervisor:which_children(tftp_sup),
inets:stop(tftpd, Pid0),
@@ -280,30 +237,21 @@ httpd_subtree(doc) ->
httpd_subtree(suite) ->
[];
httpd_subtree(Config) when is_list(Config) ->
- io:format("httpd_subtree -> entry with"
- "~n Config: ~p"
- "~n", [Config]),
-
%% Check that we have the httpd top supervisor
- io:format("httpd_subtree -> verify inets~n", []),
{ok, _} = verify_child(inets_sup, httpd_sup, supervisor),
%% Check that we have the httpd instance supervisor
- io:format("httpd_subtree -> verify httpd~n", []),
{ok, Id} = verify_child(httpd_sup, httpd_instance_sup, supervisor),
{httpd_instance_sup, Addr, Port} = Id,
Instance = httpd_util:make_name("httpd_instance_sup", Addr, Port),
%% Check that we have the expected httpd instance children
- io:format("httpd_subtree -> verify httpd instance children "
- "(acceptor, misc and manager)~n", []),
{ok, _} = verify_child(Instance, httpd_connection_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_acceptor_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_misc_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_manager, worker),
%% Check that the httpd instance acc supervisor has children
- io:format("httpd_subtree -> verify acc~n", []),
InstanceAcc = httpd_util:make_name("httpd_acceptor_sup", Addr, Port),
case supervisor:which_children(InstanceAcc) of
[_ | _] ->
@@ -328,15 +276,7 @@ httpd_subtree(Config) when is_list(Config) ->
verify_child(Parent, Child, Type) ->
-%% io:format("verify_child -> entry with"
-%% "~n Parent: ~p"
-%% "~n Child: ~p"
-%% "~n Type: ~p"
-%% "~n", [Parent, Child, Type]),
Children = supervisor:which_children(Parent),
-%% io:format("verify_child -> which children"
-%% "~n Children: ~p"
-%% "~n", [Children]),
verify_child(Children, Parent, Child, Type).
verify_child([], Parent, Child, _Type) ->
@@ -344,21 +284,12 @@ verify_child([], Parent, Child, _Type) ->
verify_child([{Id, _Pid, Type2, Mods}|Children], Parent, Child, Type) ->
case lists:member(Child, Mods) of
true when (Type2 =:= Type) ->
-%% io:format("verify_child -> found with expected type"
-%% "~n Id: ~p"
-%% "~n", [Id]),
{ok, Id};
true when (Type2 =/= Type) ->
-%% io:format("verify_child -> found with unexpected type"
-%% "~n Type2: ~p"
-%% "~n Id: ~p"
-%% "~n", [Type2, Id]),
{error, {wrong_type, Type2, Child, Parent}};
false ->
verify_child(Children, Parent, Child, Type)
end.
-
-
%%-------------------------------------------------------------------------
%% httpc_subtree
@@ -368,47 +299,19 @@ httpc_subtree(doc) ->
httpc_subtree(suite) ->
[];
httpc_subtree(Config) when is_list(Config) ->
- tsp("httpc_subtree -> entry with"
- "~n Config: ~p", [Config]),
-
- tsp("httpc_subtree -> start inets service httpc with profile foo"),
- {ok, _Foo} = inets:start(httpc, [{profile, foo}]),
+ {ok, Foo} = inets:start(httpc, [{profile, foo}]),
- tsp("httpc_subtree -> "
- "start stand-alone inets service httpc with profile bar"),
- {ok, _Bar} = inets:start(httpc, [{profile, bar}], stand_alone),
+ {ok, Bar} = inets:start(httpc, [{profile, bar}], stand_alone),
- tsp("httpc_subtree -> retreive list of httpc instances"),
HttpcChildren = supervisor:which_children(httpc_profile_sup),
- tsp("httpc_subtree -> HttpcChildren: ~n~p", [HttpcChildren]),
-
- tsp("httpc_subtree -> verify httpc stand-alone instances"),
+
{value, {httpc_manager, _, worker, [httpc_manager]}} =
lists:keysearch(httpc_manager, 1, HttpcChildren),
- tsp("httpc_subtree -> verify httpc (named) instances"),
- {value,{{httpc,foo}, Pid, worker, [httpc_manager]}} =
+ {value,{{httpc,foo}, _Pid, worker, [httpc_manager]}} =
lists:keysearch({httpc, foo}, 1, HttpcChildren),
false = lists:keysearch({httpc, bar}, 1, HttpcChildren),
- tsp("httpc_subtree -> stop inets"),
- inets:stop(httpc, Pid),
-
- tsp("httpc_subtree -> done"),
- ok.
-
-inet_port() ->
- {ok, Socket} = gen_tcp:listen(0, [{reuseaddr, true}]),
- {ok, Port} = inet:port(Socket),
- gen_tcp:close(Socket),
- Port.
-
-
-tsp(F) ->
- tsp(F, []).
-tsp(F, A) ->
- test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]).
-
-tsf(Reason) ->
- test_server:fail(Reason).
+ inets:stop(httpc, Foo),
+ exit(Bar, normal).
diff --git a/lib/inets/test/inets_sup_SUITE_data/mime.types b/lib/inets/test/inets_sup_SUITE_data/mime.types
deleted file mode 100644
index e52d345ff7..0000000000
--- a/lib/inets/test/inets_sup_SUITE_data/mime.types
+++ /dev/null
@@ -1,3 +0,0 @@
-# MIME type Extension
-text/html html htm
-text/plain asc txt
diff --git a/lib/inets/test/inets_sup_SUITE_data/simple.conf b/lib/inets/test/inets_sup_SUITE_data/simple.conf
deleted file mode 100644
index e1429b4a28..0000000000
--- a/lib/inets/test/inets_sup_SUITE_data/simple.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-Port 8888
-ServerName www.test
-SocketType ip_comm
-Modules mod_get
-ServerAdmin [email protected]
-
diff --git a/lib/inets/test/old_httpd_SUITE.erl b/lib/inets/test/old_httpd_SUITE.erl
index de9aa4562e..74c11f71ba 100644
--- a/lib/inets/test/old_httpd_SUITE.erl
+++ b/lib/inets/test/old_httpd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -155,65 +155,108 @@ all() ->
[
{group, ip},
{group, ssl},
- {group, http_1_1_ip},
- {group, http_1_0_ip},
- {group, http_0_9_ip},
- {group, ipv6},
+ %%{group, http_1_1_ip},
+ %%{group, http_1_0_ip},
+ %%{group, http_0_9_ip},
+ %%{group, ipv6},
{group, tickets}
].
groups() ->
[
{ip, [],
- [ip_mod_alias, ip_mod_actions, ip_mod_security,
- ip_mod_auth, ip_mod_auth_api, ip_mod_auth_mnesia_api,
- ip_mod_htaccess, ip_mod_cgi, ip_mod_esi, ip_mod_get,
- ip_mod_head, ip_mod_all, ip_load_light, ip_load_medium,
- ip_load_heavy, ip_dos_hostname, ip_time_test,
- ip_restart_no_block, ip_restart_disturbing_block,
- ip_restart_non_disturbing_block,
- ip_block_disturbing_idle, ip_block_non_disturbing_idle,
- ip_block_503, ip_block_disturbing_active,
- ip_block_non_disturbing_active,
- ip_block_disturbing_active_timeout_not_released,
- ip_block_disturbing_active_timeout_released,
- ip_block_non_disturbing_active_timeout_not_released,
- ip_block_non_disturbing_active_timeout_released,
- ip_block_disturbing_blocker_dies,
- ip_block_non_disturbing_blocker_dies]},
+ [
+ %%ip_mod_alias,
+ ip_mod_actions,
+ %%ip_mod_security,
+ %% ip_mod_auth,
+ %% ip_mod_auth_api,
+ ip_mod_auth_mnesia_api,
+ %%ip_mod_htaccess,
+ %%ip_mod_cgi,
+ %%ip_mod_esi,
+ %%ip_mod_get,
+ %%ip_mod_head,
+ %%ip_mod_all,
+ %% ip_load_light,
+ %% ip_load_medium,
+ %% ip_load_heavy,
+ %%ip_dos_hostname,
+ ip_time_test,
+ %% Only used through load_config
+ %% but we still need these tests
+ %% should be cleaned up and moved to new test suite
+ %%ip_restart_no_block,
+ %%ip_restart_disturbing_block,
+ %%ip_restart_non_disturbing_block,
+ %% Tested in inets_SUITE
+ %%ip_block_disturbing_idle,
+ %%ip_block_non_disturbing_idle,
+ ip_block_503
+ %% Tested in new httpd_SUITE
+ %%ip_block_disturbing_active,
+ %%ip_block_non_disturbing_active,
+ %%ip_block_disturbing_blocker_dies,
+ %%ip_block_non_disturbing_blocker_dies
+ %% No longer relevant
+ %%ip_block_disturbing_active_timeout_not_released,
+ %%ip_block_disturbing_active_timeout_released,
+ %%ip_block_non_disturbing_active_timeout_not_released,
+ %%ip_block_non_disturbing_active_timeout_released,
+ ]},
{ssl, [], [{group, essl}]},
{essl, [],
- [essl_mod_alias, essl_mod_actions, essl_mod_security,
- essl_mod_auth, essl_mod_auth_api,
- essl_mod_auth_mnesia_api, essl_mod_htaccess,
- essl_mod_cgi, essl_mod_esi, essl_mod_get, essl_mod_head,
- essl_mod_all, essl_load_light, essl_load_medium,
- essl_load_heavy, essl_dos_hostname, essl_time_test,
- essl_restart_no_block, essl_restart_disturbing_block,
- essl_restart_non_disturbing_block,
- essl_block_disturbing_idle,
- essl_block_non_disturbing_idle, essl_block_503,
- essl_block_disturbing_active,
- essl_block_non_disturbing_active,
- essl_block_disturbing_active_timeout_not_released,
- essl_block_disturbing_active_timeout_released,
- essl_block_non_disturbing_active_timeout_not_released,
- essl_block_non_disturbing_active_timeout_released,
- essl_block_disturbing_blocker_dies,
- essl_block_non_disturbing_blocker_dies]},
- {http_1_1_ip, [],
- [ip_host, ip_chunked, ip_expect, ip_range, ip_if_test,
- ip_http_trace, ip_http1_1_head,
- ip_mod_cgi_chunked_encoding_test]},
- {http_1_0_ip, [],
- [ip_head_1_0, ip_get_1_0, ip_post_1_0]},
- {http_0_9_ip, [], [ip_get_0_9]},
- {ipv6, [], [ipv6_hostname_ipcomm, ipv6_address_ipcomm,
- ipv6_hostname_essl, ipv6_address_essl]},
+ [
+ %%essl_mod_alias,
+ essl_mod_actions,
+ %% essl_mod_security,
+ %% essl_mod_auth,
+ %% essl_mod_auth_api,
+ essl_mod_auth_mnesia_api,
+ %%essl_mod_htaccess,
+ %%essl_mod_cgi,
+ %%essl_mod_esi,
+ %%essl_mod_get,
+ %%essl_mod_head,
+ %% essl_mod_all,
+ %% essl_load_light,
+ %% essl_load_medium,
+ %% essl_load_heavy,
+ %%essl_dos_hostname,
+ essl_time_test
+ %% Replaced by load_config
+ %% essl_restart_no_block,
+ %% essl_restart_disturbing_block,
+ %% essl_restart_non_disturbing_block,
+ %% essl_block_disturbing_idle,
+ %% essl_block_non_disturbing_idle, essl_block_503,
+ %% essl_block_disturbing_active,
+ %% essl_block_non_disturbing_active,
+ %% essl_block_disturbing_active_timeout_not_released,
+ %% essl_block_disturbing_active_timeout_released,
+ %% essl_block_non_disturbing_active_timeout_not_released,
+ %% essl_block_non_disturbing_active_timeout_released,
+ %% essl_block_disturbing_blocker_dies,
+ %% essl_block_non_disturbing_blocker_dies
+ ]},
+ %% {http_1_1_ip, [],
+ %% [
+ %% %%ip_host, ip_chunked, ip_expect,
+ %% %%ip_range,
+ %% %%ip_if_test
+ %% %%ip_http_trace, ip_http1_1_head,
+ %% %%ip_mod_cgi_chunked_encoding_test
+ %% ]},
+ %%{http_1_0_ip, [],
+ %%[ip_head_1_0, ip_get_1_0, ip_post_1_0]},
+ %%{http_0_9_ip, [], [ip_get_0_9]},
+ %% {ipv6, [], [ipv6_hostname_ipcomm, ipv6_address_ipcomm,
+ %% ipv6_hostname_essl, ipv6_address_essl]},
{tickets, [],
- [ticket_5775, ticket_5865, ticket_5913, ticket_6003,
- ticket_7304]}].
-
+ [%%ticket_5775, ticket_5865,
+ ticket_5913%%, ticket_6003,
+ %%ticket_7304
+ ]}].
init_per_group(ipv6 = _GroupName, Config) ->
case inets_test_lib:has_ipv6_support() of
diff --git a/lib/inets/test/property_test/README b/lib/inets/test/property_test/README
new file mode 100644
index 0000000000..57602bf719
--- /dev/null
+++ b/lib/inets/test/property_test/README
@@ -0,0 +1,12 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% WARNING %%%
+%%% %%%
+%%% This is experimental code which may be changed or removed %%%
+%%% anytime without any warning. %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+The test in this directory are written assuming that the user has a QuickCheck license. They are to be run manually. Some may be possible to be run with other tools, e.g. PropEr.
+
diff --git a/lib/inets/test/property_test/ftp_simple_client_server.erl b/lib/inets/test/property_test/ftp_simple_client_server.erl
new file mode 100644
index 0000000000..40e630ee5c
--- /dev/null
+++ b/lib/inets/test/property_test/ftp_simple_client_server.erl
@@ -0,0 +1,306 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(ftp_simple_client_server).
+
+-compile(export_all).
+
+-ifndef(EQC).
+-ifndef(PROPER).
+-define(EQC,true).
+%%-define(PROPER,true).
+-endif.
+-endif.
+
+
+-ifdef(EQC).
+
+-include_lib("eqc/include/eqc.hrl").
+-include_lib("eqc/include/eqc_statem.hrl").
+-define(MOD_eqc, eqc).
+-define(MOD_eqc_gen, eqc_gen).
+-define(MOD_eqc_statem, eqc_statem).
+
+-else.
+-ifdef(PROPER).
+
+-include_lib("proper/include/proper.hrl").
+-define(MOD_eqc, proper).
+-define(MOD_eqc_gen, proper_gen).
+-define(MOD_eqc_statem, proper_statem).
+
+-endif.
+-endif.
+
+-record(state, {
+ initialized = false,
+ priv_dir,
+ data_dir,
+ servers = [], % [ {IP,Port,Userid,Pwd} ]
+ clients = [], % [ client_ref() ]
+ store = [] % [ {Name,Contents} ]
+ }).
+
+-define(fmt(F,A), io:format(F,A)).
+%%-define(fmt(F,A), ok).
+
+-define(v(K,L), proplists:get_value(K,L)).
+
+%%%================================================================
+%%%
+%%% Properties
+%%%
+
+%% This function is for normal eqc calls:
+prop_ftp() ->
+ {ok,PWD} = file:get_cwd(),
+ prop_ftp(filename:join([PWD,?MODULE_STRING++"_data"]),
+ filename:join([PWD,?MODULE_STRING,"_files"])).
+
+%% This function is for calls from common_test test cases:
+prop_ftp(Config) ->
+ prop_ftp(filename:join([?v(property_dir,Config), ?MODULE_STRING++"_data"]),
+ ?v(priv_dir,Config) ).
+
+
+prop_ftp(DataDir, PrivDir) ->
+ S0 = #state{data_dir = DataDir,
+ priv_dir = PrivDir},
+ ?FORALL(Cmds, more_commands(10,commands(?MODULE,S0)),
+ aggregate(command_names(Cmds),
+ begin {_H,S,Result} = run_commands(?MODULE,Cmds),
+ % io:format('**** Result=~p~n',[Result]),
+ % io:format('**** S=~p~n',[S]),
+ % io:format('**** _H=~p~n',[_H]),
+ % io:format('**** Cmds=~p~n',[Cmds]),
+ [cmnd_stop_server(X) || X <- S#state.servers],
+ [inets:stop(ftpc,X) || {ok,X} <- S#state.clients],
+ Result==ok
+ end)
+ ).
+
+%%%================================================================
+%%%
+%%% State model
+%%%
+
+%% @doc Returns the state in which each test case starts. (Unless a different
+%% initial state is supplied explicitly to, e.g. commands/2.)
+-spec initial_state() ->?MOD_eqc_statem:symbolic_state().
+initial_state() ->
+ ?fmt("Initial_state()~n",[]),
+ #state{}.
+
+%% @doc Command generator, S is the current state
+-spec command(S :: ?MOD_eqc_statem:symbolic_state()) -> ?MOD_eqc_gen:gen(eqc_statem:call()).
+
+command(#state{initialized=false,
+ priv_dir=PrivDir}) ->
+ {call,?MODULE,cmnd_init,[PrivDir]};
+
+command(#state{servers=[],
+ priv_dir=PrivDir,
+ data_dir=DataDir}) ->
+ {call,?MODULE,cmnd_start_server,[PrivDir,DataDir]};
+
+command(#state{servers=Ss=[_|_],
+ clients=[]}) ->
+ {call,?MODULE,cmnd_start_client,[oneof(Ss)]};
+
+command(#state{servers=Ss=[_|_],
+ clients=Cs=[_|_],
+ store=Store=[_|_]
+ }) ->
+ frequency([
+ { 5, {call,?MODULE,cmnd_start_client,[oneof(Ss)]}},
+ { 5, {call,?MODULE,cmnd_stop_client,[oneof(Cs)]}},
+ {10, {call,?MODULE,cmnd_put,[oneof(Cs),file_path(),file_contents()]}},
+ {20, {call,?MODULE,cmnd_get,[oneof(Cs),oneof(Store)]}},
+ {10, {call,?MODULE,cmnd_delete,[oneof(Cs),oneof(Store)]}}
+ ]);
+
+command(#state{servers=Ss=[_|_],
+ clients=Cs=[_|_],
+ store=[]
+ }) ->
+ frequency([
+ {5, {call,?MODULE,cmnd_start_client,[oneof(Ss)]}},
+ {5, {call,?MODULE,cmnd_stop_client,[oneof(Cs)]}},
+ {10, {call,?MODULE,cmnd_put,[oneof(Cs),file_path(),file_contents()]}}
+ ]).
+
+%% @doc Precondition, checked before command is added to the command sequence.
+-spec precondition(S :: ?MOD_eqc_statem:symbolic_state(), C :: ?MOD_eqc_statem:call()) -> boolean().
+
+precondition(#state{clients=Cs}, {call, _, cmnd_put, [C,_,_]}) -> lists:member(C,Cs);
+
+precondition(#state{clients=Cs, store=Store},
+ {call, _, cmnd_get, [C,X]}) -> lists:member(C,Cs) andalso lists:member(X,Store);
+
+precondition(#state{clients=Cs, store=Store},
+ {call, _, cmnd_delete, [C,X]}) -> lists:member(C,Cs) andalso lists:member(X,Store);
+
+precondition(#state{servers=Ss}, {call, _, cmnd_start_client, _}) -> Ss =/= [];
+
+precondition(#state{clients=Cs}, {call, _, cmnd_stop_client, [C]}) -> lists:member(C,Cs);
+
+precondition(#state{initialized=IsInit}, {call, _, cmnd_init, _}) -> IsInit==false;
+
+precondition(_S, {call, _, _, _}) -> true.
+
+
+%% @doc Postcondition, checked after command has been evaluated
+%% Note: S is the state before next_state(S,_,C)
+-spec postcondition(S :: ?MOD_eqc_statem:dynamic_state(), C :: ?MOD_eqc_statem:call(),
+ Res :: term()) -> boolean().
+
+postcondition(_S, {call, _, cmnd_get, [_,{_Name,Expected}]}, {ok,Value}) ->
+ Value == Expected;
+
+postcondition(S, {call, _, cmnd_delete, [_,{Name,_Expected}]}, ok) ->
+ ?fmt("file:read_file(..) = ~p~n",[file:read_file(filename:join(S#state.priv_dir,Name))]),
+ {error,enoent} == file:read_file(filename:join(S#state.priv_dir,Name));
+
+postcondition(S, {call, _, cmnd_put, [_,Name,Value]}, ok) ->
+ {ok,Bin} = file:read_file(filename:join(S#state.priv_dir,Name)),
+ Bin == unicode:characters_to_binary(Value);
+
+postcondition(_S, {call, _, cmnd_stop_client, _}, ok) -> true;
+
+postcondition(_S, {call, _, cmnd_start_client, _}, {ok,_}) -> true;
+
+postcondition(_S, {call, _, cmnd_init, _}, ok) -> true;
+
+postcondition(_S, {call, _, cmnd_start_server, _}, {ok,_}) -> true.
+
+
+%% @doc Next state transformation, S is the current state. Returns next state.
+-spec next_state(S :: ?MOD_eqc_statem:symbolic_state(),
+ V :: ?MOD_eqc_statem:var(),
+ C :: ?MOD_eqc_statem:call()) -> ?MOD_eqc_statem:symbolic_state().
+
+next_state(S, _V, {call, _, cmnd_put, [_,Name,Val]}) ->
+ S#state{store = [{Name,Val} | lists:keydelete(Name,1,S#state.store)]};
+
+next_state(S, _V, {call, _, cmnd_delete, [_,{Name,_Val}]}) ->
+ S#state{store = lists:keydelete(Name,1,S#state.store)};
+
+next_state(S, V, {call, _, cmnd_start_client, _}) ->
+ S#state{clients = [V | S#state.clients]};
+
+next_state(S, V, {call, _, cmnd_start_server, _}) ->
+ S#state{servers = [V | S#state.servers]};
+
+next_state(S, _V, {call, _, cmnd_stop_client, [C]}) ->
+ S#state{clients = S#state.clients -- [C]};
+
+next_state(S, _V, {call, _, cmnd_init, _}) ->
+ S#state{initialized=true};
+
+next_state(S, _V, {call, _, _, _}) ->
+ S.
+
+%%%================================================================
+%%%
+%%% Data model
+%%%
+
+file_path() -> non_empty(list(alphanum_char())).
+%%file_path() -> non_empty( list(oneof([alphanum_char(), utf8_char()])) ).
+
+%%file_contents() -> list(alphanum_char()).
+file_contents() -> list(oneof([alphanum_char(), utf8_char()])).
+
+alphanum_char() -> oneof(lists:seq($a,$z) ++ lists:seq($A,$Z) ++ lists:seq($0,$9)).
+
+utf8_char() -> oneof("åäöÅÄÖ話话カタカナひらがな").
+
+%%%================================================================
+%%%
+%%% Commands doing something with the System Under Test
+%%%
+
+cmnd_init(PrivDir) ->
+ ?fmt('Call cmnd_init(~p)~n',[PrivDir]),
+ os:cmd("killall vsftpd"),
+ clear_files(PrivDir),
+ ok.
+
+cmnd_start_server(PrivDir, DataDir) ->
+ ?fmt('Call cmnd_start_server(~p, ~p)~n',[PrivDir,DataDir]),
+ Cmnd = ["vsftpd ", filename:join(DataDir,"vsftpd.conf"),
+ " -oftpd_banner=erlang_otp_testing"
+ " -oanon_root=",PrivDir
+ ],
+ ?fmt("Cmnd=~s~n",[Cmnd]),
+ case os:cmd(Cmnd) of
+ [] ->
+ {ok,{"localhost",9999,"ftp","[email protected]"}};
+ Other ->
+ {error,Other}
+ end.
+
+cmnd_stop_server({ok,{_Host,Port,_Usr,_Pwd}}) ->
+ os:cmd("kill `netstat -tpln | grep "++integer_to_list(Port)++" | awk '{print $7}' | awk -F/ '{print $1}'`").
+
+cmnd_start_client({ok,{Host,Port,Usr,Pwd}}) ->
+ ?fmt('Call cmnd_start_client(~p)...',[{Host,Port,Usr,Pwd}]),
+ case inets:start(ftpc, [{host,Host},{port,Port}]) of
+ {ok,Client} ->
+ ?fmt("~p...",[{ok,Client}]),
+ case ftp:user(Client, Usr, Pwd) of
+ ok ->
+ ?fmt("OK!~n",[]),
+ {ok,Client};
+ Other ->
+ ?fmt("Other1=~p~n",[Other]),
+ inets:stop(ftpc,Client), Other
+ end;
+ Other ->
+ ?fmt("Other2=~p~n",[Other]),
+ Other
+ end.
+
+cmnd_stop_client({ok,Client}) ->
+ ?fmt('Call cmnd_stop_client(~p)~n',[Client]),
+ inets:stop(ftpc, Client). %% -> ok | Other
+
+cmnd_delete({ok,Client}, {Name,_ExpectedValue}) ->
+ ?fmt('Call cmnd_delete(~p, ~p)~n',[Client,Name]),
+ R=ftp:delete(Client, Name),
+ ?fmt("R=~p~n",[R]),
+ R.
+
+cmnd_put({ok,Client}, Name, Value) ->
+ ?fmt('Call cmnd_put(~p, ~p, ~p)...',[Client, Name, Value]),
+ R = ftp:send_bin(Client, unicode:characters_to_binary(Value), Name), % ok | {error,Error}
+ ?fmt('~p~n',[R]),
+ R.
+
+cmnd_get({ok,Client}, {Name,_ExpectedValue}) ->
+ ?fmt('Call cmnd_get(~p, ~p)~n',[Client,Name]),
+ case ftp:recv_bin(Client, Name) of
+ {ok,Bin} -> {ok, unicode:characters_to_list(Bin)};
+ Other -> Other
+ end.
+
+
+clear_files(Dir) ->
+ os:cmd(["rm -fr ",filename:join(Dir,"*")]).
diff --git a/lib/inets/test/property_test/ftp_simple_client_server_data/vsftpd.conf b/lib/inets/test/property_test/ftp_simple_client_server_data/vsftpd.conf
new file mode 100644
index 0000000000..fd48e2abf0
--- /dev/null
+++ b/lib/inets/test/property_test/ftp_simple_client_server_data/vsftpd.conf
@@ -0,0 +1,26 @@
+
+###
+### Some parameters are given in the vsftpd start command.
+###
+### Typical command-line paramters are such that has a file path
+### component like cert files.
+###
+
+
+listen=YES
+listen_port=9999
+run_as_launching_user=YES
+ssl_enable=NO
+#allow_anon_ssl=YES
+
+background=YES
+
+write_enable=YES
+anonymous_enable=YES
+anon_upload_enable=YES
+anon_mkdir_write_enable=YES
+anon_other_write_enable=YES
+anon_world_readable_only=NO
+
+### Shouldn't be necessary....
+require_ssl_reuse=NO
diff --git a/lib/inets/test/uri_SUITE.erl b/lib/inets/test/uri_SUITE.erl
index 9ba09e1474..f75e347d0c 100644
--- a/lib/inets/test/uri_SUITE.erl
+++ b/lib/inets/test/uri_SUITE.erl
@@ -46,6 +46,7 @@ all() ->
userinfo,
scheme,
queries,
+ fragments,
escaped,
hexed_query
].
@@ -105,6 +106,42 @@ queries(Config) when is_list(Config) ->
{ok, {http,[],"localhost",8888,"/foobar.html","?foo=bar&foobar=42"}} =
http_uri:parse("http://localhost:8888/foobar.html?foo=bar&foobar=42").
+fragments(Config) when is_list(Config) ->
+ {ok, {http,[],"localhost",80,"/",""}} =
+ http_uri:parse("http://localhost#fragment"),
+ {ok, {http,[],"localhost",80,"/path",""}} =
+ http_uri:parse("http://localhost/path#fragment"),
+ {ok, {http,[],"localhost",80,"/","?query"}} =
+ http_uri:parse("http://localhost?query#fragment"),
+ {ok, {http,[],"localhost",80,"/path","?query"}} =
+ http_uri:parse("http://localhost/path?query#fragment"),
+ {ok, {http,[],"localhost",80,"/","","#fragment"}} =
+ http_uri:parse("http://localhost#fragment", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","","#fragment"}} =
+ http_uri:parse("http://localhost/path#fragment", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/","?query","#fragment"}} =
+ http_uri:parse("http://localhost?query#fragment", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","?query","#fragment"}} =
+ http_uri:parse("http://localhost/path?query#fragment",
+ [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/","",""}} =
+ http_uri:parse("http://localhost", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","",""}} =
+ http_uri:parse("http://localhost/path", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/","?query",""}} =
+ http_uri:parse("http://localhost?query", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","?query",""}} =
+ http_uri:parse("http://localhost/path?query", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/","","#"}} =
+ http_uri:parse("http://localhost#", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","","#"}} =
+ http_uri:parse("http://localhost/path#", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/","?query","#"}} =
+ http_uri:parse("http://localhost?query#", [{fragment,true}]),
+ {ok, {http,[],"localhost",80,"/path","?query","#"}} =
+ http_uri:parse("http://localhost/path?query#", [{fragment,true}]),
+ ok.
+
escaped(Config) when is_list(Config) ->
{ok, {http,[],"www.somedomain.com",80,"/%2Eabc",[]}} =
http_uri:parse("http://www.somedomain.com/%2Eabc"),
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index cccfb7a44f..38d46cc6fd 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2001-2014. All Rights Reserved.
+# Copyright Ericsson AB 2001-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,7 +18,6 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 5.9.8
+INETS_VSN = 5.10.9
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
-
diff --git a/lib/jinterface/doc/src/book.xml b/lib/jinterface/doc/src/book.xml
index ce40510643..498fdbfd63 100644
--- a/lib/jinterface/doc/src/book.xml
+++ b/lib/jinterface/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/fascicules.xml b/lib/jinterface/doc/src/fascicules.xml
index 099e50c332..4f04be0515 100644
--- a/lib/jinterface/doc/src/fascicules.xml
+++ b/lib/jinterface/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/jinterface/doc/src/jinterface.xml b/lib/jinterface/doc/src/jinterface.xml
index bf3a531749..d8f6183bd8 100644
--- a/lib/jinterface/doc/src/jinterface.xml
+++ b/lib/jinterface/doc/src/jinterface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/jinterface_users_guide.xml b/lib/jinterface/doc/src/jinterface_users_guide.xml
index 7865a0cab4..5dfe5c0c6d 100644
--- a/lib/jinterface/doc/src/jinterface_users_guide.xml
+++ b/lib/jinterface/doc/src/jinterface_users_guide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -112,6 +112,10 @@
<cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangTuple">OtpErlangTuple</seealso></cell>
</row>
<row>
+ <cell align="left" valign="middle">map</cell>
+ <cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangMap">OtpErlangMap</seealso></cell>
+ </row>
+ <row>
<cell align="left" valign="middle">term</cell>
<cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangObject">OtpErlangObject</seealso></cell>
</row>
diff --git a/lib/jinterface/doc/src/notes.xml b/lib/jinterface/doc/src/notes.xml
index 25d4482b76..fc5f8be53e 100644
--- a/lib/jinterface/doc/src/notes.xml
+++ b/lib/jinterface/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,6 +30,109 @@
</header>
<p>This document describes the changes made to the Jinterface application.</p>
+<section><title>Jinterface 1.5.12</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ handle empty .erlang.cookie without crashing and
+ OtpErlangList.clone must not return null</p>
+ <p>
+ Own Id: OTP-12210</p>
+ </item>
+ <item>
+ <p>
+ This fixes all the compilation warnings in the Java code</p>
+ <p>
+ Own Id: OTP-12211</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added an .appup file for the application.</p>
+ <p>
+ Own Id: OTP-12358 Aux Id: OTP-12178 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Jinterface 1.5.11</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Added a <c>.app</c> file for the application.</p>
+ <p>
+ Own Id: OTP-12178</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Jinterface 1.5.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Array now show meaningful values in exceptions.</p>
+ <p>
+ Own Id: OTP-12049</p>
+ </item>
+ <item>
+ <p>
+ Documentation improvements.</p>
+ <p>
+ Own Id: OTP-12050</p>
+ </item>
+ <item>
+ <p>
+ Include the cause when raising a new IOException, which
+ should make the reason for the exception clearer.</p>
+ <p>
+ Own Id: OTP-12075</p>
+ </item>
+ <item>
+ <p>
+ Arrays (here: md5 and freeVars) must not be compared with
+ equals, which is broken (compares identity).</p>
+ <p>
+ Own Id: OTP-12121</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Jinterface 1.5.9</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Implement support for Maps</p>
+ <p>
+ The API and implementation are simplistic, like for lists
+ and tuples, using arrays and without any connection to
+ java.util.Map. (Thanks to Vlad Dumitrescu)</p>
+ <p>
+ Own Id: OTP-11703</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Jinterface 1.5.8</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/jinterface/doc/src/notes_history.xml b/lib/jinterface/doc/src/notes_history.xml
index 8627eb182a..6e25446751 100644
--- a/lib/jinterface/doc/src/notes_history.xml
+++ b/lib/jinterface/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/part.xml b/lib/jinterface/doc/src/part.xml
index 413c9b9cd9..dfa0d91cda 100644
--- a/lib/jinterface/doc/src/part.xml
+++ b/lib/jinterface/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/part_notes.xml b/lib/jinterface/doc/src/part_notes.xml
index 555efe319e..1f8fc69798 100644
--- a/lib/jinterface/doc/src/part_notes.xml
+++ b/lib/jinterface/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/part_notes_history.xml b/lib/jinterface/doc/src/part_notes_history.xml
index b5442e98c1..31211f3645 100644
--- a/lib/jinterface/doc/src/part_notes_history.xml
+++ b/lib/jinterface/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/jinterface/doc/src/ref_man.xml b/lib/jinterface/doc/src/ref_man.xml
index 43cf7accc8..62d6013db6 100644
--- a/lib/jinterface/doc/src/ref_man.xml
+++ b/lib/jinterface/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/appmon/doc/pdf/.gitignore b/lib/jinterface/ebin/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/appmon/doc/pdf/.gitignore
+++ b/lib/jinterface/ebin/.gitignore
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
index 9ba6a4a0ab..b8a973753a 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
@@ -20,7 +20,6 @@
package com.ericsson.otp.erlang;
import java.io.IOException;
-import java.io.InputStream;
import java.net.Socket;
import java.util.Random;
@@ -87,7 +86,7 @@ public abstract class AbstractConnection extends Thread {
protected boolean connected = false; // connection status
protected Socket socket; // communication channel
protected OtpPeer peer; // who are we connected to
- protected OtpLocalNode self; // this nodes id
+ protected OtpLocalNode localNode; // this nodes id
String name; // local name of this connection
protected boolean cookieOk = false; // already checked the cookie for this
@@ -137,7 +136,7 @@ public abstract class AbstractConnection extends Thread {
*/
protected AbstractConnection(final OtpLocalNode self, final Socket s)
throws IOException, OtpAuthException {
- this.self = self;
+ this.localNode = self;
peer = new OtpPeer();
socket = s;
@@ -181,7 +180,7 @@ public abstract class AbstractConnection extends Thread {
protected AbstractConnection(final OtpLocalNode self, final OtpPeer other)
throws IOException, OtpAuthException {
peer = other;
- this.self = self;
+ this.localNode = self;
socket = null;
int port;
@@ -234,6 +233,7 @@ public abstract class AbstractConnection extends Thread {
if (!connected) {
throw new IOException("Not connected");
}
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag + version
@@ -246,7 +246,7 @@ public abstract class AbstractConnection extends Thread {
header.write_long(regSendTag);
header.write_any(from);
if (sendCookie) {
- header.write_atom(self.cookie());
+ header.write_atom(localNode.cookie());
} else {
header.write_atom("");
}
@@ -266,7 +266,7 @@ public abstract class AbstractConnection extends Thread {
*
* @param dest
* the Erlang PID of the remote process.
- * @param msg
+ * @param payload
* the encoded message to send.
*
* @exception java.io.IOException
@@ -278,6 +278,7 @@ public abstract class AbstractConnection extends Thread {
if (!connected) {
throw new IOException("Not connected");
}
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag + version
@@ -289,7 +290,7 @@ public abstract class AbstractConnection extends Thread {
header.write_tuple_head(3);
header.write_long(sendTag);
if (sendCookie) {
- header.write_atom(self.cookie());
+ header.write_atom(localNode.cookie());
} else {
header.write_atom("");
}
@@ -312,6 +313,7 @@ public abstract class AbstractConnection extends Thread {
private void cookieError(final OtpLocalNode local,
final OtpErlangAtom cookie) throws OtpAuthException {
try {
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag + version
@@ -347,6 +349,7 @@ public abstract class AbstractConnection extends Thread {
msg[0] = new OtpErlangAtom("$gen_cast");
msg[1] = new OtpErlangTuple(msgbody);
+ @SuppressWarnings("resource")
final OtpOutputStream payload = new OtpOutputStream(
new OtpErlangTuple(msg));
@@ -384,6 +387,7 @@ public abstract class AbstractConnection extends Thread {
if (!connected) {
throw new IOException("Not connected");
}
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag
@@ -420,6 +424,7 @@ public abstract class AbstractConnection extends Thread {
if (!connected) {
throw new IOException("Not connected");
}
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag
@@ -468,6 +473,7 @@ public abstract class AbstractConnection extends Thread {
if (!connected) {
throw new IOException("Not connected");
}
+ @SuppressWarnings("resource")
final OtpOutputStream header = new OtpOutputStream(headerLen);
// preamble: 4 byte length + "passthrough" tag
@@ -488,6 +494,7 @@ public abstract class AbstractConnection extends Thread {
do_send(header);
}
+ @SuppressWarnings("resource")
@Override
public void run() {
if (!connected) {
@@ -506,7 +513,7 @@ public abstract class AbstractConnection extends Thread {
// don't return until we get a real message
// or a failure of some kind (e.g. EXIT)
// read length and read buffer must be atomic!
- tick_loop: do {
+ do {
// read 4 bytes - get length of incoming packet
// socket.getInputStream().read(lbuf);
readSock(socket, lbuf);
@@ -526,6 +533,7 @@ public abstract class AbstractConnection extends Thread {
final byte[] tmpbuf = new byte[len];
// i = socket.getInputStream().read(tmpbuf);
readSock(socket, tmpbuf);
+ ibuf.close();
ibuf = new OtpInputStream(tmpbuf, flags);
if (ibuf.read1() != passThrough) {
@@ -567,12 +575,12 @@ public abstract class AbstractConnection extends Thread {
}
cookie = (OtpErlangAtom) head.elementAt(1);
if (sendCookie) {
- if (!cookie.atomValue().equals(self.cookie())) {
- cookieError(self, cookie);
+ if (!cookie.atomValue().equals(localNode.cookie())) {
+ cookieError(localNode, cookie);
}
} else {
if (!cookie.atomValue().equals("")) {
- cookieError(self, cookie);
+ cookieError(localNode, cookie);
}
}
cookieOk = true;
@@ -610,12 +618,12 @@ public abstract class AbstractConnection extends Thread {
}
cookie = (OtpErlangAtom) head.elementAt(2);
if (sendCookie) {
- if (!cookie.atomValue().equals(self.cookie())) {
- cookieError(self, cookie);
+ if (!cookie.atomValue().equals(localNode.cookie())) {
+ cookieError(localNode, cookie);
}
} else {
if (!cookie.atomValue().equals("")) {
- cookieError(self, cookie);
+ cookieError(localNode, cookie);
}
}
cookieOk = true;
@@ -749,13 +757,14 @@ public abstract class AbstractConnection extends Thread {
final int oldLevel = traceLevel;
// pin the value
+ int theLevel = level;
if (level < 0) {
- level = 0;
+ theLevel = 0;
} else if (level > 4) {
- level = 4;
+ theLevel = 4;
}
- traceLevel = level;
+ traceLevel = theLevel;
return oldLevel;
}
@@ -908,18 +917,16 @@ public abstract class AbstractConnection extends Thread {
int got = 0;
final int len = b.length;
int i;
- InputStream is = null;
synchronized (this) {
if (s == null) {
throw new IOException("expected " + len
+ " bytes, socket was closed");
}
- is = s.getInputStream();
}
while (got < len) {
- i = is.read(b, got, len - got);
+ i = s.getInputStream().read(b, got, len - got);
if (i < 0) {
throw new IOException("expected " + len
@@ -943,9 +950,9 @@ public abstract class AbstractConnection extends Thread {
try {
sendStatus("ok");
final int our_challenge = genChallenge();
- sendChallenge(peer.distChoose, self.flags, our_challenge);
+ sendChallenge(peer.distChoose, localNode.flags, our_challenge);
final int her_challenge = recvChallengeReply(our_challenge);
- final byte[] our_digest = genDigest(her_challenge, self.cookie());
+ final byte[] our_digest = genDigest(her_challenge, localNode.cookie());
sendChallengeAck(our_digest);
connected = true;
cookieOk = true;
@@ -959,7 +966,9 @@ public abstract class AbstractConnection extends Thread {
} catch (final Exception e) {
final String nn = peer.node();
close();
- throw new IOException("Error accepting connection from " + nn);
+ IOException ioe = new IOException("Error accepting connection from " + nn);
+ ioe.initCause(e);
+ throw ioe;
}
if (traceLevel >= handshakeThreshold) {
System.out.println("<- MD5 ACCEPTED " + peer.host());
@@ -976,10 +985,10 @@ public abstract class AbstractConnection extends Thread {
System.out.println("-> MD5 CONNECT TO " + peer.host() + ":"
+ port);
}
- sendName(peer.distChoose, self.flags);
+ sendName(peer.distChoose, localNode.flags);
recvStatus();
final int her_challenge = recvChallenge();
- final byte[] our_digest = genDigest(her_challenge, self.cookie());
+ final byte[] our_digest = genDigest(her_challenge, localNode.cookie());
final int our_challenge = genChallenge();
sendChallengeReply(our_challenge, our_digest);
recvChallengeAck(our_challenge);
@@ -990,7 +999,9 @@ public abstract class AbstractConnection extends Thread {
throw ae;
} catch (final Exception e) {
close();
- throw new IOException("Cannot connect to peer node");
+ IOException ioe = new IOException("Cannot connect to peer node");
+ ioe.initCause(e);
+ throw ioe;
}
}
@@ -1050,33 +1061,35 @@ public abstract class AbstractConnection extends Thread {
return res;
}
- protected void sendName(final int dist, final int flags) throws IOException {
+ protected void sendName(final int dist, final int aflags) throws IOException {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
- final String str = self.node();
+ final String str = localNode.node();
obuf.write2BE(str.length() + 7); // 7 bytes + nodename
obuf.write1(AbstractNode.NTYPE_R6);
obuf.write2BE(dist);
- obuf.write4BE(flags);
+ obuf.write4BE(aflags);
obuf.write(str.getBytes());
obuf.writeTo(socket.getOutputStream());
if (traceLevel >= handshakeThreshold) {
- System.out.println("-> " + "HANDSHAKE sendName" + " flags=" + flags
- + " dist=" + dist + " local=" + self);
+ System.out.println("-> " + "HANDSHAKE sendName" + " flags=" + aflags
+ + " dist=" + dist + " local=" + localNode);
}
}
- protected void sendChallenge(final int dist, final int flags,
+ protected void sendChallenge(final int dist, final int aflags,
final int challenge) throws IOException {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
- final String str = self.node();
+ final String str = localNode.node();
obuf.write2BE(str.length() + 11); // 11 bytes + nodename
obuf.write1(AbstractNode.NTYPE_R6);
obuf.write2BE(dist);
- obuf.write4BE(flags);
+ obuf.write4BE(aflags);
obuf.write4BE(challenge);
obuf.write(str.getBytes());
@@ -1084,8 +1097,8 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("-> " + "HANDSHAKE sendChallenge" + " flags="
- + flags + " dist=" + dist + " challenge=" + challenge
- + " local=" + self);
+ + aflags + " dist=" + dist + " challenge=" + challenge
+ + " local=" + localNode);
}
}
@@ -1096,6 +1109,7 @@ public abstract class AbstractConnection extends Thread {
byte[] tmpbuf;
readSock(socket, lbuf);
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(lbuf, 0);
final int len = ibuf.read2BE();
tmpbuf = new byte[len];
@@ -1103,41 +1117,42 @@ public abstract class AbstractConnection extends Thread {
return tmpbuf;
}
- protected void recvName(final OtpPeer peer) throws IOException {
+ protected void recvName(final OtpPeer apeer) throws IOException {
String hisname = "";
try {
final byte[] tmpbuf = read2BytePackage();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0);
byte[] tmpname;
final int len = tmpbuf.length;
- peer.ntype = ibuf.read1();
- if (peer.ntype != AbstractNode.NTYPE_R6) {
+ apeer.ntype = ibuf.read1();
+ if (apeer.ntype != AbstractNode.NTYPE_R6) {
throw new IOException("Unknown remote node type");
}
- peer.distLow = peer.distHigh = ibuf.read2BE();
- if (peer.distLow < 5) {
+ apeer.distLow = apeer.distHigh = ibuf.read2BE();
+ if (apeer.distLow < 5) {
throw new IOException("Unknown remote node type");
}
- peer.flags = ibuf.read4BE();
+ apeer.flags = ibuf.read4BE();
tmpname = new byte[len - 7];
ibuf.readN(tmpname);
hisname = OtpErlangString.newString(tmpname);
// Set the old nodetype parameter to indicate hidden/normal status
// When the old handshake is removed, the ntype should also be.
- if ((peer.flags & AbstractNode.dFlagPublished) != 0) {
- peer.ntype = AbstractNode.NTYPE_R4_ERLANG;
+ if ((apeer.flags & AbstractNode.dFlagPublished) != 0) {
+ apeer.ntype = AbstractNode.NTYPE_R4_ERLANG;
} else {
- peer.ntype = AbstractNode.NTYPE_R4_HIDDEN;
+ apeer.ntype = AbstractNode.NTYPE_R4_HIDDEN;
}
- if ((peer.flags & AbstractNode.dFlagExtendedReferences) == 0) {
+ if ((apeer.flags & AbstractNode.dFlagExtendedReferences) == 0) {
throw new IOException(
"Handshake failed - peer cannot handle extended references");
}
- if ((peer.flags & AbstractNode.dFlagExtendedPidsPorts) == 0) {
+ if ((apeer.flags & AbstractNode.dFlagExtendedPidsPorts) == 0) {
throw new IOException(
"Handshake failed - peer cannot handle extended pids and ports");
}
@@ -1147,13 +1162,13 @@ public abstract class AbstractConnection extends Thread {
}
final int i = hisname.indexOf('@', 0);
- peer.node = hisname;
- peer.alive = hisname.substring(0, i);
- peer.host = hisname.substring(i + 1, hisname.length());
+ apeer.node = hisname;
+ apeer.alive = hisname.substring(0, i);
+ apeer.host = hisname.substring(i + 1, hisname.length());
if (traceLevel >= handshakeThreshold) {
- System.out.println("<- " + "HANDSHAKE" + " ntype=" + peer.ntype
- + " dist=" + peer.distHigh + " remote=" + peer);
+ System.out.println("<- " + "HANDSHAKE" + " ntype=" + apeer.ntype
+ + " dist=" + apeer.distHigh + " remote=" + apeer);
}
}
@@ -1163,6 +1178,7 @@ public abstract class AbstractConnection extends Thread {
try {
final byte[] buf = read2BytePackage();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(buf, 0);
peer.ntype = ibuf.read1();
if (peer.ntype != AbstractNode.NTYPE_R6) {
@@ -1195,7 +1211,7 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("<- " + "HANDSHAKE recvChallenge" + " from="
- + peer.node + " challenge=" + challenge + " local=" + self);
+ + peer.node + " challenge=" + challenge + " local=" + localNode);
}
return challenge;
@@ -1204,6 +1220,7 @@ public abstract class AbstractConnection extends Thread {
protected void sendChallengeReply(final int challenge, final byte[] digest)
throws IOException {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(21);
obuf.write1(ChallengeReply);
@@ -1214,7 +1231,7 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("-> " + "HANDSHAKE sendChallengeReply"
+ " challenge=" + challenge + " digest=" + hex(digest)
- + " local=" + self);
+ + " local=" + localNode);
}
}
@@ -1237,6 +1254,7 @@ public abstract class AbstractConnection extends Thread {
try {
final byte[] buf = read2BytePackage();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(buf, 0);
final int tag = ibuf.read1();
if (tag != ChallengeReply) {
@@ -1244,7 +1262,7 @@ public abstract class AbstractConnection extends Thread {
}
challenge = ibuf.read4BE();
ibuf.readN(her_digest);
- final byte[] our_digest = genDigest(our_challenge, self.cookie());
+ final byte[] our_digest = genDigest(our_challenge, localNode.cookie());
if (!digests_equals(her_digest, our_digest)) {
throw new OtpAuthException("Peer authentication error.");
}
@@ -1255,7 +1273,7 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("<- " + "HANDSHAKE recvChallengeReply"
+ " from=" + peer.node + " challenge=" + challenge
- + " digest=" + hex(her_digest) + " local=" + self);
+ + " digest=" + hex(her_digest) + " local=" + localNode);
}
return challenge;
@@ -1263,6 +1281,7 @@ public abstract class AbstractConnection extends Thread {
protected void sendChallengeAck(final byte[] digest) throws IOException {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(17);
obuf.write1(ChallengeAck);
@@ -1272,7 +1291,7 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("-> " + "HANDSHAKE sendChallengeAck"
- + " digest=" + hex(digest) + " local=" + self);
+ + " digest=" + hex(digest) + " local=" + localNode);
}
}
@@ -1282,13 +1301,14 @@ public abstract class AbstractConnection extends Thread {
final byte[] her_digest = new byte[16];
try {
final byte[] buf = read2BytePackage();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(buf, 0);
final int tag = ibuf.read1();
if (tag != ChallengeAck) {
throw new IOException("Handshake protocol error");
}
ibuf.readN(her_digest);
- final byte[] our_digest = genDigest(our_challenge, self.cookie());
+ final byte[] our_digest = genDigest(our_challenge, localNode.cookie());
if (!digests_equals(her_digest, our_digest)) {
throw new OtpAuthException("Peer authentication error.");
}
@@ -1301,12 +1321,13 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("<- " + "HANDSHAKE recvChallengeAck" + " from="
+ peer.node + " digest=" + hex(her_digest) + " local="
- + self);
+ + localNode);
}
}
protected void sendStatus(final String status) throws IOException {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(status.length() + 1);
obuf.write1(ChallengeStatus);
@@ -1316,7 +1337,7 @@ public abstract class AbstractConnection extends Thread {
if (traceLevel >= handshakeThreshold) {
System.out.println("-> " + "HANDSHAKE sendStatus" + " status="
- + status + " local=" + self);
+ + status + " local=" + localNode);
}
}
@@ -1324,6 +1345,7 @@ public abstract class AbstractConnection extends Thread {
try {
final byte[] buf = read2BytePackage();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(buf, 0);
final int tag = ibuf.read1();
if (tag != ChallengeStatus) {
@@ -1342,7 +1364,7 @@ public abstract class AbstractConnection extends Thread {
}
if (traceLevel >= handshakeThreshold) {
System.out.println("<- " + "HANDSHAKE recvStatus (ok)" + " local="
- + self);
+ + localNode);
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
index 968f284bff..3bb1bbbd18 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2000-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -92,6 +92,7 @@ public class AbstractNode {
static final int dFlagNewFloats = 0x800;
static final int dFlagUnicodeIo = 0x1000;
static final int dFlagUtf8Atoms = 0x10000;
+ static final int dFlagMapTag = 0x20000;
int ntype = NTYPE_R6;
int proto = 0; // tcp/ip
@@ -100,7 +101,7 @@ public class AbstractNode {
int creation = 0;
int flags = dFlagExtendedReferences | dFlagExtendedPidsPorts
| dFlagBitBinaries | dFlagNewFloats | dFlagFunTags
- | dflagNewFunTags | dFlagUtf8Atoms;
+ | dflagNewFunTags | dFlagUtf8Atoms | dFlagMapTag;
/* initialize hostname and default cookie */
static {
@@ -127,7 +128,12 @@ public class AbstractNode {
final File dotCookieFile = new File(dotCookieFilename);
br = new BufferedReader(new FileReader(dotCookieFile));
- defaultCookie = br.readLine().trim();
+ final String line = br.readLine();
+ if (line == null) {
+ defaultCookie = "";
+ } else {
+ defaultCookie = line.trim();
+ }
} catch (final IOException e) {
defaultCookie = "";
} finally {
@@ -259,8 +265,7 @@ public class AbstractNode {
final String drive = System.getenv("HOMEDRIVE");
final String path = System.getenv("HOMEPATH");
return (drive != null && path != null) ? drive + path : home;
- } else {
- return home;
}
+ return home;
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Link.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/Link.java
index 2b085761e3..c8b4fcebde 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Link.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Link.java
@@ -41,11 +41,12 @@ class Link {
return local.equals(pid) || remote.equals(pid);
}
- public boolean equals(final OtpErlangPid local, final OtpErlangPid remote) {
- return this.local.equals(local) && this.remote.equals(remote)
- || this.local.equals(remote) && this.remote.equals(local);
+ public boolean equals(final OtpErlangPid alocal, final OtpErlangPid aremote) {
+ return local.equals(alocal) && remote.equals(aremote)
+ || local.equals(aremote) && remote.equals(alocal);
}
+ @Override
public int hashCode() {
if (hashCodeValue == 0) {
OtpErlangObject.Hash hash = new OtpErlangObject.Hash(5);
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
index f476d4594d..ea3ab770ce 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
@@ -32,6 +32,18 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
include $(ERL_TOP)/lib/jinterface/vsn.mk
VSN=$(JINTERFACE_VSN)
+#
+
+EBINDIR=$(ERL_TOP)/lib/jinterface/ebin
+
+APP_FILE= jinterface.app
+APP_SRC= $(APP_FILE).src
+APP_TARGET= $(EBINDIR)/$(APP_FILE)
+
+APPUP_FILE= jinterface.appup
+APPUP_SRC= $(APPUP_FILE).src
+APPUP_TARGET= $(EBINDIR)/$(APPUP_FILE)
+
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
@@ -45,7 +57,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/jinterface-$(VSN)
# all java sourcefiles listed in common include file
include $(ERL_TOP)/lib/jinterface/java_src/$(JAVA_CLASS_SUBDIR)/java_files
-TARGET_FILES= $(JAVA_FILES:%=$(JAVA_DEST_ROOT)$(JAVA_CLASS_SUBDIR)%.class)
+TARGET_FILES= $(JAVA_FILES:%=$(JAVA_DEST_ROOT)$(JAVA_CLASS_SUBDIR)%.class) $(APP_TARGET) $(APPUP_TARGET)
JAVA_SRC= $(JAVA_FILES:%=%.java)
JARFILE= OtpErlang.jar
@@ -66,7 +78,7 @@ ifneq ($(V),0)
JARFLAGS=-cfv
endif
-JAVA_OPTIONS =
+JAVA_OPTIONS = -Xlint
ifeq ($(TESTROOT),)
RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)"
@@ -79,6 +91,11 @@ endif
# Make Rules
# ----------------------------------------------------
+$(APP_TARGET): $(APP_SRC) $(ERL_TOP)/lib/jinterface/vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(JINTERFACE_VSN);' $< > $@
+$(APPUP_TARGET): $(APPUP_SRC) $(ERL_TOP)/lib/jinterface/vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(JINTERFACE_VSN);' $< > $@
+
debug opt: make_dirs $(JAVA_DEST_ROOT)$(JARFILE)
make_dirs:
@@ -106,6 +123,9 @@ release_spec: opt
$(V_at)$(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
$(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/priv"
$(V_at)$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
+ $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(V_at)$(INSTALL_DATA) $(APP_TARGET) "$(RELSYSDIR)/ebin/$(APP_FILE)"
+ $(V_at)$(INSTALL_DATA) $(APPUP_TARGET) "$(RELSYSDIR)/ebin/$(APPUP_FILE)"
release_docs_spec:
@@ -113,4 +133,3 @@ release_docs_spec:
# ----------------------------------------------------
-
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
index 8e8bd473c8..9ad02506fd 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
@@ -358,6 +358,7 @@ public class OtpConnection extends AbstractConnection {
* if the connection is not active or a communication
* error occurs.
*/
+ @SuppressWarnings("resource")
public void send(final OtpErlangPid dest, final OtpErlangObject msg)
throws IOException {
// encode and send the message
@@ -376,6 +377,7 @@ public class OtpConnection extends AbstractConnection {
* if the connection is not active or a communication
* error occurs.
*/
+ @SuppressWarnings("resource")
public void send(final String dest, final OtpErlangObject msg)
throws IOException {
// encode and send the message
@@ -404,7 +406,7 @@ public class OtpConnection extends AbstractConnection {
*
* @param dest
* the Erlang PID of the remote process.
- * @param msg
+ * @param payload
* the encoded message to send.
*
* @exception java.io.IOException
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpCookedConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpCookedConnection.java
index 5abf6e33f7..43b0cad222 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpCookedConnection.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpCookedConnection.java
@@ -149,6 +149,7 @@ public class OtpCookedConnection extends AbstractConnection {
/*
* send to pid
*/
+ @SuppressWarnings("resource")
void send(final OtpErlangPid from, final OtpErlangPid dest,
final OtpErlangObject msg) throws IOException {
// encode and send the message
@@ -159,6 +160,7 @@ public class OtpCookedConnection extends AbstractConnection {
* send to remote name dest is recipient's registered name, the nodename is
* implied by the choice of connection.
*/
+ @SuppressWarnings("resource")
void send(final OtpErlangPid from, final String dest,
final OtpErlangObject msg) throws IOException {
// encode and send the message
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
index 1868dc7740..8a8ba785d9 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java
@@ -160,6 +160,7 @@ public class OtpEpmd {
try {
s = new Socket((String) null, EpmdPort.get());
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(node.alive().length() + 1);
obuf.write1(stopReq);
@@ -189,6 +190,7 @@ public class OtpEpmd {
Socket s = null;
try {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
s = new Socket(node.host(), EpmdPort.get());
@@ -219,6 +221,7 @@ public class OtpEpmd {
+ node.host() + " when looking up " + node.alive());
}
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0);
final int response = ibuf.read1();
@@ -279,6 +282,7 @@ public class OtpEpmd {
Socket s = null;
try {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
s = new Socket((String) null, EpmdPort.get());
@@ -310,13 +314,12 @@ public class OtpEpmd {
final int n = s.getInputStream().read(tmpbuf);
if (n < 0) {
- if (s != null) {
s.close();
- }
throw new IOException("Nameserver not responding on "
+ node.host() + " when publishing " + node.alive());
}
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0);
final int response = ibuf.read1();
@@ -341,9 +344,7 @@ public class OtpEpmd {
throw new IOException("Nameserver not responding on " + node.host()
+ " when publishing " + node.alive());
} catch (final OtpErlangDecodeException e) {
- if (s != null) {
s.close();
- }
if (traceLevel >= traceThreshold) {
System.out.println("<- (invalid response)");
}
@@ -351,9 +352,7 @@ public class OtpEpmd {
+ " when publishing " + node.alive());
}
- if (s != null) {
s.close();
- }
return null;
}
@@ -366,6 +365,7 @@ public class OtpEpmd {
Socket s = null;
try {
+ @SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
try {
s = new Socket(address, EpmdPort.get());
@@ -390,6 +390,7 @@ public class OtpEpmd {
out.write(buffer, 0, bytesRead);
}
final byte[] tmpbuf = out.toByteArray();
+ @SuppressWarnings("resource")
final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0);
ibuf.read4BE(); // read port int
// final int port = ibuf.read4BE();
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java
index 0371740b26..bff3e2c0e3 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java
@@ -18,17 +18,15 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang atoms. Atoms can be created from
* strings whose length is not more than {@link #maxAtomLength maxAtomLength}
* characters.
*/
-public class OtpErlangAtom extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangAtom extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = -3204386396807876641L;
+ private static final long serialVersionUID = -3204386396807876641L;
/** The maximun allowed length of an atom, in characters */
public static final int maxAtomLength = 0xff; // one byte length
@@ -119,9 +117,8 @@ public class OtpErlangAtom extends OtpErlangObject implements Serializable,
public String toString() {
if (atomNeedsQuoting(atom)) {
return "'" + escapeSpecialChars(atom) + "'";
- } else {
- return atom;
}
+ return atom;
}
/**
@@ -139,8 +136,8 @@ public class OtpErlangAtom extends OtpErlangObject implements Serializable,
return false;
}
- final OtpErlangAtom atom = (OtpErlangAtom) o;
- return this.atom.compareTo(atom.atom) == 0;
+ final OtpErlangAtom other = (OtpErlangAtom) o;
+ return this.atom.compareTo(other.atom) == 0;
}
@Override
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBinary.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBinary.java
index a9eaad540e..0891781f8d 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBinary.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBinary.java
@@ -18,16 +18,14 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang binaries. Anything that can be
* represented as a sequence of bytes can be made into an Erlang binary.
*/
-public class OtpErlangBinary extends OtpErlangBitstr implements Serializable,
- Cloneable {
+public class OtpErlangBinary extends OtpErlangBitstr {
// don't change this!
- static final long serialVersionUID = -3781009633593609217L;
+ private static final long serialVersionUID = -3781009633593609217L;
/**
* Create a binary from a byte array
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java
index 97897fe182..8cb4e0e685 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java
@@ -20,17 +20,15 @@ package com.ericsson.otp.erlang;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang bitstrs. An Erlang bitstr is an
* Erlang binary with a length not an integral number of bytes (8-bit). Anything
* can be represented as a sequence of bytes can be made into an Erlang bitstr.
*/
-public class OtpErlangBitstr extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangBitstr extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = -3781009633593609217L;
+ private static final long serialVersionUID = -3781009633593609217L;
protected byte[] bin;
protected int pad_bits;
@@ -63,18 +61,18 @@ public class OtpErlangBitstr extends OtpErlangObject implements Serializable,
check_bitstr(this.bin, this.pad_bits);
}
- private void check_bitstr(final byte[] bin, final int pad_bits) {
- if (pad_bits < 0 || 7 < pad_bits) {
+ private void check_bitstr(final byte[] abin, final int a_pad_bits) {
+ if (a_pad_bits < 0 || 7 < a_pad_bits) {
throw new java.lang.IllegalArgumentException(
"Padding must be in range 0..7");
}
- if (pad_bits != 0 && bin.length == 0) {
+ if (a_pad_bits != 0 && abin.length == 0) {
throw new java.lang.IllegalArgumentException(
"Padding on zero length bitstr");
}
- if (bin.length != 0) {
+ if (abin.length != 0) {
// Make sure padding is zero
- bin[bin.length - 1] &= ~((1 << pad_bits) - 1);
+ abin[abin.length - 1] &= ~((1 << a_pad_bits) - 1);
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBoolean.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBoolean.java
index b97b5b7d90..eecd2ea288 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBoolean.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBoolean.java
@@ -18,14 +18,12 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang booleans, which are special cases of
* atoms with values 'true' and 'false'.
*/
-public class OtpErlangBoolean extends OtpErlangAtom implements Serializable,
- Cloneable {
+public class OtpErlangBoolean extends OtpErlangAtom {
// don't change this!
static final long serialVersionUID = 1087178844844988393L;
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangByte.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangByte.java
index 2d598c119e..eb6f3d8aba 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangByte.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangByte.java
@@ -18,15 +18,13 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangByte extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangByte extends OtpErlangLong {
// don't change this!
- static final long serialVersionUID = 5778019796466613446L;
+ private static final long serialVersionUID = 5778019796466613446L;
/**
* Create an Erlang integer from the given value.
@@ -56,6 +54,6 @@ public class OtpErlangByte extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final byte i = byteValue();
+ byteValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangChar.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangChar.java
index b442bbcec1..e7c6dd8ad4 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangChar.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangChar.java
@@ -18,15 +18,13 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangChar extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangChar extends OtpErlangLong {
// don't change this!
- static final long serialVersionUID = 3225337815669398204L;
+ private static final long serialVersionUID = 3225337815669398204L;
/**
* Create an Erlang integer from the given value.
@@ -56,6 +54,6 @@ public class OtpErlangChar extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final char i = charValue();
+ charValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDecodeException.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDecodeException.java
index db55deaedf..6986e26908 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDecodeException.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDecodeException.java
@@ -26,6 +26,8 @@ package com.ericsson.otp.erlang;
* @see OtpInputStream
*/
public class OtpErlangDecodeException extends OtpErlangException {
+ private static final long serialVersionUID = 1L;
+
/**
* Provides a detailed message.
*/
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDouble.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDouble.java
index 793940e858..e92ce11431 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDouble.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangDouble.java
@@ -18,7 +18,6 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang floats and doubles. Erlang defines
@@ -26,10 +25,9 @@ import java.io.Serializable;
* {@link OtpErlangFloat} are used to provide representations corresponding to
* the Java types Double and Float.
*/
-public class OtpErlangDouble extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangDouble extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = 132947104811974021L;
+ private static final long serialVersionUID = 132947104811974021L;
private final double d;
@@ -120,8 +118,8 @@ public class OtpErlangDouble extends OtpErlangObject implements Serializable,
return false;
}
- final OtpErlangDouble d = (OtpErlangDouble) o;
- return this.d == d.d;
+ final OtpErlangDouble other = (OtpErlangDouble) o;
+ return this.d == other.d;
}
@Override
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFloat.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFloat.java
index 8662b74c53..7d48f848f0 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFloat.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFloat.java
@@ -18,15 +18,13 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang floats and doubles.
*/
-public class OtpErlangFloat extends OtpErlangDouble implements Serializable,
- Cloneable {
+public class OtpErlangFloat extends OtpErlangDouble {
// don't change this!
- static final long serialVersionUID = -2231546377289456934L;
+ private static final long serialVersionUID = -2231546377289456934L;
/**
* Create an Erlang float from the given float value.
@@ -53,6 +51,6 @@ public class OtpErlangFloat extends OtpErlangDouble implements Serializable,
throws OtpErlangDecodeException, OtpErlangRangeException {
super(buf);
- final float f = floatValue();
+ floatValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java
index fc104e9564..05fa0cbb23 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java
@@ -18,10 +18,9 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
import java.util.Arrays;
-public class OtpErlangFun extends OtpErlangObject implements Serializable {
+public class OtpErlangFun extends OtpErlangObject {
// don't change this!
private static final long serialVersionUID = -3423031125356706472L;
@@ -94,7 +93,7 @@ public class OtpErlangFun extends OtpErlangObject implements Serializable {
return false;
}
} else {
- if (!md5.equals(f.md5)) {
+ if (!Arrays.equals(md5, f.md5)) {
return false;
}
}
@@ -104,7 +103,7 @@ public class OtpErlangFun extends OtpErlangObject implements Serializable {
if (freeVars == null) {
return f.freeVars == null;
}
- return freeVars.equals(f.freeVars);
+ return Arrays.equals(freeVars, f.freeVars);
}
@Override
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangInt.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangInt.java
index d947421459..741fc29dd0 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangInt.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangInt.java
@@ -18,15 +18,13 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangInt extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangInt extends OtpErlangLong {
// don't change this!
- static final long serialVersionUID = 1229430977614805556L;
+ private static final long serialVersionUID = 1229430977614805556L;
/**
* Create an Erlang integer from the given value.
@@ -56,6 +54,6 @@ public class OtpErlangInt extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final int j = intValue();
+ intValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
index 3456fd7412..9f7c5f5499 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
@@ -18,7 +18,6 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -30,9 +29,9 @@ import java.util.NoSuchElementException;
* The arity of the list is the number of elements it contains.
*/
public class OtpErlangList extends OtpErlangObject implements
- Iterable<OtpErlangObject>, Serializable, Cloneable {
+ Iterable<OtpErlangObject> {
// don't change this!
- static final long serialVersionUID = 5999112769036676548L;
+ private static final long serialVersionUID = 5999112769036676548L;
private static final OtpErlangObject[] NO_ELEMENTS = new OtpErlangObject[0];
@@ -187,12 +186,11 @@ public class OtpErlangList extends OtpErlangObject implements
public OtpErlangObject[] elements() {
if (arity() == 0) {
return NO_ELEMENTS;
- } else {
+ }
final OtpErlangObject[] res = new OtpErlangObject[arity()];
System.arraycopy(elems, 0, res, 0, res.length);
return res;
}
- }
/**
* Get the string representation of the list.
@@ -326,7 +324,7 @@ public class OtpErlangList extends OtpErlangObject implements
try {
return new OtpErlangList(elements(), getLastTail());
} catch (final OtpErlangException e) {
- return null;
+ throw new AssertionError(this);
}
}
@@ -361,9 +359,8 @@ public class OtpErlangList extends OtpErlangObject implements
if (arity >= n) {
if (arity == n && lastTail != null) {
return lastTail;
- } else {
- return new SubList(this, n);
}
+ return new SubList(this, n);
}
return null;
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
index 7e3e2a7296..c6021a6ae1 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
@@ -18,7 +18,6 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
import java.math.BigInteger;
/**
@@ -30,10 +29,9 @@ import java.math.BigInteger;
* {@link OtpErlangUInt} and {@link OtpErlangUShort} are provided for Corba
* compatibility. See the documentation for IC for more information.
*/
-public class OtpErlangLong extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangLong extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = 1610466859236755096L;
+ private static final long serialVersionUID = 1610466859236755096L;
private long val;
private BigInteger bigVal = null;
@@ -51,8 +49,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
/**
* Create an Erlang integer from the given value.
*
- * @param val
- * the long value to use.
+ * @param v
+ * the big integer value to use.
*/
public OtpErlangLong(final BigInteger v) {
if (v == null) {
@@ -94,9 +92,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
public BigInteger bigIntegerValue() {
if (bigVal != null) {
return bigVal;
- } else {
- return BigInteger.valueOf(val);
}
+ return BigInteger.valueOf(val);
}
/**
@@ -109,9 +106,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
public long longValue() {
if (bigVal != null) {
return bigVal.longValue();
- } else {
- return val;
}
+ return val;
}
/**
@@ -159,7 +155,7 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
}
if (val == 0 || val == -1) {
return 0;
- } else {
+ }
// Binary search for bit length
int i = 32; // mask length
long m = (1L << i) - 1; // AND mask with ones in little end
@@ -193,7 +189,6 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
}
return i;
}
- }
/**
* Return the signum function of this object.
@@ -203,9 +198,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
public int signum() {
if (bigVal != null) {
return bigVal.signum();
- } else {
- return val > 0 ? 1 : val < 0 ? -1 : 0;
}
+ return val > 0 ? 1 : val < 0 ? -1 : 0;
}
/**
@@ -342,9 +336,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
public String toString() {
if (bigVal != null) {
return "" + bigVal;
- } else {
- return "" + val;
}
+ return "" + val;
}
/**
@@ -392,8 +385,7 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
protected int doHashCode() {
if (bigVal != null) {
return bigVal.hashCode();
- } else {
- return BigInteger.valueOf(val).hashCode();
}
+ return BigInteger.valueOf(val).hashCode();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java
new file mode 100644
index 0000000000..7f1a64b87d
--- /dev/null
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java
@@ -0,0 +1,295 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+package com.ericsson.otp.erlang;
+
+
+/**
+ * Provides a Java representation of Erlang maps. Maps are created from one or
+ * more arbitrary Erlang terms.
+ *
+ * <p>
+ * The arity of the map is the number of elements it contains. The keys and
+ * values can be retrieved as arrays and the value for a key can be queried.
+ *
+ */
+public class OtpErlangMap extends OtpErlangObject {
+ // don't change this!
+ private static final long serialVersionUID = -6410770117696198497L;
+
+ private static final OtpErlangObject[] NO_ELEMENTS = new OtpErlangObject[0];
+
+ private OtpErlangObject[] keys = NO_ELEMENTS;
+ private OtpErlangObject[] values = NO_ELEMENTS;
+
+ /**
+ * Create a map from an array of keys and an array of values.
+ *
+ * @param keys
+ * the array of terms to create the map keys from.
+ * @param values
+ * the array of terms to create the map values from.
+ *
+ * @exception java.lang.IllegalArgumentException
+ * if any array is empty (null) or contains null elements.
+ */
+ public OtpErlangMap(final OtpErlangObject[] keys,
+ final OtpErlangObject[] values) {
+ this(keys, 0, keys.length, values, 0, values.length);
+ }
+
+ /**
+ * Create a map from an array of terms.
+ *
+ * @param keys
+ * the array of terms to create the map from.
+ * @param kstart
+ * the offset of the first key to insert.
+ * @param kcount
+ * the number of keys to insert.
+ * @param values
+ * the array of values to create the map from.
+ * @param vstart
+ * the offset of the first value to insert.
+ * @param vcount
+ * the number of values to insert.
+ *
+ * @exception java.lang.IllegalArgumentException
+ * if any array is empty (null) or contains null elements.
+ * @exception java.lang.IllegalArgumentException
+ * if kcount and vcount differ.
+ */
+ public OtpErlangMap(final OtpErlangObject[] keys, final int kstart,
+ final int kcount, final OtpErlangObject[] values, final int vstart,
+ final int vcount) {
+ if (keys == null || values == null) {
+ throw new java.lang.IllegalArgumentException(
+ "Map content can't be null");
+ } else if (kcount != vcount) {
+ throw new java.lang.IllegalArgumentException(
+ "Map keys and values must have same arity");
+ } else if (vcount < 1) {
+ this.keys = NO_ELEMENTS;
+ this.values = NO_ELEMENTS;
+ } else {
+ this.keys = new OtpErlangObject[vcount];
+ for (int i = 0; i < vcount; i++) {
+ if (keys[kstart + i] != null) {
+ this.keys[i] = keys[kstart + i];
+ } else {
+ throw new java.lang.IllegalArgumentException(
+ "Map key cannot be null (element" + (kstart + i)
+ + ")");
+ }
+ }
+ this.values = new OtpErlangObject[vcount];
+ for (int i = 0; i < vcount; i++) {
+ if (values[vstart + i] != null) {
+ this.values[i] = values[vstart + i];
+ } else {
+ throw new java.lang.IllegalArgumentException(
+ "Map value cannot be null (element" + (vstart + i)
+ + ")");
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a map from a stream containing a map encoded in Erlang external
+ * format.
+ *
+ * @param buf
+ * the stream containing the encoded map.
+ *
+ * @exception OtpErlangDecodeException
+ * if the buffer does not contain a valid external
+ * representation of an Erlang map.
+ */
+ public OtpErlangMap(final OtpInputStream buf)
+ throws OtpErlangDecodeException {
+ final int arity = buf.read_map_head();
+
+ if (arity > 0) {
+ keys = new OtpErlangObject[arity];
+ values = new OtpErlangObject[arity];
+
+ for (int i = 0; i < arity; i++) {
+ keys[i] = buf.read_any();
+ values[i] = buf.read_any();
+ }
+ } else {
+ keys = NO_ELEMENTS;
+ values = NO_ELEMENTS;
+ }
+ }
+
+ /**
+ * Get the arity of the map.
+ *
+ * @return the number of elements contained in the map.
+ */
+ public int arity() {
+ return keys.length;
+ }
+
+ /**
+ * Get the specified value from the map.
+ *
+ * @param key
+ * the key of the requested value.
+ *
+ * @return the requested value, of null if key is not a valid key.
+ */
+ public OtpErlangObject get(final OtpErlangObject key) {
+ if (key == null) {
+ return null;
+ }
+ for (int i = 0; i < keys.length; i++) {
+ if (key.equals(keys[i])) {
+ return values[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get all the keys from the map as an array.
+ *
+ * @return an array containing all of the map's keys.
+ */
+ public OtpErlangObject[] keys() {
+ final OtpErlangObject[] res = new OtpErlangObject[arity()];
+ System.arraycopy(keys, 0, res, 0, res.length);
+ return res;
+ }
+
+ /**
+ * Get all the values from the map as an array.
+ *
+ * @return an array containing all of the map's values.
+ */
+ public OtpErlangObject[] values() {
+ final OtpErlangObject[] res = new OtpErlangObject[arity()];
+ System.arraycopy(values, 0, res, 0, res.length);
+ return res;
+ }
+
+ /**
+ * Get the string representation of the map.
+ *
+ * @return the string representation of the map.
+ */
+ @Override
+ public String toString() {
+ int i;
+ final StringBuffer s = new StringBuffer();
+ final int arity = values.length;
+
+ s.append("#{");
+
+ for (i = 0; i < arity; i++) {
+ if (i > 0) {
+ s.append(",");
+ }
+ s.append(keys[i].toString());
+ s.append(" => ");
+ s.append(values[i].toString());
+ }
+
+ s.append("}");
+
+ return s.toString();
+ }
+
+ /**
+ * Convert this map to the equivalent Erlang external representation.
+ *
+ * @param buf
+ * an output stream to which the encoded map should be written.
+ */
+ @Override
+ public void encode(final OtpOutputStream buf) {
+ final int arity = values.length;
+
+ buf.write_map_head(arity);
+
+ for (int i = 0; i < arity; i++) {
+ buf.write_any(keys[i]);
+ buf.write_any(values[i]);
+ }
+ }
+
+ /**
+ * Determine if two maps are equal. Maps are equal if they have the same
+ * arity and all of the elements are equal.
+ *
+ * @param o
+ * the map to compare to.
+ *
+ * @return true if the maps have the same arity and all the elements are
+ * equal.
+ */
+ @Override
+ public boolean equals(final Object o) {
+ if (!(o instanceof OtpErlangMap)) {
+ return false;
+ }
+
+ final OtpErlangMap t = (OtpErlangMap) o;
+ final int a = arity();
+
+ if (a != t.arity()) {
+ return false;
+ }
+
+ for (int i = 0; i < a; i++) {
+ if (!keys[i].equals(t.keys[i])) {
+ return false; // early exit
+ }
+ }
+ for (int i = 0; i < a; i++) {
+ if (!values[i].equals(t.values[i])) {
+ return false; // early exit
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ protected int doHashCode() {
+ final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(9);
+ final int a = arity();
+ hash.combine(a);
+ for (int i = 0; i < a; i++) {
+ hash.combine(keys[i].hashCode());
+ }
+ for (int i = 0; i < a; i++) {
+ hash.combine(values[i].hashCode());
+ }
+ return hash.valueOf();
+ }
+
+ @Override
+ public Object clone() {
+ final OtpErlangMap newMap = (OtpErlangMap) super.clone();
+ newMap.values = values.clone();
+ return newMap;
+ }
+}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangObject.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangObject.java
index 81220c5685..5215e5887b 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangObject.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangObject.java
@@ -171,14 +171,14 @@ public abstract class OtpErlangObject implements Serializable, Cloneable {
for (j = 0, k = 0;
j + 4 < b.length;
j += 4, k += 1, k %= 3) {
- abc[k] += ((int)b[j+0] & 0xFF) + ((int)b[j+1]<<8 & 0xFF00)
- + ((int)b[j+2]<<16 & 0xFF0000) + ((int)b[j+3]<<24);
+ abc[k] += (b[j+0] & 0xFF) + (b[j+1]<<8 & 0xFF00)
+ + (b[j+2]<<16 & 0xFF0000) + (b[j+3]<<24);
mix();
}
for (int n = 0, m = 0xFF;
j < b.length;
j++, n += 8, m <<= 8) {
- abc[k] += (int)b[j]<<n & m;
+ abc[k] += b[j]<<n & m;
}
mix();
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
index fe81ce302d..4c9f5c78a3 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
@@ -18,16 +18,14 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang PIDs. PIDs represent Erlang
* processes and consist of a nodename and a number of integers.
*/
-public class OtpErlangPid extends OtpErlangObject implements Serializable,
- Cloneable, Comparable<Object> {
+public class OtpErlangPid extends OtpErlangObject implements Comparable<Object> {
// don't change this!
- static final long serialVersionUID = 1664394142301803659L;
+ private static final long serialVersionUID = 1664394142301803659L;
private final String node;
private final int id;
@@ -162,7 +160,7 @@ public class OtpErlangPid extends OtpErlangObject implements Serializable,
* Determine if two PIDs are equal. PIDs are equal if their components are
* equal.
*
- * @param port
+ * @param o
* the other PID to compare to.
*
* @return true if the PIDs are equal, false otherwise.
@@ -197,14 +195,11 @@ public class OtpErlangPid extends OtpErlangObject implements Serializable,
if (serial == pid.serial) {
if (id == pid.id) {
return node.compareTo(pid.node);
- } else {
+ }
return id - pid.id;
}
- } else {
return serial - pid.serial;
}
- } else {
return creation - pid.creation;
}
}
-}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPort.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPort.java
index 2a0eab0a9c..8557e17325 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPort.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPort.java
@@ -18,15 +18,13 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang ports.
*/
-public class OtpErlangPort extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangPort extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = 4037115468007644704L;
+ private static final long serialVersionUID = 4037115468007644704L;
private final String node;
private final int id;
@@ -40,6 +38,7 @@ public class OtpErlangPort extends OtpErlangObject implements Serializable,
*
* @deprecated use OtpLocalNode:createPort() instead
*/
+ @SuppressWarnings("unused")
private OtpErlangPort(final OtpSelf self) {
final OtpErlangPort p = self.createPort();
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java
index 8056439962..13a83333fa 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java
@@ -18,17 +18,15 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang refs. There are two styles of Erlang
* refs, old style (one id value) and new style (array of id values). This class
* manages both types.
*/
-public class OtpErlangRef extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangRef extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = -7022666480768586521L;
+ private static final long serialVersionUID = -7022666480768586521L;
private final String node;
private final int creation;
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangShort.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangShort.java
index cd232570dd..6ef56defbd 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangShort.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangShort.java
@@ -18,13 +18,11 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangShort extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangShort extends OtpErlangLong {
// don't change this!
static final long serialVersionUID = 7162345156603088099L;
@@ -57,7 +55,7 @@ public class OtpErlangShort extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final short j = shortValue();
+ shortValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
index 6766b52ce5..1bccfcc567 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
@@ -18,17 +18,14 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
-import java.lang.Character;
import java.io.UnsupportedEncodingException;
/**
* Provides a Java representation of Erlang strings.
*/
-public class OtpErlangString extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangString extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = -7053595217604929233L;
+ private static final long serialVersionUID = -7053595217604929233L;
private final String str;
@@ -41,8 +38,6 @@ public class OtpErlangString extends OtpErlangObject implements Serializable,
/**
* Create an Erlang string from a list of integers.
- *
- * @return an Erlang string with Unicode code units.
*
* @throws OtpErlangException
* for non-proper and non-integer lists.
@@ -140,6 +135,7 @@ public class OtpErlangString extends OtpErlangObject implements Serializable,
return false;
}
+ @Override
protected int doHashCode() {
return str.hashCode();
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java
index bffce7f14d..dffaa530cd 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java
@@ -18,7 +18,6 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang tuples. Tuples are created from one
@@ -29,10 +28,9 @@ import java.io.Serializable;
* indexed from 0 to (arity-1) and can be retrieved individually by using the
* appropriate index.
*/
-public class OtpErlangTuple extends OtpErlangObject implements Serializable,
- Cloneable {
+public class OtpErlangTuple extends OtpErlangObject {
// don't change this!
- static final long serialVersionUID = 9163498658004915935L;
+ private static final long serialVersionUID = 9163498658004915935L;
private static final OtpErlangObject[] NO_ELEMENTS = new OtpErlangObject[0];
@@ -51,9 +49,8 @@ public class OtpErlangTuple extends OtpErlangObject implements Serializable,
if (elem == null) {
throw new java.lang.IllegalArgumentException(
"Tuple element cannot be null");
- } else {
- elems = new OtpErlangObject[] { elem };
}
+ elems = new OtpErlangObject[] { elem };
}
/**
@@ -242,6 +239,7 @@ public class OtpErlangTuple extends OtpErlangObject implements Serializable,
return true;
}
+ @Override
protected int doHashCode() {
OtpErlangObject.Hash hash = new OtpErlangObject.Hash(9);
final int a = arity();
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUInt.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUInt.java
index f01354d821..a02996e437 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUInt.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUInt.java
@@ -18,13 +18,11 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangUInt extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangUInt extends OtpErlangLong {
// don't change this!
static final long serialVersionUID = -1450956122937471885L;
@@ -40,7 +38,7 @@ public class OtpErlangUInt extends OtpErlangLong implements Serializable,
public OtpErlangUInt(final int i) throws OtpErlangRangeException {
super(i);
- final int j = uIntValue();
+ uIntValue();
}
/**
@@ -62,6 +60,6 @@ public class OtpErlangUInt extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final int j = uIntValue();
+ uIntValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUShort.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUShort.java
index 6b6bc7a56b..e9d251f815 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUShort.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangUShort.java
@@ -18,13 +18,11 @@
*/
package com.ericsson.otp.erlang;
-import java.io.Serializable;
/**
* Provides a Java representation of Erlang integral types.
*/
-public class OtpErlangUShort extends OtpErlangLong implements Serializable,
- Cloneable {
+public class OtpErlangUShort extends OtpErlangLong {
// don't change this!
static final long serialVersionUID = 300370950578307246L;
@@ -40,7 +38,7 @@ public class OtpErlangUShort extends OtpErlangLong implements Serializable,
public OtpErlangUShort(final short s) throws OtpErlangRangeException {
super(s);
- final short j = uShortValue();
+ uShortValue();
}
/**
@@ -62,6 +60,6 @@ public class OtpErlangUShort extends OtpErlangLong implements Serializable,
throws OtpErlangRangeException, OtpErlangDecodeException {
super(buf);
- final short j = uShortValue();
+ uShortValue();
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpException.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpException.java
index 33d25b6021..874c7da104 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpException.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpException.java
@@ -22,6 +22,8 @@ package com.ericsson.otp.erlang;
* Base class for the other OTP exception classes.
*/
public abstract class OtpException extends Exception {
+ private static final long serialVersionUID = 1L;
+
/**
* Provides no message.
*/
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
index 45a82d6c94..fa0fe18e95 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
@@ -85,6 +85,9 @@ public class OtpExternal {
/** The tag used for new style references */
public static final int newRefTag = 114;
+ /** The tag used for maps */
+ public static final int mapTag = 116;
+
/** The tag used for old Funs */
public static final int funTag = 117;
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
index 9dc1728346..bab0629382 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
@@ -21,6 +21,7 @@ package com.ericsson.otp.erlang;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
/**
* Provides a stream for decoding Erlang terms from external format.
@@ -84,16 +85,17 @@ public class OtpInputStream extends ByteArrayInputStream {
*
* @return the previous position in the stream.
*/
- public int setPos(int pos) {
+ public int setPos(final int pos) {
final int oldpos = super.pos;
+ int apos = pos;
if (pos > super.count) {
- pos = super.count;
+ apos = super.count;
} else if (pos < 0) {
- pos = 0;
+ apos = 0;
}
- super.pos = pos;
+ super.pos = apos;
return oldpos;
}
@@ -107,8 +109,8 @@ public class OtpInputStream extends ByteArrayInputStream {
* @exception OtpErlangDecodeException
* if the next byte cannot be read.
*/
- public int readN(final byte[] buf) throws OtpErlangDecodeException {
- return this.readN(buf, 0, buf.length);
+ public int readN(final byte[] abuf) throws OtpErlangDecodeException {
+ return this.readN(abuf, 0, abuf.length);
}
/**
@@ -120,12 +122,12 @@ public class OtpInputStream extends ByteArrayInputStream {
* @exception OtpErlangDecodeException
* if the next byte cannot be read.
*/
- public int readN(final byte[] buf, final int off, final int len)
+ public int readN(final byte[] abuf, final int off, final int len)
throws OtpErlangDecodeException {
if (len == 0 && available() == 0) {
return 0;
}
- final int i = super.read(buf, off, len);
+ final int i = super.read(abuf, off, len);
if (i < 0) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
@@ -213,7 +215,6 @@ public class OtpInputStream extends ByteArrayInputStream {
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
return (b[0] << 8 & 0xff00) + (b[1] & 0xff);
}
@@ -232,7 +233,6 @@ public class OtpInputStream extends ByteArrayInputStream {
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
return (b[0] << 24 & 0xff000000) + (b[1] << 16 & 0xff0000)
+ (b[2] << 8 & 0xff00) + (b[3] & 0xff);
}
@@ -252,7 +252,6 @@ public class OtpInputStream extends ByteArrayInputStream {
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
return (b[1] << 8 & 0xff00) + (b[0] & 0xff);
}
@@ -271,7 +270,6 @@ public class OtpInputStream extends ByteArrayInputStream {
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
return (b[3] << 24 & 0xff000000) + (b[2] << 16 & 0xff0000)
+ (b[1] << 8 & 0xff00) + (b[0] & 0xff);
}
@@ -287,17 +285,17 @@ public class OtpInputStream extends ByteArrayInputStream {
* @exception OtpErlangDecodeException
* if the next byte cannot be read.
*/
- public long readLE(int n) throws OtpErlangDecodeException {
+ public long readLE(final int n) throws OtpErlangDecodeException {
final byte[] b = new byte[n];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
long v = 0;
- while (n-- > 0) {
- v = v << 8 | (long) b[n] & 0xff;
+ int i = n;
+ while (i-- > 0) {
+ v = v << 8 | (long) b[i] & 0xff;
}
return v;
}
@@ -320,7 +318,6 @@ public class OtpInputStream extends ByteArrayInputStream {
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- ;
long v = 0;
for (int i = 0; i < n; i++) {
v = v << 8 | (long) b[i] & 0xff;
@@ -349,6 +346,7 @@ public class OtpInputStream extends ByteArrayInputStream {
* @exception OtpErlangDecodeException
* if the next term in the stream is not an atom.
*/
+ @SuppressWarnings("fallthrough")
public String read_atom() throws OtpErlangDecodeException {
int tag;
int len = -1;
@@ -381,7 +379,7 @@ public class OtpInputStream extends ByteArrayInputStream {
case OtpExternal.smallAtomUtf8Tag:
len = read1();
- /* fall through */
+ // fall-through
case OtpExternal.atomUtf8Tag:
if (len < 0) {
len = read2BE();
@@ -819,7 +817,7 @@ public class OtpInputStream extends ByteArrayInputStream {
if (unsigned) {
if (c < 0) {
throw new OtpErlangDecodeException("Value not unsigned: "
- + b);
+ + Arrays.toString(b));
}
while (b[i] == 0) {
i++; // Skip leading zero sign bytes
@@ -844,7 +842,7 @@ public class OtpInputStream extends ByteArrayInputStream {
if (b.length - i > 8) {
// More than 64 bits of value
throw new OtpErlangDecodeException(
- "Value does not fit in long: " + b);
+ "Value does not fit in long: " + Arrays.toString(b));
}
// Convert the necessary bytes
for (v = c < 0 ? -1 : 0; i < b.length; i++) {
@@ -1054,7 +1052,7 @@ public class OtpInputStream extends ByteArrayInputStream {
}
return new OtpErlangFun(pid, module, index, uniq, freeVars);
} else if (tag == OtpExternal.newFunTag) {
- final int n = read4BE();
+ read4BE();
final int arity = read1();
final byte[] md5 = new byte[16];
readN(md5);
@@ -1148,13 +1146,13 @@ public class OtpInputStream extends ByteArrayInputStream {
}
final int size = read4BE();
- final byte[] buf = new byte[size];
+ final byte[] abuf = new byte[size];
final java.util.zip.InflaterInputStream is =
new java.util.zip.InflaterInputStream(this, new java.util.zip.Inflater(), size);
int curPos = 0;
try {
int curRead;
- while(curPos < size && (curRead = is.read(buf, curPos, size - curPos)) != -1) {
+ while(curPos < size && (curRead = is.read(abuf, curPos, size - curPos)) != -1) {
curPos += curRead;
}
if (curPos != size) {
@@ -1165,7 +1163,8 @@ public class OtpInputStream extends ByteArrayInputStream {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
- final OtpInputStream ois = new OtpInputStream(buf, flags);
+ @SuppressWarnings("resource")
+ final OtpInputStream ois = new OtpInputStream(abuf, flags);
return ois.read_any();
}
@@ -1202,6 +1201,9 @@ public class OtpInputStream extends ByteArrayInputStream {
case OtpExternal.newRefTag:
return new OtpErlangRef(this);
+ case OtpExternal.mapTag:
+ return new OtpErlangMap(this);
+
case OtpExternal.portTag:
return new OtpErlangPort(this);
@@ -1244,4 +1246,21 @@ public class OtpInputStream extends ByteArrayInputStream {
throw new OtpErlangDecodeException("Uknown data type: " + tag);
}
}
+
+ public int read_map_head() throws OtpErlangDecodeException {
+ int arity = 0;
+ final int tag = read1skip_version();
+
+ // decode the map header and get arity
+ switch (tag) {
+ case OtpExternal.mapTag:
+ arity = read4BE();
+ break;
+
+ default:
+ throw new OtpErlangDecodeException("Not valid map tag: " + tag);
+ }
+
+ return arity;
+ }
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMD5.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMD5.java
index 903a446258..a5a4d86602 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMD5.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMD5.java
@@ -101,8 +101,11 @@ class OtpMD5 {
private void to_buffer(int to_start, final int[] from, int from_start,
int num) {
- while (num-- > 0) {
- buffer[to_start++] = from[from_start++];
+ int ix = num;
+ int to_ix = to_start;
+ int from_ix = from_start;
+ while (ix-- > 0) {
+ buffer[to_ix++] = from[from_ix++];
}
}
@@ -121,7 +124,7 @@ class OtpMD5 {
count[1] = plus(count[1], shr(inlen, 29));
- /* dumpstate(); */
+ // dumpstate();
if (inlen >= partlen) {
to_buffer(index, bytes, 0, (int) partlen);
@@ -144,6 +147,7 @@ class OtpMD5 {
}
+ @SuppressWarnings("unused")
private void dumpstate() {
System.out.println("state = {" + state[0] + ", " + state[1] + ", "
+ state[2] + ", " + state[3] + "}");
@@ -185,30 +189,30 @@ class OtpMD5 {
private long FF(long a, final long b, final long c, final long d,
final long x, final long s, final long ac) {
- a = plus(a, plus(plus(F(b, c, d), x), ac));
- a = ROTATE_LEFT(a, s);
- return plus(a, b);
+ long tmp = plus(a, plus(plus(F(b, c, d), x), ac));
+ tmp = ROTATE_LEFT(tmp, s);
+ return plus(tmp, b);
}
private long GG(long a, final long b, final long c, final long d,
final long x, final long s, final long ac) {
- a = plus(a, plus(plus(G(b, c, d), x), ac));
- a = ROTATE_LEFT(a, s);
- return plus(a, b);
+ long tmp = plus(a, plus(plus(G(b, c, d), x), ac));
+ tmp = ROTATE_LEFT(tmp, s);
+ return plus(tmp, b);
}
private long HH(long a, final long b, final long c, final long d,
final long x, final long s, final long ac) {
- a = plus(a, plus(plus(H(b, c, d), x), ac));
- a = ROTATE_LEFT(a, s);
- return plus(a, b);
+ long tmp = plus(a, plus(plus(H(b, c, d), x), ac));
+ tmp = ROTATE_LEFT(tmp, s);
+ return plus(tmp, b);
}
private long II(long a, final long b, final long c, final long d,
final long x, final long s, final long ac) {
- a = plus(a, plus(plus(I(b, c, d), x), ac));
- a = ROTATE_LEFT(a, s);
- return plus(a, b);
+ long tmp = plus(a, plus(plus(I(b, c, d), x), ac));
+ tmp = ROTATE_LEFT(tmp, s);
+ return plus(tmp, b);
}
private void decode(final long output[], final int input[],
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
index 0fd93b09f4..fc592c222c 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
@@ -69,6 +69,7 @@ package com.ericsson.otp.erlang;
* notify other parties in a timely manner.
* </p>
*
+ * <p>
* When retrieving messages from a mailbox that has received an exit signal, an
* {@link OtpErlangExit OtpErlangExit} exception will be raised. Note that the
* exception is queued in the mailbox along with other messages, and will not be
@@ -127,14 +128,14 @@ public class OtpMbox {
* supercede that name.
* </p>
*
- * @param name
+ * @param aname
* the name to register for the mailbox. Specify null to
* unregister the existing name from this mailbox.
*
* @return true if the name was available, or false otherwise.
*/
- public synchronized boolean registerName(final String name) {
- return home.registerName(name, this);
+ public synchronized boolean registerName(final String aname) {
+ return home.registerName(aname, this);
}
/**
@@ -349,21 +350,21 @@ public class OtpMbox {
* Send a message to a named mailbox created from the same node as this
* mailbox.
*
- * @param name
+ * @param aname
* the registered name of recipient mailbox.
*
* @param msg
* the body of the message to send.
*
*/
- public void send(final String name, final OtpErlangObject msg) {
- home.deliver(new OtpMsg(self, name, (OtpErlangObject) msg.clone()));
+ public void send(final String aname, final OtpErlangObject msg) {
+ home.deliver(new OtpMsg(self, aname, (OtpErlangObject) msg.clone()));
}
/**
* Send a message to a named mailbox created from another node.
*
- * @param name
+ * @param aname
* the registered name of recipient mailbox.
*
* @param node
@@ -374,23 +375,23 @@ public class OtpMbox {
* the body of the message to send.
*
*/
- public void send(final String name, final String node,
+ public void send(final String aname, final String node,
final OtpErlangObject msg) {
try {
final String currentNode = home.node();
if (node.equals(currentNode)) {
- send(name, msg);
+ send(aname, msg);
} else if (node.indexOf('@', 0) < 0
&& node.equals(currentNode.substring(0, currentNode
.indexOf('@', 0)))) {
- send(name, msg);
+ send(aname, msg);
} else {
// other node
final OtpCookedConnection conn = home.getConnection(node);
if (conn == null) {
return;
}
- conn.send(self, name, msg);
+ conn.send(self, aname, msg);
}
} catch (final Exception e) {
}
@@ -420,7 +421,6 @@ public class OtpMbox {
/**
* Equivalent to <code>exit(new OtpErlangAtom(reason))</code>.
- * </p>
*
* @see #exit(OtpErlangObject)
*/
@@ -629,8 +629,8 @@ public class OtpMbox {
* @return the {@link OtpErlangPid pid} corresponding to the registered
* name, or null if the name is not known on this node.
*/
- public OtpErlangPid whereis(final String name) {
- return home.whereis(name);
+ public OtpErlangPid whereis(final String aname) {
+ return home.whereis(aname);
}
/**
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java
index 6f507bf4bb..7c5bc69361 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java
@@ -30,14 +30,14 @@ package com.ericsson.otp.erlang;
* </p>
*
* <p>
- * The header information that is available is as follows: <lu>
+ * The header information that is available is as follows: <ul>
* <li> a tag indicating the type of message
* <li> the intended recipient of the message, either as a
* {@link OtpErlangPid pid} or as a String, but never both.
* <li> (sometimes) the sender of the message. Due to some eccentric
* characteristics of the Erlang distribution protocol, not all messages have
* information about the sending process. In particular, only messages whose tag
- * is {@link OtpMsg#regSendTag regSendTag} contain sender information. </lu>
+ * is {@link OtpMsg#regSendTag regSendTag} contain sender information. </ul>
*
* <p>
* Message are sent using the Erlang external format (see separate
@@ -129,13 +129,14 @@ public class OtpMsg {
}
// other message types (link, unlink)
- OtpMsg(int tag, final OtpErlangPid from, final OtpErlangPid to) {
+ OtpMsg(final int tag, final OtpErlangPid from, final OtpErlangPid to) {
// convert TT-tags to equiv non-TT versions
+ int atag = tag;
if (tag > 10) {
- tag -= 10;
+ atag -= 10;
}
- this.tag = tag;
+ this.tag = atag;
this.from = from;
this.to = to;
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
index 7ead0b9c54..68addb9f2c 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
@@ -74,7 +74,7 @@ public class OtpNode extends OtpLocalNode {
OtpNodeStatus handler;
// flags
- private int flags = 0;
+ private int connFlags = 0;
/**
* <p>
@@ -143,12 +143,12 @@ public class OtpNode extends OtpLocalNode {
init(port);
}
- private synchronized void init(final int port) throws IOException {
+ private synchronized void init(final int aport) throws IOException {
if (!initDone) {
connections = new Hashtable<String, OtpCookedConnection>(17,
(float) 0.95);
mboxes = new Mailboxes();
- acceptor = new Acceptor(port);
+ acceptor = new Acceptor(aport);
initDone = true;
}
}
@@ -314,13 +314,13 @@ public class OtpNode extends OtpLocalNode {
* OtpNodeStatus} handler object contains callback methods, that will be
* called when certain events occur.
*
- * @param handler
+ * @param ahandler
* the callback object to register. To clear the handler, specify
* null as the handler to use.
*
*/
- public synchronized void registerStatusHandler(final OtpNodeStatus handler) {
- this.handler = handler;
+ public synchronized void registerStatusHandler(final OtpNodeStatus ahandler) {
+ this.handler = ahandler;
}
/**
@@ -344,7 +344,7 @@ public class OtpNode extends OtpLocalNode {
* ;
* </pre>
*
- * @param node
+ * @param anode
* the name of the node to ping.
*
* @param timeout
@@ -362,11 +362,11 @@ public class OtpNode extends OtpLocalNode {
*
* the reply: <- SEND {2,'',#Pid<[email protected]>} {#Ref<[email protected]>,yes}
*/
- public boolean ping(final String node, final long timeout) {
- if (node.equals(this.node)) {
+ public boolean ping(final String anode, final long timeout) {
+ if (anode.equals(this.node)) {
return true;
- } else if (node.indexOf('@', 0) < 0
- && node.equals(this.node
+ } else if (anode.indexOf('@', 0) < 0
+ && anode.equals(this.node
.substring(0, this.node.indexOf('@', 0)))) {
return true;
}
@@ -375,7 +375,7 @@ public class OtpNode extends OtpLocalNode {
OtpMbox mbox = null;
try {
mbox = createMbox();
- mbox.send("net_kernel", node, getPingTuple(mbox));
+ mbox.send("net_kernel", anode, getPingTuple(mbox));
final OtpErlangObject reply = mbox.receive(timeout);
final OtpErlangTuple t = (OtpErlangTuple) reply;
@@ -392,17 +392,17 @@ public class OtpNode extends OtpLocalNode {
private OtpErlangTuple getPingTuple(final OtpMbox mbox) {
final OtpErlangObject[] ping = new OtpErlangObject[3];
final OtpErlangObject[] pid = new OtpErlangObject[2];
- final OtpErlangObject[] node = new OtpErlangObject[2];
+ final OtpErlangObject[] anode = new OtpErlangObject[2];
pid[0] = mbox.self();
pid[1] = createRef();
- node[0] = new OtpErlangAtom("is_auth");
- node[1] = new OtpErlangAtom(node());
+ anode[0] = new OtpErlangAtom("is_auth");
+ anode[1] = new OtpErlangAtom(node());
ping[0] = new OtpErlangAtom("$gen_call");
ping[1] = new OtpErlangTuple(pid);
- ping[2] = new OtpErlangTuple(node);
+ ping[2] = new OtpErlangTuple(anode);
return new OtpErlangTuple(ping);
}
@@ -450,9 +450,8 @@ public class OtpNode extends OtpLocalNode {
/* special case for netKernel requests */
if (name.equals("net_kernel")) {
return netKernel(m);
- } else {
- mbox = mboxes.get(name);
}
+ mbox = mboxes.get(name);
} else {
mbox = mboxes.get(m.getRecipientPid());
}
@@ -480,23 +479,23 @@ public class OtpNode extends OtpLocalNode {
/*
* find or create a connection to the given node
*/
- OtpCookedConnection getConnection(final String node) {
+ OtpCookedConnection getConnection(final String anode) {
OtpPeer peer = null;
OtpCookedConnection conn = null;
synchronized (connections) {
// first just try looking up the name as-is
- conn = connections.get(node);
+ conn = connections.get(anode);
if (conn == null) {
// in case node had no '@' add localhost info and try again
- peer = new OtpPeer(node);
+ peer = new OtpPeer(anode);
conn = connections.get(peer.node());
if (conn == null) {
try {
conn = new OtpCookedConnection(this, peer);
- conn.setFlags(flags);
+ conn.setFlags(connFlags);
addConnection(conn);
} catch (final Exception e) {
/* false = outgoing */
@@ -522,35 +521,35 @@ public class OtpNode extends OtpLocalNode {
}
/* use these wrappers to call handler functions */
- private synchronized void remoteStatus(final String node, final boolean up,
+ private synchronized void remoteStatus(final String anode, final boolean up,
final Object info) {
if (handler == null) {
return;
}
try {
- handler.remoteStatus(node, up, info);
+ handler.remoteStatus(anode, up, info);
} catch (final Exception e) {
}
}
- synchronized void localStatus(final String node, final boolean up,
+ synchronized void localStatus(final String anode, final boolean up,
final Object info) {
if (handler == null) {
return;
}
try {
- handler.localStatus(node, up, info);
+ handler.localStatus(anode, up, info);
} catch (final Exception e) {
}
}
- synchronized void connAttempt(final String node, final boolean incoming,
+ synchronized void connAttempt(final String anode, final boolean incoming,
final Object info) {
if (handler == null) {
return;
}
try {
- handler.connAttempt(node, incoming, info);
+ handler.connAttempt(anode, incoming, info);
} catch (final Exception e) {
}
}
@@ -684,13 +683,13 @@ public class OtpNode extends OtpLocalNode {
*/
public class Acceptor extends Thread {
private final ServerSocket sock;
- private final int port;
+ private final int acceptorPort;
private volatile boolean done = false;
Acceptor(final int port) throws IOException {
sock = new ServerSocket(port);
- this.port = sock.getLocalPort();
- OtpNode.this.port = this.port;
+ this.acceptorPort = sock.getLocalPort();
+ OtpNode.this.port = this.acceptorPort;
setDaemon(true);
setName("acceptor");
@@ -741,7 +740,7 @@ public class OtpNode extends OtpLocalNode {
}
public int port() {
- return port;
+ return acceptorPort;
}
@Override
@@ -771,7 +770,7 @@ public class OtpNode extends OtpLocalNode {
try {
synchronized (connections) {
conn = new OtpCookedConnection(OtpNode.this, newsock);
- conn.setFlags(flags);
+ conn.setFlags(connFlags);
addConnection(conn);
}
} catch (final OtpAuthException e) {
@@ -802,6 +801,6 @@ public class OtpNode extends OtpLocalNode {
}
public void setFlags(final int flags) {
- this.flags = flags;
+ this.connFlags = flags;
}
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
index 78f47aa32f..ef60a9f38a 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
@@ -25,7 +25,6 @@ import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
-import java.util.Arrays;
import java.util.zip.Deflater;
/**
@@ -45,8 +44,11 @@ public class OtpOutputStream extends ByteArrayOutputStream {
public static final int defaultIncrement = 2048;
// static formats, used to encode floats and doubles
+ @SuppressWarnings("unused")
private static final DecimalFormat eform = new DecimalFormat("e+00;e-00");
+ @SuppressWarnings("unused")
private static final BigDecimal ten = new BigDecimal(10.0);
+ @SuppressWarnings("unused")
private static final BigDecimal one = new BigDecimal(1.0);
private int fixedSize = Integer.MAX_VALUE;
@@ -159,9 +161,9 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* @see java.io.ByteArrayOutputStream#write(byte[])
*/
@Override
- public void write(final byte[] buf) {
+ public void write(final byte[] abuf) {
// don't assume that super.write(byte[]) calls write(buf, 0, buf.length)
- write(buf, 0, buf.length);
+ write(abuf, 0, abuf.length);
}
/* (non-Javadoc)
@@ -202,7 +204,7 @@ public class OtpOutputStream extends ByteArrayOutputStream {
/**
* Write an array of bytes to the stream.
*
- * @param buf
+ * @param bytes
* the array of bytes to write.
*
*/
@@ -285,10 +287,11 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* @param b
* the number of bytes to write from the little end.
*/
- public void writeLE(long n, final int b) {
+ public void writeLE(final long n, final int b) {
+ long v = n;
for (int i = 0; i < b; i++) {
- write((byte) (n & 0xff));
- n >>= 8;
+ write((byte) (v & 0xff));
+ v >>= 8;
}
}
@@ -518,16 +521,17 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_double(f);
}
- public void write_big_integer(BigInteger v) {
+ public void write_big_integer(final BigInteger v) {
if (v.bitLength() < 64) {
this.write_long(v.longValue(), true);
return;
}
final int signum = v.signum();
+ BigInteger val = v;
if (signum < 0) {
- v = v.negate();
+ val = val.negate();
}
- final byte[] magnitude = v.toByteArray();
+ final byte[] magnitude = val.toByteArray();
final int n = magnitude.length;
// Reverse the array to make it little endian.
for (int i = 0, j = n; i < j--; i++) {
@@ -568,7 +572,7 @@ public class OtpOutputStream extends ByteArrayOutputStream {
int n;
long mask;
for (mask = 0xFFFFffffL, n = 4; (abs & mask) != abs; n++, mask = mask << 8 | 0xffL) {
- ; // count nonzero bytes
+ // count nonzero bytes
}
write1(OtpExternal.smallBigTag);
write1(n); // length
@@ -637,7 +641,7 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* Write a positive short to the stream. The short is interpreted as a two's
* complement unsigned short even if it is negative.
*
- * @param s
+ * @param us
* the short to use.
*/
public void write_ushort(final short us) {
@@ -827,7 +831,6 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_nil(); // it should never ever get here...
}
} else { // unicode or longer, must code as list
- final char[] charbuf = s.toCharArray();
final int[] codePoints = OtpErlangString.stringToCodePoints(s);
write_list_head(codePoints.length);
for (final int codePoint : codePoints) {
@@ -867,6 +870,7 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* the compression level (<tt>0..9</tt>)
*/
public void write_compressed(final OtpErlangObject o, int level) {
+ @SuppressWarnings("resource")
final OtpOutputStream oos = new OtpOutputStream(o);
/*
* similar to erts_term_to_binary() in external.c:
@@ -920,6 +924,11 @@ public class OtpOutputStream extends ByteArrayOutputStream {
"Intermediate stream failed for Erlang object " + o);
} finally {
this.fixedSize = Integer.MAX_VALUE;
+ try {
+ dos.close();
+ } catch (IOException e) {
+ // ignore
+ }
}
}
}
@@ -974,4 +983,9 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_atom(function);
write_long(arity);
}
+
+ public void write_map_head(final int arity) {
+ write1(OtpExternal.mapTag);
+ write4BE(arity);
+ }
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files b/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
index 1390542194..62fa7f990e 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
@@ -74,6 +74,7 @@ ERL = \
OtpErlangShort\
OtpErlangString\
OtpErlangTuple \
+ OtpErlangMap \
OtpErlangUInt \
OtpErlangUShort
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.app.src b/lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.app.src
new file mode 100644
index 0000000000..d25d9bc142
--- /dev/null
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.app.src
@@ -0,0 +1,32 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% This is an -*- erlang -*- file.
+%%
+
+{application, jinterface,
+ [
+ {description, "Jinterface"},
+ {vsn, "%VSN%"},
+ {modules, []},
+ {registered, []},
+ {applications, []},
+ {env, []},
+ {runtime_dependencies, []}
+ ]
+}.
diff --git a/lib/toolbar/src/toolbar.appup.src b/lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.appup.src
index 7a435e9b22..d267e3d3d5 100644
--- a/lib/toolbar/src/toolbar.appup.src
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/jinterface.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,4 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%", [], []}.
diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl
index de8d611efc..00abc97ff5 100644
--- a/lib/jinterface/test/jinterface_SUITE.erl
+++ b/lib/jinterface/test/jinterface_SUITE.erl
@@ -37,7 +37,10 @@
erl_exit_with_reason_any_term/1,
java_exit_with_reason_any_term/1,
status_handler_localStatus/1, status_handler_remoteStatus/1,
- status_handler_connAttempt/1]).
+ status_handler_connAttempt/1,
+ maps/1,
+ fun_equals/1
+ ]).
-include_lib("common_test/include/ct.hrl").
-include("test_server_line.hrl").
@@ -103,7 +106,9 @@ fundamental() ->
nodename, % Nodename.java
register_and_whereis, % RegisterAndWhereis.java
get_names, % GetNames.java
- boolean_atom % BooleanAtom.java
+ boolean_atom, % BooleanAtom.java
+ maps, % Maps.java
+ fun_equals % FunEquals.java
].
ping() ->
@@ -675,6 +680,29 @@ status_handler_connAttempt(Config) when is_list(Config) ->
"NodeStatusHandler",
[erlang:get_cookie(),node(),?status_handler_connAttempt]).
+%%%-----------------------------------------------------------------
+maps(doc) ->
+ ["Maps.java: "
+ "Tests OtpErlangMap encoding, decoding, toString, get"];
+maps(suite) ->
+ [];
+maps(Config) when is_list(Config) ->
+ ok = jitu:java(?config(java, Config),
+ ?config(data_dir, Config),
+ "Maps",
+ []).
+
+%%%-----------------------------------------------------------------
+fun_equals(doc) ->
+ ["FunEquals.java: "
+ "Test OtpErlangFun.equals()"];
+fun_equals(suite) ->
+ [];
+fun_equals(Config) when is_list(Config) ->
+ ok = jitu:java(?config(java, Config),
+ ?config(data_dir, Config),
+ "FunEquals",
+ []).
%%%-----------------------------------------------------------------
%%% INTERNAL FUNCTIONS
diff --git a/lib/jinterface/test/jinterface_SUITE_data/FunEquals.java b/lib/jinterface/test/jinterface_SUITE_data/FunEquals.java
new file mode 100644
index 0000000000..961e462cb3
--- /dev/null
+++ b/lib/jinterface/test/jinterface_SUITE_data/FunEquals.java
@@ -0,0 +1,73 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2004-2010. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangFun;
+import com.ericsson.otp.erlang.OtpErlangLong;
+import com.ericsson.otp.erlang.OtpErlangObject;
+import com.ericsson.otp.erlang.OtpErlangPid;
+
+public class FunEquals {
+
+ /*
+ Implements test case jinterface_SUITE:fun_equals/1
+
+ Test the function OtpErlangFun.equals()
+ */
+
+ public static void main(String argv[]) {
+
+ OtpErlangPid pid = new OtpErlangPid("here", 4, 5, 0);
+ String module = "mod";
+ int arity = 2;
+ byte[] md5 = new byte[]{3,5,7};
+ int index = 2;
+ long old_index = 1;
+ long uniq= 2;
+ OtpErlangObject[] freeVars = new OtpErlangObject[]{
+ new OtpErlangAtom("hej"), new OtpErlangLong(9)
+ };
+
+ OtpErlangFun f1 = new OtpErlangFun(pid, module, arity, md5,
+ index, old_index, uniq, freeVars);
+ OtpErlangFun f2 = new OtpErlangFun(pid, module, arity, copyArray(md5),
+ index, old_index, uniq, copyArray(freeVars));
+
+ if(!f1.equals(f2))
+ fail(1);
+
+ }
+
+ private static void fail(int reason) {
+ System.exit(reason);
+ }
+
+ private static byte[] copyArray(byte[] source) {
+ byte[] result = new byte[source.length];
+ System.arraycopy(source, 0, result, 0, source.length);
+ return result;
+ }
+
+ private static OtpErlangObject[] copyArray(OtpErlangObject[] source) {
+ OtpErlangObject[] result = new OtpErlangObject[source.length];
+ System.arraycopy(source, 0, result, 0, source.length);
+ return result;
+ }
+
+}
diff --git a/lib/jinterface/test/jinterface_SUITE_data/GetNames.java b/lib/jinterface/test/jinterface_SUITE_data/GetNames.java
index 3d2bc4ac84..54efaad242 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/GetNames.java
+++ b/lib/jinterface/test/jinterface_SUITE_data/GetNames.java
@@ -18,7 +18,9 @@
*/
import java.util.ArrayList;
-import com.ericsson.otp.erlang.*;
+
+import com.ericsson.otp.erlang.OtpMbox;
+import com.ericsson.otp.erlang.OtpNode;
class GetNames {
@@ -37,7 +39,7 @@ class GetNames {
OtpMbox mbox3 = node.createMbox();
node.registerName("mbox3",mbox3);
- ArrayList existing_names = new ArrayList();
+ ArrayList<String> existing_names = new ArrayList<String>();
existing_names.add("mbox3");
existing_names.add("mbox2");
existing_names.add("mbox1");
diff --git a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
index 2a3dca463b..cd68f1ead5 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
+++ b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
@@ -46,7 +46,9 @@ JAVA_FILES = \
MboxPing.java \
MboxSendReceive.java \
MboxLinkUnlink.java \
- NodeStatusHandler.java
+ NodeStatusHandler.java \
+ Maps.java \
+ FunEquals.java
CLASS_FILES = $(JAVA_FILES:.java=.class)
diff --git a/lib/jinterface/test/jinterface_SUITE_data/Maps.java b/lib/jinterface/test/jinterface_SUITE_data/Maps.java
new file mode 100644
index 0000000000..653defc621
--- /dev/null
+++ b/lib/jinterface/test/jinterface_SUITE_data/Maps.java
@@ -0,0 +1,108 @@
+import java.util.Arrays;
+
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangDecodeException;
+import com.ericsson.otp.erlang.OtpErlangList;
+import com.ericsson.otp.erlang.OtpErlangLong;
+import com.ericsson.otp.erlang.OtpErlangMap;
+import com.ericsson.otp.erlang.OtpInputStream;
+import com.ericsson.otp.erlang.OtpOutputStream;
+
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2004-2010. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+class Maps {
+
+ /*
+ * Implements test case jinterface_SUITE:maps/1
+ *
+ * Test the class OtpErlangMap
+ */
+
+ @SuppressWarnings("resource")
+ public static void main(final String argv[]) {
+
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 0 }, "#{}", 1);
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 1, 100, 0, 1, 97, 100,
+ 0, 1, 98 }, "#{a => b}", 2);
+ // make sure keys are sorted here, jinterface doesn't reorder them
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 2, 97, 2, 106,
+ 100, 0, 1, 97, 97, 1 }, "#{2 => [],a => 1}", 3);
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 1, 104, 1, 97, 3, 108,
+ 0, 0, 0, 1, 100, 0, 1, 114, 106 }, "#{{3} => [r]}", 4);
+
+ try {
+ // #{2 => [],a => 1}
+ final OtpErlangMap map = new OtpErlangMap(new OtpInputStream(
+ new byte[] { (byte) 131, 116, 0, 0, 0, 2, 97, 2, 106,
+ 100, 0, 1, 97, 97, 1 }));
+
+ if (map.arity() != 2) {
+ fail(5);
+ }
+ if (!new OtpErlangLong(1).equals(map.get(new OtpErlangAtom("a")))) {
+ fail(6);
+ }
+ if (!new OtpErlangList().equals(map.get(new OtpErlangLong(2)))) {
+ fail(7);
+ }
+ if (map.get(new OtpErlangLong(1)) != null) {
+ fail(8);
+ }
+ } catch (final OtpErlangDecodeException e) {
+ fail(99);
+ }
+
+ }
+
+ @SuppressWarnings("resource")
+ private static void runTest(final byte[] in, final String out, final int err) {
+ try {
+ final OtpInputStream is = new OtpInputStream(in);
+
+ final OtpErlangMap map = new OtpErlangMap(is);
+ final String output = map.toString();
+ if (!output.equals(out)) {
+ fail("toString mismatch " + output + " <> " + out, err);
+ }
+
+ final OtpOutputStream os = new OtpOutputStream(map);
+ final byte[] outArray0 = os.toByteArray();
+ final byte[] outArray = new byte[outArray0.length + 1];
+ System.arraycopy(outArray0, 0, outArray, 1, outArray0.length);
+ outArray[0] = (byte) 131;
+ if (!Arrays.equals(in, outArray)) {
+ fail("encode error " + Arrays.toString(outArray), err);
+ }
+ } catch (final OtpErlangDecodeException e) {
+ fail("decode error " + e.getMessage(), err);
+ } catch (final Exception e) {
+ fail("error " + e.getMessage(), err);
+ }
+ }
+
+ private static void fail(final int reason) {
+ System.exit(reason);
+ }
+
+ private static void fail(final String str, final int reason) {
+ System.out.println(str);
+ System.exit(reason);
+ }
+}
diff --git a/lib/jinterface/test/jinterface_SUITE_data/MboxLinkUnlink.java b/lib/jinterface/test/jinterface_SUITE_data/MboxLinkUnlink.java
index 5d1d097cc8..470fdb4a14 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/MboxLinkUnlink.java
+++ b/lib/jinterface/test/jinterface_SUITE_data/MboxLinkUnlink.java
@@ -17,7 +17,14 @@
* %CopyrightEnd%
*/
-import com.ericsson.otp.erlang.*;
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangExit;
+import com.ericsson.otp.erlang.OtpErlangLong;
+import com.ericsson.otp.erlang.OtpErlangObject;
+import com.ericsson.otp.erlang.OtpErlangPid;
+import com.ericsson.otp.erlang.OtpErlangTuple;
+import com.ericsson.otp.erlang.OtpMbox;
+import com.ericsson.otp.erlang.OtpNode;
class MboxLinkUnlink {
@@ -66,7 +73,10 @@ class MboxLinkUnlink {
OtpErlangObject[] msg = {mainMbox.self(),mbox.self()};
mbox.send("erl_link_server", erlNode, new OtpErlangTuple(msg));
OtpErlangObject o = mbox.receive(1000);
- if (o == null) System.exit(1);
+ if (o == null) {
+ System.exit(1);
+ return;
+ }
OtpErlangTuple tuple = (OtpErlangTuple)o;
int tag = (int)((OtpErlangLong)tuple.elementAt(0)).longValue();
@@ -91,6 +101,7 @@ class MboxLinkUnlink {
expected = tuple.elementAt(2);
mbox.receive(1000);
System.exit(2);
+ break;
case erl_link_java_exit:
dbg("Java got \"erl_link_java_exit\"");
mbox.exit(tuple.elementAt(2));
@@ -104,6 +115,7 @@ class MboxLinkUnlink {
expected = tuple.elementAt(2);
mbox.receive(1000);
System.exit(3);
+ break;
case internal_link_linking_exits:
dbg("Java got \"internal_link_linking_exits\"");
mbox2 = node.createMbox();
@@ -113,6 +125,7 @@ class MboxLinkUnlink {
expected = tuple.elementAt(2);
mbox2.receive(1000); // hanging waiting for exit
System.exit(4); // got someting other than exit
+ break;
case internal_link_linked_exits:
dbg("Java got \"internal_link_linked_exits\"");
mbox2 = node.createMbox();
@@ -122,6 +135,7 @@ class MboxLinkUnlink {
expected = tuple.elementAt(2);
mbox.receive(1000); // hanging waiting for exit
System.exit(5); // got someting other than exit
+ break;
case internal_unlink_linking_exits:
dbg("Java got \"internal_unlink_linking_exits\"");
mbox2 = node.createMbox();
diff --git a/lib/jinterface/test/jinterface_SUITE_data/MboxSendReceive.java b/lib/jinterface/test/jinterface_SUITE_data/MboxSendReceive.java
index 2db71bb5cd..44433aa619 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/MboxSendReceive.java
+++ b/lib/jinterface/test/jinterface_SUITE_data/MboxSendReceive.java
@@ -17,7 +17,13 @@
* %CopyrightEnd%
*/
-import com.ericsson.otp.erlang.*;
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangLong;
+import com.ericsson.otp.erlang.OtpErlangObject;
+import com.ericsson.otp.erlang.OtpErlangPid;
+import com.ericsson.otp.erlang.OtpErlangTuple;
+import com.ericsson.otp.erlang.OtpMbox;
+import com.ericsson.otp.erlang.OtpNode;
class MboxSendReceive {
@@ -35,6 +41,7 @@ class MboxSendReceive {
private static final int java_internal_send_receive_different_nodes = 3;
private static final int java_internal_send_receive_self = 4;
+ @SuppressWarnings("null")
public static void main(String argv[]) {
String cookie = argv[0];
diff --git a/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java b/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
index 51ea15b5ef..06ddfa2d61 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
+++ b/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
@@ -17,7 +17,14 @@
* %CopyrightEnd%
*/
-import com.ericsson.otp.erlang.*;
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangBoolean;
+import com.ericsson.otp.erlang.OtpErlangObject;
+import com.ericsson.otp.erlang.OtpErlangString;
+import com.ericsson.otp.erlang.OtpErlangTuple;
+import com.ericsson.otp.erlang.OtpMbox;
+import com.ericsson.otp.erlang.OtpNode;
+import com.ericsson.otp.erlang.OtpNodeStatus;
public class NodeStatusHandler extends OtpNodeStatus {
/*
@@ -86,7 +93,10 @@ public class NodeStatusHandler extends OtpNodeStatus {
}
OtpErlangObject o = mbox.receive(recTime);
- if (o == null) System.exit(2);
+ if (o == null) {
+ System.exit(2);
+ return;
+ }
if (! ((OtpErlangAtom)o).atomValue().equals("done"))
System.exit(3);
@@ -100,6 +110,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
+ @Override
public void remoteStatus(String node, boolean up, Object info) {
try {
dbg("Got remoteStatus: " + node + " " + up + " " + info);
@@ -120,6 +131,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
}
+ @Override
public void localStatus(String node, boolean up, Object info) {
try {
dbg("Got localStatus: " + node + " " + up + " " + info);
@@ -141,6 +153,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
+@Override
public void connAttempt(String node, boolean incoming, Object info) {
try {
dbg("Got connAttempt: " + node + " " + incoming + " " + info);
diff --git a/lib/jinterface/test/jitu.erl b/lib/jinterface/test/jitu.erl
index a029c063bc..46b8cb3ac2 100644
--- a/lib/jinterface/test/jitu.erl
+++ b/lib/jinterface/test/jitu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -133,7 +133,7 @@ es(L,Quote,EscSpace) ->
cmd(Cmd) ->
PortOpts = [{line,80},eof,exit_status,stderr_to_stdout],
- io:format("cmd: ~s~n", [Cmd]),
+ io:format("cmd: ~ts~n", [Cmd]),
case catch open_port({spawn,Cmd}, PortOpts) of
Port when is_port(Port) ->
case erlang:port_info(Port,os_pid) of
diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl
index f1493a3cc9..9f37b33718 100644
--- a/lib/jinterface/test/nc_SUITE.erl
+++ b/lib/jinterface/test/nc_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/jinterface/test/nc_SUITE_data/echo_server.java b/lib/jinterface/test/nc_SUITE_data/echo_server.java
index 2e18e908d4..0e43ea0680 100644
--- a/lib/jinterface/test/nc_SUITE_data/echo_server.java
+++ b/lib/jinterface/test/nc_SUITE_data/echo_server.java
@@ -148,11 +148,13 @@ public class echo_server {
final String atomValue = ((OtpErlangAtom) t).atomValue();
if (atomValue.equals("binary") && i instanceof OtpErlangBinary) {
final OtpErlangBinary b = (OtpErlangBinary) i;
+ @SuppressWarnings("resource")
final OtpInputStream bis = new OtpInputStream(b.binaryValue(),
0);
final OtpErlangObject o = bis.read_any();
return o;
} else if (atomValue.equals("compress")) {
+ @SuppressWarnings("resource")
final OtpOutputStream oos = new OtpOutputStream();
oos.write1(OtpExternal.versionTag);
oos.write_compressed(i);
@@ -206,6 +208,7 @@ public class echo_server {
&& i instanceof OtpErlangString) {
final OtpErlangString s = (OtpErlangString) i;
final String ss = s.stringValue().substring(3, 6);
+ @SuppressWarnings("unused")
final int[] cps = OtpErlangString.stringToCodePoints(ss);
return s;
} else if (atomValue.equals("utf8")) {
diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk
index 1954040c3d..72ad316333 100644
--- a/lib/jinterface/vsn.mk
+++ b/lib/jinterface/vsn.mk
@@ -1 +1 @@
-JINTERFACE_VSN = 1.5.8
+JINTERFACE_VSN = 1.5.12
diff --git a/lib/kernel/doc/src/Makefile b/lib/kernel/doc/src/Makefile
index de3ca1e176..ec5d1f09e4 100644
--- a/lib/kernel/doc/src/Makefile
+++ b/lib/kernel/doc/src/Makefile
@@ -76,8 +76,8 @@ BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES) \
- $(XML_REF6_FILES) $(XML_APPLICATION_FILES)
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES)\
+ $(XML_REF6_FILES) $(XML_APPLICATION_FILES)
# ----------------------------------------------------
diff --git a/lib/kernel/doc/src/app.xml b/lib/kernel/doc/src/app.xml
index 1914844b37..8575d94048 100644
--- a/lib/kernel/doc/src/app.xml
+++ b/lib/kernel/doc/src/app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -61,7 +61,8 @@
{applications, Apps},
{env, Env},
{mod, Start},
- {start_phases, Phases}]}.
+ {start_phases, Phases},
+ {runtime_dependencies, RTDeps}]}.
Value Default
----- -------
@@ -77,8 +78,10 @@ Apps [App] []
Env [{Par,Val}] []
Start {Module,StartArgs} []
Phases [{Phase,PhaseArgs}] undefined
+RTDeps [ApplicationVersion] []
Module = Name = App = Par = Phase = atom()
- Val = StartArgs = PhaseArgs = term()</code>
+ Val = StartArgs = PhaseArgs = term()
+ ApplicationVersion = string()</code>
<p><c>Application</c> is the name of the application.</p>
<p>For the application controller, all keys are optional.
The respective default values are used for any omitted keys.</p>
@@ -87,6 +90,8 @@ Phases [{Phase,PhaseArgs}] undefined
<c>description</c>, <c>vsn</c>, <c>modules</c>, <c>registered</c>
and <c>applications</c>. The other keys are ignored by
<c>systools</c>.</p>
+ <warning><p>The <c>RTDeps</c> type was introduced in OTP 17.0 and
+ might be subject to changes during the OTP 17 release.</p></warning>
<taglist>
<tag><c>description</c></tag>
<item>
@@ -185,6 +190,33 @@ Phases [{Phase,PhaseArgs}] undefined
start phases must be a subset of the set of phases defined
for the primary application. Refer to <em>OTP Design Principles</em> for more information.</p>
</item>
+ <tag><marker id="runtime_dependencies"><c>runtime_dependencies</c></marker></tag>
+ <item><p>A list of application versions that the application
+ depends on. An example of such an application version is
+ <c>"kernel-3.0"</c>. Application versions specified as runtime
+ dependencies are minimum requirements. That is, a larger
+ application version than the one specified in the
+ dependency satisfies the requirement. For information on
+ how to compare application versions see
+ <seealso marker="doc/system_principles:versions">the
+ documentation of versions in the system principles
+ guide</seealso>. Note that that the application version
+ specifies a source code version. An additional indirect
+ requirement is that installed binary application of
+ the specified version has been built so that it is
+ compatible with the rest of the system.</p>
+ <p>Some dependencies might only be required in specific runtime
+ scenarios. In the case such optional dependencies exist, these are
+ specified and documented in the corresponding "App" documentation
+ of the specific application.</p>
+ <warning><p>The <c>runtime_dependencies</c> key was introduced in
+ OTP 17.0. The type of its value might be subject to changes during
+ the OTP 17 release.</p></warning>
+ <warning><p>All runtime dependencies specified in OTP applications
+ during the OTP 17 release may not be completely correct. This
+ is actively being worked on. Declared runtime dependencies in OTP
+ applications are expected to be correct in OTP 18.</p></warning>
+ </item>
</taglist>
</section>
diff --git a/lib/kernel/doc/src/application.xml b/lib/kernel/doc/src/application.xml
index 3909b11e59..7664fda4db 100644
--- a/lib/kernel/doc/src/application.xml
+++ b/lib/kernel/doc/src/application.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -239,10 +239,19 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<desc>
<p>Sets the value of the configuration parameter <c><anno>Par</anno></c> for
<c><anno>Application</anno></c>.</p>
- <p><c>set_env/3</c> uses the standard <c>gen_server</c> timeout
- value (5000 ms). A <c><anno>Timeout</anno></c> argument can be provided
+ <p><c>set_env/4</c> uses the standard <c>gen_server</c> timeout
+ value (5000 ms). The <c>timeout</c> option can be provided
if another timeout value is useful, for example, in situations
where the application controller is heavily loaded.</p>
+ <p>If <c>set_env/4</c> is called before the application is loaded,
+ the application environment values specified in the <c>Application.app</c>
+ file will override the ones previously set. This is also true for application
+ reloads.</p>
+ <p>The <c>persistent</c> option can be set to <c>true</c>
+ when there is a need to guarantee parameters set with <c>set_env/4</c>
+ will not be overridden by the ones defined in the application resource
+ file on load. This means persistent values will stick after the application
+ is loaded and also on application reload.</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application
@@ -406,9 +415,11 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<p>Removes the configuration parameter <c><anno>Par</anno></c> and its value
for <c><anno>Application</anno></c>.</p>
<p><c>unset_env/2</c> uses the standard <c>gen_server</c>
- timeout value (5000 ms). A <c><anno>Timeout</anno></c> argument can be
+ timeout value (5000 ms). The <c>timeout</c> option can be
provided if another timeout value is useful, for example, in
situations where the application controller is heavily loaded.</p>
+ <p><c>unset_env/3</c> also allows the persistent option to be passed
+ (see <c>set_env/4</c> above).</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application
@@ -448,8 +459,7 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<name>Module:start(StartType, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason}</name>
<fsummary>Start an application</fsummary>
<type>
- <v>StartType = normal | {takeover,Node} | {failover,Node}</v>
- <v>&nbsp;Node = node()</v>
+ <v>StartType = <seealso marker="#type-start_type">start_type()</seealso></v>
<v>StartArgs = term()</v>
<v>Pid = pid()</v>
<v>State = term()</v>
diff --git a/lib/kernel/doc/src/auth.xml b/lib/kernel/doc/src/auth.xml
index 15d9ef0fe4..72beee46f5 100644
--- a/lib/kernel/doc/src/auth.xml
+++ b/lib/kernel/doc/src/auth.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/book.xml b/lib/kernel/doc/src/book.xml
index caf13fd001..09123976cb 100644
--- a/lib/kernel/doc/src/book.xml
+++ b/lib/kernel/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml
index 6f04741f85..454ee9bcbb 100644
--- a/lib/kernel/doc/src/code.xml
+++ b/lib/kernel/doc/src/code.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/kernel/doc/src/config.xml b/lib/kernel/doc/src/config.xml
index 34398e90ac..005504dbd1 100644
--- a/lib/kernel/doc/src/config.xml
+++ b/lib/kernel/doc/src/config.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/disk_log.xml b/lib/kernel/doc/src/disk_log.xml
index d278d54d93..27d8ab4fc1 100644
--- a/lib/kernel/doc/src/disk_log.xml
+++ b/lib/kernel/doc/src/disk_log.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/erl_boot_server.xml b/lib/kernel/doc/src/erl_boot_server.xml
index 472671a80e..abaea4f695 100644
--- a/lib/kernel/doc/src/erl_boot_server.xml
+++ b/lib/kernel/doc/src/erl_boot_server.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/erl_ddll.xml b/lib/kernel/doc/src/erl_ddll.xml
index 26db11cfcd..7be54c8b95 100644
--- a/lib/kernel/doc/src/erl_ddll.xml
+++ b/lib/kernel/doc/src/erl_ddll.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/erl_prim_loader_stub.xml b/lib/kernel/doc/src/erl_prim_loader_stub.xml
index e6324b8168..485b16b91f 100644
--- a/lib/kernel/doc/src/erl_prim_loader_stub.xml
+++ b/lib/kernel/doc/src/erl_prim_loader_stub.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/erlang_stub.xml b/lib/kernel/doc/src/erlang_stub.xml
index 333c4fedaf..79a041110a 100644
--- a/lib/kernel/doc/src/erlang_stub.xml
+++ b/lib/kernel/doc/src/erlang_stub.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/error_handler.xml b/lib/kernel/doc/src/error_handler.xml
index 84ec3927c8..2f8f09b984 100644
--- a/lib/kernel/doc/src/error_handler.xml
+++ b/lib/kernel/doc/src/error_handler.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/kernel/doc/src/error_logger.xml b/lib/kernel/doc/src/error_logger.xml
index cd86b364f6..df2f0b01ee 100644
--- a/lib/kernel/doc/src/error_logger.xml
+++ b/lib/kernel/doc/src/error_logger.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -58,7 +58,7 @@
specific events. (<c>add_report_handler/1,2</c>). Also, there is
a useful event handler in STDLIB for multi-file logging of events,
see <c>log_mf_h(3)</c>.</p>
- <p>Warning events was introduced in Erlang/OTP R9C. To retain
+ <p>Warning events were introduced in Erlang/OTP R9C. To retain
backwards compatibility, these are by default tagged as errors,
thus showing up as error reports in the logs. By using
the command line flag <c><![CDATA[+W <w | i>]]></c>, they can instead
diff --git a/lib/kernel/doc/src/fascicules.xml b/lib/kernel/doc/src/fascicules.xml
index 43090b4aed..fadd37eefb 100644
--- a/lib/kernel/doc/src/fascicules.xml
+++ b/lib/kernel/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml
index 66ecba1bf2..dcb9640dcf 100644
--- a/lib/kernel/doc/src/file.xml
+++ b/lib/kernel/doc/src/file.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -37,54 +37,48 @@
the file operations. See the command line flag
<c>+A</c> in <seealso marker="erts:erl">erl(1)</seealso>.</p>
- <p>The Erlang VM supports file names in Unicode to a limited
- extent. Depending on how the VM is started (with the parameter
- <c>+fnu</c> or <c>+fnl</c>), file names given can contain
- characters > 255 and the VM system will convert file names
- back and forth to the native file name encoding.</p>
+ <p>With regard to file name encoding, the Erlang VM can operate in
+ two modes. The current mode can be queried using the <seealso
+ marker="#native_name_encoding">native_name_encoding/0</seealso>
+ function. It returns either <c>latin1</c> or <c>utf8</c>.</p>
- <p>The default behavior for Unicode character translation depends
- on to what extent the underlying OS/filesystem enforces consistent
- naming. On OSes where all file names are ensured to be in one or
- another encoding, Unicode is the default (currently this holds for
- Windows and MacOSX). On OSes with completely transparent file
- naming (i.e. all Unixes except MacOSX), ISO-latin-1 file naming is
- the default. The reason for the ISO-latin-1 default is that
- file names are not guaranteed to be possible to interpret according to
- the Unicode encoding expected (i.e. UTF-8), and file names that
- cannot be decoded will only be accessible by using &quot;raw
- file names&quot;, in other word file names given as binaries.</p>
-
- <p>As file names are traditionally not binaries in Erlang,
- applications that need to handle raw file names need to be
- converted, why the Unicode mode for file names is not default on
- systems having completely transparent file naming.</p>
+ <p>In the <c>latin1</c> mode, the Erlang VM does not change the
+ encoding of file names. In the <c>utf8</c> mode, file names can
+ contain Unicode characters greater than 255 and the VM will
+ convert file names back and forth to the native file name encoding
+ (usually UTF-8, but UTF-16 on Windows).</p>
- <p>Raw file names is a new feature in OTP R14B01, which allows the
- user to supply completely uninterpreted file names to the
- underlying OS/filesystem. They are supplied as binaries, where it
- is up to the user to supply a correct encoding for the
- environment. The function <c>file:native_name_encoding()</c> can
- be used to check what encoding the VM is working in. If the
- function returns <c>latin1</c> file names are not in any way
- converted to Unicode, if it is <c>utf8</c>, raw file names should
- be encoded as UTF-8 if they are to follow the convention of the VM
- (and usually the convention of the OS as well). Using raw
- file names is useful if you have a filesystem with inconsistent
- file naming, where some files are named in UTF-8 encoding while
- others are not. A file:list_dir on such mixed file name systems
- when the VM is in Unicode file name mode might return file names as
- raw binaries as they cannot be interpreted as Unicode
- file names. Raw file names can also be used to give UTF-8 encoded
- file names even though the VM is not started in Unicode file name
- translation mode.</p>
+ <p>The default mode depends on the operating system. Windows and
+ MacOS X enforce consistent file name encoding and therefore the
+ VM uses the <c>utf8</c> mode.</p>
+
+ <p>On operating systems with transparent naming (i.e. all Unix
+ systems except MacOS X), the default will be <c>utf8</c> if the
+ terminal supports UTF-8, otherwise <c>latin1</c>. The default may
+ be overridden using the <c>+fnl</c> (to force <c>latin1</c> mode)
+ or <c>+fnu</c> (to force <c>utf8</c> mode) when starting <seealso
+ marker="erts:erl">erl</seealso>.</p>
+
+ <p>On operating systems with transparent naming, files could be
+ inconsistently named, i.e. some files are encoded in UTF-8 while
+ others are encoded in (for example) iso-latin1. To be able to
+ handle file systems with inconsistent naming when running in the
+ <c>utf8</c> mode, the concept of "raw file names" has been
+ introduced.</p>
+
+ <p>A raw file name is a file name given as a binary. The Erlang VM
+ will perform no translation of a file name given as a binary on
+ systems with transparent naming.</p>
+
+ <p>When running in the <c>utf8</c> mode, the
+ <c>file:list_dir/1</c> and <c>file:read_link/1</c> functions will
+ never return raw file names. Use the <seealso
+ marker="#list_dir_all">list_dir_all/1</seealso> and <seealso
+ marker="#read_link_all">read_link_all/1</seealso> functions to
+ return all file names including raw file names.</p>
+
+ <p>Also see <seealso marker="stdlib:unicode_usage#notes-about-raw-filenames">Notes about raw file names</seealso>.</p>
- <p>Note that on Windows, <c>file:native_name_encoding()</c>
- returns <c>utf8</c> per default, which is the format for raw
- file names even on Windows, although the underlying OS specific
- code works in a limited version of little endian UTF16. As far as
- the Erlang programmer is concerned, Windows native Unicode format
- is UTF-8...</p>
</description>
<datatypes>
@@ -434,14 +428,6 @@
</desc>
</func>
<func>
- <name name="file_info" arity="1"/>
- <fsummary>Get information about a file (deprecated)</fsummary>
- <desc>
- <p>This function is obsolete. Use <c>read_file_info/1,2</c>
- instead.</p>
- </desc>
- </func>
- <func>
<name name="format_error" arity="1"/>
<fsummary>Return a descriptive string for an error reason</fsummary>
<desc>
@@ -535,8 +521,8 @@
<name name="list_dir_all" arity="1"/>
<fsummary>List all files in a directory</fsummary>
<desc>
- <p>Lists all the files in a directory, including files with
- "raw" names.
+ <p><marker id="list_dir_all"/>Lists all the files in a directory,
+ including files with "raw" names.
Returns <c>{ok, <anno>Filenames</anno>}</c> if successful.
Otherwise, it returns <c>{error, <anno>Reason</anno>}</c>.
<c><anno>Filenames</anno></c> is a list of
@@ -648,16 +634,24 @@
<item>
<p>Symbolic links are not supported on this platform.</p>
</item>
+ <tag><c>eperm</c></tag>
+ <item>
+ <p>User does not have privileges to create symbolic links
+ (<c>SeCreateSymbolicLinkPrivilege</c> on Windows).</p>
+ </item>
</taglist>
</desc>
</func>
<func>
<name name="native_name_encoding" arity="0"/>
- <fsummary>Return the VM's configured filename encoding.</fsummary>
+ <fsummary>Return the VM's configured filename encoding</fsummary>
<desc>
- <p>This function returns the configured default file name encoding to use for raw file names. Generally an application supplying file names raw (as binaries), should obey the character encoding returned by this function.</p>
- <p>By default, the VM uses ISO-latin-1 file name encoding on filesystems and/or OSes that use completely transparent file naming. This includes all Unix versions except MacOSX, where the vfs layer enforces UTF-8 file naming. By giving the experimental option <c>+fnu</c> when starting Erlang, UTF-8 translation of file names can be turned on even for those systems. If Unicode file name translation is in effect, the system behaves as usual as long as file names conform to the encoding, but will return file names that are not properly encoded in UTF-8 as raw file names (i.e. binaries).</p>
- <p>On Windows, this function also returns <c>utf8</c> by default. The OS uses a pure Unicode naming scheme and file names are always possible to interpret as valid Unicode. The fact that the underlying Windows OS actually encodes file names using little endian UTF-16 can be ignored by the Erlang programmer. Windows and MacOSX are the only operating systems where the VM operates in Unicode file name mode by default.</p>
+ <p><marker id="native_name_encoding"/>This function returns
+ the file name encoding mode. If it is <c>latin1</c>, the
+ system does no translation of file names. If it is
+ <c>utf8</c>, file names will be converted back and forth to
+ the native file name encoding (usually UTF-8, but UTF-16 on
+ Windows).</p>
</desc>
</func>
<func>
@@ -826,6 +820,16 @@
<item>
<p><c>File</c> must be <c>iodata()</c>. Returns an <c>fd()</c> which lets the <c>file</c> module operate on the data in-memory as if it is a file.</p>
</item>
+ <tag><c>sync</c></tag>
+ <item>
+ <p>On platforms that support it, enables the POSIX <c>O_SYNC</c> synchronous I/O flag or its platform-dependent
+ equivalent (e.g., <c>FILE_FLAG_WRITE_THROUGH</c> on Windows) so that writes to the file block until the data has
+ been physically written to disk. Be aware, though, that the exact semantics of this flag differ from platform to
+ platform; for example, neither Linux nor Windows guarantees that all file metadata are also written before the call
+ returns. For precise semantics, check the details of your platform's documentation. On platforms with no
+ support for POSIX <c>O_SYNC</c> or equivalent, use of the <c>sync</c> flag causes <c>open</c> to return
+ <c>{error, enotsup}</c>.</p>
+ </item>
</taglist>
<p>Returns:</p>
<taglist>
@@ -1279,6 +1283,8 @@
or before unix time epoch which is 1970-01-01 00:00 UTC.
Default is <c>{time, local}</c>.
</p>
+ <p>If the <c>raw</c> option is set, the file server will not be called
+ and only informations about local files will be returned.</p>
<note>
<p>
Since file times is stored in posix time on most OS it is
@@ -1440,7 +1446,8 @@
<name name="read_link" arity="1"/>
<fsummary>See what a link is pointing to</fsummary>
<desc>
- <p>This function returns <c>{ok, <anno>Filename</anno>}</c> if
+ <p><marker id="read_link_all"/>This function returns
+ <c>{ok, <anno>Filename</anno>}</c> if
<c><anno>Name</anno></c> refers to a symbolic link that is
not a "raw" file name, or <c>{error, <anno>Reason</anno>}</c>
otherwise.
@@ -1504,6 +1511,8 @@
the link will be returned in the <c>file_info</c> record and
the <c>type</c> field of the record will be set to
<c>symlink</c>.</p>
+ <p>If the <c>raw</c> option is set, the file server will not be called
+ and only informations about local files will be returned.</p>
<p>If <c><anno>Name</anno></c> is not a symbolic link, this function returns
exactly the same result as <c>read_file_info/1</c>.
On platforms that do not support symbolic links, this function
@@ -1622,6 +1631,11 @@
<desc>
<p>Sets the current working directory of the file server to
<c><anno>Dir</anno></c>. Returns <c>ok</c> if successful.</p>
+ <p>The functions in the <c>file</c> module usually treat binaries
+ as raw filenames, i.e. they are passed as is even when the encoding
+ of the binary does not agree with <c>file:native_name_encoding()</c>.
+ This function however expects binaries to be encoded according to the
+ value returned by <c>file:native_name_encoding()</c>.</p>
<p>Typical error reasons are:</p>
<taglist>
<tag><c>enoent</c></tag>
@@ -1646,8 +1660,8 @@
<tag><c>no_translation</c></tag>
<item>
<p><c><anno>Dir</anno></c> is a <c>binary()</c> with
- characters coded in ISO-latin-1 and the VM was started
- with the parameter <c>+fnue</c>.</p>
+ characters coded in ISO-latin-1 and the VM is operating
+ with unicode file name encoding.</p>
</item>
</taglist>
<warning>
@@ -1736,16 +1750,16 @@
<item>The chunk size used by the erlang fallback to send
data. If using the fallback, this should be set to a value
which comfortably fits in the systems memory. Default is 20 MB.</item>
+ <tag><c>use_threads</c></tag>
+ <item>Instruct the emulator to use the async thread pool for the
+ sendfile system call. This could be usefull if the OS you are running
+ on does not properly support non-blocking sendfile calls. Do note that
+ using async threads potentially makes your system volnerable to slow
+ client attacks. If set to true and no async threads are available,
+ the sendfile call will return <c>{error,einval}</c>.
+ Introduced in Erlang/OTP 17.0. Default is false.</item>
</taglist>
</p>
- <p>On operating systems with thread support, it is recommended to use
- async threads. See the command line flag
- <c>+A</c> in <seealso marker="erts:erl">erl(1)</seealso>. If it is not
- possible to use async threads for sendfile, it is recommended to use
- a relatively small value for the send buffer on the socket. Otherwise
- the Erlang VM might loose some of its soft realtime guarantees.
- Which size to use depends on the OS/hardware and the requirements
- of the application.</p>
</desc>
</func>
<func>
@@ -1837,6 +1851,8 @@
interpret it as universal time and <c>posix</c> must be seconds since
or before unix time epoch which is 1970-01-01 00:00 UTC.
Default is <c>{time, local}</c>.
+ <p>If the <c>raw</c> option is set, the file server will not be called
+ and only informations about local files will be returned.</p>
</p>
<p>The following fields are used from the record, if they are
given.</p>
diff --git a/lib/kernel/doc/src/gen_sctp.xml b/lib/kernel/doc/src/gen_sctp.xml
index 33f1c20608..ee8cd441d4 100644
--- a/lib/kernel/doc/src/gen_sctp.xml
+++ b/lib/kernel/doc/src/gen_sctp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2012</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -496,9 +496,11 @@
orthogonal to the sets of TCP, UDP and generic INET options:
only those options which are explicitly listed below are allowed
for SCTP sockets. Options can be set on the socket using
- <c>gen_sctp:open/1,2</c> or <c>inet:setopts/2</c>,
- retrieved using <c>inet:getopts/2</c>, and when calling
- <c>gen_sctp:connect/4,5</c> options can be changed.</p>
+ <seealso marker="#open/1"><c>gen_sctp:open/1,2</c></seealso>
+ or <seealso marker="inet#setopts/2"><c>inet:setopts/2</c></seealso>,
+ retrieved using <seealso marker="inet#getopts/2"><c>inet:getopts/2</c></seealso>,
+ and when calling <seealso marker="#connect/4"><c>gen_sctp:connect/4,5</c></seealso>
+ options can be changed.</p>
<marker id="option-binary"></marker>
<marker id="option-list"></marker>
<taglist>
@@ -507,7 +509,7 @@
<p>Determines the type of data returned from <c>gen_sctp:recv/1,2</c>.</p>
<marker id="option-active"></marker>
</item>
- <tag><c>{active, true|false|once}</c></tag>
+ <tag><c>{active, true|false|once|N}</c></tag>
<item>
<list type="bulleted">
<item>
@@ -524,11 +526,28 @@
</item>
<item>
<p>If <c>once</c>, only one message is automatically placed
- in the message queue, after that the mode is automatically
- re-set to passive. This provides flow control as well as
+ in the message queue, and after that the mode is automatically
+ reset to passive. This provides flow control as well as
the possibility for the receiver to listen for its incoming
SCTP data interleaved with other inter-process messages.</p>
</item>
+ <item>
+ <p>If <c>active</c> is specified as an integer <c>N</c> in the
+ range -32768 to 32767 (inclusive), then that number is added to
+ the socket's count of the number of data messages to be
+ delivered to the controlling process. If the result of the
+ addition would be negative, the count is set to 0. Once the
+ count reaches 0, either through the delivery of messages or by
+ being explicitly set with <seealso
+ marker="inet#setopts/2">inet:setopts/2</seealso>, the socket's
+ mode is automatically reset to passive (<c>{active,
+ false}</c>) mode. When a socket in this active mode transitions to
+ passive mode, the message <c>{sctp_passive, Socket}</c> is sent
+ to the controlling process to notify it that if it wants to
+ receive more data messages from the socket, it must call
+ <seealso marker="inet#setopts/2">inet:setopts/2</seealso> to set
+ the socket back into an active mode.</p>
+ </item>
</list>
</item>
<tag><c>{tos, integer()}</c></tag>
@@ -942,7 +961,7 @@
<pre> #sctp_paddrinfo{
assoc_id = assoc_id(),
address = {IP, Port},
- state = inactive | active,
+ state = inactive | active | unconfirmed,
cwnd = integer(),
srtt = integer(),
rto = integer(),
diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml
index 11a0843c10..820ecd1e30 100644
--- a/lib/kernel/doc/src/gen_tcp.xml
+++ b/lib/kernel/doc/src/gen_tcp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -112,7 +112,12 @@ 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>
+ descriptor for it. If <c>{ip, ip_address()}</c>
+ and/or <c>{port, port_number()}</c> is combined with
+ this option the fd will be bound to the given interface
+ and port before connecting. If these options are not given
+ it is assumed that the fd is already bound appropriately.
+ </p>
</item>
<tag><c>inet</c></tag>
@@ -148,6 +153,12 @@ do_recv(Sock, Bs) ->
as messages:</p>
<code type="none">
{tcp, Socket, Data}</code>
+ <p>If the socket is in <c>{active, N}</c> mode (see <seealso marker="inet#setopts/2">
+ inet:setopts/2</seealso> for details) and its message counter
+ drops to 0, the following message is delivered to indicate that the
+ socket has transitioned to passive (<c>{active, false}</c>) mode:</p>
+ <code type="none">
+{tcp_passive, Socket}</code>
<p>If the socket is closed, the following message is delivered:</p>
<code type="none">
{tcp_closed, Socket}</code>
diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml
index 4850278a64..291d1b0da7 100644
--- a/lib/kernel/doc/src/gen_udp.xml
+++ b/lib/kernel/doc/src/gen_udp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -84,7 +84,12 @@
<item>
<p>If a socket has somehow been opened without using
<c>gen_udp</c>, use this option to pass the file
- descriptor for it.</p>
+ descriptor for it. If <c><anno>Port</anno></c> is not set to 0
+ and/or <c>{ip, ip_address()}</c> is combined with this option
+ the fd will be bound to the given interface and port after being
+ opened. If these options are not given it is assumed that the fd
+ is already bound appropriately.
+ </p>
</item>
<tag><c>inet6</c></tag>
<item>
@@ -145,14 +150,23 @@
<seealso marker="inet#setopts/2">inet:setopts/2</seealso>.</p>
</item>
</taglist>
- <p>The returned socket <c><anno>Socket</anno></c> is used to send packets
- from this port with <c>send/4</c>. When UDP packets arrive at
- the opened port, they are delivered as messages:</p>
+ <p>The returned socket <c><anno>Socket</anno></c> is used to send
+ packets from this port with <c>send/4</c>. When UDP packets arrive
+ at the opened port, if the socket is in an active mode the packets
+ are delivered as messages to the controlling process:</p>
<code type="none">
{udp, Socket, IP, InPortNo, Packet}</code>
- <p>Note that arriving UDP packets that are longer than
+ <p>If the socket is not in an active mode, data can be
+ retrieved via the <seealso marker="#recv/2">recv/2,3</seealso> calls.
+ Note that arriving UDP packets that are longer than
the receive buffer option specifies, might be truncated
without warning.</p>
+ <p>When a socket in <c>{active, N}</c> mode (see <seealso marker="inet#setopts/2">
+ inet:setopts/2</seealso> for details) transitions to passive
+ (<c>{active, false}</c>) mode, the controlling process is notified by a
+ message of the following form:</p>
+ <code type="none">
+{udp_passive, Socket}</code>
<p><c>IP</c> and <c>InPortNo</c> define the address from which
<c>Packet</c> came. <c>Packet</c> is a list of bytes if
the option <c>list</c> was specified. <c>Packet</c> is a
diff --git a/lib/kernel/doc/src/global.xml b/lib/kernel/doc/src/global.xml
index 53958c47c2..691b243443 100644
--- a/lib/kernel/doc/src/global.xml
+++ b/lib/kernel/doc/src/global.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/kernel/doc/src/global_group.xml b/lib/kernel/doc/src/global_group.xml
index abf6178fc4..2c181da83a 100644
--- a/lib/kernel/doc/src/global_group.xml
+++ b/lib/kernel/doc/src/global_group.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/heart.xml b/lib/kernel/doc/src/heart.xml
index 2856d84dcf..3ec33d2f18 100644
--- a/lib/kernel/doc/src/heart.xml
+++ b/lib/kernel/doc/src/heart.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -118,8 +118,13 @@
the system. The new Erlang runtime system will (if it
misbehaves) use the environment variable
<c>HEART_COMMAND</c> to reboot.</p>
- <p>Limitations: The length of the <c><anno>Cmd</anno></c> command string
- must be less than 2047 characters.</p>
+
+ <p>Limitations: The <c><anno>Cmd</anno></c> command string
+ will be sent to the heart program as a ISO-latin-1 or UTF-8
+ encoded binary depending on the file name encoding mode of the
+ emulator (see
+ <seealso marker="kernel:file#native_name_encoding/0"><c>file:native_name_encoding/0</c></seealso>).
+ The size of the encoded binary must be less than 2047 bytes.</p>
</desc>
</func>
<func>
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index bc4c68230e..77a8caaaf6 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -138,7 +138,7 @@ fe80::204:acff:fe17:bf38
<name name="get_rc" arity="0"/>
<fsummary>Return a list of IP configuration parameters</fsummary>
<desc>
- <p>Returns the state of the Inet configuration database in
+ <p>Returns the state of the Inet configuration database in
form of a list of recorded configuration parameters. (See the
ERTS User's Guide, Inet configuration, for more information).
Only parameters with other than default values are returned.</p>
@@ -258,8 +258,8 @@ fe80::204:acff:fe17:bf38
<type name="socket_getopt"/>
<type name="socket_setopt"/>
<desc>
- <p>Gets one or more options for a socket.
- See <seealso marker="#setopts/2">setopts/2</seealso>
+ <p>Gets one or more options for a socket.
+ See <seealso marker="#setopts/2">setopts/2</seealso>
for a list of available options.</p>
<p>The number of elements in the returned <c><anno>OptionValues</anno></c>
list does not necessarily correspond to the number of options
@@ -278,14 +278,14 @@ fe80::204:acff:fe17:bf38
by the protocol level, the option number and either a binary
or the size, in bytes, of the
buffer in which the option value is to be stored. A binary
- should be used when the underlying <c>getsockopt</c> requires
+ should be used when the underlying <c>getsockopt</c> requires
<em>input</em>
in the argument field, in which case the size of the binary
should correspond to the required buffer
size of the return value. The supplied values in a <c>RawOptReq</c>
correspond to the second, third and fourth/fifth parameters to the
<c>getsockopt</c> call in the C socket API. The value stored
- in the buffer is returned as a binary <c>ValueBin</c>
+ in the buffer is returned as a binary <c>ValueBin</c>
where all values are coded in the native endianess.</p>
<p>Asking for and inspecting raw socket options require low
level information about the current operating system and TCP
@@ -306,7 +306,7 @@ fe80::204:acff:fe17:bf38
value to be a 32 bit integer. We could use the following
code to retrieve the value:</p>
<code type="none"><![CDATA[
- get_tcpi_sacked(Sock) ->
+ get_tcpi_sacked(Sock) ->
{ok,[{raw,_,_,Info}]} = inet:getopts(Sock,[{raw,6,11,92}]),
<<_:28/binary,TcpiSacked:32/native,_/binary>> = Info,
TcpiSacked.]]></code>
@@ -332,23 +332,23 @@ fe80::204:acff:fe17:bf38
<taglist>
<tag><c>recv_avg</c></tag>
<item>
- <p>Average size of packets in bytes received to the socket.</p>
+ <p>Average size of packets in bytes received by the socket.</p>
</item>
<tag><c>recv_cnt</c></tag>
<item>
- <p>Number of packets received to the socket.</p>
+ <p>Number of packets received by the socket.</p>
</item>
<tag><c>recv_dvi</c></tag>
<item>
- <p>Average packet size deviation in bytes received to the socket.</p>
+ <p>Average packet size deviation in bytes received by the socket.</p>
</item>
<tag><c>recv_max</c></tag>
<item>
- <p>The size of the largest packet in bytes received to the socket.</p>
+ <p>The size of the largest packet in bytes received by the socket.</p>
</item>
<tag><c>recv_oct</c></tag>
<item>
- <p>Number of bytes received to the socket.</p>
+ <p>Number of bytes received by the socket.</p>
</item>
<tag><c>send_avg</c></tag>
@@ -361,7 +361,7 @@ fe80::204:acff:fe17:bf38
</item>
<tag><c>send_dvi</c></tag>
<item>
- <p>Average packet size deviation in bytes received sent from the socket.</p>
+ <p>Average packet size deviation in bytes sent from the socket.</p>
</item>
<tag><c>send_max</c></tag>
<item>
@@ -408,7 +408,7 @@ fe80::204:acff:fe17:bf38
<name name="parse_ipv6strict_address" arity="1" />
<fsummary>Parse an IPv6 address strict.</fsummary>
<desc>
- <p>Parses an IPv6 address string and returns an <a href="#type-ip6_address">ip6_address()</a>.
+ <p>Parses an IPv6 address string and returns an <a href="#type-ip6_address">ip6_address()</a>.
Does <b>not</b> accept IPv4 adresses.</p>
</desc>
</func>
@@ -544,47 +544,66 @@ fe80::204:acff:fe17:bf38
<p>Sets one or more options for a socket. The following options
are available:</p>
<taglist>
- <tag><c>{active, true | false | once}</c></tag>
+ <tag><c>{active, true | false | once | N}</c></tag>
<item>
<p>If the value is <c>true</c>, which is the default,
everything received from the socket will be sent as
messages to the receiving process. If the value is
<c>false</c> (passive mode), the process must explicitly
- receive incoming data by calling <c>gen_tcp:recv/2,3</c>
- or <c>gen_udp:recv/2,3</c> (depending on the type of
- socket).</p>
+ receive incoming data by calling
+ <seealso marker="gen_tcp#recv/2"><c>gen_tcp:recv/2,3</c></seealso>,
+ <seealso marker="gen_udp#recv/2"><c>gen_udp:recv/2,3</c></seealso>
+ or <seealso marker="gen_sctp#recv/1"><c>gen_sctp:recv/1,2</c></seealso>
+ (depending on the type of socket).</p>
<p>If the value is <c>once</c> (<c>{active, once}</c>),
<em>one</em> data message from the socket will be sent
to the process. To receive one more message,
<c>setopts/2</c> must be called again with the
<c>{active, once}</c> option.</p>
- <p>When using <c>{active, once}</c>, the socket changes
- behaviour automatically when data is received. This can
- sometimes be confusing in combination with connection
- oriented sockets (i.e. <c>gen_tcp</c>) as a socket with
- <c>{active, false}</c> behaviour reports closing
+ <p>If the value is an integer <c>N</c> in the range -32768 to 32767
+ (inclusive), the value is added to the socket's count of data
+ messages sent to the controlling process. A socket's default
+ message count is 0. If a negative value is specified and its
+ magnitude is equal to or greater than the socket's current
+ message count, the socket's message count is set to 0. Once
+ the socket's message count reaches 0, either due to sending
+ received data messages to the process or by being explicitly set,
+ the process is then notified by a special message, specific to
+ the type of socket, that the socket has entered passive
+ mode. Once the socket enters passive mode, to receive more
+ messages <c>setopts/2</c> must be called again to set the
+ socket back into an active mode.</p>
+ <p>When using <c>{active, once}</c> or <c>{active, N}</c>, the
+ socket changes behaviour automatically when data is received.
+ This can sometimes be confusing in combination with
+ connection-oriented sockets (i.e. <c>gen_tcp</c>) as a socket
+ with <c>{active, false}</c> behaviour reports closing
differently than a socket with <c>{active, true}</c>
behaviour. To make programming easier, a socket where
the peer closed and this was detected while in
<c>{active, false}</c> mode, will still generate the
message
- <c>{tcp_closed,Socket}</c> when set to <c>{active, once}</c> or <c>{active, true}</c> mode. It is therefore
+ <c>{tcp_closed,Socket}</c> when set to <c>{active, once}</c>,
+ <c>{active, true}</c> or <c>{active, N}</c> mode. It is therefore
safe to assume that the message
<c>{tcp_closed,Socket}</c>, possibly followed by socket
port termination (depending on the <c>exit_on_close</c>
option) will eventually appear when a socket changes
back and forth between <c>{active, true}</c> and
- <c>{active, false}</c> mode. However,
+ <c>{active, false}</c> mode. However,
<em>when</em> peer closing is detected is all up to the
underlying TCP/IP stack and protocol.</p>
- <p>Note that <c>{active,true}</c> mode provides no flow
+ <p>Note that <c>{active, true}</c> mode provides no flow
control; a fast sender could easily overflow the
- receiver with incoming messages. Use active mode only if
+ receiver with incoming messages. The same is true of
+ <c>{active, N}</c> mode while the message count is greater
+ than zero. Use active mode only if
your high-level protocol provides its own flow control
(for instance, acknowledging received messages) or the
- amount of data exchanged is small. <c>{active,false}</c>
- mode or use of the <c>{active, once}</c> mode provides
- flow control; the other side will not be able send
+ amount of data exchanged is small. <c>{active, false}</c>
+ mode, use of the <c>{active, once}</c> mode or <c>{active, N}</c>
+ mode with values of <c>N</c> appropriate for the application
+ provides flow control; the other side will not be able send
faster than the receiver can read.</p>
</item>
@@ -594,15 +613,20 @@ fe80::204:acff:fe17:bf38
<marker id="option-buffer"></marker>
</item>
- <tag><c>{buffer, Size}</c></tag>
+ <tag><c>{buffer, Size}</c></tag>
<item>
- <p>Determines the size of the user-level software buffer used by
- the driver. Not to be confused with <c>sndbuf</c>
- and <c>recbuf</c> options which correspond to
- the kernel socket buffers. It is recommended
- to have <c>val(buffer) &gt;= max(val(sndbuf),val(recbuf))</c>.
- In fact, the <c>val(buffer)</c> is automatically set to
- the above maximum when <c>sndbuf</c> or <c>recbuf</c> values are set.</p>
+ <p>The size of the user-level software buffer used by
+ the driver. Not to be confused with <c>sndbuf</c>
+ and <c>recbuf</c> options which correspond to
+ the kernel socket buffers. It is recommended
+ to have <c>val(buffer) &gt;= max(val(sndbuf),val(recbuf))</c> to
+ avoid performance issues due to unnecessary copying.
+ In fact, the <c>val(buffer)</c> is automatically set to
+ the above maximum when <c>sndbuf</c> or <c>recbuf</c> values are set.
+ However, since the actual sizes set for <c>sndbuf</c> and <c>recbuf</c>
+ usually becomes larger, you are encouraged to use
+ <seealso marker="inet#getopts/2"><c>inet:getopts/2</c></seealso>
+ to analyze the behavior of your operating system.</p>
</item>
<tag><c>{delay_send, Boolean}</c></tag>
@@ -979,8 +1003,12 @@ setcap cap_sys_admin,cap_sys_ptrace,cap_dac_read_search+epi beam.smp
</item>
<tag><c>{recbuf, Size}</c></tag>
<item>
- <p>Gives the size of the receive buffer to use for
- the socket.</p>
+ <p>The minimum size of the receive buffer to use for
+ the socket. You are encouraged to use
+ <seealso marker="inet#getopts/2"><c>inet:getopts/2</c></seealso>,
+ to retrieve the actual size set by your operating system.
+
+ </p>
</item>
<tag><c>{reuseaddr, Boolean}</c></tag>
<item>
@@ -1011,20 +1039,24 @@ setcap cap_sys_admin,cap_sys_ptrace,cap_dac_read_search+epi beam.smp
<tag><c>{sndbuf, Size}</c></tag>
<item>
- <p>Gives the size of the send buffer to use for the socket.</p>
+ <p>The minimum size of the send buffer to use for the socket.
+ You are encouraged to use
+ <seealso marker="inet#getopts/2"><c>inet:getopts/2</c></seealso>,
+ to retrieve the actual size set by your operating system.
+ </p>
</item>
<tag><c>{priority, Integer}</c></tag>
<item>
- <p>Sets the SO_PRIORITY socket level option on platforms where
- this is implemented. The behaviour and allowed range varies on
- different systems. The option is ignored on platforms where the
+ <p>Sets the SO_PRIORITY socket level option on platforms where
+ this is implemented. The behaviour and allowed range varies on
+ different systems. The option is ignored on platforms where the
option is not implemented. Use with caution.</p>
</item>
<tag><c>{tos, Integer}</c></tag>
<item>
- <p>Sets IP_TOS IP level options on platforms where this is
- implemented. The behaviour and allowed range varies on different
- systems. The option is ignored on platforms where the option is
+ <p>Sets IP_TOS IP level options on platforms where this is
+ implemented. The behaviour and allowed range varies on different
+ systems. The option is ignored on platforms where the option is
not implemented. Use with caution.</p>
</item>
</taglist>
diff --git a/lib/kernel/doc/src/inet_res.xml b/lib/kernel/doc/src/inet_res.xml
index bf73ccf13d..7880ccda05 100644
--- a/lib/kernel/doc/src/inet_res.xml
+++ b/lib/kernel/doc/src/inet_res.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2009</year><year>2011</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/init_stub.xml b/lib/kernel/doc/src/init_stub.xml
index e8645458e4..5c57f8850e 100644
--- a/lib/kernel/doc/src/init_stub.xml
+++ b/lib/kernel/doc/src/init_stub.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/kernel_app.xml b/lib/kernel/doc/src/kernel_app.xml
index faa8f86dbd..96e3651140 100644
--- a/lib/kernel/doc/src/kernel_app.xml
+++ b/lib/kernel/doc/src/kernel_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,7 +35,7 @@
Erlang/OTP consists of Kernel and STDLIB. The Kernel application
contains the following services:</p>
<list type="bulleted">
- <item>application controller, see <c>application(3)</c></item>
+ <item>application controller, see <seealso marker="application">application(3)</seealso></item>
<item><c>code</c></item>
<item><c>disk_log</c></item>
<item><c>dist_ac</c>, distributed application controller</item>
@@ -66,8 +66,8 @@
<section>
<title>Configuration</title>
<p>The following configuration parameters are defined for the Kernel
- application. See <c>app(3)</c> for more information about
- configuration parameters.</p>
+ application. See <seealso marker="app">app(4)</seealso> for more
+ information about configuration parameters.</p>
<taglist>
<tag><c>browser_cmd = string() | {M,F,A}</c></tag>
<item>
@@ -93,7 +93,8 @@
<item><c>Time = integer()>0</c></item>
<item><c>Nodes = [node() | {node(),...,node()}]</c></item>
</list>
- <p>The parameter is described in <c>application(3)</c>, function
+ <p>The parameter is described in
+ <seealso marker="application">application(3)</seealso>, function
<c>load/2</c>.</p>
</item>
<tag><c>dist_auto_connect = Value</c></tag>
@@ -105,11 +106,13 @@
<taglist>
<tag><c>never</c></tag>
<item>Connections are never automatically established, they
- must be explicitly connected. See <c>net_kernel(3)</c>.</item>
+ must be explicitly connected. See
+ <seealso marker="net_kernel">net_kernel(3)</seealso>.</item>
<tag><c>once</c></tag>
<item>Connections will be established automatically, but only
once per node. If a node goes down, it must thereafter be
- explicitly connected. See <c>net_kernel(3)</c>.</item>
+ explicitly connected. See
+ <seealso marker="net_kernel">net_kernel(3)</seealso>.</item>
</taglist>
</item>
<tag><c>permissions = [Perm]</c></tag>
@@ -121,7 +124,8 @@
<item><c>ApplName = atom()</c></item>
<item><c>Bool = boolean()</c></item>
</list>
- <p>Permissions are described in <c>application(3)</c>, function
+ <p>Permissions are described in
+ <seealso marker="application">application(3)</seealso>, function
<c>permit/2</c>.</p>
</item>
<tag><c>error_logger = Value</c></tag>
@@ -149,7 +153,8 @@
</item>
<tag><c>global_groups = [GroupTuple]</c></tag>
<item>
- <p>Defines global groups, see <c>global_group(3)</c>.</p>
+ <p>Defines global groups, see
+ <seealso marker="global_group">global_group(3)</seealso>.</p>
<list type="bulleted">
<item><c>GroupTuple = {GroupName, [Node]} | {GroupName, PublishType, [Node]}</c></item>
<item><c>GroupName = atom()</c></item>
@@ -160,18 +165,19 @@
<tag><c>inet_default_connect_options = [{Opt, Val}]</c></tag>
<item>
<p>Specifies default options for <c>connect</c> sockets,
- see <c>inet(3)</c>.</p>
+ see <seealso marker="inet">inet(3)</seealso>.</p>
</item>
<tag><c>inet_default_listen_options = [{Opt, Val}]</c></tag>
<item>
<p>Specifies default options for <c>listen</c> (and
- <c>accept</c>) sockets, see <c>inet(3)</c>.</p>
+ <c>accept</c>) sockets, see <seealso marker="inet">inet(3)</seealso>.</p>
</item>
<tag><c>{inet_dist_use_interface, ip_address()}</c></tag>
<item>
<p>If the host of an Erlang node has several network interfaces,
this parameter specifies which one to listen on. See
- <c>inet(3)</c> for the type definition of <c>ip_address()</c>.</p>
+ <seealso marker="inet">inet(3)</seealso> for the type definition
+ of <c>ip_address()</c>.</p>
</item>
<tag><c>{inet_dist_listen_min, First}</c></tag>
<item>
@@ -182,6 +188,18 @@
<p>Define the <c>First..Last</c> port range for the listener
socket of a distributed Erlang node.</p>
</item>
+ <tag><c>{inet_dist_listen_options, Opts}</c></tag>
+ <item>
+ <p>Define a list of extra socket options to be used when opening the
+ listening socket for a distributed Erlang node.
+ See <seealso marker="gen_tcp#listen/2">gen_tcp:listen/2</seealso></p>
+ </item>
+ <tag><c>{inet_dist_connect_options, Opts}</c></tag>
+ <item>
+ <p>Define a list of extra socket options to be used when connecting to
+ other distributed Erlang nodes.
+ See <seealso marker="gen_tcp#connect/4">gen_tcp:connect/4</seealso></p>
+ </item>
<tag><c>inet_parse_error_log = silent</c></tag>
<item>
<p>If this configuration parameter is set, no
@@ -276,7 +294,8 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_boot_server = true | false</c></tag>
<item>
<p>Starts the <c>boot_server</c> if the parameter is <c>true</c>
- (see <c>erl_boot_server(3)</c>). This parameter should be
+ (see <seealso marker="erl_boot_server">erl_boot_server(3)</seealso>).
+ This parameter should be
set to <c>true</c> in an embedded system which uses this
service.</p>
<p>The default value is <c>false</c>.</p>
@@ -296,13 +315,15 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_disk_log = true | false</c></tag>
<item>
<p>Starts the <c>disk_log_server</c> if the parameter is
- <c>true</c> (see <c>disk_log(3)</c>). This parameter should be
+ <c>true</c> (see <seealso marker="disk_log">disk_log(3)</seealso>).
+ This parameter should be
set to true in an embedded system which uses this service.</p>
<p>The default value is <c>false</c>.</p>
</item>
<tag><c>start_pg2 = true | false</c></tag>
<item>
- <p>Starts the <c>pg2</c> server (see <c>pg2(3)</c>) if
+ <p>Starts the <c>pg2</c> server (see
+ <seealso marker="pg2">pg2(3)</seealso>) if
the parameter is <c>true</c>. This parameter should be set to
<c>true</c> in an embedded system which uses this service.</p>
<p>The default value is <c>false</c>.</p>
@@ -310,7 +331,8 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_timer = true | false</c></tag>
<item>
<p>Starts the <c>timer_server</c> if the parameter is
- <c>true</c> (see <c>timer(3)</c>). This parameter should be
+ <c>true</c> (see <seealso marker="stdlib:timer">timer(3)</seealso>).
+ This parameter should be
set to <c>true</c> in an embedded system which uses this
service.</p>
<p>The default value is <c>false</c>.</p>
@@ -351,6 +373,7 @@ MaxT = TickTime + TickTime / 4</code>
<seealso marker="pg2">pg2(3)</seealso>,
<seealso marker="rpc">rpc(3)</seealso>,
<seealso marker="seq_trace">seq_trace(3)</seealso>,
+ <seealso marker="stdlib:timer">timer(3)</seealso>,
<seealso marker="user">user(3)</seealso></p>
</section>
</appref>
diff --git a/lib/kernel/doc/src/net_adm.xml b/lib/kernel/doc/src/net_adm.xml
index f2aac9282c..3009b1913d 100644
--- a/lib/kernel/doc/src/net_adm.xml
+++ b/lib/kernel/doc/src/net_adm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/net_kernel.xml b/lib/kernel/doc/src/net_kernel.xml
index e54a427ff0..f5103136a1 100644
--- a/lib/kernel/doc/src/net_kernel.xml
+++ b/lib/kernel/doc/src/net_kernel.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml
index b2e89ea850..6f7f18a8e7 100644
--- a/lib/kernel/doc/src/notes.xml
+++ b/lib/kernel/doc/src/notes.xml
@@ -30,6 +30,408 @@
</header>
<p>This document describes the changes made to the Kernel application.</p>
+<section><title>Kernel 3.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A bug causing an infinite loop in hostname resolving has
+ been corrected. To trigger this bug you would have to
+ enter an bogus search method from a configuration file
+ e.g .inetrc.</p>
+ <p>
+ Bug pinpointed by Emil Holmström</p>
+ <p>
+ Own Id: OTP-12133</p>
+ </item>
+ <item>
+ <p>
+ The standard_error process now handles the getopts I/O
+ protocol request correctly and stores its encoding in the
+ same way as standard_io.</p>
+ <p>
+ Also, io:put_chars(standard_error, [oops]) could
+ previously crash the standard_error process. This is now
+ corrected.</p>
+ <p>
+ Own Id: OTP-12424</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Configuration parameters for the Kernel application that
+ allows setting socket options for the distribution
+ sockets have been added. See the application Kernel
+ documentation; parameters 'inet_dist_listen_options' and
+ 'inet_dist_connect_options'.</p>
+ <p>
+ Own Id: OTP-12476 Aux Id: OTP-12476 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure to install .hrl files when needed</p>
+ <p>
+ Own Id: OTP-12197</p>
+ </item>
+ <item>
+ <p>
+ Removed the undocumented application environment variable
+ 'raw_files' from the kernel application. This variable
+ was checked (by call to application:get_env/2) each time
+ a raw file was to be opened in the file module.</p>
+ <p>
+ Own Id: OTP-12276</p>
+ </item>
+ <item>
+ <p>
+ A bug has been fixed when using the netns option to
+ gen_udp, which accidentally only worked if it was the
+ last option.</p>
+ <p>
+ Own Id: OTP-12314</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Updated documentation for inet buffer size options.</p>
+ <p>
+ Own Id: OTP-12296</p>
+ </item>
+ <item>
+ <p>
+ Introduce new option 'raw' in file_info and link_info
+ functions. This option allows the caller not to go
+ through the file server for information about files
+ guaranteed to be local.</p>
+ <p>
+ Own Id: OTP-12325</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 3.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Accept inet:ip_address() in net_adm:names/1</p>
+ <p>
+ Own Id: OTP-12154</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 3.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ OTP-11850 fixed filelib:wildcard/1 to work with broken
+ symlinks. This correction, however, introduced problems
+ since symlinks were no longer followed for functions like
+ filelib:ensure_dir/1, filelib:is_dir/1,
+ filelib:file_size/1, etc. This is now corrected.</p>
+ <p>
+ Own Id: OTP-12054 Aux Id: seq12660 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ If the Config given to
+ application_controller:change_application_data included
+ other config files, it was only expanded for already
+ existing (loaded) applications. If an upgrade added a new
+ application which had config data in an included config
+ file, the new application did not get correct config
+ data.</p>
+ <p>
+ This is now changed so config data will be expanded for
+ all applications.</p>
+ <p>
+ Own Id: OTP-11864</p>
+ </item>
+ <item>
+ <p>It was allowed to re-load pre-loaded modules such as
+ <c>erlang</c>, but that could cause strange and unwanted
+ things to happen, such as call <c>apply/3</c> to loop.
+ Pre-loaded modules are now sticky by default. (Thanks to
+ Loïc Hoguin for reporting this bug.)</p>
+ <p><c>code:add_path("/ending/in/slash/")</c> removes the
+ trailing slash, adding <c>/ending/in/slash</c> to the
+ code path. However,
+ <c>code:del_path("/ending/in/slash/")</c> would fail to
+ remove the path since it did not remove the trailing
+ slash. This has been fixed.</p>
+ <p>
+ Own Id: OTP-11913</p>
+ </item>
+ <item>
+ <p>
+ Fix erts_debug:size/1 to handle Map sizes</p>
+ <p>
+ Own Id: OTP-11923</p>
+ </item>
+ <item>
+ <p>The documentation for <c>file:file_info/1</c> has been
+ removed. The function itself was removed a long time
+ ago.</p>
+ <p>
+ Own Id: OTP-11982</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a deadlock possibility in terminate application</p>
+ <p>
+ Own Id: OTP-11171</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug where sendfile would return the wrong error
+ code for a remotely closed socket if the socket was in
+ passive mode. (Thanks to Vincent Siliakus for reporting
+ the bug.)</p>
+ <p>
+ Own Id: OTP-11614</p>
+ </item>
+ <item>
+ <p>
+ The new option <c>persistent</c> is added to
+ <c>application:set_env/4</c> and
+ <c>application:unset_env/3</c>. An environment key set
+ with the <c>persistent</c> option will not be overridden
+ by the ones configured in the application resource file
+ on load. This means persistent values will stick after
+ the application is loaded and also on application reload.
+ (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11708</p>
+ </item>
+ <item>
+ <p>
+ The spec for file:set_cwd/1 is modified to also accept
+ binaries as arguments. This has always been allowed in
+ the code, but it was not reflected in the spec since
+ binaries are mostly used for raw file names. Raw file
+ names are names that are not encoded according to
+ file:native_name_encoding(), and these are not allowed in
+ file:set_cwd/1. The spec is now, however, more allowing
+ in order to avoid unnecessary dialyzer warnings. Raw file
+ names will still fail in runtime with reason
+ 'no_translation'. (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11787</p>
+ </item>
+ </list>
+ </section>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ heart:set_cmd/1 is updated to allow unicode code points >
+ 255 in the given heart command</p>
+ <p>
+ Own Id: OTP-10843</p>
+ </item>
+ <item>
+ <p> Dialyzer's <c>unmatched_return</c> warnings have been
+ corrected. </p>
+ <p>
+ Own Id: OTP-10908</p>
+ </item>
+ <item>
+ <p>
+ Make erlang:open_port/2 spawn and spawn_executable handle
+ unicode.</p>
+ <p>
+ Own Id: OTP-11105</p>
+ </item>
+ <item>
+ <p>
+ Erlang/OTP has been ported to the realtime operating
+ system OSE. The port supports both smp and non-smp
+ emulator. For details around the port and how to started
+ see the User's Guide in the <seealso
+ marker="ose:ose_intro">ose</seealso> application. </p>
+ <p>
+ Note that not all parts of Erlang/OTP has been ported. </p>
+ <p>
+ Notable things that work are: non-smp and smp emulators,
+ OSE signal interaction, crypto, asn1, run_erl/to_erl,
+ tcp, epmd, distribution and most if not all non-os
+ specific functionality of Erlang.</p>
+ <p>
+ Notable things that does not work are: udp/sctp, os_mon,
+ erl_interface, binding of schedulers.</p>
+ <p>
+ Own Id: OTP-11334</p>
+ </item>
+ <item>
+ <p>
+ Add the {active,N} socket option for TCP, UDP, and SCTP,
+ where N is an integer in the range -32768..32767, to
+ allow a caller to specify the number of data messages to
+ be delivered to the controlling process. Once the
+ socket's delivered message count either reaches 0 or is
+ explicitly set to 0 with inet:setopts/2 or by including
+ {active,0} as an option when the socket is created, the
+ socket transitions to passive ({active, false}) mode and
+ the socket's controlling process receives a message to
+ inform it of the transition. TCP sockets receive
+ {tcp_passive,Socket}, UDP sockets receive
+ {udp_passive,Socket} and SCTP sockets receive
+ {sctp_passive,Socket}. </p>
+ <p>
+ The socket's delivered message counter defaults to 0, but
+ it can be set using {active,N} via any gen_tcp, gen_udp,
+ or gen_sctp function that takes socket options as
+ arguments, or via inet:setopts/2. New N values are added
+ to the socket's current counter value, and negative
+ numbers can be used to reduce the counter value.
+ Specifying a number that would cause the socket's counter
+ value to go above 32767 causes an einval error. If a
+ negative number is specified such that the counter value
+ would become negative, the socket's counter value is set
+ to 0 and the socket transitions to passive mode. If the
+ counter value is already 0 and inet:setopts(Socket,
+ [{active,0}]) is specified, the counter value remains at
+ 0 but the appropriate passive mode transition message is
+ generated for the socket.</p>
+ <p>
+ Thanks to Steve Vinoski</p>
+ <p>
+ Own Id: OTP-11368</p>
+ </item>
+ <item>
+ <p>
+ A call to either the <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF may trigger garbage
+ collection of another processes than the process calling
+ the BIF. The previous implementations performed these
+ kinds of garbage collections without considering the
+ internal state of the process being garbage collected. In
+ order to be able to more easily and more efficiently
+ implement yielding native code, these types of garbage
+ collections have been rewritten. A garbage collection
+ like this is now triggered by an asynchronous request
+ signal, the actual garbage collection is performed by the
+ process being garbage collected itself, and finalized by
+ a reply signal to the process issuing the request. Using
+ this approach processes can disable garbage collection
+ and yield without having to set up the heap in a state
+ that can be garbage collected.</p>
+ <p>
+ The <seealso
+ marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>,
+ and <seealso
+ marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso>
+ BIFs have been introduced. Both taking an option list as
+ last argument. Using these, one can issue asynchronous
+ requests.</p>
+ <p>
+ <c>code:purge/1</c> and <c>code:soft_purge/1</c> have
+ been rewritten to utilize asynchronous
+ <c>check_process_code</c> requests in order to
+ parallelize work.</p>
+ <p>
+ Characteristics impact: A call to the
+ <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF will normally take longer
+ time to complete while the system as a whole wont be as
+ much negatively effected by the operation as before. A
+ call to <c>code:purge/1</c> and <c>code:soft_purge/1</c>
+ may complete faster or slower depending on the state of
+ the system while the system as a whole wont be as much
+ negatively effected by the operation as before.</p>
+ <p>
+ Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p>
+ </item>
+ <item>
+ <p>
+ Add sync option to file:open/2.</p>
+ <p>
+ The sync option adds the POSIX O_SYNC flag to the open
+ system call on platforms that support the flag or its
+ equivalent, e.g., FILE_FLAG_WRITE_THROUGH on Windows. For
+ platforms that don't support it, file:open/2 returns
+ {error, enotsup} if the sync option is passed in. Thank
+ to Steve Vinoski and Joseph Blomstedt</p>
+ <p>
+ Own Id: OTP-11498</p>
+ </item>
+ <item>
+ <p> The contract of <c>inet:ntoa/1</c> has been
+ corrected. </p> <p> Thanks to Max Treskin. </p>
+ <p>
+ Own Id: OTP-11730</p>
+ </item>
+ </list>
+ </section>
+</section>
+
+<section><title>Kernel 2.16.4.1</title>
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ When using gen_tcp:connect and the <c>fd</c> option with
+ <c>port</c> and/or <c>ip</c>, the <c>port</c> and
+ <c>ip</c> options were ignored. This has been fixed so
+ that if <c>port</c> and/or <c>ip</c> is specified
+ together with <c>fd</c> a bind is requested for that
+ <c>fd</c>. If <c>port</c> and/or <c>ip</c> is not
+ specified bind will not be called.</p>
+ <p>
+ Own Id: OTP-12061</p>
+ </item>
+ </list>
+ </section>
+</section>
+
<section><title>Kernel 2.16.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/kernel/doc/src/notes_history.xml b/lib/kernel/doc/src/notes_history.xml
index 2f6ceb9d42..58d5109774 100644
--- a/lib/kernel/doc/src/notes_history.xml
+++ b/lib/kernel/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml
index 9122267c40..2b57e75023 100644
--- a/lib/kernel/doc/src/os.xml
+++ b/lib/kernel/doc/src/os.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/part_notes.xml b/lib/kernel/doc/src/part_notes.xml
index ff43b9e007..d196878f19 100644
--- a/lib/kernel/doc/src/part_notes.xml
+++ b/lib/kernel/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/part_notes_history.xml b/lib/kernel/doc/src/part_notes_history.xml
index a73cc911b8..ec4998408e 100644
--- a/lib/kernel/doc/src/part_notes_history.xml
+++ b/lib/kernel/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/pg2.xml b/lib/kernel/doc/src/pg2.xml
index d26ff0fc6b..5eb63c1ef6 100644
--- a/lib/kernel/doc/src/pg2.xml
+++ b/lib/kernel/doc/src/pg2.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/ref_man.xml b/lib/kernel/doc/src/ref_man.xml
index 96604a2fa2..bd25d1e78d 100644
--- a/lib/kernel/doc/src/ref_man.xml
+++ b/lib/kernel/doc/src/ref_man.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Kernel Reference Manual</title>
@@ -65,4 +65,3 @@
<xi:include href="app.xml"/>
<xi:include href="config.xml"/>
</application>
-
diff --git a/lib/kernel/doc/src/ref_man.xml.src b/lib/kernel/doc/src/ref_man.xml.src
new file mode 100644
index 0000000000..bd25d1e78d
--- /dev/null
+++ b/lib/kernel/doc/src/ref_man.xml.src
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>1996</year><year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Kernel Reference Manual</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <description>
+ <p>The <em>Kernel</em> application has all the code necessary to run
+ the Erlang runtime system itself: file servers and code servers
+ and so on.</p>
+ </description>
+ <xi:include href="kernel_app.xml"/>
+ <xi:include href="application.xml"/>
+ <xi:include href="auth.xml"/>
+ <xi:include href="code.xml"/>
+ <xi:include href="disk_log.xml"/>
+ <xi:include href="erl_boot_server.xml"/>
+ <xi:include href="erl_ddll.xml"/>
+ <xi:include href="erl_prim_loader_stub.xml"/>
+ <xi:include href="erlang_stub.xml"/>
+ <xi:include href="error_handler.xml"/>
+ <xi:include href="error_logger.xml"/>
+ <xi:include href="file.xml"/>
+ <xi:include href="gen_tcp.xml"/>
+ <xi:include href="gen_udp.xml"/>
+ <xi:include href="gen_sctp.xml"/>
+ <xi:include href="global.xml"/>
+ <xi:include href="global_group.xml"/>
+ <xi:include href="heart.xml"/>
+ <xi:include href="inet.xml"/>
+ <xi:include href="inet_res.xml"/>
+ <xi:include href="init_stub.xml"/>
+ <xi:include href="net_adm.xml"/>
+ <xi:include href="net_kernel.xml"/>
+ <xi:include href="os.xml"/>
+ <xi:include href="pg2.xml"/>
+ <xi:include href="rpc.xml"/>
+ <xi:include href="seq_trace.xml"/>
+ <xi:include href="user.xml"/>
+ <xi:include href="wrap_log_reader.xml"/>
+ <xi:include href="zlib_stub.xml"/>
+ <xi:include href="app.xml"/>
+ <xi:include href="config.xml"/>
+</application>
diff --git a/lib/kernel/doc/src/rpc.xml b/lib/kernel/doc/src/rpc.xml
index 67fdccb734..e6c896f18d 100644
--- a/lib/kernel/doc/src/rpc.xml
+++ b/lib/kernel/doc/src/rpc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/seq_trace.xml b/lib/kernel/doc/src/seq_trace.xml
index 1ab955bd8a..45df06e0b4 100644
--- a/lib/kernel/doc/src/seq_trace.xml
+++ b/lib/kernel/doc/src/seq_trace.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/specs.xml b/lib/kernel/doc/src/specs.xml
index 813bb06e1f..29d52f23bb 100644
--- a/lib/kernel/doc/src/specs.xml
+++ b/lib/kernel/doc/src/specs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<specs xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../specs/specs_application.xml"/>
<xi:include href="../specs/specs_auth.xml"/>
diff --git a/lib/kernel/doc/src/user.xml b/lib/kernel/doc/src/user.xml
index 4d0f044321..df6dff9882 100644
--- a/lib/kernel/doc/src/user.xml
+++ b/lib/kernel/doc/src/user.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/wrap_log_reader.xml b/lib/kernel/doc/src/wrap_log_reader.xml
index 6cf480b532..5227b4d01c 100644
--- a/lib/kernel/doc/src/wrap_log_reader.xml
+++ b/lib/kernel/doc/src/wrap_log_reader.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/doc/src/zlib_stub.xml b/lib/kernel/doc/src/zlib_stub.xml
index fa14262181..5f5bfd56db 100644
--- a/lib/kernel/doc/src/zlib_stub.xml
+++ b/lib/kernel/doc/src/zlib_stub.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/kernel/include/dist.hrl b/lib/kernel/include/dist.hrl
index e32c112e63..77556d1303 100644
--- a/lib/kernel/include/dist.hrl
+++ b/lib/kernel/include/dist.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,3 +37,4 @@
-define(DFLAG_DIST_HDR_ATOM_CACHE,16#2000).
-define(DFLAG_SMALL_ATOM_TAGS, 16#4000).
-define(DFLAG_UTF8_ATOMS, 16#10000).
+-define(DFLAG_MAP_TAG, 16#20000).
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
index cb3c0a49f4..c7c70ad257 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
@@ -122,6 +122,7 @@ HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \
../include/net_address.hrl
INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \
+ erl_epmd.hrl hipe_ext_format.hrl \
inet_dns.hrl inet_res.hrl \
inet_boot.hrl inet_config.hrl inet_int.hrl \
inet_dns_record_adts.hrl
diff --git a/lib/kernel/src/application.erl b/lib/kernel/src/application.erl
index 4e8ba1b78a..c4bef5188a 100644
--- a/lib/kernel/src/application.erl
+++ b/lib/kernel/src/application.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,6 +30,8 @@
-export([get_application/0, get_application/1, info/0]).
-export([start_type/0]).
+-export_type([start_type/0]).
+
%%%-----------------------------------------------------------------
-type start_type() :: 'normal'
@@ -58,8 +60,7 @@
%%------------------------------------------------------------------
--callback start(StartType :: normal | {takeover, node()} | {failover, node()},
- StartArgs :: term()) ->
+-callback start(StartType :: start_type(), StartArgs :: term()) ->
{'ok', pid()} | {'ok', pid(), State :: term()} | {'error', Reason :: term()}.
-callback stop(State :: term()) ->
@@ -132,7 +133,7 @@ ensure_all_started(Application, Type) ->
{ok, Started} ->
{ok, lists:reverse(Started)};
{error, Reason, Started} ->
- [stop(App) || App <- Started],
+ _ = [stop(App) || App <- Started],
{error, Reason}
end.
@@ -285,16 +286,18 @@ info() ->
set_env(Application, Key, Val) ->
application_controller:set_env(Application, Key, Val).
--spec set_env(Application, Par, Val, Timeout) -> 'ok' when
+-spec set_env(Application, Par, Val, Opts) -> 'ok' when
Application :: atom(),
Par :: atom(),
Val :: term(),
- Timeout :: timeout().
+ Opts :: [{timeout, timeout()} | {persistent, boolean()}].
set_env(Application, Key, Val, infinity) ->
- application_controller:set_env(Application, Key, Val, infinity);
+ set_env(Application, Key, Val, [{timeout, infinity}]);
set_env(Application, Key, Val, Timeout) when is_integer(Timeout), Timeout>=0 ->
- application_controller:set_env(Application, Key, Val, Timeout).
+ set_env(Application, Key, Val, [{timeout, Timeout}]);
+set_env(Application, Key, Val, Opts) when is_list(Opts) ->
+ application_controller:set_env(Application, Key, Val, Opts).
-spec unset_env(Application, Par) -> 'ok' when
Application :: atom(),
@@ -303,15 +306,17 @@ set_env(Application, Key, Val, Timeout) when is_integer(Timeout), Timeout>=0 ->
unset_env(Application, Key) ->
application_controller:unset_env(Application, Key).
--spec unset_env(Application, Par, Timeout) -> 'ok' when
+-spec unset_env(Application, Par, Opts) -> 'ok' when
Application :: atom(),
Par :: atom(),
- Timeout :: timeout().
+ Opts :: [{timeout, timeout()} | {persistent, boolean()}].
unset_env(Application, Key, infinity) ->
- application_controller:unset_env(Application, Key, infinity);
+ unset_env(Application, Key, [{timeout, infinity}]);
unset_env(Application, Key, Timeout) when is_integer(Timeout), Timeout>=0 ->
- application_controller:unset_env(Application, Key, Timeout).
+ unset_env(Application, Key, [{timeout, Timeout}]);
+unset_env(Application, Key, Opts) when is_list(Opts) ->
+ application_controller:unset_env(Application, Key, Opts).
-spec get_env(Par) -> 'undefined' | {'ok', Val} when
Par :: atom(),
diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index 9ed2c7a7d9..6635885aaf 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -461,14 +461,16 @@ permit_application(ApplName, Flag) ->
set_env(AppName, Key, Val) ->
- gen_server:call(?AC, {set_env, AppName, Key, Val}).
-set_env(AppName, Key, Val, Timeout) ->
- gen_server:call(?AC, {set_env, AppName, Key, Val}, Timeout).
+ gen_server:call(?AC, {set_env, AppName, Key, Val, []}).
+set_env(AppName, Key, Val, Opts) ->
+ Timeout = proplists:get_value(timeout, Opts, 5000),
+ gen_server:call(?AC, {set_env, AppName, Key, Val, Opts}, Timeout).
unset_env(AppName, Key) ->
- gen_server:call(?AC, {unset_env, AppName, Key}).
-unset_env(AppName, Key, Timeout) ->
- gen_server:call(?AC, {unset_env, AppName, Key}, Timeout).
+ gen_server:call(?AC, {unset_env, AppName, Key, []}).
+unset_env(AppName, Key, Opts) ->
+ Timeout = proplists:get_value(timeout, Opts, 5000),
+ gen_server:call(?AC, {unset_env, AppName, Key, Opts}, Timeout).
%%%-----------------------------------------------------------------
%%% call-back functions from gen_server
@@ -488,7 +490,7 @@ init(Init, Kernel) ->
%% called during start-up of any app.
case check_conf_data(ConfData) of
ok ->
- ets:new(ac_tab, [set, public, named_table]),
+ _ = ets:new(ac_tab, [set, public, named_table]),
S = #state{conf_data = ConfData},
{ok, KAppl} = make_appl(Kernel),
case catch load(S, KAppl) of
@@ -609,8 +611,8 @@ check_para([Else | _ParaList], AppName) ->
| {'change_application_data', _, _}
| {'permit_application', atom() | {'application',atom(),_},_}
| {'start_application', _, _}
- | {'unset_env', _, _}
- | {'set_env', _, _, _}.
+ | {'unset_env', _, _, _}
+ | {'set_env', _, _, _, _}.
-spec handle_call(calls(), {pid(), term()}, state()) ->
{'noreply', state()} | {'reply', term(), state()}.
@@ -827,12 +829,12 @@ handle_call({change_application_data, Applications, Config}, _From, S) ->
{reply, Error, S};
{'EXIT', R} ->
{reply, {error, R}, S};
- NewAppls ->
+ {NewAppls, NewConfig} ->
lists:foreach(fun(Appl) ->
ets:insert(ac_tab, {{loaded, Appl#appl.name},
Appl})
end, NewAppls),
- {reply, ok, S#state{conf_data = Config}}
+ {reply, ok, S#state{conf_data = NewConfig}}
end;
handle_call(prep_config_change, _From, S) ->
@@ -858,13 +860,25 @@ handle_call(which_applications, _From, S) ->
end, S#state.running),
{reply, Reply, S};
-handle_call({set_env, AppName, Key, Val}, _From, S) ->
+handle_call({set_env, AppName, Key, Val, Opts}, _From, S) ->
ets:insert(ac_tab, {{env, AppName, Key}, Val}),
- {reply, ok, S};
+ case proplists:get_value(persistent, Opts, false) of
+ true ->
+ Fun = fun(Env) -> lists:keystore(Key, 1, Env, {Key, Val}) end,
+ {reply, ok, S#state{conf_data = change_app_env(S#state.conf_data, AppName, Fun)}};
+ false ->
+ {reply, ok, S}
+ end;
-handle_call({unset_env, AppName, Key}, _From, S) ->
+handle_call({unset_env, AppName, Key, Opts}, _From, S) ->
ets:delete(ac_tab, {env, AppName, Key}),
- {reply, ok, S};
+ case proplists:get_value(persistent, Opts, false) of
+ true ->
+ Fun = fun(Env) -> lists:keydelete(Key, 1, Env) end,
+ {reply, ok, S#state{conf_data = change_app_env(S#state.conf_data, AppName, Fun)}};
+ false ->
+ {reply, ok, S}
+ end;
handle_call({control_application, AppName}, {Pid, _Tag}, S) ->
Control = S#state.control,
@@ -1536,18 +1550,19 @@ do_change_apps(Applications, Config, OldAppls) ->
end,
Errors),
- map(fun(Appl) ->
- AppName = Appl#appl.name,
- case is_loaded_app(AppName, Applications) of
- {true, Application} ->
- do_change_appl(make_appl(Application),
- Appl, SysConfig);
+ {map(fun(Appl) ->
+ AppName = Appl#appl.name,
+ case is_loaded_app(AppName, Applications) of
+ {true, Application} ->
+ do_change_appl(make_appl(Application),
+ Appl, SysConfig);
- %% ignored removed apps - handled elsewhere
- false ->
- Appl
- end
- end, OldAppls).
+ %% ignored removed apps - handled elsewhere
+ false ->
+ Appl
+ end
+ end, OldAppls),
+ SysConfig}.
is_loaded_app(AppName, [{application, AppName, App} | _]) ->
{true, {application, AppName, App}};
@@ -1600,7 +1615,6 @@ conv([Key, Val | T]) ->
[{make_term(Key), make_term(Val)} | conv(T)];
conv(_) -> [].
-%%% Fix some day: eliminate the duplicated code here
make_term(Str) ->
case erl_scan:string(Str) of
{ok, Tokens, _} ->
@@ -1608,16 +1622,17 @@ make_term(Str) ->
{ok, Term} ->
Term;
{error, {_,M,Reason}} ->
- error_logger:format("application_controller: ~ts: ~ts~n",
- [M:format_error(Reason), Str]),
- throw({error, {bad_environment_value, Str}})
+ handle_make_term_error(M, Reason, Str)
end;
{error, {_,M,Reason}, _} ->
- error_logger:format("application_controller: ~ts: ~ts~n",
- [M:format_error(Reason), Str]),
- throw({error, {bad_environment_value, Str}})
+ handle_make_term_error(M, Reason, Str)
end.
+handle_make_term_error(Mod, Reason, Str) ->
+ error_logger:format("application_controller: ~ts: ~ts~n",
+ [Mod:format_error(Reason), Str]),
+ throw({error, {bad_environment_value, Str}}).
+
get_env_i(Name, #state{conf_data = ConfData}) when is_list(ConfData) ->
case lists:keyfind(Name, 1, ConfData) of
{_Name, Env} -> Env;
@@ -1640,6 +1655,16 @@ merge_env([{App, AppEnv1} | T], Env2, Res) ->
merge_env([], Env2, Res) ->
Env2 ++ Res.
+%% Changes the environment for the given application
+%% If there is no application, an empty one is created
+change_app_env(Env, App, Fun) ->
+ case get_env_key(App, Env) of
+ {value, AppEnv, RestEnv} ->
+ [{App, Fun(AppEnv)} | RestEnv];
+ _ ->
+ [{App, Fun([])} | Env]
+ end.
+
%% Merges envs for an application. Env2 overrides Env1
merge_app_env(Env1, Env2) ->
merge_app_env(Env1, Env2, []).
@@ -1949,10 +1974,10 @@ test_change_apps(Apps, Conf) ->
test_do_change_appl([], _, _) ->
ok;
test_do_change_appl([A|Apps], [], [R|Res]) ->
- do_change_appl(R, #appl{name = A}, []),
+ _ = do_change_appl(R, #appl{name = A}, []),
test_do_change_appl(Apps, [], Res);
test_do_change_appl([A|Apps], [C|Conf], [R|Res]) ->
- do_change_appl(R, #appl{name = A}, C),
+ _ = do_change_appl(R, #appl{name = A}, C),
test_do_change_appl(Apps, Conf, Res).
test_make_apps([], Res) ->
diff --git a/lib/kernel/src/application_master.erl b/lib/kernel/src/application_master.erl
index 3e636197bb..7cdbe31ab2 100644
--- a/lib/kernel/src/application_master.erl
+++ b/lib/kernel/src/application_master.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,7 +27,7 @@
-include("application_master.hrl").
--record(state, {child, appl_data, children = [], procs = 0, gleader}).
+-record(state, {child, appl_data, children = [], procs = 0, gleader, req=[]}).
%%-----------------------------------------------------------------
%% Func: start_link/1
@@ -103,9 +103,9 @@ call(AppMaster, Req) ->
%%% The reason for not using the logical structrure is that
%%% the application start function is synchronous, and
%%% that the AM is GL. This means that if AM executed the start
-%%% function, and this function uses spawn_request/1
-%%% or io, deadlock would occur. Therefore, this function is
-%%% executed by the process X. Also, AM needs three loops;
+%%% function, and this function uses io, deadlock would occur.
+%%% Therefore, this function is executed by the process X.
+%%% Also, AM needs three loops;
%%% init_loop (waiting for the start function to return)
%%% main_loop
%%% terminate_loop (waiting for the process to die)
@@ -125,7 +125,7 @@ init(Parent, Starter, ApplData, Type) ->
State = #state{appl_data = ApplData, gleader = OldGleader},
case start_it(State, Type) of
{ok, Pid} -> % apply(M,F,A) returned ok
- set_timer(ApplData#appl_data.maxT),
+ ok = set_timer(ApplData#appl_data.maxT),
unlink(Starter),
proc_lib:init_ack(Starter, {ok,self()}),
main_loop(Parent, State#state{child = Pid});
@@ -205,22 +205,25 @@ terminate_loop(Child, State) ->
%%-----------------------------------------------------------------
%% The Application Master is linked to *all* processes in the group
-%% (application).
+%% (application).
%%-----------------------------------------------------------------
handle_msg({get_child, Tag, From}, State) ->
- From ! {Tag, get_child_i(State#state.child)},
- State;
+ get_child_i(State, Tag, From);
handle_msg({stop, Tag, From}, State) ->
catch terminate(normal, State),
From ! {Tag, ok},
exit(normal);
+handle_msg({child, Ref, GrandChild, Mod}, #state{req=Reqs0}=State) ->
+ {value, {_, Tag, From}, Reqs} = lists:keytake(Ref, 1, Reqs0),
+ From ! {Tag, {GrandChild, Mod}},
+ State#state{req=Reqs};
handle_msg(_, State) ->
State.
-
-terminate(Reason, State) ->
- terminate_child(State#state.child, State),
- kill_children(State#state.children),
+terminate(Reason, State = #state{child=Child, children=Children, req=Reqs}) ->
+ _ = [From ! {Tag, error} || {_, Tag, From} <- Reqs],
+ terminate_child(Child, State),
+ kill_children(Children),
exit(Reason).
@@ -342,8 +345,8 @@ start_supervisor(Type, M, A) ->
loop_it(Parent, Child, Mod, AppState) ->
receive
- {Parent, get_child} ->
- Parent ! {self(), Child, Mod},
+ {Parent, get_child, Ref} ->
+ Parent ! {child, Ref, Child, Mod},
loop_it(Parent, Child, Mod, AppState);
{Parent, terminate} ->
NewAppState = prep_stop(Mod, AppState),
@@ -382,10 +385,15 @@ prep_stop(Mod, AppState) ->
NewAppState
end.
-get_child_i(Child) ->
- Child ! {self(), get_child},
- receive
- {Child, GrandChild, Mod} -> {GrandChild, Mod}
+get_child_i(#state{child=Child, req=Reqs}=State, Tag, From) ->
+ Ref = erlang:make_ref(),
+ case erlang:is_process_alive(Child) of
+ true ->
+ Child ! {self(), get_child, Ref},
+ State#state{req=[{Ref, Tag, From}|Reqs]};
+ false ->
+ From ! {Tag, error},
+ State
end.
terminate_child_i(Child, State) ->
@@ -418,4 +426,6 @@ kill_all_procs_1([], _, 0) -> ok;
kill_all_procs_1([], _, _) -> kill_all_procs().
set_timer(infinity) -> ok;
-set_timer(Time) -> timer:exit_after(Time, timeout).
+set_timer(Time) ->
+ {ok, _} = timer:exit_after(Time, timeout),
+ ok.
diff --git a/lib/kernel/src/auth.erl b/lib/kernel/src/auth.erl
index 7d463103e3..eda35147d3 100644
--- a/lib/kernel/src/auth.erl
+++ b/lib/kernel/src/auth.erl
@@ -324,7 +324,7 @@ read_cookie(Name, Size) ->
{ok, File} ->
case file:read(File, Size) of
{ok, List} ->
- file:close(File),
+ ok = file:close(File),
check_cookie(List, []);
{error, Reason} ->
make_error(Name, Reason)
@@ -376,7 +376,7 @@ create_cookie(Name) ->
case file:open(Name, [write, raw]) of
{ok, File} ->
R1 = file:write(File, Cookie),
- file:close(File),
+ ok = file:close(File),
R2 = file:raw_write_file_info(Name, make_info(Name)),
case {R1, R2} of
{ok, ok} ->
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index 03fba96d4b..0eda558ed5 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.erl
@@ -364,7 +364,7 @@ load_code_server_prerequisites() ->
lists,
os,
unicode],
- [M = M:module_info(module) || M <- Needed],
+ _ = [M = M:module_info(module) || M <- Needed],
ok.
do_stick_dirs() ->
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 5d74e8620b..819554ce74 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -63,7 +63,10 @@ init(Ref, Parent, [Root,Mode0]) ->
process_flag(trap_exit, true),
Db = ets:new(code, [private]),
- foreach(fun (M) -> ets:insert(Db, {M,preloaded}) end, erlang:pre_loaded()),
+ foreach(fun (M) ->
+ %% Pre-loaded modules are always sticky.
+ ets:insert(Db, [{M,preloaded},{{sticky,M},true}])
+ end, erlang:pre_loaded()),
ets:insert(Db, init:fetch_loaded()),
Mode =
@@ -153,7 +156,7 @@ loop(#state{supervisor=Supervisor}=State0) ->
{code_call, Pid, Req} ->
case handle_call(Req, {Pid, call}, State0) of
{reply, Res, State} ->
- reply(Pid, Res),
+ _ = reply(Pid, Res),
loop(State);
{noreply, State} ->
loop(State);
@@ -988,7 +991,7 @@ try_archive_subdirs(_Archive, Base, []) ->
%% the complete directory name.
%%
del_path(Name0,Path,NameDb) ->
- case catch to_list(Name0)of
+ case catch filename:join([to_list(Name0)]) of
{'EXIT',_} ->
{{error,bad_name},Path};
Name ->
@@ -1410,45 +1413,236 @@ absname_vr([[X, $:]|Name], _, _AbsBase) ->
do_purge(Mod0) ->
Mod = to_atom(Mod0),
case erlang:check_old_code(Mod) of
- false -> false;
- true -> do_purge(processes(), Mod, false)
- end.
-
-do_purge([P|Ps], Mod, Purged) ->
- case erlang:check_process_code(P, Mod) of
+ false ->
+ false;
true ->
- Ref = erlang:monitor(process, P),
- exit(P, kill),
- receive
- {'DOWN',Ref,process,_Pid,_} -> ok
+ Res = check_proc_code(erlang:processes(), Mod, true),
+ try
+ erlang:purge_module(Mod)
+ catch
+ _:_ -> ignore
end,
- do_purge(Ps, Mod, true);
- false ->
- do_purge(Ps, Mod, Purged)
- end;
-do_purge([], Mod, Purged) ->
- catch erlang:purge_module(Mod),
- Purged.
+ Res
+ end.
%% do_soft_purge(Module)
%% Purge old code only if no procs remain that run old code.
%% Return true in that case, false if procs remain (in this
%% case old code is not purged)
-do_soft_purge(Mod) ->
+do_soft_purge(Mod0) ->
+ Mod = to_atom(Mod0),
case erlang:check_old_code(Mod) of
- false -> true;
- true -> do_soft_purge(processes(), Mod)
+ false ->
+ true;
+ true ->
+ case check_proc_code(erlang:processes(), Mod, false) of
+ false ->
+ false;
+ true ->
+ try
+ erlang:purge_module(Mod)
+ catch
+ _:_ -> ignore
+ end,
+ true
+ end
end.
-do_soft_purge([P|Ps], Mod) ->
- case erlang:check_process_code(P, Mod) of
- true -> false;
- false -> do_soft_purge(Ps, Mod)
+%%
+%% check_proc_code(Pids, Mod, Hard) - Send asynchronous
+%% requests to all processes to perform a check_process_code
+%% operation. Each process will check their own state and
+%% reply with the result. If 'Hard' equals
+%% - true, processes that refer 'Mod' will be killed. If
+%% any processes were killed true is returned; otherwise,
+%% false.
+%% - false, and any processes refer 'Mod', false will
+%% returned; otherwise, true.
+%%
+%% Requests will be sent to all processes identified by
+%% Pids at once, but without allowing GC to be performed.
+%% Check process code operations that are aborted due to
+%% GC need, will be restarted allowing GC. However, only
+%% ?MAX_CPC_GC_PROCS outstanding operation allowing GC at
+%% a time will be allowed. This in order not to blow up
+%% memory wise.
+%%
+%% We also only allow ?MAX_CPC_NO_OUTSTANDING_KILLS
+%% outstanding kills. This both in order to avoid flooding
+%% our message queue with 'DOWN' messages and limiting the
+%% amount of memory used to keep references to all
+%% outstanding kills.
+%%
+
+%% We maybe should allow more than two outstanding
+%% GC requests, but for now we play it safe...
+-define(MAX_CPC_GC_PROCS, 2).
+-define(MAX_CPC_NO_OUTSTANDING_KILLS, 10).
+
+-record(cpc_static, {hard, module, tag}).
+
+-record(cpc_kill, {outstanding = [],
+ no_outstanding = 0,
+ waiting = [],
+ killed = false}).
+
+check_proc_code(Pids, Mod, Hard) ->
+ Tag = erlang:make_ref(),
+ CpcS = #cpc_static{hard = Hard,
+ module = Mod,
+ tag = Tag},
+ check_proc_code(CpcS, cpc_init(CpcS, Pids, 0), 0, [], #cpc_kill{}, true).
+
+check_proc_code(#cpc_static{hard = true}, 0, 0, [],
+ #cpc_kill{outstanding = [], waiting = [], killed = Killed},
+ true) ->
+ %% No outstanding requests. We did a hard check, so result is whether or
+ %% not we killed any processes...
+ Killed;
+check_proc_code(#cpc_static{hard = false}, 0, 0, [], _KillState, Success) ->
+ %% No outstanding requests and we did a soft check...
+ Success;
+check_proc_code(#cpc_static{hard = false, tag = Tag} = CpcS, NoReq0, NoGcReq0,
+ [], _KillState, false) ->
+ %% Failed soft check; just cleanup the remaining replies corresponding
+ %% to the requests we've sent...
+ {NoReq1, NoGcReq1} = receive
+ {check_process_code, {Tag, _P, GC}, _Res} ->
+ case GC of
+ false -> {NoReq0-1, NoGcReq0};
+ true -> {NoReq0, NoGcReq0-1}
+ end
+ end,
+ check_proc_code(CpcS, NoReq1, NoGcReq1, [], _KillState, false);
+check_proc_code(#cpc_static{tag = Tag} = CpcS, NoReq0, NoGcReq0, NeedGC0,
+ KillState0, Success) ->
+
+ %% Check if we should request a GC operation
+ {NoGcReq1, NeedGC1} = case NoGcReq0 < ?MAX_CPC_GC_PROCS of
+ GcOpAllowed when GcOpAllowed == false;
+ NeedGC0 == [] ->
+ {NoGcReq0, NeedGC0};
+ _ ->
+ {NoGcReq0+1, cpc_request_gc(CpcS,NeedGC0)}
+ end,
+
+ %% Wait for a cpc reply or 'DOWN' message
+ {NoReq1, NoGcReq2, Pid, Result, KillState1} = cpc_recv(Tag,
+ NoReq0,
+ NoGcReq1,
+ KillState0),
+
+ %% Check the result of the reply
+ case Result of
+ aborted ->
+ %% Operation aborted due to the need to GC in order to
+ %% determine if the process is referring the module.
+ %% Schedule the operation for restart allowing GC...
+ check_proc_code(CpcS, NoReq1, NoGcReq2, [Pid|NeedGC1], KillState1,
+ Success);
+ false ->
+ %% Process not referring the module; done with this process...
+ check_proc_code(CpcS, NoReq1, NoGcReq2, NeedGC1, KillState1,
+ Success);
+ true ->
+ %% Process referring the module...
+ case CpcS#cpc_static.hard of
+ false ->
+ %% ... and soft check. The whole operation failed so
+ %% no point continuing; clean up and fail...
+ check_proc_code(CpcS, NoReq1, NoGcReq2, [], KillState1,
+ false);
+ true ->
+ %% ... and hard check; schedule kill of it...
+ check_proc_code(CpcS, NoReq1, NoGcReq2, NeedGC1,
+ cpc_sched_kill(Pid, KillState1), Success)
+ end;
+ 'DOWN' ->
+ %% Handled 'DOWN' message
+ check_proc_code(CpcS, NoReq1, NoGcReq2, NeedGC1,
+ KillState1, Success)
+ end.
+
+cpc_recv(Tag, NoReq, NoGcReq, #cpc_kill{outstanding = []} = KillState) ->
+ receive
+ {check_process_code, {Tag, Pid, GC}, Res} ->
+ cpc_handle_cpc(NoReq, NoGcReq, GC, Pid, Res, KillState)
end;
-do_soft_purge([], Mod) ->
- catch erlang:purge_module(Mod),
- true.
+cpc_recv(Tag, NoReq, NoGcReq,
+ #cpc_kill{outstanding = [R0, R1, R2, R3, R4 | _]} = KillState) ->
+ receive
+ {'DOWN', R, process, _, _} when R == R0;
+ R == R1;
+ R == R2;
+ R == R3;
+ R == R4 ->
+ cpc_handle_down(NoReq, NoGcReq, R, KillState);
+ {check_process_code, {Tag, Pid, GC}, Res} ->
+ cpc_handle_cpc(NoReq, NoGcReq, GC, Pid, Res, KillState)
+ end;
+cpc_recv(Tag, NoReq, NoGcReq, #cpc_kill{outstanding = [R|_]} = KillState) ->
+ receive
+ {'DOWN', R, process, _, _} ->
+ cpc_handle_down(NoReq, NoGcReq, R, KillState);
+ {check_process_code, {Tag, Pid, GC}, Res} ->
+ cpc_handle_cpc(NoReq, NoGcReq, GC, Pid, Res, KillState)
+ end.
+
+cpc_handle_down(NoReq, NoGcReq, R, #cpc_kill{outstanding = Rs,
+ no_outstanding = N} = KillState) ->
+ {NoReq, NoGcReq, undefined, 'DOWN',
+ cpc_sched_kill_waiting(KillState#cpc_kill{outstanding = cpc_list_rm(R, Rs),
+ no_outstanding = N-1})}.
+
+cpc_list_rm(R, [R|Rs]) ->
+ Rs;
+cpc_list_rm(R0, [R1|Rs]) ->
+ [R1|cpc_list_rm(R0, Rs)].
+
+cpc_handle_cpc(NoReq, NoGcReq, false, Pid, Res, KillState) ->
+ {NoReq-1, NoGcReq, Pid, Res, KillState};
+cpc_handle_cpc(NoReq, NoGcReq, true, Pid, Res, KillState) ->
+ {NoReq, NoGcReq-1, Pid, Res, KillState}.
+
+cpc_sched_kill_waiting(#cpc_kill{waiting = []} = KillState) ->
+ KillState;
+cpc_sched_kill_waiting(#cpc_kill{outstanding = Rs,
+ no_outstanding = N,
+ waiting = [P|Ps]} = KillState) ->
+ R = erlang:monitor(process, P),
+ exit(P, kill),
+ KillState#cpc_kill{outstanding = [R|Rs],
+ no_outstanding = N+1,
+ waiting = Ps,
+ killed = true}.
+
+cpc_sched_kill(Pid, #cpc_kill{no_outstanding = N, waiting = Pids} = KillState)
+ when N >= ?MAX_CPC_NO_OUTSTANDING_KILLS ->
+ KillState#cpc_kill{waiting = [Pid|Pids]};
+cpc_sched_kill(Pid,
+ #cpc_kill{outstanding = Rs, no_outstanding = N} = KillState) ->
+ R = erlang:monitor(process, Pid),
+ exit(Pid, kill),
+ KillState#cpc_kill{outstanding = [R|Rs],
+ no_outstanding = N+1,
+ killed = true}.
+
+cpc_request(#cpc_static{tag = Tag, module = Mod}, Pid, AllowGc) ->
+ erlang:check_process_code(Pid, Mod, [{async, {Tag, Pid, AllowGc}},
+ {allow_gc, AllowGc}]).
+
+cpc_request_gc(CpcS, [Pid|Pids]) ->
+ cpc_request(CpcS, Pid, true),
+ Pids.
+
+cpc_init(_CpcS, [], NoReqs) ->
+ NoReqs;
+cpc_init(CpcS, [Pid|Pids], NoReqs) ->
+ cpc_request(CpcS, Pid, false),
+ cpc_init(CpcS, Pids, NoReqs+1).
+
+% end of check_proc_code() implementation.
is_loaded(M, Db) ->
case ets:lookup(Db, M) of
@@ -1505,13 +1699,13 @@ finish_on_load_1(Mod, File, OnLoadRes, WaitingPids, Db) ->
erlang:finish_after_on_load(Mod, Keep),
Res = case Keep of
false ->
- finish_on_load_report(Mod, OnLoadRes),
+ _ = finish_on_load_report(Mod, OnLoadRes),
{error,on_load_failure};
true ->
ets:insert(Db, {Mod,File}),
{module,Mod}
end,
- [reply(Pid, Res) || Pid <- WaitingPids],
+ _ = [reply(Pid, Res) || Pid <- WaitingPids],
ok.
finish_on_load_report(_Mod, Atom) when is_atom(Atom) ->
diff --git a/lib/kernel/src/disk_log.erl b/lib/kernel/src/disk_log.erl
index c238eff12f..9a7726cfa0 100644
--- a/lib/kernel/src/disk_log.erl
+++ b/lib/kernel/src/disk_log.erl
@@ -1076,13 +1076,13 @@ log_end(S, [], [], Sync) ->
log_end(S, Pids, Bins, Sync) ->
case do_log(get(log), rflat(Bins)) of
N when is_integer(N) ->
- replies(Pids, ok),
+ ok = replies(Pids, ok),
S1 = (state_ok(S))#state{cnt = S#state.cnt+N},
log_end_sync(S1, Sync);
{error, {error, {full, _Name}}, N} when Pids =:= [] ->
log_end_sync(state_ok(S#state{cnt = S#state.cnt + N}), Sync);
{error, Error, N} ->
- replies(Pids, Error),
+ ok = replies(Pids, Error),
state_err(S#state{cnt = S#state.cnt + N}, Error)
end.
@@ -1091,7 +1091,7 @@ log_end_sync(S, []) ->
S;
log_end_sync(S, Sync) ->
Res = do_sync(get(log)),
- replies(Sync, Res),
+ ok = replies(Sync, Res),
state_err(S, Res).
%% Inlined.
@@ -1183,7 +1183,7 @@ do_exit(S, From, Message0, Reason) ->
_ -> Message0
end,
_ = disk_log_server:close(self()),
- replies(From, Message),
+ ok = replies(From, Message),
?PROFILE(ep:done()),
exit(Reason).
@@ -1881,7 +1881,8 @@ replies(Pids, Reply) ->
send_reply(Pids, M).
send_reply(Pid, M) when is_pid(Pid) ->
- Pid ! M;
+ Pid ! M,
+ ok;
send_reply([Pid | Pids], M) ->
Pid ! M,
send_reply(Pids, M);
@@ -2022,7 +2023,7 @@ notify_owners(Note) ->
cache_error(S, Pids) ->
Error = S#state.cache_error,
- replies(Pids, Error),
+ ok = replies(Pids, Error),
state_err(S#state{cache_error = ok}, Error).
state_ok(S) ->
diff --git a/lib/kernel/src/disk_log_1.erl b/lib/kernel/src/disk_log_1.erl
index 9d431bdd30..59f5cad001 100644
--- a/lib/kernel/src/disk_log_1.erl
+++ b/lib/kernel/src/disk_log_1.erl
@@ -295,12 +295,18 @@ read_chunk_ro(FdC, FileName, Pos, MaxBytes) ->
pread(FdC, FileName, Pos + ?HEADSZ, MaxBytes).
%% -> ok | throw(Error)
-close(#cache{fd = Fd, c = []}, _FileName, read_only) ->
- file:close(Fd);
+close(#cache{fd = Fd, c = []}, FileName, read_only) ->
+ case file:close(Fd) of
+ ok -> ok;
+ Error -> file_error(FileName, Error)
+ end;
close(#cache{fd = Fd, c = C}, FileName, read_write) ->
{Reply, _NewFdC} = write_cache(Fd, FileName, C),
mark(Fd, FileName, ?CLOSED),
- file:close(Fd),
+ case file:close(Fd) of
+ ok -> ok;
+ Error -> file_error(FileName, Error)
+ end,
if Reply =:= ok -> ok; true -> throw(Reply) end.
%% Open an internal file. Head is ignored if Mode is read_only.
@@ -320,7 +326,10 @@ int_open(FName, Repair, read_write, Head) ->
{ok, FileHead} ->
case is_head(FileHead) of
yes ->
- file:close(Fd),
+ case file:close(Fd) of
+ ok -> ok;
+ Error2 -> file_error(FName, Error2)
+ end,
case open_update(FName) of
{ok, Fd2} ->
mark(Fd2, FName, ?OPENED),
@@ -333,14 +342,14 @@ int_open(FName, Repair, read_write, Head) ->
yes_not_closed when Repair ->
repair(Fd, FName);
yes_not_closed when not Repair ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {need_repair, FName}});
no ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {not_a_log_file, FName}})
end;
eof ->
- file:close(Fd),
+ _= file:close(Fd),
throw({error, {not_a_log_file, FName}});
Error ->
file_error_close(Fd, FName, Error)
@@ -363,11 +372,11 @@ int_open(FName, _Repair, read_only, _Head) ->
FdC = #cache{fd = Fd},
{ok, {existed, FdC, {0, 0}, P}};
no ->
- file:close(Fd),
+ _= file:close(Fd),
throw({error, {not_a_log_file, FName}})
end;
eof ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {not_a_log_file, FName}});
Error ->
file_error_close(Fd, FName, Error)
@@ -398,7 +407,7 @@ int_log_head(Fd, Head) ->
none ->
{#cache{fd = Fd}, 0, 0};
Error ->
- file:close(Fd),
+ _= file:close(Fd),
throw(Error)
end.
@@ -450,13 +459,13 @@ ext_log_head(Fd, Head) ->
none ->
{#cache{fd = Fd}, {0, 0}};
Error ->
- file:close(Fd),
+ _= file:close(Fd),
throw(Error)
end.
%% -> _Any | throw()
mark(Fd, FileName, What) ->
- position_close2(Fd, FileName, 4),
+ {ok, _} = position_close2(Fd, FileName, 4),
fwrite_close2(Fd, FileName, What).
%% -> {ok, Bin} | Error
@@ -560,7 +569,7 @@ scan_f2(B, FSz, Ack, No, Bad, Size, Tail) ->
end.
done_scan(In, Out, OutName, FName, RecoveredTerms, BadChars) ->
- file:close(In),
+ _ = file:close(In),
case catch fclose(Out, OutName) of
ok ->
case file:rename(OutName, FName) of
@@ -574,21 +583,21 @@ done_scan(In, Out, OutName, FName, RecoveredTerms, BadChars) ->
file_error(FName, Error)
end;
Error ->
- file:delete(OutName),
+ _ = file:delete(OutName),
file_error(FName, Error)
end;
Error ->
- file:delete(OutName),
+ _ = file:delete(OutName),
throw(Error)
end.
-spec repair_err(file:io_device(), #cache{}, file:filename(),
file:filename(), {'error', file:posix()}) -> no_return().
repair_err(In, Out, OutName, ErrFileName, Error) ->
- file:close(In),
+ _= file:close(In),
catch fclose(Out, OutName),
%% OutName is often the culprit, try to remove it anyway...
- file:delete(OutName),
+ _ = file:delete(OutName),
file_error(ErrFileName, Error).
%% Used by wrap_log_reader.
@@ -764,10 +773,10 @@ mf_int_chunk(Handle, {FileNo, Pos}, Bin, N) ->
{ok, {_Alloc, FdC, _HeadSize, _FileSize}} ->
case chunk(FdC, FName, Pos, Bin, N) of
{NewFdC, eof} ->
- file:close(NewFdC#cache.fd),
+ _ = file:close(NewFdC#cache.fd),
mf_int_chunk(Handle, {NFileNo, 0}, [], N);
{NewFdC, Other} ->
- file:close(NewFdC#cache.fd),
+ _ = file:close(NewFdC#cache.fd),
{Handle, conv(Other, FileNo)}
end
end.
@@ -792,10 +801,10 @@ mf_int_chunk_read_only(Handle, {FileNo, Pos}, Bin, N) ->
{ok, {_Alloc, FdC, _HeadSize, _FileSize}} ->
case do_chunk_read_only(FdC, FName, Pos, Bin, N) of
{NewFdC, eof} ->
- file:close(NewFdC#cache.fd),
+ _ = file:close(NewFdC#cache.fd),
mf_int_chunk_read_only(Handle, {NFileNo,0}, [], N);
{NewFdC, Other} ->
- file:close(NewFdC#cache.fd),
+ _ = file:close(NewFdC#cache.fd),
{Handle, conv(Other, FileNo)}
end
end.
@@ -1017,7 +1026,7 @@ ext_file_open(FName, NewFile, OldFile, OldCnt, Head, Repair, Mode) ->
read_index_file(truncate, FName, MaxF) ->
remove_files(FName, 2, MaxF),
- file:delete(?index_file_name(FName)),
+ _ = file:delete(?index_file_name(FName)),
{1, 0, 0, 0};
read_index_file(_, FName, _MaxF) ->
read_index_file(FName).
@@ -1043,7 +1052,7 @@ read_index_file(FName) ->
_ErrorOrEof ->
{1, 0, 0, 0}
end,
- file:close(Fd),
+ _ = file:close(Fd),
R;
_Error ->
{1, 0, 0, 0}
@@ -1096,7 +1105,7 @@ write_index_file(read_write, FName, NewFile, OldFile, OldCnt) ->
%% Very old format, convert to the latest format!
case file:read_file(FileName) of
{ok, <<_CurF, Tail/binary>>} ->
- position_close2(Fd, FileName, bof),
+ {ok, _} = position_close2(Fd, FileName, bof),
Bin = <<0, 0:32, ?VERSION, NewFile:32>>,
NewTail = to_8_bytes(Tail, [], FileName, Fd),
fwrite_close2(Fd, FileName, [Bin | NewTail]),
@@ -1115,7 +1124,7 @@ write_index_file(read_write, FName, NewFile, OldFile, OldCnt) ->
R = file:pread(Fd, NewPos, SzSz),
OldPos = Offset + (OldFile - 1)*SzSz,
pwrite_close2(Fd, FileName, OldPos, OldCntBin),
- file:close(Fd),
+ _ = file:close(Fd),
case R of
{ok, <<Lost:SzSz/unit:8>>} -> Lost;
{ok, _} ->
@@ -1125,7 +1134,7 @@ write_index_file(read_write, FName, NewFile, OldFile, OldCnt) ->
end;
true ->
pwrite_close2(Fd, FileName, NewPos, OldCntBin),
- file:close(Fd),
+ _ = file:close(Fd),
0
end;
E ->
@@ -1137,7 +1146,7 @@ to_8_bytes(<<N:32,T/binary>>, NT, FileName, Fd) ->
to_8_bytes(B, NT, _FileName, _Fd) when byte_size(B) =:= 0 ->
NT;
to_8_bytes(_B, _NT, FileName, Fd) ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {invalid_index_file, FileName}}).
%% -> ok | throw(FileError)
@@ -1147,7 +1156,7 @@ index_file_trunc(FName, N) ->
{ok, Fd} ->
case file:read(Fd, 6) of
eof ->
- file:close(Fd),
+ _ = file:close(Fd),
ok;
{ok, <<0, 0:32, Version>>} when Version =:= ?VERSION ->
truncate_index_file(Fd, FileName, 10, 8, N);
@@ -1166,10 +1175,10 @@ truncate_index_file(Fd, FileName, Offset, N, SzSz) ->
Pos = Offset + N*SzSz,
case Pos > file_size(FileName) of
true ->
- file:close(Fd);
+ ok = file:close(Fd);
false ->
truncate_at_close2(Fd, FileName, {bof, Pos}),
- file:close(Fd)
+ ok = file:close(Fd)
end,
ok.
@@ -1412,7 +1421,8 @@ fwrite(#cache{c = []} = FdC, _FN, B, Size) ->
ok;
_ ->
put(write_cache_timer_is_running, true),
- erlang:send_after(?TIMEOUT, self(), {self(), write_cache})
+ erlang:send_after(?TIMEOUT, self(), {self(), write_cache}),
+ ok
end,
{ok, FdC#cache{sz = Size, c = B}};
fwrite(#cache{sz = Sz, c = C} = FdC, _FN, B, Size) when Sz < ?MAX ->
@@ -1511,7 +1521,7 @@ position_close2(Fd, FileName, Pos) ->
end.
truncate_at_close2(Fd, FileName, Pos) ->
- position_close2(Fd, FileName, Pos),
+ {ok, _} = position_close2(Fd, FileName, Pos),
case file:truncate(Fd) of
ok -> ok;
Error -> file_error_close(Fd, FileName, Error)
@@ -1519,7 +1529,7 @@ truncate_at_close2(Fd, FileName, Pos) ->
fclose(#cache{fd = Fd, c = C}, FileName) ->
%% The cache is empty if the file was opened in read_only mode.
- write_cache_close(Fd, FileName, C),
+ _ = write_cache_close(Fd, FileName, C),
file:close(Fd).
%% -> {Reply, #cache{}}; Reply = ok | Error
@@ -1549,5 +1559,5 @@ file_error(FileName, {error, Error}) ->
-spec file_error_close(file:fd(), file:filename(), {'error', file:posix()}) -> no_return().
file_error_close(Fd, FileName, {error, Error}) ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {file_error, FileName, Error}}).
diff --git a/lib/kernel/src/disk_log_server.erl b/lib/kernel/src/disk_log_server.erl
index 8894ed87e8..45334912eb 100644
--- a/lib/kernel/src/disk_log_server.erl
+++ b/lib/kernel/src/disk_log_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -83,8 +83,8 @@ accessible_logs() ->
init([]) ->
process_flag(trap_exit, true),
- ets:new(?DISK_LOG_NAME_TABLE, [named_table, set]),
- ets:new(?DISK_LOG_PID_TABLE, [named_table, set]),
+ _ = ets:new(?DISK_LOG_NAME_TABLE, [named_table, set]),
+ _= ets:new(?DISK_LOG_PID_TABLE, [named_table, set]),
{ok, #state{}}.
handle_call({open, W, A}, From, State) ->
@@ -159,15 +159,25 @@ ensure_started() ->
undefined ->
LogSup = {disk_log_sup, {disk_log_sup, start_link, []}, permanent,
1000, supervisor, [disk_log_sup]},
- supervisor:start_child(kernel_safe_sup, LogSup),
+ {ok, _} = ensure_child_started(kernel_safe_sup, LogSup),
LogServer = {disk_log_server,
{disk_log_server, start_link, []},
permanent, 2000, worker, [disk_log_server]},
- supervisor:start_child(kernel_safe_sup, LogServer),
+ {ok, _} = ensure_child_started(kernel_safe_sup, LogServer),
ok;
_ -> ok
end.
+ensure_child_started(Sup,Child) ->
+ case supervisor:start_child(Sup, Child) of
+ {ok,Pid} ->
+ {ok,Pid};
+ {error,{already_started,Pid}} ->
+ {ok,Pid};
+ Error ->
+ Error
+ end.
+
open([{Req, From} | L], State) ->
State2 = case do_open(Req, From, State) of
{pending, State1} ->
@@ -189,7 +199,7 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
false when W =:= local ->
case A#arg.distributed of
{true, Nodes} ->
- Fun = fun() -> open_distr_rpc(Nodes, A, From) end,
+ Fun = open_distr_rpc_fun(Nodes, A, From),
_Pid = spawn(Fun),
%% No pending reply is expected, but don't reply yet.
{pending, State};
@@ -215,11 +225,15 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
end
end.
+-spec open_distr_rpc_fun([node()], _, _) -> % XXX: underspecified
+ fun(() -> no_return()).
+
+open_distr_rpc_fun(Nodes, A, From) ->
+ fun() -> open_distr_rpc(Nodes, A, From) end.
+
%% Spawning a process is a means to avoid deadlock when
%% disk_log_servers mutually open disk_logs.
--spec open_distr_rpc([node()], _, _) -> no_return(). % XXX: underspecified
-
open_distr_rpc(Nodes, A, From) ->
{AllReplies, BadNodes} = rpc:multicall(Nodes, ?MODULE, dist_open, [A]),
{Ok, Bad} = cr(AllReplies, [], []),
diff --git a/lib/kernel/src/dist_ac.erl b/lib/kernel/src/dist_ac.erl
index 5c62aa31e9..a4d4ae386c 100644
--- a/lib/kernel/src/dist_ac.erl
+++ b/lib/kernel/src/dist_ac.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -283,7 +283,7 @@ handle_cast(init_sync, _S) ->
KernelConfig ! dist_ac_took_control,
%% we're really just interested in nodedowns.
- net_kernel:monitor_nodes(true),
+ ok = net_kernel:monitor_nodes(true),
{Known, NAppls, RStarted} = sync_dacs(Appls),
@@ -321,7 +321,7 @@ handle_call({takeover_application, AppName, RestartType}, From, S) ->
case keysearch(AppName, #appl.name, Appls) of
{value, Appl} when element(1, Appl#appl.id) =:= distributed ->
{distributed, Node} = Appl#appl.id,
- ac_takeover(req, AppName, Node, RestartType),
+ _ = ac_takeover(req, AppName, Node, RestartType),
NAppl = Appl#appl{id = takeover},
NAppls = keyreplace(AppName, #appl.name, Appls, NAppl),
TR = S#state.t_reqs,
@@ -341,10 +341,10 @@ handle_call({permit_application, AppName, Bool, LockId, StartInfo}, From, S) ->
%% here, but we have to be backwards-compatible.
case application_controller:get_loaded(AppName) of
{true, _} when not Bool ->
- ac_stop_it(AppName),
+ _ = ac_stop_it(AppName),
{reply, ok, S};
{true, _} when Bool ->
- ac_start_it(req, AppName),
+ _ = ac_start_it(req, AppName),
{reply, ok, S};
false ->
{reply, {error, {not_loaded, AppName}}, S}
@@ -533,7 +533,7 @@ handle_info({dist_ac_app_started, Node, Name, Res}, S) ->
%% Another node started appl. Update appl list.
{distributed, Node}
end,
- ac_started(req, Name, Node),
+ _ = ac_started(req, Name, Node),
NAppl = Appl#appl{id = NId},
NAppls = keyreplace(Name, #appl.name, Appls, NAppl),
TmpWeights = keydelete_all(Name, 1, S#state.tmp_weights),
@@ -622,7 +622,7 @@ handle_info({nodedown, Node}, S) ->
true ->
{true, Appl#appl{id = {failover, Node}}};
false ->
- ac_not_running(Appl#appl.name),
+ _ = ac_not_running(Appl#appl.name),
{true, Appl#appl{id = undefined}}
end;
(_) ->
@@ -656,7 +656,8 @@ handle_info({dist_ac_app_loaded, Node, Name, HisNodes, Permission, HeKnowsMe},
%% he's a new node connecting to us.
Msg = {dist_ac_app_loaded, node(), Name,
Nodes, dist_is_runnable(Appls, Name), true},
- {?DIST_AC, Node} ! Msg;
+ {?DIST_AC, Node} ! Msg,
+ ok;
true ->
ok
end,
@@ -811,29 +812,29 @@ start_appl(AppName, S, Type) ->
start_distributed(Appl, Name, Nodes, PermittedNodes, S, Type) ->
case find_start_node(Nodes, PermittedNodes, Name, S) of
{ok, Node} when Node =:= node() ->
- case Appl#appl.id of
- {failover, FoNode} when Type =:= req ->
- ac_failover(Name, FoNode, undefined);
- {distributed, Node2} when Type =:= req ->
- ac_takeover(req, Name, Node2, undefined);
- _ when Type =:= reply ->
- case lists:keysearch(Name, 2, S#state.remote_started) of
- {value, {Node3, _}} ->
- ac_takeover(reply, Name, Node3, undefined);
- _ ->
- ac_start_it(Type, Name)
- end;
- _ ->
- ac_start_it(Type, Name)
- end,
+ _ = case Appl#appl.id of
+ {failover, FoNode} when Type =:= req ->
+ ac_failover(Name, FoNode, undefined);
+ {distributed, Node2} when Type =:= req ->
+ ac_takeover(req, Name, Node2, undefined);
+ _ when Type =:= reply ->
+ case lists:keysearch(Name, 2, S#state.remote_started) of
+ {value, {Node3, _}} ->
+ ac_takeover(reply, Name, Node3, undefined);
+ _ ->
+ ac_start_it(Type, Name)
+ end;
+ _ ->
+ ac_start_it(Type, Name)
+ end,
{run_waiting, true};
{already_started, Node} ->
- ac_started(Type, Name, Node),
+ _ = ac_started(Type, Name, Node),
{{distributed, Node}, false};
{ok, Node} ->
case keysearch(Name, #appl.name, S#state.appls) of
{value, #appl{id = {distributed, Node}}} ->
- ac_started(Type, Name, Node),
+ _ = ac_started(Type, Name, Node),
{{distributed, Node}, false};
_ ->
wait_dist_start(Node, Appl, Name, Nodes,
@@ -842,7 +843,7 @@ start_distributed(Appl, Name, Nodes, PermittedNodes, S, Type) ->
not_started ->
wait_dist_start2(Appl, Name, Nodes, PermittedNodes, S, Type);
no_permission ->
- ac_not_started(Type, Name),
+ _ = ac_not_started(Type, Name),
{undefined, false}
end.
@@ -850,11 +851,11 @@ wait_dist_start(Node, Appl, Name, Nodes, PermittedNodes, S, Type) ->
monitor_node(Node, true),
receive
{dist_ac_app_started, Node, Name, ok} ->
- ac_started(Type, Name, Node),
+ _ = ac_started(Type, Name, Node),
monitor_node(Node, false),
{{distributed, Node}, false};
{dist_ac_app_started, Node, Name, {error, R}} ->
- ac_error(Type, Name, {Node, R}),
+ _ = ac_error(Type, Name, {Node, R}),
monitor_node(Node, false),
{Appl#appl.id, false};
{dist_ac_weight, Name, _Weigth, Node} ->
@@ -883,10 +884,10 @@ wait_dist_start(Node, Appl, Name, Nodes, PermittedNodes, S, Type) ->
wait_dist_start2(Appl, Name, Nodes, PermittedNodes, S, Type) ->
receive
{dist_ac_app_started, Node, Name, ok} ->
- ac_started(Type, Name, Node),
+ _ = ac_started(Type, Name, Node),
{{distributed, Node}, false};
{dist_ac_app_started, Node, Name, {error, R}} ->
- ac_error(Type, Name, {Node, R}),
+ _ = ac_error(Type, Name, {Node, R}),
{Appl#appl.id, false};
{nodedown, Node} ->
%% A node went down, try to start the app again - there may not
@@ -974,7 +975,7 @@ permit(false, {value, _}, AppName, From, S, _LockId) ->
case dist_get_runnable_nodes(S#state.appls, AppName) of
[] ->
%% There is no runnable node; stop application
- ac_stop_it(AppName),
+ _ = ac_stop_it(AppName),
SReqs = [{AppName, From} | S#state.s_reqs],
{noreply, S#state{s_reqs = SReqs}};
Nodes ->
@@ -1155,7 +1156,8 @@ send_nodes(Nodes, Msg) ->
end, FlatNodes).
send_after(Time, Msg) when is_integer(Time), Time >= 0 ->
- spawn_link(?MODULE, send_timeout, [self(), Time, Msg]);
+ _Pid = spawn_link(?MODULE, send_timeout, [self(), Time, Msg]),
+ ok;
send_after(_,_) -> % infinity
ok.
@@ -1305,7 +1307,7 @@ check_waiting([{From, AppName, false, Nodes} | Reqs],
S, Node, Appls, Res, SReqs) ->
case lists:delete(Node, Nodes) of
[] ->
- ac_stop_it(AppName),
+ _ = ac_stop_it(AppName),
NSReqs = [{AppName, From} | SReqs],
check_waiting(Reqs, Node, S, Appls, Res, NSReqs);
NNodes ->
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl
index fc50ec6717..b127fe2e33 100644
--- a/lib/kernel/src/dist_util.erl
+++ b/lib/kernel/src/dist_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -116,7 +116,8 @@ make_this_flags(RequestType, OtherNode) ->
?DFLAG_UNICODE_IO bor
?DFLAG_DIST_HDR_ATOM_CACHE bor
?DFLAG_SMALL_ATOM_TAGS bor
- ?DFLAG_UTF8_ATOMS).
+ ?DFLAG_UTF8_ATOMS bor
+ ?DFLAG_MAP_TAG).
handshake_other_started(#hs_data{request_type=ReqType}=HSData0) ->
{PreOtherFlags,Node,Version} = recv_name(HSData0),
diff --git a/lib/kernel/src/erl_boot_server.erl b/lib/kernel/src/erl_boot_server.erl
index 0d68d3e198..ef09d86ca4 100644
--- a/lib/kernel/src/erl_boot_server.erl
+++ b/lib/kernel/src/erl_boot_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -191,7 +191,7 @@ init(Slaves) ->
{ok, UPort} = inet:port(U),
Ref = make_ref(),
Pid = proc_lib:spawn_link(?MODULE, boot_init, [Ref]),
- gen_tcp:controlling_process(L, Pid),
+ ok = gen_tcp:controlling_process(L, Pid),
Pid ! {Ref, L},
%% We trap exit inorder to restart boot_init and udp_port
process_flag(trap_exit, true),
@@ -233,9 +233,19 @@ handle_info({udp, U, IP, Port, Data}, S0) ->
%% erlang version as the boot server node
case {Valid,Data,Token} of
{true,Token,Token} ->
- gen_udp:send(U,IP,Port,[?EBOOT_REPLY,S0#state.priority,
- int16(S0#state.listen_port),
- S0#state.version]),
+ case gen_udp:send(U,IP,Port,[?EBOOT_REPLY,S0#state.priority,
+ int16(S0#state.listen_port),
+ S0#state.version])
+ of
+ ok -> ok;
+ {error, not_owner} ->
+ error_logger:error_msg("** Illegal boot server connection attempt: "
+ "not owner of ~w ** ~n", [U]);
+ {error, Reason} ->
+ Err = file:format_error(Reason),
+ error_logger:error_msg("** Illegal boot server connection attempt: "
+ "~w POSIX error ** ~n", [U, Err])
+ end,
{noreply,S0};
{false,_,_} ->
error_logger:error_msg("** Illegal boot server connection attempt: "
@@ -331,9 +341,13 @@ handle_command(S, PS, Msg) ->
send_file_result(S, list_dir, Res),
PS2;
{read_file_info,File} ->
- {Res, PS2} = erl_prim_loader:prim_read_file_info(PS, File),
+ {Res, PS2} = erl_prim_loader:prim_read_file_info(PS, File, true),
send_file_result(S, read_file_info, Res),
PS2;
+ {read_link_info,File} ->
+ {Res, PS2} = erl_prim_loader:prim_read_file_info(PS, File, false),
+ send_file_result(S, read_link_info, Res),
+ PS2;
get_cwd ->
{Res, PS2} = erl_prim_loader:prim_get_cwd(PS, []),
send_file_result(S, get_cwd, Res),
@@ -351,7 +365,14 @@ handle_command(S, PS, Msg) ->
end.
send_file_result(S, Cmd, Result) ->
- gen_tcp:send(S, term_to_binary({Cmd,Result})).
-
-send_result(S, Result) ->
- gen_tcp:send(S, term_to_binary(Result)).
+ send_result(S, {Cmd,Result}).
+
+send_result(S, Term) ->
+ case gen_tcp:send(S, term_to_binary(Term)) of
+ ok ->
+ ok;
+ Error ->
+ error_logger:error_msg("** Boot server could not send result "
+ "to socket: ~w** ~n", [Error]),
+ ok
+ end.
diff --git a/lib/kernel/src/erl_distribution.erl b/lib/kernel/src/erl_distribution.erl
index 25ad34357a..3c4429129e 100644
--- a/lib/kernel/src/erl_distribution.erl
+++ b/lib/kernel/src/erl_distribution.erl
@@ -22,7 +22,6 @@
-export([start_link/0,start_link/1,init/1,start/1,stop/0]).
-%-define(DBG,io:format("~p:~p~n",[?MODULE,?LINE])).
-define(DBG,erlang:display([?MODULE,?LINE])).
start_link() ->
diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
index 91af49f303..f6e2ca0954 100644
--- a/lib/kernel/src/erl_epmd.erl
+++ b/lib/kernel/src/erl_epmd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -85,24 +85,19 @@ port_please1(Node,HostName, Timeout) ->
Else
end.
-names() ->
+names() ->
{ok, H} = inet:gethostname(),
names(H).
-names(HostName) when is_atom(HostName) ->
- names1(atom_to_list(HostName));
-names(HostName) when is_list(HostName) ->
- names1(HostName);
-names(EpmdAddr) ->
- get_names(EpmdAddr).
-
-names1(HostName) ->
+names(HostName) when is_atom(HostName); is_list(HostName) ->
case inet:gethostbyname(HostName) of
{ok,{hostent, _Name, _ , _Af, _Size, [EpmdAddr | _]}} ->
get_names(EpmdAddr);
Else ->
Else
- end.
+ end;
+names(EpmdAddr) ->
+ get_names(EpmdAddr).
register_node(Name, PortNo) ->
@@ -217,17 +212,23 @@ do_register_node(NodeName, TcpPort) ->
Extra = "",
Elen = length(Extra),
Len = 1+2+1+1+2+2+2+length(Name)+2+Elen,
- gen_tcp:send(Socket, [?int16(Len), ?EPMD_ALIVE2_REQ,
- ?int16(TcpPort),
- $M,
- 0,
- ?int16(epmd_dist_high()),
- ?int16(epmd_dist_low()),
- ?int16(length(Name)),
- Name,
- ?int16(Elen),
- Extra]),
- wait_for_reg_reply(Socket, []);
+ Packet = [?int16(Len), ?EPMD_ALIVE2_REQ,
+ ?int16(TcpPort),
+ $M,
+ 0,
+ ?int16(epmd_dist_high()),
+ ?int16(epmd_dist_low()),
+ ?int16(length(Name)),
+ Name,
+ ?int16(Elen),
+ Extra],
+ case gen_tcp:send(Socket, Packet) of
+ ok ->
+ wait_for_reg_reply(Socket, []);
+ Error ->
+ close(Socket),
+ Error
+ end;
Error ->
Error
end.
@@ -294,8 +295,14 @@ get_port(Node, EpmdAddress, Timeout) ->
{ok, Socket} ->
Name = to_string(Node),
Len = 1+length(Name),
- gen_tcp:send(Socket, [?int16(Len),?EPMD_PORT_PLEASE2_REQ, Name]),
- wait_for_port_reply(Socket, []);
+ Msg = [?int16(Len),?EPMD_PORT_PLEASE2_REQ,Name],
+ case gen_tcp:send(Socket, Msg) of
+ ok ->
+ wait_for_port_reply(Socket, []);
+ _Error ->
+ ?port_please_failure2(_Error),
+ noport
+ end;
_Error ->
?port_please_failure2(_Error),
noport
@@ -374,7 +381,7 @@ wait_for_port_reply_name(Socket, Len, Sofar) ->
% io:format("data = ~p~n", _Data),
wait_for_port_reply_name(Socket, Len, Sofar);
{tcp_closed, Socket} ->
- "foobar"
+ ok
end.
@@ -424,19 +431,24 @@ get_names(EpmdAddress) ->
end.
do_get_names(Socket) ->
- gen_tcp:send(Socket, [?int16(1),?EPMD_NAMES]),
- receive
- {tcp, Socket, [P0,P1,P2,P3|T]} ->
- EpmdPort = ?u32(P0,P1,P2,P3),
- case get_epmd_port() of
- EpmdPort ->
- names_loop(Socket, T, []);
- _ ->
- close(Socket),
- {error, address}
+ case gen_tcp:send(Socket, [?int16(1),?EPMD_NAMES]) of
+ ok ->
+ receive
+ {tcp, Socket, [P0,P1,P2,P3|T]} ->
+ EpmdPort = ?u32(P0,P1,P2,P3),
+ case get_epmd_port() of
+ EpmdPort ->
+ names_loop(Socket, T, []);
+ _ ->
+ close(Socket),
+ {error, address}
+ end;
+ {tcp_closed, Socket} ->
+ {ok, []}
end;
- {tcp_closed, Socket} ->
- {ok, []}
+ _ ->
+ close(Socket),
+ {error, address}
end.
names_loop(Socket, Acc, Ps) ->
diff --git a/lib/kernel/src/erl_reply.erl b/lib/kernel/src/erl_reply.erl
index 1a61e630bc..f0be3ee654 100644
--- a/lib/kernel/src/erl_reply.erl
+++ b/lib/kernel/src/erl_reply.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,7 +32,7 @@ reply([Addr,Port,Msg]) ->
P = list_to_integer(atom_to_list(Port)),
M = atom_to_list(Msg),
{ok, S} = gen_tcp:connect(Ip,P,[]),
- gen_tcp:send(S,M),
+ ok = gen_tcp:send(S,M),
gen_tcp:close(S),
reply_done;
reply(_) ->
diff --git a/lib/kernel/src/error_logger.erl b/lib/kernel/src/error_logger.erl
index 92c1eb80dc..b8fbf02feb 100644
--- a/lib/kernel/src/error_logger.erl
+++ b/lib/kernel/src/error_logger.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -245,16 +245,18 @@ notify(Msg) ->
-spec swap_handler(Type :: swap_handler_type()) -> any().
swap_handler(tty) ->
- gen_event:swap_handler(error_logger, {error_logger, swap},
- {error_logger_tty_h, []}),
- simple_logger();
+ R = gen_event:swap_handler(error_logger, {error_logger, swap},
+ {error_logger_tty_h, []}),
+ ok = simple_logger(),
+ R;
swap_handler({logfile, File}) ->
- gen_event:swap_handler(error_logger, {error_logger, swap},
- {error_logger_file_h, File}),
- simple_logger();
+ R = gen_event:swap_handler(error_logger, {error_logger, swap},
+ {error_logger_file_h, File}),
+ ok = simple_logger(),
+ R;
swap_handler(silent) ->
- gen_event:delete_handler(error_logger, error_logger, delete),
- simple_logger();
+ _ = gen_event:delete_handler(error_logger, error_logger, delete),
+ ok = simple_logger();
swap_handler(false) ->
ok. % keep primitive event handler as-is
diff --git a/lib/kernel/src/erts_debug.erl b/lib/kernel/src/erts_debug.erl
index 6654cd9ee7..ef605d0bfe 100644
--- a/lib/kernel/src/erts_debug.erl
+++ b/lib/kernel/src/erts_debug.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -182,6 +182,11 @@ size(Tuple, Seen0, Sum0) when is_tuple(Tuple) ->
Sum = Sum0 + 1 + tuple_size(Tuple),
tuple_size(1, tuple_size(Tuple), Tuple, Seen, Sum)
end;
+size(Map, Seen0, Sum) when is_map(Map) ->
+ case remember_term(Map, Seen0) of
+ seen -> {Sum,Seen0};
+ Seen -> map_size(Map, Seen, Sum)
+ end;
size(Fun, Seen0, Sum) when is_function(Fun) ->
case remember_term(Fun, Seen0) of
seen -> {Sum,Seen0};
@@ -203,6 +208,12 @@ tuple_size(I, Sz, Tuple, Seen0, Sum0) ->
{Sum,Seen} = size(element(I, Tuple), Seen0, Sum0),
tuple_size(I+1, Sz, Tuple, Seen, Sum).
+map_size(Map,Seen0,Sum0) ->
+ Kt = erts_internal:map_to_tuple_keys(Map),
+ Vs = maps:values(Map),
+ {Sum1,Seen1} = size(Kt,Seen0,Sum0),
+ fold_size(Vs,Seen1,Sum1+length(Vs)+3).
+
fun_size(Fun, Seen, Sum) ->
case erlang:fun_info(Fun, type) of
{type,external} ->
@@ -210,14 +221,14 @@ fun_size(Fun, Seen, Sum) ->
{type,local} ->
Sz = erts_debug:flat_size(fun() -> ok end),
{env,Env} = erlang:fun_info(Fun, env),
- fun_size_1(Env, Seen, Sum+Sz+length(Env))
+ fold_size(Env, Seen, Sum+Sz+length(Env))
end.
-fun_size_1([H|T], Seen0, Sum0) ->
+fold_size([H|T], Seen0, Sum0) ->
{Sum,Seen} = size(H, Seen0, Sum0),
- fun_size_1(T, Seen, Sum);
-fun_size_1([], Seen, Sum) -> {Sum,Seen}.
-
+ fold_size(T, Seen, Sum);
+fold_size([], Seen, Sum) -> {Sum,Seen}.
+
remember_term(Term, Seen) ->
case gb_trees:lookup(Term, Seen) of
none -> gb_trees:insert(Term, [Term], Seen);
@@ -288,7 +299,7 @@ dff(Name, Fs) when is_list(Name) ->
try
dff(F, Fs)
after
- file:close(F)
+ _ = file:close(F)
end;
{error,Reason} ->
{error,{badopen,Reason}}
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 36289053eb..3d6665a36a 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -95,7 +95,8 @@
Delay :: non_neg_integer()}
| 'delayed_write' | {'read_ahead', Size :: pos_integer()}
| 'read_ahead' | 'compressed'
- | {'encoding', unicode:encoding()}.
+ | {'encoding', unicode:encoding()}
+ | sync.
-type deep_list() :: [char() | atom() | deep_list()].
-type name() :: string() | atom() | deep_list().
-type name_all() :: string() | atom() | deep_list() | (RawFilename :: binary()).
@@ -110,20 +111,13 @@
-type date_time() :: calendar:datetime().
-type posix_file_advise() :: 'normal' | 'sequential' | 'random'
| 'no_reuse' | 'will_need' | 'dont_need'.
--type sendfile_option() :: {chunk_size, non_neg_integer()}.
+-type sendfile_option() :: {chunk_size, non_neg_integer()}
+ | {use_threads, boolean()}.
-type file_info_option() :: {'time', 'local'} | {'time', 'universal'}
- | {'time', 'posix'}.
+ | {'time', 'posix'} | raw.
%%% BIFs
--export([file_info/1, native_name_encoding/0]).
-
--spec file_info(Filename) -> {ok, FileInfo} | {error, Reason} when
- Filename :: name_all(),
- FileInfo :: file_info(),
- Reason :: posix() | badarg.
-
-file_info(_) ->
- erlang:nif_error(undef).
+-export([native_name_encoding/0]).
-spec native_name_encoding() -> latin1 | utf8.
@@ -197,7 +191,8 @@ get_cwd(Drive) ->
check_and_call(get_cwd, [file_name(Drive)]).
-spec set_cwd(Dir) -> ok | {error, Reason} when
- Dir :: name(),
+ Dir :: name() | EncodedBinary,
+ EncodedBinary :: binary(),
Reason :: posix() | badarg | no_translation.
set_cwd(Dirname) ->
@@ -247,7 +242,19 @@ read_file_info(Name) ->
Reason :: posix() | badarg.
read_file_info(Name, Opts) when is_list(Opts) ->
- check_and_call(read_file_info, [file_name(Name), Opts]).
+ Args = [file_name(Name), Opts],
+ case check_args(Args) of
+ ok ->
+ case lists:member(raw, Opts) of
+ true ->
+ [FileName|_] = Args,
+ ?PRIM_FILE:read_file_info(FileName, Opts);
+ false ->
+ call(read_file_info, Args)
+ end;
+ Error ->
+ Error
+ end.
-spec altname(Name :: name_all()) -> any().
@@ -269,7 +276,19 @@ read_link_info(Name) ->
Reason :: posix() | badarg.
read_link_info(Name, Opts) when is_list(Opts) ->
- check_and_call(read_link_info, [file_name(Name),Opts]).
+ Args = [file_name(Name), Opts],
+ case check_args(Args) of
+ ok ->
+ case lists:member(raw, Opts) of
+ true ->
+ [FileName|_] = Args,
+ ?PRIM_FILE:read_link_info(FileName, Opts);
+ false ->
+ call(read_link_info, Args)
+ end;
+ Error ->
+ Error
+ end.
-spec read_link(Name) -> {ok, Filename} | {error, Reason} when
@@ -303,7 +322,19 @@ write_file_info(Name, Info = #file_info{}) ->
Reason :: posix() | badarg.
write_file_info(Name, Info = #file_info{}, Opts) when is_list(Opts) ->
- check_and_call(write_file_info, [file_name(Name), Info, Opts]).
+ Args = [file_name(Name), Info, Opts],
+ case check_args(Args) of
+ ok ->
+ case lists:member(raw, Opts) of
+ true ->
+ [FileName|_] = Args,
+ ?PRIM_FILE:write_file_info(FileName, Info, Opts);
+ false ->
+ call(write_file_info, Args)
+ end;
+ Error ->
+ Error
+ end.
-spec list_dir(Dir) -> {ok, Filenames} | {error, Reason} when
Dir :: name_all(),
@@ -376,7 +407,7 @@ write_file(Name, Bin, ModeList) when is_list(ModeList) ->
ok ->
close(Handle);
E1 ->
- close(Handle),
+ _ = close(Handle),
E1
end;
E2 ->
@@ -389,26 +420,12 @@ write_file(Name, Bin, ModeList) when is_list(ModeList) ->
%% Obsolete, undocumented, local node only, don't use!.
%% XXX to be removed.
raw_read_file_info(Name) ->
- Args = [file_name(Name)],
- case check_args(Args) of
- ok ->
- [FileName] = Args,
- ?PRIM_FILE:read_file_info(FileName);
- Error ->
- Error
- end.
+ read_file_info(Name, [raw]).
%% Obsolete, undocumented, local node only, don't use!.
%% XXX to be removed.
raw_write_file_info(Name, #file_info{} = Info) ->
- Args = [file_name(Name)],
- case check_args(Args) of
- ok ->
- [FileName] = Args,
- ?PRIM_FILE:write_file_info(FileName, Info);
- Error ->
- Error
- end.
+ write_file_info(Name, Info, [raw]).
%%%-----------------------------------------------------------------
%%% File io server functions.
@@ -770,7 +787,7 @@ copy_int({SourceName, SourceOpts}, Dest, Length)
case open(Source, [read | SourceOpts]) of
{ok, Handle} ->
Result = copy_opened_int(Handle, Dest, Length, 0),
- close(Handle),
+ _ = close(Handle),
Result;
{error, _} = Error ->
Error
@@ -786,9 +803,16 @@ copy_int(Source, {DestName, DestOpts}, Length)
Dest ->
case open(Dest, [write | DestOpts]) of
{ok, Handle} ->
- Result = copy_opened_int(Source, Handle, Length, 0),
- close(Handle),
- Result;
+ case copy_opened_int(Source, Handle, Length, 0) of
+ {ok, _} = OK ->
+ case close(Handle) of
+ ok -> OK;
+ Error -> Error
+ end;
+ Error ->
+ _ = close(Handle),
+ Error
+ end;
{error, _} = Error ->
Error
end
@@ -957,7 +981,7 @@ consult(File) ->
case open(File, [read]) of
{ok, Fd} ->
R = consult_stream(Fd),
- close(Fd),
+ _ = close(Fd),
R;
Error ->
Error
@@ -977,10 +1001,10 @@ path_consult(Path, File) ->
{ok, Fd, Full} ->
case consult_stream(Fd) of
{ok, List} ->
- close(Fd),
+ _ = close(Fd),
{ok, List, Full};
E1 ->
- close(Fd),
+ _ = close(Fd),
E1
end;
E2 ->
@@ -1005,7 +1029,7 @@ eval(File, Bs) ->
case open(File, [read]) of
{ok, Fd} ->
R = eval_stream(Fd, ignore, Bs),
- close(Fd),
+ _ = close(Fd),
R;
Error ->
Error
@@ -1035,10 +1059,10 @@ path_eval(Path, File, Bs) ->
{ok, Fd, Full} ->
case eval_stream(Fd, ignore, Bs) of
ok ->
- close(Fd),
+ _ = close(Fd),
{ok, Full};
E1 ->
- close(Fd),
+ _ = close(Fd),
E1
end;
E2 ->
@@ -1065,7 +1089,7 @@ script(File, Bs) ->
case open(File, [read]) of
{ok, Fd} ->
R = eval_stream(Fd, return, Bs),
- close(Fd),
+ _ = close(Fd),
R;
Error ->
Error
@@ -1098,10 +1122,10 @@ path_script(Path, File, Bs) ->
{ok,Fd,Full} ->
case eval_stream(Fd, return, Bs) of
{ok,R} ->
- close(Fd),
+ _ = close(Fd),
{ok, R, Full};
E1 ->
- close(Fd),
+ _ = close(Fd),
E1
end;
E2 ->
@@ -1221,8 +1245,7 @@ change_time(Name, {{AY, AM, AD}, {AH, AMin, ASec}}=Atime,
sendfile(File, _Sock, _Offet, _Bytes, _Opts) when is_pid(File) ->
{error, badarg};
sendfile(File, Sock, Offset, Bytes, []) ->
- sendfile(File, Sock, Offset, Bytes, ?MAX_CHUNK_SIZE, [], [],
- false, false, false);
+ sendfile(File, Sock, Offset, Bytes, ?MAX_CHUNK_SIZE, [], [], []);
sendfile(File, Sock, Offset, Bytes, Opts) ->
ChunkSize0 = proplists:get_value(chunk_size, Opts, ?MAX_CHUNK_SIZE),
ChunkSize = if ChunkSize0 > ?MAX_CHUNK_SIZE ->
@@ -1232,8 +1255,7 @@ sendfile(File, Sock, Offset, Bytes, Opts) ->
%% Support for headers, trailers and options has been removed because the
%% Darwin and BSD API for using it does not play nice with
%% non-blocking sockets. See unix_efile.c for more info.
- sendfile(File, Sock, Offset, Bytes, ChunkSize, [], [],
- false,false,false).
+ sendfile(File, Sock, Offset, Bytes, ChunkSize, [], [], Opts).
%% sendfile/2
-spec sendfile(Filename, Socket) ->
@@ -1247,23 +1269,23 @@ sendfile(Filename, Sock) ->
{error, Reason};
{ok, Fd} ->
Res = sendfile(Fd, Sock, 0, 0, []),
- file:close(Fd),
+ _ = file:close(Fd),
Res
end.
%% Internal sendfile functions
sendfile(#file_descriptor{ module = Mod } = Fd, Sock, Offset, Bytes,
- ChunkSize, Headers, Trailers, Nodiskio, MNowait, Sync)
+ ChunkSize, Headers, Trailers, Opts)
when is_port(Sock) ->
case Mod:sendfile(Fd, Sock, Offset, Bytes, ChunkSize, Headers, Trailers,
- Nodiskio, MNowait, Sync) of
+ Opts) of
{error, enotsup} ->
sendfile_fallback(Fd, Sock, Offset, Bytes, ChunkSize,
Headers, Trailers);
Else ->
Else
end;
-sendfile(_,_,_,_,_,_,_,_,_,_) ->
+sendfile(_,_,_,_,_,_,_,_) ->
{error, badarg}.
%%%
@@ -1298,7 +1320,7 @@ sendfile_fallback(File, Sock, Offset, Bytes, ChunkSize) ->
{ok, CurrPos} = file:position(File, {cur, 0}),
{ok, _NewPos} = file:position(File, {bof, Offset}),
Res = sendfile_fallback_int(File, Sock, Bytes, ChunkSize, 0),
- file:position(File, {bof, CurrPos}),
+ _ = file:position(File, {bof, CurrPos}),
Res.
diff --git a/lib/kernel/src/file_io_server.erl b/lib/kernel/src/file_io_server.erl
index 0bcb1a658b..0e9ff5bc0f 100644
--- a/lib/kernel/src/file_io_server.erl
+++ b/lib/kernel/src/file_io_server.erl
@@ -162,29 +162,29 @@ server_loop(#state{mref = Mref} = State) ->
{file_request, From, ReplyAs, Request} when is_pid(From) ->
case file_request(Request, State) of
{reply, Reply, NewState} ->
- file_reply(From, ReplyAs, Reply),
+ _ = file_reply(From, ReplyAs, Reply),
server_loop(NewState);
{error, Reply, NewState} ->
%% error is the same as reply, except that
%% it breaks the io_request_loop further down
- file_reply(From, ReplyAs, Reply),
+ _ = file_reply(From, ReplyAs, Reply),
server_loop(NewState);
{stop, Reason, Reply, _NewState} ->
- file_reply(From, ReplyAs, Reply),
+ _ = file_reply(From, ReplyAs, Reply),
exit(Reason)
end;
{io_request, From, ReplyAs, Request} when is_pid(From) ->
case io_request(Request, State) of
{reply, Reply, NewState} ->
- io_reply(From, ReplyAs, Reply),
+ _ = io_reply(From, ReplyAs, Reply),
server_loop(NewState);
{error, Reply, NewState} ->
%% error is the same as reply, except that
%% it breaks the io_request_loop further down
- io_reply(From, ReplyAs, Reply),
+ _ = io_reply(From, ReplyAs, Reply),
server_loop(NewState);
{stop, Reason, Reply, _NewState} ->
- io_reply(From, ReplyAs, Reply),
+ _ = io_reply(From, ReplyAs, Reply),
exit(Reason)
end;
{'DOWN', Mref, _, _, Reason} ->
diff --git a/lib/kernel/src/file_server.erl b/lib/kernel/src/file_server.erl
index d036dbb516..eabf0401a3 100644
--- a/lib/kernel/src/file_server.erl
+++ b/lib/kernel/src/file_server.erl
@@ -78,7 +78,8 @@ init([]) ->
process_flag(trap_exit, true),
case ?PRIM_FILE:start() of
{ok, Handle} ->
- ets:new(?FILE_IO_SERVER_TABLE, [named_table]),
+ ?FILE_IO_SERVER_TABLE =
+ ets:new(?FILE_IO_SERVER_TABLE, [named_table]),
{ok, Handle};
{error, Reason} ->
{stop, Reason}
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl
index 067e07304d..adaa3159ec 100644
--- a/lib/kernel/src/gen_sctp.erl
+++ b/lib/kernel/src/gen_sctp.erl
@@ -36,7 +36,7 @@
-type assoc_id() :: term().
-type option() ::
- {active, true | false | once} |
+ {active, true | false | once | -32768..32767} |
{buffer, non_neg_integer()} |
{dontroute, boolean()} |
{high_msgq_watermark, pos_integer()} |
@@ -274,7 +274,7 @@ do_connect(S, Addr, Port, Opts, Timeout, ConnWait) when is_port(S), is_list(Opts
Mod:connect(S, IP, Port, Opts, ConnectTimer);
Error -> Error
after
- inet:stop_timer(Timer)
+ _ = inet:stop_timer(Timer)
end
catch
error:badarg ->
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index a98ed4c238..bc8ffbe5e3 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -30,7 +30,7 @@
-include("file.hrl").
-type option() ::
- {active, true | false | once} |
+ {active, true | false | once | -32768..32767} |
{buffer, non_neg_integer()} |
{delay_send, boolean()} |
{deliver, port | term} |
@@ -139,7 +139,7 @@ connect(Address, Port, Opts) ->
connect(Address, Port, Opts, Time) ->
Timer = inet:start_timer(Time),
Res = (catch connect1(Address,Port,Opts,Timer)),
- inet:stop_timer(Timer),
+ _ = inet:stop_timer(Timer),
case Res of
{ok,S} -> {ok,S};
{error, einval} -> exit(badarg);
diff --git a/lib/kernel/src/gen_udp.erl b/lib/kernel/src/gen_udp.erl
index e82b11d2ef..860eec10a0 100644
--- a/lib/kernel/src/gen_udp.erl
+++ b/lib/kernel/src/gen_udp.erl
@@ -26,7 +26,7 @@
-include("inet_int.hrl").
-type option() ::
- {active, true | false | once} |
+ {active, true | false | once | -32768..32767} |
{add_membership, {inet:ip_address(), inet:ip_address()}} |
{broadcast, boolean()} |
{buffer, non_neg_integer()} |
@@ -78,7 +78,7 @@
ipv6_v6only.
-type socket() :: port().
--export_type([option/0, option_name/0]).
+-export_type([option/0, option_name/0, socket/0]).
-spec open(Port) -> {ok, Socket} | {error, Reason} when
Port :: inet:port_number(),
diff --git a/lib/kernel/src/global.erl b/lib/kernel/src/global.erl
index b24a9d5eac..0a4edea452 100644
--- a/lib/kernel/src/global.erl
+++ b/lib/kernel/src/global.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1513,14 +1513,18 @@ delete_global_name(_Name, _Pid) ->
-record(him, {node, locker, vsn, my_tag}).
start_the_locker(DoTrace) ->
- spawn_link(fun() -> init_the_locker(DoTrace) end).
+ spawn_link(init_the_locker_fun(DoTrace)).
-init_the_locker(DoTrace) ->
- process_flag(trap_exit, true), % needed?
- S0 = #multi{do_trace = DoTrace},
- S1 = update_locker_known({add, get_known()}, S0),
- loop_the_locker(S1),
- erlang:error(locker_exited).
+-spec init_the_locker_fun(boolean()) -> fun(() -> no_return()).
+
+init_the_locker_fun(DoTrace) ->
+ fun() ->
+ process_flag(trap_exit, true), % needed?
+ S0 = #multi{do_trace = DoTrace},
+ S1 = update_locker_known({add, get_known()}, S0),
+ loop_the_locker(S1),
+ erlang:error(locker_exited)
+ end.
loop_the_locker(S) ->
?trace({loop_the_locker,S}),
@@ -2069,7 +2073,8 @@ random_sleep(Times) ->
case get(random_seed) of
undefined ->
{A1, A2, A3} = now(),
- random:seed(A1, A2, A3 + erlang:phash(node(), 100000));
+ _ = random:seed(A1, A2, A3 + erlang:phash(node(), 100000)),
+ ok;
_ -> ok
end,
%% First time 1/4 seconds, then doubling each time up to 8 seconds max.
diff --git a/lib/kernel/src/global_group.erl b/lib/kernel/src/global_group.erl
index 025a9b8a5b..da8b573749 100644
--- a/lib/kernel/src/global_group.erl
+++ b/lib/kernel/src/global_group.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1149,9 +1149,14 @@ do_unlink(Pid, State) ->
%%%====================================================================================
%%% Send a nodeup/down messages to monitoring Pids in the own global group.
%%%====================================================================================
-send_monitor([P|T], M, no_conf) -> safesend_nc(P, M), send_monitor(T, M, no_conf);
-send_monitor([P|T], M, SyncState) -> safesend(P, M), send_monitor(T, M, SyncState);
-send_monitor([], _, _) -> ok.
+send_monitor([P|T], M, no_conf) ->
+ _ = safesend_nc(P, M),
+ send_monitor(T, M, no_conf);
+send_monitor([P|T], M, SyncState) ->
+ _ = safesend(P, M),
+ send_monitor(T, M, SyncState);
+send_monitor([], _, _) ->
+ ok.
safesend(Name, {Msg, Node}) when is_atom(Name) ->
case lists:member(Node, get_own_nodes()) of
diff --git a/lib/kernel/src/group.erl b/lib/kernel/src/group.erl
index ff835e1047..b36dbf33dd 100644
--- a/lib/kernel/src/group.erl
+++ b/lib/kernel/src/group.erl
@@ -309,15 +309,17 @@ io_requests([], Stat, _) ->
%% The ACK contains the return value.
io_reply(From, ReplyAs, Reply) ->
- From ! {io_reply,ReplyAs,Reply}.
+ From ! {io_reply,ReplyAs,Reply},
+ ok.
%% send_drv(Drv, Message)
%% send_drv_reqs(Drv, Requests)
send_drv(Drv, Msg) ->
- Drv ! {self(),Msg}.
+ Drv ! {self(),Msg},
+ ok.
-send_drv_reqs(_Drv, []) -> [];
+send_drv_reqs(_Drv, []) -> ok;
send_drv_reqs(Drv, Rs) ->
send_drv(Drv, {requests,Rs}).
diff --git a/lib/kernel/src/heart.erl b/lib/kernel/src/heart.erl
index 87cb9d7f51..daed6dd488 100644
--- a/lib/kernel/src/heart.erl
+++ b/lib/kernel/src/heart.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -182,20 +182,24 @@ wait_ack(Port) ->
end.
loop(Parent, Port, Cmd) ->
- send_heart_beat(Port),
+ _ = send_heart_beat(Port),
receive
- {From, set_cmd, NewCmd} when length(NewCmd) < 2047 ->
- send_heart_cmd(Port, NewCmd),
- wait_ack(Port),
- From ! {heart, ok},
- loop(Parent, Port, NewCmd);
- {From, set_cmd, NewCmd} ->
- From ! {heart, {error, {bad_cmd, NewCmd}}},
- loop(Parent, Port, Cmd);
+ {From, set_cmd, NewCmd0} ->
+ Enc = file:native_name_encoding(),
+ case catch unicode:characters_to_binary(NewCmd0,Enc,Enc) of
+ NewCmd when is_binary(NewCmd), byte_size(NewCmd) < 2047 ->
+ _ = send_heart_cmd(Port, NewCmd),
+ _ = wait_ack(Port),
+ From ! {heart, ok},
+ loop(Parent, Port, NewCmd);
+ _ ->
+ From ! {heart, {error, {bad_cmd, NewCmd0}}},
+ loop(Parent, Port, Cmd)
+ end;
{From, clear_cmd} ->
From ! {heart, ok},
- send_heart_cmd(Port, ""),
- wait_ack(Port),
+ _ = send_heart_cmd(Port, ""),
+ _ = wait_ack(Port),
loop(Parent, Port, "");
{From, get_cmd} ->
From ! {heart, get_heart_cmd(Port)},
@@ -222,7 +226,7 @@ loop(Parent, Port, Cmd) ->
-spec no_reboot_shutdown(port()) -> no_return().
no_reboot_shutdown(Port) ->
- send_shutdown(Port),
+ _ = send_shutdown(Port),
receive
{'EXIT', Port, Reason} when Reason =/= badsig ->
exit(normal)
@@ -232,10 +236,10 @@ do_cycle_port_program(Caller, Parent, Port, Cmd) ->
unregister(?HEART_PORT_NAME),
case catch start_portprogram() of
{ok, NewPort} ->
- send_shutdown(Port),
+ _ = send_shutdown(Port),
receive
{'EXIT', Port, _Reason} ->
- send_heart_cmd(NewPort, Cmd),
+ _ = send_heart_cmd(NewPort, Cmd),
Caller ! {heart, ok},
loop(Parent, NewPort, Cmd)
after
@@ -243,7 +247,7 @@ do_cycle_port_program(Caller, Parent, Port, Cmd) ->
%% Huh! Two heart port programs running...
%% well, the old one has to be sick not to respond
%% so we'll settle for the new one...
- send_heart_cmd(NewPort, Cmd),
+ _ = send_heart_cmd(NewPort, Cmd),
Caller ! {heart, {error, stop_error}},
loop(Parent, NewPort, Cmd)
end;
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index 0a0e6003ee..e5928c7b63 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -194,6 +194,13 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
CodeSize, CodeBinary, Refs,
0,[] % ColdSize, CRrefs
] = binary_to_term(Bin),
+ ?debug_msg("***** ErLLVM *****~nVersion: ~s~nCheckSum: ~w~nConstAlign: ~w~n" ++
+ "ConstSize: ~w~nConstMap: ~w~nLabelMap: ~w~nExportMap ~w~nRefs ~w~n",
+ [Version, CheckSum, ConstAlign, ConstSize, ConstMap, LabelMap, ExportMap,
+ Refs]),
+ %% Write HiPE binary code to a file in the current directory in order to
+ %% debug by disassembling.
+ %% file:write_file("erl.o", CodeBinary, [binary]),
%% Check that we are loading up-to-date code.
version_check(Version, Mod),
case hipe_bifs:check_crc(CheckSum) of
@@ -203,6 +210,7 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
"please regenerate native code for this runtime system\n", [Mod]),
bad_crc;
true ->
+ put(closures_to_patch, []),
%% Create data segment
{ConstAddr,ConstMap2} =
create_data_segment(ConstAlign, ConstSize, ConstMap),
@@ -220,17 +228,28 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
{MFAs,Addresses} = exports(ExportMap, CodeAddress),
%% Remove references to old versions of the module.
ReferencesToPatch = get_refs_from(MFAs, []),
+ %% io:format("References to patch: ~w~n", [ReferencesToPatch]),
ok = remove_refs_from(MFAs),
%% Patch all dynamic references in the code.
%% Function calls, Atoms, Constants, System calls
ok = patch(Refs, CodeAddress, ConstMap2, Addresses, TrampolineMap),
+
%% Tell the system where the loaded funs are.
%% (patches the BEAM code to redirect to native.)
case Beam of
[] ->
- export_funs(Addresses);
+ %% This module was previously loaded as BEAM code during system
+ %% start-up before the code server has started (-enable-native-libs
+ %% is active), so we must now patch the pre-existing entries in the
+ %% fun table with the native code addresses for all closures.
+ lists:foreach(fun({FE, DestAddress}) ->
+ hipe_bifs:set_native_address_in_fe(FE, DestAddress)
+ end, erase(closures_to_patch)),
+ export_funs(Addresses),
+ ok;
BeamBinary when is_binary(BeamBinary) ->
%% Find all closures in the code.
+ [] = erase(closures_to_patch), %Clean up, assertion.
ClosurePatches = find_closure_patches(Refs),
AddressesOfClosuresToPatch =
calculate_addresses(ClosurePatches, CodeAddress, Addresses),
@@ -243,6 +262,9 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
%% The call to export_funs/1 above updated the native addresses
%% for the targets, so passing 'Addresses' is not needed.
redirect(ReferencesToPatch),
+ %% Final clean up.
+ _ = erase(hipe_patch_closures),
+ _ = erase(hipe_assert_code_area),
?debug_msg("****************Loader Finished****************\n", []),
{module,Mod} % for compatibility with code:load_file/1
end.
@@ -560,12 +582,17 @@ patch_closure(DestMFA, Uniq, Index, Address, Addresses) ->
case get(hipe_patch_closures) of
false ->
[]; % This is taken care of when registering the module.
- true -> % We are not loading a module patch these closures
+ true ->
+ %% We are replacing a previosly loaded BEAM module with native code,
+ %% so we must reference the pre-existing entries in the fun table
+ %% from the native code. We must delay actually patching the native
+ %% address into the fun entry to ensure that the native code cannot
+ %% be called until it has been completely fixed up.
RemoteOrLocal = local, % closure code refs are local
DestAddress = get_native_address(DestMFA, Addresses, RemoteOrLocal),
BEAMAddress = hipe_bifs:fun_to_address(DestMFA),
- FE = hipe_bifs:make_fe(DestAddress, mod(DestMFA),
- {Uniq, Index, BEAMAddress}),
+ FE = hipe_bifs:get_fe(mod(DestMFA), {Uniq, Index, BEAMAddress}),
+ put(closures_to_patch, [{FE,DestAddress}|get(closures_to_patch)]),
?debug_msg("Patch FE(~w) to 0x~.16b->0x~.16b (emu:0x~.16b)\n",
[DestMFA, FE, DestAddress, BEAMAddress]),
?ASSERT(assert_local_patch(Address)),
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index b1c9d56c2d..ec2c350931 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -457,7 +457,7 @@ gethostbyname(Name,Family) ->
gethostbyname(Name,Family,Timeout) ->
Timer = start_timer(Timeout),
Res = gethostbyname_tm(Name,Family,Timer),
- stop_timer(Timer),
+ _ = stop_timer(Timer),
Res.
gethostbyname_tm(Name,Family,Timer) ->
@@ -488,7 +488,7 @@ gethostbyaddr(Address) ->
gethostbyaddr(Address,Timeout) ->
Timer = start_timer(Timeout),
Res = gethostbyaddr_tm(Address, Timer),
- stop_timer(Timer),
+ _ = stop_timer(Timer),
Res.
gethostbyaddr_tm(Address,Timer) ->
@@ -543,7 +543,7 @@ getaddr(Address, Family) ->
getaddr(Address, Family, Timeout) ->
Timer = start_timer(Timeout),
Res = getaddr_tm(Address, Family, Timer),
- stop_timer(Timer),
+ _ = stop_timer(Timer),
Res.
getaddr_tm(Address, Family, Timer) ->
@@ -569,7 +569,7 @@ getaddrs(Address, Family) ->
getaddrs(Address, Family, Timeout) ->
Timer = start_timer(Timeout),
Res = getaddrs_tm(Address, Family, Timer),
- stop_timer(Timer),
+ _ = stop_timer(Timer),
Res.
-spec getservbyport(Port :: port_number(), Protocol :: atom() | string()) ->
@@ -597,8 +597,7 @@ getservbyname(Name, Protocol) when is_atom(Name) ->
Error -> Error
end.
--spec ntoa(IpAddress) ->
- {ok, Address} | {error, einval} when
+-spec ntoa(IpAddress) -> Address | {error, einval} when
Address :: string(),
IpAddress :: ip_address().
ntoa(Addr) ->
@@ -696,9 +695,9 @@ connect_options(Opts, Family) ->
Error -> Error
end.
-con_opt([{raw,A,B,C}|Opts],R,As) ->
+con_opt([{raw,A,B,C}|Opts],#connect_opts{} = R,As) ->
con_opt([{raw,{A,B,C}}|Opts],R,As);
-con_opt([Opt | Opts], R, As) ->
+con_opt([Opt | Opts], #connect_opts{} = R, As) ->
case Opt of
{ip,IP} -> con_opt(Opts, R#connect_opts { ifaddr = IP }, As);
{ifaddr,IP} -> con_opt(Opts, R#connect_opts { ifaddr = IP }, As);
@@ -717,13 +716,16 @@ con_opt([Opt | Opts], R, As) ->
false ->
{error, badarg}
end;
+ {active,N} when is_integer(N), N < 32768, N >= -32768 ->
+ NOpts = lists:keydelete(active, 1, R#connect_opts.opts),
+ con_opt(Opts, R#connect_opts { opts = [{active,N}|NOpts] }, As);
{Name,Val} when is_atom(Name) -> con_add(Name, Val, R, Opts, As);
_ -> {error, badarg}
end;
-con_opt([], R, _) ->
+con_opt([], #connect_opts{} = R, _) ->
{ok, R}.
-con_add(Name, Val, R, Opts, AllOpts) ->
+con_add(Name, Val, #connect_opts{} = R, Opts, AllOpts) ->
case add_opt(Name, Val, R#connect_opts.opts, AllOpts) of
{ok, SOpts} ->
con_opt(Opts, R#connect_opts { opts = SOpts }, AllOpts);
@@ -761,9 +763,9 @@ listen_options(Opts, Family) ->
Error -> Error
end.
-list_opt([{raw,A,B,C}|Opts], R, As) ->
+list_opt([{raw,A,B,C}|Opts], #listen_opts{} = R, As) ->
list_opt([{raw,{A,B,C}}|Opts], R, As);
-list_opt([Opt | Opts], R, As) ->
+list_opt([Opt | Opts], #listen_opts{} = R, As) ->
case Opt of
{ip,IP} -> list_opt(Opts, R#listen_opts { ifaddr = IP }, As);
{ifaddr,IP} -> list_opt(Opts, R#listen_opts { ifaddr = IP }, As);
@@ -783,13 +785,16 @@ list_opt([Opt | Opts], R, As) ->
false ->
{error, badarg}
end;
+ {active,N} when is_integer(N), N < 32768, N >= -32768 ->
+ NOpts = lists:keydelete(active, 1, R#listen_opts.opts),
+ list_opt(Opts, R#listen_opts { opts = [{active,N}|NOpts] }, As);
{Name,Val} when is_atom(Name) -> list_add(Name, Val, R, Opts, As);
_ -> {error, badarg}
end;
-list_opt([], R, _SockOpts) ->
+list_opt([], #listen_opts{} = R, _SockOpts) ->
{ok, R}.
-list_add(Name, Val, R, Opts, As) ->
+list_add(Name, Val, #listen_opts{} = R, Opts, As) ->
case add_opt(Name, Val, R#listen_opts.opts, As) of
{ok, SOpts} ->
list_opt(Opts, R#listen_opts { opts = SOpts }, As);
@@ -816,9 +821,9 @@ udp_options(Opts, Family) ->
Error -> Error
end.
-udp_opt([{raw,A,B,C}|Opts], R, As) ->
+udp_opt([{raw,A,B,C}|Opts], #udp_opts{} = R, As) ->
udp_opt([{raw,{A,B,C}}|Opts], R, As);
-udp_opt([Opt | Opts], R, As) ->
+udp_opt([Opt | Opts], #udp_opts{} = R, As) ->
case Opt of
{ip,IP} -> udp_opt(Opts, R#udp_opts { ifaddr = IP }, As);
{ifaddr,IP} -> udp_opt(Opts, R#udp_opts { ifaddr = IP }, As);
@@ -833,17 +838,20 @@ udp_opt([Opt | Opts], R, As) ->
BinNS = filename2binary(NS),
case prim_inet:is_sockopt_val(netns, BinNS) of
true ->
- list_opt(Opts, R#udp_opts { fd = [{netns,BinNS}] }, As);
+ udp_opt(Opts, R#udp_opts { fd = [{netns,BinNS}] }, As);
false ->
{error, badarg}
end;
+ {active,N} when is_integer(N), N < 32768, N >= -32768 ->
+ NOpts = lists:keydelete(active, 1, R#udp_opts.opts),
+ udp_opt(Opts, R#udp_opts { opts = [{active,N}|NOpts] }, As);
{Name,Val} when is_atom(Name) -> udp_add(Name, Val, R, Opts, As);
_ -> {error, badarg}
end;
-udp_opt([], R, _SockOpts) ->
+udp_opt([], #udp_opts{} = R, _SockOpts) ->
{ok, R}.
-udp_add(Name, Val, R, Opts, As) ->
+udp_add(Name, Val, #udp_opts{} = R, Opts, As) ->
case add_opt(Name, Val, R#udp_opts.opts, As) of
{ok, SOpts} ->
udp_opt(Opts, R#udp_opts { opts = SOpts }, As);
@@ -855,7 +863,7 @@ udp_add(Name, Val, R, Opts, As) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Currently supported options include:
% (*) {mode, list|binary} or just list|binary
-% (*) {active, true|false|once}
+% (*) {active, true|false|once|N}
% (*) {sctp_module, inet_sctp|inet6_sctp} or just inet|inet6
% (*) options set via setsockopt.
% The full list is below in sctp_options/0 .
@@ -887,7 +895,7 @@ sctp_options(Opts, Mod) ->
Error -> Error
end.
-sctp_opt([Opt|Opts], Mod, R, As) ->
+sctp_opt([Opt|Opts], Mod, #sctp_opts{} = R, As) ->
case Opt of
{ip,IP} ->
sctp_opt_ifaddr(Opts, Mod, R, As, IP);
@@ -917,6 +925,9 @@ sctp_opt([Opt|Opts], Mod, R, As) ->
false ->
{error, badarg}
end;
+ {active,N} when is_integer(N), N < 32768, N >= -32768 ->
+ NOpts = lists:keydelete(active, 1, R#sctp_opts.opts),
+ sctp_opt(Opts, Mod, R#sctp_opts { opts = [{active,N}|NOpts] }, As);
{Name,Val} -> sctp_opt (Opts, Mod, R, As, Name, Val);
_ -> {error,badarg}
end;
@@ -927,7 +938,7 @@ sctp_opt([], _Mod, #sctp_opts{ifaddr=IfAddr}=R, _SockOpts) ->
{ok, R}
end.
-sctp_opt(Opts, Mod, R, As, Name, Val) ->
+sctp_opt(Opts, Mod, #sctp_opts{} = R, As, Name, Val) ->
case add_opt(Name, Val, R#sctp_opts.opts, As) of
{ok,SocketOpts} ->
sctp_opt(Opts, Mod, R#sctp_opts{opts=SocketOpts}, As);
@@ -1059,7 +1070,7 @@ gethostbyname_tm(Name, Type, Timer, [wins|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
gethostbyname_tm(Name, Type, Timer, [native|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [_|_]=Opts) ->
+gethostbyname_tm(Name, Type, Timer, [_|Opts]) ->
gethostbyname_tm(Name, Type, Timer, Opts);
%% Make sure we always can look up our own hostname.
gethostbyname_tm(Name, Type, Timer, []) ->
@@ -1246,9 +1257,9 @@ open(FdO, Addr, Port, Opts, Protocol, Family, Type, Module)
Error ->
Error
end;
-open(Fd, _Addr, _Port, Opts, Protocol, Family, Type, Module)
+open(Fd, Addr, Port, Opts, Protocol, Family, Type, Module)
when is_integer(Fd) ->
- fdopen(Fd, Opts, Protocol, Family, Type, Module).
+ fdopen(Fd, Addr, Port, Opts, Protocol, Family, Type, Module).
bindx(S, [Addr], Port0) ->
{IP, Port} = set_bindx_port(Addr, Port0),
@@ -1287,12 +1298,35 @@ change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) ->
{'ok', socket()} | {'error', posix()}.
fdopen(Fd, Opts, Protocol, Family, Type, Module) ->
- case prim_inet:fdopen(Protocol, Family, Type, Fd) of
+ fdopen(Fd, any, 0, Opts, Protocol, Family, Type, Module).
+
+fdopen(Fd, Addr, Port, Opts, Protocol, Family, Type, Module) ->
+ IsAnyAddr = (Addr == {0,0,0,0} orelse Addr == {0,0,0,0,0,0,0,0}
+ orelse Addr == any),
+ Bound = Port == 0 andalso IsAnyAddr,
+ case prim_inet:fdopen(Protocol, Family, Type, Fd, Bound) of
{ok, S} ->
case prim_inet:setopts(S, Opts) of
ok ->
- inet_db:register_socket(S, Module),
- {ok, S};
+ case if
+ Bound ->
+ %% We do not do any binding if default
+ %% port+addr options where given in order
+ %% to keep backwards compatability with
+ %% pre Erlang/TOP 17
+ {ok, ok};
+ is_list(Addr) ->
+ bindx(S, Addr, Port);
+ true ->
+ prim_inet:bind(S, Addr, Port)
+ end of
+ {ok, _} ->
+ inet_db:register_socket(S, Module),
+ {ok, S};
+ Error ->
+ prim_inet:close(S),
+ Error
+ end;
Error ->
prim_inet:close(S), Error
end;
@@ -1495,7 +1529,7 @@ tcp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) ->
{ok, A0} ->
case A0 of
false -> ok;
- _ -> prim_inet:setopt(S, active, false)
+ _ -> ok = prim_inet:setopt(S, active, false)
end,
case tcp_sync_input(S, NewOwner, false) of
true -> %% socket already closed,
@@ -1506,7 +1540,7 @@ tcp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) ->
unlink(S), %% unlink from port
case A0 of
false -> ok;
- _ -> prim_inet:setopt(S, active, A0)
+ _ -> ok = prim_inet:setopt(S, active, A0)
end,
ok
catch
@@ -1549,13 +1583,12 @@ udp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) ->
{error, not_owner};
_ ->
{ok, A0} = prim_inet:getopt(S, active),
- prim_inet:setopt(S, active, false),
+ ok = prim_inet:setopt(S, active, false),
udp_sync_input(S, NewOwner),
try erlang:port_connect(S, NewOwner) of
true ->
unlink(S),
- prim_inet:setopt(S, active, A0),
- ok
+ ok = prim_inet:setopt(S, active, A0)
catch
error:Reason ->
{error, Reason}
diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl
index 2cb0e10c87..459fdc2ad5 100644
--- a/lib/kernel/src/inet6_tcp_dist.erl
+++ b/lib/kernel/src/inet6_tcp_dist.erl
@@ -92,7 +92,7 @@ accept_loop(Kernel, Listen) ->
case inet6_tcp:accept(Listen) of
{ok, Socket} ->
Kernel ! {accept,self(),Socket,inet6,tcp},
- controller(Kernel, Socket),
+ _ = controller(Kernel, Socket),
accept_loop(Kernel, Listen);
Error ->
exit(Error)
diff --git a/lib/kernel/src/inet_config.erl b/lib/kernel/src/inet_config.erl
index 2461f3ff25..fdc244f959 100644
--- a/lib/kernel/src/inet_config.erl
+++ b/lib/kernel/src/inet_config.erl
@@ -197,6 +197,9 @@ do_load_resolv({win32,Type}, longnames) ->
win32_load_from_registry(Type),
inet_db:set_lookup([native]);
+do_load_resolv({ose,_}, _) ->
+ inet_db:set_lookup([file]);
+
do_load_resolv(_, _) ->
inet_db:set_lookup([native]).
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index a7679c531b..2ebdc0f554 100644
--- a/lib/kernel/src/inet_db.erl
+++ b/lib/kernel/src/inet_db.erl
@@ -1117,7 +1117,7 @@ handle_call(Request, From, #state{db=Db}=State) ->
{set_cache_refresh, Time} when is_integer(Time), Time > 0 ->
Time1 = ((Time+999) div 1000)*1000, %% round up
ets:insert(Db, {cache_refresh_interval, Time1}),
- stop_timer(State#state.cache_timer),
+ _ = stop_timer(State#state.cache_timer),
{reply, ok, State#state{cache_timer = init_timer()}};
clear_hosts ->
@@ -1131,7 +1131,7 @@ handle_call(Request, From, #state{db=Db}=State) ->
reset ->
reset_db(Db),
- stop_timer(State#state.cache_timer),
+ _ = stop_timer(State#state.cache_timer),
{reply, ok, State#state{cache_timer = init_timer()}};
{add_rc_list, List} ->
@@ -1181,7 +1181,7 @@ handle_info(_Info, State) ->
-spec terminate(term(), state()) -> 'ok'.
terminate(_Reason, State) ->
- stop_timer(State#state.cache_timer),
+ _ = stop_timer(State#state.cache_timer),
ok.
%%%----------------------------------------------------------------------
@@ -1240,8 +1240,9 @@ do_add_host(Byname, Byaddr, Names, Type, IP) ->
ok.
do_del_host(Byname, Byaddr, IP) ->
- [ets:delete_object(Byname, {tolower(Name),Type,Addr}) ||
- {Name,Type,Addr} <- ets:lookup(Byaddr, IP)],
+ _ =
+ [ets:delete_object(Byname, {tolower(Name),Type,Addr}) ||
+ {Name,Type,Addr} <- ets:lookup(Byaddr, IP)],
ets:delete(Byaddr, IP),
ok.
diff --git a/lib/kernel/src/inet_gethost_native.erl b/lib/kernel/src/inet_gethost_native.erl
index 65d4c84e3b..4320987078 100644
--- a/lib/kernel/src/inet_gethost_native.erl
+++ b/lib/kernel/src/inet_gethost_native.erl
@@ -237,7 +237,7 @@ handle_message({Port, {data, Data}}, State = #state{port = Port}) ->
State;
Req ->
lists:foreach(fun({P,R,TR}) ->
- ?CANCEL_TIMER(TR),
+ _= ?CANCEL_TIMER(TR),
P ! {R,
{ok,
BinReply}}
@@ -276,7 +276,7 @@ handle_message({timeout, Pid, RID}, State) ->
{last, {LP,LR,_}} ->
LP ! {LR, {error,timeout}},
%% Remove the whole request structure...
- pick_request(State, RID),
+ _ = pick_request(State, RID),
%% Also cancel the request to the port program...
(catch port_command(State#state.port,
<<RID:32,?OP_CANCEL_REQUEST>>))
@@ -517,7 +517,7 @@ do_start(Sup, C) ->
{error, {{already_started, Pid}, _Child}} when is_pid(Pid) ->
ok;
{error, already_present} ->
- supervisor:delete_child(Sup, Child),
+ _ = supervisor:delete_child(Sup, Child),
do_start(Sup, C)
end.
diff --git a/lib/kernel/src/inet_int.hrl b/lib/kernel/src/inet_int.hrl
index 641a8dc0ca..889b596a22 100644
--- a/lib/kernel/src/inet_int.hrl
+++ b/lib/kernel/src/inet_int.hrl
@@ -46,6 +46,7 @@
-define(INET_PASSIVE, 0).
-define(INET_ACTIVE, 1).
-define(INET_ONCE, 2). % Active once then passive
+-define(INET_MULTI, 3). % Active N then passive
%% state codes (getstatus, INET_REQ_GETSTATUS)
-define(INET_F_OPEN, 16#0001).
diff --git a/lib/kernel/src/inet_parse.erl b/lib/kernel/src/inet_parse.erl
index 98bd8d386c..a88c94a453 100644
--- a/lib/kernel/src/inet_parse.erl
+++ b/lib/kernel/src/inet_parse.erl
@@ -288,7 +288,7 @@ parse_file(_, File, Fn) ->
case file:open(File, [read]) of
{ok, Fd} ->
Result = parse_fd(File,Fd, 1, Fn, []),
- file:close(Fd),
+ _ = file:close(Fd),
Result;
Error -> Error
end.
diff --git a/lib/kernel/src/inet_res.erl b/lib/kernel/src/inet_res.erl
index 94a9f7c64d..6037da1d22 100644
--- a/lib/kernel/src/inet_res.erl
+++ b/lib/kernel/src/inet_res.erl
@@ -139,7 +139,7 @@ resolve(Name, Class, Type, Opts, Timeout) ->
{ok, Nm} ->
Timer = inet:start_timer(Timeout),
Res = res_query(Nm, Class, Type, Opts, Timer),
- inet:stop_timer(Timer),
+ _ = inet:stop_timer(Timer),
Res;
Error ->
Error
@@ -339,7 +339,7 @@ gethostbyaddr(IP) -> gethostbyaddr_tm(IP,false).
gethostbyaddr(IP,Timeout) ->
Timer = inet:start_timer(Timeout),
Res = gethostbyaddr_tm(IP,Timer),
- inet:stop_timer(Timer),
+ _ = inet:stop_timer(Timer),
Res.
gethostbyaddr_tm({A,B,C,D} = IP, Timer) when ?ip(A,B,C,D) ->
@@ -424,7 +424,7 @@ gethostbyname(Name,Family) ->
gethostbyname(Name,Family,Timeout) ->
Timer = inet:start_timer(Timeout),
Res = gethostbyname_tm(Name,Family,Timer),
- inet:stop_timer(Timer),
+ _ = inet:stop_timer(Timer),
Res.
gethostbyname_tm(Name,inet,Timer) ->
@@ -483,7 +483,7 @@ getbyname(Name, Type) ->
getbyname(Name, Type, Timeout) ->
Timer = inet:start_timer(Timeout),
Res = getbyname_tm(Name, Type, Timer),
- inet:stop_timer(Timer),
+ _ = inet:stop_timer(Timer),
Res.
getbyname_tm(Name, Type, Timer) when is_list(Name) ->
@@ -921,18 +921,25 @@ query_tcp(Timeout, Id, Buffer, IP, Port, Verbose) ->
[{active,false},{packet,2},binary,Family],
Timeout) of
{ok, S} ->
- gen_tcp:send(S, Buffer),
- case gen_tcp:recv(S, 0, Timeout) of
- {ok, Answer} ->
- gen_tcp:close(S),
- case decode_answer(Answer, Id, Verbose) of
- {ok, _} = OK -> OK;
- {error, badid} -> {error, servfail};
- Error -> Error
+ case gen_tcp:send(S, Buffer) of
+ ok ->
+ case gen_tcp:recv(S, 0, Timeout) of
+ {ok, Answer} ->
+ gen_tcp:close(S),
+ case decode_answer(Answer, Id, Verbose) of
+ {ok, _} = OK -> OK;
+ {error, badid} -> {error, servfail};
+ Error -> Error
+ end;
+ Error ->
+ gen_tcp:close(S),
+ ?verbose(Verbose, "TCP server recv error: ~p\n",
+ [Error]),
+ Error
end;
Error ->
gen_tcp:close(S),
- ?verbose(Verbose, "TCP server recv error: ~p\n",
+ ?verbose(Verbose, "TCP server send error: ~p\n",
[Error]),
Error
end;
diff --git a/lib/kernel/src/inet_sctp.erl b/lib/kernel/src/inet_sctp.erl
index 2d799d79fa..93528d305d 100644
--- a/lib/kernel/src/inet_sctp.erl
+++ b/lib/kernel/src/inet_sctp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -135,7 +135,7 @@ connect_get_assoc(S, Addr, Port, Active, Timer) ->
{sctp,S,Addr,Port,{_,#sctp_assoc_change{state=St}=Ev}} ->
case Active of
once ->
- prim_inet:setopt(S, active, once);
+ ok = prim_inet:setopt(S, active, once);
_ -> ok
end,
if St =:= comm_up ->
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
index 8005eff58c..835dcf2705 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,7 +77,7 @@ listen(Name) ->
Error
end.
-do_listen(Options0) ->
+do_listen(Options) ->
{First,Last} = case application:get_env(kernel,inet_dist_listen_min) of
{ok,N} when is_integer(N) ->
case application:get_env(kernel,
@@ -90,13 +90,7 @@ do_listen(Options0) ->
_ ->
{0,0}
end,
- Options = case application:get_env(kernel, inet_dist_use_interface) of
- {ok, Ip} ->
- [{ip, Ip} | Options0];
- _ ->
- Options0
- end,
- do_listen(First, Last, [{backlog,128}|Options]).
+ do_listen(First, Last, listen_options([{backlog,128}|Options])).
do_listen(First,Last,_) when First > Last ->
{error,eaddrinuse};
@@ -108,6 +102,23 @@ do_listen(First,Last,Options) ->
Other
end.
+listen_options(Opts0) ->
+ Opts1 =
+ case application:get_env(kernel, inet_dist_use_interface) of
+ {ok, Ip} ->
+ [{ip, Ip} | Opts0];
+ _ ->
+ Opts0
+ end,
+ case application:get_env(kernel, inet_dist_listen_options) of
+ {ok,ListenOpts} ->
+ erlang:display({inet_dist_listen_options, ListenOpts}),
+ ListenOpts ++ Opts1;
+ _ ->
+ Opts1
+ end.
+
+
%% ------------------------------------------------------------
%% Accepts new connection attempts from other Erlang nodes.
%% ------------------------------------------------------------
@@ -119,7 +130,7 @@ accept_loop(Kernel, Listen) ->
case inet_tcp:accept(Listen) of
{ok, Socket} ->
Kernel ! {accept,self(),Socket,inet,tcp},
- controller(Kernel, Socket),
+ _ = controller(Kernel, Socket),
accept_loop(Kernel, Listen);
Error ->
exit(Error)
@@ -219,7 +230,7 @@ nodelay() ->
_ ->
{nodelay, true}
end.
-
+
%% ------------------------------------------------------------
%% Get remote information about a Socket.
@@ -260,9 +271,11 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) ->
?trace("port_please(~p) -> version ~p~n",
[Node,Version]),
dist_util:reset_timer(Timer),
- case inet_tcp:connect(Ip, TcpPort,
- [{active, false},
- {packet,2}]) of
+ case
+ inet_tcp:connect(
+ Ip, TcpPort,
+ connect_options([{active, false}, {packet, 2}]))
+ of
{ok, Socket} ->
HSData = #hs_data{
kernel_pid = Kernel,
@@ -324,6 +337,15 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) ->
?shutdown(Node)
end.
+connect_options(Opts) ->
+ case application:get_env(kernel, inet_dist_connect_options) of
+ {ok,ConnectOpts} ->
+ erlang:display({inet_dist_listen_options, ConnectOpts}),
+ ConnectOpts ++ Opts;
+ _ ->
+ Opts
+ end.
+
%%
%% Close a socket.
%%
diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src
index cb8c98ab06..9f6c0f4624 100644
--- a/lib/kernel/src/kernel.app.src
+++ b/lib/kernel/src/kernel.app.src
@@ -114,6 +114,7 @@
pg2]},
{applications, []},
{env, [{error_logger, tty}]},
- {mod, {kernel, []}}
+ {mod, {kernel, []}},
+ {runtime_dependencies, ["erts-6.1.2", "stdlib-2.0", "sasl-2.4"]}
]
}.
diff --git a/lib/kernel/src/kernel.appup.src b/lib/kernel/src/kernel.appup.src
index 54628800a8..f8f4cc1ec2 100644
--- a/lib/kernel/src/kernel.appup.src
+++ b/lib/kernel/src/kernel.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,12 +16,10 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
- [{<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.14(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14
- %% Down to - max two major revisions back
- [{<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.14(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14
+ %% Up from - max one major revision back
+ [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
+ [{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/kernel/src/kernel.erl b/lib/kernel/src/kernel.erl
index 1e07620a3e..ecdb32424a 100644
--- a/lib/kernel/src/kernel.erl
+++ b/lib/kernel/src/kernel.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,8 +32,13 @@ start(_, []) ->
case supervisor:start_link({local, kernel_sup}, kernel, []) of
{ok, Pid} ->
Type = get_error_logger_type(),
- error_logger:swap_handler(Type),
- {ok, Pid, []};
+ case error_logger:swap_handler(Type) of
+ ok -> {ok, Pid, []};
+ Error ->
+ %% Not necessary since the node will crash anyway:
+ exit(Pid, shutdown),
+ Error
+ end;
Error -> Error
end.
diff --git a/lib/kernel/src/kernel_config.erl b/lib/kernel/src/kernel_config.erl
index 48141cfa03..56defcb167 100644
--- a/lib/kernel/src/kernel_config.erl
+++ b/lib/kernel/src/kernel_config.erl
@@ -121,7 +121,7 @@ send_timeout(Timeout, Pid) ->
end.
wait_nodes(Mandatory, Optional) ->
- net_kernel:monitor_nodes(true),
+ ok = net_kernel:monitor_nodes(true),
lists:foreach(fun(Node) ->
case net_adm:ping(Node) of
pong -> self() ! {nodeup, Node};
@@ -129,7 +129,9 @@ wait_nodes(Mandatory, Optional) ->
end
end,
Mandatory ++ Optional),
- rec_nodes(Mandatory, Optional).
+ R = rec_nodes(Mandatory, Optional),
+ ok = net_kernel:monitor_nodes(false),
+ R.
rec_nodes([], []) -> ok;
rec_nodes(Mandatory, Optional) ->
diff --git a/lib/kernel/src/net_adm.erl b/lib/kernel/src/net_adm.erl
index 9b2dac9544..2cdfb76417 100644
--- a/lib/kernel/src/net_adm.erl
+++ b/lib/kernel/src/net_adm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -89,18 +89,13 @@ names() ->
-spec names(Host) -> {ok, [{Name, Port}]} | {error, Reason} when
- Host :: atom() | string(),
+ Host :: atom() | string() | inet:ip_address(),
Name :: string(),
Port :: non_neg_integer(),
Reason :: address | file:posix().
names(Hostname) ->
- case inet:gethostbyname(Hostname) of
- {ok, {hostent, _Name, _ , _Af, _Size, [Addr | _]}} ->
- erl_epmd:names(Addr);
- Else ->
- Else
- end.
+ erl_epmd:names(Hostname).
-spec dns_hostname(Host) -> {ok, Name} | {error, Host} when
Host :: atom() | string(),
@@ -133,7 +128,7 @@ dns_hostname(Hostname) ->
-spec ping_list([atom()]) -> [atom()].
ping_list(Nodelist) ->
- net_kernel:monitor_nodes(true),
+ ok = net_kernel:monitor_nodes(true),
Sofar = ping_first(Nodelist, nodes()),
collect_new(Sofar, Nodelist).
@@ -159,7 +154,7 @@ collect_new(Sofar, Nodelist) ->
collect_new([Node | Sofar], Nodelist)
end
after 3000 ->
- net_kernel:monitor_nodes(false),
+ ok = net_kernel:monitor_nodes(false),
Sofar
end.
diff --git a/lib/kernel/src/net_kernel.erl b/lib/kernel/src/net_kernel.erl
index dd0071b914..04a0d94ebf 100644
--- a/lib/kernel/src/net_kernel.erl
+++ b/lib/kernel/src/net_kernel.erl
@@ -306,21 +306,21 @@ do_connect(Node, Type, WaitForBarred) -> %% Type = normal | hidden
end.
passive_connect_monitor(Parent, Node) ->
- monitor_nodes(true,[{node_type,all}]),
+ ok = monitor_nodes(true,[{node_type,all}]),
case lists:member(Node,nodes([connected])) of
true ->
- monitor_nodes(false,[{node_type,all}]),
+ ok = monitor_nodes(false,[{node_type,all}]),
Parent ! {self(),true};
_ ->
Ref = make_ref(),
Tref = erlang:send_after(connecttime(),self(),Ref),
receive
Ref ->
- monitor_nodes(false,[{node_type,all}]),
+ ok = monitor_nodes(false,[{node_type,all}]),
Parent ! {self(), false};
{nodeup,Node,_} ->
- monitor_nodes(false,[{node_type,all}]),
- erlang:cancel_timer(Tref),
+ ok = monitor_nodes(false,[{node_type,all}]),
+ _ = erlang:cancel_timer(Tref),
Parent ! {self(),true}
end
end.
@@ -734,7 +734,7 @@ handle_info(transition_period_end,
how = How}} = State) ->
?tckr_dbg(transition_period_ended),
case How of
- shorter -> Tckr ! {new_ticktime, T};
+ shorter -> Tckr ! {new_ticktime, T}, done;
_ -> done
end,
{noreply,State#state{tick = #tick{ticker = Tckr, time = T}}};
@@ -1573,9 +1573,10 @@ async_gen_server_reply(From, Msg) ->
ok ->
ok;
nosuspend ->
- spawn(fun() -> catch erlang:send(Pid, M, [noconnect]) end);
+ _ = spawn(fun() -> catch erlang:send(Pid, M, [noconnect]) end),
+ ok;
noconnect ->
ok; % The gen module takes care of this case.
- {'EXIT', _}=EXIT ->
- EXIT
+ {'EXIT', _} ->
+ ok
end.
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index 9415593485..187fd0001b 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -67,7 +67,7 @@ unsetenv(_) ->
%%% End of BIFs
-spec type() -> {Osfamily, Osname} when
- Osfamily :: unix | win32,
+ Osfamily :: unix | win32 | ose,
Osname :: atom().
type() ->
@@ -189,20 +189,25 @@ extensions() ->
Command :: atom() | io_lib:chars().
cmd(Cmd) ->
validate(Cmd),
- case type() of
- {unix, _} ->
- unix_cmd(Cmd);
- {win32, Wtype} ->
- Command0 = case {os:getenv("COMSPEC"),Wtype} of
- {false,windows} -> lists:concat(["command.com /c", Cmd]);
- {false,_} -> lists:concat(["cmd /c", Cmd]);
- {Cspec,_} -> lists:concat([Cspec," /c",Cmd])
- end,
- %% open_port/2 awaits string() in Command, but io_lib:chars() can be
- %% deep lists according to io_lib module description.
- Command = lists:flatten(Command0),
- Port = open_port({spawn, Command}, [stream, in, eof, hide]),
- get_data(Port, [])
+ Bytes = case type() of
+ {unix, _} ->
+ unix_cmd(Cmd);
+ {win32, Wtype} ->
+ Command0 = case {os:getenv("COMSPEC"),Wtype} of
+ {false,windows} -> lists:concat(["command.com /c", Cmd]);
+ {false,_} -> lists:concat(["cmd /c", Cmd]);
+ {Cspec,_} -> lists:concat([Cspec," /c",Cmd])
+ end,
+ %% open_port/2 awaits string() in Command, but io_lib:chars() can be
+ %% deep lists according to io_lib module description.
+ Command = lists:flatten(Command0),
+ Port = open_port({spawn, Command}, [stream, in, eof, hide]),
+ get_data(Port, [])
+ end,
+ String = unicode:characters_to_list(list_to_binary(Bytes)),
+ if %% Convert to unicode list if possible otherwise return bytes
+ is_list(String) -> String;
+ true -> Bytes
end.
unix_cmd(Cmd) ->
@@ -225,7 +230,9 @@ unix_cmd(Cmd) ->
%% and the commands are read from standard input. We set the
%% $1 parameter for easy identification of the resident shell.
%%
--define(SHELL, "/bin/sh -s unix:cmd 2>&1").
+-define(ROOT, "/").
+-define(ROOT_ANDROID, "/system").
+-define(SHELL, "bin/sh -s unix:cmd 2>&1").
-define(PORT_CREATOR_NAME, os_cmd_port_creator).
%%
@@ -275,7 +282,12 @@ start_port_srv(Request) ->
end.
start_port_srv_handle({Ref,Client}) ->
- Reply = try open_port({spawn, ?SHELL},[stream]) of
+ Path = case lists:reverse(erlang:system_info(system_architecture)) of
+ % androideabi
+ "ibaediordna" ++ _ -> filename:join([?ROOT_ANDROID, ?SHELL]);
+ _ -> filename:join([?ROOT, ?SHELL])
+ end,
+ Reply = try open_port({spawn, Path},[stream]) of
Port when is_port(Port) ->
(catch port_connect(Port, Client)),
unlink(Port),
@@ -284,8 +296,8 @@ start_port_srv_handle({Ref,Client}) ->
error:Reason ->
{Reason,erlang:get_stacktrace()}
end,
- Client ! {Ref,Reply}.
-
+ Client ! {Ref,Reply},
+ ok.
start_port_srv_loop() ->
receive
@@ -293,7 +305,7 @@ start_port_srv_loop() ->
is_pid(Client) ->
start_port_srv_handle(Request);
_Junk ->
- ignore
+ ok
end,
start_port_srv_loop().
@@ -343,7 +355,7 @@ mk_cmd(Cmd) when is_atom(Cmd) -> % backward comp.
mk_cmd(Cmd) ->
%% We insert a new line after the command, in case the command
%% contains a comment character.
- io_lib:format("(~ts\n) </dev/null; echo \"\^D\"\n", [Cmd]).
+ [$(, unicode:characters_to_binary(Cmd), "\n) </dev/null; echo \"\^D\"\n"].
validate(Atom) when is_atom(Atom) ->
@@ -351,7 +363,7 @@ validate(Atom) when is_atom(Atom) ->
validate(List) when is_list(List) ->
validate1(List).
-validate1([C|Rest]) when is_integer(C), 0 =< C, C < 256 ->
+validate1([C|Rest]) when is_integer(C) ->
validate1(Rest);
validate1([List|Rest]) when is_list(List) ->
validate1(List),
diff --git a/lib/kernel/src/pg2.erl b/lib/kernel/src/pg2.erl
index 1ff10eb303..b562d4ffd2 100644
--- a/lib/kernel/src/pg2.erl
+++ b/lib/kernel/src/pg2.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,7 +45,7 @@ start() ->
-spec create(Name :: name()) -> 'ok'.
create(Name) ->
- ensure_started(),
+ _ = ensure_started(),
case ets:member(pg2_table, {group, Name}) of
false ->
global:trans({{?MODULE, Name}, self()},
@@ -60,7 +60,7 @@ create(Name) ->
-spec delete(Name :: name()) -> 'ok'.
delete(Name) ->
- ensure_started(),
+ _ = ensure_started(),
global:trans({{?MODULE, Name}, self()},
fun() ->
gen_server:multi_call(?MODULE, {delete, Name})
@@ -71,7 +71,7 @@ delete(Name) ->
when Name :: name().
join(Name, Pid) when is_pid(Pid) ->
- ensure_started(),
+ _ = ensure_started(),
case ets:member(pg2_table, {group, Name}) of
false ->
{error, {no_such_group, Name}};
@@ -88,7 +88,7 @@ join(Name, Pid) when is_pid(Pid) ->
when Name :: name().
leave(Name, Pid) when is_pid(Pid) ->
- ensure_started(),
+ _ = ensure_started(),
case ets:member(pg2_table, {group, Name}) of
false ->
{error, {no_such_group, Name}};
@@ -105,7 +105,7 @@ leave(Name, Pid) when is_pid(Pid) ->
when Name :: name().
get_members(Name) ->
- ensure_started(),
+ _ = ensure_started(),
case ets:member(pg2_table, {group, Name}) of
true ->
group_members(Name);
@@ -117,7 +117,7 @@ get_members(Name) ->
when Name :: name().
get_local_members(Name) ->
- ensure_started(),
+ _ = ensure_started(),
case ets:member(pg2_table, {group, Name}) of
true ->
local_group_members(Name);
@@ -128,7 +128,7 @@ get_local_members(Name) ->
-spec which_groups() -> [Name :: name()].
which_groups() ->
- ensure_started(),
+ _ = ensure_started(),
all_groups().
-spec get_closest_pid(Name) -> pid() | {'error', Reason} when
@@ -165,7 +165,7 @@ get_closest_pid(Name) ->
init([]) ->
Ns = nodes(),
- net_kernel:monitor_nodes(true),
+ ok = net_kernel:monitor_nodes(true),
lists:foreach(fun(N) ->
{?MODULE, N} ! {new_pg2, node()},
self() ! {nodeup, N}
@@ -283,7 +283,7 @@ member_died(Ref) ->
join_group(Name, Pid) ->
Ref_Pid = {ref, Pid},
- try _ = ets:update_counter(pg2_table, Ref_Pid, {4, +1})
+ try _ = ets:update_counter(pg2_table, Ref_Pid, {4, +1}), true
catch _:_ ->
{RPid, Ref} = do_monitor(Pid),
true = ets:insert(pg2_table, {Ref_Pid, RPid, Ref, 1}),
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl
index 0e7e7d2031..2300b7e901 100644
--- a/lib/kernel/src/rpc.erl
+++ b/lib/kernel/src/rpc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -66,7 +66,7 @@
%%------------------------------------------------------------------------
--type state() :: gb_tree().
+-type state() :: gb_trees:tree(pid(), {pid(), reference()}).
%%------------------------------------------------------------------------
@@ -158,20 +158,20 @@ handle_info({Caller, {reply, Reply}}, S) ->
{noreply, S}
end;
handle_info({From, {sbcast, Name, Msg}}, S) ->
- case catch Name ! Msg of %% use catch to get the printout
- {'EXIT', _} ->
- From ! {?NAME, node(), {nonexisting_name, Name}};
- _ ->
- From ! {?NAME, node(), node()}
- end,
+ _ = case catch Name ! Msg of %% use catch to get the printout
+ {'EXIT', _} ->
+ From ! {?NAME, node(), {nonexisting_name, Name}};
+ _ ->
+ From ! {?NAME, node(), node()}
+ end,
{noreply, S};
handle_info({From, {send, Name, Msg}}, S) ->
- case catch Name ! {From, Msg} of %% use catch to get the printout
- {'EXIT', _} ->
- From ! {?NAME, node(), {nonexisting_name, Name}};
- _ ->
- ok %% It's up to Name to respond !!!!!
- end,
+ _ = case catch Name ! {From, Msg} of %% use catch to get the printout
+ {'EXIT', _} ->
+ From ! {?NAME, node(), {nonexisting_name, Name}};
+ _ ->
+ ok %% It's up to Name to respond !!!!!
+ end,
{noreply, S};
handle_info({From, {call,Mod,Fun,Args,Gleader}}, S) ->
%% Special for hidden C node's, uugh ...
@@ -423,7 +423,7 @@ abcast(Name, Mess) ->
abcast([Node|Tail], Name, Mess) ->
Dest = {Name,Node},
case catch erlang:send(Dest, Mess, [noconnect]) of
- noconnect -> spawn(erlang, send, [Dest,Mess]);
+ noconnect -> spawn(erlang, send, [Dest,Mess]), ok;
_ -> ok
end,
abcast(Tail, Name, Mess);
diff --git a/lib/kernel/src/seq_trace.erl b/lib/kernel/src/seq_trace.erl
index a90b7b07c8..38a61f4644 100644
--- a/lib/kernel/src/seq_trace.erl
+++ b/lib/kernel/src/seq_trace.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -125,7 +125,7 @@ get_system_tracer() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set_token2([{Type,Val}|T]) ->
- erlang:seq_trace(Type, Val),
+ _ = erlang:seq_trace(Type, Val),
set_token2(T);
set_token2([]) ->
ok.
diff --git a/lib/kernel/src/standard_error.erl b/lib/kernel/src/standard_error.erl
index e41dcd01fc..1c43063937 100644
--- a/lib/kernel/src/standard_error.erl
+++ b/lib/kernel/src/standard_error.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -63,13 +63,13 @@ server(PortName,PortSettings) ->
run(Port).
run(P) ->
- put(unicode,false),
+ put(encoding, latin1),
server_loop(P).
server_loop(Port) ->
receive
{io_request,From,ReplyAs,Request} when is_pid(From) ->
- do_io_request(Request, From, ReplyAs, Port),
+ _ = do_io_request(Request, From, ReplyAs, Port),
server_loop(Port);
{'EXIT',Port,badsig} -> % Ignore badsig errors
server_loop(Port);
@@ -95,25 +95,47 @@ do_io_request(Req, From, ReplyAs, Port) ->
io_reply(From, ReplyAs, Reply).
%% New in R13B
-% Wide characters (Unicode)
-io_request({put_chars,Encoding,Chars}, Port) -> % Binary new in R9C
- put_chars(wrap_characters_to_binary(Chars,Encoding,
- case get(unicode) of
- true -> unicode;
- _ -> latin1
- end), Port);
-io_request({put_chars,Encoding,Mod,Func,Args}, Port) ->
- Result = case catch apply(Mod,Func,Args) of
- Data when is_list(Data); is_binary(Data) ->
- wrap_characters_to_binary(Data,Encoding,
- case get(unicode) of
- true -> unicode;
- _ -> latin1
- end);
- Undef ->
- Undef
- end,
- put_chars(Result, Port);
+%% Encoding option (unicode/latin1)
+io_request({put_chars,unicode,Chars}, Port) ->
+ case wrap_characters_to_binary(Chars, unicode, get(encoding)) of
+ error ->
+ {error,{error,put_chars}};
+ Bin ->
+ put_chars(Bin, Port)
+ end;
+io_request({put_chars,unicode,Mod,Func,Args}, Port) ->
+ case catch apply(Mod, Func, Args) of
+ Data when is_list(Data); is_binary(Data) ->
+ case wrap_characters_to_binary(Data, unicode, get(encoding)) of
+ Bin when is_binary(Bin) ->
+ put_chars(Bin, Port);
+ error ->
+ {error,{error,put_chars}}
+ end;
+ _ ->
+ {error,{error,put_chars}}
+ end;
+io_request({put_chars,latin1,Chars}, Port) ->
+ case catch unicode:characters_to_binary(Chars, latin1, get(encoding)) of
+ Data when is_binary(Data) ->
+ put_chars(Data, Port);
+ _ ->
+ {error,{error,put_chars}}
+ end;
+io_request({put_chars,latin1,Mod,Func,Args}, Port) ->
+ case catch apply(Mod, Func, Args) of
+ Data when is_list(Data); is_binary(Data) ->
+ case
+ catch unicode:characters_to_binary(Data, latin1, get(encoding))
+ of
+ Bin when is_binary(Bin) ->
+ put_chars(Bin, Port);
+ _ ->
+ {error,{error,put_chars}}
+ end;
+ _ ->
+ {error,{error,put_chars}}
+ end;
%% BC if called from pre-R13 node
io_request({put_chars,Chars}, Port) ->
io_request({put_chars,latin1,Chars}, Port);
@@ -134,10 +156,10 @@ io_request({get_geometry,rows},Port) ->
_ ->
{error,{error,enotsup}}
end;
-io_request({getopts,[]}, Port) ->
- getopts(Port);
-io_request({setopts,Opts}, Port) when is_list(Opts) ->
- setopts(Opts, Port);
+io_request(getopts, _Port) ->
+ getopts();
+io_request({setopts,Opts}, _Port) when is_list(Opts) ->
+ setopts(Opts);
io_request({requests,Reqs}, Port) ->
io_requests(Reqs, {ok,ok}, Port);
io_request(R, _Port) -> %Unknown request
@@ -175,48 +197,49 @@ io_reply(From, ReplyAs, Reply) ->
%% put_chars
put_chars(Chars, Port) when is_binary(Chars) ->
- put_port(Chars, Port),
- {ok,ok};
-put_chars(Chars, Port) ->
- case catch list_to_binary(Chars) of
- Binary when is_binary(Binary) ->
- put_chars(Binary, Port);
- _ ->
- {error,{error,put_chars}}
- end.
+ _ = put_port(Chars, Port),
+ {ok,ok}.
%% setopts
-setopts(Opts0,Port) ->
- Opts = proplists:unfold(
- proplists:substitute_negations(
- [{latin1,unicode}],
- Opts0)),
+setopts(Opts0) ->
+ Opts = expand_encoding(Opts0),
case check_valid_opts(Opts) of
- true ->
- do_setopts(Opts,Port);
- false ->
- {error,{error,enotsup}}
+ true ->
+ do_setopts(Opts);
+ false ->
+ {error,{error,enotsup}}
end.
+
check_valid_opts([]) ->
true;
-check_valid_opts([{unicode,Valid}|T]) when Valid =:= true; Valid =:= utf8; Valid =:= false ->
+check_valid_opts([{encoding,Valid}|T]) when Valid =:= unicode;
+ Valid =:= utf8; Valid =:= latin1 ->
check_valid_opts(T);
check_valid_opts(_) ->
false.
-do_setopts(Opts, _Port) ->
- case proplists:get_value(unicode,Opts) of
- Valid when Valid =:= true; Valid =:= utf8 ->
- put(unicode,true);
- false ->
- put(unicode,false);
- undefined ->
- ok
+expand_encoding([]) ->
+ [];
+expand_encoding([latin1 | T]) ->
+ [{encoding,latin1} | expand_encoding(T)];
+expand_encoding([unicode | T]) ->
+ [{encoding,unicode} | expand_encoding(T)];
+expand_encoding([H|T]) ->
+ [H|expand_encoding(T)].
+
+do_setopts(Opts) ->
+ case proplists:get_value(encoding, Opts) of
+ Valid when Valid =:= unicode; Valid =:= utf8 ->
+ put(encoding, unicode);
+ latin1 ->
+ put(encoding, latin1);
+ undefined ->
+ ok
end,
{ok,ok}.
-getopts(_Port) ->
- Uni = {unicode, get(unicode) =:= true},
+getopts() ->
+ Uni = {encoding,get(encoding)},
{ok,[Uni]}.
wrap_characters_to_binary(Chars,From,To) ->
@@ -227,17 +250,17 @@ wrap_characters_to_binary(Chars,From,To) ->
_Else ->
16#10ffff
end,
- unicode:characters_to_binary(
- [ case X of
- $\n ->
- if
- TrNl ->
- "\r\n";
- true ->
- $\n
- end;
- High when High > Limit ->
- ["\\x{",erlang:integer_to_list(X, 16),$}];
- Ordinary ->
- Ordinary
- end || X <- unicode:characters_to_list(Chars,From) ],unicode,To).
+ case catch unicode:characters_to_list(Chars, From) of
+ L when is_list(L) ->
+ unicode:characters_to_binary(
+ [ case X of
+ $\n when TrNl ->
+ "\r\n";
+ High when High > Limit ->
+ ["\\x{",erlang:integer_to_list(X, 16),$}];
+ Low ->
+ Low
+ end || X <- L ], unicode, To);
+ _ ->
+ error
+ end.
diff --git a/lib/kernel/src/user.erl b/lib/kernel/src/user.erl
index c897d46bc2..40376ef752 100644
--- a/lib/kernel/src/user.erl
+++ b/lib/kernel/src/user.erl
@@ -103,11 +103,11 @@ catch_loop(Port, Shell, Q) ->
{unknown_exit,{Shell,Reason},_} -> % shell has exited
case Reason of
normal ->
- put_chars("*** ", Port, []);
+ put_port(<<"*** ">>, Port);
_ ->
- put_chars("*** ERROR: ", Port, [])
+ put_port(<<"*** ERROR: ">>, Port)
end,
- put_chars("Shell process terminated! ***\n", Port, []),
+ put_port(<<"Shell process terminated! ***\n">>, Port),
catch_loop(Port, start_new_shell());
{unknown_exit,_,Q1} ->
catch_loop(Port, Shell, Q1);
@@ -181,7 +181,7 @@ get_fd_geometry(Port) ->
do_io_request(Req, From, ReplyAs, Port, Q0) ->
case io_request(Req, Port, Q0) of
{_Status,Reply,Q1} ->
- io_reply(From, ReplyAs, Reply),
+ _ = io_reply(From, ReplyAs, Reply),
Q1;
{exit,What} ->
ok = send_port(Port, close),
diff --git a/lib/kernel/src/user_drv.erl b/lib/kernel/src/user_drv.erl
index 7b4ffb09ca..a91c23539d 100644
--- a/lib/kernel/src/user_drv.erl
+++ b/lib/kernel/src/user_drv.erl
@@ -488,21 +488,19 @@ set_unicode_state(Iport, Bool) ->
%% io_request(Request, InPort, OutPort)
%% io_requests(Requests, InPort, OutPort)
-
-io_request({put_chars, unicode,Cs}, _Iport, Oport) ->
- Oport ! {self(),{command,[?OP_PUTC|unicode:characters_to_binary(Cs,utf8)]}};
-io_request({move_rel,N}, _Iport, Oport) ->
- Oport ! {self(),{command,[?OP_MOVE|put_int16(N, [])]}};
-io_request({insert_chars,unicode,Cs}, _Iport, Oport) ->
- Oport ! {self(),{command,[?OP_INSC|unicode:characters_to_binary(Cs,utf8)]}};
-io_request({delete_chars,N}, _Iport, Oport) ->
- Oport ! {self(),{command,[?OP_DELC|put_int16(N, [])]}};
-io_request(beep, _Iport, Oport) ->
- Oport ! {self(),{command,[?OP_BEEP]}};
-io_request({requests,Rs}, Iport, Oport) ->
- io_requests(Rs, Iport, Oport);
-io_request(_R, _Iport, _Oport) ->
- ok.
+%% Note: InPort is unused.
+
+io_request(Request, Iport, Oport) ->
+ try io_command(Request) of
+ Command ->
+ Oport ! {self(),Command},
+ ok
+ catch
+ {requests,Rs} ->
+ io_requests(Rs, Iport, Oport);
+ _ ->
+ ok
+ end.
io_requests([R|Rs], Iport, Oport) ->
io_request(R, Iport, Oport),
@@ -513,6 +511,19 @@ io_requests([], _Iport, _Oport) ->
put_int16(N, Tail) ->
[(N bsr 8)band 255,N band 255|Tail].
+io_command({put_chars, unicode,Cs}) ->
+ {command,[?OP_PUTC|unicode:characters_to_binary(Cs,utf8)]};
+io_command({move_rel,N}) ->
+ {command,[?OP_MOVE|put_int16(N, [])]};
+io_command({insert_chars,unicode,Cs}) ->
+ {command,[?OP_INSC|unicode:characters_to_binary(Cs,utf8)]};
+io_command({delete_chars,N}) ->
+ {command,[?OP_DELC|put_int16(N, [])]};
+io_command(beep) ->
+ {command,[?OP_BEEP]};
+io_command(Else) ->
+ throw(Else).
+
%% gr_new()
%% gr_get_num(Group, Index)
%% gr_get_info(Group, Pid)
diff --git a/lib/kernel/src/wrap_log_reader.erl b/lib/kernel/src/wrap_log_reader.erl
index 689269fc28..7e1f4aa07f 100644
--- a/lib/kernel/src/wrap_log_reader.erl
+++ b/lib/kernel/src/wrap_log_reader.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -149,7 +149,7 @@ open_int(File, FileNo, FirstFileNo) ->
{ok, Head} ->
case disk_log_1:is_head(Head) of
no ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {not_a_log_file, FName}};
_ -> % yes or yes_not_closed
case last_mod_time(FName) of
@@ -161,12 +161,12 @@ open_int(File, FileNo, FirstFileNo) ->
first_no = FirstFileNo},
{ok, WR};
{error, E} ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {file_error, FName, E}}
end
end;
_Other ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {not_a_log_file, FName}}
end;
_Other ->
@@ -280,7 +280,7 @@ read_next_file(WR, N, NewFileNo, Bad) ->
true ->
case open_int(File, NewFileNo, FirstFileNo) of
{ok, NWR} ->
- close(WR), %% Now we can safely close the old file.
+ _ = close(WR), %% Now we can safely close the old file.
chunk(NWR, N, Bad);
Error ->
Error
diff --git a/lib/kernel/test/Makefile b/lib/kernel/test/Makefile
index f1b8a105ed..ef351a25fb 100644
--- a/lib/kernel/test/Makefile
+++ b/lib/kernel/test/Makefile
@@ -77,7 +77,8 @@ MODULES= \
ignore_cores \
zlib_SUITE \
loose_node \
- sendfile_SUITE
+ sendfile_SUITE \
+ standard_error_SUITE
APP_FILES = \
appinc.app \
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index 9ec8a15861..4901206c8e 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,10 +33,10 @@
permit_false_start_local/1, permit_false_start_dist/1, script_start/1,
nodedown_start/1, init2973/0, loop2973/0, loop5606/1]).
--export([config_change/1,
+-export([config_change/1, persistent_env/1,
distr_changed_tc1/1, distr_changed_tc2/1,
ensure_started/1, ensure_all_started/1,
- shutdown_func/1, do_shutdown/1, shutdown_timeout/1]).
+ shutdown_func/1, do_shutdown/1, shutdown_timeout/1, shutdown_deadlock/1]).
-define(TESTCASE, testcase_name).
-define(testcase, ?config(?TESTCASE, Config)).
@@ -53,7 +53,9 @@ all() ->
load_use_cache, ensure_started, {group, reported_bugs}, start_phases,
script_start, nodedown_start, permit_false_start_local,
permit_false_start_dist, get_key, get_env, ensure_all_started,
- {group, distr_changed}, config_change, shutdown_func, shutdown_timeout].
+ {group, distr_changed}, config_change, shutdown_func, shutdown_timeout,
+ shutdown_deadlock,
+ persistent_env].
groups() ->
[{reported_bugs, [],
@@ -960,7 +962,7 @@ nodedown_start(Conf) when is_list(Conf) ->
ensure_started(suite) -> [];
ensure_started(doc) -> ["Test application:ensure_started/1."];
-ensure_started(Conf) ->
+ensure_started(_Conf) ->
{ok, Fd} = file:open("app1.app", [write]),
w_app1(Fd),
@@ -980,7 +982,7 @@ ensure_started(Conf) ->
ensure_all_started(suite) -> [];
ensure_all_started(doc) -> ["Test application:ensure_all_started/1-2."];
-ensure_all_started(Conf) ->
+ensure_all_started(_Conf) ->
{ok, Fd1} = file:open("app1.app", [write]),
w_app1(Fd1),
@@ -1074,10 +1076,13 @@ otp_1586(Conf) when is_list(Conf) ->
{ok, Fd} = file:open(filename:join(Dir, "app5.app"), [write]),
w_app5(Fd),
file:close(Fd),
- code:add_patha(Dir),
- ok = application:load(app4()),
- ok = application:unload(app4),
- ok.
+ try
+ true = code:add_patha(Dir),
+ ok = application:load(app4()),
+ ok = application:unload(app4)
+ after
+ _ = code:del_path(Dir)
+ end.
%%-----------------------------------------------------------------
%% Ticket: OTP-2078
@@ -1947,14 +1952,22 @@ config_change(Conf) when is_list(Conf) ->
%% Find out application data from boot script
Boot = filename:join([code:root_dir(), "bin", "start.boot"]),
{ok, Bin} = file:read_file(Boot),
- Appls = get_appls(binary_to_term(Bin)),
+ Appls0 = get_appls(binary_to_term(Bin)),
+
+ %% And add app1 in order to test OTP-11864 - included config files
+ %% not read for new (not already loaded) applications
+ Appls = [app1() | Appls0],
%% Simulate contents of "sys.config"
Config = [{stdlib, [{par1,sys},{par2,sys}]},
"t1",
"t2.config",
filename:join([DataDir, "subdir", "t3"]),
- {stdlib, [{par6,sys}]}],
+ {stdlib, [{par6,sys}]},
+ "t4.config"],
+
+ %% Check that app1 is not loaded
+ false = lists:keymember(app1,1,application:loaded_applications()),
%% Order application_controller to update configuration
ok = application_controller:change_application_data(Appls,
@@ -1969,6 +1982,13 @@ config_change(Conf) when is_list(Conf) ->
{value, {par5,t3}} = lists:keysearch(par5, 1, Env),
{value, {par6,sys}} = lists:keysearch(par6, 1, Env),
+ %% Check that app1 parameters are correctly set after loading
+ [] = application:get_all_env(app1),
+ application:load(app1()),
+ App1Env = application:get_all_env(app1),
+ {value, {par1,t4}} = lists:keysearch(par1, 1, App1Env),
+ application:unload(app1),
+
ok = file:set_cwd(CWD).
%% This function is stolen from SASL module release_handler, OTP R10B
@@ -1987,6 +2007,51 @@ get_appls([_ | T], Res) ->
get_appls([], Res) ->
Res.
+
+persistent_env(suite) ->
+ [];
+persistent_env(doc) ->
+ ["Test set_env/4 and unset_env/3 with persistent true"];
+persistent_env(Conf) when is_list(Conf) ->
+ ok = application:set_env(appinc, own2, persist, [{persistent, true}]),
+ ok = application:set_env(appinc, key1, persist, [{persistent, true}]),
+
+ %% own_env1 and own2 are set in appinc
+ ok = application:load(appinc()),
+ {ok, value1} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% Changing the environment after loaded reflects and should persist
+ ok = application:set_env(appinc, own_env1, persist, [{persistent, true}]),
+ {ok, persist} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% On reload, own_env1, own2 and key1 should all persist
+ ok = application:unload(appinc),
+ ok = application:load(appinc()),
+ {ok, persist} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% Unset own_env1 and key1, own2 should still persist
+ ok = application:unset_env(appinc, own_env1, [{persistent, true}]),
+ ok = application:unset_env(appinc, key1, [{persistent, true}]),
+ undefined = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ undefined = application:get_env(appinc, key1),
+
+ %% own_env1 should be back to its application value on reload
+ ok = application:unload(appinc),
+ ok = application:load(appinc()),
+ {ok, value1} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ undefined = application:get_env(appinc, key1),
+
+ %% Clean up
+ ok = application:unload(appinc).
+
%%%-----------------------------------------------------------------
%%% Tests the 'shutdown_func' kernel config parameter
%%%-----------------------------------------------------------------
@@ -2051,7 +2116,32 @@ shutdown_timeout(Config) when is_list(Config) ->
end,
ok.
+%%%-----------------------------------------------------------------
+%%% Provokes a (previous) application shutdown deadlock
+%%%-----------------------------------------------------------------
+shutdown_deadlock(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir,Config),
+ code:add_path(filename:join([DataDir,deadlock])),
+ %% ok = rpc:call(Cp1, application, start, [sasl]),
+ ok = application:start(deadlock),
+ Tester = self(),
+ application:set_env(deadlock, fail_stop, Tester),
+ spawn(fun() -> Tester ! {stop, application:stop(deadlock)} end),
+ receive
+ {deadlock, Server} ->
+ spawn(fun() ->
+ Master = application_controller:get_master(deadlock),
+ Child = application_master:get_child(Master),
+ Tester ! {child, Child}
+ end),
+ timer:sleep(100),
+ erlang:display({self(), "Sending Continue", Server}),
+ Server ! continue
+ end,
+ [_|_] = application:which_applications(),
+ application:unload(deadlock), % clean up!
+ ok.
%%-----------------------------------------------------------------
diff --git a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
index 0c1001bed6..233c7a3f76 100644
--- a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
+++ b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
@@ -4,5 +4,5 @@
{applications, [kernel, stdlib, sasl]},
{modules, [deadlock]},
{mod, {deadlock, []}},
- {env, [{fail_start, false}]}
+ {env, [{fail_start, false}, {fail_stop, false}]}
]}.
diff --git a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
index 5f68bf9078..3ef6105371 100644
--- a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
+++ b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
@@ -21,7 +21,7 @@ init([sup]) ->
{ok, {{one_for_one, 5, 10}, [
{
sasl_syslog_dm, {?MODULE, start_link, []},
- permanent, brutal_kill, worker,
+ permanent, 25000, worker,
[deadlock]
}
]}};
@@ -32,6 +32,8 @@ init([sup]) ->
init([child]) ->
case application:get_env(deadlock, fail_start) of
{ok, false} ->
+ process_flag(trap_exit, true),
+ io:format("~p: Traps exit~n",[?MODULE]),
%% we must not fail on the first init, otherwise supervisor
%% terminates immediately
{ok, []};
@@ -50,6 +52,14 @@ handle_info(_Msg, State) ->
{noreply, State}.
terminate(_Reason, _State) ->
+ case application:get_env(deadlock, fail_stop) of
+ {ok, false} -> ok;
+ {ok, Tester} ->
+ Tester ! {deadlock, self()},
+ io:format("~p: Waiting in terminate (~p)~n",[?MODULE,Tester]),
+ receive continue -> ok end
+ end,
+ io:format("~p: terminates~n", [?MODULE]),
ok.
code_change(_OldVsn, State, _Extra) ->
diff --git a/lib/kernel/test/application_SUITE_data/t4.config b/lib/kernel/test/application_SUITE_data/t4.config
new file mode 100644
index 0000000000..8b2bc52c01
--- /dev/null
+++ b/lib/kernel/test/application_SUITE_data/t4.config
@@ -0,0 +1 @@
+[{app1, [{par1,t4}]}]. \ No newline at end of file
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index cd9359f2aa..afedc17e57 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -23,7 +23,8 @@
-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]).
-export([set_path/1, get_path/1, add_path/1, add_paths/1, del_path/1,
replace_path/1, load_file/1, load_abs/1, ensure_loaded/1,
- delete/1, purge/1, soft_purge/1, is_loaded/1, all_loaded/1,
+ delete/1, purge/1, purge_many_exits/1, soft_purge/1, is_loaded/1,
+ all_loaded/1,
load_binary/1, dir_req/1, object_code/1, set_path_file/1,
upgrade/1,
sticky_dir/1, pa_pz_option/1, add_del_path/1,
@@ -36,8 +37,7 @@
native_early_modules/1, get_mode/1]).
-export([init_per_testcase/2, end_per_testcase/2,
- init_per_suite/1, end_per_suite/1,
- sticky_compiler/1]).
+ init_per_suite/1, end_per_suite/1]).
%% error_logger
-export([init/1,
@@ -51,10 +51,10 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[set_path, get_path, add_path, add_paths, del_path,
replace_path, load_file, load_abs, ensure_loaded,
- delete, purge, soft_purge, is_loaded, all_loaded,
+ delete, purge, purge_many_exits, soft_purge, is_loaded, all_loaded,
load_binary, dir_req, object_code, set_path_file,
upgrade,
- pa_pz_option, add_del_path, dir_disappeared,
+ sticky_dir, pa_pz_option, add_del_path, dir_disappeared,
ext_mod_dep, clash, load_cached, start_node_with_cache,
add_and_rehash, where_is_file_no_cache,
where_is_file_cached, purge_stacktrace, mult_lib_roots,
@@ -218,6 +218,13 @@ del_path(suite) -> [];
del_path(doc) -> [];
del_path(Config) when is_list(Config) ->
P = code:get_path(),
+ try
+ del_path_1(P)
+ after
+ code:set_path(P)
+ end.
+
+del_path_1(P) ->
test_server:format("Initial code:get_path()=~p~n",[P]),
{'EXIT',_} = (catch code:del_path(3)),
false = code:del_path(my_dummy_name),
@@ -225,19 +232,22 @@ del_path(Config) when is_list(Config) ->
Dir = filename:join([code:lib_dir(kernel),"ebin"]),
test_server:format("kernel dir: ~p~n",[Dir]),
-
true = code:del_path(kernel),
NewP = code:get_path(),
test_server:format("Path after removing 'kernel':~p~n",[NewP]),
ReferenceP = lists:delete(Dir,P),
test_server:format("Reference path:~p~n",[ReferenceP]),
NewP = ReferenceP, % check that dir is deleted
+ code:set_path(P),
+ %% An superfluous "/" should also work.
+ true = code:del_path("kernel/"),
+ NewP = ReferenceP, % check that dir is deleted
code:set_path(P),
+
true = code:del_path(Dir),
NewP1 = code:get_path(),
NewP1 = lists:delete(Dir,P), % check that dir is deleted
- code:set_path(P),
ok.
replace_path(suite) -> [];
@@ -369,6 +379,42 @@ purge(Config) when is_list(Config) ->
process_flag(trap_exit, OldFlag),
ok.
+purge_many_exits(Config) when is_list(Config) ->
+ OldFlag = process_flag(trap_exit, true),
+ code:purge(code_b_test),
+ {'EXIT',_} = (catch code:purge({})),
+ false = code:purge(code_b_test),
+ TPids = lists:map(fun (_) ->
+ {code_b_test:do_spawn(),
+ spawn_link(fun () ->
+ receive
+ after infinity -> ok
+ end
+ end)}
+ end,
+ lists:seq(1, 1000)),
+ % Give them time to start...
+ receive after 1000 -> ok end,
+ true = code:delete(code_b_test),
+ lists:foreach(fun ({Pid1, Pid2}) ->
+ true = erlang:is_process_alive(Pid1),
+ false = code_b_test:check_exit(Pid1),
+ true = erlang:is_process_alive(Pid2)
+ end, TPids),
+ true = code:purge(code_b_test),
+ lists:foreach(fun ({Pid1, Pid2}) ->
+ false = erlang:is_process_alive(Pid1),
+ true = code_b_test:check_exit(Pid1),
+ true = erlang:is_process_alive(Pid2),
+ exit(Pid2, kill)
+ end, TPids),
+ lists:foreach(fun ({_Pid1, Pid2}) ->
+ receive {'EXIT', Pid2, _} -> ok end
+ end, TPids),
+ process_flag(trap_exit, OldFlag),
+ ok.
+
+
soft_purge(suite) -> [];
soft_purge(doc) -> [];
soft_purge(Config) when is_list(Config) ->
@@ -540,35 +586,42 @@ sticky_dir(suite) -> [];
sticky_dir(doc) -> ["Test that a module with the same name as a module in ",
"a sticky directory cannot be loaded."];
sticky_dir(Config) when is_list(Config) ->
- MyDir=filename:dirname(code:which(?MODULE)),
- {ok, Node}=?t:start_node(sticky_dir, slave,[{args, "-pa \""++MyDir++"\""}]),
- File=filename:join([?config(data_dir, Config), "calendar"]),
- Ret=rpc:call(Node, ?MODULE, sticky_compiler, [File]),
+ Pa = filename:dirname(code:which(?MODULE)),
+ {ok,Node} = ?t:start_node(sticky_dir, slave, [{args,"-pa "++Pa}]),
+ Mods = [code,lists,erlang,init],
+ OutDir = filename:join(?config(priv_dir, Config), sticky_dir),
+ _ = file:make_dir(OutDir),
+ Ret = rpc:call(Node, erlang, apply,
+ [fun sticky_compiler/2,[Mods,OutDir]]),
case Ret of
- fail ->
- ?t:fail("c:c allowed a sticky module to be compiled and loaded.");
- ok ->
+ [] ->
ok;
Other ->
- test_server:format("Other: ~p",[Other])
+ io:format("~p\n", [Other]),
+ ?t:fail()
end,
- ?t:stop_node(Node).
+ ?t:stop_node(Node),
+ ok.
-sticky_compiler(File) ->
- Compiled=File++code:objfile_extension(),
- Dir=filename:dirname(File),
- code:add_patha(Dir),
- file:delete(Compiled),
- case c:c(File, [{outdir, Dir}]) of
- {ok, Module} ->
- case catch Module:test(apa) of
- {error, _} ->
- fail;
- {'EXIT', _} ->
- ok
- end;
- Other ->
- test_server:format("c:c(~p) returned: ~p",[File, Other]),
+sticky_compiler(Files, PrivDir) ->
+ code:add_patha(PrivDir),
+ Rets = [do_sticky_compile(F, PrivDir) || F <- Files],
+ [R || R <- Rets, R =/= ok].
+
+do_sticky_compile(Mod, Dir) ->
+ %% Make sure that the module is loaded. A module being sticky
+ %% only prevents it from begin reloaded, not from being loaded
+ %% from the wrong place to begin with.
+ Mod = Mod:module_info(module),
+ File = filename:append(Dir, atom_to_list(Mod)),
+ Src = io_lib:format("-module(~s).\n"
+ "-export([test/1]).\n"
+ "test(me) -> fail.\n", [Mod]),
+ ok = file:write_file(File++".erl", Src),
+ case c:c(File, [{outdir,Dir}]) of
+ {ok,Module} ->
+ Module:test(me);
+ {error,sticky_directory} ->
ok
end.
@@ -616,7 +669,7 @@ clash(Config) when is_list(Config) ->
DDir = ?config(data_dir,Config)++"clash/",
P = code:get_path(),
[TestServerPath|_] = [Path || Path <- code:get_path(),
- re:run(Path,"test_server/?$",[]) /= nomatch],
+ re:run(Path,"test_server/?$",[unicode]) /= nomatch],
%% test non-clashing entries
@@ -1490,7 +1543,10 @@ create_big_script(Config,Local) ->
Leftover <- UnloadFix,
lists:keymember(Leftover,1,InitialApplications) ],
%% Now we should have only "real" applications...
- [application:load(list_to_atom(Y)) || {match,[Y]} <- [ re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",[{capture,[1],list}]) || X <- code:get_path()],filter_app(Y,Local)],
+ [application:load(list_to_atom(Y))
+ || {match,[Y]} <- [re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",
+ [{capture,[1],list},unicode]) ||
+ X <- code:get_path()],filter_app(Y,Local)],
Apps = [ {N,V} || {N,_,V} <- application:loaded_applications()],
{ok,Fd} = file:open(Name ++ ".rel", [write]),
io:format(Fd,
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index 9cccdab76b..15c2adc957 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,7 +26,8 @@
-export([tick/1, tick_change/1, illegal_nodenames/1, hidden_node/1,
table_waste/1, net_setuptime/1,
-
+ inet_dist_options_options/1,
+
monitor_nodes_nodedown_reason/1,
monitor_nodes_complex_nodedown_reason/1,
monitor_nodes_node_type/1,
@@ -38,7 +39,8 @@
monitor_nodes_many/1]).
%% Performs the test at another node.
--export([tick_cli_test/1, tick_cli_test1/1,
+-export([get_socket_priorities/0,
+ tick_cli_test/1, tick_cli_test1/1,
tick_serv_test/2, tick_serv_test1/1,
keep_conn/1, time_ping/1]).
@@ -62,7 +64,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[tick, tick_change, illegal_nodenames, hidden_node,
- table_waste, net_setuptime, {group, monitor_nodes}].
+ table_waste, net_setuptime, inet_dist_options_options,
+ {group, monitor_nodes}].
groups() ->
[{monitor_nodes, [],
@@ -554,6 +557,71 @@ check_monitor_nodes_res(Pid, Node) ->
end.
+
+inet_dist_options_options(suite) -> [];
+inet_dist_options_options(doc) ->
+ ["Check the kernel inet_dist_{listen,connect}_options options"];
+inet_dist_options_options(Config) when is_list(Config) ->
+ Prio = 1,
+ case gen_udp:open(0, [{priority,Prio}]) of
+ {ok,Socket} ->
+ case inet:getopts(Socket, [priority]) of
+ {ok,[{priority,Prio}]} ->
+ ok = gen_udp:close(Socket),
+ do_inet_dist_options_options(Prio);
+ _ ->
+ ok = gen_udp:close(Socket),
+ {skip,
+ "Can not set priority "++integer_to_list(Prio)++
+ " on socket"}
+ end;
+ {error,_} ->
+ {skip, "Can not set priority on socket"}
+ end.
+
+do_inet_dist_options_options(Prio) ->
+ PriorityString0 = "[{priority,"++integer_to_list(Prio)++"}]",
+ PriorityString =
+ case os:cmd("echo [{a,1}]") of
+ "[{a,1}]"++_ ->
+ PriorityString0;
+ _ ->
+ %% Some shells need quoting of [{}]
+ "'"++PriorityString0++"'"
+ end,
+ InetDistOptions =
+ "-hidden "
+ "-kernel inet_dist_connect_options "++PriorityString++" "
+ "-kernel inet_dist_listen_options "++PriorityString,
+ ?line {ok,Node1} =
+ start_node(inet_dist_options_1, InetDistOptions),
+ ?line {ok,Node2} =
+ start_node(inet_dist_options_2, InetDistOptions),
+ %%
+ ?line pong =
+ rpc:call(Node1, net_adm, ping, [Node2]),
+ ?line PrioritiesNode1 =
+ rpc:call(Node1, ?MODULE, get_socket_priorities, []),
+ ?line PrioritiesNode2 =
+ rpc:call(Node2, ?MODULE, get_socket_priorities, []),
+ ?line ?t:format("PrioritiesNode1 = ~p", [PrioritiesNode1]),
+ ?line ?t:format("PrioritiesNode2 = ~p", [PrioritiesNode2]),
+ ?line Elevated = [P || P <- PrioritiesNode1, P =:= Prio],
+ ?line Elevated = [P || P <- PrioritiesNode2, P =:= Prio],
+ ?line [_|_] = Elevated,
+ %%
+ ?line stop_node(Node2),
+ ?line stop_node(Node1),
+ ok.
+
+get_socket_priorities() ->
+ [Priority ||
+ {ok,[{priority,Priority}]} <-
+ [inet:getopts(Port, [priority]) ||
+ Port <- erlang:ports(),
+ element(2, erlang:port_info(Port, name)) =:= "tcp_inet"]].
+
+
%%
%% Testcase:
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index b2ca3bdbc2..658c31c14d 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -328,6 +328,30 @@ file_requests(Config) when is_list(Config) ->
{ok,Info} = file:read_file_info(code:which(test_server)),
?line {ok,Info} = rpc:call(Node, erl_prim_loader, read_file_info,
[code:which(test_server)]),
+
+ PrivDir = ?config(priv_dir,Config),
+ Dir = filename:join(PrivDir,?MODULE_STRING++"_file_requests"),
+ ok = file:make_dir(Dir),
+ Alias = filename:join(Dir,"symlink"),
+ case file:make_symlink(code:which(test_server), Alias) of
+ {error, enotsup} ->
+ %% Links not supported on this platform
+ ok;
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ %% Windows user not privileged to create symlinks"
+ ok;
+ ok ->
+ %% Reading file info for link should return file info for
+ %% link target
+ {ok,Info} = rpc:call(Node, erl_prim_loader, read_file_info,
+ [Alias]),
+ #file_info{type=regular} = Info,
+ {ok,#file_info{type=symlink}} =
+ rpc:call(Node, erl_prim_loader, read_link_info,
+ [Alias])
+ end,
+
{ok,Cwd} = file:get_cwd(),
?line {ok,Cwd} = rpc:call(Node, erl_prim_loader, get_cwd, []),
case file:get_cwd("C:") of
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index e4c8f0ffaf..2ce2303ba3 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -161,7 +161,13 @@ init_per_suite(Config) when is_list(Config) ->
ok ->
[{sasl,started}]
end,
- ok = application:start(os_mon),
+ ok = case os:type() of
+ {ose,_} ->
+ ok;
+ _ ->
+ application:start(os_mon)
+ end,
+
case os:type() of
{win32, _} ->
Priv = ?config(priv_dir, Config),
@@ -185,7 +191,13 @@ end_per_suite(Config) when is_list(Config) ->
_ ->
ok
end,
- application:stop(os_mon),
+
+ case os:type() of
+ {ose,_} ->
+ ok;
+ _ ->
+ application:stop(os_mon)
+ end,
case proplists:get_value(sasl, Config) of
started ->
application:stop(sasl);
@@ -412,11 +424,17 @@ make_del_dir(Config) when is_list(Config) ->
?line ok = ?FILE_MODULE:del_dir(NewDir),
?line {error, enoent} = ?FILE_MODULE:del_dir(NewDir),
% Make sure we are not in a directory directly under test_server
- % as that would result in eacess errors when trying to delere '..',
+ % as that would result in eacces errors when trying to delete '..',
% because there are processes having that directory as current.
?line ok = ?FILE_MODULE:make_dir(NewDir),
?line {ok,CurrentDir} = file:get_cwd(),
- ?line ok = ?FILE_MODULE:set_cwd(NewDir),
+ case {os:type(), length(NewDir) >= 260 } of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH)\n", []),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ ?line ok = ?FILE_MODULE:set_cwd(NewDir)
+ end,
try
%% Check that we get an error when trying to create...
%% a deep directory
@@ -473,32 +491,39 @@ cur_dir_0(Config) when is_list(Config) ->
atom_to_list(?MODULE)
++"_curdir"),
?line ok = ?FILE_MODULE:make_dir(NewDir),
- ?line io:format("cd to ~s",[NewDir]),
- ?line ok = ?FILE_MODULE:set_cwd(NewDir),
-
- %% Create a file in the new current directory, and check that it
- %% really is created there
- ?line UncommonName = "uncommon.fil",
- ?line {ok,Fd} = ?FILE_MODULE:open(UncommonName,read_write),
- ?line ok = ?FILE_MODULE:close(Fd),
- ?line {ok,NewDirFiles} = ?FILE_MODULE:list_dir("."),
- ?line true = lists:member(UncommonName,NewDirFiles),
-
- %% Delete the directory and return to the old current directory
- %% and check that the created file isn't there (too!)
- ?line expect({error, einval}, {error, eacces},
- ?FILE_MODULE:del_dir(NewDir)),
- ?line ?FILE_MODULE:delete(UncommonName),
- ?line {ok,[]} = ?FILE_MODULE:list_dir("."),
- ?line ok = ?FILE_MODULE:set_cwd(Dir1),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line ok = ?FILE_MODULE:del_dir(NewDir),
- ?line {error, enoent} = ?FILE_MODULE:set_cwd(NewDir),
- ?line ok = ?FILE_MODULE:set_cwd(Dir1),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line {ok,OldDirFiles} = ?FILE_MODULE:list_dir("."),
- ?line false = lists:member(UncommonName,OldDirFiles),
-
+ case {os:type(), length(NewDir) >= 260} of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH):\n"),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ io:format("cd to ~s",[NewDir]),
+ ok = ?FILE_MODULE:set_cwd(NewDir),
+
+ %% Create a file in the new current directory, and check that it
+ %% really is created there
+ UncommonName = "uncommon.fil",
+ {ok,Fd} = ?FILE_MODULE:open(UncommonName,read_write),
+ ok = ?FILE_MODULE:close(Fd),
+ {ok,NewDirFiles} = ?FILE_MODULE:list_dir("."),
+ true = lists:member(UncommonName,NewDirFiles),
+
+ %% Delete the directory and return to the old current directory
+ %% and check that the created file isn't there (too!)
+ expect({error, einval}, {error, eacces},
+ ?FILE_MODULE:del_dir(NewDir)),
+ ?FILE_MODULE:delete(UncommonName),
+ {ok,[]} = ?FILE_MODULE:list_dir("."),
+ ok = ?FILE_MODULE:set_cwd(Dir1),
+ io:format("cd back to ~s",[Dir1]),
+
+ ok = ?FILE_MODULE:del_dir(NewDir),
+ {error, enoent} = ?FILE_MODULE:set_cwd(NewDir),
+ ok = ?FILE_MODULE:set_cwd(Dir1),
+ io:format("cd back to ~s",[Dir1]),
+ {ok,OldDirFiles} = ?FILE_MODULE:list_dir("."),
+ false = lists:member(UncommonName,OldDirFiles)
+ end,
+
%% Try doing some bad things
?line {error, badarg} = ?FILE_MODULE:set_cwd({foo,bar}),
?line {error, enoent} = ?FILE_MODULE:set_cwd(""),
@@ -525,11 +550,11 @@ cur_dir_1(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:seconds(5)),
?line case os:type() of
- {unix, _} ->
- ?line {error, enotsup} = ?FILE_MODULE:get_cwd("d:");
- {win32, _} ->
- win_cur_dir_1(Config)
- end,
+ {win32, _} ->
+ win_cur_dir_1(Config);
+ _ ->
+ ?line {error, enotsup} = ?FILE_MODULE:get_cwd("d:")
+ end,
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -712,7 +737,10 @@ open1(Config) when is_list(Config) ->
?line io:format(Fd1,Str,[]),
?line {ok,0} = ?FILE_MODULE:position(Fd1,bof),
?line Str = io:get_line(Fd1,''),
- ?line Str = io:get_line(Fd2,''),
+ ?line case io:get_line(Fd2,'') of
+ Str -> Str;
+ eof -> Str
+ end,
?line ok = ?FILE_MODULE:close(Fd2),
?line {ok,0} = ?FILE_MODULE:position(Fd1,bof),
?line ok = ?FILE_MODULE:truncate(Fd1),
@@ -805,6 +833,20 @@ new_modes(Config) when is_list(Config) ->
?line {ok, [$\[]} = ?FILE_MODULE:read(Fd6, 1),
?line ok = ?FILE_MODULE:close(Fd6),
+ %% write and sync
+ case ?FILE_MODULE:open(Name1, [write, sync]) of
+ {ok, Fd7} ->
+ ok = io:write(Fd7, Marker),
+ ok = io:put_chars(Fd7, ".\n"),
+ ok = ?FILE_MODULE:close(Fd7),
+ {ok, Fd8} = ?FILE_MODULE:open(Name1, [read]),
+ {ok, Marker} = io:read(Fd8, prompt),
+ ok = ?FILE_MODULE:close(Fd8);
+ {error, enotsup} ->
+ %% for platforms that don't support the sync option
+ ok
+ end,
+
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -1194,9 +1236,10 @@ file_info_basic_file(Config) when is_list(Config) ->
%% Test that the file has the expected attributes.
%% The times are tricky, so we will save them to a separate test case.
- ?line {ok,#file_info{size=Size,type=Type,access=Access,
- atime=AccessTime,mtime=ModifyTime}} =
- ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo} = ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo} = ?FILE_MODULE:read_file_info(Name, [raw]),
+ #file_info{size=Size,type=Type,access=Access,
+ atime=AccessTime,mtime=ModifyTime} = FileInfo,
?line io:format("Access ~p, Modify ~p", [AccessTime, ModifyTime]),
?line Size = 7,
?line Type = regular,
@@ -1232,15 +1275,16 @@ file_info_basic_directory(Config) when is_list(Config) ->
?line test_directory("/", read_write),
?line test_directory("c:/", read_write),
?line test_directory("c:\\", read_write);
- {unix, _} ->
+ _ ->
?line test_directory("/", read)
end,
test_server:timetrap_cancel(Dog).
test_directory(Name, ExpectedAccess) ->
- ?line {ok,#file_info{size=Size,type=Type,access=Access,
- atime=AccessTime,mtime=ModifyTime}} =
- ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo} = ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo} = ?FILE_MODULE:read_file_info(Name, [raw]),
+ #file_info{size=Size,type=Type,access=Access,
+ atime=AccessTime,mtime=ModifyTime} = FileInfo,
?line io:format("Testing directory ~s", [Name]),
?line io:format("Directory size is ~p", [Size]),
?line io:format("Access ~p", [Access]),
@@ -1265,11 +1309,11 @@ file_info_bad(doc) -> [];
file_info_bad(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = filename:join([?config(priv_dir, Config)]),
- ?line {error, enoent} =
- ?FILE_MODULE:read_file_info(
- filename:join(RootDir,
- atom_to_list(?MODULE)++ "_nonexistent")),
+ FileName = filename:join(RootDir, atom_to_list(?MODULE) ++ "_nonexistent"),
+ {error,enoent} = ?FILE_MODULE:read_file_info(FileName),
+ {error,enoent} = ?FILE_MODULE:read_file_info(FileName, [raw]),
?line {error, enoent} = ?FILE_MODULE:read_file_info(""),
+ {error, enoent} = ?FILE_MODULE:read_file_info("", [raw]),
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -1304,8 +1348,16 @@ file_info_int(Config) ->
?line io:put_chars(Fd1,"foo"),
%% check that the file got a modify date max a few seconds away from now
- ?line {ok,#file_info{type=regular,atime=AccTime1,mtime=ModTime1}} =
- ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo1} = ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo1Raw} = ?FILE_MODULE:read_file_info(Name, [raw]),
+
+ %% We assert that everything but the size is the same, on some OSs the
+ %% size may not have been flushed to disc and we do not want to do a
+ %% sync to force it.
+ FileInfo1Raw = FileInfo1#file_info{ size = FileInfo1Raw#file_info.size },
+
+ #file_info{type=regular,atime=AccTime1,mtime=ModTime1} = FileInfo1,
+
?line Now = erlang:localtime(), %???
?line io:format("Now ~p",[Now]),
?line io:format("Open file Acc ~p Mod ~p",[AccTime1,ModTime1]),
@@ -1321,9 +1373,10 @@ file_info_int(Config) ->
%% close the file, and watch the modify date change
?line ok = ?FILE_MODULE:close(Fd1),
- ?line {ok,#file_info{size=Size,type=regular,access=Access,
- atime=AccTime2,mtime=ModTime2}} =
- ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo2} = ?FILE_MODULE:read_file_info(Name),
+ {ok,FileInfo2} = ?FILE_MODULE:read_file_info(Name, [raw]),
+ #file_info{size=Size,type=regular,access=Access,
+ atime=AccTime2,mtime=ModTime2} = FileInfo2,
?line io:format("Closed file Acc ~p Mod ~p",[AccTime2,ModTime2]),
?line true = time_dist(ModTime1,ModTime2) >= 0,
@@ -1332,9 +1385,10 @@ file_info_int(Config) ->
?line Access = read_write,
%% Do some directory checking
- ?line {ok,#file_info{size=DSize,type=directory,access=DAccess,
- atime=AccTime3,mtime=ModTime3}} =
- ?FILE_MODULE:read_file_info(RootDir),
+ {ok,FileInfo3} = ?FILE_MODULE:read_file_info(RootDir),
+ {ok,FileInfo3} = ?FILE_MODULE:read_file_info(RootDir, [raw]),
+ #file_info{size=DSize,type=directory,access=DAccess,
+ atime=AccTime3,mtime=ModTime3} = FileInfo3,
%% this dir was modified only a few secs ago
?line io:format("Dir Acc ~p; Mod ~p; Now ~p", [AccTime3, ModTime3, Now]),
?line true = abs(time_dist(Now,ModTime3)) < 5,
@@ -1407,6 +1461,12 @@ file_write_file_info(Config) when is_list(Config) ->
?line ?FILE_MODULE:write_file_info(Name1, #file_info{mode=8#400}),
?line {error, eacces} = ?FILE_MODULE:write_file(Name1, "hello again"),
+ %% Same with raw.
+ ?FILE_MODULE:write_file_info(Name1, #file_info{mode=8#600}, [raw]),
+ ok = ?FILE_MODULE:write_file(Name1, "hello again"),
+ ?FILE_MODULE:write_file_info(Name1, #file_info{mode=8#400}, [raw]),
+ {error,eacces} = ?FILE_MODULE:write_file(Name1, "hello again"),
+
%% Write the times again.
%% Note: Seconds must be even; see note in file_info_times/1.
@@ -1953,7 +2013,6 @@ names(Config) when is_list(Config) ->
?line Name1 = filename:join(RootDir, FileName),
?line Name2 = [RootDir,"/","foo1",".","fil"],
?line Name3 = [RootDir,"/",foo,$1,[[[],[],'.']],"f",il],
- ?line Name4 = list_to_atom(Name1),
?line {ok,Fd0} = ?FILE_MODULE:open(Name1,write),
?line ok = ?FILE_MODULE:close(Fd0),
@@ -1966,23 +2025,33 @@ names(Config) when is_list(Config) ->
?line ok = ?FILE_MODULE:close(Fd2),
?line {ok,Fd3} = ?FILE_MODULE:open(Name3,read),
?line ok = ?FILE_MODULE:close(Fd3),
- ?line {ok,Fd4} = ?FILE_MODULE:open(Name4,read),
- ?line ok = ?FILE_MODULE:close(Fd4),
+ case length(Name1) > 255 of
+ true ->
+ io:format("Path too long for an atom:\n\n~p\n", [Name1]);
+ false ->
+ Name4 = list_to_atom(Name1),
+ {ok,Fd4} = ?FILE_MODULE:open(Name4,read),
+ ok = ?FILE_MODULE:close(Fd4)
+ end,
%% Try some path names
?line Path1 = RootDir,
?line Path2 = [RootDir],
?line Path3 = ['',[],[RootDir,[[]]]],
- ?line Path4 = list_to_atom(Path1),
?line {ok,Fd11,_} = ?FILE_MODULE:path_open([Path1],FileName,read),
?line ok = ?FILE_MODULE:close(Fd11),
?line {ok,Fd12,_} = ?FILE_MODULE:path_open([Path2],FileName,read),
?line ok = ?FILE_MODULE:close(Fd12),
?line {ok,Fd13,_} = ?FILE_MODULE:path_open([Path3],FileName,read),
?line ok = ?FILE_MODULE:close(Fd13),
- ?line {ok,Fd14,_} = ?FILE_MODULE:path_open([Path4],FileName,read),
- ?line ok = ?FILE_MODULE:close(Fd14),
-
+ case length(Path1) > 255 of
+ true->
+ io:format("Path too long for an atom:\n\n~p\n", [Path1]);
+ false ->
+ Path4 = list_to_atom(Path1),
+ {ok,Fd14,_} = ?FILE_MODULE:path_open([Path4],FileName,read),
+ ok = ?FILE_MODULE:close(Fd14)
+ end,
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -2016,15 +2085,15 @@ e_delete(Config) when is_list(Config) ->
%% No permission.
?line case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% Remove a character device.
+ ?line {error, eacces} = ?FILE_MODULE:delete("nul");
+ _ ->
?line ?FILE_MODULE:write_file_info(
Base, #file_info {mode=0}),
?line {error, eacces} = ?FILE_MODULE:delete(Afile),
?line ?FILE_MODULE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- %% Remove a character device.
- ?line {error, eacces} = ?FILE_MODULE:delete("nul")
+ Base, #file_info {mode=8#600})
end,
?line [] = flush(),
@@ -2126,6 +2195,9 @@ e_rename(Config) when is_list(Config) ->
%% At least Windows NT can
%% successfully move a file to
%% another drive.
+ ok;
+ {ose, _} ->
+ %% disabled for now
ok
end,
[] = flush(),
@@ -2157,13 +2229,13 @@ e_make_dir(Config) when is_list(Config) ->
%% No permission (on Unix only).
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?FILE_MODULE:write_file_info(Base, #file_info {mode=0}),
{error, eacces} = ?FILE_MODULE:make_dir(filename:join(Base, "xxxx")),
?FILE_MODULE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ Base, #file_info {mode=8#600})
end,
test_server:timetrap_cancel(Dog),
ok.
@@ -2206,14 +2278,14 @@ e_del_dir(Config) when is_list(Config) ->
%% No permission.
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
ADirectory = filename:join(Base, "no_perm"),
ok = ?FILE_MODULE:make_dir(ADirectory),
?FILE_MODULE:write_file_info( Base, #file_info {mode=0}),
{error, eacces} = ?FILE_MODULE:del_dir(ADirectory),
- ?FILE_MODULE:write_file_info( Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ ?FILE_MODULE:write_file_info( Base, #file_info {mode=8#600})
end,
[] = flush(),
test_server:timetrap_cancel(Dog),
@@ -2596,7 +2668,9 @@ make_link(Config) when is_list(Config) ->
%% since they are not used on symbolic links.
?line {ok, Info} = ?FILE_MODULE:read_link_info(Name),
+ {ok,Info} = ?FILE_MODULE:read_link_info(Name, [raw]),
?line {ok, Info} = ?FILE_MODULE:read_link_info(Alias),
+ {ok,Info} = ?FILE_MODULE:read_link_info(Alias, [raw]),
?line #file_info{links = 2, type = regular} = Info,
?line {error, eexist} =
?FILE_MODULE:make_link(Name, Alias),
@@ -2616,6 +2690,7 @@ read_link_info_for_non_link(Config) when is_list(Config) ->
?line {ok, #file_info{type=directory}} =
?FILE_MODULE:read_link_info("."),
+ {ok, #file_info{type=directory}} = ?FILE_MODULE:read_link_info(".", [raw]),
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
@@ -2641,13 +2716,20 @@ symlinks(Config) when is_list(Config) ->
case ?FILE_MODULE:make_symlink(Name, Alias) of
{error, enotsup} ->
{skipped, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skipped, "Windows user not privileged to create symlinks"};
ok ->
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Name),
+ {ok,Info1} = ?FILE_MODULE:read_file_info(Name, [raw]),
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Alias),
+ {ok,Info1} = ?FILE_MODULE:read_file_info(Alias, [raw]),
?line {ok, Info1} = ?FILE_MODULE:read_link_info(Name),
+ {ok,Info1} = ?FILE_MODULE:read_link_info(Name, [raw]),
?line #file_info{links = 1, type = regular} = Info1,
?line {ok, Info2} = ?FILE_MODULE:read_link_info(Alias),
+ {ok,Info2} = ?FILE_MODULE:read_link_info(Alias, [raw]),
?line #file_info{links=1, type=symlink} = Info2,
?line {ok, Name} = ?FILE_MODULE:read_link(Alias),
{ok, Name} = ?FILE_MODULE:read_link_all(Alias),
@@ -3567,7 +3649,11 @@ otp_10852(Config) when is_list(Config) ->
ok = rpc_call(Node, list_dir_all, [B]),
ok = rpc_call(Node, read_file, [B]),
ok = rpc_call(Node, make_link, [B,B]),
- ok = rpc_call(Node, make_symlink, [B,B]),
+ case rpc_call(Node, make_symlink, [B,B]) of
+ ok -> ok;
+ {error, E} when (E =:= enotsup) or (E =:= eperm) ->
+ {win32,_} = os:type()
+ end,
ok = rpc_call(Node, delete, [B]),
ok = rpc_call(Node, make_dir, [B]),
ok = rpc_call(Node, del_dir, [B]),
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index 0c8082026a..9354af2e41 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -1,5 +1,4 @@
-module(file_name_SUITE).
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index d2de96b269..881aaed429 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -35,8 +35,9 @@
open_unihoming_ipv6_socket/1,
open_multihoming_ipv6_socket/1,
open_multihoming_ipv4_and_ipv6_socket/1,
- basic_stream/1, xfer_stream_min/1, peeloff_active_once/1,
- peeloff_active_true/1, buffers/1,
+ basic_stream/1, xfer_stream_min/1, active_n/1,
+ peeloff_active_once/1, peeloff_active_true/1, peeloff_active_n/1,
+ buffers/1,
names_unihoming_ipv4/1, names_unihoming_ipv6/1,
names_multihoming_ipv4/1, names_multihoming_ipv6/1]).
@@ -48,9 +49,9 @@ all() ->
open_multihoming_ipv4_socket,
open_unihoming_ipv6_socket,
open_multihoming_ipv6_socket,
- open_multihoming_ipv4_and_ipv6_socket,
+ open_multihoming_ipv4_and_ipv6_socket, active_n,
basic_stream, xfer_stream_min, peeloff_active_once,
- peeloff_active_true, buffers,
+ peeloff_active_true, peeloff_active_n, buffers,
names_unihoming_ipv4, names_unihoming_ipv6,
names_multihoming_ipv4, names_multihoming_ipv6].
@@ -785,6 +786,106 @@ implicit_inet6(S1, Addr) ->
end,
?line ok = gen_sctp:close(S2).
+active_n(doc) ->
+ "Verify {active,N} socket management";
+active_n(suite) ->
+ [];
+active_n(Config) when is_list(Config) ->
+ N = 3,
+ S1 = ok(gen_sctp:open([{active,N}])),
+ [{active,N}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,-N}]),
+ receive
+ {sctp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,sctp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,0}]),
+ receive
+ {sctp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,sctp_passive_failure})
+ end,
+ ok = inet:setopts(S1, [{active,32767}]),
+ {error,einval} = inet:setopts(S1, [{active,1}]),
+ {error,einval} = inet:setopts(S1, [{active,-32769}]),
+ ok = inet:setopts(S1, [{active,-32768}]),
+ receive
+ {sctp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,sctp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,N}]),
+ ok = inet:setopts(S1, [{active,true}]),
+ [{active,true}] = ok(inet:getopts(S1, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ ok = inet:setopts(S1, [{active,N}]),
+ ok = inet:setopts(S1, [{active,once}]),
+ [{active,once}] = ok(inet:getopts(S1, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ {error,einval} = inet:setopts(S1, [{active,32768}]),
+ ok = inet:setopts(S1, [{active,false}]),
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ ok = gen_sctp:listen(S1, true),
+ S1Port = ok(inet:port(S1)),
+ S2 = ok(gen_sctp:open(0, [{active,false}])),
+ Assoc = ok(gen_sctp:connect(S2, "localhost", S1Port, [])),
+ ok = inet:setopts(S1, [{active,N}]),
+ [{active,N}] = ok(inet:getopts(S1, [active])),
+ LoopFun = fun(Count, Count, _Fn) ->
+ receive
+ {sctp_passive,S1} ->
+ ok
+ after
+ 5000 ->
+ exit({error,timeout})
+ end;
+ (I, Count, Fn) ->
+ Msg = list_to_binary("message "++integer_to_list(I)),
+ ok = gen_sctp:send(S2, Assoc, 0, Msg),
+ receive
+ {sctp,S1,_,_,{[SR],Msg}} when is_record(SR, sctp_sndrcvinfo) ->
+ Fn(I+1, Count, Fn);
+ {sctp,S1,_,_,_} ->
+ %% ignore non-data messages
+ ok = inet:setopts(S1, [{active,1}]),
+ Fn(I, Count, Fn);
+ Other ->
+ exit({unexpected, Other})
+ after
+ 5000 ->
+ exit({error,timeout})
+ end
+ end,
+ ok = LoopFun(1, N, LoopFun),
+ S3 = ok(gen_sctp:open([{active,0}])),
+ receive
+ {sctp_passive,S3} ->
+ [{active,false}] = ok(inet:getopts(S3, [active]))
+ after
+ 5000 ->
+ exit({error,udp_passive})
+ end,
+ ok = gen_sctp:close(S3),
+ ok = gen_sctp:close(S2),
+ ok = gen_sctp:close(S1),
+ ok.
+
basic_stream(doc) ->
"Hello world stream socket";
basic_stream(suite) ->
@@ -972,6 +1073,14 @@ peeloff_active_true(suite) ->
peeloff_active_true(Config) ->
peeloff(Config, [{active,true}]).
+peeloff_active_n(doc) ->
+ "Peel off an SCTP stream socket ({active,N})";
+peeloff_active_n(suite) ->
+ [];
+
+peeloff_active_n(Config) ->
+ peeloff(Config, [{active,1}]).
+
peeloff(Config, SockOpts) when is_list(Config) ->
?line Addr = {127,0,0,1},
?line Stream = 0,
@@ -1656,7 +1765,13 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
end.
again(Socket) ->
- inet:setopts(Socket, [{active,once}]).
+ receive
+ {sctp_passive,Socket} ->
+ [{active, false}] = ok(inet:getopts(Socket, [active])),
+ ok = inet:setopts(Socket,[{active,1}])
+ after 0 ->
+ ok = inet:setopts(Socket, [{active,once}])
+ end.
gb_push(Key, Val, GBT) ->
case gb_trees:lookup(Key, GBT) of
diff --git a/lib/kernel/test/gen_tcp_api_SUITE.erl b/lib/kernel/test/gen_tcp_api_SUITE.erl
index a7af00c12a..c27d265550 100644
--- a/lib/kernel/test/gen_tcp_api_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_api_SUITE.erl
@@ -32,14 +32,16 @@
t_connect_bad/1,
t_recv_timeout/1, t_recv_eof/1,
t_shutdown_write/1, t_shutdown_both/1, t_shutdown_error/1,
- t_fdopen/1, t_implicit_inet6/1]).
+ t_fdopen/1, t_fdconnect/1, t_implicit_inet6/1]).
+
+-export([getsockfd/0,closesockfd/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[{group, t_accept}, {group, t_connect}, {group, t_recv},
t_shutdown_write, t_shutdown_both, t_shutdown_error,
- t_fdopen, t_implicit_inet6].
+ t_fdopen, t_fdconnect, t_implicit_inet6].
groups() ->
[{t_accept, [], [t_accept_timeout]},
@@ -185,6 +187,37 @@ t_fdopen(Config) when is_list(Config) ->
?line ok = gen_tcp:close(L),
ok.
+t_fdconnect(Config) when is_list(Config) ->
+ Question = "Aaaa... Long time ago in a small town in Germany,",
+ Question1 = list_to_binary(Question),
+ Question2 = [<<"Aaaa">>, "... ", $L, <<>>, $o, "ng time ago ",
+ ["in ", [], <<"a small town">>, [" in Germany,", <<>>]]],
+ Question1 = iolist_to_binary(Question2),
+ Answer = "there was a shoemaker, Schumacher was his name.",
+ Path = ?config(data_dir, Config),
+ Lib = "gen_tcp_api_SUITE",
+ ok = erlang:load_nif(filename:join(Path,Lib), []),
+ {ok, L} = gen_tcp:listen(0, [{active, false}]),
+ {ok, Port} = inet:port(L),
+ FD = gen_tcp_api_SUITE:getsockfd(),
+ {ok, Client} = gen_tcp:connect(localhost, Port, [{fd,FD},{port,20002},
+ {active,false}]),
+ {ok, Server} = gen_tcp:accept(L),
+ ok = gen_tcp:send(Client, Question),
+ {ok, Question} = gen_tcp:recv(Server, length(Question), 2000),
+ ok = gen_tcp:send(Client, Question1),
+ {ok, Question} = gen_tcp:recv(Server, length(Question), 2000),
+ ok = gen_tcp:send(Client, Question2),
+ {ok, Question} = gen_tcp:recv(Server, length(Question), 2000),
+ ok = gen_tcp:send(Server, Answer),
+ {ok, Answer} = gen_tcp:recv(Client, length(Answer), 2000),
+ ok = gen_tcp:close(Client),
+ FD = gen_tcp_api_SUITE:closesockfd(FD),
+ {error,closed} = gen_tcp:recv(Server, 1, 2000),
+ ok = gen_tcp:close(Server),
+ ok = gen_tcp:close(L),
+ ok.
+
%%% implicit inet6 option to api functions
@@ -300,3 +333,7 @@ unused_ip(A, B, C, D) ->
end.
ok({ok,V}) -> V.
+
+
+getsockfd() -> undefined.
+closesockfd(_FD) -> undefined.
diff --git a/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src b/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src
new file mode 100644
index 0000000000..5477598160
--- /dev/null
+++ b/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src
@@ -0,0 +1,9 @@
+
+NIF_LIBS = gen_tcp_api_SUITE@dll@
+SHLIB_EXTRA_LDLIBS = @LIBS@
+
+all: $(NIF_LIBS)
+
+@SHLIB_RULES@
+
+$(NIF_LIBS): gen_tcp_api_SUITE.c
diff --git a/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c b/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c
new file mode 100644
index 0000000000..d774767624
--- /dev/null
+++ b/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c
@@ -0,0 +1,62 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+#include "erl_nif.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <limits.h>
+#include <sys/types.h>
+
+#ifdef __WIN32__
+#include <winsock2.h>
+#define sock_close(s) closesocket(s)
+#else
+#include <sys/socket.h>
+#define sock_close(s) close(s)
+#endif
+
+#define sock_open(af, type, proto) socket((af), (type), (proto))
+
+static ERL_NIF_TERM getsockfd(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ int fd;
+
+ fd = sock_open(AF_INET, SOCK_STREAM, 0);
+ return enif_make_int(env, fd);
+}
+
+static ERL_NIF_TERM closesockfd(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ int fd;
+
+ enif_get_int(env, argv[0], &fd);
+
+ sock_close(fd);
+
+ return enif_make_int(env, fd);
+}
+
+static ErlNifFunc nif_funcs[] =
+{
+ {"getsockfd", 0, getsockfd},
+ {"closesockfd", 1, closesockfd}
+};
+
+ERL_NIF_INIT(gen_tcp_api_SUITE,nif_funcs,NULL,NULL,NULL,NULL)
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index ee271fbdfa..4e4aeb67e2 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
controlling_process/1, controlling_process_self/1,
- no_accept/1, close_with_pending_output/1,
+ no_accept/1, close_with_pending_output/1, active_n/1,
data_before_close/1, iter_max_socks/1, get_status/1,
passive_sockets/1, accept_closed_by_other_process/1,
init_per_testcase/2, end_per_testcase/2,
@@ -50,6 +50,14 @@
oct_acceptor/1,
otp_7731_server/1, zombie_server/2, do_iter_max_socks/2]).
+init_per_testcase(wrapping_oct, Config) when is_list(Config) ->
+ Dog = case os:type() of
+ {ose,_} ->
+ test_server:timetrap(test_server:minutes(20));
+ _Else ->
+ test_server:timetrap(test_server:seconds(600))
+ end,
+ [{watchdog, Dog}|Config];
init_per_testcase(iter_max_socks, Config) when is_list(Config) ->
Dog = case os:type() of
{win32,_} ->
@@ -58,6 +66,17 @@ init_per_testcase(iter_max_socks, Config) when is_list(Config) ->
test_server:timetrap(test_server:seconds(240))
end,
[{watchdog, Dog}|Config];
+init_per_testcase(accept_system_limit, Config) when is_list(Config) ->
+ case os:type() of
+ {ose,_} ->
+ {skip,"Skip in OSE"};
+ _ ->
+ Dog = test_server:timetrap(test_server:seconds(240)),
+ [{watchdog,Dog}|Config]
+ end;
+init_per_testcase(wrapping_oct, Config) when is_list(Config) ->
+ Dog = test_server:timetrap(test_server:seconds(600)),
+ [{watchdog, Dog}|Config];
init_per_testcase(_Func, Config) when is_list(Config) ->
Dog = test_server:timetrap(test_server:seconds(240)),
[{watchdog, Dog}|Config].
@@ -70,7 +89,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[controlling_process, controlling_process_self, no_accept,
close_with_pending_output, data_before_close,
- iter_max_socks, passive_sockets,
+ iter_max_socks, passive_sockets, active_n,
accept_closed_by_other_process, otp_3924, closed_socket,
shutdown_active, shutdown_passive, shutdown_pending,
default_options, http_bad_packet, busy_send,
@@ -407,6 +426,114 @@ send_loop(Sock, Data, Left) ->
ok = gen_tcp:send(Sock, Data),
send_loop(Sock, Data, Left-1).
+%% Test {active,N} option
+active_n(doc) ->
+ ["Verify operation of the {active,N} option."];
+active_n(suite) -> [];
+active_n(Config) when is_list(Config) ->
+ N = 3,
+ LS = ok(gen_tcp:listen(0, [{active,N}])),
+ [{active,N}] = ok(inet:getopts(LS, [active])),
+ ok = inet:setopts(LS, [{active,-N}]),
+ receive
+ {tcp_passive, LS} -> ok
+ after
+ 5000 ->
+ exit({error,tcp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(LS, [active])),
+ ok = inet:setopts(LS, [{active,0}]),
+ receive
+ {tcp_passive, LS} -> ok
+ after
+ 5000 ->
+ exit({error,tcp_passive_failure})
+ end,
+ ok = inet:setopts(LS, [{active,32767}]),
+ {error,einval} = inet:setopts(LS, [{active,1}]),
+ {error,einval} = inet:setopts(LS, [{active,-32769}]),
+ ok = inet:setopts(LS, [{active,-32768}]),
+ receive
+ {tcp_passive, LS} -> ok
+ after
+ 5000 ->
+ exit({error,tcp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(LS, [active])),
+ ok = inet:setopts(LS, [{active,N}]),
+ ok = inet:setopts(LS, [{active,true}]),
+ [{active,true}] = ok(inet:getopts(LS, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ ok = inet:setopts(LS, [{active,N}]),
+ ok = inet:setopts(LS, [{active,once}]),
+ [{active,once}] = ok(inet:getopts(LS, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ {error,einval} = inet:setopts(LS, [{active,32768}]),
+ ok = inet:setopts(LS, [{active,false}]),
+ [{active,false}] = ok(inet:getopts(LS, [active])),
+ Port = ok(inet:port(LS)),
+ C = ok(gen_tcp:connect("localhost", Port, [{active,N}])),
+ [{active,N}] = ok(inet:getopts(C, [active])),
+ S = ok(gen_tcp:accept(LS)),
+ ok = inet:setopts(S, [{active,N}]),
+ [{active,N}] = ok(inet:getopts(S, [active])),
+ repeat(3,
+ fun(I) ->
+ Msg = "message "++integer_to_list(I),
+ ok = gen_tcp:send(C, Msg),
+ receive
+ {tcp,S,Msg} ->
+ ok = gen_tcp:send(S, Msg)
+ after
+ 5000 ->
+ exit({error,timeout})
+ end,
+ receive
+ {tcp,C,Msg} ->
+ ok
+ after
+ 5000 ->
+ exit({error,timeout})
+ end
+ end),
+ receive
+ {tcp_passive,S} ->
+ [{active,false}] = ok(inet:getopts(S, [active]))
+ after
+ 5000 ->
+ exit({error,tcp_passive})
+ end,
+ receive
+ {tcp_passive,C} ->
+ [{active,false}] = ok(inet:getopts(C, [active]))
+ after
+ 5000 ->
+ exit({error,tcp_passive})
+ end,
+ LS2 = ok(gen_tcp:listen(0, [{active,0}])),
+ receive
+ {tcp_passive,LS2} ->
+ [{active,false}] = ok(inet:getopts(LS2, [active]))
+ after
+ 5000 ->
+ exit({error,tcp_passive})
+ end,
+ ok = gen_tcp:close(LS2),
+ ok = gen_tcp:close(C),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(LS),
+ ok.
+
-define(OTP_3924_MAX_DELAY, 100).
%% Taken out of the blue, but on intra host connections
%% I expect propagation of a close to be quite fast
@@ -429,7 +556,6 @@ otp_3924(Config) when is_list(Config) ->
otp_3924_1(MaxDelay).
otp_3924_1(MaxDelay) ->
- Dog = test_server:timetrap(test_server:seconds(240)),
?line {ok, Node} = start_node(otp_3924),
?line DataLen = 100*1024,
?line Data = otp_3924_data(DataLen),
@@ -440,7 +566,6 @@ otp_3924_1(MaxDelay) ->
?line ok = otp_3924(MaxDelay, Node, Data, DataLen, N)
end),
?line test_server:stop_node(Node),
- test_server:timetrap_cancel(Dog),
ok.
otp_3924(MaxDelay, Node, Data, DataLen, N) ->
@@ -757,7 +882,7 @@ passive_sockets_server_send(Socket, X) ->
accept_closed_by_other_process(doc) ->
["Tests the return value from gen_tcp:accept when ",
- "the socket is closed from an other process. (OTP-3817)"];
+ "the socket is closed from another process. (OTP-3817)"];
accept_closed_by_other_process(Config) when is_list(Config) ->
?line Parent = self(),
?line {ok, ListenSocket} = gen_tcp:listen(0, []),
@@ -1845,7 +1970,9 @@ accept_system_limit(doc) ->
accept_system_limit(Config) when is_list(Config) ->
?line {ok, LS} = gen_tcp:listen(0, []),
?line {ok, TcpPort} = inet:port(LS),
- ?line Connector = spawn_link(fun () -> connector(TcpPort) end),
+ Me = self(),
+ ?line Connector = spawn_link(fun () -> connector(TcpPort, Me) end),
+ receive {Connector, sync} -> Connector ! {self(), continue} end,
?line ok = acceptor(LS, false, []),
?line Connector ! stop,
ok.
@@ -1862,8 +1989,10 @@ acceptor(LS, GotSL, A) ->
error
end.
-connector(TcpPort) ->
+connector(TcpPort, Tester) ->
ManyPorts = open_ports([]),
+ Tester ! {self(), sync},
+ receive {Tester, continue} -> timer:sleep(100) end,
ConnF = fun (Port) ->
case catch gen_tcp:connect({127,0,0,1}, TcpPort, []) of
{ok, Sock} ->
@@ -2597,13 +2726,11 @@ wrapping_oct(doc) ->
wrapping_oct(suite) ->
[];
wrapping_oct(Config) when is_list(Config) ->
- Dog = test_server:timetrap(test_server:seconds(600)),
{ok,Sock} = gen_tcp:listen(0,[{active,false},{mode,binary}]),
{ok,Port} = inet:port(Sock),
spawn_link(?MODULE,oct_acceptor,[Sock]),
Res = oct_datapump(Port,16#1FFFFFFFF),
gen_tcp:close(Sock),
- test_server:timetrap_cancel(Dog),
ok = Res,
ok.
@@ -2659,3 +2786,5 @@ oct_aloop(S,X,Times) ->
gen_tcp:close(S),
closed
end.
+
+ok({ok,V}) -> V.
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index cd768813cf..8177123332 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,7 +33,7 @@
init_per_group/2,end_per_group/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
--export([send_to_closed/1,
+-export([send_to_closed/1, active_n/1,
buffer_size/1, binary_passive_recv/1, bad_address/1,
read_packets/1, open_fd/1, connect/1, implicit_inet6/1]).
@@ -43,7 +42,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[send_to_closed, buffer_size, binary_passive_recv,
bad_address, read_packets, open_fd, connect,
- implicit_inet6].
+ implicit_inet6, active_n].
groups() ->
[].
@@ -448,8 +447,8 @@ open_fd(Config) when is_list(Config) ->
{ok,S1} = gen_udp:open(0),
{ok,P2} = inet:port(S1),
{ok,FD} = prim_inet:getfd(S1),
- {error,einval} = gen_udp:open(P2, [inet6, {fd,FD}]),
- {ok,S2} = gen_udp:open(P2, [{fd,FD}]),
+ {error,einval} = gen_udp:open(0, [inet6, {fd,FD}]),
+ {ok,S2} = gen_udp:open(0, [{fd,FD}]),
{ok,S3} = gen_udp:open(0),
{ok,P3} = inet:port(S3),
ok = gen_udp:send(S3, Addr, P2, Msg),
@@ -466,6 +465,108 @@ open_fd(Config) when is_list(Config) ->
?t:fail(io_lib:format("~w", [flush()]))
end.
+active_n(Config) when is_list(Config) ->
+ N = 3,
+ S1 = ok(gen_udp:open(0, [{active,N}])),
+ [{active,N}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,-N}]),
+ receive
+ {udp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,udp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,0}]),
+ receive
+ {udp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,udp_passive_failure})
+ end,
+ ok = inet:setopts(S1, [{active,32767}]),
+ {error,einval} = inet:setopts(S1, [{active,1}]),
+ {error,einval} = inet:setopts(S1, [{active,-32769}]),
+ ok = inet:setopts(S1, [{active,-32768}]),
+ receive
+ {udp_passive, S1} -> ok
+ after
+ 5000 ->
+ exit({error,udp_passive_failure})
+ end,
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ ok = inet:setopts(S1, [{active,N}]),
+ ok = inet:setopts(S1, [{active,true}]),
+ [{active,true}] = ok(inet:getopts(S1, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ ok = inet:setopts(S1, [{active,N}]),
+ ok = inet:setopts(S1, [{active,once}]),
+ [{active,once}] = ok(inet:getopts(S1, [active])),
+ receive
+ _ -> exit({error,active_n})
+ after
+ 0 ->
+ ok
+ end,
+ {error,einval} = inet:setopts(S1, [{active,32768}]),
+ ok = inet:setopts(S1, [{active,false}]),
+ [{active,false}] = ok(inet:getopts(S1, [active])),
+ S1Port = ok(inet:port(S1)),
+ S2 = ok(gen_udp:open(0, [{active,N}])),
+ S2Port = ok(inet:port(S2)),
+ [{active,N}] = ok(inet:getopts(S2, [active])),
+ ok = inet:setopts(S1, [{active,N}]),
+ [{active,N}] = ok(inet:getopts(S1, [active])),
+ lists:foreach(
+ fun(I) ->
+ Msg = "message "++integer_to_list(I),
+ ok = gen_udp:send(S2, "localhost", S1Port, Msg),
+ receive
+ {udp,S1,_,S2Port,Msg} ->
+ ok = gen_udp:send(S1, "localhost", S2Port, Msg)
+ after
+ 5000 ->
+ exit({error,timeout})
+ end,
+ receive
+ {udp,S2,_,S1Port,Msg} ->
+ ok
+ after
+ 5000 ->
+ exit({error,timeout})
+ end
+ end, lists:seq(1,N)),
+ receive
+ {udp_passive,S1} ->
+ [{active,false}] = ok(inet:getopts(S1, [active]))
+ after
+ 5000 ->
+ exit({error,udp_passive})
+ end,
+ receive
+ {udp_passive,S2} ->
+ [{active,false}] = ok(inet:getopts(S2, [active]))
+ after
+ 5000 ->
+ exit({error,udp_passive})
+ end,
+ S3 = ok(gen_udp:open(0, [{active,0}])),
+ receive
+ {udp_passive,S3} ->
+ [{active,false}] = ok(inet:getopts(S3, [active]))
+ after
+ 5000 ->
+ exit({error,udp_passive})
+ end,
+ ok = gen_udp:close(S3),
+ ok = gen_udp:close(S2),
+ ok = gen_udp:close(S1),
+ ok.
%
% Utils
diff --git a/lib/kernel/test/global_SUITE_data/global_trace.erl b/lib/kernel/test/global_SUITE_data/global_trace.erl
index 00bacf8f54..1396d86c79 100644
--- a/lib/kernel/test/global_SUITE_data/global_trace.erl
+++ b/lib/kernel/test/global_SUITE_data/global_trace.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index 320b23bea1..35d3b75b34 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -93,10 +93,10 @@ start_check(Type, Name) ->
start_check(Type, Name, []).
start_check(Type, Name, Envs) ->
Args = case ?t:os_type() of
- {win32,_} ->
- "-heart " ++ env_encode([{"HEART_COMMAND", no_reboot}|Envs]);
+ {win32,_} ->
+ "+t50000 -heart " ++ env_encode([{"HEART_COMMAND", no_reboot}|Envs]);
_ ->
- "-heart " ++ env_encode(Envs)
+ "+t50000 -heart " ++ env_encode(Envs)
end,
{ok, Node} = case Type of
loose ->
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl
index ed43749cc0..44a32fc1ec 100644
--- a/lib/kernel/test/inet_SUITE.erl
+++ b/lib/kernel/test/inet_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,9 +36,10 @@
gethostnative_parallell/1, cname_loop/1,
gethostnative_soft_restart/0, gethostnative_soft_restart/1,
gethostnative_debug_level/0, gethostnative_debug_level/1,
+ lookup_bad_search_option/1,
getif/1,
getif_ifr_name_overflow/1,getservbyname_overflow/1, getifaddrs/1,
- parse_strict_address/1, simple_netns/1]).
+ parse_strict_address/1, simple_netns/1, simple_netns_open/1]).
-export([get_hosts/1, get_ipv6_hosts/1, parse_hosts/1, parse_address/1,
kill_gethost/0, parallell_gethost/0, test_netns/0]).
@@ -52,8 +53,9 @@ all() ->
ipv4_to_ipv6, host_and_addr, {group, parse},
t_gethostnative, gethostnative_parallell, cname_loop,
gethostnative_debug_level, gethostnative_soft_restart,
+ lookup_bad_search_option,
getif, getif_ifr_name_overflow, getservbyname_overflow,
- getifaddrs, parse_strict_address, simple_netns].
+ getifaddrs, parse_strict_address, simple_netns, simple_netns_open].
groups() ->
[{parse, [], [parse_hosts, parse_address]}].
@@ -86,10 +88,30 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+init_per_testcase(lookup_bad_search_option, Config) ->
+ Db = inet_db,
+ Key = res_lookup,
+ %% The bad option can not enter through inet_db:set_lookup/1,
+ %% but through e.g .inetrc.
+ Prev = ets:lookup(Db, Key),
+ ets:delete(Db, Key),
+ ets:insert(Db, {Key,[lookup_bad_search_option]}),
+ ?t:format("Misconfigured resolver lookup order", []),
+ Dog = test_server:timetrap(test_server:seconds(60)),
+ [{Key,Prev},{watchdog,Dog}|Config];
init_per_testcase(_Func, Config) ->
Dog = test_server:timetrap(test_server:seconds(60)),
[{watchdog,Dog}|Config].
+end_per_testcase(lookup_bad_search_option, Config) ->
+ Dog = ?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ Db = inet_db,
+ Key = res_lookup,
+ Prev = ?config(Key, Config),
+ ets:delete(Db, Key),
+ ets:insert(Db, Prev),
+ ?t:format("Restored resolver lookup order", []);
end_per_testcase(_Func, Config) ->
Dog = ?config(watchdog, Config),
test_server:timetrap_cancel(Dog).
@@ -908,6 +930,19 @@ lookup_loop([H|Hs], Delay, Tag, Parent, Cnt, Hosts) ->
+lookup_bad_search_option(suite) ->
+ [];
+lookup_bad_search_option(doc) ->
+ ["Test lookup with erroneously configured lookup option (OTP-12133)"];
+lookup_bad_search_option(Config) when is_list(Config) ->
+ %% Manipulation of resolver config is done in init_per_testcase
+ %% and end_per_testcase to ensure cleanup.
+ {ok,Hostname} = inet:gethostname(),
+ {ok,_Hent} = inet:gethostbyname(Hostname), % Will hang loop for this bug
+ ok.
+
+
+
getif(suite) ->
[];
getif(doc) ->
@@ -1128,6 +1163,32 @@ jog_netns_opt(S) ->
ok.
+simple_netns_open(Config) when is_list(Config) ->
+ case gen_udp:open(0, [binary,{netns,"/"},inet]) of
+ {ok,U} ->
+ ok = gen_udp:close(U);
+ {error,E1} when E1 =:= einval; E1 =:= eperm ->
+ ok
+ end,
+ case gen_tcp:listen(0, [binary,{netns,"/"},inet]) of
+ {ok,T} ->
+ ok = gen_tcp:close(T);
+ {error,E2} when E2 =:= einval; E2 =:= eperm ->
+ ok
+ end,
+ try gen_sctp:open(0, [binary,{netns,"/"},inet]) of
+ {ok,S} ->
+ ok = gen_sctp:close(S);
+ {error,E3}
+ when E3 =:= einval; E3 =:= eperm; E3 =:= eprotonosupport ->
+ ok
+ catch
+ error:badarg ->
+ %% Some older platforms does not allow netns for sctp
+ ok
+ end.
+
+
%% Manual test to be run outside test_server in an emulator
%% started by root, in a machine with setns() support...
test_netns() ->
diff --git a/lib/kernel/test/interactive_shell_SUITE.erl b/lib/kernel/test/interactive_shell_SUITE.erl
index a375adceea..7f6024f642 100644
--- a/lib/kernel/test/interactive_shell_SUITE.erl
+++ b/lib/kernel/test/interactive_shell_SUITE.erl
@@ -296,6 +296,7 @@ ctrl_keys(doc) -> ["Tests various control keys"];
ctrl_keys(_Conf) when is_list(_Conf) ->
Cu=[$\^u],
Cw=[$\^w],
+ Cy=[$\^y],
Home=[27,$O,$H],
End=[27,$O,$F],
rtnode([{putline,""},
@@ -308,6 +309,8 @@ ctrl_keys(_Conf) when is_list(_Conf) ->
{putline,"world\"."++Home++"\"hello "}, % test <HOME>
{getline,"\"hello world\""},
{putline,"world"++Home++"\"hello "++End++"\"."}, % test <END>
+ {getline,"\"hello world\""},
+ {putline,"\"hello world\""++Cu++Cy++"."},
{getline,"\"hello world\""}]
++wordLeft()++wordRight(),[]).
diff --git a/lib/kernel/test/kernel_SUITE.erl b/lib/kernel/test/kernel_SUITE.erl
index 0f29d895e5..613efeeb2f 100644
--- a/lib/kernel/test/kernel_SUITE.erl
+++ b/lib/kernel/test/kernel_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,9 +23,6 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
-
% 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]).
@@ -59,11 +56,8 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
%
@@ -78,56 +72,92 @@ app_test(Config) when is_list(Config) ->
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(kernel),
- {_,_,Vsn} = lists:keyfind(kernel,1,application:loaded_applications()),
- AppupFile = filename:join([code:lib_dir(kernel),ebin,"kernel.appup"]),
+ appup_tests(kernel,create_test_vsns(kernel)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns0,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
{ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
ct:log("~p~n",[AppupScript]),
- {OkVsns,NokVsns} = create_test_vsns(Vsn),
+ OkVsns =
+ case OkVsns0 -- [Vsn] of
+ OkVsns0 ->
+ OkVsns0;
+ Ok ->
+ ct:log("Current version, ~p, is same as in previous release.~n"
+ "Removing this from the list of ok versions.",
+ [Vsn]),
+ Ok
+ end,
+ ct:log("Testing that appup allows upgrade from these versions: ~p~n",
+ [OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing that appup does not allow upgrade from these versions: ~p~n",
+ [NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
diff --git a/lib/kernel/test/os_SUITE.erl b/lib/kernel/test/os_SUITE.erl
index 73ed704ae3..9b474c4cdf 100644
--- a/lib/kernel/test/os_SUITE.erl
+++ b/lib/kernel/test/os_SUITE.erl
@@ -20,7 +20,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([space_in_cwd/1, quoting/1, space_in_name/1, bad_command/1,
+-export([space_in_cwd/1, quoting/1, cmd_unicode/1, space_in_name/1, bad_command/1,
find_executable/1, unix_comment_in_command/1, deep_list_command/1, evil/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -28,9 +28,8 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [space_in_cwd, quoting, space_in_name, bad_command,
- find_executable, unix_comment_in_command, deep_list_command,
- evil].
+ [space_in_cwd, quoting, cmd_unicode, space_in_name, bad_command,
+ find_executable, unix_comment_in_command, deep_list_command, evil].
groups() ->
[].
@@ -95,6 +94,21 @@ quoting(Config) when is_list(Config) ->
?line [] = receive_all(),
ok.
+
+cmd_unicode(doc) -> "Test that unicode arguments work.";
+cmd_unicode(suite) -> [];
+cmd_unicode(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line Echo = filename:join(DataDir, "my_echo"),
+
+ ?line comp("one", os:cmd(Echo ++ " one")),
+ ?line comp("one::two", os:cmd(Echo ++ " one two")),
+ ?line comp("åäö::ϼΩ", os:cmd(Echo ++ " åäö " ++ [1020, 937])),
+ ?t:sleep(5),
+ ?line [] = receive_all(),
+ ok.
+
+
space_in_name(doc) ->
"Test that program with a space in its name can be executed.";
space_in_name(suite) -> [];
@@ -302,8 +316,8 @@ comp(Expected, Got) ->
Expected ->
ok;
Other ->
- ok = io:format("Expected: ~s\n", [Expected]),
- ok = io:format("Got: ~s\n", [Other]),
+ ok = io:format("Expected: ~ts\n", [Expected]),
+ ok = io:format("Got: ~ts\n", [Other]),
test_server:fail()
end.
diff --git a/lib/kernel/test/os_SUITE_data/my_echo.c b/lib/kernel/test/os_SUITE_data/my_echo.c
index 2127511dd1..712c828bb5 100644
--- a/lib/kernel/test/os_SUITE_data/my_echo.c
+++ b/lib/kernel/test/os_SUITE_data/my_echo.c
@@ -1,3 +1,30 @@
+#ifdef __WIN32__
+#include <windows.h>
+
+int wmain(int argc, wchar_t **argv)
+{
+ char* sep = "";
+ int len;
+
+ /*
+ * Echo all arguments separated with '::', so that we can check that
+ * quotes are interpreted correctly.
+ */
+
+ while (argc-- > 1) {
+ char *utf8;
+ len = WideCharToMultiByte(CP_UTF8, 0, argv[1], -1, NULL, 0, NULL, NULL);
+ utf8 = malloc(len*sizeof(char));
+ WideCharToMultiByte(CP_UTF8, 0, argv++[1], -1, utf8, len, NULL, NULL);
+ printf("%s%s", sep, utf8);
+ free(utf8);
+ sep = "::";
+ }
+ putchar('\n');
+ return 0;
+}
+#else
+
#include <stdio.h>
int
@@ -17,3 +44,4 @@ main(int argc, char** argv)
putchar('\n');
return 0;
}
+#endif
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index 199e597e78..f55716cbec 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -78,7 +78,7 @@
_ -> apply(?PRIM_FILE, F, [H | A])
end).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() -> [].
all() ->
[read_write_file, {group, dirs}, {group, files},
@@ -183,7 +183,6 @@ time_dist({_D1, _T1} = DT1, {_D2, _T2} = DT2) ->
read_write_file(suite) -> [];
read_write_file(doc) -> [];
read_write_file(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -232,7 +231,6 @@ read_write_file(Config) when is_list(Config) ->
?line {ok,Bin5} = ?PRIM_FILE:read_file(Name),
?line {Bin1,Bin2} = split_binary(Bin5,byte_size(Bin1)),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -254,7 +252,6 @@ make_del_dir_b(Config) when is_list(Config) ->
Result.
make_del_dir(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -265,11 +262,17 @@ make_del_dir(Config, Handle, Suffix) ->
?line {error, enoent} = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
% Make sure we are not in a directory directly under test_server
- % as that would result in eacess errors when trying to delere '..',
+ % as that would result in eacces errors when trying to delete '..',
% because there are processes having that directory as current.
?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]),
?line {ok, CurrentDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+ case {os:type(), length(NewDir) >= 260 } of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH)\n", []),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir])
+ end,
try
%% Check that we get an error when trying to create...
%% a deep directory
@@ -302,9 +305,7 @@ make_del_dir(Config, Handle, Suffix) ->
{error, einval} -> ok %FreeBSD
end,
?line {error, enoent} = ?PRIM_FILE_call(del_dir, Handle, [""]),
- ?line {error, badarg} = ?PRIM_FILE_call(del_dir, Handle, [[3,2,1,{}]]),
-
- ?line test_server:timetrap_cancel(Dog)
+ ?line {error, badarg} = ?PRIM_FILE_call(del_dir, Handle, [[3,2,1,{}]])
after
?line ok = ?PRIM_FILE_call(set_cwd, Handle, [CurrentDir])
end,
@@ -324,7 +325,6 @@ cur_dir_0b(Config) when is_list(Config) ->
Result.
cur_dir_0(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
%% Find out the current dir, and cd to it ;-)
?line {ok,BaseDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
?line Dir1 = BaseDir ++ "", %% Check that it's a string
@@ -341,31 +341,37 @@ cur_dir_0(Config, Handle) ->
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir, DirName),
?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]),
- ?line io:format("cd to ~s",[NewDir]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
-
- %% Create a file in the new current directory, and check that it
- %% really is created there
- ?line UncommonName = "uncommon.fil",
- ?line {ok,Fd} = ?PRIM_FILE:open(UncommonName, [read, write]),
- ?line ok = ?PRIM_FILE:close(Fd),
- ?line {ok,NewDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line true = lists:member(UncommonName,NewDirFiles),
-
- %% Delete the directory and return to the old current directory
- %% and check that the created file isn't there (too!)
- ?line expect({error, einval}, {error, eacces}, {error, eexist},
+ case {os:type(), length(NewDir) >= 260} of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH):\n"),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ io:format("cd to ~s",[NewDir]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+
+ %% Create a file in the new current directory, and check that it
+ %% really is created there
+ UncommonName = "uncommon.fil",
+ {ok,Fd} = ?PRIM_FILE:open(UncommonName, [read, write]),
+ ok = ?PRIM_FILE:close(Fd),
+ {ok,NewDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ true = lists:member(UncommonName,NewDirFiles),
+
+ %% Delete the directory and return to the old current directory
+ %% and check that the created file isn't there (too!)
+ expect({error, einval}, {error, eacces}, {error, eexist},
?PRIM_FILE_call(del_dir, Handle, [NewDir])),
- ?line ?PRIM_FILE_call(delete, Handle, [UncommonName]),
- ?line {ok,[]} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line ok = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
- ?line {error, enoent} = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line {ok,OldDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line false = lists:member(UncommonName,OldDirFiles),
+ ?PRIM_FILE_call(delete, Handle, [UncommonName]),
+ {ok,[]} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
+ io:format("cd back to ~s",[Dir1]),
+ ok = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
+ {error, enoent} = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
+ io:format("cd back to ~s",[Dir1]),
+ {ok,OldDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ false = lists:member(UncommonName,OldDirFiles)
+ end,
%% Try doing some bad things
?line {error, badarg} =
@@ -385,7 +391,6 @@ cur_dir_0(Config, Handle) ->
?line {ok, BaseDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
?line false = lists:member($\\, BaseDir),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests ?PRIM_FILE:get_cwd/1.
@@ -404,16 +409,13 @@ cur_dir_1b(Config) when is_list(Config) ->
Result.
cur_dir_1(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
-
?line case os:type() of
- {unix, _} ->
- ?line {error, enotsup} =
- ?PRIM_FILE_call(get_cwd, Handle, ["d:"]);
{win32, _} ->
- win_cur_dir_1(Config, Handle)
+ win_cur_dir_1(Config, Handle);
+ _ ->
+ ?line {error, enotsup} =
+ ?PRIM_FILE_call(get_cwd, Handle, ["d:"])
end,
- ?line test_server:timetrap_cancel(Dog),
ok.
win_cur_dir_1(_Config, Handle) ->
@@ -439,7 +441,6 @@ win_cur_dir_1(_Config, Handle) ->
open1(suite) -> [];
open1(doc) -> [];
open1(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -453,7 +454,10 @@ open1(Config) when is_list(Config) ->
?line ?PRIM_FILE:write(Fd1,Str),
?line {ok,0} = ?PRIM_FILE:position(Fd1,bof),
?line {ok, Str} = ?PRIM_FILE:read(Fd1,Length),
- ?line {ok, Str} = ?PRIM_FILE:read(Fd2,Length),
+ ?line case ?PRIM_FILE:read(Fd2,Length) of
+ {ok,Str} -> Str;
+ eof -> Str
+ end,
?line ok = ?PRIM_FILE:close(Fd2),
?line {ok,0} = ?PRIM_FILE:position(Fd1,bof),
?line ok = ?PRIM_FILE:truncate(Fd1),
@@ -462,7 +466,6 @@ open1(Config) when is_list(Config) ->
?line {ok,Fd3} = ?PRIM_FILE:open(Name, [read]),
?line eof = ?PRIM_FILE:read(Fd3,Length),
?line ok = ?PRIM_FILE:close(Fd3),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests all open modes.
@@ -514,7 +517,6 @@ modes(Config) when is_list(Config) ->
close(suite) -> [];
close(doc) -> [];
close(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -531,13 +533,11 @@ close(Config) when is_list(Config) ->
?line Val = ?PRIM_FILE:close(Fd1),
?line io:format("Second close gave: ~p", [Val]),
- ?line test_server:timetrap_cancel(Dog),
ok.
access(suite) -> [];
access(doc) -> [];
access(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -559,7 +559,6 @@ access(Config) when is_list(Config) ->
?line {ok, Str} = ?PRIM_FILE:read(Fd3,length(Str)),
?line ok = ?PRIM_FILE:close(Fd3),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests ?PRIM_FILE:read/2 and ?PRIM_FILE:write/2.
@@ -567,7 +566,6 @@ access(Config) when is_list(Config) ->
read_write(suite) -> [];
read_write(doc) -> [];
read_write(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -579,7 +577,6 @@ read_write(Config) when is_list(Config) ->
?line {ok, Fd} = ?PRIM_FILE:open(Name, [read, write]),
?line read_write_test(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
read_write_test(File) ->
@@ -597,7 +594,6 @@ read_write_test(File) ->
pread_write(suite) -> [];
pread_write(doc) -> [];
pread_write(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -609,7 +605,6 @@ pread_write(Config) when is_list(Config) ->
?line {ok, Fd} = ?PRIM_FILE:open(Name, [read, write]),
?line pread_write_test(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
pread_write_test(File) ->
@@ -629,7 +624,6 @@ pread_write_test(File) ->
append(doc) -> "Test appending to a file.";
append(suite) -> [];
append(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -656,13 +650,11 @@ append(Config) when is_list(Config) ->
?line Expected = list_to_binary([First, Second, Third]),
?line {ok, Expected} = ?PRIM_FILE:read_file(Name1),
- ?line test_server:timetrap_cancel(Dog),
ok.
exclusive(suite) -> [];
exclusive(doc) -> "Test exclusive access to a file.";
exclusive(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -672,7 +664,6 @@ exclusive(Config) when is_list(Config) ->
?line {ok,Fd} = ?PRIM_FILE:open(Name, [write, exclusive]),
?line {error, eexist} = ?PRIM_FILE:open(Name, [write, exclusive]),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -681,7 +672,6 @@ exclusive(Config) when is_list(Config) ->
pos1(suite) -> [];
pos1(doc) -> [];
pos1(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -738,13 +728,11 @@ pos1(Config) when is_list(Config) ->
?line {ok, 0} = ?PRIM_FILE:position(Fd2,{eof,-8}),
?line {ok, "A"} = ?PRIM_FILE:read(Fd2,1),
?line {error, einval} = ?PRIM_FILE:position(Fd2,{eof,-9}),
- ?line test_server:timetrap_cancel(Dog),
ok.
pos2(suite) -> [];
pos2(doc) -> [];
pos2(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -761,7 +749,6 @@ pos2(Config) when is_list(Config) ->
?line {ok, "D"} = ?PRIM_FILE:read(Fd2,1),
?line io:format("DONE"),
- ?line test_server:timetrap_cancel(Dog),
ok.
@@ -779,7 +766,6 @@ file_info_basic_file_b(Config) when is_list(Config) ->
Result.
file_info_basic_file(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
%% Create a short file.
@@ -808,7 +794,6 @@ file_info_basic_file(Config, Handle, Suffix) ->
?line {MD, MT} = ModifyTime,
?line all_integers(tuple_to_list(MD) ++ tuple_to_list(MT)),
- ?line test_server:timetrap_cancel(Dog),
ok.
file_info_basic_directory_a(suite) -> [];
@@ -825,8 +810,6 @@ file_info_basic_directory_b(Config) when is_list(Config) ->
Result.
file_info_basic_directory(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
-
%% Note: filename:join/1 removes any trailing slash,
%% which is essential for ?PRIM_FILE:read_file_info/1 to work on
%% platforms such as Windows95.
@@ -843,10 +826,10 @@ file_info_basic_directory(Config, Handle) ->
?line test_directory("/", read_write, Handle),
?line test_directory("c:/", read_write, Handle),
?line test_directory("c:\\", read_write, Handle);
- {unix, _} ->
+ _ ->
?line test_directory("/", read, Handle)
end,
- ?line test_server:timetrap_cancel(Dog).
+ ok.
test_directory(Name, ExpectedAccess, Handle) ->
?line {ok, FileInfo} = ?PRIM_FILE_call(read_file_info, Handle, [Name]),
@@ -887,14 +870,12 @@ file_info_bad_b(Config) when is_list(Config) ->
Result.
file_info_bad(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = filename:join([?config(priv_dir, Config)]),
?line {error, enoent} =
?PRIM_FILE_call(
read_file_info, Handle,
[filename:join(RootDir,
atom_to_list(?MODULE)++"_nonexistent")]),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Test that the file times behave as they should.
@@ -1189,7 +1170,6 @@ get_good_directory(Config) ->
truncate(suite) -> [];
truncate(doc) -> [];
truncate(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -1215,14 +1195,12 @@ truncate(Config) when is_list(Config) ->
?line {ok, 5} = ?PRIM_FILE:position(Fd2, 5),
?line {error, _} = ?PRIM_FILE:truncate(Fd2),
- ?line test_server:timetrap_cancel(Dog),
ok.
datasync(suite) -> [];
datasync(doc) -> "Tests that ?PRIM_FILE:datasync/1 at least doesn't crash.";
datasync(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Sync = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1233,14 +1211,12 @@ datasync(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:datasync(Fd),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
sync(suite) -> [];
sync(doc) -> "Tests that ?PRIM_FILE:sync/1 at least doesn't crash.";
sync(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Sync = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1251,14 +1227,12 @@ sync(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:sync(Fd),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
advise(suite) -> [];
advise(doc) -> "Tests that ?PRIM_FILE:advise/4 at least doesn't crash.";
advise(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Advise = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1322,7 +1296,6 @@ advise(Config) when is_list(Config) ->
?line eof = ?PRIM_FILE:read_line(Fd9),
?line ok = ?PRIM_FILE:close(Fd9),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1366,7 +1339,6 @@ check_large_write(Dog, Fd, _, _, []) ->
allocate(suite) -> [];
allocate(doc) -> "Tests that ?PRIM_FILE:allocate/3 at least doesn't crash.";
allocate(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Allocate = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1399,7 +1371,6 @@ allocate(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:write(Fd4, Line2),
?line ok = ?PRIM_FILE:close(Fd4),
- ?line test_server:timetrap_cancel(Dog),
ok.
allocate_and_assert(Fd, Offset, Length) ->
@@ -1447,7 +1418,6 @@ delete_b(Config) when is_list(Config) ->
Result.
delete(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -1463,7 +1433,6 @@ delete(Config, Handle, Suffix) ->
?line {error, _} = ?PRIM_FILE:open(Name, [read]),
%% Try deleting a nonexistent file
?line {error, enoent} = ?PRIM_FILE_call(delete, Handle, [Name]),
- ?line test_server:timetrap_cancel(Dog),
ok.
rename_a(suite) ->[];
@@ -1480,7 +1449,6 @@ rename_b(Config) when is_list(Config) ->
Result.
rename(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line FileName1 = atom_to_list(?MODULE)++"_rename"++Suffix++".fil",
?line FileName2 = atom_to_list(?MODULE)++"_rename"++Suffix++".ful",
@@ -1533,7 +1501,6 @@ rename(Config, Handle, Suffix) ->
?PRIM_FILE_call(rename, Handle, [DirName2, Name2foo]),
?line io:format("Errmsg2: ~p",[Msg2]),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1568,15 +1535,15 @@ e_delete(Config) when is_list(Config) ->
%% No permission.
?line case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% Remove a character device.
+ ?line {error, eacces} = ?PRIM_FILE:delete("nul");
+ _ ->
?line ?PRIM_FILE:write_file_info(
Base, #file_info {mode=0}),
?line {error, eacces} = ?PRIM_FILE:delete(Afile),
?line ?PRIM_FILE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- %% Remove a character device.
- ?line {error, eacces} = ?PRIM_FILE:delete("nul")
+ Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
@@ -1656,7 +1623,12 @@ e_rename(Config) when is_list(Config) ->
%% XXX - Gross hack!
?line Comment =
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% At least Windows NT can
+ %% successfully move a file to
+ %% another drive.
+ ok;
+ {unix, _ } ->
OtherFs = "/tmp",
?line NameOnOtherFs =
filename:join(OtherFs,
@@ -1681,10 +1653,8 @@ e_rename(Config) when is_list(Config) ->
Else
end,
Com;
- {win32, _} ->
- %% At least Windows NT can
- %% successfully move a file to
- %% another drive.
+ {ose, _} ->
+ %% disabled for now
ok
end,
?line test_server:timetrap_cancel(Dog),
@@ -1714,14 +1684,14 @@ e_make_dir(Config) when is_list(Config) ->
%% No permission (on Unix only).
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?line ?PRIM_FILE:write_file_info(Base, #file_info {mode=0}),
?line {error, eacces} =
?PRIM_FILE:make_dir(filename:join(Base, "xxxx")),
?line
- ?PRIM_FILE:write_file_info(Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ ?PRIM_FILE:write_file_info(Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
ok.
@@ -1767,15 +1737,15 @@ e_del_dir(Config) when is_list(Config) ->
%% No permission.
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?line ADirectory = filename:join(Base, "no_perm"),
?line ok = ?PRIM_FILE:make_dir(ADirectory),
?line ?PRIM_FILE:write_file_info(Base, #file_info {mode=0}),
?line {error, eacces} = ?PRIM_FILE:del_dir(ADirectory),
?line ?PRIM_FILE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
ok.
@@ -2023,6 +1993,9 @@ symlinks(Config, Handle, Suffix) ->
case ?PRIM_FILE_call(make_symlink, Handle, [Name, Alias]) of
{error, enotsup} ->
{skipped, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skipped, "Windows user not privileged to create links"};
ok ->
?line {ok, Info1} =
?PRIM_FILE_call(read_file_info, Handle, [Name]),
diff --git a/lib/kernel/test/ram_file_SUITE.erl b/lib/kernel/test/ram_file_SUITE.erl
index 5c4437d4d3..615251a257 100644
--- a/lib/kernel/test/ram_file_SUITE.erl
+++ b/lib/kernel/test/ram_file_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 4cf4c6489d..123e849ccb 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -24,7 +24,14 @@
-compile(export_all).
-all() ->
+all() -> [{group,async_threads},
+ {group,no_async_threads}].
+
+groups() ->
+ [{async_threads,[],tcs()},
+ {no_async_threads,[],tcs()}].
+
+tcs() ->
[t_sendfile_small
,t_sendfile_big_all
,t_sendfile_big_size
@@ -33,6 +40,7 @@ all() ->
,t_sendfile_offset
,t_sendfile_sendafter
,t_sendfile_recvafter
+ ,t_sendfile_recvafter_remoteclose
,t_sendfile_sendduring
,t_sendfile_recvduring
,t_sendfile_closeduring
@@ -63,6 +71,19 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
file:delete(proplists:get_value(big_file, Config)).
+init_per_group(async_threads,Config) ->
+ case erlang:system_info(thread_pool_size) of
+ 0 ->
+ {skip,"No async threads"};
+ _ ->
+ [{sendfile_opts,[{use_threads,true}]}|Config]
+ end;
+init_per_group(no_async_threads,Config) ->
+ [{sendfile_opts,[{use_threads,false}]}|Config].
+
+end_per_group(_,_Config) ->
+ ok.
+
init_per_testcase(TC,Config) when TC == t_sendfile_recvduring;
TC == t_sendfile_sendduring ->
Filename = proplists:get_value(small_file, Config),
@@ -71,7 +92,7 @@ init_per_testcase(TC,Config) when TC == t_sendfile_recvduring;
{_Size, Data} = sendfile_file_info(Filename),
{ok,D} = file:open(Filename, [raw,binary,read]),
prim_file:sendfile(D, Sock, 0, 0, 0,
- [],[],false,false,false),
+ [],[],[]),
Data
end,
@@ -92,6 +113,7 @@ t_sendfile_small(Config) when is_list(Config) ->
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
+ %% Here we make sure to test the sendfile/2 api
{ok, Size} = file:sendfile(Filename, Sock),
Data
end,
@@ -101,6 +123,7 @@ t_sendfile_small(Config) when is_list(Config) ->
t_sendfile_many_small(Config) when is_list(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
error_logger:add_report_handler(?MODULE,[self()]),
@@ -109,7 +132,7 @@ t_sendfile_many_small(Config) when is_list(Config) ->
N = 10000,
{ok,D} = file:open(Filename,[read|FileOpts]),
[begin
- {ok,Size} = file:sendfile(D,Sock,0,0,[])
+ {ok,Size} = file:sendfile(D,Sock,0,0,SendfileOpts)
end || _I <- lists:seq(1,N)],
file:close(D),
Size*N
@@ -127,11 +150,12 @@ t_sendfile_many_small(Config) when is_list(Config) ->
t_sendfile_big_all(Config) when is_list(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
file:read_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
Size
end,
@@ -140,12 +164,13 @@ t_sendfile_big_all(Config) when is_list(Config) ->
t_sendfile_big_size(Config) ->
Filename = proplists:get_value(big_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
SendAll = fun(Sock) ->
{ok, #file_info{size = Size}} =
file:read_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok, Size} = file:sendfile(D, Sock,0,Size,[]),
+ {ok, Size} = file:sendfile(D, Sock,0,Size,SendfileOpts),
Size
end,
@@ -154,12 +179,13 @@ t_sendfile_big_size(Config) ->
t_sendfile_partial(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
SendSingle = fun(Sock) ->
{_Size, <<Data:5/binary,_/binary>>} =
sendfile_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok,5} = file:sendfile(D,Sock,0,5,[]),
+ {ok,5} = file:sendfile(D,Sock,0,5,SendfileOpts),
file:close(D),
Data
end,
@@ -170,14 +196,14 @@ t_sendfile_partial(Config) ->
{ok,D} = file:open(Filename,[read|FileOpts]),
{ok, <<FData/binary>>} = file:read(D,5),
FSend = fun(Sock) ->
- {ok,5} = file:sendfile(D,Sock,0,5,[]),
+ {ok,5} = file:sendfile(D,Sock,0,5,SendfileOpts),
FData
end,
ok = sendfile_send(FSend),
SSend = fun(Sock) ->
- {ok,3} = file:sendfile(D,Sock,5,3,[]),
+ {ok,3} = file:sendfile(D,Sock,5,3,SendfileOpts),
SData
end,
@@ -190,12 +216,13 @@ t_sendfile_partial(Config) ->
t_sendfile_offset(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{_Size, <<_:5/binary,Data:3/binary,_/binary>> = AllData} =
sendfile_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok,3} = file:sendfile(D,Sock,5,3,[]),
+ {ok,3} = file:sendfile(D,Sock,5,3,SendfileOpts),
{ok, AllData} = file:read(D,100),
file:close(D),
Data
@@ -205,10 +232,11 @@ t_sendfile_offset(Config) ->
t_sendfile_sendafter(Config) ->
Filename = proplists:get_value(small_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
ok = gen_tcp:send(Sock, <<2>>),
<<Data/binary,2>>
end,
@@ -217,10 +245,11 @@ t_sendfile_sendafter(Config) ->
t_sendfile_recvafter(Config) ->
Filename = proplists:get_value(small_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
ok = gen_tcp:send(Sock, <<1>>),
{ok,<<1>>} = gen_tcp:recv(Sock, 1),
<<Data/binary,1>>
@@ -228,8 +257,28 @@ t_sendfile_recvafter(Config) ->
ok = sendfile_send(Send).
+%% This tests specifically for a bug fixed in 17.0
+t_sendfile_recvafter_remoteclose(Config) ->
+ Filename = proplists:get_value(small_file, Config),
+
+ Send = fun(Sock, SFServer) ->
+ {Size, _Data} = sendfile_file_info(Filename),
+ {ok, Size} = file:sendfile(Filename, Sock),
+
+ %% Make sure the remote end has been closed
+ SFServer ! stop,
+ timer:sleep(100),
+
+ %% In the bug this returned {error,ebadf}
+ {error,closed} = gen_tcp:recv(Sock, 1),
+ -1
+ end,
+
+ ok = sendfile_send({127,0,0,1},Send,0).
+
t_sendfile_sendduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
@@ -238,7 +287,7 @@ t_sendfile_sendduring(Config) ->
timer:sleep(50),
ok = gen_tcp:send(Sock, <<2>>)
end),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
Size+1
end,
@@ -246,6 +295,7 @@ t_sendfile_sendduring(Config) ->
t_sendfile_recvduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
@@ -255,7 +305,7 @@ t_sendfile_recvduring(Config) ->
ok = gen_tcp:send(Sock, <<1>>),
{ok,<<1>>} = gen_tcp:recv(Sock, 1)
end),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
timer:sleep(1000),
Size+1
end,
@@ -264,6 +314,7 @@ t_sendfile_recvduring(Config) ->
t_sendfile_closeduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock,SFServPid) ->
spawn_link(fun() ->
@@ -272,13 +323,14 @@ t_sendfile_closeduring(Config) ->
end),
case erlang:system_info(thread_pool_size) of
0 ->
- {error, closed} = file:sendfile(Filename, Sock);
+ {error, closed} = sendfile(Filename, Sock,
+ SendfileOpts);
_Else ->
%% This can return how much has been sent or
%% {error,closed} depending on OS.
%% How much is sent impossible to know as
%% the socket was closed mid sendfile
- case file:sendfile(Filename, Sock) of
+ case sendfile(Filename, Sock, SendfileOpts) of
{error, closed} ->
ok;
{ok, Size} when is_integer(Size) ->
@@ -292,6 +344,7 @@ t_sendfile_closeduring(Config) ->
t_sendfile_crashduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
error_logger:add_report_handler(?MODULE,[self()]),
@@ -300,7 +353,7 @@ t_sendfile_crashduring(Config) ->
timer:sleep(50),
exit(die)
end),
- {error, closed} = file:sendfile(Filename, Sock),
+ {error, closed} = sendfile(Filename, Sock, SendfileOpts),
-1
end,
process_flag(trap_exit,true),
@@ -395,6 +448,16 @@ sendfile_file_info(File) ->
{ok, Data} = file:read_file(File),
{Size, Data}.
+sendfile(Filename,Sock,Opts) ->
+ case file:open(Filename, [read, raw, binary]) of
+ {error, Reason} ->
+ {error, Reason};
+ {ok, Fd} ->
+ Res = file:sendfile(Fd, Sock, 0, 0, Opts),
+ _ = file:close(Fd),
+ Res
+ end.
+
%% Error handler
diff --git a/lib/crypto/src/crypto_app.erl b/lib/kernel/test/standard_error_SUITE.erl
index f1ea1406e4..b290454b40 100644
--- a/lib/crypto/src/crypto_app.erl
+++ b/lib/kernel/test/standard_error_SUITE.erl
@@ -1,39 +1,38 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-%% Purpose : Application master for CRYPTO.
+-module(standard_error_SUITE).
--module(crypto_app).
+-export([all/0,suite/0]).
+-export([badarg/1,getopts/1]).
--behaviour(application).
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
--export([start/2, stop/1]).
+all() ->
+ [badarg,getopts].
-%% start/2(Type, StartArgs) -> {ok, Pid} | {ok, Pid, State} |
-%% {error, Reason}
-%%
-start(_Type, _StartArgs) ->
- crypto_sup:start_link().
-
-%% stop(State) -> void()
-%%
-stop(_State) ->
+badarg(Config) when is_list(Config) ->
+ {'EXIT',{badarg,_}} = (catch io:put_chars(standard_error, [oops])),
+ true = erlang:is_process_alive(whereis(standard_error)),
ok.
-
+getopts(Config) when is_list(Config) ->
+ [{encoding,latin1}] = io:getopts(standard_error),
+ ok.
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index e91f6f18d4..3be6f39d95 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -178,7 +178,7 @@ api_deflateInit(Config) when is_list(Config) ->
?m(ok,zlib:close(Z))
end, lists:seq(1,8)),
- Strategies = [filtered,huffman_only,default],
+ Strategies = [filtered,huffman_only,rle,default],
lists:foreach(fun(Strategy) ->
?line Z = zlib:open(),
?m(ok, zlib:deflateInit(Z,best_speed,deflated,-15,8,Strategy)),
@@ -220,7 +220,6 @@ api_deflateParams(Config) when is_list(Config) ->
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, none)),
?m(ok, zlib:deflateParams(Z1, best_compression, huffman_only)),
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, sync)),
- ?m({'EXIT',_}, zlib:deflateParams(Z1,best_speed, filtered)),
?m(ok, zlib:close(Z1)).
api_deflate(doc) -> "Test deflate";
diff --git a/lib/kernel/vsn.mk b/lib/kernel/vsn.mk
index 12fe0a7637..e1d447a465 100644
--- a/lib/kernel/vsn.mk
+++ b/lib/kernel/vsn.mk
@@ -1 +1 @@
-KERNEL_VSN = 2.16.4
+KERNEL_VSN = 3.2
diff --git a/lib/megaco/aclocal.m4 b/lib/megaco/aclocal.m4
deleted file mode 100644
index 46b30a16b3..0000000000
--- a/lib/megaco/aclocal.m4
+++ /dev/null
@@ -1,1914 +0,0 @@
-dnl
-dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 1998-2013. All Rights Reserved.
-dnl
-dnl The contents of this file are subject to the Erlang Public License,
-dnl Version 1.1, (the "License"); you may not use this file except in
-dnl compliance with the License. You should have received a copy of the
-dnl Erlang Public License along with this software. If not, it can be
-dnl retrieved online at http://www.erlang.org/.
-dnl
-dnl Software distributed under the License is distributed on an "AS IS"
-dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-dnl the License for the specific language governing rights and limitations
-dnl under the License.
-dnl
-dnl %CopyrightEnd%
-dnl
-
-dnl
-dnl aclocal.m4
-dnl
-dnl Local macros used in configure.in. The Local Macros which
-dnl could/should be part of autoconf are prefixed LM_, macros specific
-dnl to the Erlang system are prefixed ERL_.
-dnl
-
-AC_DEFUN(LM_PRECIOUS_VARS,
-[
-
-dnl ERL_TOP
-AC_ARG_VAR(ERL_TOP, [Erlang/OTP top source directory])
-
-dnl Tools
-AC_ARG_VAR(CC, [C compiler])
-AC_ARG_VAR(CFLAGS, [C compiler flags])
-AC_ARG_VAR(STATIC_CFLAGS, [C compiler static flags])
-AC_ARG_VAR(CFLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag passed via C compiler])
-AC_ARG_VAR(CPP, [C/C++ preprocessor])
-AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
-AC_ARG_VAR(CXX, [C++ compiler])
-AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
-AC_ARG_VAR(LD, [linker (is often overridden by configure)])
-AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
-AC_ARG_VAR(LIBS, [libraries])
-AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LD_FLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(LFS_CFLAGS, [large file support C compiler flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LDFLAGS, [large file support linker flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LIBS, [large file support libraries (set all LFS_* variables or none)])
-AC_ARG_VAR(RANLIB, [ranlib])
-AC_ARG_VAR(AR, [ar])
-AC_ARG_VAR(GETCONF, [getconf])
-
-dnl Cross system root
-AC_ARG_VAR(erl_xcomp_sysroot, [Absolute cross system root path (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_isysroot, [Absolute cross system root include path (only used when cross compiling)])
-
-dnl Cross compilation variables
-AC_ARG_VAR(erl_xcomp_bigendian, [big endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_double_middle_endian, [double-middle-endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_clock_gettime_correction, [clock_gettime() can be used for time correction: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_nptl, [have Native POSIX Thread Library: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigusrx, [SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigaltstack, [have working sigaltstack(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_poll, [have working poll(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_kqueue, [have working kqueue(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_putenv_copy, [putenv() stores key-value copy: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_reliable_fpe, [have reliable floating point exceptions: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_getaddrinfo, [have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_gethrvtime_procfs_ioctl, [have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-
-])
-
-AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
-[
-erl_xcomp_without_sysroot=no
-if test "$cross_compiling" = "yes"; then
- test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
- test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
-else
- erl_xcomp_sysroot=
- erl_xcomp_isysroot=
-fi
-])
-
-AC_DEFUN(LM_CHECK_GETCONF,
-[
-if test "$cross_compiling" != "yes"; then
- AC_CHECK_PROG([GETCONF], [getconf], [getconf], [false])
-else
- dnl First check if we got a `<HOST>-getconf' in $PATH
- host_getconf="$host_alias-getconf"
- AC_CHECK_PROG([GETCONF], [$host_getconf], [$host_getconf], [false])
- if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
- dnl We should perhaps give up if we have'nt found it by now, but at
- dnl least in one Tilera MDE `getconf' under sysroot is a bourne
- dnl shell script which we can use. We try to find `<HOST>-getconf'
- dnl or `getconf' under sysconf, but only under sysconf since
- dnl `getconf' in $PATH is almost guaranteed to be for the build
- dnl machine.
- GETCONF=
- prfx="$erl_xcomp_sysroot"
- AC_PATH_TOOL([GETCONF], [getconf], [false],
- ["$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"])
- fi
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_WINDOWS_ENVIRONMENT
-dnl
-dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
-dnl
-
-AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
-[
-MIXED_CYGWIN=no
-MIXED_MSYS=no
-
-AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
-if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- elif test -x /usr/bin/msysinfo; then
- CFLAGS="-O2"
- MIXED_MSYS=yes
- AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
-else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
-fi
-
-AC_SUBST(MIXED_VC)
-
-if test "x$MIXED_MSYS" != "xyes"; then
- AC_MSG_CHECKING(for mixed cygwin and native MinGW environment)
- if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
- else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
- fi
-else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
-
-AC_MSG_CHECKING(if we mix cygwin with any native compiler)
-if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_CYGWIN)
-
-AC_MSG_CHECKING(if we mix msys with another native compiler)
-if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_MSYS)
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_FIND_EMU_CC
-dnl
-dnl
-dnl Tries fairly hard to find a C compiler that can handle jump tables.
-dnl Defines the @EMU_CC@ variable for the makefiles and
-dnl inserts NO_JUMP_TABLE in the header if one cannot be found...
-dnl
-
-AC_DEFUN(LM_FIND_EMU_CC,
- [AC_CACHE_CHECK(for a compiler that handles jumptables,
- ac_cv_prog_emu_cc,
- [
-AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
-lbl1:
- return 1;
-lbl2:
- return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
-
-if test $ac_cv_prog_emu_cc = no; then
- for ac_progname in emu_cc.sh gcc-4.2 gcc; do
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
- break
- fi
- done
-fi
-
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
- CFLAGS=""
- CPPFLAGS=""
- AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
- lbl1:
- return 1;
- lbl2:
- return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
- CC=$save_CC
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-])
-if test $ac_cv_prog_emu_cc = no; then
- AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
-else
- EMU_CC=$ac_cv_prog_emu_cc
-fi
-AC_SUBST(EMU_CC)
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_INSTALL_DIR
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl Figure out how to create directories with parents.
-dnl (In my opinion INSTALL_DIR is a bad name, MKSUBDIRS or something is better)
-dnl
-dnl We prefer 'install -d', but use 'mkdir -p' if it exists.
-dnl If none of these methods works, we give up.
-dnl
-
-
-AC_DEFUN(LM_PROG_INSTALL_DIR,
-[AC_CACHE_CHECK(how to create a directory including parents,
-ac_cv_prog_mkdir_p,
-[
-temp_name_base=config.$$
-temp_name=$temp_name_base/x/y/z
-$INSTALL -d $temp_name >/dev/null 2>&1
-ac_cv_prog_mkdir_p=none
-if test -d $temp_name; then
- ac_cv_prog_mkdir_p="$INSTALL -d"
-else
- mkdir -p $temp_name >/dev/null 2>&1
- if test -d $temp_name; then
- ac_cv_prog_mkdir_p="mkdir -p"
- fi
-fi
-rm -fr $temp_name_base
-])
-
-case "${ac_cv_prog_mkdir_p}" in
- none) AC_MSG_ERROR(don't know how create directories with parents) ;;
- *) INSTALL_DIR="$ac_cv_prog_mkdir_p" AC_SUBST(INSTALL_DIR) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_PERL5
-dnl
-dnl Try to find perl version 5. If found set PERL to the absolute path
-dnl of the program, if not found set PERL to false.
-dnl
-dnl On some systems /usr/bin/perl is perl 4 and e.g.
-dnl /usr/local/bin/perl is perl 5. We try to handle this case by
-dnl putting a couple of
-dnl Tries to handle the case that there are two programs called perl
-dnl in the path and one of them is perl 5 and the other isn't.
-dnl
-AC_DEFUN(LM_PROG_PERL5,
-[AC_PATH_PROGS(PERL, perl5 perl, false,
- /usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH})
-changequote(, )dnl
-dnl[ That bracket is needed to balance the right bracket below
-if test "$PERL" = "false" || $PERL -e 'exit ($] >= 5)'; then
-changequote([, ])dnl
- ac_cv_path_PERL=false
- PERL=false
-dnl AC_MSG_WARN(perl version 5 not found)
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SO_BSDCOMPAT
-dnl
-dnl Check if the system has the SO_BSDCOMPAT flag on sockets (linux)
-dnl
-AC_DEFUN(LM_DECL_SO_BSDCOMPAT,
-[AC_CACHE_CHECK([for SO_BSDCOMPAT declaration], ac_cv_decl_so_bsdcompat,
-AC_TRY_COMPILE([#include <sys/socket.h>], [int i = SO_BSDCOMPAT;],
- ac_cv_decl_so_bsdcompat=yes,
- ac_cv_decl_so_bsdcompat=no))
-
-case "${ac_cv_decl_so_bsdcompat}" in
- "yes" ) AC_DEFINE(HAVE_SO_BSDCOMPAT,[],
- [Define if you have SO_BSDCOMPAT flag on sockets]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_INADDR_LOOPBACK
-dnl
-dnl Try to find declaration of INADDR_LOOPBACK, if nowhere provide a default
-dnl
-
-AC_DEFUN(LM_DECL_INADDR_LOOPBACK,
-[AC_CACHE_CHECK([for INADDR_LOOPBACK in netinet/in.h],
- ac_cv_decl_inaddr_loopback,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>], [int i = INADDR_LOOPBACK;],
-ac_cv_decl_inaddr_loopback=yes, ac_cv_decl_inaddr_loopback=no)
-])
-
-if test ${ac_cv_decl_inaddr_loopback} = no; then
- AC_CACHE_CHECK([for INADDR_LOOPBACK in rpc/types.h],
- ac_cv_decl_inaddr_loopback_rpc,
- AC_TRY_COMPILE([#include <rpc/types.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_rpc=yes,
- ac_cv_decl_inaddr_loopback_rpc=no))
-
- case "${ac_cv_decl_inaddr_loopback_rpc}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H,[],
- [Define if you need to include rpc/types.h to get INADDR_LOOPBACK defined]) ;;
- * )
- AC_CACHE_CHECK([for INADDR_LOOPBACK in winsock2.h],
- ac_cv_decl_inaddr_loopback_winsock2,
- AC_TRY_COMPILE([#define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_winsock2=yes,
- ac_cv_decl_inaddr_loopback_winsock2=no))
- case "${ac_cv_decl_inaddr_loopback_winsock2}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_WINSOCK2_H,[],
- [Define if you need to include winsock2.h to get INADDR_LOOPBACK defined]) ;;
- * )
- # couldn't find it anywhere
- AC_DEFINE(HAVE_NO_INADDR_LOOPBACK,[],
- [Define if you don't have a definition of INADDR_LOOPBACK]) ;;
- esac;;
- esac
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_SOCKADDR_SA_LEN
-dnl
-dnl Check if the sockaddr structure has the field sa_len
-dnl
-
-AC_DEFUN(LM_STRUCT_SOCKADDR_SA_LEN,
-[AC_CACHE_CHECK([whether struct sockaddr has sa_len field],
- ac_cv_struct_sockaddr_sa_len,
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>], [struct sockaddr s; s.sa_len = 10;],
- ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no))
-
-dnl FIXME convbreak
-case ${ac_cv_struct_sockaddr_sa_len} in
- "no" ) AC_DEFINE(NO_SA_LEN,[1],[Define if you dont have salen]) ;;
- *) ;;
-esac
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_EXCEPTION
-dnl
-dnl Check to see whether the system supports the matherr function
-dnl and its associated type "struct exception".
-dnl
-
-AC_DEFUN(LM_STRUCT_EXCEPTION,
-[AC_CACHE_CHECK([for struct exception (and matherr function)],
- ac_cv_struct_exception,
-AC_TRY_COMPILE([#include <math.h>],
- [struct exception x; x.type = DOMAIN; x.type = SING;],
- ac_cv_struct_exception=yes, ac_cv_struct_exception=no))
-
-case "${ac_cv_struct_exception}" in
- "yes" ) AC_DEFINE(USE_MATHERR,[1],[Define if you have matherr() function and struct exception type]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_IPV6
-dnl
-dnl Check for ipv6 support and what the in6_addr structure is called.
-dnl (early linux used in_addr6 insted of in6_addr)
-dnl
-
-AC_DEFUN(LM_SYS_IPV6,
-[AC_MSG_CHECKING(for IP version 6 support)
-AC_CACHE_VAL(ac_cv_sys_ipv6_support,
-[ok_so_far=yes
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in6_addr a6; struct sockaddr_in6 s6;], ok_so_far=yes, ok_so_far=no)
-
-if test $ok_so_far = yes; then
- ac_cv_sys_ipv6_support=yes
-else
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in_addr6 a6; struct sockaddr_in6 s6;],
- ac_cv_sys_ipv6_support=in_addr6, ac_cv_sys_ipv6_support=no)
-fi
-])dnl
-
-dnl
-dnl Have to use old style AC_DEFINE due to BC with old autoconf.
-dnl
-
-case ${ac_cv_sys_ipv6_support} in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- ;;
- in_addr6)
- AC_MSG_RESULT([yes (but I am redefining in_addr6 to in6_addr)])
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- AC_DEFINE(HAVE_IN_ADDR6_STRUCT,[],[Early linux used in_addr6 instead of in6_addr, define if you have this])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_MULTICAST
-dnl
-dnl Check for multicast support. Only checks for multicast options in
-dnl setsockopt(), no check is performed that multicasting actually works.
-dnl If options are found defines HAVE_MULTICAST_SUPPORT
-dnl
-
-AC_DEFUN(LM_SYS_MULTICAST,
-[AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support,
-[AC_EGREP_CPP(yes,
-[#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP)
-yes
-#endif
-], ac_cv_sys_multicast_support=yes, ac_cv_sys_multicast_support=no)])
-if test $ac_cv_sys_multicast_support = yes; then
- AC_DEFINE(HAVE_MULTICAST_SUPPORT,[1],
- [Define if setsockopt() accepts multicast options])
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SYS_ERRLIST
-dnl
-dnl Define SYS_ERRLIST_DECLARED if the variable sys_errlist is declared
-dnl in a system header file, stdio.h or errno.h.
-dnl
-
-AC_DEFUN(LM_DECL_SYS_ERRLIST,
-[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h or errno.h],
- ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#include <errno.h>], [char *msg = *(sys_errlist + 1);],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-if test $ac_cv_decl_sys_errlist = yes; then
- AC_DEFINE(SYS_ERRLIST_DECLARED,[],
- [define if the variable sys_errlist is declared in a system header file])
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_FUNC_DECL( funname, declaration [, extra includes
-dnl [, action-if-found [, action-if-not-found]]] )
-dnl
-dnl Checks if the declaration "declaration" of "funname" conflicts
-dnl with the header files idea of how the function should be
-dnl declared. It is useful on systems which lack prototypes and you
-dnl need to provide your own (e.g. when you want to take the address
-dnl of a function). The 4'th argument is expanded if conflicting,
-dnl the 5'th argument otherwise
-dnl
-dnl
-
-AC_DEFUN(LM_CHECK_FUNC_DECL,
-[AC_MSG_CHECKING([for conflicting declaration of $1])
-AC_CACHE_VAL(ac_cv_func_decl_$1,
-[AC_TRY_COMPILE([#include <stdio.h>
-$3],[$2
-char *c = (char *)$1;
-], eval "ac_cv_func_decl_$1=no", eval "ac_cv_func_decl_$1=yes")])
-if eval "test \"`echo '$ac_cv_func_decl_'$1`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$4], , :, [$4])
-else
- AC_MSG_RESULT(no)
-ifelse([$5], , , [$5
-])dnl
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl AC_DOUBLE_MIDDLE_ENDIAN
-dnl
-dnl Checks whether doubles are represented in "middle-endian" format.
-dnl Sets ac_cv_double_middle_endian={no,yes,unknown} accordingly,
-dnl as well as DOUBLE_MIDDLE_ENDIAN.
-dnl
-dnl
-
-AC_DEFUN([AC_C_DOUBLE_MIDDLE_ENDIAN],
-[AC_CACHE_CHECK(whether double word ordering is middle-endian, ac_cv_c_double_middle_endian,
-[# It does not; compile a test program.
-AC_RUN_IFELSE(
-[AC_LANG_SOURCE([[#include <stdlib.h>
-
-int
-main(void)
-{
- int i = 0;
- int zero = 0;
- int bigendian;
- int zero_index = 0;
-
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
-
- /* we'll use the one with 32-bit words */
- union
- {
- double d;
- unsigned int c[2];
- } vint;
-
- union
- {
- double d;
- unsigned long c[2];
- } vlong;
-
- union
- {
- double d;
- unsigned short c[2];
- } vshort;
-
-
- /* Are we little or big endian? From Harbison&Steele. */
- u.l = 1;
- bigendian = (u.c[sizeof (long int) - 1] == 1);
-
- zero_index = bigendian ? 1 : 0;
-
- vint.d = 1.0;
- vlong.d = 1.0;
- vshort.d = 1.0;
-
- if (sizeof(unsigned int) == 4)
- {
- if (vint.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned long) == 4)
- {
- if (vlong.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned short) == 4)
- {
- if (vshort.c[zero_index] != 0)
- zero = 1;
- }
-
- exit (zero);
-}
-]])],
- [ac_cv_c_double_middle_endian=no],
- [ac_cv_c_double_middle_endian=yes],
- [ac_cv_c_double_middle=unknown])])
-case $ac_cv_c_double_middle_endian in
- yes)
- m4_default([$1],
- [AC_DEFINE([DOUBLE_MIDDLE_ENDIAN], 1,
- [Define to 1 if your processor stores the words in a double in
- middle-endian format (like some ARMs).])]) ;;
- no)
- $2 ;;
- *)
- m4_default([$3],
- [AC_MSG_WARN([unknown double endianness
-presetting ac_cv_c_double_middle_endian=no (or yes) will help])]) ;;
-esac
-])# AC_C_DOUBLE_MIDDLE_ENDIAN
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_THR_LIB
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl LM_CHECK_THR_LIB sets THR_LIBS, THR_DEFS, and THR_LIB_NAME. It also
-dnl checks for some pthread headers which will appear in DEFS or config.h.
-dnl
-
-AC_DEFUN(LM_CHECK_THR_LIB,
-[
-
-NEED_NPTL_PTHREAD_H=no
-
-dnl win32?
-AC_MSG_CHECKING([for native win32 threads])
-if test "X$host_os" = "Xwin32"; then
- AC_MSG_RESULT(yes)
- THR_DEFS="-DWIN32_THREADS"
- THR_LIBS=
- THR_LIB_NAME=win32_threads
- THR_LIB_TYPE=win32_threads
-else
- AC_MSG_RESULT(no)
- THR_DEFS=
- THR_LIBS=
- THR_LIB_NAME=
- THR_LIB_TYPE=posix_unknown
-
-dnl Try to find POSIX threads
-
-dnl The usual pthread lib...
- AC_CHECK_LIB(pthread, pthread_create, THR_LIBS="-lpthread")
-
-dnl Very old versions of FreeBSD have pthreads in special c library, c_r...
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_LIB(c_r, pthread_create, THR_LIBS="-lc_r")
- fi
-
-dnl QNX has pthreads in standard C library
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_FUNC(pthread_create, THR_LIBS="none_needed")
- fi
-
-dnl On ofs1 the '-pthread' switch should be used
- if test "x$THR_LIBS" = "x"; then
- AC_MSG_CHECKING([if the '-pthread' switch can be used])
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -pthread"
- AC_TRY_LINK([#include <pthread.h>],
- pthread_create((void*)0,(void*)0,(void*)0,(void*)0);,
- [THR_DEFS="-pthread"
- THR_LIBS="-pthread"])
- CFLAGS=$saved_cflags
- if test "x$THR_LIBS" != "x"; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
- if test "x$THR_LIBS" != "x"; then
- THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
- THR_LIB_NAME=pthread
- if test "x$THR_LIBS" = "xnone_needed"; then
- THR_LIBS=
- fi
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
- linux*)
- THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
-
- LM_CHECK_GETCONF
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
- if test $? -eq 0; then
- case "$libpthr_vsn" in
- *nptl*|*NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- elif test "$cross_compiling" = "yes"; then
- case "$erl_xcomp_linux_nptl" in
- "") nptl=cross;;
- yes|no) nptl=$erl_xcomp_linux_nptl;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl]);;
- esac
- else
- nptl=no
- fi
- AC_MSG_RESULT($nptl)
- if test $nptl = cross; then
- nptl=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $nptl = yes; then
- THR_LIB_TYPE=posix_nptl
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h,
- [need_nptl_incldir=yes
- NEED_NPTL_PTHREAD_H=yes])
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH"
- if test X$cross_compiling != Xyes; then
- nptl_path="$nptl_path:/usr/local/include:/usr/include"
- else
- IROOT="$erl_xcomp_isysroot"
- test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
- test "$IROOT" != "" || AC_MSG_ERROR([Don't know where to search for includes! Please set erl_xcomp_isysroot])
- nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
- fi
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need THR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $THR_DEFS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h,
- AC_DEFINE(HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- fi
-fi
-
-])
-
-AC_DEFUN(ERL_INTERNAL_LIBS,
-[
-
-ERTS_INTERNAL_X_LIBS=
-
-AC_CHECK_LIB(kstat, kstat_open,
-[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat])
-ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"])
-
-AC_SUBST(ERTS_INTERNAL_X_LIBS)
-
-])
-
-AC_DEFUN(ETHR_CHK_SYNC_OP,
-[
- AC_MSG_CHECKING([for $3-bit $1()])
- case "$2" in
- "1") sync_call="$1(&var);";;
- "2") sync_call="$1(&var, ($4) 0);";;
- "3") sync_call="$1(&var, ($4) 0, ($4) 0);";;
- esac
- have_sync_op=no
- AC_TRY_LINK([],
- [
- $4 res;
- volatile $4 var;
- res = $sync_call
- ],
- [have_sync_op=yes])
- test $have_sync_op = yes && $5
- AC_MSG_RESULT([$have_sync_op])
-])
-
-AC_DEFUN(ETHR_CHK_INTERLOCKED,
-[
- ilckd="$1"
- AC_MSG_CHECKING([for ${ilckd}()])
- case "$2" in
- "1") ilckd_call="${ilckd}(var);";;
- "2") ilckd_call="${ilckd}(var, ($3) 0);";;
- "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";;
- "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";;
- esac
- have_interlocked_op=no
- AC_TRY_LINK(
- [
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <intrin.h>
- ],
- [
- volatile $3 *var;
- volatile $3 arr[2];
-
- $ilckd_call
- return 0;
- ],
- [have_interlocked_op=yes])
- test $have_interlocked_op = yes && $4
- AC_MSG_RESULT([$have_interlocked_op])
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_FIND_ETHR_LIB
-dnl
-dnl NOTE! This macro may be changed at any time! Should *only* be used by
-dnl ERTS!
-dnl
-dnl Find a thread library to use. Sets ETHR_LIBS to libraries to link
-dnl with, ETHR_X_LIBS to extra libraries to link with (same as ETHR_LIBS
-dnl except that the ethread lib itself is not included), ETHR_DEFS to
-dnl defines to compile with, ETHR_THR_LIB_BASE to the name of the
-dnl thread library which the ethread library is based on, and ETHR_LIB_NAME
-dnl to the name of the library where the ethread implementation is located.
-dnl ERL_FIND_ETHR_LIB currently searches for 'pthreads', and
-dnl 'win32_threads'. If no thread library was found ETHR_LIBS, ETHR_X_LIBS,
-dnl ETHR_DEFS, ETHR_THR_LIB_BASE, and ETHR_LIB_NAME are all set to the
-dnl empty string.
-dnl
-
-AC_DEFUN(ERL_FIND_ETHR_LIB,
-[
-
-AC_ARG_ENABLE(native-ethr-impls,
- AS_HELP_STRING([--disable-native-ethr-impls],
- [disable native ethread implementations]),
-[ case "$enableval" in
- no) disable_native_ethr_impls=yes ;;
- *) disable_native_ethr_impls=no ;;
- esac ], disable_native_ethr_impls=no)
-
-test "X$disable_native_ethr_impls" = "Xyes" &&
- AC_DEFINE(ETHR_DISABLE_NATIVE_IMPLS, 1, [Define if you want to disable native ethread implementations])
-
-AC_ARG_ENABLE(x86-out-of-order,
- AS_HELP_STRING([--enable-x86-out-of-order],
- [enable x86/x84_64 out of order support (default disabled)]))
-
-AC_ARG_ENABLE(prefer-gcc-native-ethr-impls,
- AS_HELP_STRING([--enable-prefer-gcc-native-ethr-impls],
- [prefer gcc native ethread implementations]),
-[ case "$enableval" in
- yes) enable_prefer_gcc_native_ethr_impls=yes ;;
- *) enable_prefer_gcc_native_ethr_impls=no ;;
- esac ], enable_prefer_gcc_native_ethr_impls=no)
-
-test $enable_prefer_gcc_native_ethr_impls = yes &&
- AC_DEFINE(ETHR_PREFER_GCC_NATIVE_IMPLS, 1, [Define if you prefer gcc native ethread implementations])
-
-AC_ARG_WITH(libatomic_ops,
- AS_HELP_STRING([--with-libatomic_ops=PATH],
- [specify and prefer usage of libatomic_ops in the ethread library]))
-
-AC_ARG_WITH(with_sparc_memory_order,
- AS_HELP_STRING([--with-sparc-memory-order=TSO|PSO|RMO],
- [specify sparc memory order (defaults to RMO)]))
-
-LM_CHECK_THR_LIB
-ERL_INTERNAL_LIBS
-
-ethr_have_native_atomics=no
-ethr_have_native_spinlock=no
-ETHR_THR_LIB_BASE="$THR_LIB_NAME"
-ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
-ETHR_DEFS="$THR_DEFS"
-ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
-ETHR_LIBS=
-ETHR_LIB_NAME=
-
-ethr_modified_default_stack_size=
-
-dnl Name of lib where ethread implementation is located
-ethr_lib_name=ethread
-
-case "$THR_LIB_NAME" in
-
- win32_threads)
- ETHR_THR_LIB_BASE_DIR=win
- # * _WIN32_WINNT >= 0x0400 is needed for
- # TryEnterCriticalSection
- # * _WIN32_WINNT >= 0x0403 is needed for
- # InitializeCriticalSectionAndSpinCount
- # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
- #
- # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
- # and save it in ETHR_DEFS.
- found_win32_winnt=no
- for cppflag in $CPPFLAGS; do
- case $cppflag in
- -DWINVER*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- ;;
- -D_WIN32_WINNT*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- found_win32_winnt=yes
- ;;
- *)
- ;;
- esac
- done
- if test $found_win32_winnt = no; then
- AC_MSG_ERROR([-D_WIN32_WINNT missing in CPPFLAGS])
- fi
-
- AC_DEFINE(ETHR_WIN32_THREADS, 1, [Define if you have win32 threads])
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- have_interlocked_op=no
- ethr_have_native_atomics=no
- else
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT, 1, [Define if you have _InterlockedDecrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement_rel], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT_REL, 1, [Define if you have _InterlockedDecrement_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT, 1, [Define if you have _InterlockedIncrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement_acq], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ, 1, [Define if you have _InterlockedIncrement_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD, 1, [Define if you have _InterlockedExchangeAdd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd_acq], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ, 1, [Define if you have _InterlockedExchangeAdd_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64_acq], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ, 1, [Define if you have _InterlockedIncrement64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64, 1, [Define if you have _InterlockedExchangeAdd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64_acq], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ, 1, [Define if you have _InterlockedExchangeAdd64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()]))
- fi
- test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
- ;;
-
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
- case $host_os in
- openbsd*)
- # The default stack size is insufficient for our needs
- # on OpenBSD. We increase it to 256 kilo words.
- ethr_modified_default_stack_size=256;;
- linux*)
- ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
-
- if test X$cross_compiling = Xyes; then
- case X$erl_xcomp_linux_usable_sigusrx in
- X) usable_sigusrx=cross;;
- Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx]);;
- esac
- case X$erl_xcomp_linux_usable_sigaltstack in
- X) usable_sigaltstack=cross;;
- Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack]);;
- esac
- else
- # FIXME: Test for actual problems instead of kernel versions
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- usable_sigusrx=no
- usable_sigaltstack=no;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- usable_sigaltstack=no;;
- *)
- usable_sigusrx=yes
- usable_sigaltstack=yes;;
- esac
- fi
-
- AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
- AC_MSG_RESULT($usable_sigusrx)
- if test $usable_sigusrx = cross; then
- usable_sigusrx=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigusrx = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
- fi
-
- AC_MSG_CHECKING(if sigaltstack can be used)
- AC_MSG_RESULT($usable_sigaltstack)
- if test $usable_sigaltstack = cross; then
- usable_sigaltstack=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigaltstack = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need ETHR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
-
- dnl We need the thread library in order to find some functions
- saved_libs="$LIBS"
- LIBS="$LIBS $ETHR_X_LIBS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(ETHR_HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- if test $NEED_NPTL_PTHREAD_H = yes; then
- AC_DEFINE(ETHR_NEED_NPTL_PTHREAD_H, 1, \
-[Define if you need the <nptl/pthread.h> header file.])
- fi
-
- AC_CHECK_HEADER(sched.h, \
- AC_DEFINE(ETHR_HAVE_SCHED_H, 1, \
-[Define if you have the <sched.h> header file.]))
-
- AC_CHECK_HEADER(sys/time.h, \
- AC_DEFINE(ETHR_HAVE_SYS_TIME_H, 1, \
-[Define if you have the <sys/time.h> header file.]))
-
- AC_TRY_COMPILE([#include <time.h>
- #include <sys/time.h>],
- [struct timeval *tv; return 0;],
- AC_DEFINE(ETHR_TIME_WITH_SYS_TIME, 1, \
-[Define if you can safely include both <sys/time.h> and <time.h>.]))
-
-
- dnl
- dnl Check for functions
- dnl
-
- AC_CHECK_FUNC(pthread_spin_lock, \
- [ethr_have_native_spinlock=yes \
- AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
-[Define if you have the pthread_spin_lock function.])])
-
- have_sched_yield=no
- have_librt_sched_yield=no
- AC_CHECK_FUNC(sched_yield, [have_sched_yield=yes])
- if test $have_sched_yield = no; then
- AC_CHECK_LIB(rt, sched_yield,
- [have_librt_sched_yield=yes
- ETHR_X_LIBS="$ETHR_X_LIBS -lrt"])
- fi
- if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
- AC_DEFINE(ETHR_HAVE_SCHED_YIELD, 1, [Define if you have the sched_yield() function.])
- AC_MSG_CHECKING([whether sched_yield() returns an int])
- sched_yield_ret_int=no
- AC_TRY_COMPILE([
- #ifdef ETHR_HAVE_SCHED_H
- #include <sched.h>
- #endif
- ],
- [int sched_yield();],
- [sched_yield_ret_int=yes])
- AC_MSG_RESULT([$sched_yield_ret_int])
- if test $sched_yield_ret_int = yes; then
- AC_DEFINE(ETHR_SCHED_YIELD_RET_INT, 1, [Define if sched_yield() returns an int.])
- fi
- fi
-
- have_pthread_yield=no
- AC_CHECK_FUNC(pthread_yield, [have_pthread_yield=yes])
- if test $have_pthread_yield = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_YIELD, 1, [Define if you have the pthread_yield() function.])
- AC_MSG_CHECKING([whether pthread_yield() returns an int])
- pthread_yield_ret_int=no
- AC_TRY_COMPILE([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [int pthread_yield();],
- [pthread_yield_ret_int=yes])
- AC_MSG_RESULT([$pthread_yield_ret_int])
- if test $pthread_yield_ret_int = yes; then
- AC_DEFINE(ETHR_PTHREAD_YIELD_RET_INT, 1, [Define if pthread_yield() returns an int.])
- fi
- fi
-
- have_pthread_rwlock_init=no
- AC_CHECK_FUNC(pthread_rwlock_init, [have_pthread_rwlock_init=yes])
- if test $have_pthread_rwlock_init = yes; then
-
- ethr_have_pthread_rwlockattr_setkind_np=no
- AC_CHECK_FUNC(pthread_rwlockattr_setkind_np,
- [ethr_have_pthread_rwlockattr_setkind_np=yes])
-
- if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP, 1, \
-[Define if you have the pthread_rwlockattr_setkind_np() function.])
-
- AC_MSG_CHECKING([for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP])
- ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
- AC_TRY_LINK([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [
- pthread_rwlockattr_t *attr;
- return pthread_rwlockattr_setkind_np(attr,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- ],
- [ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes])
- AC_MSG_RESULT([$ethr_pthread_rwlock_writer_nonrecursive_initializer_np])
- if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 1, \
-[Define if you have the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP rwlock attribute.])
- fi
- fi
- fi
-
- if test "$force_pthread_rwlocks" = "yes"; then
-
- AC_DEFINE(ETHR_FORCE_PTHREAD_RWLOCK, 1, \
-[Define if you want to force usage of pthread rwlocks])
-
- if test $have_pthread_rwlock_init = yes; then
- AC_MSG_WARN([Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues.])
- else
- AC_MSG_ERROR([User forced usage of pthread rwlock, but no such implementation was found])
- fi
- fi
-
- AC_CHECK_FUNC(pthread_attr_setguardsize, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE, 1, \
-[Define if you have the pthread_attr_setguardsize function.]))
-
- linux_futex=no
- AC_MSG_CHECKING([for Linux futexes])
- AC_TRY_LINK([
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <linux/futex.h>
- #include <sys/time.h>
- ],
- [
- int i = 1;
- syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
- (void*)0,(void*)0, 0);
- syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
- (void*)0,(void*)0, 0);
- return 0;
- ],
- linux_futex=yes)
- AC_MSG_RESULT([$linux_futex])
- test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
-
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int128_t)
-
- if test "$ac_cv_sizeof_int" = "4"; then
- int32="int"
- elif test "$ac_cv_sizeof_long" = "4"; then
- int32="long"
- elif test "$ac_cv_sizeof_long_long" = "4"; then
- int32="long long"
- else
- AC_MSG_ERROR([No 32-bit type found])
- fi
-
- if test "$ac_cv_sizeof_int" = "8"; then
- int64="int"
- elif test "$ac_cv_sizeof_long" = "8"; then
- int64="long"
- elif test "$ac_cv_sizeof_long_long" = "8"; then
- int64="long long"
- else
- AC_MSG_ERROR([No 64-bit type found])
- fi
-
- int128=no
- if test "$ac_cv_sizeof___int128_t" = "16"; then
- int128="__int128_t"
- fi
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- ethr_have_native_atomics=no
- else
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP32, 1, [Define if you have __sync_val_compare_and_swap() for 32-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH32, 1, [Define if you have __sync_add_and_fetch() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND32, 1, [Define if you have __sync_fetch_and_and() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR32, 1, [Define if you have __sync_fetch_and_or() for 32-bit integers]))
-
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP64, 1, [Define if you have __sync_val_compare_and_swap() for 64-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH64, 1, [Define if you have __sync_add_and_fetch() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND64, 1, [Define if you have __sync_fetch_and_and() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR64, 1, [Define if you have __sync_fetch_and_or() for 64-bit integers]))
-
- if test $int128 != no; then
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [128], [$int128], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP128, 1, [Define if you have __sync_val_compare_and_swap() for 128-bit integers]))
- fi
-
- AC_MSG_CHECKING([for a usable libatomic_ops implementation])
- case "x$with_libatomic_ops" in
- xno | xyes | x)
- libatomic_ops_include=
- ;;
- *)
- if test -d "${with_libatomic_ops}/include"; then
- libatomic_ops_include="-I$with_libatomic_ops/include"
- CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
- else
- AC_MSG_ERROR([libatomic_ops include directory $with_libatomic_ops/include not found])
- fi;;
- esac
- ethr_have_libatomic_ops=no
- AC_TRY_LINK([#include "atomic_ops.h"],
- [
- volatile AO_t x;
- AO_t y;
- int z;
-
- AO_nop_full();
- AO_store(&x, (AO_t) 0);
- z = AO_load(&x);
- z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
- ],
- [ethr_have_native_atomics=yes
- ethr_have_libatomic_ops=yes])
- AC_MSG_RESULT([$ethr_have_libatomic_ops])
- if test $ethr_have_libatomic_ops = yes; then
- AC_CHECK_SIZEOF(AO_t, ,
- [
- #include <stdio.h>
- #include "atomic_ops.h"
- ])
- AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used])
-
- AC_DEFINE(ETHR_HAVE_LIBATOMIC_OPS, 1, [Define if you have libatomic_ops atomic operations])
- if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_DEFINE(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS, 1, [Define if you prefer libatomic_ops native ethread implementations])
- fi
- ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
- elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_MSG_ERROR([No usable libatomic_ops implementation found])
- fi
-
- case "$host_cpu" in
- sparc | sun4u | sparc64 | sun4v)
- case "$with_sparc_memory_order" in
- "TSO")
- AC_DEFINE(ETHR_SPARC_TSO, 1, [Define if only run in Sparc TSO mode]);;
- "PSO")
- AC_DEFINE(ETHR_SPARC_PSO, 1, [Define if only run in Sparc PSO, or TSO mode]);;
- "RMO"|"")
- AC_DEFINE(ETHR_SPARC_RMO, 1, [Define if run in Sparc RMO, PSO, or TSO mode]);;
- *)
- AC_MSG_ERROR([Unsupported Sparc memory order: $with_sparc_memory_order]);;
- esac
- ethr_have_native_atomics=yes;;
- i86pc | i*86 | x86_64 | amd64)
- if test "$enable_x86_out_of_order" = "yes"; then
- AC_DEFINE(ETHR_X86_OUT_OF_ORDER, 1, [Define if x86/x86_64 out of order instructions should be synchronized])
- fi
- ethr_have_native_atomics=yes;;
- macppc | ppc | powerpc | "Power Macintosh")
- ethr_have_native_atomics=yes;;
- tile)
- ethr_have_native_atomics=yes;;
- *)
- ;;
- esac
-
- fi
-
- test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes
-
- dnl Restore LIBS
- LIBS=$saved_libs
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- ;;
- *)
- ;;
-esac
-
-AC_MSG_CHECKING([whether default stack size should be modified])
-if test "x$ethr_modified_default_stack_size" != "x"; then
- AC_DEFINE_UNQUOTED(ETHR_MODIFIED_DEFAULT_STACK_SIZE, $ethr_modified_default_stack_size, [Define if you want to modify the default stack size])
- AC_MSG_RESULT([yes; to $ethr_modified_default_stack_size kilo words])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$ETHR_THR_LIB_BASE" != "x"; then
- ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
- ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
- ETHR_LIB_NAME=$ethr_lib_name
-fi
-
-AC_CHECK_SIZEOF(void *)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
-
-AC_CHECK_SIZEOF(int)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_INT, $ac_cv_sizeof_int, [Define to the size of int])
-AC_CHECK_SIZEOF(long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG, $ac_cv_sizeof_long, [Define to the size of long])
-AC_CHECK_SIZEOF(long long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long, [Define to the size of long long])
-AC_CHECK_SIZEOF(__int64)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT64, $ac_cv_sizeof___int64, [Define to the size of __int64])
-AC_CHECK_SIZEOF(__int128_t)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT128_T, $ac_cv_sizeof___int128_t, [Define to the size of __int128_t])
-
-
-case X$erl_xcomp_bigendian in
- X) ;;
- Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian]);;
-esac
-
-AC_C_BIGENDIAN
-
-if test "$ac_cv_c_bigendian" = "yes"; then
- AC_DEFINE(ETHR_BIGENDIAN, 1, [Define if bigendian])
-fi
-
-case X$erl_xcomp_double_middle_endian in
- X) ;;
- Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian]);;
-esac
-
-AC_C_DOUBLE_MIDDLE_ENDIAN
-
-ETHR_X86_SSE2_ASM=no
-case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in
- yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64)
- AC_MSG_CHECKING([for gcc sse2 asm support])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -msse2"
- gcc_sse2_asm=no
- AC_TRY_COMPILE([],
- [
- long long x, *y;
- __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory");
- ],
- [gcc_sse2_asm=yes])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$gcc_sse2_asm])
- if test "$gcc_sse2_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_SSE2_ASM_SUPPORT, 1, [Define if you use a gcc that supports -msse2 and understand sse2 specific asm statements])
- ETHR_X86_SSE2_ASM=yes
- fi
- ;;
- *)
- ;;
-esac
-
-case "$GCC-$host_cpu" in
- yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64)
- gcc_dw_cmpxchg_asm=no
- AC_MSG_CHECKING([for gcc double word cmpxchg asm support])
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
- __asm__ __volatile__(
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "pushl %%ebx\n\t"
- "movl %8, %%ebx\n\t"
-#endif
-#if ETHR_SIZEOF_PTR == 4
- "lock; cmpxchg8b %0\n\t"
-#else
- "lock; cmpxchg16b %0\n\t"
-#endif
- "setz %3\n\t"
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "popl %%ebx\n\t"
-#endif
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]),
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "r"(new[0])
-#else
- "b"(new[0])
-#endif
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test $gcc_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
-#if !defined(__PIC__) || !__PIC__
-# error nope
-#endif
- __asm__ __volatile__(
- "pushl %%ebx\n\t"
- "movl (%7), %%ebx\n\t"
- "movl 4(%7), %%ecx\n\t"
- "lock; cmpxchg8b %0\n\t"
- "setz %3\n\t"
- "popl %%ebx\n\t"
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new)
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_CMPXCHG8B_REGISTER_SHORTAGE, 1, [Define if you get a register shortage with cmpxchg8b and position independent code])
- fi
- fi
- AC_MSG_RESULT([$gcc_dw_cmpxchg_asm])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT, 1, [Define if you use a gcc that supports the double word cmpxchg instruction])
- fi;;
- *)
- ;;
-esac
-
-AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \
-[Define if you have all ethread defines])
-
-AC_SUBST(ETHR_X_LIBS)
-AC_SUBST(ETHR_LIBS)
-AC_SUBST(ETHR_LIB_NAME)
-AC_SUBST(ETHR_DEFS)
-AC_SUBST(ETHR_THR_LIB_BASE)
-AC_SUBST(ETHR_THR_LIB_BASE_DIR)
-AC_SUBST(ETHR_X86_SSE2_ASM)
-
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_TIME_CORRECTION
-dnl
-dnl In the presence of a high resolution realtime timer Erlang can adapt
-dnl its view of time relative to this timer. On solaris such a timer is
-dnl available with the syscall gethrtime(). On other OS's a fallback
-dnl solution using times() is implemented. (However on e.g. FreeBSD times()
-dnl is implemented using gettimeofday so it doesn't make much sense to
-dnl use it there...) On second thought, it seems to be safer to do it the
-dnl other way around. I.e. only use times() on OS's where we know it will
-dnl work...
-dnl
-
-AC_DEFUN(ERL_TIME_CORRECTION,
-[if test x$ac_cv_func_gethrtime = x; then
- AC_CHECK_FUNC(gethrtime)
-fi
-if test x$clock_gettime_correction = xunknown; then
- AC_TRY_COMPILE([#include <time.h>],
- [struct timespec ts;
- long long result;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- result = ((long long) ts.tv_sec) * 1000000000LL +
- ((long long) ts.tv_nsec);],
- clock_gettime_compiles=yes,
- clock_gettime_compiles=no)
-else
- clock_gettime_compiles=no
-fi
-
-
-AC_CACHE_CHECK([how to correct for time adjustments], erl_cv_time_correction,
-[
-case $clock_gettime_correction in
- yes)
- erl_cv_time_correction=clock_gettime;;
- no|unknown)
- case $ac_cv_func_gethrtime in
- yes)
- erl_cv_time_correction=hrtime ;;
- no)
- case $host_os in
- linux*)
- case $clock_gettime_correction in
- unknown)
- if test x$clock_gettime_compiles = xyes; then
- if test X$cross_compiling != Xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
- else
- case X$erl_xcomp_linux_clock_gettime_correction in
- X)
- erl_cv_time_correction=cross;;
- Xyes|Xno)
- if test $erl_xcomp_linux_clock_gettime_correction = yes; then
- erl_cv_time_correction=clock_gettime
- else
- erl_cv_time_correction=times
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction]);;
- esac
- fi
- else
- erl_cv_time_correction=times
- fi
- ;;
- *)
- erl_cv_time_correction=times ;;
- esac
- ;;
- *)
- erl_cv_time_correction=none ;;
- esac
- ;;
- esac
- ;;
-esac
-])
-
-xrtlib=""
-case $erl_cv_time_correction in
- times)
- AC_DEFINE(CORRECT_USING_TIMES,[],
- [Define if you do not have a high-res. timer & want to use times() instead])
- ;;
- clock_gettime|cross)
- if test $erl_cv_time_correction = cross; then
- erl_cv_time_correction=clock_gettime
- AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
- fi
- xrtlib="-lrt"
- AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
- [Define if you want to use clock_gettime to simulate gethrtime])
- ;;
-esac
-dnl
-dnl Check if gethrvtime is working, and if to use procfs ioctl
-dnl or (yet to be written) write to the procfs ctl file.
-dnl
-
-AC_MSG_CHECKING([if gethrvtime works and how to use it])
-AC_TRY_RUN([
-/* gethrvtime procfs ioctl test */
-/* These need to be undef:ed to not break activation of
- * micro level process accounting on /proc/self
- */
-#ifdef _LARGEFILE_SOURCE
-# undef _LARGEFILE_SOURCE
-#endif
-#ifdef _FILE_OFFSET_BITS
-# undef _FILE_OFFSET_BITS
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-int main() {
- long msacct = PR_MSACCT;
- int fd;
- long long start, stop;
- int i;
- pid_t pid = getpid();
- char proc_self[30] = "/proc/";
-
- sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid);
- if ( (fd = open(proc_self, O_WRONLY)) == -1)
- exit(1);
- if (ioctl(fd, PIOCSET, &msacct) < 0)
- exit(2);
- if (close(fd) < 0)
- exit(3);
- start = gethrvtime();
- for (i = 0; i < 100; i++)
- stop = gethrvtime();
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
-}
-],
-erl_gethrvtime=procfs_ioctl,
-erl_gethrvtime=false,
-[
-case X$erl_xcomp_gethrvtime_procfs_ioctl in
- X)
- erl_gethrvtime=cross;;
- Xyes|Xno)
- if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
- erl_gethrvtime=procfs_ioctl
- else
- erl_gethrvtime=false
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl]);;
-esac
-])
-
-case $erl_gethrvtime in
- procfs_ioctl)
- AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
- [define if gethrvtime() works and uses ioctl() to /proc/self])
- AC_MSG_RESULT(uses ioctl to procfs)
- ;;
- *)
- if test $erl_gethrvtime = cross; then
- erl_gethrvtime=false
- AC_MSG_RESULT(cross)
- AC_MSG_WARN([result 'not working' guessed because of cross compilation])
- else
- AC_MSG_RESULT(not working)
- fi
-
- dnl
- dnl Check if clock_gettime (linux) is working
- dnl
-
- AC_MSG_CHECKING([if clock_gettime can be used to get process CPU time])
- save_libs=$LIBS
- LIBS="-lrt"
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
- #include <time.h>
- int main() {
- long long start, stop;
- int i;
- struct timespec tp;
-
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) < 0)
- exit(1);
- start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- for (i = 0; i < 100; i++)
- clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
- stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
- }
- ],
- erl_clock_gettime=yes,
- erl_clock_gettime=no,
- [
- case X$erl_xcomp_clock_gettime_cpu_time in
- X) erl_clock_gettime=cross;;
- Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
- *) AC_MSG_ERROR([Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time]);;
- esac
- ])
- LIBS=$save_libs
- case $host_os in
- linux*)
- AC_MSG_RESULT([no; not stable])
- LIBRT=$xrtlib
- ;;
- *)
- AC_MSG_RESULT($erl_clock_gettime)
- case $erl_clock_gettime in
- yes)
- AC_DEFINE(HAVE_CLOCK_GETTIME,[],
- [define if clock_gettime() works for getting process time])
- LIBRT=-lrt
- ;;
- cross)
- erl_clock_gettime=no
- AC_MSG_WARN([result no guessed because of cross compilation])
- LIBRT=$xrtlib
- ;;
- *)
- LIBRT=$xrtlib
- ;;
- esac
- ;;
- esac
- AC_SUBST(LIBRT)
- ;;
-esac
-])dnl
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_TRY_ENABLE_CFLAG
-dnl
-dnl
-dnl Tries a CFLAG and sees if it can be enabled without compiler errors
-dnl $1: textual cflag to add
-dnl $2: variable to store the modified CFLAG in
-dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
-dnl
-dnl
-AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
- saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $$2";
- AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
- CFLAGS=$saved_CFLAGS;
- if test "X$can_enable_flag" = "Xtrue"; then
- AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $$2")
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl ERL_TRY_LINK_JAVA(CLASSES, FUNCTION-BODY
-dnl [ACTION_IF_FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Freely inspired by AC_TRY_LINK. (Maybe better to create a
-dnl AC_LANG_JAVA instead...)
-AC_DEFUN(ERL_TRY_LINK_JAVA,
-[java_link='$JAVAC conftest.java 1>&AC_FD_CC'
-changequote(, )dnl
-cat > conftest.java <<EOF
-$1
-class conftest { public static void main(String[] args) {
- $2
- ; return; }}
-EOF
-changequote([, ])dnl
-if AC_TRY_EVAL(java_link) && test -s conftest.class; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
-else
- echo "configure: failed program was:" 1>&AC_FD_CC
- cat conftest.java 1>&AC_FD_CC
- echo "configure: PATH was $PATH" 1>&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
- $4
-])dnl
-fi
-rm -f conftest*])
-#define UNSAFE_MASK 0xc0000000 /* Mask for bits that must be constant */
-
-
diff --git a/lib/megaco/configure.in b/lib/megaco/configure.in
index 64daa959b5..e3c24a58b8 100644
--- a/lib/megaco/configure.in
+++ b/lib/megaco/configure.in
@@ -167,6 +167,26 @@ if test "x$GCC" = xyes; then
LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
fi
+dnl ----------------------------------------------------------------------
+dnl Enable -fsanitize= flags.
+dnl ----------------------------------------------------------------------
+
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(
+ sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]),
+[
+case "$enableval" in
+ no) sanitizers= ;;
+ yes) sanitizers="-fsanitize=DEFAULT_SANITIZERS" ;;
+ *) sanitizers="-fsanitize=$enableval" ;;
+esac
+CFLAGS="$CFLAGS $sanitizers"
+LDFLAGS="$LDFLAGS $sanitizers"
+])
+
dnl
dnl If ${ERL_TOP}/make/otp_ded.mk.in exists and contains DED_MK_VSN > 0,
dnl every thing releted to compiling Dynamic Erlang Drivers can be found
diff --git a/lib/megaco/doc/src/book.xml b/lib/megaco/doc/src/book.xml
index c0ed250b7d..1a4f532a70 100644
--- a/lib/megaco/doc/src/book.xml
+++ b/lib/megaco/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/definitions/cite.defs.xml b/lib/megaco/doc/src/definitions/cite.defs.xml
index e54251fa24..8fb91e2b44 100644
--- a/lib/megaco/doc/src/definitions/cite.defs.xml
+++ b/lib/megaco/doc/src/definitions/cite.defs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cites SYSTEM "cites.dtd">
<cites>
diff --git a/lib/megaco/doc/src/definitions/term.defs b/lib/megaco/doc/src/definitions/term.defs
index 57379eaa5d..16212923ea 100644
--- a/lib/megaco/doc/src/definitions/term.defs
+++ b/lib/megaco/doc/src/definitions/term.defs
@@ -1,7 +1,6 @@
[{"agent","agent","An entity that terminates a management protocol in the Network Element.","mbj"},
{"API","API","Application Programming Interface. The interface towards an application. Usually this is a set of functions available, but can also be a set of messages sent to or from an application.","mbj"},
{"application","application","A collection of resources which is required to offer a specific service.","mbj"},
-{"appmon","Application Monitor","A graphical node and application process tree viewer. See also appmon.","mbj"},
{"Appmon","Appmon","Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer.","mbj"},
{"app callback","application callback module","A module which is called when the application is started, and when it has stopped. Every application has one application callback module.","mbj"},
{"AC","application controller","A process which coordinates all operations on applications.","mbj"},
@@ -136,7 +135,6 @@ the module Erlang in the application kernel","kenneth"},
{"pattern matching","pattern matching","A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program.","kenneth"},
{"permanent child","permanent child","A supervised process which always is restarted when it dies.","mbj"},
{"Pid","Pid","Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line.","kenneth"},
-{"Pman","Pman","Module and application name for the Process Trace Tool.","olin"},
{"point","point","A unit used to indicate the size of a typeface. Equal to 1/72 inches.","jocke"},
{"pointer","pointer","A pointer tells where data is stored. Memory pointers are not used in Erlang.","kent"},
{"port","port","A data type in Erlang. Ports provide the basic mechanism for communication with the external world.","peterl"},
@@ -198,7 +196,6 @@ the module Erlang in the application kernel","kenneth"},
{"Table Visualizer","Table Visualizer","A tool which enables the user to examine ETS and Mnesia tables.","olin"},
{"temporary child","temporary child","A supervised process which is never restarted when it dies.","mbj"},
{"term","term","The super type of all Erlang types.","kenneth"},
-{"Toolbar","Toolbar","A tool that provides an simplistic interface to the other various Erlang/OTP tools","olin"},
{"tools","tools","An application within Erlang/OTP which contains the tools which are not applications themselves.","olin"},
{"transaction","transaction","Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties.","hakan"},
{"transient child","transient child","A supervised process which is restarted if it dies non-normally.","mbj"},
diff --git a/lib/megaco/doc/src/definitions/term.defs.xml b/lib/megaco/doc/src/definitions/term.defs.xml
index 1c80ee8d80..096720af84 100644
--- a/lib/megaco/doc/src/definitions/term.defs.xml
+++ b/lib/megaco/doc/src/definitions/term.defs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE terms SYSTEM "terms.dtd">
<terms>
diff --git a/lib/megaco/doc/src/fascicules.xml b/lib/megaco/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/megaco/doc/src/fascicules.xml
+++ b/lib/megaco/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/megaco/doc/src/megaco.xml b/lib/megaco/doc/src/megaco.xml
index 5dd622368c..dff1c3afc6 100644
--- a/lib/megaco/doc/src/megaco.xml
+++ b/lib/megaco/doc/src/megaco.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_architecture.xml b/lib/megaco/doc/src/megaco_architecture.xml
index aeea17c5cf..6795cd17a1 100644
--- a/lib/megaco/doc/src/megaco_architecture.xml
+++ b/lib/megaco/doc/src/megaco_architecture.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_codec_meas.xml b/lib/megaco/doc/src/megaco_codec_meas.xml
index 68d0326239..c6d73fb518 100644
--- a/lib/megaco/doc/src/megaco_codec_meas.xml
+++ b/lib/megaco/doc/src/megaco_codec_meas.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_codec_mstone1.xml b/lib/megaco/doc/src/megaco_codec_mstone1.xml
index 5b0b410641..4c32d9f497 100644
--- a/lib/megaco/doc/src/megaco_codec_mstone1.xml
+++ b/lib/megaco/doc/src/megaco_codec_mstone1.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_codec_mstone2.xml b/lib/megaco/doc/src/megaco_codec_mstone2.xml
index 778e125a75..d86a540ec2 100644
--- a/lib/megaco/doc/src/megaco_codec_mstone2.xml
+++ b/lib/megaco/doc/src/megaco_codec_mstone2.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_codec_transform.xml b/lib/megaco/doc/src/megaco_codec_transform.xml
index 89ed3fd654..9257c3a80c 100644
--- a/lib/megaco/doc/src/megaco_codec_transform.xml
+++ b/lib/megaco/doc/src/megaco_codec_transform.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_debug.xml b/lib/megaco/doc/src/megaco_debug.xml
index 2523a3be86..5c0132b6ef 100644
--- a/lib/megaco/doc/src/megaco_debug.xml
+++ b/lib/megaco/doc/src/megaco_debug.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_edist_compress.xml b/lib/megaco/doc/src/megaco_edist_compress.xml
index 43e124ad3a..dca5046f6f 100644
--- a/lib/megaco/doc/src/megaco_edist_compress.xml
+++ b/lib/megaco/doc/src/megaco_edist_compress.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2009</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_encode.xml b/lib/megaco/doc/src/megaco_encode.xml
index 4b5adab262..2ceefed7e3 100644
--- a/lib/megaco/doc/src/megaco_encode.xml
+++ b/lib/megaco/doc/src/megaco_encode.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/megaco/doc/src/megaco_encoder.xml b/lib/megaco/doc/src/megaco_encoder.xml
index 07e5091f74..c7f7338204 100644
--- a/lib/megaco/doc/src/megaco_encoder.xml
+++ b/lib/megaco/doc/src/megaco_encoder.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_examples.xml b/lib/megaco/doc/src/megaco_examples.xml
index 8c85c1a0b4..2ab33795a8 100644
--- a/lib/megaco/doc/src/megaco_examples.xml
+++ b/lib/megaco/doc/src/megaco_examples.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_flex_scanner.xml b/lib/megaco/doc/src/megaco_flex_scanner.xml
index b79b6384df..7c32f1036b 100644
--- a/lib/megaco/doc/src/megaco_flex_scanner.xml
+++ b/lib/megaco/doc/src/megaco_flex_scanner.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_intro.xml b/lib/megaco/doc/src/megaco_intro.xml
index 507271bcd8..1399f28168 100644
--- a/lib/megaco/doc/src/megaco_intro.xml
+++ b/lib/megaco/doc/src/megaco_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_mib.xml b/lib/megaco/doc/src/megaco_mib.xml
index f1abe08fb5..cdc8b2f491 100644
--- a/lib/megaco/doc/src/megaco_mib.xml
+++ b/lib/megaco/doc/src/megaco_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_performance.xml b/lib/megaco/doc/src/megaco_performance.xml
index eb3d852a19..18dbb84a68 100644
--- a/lib/megaco/doc/src/megaco_performance.xml
+++ b/lib/megaco/doc/src/megaco_performance.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_run.xml b/lib/megaco/doc/src/megaco_run.xml
index b723778890..5bec4d779e 100644
--- a/lib/megaco/doc/src/megaco_run.xml
+++ b/lib/megaco/doc/src/megaco_run.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_tcp.xml b/lib/megaco/doc/src/megaco_tcp.xml
index f4ccd97cee..7d487e0f91 100644
--- a/lib/megaco/doc/src/megaco_tcp.xml
+++ b/lib/megaco/doc/src/megaco_tcp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_transport.xml b/lib/megaco/doc/src/megaco_transport.xml
index 66ef85ff25..8c60b00569 100644
--- a/lib/megaco/doc/src/megaco_transport.xml
+++ b/lib/megaco/doc/src/megaco_transport.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_transport_mechanisms.xml b/lib/megaco/doc/src/megaco_transport_mechanisms.xml
index f384280561..c747732fe5 100644
--- a/lib/megaco/doc/src/megaco_transport_mechanisms.xml
+++ b/lib/megaco/doc/src/megaco_transport_mechanisms.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_udp.xml b/lib/megaco/doc/src/megaco_udp.xml
index ed554659b7..4352cc0430 100644
--- a/lib/megaco/doc/src/megaco_udp.xml
+++ b/lib/megaco/doc/src/megaco_udp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/megaco_user.xml b/lib/megaco/doc/src/megaco_user.xml
index 7987ed3392..44246935bb 100644
--- a/lib/megaco/doc/src/megaco_user.xml
+++ b/lib/megaco/doc/src/megaco_user.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml
index a7bf48cdd1..fd654af051 100644
--- a/lib/megaco/doc/src/notes.xml
+++ b/lib/megaco/doc/src/notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2013</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,14 +13,14 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
-
+
<title>Megaco Release Notes</title>
<prepared>Lars Thors&eacute;n, H&aring;kan Mattsson, Micael Karlberg</prepared>
<docno></docno>
@@ -29,30 +29,93 @@
<file>notes.xml</file>
</header>
<p>This document describes the changes made to the Megaco system
- from version to version. The intention of this document is to
- list all incompatibilities as well as all enhancements and
- bugfixes for every release of Megaco. Each release of Megaco
- thus constitutes one section in this document. The title of each
- section is the version number of Megaco.</p>
+ from version to version. The intention of this document is to
+ list all incompatibilities as well as all enhancements and
+ bugfixes for every release of Megaco. Each release of Megaco
+ thus constitutes one section in this document. The title of each
+ section is the version number of Megaco.</p>
+
+
+ <section><title>Megaco 3.17.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ </list>
+ </section>
+</section>
- <section><title>Megaco 3.17.0.2</title>
+<section><title>Megaco 3.17.2</title>
- <section><title>Improvements and New Features</title>
+ <section><title>Fixed Bugs and Malfunctions</title>
<list>
<item>
<p>
- Introduced functionality for inspection of system and
- build configuration.</p>
+ Implement --enable-sanitizers[=sanitizers]. Similar to
+ debugging with Valgrind, it's very useful to enable
+ -fsanitize= switches to catch bugs at runtime.</p>
<p>
- Own Id: OTP-11196</p>
+ Own Id: OTP-12153</p>
</item>
</list>
</section>
</section>
-<section><title>Megaco 3.17.0.1</title>
+<section><title>Megaco 3.17.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Megaco 3.17.0.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Updated doc files to utf8.</p>
+ <p>Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+ </section>
+
+ <section><title>Megaco 3.17.0.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Introduced functionality for inspection of system and
+ build configuration.</p>
+ <p>
+ Own Id: OTP-11196</p>
+ </item>
+ </list>
+ </section>
+
+ </section>
+
+ <section><title>Megaco 3.17.0.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/megaco/doc/src/notes_history.xml b/lib/megaco/doc/src/notes_history.xml
index 220ed4bbb1..48ffd7d97a 100644
--- a/lib/megaco/doc/src/notes_history.xml
+++ b/lib/megaco/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2010</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/part.xml b/lib/megaco/doc/src/part.xml
index a43720178d..ed7368468e 100644
--- a/lib/megaco/doc/src/part.xml
+++ b/lib/megaco/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/part_notes.xml b/lib/megaco/doc/src/part_notes.xml
index dfc01b54f6..6783dd8616 100644
--- a/lib/megaco/doc/src/part_notes.xml
+++ b/lib/megaco/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/part_notes_history.xml b/lib/megaco/doc/src/part_notes_history.xml
index 5186ea0fc1..e5b64c7cd3 100644
--- a/lib/megaco/doc/src/part_notes_history.xml
+++ b/lib/megaco/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/doc/src/ref_man.xml b/lib/megaco/doc/src/ref_man.xml
index b2bb1c046e..b7dbf66344 100644
--- a/lib/megaco/doc/src/ref_man.xml
+++ b/lib/megaco/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/megaco/src/app/megaco.app.src b/lib/megaco/src/app/megaco.app.src
index 40265166ae..6ab85a1bbc 100644
--- a/lib/megaco/src/app/megaco.app.src
+++ b/lib/megaco/src/app/megaco.app.src
@@ -112,7 +112,10 @@
megaco_trans_sup, megaco_misc_sup, megaco_sup]},
{applications, [stdlib, kernel]},
{env, []},
- {mod, {megaco_sup, []}}
+ {mod, {megaco_sup, []}},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","kernel-3.0",
+ "et-1.5","erts-6.0","debugger-4.0",
+ "asn1-3.0"]}
]}.
diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src
index da171e0c18..92504e8e87 100644
--- a/lib/megaco/src/app/megaco.appup.src
+++ b/lib/megaco/src/app/megaco.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -165,11 +165,33 @@
%% | | | | |
%% v v v v v
%% 3.17 <- 3.16.1 <- 3.15.2 <- 3.14.2 <- 3.11.4
+%% |
+%% v
+%% 3.17.0.1
+%% |
+%% v
+%% 3.17.0.2
+%% |
+%% v
+%% 3.17.0.3
+%% |
+%% v
+%% 3.17.1
+%% |
+%% v
+%% 3.17.2
+%% |
+%% v
+%% 3.17.3
%%
%%
{"%VSN%",
[
+ {"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",
@@ -180,6 +202,10 @@
}
],
[
+ {"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",
diff --git a/lib/megaco/src/binary/depend.mk b/lib/megaco/src/binary/depend.mk
index b9b86d3183..4225bc69dc 100644
--- a/lib/megaco/src/binary/depend.mk
+++ b/lib/megaco/src/binary/depend.mk
@@ -28,7 +28,7 @@
# This means that the ASN.1 runtime library will be inlined.
#
-ASN1_CT_OPTS += +noobj
+ASN1_CT_OPTS += +noobj +legacy_erlang_types
ifeq ($(MEGACO_INLINE_ASN1_RT),true)
# We need atleast version 1.4.6 of the ANS.1 application
ASN1_CT_OPTS += +inline
diff --git a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
index 8a4f4e7509..7d82262a59 100644
--- a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
+++ b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
@@ -66,7 +66,7 @@ version_of(_EC, Binary, 3, [AsnModV1, AsnModV2, AsnModV3])
version_of([], _Binary, Err) ->
{error, {decode_failed, lists:reverse(Err)}};
version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) ->
- case (catch asn1rt:decode(AsnMod, 'MegacoMessage', Binary)) of
+ case (catch AsnMod:decode('MegacoMessage', Binary)) of
{ok, M} ->
V = (M#'MegacoMessage'.mess)#'Message'.version,
{ok, V};
@@ -82,14 +82,14 @@ version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) ->
encode_message([native], MegaMsg, AsnMod, _TransMod, binary)
when is_record(MegaMsg, 'MegacoMessage') ->
- asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg);
+ AsnMod:encode('MegacoMessage', MegaMsg);
encode_message(EC, MegaMsg, AsnMod, TransMod, binary)
when is_list(EC) andalso is_record(MegaMsg, 'MegacoMessage') ->
case (catch TransMod:tr_message(MegaMsg, encode, EC)) of
{'EXIT', Reason} ->
{error, Reason};
MegaMsg2 ->
- asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg2)
+ AsnMod:encode('MegacoMessage', MegaMsg2)
end;
encode_message(EC, MegaMsg, AsnMod, TransMod, io_list) ->
case encode_message(EC, MegaMsg, AsnMod, TransMod, binary) of
@@ -276,7 +276,7 @@ decode_message_dynamic(_EC, _BadBin, _Mods, _Type) ->
decode_message(EC, Bin, AsnMod, TransMod, _) ->
- case asn1rt:decode(AsnMod, 'MegacoMessage', Bin) of
+ case AsnMod:decode('MegacoMessage', Bin) of
{ok, MegaMsg} ->
case EC of
[native] ->
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index ea4e9f2eb8..8687d622e9 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = megaco
-MEGACO_VSN = 3.17.0.2
+MEGACO_VSN = 3.17.3
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
diff --git a/lib/mnesia/doc/src/Mnesia_App_A.xml b/lib/mnesia/doc/src/Mnesia_App_A.xml
index 86e5b7d03c..62dbffa14a 100644
--- a/lib/mnesia/doc/src/Mnesia_App_A.xml
+++ b/lib/mnesia/doc/src/Mnesia_App_A.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_App_B.xmlsrc b/lib/mnesia/doc/src/Mnesia_App_B.xmlsrc
index 52f5e06d83..f02e424ca4 100644
--- a/lib/mnesia/doc/src/Mnesia_App_B.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_App_B.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_App_C.xmlsrc b/lib/mnesia/doc/src/Mnesia_App_C.xmlsrc
index d8916f25cb..f7fefa36c4 100644
--- a/lib/mnesia/doc/src/Mnesia_App_C.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_App_C.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_App_D.xmlsrc b/lib/mnesia/doc/src/Mnesia_App_D.xmlsrc
index d98680640d..b7a4c270ad 100644
--- a/lib/mnesia/doc/src/Mnesia_App_D.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_App_D.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_chap1.xml b/lib/mnesia/doc/src/Mnesia_chap1.xml
index 9af81c85cb..540008cdc5 100644
--- a/lib/mnesia/doc/src/Mnesia_chap1.xml
+++ b/lib/mnesia/doc/src/Mnesia_chap1.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc
index 473b35b806..f464135a89 100644
--- a/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_chap3.xml b/lib/mnesia/doc/src/Mnesia_chap3.xml
index 5733aedbfd..ae704b4199 100644
--- a/lib/mnesia/doc/src/Mnesia_chap3.xml
+++ b/lib/mnesia/doc/src/Mnesia_chap3.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -152,7 +152,7 @@ Transformer =
<c>ignore</c>, it indicates that only the meta data about the table will
be updated. Usage of <c>ignore</c> is not recommended (since it creates
inconsistencies between the meta data and the actual data) but included
- as a possibility for the user do to his own (off-line) transform.</p>
+ as a possibility for the user to do his own (off-line) transform.</p>
</item>
<item><c>change_table_copy_type(Tab, Node, ToType)</c>. This
function changes the storage type of a table. For example, a
diff --git a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
index 7e57c7ac02..a18f853662 100644
--- a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc
index 30a8991465..127c23e0f7 100644
--- a/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -867,6 +867,7 @@ ok
</section>
<section>
+ <marker id="event_handling"></marker>
<title>Mnesia Event Handling</title>
<p>System events and table events are the two categories of events
that Mnesia will generate in various situations.
diff --git a/lib/mnesia/doc/src/Mnesia_chap7.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap7.xmlsrc
index ae41a216f4..4458cd3919 100644
--- a/lib/mnesia/doc/src/Mnesia_chap7.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_chap7.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/Mnesia_chap8.xml b/lib/mnesia/doc/src/Mnesia_chap8.xml
index 3d2e23cf57..d35dd0c539 100644
--- a/lib/mnesia/doc/src/Mnesia_chap8.xml
+++ b/lib/mnesia/doc/src/Mnesia_chap8.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/book.xml b/lib/mnesia/doc/src/book.xml
index 5389e615c7..d200582a0f 100644
--- a/lib/mnesia/doc/src/book.xml
+++ b/lib/mnesia/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/fascicules.xml b/lib/mnesia/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/mnesia/doc/src/fascicules.xml
+++ b/lib/mnesia/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/mnesia/doc/src/mnesia.xml b/lib/mnesia/doc/src/mnesia.xml
index 20133cb6cb..ed5b879f7f 100644
--- a/lib/mnesia/doc/src/mnesia.xml
+++ b/lib/mnesia/doc/src/mnesia.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -151,9 +151,9 @@ If a new item is inserted with the same key as
</item>
<item>
<p><c>local_content</c> When an application requires
- tables whose contents is local to each node,
+ tables whose contents are local to each node,
<c>local_content</c> tables may be used. The name of the
- table is known to all Mnesia nodes, but its contents is
+ table is known to all Mnesia nodes, but its contents are
unique on each node. This means that access to such a table
must be done locally. Set the <c>local_content</c> field to
<c>true</c> if you want to enable the <c>local_content</c>
@@ -579,7 +579,7 @@ mnesia:add_table_index(person, age)
<desc>
<p>The tables are backed up to external media using the backup
module <c>BackupMod</c>. Tables with the local contents
- property is being backed up as they exist on the current
+ property are backed up as they exist on the current
node. <c>BackupMod</c> is the default backup callback
module obtained by
<c>mnesia:system_info(backup_module)</c>. See the User's
@@ -863,7 +863,7 @@ mnesia:create_table(person,
{attributes, record_info(fields,person)}]).
</code>
<p>The specification of <c>index</c> and <c>attributes</c> may be
- hard coded as <c>{index, [2]}</c> and
+ hard coded as <c>{index, [4]}</c> and
<c>{attributes, [name, age, address, salary, children]}</c>
respectively.
</p>
@@ -1204,7 +1204,11 @@ mnesia:create_table(person,
<desc>
<p>Performs a user initiated dump of the local log file.
This is usually not necessary since Mnesia, by default,
- manages this automatically.</p>
+ manages this automatically.
+ See configuration parameters
+ <seealso marker="#dump_log_time_threshold">dump_log_time_threshold</seealso> and
+ <seealso marker="#dump_log_write_threshold">dump_log_write_threshold</seealso>.
+ </p>
</desc>
</func>
<func>
@@ -2184,12 +2188,13 @@ mnesia:create_table(employee,
</desc>
</func>
<func>
- <name>subscribe(EventCategory)</name>
+ <name>subscribe(EventCategory) -> {ok, Node} | {error, Reason} </name>
<fsummary>Subscribe to events of type <c>EventCategory</c>.</fsummary>
<desc>
<p>Ensures that a copy of all events of type
<c>EventCategory</c> are sent to the caller. The event
- types available are described in the Mnesia User's Guide.</p>
+ types available are described in the Mnesia User's Guide at <seealso marker="Mnesia_chap5#event_handling">Mnesia Event Handling</seealso>.</p>
+ <p><c>Node</c> is the local node. For table events to be subscribed, mnesia must have a readable local copy of the table on the node.</p>
</desc>
</func>
<func>
@@ -2208,6 +2213,18 @@ mnesia:create_table(employee,
</desc>
</func>
<func>
+ <name>sync_log() -> ok | {error, Reason} </name>
+ <fsummary>Perform a file sync of the local log file.</fsummary>
+ <desc>
+ <p>Ensures that the local transaction log file is synced to disk.
+ On a single node system data written to disk tables, since the last dump,
+ can be lost in case of a power outage.
+ See <seealso marker="#dump_log/0">dump_log/0</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
<name>sync_transaction(Fun, [[, Args], Retries]) -> {aborted, Reason} | {atomic, ResultOfFun} </name>
<fsummary>Synchronously execute a transaction.</fsummary>
<desc>
@@ -2445,7 +2462,7 @@ mnesia:create_table(employee,
<name>table(Tab [,[Option]]) -> QueryHandle </name>
<fsummary>Return a QLC query handle.</fsummary>
<desc>
- <p> <marker id="qlc_table"></marker>
+ <p><marker id="qlc_table"></marker>
Returns a QLC (Query List Comprehension) query handle, see
<seealso marker="stdlib:qlc">qlc(3)</seealso>.The module <c>qlc</c> implements a query language, it
can use mnesia tables as sources of data. Calling
@@ -2750,7 +2767,7 @@ raise(Name, Amount) ->
new type. The <c>Fun</c> argument can also be the atom
<c>ignore</c>, it indicates that only the meta data about the table will
be updated. Usage of <c>ignore</c> is not recommended but included
- as a possibility for the user do to his own transform.
+ as a possibility for the user to do his own transform.
<c>NewAttributeList</c> and <c>NewRecordName</c>
specifies the attributes and the new record type of converted
table. Table name will always remain unchanged, if the
@@ -2845,11 +2862,12 @@ raise(Name, Amount) ->
</desc>
</func>
<func>
- <name>unsubscribe(EventCategory)</name>
+ <name>unsubscribe(EventCategory) -> {ok, Node} | {error, Reason} </name>
<fsummary>Subscribe to events of type <c>EventCategory</c>.</fsummary>
<desc>
<p>Stops sending events of type
<c>EventCategory</c> to the caller.</p>
+ <p><c>Node</c> is the local node.</p>
</desc>
</func>
<func>
@@ -3015,6 +3033,7 @@ raise(Name, Amount) ->
performed on the original data file. The default is <c>true</c></p>
</item>
<item>
+ <marker id=" dump_log_write_threshold"></marker>
<p><c>-mnesia dump_log_write_threshold Max</c>, where
<c>Max</c> is an integer which specifies the maximum number of writes
allowed to the transaction log before a new dump of the log
@@ -3022,13 +3041,14 @@ raise(Name, Amount) ->
</p>
</item>
<item>
+ <marker id=" dump_log_time_threshold"></marker>
<p><c>-mnesia dump_log_time_threshold Max</c>,
where <c>Max</c> is an integer which
specifies the dump log interval in milliseconds. It defaults
to 3 minutes. If a dump has not been performed within
<c>dump_log_time_threshold</c> milliseconds, then a new dump is
performed regardless of how many writes have been
- performed.
+ performed.
</p>
</item>
<item>
diff --git a/lib/mnesia/doc/src/mnesia_frag_hash.xml b/lib/mnesia/doc/src/mnesia_frag_hash.xml
index 665796f20d..0d660925e7 100644
--- a/lib/mnesia/doc/src/mnesia_frag_hash.xml
+++ b/lib/mnesia/doc/src/mnesia_frag_hash.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/mnesia_registry.xml b/lib/mnesia/doc/src/mnesia_registry.xml
index e08f3a42fc..ad2b927315 100644
--- a/lib/mnesia/doc/src/mnesia_registry.xml
+++ b/lib/mnesia/doc/src/mnesia_registry.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1998</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index 0e9131190d..dc98efbff3 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -38,7 +38,177 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.</p>
- <section><title>Mnesia 4.11</title>
+ <section><title>Mnesia 4.12.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed race condition in protocol negotiation.</p>
+ <p>
+ Own Id: OTP-12473</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Grammar corrections. (Thanks to Derek Brown)</p>
+ <p>
+ Own Id: OTP-12400</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.12.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a spelling mistake in mnesia documentation.</p>
+ <p>
+ Own Id: OTP-12278</p>
+ </item>
+ <item>
+ <p>
+ Matching data with <c>mnesia:match_object/1</c> did not
+ work as expected in some cases, when data was written in
+ the same transaction before the matching was invoked.</p>
+ <p>
+ Own Id: OTP-12304 Aux Id: Seq12745 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.12.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Various logging fixes, including: Add run queue index to
+ the process dump in crash dumps.<br/> Add thread index to
+ enomem slogan when crashing.<br/> Remove error logger
+ message for sending messages to old instances of the same
+ node.</p>
+ <p>
+ Own Id: OTP-12115</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.12.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a race which could make create_table fail if a node
+ was going down during the transaction.</p>
+ <p>
+ Own Id: OTP-12124 Aux Id: seq12694 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.12.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Force load table could hang when a node went away during
+ start up.</p>
+ <p>
+ Own Id: OTP-11948 Aux Id: seq12585 </p>
+ </item>
+ <item>
+ <p>
+ The time for inserting locks for a transaction with large
+ number of locks is reduced significantly.</p>
+ <p>
+ Own Id: OTP-11981</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.12</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ To prevent a race condition if there is a short
+ communication problem when node-down and node-up events
+ are received. They are now stored and later checked if
+ the node came up just before mnesia flagged the node as
+ down. (Thanks to Jonas Falkevik )</p>
+ <p>
+ Own Id: OTP-11497</p>
+ </item>
+ <item>
+ <p>
+ Added <c>mnesia:sync_log/0</c> to explicit sync mnesias
+ transaction log.</p>
+ <p>
+ Own Id: OTP-11729</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.11</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/mnesia/doc/src/notes_history.xml b/lib/mnesia/doc/src/notes_history.xml
index 0984e33376..28b30f000d 100644
--- a/lib/mnesia/doc/src/notes_history.xml
+++ b/lib/mnesia/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/part.xml b/lib/mnesia/doc/src/part.xml
index b9654a4207..2a16b0a791 100644
--- a/lib/mnesia/doc/src/part.xml
+++ b/lib/mnesia/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/part_notes.xml b/lib/mnesia/doc/src/part_notes.xml
index caa155585d..cad1b48ed5 100644
--- a/lib/mnesia/doc/src/part_notes.xml
+++ b/lib/mnesia/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/part_notes_history.xml b/lib/mnesia/doc/src/part_notes_history.xml
index e4621dbbf7..a97676050f 100644
--- a/lib/mnesia/doc/src/part_notes_history.xml
+++ b/lib/mnesia/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2004</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/doc/src/ref_man.xml b/lib/mnesia/doc/src/ref_man.xml
index 417423641d..e3c75be6e1 100644
--- a/lib/mnesia/doc/src/ref_man.xml
+++ b/lib/mnesia/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/mnesia/src/mnesia.app.src b/lib/mnesia/src/mnesia.app.src
index 3715488ec2..e755864792 100644
--- a/lib/mnesia/src/mnesia.app.src
+++ b/lib/mnesia/src/mnesia.app.src
@@ -47,6 +47,7 @@
mnesia_tm
]},
{applications, [kernel, stdlib]},
- {mod, {mnesia_sup, []}}]}.
+ {mod, {mnesia_sup, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/mnesia/src/mnesia.erl b/lib/mnesia/src/mnesia.erl
index 70466d10d7..8f14831ad3 100644
--- a/lib/mnesia/src/mnesia.erl
+++ b/lib/mnesia/src/mnesia.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -104,7 +104,8 @@
set_master_nodes/1, set_master_nodes/2,
%% Misc admin
- dump_log/0, subscribe/1, unsubscribe/1, report_event/1,
+ dump_log/0, sync_log/0,
+ subscribe/1, unsubscribe/1, report_event/1,
%% Snmp
snmp_open_table/2, snmp_close_table/1,
@@ -1139,10 +1140,12 @@ match_object(_Tid, _Ts, Tab, Pat, _LockKind) ->
add_written_match(S, Pat, Tab, Objs) ->
Ops = find_ops(S, Tab, Pat),
- add_match(Ops, Objs, val({Tab, setorbag})).
+ FixedRes = add_match(Ops, Objs, val({Tab, setorbag})),
+ MS = ets:match_spec_compile([{Pat, [], ['$_']}]),
+ ets:match_spec_run(FixedRes, MS).
find_ops(S, Tab, Pat) ->
- GetWritten = [{{{Tab, '_'}, Pat, write}, [], ['$_']},
+ GetWritten = [{{{Tab, '_'}, '_', write}, [], ['$_']},
{{{Tab, '_'}, '_', delete}, [], ['$_']},
{{{Tab, '_'}, Pat, delete_object}, [], ['$_']}],
ets:select(S, GetWritten).
@@ -1808,7 +1811,7 @@ do_dirty_rpc(Tab, Node, M, F, Args) ->
{badrpc, Reason} ->
timer:sleep(20), %% Do not be too eager, and can't use yield on SMP
%% Sync with mnesia_monitor
- try sys:get_status(mnesia_monitor) catch _:_ -> ok end,
+ _ = try sys:get_status(mnesia_monitor) catch _:_ -> ok end,
case mnesia_controller:call({check_w2r, Node, Tab}) of % Sync
NewNode when NewNode =:= Node ->
ErrorTag = mnesia_lib:dirty_rpc_error_tag(Reason),
@@ -2554,6 +2557,9 @@ set_master_nodes(Tab, Nodes) ->
dump_log() ->
mnesia_controller:sync_dump_log(user).
+sync_log() ->
+ mnesia_monitor:sync_log(latest_log).
+
subscribe(What) ->
mnesia_subscr:subscribe(self(), What).
diff --git a/lib/mnesia/src/mnesia.hrl b/lib/mnesia/src/mnesia.hrl
index 2855792646..c8010d5466 100644
--- a/lib/mnesia/src/mnesia.hrl
+++ b/lib/mnesia/src/mnesia.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,7 @@
-define(ets_last(Tab), ets:last(Tab)).
-define(ets_prev(Tab, Key), ets:prev(Tab, Key)).
-define(ets_slot(Tab, Pos), ets:slot(Tab, Pos)).
--define(ets_new_table(Tab, Props), ets:new(Tab, Props)).
+-define(ets_new_table(Tab, Props), _ = ets:new(Tab, Props)).
-define(ets_delete_table(Tab), ets:delete(Tab)).
-define(ets_fixtable(Tab, Bool), ets:fixtable(Tab, Bool)).
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 78f7bfa325..5a9bae54da 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -198,7 +198,8 @@ sync_dump_log(InitBy) ->
call({sync_dump_log, InitBy}).
async_dump_log(InitBy) ->
- ?SERVER_NAME ! {async_dump_log, InitBy}.
+ ?SERVER_NAME ! {async_dump_log, InitBy},
+ ok.
%% Wait for tables to be active
%% If needed, we will wait for Mnesia to start
@@ -293,13 +294,19 @@ update(Fun) ->
mnesia_down(Node) ->
- case cast({mnesia_down, Node}) of
- {error, _} -> mnesia_monitor:mnesia_down(?SERVER_NAME, Node);
- _Pid -> ok
+ case whereis(?SERVER_NAME) of
+ undefined -> mnesia_monitor:mnesia_down(?SERVER_NAME, Node);
+ Pid -> gen_server:cast(Pid, {mnesia_down, Node})
end.
+
wait_for_schema_commit_lock() ->
- link(whereis(?SERVER_NAME)),
- unsafe_call(wait_for_schema_commit_lock).
+ try
+ Pid = whereis(?SERVER_NAME),
+ link(Pid), %% Keep the link until release_schema_commit_lock
+ gen_server:call(Pid, wait_for_schema_commit_lock, infinity)
+ catch _:_ ->
+ mnesia:abort({node_not_running, node()})
+ end.
block_controller() ->
call(block_controller).
@@ -467,7 +474,7 @@ connect_nodes2(Father, Ns, UserFun) ->
process_flag(trap_exit, true),
Res = try_merge_schema(New, [], UserFun),
Msg = {schema_is_merged, [], late_merge, []},
- multicall([node()|Ns], Msg),
+ _ = multicall([node()|Ns], Msg),
After = val({current, db_nodes}),
Father ! {?MODULE, self(), Res, mnesia_lib:intersect(Ns,After)},
unlink(Father),
@@ -548,19 +555,13 @@ schema_is_merged() ->
cast(Msg) ->
case whereis(?SERVER_NAME) of
- undefined ->{error, {node_not_running, node()}};
+ undefined -> ok;
Pid -> gen_server:cast(Pid, Msg)
end.
abcast(Nodes, Msg) ->
gen_server:abcast(Nodes, ?SERVER_NAME, Msg).
-unsafe_call(Msg) ->
- case whereis(?SERVER_NAME) of
- undefined -> {error, {node_not_running, node()}};
- Pid -> gen_server:call(Pid, Msg, infinity)
- end.
-
call(Msg) ->
case whereis(?SERVER_NAME) of
undefined ->
@@ -1206,7 +1207,14 @@ handle_info(Done = #loader_done{worker_pid=WPid, table_name=Tab}, State0) ->
{value,{_,Worker}} = lists:keysearch(WPid,1,get_loaders(State0)),
add_loader(Tab,Worker,State1);
_ ->
- State1
+ DelState = State1#state{late_loader_queue=gb_trees:delete_any(Tab, LateQueue0)},
+ case ?catch_val({Tab, storage_type}) of
+ ram_copies ->
+ cast({disc_load, Tab, ram_only}),
+ DelState;
+ _ ->
+ DelState
+ end
end
end,
State3 = opt_start_worker(State2),
@@ -1789,7 +1797,7 @@ sync_and_block_table_whereabouts(Tab, ToNode, RemoteS, AccessMode) when Tab /= s
true -> Current -- [ToNode];
false -> Current
end,
- remote_call(ToNode, block_table, [Tab]),
+ _ = remote_call(ToNode, block_table, [Tab]),
[remote_call(Node, add_active_replica, [Tab, ToNode, RemoteS, AccessMode]) ||
Node <- [ToNode | Ns]],
ok.
diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl
index e2a0aa3bda..14665797a0 100644
--- a/lib/mnesia/src/mnesia_dumper.erl
+++ b/lib/mnesia/src/mnesia_dumper.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -85,7 +85,7 @@ adjust_log_writes(DoCast) ->
%% Don't care if we lost a few writes
mnesia_lib:set_counter(trans_log_writes_left, Max),
Diff = Max - Left,
- mnesia_lib:incr_counter(trans_log_writes, Diff),
+ _ = mnesia_lib:incr_counter(trans_log_writes, Diff),
global:del_lock(Token, [node()])
end.
@@ -451,7 +451,8 @@ disc_delete_table(Tab, Storage) ->
Storage == disc_only_copies; Tab == schema ->
mnesia_monitor:unsafe_close_dets(Tab),
Dat = mnesia_lib:tab2dat(Tab),
- file:delete(Dat);
+ file:delete(Dat),
+ ok;
true ->
DclFile = mnesia_lib:tab2dcl(Tab),
case get({?MODULE,Tab}) of
@@ -466,13 +467,14 @@ disc_delete_table(Tab, Storage) ->
file:delete(DcdFile),
ok
end,
- erase({?MODULE, Tab});
+ erase({?MODULE, Tab}),
+ ok;
false ->
- ignore
+ ok
end.
disc_delete_indecies(_Tab, _Cs, Storage) when Storage /= disc_only_copies ->
- ignore;
+ ok;
disc_delete_indecies(Tab, Cs, disc_only_copies) ->
Indecies = Cs#cstruct.index,
mnesia_index:del_transient(Tab, Indecies, disc_only_copies).
@@ -522,10 +524,11 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
{disc_copies, ram_copies} when Tab == schema ->
mnesia_lib:set(use_dir, false),
mnesia_monitor:unsafe_close_dets(Tab),
- file:delete(Dat);
+ ok = file:delete(Dat);
{disc_copies, ram_copies} ->
- file:delete(Dcl),
- file:delete(Dcd);
+ _ = file:delete(Dcl),
+ _ = file:delete(Dcd),
+ ok;
{ram_copies, disc_only_copies} ->
ok = ensure_rename(Dmp, Dat),
true = open_files(Tab, disc_only_copies, InPlace, InitBy),
@@ -544,7 +547,8 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
startup ->
ignore;
_ ->
- mnesia_controller:get_disc_copy(Tab)
+ mnesia_controller:get_disc_copy(Tab),
+ ok
end,
disc_delete_table(Tab, disc_only_copies);
{disc_copies, disc_only_copies} ->
@@ -553,8 +557,9 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
mnesia_schema:ram_delete_table(Tab, FromS),
PosList = Cs#cstruct.index,
mnesia_index:init_indecies(Tab, disc_only_copies, PosList),
- file:delete(Dcl),
- file:delete(Dcd);
+ _ = file:delete(Dcl),
+ _ = file:delete(Dcd),
+ ok;
{disc_only_copies, disc_copies} ->
mnesia_monitor:unsafe_close_dets(Tab),
disc_delete_indecies(Tab, Cs, disc_only_copies),
diff --git a/lib/mnesia/src/mnesia_event.erl b/lib/mnesia/src/mnesia_event.erl
index 35fe2d4035..67ec9d7399 100644
--- a/lib/mnesia/src/mnesia_event.erl
+++ b/lib/mnesia/src/mnesia_event.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -63,7 +63,7 @@ handle_event(Event, State) ->
%%-----------------------------------------------------------------
handle_info(Msg, State) ->
- handle_any_event(Msg, State),
+ {ok, _} = handle_any_event(Msg, State),
{ok, State}.
%%-----------------------------------------------------------------
diff --git a/lib/mnesia/src/mnesia_frag.erl b/lib/mnesia/src/mnesia_frag.erl
index 4a1616e054..66fc20913c 100644
--- a/lib/mnesia/src/mnesia_frag.erl
+++ b/lib/mnesia/src/mnesia_frag.erl
@@ -939,7 +939,7 @@ do_split(_FH, _OldN, _FragNames, [], Ops) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Delete a fragment from a fragmented table
-%% and merge its records with an other fragment
+%% and merge its records with another fragment
make_multi_del_frag(Tab) ->
verify_multi(Tab),
diff --git a/lib/mnesia/src/mnesia_index.erl b/lib/mnesia/src/mnesia_index.erl
index 54db45e3ba..87cb58dae1 100644
--- a/lib/mnesia/src/mnesia_index.erl
+++ b/lib/mnesia/src/mnesia_index.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -52,7 +52,11 @@
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', _ReASoN_} -> mnesia_lib:other_val(Var, _ReASoN_);
+ {'EXIT', _ReASoN_} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, _ReASoN_);
+ Val -> Val
+ end;
_VaLuE_ -> _VaLuE_
end.
@@ -229,7 +233,7 @@ del_transient(Tab, Storage) ->
PosList = val({Tab, index}),
del_transient(Tab, PosList, Storage).
-del_transient(_, [], _) -> done;
+del_transient(_, [], _) -> ok;
del_transient(Tab, [Pos | Tail], Storage) ->
delete_transient_index(Tab, Pos, Storage),
del_transient(Tab, Tail, Storage).
@@ -237,7 +241,7 @@ del_transient(Tab, [Pos | Tail], Storage) ->
delete_transient_index(Tab, Pos, disc_only_copies) ->
Tag = {Tab, index, Pos},
mnesia_monitor:unsafe_close_dets(Tag),
- file:delete(tab2filename(Tab, Pos)),
+ _ = file:delete(tab2filename(Tab, Pos)),
del_index_info(Tab, Pos), %% Uses val(..)
mnesia_lib:unset({Tab, {index, Pos}});
@@ -255,7 +259,7 @@ init_disc_index(_Tab, []) ->
init_disc_index(Tab, [Pos | Tail]) when is_integer(Pos) ->
Fn = tab2filename(Tab, Pos),
IxTag = {Tab, index, Pos},
- file:delete(Fn),
+ _ = file:delete(Fn),
Args = [{file, Fn}, {keypos, 1}, {type, bag}],
mnesia_monitor:open_dets(IxTag, Args),
Storage = disc_only_copies,
diff --git a/lib/mnesia/src/mnesia_lib.erl b/lib/mnesia/src/mnesia_lib.erl
index ae6631646c..a32c69c59e 100644
--- a/lib/mnesia/src/mnesia_lib.erl
+++ b/lib/mnesia/src/mnesia_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -115,6 +115,8 @@
mkcore/1,
not_active_here/1,
other_val/2,
+ other_val/1,
+ pr_other/2,
overload_read/0,
overload_read/1,
overload_set/2,
@@ -296,11 +298,7 @@ active_here(Tab) ->
not_active_here(Tab) ->
not active_here(Tab).
-exists(Fname) ->
- case file:open(Fname, [raw,read]) of
- {ok, F} ->file:close(F), true;
- _ -> false
- end.
+exists(Fname) -> filelib:is_regular(Fname).
dir() -> mnesia_monitor:get_env(dir).
@@ -393,16 +391,19 @@ unset(Var) ->
?ets_delete(mnesia_gvar, Var).
other_val(Var, Other) ->
+ case other_val(Var) of
+ error -> pr_other(Var, Other);
+ Val -> Val
+ end.
+
+other_val(Var) ->
case Var of
{_, where_to_read} -> nowhere;
{_, where_to_write} -> [];
{_, active_replicas} -> [];
- _ ->
- pr_other(Var, Other)
+ _ -> error
end.
--spec pr_other(_,_) -> no_return().
-
pr_other(Var, Other) ->
Why =
case is_running() of
@@ -596,7 +597,7 @@ coredump(CrashInfo) ->
Core = mkcore(CrashInfo),
Out = core_file(),
important("Writing Mnesia core to file: ~p...~p~n", [Out, CrashInfo]),
- file:write_file(Out, Core),
+ _ = file:write_file(Out, Core),
Out.
core_file() ->
@@ -620,7 +621,7 @@ mkcore(CrashInfo) ->
Core = [
CrashInfo,
{time, {date(), time()}},
- {self, catch process_info(self())},
+ {self, proc_dbg_info(self())},
{nodes, catch rpc:multicall(Nodes, ?MODULE, get_node_number, [])},
{applications, catch lists:sort(application:loaded_applications())},
{flags, catch init:get_arguments()},
@@ -697,7 +698,7 @@ relatives() ->
Info = fun(Name) ->
case whereis(Name) of
undefined -> false;
- Pid -> {true, {Name, Pid, catch process_info(Pid)}}
+ Pid -> {true, {Name, Pid, proc_dbg_info(Pid)}}
end
end,
lists:zf(Info, mnesia:ms()).
@@ -706,14 +707,14 @@ workers({workers, Loaders, Senders, Dumper}) ->
Info = fun({Pid, {send_table, Tab, _Receiver, _St}}) ->
case Pid of
undefined -> false;
- Pid -> {true, {Pid, Tab, catch process_info(Pid)}}
+ Pid -> {true, {Pid, Tab, proc_dbg_info(Pid)}}
end;
({Pid, What}) when is_pid(Pid) ->
- {true, {Pid, What, catch process_info(Pid)}};
+ {true, {Pid, What, proc_dbg_info(Pid)}};
({Name, Pid}) ->
case Pid of
undefined -> false;
- Pid -> {true, {Name, Pid, catch process_info(Pid)}}
+ Pid -> {true, {Name, Pid, proc_dbg_info(Pid)}}
end
end,
SInfo = lists:zf(Info, Senders),
@@ -727,13 +728,21 @@ locking_procs(LockList) when is_list(LockList) ->
Pid = Tid#tid.pid,
case node(Pid) == node() of
true ->
- {true, {Pid, catch process_info(Pid)}};
+ {true, {Pid, proc_dbg_info(Pid)}};
_ ->
false
end
end,
lists:zf(Info, UT).
+proc_dbg_info(Pid) ->
+ try
+ [process_info(Pid, current_stacktrace)|
+ process_info(Pid)]
+ catch _:R ->
+ [{process_info,crashed,R}]
+ end.
+
view() ->
Bin = mkcore({crashinfo, {"view only~n", []}}),
vcore(Bin).
@@ -806,9 +815,9 @@ vcore(File) ->
vcore_elem({schema_file, {ok, B}}) ->
Fname = "/tmp/schema.DAT",
- file:write_file(Fname, B),
- dets:view(Fname),
- file:delete(Fname);
+ _ = file:write_file(Fname, B),
+ _ = dets:view(Fname),
+ _ = file:delete(Fname);
vcore_elem({logfile, {ok, BinList}}) ->
Fun = fun({F, Info}) ->
@@ -922,7 +931,7 @@ random_time(Retries, _Counter0) ->
case get(random_seed) of
undefined ->
{X, Y, Z} = erlang:now(), %% time()
- random:seed(X, Y, Z),
+ _ = random:seed(X, Y, Z),
Time = Dup + random:uniform(MaxIntv),
%% dbg_out("---random_test rs ~w max ~w val ~w---~n", [Retries, MaxIntv, Time]),
Time;
@@ -958,20 +967,17 @@ report_system_event({'EXIT', Reason}, Event) ->
unlink(Pid),
%% We get an exit signal if server dies
- receive
- {'EXIT', Pid, _Reason} ->
- {error, {node_not_running, node()}}
- after 0 ->
- gen_event:stop(mnesia_event),
- ok
+ receive {'EXIT', Pid, _Reason} -> ok
+ after 0 -> gen_event:stop(mnesia_event)
end;
Error ->
Msg = "Mnesia(~p): Cannot report event ~p: ~p (~p)~n",
error_logger:format(Msg, [node(), Event, Reason, Error])
- end;
+ end,
+ ok;
report_system_event(_Res, _Event) ->
- ignore.
+ ok.
%% important messages are reported regardless of debug level
important(Format, Args) ->
@@ -1025,8 +1031,8 @@ copy_file(From, To) ->
case file:open(To, [raw, binary, write]) of
{ok, T} ->
Res = copy_file_loop(F, T, 8000),
- file:close(F),
- file:close(T),
+ ok = file:close(F),
+ ok = file:close(T),
Res;
{error, Reason} ->
{error, Reason}
@@ -1038,7 +1044,7 @@ copy_file(From, To) ->
copy_file_loop(F, T, ChunkSize) ->
case file:read(F, ChunkSize) of
{ok, Bin} ->
- file:write(T, Bin),
+ ok = file:write(T, Bin),
copy_file_loop(F, T, ChunkSize);
eof ->
ok;
@@ -1205,7 +1211,7 @@ dets_to_ets(Tabname, Tab, File, Type, Rep, Lock) ->
{keypos, 2}, {repair, Rep}]) of
{ok, Tabname} ->
Res = dets:to_ets(Tabname, Tab),
- Close(Tabname),
+ ok = Close(Tabname),
trav_ret(Res, Tab);
Other ->
Other
diff --git a/lib/mnesia/src/mnesia_loader.erl b/lib/mnesia/src/mnesia_loader.erl
index 4afbea1cc2..530317bcdd 100644
--- a/lib/mnesia/src/mnesia_loader.erl
+++ b/lib/mnesia/src/mnesia_loader.erl
@@ -208,7 +208,8 @@ do_get_network_copy(Tab, Reason, Ns, Storage, Cs) ->
set({Tab, load_node}, Node),
set({Tab, load_reason}, Reason),
mnesia_controller:i_have_tab(Tab),
- dbg_out("Table ~p copied from ~p to ~p~n", [Tab, Node, node()]),
+ dbg_out("Table ~p copied from ~p to ~p (~b entries)~n",
+ [Tab, Node, node(), mnesia:table_info(Tab, size)]),
{loaded, ok};
Err = {error, _} when element(1, Reason) == dumper ->
{not_loaded,Err};
diff --git a/lib/mnesia/src/mnesia_locker.erl b/lib/mnesia/src/mnesia_locker.erl
index c4fe370ec1..1efb939e00 100644
--- a/lib/mnesia/src/mnesia_locker.erl
+++ b/lib/mnesia/src/mnesia_locker.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -84,7 +84,7 @@ init(Parent) ->
register(?MODULE, self()),
process_flag(trap_exit, true),
?ets_new_table(mnesia_held_locks, [ordered_set, private, named_table]),
- ?ets_new_table(mnesia_tid_locks, [bag, private, named_table]),
+ ?ets_new_table(mnesia_tid_locks, [ordered_set, private, named_table]),
?ets_new_table(mnesia_sticky_locks, [set, private, named_table]),
?ets_new_table(mnesia_lock_queue, [bag, private, named_table, {keypos, 2}]),
@@ -103,7 +103,8 @@ val(Var) ->
end.
reply(From, R) ->
- From ! {?MODULE, node(), R}.
+ From ! {?MODULE, node(), R},
+ true. %% Quiets dialyzer
l_request(Node, X, Store) ->
{?MODULE, Node} ! {self(), X},
@@ -130,9 +131,14 @@ send_release_tid(Nodes, Tid) ->
receive_release_tid_acc([Node | Nodes], Tid) ->
receive
{?MODULE, Node, {tid_released, Tid}} ->
- receive_release_tid_acc(Nodes, Tid);
- {mnesia_down, Node} ->
receive_release_tid_acc(Nodes, Tid)
+ after 0 ->
+ receive
+ {?MODULE, Node, {tid_released, Tid}} ->
+ receive_release_tid_acc(Nodes, Tid);
+ {mnesia_down, Node} ->
+ receive_release_tid_acc(Nodes, Tid)
+ end
end;
receive_release_tid_acc([], _Tid) ->
ok.
@@ -247,13 +253,13 @@ loop(State) ->
end.
set_lock(Tid, Oid, Op, []) ->
- ?ets_insert(mnesia_tid_locks, {Tid, Oid, Op}),
+ ?ets_insert(mnesia_tid_locks, {{Tid, Oid, Op}}),
?ets_insert(mnesia_held_locks, {Oid, Op, [{Op, Tid}]});
set_lock(Tid, Oid, read, [{Oid, Prev, Items}]) ->
- ?ets_insert(mnesia_tid_locks, {Tid, Oid, read}),
+ ?ets_insert(mnesia_tid_locks, {{Tid, Oid, read}}),
?ets_insert(mnesia_held_locks, {Oid, Prev, [{read, Tid}|Items]});
set_lock(Tid, Oid, write, [{Oid, _Prev, Items}]) ->
- ?ets_insert(mnesia_tid_locks, {Tid, Oid, write}),
+ ?ets_insert(mnesia_tid_locks, {{Tid, Oid, write}}),
?ets_insert(mnesia_held_locks, {Oid, write, [{write, Tid}|Items]});
set_lock(Tid, Oid, Op, undefined) ->
set_lock(Tid, Oid, Op, ?ets_lookup(mnesia_held_locks, Oid)).
@@ -269,7 +275,8 @@ try_sticky_lock(Tid, Op, Pid, {Tab, _} = Oid) ->
try_lock(Tid, Op, Pid, Oid);
[{_,N}] ->
Req = {Pid, {Op, Tid, Oid}},
- Pid ! {?MODULE, node(), {switch, N, Req}}
+ Pid ! {?MODULE, node(), {switch, N, Req}},
+ true
end.
try_lock(Tid, read_write, Pid, Oid) ->
@@ -292,7 +299,7 @@ try_lock(Tid, Op, SimpleOp, Lock, Pid, Oid) ->
?ets_insert(mnesia_lock_queue,
#queue{oid = Oid, tid = Tid, op = Op,
pid = Pid, lucky = Lucky}),
- ?ets_insert(mnesia_tid_locks, {Tid, Oid, {queued, Op}})
+ ?ets_insert(mnesia_tid_locks, {{Tid, Oid, {queued, Op}}})
end.
grant_lock(Tid, read, Lock, Oid = {Tab, Key}, Default)
@@ -491,7 +498,7 @@ set_read_lock_on_all_keys(Tid, From, Tab, IxKey, Pos) ->
?ets_insert(mnesia_lock_queue,
#queue{oid = Oid, tid = Tid, op = Op,
pid = From, lucky = Lucky}),
- ?ets_insert(mnesia_tid_locks, {Tid, Oid, {queued, Op}})
+ ?ets_insert(mnesia_tid_locks, {{Tid, Oid, {queued, Op}}})
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -507,7 +514,8 @@ release_remote_non_pending(Node, Pending) ->
%% running at the failed node and also simply remove all
%% queue'd requests back to the failed node
- AllTids = ?ets_match(mnesia_tid_locks, {'$1', '_', '_'}),
+ AllTids0 = ?ets_match(mnesia_tid_locks, {{'$1', '_', '_'}}),
+ AllTids = lists:usort(AllTids0),
Tids = [T || [T] <- AllTids, Node == node(T#tid.pid), not lists:member(T, Pending)],
do_release_tids(Tids).
@@ -518,9 +526,10 @@ do_release_tids([]) ->
ok.
do_release_tid(Tid) ->
- Locks = ?ets_lookup(mnesia_tid_locks, Tid),
+ Objects = ets:select(mnesia_tid_locks, [{{{Tid, '_', '_'}}, [], ['$_']}]),
+ Locks = lists:map(fun({L}) -> L end, Objects),
?dbg("Release ~p ~p ~n", [Tid, Locks]),
- ?ets_delete(mnesia_tid_locks, Tid),
+ [?ets_delete(mnesia_tid_locks, L) || L <- Locks],
release_locks(Locks),
%% Removed queued locks which has had locks
UniqueLocks = keyunique(lists:sort(Locks),[]),
@@ -973,8 +982,14 @@ sticky_flush(Ns=[Node | Tail], Store) ->
flush_remaining([], _SkipNode, Res) ->
del_debug(),
exit(Res);
-flush_remaining([SkipNode | Tail ], SkipNode, Res) ->
- flush_remaining(Tail, SkipNode, Res);
+flush_remaining(Ns=[SkipNode | Tail ], SkipNode, Res) ->
+ add_debug(Ns),
+ receive
+ {?MODULE, SkipNode, _} ->
+ flush_remaining(Tail, SkipNode, Res)
+ after 0 ->
+ flush_remaining(Tail, SkipNode, Res)
+ end;
flush_remaining(Ns=[Node | Tail], SkipNode, Res) ->
add_debug(Ns),
receive
diff --git a/lib/mnesia/src/mnesia_log.erl b/lib/mnesia/src/mnesia_log.erl
index 18303869ed..d2fd04a60b 100644
--- a/lib/mnesia/src/mnesia_log.erl
+++ b/lib/mnesia/src/mnesia_log.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -393,13 +393,15 @@ unsafe_close_log(Log) ->
purge_some_logs() ->
mnesia_monitor:unsafe_close_log(latest_log),
- file:delete(latest_log_file()),
- file:delete(decision_tab_file()).
+ _ = file:delete(latest_log_file()),
+ _ = file:delete(decision_tab_file()),
+ ok.
purge_all_logs() ->
- file:delete(previous_log_file()),
- file:delete(latest_log_file()),
- file:delete(decision_tab_file()).
+ _ = file:delete(previous_log_file()),
+ _ = file:delete(latest_log_file()),
+ _ = file:delete(decision_tab_file()),
+ ok.
%% Prepare dump by renaming the open logfile if possible
%% Returns a tuple on the following format: {Res, OpenLog}
diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl
index 438da65158..6fc1a394a6 100644
--- a/lib/mnesia/src/mnesia_monitor.erl
+++ b/lib/mnesia/src/mnesia_monitor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,6 +44,7 @@
set_env/2,
start/0,
start_proc/4,
+ sync_log/1,
terminate_proc/3,
unsafe_close_dets/1,
unsafe_close_log/1,
@@ -78,7 +79,7 @@
-record(state, {supervisor, pending_negotiators = [],
going_down = [], tm_started = false, early_connects = [],
- connecting, mq = []}).
+ connecting, mq = [], remote_node_status = []}).
-define(current_protocol_version, {8,1}).
@@ -118,6 +119,9 @@ open_log(Args) ->
reopen_log(Name, Fname, Head) ->
unsafe_call({reopen_log, Name, Fname, Head}).
+sync_log(Name) ->
+ unsafe_call({sync_log, Name}).
+
close_log(Name) ->
unsafe_call({close_log, Name}).
@@ -202,7 +206,7 @@ needs_protocol_conversion(Node) ->
cast(Msg) ->
case whereis(?MODULE) of
- undefined -> ignore;
+ undefined -> ok;
Pid -> gen_server:cast(Pid, Msg)
end.
@@ -382,6 +386,9 @@ handle_call({reopen_log, Name, Fname, Head}, _From, State) ->
{noreply, State}
end;
+handle_call({sync_log, Name}, _From, State) ->
+ {reply, disk_log:sync(Name), State};
+
handle_call({close_log, Name}, _From, State) ->
case disk_log:close(Name) of
ok ->
@@ -395,7 +402,7 @@ handle_call({close_log, Name}, _From, State) ->
end;
handle_call({unsafe_close_log, Name}, _From, State) ->
- disk_log:close(Name),
+ _ = disk_log:close(Name),
{reply, ok, State};
handle_call({negotiate_protocol, Mon, _Version, _Protocols}, _From, State)
@@ -439,7 +446,7 @@ handle_call({negotiate_protocol, Nodes}, From, State) ->
end;
handle_call(init, _From, State) ->
- net_kernel:monitor_nodes(true),
+ _ = net_kernel:monitor_nodes(true),
EarlyNodes = State#state.early_connects,
State2 = State#state{tm_started = true},
{reply, EarlyNodes, State2};
@@ -488,17 +495,18 @@ handle_cast({mnesia_down, mnesia_tm, Node}, State) ->
GoingDown = lists:delete(Node, State#state.going_down),
State2 = State#state{going_down = GoingDown},
Pending = State#state.pending_negotiators,
+ State3 = check_raise_conditon_nodeup(Node, State2),
case lists:keysearch(Node, 1, Pending) of
{value, {Node, Mon, ReplyTo, Reply}} ->
%% Late reply to remote monitor
link(Mon), %% link to remote Monitor
gen_server:reply(ReplyTo, Reply),
P2 = lists:keydelete(Node, 1,Pending),
- State3 = State2#state{pending_negotiators = P2},
- process_q(State3);
+ State4 = State3#state{pending_negotiators = P2},
+ process_q(State4);
false ->
%% No pending remote monitors
- process_q(State2)
+ process_q(State3)
end;
handle_cast({disconnect, Node}, State) ->
@@ -564,27 +572,18 @@ handle_info({protocol_negotiated, From,Res}, State) ->
gen_server:reply(From, Res),
process_q(State#state{connecting = undefined});
-handle_info({nodeup, Node}, State) ->
- %% Ok, we are connected to yet another Erlang node
- %% Let's check if Mnesia is running there in order
- %% to detect if the network has been partitioned
- %% due to communication failure.
-
- HasDown = mnesia_recover:has_mnesia_down(Node),
- ImRunning = mnesia_lib:is_running(),
+handle_info({check_nodeup, Node}, State) ->
+ State2 = check_mnesia_down(Node, State),
+ {noreply, State2};
- if
- %% If I'm not running the test will be made later.
- HasDown == true, ImRunning == yes ->
- spawn_link(?MODULE, detect_partitioned_network, [self(), Node]);
- true ->
- ignore
- end,
- {noreply, State};
+handle_info({nodeup, Node}, State) ->
+ State2 = remote_node_status(Node, up, State),
+ State3 = check_mnesia_down(Node, State2),
+ {noreply, State3};
-handle_info({nodedown, _Node}, State) ->
- %% Ignore, we are only caring about nodeup's
- {noreply, State};
+handle_info({nodedown, Node}, State) ->
+ State2 = remote_node_status(Node, down, State),
+ {noreply, State2};
handle_info({disk_log, _Node, Log, Info}, State) ->
case Info of
@@ -826,3 +825,48 @@ report_inconsistency([{badrpc, _Reason} | Replies], Context, Status) ->
report_inconsistency(Replies, Context, Status);
report_inconsistency([], _Context, Status) ->
Status.
+
+remote_node_status(Node, Status, State) ->
+ {ok, Nodes} = mnesia_schema:read_nodes(),
+ case lists:member(Node, Nodes) of
+ true ->
+ update_node_status({Node, Status}, State);
+ _ ->
+ State
+ end.
+
+update_node_status({Node, down}, State = #state{remote_node_status = RNodeS}) ->
+ RNodeS2 = lists:ukeymerge(1, [{Node, down}], RNodeS),
+ State#state{remote_node_status = RNodeS2};
+update_node_status({Node, up}, State = #state{remote_node_status = RNodeS}) ->
+ case lists:keyfind(Node, 1, RNodeS) of
+ {Node, down} ->
+ RNodeS2 = lists:ukeymerge(1, [{Node, up}], RNodeS),
+ State#state{remote_node_status = RNodeS2};
+ _ ->
+ State
+ end.
+
+check_raise_conditon_nodeup(Node, State = #state{remote_node_status = RNodeS}) ->
+ case lists:keyfind(Node, 1, RNodeS) of
+ {Node, up} ->
+ self() ! {check_nodeup, Node};
+ _ ->
+ ignore
+ end,
+ State#state{remote_node_status = lists:keydelete(Node, 1, RNodeS)}.
+
+check_mnesia_down(Node, State = #state{remote_node_status = RNodeS}) ->
+ %% Check if the network has been partitioned
+ %% due to communication failure.
+
+ HasDown = mnesia_recover:has_mnesia_down(Node),
+ ImRunning = mnesia_lib:is_running(),
+ if
+ %% If I'm not running the test will be made later.
+ HasDown == true, ImRunning == yes ->
+ spawn_link(?MODULE, detect_partitioned_network, [self(), Node]),
+ State#state{remote_node_status = lists:keydelete(Node, 1, RNodeS)};
+ true ->
+ State
+ end.
diff --git a/lib/mnesia/src/mnesia_recover.erl b/lib/mnesia/src/mnesia_recover.erl
index 7aa03bda37..eeb4fa0ced 100644
--- a/lib/mnesia/src/mnesia_recover.erl
+++ b/lib/mnesia/src/mnesia_recover.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -178,7 +178,11 @@ log_decision(D) ->
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', Reason} -> mnesia_lib:other_val(Var, Reason);
+ {'EXIT', Reason} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, Reason);
+ Val -> Val
+ end;
Value -> Value
end.
@@ -685,12 +689,29 @@ handle_call({connect_nodes, Ns}, From, State) ->
%% called from handle_info
gen_server:reply(From, {[], AlreadyConnected}),
{noreply, State};
- GoodNodes ->
+ ProbablyGoodNodes ->
%% Now we have agreed upon a protocol with some new nodes
- %% and we may use them when we recover transactions
+ %% and we may use them when we recover transactions.
+ %%
+ %% Just in case Mnesia was stopped on some of those nodes
+ %% between the protocol negotiation and now, we check one
+ %% more time the state of Mnesia.
+ %%
+ %% Of course, there is still a chance that mnesia_down
+ %% events occur during this check and we miss them. To
+ %% prevent it, handle_cast({mnesia_down, ...}, ...) removes
+ %% the down node again, in addition to mnesia_down/1.
+ %%
+ %% See a comment in handle_cast({mnesia_down, ...}, ...).
+ Verify = fun(N) ->
+ Run = mnesia_lib:is_running(N),
+ Run =:= yes orelse Run =:= starting
+ end,
+ GoodNodes = [N || N <- ProbablyGoodNodes, Verify(N)],
+
mnesia_lib:add_list(recover_nodes, GoodNodes),
cast({announce_all, GoodNodes}),
- case get_master_nodes(schema) of
+ case get_master_nodes(schema) of
[] ->
Context = starting_partitioned_network,
mnesia_monitor:detect_inconcistency(GoodNodes, Context);
@@ -838,6 +859,14 @@ handle_cast({what_decision, Node, OtherD}, State) ->
{noreply, State};
handle_cast({mnesia_down, Node}, State) ->
+ %% The node was already removed from recover_nodes in mnesia_down/1,
+ %% but we do it again here in the mnesia_recover process, in case
+ %% another event incorrectly added it back. This can happen during
+ %% Mnesia startup which takes time betweenthe connection, the
+ %% protocol negotiation and the merge of the schema.
+ %%
+ %% See a comment in handle_call({connect_nodes, ...), ...).
+ mnesia_lib:del(recover_nodes, Node),
case State#state.unclear_decision of
undefined ->
{noreply, State};
diff --git a/lib/mnesia/src/mnesia_snmp_hook.erl b/lib/mnesia/src/mnesia_snmp_hook.erl
index 893b39f3c0..256f83b029 100644
--- a/lib/mnesia/src/mnesia_snmp_hook.erl
+++ b/lib/mnesia/src/mnesia_snmp_hook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,7 +32,11 @@
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', _ReASoN_} -> mnesia_lib:other_val(Var, _ReASoN_);
+ {'EXIT', _ReASoN_} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, _ReASoN_);
+ Val -> Val
+ end;
_VaLuE_ -> _VaLuE_
end.
diff --git a/lib/mnesia/src/mnesia_subscr.erl b/lib/mnesia/src/mnesia_subscr.erl
index 9272211ad2..866a57e370 100644
--- a/lib/mnesia/src/mnesia_subscr.erl
+++ b/lib/mnesia/src/mnesia_subscr.erl
@@ -225,7 +225,7 @@ call(Msg) ->
Res = gen_server:call(Pid, Msg, infinity),
%% We get an exit signal if server dies
receive
- {'EXIT', _Pid, _Reason} ->
+ {'EXIT', Pid, _Reason} ->
{error, {node_not_running, node()}}
after 0 ->
Res
diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
index 17af0cad44..af658150da 100644
--- a/lib/mnesia/src/mnesia_tm.erl
+++ b/lib/mnesia/src/mnesia_tm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -183,7 +183,8 @@ mnesia_down(Node) ->
undefined ->
mnesia_monitor:mnesia_down(?MODULE, Node);
Pid ->
- Pid ! {mnesia_down, Node}
+ Pid ! {mnesia_down, Node},
+ ok
end.
prepare_checkpoint(Nodes, Cp) ->
diff --git a/lib/mnesia/test/mnesia_SUITE.erl b/lib/mnesia/test/mnesia_SUITE.erl
index e0004ecb51..921ebb71e9 100644
--- a/lib/mnesia/test/mnesia_SUITE.erl
+++ b/lib/mnesia/test/mnesia_SUITE.erl
@@ -21,6 +21,7 @@
-module(mnesia_SUITE).
-author('[email protected]').
-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
-include("mnesia_test_lib.hrl").
init_per_testcase(Func, Conf) ->
@@ -50,7 +51,7 @@ suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
%% and do not involve the normal test machinery.
all() ->
- [{group, light}, {group, medium}, {group, heavy},
+ [app, appup, {group, light}, {group, medium}, {group, heavy},
clean_up_suite].
groups() ->
@@ -144,6 +145,18 @@ silly() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test structure of the mnesia application resource file
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(mnesia).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that all required versions have appup directives
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(mnesia).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
clean_up_suite(doc) -> ["Not a test case only kills mnesia and nodes, that where"
"started during the tests"];
clean_up_suite(suite) ->
diff --git a/lib/mnesia/test/mnesia_config_test.erl b/lib/mnesia/test/mnesia_config_test.erl
index 6baf86a4a5..c495bce63f 100644
--- a/lib/mnesia/test/mnesia_config_test.erl
+++ b/lib/mnesia/test/mnesia_config_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -639,10 +639,10 @@ send_compressed(Config) ->
end,
?match([], mnesia_test_lib:kill_mnesia([N2])),
-
+ sys:get_status(mnesia_monitor), %% sync N1
?match([], mnesia_test_lib:kill_mnesia([N1])),
?match(ok, mnesia:start([{send_compressed, 9}])),
- ?match(ok, mnesia:wait_for_tables([t0,t1,t2], 5000)),
+ ?match(ok, mnesia:wait_for_tables([t0,t1,t2], 25000)),
?match({atomic, ok}, mnesia:transaction(Create, [t0])),
?match({atomic, ok}, mnesia:transaction(Create, [t1])),
@@ -1158,6 +1158,7 @@ dynamic_basic(Config) when is_list(Config) ->
%%% SYNC!!!
timer:sleep(1000),
+ sys:get_status(mnesia_monitor),
?match([N3,N1], sort(rpc:call(N1, mnesia, system_info, [running_db_nodes]))),
?match([N3,N1], sort(rpc:call(N3, mnesia, system_info, [running_db_nodes]))),
diff --git a/lib/mnesia/test/mnesia_durability_test.erl b/lib/mnesia/test/mnesia_durability_test.erl
index 4434abaa1e..366fda7044 100644
--- a/lib/mnesia/test/mnesia_durability_test.erl
+++ b/lib/mnesia/test/mnesia_durability_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,19 +48,19 @@ groups() ->
load_directly_when_all_are_ram_copiesB,
{group, late_load_when_all_are_ram_copies_on_ram_nodes},
load_when_last_replica_becomes_available,
- load_when_we_have_down_from_all_other_replica_nodes,
+ load_when_down_from_all_other_replica_nodes,
late_load_transforms_into_disc_load,
late_load_leads_to_hanging,
force_load_when_nobody_intents_to_load,
force_load_when_someone_has_decided_to_load,
- force_load_when_someone_else_already_has_loaded,
+ force_load_when_someone_else_has_loaded,
force_load_when_we_has_loaded,
force_load_on_a_non_local_table,
force_load_when_the_table_does_not_exist,
{group, load_tables_with_master_tables}]},
{late_load_when_all_are_ram_copies_on_ram_nodes, [],
- [late_load_when_all_are_ram_copies_on_ram_nodes1,
- late_load_when_all_are_ram_copies_on_ram_nodes2]},
+ [late_load_all_ram_cs_ram_nodes1,
+ late_load_all_ram_cs_ram_nodes2]},
{load_tables_with_master_tables, [],
[master_nodes, starting_master_nodes,
master_on_non_local_tables,
@@ -292,8 +292,8 @@ load_directly_when_all_are_ram_copiesB(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-late_load_when_all_are_ram_copies_on_ram_nodes1(suite) -> [];
-late_load_when_all_are_ram_copies_on_ram_nodes1(Config) when is_list(Config) ->
+late_load_all_ram_cs_ram_nodes1(suite) -> [];
+late_load_all_ram_cs_ram_nodes1(Config) when is_list(Config) ->
[N1, N2] = mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
delete_schema,
{reload_appls, [mnesia]}],
@@ -303,8 +303,8 @@ late_load_when_all_are_ram_copies_on_ram_nodes1(Config) when is_list(Config) ->
2, Config, ?FILE, ?LINE),
Res.
-late_load_when_all_are_ram_copies_on_ram_nodes2(suite) -> [];
-late_load_when_all_are_ram_copies_on_ram_nodes2(Config) when is_list(Config) ->
+late_load_all_ram_cs_ram_nodes2(suite) -> [];
+late_load_all_ram_cs_ram_nodes2(Config) when is_list(Config) ->
[N1, N2, N3] = mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
delete_schema,
{reload_appls, [mnesia]}],
@@ -439,13 +439,13 @@ load_when_last_replica_becomes_available(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-load_when_we_have_down_from_all_other_replica_nodes(doc) ->
+load_when_down_from_all_other_replica_nodes(doc) ->
["The table can be loaded if this node was the last one surviving. ",
"Check this by having N1, N2, N3 and a table replicated on all those ",
"nodes. Then kill them in the N1, N2, N3 order. Then start N3 and ",
"verify that the table is available with correct contents."];
-load_when_we_have_down_from_all_other_replica_nodes(suite) -> [];
-load_when_we_have_down_from_all_other_replica_nodes(Config) when is_list(Config) ->
+load_when_down_from_all_other_replica_nodes(suite) -> [];
+load_when_down_from_all_other_replica_nodes(Config) when is_list(Config) ->
[N1, N2, N3] = Nodes = ?acquire_nodes(3, Config),
?match({atomic,ok},
mnesia:create_table(test_rec,
@@ -773,14 +773,14 @@ wait_for_signal() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-force_load_when_someone_else_already_has_loaded(doc) ->
+force_load_when_someone_else_has_loaded(doc) ->
["Normal case. Do a force load when somebody else has loaded the table. ",
"Start N1, N2, kill in N1, N2 order. Start N2 load the table, start N1 ",
"force load. Did it work? (i.e: did N1 load the table from N2 as that",
"one is the latest version and it is available on N2)"];
-force_load_when_someone_else_already_has_loaded(suite) -> [];
-force_load_when_someone_else_already_has_loaded(Config) when is_list(Config) ->
+force_load_when_someone_else_has_loaded(suite) -> [];
+force_load_when_someone_else_has_loaded(Config) when is_list(Config) ->
[N1, N2] = Nodes = ?acquire_nodes(2, Config),
Table = test_rec,
Trec1 = #test_rec{key=1,val=111},
diff --git a/lib/mnesia/test/mnesia_evil_coverage_test.erl b/lib/mnesia/test/mnesia_evil_coverage_test.erl
index 91820238e5..2d1623b6ca 100644
--- a/lib/mnesia/test/mnesia_evil_coverage_test.erl
+++ b/lib/mnesia/test/mnesia_evil_coverage_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -671,13 +671,16 @@ add_copy_when_going_down(Config) ->
?acquire_nodes(2, Config ++ [{tc_timeout, timer:minutes(2)}]),
?match({atomic, ok}, mnesia:create_table(a, [{ram_copies, [Node1]}])),
%% Grab a write lock
+ Tester = self(),
WriteAndWait = fun() ->
mnesia:write({a,1,1}),
- receive continue -> ok
+ Tester ! {self(), got_lock},
+ receive continue -> ok
end
end,
- _Lock = spawn(fun() -> mnesia:transaction(WriteAndWait) end),
- Tester = self(),
+ Locker = spawn(fun() -> mnesia:transaction(WriteAndWait) end),
+ receive {Locker, got_lock} -> ok end,
+
spawn_link(fun() -> Res = rpc:call(Node2, mnesia, add_table_copy,
[a, Node2, ram_copies]),
Tester ! {test, Res}
diff --git a/lib/mnesia/test/mnesia_frag_test.erl b/lib/mnesia/test/mnesia_frag_test.erl
index d3f6762af7..6695fbc880 100644
--- a/lib/mnesia/test/mnesia_frag_test.erl
+++ b/lib/mnesia/test/mnesia_frag_test.erl
@@ -461,7 +461,7 @@ nice_iter_access(Tab, FragNames, RawRead) ->
ExpectedLast = lists:last(Keys),
?match(ExpectedLast, mnesia:last(Tab)),
- ExpectedAllPrev = ['$end_of_table' | lists:reverse(tl(lists:reverse(Keys)))],
+ ExpectedAllPrev = ['$end_of_table' | lists:droplast(Keys)],
?match(ExpectedAllPrev, lists:map(fun(K) -> mnesia:prev(Tab, K) end, Keys)),
ExpectedAllNext = tl(Keys) ++ ['$end_of_table'],
@@ -477,7 +477,7 @@ evil_iter_access(Tab, FragNames, RawRead) ->
ExpectedLast = lists:last(Keys),
?match(ExpectedLast, mnesia:last(Tab)),
- ExpectedAllPrev = ['$end_of_table' | lists:reverse(tl(lists:reverse(Keys)))],
+ ExpectedAllPrev = ['$end_of_table' | lists:droplast(Keys)],
?match(ExpectedAllPrev, lists:map(fun(K) -> mnesia:prev(Tab, K) end, Keys)),
ExpectedAllNext = tl(Keys) ++ ['$end_of_table'],
diff --git a/lib/mnesia/test/mnesia_isolation_test.erl b/lib/mnesia/test/mnesia_isolation_test.erl
index d57f976d1f..8468472cf2 100644
--- a/lib/mnesia/test/mnesia_isolation_test.erl
+++ b/lib/mnesia/test/mnesia_isolation_test.erl
@@ -1584,7 +1584,8 @@ write_shadows(Config) when is_list(Config) ->
?match([RecA2], mnesia:read({Tab, a})),
?match([RecA2], mnesia:wread({Tab, a})),
- ?match([RecA2], mnesia:match_object(PatA2)), %% delete shadow old but not new write - is the new value visable
+ ?match([], mnesia:match_object(PatA1)), %% delete shadow old but not new write
+ ?match([RecA2], mnesia:match_object(PatA2)), %% is the new value visable
?match([a], mnesia:all_keys(Tab)),
?match([RecA2], mnesia:index_match_object(PatA2, ValPos)),
@@ -1643,6 +1644,7 @@ delete_shadows(Config) when is_list(Config) ->
?match([RecA2], mnesia:read({Tab, a})),
?match([RecA2], mnesia:wread({Tab, a})),
+ ?match([], mnesia:match_object(PatA1)),
?match([RecA2], mnesia:match_object(PatA2)),
?match([a], mnesia:all_keys(Tab)),
?match([RecA2], mnesia:index_match_object(PatA2, ValPos)),
diff --git a/lib/mnesia/test/mnesia_nice_coverage_test.erl b/lib/mnesia/test/mnesia_nice_coverage_test.erl
index 78eab67b11..4b28ac634f 100644
--- a/lib/mnesia/test/mnesia_nice_coverage_test.erl
+++ b/lib/mnesia/test/mnesia_nice_coverage_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -189,6 +189,7 @@ adm(Attrs, Node1, Node2) ->
?match({atomic, ok}, mnesia:move_table_copy(nice_tab, Node2, Node1)),
?match(yes, mnesia:force_load_table(nice_counter_tab)),
+ ?match(ok, mnesia:sync_log()),
?match(dumped, mnesia:dump_log()),
ok.
diff --git a/lib/mnesia/test/mnesia_qlc_test.erl b/lib/mnesia/test/mnesia_qlc_test.erl
index 5f46840ae9..9886754710 100644
--- a/lib/mnesia/test/mnesia_qlc_test.erl
+++ b/lib/mnesia/test/mnesia_qlc_test.erl
@@ -264,7 +264,7 @@ atomic_eval(Config) ->
?match({1,[{a,{a,9},91}]}, ok(Restart,[Pid3, Cursor])),
QC1 = ok(fun() -> qlc:cursor(Q1) end, []),
- ?match({'EXIT', _}, qlc:next_answers(QC1)),
+ ?match({'EXIT', _}, (catch qlc:next_answers(QC1))),
?match({aborted,_}, ok(fun()->qlc:next_answers(QC1)end,[])),
?verify_mnesia(Ns, []).
diff --git a/lib/mnesia/test/mnesia_recovery_test.erl b/lib/mnesia/test/mnesia_recovery_test.erl
index 0d0ad32fb0..946a9f97ba 100644
--- a/lib/mnesia/test/mnesia_recovery_test.erl
+++ b/lib/mnesia/test/mnesia_recovery_test.erl
@@ -320,7 +320,9 @@ read_during_down(Op, Config) when is_list(Config) ->
?log("W2R ~p~n", [W2R]),
loop_and_kill_mnesia(10, hd(W2R), Tabs),
[Pid ! self() || Pid <- Readers],
- ?match([ok, ok, ok], [receive ok -> ok after 1000 -> {Pid, mnesia_lib:dist_coredump()} end || Pid <- Readers]),
+ ?match([ok, ok, ok],
+ [receive ok -> ok after 5000 -> {Pid, mnesia_lib:dist_coredump()} end
+ || Pid <- Readers]),
?verify_mnesia(Ns, []).
reader(Tab, OP) ->
@@ -338,8 +340,12 @@ reader(Tab, OP) ->
?error("Expected ~p Got ~p ~n", [[{Tab, key, val}], Else]),
erlang:error(test_failed)
end,
- receive Pid ->
- Pid ! ok
+ receive
+ Pid when is_pid(Pid) ->
+ Pid ! ok;
+ Other ->
+ io:format("Msg: ~p~n", [Other]),
+ error(Other)
after 50 ->
reader(Tab, OP)
end.
@@ -1537,6 +1543,7 @@ disc_less(Config) when is_list(Config) ->
timer:sleep(500),
?match(ok, rpc:call(Node3, mnesia, start, [[{extra_db_nodes, [Node1, Node2]}]])),
?match(ok, rpc:call(Node3, mnesia, wait_for_tables, [[Tab1, Tab2, Tab3], 20000])),
+ ?match(ok, rpc:call(Node1, mnesia, wait_for_tables, [[Tab1, Tab2, Tab3], 20000])),
?match(ok, rpc:call(Node3, ?MODULE, verify_data, [Tab1, 100])),
?match(ok, rpc:call(Node3, ?MODULE, verify_data, [Tab2, 100])),
diff --git a/lib/mnesia/test/mnesia_schema_recovery_test.erl b/lib/mnesia/test/mnesia_schema_recovery_test.erl
index 0fe26efd0b..2301b291c2 100644
--- a/lib/mnesia/test/mnesia_schema_recovery_test.erl
+++ b/lib/mnesia/test/mnesia_schema_recovery_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -49,66 +49,69 @@ groups() ->
[{interrupted_before_log_dump, [],
[interrupted_before_create_ram,
interrupted_before_create_disc,
- interrupted_before_create_disc_only,
+ interrupted_before_create_do,
interrupted_before_create_nostore,
interrupted_before_delete_ram,
interrupted_before_delete_disc,
- interrupted_before_delete_disc_only,
- interrupted_before_add_ram, interrupted_before_add_disc,
- interrupted_before_add_disc_only,
+ interrupted_before_delete_do,
+ interrupted_before_add_ram,
+ interrupted_before_add_disc,
+ interrupted_before_add_do,
interrupted_before_add_kill_copier,
interrupted_before_move_ram,
interrupted_before_move_disc,
- interrupted_before_move_disc_only,
+ interrupted_before_move_do,
interrupted_before_move_kill_copier,
interrupted_before_delcopy_ram,
interrupted_before_delcopy_disc,
- interrupted_before_delcopy_disc_only,
+ interrupted_before_delcopy_do,
interrupted_before_delcopy_kill_copier,
interrupted_before_addindex_ram,
interrupted_before_addindex_disc,
- interrupted_before_addindex_disc_only,
+ interrupted_before_addindex_do,
interrupted_before_delindex_ram,
interrupted_before_delindex_disc,
- interrupted_before_delindex_disc_only,
+ interrupted_before_delindex_do,
interrupted_before_change_type_ram2disc,
- interrupted_before_change_type_ram2disc_only,
+ interrupted_before_change_type_ram2do,
interrupted_before_change_type_disc2ram,
- interrupted_before_change_type_disc2disc_only,
- interrupted_before_change_type_disc_only2ram,
- interrupted_before_change_type_disc_only2disc,
+ interrupted_before_change_type_disc2do,
+ interrupted_before_change_type_do2ram,
+ interrupted_before_change_type_do2disc,
interrupted_before_change_type_other_node,
interrupted_before_change_schema_type]},
{interrupted_after_log_dump, [],
[interrupted_after_create_ram,
interrupted_after_create_disc,
- interrupted_after_create_disc_only,
+ interrupted_after_create_do,
interrupted_after_create_nostore,
interrupted_after_delete_ram,
interrupted_after_delete_disc,
- interrupted_after_delete_disc_only,
- interrupted_after_add_ram, interrupted_after_add_disc,
- interrupted_after_add_disc_only,
+ interrupted_after_delete_do,
+ interrupted_after_add_ram,
+ interrupted_after_add_disc,
+ interrupted_after_add_do,
interrupted_after_add_kill_copier,
- interrupted_after_move_ram, interrupted_after_move_disc,
- interrupted_after_move_disc_only,
+ interrupted_after_move_ram,
+ interrupted_after_move_disc,
+ interrupted_after_move_do,
interrupted_after_move_kill_copier,
interrupted_after_delcopy_ram,
interrupted_after_delcopy_disc,
- interrupted_after_delcopy_disc_only,
+ interrupted_after_delcopy_do,
interrupted_after_delcopy_kill_copier,
interrupted_after_addindex_ram,
interrupted_after_addindex_disc,
- interrupted_after_addindex_disc_only,
+ interrupted_after_addindex_do,
interrupted_after_delindex_ram,
interrupted_after_delindex_disc,
- interrupted_after_delindex_disc_only,
+ interrupted_after_delindex_do,
interrupted_after_change_type_ram2disc,
- interrupted_after_change_type_ram2disc_only,
+ interrupted_after_change_type_ram2do,
interrupted_after_change_type_disc2ram,
- interrupted_after_change_type_disc2disc_only,
- interrupted_after_change_type_disc_only2ram,
- interrupted_after_change_type_disc_only2disc,
+ interrupted_after_change_type_disc2do,
+ interrupted_after_change_type_do2ram,
+ interrupted_after_change_type_do2disc,
interrupted_after_change_type_other_node,
interrupted_after_change_schema_type]}].
@@ -128,8 +131,8 @@ interrupted_before_create_disc(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, dump_schema_op},
interrupted_create(Config, disc_copies, all, KillAt).
-interrupted_before_create_disc_only(suite) -> [];
-interrupted_before_create_disc_only(Config) when is_list(Config) ->
+interrupted_before_create_do(suite) -> [];
+interrupted_before_create_do(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, dump_schema_op},
interrupted_create(Config, disc_only_copies, all, KillAt).
@@ -148,8 +151,8 @@ interrupted_after_create_disc(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, post_dump},
interrupted_create(Config, disc_copies, all, KillAt).
-interrupted_after_create_disc_only(suite) -> [];
-interrupted_after_create_disc_only(Config) when is_list(Config) ->
+interrupted_after_create_do(suite) -> [];
+interrupted_after_create_do(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, post_dump},
interrupted_create(Config, disc_only_copies, all, KillAt).
@@ -204,8 +207,8 @@ interrupted_before_delete_disc(suite) -> [];
interrupted_before_delete_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delete(Config, disc_copies, Debug_Point).
-interrupted_before_delete_disc_only(suite) -> [];
-interrupted_before_delete_disc_only(Config) when is_list(Config) ->
+interrupted_before_delete_do(suite) -> [];
+interrupted_before_delete_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delete(Config, disc_only_copies, Debug_Point).
@@ -217,8 +220,8 @@ interrupted_after_delete_disc(suite) -> [];
interrupted_after_delete_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delete(Config, disc_copies, Debug_Point).
-interrupted_after_delete_disc_only(suite) -> [];
-interrupted_after_delete_disc_only(Config) when is_list(Config) ->
+interrupted_after_delete_do(suite) -> [];
+interrupted_after_delete_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delete(Config, disc_only_copies, Debug_Point).
@@ -249,8 +252,8 @@ interrupted_before_add_disc(suite) -> [];
interrupted_before_add_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_add(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_add_disc_only(suite) -> [];
-interrupted_before_add_disc_only(Config) when is_list(Config) ->
+interrupted_before_add_do(suite) -> [];
+interrupted_before_add_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_add(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_add_kill_copier(suite) -> [];
@@ -266,8 +269,8 @@ interrupted_after_add_disc(suite) -> [];
interrupted_after_add_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_add(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_add_disc_only(suite) -> [];
-interrupted_after_add_disc_only(Config) when is_list(Config) ->
+interrupted_after_add_do(suite) -> [];
+interrupted_after_add_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_add(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_add_kill_copier(suite) -> [];
@@ -327,8 +330,8 @@ interrupted_before_move_disc(suite) -> [];
interrupted_before_move_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_move(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_move_disc_only(suite) -> [];
-interrupted_before_move_disc_only(Config) when is_list(Config) ->
+interrupted_before_move_do(suite) -> [];
+interrupted_before_move_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_move(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_move_kill_copier(suite) -> [];
@@ -344,8 +347,8 @@ interrupted_after_move_disc(suite) -> [];
interrupted_after_move_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_move(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_move_disc_only(suite) -> [];
-interrupted_after_move_disc_only(Config) when is_list(Config) ->
+interrupted_after_move_do(suite) -> [];
+interrupted_after_move_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_move(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_move_kill_copier(suite) -> [];
@@ -408,8 +411,8 @@ interrupted_before_delcopy_disc(suite) -> [];
interrupted_before_delcopy_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delcopy(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_delcopy_disc_only(suite) -> [];
-interrupted_before_delcopy_disc_only(Config) when is_list(Config) ->
+interrupted_before_delcopy_do(suite) -> [];
+interrupted_before_delcopy_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delcopy(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_delcopy_kill_copier(suite) -> [];
@@ -425,8 +428,8 @@ interrupted_after_delcopy_disc(suite) -> [];
interrupted_after_delcopy_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delcopy(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_delcopy_disc_only(suite) -> [];
-interrupted_after_delcopy_disc_only(Config) when is_list(Config) ->
+interrupted_after_delcopy_do(suite) -> [];
+interrupted_after_delcopy_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delcopy(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_delcopy_kill_copier(suite) -> [];
@@ -487,8 +490,8 @@ interrupted_before_addindex_disc(suite) -> [];
interrupted_before_addindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_addindex(Config, disc_copies, Debug_Point).
-interrupted_before_addindex_disc_only(suite) -> [];
-interrupted_before_addindex_disc_only(Config) when is_list(Config) ->
+interrupted_before_addindex_do(suite) -> [];
+interrupted_before_addindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_addindex(Config, disc_only_copies, Debug_Point).
@@ -500,8 +503,8 @@ interrupted_after_addindex_disc(suite) -> [];
interrupted_after_addindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_addindex(Config, disc_copies, Debug_Point).
-interrupted_after_addindex_disc_only(suite) -> [];
-interrupted_after_addindex_disc_only(Config) when is_list(Config) ->
+interrupted_after_addindex_do(suite) -> [];
+interrupted_after_addindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_addindex(Config, disc_only_copies, Debug_Point).
@@ -555,8 +558,8 @@ interrupted_before_delindex_disc(suite) -> [];
interrupted_before_delindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delindex(Config, disc_copies, Debug_Point).
-interrupted_before_delindex_disc_only(suite) -> [];
-interrupted_before_delindex_disc_only(Config) when is_list(Config) ->
+interrupted_before_delindex_do(suite) -> [];
+interrupted_before_delindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delindex(Config, disc_only_copies, Debug_Point).
@@ -568,8 +571,8 @@ interrupted_after_delindex_disc(suite) -> [];
interrupted_after_delindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delindex(Config, disc_copies, Debug_Point).
-interrupted_after_delindex_disc_only(suite) -> [];
-interrupted_after_delindex_disc_only(Config) when is_list(Config) ->
+interrupted_after_delindex_do(suite) -> [];
+interrupted_after_delindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delindex(Config, disc_only_copies, Debug_Point).
@@ -613,24 +616,24 @@ interrupted_before_change_type_ram2disc(suite) -> [];
interrupted_before_change_type_ram2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, ram_copies, disc_copies, changer, Debug_Point).
-interrupted_before_change_type_ram2disc_only(suite) -> [];
-interrupted_before_change_type_ram2disc_only(Config) when is_list(Config) ->
+interrupted_before_change_type_ram2do(suite) -> [];
+interrupted_before_change_type_ram2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, ram_copies, disc_only_copies, changer, Debug_Point).
interrupted_before_change_type_disc2ram(suite) -> [];
interrupted_before_change_type_disc2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_copies, ram_copies, changer, Debug_Point).
-interrupted_before_change_type_disc2disc_only(suite) -> [];
-interrupted_before_change_type_disc2disc_only(Config) when is_list(Config) ->
+interrupted_before_change_type_disc2do(suite) -> [];
+interrupted_before_change_type_disc2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_copies, disc_only_copies, changer, Debug_Point).
-interrupted_before_change_type_disc_only2ram(suite) -> [];
-interrupted_before_change_type_disc_only2ram(Config) when is_list(Config) ->
+interrupted_before_change_type_do2ram(suite) -> [];
+interrupted_before_change_type_do2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_only_copies, ram_copies, changer, Debug_Point).
-interrupted_before_change_type_disc_only2disc(suite) -> [];
-interrupted_before_change_type_disc_only2disc(Config) when is_list(Config) ->
+interrupted_before_change_type_do2disc(suite) -> [];
+interrupted_before_change_type_do2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_only_copies, disc_copies, changer, Debug_Point).
interrupted_before_change_type_other_node(suite) -> [];
@@ -642,24 +645,24 @@ interrupted_after_change_type_ram2disc(suite) -> [];
interrupted_after_change_type_ram2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, ram_copies, disc_copies, changer, Debug_Point).
-interrupted_after_change_type_ram2disc_only(suite) -> [];
-interrupted_after_change_type_ram2disc_only(Config) when is_list(Config) ->
+interrupted_after_change_type_ram2do(suite) -> [];
+interrupted_after_change_type_ram2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, ram_copies, disc_only_copies, changer, Debug_Point).
interrupted_after_change_type_disc2ram(suite) -> [];
interrupted_after_change_type_disc2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_copies, ram_copies, changer, Debug_Point).
-interrupted_after_change_type_disc2disc_only(suite) -> [];
-interrupted_after_change_type_disc2disc_only(Config) when is_list(Config) ->
+interrupted_after_change_type_disc2do(suite) -> [];
+interrupted_after_change_type_disc2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_copies, disc_only_copies, changer, Debug_Point).
-interrupted_after_change_type_disc_only2ram(suite) -> [];
-interrupted_after_change_type_disc_only2ram(Config) when is_list(Config) ->
+interrupted_after_change_type_do2ram(suite) -> [];
+interrupted_after_change_type_do2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_only_copies, ram_copies, changer, Debug_Point).
-interrupted_after_change_type_disc_only2disc(suite) -> [];
-interrupted_after_change_type_disc_only2disc(Config) when is_list(Config) ->
+interrupted_after_change_type_do2disc(suite) -> [];
+interrupted_after_change_type_do2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_only_copies, disc_copies, changer, Debug_Point).
interrupted_after_change_type_other_node(suite) -> [];
diff --git a/lib/mnesia/test/mnesia_test_lib.hrl b/lib/mnesia/test/mnesia_test_lib.hrl
index 281634c239..cd76377df6 100644
--- a/lib/mnesia/test/mnesia_test_lib.hrl
+++ b/lib/mnesia/test/mnesia_test_lib.hrl
@@ -46,15 +46,34 @@
-define(match(ExpectedRes,Expr),
fun() ->
- AcTuAlReS = (catch (Expr)),
- case AcTuAlReS of
- ExpectedRes ->
- ?verbose("ok, ~n Result as expected:~p~n",[AcTuAlReS]),
- {success,AcTuAlReS};
- _ ->
- ?error("Not Matching Actual result was:~n ~p~n",
- [AcTuAlReS]),
- {fail,AcTuAlReS}
+ try Expr of
+ _AR_0 = ExpectedRes ->
+ ?verbose("ok, ~n Result as expected:~p~n",[_AR_0]),
+ {success,_AR_0};
+ _AR_0 ->
+ ?error("Not Matching Actual result was:~n ~p~n",[_AR_0]),
+ {fail,_AR_0}
+ catch
+ exit:{aborted, _ER_1} when
+ element(1, _ER_1) =:= node_not_running;
+ element(1, _ER_1) =:= bad_commit;
+ element(1, _ER_1) =:= cyclic ->
+ %% Need to re-raise these to restart transaction
+ erlang:raise(exit, {aborted, _ER_1}, erlang:get_stacktrace());
+ exit:_AR_1 ->
+ case fun(_AR_EXIT_) -> {'EXIT', _AR_EXIT_} end(_AR_1) of
+ _AR_2 = ExpectedRes ->
+ ?verbose("ok, ~n Result as expected:~p~n",[_AR_2]),
+ {success,_AR_2};
+ _AR_2 ->
+ ?error("Not Matching Actual result was:~n ~p~n ~p~n",
+ [_AR_2, erlang:get_stacktrace()]),
+ {fail,_AR_2}
+ end;
+ _T1_:_AR_1 ->
+ ?error("Not Matching Actual result was:~n ~p~n ~p~n",
+ [{_T1_,_AR_1}, erlang:get_stacktrace()]),
+ {fail,{_T1_,_AR_1}}
end
end()).
diff --git a/lib/mnesia/test/mnesia_trans_access_test.erl b/lib/mnesia/test/mnesia_trans_access_test.erl
index 157e441b27..237984978e 100644
--- a/lib/mnesia/test/mnesia_trans_access_test.erl
+++ b/lib/mnesia/test/mnesia_trans_access_test.erl
@@ -677,7 +677,7 @@ check_res(sync_dirty, Res) when is_list(Res) ->
check_res(ets, Res) when is_list(Res) ->
Res;
check_res(Type,Res) ->
- ?match(bug,{Type,Res}).
+ ?match({bug, bug},{Type,Res}).
read_op(Oid) ->
case lists:reverse(mnesia:read(Oid)) of
@@ -1118,10 +1118,7 @@ create_live_table_index(Config, Storage) ->
ValPos = 3,
mnesia:dirty_write({Tab, 1, 2}),
- Fun = fun() ->
- ?match(ok, mnesia:write({Tab, 2, 2})),
- ok
- end,
+ Fun = fun() -> mnesia:write({Tab, 2, 2}) end,
?match({atomic, ok}, mnesia:transaction(Fun)),
?match({atomic, ok}, mnesia:add_table_index(Tab, ValPos)),
IRead = fun() -> lists:sort(mnesia:index_read(Tab, 2, ValPos)) end,
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index 064ba43791..b23339e408 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1 +1 @@
-MNESIA_VSN = 4.11
+MNESIA_VSN = 4.12.5
diff --git a/lib/observer/doc/src/Makefile b/lib/observer/doc/src/Makefile
index 0f564d3299..baeeeb1c65 100644
--- a/lib/observer/doc/src/Makefile
+++ b/lib/observer/doc/src/Makefile
@@ -34,6 +34,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
+XML_REF1_FILES = \
+ cdv.xml
XML_REF3_FILES = \
crashdump.xml \
observer.xml \
@@ -59,19 +61,14 @@ BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) \
$(XML_APPLICATION_FILES) $(XML_REF6_FILES)
-ONLY_HTML_FILE = \
- crashdump_help.html
+ONLY_HTML_FILE =
GIF_FILES = \
et_processes.gif \
et_modsprocs.gif \
- etop_main.gif \
- etop_5.gif \
- etop_lines.gif \
- etop_opt.gif \
note.gif
# ----------------------------------------------------
@@ -81,6 +78,7 @@ HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
INFO_FILE = ../../info
+MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
@@ -110,6 +108,7 @@ html: gifs $(HTML_REF_MAN_FILE) $(ONLY_HTML_FILE:%=$(HTMLDIR)/%)
clean clean_docs:
rm -rf $(HTMLDIR)/*
+ rm -f $(MAN1DIR)/*
rm -f $(MAN3DIR)/*
rm -f $(MAN6DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
@@ -119,7 +118,7 @@ clean clean_docs:
$(HTMLDIR)/$(ONLY_HTML_FILE):
$(INSTALL_DATA) $(ONLY_HTML_FILE) $@
-man: $(MAN3_FILES) $(MAN6_FILES)
+man: $(MAN1_FILES) $(MAN3_FILES) $(MAN6_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
@@ -139,6 +138,8 @@ release_docs_spec: docs
$(INSTALL_DATA) $(HTMLDIR)/* \
"$(RELSYSDIR)/doc/html"
$(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
+ $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
$(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
diff --git a/lib/observer/doc/src/book.xml b/lib/observer/doc/src/book.xml
index 7ecb153b2f..c47852e697 100644
--- a/lib/observer/doc/src/book.xml
+++ b/lib/observer/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/cdv.xml b/lib/observer/doc/src/cdv.xml
new file mode 100644
index 0000000000..fc8f16bc4e
--- /dev/null
+++ b/lib/observer/doc/src/cdv.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE comref SYSTEM "comref.dtd">
+
+<comref>
+ <header>
+ <copyright>
+ <year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>The cdv program</title>
+ <prepared>Siri Hansen</prepared>
+ <responsible>Siri Hansen</responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2013-10-015</date>
+ <rev>PA1</rev>
+ <file>cdv.xml</file>
+ </header>
+ <com>cdv</com>
+ <comsummary>Script used for starting the Crashdump Viewer from the
+ OS command line.
+ </comsummary>
+
+ <description>
+ <p>The <c>cdv</c> shell script can be found under the <c>priv</c>
+ directory of the <c>observer</c> application. The script is used
+ for starting the Crashdump Viewer tool from the OS command
+ line.</p>
+ <p>For Windows users, <c>cdv.bat</c> can be found in the same
+ location.</p>
+ </description>
+
+ <funcs>
+ <func>
+ <name>cdv [file]</name>
+ <fsummary>Start the Crashdump Viewer and load the given file.</fsummary>
+ <desc>
+ <p>The <c>file</c> arguments is optional. If not given, a file
+ dialog will pop up allowing the user to select a crashdump
+ from the file system.</p>
+ </desc>
+ </func>
+ </funcs>
+
+</comref>
diff --git a/lib/observer/doc/src/crashdump.xml b/lib/observer/doc/src/crashdump.xml
index b6056c2ed1..27e42e83b7 100644
--- a/lib/observer/doc/src/crashdump.xml
+++ b/lib/observer/doc/src/crashdump.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2003</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -31,13 +31,14 @@
<checked></checked>
<date>2003-03-10</date>
<rev>PA1</rev>
- <file>crashdump.sgml</file>
+ <file>crashdump.xml</file>
</header>
<module>crashdump_viewer</module>
- <modulesummary>A HTML based tool for browsing Erlang crashdumps.</modulesummary>
+ <modulesummary>A WxWidgets based tool for browsing Erlang
+ crashdumps.</modulesummary>
<description>
- <p>The Crashdump Viewer is an HTML based tool for browsing Erlang
- crashdumps. Crashdump Viewer runs under the WebTool application.</p>
+ <p>The Crashdump Viewer is a WxWidgets based tool for browsing Erlang
+ crashdumps.</p>
<p>See the <seealso marker="crashdump_ug">user's guide</seealso>
for more information about how to get started with the Crashdump
@@ -46,16 +47,26 @@
<funcs>
<func>
<name>start() -> ok</name>
+ <name>start(File) -> ok</name>
<fsummary>Start the crashdump_viewer</fsummary>
+ <type>
+ <v>File = string()</v>
+ <d>The file name of the crashdump.</d>
+ </type>
<desc>
- <p>This function starts the <c>crashdump_viewer</c>.</p>
+ <p>This function starts the <c>crashdump_viewer</c> GUI and
+ loads the given crashdump.</p>
+
+ <p>If <c>File</c> is not given, a file dialog will be opened
+ where the crashdump can be selected.</p>
</desc>
</func>
<func>
<name>stop() -> ok</name>
<fsummary>Stop the crashdump_viewer</fsummary>
<desc>
- <p>This function stops the <c>crashdump_viewer</c>.</p>
+ <p>This function stops the <c>crashdump_viewer</c> and closes
+ all GUI windows.</p>
</desc>
</func>
</funcs>
diff --git a/lib/observer/doc/src/crashdump_help.html b/lib/observer/doc/src/crashdump_help.html
deleted file mode 100644
index 268b9495d6..0000000000
--- a/lib/observer/doc/src/crashdump_help.html
+++ /dev/null
@@ -1,307 +0,0 @@
-</<!doctype chapter PUBLIC "-//Stork//DTD chapter//EN">
-<!--
- ``The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved via the world wide web at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson Utvecklings AB.
- Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
- AB. All Rights Reserved.''
-
- $Id$
--->
-<html>
-<head>
-<title>Crashdump Viewer help</title>
-</head>
-<body BGCOLOR="#FFFFFF">
-<center>
-<a HREF="http://www.erlang.se"><img BORDER=0 ALT="[Erlang Systems]"
-SRC="min_head.gif"></a>
-</center>
-<blockquote>
- <h2>Information pages</h2>
-
- <p>Each menu item points to an information page. If no information
- is found for an item, the page will simply say "No information
- found". The reason for not finding any information about an item
- can be that the dump is truncated, that it is a dump from an old
- OTP release in which this item was not written or that the item
- simply wasn't present in the system at the point of failure.
-
- <p>If the dump was truncated, a warning is displayed.
-
- <p>Even if some information about an item exists, there might be
- empty fields if the dump originates from an old OTP release.
-
- <p>The value "-1" in any field means "unknown", and in most cases
- it means that the dump was truncated somewhere around this field.
-
- <p>Only some of the fields in the different information pages are
- described here. These are fields that to not exist in the raw
- crashdump, or in some way differs from the fields in the raw
- crashdump. Details about other field can be found in the user's
- guide for the Erlang runtime system, in the chapter "How to
- interpret the Erlang crash dumps". A link to this chapter can be
- found in the Crashdump Viewer's menu under documentation, and
- there are also direct links from the specific sections below to
- related information in "How to interpret the Erlang crash dumps".
-
- <a NAME="general_info">
- <h3>General information</h3>
-
- <p>This is the first page shown when a new dump is loaded into
- the system. It shows a very short overview of the dump.
-
- <p>'Node name' will only exist in dumps originating from OTP R9C
- and later.
-
- <p>The following fields are not described in the Erlang runtime
- system user's guide:
-
- <dl>
- <dt><strong>Crashdump created on</strong></dt>
- <dd>Time of failure.</dd>
-
- <dt><strong>Memory allocated</strong></dt>
- <dd>The total number of bytes allocated, equivalent to
- <code>c:memory(total)</code>. This will only be present in
- dumps from OTP R9C and later.</dd>
-
- <dt><strong>Memory maximum</strong></dt>
- <dd>The maximum number of bytes that has been allocated
- during the lifetime of the originating node. This will not be
- present in dumps older than OTP R9C, and even in newer
- releases it is only shown if the Erlang runtime system was run
- instrumented.</dd>
-
- <dt><strong>Atoms</strong></dt>
- <dd>If at all available in the dump, this is the total
- number of atoms in the atom table. If the size of the atom
- table is not available, the number of atoms visible in the
- dump is presented.</dd>
-
- <dt><strong>Processes, ETS tables and Funs</strong></dt>
- <dd>The number of processes, ETS tables and funs visible in
- the dump.</dd>
- </dl>
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#general_info>
- More...</a>
- </center>
-
-
- <a NAME="processes">
- <h3>Processes</h3>
-
- <p>The Process Information page shows a list of all processes
- found in the crashdump, including some short information about
- each process. By default the processes are sorted by their
- pids. To sort by other topic, click any heading in the process
- table.
-
- <p>Detailed information about a specific process is shown when
- the pid is clicked.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#processes>
- More...</a>
- </center>
-
-
-
- <a NAME="ports">
- <h3>Ports</h3>
-
- <p>The port information page shows all port information found in
- the dump.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#ports>
- More...</a>
- </center>
-
-
-
- <a NAME="ets_tables"><a NAME="internal_ets_tables">
- <h3>ETS tables</h3>
-
- <p>The ETS table information page shows all ETS table
- information found in the dump. The 'Id' is the same as the
- 'Table' field found in the raw crashdump, and 'Memory' is the
- 'Words' field from the raw crashdump translated into
- bytes. 'Type' is the type of table, and it can be either "hash"
- or "tree". For tree tables there will be no value in the
- 'Bucket' field.
-
- <p>Clicking a pid in the 'Owner' column takes you to the
- detailed information about the process owning the ETS table.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#ets_tables>
- More...</a>
- </center>
-
-
- <a NAME="timers">
- <h3>Timers</h3>
-
- <p>The timer information page shows all timer information found
- in the dump.
-
- <p>Clicking a pid in the 'Owner' column takes you to the
- detailed information about the process owning the timer.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#timers>
- More...</a>
- </center>
-
-
-
- <a NAME="funs">
- <h3>Fun table</h3>
-
- <p>The Fun table information page shows all Fun information
- found in the dump. Fun information will only exist in dumps from
- OTP R8B or later.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#funs>
- More...</a>
- </center>
-
-
-
- <a NAME="atoms">
- <h3>Atoms</h3>
-
- <p>The atoms information page lists all atoms found in the
- dump. The last created atom is listed first.
-
- <p>Note that if the dump is from OTP R8B or earlier, the raw
- dump lists the atoms in the opposite order and the Crashdump
- Viewer reverses them. This means that there is no problem if the
- dump is not truncated. However, if the dump is truncated, the
- last atoms might not be shown at all!!
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#atoms>
- More...</a>
- </center>
-
-
- <a NAME="distribution_info">
- <h3>Distribution information</h3>
-
- <p>The distribution information page shows all distribution
- information found in the dump.
-
- <p>If the page shows "Not alive", it means that the node was not
- distributed.
-
- <p>It the node was distributed, all connected nodes are
- shown. Visible nodes are alive nodes with a living connection to
- the originating node. Hidden nodes are the same as visible
- nodes, except they are started with the "-hidden" flag. Not
- connected nodes are nodes that are not connected to the
- originating node anymore, but references (i.e. process or port
- identitifiers) exist.
-
- <p>'Links/Monitors' may contain information about links or
- monitors between processes on the originating node and the
- connected node.
-
- <p>'Extra Info' may contain debug information (i.e. special
- information written if the emulator is debug compiled) or error
- information.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#distribution_info>
- More...</a>
- </center>
-
-
- <a NAME="loaded_modules">
- <h3>Loaded modules</h3>
-
- <p>The loaded modules information page shows all modules that
- were loaded on the originating node, and the current size of the
- code. If old code exsits, the old size is also shown.
-
- <p>Detailed information about a specific module is shown when
- the module name is clicked.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#loaded_modules>
- More...</a>
- </center>
-
-
- <a NAME="internal_tables">
- <h3>Internal tables</h3>
-
- <p>Internal tables are shown in two information pages: hash
- tables and index tables.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#internal_tables>
- More...</a>
- </center>
-
-
- <a NAME="memory">
- <h3>Memory</h3>
-
- <p>Memory information is divided into three pages.
-
- <p>The first page, <strong>Memory</strong>, shows information
- similar to what you can obtain on a living node with
- <code>c:memory()</code>. This will only be present in dumps from
- OTP R9C and later.
- <a href=/crashdump_erts_doc/crash_dump.html#memory>More...</a>
-
- <p>The <strong>Allocated areas</strong> page shows information
- similar to what you can obtain on a living node with
- <code>erlang:system_info(allocated_areas)</code>.
- <a href=/crashdump_erts_doc/crash_dump.html#allocated_areas>More...</a>
-
- <p>The <strong>Allocator information</strong> page shows
- information about allocators. The contents of the page will vary
- with the version.
- <a href=/crashdump_erts_doc/crash_dump.html#allocator>More...</a>
-
- <center>
-
- </center>
-
-
- <h3>Documentation</h3>
-
- <p>'Crashdump Viewer help' is this document.
-
- <p>'How to interpret Erlang crashdumps' is a document from the
- Erlang runtime system describing details in the raw
- crashdumps. Here you will also find information about each
- single field in the different information pages.
-
-</blockquote>
-<center>
-<hr>
-<font SIZE=-1>
-
-Copyright &copy; 1991-2003
-<a HREF="http://www.erlang.se">Ericsson Utvecklings AB</a><br>
-<!--#include virtual="/ssi/otp_footer.html"-->
-</font>
-</center>
-</body>
-</html>
diff --git a/lib/observer/doc/src/crashdump_ug.xml b/lib/observer/doc/src/crashdump_ug.xml
index 8aef1ffdf0..d22fb4cc40 100644
--- a/lib/observer/doc/src/crashdump_ug.xml
+++ b/lib/observer/doc/src/crashdump_ug.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -13,12 +13,11 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
</legalnotice>
<title>Crashdump Viewer</title>
@@ -31,9 +30,9 @@
<section>
<title>Introduction</title>
- <p>The Crashdump Viewer is an HTML based tool for browsing Erlang
- crashdumps. Crashdump Viewer runs under the WebTool application.
- </p>
+ <p>The Crashdump Viewer is a WxWidgets based tool for browsing
+ Erlang crashdumps.
+ </p>
</section>
<section>
@@ -42,93 +41,357 @@
<p>The easiest way to start Crashdump Viewer is to use the
provided shell script named <c>cdv</c> with the full path to the
erlang crashdump as an argument. The script can be found in the
- priv directory of the <c>observer</c> application. This starts
- WebTool, Crashdump Viewer and a web browser, and loads the given
- file. The browser should then display a page named General
- Information which shows a short summary of the information in
- the crashdump.</p>
-
- <p>The default browser is Internet Explorer on Windows, open on Mac OS X,
- or else Firefox. To use another browser, give the browser's start command
- as the second argument to <c>cdv</c>. If the given browser name is
- not known to Crashdump Viewer, the browser argument is executed as
- a command with the start URL as the only argument.</p>
+ priv directory of the <c>observer</c> application. This starts the
+ Crashdump Viewer GUI and loads the given file. If no file name is
+ given, a file dialog will be opened where the file can be
+ selected.</p>
<p>Under Windows the batch file <c>cdv.bat</c> can be used.</p>
<p>It is also possible to start the Crashdump Viewer from within
an erlang node by calling <seealso
- marker="crashdump_viewer#start/0">crashdump_viewer:start/0</seealso>. This
- will automatically start WebTool and display the web address where
- WebTool can be found. See the documentation for the WebTool
- application for further information about how to use WebTool.</p>
-
- <p>Point your web browser to the address displayed, and you should
- now see the start page of WebTool. At the top of the page, you
- will see a link to "CrashDumpViewer". Click this link to get to
- the start page for Crashdump Viewer. (Note that if webtool is on
- localhost, you must configure your web browser to have direct
- connection to the internet, or you must set no proxy for
- localhost.)
- </p>
- <p>From the start page of Crashdump Viewer, push the "Load
- Crashdump" button to load a crashdump into the tool. Then enter
- the filename of the crashdump in the entry field and push the
- "Ok" button. This will bring you to the General Information
- page, i.e. the same page as the <c>cdv</c> script will open in
- the browser.
- </p>
- <p>Crashdumps generated by OTP R9C and later are loaded directly
- into the Crashdump Viewer, while dumps from earlier releases first
- are translated by the Crashdump Translater. The Crashdump
- Translater creates a new file with the same name as the original
- crashdump, but with the extension <c>.translated</c>. If there is
- no write access to the directory of the original file, you will be
- asked to enter a new path and filename for the translated file.
- </p>
+ marker="crashdump_viewer#start/0">crashdump_viewer:start/0</seealso>
+ or <seealso
+ marker="crashdump_viewer#start/1">crashdump_viewer:start/1</seealso>.</p>
</section>
<section>
- <title>Navigating</title>
- <p>The lefthand frame contains a menu. Menu folders can be
- expanded and collapsed by clicking the folder picture. When a menu
- item is clicked, the item information is shown in the big
- information frame.
- </p>
- <p>The filename frame above the information frame shows the full
- name of the currently viewed Erlang crashdump.
- </p>
- <p>To load a new crashdump, click the "Load New Crashdump" button
- in the menu frame.
- </p>
- <p>The various information shown in the information frame will
- contain links to process identifiers (PIDs) and port
- identifiers. Clicking one of these links will take you to the
- detailed information page for the process or port in question. Use
- the "Back" button in your browser to get back to the
- startingpoint. If the process or port resided on a remote node,
- there will be no information available. Clicking the link will
- then take you to the information about the remote node.
- </p>
+ <title>The graphical interface</title>
+
+ <p>The main window is opened when Crashdump Viewer has loaded a
+ crashdump. It contains a title bar, a menu bar, a number of
+ information panels and a status bar.</p>
+
+ <p>The title bar shows the name of the currently loaded
+ crashdump.</p>
+
+ <p>The menu bar contains a <em>File</em> menu and a <em>Help</em>
+ menu. From the File menu a new crashdump can be loaded or the tool
+ can be terminated. From the Help menu this user's guide and the
+ chapter "How to interpret the Erlang crash dumps" from the user's
+ guide for Erlang runtime system can be opened. "How to interpret
+ the Erlang crash dumps" describes the raw crashdumps in
+ detail. Here you will also find information about each single
+ field in the different information pages. This document can also
+ be found directly in the OTP online documentation, via the Erlang
+ runtime system user's guide.</p>
+
+ <p>The status bar at the bottom of the window will show a warning
+ if the currently loaded dump is truncated.</p>
+
+ <p>The centre area of the main window contains the information
+ panels. Each panel displays information about a specific item or a
+ list of items. A panel is selected by clicking the title of the
+ tab.</p>
+
+ <p>From panels that display lists of items, for example the
+ Processes- or the Ports panel, a new window with further
+ information can be opened by double clicking a row or by right
+ clicking the row and selecting an item from the drop down
+ menu. The new window is called a detail window. Detail windows can
+ be opened for processes, ports, nodes and modules.</p>
+
+ <p>The various information shown in a detail window might contain
+ links to processes or ports. Clicking one of these links will open
+ the detail window for the process or port in question. If the
+ process or port resided on a remote node, there will be no
+ information available. Clicking the link will then pop up a dialog
+ where you can choose whether to open the detail window for the
+ remote node or not.
+ </p>
+
+ <p>Some of the panels contain a left hand menu where sub items of
+ the panel's information area can be selected. Click on one of the
+ rows, and the information will be displayed in the right hand
+ information area.</p>
</section>
<section>
- <title>Help</title>
- <p>Further help on how to use the Crashdump Viewer tool can be
- found in the tool's menu under 'Documentation':
- </p>
- <p>'Crashdump Viewer help' is a short document describing each
- information page and any additional information that might occur,
- compared to the raw dump described in 'How to interpret Erlang
- crashdumps'.
- </p>
- <p>'How to interpret Erlang crashdumps' is a document from the
- Erlang runtime system describing details in the raw
- crashdumps. Here you will also find information about each single
- field in the different information pages. This document can also
- be found directly in the OTP online documentation, via the Erlang
- runtime system user's guide.
- </p>
+ <title>Data content</title>
+
+ <p>Each panel in the main window contains an information
+ page. If no information is found for an item, the page will be
+ empty. The reason for not finding any information about an item
+ can be that the dump is truncated, that it is a dump from an old
+ OTP release in which this item was not written or that the item
+ simply wasn't present in the system at the point of failure.</p>
+
+ <p>If the dump was truncated, a warning is displayed in the
+ status bar of the main window.</p>
+
+ <p>Even if some information about an item exists, there might be
+ empty fields if the dump originates from an old OTP release.</p>
+
+ <p>The value "-1" in any field means "unknown", and in most
+ cases it means that the dump was truncated somewhere around this
+ field.</p>
+
+ <p>The sections below describe some of the fields in the
+ different information panels. These are fields that do not exist
+ in the raw crashdump, or in some way differ from the fields in
+ the raw crashdump. Details about other fields can be found in
+ the user's guide for the Erlang runtime system, in the chapter
+ "How to interpret the Erlang crash dumps". That chapter can also
+ be opened from the Help menu in the Crashdump Viewer's main
+ window, and there are also direct links from the specific
+ sections below to related information in "How to interpret the
+ Erlang crash dumps".</p>
</section>
-</chapter>
+ <section>
+ <marker id="general_info"/>
+ <title>General information</title>
+
+ <p>The <em>General information</em> panel shows a short overview
+ of the dump.</p>
+
+ <p>The following fields are not described in the Erlang runtime
+ system user's guide:</p>
+
+ <taglist>
+ <tag><em>Crashdump created on</em></tag>
+ <item>Time of failure.</item>
+
+ <tag><em>Memory allocated</em></tag>
+ <item>The total number of bytes allocated, equivalent to
+ <c>c:memory(total)</c>.</item>
+
+ <tag><em>Memory maximum</em></tag>
+ <item>The maximum number of bytes that has been allocated during
+ the lifetime of the originating node. This will only be shown if
+ the Erlang runtime system was run instrumented.</item>
+
+ <tag><em>Atoms</em></tag>
+ <item>If available in the dump, this is the total number of
+ atoms in the atom table. If the size of the atom table is not
+ available, the number of atoms visible in the dump is
+ presented.</item>
+
+ <tag><em>Processes, ETS tables and Funs</em></tag>
+ <item>The number of processes, ETS tables and funs visible in
+ the dump.</item>
+ </taglist>
+
+ <p>
+ <seealso marker="erts:crash_dump#general_info">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="processes"/>
+ <title>Processes</title>
+
+ <p>The <em>Processes</em> panel shows a list of all processes
+ found in the crashdump, including some short information about
+ each process. By default the processes are sorted by their
+ pids. To sort by other topic, click the desired column
+ heading.</p>
+
+ <p>The <em>Memory</em> column shows the 'Memory' field which was
+ added to crashdumps in R16B01. This is the total amount of memory
+ used by the process. For crashdumps from earlier releases, this
+ column shows the 'Stack+heap' field. The value shown is always in
+ bytes.</p>
+
+ <p>To view detailed information about a specific process, double
+ click the row in the list or right click the row and select
+ "Properties for &lt;pid&gt;".</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#processes">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="ports"/>
+ <title>Ports</title>
+
+ <p>The <em>Ports</em> panel is similar to the <em>Processes</em>
+ panel, except it lists all ports found in the crashdump.</p>
+
+ <p>To see more details about a specific port, dobule click the row
+ or right click it and select "Properties for &lt;port&gt;". From
+ the right click menu you can also select "Properties for
+ &lt;pid&gt;", where &lt;pid&gt; is the process connected to the
+ port.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#ports">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="ets_tables"/><marker id="internal_ets_tables"/>
+ <title>ETS tables</title>
+
+ <p>The <em>ETS Tables</em> panel shows all ETS table information
+ found in the dump. The 'Id' is the same as the 'Table' field found
+ in the raw crashdump, and 'Memory' is the 'Words' field from the
+ raw crashdump translated into bytes. 'Type' is the type of table,
+ and it can be either "hash" or "tree". For tree tables there will
+ be no value in the 'Bucket' field.</p>
+
+ <p>To open the detailed information page about the owner process
+ of an ETS table, right click the row and select "Properties for
+ &lt;pid&gt;".</p>
+
+ <p>Double clicking a row in the ETS Tables panel has no
+ effect.</p>
+
+ <p>From the left hand menu you can also select to see internal ETS
+ tables.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#ets_tables">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="timers"/>
+ <title>Timers</title>
+
+ <p>The <em>Timers</em> panel shows all timer information found in
+ the dump.</p>
+
+ <p>To open the detailed information page about the owner process
+ of a timer, right click the row and select "Properties for
+ &lt;pid&gt;".</p>
+
+ <p>Double clicking a row in the Timers panel has no effect.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#timers">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="funs"/>
+ <title>Funs</title>
+
+ <p>The <em>Funs</em> panel shows all Fun information found in the
+ dump.</p>
+
+ <p>To open the detailed information page about the module to which
+ the fun belongs, right click the row and select "Properties for
+ &lt;mod&gt;".</p>
+
+ <p>Double clicking a row in the Funs panel has no effect.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#funs">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="atoms"/>
+ <title>Atoms</title>
+
+ <p>The <em>Atoms</em> panel lists all atoms found in the dump. By
+ default the atoms are sorted in creation order from first to
+ last. This is opposite of the raw crashdump where atoms are listed
+ from last to first, meaning that if the dump was truncated in the
+ middle of the atom list only the last created atoms will be seen
+ in the <em>Atoms</em> panel.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#atoms">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="distribution_info"/>
+ <title>Nodes</title>
+
+ <p>The <em>Nodes</em> panel shows a list of all external erlang
+ nodes which are referenced from the crashdump.</p>
+
+ <p>If the page is empty it either means that the crashed node was
+ not distributed, that it was distributed but had no references to
+ other nodes or that the dump was truncated.</p>
+
+ <p>If the node was distributed, all referenced nodes are
+ shown. The column named <em>Connection type</em> shows if the node
+ is visible, hidden or not connected. Visible nodes are alive nodes
+ with a living connection to the originating node. Hidden nodes are
+ the same as visible nodes, except they are started with the
+ <c>-hidden</c> flag. Not connected nodes are nodes that are not
+ connected to the originating node anymore, but references
+ (i.e. process or port identifiers) exist.</p>
+
+ <p>To see more detailed information about a node, double click the
+ row or right click the row and select "Properties for node
+ &lt;node&gt;". From the right click menu you can also select
+ "Properties for &lt;port&gt;", to open the detailed information
+ window for the controlling port.</p>
+
+ <p>In the detailed information window for a node, any exsisting
+ links and monitors between processes on the originating node and
+ the connected node are shown. <em>Extra Info</em> may contain
+ debug information (i.e. special information written if the
+ emulator is debug compiled) or error information.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#distribution_info">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="loaded_modules"/>
+ <title>Loaded modules</title>
+
+ <p>The <em>Modules</em> panel lists all modules that were loaded
+ on the originating node, and the current size of the code. If old
+ code exsits, the old size is also shown.</p>
+
+ <p>To see detailed information about a specific module, double
+ click the row or right click it and select "Properties for
+ &lt;mod&gt;".</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#loaded_modules">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="memory"/>
+ <title>Memory</title>
+
+ <p>The <em>Memory</em> panel shows memory and allocator
+ information. From the left hand menu you can select:</p>
+
+ <p>
+ <list>
+
+ <item><em>Memory</em> <seealso
+ marker="erts:crash_dump#memory">More...</seealso></item>
+
+ <item><em>Allocator Summary</em> - this page presents a
+ summary of values from all allocators below.</item>
+
+ <item><em>&lt;Allocator&gt;</em> - one entry per allocator
+ <seealso
+ marker="erts:crash_dump#allocator">More...</seealso></item>
+
+ <item><em>Allocated Areas</em> <seealso
+ marker="erts:crash_dump#allocated_areas">More...</seealso></item>
+
+ </list>
+ </p>
+ </section>
+
+ <section>
+ <marker id="internal_tables"/>
+ <title>Internal tables</title>
+
+ <p>On the <em>Internal Tables</em> panel you can choose from the
+ left hand menu to see hash tables or index tables.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#internal_tables">More...</seealso>
+ </p>
+ </section>
+</chapter>
diff --git a/lib/observer/doc/src/etop.xml b/lib/observer/doc/src/etop.xml
index af6bb2442b..9f3cdd6de8 100644
--- a/lib/observer/doc/src/etop.xml
+++ b/lib/observer/doc/src/etop.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -38,21 +38,19 @@
<description>
<p><c>etop</c> should be started with the provided scripts
- <c>etop</c> and <c>getop</c> for text based and graphical
- presentation respectively. This will start a hidden erlang node
+ <c>etop</c>. This will start a hidden erlang node
which connects to the node to be measured. The measured node is
given with the <c>-node</c> option. If the measured node has a
different cookie than the default cookie for the user who
invokes the script, the cookie must be explicitly given witht
the <c>-setcookie</c> option.</p>
- <p>Under Windows the batch files <c>etop.bat</c> and
- <c>getop.bat</c> can be used.</p>
+ <p>Under Windows the batch file <c>etop.bat</c> can be used.</p>
<p>The following configuration parameters exist for the
- <c>etop</c> tool. When executing the <c>etop</c> or <c>getop</c>
- scripts, these parameters can be given as command line options,
- e.g. <c>getop -node testnode@myhost -setcookie MyCookie</c>.</p>
+ <c>etop</c> tool. When executing the <c>etop</c> script,
+ these parameters can be given as command line options,
+ e.g. <c>etop -node testnode@myhost -setcookie MyCookie</c>.</p>
<taglist>
<tag>node</tag>
<item>The measured node.
@@ -103,11 +101,6 @@ Value: <c>on | off</c> <br></br>
Default: <c>on</c></item>
</taglist>
- <p>All interaction with <c>etop</c> when running the graphical
- presentation should happen via the menus. For the text based
- presentation the functions described below can be used.
- </p>
-
<p>See the <seealso marker="etop_ug">user's guide</seealso> for
more information about the <c>etop</c> tool.</p>
@@ -118,7 +111,7 @@ Default: <c>on</c></item>
<fsummary>Start etop</fsummary>
<desc>
<p>This function starts <c>etop</c>.
- Note that etop is preferably started with the etop and getop scripts</p>
+ Note that etop is preferably started with the etop script.</p>
</desc>
</func>
<func>
diff --git a/lib/observer/doc/src/etop_5.gif b/lib/observer/doc/src/etop_5.gif
deleted file mode 100644
index 9650176366..0000000000
--- a/lib/observer/doc/src/etop_5.gif
+++ /dev/null
Binary files differ
diff --git a/lib/observer/doc/src/etop_lines.gif b/lib/observer/doc/src/etop_lines.gif
deleted file mode 100644
index 10620a1155..0000000000
--- a/lib/observer/doc/src/etop_lines.gif
+++ /dev/null
Binary files differ
diff --git a/lib/observer/doc/src/etop_main.gif b/lib/observer/doc/src/etop_main.gif
deleted file mode 100644
index 699cb986c8..0000000000
--- a/lib/observer/doc/src/etop_main.gif
+++ /dev/null
Binary files differ
diff --git a/lib/observer/doc/src/etop_opt.gif b/lib/observer/doc/src/etop_opt.gif
deleted file mode 100644
index e420bff7f6..0000000000
--- a/lib/observer/doc/src/etop_opt.gif
+++ /dev/null
Binary files differ
diff --git a/lib/observer/doc/src/etop_ug.xml b/lib/observer/doc/src/etop_ug.xml
index ccbb626465..c57df1d324 100644
--- a/lib/observer/doc/src/etop_ug.xml
+++ b/lib/observer/doc/src/etop_ug.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -39,9 +39,7 @@
<section>
<title>Output</title>
- <p>The output from <c>etop</c> can be graphical or text based.
- </p>
- <p>Text based it looks like this:</p>
+ <p>The output from <c>etop</c> looks like this:</p>
<code type="none"><![CDATA[
========================================================================================
tiger@durin 13:40:32
@@ -63,10 +61,6 @@ Pid Name or Initial Func Time Reds Memory MsgQ Current Func
<127.137.0> net_kernel:do_spawn_ 0 553 5840 0 dbg:do_relay_1/1
========================================================================================
]]></code>
- <p>And graphically it looks like this:</p>
- <image file="etop_main.gif">
- <icaption>Graphical presentation of etop</icaption>
- </image>
<p>The header includes some system information:
</p>
<taglist>
@@ -102,9 +96,7 @@ Pid Name or Initial Func Time Reds Memory MsgQ Current Func
<section>
<title>Start</title>
- <p>To start etop with the graphical presentation, use the script
- <c>getop</c> or the batch file <c>getop.bat</c>, e.g. <c>getop -node tiger@durin</c></p>
- <p>To start etop with the text based presentation use the script
+ <p>To start etop use the script
<c>etop</c> or the batch file <c>etop.bat</c>, e.g. <c>etop -node tiger@durin</c>,
</p>
</section>
@@ -115,30 +107,12 @@ Pid Name or Initial Func Time Reds Memory MsgQ Current Func
<c>-OptName Value</c> to the command line, e.g. <c>etop -node tiger@durin -setcookie mycookie -lines 15</c>.
</p>
<p>The parameters <c>lines</c>, <c>interval</c>, <c>accumulate</c>
- and <c>sort</c> can be changed during runtime. Use the
- <em>Options</em> menu with the graphical presentation or the
- function <c>etop:config/2</c> with the text based presentation.
+ and <c>sort</c> can be changed during runtime by the
+ function <c>etop:config/2</c>.
</p>
<p>A list of all valid configuration parameters can be found in
the reference manual for <c>etop</c>.
</p>
- <p>Note that it is even possible to change which information to
- sort by by clicking the header line of the table in the graphical
- presentation.
- </p>
-
- <section>
- <title>Example: Change configuration with graphical presentation</title>
- <image file="etop_opt.gif">
- <icaption>Select the option to change from the Options menu.</icaption>
- </image>
- <image file="etop_lines.gif">
- <icaption>Enter the new value in the popup window and click "Ok"</icaption>
- </image>
- <image file="etop_5.gif">
- <icaption>The interface is updated with the new configuration</icaption>
- </image>
- </section>
<section>
<title>Example: Change configuration with text based presentation</title>
@@ -187,18 +161,14 @@ Pid Name or Initial Func Time Reds Memory MsgQ Current Func
<section>
<title>Print to file</title>
<p>At any time, the current <c>etop</c> display can be dumped to a
- text file. Use <em>Dump to file</em> on the <em>File</em> menu
- with the graphical presentation or the function <c>etop:dump/1</c>
- with the text based presentation.
+ text file with the function <c>etop:dump/1</c>.
</p>
</section>
<section>
<title>Stop</title>
- <p>To stop <c>etop</c>, use <em>Exit</em> on the <em>File</em>
- menu for the graphical presentation, or the function
- <c>etop:stop/0</c> with the text based presentation.
- </p>
+ <p>Use the function <c>etop:stop/0</c> to stop <c>etop</c>.
+ </p>
</section>
</chapter>
diff --git a/lib/observer/doc/src/fascicules.xml b/lib/observer/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/observer/doc/src/fascicules.xml
+++ b/lib/observer/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/observer/doc/src/notes.xml b/lib/observer/doc/src/notes.xml
index 9de00b8c16..a9ec68fc9e 100644
--- a/lib/observer/doc/src/notes.xml
+++ b/lib/observer/doc/src/notes.xml
@@ -31,6 +31,137 @@
<p>This document describes the changes made to the Observer
application.</p>
+<section><title>Observer 2.0.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix crash when opening a process information window.</p>
+ <p>
+ Own Id: OTP-12634</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Observer 2.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A note saying only R15B nodes can be observed is removed
+ from the user guide.</p>
+ <p>
+ Own Id: OTP-12078</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Observer 2.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed statusbar on Windows</p>
+ <p>
+ Own Id: OTP-12162</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Observer 2.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ crashdump_viewer would crash if the owner of a timer was
+ specified as the process' registered name. This has been
+ corrected.</p>
+ <p>
+ Own Id: OTP-11919</p>
+ </item>
+ <item>
+ <p>
+ Fix crash and minor updates.</p>
+ <p>
+ Own Id: OTP-11949</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Observer 2.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ etop trace handler now works in smp environment (Thanks
+ to Péter Gömöri)</p>
+ <p>
+ Own Id: OTP-11633</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ The <c>crashdump_viewer</c> is re-written using
+ <c>wx</c>. The old <c>webtool</c> interface for
+ <c>crashdump_viewer</c> does no longer exist.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11179</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Observer 1.3.1.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/observer/doc/src/notes_history.xml b/lib/observer/doc/src/notes_history.xml
index 2300983131..55e965022c 100644
--- a/lib/observer/doc/src/notes_history.xml
+++ b/lib/observer/doc/src/notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/observer.xml b/lib/observer/doc/src/observer.xml
index 03830f2b1c..315301e2c8 100644
--- a/lib/observer/doc/src/observer.xml
+++ b/lib/observer/doc/src/observer.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2011</year>
+ <year>2011</year><year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/observer_app.xml b/lib/observer/doc/src/observer_app.xml
index e643568a39..e4790ce98c 100644
--- a/lib/observer/doc/src/observer_app.xml
+++ b/lib/observer/doc/src/observer_app.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/observer_ug.xml b/lib/observer/doc/src/observer_ug.xml
index 569d72e71e..62f99c5210 100644
--- a/lib/observer/doc/src/observer_ug.xml
+++ b/lib/observer/doc/src/observer_ug.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2011</year>
+ <year>2011</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -54,9 +54,6 @@
impact only the active viewer is updated and the other
views will be updated when activated.
</p>
- <note>
- <p>Only R15B nodes can be observed.</p>
- </note>
<p> In general the mouse buttons behaves as expected, use left click
to select objects, right click to pop up a menu with most used
diff --git a/lib/observer/doc/src/part.xml b/lib/observer/doc/src/part.xml
index 0d6aad09f2..c05f9bdf9c 100644
--- a/lib/observer/doc/src/part.xml
+++ b/lib/observer/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/part_notes.xml b/lib/observer/doc/src/part_notes.xml
index cd659395af..a900779e2f 100644
--- a/lib/observer/doc/src/part_notes.xml
+++ b/lib/observer/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/part_notes_history.xml b/lib/observer/doc/src/part_notes_history.xml
index 1ba0875fec..8f13861bb9 100644
--- a/lib/observer/doc/src/part_notes_history.xml
+++ b/lib/observer/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/ref_man.xml b/lib/observer/doc/src/ref_man.xml
index c33ce74141..c3805b2d86 100644
--- a/lib/observer/doc/src/ref_man.xml
+++ b/lib/observer/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -38,5 +38,6 @@
<xi:include href="ttb.xml"/>
<xi:include href="etop.xml"/>
<xi:include href="crashdump.xml"/>
+ <xi:include href="cdv.xml"/>
</application>
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml
index 1453bbdf10..6e60a9cb3b 100644
--- a/lib/observer/doc/src/ttb.xml
+++ b/lib/observer/doc/src/ttb.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/doc/src/ttb_ug.xml b/lib/observer/doc/src/ttb_ug.xml
index 402d079c2c..a1740b618e 100644
--- a/lib/observer/doc/src/ttb_ug.xml
+++ b/lib/observer/doc/src/ttb_ug.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/observer/priv/bin/getop b/lib/observer/priv/bin/getop
deleted file mode 100755
index 5cd9bf3d76..0000000000
--- a/lib/observer/priv/bin/getop
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-NAME="etop"
-erl -sname $NAME -noinput -hidden -s etop -s erlang halt $@
diff --git a/lib/observer/priv/bin/getop.bat b/lib/observer/priv/bin/getop.bat
deleted file mode 100644
index 8b6f108f06..0000000000
--- a/lib/observer/priv/bin/getop.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-CALL werl -sname etop -noinput -hidden -s etop -s erlang halt %*
diff --git a/lib/observer/priv/erlang_observer.png b/lib/observer/priv/erlang_observer.png
index 01723d210b..cf900a29e6 100644
--- a/lib/observer/priv/erlang_observer.png
+++ b/lib/observer/priv/erlang_observer.png
Binary files differ
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
index 42f5c19935..c120865213 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
@@ -36,15 +36,33 @@ RELSYSDIR = $(RELEASE_PATH)/lib/observer-$(VSN)
MODULES= \
crashdump_viewer \
- crashdump_viewer_html \
+ cdv_atom_cb \
+ cdv_bin_cb \
+ cdv_detail_wx \
+ cdv_dist_cb \
+ cdv_ets_cb \
+ cdv_fun_cb \
+ cdv_gen_cb \
+ cdv_html_wx \
+ cdv_info_wx \
+ cdv_int_tab_cb \
+ cdv_mem_cb \
+ cdv_mod_cb \
+ cdv_multi_wx \
+ cdv_port_cb \
+ cdv_proc_cb \
+ cdv_table_wx \
+ cdv_term_cb \
+ cdv_timer_cb \
+ cdv_virtual_list_wx \
+ cdv_wx \
etop \
- etop_gui \
etop_tr \
etop_txt \
observer \
observer_app_wx \
+ observer_html_lib \
observer_lib \
- observer_wx \
observer_perf_wx \
observer_pro_wx \
observer_procinfo \
@@ -53,6 +71,7 @@ MODULES= \
observer_traceoptions_wx \
observer_tv_table \
observer_tv_wx \
+ observer_wx \
ttb \
ttb_et
@@ -72,13 +91,12 @@ PRIVDIR= ../priv
WEBTOOLFILES= $(PRIVDIR)/crashdump_viewer.tool $(PRIVDIR)/erlang_observer.png
BINDIR= $(PRIVDIR)/bin
ifeq ($(findstring win32,$(TARGET)),win32)
-WIN32_EXECUTABLES= $(BINDIR)/etop.bat $(BINDIR)/getop.bat $(BINDIR)/cdv.bat
+WIN32_EXECUTABLES= $(BINDIR)/etop.bat $(BINDIR)/cdv.bat
else
WIN32_EXECUTABLES=
endif
EXECUTABLES= \
$(BINDIR)/etop \
- $(BINDIR)/getop \
$(BINDIR)/cdv \
$(WIN32_EXECUTABLES)
CDVDIR= $(PRIVDIR)/crashdump_viewer
diff --git a/lib/observer/src/cdv_atom_cb.erl b/lib/observer/src/cdv_atom_cb.erl
new file mode 100644
index 0000000000..46fce81b52
--- /dev/null
+++ b/lib/observer/src/cdv_atom_cb.erl
@@ -0,0 +1,48 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_atom_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_ATOM, ?COL_ID+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(Id) -> Id+1.
+
+col_spec() ->
+ [{"Creation order", ?wxLIST_FORMAT_CENTER, 100},
+ {"Atom", ?wxLIST_FORMAT_LEFT, 100}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:atoms(),
+ {Info,TW}.
+
+format({Bin,q}) when is_binary(Bin) ->
+ [$'|binary_to_list(Bin)];
+format({Bin,nq}) when is_binary(Bin) ->
+ lists:flatten(io_lib:format("~ts",[Bin]));
+format(D) ->
+ D.
diff --git a/lib/observer/src/cdv_bin_cb.erl b/lib/observer/src/cdv_bin_cb.erl
new file mode 100644
index 0000000000..d5fbceff1e
--- /dev/null
+++ b/lib/observer/src/cdv_bin_cb.erl
@@ -0,0 +1,82 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_bin_cb).
+
+-export([get_details/1,
+ detail_pages/0]).
+
+%% Callbacks for cdv_detail_wx
+get_details({Type, {T,Key}}) ->
+ [{Key,Term}] = ets:lookup(T,Key),
+ {ok,{"Expanded Binary", {Type, Term}, []}};
+get_details({cdv, Id}) ->
+ {ok,Bin} = crashdump_viewer:expand_binary(Id),
+ {ok,{"Expanded Binary", {cvd, Bin}, []}}.
+
+detail_pages() ->
+ [{"Binary", fun init_bin_page/2}].
+
+init_bin_page(Parent,{Type,Bin}) ->
+ cdv_multi_wx:start_link(
+ Parent,
+ [{"Format \~p",cdv_html_wx,{Type,format_bin_fun("~p",Bin)}},
+ {"Format \~tp",cdv_html_wx,{Type,format_bin_fun("~tp",Bin)}},
+ {"Format \~w",cdv_html_wx,{Type,format_bin_fun("~w",Bin)}},
+ {"Format \~s",cdv_html_wx,{Type,format_bin_fun("~s",Bin)}},
+ {"Format \~ts",cdv_html_wx,{Type,format_bin_fun("~ts",Bin)}},
+ {"Hex",cdv_html_wx,{Type,hex_binary_fun(Bin)}},
+ {"Term",cdv_html_wx,{Type,binary_to_term_fun(Bin)}}]).
+
+format_bin_fun(Format,Bin) ->
+ fun() ->
+ try io_lib:format(Format,[Bin]) of
+ Str -> plain_html(lists:flatten(Str))
+ catch error:badarg ->
+ Warning = "This binary can not be formatted with " ++ Format,
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+binary_to_term_fun(Bin) ->
+ fun() ->
+ try binary_to_term(Bin) of
+ Term -> plain_html(io_lib:format("~p",[Term]))
+ catch error:badarg ->
+ Warning = "This binary can not be coverted to an Erlang term",
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+-define(line_break,25).
+hex_binary_fun(Bin) ->
+ fun() ->
+ S = "<<" ++ format_hex(Bin,?line_break) ++ ">>",
+ plain_html(io_lib:format("~s",[S]))
+ end.
+
+format_hex(<<B1:4,B2:4>>,_) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16)];
+format_hex(<<B1:4,B2:4,Bin/binary>>,0) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16),$,,$\n,$\s,$\s
+ | format_hex(Bin,?line_break)];
+format_hex(<<B1:4,B2:4,Bin/binary>>,N) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16),$,
+ | format_hex(Bin,N-1)].
+
+plain_html(Text) ->
+ observer_html_lib:plain_page(Text).
diff --git a/lib/observer/src/cdv_detail_wx.erl b/lib/observer/src/cdv_detail_wx.erl
new file mode 100644
index 0000000000..dc93507a36
--- /dev/null
+++ b/lib/observer/src/cdv_detail_wx.erl
@@ -0,0 +1,158 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_detail_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/3]).
+
+-export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3,
+ handle_call/3, handle_info/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+-include("observer_defs.hrl").
+
+-record(state, {parent,
+ frame,
+ id,
+ pages=[]
+ }).
+
+%% Defines
+-define(ID_NOTEBOOK, 604).
+
+%% Detail view
+start_link(Id, ParentFrame, Callback) ->
+ wx_object:start_link(?MODULE, [Id, ParentFrame, Callback, self()], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([Id, ParentFrame, Callback, Parent]) ->
+ case Callback:get_details(Id) of
+ {ok,Details} ->
+ init(Id,ParentFrame,Callback,Parent,Details);
+ {yes_no, Info, Fun} ->
+ case observer_lib:display_yes_no_dialog(Info) of
+ ?wxID_YES -> Fun();
+ ?wxID_NO -> ok
+ end,
+ {stop,normal};
+ {info,Info} ->
+ observer_lib:display_info_dialog(Info),
+ {stop,normal}
+ end.
+
+init(Id,ParentFrame,Callback,Parent,{Title,Info,TW}) ->
+ Frame=wxFrame:new(ParentFrame, ?wxID_ANY, [Title],
+ [{style, ?wxDEFAULT_FRAME_STYLE}, {size, {850,600}}]),
+ MenuBar = wxMenuBar:new(),
+ create_menus(MenuBar),
+ wxFrame:setMenuBar(Frame, MenuBar),
+
+ Panel = wxPanel:new(Frame, []),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ {InfoPanel,Pages} = create_pages(Panel,Callback:detail_pages(),[Info]),
+ wxSizer:add(Sizer, InfoPanel, [{proportion, 1}, {flag, ?wxEXPAND}]),
+
+ case TW of
+ [] ->
+ undefined;
+ _ ->
+ StatusBar = observer_lib:create_status_bar(Panel),
+ wxSizer:add(Sizer, StatusBar, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 0},
+ {border,4}]),
+ wxTextCtrl:writeText(StatusBar, TW),
+ StatusBar
+ end,
+
+ wxPanel:setSizer(Panel, Sizer),
+
+ wxFrame:connect(Frame, close_window),
+ wxMenu:connect(Frame, command_menu_selected),
+ wxFrame:show(Frame),
+ {Frame, #state{parent=Parent,
+ id=Id,
+ frame=Frame,
+ pages=Pages
+ }}.
+
+create_pages(Panel,[{_PageTitle,Fun}],FunArgs) ->
+ %% Only one page - don't create notebook
+ Page = init_panel(Panel, Fun, FunArgs),
+ {Page,[Page]};
+create_pages(Panel,PageSpecs,FunArgs) ->
+ Notebook = wxNotebook:new(Panel, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
+ Pages = [init_tab(Notebook, PageTitle, Fun, FunArgs)
+ || {PageTitle,Fun} <- PageSpecs],
+ {Notebook, Pages}.
+
+init_tab(Notebook,Title,Fun,FunArgs) ->
+ Panel = init_panel(Notebook,Fun,FunArgs),
+ true = wxNotebook:addPage(Notebook, Panel, Title),
+ Panel.
+
+init_panel(ParentWin, Fun, FunArgs) ->
+ Panel = wxScrolledWindow:new(ParentWin),
+ wxScrolledWindow:enableScrolling(Panel,true,true),
+ wxScrolledWindow:setScrollbars(Panel,1,1,0,0),
+ Sizer = wxBoxSizer:new(?wxHORIZONTAL),
+ Window = apply(Fun, [Panel | FunArgs]),
+ wxSizer:add(Sizer, Window, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1},
+ {border, 5}]),
+ wxPanel:setSizer(Panel, Sizer),
+ Panel.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Callbacks%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+handle_event(#wx{event=#wxClose{type=close_window}}, State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id=?wxID_CLOSE, event=#wxCommand{type=command_menu_selected}},
+ State) ->
+ {stop, normal, State};
+
+handle_event(Event, _State) ->
+ error({unhandled_event, Event}).
+
+handle_info(_Info, State) ->
+ %% io:format("~p: ~p, Handle info: ~p~n", [?MODULE, ?LINE, _Info]),
+ {noreply, State}.
+
+handle_call(Call, From, _State) ->
+ error({unhandled_call, Call, From}).
+
+handle_cast(Cast, _State) ->
+ error({unhandled_cast, Cast}).
+
+terminate(_Reason, #state{parent=Parent,id=Id,frame=Frame}) ->
+ wx_object:cast(Parent,{detail_win_closed, Id}),
+ case Frame of
+ undefined -> ok;
+ _ -> wxFrame:destroy(Frame)
+ end,
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+create_menus(MenuBar) ->
+ Menus = [{"File", [#create_menu{id=?wxID_CLOSE, text="Close"}]}],
+ observer_lib:create_menus(Menus, MenuBar, new_window).
diff --git a/lib/observer/src/cdv_dist_cb.erl b/lib/observer/src/cdv_dist_cb.erl
new file mode 100644
index 0000000000..f7e6c9aded
--- /dev/null
+++ b/lib/observer/src/cdv_dist_cb.erl
@@ -0,0 +1,97 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_dist_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_NAME, 0).
+-define(COL_TYPE, ?COL_NAME+1).
+-define(COL_CTRL, ?COL_TYPE+1).
+-define(COL_CH, ?COL_CTRL+1).
+-define(COL_CRE, ?COL_CH+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_CH);
+col_to_elem(?COL_NAME) -> #nod.name;
+col_to_elem(?COL_CH) -> #nod.channel;
+col_to_elem(?COL_CTRL) -> #nod.controller;
+col_to_elem(?COL_CRE) -> #nod.creation;
+col_to_elem(?COL_TYPE) -> #nod.conn_type.
+
+col_spec() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 300},
+ {"Connection type", ?wxLIST_FORMAT_LEFT, 130},
+ {"Controller", ?wxLIST_FORMAT_LEFT, 130},
+ {"Channel", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Creation", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:dist_info(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_CH,?COL_CTRL],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:node_info(Id) of
+ {ok,Info,TW} ->
+ Proplist = crashdump_viewer:to_proplist(record_info(fields,nod),Info),
+ Title = io_lib:format("~s (~s)",[Info#nod.name,Id]),
+ {ok,{Title,Proplist,TW}};
+ {error,not_found} ->
+ Info = "The node you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+format({creations,Creations}) ->
+ string:join([integer_to_list(C) || C <- Creations],",");
+format(D) ->
+ D.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", name},
+ {"Type", conn_type},
+ {"Channel", channel},
+ {"Controller", {click,controller}},
+ {"Creation", {{format,fun format/1},creation}},
+ {"Extra Info", error}]},
+ {scroll_boxes,
+ [{"Remote Links",1,{click,remote_links}},
+ {"Remote Monitors",1,{click,remote_mon}},
+ {"Remote Monitored By",1,{click,remote_mon_by}}]}].
diff --git a/lib/observer/src/cdv_ets_cb.erl b/lib/observer/src/cdv_ets_cb.erl
new file mode 100644
index 0000000000..2a5c170e58
--- /dev/null
+++ b/lib/observer/src/cdv_ets_cb.erl
@@ -0,0 +1,67 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_ets_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_NAME, ?COL_ID+1).
+-define(COL_SLOT, ?COL_NAME+1).
+-define(COL_OWNER, ?COL_SLOT+1).
+-define(COL_BUCK, ?COL_OWNER+1).
+-define(COL_OBJ, ?COL_BUCK+1).
+-define(COL_MEM, ?COL_OBJ+1).
+-define(COL_TYPE, ?COL_MEM+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #ets_table.id;
+col_to_elem(?COL_NAME) -> #ets_table.name;
+col_to_elem(?COL_SLOT) -> #ets_table.slot;
+col_to_elem(?COL_OWNER) -> #ets_table.pid;
+col_to_elem(?COL_TYPE) -> #ets_table.type;
+col_to_elem(?COL_BUCK) -> #ets_table.buckets;
+col_to_elem(?COL_OBJ) -> #ets_table.size;
+col_to_elem(?COL_MEM) -> #ets_table.memory.
+
+col_spec() ->
+ [{"Id", ?wxLIST_FORMAT_LEFT, 200},
+ {"Name", ?wxLIST_FORMAT_LEFT, 200},
+ {"Slot", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Owner", ?wxLIST_FORMAT_CENTRE, 90},
+ {"Buckets", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Objects", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Type", ?wxLIST_FORMAT_LEFT, 50}
+ ].
+
+get_info(Owner) ->
+ {ok,Info,TW} = crashdump_viewer:ets_tables(Owner),
+ {Info,TW}.
+
+get_detail_cols(all) ->
+ {[?COL_OWNER],false};
+get_detail_cols(_) ->
+ {[],false}.
diff --git a/lib/observer/src/cdv_fun_cb.erl b/lib/observer/src/cdv_fun_cb.erl
new file mode 100644
index 0000000000..689ef0e3bb
--- /dev/null
+++ b/lib/observer/src/cdv_fun_cb.erl
@@ -0,0 +1,58 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_fun_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_MOD, 0).
+-define(COL_UNIQ, ?COL_MOD+1).
+-define(COL_INDEX, ?COL_UNIQ+1).
+-define(COL_ADDR, ?COL_INDEX+1).
+-define(COL_NADDR, ?COL_ADDR+1).
+-define(COL_REFC, ?COL_NADDR+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_MOD);
+col_to_elem(?COL_MOD) -> #fu.module;
+col_to_elem(?COL_UNIQ) -> #fu.uniq;
+col_to_elem(?COL_INDEX) -> #fu.index;
+col_to_elem(?COL_ADDR) -> #fu.address;
+col_to_elem(?COL_NADDR) -> #fu.native_address;
+col_to_elem(?COL_REFC) -> #fu.refc.
+
+col_spec() ->
+ [{"Module", ?wxLIST_FORMAT_LEFT, 200},
+ {"Uniq", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Index", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Address", ?wxLIST_FORMAT_LEFT, 120},
+ {"Native Address", ?wxLIST_FORMAT_LEFT, 120},
+ {"Refc", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:funs(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_MOD],false}.
diff --git a/lib/observer/src/cdv_gen_cb.erl b/lib/observer/src/cdv_gen_cb.erl
new file mode 100644
index 0000000000..6be717d76d
--- /dev/null
+++ b/lib/observer/src/cdv_gen_cb.erl
@@ -0,0 +1,45 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_gen_cb).
+
+-export([get_info/0]).
+
+-include("crashdump_viewer.hrl").
+
+get_info() ->
+ {ok,Info,TW} = crashdump_viewer:general_info(),
+ Fields = info_fields(),
+ Proplist =
+ crashdump_viewer:to_proplist(record_info(fields,general_info),Info),
+ {Fields,Proplist,TW}.
+
+info_fields() ->
+ [{"General Information",
+ [{"Slogan",slogan},
+ {"Node name",node_name},
+ {"Crashdump created on",created},
+ {"System version",system_vsn},
+ {"Compiled",compile_time},
+ {"Taints",taints},
+ {"Memory allocated",{bytes,mem_tot}},
+ {"Memory maximum",{bytes,mem_max}},
+ {"Atoms",num_atoms},
+ {"Processes",num_procs},
+ {"ETS tables",num_ets},
+ {"Timers",num_timers},
+ {"Funs",num_fun}]}].
diff --git a/lib/observer/src/cdv_html_wx.erl b/lib/observer/src/cdv_html_wx.erl
new file mode 100644
index 0000000000..b79c647f63
--- /dev/null
+++ b/lib/observer/src/cdv_html_wx.erl
@@ -0,0 +1,136 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_html_wx).
+
+-behaviour(wx_object).
+
+-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_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {panel,
+ app, %% which tool is the user
+ expand_table,
+ expand_wins=[]}).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, {App, Fun}]) when is_function(Fun) ->
+ init([ParentWin, {App, Fun()}]);
+init([ParentWin, {expand,HtmlText,Tab}]) ->
+ init(ParentWin, HtmlText, Tab, cdv);
+init([ParentWin, {App, {expand,HtmlText,Tab}}]) ->
+ init(ParentWin, HtmlText, Tab, App);
+init([ParentWin, {App,HtmlText}]) ->
+ init(ParentWin, HtmlText, undefined, App);
+init([ParentWin, HtmlText]) ->
+ init(ParentWin, HtmlText, undefined, cdv).
+
+init(ParentWin, HtmlText, Tab, App) ->
+ HtmlWin = observer_lib:html_window(ParentWin),
+ wxHtmlWindow:setPage(HtmlWin,HtmlText),
+ {HtmlWin, #state{panel=HtmlWin,expand_table=Tab,app=App}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast({detail_win_closed, Id},#state{expand_wins=Opened0}=State) ->
+ Opened = lists:keydelete(Id, 1, Opened0),
+ {noreply, State#state{expand_wins=Opened}};
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxHtmlLink{type=command_html_link_clicked,
+ linkInfo=#wxHtmlLinkInfo{href=Target}}},
+ #state{expand_table=Tab, app=App}=State) ->
+ NewState=
+ case Target of
+ "#Binary?" ++ BinSpec ->
+ [{"offset",Off},{"size",Size},{"pos",Pos}] =
+ httpd:parse_query(BinSpec),
+ Id = {cdv, {list_to_integer(Off),
+ list_to_integer(Size),
+ list_to_integer(Pos)}},
+ expand(Id,cdv_bin_cb,State);
+ "#OBSBinary?" ++ BinSpec ->
+ [{"key1",Preview},{"key2",Size},{"key3",Hash}] =
+ httpd:parse_query(BinSpec),
+ Id = {obs, {Tab, {list_to_integer(Preview),
+ list_to_integer(Size),
+ list_to_integer(Hash)}}},
+ expand(Id,cdv_bin_cb,State);
+ "#Term?" ++ TermKeys ->
+ [{"key1",Key1},{"key2",Key2},{"key3",Key3}] =
+ httpd:parse_query(TermKeys),
+ Id = {cdv, {Tab,{list_to_integer(Key1),
+ list_to_integer(Key2),
+ list_to_integer(Key3)}}},
+ expand(Id,cdv_term_cb,State);
+ _ when App =:= obs ->
+ observer ! {open_link, Target};
+ _ ->
+ cdv_virtual_list_wx:start_detail_win(Target),
+ State
+ end,
+ {noreply, NewState};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+expand(Id,Callback,#state{expand_wins=Opened0}=State) ->
+ Opened =
+ case lists:keyfind(Id,1,Opened0) of
+ false ->
+ EW = cdv_detail_wx:start_link(Id,State#state.panel,Callback),
+ wx_object:get_pid(EW) ! active,
+ [{Id,EW}|Opened0];
+ {_,EW} ->
+ wxFrame:raise(EW),
+ Opened0
+ end,
+ State#state{expand_wins=Opened}.
diff --git a/lib/observer/src/cdv_info_wx.erl b/lib/observer/src/cdv_info_wx.erl
new file mode 100644
index 0000000000..59ce0cabb1
--- /dev/null
+++ b/lib/observer/src/cdv_info_wx.erl
@@ -0,0 +1,128 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_info_wx).
+
+-behaviour(wx_object).
+
+-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_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {panel,
+ sizer,
+ fpanel,
+ callback,
+ trunc_warn=[]
+ }).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, Callback]) when is_atom(Callback) ->
+ {InfoFields,Info,TW} = Callback:get_info(),
+ {Panel,Sizer,FPanel} = create_box(ParentWin,InfoFields,Info),
+ {Panel,#state{panel=Panel,
+ sizer=Sizer,
+ fpanel=FPanel,
+ callback=Callback,
+ trunc_warn=TW}};
+
+init([ParentWin, {InfoFields,Info,TW}]) ->
+ {Panel,Sizer,FPanel} = create_box(ParentWin,InfoFields,Info),
+ {Panel, #state{panel=Panel,
+ sizer=Sizer,
+ fpanel=FPanel,
+ trunc_warn=TW}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From, #state{callback=Callback,panel=Panel,
+ sizer=Sizer,fpanel=FPanel} = State) ->
+ {InfoFields,Info,TW} = Callback:get_info(),
+ NewFPanel =
+ wx:batch(
+ fun() ->
+ wxWindow:destroy(FPanel),
+ FP = create_field_panel(Panel,Sizer,InfoFields,Info),
+ wxSizer:layout(Sizer),
+ FP
+ end),
+ {reply, ok, State#state{fpanel=NewFPanel,trunc_warn=TW}};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxMouse{type=left_down},userData=Target}, State) ->
+ cdv_virtual_list_wx:start_detail_win(Target),
+ {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) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+create_box(ParentWin,InfoFields,Info) ->
+ Panel = wxPanel:new(ParentWin),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ FPanel = create_field_panel(Panel,Sizer,InfoFields,Info),
+ wxPanel:setSizer(Panel, Sizer),
+ {Panel,Sizer,FPanel}.
+
+create_field_panel(Panel,Sizer,InfoFields,Info0) ->
+ Info = observer_lib:fill_info(InfoFields, Info0),
+ {FPanel, _FSizer, _Fields} = observer_lib:display_info(Panel,Info),
+ BorderFlags = ?wxLEFT bor ?wxRIGHT,
+ wxSizer:add(Sizer, FPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 0}, {border, 5}]),
+ FPanel.
diff --git a/lib/observer/src/cdv_int_tab_cb.erl b/lib/observer/src/cdv_int_tab_cb.erl
new file mode 100644
index 0000000000..31727391fe
--- /dev/null
+++ b/lib/observer/src/cdv_int_tab_cb.erl
@@ -0,0 +1,86 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_int_tab_cb).
+
+-export([get_info/0]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+get_info() ->
+ observer_lib:report_progress({ok,"Processing internal tables"}),
+ HashInfo = get_hash_info(),
+ observer_lib:report_progress({ok,33}),
+ IndexInfo = get_index_info(),
+ observer_lib:report_progress({ok,66}),
+ IntEtsInfo = get_internal_ets_info(),
+ observer_lib:report_progress({ok,100}),
+ [{"Hash Tables",cdv_table_wx,HashInfo},
+ {"Index Tables",cdv_table_wx,IndexInfo},
+ {"Internal ETS Tables",cdv_table_wx,IntEtsInfo}].
+
+%%%-----------------------------------------------------------------
+%%% Hash tables
+get_hash_info() ->
+ {ok,Info0,TW} = crashdump_viewer:hash_tables(),
+ Columns = hash_columns(),
+ Info = [crashdump_viewer:to_value_list(R) || R <- Info0],
+ {Columns,Info,TW}.
+
+hash_columns() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Size", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Used", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Objects",?wxLIST_FORMAT_RIGHT, 100},
+ {"Depth", ?wxLIST_FORMAT_RIGHT, 100}].
+
+%%%-----------------------------------------------------------------
+%%% Index tables
+get_index_info() ->
+ {ok,Info0,TW} = crashdump_viewer:index_tables(),
+ Columns = index_columns(),
+ Info = [crashdump_viewer:to_value_list(R) || R <- Info0],
+ {Columns,Info,TW}.
+
+index_columns() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Size", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Limit", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Used", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Rate", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Entries",?wxLIST_FORMAT_RIGHT, 100}].
+
+%%%-----------------------------------------------------------------
+%%% Internal ets tables
+get_internal_ets_info() ->
+ {ok,Info0,TW} = crashdump_viewer:internal_ets_tables(),
+ Columns = int_ets_columns(),
+ Info = [begin
+ [_,_|Data] = crashdump_viewer:to_value_list(R), %skip pid and slot
+ [Desc|Data]
+ end || {Desc,R} <- Info0],
+ {Columns,Info,TW}.
+
+int_ets_columns() ->
+ [{"Description", ?wxLIST_FORMAT_LEFT, 170},
+ {"Id", ?wxLIST_FORMAT_LEFT, 80},
+ {"Name", ?wxLIST_FORMAT_LEFT, 80},
+ {"Type", ?wxLIST_FORMAT_LEFT, 80},
+ {"Buckets", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Objects", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80}].
diff --git a/lib/observer/src/cdv_mem_cb.erl b/lib/observer/src/cdv_mem_cb.erl
new file mode 100644
index 0000000000..2b0809df13
--- /dev/null
+++ b/lib/observer/src/cdv_mem_cb.erl
@@ -0,0 +1,84 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_mem_cb).
+
+-export([get_info/0]).
+
+-include("crashdump_viewer.hrl").
+-include_lib("wx/include/wx.hrl").
+
+get_info() ->
+ observer_lib:report_progress({ok,"Processing memory info"}),
+ MemInfo = get_mem_info(),
+ observer_lib:report_progress({ok,33}),
+ {AllocInfo,AllocTW} = get_alloc_info(),
+ observer_lib:report_progress({ok,66}),
+ AreaInfo = get_area_info(),
+ observer_lib:report_progress({ok,100}),
+ [{"Memory",cdv_info_wx,MemInfo}
+ | [{Title,cdv_table_wx,{Cols,Data,AllocTW}} ||
+ {Title,Cols,Data} <- AllocInfo]] ++
+ [{"Allocated Areas",cdv_table_wx,AreaInfo}].
+
+
+%%%-----------------------------------------------------------------
+%%% Memory page
+get_mem_info() ->
+ {ok,Info,TW} = crashdump_viewer:memory(),
+ {[{"Memory Information",gen_mem_info_fields(Info)}],Info,TW}.
+
+gen_mem_info_fields([{Key,_}|T]) ->
+ [{upper(atom_to_list(Key)),{bytes,Key}}|gen_mem_info_fields(T)];
+gen_mem_info_fields([]) ->
+ [].
+
+upper(Key) ->
+ string:join([string:to_upper([H]) ++ T ||
+ [H|T] <- string:tokens(Key,"_")]," ").
+
+
+%%%-----------------------------------------------------------------
+%%% Allocated areas page
+get_area_info() ->
+ {ok,Info0,TW} = crashdump_viewer:allocated_areas(),
+ Info = [tuple_to_list(R) || R <- Info0],
+ {area_columns(),Info,TW}.
+
+area_columns() ->
+ [{"", ?wxLIST_FORMAT_LEFT, 150},
+ {"Allocated (bytes)",?wxLIST_FORMAT_RIGHT, 150},
+ {"Used (bytes)", ?wxLIST_FORMAT_RIGHT, 150}].
+
+%%%-----------------------------------------------------------------
+%%% Allocator page
+get_alloc_info() ->
+ {ok,Info,TW} = crashdump_viewer:allocator_info(),
+ {fix_alloc(Info),TW}.
+
+fix_alloc([{Title,Columns,Data}|Tables]) ->
+ [{Title,alloc_columns(Columns),
+ [[Key|Values] || {Key,Values} <- Data]} |
+ fix_alloc(Tables)];
+fix_alloc([{Title,[{_,V}|_]=Data}|Tables]) ->
+ fix_alloc([{Title,lists:duplicate(length(V),[]),Data}|Tables]);
+fix_alloc([]) ->
+ [].
+
+alloc_columns(Columns) ->
+ [{"", ?wxLIST_FORMAT_LEFT, 180} |
+ [{Column, ?wxLIST_FORMAT_RIGHT, 140} || Column <- Columns]].
diff --git a/lib/observer/src/cdv_mod_cb.erl b/lib/observer/src/cdv_mod_cb.erl
new file mode 100644
index 0000000000..e829ff4fca
--- /dev/null
+++ b/lib/observer/src/cdv_mod_cb.erl
@@ -0,0 +1,102 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_mod_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_CUR, ?COL_ID+1).
+-define(COL_OLD, ?COL_CUR+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #loaded_mod.mod;
+col_to_elem(?COL_CUR) -> #loaded_mod.current_size;
+col_to_elem(?COL_OLD) -> #loaded_mod.old_size.
+
+col_spec() ->
+ [{"Module", ?wxLIST_FORMAT_LEFT, 300},
+ {"Current size", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Old size", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:loaded_modules(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ {ok,Info,TW} = crashdump_viewer:loaded_mod_details(Id),
+ Proplist = crashdump_viewer:to_proplist(record_info(fields,loaded_mod),Info),
+ Title = io_lib:format("~s",[Info#loaded_mod.mod]),
+ {ok,{Title,Proplist,TW}}.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2},
+ {"Current Attributes", fun init_curr_attr_page/2},
+ {"Current Compilation Info", fun init_curr_comp_page/2},
+ {"Old Attributes", fun init_old_attr_page/2},
+ {"Old Compilation Info", fun init_old_comp_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+init_curr_attr_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(current_attrib,Info)).
+
+init_curr_comp_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(current_comp_info,Info)).
+
+init_old_attr_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(old_attrib,Info)).
+
+init_old_comp_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(old_comp_info,Info)).
+
+init_info_page(Parent, undefined) ->
+ init_info_page(Parent, "");
+init_info_page(Parent, String) ->
+ cdv_html_wx:start_link(Parent,observer_html_lib:plain_page(String)).
+
+format({Bin,q}) when is_binary(Bin) ->
+ [$'|binary_to_list(Bin)];
+format({Bin,nq}) when is_binary(Bin) ->
+ lists:flatten(io_lib:format("~ts",[Bin]));
+format(D) ->
+ D.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", mod},
+ {"Current Size", current_size},
+ {"Old Size", old_size}]}].
diff --git a/lib/observer/src/cdv_multi_wx.erl b/lib/observer/src/cdv_multi_wx.erl
new file mode 100644
index 0000000000..75c7f48fc2
--- /dev/null
+++ b/lib/observer/src/cdv_multi_wx.erl
@@ -0,0 +1,188 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_multi_wx).
+
+-behaviour(wx_object).
+
+-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_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {main_panel,
+ main_sizer,
+ menu,
+ menu_sizer,
+ callback,
+ pages,
+ dyn_panel,
+ dyn_sizer,
+ dyn_page
+ }).
+
+start_link(Notebook, Info) ->
+ wx_object:start_link(?MODULE, [Notebook, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([Notebook, Callback]) when is_atom(Callback) ->
+ Pages = Callback:get_info(),
+ {MainPanel,State0} = init([Notebook, Pages]),
+ {MainPanel,State0#state{callback=Callback}};
+init([Notebook, Pages]) ->
+ MainPanel = wxPanel:new(Notebook),
+ Sizer = wxBoxSizer:new(?wxHORIZONTAL),
+ LeftMenuSizer = wxStaticBoxSizer:new(?wxVERTICAL,MainPanel,
+ [{label,"Please select"}]),
+ LeftMenu = wxListBox:new(MainPanel,?wxID_ANY,
+ [{style,?wxLB_SINGLE},
+ {choices,[T || {T,_,_} <- Pages]}]),
+ wxListBox:setSelection(LeftMenu,0),
+ wxListBox:connect(LeftMenu, command_listbox_selected),
+ wxSizer:add(LeftMenuSizer,LeftMenu,[{flag,?wxEXPAND},{proportion,2}]),
+
+ DynPanel = wxScrolledWindow:new(MainPanel),
+ wxScrolledWindow:enableScrolling(DynPanel,true,true),
+ wxScrolledWindow:setScrollbars(DynPanel,1,1,0,0),
+
+ BorderFlags = ?wxLEFT bor ?wxRIGHT,
+ wxSizer:add(Sizer, LeftMenuSizer,
+ [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 0}, {border, 5}]),
+ wxSizer:add(Sizer, DynPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 1}, {border, 5}]),
+ wxPanel:setSizer(MainPanel, Sizer),
+
+ State = load_dyn_page(#state{main_panel=MainPanel,
+ main_sizer=Sizer,
+ menu=LeftMenu,
+ menu_sizer=LeftMenuSizer,
+ pages=Pages,
+ dyn_panel=DynPanel
+ }),
+ {MainPanel, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ NewState =
+ wx:batch(
+ fun() ->
+ update_dyn_page(State)
+ end),
+ {noreply, NewState};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From, State) ->
+ NewState =
+ wx:batch(
+ fun() ->
+ update_left_menu(State)
+ end),
+ {reply, ok, NewState};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p:~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p:~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxCommand{type=command_listbox_selected,
+ cmdString=[]}},
+ State) ->
+ %% For some reason, the listbox sometimes gets an "unselect"
+ %% command like this during termination. Ignore!
+ {noreply, State};
+
+handle_event(#wx{event=#wxCommand{type=command_listbox_selected,
+ cmdString=_DynName}},
+ State) ->
+ NewState =
+ wx:batch(fun() ->
+ update_dyn_page(State)
+ end),
+ {noreply,NewState};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Internal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+update_left_menu(#state{main_panel=Panel,
+ callback=Callback,
+ menu=OldMenu,
+ menu_sizer=MenuSizer} = State) ->
+ Pages = Callback:get_info(),
+ wxListBox:disconnect(OldMenu),
+ wxWindow:destroy(OldMenu),
+ NewMenu = wxListBox:new(Panel,?wxID_ANY,
+ [{style,?wxLB_SINGLE},
+ {choices,[T || {T,_,_} <- Pages]}]),
+ wxListBox:setSelection(NewMenu,0),
+ wxListBox:connect(NewMenu, command_listbox_selected),
+ wxSizer:add(MenuSizer,NewMenu,[{flag,?wxEXPAND},{proportion,2}]),
+ wxSizer:layout(MenuSizer),
+ State#state{pages=Pages,menu=NewMenu}.
+
+update_dyn_page(#state{dyn_page=undefined} = State) ->
+ load_dyn_page(State);
+update_dyn_page(#state{dyn_page=OldDynPage,
+ dyn_sizer=OldDynSizer} = State) ->
+ wxSizer:detach(OldDynSizer,OldDynPage),
+ wxWindow:destroy(OldDynPage),
+ load_dyn_page(State).
+
+load_dyn_page(#state{main_sizer=MainSizer,
+ dyn_panel=DynPanel,
+ menu=Menu,
+ pages=Pages} = State) ->
+ %% Freeze and thaw causes a hang (and is not needed) on 2.9 and higher
+ DoFreeze = [?wxMAJOR_VERSION,?wxMINOR_VERSION] < [2,9],
+ DoFreeze andalso wxWindow:freeze(DynPanel),
+ Name = wxListBox:getStringSelection(Menu),
+ {Page,Sizer} = load_dyn_page(DynPanel,Name,Pages),
+ wxSizer:layout(MainSizer),
+ DoFreeze andalso wxWindow:thaw(DynPanel),
+ wx_object:get_pid(Page) ! active,
+ State#state{dyn_page=Page,dyn_sizer=Sizer}.
+
+load_dyn_page(Panel,Name,Pages) ->
+ Sizer = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label,Name}]),
+
+ {_,Callback,Info} = lists:keyfind(Name,1,Pages),
+ DynPage = Callback:start_link(Panel,Info),
+
+ wxSizer:add(Sizer,DynPage,[{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxPanel:setSizerAndFit(Panel,Sizer,[{deleteOld,true}]),
+ {DynPage,Sizer}.
diff --git a/lib/observer/src/cdv_port_cb.erl b/lib/observer/src/cdv_port_cb.erl
new file mode 100644
index 0000000000..08488d3e34
--- /dev/null
+++ b/lib/observer/src/cdv_port_cb.erl
@@ -0,0 +1,103 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_port_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_ID, 0).
+-define(COL_CONN, ?COL_ID+1).
+-define(COL_NAME, ?COL_CONN+1).
+-define(COL_CTRL, ?COL_NAME+1).
+-define(COL_SLOT, ?COL_CTRL+1).
+
+
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #port.id;
+col_to_elem(?COL_CONN) -> #port.connected;
+col_to_elem(?COL_NAME) -> #port.name;
+col_to_elem(?COL_CTRL) -> #port.controls;
+col_to_elem(?COL_SLOT) -> #port.slot.
+
+col_spec() ->
+ [{"Id", ?wxLIST_FORMAT_LEFT, 100},
+ {"Connected", ?wxLIST_FORMAT_LEFT, 120},
+ {"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Controls", ?wxLIST_FORMAT_LEFT, 200},
+ {"Slot", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:ports(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID,?COL_CONN],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:port(Id) of
+ {ok,Info,TW} ->
+ Proplist =
+ crashdump_viewer:to_proplist(record_info(fields,port),Info),
+ {ok,{Id,Proplist,TW}};
+ {error,{other_node,NodeId}} ->
+ Info = "The port you are searching for was residing on "
+ "a remote node. No port information is available. "
+ "Show information about the remote node?",
+ Fun = fun() -> cdv_virtual_list_wx:start_detail_win(NodeId) end,
+ {yes_no, Info, Fun};
+ {error,not_found} ->
+ Info = "The port you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+format({I1,I2}) ->
+ "#Port<"++integer_to_list(I1) ++ "." ++ integer_to_list(I2) ++ ">";
+format(D) ->
+ D.
+
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", name},
+ {"Connected", {click,connected}},
+ {"Slot", slot},
+ {"Controls", controls}]},
+ {scroll_boxes,
+ [{"Links",1,{click,links}},
+ {"Monitors",1,{click,monitors}}]}].
diff --git a/lib/observer/src/cdv_proc_cb.erl b/lib/observer/src/cdv_proc_cb.erl
new file mode 100644
index 0000000000..dfc2df9c4c
--- /dev/null
+++ b/lib/observer/src/cdv_proc_cb.erl
@@ -0,0 +1,156 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_proc_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_ID, 0).
+-define(COL_NAME, ?COL_ID+1).
+-define(COL_STATE,?COL_NAME+1).
+-define(COL_REDS, ?COL_STATE+1).
+-define(COL_MEM, ?COL_REDS+1).
+-define(COL_MSG, ?COL_MEM+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #proc.pid;
+col_to_elem(?COL_NAME) -> #proc.name;
+col_to_elem(?COL_STATE) -> #proc.state;
+col_to_elem(?COL_MEM) -> #proc.memory;
+col_to_elem(?COL_REDS) -> #proc.reds;
+col_to_elem(?COL_MSG) -> #proc.msg_q_len.
+
+col_spec() ->
+ [{"Pid", ?wxLIST_FORMAT_CENTRE, 120},
+ {"Name or Initial Func", ?wxLIST_FORMAT_LEFT, 250},
+ {"State", ?wxLIST_FORMAT_LEFT, 100},
+ {"Reds", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80},
+ {"MsgQ", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:processes(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:proc_details(Id) of
+ {ok,Info,TW} ->
+ %% The following table is used by observer_html_lib
+ %% for storing expanded terms and it is read by
+ %% cdv_html_wx when a link to an expandable term is clicked.
+ Tab = ets:new(cdv_expand,[set,public]),
+ Proplist0 =
+ crashdump_viewer:to_proplist(record_info(fields,proc),Info),
+ Proplist = [{expand_table,Tab}|Proplist0],
+ Title = io_lib:format("~s (~s)",[Info#proc.name, Id]),
+ {ok,{Title,Proplist,TW}};
+ {error,{other_node,NodeId}} ->
+ Info = "The process you are searching for was residing on "
+ "a remote node. No process information is available. "
+ "Show information about the remote node?",
+ Fun = fun() -> cdv_virtual_list_wx:start_detail_win(NodeId) end,
+ {yes_no, Info, Fun};
+ {error,not_found} ->
+ Info = "The process you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2},
+ {"Messages", fun init_message_page/2},
+ {"Dictionary", fun init_dict_page/2},
+ {"Stack Dump", fun init_stack_page/2},
+ {"ETS tables", fun init_ets_page/2},
+ {"Timers", fun init_timer_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+init_message_page(Parent, Info) ->
+ init_memory_page(Parent, Info, msg_q, "MsgQueue").
+
+init_dict_page(Parent, Info) ->
+ init_memory_page(Parent, Info, dict, "Dictionary").
+
+init_stack_page(Parent, Info) ->
+ init_memory_page(Parent, Info, stack_dump, "StackDump").
+
+init_memory_page(Parent, Info0, Tag, Heading) ->
+ Info = proplists:get_value(Tag,Info0),
+ Tab = proplists:get_value(expand_table,Info0),
+ Html = observer_html_lib:expandable_term(Heading,Info,Tab),
+ cdv_html_wx:start_link(Parent,{expand,Html,Tab}).
+
+init_ets_page(Parent, Info) ->
+ Pid = proplists:get_value(pid,Info),
+ cdv_virtual_list_wx:start_link(Parent, cdv_ets_cb, Pid).
+
+init_timer_page(Parent, Info) ->
+ Pid = proplists:get_value(pid,Info),
+ cdv_virtual_list_wx:start_link(Parent, cdv_timer_cb, Pid).
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Initial Call", init_func},
+ {dynamic, current_func},
+ {"Registered Name", name},
+ {"Status", state},
+ {"Started", start_time},
+ {"Parent", {click,parent}},
+ {"Message Queue Len",msg_q_len},
+ {"Reductions", reds},
+ {"Program counter", prog_count},
+ {"Continuation pointer",cp},
+ {"Arity",arity}]},
+ {scroll_boxes,
+ [{"Last Calls",1,{plain,last_calls}}]},
+ {scroll_boxes,
+ [{"Links",1,{click,links}},
+ {"Monitors",2,{click,monitors}},
+ {"Monitored By",2,{click,mon_by}}]},
+ {"Memory and Garbage Collection",
+ [{"Memory", memory},
+ {"Stack and Heap", stack_heap},
+ {"Old Heap", old_heap},
+ {"Heap Unused", heap_unused},
+ {"Old Heap Unused", old_heap_unused},
+ {"Number of Heap Fragements", num_heap_frag},
+ {"Heap Fragment Data",heap_frag_data},
+ {"New Heap Start", new_heap_start},
+ {"New Heap Top", new_heap_top},
+ {"Stack Top", stack_top},
+ {"Stack End", stack_end},
+ {"Old Heap Start", old_heap_start},
+ {"Old Heap Top", old_heap_top},
+ {"Old Heap End", old_heap_end}]}].
diff --git a/lib/observer/src/cdv_table_wx.erl b/lib/observer/src/cdv_table_wx.erl
new file mode 100644
index 0000000000..f8943db17d
--- /dev/null
+++ b/lib/observer/src/cdv_table_wx.erl
@@ -0,0 +1,106 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_table_wx).
+
+-behaviour(wx_object).
+
+-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_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {trunc_warn=[]}).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, Callback]) when is_atom(Callback) ->
+ {ok,TableInfo} = Callback:get_info(),
+ init([ParentWin, TableInfo]);
+
+init([ParentWin, {ColumnSpec,Info,TW}]) ->
+ Style0 = ?wxLC_REPORT bor ?wxLC_SINGLE_SEL bor ?wxLC_HRULES bor ?wxLC_VRULES,
+ Style =
+ case lists:all(fun({"",_,_}) -> true; (_) -> false end, ColumnSpec) of
+ true -> Style0 bor ?wxLC_NO_HEADER;
+ false -> Style0
+ end,
+ Grid = wxListCtrl:new(ParentWin, [{style, Style}]),
+ 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,
+ lists:foldl(AddListEntry, 0, ColumnSpec),
+ wxListItem:destroy(Li),
+ Insert = fun(RowData, Row) ->
+ wxListCtrl:insertItem(Grid, Row, ""),
+ set_items(Grid,Row,RowData,0),
+ Row + 1
+ end,
+ lists:foldl(Insert, 0, Info),
+ {Grid, #state{trunc_warn=TW}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Internal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+set_items(Grid,Row,[Col|Cols],ColN) ->
+ Str = case Col of
+ undefined -> "";
+ _ -> observer_lib:to_str(Col)
+ end,
+ wxListCtrl:setItem(Grid, Row, ColN, Str),
+ set_items(Grid,Row,Cols,ColN+1);
+set_items(_,_,[],_) ->
+ ok.
diff --git a/lib/observer/src/cdv_term_cb.erl b/lib/observer/src/cdv_term_cb.erl
new file mode 100644
index 0000000000..4451045012
--- /dev/null
+++ b/lib/observer/src/cdv_term_cb.erl
@@ -0,0 +1,76 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_term_cb).
+
+-export([get_details/1,
+ detail_pages/0]).
+
+%% Callbacks for cdv_detail_wx
+get_details({Type, {T,Key}}) ->
+ [{Key,Term}] = ets:lookup(T,Key),
+ {ok,{"Expanded Term", {Type,[Term, T]}, []}}.
+
+detail_pages() ->
+ [{"Term", fun init_term_page/2}].
+
+init_term_page(ParentWin, {Type, [Term, Tab]}) ->
+ Expanded = expand(Term, true),
+ BinSaved = expand(Term, Tab),
+ cdv_multi_wx:start_link(
+ ParentWin,
+ [{"Format \~p",cdv_html_wx,{Type, format_term_fun("~p",BinSaved,Tab)}},
+ {"Format \~tp",cdv_html_wx,{Type,format_term_fun("~tp",BinSaved,Tab)}},
+ {"Format \~w",cdv_html_wx,{Type,format_term_fun("~w",BinSaved,Tab)}},
+ {"Format \~s",cdv_html_wx,{Type,format_term_fun("~s",Expanded,Tab)}},
+ {"Format \~ts",cdv_html_wx,{Type,format_term_fun("~ts",Expanded,Tab)}}]).
+
+format_term_fun(Format,Term,Tab) ->
+ fun() ->
+ try io_lib:format(Format,[Term]) of
+ Str -> {expand, plain_html(Str), Tab}
+ catch error:badarg ->
+ Warning = "This term can not be formatted with " ++ Format,
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+plain_html(Text) ->
+ observer_html_lib:plain_page(Text).
+
+expand(['#CDVBin',Offset,Size,Pos], true) ->
+ {ok,Bin} = crashdump_viewer:expand_binary({Offset,Size,Pos}),
+ Bin;
+expand(Bin, Tab) when is_binary(Bin), not is_boolean(Tab) ->
+ Size = byte_size(Bin),
+ PrevSize = min(Size, 10) * 8,
+ <<Preview:PrevSize, _/binary>> = Bin,
+ Hash = erlang:phash2(Bin),
+ Key = {Preview, Size, Hash},
+ ets:insert(Tab, {Key,Bin}),
+ ['#OBSBin',Preview,Size,Hash];
+expand([H|T], Expand) ->
+ case expand(T, Expand) of
+ ET when is_list(ET) ->
+ [expand(H, Expand)|ET];
+ ET -> % The tail is an expanded binary - cannot append with |
+ [expand(H, Expand),ET]
+ end;
+expand(Tuple, Expand) when is_tuple(Tuple) ->
+ list_to_tuple(expand(tuple_to_list(Tuple), Expand));
+expand(Term, _) ->
+ Term.
diff --git a/lib/observer/src/cdv_timer_cb.erl b/lib/observer/src/cdv_timer_cb.erl
new file mode 100644
index 0000000000..d44592cf18
--- /dev/null
+++ b/lib/observer/src/cdv_timer_cb.erl
@@ -0,0 +1,54 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_timer_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_OWNER, 0).
+-define(COL_NAME, ?COL_OWNER+1).
+-define(COL_MSG, ?COL_NAME+1).
+-define(COL_TIME, ?COL_MSG+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_OWNER);
+col_to_elem(?COL_OWNER) -> #timer.pid;
+col_to_elem(?COL_NAME) -> #timer.name;
+col_to_elem(?COL_MSG) -> #timer.msg;
+col_to_elem(?COL_TIME) -> #timer.time.
+
+col_spec() ->
+ [{"Owner", ?wxLIST_FORMAT_LEFT, 110},
+ {"Owner name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Message", ?wxLIST_FORMAT_LEFT, 300},
+ {"Time left (ms)", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(Owner) ->
+ {ok,Info,TW} = crashdump_viewer:timers(Owner),
+ {Info,TW}.
+
+get_detail_cols(all) ->
+ {[?COL_OWNER],false};
+get_detail_cols(_) ->
+ {[],false}.
diff --git a/lib/observer/src/cdv_virtual_list_wx.erl b/lib/observer/src/cdv_virtual_list_wx.erl
new file mode 100644
index 0000000000..bfe115a42e
--- /dev/null
+++ b/lib/observer/src/cdv_virtual_list_wx.erl
@@ -0,0 +1,419 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_virtual_list_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2, start_link/3, start_detail_win/1]).
+
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(ID_DETAILS, 202).
+
+%% Records
+
+-record(sort,
+ {
+ sort_key,
+ sort_incr=true
+ }).
+
+-record(holder, {parent,
+ info,
+ last_row,
+ sort,
+ attrs,
+ callback
+ }).
+
+-record(state, {grid,
+ panel,
+ detail_wins=[],
+ holder,
+ callback,
+ trunc_warn=[],
+ menu_cols=[], % columns to show in right click menu
+ menu_items=[]}). % right click menu items for the selected row
+
+start_link(ParentWin, Callback) ->
+ wx_object:start_link({local,Callback},?MODULE,
+ [ParentWin, Callback, all], []).
+
+start_link(ParentWin, Callback, Owner) ->
+ wx_object:start_link(?MODULE, [ParentWin, Callback, Owner], []).
+
+start_detail_win(Id) ->
+ Callback =
+ case Id of
+ "<"++_ ->
+ cdv_proc_cb;
+ "#Port"++_ ->
+ cdv_port_cb;
+ _ ->
+ case catch list_to_integer(Id) of
+ NodeId when is_integer(NodeId) ->
+ cdv_dist_cb;
+ _ ->
+ cdv_mod_cb
+ end
+ end,
+ start_detail_win(Callback,Id).
+start_detail_win(Callback,Id) ->
+ wx_object:cast(Callback,{start_detail_win,Id}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+init([ParentWin, Callback, Owner]) ->
+ {Holder,TW} = spawn_table_holder(Callback, Owner),
+ Panel = wxPanel:new(ParentWin),
+ {Grid,MenuCols} = create_list_box(Panel, Holder, Callback, Owner),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1},
+ {border,4}]),
+
+ wxWindow:setSizer(Panel, Sizer),
+
+ State = #state{grid=Grid,
+ panel=Panel,
+ holder=Holder,
+ callback=Callback,
+ trunc_warn=TW,
+ menu_cols=MenuCols
+ },
+ {Panel, State}.
+
+%% UI-creation
+
+create_list_box(Panel, Holder, Callback, Owner) ->
+ Style =
+ ?wxLC_SINGLE_SEL bor ?wxLC_REPORT bor ?wxLC_VIRTUAL bor
+ ?wxLC_HRULES bor ?wxHSCROLL bor ?wxVSCROLL,
+ ListCtrl = wxListCtrl:new(Panel, [{style, Style},
+ {onGetItemText,
+ fun(_, Row, Col) ->
+ call(Holder, {get_row, self(), Row, Col})
+ end},
+ {onGetItemAttr,
+ fun(_, Item) ->
+ call(Holder, {get_attr, self(), Item})
+ end}
+ ]),
+ Li = wxListItem:new(),
+ AddListEntry = fun({Name, Align, DefSize}, Col) ->
+ wxListItem:setText(Li, Name),
+ wxListItem:setAlign(Li, Align),
+ wxListCtrl:insertColumn(ListCtrl, Col, Li),
+ wxListCtrl:setColumnWidth(ListCtrl, Col, DefSize),
+ Col + 1
+ end,
+ ListItems = Callback:col_spec(),
+ lists:foldl(AddListEntry, 0, ListItems),
+ wxListItem:destroy(Li),
+
+ wxListCtrl:setItemCount(ListCtrl, 0),
+ wxListCtrl:connect(ListCtrl, size, [{skip, true}]),
+ wxListCtrl:connect(ListCtrl, command_list_col_click),
+
+
+ %% If detail pages can be opened from this list - catch double
+ %% click and right click
+ DetailCols =
+ case catch Callback:get_detail_cols(Owner) of
+ {DC,DoubleClick} when is_list(DC), DC=/=[] ->
+ wxListCtrl:connect(ListCtrl, command_list_item_right_click),
+ if DoubleClick ->
+ wxListCtrl:connect(ListCtrl, command_list_item_activated);
+ true ->
+ ok
+ end,
+ DC;
+ _ ->
+ []
+ end,
+
+ {ListCtrl,DetailCols}.
+
+do_start_detail_win(undefined, State) ->
+ State;
+do_start_detail_win(Id, #state{panel=Panel,detail_wins=Opened,
+ callback=Callback}=State) ->
+ NewOpened =
+ case lists:keyfind(Id, 1, Opened) of
+ false ->
+ case cdv_detail_wx:start_link(Id, Panel, Callback) of
+ {error, _} ->
+ Opened;
+ IW ->
+ [{Id, IW} | Opened]
+ end;
+ {_, IW} ->
+ wxFrame:raise(IW),
+ Opened
+ end,
+ State#state{detail_wins=NewOpened}.
+
+call(Holder, What) when is_atom(Holder) ->
+ call(whereis(Holder), What);
+call(Holder, What) when is_pid(Holder) ->
+ Ref = erlang:monitor(process, Holder),
+ Holder ! What,
+ receive
+ {'DOWN', Ref, _, _, _} -> "";
+ {Holder, Res} ->
+ erlang:demonitor(Ref),
+ Res
+ after 5000 ->
+ io:format("Hanging call ~p~n",[What]),
+ ""
+ end;
+call(_,_) ->
+ "".
+
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info({holder_updated, Count}, State=#state{grid=Grid}) ->
+ wxListCtrl:setItemCount(Grid, Count),
+ Count > 0 andalso wxListCtrl:refreshItems(Grid, 0, Count-1),
+ {noreply, State};
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p, Unexpected info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, #state{holder=Holder}) ->
+ Holder ! stop,
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From,
+ #state{grid=Grid,detail_wins=Opened,
+ holder=Holder,callback=Callback}=State) ->
+ lists:foreach(fun({_Id, IW}) -> wxFrame:destroy(IW) end, Opened),
+ wxListCtrl:deleteAllItems(Grid),
+ Ref = erlang:monitor(process,Holder),
+ Holder ! stop,
+ receive {'DOWN',Ref,_,_,_} -> ok end,
+ {NewHolder,TW} = spawn_table_holder(Callback, all),
+ {reply, ok, State#state{detail_wins=[],holder=NewHolder,trunc_warn=TW}};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p:~p: Unhandled call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast({start_detail_win,Id}, State) ->
+ State2 = do_start_detail_win(Id, State),
+ {noreply, State2};
+
+handle_cast({detail_win_closed, Id},#state{detail_wins=Opened}=State) ->
+ Opened2 = lists:keydelete(Id, 1, Opened),
+ {noreply, State#state{detail_wins=Opened2}};
+
+handle_cast(Msg, State) ->
+ io:format("~p:~p: Unhandled cast ~p~n", [?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%LOOP%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_event(#wx{id=MenuId,
+ event=#wxCommand{type = command_menu_selected}},
+ #state{menu_items=MenuItems} = State) ->
+ case lists:keyfind(MenuId,1,MenuItems) of
+ {MenuId,Id} ->
+ start_detail_win(Id);
+ false ->
+ ok
+ end,
+ {noreply, State};
+
+handle_event(#wx{event=#wxSize{size={W,_}}},
+ #state{grid=Grid}=State) ->
+ observer_lib:set_listctrl_col_size(Grid, W),
+ {noreply, State};
+
+handle_event(#wx{event=#wxList{type=command_list_item_right_click,
+ itemIndex=Row}},
+ #state{panel=Panel, holder=Holder, menu_cols=MenuCols} = State) ->
+ Menu = wxMenu:new(),
+ MenuItems =
+ lists:flatmap(
+ fun(Col) ->
+ MenuId = ?ID_DETAILS + Col,
+ ColText = call(Holder, {get_row, self(), Row, Col}),
+ case ColText of
+ Empty when Empty=="[]"; Empty=="" -> [];
+ _ ->
+ What =
+ case catch list_to_integer(ColText) of
+ NodeId when is_integer(NodeId) ->
+ "node " ++ ColText;
+ _ ->
+ ColText
+ end,
+ Text = "Properties for " ++ What,
+ wxMenu:append(Menu, MenuId, Text),
+ [{MenuId,ColText}]
+ end
+ end,
+ MenuCols),
+ case MenuItems of
+ [] ->
+ wxMenu:destroy(Menu);
+ _ ->
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu)
+ end,
+ {noreply,State#state{menu_items=MenuItems}};
+
+handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
+ #state{holder=Holder}=State) ->
+ Holder ! {change_sort, Col},
+ {noreply, State};
+
+handle_event(#wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=Row}},
+ #state{holder=Holder} = State) ->
+ Id = call(Holder, {get_row, self(), Row, id}),
+ start_detail_win(Id),
+ {noreply, State};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: handle event ~p\n", [?MODULE, ?LINE, Event]),
+ {noreply, State}.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%TABLE HOLDER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+spawn_table_holder(Callback, Owner) ->
+ {Info,TW} = Callback:get_info(Owner),
+ Attrs = observer_lib:create_attrs(),
+ Parent = self(),
+ Holder =
+ case Owner of
+ all ->
+ Name = list_to_atom(atom_to_list(Callback) ++ "__holder"),
+ spawn_link(
+ fun() ->
+ register(Name,self()),
+ init_table_holder(Parent, Attrs, Callback, Info)
+ end),
+ Name;
+ _ ->
+ spawn_link(
+ fun() ->
+ init_table_holder(Parent, Attrs, Callback, Info)
+ end)
+ end,
+ {Holder,TW}.
+
+init_table_holder(Parent, Attrs, Callback, InfoList0) ->
+ Sort = #sort{sort_key=Callback:col_to_elem(id)},
+ {_Sort, InfoList} = do_sort(Sort,InfoList0),
+ Info = array:from_list(InfoList),
+ NRows = array:size(Info),
+ Parent ! {holder_updated, NRows},
+ table_holder(#holder{parent=Parent,
+ info=Info,
+ sort=Sort,
+ attrs=Attrs,
+ callback=Callback}).
+
+table_holder(#holder{callback=Callback, attrs=Attrs}=S0) ->
+ receive
+ _M={get_row, From, Row, Col} ->
+ %% erlang:display(_M),
+ State = get_row(From, Row, Col, S0),
+ table_holder(State);
+ _M={get_attr, From, Row} ->
+ %% erlang:display(_M),
+ get_attr(From, Row, Attrs),
+ table_holder(S0);
+ _M={change_sort, Col} ->
+ %% erlang:display(_M),
+ State = change_sort(Callback:col_to_elem(Col), S0),
+ table_holder(State);
+ stop ->
+ ok;
+ What ->
+ io:format("Table holder got ~p~n",[What]),
+ table_holder(S0)
+ end.
+
+change_sort(Col, S0=#holder{parent=Parent, info=Info0, sort=Sort0}) ->
+ NRows = array:size(Info0),
+ InfoList0 = array:to_list(Info0),
+ {Sort, InfoList}=sort(Col, Sort0, InfoList0),
+ Info = array:from_list(InfoList),
+ Parent ! {holder_updated, NRows},
+ S0#holder{info=Info, last_row=undefined, sort=Sort}.
+
+sort(Col, Opt=#sort{sort_key=Col, sort_incr=Bool}, Table) ->
+ do_sort(Opt#sort{sort_incr=not Bool}, Table);
+sort(Col, Sort,Table) ->
+ do_sort(Sort#sort{sort_key=Col, sort_incr=true}, Table).
+
+do_sort(Sort=#sort{sort_key=Col, sort_incr=true}, Table) ->
+ {Sort, lists:keysort(Col, Table)};
+do_sort(Sort=#sort{sort_key=Col, sort_incr=false}, Table) ->
+ {Sort, lists:reverse(lists:keysort(Col, Table))}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+get_cell_data(Callback, ColNo, RowInfo) ->
+ case element(Callback:col_to_elem(ColNo), RowInfo) of
+ undefined -> "";
+ Cell -> try Callback:format(Cell) catch error:undef -> Cell end
+ end.
+
+get_row(From, Row, Col,
+ #holder{callback=Callback, last_row={Row,RowInfo}}=State) ->
+ Data = get_cell_data(Callback, Col, RowInfo),
+ From ! {self(), observer_lib:to_str(Data)},
+ State;
+get_row(From, Row, Col, #holder{callback=Callback, info=Info}=S0) ->
+ {Data,State} =
+ case Row >= array:size(Info) of
+ true ->
+ {"",S0};
+ false ->
+ RowInfo = array:get(Row, Info),
+ CellData = get_cell_data(Callback, Col, RowInfo),
+ {CellData,S0#holder{last_row={Row,RowInfo}}}
+ end,
+ From ! {self(), observer_lib:to_str(Data)},
+ State.
+
+get_attr(From, Row, Attrs) ->
+ Attribute = case Row rem 2 =:= 0 of
+ true -> Attrs#attrs.even;
+ false -> Attrs#attrs.odd
+ end,
+ From ! {self(), Attribute}.
diff --git a/lib/observer/src/cdv_wx.erl b/lib/observer/src/cdv_wx.erl
new file mode 100644
index 0000000000..26df60b0a6
--- /dev/null
+++ b/lib/observer/src/cdv_wx.erl
@@ -0,0 +1,462 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+-module(cdv_wx).
+-compile(export_all).
+-behaviour(wx_object).
+
+-export([start/1]).
+-export([get_attrib/1, set_status/1, create_txt_dialog/4]).
+
+-export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3,
+ handle_call/3, handle_info/2, check_page_title/1]).
+
+%% Includes
+-include_lib("wx/include/wx.hrl").
+-include_lib("kernel/include/file.hrl").
+
+-include("observer_defs.hrl").
+
+%% Defines
+
+-define(SERVER, cdv_wx).
+
+-define(ID_UG, 1).
+-define(ID_HOWTO, 2).
+-define(ID_NOTEBOOK, 3).
+
+-define(GEN_STR, "General").
+-define(PRO_STR, "Processes").
+-define(PORT_STR, "Ports").
+-define(ETS_STR, "ETS Tables").
+-define(TIMER_STR, "Timers").
+-define(FUN_STR, "Funs").
+-define(ATOM_STR, "Atoms").
+-define(DIST_STR, "Nodes").
+-define(MOD_STR, "Modules").
+-define(MEM_STR, "Memory").
+-define(INT_STR, "Internal Tables").
+
+%% Records
+-record(state,
+ {server,
+ file,
+ frame,
+ menubar,
+ menus = [],
+ status_bar,
+ notebook,
+ main_panel,
+ gen_panel,
+ pro_panel,
+ port_panel,
+ ets_panel,
+ timer_panel,
+ fun_panel,
+ atom_panel,
+ dist_panel,
+ mod_panel,
+ mem_panel,
+ int_panel,
+ active_tab
+ }).
+
+start(File) ->
+ case wx_object:start(?MODULE, File, []) of
+ Err = {error, _} -> Err;
+ _Obj -> ok
+ end.
+
+get_attrib(What) ->
+ wx_object:call(?SERVER, {get_attrib, What}).
+
+set_status(What) ->
+ wx_object:cast(?SERVER, {status_bar, What}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init(File0) ->
+ register(?SERVER, self()),
+ wx:new(),
+
+ {ok,CdvServer} = crashdump_viewer:start_link(),
+
+ catch wxSystemOptions:setOption("mac.listctrl.always_use_generic", 1),
+ Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Crashdump Viewer",
+ [{size, {850, 600}}, {style, ?wxDEFAULT_FRAME_STYLE}]),
+ IconFile = filename:join(code:priv_dir(observer), "erlang_observer.png"),
+ Icon = wxIcon:new(IconFile, [{type,?wxBITMAP_TYPE_PNG}]),
+ wxFrame:setIcon(Frame, Icon),
+ wxIcon:destroy(Icon),
+
+ %% Setup panels
+ Panel = wxPanel:new(Frame, []),
+ Notebook = wxNotebook:new(Panel, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
+
+ %% Setup "statusbar" to show warnings
+ StatusBar = observer_lib:create_status_bar(Panel),
+
+ %% Setup sizer create early to get it when window shows
+ MainSizer = wxBoxSizer:new(?wxVERTICAL),
+
+ wxSizer:add(MainSizer, Notebook, [{proportion, 1}, {flag, ?wxEXPAND}]),
+ wxSizer:add(MainSizer, StatusBar, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 0},
+ {border,4}]),
+ wxPanel:setSizer(Panel, MainSizer),
+
+ wxNotebook:connect(Notebook, command_notebook_page_changing),
+ wxFrame:connect(Frame, close_window, [{skip, true}]),
+ wxMenu:connect(Frame, command_menu_selected),
+
+ case load_dump(Frame,File0) of
+ {ok,File} ->
+ %% Set window title
+ T1 = "Crashdump Viewer: ",
+ Title =
+ if length(File) > 70 ->
+ T1 ++ filename:basename(File);
+ true ->
+ T1 ++ File
+ end,
+ wxFrame:setTitle(Frame, Title),
+
+ setup(#state{server=CdvServer,
+ file=File,
+ frame=Frame,
+ status_bar=StatusBar,
+ notebook=Notebook,
+ main_panel=Panel});
+ error ->
+ wxFrame:destroy(Frame),
+ wx:destroy(),
+ crashdump_viewer:stop(),
+ ignore
+ end.
+
+setup(#state{frame=Frame, notebook=Notebook}=State) ->
+
+ %% Setup Menubar & Menus
+ MenuBar = wxMenuBar:new(),
+ DefMenus = default_menus(),
+ observer_lib:create_menus(DefMenus, MenuBar, default),
+ wxFrame:setMenuBar(Frame, MenuBar),
+
+ %% General information Panel
+ GenPanel = add_page(Notebook, ?GEN_STR, cdv_info_wx, cdv_gen_cb),
+
+ %% Process Panel
+ ProPanel = add_page(Notebook, ?PRO_STR, cdv_virtual_list_wx, cdv_proc_cb),
+
+ %% Port Panel
+ PortPanel = add_page(Notebook, ?PORT_STR, cdv_virtual_list_wx, cdv_port_cb),
+
+ %% Table Panel
+ EtsPanel = add_page(Notebook, ?ETS_STR, cdv_virtual_list_wx, cdv_ets_cb),
+
+ %% Timer Panel
+ TimerPanel = add_page(Notebook, ?TIMER_STR, cdv_virtual_list_wx,cdv_timer_cb),
+
+ %% Fun Panel
+ FunPanel = add_page(Notebook, ?FUN_STR, cdv_virtual_list_wx, cdv_fun_cb),
+
+ %% Atom Panel
+ AtomPanel = add_page(Notebook, ?ATOM_STR, cdv_virtual_list_wx, cdv_atom_cb),
+
+ %% Distribution Panel
+ DistPanel = add_page(Notebook, ?DIST_STR, cdv_virtual_list_wx, cdv_dist_cb),
+
+ %% Loaded Modules Panel
+ ModPanel = add_page(Notebook, ?MOD_STR, cdv_virtual_list_wx, cdv_mod_cb),
+
+ %% Memory Panel
+ MemPanel = add_page(Notebook, ?MEM_STR, cdv_multi_wx, cdv_mem_cb),
+
+ %% Memory Panel
+ IntPanel = add_page(Notebook, ?INT_STR, cdv_multi_wx, cdv_int_tab_cb),
+
+ %% Show the window
+ wxFrame:show(Frame),
+
+ GenPid = wx_object:get_pid(GenPanel),
+ GenPid ! active,
+ observer_lib:destroy_progress_dialog(),
+ process_flag(trap_exit, true),
+ {Frame, State#state{menubar = MenuBar,
+ gen_panel = GenPanel,
+ pro_panel = ProPanel,
+ port_panel = PortPanel,
+ ets_panel = EtsPanel,
+ timer_panel = TimerPanel,
+ fun_panel = FunPanel,
+ atom_panel = AtomPanel,
+ dist_panel = DistPanel,
+ mod_panel = ModPanel,
+ mem_panel = MemPanel,
+ int_panel = IntPanel,
+ active_tab = GenPid
+ }}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%Callbacks
+handle_event(#wx{event=#wxNotebook{type=command_notebook_page_changing}},
+ #state{active_tab=Previous} = State) ->
+ case get_active_pid(State) of
+ Previous -> {noreply, State};
+ Pid ->
+ Pid ! active,
+ {noreply, State#state{active_tab=Pid}}
+ end;
+
+handle_event(#wx{event = #wxClose{}}, State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id = ?wxID_OPEN,
+ event = #wxCommand{type = command_menu_selected}},
+ State) ->
+ NewState =
+ case load_dump(State#state.frame,undefined) of
+ {ok,File} ->
+ Panels = [State#state.gen_panel,
+ State#state.pro_panel,
+ State#state.port_panel,
+ State#state.ets_panel,
+ State#state.timer_panel,
+ State#state.fun_panel,
+ State#state.atom_panel,
+ State#state.dist_panel,
+ State#state.mod_panel,
+ State#state.mem_panel,
+ State#state.int_panel],
+ _ = [wx_object:call(Panel,new_dump) || Panel<-Panels],
+ wxNotebook:setSelection(State#state.notebook,0),
+ observer_lib:destroy_progress_dialog(),
+ State#state{file=File};
+ error ->
+ State
+ end,
+ {noreply,NewState};
+
+handle_event(#wx{id = ?wxID_EXIT,
+ event = #wxCommand{type = command_menu_selected}},
+ State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id = HelpId,
+ event = #wxCommand{type = command_menu_selected}},
+ State) when HelpId==?wxID_HELP; HelpId==?ID_UG; HelpId==?ID_HOWTO ->
+ Help = get_help_doc(HelpId),
+ wx_misc:launchDefaultBrowser(Help) orelse
+ create_txt_dialog(State#state.frame,
+ "Could not launch browser: ~n " ++ Help,
+ "Error", ?wxICON_ERROR),
+ {noreply, State};
+
+handle_event(#wx{id = ?wxID_ABOUT,
+ event = #wxCommand{type = command_menu_selected}},
+ State = #state{frame=Frame}) ->
+ AboutString = "Display information from an erlang crash dump",
+ Style = [{style, ?wxOK bor ?wxSTAY_ON_TOP},
+ {caption, "About"}],
+ wxMessageDialog:showModal(wxMessageDialog:new(Frame, AboutString, Style)),
+ {noreply, State};
+
+handle_event(Event, State) ->
+ Pid = get_active_pid(State),
+ Pid ! Event,
+ {noreply, State}.
+
+handle_cast({status_bar, Msg}, State=#state{status_bar=SB}) ->
+ wxTextCtrl:clear(SB),
+ wxTextCtrl:writeText(SB, Msg),
+ {noreply, State};
+
+handle_cast(_Cast, State) ->
+ {noreply, State}.
+
+handle_call({get_attrib, Attrib}, _From, State) ->
+ {reply, get(Attrib), State};
+
+handle_call(_Msg, _From, State) ->
+ {reply, ok, State}.
+
+handle_info({'EXIT', Pid, normal}, #state{server=Pid}=State) ->
+ {stop, normal, State};
+
+handle_info({'EXIT', Pid, _Reason}, State) ->
+ io:format("Child (~s) crashed exiting: ~p ~p~n",
+ [pid2panel(Pid, State), Pid,_Reason]),
+ {stop, normal, State};
+
+handle_info(_Info, State) ->
+ {noreply, State}.
+
+terminate(_Reason, #state{frame = Frame}) ->
+ wxFrame:destroy(Frame),
+ wx:destroy(),
+ crashdump_viewer:stop(),
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+add_page(Notebook,Title,Callback,Extra) ->
+ Panel = Callback:start_link(Notebook, Extra),
+ wxNotebook:addPage(Notebook, Panel, Title, []),
+ Panel.
+
+create_txt_dialog(Frame, Msg, Title, Style) ->
+ MD = wxMessageDialog:new(Frame, Msg, [{style, Style}]),
+ wxMessageDialog:setTitle(MD, Title),
+ wxDialog:showModal(MD),
+ wxDialog:destroy(MD).
+
+check_page_title(Notebook) ->
+ Selection = wxNotebook:getSelection(Notebook),
+ wxNotebook:getPageText(Notebook, Selection).
+
+get_active_pid(#state{notebook=Notebook, gen_panel=Gen, pro_panel=Pro,
+ port_panel=Ports, ets_panel=Ets, timer_panel=Timers,
+ fun_panel=Funs, atom_panel=Atoms, dist_panel=Dist,
+ mod_panel=Mods, mem_panel=Mem, int_panel=Int
+ }) ->
+ Panel = case check_page_title(Notebook) of
+ ?GEN_STR -> Gen;
+ ?PRO_STR -> Pro;
+ ?PORT_STR -> Ports;
+ ?ETS_STR -> Ets;
+ ?TIMER_STR -> Timers;
+ ?FUN_STR -> Funs;
+ ?ATOM_STR -> Atoms;
+ ?DIST_STR -> Dist;
+ ?MOD_STR -> Mods;
+ ?MEM_STR -> Mem;
+ ?INT_STR -> Int
+ end,
+ wx_object:get_pid(Panel).
+
+pid2panel(Pid, #state{gen_panel=Gen, pro_panel=Pro, port_panel=Ports,
+ ets_panel=Ets, timer_panel=Timers, fun_panel=Funs,
+ atom_panel=Atoms, dist_panel=Dist, mod_panel=Mods,
+ mem_panel=Mem, int_panel=Int}) ->
+ case Pid of
+ Gen -> ?GEN_STR;
+ Pro -> ?PRO_STR;
+ Ports -> ?PORT_STR;
+ Ets -> ?ETS_STR;
+ Timers -> ?TIMER_STR;
+ Funs -> ?FUN_STR;
+ Atoms -> ?ATOM_STR;
+ Dist -> ?DIST_STR;
+ Mods -> ?MOD_STR;
+ Mem -> ?MEM_STR;
+ Int -> ?INT_STR;
+ _ -> "unknown"
+ end.
+
+default_menus() ->
+ Open = #create_menu{id = ?wxID_OPEN, text = "Open new crash dump"},
+ Quit = #create_menu{id = ?wxID_EXIT, text = "Quit"},
+ About = #create_menu{id = ?wxID_ABOUT, text = "About"},
+ Help = #create_menu{id = ?wxID_HELP},
+ UG = #create_menu{id = ?ID_UG, text = "Crashdump viewer user's guide"},
+ Howto = #create_menu{id = ?ID_HOWTO, text = "How to interpret crash dump"},
+ case os:type() =:= {unix, darwin} of
+ false ->
+ FileMenu = {"File", [Open,Quit]},
+ HelpMenu = {"Help", [About,Help,UG,Howto]},
+ [FileMenu, HelpMenu];
+ true ->
+ %% On Mac quit and about will be moved to the "default' place
+ %% automagicly, so just add them to a menu that always exist.
+ [{"File", [Open, About,Quit]}, {"&Help", [Help,UG,Howto]}]
+ end.
+
+
+load_dump(Frame,undefined) ->
+ FD = wxFileDialog:new(wx:null(),
+ [{style,?wxFD_OPEN bor ?wxFD_FILE_MUST_EXIST}]),
+ case wxFileDialog:showModal(FD) of
+ ?wxID_OK ->
+ Path = wxFileDialog:getPath(FD),
+ wxDialog:destroy(FD),
+ load_dump(Frame,Path);
+ _ ->
+ wxDialog:destroy(FD),
+ error
+ end;
+load_dump(Frame,FileName) ->
+ ok = observer_lib:display_progress_dialog("Crashdump Viewer",
+ "Loading crashdump"),
+ crashdump_viewer:read_file(FileName),
+ case observer_lib:wait_for_progress() of
+ ok ->
+ %% Set window title
+ T1 = "Crashdump Viewer: ",
+ Title =
+ if length(FileName) > 70 ->
+ T1 ++ filename:basename(FileName);
+ true ->
+ T1 ++ FileName
+ end,
+ wxFrame:setTitle(Frame, Title),
+ {ok,FileName};
+ error ->
+ error
+ end.
+
+%%%-----------------------------------------------------------------
+%%% Find help document (HTML files)
+get_help_doc(HelpId) ->
+ Internal = get_internal_help_doc(HelpId),
+ case filelib:is_file(Internal) of
+ true -> Internal;
+ false -> get_external_help_doc(HelpId)
+ end.
+
+get_internal_help_doc(?ID_HOWTO) ->
+ filename:join(erts_doc_dir(),help_file(?ID_HOWTO));
+get_internal_help_doc(HelpId) ->
+ filename:join(observer_doc_dir(),help_file(HelpId)).
+
+get_external_help_doc(?ID_HOWTO) ->
+ filename:join("http://www.erlang.org/doc/apps/erts",help_file(?ID_HOWTO));
+get_external_help_doc(HelpId) ->
+ filename:join("http://www.erlang.org/doc/apps/observer",help_file(HelpId)).
+
+observer_doc_dir() ->
+ filename:join([code:lib_dir(observer),"doc","html"]).
+
+erts_doc_dir() ->
+ ErtsVsn = erlang:system_info(version),
+ RootDir = code:root_dir(),
+ VsnErtsDir = filename:join(RootDir,"erts-"++ErtsVsn),
+ DocDir = filename:join(["doc","html"]),
+ case filelib:is_dir(VsnErtsDir) of
+ true ->
+ filename:join(VsnErtsDir,DocDir);
+ false ->
+ %% So this can be run in source tree
+ filename:join([RootDir,"erts",DocDir])
+ end.
+
+help_file(?wxID_HELP) -> "crashdump_help.html";
+help_file(?ID_UG) -> "crashdump_ug.html";
+help_file(?ID_HOWTO) -> "crash_dump.html".
diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl
index e7d71c581e..99329b94e2 100644
--- a/lib/observer/src/crashdump_viewer.erl
+++ b/lib/observer/src/crashdump_viewer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,80 +20,53 @@
%%
%% This module is the main module in the crashdump viewer. It implements
-%% the server started by webtool and the API for the crashdump viewer tool.
-%%
-%% All functions in the API except configData/0 and start_link/0 are
-%% called from HTML pages via erl_scheme (mod_esi).
+%% the server backend for the crashdump viewer tool.
%%
%% Tables
%% ------
-%% cdv_menu_table: This table holds the menu which is presented in the left
-%% frame of the crashdump viewer page. Each element in the table represents
-%% one meny item, and the state of the item indicates if it is presently
-%% visible or not.
-%%
-%% cdv_dump_index_table: This table holds all tags read from the crashdump.
-%% Each tag indicates where the information about a specific item starts.
-%% The table entry for a tag includes the start position for this
-%% item-information. All tags start with a "=" at the beginning of
-%% a line.
+%% cdv_dump_index_table: This table holds all tags read from the
+%% crashdump. Each tag indicates where the information about a
+%% specific item starts. The table entry for a tag includes the start
+%% position for this item-information. In a crash dump file, all tags
+%% start with a "=" at the beginning of a line.
%%
%% Process state
%% -------------
%% file: The name of the crashdump currently viewed.
%% dump_vsn: The version number of the crashdump
-%% procs_summary: Process summary represented by a list of
-%% #proc records. This is used for efficiency reasons when sorting the
-%% process summary table instead of reading all processes from the
-%% dump again. Note that if the dump contains more than
-%% ?max_sort_process_num processes, the sort functionality is not
-%% available, and the procs_summary field in the state will have the
-%% value 'too_many'.
-%% sorted: string(), indicated what item was last sorted in process summary.
-%% This is needed so reverse sorting can be done.
-%% shared_heap: 'true' if crashdump comes from a system running shared heap,
-%% else 'false'.
%% wordsize: 4 | 8, the number of bytes in a word.
%% binaries: a gb_tree containing binaries or links to binaries in the dump
%%
%% User API
--export([start/0,stop/0,script_start/0,script_start/1]).
-
-%% Webtool API
--export([configData/0,
- start_link/0]).
--export([start_page/2,
- read_file_frame/2,
- read_file/2,
- redirect/2,
- filename_frame/2,
- menu_frame/2,
- initial_info_frame/2,
- toggle/2,
- general_info/2,
- processes/3,
- proc_details/2,
- port/2,
- ports/3,
- ets_tables/3,
- internal_ets_tables/2,
- timers/3,
- fun_table/3,
- atoms/3,
- dist_info/2,
- loaded_modules/3,
- loaded_mod_details/2,
- memory/2,
- allocated_areas/2,
- allocator_info/2,
- hash_tables/2,
- index_tables/2,
- sort_procs/3,
- expand/2,
- expand_binary/2,
- expand_memory/2]).
-
+-export([start/0,start/1,stop/0,script_start/0,script_start/1]).
+
+%% GUI API
+-export([start_link/0]).
+-export([read_file/1,
+ general_info/0,
+ processes/0,
+ proc_details/1,
+ port/1,
+ ports/0,
+ ets_tables/1,
+ internal_ets_tables/0,
+ timers/1,
+ funs/0,
+ atoms/0,
+ dist_info/0,
+ node_info/1,
+ loaded_modules/0,
+ loaded_mod_details/1,
+ memory/0,
+ allocated_areas/0,
+ allocator_info/0,
+ hash_tables/0,
+ index_tables/0,
+ expand_binary/1]).
+
+%% Library function
+-export([to_proplist/2, to_value_list/1]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -106,28 +79,11 @@
-include_lib("kernel/include/file.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
--define(START_PAGE,"/cdv_erl/crashdump_viewer/start_page").
--define(READ_FILE_PAGE,"/cdv_erl/crashdump_viewer/read_file?path=").
-define(SERVER, crashdump_viewer_server).
-define(call_timeout,3600000).
-define(chunk_size,1000). % number of bytes read from crashdump at a time
-define(max_line_size,100). % max number of bytes (i.e. characters) the
% line_head/1 function can return
--define(max_display_size,500). % max number of bytes that will be directly
- % displayed. If e.g. msg_q is longer than
- % this, it must be explicitly expanded.
--define(max_display_binary_size,50). % max size of a binary that will be
- % directly displayed.
--define(max_sort_process_num,10000). % Max number of processes that allows
- % sorting. If more than this number of
- % processes exist, they will be displayed
- % in the order they are found in the log.
--define(items_chunk_size,?max_sort_process_num). % Number of items per chunk
- % when page of many items
- % is displayed, e.g. processes,
- % timers, funs...
- % Must be equal to
- % ?max_sort_process_num!
-define(not_available,"N/A").
@@ -136,7 +92,6 @@
-define(allocator,allocator).
-define(atoms,atoms).
-define(binary,binary).
--define(debug_proc_dictionary,debug_proc_dictionary).
-define(ende,ende).
-define(erl_crash_dump,erl_crash_dump).
-define(ets,ets).
@@ -152,7 +107,6 @@
-define(no_distribution,no_distribution).
-define(node,node).
-define(not_connected,not_connected).
--define(num_atoms,num_atoms).
-define(old_instr_data,old_instr_data).
-define(port,port).
-define(proc,proc).
@@ -164,8 +118,7 @@
-define(visible_node,visible_node).
--record(state,{file,dump_vsn,procs_summary,sorted,shared_heap=false,
- wordsize=4,num_atoms="unknown",binaries,bg_status}).
+-record(state,{file,dump_vsn,wordsize=4,num_atoms="unknown",binaries}).
%%%-----------------------------------------------------------------
%%% Debugging
@@ -198,133 +151,72 @@ stop_debug() ->
%%%-----------------------------------------------------------------
%%% User API
start() ->
- webtool:start(),
- receive after 1000 -> ok end,
- webtool:start_tools([],"app=crashdump_viewer"),
- receive after 1000 -> ok end,
- ok.
+ start(undefined).
+start(File) ->
+ cdv_wx:start(File).
stop() ->
- webtool:stop_tools([],"app=crashdump_viewer"),
- webtool:stop().
+ case whereis(?SERVER) of
+ undefined ->
+ ok;
+ Pid ->
+ Ref = erlang:monitor(process,Pid),
+ cast(stop),
+ receive {'DOWN', Ref, process, Pid, _} -> ok end
+ end.
%%%-----------------------------------------------------------------
%%% Start crashdump_viewer via the cdv script located in
%%% $OBSERVER_PRIV_DIR/bin
script_start() ->
- usage().
-script_start([File]) ->
- DefaultBrowser =
- case os:type() of
- {win32,_} -> iexplore;
- {unix,darwin} -> open;
- _ -> firefox
- end,
- script_start([File,DefaultBrowser]);
-script_start([FileAtom,Browser]) ->
+ do_script_start(fun() -> start() end),
+ erlang:halt().
+script_start([FileAtom]) ->
File = atom_to_list(FileAtom),
case filelib:is_regular(File) of
true ->
- io:format("Starting crashdump_viewer...\n"),
- start(),
- io:format("Reading crashdump..."),
- read_file(File),
- redirect([],[]),
- io:format("done\n"),
- start_browser(Browser);
+ do_script_start(fun() -> start(File) end);
false ->
io:format("cdv error: the given file does not exist\n"),
usage()
- end.
-
-start_browser(Browser) ->
- PortStr = integer_to_list(gen_server:call(web_tool,get_port)),
- Url = "http://localhost:" ++ PortStr ++ ?START_PAGE,
- {OSType,_} = os:type(),
- case Browser of
- none ->
- ok;
- iexplore when OSType == win32->
- io:format("Starting internet explorer...\n"),
- {ok,R} = win32reg:open(""),
- Key="\\local_machine\\SOFTWARE\\Microsoft\\IE Setup\\Setup",
- win32reg:change_key(R,Key),
- {ok,Val} = win32reg:value(R,"Path"),
- IExplore=filename:join(win32reg:expand(Val),"iexplore.exe"),
- os:cmd("\"" ++ IExplore ++ "\" " ++ Url);
- _ when OSType == win32 ->
- io:format("Starting ~w...\n",[Browser]),
- os:cmd("\"" ++ atom_to_list(Browser) ++ "\" " ++ Url);
- B when B==firefox; B==mozilla ->
- io:format("Sending URL to ~w...",[Browser]),
- BStr = atom_to_list(Browser),
- SendCmd = BStr ++ " -raise -remote \'openUrl(" ++ Url ++ ")\'",
- Port = open_port({spawn,SendCmd},[exit_status]),
- receive
- {Port,{exit_status,0}} ->
- io:format("done\n");
- {Port,{exit_status,_Error}} ->
- io:format(" not running, starting ~w...\n",[Browser]),
- os:cmd(BStr ++ " " ++ Url)
- after 5000 ->
- io:format(" failed, starting ~w...\n",[Browser]),
- erlang:port_close(Port),
- os:cmd(BStr ++ " " ++ Url)
- end;
- _ ->
- io:format("Starting ~w...\n",[Browser]),
- os:cmd(atom_to_list(Browser) ++ " " ++ Url)
end,
- ok.
+ erlang:halt();
+script_start(_) ->
+ usage(),
+ erlang:halt().
+
+do_script_start(StartFun) ->
+ process_flag(trap_exit,true),
+ case StartFun() of
+ ok ->
+ case whereis(cdv_wx) of
+ Pid when is_pid(Pid) ->
+ link(Pid),
+ receive
+ {'EXIT', Pid, normal} ->
+ ok;
+ {'EXIT', Pid, Reason} ->
+ io:format("\ncdv crash: ~p\n",[Reason])
+ end;
+ _ ->
+ io:format("\ncdv crash: ~p\n",[unknown_reason])
+ end;
+ Error ->
+ io:format("\ncdv start failed: ~p\n",[Error])
+ end.
usage() ->
io:format(
- "\nusage: cdv file [ browser ]\n"
+ "usage: cdv [file]\n"
"\tThe \'file\' must be an existing erlang crash dump.\n"
- "\tDefault browser is \'iexplore\' (Internet Explorer) on Windows,\n"
- "\t\'open\' on Mac OS X, or else \'firefox\'.\n",
+ "\tIf omitted a file dialog will be opened.\n",
[]).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Return config data used by webtool
-configData() ->
- Dir = filename:join(code:priv_dir(observer),"crashdump_viewer"),
- {crashdump_viewer,
- [{web_data,{"CrashDumpViewer",?START_PAGE}},
- {alias,{"/crashdump_viewer",Dir}},
- {alias,{"/crashdump_erts_doc",erts_docdir()}},
- {alias,{"/crashdump_doc",cdv_docdir()}},
- {alias,{erl_alias,"/cdv_erl",[?MODULE]}},
- {start,{child,{{local,?SERVER},
- {?MODULE,start_link,[]},
- permanent,100,worker,[?MODULE]}}}
- ]}.
-
-erts_docdir() ->
- ErtsVsn = erlang:system_info(version),
- RootDir = code:root_dir(),
- VsnErtsDir = filename:join(RootDir,"erts-"++ErtsVsn),
- DocDir = filename:join(["doc","html"]),
- case filelib:is_dir(VsnErtsDir) of
- true ->
- filename:join(VsnErtsDir,DocDir);
- false ->
- %% So this can be run in clearcase
- filename:join([RootDir,"erts",DocDir])
- end.
-
-cdv_docdir() ->
- ObserverDir = code:lib_dir(observer),
- filename:join([ObserverDir,"doc","html"]).
-
%%====================================================================
%% External functions
%%====================================================================
%%%--------------------------------------------------------------------
-%%% Start the server
+%%% Start the server - called by cdv_wx
start_link() ->
case whereis(?SERVER) of
undefined ->
@@ -334,119 +226,63 @@ start_link() ->
end.
%%%-----------------------------------------------------------------
-%%% If crashdump_viewer is just started, show welcome frame. Else
-%%% show menu and general_info
-start_page(_Env,_Input) ->
- call(start_page).
-
-%%%-----------------------------------------------------------------
-%%% Display the form for entering the file name for the crashdump
-%%% to view.
-read_file_frame(_Env,_Input) ->
- crashdump_viewer_html:read_file_frame().
-
-%%%-----------------------------------------------------------------
-%%% Called when the 'ok' button is clicked after entering the dump
-%%% file name.
-read_file(_Env,Input) ->
- call({read_file,Input}).
-
-%%%-----------------------------------------------------------------
-%%% The topmost frame of the main page. Called when a crashdump is
-%%% loaded.
-filename_frame(_Env,_Input) ->
- call(filename_frame).
-
-%%%-----------------------------------------------------------------
-%%% The initial information frame. Called when a crashdump is loaded.
-initial_info_frame(_Env,_Input) ->
- call(initial_info_frame).
-
-%%%-----------------------------------------------------------------
-%%% The left frame of the main page. Called when a crashdump is
-%%% loaded.
-menu_frame(_Env,_Input) ->
- crashdump_viewer_html:menu_frame().
-
-%%%-----------------------------------------------------------------
-%%% Called when the collapsed or exploded picture in the menu is
-%%% clicked.
-toggle(_Env,Input) ->
- call({toggle,Input}).
+%%% Called by cdv_wx
+read_file(File) ->
+ cast({read_file,File}).
%%%-----------------------------------------------------------------
-%%% The following functions are called when menu items are clicked.
-general_info(_Env,_Input) ->
+%%% The following functions are called when the different tabs are
+%%% created
+general_info() ->
call(general_info).
-processes(SessionId,_Env,_Input) ->
- call({procs_summary,SessionId}).
-ports(SessionId,_Env,_Input) ->
- call({ports,SessionId}).
-ets_tables(SessionId,_Env,Input) ->
- call({ets_tables,SessionId,Input}).
-internal_ets_tables(_Env,_Input) ->
+processes() ->
+ call(procs_summary).
+ports() ->
+ call(ports).
+ets_tables(Owner) ->
+ call({ets_tables,Owner}).
+internal_ets_tables() ->
call(internal_ets_tables).
-timers(SessionId,_Env,Input) ->
- call({timers,SessionId,Input}).
-fun_table(SessionId,_Env,_Input) ->
- call({funs,SessionId}).
-atoms(SessionId,_Env,_Input) ->
- call({atoms,SessionId}).
-dist_info(_Env,_Input) ->
+timers(Owner) ->
+ call({timers,Owner}).
+funs() ->
+ call(funs).
+atoms() ->
+ call(atoms).
+dist_info() ->
call(dist_info).
-loaded_modules(SessionId,_Env,_Input) ->
- call({loaded_mods,SessionId}).
-loaded_mod_details(_Env,Input) ->
- call({loaded_mod_details,Input}).
-memory(_Env,_Input) ->
+node_info(Channel) ->
+ call({node_info,Channel}).
+loaded_modules() ->
+ call(loaded_mods).
+loaded_mod_details(Mod) ->
+ call({loaded_mod_details,Mod}).
+memory() ->
call(memory).
-allocated_areas(_Env,_Input) ->
+allocated_areas() ->
call(allocated_areas).
-allocator_info(_Env,_Input) ->
+allocator_info() ->
call(allocator_info).
-hash_tables(_Env,_Input) ->
+hash_tables() ->
call(hash_tables).
-index_tables(_Env,_Input) ->
+index_tables() ->
call(index_tables).
%%%-----------------------------------------------------------------
%%% Called when a link to a process (Pid) is clicked.
-proc_details(_Env,Input) ->
- call({proc_details,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when one of the headings in the process summary table are
-%%% clicked. It sorts the processes by the clicked heading.
-sort_procs(SessionId,_Env,Input) ->
- call({sort_procs,SessionId,Input}).
+proc_details(Pid) ->
+ call({proc_details,Pid}).
%%%-----------------------------------------------------------------
%%% Called when a link to a port is clicked.
-port(_Env,Input) ->
- call({port,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when the "Expand" link in a call stack (Last Calls) is
-%%% clicked.
-expand(_Env,Input) ->
- call({expand,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when the "Expand" link in a stack dump, message queue or
-%%% dictionary is clicked.
-expand_memory(_Env,Input) ->
- call({expand_memory,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when "<< xxx bytes>>" link in a stack dump, message queue or
-%%% dictionary is clicked.
-expand_binary(_Env,Input) ->
- call({expand_binary,Input}).
+port(Id) ->
+ call({port,Id}).
%%%-----------------------------------------------------------------
-%%% Called on regular intervals while waiting for a dump to be read
-redirect(_Env,_Input) ->
- call(redirect).
+%%% Called when "<< xxx bytes>>" link is clicket to open a new window
+%%% displaying the whole binary.
+expand_binary(Pos) ->
+ call({expand_binary,Pos}).
%%====================================================================
%% Server functions
@@ -461,8 +297,8 @@ redirect(_Env,_Input) ->
%% {stop, Reason}
%%--------------------------------------------------------------------
init([]) ->
- ets:new(cdv_menu_table,[set,named_table,{keypos,#menu_item.index},public]),
ets:new(cdv_dump_index_table,[ordered_set,named_table,public]),
+ ets:new(cdv_reg_proc_table,[ordered_set,named_table,public]),
{ok, #state{}}.
%%--------------------------------------------------------------------
@@ -475,223 +311,125 @@ init([]) ->
%% {stop, Reason, Reply, State} | (terminate/2 is called)
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_call(start_page,_From,State=#state{file=undefined,bg_status=undefined})->
- Reply = crashdump_viewer_html:welcome(),
- {reply,Reply,State};
-handle_call(start_page, _From, State=#state{file=undefined,bg_status={done,Page}}) ->
- {reply,Page,State};
-handle_call(start_page, _From, State=#state{file=undefined,bg_status=Status}) ->
- Reply = crashdump_viewer_html:redirect(Status),
- {reply,Reply,State};
-handle_call(start_page, _From, State) ->
- Reply = crashdump_viewer_html:start_page(),
- {reply,Reply,State};
-handle_call({read_file,Input}, _From, _State) ->
- {ok,File} = get_value("path",httpd:parse_query(Input)),
- spawn_link(fun() -> read_file(File) end),
- Status = background_status(reading,File),
- Reply = crashdump_viewer_html:redirect(Status),
- {reply, Reply, #state{bg_status=Status}};
-handle_call(redirect,_From, State=#state{bg_status={done,Page}}) ->
- {reply, Page, State#state{bg_status=undefined}};
-handle_call(redirect,_From, State=#state{bg_status=Status}) ->
- Reply = crashdump_viewer_html:redirect(Status),
- {reply, Reply, State};
-handle_call(filename_frame,_From,State=#state{file=File}) ->
- Reply = crashdump_viewer_html:filename_frame(File),
- {reply,Reply,State};
-handle_call(initial_info_frame,_From,State=#state{file=File}) ->
+handle_call(general_info,_From,State=#state{file=File}) ->
GenInfo = general_info(File),
- [{DumpVsn,_}] = lookup_index(?erl_crash_dump),
NumAtoms = GenInfo#general_info.num_atoms,
- {WS,SH} = parse_vsn_str(GenInfo#general_info.system_vsn,4,false),
- NumProcs = list_to_integer(GenInfo#general_info.num_procs),
- ProcsSummary =
- if NumProcs > ?max_sort_process_num -> too_many;
- true -> State#state.procs_summary
- end,
- NewState = State#state{dump_vsn=[list_to_integer(L) ||
- L<-string:tokens(DumpVsn,".")],
- shared_heap=SH,
- wordsize=WS,
- num_atoms=NumAtoms,
- procs_summary=ProcsSummary},
- Reply = crashdump_viewer_html:general_info(GenInfo),
- {reply,Reply,NewState};
-handle_call({toggle,Input},_From,State) ->
- {ok,Index} = get_value("index",httpd:parse_query(Input)),
- do_toggle(list_to_integer(Index)),
- Reply = crashdump_viewer_html:menu_frame(),
- {reply,Reply,State};
-handle_call({expand,Input},_From,State=#state{file=File}) ->
- [{"pos",Pos},{"size",Size},{"what",What},{"truncated",Truncated}] =
- httpd:parse_query(Input),
- Expanded = get_expanded(File,list_to_integer(Pos),list_to_integer(Size)),
- TruncText = if Truncated=="true" -> "WARNING: This term is truncated!\n\n";
- true -> ""
- end,
- Reply =
- case {Truncated,What} of
- {_,"LastCalls"} ->
- LastCalls = replace_all($ ,$\n,Expanded,[]),
- crashdump_viewer_html:info_page(What,[TruncText,LastCalls]);
- {_,"StackDump"} ->
- crashdump_viewer_html:info_page(What,[TruncText,Expanded]);
- {"false",_} ->
- crashdump_viewer_html:pretty_info_page(What,Expanded);
- {"true",_} ->
- crashdump_viewer_html:info_page(What,[TruncText,Expanded])
- end,
- {reply,Reply,State};
-handle_call({expand_memory,Input},_From,State=#state{file=File,binaries=B}) ->
- [{"pid",Pid},{"what",What}] = httpd:parse_query(Input),
- Reply =
- case truncated_warning([{?proc,Pid}]) of
- [] ->
- Expanded = expand_memory(File,What,Pid,B),
- crashdump_viewer_html:expanded_memory(What,Expanded);
- _TW ->
- Info =
- "The crashdump is truncated in the middle of this "
- "process' memory information, so this information "
- "can not be extracted.",
- crashdump_viewer_html:info_page(What,Info)
- end,
- {reply,Reply,State};
-handle_call({expand_binary,Input},_From,State=#state{file=File}) ->
- [{"pos",Pos0}] = httpd:parse_query(Input),
- Pos = list_to_integer(Pos0),
+ WS = parse_vsn_str(GenInfo#general_info.system_vsn,4),
+ TW = case get(truncated) of
+ true -> ["WARNING: The crash dump is truncated. "
+ "Some information might be missing."];
+ false -> []
+ end,
+ {reply,{ok,GenInfo,TW},State#state{wordsize=WS, num_atoms=NumAtoms}};
+handle_call({expand_binary,{Offset,Size,Pos}},_From,State=#state{file=File}) ->
Fd = open(File),
pos_bof(Fd,Pos),
- {Bin,_Line} = get_binary(val(Fd)),
+ {Bin,_Line} = get_binary(Offset,Size,val(Fd)),
close(Fd),
- Reply=crashdump_viewer_html:expanded_binary(io_lib:format("~p",[Bin])),
- {reply,Reply,State};
-handle_call(general_info,_From,State=#state{file=File}) ->
- GenInfo=general_info(File),
- Reply = crashdump_viewer_html:general_info(GenInfo),
- {reply,Reply,State};
-handle_call({procs_summary,SessionId},_From,State) ->
- TW = truncated_warning([?proc]),
- NewState = procs_summary(SessionId,TW,"pid",State#state{sorted=undefined}),
- {reply,ok,NewState};
-handle_call({sort_procs,SessionId,Input}, _From, State) ->
- {ok,Sort} = get_value("sort",httpd:parse_query(Input)),
+ {reply,{ok,Bin},State};
+handle_call(procs_summary,_From,State=#state{file=File,wordsize=WS}) ->
TW = truncated_warning([?proc]),
- NewState = procs_summary(SessionId,TW,Sort,State),
- {reply,ok,NewState};
-handle_call({proc_details,Input},_From,State=#state{file=File,shared_heap=SH}) ->
- {ok,Pid} = get_value("pid",httpd:parse_query(Input)),
+ Procs = procs_summary(File,WS),
+ {reply,{ok,Procs,TW},State};
+handle_call({proc_details,Pid},_From,
+ State=#state{file=File,wordsize=WS,dump_vsn=DumpVsn,binaries=B})->
Reply =
- case get_proc_details(File,Pid,State#state.dump_vsn) of
- {ok,Proc} ->
- TW = truncated_warning([{?proc,Pid}]),
- crashdump_viewer_html:proc_details(Pid,Proc,TW,SH);
- {other_node,Node} ->
- TW = truncated_warning([?visible_node,
- ?hidden_node,
- ?not_connected]),
- crashdump_viewer_html:nods(Node,TW);
- not_found ->
- crashdump_viewer_html:info_page(["Could not find process: ",
- Pid],?space)
+ case get_proc_details(File,Pid,WS,DumpVsn,B) of
+ {ok,Proc,TW} ->
+ {ok,Proc,TW};
+ Other ->
+ {error,Other}
end,
{reply, Reply, State};
-handle_call({port,Input},_From,State=#state{file=File}) ->
- {ok,P} = get_value("port",httpd:parse_query(Input)),
- Id = [$#|P],
+handle_call({port,Id},_From,State=#state{file=File}) ->
Reply =
case get_port(File,Id) of
{ok,PortInfo} ->
TW = truncated_warning([{?port,Id}]),
- crashdump_viewer_html:port(Id,PortInfo,TW);
- {other_node,Node} ->
- TW = truncated_warning([?visible_node,
- ?hidden_node,
- ?not_connected]),
- crashdump_viewer_html:nods(Node,TW);
- not_found ->
- crashdump_viewer_html:info_page(
- ["Could not find port: ",Id],?space)
+ {ok,PortInfo,TW};
+ Other ->
+ {error,Other}
end,
{reply,Reply,State};
-handle_call({ports,SessionId},_From,State=#state{file=File}) ->
+handle_call(ports,_From,State=#state{file=File}) ->
TW = truncated_warning([?port]),
- get_ports(SessionId,File,TW),
- {reply,ok,State};
-handle_call({ets_tables,SessionId,Input},_From,State=#state{file=File,wordsize=WS}) ->
- {Pid,Heading} =
- case get_value("pid",httpd:parse_query(Input)) of
- {ok,P} ->
- {P,["ETS Tables for Process ",P]};
- error ->
- {'$2',"ETS Table Information"}
+ Ports = get_ports(File),
+ {reply,{ok,Ports,TW},State};
+handle_call({ets_tables,Pid0},_From,State=#state{file=File,wordsize=WS}) ->
+ Pid =
+ case Pid0 of
+ all -> '$2';
+ _ -> Pid0
end,
TW = truncated_warning([?ets]),
- get_ets_tables(SessionId,File,Heading,TW,Pid,WS),
- {reply,ok,State};
+ Ets = get_ets_tables(File,Pid,WS),
+ {reply,{ok,Ets,TW},State};
handle_call(internal_ets_tables,_From,State=#state{file=File,wordsize=WS}) ->
InternalEts = get_internal_ets_tables(File,WS),
TW = truncated_warning([?internal_ets]),
- Reply = crashdump_viewer_html:internal_ets_tables(InternalEts,TW),
- {reply,Reply,State};
-handle_call({timers,SessionId,Input},_From,State=#state{file=File}) ->
- {Pid,Heading} =
- case get_value("pid",httpd:parse_query(Input)) of
- {ok,P} -> {P,["Timers for Process ",P]};
- error -> {'$2',"Timer Information"}
+ {reply,{ok,InternalEts,TW},State};
+handle_call({timers,Pid0},_From,State=#state{file=File}) ->
+ Pid =
+ case Pid0 of
+ all -> '$2';
+ _ -> Pid0
end,
TW = truncated_warning([?timer]),
- get_timers(SessionId,File,Heading,TW,Pid),
- {reply,ok,State};
+ Timers = get_timers(File,Pid),
+ {reply,{ok,Timers,TW},State};
handle_call(dist_info,_From,State=#state{file=File}) ->
- Nods=nods(File),
TW = truncated_warning([?visible_node,?hidden_node,?not_connected]),
- Reply = crashdump_viewer_html:nods(Nods,TW),
+ Nods=nods(File),
+ {reply,{ok,Nods,TW},State};
+handle_call({node_info,Channel},_From,State=#state{file=File}) ->
+ Reply =
+ case get_node(File,Channel) of
+ {ok,Nod} ->
+ TW = truncated_warning([?visible_node,
+ ?hidden_node,
+ ?not_connected]),
+ {ok,Nod,TW};
+ {error,Other} ->
+ {error,Other}
+ end,
{reply,Reply,State};
-handle_call({loaded_mods,SessionId},_From,State=#state{file=File}) ->
+handle_call(loaded_mods,_From,State=#state{file=File}) ->
TW = truncated_warning([?mod]),
- loaded_mods(SessionId,File,TW),
- {reply,ok,State};
-handle_call({loaded_mod_details,Input},_From,State=#state{file=File}) ->
- {ok,Mod} = get_value("mod",httpd:parse_query(Input)),
- ModInfo = get_loaded_mod_details(File,Mod),
+ {_CC,_OC,Mods} = loaded_mods(File),
+ {reply,{ok,Mods,TW},State};
+handle_call({loaded_mod_details,Mod},_From,State=#state{file=File}) ->
TW = truncated_warning([{?mod,Mod}]),
- Reply = crashdump_viewer_html:loaded_mod_details(ModInfo,TW),
- {reply,Reply,State};
-handle_call({funs,SessionId},_From,State=#state{file=File}) ->
+ ModInfo = get_loaded_mod_details(File,Mod),
+ {reply,{ok,ModInfo,TW},State};
+handle_call(funs,_From,State=#state{file=File}) ->
TW = truncated_warning([?fu]),
- funs(SessionId,File,TW),
- {reply,ok,State};
-handle_call({atoms,SessionId},_From,State=#state{file=File,num_atoms=Num}) ->
- TW = truncated_warning([?atoms,?num_atoms]),
- atoms(SessionId,File,TW,Num),
- {reply,ok,State};
+ Funs = funs(File),
+ {reply,{ok,Funs,TW},State};
+handle_call(atoms,_From,State=#state{file=File,num_atoms=NumAtoms0}) ->
+ TW = truncated_warning([?atoms]),
+ NumAtoms = try list_to_integer(NumAtoms0) catch error:badarg -> -1 end,
+ Atoms = atoms(File,NumAtoms),
+ {reply,{ok,Atoms,TW},State};
handle_call(memory,_From,State=#state{file=File}) ->
Memory=memory(File),
TW = truncated_warning([?memory]),
- Reply = crashdump_viewer_html:memory(Memory,TW),
- {reply,Reply,State};
+ {reply,{ok,Memory,TW},State};
handle_call(allocated_areas,_From,State=#state{file=File}) ->
AllocatedAreas=allocated_areas(File),
TW = truncated_warning([?allocated_areas]),
- Reply = crashdump_viewer_html:allocated_areas(AllocatedAreas,TW),
- {reply,Reply,State};
+ {reply,{ok,AllocatedAreas,TW},State};
handle_call(allocator_info,_From,State=#state{file=File}) ->
SlAlloc=allocator_info(File),
TW = truncated_warning([?allocator]),
- Reply = crashdump_viewer_html:allocator_info(SlAlloc,TW),
- {reply,Reply,State};
+ {reply,{ok,SlAlloc,TW},State};
handle_call(hash_tables,_From,State=#state{file=File}) ->
HashTables=hash_tables(File),
TW = truncated_warning([?hash_table,?index_table]),
- Reply = crashdump_viewer_html:hash_tables(HashTables,TW),
- {reply,Reply,State};
+ {reply,{ok,HashTables,TW},State};
handle_call(index_tables,_From,State=#state{file=File}) ->
IndexTables=index_tables(File),
TW = truncated_warning([?hash_table,?index_table]),
- Reply = crashdump_viewer_html:index_tables(IndexTables,TW),
- {reply,Reply,State}.
+ {reply,{ok,IndexTables,TW},State}.
@@ -702,11 +440,18 @@ handle_call(index_tables,_From,State=#state{file=File}) ->
%% {noreply, State, Timeout} |
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_cast({background_done,{Page,File,Binaries},Dict}, State) ->
- lists:foreach(fun({Key,Val}) -> put(Key,Val) end, Dict),
- {noreply, State#state{file=File,binaries=Binaries,bg_status={done,Page}}};
-handle_cast({background_status,Status}, State) ->
- {noreply, State#state{bg_status=Status}}.
+handle_cast({read_file,File}, _State) ->
+ case do_read_file(File) of
+ {ok,Binaries,DumpVsn} ->
+ observer_lib:report_progress({ok,done}),
+ {noreply, #state{file=File,binaries=Binaries,dump_vsn=DumpVsn}};
+ Error ->
+ end_progress(Error),
+ {noreply, #state{}}
+ end;
+handle_cast(stop,State) ->
+ {stop,normal,State}.
+
%%--------------------------------------------------------------------
%% Function: handle_info/2
@@ -791,24 +536,6 @@ compare_pid("<"++Id,"<"++OtherId) ->
compare_pid(_,_) ->
false.
-background_status(Action,File) ->
- SizeInfo = filesizeinfo(File),
- background_status(Action,File,SizeInfo).
-
-background_status(processing,File,SizeInfo) ->
- "Processing " ++ File ++ SizeInfo;
-background_status(reading,File,SizeInfo) ->
- "Reading file " ++ File ++ SizeInfo.
-
-filesizeinfo(File) ->
- case file:read_file_info(File) of
- {ok,#file_info{size=Size}} ->
- " (" ++ integer_to_list(Size) ++ " bytes)";
- _X ->
- ""
- end.
-
-
open(File) ->
{ok,Fd} = file:open(File,[read,read_ahead,raw,binary]),
Fd.
@@ -861,6 +588,18 @@ get_chunk(Fd) ->
{ok,Bin}
end.
+%% Read and report progress
+progress_read(Fd) ->
+ {R,Bytes} =
+ case read(Fd) of
+ {ok,Bin} ->
+ {{ok,Bin},byte_size(Bin)};
+ Other ->
+ {Other,0}
+ end,
+ update_progress(Bytes),
+ R.
+
read(Fd) ->
file:read(Fd,?chunk_size).
@@ -962,73 +701,30 @@ get_rest_of_line_1(Fd, <<>>, Acc) ->
eof -> {eof,lists:reverse(Acc)}
end.
-count_rest_of_line(Fd) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_line(Fd,Bin,0);
- eof -> {eof,0}
- end.
-count_rest_of_line(Fd,<<$\n:8,Bin/binary>>,N) ->
- put_chunk(Fd,Bin),
- N;
-count_rest_of_line(Fd,<<$\r:8,Bin/binary>>,N) ->
- count_rest_of_line(Fd,Bin,N);
-count_rest_of_line(Fd,<<_Char:8,Bin/binary>>,N) ->
- count_rest_of_line(Fd,Bin,N+1);
-count_rest_of_line(Fd,<<>>,N) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_line(Fd,Bin,N);
- eof -> {eof,N}
- end.
-
-get_n_lines_of_tag(Fd,N) ->
+get_lines_to_empty(Fd) ->
case get_chunk(Fd) of
- {ok,Bin} ->
- {AllOrPart,Rest,Lines} = get_n_lines_of_tag(Fd,N,Bin,[]),
- {AllOrPart,N-Rest,Lines};
+ {ok,Bin} ->
+ get_lines_to_empty(Fd,Bin,[],[]);
eof ->
- empty
- end.
-get_n_lines_of_tag(Fd,N,<<"\n=",_/binary>>=Bin,Acc) ->
- put_chunk(Fd,Bin),
- {all,N-1,lists:reverse(Acc)};
-get_n_lines_of_tag(Fd,0,Bin,Acc) ->
- put_chunk(Fd,Bin),
- {part,0,lists:reverse(Acc)};
-get_n_lines_of_tag(Fd,N,<<$\n:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N-1,Bin,[$\n|Acc]);
-get_n_lines_of_tag(Fd,N,<<$\r:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N,Bin,Acc);
-get_n_lines_of_tag(Fd,N,<<Char:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N,Bin,[Char|Acc]);
-get_n_lines_of_tag(Fd,N,<<>>,Acc) ->
- case get_chunk(Fd) of
- {ok,Bin} ->
- get_n_lines_of_tag(Fd,N,Bin,Acc);
- eof ->
- case Acc of
- [$\n|_] ->
- {all,N,lists:reverse(Acc)};
- _ ->
- {all,N-1,lists:reverse(Acc)}
- end
- end.
-
-count_rest_of_tag(Fd) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_tag(Fd,Bin,0);
- eof -> 0
+ []
end.
-count_rest_of_tag(Fd,<<"\n=",Bin/binary>>,N) ->
+get_lines_to_empty(Fd,<<$\n:8,Bin/binary>>,[],Lines) ->
put_chunk(Fd,Bin),
- N;
-count_rest_of_tag(Fd,<<$\r:8,Bin/binary>>,N) ->
- count_rest_of_tag(Fd,Bin,N);
-count_rest_of_tag(Fd,<<_Char:8,Bin/binary>>,N) ->
- count_rest_of_tag(Fd,Bin,N+1);
-count_rest_of_tag(Fd,<<>>,N) ->
+ lists:reverse(Lines);
+get_lines_to_empty(Fd,<<$\n:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,[],[lists:reverse(Acc)|Lines]);
+get_lines_to_empty(Fd,<<$\r:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,Acc,Lines);
+get_lines_to_empty(Fd,<<$\s:8,Bin/binary>>,[],Lines) ->
+ get_lines_to_empty(Fd,Bin,[],Lines);
+get_lines_to_empty(Fd,<<Char:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,[Char|Acc],Lines);
+get_lines_to_empty(Fd,<<>>,Acc,Lines) ->
case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_tag(Fd,Bin,N);
- eof -> N
+ {ok,Bin} ->
+ get_lines_to_empty(Fd,Bin,Acc,Lines);
+ eof ->
+ lists:reverse(Lines,[lists:reverse(Acc)])
end.
split(Str) ->
@@ -1046,150 +742,32 @@ split(Char,[H|T],Acc) ->
split(_Char,[],Acc) ->
{lists:reverse(Acc),[]}.
-size_or_term(Fd) ->
- size_or_term(Fd,get(pos)).
-size_or_term(Fd,Pos) ->
- case count_rest_of_line(Fd) of
- {eof,Size} ->
- {size,true,Size,Pos};
- Size when Size > ?max_display_size ->
- {size,false,Size,Pos};
- _Size ->
- {ok,Pos} = pos_bof(Fd,Pos),
- val(Fd)
- end.
-
%%%-----------------------------------------------------------------
%%%
-get_value(Key,List) ->
- case lists:keysearch(Key,1,List) of
- {value,{Key,Value}} -> {ok,Value};
- false -> error
- end.
-
-parse_vsn_str([],WS,false) ->
- %% If the log is translated, crashdump_translate might have written
- %% shared_heap=true in dictionary.
- case erase(shared_heap) of
- true -> {WS,true};
- _ -> {WS,false}
- end;
-parse_vsn_str([],WS,SH) ->
- {WS,SH};
-parse_vsn_str(Str,WS,SH) ->
+parse_vsn_str([],WS) ->
+ WS;
+parse_vsn_str(Str,WS) ->
case Str of
- "[64-bit]" ++ Rest ->
- case SH of
- false ->
- parse_vsn_str(Rest,8,false);
- _ ->
- {8,SH}
- end;
- "[shared heap]" ++ Rest ->
- case WS of
- 4 ->
- parse_vsn_str(Rest,WS,true);
- _ ->
- {WS,true}
- end;
+ "[64-bit]" ++ _Rest ->
+ 8;
[_Char|Rest] ->
- parse_vsn_str(Rest,WS,SH)
+ parse_vsn_str(Rest,WS)
end.
%%%-----------------------------------------------------------------
-%%%
-initial_menu() ->
- insert_items(
- [menu_item(0, {"./general_info","General information"},0),
- menu_item(0, {"./processes","Processes"}, 0),
- menu_item(0, {"./ports","Ports"}, 0),
- menu_item(2, "ETS tables", 0),
- menu_item(0, {"./ets_tables","ETS tables"}, 1),
- menu_item(0, {"./internal_ets_tables","Internal ETS tables"}, 1),
- menu_item(0, {"./timers","Timers"}, 0),
- menu_item(0, {"./fun_table","Fun table"}, 0),
- menu_item(0, {"./atoms","Atoms"}, 0),
- menu_item(0, {"./dist_info","Distribution information"}, 0),
- menu_item(0, {"./loaded_modules","Loaded modules"}, 0),
- menu_item(2, "Internal Tables", 0),
- menu_item(0, {"./hash_tables","Hash tables"}, 1),
- menu_item(0, {"./index_tables","Index tables"}, 1),
- menu_item(3, "Memory information", 0),
- menu_item(0, {"./memory","Memory"}, 1),
- menu_item(0, {"./allocated_areas","Allocated areas"}, 1),
- menu_item(0, {"./allocator_info","Allocator information"}, 1),
- menu_item(2, "Documentation", 0),
- menu_item(0, {"/crashdump_doc/crashdump_help.html",
- "Crashdump Viewer help"}, 1,"doc"),
- menu_item(0, {"/crashdump_erts_doc/crash_dump.html",
- "How to interpret Erlang crashdumps"}, 1,"doc")]).
-
-menu_item(Children,Text,Depth) ->
- menu_item(Children,Text,Depth,"main").
-menu_item(Children,Text,Depth,Target) ->
- #menu_item{picture=get_pic(Children),
- text=Text,
- depth=Depth,
- children=Children,
- state=if Depth==0 -> true; true -> false end,
- target=Target}.
-
-insert_items(Items) ->
- insert_items(Items,1).
-insert_items([Item|Items],Index) ->
- ets:insert(cdv_menu_table,Item#menu_item{index=Index}),
- insert_items(Items,Index+1);
-insert_items([],_) ->
- ok.
-
-get_pic(0) ->
- "";
-get_pic(_) ->
- "/crashdump_viewer/collapsd.gif".
-
-do_toggle(Index) ->
- [Item]= ets:lookup(cdv_menu_table,Index),
- case toggle_children(Index,Index+Item#menu_item.children,
- Item#menu_item.depth+1,undefined) of
- true ->
- ets:insert(cdv_menu_table,
- Item#menu_item{picture=
- "/crashdump_viewer/exploded.gif"});
- false ->
- ets:insert(cdv_menu_table,
- Item#menu_item{picture=
- "/crashdump_viewer/collapsd.gif"})
- end.
-
-toggle_children(Index,Max,_Depth,ToggleState) when Index>Max->
- ToggleState;
-toggle_children(Index,Max,Depth,ToggleState) ->
- case ets:lookup(cdv_menu_table,Index+1) of
- [#menu_item{depth=Depth}=Child] ->
- NewState = not Child#menu_item.state,
- ets:insert(cdv_menu_table,Child#menu_item{state=NewState}),
- toggle_children(Index+1,Max,Depth,NewState);
- _ ->
- toggle_children(Index+1,Max,Depth,ToggleState)
- end.
-
-%%%-----------------------------------------------------------------
%%% Traverse crash dump and insert index in table for each heading
-%%%
-%%% This function is executed in a background process in order to
-%%% avoid a timeout in the web browser. The browser displays "Please
-%%% wait..." while this is going on.
%%%
-%%% Variable written to process dictionary in this function are copied
-%%% to the crashdump_viewer_server when the function is completed (see
-%%% background_done/1).
-read_file(File) ->
+%%% Progress is reported during the time and MUST be checked with
+%%% crashdump_viewer:get_progress/0 until it returns {ok,done}.
+do_read_file(File) ->
case file:read_file_info(File) of
- {ok,#file_info{type=regular,access=FileA}} when FileA=:=read;
- FileA=:=read_write ->
+ {ok,#file_info{type=regular,
+ access=FileA,
+ size=Size}} when FileA=:=read; FileA=:=read_write ->
Fd = open(File),
- case read(Fd) of
+ init_progress("Reading file",Size),
+ case progress_read(Fd) of
{ok,<<$=:8,TagAndRest/binary>>} ->
{Tag,Id,Rest,N1} = tag(Fd,TagAndRest,1),
case Tag of
@@ -1197,41 +775,40 @@ read_file(File) ->
reset_index_table(),
insert_index(Tag,Id,N1+1),
put(last_tag,{Tag,""}),
- Status = background_status(processing,File),
- background_status(Status),
indexify(Fd,Rest,N1),
+ end_progress(),
check_if_truncated(),
- initial_menu(),
- Binaries = read_binaries(Fd),
- R = crashdump_viewer_html:start_page(),
+ [{DumpVsn0,_}] = lookup_index(?erl_crash_dump),
+ DumpVsn = [list_to_integer(L) ||
+ L<-string:tokens(DumpVsn0,".")],
+ Binaries = read_binaries(Fd,DumpVsn),
close(Fd),
- background_done({R,File,Binaries});
+ {ok,Binaries,DumpVsn};
_Other ->
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"~s is not an Erlang crash dump~n",
[File]),
close(Fd),
- background_done({R,undefined,undefined})
+ {error,R}
end;
{ok,<<"<Erlang crash dump>",_Rest/binary>>} ->
%% old version - no longer supported
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"The crashdump ~s is in the pre-R10B format, "
"which is no longer supported.~n",
- [File]),
+ [File]),
close(Fd),
- background_done({R,undefined,undefined});
+ {error,R};
_Other ->
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"~s is not an Erlang crash dump~n",
[File]),
close(Fd),
- background_done({R,undefined,undefined})
+ {error,R}
end;
_other ->
- R = crashdump_viewer_html:error("~s is not an Erlang crash dump~n",
- [File]),
- background_done({R,undefined,undefined})
+ R = io_lib:format("~s is not an Erlang crash dump~n",[File]),
+ {error,R}
end.
indexify(Fd,Bin,N) ->
@@ -1244,7 +821,7 @@ indexify(Fd,Bin,N) ->
put(last_tag,{Tag,Id}),
indexify(Fd,Rest,N1);
nomatch ->
- case read(Fd) of
+ case progress_read(Fd) of
{ok,Chunk0} when is_binary(Chunk0) ->
{Chunk,N1} =
case binary:last(Bin) of
@@ -1272,7 +849,7 @@ tag(Fd,<<Char:8,Rest/binary>>,N,Gat,Di,tag) ->
tag(Fd,<<Char:8,Rest/binary>>,N,Gat,Di,id) ->
tag(Fd,Rest,N+1,Gat,[Char|Di],id);
tag(Fd,<<>>,N,Gat,Di,Now) ->
- case read(Fd) of
+ case progress_read(Fd) of
{ok,Chunk} when is_binary(Chunk) ->
tag(Fd,Chunk,N,Gat,Di,Now);
eof ->
@@ -1304,21 +881,12 @@ find_truncated_proc({Tag,Pid}) ->
is_proc_tag(Tag) when Tag==?proc;
Tag==?proc_dictionary;
Tag==?proc_messages;
- Tag==?debug_proc_dictionary;
Tag==?proc_stack;
Tag==?proc_heap ->
true;
is_proc_tag(_) ->
false.
-%%% Inform the crashdump_viewer_server that a background job is completed.
-background_done(Result) ->
- Dict = get(),
- cast({background_done,Result,Dict}).
-
-background_status(Status) ->
- cast({background_status,Status}).
-
%%%-----------------------------------------------------------------
%%% Functions for reading information from the dump
general_info(File) ->
@@ -1330,22 +898,18 @@ general_info(File) ->
WholeLine -> WholeLine
end,
- GI0 = get_general_info(Fd,#general_info{created=Created}),
- GI = case GI0#general_info.num_atoms of
- ?space -> GI0#general_info{num_atoms=get_num_atoms(Fd)};
- _ -> GI0
- end,
+ GI = get_general_info(Fd,#general_info{created=Created}),
{MemTot,MemMax} =
case lookup_index(?memory) of
[{_,MemStart}] ->
pos_bof(Fd,MemStart),
Memory = get_meminfo(Fd,[]),
- Tot = case lists:keysearch("total",1,Memory) of
+ Tot = case lists:keysearch(total,1,Memory) of
{value,{_,T}} -> T;
false -> ""
end,
- Max = case lists:keysearch("maximum",1,Memory) of
+ Max = case lists:keysearch(maximum,1,Memory) of
{value,{_,M}} -> M;
false -> ""
end,
@@ -1408,269 +972,221 @@ get_general_info(Fd,GenInfo) ->
GenInfo
end.
-get_num_atoms(Fd) ->
- case lookup_index(?hash_table,"atom_tab") of
- [{_,Pos}] ->
- pos_bof(Fd,Pos),
- skip_rest_of_line(Fd), % size
- skip_rest_of_line(Fd), % used
- case line_head(Fd) of
- "objs" ->
- val(Fd);
- _1 ->
- get_num_atoms2()
- end;
- [] ->
- get_num_atoms2()
- end.
-get_num_atoms2() ->
- case lookup_index(?num_atoms) of
- [] ->
- ?space;
- [{NA,_Pos}] ->
- %% If dump is translated this will exist
- case get(truncated) of
- true ->
- [NA," (visible in dump)"]; % might be more
- false ->
- NA
- end
- end.
-
count() ->
{count_index(?proc),count_index(?ets),count_index(?fu),count_index(?timer)}.
%%-----------------------------------------------------------------
%% Page with all processes
-%%
-%% If there are less than ?max_sort_process_num processes in the dump,
-%% we will store the list of processes in the server state in order to
-%% allow sorting according to the different columns of the
-%% table. Since ?max_sort_process_num=:=?items_chunk_size, there will
-%% never be more than one chunk in this case.
-%%
-%% If there are more than ?max_sort_process_num processes in the dump,
-%% no sorting will be allowed, and the processes must be read (chunk
-%% by chunk) from the file each time the page is opened. This is to
-%% avoid really big data in the server state.
-procs_summary(SessionId,TW,_,State=#state{procs_summary=too_many}) ->
- chunk_page(SessionId,State#state.file,TW,?proc,processes,
- {no_sort,State#state.shared_heap,State#state.dump_vsn},
- procs_summary_parsefun()),
- State;
-procs_summary(SessionId,TW,SortOn,State) ->
- ProcsSummary =
- case State#state.procs_summary of
- undefined -> % first time - read from file
- Fd = open(State#state.file),
- {PS,_}=lookup_and_parse_index_chunk(first_chunk_pointer(?proc),
- Fd,procs_summary_parsefun()),
- close(Fd),
- PS;
- PS ->
- PS
- end,
- {SortedPS,NewSorted} = do_sort_procs(SortOn,ProcsSummary,State),
- HtmlInfo =
- crashdump_viewer_html:chunk_page(processes,SessionId,TW,
- {SortOn,
- State#state.shared_heap,
- State#state.dump_vsn},
- SortedPS),
- crashdump_viewer_html:chunk(SessionId,done,HtmlInfo),
- State#state{procs_summary=ProcsSummary,sorted=NewSorted}.
-
-procs_summary_parsefun() ->
- fun(Fd,Pid) ->
- get_procinfo(Fd,fun main_procinfo/4,#proc{pid=Pid})
- end.
+procs_summary(File,WS) ->
+ ParseFun = fun(Fd,Pid0) ->
+ Pid = list_to_pid(Pid0),
+ Proc = get_procinfo(Fd,fun main_procinfo/5,
+ #proc{pid=Pid},WS),
+ case Proc#proc.name of
+ undefined ->
+ true;
+ Name ->
+ %% Registered process - store to allow
+ %% lookup for timers connected to
+ %% registered name instead of pid.
+ ets:insert(cdv_reg_proc_table,{Name,Pid}),
+ ets:insert(cdv_reg_proc_table,{Pid0,Name})
+ end,
+ case Proc#proc.memory of
+ undefined -> Proc#proc{memory=Proc#proc.stack_heap};
+ _ -> Proc
+ end
+ end,
+ lookup_and_parse_index(File,?proc,ParseFun,"processes").
%%-----------------------------------------------------------------
%% Page with one process
-get_proc_details(File,Pid,DumpVsn) ->
+get_proc_details(File,Pid,WS,DumpVsn,Binaries) ->
case lookup_index(?proc,Pid) of
[{_,Start}] ->
Fd = open(File),
- pos_bof(Fd,Start),
- Proc0 =
- case DumpVsn of
- [0,0] ->
- %% Old version (translated)
- #proc{pid=Pid};
- _ ->
- #proc{pid=Pid,
- stack_dump=if_exist(?proc_stack,Pid),
- msg_q=if_exist(?proc_messages,Pid),
- dict=if_exist(?proc_dictionary,Pid),
- debug_dict=if_exist(?debug_proc_dictionary,Pid)}
+ {{Stack,MsgQ,Dict},TW} =
+ case truncated_warning([{?proc,Pid}]) of
+ [] ->
+ {expand_memory(Fd,Pid,DumpVsn,Binaries),[]};
+ TW0 ->
+ {{[],[],[]},TW0}
end,
- Proc = get_procinfo(Fd,fun all_procinfo/4,Proc0),
+ pos_bof(Fd,Start),
+ Proc0 = #proc{pid=Pid,stack_dump=Stack,msg_q=MsgQ,dict=Dict},
+ Proc = get_procinfo(Fd,fun all_procinfo/5,Proc0,WS),
close(Fd),
- {ok,Proc};
+ {ok,Proc,TW};
_ ->
- case maybe_other_node(File,Pid) of
- {other_node,Type,Node} ->
- Info = "The process you are searching for was residing on "
- "a remote node. No process information is available. "
- "Information about the remote node is show below.",
- {other_node,{Type,Info,Node}};
- not_found ->
- not_found
- end
+ maybe_other_node(Pid)
end.
-if_exist(Tag,Key) ->
- case count_index(Tag,Key) of
- 0 ->
- Tag1 =
- case is_proc_tag(Tag) of
- true -> ?proc;
- false -> Tag
- end,
- case truncated_here({Tag1,Key}) of
- true -> truncated;
- false -> ?space
- end;
- _ ->
- expand
- end.
-
-get_procinfo(Fd,Fun,Proc) ->
+get_procinfo(Fd,Fun,Proc,WS) ->
case line_head(Fd) of
"State" ->
State = case val(Fd) of
"Garbing" -> "Garbing\n(limited info)";
State0 -> State0
end,
- get_procinfo(Fd,Fun,Proc#proc{state=State});
+ get_procinfo(Fd,Fun,Proc#proc{state=State},WS);
"Name" ->
- get_procinfo(Fd,Fun,Proc#proc{name=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{name=val(Fd)},WS);
"Spawned as" ->
IF = val(Fd),
case Proc#proc.name of
- ?space ->
- get_procinfo(Fd,Fun,Proc#proc{name=IF,init_func=IF});
+ undefined ->
+ get_procinfo(Fd,Fun,Proc#proc{name=IF,init_func=IF},WS);
_ ->
- get_procinfo(Fd,Fun,Proc#proc{init_func=IF})
+ get_procinfo(Fd,Fun,Proc#proc{init_func=IF},WS)
end;
+ "Message queue length" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{msg_q_len=list_to_integer(val(Fd))},WS);
+ "Reductions" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{reds=list_to_integer(val(Fd))},WS);
+ "Stack+heap" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{stack_heap=
+ list_to_integer(val(Fd))*WS},WS);
+ "Memory" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{memory=list_to_integer(val(Fd))},WS);
+ {eof,_} ->
+ Proc; % truncated file
+ Other ->
+ Fun(Fd,Fun,Proc,WS,Other)
+ end.
+
+main_procinfo(Fd,Fun,Proc,WS,LineHead) ->
+ case LineHead of
+ "=" ++ _next_tag ->
+ Proc;
+ "arity = " ++ _ ->
+ %%! Temporary workaround
+ get_procinfo(Fd,Fun,Proc,WS);
+ _Other ->
+ skip_rest_of_line(Fd),
+ get_procinfo(Fd,Fun,Proc,WS)
+ end.
+all_procinfo(Fd,Fun,Proc,WS,LineHead) ->
+ case LineHead of
+ %% - START - moved from get_procinfo -
"Spawned by" ->
case val(Fd) of
"[]" ->
- get_procinfo(Fd,Fun,Proc);
+ get_procinfo(Fd,Fun,Proc,WS);
Parent ->
- get_procinfo(Fd,Fun,Proc#proc{parent=Parent})
+ get_procinfo(Fd,Fun,Proc#proc{parent=Parent},WS)
end;
"Started" ->
- get_procinfo(Fd,Fun,Proc#proc{start_time=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{start_time=val(Fd)},WS);
"Last scheduled in for" ->
get_procinfo(Fd,Fun,Proc#proc{current_func=
{"Last scheduled in for",
- val(Fd)}});
+ val(Fd)}},WS);
"Current call" ->
get_procinfo(Fd,Fun,Proc#proc{current_func={"Current call",
- val(Fd)}});
- "Message queue length" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{msg_q_len=list_to_integer(val(Fd))});
- "Reductions" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{reds=list_to_integer(val(Fd))});
+ val(Fd)}},WS);
"Number of heap fragments" ->
- get_procinfo(Fd,Fun,Proc#proc{num_heap_frag=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{num_heap_frag=val(Fd)},WS);
"Heap fragment data" ->
- get_procinfo(Fd,Fun,Proc#proc{heap_frag_data=val(Fd)});
- Stack when Stack=:="Stack+heap"; Stack=:="Stack" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{stack_heap=
- list_to_integer(val(Fd))});
+ get_procinfo(Fd,Fun,Proc#proc{heap_frag_data=val(Fd)},WS);
"OldHeap" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{old_heap=Bytes},WS);
"Heap unused" ->
- get_procinfo(Fd,Fun,Proc#proc{heap_unused=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{heap_unused=Bytes},WS);
"OldHeap unused" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_unused=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_unused=Bytes},WS);
"New heap start" ->
- get_procinfo(Fd,Fun,Proc#proc{new_heap_start=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{new_heap_start=val(Fd)},WS);
"New heap top" ->
- get_procinfo(Fd,Fun,Proc#proc{new_heap_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{new_heap_top=val(Fd)},WS);
"Stack top" ->
- get_procinfo(Fd,Fun,Proc#proc{stack_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{stack_top=val(Fd)},WS);
"Stack end" ->
- get_procinfo(Fd,Fun,Proc#proc{stack_end=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{stack_end=val(Fd)},WS);
"Old heap start" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_start=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_start=val(Fd)},WS);
"Old heap top" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_top=val(Fd)},WS);
"Old heap end" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_end=val(Fd)});
- "Memory" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{memory=list_to_integer(val(Fd))});
- {eof,_} ->
- Proc; % truncated file
- Other ->
- Fun(Fd,Fun,Proc,Other)
- end.
-
-main_procinfo(Fd,Fun,Proc,LineHead) ->
- case LineHead of
- "Stack dump" ->
- %% This is the last element in older dumps (DumpVsn=0.0)
- Proc;
- "=" ++ _next_tag ->
- %% DumpVsn=0.1 or newer: No stack dump here
- Proc;
- "arity = " ++ _ ->
- %%! Temporary workaround
- get_procinfo(Fd,Fun,Proc);
- _Other ->
- skip_rest_of_line(Fd),
- get_procinfo(Fd,Fun,Proc)
- end.
-all_procinfo(Fd,Fun,Proc,LineHead) ->
- case LineHead of
- "Message queue" ->
- get_procinfo(Fd,Fun,Proc#proc{msg_q=size_or_term(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_end=val(Fd)},WS);
+ %% - END - moved from get_procinfo -
"Last calls" ->
- R = case size_or_term(Fd) of
- SizeThing when is_tuple(SizeThing) ->
- Proc#proc{last_calls=SizeThing};
- Term ->
- Proc#proc{last_calls=replace_all($ ,$\n,Term,[])}
- end,
- get_procinfo(Fd,Fun,R);
+ get_procinfo(Fd,Fun,Proc#proc{last_calls=get_lines_to_empty(Fd)},WS);
"Link list" ->
- get_procinfo(Fd,Fun,Proc#proc{links=val(Fd)});
+ {Links,Monitors,MonitoredBy} = parse_link_list(val(Fd),[],[],[]),
+ get_procinfo(Fd,Fun,Proc#proc{links=Links,
+ monitors=Monitors,
+ mon_by=MonitoredBy},WS);
"Program counter" ->
- get_procinfo(Fd,Fun,Proc#proc{prog_count=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{prog_count=val(Fd)},WS);
"CP" ->
- get_procinfo(Fd,Fun,Proc#proc{cp=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{cp=val(Fd)},WS);
"arity = " ++ Arity ->
%%! Temporary workaround
- get_procinfo(Fd,Fun,Proc#proc{arity=Arity--"\r\n"});
- "Dictionary" ->
- get_procinfo(Fd,Fun,Proc#proc{dict=size_or_term(Fd)});
- "$Dictionary" ->
- get_procinfo(Fd,Fun,Proc#proc{debug_dict=size_or_term(Fd)});
- "Stack dump" ->
- %% This is the last element in older dumps (DumpVsn=0.0)
- get_stack_dump(Fd,Proc);
+ get_procinfo(Fd,Fun,Proc#proc{arity=Arity--"\r\n"},WS);
"=" ++ _next_tag ->
- %% DumpVsn=0.1 or newer: No stack dump here
Proc;
Other ->
unexpected(Fd,Other,"process info"),
- get_procinfo(Fd,Fun,Proc)
+ get_procinfo(Fd,Fun,Proc,WS)
+ end.
+
+parse_link_list([SB|Str],Links,Monitors,MonitoredBy) when SB==$[; SB==$] ->
+ parse_link_list(Str,Links,Monitors,MonitoredBy);
+parse_link_list("#Port"++_=Str,Links,Monitors,MonitoredBy) ->
+ {Link,Rest} = parse_port(Str),
+ parse_link_list(Rest,[Link|Links],Monitors,MonitoredBy);
+parse_link_list("<"++_=Str,Links,Monitors,MonitoredBy) ->
+ {Link,Rest} = parse_pid(Str),
+ parse_link_list(Rest,[Link|Links],Monitors,MonitoredBy);
+parse_link_list("{to,"++Str,Links,Monitors,MonitoredBy) ->
+ {Mon,Rest} = parse_monitor(Str),
+ parse_link_list(Rest,Links,[Mon|Monitors],MonitoredBy);
+parse_link_list("{from,"++Str,Links,Monitors,MonitoredBy) ->
+ {Mon,Rest} = parse_monitor(Str),
+ parse_link_list(Rest,Links,Monitors,[Mon|MonitoredBy]);
+parse_link_list(", "++Rest,Links,Monitors,MonitoredBy) ->
+ parse_link_list(Rest,Links,Monitors,MonitoredBy);
+parse_link_list([],Links,Monitors,MonitoredBy) ->
+ {lists:reverse(Links),lists:reverse(Monitors),lists:reverse(MonitoredBy)}.
+
+parse_port(Str) ->
+ {Port,Rest} = parse_link(Str,[]),
+ {{Port,Port},Rest}.
+
+parse_pid(Str) ->
+ {Pid,Rest} = parse_link(Str,[]),
+ {{Pid,Pid},Rest}.
+
+parse_monitor(Str) ->
+ case parse_link(Str,[]) of
+ {Pid,","++Rest1} ->
+ case parse_link(Rest1,[]) of
+ {Ref,"}"++Rest2} ->
+ {{Pid,Pid++" ("++Ref++")"},Rest2};
+ {Ref,[]} ->
+ {{Pid,Pid++" ("++Ref++")"},[]}
+ end;
+ {Pid,[]} ->
+ {{Pid,Pid++" (unknown_ref)"},[]}
end.
-get_stack_dump(Fd,Proc) ->
- %% Always show stackdump as "Expand" link
- Pos = get(pos),
- Size = count_rest_of_tag(Fd),
- Proc#proc{stack_dump={size,true,Size,Pos}}.
+parse_link(">"++Rest,Acc) ->
+ {lists:reverse(Acc,">"),Rest};
+parse_link([H|T],Acc) ->
+ parse_link(T,[H|Acc]);
+parse_link([],Acc) ->
+ %% truncated
+ {lists:reverse(Acc),[]}.
-maybe_other_node(File,Id) ->
+maybe_other_node(Id) ->
Channel =
case split($.,Id) of
{"<" ++ N, _Rest} ->
@@ -1688,99 +1204,77 @@ maybe_other_node(File,Id) ->
end),
case ets:select(cdv_dump_index_table,Ms) of
- [] ->
+ [] ->
not_found;
- [{Type,Pos}] ->
- Fd = open(File),
- NodeInfo = get_nodeinfo(Fd,Channel,Pos),
- close(Fd),
- {other_node,Type,NodeInfo}
+ [_] ->
+ {other_node,Channel}
end.
-expand_memory(File,What,Pid,Binaries) ->
- Fd = open(File),
+expand_memory(Fd,Pid,DumpVsn,Binaries) ->
+ BinAddrAdj = get_bin_addr_adj(DumpVsn),
put(fd,Fd),
- Dict = read_heap(Fd,Pid,Binaries),
- Expanded =
- case What of
- "StackDump" -> read_stack_dump(Fd,Pid,Dict);
- "MsgQueue" -> read_messages(Fd,Pid,Dict);
- "Dictionary" -> read_dictionary(Fd,?proc_dictionary,Pid,Dict);
- "DebugDictionary" -> read_dictionary(Fd,?debug_proc_dictionary,Pid,Dict)
- end,
+ Dict = read_heap(Fd,Pid,BinAddrAdj,Binaries),
+ Expanded = {read_stack_dump(Fd,Pid,BinAddrAdj,Dict),
+ read_messages(Fd,Pid,BinAddrAdj,Dict),
+ read_dictionary(Fd,Pid,BinAddrAdj,Dict)},
erase(fd),
- close(Fd),
Expanded.
-
+
+%%%-----------------------------------------------------------------
+%%% This is a workaround for a bug in dump versions prior to 0.3:
+%%% Addresses were truncated to 32 bits. This could cause binaries to
+%%% get the same address as heap terms in the dump. To work around it
+%%% we always store binaries on very high addresses in the gb_tree.
+get_bin_addr_adj(DumpVsn) when DumpVsn < [0,3] ->
+ 16#f bsl 64;
+get_bin_addr_adj(_) ->
+ 0.
+
%%%
%%% Read binaries.
%%%
-read_binaries(Fd) ->
+read_binaries(Fd,DumpVsn) ->
AllBinaries = lookup_index(?binary),
- read_binaries(Fd,AllBinaries, gb_trees:empty()).
-
-read_binaries(Fd,[{Addr0,Pos}|Bins],Dict0) ->
- pos_bof(Fd,Pos),
- {Addr,_} = get_hex(Addr0),
- Dict =
- case line_head(Fd) of
- {eof,_} ->
- gb_trees:enter(Addr,'#CDVTruncatedBinary',Dict0);
- Size0 ->
- {Size,_} = get_hex(Size0),
- if Size > ?max_display_binary_size ->
- gb_trees:enter(Addr,{'#CDVTooBig',binary,Pos},Dict0);
- true ->
- pos_bof(Fd,Pos),
- Line = val(Fd),
- parse_binary(Addr,Line,Dict0)
- end
- end,
- read_binaries(Fd,Bins,Dict);
-read_binaries(_Fd,[],Dict) ->
- Dict.
-
-parse_binary(Addr, Line0, Dict) ->
- case get_hex(Line0) of
- {N,":"++Line1} ->
- {Bin,Line} = get_binary(N, Line1, []),
- [] = skip_blanks(Line),
- gb_trees:enter(Addr, Bin, Dict);
- {_N,[]} ->
- %% If the dump is truncated before the ':' in this line, then
- %% line_head/1 might not discover it (if a \n has been inserted
- %% somehow???)
- gb_trees:enter(Addr,'#CDVTruncatedBinary',Dict)
- end.
-
-
+ AddrAdj = get_bin_addr_adj(DumpVsn),
+ Fun = fun({Addr0,Pos},Dict0) ->
+ pos_bof(Fd,Pos),
+ {HexAddr,_} = get_hex(Addr0),
+ Addr = HexAddr bor AddrAdj,
+ Bin =
+ case line_head(Fd) of
+ {eof,_} -> '#CDVTruncatedBinary';
+ _Size -> {'#CDVBin',Pos}
+ end,
+ gb_trees:enter(Addr,Bin,Dict0)
+ end,
+ progress_foldl("Processing binaries",Fun,gb_trees:empty(),AllBinaries).
%%%
%%% Read top level section.
%%%
-read_stack_dump(Fd,Pid,Dict) ->
+read_stack_dump(Fd,Pid,BinAddrAdj,Dict) ->
case lookup_index(?proc_stack,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_stack_dump1(Fd,Dict,[]);
+ read_stack_dump1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_stack_dump1(Fd,Dict,Acc) ->
+read_stack_dump1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Stack = parse_top(Line,Dict),
- read_stack_dump1(Fd,Dict,[Stack|Acc])
+ Stack = parse_top(Line,BinAddrAdj,Dict),
+ read_stack_dump1(Fd,BinAddrAdj,Dict,[Stack|Acc])
end.
-parse_top(Line0, D) ->
+parse_top(Line0, BinAddrAdj, D) ->
{Label,Line1} = get_label(Line0),
- {Term,Line,D} = parse_term(Line1, D),
+ {Term,Line,D} = parse_term(Line1, BinAddrAdj, D),
[] = skip_blanks(Line),
{Label,Term}.
@@ -1788,27 +1282,27 @@ parse_top(Line0, D) ->
%%% Read message queue.
%%%
-read_messages(Fd,Pid,Dict) ->
+read_messages(Fd,Pid,BinAddrAdj,Dict) ->
case lookup_index(?proc_messages,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_messages1(Fd,Dict,[]);
+ read_messages1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_messages1(Fd,Dict,Acc) ->
+read_messages1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Msg = parse_message(Line,Dict),
- read_messages1(Fd,Dict,[Msg|Acc])
+ Msg = parse_message(Line,BinAddrAdj,Dict),
+ read_messages1(Fd,BinAddrAdj,Dict,[Msg|Acc])
end.
-parse_message(Line0, D) ->
- {Msg,":"++Line1,_} = parse_term(Line0, D),
- {Token,Line,_} = parse_term(Line1, D),
+parse_message(Line0, BinAddrAdj, D) ->
+ {Msg,":"++Line1,_} = parse_term(Line0, BinAddrAdj, D),
+ {Token,Line,_} = parse_term(Line1, BinAddrAdj, D),
[] = skip_blanks(Line),
{Msg,Token}.
@@ -1816,26 +1310,26 @@ parse_message(Line0, D) ->
%%% Read process dictionary
%%%
-read_dictionary(Fd,Tag,Pid,Dict) ->
- case lookup_index(Tag,Pid) of
+read_dictionary(Fd,Pid,BinAddrAdj,Dict) ->
+ case lookup_index(?proc_dictionary,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_dictionary1(Fd,Dict,[]);
+ read_dictionary1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_dictionary1(Fd,Dict,Acc) ->
+read_dictionary1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Msg = parse_dictionary(Line,Dict),
- read_dictionary1(Fd,Dict,[Msg|Acc])
+ Msg = parse_dictionary(Line,BinAddrAdj,Dict),
+ read_dictionary1(Fd,BinAddrAdj,Dict,[Msg|Acc])
end.
-parse_dictionary(Line0, D) ->
- {Entry,Line,_} = parse_term(Line0, D),
+parse_dictionary(Line0, BinAddrAdj, D) ->
+ {Entry,Line,_} = parse_term(Line0, BinAddrAdj, D),
[] = skip_blanks(Line),
Entry.
@@ -1843,16 +1337,16 @@ parse_dictionary(Line0, D) ->
%%% Read heap data.
%%%
-read_heap(Fd,Pid,Dict0) ->
+read_heap(Fd,Pid,BinAddrAdj,Dict0) ->
case lookup_index(?proc_heap,Pid) of
[{_,Pos}] ->
pos_bof(Fd,Pos),
- read_heap(Dict0);
+ read_heap(BinAddrAdj,Dict0);
[] ->
Dict0
end.
-read_heap(Dict0) ->
+read_heap(BinAddrAdj,Dict0) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case get(fd) of
end_of_heap ->
@@ -1863,68 +1357,18 @@ read_heap(Dict0) ->
put(fd, end_of_heap),
Dict0;
Line ->
- Dict = parse(Line,Dict0),
- read_heap(Dict)
+ Dict = parse(Line,BinAddrAdj,Dict0),
+ read_heap(BinAddrAdj,Dict)
end
end.
-parse(Line0, Dict0) ->
+parse(Line0, BinAddrAdj, Dict0) ->
{Addr,":"++Line1} = get_hex(Line0),
- {_Term,Line,Dict} = parse_heap_term(Line1, Addr, Dict0),
+ {_Term,Line,Dict} = parse_heap_term(Line1, Addr, BinAddrAdj, Dict0),
[] = skip_blanks(Line),
Dict.
-do_sort_procs("state",Procs,#state{sorted="state"}) ->
- {lists:reverse(lists:keysort(#proc.state,Procs)),"rstate"};
-do_sort_procs("state",Procs,_) ->
- {lists:keysort(#proc.state,Procs),"state"};
-do_sort_procs("pid",Procs,#state{sorted="pid"}) ->
- {lists:reverse(Procs),"rpid"};
-do_sort_procs("pid",Procs,_) ->
- {Procs,"pid"};
-do_sort_procs("msg_q_len",Procs,#state{sorted="msg_q_len"}) ->
- {lists:keysort(#proc.msg_q_len,Procs),"rmsg_q_len"};
-do_sort_procs("msg_q_len",Procs,_) ->
- {lists:reverse(lists:keysort(#proc.msg_q_len,Procs)),"msg_q_len"};
-do_sort_procs("reds",Procs,#state{sorted="reds"}) ->
- {lists:keysort(#proc.reds,Procs),"rreds"};
-do_sort_procs("reds",Procs,_) ->
- {lists:reverse(lists:keysort(#proc.reds,Procs)),"reds"};
-do_sort_procs("mem",Procs,#state{sorted="mem",dump_vsn=DumpVsn}) ->
- KeyPos = if DumpVsn>=?r16b01_dump_vsn -> #proc.memory;
- true -> #proc.stack_heap
- end,
- {lists:keysort(KeyPos,Procs),"rmem"};
-do_sort_procs("mem",Procs,#state{dump_vsn=DumpVsn}) ->
- KeyPos = if DumpVsn>=?r16b01_dump_vsn -> #proc.memory;
- true -> #proc.stack_heap
- end,
- {lists:reverse(lists:keysort(KeyPos,Procs)),"mem"};
-do_sort_procs("init_func",Procs,#state{sorted="init_func"}) ->
- {lists:reverse(lists:keysort(#proc.init_func,Procs)),"rinit_func"};
-do_sort_procs("init_func",Procs,_) ->
- {lists:keysort(#proc.init_func,Procs),"init_func"};
-do_sort_procs("name_func",Procs,#state{sorted="name_func"}) ->
- {lists:reverse(lists:keysort(#proc.name,Procs)),"rname_func"};
-do_sort_procs("name_func",Procs,_) ->
- {lists:keysort(#proc.name,Procs),"name_func"};
-do_sort_procs("name",Procs,#state{sorted=Sorted}) ->
- {No,Yes} =
- lists:foldl(fun(P,{N,Y}) ->
- case P#proc.name of
- ?space -> {[P|N],Y};
- _other -> {N,[P|Y]}
- end
- end,
- {[],[]},
- Procs),
- Result = lists:keysort(#proc.name,Yes) ++ No,
- case Sorted of
- "name" -> {lists:reverse(Result),"rname"};
- _ -> {Result,"name"}
- end.
-
%%-----------------------------------------------------------------
%% Page with one port
get_port(File,Port) ->
@@ -1936,46 +1380,59 @@ get_port(File,Port) ->
close(Fd),
{ok,R};
[] ->
- case maybe_other_node(File,Port) of
- {other_node,Type,Node} ->
- Info = "The port you are searching for was residing on "
- "a remote node. No port information is available. "
- "Information about the remote node is show below.",
- {other_node,{Type,Info,Node}};
- not_found ->
- not_found
- end
+ maybe_other_node(Port)
end.
%%-----------------------------------------------------------------
%% Page with all ports
-get_ports(SessionId,File,TW) ->
- ParseFun = fun(Fd,Id) -> get_portinfo(Fd,#port{id=Id}) end,
- chunk_page(SessionId,File,TW,?port,ports,[],ParseFun).
+get_ports(File) ->
+ ParseFun = fun(Fd,Id) -> get_portinfo(Fd,#port{id=port_to_tuple(Id)}) end,
+ lookup_and_parse_index(File,?port,ParseFun,"ports").
+
+%% Converting port string to tuple to secure correct sorting. This is
+%% converted back in cdv_port_cb:format/1.
+port_to_tuple("#Port<"++Port) ->
+ [I1,I2] = string:tokens(Port,".>"),
+ {list_to_integer(I1),list_to_integer(I2)}.
get_portinfo(Fd,Port) ->
case line_head(Fd) of
"Slot" ->
- get_portinfo(Fd,Port#port{slot=val(Fd)});
+ %% stored as integer so we can sort on it
+ get_portinfo(Fd,Port#port{slot=list_to_integer(val(Fd))});
"Connected" ->
- get_portinfo(Fd,Port#port{connected=val(Fd)});
+ %% stored as pid so we can sort on it
+ Connected0 = val(Fd),
+ Connected =
+ try list_to_pid(Connected0)
+ catch error:badarg -> Connected0
+ end,
+ get_portinfo(Fd,Port#port{connected=Connected});
"Links" ->
- get_portinfo(Fd,Port#port{links=val(Fd)});
+ Pids = split_pid_list_no_space(val(Fd)),
+ Links = [{Pid,Pid} || Pid <- Pids],
+ get_portinfo(Fd,Port#port{links=Links});
"Registered as" ->
get_portinfo(Fd,Port#port{name=val(Fd)});
"Monitors" ->
- get_portinfo(Fd,Port#port{monitors=val(Fd)});
+ Monitors0 = string:tokens(val(Fd),"()"),
+ Monitors = [begin
+ [Pid,Ref] = string:tokens(Mon,","),
+ {Pid,Pid++" ("++Ref++")"}
+ end || Mon <- Monitors0],
+ get_portinfo(Fd,Port#port{monitors=Monitors});
"Port controls linked-in driver" ->
- get_portinfo(Fd,Port#port{controls=["Linked in driver: " |
- val(Fd)]});
+ Str = lists:flatten(["Linked in driver: " | val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port controls external process" ->
- get_portinfo(Fd,Port#port{controls=["External proc: " | val(Fd)]});
+ Str = lists:flatten(["External proc: " | val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port is a file" ->
- get_portinfo(Fd,Port#port{controls=["File: "| val(Fd)]});
+ Str = lists:flatten(["File: "| val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port is UNIX fd not opened by emulator" ->
- get_portinfo(Fd,Port#port{
- controls=["UNIX fd not opened by emulator: "|
- val(Fd)]});
+ Str = lists:flatten(["UNIX fd not opened by emulator: "| val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"=" ++ _next_tag ->
Port;
Other ->
@@ -1983,17 +1440,27 @@ get_portinfo(Fd,Port) ->
Port
end.
+split_pid_list_no_space(String) ->
+ split_pid_list_no_space(String,[],[]).
+split_pid_list_no_space([$>|Rest],Acc,Pids) ->
+ split_pid_list_no_space(Rest,[],[lists:reverse(Acc,[$>])|Pids]);
+split_pid_list_no_space([H|T],Acc,Pids) ->
+ split_pid_list_no_space(T,[H|Acc],Pids);
+split_pid_list_no_space([],[],Pids) ->
+ lists:reverse(Pids).
%%-----------------------------------------------------------------
%% Page with external ets tables
-get_ets_tables(SessionId,File,Heading,TW,Pid,WS) ->
- ParseFun = fun(Fd,Id) -> get_etsinfo(Fd,#ets_table{pid=Id},WS) end,
- chunk_page(SessionId,File,TW,{?ets,Pid},ets_tables,Heading,ParseFun).
+get_ets_tables(File,Pid,WS) ->
+ ParseFun = fun(Fd,Id) ->
+ get_etsinfo(Fd,#ets_table{pid=list_to_pid(Id)},WS)
+ end,
+ lookup_and_parse_index(File,{?ets,Pid},ParseFun,"ets").
get_etsinfo(Fd,EtsTable,WS) ->
case line_head(Fd) of
"Slot" ->
- get_etsinfo(Fd,EtsTable#ets_table{slot=val(Fd)},WS);
+ get_etsinfo(Fd,EtsTable#ets_table{slot=list_to_integer(val(Fd))},WS);
"Table" ->
get_etsinfo(Fd,EtsTable#ets_table{id=val(Fd)},WS);
"Name" ->
@@ -2002,15 +1469,18 @@ get_etsinfo(Fd,EtsTable,WS) ->
skip_rest_of_line(Fd),
get_etsinfo(Fd,EtsTable#ets_table{type="tree",buckets="-"},WS);
"Buckets" ->
- get_etsinfo(Fd,EtsTable#ets_table{buckets=val(Fd)},WS);
+ %% A bug in erl_db_hash.c prints a space after the buckets
+ %% - need to strip the string to make list_to_integer/1 happy.
+ Buckets = list_to_integer(string:strip(val(Fd))),
+ get_etsinfo(Fd,EtsTable#ets_table{buckets=Buckets},WS);
"Objects" ->
- get_etsinfo(Fd,EtsTable#ets_table{size=val(Fd)},WS);
+ get_etsinfo(Fd,EtsTable#ets_table{size=list_to_integer(val(Fd))},WS);
"Words" ->
Words = list_to_integer(val(Fd)),
Bytes =
case Words of
- -1 -> "-1"; % probably truncated
- _ -> integer_to_list(Words * WS)
+ -1 -> -1; % probably truncated
+ _ -> Words * WS
end,
get_etsinfo(Fd,EtsTable#ets_table{memory=Bytes},WS);
"=" ++ _next_tag ->
@@ -2036,16 +1506,37 @@ get_internal_ets_tables(File,WS) ->
%%-----------------------------------------------------------------
%% Page with list of all timers
-get_timers(SessionId,File,Heading,TW,Pid) ->
- ParseFun = fun(Fd,Id) -> get_timerinfo_1(Fd,#timer{pid=Id}) end,
- chunk_page(SessionId,File,TW,{?timer,Pid},timers,Heading,ParseFun).
+get_timers(File,Pid) ->
+ ParseFun = fun(Fd,Id) -> get_timerinfo(Fd,Id) end,
+ T1 = lookup_and_parse_index(File,{?timer,Pid},ParseFun,"timers"),
+ T2 = case ets:lookup(cdv_reg_proc_table,Pid) of
+ [{_,Name}] ->
+ lookup_and_parse_index(File,{?timer,Name},ParseFun,"timers");
+ _ ->
+ []
+ end,
+ T1 ++ T2.
+
+get_timerinfo(Fd,Id) ->
+ case catch list_to_pid(Id) of
+ Pid when is_pid(Pid) ->
+ get_timerinfo_1(Fd,#timer{pid=Pid});
+ _ ->
+ case ets:lookup(cdv_reg_proc_table,Id) of
+ [{_,Pid}] when is_pid(Pid) ->
+ get_timerinfo_1(Fd,#timer{pid=Pid,name=Id});
+ [] ->
+ get_timerinfo_1(Fd,#timer{name=Id})
+ end
+ end.
get_timerinfo_1(Fd,Timer) ->
case line_head(Fd) of
"Message" ->
get_timerinfo_1(Fd,Timer#timer{msg=val(Fd)});
"Time left" ->
- get_timerinfo_1(Fd,Timer#timer{time=val(Fd)});
+ TimeLeft = list_to_integer(val(Fd) -- " ms"),
+ get_timerinfo_1(Fd,Timer#timer{time=TimeLeft});
"=" ++ _next_tag ->
Timer;
Other ->
@@ -2054,6 +1545,28 @@ get_timerinfo_1(Fd,Timer) ->
end.
%%-----------------------------------------------------------------
+%% Page with information about a node in the distribution
+get_node(File,Channel) ->
+ Ms = ets:fun2ms(
+ fun({{Tag,Start},Ch}) when Tag=:=?visible_node, Ch=:=Channel ->
+ {visible,Start};
+ ({{Tag,Start},Ch}) when Tag=:=?hidden_node, Ch=:=Channel ->
+ {hidden,Start};
+ ({{Tag,Start},Ch}) when Tag=:=?not_connected, Ch=:=Channel ->
+ {not_connected,Start}
+ end),
+
+ case ets:select(cdv_dump_index_table,Ms) of
+ [] ->
+ {error,not_found};
+ [{Type,Pos}] ->
+ Fd = open(File),
+ NodeInfo = get_nodeinfo(Fd,Channel,Type,Pos),
+ close(Fd),
+ {ok,NodeInfo}
+ end.
+
+%%-----------------------------------------------------------------
%% Page with information about the erlang distribution
nods(File) ->
case lookup_index(?no_distribution) of
@@ -2064,28 +1577,29 @@ nods(File) ->
Fd = open(File),
Visible = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,visible,Start)
end,
V),
Hidden = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,hidden,Start)
end,
H),
NotConnected = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,not_connected,Start)
end,
N),
close(Fd),
- {Visible,Hidden,NotConnected};
+ Visible++Hidden++NotConnected;
[_] ->
- no_distribution
+ %% no_distribution
+ []
end.
-get_nodeinfo(Fd,Channel,Start) ->
+get_nodeinfo(Fd,Channel,Type,Start) ->
pos_bof(Fd,Start),
- get_nodeinfo(Fd,#nod{channel=Channel}).
+ get_nodeinfo(Fd,#nod{channel=list_to_integer(Channel),conn_type=Type}).
get_nodeinfo(Fd,Nod) ->
case line_head(Fd) of
@@ -2094,21 +1608,33 @@ get_nodeinfo(Fd,Nod) ->
"Controller" ->
get_nodeinfo(Fd,Nod#nod{controller=val(Fd)});
"Creation" ->
- get_nodeinfo(Fd,Nod#nod{creation=val(Fd)});
+ %% Throwing away elements like "(refc=1)", which might be
+ %% printed from a debug compiled emulator.
+ Creations = lists:flatmap(fun(C) -> try [list_to_integer(C)]
+ catch error:badarg -> []
+ end
+ end, string:tokens(val(Fd)," ")),
+ get_nodeinfo(Fd,Nod#nod{creation={creations,Creations}});
"Remote link" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteLinks = Nod#nod.remote_links,
- get_nodeinfo(Fd,Nod#nod{remote_links=[split(Procs)|RemoteLinks]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" <-> "++Remote,
+ NewRemLinks = [{Local,Str} | Nod#nod.remote_links],
+ get_nodeinfo(Fd,Nod#nod{remote_links=NewRemLinks});
"Remote monitoring" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteMon = Nod#nod.remote_mon,
- get_nodeinfo(Fd,Nod#nod{remote_mon=[split(Procs)|RemoteMon]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" -> "++Remote,
+ NewRemMon = [{Local,Str} | Nod#nod.remote_mon],
+ get_nodeinfo(Fd,Nod#nod{remote_mon=NewRemMon});
"Remotely monitored by" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteMonBy = Nod#nod.remote_mon_by,
- get_nodeinfo(Fd,Nod#nod{remote_mon_by=[split(Procs)|RemoteMonBy]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" <- "++Remote,
+ NewRemMonBy = [{Local,Str} | Nod#nod.remote_mon_by],
+ get_nodeinfo(Fd,Nod#nod{remote_mon_by=NewRemMonBy});
"Error" ->
- get_nodeinfo(Fd,Nod#nod{error=val(Fd)});
+ get_nodeinfo(Fd,Nod#nod{error="ERROR: "++val(Fd)});
"=" ++ _next_tag ->
Nod;
Other ->
@@ -2129,10 +1655,11 @@ get_loaded_mod_details(File,Mod) ->
%%-----------------------------------------------------------------
%% Page with list of all loaded modules
-loaded_mods(SessionId,File,TW) ->
+loaded_mods(File) ->
ParseFun =
fun(Fd,Id) ->
- get_loaded_mod_info(Fd,#loaded_mod{mod=Id},
+ get_loaded_mod_info(Fd,
+ #loaded_mod{mod=get_atom(list_to_binary(Id))},
fun main_modinfo/3)
end,
{CC,OC} =
@@ -2146,7 +1673,7 @@ loaded_mods(SessionId,File,TW) ->
[] ->
{"unknown","unknown"}
end,
- chunk_page(SessionId,File,TW,?mod,loaded_mods,{CC,OC},ParseFun).
+ {CC,OC,lookup_and_parse_index(File,?mod,ParseFun,"modules")}.
get_loaded_mod_totals(Fd,{CC,OC}) ->
case line_head(Fd) of
@@ -2164,9 +1691,11 @@ get_loaded_mod_totals(Fd,{CC,OC}) ->
get_loaded_mod_info(Fd,LM,Fun) ->
case line_head(Fd) of
"Current size" ->
- get_loaded_mod_info(Fd,LM#loaded_mod{current_size=val(Fd)},Fun);
+ CS = list_to_integer(val(Fd)),
+ get_loaded_mod_info(Fd,LM#loaded_mod{current_size=CS},Fun);
"Old size" ->
- get_loaded_mod_info(Fd,LM#loaded_mod{old_size=val(Fd)},Fun);
+ OS = list_to_integer(val(Fd)),
+ get_loaded_mod_info(Fd,LM#loaded_mod{old_size=OS},Fun);
"=" ++ _next_tag ->
LM;
{eof,_} ->
@@ -2229,24 +1758,24 @@ hex_to_dec(N) -> list_to_integer(N).
%%-----------------------------------------------------------------
%% Page with list of all funs
-funs(SessionId,File,TW) ->
+funs(File) ->
ParseFun = fun(Fd,_Id) -> get_funinfo(Fd,#fu{}) end,
- chunk_page(SessionId,File,TW,?fu,funs,[],ParseFun).
+ lookup_and_parse_index(File,?fu,ParseFun,"funs").
get_funinfo(Fd,Fu) ->
case line_head(Fd) of
"Module" ->
get_funinfo(Fd,Fu#fu{module=val(Fd)});
"Uniq" ->
- get_funinfo(Fd,Fu#fu{uniq=val(Fd)});
+ get_funinfo(Fd,Fu#fu{uniq=list_to_integer(val(Fd))});
"Index" ->
- get_funinfo(Fd,Fu#fu{index=val(Fd)});
+ get_funinfo(Fd,Fu#fu{index=list_to_integer(val(Fd))});
"Address" ->
get_funinfo(Fd,Fu#fu{address=val(Fd)});
"Native_address" ->
get_funinfo(Fd,Fu#fu{native_address=val(Fd)});
"Refc" ->
- get_funinfo(Fd,Fu#fu{refc=val(Fd)});
+ get_funinfo(Fd,Fu#fu{refc=list_to_integer(val(Fd))});
"=" ++ _next_tag ->
Fu;
Other ->
@@ -2256,45 +1785,54 @@ get_funinfo(Fd,Fu) ->
%%-----------------------------------------------------------------
%% Page with list of all atoms
-atoms(SessionId,File,TW,Num) ->
+atoms(File,NumAtoms) ->
case lookup_index(?atoms) of
[{_Id,Start}] ->
Fd = open(File),
pos_bof(Fd,Start),
- case get_atoms(Fd,?items_chunk_size) of
- {Atoms,Cont} ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,Atoms),
- atoms_chunks(Fd,SessionId,Cont);
- done ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,done)
- end;
+ get_atoms(Fd,NumAtoms);
_ ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,done)
+ []
end.
-get_atoms(Fd,Number) ->
- case get_n_lines_of_tag(Fd,Number) of
- {all,_,Lines} ->
- close(Fd),
- {Lines,done};
- {part,_,Lines} ->
- {Lines,Number};
- empty ->
- close(Fd),
- done
+get_atoms(Fd,NumAtoms) ->
+ case get_chunk(Fd) of
+ {ok,Bin} ->
+ init_progress("Processing atoms",NumAtoms),
+ get_atoms(Fd,Bin,NumAtoms,[]);
+ eof ->
+ []
end.
-atoms_chunks(_Fd,SessionId,done) ->
- crashdump_viewer_html:atoms_chunk(SessionId,done);
-atoms_chunks(Fd,SessionId,Number) ->
- case get_atoms(Fd,Number) of
- {Atoms,Cont} ->
- crashdump_viewer_html:atoms_chunk(SessionId,Atoms),
- atoms_chunks(Fd,SessionId,Cont);
- done ->
- atoms_chunks(Fd,SessionId,done)
- end.
+%% Atoms are written one per line in the crash dump, in creation order
+%% from last to first.
+get_atoms(Fd,Bin,NumAtoms,Atoms) ->
+ Bins = binary:split(Bin,<<"\n">>,[global]),
+ get_atoms1(Fd,Bins,NumAtoms,Atoms).
+
+get_atoms1(_Fd,[<<"=",_/binary>>|_],_N,Atoms) ->
+ end_progress(),
+ Atoms;
+get_atoms1(Fd,[LastBin],N,Atoms) ->
+ case get_chunk(Fd) of
+ {ok,Bin0} ->
+ get_atoms(Fd,<<LastBin/binary,Bin0/binary>>,N,Atoms);
+ eof ->
+ end_progress(),
+ [{N,get_atom(LastBin)}|Atoms]
+ end;
+get_atoms1(Fd,[Bin|Bins],N,Atoms) ->
+ update_progress(),
+ get_atoms1(Fd,Bins,N-1,[{N,get_atom(Bin)}|Atoms]).
+
+%% This ensures sorting according to first actual letter in the atom,
+%% disregarding possible single quote. It is formatted back to correct
+%% syntax in cdv_atom_cb:format/1
+get_atom(<<"\'",Atom/binary>>) ->
+ {Atom,q}; % quoted
+get_atom(Atom) when is_binary(Atom) ->
+ {Atom,nq}. % not quoted
%%-----------------------------------------------------------------
%% Page with memory information
@@ -2317,7 +1855,7 @@ get_meminfo(Fd,Acc) ->
{eof,_last_line} ->
lists:reverse(Acc);
Key ->
- get_meminfo(Fd,[{Key,val(Fd)}|Acc])
+ get_meminfo(Fd,[{list_to_atom(Key),val(Fd)}|Acc])
end.
%%-----------------------------------------------------------------
@@ -2345,7 +1883,7 @@ get_allocareainfo(Fd,Acc) ->
AllocInfo =
case split(Val) of
{Alloc,[]} ->
- {Key,Alloc,?space};
+ {Key,Alloc,""};
{Alloc,Used} ->
{Key,Alloc,Used}
end,
@@ -2361,7 +1899,7 @@ allocator_info(File) ->
AllAllocators ->
Fd = open(File),
R = lists:map(fun({Heading,Start}) ->
- {Heading,get_allocatorinfo(Fd,Start)}
+ {Heading,get_allocatorinfo(Fd,Start)}
end,
AllAllocators),
close(Fd),
@@ -2370,17 +1908,19 @@ allocator_info(File) ->
get_allocatorinfo(Fd,Start) ->
pos_bof(Fd,Start),
- get_allocatorinfo1(Fd,[]).
+ get_allocatorinfo1(Fd,[],0).
-get_allocatorinfo1(Fd,Acc) ->
+get_allocatorinfo1(Fd,Acc,Max) ->
case line_head(Fd) of
"=" ++ _next_tag ->
- lists:reverse(Acc);
+ pad_and_reverse(Acc,Max,[]);
{eof,_last_line} ->
- lists:reverse(Acc);
+ pad_and_reverse(Acc,Max,[]);
Key ->
Values = get_all_vals(val(Fd),[]),
- get_allocatorinfo1(Fd,[{Key,Values}|Acc])
+ L = length(Values),
+ Max1 = if L > Max -> L; true -> Max end,
+ get_allocatorinfo1(Fd,[{Key,Values}|Acc],Max1)
end.
get_all_vals([$ |Rest],Acc) ->
@@ -2390,6 +1930,16 @@ get_all_vals([],Acc) ->
get_all_vals([Char|Rest],Acc) ->
get_all_vals(Rest,[Char|Acc]).
+%% Make sure all V have the same length by padding with "".
+pad_and_reverse([{K,V}|T],Len,Rev) ->
+ VLen = length(V),
+ V1 = if VLen == Len -> V;
+ true -> V ++ lists:duplicate(Len-VLen,"")
+ end,
+ pad_and_reverse(T,Len,[{K,V1}|Rev]);
+pad_and_reverse([],_,Rev) ->
+ Rev.
+
%% Calculate allocator summary:
%%
%% System totals:
@@ -2473,7 +2023,8 @@ allocator_summary(Allocators) ->
{TBS,TCS} ->
{integer_to_list(TBS),integer_to_list(TCS)}
end,
- {{"Summary",["blocks size","carriers size","mseg carriers size"]},
+ {"Allocator Summary",
+ ["blocks size","carriers size","mseg carriers size"],
[{"total",[TotalBS,TotalCS,TotalMCS]} |
format_allocator_summary(lists:reverse(TypeTotals))]}.
@@ -2673,142 +2224,120 @@ get_indextableinfo1(Fd,IndexTable) ->
IndexTable
end.
-
-
-
-
-%%-----------------------------------------------------------------
-%% Expand a set of data which was shown in a truncated form on
-get_expanded(File,Pos,Size) ->
- Fd = open(File),
- R = case file:pread(Fd,Pos,Size) of
- {ok,Bin}->
- binary_to_list(Bin);
- eof ->
- ?space
- end,
- close(Fd),
- R.
-
-
-replace_all(From,To,[From|Rest],Acc) ->
- replace_all(From,To,Rest,[To|Acc]);
-replace_all(From,To,[Char|Rest],Acc) ->
- replace_all(From,To,Rest,[Char|Acc]);
-replace_all(_From,_To,[],Acc) ->
- lists:reverse(Acc).
-
-
%%%-----------------------------------------------------------------
%%% Parse memory in crashdump version 0.1 and newer
%%%
-parse_heap_term([$l|Line0], Addr, D0) -> %Cons cell.
- {H,"|"++Line1,D1} = parse_term(Line0, D0),
- {T,Line,D2} = parse_term(Line1, D1),
+parse_heap_term([$l|Line0], Addr, BinAddrAdj, D0) -> %Cons cell.
+ {H,"|"++Line1,D1} = parse_term(Line0, BinAddrAdj, D0),
+ {T,Line,D2} = parse_term(Line1, BinAddrAdj, D1),
Term = [H|T],
D = gb_trees:insert(Addr, Term, D2),
{Term,Line,D};
-parse_heap_term([$t|Line0], Addr, D) -> %Tuple
+parse_heap_term([$t|Line0], Addr, BinAddrAdj, D) -> %Tuple
{N,":"++Line} = get_hex(Line0),
- parse_tuple(N, Line, Addr, D, []);
-parse_heap_term([$F|Line0], Addr, D0) -> %Float
+ parse_tuple(N, Line, Addr, BinAddrAdj, D, []);
+parse_heap_term([$F|Line0], Addr, _BinAddrAdj, D0) -> %Float
{N,":"++Line1} = get_hex(Line0),
{Chars,Line} = get_chars(N, Line1),
Term = list_to_float(Chars),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B16#"++Line0, Addr, D0) -> %Positive big number.
+parse_heap_term("B16#"++Line0, Addr, _BinAddrAdj, D0) -> %Positive big number.
{Term,Line} = get_hex(Line0),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B-16#"++Line0, Addr, D0) -> %Negative big number
+parse_heap_term("B-16#"++Line0, Addr, _BinAddrAdj, D0) -> %Negative big number
{Term0,Line} = get_hex(Line0),
Term = -Term0,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B"++Line0, Addr, D0) -> %Decimal big num (new in R10B-something).
+parse_heap_term("B"++Line0, Addr, _BinAddrAdj, D0) -> %Decimal big num
case string:to_integer(Line0) of
{Int,Line} when is_integer(Int) ->
D = gb_trees:insert(Addr, Int, D0),
{Int,Line,D}
end;
-parse_heap_term([$P|Line0], Addr, D0) -> % External Pid.
+parse_heap_term([$P|Line0], Addr, _BinAddrAdj, D0) -> % External Pid.
{Pid0,Line} = get_id(Line0),
- Pid = "#CDVPid"++Pid0,
+ Pid = ['#CDVPid'|Pid0],
D = gb_trees:insert(Addr, Pid, D0),
{Pid,Line,D};
-parse_heap_term([$p|Line0], Addr, D0) -> % External Port.
+parse_heap_term([$p|Line0], Addr, _BinAddrAdj, D0) -> % External Port.
{Port0,Line} = get_id(Line0),
- Port = "#CDVPort"++Port0,
+ Port = ['#CDVPort'|Port0],
D = gb_trees:insert(Addr, Port, D0),
{Port,Line,D};
-parse_heap_term("E"++Line0, Addr, D0) -> %Term encoded in external format.
+parse_heap_term("E"++Line0, Addr, _BinAddrAdj, D0) -> %Term encoded in external format.
{Bin,Line} = get_binary(Line0),
Term = binary_to_term(Bin),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Yh"++Line0, Addr, D0) -> %Heap binary.
+parse_heap_term("Yh"++Line0, Addr, _BinAddrAdj, D0) -> %Heap binary.
{Term,Line} = get_binary(Line0),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Yc"++Line0, Addr, D0) -> %Reference-counted binary.
- {Binp,":"++Line1} = get_hex(Line0),
- {First,":"++Line2} = get_hex(Line1),
+parse_heap_term("Yc"++Line0, Addr, BinAddrAdj, D0) -> %Reference-counted binary.
+ {Binp0,":"++Line1} = get_hex(Line0),
+ {Offset,":"++Line2} = get_hex(Line1),
{Sz,Line} = get_hex(Line2),
+ Binp = Binp0 bor BinAddrAdj,
Term = case gb_trees:lookup(Binp, D0) of
- {value,<<_:First/binary,T:Sz/binary,_/binary>>} -> T;
- {value,{'#CDVTooBig',binary,Pos}} -> cdvbin(Sz,Pos);
- {value,'#CDVTruncatedBinary'} -> '#CDVTruncatedBinary';
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
none -> '#CDVNonexistingBinary'
end,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Ys"++Line0, Addr, D0) -> %Sub binary.
- {Binp,":"++Line1} = get_hex(Line0),
- {First,":"++Line2} = get_hex(Line1),
+parse_heap_term("Ys"++Line0, Addr, BinAddrAdj, D0) -> %Sub binary.
+ {Binp0,":"++Line1} = get_hex(Line0),
+ {Offset,":"++Line2} = get_hex(Line1),
{Sz,Line} = get_hex(Line2),
+ Binp = Binp0 bor BinAddrAdj,
Term = case gb_trees:lookup(Binp, D0) of
- {value,<<_:First/binary,T:Sz/binary,_/binary>>} -> T;
- {value,{'#CDVTooBig',binary,Pos}} -> cdvbin(Sz,Pos);
- {value,'#CDVTruncatedBinary'} -> '#CDVTruncatedBinary';
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
+ none when Binp0=/=Binp ->
+ %% Might it be on the heap?
+ case gb_trees:lookup(Binp0, D0) of
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
+ none -> '#CDVNonexistingBinary'
+ end;
none -> '#CDVNonexistingBinary'
end,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D}.
-parse_tuple(0, Line, Addr, D0, Acc) ->
+parse_tuple(0, Line, Addr, _, D0, Acc) ->
Tuple = list_to_tuple(lists:reverse(Acc)),
D = gb_trees:insert(Addr, Tuple, D0),
{Tuple,Line,D};
-parse_tuple(N, Line0, Addr, D0, Acc) ->
- case parse_term(Line0, D0) of
+parse_tuple(N, Line0, Addr, BinAddrAdj, D0, Acc) ->
+ case parse_term(Line0, BinAddrAdj, D0) of
{Term,[$,|Line],D} when N > 1 ->
- parse_tuple(N-1, Line, Addr, D, [Term|Acc]);
+ parse_tuple(N-1, Line, Addr, BinAddrAdj, D, [Term|Acc]);
{Term,Line,D}->
- parse_tuple(N-1, Line, Addr, D, [Term|Acc])
+ parse_tuple(N-1, Line, Addr, BinAddrAdj, D, [Term|Acc])
end.
-parse_term([$H|Line0], D) -> %Pointer to heap term.
+parse_term([$H|Line0], BinAddrAdj, D) -> %Pointer to heap term.
{Ptr,Line} = get_hex(Line0),
- deref_ptr(Ptr, Line, D);
-parse_term([$N|Line], D) -> %[] (nil).
+ deref_ptr(Ptr, Line, BinAddrAdj, D);
+parse_term([$N|Line], _, D) -> %[] (nil).
{[],Line,D};
-parse_term([$I|Line0], D) -> %Small.
+parse_term([$I|Line0], _, D) -> %Small.
{Int,Line} = string:to_integer(Line0),
{Int,Line,D};
-parse_term([$A|_]=Line, D) -> %Atom.
+parse_term([$A|_]=Line, _, D) -> %Atom.
parse_atom(Line, D);
-parse_term([$P|Line0], D) -> %Pid.
+parse_term([$P|Line0], _, D) -> %Pid.
{Pid,Line} = get_id(Line0),
- {"#CDVPid"++Pid,Line,D};
-parse_term([$p|Line0], D) -> %Port.
+ {['#CDVPid'|Pid],Line,D};
+parse_term([$p|Line0], _, D) -> %Port.
{Port,Line} = get_id(Line0),
- {"#CDVPort"++Port,Line,D};
-parse_term([$S|Str0], D) -> %Information string.
+ {['#CDVPort'|Port],Line,D};
+parse_term([$S|Str0], _, D) -> %Information string.
Str = lists:reverse(skip_blanks(lists:reverse(Str0))),
{Str,[],D};
-parse_term([$D|Line0], D) -> %DistExternal
+parse_term([$D|Line0], _, D) -> %DistExternal
try
{AttabSize,":"++Line1} = get_hex(Line0),
{Attab, "E"++Line2} = parse_atom_translation_table(AttabSize, Line1, []),
@@ -2848,7 +2377,7 @@ parse_atom_translation_table(N, Line0, As) ->
-deref_ptr(Ptr, Line, D0) ->
+deref_ptr(Ptr, Line, BinAddrAdj, D0) ->
case gb_trees:lookup(Ptr, D0) of
{value,Term} ->
{Term,Line,D0};
@@ -2860,10 +2389,10 @@ deref_ptr(Ptr, Line, D0) ->
case val(Fd) of
"="++_ ->
put(fd, end_of_heap),
- deref_ptr(Ptr, Line, D0);
+ deref_ptr(Ptr, Line, BinAddrAdj, D0);
L ->
- D = parse(L, D0),
- deref_ptr(Ptr, Line, D)
+ D = parse(L, BinAddrAdj, D0),
+ deref_ptr(Ptr, Line, BinAddrAdj, D)
end
end
end.
@@ -2901,13 +2430,16 @@ get_chars(0, Line, Acc) ->
get_chars(N, [H|T], Acc) ->
get_chars(N-1, T, [H|Acc]).
-get_id(Line) ->
- get_id(Line, []).
+get_id(Line0) ->
+ [$<|Line] = lists:dropwhile(fun($<) -> false; (_) -> true end,Line0),
+ get_id(Line, [], []).
-get_id([$>|Line], Acc) ->
- {lists:reverse(Acc, [$>]),Line};
-get_id([H|T], Acc) ->
- get_id(T, [H|Acc]).
+get_id([$>|Line], Acc, Id) ->
+ {lists:reverse(Id,[list_to_integer(lists:reverse(Acc))]),Line};
+get_id([$.|Line], Acc, Id) ->
+ get_id(Line,[],[list_to_integer(lists:reverse(Acc))|Id]);
+get_id([H|T], Acc, Id) ->
+ get_id(T, [H|Acc], Id).
get_label(L) ->
get_label(L, []).
@@ -2925,19 +2457,26 @@ get_label([H|T], Acc) ->
get_binary(Line0) ->
{N,":"++Line} = get_hex(Line0),
- get_binary(N, Line, []).
+ do_get_binary(N, Line, []).
+
+get_binary(Offset,Size,Line0) ->
+ {_N,":"++Line} = get_hex(Line0),
+ do_get_binary(Size, lists:sublist(Line,(Offset*2)+1,Size*2), []).
-get_binary(0, Line, Acc) ->
+do_get_binary(0, Line, Acc) ->
{list_to_binary(lists:reverse(Acc)),Line};
-get_binary(N, [A,B|Line], Acc) ->
+do_get_binary(N, [A,B|Line], Acc) ->
Byte = (get_hex_digit(A) bsl 4) bor get_hex_digit(B),
- get_binary(N-1, Line, [Byte|Acc]);
-get_binary(_N, [], _Acc) ->
+ do_get_binary(N-1, Line, [Byte|Acc]);
+do_get_binary(_N, [], _Acc) ->
{'#CDVTruncatedBinary',[]}.
-cdvbin(Sz,Pos) ->
- "#CDVBin<"++integer_to_list(Sz)++","++integer_to_list(Pos)++">".
-
+cdvbin(Offset,Size,{'#CDVBin',Pos}) ->
+ ['#CDVBin',Offset,Size,Pos];
+cdvbin(Offset,Size,['#CDVBin',_,_,Pos]) ->
+ ['#CDVBin',Offset,Size,Pos];
+cdvbin(_,_,'#CDVTruncatedBinary') ->
+ '#CDVTruncatedBinary'.
%%-----------------------------------------------------------------
%% Functions for accessing the cdv_dump_index_table
@@ -2947,29 +2486,15 @@ reset_index_table() ->
insert_index(Tag,Id,Pos) ->
ets:insert(cdv_dump_index_table,{{Tag,Pos},Id}).
+lookup_index({Tag,Id}) ->
+ lookup_index(Tag,Id);
lookup_index(Tag) ->
lookup_index(Tag,'$2').
lookup_index(Tag,Id) ->
ets:select(cdv_dump_index_table,[{{{Tag,'$1'},Id},[],[{{Id,'$1'}}]}]).
-lookup_index_chunk({'#CDVFirstChunk',Tag,Id}) ->
- ets:select(cdv_dump_index_table,
- [{{{Tag,'$1'},Id},[],[{{Id,'$1'}}]}],
- ?items_chunk_size);
-lookup_index_chunk(Cont) ->
- ets:select(Cont).
-
-%% Create a tag which can be used instead of an ets Continuation for
-%% the first call to lookup_index_chunk.
-first_chunk_pointer({Tag,Id}) ->
- {'#CDVFirstChunk',Tag,Id};
-first_chunk_pointer(Tag) ->
- first_chunk_pointer({Tag,'$2'}).
-
count_index(Tag) ->
ets:select_count(cdv_dump_index_table,[{{{Tag,'_'},'_'},[],[true]}]).
-count_index(Tag,Id) ->
- ets:select_count(cdv_dump_index_table,[{{{Tag,'_'},Id},[],[true]}]).
%%-----------------------------------------------------------------
@@ -2979,7 +2504,6 @@ tag_to_atom("allocated_areas") -> ?allocated_areas;
tag_to_atom("allocator") -> ?allocator;
tag_to_atom("atoms") -> ?atoms;
tag_to_atom("binary") -> ?binary;
-tag_to_atom("debug_proc_dictionary") -> ?debug_proc_dictionary;
tag_to_atom("end") -> ?ende;
tag_to_atom("erl_crash_dump") -> ?erl_crash_dump;
tag_to_atom("ets") -> ?ets;
@@ -2995,7 +2519,6 @@ tag_to_atom("mod") -> ?mod;
tag_to_atom("no_distribution") -> ?no_distribution;
tag_to_atom("node") -> ?node;
tag_to_atom("not_connected") -> ?not_connected;
-tag_to_atom("num_atoms") -> ?num_atoms;
tag_to_atom("old_instr_data") -> ?old_instr_data;
tag_to_atom("port") -> ?port;
tag_to_atom("proc") -> ?proc;
@@ -3010,37 +2533,133 @@ tag_to_atom(UnknownTag) ->
list_to_atom(UnknownTag).
%%%-----------------------------------------------------------------
-%%% Create a page by sending chunk by chunk to crashdump_viewer_html
-chunk_page(SessionId,File,TW,What,HtmlCB,HtmlExtra,ParseFun) ->
+%%% Fetch next chunk from crashdump file
+lookup_and_parse_index(File,What,ParseFun,Str) when is_list(File) ->
+ Indices = lookup_index(What),
+ Fun = fun(Fd,{Id,Start}) ->
+ pos_bof(Fd,Start),
+ ParseFun(Fd,Id)
+ end,
+ Report = "Processing " ++ Str,
+ progress_pmap(Report,File,Fun,Indices).
+
+%%%-----------------------------------------------------------------
+%%% Convert a record to a proplist
+to_proplist(Fields,Record) ->
+ Values = to_value_list(Record),
+ lists:zip(Fields,Values).
+
+%%%-----------------------------------------------------------------
+%%% Convert a record to a simple list of field values
+to_value_list(Record) ->
+ [_RecordName|Values] = tuple_to_list(Record),
+ Values.
+
+%%%-----------------------------------------------------------------
+%%% Fold over List and report progress in percent.
+%%% Report is the text to be presented in the progress dialog.
+%%% Acc0 is the initial accumulator and will be passed to Fun as the
+%%% second arguement, i.e. Fun = fun(Item,Acc) -> NewAcc end.
+progress_foldl(Report,Fun,Acc0,List) ->
+ init_progress(Report, length(List)),
+ progress_foldl1(Fun,Acc0,List).
+
+progress_foldl1(Fun,Acc,[H|T]) ->
+ update_progress(),
+ progress_foldl1(Fun,Fun(H,Acc),T);
+progress_foldl1(_Fun,Acc,[]) ->
+ end_progress(),
+ Acc.
+
+
+%%%-----------------------------------------------------------------
+%%% Map over List and report progress in percent.
+%%% Report is the text to be presented in the progress dialog.
+%%% Distribute the load over a number of processes, and File is opened
+%%% on each process and passed to the Fun as first argument.
+%%% I.e. Fun = fun(Fd,Item) -> ItemResult end.
+progress_pmap(Report,File,Fun,List) ->
+ NTot = length(List),
+ NProcs = erlang:system_info(schedulers) * 2,
+ NPerProc = (NTot div NProcs) + 1,
+
+ %% Worker processes send message to collector for each ReportInterval.
+ ReportInterval = (NTot div 100) + 1,
+
+ %% Progress reporter on collector process reports 1 percent for
+ %% each message from worker process.
+ init_progress(Report,99),
+
+ Collector = self(),
+ {[],Pids} =
+ lists:foldl(
+ fun(_,{L,Ps}) ->
+ {L1,L2} = if length(L)>=NPerProc -> lists:split(NPerProc,L);
+ true -> {L,[]} % last chunk
+ end,
+ {P,_Ref} =
+ spawn_monitor(
+ fun() ->
+ progress_map(Collector,ReportInterval,File,Fun,L1)
+ end),
+ {L2,[P|Ps]}
+ end,
+ {List,[]},
+ lists:seq(1,NProcs)),
+ collect(Pids,[]).
+
+progress_map(Collector,ReportInterval,File,Fun,List) ->
Fd = open(File),
- case lookup_and_parse_index_chunk(first_chunk_pointer(What),Fd,ParseFun) of
- done ->
- crashdump_viewer_html:chunk_page(HtmlCB,SessionId,TW,HtmlExtra,done);
- {Chunk,Cont} ->
- HtmlInfo = crashdump_viewer_html:chunk_page(
- HtmlCB,
- SessionId,TW,HtmlExtra,Chunk),
- chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,
- lookup_and_parse_index_chunk(Cont,Fd,ParseFun))
- end.
-
-chunk_page_1(_Fd,HtmlInfo,SessionId,_ParseFun,done) ->
- crashdump_viewer_html:chunk(SessionId,done,HtmlInfo);
-chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,{Chunk,Cont}) ->
- crashdump_viewer_html:chunk(SessionId,Chunk,HtmlInfo),
- chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,
- lookup_and_parse_index_chunk(Cont,Fd,ParseFun)).
-
-lookup_and_parse_index_chunk(Pointer,Fd,ParseFun) ->
- case lookup_index_chunk(Pointer) of
- '$end_of_table' ->
- close(Fd),
- done;
- {Chunk,Cont} ->
- R = lists:map(fun({Id,Start}) ->
- pos_bof(Fd,Start),
- ParseFun(Fd,Id)
- end,
- Chunk),
- {R,Cont}
+ init_progress(ReportInterval, fun(_) -> Collector ! progress end, ok),
+ progress_map(Fd,Fun,List,[]).
+progress_map(Fd,Fun,[H|T],Acc) ->
+ update_progress(),
+ progress_map(Fd,Fun,T,[Fun(Fd,H)|Acc]);
+progress_map(Fd,_Fun,[],Acc) ->
+ close(Fd),
+ exit({pmap_done,Acc}).
+
+collect([],Acc) ->
+ end_progress(),
+ lists:append(Acc);
+collect(Pids,Acc) ->
+ receive
+ progress ->
+ update_progress(),
+ collect(Pids,Acc);
+ {'DOWN', _Ref, process, Pid, {pmap_done,Result}} ->
+ collect(lists:delete(Pid,Pids),[Result|Acc])
end.
+
+%%%-----------------------------------------------------------------
+%%% Help functions for progress reporting
+
+%% Set text in progress dialog and initialize the progress counter
+init_progress(Report,N) ->
+ observer_lib:report_progress({ok,Report}),
+ Interval = (N div 100) + 1,
+ Fun = fun(P0) -> P=P0+1,observer_lib:report_progress({ok,P}),P end,
+ init_progress(Interval,Fun,0).
+init_progress(Interval,Fun,Acc) ->
+ put(progress,{Interval,Interval,Fun,Acc}),
+ ok.
+
+%% Count progress and report on given interval
+update_progress() ->
+ update_progress(1).
+update_progress(Processed) ->
+ do_update_progress(get(progress),Processed).
+
+do_update_progress({Count,Interval,Fun,Acc},Processed) when Processed>Count ->
+ do_update_progress({Interval,Interval,Fun,Fun(Acc)},Processed-Count);
+do_update_progress({Count,Interval,Fun,Acc},Processed) ->
+ put(progress,{Count-Processed,Interval,Fun,Acc}),
+ ok.
+
+%% End progress reporting for this item
+end_progress() ->
+ end_progress({ok,100}).
+end_progress(Report) ->
+ observer_lib:report_progress(Report),
+ erase(progress),
+ ok.
diff --git a/lib/observer/src/crashdump_viewer.hrl b/lib/observer/src/crashdump_viewer.hrl
index 2e0ea5cf96..0e2eba6dee 100644
--- a/lib/observer/src/crashdump_viewer.hrl
+++ b/lib/observer/src/crashdump_viewer.hrl
@@ -16,7 +16,7 @@
%%
%% %CopyrightEnd%
%%
--define(space, "&nbsp;").
+-define(space, undefined).
-define(unknown, "unknown").
-define(r16b01_dump_vsn, [0,2]). % =erl_crash_dump:0.2
@@ -24,28 +24,28 @@
-record(general_info,
{created,
- slogan=?space,
- system_vsn=?space,
- compile_time=?space,
- taints=?space,
- node_name=?space,
- num_atoms=?space,
- num_procs=?space,
- num_ets=?space,
- num_timers=?space,
- num_fun=?space,
- mem_tot=?space,
- mem_max=?space,
- instr_info=?space}).
+ slogan,
+ system_vsn,
+ compile_time,
+ taints,
+ node_name,
+ num_atoms,
+ num_procs,
+ num_ets,
+ num_timers,
+ num_fun,
+ mem_tot,
+ mem_max,
+ instr_info}).
-record(proc,
%% Initial data according to the follwoing:
%%
- %% msg_q_len, reds and stack_heap are integers because it must
+ %% msg_q_len, reds, memory and stack_heap are integers because it must
%% be possible to sort on them. All other fields are strings
%%
- %% for old dumps start_time, parent and number of heap frament
- %% does not exist
+ %% for old dumps start_time, parent and number of heap framents
+ %% do not exist
%%
%% current_func can be both "current function" and
%% "last scheduled in for"
@@ -54,100 +54,103 @@
%% displayed as a link to "Expand" (if dump is from OTP R9B
%% or newer)
{pid,
- name=?space,
- init_func=?space,
+ name,
+ init_func,
parent=?unknown,
start_time=?unknown,
- state=?space,
- current_func={"Current Function",?space},
+ state,
+ current_func,
msg_q_len=0,
- msg_q=?space,
- last_calls=?space,
- links=?space,
- prog_count=?space,
- cp=?space,
- arity=?space,
- dict=?space,
- debug_dict=?space,
+ msg_q,
+ last_calls,
+ links,
+ monitors,
+ mon_by,
+ prog_count,
+ cp,
+ arity,
+ dict,
reds=0,
num_heap_frag=?unknown,
- heap_frag_data=?space,
+ heap_frag_data,
stack_heap=0,
- old_heap=?space,
- heap_unused=?space,
- old_heap_unused=?space,
- new_heap_start=?space,
- new_heap_top=?space,
- stack_top=?space,
- stack_end=?space,
- old_heap_start=?space,
- old_heap_top=?space,
- old_heap_end=?space,
+ old_heap,
+ heap_unused,
+ old_heap_unused,
+ new_heap_start,
+ new_heap_top,
+ stack_top,
+ stack_end,
+ old_heap_start,
+ old_heap_top,
+ old_heap_end,
memory,
- stack_dump=?space}).
+ stack_dump}).
-record(port,
{id,
- slot=?space,
- connected=?space,
- links=?space,
- name=?space,
- monitors=?space,
- controls=?space}).
+ slot,
+ connected,
+ links,
+ name,
+ monitors,
+ controls}).
-record(ets_table,
{pid,
- slot=?space,
- id=?space,
- name=?space,
+ slot,
+ id,
+ name,
type="hash",
- buckets=?space,
- size=?space,
- memory=?space}).
+ buckets,
+ size,
+ memory}).
-record(timer,
{pid,
- msg=?space,
- time=?space}).
+ name,
+ msg,
+ time}).
-record(fu,
- {module=?space,
- uniq=?space,
- index=?space,
- address=?space,
- native_address=?space,
- refc=?space}).
+ {module,
+ uniq,
+ index,
+ address,
+ native_address,
+ refc}).
-record(nod,
- {name=?space,
+ {name,
channel,
- controller=?space,
- creation=?space,
- remote_links=?space,
- remote_mon=?space,
- remote_mon_by=?space,
- error=?space}).
+ conn_type,
+ controller,
+ creation,
+ remote_links=[],
+ remote_mon=[],
+ remote_mon_by=[],
+ error}).
-record(loaded_mod,
{mod,
- current_size=?space,
- current_attrib=?space,
- current_comp_info=?space,
- old_size=?space,
- old_attrib=?space,
- old_comp_info=?space}).
+ current_size,
+ current_attrib,
+ current_comp_info,
+ old_size,
+ old_attrib,
+ old_comp_info}).
-record(hash_table,
{name,
- size=?space,
- used=?space,
- objs=?space,
- depth=?space}).
+ size,
+ used,
+ objs,
+ depth}).
-record(index_table,
{name,
- size=?space,
- used=?space,
- limit=?space,
- rate=?space,
- entries=?space}).
+ size,
+ limit,
+ used,
+ rate,
+ entries}).
diff --git a/lib/observer/src/crashdump_viewer_html.erl b/lib/observer/src/crashdump_viewer_html.erl
deleted file mode 100644
index 93c1a842b5..0000000000
--- a/lib/observer/src/crashdump_viewer_html.erl
+++ /dev/null
@@ -1,1440 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(crashdump_viewer_html).
-
-%%
-%% This module implements the HTML generation for the crashdump
-%% viewer. No logic or states are kept by this module.
-%%
-
--export([welcome/0,
- read_file_frame/0,
- redirect/1,
- start_page/0,
- filename_frame/1,
- menu_frame/0,
- general_info/1,
- pretty_info_page/2,
- info_page/2,
- proc_details/4,
- expanded_memory/2,
- expanded_binary/1,
- port/3,
- internal_ets_tables/2,
- nods/2,
- loaded_mod_details/2,
- atoms/4,
- atoms_chunk/2,
- memory/2,
- allocated_areas/2,
- allocator_info/2,
- hash_tables/2,
- index_tables/2,
- error/2,
- chunk_page/5,
- chunk/3]).
-
--include("crashdump_viewer.hrl").
-
-%%%-----------------------------------------------------------------
-%%% Welcome frame
-welcome() ->
- header(body(welcome_body())).
-
-welcome_body() ->
- table(
- "WIDTH=100% HEIGHT=60%",
- [tr("VALIGN=middle",
- td("ALIGN=center",
- font("SIZE=6",
- ["Welcome to the Web Based",br(),
- "Erlang Crash Dump Analyser"]))),
- tr("VALIGN=middle",
- td("ALIGN=center",
- form(["name=load_new ACTION=\"./read_file_frame\""],
- input(["TYPE=submit VALUE=\"Load Crashdump\""]))))]).
-
-%%%-----------------------------------------------------------------
-%%% Present a form to enter file name of erlang crash dump
-read_file_frame() ->
- header("Read File",body(read_file_frame_body())).
-
-
-read_file_frame_body() ->
- %% Using a plain text input field instead of a file input field
- %% (e.g. <INPUT TYPE=file NAME=pathj SIZE=40">) because most
- %% browsers can not forward the full path from this dialog even if
- %% the browser is running on localhost (Ref 'fakepath'-problem)
- Entry = input("TYPE=text NAME=path SIZE=60"),
- Form =
- form(
- "NAME=read_file_form METHOD=post ACTION=\"./read_file\"",
- table(
- "BORDER=0",
- [tr(td("COLSPAN=2","Enter file to analyse")),
- tr(
- [td(Entry),
- td("ALIGN=center",input("TYPE=submit VALUE=Ok"))])])),
- table(
- "WIDTH=100% HEIGHT=60%",
- tr("VALIGN=middle",
- td("ALIGN=center",Form))).
-
-
-%%%-----------------------------------------------------------------
-%%% Display "Please wait..." while crashdump is being read
-redirect(Status) ->
- Head = ["<META HTTP-EQUIV=\"refresh\" CONTENT=\"3; URL=./redirect\">"],
- header("Please wait...",Head,body([Status,br(),"Please wait..."])).
-
-%%%-----------------------------------------------------------------
-%%% Frameset containing "filename", "menu", and "main" frames
-start_page() ->
- header("Crashdump Viewer Start Page",start_page_frameset()).
-
-start_page_frameset() ->
- frameset(
- "ROWS=\"70,*\"",
- [frame(["NAME=\"filename\" SRC=\"./filename_frame\""]),
- frameset(
- "COLS=\"200,*\"",
- [frame(["NAME=\"menu\" ",
- "SRC=\"/cdv_erl/crashdump_viewer/menu_frame\""]),
- frame("NAME=\"main\" SRC=\"./initial_info_frame\"")])]).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Topmost frame presents the filename of the crashdump currently
-%%% viewed
-filename_frame(File) ->
- header("Filename",body(filename_body(File))).
-
-filename_body(File) ->
- p("ALIGN=center",[b("Crashdump currently viewed:"),br(),File]).
-
-
-%%%-----------------------------------------------------------------
-%%% Left frame displays the menu
-menu_frame() ->
- header("Menu", body(menu_body())).
-
-menu_body() ->
- [p(format_items(1,ets:info(cdv_menu_table,size),true)),
- p([br(),
- form(["name=load_new ACTION=\"./read_file_frame\" ",
- "TARGET=app_frame"],
- input("TYPE=submit VALUE=\"Load New Crashdump\""))])].
-
-format_items(I,Max,_ParentState) when I>Max->
- [];
-format_items(I,Max,ParentState) when I=<Max->
- case ets:lookup(cdv_menu_table,I) of
- [] -> [];
- [#menu_item{state=false,children=0}] ->
- format_items(I+1,Max,ParentState);
- [#menu_item{state=false,children=Children}] ->
- format_items(I+Children+1,Max,arentState);
- [Item=#menu_item{state=true,children=0}] when ParentState ->
- This = format_item(Item),
- [This|format_items(I+1,Max,ParentState)];
- [Item=#menu_item{state=true,children=Children}] when ParentState ->
- This = format_item(Item),
- Ch = format_items(I+1,I+Children,true),
- [[This | Ch] | format_items(I+Children+1,Max,ParentState)]
- end.
-
-format_item(Item) ->
- [lists:duplicate(Item#menu_item.depth*5,?space),
- format_picture(Item#menu_item.index,
- Item#menu_item.picture,
- Item#menu_item.children),
- format_title(Item#menu_item.text,Item#menu_item.target),
- br()].
-
-format_picture(_Index,Picture,0) ->
- img(Picture);
-format_picture(Index,Picture,_Children) ->
- href( ["./toggle?index=", integer_to_list(Index)], img(Picture)).
-
-format_title({Link,Text},Target) ->
- href(["TARGET=\"",Target,"\""],Link,Text);
-format_title(Text,_Type) ->
- Text.
-
-%%%-----------------------------------------------------------------
-%%% Display the general information
-general_info(GenInfo) ->
- Heading = "General Information",
- header(Heading,body(general_info_body(Heading,GenInfo))).
-
-general_info_body(Heading,GenInfo) ->
- TruncatedInfo =
- case get(truncated) of
- true ->
- p(font("SIZE=\"+1\" COLOR=\"#FF0000\"",
- b(["WARNING:",br(),
- "The crashdump is truncated",br(),
- "Some information might be missing",br()])));
- false ->
- ""
- end,
-
- [heading(Heading,"general_info"),
- TruncatedInfo,
- table(
- "BORDER=4 CELLPADDING=4",
- [tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Slogan"),
- td(GenInfo#general_info.slogan)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Node name"),
- td(GenInfo#general_info.node_name)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Crashdump created on"),
- td(GenInfo#general_info.created)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","System version"),
- td(GenInfo#general_info.system_vsn)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Compiled"),
- td(GenInfo#general_info.compile_time)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Taints"),
- td(GenInfo#general_info.taints)]),
- case GenInfo#general_info.mem_tot of
- "" -> "";
- MemTot ->
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Memory allocated"),
- td([MemTot," bytes"])])
- end,
- case GenInfo#general_info.mem_max of
- "" -> "";
- MemMax ->
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Memory maximum"),
- td([MemMax," bytes"])])
- end,
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Atoms"),
- td(GenInfo#general_info.num_atoms)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Processes"),
- td(GenInfo#general_info.num_procs)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","ETS tables"),
- td(GenInfo#general_info.num_ets)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Timers"),
- td(GenInfo#general_info.num_timers)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Funs"),
- td(GenInfo#general_info.num_fun)])]),
- case GenInfo#general_info.instr_info of
- old_instr_data ->
- [br(),br(),
- font("COLOR=\"#FF0000\"",
- ["Instrumentation information is found at the end of ",br(),
- "the dump. The information has an old format, and ",br(),
- "is not presented in this tool. Please read the ",br(),
- "crashdump manually to see this information."])];
- instr_data ->
- [br(),br(),
- font("COLOR=\"#FF0000\"",
- ["Instrumentation information is found at the end of ",br(),
- "the dump. The information is not presented in this ",br(),
- "tool. Please read the crashdump manually to see",br(),
- "this information."])];
- false ->
- []
- end].
-
-%%%-----------------------------------------------------------------
-%%% Display an error message
-error(Text,Args) ->
- Str = io_lib:format(Text,Args),
- header(body(error_body(Str))).
-
-error_body(Str) ->
- [h1("An error occured:"),Str,"\n"].
-
-
-%%%-----------------------------------------------------------------
-%%% Display the given information as is
-info_page(Heading,Info) ->
- info_page(Heading,Info,[]).
-info_page(Heading,Info,TW) ->
- header(Heading,body(info_body(Heading,Info,TW))).
-
-info_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found\n"];
-info_body(Heading,Info,TW) ->
- [h1(Heading),
- warn(TW),
- pre(href_proc_port(lists:flatten(Info)))].
-
-%%%-----------------------------------------------------------------
-%%% Pretty print the given information
-pretty_info_page(Heading,Info) ->
- header(Heading,body(pretty_info_body(Heading,Info))).
-
-pretty_info_body(Heading,[]) ->
- [h1(Heading),
- "No information was found\n"];
-pretty_info_body(Heading,Info) ->
- [h1(Heading),
- pre(pretty_format(Info))].
-
-%%%-----------------------------------------------------------------
-%%% Print details for one process
-proc_details(Pid,Proc,TW,SharedHeap) ->
- Script =
-"<SCRIPT type=\"text/javascript\">
- function popup() {
- window.open(\"\",\"expanded\",'resizable=yes,scrollbars=yes')
-}
-</SCRIPT>\n",
-
- Heading = ["Process ", Pid],
- header(Heading,Script,body(proc_details_body(Heading,Proc,TW,SharedHeap))).
-
-proc_details_body(Heading,Proc,TW,SharedHeap) ->
- Pid = Proc#proc.pid,
- Name = if Proc#proc.name==Proc#proc.init_func -> ?space;
- true -> Proc#proc.name
- end,
- [help("processes"),
- warn(TW),
- table(
- "BORDER=4 COLS=4 WIDTH=\"100%\"",
- [tr(
- "BGCOLOR=\"#8899AA\"",
- [td("COLSPAN=4 ALIGN=center",Heading)]),
- tr(
- [td("NOWRAP=true",b("Name")),
- td("COLSPAN=1",Name),
- td("NOWRAP=true",b("Spawned as")),
- td("COLSPAN=1",Proc#proc.init_func)]),
- tr(
- [td("NOWRAP=true",b("State")),
- td("COLSPAN=1",Proc#proc.state),
- td("NOWRAP=true",b(element(1,Proc#proc.current_func))),
- td("COLSPAN=1",element(2,Proc#proc.current_func))]),
- tr(
- [td("NOWRAP=true",b("Started")),
- td("COLSPAN=1",Proc#proc.start_time),
- td("NOWRAP=true",b("Spawned by")),
- td("COLSPAN=1",href_proc_port(Proc#proc.parent))]),
- tr(
- [td("NOWRAP=true",b("Reductions")),
- td("COLSPAN=1",integer_to_list(Proc#proc.reds))] ++
- case Proc#proc.memory of
- undefined -> []; % before R16B01
- Mem ->
- [td("NOWRAP=true",b("Memory (bytes)")),
- td("COLSPAN=1",integer_to_list(Mem))]
- end),
- if SharedHeap ->
- Stack = case Proc#proc.stack_heap of
- -1 -> "unknown";
- S -> integer_to_list(S)
- end,
- tr(
- [td("NOWRAP=true",b("Stack")),
- td("COLSPAN=3",Stack)]);
- true ->
- [tr(
- [td("NOWRAP=true",b("Stack+heap")),
- td(integer_to_list(Proc#proc.stack_heap)),
- td("NOWRAP=true",b("OldHeap")),
- td(Proc#proc.old_heap)]),
- tr(
- [td("NOWRAP=true",b("Heap unused")),
- td(Proc#proc.heap_unused),
- td("NOWRAP=true",b("OldHeap unused")),
- td(Proc#proc.old_heap_unused)]),
- tr(
- [td("NOWRAP=true",b("Number of heap fragments")),
- td(Proc#proc.num_heap_frag),
- td("NOWRAP=true",b("Heap fragment data")),
- td(Proc#proc.heap_frag_data)])]
- end,
- case Proc#proc.new_heap_start of
- ?space -> "";
- _ ->
- %% Garbing
- [tr(
- [td("NOWRAP=true",b("New heap start")),
- td("COLSPAN=1",Proc#proc.new_heap_start),
- td("NOWRAP=true",b("New heap top")),
- td("COLSPAN=1",Proc#proc.new_heap_top)]),
- tr(
- [td("NOWRAP=true",b("Stack top")),
- td("COLSPAN=1",Proc#proc.stack_top),
- td("NOWRAP=true",b("Stack end")),
- td("COLSPAN=1",Proc#proc.stack_end)]),
- tr(
- [td("NOWRAP=true",b("Old heap start")),
- td("COLSPAN=1",Proc#proc.old_heap_start),
- td("NOWRAP=true",b("Old heap top")),
- td("COLSPAN=1",Proc#proc.old_heap_top)]),
- tr(
- [td("NOWRAP=true",b("Old heap end")),
- td("COLSPAN=3",Proc#proc.old_heap_end)])]
- end,
- case Proc#proc.prog_count of
- ?space -> "";
- _ ->
- [tr(
- [td("NOWRAP=true",b("Program counter")),
- td("COLSPAN=3",Proc#proc.prog_count)]),
- tr(
- [td("NOWRAP=true",b("Continuation pointer")),
- td("COLSPAN=3",Proc#proc.cp)]),
- tr(
- [td("NOWRAP=true",b("Arity")),
- td("COLSPAN=3",Proc#proc.arity)])]
- end,
- tr(
- [td("NOWRAP=true",b("Link list")),
- td("COLSPAN=3",href_proc_port(Proc#proc.links))]),
-
- tr(
- [td("NOWRAP=true",b("Msg queue length")),
- td("COLSPAN=3",integer_to_list(Proc#proc.msg_q_len))]),
-
- %% These are displayed only if data exist
- display_or_link_to_expand("MsgQueue",Proc#proc.msg_q,Pid),
- display_or_link_to_expand("Dictionary",Proc#proc.dict,Pid),
- display_or_link_to_expand("DebugDictionary",Proc#proc.debug_dict,Pid),
- display_or_link_to_expand("LastCalls",Proc#proc.last_calls,Pid),
- display_or_link_to_expand("StackDump",Proc#proc.stack_dump,Pid)]),
-
- p([href(["./ets_tables?pid=",Proc#proc.pid],
- "ETS tables owned by this process"),
- "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",
- href(["./timers?pid=",Proc#proc.pid],
- "Timers owned by this process")])].
-
-display_or_link_to_expand(Heading,Data,Pid) ->
- case Data of
- expand ->
- link_to_read_memory(Heading,Pid);
- truncated ->
- Text = font("COLOR=\"#FF0000\"",
- "The dump is truncated, no data available"),
- tr(
- [td("NOWRAP=true VALIGN=top",b(Heading)),
- td("COLSPAN=3",Text)]);
- ?space ->
- "";
- {size,Truncated,Size,Pos} ->
- %% Too much data, or truncated data -
- %% display a link to expand it
- tr(
- [td("NOWRAP=true",b(Heading)),
- td("COLSPAN=3",
- href("TARGET=\"expanded\" onClick=popup()",
- ["./expand?pos=",integer_to_list(Pos),
- "&size=",integer_to_list(Size),
- "&what=",Heading,
- "&truncated=",atom_to_list(Truncated)],
- ["Expand (",integer_to_list(Size)," bytes)"]))]);
- _ ->
- %% Not too much Data - display it
- tr(
- [td("NOWRAP=true VALIGN=top",b(Heading)),
- td("COLSPAN=3",pre(format(Heading,Data)))])
- end.
-
-link_to_read_memory(Heading,Pid) ->
- tr(
- [td("NOWRAP=true",b(Heading)),
- td("COLSPAN=3",
- href("TARGET=\"expanded\" onClick=popup()",
- ["./expand_memory?pid=",Pid,
- "&what=",Heading],
- ["Expand ", Heading]))]).
-
-format("LastCalls",Data) ->
- Data;
-format("StackDump",Data) ->
- Data;
-format(_Heading,Data) ->
- pretty_format(Data).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Expanded memory
-expanded_memory(Heading,Expanded) ->
- header(Heading,body(expanded_memory_body(Heading,Expanded))).
-
-expanded_memory_body(Heading,[]) ->
- [heading(Heading,"processes"),
- case Heading of
- "MsgQueue" -> "No messages were found";
- "StackDump" -> "No stack dump was found";
- "Dictionary" -> "No dictionary was found";
- "DebugDictionary" -> "No debug dictionary was found"
- end];
-expanded_memory_body(Heading,Expanded) ->
- [heading(Heading,"processes"),
- case Heading of
- "MsgQueue" ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Message"),
- th("SeqTraceToken")]) |
- lists:map(fun(Msg) -> msgq_table(Msg) end, Expanded)]);
- "StackDump" ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Label"),
- th("Term")]) |
- lists:map(fun(Entry) -> stackdump_table(Entry) end, Expanded)]);
- _ ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Key"),
- th("Value")]) |
- lists:map(fun(Entry) -> dict_table(Entry) end, Expanded)])
- end].
-
-msgq_table({Msg0,Token0}) ->
- Token = case Token0 of
- [] -> ?space;
- _ -> io_lib:fwrite("~w",[Token0])
- end,
- Msg = href_proc_port(lists:flatten(io_lib:format("~p",[Msg0]))),
- tr([td(pre(Msg)), td(Token)]).
-
-stackdump_table({Label0,Term0}) ->
- Label = io_lib:format("~w",[Label0]),
- Term = href_proc_port(lists:flatten(io_lib:format("~p",[Term0]))),
- tr([td("VALIGN=top",Label), td(pre(Term))]).
-
-dict_table({Key0,Value0}) ->
- Key = href_proc_port(lists:flatten(io_lib:format("~p",[Key0]))),
- Value = href_proc_port(lists:flatten(io_lib:format("~p",[Value0]))),
- tr([td("VALIGN=top",pre(Key)), td(pre(Value))]).
-
-
-%%%-----------------------------------------------------------------
-%%% Display an expanded binary, i.e. the whole binary, not just the
-%%% size of it.
-expanded_binary(Bin) ->
- Heading = "Expanded binary",
- header(Heading,body(expanded_binary_body(Heading,Bin))).
-
-expanded_binary_body(Heading,Bin) ->
- [h1(Heading),
- pre(href_proc_port(lists:flatten(Bin))),
- br(),br(),
- href("javascript:history.go(-1)","BACK")].
-
-%%%-----------------------------------------------------------------
-%%% Print info for one port
-port(Heading,Port,TW) ->
- header(Heading,body(port_body(Heading,Port,TW))).
-
-port_body(Heading,Port,TW) ->
- [heading(Heading,"ports"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr([th(Head) || Head <- port_table_head()]), ports_table(Port)])].
-
-%%%-----------------------------------------------------------------
-%%% Print table of internal ETS tables
-internal_ets_tables(InternalEts,TW) ->
- Heading = "Internal ETS tables",
- header(Heading,body(internal_ets_tables_body(Heading,InternalEts,TW))).
-
-internal_ets_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No internal ETS tables were found\n"];
-internal_ets_tables_body(Heading,InternalEts,TW) ->
- [heading(Heading,"internal_ets_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Description"),
- th("Id"),
- th("Name"),
- th("Type"),
- th("Buckets"),
- th("Objects"),
- th("Memory (bytes)")]) |
- lists:map(fun(InternalEtsTable) ->
- internal_ets_tables_table1(InternalEtsTable)
- end,
- InternalEts)])].
-
-internal_ets_tables_table1({Descr,InternalEtsTable}) ->
- #ets_table{id=Id,name=Name,type=Type,buckets=Buckets,
- size=Size,memory=Memory} = InternalEtsTable,
- tr(
- [td(Descr),
- td(Id),
- td(Name),
- td(Type),
- td("ALIGN=right",Buckets),
- td("ALIGN=right",Size),
- td("ALIGN=right",Memory)]).
-
-%%%-----------------------------------------------------------------
-%%% Print table of nodes in distribution
-nods(Nods,TW) ->
- header("Distribution Information",body(nodes_body(Nods,TW))).
-
-nodes_body(no_distribution,_TW) ->
- [heading("Distribution Information","distribution_info"),
- "Not alive\n"];
-nodes_body({Type,Info,Node},TW) when is_record(Node,nod) ->
- %% Display only one node - used when a pid or port on a remote
- %% node is clicked.
- [heading("Remote Node","distribution_info"),
- warn(TW),
- Info,
- make_nodes_table(Type,[Node])];
-nodes_body({Visible,Hidden,NotConnected},TW) ->
- %% Display all nodes - this is the complete distribution info
- [heading("Distribution Information","distribution_info"),
- warn(TW),
- make_nodes_table("Visible Nodes",Visible),
- make_nodes_table("Hidden Nodes",Hidden),
- make_nodes_table("Not Connected Nodes",NotConnected)].
-
-make_nodes_table(Text,[]) ->
- p(["No \"",Text,"\" were found"]);
-make_nodes_table(Text,Nodes) ->
- p(table(
- "BORDER=4 CELLPADDING=4",
- [nodes_table_heading(Text),
- lists:map(fun(Node) -> nodes_table_row(Node) end, Nodes)])).
-
-nodes_table_heading(Text) ->
- [tr("BGCOLOR=\"#8899AA\"",[th("COLSPAN=6",Text)]),
- tr([th("Name"),
- th("Channel"),
- th("Controller"),
- th("Creation(s)"),
- th("Links/Monitors"),
- th("Extra info")])].
-
-nodes_table_row(Node) ->
- #nod{name=Name,channel=Channel,controller=Controller,creation=Creation,
- remote_links=Links,remote_mon=Mon,remote_mon_by=MonBy,error=Error}=Node,
- tr(
- [td(maybe_refcount(Name)),
- td("ALIGN=right",Channel),
- td(href_proc_port(Controller)),
- td("ALIGN=right",break_lines_creation(Creation)),
- td(format_links_and_monitors(Links,Mon,MonBy)),
- td(format_extra_info(Error))]).
-
-maybe_refcount(Name) ->
- maybe_refcount(Name, []).
-maybe_refcount([$ ,$( | Rest], Acc) ->
- [lists:reverse(Acc),br(),[$(|Rest]];
-maybe_refcount([Char | Rest], Acc) ->
- maybe_refcount(Rest, [Char | Acc]);
-maybe_refcount([],Acc) ->
- lists:reverse(Acc).
-
-break_lines_creation(Creation) ->
- break_lines_creation(Creation,[]).
-break_lines_creation([$ ,$( | Rest1], Acc) ->
- {RefCount,Rest2} = to_end_par(Rest1,[$(,$ ]),
- [lists:reverse(Acc),RefCount,br(),break_lines_creation(Rest2)];
-break_lines_creation([$ | Rest], Acc) ->
- [lists:reverse(Acc),br(),break_lines_creation(Rest)];
-break_lines_creation([Char | Rest], Acc) ->
- break_lines_creation(Rest, [Char | Acc]);
-break_lines_creation([],Acc) ->
- lists:reverse(Acc).
-
-to_end_par([$),$ | Rest], Acc) ->
- {lists:reverse([$) | Acc]),Rest};
-to_end_par([$) | Rest], Acc) ->
- {lists:reverse([$) | Acc]),Rest};
-to_end_par([Char | Rest], Acc) ->
- to_end_par(Rest, [Char | Acc]);
-to_end_par([],Acc) ->
- {lists:reverse(Acc),[]}.
-
-
-format_links_and_monitors(?space,?space,?space) ->
- ?space;
-format_links_and_monitors(Links,Mon,MonBy) ->
- [format_links_and_monitors(Links," is linked to "),
- format_links_and_monitors(Mon," is monitoring "),
- format_links_and_monitors(MonBy," is monitored by ")].
-
-format_links_and_monitors(?space,_Text) ->
- "";
-format_links_and_monitors([{Local,Remote}|Rest],Text) ->
- [[href_proc_port(Local),Text,href_proc_port(Remote),br()] |
- format_links_and_monitors(Rest,Text)];
-format_links_and_monitors([],_Text) ->
- [].
-
-format_extra_info(?space) ->
- ?space;
-format_extra_info(Error) ->
- case Error of
- ?space -> "";
- _ -> font("COLOR=\"#FF0000\"",["ERROR: ",Error,"\n"])
- end.
-
-%%%-----------------------------------------------------------------
-%%% Print detailed information about one module
-loaded_mod_details(ModInfo,TW) ->
- header(ModInfo#loaded_mod.mod,body(loaded_mod_details_body(ModInfo,TW))).
-
-loaded_mod_details_body(ModInfo,TW) ->
- #loaded_mod{mod=Mod,current_size=CS,current_attrib=CA,
- current_comp_info=CCI,old_size=OS,
- old_attrib=OA,old_comp_info=OCI} = ModInfo,
- [help("loaded_modules"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(th("BGCOLOR=\"#8899AA\" COLSPAN=3",
- ["Module: ",Mod])),
- tr([td(?space),th("Current"),th("Old")]),
- tr([th("ALIGN=left","Size (bytes)"),
- td(CS),
- td(OS)]),
- tr([th("ALIGN=left","Attributes"),
- td(pre(CA)),
- td(pre(OA))]),
- tr([th("ALIGN=left","Compilation info"),
- td(pre(CCI)),
- td(pre(OCI))])])].
-
-
-%%%-----------------------------------------------------------------
-%%% Print atoms
-atoms(SessionId,TW,Num,FirstChunk) ->
- Heading = "Atoms",
- case FirstChunk of
- done ->
- deliver_first(SessionId,[start_html_page(Heading),
- h1(Heading),
- warn(TW),
- "No atoms were found in log",br(),
- "Total number of atoms in node was ", Num,
- br()]);
- _ ->
- deliver_first(SessionId,[start_html_page(Heading),
- heading(Heading,"atoms"),
- warn(TW),
- "Total number of atoms in node was ", Num,
- br(),
- "The last created atom is shown first",
- br(),
- start_pre()]),
- atoms_chunk(SessionId,FirstChunk)
- end.
-
-atoms_chunk(SessionId,done) ->
- deliver(SessionId,[stop_pre(),stop_html_page()]);
-atoms_chunk(SessionId,Atoms) ->
- deliver(SessionId,Atoms).
-
-%%%-----------------------------------------------------------------
-%%% Print memory information
-memory(Memory,TW) ->
- Heading = "Memory Information",
- header(Heading,body(memory_body(Heading,Memory,TW))).
-
-memory_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No memory information was found\n"];
-memory_body(Heading,Memory,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr("BGCOLOR=\"#8899AA\"",
- [th(?space),
- th("Bytes")]) |
- lists:map(fun(Entry) -> memory_table(Entry) end, Memory)])].
-
-memory_table({Key,Value}) ->
- tr([th("ALIGN=left",Key),td("ALIGN=right",Value)]).
-
-%%%-----------------------------------------------------------------
-%%% Print allocated areas information
-allocated_areas(AllocatedAreas,TW) ->
- Heading = "Information about allocated areas",
- header(Heading,body(allocated_areas_body(Heading,AllocatedAreas,TW))).
-
-allocated_areas_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found about allocated areas\n"];
-allocated_areas_body(Heading,AllocatedAreas,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr("BGCOLOR=\"#8899AA\"",
- [th(?space),
- th("Allocated (bytes)"),
- th("Used (bytes)")]) |
- lists:map(fun(Entry) -> allocated_areas_table(Entry) end,
- AllocatedAreas)])].
-
-allocated_areas_table({Key,Alloc,Used}) ->
- tr(
- [th("ALIGN=left",Key),
- td("ALIGN=right",Alloc),
- td("ALIGN=right",Used)]).
-
-
-%%%-----------------------------------------------------------------
-%%% Print allocator_info information
-allocator_info(Allocators,TW) ->
- Heading = "Allocator Information",
- header(Heading,body(allocator_info_body(Heading,Allocators,TW))).
-
-allocator_info_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found about allocators\n"];
-allocator_info_body(Heading,Allocators,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- p(b("Sizes are in bytes")),
- lists:map(fun({Head,Allocator}) ->
- TableHead =
- case Head of
- {SubTitle,Columns} ->
- tr("BGCOLOR=\"#8899AA\"",
- [th("ALIGN=left",
- font("SIZE=+1",SubTitle)) |
- lists:map(
- fun(CH) ->
- th("ALIGN=right",CH)
- end,
- Columns)]);
- SubTitle ->
- tr("BGCOLOR=\"#8899AA\"",
- th("COLSPAN=10 ALIGN=left",
- font("SIZE=+1",SubTitle)))
- end,
- [table(
- "BORDER=4 CELLPADDING=4",
- [TableHead |
- lists:map(
- fun({Key,Values}) ->
- tr([th("ALIGN=left",Key) |
- lists:map(
- fun(Val) ->
- td("ALIGN=right",Val)
- end,Values)])
- end,
- Allocator)]),
- br(),br()]
- end,
- Allocators)].
-
-%%%-----------------------------------------------------------------
-%%% Print informatin about internal tables
-hash_tables(HashTables,TW) ->
- Heading = "Hash Table Information",
- header(Heading,body(hash_tables_body(Heading,HashTables,TW))).
-
-hash_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No hash table information was found\n"];
-hash_tables_body(Heading,HashTables,TW) ->
- [heading(Heading,"internal_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Name"),
- th("Size"),
- th("Used"),
- th("Objects"),
- th("Depth")]) |
- lists:map(fun(HashTable) -> hash_tables_table(HashTable) end,
- HashTables)])].
-
-hash_tables_table(HashTable) ->
- #hash_table{name=Name,size=Size,used=Used,objs=Objs,depth=Depth}=HashTable,
- tr(
- [td(Name),
- td("ALIGN=right",Size),
- td("ALIGN=right",Used),
- td("ALIGN=right",Objs),
- td("ALIGN=right",Depth)]).
-
-index_tables(IndexTables,TW) ->
- Heading = "Index Table Information",
- header(Heading,body(index_tables_body(Heading,IndexTables,TW))).
-
-index_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No index table information was found\n"];
-index_tables_body(Heading,IndexTables,TW) ->
- [heading(Heading,"internal_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Name"),
- th("Size"),
- th("Limit"),
- th("Used"),
- th("Rate"),
- th("Entries")]) |
- lists:map(fun(IndexTable) -> index_tables_table(IndexTable) end,
- IndexTables)])].
-
-index_tables_table(IndexTable) ->
- #index_table{name=Name,size=Size,limit=Limit,used=Used,
- rate=Rate,entries=Entries} = IndexTable,
- tr(
- [td(Name),
- td("ALIGN=right",Size),
- td("ALIGN=right",Limit),
- td("ALIGN=right",Used),
- td("ALIGN=right",Rate),
- td("ALIGN=right",Entries)]).
-
-%%%-----------------------------------------------------------------
-%%% Internal library
-start_html_page(Title) ->
- [only_http_header(),
- start_html(),
- only_html_header(Title),
- start_html_body()].
-
-stop_html_page() ->
- [stop_html_body(),
- stop_html()].
-
-only_http_header() ->
- ["Pragma:no-cache\r\n",
- "Content-type: text/html\r\n\r\n"].
-
-only_html_header(Title) ->
- only_html_header(Title,"").
-only_html_header(Title,JavaScript) ->
- ["<HEAD>\n",
- "<TITLE>", Title, "</TITLE>\n",
- JavaScript,
- "</HEAD>\n"].
-
-start_html() ->
- "<HTML>\n".
-stop_html() ->
- "</HTML>".
-start_html_body() ->
- "<BODY BGCOLOR=\"#FFFFFF\">\n".
-stop_html_body() ->
- "</BODY>\n".
-
-header(Body) ->
- header("","",Body).
-header(Title,Body) ->
- header(Title,"",Body).
-header(Title,JavaScript,Body) ->
- [only_http_header(),
- html_header(Title,JavaScript,Body)].
-
-html_header(Title,JavaScript,Body) ->
- [start_html(),
- only_html_header(Title,JavaScript),
- Body,
- stop_html()].
-
-body(Text) ->
- [start_html_body(),
- Text,
- stop_html_body()].
-
-frameset(Args,Frames) ->
- ["<FRAMESET ",Args,">\n", Frames, "\n</FRAMESET>\n"].
-frame(Args) ->
- ["<FRAME ",Args, ">\n"].
-
-start_visible_table() ->
- start_table("BORDER=\"4\" CELLPADDING=\"4\"").
-start_visible_table(ColTitles) ->
- [start_visible_table(),
- tr([th(ColTitle) || ColTitle <- ColTitles])].
-
-start_table(Args) ->
- ["<TABLE ", Args, ">\n"].
-stop_table() ->
- "</TABLE>\n".
-
-table(Args,Text) ->
- [start_table(Args), Text, stop_table()].
-tr(Text) ->
- ["<TR>\n", Text, "\n</TR>\n"].
-tr(Args,Text) ->
- ["<TR ", Args, ">\n", Text, "\n</TR>\n"].
-th(Text) ->
- ["<TH>", Text, "</TH>"].
-th(Args,Text) ->
- ["<TH ", Args, ">\n", Text, "\n</TH>\n"].
-td(Text) ->
- ["<TD>", Text, "</TD>"].
-td(Args,Text) ->
- ["<TD ", Args, ">", Text, "</TD>"].
-
-b(Text) ->
- ["<B>",Text,"</B>"].
-em(Text) ->
- ["<EM>",Text,"</EM>\n"].
-start_pre() ->
- "<PRE>".
-stop_pre() ->
- "</PRE>".
-pre(Text) ->
- [start_pre(),Text,stop_pre()].
-href(Link,Text) ->
- ["<A HREF=\"",Link,"\">",Text,"</A>"].
-href(Args,Link,Text) ->
- ["<A HREF=\"",Link,"\" ",Args,">",Text,"</A>"].
-img("") ->
- "";
-img(Picture) ->
- ["<IMG SRC=\"", Picture, "\" BORDER=0>"].
-form(Args,Text) ->
- ["<FORM ",Args,">\n",Text,"\n</FORM>\n"].
-input(Args) ->
- ["<INPUT ", Args, ">\n"].
-h1(Text) ->
- ["<H1>",Text,"</H1>\n"].
-font(Args,Text) ->
- ["<FONT ",Args,">\n",Text,"\n</FONT>\n"].
-p(Text) ->
- ["<P>",Text,"</P>\n"].
-p(Args, Text) ->
- ["<P ", Args, ">",Text,"</P>\n"].
-br() ->
- "<BR>\n".
-
-
-%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
-href_proc_port(Text) ->
- href_proc_port(Text,[]).
-href_proc_port([$#,$R,$e,$f,$<|T],Acc) ->
- %% No links to refs
- href_proc_port(T,[$;,$t,$l,$&,$f,$e,$R,$#|Acc]);
-href_proc_port([$#,$F,$u,$n,$<|T],Acc) ->
- %% No links to funs
- href_proc_port(T,[$;,$t,$l,$&,$n,$u,$F,$#|Acc]);
-href_proc_port([$#,$P,$o,$r,$t,$<|T],Acc) ->
- {[$#|Port]=HashPort,Rest} = to_gt(T,[$;,$t,$l,$&,$t,$r,$o,$P,$#]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./port?port=",Port],HashPort)|Acc]);
-href_proc_port([$<,$<|T],Acc) ->
- %% No links to binaries
- href_proc_port(T,[$;,$t,$l,$&,$;,$t,$l,$&|Acc]);
-href_proc_port([$<,C|T],Acc) when $0 =< C, C =< $9 ->
- %% Pid
- {Pid,Rest} = to_gt(T,[C,$;,$t,$l,$&]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./proc_details?pid=",Pid],Pid)|Acc]);
-href_proc_port([$",$#,$C,$D,$V,$B,$i,$n,$<|T],Acc) ->
- %% Binary written by crashdump_viewer:parse_heap_term(...)
- {SizeAndPos,[$"|Rest]} = split($>,T),
- {Size,Pos} = split($,,SizeAndPos),
- href_proc_port(Rest,[href("TARGET=\"expanded\"",
- ["./expand_binary?pos=",Pos],
- ["&lt;&lt; ",Size," bytes &gt;&gt;"]) | Acc]);
-href_proc_port([$",$#,$C,$D,$V,$P,$o,$r,$t,$<|T],Acc) ->
- %% Port written by crashdump_viewer:parse_term(...)
- {[$#|Port]=HashPort,[$"|Rest]} = to_gt(T,[$;,$t,$l,$&,$t,$r,$o,$P,$#]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./port?port=",Port],HashPort)|Acc]);
-href_proc_port([$",$#,$C,$D,$V,$P,$i,$d,$<|T],Acc) ->
- %% Pid written by crashdump_viewer:parse_term(...)
- {Pid,[$"|Rest]} = to_gt(T,[$;,$t,$l,$&]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./proc_details?pid=",Pid],Pid)|Acc]);
-href_proc_port([$',$#,$C,$D,$V,$I,$n,$c,$o,$m,$p,$l,$e,$t,$e,$H,$e,$a,$p,$'|T],
- Acc)->
- %% The heap is incomplete! Written by crashdump_viewer:deref_pts(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">...(Incomplete Heap)</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$',$#,$C,$D,$V,$T,$r,$u,$n,$c,$a,$t,$e,$d,$B,$i,$n,$a,$r,$y,$'
- |T], Acc)->
- %% A binary which is truncated! Written by
- %% crashdump_viewer:parse_heap_term(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Truncated Binary)&gt;&gt;"
- "</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$',$#,$C,$D,$V,$N,$o,$n,$e,$x,$i,$s,$t,$i,$n,$g,$B,$i,$n,$a,$r,
- $y,$'|T], Acc)->
- %% A binary which could not be found in the dump! Written by
- %% crashdump_viewer:parse_heap_term(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Nonexisting Binary)&gt;&gt;"
- "</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$<|T],Acc) ->
- href_proc_port(T,[$;,$t,$l,$&|Acc]);
-href_proc_port([$>|T],Acc) ->
- href_proc_port(T,[$;,$t,$g,$&|Acc]);
-href_proc_port([H|T],Acc) ->
- href_proc_port(T,[H|Acc]);
-href_proc_port([],Acc) ->
- lists:reverse(Acc).
-
-to_gt(Str,Acc) ->
- {Match,Rest} = to_gt_noreverse(Str,Acc),
- {lists:reverse(Match),Rest}.
-to_gt_noreverse([$>|T],Acc) ->
- {[$;,$t,$g,$&|Acc],T};
-to_gt_noreverse([H|T],Acc) ->
- to_gt_noreverse(T,[H|Acc]);
-to_gt_noreverse([],Acc) ->
- {Acc,[]}.
-
-split(Char,Str) ->
- split(Char,Str,[]).
-split(Char,[Char|Str],Acc) -> % match Char
- {lists:reverse(Acc),Str};
-split(Char,[H|T],Acc) ->
- split(Char,T,[H|Acc]).
-
-
-warn([]) ->
- [];
-warn(Warning) ->
- font("COLOR=\"#FF0000\"",p([Warning,br(),br()])).
-
-heading(Heading,HelpMarker) ->
- [font("SIZE=+2",b(Heading)),?space,?space,help(HelpMarker)].
-
-help(HelpMarker) ->
- [href("TARGET=doc",
- ["/crashdump_doc/crashdump_help.html#",HelpMarker],
- "Help"),
- br(),br()].
-
-%%%-----------------------------------------------------------------
-%%% This function pretty formats a string which contains erlang
-%%% terms (e.g. the message queue).
-%%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
-pretty_format(In) ->
- case catch scan(In,[],initial,[]) of
- {'EXIT',_Reason} ->
- %% Probably a truncated file, so the erlang term is not complete
- [font("COLOR=\"#FF0000\"","(This term might be truncated)"),
- href_proc_port(lists:flatten(In))];
- {[R],_,Insrt} ->
- InsrtString = lists:flatten(io_lib:format("~p",[R])),
- lists:flatten(replace_insrt(lists:reverse(InsrtString),Insrt,[]))
- end.
-
-%% Finish term
-scan(In,Acc,list,Insrt) when hd(In)==$] ->
- {lists:reverse(Acc),tl(In),Insrt};
-scan(In,Acc,tuple,Insrt) when hd(In)==$} ->
- {list_to_tuple(lists:reverse(Acc)),tl(In),Insrt};
-scan(In,Acc,atom,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_atom(lists:reverse(Acc)),In,Insrt};
-scan(In,Acc,float,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_float(lists:reverse(Acc)),In,Insrt};
-scan(In,Acc,integer,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_integer(lists:reverse(Acc)),In,Insrt};
-scan([$"|In],Acc,string,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {lists:reverse(Acc),In,Insrt};
-scan([$>|In],Acc,special,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- %% pid, ref, port, fun
- {lists:reverse([$;,$t,$g,$&|Acc]),In,Insrt};
-scan([$}|In],Acc,special,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- %% bignum integer, e.g. #integer(2) = {2452,4324}
- {lists:reverse([$}|Acc]),In,Insrt};
-scan([$,|In],Acc,Cur,Insrt) when Cur/=string,Cur/=special ->
- scan(In,Acc,Cur,Insrt);
-
-%% In the middle of an atom
-scan([$'|In],Acc,Cur,Insrt) when Cur==atom ->
- %% all $' are removed. They are added again by list_to_atom,
- %% so if we don't remove them we will get two of them.
- scan(In,Acc,Cur,Insrt);
-
-%% A $. in the middle of an integer - turn to float
-scan([C|T],Acc,integer,Insrt) when C==$. ->
- scan(T,[C|Acc],float,Insrt);
-
-%% In the middle of an atom, integer, float or string
-scan([$<|T],Acc,Cur,Insrt) when Cur==atom;Cur==string;Cur==special ->
- scan(T,[$;,$t,$l,$&|Acc],Cur,Insrt);
-scan([$>|T],Acc,Cur,Insrt) when Cur==atom;Cur==string ->
- scan(T,[$;,$t,$g,$&|Acc],Cur,Insrt);
-scan([C|T],Acc,Cur,Insrt) when Cur==atom;Cur==integer;Cur==float;Cur==string;Cur==special ->
- scan(T,[C|Acc],Cur,Insrt);
-
-%% Start list
-scan([$[|T],Acc,Cur,Insrt0) ->
- {L,Rest,Insrt} = scan(T,[],list,Insrt0),
- scan(Rest,[L|Acc],Cur,Insrt);
-
-%% Star tuple
-scan([${|T],Acc,Cur,Insrt0) ->
- {Tuple,Rest,Insrt} = scan(T,[],tuple,Insrt0),
- scan(Rest,[Tuple|Acc],Cur,Insrt);
-
-%% Star string
-scan([$"|T],Acc,Cur,Insrt0) ->
- {String,Rest,Insrt} = scan(T,[],string,Insrt0),
- scan(Rest,[String|Acc],Cur,Insrt);
-
-%% Start atom
-scan([$'|T],Acc,Cur,Insrt0) ->
- %% all $' are removed. They are added again by list_to_atom,
- %% so if we don't remove them we will get two of them.
- {Atom,Rest,Insrt} = scan(T,[],atom,Insrt0),
- scan(Rest,[Atom|Acc],Cur,Insrt);
-scan([C|T],Acc,Cur,Insrt0) when C>=$A,C=<$Z;C>=$a,C=<$z;C==$'->
- {Atom,Rest,Insrt} = scan(T,[C],atom,Insrt0),
- scan(Rest,[Atom|Acc],Cur,Insrt);
-
-%% Start integer or float
-scan([C|T],Acc,Cur,Insrt0) when C>=$0,C=<$9;C==$- ->
- {Num,Rest,Insrt} = scan(T,[C],integer,Insrt0), % can later change to float
- scan(Rest,[Num|Acc],Cur,Insrt);
-
-%% Start Pid/Port/Ref/Fun/Binary
-scan([$<|T],Acc,Cur,Insrt0) ->
- {Special,Rest,Insrt} = scan(T,[$;,$t,$l,$&],special,Insrt0),
- scan(Rest,['$insrt'|Acc],Cur,[Special|Insrt]);
-scan([$#|T],Acc,Cur,Insrt0) ->
- {Special,Rest,Insrt} = scan(T,[$#],special,Insrt0),
- scan(Rest,['$insrt'|Acc],Cur,[Special|Insrt]);
-
-
-%% done
-scan([],Acc,initial,Insrt) ->
- {Acc,[],Insrt}.
-
-
-replace_insrt("'trsni$'"++Rest,[H|T],Acc) -> % the list is reversed here!
- Special =
- case H of
- "&lt;&lt;" ++ _Binary ->
- H;
- "&lt;" ++ _Pid ->
- href("TARGET=\"main\"",["./proc_details?pid=",H],H);
- "#Port&lt;" ++ Port ->
- href("TARGET=\"main\"",["./port?port=","Port&lt;"++Port],H);
- "#" ++ _other ->
- H
- end,
- replace_insrt(Rest,T,[Special|Acc]);
-replace_insrt([H|T],Insrt,Acc) ->
- replace_insrt(T,Insrt,[H|Acc]);
-replace_insrt([],[],Acc) ->
- Acc.
-
-%%%-----------------------------------------------------------------
-%%% Create a page with one table by delivering chunk by chunk to
-%%% inets. crashdump_viewer first calls chunk_page/5 once, then
-%%% chunk/3 multiple times until all data is delivered.
-chunk_page(processes,SessionId,TW,{Sorted,SharedHeap,DumpVsn},FirstChunk) ->
- Columns = procs_summary_table_head(Sorted,SharedHeap,DumpVsn),
- chunk_page(SessionId, "Process Information", TW, FirstChunk,
- "processes", Columns, fun procs_summary_table/1);
-chunk_page(ports,SessionId,TW,_,FirstChunk) ->
- chunk_page(SessionId, "Port Information", TW, FirstChunk,
- "ports", port_table_head(), fun ports_table/1);
-chunk_page(ets_tables,SessionId,TW,Heading,FirstChunk) ->
- Columns = ["Owner",
- "Slot",
- "Id",
- "Name",
- "Type",
- "Buckets",
- "Objects",
- "Memory (bytes)"],
- chunk_page(SessionId, Heading, TW, FirstChunk,
- "ets_tables", Columns, fun ets_tables_table/1);
-chunk_page(timers,SessionId,TW,Heading,FirstChunk) ->
- chunk_page(SessionId, Heading, TW, FirstChunk, "timers",
- ["Owner","Message","Time left"], fun timers_table/1);
-chunk_page(loaded_mods,SessionId,TW,{CC,OC},FirstChunk) ->
- TotalsInfo = p([b("Current code: "),CC," bytes",br(),
- b("Old code: "),OC," bytes"]),
- Columns = ["Module","Current size (bytes)","Old size (bytes)"],
- chunk_page(SessionId, "Loaded Modules Information", TW, FirstChunk,
- "loaded_modules", TotalsInfo,Columns, fun loaded_mods_table/1);
-chunk_page(funs,SessionId, TW, _, FirstChunk) ->
- Columns = ["Module",
- "Uniq",
- "Index",
- "Address",
- "Native_address",
- "Refc"],
- chunk_page(SessionId, "Fun Information", TW, FirstChunk,
- "funs", Columns, fun funs_table/1).
-
-chunk_page(SessionId,Heading,TW,FirstChunk,Type,TableColumns,TableFun) ->
- chunk_page(SessionId,Heading,TW,FirstChunk,Type,[],TableColumns,TableFun).
-chunk_page(SessionId,Heading,TW,done,Type,_TotalsInfo,_TableColumns,_TableFun) ->
- no_info_found(SessionId,Heading,TW,Type);
-chunk_page(SessionId,Heading,TW,FirstChunk,Type,TotalsInfo,TableColumns,TableFun) ->
- deliver_first(SessionId,[start_html_page(Heading),
- heading(Heading,Type),
- warn(TW),
- TotalsInfo,
- start_visible_table(TableColumns)]),
- chunk(SessionId,FirstChunk,TableFun),
- TableFun.
-
-no_info_found(SessionId, Heading, TW, Type) ->
- Info = ["No ", Type, " were found\n"],
- deliver_first(SessionId,[start_html_page(Heading),
- h1(Heading),
- warn(TW),
- Info,
- stop_html_page()]).
-
-chunk(SessionId, done, _TableFun) ->
- deliver(SessionId,[stop_table(),stop_html_page()]);
-chunk(SessionId, Items, TableFun) ->
- deliver(SessionId, [lists:map(TableFun, Items),
- stop_table(), %! Will produce an empty table at the end
- start_visible_table()]). % of the page :(
-
-%%%-----------------------------------------------------------------
-%%% Deliver part of a page to inets
-%%% The first part, which includes the HTTP header, must always be
-%%% delivered as a string (i.e. no binaries). The rest of the page is
-%%% better delivered as binaries in order to avoid data copying.
-deliver_first(SessionId,String) ->
- mod_esi:deliver(SessionId,String).
-deliver(SessionId,IoList) ->
- mod_esi:deliver(SessionId,[list_to_binary(IoList)]).
-
-
-%%%-----------------------------------------------------------------
-%%% Page specific stuff for chunk pages
-procs_summary_table_head(Sorted,SharedHeap,DumpVsn) ->
- MemHeading =
- if DumpVsn>=?r16b01_dump_vsn ->
- "Memory (bytes)";
- true ->
- if SharedHeap ->
- "Stack";
- true ->
- "Stack+heap"
- end
- end,
- [procs_summary_table_head1("pid","Pid",Sorted),
- procs_summary_table_head1("name_func","Name/Spawned as",Sorted),
- procs_summary_table_head1("state","State",Sorted),
- procs_summary_table_head1("reds","Reductions",Sorted),
- procs_summary_table_head1("mem",MemHeading,Sorted),
- procs_summary_table_head1("msg_q_len","MsgQ Length",Sorted)].
-
-procs_summary_table_head1(_,Text,no_sort) ->
- Text;
-procs_summary_table_head1(Sorted,Text,Sorted) ->
- %% Mark the sorted column (bigger and italic)
- font("SIZE=\"+1\"",em(href("./sort_procs?sort="++Sorted,Text)));
-procs_summary_table_head1(SortOn,Text,_Sorted) ->
- href("./sort_procs?sort="++SortOn,Text).
-
-procs_summary_table(Proc) ->
- #proc{pid=Pid,name=Name,state=State,
- reds=Reds,stack_heap=Stack,memory=Memory,msg_q_len=MsgQLen}=Proc,
- Mem =
- case Memory of
- undefined -> % assuming pre-R16B01
- case Stack of
- -1 -> "unknown";
- _ -> integer_to_list(Stack)
- end;
- _ ->
- integer_to_list(Memory)
- end,
- tr(
- [td(href(["./proc_details?pid=",Pid],Pid)),
- td(Name),
- td(State),
- td("ALIGN=right",integer_to_list(Reds)),
- td("ALIGN=right",Mem),
- td("ALIGN=right",integer_to_list(MsgQLen))]).
-
-port_table_head() ->
- ["Id","Slot","Connected","Links","Name","Monitors","Controls"].
-
-ports_table(Port) ->
- #port{id=Id,slot=Slot,connected=Connected,links=Links,name=Name,
- monitors=Monitors,controls=Controls}=Port,
- tr(
- [td(Id),
- td("ALIGN=right",Slot),
- td(href_proc_port(Connected)),
- td(href_proc_port(Links)),
- td(Name),
- td(href_proc_port(Monitors)),
- td(Controls)]).
-
-ets_tables_table(EtsTable) ->
- #ets_table{pid=Pid,slot=Slot,id=Id,name=Name,type=Type,
- buckets=Buckets,size=Size,memory=Memory} = EtsTable,
- tr(
- [td(href_proc_port(Pid)),
- td(Slot),
- td(Id),
- td(Name),
- td(Type),
- td("ALIGN=right",Buckets),
- td("ALIGN=right",Size),
- td("ALIGN=right",Memory)]).
-
-timers_table(Timer) ->
- #timer{pid=Pid,msg=Msg,time=Time}=Timer,
- tr(
- [td(href_proc_port(Pid)),
- td(Msg),
- td("ALIGN=right",Time)]).
-
-loaded_mods_table(#loaded_mod{mod=Mod,current_size=CS,old_size=OS}) ->
- tr([td(href(["loaded_mod_details?mod=",http_uri:encode(Mod)],Mod)),
- td("ALIGN=right",CS),
- td("ALIGN=right",OS)]).
-
-funs_table(Fu) ->
- #fu{module=Module,uniq=Uniq,index=Index,address=Address,
- native_address=NativeAddress,refc=Refc}=Fu,
- tr(
- [td(Module),
- td("ALIGN=right",Uniq),
- td("ALIGN=right",Index),
- td(Address),
- td(NativeAddress),
- td("ALIGN=right",Refc)]).
diff --git a/lib/observer/src/etop.erl b/lib/observer/src/etop.erl
index 2610060eae..96a18cf450 100644
--- a/lib/observer/src/etop.erl
+++ b/lib/observer/src/etop.erl
@@ -44,9 +44,6 @@ help() ->
" sort runtime | reductions | memory | msg_q~n"
" What information to sort by~n"
" Default: runtime (reductions if tracing=off)~n"
- " output graphical | text~n"
- " How to present results~n"
- " Default: graphical~n"
" tracing on | off etop uses the erlang trace facility, and thus~n"
" no other tracing is possible on the node while~n"
" etop is running, unless this option is set to~n"
@@ -317,7 +314,7 @@ handle_args([_| R], C) ->
handle_args([], C) ->
C.
-output(graphical) -> etop_gui;
+output(graphical) -> exit({deprecated, "Use observer instead"});
output(text) -> etop_txt.
diff --git a/lib/observer/src/etop_defs.hrl b/lib/observer/src/etop_defs.hrl
index 664de61973..720fb50b5a 100644
--- a/lib/observer/src/etop_defs.hrl
+++ b/lib/observer/src/etop_defs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,8 +22,8 @@
" procs~8w processes~8w code ~8w~n"
" runq ~8w atom ~8w ets ~8w~n").
--record(opts, {node=node(), port = 8415, accum = false, intv = 5000, lines = 10,
+-record(opts, {node=node(), port = 8415, accum = false, intv = 5000, lines = 10,
width = 700, height = 340, sort = runtime, tracing = on,
%% Other state information
- out_mod=etop_gui, out_proc, server, host, tracer, store,
+ out_mod=etop_txt, out_proc, server, host, tracer, store,
accum_tab, remote}).
diff --git a/lib/observer/src/etop_gui.erl b/lib/observer/src/etop_gui.erl
deleted file mode 100644
index 3971646abc..0000000000
--- a/lib/observer/src/etop_gui.erl
+++ /dev/null
@@ -1,374 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(etop_gui).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,create,4}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}}]).
-
--author('[email protected]').
-
--export([init/1,stop/1]).
--export([formatmfa/1,to_list/1]).% For etop_txt
-
--include("etop.hrl").
--include("etop_defs.hrl").
-
--import(etop, [loadinfo/1, meminfo/2, getopt/2]).
-
-%% Heights
--define(BarH, 28). % height of menubar
--define(LabelH, 90). % height of label with system info
--define(GridLineH, 21). % height of one line in the table (grid)
-
-%% Column numbers for grid - click to sort
--define(TimeCol, 3).
--define(RedsCol, 4).
--define(MemCol, 5).
--define(MsgQCol, 6).
-
-%% Font
--define(Normal, {screen,12}).
--define(Bold, {screen,bold,12}).
-
-
-%% -----------------------------------------------------------------------------
-stop(_) -> ok.
-
-init(Config) ->
- S = gs:start(),
- Width = getopt(width, Config),
- TotLines = getopt(lines,Config)+1,
-
- %% Max number of processes shown in window at startup is 10
- %% If less than 10 lines is specified, window size fits number of lines
- WinH = if TotLines > 11 -> 11*?GridLineH + ?BarH + ?LabelH;
- true -> TotLines*?GridLineH + ?BarH + ?LabelH
- end,
- Win = gs:create(window, S,
- [{title, "Erlang Top"},
- {map, true}, %% While debugging
- {configure, true},
- {width, Width}, {height, WinH}]),
- Bar = gs:create(menubar, Win, []),
-
- FileButt = gs:create(menubutton, Bar, [{label,{text, " File "}}]),
- OptionsButt = gs:create(menubutton, Bar, [{label,{text, " Options "}}]),
- File = gs:create(menu, FileButt, []),
- Options = gs:create(menu, OptionsButt, []),
- gse:named_menuitem(refresh, File,
- [{label,{text," Refresh "}}]),
- gse:named_menuitem(dump, File,
- [{label,{text," Dump to file "}}]),
- gse:named_menuitem(exit, File,
- [{label,{text," Exit "}}]),
-
- gse:named_menuitem(accum, Options,
- [{label,{text, " Accumulate "}},
- {itemtype, check}]),
- gse:named_menuitem(intv, Options,
- [{label,{text, " Update Interval "}}]),
- gse:named_menuitem(lines, Options,
- [{label,{text, " Number of Lines "}}]),
- Sort = gse:named_menuitem(sort, Options,
- [{label,{text, " Sort "}},
- {itemtype,cascade}]),
- SortMenu = gse:create(menu, Sort, []),
- gse:named_menuitem(runtime, SortMenu,
- [{label,{text, " Time "}},
- {itemtype,radio},{group,gr1}]),
- gse:named_menuitem(memory, SortMenu,
- [{label,{text, " Memory "}},
- {itemtype,radio},{group,gr1}]),
- gse:named_menuitem(reductions, SortMenu,
- [{label,{text, " Reductions "}},
- {itemtype,radio},{group,gr1}]),
- gse:named_menuitem(msg_q, SortMenu,
- [{label,{text, " Message Queue "}},
- {itemtype,radio},{group,gr1}]),
-
- SysInfo = gs:create(label,Win,[{x, 0}, {y, ?BarH},{align,sw},
- {width, Width},{height,?LabelH}]),
-
- {GridH,VScroll} = calc_grid_h(WinH,TotLines),
- Grid = gse:grid(Win,
- [{x, 0}, {y, ?BarH+?LabelH},
- {width, Width},
- {height, GridH},
- {hscroll, false},
- {vscroll, VScroll},
- {columnwidths, calc_column_w(Width)},
- {rows, {1, TotLines}},
- {font,?Normal}]),
-
- %% Header line
- GL1 = gse:gridline(Grid, [{{text, 1}, "PID"},
- {{text, 2}, "Name or Initial Function"},
- {{text, ?TimeCol}, "Time(us)"},
- {{text, ?RedsCol}, "Reds"},
- {{text, ?MemCol}, "Memory"},
- {{text, ?MsgQCol}, "MsgQ"},
- {{text, 7}, "Current Function"},
- {bg, lightblue},
- {row, 1},
- {click, true}]),
-
- config_sort(GL1,getopt(sort,Config)),
- Info = do_update(Grid, SysInfo, Config),
-
- get_event(Info, Win, Grid, GL1, SysInfo, Config).
-
-calc_column_w(W) ->
- %% W = [2x, 3x, 1x, 1x, 1x, 1x, 3x] = 12x
- RW = W-9, % just to make nice small margins on each side of grid
- X = RW div 12,
- [2*X, 3*X, X, X, X, X, 3*X + (RW - 12*X)].
-
-config_sort(GL1,Sort) ->
- gs:config(Sort,[{select,true}]),
- lists:foreach(fun(S) ->
- gs:config(GL1,[{{font,S},?Normal}])
- end,
- [?TimeCol,?MemCol,?RedsCol,?MsgQCol]),
- case Sort of
- runtime -> gs:config(GL1,{{font,?TimeCol},?Bold});
- memory -> gs:config(GL1,{{font,?MemCol},?Bold});
- reductions -> gs:config(GL1,{{font,?RedsCol},?Bold});
- msg_q -> gs:config(GL1,{{font,?MsgQCol},?Bold})
- end.
-
-config_lines(Win,Grid,TotLines) ->
- OldGridH = gs:read(Grid,height),
- NewLinesH = TotLines*?GridLineH,
- if NewLinesH =< OldGridH ->
- gs:config(Win,[{height,NewLinesH+?BarH+?LabelH}]),
- gs:config(Grid,[{rows,{1,TotLines}},
- {height,NewLinesH},
- {vscroll,false}]);
- true ->
- gs:config(Grid,[{rows,{1,TotLines}},{vscroll,right}])
- end.
-
-calc_grid_h(WinH,TotLines) ->
- LeftInWin = WinH - ?BarH - ?LabelH,
- TotGrid = TotLines * ?GridLineH,
- if LeftInWin >= TotGrid ->
- {TotGrid,false};
- true ->
- {LeftInWin,right}
- end.
-
-set_win_h(Win,OrigH,TotLines) ->
- TotH = TotLines*?GridLineH + ?BarH + ?LabelH,
- if TotH >= OrigH -> OrigH;
- true -> gs:config(Win,[{height,TotH}]),
- TotH
- end.
-
-get_event(Info, Win, Grid, GL1, SysInfo, Config) ->
- receive
- {gs, Win, configure,[],[W,H,_,_]} ->
- TotLines = getopt(lines,Config)+1,
- %% Will not make window higher than total number of lines
- RealWinH = set_win_h(Win,H,TotLines),
- {GridH,VScroll} = calc_grid_h(RealWinH,TotLines),
- gs:config(Grid, [{width, W},
- {columnwidths, calc_column_w(W)},
- {height,GridH}, {vscroll,VScroll}]),
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs, refresh, _, _, _} ->
- Info1 = do_update(Grid, SysInfo, Config),
- get_event(Info1, Win, Grid, GL1, SysInfo, Config);
- {gs, dump, _, _, _} ->
- case pop(Win,dump) of
- {ok,File} -> etop:dump(File);
- {error,cancel} -> ok
- end,
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs, Win, destroy, _, _} ->
- normal;
- {gs, exit, _, _, _} ->
- ok;
- {gs, accum, _, _, _} ->
- Old = getopt(accum,Config),
- etop:config(accumulate,not Old),
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs,intv,_,_,_} ->
- case pop(Win,interval) of
- {ok,Intv} -> etop:config(interval,list_to_integer(Intv));
- {error,cancel} -> ok
- end,
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs,lines,_,_,_} ->
- case pop(Win,lines) of
- {ok,Lines} -> etop:config(lines,list_to_integer(Lines));
- {error,cancel} -> ok
- end,
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs,Sort,_,_,_} when Sort=:=runtime;
- Sort=:=memory;
- Sort=:=reductions;
- Sort=:=msg_q ->
- etop:config(sort,Sort),
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {gs,GL1,click,_,[Col,1,_]} ->
- case Col of
- ?TimeCol -> etop:config(sort, runtime);
- ?MemCol -> etop:config(sort, memory);
- ?RedsCol -> etop:config(sort, reductions);
- ?MsgQCol -> etop:config(sort, msg_q);
- _other -> ignore
- end,
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- {config,{Key,Value},Config1} ->
- case Key of
- lines -> config_lines(Win,Grid,Value+1);
- sort -> config_sort(GL1,Value);
- accumulate -> gs:config(accum,[{select,Value}]);
- _ -> ok
- end,
- Info1 = do_update(Grid, SysInfo, Config1),
- get_event(Info1, Win, Grid, GL1, SysInfo, Config1);
- {dump,Fd} ->
- etop_txt:do_update(Fd,Info,Config),
- get_event(Info, Win, Grid, GL1, SysInfo, Config);
- Msg ->
- io:format("~p got unexpected msg ~p~n", [?MODULE, Msg]),
- get_event(Info, Win, Grid, GL1, SysInfo, Config)
- after getopt(intv,Config) ->
- Info1 = do_update(Grid, SysInfo, Config),
- get_event(Info1, Win, Grid, GL1, SysInfo, Config)
- end.
-
-do_update(Grid, SysInfo, Config) ->
- Info = etop:update(Config),
- Lines = makegridlines(Info#etop_info.procinfo, Grid, 2),
- clear_lines(Lines, getopt(lines,Config) + 1, Grid),
- makesysinfo(getopt(node,Config),Info,SysInfo),
- Info.
-
-%clear_lines(From, To, _Grid) when From > To -> ok;
-clear_lines(From, To, Grid) ->
- case gs:read(Grid, {obj_at_row, From}) of
- undefined ->
- ok;
- GridLine ->
- gs:destroy(GridLine),
- clear_lines(From + 1, To, Grid)
- end.
-
-formatmfa({M, F, A}) ->
- io_lib:format("~w:~w/~w",[M, F, A]);
-formatmfa(Other) ->
- %% E.g. when running hipe - the current_function for some
- %% processes will be 'undefined'
- io_lib:format("~w",[Other]).
-
-
-makegridlines([#etop_proc_info{pid=Pid,
- mem=Mem,
- reds=Reds,
- name=Name,
- runtime=Time,
- cf=MFA,
- mq=MQ}
- |T], Grid, Count) ->
- update_gl(Grid, Count, [{{text, 1}, pid_to_list(Pid)},
- {{text, 2}, to_list(Name)},
- {{text, ?TimeCol},
- if is_integer(Time)->integer_to_list(Time);
- true -> Time
- end},
- {{text, ?RedsCol}, integer_to_list(Reds)},
- {{text, ?MemCol}, integer_to_list(Mem)},
- {{text, ?MsgQCol}, integer_to_list(MQ)},
- {{text, 7}, formatmfa(MFA)},
- {row, Count}, {click, false}]),
- makegridlines(T, Grid, Count + 1);
-makegridlines([],_Grid,Count) ->
- Count.
-
-update_gl(Grid, Row, GL) ->
- case gs:read(Grid, {obj_at_row, Row}) of
- undefined ->
- gse:gridline(Grid,[{row, Row}|GL]);
- GridLine ->
- gs:config(GridLine,GL)
- end.
-
-to_list(Name) when is_atom(Name) -> atom_to_list(Name);
-to_list({_M,_F,_A}=MFA) -> formatmfa(MFA).
-
-
-makesysinfo(Node,Info,SysInfo) ->
- {Cpu,NProcs,RQ,Clock} = loadinfo(Info),
- case Info#etop_info.memi of
- undefined ->
- Str = "No memory information is available.";
- Memi ->
- [Tot,Procs,Atom,Bin,Code,Ets] =
- meminfo(Memi, [total,processes,atom,binary,code,ets]),
- Str = io_lib:fwrite(?SYSFORM,
- [Node,Clock,
- Cpu,Tot,Bin,
- NProcs,Procs,Code,
- RQ,Atom,Ets])
- end,
- gs:config(SysInfo,[{label,{text,Str}},{font,?Normal}]).
-
-
-pop(Win,Key) ->
- Pop = gs:create(window,Win,[{title,"Config"},
- {width,160},{height,100}]),
- gs:create(label,Pop,[{label,{text,txt(Key)}},
- {width,160}]),
- gs:create(entry,entry,Pop,[{x,10},{y,30},{width,130},
- {keypress,true}]),
- gs:create(button,ok,Pop,[{width,45},{y,60},{x,10},
- {label,{text,"Ok"}}]),
- gs:create(button,cancel,Pop,[{width,60},{y,60},{x,80},
- {label,{text,"Cancel"}}]),
- gs:config(Pop,{map,true}),
- pop_loop(Pop).
-
-pop_loop(Pop) ->
- receive
- {gs,entry,keypress,_,['Return'|_]} ->
- Str = gs:read(entry,text),
- gs:destroy(Pop),
- {ok,Str};
- {gs,entry,keypress,_,_} -> % all other keypresses
- pop_loop(Pop);
- {gs,ok,click,_,_} ->
- Str = gs:read(entry,text),
- gs:destroy(Pop),
- {ok,Str};
- {gs,cancel,click,_,_} ->
- gs:destroy(Pop),
- {error,cancel};
- X ->
- io:format("Got X=~w~n",[X]),
- pop_loop(Pop)
- end.
-
-txt(interval) -> "Enter new interval:";
-txt(lines) -> "Enter number of lines:";
-txt(dump) -> "Enter file name:".
diff --git a/lib/observer/src/etop_tr.erl b/lib/observer/src/etop_tr.erl
index dd326fe639..e6c69e4e1e 100644
--- a/lib/observer/src/etop_tr.erl
+++ b/lib/observer/src/etop_tr.erl
@@ -59,7 +59,7 @@ reader(Config) ->
Port = getopt(port, Config),
{ok, Sock} = gen_tcp:connect(Host, Port, [{active, false}]),
- spawn_link(fun() -> reader_init(Sock,getopt(store,Config),nopid) end).
+ spawn_link(fun() -> reader_init(Sock,getopt(store,Config),[]) end).
%%%%%%%%%%%%%% Socket reader %%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -73,24 +73,30 @@ reader(Sock, Store, Last) ->
New = handle_data(Last, Data, Store),
reader(Sock, Store, New).
-handle_data(_, {_, Pid, in, _, Time}, _) ->
- {Pid,Time};
-handle_data({Pid,Time1}, {_, Pid, out, _, Time2}, Store) ->
- Elapsed = elapsed(Time1, Time2),
- case ets:member(Store,Pid) of
- true -> ets:update_counter(Store, Pid, Elapsed);
- false -> ets:insert(Store,{Pid,Elapsed})
- end,
- nopid;
+handle_data(Last, {_, Pid, in, _, Time}, _) ->
+ [{Pid,Time}|Last];
+handle_data([], {_, _, out, _, _}, _Store) ->
+ %% ignore - there was probably just a 'drop'
+ [];
+handle_data(Last, {_, Pid, out, _, Time2} = G, Store) ->
+ case lists:keytake(Pid, 1, Last) of
+ {_, {_, Time1}, New} ->
+ Elapsed = elapsed(Time1, Time2),
+ case ets:member(Store,Pid) of
+ true -> ets:update_counter(Store, Pid, Elapsed);
+ false -> ets:insert(Store,{Pid,Elapsed})
+ end,
+ New;
+ false ->
+ io:format("Erlang top got garbage ~p~n", [G]),
+ Last
+ end;
handle_data(_W, {drop, D}, _) -> %% Error case we are missing data here!
io:format("Erlang top dropped data ~p~n", [D]),
- nopid;
-handle_data(nopid, {_, _, out, _, _}, _Store) ->
- %% ignore - there was probably just a 'drop'
- nopid;
-handle_data(_, G, _) ->
+ [];
+handle_data(Last, G, _) ->
io:format("Erlang top got garbage ~p~n", [G]),
- nopid.
+ Last.
elapsed({Me1, S1, Mi1}, {Me2, S2, Mi2}) ->
Me = (Me2 - Me1) * 1000000,
diff --git a/lib/observer/src/etop_txt.erl b/lib/observer/src/etop_txt.erl
index d0612f15b4..f048ff17ca 100644
--- a/lib/observer/src/etop_txt.erl
+++ b/lib/observer/src/etop_txt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,7 +27,6 @@
-include("etop_defs.hrl").
-import(etop,[loadinfo/1,meminfo/2]).
--import(etop_gui,[formatmfa/1,to_list/1]).
-define(PROCFORM,"~-15w~-20s~8w~8w~8w~8w ~-20s~n").
@@ -99,3 +98,13 @@ writepinfo(Fd,[#etop_proc_info{pid=Pid,
writepinfo(_Fd,[]) ->
ok.
+
+formatmfa({M, F, A}) ->
+ io_lib:format("~w:~w/~w",[M, F, A]);
+formatmfa(Other) ->
+ %% E.g. when running hipe - the current_function for some
+ %% processes will be 'undefined'
+ io_lib:format("~w",[Other]).
+
+to_list(Name) when is_atom(Name) -> atom_to_list(Name);
+to_list({_M,_F,_A}=MFA) -> formatmfa(MFA).
diff --git a/lib/observer/src/observer.app.src b/lib/observer/src/observer.app.src
index e881cb3c97..97a54cd6f9 100644
--- a/lib/observer/src/observer.app.src
+++ b/lib/observer/src/observer.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,13 +20,32 @@
[{description, "OBSERVER version 1"},
{vsn, "%VSN%"},
{modules, [crashdump_viewer,
- crashdump_viewer_html,
+ cdv_atom_cb,
+ cdv_bin_cb,
+ cdv_detail_wx,
+ cdv_dist_cb,
+ cdv_ets_cb,
+ cdv_fun_cb,
+ cdv_gen_cb,
+ cdv_html_wx,
+ cdv_info_wx,
+ cdv_int_tab_cb,
+ cdv_mem_cb,
+ cdv_mod_cb,
+ cdv_multi_wx,
+ cdv_port_cb,
+ cdv_proc_cb,
+ cdv_table_wx,
+ cdv_term_cb,
+ cdv_timer_cb,
+ cdv_virtual_list_wx,
+ cdv_wx,
etop,
- etop_gui,
etop_tr,
etop_txt,
observer,
observer_app_wx,
+ observer_html_lib,
observer_lib,
observer_perf_wx,
observer_pro_wx,
@@ -41,6 +60,9 @@
ttb_et]},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","et-1.5",
+ "erts-6.0"]}]}.
diff --git a/lib/observer/src/observer.appup.src b/lib/observer/src/observer.appup.src
index 1d5a0d93f5..9fde365ff3 100644
--- a/lib/observer/src/observer.appup.src
+++ b/lib/observer/src/observer.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, observer}]}],
+ [{<<".*">>,[{restart_application, observer}]}]
+}.
diff --git a/lib/observer/src/observer.erl b/lib/observer/src/observer.erl
index 098100e8ee..a30ceecc63 100644
--- a/lib/observer/src/observer.erl
+++ b/lib/observer/src/observer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,8 +18,11 @@
-module(observer).
--export([start/0]).
+-export([start/0, stop/0]).
start() ->
observer_wx:start().
+
+stop() ->
+ observer_wx:stop().
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl
index 72bafcc5e0..a8ace10275 100644
--- a/lib/observer/src/observer_app_wx.erl
+++ b/lib/observer/src/observer_app_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -81,7 +81,7 @@ init([Notebook, Parent]) ->
]),
Main = wxBoxSizer:new(?wxHORIZONTAL),
Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)},
- {style, ?wxSP_LIVE_UPDATE},
+ {style, ?SASH_STYLE},
{id, 2}
]),
Apps = wxListBox:new(Splitter, 3, []),
@@ -178,11 +178,16 @@ handle_event(#wx{id=Id, event=_Sz=#wxSize{size=Size}},
{noreply, State};
handle_event(#wx{event=#wxMouse{type=Type, x=X0, y=Y0}},
- S0=#state{app=#app{ptree=Tree}, app_w=AppWin}) ->
- {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0),
- Hit = locate_node(X,Y, [Tree]),
- State = handle_mouse_click(Hit, Type, S0),
- {noreply, State};
+ S0=#state{app=App, app_w=AppWin}) ->
+ case App of
+ #app{ptree=Tree} ->
+ {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0),
+ Hit = locate_node(X,Y, [Tree]),
+ State = handle_mouse_click(Hit, Type, S0),
+ {noreply, State};
+ _ ->
+ {noreply, S0}
+ end;
handle_event(#wx{event=#wxCommand{type=command_menu_selected}},
State = #state{sel=undefined}) ->
@@ -190,8 +195,8 @@ handle_event(#wx{event=#wxCommand{type=command_menu_selected}},
{noreply, State};
handle_event(#wx{id=?ID_PROC_INFO, event=#wxCommand{type=command_menu_selected}},
- State = #state{panel=Panel, sel={#box{s1=#str{pid=Pid}},_}}) ->
- observer_procinfo:start(Pid, Panel, self()),
+ State = #state{sel={#box{s1=#str{pid=Pid}},_}}) ->
+ observer ! {open_link, Pid},
{noreply, State};
handle_event(#wx{id=?ID_PROC_MSG, event=#wxCommand{type=command_menu_selected}},
@@ -337,8 +342,8 @@ code_change(_, _, State) ->
handle_mouse_click(Node = {#box{s1=#str{pid=Pid}},_}, Type,
State=#state{app_w=AppWin,panel=Panel}) ->
case Type of
- left_dclick -> observer_procinfo:start(Pid, Panel, self());
- right_down -> popup_menu(Panel);
+ left_dclick -> observer ! {open_link, Pid};
+ right_down -> popup_menu(Panel);
_ -> ok
end,
observer_wx:set_status(io_lib:format("Pid: ~p", [Pid])),
diff --git a/lib/observer/src/observer_defs.hrl b/lib/observer/src/observer_defs.hrl
index 586e7bbff9..3adc358b95 100644
--- a/lib/observer/src/observer_defs.hrl
+++ b/lib/observer/src/observer_defs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,13 +35,16 @@
check = false
}).
--record(attrs, {even, odd, deleted, changed, searched}).
+-record(attrs, {even, odd, searched, deleted, changed_odd, changed_even, new_odd, new_even}).
-define(EVEN(Row), ((Row rem 2) =:= 0)).
-define(BG_EVEN, {230,230,250}).
-define(BG_ODD, {255,255,255}).
-define(BG_DELETED, {100,100,100}).
--define(FG_DELETED, {240,30,30}).
+-define(FG_DELETED, {230,230,230}).
-define(BG_SEARCHED,{235,215,90}).
--define(BG_CHANGED, {230,230,250}).
+-define(BG_CHANGED, {184,207,184}).
+-define(BG_NEW, {123,168,123}).
-define(LCTRL_WDECR, 4). %% Remove some pixels in column width to avoid creating unnecessary scrollbar
+
+-define(SASH_STYLE, ?wxSP_LIVE_UPDATE bor ?wxSP_NOBORDER bor ?wxSP_3DSASH).
diff --git a/lib/observer/src/observer_html_lib.erl b/lib/observer/src/observer_html_lib.erl
new file mode 100644
index 0000000000..c279218707
--- /dev/null
+++ b/lib/observer/src/observer_html_lib.erl
@@ -0,0 +1,407 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(observer_html_lib).
+
+%%
+%% This module implements the HTML generation for the crashdump
+%% viewer. No logic or states are kept by this module.
+%%
+
+-export([plain_page/1,
+ expandable_term/3,
+ warning/1]).
+
+-include("crashdump_viewer.hrl").
+-include("observer_defs.hrl").
+
+%%%-----------------------------------------------------------------
+%%% Display the given information as is, no heading
+%%% Empty body if no info exists.
+warning(Info) ->
+ header(body(warning_body(Info))).
+
+warning_body(Info) ->
+ [warn(Info)].
+
+%%%-----------------------------------------------------------------
+%%% Display the given information as is, no heading
+%%% Empty body if no info exists.
+plain_page(Info) ->
+ header(body(plain_body(Info))).
+
+plain_body(Info) ->
+ [pre(href_proc_port(lists:flatten(Info)))].
+
+%%%-----------------------------------------------------------------
+%%% Expanded memory
+expandable_term(Heading,Expanded,Tab) ->
+ header(Heading,body(expandable_term_body(Heading,Expanded,Tab))).
+
+expandable_term_body(Heading,[],_Tab) ->
+ [case Heading of
+ "MsgQueue" -> "No messages were found";
+ "Message Queue" -> "No messages were found";
+ "StackDump" -> "No stack dump was found";
+ "Dictionary" -> "No dictionary was found";
+ "ProcState" -> "Information could not be retrieved,"
+ " system messages may not be handled by this process."
+ end];
+expandable_term_body(Heading,Expanded,Tab) ->
+ Attr = "BORDER=0 CELLPADDING=0 CELLSPACING=1 WIDTH=100%",
+ [case Heading of
+ "MsgQueue" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=70%","Message"),
+ th("WIDTH=30%","SeqTraceToken")]) |
+ element(1, lists:mapfoldl(fun(Msg, Even) ->
+ {msgq_table(Tab, Msg, Even),
+ not Even}
+ end,
+ true, Expanded))]);
+ "Message Queue" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=10%","Id"),
+ th("WIDTH=90%","Message")]) |
+ element(1, lists:mapfoldl(fun(Msg, {Even,N}) ->
+ {msgq_table(Tab, Msg, N, Even),
+ {not Even, N+1}}
+ end,
+ {true,1}, Expanded))]);
+ "StackDump" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=20%","Label"),
+ th("WIDTH=80%","Term")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {stackdump_table(Tab, Entry, Even),
+ not Even}
+ end, true, Expanded))]);
+ "ProcState" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=20%","Label"),
+ th("WIDTH=80%","Information")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {proc_state(Tab, Entry,Even),
+ not Even}
+ end, true, Expanded))]);
+ _ ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=30%","Key"),
+ th("WIDTH=70%","Value")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {dict_table(Tab, Entry,Even),
+ not Even}
+ end, true, Expanded))])
+ end].
+
+msgq_table(Tab,{Msg0,Token0}, Even) ->
+ Token = case Token0 of
+ [] -> "";
+ _ -> io_lib:fwrite("~w",[Token0])
+ end,
+ Msg = all_or_expand(Tab,Msg0),
+ tr(color(Even),[td(pre(Msg)), td(Token)]).
+
+msgq_table(Tab,Msg0, Id, Even) ->
+ Msg = all_or_expand(Tab,Msg0),
+ tr(color(Even),[td(integer_to_list(Id)), td(pre(Msg))]).
+
+stackdump_table(Tab,{Label0,Term0},Even) ->
+ Label = io_lib:format("~w",[Label0]),
+ Term = all_or_expand(Tab,Term0),
+ tr(color(Even), [td("VALIGN=center",pre(Label)), td(pre(Term))]).
+
+dict_table(Tab,{Key0,Value0}, Even) ->
+ Key = all_or_expand(Tab,Key0),
+ Value = all_or_expand(Tab,Value0),
+ tr(color(Even), [td("VALIGN=center",pre(Key)), td(pre(Value))]).
+
+proc_state(Tab,{Key0,Value0}, Even) ->
+ Key = lists:flatten(io_lib:format("~s",[Key0])),
+ Value = all_or_expand(Tab,Value0),
+ tr(color(Even), [td("VALIGN=center",Key), td(pre(Value))]).
+
+all_or_expand(Tab,Term) ->
+ Preview = io_lib:format("~P",[Term,8]),
+ Check = io_lib:format("~P",[Term,100]),
+ Exp = Preview=/=Check,
+ all_or_expand(Tab,Term,Preview,Exp).
+all_or_expand(_Tab,Term,Str,false)
+ when not is_binary(Term) ->
+ href_proc_port(lists:flatten(Str));
+all_or_expand(Tab,Term,Preview,true)
+ when not is_binary(Term) ->
+ Key = {Key1,Key2,Key3} = now(),
+ ets:insert(Tab,{Key,Term}),
+ [href_proc_port(lists:flatten(Preview), false), $\n,
+ href("TARGET=\"expanded\"",
+ ["#Term?key1="++integer_to_list(Key1)++
+ "&key2="++integer_to_list(Key2)++
+ "&key3="++integer_to_list(Key3)],
+ "Click to expand above term")];
+all_or_expand(Tab,Bin,_PreviewStr,_Expand)
+ when is_binary(Bin) ->
+ Size = byte_size(Bin),
+ PrevSize = min(Size, 10) * 8,
+ <<Preview:PrevSize, _/binary>> = Bin,
+ Hash = erlang:phash2(Bin),
+ Key = {Preview, Size, Hash},
+ ets:insert(Tab,{Key,Bin}),
+ Term = io_lib:format("~p", [['#OBSBin',Preview,Size,Hash]]),
+ href_proc_port(lists:flatten(Term), true).
+
+color(true) -> io_lib:format("BGCOLOR=\"#~2.16.0B~2.16.0B~2.16.0B\"", tuple_to_list(?BG_EVEN));
+color(false) -> io_lib:format("BGCOLOR=\"#~2.16.0B~2.16.0B~2.16.0B\"", tuple_to_list(?BG_ODD)).
+
+%%%-----------------------------------------------------------------
+%%% Internal library
+start_html() ->
+ "<HTML>\n".
+stop_html() ->
+ "</HTML>".
+start_html_body() ->
+ "<BODY BGCOLOR=\"#FFFFFF\">\n".
+stop_html_body() ->
+ "</BODY>\n".
+
+header(Body) ->
+ header("","",Body).
+header(Title,Body) ->
+ header(Title,"",Body).
+header(Title,JavaScript,Body) ->
+ [%only_http_header(),
+ html_header(Title,JavaScript,Body)].
+
+html_header(Title,JavaScript,Body) ->
+ [start_html(),
+ only_html_header(Title,JavaScript),
+ Body,
+ stop_html()].
+
+only_html_header(Title,JavaScript) ->
+ ["<HEAD>\n",
+ "<TITLE>", Title, "</TITLE>\n",
+ JavaScript,
+ "</HEAD>\n"].
+
+body(Text) ->
+ [start_html_body(),
+ Text,
+ stop_html_body()].
+
+start_table(Args) ->
+ ["<TABLE ", Args, ">\n"].
+stop_table() ->
+ "</TABLE>\n".
+
+table(Args,Text) ->
+ [start_table(Args), Text, stop_table()].
+tr(Text) ->
+ ["<TR>\n", Text, "\n</TR>\n"].
+tr(Args,Text) ->
+ ["<TR ", Args, ">\n", Text, "\n</TR>\n"].
+th(Args,Text) ->
+ ["<TH ", Args, ">\n", Text, "\n</TH>\n"].
+td(Text) ->
+ ["<TD>", Text, "</TD>"].
+td(Args,Text) ->
+ ["<TD ", Args, ">", Text, "</TD>"].
+
+start_pre() ->
+ "<PRE>".
+stop_pre() ->
+ "</PRE>".
+pre(Text) ->
+ [start_pre(),Text,stop_pre()].
+href(Link,Text) ->
+ ["<A HREF=\"",Link,"\">",Text,"</A>"].
+href(Args,Link,Text) ->
+ ["<A HREF=\"",Link,"\" ",Args,">",Text,"</A>"].
+font(Args,Text) ->
+ ["<FONT ",Args,">\n",Text,"\n</FONT>\n"].
+p(Text) ->
+ ["<P>",Text,"</P>\n"].
+br() ->
+ "<BR>\n".
+
+
+%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
+href_proc_port(Text) ->
+ href_proc_port(Text,true).
+href_proc_port(Text,LinkToBin) ->
+ href_proc_port(Text,[],LinkToBin).
+href_proc_port("#Ref<"++T,Acc,LTB) ->
+ %% No links to refs
+ href_proc_port(T,["#Ref&lt;"|Acc],LTB);
+href_proc_port("#Fun<"++T,Acc,LTB) ->
+ %% No links to funs
+ href_proc_port(T,["#Fun&lt;"|Acc],LTB);
+href_proc_port("#Port<"++T,Acc,LTB) ->
+ {Port0,Rest} = split($>,T),
+ Port = "#Port&lt;"++Port0 ++ "&gt;",
+ href_proc_port(Rest,[href(Port,Port)|Acc],LTB);
+href_proc_port("<<"++T,Acc,LTB) ->
+ %% No links to binaries
+ href_proc_port(T,["&lt;&lt;"|Acc],LTB);
+href_proc_port("<"++([C|_]=T),Acc,LTB) when $0 =< C, C =< $9 ->
+ %% Pid
+ {Pid0,Rest} = split($>,T),
+ Pid = "&lt;" ++ Pid0 ++ "&gt",
+ href_proc_port(Rest,[href(Pid,Pid)|Acc],LTB);
+href_proc_port("['#CDVBin'"++T,Acc,LTB) ->
+ %% Binary written by crashdump_viewer:parse_heap_term(...)
+ href_proc_bin(cdv, T, Acc, LTB);
+href_proc_port("['#OBSBin'"++T,Acc,LTB) ->
+ %% Binary written by crashdump_viewer:parse_heap_term(...)
+ href_proc_bin(obs, T, Acc, LTB);
+href_proc_port("['#CDVPort'"++T,Acc,LTB) ->
+ %% Port written by crashdump_viewer:parse_term(...)
+ {Port0,Rest} = split($],T),
+ PortStr=
+ case string:tokens(Port0,",.|") of
+ [X,Y] ->
+ Port = "#Port&lt;"++X++"."++Y++"&gt;",
+ href(Port,Port);
+ Ns ->
+ "#Port&lt;" ++ string:join(Ns,".") ++"...&gt;"
+ end,
+ href_proc_port(Rest,[PortStr|Acc],LTB);
+href_proc_port("['#CDVPid'"++T,Acc,LTB) ->
+ %% Pid written by crashdump_viewer:parse_term(...)
+ {Pid0,Rest} = split($],T),
+ PidStr =
+ case string:tokens(Pid0,",.|") of
+ [X,Y,Z] ->
+ Pid = "&lt;"++X++"."++Y++"."++Z++"&gt;",
+ href(Pid,Pid);
+ Ns ->
+ "&lt;" ++ string:join(Ns,".") ++ "...&gt;"
+ end,
+ href_proc_port(Rest,[PidStr|Acc],LTB);
+href_proc_port("'#CDVIncompleteHeap'"++T,Acc,LTB)->
+ %% The heap is incomplete! Written by crashdump_viewer:deref_pts(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">...(Incomplete Heap)</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("'#CDVTruncatedBinary'"++T,Acc,LTB)->
+ %% A binary which is truncated! Written by
+ %% crashdump_viewer:parse_heap_term(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Truncated Binary)&gt;&gt;"
+ "</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("'#CDVNonexistingBinary'"++T,Acc,LTB)->
+ %% A binary which could not be found in the dump! Written by
+ %% crashdump_viewer:parse_heap_term(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Nonexisting Binary)&gt;&gt;"
+ "</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("<"++T,Acc,LTB) ->
+ href_proc_port(T,["&lt;"|Acc],LTB);
+href_proc_port(">"++T,Acc,LTB) ->
+ href_proc_port(T,["&gt;"|Acc],LTB);
+href_proc_port([H|T],Acc,LTB) ->
+ href_proc_port(T,[H|Acc],LTB);
+href_proc_port([],Acc,_) ->
+ lists:reverse(Acc).
+
+href_proc_bin(From, T, Acc, LTB) ->
+ {OffsetSizePos,Rest} = split($],T),
+ BinStr =
+ case string:tokens(OffsetSizePos,",.| \n") of
+ [Offset,SizeStr,Pos] when From =:= cdv ->
+ Id = {list_to_integer(Offset),10,list_to_integer(Pos)},
+ {ok,PreviewBin} = crashdump_viewer:expand_binary(Id),
+ PreviewStr = preview_string(list_to_integer(SizeStr), PreviewBin),
+ if LTB ->
+ href("TARGET=\"expanded\"",
+ ["#Binary?offset="++Offset++
+ "&size="++SizeStr++
+ "&pos="++Pos],
+ PreviewStr);
+ true ->
+ PreviewStr
+ end;
+ [Preview,SizeStr,Md5] when From =:= obs ->
+ Size = list_to_integer(SizeStr),
+ PrevSize = min(Size, 10) * 8,
+ PreviewStr = preview_string(Size,
+ <<(list_to_integer(Preview)):PrevSize>>),
+ if LTB ->
+ href("TARGET=\"expanded\"",
+ ["#OBSBinary?key1="++Preview++
+ "&key2="++SizeStr++
+ "&key3="++Md5],
+ PreviewStr);
+ true ->
+ PreviewStr
+ end;
+ _ ->
+ "&lt;&lt; ... &gt;&gt;"
+ end,
+ href_proc_port(Rest,[BinStr|Acc],LTB).
+
+preview_string(Size, PreviewBin) when Size > 10 ->
+ ["&lt;&lt;",
+ remove_lgt(io_lib:format("~p",[PreviewBin])),
+ "...(",
+ observer_lib:to_str({bytes,Size}),
+ ")",
+ "&gt;&gt"];
+preview_string(_, PreviewBin) ->
+ ["&lt;&lt;",
+ remove_lgt(io_lib:format("~p",[PreviewBin])),
+ "&gt;&gt"].
+
+remove_lgt(Deep) ->
+ remove_lgt_1(lists:flatten(Deep)).
+
+remove_lgt_1([$<,$<|Rest]) ->
+ [$>,$>|BinStr] = lists:reverse(Rest),
+ replace_lgt(lists:reverse(BinStr)).
+
+replace_lgt([$<|R]) ->
+ ["&lt;"|replace_lgt(R)];
+replace_lgt([$>|R]) ->
+ ["&gt;"|replace_lgt(R)];
+replace_lgt([L=[_|_]|R]) ->
+ [replace_lgt(L)|replace_lgt(R)];
+replace_lgt([A|R]) ->
+ [A|replace_lgt(R)];
+replace_lgt([]) -> [].
+
+split(Char,Str) ->
+ split(Char,Str,[]).
+split(Char,[Char|Str],Acc) -> % match Char
+ {lists:reverse(Acc),Str};
+split(Char,[H|T],Acc) ->
+ split(Char,T,[H|Acc]).
+
+warn([]) ->
+ [];
+warn(Warning) ->
+ font("COLOR=\"#FF0000\"",p([Warning,br(),br()])).
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index f7712cf3da..9592ab5977 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,17 +19,26 @@
-module(observer_lib).
-export([get_wx_parent/1,
- display_info_dialog/1, user_term/3, user_term_multiline/3,
+ display_info_dialog/1, display_yes_no_dialog/1,
+ display_progress_dialog/2, destroy_progress_dialog/0,
+ wait_for_progress/0, report_progress/1,
+ user_term/3, user_term_multiline/3,
interval_dialog/4, start_timer/1, stop_timer/1,
display_info/2, fill_info/2, update_info/2, to_str/1,
create_menus/3, create_menu_item/3,
create_attrs/0,
- set_listctrl_col_size/2
+ set_listctrl_col_size/2,
+ create_status_bar/1,
+ html_window/1, html_window/2
]).
-include_lib("wx/include/wx.hrl").
-include("observer_defs.hrl").
+-define(SINGLE_LINE_STYLE, ?wxBORDER_NONE bor ?wxTE_READONLY bor ?wxTE_RICH2).
+-define(MULTI_LINE_STYLE, ?SINGLE_LINE_STYLE bor ?wxTE_MULTILINE).
+
+
get_wx_parent(Window) ->
Parent = wxWindow:getParent(Window),
case wx:is_null(Parent) of
@@ -96,11 +105,19 @@ setup_timer(Bool, {Timer, Old}) ->
setup_timer(Bool, {false, Old}).
display_info_dialog(Str) ->
- Dlg = wxMessageDialog:new(wx:null(), Str),
+ display_info_dialog("",Str).
+display_info_dialog(Title,Str) ->
+ Dlg = wxMessageDialog:new(wx:null(), Str, [{caption,Title}]),
wxMessageDialog:showModal(Dlg),
wxMessageDialog:destroy(Dlg),
ok.
+display_yes_no_dialog(Str) ->
+ Dlg = wxMessageDialog:new(wx:null(), Str, [{style,?wxYES_NO}]),
+ R = wxMessageDialog:showModal(Dlg),
+ wxMessageDialog:destroy(Dlg),
+ R.
+
%% display_info(Parent, [{Title, [{Label, Info}]}]) -> {Panel, Sizer, InfoFieldsToUpdate}
display_info(Frame, Info) ->
Panel = wxPanel:new(Frame),
@@ -108,24 +125,50 @@ display_info(Frame, Info) ->
Sizer = wxBoxSizer:new(?wxVERTICAL),
wxSizer:addSpacer(Sizer, 5),
Add = fun(BoxInfo) ->
- {Box, InfoFs} = create_box(Panel, BoxInfo),
- wxSizer:add(Sizer, Box, [{flag, ?wxEXPAND bor ?wxALL},
- {border, 5}]),
- wxSizer:addSpacer(Sizer, 5),
- InfoFs
+ case create_box(Panel, BoxInfo) of
+ {Box, InfoFs} ->
+ wxSizer:add(Sizer, Box, [{flag, ?wxEXPAND bor ?wxALL},
+ {border, 5}]),
+ wxSizer:addSpacer(Sizer, 5),
+ InfoFs;
+ undefined ->
+ []
+ end
end,
InfoFs = [Add(I) || I <- Info],
wxWindow:setSizerAndFit(Panel, Sizer),
{Panel, Sizer, InfoFs}.
+fill_info([{dynamic, Key}|Rest], Data)
+ when is_atom(Key); is_function(Key) ->
+ %% Special case used by crashdump_viewer when the value decides
+ %% which header to use
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ {Str,Value} -> [{Str, Value} | fill_info(Rest, Data)]
+ end;
fill_info([{Str, Key}|Rest], Data) when is_atom(Key); is_function(Key) ->
- [{Str, get_value(Key, Data)} | fill_info(Rest, Data)];
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str, Value} | fill_info(Rest, Data)]
+ end;
+fill_info([{Str,Attrib,Key}|Rest], Data) when is_atom(Key); is_function(Key) ->
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str,Attrib,Value} | fill_info(Rest, Data)]
+ end;
fill_info([{Str, {Format, Key}}|Rest], Data)
when is_atom(Key); is_function(Key), is_atom(Format) ->
case get_value(Key, Data) of
- undefined -> [{Str, undefined} | fill_info(Rest, Data)];
+ undefined -> [undefined | fill_info(Rest, Data)];
Value -> [{Str, {Format, Value}} | fill_info(Rest, Data)]
end;
+fill_info([{Str, Attrib, {Format, Key}}|Rest], Data)
+ when is_atom(Key); is_function(Key), is_atom(Format) ->
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str, Attrib, {Format, Value}} | fill_info(Rest, Data)]
+ end;
fill_info([{Str,SubStructure}|Rest], Data) when is_list(SubStructure) ->
[{Str, fill_info(SubStructure, Data)}|fill_info(Rest,Data)];
fill_info([{Str,Attrib,SubStructure}|Rest], Data) ->
@@ -146,23 +189,49 @@ update_info([Fields|Fs], [{_Header, _Attrib, SubStructure}| Rest]) ->
update_info([], []) ->
ok.
+update_info2([undefined|Fs], [_|Rest]) ->
+ update_info2(Fs, Rest);
+update_info2([Scroll = {_, _, _}|Fs], [{_, NewInfo}|Rest]) ->
+ update_scroll_boxes(Scroll, NewInfo),
+ update_info2(Fs, Rest);
+update_info2([Field|Fs], [{_Str, {click, Value}}|Rest]) ->
+ wxTextCtrl:setValue(Field, to_str(Value)),
+ update_info2(Fs, Rest);
update_info2([Field|Fs], [{_Str, Value}|Rest]) ->
- wxStaticText:setLabel(Field, to_str(Value)),
+ wxTextCtrl:setValue(Field, to_str(Value)),
+ update_info2(Fs, Rest);
+update_info2([Field|Fs], [undefined|Rest]) ->
+ wxTextCtrl:setValue(Field, ""),
update_info2(Fs, Rest);
update_info2([], []) -> ok.
+update_scroll_boxes({_, _, 0}, {_, []}) -> ok;
+update_scroll_boxes({Win, Sizer, _}, {Type, List}) ->
+ [wxSizerItem:deleteWindows(Child) || Child <- wxSizer:getChildren(Sizer)],
+ BC = wxWindow:getBackgroundColour(Win),
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ add_entries(Type, List, Win, Sizer, BC, Cursor),
+ wxCursor:destroy(Cursor),
+ wxSizer:recalcSizes(Sizer),
+ wxWindow:refresh(Win),
+ ok.
to_str(Value) when is_atom(Value) ->
atom_to_list(Value);
+to_str({Unit, X}) when (Unit==bytes orelse Unit==time_ms) andalso is_list(X) ->
+ try list_to_integer(X) of
+ B -> to_str({Unit,B})
+ catch error:badarg -> X
+ end;
to_str({bytes, B}) ->
KB = B div 1024,
MB = KB div 1024,
GB = MB div 1024,
if
- GB > 10 -> integer_to_list(GB) ++ " gB";
- MB > 10 -> integer_to_list(MB) ++ " mB";
+ GB > 10 -> integer_to_list(GB) ++ " GB";
+ MB > 10 -> integer_to_list(MB) ++ " MB";
KB > 0 -> integer_to_list(KB) ++ " kB";
- true -> integer_to_list(B) ++ " B "
+ true -> integer_to_list(B) ++ " B"
end;
to_str({time_ms, MS}) ->
S = MS div 1000,
@@ -180,6 +249,8 @@ to_str({func, {F,A}}) when is_atom(F), is_integer(A) ->
lists:concat([F, "/", A]);
to_str({func, {F,'_'}}) when is_atom(F) ->
atom_to_list(F);
+to_str({{format,Fun},Value}) when is_function(Fun) ->
+ Fun(Value);
to_str({A, B}) when is_atom(A), is_atom(B) ->
lists:concat([A, ":", B]);
to_str({M,F,A}) when is_atom(M), is_atom(F), is_integer(A) ->
@@ -207,27 +278,23 @@ create_menus(Menus, MenuBar, Type) ->
create_menu(Tag, Ms, Index, MenuBar, Type)
end,
[{First, _}|_] = Menus,
- OnMac = os:type() =:= {unix, darwin},
Index = if Type =:= default -> 0;
First =:= "File" -> 0;
- OnMac -> 0;
true -> 1
end,
wx:foldl(Add, Index, Menus),
ok.
create_menu("File", MenuItems, Index, MenuBar, Type) ->
- OnMac = os:type() =:= {unix, darwin},
- if OnMac, Type =:= default ->
- Index;
- not OnMac, Type =:= plugin ->
+ if
+ Type =:= plugin ->
MenuId = wxMenuBar:findMenu(MenuBar, "File"),
Menu = wxMenuBar:getMenu(MenuBar, MenuId),
lists:foldl(fun(Record, N) ->
create_menu_item(Record, Menu, N)
end, 0, MenuItems),
Index + 1;
- true ->
+ true ->
Menu = wxMenu:new(),
lists:foldl(fun(Record, N) ->
create_menu_item(Record, Menu, N)
@@ -279,36 +346,191 @@ create_attrs() ->
#attrs{even = wxListItemAttr:new(Text, ?BG_EVEN, Font),
odd = wxListItemAttr:new(Text, ?BG_ODD, Font),
deleted = wxListItemAttr:new(?FG_DELETED, ?BG_DELETED, Font),
- changed = wxListItemAttr:new(Text, ?BG_CHANGED, Font),
+ changed_even = wxListItemAttr:new(Text, mix(?BG_CHANGED,?BG_EVEN), Font),
+ changed_odd = wxListItemAttr:new(Text, mix(?BG_CHANGED,?BG_ODD), Font),
+ new_even = wxListItemAttr:new(Text, mix(?BG_NEW,?BG_EVEN), Font),
+ new_odd = wxListItemAttr:new(Text, mix(?BG_NEW, ?BG_ODD), Font),
searched = wxListItemAttr:new(Text, ?BG_SEARCHED, Font)
}.
+mix(RGB,_) -> RGB.
+
+%% mix({R,G,B},{MR,MG,MB}) ->
+%% {trunc(R*MR/255), trunc(G*MG/255), trunc(B*MB/255)}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
get_box_info({Title, List}) when is_list(List) -> {Title, ?wxALIGN_LEFT, List};
get_box_info({Title, left, List}) -> {Title, ?wxALIGN_LEFT, List};
get_box_info({Title, right, List}) -> {Title, ?wxALIGN_RIGHT, List}.
+add_box(Panel, OuterBox, Cursor, Title, Proportion, {Format, List}) ->
+ Box = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, Title}]),
+ Scroll = wxScrolledWindow:new(Panel),
+ wxScrolledWindow:enableScrolling(Scroll,true,true),
+ wxScrolledWindow:setScrollbars(Scroll,1,1,0,0),
+ ScrollSizer = wxBoxSizer:new(?wxVERTICAL),
+ wxScrolledWindow:setSizer(Scroll, ScrollSizer),
+ BC = wxWindow:getBackgroundColour(Panel),
+ wxWindow:setBackgroundColour(Scroll,BC),
+ add_entries(Format, List, Scroll, ScrollSizer, BC, Cursor),
+ wxSizer:add(Box,Scroll,[{proportion,1},{flag,?wxEXPAND}]),
+ wxSizer:add(OuterBox,Box,[{proportion,Proportion},{flag,?wxEXPAND}]),
+ {Scroll,ScrollSizer,length(List)}.
+
+add_entries(click, List, Scroll, ScrollSizer, BC, Cursor) ->
+ Add = fun(Link) ->
+ TC = link_entry(Scroll, Link, Cursor),
+ wxWindow:setBackgroundColour(TC,BC),
+ wxSizer:add(ScrollSizer,TC,[{flag,?wxEXPAND}])
+ end,
+ [Add(Link) || Link <- List];
+add_entries(plain, List, Scroll, ScrollSizer, _, _) ->
+ Add = fun(String) ->
+ TC = wxTextCtrl:new(Scroll, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,String}]),
+ wxSizer:add(ScrollSizer,TC,[{flag,?wxEXPAND}])
+ end,
+ [Add(String) || String <- List].
+
+
+create_box(_Panel, {scroll_boxes,[]}) ->
+ undefined;
+create_box(Panel, {scroll_boxes,Data}) ->
+ OuterBox = wxBoxSizer:new(?wxHORIZONTAL),
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ AddBox = fun({Title,Proportion,Format = {_,_}}) ->
+ add_box(Panel, OuterBox, Cursor, Title, Proportion, Format);
+ ({Title, Format = {_,_}}) ->
+ add_box(Panel, OuterBox, Cursor, Title, 1, Format);
+ (undefined) ->
+ undefined
+ end,
+ Boxes = [AddBox(Entry) || Entry <- Data],
+ wxCursor:destroy(Cursor),
+
+ MaxL = lists:foldl(fun({_,_,L},Max) when L>Max -> L;
+ (_,Max) -> Max
+ end,
+ 0,
+ Boxes),
+
+ Dummy = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, ?SINGLE_LINE_STYLE}]),
+ {_,H} = wxWindow:getSize(Dummy),
+ wxTextCtrl:destroy(Dummy),
+
+ MaxH = if MaxL > 8 -> 8*H;
+ true -> MaxL*H
+ end,
+ [wxWindow:setMinSize(B,{0,MaxH}) || {B,_,_} <- Boxes],
+ wxSizer:layout(OuterBox),
+ {OuterBox, Boxes};
+
create_box(Panel, Data) ->
{Title, Align, Info} = get_box_info(Data),
- Box = wxStaticBoxSizer:new(?wxHORIZONTAL, Panel, [{label, Title}]),
- Left = wxBoxSizer:new(?wxVERTICAL),
- Right = wxBoxSizer:new(?wxVERTICAL),
- Expand = [{flag, ?wxEXPAND}],
- ExpAlign = [{flag, Align}],
- AddRow = fun({Desc, Value}) ->
- wxSizer:add(Left, wxStaticText:new(Panel, ?wxID_ANY, Desc ++ ":"), Expand),
- Field = wxStaticText:new(Panel, ?wxID_ANY, to_str(Value)),
- wxSizer:add(Right, Field, ExpAlign),
- Field
+ Box = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, Title}]),
+ LeftSize = get_max_size(Panel,Info),
+ LeftProportion = [{proportion,0}],
+ RightProportion = [{proportion,1}, {flag, Align bor ?wxEXPAND}],
+ AddRow = fun({Desc0, Value0}) ->
+ Desc = Desc0++":",
+ Line = wxBoxSizer:new(?wxHORIZONTAL),
+ wxSizer:add(Line,
+ wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {size,LeftSize},
+ {value,Desc}]),
+ LeftProportion),
+ Field =
+ case Value0 of
+ {click,"unknown"} ->
+ wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,"unknown"}]);
+ {click,Value} ->
+ link_entry(Panel,Value);
+ _ ->
+ Value = to_str(Value0),
+ TCtrl = wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,Value}]),
+ length(Value) > 50 andalso
+ wxWindow:setToolTip(TCtrl,wxToolTip:new(Value)),
+ TCtrl
+ end,
+ wxSizer:add(Line, 10, 0), % space of size 10 horisontally
+ wxSizer:add(Line, Field, RightProportion),
+
+ {_,H,_,_} = wxTextCtrl:getTextExtent(Field,"Wj"),
+ wxTextCtrl:setMinSize(Field,{0,H}),
+
+ wxSizer:add(Box, Line, [{proportion,0},{flag,?wxEXPAND}]),
+ Field;
+ (undefined) ->
+ undefined
end,
InfoFields = [AddRow(Entry) || Entry <- Info],
- wxSizer:add(Box, Left),
- wxSizer:addSpacer(Box, 10),
- wxSizer:add(Box, Right),
- wxSizer:addSpacer(Box, 30),
{Box, InfoFields}.
+link_entry(Panel, Link) ->
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ TC = link_entry2(Panel, to_link(Link), Cursor),
+ wxCursor:destroy(Cursor),
+ TC.
+link_entry(Panel, Link, Cursor) ->
+ link_entry2(Panel, to_link(Link), Cursor).
+
+link_entry2(Panel,{Target,Str},Cursor) ->
+ TC = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, ?SINGLE_LINE_STYLE}]),
+ wxTextCtrl:setForegroundColour(TC,?wxBLUE),
+ wxTextCtrl:appendText(TC, Str),
+ wxWindow:setCursor(TC, Cursor),
+ wxTextCtrl:connect(TC, left_down, [{userData,Target}]),
+ wxTextCtrl:connect(TC, enter_window),
+ wxTextCtrl:connect(TC, leave_window),
+ ToolTip = wxToolTip:new("Click to see properties for " ++ Str),
+ wxWindow:setToolTip(TC, ToolTip),
+ TC.
+
+to_link(RegName={Name, Node}) when is_atom(Name), is_atom(Node) ->
+ Str = io_lib:format("{~p,~p}", [Name, Node]),
+ {RegName, Str};
+to_link(TI = {_Target, _Identifier}) ->
+ TI;
+to_link(Target0) ->
+ Target=to_str(Target0),
+ {Target, Target}.
+
+html_window(Panel) ->
+ Win = wxHtmlWindow:new(Panel, [{style, ?wxHW_SCROLLBAR_AUTO}]),
+ %% wxHtmlWindow:setFonts(Win, "", FixedName),
+ wxHtmlWindow:connect(Win,command_html_link_clicked),
+ Win.
+
+html_window(Panel, Html) ->
+ Win = html_window(Panel),
+ wxHtmlWindow:setPage(Win, Html),
+ Win.
+
+get_max_size(Panel,Info) ->
+ Txt = wxTextCtrl:new(Panel, ?wxID_ANY, []),
+ Size = get_max_size(Txt,Info,0,0),
+ wxTextCtrl:destroy(Txt),
+ Size.
+
+get_max_size(Txt,[{Desc,_}|Info],MaxX,MaxY) ->
+ {X,Y,_,_} = wxTextCtrl:getTextExtent(Txt,Desc++":"),
+ if X>MaxX ->
+ get_max_size(Txt,Info,X,Y);
+ true ->
+ get_max_size(Txt,Info,MaxX,MaxY)
+ end;
+get_max_size(Txt,[undefined|Info],MaxX,MaxY) ->
+ get_max_size(Txt,Info,MaxX,MaxY);
+get_max_size(_,[],X,_Y) ->
+ {X+2,-1}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set_listctrl_col_size(LCtrl, Total) ->
wx:batch(fun() -> calc_last(LCtrl, Total) end).
@@ -326,10 +548,7 @@ calc_last(LCtrl, _Total) ->
scroll_size(LCtrl) ->
case os:type() of
{win32, nt} -> 0;
- {unix, darwin} ->
- %% I can't figure out is there is a visible scrollbar
- %% Always make room for it
- wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
+ {unix, darwin} -> 0; %% Always 0 in wxWidgets-3.0
_ ->
case wxWindow:hasScrollbar(LCtrl, ?wxVERTICAL) of
true -> wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
@@ -430,3 +649,108 @@ ensure_last_is_dot(String) ->
false ->
String ++ "."
end.
+
+%%%-----------------------------------------------------------------
+%%% Status bar for warnings
+create_status_bar(Panel) ->
+ StatusStyle = ?wxTE_MULTILINE bor ?wxTE_READONLY bor ?wxTE_RICH2,
+ Red = wxTextAttr:new(?wxRED),
+
+ %% wxTextCtrl:setSize/3 does not work, so we must create a dummy
+ %% text ctrl first to get the size of the text, then set it when
+ %% creating the real text ctrl.
+ Dummy = wxTextCtrl:new(Panel, ?wxID_ANY,[{style,StatusStyle}]),
+ {X,Y,_,_} = wxTextCtrl:getTextExtent(Dummy,"WARNING"),
+ wxTextCtrl:destroy(Dummy),
+ StatusBar = wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,StatusStyle},
+ {size,{X,Y+2}}]), % Y+2 to avoid scrollbar
+ wxTextCtrl:setDefaultStyle(StatusBar,Red),
+ wxTextAttr:destroy(Red),
+ StatusBar.
+
+%%%-----------------------------------------------------------------
+%%% Progress dialog
+-define(progress_handler,cdv_progress_handler).
+display_progress_dialog(Title,Str) ->
+ Caller = self(),
+ Env = wx:get_env(),
+ spawn_link(fun() ->
+ progress_handler(Caller,Env,Title,Str)
+ end),
+ ok.
+
+wait_for_progress() ->
+ receive
+ continue ->
+ ok;
+ Error ->
+ Error
+ end.
+
+destroy_progress_dialog() ->
+ report_progress(finish).
+
+report_progress(Progress) ->
+ case whereis(?progress_handler) of
+ Pid when is_pid(Pid) ->
+ Pid ! {progress,Progress},
+ ok;
+ _ ->
+ ok
+ end.
+
+progress_handler(Caller,Env,Title,Str) ->
+ register(?progress_handler,self()),
+ wx:set_env(Env),
+ PD = progress_dialog(Env,Title,Str),
+ try progress_loop(Title,PD,Caller)
+ catch closed -> normal end.
+
+progress_loop(Title,PD,Caller) ->
+ receive
+ {progress,{ok,done}} -> % to make wait_for_progress/0 return
+ Caller ! continue,
+ progress_loop(Title,PD,Caller);
+ {progress,{ok,Percent}} when is_integer(Percent) ->
+ update_progress(PD,Percent),
+ progress_loop(Title,PD,Caller);
+ {progress,{ok,Msg}} ->
+ update_progress_text(PD,Msg),
+ progress_loop(Title,PD,Caller);
+ {progress,{error, Reason}} ->
+ finish_progress(PD),
+ FailMsg =
+ if is_list(Reason) -> Reason;
+ true -> file:format_error(Reason)
+ end,
+ display_info_dialog("Crashdump Viewer Error",FailMsg),
+ Caller ! error,
+ unregister(?progress_handler),
+ unlink(Caller);
+ {progress,finish} ->
+ finish_progress(PD),
+ unregister(?progress_handler),
+ unlink(Caller)
+ end.
+
+progress_dialog(_Env,Title,Str) ->
+ PD = wxProgressDialog:new(Title,Str,
+ [{maximum,101},
+ {style,
+ ?wxPD_APP_MODAL bor
+ ?wxPD_SMOOTH bor
+ ?wxPD_AUTO_HIDE}]),
+ wxProgressDialog:setMinSize(PD,{200,-1}),
+ PD.
+
+update_progress(PD,Value) ->
+ try wxProgressDialog:update(PD,Value)
+ catch _:_ -> throw(closed) %% Port or window have died
+ end.
+update_progress_text(PD,Text) ->
+ try wxProgressDialog:update(PD,0,[{newmsg,Text}])
+ catch _:_ -> throw(closed) %% Port or window have died
+ end.
+finish_progress(PD) ->
+ wxProgressDialog:destroy(PD).
diff --git a/lib/observer/src/observer_perf_wx.erl b/lib/observer/src/observer_perf_wx.erl
index 54c98f3ba3..8173349ed7 100644
--- a/lib/observer/src/observer_perf_wx.erl
+++ b/lib/observer/src/observer_perf_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -283,7 +283,12 @@ mem_types() ->
lmax([]) -> 0;
lmax(List) ->
- lists:max([lists:max(tuple_to_list(T)) || T <- List]).
+ Max = [lists:max(tuple_to_list(T)) || T <- List,
+ tuple_size(T) > 0],
+ case Max of
+ [] -> 0;
+ _ -> lists:max(Max)
+ end.
calc_delta([{Id, WN, TN}|Ss], [{Id, WP, TP}|Ps]) ->
[100*(WN-WP) div (TN-TP)|calc_delta(Ss, Ps)];
@@ -301,25 +306,23 @@ draw(Offset, Id, DC, Panel, Paint=#paint{pens=Pens, small=Small}, Data, Active)
{X0,Y0,WS,HS} = draw_borders(Id, NoGraphs, DC, Size, Max, Paint),
Last = 60*WS+X0-1,
Start = max(61-Len, 0)*WS+X0 - Offset*WS,
- case Hs of
- [] -> ignore;
- [_] -> ignore;
- _ ->
+ Samples = length(Hs),
+ case Active andalso Samples > 1 andalso NoGraphs > 0 of
+ true ->
Draw = fun(N) ->
Lines = make_lines(Hs, Start, N, {X0,Max*HS,Last}, Y0, WS, HS),
setPen(DC, element(1+ ((N-1) rem tuple_size(Pens)), Pens)),
strokeLines(DC, Lines),
N+1
end,
- [Draw(I) || I <- lists:seq(NoGraphs, 1, -1)]
- end,
- case Active of
+ [Draw(I) || I <- lists:seq(NoGraphs, 1, -1)];
false ->
- NotActive = "Service not available",
+ Info = case Active andalso Samples =< 1 of
+ true -> "Waiting on data";
+ false -> "Information not available"
+ end,
setFont(DC, Small, {0,0,0}),
- drawText(DC, NotActive, X0 + 100, element(2,Size) div 2);
- true ->
- ignore
+ drawText(DC, Info, X0 + 100, element(2,Size) div 2)
end,
ok.
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl
index 9aaf648ea2..0be8c18893 100644
--- a/lib/observer/src/observer_pro_wx.erl
+++ b/lib/observer/src/observer_pro_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -66,6 +66,7 @@
-record(holder, {parent,
info,
+ etop,
sort=#sort{},
accum=[],
attrs,
@@ -191,20 +192,16 @@ dump_to_file(Parent, FileName, Holder) ->
start_procinfo(undefined, _Frame, Opened) ->
Opened;
start_procinfo(Pid, Frame, Opened) ->
- %% This code doesn't work until we collect which windows have been
- %% closed maybe it should moved to observer_wx.erl
- %% and add a global menu which remembers windows.
- %% case lists:keyfind(Pid, 1, Opened) of
- %% false ->
- case observer_procinfo:start(Pid, Frame, self()) of
- {error, _} -> Opened;
- PI -> [{Pid, PI} | Opened]
+ case lists:keyfind(Pid, 1, Opened) of
+ false ->
+ case observer_procinfo:start(Pid, Frame, self()) of
+ {error, _} -> Opened;
+ PI -> [{Pid, PI} | Opened]
+ end;
+ {_, PI} ->
+ wxFrame:raise(PI),
+ Opened
end.
- %%;
- %% {_, PI} ->
- %% wxFrame:raise(PI),
- %% Opened
- %% end.
call(Holder, What) ->
Ref = erlang:monitor(process, Holder),
@@ -235,9 +232,14 @@ handle_info(refresh_interval, #state{holder=Holder}=State) ->
handle_info({procinfo_menu_closed, Pid},
#state{procinfo_menu_pids=Opened}=State) ->
- NewPids = lists:delete(Pid, Opened),
+ NewPids = lists:keydelete(Pid, 1, Opened),
{noreply, State#state{procinfo_menu_pids=NewPids}};
+handle_info({procinfo_open, Pid},
+ #state{panel=Panel, procinfo_menu_pids=Opened}=State) ->
+ Opened2 = start_procinfo(Pid, Panel, Opened),
+ {noreply, State#state{procinfo_menu_pids=Opened2}};
+
handle_info({active, Node},
#state{holder=Holder, timer=Timer, parent=Parent}=State) ->
create_pro_menu(Parent, Holder),
@@ -378,8 +380,7 @@ handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
handle_event(#wx{event=#wxList{type=command_list_item_activated}},
#state{panel=Panel, procinfo_menu_pids=Opened,
- sel={_, [Pid|_]}}=State)
- when Pid =/= undefined ->
+ sel={_, [Pid|_]}}=State) ->
Opened2 = start_procinfo(Pid, Panel, Opened),
{noreply, State#state{procinfo_menu_pids=Opened2}};
@@ -435,13 +436,14 @@ set_focus([Old|_], [New|_], Grid) ->
init_table_holder(Parent, Attrs) ->
Backend = spawn_link(node(), observer_backend,etop_collect,[self()]),
table_holder(#holder{parent=Parent,
- info=#etop_info{procinfo=[]},
+ etop=#etop_info{},
+ info=array:new(),
node=node(),
backend_pid=Backend,
attrs=Attrs
}).
-table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
+table_holder(#holder{info=Info, attrs=Attrs,
node=Node, backend_pid=Backend}=S0) ->
receive
{get_row, From, Row, Col} ->
@@ -488,7 +490,8 @@ table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
From ! {self(), S0#holder.accum == true},
table_holder(S0);
{dump, Fd} ->
- etop_txt:do_update(Fd, S0#holder.info, #opts{node=Node}),
+ EtopInfo = (S0#holder.etop)#etop_info{procinfo=array:to_list(Info)},
+ etop_txt:do_update(Fd, EtopInfo, #opts{node=Node}),
file:close(Fd),
table_holder(S0);
stop ->
@@ -498,23 +501,23 @@ table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
table_holder(S0)
end.
-change_sort(Col, S0=#holder{parent=Parent, info=EI=#etop_info{procinfo=Data}, sort=Sort0}) ->
+change_sort(Col, S0=#holder{parent=Parent, info=Data, sort=Sort0}) ->
{Sort, ProcInfo}=sort(Col, Sort0, Data),
- Parent ! {holder_updated, length(Data)},
- S0#holder{info=EI#etop_info{procinfo=ProcInfo}, sort=Sort}.
+ Parent ! {holder_updated, array:size(Data)},
+ S0#holder{info=ProcInfo, sort=Sort}.
change_accum(true, S0) ->
S0#holder{accum=true};
-change_accum(false, S0=#holder{info=#etop_info{procinfo=Info}}) ->
+change_accum(false, S0=#holder{info=Info}) ->
self() ! refresh,
- S0#holder{accum=lists:sort(Info)}.
+ S0#holder{accum=lists:sort(array:to_list(Info))}.
handle_update(EI=#etop_info{procinfo=ProcInfo0},
S0=#holder{parent=Parent, sort=Sort=#sort{sort_key=KeyField}}) ->
{ProcInfo1, S1} = accum(ProcInfo0, S0),
{_SO, ProcInfo} = sort(KeyField, Sort#sort{sort_key=undefined}, ProcInfo1),
- Parent ! {holder_updated, length(ProcInfo)},
- S1#holder{info=EI#etop_info{procinfo=ProcInfo}}.
+ Parent ! {holder_updated, array:size(ProcInfo)},
+ S1#holder{info=ProcInfo, etop=EI#etop_info{procinfo=[]}}.
accum(ProcInfo, State=#holder{accum=true}) ->
{ProcInfo, State};
@@ -532,12 +535,18 @@ accum2([PI|PIs], Old, Acc) ->
accum2(PIs, Old, [PI|Acc]);
accum2([], _, Acc) -> Acc.
+sort(Col, Opt, Table)
+ when not is_list(Table) ->
+ sort(Col,Opt,array:to_list(Table));
sort(Col, Opt=#sort{sort_key=Col, sort_incr=Bool}, Table) ->
- {Opt#sort{sort_incr=not Bool}, lists:reverse(Table)};
+ {Opt#sort{sort_incr=not Bool},
+ array:from_list(lists:reverse(Table))};
sort(Col, S=#sort{sort_incr=true}, Table) ->
- {S#sort{sort_key=Col}, lists:keysort(col_to_element(Col), Table)};
+ {S#sort{sort_key=Col},
+ array:from_list(lists:keysort(col_to_element(Col), Table))};
sort(Col, S=#sort{sort_incr=false}, Table) ->
- {S#sort{sort_key=Col}, lists:reverse(lists:keysort(col_to_element(Col), Table))}.
+ {S#sort{sort_key=Col},
+ array:from_list(lists:reverse(lists:keysort(col_to_element(Col), Table)))}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -552,40 +561,50 @@ col_to_element(?COL_FUN) -> #etop_proc_info.cf;
col_to_element(?COL_MSG) -> #etop_proc_info.mq.
get_pids(From, Indices, ProcInfo) ->
- Processes = [(lists:nth(I+1, ProcInfo))#etop_proc_info.pid || I <- Indices],
+ Processes = [(array:get(I, ProcInfo))#etop_proc_info.pid || I <- Indices],
From ! {self(), Processes}.
get_name_or_pid(From, Indices, ProcInfo) ->
Get = fun(#etop_proc_info{name=Name}) when is_atom(Name) -> Name;
(#etop_proc_info{pid=Pid}) -> Pid
end,
- Processes = [Get(lists:nth(I+1, ProcInfo)) || I <- Indices],
+ Processes = [Get(array:get(I, ProcInfo)) || I <- Indices],
From ! {self(), Processes}.
-
get_row(From, Row, pid, Info) ->
Pid = case Row =:= -1 of
true -> {error, undefined};
- false -> {ok, get_procinfo_data(?COL_PID, lists:nth(Row+1, Info))}
+ false -> {ok, get_procinfo_data(?COL_PID, array:get(Row, Info))}
end,
From ! {self(), Pid};
get_row(From, Row, Col, Info) ->
- Data = case Row+1 > length(Info) of
+ Data = case Row > array:size(Info) of
true ->
"";
false ->
- ProcInfo = lists:nth(Row+1, Info),
+ ProcInfo = array:get(Row, Info),
get_procinfo_data(Col, ProcInfo)
end,
From ! {self(), observer_lib:to_str(Data)}.
get_rows_from_pids(From, Pids0, Info) ->
- Res = lists:foldl(fun(Pid, Data = {Ids, Pids}) ->
- case index(Pid, Info, 0) of
- false -> Data;
- Index -> {[Index|Ids], [Pid|Pids]}
- end
- end, {[],[]}, Pids0),
+ Search = fun(Idx, #etop_proc_info{pid=Pid}, Acc0={Pick0, {Idxs, Pids}}) ->
+ case ordsets:is_element(Pid, Pick0) of
+ true ->
+ Acc = {[Idx|Idxs],[Pid|Pids]},
+ Pick = ordsets:del_element(Pid, Pick0),
+ case Pick =:= [] of
+ true -> throw(Acc);
+ false -> {Pick, Acc}
+ end;
+ false -> Acc0
+ end
+ end,
+ Res = try
+ {_, R} = array:foldl(Search, {ordsets:from_list(Pids0), {[],[]}}, Info),
+ R
+ catch R0 -> R0
+ end,
From ! {self(), Res}.
get_attr(From, Row, Attrs) ->
@@ -594,7 +613,3 @@ get_attr(From, Row, Attrs) ->
false -> Attrs#attrs.odd
end,
From ! {self(), Attribute}.
-
-index(Pid, [#etop_proc_info{pid=Pid}|_], Index) -> Index;
-index(Pid, [_|PI], Index) -> index(Pid, PI, Index+1);
-index(_, _, _) -> false.
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index 98d0403139..8e8a37fc93 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,8 +34,11 @@
-record(state, {parent,
frame,
+ notebook,
pid,
- pages=[]
+ pages=[],
+ expand_table,
+ expand_wins=[]
}).
-record(worker, {panel, callback}).
@@ -47,6 +50,7 @@ start(Process, ParentFrame, Parent) ->
init([Pid, ParentFrame, Parent]) ->
try
+ Table = ets:new(observer_expand,[set,public]),
Title=case observer_wx:try_rpc(node(Pid), erlang, process_info, [Pid, registered_name]) of
[] -> io_lib:format("~p",[Pid]);
{registered_name, Registered} -> io_lib:format("~p (~p)",[Registered, Pid]);
@@ -60,11 +64,11 @@ init([Pid, ParentFrame, Parent]) ->
Notebook = wxNotebook:new(Frame, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
- ProcessPage = init_panel(Notebook, "Process Information", Pid, fun init_process_page/2),
- MessagePage = init_panel(Notebook, "Messages", Pid, fun init_message_page/2),
- DictPage = init_panel(Notebook, "Dictionary", Pid, fun init_dict_page/2),
- StackPage = init_panel(Notebook, "Stack Trace", Pid, fun init_stack_page/2),
- StatePage = init_panel(Notebook, "State", Pid, fun init_state_page/2),
+ ProcessPage = init_panel(Notebook, "Process Information", [Pid], fun init_process_page/2),
+ MessagePage = init_panel(Notebook, "Messages", [Pid,Table], fun init_message_page/3),
+ DictPage = init_panel(Notebook, "Dictionary", [Pid,Table], fun init_dict_page/3),
+ StackPage = init_panel(Notebook, "Stack Trace", [Pid], fun init_stack_page/2),
+ StatePage = init_panel(Notebook, "State", [Pid,Table], fun init_state_page/3),
wxFrame:connect(Frame, close_window),
wxMenu:connect(Frame, command_menu_selected),
@@ -73,7 +77,9 @@ init([Pid, ParentFrame, Parent]) ->
{Frame, #state{parent=Parent,
pid=Pid,
frame=Frame,
- pages=[ProcessPage,MessagePage,DictPage,StackPage,StatePage]
+ notebook=Notebook,
+ pages=[ProcessPage,MessagePage,DictPage,StackPage,StatePage],
+ expand_table=Table
}}
catch error:{badrpc, _} ->
observer_wx:return_to_localnode(ParentFrame, node(Pid)),
@@ -83,10 +89,10 @@ init([Pid, ParentFrame, Parent]) ->
{stop, normal}
end.
-init_panel(Notebook, Str, Pid, Fun) ->
+init_panel(Notebook, Str, FunArgs, Fun) ->
Panel = wxPanel:new(Notebook),
Sizer = wxBoxSizer:new(?wxHORIZONTAL),
- {Window,Callback} = Fun(Panel, Pid),
+ {Window,Callback} = apply(Fun,[Panel|FunArgs]),
wxSizer:add(Sizer, Window, [{flag, ?wxEXPAND bor ?wxALL}, {proportion, 1}, {border, 5}]),
wxPanel:setSizer(Panel, Sizer),
true = wxNotebook:addPage(Notebook, Panel, Str),
@@ -99,16 +105,64 @@ handle_event(#wx{event=#wxClose{type=close_window}}, State) ->
handle_event(#wx{id=?wxID_CLOSE, event=#wxCommand{type=command_menu_selected}}, State) ->
{stop, normal, State};
-handle_event(#wx{id=?REFRESH}, #state{frame=Frame, pid=Pid, pages=Pages}=State) ->
+handle_event(#wx{id=?REFRESH}, #state{frame=Frame, pid=Pid, pages=Pages, expand_table=T}=State) ->
+ ets:delete_all_objects(T),
try [(W#worker.callback)() || W <- Pages]
catch process_undefined ->
wxFrame:setTitle(Frame, io_lib:format("*DEAD* ~p",[Pid]))
end,
{noreply, State};
+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(#wx{event=#wxHtmlLink{linkInfo=#wxHtmlLinkInfo{href=Href}}},
+ #state{frame=Frame,expand_table=T,expand_wins=Opened0}=State) ->
+ {Type, Rest} = case Href of
+ "#Term?"++Keys -> {cdv_term_cb, Keys};
+ "#OBSBinary?"++Keys -> {cdv_bin_cb, Keys};
+ _ -> {other, Href}
+ end,
+ case Type of
+ other ->
+ observer ! {open_link, Href},
+ {noreply, State};
+ Callback ->
+ [{"key1",Key1},{"key2",Key2},{"key3",Key3}] = httpd:parse_query(Rest),
+ Id = {obs, {T,{list_to_integer(Key1),
+ list_to_integer(Key2),
+ list_to_integer(Key3)}}},
+ Opened =
+ case lists:keyfind(Id,1,Opened0) of
+ false ->
+ Win = cdv_detail_wx:start_link(Id,Frame,Callback),
+ [{Id,Win}|Opened0];
+ {_,Win} ->
+ wxFrame:raise(Win),
+ Opened0
+ end,
+ {noreply,State#state{expand_wins=Opened}}
+ end;
+
+handle_event(#wx{event=#wxHtmlLink{linkInfo=#wxHtmlLinkInfo{href=Info}}}, State) ->
+ observer ! {open_link, Info},
+ {noreply, State};
+
handle_event(Event, _State) ->
error({unhandled_event, Event}).
+handle_info({get_debug_info, From}, State = #state{notebook=Notebook}) ->
+ From ! {procinfo_debug, Notebook},
+ {noreply, State};
handle_info(_Info, State) ->
%% io:format("~p: ~p, Handle info: ~p~n", [?MODULE, ?LINE, Info]),
{noreply, State}.
@@ -116,10 +170,15 @@ handle_info(_Info, State) ->
handle_call(Call, From, _State) ->
error({unhandled_call, Call, From}).
+handle_cast({detail_win_closed,Id}, #state{expand_wins=Opened0}=State) ->
+ Opened = lists:keydelete(Id,1,Opened0),
+ {noreply,State#state{expand_wins=Opened}};
+
handle_cast(Cast, _State) ->
error({unhandled_cast, Cast}).
-terminate(_Reason, #state{parent=Parent,pid=Pid,frame=Frame}) ->
+terminate(_Reason, #state{parent=Parent,pid=Pid,frame=Frame,expand_table=T}) ->
+ T=/=undefined andalso ets:delete(T),
Parent ! {procinfo_menu_closed, Pid},
case Frame of
undefined -> ok;
@@ -139,58 +198,37 @@ init_process_page(Panel, Pid) ->
observer_lib:update_info(UpFields, Fields)
end}.
-init_text_page(Parent) ->
- Style = ?wxTE_MULTILINE bor ?wxTE_RICH2 bor ?wxTE_READONLY,
- Text = wxTextCtrl:new(Parent, ?wxID_ANY, [{style, Style}]),
- Font = observer_wx:get_attrib({font, fixed}),
- Attr = wxTextAttr:new(?wxBLACK, [{font, Font}]),
- true = wxTextCtrl:setDefaultStyle(Text, Attr),
- wxTextAttr:destroy(Attr),
- Text.
-
-init_message_page(Parent, Pid) ->
- Text = init_text_page(Parent),
- Format = fun(Message, Number) ->
- {io_lib:format("~-4.w ~p~n", [Number, Message]),
- Number+1}
- end,
+
+init_message_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
case observer_wx:try_rpc(node(Pid), erlang, process_info,
[Pid, messages])
of
- {messages,RawMessages} ->
- {Messages,_} = lists:mapfoldl(Format, 1, RawMessages),
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- case Messages =:= [] of
- true ->
- wxTextCtrl:writeText(Text, "No messages");
- false ->
- wxTextCtrl:writeText(Text, Messages)
- end;
+ {messages, Messages} ->
+ Html = observer_html_lib:expandable_term("Message Queue", Messages, Table),
+ wxHtmlWindow:setPage(Win, Html);
_ ->
throw(process_undefined)
end
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
-init_dict_page(Parent, Pid) ->
- Text = init_text_page(Parent),
+init_dict_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
case observer_wx:try_rpc(node(Pid), erlang, process_info, [Pid, dictionary])
of
- {dictionary,RawDict} ->
- Dict = [io_lib:format("~-20.w ~p~n", [K, V]) || {K, V} <- RawDict],
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- wxTextCtrl:writeText(Text, Dict);
+ {dictionary,Dict} ->
+ Html = observer_html_lib:expandable_term("Dictionary", Dict, Table),
+ wxHtmlWindow:setPage(Win, Html);
_ ->
throw(process_undefined)
end
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
init_stack_page(Parent, Pid) ->
LCtrl = wxListCtrl:new(Parent, [{style, ?wxLC_REPORT bor ?wxLC_HRULES}]),
@@ -236,58 +274,58 @@ init_stack_page(Parent, Pid) ->
Update(),
{LCtrl, Update}.
-
-init_state_page(Parent, Pid) ->
- Text = init_text_page(Parent),
+init_state_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
- %% First, test if sys:get_status/2 have any chance to return an answer
- case rpc:call(node(Pid), proc_lib, translate_initial_call, [Pid])
- of
- %% Not a gen process
- {proc_lib,init_p,5} -> Misc = [{"Information", "Not available"}];
- %% May be a gen process
- {M, _F, _A} ->
- %% Get the behavio(u)r
- I = rpc:call(node(Pid), M, module_info, [attributes]),
- case lists:keyfind(behaviour, 1, I) of
- false -> case lists:keyfind(behavior, 1, I) of
- false -> B = undefined;
- {behavior, [B]} -> B
- end;
- {behaviour, [B]} -> B
- end,
- %% but not sure that system messages are treated by this process
- %% so using a rpc with a small timeout in order not to lag the display
- case rpc:call(node(Pid), sys, get_status, [Pid, 200])
- of
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- [Header,{data, First},{data, Second}]]} ->
- Misc = [{"Behaviour", B}] ++ [Header] ++ First ++ Second;
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- [Header,{data, First}, OtherFormat]]} ->
- Misc = [{"Behaviour", B}] ++ [Header] ++ First ++ [{"State",OtherFormat}];
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- OtherFormat]} ->
- %% Formatted status ?
- case lists:keyfind(format_status, 1, rpc:call(node(Pid), M, module_info, [exports])) of
- false -> Opt = {"Format", unknown};
- _ -> Opt = {"Format", overriden}
- end,
- Misc = [{"Behaviour", B}] ++ [Opt, {"State",OtherFormat}];
- {badrpc,{'EXIT',{timeout, _}}} ->
- Misc = [{"Information","Timed out"},
- {"Tip","system messages are probably not treated by this process"}]
- end;
- _ -> Misc=[], throw(process_undefined)
- end,
- Dict = [io_lib:format("~-20.s ~tp~n", [K, V]) || {K, V} <- Misc],
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- wxTextCtrl:writeText(Text, Dict)
+ StateInfo = fetch_state_info(Pid),
+ Html = observer_html_lib:expandable_term("ProcState", StateInfo, Table),
+ wxHtmlWindow:setPage(Win, Html)
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
+
+fetch_state_info(Pid) ->
+ %% First, test if sys:get_status/2 have any chance to return an answer
+ case rpc:call(node(Pid), proc_lib, translate_initial_call, [Pid]) of
+ %% Not a gen process
+ {proc_lib,init_p,5} -> [];
+ %% May be a gen process
+ {M, _F, _A} -> fetch_state_info2(Pid, M);
+ _ -> throw(process_undefined)
+ end.
+fetch_state_info2(Pid, M) ->
+ %% Get the behavio(u)r
+ I = rpc:call(node(Pid), M, module_info, [attributes]),
+ case lists:keyfind(behaviour, 1, I) of
+ false -> case lists:keyfind(behavior, 1, I) of
+ false -> B = undefined;
+ {behavior, [B]} -> B
+ end;
+ {behaviour, [B]} -> B
+ end,
+ %% but not sure that system messages are treated by this process
+ %% so using a rpc with a small timeout in order not to lag the display
+ case rpc:call(node(Pid), sys, get_status, [Pid, 200])
+ of
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg,
+ [Header,{data, First},{data, Second}]]} ->
+ [{"Behaviour", B}, Header] ++ First ++ Second;
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg,
+ [Header,{data, First}, OtherFormat]]} ->
+ [{"Behaviour", B}, Header] ++ First ++ [{"State",OtherFormat}];
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg, OtherFormat]} ->
+ %% Formatted status ?
+ case lists:keyfind(format_status, 1, rpc:call(node(Pid), M, module_info, [exports])) of
+ false -> Opt = {"Format", unknown};
+ _ -> Opt = {"Format", overriden}
+ end,
+ [{"Behaviour", B}, Opt, {"State",OtherFormat}];
+ {badrpc,{'EXIT',{timeout, _}}} -> []
+ end.
create_menus(MenuBar) ->
Menus = [{"File", [#create_menu{id=?wxID_CLOSE, text="Close"}]},
@@ -301,6 +339,7 @@ process_info_fields(Pid) ->
{"Registered Name", registered_name},
{"Status", status},
{"Message Queue Len",message_queue_len},
+ {"Group Leader", {click, group_leader}},
{"Priority", priority},
{"Trap Exit", trap_exit},
{"Reductions", reductions},
@@ -311,11 +350,10 @@ process_info_fields(Pid) ->
{"Suspending", suspending},
{"Sequential Trace Token", sequential_trace_token},
{"Error Handler", error_handler}]},
- {"Connections",
- [{"Group Leader", group_leader},
- {"Links", links},
- {"Monitors", monitors},
- {"Monitored by", monitored_by}]},
+ {scroll_boxes,
+ [{"Links", {click, links}},
+ {"Monitors", {click, filter_monitor_info()}},
+ {"Monitored by", {click, monitored_by}}]},
{"Memory and Garbage Collection", right,
[{"Memory", {bytes, memory}},
{"Stack and Heaps", {bytes, total_heap_size}},
@@ -365,3 +403,9 @@ get_gc_info(Arg) ->
GC = proplists:get_value(garbage_collection, Data),
proplists:get_value(Arg, GC)
end.
+
+filter_monitor_info() ->
+ fun(Data) ->
+ Ms = proplists:get_value(monitors, Data),
+ [Pid || {process, Pid} <- Ms]
+ end.
diff --git a/lib/observer/src/observer_sys_wx.erl b/lib/observer/src/observer_sys_wx.erl
index 31800cf12a..f989f9cf97 100644
--- a/lib/observer/src/observer_sys_wx.erl
+++ b/lib/observer/src/observer_sys_wx.erl
@@ -60,10 +60,10 @@ init([Notebook, Parent]) ->
wxSizer:add(TopSizer, FPanel0, [{flag, ?wxEXPAND}, {proportion, 1}]),
wxSizer:add(TopSizer, FPanel1, [{flag, ?wxEXPAND}, {proportion, 1}]),
BorderFlags = ?wxLEFT bor ?wxRIGHT,
- MemoryInfo = create_mem_info(Panel, AllocInfo),
+ {MemPanel, MemoryInfo} = create_mem_info(Panel, AllocInfo),
wxSizer:add(Sizer, TopSizer, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
{proportion, 0}, {border, 5}]),
- wxSizer:add(Sizer, MemoryInfo, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
+ wxSizer:add(Sizer, MemPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
{proportion, 1}, {border, 5}]),
wxPanel:setSizer(Panel, Sizer),
Timer = observer_lib:start_timer(10),
@@ -86,7 +86,9 @@ update_syspage(#sys_wx_state{node = Node, fields=Fields, sizer=Sizer, alloc=Allo
update_alloc(AllocCtrl, AllocInfo),
wxSizer:layout(Sizer).
-create_mem_info(Panel, Fields) ->
+create_mem_info(Parent, Fields) ->
+ Panel = wxPanel:new(Parent),
+ wxWindow:setBackgroundColour(Panel, {255,255,255}),
Style = ?wxLC_REPORT bor ?wxLC_SINGLE_SEL bor ?wxLC_HRULES bor ?wxLC_VRULES,
Grid = wxListCtrl:new(Panel, [{style, Style}]),
Li = wxListItem:new(),
@@ -103,7 +105,12 @@ create_mem_info(Panel, Fields) ->
lists:foldl(AddListEntry, 0, ListItems),
wxListItem:destroy(Li),
update_alloc(Grid, Fields),
- Grid.
+
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxLEFT bor ?wxRIGHT},
+ {border, 5}, {proportion, 1}]),
+ wxWindow:setSizerAndFit(Panel, Sizer),
+ {Panel, Grid}.
update_alloc(Grid, AllocInfo) ->
Fields = alloc_info(AllocInfo, [], 0, 0, true),
@@ -167,9 +174,12 @@ info_fields() ->
{"Async thread pool size", thread_pool_size}
]},
{"CPU's and Threads",
- [{"System Logical CPU's", logical_processors},
- {"Erlang Logical CPU's", logical_processors_online},
- {"Used Logical CPU's", logical_processors_available}
+ [{"Logical CPU's", logical_processors},
+ {"Online Logical CPU's", logical_processors_online},
+ {"Available Logical CPU's", logical_processors_available},
+ {"Schedulers", schedulers},
+ {"Online schedulers", schedulers_online},
+ {"Available schedulers", schedulers_available}
]}
],
Stat = [{"Memory Usage", right,
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl
index f2a1084f85..2878842c23 100644
--- a/lib/observer/src/observer_trace_wx.erl
+++ b/lib/observer/src/observer_trace_wx.erl
@@ -84,7 +84,8 @@ create_window(Notebook, ParentPid) ->
%% Create the window
Panel = wxPanel:new(Notebook, [{size, wxWindow:getClientSize(Notebook)}]),
Sizer = wxBoxSizer:new(?wxVERTICAL),
- Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)}]),
+ Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)},
+ {style, ?SASH_STYLE}]),
{NodeProcView, NodeView, ProcessView} = create_process_view(Splitter),
{MatchSpecView,ModView,FuncView} = create_matchspec_view(Splitter),
wxSplitterWindow:setSashGravity(Splitter, 0.5),
@@ -120,7 +121,7 @@ create_process_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
- Splitter = wxSplitterWindow:new(Panel, []),
+ 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}]),
Li = wxListItem:new(),
@@ -157,7 +158,7 @@ create_matchspec_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
- Splitter = wxSplitterWindow:new(Panel, []),
+ Splitter = wxSplitterWindow:new(Panel, [{style, ?SASH_STYLE}]),
Modules = wxListCtrl:new(Splitter, [{winid, ?MODULES_WIN}, {style, Style}]),
Funcs = wxListCtrl:new(Splitter, [{winid, ?FUNCS_WIN}, {style, Style}]),
Li = wxListItem:new(),
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl
index b4832d9599..7757dfea53 100644
--- a/lib/observer/src/observer_tv_table.erl
+++ b/lib/observer/src/observer_tv_table.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -98,7 +98,7 @@ init([Parent, Opts]) ->
ets -> "TV Ets: " ++ Title0;
mnesia -> "TV Mnesia: " ++ Title0
end,
- Frame = wxFrame:new(Parent, ?wxID_ANY, Title, [{size, {800, 300}}]),
+ Frame = wxFrame:new(Parent, ?wxID_ANY, Title, [{size, {800, 600}}]),
IconFile = filename:join(code:priv_dir(observer), "erlang_observer.png"),
Icon = wxIcon:new(IconFile, [{type,?wxBITMAP_TYPE_PNG}]),
wxFrame:setIcon(Frame, Icon),
@@ -261,11 +261,12 @@ handle_event(#wx{id=?ID_EDIT}, State = #state{selected=Index}) ->
handle_event(#wx{id=?ID_DELETE}, State = #state{selected=undefined}) ->
{noreply, State};
handle_event(#wx{id=?ID_DELETE},
- State = #state{pid=Pid, status=StatusBar, selected=Index}) ->
+ State = #state{grid=Grid, pid=Pid, status=StatusBar, selected=Index}) ->
Str = get_row(Pid, Index, all),
Pid ! {delete, Index},
wxStatusBar:setStatusText(StatusBar, io_lib:format("Deleted object: ~s",[Str])),
- {noreply, State};
+ wxListCtrl:setItemState(Grid, Index, 0, ?wxLIST_STATE_FOCUSED),
+ {noreply, State#state{selected=undefined}};
handle_event(#wx{id=?wxID_CLOSE}, State = #state{frame=Frame}) ->
wxFrame:destroy(Frame),
@@ -279,8 +280,8 @@ handle_event(#wx{id=?GOTO_ENTRY, event=#wxCommand{cmdString=Str}},
State = #state{grid=Grid}) ->
try
Row0 = list_to_integer(Str),
- Row1 = min(0, Row0),
- Row = max(wxListCtrl:getItemCount(Grid)-1,Row1),
+ Row1 = max(0, Row0),
+ Row = min(wxListCtrl:getItemCount(Grid)-1,Row1),
wxListCtrl:ensureVisible(Grid, Row),
ok
catch _:_ -> ok
@@ -289,7 +290,9 @@ handle_event(#wx{id=?GOTO_ENTRY, event=#wxCommand{cmdString=Str}},
%% Search functionality
handle_event(#wx{id=?ID_SEARCH},
- State = #state{sizer=Sz, search=Search}) ->
+ State = #state{grid=Grid, sizer=Sz, search=Search, selected=Index}) ->
+ is_integer(Index) andalso
+ wxListCtrl:setItemState(Grid, Index, 0, ?wxLIST_STATE_FOCUSED),
wxSizer:show(Sz, Search#search.win),
wxWindow:setFocus(Search#search.search),
wxSizer:layout(Sz),
@@ -321,7 +324,7 @@ handle_event(#wx{id=?SEARCH_ENTRY, event=#wxCommand{type=command_text_enter,cmdS
Pid ! {mark_search_hit, false},
case search(Pid, Str, Pos, Dir, Case) of
false ->
- wxStatusBar:setStatusText(SB, "Not found"),
+ wxStatusBar:setStatusText(SB, io_lib:format("Not found (regexp): ~s",[Str])),
Pid ! {mark_search_hit, Find#find.start},
wxListCtrl:refreshItem(Grid, Find#find.start),
{noreply, State#state{search=Search#search{find=Find#find{found=false}}}};
@@ -355,7 +358,7 @@ handle_event(#wx{id=?SEARCH_ENTRY, event=#wxCommand{cmdString=Str}},
Pid ! {mark_search_hit, false},
case search(Pid, Str, Cont#find.start, Dir, Case) of
false ->
- wxStatusBar:setStatusText(SB, "Not found"),
+ wxStatusBar:setStatusText(SB, io_lib:format("Not found (regexp): ~s",[Str])),
{noreply, State};
Row ->
wxListCtrl:ensureVisible(Grid, Row),
@@ -402,6 +405,9 @@ handle_info({new_cols, New}, State = #state{grid=Grid, columns=Cols0}) ->
Cols = add_columns(Grid, Cols0, New),
{noreply, State#state{columns=Cols}};
+handle_info({refresh, Min, Min}, State = #state{grid=Grid}) ->
+ wxListCtrl:refreshItem(Grid, Min), %% Avoid assert in wx below if Max is 0
+ {noreply, State};
handle_info({refresh, Min, Max}, State = #state{grid=Grid}) ->
Max > 0 andalso wxListCtrl:refreshItems(Grid, Min, Max),
{noreply, State};
@@ -426,10 +432,14 @@ handle_info(_Event, State) ->
terminate(_Event, #state{pid=Pid, attrs=Attrs}) ->
%% ListItemAttr are not auto deleted
- #attrs{odd=Odd, deleted=D, changed=Ch, searched=S} = Attrs,
- wxListItemAttr:destroy(Odd),
+ #attrs{odd=Odd, even=Even, deleted=D, searched=S,
+ changed_odd=Ch1, changed_even=Ch2,
+ new_odd=New1, new_even=New2
+ } = Attrs,
+ wxListItemAttr:destroy(Odd), wxListItemAttr:destroy(Even),
wxListItemAttr:destroy(D),
- wxListItemAttr:destroy(Ch),
+ wxListItemAttr:destroy(Ch1),wxListItemAttr:destroy(Ch2),
+ wxListItemAttr:destroy(New1),wxListItemAttr:destroy(New2),
wxListItemAttr:destroy(S),
unlink(Pid),
exit(Pid, window_closed),
@@ -473,7 +483,7 @@ search(Table, Str, Row, Dir, Case) ->
end.
-record(holder, {node, parent, pid,
- table=[], n=0, columns,
+ table=array:new(), n=0, columns,
temp=[],
search,
source, tabid,
@@ -507,6 +517,7 @@ table_holder(S0 = #holder{parent=Parent, pid=Pid, table=Table}) ->
S1 = handle_new_data_chunk(Data, S0),
table_holder(S1);
{sort, Col} ->
+ Parent ! {refresh, 0, S0#holder.n-1},
table_holder(sort(Col, S0));
{search, Data} ->
table_holder(search(Data, S0));
@@ -530,11 +541,14 @@ table_holder(S0 = #holder{parent=Parent, pid=Pid, table=Table}) ->
table_holder(S0);
What ->
io:format("Table holder got ~p~n",[What]),
+ Parent ! {refresh, 0, S0#holder.n-1},
table_holder(S0)
end.
handle_new_data_chunk(Data, S0 = #holder{columns=Cols, parent=Parent}) ->
- S1 = #holder{columns=NewCols} = handle_new_data_chunk2(Data, S0),
+ S1 = #holder{n=N,columns=NewCols} = handle_new_data_chunk2(Data, S0),
+ Parent ! {no_rows, N},
+ Parent ! {refresh, 0, N-1},
case NewCols =:= Cols of
true -> S1;
false ->
@@ -543,15 +557,12 @@ handle_new_data_chunk(Data, S0 = #holder{columns=Cols, parent=Parent}) ->
end.
handle_new_data_chunk2('$end_of_table',
- S0 = #holder{parent=Parent, sort=Opt,
- key=Key,
+ S0 = #holder{sort=Opt0, key=Key,
table=Old, temp=New}) ->
- Table = merge(Old, New, Key),
- N = length(Table),
- Parent ! {no_rows, N},
- sort(Opt#opt.sort_key, S0#holder{n=N, pid=undefine,
- sort=Opt#opt{sort_key = undefined},
- table=Table, temp=[]});
+ Merged = merge(array:to_list(Old), New, Key),
+ {Opt,Sorted} = sort(Opt0#opt.sort_key, Opt0#opt{sort_key = undefined}, Merged),
+ SortedA = array:from_list(Sorted),
+ S0#holder{sort=Opt, table=SortedA, n=array:size(SortedA), temp=[], pid=undefined};
handle_new_data_chunk2(Data, S0 = #holder{columns=Cols0, source=ets, temp=Tab0}) ->
{Tab, Cols} = parse_ets_data(Data, Cols0, Tab0),
S0#holder{columns=Cols, temp=Tab};
@@ -566,10 +577,9 @@ parse_ets_data([Recs|Rs], C0, Tab0) ->
parse_ets_data([], Cols, Tab) ->
{Tab, Cols}.
-sort(Col, S=#holder{n=N, parent=Parent, sort=Opt0, table=Table0}) ->
- {Opt, Table} = sort(Col, Opt0, Table0),
- Parent ! {refresh, 0, N-1},
- S#holder{sort=Opt, table=Table}.
+sort(Col, S=#holder{sort=Opt0, table=Table0}) ->
+ {Opt, Table} = sort(Col, Opt0, array:to_list(Table0)),
+ S#holder{sort=Opt, table=array:from_list(Table)}.
sort(Col, Opt = #opt{sort_key=Col, sort_incr=Bool}, Table) ->
{Opt#opt{sort_incr=not Bool}, lists:reverse(Table)};
@@ -597,7 +607,7 @@ keysort(Col, Table) ->
lists:sort(Sort, Table).
search([Str, Row, Dir0, CaseSens],
- S=#holder{parent=Parent, table=Table0}) ->
+ S=#holder{parent=Parent, n=N, table=Table}) ->
Opt = case CaseSens of
true -> [];
false -> [caseless]
@@ -607,32 +617,26 @@ search([Str, Row, Dir0, CaseSens],
false -> -1
end,
Res = case re:compile(Str, Opt) of
- {ok, Re} ->
- Table =
- case Dir0 of
- true ->
- lists:nthtail(Row, Table0);
- false ->
- lists:reverse(lists:sublist(Table0, Row+1))
- end,
- search(Row, Dir, Re, Table);
+ {ok, Re} -> re_search(Row, Dir, N, Re, Table);
{error, _} -> false
end,
Parent ! {self(), Res},
S#holder{search=Res}.
-search(Row, Dir, Re, [ [Term|_] |Table]) ->
+re_search(Row, Dir, N, Re, Table) when Row >= 0, Row < N ->
+ [Term|_] = array:get(Row, Table),
Str = format(Term),
Res = re:run(Str, Re),
case Res of
- nomatch -> search(Row+Dir, Dir, Re, Table);
- {match,_} -> Row
+ nomatch -> re_search(Row+Dir, Dir, N, Re, Table);
+ {match,_} ->
+ Row
end;
-search(_, _, _, []) ->
+re_search(_, _, _, _, _) ->
false.
get_row(From, Row, Col, Table) ->
- case lists:nth(Row+1, Table) of
+ case array:get(Row, Table) of
[Object|_] when Col =:= all ->
From ! {self(), format(Object)};
[Object|_] when Col =:= all_multiline ->
@@ -647,14 +651,15 @@ get_attr(From, Row, #holder{attrs=Attrs, search=Row}) ->
What = Attrs#attrs.searched,
From ! {self(), What};
get_attr(From, Row, #holder{table=Table, attrs=Attrs}) ->
- What = case lists:nth(Row+1, Table) of
+ Odd = (Row rem 2) > 0,
+ What = case array:get(Row, Table) of
[_|deleted] -> Attrs#attrs.deleted;
- [_|changed] -> Attrs#attrs.changed;
- [_|new] -> Attrs#attrs.changed;
- _ when (Row rem 2) > 0 ->
- Attrs#attrs.odd;
- _ ->
- Attrs#attrs.even
+ [_|changed] when Odd -> Attrs#attrs.changed_odd;
+ [_|changed] -> Attrs#attrs.changed_even;
+ [_|new] when Odd -> Attrs#attrs.new_odd;
+ [_|new] -> Attrs#attrs.new_even;
+ _ when Odd -> Attrs#attrs.odd;
+ _ -> Attrs#attrs.even
end,
From ! {self(), What}.
@@ -665,19 +670,29 @@ merge(Old, New, Key) ->
merge2([[Obj|_]|Old], [Obj|New], Key) ->
[[Obj]|merge2(Old, New, Key)];
-merge2([[A|_]|Old], [B|New], Key)
+merge2([[A|Op]|Old], [B|New], Key)
when element(Key, A) == element(Key, B) ->
- [[B|changed]|merge2(Old, New, Key)];
-merge2([[A|_]|Old], New = [B|_], Key)
+ case Op of
+ deleted ->
+ [[B|new]|merge2(Old, New, Key)];
+ _ ->
+ [[B|changed]|merge2(Old, New, Key)]
+ end;
+merge2([[A|Op]|Old], New = [B|_], Key)
when element(Key, A) < element(Key, B) ->
- [[A|deleted]|merge2(Old, New, Key)];
+ case Op of
+ deleted -> merge2(Old, New, Key);
+ _ -> [[A|deleted]|merge2(Old, New, Key)]
+ end;
merge2(Old = [[A|_]|_], [B|New], Key)
when element(Key, A) > element(Key, B) ->
[[B|new]|merge2(Old, New, Key)];
merge2([], New, _Key) ->
[[N|new] || N <- New];
merge2(Old, [], _Key) ->
- [[O|deleted] || [O|_] <- Old].
+ lists:foldl(fun([_O|deleted], Acc) -> Acc;
+ ([O|_], Acc) -> [[O|deleted]|Acc]
+ end, [], Old).
delete_row(Row, S0 = #holder{parent=Parent}) ->
@@ -691,7 +706,7 @@ delete_row(Row, S0 = #holder{parent=Parent}) ->
delete(Row, #holder{tabid=Id, table=Table,
source=Source, node=Node}) ->
- [Object|_] = lists:nth(Row+1, Table),
+ [Object|_] = array:get(Row, Table),
try
case Source of
ets ->
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl
index b276965f83..da4cb8e041 100644
--- a/lib/observer/src/observer_tv_wx.erl
+++ b/lib/observer/src/observer_tv_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -132,8 +132,8 @@ handle_event(#wx{event=#wxSize{size={W,_}}}, State=#state{grid=Grid}) ->
observer_lib:set_listctrl_col_size(Grid, W),
{noreply, State};
-handle_event(#wx{obj=Grid, event=#wxList{type=command_list_item_activated,
- itemIndex=Index}},
+handle_event(#wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=Index}},
State=#state{grid=Grid, node=Node, opt=#opt{type=Type}, tabs=Tabs}) ->
Table = lists:nth(Index+1, Tabs),
case Table#tab.protection of
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 47740581f0..15df804975 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
-behaviour(wx_object).
--export([start/0]).
+-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]).
@@ -36,6 +36,7 @@
-define(ID_PING, 1).
-define(ID_CONNECT, 2).
-define(ID_NOTEBOOK, 3).
+-define(ID_CDV, 4).
-define(FIRST_NODES_MENU_ID, 1000).
-define(LAST_NODES_MENU_ID, 2000).
@@ -68,6 +69,9 @@ start() ->
_Obj -> ok
end.
+stop() ->
+ wx_object:call(observer, stop).
+
create_menus(Object, Menus) when is_list(Menus) ->
wx_object:call(Object, {create_menus, Menus}).
@@ -108,9 +112,6 @@ setup(#state{frame = Frame} = State) ->
observer_lib:create_menus(DefMenus, MenuBar, default),
wxFrame:setMenuBar(Frame, MenuBar),
- StatusBar = wxFrame:createStatusBar(Frame, []),
- wxFrame:setTitle(Frame, atom_to_list(node())),
- wxStatusBar:setStatusText(StatusBar, atom_to_list(node())),
%% Setup panels
Panel = wxPanel:new(Frame, []),
@@ -126,11 +127,19 @@ setup(#state{frame = Frame} = State) ->
wxSizer:add(MainSizer, Notebook, [{proportion, 1}, {flag, ?wxEXPAND}]),
wxPanel:setSizer(Panel, MainSizer),
+ StatusBar = wxStatusBar:new(Frame),
+ wxFrame:setStatusBar(Frame, StatusBar),
+ wxFrame:setTitle(Frame, atom_to_list(node())),
+ wxStatusBar:setStatusText(StatusBar, atom_to_list(node())),
+
wxNotebook:connect(Notebook, command_notebook_page_changing),
wxFrame:connect(Frame, close_window, [{skip, true}]),
wxMenu:connect(Frame, command_menu_selected),
wxFrame:show(Frame),
+ %% Freeze and thaw is buggy currently
+ DoFreeze = [?wxMAJOR_VERSION,?wxMINOR_VERSION] < [2,9],
+ DoFreeze andalso wxWindow:freeze(Panel),
%% I postpone the creation of the other tabs so they can query/use
%% the window size
@@ -154,9 +163,12 @@ setup(#state{frame = Frame} = State) ->
TracePanel = observer_trace_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, TracePanel, ?TRACE_STR, []),
-
- %% Force redraw (window needs it)
+ %% Force redraw (windows needs it)
wxWindow:refresh(Panel),
+ DoFreeze andalso wxWindow:thaw(Panel),
+
+ wxFrame:raise(Frame),
+ wxFrame:setFocus(Frame),
SysPid = wx_object:get_pid(SysPanel),
SysPid ! {active, node()},
@@ -206,6 +218,10 @@ handle_event(#wx{event=#wxNotebook{type=command_notebook_page_changing}},
handle_event(#wx{event = #wxClose{}}, State) ->
{stop, normal, State};
+handle_event(#wx{id = ?ID_CDV, event = #wxCommand{type = command_menu_selected}}, State) ->
+ spawn(crashdump_viewer, start, []),
+ {noreply, State};
+
handle_event(#wx{id = ?wxID_EXIT, event = #wxCommand{type = command_menu_selected}}, State) ->
{stop, normal, State};
@@ -320,6 +336,10 @@ handle_call({get_attrib, Attrib}, _From, State) ->
handle_call(get_tracer, _From, State=#state{trace_panel=TraceP}) ->
{reply, TraceP, State};
+handle_call(stop, _, State = #state{frame = Frame}) ->
+ wxFrame:destroy(Frame),
+ {stop, normal, ok, State};
+
handle_call(_Msg, _From, State) ->
{reply, ok, State}.
@@ -340,6 +360,26 @@ 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
+ 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]),
+ Info = wxMessageDialog:new(Frame, Msg),
+ wxMessageDialog:showModal(Info),
+ wxMessageDialog:destroy(Info)
+ end,
+ {noreply, State};
+
+handle_info({get_debug_info, From}, State = #state{notebook=Notebook, active_tab=Pid}) ->
+ From ! {observer_debug, wx:get_env(), Notebook, Pid},
+ {noreply, State};
+
handle_info({'EXIT', Pid, _Reason}, State) ->
io:format("Child (~s) crashed exiting: ~p ~p~n",
[pid2panel(Pid, State), Pid,_Reason]),
@@ -350,6 +390,7 @@ handle_info(_Info, State) ->
terminate(_Reason, #state{frame = Frame}) ->
wxFrame:destroy(Frame),
+ wx:destroy(),
ok.
code_change(_, _, State) ->
@@ -381,8 +422,7 @@ return_to_localnode(Frame, Node) ->
end.
create_txt_dialog(Frame, Msg, Title, Style) ->
- MD = wxMessageDialog:new(Frame, Msg, [{style, Style}]),
- wxMessageDialog:setTitle(MD, Title),
+ MD = wxMessageDialog:new(Frame, Msg, [{style, Style}, {caption,Title}]),
wxDialog:showModal(MD),
wxDialog:destroy(MD).
@@ -517,9 +557,11 @@ create_connect_dialog(connect, #state{frame = Frame}) ->
end.
default_menus(NodesMenuItems) ->
+ CDV = #create_menu{id = ?ID_CDV, text = "Examine Crashdump"},
Quit = #create_menu{id = ?wxID_EXIT, text = "Quit"},
About = #create_menu{id = ?wxID_ABOUT, text = "About"},
Help = #create_menu{id = ?wxID_HELP},
+ FileMenu = {"File", [CDV, Quit]},
NodeMenu = case erlang:is_alive() of
true -> {"Nodes", NodesMenuItems ++
[#create_menu{id = ?ID_PING, text = "Connect Node"}]};
@@ -528,15 +570,15 @@ default_menus(NodesMenuItems) ->
end,
case os:type() =:= {unix, darwin} of
false ->
- FileMenu = {"File", [Quit]},
+ FileMenu = {"File", [CDV, Quit]},
HelpMenu = {"Help", [About,Help]},
[FileMenu, NodeMenu, HelpMenu];
true ->
%% On Mac quit and about will be moved to the "default' place
%% automagicly, so just add them to a menu that always exist.
%% But not to the help menu for some reason
- {Tag, Menus} = NodeMenu,
- [{Tag, Menus ++ [Quit,About]}, {"&Help", [Help]}]
+ {Tag, Menus} = FileMenu,
+ [{Tag, Menus ++ [About]}, NodeMenu, {"&Help", [Help]}]
end.
clean_menus(Menus, MenuBar) ->
@@ -550,13 +592,6 @@ remove_menu_items([{MenuStr = "File", Menus}|Rest], MenuBar) ->
Menu = wxMenuBar:getMenu(MenuBar, MenuId),
Items = [wxMenu:findItem(Menu, Tag) || #create_menu{text=Tag} <- Menus],
[wxMenu:delete(Menu, MItem) || MItem <- Items],
- case os:type() =:= {unix, darwin} of
- true ->
- wxMenuBar:remove(MenuBar, MenuId),
- wxMenu:destroy(Menu);
- false ->
- ignore
- end,
remove_menu_items(Rest, MenuBar)
end;
remove_menu_items([{"Nodes", _}|_], _MB) ->
diff --git a/lib/observer/test/crashdump_helper.erl b/lib/observer/test/crashdump_helper.erl
index 520fcdfd0d..0eb4a92c53 100644
--- a/lib/observer/test/crashdump_helper.erl
+++ b/lib/observer/test/crashdump_helper.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,39 +23,71 @@
-include("test_server.hrl").
n1_proc(N2,Creator) ->
- spawn(fun() -> n1_proc(Creator,N2,x,[]) end).
-n1_proc(Creator,N2,P2,L) when P2==x;length(L)<2->
+ spawn(fun() -> n1_proc(Creator,N2,x,y,[]) end).
+n1_proc(Creator,N2,Pid2,Port2,L) when Pid2==x;length(L)<2->
receive
- {N2,P} ->
- n1_proc(Creator,N2,P,L);
+ {N2,Pid,Port} ->
+ n1_proc(Creator,N2,Pid,Port,L);
P ->
- n1_proc(Creator,N2,P2,[P|L])
+ n1_proc(Creator,N2,Pid2,Port2,[P|L])
end;
-n1_proc(Creator,_N2,P2,_L) ->
+n1_proc(Creator,_N2,Pid2,Port2,_L) ->
register(aaaaaaaa,self()),
process_flag(save_calls,3),
ets:new(cdv_test_ordset_table,[ordered_set]),
- erlang:send_after(1000000,self(),cdv_test_timer_message),
+ erlang:send_after(1000000,self(),cdv_test_timer_message1),
+ erlang:send_after(1000000,aaaaaaaa,cdv_test_timer_message2),
+ erlang:send_after(1000000,noexistproc,cdv_test_timer_message3),
Port = hd(erlang:ports()),
Fun = fun() -> ok end,
Ref = make_ref(),
Pid = self(),
Bin = list_to_binary(lists:seq(1, 255)),
SubBin = element(1, split_binary(element(2, split_binary(Bin, 8)), 17)),
- DictionaryValue = {"list",atom,42,54.654,math:pow(2,1023),{},
- Port,Fun,Ref,Pid,
- Bin,SubBin,83974938738373873,-38748762783736367},
- put(dictionary_key,DictionaryValue),
- spawn(fun() -> register(aaaaaaab,self()),
- receive after infinity -> ok end
- end),
- link(P2),
+
+ register(named_port,Port),
+
+ %% Dictionary
+ put(list,"list"),
+ put(atom,atom),
+ put(integer,42),
+ put(float,54.654),
+ put(big_float,math:pow(2,1023)),
+ put(tuple,{1,2,{}}),
+ put(port,Port),
+ put('fun',Fun),
+ put(ref,Ref),
+ put(pid,Pid),
+ put(bin,Bin),
+ put(sub_bin,SubBin),
+ put(bignum,83974938738373873),
+ put(neg_bignum,-38748762783736367),
+ put(ext_pid,Pid2),
+ put(ext_port,Port2),
+
+ %% Message queue
+ L = lists:seq(0,255),
+ BigMsg = {message,list_to_binary(L),L},
+ Port = hd(erlang:ports()),
+ self() ! {short,message,1,2.5,"hello world",Port,{}},
+ self() ! BigMsg,
+
+ OtherPid = spawn(fun() -> register(aaaaaaab,self()),
+ receive after infinity -> ok end
+ end),
+ link(OtherPid), % own node
+ link(Pid2), % external node
+ erlang:monitor(process,OtherPid),
+ erlang:monitor(process,Pid2),
+
+ code:load_file(?MODULE),
+
Creator ! {self(),done},
receive after infinity -> ok end.
remote_proc(P1,Creator) ->
spawn(fun() ->
- P1 ! {node(),self()},
+ P1 ! {node(),self(),hd(erlang:ports())},
Creator ! {self(),done},
receive after infinity -> ok end
end).
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 4c04126d4f..03ab0c20e1 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,9 +19,11 @@
-module(crashdump_viewer_SUITE).
+-include_lib("observer/src/crashdump_viewer.hrl").
+
%% Test functions
-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
- translate/1,start/1,fini/1,load_file/1,
+ start_stop/1,load_file/1,not_found_items/1,
non_existing/1,not_a_crashdump/1,old_crashdump/1]).
-export([init_per_suite/1, end_per_suite/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -30,22 +32,39 @@
-include("test_server_line.hrl").
-include_lib("kernel/include/file.hrl").
--include_lib("stdlib/include/ms_transform.hrl").
-
--define(default_timeout, ?t:minutes(30)).
--define(sl_alloc_vsns,[r9b]).
-define(failed_file,"failed-cases.txt").
+-define(helper_mod,crashdump_helper).
+
+
+init_per_testcase(start_stop, Config) ->
+ catch crashdump_viewer:stop(),
+ try
+ case os:type() of
+ {unix,darwin} ->
+ exit("Can not test on MacOSX");
+ {unix, _} ->
+ io:format("DISPLAY ~s~n", [os:getenv("DISPLAY")]),
+ case ct:get_config(xserver, none) of
+ none -> ignore;
+ Server -> os:putenv("DISPLAY", Server)
+ end;
+ _ -> ignore
+ end,
+ wx:new(),
+ wx:destroy(),
+ Config
+ catch
+ _:undef ->
+ {skipped, "No wx compiled for this platform"};
+ _:Reason ->
+ SkipReason = io_lib:format("Start wx failed: ~p", [Reason]),
+ {skipped, lists:flatten(SkipReason)}
+ end;
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir,Config),
- Fs = filelib:wildcard(filename:join(DataDir,"*translated*")),
- lists:foreach(fun(F) -> file:delete(F) end,Fs),
catch crashdump_viewer:stop(),
- Dog = ?t:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
+ Config.
end_per_testcase(Case, Config) ->
- Dog=?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
case ?config(tc_status,Config) of
ok ->
ok;
@@ -60,8 +79,13 @@ end_per_testcase(Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [translate, load_file, non_existing, not_a_crashdump,
- old_crashdump].
+ [start_stop,
+ non_existing,
+ not_a_crashdump,
+ old_crashdump,
+ load_file,
+ not_found_items
+ ].
groups() ->
[].
@@ -73,18 +97,13 @@ end_per_group(_GroupName, Config) ->
Config.
-init_per_suite(doc) ->
- ["Create a lot of crashdumps which can be used in the testcases below"];
+%% Create a lot of crashdumps which can be used in the testcases below
init_per_suite(Config) when is_list(Config) ->
- Dog = ?t:timetrap(?default_timeout),
delete_saved(Config),
- application:start(inets), % will be using the http client later
- httpc:set_options([{ipfamily,inet6fb4}]),
DataDir = ?config(data_dir,Config),
- Rels = [R || R <- [r14b,r15b], ?t:is_release_available(R)] ++ [current],
+ Rels = [R || R <- [r15b,r16b], ?t:is_release_available(R)] ++ [current],
io:format("Creating crash dumps for the following releases: ~p", [Rels]),
AllDumps = create_dumps(DataDir,Rels),
- ?t:timetrap_cancel(Dog),
[{dumps,AllDumps}|Config].
delete_saved(Config) ->
@@ -97,54 +116,100 @@ delete_saved(Config) ->
ok.
-translate(suite) ->
- [];
-translate(doc) ->
- ["Test that crash dumps from OTP R9B can be translated"];
-translate(Config) when is_list(Config) ->
- DataDir = ?config(data_dir,Config),
- OutFile = filename:join(DataDir,"translated"),
-
- R9BFiles = filelib:wildcard(filename:join(DataDir,"r9b_dump.*")),
- AllFiles = R9BFiles,
- lists:foreach(
- fun(File) ->
- io:format("Translating file: ~s~n",[File]),
- ok = crashdump_translate:old2new(File,OutFile),
- check_result(File,OutFile)
- end,
- AllFiles),
- ok.
-
-start(suite) ->
- [];
-start(doc) ->
- ["Test start and stop of the Crashdump Viewer"];
-start(Config) when is_list(Config) ->
- %% Set a much shorter timeout here... We don't have all the time in world.
- AngryDog = ?t:timetrap(?t:seconds(30)),
- Port = start_cdv(),
- true = is_pid(whereis(crashdump_viewer_server)),
- true = is_pid(whereis(web_tool)),
- Html = contents(Port,"start_page"),
- "Welcome to the Web BasedErlang Crash Dump Analyser" = strip(Html),
+start_stop(Config) when is_list(Config) ->
+ Dump = hd(?config(dumps,Config)),
+ timer:sleep(1000),
+
+ ProcsBefore = processes(),
+ NumProcsBefore = length(ProcsBefore),
+ ok = crashdump_viewer:start(Dump),
+ ExpectedRegistered = [crashdump_viewer_server,
+ cdv_wx,
+ cdv_proc_cb,
+ cdv_proc_cb__holder,
+ cdv_port_cb,
+ cdv_port_cb__holder,
+ cdv_ets_cb,
+ cdv_ets_cb__holder,
+ cdv_timer_cb,
+ cdv_timer_cb__holder,
+ cdv_fun_cb,
+ cdv_fun_cb__holder,
+ cdv_atom_cb,
+ cdv_atom_cb__holder,
+ cdv_dist_cb,
+ cdv_dist_cb__holder,
+ cdv_mod_cb,
+ cdv_mod_cb__holder],
+ Regs=[begin
+ P=whereis(N),
+ {P,N,erlang:monitor(process,P)}
+ end || N <- ExpectedRegistered],
+ ct:log("CDV procs: ~n~p~n",[Regs]),
+ [true=is_pid(P) || {P,_,_} <- Regs],
+ timer:sleep(5000), % give some time to live
ok = crashdump_viewer:stop(),
- timer:sleep(10), % give some time to stop
- undefined = whereis(crashdump_viewer_server),
- undefined = whereis(web_tool),
- Url = cdv_url(Port,"start_page"),
- {error,_} = httpc:request(Url),
-% exit(whereis(httpc_manager),kill),
- ?t:timetrap_cancel(AngryDog),
+ recv_downs(Regs),
+ timer:sleep(2000),
+ ProcsAfter = processes(),
+ NumProcsAfter = length(ProcsAfter),
+ if NumProcsAfter=/=NumProcsBefore ->
+ ct:log("Before but not after:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsBefore -- ProcsAfter]]),
+ ct:log("After but not before:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsAfter -- ProcsBefore]]),
+ ct:fail("leaking processes");
+ true ->
+ ok
+ end,
ok.
-fini(Config) when is_list(Config) ->
- ok.
+recv_downs([]) ->
+ ok;
+recv_downs(Regs) ->
+ receive
+ {'DOWN',Ref,process,_Pid,_} ->
+ ct:log("Got 'DOWN' for process ~n~p~n",[_Pid]),
+ recv_downs(lists:keydelete(Ref,3,Regs))
+ after 30000 ->
+ ct:log("Timeout waiting for down:~n~p~n",
+ [[{Reg,process_info(P)} || {P,_,_}=Reg <- Regs]]),
+ ct:log("Message queue:~n~p~n",[process_info(self(),messages)])
+ end.
+
+%% Try to load nonexisting file
+non_existing(Config) when is_list(Config) ->
+ ExpectedReason = "non-existing-file is not an Erlang crash dump\n",
+ {error, ExpectedReason} = start_backend("non-existing-file"),
+ ok = crashdump_viewer:stop().
+
+%% Try to load a crashdump of old (earlier than OTP R10B) format
+old_crashdump(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir,Config),
+ OldFile = filename:join(DataDir,"old_format.dump"),
+ ExpectedReason = "The crashdump " ++ OldFile ++
+ " is in the pre-R10B format, which is no longer supported.\n",
+ {error, ExpectedReason} = start_backend(OldFile),
+ ok = crashdump_viewer:stop().
-load_file(suite) ->
- [];
-load_file(doc) ->
- ["Load files into the tool and view all pages"];
+%% Try to load a file which is not an erlang crashdump
+not_a_crashdump(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ F1 = filename:join(PrivDir,"f1"),
+ F2 = filename:join(PrivDir,"f2"),
+
+ file:write_file(F1,"=unexpected_tag:xyz"),
+ file:write_file(F2,""),
+
+ ExpReason1 = F1 ++ " is not an Erlang crash dump\n",
+ ExpReason2 = F2 ++ " is not an Erlang crash dump\n",
+
+ {error,ExpReason1} = start_backend(F1),
+ {error,ExpReason2} = start_backend(F2),
+
+ ok = crashdump_viewer:stop().
+
+%% Load files into the tool and view all pages
load_file(Config) when is_list(Config) ->
case ?t:is_debug() of
true ->
@@ -156,65 +221,33 @@ load_file(Config) when is_list(Config) ->
load_file_1(Config) ->
DataDir = ?config(data_dir,Config),
- Port = start_cdv(),
+ crashdump_viewer:start_link(),
+ %% Read both created and predefined dumps
AllFiles = filelib:wildcard(filename:join(DataDir,"r*_dump.*")),
lists:foreach(
fun(File) ->
- browse_file(Port,File),
- special(Port,File)
+ Content = browse_file(File),
+ special(File,Content)
end,
AllFiles),
ok = crashdump_viewer:stop().
-non_existing(suite) ->
- [];
-non_existing(doc) ->
- ["Try to load nonexisting file"];
-non_existing(Config) when is_list(Config) ->
- Port = start_cdv(),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path=nonexistingfile"}),
- "Please wait..." = title(Html),
- "An error occured:nonexistingfile is not an Erlang crash dump" =
- strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop().
+%% Try to lookup nonexisting process, port and node
+not_found_items(Config) ->
+ Dump = hd(?config(dumps,Config)),
-old_crashdump(doc) ->
- ["Try to load nonexisting file"];
-old_crashdump(Config) when is_list(Config) ->
- Port = start_cdv(),
- DataDir = ?config(data_dir, Config),
- OldCrashDump = filename:join(DataDir, "old_format.dump"),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++OldCrashDump}),
- "Please wait..." = title(Html),
- Str = "An error occured:The crashdump "++OldCrashDump++
- " is in the pre-R10B format, which is no longer supported.",
- Str = strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop().
+ ok = start_backend(Dump),
+ {ok,#general_info{},_} = crashdump_viewer:general_info(),
-not_a_crashdump(suite) ->
- [];
-not_a_crashdump(doc) ->
- ["Try to load a file which is not an erlang crashdump"];
-not_a_crashdump(Config) when is_list(Config) ->
- Port = start_cdv(),
- NoCrashdump = code:which(?MODULE),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++NoCrashdump}),
- "Please wait..." = title(Html),
- Str = "An error occured:"++NoCrashdump++" is not an Erlang crash dump",
- Str = strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop(),
-% exit(whereis(httpc_manager),kill),
- ok.
-
+ {error,not_found} = crashdump_viewer:proc_details("<1111.1111.1111>"),
+ {error,not_found} = crashdump_viewer:port("#Port<1111.1111>"),
+ {error,not_found} = crashdump_viewer:node_info("1111"),
+ ok = crashdump_viewer:stop().
-end_per_suite(doc) ->
- ["Remove generated crashdumps"];
+%% Remove generated crashdumps
end_per_suite(Config) when is_list(Config) ->
Dumps = ?config(dumps,Config),
DataDir = ?config(data_dir,Config),
@@ -240,387 +273,188 @@ end_per_suite(Config) when is_list(Config) ->
%%%-----------------------------------------------------------------
%%% Internal
-start_cdv() ->
- ?t:capture_start(),
- ok = crashdump_viewer:start(),
- "WebTool is available at http://localhost:" ++ Where =
- lists:flatten(?t:capture_get()),
- ?t:capture_stop(),
- [Port|_] = string:tokens(Where,"/"),
- Port.
-
-
-check_result(File,OutFile) ->
- {ok,#file_info{size=FS}} = file:read_file_info(File),
- {ok,#file_info{size=OFS}} = file:read_file_info(OutFile),
- Rel =
- if OFS > 0 -> FS/OFS;
- true -> 1.25
- end,
- if Rel>0.75, Rel<1.25 -> ok;
- true -> ?t:fail({unreasonable_size,File,FS,OFS})
- end,
- {ok,Fd} = file:open(OutFile,[read]),
- "=erl_crash_dump:0.0\n" = io:get_line(Fd,''),
- case is_truncated(File) of
- true ->
- ok;
- false ->
- {ok,_} = file:position(Fd,{eof,-5}),
- case io:get_line(Fd,'') of
- "=end\n" -> ok;
- Other -> ?t:fail({truncated,File,Other})
- end
- end,
- ok = file:close(Fd).
-
-
-%% Read a page and check that the page title matches Title
-contents(Port,Link) ->
- Url = cdv_url(Port,Link),
- request_sync(get,{Url,[]}).
-
-cdv_url(Port,Link) ->
- "http://localhost:" ++ Port ++ "/cdv_erl/crashdump_viewer/" ++ Link.
-
-request_sync(Method,HTTPReqCont) ->
- case httpc:request(Method,
- HTTPReqCont,
- [{timeout,30000}],
- [{full_result, false}]) of
- {ok,{200,Html}} ->
- Html;
- {ok,{Code,Html}} ->
- io:format("~s\n", [Html]),
- io:format("Received ~w from httpc:request(...) with\nMethod=~w\n"
- "HTTPReqCont=~p\n",
- [Code,Method,HTTPReqCont]),
- ?t:fail();
- Other ->
- io:format(
- "Received ~w from httpc:request(...) with\nMethod=~w\n"
- "HTTPReqCont=~p\n",
- [Other,Method,HTTPReqCont]),
- ?t:fail()
- end.
-
-
+%%%-----------------------------------------------------------------
+%%% Start the crashdump_viewer backend and load a dump
+start_backend(File) ->
+ crashdump_viewer:start_link(),
+ register_progress_handler(),
+ ok = crashdump_viewer:read_file(File),
+ wait_for_progress_done().
+%%%-----------------------------------------------------------------
+%%% Simulate the progress handler in observer_lib
+register_progress_handler() ->
+ register(cdv_progress_handler,self()).
-strip([$<|Html]) ->
- strip(drop_tag(Html));
-strip([$\n|Html]) ->
- strip(Html);
-strip([X|Html]) ->
- [X|strip(Html)];
-strip([]) ->
- [].
-drop_tag([$>|Html]) ->
- Html;
-drop_tag([_|Html]) ->
- drop_tag(Html).
-
-title(Port,Link,Title) ->
- Html = contents(Port,Link),
- Title = title(Html).
-
-wait(0,_Port,Link) ->
- ?t:fail({wait,Link,timeout});
-wait(Time,Port,Link) ->
- Html = contents(Port,Link),
- case title(Html) of
- "Please wait..." ->
- timer:sleep(1000),
- wait(Time-1,Port,Link);
- _Title ->
- Html
+wait_for_progress_done() ->
+ receive
+ {progress,{error,Reason}} ->
+ unregister(cdv_progress_handler),
+ {error,lists:flatten(Reason)};
+ {progress,{ok,done}} ->
+ unregister(cdv_progress_handler),
+ ok;
+ {progress,_} ->
+ wait_for_progress_done()
end.
-title([$<,$T,$I,$T,$L,$E,$>|Html]) ->
- title_end(Html);
-title([_|Html]) ->
- title(Html);
-title([]) ->
- [].
-
-title_end([$<,$/,$T,$I,$T,$L,$E,$>|_]) ->
- [];
-title_end([X|Html]) ->
- [X|title_end(Html)].
-
-
%%%-----------------------------------------------------------------
%%% General check of what is displayed for a dump
-browse_file(Port,File) ->
- io:format("Browsing file: ~s~n",[File]),
-
- %% The page where a filename can be entered
- title(Port,"read_file_frame","Read File"),
-
- %% Load a file
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++File}),
- "Please wait..." = title(Html),
- "Crashdump Viewer Start Page" = title(wait(10,Port,"start_page")),
-
- %% The frame with the initial information for a dump
- title(Port,"initial_info_frame","General Information"),
-
- %% Topmost frame of the page
- FilenameFrame = contents(Port,"filename_frame"),
- Match = "FilenameCrashdump currently viewed:" ++ File,
- true = lists:prefix(Match,strip(FilenameFrame)),
-
- %% Toggle a menu item and check that it explodes/collapses
- title(Port,"menu_frame","Menu"),
- exploded = toggle_menu(Port),
- collapsed = toggle_menu(Port),
-
- %% Open each page in menu and check that correct title is shown
- title(Port,"general_info","General Information"),
- title(Port,"processes","Process Information"),
- title(Port,"sort_procs?sort=state","Process Information"),
- title(Port,"sort_procs?sort=state","Process Information"),
- title(Port,"sort_procs?sort=pid","Process Information"),
- title(Port,"sort_procs?sort=pid","Process Information"),
- title(Port,"sort_procs?sort=msg_q_len","Process Information"),
- title(Port,"sort_procs?sort=msg_q_len","Process Information"),
- title(Port,"sort_procs?sort=reds","Process Information"),
- title(Port,"sort_procs?sort=reds","Process Information"),
- title(Port,"sort_procs?sort=mem","Process Information"),
- title(Port,"sort_procs?sort=mem","Process Information"),
- title(Port,"sort_procs?sort=name","Process Information"),
- title(Port,"sort_procs?sort=name","Process Information"),
- title(Port,"sort_procs?sort=init_func","Process Information"),
- title(Port,"sort_procs?sort=init_func","Process Information"),
- title(Port,"ports","Port Information"),
- title(Port,"ets_tables","ETS Table Information"),
- title(Port,"timers","Timer Information"),
- title(Port,"fun_table","Fun Information"),
- title(Port,"atoms","Atoms"),
- title(Port,"dist_info","Distribution Information"),
- title(Port,"loaded_modules","Loaded Modules Information"),
- title(Port,"hash_tables","Hash Table Information"),
- title(Port,"index_tables","Index Table Information"),
- title(Port,"memory","Memory Information"),
- title(Port,"allocated_areas","Information about allocated areas"),
- title(Port,"allocator_info","Allocator Information"),
-
- case is_truncated(File) of
- true ->
- ok;
- _ ->
- proc_details(Port),
- port_details(Port),
- title(Port,"loaded_mod_details?mod=kernel","kernel")
- end,
-
- ok.
-
-
-special(Port,File) ->
+browse_file(File) ->
+ io:format("~nBrowsing file: ~s",[File]),
+
+ ok = start_backend(File),
+
+ io:format(" backend started",[]),
+
+ {ok,_GI=#general_info{},_GenTW} = crashdump_viewer:general_info(),
+ {ok,Procs,_ProcsTW} = crashdump_viewer:processes(),
+ {ok,Ports,_PortsTW} = crashdump_viewer:ports(),
+ {ok,_Ets,_EtsTW} = crashdump_viewer:ets_tables(all),
+ {ok,_IntEts,_IntEtsTW} = crashdump_viewer:internal_ets_tables(),
+ {ok,_Timers,_TimersTW} = crashdump_viewer:timers(all),
+ {ok,_Funs,_FunsTW} = crashdump_viewer:funs(),
+ {ok,_Atoms,_AtomsTW} = crashdump_viewer:atoms(),
+ {ok,Nodes,_NodesTW} = crashdump_viewer:dist_info(),
+ {ok,Mods,_ModsTW} = crashdump_viewer:loaded_modules(),
+ {ok,_Mem,_MemTW} = crashdump_viewer:memory(),
+ {ok,_AllocAreas,_AreaTW} = crashdump_viewer:allocated_areas(),
+ {ok,_AllocINfo,_AllocInfoTW} = crashdump_viewer:allocator_info(),
+ {ok,_HashTabs,_HashTabsTW} = crashdump_viewer:hash_tables(),
+ {ok,_IndexTabs,_IndexTabsTW} = crashdump_viewer:index_tables(),
+
+ io:format(" info read",[]),
+
+ lookat_all_pids(Procs),
+ io:format(" pids ok",[]),
+ lookat_all_ports(Ports),
+ io:format(" ports ok",[]),
+ lookat_all_mods(Mods),
+ io:format(" mods ok",[]),
+ lookat_all_nodes(Nodes),
+ io:format(" nodes ok",[]),
+
+ Procs. % used as second arg to special/2
+
+special(File,Procs) ->
case filename:extension(File) of
".full_dist" ->
- contents(Port,"processes"),
- AllProcs = contents(Port,"sort_procs?sort=name"),
-
%% I registered a process as aaaaaaaa in the full_dist dumps
%% to make sure it will be the first in the list when sorted
%% on names. There are some special data here, so I'll thoroughly
%% read the process details for this process. Other processes
%% are just briefly traversed.
- {Pid,Rest1} = get_first_process(AllProcs),
-
- ProcDetails = contents(Port,"proc_details?pid=" ++ Pid),
- ProcTitle = "Process " ++ Pid,
- ProcTitle = title(ProcDetails),
- title(Port,"ets_tables?pid="++Pid,"ETS Tables for Process "++Pid),
- title(Port,"timers?pid="++Pid,"Timers for Process "++Pid),
-
- case filename:basename(File) of
- "r10b_dump.full_dist" ->
- [MsgQueueLink,DictLink,StackDumpLink] =
- expand_memory_links(ProcDetails),
- MsgQueue = contents(Port,MsgQueueLink),
- "MsgQueue" = title(MsgQueue),
- title(Port,DictLink,"Dictionary"),
- title(Port,StackDumpLink,"StackDump"),
-
- ExpandBinaryLink = expand_binary_link(MsgQueue),
- title(Port,ExpandBinaryLink,"Expanded binary"),
- lookat_all_pids(Port,Rest1);
- _ ->
- ok
- end;
- ".strangemodname" ->
- AllMods = contents(Port,"loaded_modules"),
- open_all_modules(Port,AllMods),
+ [#proc{pid=Pid0}|_Rest] = lists:keysort(#proc.name,Procs),
+ Pid = pid_to_list(Pid0),
+ {ok,ProcDetails=#proc{},[]} = crashdump_viewer:proc_details(Pid),
+ io:format(" process details ok",[]),
+
+ #proc{dict=Dict} = ProcDetails,
+
+ ['#CDVBin',Offset,Size,Pos] = proplists:get_value(bin,Dict),
+ {ok,<<_:Size/binary>>} =
+ crashdump_viewer:expand_binary({Offset,Size,Pos}),
+ {ok,'#CDVTruncatedBinary'} =
+ crashdump_viewer:expand_binary({Offset,Size+1,Pos}),
+ ['#CDVBin',SOffset,SSize,SPos] = proplists:get_value(sub_bin,Dict),
+ {ok,<<_:SSize/binary>>} =
+ crashdump_viewer:expand_binary({SOffset,SSize,SPos}),
+ io:format(" expand binary ok",[]),
+
+ ['#CDVPid',X1,Y1,Z1] = proplists:get_value(ext_pid,Dict),
+ ChannelStr1 = integer_to_list(X1),
+ ExtPid =
+ "<" ++ ChannelStr1 ++ "." ++
+ integer_to_list(Y1) ++ "." ++
+ integer_to_list(Z1) ++ ">",
+ {error,{other_node,ChannelStr1}} =
+ crashdump_viewer:proc_details(ExtPid),
+ io:format(" process details external ok",[]),
+
+ ['#CDVPort',X2,Y2] = proplists:get_value(port,Dict),
+ ChannelStr2 = integer_to_list(X2),
+ Port = "#Port<"++ChannelStr2++"."++integer_to_list(Y2)++">",
+ {ok,_PortDetails=#port{},[]} = crashdump_viewer:port(Port),
+ io:format(" port details ok",[]),
+
+ ['#CDVPort',X3,Y3] = proplists:get_value(ext_port,Dict),
+ ChannelStr3 = integer_to_list(X3),
+ ExtPort = "#Port<"++ChannelStr3++"."++integer_to_list(Y3)++">",
+ {error,{other_node,ChannelStr3}} = crashdump_viewer:port(ExtPort),
+ io:format(" port details external ok",[]),
+
+ {ok,[_Ets=#ets_table{}],[]} = crashdump_viewer:ets_tables(Pid),
+ io:format(" ets tables ok",[]),
+
+ {ok,[#timer{pid=Pid0,name=undefined},
+ #timer{pid=Pid0,name="aaaaaaaa"}],[]} =
+ crashdump_viewer:timers(Pid),
+ {ok,AllTimers,_TimersTW} = crashdump_viewer:timers(all),
+ #timer{name="noexistproc"} =
+ lists:keyfind(undefined,#timer.pid,AllTimers),
+ io:format(" timers ok:",[]),
+
+ {ok,Mod1=#loaded_mod{},[]} =
+ crashdump_viewer:loaded_mod_details(atom_to_list(?helper_mod)),
+ io:format(" modules ok",[]),
+ #loaded_mod{current_size=CS, old_size=OS,
+ old_attrib=A,old_comp_info=C}=Mod1,
+ true = is_integer(CS),
+ true = (CS==OS),
+ true = (A=/=undefined),
+ true = (C=/=undefined),
+ {ok,Mod2=#loaded_mod{},[]} =
+ crashdump_viewer:loaded_mod_details("application"),
+ io:format(" module details ok",[]),
+ #loaded_mod{old_size="No old code exists",
+ old_attrib=undefined,
+ old_comp_info=undefined}=Mod2,
ok;
- %%! No longer needed - all atoms are shown on one page!!
- %% ".250atoms" ->
- %% Html1 = contents(Port,"atoms"),
- %% NextLink1 = next_link(Html1),
- %% "Atoms" = title(Html1),
- %% Html2 = contents(Port,NextLink1),
- %% NextLink2 = next_link(Html2),
- %% "Atoms" = title(Html2),
- %% Html3 = contents(Port,NextLink2),
- %% "" = next_link(Html3),
- %% "Atoms" = title(Html3);
- _ ->
- ok
- end,
- case filename:basename(File) of
- "r10b_dump." ++ _ ->
- lookat_all_pids(Port,contents(Port,"processes"));
- "r11b_dump." ++ _ ->
- lookat_all_pids(Port,contents(Port,"processes"));
+ %% ".strangemodname" ->
+ %% {ok,Mods,[]} = crashdump_viewer:loaded_modules(),
+ %% lookat_all_mods(Mods),
+ %% ok;
+ %% ".sort" ->
+ %% %% sort ports, atoms and modules ????
+ %% ok;
+ %% ".trunc" ->
+ %% %% ????
+ %% ok;
_ ->
ok
end,
ok.
-lookat_all_pids(Port,Pids) ->
- case get_first_process(Pids) of
- {Pid,Rest} ->
- ProcDetails = contents(Port,"proc_details?pid=" ++ Pid),
- ProcTitle = "Process " ++ Pid,
- ProcTitle = title(ProcDetails),
- title(Port,"ets_tables?pid="++Pid,"ETS Tables for Process "++Pid),
- title(Port,"timers?pid="++Pid,"Timers for Process "++Pid),
-
- MemoryLinks = expand_memory_links(ProcDetails),
- lists:foreach(
- fun(Link) ->
- Cont = contents(Port,Link),
- true = lists:member(title(Cont),
- ["MsgQueue",
- "Dictionary",
- "StackDump"])
- end,
- MemoryLinks),
- lookat_all_pids(Port,Rest);
- false ->
- ok
- end.
-
-
-get_first_process([]) ->
- false;
-get_first_process(Html) ->
- case Html of
- "<TD><A HREF=\"./proc_details?pid=" ++ Rest ->
- {string:sub_word(Rest,1,$"),Rest};
- [_H|T] ->
- get_first_process(T)
- end.
-
-expand_memory_links(Html) ->
- case Html of
- "<B>MsgQueue</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")|expand_memory_links(Rest)];
- "<B>Dictionary</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")|expand_memory_links(Rest)];
- "<B>StackDump</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")];
- [_H|T] ->
- expand_memory_links(T);
- [] ->
- []
- end.
-
-expand_binary_link(Html) ->
- case Html of
- "<A HREF=\"./expand_binary?pos=" ++ Rest ->
- "expand_binary?pos=" ++ string:sub_word(Rest,1,$");
- [_H|T] ->
- expand_binary_link(T)
- end.
-
-open_all_modules(Port,Modules) ->
- case get_first_module(Modules) of
- {Module,Rest} ->
- ModuleDetails = contents(Port,"loaded_mod_details?mod=" ++ Module),
- ModTitle = http_uri:decode(Module),
- ModTitle = title(ModuleDetails),
- open_all_modules(Port,Rest);
- false ->
- ok
- end.
-
-get_first_module([]) ->
- false;
-get_first_module(Html) ->
- case Html of
- "<TD><A HREF=\"loaded_mod_details?mod=" ++ Rest ->
- {string:sub_word(Rest,1,$"),Rest};
- [_H|T] ->
- get_first_module(T)
- end.
-
-%% next_link(Html) ->
-%% case Html of
-%% "<A HREF=\"./next?pos=" ++ Rest ->
-%% "next?pos=" ++ string:sub_word(Rest,1,$");
-%% [_H|T] ->
-%% next_link(T);
-%% [] ->
-%% []
-%% end.
-
-
-
-toggle_menu(Port) ->
- Html = contents(Port,"toggle?index=4"),
- check_toggle(Html).
-
-check_toggle(Html) ->
- case Html of
- "<A HREF=\"./toggle?index=4\"><IMG SRC=\"/crashdump_viewer/collapsd.gif\"" ++ _ ->
- collapsed;
- "<A HREF=\"./toggle?index=4\"><IMG SRC=\"/crashdump_viewer/exploded.gif\"" ++ _ ->
- exploded;
- [_H|T] ->
- check_toggle(T)
- end.
-
-
-proc_details(Port) ->
- ProcDetails = contents(Port,"proc_details?pid=<0.0.0>"),
- "Process <0.0.0>" = title(ProcDetails),
-
- ExpandLink = expand_link(ProcDetails),
- title(Port,ExpandLink,"StackDump"),
-
- Unknown = contents(Port,"proc_details?pid=<0.9999.0>"),
- "Could not find process: <0.9999.0>" = title(Unknown).
-
-expand_link(Html) ->
- case Html of
- "<B>StackDump</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- string:sub_word(Rest,1,$");
- [_H|T] ->
- expand_link(T)
- end.
-
-
-port_details(Port) ->
- Port0 = contents(Port,"port?port=Port<0.0>"),
- Port1 = contents(Port,"port?port=Port<0.1>"),
- case title(Port0) of
- "#Port<0.0>" -> % R16 or later
- "Could not find port: #Port<0.1>" = title(Port1);
- "Could not find port: #Port<0.0>" -> % R15 or earlier
- "#Port<0.1>" = title(Port1)
- end.
-
-is_truncated(File) ->
- case filename:extension(filename:rootname(File)) of
- ".trunc" -> true;
- _ -> false
- end.
-
+lookat_all_pids([]) ->
+ ok;
+lookat_all_pids([#proc{pid=Pid0}|Procs]) ->
+ Pid = pid_to_list(Pid0),
+ {ok,_ProcDetails=#proc{},_ProcTW} = crashdump_viewer:proc_details(Pid),
+ {ok,_Ets,_EtsTW} = crashdump_viewer:ets_tables(Pid),
+ {ok,_Timers,_TimersTW} = crashdump_viewer:timers(Pid),
+ lookat_all_pids(Procs).
+
+lookat_all_ports([]) ->
+ ok;
+lookat_all_ports([#port{id=Port0}|Procs]) ->
+ Port = cdv_port_cb:format(Port0),
+ {ok,_PortDetails=#port{},_PortTW} = crashdump_viewer:port(Port),
+ lookat_all_ports(Procs).
+
+lookat_all_mods([]) ->
+ ok;
+lookat_all_mods([#loaded_mod{mod=ModId}|Mods]) ->
+ ModName = cdv_mod_cb:format(ModId),
+ {ok,_Mod=#loaded_mod{},_ModTW} = crashdump_viewer:loaded_mod_details(ModName),
+ lookat_all_mods(Mods).
+
+lookat_all_nodes([]) ->
+ ok;
+lookat_all_nodes([#nod{channel=Channel0}|Nodes]) ->
+ Channel = integer_to_list(Channel0),
+ {ok,_Node=#nod{},_NodeTW} = crashdump_viewer:node_info(Channel),
+ lookat_all_nodes(Nodes).
%%%-----------------------------------------------------------------
%%%
@@ -629,22 +463,13 @@ create_dumps(DataDir,Rels) ->
create_dumps(DataDir,[Rel|Rels],Acc) ->
Fun = fun() -> do_create_dumps(DataDir,Rel) end,
Pa = filename:dirname(code:which(?MODULE)),
- {SlAllocDumps,Dumps,DosDump} =
+ {Dumps,DosDump} =
?t:run_on_shielded_node(Fun, compat_rel(Rel) ++ "-pa \"" ++ Pa ++ "\""),
- create_dumps(DataDir,Rels,SlAllocDumps ++ Dumps ++ Acc ++ DosDump);
+ create_dumps(DataDir,Rels,Dumps ++ Acc ++ DosDump);
create_dumps(_DataDir,[],Acc) ->
Acc.
do_create_dumps(DataDir,Rel) ->
- SlAllocDumps =
- case lists:member(Rel,?sl_alloc_vsns) of
- true ->
- [dump_with_args(DataDir,Rel,"no_sl_alloc","+Se false"),
- dump_with_args(DataDir,Rel,"sl_alloc_1","+Se true +Sr 1"),
- dump_with_args(DataDir,Rel,"sl_alloc_2","+Se true +Sr 2")];
- false ->
- []
- end,
CD1 = full_dist_dump(DataDir,Rel),
CD2 = dump_with_args(DataDir,Rel,"port_is_unix_fd","-oldshell"),
DosDump =
@@ -656,14 +481,16 @@ do_create_dumps(DataDir,Rel) ->
current ->
CD3 = dump_with_args(DataDir,Rel,"instr","+Mim true"),
CD4 = dump_with_strange_module_name(DataDir,Rel,"strangemodname"),
- {SlAllocDumps, [CD1,CD2,CD3,CD4], DosDump};
+ {[CD1,CD2,CD3,CD4], DosDump};
_ ->
- {SlAllocDumps, [CD1,CD2], DosDump}
+ {[CD1,CD2], DosDump}
end.
-%% Create a dump which has two visible nodes, one hidden and one
+%% Create a dump which has three visible nodes, one hidden and one
%% not connected node, and with monitors and links between nodes.
+%% One of the visible nodes is stopped and started again in order to
+%% get multiple creations.
full_dist_dump(DataDir,Rel) ->
Opt = rel_opt(Rel),
Pz = "-pz \"" ++ filename:dirname(code:which(?MODULE)) ++ "\"",
@@ -674,23 +501,26 @@ full_dist_dump(DataDir,Rel) ->
{ok,N4} = ?t:start_node(n4,peer,Opt ++ [{args,"-hidden " ++ Pz}]),
Creator = self(),
- HelperMod = crashdump_helper,
-
- P1 = rpc:call(N1,HelperMod,n1_proc,[N2,Creator]),
- P2 = rpc:call(N2,HelperMod,remote_proc,[P1,Creator]),
- P3 = rpc:call(N3,HelperMod,remote_proc,[P1,Creator]),
- P4 = rpc:call(N4,HelperMod,remote_proc,[P1,Creator]),
+ P1 = rpc:call(N1,?helper_mod,n1_proc,[N2,Creator]),
+ P2 = rpc:call(N2,?helper_mod,remote_proc,[P1,Creator]),
+ P3 = rpc:call(N3,?helper_mod,remote_proc,[P1,Creator]),
+ P4 = rpc:call(N4,?helper_mod,remote_proc,[P1,Creator]),
get_response(P2),
get_response(P3),
get_response(P4),
get_response(P1),
- L = lists:seq(0,255),
- BigMsg = {message,list_to_binary(L),L},
- Port = hd(erlang:ports()),
- {aaaaaaaa,N1} ! {short,message,1,2.5,"hello world",Port,{}},
- {aaaaaaaa,N1} ! BigMsg,
+ %% start, stop and start a node in order to get multiple 'creations'
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P51 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P51),
+ ?t:stop_node(N5),
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P52 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P52),
+
+ {aaaaaaaa,N1} ! {hello,from,other,node}, % distribution message
?t:stop_node(N3),
DumpName = "full_dist",
@@ -698,6 +528,7 @@ full_dist_dump(DataDir,Rel) ->
?t:stop_node(N2),
?t:stop_node(N4),
+ ?t:stop_node(N5),
CD.
get_response(P) ->
@@ -800,6 +631,7 @@ rel_opt(Rel) ->
r13b -> [{erl,[{release,"r13b_patched"}]}];
r14b -> [{erl,[{release,"r14b_latest"}]}]; %naming convention changed
r15b -> [{erl,[{release,"r15b_latest"}]}];
+ r16b -> [{erl,[{release,"r16b_latest"}]}];
current -> []
end.
@@ -813,7 +645,8 @@ dump_prefix(Rel) ->
r13b -> "r13b_dump.";
r14b -> "r14b_dump.";
r15b -> "r15b_dump.";
- current -> "r16b_dump."
+ r16b -> "r16b_dump.";
+ current -> "r17b_dump."
end.
compat_rel(Rel) ->
@@ -826,5 +659,6 @@ compat_rel(Rel) ->
r13b -> "+R13 ";
r14b -> "+R14 ";
r15b -> "+R15 ";
+ r16b -> "+R16 ";
current -> ""
end.
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms
deleted file mode 100644
index 921c27bd0e..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms
+++ /dev/null
@@ -1,13135 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
-zombies
-http_content_length
-http_content_type
-'-procs_summary_body/5-fun-0-'
-'-expanded_memory_body/2-fun-0-'
-'-expanded_memory_body/2-fun-1-'
-'-expanded_memory_body/2-fun-2-'
-'-ports_body/3-fun-0-'
-'-ets_tables_body/4-fun-0-'
-'-internal_ets_tables_table/1-fun-0-'
-'-timers_body/3-fun-0-'
-'-make_nodes_table/2-fun-0-'
-'-loaded_mods_body/5-fun-0-'
-'-funs_body/3-fun-0-'
-'-memory_body/3-fun-0-'
-'-allocated_areas_body/3-fun-0-'
-'-allocator_info_body/3-fun-0-'
-'-allocator_info_body/3-fun-1-'
-'-allocator_info_body/3-fun-2-'
-'-hash_tables_body/3-fun-0-'
-'-index_tables_body/3-fun-0-'
-enter_write_file
-replace_insrt
-'$insrt'
-special
-initial
-pretty_format
-heading
-to_gt_noreverse
-to_gt
-href_proc_port
-br
-font
-h2
-h1
-img
-href
-pre
-em
-td
-th
-tr
-frame
-frameset
-html_header
-index_tables_table
-index_tables_body
-hash_tables_table
-hash_tables_body
-allocator_info_body \ No newline at end of file
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms
deleted file mode 100644
index ce3e5d8228..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms
+++ /dev/null
@@ -1,13285 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
-zombies
-http_content_length
-http_content_type
-'-procs_summary_body/5-fun-0-'
-'-expanded_memory_body/2-fun-0-'
-'-expanded_memory_body/2-fun-1-'
-'-expanded_memory_body/2-fun-2-'
-'-ports_body/3-fun-0-'
-'-ets_tables_body/4-fun-0-'
-'-internal_ets_tables_table/1-fun-0-'
-'-timers_body/3-fun-0-'
-'-make_nodes_table/2-fun-0-'
-'-loaded_mods_body/5-fun-0-'
-'-funs_body/3-fun-0-'
-'-memory_body/3-fun-0-'
-'-allocated_areas_body/3-fun-0-'
-'-allocator_info_body/3-fun-0-'
-'-allocator_info_body/3-fun-1-'
-'-allocator_info_body/3-fun-2-'
-'-hash_tables_body/3-fun-0-'
-'-index_tables_body/3-fun-0-'
-enter_write_file
-replace_insrt
-'$insrt'
-special
-initial
-pretty_format
-heading
-to_gt_noreverse
-to_gt
-href_proc_port
-br
-font
-h2
-h1
-img
-href
-pre
-em
-td
-th
-tr
-frame
-frameset
-html_header
-index_tables_table
-index_tables_body
-hash_tables_table
-hash_tables_body
-allocator_info_body
-allocated_areas_table
-allocated_areas_body
-memory_table
-memory_body
-atoms_body
-funs_table
-funs_body
-loaded_mod_details_body
-loaded_mods_table
-loaded_mods_body
-format_extra_info
-format_links_and_monitors
-to_end_par
-break_lines_creation
-maybe_refcount
-nodes_table_row
-nodes_table_heading
-make_nodes_table
-nodes_body
-timers_table
-timers_body
-internal_ets_tables_table1
-internal_ets_tables_table
-ets_tables_table
-ets_tables_body
-ports_table
-ports_body
-expanded_binary_body
-dict_table
-stackdump_table
-msgq_table
-expanded_memory_body
-link_to_read_memory
-display_or_link_to_expand
-proc_details_body
-procs_summary_table
-summary_table_head
-procs_summary_body
-pretty_info_body
-info_body
-error_body
-general_info_body
-format_title
-format_picture
-format_item
-arentState
-format_items
-menu_body
-filename_body
-start_page_frameset
-get_translated_filename_frame_body
-read_file_frame_body
-welcome_body
-http_
-http_te
-http_connection
-http_if_modified_since
-http_referer
-http_accept_encoding
-http_accept
-http_host
-http_user_agent
-'-create_header1/3-fun-0-'
-send_response_old
-transform
-mapfilter
-create_header1
-accept_ranges
-cache_control
-pragma
-trailer
-etag
-retry_after
-content_encoding
-content_language
-content_location
-content_MD5
-content_range
-expires
-transfer_encoding
-get_connection
-bad_args
-send_header
-get_body
-traverse_modules
-formatAbsoluteURI
-removeServer
-formatRequestUri
-tagup_header
-verify_request
-split_lines
-find_content_type
-maybe_remove_nl
-get_persistens
-df
-dm
-dy
-year_day_to_date2
-year_day_to_date
-dty
-day_to_year
-valid_date1
-valid_date
-universal_time_to_local_time
-time_to_seconds
-seconds_to_time
-seconds_to_daystime
-now_to_local_time
-now_to_universal_time
-now_to_datetime
-last_day_of_the_month1
-last_day_of_the_month
-is_leap_year1
-is_leap_year
-gregorian_seconds_to_datetime
-gregorian_days_to_date
-date_to_gregorian_days
-'-parse_trailers/1-lc^0/1-0-'
-'-read_trailer_end/4-fun-0-'
-'-read_trailer_end/4-lc^0/1-0-'
-'-remove_newline/1-fun-0-'
-remove_newline
-close_sleep
-unknown_size
-send_read_status
-handle_read_error
-transfer_coding
-expect
-getTrailerField
-read_trailer
-get_chunk_size
-read_chunked_entity_body
-read_chunk_trailer
-read_trailer_end
-parse_trailers
-parse_chunk_trailer
-body_to_big
-parse_chunked_entity_body
-parse_chunk_size
-read_chunked_entity
-etimedout
-body_too_long
-unknown_coding
-chunked
-read_entity_body2
-no_expect_header
-http_1_0_expect_header
-read_entity_body
-header_too_long
-hsplit \ No newline at end of file
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms
deleted file mode 100644
index 78e301a6c7..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms
+++ /dev/null
@@ -1,13085 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms
deleted file mode 100644
index 9f20ef3e44..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms
+++ /dev/null
@@ -1,13035 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl
index b6665cb70b..5cf719acb1 100644
--- a/lib/observer/test/observer_SUITE.erl
+++ b/lib/observer/test/observer_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,34 +19,35 @@
-module(observer_SUITE).
-include_lib("test_server/include/test_server.hrl").
+-include_lib("wx/include/wx.hrl").
+-include_lib("observer/src/observer_tv.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]).
--export([init_per_testcase/2, end_per_testcase/2]).
+-export([all/0, suite/0,groups/0]).
+-export([init_per_testcase/2, end_per_testcase/2,
+ init_per_group/2, end_per_group/2,
+ init_per_suite/1, end_per_suite/1
+ ]).
%% Test cases
--export([app_file/1]).
+-export([app_file/1, appup_file/1,
+ basic/1, process_win/1, table_win/1
+ ]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
-init_per_testcase(_Case, Config) ->
- Dog = ?t:timetrap(?default_timeout),
- [{watchdog, Dog} | Config].
-
-end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
- [app_file].
+all() ->
+ [app_file, appup_file, {group, gui}].
-groups() ->
- [].
+groups() ->
+ [{gui, [],
+ [basic
+ , process_win, table_win
+ ]
+ }].
init_per_suite(Config) ->
Config.
@@ -54,12 +55,40 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ok.
-init_per_group(_GroupName, Config) ->
- Config.
+init_per_testcase(_Case, Config) ->
+ Dog = ?t:timetrap(?default_timeout),
+ [{watchdog, Dog} | Config].
-end_per_group(_GroupName, Config) ->
- Config.
+end_per_testcase(_Case, Config) ->
+ Dog = ?config(watchdog, Config),
+ ?t:timetrap_cancel(Dog),
+ ok.
+init_per_group(gui, Config) ->
+ try
+ case os:type() of
+ {unix,darwin} ->
+ exit("Can not test on MacOSX");
+ {unix, _} ->
+ io:format("DISPLAY ~s~n", [os:getenv("DISPLAY")]),
+ case ct:get_config(xserver, none) of
+ none -> ignore;
+ Server -> os:putenv("DISPLAY", Server)
+ end;
+ _ -> ignore
+ end,
+ wx:new(),
+ wx:destroy(),
+ Config
+ catch
+ _:undef ->
+ {skipped, "No wx compiled for this platform"};
+ _:Reason ->
+ SkipReason = io_lib:format("Start wx failed: ~p", [Reason]),
+ {skipped, lists:flatten(SkipReason)}
+ end.
+end_per_group(_, _) ->
+ ok.
app_file(suite) ->
[];
@@ -68,3 +97,182 @@ app_file(doc) ->
app_file(Config) when is_list(Config) ->
?line ok = ?t:app_test(observer),
ok.
+
+%% Testing .appup file
+appup_file(Config) when is_list(Config) ->
+ ok = ?t:appup_test(observer).
+
+-define(DBG(Foo), io:format("~p: ~p~n",[?LINE, catch Foo])).
+
+basic(suite) -> [];
+basic(doc) -> [""];
+basic(Config) when is_list(Config) ->
+ timer:send_after(100, "foobar"), %% Otherwise the timer sever gets added to procs
+ ProcsBefore = processes(),
+ NumProcsBefore = length(ProcsBefore),
+
+ ok = observer:start(),
+ Notebook = setup_whitebox_testing(),
+
+ io:format("Notebook ~p~n",[Notebook]),
+ Count = wxNotebook:getPageCount(Notebook),
+ true = Count >= 6,
+ 0 = wxNotebook:getSelection(Notebook),
+ timer:sleep(500),
+ Check = fun(N, TestMore) ->
+ TestMore andalso
+ test_page(wxNotebook:getPageText(Notebook, N),
+ wxNotebook:getCurrentPage(Notebook)),
+ timer:sleep(200),
+ ok = wxNotebook:advanceSelection(Notebook)
+ end,
+ %% Just verify that we can toogle trough all pages
+ [_|_] = [Check(N, false) || N <- lists:seq(1, Count)],
+ %% Cause it to resize
+ Frame = get_top_level_parent(Notebook),
+ {W,H} = wxWindow:getSize(Frame),
+ wxWindow:setSize(Frame, W+10, H+10),
+ [_|_] = [Check(N, true) || N <- lists:seq(0, Count-1)],
+
+ ok = observer:stop(),
+ timer:sleep(2000), %% stop is async
+ ProcsAfter = processes(),
+ NumProcsAfter = length(ProcsAfter),
+ if NumProcsAfter=/=NumProcsBefore ->
+ ct:log("Before but not after:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsBefore -- ProcsAfter]]),
+ ct:log("After but not before:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsAfter -- ProcsBefore]]),
+ ct:fail("leaking processes");
+ true ->
+ ok
+ end,
+ ok.
+
+test_page("Load Charts" ++ _, _Window) ->
+ %% Just let it display some info and hopefully it doesn't crash
+ timer:sleep(2000),
+ ok;
+test_page("Applications" ++ _, _Window) ->
+ ok = application:start(mnesia),
+ timer:sleep(1000), %% Give it time to refresh
+ Active = get_active(),
+ FakeEv = #wx{event=#wxCommand{type=command_listbox_selected, cmdString="mnesia"}},
+ Active ! FakeEv,
+ timer:sleep(1000), %% Give it time to refresh
+ ok = application:stop(mnesia),
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page("Processes" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ 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,5) ++ [0]],
+ Focus = #wx{event=#wxList{type=command_list_item_focused, itemIndex=2}},
+ Active ! Focus,
+ Activate = #wx{event=#wxList{type=command_list_item_activated}},
+ Active ! Activate,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page(_Title = "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)]),
+
+ 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,5) ++ [0]],
+ timer:sleep(1000),
+ Focus = #wx{event=#wxList{type=command_list_item_selected, itemIndex=2}},
+ Active ! Focus,
+ Activate = #wx{event=#wxList{type=command_list_item_activated, itemIndex=2}},
+ Active ! Activate,
+
+ Info = 407, %% whitebox...
+ Active ! #wx{id=Info},
+ timer:sleep(1000),
+ 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
+ timer:sleep(1000),
+ ok.
+
+
+process_win(suite) -> [];
+process_win(doc) -> [""];
+process_win(Config) when is_list(Config) ->
+ ok = observer:start(),
+ ObserverNB = setup_whitebox_testing(),
+ Parent = get_top_level_parent(ObserverNB),
+ Frame = observer_procinfo:start(self(), Parent, self()),
+ PIPid = wx_object:get_pid(Frame),
+ PIPid ! {get_debug_info, self()},
+ Notebook = receive {procinfo_debug, NB} -> NB end,
+ Count = wxNotebook:getPageCount(Notebook),
+ Check = fun(_N) ->
+ ok = wxNotebook:advanceSelection(Notebook),
+ timer:sleep(400)
+ end,
+ [_|_] = [Check(N) || N <- lists:seq(1, Count)],
+ PIPid ! #wx{event=#wxClose{type=close_window}},
+ observer:stop(),
+ ok.
+
+table_win(suite) -> [];
+table_win(doc) -> [""];
+table_win(Config) when is_list(Config) ->
+ 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)]),
+ ok = observer:start(),
+ Notebook = setup_whitebox_testing(),
+ Parent = get_top_level_parent(Notebook),
+ TObj = observer_tv_table:start_link(Parent, [{node,node()}, {type,ets}, {table,#tab{name=foo, id=Table}}]),
+ %% Modal can not test edit..
+ %% TPid = wx_object:get_pid(TObj),
+ %% TPid ! #wx{event=#wxList{type=command_list_item_activated, itemIndex=12}},
+ timer:sleep(3000),
+ wx_object:get_pid(TObj) ! #wx{event=#wxClose{type=close_window}},
+ observer:stop(),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+get_top_level_parent(Window) ->
+ Parent = wxWindow:getParent(Window),
+ case wx:is_null(Parent) of
+ true -> Window;
+ false -> get_top_level_parent(Parent)
+ end.
+
+setup_whitebox_testing() ->
+ %% So that if we die observer exists
+ link(whereis(observer)),
+ {Env, Notebook, _Active} = get_observer_debug(),
+ wx:set_env(Env),
+ Notebook.
+
+get_active() ->
+ {_, _, Active} = get_observer_debug(),
+ Active.
+
+get_observer_debug() ->
+ observer ! {get_debug_info, self()},
+ receive
+ {observer_debug, Env, Notebook, Active} ->
+ {Env, Notebook, Active}
+ end.
diff --git a/lib/observer/vsn.mk b/lib/observer/vsn.mk
index f48809a839..10ed3bdfe5 100644
--- a/lib/observer/vsn.mk
+++ b/lib/observer/vsn.mk
@@ -1 +1 @@
-OBSERVER_VSN = 1.3.1.2
+OBSERVER_VSN = 2.0.4
diff --git a/lib/odbc/aclocal.m4 b/lib/odbc/aclocal.m4
deleted file mode 100644
index 46b30a16b3..0000000000
--- a/lib/odbc/aclocal.m4
+++ /dev/null
@@ -1,1914 +0,0 @@
-dnl
-dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 1998-2013. All Rights Reserved.
-dnl
-dnl The contents of this file are subject to the Erlang Public License,
-dnl Version 1.1, (the "License"); you may not use this file except in
-dnl compliance with the License. You should have received a copy of the
-dnl Erlang Public License along with this software. If not, it can be
-dnl retrieved online at http://www.erlang.org/.
-dnl
-dnl Software distributed under the License is distributed on an "AS IS"
-dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-dnl the License for the specific language governing rights and limitations
-dnl under the License.
-dnl
-dnl %CopyrightEnd%
-dnl
-
-dnl
-dnl aclocal.m4
-dnl
-dnl Local macros used in configure.in. The Local Macros which
-dnl could/should be part of autoconf are prefixed LM_, macros specific
-dnl to the Erlang system are prefixed ERL_.
-dnl
-
-AC_DEFUN(LM_PRECIOUS_VARS,
-[
-
-dnl ERL_TOP
-AC_ARG_VAR(ERL_TOP, [Erlang/OTP top source directory])
-
-dnl Tools
-AC_ARG_VAR(CC, [C compiler])
-AC_ARG_VAR(CFLAGS, [C compiler flags])
-AC_ARG_VAR(STATIC_CFLAGS, [C compiler static flags])
-AC_ARG_VAR(CFLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag passed via C compiler])
-AC_ARG_VAR(CPP, [C/C++ preprocessor])
-AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
-AC_ARG_VAR(CXX, [C++ compiler])
-AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
-AC_ARG_VAR(LD, [linker (is often overridden by configure)])
-AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
-AC_ARG_VAR(LIBS, [libraries])
-AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LD_FLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(LFS_CFLAGS, [large file support C compiler flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LDFLAGS, [large file support linker flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LIBS, [large file support libraries (set all LFS_* variables or none)])
-AC_ARG_VAR(RANLIB, [ranlib])
-AC_ARG_VAR(AR, [ar])
-AC_ARG_VAR(GETCONF, [getconf])
-
-dnl Cross system root
-AC_ARG_VAR(erl_xcomp_sysroot, [Absolute cross system root path (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_isysroot, [Absolute cross system root include path (only used when cross compiling)])
-
-dnl Cross compilation variables
-AC_ARG_VAR(erl_xcomp_bigendian, [big endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_double_middle_endian, [double-middle-endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_clock_gettime_correction, [clock_gettime() can be used for time correction: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_nptl, [have Native POSIX Thread Library: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigusrx, [SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigaltstack, [have working sigaltstack(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_poll, [have working poll(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_kqueue, [have working kqueue(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_putenv_copy, [putenv() stores key-value copy: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_reliable_fpe, [have reliable floating point exceptions: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_getaddrinfo, [have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_gethrvtime_procfs_ioctl, [have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-
-])
-
-AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
-[
-erl_xcomp_without_sysroot=no
-if test "$cross_compiling" = "yes"; then
- test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
- test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
-else
- erl_xcomp_sysroot=
- erl_xcomp_isysroot=
-fi
-])
-
-AC_DEFUN(LM_CHECK_GETCONF,
-[
-if test "$cross_compiling" != "yes"; then
- AC_CHECK_PROG([GETCONF], [getconf], [getconf], [false])
-else
- dnl First check if we got a `<HOST>-getconf' in $PATH
- host_getconf="$host_alias-getconf"
- AC_CHECK_PROG([GETCONF], [$host_getconf], [$host_getconf], [false])
- if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
- dnl We should perhaps give up if we have'nt found it by now, but at
- dnl least in one Tilera MDE `getconf' under sysroot is a bourne
- dnl shell script which we can use. We try to find `<HOST>-getconf'
- dnl or `getconf' under sysconf, but only under sysconf since
- dnl `getconf' in $PATH is almost guaranteed to be for the build
- dnl machine.
- GETCONF=
- prfx="$erl_xcomp_sysroot"
- AC_PATH_TOOL([GETCONF], [getconf], [false],
- ["$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"])
- fi
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_WINDOWS_ENVIRONMENT
-dnl
-dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
-dnl
-
-AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
-[
-MIXED_CYGWIN=no
-MIXED_MSYS=no
-
-AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
-if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- elif test -x /usr/bin/msysinfo; then
- CFLAGS="-O2"
- MIXED_MSYS=yes
- AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
-else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
-fi
-
-AC_SUBST(MIXED_VC)
-
-if test "x$MIXED_MSYS" != "xyes"; then
- AC_MSG_CHECKING(for mixed cygwin and native MinGW environment)
- if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
- else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
- fi
-else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
-
-AC_MSG_CHECKING(if we mix cygwin with any native compiler)
-if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_CYGWIN)
-
-AC_MSG_CHECKING(if we mix msys with another native compiler)
-if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_MSYS)
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_FIND_EMU_CC
-dnl
-dnl
-dnl Tries fairly hard to find a C compiler that can handle jump tables.
-dnl Defines the @EMU_CC@ variable for the makefiles and
-dnl inserts NO_JUMP_TABLE in the header if one cannot be found...
-dnl
-
-AC_DEFUN(LM_FIND_EMU_CC,
- [AC_CACHE_CHECK(for a compiler that handles jumptables,
- ac_cv_prog_emu_cc,
- [
-AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
-lbl1:
- return 1;
-lbl2:
- return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
-
-if test $ac_cv_prog_emu_cc = no; then
- for ac_progname in emu_cc.sh gcc-4.2 gcc; do
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
- break
- fi
- done
-fi
-
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
- CFLAGS=""
- CPPFLAGS=""
- AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
- lbl1:
- return 1;
- lbl2:
- return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
- CC=$save_CC
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-])
-if test $ac_cv_prog_emu_cc = no; then
- AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
-else
- EMU_CC=$ac_cv_prog_emu_cc
-fi
-AC_SUBST(EMU_CC)
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_INSTALL_DIR
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl Figure out how to create directories with parents.
-dnl (In my opinion INSTALL_DIR is a bad name, MKSUBDIRS or something is better)
-dnl
-dnl We prefer 'install -d', but use 'mkdir -p' if it exists.
-dnl If none of these methods works, we give up.
-dnl
-
-
-AC_DEFUN(LM_PROG_INSTALL_DIR,
-[AC_CACHE_CHECK(how to create a directory including parents,
-ac_cv_prog_mkdir_p,
-[
-temp_name_base=config.$$
-temp_name=$temp_name_base/x/y/z
-$INSTALL -d $temp_name >/dev/null 2>&1
-ac_cv_prog_mkdir_p=none
-if test -d $temp_name; then
- ac_cv_prog_mkdir_p="$INSTALL -d"
-else
- mkdir -p $temp_name >/dev/null 2>&1
- if test -d $temp_name; then
- ac_cv_prog_mkdir_p="mkdir -p"
- fi
-fi
-rm -fr $temp_name_base
-])
-
-case "${ac_cv_prog_mkdir_p}" in
- none) AC_MSG_ERROR(don't know how create directories with parents) ;;
- *) INSTALL_DIR="$ac_cv_prog_mkdir_p" AC_SUBST(INSTALL_DIR) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_PERL5
-dnl
-dnl Try to find perl version 5. If found set PERL to the absolute path
-dnl of the program, if not found set PERL to false.
-dnl
-dnl On some systems /usr/bin/perl is perl 4 and e.g.
-dnl /usr/local/bin/perl is perl 5. We try to handle this case by
-dnl putting a couple of
-dnl Tries to handle the case that there are two programs called perl
-dnl in the path and one of them is perl 5 and the other isn't.
-dnl
-AC_DEFUN(LM_PROG_PERL5,
-[AC_PATH_PROGS(PERL, perl5 perl, false,
- /usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH})
-changequote(, )dnl
-dnl[ That bracket is needed to balance the right bracket below
-if test "$PERL" = "false" || $PERL -e 'exit ($] >= 5)'; then
-changequote([, ])dnl
- ac_cv_path_PERL=false
- PERL=false
-dnl AC_MSG_WARN(perl version 5 not found)
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SO_BSDCOMPAT
-dnl
-dnl Check if the system has the SO_BSDCOMPAT flag on sockets (linux)
-dnl
-AC_DEFUN(LM_DECL_SO_BSDCOMPAT,
-[AC_CACHE_CHECK([for SO_BSDCOMPAT declaration], ac_cv_decl_so_bsdcompat,
-AC_TRY_COMPILE([#include <sys/socket.h>], [int i = SO_BSDCOMPAT;],
- ac_cv_decl_so_bsdcompat=yes,
- ac_cv_decl_so_bsdcompat=no))
-
-case "${ac_cv_decl_so_bsdcompat}" in
- "yes" ) AC_DEFINE(HAVE_SO_BSDCOMPAT,[],
- [Define if you have SO_BSDCOMPAT flag on sockets]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_INADDR_LOOPBACK
-dnl
-dnl Try to find declaration of INADDR_LOOPBACK, if nowhere provide a default
-dnl
-
-AC_DEFUN(LM_DECL_INADDR_LOOPBACK,
-[AC_CACHE_CHECK([for INADDR_LOOPBACK in netinet/in.h],
- ac_cv_decl_inaddr_loopback,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>], [int i = INADDR_LOOPBACK;],
-ac_cv_decl_inaddr_loopback=yes, ac_cv_decl_inaddr_loopback=no)
-])
-
-if test ${ac_cv_decl_inaddr_loopback} = no; then
- AC_CACHE_CHECK([for INADDR_LOOPBACK in rpc/types.h],
- ac_cv_decl_inaddr_loopback_rpc,
- AC_TRY_COMPILE([#include <rpc/types.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_rpc=yes,
- ac_cv_decl_inaddr_loopback_rpc=no))
-
- case "${ac_cv_decl_inaddr_loopback_rpc}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H,[],
- [Define if you need to include rpc/types.h to get INADDR_LOOPBACK defined]) ;;
- * )
- AC_CACHE_CHECK([for INADDR_LOOPBACK in winsock2.h],
- ac_cv_decl_inaddr_loopback_winsock2,
- AC_TRY_COMPILE([#define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_winsock2=yes,
- ac_cv_decl_inaddr_loopback_winsock2=no))
- case "${ac_cv_decl_inaddr_loopback_winsock2}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_WINSOCK2_H,[],
- [Define if you need to include winsock2.h to get INADDR_LOOPBACK defined]) ;;
- * )
- # couldn't find it anywhere
- AC_DEFINE(HAVE_NO_INADDR_LOOPBACK,[],
- [Define if you don't have a definition of INADDR_LOOPBACK]) ;;
- esac;;
- esac
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_SOCKADDR_SA_LEN
-dnl
-dnl Check if the sockaddr structure has the field sa_len
-dnl
-
-AC_DEFUN(LM_STRUCT_SOCKADDR_SA_LEN,
-[AC_CACHE_CHECK([whether struct sockaddr has sa_len field],
- ac_cv_struct_sockaddr_sa_len,
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>], [struct sockaddr s; s.sa_len = 10;],
- ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no))
-
-dnl FIXME convbreak
-case ${ac_cv_struct_sockaddr_sa_len} in
- "no" ) AC_DEFINE(NO_SA_LEN,[1],[Define if you dont have salen]) ;;
- *) ;;
-esac
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_EXCEPTION
-dnl
-dnl Check to see whether the system supports the matherr function
-dnl and its associated type "struct exception".
-dnl
-
-AC_DEFUN(LM_STRUCT_EXCEPTION,
-[AC_CACHE_CHECK([for struct exception (and matherr function)],
- ac_cv_struct_exception,
-AC_TRY_COMPILE([#include <math.h>],
- [struct exception x; x.type = DOMAIN; x.type = SING;],
- ac_cv_struct_exception=yes, ac_cv_struct_exception=no))
-
-case "${ac_cv_struct_exception}" in
- "yes" ) AC_DEFINE(USE_MATHERR,[1],[Define if you have matherr() function and struct exception type]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_IPV6
-dnl
-dnl Check for ipv6 support and what the in6_addr structure is called.
-dnl (early linux used in_addr6 insted of in6_addr)
-dnl
-
-AC_DEFUN(LM_SYS_IPV6,
-[AC_MSG_CHECKING(for IP version 6 support)
-AC_CACHE_VAL(ac_cv_sys_ipv6_support,
-[ok_so_far=yes
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in6_addr a6; struct sockaddr_in6 s6;], ok_so_far=yes, ok_so_far=no)
-
-if test $ok_so_far = yes; then
- ac_cv_sys_ipv6_support=yes
-else
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in_addr6 a6; struct sockaddr_in6 s6;],
- ac_cv_sys_ipv6_support=in_addr6, ac_cv_sys_ipv6_support=no)
-fi
-])dnl
-
-dnl
-dnl Have to use old style AC_DEFINE due to BC with old autoconf.
-dnl
-
-case ${ac_cv_sys_ipv6_support} in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- ;;
- in_addr6)
- AC_MSG_RESULT([yes (but I am redefining in_addr6 to in6_addr)])
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- AC_DEFINE(HAVE_IN_ADDR6_STRUCT,[],[Early linux used in_addr6 instead of in6_addr, define if you have this])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_MULTICAST
-dnl
-dnl Check for multicast support. Only checks for multicast options in
-dnl setsockopt(), no check is performed that multicasting actually works.
-dnl If options are found defines HAVE_MULTICAST_SUPPORT
-dnl
-
-AC_DEFUN(LM_SYS_MULTICAST,
-[AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support,
-[AC_EGREP_CPP(yes,
-[#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP)
-yes
-#endif
-], ac_cv_sys_multicast_support=yes, ac_cv_sys_multicast_support=no)])
-if test $ac_cv_sys_multicast_support = yes; then
- AC_DEFINE(HAVE_MULTICAST_SUPPORT,[1],
- [Define if setsockopt() accepts multicast options])
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SYS_ERRLIST
-dnl
-dnl Define SYS_ERRLIST_DECLARED if the variable sys_errlist is declared
-dnl in a system header file, stdio.h or errno.h.
-dnl
-
-AC_DEFUN(LM_DECL_SYS_ERRLIST,
-[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h or errno.h],
- ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#include <errno.h>], [char *msg = *(sys_errlist + 1);],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-if test $ac_cv_decl_sys_errlist = yes; then
- AC_DEFINE(SYS_ERRLIST_DECLARED,[],
- [define if the variable sys_errlist is declared in a system header file])
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_FUNC_DECL( funname, declaration [, extra includes
-dnl [, action-if-found [, action-if-not-found]]] )
-dnl
-dnl Checks if the declaration "declaration" of "funname" conflicts
-dnl with the header files idea of how the function should be
-dnl declared. It is useful on systems which lack prototypes and you
-dnl need to provide your own (e.g. when you want to take the address
-dnl of a function). The 4'th argument is expanded if conflicting,
-dnl the 5'th argument otherwise
-dnl
-dnl
-
-AC_DEFUN(LM_CHECK_FUNC_DECL,
-[AC_MSG_CHECKING([for conflicting declaration of $1])
-AC_CACHE_VAL(ac_cv_func_decl_$1,
-[AC_TRY_COMPILE([#include <stdio.h>
-$3],[$2
-char *c = (char *)$1;
-], eval "ac_cv_func_decl_$1=no", eval "ac_cv_func_decl_$1=yes")])
-if eval "test \"`echo '$ac_cv_func_decl_'$1`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$4], , :, [$4])
-else
- AC_MSG_RESULT(no)
-ifelse([$5], , , [$5
-])dnl
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl AC_DOUBLE_MIDDLE_ENDIAN
-dnl
-dnl Checks whether doubles are represented in "middle-endian" format.
-dnl Sets ac_cv_double_middle_endian={no,yes,unknown} accordingly,
-dnl as well as DOUBLE_MIDDLE_ENDIAN.
-dnl
-dnl
-
-AC_DEFUN([AC_C_DOUBLE_MIDDLE_ENDIAN],
-[AC_CACHE_CHECK(whether double word ordering is middle-endian, ac_cv_c_double_middle_endian,
-[# It does not; compile a test program.
-AC_RUN_IFELSE(
-[AC_LANG_SOURCE([[#include <stdlib.h>
-
-int
-main(void)
-{
- int i = 0;
- int zero = 0;
- int bigendian;
- int zero_index = 0;
-
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
-
- /* we'll use the one with 32-bit words */
- union
- {
- double d;
- unsigned int c[2];
- } vint;
-
- union
- {
- double d;
- unsigned long c[2];
- } vlong;
-
- union
- {
- double d;
- unsigned short c[2];
- } vshort;
-
-
- /* Are we little or big endian? From Harbison&Steele. */
- u.l = 1;
- bigendian = (u.c[sizeof (long int) - 1] == 1);
-
- zero_index = bigendian ? 1 : 0;
-
- vint.d = 1.0;
- vlong.d = 1.0;
- vshort.d = 1.0;
-
- if (sizeof(unsigned int) == 4)
- {
- if (vint.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned long) == 4)
- {
- if (vlong.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned short) == 4)
- {
- if (vshort.c[zero_index] != 0)
- zero = 1;
- }
-
- exit (zero);
-}
-]])],
- [ac_cv_c_double_middle_endian=no],
- [ac_cv_c_double_middle_endian=yes],
- [ac_cv_c_double_middle=unknown])])
-case $ac_cv_c_double_middle_endian in
- yes)
- m4_default([$1],
- [AC_DEFINE([DOUBLE_MIDDLE_ENDIAN], 1,
- [Define to 1 if your processor stores the words in a double in
- middle-endian format (like some ARMs).])]) ;;
- no)
- $2 ;;
- *)
- m4_default([$3],
- [AC_MSG_WARN([unknown double endianness
-presetting ac_cv_c_double_middle_endian=no (or yes) will help])]) ;;
-esac
-])# AC_C_DOUBLE_MIDDLE_ENDIAN
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_THR_LIB
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl LM_CHECK_THR_LIB sets THR_LIBS, THR_DEFS, and THR_LIB_NAME. It also
-dnl checks for some pthread headers which will appear in DEFS or config.h.
-dnl
-
-AC_DEFUN(LM_CHECK_THR_LIB,
-[
-
-NEED_NPTL_PTHREAD_H=no
-
-dnl win32?
-AC_MSG_CHECKING([for native win32 threads])
-if test "X$host_os" = "Xwin32"; then
- AC_MSG_RESULT(yes)
- THR_DEFS="-DWIN32_THREADS"
- THR_LIBS=
- THR_LIB_NAME=win32_threads
- THR_LIB_TYPE=win32_threads
-else
- AC_MSG_RESULT(no)
- THR_DEFS=
- THR_LIBS=
- THR_LIB_NAME=
- THR_LIB_TYPE=posix_unknown
-
-dnl Try to find POSIX threads
-
-dnl The usual pthread lib...
- AC_CHECK_LIB(pthread, pthread_create, THR_LIBS="-lpthread")
-
-dnl Very old versions of FreeBSD have pthreads in special c library, c_r...
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_LIB(c_r, pthread_create, THR_LIBS="-lc_r")
- fi
-
-dnl QNX has pthreads in standard C library
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_FUNC(pthread_create, THR_LIBS="none_needed")
- fi
-
-dnl On ofs1 the '-pthread' switch should be used
- if test "x$THR_LIBS" = "x"; then
- AC_MSG_CHECKING([if the '-pthread' switch can be used])
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -pthread"
- AC_TRY_LINK([#include <pthread.h>],
- pthread_create((void*)0,(void*)0,(void*)0,(void*)0);,
- [THR_DEFS="-pthread"
- THR_LIBS="-pthread"])
- CFLAGS=$saved_cflags
- if test "x$THR_LIBS" != "x"; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
- if test "x$THR_LIBS" != "x"; then
- THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
- THR_LIB_NAME=pthread
- if test "x$THR_LIBS" = "xnone_needed"; then
- THR_LIBS=
- fi
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
- linux*)
- THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
-
- LM_CHECK_GETCONF
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
- if test $? -eq 0; then
- case "$libpthr_vsn" in
- *nptl*|*NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- elif test "$cross_compiling" = "yes"; then
- case "$erl_xcomp_linux_nptl" in
- "") nptl=cross;;
- yes|no) nptl=$erl_xcomp_linux_nptl;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl]);;
- esac
- else
- nptl=no
- fi
- AC_MSG_RESULT($nptl)
- if test $nptl = cross; then
- nptl=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $nptl = yes; then
- THR_LIB_TYPE=posix_nptl
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h,
- [need_nptl_incldir=yes
- NEED_NPTL_PTHREAD_H=yes])
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH"
- if test X$cross_compiling != Xyes; then
- nptl_path="$nptl_path:/usr/local/include:/usr/include"
- else
- IROOT="$erl_xcomp_isysroot"
- test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
- test "$IROOT" != "" || AC_MSG_ERROR([Don't know where to search for includes! Please set erl_xcomp_isysroot])
- nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
- fi
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need THR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $THR_DEFS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h,
- AC_DEFINE(HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- fi
-fi
-
-])
-
-AC_DEFUN(ERL_INTERNAL_LIBS,
-[
-
-ERTS_INTERNAL_X_LIBS=
-
-AC_CHECK_LIB(kstat, kstat_open,
-[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat])
-ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"])
-
-AC_SUBST(ERTS_INTERNAL_X_LIBS)
-
-])
-
-AC_DEFUN(ETHR_CHK_SYNC_OP,
-[
- AC_MSG_CHECKING([for $3-bit $1()])
- case "$2" in
- "1") sync_call="$1(&var);";;
- "2") sync_call="$1(&var, ($4) 0);";;
- "3") sync_call="$1(&var, ($4) 0, ($4) 0);";;
- esac
- have_sync_op=no
- AC_TRY_LINK([],
- [
- $4 res;
- volatile $4 var;
- res = $sync_call
- ],
- [have_sync_op=yes])
- test $have_sync_op = yes && $5
- AC_MSG_RESULT([$have_sync_op])
-])
-
-AC_DEFUN(ETHR_CHK_INTERLOCKED,
-[
- ilckd="$1"
- AC_MSG_CHECKING([for ${ilckd}()])
- case "$2" in
- "1") ilckd_call="${ilckd}(var);";;
- "2") ilckd_call="${ilckd}(var, ($3) 0);";;
- "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";;
- "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";;
- esac
- have_interlocked_op=no
- AC_TRY_LINK(
- [
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <intrin.h>
- ],
- [
- volatile $3 *var;
- volatile $3 arr[2];
-
- $ilckd_call
- return 0;
- ],
- [have_interlocked_op=yes])
- test $have_interlocked_op = yes && $4
- AC_MSG_RESULT([$have_interlocked_op])
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_FIND_ETHR_LIB
-dnl
-dnl NOTE! This macro may be changed at any time! Should *only* be used by
-dnl ERTS!
-dnl
-dnl Find a thread library to use. Sets ETHR_LIBS to libraries to link
-dnl with, ETHR_X_LIBS to extra libraries to link with (same as ETHR_LIBS
-dnl except that the ethread lib itself is not included), ETHR_DEFS to
-dnl defines to compile with, ETHR_THR_LIB_BASE to the name of the
-dnl thread library which the ethread library is based on, and ETHR_LIB_NAME
-dnl to the name of the library where the ethread implementation is located.
-dnl ERL_FIND_ETHR_LIB currently searches for 'pthreads', and
-dnl 'win32_threads'. If no thread library was found ETHR_LIBS, ETHR_X_LIBS,
-dnl ETHR_DEFS, ETHR_THR_LIB_BASE, and ETHR_LIB_NAME are all set to the
-dnl empty string.
-dnl
-
-AC_DEFUN(ERL_FIND_ETHR_LIB,
-[
-
-AC_ARG_ENABLE(native-ethr-impls,
- AS_HELP_STRING([--disable-native-ethr-impls],
- [disable native ethread implementations]),
-[ case "$enableval" in
- no) disable_native_ethr_impls=yes ;;
- *) disable_native_ethr_impls=no ;;
- esac ], disable_native_ethr_impls=no)
-
-test "X$disable_native_ethr_impls" = "Xyes" &&
- AC_DEFINE(ETHR_DISABLE_NATIVE_IMPLS, 1, [Define if you want to disable native ethread implementations])
-
-AC_ARG_ENABLE(x86-out-of-order,
- AS_HELP_STRING([--enable-x86-out-of-order],
- [enable x86/x84_64 out of order support (default disabled)]))
-
-AC_ARG_ENABLE(prefer-gcc-native-ethr-impls,
- AS_HELP_STRING([--enable-prefer-gcc-native-ethr-impls],
- [prefer gcc native ethread implementations]),
-[ case "$enableval" in
- yes) enable_prefer_gcc_native_ethr_impls=yes ;;
- *) enable_prefer_gcc_native_ethr_impls=no ;;
- esac ], enable_prefer_gcc_native_ethr_impls=no)
-
-test $enable_prefer_gcc_native_ethr_impls = yes &&
- AC_DEFINE(ETHR_PREFER_GCC_NATIVE_IMPLS, 1, [Define if you prefer gcc native ethread implementations])
-
-AC_ARG_WITH(libatomic_ops,
- AS_HELP_STRING([--with-libatomic_ops=PATH],
- [specify and prefer usage of libatomic_ops in the ethread library]))
-
-AC_ARG_WITH(with_sparc_memory_order,
- AS_HELP_STRING([--with-sparc-memory-order=TSO|PSO|RMO],
- [specify sparc memory order (defaults to RMO)]))
-
-LM_CHECK_THR_LIB
-ERL_INTERNAL_LIBS
-
-ethr_have_native_atomics=no
-ethr_have_native_spinlock=no
-ETHR_THR_LIB_BASE="$THR_LIB_NAME"
-ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
-ETHR_DEFS="$THR_DEFS"
-ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
-ETHR_LIBS=
-ETHR_LIB_NAME=
-
-ethr_modified_default_stack_size=
-
-dnl Name of lib where ethread implementation is located
-ethr_lib_name=ethread
-
-case "$THR_LIB_NAME" in
-
- win32_threads)
- ETHR_THR_LIB_BASE_DIR=win
- # * _WIN32_WINNT >= 0x0400 is needed for
- # TryEnterCriticalSection
- # * _WIN32_WINNT >= 0x0403 is needed for
- # InitializeCriticalSectionAndSpinCount
- # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
- #
- # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
- # and save it in ETHR_DEFS.
- found_win32_winnt=no
- for cppflag in $CPPFLAGS; do
- case $cppflag in
- -DWINVER*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- ;;
- -D_WIN32_WINNT*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- found_win32_winnt=yes
- ;;
- *)
- ;;
- esac
- done
- if test $found_win32_winnt = no; then
- AC_MSG_ERROR([-D_WIN32_WINNT missing in CPPFLAGS])
- fi
-
- AC_DEFINE(ETHR_WIN32_THREADS, 1, [Define if you have win32 threads])
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- have_interlocked_op=no
- ethr_have_native_atomics=no
- else
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT, 1, [Define if you have _InterlockedDecrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement_rel], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT_REL, 1, [Define if you have _InterlockedDecrement_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT, 1, [Define if you have _InterlockedIncrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement_acq], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ, 1, [Define if you have _InterlockedIncrement_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD, 1, [Define if you have _InterlockedExchangeAdd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd_acq], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ, 1, [Define if you have _InterlockedExchangeAdd_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64_acq], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ, 1, [Define if you have _InterlockedIncrement64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64, 1, [Define if you have _InterlockedExchangeAdd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64_acq], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ, 1, [Define if you have _InterlockedExchangeAdd64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()]))
- fi
- test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
- ;;
-
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
- case $host_os in
- openbsd*)
- # The default stack size is insufficient for our needs
- # on OpenBSD. We increase it to 256 kilo words.
- ethr_modified_default_stack_size=256;;
- linux*)
- ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
-
- if test X$cross_compiling = Xyes; then
- case X$erl_xcomp_linux_usable_sigusrx in
- X) usable_sigusrx=cross;;
- Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx]);;
- esac
- case X$erl_xcomp_linux_usable_sigaltstack in
- X) usable_sigaltstack=cross;;
- Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack]);;
- esac
- else
- # FIXME: Test for actual problems instead of kernel versions
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- usable_sigusrx=no
- usable_sigaltstack=no;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- usable_sigaltstack=no;;
- *)
- usable_sigusrx=yes
- usable_sigaltstack=yes;;
- esac
- fi
-
- AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
- AC_MSG_RESULT($usable_sigusrx)
- if test $usable_sigusrx = cross; then
- usable_sigusrx=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigusrx = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
- fi
-
- AC_MSG_CHECKING(if sigaltstack can be used)
- AC_MSG_RESULT($usable_sigaltstack)
- if test $usable_sigaltstack = cross; then
- usable_sigaltstack=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigaltstack = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need ETHR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
-
- dnl We need the thread library in order to find some functions
- saved_libs="$LIBS"
- LIBS="$LIBS $ETHR_X_LIBS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(ETHR_HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- if test $NEED_NPTL_PTHREAD_H = yes; then
- AC_DEFINE(ETHR_NEED_NPTL_PTHREAD_H, 1, \
-[Define if you need the <nptl/pthread.h> header file.])
- fi
-
- AC_CHECK_HEADER(sched.h, \
- AC_DEFINE(ETHR_HAVE_SCHED_H, 1, \
-[Define if you have the <sched.h> header file.]))
-
- AC_CHECK_HEADER(sys/time.h, \
- AC_DEFINE(ETHR_HAVE_SYS_TIME_H, 1, \
-[Define if you have the <sys/time.h> header file.]))
-
- AC_TRY_COMPILE([#include <time.h>
- #include <sys/time.h>],
- [struct timeval *tv; return 0;],
- AC_DEFINE(ETHR_TIME_WITH_SYS_TIME, 1, \
-[Define if you can safely include both <sys/time.h> and <time.h>.]))
-
-
- dnl
- dnl Check for functions
- dnl
-
- AC_CHECK_FUNC(pthread_spin_lock, \
- [ethr_have_native_spinlock=yes \
- AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
-[Define if you have the pthread_spin_lock function.])])
-
- have_sched_yield=no
- have_librt_sched_yield=no
- AC_CHECK_FUNC(sched_yield, [have_sched_yield=yes])
- if test $have_sched_yield = no; then
- AC_CHECK_LIB(rt, sched_yield,
- [have_librt_sched_yield=yes
- ETHR_X_LIBS="$ETHR_X_LIBS -lrt"])
- fi
- if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
- AC_DEFINE(ETHR_HAVE_SCHED_YIELD, 1, [Define if you have the sched_yield() function.])
- AC_MSG_CHECKING([whether sched_yield() returns an int])
- sched_yield_ret_int=no
- AC_TRY_COMPILE([
- #ifdef ETHR_HAVE_SCHED_H
- #include <sched.h>
- #endif
- ],
- [int sched_yield();],
- [sched_yield_ret_int=yes])
- AC_MSG_RESULT([$sched_yield_ret_int])
- if test $sched_yield_ret_int = yes; then
- AC_DEFINE(ETHR_SCHED_YIELD_RET_INT, 1, [Define if sched_yield() returns an int.])
- fi
- fi
-
- have_pthread_yield=no
- AC_CHECK_FUNC(pthread_yield, [have_pthread_yield=yes])
- if test $have_pthread_yield = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_YIELD, 1, [Define if you have the pthread_yield() function.])
- AC_MSG_CHECKING([whether pthread_yield() returns an int])
- pthread_yield_ret_int=no
- AC_TRY_COMPILE([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [int pthread_yield();],
- [pthread_yield_ret_int=yes])
- AC_MSG_RESULT([$pthread_yield_ret_int])
- if test $pthread_yield_ret_int = yes; then
- AC_DEFINE(ETHR_PTHREAD_YIELD_RET_INT, 1, [Define if pthread_yield() returns an int.])
- fi
- fi
-
- have_pthread_rwlock_init=no
- AC_CHECK_FUNC(pthread_rwlock_init, [have_pthread_rwlock_init=yes])
- if test $have_pthread_rwlock_init = yes; then
-
- ethr_have_pthread_rwlockattr_setkind_np=no
- AC_CHECK_FUNC(pthread_rwlockattr_setkind_np,
- [ethr_have_pthread_rwlockattr_setkind_np=yes])
-
- if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP, 1, \
-[Define if you have the pthread_rwlockattr_setkind_np() function.])
-
- AC_MSG_CHECKING([for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP])
- ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
- AC_TRY_LINK([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [
- pthread_rwlockattr_t *attr;
- return pthread_rwlockattr_setkind_np(attr,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- ],
- [ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes])
- AC_MSG_RESULT([$ethr_pthread_rwlock_writer_nonrecursive_initializer_np])
- if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 1, \
-[Define if you have the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP rwlock attribute.])
- fi
- fi
- fi
-
- if test "$force_pthread_rwlocks" = "yes"; then
-
- AC_DEFINE(ETHR_FORCE_PTHREAD_RWLOCK, 1, \
-[Define if you want to force usage of pthread rwlocks])
-
- if test $have_pthread_rwlock_init = yes; then
- AC_MSG_WARN([Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues.])
- else
- AC_MSG_ERROR([User forced usage of pthread rwlock, but no such implementation was found])
- fi
- fi
-
- AC_CHECK_FUNC(pthread_attr_setguardsize, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE, 1, \
-[Define if you have the pthread_attr_setguardsize function.]))
-
- linux_futex=no
- AC_MSG_CHECKING([for Linux futexes])
- AC_TRY_LINK([
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <linux/futex.h>
- #include <sys/time.h>
- ],
- [
- int i = 1;
- syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
- (void*)0,(void*)0, 0);
- syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
- (void*)0,(void*)0, 0);
- return 0;
- ],
- linux_futex=yes)
- AC_MSG_RESULT([$linux_futex])
- test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
-
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int128_t)
-
- if test "$ac_cv_sizeof_int" = "4"; then
- int32="int"
- elif test "$ac_cv_sizeof_long" = "4"; then
- int32="long"
- elif test "$ac_cv_sizeof_long_long" = "4"; then
- int32="long long"
- else
- AC_MSG_ERROR([No 32-bit type found])
- fi
-
- if test "$ac_cv_sizeof_int" = "8"; then
- int64="int"
- elif test "$ac_cv_sizeof_long" = "8"; then
- int64="long"
- elif test "$ac_cv_sizeof_long_long" = "8"; then
- int64="long long"
- else
- AC_MSG_ERROR([No 64-bit type found])
- fi
-
- int128=no
- if test "$ac_cv_sizeof___int128_t" = "16"; then
- int128="__int128_t"
- fi
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- ethr_have_native_atomics=no
- else
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP32, 1, [Define if you have __sync_val_compare_and_swap() for 32-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH32, 1, [Define if you have __sync_add_and_fetch() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND32, 1, [Define if you have __sync_fetch_and_and() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR32, 1, [Define if you have __sync_fetch_and_or() for 32-bit integers]))
-
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP64, 1, [Define if you have __sync_val_compare_and_swap() for 64-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH64, 1, [Define if you have __sync_add_and_fetch() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND64, 1, [Define if you have __sync_fetch_and_and() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR64, 1, [Define if you have __sync_fetch_and_or() for 64-bit integers]))
-
- if test $int128 != no; then
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [128], [$int128], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP128, 1, [Define if you have __sync_val_compare_and_swap() for 128-bit integers]))
- fi
-
- AC_MSG_CHECKING([for a usable libatomic_ops implementation])
- case "x$with_libatomic_ops" in
- xno | xyes | x)
- libatomic_ops_include=
- ;;
- *)
- if test -d "${with_libatomic_ops}/include"; then
- libatomic_ops_include="-I$with_libatomic_ops/include"
- CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
- else
- AC_MSG_ERROR([libatomic_ops include directory $with_libatomic_ops/include not found])
- fi;;
- esac
- ethr_have_libatomic_ops=no
- AC_TRY_LINK([#include "atomic_ops.h"],
- [
- volatile AO_t x;
- AO_t y;
- int z;
-
- AO_nop_full();
- AO_store(&x, (AO_t) 0);
- z = AO_load(&x);
- z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
- ],
- [ethr_have_native_atomics=yes
- ethr_have_libatomic_ops=yes])
- AC_MSG_RESULT([$ethr_have_libatomic_ops])
- if test $ethr_have_libatomic_ops = yes; then
- AC_CHECK_SIZEOF(AO_t, ,
- [
- #include <stdio.h>
- #include "atomic_ops.h"
- ])
- AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used])
-
- AC_DEFINE(ETHR_HAVE_LIBATOMIC_OPS, 1, [Define if you have libatomic_ops atomic operations])
- if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_DEFINE(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS, 1, [Define if you prefer libatomic_ops native ethread implementations])
- fi
- ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
- elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_MSG_ERROR([No usable libatomic_ops implementation found])
- fi
-
- case "$host_cpu" in
- sparc | sun4u | sparc64 | sun4v)
- case "$with_sparc_memory_order" in
- "TSO")
- AC_DEFINE(ETHR_SPARC_TSO, 1, [Define if only run in Sparc TSO mode]);;
- "PSO")
- AC_DEFINE(ETHR_SPARC_PSO, 1, [Define if only run in Sparc PSO, or TSO mode]);;
- "RMO"|"")
- AC_DEFINE(ETHR_SPARC_RMO, 1, [Define if run in Sparc RMO, PSO, or TSO mode]);;
- *)
- AC_MSG_ERROR([Unsupported Sparc memory order: $with_sparc_memory_order]);;
- esac
- ethr_have_native_atomics=yes;;
- i86pc | i*86 | x86_64 | amd64)
- if test "$enable_x86_out_of_order" = "yes"; then
- AC_DEFINE(ETHR_X86_OUT_OF_ORDER, 1, [Define if x86/x86_64 out of order instructions should be synchronized])
- fi
- ethr_have_native_atomics=yes;;
- macppc | ppc | powerpc | "Power Macintosh")
- ethr_have_native_atomics=yes;;
- tile)
- ethr_have_native_atomics=yes;;
- *)
- ;;
- esac
-
- fi
-
- test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes
-
- dnl Restore LIBS
- LIBS=$saved_libs
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- ;;
- *)
- ;;
-esac
-
-AC_MSG_CHECKING([whether default stack size should be modified])
-if test "x$ethr_modified_default_stack_size" != "x"; then
- AC_DEFINE_UNQUOTED(ETHR_MODIFIED_DEFAULT_STACK_SIZE, $ethr_modified_default_stack_size, [Define if you want to modify the default stack size])
- AC_MSG_RESULT([yes; to $ethr_modified_default_stack_size kilo words])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$ETHR_THR_LIB_BASE" != "x"; then
- ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
- ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
- ETHR_LIB_NAME=$ethr_lib_name
-fi
-
-AC_CHECK_SIZEOF(void *)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
-
-AC_CHECK_SIZEOF(int)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_INT, $ac_cv_sizeof_int, [Define to the size of int])
-AC_CHECK_SIZEOF(long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG, $ac_cv_sizeof_long, [Define to the size of long])
-AC_CHECK_SIZEOF(long long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long, [Define to the size of long long])
-AC_CHECK_SIZEOF(__int64)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT64, $ac_cv_sizeof___int64, [Define to the size of __int64])
-AC_CHECK_SIZEOF(__int128_t)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT128_T, $ac_cv_sizeof___int128_t, [Define to the size of __int128_t])
-
-
-case X$erl_xcomp_bigendian in
- X) ;;
- Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian]);;
-esac
-
-AC_C_BIGENDIAN
-
-if test "$ac_cv_c_bigendian" = "yes"; then
- AC_DEFINE(ETHR_BIGENDIAN, 1, [Define if bigendian])
-fi
-
-case X$erl_xcomp_double_middle_endian in
- X) ;;
- Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian]);;
-esac
-
-AC_C_DOUBLE_MIDDLE_ENDIAN
-
-ETHR_X86_SSE2_ASM=no
-case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in
- yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64)
- AC_MSG_CHECKING([for gcc sse2 asm support])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -msse2"
- gcc_sse2_asm=no
- AC_TRY_COMPILE([],
- [
- long long x, *y;
- __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory");
- ],
- [gcc_sse2_asm=yes])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$gcc_sse2_asm])
- if test "$gcc_sse2_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_SSE2_ASM_SUPPORT, 1, [Define if you use a gcc that supports -msse2 and understand sse2 specific asm statements])
- ETHR_X86_SSE2_ASM=yes
- fi
- ;;
- *)
- ;;
-esac
-
-case "$GCC-$host_cpu" in
- yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64)
- gcc_dw_cmpxchg_asm=no
- AC_MSG_CHECKING([for gcc double word cmpxchg asm support])
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
- __asm__ __volatile__(
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "pushl %%ebx\n\t"
- "movl %8, %%ebx\n\t"
-#endif
-#if ETHR_SIZEOF_PTR == 4
- "lock; cmpxchg8b %0\n\t"
-#else
- "lock; cmpxchg16b %0\n\t"
-#endif
- "setz %3\n\t"
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "popl %%ebx\n\t"
-#endif
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]),
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "r"(new[0])
-#else
- "b"(new[0])
-#endif
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test $gcc_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
-#if !defined(__PIC__) || !__PIC__
-# error nope
-#endif
- __asm__ __volatile__(
- "pushl %%ebx\n\t"
- "movl (%7), %%ebx\n\t"
- "movl 4(%7), %%ecx\n\t"
- "lock; cmpxchg8b %0\n\t"
- "setz %3\n\t"
- "popl %%ebx\n\t"
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new)
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_CMPXCHG8B_REGISTER_SHORTAGE, 1, [Define if you get a register shortage with cmpxchg8b and position independent code])
- fi
- fi
- AC_MSG_RESULT([$gcc_dw_cmpxchg_asm])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT, 1, [Define if you use a gcc that supports the double word cmpxchg instruction])
- fi;;
- *)
- ;;
-esac
-
-AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \
-[Define if you have all ethread defines])
-
-AC_SUBST(ETHR_X_LIBS)
-AC_SUBST(ETHR_LIBS)
-AC_SUBST(ETHR_LIB_NAME)
-AC_SUBST(ETHR_DEFS)
-AC_SUBST(ETHR_THR_LIB_BASE)
-AC_SUBST(ETHR_THR_LIB_BASE_DIR)
-AC_SUBST(ETHR_X86_SSE2_ASM)
-
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_TIME_CORRECTION
-dnl
-dnl In the presence of a high resolution realtime timer Erlang can adapt
-dnl its view of time relative to this timer. On solaris such a timer is
-dnl available with the syscall gethrtime(). On other OS's a fallback
-dnl solution using times() is implemented. (However on e.g. FreeBSD times()
-dnl is implemented using gettimeofday so it doesn't make much sense to
-dnl use it there...) On second thought, it seems to be safer to do it the
-dnl other way around. I.e. only use times() on OS's where we know it will
-dnl work...
-dnl
-
-AC_DEFUN(ERL_TIME_CORRECTION,
-[if test x$ac_cv_func_gethrtime = x; then
- AC_CHECK_FUNC(gethrtime)
-fi
-if test x$clock_gettime_correction = xunknown; then
- AC_TRY_COMPILE([#include <time.h>],
- [struct timespec ts;
- long long result;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- result = ((long long) ts.tv_sec) * 1000000000LL +
- ((long long) ts.tv_nsec);],
- clock_gettime_compiles=yes,
- clock_gettime_compiles=no)
-else
- clock_gettime_compiles=no
-fi
-
-
-AC_CACHE_CHECK([how to correct for time adjustments], erl_cv_time_correction,
-[
-case $clock_gettime_correction in
- yes)
- erl_cv_time_correction=clock_gettime;;
- no|unknown)
- case $ac_cv_func_gethrtime in
- yes)
- erl_cv_time_correction=hrtime ;;
- no)
- case $host_os in
- linux*)
- case $clock_gettime_correction in
- unknown)
- if test x$clock_gettime_compiles = xyes; then
- if test X$cross_compiling != Xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
- else
- case X$erl_xcomp_linux_clock_gettime_correction in
- X)
- erl_cv_time_correction=cross;;
- Xyes|Xno)
- if test $erl_xcomp_linux_clock_gettime_correction = yes; then
- erl_cv_time_correction=clock_gettime
- else
- erl_cv_time_correction=times
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction]);;
- esac
- fi
- else
- erl_cv_time_correction=times
- fi
- ;;
- *)
- erl_cv_time_correction=times ;;
- esac
- ;;
- *)
- erl_cv_time_correction=none ;;
- esac
- ;;
- esac
- ;;
-esac
-])
-
-xrtlib=""
-case $erl_cv_time_correction in
- times)
- AC_DEFINE(CORRECT_USING_TIMES,[],
- [Define if you do not have a high-res. timer & want to use times() instead])
- ;;
- clock_gettime|cross)
- if test $erl_cv_time_correction = cross; then
- erl_cv_time_correction=clock_gettime
- AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
- fi
- xrtlib="-lrt"
- AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
- [Define if you want to use clock_gettime to simulate gethrtime])
- ;;
-esac
-dnl
-dnl Check if gethrvtime is working, and if to use procfs ioctl
-dnl or (yet to be written) write to the procfs ctl file.
-dnl
-
-AC_MSG_CHECKING([if gethrvtime works and how to use it])
-AC_TRY_RUN([
-/* gethrvtime procfs ioctl test */
-/* These need to be undef:ed to not break activation of
- * micro level process accounting on /proc/self
- */
-#ifdef _LARGEFILE_SOURCE
-# undef _LARGEFILE_SOURCE
-#endif
-#ifdef _FILE_OFFSET_BITS
-# undef _FILE_OFFSET_BITS
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-int main() {
- long msacct = PR_MSACCT;
- int fd;
- long long start, stop;
- int i;
- pid_t pid = getpid();
- char proc_self[30] = "/proc/";
-
- sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid);
- if ( (fd = open(proc_self, O_WRONLY)) == -1)
- exit(1);
- if (ioctl(fd, PIOCSET, &msacct) < 0)
- exit(2);
- if (close(fd) < 0)
- exit(3);
- start = gethrvtime();
- for (i = 0; i < 100; i++)
- stop = gethrvtime();
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
-}
-],
-erl_gethrvtime=procfs_ioctl,
-erl_gethrvtime=false,
-[
-case X$erl_xcomp_gethrvtime_procfs_ioctl in
- X)
- erl_gethrvtime=cross;;
- Xyes|Xno)
- if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
- erl_gethrvtime=procfs_ioctl
- else
- erl_gethrvtime=false
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl]);;
-esac
-])
-
-case $erl_gethrvtime in
- procfs_ioctl)
- AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
- [define if gethrvtime() works and uses ioctl() to /proc/self])
- AC_MSG_RESULT(uses ioctl to procfs)
- ;;
- *)
- if test $erl_gethrvtime = cross; then
- erl_gethrvtime=false
- AC_MSG_RESULT(cross)
- AC_MSG_WARN([result 'not working' guessed because of cross compilation])
- else
- AC_MSG_RESULT(not working)
- fi
-
- dnl
- dnl Check if clock_gettime (linux) is working
- dnl
-
- AC_MSG_CHECKING([if clock_gettime can be used to get process CPU time])
- save_libs=$LIBS
- LIBS="-lrt"
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
- #include <time.h>
- int main() {
- long long start, stop;
- int i;
- struct timespec tp;
-
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) < 0)
- exit(1);
- start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- for (i = 0; i < 100; i++)
- clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
- stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
- }
- ],
- erl_clock_gettime=yes,
- erl_clock_gettime=no,
- [
- case X$erl_xcomp_clock_gettime_cpu_time in
- X) erl_clock_gettime=cross;;
- Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
- *) AC_MSG_ERROR([Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time]);;
- esac
- ])
- LIBS=$save_libs
- case $host_os in
- linux*)
- AC_MSG_RESULT([no; not stable])
- LIBRT=$xrtlib
- ;;
- *)
- AC_MSG_RESULT($erl_clock_gettime)
- case $erl_clock_gettime in
- yes)
- AC_DEFINE(HAVE_CLOCK_GETTIME,[],
- [define if clock_gettime() works for getting process time])
- LIBRT=-lrt
- ;;
- cross)
- erl_clock_gettime=no
- AC_MSG_WARN([result no guessed because of cross compilation])
- LIBRT=$xrtlib
- ;;
- *)
- LIBRT=$xrtlib
- ;;
- esac
- ;;
- esac
- AC_SUBST(LIBRT)
- ;;
-esac
-])dnl
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_TRY_ENABLE_CFLAG
-dnl
-dnl
-dnl Tries a CFLAG and sees if it can be enabled without compiler errors
-dnl $1: textual cflag to add
-dnl $2: variable to store the modified CFLAG in
-dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
-dnl
-dnl
-AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
- saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $$2";
- AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
- CFLAGS=$saved_CFLAGS;
- if test "X$can_enable_flag" = "Xtrue"; then
- AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $$2")
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl ERL_TRY_LINK_JAVA(CLASSES, FUNCTION-BODY
-dnl [ACTION_IF_FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Freely inspired by AC_TRY_LINK. (Maybe better to create a
-dnl AC_LANG_JAVA instead...)
-AC_DEFUN(ERL_TRY_LINK_JAVA,
-[java_link='$JAVAC conftest.java 1>&AC_FD_CC'
-changequote(, )dnl
-cat > conftest.java <<EOF
-$1
-class conftest { public static void main(String[] args) {
- $2
- ; return; }}
-EOF
-changequote([, ])dnl
-if AC_TRY_EVAL(java_link) && test -s conftest.class; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
-else
- echo "configure: failed program was:" 1>&AC_FD_CC
- cat conftest.java 1>&AC_FD_CC
- echo "configure: PATH was $PATH" 1>&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
- $4
-])dnl
-fi
-rm -f conftest*])
-#define UNSAFE_MASK 0xc0000000 /* Mask for bits that must be constant */
-
-
diff --git a/lib/odbc/c_src/odbcserver.c b/lib/odbc/c_src/odbcserver.c
index 8de81a30ae..f4b0a5d8d0 100644
--- a/lib/odbc/c_src/odbcserver.c
+++ b/lib/odbc/c_src/odbcserver.c
@@ -98,6 +98,7 @@
/* ----------------------------- INCLUDES ------------------------------*/
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -388,6 +389,9 @@ DWORD WINAPI database_handler(const char *port)
close_socket(socket);
clean_socket_lib();
/* Exit will be done by suervisor thread */
+#ifdef WIN32
+ return (DWORD)0;
+#endif
}
/* Description: Calls the appropriate function to handle the database
@@ -560,7 +564,6 @@ static db_result_msg db_connect(byte *args, db_state *state)
/* Close the connection to the database. Returns an ok or error message. */
static db_result_msg db_close_connection(db_state *state)
{
- int index;
SQLRETURN result;
diagnos diagnos;
@@ -609,11 +612,7 @@ static db_result_msg db_end_tran(byte compleationtype, db_state *state)
erlang term into the message buffer of the returned message-struct. */
static db_result_msg db_query(byte *sql, db_state *state)
{
- char *atom;
- int num_of_rows, elements, update;
- SQLSMALLINT num_of_columns;
SQLRETURN result;
- SQLINTEGER RowCountPtr;
db_result_msg msg;
diagnos diagnos;
byte is_error[6];
@@ -630,7 +629,7 @@ static db_result_msg db_query(byte *sql, db_state *state)
&statement_handle(state))))
DO_EXIT(EXIT_ALLOC);
- result = SQLExecDirect(statement_handle(state), sql, SQL_NTS);
+ result = SQLExecDirect(statement_handle(state), (SQLCHAR *)sql, SQL_NTS);
/* SQL_SUCCESS_WITH_INFO at this point may indicate an error in user input. */
if (result != SQL_SUCCESS && result != SQL_NO_DATA_FOUND) {
@@ -697,12 +696,9 @@ static db_result_msg db_query(byte *sql, db_state *state)
set. */
static db_result_msg db_select_count(byte *sql, db_state *state)
{
- SQLSMALLINT num_of_columns, intresult;
+ SQLSMALLINT num_of_columns;
SQLLEN num_of_rows;
- SQLRETURN result;
diagnos diagnos;
- db_result_msg msg;
- int index;
if (associated_result_set(state)) {
clean_state(state);
@@ -722,7 +718,7 @@ static db_result_msg db_select_count(byte *sql, db_state *state)
(SQLPOINTER)SQL_SCROLLABLE, (SQLINTEGER)0);
}
- if(!sql_success(SQLExecDirect(statement_handle(state), sql, SQL_NTS))) {
+ if(!sql_success(SQLExecDirect(statement_handle(state), (SQLCHAR *)sql, SQL_NTS))) {
diagnos = get_diagnos(SQL_HANDLE_STMT, statement_handle(state), extended_errors(state));
clean_state(state);
return encode_error_message(diagnos.error_msg, extended_error(state, diagnos.sqlState), diagnos.nativeError);
@@ -788,6 +784,9 @@ static db_result_msg db_select(byte *args, db_state *state)
orientation = SQL_FETCH_NEXT;
offset = atoi(strtok((char *)(args + sizeof(byte)), ";"));
n = atoi(strtok(NULL, ";"));
+ break;
+ default:
+ DO_EXIT(EXIT_PARAM_ARRAY);
}
msg = encode_empty_message();
@@ -863,7 +862,7 @@ static db_result_msg db_param_query(byte *buffer, db_state *state)
if(params != NULL) {
- result = SQLExecDirect(statement_handle(state), sql, SQL_NTS);
+ result = SQLExecDirect(statement_handle(state), (SQLCHAR *)sql, SQL_NTS);
if (!sql_success(result) || result == SQL_NO_DATA) {
diagnos = get_diagnos(SQL_HANDLE_STMT, statement_handle(state), extended_errors(state));
}
@@ -938,7 +937,7 @@ static db_result_msg db_describe_table(byte *sql, db_state *state)
SQLSMALLINT num_of_columns;
SQLCHAR name[MAX_NAME];
SQLSMALLINT name_len, sql_type, dec_digits, nullable;
- SQLLEN size;
+ SQLULEN size;
diagnos diagnos;
int i;
@@ -954,7 +953,7 @@ static db_result_msg db_describe_table(byte *sql, db_state *state)
&statement_handle(state))))
DO_EXIT(EXIT_ALLOC);
- if (!sql_success(SQLPrepare(statement_handle(state), sql, SQL_NTS))){
+ if (!sql_success(SQLPrepare(statement_handle(state), (SQLCHAR *)sql, SQL_NTS))){
diagnos = get_diagnos(SQL_HANDLE_STMT, statement_handle(state), extended_errors(state));
msg = encode_error_message(diagnos.error_msg, extended_error(state, diagnos.sqlState), diagnos.nativeError);
clean_state(state);
@@ -1290,8 +1289,7 @@ static db_result_msg encode_column_name_list(SQLSMALLINT num_of_columns,
db_result_msg msg;
SQLCHAR name[MAX_NAME];
SQLSMALLINT name_len, sql_type, dec_digits, nullable;
- SQLLEN size;
- SQLRETURN result;
+ SQLULEN size;
msg = encode_empty_message();
@@ -1323,7 +1321,7 @@ static db_result_msg encode_column_name_list(SQLSMALLINT num_of_columns,
if (columns(state)[i].type.c == SQL_C_BINARY) {
/* retrived later by retrive_binary_data */
- }else {
+ } else {
if(!sql_success(
SQLBindCol
(statement_handle(state),
@@ -1335,7 +1333,7 @@ static db_result_msg encode_column_name_list(SQLSMALLINT num_of_columns,
DO_EXIT(EXIT_BIND);
}
ei_x_encode_string_len(&dynamic_buffer(state),
- name, name_len);
+ (char *)name, name_len);
}
else {
columns(state)[i].type.len = 0;
@@ -1353,9 +1351,8 @@ static db_result_msg encode_column_name_list(SQLSMALLINT num_of_columns,
static db_result_msg encode_value_list(SQLSMALLINT num_of_columns,
db_state *state)
{
- int i, msg_len;
+ int i;
SQLRETURN result;
- db_result_msg list_result;
db_result_msg msg;
msg = encode_empty_message();
@@ -1398,9 +1395,8 @@ static db_result_msg encode_value_list_scroll(SQLSMALLINT num_of_columns,
SQLINTEGER OffSet, int N,
db_state *state)
{
- int i, j, msg_len;
+ int i, j;
SQLRETURN result;
- db_result_msg list_result;
db_result_msg msg;
msg = encode_empty_message();
@@ -1806,10 +1802,23 @@ static int read_exact(byte *buffer, int len) {
#endif
+static size_t length_buffer_to_size(byte length_buffer[LENGTH_INDICATOR_SIZE])
+{
+ size_t size = 0, i;
+
+ for (i = 0; i < LENGTH_INDICATOR_SIZE; ++i) {
+ size <<= 8;
+ size |= (unsigned char)length_buffer[i];
+ }
+
+ return size;
+}
+
+
/* Recieive (read) data from erlang on stdin */
static byte * receive_erlang_port_msg(void)
{
- int i, len = 0;
+ size_t len;
byte *buffer;
byte lengthstr[LENGTH_INDICATOR_SIZE];
@@ -1818,10 +1827,8 @@ static byte * receive_erlang_port_msg(void)
{
DO_EXIT(EXIT_STDIN_HEADER);
}
- for(i=0; i < LENGTH_INDICATOR_SIZE; i++) {
- len <<= 8;
- len |= lengthstr[i];
- }
+
+ len = length_buffer_to_size(lengthstr);
if (len <= 0 || len > 1024) {
DO_EXIT(EXIT_STDIN_HEADER);
@@ -1922,8 +1929,7 @@ static byte * receive_msg(int socket)
#endif
{
byte lengthstr[LENGTH_INDICATOR_SIZE];
- size_t msg_len = 0;
- int i;
+ size_t msg_len;
byte *buffer = NULL;
if(!receive_msg_part(socket, lengthstr, LENGTH_INDICATOR_SIZE)) {
@@ -1931,10 +1937,7 @@ static byte * receive_msg(int socket)
DO_EXIT(EXIT_SOCKET_RECV_HEADER);
}
- for(i = 0; i < LENGTH_INDICATOR_SIZE; i++) {
- msg_len <<= 8;
- msg_len |= lengthstr[i];
- }
+ msg_len = length_buffer_to_size(lengthstr);
buffer = (byte *)safe_malloc(msg_len);
@@ -2196,8 +2199,7 @@ static void init_driver(int erl_auto_commit_mode, int erl_trace_driver,
static void init_param_column(param_array *params, byte *buffer, int *index,
int num_param_values, db_state* state)
{
- int size, erl_type;
- long user_type, precision, scale, length, dummy;
+ long user_type, precision, scale, length;
long in_or_out;
ei_decode_long(buffer, index, &user_type);
@@ -2510,8 +2512,7 @@ static param_array * bind_parameter_arrays(byte *buffer, int *index,
int cols, int num_param_values,
db_state *state)
{
- int i, j, k, size, erl_type;
- db_result_msg msg;
+ int i, j, size, erl_type;
long dummy;
void *Values;
param_array *params;
@@ -2597,7 +2598,6 @@ static db_column retrive_binary_data(db_column column, int column_nr,
db_state *state)
{
char *outputptr;
- char *sqlState;
int blocklen, outputlen, result;
diagnos diagnos;
@@ -2738,8 +2738,8 @@ static diagnos get_diagnos(SQLSMALLINT handleType, SQLHANDLE handle, Boolean ext
the error message is obtained */
for(record_nr = 1; ;record_nr++) {
result = SQLGetDiagRec(handleType, handle, record_nr, current_sql_state,
- &nativeError, current_errmsg_pos,
- (SQLSMALLINT)errmsg_buffer_size, &errmsg_size);
+ &nativeError, (SQLCHAR *)current_errmsg_pos,
+ (SQLSMALLINT)errmsg_buffer_size, &errmsg_size);
if(result == SQL_SUCCESS) {
/* update the sqlstate in the diagnos record, because the SQLGetDiagRec
call succeeded */
diff --git a/lib/odbc/c_src/odbcserver.h b/lib/odbc/c_src/odbcserver.h
index 916a7cb31d..7112fd2d47 100644
--- a/lib/odbc/c_src/odbcserver.h
+++ b/lib/odbc/c_src/odbcserver.h
@@ -119,7 +119,7 @@
/*------------------------ TYPDEFS ----------------------------------*/
-typedef unsigned char byte;
+typedef char byte;
typedef int Boolean;
typedef struct {
@@ -201,4 +201,4 @@ typedef enum {
#define param_query(db_state) (db_state -> param_query)
#define out_params(db_state) (db_state -> out_params)
#define extended_errors(db_state) (db_state -> extended_errors)
-#define extended_error(db_state, errorcode) ( extended_errors(state) ? errorcode : NULL )
+#define extended_error(db_state, errorcode) ( extended_errors(state) ? ((char *)errorcode) : NULL )
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index fa81f36e98..0cfcb9964b 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -136,7 +136,7 @@ AC_SUBST(THR_LIBS)
odbc_lib_link_success=no
AC_SUBST(TARGET_FLAGS)
case $host_os in
- darwin*)
+ darwin1[[0-4]].*|darwin[[0-9]].*)
TARGET_FLAGS="-DUNIX"
if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then
ODBC_LIB= -L"/usr/lib"
@@ -228,4 +228,24 @@ if test "x$GCC" = xyes; then
LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
fi
+dnl ----------------------------------------------------------------------
+dnl Enable -fsanitize= flags.
+dnl ----------------------------------------------------------------------
+
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(
+ sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]),
+[
+case "$enableval" in
+ no) sanitizers= ;;
+ yes) sanitizers="-fsanitize=DEFAULT_SANITIZERS" ;;
+ *) sanitizers="-fsanitize=$enableval" ;;
+esac
+CFLAGS="$CFLAGS $sanitizers"
+LDFLAGS="$LDFLAGS $sanitizers"
+])
+
AC_OUTPUT(c_src/$host/Makefile:c_src/Makefile.in)
diff --git a/lib/odbc/doc/src/book.xml b/lib/odbc/doc/src/book.xml
index 05e16b512a..1c76c1cf85 100644
--- a/lib/odbc/doc/src/book.xml
+++ b/lib/odbc/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/databases.xml b/lib/odbc/doc/src/databases.xml
index 34e1d51255..f10282a24d 100644
--- a/lib/odbc/doc/src/databases.xml
+++ b/lib/odbc/doc/src/databases.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/error_handling.xml b/lib/odbc/doc/src/error_handling.xml
index c30acc5fdc..0b6179409d 100644
--- a/lib/odbc/doc/src/error_handling.xml
+++ b/lib/odbc/doc/src/error_handling.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2010</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -88,7 +88,7 @@
<section>
<title>The whole picture </title>
<p>As the Erlang ODBC application relies on third party products
- and communicates with a database that probably runs on an other
+ and communicates with a database that probably runs on another
computer in the network there are plenty of things that might go
wrong. To fully understand the things that might happen it
facilitate to know the design of the Erlang ODBC application,
diff --git a/lib/odbc/doc/src/fascicules.xml b/lib/odbc/doc/src/fascicules.xml
index 91d81d2ac1..91251d4b20 100644
--- a/lib/odbc/doc/src/fascicules.xml
+++ b/lib/odbc/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/odbc/doc/src/getting_started.xml b/lib/odbc/doc/src/getting_started.xml
index d543ef64d6..7397b5f5c5 100644
--- a/lib/odbc/doc/src/getting_started.xml
+++ b/lib/odbc/doc/src/getting_started.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/introduction.xml b/lib/odbc/doc/src/introduction.xml
index 8e9688c407..98e805700e 100644
--- a/lib/odbc/doc/src/introduction.xml
+++ b/lib/odbc/doc/src/introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/notes.xml b/lib/odbc/doc/src/notes.xml
index b254ca3bc9..7a7658b092 100644
--- a/lib/odbc/doc/src/notes.xml
+++ b/lib/odbc/doc/src/notes.xml
@@ -31,7 +31,119 @@
<p>This document describes the changes made to the odbc application.
</p>
- <section><title>ODBC 2.10.19</title>
+ <section><title>ODBC 2.10.22</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ OS X Mavericks is based on Darwin version 13.x, and
+ Yosemite on 14.x. Change the ODBC configure.in script to
+ recognize these versions.</p>
+ <p>
+ Own Id: OTP-12260</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The commands longer than 127 chars sent to odbc server
+ crashed it, e.g. a connection string with driver path and
+ some additional parameters.</p>
+ <p>
+ Own Id: OTP-12346</p>
+ </item>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.10.21</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix compiler warnings reported by LLVM</p>
+ <p>
+ Own Id: OTP-12138</p>
+ </item>
+ <item>
+ <p>
+ Implement --enable-sanitizers[=sanitizers]. Similar to
+ debugging with Valgrind, it's very useful to enable
+ -fsanitize= switches to catch bugs at runtime.</p>
+ <p>
+ Own Id: OTP-12153</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.10.20</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed warnings at compile time by adding missing
+ include file (Thanks to Anthony Ramine)</p>
+ <p>
+ Own Id: OTP-11569</p>
+ </item>
+ <item>
+ <p>
+ Apple has removed iODBC in OS X 10.9 Mavericks, but
+ forgot to remove all binaries, adopt configure so that
+ will be possible to build odbc with own installation.</p>
+ <p>
+ Own Id: OTP-11630</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.10.19</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/odbc/doc/src/notes_history.xml b/lib/odbc/doc/src/notes_history.xml
index 2ce6b18201..277bf9b460 100644
--- a/lib/odbc/doc/src/notes_history.xml
+++ b/lib/odbc/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/odbc.xml b/lib/odbc/doc/src/odbc.xml
index 48b105d1e4..99b9bbbe88 100644
--- a/lib/odbc/doc/src/odbc.xml
+++ b/lib/odbc/doc/src/odbc.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/odbc/doc/src/part.xml b/lib/odbc/doc/src/part.xml
index 2ab981c04f..8d6255e083 100644
--- a/lib/odbc/doc/src/part.xml
+++ b/lib/odbc/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/part_notes.xml b/lib/odbc/doc/src/part_notes.xml
index f101cee799..be2603d3a2 100644
--- a/lib/odbc/doc/src/part_notes.xml
+++ b/lib/odbc/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/part_notes_history.xml b/lib/odbc/doc/src/part_notes_history.xml
index fa9b3b7dc7..89721ad0e7 100644
--- a/lib/odbc/doc/src/part_notes_history.xml
+++ b/lib/odbc/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/doc/src/ref_man.xml b/lib/odbc/doc/src/ref_man.xml
index e94febf0f1..b7f71ef496 100644
--- a/lib/odbc/doc/src/ref_man.xml
+++ b/lib/odbc/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/odbc/src/odbc.app.src b/lib/odbc/src/odbc.app.src
index 5229b28c08..b2c5775de2 100644
--- a/lib/odbc/src/odbc.app.src
+++ b/lib/odbc/src/odbc.app.src
@@ -11,5 +11,6 @@
]},
{applications, [kernel, stdlib]},
{env,[]},
- {mod, {odbc_app, []}}]}.
+ {mod, {odbc_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/odbc/src/odbc.appup.src b/lib/odbc/src/odbc.appup.src
index c7c83ea079..bf8872eae4 100644
--- a/lib/odbc/src/odbc.appup.src
+++ b/lib/odbc/src/odbc.appup.src
@@ -1,8 +1,24 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
{"%VSN%",
[
- {<<"2\\.*">>, [{restart_application, odbc}]}
+ {<<"2\\..*">>, [{restart_application, odbc}]}
],
[
- {<<"2\\.*">>, [{restart_application, odbc}]}
+ {<<"2\\..*">>, [{restart_application, odbc}]}
]}.
diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl
index 2a16388929..1907069726 100644
--- a/lib/odbc/test/odbc_connect_SUITE.erl
+++ b/lib/odbc/test/odbc_connect_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,7 +47,7 @@ all() ->
case odbc_test_lib:odbc_check() of
ok ->
[not_exist_db, commit, rollback, not_explicit_commit,
- no_c_node, port_dies, control_process_dies,
+ no_c_executable, port_dies, control_process_dies,
{group, client_dies}, connect_timeout, timeout,
many_timeouts, timeout_reset, disconnect_on_timeout,
connection_closed, disable_scrollable_cursors,
@@ -248,28 +248,31 @@ not_exist_db(_Config) ->
test_server:sleep(100).
%%-------------------------------------------------------------------------
-no_c_node(doc) ->
+no_c_executable(doc) ->
"Test what happens if the port-program can not be found";
-no_c_node(suite) -> [];
-no_c_node(_Config) ->
+no_c_executable(suite) -> [];
+no_c_executable(_Config) ->
process_flag(trap_exit, true),
Dir = filename:nativename(filename:join(code:priv_dir(odbc),
"bin")),
FileName1 = filename:nativename(os:find_executable("odbcserver",
Dir)),
FileName2 = filename:nativename(filename:join(Dir, "odbcsrv")),
- ok = file:rename(FileName1, FileName2),
- Result =
- case catch odbc:connect(?RDBMS:connection_string(),
- odbc_test_lib:platform_options()) of
- {error, port_program_executable_not_found} ->
- ok;
- Else ->
- Else
- end,
-
- ok = file:rename(FileName2, FileName1),
- ok = Result.
+ case file:rename(FileName1, FileName2) of
+ ok ->
+ Result =
+ case catch odbc:connect(?RDBMS:connection_string(),
+ odbc_test_lib:platform_options()) of
+ {error, port_program_executable_not_found} ->
+ ok;
+ Else ->
+ Else
+ end,
+ ok = file:rename(FileName2, FileName1),
+ ok = Result;
+ _ ->
+ {skip, "File permission issues"}
+ end.
%%------------------------------------------------------------------------
port_dies(doc) ->
diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl
index 2d33546622..95c094e081 100644
--- a/lib/odbc/test/odbc_data_type_SUITE.erl
+++ b/lib/odbc/test/odbc_data_type_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl
index e3a3440559..d75e615ed4 100644
--- a/lib/odbc/test/odbc_start_SUITE.erl
+++ b/lib/odbc/test/odbc_start_SUITE.erl
@@ -109,8 +109,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
case odbc_test_lib:odbc_check() of
- ok -> [start];
- Other -> {skip, Other}
+ ok -> [app, appup, start, long_connection_line];
+ _Other -> [app, appup]
end.
groups() ->
@@ -127,6 +127,14 @@ end_per_group(_GroupName, Config) ->
%% Test cases starts here.
%%--------------------------------------------------------------------
+%% Test that the odbc app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(odbc).
+
+%% Test that the odbc appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(odbc).
+
start(doc) ->
["Test start/stop of odbc"];
start(suite) ->
@@ -160,3 +168,14 @@ start_odbc(Type) ->
{error, odbc_not_started} ->
test_server:fail(start_failed)
end.
+
+
+long_connection_line(doc)->
+ ["Test a connection line longer than 127 characters"];
+long_connection_line(suite) -> [];
+long_connection_line(_Config) ->
+ odbc:start(),
+ String133 = "unknown_odbc_parameter=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789",
+ {error, Reason} = odbc:connect(String133, []),
+ odbc:stop(),
+ ct:pal("Driver error reason: ~p",[Reason]).
diff --git a/lib/odbc/vsn.mk b/lib/odbc/vsn.mk
index d9e2ab26a9..52c84429ec 100644
--- a/lib/odbc/vsn.mk
+++ b/lib/odbc/vsn.mk
@@ -1 +1 @@
-ODBC_VSN = 2.10.19
+ODBC_VSN = 2.10.22
diff --git a/lib/orber/COSS/CosNaming/orber_cosnaming_utils.erl b/lib/orber/COSS/CosNaming/orber_cosnaming_utils.erl
index 5ec0c084e3..c665e1fbc8 100644
--- a/lib/orber/COSS/CosNaming/orber_cosnaming_utils.erl
+++ b/lib/orber/COSS/CosNaming/orber_cosnaming_utils.erl
@@ -176,7 +176,6 @@ addresses({false, Adr, Rest}, Addresses) ->
{lists:reverse([Adr|Addresses]), Rest};
addresses({true, Adr, Rest}, Addresses) ->
addresses(address(protocol, Rest, [], []), [Adr|Addresses]).
-
%% Which protocol.
address(protocol, [$:|T], [], []) ->
address(version, T, [], [iiop]);
@@ -192,6 +191,7 @@ address(protocol, What, _, _) ->
[?LINE, What], ?DEBUG_LEVEL),
corba:raise(#'CosNaming_NamingContextExt_InvalidAddress'{});
+
%% Parsed one address, no version found or port found.
address(version, [$,|T], Acc, Previous) ->
{true, lists:reverse([?DEF_PORT, lists:reverse(Acc), ?DEF_VERS|Previous]), T};
@@ -208,15 +208,26 @@ address(version, [$@|T], Acc, Previous) ->
[?LINE, What], ?DEBUG_LEVEL),
corba:raise(#'CosNaming_NamingContextExt_InvalidAddress'{})
end;
+
+%% Found no iiop version, switch to ipv6.
+address(version, [$[|T], [], Previous) ->
+ address(ipv6, T, [], [?DEF_VERS|Previous]);
+
%% Found no iiop version, switch to port. In this case Acc contains the
%% Host.
address(version, [$:|T], Acc, Previous) ->
- case check_ip_version(T, [$:|Acc]) of
- false ->
- address(port, T, [], [lists:reverse(Acc), ?DEF_VERS|Previous]);
- {ok, NewAcc, NewT, Type} ->
- address(Type, NewT, [], [lists:reverse(NewAcc), ?DEF_VERS|Previous])
- end;
+ address(port, T, [], [lists:reverse(Acc), ?DEF_VERS|Previous]);
+
+%% Found IPv6
+address(address, [$[|T], [], Previous) ->
+ address(ipv6, T, [], Previous);
+
+%% Found port
+address(address, [$:|T], Acc, Previous) ->
+ address(port, T, [], [lists:reverse(Acc)|Previous]);
+
+address(ipv6, [$]|T], Acc, Previous) ->
+ address(address, T, Acc, Previous);
%% Parsed one address, port not found.
address(address, [$,|T], [], Previous) ->
@@ -267,68 +278,9 @@ address(address, [], [], Previous) ->
address(address, [], Acc, Previous) ->
{false, lists:reverse([?DEF_PORT, lists:reverse(Acc)|Previous]), []};
-%% Found port
-address(address, [$:|T], Acc, Previous) ->
- case check_ip_version(T, [$:|Acc]) of
- false ->
- address(port, T, [], [lists:reverse(Acc)|Previous]);
- {ok, NewAcc, NewT, Type} ->
- address(Type, NewT, [], [lists:reverse(NewAcc)|Previous])
- end;
-
address(Type, [H|T], Acc, Previous) ->
address(Type, T, [H|Acc], Previous).
-
-check_ip_version(T, Acc) ->
- case orber_env:ip_version() of
- inet ->
- false;
- inet6 ->
- case search_for_delimiter(1, T, Acc, $:) of
- {ok, NewAcc, NewT, Type} ->
- {ok, NewAcc, NewT, Type};
- _ ->
- false
- end
- end.
-
-%% An IPv6 address may look like (x == hex, d == dec):
-%% * "0:0:0:0:0:0:10.1.1.1" - x:x:x:x:x:x:d.d.d.d
-%% * "0:0:0:0:8:800:200C:417A" - x:x:x:x:x:x:x:x
-%% We cannot allow compressed addresses (::10.1.1.1) since we it is not
-%% possible to know if the last part is a port number or part of the address.
-search_for_delimiter(7, [], Acc, $:) ->
- {ok, Acc, [], address};
-search_for_delimiter(9, [], Acc, $.) ->
- {ok, Acc, [], address};
-search_for_delimiter(_, [], _, _) ->
- false;
-search_for_delimiter(7, [$/|T], Acc, $:) ->
- {ok, Acc, [$/|T], address};
-search_for_delimiter(9, [$/|T], Acc, $.) ->
- {ok, Acc, [$/|T], address};
-search_for_delimiter(_, [$/|_T], _Acc, _) ->
- false;
-search_for_delimiter(7, [$,|T], Acc, $:) ->
- {ok, Acc, [$,|T], address};
-search_for_delimiter(9, [$,|T], Acc, $.) ->
- {ok, Acc, [$,|T], address};
-search_for_delimiter(_, [$,|_T], _Acc, _) ->
- false;
-search_for_delimiter(7, [$:|T], Acc, $:) ->
- {ok, Acc, T, port};
-search_for_delimiter(9, [$:|T], Acc, $.) ->
- {ok, Acc, T, port};
-search_for_delimiter(N, [$:|T], Acc, $:) ->
- search_for_delimiter(N+1, T, [$:|Acc], $:);
-search_for_delimiter(N, [$.|T], Acc, $.) when N > 6, N < 9 ->
- search_for_delimiter(N+1, T, [$.|Acc], $.);
-search_for_delimiter(6, [$.|T], Acc, $:) ->
- search_for_delimiter(7, T, [$.|Acc], $.);
-search_for_delimiter(N, [H|T], Acc, LookingFor) ->
- search_for_delimiter(N, T, [H|Acc], LookingFor).
-
%%----------------------------------------------------------------------
%% Function : key
%% Arguments : A string which contain a Key we want to use and, if defined,
diff --git a/lib/orber/doc/src/CosNaming.xml b/lib/orber/doc/src/CosNaming.xml
index e8c639b59a..9bdd5bff94 100644
--- a/lib/orber/doc/src/CosNaming.xml
+++ b/lib/orber/doc/src/CosNaming.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/CosNaming_BindingIterator.xml b/lib/orber/doc/src/CosNaming_BindingIterator.xml
index 2ae9871bb9..8be1677a45 100644
--- a/lib/orber/doc/src/CosNaming_BindingIterator.xml
+++ b/lib/orber/doc/src/CosNaming_BindingIterator.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/CosNaming_NamingContext.xml b/lib/orber/doc/src/CosNaming_NamingContext.xml
index 7a3c7bc571..3c620024a9 100644
--- a/lib/orber/doc/src/CosNaming_NamingContext.xml
+++ b/lib/orber/doc/src/CosNaming_NamingContext.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/CosNaming_NamingContextExt.xml b/lib/orber/doc/src/CosNaming_NamingContextExt.xml
index 72e1f497ae..c3cab87e61 100644
--- a/lib/orber/doc/src/CosNaming_NamingContextExt.xml
+++ b/lib/orber/doc/src/CosNaming_NamingContextExt.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2000</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/Module_Interface.xml b/lib/orber/doc/src/Module_Interface.xml
index 7686419fdd..8ae7ab6e46 100644
--- a/lib/orber/doc/src/Module_Interface.xml
+++ b/lib/orber/doc/src/Module_Interface.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/any.xml b/lib/orber/doc/src/any.xml
index 390002669a..0c0a0f5f68 100644
--- a/lib/orber/doc/src/any.xml
+++ b/lib/orber/doc/src/any.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1998</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/book.xml b/lib/orber/doc/src/book.xml
index a8f0fca6f6..7ce153bbfe 100644
--- a/lib/orber/doc/src/book.xml
+++ b/lib/orber/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_contents.xml b/lib/orber/doc/src/ch_contents.xml
index 602955764d..d7f042ffa0 100644
--- a/lib/orber/doc/src/ch_contents.xml
+++ b/lib/orber/doc/src/ch_contents.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_debugging.xml b/lib/orber/doc/src/ch_debugging.xml
index 8c5685bc63..3c9b3d3da5 100644
--- a/lib/orber/doc/src/ch_debugging.xml
+++ b/lib/orber/doc/src/ch_debugging.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_exceptions.xml b/lib/orber/doc/src/ch_exceptions.xml
index a8fb98fe1e..a625eb503d 100644
--- a/lib/orber/doc/src/ch_exceptions.xml
+++ b/lib/orber/doc/src/ch_exceptions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml
index 1fd2f644cb..ed27ab04af 100644
--- a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml
+++ b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/orber/doc/src/ch_ifr.xml b/lib/orber/doc/src/ch_ifr.xml
index 690a8167c6..4e3fedba3a 100644
--- a/lib/orber/doc/src/ch_ifr.xml
+++ b/lib/orber/doc/src/ch_ifr.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_install.xml b/lib/orber/doc/src/ch_install.xml
index 89c0e19173..6b526a0b2a 100644
--- a/lib/orber/doc/src/ch_install.xml
+++ b/lib/orber/doc/src/ch_install.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_interceptors.xml b/lib/orber/doc/src/ch_interceptors.xml
index af8c5a45f1..c6d3fa2475 100644
--- a/lib/orber/doc/src/ch_interceptors.xml
+++ b/lib/orber/doc/src/ch_interceptors.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_introduction.xml b/lib/orber/doc/src/ch_introduction.xml
index 16240e1eb0..8d3d499324 100644
--- a/lib/orber/doc/src/ch_introduction.xml
+++ b/lib/orber/doc/src/ch_introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_naming_service.xml b/lib/orber/doc/src/ch_naming_service.xml
index 5cc50d95ec..e355db2edb 100644
--- a/lib/orber/doc/src/ch_naming_service.xml
+++ b/lib/orber/doc/src/ch_naming_service.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -273,25 +273,28 @@ lists:foreach(fun({{Id, Kind},BindingType}) -> case BindingType of
<p>The notation of this scheme is similar to the more well known URL <c>HTTP</c>, and
the full <c>corbaloc</c> BNF is:</p>
<code type="none"><![CDATA[
-<corbaloc> = "corbaloc:"<obj_addr_list>["/"<key_string>]
-<obj_addr_list> = [<obj_addr>","]*<obj_addr>
-<obj_addr> = <prot_addr> | <future_prot_addr>
-<prot_addr> = <rir_prot_addr> | <iiop_prot_addr>
-<rir_prot_addr> = <rir_prot_token>":"
-<rir_prot_token> = rir
-<future_prot_addr> = <future_prot_id><future_prot_addr>
-<future_prot_id> = <future_prot_token>":"
-<iiop_prot_addr> = <iiop_id><iiop_addr>
-<iiop_id> = <iiop_default> | <iiop_prot_token>":"
-<iiop_default> = ":"
-<iiop_prot_token> = "iiop"
-<iiop_addr> = <version><host>[":"<port>]
-<host> = DNS-style Host Name | ip_address
-<version> = <major>"."<minor>"@" | empty_string
-<port> = number
-<major> = number
-<minor> = number
-<key_string> = for example NameService
+<corbaloc> = "corbaloc:"<obj_addr_list>["/"<key_string>]
+<obj_addr_list> = [<obj_addr>","]*<obj_addr>
+<obj_addr> = <prot_addr> | <future_prot_addr>
+<prot_addr> = <rir_prot_addr> | <iiop_prot_addr>
+<rir_prot_addr> = <rir_prot_token>":"
+<rir_prot_token> = rir
+<future_prot_addr> = <future_prot_id><future_prot_addr>
+<future_prot_id> = <future_prot_token>":"
+<iiop_prot_addr> = <iiop_id><iiop_addr>
+<iiop_id> = <iiop_default> | <iiop_prot_token>":"
+<iiop_default> = ":"
+<iiop_prot_token> = "iiop"
+<iiop_addr> = <version><host>[":"<port>]
+<host> = <DNS-style Host Name> | <ip_v4_address> | "["<ip_v6_address>"]"
+<version> = <major>"."<minor>"@" | empty_string
+<port> = number
+<major> = number
+<minor> = number
+<DNS-style Host Name> = string
+<ip_v4_address> = string
+<ip_v6_address> = string
+<key_string> = for example NameService
]]></code>
<p>The <c>corbaloc</c> scheme consists of 3 parts:</p>
<list type="bulleted">
diff --git a/lib/orber/doc/src/ch_orber_kernel.xml b/lib/orber/doc/src/ch_orber_kernel.xml
index 6669641432..1a9026f9b7 100644
--- a/lib/orber/doc/src/ch_orber_kernel.xml
+++ b/lib/orber/doc/src/ch_orber_kernel.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_orberweb.xml b/lib/orber/doc/src/ch_orberweb.xml
index 30513bac09..2a17207616 100644
--- a/lib/orber/doc/src/ch_orberweb.xml
+++ b/lib/orber/doc/src/ch_orberweb.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_security.xml b/lib/orber/doc/src/ch_security.xml
index a25a8a5052..9b56319a47 100644
--- a/lib/orber/doc/src/ch_security.xml
+++ b/lib/orber/doc/src/ch_security.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ch_stubs.xml b/lib/orber/doc/src/ch_stubs.xml
index 785805a4d6..e0e0003af0 100644
--- a/lib/orber/doc/src/ch_stubs.xml
+++ b/lib/orber/doc/src/ch_stubs.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/corba.xml b/lib/orber/doc/src/corba.xml
index 08ec555f94..4a11b271b4 100644
--- a/lib/orber/doc/src/corba.xml
+++ b/lib/orber/doc/src/corba.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -294,7 +294,9 @@ Example:
<p>This function returns the object reference for the object id asked
for.
The remote modifier string has the following format:
- <c>"iiop://host:port"</c>.</p>
+ <c>"iiop://"&lt;host&gt;":"&lt;port&gt;</c> where <c>&lt;host&gt; = &lt;DNS hostname&gt; |
+ &lt;IPv4 address&gt; | "["&lt;IPv6 address&gt;"]"</c>.
+ </p>
<p>The <em>configuration</em> context is used to override the global
SSL client side
<seealso marker="ch_install#config">configuration</seealso>.</p>
@@ -322,8 +324,11 @@ Example:
<v>ObjectId = string()</v>
</type>
<desc>
- <p>This function returns a list of allowed object id's. The remote modifier
- string has the following format: <c>"iiop://host:port"</c>.</p>
+ <p>This function returns a list of allowed object id's.
+ The remote modifier string has the following format:
+ <c>"iiop://"&lt;host&gt;":"&lt;port&gt;</c> where <c>&lt;host&gt; = &lt;DNS hostname&gt; |
+ &lt;IPv4 address&gt; | "["&lt;IPv6 address&gt;"]"</c>.
+ </p>
<p>The <em>configuration</em> context is used to override the global
SSL client side
<seealso marker="ch_install#config">configuration</seealso>.</p>
@@ -365,9 +370,11 @@ Example:
<p>This function takes a <c>corbaname</c>, <c>corbaloc</c> or an IOR on the
external string representation and returns the object reference.</p>
<p>To lookup the NameService reference, simply use
- <c>"corbaloc:iiop:[email protected]:4001/NameService"</c></p>
+ <c>"corbaloc:iiop:[email protected]:4001/NameService"</c></p>
<p>We can also resolve an object from the NameService by using
- <c>"corbaname:iiop:[email protected]:4001/NameService#org/Erlang/MyObj"</c></p>
+ <c>"corbaname:iiop:[email protected]:4001/NameService#org/Erlang/MyObj"</c></p>
+ <p>To lookup the NameService reference with an IPv6 address, simply use
+ <c>"corbaloc:iiop:1.2@[FEC1:0:3:0:0312:44AF:FAB1:3D01]:4001/NameService"</c></p>
<p>For more information about <c>corbaname</c> and <c>corbaloc</c>, see
the User's Guide (Interoperable Naming Service).</p>
<p>The <em>configuration</em> context is used to override the global
diff --git a/lib/orber/doc/src/corba_object.xml b/lib/orber/doc/src/corba_object.xml
index ef440f1a2d..84bf775f78 100644
--- a/lib/orber/doc/src/corba_object.xml
+++ b/lib/orber/doc/src/corba_object.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/example_part.xml b/lib/orber/doc/src/example_part.xml
index 9adb8fa7cf..d8970be912 100644
--- a/lib/orber/doc/src/example_part.xml
+++ b/lib/orber/doc/src/example_part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/fascicules.xml b/lib/orber/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/orber/doc/src/fascicules.xml
+++ b/lib/orber/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/orber/doc/src/fixed.xml b/lib/orber/doc/src/fixed.xml
index 8f23a32c8f..fc34c89e7e 100644
--- a/lib/orber/doc/src/fixed.xml
+++ b/lib/orber/doc/src/fixed.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/interceptors.xml b/lib/orber/doc/src/interceptors.xml
index 8d1f97d5a2..739da8ab2f 100644
--- a/lib/orber/doc/src/interceptors.xml
+++ b/lib/orber/doc/src/interceptors.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/intro_part.xml b/lib/orber/doc/src/intro_part.xml
index bd783331f2..a44f0fa786 100644
--- a/lib/orber/doc/src/intro_part.xml
+++ b/lib/orber/doc/src/intro_part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/lname.xml b/lib/orber/doc/src/lname.xml
index 7776e1298c..284a50b900 100644
--- a/lib/orber/doc/src/lname.xml
+++ b/lib/orber/doc/src/lname.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/lname_component.xml b/lib/orber/doc/src/lname_component.xml
index aa27ce28a3..9c0134609e 100644
--- a/lib/orber/doc/src/lname_component.xml
+++ b/lib/orber/doc/src/lname_component.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/notes.xml b/lib/orber/doc/src/notes.xml
index 04507d8078..2167a43eee 100644
--- a/lib/orber/doc/src/notes.xml
+++ b/lib/orber/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -33,7 +33,80 @@
</header>
- <section><title>Orber 3.6.26.1</title>
+ <section><title>Orber 3.7.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Fixed problem with IPv6 addresses in Service Context
+ when orber is default configured for IPv4. </p>
+ <p>
+ Own Id: OTP-12193</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Orber 3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> The following functions have been corrected so they
+ work properly with IPv6 addresses. </p> <list>
+ <item><c>corba:resolve_initial_references_remote/2/3</c></item>
+ <item><c>corba:list_initial_references_remote/1/2</c></item>
+ <item><c>corba:string_to_object/1/2</c></item> </list>
+ <p>
+ Own Id: OTP-12016</p>
+ </item>
+ <item>
+ <p> A couple of macros were malformed, missing commas:
+ PROFILEBODY_1_1_TYPEDEF and PROFILEBODY_1_2_TYPEDEF.
+ Thanks to Vlad Dumitrescu. </p>
+ <p>
+ Own Id: OTP-12062</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> It is now possible to add listen interfaces for IPv6
+ when orber is default configured for IPv4 and the other
+ way around. For more information, consult the User's
+ Guide and the orber module Reference Manual. </p>
+ <p>
+ Own Id: OTP-12007</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Orber 3.6.27</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Orber 3.6.26.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/orber/doc/src/orber.xml b/lib/orber/doc/src/orber.xml
index 35e9f57008..a182a56972 100644
--- a/lib/orber/doc/src/orber.xml
+++ b/lib/orber/doc/src/orber.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -356,8 +356,8 @@
<v>Type = normal | ssl</v>
<v>Port = integer() > 0</v>
<v>ConfigurationParameters = [{Key, Value}]</v>
- <v>Key = flags | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options</v>
- <v>Value = as described in the User's Guide</v>
+ <v>Key = flags | ip_family | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options</v>
+ <v>Value = as described in the User's Guide or below</v>
<v>Result = {ok, Ref} | {error, Reason} | {'EXCEPTION', #'BAD_PARAM'{}}</v>
<v>Ref = #Ref</v>
<v>Reason = string()</v>
@@ -383,6 +383,9 @@
<item><em>flags</em> - currently it is only possible to override the global
setting for the <c>Use Current Interface in IOR</c> and
<c>Exclude CodeSet Component</c> flags.</item>
+ <item><em>ip_family</em> - can be set to <c>inet</c> or <c>inet6</c> and is
+ used to get a listen interface that uses another IP version than the default
+ set with flags at startup.</item>
<item><em>iiop_port</em> - requires that <c>Use Current Interface in IOR</c>
is activated and the supplied <c>Type</c> is <c>normal</c>. If so,
exported IOR:s will contain the IIOP port defined by this configuration
@@ -390,7 +393,7 @@
<item><em>iiop_ssl_port</em> - almost equivalent to <c>iiop_port</c>.
The difference is that <c>Type</c> shall be <c>ssl</c> and that
exported IOR:s will contain the IIOP via SSL port defined by this configuration
- parameter.</item>
+ parameter.</item>
</list>
<p>If it is not possible to add a listener based on the supplied interface
and port, the error message is one of the ones described in <c>inet</c>
diff --git a/lib/orber/doc/src/orber_acl.xml b/lib/orber/doc/src/orber_acl.xml
index c844b99702..f78e27fc4e 100644
--- a/lib/orber/doc/src/orber_acl.xml
+++ b/lib/orber/doc/src/orber_acl.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2005</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/orber_diagnostics.xml b/lib/orber/doc/src/orber_diagnostics.xml
index ee688dbec4..c9453cfce6 100644
--- a/lib/orber/doc/src/orber_diagnostics.xml
+++ b/lib/orber/doc/src/orber_diagnostics.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/orber_ifr.xml b/lib/orber/doc/src/orber_ifr.xml
index 2d47d57476..c2dc4ff552 100644
--- a/lib/orber/doc/src/orber_ifr.xml
+++ b/lib/orber/doc/src/orber_ifr.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/orber_tc.xml b/lib/orber/doc/src/orber_tc.xml
index a6141dd5bb..50239d7b5e 100644
--- a/lib/orber/doc/src/orber_tc.xml
+++ b/lib/orber/doc/src/orber_tc.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1998</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/part.xml b/lib/orber/doc/src/part.xml
index a131db0bad..a8c13588b5 100644
--- a/lib/orber/doc/src/part.xml
+++ b/lib/orber/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2010</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/part_notes.xml b/lib/orber/doc/src/part_notes.xml
index 10b3a64373..f16a2bc343 100644
--- a/lib/orber/doc/src/part_notes.xml
+++ b/lib/orber/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/ref_man.xml b/lib/orber/doc/src/ref_man.xml
index 638463fc84..361b197ef4 100644
--- a/lib/orber/doc/src/ref_man.xml
+++ b/lib/orber/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/doc/src/tools_debugging_part.xml b/lib/orber/doc/src/tools_debugging_part.xml
index 9aae7bc06f..683baab601 100644
--- a/lib/orber/doc/src/tools_debugging_part.xml
+++ b/lib/orber/doc/src/tools_debugging_part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile
index 1c6781e5fd..398e481138 100644
--- a/lib/orber/src/Makefile
+++ b/lib/orber/src/Makefile
@@ -21,9 +21,6 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-# To get hold of SYSTEM_VSN (e.g. R9C).
-#include $(ERL_TOP)/erts/vsn.mk
-
# ----------------------------------------------------
# Application version
# ----------------------------------------------------
@@ -197,8 +194,7 @@ ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/orber/ebin
ERL_COMPILE_FLAGS += $(ERL_IDL_FLAGS) \
-I$(ERL_TOP)/lib/orber/include \
+'{parse_transform,sys_pre_attributes}' \
- +'{attribute,insert,app_vsn,"orber_$(ORBER_VSN)"}' \
- -D'ORBVSN="$(ORBER_VSN)"'
+ +'{attribute,insert,app_vsn,"orber_$(ORBER_VSN)"}'
ASN_FLAGS = -bber +der +compact_bit_string +nowarn_unused_record
diff --git a/lib/orber/src/cdr_decode.erl b/lib/orber/src/cdr_decode.erl
index 36ef6ce02f..9aec64892e 100644
--- a/lib/orber/src/cdr_decode.erl
+++ b/lib/orber/src/cdr_decode.erl
@@ -193,7 +193,7 @@ dec_message_header(TypeCodes, Message, Bytes) ->
%% Args:
%% The message as a byte sequence.
%% Returns:
-%% A tuple {Endianess, Rest} where Endianess is big or little.
+%% A tuple {Endianness, Rest} where Endianness is big or little.
%% Rest is the remaining message byte sequence.
%%-----------------------------------------------------------------
dec_byte_order(<<0:8,T/binary>>) ->
@@ -206,7 +206,7 @@ dec_byte_order(<<1:8,T/binary>>) ->
%% Args:
%% The message as a byte sequence.
%% Returns:
-%% A tuple {Endianess, Rest} where Endianess is big or little.
+%% A tuple {Endianness, Rest} where Endianness is big or little.
%% Rest is the remaining message byte sequence.
%%-----------------------------------------------------------------
dec_byte_order_list([0|T]) ->
diff --git a/lib/orber/src/corba.erl b/lib/orber/src/corba.erl
index 989e84f581..586a02d540 100644
--- a/lib/orber/src/corba.erl
+++ b/lib/orber/src/corba.erl
@@ -311,19 +311,18 @@ resolve_initial_references_remote(_ObjectId, [], _Ctx) ->
raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO});
resolve_initial_references_remote(ObjectId, [RemoteModifier| Rest], Ctx)
when is_list(RemoteModifier) ->
- case lists:prefix("iiop://", RemoteModifier) of
- true ->
- [_, Host, Port] = string:tokens(RemoteModifier, ":/"),
+ case parse_remote_modifier(RemoteModifier) of
+ {error, _} ->
+ resolve_initial_references_remote(ObjectId, Rest, Ctx);
+ {ok, Host, Port} ->
IOR = iop_ior:create_external(orber:giop_version(), "",
- Host, list_to_integer(Port), "INIT"),
+ Host, list_to_integer(Port), "INIT"),
%% We know it's an external referens. Hence, no need to check.
{_, Key} = iop_ior:get_key(IOR),
orber_iiop:request(Key, 'get', [ObjectId],
{{'tk_objref', 12, "object"},
[{'tk_string', 0}],
- []}, 'true', infinity, IOR, Ctx);
- false ->
- resolve_initial_references_remote(ObjectId, Rest, Ctx)
+ []}, 'true', infinity, IOR, Ctx)
end.
list_initial_services_remote(Address) ->
@@ -332,24 +331,44 @@ list_initial_services_remote(Address) ->
list_initial_services_remote([], _Ctx) ->
raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO});
list_initial_services_remote([RemoteModifier| Rest], Ctx) when is_list(RemoteModifier) ->
- case lists:prefix("iiop://", RemoteModifier) of
- true ->
- [_, Host, Port] = string:tokens(RemoteModifier, ":/"),
+ case parse_remote_modifier(RemoteModifier) of
+ {error, _} ->
+ resolve_initial_references_remote(Rest, Ctx);
+ {ok, Host, Port} ->
IOR = iop_ior:create_external(orber:giop_version(), "",
Host, list_to_integer(Port), "INIT"),
%% We know it's an external referens. Hence, no need to check.
{_, Key} = iop_ior:get_key(IOR),
orber_iiop:request(Key, 'list', [],
{{'tk_sequence', {'tk_string',0},0},
- [], []}, 'true', infinity, IOR, Ctx);
- false ->
- list_initial_services_remote(Rest, Ctx)
+ [], []}, 'true', infinity, IOR, Ctx)
end;
list_initial_services_remote(_, _) ->
raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO}).
+parse_remote_modifier("iiop://" ++ Rest) ->
+ parse_host_version(Rest);
+parse_remote_modifier(_RemoteModifier) ->
+ {error, not_supported}.
+
+parse_host_version("[" ++ Rest) ->
+ parse_ipv6(Rest, []);
+parse_host_version(Rest) ->
+ parse_ipv4_or_dnsname(Rest, []).
+
+
+parse_ipv4_or_dnsname([$: |Rest], Acc) ->
+ {ok, lists:reverse(Acc), Rest};
+parse_ipv4_or_dnsname([C |Rest], Acc) ->
+ parse_ipv4_or_dnsname(Rest, [C |Acc]).
+
+parse_ipv6("]:" ++ Rest, Acc) ->
+ {ok, lists:reverse(Acc), Rest};
+parse_ipv6([C |Rest], Acc) ->
+ parse_ipv6(Rest, [C |Acc]).
+
%%-----------------------------------------------------------------
%% Objectreference convertions
%%-----------------------------------------------------------------
diff --git a/lib/orber/src/corba_request.erl b/lib/orber/src/corba_request.erl
deleted file mode 100644
index c4226739a9..0000000000
--- a/lib/orber/src/corba_request.erl
+++ /dev/null
@@ -1,384 +0,0 @@
-%%--------------------------------------------------------------------
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-%%-----------------------------------------------------------------
-%% File: corba_request.erl
-%% Description:
-%% This file contains an corba request server for Orber
-%%
-%%-----------------------------------------------------------------
--module(corba_request).
-
--behaviour(gen_server).
-
--include_lib("orber/include/corba.hrl").
-
-%%-----------------------------------------------------------------
-%% External exports
-%%-----------------------------------------------------------------
--export([start/1, stop/0, stop_all/0, create/1,
- create_schema/1]).
-
-%%-----------------------------------------------------------------
-%% Internal exports
-%%-----------------------------------------------------------------
--export([init/1, terminate/2, install/2, handle_call/3, handle_info/2]).
--export([handle_cast/2, dump/0, get_key_from_pid/1]).
-
-%%-----------------------------------------------------------------
-%% Standard interface CORBA::Request
-%%-----------------------------------------------------------------
--export([add_arg/6,
- invoke/2,
- delete/1,
- send/2,
- get_response/2]).
-
-%%-----------------------------------------------------------------
-%% Mnesia table definition
-%%-----------------------------------------------------------------
--record('corba_request', {reqid, ctx, operation, arg_list, result, req_flags, pid}).
-
-
-%%-----------------------------------------------------------------
-%% Macros
-%%-----------------------------------------------------------------
--define(dirty_query_context, true).
-
-%% This macro returns a read fun suitable for evaluation in a transaction
--define(read_function(ReqId),
- fun() ->
- mnesia:dirty_read(ReqId)
- end).
-
-%% This macro returns a write fun suitable for evaluation in a transaction
--define(write_function(R),
- fun() ->
- mnesia:dirty_write(R)
- end).
-
-%% This macro returns a write fun suitable for evaluation in a transaction
--define(update(R),
- fun() ->
- mnesia:dirty_write(R)
- end).
-
-%% This macro returns a delete fun suitable for evaluation in a transaction
--define(delete_function(R),
- fun() ->
- mnesia:delete(R)
- end).
-
--ifdef(dirty_query_context).
--define(query_check(Q_res), Q_res).
--else.
--define(query_check(Q_res), {atomic, Q_res}).
--endif.
-
-
--define(CHECK_EXCEPTION(Res), case Res of
- {'EXCEPTION', E} ->
- corba:raise(E);
- R ->
- R
- end).
-
-%%-----------------------------------------------------------------
-%% Debugging function
-%%-----------------------------------------------------------------
-dump() ->
- case catch mnesia:dirty_first('orber_request') of
- {'EXIT', R} ->
- io:format("Exited with ~p\n",[R]);
- Key ->
- dump_print(Key),
- dump_loop(Key)
- end.
-
-dump_loop(PreviousKey) ->
- case catch mnesia:dirty_next('orber_request', PreviousKey) of
- {'EXIT', R} ->
- io:format("Exited with ~p\n",[R]);
- '$end_of_table' ->
- ok;
- Key ->
- dump_print(Key),
- dump_loop(Key)
- end.
-
-dump_print(Key) ->
- case catch mnesia:dirty_read({'orber_request', Key}) of
- {'EXIT', R} ->
- io:format("Exited with ~p\n",[R]);
- [X] ->
- io:format("Req Id: ~p, op: ~p\n",[binary_to_term(X#orber_request.object_key),
- X#orber_request.pid]);
- _ ->
- ok
- end.
-
-
-%%-----------------------------------------------------------------
-%% External interface functions
-%%-----------------------------------------------------------------
-start(Opts) ->
- gen_server:start_link({local, orber_requestserver}, orber_request, Opts, []).
-
-stop() ->
- gen_server:call(orber_requestserver, stop, infinity).
-
-
-stop_all() ->
- Fun = fun() ->
- mnesia:match_object({orber_request, '_', '_', '_', '_', '_', '_', '_'})
- end,
- case catch mnesia:transaction(Fun) of
- {atomic, Objects} ->
- lists:foreach(fun({orber_request, _, _, _, _, _, _, _ }) ->
- ok %gen_server:call(Pid, stop, infinity)
- end,
- Objects);
- R ->
- R
- end.
-
-create() ->
- ?CHECK_EXCEPTION(gen_server:call(orber_requestserver,
- create, infinity)).
-
-create(Ctx, OP, Args, Flags) ->
- ?CHECK_EXCEPTION(gen_server:call(orber_requestserver,
- {create, Ctx, OP, Args, Flags}, infinity)).
-
-delete(ReqId) ->
- ?CHECK_EXCEPTION(gen_server:call(orber_requestserver,
- {delete, ReqId}, infinity)).
-
-%%------------------------------------------------------------
-%% Implementation of standard interface
-%%------------------------------------------------------------
-add_arg(ReqId, ArgumentName, TC, Value, Len, ArgFlags) ->
- Request = ets:lookup_element(orber_request, ReqId),
- case Request of
- [] ->
- ok;
- R ->
- Args = Request#orber_request.arg_list,
- NewArgs = lists:append(Args, []),
- ets:insert(orber_request, NewArgs),
- ok
- end.
-
-invoke(ReqId, InvokeFlags) ->
- ok.
-
-
-
-send(ReqId, InvokeFlags) ->
- ok.
-
-get_response(ReqId, ResponseFlags) ->
- [{_, Val}] = ets:lookup_element(orber_request, ReqId),
- Val#'orber_request'.result.
-
-%%-----------------------------------------------------------------
-%% Server functions
-%%-----------------------------------------------------------------
-init(Env) ->
- case mnesia:wait_for_tables(['orber_request'], infinity) of
- ok ->
- process_flag(trap_exit, true),
- {ok, []};
- StopReason ->
- {stop, StopReason}
- end.
-
-terminate(From, Reason) ->
- ok.
-
-
-
-install(Timeout, Options) ->
- %% check if there already exists a database. If not, create one.
- %% DB_initialized = perhaps_create_schema(Nodelist),
- %% check if mnesia is running. If not, start mnesia.
- DB_started = perhaps_start_mnesia(),
-
- %% Do we have a complete set of IFR tables? If not, create them.
- AllTabs = mnesia:system_info(tables),
-
- DB_Result = case lists:member(orber_request, AllTabs) of
- true ->
- case lists:member({local_content, true},
- Options) of
- true->
- mnesia:add_table_copy(orber_request,
- node(),
- ram_copies);
- _ ->
- mnesia:create_table(orber_request,
- [{attributes,
- record_info(fields,
- orber_objkeys)}
- |Options])
- end;
- _ ->
- mnesia:create_table(orber_request,
- [{attributes,
- record_info(fields,
- orber_objkeys)}
- |Options])
- end,
-
- Wait = mnesia:wait_for_tables([orber_request], Timeout),
- %% Check if any error has occured yet. If there are errors, return them.
- if
- DB_Result == {atomic, ok},
- Wait == ok ->
- ok;
- true ->
- {error, {DB_Result, Wait}}
- end.
-
-%%-----------------------------------------------------------------
-%% Func: handle_call/3
-%%
-%% Comment:
-%% In objectkey gen_server all exceptions are tupples and corba:raise
-%% may not be used. It is too time consuming to add catches in every
-%% function before returning. On the client side there is a case which
-%% maps every tupple on the format {'exception', E} to corba:raise(E).
-%%-----------------------------------------------------------------
-handle_call(stop, From, State) ->
- {stop, normal, [], State};
-handle_call(create, From, State) ->
- ReqId = term_to_binary({node(), now()}),
- _F = ?write_function(#'corba_request'{reqid=ReqId}),
- R = write_result(mnesia:transaction(_F)),
-
- ReqId
-
- ?query_check(Qres) = mnesia:dirty_read({orber_request, Objkey}),
- case Qres of
- [] ->
- _F = ?write_function(#orber_requests{object_key=Objkey, pid=Pid}),
- R = write_result(mnesia:transaction(_F)),
- if
- R == ok, pid(Pid) ->
- link(Pid);
- true ->
- true
- end,
- {reply, R, State};
- X ->
- {reply, {'EXCEPTION', #'INTERNAL'{completion_status=?COMPLETED_NO}},
- State}
- end;
-handle_call({delete, ReqId}, From, State) ->
- ?query_check(Qres) = mnesia:dirty_read({orber_request, ReqId}),
- case Qres of
- [] ->
- true;
- [X] when pid(X#orber_request.pid) ->
- unlink(X#orber_request.pid);
- _ ->
- true
- end,
- _F = ?delete_function({orber_request, ReqId}),
- R = write_result(mnesia:transaction(_F)),
- {reply, R, State}.
-
-handle_info({'EXIT', Pid, Reason}, State) when pid(Pid) ->
- _MF = fun() ->
- mnesia:match_object({orber_request, '_', '_', '_', '_', '_', '_', Pid})
- end,
- ?query_check(Qres) = mnesia:ets(_MF),
- case Qres of
- [] ->
- true;
- X ->
- remove_requests(X),
- unlink(Pid);
- _ ->
- true
- end,
- {noreply, State}.
-
-%%-----------------------------------------------------------------
-%% Internal Functions
-%%-----------------------------------------------------------------
-get_reqids_from_pid(Pid) ->
- case mnesia:dirty_match_object({orber_request, '_', '_', '_', '_', '_', '_', Pid}) of
- Keys ->
- [Keys]
- _ ->
- corba:raise(#'OBJECT_NOT_EXIST'{completion_status=?COMPLETED_NO})
- end.
-
-remove_requests([]) ->
- ok;
-remove_requests([H|T]) ->
- _F = ?delete_function({orber_request, H#orber_request.reqid}),
- write_result(mnesia:transaction(_F)),
- remove_requests(T).
-
-%%-----------------------------------------------------------------
-%% Check a read transaction
-query_result(?query_check(Qres)) ->
- case Qres of
- [Hres] ->
- Hres#orber_request.pid;
- [] ->
- {'excpetion', #'OBJECT_NOT_EXIST'{completion_status=?COMPLETED_NO}};
- Other ->
- {'excpetion', #'INTERNAL'{completion_status=?COMPLETED_NO}}
- end.
-
-%%-----------------------------------------------------------------
-%% Check a write transaction
-write_result({atomic,ok}) -> ok;
-write_result(Foo) ->
- {'excpetion', #'INTERNAL'{completion_status=?COMPLETED_NO}}.
-
-
-create_schema(Nodes) ->
- case mnesia:system_info(use_dir) of
- false ->
- mnesia:create_schema(Nodes);
- _ ->
- ok
- end.
-
-perhaps_start_mnesia() ->
- case mnesia:system_info(is_running) of
- no ->
- mnesia:start();
- _ ->
- ok
- end.
-
-
-%%------------------------------------------------------------
-%% Standard gen_server cast handle
-%%
-handle_cast(_, State) ->
- {noreply, State}.
-
-
diff --git a/lib/orber/src/orber.app.src b/lib/orber/src/orber.app.src
index 88df4162b6..30bd90347d 100644
--- a/lib/orber/src/orber.app.src
+++ b/lib/orber/src/orber.app.src
@@ -103,7 +103,9 @@
orber_iiop_pm, orber_env]},
{applications, [stdlib, kernel, mnesia]},
{env, []},
- {mod, {orber, []}}
+ {mod, {orber, []}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","mnesia-4.12","kernel-3.0",
+ "inets-5.10","erts-6.0"]}
]}.
diff --git a/lib/orber/src/orber_env.erl b/lib/orber/src/orber_env.erl
index 1c8a90bc81..16dbb74253 100644
--- a/lib/orber/src/orber_env.erl
+++ b/lib/orber/src/orber_env.erl
@@ -204,9 +204,9 @@ info(IoDevice) ->
_ ->
lists:flatten(
io_lib:format("======= Orber Execution Environment ======~n"
- " *** Orber-~s is not running ***~n"
+ " *** Orber is not running ***~n"
"==========================================~n",
- [?ORBVSN]))
+ []))
end,
case IoDevice of
info_msg ->
@@ -223,6 +223,7 @@ info(IoDevice) ->
create_main_info() ->
{Major, Minor} = giop_version(),
+ {orber, _, OrberVsn} = lists:keyfind(orber, 1, application:loaded_applications()),
[io_lib:format("======= Orber Execution Environment ======~n"
"Orber version.................: ~s~n"
"Orber domain..................: ~s~n"
@@ -257,7 +258,7 @@ create_main_info() ->
"Debug Level...................: ~p~n"
"orbInitRef....................: ~p~n"
"orbDefaultInitRef.............: ~p~n",
- [?ORBVSN, domain(), iiop_port(), nat_iiop_port(), host(),
+ [OrberVsn, domain(), iiop_port(), nat_iiop_port(), host(),
nat_host(), ip_address_local(),
orber:orber_nodes(), Major, Minor,
iiop_timeout(), iiop_connection_timeout(),
diff --git a/lib/orber/src/orber_iiop.hrl b/lib/orber/src/orber_iiop.hrl
index 7a30af63e4..b2e970b30d 100644
--- a/lib/orber/src/orber_iiop.hrl
+++ b/lib/orber/src/orber_iiop.hrl
@@ -467,14 +467,14 @@
[{"iiop_version",?IIOP_VERSION },
{"host", {'tk_string', 0}},
{"port", 'tk_ushort'},
- {"object_key", {'tk_sequence', 'tk_octet', 0}}
+ {"object_key", {'tk_sequence', 'tk_octet', 0}},
{"components", ?IOP_TAGGEDCOMPONENT_SEQ}]}).
-define(PROFILEBODY_1_2_TYPEDEF, {'tk_struct', ?SYSTEM_TYPE, 'IIOP_ProfileBody_1_1',
[{"iiop_version",?IIOP_VERSION },
{"host", {'tk_string', 0}},
{"port", 'tk_ushort'},
- {"object_key", {'tk_sequence', 'tk_octet', 0}}
+ {"object_key", {'tk_sequence', 'tk_octet', 0}},
{"components", ?IOP_TAGGEDCOMPONENT_SEQ}]}).
-define(SSLIOP_SSL, {'tk_struct', ?SYSTEM_TYPE, 'SSLIOP_SSL',
diff --git a/lib/orber/src/orber_iiop_net.erl b/lib/orber/src/orber_iiop_net.erl
index 33e02e3c04..1bfc6b7d58 100644
--- a/lib/orber/src/orber_iiop_net.erl
+++ b/lib/orber/src/orber_iiop_net.erl
@@ -157,7 +157,7 @@ terminate(_Reason, _State) ->
ok.
%%-----------------------------------------------------------------
-%% Func: parse_options/2
+%% Func: get_options/2
%%-----------------------------------------------------------------
get_options(normal, _Options) ->
[];
@@ -212,14 +212,21 @@ get_options(ssl, Options) ->
%%-----------------------------------------------------------------
parse_options([{port, Type, Port} | Rest], State) ->
Options = get_options(Type, []),
- Options2 = case orber_env:ip_address_variable_defined() of
- false ->
- Options;
- Host ->
- IPVersion = orber:ip_version(),
- {ok, IP} = inet:getaddr(Host, IPVersion),
- [{ip, IP} | Options]
- end,
+ Family = orber_env:ip_version(),
+ IPFamilyOptions =
+ case Family of
+ inet -> [inet];
+ inet6 -> [inet6, {ipv6_v6only, true}]
+ end,
+ Options2 =
+ case orber_env:ip_address_variable_defined() of
+ false ->
+ IPFamilyOptions ++ Options;
+ Host ->
+ {ok, IP} = inet:getaddr(Host, Family),
+ IPFamilyOptions ++ [{ip, IP} |Options]
+ end,
+
{ok, Listen, NewPort} = orber_socket:listen(Type, Port, Options2, true),
{ok, Pid} = orber_iiop_socketsup:start_accept(Type, Listen, 0),
link(Pid),
@@ -283,28 +290,33 @@ handle_call({remove, Ref}, _From, State) ->
{reply, ok, State}
end;
handle_call({add, IP, Type, Port, AllOptions}, _From, State) ->
- Family = orber_env:ip_version(),
+ Family = orber_tb:keysearch(ip_family, AllOptions, orber_env:ip_version()),
+ IPFamilyOptions =
+ case Family of
+ inet -> [inet];
+ inet6 -> [inet6, {ipv6_v6only, true}]
+ end,
case inet:getaddr(IP, Family) of
{ok, IPTuple} ->
- try [{ip, IPTuple} |get_options(Type, AllOptions)] of
- Options ->
- Ref = make_ref(),
- ProxyOptions = filter_options(AllOptions, []),
- case orber_socket:listen(Type, Port, Options, false) of
- {ok, Listen, NewPort} ->
- {ok, Pid} = orber_iiop_socketsup:start_accept(Type, Listen, Ref,
- ProxyOptions),
- link(Pid),
- ets:insert(?CONNECTION_DB, #listen{pid = Pid,
- socket = Listen,
- port = NewPort,
- type = Type, ref = Ref,
- options = Options,
- proxy_options = ProxyOptions}),
- {reply, {ok, Ref}, State};
- Error ->
- {reply, Error, State}
- end
+ try
+ Options = IPFamilyOptions ++ [{ip, IPTuple} |get_options(Type, AllOptions)],
+ Ref = make_ref(),
+ ProxyOptions = filter_options(AllOptions, []),
+ case orber_socket:listen(Type, Port, Options, false) of
+ {ok, Listen, NewPort} ->
+ {ok, Pid} = orber_iiop_socketsup:start_accept(Type, Listen, Ref,
+ ProxyOptions),
+ link(Pid),
+ ets:insert(?CONNECTION_DB, #listen{pid = Pid,
+ socket = Listen,
+ port = NewPort,
+ type = Type, ref = Ref,
+ options = Options,
+ proxy_options = ProxyOptions}),
+ {reply, {ok, Ref}, State};
+ Error ->
+ {reply, Error, State}
+ end
catch
error:Reason ->
{reply, {error, Reason}, State}
diff --git a/lib/orber/src/orber_iiop_outproxy.erl b/lib/orber/src/orber_iiop_outproxy.erl
index 8319d89088..3adb40d01a 100644
--- a/lib/orber/src/orber_iiop_outproxy.erl
+++ b/lib/orber/src/orber_iiop_outproxy.erl
@@ -112,7 +112,8 @@ stop(Pid) ->
%%-----------------------------------------------------------------
init({connect, Host, Port, SocketType, SocketOptions, Parent, Key, NewKey}) ->
process_flag(trap_exit, true),
- case catch orber_socket:connect(SocketType, Host, Port, SocketOptions) of
+ case catch orber_socket:connect(SocketType, Host, Port,
+ orber_socket:get_ip_family_opts(Host) ++ SocketOptions) of
{'EXCEPTION', _E} ->
ignore;
%% We used to reply the below but since this would generate a CRASH REPORT
diff --git a/lib/orber/src/orber_iiop_pm.erl b/lib/orber/src/orber_iiop_pm.erl
index 927d12b3b2..fee2354f11 100644
--- a/lib/orber/src/orber_iiop_pm.erl
+++ b/lib/orber/src/orber_iiop_pm.erl
@@ -775,12 +775,11 @@ do_setup_connection(PMPid, Host, Port, SocketType, SocketOptions, Chars,
access_allowed(Host, Port, Type, {_,_,UserInterface}) ->
Flags = orber:get_flags(),
- Family = orber_env:ip_version(),
case ?ORB_FLAG_TEST(Flags, ?ORB_ENV_USE_ACL_OUTGOING) of
false when UserInterface == 0 ->
- get_local_interface(Type, Family);
+ get_local_interface(Type);
false ->
- inet:getaddr(UserInterface, Family);
+ inet:getaddr(UserInterface, get_ip_family(UserInterface));
true ->
SearchFor =
case Type of
@@ -789,43 +788,48 @@ access_allowed(Host, Port, Type, {_,_,UserInterface}) ->
ssl ->
ssl_out
end,
- {ok, Ip} = inet:getaddr(Host, Family),
+ {ok, Ip} = inet:getaddr(Host, get_ip_family(Host)),
case orber_acl:match(Ip, SearchFor, true) of
{true, [], 0} ->
- get_local_interface(Type, Family);
+ get_local_interface(Type);
{true, [], Port} ->
- get_local_interface(Type, Family);
+ get_local_interface(Type);
{true, [], {Min, Max}} when Port >= Min, Port =< Max ->
- get_local_interface(Type, Family);
- {true, [Interface], 0} ->
- {ok, NewIp} = inet:getaddr(Interface, Family),
+ get_local_interface(Type);
+ {true, [Interface], 0} ->
+ {ok, NewIp} = inet:getaddr(Interface, get_ip_family(Interface)),
{ok, NewIp, {Host, Port, 0}};
{true, [Interface], Port} ->
- {ok, NewIp} = inet:getaddr(Interface, Family),
+
+ {ok, NewIp} = inet:getaddr(Interface, get_ip_family(Interface)),
{ok, NewIp, {Host, Port, 0}};
{true, [Interface], {Min, Max}} when Port >= Min, Port =< Max ->
- {ok, NewIp} = inet:getaddr(Interface, Family),
+
+ {ok, NewIp} = inet:getaddr(Interface, get_ip_family(Interface)),
{ok, NewIp, {Host, Port, 0}};
_ ->
false
end
end.
-get_local_interface(normal, Family) ->
+get_local_interface(normal) ->
case orber_env:ip_address_local() of
[] ->
ok;
[Interface] ->
- inet:getaddr(Interface, Family)
+ inet:getaddr(Interface, get_ip_family(Interface))
end;
-get_local_interface(ssl, Family) ->
+get_local_interface(ssl) ->
case orber_env:iiop_ssl_ip_address_local() of
[] ->
ok;
[Interface] ->
- inet:getaddr(Interface, Family)
+ inet:getaddr(Interface, get_ip_family(Interface))
end.
+get_ip_family(Addr) ->
+ [Family] = orber_socket:get_ip_family_opts(Addr),
+ Family.
invoke_connection_closed(false) ->
ok;
diff --git a/lib/orber/src/orber_interceptors.erl b/lib/orber/src/orber_interceptors.erl
index 407823ea79..62870b35b5 100644
--- a/lib/orber/src/orber_interceptors.erl
+++ b/lib/orber/src/orber_interceptors.erl
@@ -112,7 +112,7 @@ pop_system_message_interceptor(out) ->
[{_, []}] ->
ok;
[{_, Interceptors}] ->
- ets:insert(orber_interceptors, {message_out_interceptors, remove_last_element(Interceptors)});
+ ets:insert(orber_interceptors, {message_out_interceptors, lists:droplast(Interceptors)});
_ ->
corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO})
end.
@@ -151,12 +151,3 @@ apply_message_interceptors([], F, ObjRef, Bytes) ->
apply_message_interceptors([M | Rest], F, ObjRef, Bytes) ->
apply_message_interceptors(Rest, F, ObjRef, apply(M, F, [ObjRef, Bytes])).
-
-remove_last_element([]) ->
- [];
-remove_last_element([M]) ->
- [];
-remove_last_element([M |Tail]) ->
- remove_last_element([Tail]).
-
-
diff --git a/lib/orber/src/orber_socket.erl b/lib/orber/src/orber_socket.erl
index 07a0e09ccc..4507d90cce 100644
--- a/lib/orber/src/orber_socket.erl
+++ b/lib/orber/src/orber_socket.erl
@@ -37,7 +37,8 @@
-export([start/0, connect/4, listen/3, listen/4, accept/2, accept/3, write/3,
controlling_process/3, close/2, peername/2, sockname/2,
peerdata/2, peercert/2, sockdata/2, setopts/3,
- clear/2, shutdown/3, post_accept/2, post_accept/3]).
+ clear/2, shutdown/3, post_accept/2, post_accept/3,
+ get_ip_family_opts/1]).
%%-----------------------------------------------------------------
%% Internal exports
@@ -205,29 +206,27 @@ listen(normal, Port, Options, Exception) ->
MaxSize ->
[{packet_size, MaxSize}|Options2]
end,
- case catch gen_tcp:listen(Port, [binary, {packet,cdr}, {keepalive, Keepalive},
+ Options4 = [binary, {packet,cdr}, {keepalive, Keepalive},
{reuseaddr,true}, {backlog, Backlog} |
- Options3]) of
+ Options3],
+
+ case catch gen_tcp:listen(Port, Options4) of
{ok, ListenSocket} ->
{ok, ListenSocket, check_port(Port, normal, ListenSocket)};
{error, Reason} when Exception == false ->
{error, Reason};
{error, eaddrinuse} ->
- AllOpts = [binary, {packet,cdr},
- {reuseaddr,true} | Options3],
orber:dbg("[~p] orber_socket:listen(normal, ~p, ~p);~n"
"Looks like the listen port is already in use.~n"
"Check if another Orber is started~n"
"on the same node and uses the same listen port (iiop_port). But it may also~n"
"be used by any other application; confirm with 'netstat'.",
- [?LINE, Port, AllOpts], ?DEBUG_LEVEL),
+ [?LINE, Port, Options4], ?DEBUG_LEVEL),
corba:raise(#'COMM_FAILURE'{completion_status=?COMPLETED_NO});
Error ->
- AllOpts = [binary, {packet,cdr},
- {reuseaddr,true} | Options3],
orber:dbg("[~p] orber_socket:listen(normal, ~p, ~p);~n"
"Failed with reason: ~p",
- [?LINE, Port, AllOpts, Error], ?DEBUG_LEVEL),
+ [?LINE, Port, Options4, Error], ?DEBUG_LEVEL),
corba:raise(#'COMM_FAILURE'{completion_status=?COMPLETED_NO})
end;
listen(ssl, Port, Options, Exception) ->
@@ -252,26 +251,24 @@ listen(ssl, Port, Options, Exception) ->
true ->
Options3
end,
- case catch ssl:listen(Port, [binary, {packet,cdr},
- {backlog, Backlog} | Options4]) of
+ Options5 = [binary, {packet,cdr}, {backlog, Backlog} | Options4],
+ case catch ssl:listen(Port, Options5) of
{ok, ListenSocket} ->
{ok, ListenSocket, check_port(Port, ssl, ListenSocket)};
{error, Reason} when Exception == false ->
{error, Reason};
{error, eaddrinuse} ->
- AllOpts = [binary, {packet,cdr} | Options4],
orber:dbg("[~p] orber_socket:listen(ssl, ~p, ~p);~n"
"Looks like the listen port is already in use. Check if~n"
"another Orber is started on the same node and uses the~n"
"same listen port (iiop_port). But it may also~n"
"be used by any other application; confirm with 'netstat'.",
- [?LINE, Port, AllOpts], ?DEBUG_LEVEL),
+ [?LINE, Port, Options5], ?DEBUG_LEVEL),
corba:raise(#'COMM_FAILURE'{completion_status=?COMPLETED_NO});
Error ->
- AllOpts = [binary, {packet,cdr} | Options4],
orber:dbg("[~p] orber_socket:listen(ssl, ~p, ~p);~n"
"Failed with reason: ~p",
- [?LINE, Port, AllOpts, Error], ?DEBUG_LEVEL),
+ [?LINE, Port, Options5, Error], ?DEBUG_LEVEL),
corba:raise(#'COMM_FAILURE'{completion_status=?COMPLETED_NO})
end.
@@ -485,16 +482,50 @@ check_port(Port, _, _) ->
%%-----------------------------------------------------------------
%% Check Options.
check_options(normal, Options, _Generation) ->
- [orber:ip_version()|Options];
+ Options;
check_options(ssl, Options, Generation) ->
- case orber:ip_version() of
- inet when Generation > 2 ->
+ if
+ Generation > 2 ->
[{ssl_imp, new}|Options];
- inet ->
- [{ssl_imp, old}|Options];
- inet6 when Generation > 2 ->
- [{ssl_imp, new}, inet6|Options];
- inet6 ->
- [{ssl_imp, old}, inet6|Options]
+ true ->
+ [{ssl_imp, old}|Options]
+ end.
+
+
+%%-----------------------------------------------------------------
+%% Check IP Family.
+get_ip_family_opts(Host) ->
+ case inet:parse_address(Host) of
+ {ok, {_,_,_,_}} ->
+ [inet];
+ {ok, {_,_,_,_,_,_,_,_}} ->
+ [inet6];
+ {error, einval} ->
+ check_family_for_name(Host, orber_env:ip_version())
+ end.
+
+check_family_for_name(Host, inet) ->
+ case inet:getaddr(Host, inet) of
+ {ok, _Address} ->
+ [inet];
+ {error, _} ->
+ case inet:getaddr(Host, inet6) of
+ {ok, _Address} ->
+ [inet6];
+ {error, _} ->
+ [inet]
+ end
+ end;
+check_family_for_name(Host, inet6) ->
+ case inet:getaddr(Host, inet6) of
+ {ok, _Address} ->
+ [inet6];
+ {error, _} ->
+ case inet:getaddr(Host, inet) of
+ {ok, _Address} ->
+ [inet];
+ {error, _} ->
+ [inet6]
+ end
end.
diff --git a/lib/orber/test/Makefile b/lib/orber/test/Makefile
index 2f8777c773..50be14c24a 100644
--- a/lib/orber/test/Makefile
+++ b/lib/orber/test/Makefile
@@ -73,7 +73,8 @@ MODULES = \
orber_firewall_ipv6_in_SUITE \
orber_firewall_ipv4_out_SUITE \
orber_firewall_ipv6_out_SUITE \
- orber_nat_SUITE
+ orber_nat_SUITE \
+ ip_v4v6_interop_SUITE
GEN_MOD_ORBER = \
oe_orber_test \
diff --git a/lib/orber/test/ip_v4v6_interop_SUITE.erl b/lib/orber/test/ip_v4v6_interop_SUITE.erl
new file mode 100644
index 0000000000..5eee5a29c2
--- /dev/null
+++ b/lib/orber/test/ip_v4v6_interop_SUITE.erl
@@ -0,0 +1,199 @@
+%%----------------------------------------------------------------------
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%% File : ip_v4v6_interop_SUITE.erl
+%% Description :
+%%
+%%----------------------------------------------------------------------
+-module(ip_v4v6_interop_SUITE).
+
+-compile(export_all).
+%%----------------------------------------------------------------------
+%% External exports
+%%----------------------------------------------------------------------
+-export([
+ all/0,
+ init_per_suite/1,
+ end_per_suite/1,
+ init_per_testcase/2,
+ end_per_testcase/2,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2
+ ]).
+%%-----------------------------------------------------------------
+%% Internal exports
+%%-----------------------------------------------------------------
+-export([]).
+
+%%----------------------------------------------------------------------
+%% Include files
+%%----------------------------------------------------------------------
+-include_lib("test_server/include/test_server.hrl").
+-include_lib("orber/include/corba.hrl").
+-include_lib("orber/COSS/CosNaming/CosNaming.hrl").
+-include_lib("orber/src/orber_iiop.hrl").
+-include_lib("orber/src/ifr_objects.hrl").
+-include("idl_output/orber_test_server.hrl").
+-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
+-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
+
+%%----------------------------------------------------------------------
+%% Macros
+%%----------------------------------------------------------------------
+-define(default_timeout, ?t:minutes(15)).
+
+-define(match(ExpectedRes,Expr),
+ fun() ->
+ AcTuAlReS = (catch (Expr)),
+ case AcTuAlReS of
+ ExpectedRes ->
+ io:format("------ CORRECT RESULT ------~n~p~n",
+ [AcTuAlReS]),
+ AcTuAlReS;
+ _ ->
+ io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
+ [AcTuAlReS]),
+ ?line exit(AcTuAlReS)
+ end
+ end()).
+%%----------------------------------------------------------------------
+%% Records
+%%----------------------------------------------------------------------
+
+%%======================================================================
+%% Initialization functions.
+%%======================================================================
+
+init_per_testcase(_Case, Config) ->
+ %% Starting dual configured ORB
+ orber:jump_start([{iiop_port, 10001}, {flags, 16#1000}]),
+ orber:info(),
+ Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+
+end_per_testcase(_Case, Config) ->
+ orber:jump_stop(),
+ Dog = ?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(Config) ->
+ Config.
+
+%%====================================================================
+%% SUITE specification
+%%====================================================================
+all() ->
+ [
+ dual_ipv4v6
+ ].
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+
+groups() ->
+ [].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+%%====================================================================
+%% Test Cases
+%%====================================================================
+dual_ipv4v6(doc) ->
+ ["ORB configured for supporting both IPv4 and IPv6"];
+dual_ipv4v6(_Config) ->
+
+ %% Starting slave node with ipv4 configured ORB
+ {ok, Ipv4Node, _Ipv4Host} =
+ ?match({ok,_,_}, orber_test_lib:js_node([{iiop_port, 4001}])),
+ Ipv4NS = orber_test_lib:remote_apply(Ipv4Node, corba, resolve_initial_references, ["NameService"]),
+
+ %% Starting slave node with ipv6 configured ORB
+ {ok, Ipv6Node, _Ipv6Host} =
+ ?match({ok,_,_}, orber_test_lib:js_node([{iiop_port, 6001}, {flags, 16#0100}])),
+ Ipv6NS = orber_test_lib:remote_apply(Ipv6Node, corba, resolve_initial_references, ["NameService"]),
+
+ %% Add the ipv6 interface in the dual configured ORB
+ ?match({ok, _}, orber:add_listen_interface("::1", normal,
+ [{ip_family, inet6}, {iiop_port, 10002}])),
+ DualNS = corba:resolve_initial_references("NameService"),
+
+ %% Bind IPv4 NameServer to a name in the dual stack orbs NameServer
+ NSDual4 = orber_test_lib:remote_apply(Ipv4Node, corba, resolve_initial_references_remote,
+ ["NameService", ["iiop://127.0.0.1:10001"]]),
+ ?match(ok, orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', bind,
+ [NSDual4, lname:new(["ns4"]), Ipv4NS])),
+ 'CosNaming_NamingContext':resolve(DualNS, lname:new(["ns4"])),
+
+ %% Bind IPv6 NameServer to a name in the dual stack orbs NameServer
+ NSDual6 = orber_test_lib:remote_apply(Ipv6Node, corba, resolve_initial_references_remote,
+ ["NameService", ["iiop://[::1]:10002"]]),
+ ?match(ok, orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', bind,
+ [NSDual6, lname:new(["ns6"]), Ipv6NS])),
+ 'CosNaming_NamingContext':resolve(DualNS, lname:new(["ns6"])),
+
+ %% IPv4: Fetch IPv6 NS reference from dual stack orber and register own NameServer in that
+ Ipv4NSO = orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', resolve,
+ [NSDual4, lname:new(["ns6"])]),
+ ?match(ok, orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', bind,
+ [Ipv4NSO, lname:new(["nso"]), Ipv4NS])),
+
+ %% IPv6: Fetch IPv4 NS reference from dual stack orber and register own NameServer in that
+ Ipv6NSO = orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', resolve,
+ [NSDual6, lname:new(["ns4"])]),
+ ?match(ok, orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', bind,
+ [Ipv6NSO, lname:new(["nso"]), Ipv6NS])),
+
+
+ %% IPv4: Fetch own NS reference from IPv6 NameServer and add a context then check that everything went well
+ Ipv4NSFromIpv6 = orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', resolve,
+ [Ipv6NS, lname:new(["nso"])]),
+ _Ipv4NC = orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', bind_new_context,
+ [Ipv4NSFromIpv6, lname:new(["test_context4"])]),
+
+ %% IPv6: Fetch own NS reference from IPv4 NameServer and add a context then check that everything went well
+ Ipv6NSFromIpv4 = orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', resolve,
+ [Ipv4NS, lname:new(["nso"])]),
+ _Ipv6NC = orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', bind_new_context,
+ [Ipv6NSFromIpv4, lname:new(["test_context6"])]),
+
+ %% Check that all the names are register correctly
+ {ok,DualNames,_} = 'CosNaming_NamingContext':list(DualNS, 100),
+ {ok,Ipv4Names,_} = orber_test_lib:remote_apply(Ipv4Node, 'CosNaming_NamingContext', list, [Ipv4NS, 100]),
+ {ok,Ipv6Names,_} = orber_test_lib:remote_apply(Ipv6Node, 'CosNaming_NamingContext', list, [Ipv6NS, 100]),
+
+ io:format("\nNames in Dual NS: ~p\n", [DualNames]),
+ ?match(2, length(DualNames)),
+ io:format("\nNames in IPv4 NS: ~p\n", [Ipv4Names]),
+ ?match(2, length(Ipv4Names)),
+ io:format("\nNames in IPv6 NS: ~p\n", [Ipv6Names]),
+ ?match(2, length(Ipv6Names)),
+
+ ok.
+
diff --git a/lib/orber/test/multi_ORB_SUITE.erl b/lib/orber/test/multi_ORB_SUITE.erl
index 41a309ff16..40d8846e0f 100644
--- a/lib/orber/test/multi_ORB_SUITE.erl
+++ b/lib/orber/test/multi_ORB_SUITE.erl
@@ -582,12 +582,12 @@ proxy_interface_ipv6_api2() ->
IOR1 = ?match(#'IOP_IOR'{},
orber_test_lib:remote_apply(ClientNode, corba, string_to_object,
- ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
+ ["corbaloc::1.2@["++IP++"]:"++integer_to_list(ServerPort)++"/NameService"])),
?match({'external', {IP, ServerPort, _ObjectKey, _Counter, _TP, _NewHD}},
orber_test_lib:remote_apply(ClientNode, iop_ior, get_key, [IOR1])),
IOR2 = ?match(#'IOP_IOR'{},
orber_test_lib:remote_apply(ClientNode, corba, string_to_object,
- ["corbaloc::1.2@"++Loopback++":"++integer_to_list(ServerPort)++"/NameService"])),
+ ["corbaloc::1.2@["++Loopback++"]:"++integer_to_list(ServerPort)++"/NameService"])),
?match({'external', {Loopback, ServerPort, _ObjectKey, _Counter, _TP, _NewHD}},
orber_test_lib:remote_apply(ClientNode, iop_ior, get_key, [IOR2])),
ok.
diff --git a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
index 10827b6ef5..2853949a49 100644
--- a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
@@ -188,6 +188,7 @@ allow_port_range_api(_Config) ->
?ORB_ENV_USE_ACL_INCOMING)},
{iiop_acl, [{tcp_in, IP++"/128#5980/6000"}]}])),
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
+ io:format("ServerNode: ~p\nServerHost: ~p\n", [ServerNode, ServerHost]),
IOR =
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
@@ -243,34 +244,34 @@ check_address_api(doc) -> ["Test corbaloc strings"];
check_address_api(suite) -> [];
check_address_api(_Config) ->
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]],"NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:C02A:2A2A/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]],[]},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:C02A:2A2A")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:C02A:2A2A]")),
?match({[[iiop,{1,2},"0:0:0:0:0:FFFF:C02A:2A2A",2809]],"NameService"},
- orber_cosnaming_utils:addresses(":1.2@0:0:0:0:0:FFFF:C02A:2A2A/NameService")),
+ orber_cosnaming_utils:addresses(":1.2@[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",4001]],"NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]],"NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]],[]},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]],[]},
- orber_cosnaming_utils:addresses("iiop:1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001")),
+ orber_cosnaming_utils:addresses("iiop:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",2809]],"NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",2809]],[]},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11]")),
?match({[[iiop,{1,2},"0:0:0:0:0:FFFF:10.11.11.11",2809]],"NameService"},
- orber_cosnaming_utils:addresses(":1.2@0:0:0:0:0:FFFF:10.11.11.11/NameService")),
+ orber_cosnaming_utils:addresses(":1.2@[0:0:0:0:0:FFFF:10.11.11.11]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",4001]],"NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11:4001/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001]],"NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001]],[]},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001/")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001/")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001]],[]},
- orber_cosnaming_utils:addresses("iiop:1.1@0:0:0:0:0:FFFF:10.11.11.11:4001/")),
+ orber_cosnaming_utils:addresses("iiop:1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001/")),
?match({[[iiop,{1,1},"myhost",4001]],[]},
orber_cosnaming_utils:addresses("iiop:1.1@myhost:4001")),
@@ -282,31 +283,31 @@ check_address_api(_Config) ->
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001],
[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]], "NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001,:1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001,:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001],
[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]], []},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001,:1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001,:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",4001],
[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]], "NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11:4001,:1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11]:4001,:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001],
[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",4001]], "NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001,:0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001,:[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",2809],
[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",4001]], "NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11,:1.1@0:0:0:0:0:FFFF:C02A:2A2A:4001/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11],:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]:4001/NameService")),
?match({[[iiop,{1,1},"0:0:0:0:0:FFFF:10.11.11.11",4001],
[iiop,{1,1},"0:0:0:0:0:FFFF:C02A:2A2A",2809]], "NameService"},
- orber_cosnaming_utils:addresses(":1.1@0:0:0:0:0:FFFF:10.11.11.11:4001,:1.1@0:0:0:0:0:FFFF:C02A:2A2A/NameService")),
+ orber_cosnaming_utils:addresses(":1.1@[0:0:0:0:0:FFFF:10.11.11.11]:4001,:1.1@[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",2809],
[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]], "NameService"},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11,:0:0:0:0:0:FFFF:C02A:2A2A/NameService")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11],:[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",2809],
[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]], []},
- orber_cosnaming_utils:addresses(":0:0:0:0:0:FFFF:10.11.11.11,:0:0:0:0:0:FFFF:C02A:2A2A/")),
+ orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:10.11.11.11],:[0:0:0:0:0:FFFF:C02A:2A2A]/")),
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:10.11.11.11",2809],
[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]], []},
- orber_cosnaming_utils:addresses("iiop:0:0:0:0:0:FFFF:10.11.11.11,:0:0:0:0:0:FFFF:C02A:2A2A/")),
+ orber_cosnaming_utils:addresses("iiop:[0:0:0:0:0:FFFF:10.11.11.11],:[0:0:0:0:0:FFFF:C02A:2A2A]/")),
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -315,7 +316,7 @@ check_address_api(_Config) ->
{iiop_acl, [{tcp_in, IP++"/128"}]}])),
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'IOP_IOR',_,_},
- corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
+ corba:string_to_object("corbaloc::1.2@["++IP++"]:"++integer_to_list(ServerPort)++"/NameService")),
% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
diff --git a/lib/orber/test/orber_test_lib.erl b/lib/orber/test/orber_test_lib.erl
index 6824d25aef..46ed26f210 100644
--- a/lib/orber/test/orber_test_lib.erl
+++ b/lib/orber/test/orber_test_lib.erl
@@ -166,7 +166,7 @@ get_host(Family) ->
{6, _, _} when Family == inet ->
"127.0.0.1";
{6, _, _} ->
- "0:0:0:0:0:FFFF:7F00:0001";
+ "0:0:0:0:0:0:0:0001";
_ ->
[IP] = ?match([_], orber:host()),
IP
@@ -192,16 +192,16 @@ get_loopback_interface(Family) ->
{6, _, _} when Family == inet ->
"127.0.0.2";
{6, _, _} ->
- "0:0:0:0:0:FFFF:7F00:0002";
+ "0:0:0:0:0:0:0:0002";
_ when Family == inet ->
"127.0.0.1";
_ ->
- "0:0:0:0:0:FFFF:7F00:0001"
+ "0:0:0:0:0:0:0:0001"
end;
_ when Family == inet ->
"127.0.0.1";
_ ->
- "0:0:0:0:0:FFFF:7F00:0001"
+ "0:0:0:0:0:0:0:0001"
end.
%%------------------------------------------------------------
diff --git a/lib/orber/vsn.mk b/lib/orber/vsn.mk
index 7bbebc65dc..28fe9323fb 100644
--- a/lib/orber/vsn.mk
+++ b/lib/orber/vsn.mk
@@ -1,2 +1 @@
-ORBER_VSN = 3.6.26.1
-
+ORBER_VSN = 3.7.1
diff --git a/lib/os_mon/c_src/memsup.c b/lib/os_mon/c_src/memsup.c
index b5114d10ed..5dcab07dd8 100644
--- a/lib/os_mon/c_src/memsup.c
+++ b/lib/os_mon/c_src/memsup.c
@@ -104,7 +104,7 @@
#if !defined (__OpenBSD__) && !defined (__NetBSD__)
#include <vm/vm_param.h>
#endif
-#if defined (__FreeBSD__) || defined(__DragonFly__) || defined (__NetBSD__)
+#if defined (__FreeBSD__) || defined(__DragonFly__) || defined (__NetBSD__) || defined(__OpenBSD__)
#include <sys/vmmeter.h>
#endif
#endif
@@ -324,7 +324,7 @@ get_mem_procfs(memory_ext *me){
/* arch specific functions */
-#if defined(__linux__) /* ifdef SYSINFO */
+#if defined(__linux__) && !defined(__ANDROID__)/* ifdef SYSINFO */
/* sysinfo does not include cached memory which is a problem. */
static int
get_extended_mem_sysinfo(memory_ext *me) {
@@ -395,8 +395,12 @@ get_extended_mem_sgi(memory_ext *me) {
static void
get_extended_mem(memory_ext *me) {
+/* android */
+#if defined(__ANDROID__)
+ if (get_mem_procfs(me)) return;
+
/* linux */
-#if defined(__linux__)
+#elif defined(__linux__)
if (get_mem_procfs(me)) return;
if (get_extended_mem_sysinfo(me)) return;
diff --git a/lib/os_mon/doc/src/book.xml b/lib/os_mon/doc/src/book.xml
index 17645b81fd..1b927fc9ac 100644
--- a/lib/os_mon/doc/src/book.xml
+++ b/lib/os_mon/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/cpu_sup.xml b/lib/os_mon/doc/src/cpu_sup.xml
index 7b28083fbc..59da876208 100644
--- a/lib/os_mon/doc/src/cpu_sup.xml
+++ b/lib/os_mon/doc/src/cpu_sup.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/disksup.xml b/lib/os_mon/doc/src/disksup.xml
index bfa3d3578f..0e76178edb 100644
--- a/lib/os_mon/doc/src/disksup.xml
+++ b/lib/os_mon/doc/src/disksup.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -73,6 +73,17 @@
much disk can be utilized before the <c>disk_almost_full</c>
alarm is set. The default is 0.80 (80%).</p>
</item>
+ <tag><c>disksup_posix_only = bool()</c></tag>
+ <item>
+ <p>Specifies whether the <c>disksup</c> helper process should only
+ use POSIX conformant commands (<c>true</c>) or not. The default is
+ <c>false</c>. Setting this parameter to <c>true</c> can be
+ necessary on embedded systems with stripped-down versions
+ of Unix tools like <c>df</c>. The returned disk data and alarms
+ can be different when using this option.</p>
+ <p>The parameter is ignored on platforms that are known to not be
+ posix compatible (Windows and SunOS).</p>
+ </item>
</taglist>
<p>See <seealso marker="kernel:config">config(4)</seealso> for
information about how to change the value of configuration
diff --git a/lib/os_mon/doc/src/fascicules.xml b/lib/os_mon/doc/src/fascicules.xml
index 43090b4aed..fadd37eefb 100644
--- a/lib/os_mon/doc/src/fascicules.xml
+++ b/lib/os_mon/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/os_mon/doc/src/memsup.xml b/lib/os_mon/doc/src/memsup.xml
index 67d617375e..62f77ea12f 100644
--- a/lib/os_mon/doc/src/memsup.xml
+++ b/lib/os_mon/doc/src/memsup.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml
index db386979c0..d3acc1effc 100644
--- a/lib/os_mon/doc/src/notes.xml
+++ b/lib/os_mon/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,6 +30,93 @@
</header>
<p>This document describes the changes made to the OS_Mon application.</p>
+<section><title>Os_Mon 2.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Do not crash with badmatch when integer part of loadavg
+ has more than 2 digits.</p>
+ <p>
+ Own Id: OTP-12581</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Fix compilation of memsup on OpenBSD.</p>
+ <p>
+ Own Id: OTP-12404</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Os_Mon 2.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Adds a new application parameter 'disksup_posix_only', to
+ make diskup use only options defined in the POSIX
+ standard.</p>
+ <p>
+ Own Id: OTP-12053</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Os_Mon 2.2.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Os_Mon 2.2.14</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/os_mon/doc/src/nteventlog.xml b/lib/os_mon/doc/src/nteventlog.xml
index 1e3fad90cd..8b27092f85 100644
--- a/lib/os_mon/doc/src/nteventlog.xml
+++ b/lib/os_mon/doc/src/nteventlog.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/os_mon_app.xml b/lib/os_mon/doc/src/os_mon_app.xml
index 8b44b70c5f..f6bb2300bb 100644
--- a/lib/os_mon/doc/src/os_mon_app.xml
+++ b/lib/os_mon/doc/src/os_mon_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/os_mon_mib.xml b/lib/os_mon/doc/src/os_mon_mib.xml
index 220d6a4a22..fa183086ff 100644
--- a/lib/os_mon/doc/src/os_mon_mib.xml
+++ b/lib/os_mon/doc/src/os_mon_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/os_sup.xml b/lib/os_mon/doc/src/os_sup.xml
index 792d18ba14..fb162c15a7 100644
--- a/lib/os_mon/doc/src/os_sup.xml
+++ b/lib/os_mon/doc/src/os_sup.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/part_notes.xml b/lib/os_mon/doc/src/part_notes.xml
index 8fe226f53e..0969fb9136 100644
--- a/lib/os_mon/doc/src/part_notes.xml
+++ b/lib/os_mon/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/doc/src/ref_man.xml b/lib/os_mon/doc/src/ref_man.xml
index 5a50c122fd..10c0fef52c 100644
--- a/lib/os_mon/doc/src/ref_man.xml
+++ b/lib/os_mon/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl
index 34251178ee..66e7973e7e 100644
--- a/lib/os_mon/src/cpu_sup.erl
+++ b/lib/os_mon/src/cpu_sup.erl
@@ -221,7 +221,7 @@ get_uint32_measurement(Request, #internal{port = P, os_type = {unix, sunos}}) ->
port_server_call(P, Request);
get_uint32_measurement(Request, #internal{os_type = {unix, linux}}) ->
{ok,F} = file:open("/proc/loadavg",[read,raw]),
- {ok,D} = file:read(F,24),
+ {ok,D} = file:read_line(F),
ok = file:close(F),
{ok,[Load1,Load5,Load15,_PRun,PTotal],_} = io_lib:fread("~f ~f ~f ~d/~d", D),
case Request of
@@ -543,7 +543,8 @@ measurement_server_init() ->
Server = case OS of
{unix, Flavor} when Flavor==sunos;
Flavor==linux ->
- port_server_start();
+ {ok, Pid} = port_server_start_link(),
+ Pid;
{unix, Flavor} when Flavor==darwin;
Flavor==freebsd;
Flavor==dragonfly;
@@ -588,8 +589,9 @@ measurement_server_loop(State) ->
Error -> Pid ! {error, Error}
end,
measurement_server_loop(State);
- {'EXIT', Pid, _n} when State#internal.port == Pid ->
- measurement_server_loop(State#internal{port = port_server_start()});
+ {'EXIT', OldPid, _n} when State#internal.port == OldPid ->
+ {ok, NewPid} = port_server_start_link(),
+ measurement_server_loop(State#internal{port = NewPid});
_Other ->
measurement_server_loop(State)
end.
@@ -605,12 +607,12 @@ port_server_call(Pid, Command) ->
{Pid, {error, Reason}} -> {error, Reason}
end.
-port_server_start() ->
+port_server_start_link() ->
Timeout = 6000,
Pid = spawn_link(fun() -> port_server_init(Timeout) end),
Pid ! {self(), ?ping},
receive
- {Pid, {data,4711}} -> Pid;
+ {Pid, {data,4711}} -> {ok, Pid};
{error,Reason} -> {error, Reason}
after Timeout ->
{error, timeout}
diff --git a/lib/os_mon/src/disksup.erl b/lib/os_mon/src/disksup.erl
index 278da26a20..af5bcc6fe8 100644
--- a/lib/os_mon/src/disksup.erl
+++ b/lib/os_mon/src/disksup.erl
@@ -81,10 +81,12 @@ param_type(disk_space_check_interval, Val) when is_integer(Val),
param_type(disk_almost_full_threshold, Val) when is_number(Val),
0=<Val,
Val=<1 -> true;
+param_type(disksup_posix_only, Val) when Val==true; Val==false -> true;
param_type(_Param, _Val) -> false.
param_default(disk_space_check_interval) -> 30;
-param_default(disk_almost_full_threshold) -> 0.80.
+param_default(disk_almost_full_threshold) -> 0.80;
+param_default(disksup_posix_only) -> false.
%%----------------------------------------------------------------------
%% gen_server callbacks
@@ -94,7 +96,8 @@ init([]) ->
process_flag(trap_exit, true),
process_flag(priority, low),
- OS = get_os(),
+ PosixOnly = os_mon:get_env(disksup, disksup_posix_only),
+ OS = get_os(PosixOnly),
Port = case OS of
{unix, Flavor} when Flavor==sunos4;
Flavor==solaris;
@@ -102,6 +105,7 @@ init([]) ->
Flavor==dragonfly;
Flavor==darwin;
Flavor==linux;
+ Flavor==posix;
Flavor==openbsd;
Flavor==netbsd;
Flavor==irix64;
@@ -205,14 +209,16 @@ format_status(_Opt, [_PDict, #state{os = OS, threshold = Threshold,
%% Internal functions
%%----------------------------------------------------------------------
-get_os() ->
+get_os(PosixOnly) ->
case os:type() of
{unix, sunos} ->
- case os:version() of
+ case os:version() of
{5,_,_} -> {unix, solaris};
{4,_,_} -> {unix, sunos4};
V -> exit({unknown_os_version, V})
- end;
+ end;
+ {unix, _} when PosixOnly ->
+ {unix, posix};
{unix, irix64} -> {unix, irix};
OS ->
OS
@@ -259,6 +265,9 @@ check_disk_space({unix, irix}, Port, Threshold) ->
check_disk_space({unix, linux}, Port, Threshold) ->
Result = my_cmd("/bin/df -lk", Port),
check_disks_solaris(skip_to_eol(Result), Threshold);
+check_disk_space({unix, posix}, Port, Threshold) ->
+ Result = my_cmd("df -k -P", Port),
+ check_disks_solaris(skip_to_eol(Result), Threshold);
check_disk_space({unix, dragonfly}, Port, Threshold) ->
Result = my_cmd("/bin/df -k -t ufs,hammer", Port),
check_disks_solaris(skip_to_eol(Result), Threshold);
diff --git a/lib/os_mon/src/nteventlog.erl b/lib/os_mon/src/nteventlog.erl
index d624048c29..97eaf07179 100644
--- a/lib/os_mon/src/nteventlog.erl
+++ b/lib/os_mon/src/nteventlog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -122,8 +122,8 @@ code_change(_OldVsn, State, _Extra) ->
start_portprogram(Identifier) ->
Command =
- filename:join([code:priv_dir(os_mon),"bin","nteventlog.exe"]) ++
- " " ++ make_list(Identifier),
+ "\"" ++ filename:join([code:priv_dir(os_mon),"bin","nteventlog.exe"]) ++
+ "\" " ++ make_list(Identifier),
open_port({spawn,Command},[{packet,2}]).
make_list(X) when is_atom(X) ->
diff --git a/lib/os_mon/src/os_mon.app.src b/lib/os_mon/src/os_mon.app.src
index 15bbd2663c..cc08cebe3d 100644
--- a/lib/os_mon/src/os_mon.app.src
+++ b/lib/os_mon/src/os_mon.app.src
@@ -29,4 +29,7 @@
{start_disksup, true},
{start_memsup, true},
{start_os_sup, false}]},
- {mod, {os_mon, []}}]}.
+ {mod, {os_mon, []}},
+ {runtime_dependencies, ["stdlib-2.0","snmp-4.25.1","sasl-2.4",
+ "otp_mibs-1.0.9","mnesia-4.12","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/os_mon/src/os_mon.appup.src b/lib/os_mon/src/os_mon.appup.src
index f8e09a7d87..480f5d9511 100644
--- a/lib/os_mon/src/os_mon.appup.src
+++ b/lib/os_mon/src/os_mon.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,26 +16,7 @@
%%
%% %CopyrightEnd%
%%
-
{"%VSN%",
- [
- {"2.1",
- [{load_module, cpu_sup},
- {load_module, disksup},
- {load_module, memsup},
- {load_module, os_mon},
- {load_module, os_mon_mib}]},
- {"2.1.1",
- [{load_module, os_mon_mib}]}
- ],
- [
- {"2.1",
- [{load_module, cpu_sup},
- {load_module, disksup},
- {load_module, memsup},
- {load_module, os_mon},
- {load_module, os_mon_mib}]},
- {"2.1.1",
- [{load_module, os_mon_mib}]}
- ]
+ [{<<".*">>,[{restart_application, os_mon}]}],
+ [{<<".*">>,[{restart_application, os_mon}]}]
}.
diff --git a/lib/os_mon/src/os_sup.erl b/lib/os_mon/src/os_sup.erl
index f5c6c138ba..3ad8b6e990 100644
--- a/lib/os_mon/src/os_sup.erl
+++ b/lib/os_mon/src/os_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -228,8 +228,8 @@ code_change(_OldVsn, State, _Extra) ->
start_portprogram() ->
OwnPath = os_mon:get_env(os_sup, os_sup_own),
Command =
- filename:join([code:priv_dir(os_mon), "bin", "ferrule"]) ++
- " " ++ OwnPath,
+ "\"" ++ filename:join([code:priv_dir(os_mon), "bin", "ferrule"]) ++
+ "\" " ++ OwnPath,
open_port({spawn, Command}, [{packet, 2}]).
%% os:cmd(cmd_str(enable)) should be done BEFORE starting os_sup
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index e0382cb0c7..9f58e043db 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -257,8 +257,8 @@ port(Config) when is_list(Config) ->
terminate(suite) ->
[];
terminate(Config) when is_list(Config) ->
- ?line ok = application:set_env(os_mon, start_cpu_sup, false),
- ?line ok = supervisor:terminate_child(os_mon_sup, cpu_sup),
+ ok = application:set_env(os_mon, start_cpu_sup, false),
+ _ = supervisor:terminate_child(os_mon_sup, cpu_sup),
ok.
unavailable(suite) ->
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index 9c65d8b692..f9addd96cf 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,7 @@
-export([port/1]).
-export([terminate/1, unavailable/1, restart/1]).
-export([otp_5910/1]).
+-export([posix_only/1]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
@@ -48,7 +49,8 @@ init_per_testcase(_Case, Config) ->
Dog = ?t:timetrap(?default_timeout),
[{watchdog,Dog} | Config].
-end_per_testcase(unavailable, Config) ->
+end_per_testcase(TC, Config) when TC =:= unavailable;
+ TC =:= posix_only ->
restart(Config),
end_per_testcase(dummy, Config);
end_per_testcase(_Case, Config) ->
@@ -60,11 +62,10 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
Bugs = [otp_5910],
+ Always = [api, config, alarm, port, posix_only, unavailable] ++ Bugs,
case test_server:os_type() of
- {unix, sunos} ->
- [api, config, alarm, port, unavailable] ++ Bugs;
- {unix, _OSname} -> [api, alarm] ++ Bugs;
- {win32, _OSname} -> [api, alarm] ++ Bugs;
+ {unix, _OSname} -> Always;
+ {win32, _OSname} -> Always;
_OS -> [unavailable]
end.
@@ -83,12 +84,7 @@ api(doc) -> ["Test of API functions"];
api(Config) when is_list(Config) ->
%% get_disk_data()
- [{Id,KByte,Capacity}|_] = get_disk_data(),
- true = io_lib:printable_list(Id),
- true = is_integer(KByte),
- true = is_integer(Capacity),
- true = Capacity>0,
- true = KByte>0,
+ ok = check_get_disk_data(),
%% get_check_interval()
1800000 = disksup:get_check_interval(),
@@ -340,6 +336,7 @@ restart(suite) ->
[];
restart(Config) when is_list(Config) ->
ok = application:set_env(os_mon, start_disksup, true),
+ ok = application:set_env(os_mon, disksup_posix_only, false),
{ok, _Pid} = supervisor:restart_child(os_mon_sup, disksup),
ok.
@@ -350,15 +347,16 @@ otp_5910(doc) ->
otp_5910(Config) when is_list(Config) ->
%% Make sure disksup sets at least one alarm
- Data = disksup:get_disk_data(),
+ Data = lists:sort(disksup:get_disk_data()),
Threshold0 = disksup:get_almost_full_threshold(),
Threshold = case over_threshold(Data, Threshold0) of
- 0 ->
- [{_Id,_Kbyte,Cap}|_] = Data,
- ok = disksup:set_almost_full_threshold((Cap-1)/100),
- Cap-1;
- _N -> Threshold0
- end,
+ 0 ->
+ [{_Id,_Kbyte,Cap}|_] = Data,
+ io:format("Data ~p Threshold ~p ~n",[Data, Cap-1]),
+ ok = disksup:set_almost_full_threshold((Cap-1)/100),
+ Cap-1;
+ _N -> Threshold0
+ end,
ok = application:set_env(os_mon, disk_almost_full_threshold, Threshold/100),
disksup ! timeout, % force a disk check
Data2 = disksup:get_disk_data(),
@@ -404,9 +402,28 @@ otp_5910(Config) when is_list(Config) ->
ok = application:start(os_mon),
ok.
+posix_only(suite) -> [];
+posix_only(doc) -> ["Test disksup_posix_only option"];
+posix_only(Config) when is_list(Config) ->
+ %% Set option and restart disksup
+ ok = application:set_env(os_mon, disksup_posix_only, true),
+ ok = supervisor:terminate_child(os_mon_sup, disksup),
+ {ok, _Child1} = supervisor:restart_child(os_mon_sup, disksup),
+
+ ok = check_get_disk_data().
+
dump_info() ->
io:format("Status: ~p~n", [sys:get_status(disksup)]).
+check_get_disk_data() ->
+ [{Id,KByte,Capacity}|_] = get_disk_data(),
+ true = io_lib:printable_list(Id),
+ true = is_integer(KByte),
+ true = is_integer(Capacity),
+ true = Capacity>0,
+ true = KByte>0,
+ ok.
+
% filter get_disk_data and remove entriew with zero capacity
% "non-normal" filesystems report zero capacity
% - Perhaps errorneous 'df -k -l'?
diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl
index f074657d4c..08ad8436dd 100644
--- a/lib/os_mon/test/os_mon_SUITE.erl
+++ b/lib/os_mon/test/os_mon_SUITE.erl
@@ -25,7 +25,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
--export([app_file/1, config/1]).
+-export([app_file/1, appup_file/1, config/1]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
@@ -43,8 +43,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
case test_server:os_type() of
- {unix, sunos} -> [app_file, config];
- _OS -> [app_file]
+ {unix, sunos} -> [app_file, appup_file, config];
+ _OS -> [app_file, appup_file]
end.
groups() ->
@@ -71,6 +71,9 @@ app_file(Config) when is_list(Config) ->
?line ok = test_server:app_test(os_mon),
ok.
+appup_file(Config) when is_list(Config) ->
+ ok = test_server:appup_test(os_mon).
+
config(suite) ->
[];
config(doc) ->
diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk
index e9e90729f2..833e855e0e 100644
--- a/lib/os_mon/vsn.mk
+++ b/lib/os_mon/vsn.mk
@@ -1 +1 @@
-OS_MON_VSN = 2.2.14
+OS_MON_VSN = 2.3.1
diff --git a/lib/toolbar/Makefile b/lib/ose/Makefile
index 5326457976..2959f04c3e 100644
--- a/lib/toolbar/Makefile
+++ b/lib/ose/Makefile
@@ -1,36 +1,36 @@
#
# %CopyrightBegin%
-#
+#
# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-# ----------------------------------------------------
-# Common Macros
-# ----------------------------------------------------
+#
+# Macros
+#
SUB_DIRECTORIES = src doc/src
include vsn.mk
-VSN = $(TOOLBAR_VSN)
+VSN = $(OSE_VSN)
-SPECIAL_TARGETS =
+SPECIAL_TARGETS =
-# ----------------------------------------------------
+#
# Default Subdir Targets
-# ----------------------------------------------------
+#
include $(ERL_TOP)/make/otp_subdir.mk
diff --git a/lib/appmon/ebin/.gitignore b/lib/ose/doc/html/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/appmon/ebin/.gitignore
+++ b/lib/ose/doc/html/.gitignore
diff --git a/lib/pman/doc/html/.gitignore b/lib/ose/doc/man3/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/pman/doc/html/.gitignore
+++ b/lib/ose/doc/man3/.gitignore
diff --git a/lib/pman/doc/man3/.gitignore b/lib/ose/doc/man6/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/pman/doc/man3/.gitignore
+++ b/lib/ose/doc/man6/.gitignore
diff --git a/lib/pman/doc/pdf/.gitignore b/lib/ose/doc/pdf/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/pman/doc/pdf/.gitignore
+++ b/lib/ose/doc/pdf/.gitignore
diff --git a/lib/ose/doc/src/.gitignore b/lib/ose/doc/src/.gitignore
new file mode 100644
index 0000000000..860e9e703e
--- /dev/null
+++ b/lib/ose/doc/src/.gitignore
@@ -0,0 +1 @@
+ose.xml
diff --git a/lib/toolbar/doc/src/Makefile b/lib/ose/doc/src/Makefile
index 2239421556..dd58029064 100644
--- a/lib/toolbar/doc/src/Makefile
+++ b/lib/ose/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
+#
# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
@@ -23,8 +23,8 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Application version
# ----------------------------------------------------
include ../../vsn.mk
-VSN=$(TOOLBAR_VSN)
-APPLICATION=toolbar
+VSN=$(OSE_VSN)
+APPLICATION=ose
# ----------------------------------------------------
# Release directory specification
@@ -32,24 +32,31 @@ APPLICATION=toolbar
RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# ----------------------------------------------------
+# Help application directory specification
+# ----------------------------------------------------
+EDOC_DIR = $(ERL_TOP)/lib/edoc
+SYNTAX_TOOLS_DIR = $(ERL_TOP)/lib/syntax_tools
+
+# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = toolbar.xml
-XML_PART_FILES = part.xml part_notes.xml
-XML_CHAPTER_FILES = toolbar_chapter.xml notes.xml
+XML_REF3_FILES = \
+ ose.xml \
+ ose_erl_driver.xml
+
+XML_REF6_FILES = ose_app.xml
+
+XML_PART_FILES = part.xml
+XML_CHAPTER_FILES = notes.xml ose_intro.xml ose_signals_chapter.xml
BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-
-GIF_FILES = \
- bar.gif \
- create_tool.gif \
- note.gif
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
+ $(XML_APPLICATION_FILES)
# ----------------------------------------------------
@@ -59,46 +66,55 @@ HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
INFO_FILE = ../../info
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+SPECS_FILES =
+
+TOP_SPECS_FILE =
+
# ----------------------------------------------------
-# FLAGS
+# FLAGS
# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
+XML_FLAGS +=
+
+SPECS_FLAGS = -I../../include -I../../../kernel/include
+
+OSE_SRC_DIR = ../../src
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
+docs: man pdf html
$(TOP_PDF_FILE): $(XML_FILES)
pdf: $(TOP_PDF_FILE)
-html: gifs $(HTML_REF_MAN_FILE)
+html: $(HTML_REF_MAN_FILE)
-man: $(MAN3_FILES)
+man: $(MAN3_FILES) $(MAN6_FILES)
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+ose.xml: $(OSE_SRC_DIR)/ose.erl
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript\
+ $(OSE_SRC_DIR)/$(@:%.xml=%.erl)
-debug opt:
+debug opt:
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 *~
+ rm -f $(SPECDIR)/*
+ rm -f errs core *~
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
release_docs_spec: docs
@@ -110,6 +126,7 @@ 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) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
release_spec:
-
diff --git a/lib/tv/doc/src/book.xml b/lib/ose/doc/src/book.xml
index d16165ab8f..485806e05b 100644
--- a/lib/tv/doc/src/book.xml
+++ b/lib/ose/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>2014</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,26 +13,28 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
- <title>Table Visualizer (TV)</title>
- <prepared></prepared>
+ <title>OSE</title>
+ <prepared>Lukas Larsson</prepared>
<docno></docno>
- <date></date>
- <rev>2.0.3</rev>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>book.xml</file>
</header>
<insidecover>
</insidecover>
- <pagetext>Table Visualizer (TV)</pagetext>
+ <pagetext>OSE</pagetext>
<preamble>
+ <contents level="2"></contents>
</preamble>
- <parts lift="no">
+ <parts>
<xi:include href="part.xml"/>
</parts>
<applications>
@@ -44,5 +46,3 @@
<listofterms></listofterms>
<index></index>
</book>
-
-
diff --git a/lib/ose/doc/src/notes.xml b/lib/ose/doc/src/notes.xml
new file mode 100644
index 0000000000..7e86355f98
--- /dev/null
+++ b/lib/ose/doc/src/notes.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>OSE Release Notes</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to the OSE application.</p>
+
+<section><title>Ose 1.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add missing release notes for the OSE application.</p>
+ <p>
+ Own Id: OTP-12177</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ose 1.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix some spelling mistakes in documentation</p>
+ <p>
+ Own Id: OTP-12152</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ose 1.0</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Erlang/OTP has been ported to the realtime operating
+ system OSE. The port supports both smp and non-smp
+ emulator. For details around the port and how to started
+ see the User's Guide in the <seealso
+ marker="ose:ose_intro">ose</seealso> application. </p>
+ <p>
+ Note that not all parts of Erlang/OTP has been ported. </p>
+ <p>
+ Notable things that work are: non-smp and smp emulators,
+ OSE signal interaction, crypto, asn1, run_erl/to_erl,
+ tcp, epmd, distribution and most if not all non-os
+ specific functionality of Erlang.</p>
+ <p>
+ Notable things that does not work are: udp/sctp, os_mon,
+ erl_interface, binding of schedulers.</p>
+ <p>
+ Own Id: OTP-11334</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+</chapter>
diff --git a/lib/appmon/doc/src/part.xml b/lib/ose/doc/src/ose_app.xml
index 017957946c..e40656fd7b 100644
--- a/lib/appmon/doc/src/part.xml
+++ b/lib/ose/doc/src/ose_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
+<appref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2014</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,25 +13,25 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
- <title>Appmon User's Guide</title>
+ <title>Enea OSE</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
</header>
+ <app>ose</app>
+ <appsummary>The OSE Application</appsummary>
<description>
- <p>The Application Monitor, <em>Appmon</em>, is a graphical utility used
- to supervise applications executing either locally or on remote nodes.
- The process tree of an application can furthermore be monitored.</p>
+ <p>The OSE application contains modules and documentation that only
+ applies when running Erlang/OTP on Enea OSE.</p>
</description>
- <xi:include href="appmon_chapter.xml"/>
-</part>
+</appref>
diff --git a/lib/ose/doc/src/ose_erl_driver.xml b/lib/ose/doc/src/ose_erl_driver.xml
new file mode 100644
index 0000000000..1d89d7aeea
--- /dev/null
+++ b/lib/ose/doc/src/ose_erl_driver.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE cref SYSTEM "cref.dtd">
+
+<cref>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>erl_driver for Enea OSE</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_erl_driver.xml</file>
+ </header>
+ <lib>ose_erl_driver</lib>
+ <libsummary>Linked-in drivers in Enea OSE</libsummary>
+ <description>
+ <p>Writing Linked-in drivers that also work on Enea OSE is very similar for
+ how you would do it for Unix. The difference from Unix is that
+ driver_select, ready_input and ready_output all work with signals
+ instead of file descriptors. This means that the driver_select is
+ used to specify which type of signal should trigger calls to
+ ready_input/ready_output. The functions described below are available
+ to driver programmers on Enea OSE to facilitate this.
+ </p>
+ </description>
+ <section>
+ <title>DATA TYPES</title>
+
+ <taglist>
+ <tag><marker id="union_SIGNAL"/>union SIGNAL</tag>
+ <item>See the Enea OSE SPI documentation for a description.</item>
+ <tag><marker id="SIGSELECT"/>SIGSELECT</tag>
+ <item>See the Enea OSE SPI documentation for a description.</item>
+ <tag><marker id="ErlDrvEvent"/>ErlDrvEvent</tag>
+ <item>The <c>ErlDrvEvent</c> is a handle to a signal number and id combination. It is passed to <seealso marker="erts:erl_driver#driver_select">driver_select(3)</seealso>.</item>
+ <tag><marker id="ErlDrvOseEventId"/>ErlDrvOseEventId</tag>
+ <item>This is the id used to associate a specific signal to a
+ certain driver instance. </item>
+ </taglist>
+ </section>
+ <funcs>
+ <func>
+ <name><ret>union SIGNAL *</ret><nametext>erl_drv_ose_get_signal(ErlDrvEvent drv_event)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_get_signal"></marker>
+ <p>Fetch the next signal associated with <c>drv_event</c>.
+ Signals will be returned in the order which they were received and
+ when no more signals are available <c>NULL</c> will be returned.
+ Use this function in the ready_input/ready_output callbacks
+ to get signals.</p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>ErlDrvEvent</ret><nametext>erl_drv_ose_event_alloc(SIGSELECT signo, ErlDrvOseEventId id, ErlDrvOseEventId (*resolve_signal)(union SIGNAL* sig), void *extra)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_alloc"></marker>
+ <p>Create a new <c>ErlDrvEvent</c> associated with <c>signo</c>,
+ <c>id</c> and uses the <c>resolve_signal</c> function to extract
+ the <c>id</c> from a signal with <c>signo</c>. The <c>extra</c>
+ parameter can be used for additional data. See
+ <seealso marker="ose_signals_chapter#driver">
+ Signals in a Linked-in driver</seealso> in the OSE User's Guide.
+ </p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>void</ret><nametext>erl_drv_ose_event_free(ErlDrvEvent drv_event)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_free"></marker>
+ <p>Free a <c>ErlDrvEvent</c>. This should always be done in the
+ <seealso marker="erts:driver_entry#stop_select">stop_select</seealso>
+ callback when the event is no longer being used.</p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>void</ret><nametext>erl_drv_ose_event_fetch(ErlDrvEvent drv_event, SIGSELECT *signo, ErlDrvOseEventId *id, void **extra)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_fetch"></marker>
+ <p>Write the signal number, id and any extra data associated with <c>drv_event</c>
+ into <c>*signo</c> and <c>*id</c> respectively. <c>NULL</c> can be
+ also passed as <c>signo</c> or <c>id</c> in order to ignore that field.
+ </p>
+ </desc>
+ </func>
+ </funcs>
+ <section>
+ <title>SEE ALSO</title>
+ <p>
+ <seealso marker="erts:driver_entry">driver_entry(3)</seealso>,
+ <seealso marker="erts:erl_driver">erl_driver(3)</seealso>
+ </p>
+ </section>
+</cref>
diff --git a/lib/ose/doc/src/ose_intro.xml b/lib/ose/doc/src/ose_intro.xml
new file mode 100644
index 0000000000..0ed470890b
--- /dev/null
+++ b/lib/ose/doc/src/ose_intro.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Introduction</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_intro.xml</file>
+ </header>
+
+ <section>
+ <title>Features</title>
+ </section>
+
+ <section>
+ <title>Starting Erlang/OTP</title>
+ <p>
+ Starting Erlang/OTP on OSE is not as simple as on Unix/Windows (yet).
+ First of all you have to explicitly use the beam (or beam.smp) executables
+ found in erts-X.Y.Z/bin as the load module that you run. This in turn
+ means that you have to supply the raw beam arguments to the emulator
+ when starting. Fortunately <c>erl</c> on Unix/Windows has a
+ undocumented flag called <c>-emu_args_exit</c> that can be used to
+ figure out what the arguments to beam look like. For example:</p>
+ <code># erl +Mut false +A 10 +S 4:4 +Muycs256 +P 2096 +Q 2096 -emu_args_exit
+-Mut
+false
+-A
+10
+-S
+4:4
+-Muycs256
+-P
+2096
+-Q
+2096
+--
+-root
+/usr/local/lib/erlang
+-progname
+erl
+--
+-home
+/home/erlang
+--</code>
+ <p>
+ The arguments are printed on separate lines to make it possible to know
+ what has to be quoted with &quot;. Each line is one quotable unit.
+ So taking the arguments above you can supply them to pm_create or
+ just execute directly on the command line. For example:</p>
+ <code>rtose@acp3400> pm_install erlang /mst/erlang/erts-6.0/bin/beam.smp
+rtose@acp3400> pm_create -c ARGV="-Mut false -A 10 -S 4:4 -Muycs256 -P 2096 -Q 2099 -- -root /mst/erlang -progname erl -- -home /mst/erlang --" erlang
+pid: 0x110059
+rtose@acp3400> pm_start 0x110059</code>
+ <p>
+ Also note that since we are running erl to figure out the arguments on a
+ separate machine the paths have to be updated. In the example above
+ <c>/usr/local/lib/erlang</c> was replaced by <c>/mst/erlang/</c>. The
+ goal is to in future releases not have to do the special argument handling
+ but for now (OTP 17.0) you have to do it.
+ </p>
+ <note>
+ Because of a limitation in the way the OSE handles stdio when starting
+ load modules using pm_install/create the Erlang shell only reads every
+ other command from stdin. However if you start Erlang using run_erl
+ you do not have this problem. So it is highly recommended that you
+ start Erlang using run_erl.
+ </note>
+ </section>
+
+ <section>
+ <title>run_erl and to_erl</title>
+ <p>
+ In OSE run_erl and to_erl are combined into a single load module called
+ run_erl_lm. Installing and starting the load module will add two new
+ shell commands called run_erl and to_erl. They work in exactly the same
+ way as the unix variants of run_erl and to_erl, except that the read
+ and write pipes have to be placed under the /pipe vm. One additional
+ option also exists to run_erl on ose:
+ <taglist>
+ <tag><c>-block Name</c></tag>
+ <item>The name of the install handle and block that will be created/used by
+ installing and exectuting the first part of the command. If nothing
+ if given the basename of the load module will be used for this value.
+ Example:
+ <code>pm_install erlang /path/to/erlang/vm/beam.smp
+run_erl -daemon -block erlang /pipe/ /mst/erlang_logs/ "beam.smp -A 1 -- -root /mst/erlang -- -home /mst --"</code>
+ </item>
+ </taglist>
+ The same argument munching as when starting Erlang/OTP without run_erl
+ has to be done. If <c>-daemon</c> is given then all error printouts
+ are sent to the ramlog.
+ See also
+ <seealso marker="erts:run_erl">run_erl</seealso> for more details.
+ </p>
+ <p>
+ Below is an example of how to get started with <c>run_erl_lm</c>.
+ <code>rtose@acp3400> pm_install run_erl_lm /mst/erlang/erts-6.0/bin/run_erl_lm
+rtose@acp3400> pm_create run_erl_lm
+pid: 0x1c005d
+rtose@acp3400> pm_start 0x1c005d
+rtose@acp3400> mkdir /mst/erlang_log
+rtose@acp3400> run_erl -daemon /pipe/ /mst/erlang_log/ "/mst/erlang/erts-6.0/bin/beam.smp -A 1 -- -root /mst/erlang -- -home /mst --"
+rtose@acp3400> to_erl
+Attaching to /pipe/erlang.pipe.1 (^C to exit)
+os:type().
+{ose,release}
+2>
+'to_erl' terminated.</code>
+ Note that Ctrl-C is used instead of Ctrl-D to exit the to_erl shell.
+ </p>
+ </section>
+
+ <section>
+ <title>epmd</title>
+ <p>
+ In OSE epmd will not be started automatically so if you want to use
+ Erlang distribution you have to manually start epmd.
+ </p>
+ </section>
+
+ <section>
+ <title>VM Process Priorities</title>
+ <p>
+ It is possible to set the priorities you want for the OSE processes that
+ thr emulator creates in the lmconf. An example of how to do it can be
+ found in the default lmconf file in
+ $ERL_TOP/erts/emulator/sys/ose/beam.lmconf.
+ </p>
+ </section>
+
+</chapter>
diff --git a/lib/ose/doc/src/ose_signals_chapter.xml b/lib/ose/doc/src/ose_signals_chapter.xml
new file mode 100644
index 0000000000..ff501777cc
--- /dev/null
+++ b/lib/ose/doc/src/ose_signals_chapter.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Interacting with Enea OSE</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_signals_chapter.xml</file>
+ </header>
+
+ <marker id="introduction"></marker>
+ <section>
+ <title>Introduction</title>
+ <p>The main way which programs on Enea OSE interact is through the
+ usage of message passing, much the same way as Erlang processes
+ communicate. There are two ways in which an Erlang programmer can
+ interact with the signals sent from other Enea OSE processes; either
+ through the provided <c>ose</c> module, or by writing a custom linked-in
+ driver. This User's Guide describes and provides examples for both
+ approaches.
+ </p>
+ </section>
+
+ <marker id="erlang"></marker>
+ <section>
+ <title>Signals in Erlang</title>
+ <p>Erlang/OTP on OSE provides a erlang module called
+ <seealso marker="ose:ose">ose</seealso> that can be used to interact
+ with other OSE processes using message passing. The api in the module
+ is very similar to the native OSE api, so for details of how the
+ functions work please refer to the official OSE documenation. Below
+ is an example usage of the API.
+ </p>
+ <code>1> P1 = ose:open("p1").
+#Port&gt;0.344>
+2> ose:hunt(P1,"p2").
+{#Port&gt;0.344>,1}
+3> P2 = ose:open("p2").
+#Port&gt;0.355>
+4> flush().
+Shell got {mailbox_up,#Port&gt;0.344>,{#Port&gt;0.344>,1},852189}
+ok
+5> ose:listen(P1,[1234]).
+ok
+6> ose:send(P2,ose:get_id(P1),1234,&gt;&gt;"hello">>).
+ok
+7> flush().
+Shell got {message,#Port&gt;0.344>,{852189,1245316,1234,&gt;&gt;"hello">>}}
+ok</code>
+ </section>
+
+ <marker id="driver"></marker>
+ <section>
+ <title>Signals in a Linked-in driver</title>
+ <p>
+ Writing Linked-in drivers for OSE is very similar to how it is done
+ for Unix/Windows. It is only the way in which the driver subscribes
+ and consumed external events that is different. In Unix (and Windows)
+ file descriptiors (and Event Objects) are used to select on. On OSE
+ we use signals to deliver the same functionality. There are two large
+ differences between a signal and an fd.
+ </p>
+ <p>
+ In OSE it is not possible for a signal number to be a unique identifier
+ for a resource in the same way as an fd is. For example; let's say we
+ implement a driver that does an asynchronous hunt that uses signal
+ number 1234 as the hunt_sig. If we want to be able to have multiple
+ hunt ports running at the same time we have to have someway of routing
+ the signal to the correct port. This is achieved by supplying a secondary
+ id that can be retrieved through the meta-data or payload of the signal,
+ e.g:
+ <code>ErlDrvEvent event = erl_drv_ose_event_alloc(1234,port,resolver);</code>
+ The event you get back from
+ <seealso marker="ose_erl_driver#erl_drv_ose_event_alloc">
+ erl_drv_ose_event_alloc</seealso> can then be used by
+ <seealso marker="erts:erl_driver#driver_select">driver_select</seealso>
+ to subscribe to signals. The first argument is just the signal number
+ that we are interested in. The second is the id that we choose to use,
+ in this case the port id that we got in the
+ <seealso marker="erts:driver_entry#start">start</seealso> callback is
+ used. The third argument is a function pointer to a function that can
+ be used to figure out the id from a given signal. The fourth argument can
+ point to any additional data you might want to associate with the event.
+ There is a complete. You can examine the data contained in the event with
+ <seealso marker="ose_erl_driver#erl_drv_ose_event_fetch">erl_drv_ose_event_fetch</seealso>
+ , eg:
+ <code>erl_drv_ose_event_fetch(event, &amp;signal, &amp;port, (void **)&amp;extra);</code>
+ example of what this could look like in
+ <seealso marker="#example">the next section</seealso>.
+ <note>It is very important to issue the driver_select call before
+ any of the signals you are interested in are sent. If driver_select
+ is called after the signal is sent, there is a high probability that it
+ will be lost.</note>
+ </p>
+ <p>
+ The other difference from unix is that in OSE the payload of the event
+ (i.e. the signal data) is already received when the ready_output/input
+ callbacks are called. This means that you access the data of a signal
+ by calling <seealso marker="ose_erl_driver#erl_drv_ose_get_signal">
+ erl_drv_ose_get_signal</seealso>. Additionally multiple signals might be
+ associated with the event, so you should call
+ <seealso marker="ose_erl_driver#erl_drv_ose_get_signal">
+ erl_drv_ose_get_signal</seealso> until <c>NULL</c> is returned.
+ </p>
+ </section>
+
+ <marker id="example"></marker>
+ <section>
+ <title>Example Linked-in driver</title>
+<code>#include "erl_driver.h"
+#include "ose.h"
+
+struct huntsig {
+ SIGSELECT signo;
+ ErlDrvPort port;
+};
+
+union SIGNAL {
+ SIGSELECT signo;
+ struct huntsig;
+}
+
+/* Here we have to get the id from the signal. In this case we use the
+ port id since we have control over the data structure of the signal.
+ It is however possible to use anything in here. The only restriction
+ is that the same id has to be used for all signals of the same number.*/
+ErlDrvOseEventId resolver(union SIGNAL *sig) {
+ return (ErlDrvOseEventId)sig->huntsig.port;
+}
+
+static int drv_init(void) { return 0; };
+
+static ErlDrvData drv_start(ErlDrvPort port, char *command) {
+ return (ErlDrvData)port;
+}
+
+static ErlDrvSSizeT control(ErlDrvData driver_data, unsigned int cmd,
+ char *buf, ErlDrvSizeT len,
+ char **rbuf, ErlDrvSizeT rlen) {
+ ErlDrvPort port = (ErlDrvPort)driver_data;
+
+ /* An example of extra data to associate with the event */
+ char *extra_data = driver_alloc(80);
+ snprintf("extra_data, "Event, sig_no: 1234, and port: %d", port);
+
+ /* Create a new event to select on */
+ ErlDrvOseEvent evt = erl_drv_ose_event_alloc(1234,port,resolver, extra_data);
+
+ /* Make sure to do the select call _BEFORE_ the signal arrives.
+ The signal might get lost if the hunt call is done before the
+ select. */
+ driver_select(port,evt,ERL_DRV_READ|ERL_DRV_USE,1);
+
+ union SIGNAL *sig = alloc(sizeof(union SIGNAL),1234);
+ sig->huntsig.port = port;
+ hunt("testprocess",0,NULL,&amp;sig);
+ return 0;
+}
+
+static void ready_input(ErlDrvData driver_data, ErlDrvEvent evt) {
+ char *extra_data;
+ /* Get the first signal payload from the event */
+ union SIGNAL *sig = erl_drv_ose_get_signal(evt);
+ ErlDrvPort port = (ErlDrvPort)driver_data;
+ while (sig != NULL) {
+ if (sig->signo == 1234) {
+ /* Print out the string we added as the extra parameter */
+ erl_drv_ose_event_fetch(evt, NULL, NULL, (void **)&amp;extra_data);
+ printf("We've received: %s\n", extra_data);
+
+ /* If it is our signal we send a message with the sender of the signal
+ to the controlling erlang process */
+ ErlDrvTermData reply[] = { ERL_DRV_UINT, (ErlDrvUInt)sender(&amp;sig) };
+ erl_drv_send_term(port,reply,sizeof(reply) / sizeof(reply[0]));
+ }
+
+ /* Cleanup the signal and deselect on the event.
+ Note that the event itself has to be free'd in the stop_select
+ callback. */
+ free_buf(&amp;sig);
+ driver_select(port,evt,ERL_DRV_READ|ERL_DRV_USE,0);
+
+ /* There could be more than one signal waiting in this event, so
+ we have to loop until sig == NULL */
+ sig = erl_drv_ose_get_signal(evt);
+ }
+}
+
+static void stop_select(ErlDrvEvent event, void *reserved)
+{
+ /* Free the extra_data */
+ erl_drv_ose_event_fetch(evt, NULL, NULL, (void **)&amp;extra_data);
+ driver_free(extra_data);
+
+ /* Free the event itself */
+ erl_drv_ose_event_free(event);
+}
+
+/**
+ * Setup the driver entry for the Erlang runtime
+ **/
+ErlDrvEntry ose_signal_driver_entry = {
+ .init = drv_init,
+ .start = drv_start,
+ .stop = drv_stop,
+ .ready_input = ready_input,
+ .driver_name = DRIVER_NAME,
+ .control = control,
+ .extended_marker = ERL_DRV_EXTENDED_MARKER,
+ .major_version = ERL_DRV_EXTENDED_MAJOR_VERSION,
+ .minor_version = ERL_DRV_EXTENDED_MINOR_VERSION,
+ .driver_flags = ERL_DRV_FLAG_USE_PORT_LOCKING,
+ .stop_select = stop_select
+};
+</code>
+ </section>
+
+</chapter>
diff --git a/lib/ose/doc/src/part.xml b/lib/ose/doc/src/part.xml
new file mode 100644
index 0000000000..250bb11f96
--- /dev/null
+++ b/lib/ose/doc/src/part.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2014</year>
+ <year>2014</year>
+ <holder>Ericsson AB, All Rights Reserved</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ The Initial Developer of the Original Code is Ericsson AB.
+ </legalnotice>
+
+ <title>OSE User's Guide</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>part.xml</file>
+ </header>
+ <description>
+ <p><em>OSE</em>.</p>
+ </description>
+ <xi:include href="ose_intro.xml"/>
+ <xi:include href="ose_signals_chapter.xml"/>
+</part>
diff --git a/lib/tv/doc/src/ref_man.xml b/lib/ose/doc/src/ref_man.xml
index 56e0798cf1..54c1182fcb 100644
--- a/lib/tv/doc/src/ref_man.xml
+++ b/lib/ose/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>2014</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,28 +13,27 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
- <title>TV Reference Manual</title>
- <prepared>Fredrik Gustafson</prepared>
+ <title>OSE Reference Manual</title>
+ <prepared>Lukas Larsson</prepared>
<docno></docno>
- <date>1997-06-04</date>
- <rev>1.0.1</rev>
- <file>application.sgml</file>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>ref_man.xml</file>
</header>
<description>
- <p>The TV application enables the user
- to examine ETS and Mnesia tables. Once a certain table has been
- opened in the tool, the content may be viewed in various levels
- of detail.</p>
+ <p>The Standard Erlang Libraries application, <em>STDLIB</em>,
+ contains modules for manipulating lists, strings and files etc.</p>
+ <br></br>
</description>
- <xi:include href="tv.xml"/>
+ <xi:include href="ose_app.xml"/>
+ <xi:include href="ose.xml"/>
+ <xi:include href="ose_erl_driver.xml"/>
</application>
-
-
diff --git a/lib/pman/ebin/.gitignore b/lib/ose/ebin/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/pman/ebin/.gitignore
+++ b/lib/ose/ebin/.gitignore
diff --git a/lib/toolbar/doc/html/.gitignore b/lib/ose/include/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/toolbar/doc/html/.gitignore
+++ b/lib/ose/include/.gitignore
diff --git a/lib/ose/info b/lib/ose/info
new file mode 100644
index 0000000000..85c07dbe82
--- /dev/null
+++ b/lib/ose/info
@@ -0,0 +1,2 @@
+group: misc Miscellaneous Applications
+short: Description of Enea OSE specific functionality
diff --git a/lib/pman/src/Makefile b/lib/ose/src/Makefile
index eb0413bdbc..88f89578fb 100644
--- a/lib/pman/src/Makefile
+++ b/lib/ose/src/Makefile
@@ -1,21 +1,22 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2013. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
+
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -23,90 +24,83 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Application version
# ----------------------------------------------------
include ../vsn.mk
-VSN=$(PMAN_VSN)
+VSN=$(OSE_VSN)
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/pman-$(VSN)
+RELSYSDIR = $(RELEASE_PATH)/lib/ose-$(VSN)
# ----------------------------------------------------
-# Common Macros
+# Target Specs
# ----------------------------------------------------
-
MODULES= \
- pman \
- pman_main \
- pman_shell \
- pman_relay \
- pman_relay_server \
- pman_module_info \
- pman_win \
- pman_buf \
- pman_buf_utils \
- pman_buf_buffer \
- pman_buf_converter \
- pman_buf_printer \
- pman_options \
- pman_process \
- pman_tool
-
-HRL_FILES= \
- assert.hrl \
- pman_buf.hrl \
- pman_options.hrl \
- pman_win.hrl
+ ose
+
+HRL_FILES=
+
+INTERNAL_HRL_FILES=
ERL_FILES= $(MODULES:%=%.erl)
-TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+
+APP_FILE= ose.app
+
+APP_SRC= $(APP_FILE).src
+APP_TARGET= $(EBIN)/$(APP_FILE)
-APP_FILE = pman.app
-APP_SRC = $(APP_FILE).src
-APP_TARGET = $(EBIN)/$(APP_FILE)
+APPUP_FILE= ose.appup
-APPUP_FILE = pman.appup
-APPUP_SRC = $(APPUP_FILE).src
-APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
+APPUP_SRC= $(APPUP_FILE).src
+APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
+
+ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ERL_COMPILE_FLAGS += +native
+endif
+ERL_COMPILE_FLAGS += -I../include -I../../kernel/include -Werror
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-debug opt: $(TARGET_FILES)
+debug opt: $(TARGET_FILES)
clean:
- rm -f $(TARGET_FILES)
- rm -f errs core *~
-
-$(APP_TARGET): $(APP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
-
-$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+ rm -f $(TARGET_FILES)
+ rm -f core
+ rm -f erl_parse.erl
docs:
# ----------------------------------------------------
-# Special Targets
+# Special Build Targets
# ----------------------------------------------------
+$(APP_TARGET): $(APP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+
+$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
release_docs_spec:
+# ----------------------------------------------------
+# Dependencies -- alphabetically, please
+# ----------------------------------------------------
diff --git a/lib/toolbar/src/toolbar.app.src b/lib/ose/src/ose.app.src
index 16f03c497d..60699c369b 100644
--- a/lib/toolbar/src/toolbar.app.src
+++ b/lib/ose/src/ose.app.src
@@ -1,30 +1,27 @@
+%% This is an -*- erlang -*- file.
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-{application, toolbar,
- [{description, "Toolbar"},
+{application, ose,
+ [{description, "Enea OSE specific modules"},
{vsn, "%VSN%"},
- {modules, [
- toolbar,
- toolbar_graphics,
- toolbar_lib,
- toolbar_toolconfig,
- canvasbutton
- ]},
- {registered,[toolbar]},
- {applications, [kernel, stdlib, gs]}]}.
+ {modules, [ose]},
+ {registered,[]},
+ {applications, [stdlib,kernel]},
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","erts-6.0"]}]}.
diff --git a/lib/pman/src/pman.appup.src b/lib/ose/src/ose.appup.src
index 7a435e9b22..6654efde16 100644
--- a/lib/pman/src/pman.appup.src
+++ b/lib/ose/src/ose.appup.src
@@ -1,19 +1,22 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
-%% %CopyrightEnd%
%%
-{"%VSN%",[],[]}.
+%% %CopyrightEnd%
+{"%VSN%",
+ [
+ ],
+ [
+ ]}.
diff --git a/lib/ose/src/ose.erl b/lib/ose/src/ose.erl
new file mode 100644
index 0000000000..77f11addf9
--- /dev/null
+++ b/lib/ose/src/ose.erl
@@ -0,0 +1,452 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% @doc Interface module for OSE messaging and process monitoring from Erlang
+%%
+%% For each mailbox created through {@link open/1} a OSE phantom process with
+%% that name is started. Since phantom processes are used the memory footprint
+%% of each mailbox is quite small.
+%%
+%% To receive messages you first have to subscribe to the specific message
+%% numbers that you are interested in with {@link listen/2}. The messages
+%% will be sent to the Erlang process that created the mailbox.
+%%
+%% @end
+%%
+-module(ose).
+
+%%==============================================================================
+%% Exported API
+%%==============================================================================
+-export([open/1,
+ close/1,
+ get_id/1,
+ get_name/2,
+ hunt/2,
+ dehunt/2,
+ attach/2,
+ detach/2,
+ send/4,
+ send/5,
+ listen/2
+ ]).
+
+%%==============================================================================
+%% Types
+%%==============================================================================
+-opaque mailbox() :: port().
+%% Mailbox handle. Implemented as an erlang port.
+
+-opaque mailbox_id() :: integer().
+%% Mailbox ID, this is the same as the process id of an OSE process.
+%% An integer.
+
+-type message_number() :: 0..4294967295.
+%% OSE Signal number
+
+-opaque hunt_ref() :: {mailbox(),integer()}.
+%% Reference from a hunt request. This term will be included
+%% in a successful hunt response.
+
+-opaque attach_ref() :: {mailbox(),integer()}.
+%% Reference from an attach request. This term will be included
+%% in the term returned when the attached mailbox disappears.
+
+-export_type([mailbox_id/0,
+ message_number/0,
+ mailbox/0,
+ hunt_ref/0,
+ attach_ref/0]).
+
+%%==============================================================================
+%% Defines
+%%==============================================================================
+-define(DRIVER_NAME, "ose_signal_drv").
+-define(GET_SPID, 1).
+-define(GET_NAME, 2).
+-define(HUNT, 100).
+-define(DEHUNT, 101).
+-define(ATTACH, 102).
+-define(DETACH, 103).
+-define(SEND, 104).
+-define(SEND_W_S, 105).
+-define(LISTEN, 106).
+-define(OPEN, 200).
+
+-define(INT_32BIT(Int),(is_integer(Int) andalso (Int >= 0) andalso (Int < (1 bsl 32)))).
+
+%%==============================================================================
+%% API functions
+%%==============================================================================
+
+%%------------------------------------------------------------------------------
+%% @doc Create a mailbox with the given name and return a port that handles
+%% the mailbox.
+%%
+%% An OSE phantom process with the given name will be created that will send any
+%% messages sent through this mailbox. Any messages sent to the new OSE process
+%% will automatically be converted to an Erlang message and sent to the Erlang
+%% process that calls this function. See {@link listen/2} for details about the
+%% format of the message sent.
+%%
+%% The caller gets linked to the created mailbox.
+%%
+%% raises: `badarg' | `system_limit'
+%%
+%% @see listen/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec open(Name) -> Port when
+ Name :: iodata(),
+ Port :: mailbox().
+open(Name) ->
+ try open_port({spawn_driver,?DRIVER_NAME}, [binary]) of
+ Port ->
+ try port_command(Port,[?OPEN,Name]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ close(Port),
+ erlang:error(Error,[Name]);
+ {ose_drv_reply,Port,ok} ->
+ Port
+ end
+ catch
+ error:badarg -> close(Port),erlang:error(badarg,[Name])
+ end
+ catch
+ error:badarg -> erlang:error(badarg,[Name])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Close a mailbox
+%%
+%% This kills the OSE phantom process associated with this mailbox.
+%%
+%% Will also consume any ``{'EXIT',Port,_}'' message from the port that comes
+%% due to the port closing when the calling process traps exits.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec close(Port) -> ok when
+ Port :: mailbox().
+close(Port) when is_port(Port) ->
+ %% Copied from prim_inet
+ case erlang:process_info(self(), trap_exit) of
+ {trap_exit,true} ->
+ link(Port),
+ catch erlang:port_close(Port),
+ receive {'EXIT',Port,_} -> ok end;
+ {trap_exit,false} ->
+ catch erlang:port_close(Port),
+ ok
+ end;
+close(NotPort) ->
+ erlang:error(badarg,[NotPort]).
+
+%%------------------------------------------------------------------------------
+%% @doc Get the mailbox id for the given port.
+%%
+%% The mailbox id is the same as the OSE process id of the OSE phantom process
+%% that this mailbox represents.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec get_id(Port) -> Pid when
+ Port :: mailbox(),
+ Pid :: mailbox_id().
+get_id(Port) ->
+ try port_control(Port, ?GET_SPID, <<>>) of
+ <<Spid:32>> -> Spid
+ catch error:_Error ->
+ erlang:error(badarg,[Port])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Get the mailbox name for the given mailbox id.
+%%
+%% The mailbox name is the name of the OSE process with process id Pid.
+%%
+%% This call will fail with badarg if the underlying system does not support
+%% getting the name from a process id.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec get_name(Port, Pid) -> Name | undefined when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ Name :: binary().
+get_name(Port, Pid) when ?INT_32BIT(Pid) ->
+ try port_control(Port, ?GET_NAME, <<Pid:32>>) of
+ [] -> undefined;
+ Res -> Res
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Pid])
+ end;
+get_name(Port, Pid) ->
+ erlang:error(badarg,[Port,Pid]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Hunt for OSE process by name.
+%%
+%% Will send `{mailbox_up, Port, Ref, MboxId}'
+%% to the calling process when the OSE process becomes available.
+%%
+%% Returns a reference term that can be used to cancel the hunt
+%% using {@link dehunt/2}.
+%%
+%% raises: `badarg'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec hunt(Port, HuntPath) -> Ref when
+ Port :: mailbox(),
+ HuntPath :: iodata(),
+ Ref :: hunt_ref().
+hunt(Port, HuntPath) ->
+ try port_command(Port, [?HUNT,HuntPath]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,HuntPath]);
+ {ose_drv_reply,Port,Ref} ->
+ Ref
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,HuntPath])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Stop hunting for OSE process.
+%%
+%% If a message for this hunt has been sent but not received
+%% by the calling process, it is removed from the message queue.
+%% Note that this only works if the same process that did
+%% the hunt does the dehunt.
+%%
+%% raises: `badarg'
+%%
+%% @see hunt/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec dehunt(Port, Ref) -> ok when
+ Port :: mailbox(),
+ Ref :: hunt_ref().
+dehunt(Port, {Port,Ref}) when ?INT_32BIT(Ref) ->
+ try port_command(Port, <<?DEHUNT:8, Ref:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,enoent}} ->
+ %% enoent could mean that it is in the message queue
+ receive
+ {mailbox_up, Port, {Port,Ref}, _} ->
+ ok
+ after 0 ->
+ ok
+ end;
+ {ose_drv_reply,Port,ok} ->
+ ok
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,{Port,Ref}])
+ end;
+dehunt(Port,Ref) ->
+ erlang:error(badarg,[Port,Ref]).
+
+%%------------------------------------------------------------------------------
+%% @doc Attach to an OSE process.
+%%
+%% Will send `{mailbox_down, Port, Ref, MboxId}'
+%% to the calling process if the OSE process exits.
+%%
+%% Returns a reference that can be used to cancel the attachment
+%% using {@link detach/2}.
+%%
+%% raises: `badarg' | `enomem'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec attach(Port,Pid) -> Ref when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ Ref :: attach_ref().
+attach(Port, Spid) when ?INT_32BIT(Spid) ->
+ try port_command(Port, <<?ATTACH:8, Spid:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,Spid]);
+ {ose_drv_reply,Port,Ref} ->
+ Ref
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid])
+ end;
+attach(Port,Spid) ->
+ erlang:error(badarg,[Port,Spid]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Remove attachment to an OSE process.
+%%
+%% If a message for this monitor has been sent but not received
+%% by the calling process, it is removed from the message queue.
+%% Note that this only works of the same process
+%% that did the attach does the detach.
+%%
+%% raises: `badarg'
+%%
+%% @see attach/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec detach(Port,Ref) -> ok when
+ Port :: mailbox(),
+ Ref :: attach_ref().
+detach(Port, {Port,Ref} ) when ?INT_32BIT(Ref) ->
+ try port_command(Port, <<?DETACH:8, Ref:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,enoent}} ->
+ %% enoent could mean that it is in the message queue
+ receive
+ {mailbox_down,Port,{Port,Ref},_} ->
+ ok
+ after 0 ->
+ ok
+ end;
+ {ose_drv_reply,Port,ok} ->
+ ok
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,{Port,Ref}])
+ end;
+detach(Port,Ref) ->
+ erlang:error(badarg,[Port,Ref]).
+
+%%------------------------------------------------------------------------------
+%% @doc Send an OSE message.
+%%
+%% The message is sent from the OSE process' own ID that is: `get_id(Port)'.
+%%
+%% raises: `badarg'
+%%
+%% @see send/5
+%% @end
+%%------------------------------------------------------------------------------
+-spec send(Port,Pid,SigNo,SigData) -> ok when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ SigNo :: message_number(),
+ SigData :: iodata().
+send(Port, Spid, SigNo, SigData) when ?INT_32BIT(Spid), ?INT_32BIT(SigNo) ->
+ try erlang:port_command(Port, [<<?SEND:8, Spid:32, SigNo:32>>, SigData]) of
+ true -> ok
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid,SigNo,SigData])
+ end;
+send(Port,Spid,SigNo,SigData) ->
+ erlang:error(badarg,[Port,Spid,SigNo,SigData]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Send an OSE message with different sender.
+%%
+%% As {@link send/4} but the sender will be `SenderPid'.
+%%
+%% raises: `badarg'
+%%
+%% @see send/4
+%% @end
+%%------------------------------------------------------------------------------
+-spec send(Port,Pid,SenderPid,SigNo,SigData) -> ok when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ SenderPid :: mailbox_id(),
+ SigNo :: message_number(),
+ SigData :: iodata().
+send(Port, Spid, SenderPid, SigNo, SigData)
+ when ?INT_32BIT(Spid), ?INT_32BIT(SenderPid), ?INT_32BIT(SigNo) ->
+ try erlang:port_command(Port, [<<?SEND_W_S:8, Spid:32, SenderPid:32,
+ SigNo:32>>, SigData]) of
+ true -> ok
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid,SenderPid,SigNo,SigData])
+ end;
+send(Port,Spid,SenderPid,SigNo,SigData) ->
+ erlang:error(badarg,[Port,Spid,SenderPid,SigNo,SigData]).
+
+%%------------------------------------------------------------------------------
+%% @doc Start listening for specified OSE signal numbers.
+%%
+%% The mailbox will send `{message,Port,{FromMboxId,ToMboxId,MsgNo,MsgData}}'
+%% to the process that created the mailbox when an OSE message with any
+%% of the specified `SigNos' arrives.
+%%
+%% Repeated calls to listen will replace the current set of signal numbers to
+%% listen to. i.e
+%%
+%% ```1>ose:listen(MsgB,[1234,12345]).
+%% ok
+%% 2> ose:listen(MsgB,[1234,123456]).
+%% ok.'''
+%%
+%% The above will first listen for signals with numbers 1234 and 12345, and then
+%% replace that with only listening to 1234 and 123456.
+%%
+%% With the current implementation it is not possible to listen to all signal
+%% numbers.
+%%
+%% raises: `badarg' | `enomem'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec listen(Port, SigNos) -> ok when
+ Port :: mailbox(),
+ SigNos :: list(message_number()).
+listen(Port, SigNos) when is_list(SigNos) ->
+ USSigNos = lists:usort(SigNos),
+ BinSigNos = try
+ << <<SigNo:32>> ||
+ SigNo <- USSigNos,
+ ?INT_32BIT(SigNo) orelse erlang:error(badarg)
+ >>
+ catch _:_ ->
+ erlang:error(badarg,[Port,SigNos])
+ end,
+ try port_command(Port, [?LISTEN, BinSigNos]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,SigNos]);
+ {ose_drv_reply,Port,Else} ->
+ Else
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,SigNos])
+ end;
+listen(Port, SigNos) ->
+ erlang:error(badarg,[Port,SigNos]).
+
+
+%%%=============================================================================
+%%% Internal functions
+%%%=============================================================================
diff --git a/lib/ose/test/Makefile b/lib/ose/test/Makefile
new file mode 100644
index 0000000000..7e2080ba38
--- /dev/null
+++ b/lib/ose/test/Makefile
@@ -0,0 +1,67 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ ose_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+
+INSTALL_PROGS= $(TARGET_FILES)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/ose_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include \
+ -I$(ERL_TOP)/lib/kernel/include
+
+EBIN = .
+
+EMAKEFILE=Emakefile
+COVERFILE=ose.cover
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) ose.spec $(EMAKEFILE) \
+ $(ERL_FILES) $(COVERFILE) "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+ @tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
+
+release_docs_spec:
diff --git a/lib/ose/test/ose.cover b/lib/ose/test/ose.cover
new file mode 100644
index 0000000000..7b846cfaf6
--- /dev/null
+++ b/lib/ose/test/ose.cover
@@ -0,0 +1,2 @@
+%% -*- erlang -*-
+{incl_app,ose,details}.
diff --git a/lib/ose/test/ose.spec b/lib/ose/test/ose.spec
new file mode 100644
index 0000000000..c897e8cd16
--- /dev/null
+++ b/lib/ose/test/ose.spec
@@ -0,0 +1 @@
+{suites,"../ose_test",all}.
diff --git a/lib/ose/test/ose_SUITE.erl b/lib/ose/test/ose_SUITE.erl
new file mode 100644
index 0000000000..7e81b19894
--- /dev/null
+++ b/lib/ose/test/ose_SUITE.erl
@@ -0,0 +1,765 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(ose_SUITE).
+
+%-compile(export_all).
+
+-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([
+ basic/1,stress/1,multi_msg_numbers/1,multi_mailboxes/1,
+ hunt/1,multi_hunt/1,dehunt/1,multi_dehunt/1,
+ attach/1,multi_attach/1,detach/1,multi_detach/1,
+ open_errors/1,close_errors/1,get_id_errors/1,get_name_errors/1,
+ hunt_errors/1,dehunt_errors/1,attach_errors/1,detach_errors/1,
+ send_errors/1,send_w_s_errors/1,listen_errors/1
+ ]).
+
+-define(INTERFACE,ose).
+
+
+init_per_testcase(_Func, Config) ->
+ Config.
+end_per_testcase(_Func, _Config) ->
+ ok.
+
+suite() -> [{timeout,{30,seconds}}].
+
+all() ->
+ [
+ basic,stress,multi_msg_numbers,multi_mailboxes,
+ hunt,multi_hunt,dehunt,multi_dehunt,
+ attach,multi_attach,detach,multi_detach,
+
+ open_errors,close_errors,get_id_errors,get_name_errors,
+ hunt_errors,dehunt_errors,attach_errors,detach_errors,
+ send_errors,send_w_s_errors,listen_errors
+ ].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ case os:type() of
+ {ose,_} ->
+ Config;
+ _Else ->
+ {skip,"Only run on OSE"}
+ end.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+basic(_Config) ->
+
+ [P1,P2] = multi_open(2,[42]),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ ok = ?INTERFACE:send(P2,P1Id,42,<<"ping">>),
+ receive
+ {message,P1,V1} ->
+ {P2Id,P1Id,42,<<"ping">>} = V1,
+ ?INTERFACE:send(P1,P2Id,42,<<"pong">>);
+ Else1 ->
+ ct:fail({got_wrong_message,Else1})
+ end,
+
+ receive
+ {message,P2,V2} ->
+ {P1Id,P2Id,42,<<"pong">>} = V2;
+ Else2 ->
+ ct:fail({got_wrong_message,Else2})
+ end,
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+%% Send 1000 messages and see if we can cope and that msg order is preserved
+stress(_Config) ->
+
+ Iterations = 1000,
+
+ [P1,P2] = multi_open(2,[42]),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ spawn(fun() ->
+ n(fun(N) ->
+ Msg = [<<"ping">>|integer_to_list(N)],
+ ?INTERFACE:send(P2,P1Id,42,Msg)
+ end,Iterations)
+ end),
+ timer:sleep(100),
+ n(fun(N) ->
+ receive
+ {message,P1,Value} ->
+ Int = integer_to_binary(N),
+ {P2Id,P1Id,42,<<"ping",Int/binary>>} = Value,
+ ok;
+ Else ->
+ ct:fail({got_wrong_message,Else})
+ end
+ end,Iterations),
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+%% Listen to 1000 different message numbers and send some random messages
+multi_msg_numbers(_Config) ->
+
+ Iterations = 100,
+
+ [P1,P2] = multi_open(2,lists:seq(2000,3000)),
+ P1Id = ?INTERFACE:get_id(P1),
+
+ n(fun(_) ->
+ Num = random:uniform(1000)+2000,
+ ?INTERFACE:send(P2,P1Id,Num,<<"ping",(integer_to_binary(Num))/binary>>)
+ end,Iterations),
+
+ n(fun(_) ->
+ receive
+ {message,P1,{_,_,Id,<<"ping",Num/binary>>}} when Id > 2000;
+ Id =< 3000 ->
+ Id = binary_to_integer(Num),
+ ok;
+ Else ->
+ ct:fail({got_wrong_message,Else})
+ end
+ end,Iterations),
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+
+%% Create 100 mailboxes and send messages to them
+multi_mailboxes(_Config) ->
+
+ Mailboxes = 100,
+
+ [P1|MBs] = multi_open(Mailboxes,[42]),
+
+ [?INTERFACE:send(P1,?INTERFACE:get_id(P),42,[<<"ping">>,?INTERFACE:get_name(P,?INTERFACE:get_id(P))]) || P <- MBs],
+
+ [receive
+ {message,P,Value} ->
+ Name = ?INTERFACE:get_name(P,?INTERFACE:get_id(P)),
+ {_,_,42,<<"ping",Name/binary>>} = Value,
+ ok
+ end || P <- MBs],
+
+ [?INTERFACE:close(P) || P <- [P1|MBs]],
+ ok.
+
+hunt(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+ receive
+ {mailbox_up,P1,Ref,Pid} ->
+ Pid = ?INTERFACE:get_id(P2),
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2);
+ Else ->
+ ct:fail({got_wrong_message,Else,Ref})
+ end.
+
+multi_hunt(_Config) ->
+
+ Iterations = 100,
+
+ P = ?INTERFACE:open("p"),
+
+ Refs = [?INTERFACE:hunt(P,"p"++integer_to_list(N))|| N <- lists:seq(1,Iterations)],
+
+ Pids = [begin
+ Prt = ?INTERFACE:open("p"++integer_to_list(N)),
+ Pid = ?INTERFACE:get_id(Prt),
+ ?INTERFACE:close(Prt),
+ Pid
+ end || N <- lists:seq(1,Iterations)],
+
+ [receive
+ {mailbox_up,P,Ref,Pid} ->
+ ok
+ after 10 ->
+ ct:fail({did_not_get,Pid,Ref})
+ end || {Pid,Ref} <- lists:zip(Pids,Refs)],
+ ?INTERFACE:close(P).
+
+
+dehunt(_Config) ->
+ [P1] = multi_open(1,[]),
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+ receive
+ _Else -> ct:fail({got,_Else})
+ after 1000 ->
+ ok
+ end,
+ P2 = ?INTERFACE:open("p2"),
+
+ % Make sure any messages are sent
+ receive after 10 -> ok end,
+
+ ok = ?INTERFACE:dehunt(P1,Ref),
+
+ % Make sure no messages are received
+ receive
+ _Else2 -> ct:fail({got,_Else2})
+ after 1000 ->
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2)
+ end.
+
+%%%
+%%% This testcase basically:
+%%% spawn 10 processes that in parallel
+%%% adds some hunts for different OSE processes
+%%% maybe create hunted OSE process
+%%% dehunt half of the hunts
+%%% create more hunts
+%%% if not created create hunted OSE process
+%%% veryify that all expected hunt messages are received
+%%% verify that all processes exited correctly
+%%%
+%%% This complex test is done to make sure that the internal handling
+%%% of dehunt works as expected.
+%%%
+multi_dehunt(_Config) ->
+ [P1] = multi_open(1,[]),
+
+ Scenario =
+ fun(Iterations) ->
+
+ Hunted = "p"++integer_to_list(Iterations),
+ %% Start a couple of hunts
+ Refs = [?INTERFACE:hunt(P1,Hunted) || _ <- lists:seq(1,Iterations)],
+
+ %% We alternate if the process is opened before or after the dehunt
+ P2O = if Iterations rem 2 == 0 ->
+ ?INTERFACE:open(Hunted);
+ true ->
+ undefined
+ end,
+
+ %% Remove half of them
+ {RemRefs,_} = lists:mapfoldl(fun(Ref,Acc) when Acc rem 2 == 0 ->
+ ok = ?INTERFACE:dehunt(P1,Ref),
+ {[],Acc+1};
+ (Ref,Acc) ->
+ {Ref,Acc+1}
+ end,0,Refs),
+
+ %% Add some new ones
+ NewRefs = [?INTERFACE:hunt(P1,Hunted)
+ || _ <- lists:seq(1,Iterations div 4)]
+ ++ lists:flatten(RemRefs),
+
+ P2 = if P2O == undefined ->
+ ?INTERFACE:open(Hunted);
+ true ->
+ P2O
+ end,
+ P2Id = ?INTERFACE:get_id(P2),
+
+ %% Receive all the expected ones
+ lists:foreach(fun(Ref) ->
+ receive
+ {mailbox_up,P1,Ref,P2Id} ->
+ ok
+ after 1000 ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{did_not_get, Ref}}]),
+ ok = Ref
+ end
+ end,NewRefs),
+
+ %% Check that no other have arrived
+ receive
+ _Else ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{got, _Else}}]),
+ ok = _Else
+ after 100 ->
+ ok
+ end,
+ ?INTERFACE:close(P2)
+ end,
+
+ Self = self(),
+
+ n(fun(N) ->
+ spawn(fun() -> Self !
+ Scenario(N*25)
+ end),
+ ok
+ end,10),
+
+ n(fun(_N) ->
+ receive ok -> ok
+ after 60000 -> ct:fail(failed)
+ end
+ end,10),
+ ?INTERFACE:close(P1).
+
+attach(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+
+ P2Id = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:attach(P1,P2Id),
+ ?INTERFACE:close(P2),
+ receive
+ {mailbox_down,P1,Ref,P2Id} ->
+ ?INTERFACE:close(P1);
+ _Else ->
+ ct:fail({got,_Else, {P1,Ref,P2Id}})
+ after 1000 ->
+ ct:fail({did_not_get,P1,Ref,P2Id})
+ end.
+
+multi_attach(_Config) ->
+
+ Iterations = 100,
+
+ [P1|Pids] = multi_open(Iterations,[]),
+
+ Refs = [{?INTERFACE:get_id(Pid),?INTERFACE:attach(P1,?INTERFACE:get_id(Pid))} || Pid <- Pids],
+
+ [?INTERFACE:close(Pid) || Pid <- Pids],
+
+ [receive
+ {mailbox_down,P1,Ref,Pid} ->
+ ok
+ after 10000 ->
+ ct:fail({did_not_get,Pid,Ref})
+ end || {Pid,Ref} <- Refs],
+ ?INTERFACE:close(P1).
+
+detach(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+ P2Id = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:attach(P1,P2Id),
+ receive
+ _Else -> ct:fail({got,_Else})
+ after 100 ->
+ ok
+ end,
+
+ ?INTERFACE:close(P2),
+
+ % Make sure any messages are sent
+ receive after 10 -> ok end,
+
+ ?INTERFACE:detach(P1,Ref),
+
+ % Make sure no messages are received
+ receive
+ _Else2 -> ct:fail({got,_Else2})
+ after 1000 ->
+ ?INTERFACE:close(P1)
+ end.
+
+%%%
+%%% This testcase basically:
+%%% spawn 10 processes that in parallel
+%%% adds some attach for different OSE processes
+%%% maybe close OSE process
+%%% dehunt half of the hunts
+%%% create more hunts
+%%% if not closed close attached OSE process
+%%% veryify that all expected attach messages are received
+%%% verify that all processes exited correctly
+%%%
+%%% This complex test is done to make sure that the internal handling
+%%% of dehunt works as expected.
+%%%
+multi_detach(_Config) ->
+ [P1] = multi_open(1,[]),
+
+ Scenario =
+ fun(Iterations) ->
+
+ Attached = ?INTERFACE:open("p"++integer_to_list(Iterations)),
+ AttachedId = ?INTERFACE:get_id(Attached),
+ %% Start a couple of attachs
+ Refs = [?INTERFACE:attach(P1,AttachedId) || _ <- lists:seq(1,Iterations)],
+
+ %% We alternate if the process is closed before or after the detach
+ P2O = if Iterations rem 2 == 0 ->
+ ?INTERFACE:close(Attached);
+ true ->
+ undefined
+ end,
+
+ %% Remove half of them
+ {RemRefs,_} = lists:mapfoldl(fun(Ref,Acc) when Acc rem 2 == 0 ->
+ ok = ?INTERFACE:detach(P1,Ref),
+ {[],Acc+1};
+ (Ref,Acc) ->
+ {Ref,Acc+1}
+ end,0,Refs),
+
+ %% Add some new ones
+ NewRefs = [?INTERFACE:attach(P1,AttachedId)
+ || _ <- lists:seq(1,Iterations div 4)]
+ ++ lists:flatten(RemRefs),
+
+ if P2O == undefined ->
+ ?INTERFACE:close(Attached);
+ true ->
+ P2O
+ end,
+
+ %% Receive all the expected ones
+ lists:foreach(fun(Ref) ->
+ receive
+ {mailbox_down,P1,Ref,AttachedId} ->
+ ok
+ after 1000 ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{did_not_get, Ref}}]),
+ ok = Ref
+ end
+ end,NewRefs),
+
+ %% Check that no other have arrived
+ receive
+ _Else ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{got, _Else}}]),
+ ok = _Else
+ after 100 ->
+ ok
+ end
+ end,
+
+ Self = self(),
+
+ n(fun(N) ->
+ spawn(fun() -> Self !
+ Scenario(N*5)
+ end),
+ ok
+ end,10),
+
+ n(fun(_N) ->
+ receive ok -> ok
+ after 60000 -> ct:fail(failed)
+ end
+ end,10),
+ ?INTERFACE:close(P1).
+
+
+open_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,open,[inval],_}|_]}} =
+ (catch ?INTERFACE:open(inval)),
+ {'EXIT',{badarg,[{?INTERFACE,open,[["p"|1]],_}|_]}} =
+ (catch ?INTERFACE:open(["p"|1])),
+ {'EXIT',{badarg,[{?INTERFACE,open,[["p",1234]],_}|_]}} =
+ (catch ?INTERFACE:open(["p",1234])),
+
+ ok.
+
+close_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,close,[inval],_}|_]}} =
+ (catch ?INTERFACE:close(inval)),
+
+ P1 = ?INTERFACE:open("p1"),
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P1).
+
+
+get_id_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,get_id,[inval],_}|_]}} =
+ (catch ?INTERFACE:get_id(inval)),
+
+ P1 = ?INTERFACE:open("p1"),
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,get_id,[P1],_}|_]}} =
+ (catch ?INTERFACE:get_id(P1)),
+
+ ok.
+
+get_name_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ {'EXIT',{badarg,[{?INTERFACE,get_name,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:get_name(P1,inval)),
+
+ undefined = ?INTERFACE:get_name(P1,1234),
+
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,get_name,[P1,P2Id],_}|_]}} =
+ (catch ?INTERFACE:get_name(P1,P2Id)),
+ ?INTERFACE:close(P2),
+
+ P3 = ?INTERFACE:open([255]),
+ <<255>> = ?INTERFACE:get_name(P3, ?INTERFACE:get_id(P3)),
+ ?INTERFACE:close(P3),
+
+ ok.
+
+hunt_errors(_Config) ->
+
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:hunt(inval,"hello")),
+
+ P1 = ?INTERFACE:open("p1"),
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[P1,["hello",12345]],_}|_]}} =
+ (catch ?INTERFACE:hunt(P1,["hello",12345])),
+
+ P2 = ?INTERFACE:open(<<255>>),
+ P2Pid = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:hunt(P1,[255]),
+ receive
+ {mailbox_up,P1,Ref,P2Pid} ->
+ ok;
+ Else ->
+ ct:fail({got,Else,{mailbox_up,P1,Ref,P2Pid}})
+ after 150 ->
+ ct:fail({did_not_get,{mailbox_up,P1,Ref,P2Pid}})
+ end,
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P2),
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[P1,["hello"]],_}|_]}} =
+ (catch ?INTERFACE:hunt(P1,["hello"])),
+
+ ok.
+
+dehunt_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[inval,Ref],_}|_]}} =
+ (catch ?INTERFACE:dehunt(inval,Ref)),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:dehunt(P1,inval)),
+
+ ok = ?INTERFACE:dehunt(P1,Ref),
+ ok = ?INTERFACE:dehunt(P1,Ref),
+
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[P1,Ref],_}|_]}} =
+ (catch ?INTERFACE:dehunt(P1,Ref)),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ P2 = ?INTERFACE:open("p2"),
+ ok = ?INTERFACE:close(P2)
+ end,
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+attach_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,attach,[inval,P2Id],_}|_]}} =
+ (catch ?INTERFACE:attach(inval,P2Id)),
+
+ {'EXIT',{badarg,[{?INTERFACE,attach,[P1,[12345]],_}|_]}} =
+ (catch ?INTERFACE:attach(P1,[12345])),
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P2),
+ {'EXIT',{badarg,[{?INTERFACE,attach,[P1,P2Id],_}|_]}} =
+ (catch ?INTERFACE:attach(P1,P2Id)),
+
+ ok.
+
+detach_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ Ref = ?INTERFACE:attach(P1,P2Id),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[inval,Ref],_}|_]}} =
+ (catch ?INTERFACE:detach(inval,Ref)),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:detach(P1,inval)),
+
+ ok = ?INTERFACE:detach(P1,Ref),
+ ok = ?INTERFACE:detach(P1,Ref),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ ok = ?INTERFACE:close(P1)
+ end,
+
+ ok = ?INTERFACE:close(P2),
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[P1,Ref],_}|_]}} =
+ (catch ?INTERFACE:detach(P1,Ref)),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+send_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[inval,P2Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(inval,P2Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,inval,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,inval,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,inval,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,42,inval],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,42,inval)),
+
+ ok = ?INTERFACE:close(P2),
+ ok = ?INTERFACE:send(P1,P2Id,42,"hello"),
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,42,"hello")),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+send_w_s_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+ P3 = ?INTERFACE:open("p3"),
+ P3Id = ?INTERFACE:get_id(P3),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[inval,P2Id,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(inval,P2Id,P1Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,-1,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,-1,P1Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,1 bsl 32,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,1 bsl 32,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,P1Id,inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,P1Id,inval,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,P1Id,42,inval],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,P1Id,42,inval)),
+
+ ok = ?INTERFACE:close(P3),
+ ok = ?INTERFACE:send(P2,P3Id,P1Id,42,"hello"),
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:send(P2,P2Id,P1Id,42,"hello"),
+ ok = ?INTERFACE:close(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,P1Id,42,"hello")),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+listen_errors(_Config) ->
+
+ P1 = ?INTERFACE:open("p1"),
+ P1Id = ?INTERFACE:get_id(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,listen,[inval,[42]],_}|_]}} =
+ (catch ?INTERFACE:listen(inval,[42])),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,inval)),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,[1 bsl 33]],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,[1 bsl 33])),
+
+ ok = ?INTERFACE:listen(P1,[42,42,42,42,42,42,42,42,42,42,42,42,42]),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ ?INTERFACE:send(P1,P1Id,42,"hello"),
+ timer:sleep(50),
+ ?INTERFACE:listen(P1,[]),
+ ?INTERFACE:send(P1,P1Id,42,"hello2"),
+
+ receive
+ {message,P1,42,"hello"} -> ok
+ end,
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end
+ end,
+
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,[42]],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,[42])),
+
+ ok.
+
+%%
+%% Internal functions
+%%
+multi_open(N,ListenNums) ->
+ multi_open(N,ListenNums,[]).
+
+multi_open(0,_,Acc) ->
+ Acc;
+multi_open(N,ListenNums,Acc) ->
+ P = ?INTERFACE:open("p"++integer_to_list(N)),
+ ok = ?INTERFACE:listen(P,ListenNums),
+ multi_open(N-1,ListenNums,[P|Acc]).
+
+n(_F,0) ->
+ ok;
+n(F,N) ->
+ ok = F(N),
+ n(F,N-1).
+
+
+flush() ->
+ receive
+ Msg ->
+ [Msg|flush()]
+ after 0 ->
+ []
+ end.
diff --git a/lib/ose/vsn.mk b/lib/ose/vsn.mk
new file mode 100644
index 0000000000..70db2ed69d
--- /dev/null
+++ b/lib/ose/vsn.mk
@@ -0,0 +1 @@
+OSE_VSN = 1.0.2
diff --git a/lib/otp_mibs/doc/src/book.xml b/lib/otp_mibs/doc/src/book.xml
index 11d08b8a41..5377685cd3 100644
--- a/lib/otp_mibs/doc/src/book.xml
+++ b/lib/otp_mibs/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/fascicules.xml b/lib/otp_mibs/doc/src/fascicules.xml
index 101e745722..c075478967 100644
--- a/lib/otp_mibs/doc/src/fascicules.xml
+++ b/lib/otp_mibs/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/otp_mibs/doc/src/introduction.xml b/lib/otp_mibs/doc/src/introduction.xml
index c1ed0fed78..e58c237de2 100644
--- a/lib/otp_mibs/doc/src/introduction.xml
+++ b/lib/otp_mibs/doc/src/introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/mibs.xml b/lib/otp_mibs/doc/src/mibs.xml
index 16d2ac201a..4e3e849043 100644
--- a/lib/otp_mibs/doc/src/mibs.xml
+++ b/lib/otp_mibs/doc/src/mibs.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/notes.xml b/lib/otp_mibs/doc/src/notes.xml
index 8986eab9ad..c61978c99e 100644
--- a/lib/otp_mibs/doc/src/notes.xml
+++ b/lib/otp_mibs/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,71 @@
<p>This document describes the changes made to the OTP_Mibs
application.</p>
+<section><title>Otp_Mibs 1.0.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure the clean rule for ssh, ssl, eunit and otp_mibs
+ actually removes generated files.</p>
+ <p>
+ Own Id: OTP-12200</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Otp_Mibs 1.0.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add type based integer value truncation/reset.</p>
+ <p>
+ This fixes errors when querying e.g. the
+ erlNodeReductions, erlNodeInBytes and erlNodeOutBytes
+ objects in long-running Erlang/OTP systems.</p>
+ <p>
+ Update types of applicable MIB objects to 64bit based
+ types.</p>
+ <p>
+ Potential incompatibility: Type change of Counter32 to
+ Counter64 in OTP-MIB.mib</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11203</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Otp_Mibs 1.0.8</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/otp_mibs/doc/src/otp_mib.xml b/lib/otp_mibs/doc/src/otp_mib.xml
index c96b31a1d4..9be25fc7a0 100644
--- a/lib/otp_mibs/doc/src/otp_mib.xml
+++ b/lib/otp_mibs/doc/src/otp_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/part.xml b/lib/otp_mibs/doc/src/part.xml
index 40988fda69..352a4e33c8 100644
--- a/lib/otp_mibs/doc/src/part.xml
+++ b/lib/otp_mibs/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/part_notes.xml b/lib/otp_mibs/doc/src/part_notes.xml
index a7bdde9b64..1212c2d80d 100644
--- a/lib/otp_mibs/doc/src/part_notes.xml
+++ b/lib/otp_mibs/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/doc/src/ref_man.xml b/lib/otp_mibs/doc/src/ref_man.xml
index 1b5d91e9db..d1d5d7f2eb 100644
--- a/lib/otp_mibs/doc/src/ref_man.xml
+++ b/lib/otp_mibs/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/otp_mibs/mibs/OTP-EVA-MIB.mib b/lib/otp_mibs/mibs/OTP-EVA-MIB.mib
index 6fbb8ef073..2815251c23 100644
--- a/lib/otp_mibs/mibs/OTP-EVA-MIB.mib
+++ b/lib/otp_mibs/mibs/OTP-EVA-MIB.mib
@@ -34,7 +34,7 @@ IMPORTS
;
otpEvaModule MODULE-IDENTITY
- LAST-UPDATED "0305090900Z"
+ LAST-UPDATED "200305090900Z"
ORGANIZATION "Ericsson"
CONTACT-INFO
"Contact: Erlang Support see license agreement for Erlang/OTP."
@@ -42,19 +42,19 @@ otpEvaModule MODULE-IDENTITY
"This MIB is part of the OTP MIB. It defines MIB objects
for the eva application in OTP."
- REVISION "0305090900Z"
+ REVISION "200305090900Z"
DESCRIPTION
"Changed CONTACT-INFO as it was outdated, made it more generic
to avoid such changes in the future."
- REVISION "9801270900Z"
+ REVISION "199801270900Z"
DESCRIPTION
"Changed erroneous defintion of alarmCleared notification.
Changed erroneous name of this module to otpEvaModule."
- REVISION "9712010900Z"
+ REVISION "199712010900Z"
DESCRIPTION
"Converted to v2 SMI and placed in the OTP tree."
- REVISION "9705020900Z"
+ REVISION "199705020900Z"
DESCRIPTION
"The initial version of this MIB module. It is very much
inspired by the ANS-ALM-MIB and Axd301Eva-OMS mibs."
diff --git a/lib/otp_mibs/mibs/OTP-MIB.mib b/lib/otp_mibs/mibs/OTP-MIB.mib
index 2d4c286bc7..22dc21c9c5 100644
--- a/lib/otp_mibs/mibs/OTP-MIB.mib
+++ b/lib/otp_mibs/mibs/OTP-MIB.mib
@@ -21,7 +21,7 @@ OTP-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE,
- Counter32, Gauge32, Integer32
+ Counter64, Gauge32, Integer32
FROM SNMPv2-SMI
TEXTUAL-CONVENTION, DisplayString
FROM SNMPv2-TC
@@ -32,7 +32,7 @@ IMPORTS
;
otpModule MODULE-IDENTITY
- LAST-UPDATED "0305090900Z"
+ LAST-UPDATED "201307160700Z"
ORGANIZATION "Ericsson"
CONTACT-INFO
"Contact: Erlang Support see license agreement for Erlang/OTP."
@@ -41,16 +41,22 @@ otpModule MODULE-IDENTITY
agent executing at one node only. Each Erlang node in the
OTP system is represented by one row in the erlNodeTable."
- REVISION "0305090900Z"
+ REVISION "201307160700Z"
+ DESCRIPTION
+ "Updated various types to be able to reflect larger values.
+ The objects erlNodeReductions, erlNodeInBytes, erlNodeOutBytes as well
+ as the type MilliSeconds have been updated to Counter64."
+
+ REVISION "200305090900Z"
DESCRIPTION
"Changed CONTACT-INFO as it was outdated, made it more generic
to avoid such changes in the future."
- REVISION "9712010900Z"
+ REVISION "199712010900Z"
DESCRIPTION
"Converted to v2 SMI and placed in the OTP tree."
- REVISION "9608191700Z"
+ REVISION "199608191700Z"
DESCRIPTION
"The initial revision of MIB module OTP-MIB."
@@ -70,7 +76,7 @@ MilliSeconds ::= TEXTUAL-CONVENTION
the time, in milliseconds between two epochs. When objects
are defined which use this type, the description of the object
identifies both of the reference epochs."
- SYNTAX Counter32
+ SYNTAX Counter64
-- Managed Objects
@@ -103,10 +109,10 @@ ErlNodeEntry ::= SEQUENCE {
erlNodeRunQueue Gauge32,
erlNodeRunTime MilliSeconds,
erlNodeWallClock MilliSeconds,
- erlNodeReductions Counter32,
+ erlNodeReductions Counter64,
erlNodeProcesses Gauge32,
- erlNodeInBytes Counter32,
- erlNodeOutBytes Counter32
+ erlNodeInBytes Counter64,
+ erlNodeOutBytes Counter64
}
erlNodeId OBJECT-TYPE
@@ -168,7 +174,7 @@ erlNodeWallClock OBJECT-TYPE
::= { erlNodeEntry 7 }
erlNodeReductions OBJECT-TYPE
- SYNTAX Counter32
+ SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
@@ -184,7 +190,7 @@ erlNodeProcesses OBJECT-TYPE
::= { erlNodeEntry 9 }
erlNodeInBytes OBJECT-TYPE
- SYNTAX Counter32
+ SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
@@ -192,7 +198,7 @@ erlNodeInBytes OBJECT-TYPE
::= { erlNodeEntry 10 }
erlNodeOutBytes OBJECT-TYPE
- SYNTAX Counter32
+ SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
diff --git a/lib/otp_mibs/mibs/OTP-REG.mib b/lib/otp_mibs/mibs/OTP-REG.mib
index c6ef2c67e5..c700f93fd8 100644
--- a/lib/otp_mibs/mibs/OTP-REG.mib
+++ b/lib/otp_mibs/mibs/OTP-REG.mib
@@ -25,25 +25,25 @@ IMPORTS
;
otpRegModule MODULE-IDENTITY
- LAST-UPDATED "0305090900Z"
+ LAST-UPDATED "200305090900Z"
ORGANIZATION "Ericsson"
CONTACT-INFO
"Contact: Erlang Support see license agreement for Erlang/OTP."
DESCRIPTION
"The root MIB module for OTP."
- REVISION "0305090900Z"
+ REVISION "200305090900Z"
DESCRIPTION
"Changed CONTACT-INFO as it was outdated, made it more generic
to avoid such changes in the future."
- REVISION "9902020900Z"
+ REVISION "199902020900Z"
DESCRIPTION
"Cleaned up OBJECT IDENTIFIER registration. Changed the name
of the MODULE-IDENTITY of this module to non-conflicting name
otpRegModule."
- REVISION "9712010900Z"
+ REVISION "199712010900Z"
DESCRIPTION
"The initial revision of MIB module OTP-REG."
::= { otpModules 1 }
diff --git a/lib/otp_mibs/mibs/OTP-TC.mib b/lib/otp_mibs/mibs/OTP-TC.mib
index 38c4d05846..9b80e1ccac 100644
--- a/lib/otp_mibs/mibs/OTP-TC.mib
+++ b/lib/otp_mibs/mibs/OTP-TC.mib
@@ -29,7 +29,7 @@ IMPORTS
;
otpTcModule MODULE-IDENTITY
- LAST-UPDATED "0305090900Z"
+ LAST-UPDATED "200305090900Z"
ORGANIZATION "Ericsson"
CONTACT-INFO
"Contact: Erlang Support see license agreement for Erlang/OTP."
@@ -37,13 +37,13 @@ otpTcModule MODULE-IDENTITY
"This MIB is part of the OTP MIB. It defines common
Textual Conventions used in other OTP mib modules."
- REVISION "0305090900Z"
+ REVISION "200305090900Z"
DESCRIPTION
"Changed CONTACT-INFO as it was outdated, made it more generic
to avoid such changes in the future."
- REVISION "9712010900Z"
+ REVISION "199712010900Z"
DESCRIPTION
"The initial version of this module."
::= { otpModules 2 }
diff --git a/lib/otp_mibs/src/Makefile b/lib/otp_mibs/src/Makefile
index 4f03d0228a..6096240bbd 100644
--- a/lib/otp_mibs/src/Makefile
+++ b/lib/otp_mibs/src/Makefile
@@ -72,7 +72,7 @@ ERL_COMPILE_FLAGS += -I$(INCLUDE) +warn_obsolete_guard
debug opt: $(TARGETS)
clean:
- rm -f $(TARGETS_FILES)
+ rm -f $(TARGET_FILES)
rm -f $(APP_TARGET)
rm -f $(APPUP_TARGET)
rm -f core
diff --git a/lib/otp_mibs/src/otp_mib.erl b/lib/otp_mibs/src/otp_mib.erl
index 619104007c..9d52ce1fab 100644
--- a/lib/otp_mibs/src/otp_mib.erl
+++ b/lib/otp_mibs/src/otp_mib.erl
@@ -1,26 +1,26 @@
%%
%% %CopyrightBegin%
-%%
+%%
%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
-%%
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(otp_mib).
%%%-----------------------------------------------------------------
%%% Description: This module implements the OTP-MIB.
%%% The tables are implemented as shadow tables with the module
-%%% snmp_shadow_table.
+%%% snmp_shadow_table.
%%%-----------------------------------------------------------------
%% API
@@ -35,9 +35,9 @@
%% Exported for internal use via rpc
-export([get_erl_node/1, get_appls/1]).
-%% Shadow tables
+%% Shadow tables
-record(erlNodeTable,
- {erlNodeId, erlNodeName, erlNodeMachine, erlNodeVersion,
+ {erlNodeId, erlNodeName, erlNodeMachine, erlNodeVersion,
erlNodeRunQueue,
erlNodeRunTime, erlNodeWallClock, erlNodeReductions,
erlNodeProcesses, erlNodeInBytes, erlNodeOutBytes}).
@@ -45,13 +45,13 @@
-record(applTable, {key = '_', applName = '_', applDescr = '_',
applVsn = '_'}).
-%% Shadow argument macros
--define(erlNodeShadowArgs,
+%% Shadow argument macros
+-define(erlNodeShadowArgs,
{erlNodeTable, integer, record_info(fields, erlNodeTable), 5000,
fun otp_mib:update_erl_node_table/0}).
-define(applShadowArgs,
- {applTable, {integer, integer}, record_info(fields, applTable),
+ {applTable, {integer, integer}, record_info(fields, applTable),
5000, fun otp_mib:update_appl_table/0}).
%% Misc
@@ -79,14 +79,14 @@ load(Agent) ->
%%-------------------------------------------------------------------------
unload(Agent) ->
snmpa:unload_mibs(Agent, ["OTP-MIB"]).
-
+
%%%=========================================================================
%%% SNMP instrumentation
%%%=========================================================================
erl_node_table(new) ->
Tab = erlNodeAlloc,
- Storage = ram_copies,
+ Storage = ram_copies,
case lists:member(Tab, mnesia:system_info(tables)) of
true ->
case mnesia:table_info(Tab, storage_type) of
@@ -101,12 +101,12 @@ erl_node_table(new) ->
{attributes, record_info(fields, erlNodeAlloc)},
{local_content, true},
{Storage, Nodes}],
- {atomic, ok} = mnesia:create_table(Tab, Props)
+ {atomic, ok} = mnesia:create_table(Tab, Props)
end,
ok = mnesia:dirty_write({erlNodeAlloc, next_index, 1}),
update_node_alloc([node() | nodes()]),
snmp_shadow_table:table_func(new, ?erlNodeShadowArgs).
-
+
erl_node_table(Op, RowIndex, Cols) ->
snmp_shadow_table:table_func(Op, RowIndex, Cols, ?erlNodeShadowArgs).
@@ -148,21 +148,26 @@ update_appl_table() ->
%%% Exported for internal use via rpc
%%%========================================================================
get_erl_node(Id) ->
+ RunQueue = erlang:statistics(run_queue),
+ RunTime = element(1, erlang:statistics(runtime)),
+ WallClock = element(1, erlang:statistics(wall_clock)),
+ Reductions = element(1, erlang:statistics(reductions)),
+ Processes = length(processes()),
IO = erlang:statistics(io),
- #erlNodeTable{erlNodeId = Id,
+ InBytes = element(2, element(1, IO)),
+ OutBytes = element(2, element(2, IO)),
+ #erlNodeTable{erlNodeId = truncate_int('Integer32', Id),
erlNodeName = atom_to_list(node()),
erlNodeVersion = erlang:system_info(version),
erlNodeMachine = erlang:system_info(machine),
- erlNodeRunQueue = erlang:statistics(run_queue),
- erlNodeRunTime = element(1, erlang:statistics(runtime)),
- erlNodeWallClock =
- element(1, erlang:statistics(wall_clock)),
- erlNodeReductions =
- element(1, erlang:statistics(reductions)),
- erlNodeProcesses = length(processes()),
- erlNodeInBytes = element(2, element(1, IO)),
- erlNodeOutBytes = element(2, element(2, IO))}.
-
+ erlNodeRunQueue = truncate_int('Unsigned32', RunQueue),
+ erlNodeRunTime = truncate_int('Counter64', RunTime),
+ erlNodeWallClock = truncate_int('Counter64', WallClock),
+ erlNodeReductions = truncate_int('Counter64', Reductions),
+ erlNodeProcesses = truncate_int('Unsigned32', Processes),
+ erlNodeInBytes = truncate_int('Counter64', InBytes),
+ erlNodeOutBytes = truncate_int('Counter64', OutBytes)}.
+
get_appls(NodeId) ->
element(1,
lists:mapfoldl(
@@ -181,7 +186,7 @@ update_node_alloc([Node | T]) ->
case mnesia:dirty_read({erlNodeAlloc, Node}) of
[] ->
[{_, _, Idx}] = mnesia:dirty_read({erlNodeAlloc, next_index}),
- ok = mnesia:dirty_write(#erlNodeAlloc{nodeName = Node,
+ ok = mnesia:dirty_write(#erlNodeAlloc{nodeName = Node,
nodeId = Idx}),
ok = mnesia:dirty_write({erlNodeAlloc, next_index, Idx + 1});
_ ->
@@ -196,3 +201,15 @@ delete_all(Key, Name) ->
Next = mnesia:dirty_next(Name, Key),
ok = mnesia:dirty_delete({Name, Key}),
delete_all(Next, Name).
+
+%% This will return a value limited to fit into the specified type.
+%% While counter types will be resetted, other integer types will
+%% only be restricted to the valid range.
+truncate_int('Counter64', Value) when Value < 0 -> 0;
+truncate_int('Counter64', Value) -> Value rem 18446744073709551615;
+truncate_int('Unsigned32', Value) when Value < 0 -> 0;
+truncate_int('Unsigned32', Value) when Value > 4294967295 -> 4294967295;
+truncate_int('Unsigned32', Value) -> Value;
+truncate_int('Integer32', Value) when Value < -2147483648 -> -2147483648;
+truncate_int('Integer32', Value) when Value > 2147483647 -> 2147483647;
+truncate_int('Integer32', Value) -> Value.
diff --git a/lib/otp_mibs/src/otp_mibs.app.src b/lib/otp_mibs/src/otp_mibs.app.src
index b177af0709..ebc656b0b2 100644
--- a/lib/otp_mibs/src/otp_mibs.app.src
+++ b/lib/otp_mibs/src/otp_mibs.app.src
@@ -23,5 +23,7 @@
{modules, [otp_mib]},
{registered, []},
{applications, [kernel, stdlib, snmp]},
- {env,[]}]}.
+ {env,[]},
+ {runtime_dependencies, ["stdlib-2.0","snmp-4.25.1","mnesia-4.12",
+ "kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/otp_mibs/src/otp_mibs.appup.src b/lib/otp_mibs/src/otp_mibs.appup.src
index 5e99dfe325..fd5ce1e391 100644
--- a/lib/otp_mibs/src/otp_mibs.appup.src
+++ b/lib/otp_mibs/src/otp_mibs.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,6 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, otp_mibs}]}],
+ [{<<".*">>,[{restart_application, otp_mibs}]}]
+}.
diff --git a/lib/toolbar/src/Makefile b/lib/otp_mibs/test/Makefile
index a24846976b..48c1c5c7d8 100644
--- a/lib/toolbar/src/Makefile
+++ b/lib/otp_mibs/test/Makefile
@@ -1,93 +1,85 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1997-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../vsn.mk
-VSN=$(TOOLBAR_VSN)
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
-# Release directory specification
+# Target Specs
# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/toolbar-$(VSN)
-# ----------------------------------------------------
-# Common Macros
-# ----------------------------------------------------
+MODULES= otp_mibs_SUITE
-MODULES= \
- canvasbutton \
- toolbar \
- toolbar_graphics \
- toolbar_lib \
- toolbar_toolconfig
+EBIN = .
-HRL_FILES= toolbar.hrl
+HRL_FILES=
ERL_FILES= $(MODULES:%=%.erl)
-TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))
-APP_FILE = toolbar.app
-APP_SRC = $(APP_FILE).src
-APP_TARGET = $(EBIN)/$(APP_FILE)
+SOURCE = $(ERL_FILES) $(HRL_FILES)
-APPUP_FILE = toolbar.appup
-APPUP_SRC = $(APPUP_FILE).src
-APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/otp_mibs_test
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += \
+ -I$(ERL_TOP)/lib/test_server/include \
+ -I$(ERL_TOP)/lib/snmp/include
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-debug opt: $(TARGET_FILES)
-
-clean:
- rm -f $(TARGET_FILES)
- rm -f errs core *~
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES)\
+ > $(EMAKEFILE)
-$(APP_TARGET): $(APP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
-$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES)
+ rm -f core *~
docs:
+
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+release_spec:
-release_docs_spec:
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(SOURCE) "$(RELSYSDIR)"
+ $(INSTALL_DATA) otp_mibs_SUITE.cfg "$(RELSYSDIR)"
+release_docs_spec:
diff --git a/lib/otp_mibs/test/otp_mibs_SUITE.cfg b/lib/otp_mibs/test/otp_mibs_SUITE.cfg
new file mode 100644
index 0000000000..d01cf92104
--- /dev/null
+++ b/lib/otp_mibs/test/otp_mibs_SUITE.cfg
@@ -0,0 +1,15 @@
+%% -*- erlang -*-
+{snmp,
+ [
+ {start_agent,true},
+ {users,
+ [
+ {otp_mibs_test,[snmpm_user_default,[]]}
+ ]},
+ {managed_agents,
+ [
+ {otp_mibs_test, [otp_mibs_test, {127,0,0,1}, 4000, []]}
+ ]},
+ {agent_sysname,"Test otp_mibs"},
+ {mgr_port,5001}
+ ]}.
diff --git a/lib/otp_mibs/test/otp_mibs_SUITE.erl b/lib/otp_mibs/test/otp_mibs_SUITE.erl
new file mode 100644
index 0000000000..5376c54210
--- /dev/null
+++ b/lib/otp_mibs/test/otp_mibs_SUITE.erl
@@ -0,0 +1,254 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(otp_mibs_SUITE).
+
+%%-----------------------------------------------------------------
+%% This suite can no longer be executed standalone, i.e. it must be
+%% executed with common test. The reason is that ct_snmp is used
+%% instead of the snmp application directly. The suite requires a
+%% config file, otp_mibs_SUITE.cfg, found in the same directory as
+%% the suite.
+%%
+%% Execute with:
+%% > ct_run -suite otp_mibs_SUITE -config otp_mibs_SUITE.cfg
+%%-----------------------------------------------------------------
+
+-include_lib("test_server/include/test_server.hrl").
+-include_lib("otp_mibs/include/OTP-MIB.hrl").
+-include_lib("snmp/include/snmp_types.hrl").
+
+% Test server specific exports
+-export([all/0,
+ suite/0,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2,
+ init_per_suite/1,
+ end_per_suite/1,
+ init_per_testcase/2,
+ end_per_testcase/2]).
+
+% Test cases must be exported.
+-export([app/1, appup/1, nt_basic_types/1, nt_high_reduction_count/1]).
+
+-define(TRAP_UDP, 5000).
+-define(AGENT_UDP, 4000).
+-define(CONF_FILE_VER, [v2]).
+-define(SYS_NAME, "Test otp_mibs").
+-define(MAX_MSG_SIZE, 484).
+-define(ENGINE_ID, "mgrEngine").
+-define(MGR_PORT, 5001).
+
+%% Since some cases are only interested in single entries of the OTP-MIB's
+%% node table, one row must be chosen. The first row should be sufficient
+%% for this.
+-define(NODE_ENTRY, 1).
+
+%%---------------------------------------------------------------------
+%% CT setup
+%%---------------------------------------------------------------------
+
+init_per_testcase(_Case, Config) when is_list(Config) ->
+ Dog = test_server:timetrap(test_server:minutes(6)),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(_Case, Config) when is_list(Config) ->
+ Dog = ?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ Config.
+
+suite() -> [{ct_hooks,[ts_install_cth]}, {require, snmp_mgr_agent, snmp}].
+
+all() -> [{group, app}, {group, node_table}].
+
+groups() -> [{app, [], [app, appup]},
+ {node_table, [], [nt_basic_types, nt_high_reduction_count]}].
+
+init_per_group(_GroupName, Config) -> Config.
+
+end_per_group(_GroupName, Config) -> Config.
+
+init_per_suite(Config) ->
+ ?line application:start(sasl),
+ ?line application:start(mnesia),
+ ?line application:start(otp_mibs),
+
+ ok = ct_snmp:start(Config,snmp_mgr_agent),
+
+ %% Load the mibs that should be tested
+ otp_mib:load(snmp_master_agent),
+
+ Config.
+
+end_per_suite(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ ConfDir = filename:join(PrivDir,"conf"),
+ DbDir = filename:join(PrivDir,"db"),
+ MgrDir = filename:join(PrivDir, "mgr"),
+
+ %% Uload mibs
+ otp_mib:unload(snmp_master_agent),
+
+ %% Clean up
+ application:stop(snmp),
+ application:stop(mnesia),
+ application:stop(otp_mibs),
+
+ del_dir(ConfDir),
+ del_dir(DbDir),
+ (catch del_dir(MgrDir)),
+ ok.
+
+%%---------------------------------------------------------------------
+%% Test cases
+%%---------------------------------------------------------------------
+
+%% Test that the otp_mibs app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(otp_mibs).
+
+%% Test that the otp_mibs appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(otp_mibs).
+
+nt_basic_types(suite) ->
+ [];
+nt_basic_types(doc) ->
+ ["Query every item of the node table and check its variable "
+ "type and content for sensible values."];
+nt_basic_types(Config) when is_list(Config) ->
+ ok = otp_mib:update_erl_node_table(),
+
+ NodeNameId = ?erlNodeEntry ++ [?erlNodeName, ?NODE_ENTRY],
+ {noError, 0, [NodeNameVal]} = snmp_get([NodeNameId]),
+ #varbind{variabletype = 'OCTET STRING'} = NodeNameVal,
+ true = is_list(NodeNameVal#varbind.value),
+
+ NodeMachineId = ?erlNodeEntry ++ [?erlNodeMachine, ?NODE_ENTRY],
+ {noError, 0, [NodeMachineVal]} = snmp_get([NodeMachineId]),
+ #varbind{variabletype = 'OCTET STRING'} = NodeMachineVal,
+ true = is_list(NodeMachineVal#varbind.value),
+
+ NodeVersionId = ?erlNodeEntry ++ [?erlNodeVersion, ?NODE_ENTRY],
+ {noError, 0, [NodeVersionVal]} = snmp_get([NodeVersionId]),
+ #varbind{variabletype = 'OCTET STRING'} = NodeVersionVal,
+ true = is_list(NodeVersionVal#varbind.value),
+
+ NodeRunQueueId = ?erlNodeEntry ++ [?erlNodeRunQueue, ?NODE_ENTRY],
+ {noError, 0, [NodeRunQueueVal]} = snmp_get([NodeRunQueueId]),
+ #varbind{variabletype = 'Unsigned32'} = NodeRunQueueVal,
+ true = is_integer(NodeRunQueueVal#varbind.value),
+ NodeRunQueueVal#varbind.value >= 0,
+ NodeRunQueueVal#varbind.value =< 4294967295,
+
+ NodeRunTimeId = ?erlNodeEntry ++ [?erlNodeRunTime, ?NODE_ENTRY],
+ {noError, 0, [NodeRunTimeVal]} = snmp_get([NodeRunTimeId]),
+ #varbind{variabletype = 'Counter64'} = NodeRunTimeVal,
+ true = is_integer(NodeRunTimeVal#varbind.value),
+ NodeRunTimeVal#varbind.value >= 0,
+ NodeRunTimeVal#varbind.value =< 18446744073709551615,
+
+ NodeWallClockId = ?erlNodeEntry ++ [?erlNodeWallClock, ?NODE_ENTRY],
+ {noError, 0, [NodeWallClockVal]} = snmp_get([NodeWallClockId]),
+ #varbind{variabletype = 'Counter64'} = NodeWallClockVal,
+ true = is_integer(NodeWallClockVal#varbind.value),
+ NodeWallClockVal#varbind.value >= 0,
+ NodeWallClockVal#varbind.value =< 18446744073709551615,
+
+ NodeReductionsId = ?erlNodeEntry ++ [?erlNodeReductions, ?NODE_ENTRY],
+ {noError, 0, [NodeReductionsVal]} = snmp_get([NodeReductionsId]),
+ #varbind{variabletype = 'Counter64'} = NodeReductionsVal,
+ true = is_integer(NodeReductionsVal#varbind.value),
+ NodeReductionsVal#varbind.value >= 0,
+ NodeReductionsVal#varbind.value =< 18446744073709551615,
+
+ NodeProcessesId = ?erlNodeEntry ++ [?erlNodeProcesses, ?NODE_ENTRY],
+ {noError, 0, [NodeProcessesVal]} = snmp_get([NodeProcessesId]),
+ #varbind{variabletype = 'Unsigned32'} = NodeProcessesVal,
+ true = is_integer(NodeProcessesVal#varbind.value),
+ NodeProcessesVal#varbind.value >= 0,
+ NodeProcessesVal#varbind.value =< 4294967295,
+
+ NodeInBytesId = ?erlNodeEntry ++ [?erlNodeInBytes, ?NODE_ENTRY],
+ {noError, 0, [NodeInBytesVal]} = snmp_get([NodeInBytesId]),
+ #varbind{variabletype = 'Counter64'} = NodeInBytesVal,
+ true = is_integer(NodeInBytesVal#varbind.value),
+ NodeInBytesVal#varbind.value >= 0,
+ NodeInBytesVal#varbind.value =< 18446744073709551615,
+
+ NodeOutBytesId = ?erlNodeEntry ++ [?erlNodeOutBytes, ?NODE_ENTRY],
+ {noError, 0, [NodeOutBytesVal]} = snmp_get([NodeOutBytesId]),
+ #varbind{variabletype = 'Counter64'} = NodeOutBytesVal,
+ true = is_integer(NodeOutBytesVal#varbind.value),
+ NodeOutBytesVal#varbind.value >= 0,
+ NodeOutBytesVal#varbind.value =< 18446744073709551615,
+
+ ok.
+
+nt_high_reduction_count(suite) ->
+ [];
+nt_high_reduction_count(doc) ->
+ ["Check that no error occurs when the erlNodeReductions field"
+ "exceeds the 32bit boundary, this may take about 10min."];
+nt_high_reduction_count(Config) when is_list(Config) ->
+ NodeReductions = ?erlNodeEntry ++ [?erlNodeReductions, ?NODE_ENTRY],
+
+ BumpFun = fun(F, Limit) ->
+ case erlang:statistics(reductions) of
+ {Total, _} when Total < Limit ->
+ F(F, Limit);
+ _ ->
+ ok
+ end
+ end,
+
+ ok = otp_mib:update_erl_node_table(),
+
+ {noError, 0, [StartVal]} = snmp_get([NodeReductions]),
+ #varbind{variabletype = 'Counter64'} = StartVal,
+ true = is_integer(StartVal#varbind.value),
+ StartVal#varbind.value >= 0,
+ case StartVal#varbind.value =< 4294967295 of
+ true ->
+ ok = otp_mib:update_erl_node_table(),
+ BumpFun(BumpFun, 4294967295),
+ {noError, 0, [EndVal]} = snmp_get([NodeReductions]),
+ #varbind{variabletype = 'Counter64'} = EndVal,
+ true = is_integer(EndVal#varbind.value),
+ EndVal#varbind.value >= 4294967295,
+ EndVal#varbind.value =< 18446744073709551615;
+ false ->
+ %% no need to bump more reductions, since the initial get
+ %% command already returned successfully with a large value
+ ok
+ end.
+
+%%---------------------------------------------------------------------
+%% Internal functions
+%%---------------------------------------------------------------------
+
+snmp_get(OIdList) ->
+ ct_snmp:get_values(otp_mibs_test, OIdList, snmp_mgr_agent).
+
+del_dir(Dir) ->
+ io:format("Deleting: ~s~n",[Dir]),
+ {ok, Files} = file:list_dir(Dir),
+ FullPathFiles = lists:map(fun(File) -> filename:join(Dir, File) end, Files),
+ lists:foreach(fun file:delete/1, FullPathFiles),
+ file:del_dir(Dir).
diff --git a/lib/otp_mibs/vsn.mk b/lib/otp_mibs/vsn.mk
index 96d3088224..2ff59431f4 100644
--- a/lib/otp_mibs/vsn.mk
+++ b/lib/otp_mibs/vsn.mk
@@ -1,4 +1,4 @@
-OTP_MIBS_VSN = 1.0.8
+OTP_MIBS_VSN = 1.0.10
# Note: The branch 'otp_mibs' is defunct as of otp_mibs-1.0.4 and
# should NOT be used again.
diff --git a/lib/parsetools/doc/src/book.xml b/lib/parsetools/doc/src/book.xml
index 93a107b798..9ae9f72870 100644
--- a/lib/parsetools/doc/src/book.xml
+++ b/lib/parsetools/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/parsetools/doc/src/fascicules.xml b/lib/parsetools/doc/src/fascicules.xml
index 43090b4aed..fadd37eefb 100644
--- a/lib/parsetools/doc/src/fascicules.xml
+++ b/lib/parsetools/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/parsetools/doc/src/leex.xml b/lib/parsetools/doc/src/leex.xml
index b4e2af6857..7ee0633dac 100644
--- a/lib/parsetools/doc/src/leex.xml
+++ b/lib/parsetools/doc/src/leex.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/parsetools/doc/src/notes.xml b/lib/parsetools/doc/src/notes.xml
index 9c0f790916..c8cb70b6d2 100644
--- a/lib/parsetools/doc/src/notes.xml
+++ b/lib/parsetools/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,6 +30,60 @@
</header>
<p>This document describes the changes made to the Parsetools application.</p>
+<section><title>Parsetools 2.0.12</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The line counter becomes invalid when rules with linewrap
+ are used. This issue appears because the parsing FSM does
+ not roll back the line counter after attempting such a
+ rule.</p>
+ <p>
+ Own Id: OTP-12238</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Parsetools 2.0.11</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ A Yecc example has been updated in the documentation
+ (Thanks to Pierre Fenoll.)</p>
+ <p>
+ Own Id: OTP-11749</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Parsetools 2.0.10</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/parsetools/doc/src/notes_history.xml b/lib/parsetools/doc/src/notes_history.xml
index 6a63812bcb..5b8ab69e30 100644
--- a/lib/parsetools/doc/src/notes_history.xml
+++ b/lib/parsetools/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/parsetools/doc/src/part_notes.xml b/lib/parsetools/doc/src/part_notes.xml
index 308fc95e35..f7bcd22e7e 100644
--- a/lib/parsetools/doc/src/part_notes.xml
+++ b/lib/parsetools/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/parsetools/doc/src/ref_man.xml b/lib/parsetools/doc/src/ref_man.xml
index 52f1c687da..1bdca3395a 100644
--- a/lib/parsetools/doc/src/ref_man.xml
+++ b/lib/parsetools/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/parsetools/doc/src/yecc.xml b/lib/parsetools/doc/src/yecc.xml
index 66bc6f4795..7298e09c2c 100644
--- a/lib/parsetools/doc/src/yecc.xml
+++ b/lib/parsetools/doc/src/yecc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -425,9 +425,9 @@ myparser:parse_and_scan({Mod, Tokenizer, Args}) </code>
Nonterminals E T F.
Terminals '+' '*' '(' ')' number.
Rootsymbol E.
-E -> E '+' T: ['$2', '$1', '$3'].
+E -> E '+' T: {'$2', '$1', '$3'}.
E -> T : '$1'.
-T -> T '*' F: ['$2', '$1', '$3'].
+T -> T '*' F: {'$2', '$1', '$3'}.
T -> F : '$1'.
F -> '(' E ')' : '$2'.
F -> number : '$1'. </code>
@@ -438,8 +438,8 @@ Terminals '+' '*' '(' ')' number.
Rootsymbol E.
Left 100 '+'.
Left 200 '*'.
-E -> E '+' E : ['$2', '$1', '$3'].
-E -> E '*' E : ['$2', '$1', '$3'].
+E -> E '+' E : {'$2', '$1', '$3'}.
+E -> E '*' E : {'$2', '$1', '$3'}.
E -> '(' E ')' : '$2'.
E -> number : '$1'. </code>
<p>3. An overloaded minus operator:</p>
diff --git a/lib/parsetools/include/leexinc.hrl b/lib/parsetools/include/leexinc.hrl
index dbbb688d2d..938aef58f9 100644
--- a/lib/parsetools/include/leexinc.hrl
+++ b/lib/parsetools/include/leexinc.hrl
@@ -36,8 +36,8 @@ string(Ics0, L0, Tcs, Ts) ->
string_cont(Ics1, L1, yyaction(A, Alen, Tcs, L0), Ts);
{reject,_Alen,Tlen,_Ics1,L1,_S1} -> % After a non-accepting state
{error,{L0,?MODULE,{illegal,yypre(Tcs, Tlen+1)}},L1};
- {A,Alen,_Tlen,_Ics1,L1,_S1} ->
- string_cont(yysuf(Tcs, Alen), L1, yyaction(A, Alen, Tcs, L0), Ts)
+ {A,Alen,_Tlen,_Ics1,_L1,_S1} ->
+ string_cont(yysuf(Tcs, Alen), L0, yyaction(A, Alen, Tcs, L0), Ts)
end.
%% string_cont(RestChars, Line, Token, Tokens)
@@ -105,8 +105,8 @@ token(S0, Ics0, L0, Tcs, Tlen0, Tline, A0, Alen0) ->
{reject,_Alen1,Tlen1,Ics1,L1,_S1} -> % No token match
Error = {Tline,?MODULE,{illegal,yypre(Tcs, Tlen1+1)}},
{done,{error,Error,L1},Ics1};
- {A1,Alen1,_Tlen1,_Ics1,L1,_S1} -> % Use last accept match
- token_cont(yysuf(Tcs, Alen1), L1, yyaction(A1, Alen1, Tcs, Tline))
+ {A1,Alen1,_Tlen1,_Ics1,_L1,_S1} -> % Use last accept match
+ token_cont(yysuf(Tcs, Alen1), L0, yyaction(A1, Alen1, Tcs, Tline))
end.
%% token_cont(RestChars, Line, Token)
@@ -177,9 +177,9 @@ tokens(S0, Ics0, L0, Tcs, Tlen0, Tline, Ts, A0, Alen0) ->
%% Skip rest of tokens.
Error = {L1,?MODULE,{illegal,yypre(Tcs, Tlen1+1)}},
skip_tokens(yysuf(Tcs, Tlen1+1), L1, Error);
- {A1,Alen1,_Tlen1,_Ics1,L1,_S1} ->
+ {A1,Alen1,_Tlen1,_Ics1,_L1,_S1} ->
Token = yyaction(A1, Alen1, Tcs, Tline),
- tokens_cont(yysuf(Tcs, Alen1), L1, Token, Ts)
+ tokens_cont(yysuf(Tcs, Alen1), L0, Token, Ts)
end.
%% tokens_cont(RestChars, Line, Token, Tokens)
diff --git a/lib/parsetools/src/parsetools.app.src b/lib/parsetools/src/parsetools.app.src
index af62fc4f6b..9eeb8fcc05 100644
--- a/lib/parsetools/src/parsetools.app.src
+++ b/lib/parsetools/src/parsetools.app.src
@@ -11,7 +11,8 @@
{applications, [kernel,stdlib]},
{env, [{file_util_search_methods,[{"", ""}, {"ebin", "esrc"}, {"ebin", "src"}]}
]
- }
+ },
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]
}.
diff --git a/lib/parsetools/src/parsetools.appup.src b/lib/parsetools/src/parsetools.appup.src
index 54a63833e6..0e02099893 100644
--- a/lib/parsetools/src/parsetools.appup.src
+++ b/lib/parsetools/src/parsetools.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, parsetools}]}],
+ [{<<".*">>,[{restart_application, parsetools}]}]
+}.
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl
index b698beb558..f4657663e6 100644
--- a/lib/parsetools/src/yecc.erl
+++ b/lib/parsetools/src/yecc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -423,7 +423,7 @@ infile(Parent, Infilex, Options) ->
end,
case {St#yecc.errors, werror(St)} of
{[], false} -> ok;
- _ -> _ = file:delete(St#yecc.outfile)
+ _ -> _ = file:delete(St#yecc.outfile), ok
end,
Parent ! {self(), yecc_ret(St)}.
diff --git a/lib/parsetools/test/Makefile b/lib/parsetools/test/Makefile
index 6455f6ade7..7c7cc13965 100644
--- a/lib/parsetools/test/Makefile
+++ b/lib/parsetools/test/Makefile
@@ -20,6 +20,7 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
MODULES = \
+ app_SUITE \
leex_SUITE \
yecc_SUITE
diff --git a/lib/parsetools/test/app_SUITE.erl b/lib/parsetools/test/app_SUITE.erl
new file mode 100644
index 0000000000..88ac95e311
--- /dev/null
+++ b/lib/parsetools/test/app_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(app_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the parsetools app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(parsetools).
+
+appup() ->
+ [{doc, "Test that the parsetools appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(parsetools).
diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl
index ff49c853f6..6d2afe061e 100644
--- a/lib/parsetools/test/leex_SUITE.erl
+++ b/lib/parsetools/test/leex_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -44,8 +43,8 @@
file/1, compile/1, syntax/1,
pt/1, man/1, ex/1, ex2/1, not_yet/1,
-
- otp_10302/1, otp_11286/1, unicode/1]).
+ line_wrap/1,
+ otp_10302/1, otp_11286/1, unicode/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
@@ -62,12 +61,13 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [{group, checks}, {group, examples}].
+ [{group, checks}, {group, examples}, {group, bugs}].
groups() ->
[{checks, [], [file, compile, syntax]},
{examples, [], [pt, man, ex, ex2, not_yet, unicode]},
- {tickets, [], [otp_10302, otp_11286]}].
+ {tickets, [], [otp_10302, otp_11286]},
+ {bugs, [], [line_wrap]}].
init_per_suite(Config) ->
Config.
@@ -872,6 +872,48 @@ scan_token_1({more, Cont}, [C | Cs], Fun, Loc, Rs) ->
%% End of ex2
+line_wrap(doc) -> "Much more examples.";
+line_wrap(suite) -> [];
+line_wrap(Config) when is_list(Config) ->
+ Xrl =
+ <<"
+Definitions.
+Rules.
+[a]+[\\n]*= : {token, {first, TokenLine}}.
+[a]+ : {token, {second, TokenLine}}.
+[\\s\\r\\n\\t]+ : skip_token.
+Erlang code.
+ ">>,
+ Dir = ?privdir,
+ XrlFile = filename:join(Dir, "test_line_wrap.xrl"),
+ ?line ok = file:write_file(XrlFile, Xrl),
+ ErlFile = filename:join(Dir, "test_line_wrap.erl"),
+ {ok, _} = leex:file(XrlFile, []),
+ {ok, _} = compile:file(ErlFile, [{outdir,Dir}]),
+ code:purge(test_line_wrap),
+ AbsFile = filename:rootname(ErlFile, ".erl"),
+ code:load_abs(AbsFile, test_line_wrap),
+ fun() ->
+ S = "aaa\naaa",
+ {ok,[{second,1},{second,2}],2} = test_line_wrap:string(S)
+ end(),
+ fun() ->
+ S = "aaa\naaa",
+ {ok,[{second,3},{second,4}],4} = test_line_wrap:string(S, 3)
+ end(),
+ fun() ->
+ {done,{ok,{second,1},1},"\na"} = test_line_wrap:token([], "a\na"),
+ {more,Cont1} = test_line_wrap:token([], "\na"),
+ {done,{ok,{second,2},2},eof} = test_line_wrap:token(Cont1, eof)
+ end(),
+ fun() ->
+ {more,Cont1} = test_line_wrap:tokens([], "a\na"),
+ {done,{ok,[{second,1},{second,2}],2},eof} = test_line_wrap:tokens(Cont1, eof)
+ end(),
+ ok.
+
+%% End of line_wrap
+
not_yet(doc) ->
"Not yet implemented.";
not_yet(suite) -> [];
diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl
index c7ac9fd232..d308d21f82 100644
--- a/lib/parsetools/test/yecc_SUITE.erl
+++ b/lib/parsetools/test/yecc_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/parsetools/vsn.mk b/lib/parsetools/vsn.mk
index d62962c54a..dd9cc2991c 100644
--- a/lib/parsetools/vsn.mk
+++ b/lib/parsetools/vsn.mk
@@ -1 +1 @@
-PARSETOOLS_VSN = 2.0.10
+PARSETOOLS_VSN = 2.0.12
diff --git a/lib/percept/doc/src/book.xml b/lib/percept/doc/src/book.xml
index 4de6bc4eb1..cc86ab5a7f 100644
--- a/lib/percept/doc/src/book.xml
+++ b/lib/percept/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>Percept</title>
- <prepared>Bj�rn-Egil Dahlberg</prepared>
+ <prepared>Björn-Egil Dahlberg</prepared>
<docno></docno>
<date>2007-11-02</date>
<rev>0.5.0</rev>
diff --git a/lib/percept/doc/src/egd_ug.xmlsrc b/lib/percept/doc/src/egd_ug.xmlsrc
index d9bece7e07..a980fe0611 100644
--- a/lib/percept/doc/src/egd_ug.xmlsrc
+++ b/lib/percept/doc/src/egd_ug.xmlsrc
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>egd</title>
- <prepared>Bj�rn-Egil Dahlberg</prepared>
+ <prepared>Björn-Egil Dahlberg</prepared>
<docno></docno>
<date>2007-11-03</date>
<rev>A</rev>
diff --git a/lib/percept/doc/src/fascicules.xml b/lib/percept/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/percept/doc/src/fascicules.xml
+++ b/lib/percept/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/percept/doc/src/notes.xml b/lib/percept/doc/src/notes.xml
index 3cead186c4..b51c8fcb4d 100644
--- a/lib/percept/doc/src/notes.xml
+++ b/lib/percept/doc/src/notes.xml
@@ -32,6 +32,50 @@
</header>
<p>This document describes the changes made to the Percept application.</p>
+<section><title>Percept 0.8.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure to install .hrl files when needed</p>
+ <p>
+ Own Id: OTP-12197</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Percept 0.8.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Percept 0.8.8.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/percept/doc/src/part.xml b/lib/percept/doc/src/part.xml
index 8053b279d5..5575eff53f 100644
--- a/lib/percept/doc/src/part.xml
+++ b/lib/percept/doc/src/part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>Percept User's Guide</title>
- <prepared>Bj�rn-Egil Dahlberg</prepared>
+ <prepared>Björn-Egil Dahlberg</prepared>
<docno></docno>
<date>2007-11-02</date>
<rev>0.5.0</rev>
diff --git a/lib/percept/doc/src/part_notes.xml b/lib/percept/doc/src/part_notes.xml
index 4965e67640..8e226b35cb 100644
--- a/lib/percept/doc/src/part_notes.xml
+++ b/lib/percept/doc/src/part_notes.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>Percept Release Notes</title>
- <prepared>Bj�rn-Egil Dahlberg</prepared>
+ <prepared>Björn-Egil Dahlberg</prepared>
<docno></docno>
<date>>2007-11-02</date>
<rev></rev>
diff --git a/lib/percept/doc/src/percept_ug.xmlsrc b/lib/percept/doc/src/percept_ug.xmlsrc
index af2dfe101a..a0c5ab2c98 100644
--- a/lib/percept/doc/src/percept_ug.xmlsrc
+++ b/lib/percept/doc/src/percept_ug.xmlsrc
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -24,7 +24,7 @@
</legalnotice>
<title>Percept</title>
- <prepared>Bj�rn-Egil Dahlberg</prepared>
+ <prepared>Björn-Egil Dahlberg</prepared>
<docno></docno>
<date>2007-11-02</date>
<rev>A</rev>
diff --git a/lib/percept/doc/src/ref_man.xml b/lib/percept/doc/src/ref_man.xml
index ac82d9378c..0f2cdb696b 100644
--- a/lib/percept/doc/src/ref_man.xml
+++ b/lib/percept/doc/src/ref_man.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile
index 6bf0af9dc6..0282d6346a 100644
--- a/lib/percept/src/Makefile
+++ b/lib/percept/src/Makefile
@@ -50,6 +50,8 @@ MODULES= \
#HRL_FILES= ../include/
+INTERNAL_HRL_FILES= egd.hrl percept.hrl
+
ERL_FILES= $(MODULES:%=%.erl)
TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
@@ -95,6 +97,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
# $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/percept/src/percept.app.src b/lib/percept/src/percept.app.src
index cf4a9fc438..f8991ee577 100644
--- a/lib/percept/src/percept.app.src
+++ b/lib/percept/src/percept.app.src
@@ -35,7 +35,9 @@
]},
{registered, [percept_db,percept_port]},
{applications, [kernel,stdlib]},
- {env,[]}
+ {env,[]},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","kernel-3.0",
+ "inets-5.10","erts-6.0"]}
]}.
diff --git a/lib/percept/src/percept.appup.src b/lib/percept/src/percept.appup.src
index 4fc2852878..23e67f772f 100644
--- a/lib/percept/src/percept.appup.src
+++ b/lib/percept/src/percept.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,7 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
-
+{"%VSN%",
+ [{<<".*">>,[{restart_application, percept}]}],
+ [{<<".*">>,[{restart_application, percept}]}]
+}.
diff --git a/lib/percept/test/percept_SUITE.erl b/lib/percept/test/percept_SUITE.erl
index e415d92a04..aea2462b2e 100644
--- a/lib/percept/test/percept_SUITE.erl
+++ b/lib/percept/test/percept_SUITE.erl
@@ -27,6 +27,8 @@
%% Test cases
-export([
+ app/1,
+ appup/1,
profile/1,
analyze/1,
analyze_dist/1,
@@ -54,7 +56,7 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [webserver, profile, analyze, analyze_dist].
+ [app, appup, webserver, profile, analyze, analyze_dist].
groups() ->
[].
@@ -70,6 +72,14 @@ end_per_group(_GroupName, Config) ->
%% Tests
%%----------------------------------------------------------------------
+%% Test that the percept app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(percept).
+
+%% Test that the percept appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(percept).
+
webserver(suite) ->
[];
webserver(doc) ->
diff --git a/lib/percept/vsn.mk b/lib/percept/vsn.mk
index 99729c11e2..4451354e21 100644
--- a/lib/percept/vsn.mk
+++ b/lib/percept/vsn.mk
@@ -1 +1 @@
-PERCEPT_VSN = 0.8.8.2
+PERCEPT_VSN = 0.8.10
diff --git a/lib/pman/AUTHORS b/lib/pman/AUTHORS
deleted file mode 100644
index 5a354526b4..0000000000
--- a/lib/pman/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-pman was first implemented for the old X windows interface "pxw" by
-Claes Wikstr�m and has since then been rewritten a couple of times by
-among others Peter Olin.
-
-Original Authors and Contributors:
-
-Claes Wikstr�m
-Peter Olin
-Gunilla Arendt \ No newline at end of file
diff --git a/lib/pman/doc/src/fascicules.xml b/lib/pman/doc/src/fascicules.xml
deleted file mode 100644
index 0678195e07..0000000000
--- a/lib/pman/doc/src/fascicules.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
-
-<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
- Release Notes
- </fascicule>
- <fascicule file="" href="../../../../doc/print.html" entry="no">
- Off-Print
- </fascicule>
-</fascicules>
-
diff --git a/lib/pman/doc/src/main_window.gif b/lib/pman/doc/src/main_window.gif
deleted file mode 100644
index e12754631c..0000000000
--- a/lib/pman/doc/src/main_window.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/doc/src/main_window.ps b/lib/pman/doc/src/main_window.ps
deleted file mode 100644
index c66620c677..0000000000
--- a/lib/pman/doc/src/main_window.ps
+++ /dev/null
@@ -1,1573 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./main_window.tmp.eps)
-%%CreationDate: (Tue Jun 12 18:03:36 2001)
-%%BoundingBox: 0 22 377 234
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 22 377 234
-userdict begin
-%%BeginData:
-DisplayImage
-0 22
-377.000000 212.000000
-12
-757 426
-1
-0
-0
-16
-ffffff
-000000
-b24d7a
-dcadc2
-57253b
-0000ff
-d9d9d9
-c3c3c3
-bebebe
-828282
-000000
-000000
-000000
-000000
-000000
-000000
-03ff03ff03ff0311040003ff03ff03b70400031c04000301021a0400030002ff02ff02b6
-04000300021a04010301021a0400030002ff02ff02b604000300021a04010301021a0400
-030002ff02ff02b604000300021a0401030102020418030004ff04ff04b7030004170202
-040103010202040003ff03ff03e902020401030102020400030002150400030002ff02ff
-029e04000300021504000300021504000300020204010301020204000300021504000300
-02ff02ff029e040003000215040003000215040003000202040103010202040003000215
-0400030002ff02ff029e0400030002150400030002150400030002020401030102020400
-030002150400030002ff02ff029e040003000215040003000202030f0202040003000202
-0401030102020400030002150400030002ff0272000302ff022704000300021504000300
-02020300020d040002020400030002020401030102020400030002150400030002d10006
-0202000102060001020600010206000102050000020a00050225000102380001021b0004
-020d00010208000102ee0400030002150400030002020300020d04000202040003000202
-0401030102020400030002150400030002d1000102020002020100020204000202050002
-0206000202040000020900010203000102240001023800010219000102040000020c0001
-0208000102ee0400030002150400030002020300020d0400020204000300020204010301
-02020400030002150400030002d100010203000102010002020400020205000002000001
-02050002020400000208000102050001025e00010218000002070000020b000102f90400
-030002150400030002020300020d04000202040003000202040103010202040003000215
-0400030002d1000102030001020100000200000002030003020500000200000102050000
-020000010203000002030001020100010207000302040000020300030203000102000003
-020400000201000102040003020100010203000002030001020700040202000102000003
-020800040202000402040004020300000203000302010000020300040201000102000003
-020300010201000102040000020200040203000402d30400030002150400030002020300
-020d04000202040003000202040103010202040003000202030f02020400030002d10001
-020300010201000002000001020200000200000102040001020000010205000002000002
-020200000203000102010001020700010200000002040000020200010201000102020002
-020200000204000002010001020300010201000102000001020200020202000002070001
-020200010201000202020001020800010203000102020001020200010202000102020000
-020100010202000002010000020200010205000202020001020200010202000002040000
-02020000020200010201000102d7040003000208030302080400030002020300020d0400
-02020400030002020401030102020400030002020300020d040002020400030002d10001
-020200010202000002000001020200000200000102040000020200010204000002010001
-020200000207000102070001020000010202000002020001020300010201000102030001
-020200000202000102020001020300010200000002020000020000000202000002060001
-020400010200000102030001020800010202000102040001020000010204000102000000
-020200000202000102010000020100010206000102030001020200010202000102020000
-020700010201000102d704000300020803000201040002080400030002020300020d0400
-02020400030002020401030102020400030002020300020d040002020400030002d10005
-020300000201000102000000020100010203000102020001020400000202000102010000
-020700010207000102000001020200000202000102030001020100010203000102020000
-020200010202000102030001020000010201000002000000020100010206000102040001
-020000010203000102080001020200010204000102000001020400010200000002010000
-020200010202000002010001020600010203000102020001020200010202000002070001
-0201000302d504000300020803000201040002080400030002020300020d040002020400
-030002020401030102020400030002020300040e02020400030002d10001020700000201
-000102000000020100010203000102020002020300000202000202000000020700010207
-000102010000020100010202000702010001020400000201000102020001020200070200
-000102000001020000000201000002070001020400010200000102030001020800010202
-000102040001020000010204000102000000020100000201000202010001020100010206
-000102030001020200010203000002010001020400040203000302d30400030002080300
-040202080400030002020300020d04000202040003000202040103010202040003000215
-0400030002d1000102070000020100010200000002010001020300070203000002030001
-020000000207000102070001020100010200000002030001020700010204000102000000
-020300010202000102070000020000000201000102000000020700010204000102000001
-020300010208000102020001020400010200000102040001020000000201000002010000
-020000000201000002020001020600010203000102020001020300010200000002030002
-020100010205000202d20400030002150400030002020300020d04000202040003000202
-0401030102020400030002150400030002d1000102070000020200010202000102020001
-020400010203000002040002020800010205000102020001020000000203000102070001
-020400010200000002030001020200010207000002000000020200000200000002070001
-020400010200000102030001020800010202000102040001020000010204000102010000
-020000020201000202030001020600010203000102020001020300010200000002030001
-020200010206000102d20400030002150400030002020300020d04000202040003000202
-0401030102020400030002150400030002d1000102070000020200010202000102020000
-020600010202000002040002020300010203000102030001020400010205000102030000
-020100010205000102040001020300010203000002010002020200010209000102020001
-020100010203000102080001020300010202000102020001020200010202000102030000
-020700010202000002010001020300010202000102040001020400010202000102010000
-0203000102d20400030002150400030002020300020d0400020204000300020204010301
-02020400030002150400030002d100010207000002070001020100010206000102020000
-020500010203000102040005020500010207000402010001020500010204000102050004
-0201000102030001020a0004020200010203000102080001020400040204000402050003
-020900040201000102030001020200010204000102050003020000010200000502d30400
-030002150400030002020300020d04000202040003000202040103010202040003000215
-0400030002ff02ff029e0400030002150400030002020300020d04000202040003000202
-0401030102020400030002150400030002ff02ff029e0400030002150400030002020300
-040e02020400030002020401030102020400030002150400030002ff02ff029e04000300
-02150400030002150400030002020401030102020400030002150400030002ff02ff029e
-0400030002150400030002150400030002020401030102020400030002150400030002ff
-02ff029e04000300021504000300021504000300020204010300040403000416030004ff
-04ff049f030004160300041603000404030500ff00ff00e80304040003010202040000ff
-00ff00e70900030002020401030102020400000106ff06ff06e409010300020204010301
-02020400000106ff06ff06e40901030002020401030102020400000106ff06ff06e40901
-030002020401030102020400000106ff06ff06e409010300020204010301020204000001
-06ff06ff06e409010300020204010301020204000001060b01040604010006030102061f
-01000602010006040100062601040633010006020100060c010006ff06ff060201000602
-010006090102061309010300020204010301020204000001060b0100060f0100061f0100
-06020100062e01000635010106010100060c010006ff06ff0602010006020100060b0100
-061309010300020204010301020204000001060b01000606010206050100060301020618
-010006020100060201020603010206020100060201000619010006030100060001010603
-010206030102060301020618010106010100060201020603010106000100060201020603
-010206ff06f501000602010006020102060501000602010006000101060c090103000202
-04010301020204000001060b010006080100060501000602010006020100061801000600
-010006050100060201000602010006010100060201000619010006030101060101000601
-010006020100060101000602010006010100060201000617010006000100060001000601
-01000602010006010100060101010601010006020100060101000602010006ff06f40100
-060201000601010006020100060401000602010106010100060b09010300020204010301
-020204000001060b01030605010006050100060201000602010006180100060001000605
-010006020100060201000601010006000100060001000619010006030100060901000601
-010006050100060201000617010006000100060001000601010006020100060101000602
-010006010100060201000601010006ff06f8010406010100060201000604010006020100
-06020100060b09010300020204010301020204000001060b010006080100060501000602
-010406180100060001000605010006020104060101000600010006000100061901000603
-010006060103060101000605010406170100060101010601010006020100060101000602
-0100060101040602010206ff06f501000602010006010104060401000602010006020100
-060b09010300020204010301020204000001060b0100060801000605010006020100061d
-010006060100060201000605010006000100060001000619010006030100060501000602
-01000601010006050100061b010006010101060101000602010006010100060201000601
-01000609010006ff06f401000602010006010100060801000602010006020100060b0901
-0300020204010301020204000001060b0100060801000605010006020100060201000619
-010006060100060201000602010006010100060001000600010006190100060301000605
-010006020100060101000602010006010100060201000617010006020100060101000602
-010006010100060101010601010006020100060101000602010006ff06f4010006020100
-0601010006020100060401000602010106010100060b0901030002020401030102020400
-0001060b0100060801000605010006030102061a01000606010006030102060301000600
-0100061a0100060301000606010306020102060301020618010006020100060201020603
-010106000100060201020603010206ff06f5010006020100060201020605010006020100
-06000101060c0901030002020401030102020400000106ff06ff06d30100060f09010300
-020204010301020204000001060a0106062a0106062a010606ff06ff06470106060e0100
-060f09010300020204010301020204000001060a0106062a0106062a010606ff06ff0647
-0106060e0100060f0901030002020401030102020400000106ff06ff06e4090103000202
-0401030102020400000106ff06ff06e40901030002020401030102020400000106ff06ff
-06e40901030002020401030102020400000109ff09ff09e6030002020401030102020400
-000009ff09ff09e703000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
-040006ff06ff06e8030002020401030102020400060005ff05ff05d40912030002020401
-030102020400060005000849050108d50501089005010858050108670501085709110000
-030002020401030102020400060005000849050108d50501089005010858050108670501
-085709010706090007060001030002020401030102020400060005000849050108d50501
-089005010858050108670501085709010705000009000706000103000202040103010202
-040006000500080105030805050008060500083405010802050208270500080a05040818
-050008060500087405010801050008020500088905010800050008030500085105010801
-0503080d0500085205010802050208050500084a09010705000009010705000103000202
-0401030102020400060005000801050008020500080c0500083405010801050008020500
-08260500080a0500081c0500087c05010801050108010500088905010800050008030500
-085105010801050008020500080c05000852050108010500080205000850090107040001
-090107050001030002020401030102020400060005000801050008020500080205020803
-050108000500083405010801050008020500080105000802050008010500080005010802
-050008000501080305020802050008000501080205040808050008050500080205000801
-050008000501080305020802050408020502080305020802050008000501086605010801
-050108010500080205020802050108000500080305020875050108000501080105010802
-0502080305010800050008020502083d0501080105000802050008020502080305010800
-050008020502084c050108010500080605020802050408020502083c0901070400010600
-090107040001030002020401030102020400060005000801050008020500080405000802
-050008010501083405010801050008050500080205000801050108010500080105010801
-05000801050008020500080105010801050008030500080a050008050500080205000801
-050108010500080105000802050008030500080605000802050008020500080105010801
-050008650501080105000800050008000500080105000802050008010500080005000800
-050008010500080205000874050108000501080105010801050008020500080105000801
-05010801050008020500083c050108010500080205000801050008020500080105000801
-05010801050008020500084b05010802050008070500080605000801050008020500083b
-090107030001060109010704000103000202040103010202040006000500080105030805
-050008020500080205000834050108010500080505000802050008010500080505000805
-050008020500080105000802050008030500080a05030802050008020500080105000802
-050008010500080705000806050008020500080205000801050008020500086505010801
-050008000500080005000805050008010500080005000800050008010500080205000874
-050108000500080005010800050008010500080505000802050008010500084005010801
-05030802050008020500080105000802050008010500084f050108030501080505000805
-05000802050008020500083b090107030001060209010703000103000202040103010202
-040006000500080105000808050008020500080205000834050108010500080505000802
-0500080105000805050008050504080105000802050008030500080a0500080505000802
-050008010500080205000801050008070500080605000802050008020500080105000802
-050008650501080105000801050108020503080105000800050008000500080105040874
-050108000500080005010800050008020502080205000802050008020502083d05010801
-05000801050008020504080105000802050008020502084c050108050500080405000804
-050008030504083b09010702000106030901070300010300020204010301020204000600
-050008010500080805000802050008020500083405010801050008020500080105000802
-0500080105000805050008050500080505000802050008030500080a0500080505000802
-050008010500080205000801050008070500080605000802050008020500080105000802
-050008650501080105000801050108010500080205000801050008000500080005000801
-050008780501080005000803050008050500080105000802050008050500083c05010801
-05000802050008010500080505000802050008050500084b050108010500080205000804
-05000803050008040500083f090107020001060409010702000103000202040103010202
-040006000500080105000808050008020500080105010834050108010500080205000801
-05000801050108010500080505000805050008020500080105000802050008030500080a
-050008050500080105010801050008020500080105000802050008030500080605000802
-050008020500080105000802050008650501080105000802050008010500080205000801
-050008000500080005000801050008020500087405010800050008030500080105000802
-050008010500080105010801050008020500083c05010801050008020500080105000802
-050008010500080105010801050008020500084b05010801050008020500080405000802
-05000805050008020500083b090107010001060509010702000103000202040103010202
-040006000500080105000808050008030501080005000834050108020502080305010800
-050008010500080505000806050208020500080205000804050108080500080605010800
-050008010500080205000802050208050501080405000803050208020500080205000865
-050108010500080205000802050308010500080005000800050008020502087505010800
-05000803050008020502080305010800050008020502083d050108010500080205000802
-0502080305010800050008020502084c050108020502080505000802050408020502083c
-0901070100010606090107010001030002020401030102020400060005000849050108d5
-050108900501081305000843050108670501085709010700000106070901070100010300
-02020401030102020400060005000849050108d5050108900501080f0500080205000843
-050108670501085709010700000106080901070000010300020204010301020204000600
-05000849050108d5050108900501081005020844050108670501085709010001090b0700
-0001030002020401030102020400060005000849050108d5050108900501085805010867
-0501085709010000090d0001030002020401030102020400060005000849050108d50501
-08900501085805010867050108570901070e000103000202040103010202040006000500
-0849050108d5050108900501085805010867050108570901001003000202040103010202
-0400060005000849050108d5050108900501085805010867050108570901000d09000001
-030002020401030102020400060005ff05ff05d409010001060a09010001030002020401
-030102020400060001ff01ff01d409010001060a09010001030002020401030102020400
-060001000849010108d50101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-085709010001060a09010001030002020401030102020400060001000805010008230100
-081d010108440100088f0101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000804010008040101080b0101080b010108020100
-081c010108040100080c010008040100080b0102081b010008030100088a010108040100
-080c01000804010008760101080301010852010108020102080301020806010008520101
-080201020803010208020104084209010001060a09010001030002020401030102020400
-060001000803010008040100080101000809010008010100080901000801010008020100
-081b010108180100080d0100081a010008030101088a0101081801000876010108020100
-080101000851010108010100080201000801010008020100080401010852010108010100
-0802010008010100080201000801010008020100084209010001060a0901000103000202
-040103010202040006000100080201000805010008010100080901000801010008090100
-0801010008030100081a0101080201020802010008000101080301020802010408030101
-0805010008030102080301020802010008000101080501000802010008000100088a0101
-080201020802010008000101080301020802010408740101080201000801010008510101
-080101000802010008010100080701000800010008520101080101000805010008020100
-08050100084209010001060a090100010300020204010301020204000600010008010100
-080601000801010008090100080101000809010008010100080401000819010108040100
-080201010801010008040100080401000805010108050100080201000802010008010100
-0802010008010101080101000803010008050100088a0101080401000802010108010100
-080401000804010008760101080201000801010008510101080101000802010008010100
-08060100080101000852010108010100080501000802010008040100084309010001060a
-090100010300020204010301020204000600010008000100080701000801010008090100
-080101000809010008010100080501000818010108040100080201000802010008040100
-08040100080d010008020100080201000801010008020100080101000802010008030100
-08050100088a010108040100080201000802010008040100080401000876010108020100
-080101000851010108020103080101030802010008020100085201010801010308030103
-08040100084309010001060a090100010300020204010301020204000600010008010100
-080601000801010008090100080101000809010008010100080401000819010108040100
-08020100080201000804010008040100080d010008020100080201000801010008020100
-08010100080201000802010008060100088a010108040100080201000802010008040100
-080401000876010108020100080101000851010108050100080101000802010008010100
-080201000852010108010100080201000805010008040100084309010001060a09010001
-030002020401030102020400060001000802010008050100080101000809010008010100
-080901000801010008030100081a01010804010008020100080201000804010008040100
-080d01000802010008020100080101000802010008010100080201000802010008060100
-088a01010804010008020100080201000804010008040100087601010802010008010100
-085101010805010008010100080201000801010508510101080101000802010008050100
-08030100084409010001060a090100010300020204010301020204000600010008030100
-080401000801010008030101080301000801010008030101080301000801010008020100
-081b01010804010008020100080201000804010008040100080501010805010008020100
-08020100080101000802010008010101080101000801010008070100088a010108040100
-080201000802010008040100080401000876010108020100080101000851010108010100
-080201000801010008020100080501000852010108010100080201000801010008020100
-08030100084409010001060a090100010300020204010301020204000600010008040100
-080401010804010108040101080401010804010108020100081c01010804010008020100
-080201000804010008050101080301010805010008030102080301020802010008000101
-080201000805010408880101080401000802010008020100080401000805010108740101
-080301010852010108020102080301020806010008520101080201020803010208040100
-084409010001060a09010001030002020401030102020400060001000805010008230100
-081d010108390100089a0101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000849010108390100089a01010890010108580101
-08670101085709010001060a090100010300020204010301020204000600010008490101
-08390100089a0101089001010858010108670101085709010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000849010108d5010108900101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-0849010108d50101089001010858010108670101085709010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001ff01ff01d409010001060a0901
-0001030002020401030102020400060001ff01ff01d409010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000849010108d5010108900101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-0805010008230100081d0101089101000842010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000804010008040101080a0102
-080b010108020100081c010108100102081a0100081101020814010008170102081b0100
-08010104083b010108100102081a01000811010208140100083501010803010108520101
-08020102080301020803010208030102084c010108030100080401020803010208060100
-083b09010001060a09010001030002020401030102020400060001000803010008040100
-080101000808010008020100080901000801010008020100081b010108120100082f0100
-0814010008190100081a010008020100083f010108120100082f01000814010008350101
-080201000801010008510101080101000802010008010100080201000801010008020100
-0801010008020100084b0101080201010803010008020100080101000802010008040101
-083b09010001060a09010001030002020401030102020400060001000802010008050100
-08010100080c0100080901000801010008030100081a0101080201020802010008000101
-0805010008090100080001010802010008000101080301020802010108000100080c0100
-080301020803010208030101080001000802010208020100080001010804010108050100
-080301020803010208020100080001010805010008020100083f01010802010208020100
-080001010805010008090100080001010802010008000101080301020802010108000100
-080c01000803010208030102080301010800010008020102080201000800010108280101
-0802010008010100085101010801010008020100080101000809010008050100084b0101
-08010100080001000803010008050100080201000803010008000100083b09010001060a
-0901000103000202040103010202040006000100080101000806010008010100080c0100
-080901000801010008040100081901010801010008020100080101010801010008040100
-0809010108010100080101010801010008040100080201000800010008000100080b0100
-080201000802010008010100080201000801010008010101080101000802010008010101
-080101000803010108050100080201000802010008010100080201000801010108010100
-0803010008030103083c0101080101000802010008010101080101000804010008090101
-08010100080101010801010008040100080201000800010008000100080b010008020100
-080201000801010008020100080101000801010108010100080201000801010108010100
-082701010802010008010100085101010801010008020100080101000809010008050100
-084b0101080301000803010008050100080201000802010008010100083b09010001060a
-0901000103000202040103010202040006000100080001000807010008010100080b0100
-080a01000801010008050100081801010801010008020100080101000808010008090100
-080201000801010008080100080201000800010008000100080b01000802010008020100
-080501000801010008020100080101000802010008010100080f01000802010008020100
-080101000802010008010100080201000803010008070100083b01010801010008020100
-080101000808010008090100080201000801010008080100080201000800010008000100
-080b01000802010008020100080501000801010008020100080101000802010008010100
-082b010108020100080101000851010108020102080201030805010008050100084c0101
-0803010008030103080301020802010008020100083b09010001060a0901000103000202
-040103010202040006000100080101000806010008010100080a0100080b010008010100
-080401000819010108010104080101000808010008090100080201000801010008080100
-080201000800010008000100080b01000802010008020100080201030801010008020100
-0801010408010100080f0100080201000802010008010100080201000801010008020100
-0802010008080100083b0101080101040801010008080100080901000802010008010100
-08080100080201000800010008000100080b010008020100080201000802010308010100
-080201000801010408010100082b01010802010008010100085101010801010008020100
-08010100080201000803010008050100084d010108030100080301000802010008010100
-080201000801010008020100083b09010001060a09010001030002020401030102020400
-0600010008020100080501000801010008090100080c01000801010008030100081a0101
-080101000805010008080100080901000802010008010100080801000802010008000100
-08000100080b010008020100080201000801010008020100080101000802010008010100
-08050100080f010008020100080201000801010008020100080101000802010008020100
-0804010008020100083b0101080101000805010008080100080901000802010008010100
-08080100080201000800010008000100080b010008020100080201000801010008020100
-08010100080201000801010008050100082b010108020100080101000851010108010100
-0802010008010100080201000802010008050100084e0101080301000803010008020100
-080101000802010008010105083a09010001060a09010001030002020401030102020400
-060001000803010008040100080101000803010108020100080701010803010008010100
-08020100081b010108010100080201000801010008080100080901010801010008010100
-08080100080201000800010008000100080b010008020100080201000801010008020100
-080101000801010108010100080201000801010008070101080501000802010008020100
-08010100080201000801010108010100080101000805010008020100083b010108010100
-080201000801010008080100080901010801010008010100080801000802010008000100
-08000100080b010008020100080201000801010008020100080101000801010108010100
-0802010008010100082b0101080201000801010008510101080101000802010008010100
-080201000801010008050100084f01010803010008030100080201000801010008020100
-08050100083b09010001060a090100010300020204010301020204000600010008040100
-080401010804010108020104080301010804010108020100081c01010802010208020100
-0808010008090100080001010802010008080100080201000800010008000100080b0100
-080301020803010308020101080001000802010208020100080701010805010008030102
-0803010208020100080001010802010008060102083c0101080201020802010008080100
-08090100080001010802010008080100080201000800010008000100080b010008030102
-0803010308020101080001000802010208020100082b0101080301010852010108020102
-080301020802010408010104084b010108010104080201020803010208060100083b0901
-0001060a09010001030002020401030102020400060001000805010008230100081d0101
-08150105080101000819010508470100084d010108150105080101000819010508510101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-08490101081d010008670100084d0101081d010008710101085801010867010108570901
-0001060a090100010300020204010301020204000600010008490101081d010008670100
-084d0101081d0100087101010858010108670101085709010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000849010108d5010108900101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-0849010108d50101089001010858010108670101085709010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001ff01ff01d409010001060a0901
-0001030002020401030102020400060001ff01ff01d409010001060a0901000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000849010108d5010108900101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-0805010008230100081d010108670100086c010108900101085801010867010108570901
-0001060a09010001030002020401030102020400060001000804010008040101080d0100
-080a010108020100081c0101083b0100080b0102081b01000805010008650101082c0102
-086001010803010108520101080301000804010208030102085301010801010408030100
-08040102084309010001060a090100010300020204010301020204000600010008030100
-0804010008010100080b0101080901000801010008020100081b0101083b0100080d0100
-081a01000805010108650101082e01000860010108020100080101000851010108020101
-080301000802010008010100080201000852010108010100080601010803010008020100
-084209010001060a09010001030002020401030102020400060001000802010008050100
-08010100080a010008000100080901000801010008030100081a01010802010108000100
-080201020802010008000101080a01020802010008020100080201020802010008000101
-080201040803010108050100080301020803010208020100080001010805010008040100
-080001000865010108020102080201000800010108020100080001010803010208020100
-08000101080c010008030102080301010800010008020101080001000802010208020100
-08000101083d010108020100080101000851010108010100080001000803010008090100
-085201010801010008050100080001000803010008020100084209010001060a09010001
-030002020401030102020400060001000801010008060100080101000809010008010100
-080901000801010008040100081901010801010008010101080101000802010008010101
-080101000808010008020100080101000802010008010100080201000801010108010100
-080301000805010108050100080201000802010008010100080201000801010108010100
-080301000804010008010100086501010801010008020100080101010801010008010101
-0801010008010100080201000801010108010100080b0100080201000802010008010100
-08010101080101000801010108010100080201000801010108010100083c010108020100
-080101000851010108030100080301000809010008520101080101030804010008030100
-08020100084209010001060a090100010300020204010301020204000600010008000100
-080701000801010008080100080201000809010008010100080501000818010108010100
-080201000801010008020100080101000802010008080100080201000801010008020100
-0801010008020100080101000802010008030100080d0100080201000802010008010100
-080201000801010008020100080301000803010008020100086501010801010008020100
-0801010008050100080501000802010008010100080f0100080201000802010008010100
-080201000801010008020100080101000802010008010100084001010802010008010100
-085101010803010008030103080501000853010108050100080301000804010308420901
-0001060a0901000103000202040103010202040006000100080101000806010008010100
-080801000802010008090100080101000804010008190101080101000802010008010104
-080101000802010008080104080201000800010008020104080101000802010008030100
-080d01000802010008020100080101000802010008010100080201000802010008040100
-0802010008650101080101040801010008050100080501000802010008010100080f0100
-080201000802010008010100080201000801010008020100080101040801010008400101
-080201000801010008510101080301000803010008020100080301000854010108050100
-0803010008070100084209010001060a0901000103000202040103010202040006000100
-08020100080501000801010008080105080801000801010008030100081a010108010100
-080201000801010008050100080201000808010008060100080001000802010008050100
-0802010008030100080d0100080201000802010008010100080201000801010008020100
-080201000804010508640101080101000805010008050100080501000802010008010100
-080f01000802010008020100080101000802010008010100080201000801010008050100
-084001010802010008010100085101010803010008030100080201000802010008550101
-08010100080201000803010008070100084209010001060a090100010300020204010301
-020204000600010008030100080401000801010008030101080601000803010108030100
-0801010008020100081b0101080101000801010108010100080201000801010008020100
-080801000802010008030100080301000802010008010100080201000803010008050101
-080501000802010008020100080101000802010008010101080101000801010008090100
-0865010108010100080201000801010008050100080501000802010008010100080f0100
-080201000802010008010100080101010801010008010101080101000802010008010100
-084001010802010008010100085101010803010008030100080201000801010008560101
-0801010008020100080301000803010008020100084209010001060a0901000103000202
-040103010202040006000100080401000804010108040101080601000803010108040101
-08020100081c010108020101080001000802010208020100080201000809010208040100
-080401020802010008020100080401010803010108050100080301020803010208020100
-080001010802010008090100086501010802010208020100080501000806010208020100
-080f01000803010208030101080001000802010108000100080201020802010008400101
-080301010852010108010104080201020802010408520101080201020802010408020102
-084309010001060a09010001030002020401030102020400060001000805010008230100
-081d010108050100080e01050840010008770101082301050813010008050100084a0101
-0858010108670101085709010001060a0901000103000202040103010202040006000100
-084901010801010008020100085501000877010108390100080201000801010008020100
-084a01010858010108670101085709010001060a09010001030002020401030102020400
-0600010008490101080201020856010008770101083a010208030102084b010108580101
-08670101085709010001060a090100010300020204010301020204000600010008490101
-08d50101089001010858010108670101085709010001060a090100010300020204010301
-02020400060001000849010108d50101089001010858010108670101085709010001060a
-09010001030002020401030102020400060001000849010108d501010890010108580101
-08670101085709010001060a090100010300020204010301020204000600010008490101
-08d50101089001010858010108670101085709010001060a090100010300020204010301
-02020400060001ff01ff01d409010001060a090100010300020204010301020204000600
-00ff00ff00d409010001060a090100010300020204010301020204000600000008490001
-08d50001089000010858000108670001085709010001060a090100010300020204010301
-02020400060000000849000108d50001089000010858000108670001085709010001060a
-09010001030002020401030102020400060000000805000008230000081d0001086e0000
-08650001089000010858000108670001085709010001060a090100010300020204010301
-0202040006000000080400000804000108090004080a000108020000081c0001084f0002
-081b000008020002085f000108170002080500000812000008060000082e000008120002
-080300020805000108030001085200010805000008020002080400010853000108030000
-080400020803000208060000083b09010001060a09010001030002020401030102020400
-0600000008030000080400000801000008080000080d00000801000008020000081b0001
-08510000081a00000802000008020000085e000108190000081900000836000008140000
-080500000805000108020000080100000851000108040001080100000802000008020000
-0801000008520001080200010803000008020000080100000802000008040001083b0901
-0001060a0901000103000202040103010202040006000000080200000805000008010000
-08080000080d00000801000008030000081a000108020001080000000802000208020000
-08000001080a000208030002080200000800000108020000080200000802000208020000
-080000010804000108050000080300020803000208020000080000010805000008020000
-086200010802000208020000080000010802000008000001080500000803000208030002
-080300020802000408020002080300020802000008000001080a00020803000208020000
-080000010802000408010000080000010803000208050000080500000803000308020000
-080100000851000108030000080000000805000008020000080100000852000108010000
-080000000803000008050000080200000803000008000000083b09010001060a09010001
-0300020204010301020204000600000008010000080600000801000008080003080a0000
-080100000804000008190001080100000801000108010000080200000801000108010000
-080800000802000008010000080200000801000108010000080100000802000008010000
-080200000801000108010000080300010805000008020000080200000801000008020000
-080100010801000008030000080300000862000108010000080200000801000108010000
-080100010801000008040000080500000802000008020000080100000802000008030000
-080600000802000008020000080100010801000008080000080200000801000008020000
-080100010801000008030000080300010801000008010000080200000804000008050000
-080200000801000108020000080100000851000108020000080100000805000008020000
-0801000008520001080300000803000008050000080200000802000008010000083b0901
-0001060a0901000103000202040103010202040006000000080000000807000008010000
-080c00000809000008010000080500000818000108010000080200000801000008020000
-080100000802000008080000080500000802000008010000080500000802000008010000
-0802000008010000080f0000080200000802000008010000080200000801000008020000
-0803000008030003085f0001080500000801000008020000080100000802000008040000
-080500000802000008090000080300000806000008020000080200000801000008020000
-080800000805000008020000080100000802000008030000080300000805000008020000
-080400000805000008020000080100010802000008010000085100010801000008020000
-080300010803000008010000085200010803000008030003080300020802000008020000
-083b09010001060a09010001030002020401030102020400060000000801000008060000
-08010000080c000008090000080100000804000008190001080100000802000008010004
-080100000802000008090002080200040801000008060000080000000802000408010000
-080f00000802000008020000080100000802000008010000080200000802000008040000
-08020000085e000108020003080100000802000008010000080200000804000008050000
-080200000806000308030000080600000802000008020000080100000802000008080000
-080500000802000008010000080200000803000008030000080500000802000008040000
-080500000802000408020000080100000851000108010000080200000805000008020000
-080100000852000108030000080300000802000008010000080200000801000008020000
-083b09010001060a09010001030002020401030102020400060000000802000008050000
-080100000808000008020000080900000801000008030000081a00010801000008020000
-080100000805000008020000080c00000801000008050000080600000800000008020000
-08050000080f000008020000080200000801000008020000080100000802000008020000
-0804000008020000085e0001080100000802000008010000080200000801000008020000
-080400000805000008020000080500000802000008030000080600000802000008020000
-080100000802000008080000080500000802000008010000080200000803000008030000
-080500000802000008040000080500000802000008010001080200000801000008510001
-080100050804000008020000080100000852000108030000080300000802000008010000
-0802000008010005083a09010001060a0901000103000202040103010202040006000000
-080300000804000008010000080300010802000008020000080300010803000008010000
-08020000081b000108010000080100010801000008020000080100000802000008080000
-080200000801000008020000080100000807000008030000080200000801000008070001
-080500000802000008020000080100000802000008010001080100000801000008050000
-08020000085e000108010000080200000801000108010000080100010801000008040000
-080500000802000008020000080100000802000008030000080600000802000008020000
-080100000802000008080000080200000801000008020000080100000802000008030000
-080300000805000008020000080400000805000008020000080100010802000008010000
-085100010805000008010000080200000802000008010000085200010803000008030000
-08020000080100000802000008050000083b09010001060a090100010300020204010301
-020204000600000008040000080400010804000108030002080400010804000108020000
-081c00010802000108000000080200020802000008020000080900020803000208020000
-080700000804000208020000080700010805000008030002080300020802000008000001
-0802000008060002085f0001080200030801000008000001080200000800000108050000
-080500000803000208030003080400010804000008030002080200000802000008090002
-080300020802000008020000080400010801000008060002080500000805000008030003
-080300010852000108050000080200020804000108530001080100040802000208030002
-08060000083b09010001060a090100010300020204010301020204000600000008050000
-08230000081d000108050000080e000508470000087000010808000008050000083c0005
-083c00010858000108670001085709010001060a09010001030002020401030102020400
-06000000084900010801000008020000085c0000087000010808000008050000087f0001
-0858000108670001085709010001060a0901000103000202040103010202040006000000
-0849000108020002085d0000087000010808000008050000087f00010858000108670001
-085709010001060a09010001030002020401030102020400060000000849000108d50001
-089000010858000108670001085709010001060a09010001030002020401030102020400
-060000000849000108d50001089000010858000108670001085709010001060a09010001
-030002020401030102020400060000000849000108d50001089000010858000108670001
-085709010001060a09010001030002020401030102020400060000000849000108d50001
-089000010858000108670001085709010001060a09010001030002020401030102020400
-060000ff00ff00d409010001060a09010001030002020401030102020400060001ff01ff
-01d409010001060a09010001030002020401030102020400060001000849010108d50101
-089001010858010108670101085709010001060a09010001030002020401030102020400
-060001000849010108d50101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000805010008230100081d010108c90100080a0101
-089001010858010108670101085709010001060a09010001030002020401030102020400
-060001000804010008040101080a0102080b010108020100081c01010817010208050100
-0812010008060100082e01000829010008110102081b0100080201020804010108900101
-08030101085201010803010008040102085a010108020102080301020804010108430901
-0001060a0901000103000202040103010202040006000100080301000804010008010100
-0808010008020100080901000801010008020100081b0101081901000819010008360100
-083e0100081a010008020100080201000803010108900101080201000801010008510101
-080201010803010008020100085901010801010008020100080101000802010008020100
-08010100084209010001060a090100010300020204010301020204000600010008020100
-080501000801010008080100080d01000801010008030100081a01010802010208020100
-080001010802010008000101080501000803010208030102080301020802010408020102
-080301020802010008000101080901010800010008030102080301020802010408020102
-080201000800010108040101080201010800010008030102080301020802010008000101
-080c01000803010208030102080201000800010108050100080601000803010108900101
-080201000801010008510101080101000800010008070100085901010805010008050100
-0802010008010100084209010001060a0901000103000202040103010202040006000100
-08010100080601000801010008080100080d010008010100080401000819010108010100
-080201000801010108010100080101010801010008040100080501000802010008020100
-080101000802010008030100080601000802010008020100080101010801010008080100
-080001000800010008010100080201000801010008020100080301000803010008020100
-080101010801010008030101080201000800010008000100080101000802010008040100
-0802010108010100080b0100080201000802010008010100080201000801010108010100
-080301000807010008030101089001010802010008010100085101010803010008070100
-0859010108050100080501000802010008010100084209010001060a0901000103000202
-04010301020204000600010008000100080701000801010008080103080a010008010100
-080501000818010108050100080101000802010008010100080201000804010008050100
-080201000809010008030100080601000802010008020100080101000802010008080100
-0800010008000100080501000801010008070100080301000802010008010100080c0100
-080001000800010008050100080401000802010008020100080b01000802010008020100
-080101000802010008010100080201000803010008060100080401010890010108020100
-08010100085101010803010008060100085a010108030101080501000803010008010100
-084209010001060a09010001030002020401030102020400060001000801010008060100
-080101000808010008020100080901000801010008040100081901010802010308010100
-080201000801010008020100080401000805010008020100080601030803010008060100
-080201000802010008010100080201000808010008000100080001000802010308020102
-080401000803010408010100080c01000800010008000100080201030804010008020100
-08020100080b010008020100080201000801010008020100080101000802010008020100
-0806010008050101089001010802010008010100085101010803010008050100085b0101
-08050100080301000804010008010100084209010001060a090100010300020204010301
-020204000600010008020100080501000801010008080100080201000809010008010100
-08030100081a010108010100080201000801010008020100080101000802010008040100
-080501000802010008050100080201000803010008060100080201000802010008010100
-080201000808010008000100080001000801010008020100080501000803010008030100
-08050100080c010008000100080001000801010008020100080401000802010008020100
-080b01000802010008020100080101000802010008010100080201000802010008050100
-08060101089001010802010008010100085101010803010008040100085c010108050100
-080201000805010008010100084209010001060a09010001030002020401030102020400
-060001000803010008040100080101000803010108020100080201000803010108030100
-0801010008020100081b0101080101000802010008010101080101000801010108010100
-080401000805010008020100080201000801010008020100080301000806010008020100
-080201000801010008020100080801000800010008000100080101000802010008010100
-080201000803010008030100080201000801010008070101080201000800010008000100
-0801010008020100080401000802010008020100080b0100080201000802010008010100
-080201000801010108010100080101000805010008070101089001010802010008010100
-085101010803010008030100085d01010801010008020100080101000806010008010100
-084209010001060a09010001030002020401030102020400060001000804010008040101
-0804010108030102080401010804010108020100081c0101080201030801010008000101
-080201000800010108050100080501000803010208030103080401010804010008030102
-080201000802010008080100080001000800010008020103080201020805010108020102
-080201000807010108020100080001000800010008020103080401000802010008020100
-080b01000803010208030102080201000800010108020100080501040803010108900101
-080301010852010108010104080101040859010108020102080201040803010108430901
-0001060a09010001030002020401030102020400060001000805010008230100081d0101
-0808010008050100083c0105084d01050816010008150101089001010858010108670101
-085709010001060a09010001030002020401030102020400060001000849010108080100
-0805010008ad010008150101089001010858010108670101085709010001060a09010001
-0300020204010301020204000600010008490101080801000805010008ad010008150101
-089001010858010108670101085709010001060a09010001030002020401030102020400
-060001000849010108d50101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-085709010001060a09010001030002020401030102020400060001000849010108d50101
-089001010858010108670101085709010001060a09010001030002020401030102020400
-060001000849010108d50101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001ff01ff01d409010001060a09010001030002020401
-030102020400060001ff01ff01d409010001060a09010001030002020401030102020400
-060001000849010108d50101089001010858010108670101085709010001060a09010001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-085709010001060a09010001030002020401030102020400060001000805010008230100
-081d010108bb010008180101089001010858010108670101085709010001060a09010001
-03000202040103010202040006000100080401000804010108090104080a010108020100
-081c010108170102080501000812010008060100082e0100081901020821010008040100
-0807010008050100081101010890010108030101085201010805010008020102085a0101
-080201020803010208030102084309010001060a09010001030002020401030102020400
-060001000803010008040100080101000808010008020100080901000801010008020100
-081b0101081901000819010008360100081b010008270100080601000805010108110101
-089001010802010008010100085101010804010108010100080201000859010108010100
-0802010008010100080201000801010008020100084209010001060a0901000103000202
-040103010202040006000100080201000805010008010100080c01000809010008010100
-08030100081a010108020102080201000800010108020100080001010805010008030102
-080301020803010208020104080201020803010208020100080001010809010108000100
-080301020803010208020104080201020802010008000101080401010805010008030102
-080301020802010008000101080a01020802010408040100080401000800010008110101
-089001010802010008010100085101010803010008000100080501000859010108050100
-080101000802010008010100084609010001060a09010001030002020401030102020400
-06000100080101000806010008010100080b0100080a0100080101000804010008190101
-080101000802010008010101080101000801010108010100080401000805010008020100
-080201000801010008020100080301000806010008020100080201000801010108010100
-080801000800010008000100080101000802010008010100080201000803010008030100
-080201000801010108010100080301010805010008020100080201000801010008020100
-0801010108010100080b0100080401000805010008040100080101000811010108900101
-080201000801010008510101080201000801010008050100085901010805010008010100
-0802010008010100084609010001090c0001030002020401030102020400060001000800
-01000807010008010100080b0100080a0100080101000805010008180101080501000801
-010008020100080101000802010008040100080501000802010008090100080301000806
-010008020100080201000801010008020100080801000800010008000100080501000801
-010008070100080301000802010008010100080f01000802010008020100080101000802
-01000801010008020100080b010008040100080501000803010008020100081101010890
-0101080201000801010008510101080101000802010008040100085a0101080401000803
-010208020103084309010000090d00010300020204010301020204000600010008010100
-0806010008010100080b0100080a01000801010008040100081901010802010308010100
-080201000801010008020100080401000805010008020100080601030803010008060100
-080201000802010008010100080201000808010008000100080001000802010308020102
-080401000803010408010100080f01000802010008020100080101000802010008010100
-08020100080b010008040100080401000804010008020100081101010890010108020100
-0801010008510101080101000802010008030100085b0101080301000803010008020100
-080101000802010008420901070e00010300020204010301020204000600010008020100
-0805010008010100080a0100080b01000801010008030100081a01010801010008020100
-080101000802010008010100080201000804010008050100080201000805010008020100
-080301000806010008020100080201000801010008020100080801000800010008000100
-080101000802010008050100080301000803010008050100080f01000802010008020100
-08010100080201000801010008020100080b010008040100080401000804010508100101
-089001010802010008010100085101010801010508010100085c01010802010008040100
-08020100080101000802010008420901070e000103000202040103010202040006000100
-080301000804010008010100080301010804010008050101080301000801010008020100
-081b01010801010008020100080101010801010008010101080101000804010008050100
-080201000802010008010100080201000803010008060100080201000802010008010100
-080201000808010008000100080001000801010008020100080101000802010008030100
-080301000802010008010100080701010805010008020100080201000801010008020100
-0801010108010100080b0100080401000803010008090100081101010890010108020100
-08010100085101010805010008010100085d010108010100080501000802010008010100
-0802010008420901070e0001030002020401030102020400060001000804010008040101
-0804010108040100080501010804010108020100081c0101080201030801010008000101
-080201000800010108050100080501000803010208030103080401010804010008030102
-080201000802010008080100080001000800010008020103080201020805010108020102
-08020100080701010805010008030102080301020802010008000101080c010008050101
-080101000809010008110101089001010803010108520101080501000801010408590101
-08010104080201020803010208430901070e000103000202040103010202040006000100
-0805010008230100081d01010808010008050100083c01050847010008040105082d0101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-084901010808010008050100088a01000838010108900101085801010867010108570901
-070e000103000202040103010202040006000100084901010808010008050100088a0100
-0838010108900101085801010867010108570901070e0001030002020401030102020400
-060001000849010108d5010108900101085801010867010108570901070e000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-070e0001030002020401030102020400060001000849010108d501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e0001030002020401030102020400060001ff
-01ff01d40901070e0001030002020401030102020400060001ff01ff01d40901070e0001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-08570901070e0001030002020401030102020400060001000849010108d5010108900101
-085801010867010108570901070e00010300020204010301020204000600010008050100
-08230100081d0101086e01000865010108900101085801010867010108570901070e0001
-030002020401030102020400060001000804010008040101080a0102080b010108020100
-081c0101084f0102081b010008020102085f010108010100082201020867010108030101
-085201010801010408030101080601000852010108030100080401020803010208060100
-083b0901070e000103000202040103010202040006000100080301000804010008010100
-0808010008020100080901000801010008020100081b010108510100081a010008020100
-08020100085e010108010100082401000867010108020100080101000851010108010100
-080601000801010008040101085201010802010108030100080201000801010008020100
-08040101083b0901070e0001030002020401030102020400060001000802010008050100
-080101000808010008020100080901000801010008030100081a01010802010108000100
-080201020802010008000101080a01020803010208020100080001010802010008020100
-080201020802010008000101080401010805010008030102080301020802010008000101
-080501000802010008620101080101000801010008030102080201000800010108020100
-080001010803010208050100080a010208020100080201000801010008000101084b0101
-080201000801010008510101080101000806010008010100080301000800010008520101
-08010100080001000803010008050100080201000803010008000100083b0901070e0001
-030002020401030102020400060001000801010008060100080101000808010008020100
-080901000801010008040100081901010801010008010101080101000802010008010101
-080101000808010008020100080101000802010008010101080101000801010008020100
-080101000802010008010101080101000803010108050100080201000802010008010100
-080201000801010108010100080301000803010008620101080101000800010008030100
-080201000801010108010100080101010801010008010100080201000804010008090100
-0802010008010100080201000801010108010100084a0101080201000801010008510101
-080101030803010008010100080201000801010008520101080301000803010008050100
-080201000802010008010100083b0901070e000103000202040103010202040006000100
-08000100080701000801010008090102080a010008010100080501000818010108010100
-080201000801010008020100080101000802010008080100080501000802010008010100
-0805010008020100080101000802010008010100080f0100080201000802010008010100
-0802010008010100080201000803010008030103085f0101080101010804010008020100
-080101000805010008020100080101000802010008040100080901000805010008020100
-0801010008020100084a0101080201000801010008510101080501000802010008010100
-0801010008020100085201010803010008030103080301020802010008020100083b0901
-070e00010300020204010301020204000600010008010100080601000801010008080100
-080201000809010008010100080401000819010108010100080201000801010408010100
-0802010008090102080201040801010008060100080001000802010408010100080f0100
-080201000802010008010100080201000801010008020100080201000804010008020100
-085e010108010101080401040801010008050100080201000801010408040100080a0102
-08020100080201000801010008020100084a010108020100080101000851010108050100
-080201000801010008010100080201000852010108030100080301000802010008010100
-080201000801010008020100083b0901070e000103000202040103010202040006000100
-0802010008050100080101000808010008020100080901000801010008030100081a0101
-0801010008020100080101000805010008020100080c0100080101000805010008060100
-080001000802010008050100080f01000802010008020100080101000802010008010100
-08020100080201000804010008020100085e010108010100080001000803010008050100
-08050100080201000801010008080100080d010008010100080201000801010008020100
-084a01010802010008010100085101010801010008020100080201000801010008010105
-08510101080301000803010008020100080101000802010008010105083a0901070e0001
-030002020401030102020400060001000803010008040100080101000803010108020100
-0802010008030101080301000801010008020100081b0101080101000801010108010100
-080201000801010008020100080801000802010008010100080201000801010008070100
-080301000802010008010100080701010805010008020100080201000801010008020100
-0801010108010100080101000805010008020100085e0101080101000801010008020100
-080201000801010008050100080201000801010008020100080401000809010008020100
-08010100080101010801010108010100084a010108020100080101000851010108010100
-080201000802010008010100080501000852010108030100080301000802010008010100
-0802010008050100083b0901070e00010300020204010301020204000600010008040100
-080401010804010108030102080401010804010108020100081c01010802010108000100
-080201020802010008020100080901020803010208020100080701000804010208020100
-0807010108050100080301020803010208020100080001010802010008060102085f0101
-0801010008020100080201020802010008050100080201000802010208050100080a0102
-08030101080001000801010008000101084b010108030101085201010802010208040101
-080601000852010108010104080201020803010208060100083b0901070e000103000202
-0401030102020400060001000805010008230100081d010108050100080e010508470100
-08700101082a0105080f0100084e0101085801010867010108570901070e000103000202
-040103010202040006000100084901010801010008020100085c01000870010108400100
-084e0101085801010867010108570901070e000103000202040103010202040006000100
-0849010108020102085d01000870010108400100084e0101085801010867010108570901
-070e0001030002020401030102020400060001000849010108d501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-02020400060001000849010108d5010108900101085801010867010108570901070e0001
-030002020401030102020400060001ff01ff01d40901070e000103000202040103010202
-0400060001ff01ff01d40901070e00010300020204010301020204000600010008490101
-08d5010108900101085801010867010108570901070e0001030002020401030102020400
-060001000849010108d5010108900101085801010867010108570901070e000103000202
-0401030102020400060001000805010008230100081d0101086e01000865010108900101
-085801010867010108570901070e00010300020204010301020204000600010008040100
-08040101080a0102080b010108020100081c0101084f0102081b010008020102085f0101
-0890010108030101085201010802010208030102085a0101080201020803010208030102
-08430901070e000103000202040103010202040006000100080301000804010008010100
-0808010008020100080901000801010008020100081b010108510100081a010008020100
-08020100085e010108900101080201000801010008510101080101000802010008010100
-080201000859010108010100080201000801010008020100080101000802010008420901
-070e00010300020204010301020204000600010008020100080501000801010008080100
-08020100080901000801010008030100081a010108020101080001000802010208020100
-08000101080a010208030102080201000800010108020100080201000802010208020100
-080001010804010108050100080301020803010208020100080001010805010008020100
-086201010801010008000101080301020802010008020100087b01010802010008010100
-085101010805010008050100085901010805010008010100080201000801010008460901
-070e00010300020204010301020204000600010008010100080601000801010008080100
-080201000809010008010100080401000819010108010100080101010801010008020100
-080101010801010008080100080201000801010008020100080101010801010008010100
-080201000801010008020100080101010801010008030101080501000802010008020100
-080101000802010008010101080101000803010008030100086201010801010108010100
-08010100080201000801010008020100087b010108020100080101000851010108050100
-08050100085901010805010008010100080201000801010008460901070e000103000202
-040103010202040006000100080001000807010008010100080901030809010008010100
-080501000818010108010100080201000801010008020100080101000802010008080100
-0805010008020100080101000805010008020100080101000802010008010100080f0100
-0802010008020100080101000802010008010100080201000803010008030103085f0101
-0801010008050100080201000802010008000100087c0101080201000801010008510101
-0804010008050100085a010108040100080301020802010308430901070e000103000202
-040103010202040006000100080101000806010008010100080c01000809010008010100
-080401000819010108010100080201000801010408010100080201000809010208020104
-0801010008060100080001000802010408010100080f0100080201000802010008010100
-080201000801010008020100080201000804010008020100085e01010801010008050104
-08030100087d01010802010008010100085101010803010008050100085b010108030100
-0803010008020100080101000802010008420901070e0001030002020401030102020400
-06000100080201000805010008010100080c0100080901000801010008030100081a0101
-0801010008020100080101000805010008020100080c0100080101000805010008060100
-080001000802010008050100080f01000802010008020100080101000802010008010100
-08020100080201000804010008020100085e010108010100080501000806010008000100
-087c01010802010008010100085101010802010008050100085c01010802010008040100
-08020100080101000802010008420901070e000103000202040103010202040006000100
-080301000804010008010100080301010802010008020100080301010803010008010100
-08020100081b010108010100080101010801010008020100080101000802010008080100
-080201000801010008020100080101000807010008030100080201000801010008070101
-080501000802010008020100080101000802010008010101080101000801010008050100
-08020100085e01010801010008050100080201000801010008020100087b010108020100
-08010100085101010801010008050100085d010108010100080501000802010008010100
-0802010008420901070e0001030002020401030102020400060001000804010008040101
-0804010108030102080401010804010108020100081c0101080201010800010008020102
-080201000802010008090102080301020802010008070100080401020802010008070101
-08050100080301020803010208020100080001010802010008060102085f010108010100
-080601020802010008020100087b01010803010108520101080101040801010408590101
-08010104080201020803010208430901070e000103000202040103010202040006000100
-0805010008230100081d010108050100080e010508470100087001010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108010100
-08020100085c01000870010108900101085801010867010108570901070e000103000202
-0401030102020400060001000849010108020102085d0100087001010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-02020400060001000849010108d5010108900101085801010867010108570901070e0001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-08570901070e0001030002020401030102020400060001ff01ff01d40901070e00010300
-02020401030102020400060001ff01ff01d40901070e0001030002020401030102020400
-060001000849010108d5010108900101085801010867010108570901070e000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-070e00010300020204010301020204000600010008050100082a010008160101086e0100
-0865010108900101085801010867010108570901070e0001030002020401030102020400
-060001000804010008040101080b010008050101080b01010802010008150101084f0102
-081b010008020102085f01010809010208090100080d0102086701010803010108520101
-0802010208030102085a010108020102080201040801010408420901070e000103000202
-040103010202040006000100080301000804010008010100080901010804010008010100
-0809010008010100080201000814010108510100081a01000802010008020100085e0101
-080b010008090100080f0100086701010802010008010100085101010801010008020100
-080101000802010008590101080101000802010008010100080201000801010008460901
-070e00010300020204010301020204000600010008020100080501000801010008080100
-080001000804010008010100080901000801010008030100081301010802010108000100
-080201020802010008000101080a01020803010208020100080001010802010008020100
-080201020802010008000101080401010805010008030102080301020802010008000101
-080501000802010008620101080201010800010008040100080301020802010008000101
-0803010208050100080901000800010108030102080201010800010008030102080a0102
-080301020802010008000101080201000802010008020102080201000800010108130101
-080201000801010008510101080101000802010008010100080201000859010108050100
-080501000801010008460901070e00010300020204010301020204000600010008010100
-0806010008010100080a0100080401000801010008090100080101000804010008120101
-080101000801010108010100080201000801010108010100080801000802010008010100
-080201000801010108010100080101000802010008010100080201000801010108010100
-080301010805010008020100080201000801010008020100080101010801010008030100
-080301000862010108010100080101010804010008020100080201000801010108010100
-080101000802010008040100080901010801010008010100080201000801010008000100
-080001000801010008020100080801000802010008010100080201000801010108010100
-080101000802010008010100080201000801010108010100081201010802010008010100
-085101010801010008020100080101000802010008590101080501000804010008020103
-08430901070e000103000202040103010202040006000100080001000807010008010100
-080a01000804010008010100080901000801010008050100081101010801010008020100
-080101000802010008010100080201000808010008050100080201000801010008050100
-08020100080101000802010008010100080f010008020100080201000801010008020100
-08010100080201000803010008030103085f010108010100080201000804010008020100
-080201000801010008020100080501000804010008090100080201000805010008010100
-080001000800010008010100080201000808010008050100080201000801010008050100
-080201000801010008020100080101000816010108020100080101000851010108020102
-08030102085a010108030101080501000806010008420901070e00010300020204010301
-0202040006000100080101000806010008010100080a0100080401000801010008090100
-080101000804010008120101080101000802010008010104080101000802010008090102
-080201040801010008060100080001000802010408010100080f01000802010008020100
-08010100080201000801010008020100080201000804010008020100085e010108010100
-080201000804010008020100080201000801010008020100080201030804010008090100
-080201000802010308010100080001000800010008010104080901020802010408010100
-080601000800010008020104080101000816010108020100080101000851010108010100
-0802010008010100080201000859010108050100080401000806010008420901070e0001
-03000202040103010202040006000100080201000805010008010100080a010008040100
-080101000809010008010100080301000813010108010100080201000801010008050100
-08020100080c0100080101000805010008060100080001000802010008050100080f0100
-080201000802010008010100080201000801010008020100080201000804010008020100
-085e01010801010008020100080401000802010008020100080101000802010008010100
-080201000804010008090100080201000801010008020100080101000800010008000100
-080101000810010008010100080501000806010008000100080201000805010008160101
-080201000801010008510101080101000802010008010100080201000859010108050100
-08030100080301000802010008420901070e000103000202040103010202040006000100
-080301000804010008010100080301010804010008040100080101000803010108030100
-080101000802010008140101080101000801010108010100080201000801010008020100
-080801000802010008010100080201000801010008070100080301000802010008010100
-080701010805010008020100080201000801010008020100080101010801010008010100
-0805010008020100085e0101080101000801010108040100080201000802010008010101
-080101000801010008020100080401000809010008020100080101000802010008010100
-080001000800010008010100080201000808010008020100080101000802010008010100
-080701000803010008020100080101000816010108020100080101000851010108010100
-080201000801010008020100085901010801010008020100080301000803010008020100
-08420901070e000103000202040103010202040006000100080401000804010108040101
-080201040803010108040101080401010802010008150101080201010800010008020102
-080201000802010008090102080301020802010008070100080401020802010008070101
-08050100080301020803010208020100080001010802010008060102085f010108020101
-080001000804010008030102080201000800010108030103080401000809010008020100
-0802010308010100080001000800010008020102080a0102080301020802010008070100
-08040102080201000816010108030101085201010802010208030102085a010108020102
-080401000804010208430901070e00010300020204010301020204000600010008050100
-082a01000816010108050100080e010508470100087001010805010008230105081c0105
-083c0101085801010867010108570901070e000103000202040103010202040006000100
-084901010801010008020100085c01000870010108010100080201000889010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108020102
-085d01000870010108020102088a0101085801010867010108570901070e000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-070e0001030002020401030102020400060001000849010108d501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
-01d40901070e0001030002020401030102020400060001000849010108d5010108900101
-085801010867010108570901070e00010300020204010301020204000600010008490101
-08d5010108900101085801010867010108570901070e0001030002020401030102020400
-0600010008050100082a010008160101086e010008650101089001010858010108670101
-08570901070e0001030002020401030102020400060001000804010008040101080b0100
-08050100080c01010802010008150101084f0102081b010008020102085f010108110100
-087d01010803010108520101080301000805010008040102085301010802010208030102
-0804010108430901070e0001030002020401030102020400060001000803010008040100
-080101000809010108040101080b010008010100080201000814010108510100081a0100
-0802010008020100085e010108110100087d010108020100080101000851010108020101
-080401010803010008020100085201010801010008020100080101000802010008020100
-0801010008420901070e0001030002020401030102020400060001000802010008050100
-0801010008080100080001000803010008000100080b0100080101000803010008130101
-0802010108000100080201020802010008000101080a0102080301020802010008000101
-080201000802010008020102080201000800010108040101080501000803010208030102
-080201000800010108050100080201000862010108010100080001010803010208020104
-080901020802010008020100080101000800010108600101080201000801010008510101
-080101000800010008030100080001000803010008560101080501000805010008020100
-0801010008420901070e0001030002020401030102020400060001000801010008060100
-08010100080a010008050100080b01000801010008040100081201010801010008010101
-080101000802010008010101080101000808010008020100080101000802010008010101
-080101000801010008020100080101000802010008010101080101000803010108050100
-080201000802010008010100080201000801010108010100080301000803010008620101
-0801010108010100080101000802010008030100080a0100080201000801010008020100
-0801010108010100085f0101080201000801010008510101080301000805010008030100
-085601010805010008050100080201000801010008420901070e00010300020204010301
-0202040006000100080001000807010008010100080a010008050100080b010008010100
-080501000811010108010100080201000801010008020100080101000802010008080100
-0805010008020100080101000805010008020100080101000802010008010100080f0100
-0802010008020100080101000802010008010100080201000803010008030103085f0101
-0801010008020100080101000802010008030100080a0100080501000802010008010100
-08020100085f010108020100080101000851010108030100080501000803010308530101
-0803010108050100080301000801010008420901070e0001030002020401030102020400
-06000100080101000806010008010100080a010008050100080b01000801010008040100
-081201010801010008020100080101040801010008020100080901020802010408010100
-08060100080001000802010408010100080f010008020100080201000801010008020100
-0801010008020100080201000804010008020100085e0101080101000802010008010104
-08030100080b010208020100080201000801010008020100085f01010802010008010100
-085101010803010008050100080301000802010008520101080501000803010008040100
-0801010008420901070e0001030002020401030102020400060001000802010008050100
-08010100080a010008050100080b01000801010008030100081301010801010008020100
-080101000805010008020100080c01000801010008050100080601000800010008020100
-08050100080f010008020100080201000801010008020100080101000802010008020100
-0804010008020100085e010108010100080201000801010008070100080e010008010100
-080201000801010008020100085f01010802010008010100085101010803010008050100
-0803010008020100085201010805010008020100080501000801010008420901070e0001
-030002020401030102020400060001000803010008040100080101000803010108040100
-080501000805010108030100080101000802010008140101080101000801010108010100
-080201000801010008020100080801000802010008010100080201000801010008070100
-080301000802010008010100080701010805010008020100080201000801010008020100
-0801010108010100080101000805010008020100085e0101080101000802010008010100
-0802010008030100080a01000802010008010100080101010801010108010100085f0101
-080201000801010008510101080301000805010008030100080201000852010108010100
-0802010008010100080601000801010008420901070e0001030002020401030102020400
-060001000804010008040101080401010802010408010104080301010804010108020100
-081501010802010108000100080201020802010008020100080901020803010208020100
-080701000804010208020100080701010805010008030102080301020802010008000101
-0802010008060102085f0101080101000802010008020102080501010809010208030101
-080001000801010008000101086001010803010108520101080101040801010408020102
-0853010108020102080201040803010108430901070e0001030002020401030102020400
-0600010008050100082a01000816010108050100080e0105084701000870010108150105
-080f010008630101085801010867010108570901070e0001030002020401030102020400
-06000100084901010801010008020100085c010008700101082b01000863010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108020102
-085d010008700101082b010008630101085801010867010108570901070e000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-070e0001030002020401030102020400060001000849010108d501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
-01d40901070e0001030002020401030102020400060001000849010108d5010108900101
-085801010867010108570901070e00010300020204010301020204000600010008490101
-08d5010108900101085801010867010108570901070e0001030002020401030102020400
-0600010008050100082a010008160101086e010008650101089001010858010108670101
-08570901070e0001030002020401030102020400060001000804010008040101080b0100
-08040102080b01010802010008150101084f0102081b010008020102085f010108110100
-080301000878010108030101085201010802010208030102085a01010802010208030102
-0804010008440901070e0001030002020401030102020400060001000803010008040100
-080101000809010108030100080201000809010008010100080201000814010108510100
-081a01000802010008020100085e01010811010008030100087801010802010008010100
-085101010801010008020100080101000802010008590101080101000802010008010100
-080201000802010108440901070e00010300020204010301020204000600010008020100
-080501000801010008080100080001000807010008090100080101000803010008130101
-0802010108000100080201020802010008000101080a0102080301020802010008000101
-080201000802010008020102080201000800010108040101080501000803010208030102
-080201000800010108050100080201000862010108020102080201000802010008010104
-080101000800010108750101080201000801010008510101080501000805010008590101
-0805010008050100080101000800010008440901070e0001030002020401030102020400
-06000100080101000806010008010100080a010008070100080901000801010008040100
-081201010801010008010101080101000802010008010101080101000808010008020100
-080101000802010008010101080101000801010008020100080101000802010008010101
-080101000803010108050100080201000802010008010100080201000801010108010100
-080301000803010008620101080101000802010008010100080201000803010008030101
-080101000874010108020100080101000851010108050100080501000859010108050100
-080501000803010008440901070e00010300020204010301020204000600010008000100
-0807010008010100080a010008060100080a010008010100080501000811010108010100
-080201000801010008020100080101000802010008080100080501000802010008010100
-0805010008020100080101000802010008010100080f0100080201000802010008010100
-0802010008010100080201000803010008030103085f0101080501000801010008020100
-080301000803010008020100087401010802010008010100085101010804010008050100
-085a010108040100080401010804010008440901070e0001030002020401030102020400
-06000100080101000806010008010100080a010008050100080b01000801010008040100
-081201010801010008020100080101040801010008020100080901020802010408010100
-08060100080001000802010408010100080f010008020100080201000801010008020100
-0801010008020100080201000804010008020100085e0101080201030801010008020100
-080301000803010008020100087401010802010008010100085101010803010008050100
-085b010108030100080701000803010008440901070e0001030002020401030102020400
-06000100080201000805010008010100080a010008040100080c01000801010008030100
-081301010801010008020100080101000805010008020100080c01000801010008050100
-08060100080001000802010008050100080f010008020100080201000801010008020100
-0801010008020100080201000804010008020100085e0101080101000802010008010100
-080201000803010008030100080201000874010108020100080101000851010108020100
-08050100085c010108020100080801000803010008440901070e00010300020204010301
-020204000600010008030100080401000801010008030101080401000803010008070101
-080301000801010008020100081401010801010008010101080101000802010008010100
-080201000808010008020100080101000802010008010100080701000803010008020100
-080101000807010108050100080201000802010008010100080201000801010108010100
-080101000805010008020100085e01010801010008020100080101000801010108030100
-0803010008020100087401010802010008010100085101010801010008050100085d0101
-0801010008050100080201000803010008440901070e0001030002020401030102020400
-060001000804010008040101080401010802010408010104080301010804010108020100
-081501010802010108000100080201020802010008020100080901020803010208020100
-080701000804010208020100080701010805010008030102080301020802010008000101
-0802010008060102085f0101080201030802010108000100080401010801010008020100
-087401010803010108520101080101040801010408590101080101040802010208020104
-08420901070e00010300020204010301020204000600010008050100082a010008160101
-08050100080e0105084701000870010108900101085801010867010108570901070e0001
-03000202040103010202040006000100084901010801010008020100085c010008700101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108020102085d01000870010108900101085801010867010108570901070e0001
-030002020401030102020400060001000849010108d50101089001010858010108670101
-08570901070e0001030002020401030102020400060001000849010108d5010108900101
-085801010867010108570901070e00010300020204010301020204000600010008490101
-08d5010108900101085801010867010108570901070e0001030002020401030102020400
-060001000849010108d5010108900101085801010867010108570901070e000103000202
-0401030102020400060001ff01ff01d40901070e00010300020204010301020204000600
-01ff01ff01d40901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-020204000600010008050100082a010008160101086e0100086501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000804010008040101
-080b010008040102080b01010802010008150101084f0102081b010008020102085f0101
-08110100080a010008220102084b01010803010108520101080101040805010008050100
-0852010108020102080201040801010408420901070e0001030002020401030102020400
-060001000803010008040100080101000809010108030100080201000809010008010100
-080201000814010108510100081a01000802010008020100085e010108110100080a0100
-08240100084b010108020100080101000851010108010100080801010804010108520101
-080101000802010008010100080201000801010008460901070e00010300020204010301
-020204000600010008020100080501000801010008080100080001000807010008090100
-0801010008030100081301010802010108000100080201020802010008000101080a0102
-080301020802010008000101080201000802010008020102080201000800010108040101
-080501000803010208030102080201000800010108050100080201000862010108010100
-080001010803010208020104080801000801010008030102080201000800010108020100
-080001010803010208050100084b01010802010008010100085101010801010008070100
-0800010008030100080001000852010108050100080501000801010008460901070e0001
-03000202040103010202040006000100080101000806010008010100080a010008070100
-080901000801010008040100081201010801010008010101080101000802010008010101
-080101000808010008020100080101000802010008010101080101000801010008020100
-080101000802010008010101080101000803010108050100080201000802010008010100
-080201000801010108010100080301000803010008620101080101010801010008010100
-0802010008030100080a0100080001000803010008020100080101010801010008010101
-08010100080101000802010008040100084b010108020100080101000851010108010103
-080301000801010008020100080101000852010108050100080401000802010308430901
-070e000103000202040103010202040006000100080001000807010008010100080a0100
-08050101080a010008010100080501000811010108010100080201000801010008020100
-080101000802010008080100080501000802010008010100080501000802010008010100
-0802010008010100080f0100080201000802010008010100080201000801010008020100
-0803010008030103085f01010801010008020100080101000802010008030100080a0101
-0804010008020100080101000805010008020100080101000802010008040100084b0101
-080201000801010008510101080501000801010008020100080101000802010008520101
-08030101080501000806010008420901070e000103000202040103010202040006000100
-080101000806010008010100080a01000807010008090100080101000804010008120101
-080101000802010008010104080101000802010008090102080201040801010008060100
-080001000802010408010100080f01000802010008020100080101000802010008010100
-08020100080201000804010008020100085e010108010100080201000801010408030100
-080a0101080401040801010008050100080201000801010408040100084b010108020100
-080101000851010108050100080101000802010008010100080201000852010108050100
-080401000806010008420901070e00010300020204010301020204000600010008020100
-0805010008010100080a0100080701000809010008010100080301000813010108010100
-08020100080101000805010008020100080c010008010100080501000806010008000100
-0802010008050100080f0100080201000802010008010100080201000801010008020100
-080201000804010008020100085e010108010100080201000801010008070100080a0100
-08000100080301000805010008050100080201000801010008080100084b010108020100
-080101000851010108010100080201000801010508000105085101010805010008030100
-080301000802010008420901070e00010300020204010301020204000600010008030100
-080401000801010008030101080401000803010008020100080301010803010008010100
-080201000814010108010100080101010801010008020100080101000802010008080100
-080201000801010008020100080101000807010008030100080201000801010008070101
-080501000802010008020100080101000802010008010101080101000801010008050100
-08020100085e01010801010008020100080101000802010008030100080a010008010100
-0802010008020100080101000805010008020100080101000802010008040100084b0101
-080201000801010008510101080101000802010008050100080501000852010108010100
-0802010008030100080301000802010008420901070e0001030002020401030102020400
-060001000804010008040101080401010802010408020102080401010804010108020100
-081501010802010108000100080201020802010008020100080901020803010208020100
-080701000804010208020100080701010805010008030102080301020802010008000101
-0802010008060102085f0101080101000802010008020102080501010808010008020100
-080201020802010008050100080201000802010208050100084b01010803010108520101
-0802010208060100080501000852010108020102080401000804010208430901070e0001
-0300020204010301020204000600010008050100082a01000816010108050100080e0105
-08470100087001010815010508740101085801010867010108570901070e000103000202
-040103010202040006000100084901010801010008020100085c01000870010108900101
-085801010867010108570901070e00010300020204010301020204000600010008490101
-08020102085d01000870010108900101085801010867010108570901070e000103000202
-0401030102020400060001000849010108d5010108900101085801010867010108570901
-070e0001030002020401030102020400060001000849010108d501010890010108580101
-0867010108570901070e0001030002020401030102020400060001000849010108d50101
-08900101085801010867010108570901070e000103000202040103010202040006000100
-0849010108d5010108900101085801010867010108570901070e00010300020204010301
-02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
-01d40901070e0001030002020401030102020400060001000849010108d5010108900101
-0858010108670101085709010010030002020401030102020400060001000849010108d5
-0101089001010858010108670101085709010700000c0900000103000202040103010202
-04000600010008050100082a010008160101088301000850010108900101085801010867
-010108570901070000010608090107000001030002020401030102020400060001000804
-010008040101080b010008070100080a0101080201000815010108110100080a01000822
-0102080b01000806010008090100081501000807010008020102084a0101089001010803
-0101085201010805010008020102085a0101080201020802010408490901070100010607
-090107000001030002020401030102020400060001000803010008040100080101000809
-0101080601010809010008010100080201000814010108110100080a010008240100080b
-010008110100081401010806010008020100080201000849010108900101080201000801
-010008510101080401010801010008020100085901010801010008020100080101000802
-010008490901070100010606090107010001030002020401030102020400060001000802
-010008050100080101000808010008000100080501000800010008090100080101000803
-010008130101080101000800010108030102080201040808010008010100080301020802
-010008000101080201000800010108030102080501000804010108020104080201020803
-010208020100080101000803010208020100080001010802010008000100080601000806
-010008490101089001010802010008010100085101010803010008000100080101000802
-010008590101080101000802010008050100084909010702000106050901070100010300
-0202040103010202040006000100080101000806010008010100080a0100080401000801
-010008090100080101000804010008120101080101010801010008010100080201000803
-0100080a0100080001000803010008020100080101010801010008010101080101000801
-010008020100080401000804010108040100080601000802010008020100080101000800
-010008030100080201000801010108010100080301000805010008070100084901010890
-010108020100080101000851010108020100080101000801010008020100085901010801
-01000802010008040100084a090107020001060409010702000103000202040103010202
-040006000100080001000807010008010100080a01000803010008020100080901000801
-010008050100081101010801010008020100080101000802010008030100080a01010804
-010008020100080101000805010008020100080101000802010008040100080b01000806
-01000802010008050101080401000802010008010100080701000805010008060100084a
-010108900101080201000801010008510101080101000802010008020102085a01010802
-010208050100084a09010703000106030901070200010300020204010301020204000600
-0100080101000806010008010100080a0100080301000802010008090100080101000804
-01000812010108010100080201000801010408030100080a010108040104080101000805
-0100080201000801010408040100080b0100080601000802010008050101080401040801
-0100080701000804010008060100084b0101089001010802010008010100085101010801
-010008020100080101000802010008590101080101000802010008040100084a09010703
-000106020901070300010300020204010301020204000600010008020100080501000801
-0100080a0100080301050808010008010100080301000813010108010100080201000801
-010008070100080a01000800010008030100080501000805010008020100080101000808
-0100080b0100080601000802010008050100080001000803010008050100080701000804
-010008050100084c01010890010108020100080101000851010108010105080001000802
-010008590101080101000802010008030100084b09010704000106010901070300010300
-020204010301020204000600010008030100080401000801010008030101080401000807
-010008030101080301000801010008020100081401010801010008020100080101000802
-010008030100080a01000801010008020100080201000801010008050100080201000801
-010008020100080401000804010108040100080601000802010008020100080101000801
-0100080201000802010008010100080701000803010008050100084d0101089001010802
-010008010100085101010805010008010100080201000859010108010100080201000803
-0100084b0901070400010600090107040001030002020401030102020400060001000804
-010008040101080401010802010408050100080301010804010108020100081501010801
-010008020100080201020805010108080100080201000802010208020100080501000802
-010008020102080501000804010108050101080401000803010208020100080201000802
-010208020100080501040801010008050104084901010890010108030101085201010805
-010008020102085a01010802010208040100084b09010705000009020704000103000202
-04010301020204000600010008050100082a0100081601010815010508b9010108900101
-085801010867010108570901070500000901070500010300020204010301020204000600
-01000849010108d501010890010108580101086701010857090107060901070500010300
-02020401030102020400060001000849010108d501010890010108580101086701010857
-09010706090007060001030002020401030102020400060001000849010108d501010890
-010108580101086701010857090100100300020204010301020204000600010008490101
-08d5010108900101085801010867010108570900001103000202040103010202040009ff
-09ff09d9060e03000202040103010202040009ff09ff09d80000060e0300020204010301
-020204000901070d0000070000ff00ff00a507100001070c0001060e0300020204010301
-020204000901070b00010900070000ff00ff00a4090007100003070a0001060e03000202
-040103010202040009010709000209010700000106ff06ff06a109010710000507080001
-060e030002020401030102020400090107070003060009010700000106ff06ff06a10901
-071000010601000307060001060e03000202040103010202040009010705000306020901
-0700000106ff06ff06a10901071000010603000307040001060e03000202040103010202
-0400090107030003060409010700000106ff06ff06a10901071000010605000307020001
-060e030002020401030102020400090107010003060609010700000106ff06ff06a10901
-071000010607000307000001060e03000202040103010202040009050608090107000001
-06ff06ff06a1090107100001060809030001060e03000202040103010202040009010701
-0903060609010700000106ff06ff06a10901071000010607090307000001060e03000202
-0401030102020400090107030903060409010700000106ff06ff06a10901071000010605
-090307020001060e030002020401030102020400090107050903060209010700000106ff
-06ff06a10901071000010603090307040001060e03000202040103010202040009010707
-0903060009010700000106ff06ff06a10901071000010601090307060001060e03000202
-04010301020204000901070909040700000106ff06ff06a1090107100001090307080001
-060e0300020204010301020204000901070b09020700000109ff09ff09a3071000010901
-070a0001060e0300020204010301020204000901070d09000700000009ff09ff09a40710
-00000900070c0001060e030002020401030102020400090100ff00ff00d7060e03000202
-0401030102020400090000ff00ff00d8060e03000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff0615
-01000601010006ce030002020401030004040601000a0607010006020100060401000606
-010006100102061201000686000a06090100060c01000611010006020100060401000606
-0100060f01000602010006e0010006010100060801000602010006040100060601000605
-0100061f010106890300040403050601000909000607010006020100060c0100060f0100
-060201000611010006860009090006090100060c01000611010006020100060c0100060f
-01010601010006e00100060101000608010006020100060c010006050100061e01000601
-010006880304040003010202040006010001060609010607010006020100060201020603
-010106000100060201020609010006050100060201000602010206020104060201020602
-010106000100060901000600010106020100060001010603010206030102060301020603
-010206030102060301020603010206310001060609010608010006000100060201000602
-010006010104060201020609010006020100060201020603010106000100060201020609
-01010601010006020102060201000602010006d101050607010006020100060201020603
-010106000100060201010600010006020102060201000600010106040101060a01000601
-010006880300020204010301020204000601000106060901060701000602010006040100
-060201000601010106010100060201000609010006040100060201000601010006020100
-060301000603010006020100060101000600010006000100060801010601010006010101
-060101000601010006020100060101000602010006010100060201000601010006020100
-060101000602010006010100060201000601010006020100063000010606090106080100
-060001000602010006020100060301000603010006020100060801000602010006040100
-060201000601010106010100060201000608010006000100060001000601010006020100
-060101000602010006d20100060101000608010006020100060401000602010006010101
-06010100060101010601010006020100060101010601010006030101060a010006010100
-068803000202040103010202040006010001060609010607010406040100060201000602
-01000601010006020100060a010106030100060101000601010006070100060301000602
-010006010100060001000600010006080100060201000601010006050100060201000601
-010006050100060201000601010006050100060501000602010006010100063400010606
-090106080100060001000602010006020100060301000603010006020100060101040601
-010406040100060201000602010006010100060201000608010006000100060001000601
-01000602010006010100060001000600010006d101000601010006090104060401000602
-010006020100060101000602010006010100060201000601010006020100061001000601
-010006880300020204010301020204000601000106060901060701000602010006040100
-060201000602010006010104060c01000602010006010100060201020604010006030104
-060101000600010006000100060801000602010006010100060501000602010006010100
-060501040602010206030102060201040602010206310001060609010607010006020100
-060101000602010006030100060301000602010006080100060201000604010006020100
-060201000601010406080100060101010601010406010100060001000600010006d00105
-060801000602010006040100060201000602010006010100060201000601010406010100
-060201000610010006010100068803000202040103010202040006010001060609010607
-01000602010006040100060201000602010006010100060c010006020100060301000600
-010006050100060301000603010006050100060001000600010006080100060201000601
-010006050100060201000601010006050100060901000605010006010100060901000630
-000106060901060701040601010006020100060301000603010006020100060801000602
-010006040100060201000602010006010100060c01000601010106010100060501000600
-01000600010006d101000601010006090100060201000604010006020100060201000601
-010006020100060101000605010006020100061001000601010006880300020204010301
-020204000601000106060901060701000602010006040100060201000601010106010100
-060201000608010006020100060301010602010006020100060301000603010006020100
-060101000600010006000100060801010601010006010100060501000602010006010100
-060201000601010006020100060101000602010006010100060201000601010006020100
-060101000602010006300001060609010607010006020100060101000601010106030100
-060301000602010006080100060201000604010006020100060101010601010006020100
-0608010006020100060101000602010006010100060001000600010006d1010006010100
-060901000602010006040100060201000601010106010100060101010601010006020100
-060101000602010006030101060a01000601010006880300020204010301020204000601
-000106060901060701000602010006040100060301010600010006020102060a01020605
-010006030102060501010602010206020100060001000600010006080100060001010602
-010006060102060301020603010206030102060301020603010206030102063100010606
-090106070100060201000602010106000100060401010602010206090100060201000604
-0100060301010600010006020102060901000602010006020102060301000600010006d2
-010006010100060901000602010006040100060301010600010006020101060001000602
-0102060201000602010006030101060b0101068903000202040103010202040006010001
-09080634010006250100066c0001090806ff06ff06060300020204010301020204000601
-00000909063101000600010006260100066c0000090906ff06ff06060300020204010301
-02020400063f01000627010006ff06ff067e03000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
-03000202040103010202040003ff03ff03e9020204010301021a0400030002ff02ff02b6
-04000300021a04010301021a0400030002ff02ff02b604000300021a04010301021a0400
-030002ff02ff02b604000300021a04010301041b030004ff04ff04b70300041c030004ff
-04ff04f3
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 22 377 234
-%%EOF
diff --git a/lib/pman/doc/src/note.gif b/lib/pman/doc/src/note.gif
deleted file mode 100644
index 6fffe30419..0000000000
--- a/lib/pman/doc/src/note.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/doc/src/notes.xml b/lib/pman/doc/src/notes.xml
deleted file mode 100644
index 26f966fd86..0000000000
--- a/lib/pman/doc/src/notes.xml
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2004</year><year>2013</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Pman Release Notes</title>
- <prepared>otp_appnotes</prepared>
- <docno>nil</docno>
- <date>nil</date>
- <rev>nil</rev>
- <file>notes.xml</file>
- </header>
- <p>This document describes the changes made to the Pman application.</p>
-
-<section><title>Pman 2.7.1.4</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Tuple funs (deprecated in R15B) are no longer supported.</p>
- <p>
- *** POTENTIAL INCOMPATIBILITY ***</p>
- <p>
- Own Id: OTP-10170</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Pman 2.7.1.3</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Misc build updates</p>
- <p>
- Own Id: OTP-10784</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Pman 2.7.1.2</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The GS applications is now deprecated and will be
- removed in the R16 release. The following GS-based
- applications have been superseded by the Observer
- application and will removed in R16: Appmon, Pman,
- Tv.</p>
- <p>
- *** POTENTIAL INCOMPATIBILITY ***</p>
- <p>
- Own Id: OTP-9907</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Pman 2.7.1.1</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Miscellaneous documentation build updates</p>
- <p>
- Own Id: OTP-9813</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Pman 2.7.1</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- The documentation is now built with open source tools
- (xsltproc and fop) that exists on most platforms. One
- visible change is that the frames are removed.</p>
- <p>
- Own Id: OTP-8201</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Pman 2.7</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The copyright notices have been updated.</p>
- <p>
- Own Id: OTP-7851</p>
- </item>
- </list>
- </section>
-
-</section>
-
- <section>
- <title>Pman 2.6</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Some maintenance work to replace deprecated guard
- expressions etc. somehow grew into a larger rewrite of
- parts of the Pman code, fixing some of the more blatant
- errors and removing unused code.</p>
- <p>The default font has been changed, so now the entire text
- on buttons etc. should be visible on most platforms.</p>
- <p>Saving and restoring trace options to/from file now
- works.</p>
- <p>Selecting different sets of processes to hide/view should
- now work in a more consistent and logical way.</p>
- <p>It is now possible to select more than one module or
- process to hide/show.</p>
- <p>Own Id: OTP-6012 Aux Id: OTP-5987 </p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Pman 2.5.3</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Removed some dead code from <c>pman_process</c>.</p>
- <p>Own Id: OTP-6550</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Pman 2.5.2</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Some dead code reported by Dialyzer was eliminated.</p>
- <p>A bug in <c>dbg</c> when tracing to wrap trace files
- has been corrected. It failed to delete any already existing
- wrap trace files with the same names when starting a new
- wrap trace.</p>
- <p>Own Id: OTP-5329</p>
- </item>
- <item>
- <p>The graphic applications now search for HTML
- documentation in the correct place.</p>
- <p>Own Id: OTP-5381</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Pman 2.5.1</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>The Pman 'trace shell' functionality was broken, it has
- now been fixed. Furthermore, Pman could not correctly
- find the pid of the active shell if more than one shell
- process was running on the node. This has also been
- corrected.</p>
- <p>Own Id: OTP-5191</p>
- </item>
- </list>
- </section>
- </section>
-</chapter>
-
diff --git a/lib/pman/doc/src/options.gif b/lib/pman/doc/src/options.gif
deleted file mode 100644
index 18377fbed1..0000000000
--- a/lib/pman/doc/src/options.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/doc/src/options.ps b/lib/pman/doc/src/options.ps
deleted file mode 100644
index b5e2c6a391..0000000000
--- a/lib/pman/doc/src/options.ps
+++ /dev/null
@@ -1,829 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./options.tmp.eps)
-%%CreationDate: (Tue Jun 12 18:04:30 2001)
-%%BoundingBox: 0 53 250 318
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 53 250 318
-userdict begin
-%%BeginData:
-DisplayImage
-0 53
-250.000000 265.000000
-12
-350 371
-1
-0
-0
-8
-ffffff
-000000
-708090
-b03060
-d9d9d9
-808080
-a3a3a3
-000000
-03ff03ff03ff035f04000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400031b040c0392040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000307040c03050400030a040003080404030b0402030d
-0401030104010305040703200403030a040103010401031e040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000308040003020400030204000302
-040003050400030a0400030804010301040103090401030f040103010401030804010322
-040103010401030904010321040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070400030204000302040003020400030504000303
-040203030400030804010302040103010403030104030301040303010401030104010300
-040103000403030704010302040103000401030004030302040303020403030604010303
-04010300040103000401030104030300040103010403030104010300040103020403030a
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000308
-040003020400030204000302040003050400030204040302040003080401030204010300
-040103010401030104010301040103010401030004010301040103000401030104010308
-040103020406030104010300040103010401030004010301040103050401030304010300
-040203000401030104010301040103000401030104010300040203000401030004010301
-040103080400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030704040302040003020400030504000301040603010400030804010302
-040103000401030104010301040103050401030004010301040103000401030104010308
-040103020402030504010300040103040401030104010305040103030401030004010301
-040103010401030104010300040103010401030004010301040103000402030c04000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030804000306
-040003020400030504000301040603010400030804010302040103000405030104010302
-040403000401030104010300040103010401030804010302040103030404030004010304
-040503050401030304010300040103010401030104010301040103000401030104010300
-040103010401030204020309040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070400030604000302040003050400030104060301
-040003080401030204010300040103050401030104010301040103000401030104010300
-040103010401030804010302040103020401030104010300040103040401030904010303
-040103000401030104010301040103010401030004010301040103000401030104010303
-040203090400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003080400030604000302040003050400030204040302040003080401030104010301
-040103010401030104010301040103010401030004010300040203000401030104010300
-040003060401030204010302040103010401030004010301040103000401030104010306
-040103010401030104020300040103010401030004020300040103010401030004010301
-040103000401030104010308040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003070408030204000305040003030402030304000308
-040403030403030204010302040203000401030004010300040103000401030204010307
-040103020401030304020300040103000403030204030308040303020401030004010303
-04010300040103010403030104010301040103010403030a040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000300040003000400030004000300040003080400030a040003050400030a
-040003660401032904000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-0400030004000300040003070400030a040003050400030a040003660401032a04000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003000400030004000300040003080400030a
-04000305040c036604010329040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000307040c03a604000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-040003000400030004000300040003000400030004000300040003000400030004000300
-04000300040003000400030004000300040003ff03ff03d402ff02ff02bb00ff00ff00ba
-050000ff005b050100ff00ff000e050000ff005b050100b104a80502000204a8000504a8
-0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
-000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a80502
-000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a80005
-04a8050200020407010404080100041601000404010004360100040601000433000504a8
-0502000204090100040a0100041c010004360100043b0005040801040434010004130100
-041a010004060100042b0502000204090100040301000400010104020100040001010403
-010204020100040001010403010204020104040201020402010004000101040301020403
-0102040a0102040201000400010104020104040201020403010204020100040001010403
-01020404010104170005040a01000436010004130100041a010004330502000204090100
-040301010401010004010101040101000401010004020100040101010401010004040100
-040401000403010004020100040101010401010004010100040201000401010004020100
-040801000402010004010101040101000403010004060100040201000402010004010101
-0401010004010100040201000403010104170005040a0100040301000400010104030102
-0403010204030102040a0102040201000402010004010104040101000400010104020100
-040201000401010404090102040201000400010104020104040201020403010204020100
-040001010403010204040101040f05020002040901000403010004020100040101000402
-010004010100040201000401010004080100040401000407010004010100040201000401
-010004050100040201000408010004020100040101000402010004030100040601000402
-01000402010004010100040201000401010004210005040a010004030101040101000401
-010004020100040101000402010004010100040201000408010004020100040101000402
-0100040301000403010104010100040101000402010004030100040a0100040201000401
-010104010100040301000406010004020100040201000401010104010100040101000402
-010004030101040f05020002040901000403010004020100040101000402010004010104
-040101000408010004040100040401030401010004020100040101000405010404080100
-040201000401010004020100040301000406010004020100040201000401010004020100
-04020102041e0005040a0100040301000409010004010100040501000402010004080100
-040201000401010004020100040301000403010004020100040101000402010004030100
-040a01000402010004010100040201000403010004060100040201000402010004010100
-040201000401010004190502000204090100040301000402010004010100040201000401
-010004050100040801000404010004030100040201000401010004020100040101000405
-0100040c0100040201000401010004020100040301000406010004020100040201000401
-01000402010004050100041d0005040a0100040301000406010304010100040501040408
-010004020100040101000402010004030100040301000402010004010100040201000403
-0100040a0100040201000401010004020100040301000406010004020100040201000401
-010004020100040201020416050200020409010004030100040201000401010004020100
-040101000402010004010100040801000404010004030100040201000401010004020100
-040101000402010004010100040201000408010004020100040101010401010004030100
-040601000402010004020100040101000402010004010100040201000403010104170005
-040a01000403010004050100040201000401010004050100040c01000402010004010100
-04020100040301000403010004020100040101000402010004030100040a010004020100
-040101000402010004030100040601000402010004020100040101000402010004050100
-041505020002040701040401010004020100040101000402010004020102040201000408
-0100040501010402010304010100040201000402010204030102040a0102040201000400
-01010405010104040100040301020402010004020100040201020404010104170005040a
-010004030100040501000402010004010100040201000401010004020100040801000402
-01000401010004010101040301000403010104010100040101000401010104030100040a
-010004020100040101010401010004030100040601000402010004020100040101000402
-0100040101000402010004030101040f050200020462010004440005040a010004030100
-040601030402010204030102040a01020403010104000100040401010401010004000101
-040301010400010004040101040901020402010004000101040501010404010004030102
-04020100040201000402010204040101040f050200020462010004440005044701000421
-0100043c0502000204620100044400050447010004210100043c0502000204a800050447
-010004210100043c0502000204a8000504a80502000204a8000504a80502000204a80005
-04a80502000204a8000504a80502000204a8000504a80502000204a8000504a805020002
-04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
-0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
-000504a8050200020408050a04070104040801000416010004040100045f000504a80502
-000204080509000004090100040a0100041c0100045f000504a805020002040805010306
-000104090100040301000400010104020100040001010403010204020100040001010403
-010204020104040901020402010004000101040a01020402010004000101040301020402
-0100040201000401010004000101041f000504a805020002040805010306000104090100
-040301010401010004010101040101000401010004020100040101010401010004040100
-04040100040a010004020100040101010401010004080100040201000401010104010100
-040101000402010004010100040201000401010104010100041e00050409050a04070104
-043d01000447050200020408050103060001040901000403010004020100040101000402
-01000401010004020100040101000408010004040100040a010004020100040101000402
-010004080100040501000402010004050100040101000400010004000100040101000402
-0100041e000504090509000004090100043f010004470502000204080501030600010409
-01000403010004020100040101000402010004010104040101000408010004040100040a
-010004020100040101000402010004090102040201000402010004020103040101000400
-0100040001000401010004020100041e0005040905010306000104090100040301000400
-0101040301020403010204030102040a0102040301020402010004000101040301010400
-010004470502000204080501030600010409010004030100040201000401010004020100
-04010100040501000408010004040100040a0100040201000401010004020100040c0100
-040101000402010004010100040201000401010004000100040001000401010004020100
-041e00050409050103060001040901000403010104010100040101000402010004010100
-040201000401010004020100040801000402010004010100040201000401010104010100
-040101000401010104470502000204080501030600010409010004030100040201000401
-0100040201000401010004020100040101000408010004040100040a0100040201000401
-010004020100040801000402010004010101040101000401010004020100040101000400
-0100040001000401010004020100041e0005040905010306000104090100040301000409
-010004010100040501000402010004080100040501000402010004010100040201000401
-010004020100044705020002040805010306000104070104040101000402010004010100
-040201000402010204020100040801000405010104090102040201000402010004090102
-04020100040001010403010304020100040001000402010004020100041e000504090501
-030600010409010004030100040601030401010004050104040901020402010404010100
-040201000401010004020100044705020002040805010008045b01000437000504090501
-030600010409010004030100040501000402010004010100040501000410010004010100
-04050100040201000401010004020100044705020002040805000009045b010004370005
-040905010306000104090100040301000405010004020100040101000402010004010100
-040201000408010004020100040101000402010004010100040201000401010004010101
-044705020002046f01000437000504090501030600010409010004030100040601030402
-010204030102040a01020403010204020100040201000402010104000100044705020002
-04a8000504090501000804930502000204a8000504090500000904930502000204a80005
-04a80502000204a8000504a805020002041b0501048a000504a805020002041a0503040e
-01000404010204030102046a000504a80502000204190505040d01000406010004050100
-046a000504a8050200020418050203010502040b0100040001000405010004050100040a
-010204020100040001010403010204020100040201000401010004000101040301020439
-000504a8050200020417050203030502040a010004000100040501000405010004090100
-040201000401010104010100040101000402010004010100040201000401010104010100
-04010100040201000438000504a805020002041605020305050204090100040001000405
-010004050100040901000405010004020100040501000401010004000100040001000401
-01000402010004010100043c000504a80502000204150002030700020407010004020100
-0404010004050100040a0102040201000402010004020103040101000400010004000100
-0401010004020100040201020439000504a8050200020416000203050002040801040404
-010004050100040d01000401010004020100040101000402010004010100040001000400
-0100040101000402010004050100043800050409050a0407010404430100044105020002
-041700020303000204090100040201000404010004050100040901000402010004010101
-040101000401010004020100040101000400010004000100040101000402010004010100
-0402010004380005040905090000040901000488050200020418000203010002040a0100
-040201000404010004050100040a01020402010004000101040301030402010004000100
-040201000402010004020102043900050409050103060001040901000403010004000101
-040301020403010204030102040901000400010104030102040301020403010204030102
-04020100040201000402010204330502000204190005042e010004580005040905010306
-000104090100040301010401010004010100040201000401010004020100040101000402
-010004080101040101000401010004020100040101000402010004010100040201000404
-010004020100040201000401010004020100043205020002041a0003042f010004580005
-040905010306000104090100040301000409010004010100040501000402010004080100
-040501000402010004010100040501000402010004040100040201000402010004010100
-04020100043205020002041b000104300100045800050409050103060001040901000403
-010004060103040101000405010404080100040501040401010004050104040401000403
-0100040001000402010404320502000204a8000504090501030600010409010004030100
-04050100040201000401010004050100040c010004050100040501000405010004080100
-04030100040001000402010004360502000204a800050409050103060001040901000403
-010004050100040201000401010004020100040101000402010004080100040501000402
-010004010100040201000401010004020100040401000404010004030100040201000432
-0502000204a8000504090501030600010409010004030100040601030402010204030102
-0409010004060102040301020403010204050100040401000404010204330502000204a8
-000504090501000804930502000204a80005040905000009049305020002041b0001048a
-000504a805020002041a0003040c01040404010004120100044301020416000504a80502
-000204190005040b0100041c0100044501000416000504a8050200020418000204010002
-040a01000406010204020100040001010403010204020104040901020402010004000101
-0403010204020100040201000401010004000101040a0102040201000400010104050100
-0402010004020100040e000504a805020002041700020403000204090100040801000402
-010104010100040101000402010004030100040a01000402010004010101040101000401
-010004020100040101000402010004010101040101000408010004020100040101010401
-0100040401000402010004020100040e000504a805020002041600020405000204080103
-04050100040201000405010004070100040a010004050100040201000405010004010100
-040001000400010004010100040201000408010004020100040101000402010004040100
-0403010004010100040e000504a805020002041505020407050204070100040801000402
-01000406010204040100040b010204020100040201000402010304010100040001000400
-010004010100040201000408010004020100040101000402010004040100040301000401
-0100040e000504a805020002041605020405050204080100040801000402010004090100
-04030100040e010004010100040201000401010004020100040101000400010004000100
-040101000402010004080100040201000401010004020100040401000404010004000100
-040e000504a8050200020417050204030502040901000408010004020100040501000402
-010004030100040a01000402010004010101040101000401010004020100040101000400
-010004000100040101000402010004080100040201000401010004020100040401000404
-0101040f00050409000a04070104042701010418010004060100043a0502000204180502
-04010502040a010004080100040201000406010204050101040901020402010004000101
-040301030402010004000100040201000402010004090102040201000402010004040100
-04050100040f00050409000905000409010004280100041a010004420502000204190505
-043c010004390100040f0005040900010406050104090100040301000400010104030102
-0403010204030102040b0100040301000402010004010100040001010403010204020104
-0402010204030102040201000400010104030102042505020002041a0503043d01000436
-010004000100041000050409000104060501040901000403010104010100040101000402
-010004010100040201000401010004020100040801040401010004020100040101010401
-010004010100040201000403010004060100040201000402010004010101040101000401
-010004020100042405020002041b0501043e010004370100041100050409000104060501
-040901000403010004090100040101000405010004020100040a01000403010004020100
-040101000402010004010100040701000406010004020100040201000401010004020100
-0401010004280502000204a8000504090001040605010409010004030100040601030401
-010004050104040a01000403010004020100040101000402010004010100040701000406
-0100040201000402010004010100040201000402010204250502000204a8000504090001
-04060501040901000403010004050100040201000401010004050100040e010004030100
-040201000401010004020100040101000407010004060100040201000402010004010100
-040201000405010004240502000204a80005040900010406050104090100040301000405
-01000402010004010100040201000401010004020100040a010004030100040101010401
-010004020100040101000402010004030100040601000402010004020100040101000402
-0100040101000402010004240502000204a8000504090001040605010409010004030100
-040601030402010204030102040b01000404010104000100040101000402010004020102
-04050101040401000403010204020100040201000402010204250502000204a800050409
-0001050804930502000204a8000504090000050904930502000204a8000504a805020002
-04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
-0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
-000504a80502000204a800050409000a040701040442010004420502000204a800050409
-00090500040901000444010004420502000204a800050409000104060501040901000403
-010004000101040301020403010204030102040a01020402010004020100040201020402
-0100040001010402010404020102043a0502000204a80005040900010406050104090100
-040301010401010004010100040201000401010004020100040101000402010004080100
-040201000401010004020100040101000402010004010101040101000403010004030100
-0402010004390502000204a8000504090001040605010409010004030100040901000401
-010004050100040201000408010004020100040101000402010004010100040201000401
-0100040201000403010004030100043d0502000204a80005040900010406050104090100
-040301000406010304010100040501040408010404020100040001000402010404010100
-040201000403010004040102043a0502000204a800050409000104060501040901000403
-010004050100040201000401010004050100040c01000406010004000100040201000405
-010004020100040301000407010004390502000204a80005040900010406050104090100
-040301000405010004020100040101000402010004010100040201000408010004020100
-040301000403010004020100040101000402010004030100040301000402010004390502
-00020408050a040701040408010004160100040401000420010204050100040901000429
-000504090001040605010409010004030100040601030402010204030102040a01020404
-01000404010204020100040201000404010104020102043a050200020408050900000409
-0100040a0100041c01000422010004100100042900050409000105080493050200020408
-050103060001040901000403010004000101040201000400010104030102040201000400
-01010403010204020104040901020402010004000101040c010004030102040201000400
-010104020100040101000426000504090000050904930502000204080501030600010409
-010004030101040101000401010104010100040101000402010004010101040101000404
-010004040100040a0100040201000401010104010100040b010004050100040201010401
-010004010100040001000427000504a80502000204080501030600010409010004030100
-0402010004010100040201000401010004020100040101000408010004040100040a0100
-040201000401010004020100040b01000405010004020100040201000401010104280005
-04a805020002040805010306000104090100040301000402010004010100040201000401
-0104040101000408010004040100040a0100040201000401010004020100040b01000405
-01000402010004020100040101010428000504a805020002040805010306000104090100
-0403010004020100040101000402010004010100040501000408010004040100040a0100
-040201000401010004020100040b01000405010004020100040201000401010004000100
-0427000504a8050200020408050103060001040901000403010004020100040101000402
-01000401010004020100040101000408010004040100040a010004020100040101000402
-0100040b010004050100040201000402010004010100040101000426000504a805020002
-040805010306000104070104040101000402010004010100040201000402010204020100
-0408010004050101040901020402010004020100040b0100040501000402010004020100
-04010100040201000425000504a8050200020408050100080494000504a8050200020408
-050000090494000504a80502000204a8000504a80502000204a8000504a80502000204a8
-000504a80502000204a8000504a80502000204a8000504a805020002041b0501048a0005
-04a805020002041a0503040e01000404010204030102040a01020405010004090100044a
-000504a80502000204190505040d01000406010004050100040c010004100100044a0005
-04a8050200020418050203010502040b0100040001000405010004050100040c01000403
-010204020100040001010402010004010100040301020440000504a80502000204170502
-03030502040a0100040001000405010004050100040c0100040501000402010104010100
-04010100040001000403010004020100043f000504a80502000204160502030505020409
-0100040001000405010004050100040c0100040501000402010004020100040101010404
-01000443000504a805020002041500020307000204070100040201000404010004050100
-040c010004050100040201000402010004010101040501020440000504a8050200020416
-000203050002040801040404010004050100040c01000405010004020100040201000401
-01000400010004070100043f000504a80502000204170002030300020409010004020100
-0404010004050100040c0100040501000402010004020100040101000401010004020100
-04020100043f000504a8050200020418000203010002040a010004020100040401000405
-0100040c01000405010004020100040201000401010004020100040201020440000504a8
-05020002041900050488000504a805020002041a00030489000504a805020002041b0001
-048a000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
-0502000204a8000504a80502000204a8000504a805020002041b0001048a000504a80502
-0002041a0003040c01040404010004120100040b01020405010004090100041b0102041d
-000504a80502000204190005040b0100041c0100040d010004100100041d0100041d0005
-04a8050200020418000204010002040a0100040601020402010004000101040301020402
-0104040b01000403010204020100040001010402010004010100040a0102040201000400
-01010405010004020100040201000415000504a805020002041700020403000204090100
-040801000402010104010100040101000402010004030100040d01000405010004020101
-040101000401010004000100040a01000402010004010101040101000404010004020100
-040201000415000504a80502000204160002040500020408010304050100040201000405
-010004070100040d010004050100040201000402010004010101040b0100040201000401
-0100040201000404010004030100040101000415000504a8050200020415050204070502
-0407010004080100040201000406010204040100040d0100040501000402010004020100
-04010101040b010004020100040101000402010004040100040301000401010004150005
-04a80502000204160502040505020408010004080100040201000409010004030100040d
-01000405010004020100040201000401010004000100040a010004020100040101000402
-01000404010004040100040001000415000504a805020002041705020403050204090100
-0408010004020100040501000402010004030100040d0100040501000402010004020100
-040101000401010004090100040201000401010004020100040401000404010104160005
-04a8050200020418050204010502040a010004080100040201000406010204050101040b
-010004050100040201000402010004010100040201000409010204020100040201000404
-0100040501000416000504a80502000204190505047001000416000504a805020002041a
-0503046e0100040001000417000504a805020002041b0501047001000418000504a80502
-000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a80005
-04a80502000204a8000504a80502000204a8000504a80502000204a8000504a805020002
-04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
-0502000204a8000504a80502000204a8000505ab000205a8000405ac000105a9000305ad
-000005aa00ff00ff00ff00ff001f04ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff04570005040f01040434010004130100041a01000406010004d3
-0005041101000436010004130100041a010004db00050411010004030100040001010403
-01020403010204030102040a010204020100040201000401010404010100040001010402
-010004020100040101040409010204020100040001010402010404020102040301020402
-010004000101040301020404010104b70005041101000403010104010100040101000402
-010004010100040201000401010004020100040801000402010004010100040201000403
-01000403010104010100040101000402010004030100040a010004020100040101010401
-010004030100040601000402010004020100040101010401010004010100040201000403
-010104b70005041101000403010004090100040101000405010004020100040801000402
-01000401010004020100040301000403010004020100040101000402010004030100040a
-010004020100040101000402010004030100040601000402010004020100040101000402
-01000401010004c100050411010004030100040601030401010004050104040801000402
-01000401010004020100040301000403010004020100040101000402010004030100040a
-010004020100040101000402010004030100040601000402010004020100040101000402
-01000402010204be0005041101000403010004050100040201000401010004050100040c
-010004020100040101000402010004030100040301000402010004010100040201000403
-0100040a0100040201000401010004020100040301000406010004020100040201000401
-0100040201000405010004bd000504110100040301000405010004020100040101000402
-010004010100040201000408010004020100040101000401010104030100040301010401
-0100040101000401010104030100040a0100040201000401010104010100040301000406
-01000402010004020100040101000402010004010100040201000403010104b700050411
-010004030100040601030402010204030102040a01020403010104000100040401010401
-010004000101040301010400010004040101040901020402010004000101040501010404
-0100040301020402010004020100040201020404010104b70005044e01000421010004e4
-0005044e01000421010004e40005044e01000421010004e4000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff045700050416050104ff043e000504150503040c010404190100
-040d010004ff0401000504140505040d0100042a010004ff040100050413050203010502
-040c01000403010004000101040901000402010004020102040201000400010104030101
-0400010004020102040201000402010004f300050412050203030502040b010004030101
-040101000408010004020100040401000402010104010100040101000401010104010100
-04020100040101000402010004f300050411050203050502040a01000403010004020100
-040801000400010004000100040401000402010004020100040101000402010004010100
-0402010004010100040001000400010004f3000504100002030700020409010004030100
-040201000408010004000100040001000404010004020100040201000401010004020100
-040101000402010004010100040001000400010004f300050411000203050002040a0100
-040301000402010004080100040001000400010004040100040201000402010004010100
-04020100040101000402010004010100040001000400010004f300050412000203030002
-040b01000403010004020100040801000400010004000100040401000402010004020100
-0401010004010101040101000402010004010100040001000400010004f3000504130002
-03010002040a010404010100040201000409010004000100040501000402010004020100
-040201010400010004020102040301000400010004f400050414000504ff043c00050415
-000304ff043d00050416000104ff043e000504ff0457000504ff0457000504ff04570005
-04ff0457000504ff0457000504ff040600470408000504ff040600460500040800050467
-058d0410000104430501040800050467058c000004100001044305010408000504670501
-048900010410000104430501040800050467050104890001041000010443050104080005
-04160001044e0501048900010410000104070602043805010408000504150003040c0104
-041201010404010004030102041905010489000104100001040706000401060004370501
-0408000504140005040d010004130100040d010004190501048900010410000104070600
-040106000402060004000601040306020402060004020600040206020403060204140501
-040800050413000204010002040c010004040102040b0100040401020405010004030102
-041205010489000104100001040706000401060004020601040106000401060004020600
-040106000402060004010600040206000401060004020600041305010408000504120002
-04030002040b010004030100040201000408010404040100040501000402010004020100
-041105010489000104100001040706030402060004050600040206000401060004000600
-0400060004010600040506000402060004130501040800050411000204050002040a0100
-0403010004020100040a0100040601000405010004020100040201000411050104890001
-041000010407060004020600040106000405060004020600040106000400060004000600
-040206020402060404130501040800050410050204070502040901000403010004020100
-040a01000406010004050100040201040411050104890001041000010407060004020600
-040106000405060004020600040106000400060004000600040506000401060004170501
-040800050411050204050502040a01000403010004020100040a01000406010004050100
-040201000415050104890001041000010407060004020600040106000405060004020600
-040106000400060004000600040106000402060004010600040206000403060104040601
-040406010501040800050412050204030502040b01000403010004020100040a01000406
-010004050100040201000402010004110501048900010410000104070603040206000406
-060204030600040006000403060204030602040406010404060104040601050104080005
-0413050204010502040c010004040102040b010004060100040501000403010204120501
-0489000104100001044305010408000504140505044c0501048900010410000104430501
-0408000504150503044d05010489000104100001044305010408000504160501044e0501
-048900010410000104430501040800050467050104890001041000010443050104080005
-04670501008b04100001044305010408000504670500008c041000010443050104080005
-04ff0406000105450408000504ff0406000005460408000504ff0457000504ff04570005
-04ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff04570005
-04ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff04570005
-04ff0457000504ff0457000504ff0457000505ff0557000405ff0558000305ff055900ff
-00ff00ff00ff001f04ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff04570005044c003b044b003b04460005044c003a
-0500044b003a050004460005044c000104370501044b00010437050104460005044c0001
-04370501044b00010437050104460005044c000104370501044b00010437050104460005
-044c000104370501044b00010437050104460005044c000104370501044b000104370501
-04460005044c000104370501044b00010437050104460005044c000104370501044b0001
-0437050104460005044c000104150102040201000402010004160501044b000104070102
-041f01020409050104460005044c00010414010004020100040101000401010004170501
-044b00010406010004020100042001000409050104460005044c00010414010004020100
-040101000400010004180501044b00010406010004020100040201020402010004000101
-0403010204030102040501000409050104460005044c0001041401000402010004010101
-04190501044b000104060100040501000402010004010101040101000401010004020100
-0401010004020100040401000409050104460005044c0001041401000402010004010100
-0400010004180501044b0001040601000409010004010100040201000401010004050100
-04020100040401000409050104460005044c000104140100040201000401010004010100
-04170501044b000104060100040601030401010004020100040101000405010404040100
-0409050104460005044c00010414010004020100040101000401010004170501044b0001
-040601000402010004010100040201000401010004020100040101000405010004080100
-0409050104460005044c00010414010004020100040101000402010004160501044b0001
-040601000402010004010100040201000401010004020100040101000402010004010100
-04020100040401000409050104460005044c000104150102040201000402010004160501
-044b00010407010204030103040101000402010004020102040301020405010004090501
-04460005044c000104370501044b00010437050104460005044c000104370501044b0001
-0437050104460005044c000104370501044b00010437050104460005044c000104370501
-044b00010437050104460005044c000104370501044b00010437050104460005044c0001
-04370501044b00010437050104460005044c000104370501044b00010437050104460005
-044c000104370501044b00010437050104460005044c000104370501044b000104370501
-04460005044c000104370501044b00010437050104460005044c00010539044b00010539
-04460005044c0000053a044b0000053a0446000504ff0457000504ff0457000504ff0457
-000504ff0457000504ff0457000504ff045700010500000204ff045700000501000204ff
-0457
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 53 250 318
-%%EOF
diff --git a/lib/pman/doc/src/part_notes.xml b/lib/pman/doc/src/part_notes.xml
deleted file mode 100644
index 1505d52421..0000000000
--- a/lib/pman/doc/src/part_notes.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>2004</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Pman Release Notes</title>
- <prepared></prepared>
- <docno></docno>
- <date>2004-09-07</date>
- <rev>1.0</rev>
- <file>part_notes.sgml</file>
- </header>
- <description>
- <p>The process manager <em>Pman</em> is a graphical tool used to
- inspect the Erlang processes executing either locally or on remote
- nodes. It is also possible to trace events in the individual
- processes.</p>
- </description>
- <xi:include href="notes.xml"/>
-</part>
-
diff --git a/lib/pman/doc/src/pman.xml b/lib/pman/doc/src/pman.xml
deleted file mode 100644
index 48eaf9167c..0000000000
--- a/lib/pman/doc/src/pman.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE erlref SYSTEM "erlref.dtd">
-
-<erlref>
- <header>
- <copyright>
- <year>1996</year>
- <year>2012</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>pman</title>
- <prepared></prepared>
- <docno></docno>
- <date></date>
- <rev></rev>
- </header>
- <module>pman</module>
- <modulesummary>A graphical process manager.</modulesummary>
- <description>
- <warning>
- <p>
- The Pman application has been superseded by the Observer application.
- Pman will be removed in R16.
- </p>
- </warning>
- <p>A graphical tool used to inspect the Erlang processes executing either
- locally or on remote nodes. It is also possible to trace events in
- the individual processes.</p>
- </description>
- <funcs>
- <func>
- <name>start()</name>
- <name>start(Excluded)</name>
- <name>start_notimeout()</name>
- <name>start_notimeout(Excluded)</name>
- <fsummary>Start Pman.</fsummary>
- <type>
- <v>Excluded = [Module]</v>
- <v>&nbsp;Module = atom()</v>
- </type>
- <desc>
- <p>Starts Pman. It will use the previously saved trace settings
- in <c>HOME/.erlang_tools/pman.opts</c>, where <c>HOME</c> is
- the user's home directory, if such a file exists. Otherwise
- standard trace settings will be used. The return value should
- be ignored.</p>
- <p><c>Excluded</c> is a list of module names. If the argument is
- present, processes currently executing in any of these modules
- will not be shown by Pman.</p>
- <p><c>start/0,1</c> will fail unless the start-up succeeds
- within 20 seconds, whereas <c>start_notimeout/0,1</c> will
- wait indefinitely.</p>
- </desc>
- </func>
- <func>
- <name>proc(Process)</name>
- <name>proc(A, B, C)</name>
- <fsummary>Start a Pman trace window.</fsummary>
- <type>
- <v>Process = pid() | atom()</v>
- <v>A = B = C = integer()</v>
- </type>
- <desc>
- <p>Starts a Pman trace window for the specified process.
- The return value should be ignored.</p>
- <p>The process to trace is given either by its pid or by its
- registered name. It is also possible to use <c>proc/3</c>
- to trace the pid represented as <c><![CDATA[<A,B,C>]]></c>.</p>
- </desc>
- </func>
- </funcs>
-</erlref>
-
diff --git a/lib/pman/doc/src/pman_chapter.xml b/lib/pman/doc/src/pman_chapter.xml
deleted file mode 100644
index ce4adbec45..0000000000
--- a/lib/pman/doc/src/pman_chapter.xml
+++ /dev/null
@@ -1,377 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1996</year><year>2012</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Pman</title>
- <prepared></prepared>
- <docno></docno>
- <date></date>
- <rev></rev>
- <file>pman_chapter.xml</file>
- </header>
- <marker id="here"></marker>
-
- <section>
- <title>Introduction</title>
- <warning>
- <p>
- The Pman application has been superseded by the Observer application.
- Pman will be removed in R16.
- </p>
- </warning>
- <p>The process manager Pman is a tool for viewing processes executing
- locally or on remote nodes. Its main purpose is to locate
- erroneous code by inspecting the state of the processes and by tracing
- events. Bottlenecks, unread messages, and bad memory handling are
- some of the problems that can be solved with Pman.</p>
- <p>Processes may be inspected individually in a process trace
- window. There the user may dynamically follow the execution of a
- process by getting trace output for sent and received messages
- as well as for called functions and some other process
- events. Information about source code modules executed by the
- processes is also accessible. Note that Pman has some effect on
- the real time behavior of a running system.</p>
- </section>
-
- <section>
- <title>Getting Started with Pman</title>
- <p>Start Pman by calling <c>pman:start()</c>. It will start
- the <seealso marker="#main_win">Main Window</seealso>, showing an
- overview of all processes running at the current node.</p>
- <p>To trace a certain process, select it by clicking on its line and
- then chose Trace-&gt;Selected Process, or simply double-click it. This
- will open a <seealso marker="#trace_win">Trace Window</seealso>.
- In the Trace Window, there is some information about the process
- and traced events are added dynamically.</p>
- <p>Which events to trace are selected in
- the <seealso marker="#options_win">Options Window</seealso> which
- is opened by choosing File-&gt;Options... in the Main Window or in a
- Trace Window. Currently supported trace events are message sending,
- message receiving, function calls and process events.</p>
- <p>It is possible to by-pass the Main Window and open a Trace
- Window directly for the process <c>Pid</c> by calling
- <c>pman:proc(Pid)</c>.</p>
- </section>
-
- <section>
- <marker id="main_win"></marker>
- <title>The Main Window</title>
- <p>The Main Window shows all processes running at the displayed node.
- The window is automatically updated every 5 seconds.
- Select which node to display in the window by choosing the node name
- from the Nodes menu.</p>
- <image file="main_window.gif">
- <icaption>The Main Window.</icaption>
- </image>
- <p>A process can be selected by clicking on its line. The selected
- process is highlighted. Use the arrow keys to move up and down in
- the process overview.</p>
- <p>The following information is displayed for each process:</p>
- <list type="bulleted">
- <item>Pid - process identifier.</item>
- <item>Current Function - the function (<c>Module:Function/Arity</c>)
- the process is currently executing.</item>
- <item>Name - registered name of the process, if any.</item>
- <item>Msgs - number of messages in the process' mailbox.</item>
- <item>Reds - number of reductions performed. Gives a rough estimate
- of the process' work load.</item>
- <item>Size - estimated size of the process, in words, calculated by
- adding the stack size and the heap size.</item>
- </list>
- <p>At the bottom of the window the following functions and
- information can be found:</p>
- <taglist>
- <tag><em>Hide System Processes</em></tag>
- <item>This check button controls the display of what Pman consider
- <em>system processes</em>, that is, processes Pman knows are part
- of Erlang/OTP rather than the user's application.
- If the button is selected, these system processes will not be
- shown.</item>
- <tag><em>Auto-Hide New</em></tag>
- <item>This check button controls the treatment of newly created
- processes. If it is selected, new processes will not be shown.</item>
- <tag><em># Hidden</em></tag>
- <item>This label displays the number of processes currently
- executing that are not shown in the process overview.</item>
- </taglist>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Options...</em></tag>
- <item>Open the <seealso marker="#options_win">Options Window</seealso>
- which allows the user to set the trace options to use.</item>
- <tag><em>Save Options</em></tag>
- <item>Save the options set using the Options Window. The options are
- stored to the file <c>HOME/.erlang_tools/pman.opts</c>, where
- <c>HOME</c> is the user's home directory, and are automatically
- loaded the next time Pman is started.</item>
- <tag><em>Exit</em></tag>
- <item>Stop Pman.</item>
- </taglist>
- </section>
-
- <section>
- <title>The View Menu</title>
- <p>This menu mainly contains buttons for controlling what to
- display in the Main Window. Note that the View Menu overrides
- the settings of the check buttons (Hide System processes, Auto-Hide
- new) in the Main Window.</p>
- <taglist>
- <tag><em>Hide All Processes</em></tag>
- <item>Hide all processes.</item>
- <tag><em>Hide Modules...</em></tag>
- <item>Opens a dialog window with all loaded modules. If the user
- selects a window and clicks OK, the process overview will not
- show any processes running code from those modules.</item>
- <tag><em>Hide Selected Processs</em></tag>
- <item>Hide the selected process.</item>
- <tag><em>Module Info...</em></tag>
- <item>Given a selected process currently executing a function in
- the module <c>Module</c>, this menu button opens a window
- showing information about the module as returned from
- <c>Module:module_info()</c>.</item>
- <tag><em>Refresh</em></tag>
- <item>Updates the process overview.</item>
- <tag><em>Show All Processes</em></tag>
- <item>Show all processes, except system processes and/or new
- processes if <em>Hide System Processes</em> and/or
- <em>Auto-Hide New</em> is selected.</item>
- <tag><em>Show Processes...</em></tag>
- <item>Opens a dialog window with all hidden processes. If
- the user selects a process and clicks OK, the process
- overview will show that process.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Trace Menu</title>
- <taglist>
- <tag><em>Kill</em></tag>
- <item>Terminates the selected process by calling
- <c>exit(Pid,kill)</c>.</item>
- <tag><em>Trace Selected Process</em></tag>
- <item>Opens a Trace Window for the selected process. Tracing
- will start immediately with the default trace flags set from
- the Main Window.</item>
- <tag><em>Shell Process</em></tag>
- <item>Opens a Trace Window for the shell process of node Pman
- was started at (not the displayed node). If the shell process
- dies, the opened Trace Window will find the pid of
- the automatically started new shell process, and continue to
- trace that process.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Nodes Menu</title>
- <p>The Nodes menu contains one entry for each known node.
- By selecting a node from the Nodes menu, the process overview
- window will change its view, and display the processes running
- on that node.</p>
- </section>
-
- <section>
- <title>The Help Menu</title>
- <taglist>
- <tag><em>Help</em></tag>
- <item>Selecting Help from the Help menu will cause the HTML
- version of the Pman User's Guide (this document) to be
- displayed. Currently this function requires Netscape to be up
- and running.</item>
- </taglist>
- </section>
- </section>
-
- <section>
- <marker id="trace_win"></marker>
- <title>The Trace Window</title>
- <p>A Trace Window outputs trace information for a traced process.
- A Trace Window automatically uses the trace options set in
- the Main Window, but it is also possible to change the options for
- each Trace Window individually.</p>
- <image file="trace.gif">
- <icaption>The Trace Window.</icaption>
- </image>
- <p>There is no limit to how many Trace Windows can be open at the same
- time. However, notice that if more processes are traced,
- the performance degradation of the system will be more noticeable.</p>
- <p>The following information is displayed, where applicable:</p>
- <list type="bulleted">
- <item>initial call - the function (<c>Module:Function/Arity</c>)
- the process started executing in.</item>
- <item>current function - the function (<c>Module:Function/Arity</c>)
- the process is currently executing.</item>
- <item>messages - the messages in the mailbox.</item>
- <item>dictionary - the contents of the process dictionary.</item>
- <item>heap size - heap size in words.</item>
- <item>stack size - stack size in words.</item>
- <item>reductions - number of reductions performed. Gives a rough
- estimate of the process' work load.</item>
- <item>links - list of pids the process is linked to.</item>
- <item>trap_exit - <c>true</c> if the process trap exit signals,
- <c>false</c> otherwise.</item>
- </list>
- <p>In the Trace Window, trace output is continuously added. First in
- each trace message is the pid of the traced process.
- Note that if the inheritance flags for tracing are set, the trace
- output for the spawned/linked processes will be shown in the same
- window as the spawning/linking process.</p>
- <p>Each trace message also has a mnemonic tag:</p>
- <taglist>
- <tag><em>!</em></tag>
- <item>This tag indicates that a message has been sent. Following
- the <c>To:</c> tag will be a pid/name of the receiver. Next,
- following the <c>Msg:</c> tag will be the sent message.</item>
- <tag><em>rec</em></tag>
- <item>This tag indicates that a message has been received.
- Following this will be the received message.</item>
- <tag><em>call</em></tag>
- <item>This tag indicates a call to a function. Following this will be
- the actual call, with all the arguments.</item>
- <tag><em>link</em></tag>
- <item>This tag indicates that a link between the traced process and
- another process has been created. Following this will be the pid
- of the other process.</item>
- <tag><em>spawn</em></tag>
- <item>This tag indicates that the traced process has spawned another
- process. Following this will be the pid of the spawned process.</item>
- <tag><em>exit</em></tag>
- <item>This tag indicates that traced process has exited. Following
- this will be the exit reason.</item>
- </taglist>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Options...</em></tag>
- <item>Opens the <seealso marker="#options_win">Options Window</seealso>
- which allows the user to set the trace options to use for this
- specific Trace Window.</item>
- <tag><em>Save Buffer...</em></tag>
- <item>Opens a dialog that prompts the user for a file name to
- save the current Trace Window contents in.</item>
- <tag><em>Close</em></tag>
- <item>Stops tracing of the process, and closes the Trace Window.</item>
- </taglist>
- </section>
-
- <section>
- <title>The View Menu</title>
- <taglist>
- <tag><em>Clear Buffer</em></tag>
- <item>Clears the contents of the Trace Window.</item>
- <tag><em>Module Info</em></tag>
- <item>Opens a window showing information about the module
- the process is currently executing code from, as returned from
- <c>Module:module_info()</c>.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Trace Menu</title>
- <taglist>
- <tag><em>All Linked Processes</em></tag>
- <item>Opens a Trace Window for each of the processes linked to the
- process being traced in the current Trace Window.</item>
- <tag><em>Linked Process -></em></tag>
- <item>The Linked Process submenu has one entry for each process
- linked to the process being traced in the current Trace Window.
- Select one of the processes to open a new Trace Window for that
- process.</item>
- <tag><em>Kill</em></tag>
- <item>Terminates the process being traced in the current Trace
- Window by calling <c>exit(Pid,kill)</c>.</item>
- </taglist>
- </section>
-
- <section>
- <title>The Help Menu</title>
- <taglist>
- <tag><em>Help</em></tag>
- <item>Selecting Help from the Help menu will cause the HTML version
- of the Pman User's Guide (this document) to be displayed.
- Currently this function requires Netscape to be up and running.</item>
- </taglist>
- </section>
- </section>
-
- <section>
- <marker id="options_win"></marker>
- <title>The Options Window</title>
- <p>The Options Window allows the user to specify the amount of output,
- and the destination of output for traced processes.</p>
- <image file="options.gif">
- <icaption>The Options Window.</icaption>
- </image>
- <p>In the upper left corner of the Options Window, there are check
- buttons for determining what to output in the Trace Window:</p>
- <taglist>
- <tag><em>Trace send</em></tag>
- <item>Select this check button to display information about sent
- messages.</item>
- <tag><em>Trace receive</em></tag>
- <item>Select this check button to display information about received
- messages.</item>
- <tag><em>Trace functions</em></tag>
- <item>Select this check button to display information about
- function calls.</item>
- <tag><em>Trace events</em></tag>
- <item>Select this check button to display information about process
- events, such as spawn, link and exit.</item>
- </taglist>
- <p>In the upper right corner of the dialog, there are options for
- controlling the behaviour of spawned or linked processes:</p>
- <taglist>
- <tag><em>Inherit on spawn</em></tag>
- <item>
- <p>The user may select if spawned processes shall also be traced.
- And if so, if all spawned processes should be traced, or just
- the first spawned process.</p>
- <p>If a spawned process is traced, it will get the same trace
- options that are set for the spawning process. And the output
- will be shown in the same Trace Window as that of the spawning
- process.</p>
- <p>.</p>
- </item>
- <tag><em>Inherit on link</em></tag>
- <item>
- <p>The user may select if a process that is being linked to
- shall be traced. And if so, if all linked processes shall be
- traced, or just the first one linked to.</p>
- <p>If a linked process is traced, it will get the same trace
- options that are set for the linking process. And the output
- will be shown in the same Trace Window as that of the linked
- process.</p>
- </item>
- </taglist>
- <p>In the lower part of the Options Dialog, the user may select
- whether the trace information shall be output to a file, or appear in
- the trace window.</p>
- <p>Sending trace information to a file is more efficient than displaying
- it in the Trace Window. Furthermore, if the amount of trace data is
- large, it will not be lost if tracing to a file. The trace information
- in the Trace Window has an upper limit (approx. 10,000 lines), after
- which the output buffer will be cleared.</p>
- </section>
-</chapter>
-
diff --git a/lib/pman/doc/src/toolbar.gif b/lib/pman/doc/src/toolbar.gif
deleted file mode 100644
index 116e32ace8..0000000000
--- a/lib/pman/doc/src/toolbar.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/doc/src/trace.gif b/lib/pman/doc/src/trace.gif
deleted file mode 100644
index 8b34ec7ea0..0000000000
--- a/lib/pman/doc/src/trace.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/doc/src/trace.ps b/lib/pman/doc/src/trace.ps
deleted file mode 100644
index 0828d4ade1..0000000000
--- a/lib/pman/doc/src/trace.ps
+++ /dev/null
@@ -1,1312 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./trace.tmp.eps)
-%%CreationDate: (Tue Jun 12 18:05:00 2001)
-%%BoundingBox: 0 17 377 309
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 17 377 309
-userdict begin
-%%BeginData:
-DisplayImage
-0 17
-377.000000 292.000000
-12
-562 436
-1
-0
-0
-8
-ffffff
-000000
-b24d7a
-dcadc2
-57253b
-d9d9d9
-c3c3c3
-828282
-03ff03ff034e040003ff03f40400031c04000301021a0400030002ff02f304000300021a
-04010301021a0400030002ff02f304000300021a04010301021a0400030002ff02f30400
-0300021a0401030102020418030004ff04f4030004170202040103010202040003ff03ff
-032602020401030102020400030002150400030002ff02db040003000215040003000215
-0400030002020401030102020400030002150400030002ff02db04000300021504000300
-02150400030002020401030102020400030002150400030002ff02db0400030002150400
-030002150400030002020401030102020400030002150400030002ff02db040003000215
-040003000202030f02020400030002020401030102020400030002150400030002ff0263
-000302730400030002150400030002020300020d04000202040003000202040103010202
-04000300021504000300021f000602020001020600010206000102060001020500000209
-0004020100010211000102020001025a0002020a000502040004020c0002022f00010205
-00000212000102110001021b0004020d000102080001023a040003000215040003000202
-0300020d0400020204000300020204010301020204000300021504000300021f00010202
-000202010002020400020205000202060002020400000207000202020000020100010211
-000102020001025800010202000102080000020200020203000002020001020900010202
-0001022d00020204000002120001021100010219000102040000020c000102080001023a
-0400030002150400030002020300020d0400020204000300020204010301020204000300
-021504000300021f00010203000102010002020400020205000002000001020500020204
-0000020700010206000102110001020200010258000102020001020d0001020800010208
-000102020001022d00020204000002120001021100010218000002070000020b00010245
-0400030002150400030002020300020d0400020204000300020204010301020204000300
-021504000300021f00010203000102010000020000000203000302050000020000010205
-000002000001020300000203000102010001020600010200000302050003020200010202
-000102080001020000020204000102000001020200040204000402030003020300040203
-0004020f00000201000102040001020c0001020800010207000102040001020000000211
-000402020001020000030209000002000001020300000204000402040002020000010204
-000302070004020200040204000402030000020300030201000002030004020100010200
-00030203000102010001020400000202000402030004021f040003000215040003000202
-0300020d04000202040003000202040103010202040003000202030f020204000300021f
-000102030001020100000200000102020000020000010204000102000001020500000200
-000202020000020300010201000302040002020200010203000102010001020100010202
-000102080002020100010203000202030001020200010202000102060001020100010201
-000102060001021100010202000102040001020b00010209000102070001020400010201
-0001020e0001020200010201000202020001020800000200000202020000020300010202
-000102020001020100020203000102010001020700010203000102020001020200010202
-000102020000020100010202000002010000020200010205000202020001020200010202
-000002040000020200000202000102010001022304000300020803030208040003000202
-0300020d040002020400030002020401030102020400030002020300020d040002020400
-0300021f0001020200010202000002000001020200000200000102040000020200010204
-000002010001020200000208000402020001020300010202000102030001020000010202
-000102080001020300010202000102030001020400010200000102060001020300010200
-000102060001020f0001020400010204000102080002020a000102080001020400010203
-0001020b0001020400010200000102030001020800000201000102020000020200010204
-000102000001020300010202000102030001020600010202000102040001020000010204
-000102000000020200000202000102010000020100010206000102030001020200010202
-000102020000020700010201000102230400030002080300020104000208040003000202
-0300020d040002020400030002020401030102020400030002020300020d040002020400
-0300021f0005020300000201000102000000020100010203000102020001020400000202
-000102010000020a00030201000102030001020200010203000102000001020200010208
-000102030001020200010203000102040001020000010206000102030001020000030204
-0003020a00020206000102040001020b0001020800000209000102040001020500020208
-000102040001020000010203000102080000020200010201000002020001020400010200
-000102030001020200010203000102060001020200010204000102000001020400010200
-000002010000020200010202000002010001020600010203000102020001020200010202
-00000207000102010003022104000300020803000201040002080400030002020300020d
-040002020400030002020401030102020400030002020300040e020204000300021f0001
-020700000201000102000000020100010203000102020002020300000202000202000000
-020c00020200000102030001020200070200000102020001020800010203000102020001
-020300010204000102000001020600070202000302040003020600020208000102040001
-020c000102060000020a0001020400010207000202060001020400010200000102030001
-020800000202000202000000020200010204000102000001020300010202000702060001
-020200010204000102000001020400010200000002010000020100020201000102010001
-02060001020300010202000102030000020100010204000402030003021f040003000208
-0300040202080400030002020300020d0400020204000300020204010301020204000300
-021504000300021f00010207000002010001020000000201000102030007020300000203
-000102000000020d00010200000102030001020200010206000102020001020800010203
-00010202000102030001020400010200000102060001020a000202050002020700020206
-000102040001020c000102050000020b0001020400010205000202080001020400010200
-000102030001020800000203000102000000020200010204000102000001020300010202
-0001020c0001020200010204000102000001020400010200000002010000020100000200
-000002010000020200010206000102030001020200010203000102000000020300020201
-000102050002021e0400030002150400030002020300020d040002020400030002020401
-0301020204000300021504000300021f0001020700000202000102020001020200010204
-00010203000002040002020d000102000001020300010202000102060001020200010208
-0001020300010202000102030001020400010200000102060001020b000102060001020a
-00010205000102020001020d000102040000020d00010202000102040001020b00010204
-000102000001020300010208000002040002020200010204000102000001020300010202
-0001020c0001020200010204000102000001020400010201000002000002020100020203
-00010206000102030001020200010203000102000000020300010202000102060001021e
-0400030002150400030002020300020d0400020204000300020204010301020204000300
-021504000300021f00010207000002020001020200010202000002060001020200000204
-000202030001020100000203000102010001020300010203000102030000020000010202
-000102080002020100010203000102040001020200010202000102020000020200010203
-000002000000020300010201000002030001020c00010203000102020001020300010202
-0000020200010204000102080001020200010202000102020001020e0001020200010201
-000102030001020800000204000202030001020200010202000102010002020300010203
-000002060001020300010202000102020001020200010202000102030000020700010202
-00000201000102030001020200010204000102040001020200010201000002030001021e
-0400030002150400030002020300020d0400020204000300020204010301020204000300
-021504000300021f00010207000002070001020100010206000102020000020500010203
-000102010005020200010203000102050004020000010202000102080001020000020204
-00010205000402040004020400040200000502020005020f000002040002020500010202
-000402050006020300010204000202030000021100040202000102030001020800000205
-000102040004020400020200000102050004020600010204000402040004020500030209
-000402010001020300010202000102040001020500030200000102000005021f04000300
-02150400030002020300020d040002020400030002020401030102020400030002150400
-03000282000102ff02560400030002150400030002020300020d04000202040003000202
-040103010202040003000215040003000282000102ff0256040003000215040003000202
-0300040e0202040003000202040103010202040003000215040003000282000102ff0256
-0400030002150400030002150400030002020401030102020400030002150400030002ff
-02db04000300021504000300021504000300020204010301020204000300021504000300
-02ff02db04000300021504000300021504000300020204010300040403000416030004ff
-04dc030004160300041603000404030500ff00ff00250304040003010202040000ff00ff
-00240700030002020401030102020400000105ff05ff0521070103000202040103010202
-0400000105ff05ff05210701030002020401030102020400000105ff05ff052107010300
-02020401030102020400000105ff05ff05210701030002020401030102020400000105ff
-05ff052107010300020204010301020204000001050b01040504010005030102051f0100
-05020100050401000526010405ff05860100050201000509010205130701030002020401
-0301020204000001050b0100050f0100051f010005020100052e010005ff058801000502
-0100050b0100051307010300020204010301020204000001050b01000506010205050100
-050301020518010005020100050201020503010205020100050201000519010005030100
-0500010105030102050301020503010205ff056b01000502010005020102050501000502
-010005000101050c07010300020204010301020204000001050b01000508010005050100
-050201000502010005180100050001000505010005020100050201000501010005020100
-051901000503010105010100050101000502010005010100050201000501010005020100
-05ff056a0100050201000501010005020100050401000502010105010100050b07010300
-020204010301020204000001050b01030505010005050100050201000502010005180100
-050001000505010005020100050201000501010005000100050001000519010005030100
-0509010005010100050501000502010005ff056a01040501010005020100050401000502
-010005020100050b07010300020204010301020204000001050b01000508010005050100
-050201040518010005000100050501000502010405010100050001000500010005190100
-0503010005060103050101000505010405ff056a01000502010005010104050401000502
-010005020100050b07010300020204010301020204000001050b01000508010005050100
-05020100051d010005060100050201000505010005000100050001000519010005030100
-0505010005020100050101000505010005ff056e01000502010005010100050801000502
-010005020100050b07010300020204010301020204000001050b01000508010005050100
-050201000502010005190100050601000502010005020100050101000500010005000100
-051901000503010005050100050201000501010005020100050101000502010005ff056a
-0100050201000501010005020100050401000502010105010100050b0701030002020401
-0301020204000001050b0100050801000505010005030102051a01000506010005030102
-0503010005000100051a01000503010005060103050201020503010205ff056b01000502
-010005020102050501000502010005000101050c07010300020204010301020204000001
-05ff05ff05100100050f07010300020204010301020204000001050a0106052a0106052a
-010605ff05840106050e0100050f07010300020204010301020204000001050a0106052a
-0106052a010605ff05840106050e0100050f0701030002020401030102020400000105ff
-05ff05210701030002020401030102020400000105ff05ff052107010300020204010301
-02020400000105ff05ff05210701030002020401030102020400000107ff07ff07230300
-02020401030102020400000007ff07ff072403000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
-03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0515
-070f03000202040103010202040005ff05ff0515070f0300020204010301020204000504
-07ff07ff070e05010701060607000605030002020401030102020400050407ff07ff070d
-00000501070106050000070006050300020204010301020204000504070105ff05ff050a
-00010501070106050000070106040300020204010301020204000504070105cf010005ff
-053900010501070106040001070106040300020204010301020204000504070105030100
-050c01000504010005060100050a0102051801020503010205170100050d010205030102
-051f010205120100051501000502010205ff053300010501070106040001050007010603
-030002020401030102020400050407010517010005140100051a01000505010005170100
-050f010005050100052101000512010005140100050201000502010005ff053200010501
-070106030001050107010603030002020401030102020400050407010501010205020100
-050001010503010205020104050201020503010205050100050a01020503010205050100
-0505010005040101050a0102050201000500010105030102050501000505010005040101
-050301020502010005020100050201020505010005020100050201000502010205020104
-050201020502010005000101050501000506010005ff0532000105010701060300010502
-070106020300020204010301020204000504070105030100050201010501010005040100
-050401000506010005020100050201000504010005090100050201000501010005020100
-050401000505010005040101050901000502010005010101050101000501010005020100
-050401000505010005040101050201000502010005010100050201000501010005020100
-050401000502010005020100050101000502010005030100050301000502010005010101
-05010100050301000507010005ff05320001050107010602000105030701060203000202
-040103010202040005040701050301000502010005020100050401000504010005060100
-050601000504010005090100050901000504010005050100051001000505010005020100
-050101000502010005040100050501000509010005020100050101000502010005050100
-050401000502010005020100050501000503010005030100050201000501010005070100
-0505010105ff053300010501070106020001050407010601030002020401030102020400
-050407010503010005020100050201000504010005040100050601000503010305040100
-050901000506010305040100050501000511010205020100050201000501010405040100
-050501000509010405020100050001000503010305040100050201000502010005020103
-05030100050301000502010005010100050601000508010005ff05320001050107010601
-000105050701060103000202040103010202040005040701050301000502010005020100
-050401000504010005060100050201000502010005040100050901000505010005020100
-050401000505010005140100050101000502010005010100050801000505010005090100
-050601000500010005020100050201000504010005020100050201000501010005020100
-05030100050301000502010005010100050601000508010005ff05320001050107010601
-000105060701060003000202040103010202040005040701050301000502010005020100
-050401000504010005060100050201000502010005040100050901000502010005010100
-050201000504010005050100050401010509010005020100050101000502010005010100
-050201000504010005050100050401010502010005020100050301000503010005020100
-050401000502010005010101050101000502010005030100050301000502010005010100
-05050100050501000502010005ff05320001050107010600000105070701060003000202
-040103010202040005040701050301000502010005020100050401000505010105040100
-0503010305040100050a010205030103050401000505010005040101050a010205020100
-050201000502010205050100050501000504010105030102050401000504010305040100
-050301010500010005020103050401010502010205020100050501000506010205ff0533
-0001050107010600000105080701030002020401030102020400050407010530010505ff
-05d30001050107010001070b0300020204010301020204000504070105ff05ff050a0001
-050107010000070c0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701000d03000202
-04010301020204000504070105ff05ff050a000105010701000d03000202040103010202
-04000504070105ff05ff050a0001050107010001050a0700030002020401030102020400
-0504070105ff05ff050a0001050107010001050a07000300020204010301020204000504
-070105ff05ff050a0001050107010001050a070003000202040103010202040005040701
-05ff05ff050a0001050107010001050a07000300020204010301020204000504070105ff
-05ff050a0001050107010001050a07000300020204010301020204000504070105ff05ff
-050a0001050107010001050a07000300020204010301020204000504070105ff05ff050a
-0001050107010001050a07000300020204010301020204000504070105ff05ff050a0001
-050107010001050a07000300020204010301020204000504070105ff05ff050a00010501
-07010001050a07000300020204010301020204000504070105ff05ff050a000105010701
-0001050a07000300020204010301020204000504070105ff05ff050a0001050107010001
-070b0300020204010301020204000504070105ff05ff050a0001050107010000070c0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105eb010005ff051d000105010701060d030002020401030102020400
-05040701052c0100050d0101051801000506010005250100050d010205030102051f0102
-050a0102051b01000502010205ff0517000105010701060d030002020401030102020400
-05040701052c0100050c0100051a0100052d0100050f01000505010005210100050c0100
-051a0100050201000502010005ff0516000105010701060d030002020401030102020400
-050407010501010205020100050201000501010005000101050201000500010105030102
-050201000500010105020104050a01000503010005020100050101000500010105030102
-050201040502010205030102050201000500010105040101050a01020502010005000101
-050301020505010005050100050401010503010205020100050201000502010205050100
-050c010005030102050301020502010005000101050501000506010005ff051600010501
-0701060d0300020204010301020204000504070105000100050201000501010005020100
-050101010501010005010101050101000501010005020100050101010501010005030100
-050a01040501010005020100050101010501010005010100050201000503010005060100
-050201000502010005010101050101000503010105090100050201000501010105010100
-050101000502010005040100050501000504010105020100050201000501010005020100
-050101000502010005040100050c01000502010005020100050101000502010005010101
-05010100050301000507010005ff0516000105010701060d030002020401030102020400
-050407010500010005050100050201000501010005050100050501000502010005010100
-0502010005030100050c0100050301000502010005010100050201000501010005070100
-0506010005020100050201000501010005020100050f0100050501000502010005010100
-050201000504010005050100050901000502010005010100050201000505010005040100
-050c01000502010005020100050101000502010005010100050201000503010005060100
-05ff0517000105010701060d030002020401030102020400050407010500010005050100
-05020100050101000505010005050104050101000502010005030100050c010005030100
-050201000501010005020100050101000507010005060100050201000502010005010100
-050201000510010205020100050201000501010405040100050501000509010405020100
-050001000503010305040100050c01000502010005020100050101000502010005010100
-05020100050201000506010005ff0518000105010701060d030002020401030102020400
-050407010500010005050100050201000501010005050100050501000505010005020100
-05030100050c010005030100050201000501010005020100050101000507010005060100
-050201000502010005010100050201000513010005010100050201000501010005080100
-05050100050901000506010005000100050201000502010005040100050c010005020100
-0502010005010100050201000501010005020100050201000505010005ff051900010501
-0701060d0300020204010301020204000504070105000100050201000501010005010101
-05010100050501000505010005020100050101000502010005030100050c010005030100
-050101010501010005020100050101000502010005030100050601000502010005020100
-050101000502010005030101050901000502010005010100050201000501010005020100
-050401000505010005040101050201000502010005030100050301000502010005040100
-050c01000502010005020100050101000502010005010101050101000501010005050100
-05ff051a000105010701060d030002020401030102020400050407010501010205030101
-05000100050101000505010005060102050201000502010005040101050a010005040101
-050001000501010005020100050201020505010105040100050301020502010005020100
-05030101050a010205020100050201000502010205050100050501000504010105030102
-050401000504010305040100050c01000503010205030102050201000500010105020100
-0505010405ff0516000105010701060d0300020204010301020204000504070105300105
-058c01050516010005ff0528000105010701060d03000202040103010202040005040701
-05e0010005ff0528000105010701060d0300020204010301020204000504070105e00100
-05ff0528000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
-05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
-05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-0504070105000100052b0100051f01020503010205ff05b1000105010701060d03000202
-04010301020204000504070105000100054b010005020100050101000502010005ff05b0
-000105010701060d03000202040103010202040005040701050001000500010105030102
-050301020502010005000101050a01020503010205020104050201020504010105090100
-05020100050101000502010005ff05b0000105010701060d030002020401030102020400
-050407010500010105010100050101000502010005010100050201000501010105010100
-050801000502010005040100050601000501010005020100050301010509010005020100
-050101000502010005ff05b0000105010701060d03000202040103010202040005040701
-050001000502010005010100050201000505010005010100050201000508010005080100
-050501000502010005020100051001020503010305ff05b0000105010701060d03000202
-040103010202040005040701050001000502010005010104050201030501010005020100
-05090102050501000504010005030104050f0100050201000505010005ff05b000010501
-0701060d0300020204010301020204000504070105000100050201000501010005050100
-050201000501010005020100050c01000504010005030100050401000513010005020100
-0505010005ff05b0000105010701060d0300020204010301020204000504070105000100
-050201000501010005020100050101000502010005010101050101000508010005020100
-050401000502010005050100050201000503010105090100050201000501010005020100
-05ff05b0000105010701060d030002020401030102020400050407010500010005020100
-05020102050301030501010005000101050a010205050100050201040502010205040101
-050a01020503010205ff05b1000105010701060d03000202040103010202040005040701
-051501000504010505ff05e8000105010701060d03000202040103010202040005040701
-0515010005ff05f3000105010701060d0300020204010301020204000504070105150100
-05ff05f3000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
-05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
-05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
-05040701050901000511010005160100051e01040502010205ff05aa000105010701060d
-030002020401030102020400050407010509010005110100053601000505010005020100
-05ff05a9000105010701060d030002020401030102020400050407010501010205020104
-05020102050301020502010005010100050a010205030102050201040502010205040101
-050901000509010005ff05a9000105010701060d03000202040103010202040005040701
-050001000502010005030100050301000502010005010100050201000501010005000100
-050a01000502010005040100050601000501010005020100050301010509010305060100
-05ff05a9000105010701060d030002020401030102020400050407010500010005070100
-050701000501010005050101050b01000508010005050100050201000502010005130100
-0503010105ff05aa000105010701060d0300020204010301020204000504070105010102
-05040100050401030501010005050101050c010205050100050401000503010405130100
-0505010005ff05a9000105010701060d0300020204010301020204000504070105040100
-050301000503010005020100050101000505010005000100050e01000504010005030100
-0504010005130100050201000505010005ff05a9000105010701060d0300020204010301
-020204000504070105000100050201000503010005030100050201000501010005020100
-050101000501010005090100050201000504010005020100050501000502010005030101
-0509010005020100050101000502010005ff05a9000105010701060d0300020204010301
-020204000504070105010102050501010502010305020102050201000502010005090102
-05050100050201040502010205040101050a01020503010205ff05aa000105010701060d
-030002020401030102020400050407010522010505ff05e1000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-040103010202040005040701051201000511010005060100052601020503010205ff05aa
-000105010701060d030002020401030102020400050407010512010005110100052d0100
-05020100050101000502010005ff05a9000105010701060d030002020401030102020400
-050407010500010005000101050301020503010105000100050101000502010005020102
-05020104050201020503010205020100050001010503010205040101050d010005010100
-05ff05ad000105010701060d030002020401030102020400050407010500010105010100
-050101000502010005010100050101010501010005020100050101000502010005030100
-0506010005020100050201000501010105010100050101000502010005030101050d0100
-0501010005ff05ad000105010701060d0300020204010301020204000504070105000100
-050501000502010005010100050201000501010005020100050101000507010005060100
-0502010005020100050101000502010005010100051601000502010305ff05aa00010501
-0701060d0300020204010301020204000504070105000100050501040501010005020100
-050101000502010005010100050701000506010005020100050201000501010005020100
-0502010205120100050301000502010005ff05a9000105010701060d0300020204010301
-020204000504070105000100050501000505010005020100050101000502010005010100
-050701000506010005020100050201000501010005020100050501000510010005040100
-0502010005ff05a9000105010701060d0300020204010301020204000504070105000100
-050501000502010005010100050101010501010005010101050101000502010005030100
-050601000502010005020100050101000502010005010100050201000503010105090100
-050501000502010005ff05a9000105010701060d03000202040103010202040005040701
-050001000506010205030101050001000502010105000100050201020505010105040100
-0503010205020100050201000502010205040101050901040502010205ff05aa00010501
-0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
-050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
-050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
-050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d030002020401030102020400050407010532010305ff05d3000105010701060d
-03000202040103010202040005040701050101020505010005090100051b010005ff05d6
-000105010701060d030002020401030102020400050407010503010005100100051b0100
-05ff05d6000105010701060d030002020401030102020400050407010503010005030102
-050201000500010105020100050101000503010205040101050a010005ff05d600010501
-0701060d0300020204010301020204000504070105030100050501000502010105010100
-0501010005000100050301000502010005030101050a010005ff05d6000105010701060d
-030002020401030102020400050407010503010005050100050201000502010005010101
-050401000514010005ff05d6000105010701060d03000202040103010202040005040701
-0503010005050100050201000502010005010101050501020511010005ff05d600010501
-0701060d0300020204010301020204000504070105030100050501000502010005020100
-0501010005000100050701000510010005ff05d6000105010701060d0300020204010301
-020204000504070105030100050501000502010005020100050101000501010005020100
-0502010005030101050a010005ff05d6000105010701060d030002020401030102020400
-050407010503010005050100050201000502010005010100050201000502010205040101
-050a010005ff05d6000105010701060d0300020204010301020204000504070105320103
-05ff05d3000105010701060d0300020204010301020204000504070105ff05ff050a0001
-05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
-0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
-0301020204000504070105120100052a01000506010305ff05bf000105010701060d0300
-02020401030102020400050407010511010005040101050a010205030102050b01010502
-01000508010005ff05bf000105010701060d030002020401030102020400050407010510
-010005040100050101000508010005020100050101000502010005090100050101000502
-01000507010005ff05bf000105010701060d03000202040103010202040005040701050f
-01000505010005010100050c0100050501000509010005010100050301000506010005ff
-05bf000105010701060d03000202040103010202040005040701050e0100050601000501
-0100050c0100050501000509010005010100050401000505010005ff05bf000105010701
-060d03000202040103010202040005040701050d01000507010005010100050b01000504
-0101050a010005010100050501000504010005ff05bf000105010701060d030002020401
-03010202040005040701050e01000506010005010100050a010005070100050901000501
-0100050401000505010005ff05bf000105010701060d0300020204010301020204000504
-0701050f0100050501000501010005090100050801000509010005010100050301000506
-010005ff05bf000105010701060d03000202040103010202040005040701051001000504
-010005010100050301010502010005050100050201000503010105030100050101000502
-01000507010005ff05bf000105010701060d030002020401030102020400050407010511
-0100050401010504010105020104050201020504010105040101050201000508010005ff
-05bf000105010701060d0300020204010301020204000504070105120100052a01000506
-010305ff05bf000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
-060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
-05ff05ff050a000105010701060d03000202040103010202040005040701050201000530
-010005040100051401010509010205ff05aa000105010701060d03000202040103010202
-040005040701050201000536010005130100050d010005ff05aa000105010701060d0300
-020204010301020204000504070105000104050101000500010105030102050201000500
-0101050a01020502010005020100050201020502010405030101050b0100050401020505
-0100050301020503010205ff059c000105010701060d0300020204010301020204000504
-070105020100050301010501010005010100050201000501010105010100050801000502
-010005010100050201000504010005040100050501010509010405010100050201000504
-01000502010005020100050101000502010005ff059b000105010701060d030002020401
-030102020400050407010502010005030100050901000501010005020100050801000502
-010005020100050001000505010005040100051301000507010005040100050201000505
-01000502010005ff059b000105010701060d030002020401030102020400050407010502
-010005030100050601030501010005020100050801040503010005060100050401000513
-01000504010305040100050301020502010405ff059b000105010701060d030002020401
-030102020400050407010502010005030100050501000502010005010100050201000508
-010005060100050001000505010005040100051301000503010005020100050401000506
-01000501010005ff059f000105010701060d030002020401030102020400050407010502
-010005030100050501000502010005010101050101000508010005020100050101000502
-0100050401000504010005050101050b0100050301000502010005040100050201000502
-0100050101000502010005ff059b000105010701060d0300020204010301020204000504
-07010503010105010100050601030501010005000101050a010205020100050201000504
-01000505010105030101050b01000504010305040100050301020503010205ff059c0001
-05010701060d03000202040103010202040005040701051501000504010505ff05e80001
-05010701060d030002020401030102020400050407010515010005ff05f3000105010701
-060d030002020401030102020400050407010515010005ff05f3000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
-050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
-050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
-020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
-020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
-0701057301010597010105350101053501010540010105190101050b0101050401010516
-000105010701060d0300020204010301020204000504070105040100052a010005400100
-05540100052a010005160100052e0103050301000536010005440100050b010305010103
-050401000503010305040100050501000515000105010701060d03000202040103010202
-0400050407010503010005040101050a010205030102050b010105020100053f0100050a
-0100050d010205030102051b01000512010005040101050a010205030102050b01010502
-0100051501000519010205110100050601000512010205030102050b0100050c0100050c
-0100051a0100050b0102050b0100050b0100050701000504010005060100050401000505
-01000515000105010701060d030002020401030102020400050407010502010005040100
-0501010005080100050201000501010005020100050901000501010005020100053e0100
-050a0100050f010005050100051b01000511010005040100050101000508010005020100
-050101000502010005090100050101000502010005140100051b01000511010005060100
-0514010005050100050a0101050c0100050c010005190101050d0100050b0100050b0100
-05070100050401000506010005040100050501000515000105010701060d030002020401
-03010202040005040701050101000505010005010100050c010005050100050901000501
-010005030100050501010509010005000101050301020503010205190100050401020502
-010005000101050301020505010005050100050a01020502010105000100050301010500
-0100051001000505010005010100050c0100050501000509010005010100050301000513
-010005040102050201000502010005020102050501000511010005060100050401020503
-010205050100050501000509010005000100050c01000504010205020104050201020502
-0101050001000509010005000100050d01000503010205040100050b0100050701000504
-01000506010005040100050501000515000105010701060d030002020401030102020400
-05040701050001000506010005010100050c010005050100050901000501010005040100
-050401010509010105010100050101000502010005010100050201000518010005030100
-050201000501010105010100050101000502010005040100050501000509010005020100
-0501010005000100050001000501010005010101050f01000506010005010100050c0100
-050501000509010005010100050401000512010005030100050201000501010005020100
-050101000502010005040100051101000506010005030100050201000501010005020100
-0504010005050100050b0100050c01000503010005020100050301000503010005020100
-050101000500010005000100050a0100050d0100050201000502010005030100050b0100
-05070100050401000506010005040100050501000515000105010701060d030002020401
-0301020204000504070101000507010005010100050a010105050100050a010005010100
-05050100050f0100050501000502010005010100051a0101050401000505010005020100
-050101000502010005040100050501000509010005050100050001000500010005010100
-05020100050e01000507010005010100050b010005040101050a01000501010005050100
-050f01010504010005020100050101000502010005050100050401000511010005040101
-05040100050901000504010005050100050b0100050a0101050801000503010005030100
-05020100050101000500010005000100050a0100050d0100050201000508010105090100
-05070100050501010504010005050101050401010513000105010701060d030002020401
-03010202040005040701050001000506010005010100050c010005030100050b01000501
-010005040100051001000505010405010100051c01000504010205020100050201000501
-01040504010005050100050901000505010005000100050001000501010005020100050f
-01000506010005010100050a010005070100050901000501010005040100051201000503
-010405020100050001000503010305040100051101000506010005030100050601030504
-010005050100050b0100050c010005040103050301000503010005020100050101000500
-010005000100050a0100050d01000503010205040100050b010005070100050401000506
-010005040100050501000515000105010701060d03000202040103010202040005040701
-050101000505010005010100050c010005020100050c0100050101000503010005110100
-0505010005050100051c0100050701000501010005020100050101000508010005050100
-050901000505010005000100050001000501010005020100051001000505010005010100
-050901000508010005090100050101000503010005130100050301000506010005000100
-050201000502010005040100051101000506010005030100050501000502010005040100
-05050100050b0100050c0100050301000502010005030100050301000502010005010100
-0500010005000100050a0100050d01000506010005030100050b01000507010005040100
-0506010005040100050501000515000105010701060d0300020204010301020204000504
-070105020100050401000501010005030101050201000502010005010100050701010503
-010005010100050201000506010105090100050501000502010005010100050201000518
-010005030100050201000501010005020100050101000502010005040100050501000509
-010005020100050101000500010005000100050101000501010105030101050b01000504
-010005010100050301010502010005050100050201000503010105030100050101000502
-010005060101050b01000503010005020100050301000503010005020100050401000504
-0101050a0100050601000503010005020100050101000502010005040100050501000504
-010105040100050501010504010005030100050201000503010005030100050201000501
-010005000100050001000503010105040100050501010505010005020100050201000503
-010005050101050301000507010005040100050601000504010005050100051500010501
-0701060d0300020204010301020204000504070105030100050401010504010105030102
-050201040503010105040101050201000507010105090100050601020503010205190100
-050401020502010005020100050201020505010005050100050a01020502010005000100
-05000100050201010500010005030101050c010005040101050401010502010405020102
-05040101050401010502010005070101050b010005040102050401000504010305040100
-05040101050a010005060100050401020503010305040100050501000504010105020104
-050301010504010005040103050401010502010205020100050001000500010005030101
-050201040503010105050100050301020504010005050101050301000507010005040100
-0506010005040100050501000515000105010701060d0300020204010301020204000504
-070105040100052a0100054001000525010505190100050d0100052a010005090100050b
-010005220100050a01030503010005220100050c01000504010005220100050c01000512
-010005060100050301030501010305040100050301030504010005050100051500010501
-0701060d03000202040103010202040005040701057301010541010105430101050d0101
-051e010105140101051e0101050b010105060101051e0101050b01010511010105050101
-05110101050b0101050401010516000105010701060d0300020204010301020204000504
-070105ff05ff050a000105010701060d0300020204010301020204000504070105ff0506
-0101055f010105630101051501010521000105010701060d030002020401030102020400
-0504070105040100052a0100051d010005b401000506010005040100053e010005120100
-05070100052a0100051501000501010005180100051301000523000105010701060d0300
-02020401030102020400050407010503010005040101050a010205030102050b01010502
-0100051c0100051f010405280100053f010005030100051f01000506010005030102052d
-01020503010205050100051201000506010005040101050a010205030102050b01010502
-0100051401000501010005010103050c010105030100051301000523000105010701060d
-030002020401030102020400050407010502010005040100050101000508010005020100
-0501010005020100050901000501010005020100051b010005210100052a0100053f0100
-05030100051f010005050100050301000500010005000100052e01000505010005040100
-051301000505010005040100050101000508010005020100050101000502010005090100
-050101000502010005130100050101000501010005020100050a01000505010005130100
-0523000105010701060d0300020204010301020204000504070105010100050501000501
-0100050c0100050501000509010005010100050301000505010105120100052101000504
-010205040101050a010205030102050301010500010005020102050a0102050301020502
-010005000101050201000502010005020102050201000500010105080101050101010502
-0102050301010500010005030101050b0100050401000504010005000100050401010500
-0100050201020502010005000101050a0102050301020505010005050100050301000514
-0100050401000505010005010100050c0100050501000509010005010100050301000511
-010505000100050201000502010205040100050501000513010005040102050201000500
-01010503010205020100050201000501010005000101000105010701060d030002020401
-03010202040005040701050001000506010005010100050c010005050100050901000501
-010005040100050401010512010005210100050301000502010005030101050901000502
-010005010100050201000501010005010101050101000502010005080100050201000501
-010005020100050101010501010005010100050201000501010005020100050101010501
-010005070101050101010501010005020100050101000501010105030101050b0100050a
-010005000100050301000501010105010100050201000501010105010100050801000502
-01000501010005020100050401000505010005190100050301000506010005010100050c
-010005050100050901000501010005040100051101000501010005010100050201000501
-010005020100050101040503010005130100050301000502010005010101050101000501
-0100050201000501010005020100050101010501000105010701060d0300020204010301
-020204000504070101000507010005010100050a010105050100050a0100050101000505
-010005180100052101000503010005020100050f01000505010005020100050101000502
-010005010100050201000508010005050100050201000501010005050100050201000501
-01000502010005010100050b01000500010105000100050101000505010005020100050f
-0101050c0102050201000502010005010100050201000501010005020100050801000509
-0100050401000505010005170101050301000507010005010100050a010105050100050a
-01000501010005050100050f010005010100050201030502010005020100050301000506
-0101050f0101050401000502010005010100050201000501010005050100050201000501
-01000502000105010701060d030002020401030102020400050407010500010005060100
-05010100050c010005030100050b01000501010005040100051901000521010005030100
-05020100050f010005050100050201000501010005020100050101040509010205020104
-0501010005060100050001000502010405010100050b0100050001010500010005020102
-050201000502010005110100050c01000500010005010100050201000501010405010100
-050201000508010005060103050401000505010005190100050301000506010005010100
-050c010005030100050b01000501010005040100050f0105050101000501010005020104
-050301000505010005130100050301040501010005020100050201020502010005020100
-050101000502000105010701060d03000202040103010202040005040701050101000505
-010005010100050c010005020100050c01000501010005030100053d0100050301000502
-0100050f0100050501000502010005010100050201000501010005100100050101000505
-010005060100050001000502010005050100050b01000503010005050100050101000502
-010005110100050c01000500010005010100050201000501010005050100050201000508
-01000505010005020100050401000505010005190100050401000505010005010100050c
-010005020100050c01000501010005030100051101000501010005020100050201000501
-010005070100050501000513010005030100050501000502010005050100050101000502
-0100050101000502000105010701060d0300020204010301020204000504070105020100
-050401000501010005030101050201000502010005010100050701010503010005010100
-050201000506010105350100050301000502010005030101050901000502010005010100
-050201000501010005010101050101000502010005080100050201000501010005020100
-0501010005070100050301000502010005010100050b0100050301000501010005020100
-050101000501010105030101050b0100050a010005000100050001000501010005010101
-050101000502010005010100050201000508010005020100050101000502010005040100
-05050100050b0101050b0100050501000504010005010100050301010502010005020100
-050101000507010105030100050101000502010005060101050901000501010005020100
-050201000501010005020100050301000505010005050101050b01000503010005020100
-050101000502010005010100050201000501010005010101050101000502000105010701
-060d03000202040103010202040005040701050301000504010105040101050301020502
-01040503010105040101050201000507010105120100052101000504010205040101050a
-010205030102050301010500010005020102050a01020503010205020100050701000504
-010205020100050b01000503010005020102050301010500010005030101050b0100050b
-010205030101050001000502010205020100050201000509010205030103050401000505
-0100050b0101050b01000506010005040101050401010503010205020104050301010504
-010105020100050701010509010005010100050201000502010005020102050401000505
-010005050101050b01000504010205020100050201000502010205030101050001000501
-01000502000105010701060d0300020204010301020204000504070105040100052a0100
-057501050544010005110100050c010005070100050e010505270100050b010005070100
-052a0100050901000527010005060100050b01000523000105010701060d030002020401
-0301020204000504070105ee01000502010005120101050f010005020100053a0101050d
-0101053a01010526010105050101050d01010521000105010701060d0300020204010301
-020204000504070105ef01020526010205ed000105010701060d03000202040103010202
-04000504070105730101052e0101058d01010504010105cc000105010701060d03000202
-04010301020204000504070105040100052a010005400100050401000501010005260100
-059101000505010005cb000105010701060d030002020401030102020400050407010503
-010005040101050a010205030102050b010105020100053f010005040100050101000501
-0103050c010105110100051501000509010205260102050c0100050b0100052001020504
-01000505010005cb000105010701060d0300020204010301020204000504070105020100
-050401000501010005080100050201000501010005020100050901000501010005020100
-053e010005040100050101000501010005020100050a01000513010005150100050b0100
-052801000519010005220100050401000505010005cb000105010701060d030002020401
-03010202040005040701050101000505010005010100050c010005050100050901000501
-010005030100050501010509010005000101050301020503010205190100050301050500
-010005020100050201020504010005130100050301010500010005030102050301010500
-01000501010005020100050401000503010205110102050201000500010105050100050a
-010205020100050001010502010405020102050201000500010105020100050001010503
-010205050100050401000505010005cb000105010701060d030002020401030102020400
-05040701050001000506010005010100050c010005050100050901000501010005040100
-050401010509010105010100050101000502010005010100050201000518010005040100
-050101000501010005020100050101000502010005010104051101000503010005000100
-050001000501010005020100050101000501010105010100050201000504010005020100
-05020100050f010005020100050101010501010005040100050c01000502010105010100
-050301000503010005020100050101010501010005010101050101000501010005020100
-05040100050401000505010005cb000105010701060d0300020204010301020204000504
-070101000507010005010100050a010105050100050a01000501010005050100050f0100
-050501000502010005010100051a01010504010005010100050201030502010005020100
-050301000511010105040100050001000500010005010100050201000501010005020100
-0501010005020100050401000502010005020100050f0100050201000501010005080100
-050c01000502010005020100050301000503010005020100050101000505010005020100
-0505010005040100050501010504010105c9000105010701060d03000202040103010202
-040005040701050001000506010005010100050c010005030100050b0100050101000504
-0100051001000505010405010100051c0100050201050501010005010100050201040503
-010005130100050301000500010005000100050101000502010005010100050201000501
-0100050201000504010005020104050f01040501010005080100050c0100050201000502
-010005030100050301040501010005050100050201000502010305040100050401000505
-010005cb000105010701060d030002020401030102020400050407010501010005050100
-05010100050c010005020100050c01000501010005030100051101000505010005050100
-051c01000503010005010100050201000502010005010100050701000513010005030100
-050001000500010005010100050201000501010005020100050101000502010005040100
-05020100051301000505010005080100050c010005020100050201000503010005030100
-050501000505010005020100050101000502010005040100050401000505010005cb0001
-05010701060d030002020401030102020400050407010502010005040100050101000503
-010105020100050201000501010005070101050301000501010005020100050601010509
-010005050100050201000501010005020100051801000503010005010100050201000502
-010005010100050201000503010005050101050b01000503010005000100050001000501
-010005020100050101000501010105010100050101010504010005020100050201000503
-010105090100050201000501010005080100050c01000502010005020100050301000503
-010005020100050101000505010005020100050101000502010005040100050401000505
-010005cb000105010701060d030002020401030102020400050407010503010005040101
-050401010503010205020104050301010504010105020100050701010509010005060102
-050301020519010005030100050101000502010005020100050201020504010005050101
-050b01000503010005000100050001000502010205030101050001000502010105000100
-050401000503010205040101050a01020502010005080100050c01000502010005020100
-050401010502010205020100050501000502010005020103050401000504010005050100
-05cb000105010701060d0300020204010301020204000504070105040100052a01000540
-010005220100050b010005300100051d0105053b01000505010005cb000105010701060d
-0300020204010301020204000504070105730101051e0101050d0101052c0101055e0101
-0504010105cc000105010701060d0300020204010301020204000504070105ff05ff050a
-000105010701060d0300020204010301020204000504070105ff05060101055f01010563
-0101051501010521000105010701060d0300020204010301020204000504070105040100
-052a0100051d010005b401000506010005040100053e01000512010005070100052a0100
-051501000501010005180100051301000523000105010701060d03000202040103010202
-0400050407010503010005040101050a010205030102050b010105020100051c0100051f
-010405280100053f010005030100051f01000506010005030102052d0102050301020505
-0100051201000506010005040101050a010205030102050b010105020100051401000501
-010005010103050c010105030100051301000523000105010701060d0300020204010301
-020204000504070105020100050401000501010005080100050201000501010005020100
-050901000501010005020100051b010005210100052a0100053f010005030100051f0100
-05050100050301000500010005000100052e010005050100050401000513010005050100
-050401000501010005080100050201000501010005020100050901000501010005020100
-05130100050101000501010005020100050a010005050100051301000523000105010701
-060d03000202040103010202040005040701050101000505010005010100050c01000505
-01000509010005010100050301000505010105120100052101000504010205040101050a
-010205030102050301010500010005020102050a01020503010205020100050001010502
-010005020100050201020502010005000101050801010501010105020102050301010500
-010005030101050b01000504010005040100050001000504010105000100050201020502
-010005000101050a01020503010205050100050501000503010005140100050401000505
-010005010100050c01000505010005090100050101000503010005110105050001000502
-010005020102050401000505010005130100050401020502010005000101050301020502
-0100050201000501010005000101000105010701060d0300020204010301020204000504
-0701050001000506010005010100050c0100050501000509010005010100050401000504
-010105120100052101000503010005020100050301010509010005020100050101000502
-010005010100050101010501010005020100050801000502010005010100050201000501
-010105010100050101000502010005010100050201000501010105010100050701010501
-01010501010005020100050101000501010105030101050b0100050a0100050001000503
-010005010101050101000502010005010101050101000508010005020100050101000502
-0100050401000505010005190100050301000506010005010100050c0100050501000509
-010005010100050401000511010005010100050101000502010005010100050201000501
-010405030100051301000503010005020100050101010501010005010100050201000501
-010005020100050101010501000105010701060d03000202040103010202040005040701
-01000507010005010100050a010105050100050a01000501010005050100051801000521
-01000503010005020100050f010005050100050201000501010005020100050101000502
-010005080100050501000502010005010100050501000502010005010100050201000501
-0100050b01000500010105000100050101000505010005020100050f0101050c01020502
-010005020100050101000502010005010100050201000508010005090100050401000505
-010005170101050301000507010005010100050a010105050100050a0100050101000505
-0100050f0100050101000502010305020100050201000503010005060101050f01010504
-010005020100050101000502010005010100050501000502010005010100050200010501
-0701060d03000202040103010202040005040701050001000506010005010100050c0100
-05030100050b0100050101000504010005190100052101000503010005020100050f0100
-050501000502010005010100050201000501010405090102050201040501010005060100
-050001000502010405010100050b01000500010105000100050201020502010005020100
-05110100050c010005000100050101000502010005010104050101000502010005080100
-05060103050401000505010005190100050301000506010005010100050c010005030100
-050b01000501010005040100050f01050501010005010100050201040503010005050100
-051301000503010405010100050201000502010205020100050201000501010005020001
-05010701060d03000202040103010202040005040701050101000505010005010100050c
-010005020100050c01000501010005030100053d01000503010005020100050f01000505
-010005020100050101000502010005010100051001000501010005050100050601000500
-01000502010005050100050b01000503010005050100050101000502010005110100050c
-010005000100050101000502010005010100050501000502010005080100050501000502
-0100050401000505010005190100050401000505010005010100050c010005020100050c
-010005010100050301000511010005010100050201000502010005010100050701000505
-010005130100050301000505010005020100050501000501010005020100050101000502
-000105010701060d03000202040103010202040005040701050201000504010005010100
-050301010502010005020100050101000507010105030100050101000502010005060101
-053501000503010005020100050301010509010005020100050101000502010005010100
-050101010501010005020100050801000502010005010100050201000501010005070100
-050301000502010005010100050b01000503010005010100050201000501010005010101
-05030101050b0100050a0100050001000500010005010100050101010501010005020100
-0501010005020100050801000502010005010100050201000504010005050100050b0101
-050b01000505010005040100050101000503010105020100050201000501010005070101
-050301000501010005020100050601010509010005010100050201000502010005010100
-05020100050301000505010005050101050b010005030100050201000501010005020100
-05010100050201000501010005010101050101000502000105010701060d030002020401
-030102020400050407010503010005040101050401010503010205020104050301010504
-0101050201000507010105120100052101000504010205040101050a0102050301020503
-01010500010005020102050a01020503010205020100050701000504010205020100050b
-01000503010005020102050301010500010005030101050b0100050b0102050301010500
-010005020102050201000502010005090102050301030504010005050100050b0101050b
-010005060100050401010504010105030102050201040503010105040101050201000507
-01010509010005010100050201000502010005020102050401000505010005050101050b
-010005040102050201000502010005020102050301010500010005010100050200010501
-0701060d0300020204010301020204000504070105040100052a01000575010505440100
-05110100050c010005070100050e010505270100050b010005070100052a010005090100
-0527010005060100050b01000523000105010701060d0300020204010301020204000504
-070105ee01000502010005120101050f010005020100053a0101050d0101053a01010526
-010105050101050d01010521000105010701060d03000202040103010202040005040701
-05ef01020526010205ed000105010701060d030002020401030102020400050407010573
-0101052e0101059401010504010105c5000105010701060d030002020401030102020400
-0504070105040100052a0100054001000504010005010100052601000598010005050100
-05c4000105010701060d030002020401030102020400050407010503010005040101050a
-010205030102050b010105020100053f0100050401000501010005010103050c01010511
-01000515010005090102051e0100050d010205030102050d0100050b0101051001020504
-0100050501000505010005c4000105010701060d03000202040103010202040005040701
-050201000504010005010100050801000502010005010100050201000509010005010100
-05020100053e010005040100050101000501010005020100050a01000513010005150100
-050b0100051e0100050f010005050100050d0100050a0100051401000504010005050100
-0505010005c4000105010701060d03000202040103010202040005040701050101000505
-010005010100050c01000505010005090100050101000503010005050101050901000500
-010105030102050301020519010005030105050001000502010005020102050401000513
-010005030101050001000503010205030101050001000501010005020100050401000503
-0102051101020502010005000101050301020505010005050100050a0101050001000502
-0102050401000504010205020100050201000504010005020104050301000505010005c4
-000105010701060d03000202040103010202040005040701050001000506010005010100
-050c01000505010005090100050101000504010005040101050901010501010005010100
-050201000501010005020100051801000504010005010100050101000502010005010100
-050201000501010405110100050301000500010005000100050101000502010005010100
-050101010501010005020100050401000502010005020100050f01000502010005010101
-050101000501010005020100050401000505010005090100050101010501010005020100
-050101040501010005020100050101000502010005040100050401000505010005050100
-05c4000105010701060d0300020204010301020204000504070101000507010005010100
-050a010105050100050a01000501010005050100050f0100050501000502010005010100
-051a01010504010005010100050201030502010005020100050301000511010105040100
-050001000500010005010100050201000501010005020100050101000502010005040100
-0502010005020100050f0100050501000502010005010100050201000504010005050100
-050901000502010005010100050201000503010005070100050101000502010005040100
-05040100050601010504010105c2000105010701060d0300020204010301020204000504
-0701050001000506010005010100050c010005030100050b010005010100050401000510
-01000505010405010100051c010005020105050101000501010005020104050301000513
-010005030100050001000500010005010100050201000501010005020100050101000502
-010005040100050201040510010205020100050201000501010405040100050501000509
-010005020100050101040503010005040103050101000502010005040100050401000505
-01000505010005c4000105010701060d0300020204010301020204000504070105010100
-0505010005010100050c010005020100050c010005010100050301000511010005050100
-05050100051c010005030100050101000502010005020100050101000507010005130100
-050301000500010005000100050101000502010005010100050201000501010005020100
-050401000502010005170100050101000502010005010100050801000505010005090100
-050201000501010005070100050301000502010005010100050201000504010005040100
-050501000505010005c4000105010701060d030002020401030102020400050407010502
-010005040100050101000503010105020100050201000501010005070101050301000501
-010005020100050601010509010005050100050201000501010005020100051801000503
-010005010100050201000502010005010100050201000503010005050101050b01000503
-010005000100050001000501010005020100050101000501010105010100050101010504
-010005020100050201000503010105090100050201000501010005020100050101000502
-010005040100050501000509010005010101050101000502010005030100050301000502
-010005010100050101010504010005040100050501000505010005c4000105010701060d
-030002020401030102020400050407010503010005040101050401010503010205020104
-050301010504010105020100050701010509010005060102050301020519010005030100
-050101000502010005020100050201020504010005050101050b01000503010005000100
-050001000502010205030101050001000502010105000100050401000503010205040101
-050a01020502010005020100050201020505010005050100050a01010500010005020102
-050401000504010305020101050001000504010005050101050301000505010005c40001
-05010701060d0300020204010301020204000504070105040100052a0100054001000522
-0100050b010005300100052b0105053401000505010005c4000105010701060d03000202
-04010301020204000504070105730101051e0101050d0101052c01010565010105040101
-05c5000105010701060d0300020204010301020204000504070105ff05ff050a00010501
-0701060d0300020204010301020204000504070105ff05060101055f0101056301010515
-01010521000105010701060d0300020204010301020204000504070105040100052a0100
-051d010005b401000506010005040100053e01000512010005070100052a010005150100
-0501010005180100051301000523000105010701060d0300020204010301020204000504
-07010503010005040101050a010205030102050b010105020100051c0100051f01040519
-010105040100050301020540010005030100051f01000506010005030102052d01020503
-010205050100051201000506010005040101050a010205030102050b0101050201000514
-01000501010005010103050c010105030100051301000504010205050100050b01000507
-000105010701060d03000202040103010202040005040701050201000504010005010100
-05080100050201000501010005020100050901000501010005020100051b010005210100
-051a0100050d01000540010005030100051f010005050100050301000500010005000100
-052e01000505010005040100051301000505010005040100050101000508010005020100
-050101000502010005090100050101000502010005130100050101000501010005020100
-050a0100050501000513010005060100051201000507000105010701060d030002020401
-03010202040005040701050101000505010005010100050c010005050100050901000501
-0100050301000505010105120100052101000504010205040101050b0100050401020505
-010005030102050a01020503010205020100050001010502010005020100050201020502
-010005000101050801010501010105020102050301010500010005030101050b01000504
-010005040100050001000504010105000100050201020502010005000101050a01020503
-010205050100050501000503010005140100050401000505010005010100050c01000505
-010005090100050101000503010005110105050001000502010005020102050401000505
-010005130100050601000503010205030102050201040505000105010701060d03000202
-040103010202040005040701050001000506010005010100050c01000505010005090100
-050101000504010005040101051201000521010005030100050201000503010105090104
-050401000505010005020100050201000508010005020100050101000502010005010101
-050101000501010005020100050101000502010005010101050101000507010105010101
-0501010005020100050101000501010105030101050b0100050a01000500010005030100
-050101010501010005020100050101010501010005080100050201000501010005020100
-050401000505010005190100050301000506010005010100050c01000505010005090100
-050101000504010005110100050101000501010005020100050101000502010005010104
-050301000513010005060100050501000502010005020100050301000507000105010701
-060d0300020204010301020204000504070101000507010005010100050a010105050100
-050a01000501010005050100051801000521010005030100050201000511010005060100
-050501000502010005020100050801000505010005020100050101000505010005020100
-050101000502010005010100050b01000500010105000100050101000505010005020100
-050f0101050c010205020100050201000501010005020100050101000502010005080100
-05090100050401000505010005170101050301000507010005010100050a010105050100
-050a01000501010005050100050f01000501010005020103050201000502010005030100
-05060101050f0101050701000505010005020100050701000507000105010701060d0300
-0202040103010202040005040701050001000506010005010100050c010005030100050b
-010005010100050401000519010005210100050301000502010005110100050601000505
-01000502010405090102050201040501010005060100050001000502010405010100050b
-0100050001010500010005020102050201000502010005110100050c0100050001000501
-010005020100050101040501010005020100050801000506010305040100050501000519
-0100050301000506010005010100050c010005030100050b01000501010005040100050f
-010505010100050101000502010405030100050501000513010005060100050501000503
-0102050401000507000105010701060d0300020204010301020204000504070105010100
-0505010005010100050c010005020100050c01000501010005030100053d010005030100
-050201000511010005060100050501000502010005100100050101000505010005060100
-050001000502010005050100050b01000503010005050100050101000502010005110100
-050c01000500010005010100050201000501010005050100050201000508010005050100
-05020100050401000505010005190100050401000505010005010100050c010005020100
-050c01000501010005030100051101000501010005020100050201000501010005070100
-0505010005130100050601000505010005060100050301000507000105010701060d0300
-020204010301020204000504070105020100050401000501010005030101050201000502
-010005010100050701010503010005010100050201000506010105350100050301000502
-010005030101050b01000506010005050100050201000502010005080100050201000501
-0100050201000501010005070100050301000502010005010100050b0100050301000501
-010005020100050101000501010105030101050b0100050a010005000100050001000501
-010005010101050101000502010005010100050201000508010005020100050101000502
-01000504010005050100050b0101050b0100050501000504010005010100050301010502
-010005020100050101000507010105030100050101000502010005060101050901000501
-010005020100050201000501010005020100050301000505010005050101050b01000506
-0100050501000502010005020100050301000507000105010701060d0300020204010301
-020204000504070105030100050401010504010105030102050201040503010105040101
-050201000507010105120100052101000504010205040101050b01000506010005050100
-05030102050a01020503010205020100050701000504010205020100050b010005030100
-05020102050301010500010005030101050b0100050b0102050301010500010005020102
-050201000502010005090102050301030504010005050100050b0101050b010005060100
-050401010504010105030102050201040503010105040101050201000507010105090100
-05010100050201000502010005020102050401000505010005050101050b010005060100
-0505010005030102050501010505000105010701060d0300020204010301020204000504
-070105040100052a0100057501050544010005110100050c010005070100050e01050527
-0100050b010005070100052a0100050901000527010005060100050b0100051e01040001
-05010701060d0300020204010301020204000504070105ee01000502010005120101050f
-010005020100053a0101050d0101053a01010526010105050101050d0101052100010501
-0701060d0300020204010301020204000504070105ef01020526010205ed000105010701
-060d0300020204010301020204000504070105730101052e010105ff0563000105010701
-060d0300020204010301020204000504070105040100052a010005400100050401000501
-010005260100052001030501010005010100058701000501010005ae000105010701060d
-030002020401030102020400050407010503010005040101050a010205030102050b0101
-05020100053f0100050401000501010005010103050c010105110100050a010005140100
-050401000501010005340102050401000503010405020102051001000508010005180100
-05010100050101000501010005ae000105010701060d0300020204010301020204000504
-070105020100050401000501010005080100050201000501010005020100050901000501
-010005020100053e010005040100050101000501010005020100050a010005130100050a
-010005140100050401000501010005330100050201000502010105030100050501000502
-0100050f0100052101000500010005000100050101000501010005ae000105010701060d
-03000202040103010202040005040701050101000505010005010100050c010005050100
-050901000501010005030100050501010509010005000101050301020503010205190100
-050301050500010005020100050201020504010005130100050401020502010005010100
-051101000504010005010100050a01020503010205020100050201000502010205030102
-050901000505010005000100050301000505010005020100050901020502010005000101
-050301020502010005020100050201020503010205020100050101000502010005010100
-05ae000105010701060d0300020204010301020204000504070105000100050601000501
-0100050c0100050501000509010005010100050401000504010105090101050101000501
-010005020100050101000502010005180100050401000501010005010100050201000501
-010005020100050101040511010005030100050201000501010005000100051201000512
-010005020100050101000502010005010100050201000501010005020100050101000502
-010005080100050701000503010305020100050201000508010005020100050101010501
-01000504010005020100050201000501010005020100050101000502010005bb00010501
-0701060d0300020204010301020204000504070101000507010005010100050a01010505
-0100050a01000501010005050100050f0100050501000502010005010100051a01010504
-010005010100050201030502010005020100050301000511010105040100050201000501
-010105130100051201000509010005010100050201000501010005020100050101000505
-010405010103050401000507010005020103050101040501010005050100050201000504
-01000502010005020100050501000501010005bf000105010701060d0300020204010301
-0202040005040701050001000506010005010100050c010005030100050b010005010100
-05040100051001000505010405010100051c010005020105050101000501010005020104
-050301000513010005030100050201000501010105130100051301020503010305020100
-050001000502010405020102050901000502010005030100050701000505010005080100
-0505010005020100050401000503010005000100050301030502010205bc000105010701
-060d03000202040103010202040005040701050101000505010005010100050c01000502
-0100050c01000501010005030100051101000505010005050100051c0100050301000501
-010005020100050201000501010005070100051301000503010005020100050101000500
-010005120100051601000501010005020100050201000500010005020100050901000508
-010005020100050301000503010005020100050501000508010005050100050201000504
-0100050301000500010005020100050201000505010005bb000105010701060d03000202
-040103010202040005040701050201000504010005010100050301010502010005020100
-050101000507010105030100050101000502010005060101050901000505010005020100
-050101000502010005180100050301000501010005020100050201000501010005020100
-0503010005050101050b01000503010005020100050101000501010005040101050a0100
-050d01010502010005020100050101000502010005030100050301000502010005010100
-050201000508010005020100050301000503010005020100050101000502010005080100
-050201000501010005020100050401000504010005030100050201000501010005020100
-0511010105a7000105010701060d03000202040103010202040005040701050301000504
-010105040101050301020502010405030101050401010502010005070101050901000506
-010205030102051901000503010005010100050201000502010005020102050401000505
-0101050b010005040102050201000502010005030101050a0100050d0101050301020503
-0103050301000504010205030102050a0102050201040502010205030102050a01020502
-010005020100050401000504010005040103050201020512010105a7000105010701060d
-0300020204010301020204000504070105040100052a01000540010005220100050b0100
-05140100050a01030597010005a7000105010701060d0300020204010301020204000504
-070105730101051e0101050d01010510010105a5010105a8000105010701060d03000202
-04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
-04000504070105ff05ff050a000105010701000d03000202040103010202040005040701
-0507010005010100056401000501010005ff05950001050107010600000c030002020401
-03010202040005040701050701000501010005040100051201020521010105050100050b
-0100051001000501010005ff059500010501070106000001050807010300020204010301
-0202040005040701050701000501010005040100051401000520010005070100051d0100
-0501010005ff059500010501070106010001050707010300020204010301020204000504
-0701050701000501010005020104050201020503010205050100050a0101050001000502
-010205020100050001010504010005040101050001000509010205030102050201010500
-0100050201000501010005ff059500010501070106010001050607010600030002020401
-030102020400050407010510010005030100050201000501010005020100050401000509
-01000501010105010100050201000501010105010100050101040501010005010101050b
-0100050201000502010005010100050001000500010005ff059b00010501070106020001
-050507010600030002020401030102020400050407010510010005030100050201000501
-010005020100050401000509010005020100050101000502010005010100050201000503
-01000503010005020100050b01000506010005010100050001000500010005ff059b0001
-050107010602000105040701060103000202040103010202040005040701051001000503
-010005020100050101000502010005040100050901000502010005010104050101000502
-0100050301000503010005020100050b01000503010305010100050001000500010005ff
-059b00010501070106030001050307010601030002020401030102020400050407010510
-010005030100050201000501010005020100050401000509010005020100050101000505
-010005020100050301000503010005020100050b01000502010005020100050101000500
-01000500010005ff059b0001050107010603000105020701060203000202040103010202
-040005040701051001000503010005020100050101000502010005040100050901000501
-010105010100050201000501010005020100050301000503010005010101050301010505
-01000502010005020100050101000500010005000100050a010105ff058e000105010701
-060400010501070106020300020204010301020204000504070105110101050201020503
-010205050100050a01010500010005020102050201000502010005030100050401010500
-0100050301010505010005030103050101000500010005000100050a010105ff058e0001
-050107010604000105000701060303000202040103010202040005040701052901050505
-010005270100051a010005ff058e00010501070106050000070206030300020204010301
-0202040005040701053101000502010005240100050101000518010105ff058f00010501
-070106050000070106040300020204010301020204000504070100ff00ff000c05010701
-0606070106040300020204010301020204000504070000ff00ff000d0501070106060700
-060503000202040103010202040005ff05ff05150701000d030002020401030102020400
-05ff05ff05150700000e030002020401030102020400050207ff07ff0716050b03000202
-0401030102020400050207ff07ff07150000050b03000202040103010202040005020701
-060d0000060000ff0073067f0001060c0001050b03000202040103010202040005020701
-060b00010700060000ff00720700067f0003060a0001050b030002020401030102020400
-050207010609000207010600000105ff056f0701067f000506080001050b030002020401
-0301020204000502070106070003050007010600000105ff056f0701067f000105010003
-06060001050b030002020401030004040502070106050003050207010600000105ff056f
-0701067f00010503000306040001050b0300040403050502070106030003050407010600
-000105ff056f0701067f00010505000306020001050b0304040003010202040005020701
-06010003050607010600000105ff056f0701067f00010507000306000001050b03000202
-040103010202040005020705050807010600000105ff056f0701067f0001050807030001
-050b0300020204010301020204000502070106010703050607010600000105ff056f0701
-067f00010507070306000001050b03000202040103010202040005020701060307030504
-07010600000105ff056f0701067f00010505070306020001050b03000202040103010202
-04000502070106050703050207010600000105ff056f0701067f00010503070306040001
-050b0300020204010301020204000502070106070703050007010600000105ff056f0701
-067f00010501070306060001050b03000202040103010202040005020701060907040600
-000105ff056f0701067f0001070306080001050b03000202040103010202040005020701
-060b07020600000107ff0771067f00010701060a0001050b030002020401030102020400
-05020701060d07000600000007ff0772067f00000700060c0001050b0300020204010301
-020204000502070100ff00ff0014050b0300020204010301020204000502070000ff00ff
-0015050b03000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
-05ff052503000202040103010202040003ff03ff0326020204010301021a0400030002ff
-02f304000300021a04010301021a0400030002ff02f304000300021a04010301021a0400
-030002ff02f304000300021a04010301041b030004ff04f40300041c030004ff04ff0430
-
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 17 377 309
-%%EOF
diff --git a/lib/pman/doc/src/warning.gif b/lib/pman/doc/src/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/lib/pman/doc/src/warning.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/info b/lib/pman/info
deleted file mode 100644
index 22003edcea..0000000000
--- a/lib/pman/info
+++ /dev/null
@@ -1,2 +0,0 @@
-group: tools
-short: A graphical process manager used to inspect Erlang processes.
diff --git a/lib/pman/priv/Makefile b/lib/pman/priv/Makefile
deleted file mode 100644
index a89278fd3a..0000000000
--- a/lib/pman/priv/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# ``The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved via the world wide web at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
-# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
-# AB. All Rights Reserved.''
-#
-# $Id$
-#
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-include ../vsn.mk
-VSN = $(PMAN_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/pman-$(VSN)
-
-#
-# Macros
-#
-TOOLBAR_FILES = \
- pman.tool \
- pman.gif
-
-#
-# Rules
-#
-
-debug opt:
-
-docs:
-
-clean:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/priv"
- $(INSTALL_DATA) $(TOOLBAR_FILES) "$(RELSYSDIR)/priv"
-
-release_docs_spec:
-
-FORCE:
diff --git a/lib/pman/priv/pman.gif b/lib/pman/priv/pman.gif
deleted file mode 100644
index 4575a397d8..0000000000
--- a/lib/pman/priv/pman.gif
+++ /dev/null
Binary files differ
diff --git a/lib/pman/priv/pman.tool b/lib/pman/priv/pman.tool
deleted file mode 100644
index c04b7d00eb..0000000000
--- a/lib/pman/priv/pman.tool
+++ /dev/null
@@ -1,6 +0,0 @@
-{version,"0.1"}.
-{{tool,"Pman"},
- {start,{pman,start,[]}},
- {icon,"pman.gif"},
- {message,"Process Manager"},
- {html,"../doc/html/index.html"}}.
diff --git a/lib/pman/src/assert.hrl b/lib/pman/src/assert.hrl
deleted file mode 100644
index ea3b68cd7c..0000000000
--- a/lib/pman/src/assert.hrl
+++ /dev/null
@@ -1,81 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%% Purpose : Assert macro
-
-
-%% ?ASSERT/2 - will simply return true if the first argument evaluates to true
-%% otherwise it will exit and output (via the error logger) the
-%% second string
-%%
-%% Arguments:
-%% Flag Expression that should evalueate to true or false
-%% String String to return as a part of the exit reason as well
-%% be to be sent to the error logger.
-%%
-%% Returns:
-%% true If the Flag expression evaluates to true
-%%
-%% Exits:
-%% {'EXIT', {assertion_failed, String}}
-%% If the Flag expression evaluates to something other than
-%% true.
-%%
-%% Usage notes:
-%% Please note that the Flag argument must be a valid expression that
-%% evaluates to true.
-%%
-%% Also, avoid any side effects in the Flag, as everything performed
-%% within the scope of the ?ASSERT macro will not be present when
-%% the code is not compiled with the debug_on flag.
-%%
-%% Side effects include the binding of a variable, sending of a
-%% message, etc.
-%%
-
--ifdef(debug_on).
--define(ASSERT(Flag, String),
- case Flag of
- true ->
- true;
- _ ->
- S2 =
- lists:flatten(
- io_lib:format(
- "=ASSERT====~nPid:~p, Module:~p, Line:~p~nTermination because assertion failed:~n~p",
- [self(),?MODULE, ?LINE,String])),
- error_logger:error_report(S2),
- exit({assertion_failed, String})
- end
- ).
-
--define(ALWAYS_ASSERT(String),
- S2 = lists:flatten(
- io_lib:format(
- "=ASSERT====~nPid:~p, Module:~p, Line:~p~nTermination because of unconditional assert:~n~p",
- [self(),?MODULE, ?LINE, String])),
- error_logger:error_report(S2),
- exit({always_assert, String})
- ).
--else.
--define(ASSERT(_Flag,_String), true).
--define(ALWAYS_ASSERT(_String), true).
--endif.
-
-
-
diff --git a/lib/pman/src/pman.app.src b/lib/pman/src/pman.app.src
deleted file mode 100644
index cc32a17296..0000000000
--- a/lib/pman/src/pman.app.src
+++ /dev/null
@@ -1,40 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-{application, pman,
- [{description, "pman The Process Manager"},
- {vsn, "%VSN%"},
- {modules, [
- pman,
- pman_buf,
- pman_buf_buffer,
- pman_buf_converter,
- pman_buf_printer,
- pman_buf_utils,
- pman_main,
- pman_module_info,
- pman_options,
- pman_process,
- pman_relay,
- pman_relay_server,
- pman_shell,
- pman_tool,
- pman_win
- ]},
- {registered, []},
- {applications, [kernel, stdlib]}]}.
diff --git a/lib/pman/src/pman.erl b/lib/pman/src/pman.erl
deleted file mode 100644
index c8ea34b6b7..0000000000
--- a/lib/pman/src/pman.erl
+++ /dev/null
@@ -1,132 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%%% Purpose : Exported API to the Pman graphical tool
-%%----------------------------------------------------------------------
-
--module(pman).
-
-
-%% ---------------------------------------------------------------
-%% The user interface exports
-%% ---------------------------------------------------------------
--export([start/0,
- start_notimeout/0,
- start/1,
- start_notimeout/1,
- proc/1,
- proc/3]).
-
-%% ---------------------------------------------------------------
-
-%% Timeout for the startup function.
-%% If no {initialization_complete, Pid} message has been received
-%% from the spawned init-function within ?STARTUP_TIMEOUT ms
-%% the start-function will call exit(Reason).
--define(STARTUP_TIMEOUT, 20000).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start/0
-
-start() ->
- start([], ?STARTUP_TIMEOUT). %Start w/o excluded modules
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start_notimeout/0
-
-start_notimeout() ->
- start([],infinity). %Start w/o excluded modules
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start/1
-
-start(LIModuleExcluded) ->
- start(LIModuleExcluded, ?STARTUP_TIMEOUT).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start_notimeout/1
-
-start_notimeout(LIModuleExcluded) ->
- start(LIModuleExcluded, infinity).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start/2 - Spawns the main Pman process, that will supervise
-%% all processes except those running code from the modules
-%% specified in LIModuleExcluded
-%%
-
-start(LIModuleExcluded, Timeout) ->
-
- OSModuleExcluded = ordsets:from_list(LIModuleExcluded),
-
- PidInit = spawn(pman_main, init, [self(), OSModuleExcluded]),
-
- %% Wait for a initialization completion message from
- %% the spawned process before returning its Pid.
- %%
-
- receive
- {initialization_complete, PidInit} ->
- PidInit
-
- %% (Conditional) Failure to start within the time limit will
- %% result in termination
-
- after
- Timeout ->
- exit(PidInit, kill),
- exit({startup_timeout, ?MODULE})
- end.
-
-
-
-%% ---------------------------------------------------------------
-%% If we want to trace just one process, we can call proc, giving it
-%% either the Pid, or the registered name, (Global or local).
-%%
-%% (???)
-%% Note that this function must not be used internally to create a
-%% trace window, since it is assumed that it is started from any
-%% process (esp. the shell) it will not have any supervisor process
-%% that shall be notified about it's exit/death.
-%%
-%% Returns: Trace loop Pid|udefined
-
-%% ---------------------------------------------------------------
-
-
-proc(undefined) ->
- exit(undefined);
-
-proc({shell,P}) when is_pid(P) ->
- pman_shell:start({{shell,P},self()});
-
-proc(P) when is_atom(P) ->
- proc(whereis(P));
-
-proc({global, N}) ->
- proc(global:whereis_name(N));
-
-proc(P) when is_pid(P) ->
- pman_shell:start({P,self()}).
-
-proc(X,Y,Z) ->
- proc(c:pid(X,Y,Z)).
-
diff --git a/lib/pman/src/pman_buf.erl b/lib/pman/src/pman_buf.erl
deleted file mode 100644
index d56ce184fa..0000000000
--- a/lib/pman/src/pman_buf.erl
+++ /dev/null
@@ -1,117 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%%----------------------------------------------------------------------
-%%% Purpose : This module is the exported interface to the buffering mechanism
-%%% used in PMAN to prevent the trace output to congest
-%%% the system.
-%%%
-%%% This module depends on the modules (direct or indirectly):
-%%% pman_buf.hrl
-%%% pman_buf_utils.erl
-%%% pman_buf_buffer.erl
-%%% pman_buf_converter.erl
-%%% pman_buf_printer.erl
-%%%
-%%%----------------------------------------------------------------------
-
--module(pman_buf).
-
-%%-compile(export_all).
--export([start/2,clear/3]).
-
-
--include("pman_buf.hrl").
-
-
-%% The buffering mechanism consists of three processes that
-%% work in a chain to prevent the process monitor from congesting
-%% output mechanism.
-%%
-%% Messages are buffered in the CONVERTER process before they are sent to
-%% to the BUFFER process where they are formatted before they are finally
-%% sent to either a file or the PRINTER process. The printer process
-%% outputs the messages in the graphical user interface.
-%%
-%%
-%%
-%% --> CONVERTER --> BUFFER --> PRINTER --> gui
-%% |
-%% |
-%% |
-%% V
-%%
-%% file
-%%
-
-
-
-
-
-%% ----------------------------------------------------------------
-%% The amount of data produced by a trace message may be large, and
-%% cause the run time system to run out of memory. To avoid this,
-%% the task of storing, cutting buffers, formating data and printing
-%% it is performed by three processes: The buffer, the converter and
-%% the printer.
-%%
-%% The converter accepts the raw data, a list
-%% of {trace,Msg} tuples. Having max priority, it assures that the
-%% amount of raw data stored never excedes ?BUFF_SIZE messages.
-%% (With the exception of the last batch received, which assures that
-%% the last trace message printed is never a buffer cut message.)
-%% Whenever there is space available in the buffer process, (The
-%% Buffer process stores max. ?BUFF_SIZE converted messages),
-%% the buffer asks for more unconverted messages, and ?PRINT_LEN messages
-%% are sent. They are converted by the buffer, and added to the list
-%% of messages to be sent.
-
-%% The printer process requests formatted messages from the buffer,
-%% and in chuncs of ?MAX_OUTPUT sends them to the buffer. If traces
-%% are to be dumped on file, due to the max priority, such is handled
-%% in the converter, and buffers are not cut.
-%%
-
-
-%% ---------------------------------------------------------------
-%% Initializes the buffering mechanism, which consist of three
-%% processes, each involved with a phase of the formattation and
-%% output of data to the process windows.
-
-start(Editor, FileName) ->
- Buffer_Pid = spawn_link(pman_buf_buffer,init,[Editor]),
- Converter_Pid =
- spawn_link(pman_buf_converter,init,[Buffer_Pid, FileName]),
- Buffer_Pid!{converter_pid, Converter_Pid},
- #buffer{converter=Converter_Pid,buffer=Buffer_Pid}.
-
-
-
-%% ---------------------------------------------------------------
-%% Kills the converter and the clears the buffer with formated data
-%% starting a new converter.
-
-clear(Buff,String, FileName) ->
- exit(Buff#buffer.converter,win_killed),
- Converter_Pid=spawn_link(pman_buf_converter,init,[Buff#buffer.buffer,
- FileName]),
- Buff#buffer.buffer!{clear,String,Converter_Pid },
- Buff#buffer{converter = Converter_Pid}.
-
-
-
diff --git a/lib/pman/src/pman_buf_buffer.erl b/lib/pman/src/pman_buf_buffer.erl
deleted file mode 100644
index ad92eb1f3e..0000000000
--- a/lib/pman/src/pman_buf_buffer.erl
+++ /dev/null
@@ -1,102 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%%----------------------------------------------------------------------
-%%% Purpose : The purpouse of the buffer process is to take
-%%% care of the data that is received by the converter
-%%% process and pass it on to the printer process in chunks
-%%% that can be handled.
-%%%
-%%% This module is a part of the buffering system, and
-%%% should not be used except through the API defined
-%%% in the pman_buf module.
-%%%
-%%%----------------------------------------------------------------------
-
--module(pman_buf_buffer).
-
-%%-compile(export_all).
--export([init/1]).
-
--include("pman_buf.hrl").
-
-
-
-%%
-%% Initialization function for the buffer process.
-%% To be started with spawn from the calling process.
-%%
-
-init(Editor) ->
- Printer_pid = spawn_link(pman_buf_printer,init,[Editor,self()]),
- receive
- {converter_pid,Pid} ->
- Pid!{buffer,accept},
- buffer_loop([],0,0,Printer_pid,Pid)
- end.
-
-
-
-%%
-%% Receive loop for the buffer process.
-%%
-
-buffer_loop(Buffer,Size,Acc,Printer,Converter) ->
- receive
- {save_buffer,Name} ->
- Printer!{save_buffer,Name},
- buffer_loop(Buffer,Size,Acc,Printer,Converter);
- {raw,Raw,Length} -> %%output to editor
- New_Size = Size + Length,
- if New_Size < ?BUFF_SIZE ->
- Converter!{buffer,accept};
- true -> ok
- end,
- Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
- New_Buff = lists:append(Buffer,Print),
- buffer_loop(New_Buff,New_Size,Acc,Printer,Converter);
- {clear,Text,N_Converter} ->
- Converter!{buffer,accept},
- Printer!clear,
- buffer_loop([Text],1,1,Printer,N_Converter);
- {printer,send} when Buffer /= [] ->
- if
- Acc > ?EDITOR_MAX ->
- Printer!clear,
- Printer !{buffer,"Cleared Buffer due to Size\n\n"},
- buffer_loop(Buffer,Size,1,Printer,Converter);
- true ->
- {Length,Rest,Print} = pman_buf_utils:split(Buffer,
- ?PRINT_LEN,
- 0,
- []),
- Printer ! {buffer,Print},
- New_Size = Size - Length,
- if New_Size < ?BUFF_SIZE ->
- Converter!{buffer,accept};
- true -> ok
- end,
- buffer_loop(Rest,New_Size,Acc+Length,Printer,Converter)
- end;
- {converter,file} ->
- Converter!{buffer,Buffer},
- self()!{raw,[to_file],1},
- buffer_loop([],0,Acc,Printer,Converter)
- end.
-
-
diff --git a/lib/pman/src/pman_buf_converter.erl b/lib/pman/src/pman_buf_converter.erl
deleted file mode 100644
index c8b3fe37aa..0000000000
--- a/lib/pman/src/pman_buf_converter.erl
+++ /dev/null
@@ -1,190 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%% Purpose : The purpouse of the converter process is to take
-%% care of the raw data that is received by the tracing
-%% process (a pman_shell process) and pass it on to
-%% the buffer process in chunks that can be handled.
-%%
-%% This module is a part of the buffering system, and
-%% should not be used except through the API defined
-%% in the pman_buf module.
-%%
-%%----------------------------------------------------------------------
-
--module(pman_buf_converter).
--compile([{nowarn_deprecated_function,{gs,start,0}}]).
-
-%%-compile(export_all).
--export([init/2]).
-
--include("pman_buf.hrl").
-
-
-%% ---------------------------------------------------------------
-%% Starts the process which received the raw data from the debugger,
-%% cuts and forwards it to the buffer in smaller chunks. High priority
-%% to avoid large message queues waiting to be processed.
-
-init(Buffer_Pid, FileName) ->
- process_flag(priority, max),
- converter_loop(Buffer_Pid,[],0,true,[], FileName).
-
-converter_loop(Buffer_Pid,Raw,Size,State,Last, FileName) ->
- receive
- {file,Shell} ->
- case init_file(lists:append(Raw,Last),
- FileName,
- Shell,
- Buffer_Pid) of
- true -> converter_loop(Buffer_Pid,
- [to_buffer],
- 1,
- State,
- [],
- FileName);
- false -> converter_loop(Buffer_Pid,
- Raw,
- Size,
- State,
- Last,
- FileName)
- end;
- {raw,Trace} ->
- {New_Raw,New_Size,New_State,New_Last} =
- converter_data(Trace, Buffer_Pid, Raw, Size, State, Last),
- converter_loop(Buffer_Pid,
- New_Raw,
- New_Size,
- New_State,
- New_Last,
- FileName);
- {buffer,accept} when Raw /= [] ->
- {Length,Rest,Print} = pman_buf_utils:split(Raw,?PRINT_LEN,0,[]),
- Buffer_Pid!{raw,Print,Length},
- converter_loop(Buffer_Pid,Rest,Size-Length,false,Last,FileName);
- {buffer,accept} when Last /= [] ->
- {New_Raw,New_Size,New_State,New_Last} =
- converter_data(Last,Buffer_Pid,Raw,Size,true,[]),
- converter_loop(Buffer_Pid,
- New_Raw,
- New_Size,
- New_State,
- New_Last,
- FileName);
- {buffer,accept} ->
- converter_loop(Buffer_Pid,Raw,Size,true,Last, FileName);
- {clear,Str} ->
- Buffer_Pid!{clear,Str},
- converter_loop(Buffer_Pid,[],0,State,Last,FileName)
- end.
-
-converter_data(Trace,Buffer_Pid,Raw,Size,State,Last) ->
- if
- ?BUFF_SIZE - Size > 0 ->
- {Len,Rest,New_Trace} = pman_buf_utils:split(Trace,
- ?BUFF_SIZE-Size,
- 0,[]),
- {New_Raw,New_Last} =
- case Rest of
- [] ->
- {lists:append(Raw,New_Trace),Last};
- [_|_] ->
- case Last of
- [] ->
- {lists:append(Raw,New_Trace),Rest};
- _ ->{lists:concat([Raw,New_Trace,[cut_buffer]]),
- Rest}
- end
- end,
- case State of true ->
- {Length,Cut_Raw,Print} = pman_buf_utils:split(New_Raw,
- ?PRINT_LEN,
- 0,[]),
- Buffer_Pid!{raw,Print,Length},
- {Cut_Raw,Size-Length,false,New_Last};
- _ ->
- {New_Raw,Size+Len,false,New_Last}
- end;
- true ->
- {Raw,Size,State,Trace}
- end.
-
-
-%% ---------------------------------------------------------------
-%% Initializes the environment for saving the trace to file. The
-%% actual saving is taken care of by the buffer process.
-
-init_file(Raw,FileName, Name,Buffer_Pid) ->
- case open_file(FileName, Name) of
- {false,T} ->
- pman_win:msg_win(T),
- false;
- {File,T} ->
- Buffer_Pid!{converter,file},
- pman_win:dialog_window(gs:start(),T),
- save_loop_init(File,Raw)
- end.
-
-open_file(FileName, _Shell) ->
-%% L = "pman_trace." ++ Shell,
- case file:open(FileName, [read,write]) of
- {error, _} ->
- Str = "ERROR: Could not create_file\n" ++ FileName,
- {false,Str};
- {ok,File} ->
- file:position(File, {eof, 0}),
- Str1 = " Appending trace log to file\n" ++ FileName,
- {File,Str1}
- end.
-
-
-save_loop_init(Fd,Raw) ->
- {Date, Time} = calendar:local_time(),
- {Year, Month, Day} = Date,
- {Hour, Minute, Second} = Time,
- io:format(Fd,"%%% ~n",[]),
- io:format(Fd,"%%% Trace output~n",[]),
- io:format(Fd,"%%% Started at ~4p-~2p-~2p ~2p:~2p:~2p~n",
- [Year, Month, Day,
- Hour, Minute, Second
- ]),
- io:format(Fd,"%%% ~n~n",[]),
-
- Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
- receive
- {buffer,Text} when is_list(Text) ->
- io:format(Fd,Text,[]),
- io:format(Fd,Print,[]),
- save_loop(Fd)
- end.
-
-save_loop(Fd) ->
- receive
- {raw,Raw} ->
- Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
- io:format(Fd,Print,[]),
- save_loop(Fd);
- buffer -> true
- end.
-
-
-
-
-
diff --git a/lib/pman/src/pman_buf_printer.erl b/lib/pman/src/pman_buf_printer.erl
deleted file mode 100644
index 3284c57559..0000000000
--- a/lib/pman/src/pman_buf_printer.erl
+++ /dev/null
@@ -1,91 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
--module(pman_buf_printer).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,start,0}}]).
-
-%%-compile(export_all).
--export([init/2]).
-
-
--include("pman_buf.hrl").
-
-%% ---------------------------------------------------------------
-%% Starts the part of the buffer which regulates the flow of data to
-%% be printed in the pid editors
-
-
-init(Editor,Buffer_pid) ->
- Buffer_pid!{printer,send},
- printer_loop(Editor,Buffer_pid).
-
-printer_loop(Editor,Buffer_pid)->
- receive
- {save_buffer,Name} ->
- gs:config(Editor,{save,Name}),
- TT = "Buffer saved in file\n" ++ Name,
- pman_win:dialog_window(gs:start(),TT),
- printer_loop(Editor,Buffer_pid);
- {buffer,Trace} ->
- case lists:flatlength(Trace) of
- Len when Len > ?MAX_OUTPUT ->
- printer_long(lists:flatten(Trace),Editor),
- Buffer_pid!{printer,send},
- printer_loop(Editor,Buffer_pid);
- _ ->
- Buffer_pid!{printer,send},
- print_trace(Editor,Trace),
- printer_loop(Editor,Buffer_pid)
- end;
- clear ->
- pman_win:configeditor(Editor, [{enable, true}]),
- pman_win:configeditor(Editor,clear),
- pman_win:configeditor(Editor, [{enable, false}]),
- printer_loop(Editor,Buffer_pid);
- _Other ->
- printer_loop(Editor,Buffer_pid)
- end.
-
-printer_long([],_) -> ok;
-printer_long(Trace,Editor) ->
- receive
- clear ->
- pman_win:configeditor(Editor, [{enable, true}]),
- pman_win:configeditor(Editor,clear),
- pman_win:configeditor(Editor, [{enable, false}])
- after 0 ->
- {_Length,Rest,Print} = pman_buf_utils:split(Trace,
- ?MAX_OUTPUT,
- 0,
- []),
- print_trace(Editor,Print),
- printer_long(Rest,Editor)
- end.
-
-
-
-%% ---------------------------------------------------------------
-%% Function which print trace messages on the window
-%% ---------------------------------------------------------------
-
-print_trace(Editor,Elements) ->
- pman_win:configeditor(Editor, [{enable, true}]),
- pman_win:configeditor(Editor, [{insert, {'end',Elements}}]),
- pman_win:configeditor(Editor, [{enable, false}]).
diff --git a/lib/pman/src/pman_buf_utils.erl b/lib/pman/src/pman_buf_utils.erl
deleted file mode 100644
index af3982665e..0000000000
--- a/lib/pman/src/pman_buf_utils.erl
+++ /dev/null
@@ -1,106 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
--module(pman_buf_utils).
-
-%%-compile(export_all).
--export([textformat/1, split/4]).
-
-
-%% ---------------------------------------------------------------
-%% Funtion which format the trace message
-%% ---------------------------------------------------------------
-
-textformat(died) ->
- "\n\nProcess died\n";
-textformat({died, Pid}) ->
- io_lib:format("~w Process died.~n",[Pid]);
-textformat({shell_died, Old, New}) ->
- io_lib:format("~w Shell Process died. Restarted as ~w~n~n",[Old,New]);
-
-
-textformat(to_buffer) ->
- "\nAppending trace log to Buffer\n\n";
-textformat(to_file) ->
- "\nAppending trace log to File\n\n";
-textformat(cut_buffer) ->
- "\nCUT BUFFER\n\n";
-textformat({trace, From, 'receive', Msg}) ->
- io_lib:format("~w: rec ~s~n", [From,
- tuple_space(Msg)]);
-textformat({trace, From, send, Msg, To}) ->
- io_lib:format("~w: ! To: ~w Msg: ~s~n", [From,
- To,
- tuple_space(Msg)]);
-textformat({trace, From, call, Func}) ->
- io_lib:format("~w: call ~s~n",[From, ffunc(Func)]);
-textformat({trace, From, spawn, Data}) ->
- io_lib:format("~w: spawn ~p~n", [From, Data]);
-textformat({trace, From, link, Data}) ->
- io_lib:format("~w: link ~p~n", [From, Data]);
-textformat({trace, From, unlink, Data}) ->
- io_lib:format("~w: U-lnk ~p~n", [From, Data]);
-
-textformat({trace, From, Op, Data}) ->
- io_lib:format("~w: ~w ~p~n", [From, Op, Data]);
-
-textformat({print, Format, Args}) ->
- io_lib:format(Format, Args);
-textformat(Other) ->
- io_lib:format("~p~n",[Other]).
-
-
-
-
-
-ffunc({M,F, Argl}) ->
- io_lib:format("~w:~w(~s)", [M, F, fargs(Argl)]);
-ffunc(X) -> tuple_space(X).
-fargs([]) -> [];
-fargs([A]) -> tuple_space(A); %% last arg
-fargs([A|Args]) -> [tuple_space(A),", "|fargs(Args)].
-
-
-tuple_space(X) when is_tuple(X) -> print(size(X), X, "}");
-tuple_space(X) -> io_lib:format("~p",[X]).
-
-print(0 , _X, Buff) -> ["{"|Buff];
-print(1 , X, Buff) ->
- Str = tuple_space(element(1, X)),
- ["{",Str|Buff];
-print(Num, X, Buff) ->
- Str = tuple_space(element(Num, X)),
- print(Num-1, X, [", ",Str|Buff]).
-
-
-
-%% ----------------------------------------------------------------
-%% splits the list at element Size, returns Size, and the 2 lists
-%% If the list is not long enough, it returns {size(List),[],List}
-
-
-split([],_,Length,Buff) ->
- {Length,[],lists:reverse(Buff)};
-split(Rest,0,Length,Buff) ->
- {Length,Rest,lists:reverse(Buff)};
-split([L|List],Size,Length,Buff) ->
- split(List,Size-1,Length+1,[L|Buff]).
-
-
-
diff --git a/lib/pman/src/pman_main.erl b/lib/pman/src/pman_main.erl
deleted file mode 100644
index 2f51284293..0000000000
--- a/lib/pman/src/pman_main.erl
+++ /dev/null
@@ -1,789 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(pman_main).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-%% Main process and window
-
--export([init/2]).
-
--record(state, {win, % GS top window
- frame, % GS top frame
- grid, % GS process info grid
-
- size, % int() No. of displayed procs
- w, % int() Window width
- h, % int() Window height
-
- hide_system=false, % bool() Auto-hide system procs
- hide_new=false, % bool() Auto-hide new processes
-
- hide_modules, % ordset() Excluded modules
-
- hide_all=[], % [{node(), bool()}] Hide all
- hide_pids=[], % [{node(), Ordset}] Processes
- % explicitly to hide, per node
- show_pids=[], % [{node(), Ordset}] Processes
- % explicitly to show, per node
-
- shown_pids=[], % [{node(), Ordset}] Processes
- % actually shown, per node
-
- node, % node() Current node
- nodes=[], % [node()] All known nodes
-
- focus=1, % int() Grid line with focus
- focus_pid=undefined, % pid() | undefined Proc in focus
-
- noshell, % bool() Noshell mode on
-
- options}). % term() Trace options settings
-
-
--include("pman_win.hrl").
-
--define(REFRESH_TIME,5000).
-
--define(REQUIRES_FOCUS, % List of menus that should
- ['Trace Process', % be disabled if no process
- 'Kill', % is in focus
- 'Hide Selected Process',
- 'Module']).
-
-%%--Process init and loop-----------------------------------------------
-
-init(PidCaller, OSModuleExcluded) ->
- process_flag(trap_exit, true),
-
- %% Monitor all nodes in a distributed system
- case is_alive() of
-
- %% We have a distributed system
- true -> net_kernel:monitor_nodes(true);
-
- %% No distribution
- false -> ignore
- end,
- Nodes = [node()|nodes()],
-
- %% Create the main window
- %% For some extremely strange reason, the frame must be resized
- %% or the grid won't be visible...
- GridSize = length(processes()) + 61,
- {Window, Grid, Frame, Visible, W, H} =
- pman_win:pman_window(GridSize, OSModuleExcluded, Nodes),
- gse:resize(Frame, ?WIN_WIDTH, ?WIN_HEIGHT-?MENU_HEIGHT),
-
- Noshell = case pman_shell:find_shell() of
- noshell -> true;
- _ -> false
- end,
-
- State1 = #state{win=Window, frame=Frame, grid=Grid,
- size=Visible,
- w=W, h=H,
- hide_modules=OSModuleExcluded,
- node=node(),
- noshell=Noshell},
-
- State2 = lists:foldl(fun(Node, State) -> add_node(Node, State) end,
- State1,
- Nodes),
-
- State3 = refresh(State2),
-
- %% Notify caller that the process appears
- %% to have been started.
- PidCaller ! {initialization_complete, self()},
-
- %% Initiate a 'catch all' trace pattern so call tracing works
- erlang:trace_pattern({'_', '_', '_'}, true, [local]),
-
- %% Read default options file
- Options = restore_options(State3),
-
- loop(State3#state{options=Options}).
-
-add_node(Node, State) ->
- pman_win:add_menu(node, [Node], "Show"),
- State#state{hide_all=nl_update(Node, false, State#state.hide_all),
- hide_pids=nl_update(Node, [], State#state.hide_pids),
- show_pids=nl_update(Node, [], State#state.show_pids),
- shown_pids=nl_update(Node, [], State#state.shown_pids),
- nodes=[Node|State#state.nodes]}.
-
-%% Restore saved options from default file
-restore_options(State)->
- File = options_file(),
- case pman_options:read_from_file(File) of
- {ok, Options} ->
- Options;
- {error, ReasonStr, DefOptions} ->
- Parent = State#state.win,
- Msg = io_lib:format(
- "Problems reading default option file~n~s:~n~s",
- [File, ReasonStr]),
- tool_utils:notify(Parent, Msg),
- DefOptions
- end.
-
-options_file() ->
- {ok, [[Home]]} = init:get_argument(home),
- filename:join([Home, ".erlang_tools", "pman.opts"]).
-
-loop(State) ->
- receive
- {nodeup, Node} ->
- case nl_exists(Node, State#state.hide_all) of
- true ->
- pman_win:add_menu(node, [Node], "Show"),
- loop(State#state{nodes=[Node|State#state.nodes]});
- false ->
- loop(add_node(Node, State))
- end;
-
- {nodedown, Node} ->
- pman_win:remove_menu([Node]),
-
- Msg = io_lib:format("Node~n~p~ndown.", [Node]),
- spawn_link(tool_utils, notify, [State#state.win, Msg]),
-
- %% We remove Node from the list of nodes but not from
- %% the other lists of State, in case Node reappears later
- Nodes = lists:delete(Node, State#state.nodes),
- State2 = State#state{nodes=Nodes},
-
- %% If it was the shown node that went down,
- %% change overview to this node
- if
- Node==State#state.node ->
- State3 = execute_cmd({node,node()}, State2, [], []),
- loop(State3);
- true ->
- loop(State2)
- end;
-
- %% Ignore EXIT signals from help processes
- {'EXIT', _Pid, _Reason} ->
- loop(State);
-
- %% GS events
- {gs, _Obj, _Event, _Data, _Args} = Cmd ->
- case gs_cmd(Cmd, State) of
- stop ->
- exit(topquit);
- State2 ->
- loop(State2)
- end
-
- after ?REFRESH_TIME ->
- State2 = refresh(State),
- loop(State2)
- end.
-
-%% gs_cmd(Event, State) -> stop | State'
-gs_cmd(Event, State) ->
- case Event of
-
- %% --- Window manager commands ---
-
- %% Window is moved or resized
- {gs, _, configure, _Data, Args} ->
- configure(Args, State);
-
- %% Window closed, stop Pman
- {gs, _, destroy, _, _} ->
- stop;
-
- %% --- Dynamic commands ---
-
- %% Click in any object where the GS Data field is a 2-tuple
- {gs, _, click, Data, Args} when is_tuple(Data), size(Data)==2 ->
- execute_cmd(Data, State, [], Args);
-
- %% Single click in the grid sets focus to selected process
- {gs, _, click, {pidfunc,_,_}, [_,Row|_]} when is_integer(Row) ->
- focus(Row, State);
-
- %% Double click in the grid starts tracing of selected process
- {gs, _, doubleclick, {pidfunc,_,_}, [_Col,Row| _]} when is_integer(Row) ->
- execute_cmd('Trace Process', State, [], []);
-
- %% Click in named GS objects
- {gs, Cmd, click, Data, Args} when is_atom(Cmd);
- is_atom(element(1, Cmd)) ->
- execute_cmd(Cmd, State, Data, Args);
-
- %% --- Keyboard accelerator commands ---
-
- %% Move focus up and down
- {gs, _, keypress, [], ['Up',_,0,0]} ->
- execute_cmd(focus_previous, State, [], []);
- {gs, _, keypress, [], ['Down',_,0,0]} ->
- execute_cmd(focus_next, State, [], []);
-
- %% Other keyboard shortcuts
- {gs, _, keypress, [], ['Return',_,0,0]} ->
- execute_cmd('Trace Process', State, [], []);
- {gs, _, keypress, [], [Key,_,0,1]} ->
- execute_cmd(shortcut(Key), State, [], []);
-
- %% Ignore all other GS events
- _Other ->
- State
- end.
-
-%% Keyboard shortcuts
-
-%% File menu
-shortcut(o) -> 'Default Options';
-shortcut(e) -> 'Exit';
-shortcut(z) -> 'Exit';
-
-%% View menu
-shortcut(i) -> 'Hide All';
-shortcut(u) -> 'Hide Modules';
-shortcut(d) -> 'Hide Selected Process';
-shortcut(m) -> 'Module';
-shortcut(r) -> 'Refresh';
-
-%% Trace menu
-shortcut(k) -> 'Kill';
-shortcut(t) -> 'Trace Process';
-shortcut(s) -> 'Trace Shell';
-
-%% Help menu
-shortcut(h) -> 'Help';
-
-%% Keyboard command only
-shortcut(l) -> 'All Links';
-
-%% Process grid traversal
-shortcut(p) -> focus_previous;
-shortcut(n) -> focus_next;
-shortcut(_) -> dummy.
-
-%% configure([W,H,X,Y|_], State) -> State'
-%% Window has been moved or resized
-configure([W,H|_], State) ->
- if
- W==State#state.w, H==State#state.h ->
- ignore;
-
- true ->
- gse:resize(State#state.frame, W, H-?MENU_HEIGHT),
-
- Grid = State#state.grid,
- case abs(W - gs:read(Grid,width) - 6) of
- 0 ->
- ok; %% Avoid refreshing width if possible
- _Anything ->
- Cols = pman_win:calc_columnwidths(W-6),
- gs:config(Grid, Cols)
- end,
- pman_win:configwin(Grid, W, H)
- end,
- State.
-
-%% focus(Row, State) -> State'
-%% Row = int() Grid row
-%% User has selected a row in the grid.
-%% Row==1 means header row.
-focus(Row, State) ->
-
- Pid = case get_pid_in_focus(Row, State#state.grid) of
- {true, {pidfunc,Pid0,_}} ->
- pman_win:change_colour(State#state.grid,
- State#state.focus, Row),
- enable_pid_actions(),
- Pid0;
- false ->
- disable_pid_actions(),
- undefined
- end,
-
- State#state{focus=Row, focus_pid=Pid}.
-
-%% get_pid_in_focus(Row, Grid) -> {true, Data} | false
-%% Data = {pidfunc, Pid, Func}
-%% Func = {Mod,Name,Arity} | term()
-%% Return the data associated with the process in focus if there is one,
-get_pid_in_focus(1, _Grid) ->
- false;
-get_pid_in_focus(Row, Grid) ->
- case gs:read(Grid, {obj_at_row,Row}) of
- undefined -> false;
- GridLine ->
- Data = gs:read(GridLine, data),
- {true, Data}
- end.
-
-%% execute_cmd(Cmd, State, Data, Args) -> stop | State'
-
-%% Checkbutton "Hide System Processes"
-execute_cmd('Hide System', State, _Data, Args) ->
- [_Text, _Group, Bool|_Rest] = Args,
- State2 = State#state{hide_system=Bool},
- refresh(State2);
-
-%% Checkbutton "Auto-Hide New"
-execute_cmd('Auto Hide New', State, _Data, Args ) ->
- [_Text, _Group, Bool|_Rest] = Args,
- refresh(State#state{hide_new=Bool});
-
-%% File->Options...
-execute_cmd('Default Options', State, _Data, _Args) ->
- OldOptions = State#state.options,
- NewOptions = pman_options:dialog(State#state.win,
- "Default Trace Options",
- OldOptions),
- case NewOptions of
- {error, _Reason} ->
- State;
- Options ->
- State#state{options=Options}
- end;
-
-%% File->Save Options
-%% Save the set default options to the user's option file
-execute_cmd('Save Options', State, _Data, _Args)->
- Options = State#state.options,
- File = options_file(),
- Parent = State#state.win,
-
- case pman_options:save_to_file(Options, File) of
- ok ->
- tool_utils:notify(Parent, "Options saved to\n" ++ File);
- {error, ReasonStr} ->
- Msg = io_lib:format("Could not save options to~n~s:~n~s",
- [File, ReasonStr]),
- tool_utils:notify(Parent, Msg)
- end,
- State;
-
-%% File->Exit
-%% Exit the application
-execute_cmd('Exit', _State, _Data, _Args) ->
- stop;
-
-%% View->Hide All Processes
-execute_cmd('Hide All', State, _Data, _Args) ->
- Node = State#state.node,
- HideAll = nl_update(Node, true, State#state.hide_all),
- ShowPids = nl_del_all(State#state.node, State#state.show_pids),
- State2 = State#state{hide_all=HideAll, show_pids=ShowPids},
- refresh(State2, true);
-
-%% View->Hide modules...
-%% Opens a dialog where the user can select from a list of
-%% the loaded modules.
-%% The selected module is added to the list of hidden modules.
-execute_cmd('Hide Modules', State, _Data, _Args) ->
-
- %% Get all loaded modules that are not already hidden
- AllModules = lists:map(fun({Module, _File}) -> Module end,
- code:all_loaded()),
- ModulesSet = ordsets:subtract(ordsets:from_list(AllModules),
- State#state.hide_modules),
-
- %% Let the user select which of the loaded modules to exclude from
- %% the process overview
- Title = "Module selection",
- case pman_tool:select(State#state.win, Title, ModulesSet) of
- Modules when is_list(Modules) ->
- HideModules = ordsets:union(State#state.hide_modules,
- ordsets:from_list(Modules)),
- refresh(State#state{hide_modules=HideModules});
- cancelled -> State
- end;
-
-%% View->Hide Selected Process
-%% The process in focus should explicitly be hidden
-execute_cmd('Hide Selected Process', State, _Data, _Args) ->
- case State#state.focus_pid of
- undefined -> State;
- Pid ->
- Node = State#state.node,
- HidePids = nl_add(Node, Pid, State#state.hide_pids),
- ShowPids = nl_del(Node, Pid, State#state.show_pids),
- refresh(State#state{hide_pids=HidePids, show_pids=ShowPids})
- end;
-
-%% View->Module Info...
-%% Open window with module information.
-execute_cmd('Module', State, _Data, _Args) ->
- case get_pid_in_focus(State#state.focus, State#state.grid) of
- {true, {pidfunc, _Pid, {Module,_Name,_Arity}}} ->
- pman_module_info:start(Module);
- _ -> % false | {true, {pidfunc, Pid, Other}}
- ignore
- end,
- State;
-
-%% View->Refresh
-%% Refresh the main window.
-%% (Called automatically every ?REFRESH_TIME millisecond)
-execute_cmd('Refresh', State, _Data, _Args) ->
- refresh(State);
-
-%% View->Show All Processes
-%% Makes all processes visible except system processes and new
-%% processes, if those buttons are checked.
-%% Note: Also un-hides all hidden modules!
-execute_cmd('Show All', State, _Data, _Args) ->
- Node = State#state.node,
- HideAll = nl_update(Node, false, State#state.hide_all),
- HidePids = nl_del_all(State#state.node, State#state.hide_pids),
- ShowPids = nl_del_all(State#state.node, State#state.show_pids),
- State2 = State#state{hide_modules=ordsets:new(), hide_all=HideAll,
- hide_pids=HidePids, show_pids=ShowPids},
- refresh(State2, true);
-
-%% View->Show Processes...
-%% Open a list of all hidden processes, if the user selects one this
-%% process should explicitly be shown
-execute_cmd('Show Selected', State, _Data, _Args) ->
- Node = State#state.node,
-
- All = pman_process:r_processes(Node),
- Hidden = case nl_lookup(Node, State#state.hide_all) of
- true ->
- All;
- false ->
- Shown = nl_lookup(Node, State#state.shown_pids),
- ordsets:subtract(All, Shown)
- end,
-
- %% Selection window
- Title = "Select Processes to Show",
- Tuples =
- lists:map(fun(Pid) ->
- {M,F,A} = pman_process:function_info(Pid),
- Str = case pman_process:get_name(Pid) of
- " " ->
- io_lib:format("~p:~p/~p",
- [M, F, A]);
- Name ->
- io_lib:format("[~p] ~p:~p/~p",
- [Name, M, F, A])
- end,
- {Pid, Str}
- end,
- Hidden),
- case pman_tool:select(State#state.win, Title, Tuples) of
- Pids when is_list(Pids) ->
- HidePids = nl_del(Node, Pids, State#state.hide_pids),
- ShowPids = nl_add(Node, Pids, State#state.show_pids),
- refresh(State#state{hide_pids=HidePids,show_pids=ShowPids});
- cancelled -> State
- end;
-
-%% Trace->Kill
-execute_cmd('Kill', State, _Data, _Args) ->
- case State#state.focus_pid of
- Pid when is_pid(Pid) ->
- exit(Pid, kill);
- undefined ->
- ignore
- end,
- State;
-
-%% Trace->Selected Process
-execute_cmd('Trace Process', State, _Data, _Args) ->
- case State#state.focus_pid of
- Pid when is_pid(Pid) ->
- pman_shell:start({Pid,self()}, State#state.options);
- undefined ->
- ignore
- end,
- State;
-
-%% Trace->Shell Process
-execute_cmd('Trace Shell', State, _Data, _Args) ->
- case pman_shell:find_shell() of
- noshell ->
- State;
- Shell ->
- pman_shell:start({{shell,Shell},self()},
- State#state.options),
- State#state{noshell=false}
- end;
-
-%% Nodes->Show <Node>
-%% Change shown node
-execute_cmd({node,Node}, State, _Data, _Args) ->
- gse:config(State#state.win,
- [{title,lists:concat(["Pman: Overview on ", Node])}]),
- gse:disable(Node),
- catch gse:enable(State#state.node), % Menu may not exist any more
- refresh(State#state{node=Node}, true);
-
-%% Help->Help
-execute_cmd('Help', State, _Data, _Args) ->
- Win = State#state.win,
- HelpFile =
- filename:join([code:lib_dir(pman),"doc","html","index.html"]),
- tool_utils:open_help(Win, HelpFile),
- State;
-
-%% Keyboard shortcut Ctrl-l
-execute_cmd('All Links', State, _Data, _Args) ->
- case State#state.focus_pid of
- Pid when is_pid(Pid) ->
- case process_info(Pid, links) of
- {links, Pids} ->
- pman_shell:start_list(Pids, self(),
- State#state.options);
- undefined ->
- ignore
- end;
- undefined -> ignore
- end,
- State;
-
-%% Keyboard shortcuts for process grid traversal
-execute_cmd(focus_previous, State, _Data, _Args) ->
- focus(previous_row(State), State);
-execute_cmd(focus_next, State, _Data, _Args) ->
- focus(next_row(State), State);
-
-%% Keyboard combinations that are not shortcuts
-execute_cmd(dummy, State, _Data, _Args) ->
- State.
-
-%% Convenience functions for disabling/enabling menu items that require
-%% that a process is selected.
-disable_pid_actions() ->
- lists:foreach(fun(X) -> gse:disable(X) end, ?REQUIRES_FOCUS).
-
-enable_pid_actions() ->
- lists:foreach(fun(X) -> gse:enable(X) end, ?REQUIRES_FOCUS).
-
-%% refresh(State) -> State'
-%% refresh(State, ForceP) -> State'
-%% Refreshes the main window.
-refresh(State) ->
- refresh(State, false).
-refresh(#state{node=Node} = State, ForceP) ->
-
- %% Update shown processes
-
- %% First, get an ordset of all processes running at the current node
- All = pman_process:r_processes(Node),
-
- Shown = nl_lookup(Node, State#state.shown_pids),
- ExpShown = nl_lookup(Node, State#state.show_pids),
-
- {Show, State2} =
- case nl_lookup(Node, State#state.hide_all) of
-
- %% If the user has selected "Hide All Processes", only
- %% explicitly selected processes which still exist should
- %% be shown
- true ->
- {ordsets:intersection(ExpShown, All), State};
-
- false ->
- %% Compute which processes should be hidden according
- %% to the flags/menu items selected
- Hidden = hidden_pids(All, State),
-
- NotHidden = ordsets:subtract(All, Hidden),
-
- Show0 = case State#state.hide_new of
- %% If the user has selected "Auto-Hide New",
- %% then only those processes in NotHidden
- %% which are already shown, should be shown,
- %% together with explicitly selected
- %% processes which still exist
- true ->
- ordsets:union(
- ordsets:intersection(NotHidden,Shown),
- ordsets:intersection(ExpShown, All));
-
- %% Otherwise, show all processes in
- %% NotHidden, together with explicitly
- %% selected processes which still exist
- false ->
- ordsets:union(
- NotHidden,
- ordsets:intersection(ExpShown, All))
- end,
-
- ShownPids = nl_update(Node, Show0,
- State#state.shown_pids),
- {Show0, State#state{shown_pids=ShownPids}}
- end,
-
- NoOfHidden = length(All) - length(Show),
-
- if
- Show==Shown, not ForceP ->
- pman_win:update(NoOfHidden),
- State;
-
- true ->
- ShowInfo = display_info(Show),
- pman_win:update(State#state.grid, ShowInfo, NoOfHidden),
-
- %% Set the focus appropriately
- State3 = case State2#state.focus_pid of
- undefined ->
- disable_pid_actions(),
- State2;
- Pid ->
- Row = get_row(Pid, Show),
- focus(Row, State2)
- end,
-
- trace_shell_possible(State3),
-
- Size = length(Show),
- case Size of
- 1 -> gse:disable('Hide All');
- _ -> gse:enable('Hide All')
- end,
-
- State3#state{size=Size}
- end.
-
-%% hidden_pids(All, State) -> Hidden
-hidden_pids(All, State) ->
-
- %% Processes hidden because they are system processes
- HideSys = case State#state.hide_system of
- true ->
- lists:filter(
- fun(Pid) ->
- pman_process:is_system_process(Pid)
- end,
- All);
- false ->
- []
- end,
-
- %% Process hidden because they are executing code in a hidden module
- Mods = State#state.hide_modules,
- HideMod =
- lists:filter(fun(Pid) ->
- pman_process:is_hidden_by_module(Pid, Mods)
- end,
- All),
-
- %% Explicitly hidden processes
- HideExp = nl_lookup(State#state.node, State#state.hide_pids),
-
- %% All hidden processes
- ordsets:union([HideSys, HideMod, HideExp]).
-
-display_info(Pids) ->
- lists:map(fun(Pid) ->
- Func = pman_process:function_info(Pid),
- Name = pman_process:get_name(Pid),
- Msgs = pman_process:msg(Pid),
- Reds = pman_process:reds(Pid),
- Size = pman_process:psize(Pid),
- {Pid, Func, Name, Msgs, Reds, Size}
- end,
- Pids).
-
-get_row(Pid, List) ->
- get_row(Pid, List, length(List)+1).
-
-get_row(Pid, [Pid | _], Row) ->
- Row;
-get_row(Pid, [_ | T], Row) ->
- get_row(Pid, T, Row-1);
-get_row(_Pid, [], _Row) ->
- 1.
-
-next_row(#state{size=Size, focus=Row}) ->
- check_row(Row+1, Size).
-
-previous_row(#state{size=Size, focus=Row}) ->
- check_row(Row-1, Size).
-
-check_row(1, Size) ->
- Size+1;
-check_row(Row, Size) when Row==Size+2 ->
- 2;
-check_row(Row, _Size) ->
- Row.
-
-%% Check if node is running in noshell mode and if so disable the
-%% 'Trace Shell' menu option.
-trace_shell_possible(#state{noshell=true}) ->
- gse:disable('Trace Shell');
-trace_shell_possible(_) ->
- ok.
-
-%% -- Functions for manipulating {Node, Data} lists --
-
-%% nl_add(Node, Elem|Elems, NList) -> NList'
-nl_add(Node, Elems, [{Node, Ordset} | T]) when is_list(Elems) ->
- [{Node, ordsets:union(Elems, Ordset)} | T];
-nl_add(Node, Elem, [{Node, Ordset} | T]) ->
- [{Node, ordsets:add_element(Elem, Ordset)} | T];
-nl_add(Node, Elem, [H | T]) ->
- [H | nl_add(Node, Elem, T)];
-nl_add(Node, Elems, []) when is_list(Elems) ->
- [{Node, Elems}];
-nl_add(Node, Elem, []) ->
- [{Node, ordsets:add_element(Elem, ordsets:new())}].
-
-%% nl_del(Node, Elem|Elems, NList) -> NList'
-nl_del(Node, Elems, [{Node, Ordset} | T]) when is_list(Elems) ->
- [{Node, ordsets:subtract(Ordset, Elems)} | T];
-nl_del(Node, Elem, [{Node, Ordset} | T]) ->
- [{Node, ordsets:del_element(Elem, Ordset)} | T];
-nl_del(Node, Elem, [H | T]) ->
- [H | nl_del(Node, Elem, T)];
-nl_del(_Node, _Elem, []) ->
- [].
-
-%% nl_del_all(Node, NList) -> NList'
-nl_del_all(Node, [{Node, _Ordset} | T]) ->
- [{Node, ordsets:new()} | T];
-nl_del_all(Node, [H | T]) ->
- [H | nl_del_all(Node, T)];
-nl_del_all(_Node, []) ->
- [].
-
-%% nl_update(Node, Val, NList) -> NList'
-nl_update(Node, Val, [{Node, _OldVal} | T]) ->
- [{Node, Val} | T];
-nl_update(Node, Val, [H | T]) ->
- [H | nl_update(Node, Val, T)];
-nl_update(Node, Val, []) ->
- [{Node, Val}].
-
-%% nl_lookup(Node, NList) -> Val
-nl_lookup(Node, NList) ->
- {value, {_Node,Val}} = lists:keysearch(Node, 1, NList),
- Val.
-
-%% nl_exists(Node, NList) -> bool()
-nl_exists(Node, NList) ->
- case lists:keysearch(Node, 1, NList) of
- {value, _Val} ->
- true;
- false ->
- false
- end.
diff --git a/lib/pman/src/pman_module_info.erl b/lib/pman/src/pman_module_info.erl
deleted file mode 100644
index 944fd4a462..0000000000
--- a/lib/pman/src/pman_module_info.erl
+++ /dev/null
@@ -1,133 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(pman_module_info).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,start,1}}]).
-
-%% Window with module information (View->Module Info...)
-
-%% External exports
--export([start/1]).
-
-%% Record for keeping the loop state for the
-%% module info process.
--record(state, {topwin, % GS identifier for top window
- editor, % GS identifier for editor
- module, % Name of the viewed module
- parent}). % Pid of the parent
-
-start(Module) ->
- Self = self(),
- spawn_link(fun() -> init(Module, Self) end).
-
-init(Module, Parent) ->
- process_flag(trap_exit, true),
-
- GS = gs:start([{kernel,true}]),
- Font = pman_win:font(GS),
-
- WinTitle = lists:flatten(io_lib:format("Pman - Module Info: ~p",
- [Module])),
- WinOptions = [{title,WinTitle}, {width,550}, {height, 400},
- {configure,true}, {keypress,true}, {destroy,true}],
- TopWindow = gse:window(GS, WinOptions),
-
- %% File menu
- MenuBar = gse:menubar(TopWindow, []),
- MBFile = gse:menubutton(MenuBar, [{label,{text," File "}},
- {font,Font}, {underline, 1}]),
- MenuFile = gse:menu(MBFile, []),
-
- gse:named_menuitem('Save buffer', MenuFile,
- [{label,{text,"Save buffer..."}},
- {font,Font}, {underline,0}]),
- gse:named_menuitem('Close', MenuFile,
- [{label,{text,"Close"}},
- {font,Font}, {underline,0}]),
-
- %% Output part of window
- Editor = gse:editor(TopWindow,
- [{font,Font},
- {x,3}, {y,40}, {width,546}, {height,348}]),
- gse:config(Editor, [{keypress,true},
- {insert,{'end',pman_win:module_data(Module)}}]),
- gse:config(Editor, [{enable,false},
- {vscroll,right}, {hscroll,bottom},
- {wrap,none}]),
- gse:map(TopWindow),
-
- State = #state{topwin=TopWindow, editor=Editor, module=Module,
- parent=Parent},
- loop(State).
-
-loop(State) ->
-
- receive
- %% Die if the parent dies
- {'EXIT', Pid, _Reason} when Pid==State#state.parent ->
- gse:destroy(State#state.topwin);
-
- %% Ignore other exit signals (from file dialog window)
- {'EXIT', _Pid, _Reason} ->
- loop(State);
-
- %% Window closed
- {gs, _TopWindow, destroy, [], []} ->
- ok;
-
- %% Window resized or moved
- {gs, _TopWindow, configure ,_Data, [W,H,_X,_Y|_]} ->
- gs:config(State#state.editor, [{width,W-3}, {height,H-40}]),
- loop(State);
-
- %% Close - destroy window and exit process
- {gs, 'Close', click, _Data, _Args} ->
- gse:destroy(State#state.topwin),
- ok;
-
- %% Save Buffer - make filename and save buffer to file
- {gs, 'Save buffer', click, _Data, _Args} ->
- save_buffer(State),
- loop(State);
-
- %% Keyboard accelerator commands
- {gs, _, keypress, [], [c,_,0,1]} -> % 'Close'
- gse:destroy(State#state.topwin),
- ok;
- {gs, _, keypress, [], [s,_,0,1]} -> % 'Save buffer'
- save_buffer(State),
- loop(State);
- {gs, _, keypress, _Data, _Args} ->
- loop(State)
- end.
-
-save_buffer(State) ->
- DefaultFile = atom_to_list(State#state.module) ++ ".module_info",
- Result = tool_utils:file_dialog([{type,save}, {file,DefaultFile}]),
- case Result of
- %% User selected a file, now save the result
- {ok, File, _Dir} ->
- gs:config(State#state.editor, {save,File}),
- Msg = "Module information saved in file\n" ++ File,
- tool_utils:notify(State#state.topwin, Msg);
-
- %% File dialog was cancelled in some way.
- {error, _Reason} ->
- ignore
- end.
diff --git a/lib/pman/src/pman_options.erl b/lib/pman/src/pman_options.erl
deleted file mode 100644
index 0765458fdc..0000000000
--- a/lib/pman/src/pman_options.erl
+++ /dev/null
@@ -1,395 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(pman_options).
-
-%% Window with trace options settings (File->Options...)
-
--export([dialog/3,
- read_from_file/1, save_to_file/2]).
-
--include("pman_options.hrl").
-
--define(WIN_WIDTH, 350).
--define(WIN_HEIGHT, 350).
-
--define(TOP_WINDOW, xx_pman_option_window_xx).
--define(TOP_FRAME, xx_pman_top_frame_xx).
-
--record(state, {resize_frame, % GS identifier for the main frame
- parent}). % Pid of parent
-
-%%--dialog/3------------------------------------------------------------
-%% Create a window, or return a value indicating that is is already
-%% created.
-
-dialog(ParentWin, Title, Options) ->
- Self = self(),
- Pid = spawn(fun() -> dialog(Self, ParentWin, Title, Options) end),
- receive
- {Pid, Value} ->
- Value % Options2 | {error,destroyed} | {error,cancelled}
- end.
-
-dialog(Parent, ParentWin, Title, Options) ->
-
- %% Check if the dialog has already been created, in that
- %% case, we can reuse it. Otherwise a new dialog is created.
- case gse:name_occupied(?TOP_WINDOW) of
- false -> make_window(ParentWin, Title);
- true -> ok
- end,
-
- %% Window has now been created or may be re-used
- update_window_from_options(Options),
-
- gse:resize(?TOP_FRAME, ?WIN_WIDTH, ?WIN_HEIGHT),
- gse:map(?TOP_WINDOW),
-
- loop(#state{resize_frame=?TOP_FRAME, parent=Parent}).
-
-loop(State) ->
- receive
- {gs, _Id, destroy, _Data, _Arg} ->
- State#state.parent ! {self(), {error,destroyed}};
-
- {gs, ?TOP_WINDOW, configure, _Data, [W, H |_]} ->
- gse:config(State#state.resize_frame,
- [{width,W},{height,H}]), % repack
- loop(State);
-
- {gs, ok_button, click, _Data, _Arg} ->
- Options = get_options_from_window(),
- gse:unmap(?TOP_WINDOW),
- State#state.parent ! {self(), Options};
-
- {gs, cancel_button, click, _Data, _Arg} ->
- gse:unmap(?TOP_WINDOW),
- State#state.parent ! {self(), {error,cancelled}};
-
- {gs, trace_spawn, click, _Data, [_Text,_,Value]} ->
- group_radio(Value, trace_spawn_all, [trace_spawn_all,
- trace_spawn_first]),
- loop(State);
-
- {gs, trace_link, click, _Data, [_Text,_,Value]} ->
- group_radio(Value, trace_link_all, [trace_link_all,
- trace_link_first]),
- loop(State);
-
- {gs, trace_in_window, click, _Data, _Arg} ->
- lists:foreach(fun(X) -> gse:disable(X) end,
- [trace_file, trace_file_browse]),
- loop(State);
-
- {gs, trace_to_file, click, _Data, [_Text,_,_Value]} ->
- lists:foreach(fun(X) -> gse:enable(X) end,
- [trace_file, trace_file_browse]),
- loop(State);
-
- {gs, trace_file_browse, click, _Data, _Arg} ->
- Result = tool_utils:file_dialog([{type,save},
- {file, "Untitled.log"}]),
- case Result of
- {error, _Reason} ->
- loop(State);
- {ok, Name,_State} ->
- gse:config(trace_file, [{text, Name}]),
- loop(State)
- end
- end.
-
--define(LBLOPTS, [{justify,left}, {align,w}]).
--define(BTNOPTS, [{justify,left}, {align,w}]).
-
-make_window(ParentWin, Title) ->
-
- Font = pman_win:font(),
-
- gse:named_window(?TOP_WINDOW, ParentWin, [{title,Title},
- {configure,true},
- {width, ?WIN_WIDTH},
- {height, ?WIN_HEIGHT}]),
-
- gse:named_frame(?TOP_FRAME, ?TOP_WINDOW,
- [{bw,3},
- {packer_x,[{stretch,1,175}, {stretch,1,175}]},
- {packer_y,[{stretch,3},{stretch,2},{stretch,1}]}]),
-
- F11 = gse:frame(?TOP_FRAME, [{bw,3},
- {pack_xy,{1,1}},
- {packer_x,[{stretch,1},
- {stretch,20},
- {stretch,2}]},
- {packer_y,[{stretch,2},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1}]}]),
-
- gse:label(F11,[{pack_xy,{2,1}},
- {label,{text,"Trace output options:"}},
- {font,Font} | ?LBLOPTS]),
-
- gse:named_checkbutton(trace_send, F11,
- [{pack_xy,{2,2}},
- {label,{text,"Trace send"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_checkbutton(trace_receive, F11,
- [{pack_xy,{2,3}},
- {label,{text, "Trace receive"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_checkbutton(trace_functions,F11,
- [{pack_xy,{2,4}},
- {label,{text, "Trace functions"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_checkbutton(trace_events,F11,
- [{pack_xy,{2,5}},
- {label,{text, "Trace events"}},
- {font,Font} | ?BTNOPTS]),
-
- F21 = gse:frame(?TOP_FRAME, [{bw,3},
- {pack_xy,{2,1}},
- {packer_x,[{stretch,1},
- {stretch,2},
- {stretch,2},
- {stretch,20},
- {stretch,1}]},
- {packer_y,[{stretch,2},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1},
- {stretch,1}]}]),
-
- gse:label(F21, [{pack_xy,{{2,4},1}},
- {label,{text,"Inheritance options:"}},
- {font,Font} | ?LBLOPTS]),
-
- gse:named_checkbutton(trace_spawn, F21,
- [{pack_xy,{{2,4},2}},
- {data,trace_send},
- {label,{text,"Inherit on spawn"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_radiobutton(trace_spawn_all, F21,
- [{pack_xy,{{3,4},3}},
- {group,spawn},
- {data,trace_receive},
- {label,{text, "All spawns"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_radiobutton(trace_spawn_first, F21,
- [{pack_xy,{{3,4},4}},
- {group,spawn},
- {data,trace_receive},
- {label,{text,"First spawn only"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_checkbutton(trace_link, F21,
- [{pack_xy,{{2,4},6}},
- {data,trace_send},
- {label,{text,"Inherit on link"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_radiobutton(trace_link_all, F21,
- [{pack_xy,{{3,4},7}},
- {group,link},
- {data,trace_receive},
- {label,{text,"All links"}},
- {font,Font} | ?BTNOPTS]),
-
- gse:named_radiobutton(trace_link_first, F21,
- [{pack_xy,{{3,4},8}},
- {group,link},
- {data,trace_receive},
- {label,{text,"First link only"}},
- {font,Font} | ?BTNOPTS]),
-
- F12 = gse:frame(?TOP_FRAME, [{bw,3},
- {pack_xy,{{1,2},2}},
- {packer_x,[{stretch,1},
- {stretch,5}, % Label
- {stretch,1},
- {stretch,10}, % Field
- {stretch,1},
- {stretch,5}, % Button
- {stretch,1}]},
- {packer_y,[{stretch,2},
- {stretch,1},
- {stretch,1},
- {stretch,1}]}]),
-
- gse:label(F12, [{pack_xy,{{2,6},1}},
- {label,{text,"Trace output options:"}},
- {font,Font} | ?LBLOPTS]),
- gse:named_radiobutton(trace_in_window, F12,
- [{pack_xy,{{2,6},2}},
- {group, trace_dest},
- {label,{text,"In window"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_radiobutton(trace_to_file, F12,
- [{pack_xy,{2,3}},
- {group, trace_dest},
- {label,{text,"To file"}},
- {font,Font} | ?BTNOPTS]),
- gse:named_entry(trace_file, F12, [{pack_xy,{4,3}}, {font,Font}]),
- gse:named_button(trace_file_browse, F12,
- [{pack_xy,{6,3}},
- {label,{text," Browse..."}},
- {font,Font} | ?BTNOPTS]),
-
- F13 = gse:frame(?TOP_FRAME, [{bw,3},
- {pack_xy,{{1,2},3}},
- {packer_x,[{stretch, 1},
- {fixed, 60},
- {stretch, 1},
- {fixed, 60},
- {stretch, 1}]},
- {packer_y,[{stretch,1},
- {fixed, 30},
- {stretch,1}]}]),
-
- gse:named_button(ok_button, F13, [{pack_xy,{2,2}},
- {label,{text,"OK"}},
- {font,Font}]),
- gse:named_button(cancel_button, F13, [{pack_xy,{4,2}},
- {label,{text,"Cancel"}},
- {font,Font}]).
-
-update_window_from_options(Options) ->
-
- %% Trace output
- gse:config(trace_send, [{select,Options#trace_options.send}]),
- gse:config(trace_receive,
- [{select,Options#trace_options.treceive}]),
- gse:config(trace_functions,
- [{select,Options#trace_options.functions}]),
- gse:config(trace_events, [{select,Options#trace_options.events}]),
-
- %% Trace inheritance
- case (Options#trace_options.inherit_on_all_spawn or
- Options#trace_options.inherit_on_1st_spawn) of
- true ->
- gse:select(trace_spawn),
- gse:config(trace_spawn_all,
- [{select,Options#trace_options.inherit_on_all_spawn}]),
- gse:config(trace_spawn_first,
- [{select,Options#trace_options.inherit_on_1st_spawn}]);
- false ->
- lists:foreach(fun(X) -> gse:disable(X) end,
- [trace_spawn_all,trace_spawn_first])
- end,
-
- case (Options#trace_options.inherit_on_all_link or
- Options#trace_options.inherit_on_1st_link) of
- true -> gse:select(trace_link),
- gse:config(trace_link_all,
- [{select,Options#trace_options.inherit_on_all_link}]),
- gse:config(trace_link_first,
- [{select, Options#trace_options.inherit_on_1st_link}]);
- false ->
- lists:foreach(fun(X) -> gse:disable(X) end,
- [trace_link_all,trace_link_first])
- end,
-
- %% Trace ouput destinations
- gse:config(trace_in_window,
- [{select,(not Options#trace_options.to_file)}]),
-
- gse:config(trace_to_file, [{select,Options#trace_options.to_file}]),
- gse:config(trace_file, [{text,Options#trace_options.file}]),
- case Options#trace_options.to_file of
- true ->
- ok;
- false ->
- lists:foreach(fun(X) -> gse:disable(X) end,
- [trace_file, trace_file_browse])
- end.
-
-get_options_from_window() ->
- #trace_options{send = gse:read(trace_send,select),
- treceive = gse:read(trace_receive,select),
- functions = gse:read(trace_functions,select),
- events = gse:read(trace_events,select),
- inherit_on_1st_spawn = gse:read(trace_spawn_first,select),
- inherit_on_all_spawn = gse:read(trace_spawn_all,select),
- inherit_on_1st_link = gse:read(trace_link_first,select),
- inherit_on_all_link = gse:read(trace_link_all,select),
- to_file = gse:read(trace_to_file,select),
- file = gse:read(trace_file,text)}.
-
-group_radio(Value, Default, GroupList) ->
- case Value of
- true ->
- gse:select(Default),
- lists:foreach(fun(X) -> gse:enable(X) end, GroupList);
- false ->
- lists:foreach(fun(X) -> gse:deselect(X) end, GroupList),
- lists:foreach(fun(X) -> gse:disable(X) end, GroupList)
- end.
-
-%%--read_from_file/(File)-----------------------------------------------
-%% Returns the options saved in File.
-%% If no options can be found, then the default options are
-%% returned.
-
-read_from_file(File) ->
- case file:consult(File) of
- {ok, [Term]} ->
- if
- is_record(Term, trace_options) ->
- {ok, Term};
- true ->
- {error, "unexpected contents", #trace_options{}}
- end;
- {ok, _Terms} ->
- {error, "unexpected contents", #trace_options{}};
- {error, Tuple} when is_tuple(Tuple) -> % {Line,Mod,Term}
- {error, "erroneous contents", #trace_options{}};
- {error, _Posix} ->
- %% The most probable reason is that the file does not
- %% exist, this is not an error so we simply return
- %% the default trace options instead
- {ok, #trace_options{}}
- end.
-
-%%--save_to_file(Options, File)-----------------------------------------
-
-save_to_file(Options, File) ->
- case file:open(File, [write]) of
- {ok, Fd} ->
- {{Year,Month,Day},{H,M,S}} = calendar:local_time(),
- io:format(Fd, "%%%~n", []),
- io:format(Fd, "%%% File: ~s~n", [File]),
- io:format(Fd, "%%% Date: ~w-~2..0w-~2..0w, ~2..0w:~2..0w:~2..0w~n",
- [Year,Month,Day,H,M,S]),
- io:format(Fd, "%%%~n", []),
- io:format(Fd, "%%% This file was created by Pman. ~n", []),
- io:format(Fd, "%%%~n", []),
- io:format(Fd, "%%% DO NOT EDIT! ~n", []),
- io:format(Fd, "%%%~n", []),
- io:format(Fd, "%%%~n", []),
- io:format(Fd, "~p.~n", [Options]),
- file:close(Fd),
- ok;
- {error, Posix} ->
- {error, file:format_error(Posix)}
- end.
diff --git a/lib/pman/src/pman_options.hrl b/lib/pman/src/pman_options.hrl
deleted file mode 100644
index 047b9866c3..0000000000
--- a/lib/pman/src/pman_options.hrl
+++ /dev/null
@@ -1,34 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%
-%% An options-record contains the return data from the option dialog.
-%%
-
--record(trace_options, {send=true,
- treceive=true,
- functions=true,
- events=true,
- to_file=false,
- file="",
- inherit_on_1st_spawn=false,
- inherit_on_all_spawn=true,
- inherit_on_1st_link=false,
- inherit_on_all_link=true}).
-
diff --git a/lib/pman/src/pman_process.erl b/lib/pman/src/pman_process.erl
deleted file mode 100644
index 276407a0f1..0000000000
--- a/lib/pman/src/pman_process.erl
+++ /dev/null
@@ -1,317 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%% Purpose : A front-end to the erlang:process_info() functions, that
-%% can handle processes on different nodes in a transparent
-%% way.
-%% Also some convenience functions for process info, as well
-%% as some application specific functions for process
-%% classification.
-%%----------------------------------------------------------------------
-
--module(pman_process).
-
--export([pinfo/1, pinfo/2,
- r_processes/1,
- function_info/1,
- get_name/1, msg/1, reds/1, psize/1,
- is_running/1,
- is_pid_or_shell/1,
- get_pid/1,
- is_system_process/1,
- is_hidden_by_module/2
- ]).
-
-%% List of registered name that will make a prodcess a "SYSTEM"-process
--define(SYSTEM_REG_NAMES,
- [
- %% kernel
- application_controller,
- erl_reply,
- auth,
- boot_server,
- code_server,
- disk_log_server,
- disk_log_sup,
- erl_prim_loader,
- error_logger,
- file_server_2,
- fixtable_server,
- global_group,
- global_name_server,
- heart,
- inet_gethost_native,
- inet_gethost_native_sup,
- init,
- kernel_config,
- kernel_safe_sup,
- kernel_sup,
- net_kernel,
- net_sup,
- rex,
- user,
- os_server,
- ddll_server,
- erl_epmd,
- inet_db,
- pg2,
-
- %% stdlib
- timer_server,
- rsh_starter,
- take_over_monitor,
- pool_master,
- dets,
-
- %% sasl
- sasl_safe_sup, sasl_sup, alarm_handler, overload,
- release_handler,
-
- %% gs
- gs_frontend
- ]).
-
-%% List of module:function/arity calls that will make the caller a
-%% "SYSTEM"-process.
-%%
--define(SYSTEM_INIT_CALLS,
- [{application_master,init,4},
- {application_master,start_it,4},
- {inet_tcp_dist,accept_loop,2},
- {net_kernel,ticker,2},
- {supervisor_bridge,user_sup,1},
- {user_drv,server,2},
- {group,server,3},
- {kernel_config,init,1},
- {inet_tcp_dist,do_accept,6},
- {inet_tcp_dist,do_setup,6},
- {pman_main,init,2},
- {pman_buf_printer,init,2},
- {pman_buf_converter,init,2},
- {pman_buf_buffer,init,1},
- {gstk,init,1},
- {gstk_port_handler,init,2},
- {gstk,worker_init,1}
- ]).
-
-%% List of module:function/arity calls that will make the executing
-%% process a "SYSTEM"-process.
--define(SYSTEM_RUNNING_CALLS,
- [{file_io_server,server_loop,1},
- {global,loop_the_locker,1},
- {global,collect_deletions,2},
- {global,loop_the_registrar,0},
- {gs_frontend,request,2},
- {shell,get_command1,5},
- {shell,eval_loop,3},
- {io,wait_io_mon_reply,2},
- {pman_module_info,loop,1},
- {pman_options,dialog,3},
- {pman_options,loop,1},
- {pman_relay_server,loop,1},
- {pman_shell,monitor_loop,1},
- {pman_shell,safe_loop,2}
- ]).
-
-%% pinfo(Pid) -> [{Item, Info}] | undefined
-%% pinfo(Pid, Item) -> Info | undefined
-%% A version of process_info/1 that handles pid on remote nodes as well.
-pinfo({_, Pid}) -> % Handle internal process format
- pinfo(Pid);
-pinfo(Pid) when node(Pid)==node() ->
- process_info(Pid);
-pinfo(Pid) ->
- case rpc:call(node(Pid), erlang, process_info, [Pid]) of
- {badrpc, _} -> undefined;
- Res -> Res
- end.
-
-pinfo({_, Pid}, Item) -> % Handle internal process format
- pinfo(Pid, Item);
-pinfo(Pid, Item) when node(Pid)==node() ->
- case process_info(Pid, Item) of
- {Item, Info} -> Info;
- "" -> ""; % Item == registered_name
- undefined -> undefined
- end;
-pinfo(Pid, Item) ->
- case rpc:call(node(Pid), erlang, process_info, [Pid, Item]) of
- {badrpc, _} -> undefined;
- {Item, Info} -> Info;
- "" -> ""; % Item == registered_name
- undefined -> undefined
- end.
-
-%% function_info(Pid) -> {M, F, A}
-%% Returns the initial function for the specified process.
-function_info(Pid) ->
- case pinfo(Pid, current_function) of
- {Module, Function, Arity} ->
- {Module, Function, Arity};
- undefined ->
- {unknown, unknown, 0}
- end.
-
-%% r_processes(Node) -> Pids
-%% Return a list of all processes at Node.
-%%
-%% If there is a problem with getting information from a remote
-%% node, an empty list is returned.
-r_processes(Node) ->
- ordsets:from_list(r_processes1(Node)).
-
-r_processes1(Node) ->
- if
- Node==node() ->
- processes();
- true ->
- case rpc:block_call(Node, erlang, processes, []) of
- {badrpc, _} ->
- [];
- Pids -> Pids
- end
- end.
-
-%% is_running(Object) -> {true, {shell,Pid}} | {true, Pid} | false
-%% Object = {shell, Pid} | {link, Pid, ?} | Pid
-is_running({shell,Pid}) ->
- case is_running(Pid) of
- {true,Pid} ->
- {true,{shell,Pid}};
- false ->
- false
- end;
-is_running({link,Pid,_}) ->
- is_running(Pid);
-is_running(Pid) ->
- case is_pid_or_shell(Pid) of
- true ->
- case pinfo(Pid) of
- undefined -> false;
- _PInfo -> {true, Pid}
- end;
- false ->
- false
- end.
-
-%% is_pid_or_shell(Object) -> bool()
-%% Checks if the argument is an pid or a tuple {shell, Pid}.
-is_pid_or_shell({shell,Pid}) when is_pid(Pid) ->
- true;
-is_pid_or_shell(Pid) when is_pid(Pid) ->
- true;
-is_pid_or_shell(_) ->
- false.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% get_pid/1 - returns the Pid of the object provided that
-%% it is a proper process specifier.
-%%
-%% Arguments:
-%% Object A process specifier
-%%
-%% Returns:
-%% The Pid.
-
-get_pid({shell,Pid}) ->
- Pid;
-get_pid(Pid) when is_pid(Pid) ->
- Pid.
-
-%% is_system_process(Pid) -> bool()
-%% Returns true if Pid is a "system process".
-%% This is a prototype version, use file configuration later.
-is_system_process(Pid) ->
- catch is_system_process2(Pid).
-
-is_system_process2(Pid) ->
-
- %% Test if the registered name is a system registered name
- case pinfo(Pid, registered_name) of
- undefined -> ignore;
- "" -> ignore;
- Name ->
- case lists:member(Name, ?SYSTEM_REG_NAMES) of
- true -> throw(true);
- false -> ignore
- end
- end,
-
- %% Test if the start specification is a "system start function"
- MFAi = case pinfo(Pid, initial_call) of
- {proc_lib, init_p, 5} ->
- proc_lib:translate_initial_call(Pid); % {M,F,A} | Fun
- Res -> Res % {M,F,A} | undefined
- end,
- case lists:member(MFAi, ?SYSTEM_INIT_CALLS) of
- true -> throw(true);
- false -> ignore
- end,
-
- %% Test if the running specification is a "system running function"
- case pinfo(Pid, current_function) of
- undefined -> false;
- MFAc ->
- lists:member(MFAc, ?SYSTEM_RUNNING_CALLS)
- end.
-
-%% is_hidden_by_module(Pid, Modules) -> bool()
-%% Checks if Pid is to be hidden because it executes code from one
-%% of Modules
-is_hidden_by_module(Pid, Modules) ->
- case pinfo(Pid, current_function) of
- {Module, _Function, _Arity} ->
- lists:member(Module, Modules);
- undefined -> false
- end.
-
-%% get_name(Pid) -> Name | " "
-%% Returns the registered name of a process, if any, or " " otherwise.
-get_name(Pid) ->
- case pinfo(Pid, registered_name) of
- undefined -> " ";
- "" -> " ";
- Name -> Name
- end.
-
-%% msg(Pid) -> int()
-msg(Pid) ->
- case pinfo(Pid, messages) of
- undefined -> 0;
- Msgs -> length(Msgs)
- end.
-
-%% reds(Pid) -> int()
-reds(Pid) ->
- case pinfo(Pid, reductions) of
- undefined -> 0;
- Reds -> Reds
- end.
-
-%% psize(Pid) -> int()
-%% Returns the total process size (stack + heap).
-psize(Pid) ->
- Stack = pinfo(Pid, stack_size),
- Heap = pinfo(Pid, heap_size),
- case {Heap, Stack} of
- {undefined, undefined} -> 0;
- {undefined, Sz} -> Sz;
- {Sz, undefined} -> Sz;
- {Sz0, Sz1} -> Sz0 + Sz1
- end.
diff --git a/lib/pman/src/pman_relay.erl b/lib/pman/src/pman_relay.erl
deleted file mode 100644
index 289765492f..0000000000
--- a/lib/pman/src/pman_relay.erl
+++ /dev/null
@@ -1,127 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%----------------------------------------------------------------------
-%% Purpose : Interface function to relay calls (esp. trace calls)
-%% to processes on other nodes. Some of the calls
-%% are conditionally relayed.
-%%----------------------------------------------------------------------
-
--module(pman_relay).
-
-%%-compile(export_all).
--export([start/1,
- ok_to_trace/1,
- trac/3]).
-
-
--include("assert.hrl").
-
-%% --------------------------------------------------------------
-%% DISTRIBUTION
-%% --------------------------------------------------------------
-%% (???) Process dictionary alert!!!
-%%
-%% Since we are not allowed to do erlang:trace/3 on remote
-%% processe we create a help process at the remote node to
-%% do the job for us
-%% ---------------------------------------------------------------
-
-start(P) when is_pid(P), node(P)/=node() ->
-
- %% Remote supervision, relaying necessary
-
- put(relay, spawn_link(node(P), pman_relay_server, init, [self()]));
-
-
-start(_) ->
-
- %% Local supervision, no relaying
-
- ignore.
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% ok_to_trace/1 - Tests wheter we can actually start tracing
-%% a process.
-%%
-%% Arguments:
-%% Pid Pid of the process to trace (on local or remote node)
-%%
-%% Returns
-%% true If it is OK to trace the process
-%% false If the process is already traced, or some other
-%% condition prevents it from being traced.
-
-ok_to_trace(Pid) when node(Pid) == node()->
-
- %% Local trace, no relaying
-
- case catch erlang:trace(Pid, false, [send]) of
- 1 ->
- true;
- _Otherwise ->
- false
- end;
-ok_to_trace(Pid) ->
-
- %% Remote trace, relaying necessary
-
- PidRelay = get(relay),
- PidRelay ! {ok_to_trace, self(), Pid},
- receive
- {ok_to_trace, PidRelay} ->
- true;
- {not_ok_to_trace, PidRelay} ->
- false;
- _Otherwise ->
- ?ALWAYS_ASSERT("Unexpected message from relay process")
- after
- 5000 ->
- false
- end.
-
-
-
-
-
-
-%% ---------------------------------------------------------------
-%% Possibly send a request to do tracing to a remote node.
-%% ---------------------------------------------------------------
-
-trac(Pid, How, Flag) when node(Pid) == node() ->
-
- %% Local trace, no relaying necessary
-
-
- case catch erlang:trace(Pid, How, Flag) of
- 1 -> ok;
- _ -> pman_win:format("** Illegal trace request ** \n", [])
- end;
-
-trac(Pid, How, Flag) ->
-
-
-
- %% Remote trace, relaying necessary
-
- get(relay) ! {self(), erlang, trace, [Pid, How, Flag]}.
-
diff --git a/lib/pman/src/pman_relay_server.erl b/lib/pman/src/pman_relay_server.erl
deleted file mode 100644
index 2fcbb663bc..0000000000
--- a/lib/pman/src/pman_relay_server.erl
+++ /dev/null
@@ -1,57 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%%----------------------------------------------------------------------
-%%% Purpose : Relay server code.
-%%%----------------------------------------------------------------------
-
--module(pman_relay_server).
-
-%%-compile(export_all).
--export([init/1]).
-
-
-
-init(P) ->
- process_flag(trap_exit, true),
-
- loop(P).
-
-loop(P) ->
- receive
- {ok_to_trace, PidSender, PidToTrace} ->
- case catch erlang:trace(PidToTrace, false, [send]) of
- 1 ->
- PidSender ! {ok_to_trace, self()},
- loop(P);
- _Otherwise ->
- PidSender ! {not_ok_to_trace, self()}
- end;
-
- {P, M,F,A} ->
- case catch apply(M, F, A) of
- 1 -> ok;
- _Other -> P ! {print, "** Illegal trace request **\n", []}
- end,
- loop(P);
- {'EXIT', P, _Reason} ->
- exit(normal);
- Other -> %% Here is the normal case for trace i/o
- P ! Other,
- loop(P)
- end.
diff --git a/lib/pman/src/pman_shell.erl b/lib/pman/src/pman_shell.erl
deleted file mode 100644
index 2d2b8ce000..0000000000
--- a/lib/pman/src/pman_shell.erl
+++ /dev/null
@@ -1,827 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-%% ---------------------------------------------------------------
-%% Purpose: Create a trace window with process
-%% information or a help window with information
-%% about pman.
-%%
-%% ---------------------------------------------------------------
-
--module(pman_shell).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,start,1}}]).
-
-%% ---------------------------------------------------------------
-%% The user interface exports
-%% ---------------------------------------------------------------
-
--export([start_list/3,
- start/2,
- start/1,
- find_shell/0]).
-
-%% ---------------------------------------------------------------
-%% Includes
-%% ---------------------------------------------------------------
--include("assert.hrl").
--include("pman_options.hrl").
--include("pman_buf.hrl").
-
-
-%% ---------------------------------------------------------------
-%% Internal record declarations
-%% ---------------------------------------------------------------
--record(pman_shell,{win,
- editor,
- pid,
- buffer,
- father,
- shell_flag, % boolean, true for shell
- trace_options, % Keeps trace options
- db}). % DB for trace windows
-
-
-%%
-%% Constants
-%%
-
--define (PMAN_DB, pman_db). % The pman db for trace windows
-
-
-
-%% ---------------------------------------------------------------
-%% start/1, start/2
-%%
-%% Starts a new trace shell process.
-%%
-%% start(Pid, DefaultOptions)
-%% Pid The Pid of the process to trace
-%% DefaultOptions The default trace options passed along from
-%% the calling process.
-%%
-%%
-%% start(Pid)
-%% Pid The Pid of the process to trace
-%%
-%% start(Pid) starts without using any default options except for those
-%% hardwired into the application. (See pman_options.hrl).
-%%
-%%
-%% Return: Both functions return a process id
-%% ---------------------------------------------------------------
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start_list/3 - Starts a trace window for each of the processes
-%% in the list
-
-start_list(LIPid, Father, Options) ->
- StartFun = fun(Pid) ->
- start({Pid,Father}, Options)
- end,
- lists:foreach(StartFun, LIPid).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start/1 - Starts a trace window for the specified Pid.
-%%
-
-start(Pid) ->
- start(Pid, #trace_options{}).
-
-%%
-%% start/2
-%%
-
-start(Pid,DefaultOptions) when is_pid(Pid) ->
- start({Pid,self()}, DefaultOptions);
-
-start(Var,DefaultOptions) ->
- Db = db_start(),
- spawn_link(fun() -> internal(Var, DefaultOptions, Db) end).
-
-%% ---------------------------------------------------------------
-%% Initialize the enviroment for tracing/viewing Object
-%%
-%% Object can either be {shell,Shell} or a Pid.
-%% The main loop is then called, which handles trace and event
-%% requests. The window dies whenever Supervisor dies, while
-%% message windows die whenever their parent dies.
-%% ---------------------------------------------------------------
-
-internal({Object,Supervisor}, DefaultOptions, Db) ->
-
- %% (???) This call will cause minor problems when the window has been
- %% invoked with proc/1 from for instance the shell. The shell
- %% does not handle the exit-signals, so it will exit
- %% when the window is exited.
-
-
- %% First check that no other process is tracing the process we want
- %% to trace. There is no well defined way of doing this, so the
- %% code below is used instead. (???)
-
- pman_relay:start(Object), %(???) Uses proc. dict.
-
- Pid = pman_process:get_pid(Object),
-
- case pman_relay:ok_to_trace(Pid) of
-
- %% Tracing cannot be performed on the specified process
-
- false ->
- T = lists:flatten(io_lib:format("ERROR: Process ~p is already being~ntraced by some other process.~nOr there may be a problem communicating with it.",[Pid])),
- tool_utils:notify(gs:start(),T),
- exit(quit);
-
- %% Tracing can be performed, go ahead!
-
- true ->
-
- case db_insert_key (Db, Pid) of
- true ->
-
- link(Supervisor),
- process_flag(trap_exit, true),
-
- case catch pman_win:window(Object) of
- {'EXIT', badrpc} ->
- T = "ERROR: Could not access node",
- pman_win:dialog_window(gs:start(),T);
- {'EXIT', dead} ->
- T = "ERROR: The process is dead",
- pman_win:dialog_window(gs:start(),T);
- {'EXIT',_W} ->
- T = "ERROR: Untracable process \n(unexpected EXIT reason)",
- pman_win:dialog_window(gs:start(),T);
- {Win, Ed} ->
- init_monitor_loop(Win,
- Ed,
- Object,
- Supervisor,
- DefaultOptions,
- Db)
- end;
-
- false ->
- T = lists:flatten(io_lib:format("ERROR: Process ~p is already being~ntraced by some other process.",[Pid])),
- tool_utils:notify(gs:start(),T),
- exit(quit);
-
- Error ->
- Error
- end
-
- end.
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% init_monitor_loop/5
-
-init_monitor_loop(Win,Ed,Object,Supervisor, DefaultOptions, Db) ->
-
- process_flag(priority, max),
-
- %% Most default options come from the main window. Now we must set
- %% the default file name to something that is shows what process
- %% is being traced.
-
- %% Find out an appropriate file name to write the trace output
- %% to if the output should go to a file.
-
- FileName = case pman_process:is_pid_or_shell(Object) of
- true ->
- default_file_name(pman_process:get_pid(Object));
- false ->
- "NoName"
- end,
-
- Buff = pman_buf:start(Ed, FileName),
-
- case pman_process:is_running(Object) of
-
- %% We are tracing a shell process.
- {true,{shell,Pid}} ->
- safe_link(Pid),
- NewDefaultOptions =
- DefaultOptions#trace_options{file=FileName},
- perform_option_changes(Pid, NewDefaultOptions, Buff),
- monitor_loop(#pman_shell{win=Win, editor=Ed, pid=Pid, buffer=Buff,
- father = Supervisor,
- shell_flag = true,
- trace_options = NewDefaultOptions,
- db = Db});
-
- %% We are tracing an ordinary process.
- {true,Pid} ->
- safe_link(Pid),
- NewDefaultOptions =
- DefaultOptions#trace_options{file=FileName},
- perform_option_changes(Pid, NewDefaultOptions, Buff),
- monitor_loop(#pman_shell{win=Win, editor=Ed, pid=Pid, buffer=Buff,
- father = Supervisor,
- shell_flag = false,
- trace_options = NewDefaultOptions,
- db = Db});
-
- %% The process being traced is dead.
- false ->
- monitor_loop(#pman_shell{win=Win, editor=Ed, pid=nopid,
- buffer=Buff,
- father = Supervisor,
- shell_flag = false,
- trace_options= DefaultOptions,
- db = Db})
- end.
-
-%% ----------------------------------------------------------------
-%% What is the Pid of the shell on our node?
-%% ----------------------------------------------------------------
-
-find_shell() ->
- case shell:whereis_evaluator() of
- undefined -> % noshell
- noshell;
- Pid ->
- Pid
- end.
-
-%% ---------------------------------------------------------------
-%% Functions called in case of an exit message
-%% ---------------------------------------------------------------
-
-clean_up(Win, Buff,Pid) ->
-
- %% (???) Unlinks the traced process, but since we are using a safe link
- %% it is probably unnecessary.
-
- safe_unlink(Pid),
-
- %% Kill helper processes
-
- exit(Buff#buffer.converter, topquit),
- exit(Buff#buffer.buffer, topquit),
-
- gs:destroy(Win).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% exit_cmd/3 - Takes care of the necessary details when
-%% a linked process terminates.
-
-
-exit_cmd(Pid,_Reason, State) ->
- case State#pman_shell.shell_flag of
-
- %% This clause handles the case when a shell process dies.
- %% Since it is restarted and the intention is to continue tracing
- %% the restarted shell process, we need to handle it separately by
- %% finding the new shell process.
- true ->
-
- NewShell = find_shell(),
- safe_link(NewShell),
- pman_relay:start(NewShell),
-
- %% Update the window title with the new PID
- Title = pman_win:title({shell, NewShell}),
- Win = State#pman_shell.win,
- gse:config(Win,[{title,Title}]),
-
- pman_relay:trac(NewShell, true, flags()),
-
- B = State#pman_shell.buffer,
- B#buffer.converter!{raw,[{shell_died, Pid, NewShell}]},
-
-
-
- State#pman_shell{pid=NewShell};
-
- %% This clause handles the case when a traced process that is
- %% not a shell process dies.
- false ->
-
- B = State#pman_shell.buffer,
- B#buffer.converter!{raw,[{died, Pid}]},
-
- lists:foreach(fun(X) -> gse:disable(X) end,
- ['Options',
- 'Kill',
- 'LinksMenu']),
- State#pman_shell{pid=undefined}
- end.
-
-flags() ->
- [send, 'receive', call, procs,
- set_on_spawn, set_on_first_spawn, set_on_link, set_on_first_link].
-
-options_to_flaglists(Options) ->
- AssocList =
- [{Options#trace_options.send, send},
- {Options#trace_options.treceive, 'receive'},
- {Options#trace_options.inherit_on_1st_spawn, set_on_first_spawn},
- {Options#trace_options.inherit_on_all_spawn, set_on_spawn},
- {Options#trace_options.inherit_on_1st_link, set_on_first_link},
- {Options#trace_options.inherit_on_all_link, set_on_link},
- {Options#trace_options.events, procs},
- {Options#trace_options.functions,call}],
-
- TrueFun = fun ({Option,Flag}) ->
- case Option of
- true -> Flag;
- _Otherwise -> false
- end
- end,
- TrueFlags = mapfilter(TrueFun, AssocList),
-
- FalseFun = fun ({Option,Flag}) ->
- case Option of
- false -> Flag;
- _Otherwise -> false
- end
- end,
- FalseFlags = mapfilter(FalseFun, AssocList),
- {TrueFlags,FalseFlags}.
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% mapfilter/2 - Combines the functionality of lists:map and
-%% lists:filter. mapfilter applies the function argument to
-%% each element in the list. All returned values that are
-%% not false will occur in the resulting list.
-%%
-%% Arguments:
-%% Fun A fun that takes one argument
-%% List A list. Each element will become an argument to Fun.
-%%
-%% Returns:
-%% A list of all results from the map operation that are not false.
-%%
-
-mapfilter(Fun,[E|Es]) ->
- case apply(Fun,[E]) of
- false ->
- mapfilter(Fun,Es);
- Value -> [Value | mapfilter(Fun,Es)]
- end;
-mapfilter(_Fun, []) -> [].
-
-
-
-perform_option_changes(Pid,Options,Buffer) ->
-
- %% Notify the trace output functionality
- %% if the destination is supposed to go to a file...
-
- case Options#trace_options.to_file of
- true ->
- FName = Options#trace_options.file,
- Buffer#buffer.converter!{file,FName};
- false ->
- done
- end,
-
- %%...then set the trace flags of the traced process
-
- {OnFlags, OffFlags} = options_to_flaglists(Options),
- case catch begin
-
- %% (???) Note that the following calls cannot actually fail
- %% This may be a problem. And the catch appears unnecessary
- %% However, it may become necessary to let the
- %% pman_relay:trac/3 function retrun appropriate values.
- pman_relay:trac(Pid,true, OnFlags),
- pman_relay:trac(Pid,false, OffFlags)
- end of
- true ->
- ok;
- _ -> pman_win:format("** Illegal trace request ** \n", [])
- end.
-
-
-
-
-
-
-%% ---------------------------------------------------------------
-%% Take care of the command executed by the user.
-
-execute_cmd(Cmd,Shell_data) ->
- Window = Shell_data#pman_shell.win,
- Editor = Shell_data#pman_shell.editor,
- Shell = Shell_data#pman_shell.pid,
- Buffer = Shell_data#pman_shell.buffer,
- TraceOptions = Shell_data#pman_shell.trace_options,
-
- case Cmd of
- 'Close' ->
- db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
- clean_up(Window, Buffer, Shell),
- exit(quit);
- 'Destroy' ->
- db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
- exit(Buffer#buffer.buffer,topquit),
- safe_unlink(Shell),
- exit(Buffer#buffer.converter,topquit),
- exit(Buffer#buffer.buffer,topquit),
- exit(quit);
-
- 'Clear' when is_pid(Shell) ->
- New_buffer = pman_buf:clear(Buffer,pman_win:display(Shell),
- TraceOptions#trace_options.file),
- Shell_data#pman_shell{buffer = New_buffer};
- 'Save buffer' ->
- DefaultFile = "Pman_buffer." ++ default_file_name(Shell),
- Result = tool_utils:file_dialog([{type,save},
- {file,DefaultFile}]),
- case Result of
- {ok, UserFile, _State} ->
- Buffer#buffer.buffer!{save_buffer,UserFile};
- {error,_Reason} ->
- true
- end,
- Shell_data;
- 'Help' ->
- HelpFile = filename:join([code:lib_dir(pman), "doc", "html", "index.html"]),
- tool_utils:open_help(gs:start([{kernel, true}]), HelpFile),
- Shell_data;
- 'Kill' when is_pid(Shell) ->
- exit(Buffer#buffer.converter,killed),
- exit(Buffer#buffer.buffer,killed),
- lists:foreach(fun(X) -> gse:disable(X) end,
- ['TraceMenu',
- 'Clear']),
- catch exit(Shell, kill),
- Shell_data#pman_shell{pid = undefined};
- 'All Links' when is_pid(Shell) ->
- LIPid = pman_process:pinfo(Shell, links),
- ?ALWAYS_ASSERT("Just a brutal test"),
- start_list(LIPid,
- Shell_data#pman_shell.father,
- Shell_data#pman_shell.trace_options),
- Shell_data;
- 'Module' when is_pid(Shell) ->
- {ModuleName,_,_} = pman_process:function_info(Shell),
- pman_module_info:start(ModuleName),
- Shell_data;
- 'Options' when is_pid(Shell) ->
- case pman_options:dialog(Window,
- "Trace Options for Process",
- TraceOptions) of
- {error, _Reason} ->
- Shell_data;
- Options ->
- perform_option_changes(Shell, Options, Buffer),
- Shell_data#pman_shell{trace_options=Options}
- end;
-
- {trac,Choice,Bool} when is_pid(Shell) ->
- pman_relay:trac(Shell, Bool, [Choice]),
- Shell_data;
-
-
- {configure,{X,Y}} ->
- configure (Editor, X, Y),
- Shell_data;
-
- Pid when is_pid(Pid) ->
- pman_shell:start({Pid, Shell_data#pman_shell.father},
- Shell_data#pman_shell.trace_options),
- Shell_data;
- _Other ->
- ?ALWAYS_ASSERT("Received unexpected event"),
- Shell_data
- end.
-
-
-default_file_name(Shell) when is_pid(Shell) ->
- [A,B,C] = string:tokens(pid_to_list(Shell),[$.,$<,$>]),
- "pman_trace." ++ A ++ "_" ++ B ++ "_" ++ C;
-default_file_name(_OTHER) ->
- "shell".
-
-
-
-
-
-%% Key accellerators
-
-key(e) -> 'Clear';
-key(s) -> 'Save buffer';
-key(c) -> 'Close';
-key(a) -> 'All';
-key(r) -> 'Reset';
-key(m) -> 'Module';
-key(l) -> 'All Links';
-key(k) -> 'Kill';
-key(h) -> 'Help';
-key(z) -> 'Close';
-key(O) -> O.
-
-
-
-%% ---------------------------------------------------------------
-%% The main loop takes care of data coming in from the traces, as
-%% well as exit signals from proceses we are monitoring. Events
-%% caused by the user or window manager are also handled here.
-%% ---------------------------------------------------------------
-
-
-monitor_loop(Shell_data) ->
- receive
-
- %% WM destroy
- {gs,_Window,destroy,[],[]} -> %%Avoid links menus
- execute_cmd('Destroy', Shell_data);
-
-
- %% Handle EXIT signal from parent process
- {'EXIT', _Pid, topquit} ->
- clean_up(Shell_data#pman_shell.win,
- Shell_data#pman_shell.buffer,
- Shell_data#pman_shell.pid),
- exit(topquit);
-
- %% (???) Ignore "stray" EXIT signal from converter
- {'EXIT', _Pid, win_killed} ->
- monitor_loop(Shell_data);
-
-
- %% Handle EXIT signal from safely linked Pid
- %% This is received when a traced process dies.
- {'SAFE_EXIT', Pid, Reason} ->
- New_Shell_data = exit_cmd(Pid, Reason,Shell_data ),
- monitor_loop(New_Shell_data);
-
-
- %% Handle EXIT signal from processes where we expect
- %% some EXIT signals, such as the file_dialog opened, and possibly
- %% others.
-
- {'EXIT', _Pid, _Reason} ->
- monitor_loop(Shell_data);
-
- %% Handle incoming trace messages
- Message when is_tuple(Message) , element(1,Message) == trace->
- {L, Suspended} = collect_tracs([Message]),
- Buffer = Shell_data#pman_shell.buffer,
- Buffer#buffer.converter!{raw,L},
- lists:foreach(fun(P) -> erlang:resume_process(P) end, Suspended),
- monitor_loop(Shell_data);
-
-
- %% All other messages on the form {...,...,...}
- Message when is_tuple(Message) ->
- do_link_stuff(Shell_data),
-
- New_Shell_data = process_gs_event(Message,Shell_data),
- monitor_loop(New_Shell_data);
-
- %% Catch all for unexpected messages
- _Anything ->
- ?ALWAYS_ASSERT("Received unexpected event"),
- monitor_loop(Shell_data)
-
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% process_event/1 - Error handling wrapper for gs_cmd
-
-process_gs_event(Message, Shell_data) ->
- case catch gs_cmd(Message,Shell_data) of
-
- %%
- %% Error exits from gs_cmd
-
- {'EXIT', badrpc} ->
- Text = "\nERROR: Could not access node",
- pman_win:msg_win(Text),
- Shell_data;
- {'EXIT', dead} ->
- Text = "\nERROR: The process is dead",
- pman_win:msg_win(Text),
- Shell_data;
-
- %% A controlled application initiated termination
- {'EXIT', quit} ->
- db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
- exit(quit);
-
-
- {'EXIT',Reason} ->
- db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
- io:format("Debug info, Reason: ~p~n",[Reason]),
- ?ALWAYS_ASSERT("Unexpected EXIT reason"),
- exit({unexpected_EXIT_reason,Reason});
-
- %%
- %% "Proper" exits from gs_cmd
-
- New_Shell_data ->
- New_Shell_data
- end.
-
-
-
-gs_cmd(Cmd, Shell_data) ->
- case Cmd of
-
- %%User Command
- {gs, Command, click, _Data, _Args} ->
- execute_cmd(Command,Shell_data);
-
- %%Key accellerator
- {gs,_Window,keypress,_D,[Key,_,0,1]} ->
- execute_cmd(key(Key),Shell_data);
-
- %%Window Resize
- {gs,_Window,configure,_,[X,Y|_]} ->
- execute_cmd({configure,{X,Y}},Shell_data);
-
-
- {gs, _Object, _Event, _Data, _Args} ->
- ?ALWAYS_ASSERT("Unhandled gs event"),
- Shell_data
-
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% (???) do_link_stuff/1 - I have no clue.
-%%
-
-do_link_stuff(Shell_data) ->
-
- %% This appears to be code to execute for adding
- %% dynamic links menus.
-
- case Shell_data#pman_shell.pid of
- undefined ->
- ok;
- Pid ->
- case pman_process:pinfo(Pid, links) of
- Links when is_list(Links) ->
- pman_win:links_menus(Links);
- undefined ->
- ok
- end
- end.
-
-
-%% (???) Process dictionary used to safe Pid-Pid pairs.
-%%
-%% safe_link/1 - Spawns a process, that links to the Pid, and sends
-%% a message to the caller when the linked process dies.
-%%
-%% Since we (think we) need to link to the traced process, we want
-%% to do it in a way that has the smallest possible risk. The process
-%% that links to the Pid is small and simple, which is safer than if
-%% the calling process would link directly to the Pid.
-
-safe_link(Pid) when is_pid(Pid) ->
- Self = self(),
- PidSafe = spawn_link(fun() -> safe_init(Self, Pid) end),
- put(Pid, PidSafe).
-
-
-%% safe_unlink/1 - Removes a safe link
-%%
-
-safe_unlink(Pid) when is_pid(Pid) ->
- PidSafe = get(Pid),
- PidSafe ! {unlink, self(), Pid},
- erase(Pid);
-
-safe_unlink(_Anything)->
- true.
-
-%% safe_init/2 - Initialize a simple receive loop that controls safe linking
-%% to application processes.
-%%
-safe_init(Caller, Pid) ->
-
- process_flag(trap_exit, true),
- link(Pid),
-
- safe_loop(Caller, Pid).
-
-
-%% safe_loop/2 - Simply waits for an exit signal from the linked Pid,
-%% all other messages are disregarded.
-%%
-
-
-safe_loop(Caller, Pid) ->
- receive
- %% Linked process dies
- {'EXIT' , Pid, Reason} ->
- Caller ! {'SAFE_EXIT', Pid, Reason};
-
- %% Caller dies
- {'EXIT', Caller, _Reason} ->
- unlink(Pid);
-
-
- %% Unlink request
- {unlink, Caller, Pid} ->
- unlink(Pid);
-
- %% Ignore everything else
- _Anything ->
- safe_loop(Caller, Pid)
- end.
-
-
-
-configure (Editor, W, H) ->
- gs:config (Editor, [{width, W - 3},
- {height, H - 40}]).
-
-
-
-
-%%% The DB is used to avoid multiple trace windows
-%%% of the same process.
-
-%%% db_start /0
-%%%
-
-db_start() ->
- case ets:info(?PMAN_DB) of
- undefined -> ets:new(?PMAN_DB, [public, named_table]);
- _ -> ?PMAN_DB
- end.
-
-
-
-%%% db_insert_key /2
-%%%
-
-db_insert_key (Db, Pid) ->
- case ets:lookup (Db, Pid) of
- [] ->
- case catch ets:insert (Db, {Pid}) of
- true ->
- true;
-
- _Error ->
- error_insert_db
- end;
-
- _already_exists ->
- false
- end.
-
-
-
-%%% db_delete_key /2
-%%%
-
-db_delete_key (Db, Pid) ->
- ets:delete (Db, Pid).
-
-
-%% Function to collect all trace messages in the receive queue.
-%% Returns: {Messages,SuspendedProcesses}
-
-collect_tracs(Ack) -> collect_tracs(Ack, ordsets:new()).
-
-collect_tracs(Ack, Procs) ->
- receive
- Trac when is_tuple(Trac), element(1, Trac) == trace ->
- P = suspend(Trac, Procs),
- collect_tracs([Trac | Ack], P)
- after 0 ->
- {lists:reverse(Ack), ordsets:to_list(Procs)}
- end.
-
-suspend({trace,From,call,_Func}, Suspended) when node(From) == node() ->
- case ordsets:is_element(From, Suspended) of
- true -> Suspended;
- false ->
- case (catch erlang:suspend_process(From)) of
- true ->
- ordsets:add_element(From, Suspended);
- _ ->
- Suspended
- end
- end;
-suspend(_Other, Suspended) -> Suspended.
diff --git a/lib/pman/src/pman_tool.erl b/lib/pman/src/pman_tool.erl
deleted file mode 100644
index 36382745af..0000000000
--- a/lib/pman/src/pman_tool.erl
+++ /dev/null
@@ -1,146 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(pman_tool).
--compile([{nowarn_deprecated_function,{gs,read,2}}]).
-
-%% Listbox selection window
-
--export([select/3]).
-
--record(state, {topwin,
- frame,
- listbox}).
-
-%% Constants
--define(WIN_WIDTH, 350).
--define(WIN_HEIGHT, 350).
-
-select(Win, Title, Choices) ->
- Self = self(),
- Pid = spawn_link(fun() -> init(Self, Win, Title, Choices) end),
- receive
- {Pid, Result} ->
- Result
- end.
-
-init(Pid, Win, Title, Choices) ->
-
- %% Create window
- State = create_window(Win, Title, Choices),
-
- gse:map(State#state.topwin),
-
- %% enter event loop
- loop(Pid, Choices, State).
-
-loop(Pid, Choices, State) ->
- receive
- {gs, _, destroy, _Data, _Args} ->
- Pid ! {self(), cancelled};
- {gs, _, configure, _Data, [W, H|_]} ->
- gse:resize(State#state.frame, W, H),
- loop(Pid, Choices, State);
- {gs, _, click, ok, _Args} ->
- case gs:read(State#state.listbox, selection) of
- [] ->
- Pid ! {self(), cancelled};
- Indices ->
- Selection = selection(Indices, Choices),
- Pid ! {self(), Selection}
- end;
- {gs, _, click, cancel, _Args} ->
- Pid ! {self(), cancelled};
- {gs, Obj, doubleclick, _Data, _Args} ->
- self() ! {gs, Obj, click, ok, []},
- loop(Pid, Choices, State);
- _GSEvent ->
- loop(Pid, Choices, State)
- end.
-
-selection(Indices, Choices) ->
- selection(0, Indices, Choices).
-
-selection(I, [I|Is], [{Val,_Str}|Vals]) ->
- [Val | selection(I+1, Is, Vals)];
-selection(I, [I|Is], [Val|Vals]) ->
- [Val | selection(I+1, Is, Vals)];
-selection(_I, [], _Vals) ->
- [];
-selection(I, Is, [_Val|Vals]) ->
- selection(I+1, Is, Vals).
-
-create_window(Win, Title, Choices) ->
- Font = pman_win:font(Win),
-
- %% Top window and a frame that covers it entirely, to allow
- %% usage of the packer for geometry management.
- Topwin = gse:window(Win, [{width, ?WIN_WIDTH},
- {height,?WIN_HEIGHT},
- {configure, true},
- {title, Title}]),
- Frame = gse:frame(Topwin, [{packer_x,[{stretch,1},
- {stretch,1}]},
- {packer_y,[{stretch,1},
- {stretch,5},
- {stretch,1}]}]),
-
- %% Caption above the list of items
- CaptionTxt = "Select one or more of the following:",
- gse:label(Frame, [{pack_x,{1,2}},
- {pack_y,{1,1}},
- {label,{text,CaptionTxt}}, {font,Font}]),
-
- %% List of selectable items
- Listbox = gse:listbox(Frame, [{pack_x,{1,2}},
- {pack_y,{2,2}},
- {selectmode,multiple},
- {doubleclick, true},
- {font,Font},
- {items, str_choices(Choices)}]),
-
- %% OK and Cancel buttons in a separate frame.
- F13 = gse:frame(Frame, [{bw,1},
- {pack_xy,{{1,2},3}},
- {packer_x,[{stretch,1},
- {fixed, 60},
- {stretch,1},
- {fixed, 60},
- {stretch,1}]},
- {packer_y,[{stretch,1},
- {fixed, 30},
- {stretch,1}]}]),
-
- gse:button(F13, [{pack_xy,{2,2}},
- {label,{text,"OK"}}, {font,Font},
- {data,ok}]),
- gse:button(F13, [{pack_xy,{4,2}},
- {label,{text,"Cancel"}}, {font,Font},
- {data,cancel}]),
-
- gse:resize(Frame, ?WIN_WIDTH, ?WIN_HEIGHT),
- #state{topwin=Topwin, frame=Frame, listbox=Listbox}.
-
-str_choices(Choices) ->
- lists:map(
- fun({Val, Str}) ->
- lists:flatten(io_lib:format("~p: ~s", [Val, Str]));
- (Term) ->
- lists:flatten(io_lib:format("~p", [Term]))
- end,
- Choices).
diff --git a/lib/pman/src/pman_win.erl b/lib/pman/src/pman_win.erl
deleted file mode 100644
index aec7dc4412..0000000000
--- a/lib/pman/src/pman_win.erl
+++ /dev/null
@@ -1,677 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-%% ------------------------------------------------------------
-%% Purpose: window management and the gs interface
-%% ------------------------------------------------------------
-
--module(pman_win).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,canvas,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,create,4}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,1}},
- {nowarn_deprecated_function,{gs,text,2}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-%% ---------------------------------------------------------------
-%% The user interface exports
-%% ---------------------------------------------------------------
-
--export([pman_window/3, window/1, module_data/1, display/1, format/2,
- dialog_window/2, configeditor/2, configwin/3,
- update/1, update/3,
- msg_win/1, title/1,
- remove_menu/1, add_menu/3,
- change_colour/3, links_menus/1, calc_columnwidths/1]).
--export([font/0, font/1]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Constants
-%%
--include("pman_win.hrl").
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% pman_window/3 - Create a GS window and components for the
-%% Pman overview window, the main window.
-%%
-%% Arguments:
-%% Size number of processes
-%% HiddenModules list of modules
-%% Nodes list of supervised nodes
-%%
-%% Return:
-%% {Win, Grid, Frame, Procnum, W, H} where
-%% Win The GS top window
-%% Grid The GS grid
-%% Procnum Number of displayed processes
-%%
-
-pman_window(Size, _HiddenModules, Nodes) ->
- GS = gs:start([{kernel,true}]),
- Font = font(GS),
- Win_Options = [{title, lists:concat(["Pman: Overview on ",node()])},
- {width, ?WIN_WIDTH}, {height, ?WIN_HEIGHT},
- {destroy, true},
- {keypress,true}],
- Win = gs:create(window, GS, Win_Options),
-
- %% Menu bar
- MenuBar = gs:create(menubar, Win, []),
- MBFile = gs:create(menubutton, MenuBar, [{label,{text," File "}},
- {font,Font},
- {underline,1}]),
- MBView = gs:create(menubutton, MenuBar, [{label,{text, " View "}},
- {font,Font},
- {underline,1}]),
- MBTrace = gs:create(menubutton, MenuBar, [{label,{text, " Trace "}},
- {font,Font},
- {underline,1}]),
- MBHelp = gs:create(menubutton, MenuBar, [{label, {text, " Help "}},
- {font,Font},
- {side,right},
- {underline,1}]),
-
- %% Addition of a menu for distribution
- add_node_menu(MenuBar, Nodes, Font),
-
- %% All menu buttons
- MenuFile = gs:create(menu, MBFile, []),
- MenuView = gs:create(menu, MBView, []),
- MenuTrace = gs:create(menu, MBTrace, []),
- MenuHelp = gs:create(menu, MBHelp, []),
-
- %% File menu
- gse:named_menuitem('Default Options', MenuFile,
- [{label,{text,"Options..."}}, {font,Font},
- {underline,0}]),
- gse:named_menuitem('Save Options',MenuFile,
- [{label,{text,"Save Options"}}, {font,Font}]),
- gse:named_menuitem('Exit', MenuFile,
- [{label,{text,"Exit"}}, {font,Font},
- {underline,0}]),
-
- %% View menu
- gse:named_menuitem('Hide All',MenuView,
- [{label, {text, "Hide All Processes"}},
- {font,Font},
- {underline,1}]),
-
- gse:named_menuitem('Hide Modules', MenuView,
- [{label, {text, "Hide Modules..."}},
- {font,Font},
- {underline,8}]),
-
- gse:named_menuitem('Hide Selected Process', MenuView,
- [{label, {text, "Hide Selected Process"}},
- {font,Font},
- {underline,2}]),
-
- gse:named_menuitem('Module',MenuView,
- [{label, {text, "Module Info..."}}, {font,Font},
- {underline,7}]),
-
- gse:named_menuitem('Refresh', MenuView,
- [{label, {text, "Refresh"}}, {font,Font},
- {underline,0}]),
-
- gse:named_menuitem('Show All',MenuView,
- [{label, {text, "Show All Processes"}},
- {font,Font}]),
-
- gse:named_menuitem('Show Selected',MenuView,
- [{label, {text, "Show Processes..."}},
- {font,Font}]),
-
- %% Trace menu
- gs:create(menuitem, 'Kill', MenuTrace, [{label,{text, "Kill"}},
- {font,Font},
- {underline,0}]),
-
- gs:create(menuitem, 'Trace Process', MenuTrace,
- [{label, {text, "Trace Selected Process"}}, {font,Font},
- {underline,0}]),
-
- gs:create(menuitem,'Trace Shell', MenuTrace,
- [{label, {text,"Shell Process"}}, {font,Font},
- {underline,0}]),
-
- %% Help menu
- gs:create(menuitem,'Help', MenuHelp, [{label, {text, "Help" }},
- {font,Font},
- {underline,0}]),
-
- %% Window contents
-
- %% Geometry managing frame
- Frame = gse:frame(Win, [{y,?MENU_HEIGHT},
- {packer_x,[{stretch, 1}]},
- {packer_y,[{stretch,10},
- {fixed,?CHECKBAR_HEIGHT}]}]),
-
-
-
- %% Grid
- Grid_Options = [
- {pack_x,1}, {pack_y,1},
- {fg,black},
- {vscroll,right},{hscroll,bottom},
- calc_columnwidths(739),
- {rows, {1,Size}}],
- Grid = gse:grid(Frame,Grid_Options),
-
-
- %% Checkbutton bar at the bottom of the window
-
- CheckBar = gse:frame(Frame, [{pack_x,1},
- {pack_y,2},
- {packer_x,[{stretch, 2, 100,300},
- {stretch, 2, 100,300},
- {stretch,1},
- {stretch, 2,100,300}]},
- {packer_y,[{stretch,1}]}]),
- gse:named_checkbutton('Hide System',CheckBar,
- [{pack_xy,{1,1}},
- {justify, left},
- {align,w},
- {width, 200},
- {font, Font},
- {label, {text, "Hide System Processes" }}]),
-
- gse:named_checkbutton('Auto Hide New',CheckBar,
- [{pack_xy,{2,1}},
- {width, 200},
- {justify, left},
- {align,w},
- {font, Font},
- {label, {text, "Auto-Hide New" }}]),
-
- gse:named_label('Number Hidden',CheckBar,
- [{pack_xy,{4,1}},
- {justify, left},
- {align,w},
- {width, 200},
- {font, Font},
- {label, {text, ?CPIDHIDDENTEXT }}]),
-
- %% Finalize it!
- gse:map(Win),
- gse:config(Win,[raise]),
- gse:config(Win,[{configure,true}]),
-
-
- {Win, Grid, Frame, length(processes())+1, ?WIN_WIDTH, ?WIN_HEIGHT}.
-
-
-%% Calculate columnwidths in respect to the size of the window.
-
-calc_columnwidths(Width) ->
- if
- Width =< 739 ->
- {columnwidths,[75,215,146,90,105,105]};
- true ->
- S = (Width - 75)/(215+146+90+105+105),
- {columnwidths,[75,round(215*S),round(146*S),round(90*S),
- round(105*S),round(105*S)]}
- end.
-
-%% ---------------------------------------------------------------
-%% Create a trace window
-%%
-%% Process, a process id or an atom
-%%
-%% Return: A window and a editor
-%% ---------------------------------------------------------------
-
-
-window(Process) ->
- GS = gs:start([{kernel,true}]),
- Font = font(GS),
- Win_Options = [{title,title(Process)}, {width,550}, {keypress,true},
- {configure,true},
- {destroy,true},{height, 400}],
- Win = gs:create(window,GS,Win_Options),
-
- MenuBar = gs:create(menubar, Win, []),
-
- %% File menu
- MBFile = gs:create(menubutton,MenuBar,[{label,{text," File "}},
- {font,Font},
- {underline, 1}]),
- MenuFile = gs:create(menu, MBFile, []),
- make_menus(pman_process:is_running(Process), MenuBar, MenuFile,
- Font),
-
- gse:named_menuitem('Save buffer',MenuFile,
- [{label,{text, "Save buffer..."}},
- {font,Font},
- {underline,0}]),
- gse:named_menuitem('Close',MenuFile,
- [{label, {text, "Close"}},
- {font,Font},
- {underline,0}]),
-
-
- Editor = gs:create(editor,Win,[{x,3}, {y,40},
- {width,546}, {height,348},
- {font,Font}]),
- gs:config(Editor, [{keypress, true},{insert, {'end', display(Process)}}]),
- gs:config(Editor, [{enable, false},{vscroll, right}, {hscroll, bottom},
- {wrap,none}]),
- gs:config(Win, [{map, true}]),
- {Win, Editor}.
-
-%% ---------------------------------------------------------------------
-%% Menu Help Fuctions
-%% ---------------------------------------------------------------------
-
-
-links_menus(Links) ->
- gs:destroy('Links'),
- gs:create(menu,'Links','LinksMenu',[]),
- Flag = case links_menus(Links,[]) of
- [] -> false;
- Pids ->
- add_menu('Links', Pids, "Trace"),
- true
- end,
- gse:config('LinksMenu',[{enable,Flag}]).
-
-links_menus([],Pids) -> Pids;
-links_menus([Pid|Links],Pids) when is_pid(Pid) ->
- links_menus(Links,[Pid|Pids]);
-links_menus([_Port|Links],Pids) ->
- links_menus(Links,Pids).
-
-
-%% Create the node menu.
-
-add_node_menu(MenuBar, Nodes, Font) ->
- MBNode = gs:create(menubutton, MenuBar, [{label,{text, " Nodes "}},
- {font,Font},
- {underline, 1}]),
- gs:create(menu, node, MBNode, []),
- add_menu(node, Nodes, "Show", Font),
- gse:disable(node()).
-
-
-%% ---------------------------------------------------------------------
-%% Add Menus in the list under Menu menuitem.
-
-add_menu(Menu, Names, Tag) ->
- add_menu(Menu, Names, Tag, font()).
-
-add_menu(_Menu, [], _Tag, _Font) -> ok;
-add_menu(Menu, [Name|Names], Tag, Font) ->
- Title = io_lib:format("~s ~p",[Tag, Name]),
- gs:create(menuitem,Name,Menu,[{label,{text,Title}},
- {font,Font},
- {data,{Menu,Name}}]),
- add_menu(Menu, Names, Tag, Font).
-
-%% ---------------------------------------------------------------------
-%% Remove a specific menu item, or a whole menu, or a list of both.
-%%
-
-remove_menu(List) when is_list(List)->
- lists:foreach(fun(X) -> gs:destroy(X) end, List);
-
-remove_menu(Object) ->
- gse:destroy(Object).
-
-
-%% ---------------------------------------------------------------------
-%% If the trace window opened is supposed to trace a real pid, let us
-%% add the trace menu, and other items specific to tracing. If not,
-%% the only menus available are the ones in the default defined in
-%% window(Pid).
-
-make_menus(false, _, _, _) -> ok;
-make_menus({true,Pid}, MenuBar, MenuFile, Font) ->
- MBView = gs:create(menubutton,'ViewMenu',MenuBar,
- [{underline,1},
- {label,{text," View "}}, {font,Font},
- {side,left}]),
- MenuView = gs:create(menu, MBView, []),
-
- MBTrace = gs:create(menubutton,'TraceMenu',MenuBar,
- [{underline,1},
- {label,{text," Trace "}}, {font,Font},
- {side,left}]),
- MenuTrace = gs:create(menu, MBTrace, []),
-
-
- MBHelp = gs:create(menubutton,'HelpMenu',MenuBar,
- [{underline,1},
- {label,{text," Help "}}, {font,Font},
- {side,right}]),
- MenuHelp = gs:create(menu, MBHelp, []),
-
- %% File menu
- gse:named_menuitem('Options', MenuFile,
- [{label, {text, "Options..."}}, {font,Font},
- {underline,0}]),
-
- %% Trace menu
- gse:named_menuitem('All Links', MenuTrace,
- [{label, {text, "All Linked Processes"}},
- {font,Font},
- {underline,0}]),
- gse:named_menuitem('LinksMenu', MenuTrace,
- [{underline,0},
- {label, {text, "Linked Process..."}},
- {font,Font},
- {itemtype, cascade},
- {enable,false}]),
- gs:create(menu,'Links','LinksMenu',[]),
- case pman_process:pinfo(Pid, links) of
- Links when is_list(Links) ->
- links_menus(Links);
- undefined ->
- lists:foreach(fun(X) -> gse:disable(X) end,['LinksMenu'])
- end,
- gse:named_menuitem('Kill', MenuTrace,
- [{label, {text, "Kill"}}, {font,Font},
- {underline,0}]),
-
- %% View menu
- gse:named_menuitem('Clear', MenuView,
- [{label, {text, "Clear buffer"}}, {font,Font},
- {underline,0}]),
-
- gse:named_menuitem('Module', MenuView,
- [{label, {text, "Module Info"}}, {font,Font},
- {underline,0}]),
-
- %% Help menu
- gse:named_menuitem('Help', MenuHelp,
- [{label, {text, "Help"}}, {font,Font},
- {underline,0}]).
-
-%% ---------------------------------------------------------------------
-%% Configurate the actual editor
-%%
-%% Editor, actual editor
-%% Options, actual options for the editor
-%%
-%% Return: A configurated editor with the actual options
-%% ---------------------------------------------------------------------
-
-configeditor(Editor, Options) ->
- gs:config(Editor, Options).
-
-%% ---------------------------------------------------------------------
-%% Configure the actual window after it has been resized.
-%% ---------------------------------------------------------------------
-
-configwin(Object, W, H) ->
- Dx = abs(W - gs:read(Object,width) - 4),
- Dy = abs(H - gs:read(Object,height) - 42),
- if
- Dx + Dy =/= 0 ->
- gs:config(Object,[{width,W - 4}]);
- true -> ok
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% update/1, 3
-update(NoOfHidden) ->
- Str = lists:flatten(io_lib:format(?CPIDHIDDENTEXT++"~w",
- [NoOfHidden])),
- gse:config('Number Hidden', [{label, {text,Str}}]).
-
-update(Grid, ShowInfoR, NoOfHidden) ->
-
- %% We reverse the list because we want the processes to appear with
- %% the newest (=highest) pid first in the list.
- ShowInfo = lists:reverse(ShowInfoR),
-
- %% Set the length of the grid
- CGridline = length(ShowInfo) + 1,
- gs:config(Grid, [{rows, {1,CGridline}}]),
-
- %% Add the header line
- add_gridline(Grid,
- 1,
- {'Pid','Current Function','Name','Msgs','Reds','Size'},
- []),
-
- update(NoOfHidden),
-
- %% Recurse through the ordset of pids
- update_r(Grid, ShowInfo, 2).
-
-update_r(Grid, [], Row) ->
- delete_gridlines(Grid, Row);
-update_r(Grid, [{Pid,Func,Name,Msgs,Reds,Psize}|ShowInfo], Row) ->
- {M, F, A} = Func,
- FuncText = lists:flatten(io_lib:format("~w:~w/~w", [M, F, A])),
- add_gridline(Grid,
- Row,
- {Pid, FuncText, Name, Msgs, Reds, Psize},
- [{data,{pidfunc,Pid,Func}}]),
- update_r(Grid, ShowInfo, Row+1).
-
-add_gridline(Grid, Row, Tuple, LIOptSpec) ->
- {Pid, FuncText, Name, Msgs, Reds, Psize} = Tuple,
- LIOpt = [{click,true},
- {doubleclick,true},
- {fg, colour(Row)},
- {text,{1,Pid}},
- {text,{2,FuncText}},
- {text,{3,Name}},
- {text,{4,Msgs}},
- {text,{5,Reds}},
- {text,{6,Psize}} |LIOptSpec],
- case gs:read(Grid, {obj_at_row, Row}) of
- undefined ->
- gse:gridline(Grid,[{row, Row}|LIOpt]);
- GridLine ->
- gs:config(GridLine,LIOpt)
- end.
-
-delete_gridlines(Grid, Row) ->
- case gs:read(Grid, {obj_at_row, Row}) of
- undefined ->
- ok;
- GridLine ->
- gs:destroy(GridLine),
- delete_gridlines(Grid, Row+1)
- end.
-
-colour(1) ->
- ?HEADER_COLOUR;
-colour(_Row) ->
- ?UNSELECTED_COLOUR.
-
-%% Interchange colours between two rows
-change_colour(Grid, Row, Row) ->
- Gitem = gs:read(Grid, {obj_at_row,Row}),
- gs:config(Gitem, {fg,?SELECTED_COLOUR});
-change_colour(Grid, From, To) ->
- Gitem_to = gs:read(Grid, {obj_at_row,To}),
- Gitem_fr = gs:read(Grid, {obj_at_row,From}),
- gs:config(Gitem_to, {fg,?SELECTED_COLOUR}),
- gs:config(Gitem_fr, {fg,colour(From)}).
-
-%% --------------------------------------------------------------
-%% Create a title for the window
-%% Return: the title
-%% --------------------------------------------------------------
-
-title({module, Mod}) ->
- lists:flatten([io_lib:format("Pman: Module info ~p", [Mod])]);
-
-title({shell, Sh} ) ->
- lists:flatten([io_lib:format("Pman: Shell process ~p on ~p",
- [Sh,node(Sh)])]);
-
-title(Sh) ->
- lists:flatten([io_lib:format("Pman: Process ~p on ~p",
- [Sh, node(Sh)]),name(Sh)]).
-name(Pid) ->
- case pman_process:pinfo(Pid, registered_name) of
- undefined -> "";
- Name ->
- lists:flatten([io_lib:format("[~p]", [Name])])
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% module_data/1 - %% Returns the module information for a
-%% module, on a format suitable to insert into a GS editor.
-%%
-%% Arguments:
-%% ModuleName The module
-%%
-%% Returns:
-%% A string with module information.
-%%
-
-module_data(ModuleName) ->
- vformat("", catch apply(ModuleName, module_info, [])).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% display/1 -
-%%
-
-display({_,Pid,_}) -> display(Pid);
-display({_,Pid}) -> display(Pid);
-display(Pid) when is_pid(Pid) ->
- case pman_process:pinfo(Pid) of
- undefined ->
- format('Process is dead~n',[]);
- Other ->
- proc_format(Other)
- end.
-
-%% --------------------------------------------------------------
-%% Format functions for the shell and help window.
-%% --------------------------------------------------------------
-
-vformat(Pad, {M,F,A}) when is_atom(F) ->
- Pad2 = lists:append(Pad,mkpad(io_lib:format("~w:~w",[M,F]))),
- lists:flatten([format("~p:~p", [M,F]),argformat(Pad2, A)]);
-
-vformat(Pad, [H|T]) ->
- kvformat(Pad, [H|T],"[");
-
-vformat(_Pad, X) -> format("~p~n", [X]).
-
-format(Format) -> format(Format, []).
-
-format(Format, Args) ->
- io_lib:format(Format, Args).
-
-
-kvformat(S, [Item],Buff) ->
- lists:reverse([format("\n~s~p]\n",[S,Item])|Buff]);
-
-kvformat(S,[H|T],Buff) ->
- kvformat(S,T,[format("\n~s~p, ",[S,H])|Buff]);
-
-kvformat(_,[],Buff) ->
- lists:reverse(["]\n"|Buff]).
-
-argformat(_Pad,A) when is_integer(A) ->
- format("/~p\n", [A]);
-argformat(_,A) ->
- lists:flatten([format("/~p\n", [length(A)]),
- format("args: \n"),
- argformat2(" ", A)]).
-
-argformat2(Pad, Arglist) ->
- Chars = lists:flatten(io_lib:format("~p",[Arglist])),
- if
- length(Chars) < (70 - length(Pad)) ->
- format("~s~s\n", [Pad, Chars]);
- true ->
- argformat3(Pad, Arglist)
- end.
-
-argformat3(_,[]) -> format("\n");
-argformat3(Pad, [H|T]) ->
- Chars = truncate(65,io_lib:format("~s~p",[Pad, H])),
- format("~s,\n", [Chars]),
- argformat3(Pad, T).
-
-pformat(false) -> [];
-pformat({value,{_, 0}}) -> [];
-pformat({value,{_, []}}) -> [];
-pformat({value, {Key, Vals}}) ->
- Pad = mkpad(io_lib:format("~p ",[Key])),
- format(lists:flatten(["~p: " ,vformat(Pad, Vals), "~n"]), [Key]).
-
-truncate(0, _Chars) -> ".....";
-truncate(I, [H|T]) -> [H|truncate(I-1, T)];
-truncate(_I, []) -> [].
-
-mkpad([_|T]) -> [32|mkpad(T)];
-mkpad([]) -> [].
-
-proc_format(Pi) -> %% process_info struct
- X1 = pformat(lists:keysearch(initial_call, 1, Pi)),
- X2 = pformat(lists:keysearch(current_function, 1,Pi)),
- X3 = pformat(lists:keysearch(messages, 1,Pi)),
- X4 = pformat(lists:keysearch(dictionary,1, Pi)),
- X5 = pformat(lists:keysearch(heap_size, 1,Pi)),
- X6 = pformat(lists:keysearch(stack_size, 1,Pi)),
- X7 = pformat(lists:keysearch(reductions, 1,Pi)),
- X8 = pformat(lists:keysearch(links, 1,Pi)),
- X9 = pformat(lists:keysearch(trap_exit, 1,Pi)),
- lists:flatten([X1, X2, X3, X4, X5,X6,X7,X8,X9]).
-
-
-%% Using the tool_utils function for presenting messages.
-dialog_window(GSParent, Text) ->
- spawn_link(tool_utils, notify, [GSParent, Text]).
-
-%% Create a window with a dismiss button.
-msg_win(Text) ->
- spawn_link(fun() -> display_msg_win(Text) end).
-
-display_msg_win(Text) ->
- GS = gs:start([{kernel,true}]),
- Font = font(GS),
- Win = gs:window(GS, [{width,200}, {height,75}, {destroy,true},
- {title,"Pman Message"}]),
- Can = gs:canvas(Win, [{width,200}, {height, 75},{x,0},{y,0}]),
- gs:text(Can, [{text,Text}, {coords,[{10,0}]}, {justify,center}]),
- Btn = gs:button(Win, [{label,{text,"Dismiss"}}, {font,Font},
- {width,100}, {x,50}, {y,40}]),
- gs:config(Win, {map,true}),
- receive
- {gs, Btn, click, _, _} ->
- ok
- end.
-
-%% Choose default font
-font() ->
- font(gs:start([{kernel,true}])).
-
-font(GS) ->
- case gs:read(GS, {choose_font, {screen,[],12}}) of
- Font when element(1, Font)==screen ->
- Font;
- _ ->
- gs:read(GS, {choose_font, {courier,[],12}})
- end.
diff --git a/lib/pman/src/pman_win.hrl b/lib/pman/src/pman_win.hrl
deleted file mode 100644
index 8a2778d5b7..0000000000
--- a/lib/pman/src/pman_win.hrl
+++ /dev/null
@@ -1,39 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
--define(WIN_HEIGHT, 390).
--define(WIN_WIDTH, 745).
-
--define(MENU_HEIGHT, 40).
--define(CHECKBAR_HEIGHT, 40).
-
--define(CPIDHIDDENTEXT, "# Hidden: ").
-
--define(HEADER_COLOUR, blue).
--define(UNSELECTED_COLOUR, black).
--define(SELECTED_COLOUR, white).
-
-
-
-
-
-
-
-
-
diff --git a/lib/pman/vsn.mk b/lib/pman/vsn.mk
deleted file mode 100644
index 92fb9df222..0000000000
--- a/lib/pman/vsn.mk
+++ /dev/null
@@ -1 +0,0 @@
-PMAN_VSN = 2.7.1.4
diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile
index a4e36c7293..c1b3bc866d 100644
--- a/lib/public_key/asn1/Makefile
+++ b/lib/public_key/asn1/Makefile
@@ -41,7 +41,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/public_key-$(VSN)
ASN_TOP = OTP-PUB-KEY PKCS-FRAME
ASN_MODULES = PKIX1Explicit88 PKIX1Implicit88 PKIX1Algorithms88 \
PKIXAttributeCertificate PKCS-1 PKCS-3 PKCS-7 PKCS-8 PKCS-10 PKCS5v2-0 OTP-PKIX \
- InformationFramework
+ InformationFramework RFC5639
ASN_ASNS = $(ASN_MODULES:%=%.asn1)
ASN_ERLS = $(ASN_TOP:%=%.erl)
ASN_HRLS = $(ASN_TOP:%=%.hrl)
@@ -116,7 +116,8 @@ OTP-PUB-KEY.asn1db: PKIX1Algorithms88.asn1 \
PKCS-7.asn1\
PKCS-10.asn1\
InformationFramework.asn1\
- OTP-PKIX.asn1
+ OTP-PKIX.asn1 \
+ RFC5639.asn1
$(EBIN)/PKCS-FRAME.beam: PKCS-FRAME.erl PKCS-FRAME.hrl
PKCS-FRAME.erl PKCS-FRAME.hrl: PKCS-FRAME.asn1db
diff --git a/lib/public_key/asn1/OTP-PKIX.asn1 b/lib/public_key/asn1/OTP-PKIX.asn1
index 8d3c76adf5..37196bb9bf 100644
--- a/lib/public_key/asn1/OTP-PKIX.asn1
+++ b/lib/public_key/asn1/OTP-PKIX.asn1
@@ -452,23 +452,23 @@ SupportedPublicKeyAlgorithms PUBLIC-KEY-ALGORITHM-CLASS ::= {
ecdsa-with-sha1 SIGNATURE-ALGORITHM-CLASS ::= {
ID ecdsa-with-SHA1
- TYPE NULL } -- XXX Must be empty and not NULL
+ TYPE EcpkParameters } -- XXX Must be empty and not NULL
ecdsa-with-sha224 SIGNATURE-ALGORITHM-CLASS ::= {
ID ecdsa-with-SHA224
- TYPE NULL } -- XXX Must be empty and not NULL
+ TYPE EcpkParameters } -- XXX Must be empty and not NULL
ecdsa-with-sha256 SIGNATURE-ALGORITHM-CLASS ::= {
ID ecdsa-with-SHA256
- TYPE NULL } -- XXX Must be empty and not NULL
+ TYPE EcpkParameters } -- XXX Must be empty and not NULL
ecdsa-with-sha384 SIGNATURE-ALGORITHM-CLASS ::= {
ID ecdsa-with-SHA384
- TYPE NULL } -- XXX Must be empty and not NULL
+ TYPE EcpkParameters } -- XXX Must be empty and not NULL
ecdsa-with-sha512 SIGNATURE-ALGORITHM-CLASS ::= {
ID ecdsa-with-SHA512
- TYPE NULL } -- XXX Must be empty and not NULL
+ TYPE EcpkParameters } -- XXX Must be empty and not NULL
FIELD-ID-CLASS ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
diff --git a/lib/public_key/asn1/OTP-PUB-KEY.set.asn b/lib/public_key/asn1/OTP-PUB-KEY.set.asn
index e94f428e4b..b3f3ccdb77 100644
--- a/lib/public_key/asn1/OTP-PUB-KEY.set.asn
+++ b/lib/public_key/asn1/OTP-PUB-KEY.set.asn
@@ -9,3 +9,4 @@ DSS.asn1
ECPrivateKey.asn1
PKCS-7.asn1
PKCS-10.asn1
+RFC5639.asn1
diff --git a/lib/public_key/asn1/RFC5639.asn1 b/lib/public_key/asn1/RFC5639.asn1
new file mode 100644
index 0000000000..85b8533132
--- /dev/null
+++ b/lib/public_key/asn1/RFC5639.asn1
@@ -0,0 +1,27 @@
+RFC5639 {iso(1) identified-organization(3) teletrust(36) algorithm(3) signature-algorithm(3) ecSign(2) 8} DEFINITIONS EXPLICIT TAGS ::=
+
+BEGIN
+
+ecStdCurvesAndGeneration OBJECT IDENTIFIER::= {iso(1)
+ identified-organization(3) teletrust(36) algorithm(3) signature-algorithm(3) ecSign(2) 8}
+
+ellipticCurveRFC5639 OBJECT IDENTIFIER ::= {ecStdCurvesAndGeneration 1}
+
+versionOne OBJECT IDENTIFIER ::= {ellipticCurveRFC5639 1}
+
+brainpoolP160r1 OBJECT IDENTIFIER ::= {versionOne 1}
+brainpoolP160t1 OBJECT IDENTIFIER ::= {versionOne 2}
+brainpoolP192r1 OBJECT IDENTIFIER ::= {versionOne 3}
+brainpoolP192t1 OBJECT IDENTIFIER ::= {versionOne 4}
+brainpoolP224r1 OBJECT IDENTIFIER ::= {versionOne 5}
+brainpoolP224t1 OBJECT IDENTIFIER ::= {versionOne 6}
+brainpoolP256r1 OBJECT IDENTIFIER ::= {versionOne 7}
+brainpoolP256t1 OBJECT IDENTIFIER ::= {versionOne 8}
+brainpoolP320r1 OBJECT IDENTIFIER ::= {versionOne 9}
+brainpoolP320t1 OBJECT IDENTIFIER ::= {versionOne 10}
+brainpoolP384r1 OBJECT IDENTIFIER ::= {versionOne 11}
+brainpoolP384t1 OBJECT IDENTIFIER ::= {versionOne 12}
+brainpoolP512r1 OBJECT IDENTIFIER ::= {versionOne 13}
+brainpoolP512t1 OBJECT IDENTIFIER ::= {versionOne 14}
+
+END
diff --git a/lib/public_key/doc/src/book.xml b/lib/public_key/doc/src/book.xml
index f8d1205e57..154a111066 100644
--- a/lib/public_key/doc/src/book.xml
+++ b/lib/public_key/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/public_key/doc/src/cert_records.xml b/lib/public_key/doc/src/cert_records.xml
index c9249d40c3..b66c66bead 100644
--- a/lib/public_key/doc/src/cert_records.xml
+++ b/lib/public_key/doc/src/cert_records.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -36,10 +36,11 @@
<p>This chapter briefly describes erlang records derived from ASN1
specifications used to handle <c> X509 certificates</c> and <c>CertificationRequest</c>.
- The intent is to describe the data types and not to specify the meaning of each
- component for this we refer you to <url
+ The intent is to describe the data types
+and not to specify the semantics of each component. For information on the
+semantics, please see <url
href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280</url> and
- <url href="http://www.rsa.com/rsalabs/node.asp?id=2124">PKCS-10</url>.
+ <url href="http://www.ietf.org/rfc/rfc5967.txt">PKCS-10</url>.
</p>
<p>Use the following include directive to get access to the
@@ -79,7 +80,7 @@
<p><c>
special_string() =
{teletexString, string()} | {printableString, string()} |
- {universalString, string()} | {utf8String, string()} |
+ {universalString, string()} | {utf8String, binary()} |
{bmpString, string()}
</c></p>
diff --git a/lib/public_key/doc/src/fascicules.xml b/lib/public_key/doc/src/fascicules.xml
index 5f41826c56..25e7008537 100644
--- a/lib/public_key/doc/src/fascicules.xml
+++ b/lib/public_key/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/public_key/doc/src/introduction.xml b/lib/public_key/doc/src/introduction.xml
index 4b59cc2245..bf11a092d8 100644
--- a/lib/public_key/doc/src/introduction.xml
+++ b/lib/public_key/doc/src/introduction.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/public_key/doc/src/notes.xml b/lib/public_key/doc/src/notes.xml
index ce7847c107..f241a91eb0 100644
--- a/lib/public_key/doc/src/notes.xml
+++ b/lib/public_key/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -34,6 +34,101 @@
<file>notes.xml</file>
</header>
+<section><title>Public_Key 0.23</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improve/extend support for CRL handling.</p>
+ <p>
+ Own Id: OTP-12547 Aux Id: OTP-10362 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Public_Key 0.22.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Added missing encoding support for PBES2, and also
+ completed support for PBES1 that was incomplete.</p>
+ <p>
+ Own Id: OTP-11915</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Public_Key 0.22</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Handle v1 CRLs, with no extensions and fixes issues with
+ IDP (Issuing Distribution Point) comparison during CRL
+ validation. </p>
+ <p>
+ Thanks to Andrew Thompson</p>
+ <p>
+ Own Id: OTP-11761</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Public_Key 0.21</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/public_key/doc/src/part.xml b/lib/public_key/doc/src/part.xml
index 08fa4eec58..73146c8e2a 100644
--- a/lib/public_key/doc/src/part.xml
+++ b/lib/public_key/doc/src/part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -34,7 +34,7 @@
<p> This application provides an API to public key infrastructure
from <url href="http://www.ietf.org/rfc/rfc5280.txt">RFC
5280</url> (X.509 certificates) and public key formats defined by
- the <url href="http://www.rsa.com/rsalabs/node.asp?id=2124">
+ the <url href="http://en.wikipedia.org/wiki/PKCS">
PKCS-standard</url></p>
</description>
<xi:include href="introduction.xml"/>
diff --git a/lib/public_key/doc/src/part_notes.xml b/lib/public_key/doc/src/part_notes.xml
index f855e76a6d..285f16f380 100644
--- a/lib/public_key/doc/src/part_notes.xml
+++ b/lib/public_key/doc/src/part_notes.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml
index bce6d58682..b86d0fe0ab 100644
--- a/lib/public_key/doc/src/public_key.xml
+++ b/lib/public_key/doc/src/public_key.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2015</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -48,12 +48,12 @@
<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.rsa.com/rsalabs/node.asp?id=2125"> PKCS-1 </url> - RSA Cryptography Standard </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.rsa.com/rsalabs/node.asp?id=2126"> PKCS-3 </url> - Diffie-Hellman Key Agreement Standard </item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2127"> PKCS-5</url> - Password-Based Cryptography Standard </item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2130"> PKCS-8</url> - Private-Key Information Syntax Standard</item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2132"> PKCS-10</url> - Certification Request Syntax Standard</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>
@@ -71,11 +71,11 @@
<p>Use the following include directive to get access to the
records and constant macros described here and in the User's Guide.</p>
- <code> -include_lib("public_key/include/public_key.hrl"). </code>
+ <code> -include_lib("public_key/include/public_key.hrl").</code>
<p><em>Data Types </em></p>
- <p><code>oid() - a tuple of integers as generated by the ASN1 compiler.</code></p>
+ <p><code>oid() - Object Identifier, a tuple of integers as generated by the ASN1 compiler.</code></p>
<p><code>boolean() = true | false</code></p>
@@ -84,44 +84,53 @@
<p><code>der_encoded() = binary()</code></p>
<p><code>pki_asn1_type() = 'Certificate' | 'RSAPrivateKey'| 'RSAPublicKey' |
- 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter' | 'SubjectPublicKeyInfo' |
- 'PrivateKeyInfo' | 'CertificationRequest' | 'ECPrivateKey'|
- 'EcpkParameters'</code></p>
+ 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter' |
+ 'SubjectPublicKeyInfo' | 'PrivateKeyInfo' |
+ 'CertificationRequest' | 'ECPrivateKey' | 'EcpkParameters'</code></p>
<p><code>pem_entry () = {pki_asn1_type(), binary(), %% DER or encrypted DER
- not_encrypted | cipher_info()} </code></p>
+ not_encrypted | cipher_info()}</code></p>
- <p><code>cipher_info() = {"RC2-CBC | "DES-CBC" | "DES-EDE3-CBC", crypto:rand_bytes(8)} |
- 'PBES2-params'} </code></p>
+ <p><code>cipher_info() = {"RC2-CBC | "DES-CBC" | "DES-EDE3-CBC",
+ crypto:rand_bytes(8) | {#'PBEParameter{}, digest_type()} |#'PBES2-params'{}}</code></p>
+ <p><code>public_key() = rsa_public_key() | dsa_public_key() | ec_public_key()</code></p>
+ <p><code>private_key() = rsa_private_key() | dsa_private_key() | ec_private_key()</code></p>
<p><code>rsa_public_key() = #'RSAPublicKey'{}</code></p>
- <p><code>rsa_private_key() = #'RSAPrivateKey'{} </code></p>
+ <p><code>rsa_private_key() = #'RSAPrivateKey'{}</code></p>
- <p><code>dsa_public_key() = {integer(), #'Dss-Parms'{}} </code></p>
+ <p><code>dsa_public_key() = {integer(), #'Dss-Parms'{}}</code></p>
<p><code>dsa_private_key() = #'DSAPrivateKey'{}</code></p>
- <p><code>ec_public_key() = {#'ECPoint'{}, #'EcpkParameters'{} | {namedCurve, oid()}} </code></p>
+ <p><code>ec_public_key() = {#'ECPoint'{}, #'EcpkParameters'{} |
+ {namedCurve, oid()}}</code></p>
<p><code>ec_private_key() = #'ECPrivateKey'{}</code></p>
- <p><code> public_crypt_options() = [{rsa_pad, rsa_padding()}]. </code></p>
+ <p><code>public_crypt_options() = [{rsa_pad, rsa_padding()}].</code></p>
- <p><code> rsa_padding() = 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding'
- | 'rsa_no_padding'</code></p>
+ <p><code>rsa_padding() = 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' |
+ 'rsa_no_padding'</code></p>
+
+ <p><code>digest_type() - Union of below digest types</code></p>
- <p><code> rsa_digest_type() = 'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512' </code></p>
+ <p><code>rsa_digest_type() = 'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' |
+ 'sha512'</code></p>
+
+ <p><code>dss_digest_type() = 'sha'</code></p>
- <p><code> dss_digest_type() = 'sha' </code></p>
+ <p><code>ecdsa_digest_type() = 'sha'| 'sha224' | 'sha256' | 'sha384' | 'sha512'</code></p>
- <p><code> ecdsa_digest_type() = 'sha'| 'sha224' | 'sha256' | 'sha384' | 'sha512' </code></p>
+ <p><code>crl_reason() = unspecified | keyCompromise | cACompromise |
+ affiliationChanged | superseded | cessationOfOperation |
+ certificateHold | privilegeWithdrawn | aACompromise</code></p>
- <p><code> crl_reason() = unspecified | keyCompromise | cACompromise | affiliationChanged | superseded | cessationOfOperation | certificateHold | privilegeWithdrawn | aACompromise
- </code></p>
+ <p><code>issuer_name() = {rdnSequence,[#'AttributeTypeAndValue'{}]} </code> </p>
- <p><code> ssh_file() = openssh_public_key | rfc4716_public_key |
- known_hosts | auth_keys </code></p>
+ <p><code>ssh_file() = openssh_public_key | rfc4716_public_key | known_hosts |
+ auth_keys</code></p>
<!-- <p><code>policy_tree() = [Root, Children]</code></p> -->
@@ -361,8 +370,8 @@
<name>pkix_is_issuer(Cert, IssuerCert) -> boolean()</name>
<fsummary> Checks if <c>IssuerCert</c> issued <c>Cert</c> </fsummary>
<type>
- <v>Cert = der_encode() | #'OTPCertificate'{}</v>
- <v>IssuerCert = der_encode() | #'OTPCertificate'{}</v>
+ <v>Cert = der_encoded() | #'OTPCertificate'{}</v>
+ <v>IssuerCert = der_encoded() | #'OTPCertificate'{}</v>
</type>
<desc>
<p> Checks if <c>IssuerCert</c> issued <c>Cert</c> </p>
@@ -373,7 +382,7 @@
<name>pkix_is_fixed_dh_cert(Cert) -> boolean()</name>
<fsummary> Checks if a Certificate is a fixed Diffie-Hellman Cert.</fsummary>
<type>
- <v>Cert = der_encode() | #'OTPCertificate'{}</v>
+ <v>Cert = der_encoded() | #'OTPCertificate'{}</v>
</type>
<desc>
<p> Checks if a Certificate is a fixed Diffie-Hellman Cert.</p>
@@ -384,7 +393,7 @@
<name>pkix_is_self_signed(Cert) -> boolean()</name>
<fsummary> Checks if a Certificate is self signed.</fsummary>
<type>
- <v>Cert = der_encode() | #'OTPCertificate'{}</v>
+ <v>Cert = der_encoded() | #'OTPCertificate'{}</v>
</type>
<desc>
<p> Checks if a Certificate is self signed.</p>
@@ -395,24 +404,25 @@
<name>pkix_issuer_id(Cert, IssuedBy) -> {ok, IssuerID} | {error, Reason}</name>
<fsummary> Returns the issuer id.</fsummary>
<type>
- <v>Cert = der_encode() | #'OTPCertificate'{}</v>
+ <v>Cert = der_encoded() | #'OTPCertificate'{}</v>
<v>IssuedBy = self | other</v>
- <v>IssuerID = {integer(), {rdnSequence, [#'AttributeTypeAndValue'{}]}}</v>
+ <v>IssuerID = {integer(), issuer_name()}</v>
<d>The issuer id consists of the serial number and the issuers name.</d>
<v>Reason = term()</v>
- </type>
- <desc>
- <p> Returns the issuer id.</p>
- </desc>
+ </type>
+ <desc>
+ <p> Returns the issuer id.</p>
+ </desc>
</func>
-
+
+
<func>
<name>pkix_normalize_name(Issuer) -> Normalized</name>
<fsummary>Normalizes a issuer name so that it can be easily
compared to another issuer name. </fsummary>
<type>
- <v>Issuer = {rdnSequence,[#'AttributeTypeAndValue'{}]}</v>
- <v>Normalized = {rdnSequence, [#'AttributeTypeAndValue'{}]}</v>
+ <v>Issuer = issuer_name()</v>
+ <v>Normalized = issuer_name()</v>
</type>
<desc>
<p>Normalizes a issuer name so that it can be easily
@@ -424,19 +434,21 @@
<name>pkix_path_validation(TrustedCert, CertChain, Options) -> {ok, {PublicKeyInfo, PolicyTree}} | {error, {bad_cert, Reason}} </name>
<fsummary> Performs a basic path validation according to RFC 5280.</fsummary>
<type>
- <v> TrustedCert = #'OTPCertificate'{} | der_encode() | unknown_ca | selfsigned_peer </v>
- <d>Normally a trusted certificate but it can also be one of the path validation
- errors <c>unknown_ca </c> or <c>selfsigned_peer </c> that can be discovered while
- constructing the input to this function and that should be run through the <c>verify_fun</c>.</d>
- <v> CertChain = [der_encode()]</v>
+ <v> TrustedCert = #'OTPCertificate'{} | der_encoded() | atom() </v>
+ <d>Normally a trusted certificate but it can also be a path validation
+ error that can be discovered while
+ constructing the input to this function and that should be run through the <c>verify_fun</c>.
+ For example <c>unknown_ca </c> or <c>selfsigned_peer </c>
+ </d>
+ <v> CertChain = [der_encoded()]</v>
<d>A list of DER encoded certificates in trust order ending with the peer certificate.</d>
- <v> Options = proplists:proplists()</v>
+ <v> Options = proplists:proplist()</v>
<v>PublicKeyInfo = {?'rsaEncryption' | ?'id-dsa',
rsa_public_key() | integer(), 'NULL' | 'Dss-Parms'{}}</v>
<v> PolicyTree = term() </v>
<d>At the moment this will always be an empty list as Policies are not currently supported</d>
- <v> Reason = cert_expired | invalid_issuer | invalid_signature | unknown_ca |
- selfsigned_peer | name_not_permitted | missing_basic_constraint | invalid_key_usage | crl_reason()
+ <v> Reason = cert_expired | invalid_issuer | invalid_signature | name_not_permitted |
+ missing_basic_constraint | invalid_key_usage | {revoked, crl_reason()} | atom()
</v>
</type>
<desc>
@@ -444,7 +456,7 @@
Performs a basic path validation according to
<url href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280.</url>
However CRL validation is done separately by <seealso
- marker="public_key#pkix_crls_validate-3">pkix_crls_validate/3 </seealso> and should be called
+ marker="#pkix_crls_validate-3">pkix_crls_validate/3 </seealso> and should be called
from the supplied <c>verify_fun</c>
</p>
@@ -456,11 +468,14 @@
<p>The fun should be defined as:</p>
<code>
-fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
- {extension, #'Extension'{}},
+fun(OtpCert :: #'OTPCertificate'{},
+ Event :: {bad_cert, Reason :: atom() | {revoked, atom()}} |
+ {extension, #'Extension'{}},
InitialUserState :: term()) ->
- {valid, UserState :: term()} | {valid_peer, UserState :: term()} |
- {fail, Reason :: term()} | {unknown, UserState :: term()}.
+ {valid, UserState :: term()} |
+ {valid_peer, UserState :: term()} |
+ {fail, Reason :: term()} |
+ {unknown, UserState :: term()}.
</code>
<p>If the verify callback fun returns {fail, Reason}, the
@@ -483,22 +498,62 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
on.
</item>
</taglist>
+
+ <p> Possible reasons for a bad certificate are: </p>
+ <taglist>
+ <tag>cert_expired</tag>
+ <item>The certificate is no longer valid as its expiration date has passed.</item>
+
+ <tag>invalid_issuer</tag>
+ <item>The certificate issuer name does not match the name of the issuer certificate in the chain.</item>
+
+ <tag>invalid_signature</tag>
+ <item>The certificate was not signed by its issuer certificate in the chain.</item>
+
+ <tag>name_not_permitted</tag>
+ <item>Invalid Subject Alternative Name extension.</item>
+
+ <tag>missing_basic_constraint</tag>
+ <item>Certificate, required to have the basic constraints extension, does not have
+ a basic constraints extension.</item>
+
+ <tag>invalid_key_usage</tag>
+ <item>Certificate key is used in an invalid way according to the key usage extension.</item>
+
+ <tag>{revoked, crl_reason()}</tag>
+ <item>Certificate has been revoked.</item>
+
+ <tag>atom()</tag>
+ <item>Application specific error reason that should be checked by the verify_fun</item>
+ </taglist>
+
</desc>
</func>
+ <func>
+ <name>pkix_crl_issuer(CRL) -> issuer_name()</name>
+ <fsummary>Returns the issuer of the <c>CRL</c>.</fsummary>
+ <type>
+ <v>CRL = der_encoded() | #'CertificateList'{} </v>
+ </type>
+ <desc>
+ <p>Returns the issuer of the <c>CRL</c>.</p>
+ </desc>
+ </func>
+
<func>
<name>pkix_crls_validate(OTPCertificate, DPAndCRLs, Options) -> CRLStatus()</name>
<fsummary> Performs CRL validation.</fsummary>
<type>
<v> OTPCertificate = #'OTPCertificate'{}</v>
- <v> DPAndCRLs = [{DP::#'DistributionPoint'{} ,CRL::#'CertificateList'{}}] </v>
- <v> Options = proplists:proplists()</v>
+ <v> DPAndCRLs = [{DP::#'DistributionPoint'{}, {DerCRL::der_encoded(), CRL::#'CertificateList'{}}}] </v>
+ <v> Options = proplists:proplist()</v>
<v> CRLStatus() = valid | {bad_cert, revocation_status_undetermined} |
{bad_cert, {revoked, crl_reason()}}</v>
</type>
<desc>
<p> Performs CRL validation. It is intended to be called from
- the verify fun of <seealso marker="public_key#pkix_path_validation-3"> pkix_path_validation/3
+ the verify fun of <seealso marker="#pkix_path_validation-3"> pkix_path_validation/3
</seealso></p>
<taglist>
<p> Available options are: </p>
@@ -506,7 +561,8 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
<item>
<p>The fun has the following type spec:</p>
- <code> fun(#'DistributionPoint'{}, #'CertificateList'{}) -> #'CertificateList'{}</code>
+ <code> fun(#'DistributionPoint'{}, #'CertificateList'{}) ->
+ #'CertificateList'{}</code>
<p>The fun should use the information in the distribution point to acesses
the lates possible version of the CRL. If this fun is not specified
@@ -514,12 +570,66 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
</p>
<code> fun(_DP, CRL) -> CRL end</code>
</item>
+
+ <tag>{issuer_fun, fun()}</tag>
+ <item>
+ <p>The fun has the following type spec:</p>
+
+ <code>
+fun(#'DistributionPoint'{}, #'CertificateList'{},
+ {rdnSequence,[#'AttributeTypeAndValue'{}]}, term()) ->
+ {ok, #'OTPCertificate'{}, [der_encoded]}</code>
+
+ <p>The fun should return the root certificate and certificate chain
+ that has signed the CRL.
+ </p>
+ <code> fun(DP, CRL, Issuer, UserState) -> {ok, RootCert, CertChain}</code>
+ </item>
</taglist>
</desc>
</func>
+
+ <func>
+ <name>pkix_crl_verify(CRL, Cert) -> boolean()</name>
+ <fsummary> Verify that <c>Cert</c> is the <c> CRL</c> signer. </fsummary>
+ <type>
+ <v>CRL = der_encoded() | #'CertificateList'{} </v>
+ <v>Cert = der_encoded() | #'OTPCertificate'{} </v>
+ </type>
+ <desc>
+ <p>Verify that <c>Cert</c> is the <c>CRL</c> signer.</p>
+ </desc>
+ </func>
+ <func>
+ <name>pkix_dist_point(Cert) -> DistPoint</name>
+ <fsummary>Creates a distribution point for CRLs issued by the same issuer as <c>Cert</c>.</fsummary>
+ <type>
+ <v> Cert = der_encoded() | #'OTPCertificate'{} </v>
+ <v> DistPoint = #'DistributionPoint'{}</v>
+ </type>
+ <desc>
+ <p>Creates a distribution point for CRLs issued by the same issuer as <c>Cert</c>.
+ Can be used as input to <seealso
+ marker="#pkix_crls_validate-3">pkix_crls_validate/3 </seealso>
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name>pkix_dist_points(Cert) -> DistPoints</name>
+ <fsummary> Extracts distribution points from the certificates extensions.</fsummary>
+ <type>
+ <v> Cert = der_encoded() | #'OTPCertificate'{} </v>
+ <v> DistPoints = [#'DistributionPoint'{}]</v>
+ </type>
+ <desc>
+ <p> Extracts distribution points from the certificates extensions.</p>
+ </desc>
+ </func>
+
<func>
- <name>pkix_sign(#'OTPTBSCertificate'{}, Key) -> der_encode()</name>
+ <name>pkix_sign(#'OTPTBSCertificate'{}, Key) -> der_encoded()</name>
<fsummary>Signs certificate.</fsummary>
<type>
<v>Key = rsa_public_key() | dsa_public_key()</v>
@@ -549,7 +659,7 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
<name>pkix_verify(Cert, Key) -> boolean()</name>
<fsummary> Verify pkix x.509 certificate signature.</fsummary>
<type>
- <v>Cert = der_encode()</v>
+ <v>Cert = der_encoded()</v>
<v>Key = rsa_public_key() | dsa_public_key()</v>
</type>
<desc>
diff --git a/lib/public_key/doc/src/public_key_records.xml b/lib/public_key/doc/src/public_key_records.xml
index e39ad0ec64..d3534846fa 100644
--- a/lib/public_key/doc/src/public_key_records.xml
+++ b/lib/public_key/doc/src/public_key_records.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -35,17 +35,27 @@
</header>
<p>This chapter briefly describes Erlang records derived from ASN1
- specifications used to handle public and private keys. The intent
- is to describe the data types and not to specify the meaning of
- each component for this we refer you to the relevant standards and RFCs.</p>
+ specifications used to handle public and private keys.
+ The intent is to describe the data types
+ and not to specify the semantics of each component. For information on the
+ semantics, please see the relevant standards and RFCs.</p>
<p>Use the following include directive to get access to the
- records and constant macros used in the following sections.</p>
+ records and constant macros described in the following sections.</p>
<code> -include_lib("public_key/include/public_key.hrl"). </code>
+ <section>
+ <title>Common Data Types</title>
+
+ <p>Common non-standard Erlang
+ data types used to described the record fields in the
+ below sections are defined in <seealso
+ marker="public_key">public key reference manual </seealso></p>
+ </section>
+
<section>
- <title>RSA as defined by the PKCS-1 standard and RFC 3447.</title>
+ <title>RSA as defined by the PKCS-1 standard and <url href="http://www.ietf.org/rfc/rfc3447.txt"> RFC 3447 </url></title>
<code>
#'RSAPublicKey'{
@@ -76,7 +86,8 @@
</section>
<section>
- <title>DSA as defined by Digital Signature Standard (NIST FIPS PUB 186-2)
+ <title>DSA as defined by
+ <url href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf"> Digital Signature Standard (NIST FIPS PUB 186-2) </url>
</title>
<code>
@@ -96,4 +107,47 @@
}.
</code>
</section>
+
+ <section>
+ <title>ECC (Elliptic Curve) <url href="http://www.ietf.org/rfc/rfc3447.txt"> RFC 5480 </url>
+ </title>
+
+ <code>
+#'ECPrivateKey'{
+ version, % integer()
+ privateKey, % octet_string()
+ parameters, % der_encoded() - {'EcpkParameters', #'ECParameters'{}} |
+ {'EcpkParameters', {namedCurve, oid()}} |
+ {'EcpkParameters', 'NULL'} % Inherited by CA
+ publicKey % bitstring()
+ }.
+
+#'ECParameters'{
+ version, % integer()
+ fieldID, % #'FieldID'{}
+ curve, % #'Curve'{}
+ base, % octet_string()
+ order, % integer()
+ cofactor % integer()
+ }.
+
+#'Curve'{
+ a, % octet_string()
+ b, % octet_string()
+ seed % bitstring() - optional
+
+ }.
+
+#'FieldID'{
+ fieldType, % oid()
+ parameters % Depending on fieldType
+ }.
+
+#'ECPoint'{
+ point % octet_string() - the public key
+ }.
+
+ </code>
+ </section>
+
</chapter>
diff --git a/lib/public_key/doc/src/ref_man.xml b/lib/public_key/doc/src/ref_man.xml
index 285cc36c6f..b7078891d4 100644
--- a/lib/public_key/doc/src/ref_man.xml
+++ b/lib/public_key/doc/src/ref_man.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/public_key/include/public_key.hrl b/lib/public_key/include/public_key.hrl
index 1e882e76ee..c6394115e3 100644
--- a/lib/public_key/include/public_key.hrl
+++ b/lib/public_key/include/public_key.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,7 +76,6 @@
point
}).
-
-define(unspecified, 0).
-define(keyCompromise, 1).
-define(cACompromise, 2).
@@ -88,22 +87,4 @@
-define(privilegeWithdrawn, 9).
-define(aACompromise, 10).
--type public_key() :: rsa_public_key() | dsa_public_key().
--type rsa_public_key() :: #'RSAPublicKey'{}.
--type rsa_private_key() :: #'RSAPrivateKey'{}.
--type dsa_private_key() :: #'DSAPrivateKey'{}.
--type dsa_public_key() :: {integer(), #'Dss-Parms'{}}.
--type ec_public_key() :: {#'ECPoint'{},{namedCurve, Oid::tuple()} | #'ECParameters'{}}.
--type ec_private_key() :: #'ECPrivateKey'{}.
--type der_encoded() :: binary().
--type decrypt_der() :: binary().
--type pki_asn1_type() :: 'Certificate' | 'RSAPrivateKey' | 'RSAPublicKey'
- | 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter'
- | 'SubjectPublicKeyInfo' | 'CertificationRequest' | 'CertificateList'.
--type pem_entry() :: {pki_asn1_type(), binary(), %% DER or Encrypted DER
- not_encrypted | {Cipher :: string(), Salt :: binary()}}.
--type asn1_type() :: atom(). %% see "OTP-PUB-KEY.hrl
--type ssh_file() :: openssh_public_key | rfc4716_public_key | known_hosts |
- auth_keys.
-
-endif. % -ifdef(public_key).
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index dc8d68c78f..8b11538499 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,8 +28,9 @@
validate_issuer/4, validate_names/6,
validate_extensions/4,
normalize_general_name/1, is_self_signed/1,
- is_issuer/2, issuer_id/2, is_fixed_dh_cert/1,
- verify_data/1, verify_fun/4, select_extension/2, match_name/3,
+ is_issuer/2, issuer_id/2, distribution_points/1,
+ is_fixed_dh_cert/1, verify_data/1, verify_fun/4,
+ select_extension/2, match_name/3,
extensions_list/1, cert_auth_key_id/1, time_str_2_gregorian_sec/1]).
-define(NULL, 0).
@@ -272,6 +273,16 @@ issuer_id(Otpcert, self) ->
SerialNr = TBSCert#'OTPTBSCertificate'.serialNumber,
{ok, {SerialNr, normalize_general_name(Issuer)}}.
+distribution_points(Otpcert) ->
+ TBSCert = Otpcert#'OTPCertificate'.tbsCertificate,
+ Extensions = extensions_list(TBSCert#'OTPTBSCertificate'.extensions),
+ case select_extension(?'id-ce-cRLDistributionPoints', Extensions) of
+ undefined ->
+ [];
+ #'Extension'{extnValue = Value} ->
+ Value
+ end.
+
%%--------------------------------------------------------------------
-spec is_fixed_dh_cert(#'OTPCertificate'{}) -> boolean().
%%
@@ -296,7 +307,9 @@ is_fixed_dh_cert(#'OTPCertificate'{tbsCertificate =
%% --------------------------------------------------------------------
verify_fun(Otpcert, Result, UserState0, VerifyFun) ->
case VerifyFun(Otpcert, Result, UserState0) of
- {valid,UserState} ->
+ {valid, UserState} ->
+ UserState;
+ {valid_peer, UserState} ->
UserState;
{fail, Reason} ->
case Reason of
@@ -319,6 +332,8 @@ verify_fun(Otpcert, Result, UserState0, VerifyFun) ->
%%
%% Description: Extracts a specific extension from a list of extensions.
%%--------------------------------------------------------------------
+select_extension(_, asn1_NOVALUE) ->
+ undefined;
select_extension(_, []) ->
undefined;
select_extension(Id, [#'Extension'{extnID = Id} = Extension | _]) ->
@@ -342,8 +357,11 @@ match_name(uniformResourceIdentifier, URI, [PermittedName | Rest]) ->
incomplete ->
false;
{_, _, Host, _, _} ->
- match_name(fun is_valid_host_or_domain/2, Host,
- PermittedName, Rest)
+ PN = case split_uri(PermittedName) of
+ {_, _, PNhost, _, _} -> PNhost;
+ _X -> PermittedName
+ end,
+ match_name(fun is_valid_host_or_domain/2, Host, PN, Rest)
end;
match_name(emailAddress, Name, [PermittedName | Rest]) ->
@@ -511,10 +529,10 @@ is_dir_name2(Value, Value) -> true;
is_dir_name2({printableString, Value1}, {printableString, Value2}) ->
string:to_lower(strip_spaces(Value1)) =:=
string:to_lower(strip_spaces(Value2));
-is_dir_name2({utf8String, Value1}, String) -> %% BUGBUG FIX UTF8 conv
- is_dir_name2({printableString, binary_to_list(Value1)}, String);
-is_dir_name2(String, {utf8String, Value1}) -> %% BUGBUG FIX UTF8 conv
- is_dir_name2(String, {printableString, binary_to_list(Value1)});
+is_dir_name2({utf8String, Value1}, String) ->
+ is_dir_name2({printableString, unicode:characters_to_list(Value1)}, String);
+is_dir_name2(String, {utf8String, Value1}) ->
+ is_dir_name2(String, {printableString, unicode:characters_to_list(Value1)});
is_dir_name2(_, _) ->
false.
diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl
index fdd89aa70d..9a8e49f265 100644
--- a/lib/public_key/src/pubkey_cert_records.erl
+++ b/lib/public_key/src/pubkey_cert_records.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -99,7 +99,7 @@ transform(Other,_) ->
Other.
%%--------------------------------------------------------------------
--spec supportedPublicKeyAlgorithms(Oid::tuple()) -> asn1_type().
+-spec supportedPublicKeyAlgorithms(Oid::tuple()) -> public_key:asn1_type().
%%
%% Description: Returns the public key type for an algorithm
%% identifier tuple as found in SubjectPublicKeyInfo.
@@ -147,6 +147,20 @@ namedCurves(?'sect163r1') -> sect163r1;
namedCurves(?'sect163k1') -> sect163k1;
namedCurves(?'secp256r1') -> secp256r1;
namedCurves(?'secp192r1') -> secp192r1;
+namedCurves(?'brainpoolP160r1') -> brainpoolP160r1;
+namedCurves(?'brainpoolP160t1') -> brainpoolP160t1;
+namedCurves(?'brainpoolP192r1') -> brainpoolP192r1;
+namedCurves(?'brainpoolP192t1') -> brainpoolP192t1;
+namedCurves(?'brainpoolP224r1') -> brainpoolP224r1;
+namedCurves(?'brainpoolP224t1') -> brainpoolP224t1;
+namedCurves(?'brainpoolP256r1') -> brainpoolP256r1;
+namedCurves(?'brainpoolP256t1') -> brainpoolP256t1;
+namedCurves(?'brainpoolP320r1') -> brainpoolP320r1;
+namedCurves(?'brainpoolP320t1') -> brainpoolP320t1;
+namedCurves(?'brainpoolP384r1') -> brainpoolP384r1;
+namedCurves(?'brainpoolP384t1') -> brainpoolP384t1;
+namedCurves(?'brainpoolP512r1') -> brainpoolP512r1;
+namedCurves(?'brainpoolP512t1') -> brainpoolP512t1;
namedCurves(sect571r1) -> ?'sect571r1';
namedCurves(sect571k1) -> ?'sect571k1';
@@ -180,7 +194,21 @@ namedCurves(sect239k1) -> ?'sect239k1';
namedCurves(sect163r1) -> ?'sect163r1';
namedCurves(sect163k1) -> ?'sect163k1';
namedCurves(secp256r1) -> ?'secp256r1';
-namedCurves(secp192r1) -> ?'secp192r1'.
+namedCurves(secp192r1) -> ?'secp192r1';
+namedCurves(brainpoolP160r1) -> ?'brainpoolP160r1';
+namedCurves(brainpoolP160t1) -> ?'brainpoolP160t1';
+namedCurves(brainpoolP192r1) -> ?'brainpoolP192r1';
+namedCurves(brainpoolP192t1) -> ?'brainpoolP192t1';
+namedCurves(brainpoolP224r1) -> ?'brainpoolP224r1';
+namedCurves(brainpoolP224t1) -> ?'brainpoolP224t1';
+namedCurves(brainpoolP256r1) -> ?'brainpoolP256r1';
+namedCurves(brainpoolP256t1) -> ?'brainpoolP256t1';
+namedCurves(brainpoolP320r1) -> ?'brainpoolP320r1';
+namedCurves(brainpoolP320t1) -> ?'brainpoolP320t1';
+namedCurves(brainpoolP384r1) -> ?'brainpoolP384r1';
+namedCurves(brainpoolP384t1) -> ?'brainpoolP384t1';
+namedCurves(brainpoolP512r1) -> ?'brainpoolP512r1';
+namedCurves(brainpoolP512t1) -> ?'brainpoolP512t1'.
%%--------------------------------------------------------------------
%%% Internal functions
diff --git a/lib/public_key/src/pubkey_crl.erl b/lib/public_key/src/pubkey_crl.erl
index eaba5bfa1b..488cc97c70 100644
--- a/lib/public_key/src/pubkey_crl.erl
+++ b/lib/public_key/src/pubkey_crl.erl
@@ -39,7 +39,13 @@ validate(OtpCert, OtherDPCRLs, DP, {DerCRL, CRL}, {DerDeltaCRL, DeltaCRL},
CertIssuer = TBSCert#'OTPTBSCertificate'.issuer,
TBSCRL = CRL#'CertificateList'.tbsCertList,
CRLIssuer = TBSCRL#'TBSCertList'.issuer,
- AltNames = subject_alt_names(TBSCert#'OTPTBSCertificate'.extensions),
+ AltNames = case pubkey_cert:select_extension(?'id-ce-subjectAltName',
+ TBSCert#'OTPTBSCertificate'.extensions) of
+ #'Extension'{extnValue = Value} ->
+ Value;
+ _ ->
+ []
+ end,
revoked_status(DP, IDP, {directoryName, CRLIssuer},
[ {directoryName, CertIssuer} | AltNames], SerialNumber, Revoked,
DeltaRevoked, RevokedState1);
@@ -397,16 +403,18 @@ verify_dp_name(IDPNames, DPorIssuerNames) ->
match_one([], _) ->
false;
match_one([{Type, Name} | Names], CandidateNames) ->
- Candidates = [NameName || {NameType, NameName} <- CandidateNames, NameType == Type],
+ Candidates = [NameName || {NameType, NameName} <- CandidateNames,
+ NameType == Type],
case Candidates of
[] ->
false;
- [_|_] -> case pubkey_cert:match_name(Type, Name, Candidates) of
- true ->
- true;
- false ->
- match_one(Names, CandidateNames)
- end
+ [_|_] ->
+ case pubkey_cert:match_name(Type, Name, Candidates) of
+ true ->
+ true;
+ false ->
+ match_one(Names, CandidateNames)
+ end
end.
verify_dp_bools(TBSCert, IDP) ->
@@ -664,6 +672,8 @@ verify_extensions([#'TBSCertList_revokedCertificates_SEQOF'{crlEntryExtensions =
verify_extensions(pubkey_cert:extensions_list(Ext)) and verify_extensions(Rest);
verify_extensions([]) ->
true;
+verify_extensions(asn1_NOVALUE) ->
+ true;
verify_extensions([#'Extension'{critical = true, extnID = Id} | Rest]) ->
case lists:member(Id, [?'id-ce-authorityKeyIdentifier',
?'id-ce-issuerAltName',
@@ -689,13 +699,3 @@ authority_key_identifier(Extensions) ->
Enc = extension_value(?'id-ce-authorityKeyIdentifier',
'AuthorityKeyIdentifier', Extensions),
pubkey_cert_records:transform(Enc, decode).
-
-subject_alt_names(Extensions) ->
- Enc = extension_value(?'id-ce-subjectAltName',
- 'GeneralNames', Extensions),
- case Enc of
- undefined ->
- [];
- _ ->
- pubkey_cert_records:transform(Enc, decode)
- end.
diff --git a/lib/public_key/src/pubkey_pbe.erl b/lib/public_key/src/pubkey_pbe.erl
index 460624163b..521a32189d 100644
--- a/lib/public_key/src/pubkey_pbe.erl
+++ b/lib/public_key/src/pubkey_pbe.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-include("public_key.hrl").
--export([encode/4, decode/4, decrypt_parameters/1]).
+-export([encode/4, decode/4, decrypt_parameters/1, encrypt_parameters/1]).
-export([pbdkdf1/4, pbdkdf2/7]).
-define(DEFAULT_SHA_MAC_KEYLEN, 20).
@@ -40,16 +40,16 @@
%%--------------------------------------------------------------------
encode(Data, Password, "DES-CBC" = Cipher, KeyDevParams) ->
{Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
- crypto:block_encrypt(des_cbc, Key, IV, Data);
+ crypto:block_encrypt(des_cbc, Key, IV, pbe_pad(Data, KeyDevParams));
encode(Data, Password, "DES-EDE3-CBC" = Cipher, KeyDevParams) ->
{Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
<<Key1:8/binary, Key2:8/binary, Key3:8/binary>> = Key,
- crypto:block_encrypt(des3_cbc, [Key1, Key2, Key3], IV, Data);
+ crypto:block_encrypt(des3_cbc, [Key1, Key2, Key3], IV, pbe_pad(Data));
encode(Data, Password, "RC2-CBC" = Cipher, KeyDevParams) ->
{Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
- crypto:block_encrypt(rc2_cbc, Key, IV, Data).
+ crypto:block_encrypt(rc2_cbc, Key, IV, pbe_pad(Data, KeyDevParams)).
%%--------------------------------------------------------------------
-spec decode(binary(), string(), string(), term()) -> binary().
%%
@@ -108,6 +108,15 @@ decrypt_parameters(#'EncryptedPrivateKeyInfo_encryptionAlgorithm'{
algorithm = Oid, parameters = Param}) ->
decrypt_parameters(Oid, Param).
+
+%%--------------------------------------------------------------------
+-spec encrypt_parameters({Cipher::string(), Params::term()}) ->
+ #'EncryptedPrivateKeyInfo_encryptionAlgorithm'{}.
+%%
+%% Description: Performs ANS1-decoding of encryption parameters.
+%%--------------------------------------------------------------------
+encrypt_parameters({Cipher, Params}) ->
+ encrypt_parameters(Cipher, Params).
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
@@ -117,14 +126,18 @@ password_to_key_and_iv(Password, _, #'PBES2-params'{} = Params) ->
<<Key:KeyLen/binary, _/binary>> =
pbdkdf2(Password, Salt, ItrCount, KeyLen, PseudoRandomFunction, PseudoHash, PseudoOtputLen),
{Key, IV};
+password_to_key_and_iv(Password, _Cipher, {#'PBEParameter'{salt = Salt,
+ iterationCount = Count}, Hash}) ->
+ <<Key:8/binary, IV:8/binary, _/binary>>
+ = pbdkdf1(Password, erlang:iolist_to_binary(Salt), Count, Hash),
+ {Key, IV};
password_to_key_and_iv(Password, Cipher, Salt) ->
- KeyLen = derived_key_length(Cipher, undefined),
+ KeyLen = derived_key_length(Cipher, undefined),
<<Key:KeyLen/binary, _/binary>> =
pem_encrypt(<<>>, Password, Salt, ceiling(KeyLen div 16), <<>>, md5),
%% Old PEM encryption does not use standard encryption method
- %% pbdkdf1 and uses then salt as IV
+ %% pbdkdf1 and uses then salt as IV
{Key, Salt}.
-
pem_encrypt(_, _, _, 0, Acc, _) ->
Acc;
pem_encrypt(Prev, Password, Salt, Count, Acc, Hash) ->
@@ -169,7 +182,52 @@ do_xor_sum(Prf, PrfHash, PrfLen, Prev, Password, Count, Acc)->
decrypt_parameters(?'id-PBES2', DekParams) ->
{ok, Params} = 'PKCS-FRAME':decode('PBES2-params', DekParams),
- {cipher(Params#'PBES2-params'.encryptionScheme), Params}.
+ {cipher(Params#'PBES2-params'.encryptionScheme), Params};
+decrypt_parameters(?'pbeWithSHA1AndRC2-CBC', DekParams) ->
+ {ok, Params} = 'PKCS-FRAME':decode('PBEParameter', DekParams),
+ {"RC2-CBC", {Params, sha}};
+decrypt_parameters(?'pbeWithSHA1AndDES-CBC', DekParams) ->
+ {ok, Params} = 'PKCS-FRAME':decode('PBEParameter', DekParams),
+ {"DES-CBC", {Params, sha}};
+decrypt_parameters(?'pbeWithMD5AndRC2-CBC', DekParams) ->
+ {ok, Params} = 'PKCS-FRAME':decode('PBEParameter', DekParams),
+ {"RC2-CBC", {Params, md5}};
+decrypt_parameters(?'pbeWithMD5AndDES-CBC', DekParams) ->
+ {ok, Params} = 'PKCS-FRAME':decode('PBEParameter', DekParams),
+ {"DES-CBC", {Params, md5}}.
+
+encrypt_parameters(_Cipher, #'PBES2-params'{} = Params) ->
+ {ok, Der} ='PKCS-FRAME':encode('PBES2-params', Params),
+ #'EncryptedPrivateKeyInfo_encryptionAlgorithm'{
+ algorithm = ?'id-PBES2',
+ parameters = Der};
+
+encrypt_parameters(Cipher, {#'PBEParameter'{} = Params, Hash}) ->
+ {ok, Der} ='PKCS-FRAME':encode('PBEParameter', Params),
+ #'EncryptedPrivateKeyInfo_encryptionAlgorithm'{
+ algorithm = pbe1_oid(Cipher, Hash),
+ parameters = Der}.
+
+pbe1_oid("RC2-CBC", sha) ->
+ ?'pbeWithSHA1AndRC2-CBC';
+pbe1_oid("DES-CBC", sha) ->
+ ?'pbeWithSHA1AndDES-CBC';
+pbe1_oid("RC2-CBC", md5) ->
+ ?'pbeWithMD5AndRC2-CBC';
+pbe1_oid("DES-CBC", md5) ->
+ ?'pbeWithMD5AndDES-CBC'.
+
+pbe_pad(Data, {#'PBEParameter'{}, _}) ->
+ pbe_pad(Data);
+pbe_pad(Data, #'PBES2-params'{}) ->
+ pbe_pad(Data);
+pbe_pad(Data, _) ->
+ Data.
+
+pbe_pad(Data) ->
+ N = 8 - (erlang:byte_size(Data) rem 8),
+ Pad = list_to_binary(lists:duplicate(N, N)),
+ <<Data/binary, Pad/binary>>.
key_derivation_params(#'PBES2-params'{keyDerivationFunc = KeyDerivationFunc,
encryptionScheme = EncScheme}) ->
diff --git a/lib/public_key/src/pubkey_pem.erl b/lib/public_key/src/pubkey_pem.erl
index 746d142ec3..98881c4a6a 100644
--- a/lib/public_key/src/pubkey_pem.erl
+++ b/lib/public_key/src/pubkey_pem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -51,7 +51,7 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec decode(binary()) -> [pem_entry()].
+-spec decode(binary()) -> [public_key:pem_entry()].
%%
%% Description: Decodes a PEM binary.
%%--------------------------------------------------------------------
@@ -59,7 +59,7 @@ decode(Bin) ->
decode_pem_entries(split_bin(Bin), []).
%%--------------------------------------------------------------------
--spec encode([pem_entry()]) -> iolist().
+-spec encode([public_key:pem_entry()]) -> iolist().
%%
%% Description: Encodes a list of PEM entries.
%%--------------------------------------------------------------------
@@ -67,8 +67,9 @@ encode(PemEntries) ->
encode_pem_entries(PemEntries).
%%--------------------------------------------------------------------
--spec decipher({pki_asn1_type(), DerEncrypted::binary(),
- {Cipher :: string(), Salt :: iodata() | #'PBES2-params'{}}},
+-spec decipher({public_key:pki_asn1_type(), DerEncrypted::binary(),
+ {Cipher :: string(), Salt :: iodata() | #'PBES2-params'{}
+ | {#'PBEParameter'{}, atom()}}},
string()) -> Der::binary().
%%
%% Description: Deciphers a decrypted pem entry.
@@ -77,7 +78,8 @@ decipher({_, DecryptDer, {Cipher, KeyDevParams}}, Password) ->
pubkey_pbe:decode(DecryptDer, Password, Cipher, KeyDevParams).
%%--------------------------------------------------------------------
--spec cipher(Der::binary(), {Cipher :: string(), Salt :: iodata() | #'PBES2-params'{}} ,
+-spec cipher(Der::binary(), {Cipher :: string(), Salt :: iodata() | #'PBES2-params'{}
+ | {#'PBEParameter'{}, atom()}},
string()) -> binary().
%%
%% Description: Ciphers a PEM entry
@@ -94,6 +96,10 @@ encode_pem_entries(Entries) ->
encode_pem_entry({Type, Der, not_encrypted}) ->
StartStr = pem_start(Type),
[StartStr, "\n", b64encode_and_split(Der), "\n", pem_end(StartStr) ,"\n\n"];
+encode_pem_entry({'PrivateKeyInfo', Der, EncParams}) ->
+ EncDer = encode_encrypted_private_keyinfo(Der, EncParams),
+ StartStr = pem_start('EncryptedPrivateKeyInfo'),
+ [StartStr, "\n", b64encode_and_split(EncDer), "\n", pem_end(StartStr) ,"\n\n"];
encode_pem_entry({Type, Der, {Cipher, Salt}}) ->
StartStr = pem_start(Type),
[StartStr,"\n", pem_decrypt(),"\n", pem_decrypt_info(Cipher, Salt),"\n",
@@ -139,6 +145,12 @@ decode_encrypted_private_keyinfo(Der) ->
DecryptParams = pubkey_pbe:decrypt_parameters(AlgorithmInfo),
{'PrivateKeyInfo', iolist_to_binary(Data), DecryptParams}.
+
+encode_encrypted_private_keyinfo(EncData, EncryptParmams) ->
+ AlgorithmInfo = pubkey_pbe:encrypt_parameters(EncryptParmams),
+ public_key:der_encode('EncryptedPrivateKeyInfo',
+ #'EncryptedPrivateKeyInfo'{encryptionAlgorithm = AlgorithmInfo,
+ encryptedData = EncData}).
split_bin(Bin) ->
split_bin(0, Bin).
@@ -197,13 +209,15 @@ pem_start('DSAPrivateKey') ->
<<"-----BEGIN DSA PRIVATE KEY-----">>;
pem_start('DHParameter') ->
<<"-----BEGIN DH PARAMETERS-----">>;
+pem_start('EncryptedPrivateKeyInfo') ->
+ <<"-----BEGIN ENCRYPTED PRIVATE KEY-----">>;
pem_start('CertificationRequest') ->
<<"-----BEGIN CERTIFICATE REQUEST-----">>;
pem_start('ContentInfo') ->
<<"-----BEGIN PKCS7-----">>;
pem_start('CertificateList') ->
<<"-----BEGIN X509 CRL-----">>;
-pem_start('OTPEcpkParameters') ->
+pem_start('EcpkParameters') ->
<<"-----BEGIN EC PARAMETERS-----">>;
pem_start('ECPrivateKey') ->
<<"-----BEGIN EC PRIVATE KEY-----">>.
@@ -260,7 +274,7 @@ asn1_type(<<"-----BEGIN PKCS7-----">>) ->
asn1_type(<<"-----BEGIN X509 CRL-----">>) ->
'CertificateList';
asn1_type(<<"-----BEGIN EC PARAMETERS-----">>) ->
- 'OTPEcpkParameters';
+ 'EcpkParameters';
asn1_type(<<"-----BEGIN EC PRIVATE KEY-----">>) ->
'ECPrivateKey'.
diff --git a/lib/public_key/src/pubkey_ssh.erl b/lib/public_key/src/pubkey_ssh.erl
index 41280b9e14..0522ea6ac3 100644
--- a/lib/public_key/src/pubkey_ssh.erl
+++ b/lib/public_key/src/pubkey_ssh.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,8 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec decode(binary(), public_key | ssh_file()) -> [{public_key(), Attributes::list()}].
+-spec decode(binary(), public_key | public_key:ssh_file()) ->
+ [{public_key:public_key(), Attributes::list()}].
%%
%% Description: Decodes a ssh file-binary.
%%--------------------------------------------------------------------
@@ -52,7 +53,7 @@ decode(Bin, Type) ->
openssh_decode(Bin, Type).
%%--------------------------------------------------------------------
--spec encode([{public_key(), Attributes::list()}], ssh_file()) ->
+-spec encode([{public_key:public_key(), Attributes::list()}], public_key:ssh_file()) ->
binary().
%%
%% Description: Encodes a list of ssh file entries.
diff --git a/lib/public_key/src/public_key.app.src b/lib/public_key/src/public_key.app.src
index 736a778a4b..88ef07c5a6 100644
--- a/lib/public_key/src/public_key.app.src
+++ b/lib/public_key/src/public_key.app.src
@@ -13,7 +13,9 @@
]},
{applications, [asn1, crypto, kernel, stdlib]},
{registered, []},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0","crypto-3.3",
+ "asn1-3.0"]}
]
}.
diff --git a/lib/public_key/src/public_key.appup.src b/lib/public_key/src/public_key.appup.src
index aacd3b866d..5278732c87 100644
--- a/lib/public_key/src/public_key.appup.src
+++ b/lib/public_key/src/public_key.appup.src
@@ -1,8 +1,21 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
{"%VSN%",
- [
- {<<"0\\.*">>, [{restart_application, public_key}]}
- ],
- [
- {<<"0\\.*">>, [{restart_application, public_key}]}
- ]}.
+ [{<<".*">>,[{restart_application, public_key}]}],
+ [{<<".*">>,[{restart_application, public_key}]}]
+}.
diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl
index ceecbcc7f2..e8ff965982 100644
--- a/lib/public_key/src/public_key.erl
+++ b/lib/public_key/src/public_key.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -46,9 +46,40 @@
pkix_normalize_name/1,
pkix_path_validation/3,
ssh_decode/2, ssh_encode/2,
- pkix_crls_validate/3
+ pkix_crls_validate/3,
+ pkix_dist_point/1,
+ pkix_dist_points/1,
+ pkix_crl_verify/2,
+ pkix_crl_issuer/1
]).
+-export_type([public_key/0, private_key/0, pem_entry/0,
+ pki_asn1_type/0, asn1_type/0, ssh_file/0, der_encoded/0]).
+
+-type public_key() :: rsa_public_key() | dsa_public_key() | ec_public_key().
+-type private_key() :: rsa_private_key() | dsa_private_key() | ec_private_key().
+
+-type rsa_public_key() :: #'RSAPublicKey'{}.
+-type rsa_private_key() :: #'RSAPrivateKey'{}.
+-type dsa_private_key() :: #'DSAPrivateKey'{}.
+-type dsa_public_key() :: {integer(), #'Dss-Parms'{}}.
+-type ec_public_key() :: {#'ECPoint'{},{namedCurve, Oid::tuple()} | #'ECParameters'{}}.
+-type ec_private_key() :: #'ECPrivateKey'{}.
+-type der_encoded() :: binary().
+-type pki_asn1_type() :: 'Certificate' | 'RSAPrivateKey' | 'RSAPublicKey'
+ | 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter'
+ | 'SubjectPublicKeyInfo' | 'PrivateKeyInfo' |
+ 'CertificationRequest' | 'CertificateList' |
+ 'ECPrivateKey' | 'EcpkParameters'.
+-type pem_entry() :: {pki_asn1_type(),
+ binary(), %% DER or Encrypted DER
+ not_encrypted | {Cipher :: string(), Salt :: binary()} |
+ {Cipher :: string(), #'PBES2-params'{}} |
+ {Cipher :: string(), {#'PBEParameter'{}, atom()}} %% hash type
+ }.
+-type asn1_type() :: atom(). %% see "OTP-PUB-KEY.hrl
+-type ssh_file() :: openssh_public_key | rfc4716_public_key | known_hosts |
+ auth_keys.
-type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding'
| 'rsa_no_padding'.
-type public_crypt_options() :: [{rsa_pad, rsa_padding()}].
@@ -83,7 +114,7 @@ pem_encode(PemEntries) when is_list(PemEntries) ->
iolist_to_binary(pubkey_pem:encode(PemEntries)).
%%--------------------------------------------------------------------
--spec pem_entry_decode(pem_entry(), [string()]) -> term().
+-spec pem_entry_decode(pem_entry(), string()) -> term().
%
%% Description: Decodes a pem entry. pem_decode/1 returns a list of
%% pem entries.
@@ -112,20 +143,21 @@ pem_entry_decode({Asn1Type, CryptDer, {Cipher, #'PBES2-params'{}}} = PemEntry,
is_binary(CryptDer) andalso
is_list(Cipher) ->
do_pem_entry_decode(PemEntry, Password);
+pem_entry_decode({Asn1Type, CryptDer, {Cipher, {#'PBEParameter'{},_}}} = PemEntry,
+ Password) when is_atom(Asn1Type) andalso
+ is_binary(CryptDer) andalso
+ is_list(Cipher) andalso
+ is_list(Password) ->
+ do_pem_entry_decode(PemEntry, Password);
pem_entry_decode({Asn1Type, CryptDer, {Cipher, Salt}} = PemEntry,
Password) when is_atom(Asn1Type) andalso
is_binary(CryptDer) andalso
is_list(Cipher) andalso
is_binary(Salt) andalso
- erlang:byte_size(Salt) == 8 ->
- do_pem_entry_decode(PemEntry, Password);
-pem_entry_decode({Asn1Type, CryptDer, {"AES-128-CBC"=Cipher, IV}} = PemEntry,
- Password) when is_atom(Asn1Type) andalso
- is_binary(CryptDer) andalso
- is_list(Cipher) andalso
- is_binary(IV) andalso
- erlang:byte_size(IV) == 16 ->
- do_pem_entry_decode(PemEntry, Password).
+ ((erlang:byte_size(Salt) == 8) or (erlang:byte_size(Salt) == 16)) andalso
+ is_list(Password) ->
+ do_pem_entry_decode(PemEntry, Password).
+
%%--------------------------------------------------------------------
-spec pem_entry_encode(pki_asn1_type(), term()) -> pem_entry().
@@ -153,13 +185,19 @@ pem_entry_encode(Asn1Type, Entity, {{Cipher, #'PBES2-params'{}} = CipherInfo,
is_list(Password) andalso
is_list(Cipher) ->
do_pem_entry_encode(Asn1Type, Entity, CipherInfo, Password);
-
+pem_entry_encode(Asn1Type, Entity, {{Cipher,
+ {#'PBEParameter'{}, _}} = CipherInfo,
+ Password}) when is_atom(Asn1Type) andalso
+ is_list(Password) andalso
+ is_list(Cipher) ->
+ do_pem_entry_encode(Asn1Type, Entity, CipherInfo, Password);
pem_entry_encode(Asn1Type, Entity, {{Cipher, Salt} = CipherInfo,
Password}) when is_atom(Asn1Type) andalso
is_list(Password) andalso
is_list(Cipher) andalso
is_binary(Salt) andalso
- erlang:byte_size(Salt) == 8 ->
+ ((erlang:byte_size(Salt) == 8) or
+ (erlang:byte_size(Salt) == 16)) ->
do_pem_entry_encode(Asn1Type, Entity, CipherInfo, Password).
%%--------------------------------------------------------------------
@@ -438,6 +476,45 @@ verify(DigestOrPlainText, sha = DigestType, Signature, {Key, #'Dss-Parms'{p = P
crypto:verify(dss, DigestType, DigestOrPlainText, Signature, [P, Q, G, Key]).
%%--------------------------------------------------------------------
+-spec pkix_dist_point(der_encoded() | #'OTPCertificate'{}) ->
+ #'DistributionPoint'{}.
+%% Description: Creates a distribution point for CRLs issued by the same issuer as <c>Cert</c>.
+%%--------------------------------------------------------------------
+pkix_dist_point(OtpCert) when is_binary(OtpCert) ->
+ pkix_dist_point(pkix_decode_cert(OtpCert, otp));
+pkix_dist_point(OtpCert) ->
+ Issuer = public_key:pkix_normalize_name(
+ pubkey_cert_records:transform(
+ OtpCert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.issuer, encode)),
+
+ TBSCert = OtpCert#'OTPCertificate'.tbsCertificate,
+ Extensions = pubkey_cert:extensions_list(TBSCert#'OTPTBSCertificate'.extensions),
+ AltNames = case pubkey_cert:select_extension(?'id-ce-issuerAltName', Extensions) of
+ undefined ->
+ [];
+ #'Extension'{extnValue = Value} ->
+ Value
+ end,
+ Point = {fullName, [{directoryName, Issuer} | AltNames]},
+ #'DistributionPoint'{cRLIssuer = asn1_NOVALUE,
+ reasons = asn1_NOVALUE,
+ distributionPoint = Point}.
+%%--------------------------------------------------------------------
+-spec pkix_dist_points(der_encoded() | #'OTPCertificate'{}) ->
+ [#'DistributionPoint'{}].
+%% Description: Extracts distributionpoints specified in the certificates extensions.
+%%--------------------------------------------------------------------
+pkix_dist_points(OtpCert) when is_binary(OtpCert) ->
+ pkix_dist_points(pkix_decode_cert(OtpCert, otp));
+pkix_dist_points(OtpCert) ->
+ Value = pubkey_cert:distribution_points(OtpCert),
+ lists:foldl(fun(Point, Acc0) ->
+ DistPoint = pubkey_cert_records:transform(Point, decode),
+ [DistPoint | Acc0]
+ end,
+ [], Value).
+
+%%--------------------------------------------------------------------
-spec pkix_sign(#'OTPTBSCertificate'{},
rsa_private_key() | dsa_private_key()) -> Der::binary().
%%
@@ -479,6 +556,25 @@ pkix_verify(DerCert, Key = {#'ECPoint'{}, _})
verify(PlainText, DigestType, Signature, Key).
%%--------------------------------------------------------------------
+-spec pkix_crl_verify(CRL::binary() | #'CertificateList'{}, Cert::binary() | #'OTPCertificate'{}) -> boolean().
+%%
+%% Description: Verify that Cert is the CRL signer.
+%%--------------------------------------------------------------------
+pkix_crl_verify(CRL, Cert) when is_binary(CRL) ->
+ pkix_crl_verify(der_decode('CertificateList', CRL), Cert);
+pkix_crl_verify(CRL, Cert) when is_binary(Cert) ->
+ pkix_crl_verify(CRL, pkix_decode_cert(Cert, otp));
+pkix_crl_verify(#'CertificateList'{} = CRL, #'OTPCertificate'{} = Cert) ->
+ TBSCert = Cert#'OTPCertificate'.tbsCertificate,
+ PublicKeyInfo = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
+ PublicKey = PublicKeyInfo#'OTPSubjectPublicKeyInfo'.subjectPublicKey,
+ AlgInfo = PublicKeyInfo#'OTPSubjectPublicKeyInfo'.algorithm,
+ PublicKeyParams = AlgInfo#'PublicKeyAlgorithm'.parameters,
+ pubkey_crl:verify_crl_signature(CRL,
+ der_encode('CertificateList', CRL),
+ PublicKey, PublicKeyParams).
+
+%%--------------------------------------------------------------------
-spec pkix_is_issuer(Cert :: der_encoded()| #'OTPCertificate'{} | #'CertificateList'{},
IssuerCert :: der_encoded()|
#'OTPCertificate'{}) -> boolean().
@@ -532,17 +628,27 @@ pkix_is_fixed_dh_cert(Cert) when is_binary(Cert) ->
%
%% Description: Returns the issuer id.
%%--------------------------------------------------------------------
-pkix_issuer_id(#'OTPCertificate'{} = OtpCert, self) ->
- pubkey_cert:issuer_id(OtpCert, self);
-
-pkix_issuer_id(#'OTPCertificate'{} = OtpCert, other) ->
- pubkey_cert:issuer_id(OtpCert, other);
-
-pkix_issuer_id(Cert, Signed) when is_binary(Cert) ->
+pkix_issuer_id(#'OTPCertificate'{} = OtpCert, Signed) when (Signed == self) or
+ (Signed == other) ->
+ pubkey_cert:issuer_id(OtpCert, Signed);
+pkix_issuer_id(Cert, Signed) when is_binary(Cert) ->
OtpCert = pkix_decode_cert(Cert, otp),
pkix_issuer_id(OtpCert, Signed).
%%--------------------------------------------------------------------
+-spec pkix_crl_issuer(CRL::binary()| #'CertificateList'{}) ->
+ {rdnSequence,
+ [#'AttributeTypeAndValue'{}]}.
+%
+%% Description: Returns the issuer.
+%%--------------------------------------------------------------------
+pkix_crl_issuer(CRL) when is_binary(CRL) ->
+ pkix_crl_issuer(der_decode('CertificateList', CRL));
+pkix_crl_issuer(#'CertificateList'{} = CRL) ->
+ pubkey_cert_records:transform(
+ CRL#'CertificateList'.tbsCertList#'TBSCertList'.issuer, decode).
+
+%%--------------------------------------------------------------------
-spec pkix_normalize_name({rdnSequence,
[#'AttributeTypeAndValue'{}]}) ->
{rdnSequence,
@@ -594,11 +700,11 @@ pkix_path_validation(#'OTPCertificate'{} = TrustedCert, CertChain, Options)
%--------------------------------------------------------------------
-spec pkix_crls_validate(#'OTPCertificate'{},
- [{DP::#'DistributionPoint'{} ,CRL::#'CertificateList'{}}],
+ [{DP::#'DistributionPoint'{}, {DerCRL::binary(), CRL::#'CertificateList'{}}}],
Options :: proplists:proplist()) -> valid | {bad_cert, revocation_status_undetermined}
| {bad_cert, {revoked, crl_reason()}}.
-%% Description: Performs a basic path validation according to RFC 5280.
+%% Description: Performs a CRL validation according to RFC 5280.
%%--------------------------------------------------------------------
pkix_crls_validate(OtpCert, [{_,_,_} |_] = DPAndCRLs, Options) ->
pkix_crls_validate(OtpCert, DPAndCRLs, DPAndCRLs,
@@ -889,3 +995,4 @@ ec_key({PubKey, PrivateKey}, Params) ->
privateKey = binary_to_list(PrivateKey),
parameters = Params,
publicKey = {0, PubKey}}.
+
diff --git a/lib/public_key/test/pbe_SUITE.erl b/lib/public_key/test/pbe_SUITE.erl
index b68ffbd5fd..aa2bbdd24b 100644
--- a/lib/public_key/test/pbe_SUITE.erl
+++ b/lib/public_key/test/pbe_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,9 @@ all() ->
[
pbdkdf1,
pbdkdf2,
- encrypted_private_key_info].
+ old_enc,
+ pbes1,
+ pbes2].
groups() ->
[].
@@ -192,44 +194,48 @@ pbdkdf2(Config) when is_list(Config) ->
16#cc, 16#37, 16#d7, 16#f0, 16#34, 16#25, 16#e0, 16#c3>>
= pubkey_pbe:pbdkdf2("pass\0word",
"sa\0lt", 4096, 16, fun crypto:hmac/4, sha, 20).
-
-encrypted_private_key_info() ->
- [{doc,"Tests reading a EncryptedPrivateKeyInfo file encrypted with different ciphers"}].
-encrypted_private_key_info(Config) when is_list(Config) ->
+
+old_enc() ->
+ [{doc,"Tests encode/decode RSA key encrypted with different ciphers using old PEM encryption scheme"}].
+old_enc(Config) when is_list(Config) ->
Datadir = ?config(data_dir, Config),
- {ok, PemDes} = file:read_file(filename:join(Datadir, "des_cbc_enc_key.pem")),
+ %% key generated with ssh-keygen -N hello_aes -f old_aes_128_cbc_enc_key.pem
+ {ok, PemAesCbc} = file:read_file(filename:join(Datadir, "old_aes_128_cbc_enc_key.pem")),
- PemDesEntry = public_key:pem_decode(PemDes),
- ct:print("Pem entry: ~p" , [PemDesEntry]),
- [{'PrivateKeyInfo', _, {"DES-CBC",_}} = PubEntry0] = PemDesEntry,
- KeyInfo = public_key:pem_entry_decode(PubEntry0, "password"),
-
- {ok, Pem3Des} = file:read_file(filename:join(Datadir, "des_ede3_cbc_enc_key.pem")),
-
- Pem3DesEntry = public_key:pem_decode(Pem3Des),
- ct:print("Pem entry: ~p" , [Pem3DesEntry]),
- [{'PrivateKeyInfo', _, {"DES-EDE3-CBC",_}} = PubEntry1] = Pem3DesEntry,
- KeyInfo = public_key:pem_entry_decode(PubEntry1, "password"),
-
- {ok, PemRc2} = file:read_file(filename:join(Datadir, "rc2_cbc_enc_key.pem")),
-
- PemRc2Entry = public_key:pem_decode(PemRc2),
- ct:print("Pem entry: ~p" , [PemRc2Entry]),
- [{'PrivateKeyInfo', _, {"RC2-CBC",_}} = PubEntry2] = PemRc2Entry,
- KeyInfo = public_key:pem_entry_decode(PubEntry2, "password"),
-
- %% key generated with ssh-keygen -N hello_aes -f aes_128_cbc_enc_key
- {ok, PemAesCbc} = file:read_file(filename:join(Datadir, "aes_128_cbc_enc_key")),
-
PemAesCbcEntry = public_key:pem_decode(PemAesCbc),
ct:print("Pem entry: ~p" , [PemAesCbcEntry]),
[{'RSAPrivateKey', _, {"AES-128-CBC",_}} = PubAesCbcEntry] = PemAesCbcEntry,
- #'RSAPrivateKey'{} = public_key:pem_entry_decode(PubAesCbcEntry, "hello_aes"),
-
- check_key_info(KeyInfo).
+ #'RSAPrivateKey'{} = public_key:pem_entry_decode(PubAesCbcEntry, "hello_aes").
+pbes1() ->
+ [{doc,"Tests encode/decode EncryptedPrivateKeyInfo encrypted with different ciphers using PBES1"}].
+pbes1(Config) when is_list(Config) ->
+ decode_encode_key_file("pbes1_des_cbc_md5_enc_key.pem", "password", "DES-CBC", Config).
+
+pbes2() ->
+ [{doc,"Tests encode/decode EncryptedPrivateKeyInfo encrypted with different ciphers using PBES2"}].
+pbes2(Config) when is_list(Config) ->
+ decode_encode_key_file("pbes2_des_cbc_enc_key.pem", "password", "DES-CBC", Config),
+ decode_encode_key_file("pbes2_des_ede3_cbc_enc_key.pem", "password", "DES-EDE3-CBC", Config),
+ decode_encode_key_file("pbes2_rc2_cbc_enc_key.pem", "password", "RC2-CBC", Config).
check_key_info(#'PrivateKeyInfo'{privateKeyAlgorithm =
#'PrivateKeyInfo_privateKeyAlgorithm'{algorithm = ?rsaEncryption},
privateKey = Key}) ->
#'RSAPrivateKey'{} = public_key:der_decode('RSAPrivateKey', iolist_to_binary(Key)).
+
+decode_encode_key_file(File, Password, Cipher, Config) ->
+ Datadir = ?config(data_dir, Config),
+ {ok, PemKey} = file:read_file(filename:join(Datadir, File)),
+
+ PemEntry = public_key:pem_decode(PemKey),
+ ct:print("Pem entry: ~p" , [PemEntry]),
+ [{Asn1Type, _, {Cipher,_} = CipherInfo} = PubEntry] = PemEntry,
+ KeyInfo = public_key:pem_entry_decode(PubEntry, Password),
+ PemKey1 = public_key:pem_encode([public_key:pem_entry_encode(Asn1Type, KeyInfo, {CipherInfo, Password})]),
+ Pem = strip_ending_newlines(PemKey),
+ Pem = strip_ending_newlines(PemKey1),
+ check_key_info(KeyInfo).
+
+strip_ending_newlines(Bin) ->
+ string:strip(binary_to_list(Bin), right, 10).
diff --git a/lib/public_key/test/pbe_SUITE_data/aes_128_cbc_enc_key b/lib/public_key/test/pbe_SUITE_data/old_aes_128_cbc_enc_key.pem
index 34c7543f30..34c7543f30 100644
--- a/lib/public_key/test/pbe_SUITE_data/aes_128_cbc_enc_key
+++ b/lib/public_key/test/pbe_SUITE_data/old_aes_128_cbc_enc_key.pem
diff --git a/lib/public_key/test/pbe_SUITE_data/pbes1_des_cbc_md5_enc_key.pem b/lib/public_key/test/pbe_SUITE_data/pbes1_des_cbc_md5_enc_key.pem
new file mode 100644
index 0000000000..12e860c7a7
--- /dev/null
+++ b/lib/public_key/test/pbe_SUITE_data/pbes1_des_cbc_md5_enc_key.pem
@@ -0,0 +1,17 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIICoTAbBgkqhkiG9w0BBQMwDgQIZmB6EGEnIOcCAggABIICgDaaKoCEUowjKt5M
+uwMAIf7uugy09OcqR8PcB9ioiuk5NQGXkIBxOOlOuFb6xrP+O2dSppr5k/ZU+NEX
+Lf18AdMld1nlE6lwjPytOIqt6Q3YMeny8un1/jopnkQZKthJ5moER5ohp/2osTDV
+4Ih8MtHTwE879SHAmj7Y3G7itKHQi17212DVmL+D+P7iRzTCKIyPj5KMXvXN+eor
+j0urZXVOeyRTABHQnf6xJn8K+dGowC/AJTQWOgFunlBKzecepqF22OQzIW2R60aM
+VgykSd8A5G8o1F+tO2Qrp6KM9Ak709dUX8qRb/C02w5rjg2g0frgFyEGX0pUJbno
+dJLKMOT1WvDnsXaS720beyzrOynWiAuaFZwb1/nPSQnzJ4t0mUvQQis5ph3eHSR/
+a9/PER81IDjPtjlTJjaOGuwhIRmGFsLUrQhOnVcI7Z5TCSj7EHdqK3xzjSVzu5DY
+BqE2rsigiIOszPdbK4tKCDheIwBhYdptDvG9c+j3Mj0YNOXJxsX0gVoMqtpwryNG
+OZy5fLujS4l+cPq64dOh/LE87mrM9St6M6gw2VRW7d0U18Muubp/MK8q9O2i80Nw
+ZFrHHE1N09x3aTnty4mwdCHl6w5aJMZg6WbUXJnf0zKa8ADv5wZmAvW3fO4G8434
+3FHj1hdyKPcoVjoFVawyRUflF/jYd1pLpV+iZwDDR4lacb4ay1Lut452ifZ8DqOq
+lWYL0uskCn1WI856vtlLV3gnV02xDjAilSY2hASOyoD1wypZefPn5S+U3vkLuzFZ
+ycbyIwGYTLWj71u8Vu3JceRI3OIPDuM7zcNHr71eQyiwLEA0iszQQA9xgqmeFtJO
+IkpUTAY=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/lib/public_key/test/pbe_SUITE_data/des_cbc_enc_key.pem b/lib/public_key/test/pbe_SUITE_data/pbes2_des_cbc_enc_key.pem
index eaa06145aa..eaa06145aa 100644
--- a/lib/public_key/test/pbe_SUITE_data/des_cbc_enc_key.pem
+++ b/lib/public_key/test/pbe_SUITE_data/pbes2_des_cbc_enc_key.pem
diff --git a/lib/public_key/test/pbe_SUITE_data/des_ede3_cbc_enc_key.pem b/lib/public_key/test/pbe_SUITE_data/pbes2_des_ede3_cbc_enc_key.pem
index 22ea46d56f..22ea46d56f 100644
--- a/lib/public_key/test/pbe_SUITE_data/des_ede3_cbc_enc_key.pem
+++ b/lib/public_key/test/pbe_SUITE_data/pbes2_des_ede3_cbc_enc_key.pem
diff --git a/lib/public_key/test/pbe_SUITE_data/rc2_cbc_enc_key.pem b/lib/public_key/test/pbe_SUITE_data/pbes2_rc2_cbc_enc_key.pem
index 618cddcfd7..618cddcfd7 100644
--- a/lib/public_key/test/pbe_SUITE_data/rc2_cbc_enc_key.pem
+++ b/lib/public_key/test/pbe_SUITE_data/pbes2_rc2_cbc_enc_key.pem
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index d3e9bf7cf6..40c28e86b3 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,13 +36,13 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app,
+ [app, appup,
{group, pem_decode_encode},
{group, ssh_public_key_decode_encode},
encrypt_decrypt,
{group, sign_verify},
pkix, pkix_countryname, pkix_emailaddress, pkix_path_validation,
- pkix_iso_rsa_oid, pkix_iso_dsa_oid].
+ pkix_iso_rsa_oid, pkix_iso_dsa_oid, pkix_crl].
groups() ->
[{pem_decode_encode, [], [dsa_pem, rsa_pem, encrypted_pem,
@@ -95,6 +95,13 @@ app(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the public_key appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(public_key).
+
+%%--------------------------------------------------------------------
+
dsa_pem() ->
[{doc, "DSA PEM-file decode/encode"}].
dsa_pem(Config) when is_list(Config) ->
@@ -705,6 +712,42 @@ pkix_iso_dsa_oid(Config) when is_list(Config) ->
{_, dsa} = public_key:pkix_sign_types(SigAlg#'SignatureAlgorithm'.algorithm).
%%--------------------------------------------------------------------
+
+pkix_crl() ->
+ [{doc, "test pkix_crl_* functions"}].
+
+pkix_crl(Config) when is_list(Config) ->
+ Datadir = ?config(data_dir, Config),
+ {ok, PemCRL} = file:read_file(filename:join(Datadir, "idp_crl.pem")),
+ [{_, CRL, _}] = public_key:pem_decode(PemCRL),
+
+ {ok, IDPPemCert} = file:read_file(filename:join(Datadir, "idp_cert.pem")),
+ [{_, IDPCert, _}] = public_key:pem_decode(IDPPemCert),
+
+ {ok, SignPemCert} = file:read_file(filename:join(Datadir, "crl_signer.pem")),
+ [{_, SignCert, _}] = public_key:pem_decode(SignPemCert),
+
+ OTPIDPCert = public_key:pkix_decode_cert(IDPCert, otp),
+ OTPSignCert = public_key:pkix_decode_cert(SignCert, otp),
+ ERLCRL = public_key:der_decode('CertificateList',CRL),
+
+ {rdnSequence,_} = public_key:pkix_crl_issuer(CRL),
+ {rdnSequence,_} = public_key:pkix_crl_issuer(ERLCRL),
+
+ true = public_key:pkix_crl_verify(CRL, SignCert),
+ true = public_key:pkix_crl_verify(ERLCRL, OTPSignCert),
+
+ [#'DistributionPoint'{}|_] = public_key:pkix_dist_points(IDPCert),
+ [#'DistributionPoint'{}|_] = public_key:pkix_dist_points(OTPIDPCert),
+
+ #'DistributionPoint'{cRLIssuer = asn1_NOVALUE,
+ reasons = asn1_NOVALUE,
+ distributionPoint = Point} = public_key:pkix_dist_point(IDPCert),
+ #'DistributionPoint'{cRLIssuer = asn1_NOVALUE,
+ reasons = asn1_NOVALUE,
+ distributionPoint = Point} = public_key:pkix_dist_point(OTPIDPCert).
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
asn1_encode_decode({Asn1Type, Der, not_encrypted} = Entry) ->
diff --git a/lib/public_key/test/public_key_SUITE_data/crl_signer.pem b/lib/public_key/test/public_key_SUITE_data/crl_signer.pem
new file mode 100644
index 0000000000..d77f86b45d
--- /dev/null
+++ b/lib/public_key/test/public_key_SUITE_data/crl_signer.pem
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIID8zCCAtugAwIBAgIJAKU8w89SmyPyMA0GCSqGSIb3DQEBBAUAMIGGMREwDwYD
+VQQDEwhlcmxhbmdDQTETMBEGA1UECxMKRXJsYW5nIE9UUDEUMBIGA1UEChMLRXJp
+Y3Nzb24gQUIxEjAQBgNVBAcTCVN0b2NraG9sbTELMAkGA1UEBhMCU0UxJTAjBgkq
+hkiG9w0BCQEWFnBldGVyQGVyaXguZXJpY3Nzb24uc2UwHhcNMTUwMjIzMTMyNTMx
+WhcNMTUwMzI1MTMyNTMxWjCBhjERMA8GA1UEAxMIZXJsYW5nQ0ExEzARBgNVBAsT
+CkVybGFuZyBPVFAxFDASBgNVBAoTC0VyaWNzc29uIEFCMRIwEAYDVQQHEwlTdG9j
+a2hvbG0xCzAJBgNVBAYTAlNFMSUwIwYJKoZIhvcNAQkBFhZwZXRlckBlcml4LmVy
+aWNzc29uLnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyzwkmKzy
+WTLOafHmgqZVENdt3OYECPA4BamVKyEdi8zgXI0S71wzPZ+XvuGbHDTBzsTHf71L
+xRQgoG30tv5jqWSlfh8iyS6fO+FHxBKd+xg6hLJXk5PCUa5X1D4BO8B4aapEzev+
+T8+pTaOLeVPdfGfKp0yWF50eCpdSF/kMCCIIA8QNSahfcwuLbEEzUNZof6YPZBNm
+e+XUMXCjpb/mU7krfu8nLaspG1HgxQqErEEBzGJE7mguqSVETK/xpGXEMTNIuj8N
+ziFrfqAezDob3z48xHUaHKZRBb9NIxWIjVxkTYaqOtf9UNCT96CHeZ7rk9iNscQu
+USabMIamFY8cNQIDAQABo2IwYDAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB
+BjAdBgNVHQ4EFgQUm2M3f6UBEIsHI1HIvphbBz60RsAwIQYDVR0RBBowGIEWcGV0
+ZXJAZXJpeC5lcmljc3Nvbi5zZTANBgkqhkiG9w0BAQQFAAOCAQEAPmm0V36HZySF
+BoV03DGyeFUSeMtO0DO058NaXXv2VNPpUXT72Mt1ovXNvVFcReggb01polF7TFFI
+4NRb6qbsLPxny29Clf/9WKY4zDhbb2MIy8yueoOyyeNQtrzY+iQjo4q9U+Aa6xj1
+pxmG1URDfOmCgX33ItCrZXFGa4ic0HrbWgJMDNo4lSOiio8bl3IYN4vBcobRfhDs
+pw5jochE5ZpPh4i76Pg6D99EFkNaLyQioWEu4n2OxR0EBSFLJkVJQ0alUx18AKio
+bje+h5nzRgTm5HApYzcorF57KfUKPDaW1Q6tRckRyHApueDuK8p49ITQE71lmkLc
+ywxoJMrNnA==
+-----END CERTIFICATE-----
+
diff --git a/lib/public_key/test/public_key_SUITE_data/idp_cert.pem b/lib/public_key/test/public_key_SUITE_data/idp_cert.pem
new file mode 100644
index 0000000000..c2afc56a3a
--- /dev/null
+++ b/lib/public_key/test/public_key_SUITE_data/idp_cert.pem
@@ -0,0 +1,30 @@
+-----BEGIN CERTIFICATE-----
+MIIFGjCCBAKgAwIBAgIBAzANBgkqhkiG9w0BAQQFADCBgzEOMAwGA1UEAxMFb3Rw
+Q0ExEzARBgNVBAsTCkVybGFuZyBPVFAxFDASBgNVBAoTC0VyaWNzc29uIEFCMQsw
+CQYDVQQGEwJTRTESMBAGA1UEBxMJU3RvY2tob2xtMSUwIwYJKoZIhvcNAQkBFhZw
+ZXRlckBlcml4LmVyaWNzc29uLnNlMB4XDTE1MDIyMzEzMjUzMVoXDTI1MDEwMTEz
+MjUzMVowgYQxDzANBgNVBAMTBnNlcnZlcjETMBEGA1UECxMKRXJsYW5nIE9UUDEU
+MBIGA1UEChMLRXJpY3Nzb24gQUIxCzAJBgNVBAYTAlNFMRIwEAYDVQQHEwlTdG9j
+a2hvbG0xJTAjBgkqhkiG9w0BCQEWFnBldGVyQGVyaXguZXJpY3Nzb24uc2UwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK8EDdNZEebdfxb57e3UA8uTCq
+TsFtJv5tyjnZtSFsGDrwrZYjRMOCJFh8Yv6Ddq4mZiAvUCJxMzW4zVzraMmmQC8z
+Hi3xQyuIq2UCW3ESxLvchCcuSjNOWke0z+rXHzA8Yz9y1fqhhO6AF8q5lLwGo+VQ
+sJkVV8QwB9UXZN4pAc3zTeqZkGCrNY/ZIgtCrk4jw7sY/gumS8BjhXCYGyFZRDvX
+jzIXQx6jn7/2huNbEAiBXbYYAMd7OEwhpHHAWOVA6g+/TNydgRO3W4xVmlEhDpYs
+bnMV/Tq570E1bhz1XWb642K2MnxI74g8FXmhN6x6P8d4zU/eFcs+gxO0X6KzAgMB
+AAGjggGUMIIBkDAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DAdBgNVHQ4EFgQUo8dr
+DDQXK25dB6qMY8dNIjAKIPEwgbMGA1UdIwSBqzCBqIAU5YMIq7A5eYQhQsHsc/XC
+7GeZ+kuhgYykgYkwgYYxETAPBgNVBAMTCGVybGFuZ0NBMRMwEQYDVQQLEwpFcmxh
+bmcgT1RQMRQwEgYDVQQKEwtFcmljc3NvbiBBQjESMBAGA1UEBxMJU3RvY2tob2xt
+MQswCQYDVQQGEwJTRTElMCMGCSqGSIb3DQEJARYWcGV0ZXJAZXJpeC5lcmljc3Nv
+bi5zZYIBATAhBgNVHREEGjAYgRZwZXRlckBlcml4LmVyaWNzc29uLnNlMCEGA1Ud
+EgQaMBiBFnBldGVyQGVyaXguZXJpY3Nzb24uc2UwWwYDVR0fBFQwUjAkoCKgIIYe
+aHR0cDovL2xvY2FsaG9zdC9vdHBDQS9jcmwucGVtMCqgKKAmhiRodHRwOi8vbG9j
+YWxob3N0OjM3ODEzL290cENBL2NybC5wZW0wDQYJKoZIhvcNAQEEBQADggEBACwq
+o4nQTTereSIL8ZLQHweJKXYstTaZrRrAaoRUe9oClY7H++zXmMa8iZvUqqdT3fXW
+4KMXXyoB1o+cLxLnAPKOiFFL9rcbaeAMxZMIrTaFDQsOXAPVqJLSWWS5I5LsNvS6
+MlB6O6+0binTyilDKg683VV9nKNiNdL8WzGa5ig+HvK6xUpJwpOTmDmfdg09zQ+8
+aCbJrthXg0tNnGIorttAd2wFvmLUezoJrlfwLChB0M/qa+RVRCFMiPvkWupo5eVK
+Malwpz2xp2rAUlb6qQY7eI6lV8JsVK06QxBmUHP68Y9kYT5/gy5ketjOB0Ypin05
+6+3VrZKFxrkqKaEoL50=
+-----END CERTIFICATE-----
diff --git a/lib/public_key/test/public_key_SUITE_data/idp_crl.pem b/lib/public_key/test/public_key_SUITE_data/idp_crl.pem
new file mode 100644
index 0000000000..0872279501
--- /dev/null
+++ b/lib/public_key/test/public_key_SUITE_data/idp_crl.pem
@@ -0,0 +1,18 @@
+-----BEGIN X509 CRL-----
+MIIC3TCCAcUCAQEwDQYJKoZIhvcNAQEEBQAwgYYxETAPBgNVBAMTCGVybGFuZ0NB
+MRMwEQYDVQQLEwpFcmxhbmcgT1RQMRQwEgYDVQQKEwtFcmljc3NvbiBBQjESMBAG
+A1UEBxMJU3RvY2tob2xtMQswCQYDVQQGEwJTRTElMCMGCSqGSIb3DQEJARYWcGV0
+ZXJAZXJpeC5lcmljc3Nvbi5zZRcNMTUwMjIzMTMyNTMxWhcNMTUwMjI0MTMyNTMx
+WqCCAQgwggEEMIG7BgNVHSMEgbMwgbCAFJtjN3+lARCLByNRyL6YWwc+tEbAoYGM
+pIGJMIGGMREwDwYDVQQDEwhlcmxhbmdDQTETMBEGA1UECxMKRXJsYW5nIE9UUDEU
+MBIGA1UEChMLRXJpY3Nzb24gQUIxEjAQBgNVBAcTCVN0b2NraG9sbTELMAkGA1UE
+BhMCU0UxJTAjBgkqhkiG9w0BCQEWFnBldGVyQGVyaXguZXJpY3Nzb24uc2WCCQCl
+PMPPUpsj8jA4BgNVHRwBAf8ELjAsoCqgKIYmaHR0cDovL2xvY2FsaG9zdDo4MDAw
+L2VybGFuZ0NBL2NybC5wZW0wCgYDVR0UBAMCAQEwDQYJKoZIhvcNAQEEBQADggEB
+AE9WKJhW1oivBEE91akeDcYCtSVp98F7DxzQyJTBLQJGMEXSg8G/oAp64F4qs3oV
+LXS5YFYwxjD9tXByGVEJoIUUMtfMeCvZMgd2V8mBlAJiyHkTrFFA8PgBv+htrJji
+nrheAhrEedqZbqwmrcU34h9fWHp0Zl6UDYyF3I/S0/5ilIz3DvNZ9SBfKKt3DYeW
+hon7qpNo6YrtEzbXyOaa2mFX9c1w39LBZ1FdY0jEzUfh2eImBLxnBjZArNxzYuU8
+a+lNMjc6JUAJwITS6C1YfI4ECsqXe0K/n90pMcm/jgiGFCZhVbXq+Nrm/24qPKBA
+zqoNos7aV7LEYLYOjknaIhY=
+-----END X509 CRL-----
diff --git a/lib/public_key/vsn.mk b/lib/public_key/vsn.mk
index 3473757c5f..16794660a5 100644
--- a/lib/public_key/vsn.mk
+++ b/lib/public_key/vsn.mk
@@ -1 +1 @@
-PUBLIC_KEY_VSN = 0.21
+PUBLIC_KEY_VSN = 0.23
diff --git a/lib/reltool/doc/src/book.xml b/lib/reltool/doc/src/book.xml
index f50d314711..660c81ddb6 100644
--- a/lib/reltool/doc/src/book.xml
+++ b/lib/reltool/doc/src/book.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
<year>2009</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/reltool/doc/src/notes.xml b/lib/reltool/doc/src/notes.xml
index df81418677..18b36ff953 100644
--- a/lib/reltool/doc/src/notes.xml
+++ b/lib/reltool/doc/src/notes.xml
@@ -37,7 +37,69 @@
thus constitutes one section in this document. The title of each
section is the version number of Reltool.</p>
- <section><title>Reltool 0.6.4.1</title>
+ <section><title>Reltool 0.6.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a minor typo in an error message from
+ reltool_server.</p>
+ <p>
+ Own Id: OTP-11977</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Reltool 0.6.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When adding a regexp to a filter in reltool using
+ {add,Regexp}, and the existing regexp was undefined,
+ reltool would crash since it got an improper list. This
+ has been corrected. (Thanks to Håkan Mattsson)</p>
+ <p>
+ Own Id: OTP-11591</p>
+ </item>
+ <item>
+ <p>
+ Adapted reltool test server to common test usage of
+ tc_status. (Note that this code is not used by OTP daily
+ test runs.) (Thanks to Håkan Mattsson)</p>
+ <p>
+ Own Id: OTP-11592</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Reltool 0.6.4.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/reltool/doc/src/part.xml b/lib/reltool/doc/src/part.xml
index f78022a718..8f4f3731b8 100644
--- a/lib/reltool/doc/src/part.xml
+++ b/lib/reltool/doc/src/part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2009</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/reltool/doc/src/ref_man.xml b/lib/reltool/doc/src/ref_man.xml
index 52602bd069..28e4ccfb28 100644
--- a/lib/reltool/doc/src/ref_man.xml
+++ b/lib/reltool/doc/src/ref_man.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>2009</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/reltool/doc/src/reltool.xml b/lib/reltool/doc/src/reltool.xml
index 8437b7a623..c08d4228f0 100644
--- a/lib/reltool/doc/src/reltool.xml
+++ b/lib/reltool/doc/src/reltool.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/reltool/doc/src/reltool_examples.xml b/lib/reltool/doc/src/reltool_examples.xml
index 7dfe0cbff5..e56a59bfd5 100644
--- a/lib/reltool/doc/src/reltool_examples.xml
+++ b/lib/reltool/doc/src/reltool_examples.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/reltool/doc/src/reltool_intro.xml b/lib/reltool/doc/src/reltool_intro.xml
index 54bc991da8..ddba29e3f4 100644
--- a/lib/reltool/doc/src/reltool_intro.xml
+++ b/lib/reltool/doc/src/reltool_intro.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2009</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/reltool/doc/src/reltool_usage.xml b/lib/reltool/doc/src/reltool_usage.xml
index 0041e60d8f..fa82b8c7d9 100644
--- a/lib/reltool/doc/src/reltool_usage.xml
+++ b/lib/reltool/doc/src/reltool_usage.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2009</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/reltool/src/reltool.app.src b/lib/reltool/src/reltool.app.src
index 4188f341f1..65fcf4aae5 100644
--- a/lib/reltool/src/reltool.app.src
+++ b/lib/reltool/src/reltool.app.src
@@ -34,5 +34,7 @@
]},
{registered, []},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","tools-2.6.14","stdlib-2.0","sasl-2.4",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/reltool/src/reltool.appup.src b/lib/reltool/src/reltool.appup.src
index c02edd2afb..79ecdbd392 100644
--- a/lib/reltool/src/reltool.appup.src
+++ b/lib/reltool/src/reltool.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,7 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ]
+ [{<<".*">>,[{restart_application, reltool}]}],
+ [{<<".*">>,[{restart_application, reltool}]}]
}.
diff --git a/lib/reltool/src/reltool.hrl b/lib/reltool/src/reltool.hrl
index f0d8b38519..56161a152a 100644
--- a/lib/reltool/src/reltool.hrl
+++ b/lib/reltool/src/reltool.hrl
@@ -164,7 +164,8 @@
applications = [] :: [app_name()],
env = [] :: [{atom(), term()}],
mod = undefined :: {mod_name(), [term()]} | undefined,
- start_phases = undefined :: [{atom(), term()}] | undefined
+ start_phases = undefined :: [{atom(), term()}] | undefined,
+ runtime_dependencies = [] :: [string()]
}).
-record(regexp, {source, compiled}).
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 97785ca7f8..e7af4bd3f7 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1125,6 +1125,9 @@ parse_app_info(File, [{Key, Val} | KeyVals], AI, Status) ->
start_phases ->
parse_app_info(File, KeyVals, AI#app_info{start_phases = Val},
Status);
+ runtime_dependencies ->
+ parse_app_info(File, KeyVals, AI#app_info{runtime_dependencies = Val},
+ Status);
_ ->
Status2 =
reltool_utils:add_warning("Unexpected item ~p in app file ~tp.",
@@ -2027,7 +2030,7 @@ ensure_app_info(#app{name = Name,
[BadVsn | _] ->
reltool_utils:throw_error(
"~w: Application version clash. "
- "Multiple directories contains version ~tp.",
+ "Multiple directories contain version ~tp.",
[Name,BadVsn])
end,
FirstInfo = hd(AllInfo),
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl
index 9cda5dabd3..b59108d8dd 100644
--- a/lib/reltool/src/reltool_target.erl
+++ b/lib/reltool/src/reltool_target.erl
@@ -1455,10 +1455,11 @@ do_install(RelName, TargetDir) ->
{win32, _} ->
NativeRootDir = nativename(TargetDir2),
NativeErtsBinDir = nativename(ErtsBinDir),
- IniData = ["[erlang]\r\n",
- "Bindir=", NativeErtsBinDir, "\r\n",
- "Progname=erl\r\n",
- "Rootdir=", NativeRootDir, "\r\n"],
+ IniData0 = ["[erlang]\r\n",
+ "Bindir=", NativeErtsBinDir, "\r\n",
+ "Progname=erl\r\n",
+ "Rootdir=", NativeRootDir, "\r\n"],
+ IniData = unicode:characters_to_binary(IniData0),
IniFile = filename:join([BinDir, "erl.ini"]),
ok = file:write_file(IniFile, IniData);
_ ->
diff --git a/lib/reltool/src/reltool_utils.erl b/lib/reltool/src/reltool_utils.erl
index 9af8f6bae8..5a3f34506d 100644
--- a/lib/reltool/src/reltool_utils.erl
+++ b/lib/reltool/src/reltool_utils.erl
@@ -589,6 +589,8 @@ throw_error(Format, Args) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+decode_regexps(Key, Regexps, undefined) ->
+ decode_regexps(Key, Regexps, []);
decode_regexps(Key, {add, Regexps}, Old) when is_list(Regexps) ->
do_decode_regexps(Key, Regexps, Old);
decode_regexps(_Key, {del, Regexps}, Old) when is_list(Regexps) ->
diff --git a/lib/reltool/test/reltool_app_SUITE.erl b/lib/reltool/test/reltool_app_SUITE.erl
index a6e00cde08..9abc7fea41 100644
--- a/lib/reltool/test/reltool_app_SUITE.erl
+++ b/lib/reltool/test/reltool_app_SUITE.erl
@@ -26,6 +26,7 @@
-compile(export_all).
-include("reltool_test_lib.hrl").
+-include_lib("common_test/include/ct.hrl").
t() -> reltool_test_lib:t(?MODULE).
@@ -64,7 +65,7 @@ end_per_testcase(Func,Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [fields, modules, export_all, app_depend, undef_funcs].
+ [fields, modules, export_all, app_depend, undef_funcs, appup].
groups() ->
[].
@@ -290,3 +291,9 @@ key1search(Key, L) ->
{value, {Key, Value}} ->
Value
end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that the reltool appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(reltool).
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index 752037042d..347e80ed7c 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -144,7 +143,8 @@ all() ->
mod_incl_cond_derived,
use_selected_vsn,
use_selected_vsn_relative_path,
- non_standard_vsn_id].
+ non_standard_vsn_id,
+ undefined_regexp].
groups() ->
[].
@@ -808,13 +808,14 @@ create_target_unicode(Config) ->
%% If file name translation mode is unicode, then use unicode
%% characters release name (which will be used as file name for
- %% .rel, .script and .boot)
- RelNamePrefix =
+ %% .rel, .script and .boot), and install the release under a path
+ %% which icludes unicode characters.
+ {RelNamePrefix,TargetDirName} =
case file:native_name_encoding() of
utf8 ->
- "Unicode test αβ";
+ {"Unicode test αβ","target_unicode_αβ"} ;
latin1 ->
- "Unicode test"
+ {"Unicode test","target_unicode"}
end,
%% Configure the server
@@ -838,7 +839,7 @@ create_target_unicode(Config) ->
]},
%% Generate target file
- TargetDir = filename:join([?WORK_DIR, "target_unicode"]),
+ TargetDir = filename:join([?WORK_DIR, TargetDirName]),
?m(ok, reltool_utils:recursive_delete(TargetDir)),
?m(ok, file:make_dir(TargetDir)),
?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
@@ -2506,6 +2507,12 @@ non_standard_vsn_id(Config) ->
reltool_server:get_app(Pid2,b)),
ok.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+undefined_regexp(_Config) ->
+ ?msym({ok,_},
+ reltool:get_config([{sys,[{app,asn1,[{excl_app_filters,
+ {add, ["^priv"]}}]}]}])),
+ ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Library functions
diff --git a/lib/reltool/test/reltool_server_SUITE_data/unicode/ua-1.0/ebin/ua.app b/lib/reltool/test/reltool_server_SUITE_data/unicode/ua-1.0/ebin/ua.app
index 6f571b7179..dbce20232c 100644
--- a/lib/reltool/test/reltool_server_SUITE_data/unicode/ua-1.0/ebin/ua.app
+++ b/lib/reltool/test/reltool_server_SUITE_data/unicode/ua-1.0/ebin/ua.app
@@ -1,4 +1,3 @@
-% -*- coding: utf-8 -*-
{application, ua,
[{description, "Application for testing unicode in reltool - αβ"},
{vsn, "1.0"},
diff --git a/lib/reltool/test/reltool_test_lib.erl b/lib/reltool/test/reltool_test_lib.erl
index 3485365ed9..fa12f19aa7 100644
--- a/lib/reltool/test/reltool_test_lib.erl
+++ b/lib/reltool/test/reltool_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,12 +20,13 @@
-compile(export_all).
-include("reltool_test_lib.hrl").
+-define(timeout, 20). % minutes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init_per_suite(Config) when is_list(Config)->
global:register_name(reltool_global_logger, group_leader()),
- incr_timetrap(Config, 10).
+ incr_timetrap(Config, ?timeout).
end_per_suite(Config) when is_list(Config)->
global:unregister_name(reltool_global_logger),
@@ -51,7 +52,7 @@ set_kill_timer(Config) ->
Time =
case lookup_config(tc_timeout, Config) of
[] ->
- timer:minutes(10);
+ timer:minutes(?timeout);
ConfigTime when is_integer(ConfigTime) ->
ConfigTime
end,
@@ -258,8 +259,8 @@ run_test([{Module, TC} | Rest], Config) ->
true ->
[do_run_test(Module, TC, NewConfig)]
end,
- Module:end_per_suite(NewConfig),
- Res ++ run_test(Rest, NewConfig);
+ CommonTestRes = worst_res(Res),
+ Res ++ run_test(Rest, [{tc_status,CommonTestRes}|NewConfig]);
Error ->
?error("Test suite skipped: ~w~n", [Error]),
[{skipped, Error}]
@@ -267,6 +268,36 @@ run_test([{Module, TC} | Rest], Config) ->
run_test([], _Config) ->
[].
+worst_res(Res) ->
+ NewRes = [{dummy, {ok,dummy, dummy}} | Res],
+ [{_,WorstRes}|_] = lists:sort(fun compare_res/2, NewRes),
+ common_test_res(WorstRes).
+
+common_test_res(ok) ->
+ ok;
+common_test_res({Res,_,Reason}) ->
+ common_test_res({Res,Reason});
+common_test_res({Res,Reason}) ->
+ case Res of
+ ok -> ok;
+ skip -> {skipped, Reason};
+ skipped -> {skipped, Reason};
+ failed -> {failed, Reason};
+ crash -> {failed, Reason}
+ end.
+
+% crash < failed < skip < ok
+compare_res({_,{ResA,_,_}},{_,{ResB,_,_}}) ->
+ res_to_int(ResA) < res_to_int(ResB).
+
+res_to_int(Res) ->
+ case Res of
+ ok -> 4;
+ skip -> 3;
+ failed -> 2;
+ crash -> 1
+ end.
+
do_run_test(Module, all, Config) ->
All = [{Module, Test} || Test <- Module:all()],
run_test(All, Config);
@@ -290,9 +321,10 @@ eval_test_case(Mod, Fun, Config) ->
test_case_evaluator(Mod, Fun, [Config]) ->
NewConfig = Mod:init_per_testcase(Fun, Config),
- R = apply(Mod, Fun, [NewConfig]),
- Mod:end_per_testcase(Fun, NewConfig),
- exit({test_case_ok, R}).
+ Res = apply(Mod, Fun, [NewConfig]),
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|NewConfig]),
+ exit({test_case_ok, Res}).
wait_for_evaluator(Pid, Mod, Fun, Config) ->
receive
@@ -307,13 +339,17 @@ wait_for_evaluator(Pid, Mod, Fun, Config) ->
{'EXIT', Pid, {skipped, Reason}} ->
log("<WARNING> Test case ~w skipped, because ~p~n",
[{Mod, Fun}, Reason]),
- Mod:end_per_testcase(Fun, Config),
- {skip, {Mod, Fun}, Reason};
+ Res = {skipped, {Mod, Fun}, Reason},
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|Config]),
+ Res;
{'EXIT', Pid, Reason} ->
log("<ERROR> Eval process ~w exited, because\n\t~p~n",
[{Mod, Fun}, Reason]),
- Mod:end_per_testcase(Fun, Config),
- {crash, {Mod, Fun}, Reason}
+ Res = {crash, {Mod, Fun}, Reason},
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|Config]),
+ Res
end.
flush() ->
diff --git a/lib/reltool/vsn.mk b/lib/reltool/vsn.mk
index 16ec570d22..4fc1534250 100644
--- a/lib/reltool/vsn.mk
+++ b/lib/reltool/vsn.mk
@@ -1 +1 @@
-RELTOOL_VSN = 0.6.4.1
+RELTOOL_VSN = 0.6.6
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
index d315a90e18..d46b4997f7 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
@@ -21,11 +21,6 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
# ----------------------------------------------------
-# Items from top-level configure
-# ----------------------------------------------------
-DTRACE_ENABLED=@DTRACE_ENABLED@
-DTRACE_ENABLED_2STEP=@DTRACE_ENABLED_2STEP@
-# ----------------------------------------------------
# Application version
# ----------------------------------------------------
include ../vsn.mk
@@ -106,30 +101,14 @@ endif
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
debug opt valgrind: $(SOLIBS) $(OBJDIR) $(LIBDIR) $(NIF_LIB)
-
-ifdef DTRACE_ENABLED
-DTRACE_USER_HEADER=$(OBJDIR)/dtrace_user.h
-$(OBJDIR)/dtrace_user.h: ./dtrace_user.d
- $(dtrace_verbose)dtrace -h -C $(INCLUDES) \
- -s ./dtrace_user.d \
- -o ./dtrace_user.tmp
- $(V_at)sed -e '/^#define[ ]*ERLANG_[A-Z0-9_]*(.*)/y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' ./dtrace_user.tmp > $@
- $(V_at)rm ./dtrace_user.tmp
else
-DTRACE_USER_HEADER=
+# We do not build this on OSE
+debug opt valgrind:
endif
-DTRACE_OBJS =
-ifdef DTRACE_ENABLED_2STEP
-DTRACE_OBJS += $(OBJDIR)/dtrace_user.o
-$(OBJDIR)/dtrace_user.o: $(before_DTrace_OBJS) $(OBJDIR)/dtrace_user.h
- $(dtrace_verbose)dtrace -G -C \
- -s ./dtrace_user.d \
- -o $@ $(before_DTrace_OBJS)
-endif
-
-DYNTRACE_OBJS = $(before_DTrace_OBJS) $(DTRACE_OBJS)
+DYNTRACE_OBJS = $(before_DTrace_OBJS)
$(OBJDIR):
-@mkdir -p $(OBJDIR)
@@ -137,7 +116,7 @@ $(OBJDIR):
$(LIBDIR):
-@mkdir -p $(LIBDIR)
-$(OBJDIR)/dyntrace$(TYPEMARKER).o: dyntrace.c $(DTRACE_USER_HEADER)
+$(OBJDIR)/dyntrace$(TYPEMARKER).o: dyntrace.c
$(V_at)$(INSTALL_DIR) $(OBJDIR)
$(V_CC) -c -o $@ $(ALL_CFLAGS) $<
@@ -179,8 +158,10 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
+endif
release_docs_spec:
diff --git a/lib/runtime_tools/c_src/dyntrace.c b/lib/runtime_tools/c_src/dyntrace.c
index eef03afd1c..18f91cd7e7 100644
--- a/lib/runtime_tools/c_src/dyntrace.c
+++ b/lib/runtime_tools/c_src/dyntrace.c
@@ -30,9 +30,6 @@
#if defined(USE_DYNAMIC_TRACE) && (defined(USE_DTRACE) || defined(USE_SYSTEMTAP))
#define HAVE_USE_DTRACE 1
#endif
-#ifdef HAVE_USE_DTRACE
-#include "dtrace_user.h"
-#endif
void dtrace_nifenv_str(ErlNifEnv *env, char *process_buf);
void get_string_maybe(ErlNifEnv *env, const ERL_NIF_TERM term, char **ptr, char *buf, int bufsiz);
diff --git a/lib/runtime_tools/doc/specs/.gitignore b/lib/runtime_tools/doc/specs/.gitignore
new file mode 100644
index 0000000000..322eebcb06
--- /dev/null
+++ b/lib/runtime_tools/doc/specs/.gitignore
@@ -0,0 +1 @@
+specs_*.xml
diff --git a/lib/runtime_tools/doc/src/Makefile b/lib/runtime_tools/doc/src/Makefile
index 51d93df418..07c63197e9 100644
--- a/lib/runtime_tools/doc/src/Makefile
+++ b/lib/runtime_tools/doc/src/Makefile
@@ -40,7 +40,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = dbg.xml dyntrace.xml erts_alloc_config.xml
+XML_REF3_FILES = dbg.xml dyntrace.xml erts_alloc_config.xml system_information.xml
XML_REF6_FILES = runtime_tools_app.xml
XML_PART_FILES = part_notes.xml part_notes_history.xml part.xml
@@ -71,12 +71,20 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+
+TOP_SPECS_FILE = specs.xml
+
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
XML_FLAGS +=
DVIPS_FLAGS +=
+SPECS_ESRC = ../../src
+
+SPECS_FLAGS = -I../../include -I../../../kernel/src
+
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
diff --git a/lib/runtime_tools/doc/src/book.xml b/lib/runtime_tools/doc/src/book.xml
index 62f145f0a5..d3c462c0ad 100644
--- a/lib/runtime_tools/doc/src/book.xml
+++ b/lib/runtime_tools/doc/src/book.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml
index 36b3b51a99..d31ccd834d 100644
--- a/lib/runtime_tools/doc/src/dbg.xml
+++ b/lib/runtime_tools/doc/src/dbg.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -1024,7 +1024,7 @@ hello</pre>
</desc>
</func>
<func>
- <name>stop() -> stopped</name>
+ <name>stop() -> ok</name>
<fsummary>Stop the <c>dbg</c>server and the tracing of all processes.</fsummary>
<desc>
<p>Stops the <c>dbg</c> server and clears all trace flags for
@@ -1035,7 +1035,7 @@ hello</pre>
</desc>
</func>
<func>
- <name>stop_clear() -> stopped</name>
+ <name>stop_clear() -> ok</name>
<fsummary>Stop the <c>dbg</c>server and the tracing of all processes, and clears trace patterns.</fsummary>
<desc>
<p>Same as stop/0, but also clears all trace patterns on local
diff --git a/lib/runtime_tools/doc/src/dyntrace.xml b/lib/runtime_tools/doc/src/dyntrace.xml
index f0149d0665..25f750677f 100644
--- a/lib/runtime_tools/doc/src/dyntrace.xml
+++ b/lib/runtime_tools/doc/src/dyntrace.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/erts_alloc_config.xml b/lib/runtime_tools/doc/src/erts_alloc_config.xml
index 6acf498411..31145bee63 100644
--- a/lib/runtime_tools/doc/src/erts_alloc_config.xml
+++ b/lib/runtime_tools/doc/src/erts_alloc_config.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2010</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/fascicules.xml b/lib/runtime_tools/doc/src/fascicules.xml
index 5230dc7e90..1a0bd6ec97 100644
--- a/lib/runtime_tools/doc/src/fascicules.xml
+++ b/lib/runtime_tools/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/runtime_tools/doc/src/notes.xml b/lib/runtime_tools/doc/src/notes.xml
index 32b7d168f5..1612c62c98 100644
--- a/lib/runtime_tools/doc/src/notes.xml
+++ b/lib/runtime_tools/doc/src/notes.xml
@@ -31,6 +31,128 @@
<p>This document describes the changes made to the Runtime_Tools
application.</p>
+<section><title>Runtime_Tools 1.8.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The trace process started by <c>dbg</c> would not always
+ terminate when <c>dbg:stop/0</c> was called.</p>
+ <p>
+ Own Id: OTP-12517</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Runtime_Tools 1.8.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add <c>nif_version</c> to <c>erlang:system_info/1</c> in
+ order to get the NIF API version of the runtime system in
+ a way similar to <c>driver_version</c>.</p>
+ <p>
+ Own Id: OTP-12298</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Runtime_Tools 1.8.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The documentation for the return value of
+ dbg:{stop,stop_clear} functions are now correct (Thanks
+ to Luca Favatella)</p>
+ <p>
+ Own Id: OTP-11603</p>
+ </item>
+ <item>
+ <p>
+ Fix DTrace build on Illumos. (Thanks to Ryan Zezeski.)</p>
+ <p>
+ Own Id: OTP-11622</p>
+ </item>
+ <item>
+ <p>
+ Do not turn off scheduler_wall_time, as it can interfere
+ with other applications usage.</p>
+ <p>
+ Own Id: OTP-11693 Aux Id: seq12528 </p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Allow install path to have unicode characters.</p>
+ <p>
+ Own Id: OTP-10877</p>
+ </item>
+ <item>
+ <p>
+ The <c>erts_alloc_config</c> tool has been updated to
+ produce configurations that better fit todays SMP support
+ in the VM.</p>
+ <p>
+ Own Id: OTP-11662</p>
+ </item>
+ <item>
+ <p>
+ The <seealso
+ marker="kernel:app"><c>app</c></seealso>-file key
+ <seealso
+ marker="kernel:app#runtime_dependencies"><c>runtime_dependencies</c></seealso>
+ has been introduced.</p>
+ <p>
+ Runtime dependencies have been added to all app-files in
+ OTP. Note that these may not be completely correct during
+ OTP 17, but this is actively being worked on.</p>
+ <p>
+ The function <seealso
+ marker="runtime_tools:system_information#sanity_check/0"><c>system_information:sanity_check/0</c></seealso>
+ will verify all declared runtime dependencies in the
+ system when called.</p>
+ <p>
+ Own Id: OTP-11773</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Runtime_Tools 1.8.13</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/runtime_tools/doc/src/notes_history.xml b/lib/runtime_tools/doc/src/notes_history.xml
index 8fe27f619c..aba9f47cbf 100644
--- a/lib/runtime_tools/doc/src/notes_history.xml
+++ b/lib/runtime_tools/doc/src/notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/part.xml b/lib/runtime_tools/doc/src/part.xml
index 948d4a8020..d81eed6515 100644
--- a/lib/runtime_tools/doc/src/part.xml
+++ b/lib/runtime_tools/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2012</year><year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/part_notes.xml b/lib/runtime_tools/doc/src/part_notes.xml
index 6f7f610da0..395de39ac7 100644
--- a/lib/runtime_tools/doc/src/part_notes.xml
+++ b/lib/runtime_tools/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/part_notes_history.xml b/lib/runtime_tools/doc/src/part_notes_history.xml
index 2ce1a5de05..46a6baa45e 100644
--- a/lib/runtime_tools/doc/src/part_notes_history.xml
+++ b/lib/runtime_tools/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/ref_man.xml b/lib/runtime_tools/doc/src/ref_man.xml
index df3446cd17..25fa97896b 100644
--- a/lib/runtime_tools/doc/src/ref_man.xml
+++ b/lib/runtime_tools/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2012</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,5 +35,6 @@
<xi:include href="dbg.xml"/>
<xi:include href="dyntrace.xml"/>
<xi:include href="erts_alloc_config.xml"/>
+ <xi:include href="system_information.xml"/>
</application>
diff --git a/lib/runtime_tools/doc/src/runtime_tools_app.xml b/lib/runtime_tools/doc/src/runtime_tools_app.xml
index 1fd61b84d8..4b030b09af 100644
--- a/lib/runtime_tools/doc/src/runtime_tools_app.xml
+++ b/lib/runtime_tools/doc/src/runtime_tools_app.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
<year>1999</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/runtime_tools/doc/src/specs.xml b/lib/runtime_tools/doc/src/specs.xml
new file mode 100644
index 0000000000..d4c3c9dfe6
--- /dev/null
+++ b/lib/runtime_tools/doc/src/specs.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<specs xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="../specs/specs_system_information.xml"/>
+</specs>
diff --git a/lib/runtime_tools/doc/src/system_information.xml b/lib/runtime_tools/doc/src/system_information.xml
new file mode 100644
index 0000000000..b586334ae7
--- /dev/null
+++ b/lib/runtime_tools/doc/src/system_information.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title></title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno>1</docno>
+ <approved></approved>
+ <checked></checked>
+ <date></date>
+ <rev></rev>
+ <file>system_information.xml</file>
+ </header>
+ <module>system_information</module>
+ <modulesummary>System Information</modulesummary>
+ <description>
+ <p></p>
+ </description>
+ <funcs>
+ <func>
+ <name name="sanity_check" arity="0"/>
+ <fsummary>Perform a sanity check</fsummary>
+ <desc>
+ <p>Performs a sanity check on the system. If no issues
+ were found, <c>ok</c> is returned. If issues were
+ found, <c>{failed, <anno>Failures</anno>}</c> is
+ returned. All failures found will be part of the
+ <c><anno>Failures</anno></c> list. Currently defined
+ <c><anno>Failure</anno></c> elements in the
+ <c><anno>Failures</anno></c> list:</p>
+ <taglist>
+ <tag><c><anno>InvalidAppFile</anno></c></tag>
+ <item><p>An application has an invalid <c>.app</c> file. The
+ second element identifies the application which has the
+ invalid <c>.app</c> file.</p></item>
+ <tag><c><anno>InvalidApplicationVersion</anno></c></tag>
+ <item><p>An application has an invalid application version.
+ The second element identifies the application version that
+ is invalid.</p></item>
+ <tag><c><anno>MissingRuntimeDependencies</anno></c></tag>
+ <item><p>An application is missing
+ <seealso marker="kernel:app#runtime_dependencies">runtime
+ dependencies</seealso>. The second element identifies the
+ application (with version) that has missing dependencies.
+ The third element contains the missing dependencies.</p>
+ <p>Note that this check use application versions that
+ are loaded, or will be loaded when used. You might have
+ application versions that satisfies all dependencies
+ installed in the system, but if those are not loaded this
+ check will fail. The system will of course also fail when
+ used like this. This may happen when you have multiple
+ <seealso marker="doc/system_principles:versions">branched
+ versions</seealso> of the same application installed in the
+ system, but you do not use a
+ <seealso marker="doc/system_principles:system_principles#BOOTSCRIPT">boot
+ script</seealso> identifing the correct application version.</p>
+ </item>
+ </taglist>
+ <p>Currently the sanity check is limited to verifying
+ runtime dependencies found in the <c>.app</c> files of
+ all applications. More checks will be introduced in the
+ future. This implies that the return type <em>will</em>
+ change in the future.</p>
+ <note><p>An <c>ok</c> return value only means that
+ <c>sanity_check/0</c> did not find any issues, <em>not</em>
+ that no issues exist.</p></note>
+ </desc>
+ </func>
+ <func>
+ <name name="to_file" arity="1"/>
+ <fsummary>Write miscellaneous system information to file</fsummary>
+ <desc><p>Writes miscellaneous system information to file. This
+ information will typically be requested by the Erlang/OTP team
+ at Ericsson AB when reporting an issue.</p></desc>
+ </func>
+ </funcs>
+ </erlref>
+
diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl
index f0086e8cc7..c2de57d40b 100644
--- a/lib/runtime_tools/src/dbg.erl
+++ b/lib/runtime_tools/src/dbg.erl
@@ -778,50 +778,50 @@ tracer_init(Handler, HandlerData) ->
tracer_loop(Handler, HandlerData).
tracer_loop(Handler, Hdata) ->
- receive
- Msg ->
- %% Don't match in receive to avoid giving EXIT message higher
- %% priority than the trace messages.
- case Msg of
- {'EXIT',_Pid,_Reason} ->
- ok;
- Trace ->
- NewData = recv_all_traces(Trace, Handler, Hdata),
- tracer_loop(Handler, NewData)
- end
+ {State, Suspended, Traces} = recv_all_traces(),
+ NewHdata = handle_traces(Suspended, Traces, Handler, Hdata),
+ case State of
+ done ->
+ exit(normal);
+ loop ->
+ tracer_loop(Handler, NewHdata)
end.
-
-recv_all_traces(Trace, Handler, Hdata) ->
- Suspended = suspend(Trace, []),
- recv_all_traces(Suspended, Handler, Hdata, [Trace]).
-recv_all_traces(Suspended0, Handler, Hdata, Traces) ->
+recv_all_traces() ->
+ recv_all_traces([], [], infinity).
+
+recv_all_traces(Suspended0, Traces, Timeout) ->
receive
Trace when is_tuple(Trace), element(1, Trace) == trace ->
Suspended = suspend(Trace, Suspended0),
- recv_all_traces(Suspended, Handler, Hdata, [Trace|Traces]);
+ recv_all_traces(Suspended, [Trace|Traces], 0);
Trace when is_tuple(Trace), element(1, Trace) == trace_ts ->
Suspended = suspend(Trace, Suspended0),
- recv_all_traces(Suspended, Handler, Hdata, [Trace|Traces]);
+ recv_all_traces(Suspended, [Trace|Traces], 0);
Trace when is_tuple(Trace), element(1, Trace) == seq_trace ->
Suspended = suspend(Trace, Suspended0),
- recv_all_traces(Suspended, Handler, Hdata, [Trace|Traces]);
+ recv_all_traces(Suspended, [Trace|Traces], 0);
Trace when is_tuple(Trace), element(1, Trace) == drop ->
Suspended = suspend(Trace, Suspended0),
- recv_all_traces(Suspended, Handler, Hdata, [Trace|Traces]);
+ recv_all_traces(Suspended, [Trace|Traces], 0);
+ {'EXIT', _Pid, _Reason} ->
+ {done, Suspended0, Traces};
Other ->
%%% Is this really a good idea?
io:format(user,"** tracer received garbage: ~p~n", [Other]),
- recv_all_traces(Suspended0, Handler, Hdata, Traces)
- after 0 ->
- case catch invoke_handler(Traces, Handler, Hdata) of
- {'EXIT',Reason} ->
- resume(Suspended0),
- exit({trace_handler_crashed,Reason});
- NewHdata ->
- resume(Suspended0),
- NewHdata
- end
+ recv_all_traces(Suspended0, Traces, Timeout)
+ after Timeout ->
+ {loop, Suspended0, Traces}
+ end.
+
+handle_traces(Suspended, Traces, Handler, Hdata) ->
+ case catch invoke_handler(Traces, Handler, Hdata) of
+ {'EXIT',Reason} ->
+ resume(Suspended),
+ exit({trace_handler_crashed,Reason});
+ NewHdata ->
+ resume(Suspended),
+ NewHdata
end.
invoke_handler([Tr|Traces], Handler, Hdata0) ->
@@ -1786,12 +1786,12 @@ h(get_tracer) ->
" - Returns the process or port to which all trace messages are sent."]);
h(stop) ->
help_display(
- ["stop() -> stopped",
+ ["stop() -> ok",
" - Stops the dbg server and the tracing of all processes.",
" Does not clear any trace patterns."]);
h(stop_clear) ->
help_display(
- ["stop_clear() -> stopped",
+ ["stop_clear() -> ok",
" - Stops the dbg server and the tracing of all processes,",
" and clears all trace patterns."]).
diff --git a/lib/runtime_tools/src/erts_alloc_config.erl b/lib/runtime_tools/src/erts_alloc_config.erl
index 284e88d4a7..b9a26dc0dc 100644
--- a/lib/runtime_tools/src/erts_alloc_config.erl
+++ b/lib/runtime_tools/src/erts_alloc_config.erl
@@ -39,6 +39,8 @@
need_config_change,
alloc_util,
instances,
+ strategy,
+ acul,
low_mbc_blocks_size,
high_mbc_blocks_size,
sbct,
@@ -54,8 +56,6 @@
-define(SERVER, '__erts_alloc_config__').
--define(MAX_ALLOCATOR_INSTANCES, 16).
-
-define(KB, 1024).
-define(MB, 1048576).
@@ -99,23 +99,11 @@
{ets_alloc, 131072},
{fix_alloc, 131072},
{eheap_alloc, 524288},
- {ll_alloc, 2097152},
+ {ll_alloc, 131072},
{sl_alloc, 131072},
{temp_alloc, 131072},
{driver_alloc, 131072}]).
--define(MMMBC_DEFAULTS,
- [{binary_alloc, 10},
- {std_alloc, 10},
- {ets_alloc, 10},
- {fix_alloc, 10},
- {eheap_alloc, 10},
- {ll_alloc, 0},
- {sl_alloc, 10},
- {temp_alloc, 10},
- {driver_alloc, 10}]).
-
-
%%%
%%% Exported interface
%%%
@@ -230,20 +218,72 @@ server_loop(State) ->
end,
server_loop(NewState).
-allocator_instances(temp_alloc) ->
- erlang:system_info(schedulers) + 1;
-allocator_instances(ll_alloc) ->
+carrier_migration_support(aoff) ->
+ true;
+carrier_migration_support(aoffcbf) ->
+ true;
+carrier_migration_support(aoffcaobf) ->
+ true;
+carrier_migration_support(_) ->
+ false.
+
+allocator_instances(ll_alloc, Strategy) ->
+ case carrier_migration_support(Strategy) of
+ true -> erlang:system_info(schedulers);
+ false -> 1
+ end;
+allocator_instances(_A, undefined) ->
1;
-allocator_instances(_Allocator) ->
- case erlang:system_info(schedulers) of
- Schdlrs when Schdlrs =< ?MAX_ALLOCATOR_INSTANCES -> Schdlrs;
- _Schdlrs -> ?MAX_ALLOCATOR_INSTANCES
+allocator_instances(_A, _Strategy) ->
+ erlang:system_info(schedulers).
+
+strategy(temp_alloc, _AI) ->
+ af;
+strategy(A, AI) ->
+ try
+ {A, OptList} = lists:keyfind(A, 1, AI),
+ {as, S} = lists:keyfind(as, 1, OptList),
+ S
+ catch
+ _ : _ ->
+ undefined
+ end.
+
+strategy_str(af) ->
+ "A fit";
+strategy_str(gf) ->
+ "Good fit";
+strategy_str(bf) ->
+ "Best fit";
+strategy_str(aobf) ->
+ "Address order best fit";
+strategy_str(aoff) ->
+ "Address order first fit";
+strategy_str(aoffcbf) ->
+ "Address order first fit carrier best fit";
+strategy_str(aoffcaobf) ->
+ "Address order first fit carrier adress order best fit".
+
+default_acul(A, S) ->
+ case carrier_migration_support(S) of
+ false ->
+ 0;
+ true ->
+ case A of
+ ll_alloc -> 85;
+ eheap_alloc -> 45;
+ _ -> 60
+ end
end.
-
+
make_state() ->
+ {_, _, _, AI} = erlang:system_info(allocator),
#state{alloc = lists:map(fun (A) ->
+ S = strategy(A, AI),
#alloc{name = A,
- instances = allocator_instances(A)}
+ strategy = S,
+ acul = default_acul(A, S),
+ instances = allocator_instances(A, S)}
end,
?ALLOCATORS)}.
@@ -345,7 +385,7 @@ do_save_scenario(AlcList) ->
conf_size(Bytes) when is_integer(Bytes), Bytes < 0 ->
exit({bad_value, Bytes});
conf_size(Bytes) when is_integer(Bytes), Bytes < 1*?MB ->
- ?ROUNDUP(?B2KB(Bytes), 128);
+ ?ROUNDUP(?B2KB(Bytes), 256);
conf_size(Bytes) when is_integer(Bytes), Bytes < 10*?MB ->
?ROUNDUP(?B2KB(Bytes), ?B2KB(1*?MB));
conf_size(Bytes) when is_integer(Bytes), Bytes < 100*?MB ->
@@ -376,28 +416,25 @@ mmbcs(#conf{format_to = FTO},
temp_alloc -> BlocksSize;
_ -> BlocksSize div Insts
end,
- case BS > default_mmbcs(A, Insts) of
- true ->
+ DefMMBCS = default_mmbcs(A, Insts),
+ case {Insts, BS > DefMMBCS} of
+ {1, true} ->
MMBCS = conf_size(BS),
fc(FTO, "Main mbc size of ~p kilobytes.", [MMBCS]),
format(FTO, " +M~cmmbcs ~p~n", [alloc_char(A), MMBCS]);
- false ->
+ _ ->
+ MMBCS = ?B2KB(DefMMBCS),
+ fc(FTO, "Main mbc size of ~p kilobytes.", [MMBCS]),
+ format(FTO, " +M~cmmbcs ~p~n", [alloc_char(A), MMBCS]),
ok
end.
-smbcs_lmbcs_mmmbc(#conf{format_to = FTO},
- #alloc{name = A, instances = Insts, segments = Segments}) ->
- MMMBC = case {A, Insts} of
- {_, 1} -> Segments#segment.number;
- {temp_alloc, _} -> Segments#segment.number;
- _ -> (Segments#segment.number div Insts) + 1
- end,
+smbcs_lmbcs(#conf{format_to = FTO},
+ #alloc{name = A, segments = Segments}) ->
MBCS = Segments#segment.size,
AC = alloc_char(A),
fc(FTO, "Mseg mbc size of ~p kilobytes.", [MBCS]),
format(FTO, " +M~csmbcs ~p +M~clmbcs ~p~n", [AC, MBCS, AC, MBCS]),
- fc(FTO, "Max ~p mseg mbcs.", [MMMBC]),
- format(FTO, " +M~cmmmbc ~p~n", [AC, MMMBC]),
ok.
alloc_char(binary_alloc) -> $B;
@@ -462,6 +499,8 @@ au_conf_alloc(#conf{format_to = FTO} = Conf,
#alloc{name = A,
alloc_util = true,
instances = Insts,
+ acul = Acul,
+ strategy = Strategy,
low_mbc_blocks_size = Low,
high_mbc_blocks_size = High} = Alc) ->
fcp(FTO, "Usage of mbcs: ~p - ~p kilobytes", [?B2KB(Low), ?B2KB(High)]),
@@ -470,31 +509,49 @@ au_conf_alloc(#conf{format_to = FTO} = Conf,
fc(FTO, "One instance used."),
format(FTO, " +M~ct false~n", [alloc_char(A)]);
_ ->
- fc(FTO, "~p instances used.",
+ fc(FTO, "~p + 1 instances used.",
[Insts]),
- format(FTO, " +M~ct true~n", [alloc_char(A)])
- end,
+ format(FTO, " +M~ct true~n", [alloc_char(A)]),
+ case Strategy of
+ undefined ->
+ ok;
+ _ ->
+ fc(FTO, "Allocation strategy: ~s.",
+ [strategy_str(Strategy)]),
+ format(FTO, " +M~cas ~s~n", [alloc_char(A),
+ atom_to_list(Strategy)])
+ end,
+ case carrier_migration_support(Strategy) of
+ false ->
+ ok;
+ true ->
+ fc(FTO, "Abandon carrier utilization limit of ~p%.", [Acul]),
+ format(FTO, " +M~cacul ~p~n", [alloc_char(A), Acul])
+ end
+ end,
mmbcs(Conf, Alc),
- smbcs_lmbcs_mmmbc(Conf, Alc),
+ smbcs_lmbcs(Conf, Alc),
sbct(Conf, Alc).
-large_growth(Low, High) ->
- High - Low >= ?LARGE_GROWTH_ABS_LIMIT.
-
calc_seg_size(Growth, Segs) ->
conf_size(round(Growth*?FRAG_FACT*?GROWTH_SEG_FACT) div Segs).
calc_growth_segments(Conf, AlcList0) ->
- CalcSmall = fun (#alloc{name = ll_alloc} = Alc, Acc) ->
- {Alc#alloc{segments = #segment{size = 0,
+ CalcSmall = fun (#alloc{name = ll_alloc, instances = 1} = Alc, Acc) ->
+ {Alc#alloc{segments = #segment{size = conf_size(0),
number = 0}},
Acc};
(#alloc{alloc_util = true,
- low_mbc_blocks_size = Low,
+ instances = Insts,
+ low_mbc_blocks_size = LowMBC,
high_mbc_blocks_size = High} = Alc,
{SL, AL}) ->
+ Low = case Insts of
+ 1 -> LowMBC;
+ _ -> 0
+ end,
Growth = High - Low,
- case large_growth(Low, High) of
+ case Growth >= ?LARGE_GROWTH_ABS_LIMIT of
true ->
{Alc, {SL, AL+1}};
false ->
@@ -522,8 +579,13 @@ calc_growth_segments(Conf, AlcList0) ->
end,
CalcLarge = fun (#alloc{alloc_util = true,
segments = undefined,
- low_mbc_blocks_size = Low,
+ instances = Insts,
+ low_mbc_blocks_size = LowMBC,
high_mbc_blocks_size = High} = Alc) ->
+ Low = case Insts of
+ 1 -> LowMBC;
+ _ -> 0
+ end,
Growth = High - Low,
SegSize = calc_seg_size(Growth,
SegsPerAlloc),
@@ -560,15 +622,10 @@ format_header(FTO) ->
case erlang:system_info(schedulers) of
1 -> ok;
Schdlrs ->
- MinSchdlrs = case Schdlrs > ?MAX_ALLOCATOR_INSTANCES of
- true -> ?MAX_ALLOCATOR_INSTANCES;
- false -> Schdlrs
- end,
fcp(FTO,
"NOTE: This configuration was made for ~p schedulers. "
- "It is very important that at least ~p schedulers "
- "are used.",
- [Schdlrs, MinSchdlrs])
+ "It is very important that ~p schedulers are used.",
+ [Schdlrs, Schdlrs])
end,
fcp(FTO,
"This configuration is intended as a suggestion and "
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 202129c61a..fea0854042 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,6 +53,13 @@ sys_info() ->
Mem -> Mem
catch _:_ -> []
end,
+
+ SchedulersOnline = erlang:system_info(schedulers_online),
+ SchedulersAvailable = case erlang:system_info(multi_scheduling) of
+ enabled -> SchedulersOnline;
+ _ -> 1
+ end,
+
{{_,Input},{_,Output}} = erlang:statistics(io),
[{process_count, erlang:system_info(process_count)},
{process_limit, erlang:system_info(process_limit)},
@@ -60,9 +67,13 @@ sys_info() ->
{run_queue, erlang:statistics(run_queue)},
{io_input, Input},
{io_output, Output},
+
{logical_processors, erlang:system_info(logical_processors)},
- {logical_processors_available, erlang:system_info(logical_processors_available)},
{logical_processors_online, erlang:system_info(logical_processors_online)},
+ {logical_processors_available, erlang:system_info(logical_processors_available)},
+ {schedulers, erlang:system_info(schedulers)},
+ {schedulers_online, SchedulersOnline},
+ {schedulers_available, SchedulersAvailable},
{otp_release, erlang:system_info(otp_release)},
{version, erlang:system_info(version)},
@@ -216,12 +227,14 @@ fetch_stats(Parent, Time) ->
fetch_stats_loop(Parent, Time) ->
erlang:system_flag(scheduler_wall_time, true),
receive
- _Msg -> erlang:system_flag(scheduler_wall_time, false)
+ _Msg ->
+ %% erlang:system_flag(scheduler_wall_time, false)
+ ok
after Time ->
_M = Parent ! {stats, 1,
erlang:statistics(scheduler_wall_time),
erlang:statistics(io),
- erlang:memory()},
+ try erlang:memory() catch _:_ -> [] end},
fetch_stats_loop(Parent, Time)
end.
%%
@@ -233,17 +246,6 @@ etop_collect(Collector) ->
%% utilization in etop). Next time the flag will be true and then
%% there will be a measurement.
SchedulerWallTime = erlang:statistics(scheduler_wall_time),
-
- %% Turn off the flag while collecting data per process etc.
- case erlang:system_flag(scheduler_wall_time,false) of
- false ->
- %% First time and the flag was false - start a monitoring
- %% process to set the flag back to false when etop is stopped.
- spawn(fun() -> flag_holder_proc(Collector) end);
- _ ->
- ok
- end,
-
ProcInfo = etop_collect(processes(), []),
Collector ! {self(),#etop_info{now = now(),
@@ -253,13 +255,22 @@ etop_collect(Collector) ->
memi = etop_memi(),
procinfo = ProcInfo
}},
+
+ case SchedulerWallTime of
+ undefined ->
+ spawn(fun() -> flag_holder_proc(Collector) end);
+ _ ->
+ ok
+ end,
+
erlang:system_flag(scheduler_wall_time,true).
flag_holder_proc(Collector) ->
Ref = erlang:monitor(process,Collector),
receive
{'DOWN',Ref,_,_,_} ->
- erlang:system_flag(scheduler_wall_time,false)
+ %% erlang:system_flag(scheduler_wall_time,false)
+ ok
end.
etop_memi() ->
diff --git a/lib/runtime_tools/src/runtime_tools.app.src b/lib/runtime_tools/src/runtime_tools.app.src
index d46cfe1f32..0a70802c08 100644
--- a/lib/runtime_tools/src/runtime_tools.app.src
+++ b/lib/runtime_tools/src/runtime_tools.app.src
@@ -25,6 +25,8 @@
{registered, [runtime_tools_sup]},
{applications, [kernel, stdlib]},
{env, []},
- {mod, {runtime_tools, []}}]}.
+ {mod, {runtime_tools, []}},
+ {runtime_dependencies, ["stdlib-2.0","mnesia-4.12","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/runtime_tools/src/runtime_tools.appup.src b/lib/runtime_tools/src/runtime_tools.appup.src
index 7a435e9b22..0c2bab316f 100644
--- a/lib/runtime_tools/src/runtime_tools.appup.src
+++ b/lib/runtime_tools/src/runtime_tools.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, runtime_tools}]}],
+ [{<<".*">>,[{restart_application, runtime_tools}]}]
+}.
diff --git a/lib/runtime_tools/src/runtime_tools_sup.erl b/lib/runtime_tools/src/runtime_tools_sup.erl
index ab9fa534d5..32770397dd 100644
--- a/lib/runtime_tools/src/runtime_tools_sup.erl
+++ b/lib/runtime_tools/src/runtime_tools_sup.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/runtime_tools/src/system_information.erl b/lib/runtime_tools/src/system_information.erl
index 1d4b878d79..04cc33e1ad 100644
--- a/lib/runtime_tools/src/system_information.erl
+++ b/lib/runtime_tools/src/system_information.erl
@@ -39,7 +39,8 @@
application/1, application/2,
environment/0, environment/1,
module/1, module/2,
- modules/1
+ modules/1,
+ sanity_check/0
]).
%% gen_server callbacks
@@ -85,9 +86,14 @@ report() -> [
{erts_compile_info, erlang:system_info(compile_info)},
{beam_dynamic_libraries, get_dynamic_libraries()},
{environment_erts, os_getenv_erts_specific()},
- {environment, [split_env(Env) || Env <- os:getenv()]}
+ {environment, [split_env(Env) || Env <- os:getenv()]},
+ {sanity_check, sanity_check()}
].
+-spec to_file(FileName) -> ok | {error, Reason} when
+ FileName :: file:name_all(),
+ Reason :: file:posix() | badarg | terminated | system_limit.
+
to_file(File) ->
file:write_file(File, iolist_to_binary([
io_lib:format("{system_information_version, ~p}.~n", [
@@ -130,6 +136,27 @@ module(M, Opts) when is_atom(M), is_list(Opts) ->
modules(Opt) when is_atom(Opt) ->
gen_server:call(?SERVER, {modules, Opt}).
+
+-spec sanity_check() -> ok | {failed, Failures} when
+ Application :: atom(),
+ ApplicationVersion :: string(),
+ MissingRuntimeDependencies :: {missing_runtime_dependencies,
+ ApplicationVersion,
+ [ApplicationVersion]},
+ InvalidApplicationVersion :: {invalid_application_version,
+ ApplicationVersion},
+ InvalidAppFile :: {invalid_app_file, Application},
+ Failure :: MissingRuntimeDependencies
+ | InvalidApplicationVersion
+ | InvalidAppFile,
+ Failures :: [Failure].
+
+sanity_check() ->
+ case check_runtime_dependencies() of
+ [] -> ok;
+ Issues -> {failed, Issues}
+ end.
+
%%===================================================================
%% gen_server callbacks
%%===================================================================
@@ -280,7 +307,7 @@ print_environments([],_) ->
print_environment({_Key, false},_) -> ok;
print_environment({Key, Value},_) ->
- io:format(" - ~s = ~s~n", [Key, Value]).
+ io:format(" - ~s = ~ts~n", [Key, Value]).
print_modules_from_code(M, [Info|Ms], Opts) ->
print_module_from_code(M, Info),
@@ -292,14 +319,14 @@ print_modules_from_code(_, [], _) ->
ok.
print_module_from_code(M, {Path, [{M,ModInfo}]}) ->
- io:format(" from path \"~s\" (no application):~n", [Path]),
+ io:format(" from path \"~ts\" (no application):~n", [Path]),
io:format(" - compiler: ~s~n", [get_value([compiler], ModInfo)]),
io:format(" - md5: ~s~n", [get_value([md5], ModInfo)]),
io:format(" - native: ~w~n", [get_value([native], ModInfo)]),
io:format(" - loaded: ~w~n", [get_value([loaded], ModInfo)]),
ok;
print_module_from_code(M, {App,Vsn,Path,[{M,ModInfo}]}) ->
- io:format(" from path \"~s\" (~w-~s):~n", [Path,App,Vsn]),
+ io:format(" from path \"~ts\" (~w-~s):~n", [Path,App,Vsn]),
io:format(" - compiler: ~s~n", [get_value([compiler], ModInfo)]),
io:format(" - md5: ~s~n", [get_value([md5], ModInfo)]),
io:format(" - native: ~w~n", [get_value([native], ModInfo)]),
@@ -344,6 +371,7 @@ erlang_system_info() ->
logical_processors_online,
logical_processors_available,
driver_version,
+ nif_version,
emu_args,
ethread_info,
beam_jump_table,
@@ -457,6 +485,8 @@ get_application_from_path(Path) ->
{description, proplists:get_value(description, Info, [])},
{vsn, proplists:get_value(vsn, Info, [])},
{path, Path},
+ {runtime_dependencies,
+ proplists:get_value(runtime_dependencies, Info, [])},
{modules, get_modules_from_path(Path)}
]}
end.
@@ -552,3 +582,252 @@ get_beam_name() ->
Value -> Value
end,
Beam ++ Type ++ Flavor.
+
+%% Check runtime dependencies...
+
+vsnstr2vsn(VsnStr) ->
+ list_to_tuple(lists:map(fun (Part) ->
+ list_to_integer(Part)
+ end,
+ string:tokens(VsnStr, "."))).
+
+rtdepstrs2rtdeps([]) ->
+ [];
+rtdepstrs2rtdeps([RTDep | RTDeps]) ->
+ [AppStr, VsnStr] = string:tokens(RTDep, "-"),
+ [{list_to_atom(AppStr), vsnstr2vsn(VsnStr)} | rtdepstrs2rtdeps(RTDeps)].
+
+build_app_table([], AppTab) ->
+ AppTab;
+build_app_table([App | Apps], AppTab0) ->
+ AppTab1 = try
+ %% We may have multiple application versions installed
+ %% of the same application! It is therefore important
+ %% to look up the application version that actually will
+ %% be used via code server.
+ AppFile = code:where_is_file(atom_to_list(App) ++ ".app"),
+ {ok, [{application, App, Info}]} = file:consult(AppFile),
+ VsnStr = proplists:get_value(vsn, Info),
+ Vsn = vsnstr2vsn(VsnStr),
+ RTDepStrs = proplists:get_value(runtime_dependencies,
+ Info, []),
+ RTDeps = rtdepstrs2rtdeps(RTDepStrs),
+ gb_trees:insert(App, {Vsn, RTDeps}, AppTab0)
+ catch
+ _ : _ ->
+ AppTab0
+ end,
+ build_app_table(Apps, AppTab1).
+
+meets_min_req(Vsn, Vsn) ->
+ true;
+meets_min_req({X}, VsnReq) ->
+ meets_min_req({X, 0, 0}, VsnReq);
+meets_min_req({X, Y}, VsnReq) ->
+ meets_min_req({X, Y, 0}, VsnReq);
+meets_min_req(Vsn, {X}) ->
+ meets_min_req(Vsn, {X, 0, 0});
+meets_min_req(Vsn, {X, Y}) ->
+ meets_min_req(Vsn, {X, Y, 0});
+meets_min_req({X, _Y, _Z}, {XReq, _YReq, _ZReq}) when X > XReq ->
+ true;
+meets_min_req({X, Y, _Z}, {X, YReq, _ZReq}) when Y > YReq ->
+ true;
+meets_min_req({X, Y, Z}, {X, Y, ZReq}) when Z > ZReq ->
+ true;
+meets_min_req({_X, _Y, _Z}, {_XReq, _YReq, _ZReq}) ->
+ false;
+meets_min_req(Vsn, VsnReq) ->
+ gp_meets_min_req(mk_gp_vsn_list(Vsn), mk_gp_vsn_list(VsnReq)).
+
+gp_meets_min_req([X, Y, Z | _Vs], [X, Y, Z]) ->
+ true;
+gp_meets_min_req([X, Y, Z | _Vs], [XReq, YReq, ZReq]) ->
+ meets_min_req({X, Y, Z}, {XReq, YReq, ZReq});
+gp_meets_min_req([X, Y, Z | Vs], [X, Y, Z | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req(_Vsn, _VReq) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+gp_meets_min_req_tail([V | Vs], [V | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req_tail([], []) ->
+ true;
+gp_meets_min_req_tail([_V | _Vs], []) ->
+ true;
+gp_meets_min_req_tail([V | _Vs], [VReq]) when V > VReq ->
+ true;
+gp_meets_min_req_tail(_Vs, _VReqs) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+mk_gp_vsn_list(Vsn) ->
+ [X, Y, Z | Tail] = tuple_to_list(Vsn),
+ [X, Y, Z | remove_trailing_zeroes(Tail)].
+
+remove_trailing_zeroes([]) ->
+ [];
+remove_trailing_zeroes([0 | Vs]) ->
+ case remove_trailing_zeroes(Vs) of
+ [] -> [];
+ NewVs -> [0 | NewVs]
+ end;
+remove_trailing_zeroes([V | Vs]) ->
+ [V | remove_trailing_zeroes(Vs)].
+
+mk_app_vsn_str({App, Vsn}) ->
+ mk_app_vsn_str(App, Vsn).
+
+mk_app_vsn_str(App, Vsn) ->
+ VsnList = tuple_to_list(Vsn),
+ lists:flatten([atom_to_list(App),
+ $-,
+ integer_to_list(hd(VsnList)),
+ lists:map(fun (Part) ->
+ [$., integer_to_list(Part)]
+ end, tl(VsnList))]).
+
+otp_17_0_vsns_orddict() ->
+ [{asn1,{3,0}},
+ {common_test,{1,8}},
+ {compiler,{5,0}},
+ {cosEvent,{2,1,15}},
+ {cosEventDomain,{1,1,14}},
+ {cosFileTransfer,{1,1,16}},
+ {cosNotification,{1,1,21}},
+ {cosProperty,{1,1,17}},
+ {cosTime,{1,1,14}},
+ {cosTransactions,{1,2,14}},
+ {crypto,{3,3}},
+ {debugger,{4,0}},
+ {dialyzer,{2,7}},
+ {diameter,{1,6}},
+ {edoc,{0,7,13}},
+ {eldap,{1,0,3}},
+ {erl_docgen,{0,3,5}},
+ {erl_interface,{3,7,16}},
+ {erts,{6,0}},
+ {et,{1,5}},
+ {eunit,{2,2,7}},
+ {gs,{1,5,16}},
+ {hipe,{3,10,3}},
+ {ic,{4,3,5}},
+ {inets,{5,10}},
+ {jinterface,{1,5,9}},
+ {kernel,{3,0}},
+ {megaco,{3,17,1}},
+ {mnesia,{4,12}},
+ {observer,{2,0}},
+ {odbc,{2,10,20}},
+ {orber,{3,6,27}},
+ {os_mon,{2,2,15}},
+ {ose,{1,0}},
+ {otp_mibs,{1,0,9}},
+ {parsetools,{2,0,11}},
+ {percept,{0,8,9}},
+ {public_key,{0,22}},
+ {reltool,{0,6,5}},
+ {runtime_tools,{1,8,14}},
+ {sasl,{2,4}},
+ {snmp,{4,25,1}},
+ {ssh,{3,0,1}},
+ {ssl,{5,3,4}},
+ {stdlib,{2,0}},
+ {syntax_tools,{1,6,14}},
+ {test_server,{3,7}},
+ {tools,{2,6,14}},
+ {typer,{0,9,6}},
+ {webtool,{0,8,10}},
+ {wx,{1,2}},
+ {xmerl,{1,3,7}}].
+
+otp_17_0_vsns_tab() ->
+ gb_trees:from_orddict(otp_17_0_vsns_orddict()).
+
+check_runtime_dependency({App, DepVsn}, AppTab) ->
+ case gb_trees:lookup(App, AppTab) of
+ none ->
+ false;
+ {value, {Vsn, _}} ->
+ meets_min_req(Vsn, DepVsn)
+ end.
+
+check_runtime_dependencies(App, AppTab, OtpMinVsnTab) ->
+ case gb_trees:lookup(App, AppTab) of
+ none ->
+ [{invalid_app_file, App}];
+ {value, {Vsn, RTDeps}} ->
+ RTD = case lists:foldl(
+ fun (RTDep, Acc) ->
+ case check_runtime_dependency(RTDep, AppTab) of
+ true ->
+ Acc;
+ false ->
+ [mk_app_vsn_str(RTDep) | Acc]
+ end
+ end,
+ [],
+ RTDeps) of
+ [] ->
+ [];
+ MissingDeps ->
+ [{missing_runtime_dependencies,
+ mk_app_vsn_str(App, Vsn),
+ MissingDeps}]
+ end,
+ case gb_trees:lookup(App, OtpMinVsnTab) of
+ none ->
+ RTD;
+ {value, MinVsn} ->
+ case meets_min_req(Vsn, MinVsn) of
+ true ->
+ RTD;
+ false ->
+ [{invalid_application_version,
+ mk_app_vsn_str(App, Vsn)} | RTD]
+ end
+ end
+ end.
+
+app_file_to_app(AF) ->
+ list_to_atom(filename:basename(AF, ".app")).
+
+get_apps() ->
+ get_apps(code:get_path(), []).
+
+get_apps([], Apps) ->
+ lists:usort(Apps);
+get_apps([Path|Paths], Apps) ->
+ case filelib:wildcard(filename:join(Path, "*.app")) of
+ [] ->
+ %% Not app or invalid app
+ get_apps(Paths, Apps);
+ [AppFile] ->
+ get_apps(Paths, [app_file_to_app(AppFile) | Apps]);
+ [_AppFile| _] = AppFiles ->
+ %% Strange with multple .app files... Lets put them
+ %% all in the list and see what we get...
+ lists:map(fun (AF) ->
+ app_file_to_app(AF)
+ end, AppFiles) ++ Apps
+ end.
+
+check_runtime_dependencies() ->
+ OtpMinVsnTab = otp_17_0_vsns_tab(),
+ Apps = get_apps(),
+ AppTab = build_app_table(Apps, gb_trees:empty()),
+ lists:foldl(fun (App, Acc) ->
+ case check_runtime_dependencies(App,
+ AppTab,
+ OtpMinVsnTab) of
+ [] -> Acc;
+ Issues -> Issues ++ Acc
+ end
+ end,
+ [],
+ Apps).
+
+%% End of runtime dependency checks
diff --git a/lib/runtime_tools/src/ttb_autostart.erl b/lib/runtime_tools/src/ttb_autostart.erl
index 5339507cec..4c6971c119 100644
--- a/lib/runtime_tools/src/ttb_autostart.erl
+++ b/lib/runtime_tools/src/ttb_autostart.erl
@@ -1,4 +1,3 @@
-%%%-*- coding: utf-8 -*-
%%%-------------------------------------------------------------------
%%% File : ttb_autostart.erl
%%% Author : Bartłomiej Puzoń <[email protected]>
diff --git a/lib/runtime_tools/test/dbg_SUITE.erl b/lib/runtime_tools/test/dbg_SUITE.erl
index dfae52ed1d..0bcbd67d05 100644
--- a/lib/runtime_tools/test/dbg_SUITE.erl
+++ b/lib/runtime_tools/test/dbg_SUITE.erl
@@ -25,7 +25,7 @@
ip_port/1, file_port/1, file_port2/1, file_port_schedfix/1,
ip_port_busy/1, wrap_port/1, wrap_port_time/1,
with_seq_trace/1, dead_suspend/1, local_trace/1,
- saved_patterns/1]).
+ saved_patterns/1, tracer_exit_on_stop/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
-export([tracee1/1, tracee2/1]).
-export([dummy/0, exported/1]).
@@ -47,7 +47,7 @@ all() ->
[big, tiny, simple, message, distributed, ip_port,
file_port, file_port2, file_port_schedfix, ip_port_busy,
wrap_port, wrap_port_time, with_seq_trace, dead_suspend,
- local_trace, saved_patterns].
+ local_trace, saved_patterns, tracer_exit_on_stop].
groups() ->
[].
@@ -742,6 +742,38 @@ run_dead_suspend() ->
dummy() ->
ok.
+%% Test that a tracer process does not ignore an exit signal message when it has
+%% received (but not handled) trace messages
+tracer_exit_on_stop(_) ->
+ %% Tracer blocks waiting for fun to complete so that the trace message and
+ %% the exit signal message from the dbg process are in its message queue.
+ Fun = fun() ->
+ ?MODULE:dummy(),
+ Ref = erlang:trace_delivered(self()),
+ receive {trace_delivered, _, Ref} -> stop() end
+ end,
+ {ok, _} = dbg:tracer(process, {fun spawn_once_handler/2, {self(), Fun}}),
+ {ok, Tracer} = dbg:get_tracer(),
+ MRef = monitor(process, Tracer),
+ {ok, _} = dbg:p(self(), [call]),
+ {ok, _} = dbg:p(new, [call]),
+ {ok, _} = dbg:tp(?MODULE, dummy, []),
+ ?MODULE:dummy(),
+ receive {'DOWN', MRef, _, _, normal} -> ok end,
+ [{trace,_,call,{?MODULE, dummy,[]}},
+ {trace,_,call,{?MODULE, dummy,[]}}] = flush(),
+ ok.
+
+spawn_once_handler(Event, {Pid, done} = State) ->
+ Pid ! Event,
+ State;
+spawn_once_handler(Event, {Pid, Fun}) ->
+ {_, Ref} = spawn_monitor(Fun),
+ receive
+ {'DOWN', Ref, _, _, _} ->
+ Pid ! Event,
+ {Pid, done}
+ end.
%%
%% Support functions
diff --git a/lib/runtime_tools/test/runtime_tools_SUITE.erl b/lib/runtime_tools/test/runtime_tools_SUITE.erl
index 62497ab527..48ed810918 100644
--- a/lib/runtime_tools/test/runtime_tools_SUITE.erl
+++ b/lib/runtime_tools/test/runtime_tools_SUITE.erl
@@ -25,7 +25,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
--export([app_file/1, start_stop_app/1]).
+-export([app_file/1, appup_file/1, start_stop_app/1]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
@@ -43,6 +43,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app_file,
+ appup_file,
start_stop_app].
groups() ->
@@ -65,6 +66,9 @@ app_file(_Config) ->
?line ok = ?t:app_test(runtime_tools),
ok.
+appup_file(_Config) ->
+ ok = ?t:appup_test(runtime_tools).
+
start_stop_app(_Config) ->
ok = application:start(runtime_tools),
Sup = whereis(runtime_tools_sup),
diff --git a/lib/runtime_tools/test/system_information_SUITE.erl b/lib/runtime_tools/test/system_information_SUITE.erl
index fb9455a30f..53d20060e7 100644
--- a/lib/runtime_tools/test/system_information_SUITE.erl
+++ b/lib/runtime_tools/test/system_information_SUITE.erl
@@ -33,6 +33,7 @@
api_report/1,
api_to_file/1,
api_from_file/1,
+ sanity_check/1,
%% server
api_start_stop/1,
validate_server_interface/1
@@ -84,7 +85,8 @@ all() -> [
api_to_file,
api_from_file,
api_start_stop,
- validate_server_interface
+ validate_server_interface,
+ sanity_check
].
@@ -262,6 +264,9 @@ validate_server_interface(Config) ->
ok = system_information:stop(),
ok.
+sanity_check(Config) when is_list(Config) ->
+ ok = system_information:sanity_check().
+
%% aux
@@ -288,7 +293,8 @@ validate_report(Report) ->
erts_compile_info,
beam_dynamic_libraries,
environment_erts,
- environment
+ environment,
+ sanity_check
], Report).
ensure_report_keys([], _) -> ok;
diff --git a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
index 0900eadd4a..bdc510e838 100644
--- a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
+++ b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
@@ -9720,6 +9720,7 @@
{logical_processors_online,4},
{logical_processors_available,4},
{driver_version,"2.1"},
+ {nif_version,"1.1"},
{taints,[]}]},
{erts_compile_info,
[{ldflags,[]},
@@ -9870,4 +9871,5 @@
{"MANPATH",
"/usr/local/man:/usr/share/man:/usr/X11R6/man:/opt/gnome/share/man"},
{"LESSKEY","/etc/lesskey.bin"},
- {"LC_PAPER","sv_SE.UTF-8"}]}]}.
+ {"LC_PAPER","sv_SE.UTF-8"}]},
+ {sanity_check,ok}]}.
diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk
index c282661a61..e9f43df1aa 100644
--- a/lib/runtime_tools/vsn.mk
+++ b/lib/runtime_tools/vsn.mk
@@ -1 +1 @@
-RUNTIME_TOOLS_VSN = 1.8.13
+RUNTIME_TOOLS_VSN = 1.8.16
diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml
index 87be6d2a9e..e4def7c7f5 100644
--- a/lib/sasl/doc/src/alarm_handler.xml
+++ b/lib/sasl/doc/src/alarm_handler.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -87,7 +87,9 @@
<v>AlarmId = term()</v>
</type>
<desc>
- <p>Clears all alarms with id <c>AlarmId</c>.
+ <p>Sends the <c>clear_alarm</c> event to all event handlers.</p>
+ <p>When receiving this event, the default simple handler
+ clears the latest received alarm with id <c>AlarmId</c>.
</p>
</desc>
</func>
@@ -109,8 +111,10 @@
<v>AlarmDescription = term()</v>
</type>
<desc>
- <p>Sets an alarm with id <c>AlarmId</c>. This id is used at a
- later stage when the alarm is cleared.
+ <p>Sends the <c>set_alarm</c> event to all event handlers.</p>
+ <p>When receiving this event, the default simple handler
+ stores the alarm. The <c>AlarmId</c> identifies the alarm
+ and is used when the alarm is cleared.
</p>
</desc>
</func>
diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml
index bacfaa76ef..95f315d269 100644
--- a/lib/sasl/doc/src/appup.xml
+++ b/lib/sasl/doc/src/appup.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -84,6 +84,9 @@
version identifier must be specified as a binary, e.g.</p>
<code type="none">&lt;&lt;"2\\.1\\.[0-9]+">></code>
<p>will match all versions <c>2.1.x</c>, where x is any number.</p>
+ <p>Note that the regular expression must match the complete
+ version string, so the above example will work for for
+ e.g. <c>2.1.1</c>, but not for <c>2.1.1.1</c></p>
</section>
<section>
@@ -339,7 +342,7 @@ restart_new_emulator
version of erts, kernel, stdlib and sasl are used when the
emulator restarts. Only one <c>restart_new_emulator</c>
instruction is allowed in the relup, and it shall be placed
- first. <seealso marker="systools#make_relup/3">systools:make_relup3,4</seealso>
+ first. <seealso marker="systools#make_relup/3">systools:make_relup/3,4</seealso>
will ensure this when the relup is generated. The rest of the
relup script is executed after the restart as a part of the boot
script.</p>
@@ -347,11 +350,25 @@ restart_new_emulator
completed. To programatically find out if the upgrade is
complete,
call <seealso marker="release_handler#which_releases/0">
- release_handler:which_releases</seealso> and check if the
+ release_handler:which_releases/0,1</seealso> and check if the
expected release has status <c>current</c>.</p>
<p>The new release must still be made permanent after the upgrade
is completed. Otherwise, the old emulator is started in case of
an emulator restart.</p>
+ <warning>
+ <p>As stated above, the <c>restart_new_emulator</c>
+ instruction causes the emulator to be restarted with new
+ versions of <c>erts</c>, <c>kernel</c>, <c>stdlib</c> and
+ <c>sasl</c>. All other applications, however, will at startup
+ be running their old versions in this new emulator. In most
+ cases this is no problem, but every now and then there will be
+ incompatible changes to the core applications which may cause
+ trouble in this setting. Such incompatible changes (when
+ functions are removed) are normally preceded by a deprecation
+ over two major releases. To make sure your application is not
+ crashed by an incompatible change, always remove any call to
+ deprecated functions as soon as possible.</p>
+ </warning>
<pre>
restart_emulator
</pre>
diff --git a/lib/sasl/doc/src/book.xml b/lib/sasl/doc/src/book.xml
index de6a533636..30f196be48 100644
--- a/lib/sasl/doc/src/book.xml
+++ b/lib/sasl/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/error_logging.xml b/lib/sasl/doc/src/error_logging.xml
index f624fed1c7..4d799d52f5 100644
--- a/lib/sasl/doc/src/error_logging.xml
+++ b/lib/sasl/doc/src/error_logging.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/fascicules.xml b/lib/sasl/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/sasl/doc/src/fascicules.xml
+++ b/lib/sasl/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml
index 48853b2372..95d7c6fa50 100644
--- a/lib/sasl/doc/src/notes.xml
+++ b/lib/sasl/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -30,6 +30,84 @@
</header>
<p>This document describes the changes made to the SASL application.</p>
+<section><title>SASL 2.4.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The documentation erroneously specified that
+ <c>alarm_handler:clear_alarm/1</c> would clear
+ <em>all</em> alarms with id <c>AlarmId</c>. This is now
+ corrected according to the implementation - only the
+ latest received alarm with the given <c>AlarmId</c> is
+ cleared by the simple default handler.</p>
+ <p>
+ Own Id: OTP-12025</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SASL 2.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The upgrade instruction 'restart_application' would
+ earlier ignore the restart type configured in the .rel
+ file and always restart the application as permanent.
+ This is now changed, and the restart type from the .rel
+ file is used. If restart type is 'load', the application
+ will only be loaded and not started. If the restart type
+ is 'none', the application will not be loaded nor
+ started, but all modules in the application will be
+ loaded. (Thanks to Tobias Schlager for reporting this
+ problem)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11716</p>
+ </item>
+ <item>
+ <p>
+ If <c>systools:make_script/2</c> failed with reason
+ <c>duplicate_modules</c>, and the <c>silent</c> flag was
+ not used, a crash with reason <c>function_clause</c>
+ would occur when <c>systools</c> tried to format the
+ error message. This has been corrected. (Thanks to
+ Jean-Sébastien Pédron)</p>
+ <p>
+ Own Id: OTP-11819</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ <item>
+ <p>
+ Some more documentation is added to explain the behavior
+ when an upgrade includes new versions of ERTS, Kernel,
+ STDLIB or SASL.</p>
+ <p>
+ Own Id: OTP-11717</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>SASL 2.3.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/sasl/doc/src/notes_history.xml b/lib/sasl/doc/src/notes_history.xml
index 50772ae4e3..3607d9204c 100644
--- a/lib/sasl/doc/src/notes_history.xml
+++ b/lib/sasl/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/overload.xml b/lib/sasl/doc/src/overload.xml
index 80457e75fa..3a82432647 100644
--- a/lib/sasl/doc/src/overload.xml
+++ b/lib/sasl/doc/src/overload.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/part.xml b/lib/sasl/doc/src/part.xml
index 647380efbd..99d5210278 100644
--- a/lib/sasl/doc/src/part.xml
+++ b/lib/sasl/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/part_notes.xml b/lib/sasl/doc/src/part_notes.xml
index 1f572ae922..6a1e2e9408 100644
--- a/lib/sasl/doc/src/part_notes.xml
+++ b/lib/sasl/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/part_notes_history.xml b/lib/sasl/doc/src/part_notes_history.xml
index d8d48bfd46..53fc8a7fea 100644
--- a/lib/sasl/doc/src/part_notes_history.xml
+++ b/lib/sasl/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/rb.xml b/lib/sasl/doc/src/rb.xml
index b94914d8f9..fa85b4bcd9 100644
--- a/lib/sasl/doc/src/rb.xml
+++ b/lib/sasl/doc/src/rb.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/ref_man.xml b/lib/sasl/doc/src/ref_man.xml
index 09b745a705..fa13bf65c3 100644
--- a/lib/sasl/doc/src/ref_man.xml
+++ b/lib/sasl/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml
index 68ef90330f..82b54a767e 100644
--- a/lib/sasl/doc/src/rel.xml
+++ b/lib/sasl/doc/src/rel.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
<year>1997</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml
index e3438ede41..b8b9603bc0 100644
--- a/lib/sasl/doc/src/release_handler.xml
+++ b/lib/sasl/doc/src/release_handler.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml
index 7aba7e58ba..d7c1d6fbe4 100644
--- a/lib/sasl/doc/src/relup.xml
+++ b/lib/sasl/doc/src/relup.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index af9e73027f..9c3c80bd13 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/sasl_intro.xml b/lib/sasl/doc/src/sasl_intro.xml
index 535f25e044..f3d4632218 100644
--- a/lib/sasl/doc/src/sasl_intro.xml
+++ b/lib/sasl/doc/src/sasl_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml
index 17cc64f08e..3a85e64e7a 100644
--- a/lib/sasl/doc/src/script.xml
+++ b/lib/sasl/doc/src/script.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml
index 284047163e..e8076c6752 100644
--- a/lib/sasl/doc/src/systools.xml
+++ b/lib/sasl/doc/src/systools.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl
index ffc0fcf443..a0ae016791 100644
--- a/lib/sasl/examples/src/target_system.erl
+++ b/lib/sasl/examples/src/target_system.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,9 +34,9 @@ create(RelFileName,SystoolsOpts) ->
Dir = filename:dirname(RelFileName),
PlainRelFileName = filename:join(Dir,"plain"),
PlainRelFile = PlainRelFileName ++ ".rel",
- io:fwrite("Reading file: ~p ...~n", [RelFile]),
+ io:fwrite("Reading file: ~tp ...~n", [RelFile]),
{ok, [RelSpec]} = file:consult(RelFile),
- io:fwrite("Creating file: ~p from ~p ...~n",
+ io:fwrite("Creating file: ~tp from ~tp ...~n",
[PlainRelFile, RelFile]),
{release,
{RelName, RelVsn},
@@ -57,41 +57,41 @@ create(RelFileName,SystoolsOpts) ->
io:fwrite(Fd, "~p.~n", [PlainRelSpec]),
file:close(Fd),
- io:fwrite("Making \"~s.script\" and \"~s.boot\" files ...~n",
+ io:fwrite("Making \"~ts.script\" and \"~ts.boot\" files ...~n",
[PlainRelFileName,PlainRelFileName]),
make_script(PlainRelFileName,SystoolsOpts),
- io:fwrite("Making \"~s.script\" and \"~s.boot\" files ...~n",
+ io:fwrite("Making \"~ts.script\" and \"~ts.boot\" files ...~n",
[RelFileName, RelFileName]),
make_script(RelFileName,SystoolsOpts),
- TarFileName = filename:join(Dir,RelFileName ++ ".tar.gz"),
- io:fwrite("Creating tar file ~p ...~n", [TarFileName]),
+ TarFileName = RelFileName ++ ".tar.gz",
+ io:fwrite("Creating tar file ~tp ...~n", [TarFileName]),
make_tar(RelFileName,SystoolsOpts),
TmpDir = filename:join(Dir,"tmp"),
- io:fwrite("Creating directory ~p ...~n",[TmpDir]),
+ io:fwrite("Creating directory ~tp ...~n",[TmpDir]),
file:make_dir(TmpDir),
- io:fwrite("Extracting ~p into directory ~p ...~n", [TarFileName,TmpDir]),
+ io:fwrite("Extracting ~tp into directory ~tp ...~n", [TarFileName,TmpDir]),
extract_tar(TarFileName, TmpDir),
TmpBinDir = filename:join([TmpDir, "bin"]),
ErtsBinDir = filename:join([TmpDir, "erts-" ++ ErtsVsn, "bin"]),
- io:fwrite("Deleting \"erl\" and \"start\" in directory ~p ...~n",
+ io:fwrite("Deleting \"erl\" and \"start\" in directory ~tp ...~n",
[ErtsBinDir]),
file:delete(filename:join([ErtsBinDir, "erl"])),
file:delete(filename:join([ErtsBinDir, "start"])),
- io:fwrite("Creating temporary directory ~p ...~n", [TmpBinDir]),
+ io:fwrite("Creating temporary directory ~tp ...~n", [TmpBinDir]),
file:make_dir(TmpBinDir),
- io:fwrite("Copying file \"~s.boot\" to ~p ...~n",
+ io:fwrite("Copying file \"~ts.boot\" to ~tp ...~n",
[PlainRelFileName, filename:join([TmpBinDir, "start.boot"])]),
copy_file(PlainRelFileName++".boot",filename:join([TmpBinDir, "start.boot"])),
io:fwrite("Copying files \"epmd\", \"run_erl\" and \"to_erl\" from \n"
- "~p to ~p ...~n",
+ "~tp to ~tp ...~n",
[ErtsBinDir, TmpBinDir]),
copy_file(filename:join([ErtsBinDir, "epmd"]),
filename:join([TmpBinDir, "epmd"]), [preserve]),
@@ -100,12 +100,18 @@ create(RelFileName,SystoolsOpts) ->
copy_file(filename:join([ErtsBinDir, "to_erl"]),
filename:join([TmpBinDir, "to_erl"]), [preserve]),
+ %% This is needed if 'start' script created from 'start.src' shall
+ %% be used as it points out this directory as log dir for 'run_erl'
+ TmpLogDir = filename:join([TmpDir, "log"]),
+ io:fwrite("Creating temporary directory ~tp ...~n", [TmpLogDir]),
+ ok = file:make_dir(TmpLogDir),
+
StartErlDataFile = filename:join([TmpDir, "releases", "start_erl.data"]),
- io:fwrite("Creating ~p ...~n", [StartErlDataFile]),
+ io:fwrite("Creating ~tp ...~n", [StartErlDataFile]),
StartErlData = io_lib:fwrite("~s ~s~n", [ErtsVsn, RelVsn]),
write_file(StartErlDataFile, StartErlData),
- io:fwrite("Recreating tar file ~p from contents in directory ~p ...~n",
+ io:fwrite("Recreating tar file ~tp from contents in directory ~tp ...~n",
[TarFileName,TmpDir]),
{ok, Tar} = erl_tar:open(TarFileName, [write, compressed]),
%% {ok, Cwd} = file:get_cwd(),
@@ -115,16 +121,17 @@ create(RelFileName,SystoolsOpts) ->
erl_tar:add(Tar, filename:join(TmpDir,ErtsDir), ErtsDir, []),
erl_tar:add(Tar, filename:join(TmpDir,"releases"), "releases", []),
erl_tar:add(Tar, filename:join(TmpDir,"lib"), "lib", []),
+ erl_tar:add(Tar, filename:join(TmpDir,"log"), "log", []),
erl_tar:close(Tar),
%% file:set_cwd(Cwd),
- io:fwrite("Removing directory ~p ...~n",[TmpDir]),
+ io:fwrite("Removing directory ~tp ...~n",[TmpDir]),
remove_dir_tree(TmpDir),
ok.
install(RelFileName, RootDir) ->
TarFile = RelFileName ++ ".tar.gz",
- io:fwrite("Extracting ~p ...~n", [TarFile]),
+ io:fwrite("Extracting ~tp ...~n", [TarFile]),
extract_tar(TarFile, RootDir),
StartErlDataFile = filename:join([RootDir, "releases", "start_erl.data"]),
{ok, StartErlData} = read_txt_file(StartErlDataFile),
@@ -136,6 +143,11 @@ install(RelFileName, RootDir) ->
subst_src_scripts(["erl", "start", "start_erl"], ErtsBinDir, BinDir,
[{"FINAL_ROOTDIR", RootDir}, {"EMU", "beam"}],
[preserve]),
+ %%! Workaround for pre OTP 17.0: start.src and start_erl.src did
+ %%! not have correct permissions, so the above 'preserve' option did not help
+ ok = file:change_mode(filename:join(BinDir,"start"),8#0755),
+ ok = file:change_mode(filename:join(BinDir,"start_erl"),8#0755),
+
io:fwrite("Creating the RELEASES file ...\n"),
create_RELEASES(RootDir, filename:join([RootDir, "releases",
filename:basename(RelFileName)])).
@@ -235,8 +247,9 @@ copy_file(Src, Dest, Opts) ->
end.
write_file(FName, Conts) ->
+ Enc = file:native_name_encoding(),
{ok, Fd} = file:open(FName, [write]),
- file:write(Fd, Conts),
+ file:write(Fd, unicode:characters_to_binary(Conts,Enc,Enc)),
file:close(Fd).
read_txt_file(File) ->
diff --git a/lib/sasl/src/erlsrv.erl b/lib/sasl/src/erlsrv.erl
index 086dc7c651..0d931f1779 100644
--- a/lib/sasl/src/erlsrv.erl
+++ b/lib/sasl/src/erlsrv.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@ current_version() ->
run_erlsrv(Command) ->
run_erlsrv(current_version(),Command).
run_erlsrv(EVer, Command) ->
- case catch(open_port({spawn, erlsrv(EVer) ++ " " ++ Command},
+ case catch(open_port({spawn, "\"" ++ erlsrv(EVer) ++ "\" " ++ Command},
[{line,1000}, in, eof])) of
{'EXIT',{Reason,_}} ->
{port_error, Reason};
@@ -53,7 +53,7 @@ run_erlsrv(EVer, Command) ->
end.
run_erlsrv_interactive(EVer, Commands) ->
- case catch(open_port({spawn, erlsrv(EVer) ++ " readargs"},
+ case catch(open_port({spawn, "\""++ erlsrv(EVer) ++ "\" readargs"},
[{line,1000}, eof])) of
{'EXIT',{Reason,_}} ->
{port_error, Reason};
@@ -71,11 +71,14 @@ write_all_data(Port,[]) ->
Port ! {self(), {command, io_lib:nl()}},
ok;
write_all_data(Port,[H|T]) ->
- Port ! {self(), {command, H ++ io_lib:nl()}},
+ Port ! {self(), {command, unicode:characters_to_binary([H,io_lib:nl()])}},
write_all_data(Port,T).
read_all_data(Port) ->
- lists:reverse(read_all_data(Port,[],[])).
+ Data0 = lists:reverse(read_all_data(Port,[],[])),
+ %% Convert from utf8 to a list of chars
+ [unicode:characters_to_list(list_to_binary(Data)) || Data <- Data0].
+
read_all_data(Port,Line,Lines) ->
receive
{Port, {data, {noeol,Data}}} ->
@@ -178,7 +181,7 @@ get_service(EVer, ServiceName) ->
[]
end
end,
- %%% First split by Env:
+ %%% First split by Env:
{Before, After} = split_by_env(Data),
FirstPass = lists:flatten(lists:map(F,Before)),
%%% If the arguments are there, split them to
diff --git a/lib/sasl/src/format_lib_supp.erl b/lib/sasl/src/format_lib_supp.erl
index af15fd3288..5348bc6d59 100644
--- a/lib/sasl/src/format_lib_supp.erl
+++ b/lib/sasl/src/format_lib_supp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -77,7 +77,7 @@ print_format(Device, Line, [{data, Data}|T]) ->
print_data(Device, Line, Data),
print_format(Device, Line, T);
print_format(Device, Line, [{table, Table}|T]) ->
- print_table(Device, Line, Table),
+ _ = print_table(Device, Line, Table),
print_format(Device, Line, T);
print_format(Device, Line, [{items, Items}|T]) ->
print_items(Device, Line, Items),
diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl
index 97f7bebe00..736423484a 100644
--- a/lib/sasl/src/overload.erl
+++ b/lib/sasl/src/overload.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl
index 767932e659..65011af568 100644
--- a/lib/sasl/src/rb.erl
+++ b/lib/sasl/src/rb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -329,11 +329,11 @@ scan_files(RptDir, Max, Type) ->
{ok, Fd} ->
case catch file:read(Fd, 1) of
{ok, [LastWritten]} ->
- file:close(Fd),
+ ok = file:close(Fd),
Files = make_file_list(RptDir, LastWritten),
scan_files(RptDir, Files, Max, Type);
_X ->
- file:close(Fd),
+ _ = file:close(Fd),
exit("cannot read the index file")
end;
_X -> exit("cannot read the index file")
@@ -406,7 +406,7 @@ read_reports(No, Fd, Fname, Max, Type) ->
io:format("rb: reading report..."),
case catch read_reports(Fd, [], Type) of
{ok, Res} ->
- file:close(Fd),
+ ok = file:close(Fd),
io:format("done.~n"),
NewRes =
if
@@ -417,7 +417,7 @@ read_reports(No, Fd, Fname, Max, Type) ->
end,
add_report_data(NewRes, No, Fname);
{error, [Problem | Res]} ->
- file:close(Fd),
+ _ = file:close(Fd),
io:format("Error: ~p~n",[Problem]),
io:format("Salvaged ~p entries from corrupt report file ~s...~n",
[length(Res),Fname]),
@@ -918,7 +918,7 @@ handle_bad_form(Date, Msg, Device, Abort, Log) ->
end.
read_rep_msg(Fd, FilePosition) ->
- file:position(Fd, {bof, FilePosition}),
+ {ok,_} = file:position(Fd, {bof, FilePosition}),
Res =
case catch read_report(Fd) of
{ok, Report} ->
@@ -926,5 +926,5 @@ read_rep_msg(Fd, FilePosition) ->
{Date, Report};
_ -> error
end,
- file:close(Fd),
+ ok = file:close(Fd),
Res.
diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl
index a5a234cbc0..ccd84f0c37 100644
--- a/lib/sasl/src/release_handler.erl
+++ b/lib/sasl/src/release_handler.erl
@@ -585,11 +585,9 @@ init([]) ->
handle_call({unpack_release, ReleaseName}, _From, S)
when S#state.masters == false ->
- RelDir = S#state.rel_dir,
- case catch do_unpack_release(S#state.root, RelDir,
+ case catch do_unpack_release(S#state.root, S#state.rel_dir,
ReleaseName, S#state.releases) of
{ok, NewReleases, Vsn} ->
- clean_release(RelDir, ReleaseName),
{reply, {ok, Vsn}, S#state{releases = NewReleases}};
{error, Reason} ->
{reply, {error, Reason}, S};
@@ -739,7 +737,7 @@ mk_lib_name([]) -> [].
handle_info(timeout, S) ->
case soft_purge(S#state.unpurged) of
[] ->
- timer:cancel(S#state.timer),
+ _ = timer:cancel(S#state.timer),
{noreply, S#state{unpurged = [], timer = undefined}};
Unpurged ->
{noreply, S#state{unpurged = Unpurged}}
@@ -850,15 +848,11 @@ do_unpack_release(Root, RelDir, ReleaseName, Releases) ->
Dir = filename:join([RelDir, Vsn]),
copy_file(RelFile, Dir, false),
- {ok, NewReleases, Vsn}.
+ %% Clean release
+ _ = file:delete(Tar),
+ _ = file:delete(RelFile),
-%% Note that this function is not executed by a client
-%% release_handler.
-clean_release(RelDir, ReleaseName) ->
- Tar = filename:join(RelDir, ReleaseName ++ ".tar.gz"),
- Rel = filename:join(RelDir, ReleaseName ++ ".rel"),
- file:delete(Tar),
- file:delete(Rel).
+ {ok, NewReleases, Vsn}.
check_rel(Root, RelFile, Masters) ->
check_rel(Root, RelFile, [], Masters).
@@ -1184,7 +1178,8 @@ rename_tmp_service(EVsn,TmpVsn,NewVsn) ->
{error, _Error} ->
ok;
_Data ->
- erlsrv:remove_service(ToName)
+ {ok,_} = erlsrv:remove_service(ToName),
+ ok
end,
rename_service(EVsn,FromName,ToName).
@@ -1237,13 +1232,12 @@ do_make_services_permanent(PermanentVsn,Vsn, PermanentEVsn, EVsn) ->
UpdData = erlsrv:new_service(Name, Data, []),
case erlsrv:store_service(EVsn,UpdData) of
ok ->
- erlsrv:disable_service(PermanentEVsn, PermName),
- erlsrv:enable_service(EVsn, Name),
- erlsrv:remove_service(PermName),
+ {ok,_} = erlsrv:disable_service(PermanentEVsn, PermName),
+ {ok,_} = erlsrv:enable_service(EVsn, Name),
+ {ok,_} = erlsrv:remove_service(PermName),
%%% Read comments about these above...
os:putenv("ERLSRV_SERVICE_NAME", Name),
- heart:cycle(),
- ok;
+ ok = heart:cycle();
Error4 ->
throw(Error4)
end
@@ -1288,7 +1282,7 @@ do_make_permanent(#state{releases = Releases,
_ ->
ok
end,
- init:make_permanent(filename:join(Dir, "start"), Sys),
+ ok = init:make_permanent(filename:join(Dir, "start"), Sys),
{ok, NewReleases, brutal_purge(Unpurged)};
{value, #release{status = permanent}} ->
{ok, Releases, Unpurged};
@@ -1309,13 +1303,13 @@ do_back_service(OldVersion, CurrentVersion,OldEVsn,CurrentEVsn) ->
Data ->
erlsrv:new_service(OldName, Data, [])
end,
- case erlsrv:store_service(OldEVsn,UpdData) of
- ok ->
- erlsrv:disable_service(CurrentEVsn,CurrentName),
- erlsrv:enable_service(OldEVsn,OldName);
- Error2 ->
- throw(Error2)
- end,
+ _ = case erlsrv:store_service(OldEVsn,UpdData) of
+ ok ->
+ {ok,_} = erlsrv:disable_service(CurrentEVsn,CurrentName),
+ {ok,_} = erlsrv:enable_service(OldEVsn,OldName);
+ Error2 ->
+ throw(Error2)
+ end,
OldErlSrv = filename:nativename(erlsrv:erlsrv(OldEVsn)),
CurrentErlSrv = filename:nativename(erlsrv:erlsrv(CurrentEVsn)),
case heart:set_cmd(CurrentErlSrv ++ " remove " ++ CurrentName ++
@@ -1386,10 +1380,18 @@ set_permanent_files(RelDir, _EVsn, Vsn, Masters, _Static) ->
do_remove_service(Vsn) ->
- %%% Very unconditionally remove the service.
+ %% Very unconditionally remove the service.
+ %% Note that the service could already have been removed when
+ %% making another release permanent.
ServiceName = hd(string:tokens(atom_to_list(node()),"@"))
++ "_" ++ Vsn,
- erlsrv:remove_service(ServiceName).
+ case erlsrv:get_service(ServiceName) of
+ {error, _Error} ->
+ ok;
+ _Data ->
+ {ok,_} = erlsrv:remove_service(ServiceName),
+ ok
+ end.
do_remove_release(Root, RelDir, Vsn, Releases) ->
% Decide which libs should be removed
@@ -1603,8 +1605,7 @@ do_write_file(File, Str, FileOpts) ->
case file:open(File, [write | FileOpts]) of
{ok, Fd} ->
io:put_chars(Fd, Str),
- file:close(Fd),
- ok;
+ ok = file:close(Fd);
{error, Reason} ->
{error, {Reason, File}}
end.
@@ -1651,9 +1652,9 @@ get_appls([], Res) ->
mon_nodes(true) ->
- net_kernel:monitor_nodes(true);
+ ok = net_kernel:monitor_nodes(true);
mon_nodes(false) ->
- net_kernel:monitor_nodes(false),
+ ok = net_kernel:monitor_nodes(false),
flush().
flush() ->
@@ -1691,7 +1692,7 @@ prepare_restart_nt(#release{erts_vsn = EVsn, vsn = Vsn},
{error, _} = Error2 ->
throw(Error2);
_X ->
- erlsrv:disable_service(EVsn, FutureServiceName),
+ {ok,_} = erlsrv:disable_service(EVsn, FutureServiceName),
ErlSrv = filename:nativename(erlsrv:erlsrv(EVsn)),
StartDisabled = ErlSrv ++ " start_disabled " ++ FutureServiceName,
case heart:set_cmd(StartDisabled) of
@@ -1877,8 +1878,7 @@ do_write_release(Dir, RELEASES, NewReleases) ->
case file:open(filename:join(Dir, RELEASES), [write]) of
{ok, Fd} ->
ok = io:format(Fd, "~p.~n", [NewReleases]),
- file:close(Fd),
- ok;
+ ok = file:close(Fd);
{error, Reason} ->
{error, Reason}
end.
@@ -2010,7 +2010,7 @@ do_rename_files([]) ->
%% Remove a list of files. Ignore failure.
%%-----------------------------------------------------------------
do_remove_files([File|Files]) ->
- file:delete(File),
+ _ = file:delete(File),
do_remove_files(Files);
do_remove_files([]) ->
ok.
@@ -2030,7 +2030,8 @@ do_ensure_RELEASES(RelFile) ->
%% Make a directory, ignore failures (captured later).
%%-----------------------------------------------------------------
make_dir(Dir, false) ->
- file:make_dir(Dir);
+ _ = file:make_dir(Dir),
+ ok;
make_dir(Dir, Masters) ->
lists:foreach(fun(Master) -> rpc:call(Master, file, make_dir, [Dir]) end,
Masters).
@@ -2062,12 +2063,12 @@ at_all_masters([], _, _, _) ->
%% Ignore {M,F,A} return value.
%%-----------------------------------------------------------------
takewhile(Master, Masters, M, F, A) ->
- lists:takewhile(fun(Ma) when Ma == Master ->
- false;
- (Ma) ->
- rpc:call(Ma, M, F, A),
- true
- end, Masters),
+ _ = lists:takewhile(fun(Ma) when Ma == Master ->
+ false;
+ (Ma) ->
+ rpc:call(Ma, M, F, A),
+ true
+ end, Masters),
ok.
consult(File, false) -> file:consult(File);
@@ -2205,23 +2206,23 @@ set_static_files(SrcDir, DestDir, Masters) ->
write_ini_file(RootDir,EVsn,Masters) ->
BinDir = filename:join([RootDir,"erts-"++EVsn,"bin"]),
Str0 = io_lib:format("[erlang]~n"
- "Bindir=~s~n"
+ "Bindir=~ts~n"
"Progname=erl~n"
- "Rootdir=~s~n",
+ "Rootdir=~ts~n",
[filename:nativename(BinDir),
filename:nativename(RootDir)]),
- Str = re:replace(Str0,"\\\\","\\\\\\\\",[{return,list},global]),
+ Str = re:replace(Str0,"\\\\","\\\\\\\\",[{return,list},global,unicode]),
IniFile = filename:join(BinDir,"erl.ini"),
do_write_ini_file(IniFile,Str,Masters).
do_write_ini_file(File,Data,false) ->
- case do_write_file(File, Data) of
+ case do_write_file(File, Data, [{encoding,utf8}]) of
ok -> ok;
Error -> throw(Error)
end;
do_write_ini_file(File,Data,Masters) ->
all_masters(Masters),
- safe_write_file_m(File, Data, Masters).
+ safe_write_file_m(File, Data, [{encoding,utf8}], Masters).
%%-----------------------------------------------------------------
@@ -2235,13 +2236,15 @@ do_write_ini_file(File,Data,Masters) ->
%% (as long as possible), except for 4 which is allowed to fail.
%%-----------------------------------------------------------------
safe_write_file_m(File, Data, Masters) ->
+ safe_write_file_m(File, Data, [], Masters).
+safe_write_file_m(File, Data, FileOpts, Masters) ->
Backup = File ++ ".backup",
Change = File ++ ".change",
case at_all_masters(Masters, ?MODULE, do_copy_files,
[File, [Backup]]) of
ok ->
case at_all_masters(Masters, ?MODULE, do_write_file,
- [Change, Data]) of
+ [Change, Data, FileOpts]) of
ok ->
case at_all_masters(Masters, file, rename,
[Change, File]) of
diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl
index b37ae2f944..fa6ef77b2d 100644
--- a/lib/sasl/src/release_handler_1.erl
+++ b/lib/sasl/src/release_handler_1.erl
@@ -349,7 +349,7 @@ eval({load, {Mod, _PrePurgeMethod, PostPurgeMethod}}, EvalState) ->
{value, {_Mod, Bin, File}} = lists:keysearch(Mod, 1, Bins),
% load_binary kills all procs running old code
% if soft_purge, we know that there are no such procs now
- code:load_binary(Mod, File, Bin),
+ {module,_} = code:load_binary(Mod, File, Bin),
% Now, the prev current is old. There might be procs
% running it. Find them.
Unpurged = do_soft_purge(Mod,PostPurgeMethod,EvalState#eval_state.unpurged),
diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src
index 8c814cfaf5..8e95197a2a 100644
--- a/lib/sasl/src/sasl.app.src
+++ b/lib/sasl/src/sasl.app.src
@@ -44,5 +44,7 @@
{applications, [kernel, stdlib]},
{env, [{sasl_error_logger, tty},
{errlog_type, all}]},
- {mod, {sasl, []}}]}.
+ {mod, {sasl, []}},
+ {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src
index a4a38ee40a..e789853eea 100644
--- a/lib/sasl/src/sasl.appup.src
+++ b/lib/sasl/src/sasl.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,14 +16,10 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
- [{<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.1\\.10(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R14B04
- {<<"2\\.1\\.9\\.[24](\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14B-R14B03
- %% Down to - max two major revisions back
- [{<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"2\\.1\\.10(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R14B04
- {<<"2\\.1\\.9\\.[24](\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14B-R14B03
+ %% Up from - max one major revision back
+ [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R16
+ %% Down to - max one major revision back
+ [{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
+ {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/sasl/src/sasl_report_file_h.erl b/lib/sasl/src/sasl_report_file_h.erl
index f4810d31cc..f42b4b5ff2 100644
--- a/lib/sasl/src/sasl_report_file_h.erl
+++ b/lib/sasl/src/sasl_report_file_h.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,7 +40,7 @@ init({File, Type}) ->
handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() ->
{ok, State};
handle_event(Event, {Fd, File, Type}) ->
- sasl_report:write_report(Fd, Type, tag_event(Event)),
+ _ = sasl_report:write_report(Fd, Type, tag_event(Event)),
{ok, {Fd, File, Type}};
handle_event(_, State) ->
{ok, State}.
@@ -53,7 +53,7 @@ handle_info(_, State) ->
handle_call(_Query, _State) -> {error, bad_query}.
terminate(_, {Fd, _File, _Type}) ->
- file:close(Fd),
+ _ = file:close(Fd),
[].
tag_event(Event) ->
diff --git a/lib/sasl/src/sasl_report_tty_h.erl b/lib/sasl/src/sasl_report_tty_h.erl
index 064f0471f2..8d63428aeb 100644
--- a/lib/sasl/src/sasl_report_tty_h.erl
+++ b/lib/sasl/src/sasl_report_tty_h.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,7 @@ init(Type) ->
handle_event({Type, GL, _Msg}, Type) when node(GL) /= node() ->
{ok, Type};
handle_event(Event, Type) ->
- sasl_report:write_report(standard_io, Type, tag_event(Event)),
+ _ = sasl_report:write_report(standard_io, Type, tag_event(Event)),
{ok, Type}.
handle_info(_, Type) -> {ok, Type}.
diff --git a/lib/sasl/src/si.erl b/lib/sasl/src/si.erl
index eeed7a9f55..e2f6d95e58 100644
--- a/lib/sasl/src/si.erl
+++ b/lib/sasl/src/si.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -135,7 +135,7 @@ pi_impl(Opt, XPid) ->
{status_info, Pid, {module, Module}, Data} ->
si_sasl_supp:do_best_printout(Opt, Pid, Module, Data);
{error, Reason} ->
- si_sasl_supp:ppi_impl(Pid),
+ _ = si_sasl_supp:ppi_impl(Pid),
{error, {"can not get status info from process:",
XPid,
Reason}};
diff --git a/lib/sasl/src/si_sasl_supp.erl b/lib/sasl/src/si_sasl_supp.erl
index c4fc0c5f08..12b2557cd6 100644
--- a/lib/sasl/src/si_sasl_supp.erl
+++ b/lib/sasl/src/si_sasl_supp.erl
@@ -162,7 +162,7 @@ handle_call(stop, _From, State) ->
{stop, normal, stopped, State}.
terminate(_Reason, _State) ->
- close_device(get(device)),
+ _ = close_device(get(device)),
ok.
handle_cast(_Msg, State) ->
@@ -190,7 +190,7 @@ open_log_file(undefined, NewFile) ->
open_log_file(standard_io, NewFile) ->
open_log_file(NewFile);
open_log_file(OldFile, NewFile) ->
- file:close(OldFile),
+ _ = file:close(OldFile),
open_log_file(NewFile).
open_log_file(standard_io) -> standard_io;
@@ -317,7 +317,7 @@ pi_impl(Opt, XPid) ->
{status_info, Pid, {module, Module}, Data} ->
do_best_printout(Opt, Pid, Module, Data);
{error, Reason} ->
- ppi_impl(Pid),
+ _ = ppi_impl(Pid),
{error, {"can not get status info from process:",
XPid,
Reason}}
@@ -335,7 +335,7 @@ do_best_printout(Opt, Pid, Mod, Data) when is_pid(Pid) ->
case print_info(get(device), Pid, {Mod, format_status}, Opt, Data) of
ok -> ok;
{error, Reason} ->
- ppi_impl(Pid),
+ _ = ppi_impl(Pid),
{error, Reason}
end.
diff --git a/lib/sasl/src/systools_lib.erl b/lib/sasl/src/systools_lib.erl
index 6618baa2aa..0a96f2bd48 100644
--- a/lib/sasl/src/systools_lib.erl
+++ b/lib/sasl/src/systools_lib.erl
@@ -34,8 +34,10 @@
file_term2binary(FileIn, FileOut) ->
case read_term(FileIn) of
{ok, Term} ->
- file:write_file(FileOut, term_to_binary(Term)),
- ok;
+ case file:write_file(FileOut, term_to_binary(Term)) of
+ ok -> ok;
+ {error,Error} -> {error,{open,FileOut,Error}}
+ end;
Other ->
Other
end.
@@ -51,8 +53,10 @@ read_term(File) ->
case file:open(File, [read]) of
{ok, Stream} ->
Res = read_term_from_stream(Stream, File),
- file:close(Stream),
- Res;
+ case file:close(Stream) of
+ ok -> Res;
+ {error,Error} -> {error,{close,File,Error}}
+ end;
{error, Error} ->
{error, {open,File,Error}}
end.
diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl
index bab88552f9..e5da797efb 100644
--- a/lib/sasl/src/systools_make.erl
+++ b/lib/sasl/src/systools_make.erl
@@ -406,9 +406,9 @@ check_rel(Release) ->
end.
check_rel1({release,{Name,Vsn},{erts,EVsn},Appl}) when is_list(Appl) ->
- check_name(Name),
- check_vsn(Vsn),
- check_evsn(EVsn),
+ Name = check_name(Name),
+ Vsn = check_vsn(Vsn),
+ EVsn = check_evsn(EVsn),
{{Appls,Incls},Ws} = check_appl(Appl),
{ok, {Name,Vsn,EVsn,Appls,Incls},Ws};
check_rel1(_) ->
@@ -974,7 +974,8 @@ check_xref(Appls, Path, XrefP) ->
ok;
{error, {already_started, _Pid}} ->
xref:stop(?XREF_SERVER), %% Clear out any previous data
- xref:start(?XREF_SERVER, XrefArgs)
+ {ok,_} = xref:start(?XREF_SERVER, XrefArgs),
+ ok
end,
{ok, _} = xref:set_default(?XREF_SERVER, verbose, false),
LibPath = case Path == code:get_path() of
@@ -1146,14 +1147,17 @@ generate_script(Output, Release, Appls, Flags) ->
{ok, Fd} ->
io:format(Fd, "%% script generated at ~w ~w\n~p.\n",
[date(), time(), Script]),
- file:close(Fd),
-
- BootFile = Output ++ ".boot",
- case file:write_file(BootFile, term_to_binary(Script)) of
+ case file:close(Fd) of
ok ->
- ok;
+ BootFile = Output ++ ".boot",
+ case file:write_file(BootFile, term_to_binary(Script)) of
+ ok ->
+ ok;
+ {error, Reason} ->
+ {error, ?MODULE, {open,BootFile,Reason}}
+ end;
{error, Reason} ->
- {error, ?MODULE, {open,BootFile,Reason}}
+ {error, ?MODULE, {close,ScriptFile,Reason}}
end;
{error, Reason} ->
{error, ?MODULE, {open,ScriptFile,Reason}}
@@ -1532,14 +1536,16 @@ mk_tar(RelName, Release, Appls, Flags, Path1) ->
Tar = open_main_tar(TarName),
case catch mk_tar(Tar, RelName, Release, Appls, Flags, Path1) of
{error,Error} ->
- del_tar(Tar, TarName),
+ _ = del_tar(Tar, TarName),
{error,?MODULE,Error};
{'EXIT',Reason} ->
- del_tar(Tar, TarName),
+ _ = del_tar(Tar, TarName),
{error,?MODULE,Reason};
_ ->
- close_tar(Tar),
- ok
+ case erl_tar:close(Tar) of
+ ok -> ok;
+ {error,Reason} -> {error,?MODULE,{close,TarName,Reason}}
+ end
end.
open_main_tar(TarName) ->
@@ -1594,14 +1600,13 @@ add_variable_tar({Variable,P}, Appls, Tar, Flags) ->
case catch add_applications(Appls, VarTar, [{Variable,P}],
Flags, Variable) of
ok when Flag == include ->
- close_tar(VarTar),
+ close_tar(VarTar,TarName),
add_to_tar(Tar, TarName, TarName),
del_file(TarName);
ok when Flag == ownfile ->
- close_tar(VarTar),
- ok;
+ close_tar(VarTar,TarName);
Error ->
- del_tar(VarTar, TarName),
+ _ = del_tar(VarTar, TarName),
throw(Error)
end
end.
@@ -1859,12 +1864,15 @@ open_tar(TarName) ->
throw({error,{tar_error, {open, TarName, Error}}})
end.
-close_tar(Tar) ->
- erl_tar:close(Tar).
+close_tar(Tar,File) ->
+ case erl_tar:close(Tar) of
+ ok -> ok;
+ {error,Reason} -> throw({error,{close,File,Reason}})
+ end.
del_tar(Tar, TarName) ->
- close_tar(Tar),
- del_file(TarName).
+ _ = erl_tar:close(Tar),
+ file:delete(TarName).
add_to_tar(Tar, FromFile, ToFile) ->
case erl_tar:add(Tar, FromFile, ToFile, [compressed, dereference]) of
@@ -1919,13 +1927,20 @@ read_file(File, Path) ->
Other ->
Other
end,
- file:close(Stream),
- Return;
+ case file:close(Stream) of
+ ok -> Return;
+ {error, Error} -> {error, {close,File,Error}}
+ end;
_Other ->
{error, {not_found, File}}
end.
-del_file(File) -> file:delete(File).
+del_file(File) ->
+ case file:delete(File) of
+ ok -> ok;
+ {error, Error} ->
+ throw({error, {delete, File, Error}})
+ end.
dirp(Dir) ->
case file:read_file_info(Dir) of
@@ -2218,7 +2233,7 @@ format_error({undefined_applications,Apps}) ->
io_lib:format("Undefined applications: ~p~n",[Apps]);
format_error({duplicate_modules,Dups}) ->
io_lib:format("Duplicated modules: ~n~ts",
- [map(fun({{Mod,_,App1,_,_},{Mod,_,App2,_,_}}) ->
+ [map(fun({{Mod,App1,_},{Mod,App2,_}}) ->
io_lib:format("\t~w specified in ~w and ~w~n",
[Mod,App1,App2])
end, Dups)]);
@@ -2244,6 +2259,12 @@ format_error({read,File}) ->
format_error({open,File,Error}) ->
io_lib:format("Cannot open ~p - ~ts~n",
[File,file:format_error(Error)]);
+format_error({close,File,Error}) ->
+ io_lib:format("Cannot close ~p - ~ts~n",
+ [File,file:format_error(Error)]);
+format_error({delete,File,Error}) ->
+ io_lib:format("Cannot delete ~p - ~ts~n",
+ [File,file:format_error(Error)]);
format_error({tar_error,What}) ->
form_tar_err(What);
format_error(ListOfErrors) when is_list(ListOfErrors) ->
diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl
index 54c327410d..76f753c3d0 100644
--- a/lib/sasl/src/systools_rc.erl
+++ b/lib/sasl/src/systools_rc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -365,14 +365,22 @@ translate_application_instrs(Script, Appls, PreAppls) ->
case lists:keysearch(Appl, #application.name, Appls) of
{value, PostApplication} ->
PostMods = PostApplication#application.modules,
+ Type = PostApplication#application.type,
+ Apply =
+ case Type of
+ none -> [];
+ load -> [{apply, {application, load,
+ [Appl]}}];
+ _ -> [{apply, {application, start,
+ [Appl, Type]}}]
+ end,
[{apply, {application, stop, [Appl]}}] ++
[{remove, {M, brutal_purge, brutal_purge}}
|| M <- PreMods] ++
[{purge, PreMods}] ++
[{add_module, M, []} || M <- PostMods] ++
- [{apply, {application, start,
- [Appl, permanent]}}];
+ Apply;
false ->
throw({error, {no_such_application, Appl}})
end;
diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl
index 716dc2b5ff..b3494542e5 100644
--- a/lib/sasl/src/systools_relup.erl
+++ b/lib/sasl/src/systools_relup.erl
@@ -523,7 +523,7 @@ to_list(X) when is_atom(X) -> atom_to_list(X);
to_list(X) when is_list(X) -> X.
-%% write_relup_file(Relup, Opts) -> {ok. Relup}
+%% write_relup_file(Relup, Opts) -> ok
%%
%% Writes a relup file.
%%
@@ -545,12 +545,17 @@ write_relup_file(Relup, Opts) ->
case file:open(Filename, [write]) of
{ok, Fd} ->
io:format(Fd, "~p.~n", [Relup]),
- file:close(Fd);
+ case file:close(Fd) of
+ ok -> ok;
+ {error,Reason} ->
+ throw({error, ?MODULE,
+ {file_problem, {"relup", {close,Reason}}}})
+ end;
{error, Reason} ->
- throw({error, ?MODULE, {file_problem, {"relup", Reason}}})
+ throw({error, ?MODULE,
+ {file_problem, {"relup", {open, Reason}}}})
end
- end,
- {ok, Relup}.
+ end.
add_code_path(Opts) ->
case get_opt(path, Opts) of
@@ -597,8 +602,6 @@ print_error({error, Mod, Error}) ->
print_error(Other) ->
io:format("Error: ~p~n", [Other]).
-format_error({file_problem, {"relup", _Posix}}) ->
- io_lib:format("Could not open file relup~n", []);
format_error({file_problem, {File, What}}) ->
io_lib:format("Could not ~w file ~ts~n", [get_reason(What), File]);
format_error({no_relup, File, App, Vsn}) ->
@@ -642,12 +645,14 @@ format_warning(Prefix, What) ->
get_reason({error, {open, _, _}}) -> open;
get_reason({error, {read, _, _}}) -> read;
get_reason({error, {parse, _, _}}) -> parse;
+get_reason({error, {close, _, _}}) -> close;
get_reason({error, {open, _}}) -> open;
get_reason({error, {read, _}}) -> read;
get_reason({error, {parse, _}}) -> parse;
get_reason({open, _}) -> open;
get_reason({read, _}) -> read;
get_reason({parse, _}) -> parse;
+get_reason({close, _}) -> close;
get_reason(open) -> open;
get_reason(read) -> read;
get_reason(parse) -> parse.
diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl
index 709269a73c..fa404c8b7b 100644
--- a/lib/sasl/test/installer.erl
+++ b/lib/sasl/test/installer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,8 +54,12 @@
-export([reg_proc/1]).
-export([registered_loop/1]).
--define(print(List), {rh_print, TestNode} ! {print, {?MODULE, ?LINE}, List}).
--define(print_line(Line,List), {rh_print, TestNode} ! {print, {?MODULE, Line}, List}).
+-define(print(List),
+ io:format(user,"(~w:~w) ~tp~n",[?MODULE,?LINE,List]),
+ {rh_print, TestNode} ! {print, {?MODULE, ?LINE}, List}).
+-define(print_line(Line,List),
+ io:format(user,"(~w:~w) ~tp~n",[?MODULE,Line,List]),
+ {rh_print, TestNode} ! {print, {?MODULE, Line}, List}).
-define(fail(Term), exit({?MODULE, ?LINE, Term})).
-define(fail_line(Line,Term), exit({?MODULE, Line, Term})).
@@ -905,10 +909,9 @@ start_client(TestNode,Client,Sname) ->
start_client_unix(TestNode,Sname,Node) ->
Start = filename:join(["clients", "type1", Node, "bin", "start"]),
- Cmd = lists:concat(["env NODENAME=",Sname," ",
- filename:join(code:root_dir(), Start)]),
+ Cmd = filename:join(code:root_dir(), Start),
?print([{start_client,Sname},Cmd]),
- Res = os:cmd(Cmd),
+ Res = rh_test_lib:cmd(Cmd,[],[{"NODENAME",atom_to_list(Sname)}]),
?print([{start_client,result},Res]).
start_client_win32(TestNode,Client,ClientSname) ->
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index d7369b0ecf..b7c5f34f58 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,8 @@ init_per_suite(Config) ->
application:start(sasl),
Config.
-end_per_suite(_Config) ->
+end_per_suite(Config) ->
+ clean_priv_dir(Config,true),
ok.
all() ->
@@ -50,7 +51,7 @@ unix_cases() ->
true -> [{group, release}];
false -> [no_run_erl]
end,
- [target_system] ++ RunErlCases ++ cases().
+ [target_system, target_system_unicode] ++ RunErlCases ++ cases().
win32_cases() ->
[{group,release} | cases()].
@@ -163,7 +164,6 @@ end_per_group(release, Config) ->
{win32,_} -> delete_all_services();
_ -> ok
end,
- clean_priv_dir(Config,true),
?t:timetrap_cancel(Dog),
Config;
end_per_group(_GroupName, Config) ->
@@ -667,6 +667,9 @@ release_handler_which_releases(Conf) ->
ok.
+release_handler_which_releases(cleanup,_Conf) ->
+ stop_node(node_name(release_handler_which_releases)).
+
%%-----------------------------------------------------------------
%% Ticket: OTP-2740
%% Slogan: vsn not numeric doesn't work so good in release_handling
@@ -1365,6 +1368,9 @@ upgrade_supervisor(Conf) when is_list(Conf) ->
ok.
+upgrade_supervisor(cleanup,_Condf) ->
+ stop_node(node_name(upgrade_supervisor)).
+
%% Check that if the supervisor fails, then the upgrade is rolled back
%% and an ok error message is returned
upgrade_supervisor_fail(Conf) when is_list(Conf) ->
@@ -1404,18 +1410,41 @@ upgrade_supervisor_fail(Conf) when is_list(Conf) ->
{error,{code_change_failed,_Pid,a_sup,_Vsn,
{error,{invalid_shutdown,brutal_kil}}}} =
- rpc:call(Node, release_handler, install_release, [RelVsn2]),
-
- %% Check that the upgrade is terminated - normally this would mean
- %% rollback, but since this testcase is very simplified the node
- %% is not started with heart supervision and will therefore not be
- %% restarted. So we just check that the node goes down.
+ rpc:call(Node, release_handler, install_release,
+ [RelVsn2, [{error_action,reboot}]]),
+
+ %% Check that the upgrade is terminated - normally this would be a
+ %% rollback, but
+ %%
+ %% 1. Default rollback is done with init:restart(), which does not
+ %% reboot the emulator, it only restarts the system inside the
+ %% running erlang node.
+ %%
+ %% 2. This does not work well on a slave node since, if timing is
+ %% right (bad), the slave node will get the nodedown from its
+ %% master (because distribution is terminated as part of
+ %% init:restart()) and then it will do halt() and thus never be
+ %% restarted (see slave:wloop/1)
+ %%
+ %% 3. Sometimes, though, init:restart() will manage to finish its
+ %% job before the nodedown is received, making the node
+ %% actually restart - in which case it might very well confuse
+ %% the next test case.
+ %%
+ %% 4. So, to avoid unstability we use {error_action,reboot} above,
+ %% to ensure that the node is actually stopped. Of course, in a
+ %% real system this must be used together with heart
+ %% supervision, and then the node will be restarted anyway. But
+ %% here in this simple test case we are satisfied to see that
+ %% the node terminates.
receive {nodedown,Node} -> ok
after 10000 -> ct:fail(failed_upgrade_never_restarted_node)
end,
ok.
+upgrade_supervisor_fail(cleanup,_Condf) ->
+ stop_node(node_name(upgrade_supervisor_fail)).
%% Test upgrade and downgrade of applications
eval_appup(Conf) when is_list(Conf) ->
@@ -1559,6 +1588,9 @@ eval_appup_with_restart(Conf) when is_list(Conf) ->
%% Test the example/target_system.erl module
target_system(Conf) when is_list(Conf) ->
PrivDir = priv_dir(Conf),
+ target_system1(Conf,PrivDir).
+
+target_system1(Conf,PrivDir) ->
DataDir = ?config(data_dir,Conf),
TargetCreateDir = filename:join([PrivDir,"target_system","create"]),
@@ -1567,7 +1599,6 @@ target_system(Conf) when is_list(Conf) ->
ok = filelib:ensure_dir(filename:join(TargetCreateDir,"xx")),
ok = filelib:ensure_dir(filename:join(TargetInstallDir,"xx")),
-
%% Create the .rel file
RelName = filename:join(TargetCreateDir,"ts-1.0"),
RelFile = RelName++".rel",
@@ -1607,7 +1638,8 @@ target_system(Conf) when is_list(Conf) ->
StdlibVsn = vsn(stdlib,current),
SaslVsn = vsn(sasl,current),
RelFileBasename = filename:basename(RelFile),
- true = filelib:is_dir(filename:join(LibDir,"kernel-"++KernelVsn)),
+ KernelLibDir = filename:join(LibDir,"kernel-"++KernelVsn),
+ true = filelib:is_dir(KernelLibDir),
true = filelib:is_dir(filename:join(LibDir,"stdlib-"++StdlibVsn)),
true = filelib:is_dir(filename:join(LibDir,"sasl-"++SaslVsn)),
true = filelib:is_dir(filename:join(LibDir,"a-1.0")),
@@ -1616,11 +1648,13 @@ target_system(Conf) when is_list(Conf) ->
true = filelib:is_regular(filename:join(RelDir,"start_erl.data")),
true = filelib:is_regular(filename:join(RelDir,RelFileBasename)),
true = filelib:is_dir(filename:join(RelDir,RelVsn)),
- true = filelib:is_regular(filename:join([RelDir,RelVsn,"start.boot"])),
+ StartBoot = filename:join([RelDir,RelVsn,"start.boot"]),
+ true = filelib:is_regular(StartBoot),
true = filelib:is_regular(filename:join([RelDir,RelVsn,RelFileBasename])),
BinDir = filename:join(TargetInstallDir,bin),
+ Erl = filename:join(BinDir,erl),
+ true = filelib:is_regular(Erl),
true = filelib:is_regular(filename:join(BinDir,"start.boot")),
- true = filelib:is_regular(filename:join(BinDir,erl)),
true = filelib:is_regular(filename:join(BinDir,start_erl)),
true = filelib:is_regular(filename:join(BinDir,start)),
true = filelib:is_regular(filename:join(BinDir,epmd)),
@@ -1631,9 +1665,75 @@ target_system(Conf) when is_list(Conf) ->
ErtsVsn = vsn(erts,current),
{ok,SED} = file:read_file(filename:join(RelDir,"start_erl.data")),
[ErtsVsn,RelVsn] = string:tokens(binary_to_list(SED),"\s\n"),
+
+ %% Check that installation can be started
+ Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system"),
+ {ok,Node} = start_target_node_with_erl(Erl,Sname,StartBoot),
+
+ TargetInstallDir = rpc:call(Node,code,root_dir,[]),
+ KernelLibDir = rpc:call(Node,code,lib_dir,[kernel]),
+ [{RelName,RelVsn,_Apps,permanent}] =
+ rpc:call(Node,release_handler,which_releases,[]),
+
+ ?t:format("Target node ok:~nRootDir: ~ts~nKernelLibDir: ~ts~nRelease: ~ts",
+ [TargetInstallDir,KernelLibDir,RelName]),
+
ok.
+target_system(cleanup,_Conf) ->
+ Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system"),
+ stop_target_node(node_name(Sname)),
+ ok.
+
+start_target_node_with_erl(Erl,Sname,Boot) ->
+ FullName = node_name(Sname),
+ FilenameMode = case file:native_name_encoding() of
+ latin1 -> "+fnl";
+ utf8 -> "+fnui"
+ end,
+ Args = [FilenameMode,"-detached", "-noinput","-sname",atom_to_list(Sname),
+ "-boot",filename:rootname(Boot)],
+ ?t:format("Starting node ~p: ~ts~n",
+ [FullName, lists:flatten([[X," "] || X <- [Erl|Args]])]),
+ case rh_test_lib:cmd(Erl,Args,[]) of
+ ok ->
+ ok = wait_nodes_up([FullName],"target_system test node"),
+ {ok,FullName};
+ Error ->
+ ?t:fail({failed_to_start_node, FullName, Error})
+ end.
+stop_target_node(Node) ->
+ monitor_node(Node, true),
+ _ = rpc:call(Node,erlang,halt,[]),
+ receive {nodedown, Node} -> ok end.
+
+%% Test that the example/target_system.erl module can create and
+%% install under a path which includes unicode characters
+target_system_unicode(Conf) when is_list(Conf) ->
+ PrivDir = priv_dir(Conf),
+ UnicodePrivDir = filename:join(PrivDir,"αβ"),
+
+ PA = filename:dirname(code:which(?MODULE)),
+
+ %% Make sure this runs on a node with unicode file name mode
+ Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system_unicode"),
+ {ok,Node} = ?t:start_node(Sname,peer,[{args,"+fnui -pa " ++ PA}]),
+ ok = rpc:call(Node,file,make_dir,[UnicodePrivDir]),
+ case rpc:call(Node,application,start,[sasl]) of
+ ok -> ok;
+ {error,{already_started,sasl}} -> ok;
+ Error -> ?t:fail({failed_to_start_sasl_on_test_node,Node,Error})
+ end,
+ ok = rpc:call(Node,?MODULE,target_system1,[Conf,UnicodePrivDir]),
+ ok.
+
+target_system_unicode(cleanup,Conf) ->
+ Sname = list_to_atom(atom_to_list(?MODULE) ++ "-target_system_unicode"),
+ Node = node_name(Sname),
+ _ = rpc:call(Node,?MODULE,target_system,[cleanup,Conf]),
+ _ = stop_node(Node),
+ ok.
%%%=================================================================
%%% Testing global groups.
@@ -1702,45 +1802,60 @@ upgrade_gg(cleanup,Config) ->
%%%-----------------------------------------------------------------
%%% OTP-10463, Bug - release_handler could not handle regexp in appup
%%% files.
-otp_10463_upgrade_script_regexp(_Config) ->
- %% Assuming that kernel always has a regexp in it's appup
- KernelVsn = vsn(kernel,current),
- {ok,KernelVsn,_} =
- release_handler:upgrade_script(kernel,code:lib_dir(kernel)),
+otp_10463_upgrade_script_regexp(Config) ->
+ DataDir = ?config(data_dir,Config),
+ code:add_path(filename:join([DataDir,regexp_appup,app1,ebin])),
+ application:start(app1),
+ {ok,"1.1",_} = release_handler:upgrade_script(app1,code:lib_dir(app1)),
+ ok.
+
+otp_10463_upgrade_script_regexp(cleanup,Config) ->
+ DataDir = ?config(data_dir,Config),
+ application:stop(app1),
+ code:del_path(filename:join([DataDir,regexp_appup,app1,ebin])),
ok.
no_dot_erlang(Conf) ->
- PrivDir = priv_dir(Conf),
+ PrivDir = ?config(data_dir,Conf),
{ok, OrigWd} = file:get_cwd(),
try
ok = file:set_cwd(PrivDir),
- Erl = filename:join([code:root_dir(),"bin","erl"]),
- Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt",
+ {ok, Wd} = file:get_cwd(),
+ io:format("Dir ~ts~n", [Wd]),
+
+ Erl0 = filename:join([code:root_dir(),"bin","erl"]),
+ Erl = filename:nativename(Erl0),
+ Quote = "\"",
+ Args = " -noinput -run c pwd -run erlang halt",
ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>),
- case os:cmd(Erl ++ Args) of
+ CMD1 = Quote ++ Erl ++ Quote ++ Args ,
+ case os:cmd(CMD1) of
"DOT_ERLANG_READ" ++ _ -> ok;
Other1 ->
- io:format("Failed: ~s~n",[Erl ++ Args]),
+ io:format("Failed: ~ts~n",[CMD1]),
io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]),
- io:format("Got: ~s~n",[Other1]),
- exit(failed_to_start, test_error)
+ io:format("Got: ~ts~n",[Other1]),
+ exit({failed_to_start, test_error})
end,
NO_DOT_ERL = " -boot no_dot_erlang",
- case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of
- "TESTOK" ++ _ -> ok;
- Other2 ->
- io:format("Failed: ~s~n",[Erl ++ Args]),
+ CMD2 = Quote ++ Erl ++ Quote ++ NO_DOT_ERL ++ Args,
+ case lists:prefix(Wd, Other2 = os:cmd(CMD2)) of
+ true -> ok;
+ false ->
+ io:format("Failed: ~ts~n",[CMD2]),
io:format("Expected: ~s~n",["TESTOK"]),
- io:format("Got: ~s~n",[Other2]),
- exit(failed_to_start, no_dot_erlang)
+ io:format("Got: ~ts~n",[Other2]),
+ exit({failed_to_start, no_dot_erlang})
end
after
_ = file:delete(".erlang"),
- ok = file:set_cwd(OrigWd)
+ ok = file:set_cwd(OrigWd),
+ ok
end.
+
%%%=================================================================
%%% Misceleaneous functions
%%%=================================================================
@@ -1883,7 +1998,7 @@ stop_node(Node) ->
copy_client(Conf,Master,Sname,Client) ->
- io:format("copy_client(Conf)"),
+ ?t:format("copy_client(Conf)"),
DataDir = ?config(data_dir, Conf),
MasterDir = filename:join(priv_dir(Conf),Master),
@@ -1922,82 +2037,12 @@ copy_client(Conf,Master,Sname,Client) ->
clean_priv_dir(Conf,Save) ->
PrivDir = priv_dir(Conf),
-
- {ok, OrigWd} = file:get_cwd(),
-
- ok = file:set_cwd(PrivDir),
- ?t:format("======== current dir ~p~n",[PrivDir]),
- {ok, Dirs} = file:list_dir(PrivDir),
- ?t:format("======== deleting ~p~n",[Dirs]),
-
- ok = clean_dirs_os(Dirs,Save),
- {ok,Remaining} = file:list_dir(PrivDir),
- ?t:format("======== remaining ~p~n",[Remaining]),
-
- case Remaining of
- [] ->
- ok;
- _ ->
- clean_dirs_os(Remaining,Save),
- Remaining2 = file:list_dir(PrivDir),
- ?t:format("======== remaining after second try ~p~n",[Remaining2])
- end,
-
- ok = file:set_cwd(OrigWd),
- ok.
-
-
-clean_dirs_os(Dirs,Save) ->
- case os:type() of
- {unix, _} ->
- clean_dirs_unix(Dirs,Save);
- {win32, _} ->
- clean_dirs_win32(Dirs,Save);
- Os ->
- test_server:fail({error, {not_yet_implemented_os, Os}})
+ rh_test_lib:clean_dir(PrivDir,Save),
+ case file:list_dir(PrivDir) of
+ {ok,[]} -> _ = file:del_dir(PrivDir);
+ _ -> ok
end.
-
-clean_dirs_unix([],_) ->
- ok;
-clean_dirs_unix(["save"|Dirs],Save) when Save ->
- clean_dirs_unix(Dirs,Save);
-clean_dirs_unix([Dir|Dirs],Save) ->
- Rm = string:concat("rm -rf ", Dir),
- ?t:format("============== COMMAND ~p~n",[Rm]),
- case file:list_dir(Dir) of
- {error, enotdir} ->
- ok;
- X ->
- ?t:format("------- Dir ~p~n ~p~n",[Dir, X])
- end,
- case os:cmd(Rm) of
- [] ->
- ?t:format("------- Result of COMMAND ~p~n",[ok]);
- Y ->
- ?t:format("!!!!!!! delete ERROR Dir ~p Error ~p~n",[Dir, Y]),
- ?t:format("------- ls -al ~p~n",[os:cmd("ls -al " ++ Dir)])
- end,
-
- clean_dirs_unix(Dirs,Save).
-
-clean_dirs_win32([],_) ->
- ok;
-clean_dirs_win32(["save"|Dirs],Save) when Save ->
- clean_dirs_win32(Dirs,Save);
-clean_dirs_win32([Dir|Dirs],Save) ->
- Rm =
- case filelib:is_dir(Dir) of
- true ->
- string:concat("rmdir /s /q ", Dir);
- false ->
- string:concat("del /q ", Dir)
- end,
- ?t:format("============== COMMAND ~p~n",[Rm]),
- [] = os:cmd(Rm),
- clean_dirs_win32(Dirs,Save).
-
-
node_name(Sname) when is_atom(Sname) ->
{ok,Host} = inet:gethostname(),
list_to_atom(atom_to_list(Sname) ++ "@" ++ Host).
@@ -2043,7 +2088,7 @@ chmod(Dest,Opts) ->
copy_error(Src, Dest, Reason) ->
- io:format("Copy ~s to ~s failed: ~s\n",
+ ?t:format("Copy ~ts to ~ts failed: ~ts\n",
[Src,Dest,file:format_error(Reason)]),
?t:fail(file_copy_failed).
@@ -2083,9 +2128,11 @@ subst_file(Src, Dest, Vars) ->
subst_file(Src, Dest, Vars, []).
subst_file(Src, Dest, Vars, Opts) ->
{ok, Bin} = file:read_file(Src),
- Conts = binary_to_list(Bin),
+ Conts = binary_to_list(Bin), % The source will always be latin1
NConts = subst(Conts, Vars),
- ok = file:write_file(Dest, NConts),
+ %% The destination must be utf8 if file name encoding is unicode
+ Enc = file:native_name_encoding(),
+ ok = file:write_file(Dest, unicode:characters_to_binary(NConts,Enc,Enc)),
preserve(Src,Dest,Opts),
chmod(Dest,Opts).
@@ -2118,13 +2165,22 @@ subst_var([], Vars, Result, VarAcc) ->
priv_dir(Conf) ->
-%% filename:absname(?config(priv_dir, Conf)). % Get rid of trailing slash
%% Due to problem with long paths on windows => creating a new
%% priv_dir under data_dir
- filename:absname(filename:join(?config(data_dir, Conf),priv_dir)).
+ %% And get rid of trailing slash (absname does that)
+ %% And if file name translation mode is utf8, use a path with
+ %% unicode characters
+ PrivDir =
+ case file:native_name_encoding() of
+ utf8 ->
+ "priv_dir_αβ";
+ _ ->
+ "priv_dir"
+ end,
+ filename:absname(filename:join([?config(data_dir, Conf),PrivDir])).
init_priv_dir(Conf) ->
- Dir = filename:absname(filename:join(?config(data_dir, Conf),priv_dir)),
+ Dir = priv_dir(Conf),
case filelib:is_dir(Dir) of
true ->
clean_priv_dir(Conf,false);
@@ -2149,7 +2205,7 @@ rh_print() ->
receive
{print, {Module,Line}, [H|T]} ->
?t:format("=== ~p:~p - ~p",[Module,Line,H]),
- lists:foreach(fun(Term) -> ?t:format(" ~p",[Term]) end, T),
+ lists:foreach(fun(Term) -> ?t:format(" ~tp",[Term]) end, T),
?t:format("",[]),
rh_print();
kill ->
@@ -2242,8 +2298,8 @@ create_p1g(Conf,TargetDir) ->
ok.
fix_version(SystemLib,App) ->
- FromVsn = vsn(App,current),
- ToVsn = vsn(App,old),
+ FromVsn = re:replace(vsn(App,current),"\\.","\\\\.",[{return,binary}]),
+ ToVsn = re:replace(vsn(App,old),"\\.","\\\\.",[{return,binary}]),
Rootname = filename:join([SystemLib,app_dir(App,old),ebin,atom_to_list(App)]),
AppFile = Rootname ++ ".app",
@@ -2396,9 +2452,28 @@ check_gg_info(Node,OtherAlive,OtherDead,Synced) ->
?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n"
"and GI was: ~p~n",
[Node,E,GGI,GI]),
+ %% An attempt to find out if it is only a timing issue
+ %% that makes this fail every now and then:
+ try_again_check(Node,GGI,GI,1),
?t:fail("check_gg_info failed")
end.
+try_again_check(_Node,_GGI,_GI,6) ->
+ ok;
+try_again_check(Node,GGI,GI,N) ->
+ timer:sleep(1000),
+ case {rpc:call(Node,global_group,info,[]),
+ rpc:call(Node,global,info,[])} of
+ {GGI,GI} ->
+ ?t:format("~nAfter one more sek, GGI and GI are still the same"),
+ try_again_check(Node,GGI,GI,N+1);
+ {NewGGI,NewGI} ->
+ ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n",
+ [NewGGI,NewGI]),
+ try_again_check(Node,NewGGI,NewGI,N+1)
+ end.
+
+
do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) ->
{_,gg1} = lists:keyfind(own_group_name,1,GGI),
{_,synced} = lists:keyfind(state,1,GGI),
@@ -2542,11 +2617,14 @@ start_nodes(Conf,Snames,Tag) ->
start_node_unix(Sname,NodeDir) ->
Script = filename:join([NodeDir,"bin","start"]),
- Cmd = "env NODENAME="++atom_to_list(Sname) ++ " " ++ Script,
- %% {ok,StartFile} = file:read_file(Cmd),
- %% io:format("~s:\n~s~n~n",[Start,binary_to_list(StartFile)]),
- Res = os:cmd(Cmd),
- io:format("Start ~p: ~p~n=>\t~p~n", [Sname,Cmd,Res]).
+ ?t:format("Starting ~p: ~ts~n", [Sname,Script]),
+ case rh_test_lib:cmd(Script,[],[{"NODENAME",atom_to_list(Sname)}]) of
+ ok ->
+ {ok,node_name(Sname)};
+ Error ->
+ ?t:fail({failed_to_start_node, Sname, Error})
+ end.
+
start_node_win32(Sname,NodeDir) ->
Name = atom_to_list(Sname) ++ "_P1G",
@@ -2707,7 +2785,7 @@ rpc_inst(Node,Func,Args) ->
delete_all_services() ->
ErlSrv = erlsrv:erlsrv(erlang:system_info(version)),
- [_|Serviceinfo] = string:tokens(os:cmd(ErlSrv ++ " list"),"\n"),
+ [_|Serviceinfo] = string:tokens(os:cmd("\"" ++ ErlSrv ++ "\" list"),"\n"),
Services =
[lists:takewhile(fun($\t) -> false; (_) -> true end,S)
|| S <- Serviceinfo],
diff --git a/lib/pman/src/pman_buf.hrl b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app
index 3f25dcc5f0..ba6d09cd42 100644
--- a/lib/pman/src/pman_buf.hrl
+++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.app
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,14 +16,14 @@
%%
%% %CopyrightEnd%
%%
-
-%%-compile(export_all).
-%%-export([Function/Arity, ...]).
-
--define(BUFF_SIZE,1000).
--define(EDITOR_MAX,10000).
--define(PRINT_LEN,50).
--define(MAX_OUTPUT,5000).
-
-
--record(buffer,{buffer,converter}).
+%% This is an -*- erlang -*- file.
+%%
+{application, app1,
+ [
+ {description, "Test that release_handler can read appup with regexp"},
+ {vsn, "1.1"},
+ {modules, []},
+ {registered, []},
+ {applications, []}
+ ]
+}.
diff --git a/lib/kernel/test/code_SUITE_data/calendar.erl b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup
index c1a4a1c12a..9c657232d0 100644
--- a/lib/kernel/test/code_SUITE_data/calendar.erl
+++ b/lib/sasl/test/release_handler_SUITE_data/regexp_appup/app1/ebin/app1.appup
@@ -1,23 +1,23 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2015. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
-%% %CopyrightEnd%
%%
--module(calendar).
--export([test/1]).
-
-test(apa) ->
- {error, this_function_should_not_be_called}.
+%% %CopyrightEnd%
+{"1.1",
+ %% Up from
+ [{<<"1(\\.[0-9]+)*">>,[{restart_application,app1}]}],
+ %% Down to
+ [{<<"1(\\.[0-9]+)*">>,[{restart_application,app1}]}]
+}.
diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl
index 99a7f919a7..11935496d8 100644
--- a/lib/sasl/test/rh_test_lib.erl
+++ b/lib/sasl/test/rh_test_lib.erl
@@ -1,5 +1,6 @@
-module(rh_test_lib).
+-export([cmd/3]).
-export([erlsrv/3,
erlsrv/4]).
-export([get_service_args/3,
@@ -8,12 +9,26 @@
get_start_erl_args/3,
get_client_args/3,
get_client_args/4]).
+-export([clean_dir/1,
+ clean_dir/2]).
+-include_lib("kernel/include/file.hrl").
+
+cmd(Cmd,Args,Env) ->
+ case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of
+ Port when is_port(Port) ->
+ unlink(Port),
+ erlang:port_close(Port),
+ ok;
+ Error ->
+ Error
+ end.
erlsrv(Erlsrv,Action,Name) ->
erlsrv(Erlsrv,Action,Name,"").
erlsrv(Erlsrv,Action,Name,Rest) ->
- Cmd = Erlsrv ++ " " ++ atom_to_list(Action) ++ " " ++ Name ++ " " ++ Rest,
+ Cmd = "\"" ++ Erlsrv ++ "\" " ++ atom_to_list(Action) ++ " " ++
+ Name ++ " " ++ Rest,
io:format("erlsrv cmd: ~p~n",[Cmd]),
Port = open_port({spawn, Cmd}, [stream, {line, 100}, eof, in]),
Res = recv_prog_output(Port),
@@ -98,3 +113,50 @@ single_quote() ->
_ ->
"\\'"
end.
+
+clean_dir(Dir) ->
+ clean_dir(Dir,false).
+clean_dir(Dir,Save) ->
+ test_server:format("======== current dir ~tp~n",[Dir]),
+ Dirs = filelib:wildcard(filename:join(Dir,"*")),
+ test_server:format("======== deleting ~tp~n",[Dirs]),
+
+ ok = rm_rf(Dirs,Save),
+ Remaining = filelib:wildcard(filename:join(Dir,"*")),
+ test_server:format("======== remaining ~tp~n",[Remaining]),
+
+ case Remaining of
+ [] ->
+ ok;
+ _ ->
+ rm_rf(Remaining,Save),
+ Remaining2 = filelib:wildcard(filename:join(Dir,"*")),
+ test_server:format("======== remaining after second try ~tp~n",
+ [Remaining2])
+ end,
+
+ ok.
+
+
+rm_rf([File|Files],Save) ->
+ case Save andalso filename:basename(File)=="save" of
+ true ->
+ rm_rf(Files,Save);
+ false ->
+ case file:read_link_info(File) of
+ {ok,#file_info{type=directory}} ->
+ MoreFiles = filelib:wildcard(filename:join(File,"*")),
+ rm_rf(MoreFiles,Save),
+ file:del_dir(File),
+ rm_rf(Files,Save);
+ {ok,#file_info{}} ->
+ file:delete(File),
+ rm_rf(Files,Save);
+ Other ->
+ test_server:format("======== could not delete file ~p~n"
+ "read_link_info -> ~p~n",[File,Other]),
+ rm_rf(Files,Save)
+ end
+ end;
+rm_rf([],_) ->
+ ok.
diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl
index b6eaf41323..d7b99d506e 100644
--- a/lib/sasl/test/sasl_SUITE.erl
+++ b/lib/sasl/test/sasl_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,11 +19,6 @@
-module(sasl_SUITE).
-include_lib("common_test/include/ct.hrl").
-
-%% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
--define(application, sasl).
-
%% Test server specific exports
-export([all/0,groups/0,init_per_group/2,end_per_group/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -34,7 +29,7 @@
log_mf_h_env/1]).
all() ->
- [app_test, appup_test, log_mf_h_env].
+ [log_mf_h_env, app_test, appup_test].
groups() ->
[].
@@ -47,102 +42,100 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
app_test(Config) when is_list(Config) ->
?t:app_test(sasl, allow),
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(sasl),
- {sasl,_,SaslVsn} = lists:keyfind(sasl,1,application:loaded_applications()),
- Ebin = filename:join(code:lib_dir(sasl),ebin),
- {ok,[{SaslVsn,UpFrom,DownTo}=Appup]} =
- file:consult(filename:join(Ebin,"sasl.appup")),
- ct:log("~p~n",[Appup]),
- {OkVsns,NokVsns} = create_test_vsns(SaslVsn),
+ appup_tests(sasl,create_test_vsns(sasl)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns0,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
+ {ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
+ ct:log("~p~n",[AppupScript]),
+ OkVsns =
+ case OkVsns0 -- [Vsn] of
+ OkVsns0 ->
+ OkVsns0;
+ Ok ->
+ ct:log("Current version, ~p, is same as in previous release.~n"
+ "Removing this from the list of ok versions.",
+ [Vsn]),
+ Ok
+ end,
+ ct:log("Testing that appup allows upgrade from these versions: ~p~n",
+ [OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing that appup does not allow upgrade from these versions: ~p~n",
+ [NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-
-%% For sasl, the versions up to R14B03 were not according to the rule
-%% used for other core applications - i.e. to change the second number
-%% at major releases, the third at maintenance releases and the fourth
-%% for patches - therefore test versions up to and including R16 are
-%% hardcoded.
-%% (All versions below are not necessarily existing.)
--define(r12_vsns,["2.1.5"]).
--define(r13_vsns,["2.1.6","2.1.7.1","2.1.9","2.1.9.1.2"]).
--define(r14_vsns,["2.1.9.2","2.1.9.2.20","2.1.9.4","2.1.10"]).
--define(r15_major,"2.2").
--define(r16_major,"2.3").
--define(r17_major,"2.4").
-create_test_vsns(?r15_major ++ Rest) ->
- R15Vsns =
- case string:tokens(Rest,".") of
- [] -> [];
- ["1"] -> [?r15_major];
- _ -> [?r15_major,?r15_major++".1"]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = ?r13_vsns ++ ?r14_vsns ++ R15Vsns,
- NokVsns = ?r12_vsns ++ [?r15_major++",1", ?r16_major],
- {OkVsns,NokVsns};
-create_test_vsns(?r16_major ++ Rest) ->
- R16Vsns =
- case string:tokens(Rest,".") of
- [] -> [];
- ["1"] -> [?r16_major];
- _ -> [?r16_major,?r16_major++".1"]
- end,
- OkVsns = ?r14_vsns ++ [?r15_major, ?r15_major ++ ".1.4"] ++ R16Vsns,
- NokVsns = ?r13_vsns ++ [?r16_major++",1", ?r17_major],
- {OkVsns,NokVsns};
-%% Normal erts case - i.e. for versions that comply to the erts standard
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
- end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
@@ -153,7 +146,6 @@ check_appup([],_,_) ->
ok.
-
%% OTP-9185 - fail sasl start if some but not all log_mf_h env vars
%% are given.
log_mf_h_env(Config) ->
diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl
index 9efc8f8392..49a4303e0b 100644
--- a/lib/sasl/test/systools_SUITE.erl
+++ b/lib/sasl/test/systools_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,6 +47,7 @@
abnormal_script/1, src_tests_script/1, crazy_script/1,
included_script/1, included_override_script/1,
included_fail_script/1, included_bug_script/1, exref_script/1,
+ duplicate_modules_script/1,
otp_3065_circular_dependenies/1, included_and_used_sort_script/1]).
-export([tar_options/1, normal_tar/1, no_mod_vsn_tar/1, system_files_tar/1,
system_files_tar/2, invalid_system_files_tar/1,
@@ -84,6 +85,7 @@ groups() ->
src_tests_script, crazy_script,
included_script, included_override_script,
included_fail_script, included_bug_script, exref_script,
+ duplicate_modules_script,
otp_3065_circular_dependenies, included_and_used_sort_script]},
{tar, [],
[tar_options, normal_tar, no_mod_vsn_tar, system_files_tar,
@@ -140,9 +142,9 @@ compile_source(File) ->
ok = file:write_file(OutFileTemp, Code),
file:rename(OutFileTemp, OutFile).
-end_per_suite(Conf) when is_list(Conf) ->
- %% Nothing.
- Conf.
+end_per_suite(Config) when is_list(Config) ->
+ rh_test_lib:clean_dir(?privdir),
+ Config.
init_per_testcase(link_tar, Config) ->
case os:type() of
@@ -822,6 +824,33 @@ no_hipe({ok, Value}) ->
{ok, Value}
end.
+%% duplicate_modules_script: Check that make_script rejects two
+%% applications providing the same module.
+duplicate_modules_script(Config) when is_list(Config) ->
+ {ok, OldDir} = file:get_cwd(),
+
+ {LatestDir, LatestName} = create_script(duplicate_modules,Config),
+
+ DataDir = filename:absname(?copydir),
+
+ ok = file:set_cwd(LatestDir),
+ LibDir = fname([DataDir, d_duplicate_modules, lib]),
+ P = [fname([LibDir, 'app1-1.0', ebin]),
+ fname([LibDir, 'app2-1.0', ebin])],
+
+ %% Check wrong app vsn
+ error = systools:make_script(LatestName, [{path, P}]),
+ {error,
+ systools_make,
+ {duplicate_modules, [
+ {{myapp,app1,_}, {myapp,app2,_}}
+ ]
+ }
+ } = systools:make_script(LatestName, [silent, {path, P}]),
+
+ ok = file:set_cwd(OldDir),
+ ok.
+
%% tar_options: Check illegal tar options.
tar_options(Config) when is_list(Config) ->
{'EXIT',{{badarg,[{path,["Path",12,"Another"]}]}, _}} =
@@ -1586,9 +1615,19 @@ no_sasl_relup(Config) when is_list(Config) ->
%% make_relup: Check that application start type is used in relup
app_start_type_relup(Config) when is_list(Config) ->
+ %% This might fail if some applications are not available, if so
+ %% skip the test case.
+ try create_script(latest_app_start_type2,Config) of
+ {Dir2,Name2} ->
+ app_start_type_relup(Dir2,Name2,Config)
+ catch throw:{error,Reason} ->
+ {skip,Reason}
+ end.
+
+app_start_type_relup(Dir2,Name2,Config) ->
PrivDir = ?config(priv_dir, Config),
{Dir1,Name1} = create_script(latest_app_start_type1,Config),
- {Dir2,Name2} = create_script(latest_app_start_type2,Config),
+
Release1 = filename:join(Dir1,Name1),
Release2 = filename:join(Dir2,Name2),
@@ -1960,12 +1999,12 @@ otp_6226_outdir(Config) when is_list(Config) ->
ok = file:delete(Relup),
%% d) absolute but incorrect path
- {error,_,{file_problem,{"relup",enoent}}} =
+ {error,_,{file_problem,{"relup",{open,enoent}}}} =
systools:make_relup(LatestName,[LatestName1],[LatestName1],
[{outdir,Outdir2},{path,P},silent]),
%% e) relative but incorrect path
- {error,_,{file_problem,{"relup",enoent}}} =
+ {error,_,{file_problem,{"relup",{open,enoent}}}} =
systools:make_relup(LatestName,[LatestName1],[LatestName1],
[{outdir,"./outdir2"},{path,P},silent]),
@@ -2186,7 +2225,10 @@ create_script(current_all_future_sasl,Config) ->
do_create_script(current_all_future_sasl,Config,current,Apps);
create_script({unicode,RelVsn},Config) ->
Apps = core_apps(current) ++ [{ua,"1.0"}],
- do_create_script(unicode,RelVsn,Config,current,Apps).
+ do_create_script(unicode,RelVsn,Config,current,Apps);
+create_script(duplicate_modules,Config) ->
+ Apps = core_apps(current) ++ [{app1,"1.0"},{app2,"1.0"}],
+ do_create_script(duplicate_modules,Config,current,Apps).
do_create_script(Id,Config,ErtsVsn,AppVsns) ->
@@ -2210,9 +2252,13 @@ app_vsns(AppVsns) ->
[{App,app_vsn(App,Vsn)} || {App,Vsn} <- AppVsns] ++
[{App,app_vsn(App,Vsn),Type} || {App,Vsn,Type} <- AppVsns].
app_vsn(App,current) ->
- application:load(App),
- {ok,Vsn} = application:get_key(App,vsn),
- Vsn;
+ case application:load(App) of
+ Ok when Ok==ok; Ok=={error,{already_loaded,App}} ->
+ {ok,Vsn} = application:get_key(App,vsn),
+ Vsn;
+ Error ->
+ throw(Error)
+ end;
app_vsn(_App,Vsn) ->
Vsn.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
new file mode 100644
index 0000000000..dea9257f2f
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
@@ -0,0 +1,7 @@
+{application, app1,
+ [{description, "Application 1"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
new file mode 100644
index 0000000000..476750d8b2
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
@@ -0,0 +1,7 @@
+{application, app2,
+ [{description, "Application 2"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").
diff --git a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app
index 3d38a3dde4..7d56a298b8 100644
--- a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app
+++ b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
{application, ua,
[{description, "αβ"},
{vsn, "1.0"},
diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl
index 0cb6e63cf3..5efab7c028 100644
--- a/lib/sasl/test/systools_rc_SUITE.erl
+++ b/lib/sasl/test/systools_rc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -436,25 +436,19 @@ translate(Config) when is_list(Config) ->
translate_app(Config) when is_list(Config) ->
PreApps =
- [#application{name = test,
- description = "TEST",
- vsn = "1.0",
- modules = [foo,bar,baz],
- regs = [],
- mod = {sasl, []}},
+ [Test = #application{name = test,
+ description = "TEST",
+ vsn = "1.0",
+ modules = [foo,bar,baz],
+ regs = [],
+ mod = {sasl, []}},
#application{name = pelle,
description = "PELLE",
vsn = "1.0",
modules = [pelle, kalle],
regs = [],
mod = {pelle, []}}],
- Apps =
- [#application{name = test,
- description = "TEST",
- vsn = "1.0",
- modules = [foo,bar,baz],
- regs = [],
- mod = {sasl, []}}],
+ Apps = [Test],
%% Simple translation (1)
Up1 = [{add_module, foo},
{add_module, bar}],
@@ -475,6 +469,56 @@ translate_app(Config) when is_list(Config) ->
{load,{baz,brutal_purge,brutal_purge}},
{apply,{application,start,[test,permanent]}}] = X2,
+ %% Translate add_application with different restart types
+ %% permanent
+ Up2_1 = [{add_application, test, permanent}],
+ {ok, X2_1} = systools_rc:translate_scripts([Up2_1], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X2_1,
+
+ %% transient
+ Up2_2 = [{add_application, test, transient}],
+ {ok, X2_2} = systools_rc:translate_scripts([Up2_2], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,transient]}}] = X2_2,
+
+ %% temporary
+ Up2_3 = [{add_application, test, temporary}],
+ {ok, X2_3} = systools_rc:translate_scripts([Up2_3], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,temporary]}}] = X2_3,
+
+ %% load
+ Up2_4 = [{add_application, test, load}],
+ {ok, X2_4} = systools_rc:translate_scripts([Up2_4], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,load,[test]}}] = X2_4,
+
+ %% none
+ Up2_5 = [{add_application, test, none}],
+ {ok, X2_5} = systools_rc:translate_scripts([Up2_5], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}}] = X2_5,
+
%% Simple translation (3)
Up3 = [{remove_application, pelle}],
{ok, X3} = systools_rc:translate_scripts([Up3], Apps, PreApps),
@@ -484,6 +528,102 @@ translate_app(Config) when is_list(Config) ->
{remove,{kalle,brutal_purge,brutal_purge}},
{purge,[pelle,kalle]},
{apply,{application,unload,[pelle]}}] = X3,
+
+ %% Simple translation (4)
+ Up4 = [{restart_application, test}],
+ {ok, X4} = systools_rc:translate_scripts([Up4], Apps, PreApps),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X4,
+
+ %% Translate restart_application with different restart types
+ %% permanent
+ {ok, X4_1} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=permanent}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X4_1,
+
+ %% transient
+ {ok, X4_2} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=transient}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,transient]}}] = X4_2,
+
+ %% temporary
+ {ok, X4_3} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=temporary}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,temporary]}}] = X4_3,
+
+ %% load
+ {ok, X4_4} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=load}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,load,[test]}}] = X4_4,
+
+ %% none
+ {ok, X4_5} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=none}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}}] = X4_5,
+
ok.
diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl
index eeef721647..c8a4e92f24 100644
--- a/lib/sasl/test/test_lib.hrl
+++ b/lib/sasl/test/test_lib.hrl
@@ -1,3 +1,3 @@
-define(ertsvsn,"4.4").
--define(kernelvsn,"2.14.3").
--define(stdlibvsn,"1.17.3").
+-define(kernelvsn,"2.16.4").
+-define(stdlibvsn,"1.19.4").
diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk
index d4b8ae94a1..4259a2d76c 100644
--- a/lib/sasl/vsn.mk
+++ b/lib/sasl/vsn.mk
@@ -1 +1 @@
-SASL_VSN = 2.3.4
+SASL_VSN = 2.4.1
diff --git a/lib/snmp/.gitignore b/lib/snmp/.gitignore
index 650c1d6865..aef73491a4 100644
--- a/lib/snmp/.gitignore
+++ b/lib/snmp/.gitignore
@@ -5,5 +5,4 @@
*.rej
doc/index.html
-
-
+mibs/.index
diff --git a/lib/snmp/doc/src/book.xml b/lib/snmp/doc/src/book.xml
index 2897d25d55..a5c054142f 100644
--- a/lib/snmp/doc/src/book.xml
+++ b/lib/snmp/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/fascicules.xml b/lib/snmp/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/snmp/doc/src/fascicules.xml
+++ b/lib/snmp/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index d213b67052..52022f59ff 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -33,6 +33,244 @@
</header>
+ <section><title>SNMP 5.1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A bug in the SNMP Agent has been corrected; when opening
+ a port using the command line argument -snmpa_fd the Port
+ should be 0 when calling gen_udp:open.</p>
+ <p>
+ A bug in the SNMP manager has been corrected; it should
+ not look at the -snmp_fd command line argument, but
+ instead at -snmpm_fd.</p>
+ <p>
+ Own Id: OTP-12669 Aux Id: seq12841 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improved cryptocraphic capability.</p>
+ <p>
+ Own Id: OTP-12452</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section>
+ <title>SNMP Development Toolkit 5.1.1</title>
+ <p>Version 5.1.1 supports code replacement in runtime from/to
+ version 5.1. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>[compiler] Refinement of type Opaque was not allowed. </p>
+ <p>MIB constructs such as '<c>SYNTAX Opaque (SIZE(0..65535))</c>'
+ was previously not allowed,
+ see the standard <c>ALARM-MIB</c> for eaxmple. </p>
+ <p>Own Id: OTP-12066</p>
+ <p>Aux Id: Seq 12669</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[agent]
+ see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and
+ <seealso marker="snmpa#unload_mibs">unload_mibs</seealso>. </p>
+ <p>Own Id: OTP-11216</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[manager] The old Addr-and-Port based API functions, previously
+ long deprecated and marked for deletion in R16B, has now been
+ removed. </p>
+ <p>Own Id: OTP-10027</p>
+ </item>
+
+ </list>
+-->
+ </section>
+ </section> <!-- 5.1.1 -->
+
+
+
+ <section><title>SNMP 5.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The SNMP manager has been enhanced with dual stack
+ IPv4+IPv6, as the agent just was. The documentation is
+ also now updated for both the agent and the manager.</p>
+ <p>
+ Own Id: OTP-12108 Aux Id: OTP-12020 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SNMP 5.0</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ SNMP has been improved to handle IPv6. The agent can
+ handle dual stack IPv4 + IPv6, but not yet the manager.
+ The documentation also still lags behind... If you do
+ such advanced stuff like writing a custom net_if module,
+ the interface for it has changed, but other than that
+ SNMP is backwards compatible.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12020 Aux Id: OTP-11518 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SNMP 4.25.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section>
+ <title>SNMP Development Toolkit 4.25.0.1</title>
+ <p>Version 4.25.0.1 supports code replacement in runtime from/to
+ version 4.25, 4.24.2, 4.24.1 and 4.24. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>Updated doc files to utf8. </p>
+ <p>Own Id: OTP-10907</p>
+ </item>
+
+ <item>
+ <p>Fixed test suite to support UTF-8 paths. </p>
+ <p>Own Id: OTP-10877</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>Wrong block cypher type used for AES ('aes_cbf128'
+ instead of 'aes_cfb128') when performing AES block
+ encrypt/decrypt which breaks SNMP usmAesCfb128Protocol
+ in agent and manager. </p>
+ <p>Own Id: OTP-11412</p>
+ </item>
+
+ <item>
+ <p>[manager] When performing the AES encryption, invalid values for
+ the EngineBoots and EngineTime was used. </p>
+ <p>The values of the local agent was used, which would have produced
+ "some" values if an agent was actually running.
+ If not it would have caused a crash. </p>
+ <p>Own Id: OTP-11413</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[manager] The old Addr-and-Port based API functions, previously
+ long deprecated and marked for deletion in R16B, has now been
+ removed. </p>
+ <p>Own Id: OTP-10027</p>
+ </item>
+
+ </list>
+-->
+ </section>
+
+ </section> <!-- 4.25.0.1 -->
+
+
<section>
<title>SNMP Development Toolkit 4.25</title>
<p>Version 4.25 supports code replacement in runtime from/to
diff --git a/lib/snmp/doc/src/notes_history.xml b/lib/snmp/doc/src/notes_history.xml
index 023717cd7c..62c6782fd7 100644
--- a/lib/snmp/doc/src/notes_history.xml
+++ b/lib/snmp/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/part.xml b/lib/snmp/doc/src/part.xml
index 603ddc7a62..e68872347d 100644
--- a/lib/snmp/doc/src/part.xml
+++ b/lib/snmp/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/part_notes.xml b/lib/snmp/doc/src/part_notes.xml
index 6d00e5b7e3..f716ac10c2 100644
--- a/lib/snmp/doc/src/part_notes.xml
+++ b/lib/snmp/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/part_notes_history.xml b/lib/snmp/doc/src/part_notes_history.xml
index bebd33e81b..3c1cacbede 100644
--- a/lib/snmp/doc/src/part_notes_history.xml
+++ b/lib/snmp/doc/src/part_notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/ref_man.xml b/lib/snmp/doc/src/ref_man.xml
index 9495486c39..9ceaa5e4fb 100644
--- a/lib/snmp/doc/src/ref_man.xml
+++ b/lib/snmp/doc/src/ref_man.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml
index 97b479385c..b9cd4b3402 100644
--- a/lib/snmp/doc/src/snmp.xml
+++ b/lib/snmp/doc/src/snmp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_advanced_agent.xml b/lib/snmp/doc/src/snmp_advanced_agent.xml
index 6600206c2d..4323b05858 100644
--- a/lib/snmp/doc/src/snmp_advanced_agent.xml
+++ b/lib/snmp/doc/src/snmp_advanced_agent.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_agent_config_files.xml b/lib/snmp/doc/src/snmp_agent_config_files.xml
index 866b00b77b..1e938c0dc8 100644
--- a/lib/snmp/doc/src/snmp_agent_config_files.xml
+++ b/lib/snmp/doc/src/snmp_agent_config_files.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -102,20 +102,41 @@
<p><c>AgentVariable</c> is one of the variables is
SNMP-FRAMEWORK-MIB or one of the internal variables
<c>intAgentUDPPort</c>, which defines which UDP port the agent
- listens to, or <c>intAgentIpAddress</c>, which defines the IP
- address of the agent. </p>
+ listens to, or <c>intAgentTransports</c>, which defines the
+ transport domains and addresses of the agent. </p>
</item>
<item>
<p><c>Value</c> is the value for the variable.</p>
</item>
</list>
- <p>The following example shows a <c>agent.conf</c> file: </p>
+ <p>The following example shows an <c>agent.conf</c> file: </p>
<pre>
{intAgentUDPPort, 4000}.
-{intAgentIpAddress,[141,213,11,24]}.
+{intAgentTransports,
+ [{transportDomainUdpIpv4, {141,213,11,24}},
+ {transportDomainUdpIpv6, {0,0,0,0,0,0,0,1}}]}.
{snmpEngineID, "mbj's engine"}.
{snmpEngineMaxPacketSize, 484}.
</pre>
+ <p>The value of <c>intAgentTransports</c> is a list of
+ <c>{Domain, Addr}</c> tuples, where <c>Domain</c>
+ is either <c>transportDomainUdpIpv4</c> or <c>transportDomainUdpIpv6</c>,
+ and <c>Addr</c> is the address in the domain.
+ <c>Addr</c> can be specified either as an
+ <c>IpAddr</c> or as an <c>{IpAddr, IpPort}</c> tuple.
+ <c>IpAddr</c> is either a regular Erlang/OTP
+ <seealso marker="kernel:inet#type-ip_address"><c>ip_address()</c></seealso>
+ or a traditional SNMP integer list and <c>IpPort</c> is an integer.
+ </p>
+
+ <p>When the <c>Addr</c> value does not contain a port number,
+ the value of <c>intAgentUDPPort</c> is used.</p>
+
+ <p>The legacy and intermediate variables <c>intAgentIpAddress</c>
+ and <c>intAgentTransportDomain</c> are still supported so old
+ <c>agent.conf</c> files will work.
+ </p>
+
<p>The value of <c>snmpEngineID</c> is a string, which for a
deployed agent should have a very specific structure. See
RFC 2271/2571 for details.</p>
@@ -362,9 +383,9 @@
SNMP-TARGET-MIB and <c>snmpTargetAddrExtTable</c> in the
SNMP-COMMUNITY-MIB. </p>
<p>Each entry is a term: </p>
- <p><c>{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId}.</c> <br></br> or <br></br>
-<c>{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.</c> <br></br> or <br></br>
-<c>{TargetName, Domain, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.</c> </p>
+ <p><c>{TargetName, Domain, Addr, Timeout, RetryCount, TagList, ParamsName, EngineId}.</c>
+ <br></br> or <br></br>
+ <c>{TargetName, Domain, Addr, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.</c> </p>
<list type="bulleted">
<item>
<p><c>TargetName</c> is a unique non-empty string. </p>
@@ -374,11 +395,14 @@
<c>transportDomainUdpIpv4</c> | <c>transportDomainUdpIpv6</c>. </p>
</item>
<item>
- <p><c>Ip</c> is a list of four or eight integers. </p>
- </item>
- <item>
- <p><c>Udp</c> is an integer. </p>
+ <p><c>Addr</c> is either an <c>IpAddr</c> or
+ an <c>{IpAddr, IpPort}</c> tuple. <c>IpAddr</c> is either
+ a regular Erlang/OTP
+ <seealso marker="kernel:inet#type-ip_address"><c>ip_address()</c></seealso>
+ or a traditional SNMP integer list, and <c>IpPort</c> is an integer.</p>
+ <p>If <c>IpPort</c> is omitted <c>162</c> is used.</p>
</item>
+
<item>
<p><c>Timeout</c> is an integer. </p>
</item>
@@ -395,13 +419,17 @@
<p><c>EngineId</c> is a string or the atom <c>discovery</c>. </p>
</item>
<item>
- <p><c>TMask</c> is a list of integer() of size 0,
- size 6 or size 10 (default: []). </p>
+ <p><c>TMask</c> is specified just as <c>Addr</c> or as <c>[]</c>.
+ Note in particular that using a list of 6 bytes for IPv4
+ or 8 words plus 2 bytes for IPv6 are still valid address formats
+ so old configurations will work.</p>
</item>
<item>
<p><c>MaxMessageSize</c> is an integer (default: 2048). </p>
</item>
</list>
+ <p>The old tuple formats with <c>Ip</c> address and <c>Udp</c>
+ port number found in old configurations still work.</p>
<p>Note that if <c>EngineId</c> has the value <c>discovery</c>,
the agent cannot send
<c>inform</c> messages to that manager until it has performed the
diff --git a/lib/snmp/doc/src/snmp_agent_funct_descr.xml b/lib/snmp/doc/src/snmp_agent_funct_descr.xml
index 9a1bf28ab1..1c89ddea22 100644
--- a/lib/snmp/doc/src/snmp_agent_funct_descr.xml
+++ b/lib/snmp/doc/src/snmp_agent_funct_descr.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_agent_netif.xml b/lib/snmp/doc/src/snmp_agent_netif.xml
index 8f1d860d58..a9ce05e757 100644
--- a/lib/snmp/doc/src/snmp_agent_netif.xml
+++ b/lib/snmp/doc/src/snmp_agent_netif.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -51,7 +51,8 @@
</p>
<p>It is also possible to write your own Net if process. The default
Net if process is implemented in the module <c>snmpa_net_if</c> and
- it uses UDP as the transport protocol.
+ it uses UDP as the transport protocol i.e the transport domains
+ <c>transportDomainUdpIpv4</c> and/or <c>transportDomainUdpIpv6</c>.
</p>
<p>This section describes how to write a Net if process.
</p>
@@ -70,6 +71,12 @@
<p>The section <em>Messages</em> describes mandatory messages, which
Net if must send and be able to receive.
</p>
+ <p>In this section an <c>Address</c> field is a
+ <c>{Domain, Addr}</c> tuple where <c>Domain</c> is
+ <c>transportDomainUdpIpv4</c> or <c>transportDomainUdpIpv4</c>,
+ and <c>Addr</c> is an
+ <c>{<seealso marker="kernel:inet#type-ip_address">IpAddr</seealso>,
+ IpPort}</c> tuple.</p>
<section>
<marker id="outgoing_messages"></marker>
@@ -96,10 +103,7 @@ MasterAgent ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, Extra}
in use. Normally this is returned from
<c>snmpa_mpd:process_packet</c> (see Reference Manual).
</item>
- <item><c>From</c> is the source address. If UDP over IP is
- used, this should be a 2-tuple <c>{IP, UDPport}</c>, where
- <c>IP</c> is a 4-tuple with the IP address, and <c>UDPport</c>
- is an integer.
+ <item><c>From</c> is the source <c>Address</c>.
</item>
<item><c>Extra</c> is any term the Net if process wishes to
send to the agent. This term can be retrieved by the
@@ -127,10 +131,7 @@ Pid ! {snmp_response_received, Vsn, Pdu, From}
</item>
<item><c>Pdu</c> is the SNMP Pdu received
</item>
- <item><c>From</c> is the source address. If UDP over IP is
- used, this should be a 2-tuple <c>{IP, UDPport}</c>, where
- <c>IP</c> is a 4-tuple with the IP address, and <c>UDPport</c>
- is an integer.
+ <item><c>From</c> is the source <c>Address</c>.
</item>
</list>
</section>
@@ -168,10 +169,9 @@ Pid ! {snmp_response_received, Vsn, Pdu, From}
(see Reference Manual). </p>
</item>
<item>
- <p><c>To</c> is the destination address. If UDP over IP
- is used, this should be a 2-tuple <c>{IP, UDPport}</c>,
- where <c>IP</c> is a 4-tuple with the IP address, and
- <c>UDPport</c> is an integer. </p>
+ <p><c>To</c> is the destination <c>Address</c> that comes
+ from the <c>From</c> field in the corresponding <c>snmp_pdu</c>
+ message previously sent to the MasterAgent.</p>
</item>
<item>
<p><c>Extra</c> is the term that the Net if process
@@ -230,7 +230,8 @@ Pid ! {snmp_response_received, Vsn, Pdu, From}
SNMPv3, it is the context information. </p>
</item>
<item>
- <p><c>To</c> is a list of the destination addresses and
+ <p><c>To</c> is a list of <c>{Address, SecData}</c>
+ tuples i.e the destination addresses and
their corresponding security parameters. This value is
normally sent to <c>snmpa_mpd:generate_message/4</c>. </p>
</item>
@@ -268,7 +269,8 @@ Pid ! {snmp_response_received, Vsn, Pdu, From}
SNMPv3, it is the context information. </p>
</item>
<item>
- <p><c>To</c> is a list of the destination addresses and
+ <p><c>To</c> is a list of <c>{Address, SecData}</c>
+ tuples i.e the destination addresses and
their corresponding security parameters. This value is
normally sent to <c>snmpa_mpd:generate_message/4</c>. </p>
</item>
diff --git a/lib/snmp/doc/src/snmp_app.xml b/lib/snmp/doc/src/snmp_app.xml
index 9ede75b943..86f0981988 100644
--- a/lib/snmp/doc/src/snmp_app.xml
+++ b/lib/snmp/doc/src/snmp_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
diff --git a/lib/snmp/doc/src/snmp_app_a.xml b/lib/snmp/doc/src/snmp_app_a.xml
index 5192279a45..e2733b0e82 100644
--- a/lib/snmp/doc/src/snmp_app_a.xml
+++ b/lib/snmp/doc/src/snmp_app_a.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_app_b.xml b/lib/snmp/doc/src/snmp_app_b.xml
index 536a4b5c6f..f7c70f3e0c 100644
--- a/lib/snmp/doc/src/snmp_app_b.xml
+++ b/lib/snmp/doc/src/snmp_app_b.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_audit_trail_log.xml b/lib/snmp/doc/src/snmp_audit_trail_log.xml
index 9a49a0175b..c8abeabe87 100644
--- a/lib/snmp/doc/src/snmp_audit_trail_log.xml
+++ b/lib/snmp/doc/src/snmp_audit_trail_log.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_community_mib.xml b/lib/snmp/doc/src/snmp_community_mib.xml
index 5e7bca3e27..c5065bc319 100644
--- a/lib/snmp/doc/src/snmp_community_mib.xml
+++ b/lib/snmp/doc/src/snmp_community_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_config.xml b/lib/snmp/doc/src/snmp_config.xml
index 30b46e6aa8..0ec8bb91cf 100644
--- a/lib/snmp/doc/src/snmp_config.xml
+++ b/lib/snmp/doc/src/snmp_config.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/snmp/doc/src/snmp_def_instr_functions.xml b/lib/snmp/doc/src/snmp_def_instr_functions.xml
index f88469aeae..20d2180c2d 100644
--- a/lib/snmp/doc/src/snmp_def_instr_functions.xml
+++ b/lib/snmp/doc/src/snmp_def_instr_functions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_framework_mib.xml b/lib/snmp/doc/src/snmp_framework_mib.xml
index 38fb531d3e..3b4eb52ec2 100644
--- a/lib/snmp/doc/src/snmp_framework_mib.xml
+++ b/lib/snmp/doc/src/snmp_framework_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_generic.xml b/lib/snmp/doc/src/snmp_generic.xml
index 79a22323d9..d4c65ba832 100644
--- a/lib/snmp/doc/src/snmp_generic.xml
+++ b/lib/snmp/doc/src/snmp_generic.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_impl_example_agent.xml b/lib/snmp/doc/src/snmp_impl_example_agent.xml
index 3bba6467ed..1260d7d432 100644
--- a/lib/snmp/doc/src/snmp_impl_example_agent.xml
+++ b/lib/snmp/doc/src/snmp_impl_example_agent.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_impl_example_manager.xml b/lib/snmp/doc/src/snmp_impl_example_manager.xml
index edc1f3998e..03ea54b1bf 100644
--- a/lib/snmp/doc/src/snmp_impl_example_manager.xml
+++ b/lib/snmp/doc/src/snmp_impl_example_manager.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_index.xml b/lib/snmp/doc/src/snmp_index.xml
index cd241820e8..5d333e2fec 100644
--- a/lib/snmp/doc/src/snmp_index.xml
+++ b/lib/snmp/doc/src/snmp_index.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_instr_functions.xml b/lib/snmp/doc/src/snmp_instr_functions.xml
index 32a1844554..dcfaf145d3 100644
--- a/lib/snmp/doc/src/snmp_instr_functions.xml
+++ b/lib/snmp/doc/src/snmp_instr_functions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_intro.xml b/lib/snmp/doc/src/snmp_intro.xml
index b01bfdd88f..663e269e4b 100644
--- a/lib/snmp/doc/src/snmp_intro.xml
+++ b/lib/snmp/doc/src/snmp_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_manager_config_files.xml b/lib/snmp/doc/src/snmp_manager_config_files.xml
index c2ef3cd2c7..d8bd4b0f3a 100644
--- a/lib/snmp/doc/src/snmp_manager_config_files.xml
+++ b/lib/snmp/doc/src/snmp_manager_config_files.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -64,13 +64,42 @@
<item>
<p><c>Variable</c> is one of the following:</p>
<list type="bulleted">
- <item>
- <p><c>address</c> - which defines the IP address of the
- manager. Default is local host.</p>
- </item>
+ <item>
+ <p><c>transports</c> - which defines the transport domains
+ and their addresses for the manager. <em>Mandatory</em>
+ </p>
+ <p><c>Value</c> is a list of <c>{Domain, Addr}</c> tuples
+ or <c>Domain</c> atoms.
+ </p>
+ <list type="bulleted">
+ <item>
+ <p><c>Domain</c> is one of <c>transportDomainUdpIpv4</c>
+ or <c>transportDomainUdpIpv6</c>.</p>
+ </item>
+ <item>
+ <p><c>Addr</c> is for the currently supported domains
+ either an <c>IpAddr</c> or an <c>{IpAddr, IpPort}</c>
+ tuple.<c>IpAddr</c> is either a regular Erlang/OTP
+ <seealso marker="kernel:inet#type-ip_address">
+ <c>ip_address()</c></seealso> or a traditional SNMP integer list
+ and <c>IpPort</c> is an integer.
+ </p>
+ <p>When <c>Addr</c> does not contain a port number,
+ the value of <c>port</c> is used.
+ </p>
+ <p>When a <c>Addr</c> is not specified i.e by
+ using only a <c>Domain</c> atom, the host's name
+ is resolved to find the IP address, and the value of
+ <c>port</c> is used.
+ </p>
+ </item>
+ </list>
+ </item>
<item>
<p><c>port</c> - which defines which UDP port the manager uses
- for communicating with agents. <em>Mandatory</em>.</p>
+ for communicating with agents.
+ <em>Mandatory</em> if <c>transports</c> does not define
+ a port number for every transport.</p>
</item>
<item>
<p><c>engine_id</c> - The <c>SnmpEngineID</c> as defined in
@@ -87,11 +116,13 @@
</p>
</item>
</list>
+ <p>The legacy and intermediate variables <c>address</c> and <c>domain</c>
+ are still supported so old configurations will work.</p>
<p>The following example shows a <c>manager.conf</c> file:
</p>
<pre>
-{address, [141,213,11,24]}.
-{port, 5000}.
+{transports, [{transportDomainUdpIpv4, {{141,213,11,24}, 5000}},
+ {transportDomainUdpIpv6, {{0,0,0,0,0,0,0,1}, 5000}}]}.
{engine_id, "mgrEngine"}.
{max_message_size, 484}.
</pre>
@@ -146,7 +177,7 @@
</p>
<p>Each entry is a tuple:
</p>
- <p><c>{UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel}.</c></p>
+ <p><c>{UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel}.</c></p>
<list type="bulleted">
<item>
<p><c>UserId</c> is the identity of the <em>manager user</em>
@@ -160,10 +191,17 @@
<p><c>Comm</c> is the community string (string).</p>
</item>
<item>
- <p><c>Ip</c> is the ip address of the agent (a list of four integers).</p>
+ <p><c>Domain</c> is the transport domain, either
+ <c>transportDomainUdpIpv4</c> or <c>transportDomainUdpIpv6</c>.</p>
</item>
<item>
- <p><c>Port</c> is the port number of the agent (integer).</p>
+ <p><c>Addr</c> is the address in the transport domain,
+ either an <c>{IpAddr, IpPort}</c> tuple or a traditional SNMP
+ integer list containing port number. <c>IpAddr</c> is either
+ a regular Erlang/OTP
+ <seealso marker="kernel:inet#type-ip_address"><c>ip_address()</c></seealso>
+ or a traditional SNMP integer list not containing port number,
+ and <c>IpPort</c> is an integer.</p>
</item>
<item>
<p><c>EngineID</c> is the engine-id of the agent (string).</p>
@@ -190,6 +228,9 @@
authPriv).</p>
</item>
</list>
+ <p>Legacy configurations using tuples without <c>Domain</c> element,
+ as well as with all <c>TDomain</c>, <c>Ip</c> and <c>Port</c> elements
+ still work.</p>
</section>
<section>
diff --git a/lib/snmp/doc/src/snmp_manager_funct_descr.xml b/lib/snmp/doc/src/snmp_manager_funct_descr.xml
index db4ab9bf15..65a2ec069d 100644
--- a/lib/snmp/doc/src/snmp_manager_funct_descr.xml
+++ b/lib/snmp/doc/src/snmp_manager_funct_descr.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_manager_netif.xml b/lib/snmp/doc/src/snmp_manager_netif.xml
index 169e20d10b..97cedf00c0 100644
--- a/lib/snmp/doc/src/snmp_manager_netif.xml
+++ b/lib/snmp/doc/src/snmp_manager_netif.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -50,13 +50,14 @@
<p>The snmp application provides two different modules,
<c>snmpm_net_if</c> (the default) and <c>snmpm_net_if_mt</c>,
- both uses the UDP as the transport protocol. The difference
- between the two modules is that the latter is "multi-threaded",
- i.e. for each message/request a new process is created that
- process the message/request and then exits. </p>
+ both uses UDP as the transport protocol i.e the transport domains
+ <c>transportDomainUdpIpv4</c> and/or <c>transportDomainUdpIpv6</c>.
+ The difference between the two modules is that the latter is
+ "multi-threaded", i.e. for each message/request a new process
+ is created that processes the message/request and then exits. </p>
- <p>It is also possible to write your own Net if process,
- this section describes how to write a Net if processdo that.</p>
+ <p>It is also possible to write your own Net if process and
+ this section describes how to do that.</p>
<section>
<marker id="mandatory_functions"></marker>
@@ -70,11 +71,17 @@
<p>The section <em>Messages</em> describes mandatory messages, which
Net if must send to the manager server process.
</p>
+ <p>In this section a <c>Domain</c> field is the transport domain i.e
+ one of <c>transportDomainUdpIpv4</c> or <c>transportDomainUdpIpv6</c>,
+ and an <c>Addr</c> field is an
+ <c>{<seealso marker="kernel:inet#type-ip_address">IpAddr</seealso>,
+ IpPort}</c> tuple.</p>
+
<p>Net if must send the following message when it receives an
SNMP PDU from the network that is aimed for the MasterAgent:
</p>
<pre>
-Server ! {snmp_pdu, Pdu, Addr, Port}
+Server ! {snmp_pdu, Pdu, Domain, Addr}
</pre>
<list type="bulleted">
<item>
@@ -82,14 +89,14 @@ Server ! {snmp_pdu, Pdu, Addr, Port}
<c>snmp_types.hrl</c>, with the SNMP request.</p>
</item>
<item>
- <p><c>Addr</c> is the source address. </p>
+ <p><c>Domain</c> is the source transport domain. </p>
</item>
<item>
- <p><c>Port</c> is port number of the sender.</p>
+ <p><c>Addr</c> is the source address. </p>
</item>
</list>
<pre>
-Server ! {snmp_trap, Trap, Addr, Port}
+Server ! {snmp_trap, Trap, Domain, Addr}
</pre>
<list type="bulleted">
<item>
@@ -97,14 +104,14 @@ Server ! {snmp_trap, Trap, Addr, Port}
as defined in <c>snmp_types.hrl</c>, with the SNMP request.</p>
</item>
<item>
- <p><c>Addr</c> is the source address. </p>
+ <p><c>Domain</c> is the source transport domain. </p>
</item>
<item>
- <p><c>Port</c> is port number of the sender.</p>
+ <p><c>Addr</c> is the source address. </p>
</item>
</list>
<pre>
-Server ! {snmp_inform, Ref, Pdu, PduMS, Addr, Port}
+Server ! {snmp_inform, Ref, Pdu, PduMS, Domain, Addr}
</pre>
<list type="bulleted">
<item>
@@ -123,14 +130,14 @@ Server ! {snmp_inform, Ref, Pdu, PduMS, Addr, Port}
<c>snmp_types.hrl</c>, with the SNMP request.</p>
</item>
<item>
- <p><c>Addr</c> is the source address. </p>
+ <p><c>Domain</c> is the source transport domain. </p>
</item>
<item>
- <p><c>Port</c> is port number of the sender.</p>
+ <p><c>Addr</c> is the source address. </p>
</item>
</list>
<pre>
-Server ! {snmp_report, Data, Addr, Port}
+Server ! {snmp_report, Data, Domain, Addr}
</pre>
<list type="bulleted">
<item>
@@ -152,10 +159,10 @@ Server ! {snmp_report, Data, Addr, Port}
<p><c>ReasonInfo</c> is a term().</p>
</item>
<item>
- <p><c>Addr</c> is the source address. </p>
+ <p><c>Domain</c> is the source transport domain. </p>
</item>
<item>
- <p><c>Port</c> is port number of the sender.</p>
+ <p><c>Addr</c> is the source address. </p>
</item>
</list>
diff --git a/lib/snmp/doc/src/snmp_mib_compiler.xml b/lib/snmp/doc/src/snmp_mib_compiler.xml
index 63af19f479..db0d7a344e 100644
--- a/lib/snmp/doc/src/snmp_mib_compiler.xml
+++ b/lib/snmp/doc/src/snmp_mib_compiler.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_notification_mib.xml b/lib/snmp/doc/src/snmp_notification_mib.xml
index d1d83570d1..963fffe98c 100644
--- a/lib/snmp/doc/src/snmp_notification_mib.xml
+++ b/lib/snmp/doc/src/snmp_notification_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_pdus.xml b/lib/snmp/doc/src/snmp_pdus.xml
index 6c323c3ad9..2051ab291b 100644
--- a/lib/snmp/doc/src/snmp_pdus.xml
+++ b/lib/snmp/doc/src/snmp_pdus.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_standard_mib.xml b/lib/snmp/doc/src/snmp_standard_mib.xml
index e8dea46f32..7c9bfdb6fe 100644
--- a/lib/snmp/doc/src/snmp_standard_mib.xml
+++ b/lib/snmp/doc/src/snmp_standard_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_target_mib.xml b/lib/snmp/doc/src/snmp_target_mib.xml
index d5151d41de..a076ff2d8e 100644
--- a/lib/snmp/doc/src/snmp_target_mib.xml
+++ b/lib/snmp/doc/src/snmp_target_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -38,18 +38,18 @@
functions for the SNMP-TARGET-MIB,
and functions for configuring the database. </p>
<p>The configuration files are described in the SNMP User's Manual.</p>
+ <p>Legacy API functions <c>add_addr/10</c> that does not specify
+ transport domain, and <c>add_addr/11</c> that has got separate
+ <c>IpAddr</c> and <c>PortNumber</c> arguments still work as before
+ for backwards compatibility reasons.</p>
<marker id="types"></marker>
</description>
<section>
<title>DATA TYPES</title>
- <code type="none"><![CDATA[
-transportDomain() = transportDomainUdpIpv4 | transportDomainUdpIpv6
-transportAddressIPv4() = [integer()], length 4
-transportAddressIPv6() = [integer()], length 8
-transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
- ]]></code>
+ <p>See the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
<marker id="configure"></marker>
</section>
@@ -129,20 +129,18 @@ transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
</func>
<func>
- <name>add_addr(Name, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret</name>
- <name>add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret</name>
+ <name>add_addr(Name, Domain, Addr, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret</name>
<fsummary>Add one target address definition</fsummary>
<type>
<v>Name = string()</v>
<v>Domain = transportDomain()</v>
- <v>Ip = transportAddressIPv4() | transportAddressIPv6() (depends on the value of Domain)</v>
- <v>Port = integer()</v>
+ <v>Addr = transportAddress() % Default port is 162</v>
<v>Timeout = integer()</v>
<v>Retry = integer()</v>
<v>TagList = string()</v>
<v>ParamsName = string()</v>
<v>EngineId = string()</v>
- <v>TMask = transportAddressMask() (depends on Domain)</v>
+ <v>TMask = transportAddressMask() % Depends on Domain</v>
<v>MMS = integer()</v>
<v>Ret = {ok, Key} | {error, Reason}</v>
<v>Key = term()</v>
diff --git a/lib/snmp/doc/src/snmp_user_based_sm_mib.xml b/lib/snmp/doc/src/snmp_user_based_sm_mib.xml
index 7485e5af57..e4eec88c57 100644
--- a/lib/snmp/doc/src/snmp_user_based_sm_mib.xml
+++ b/lib/snmp/doc/src/snmp_user_based_sm_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmp_view_based_acm_mib.xml b/lib/snmp/doc/src/snmp_view_based_acm_mib.xml
index d595f6b93b..0e6e7144b4 100644
--- a/lib/snmp/doc/src/snmp_view_based_acm_mib.xml
+++ b/lib/snmp/doc/src/snmp_view_based_acm_mib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2010</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml
index cc8681e5c8..d484a6b7cf 100644
--- a/lib/snmp/doc/src/snmpa.xml
+++ b/lib/snmp/doc/src/snmpa.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/snmp/doc/src/snmpa_conf.xml b/lib/snmp/doc/src/snmpa_conf.xml
index a533c179ee..2780cec156 100644
--- a/lib/snmp/doc/src/snmpa_conf.xml
+++ b/lib/snmp/doc/src/snmpa_conf.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2006</year><year>2011</year>
+ <year>2006</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -45,20 +45,56 @@
<title>DATA TYPES</title>
<code type="none"><![CDATA[
transportDomain() = transportDomainUdpIpv4 | transportDomainUdpIpv6
-transportAddressIPv4() = [integer()], length 4
-transportAddressIPv6() = [integer()], length 8
-transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
+
+transportAddress() =
+ transportAddressIPv4() | transportAddressIPv6()
+
+transportAddressWithPort() =
+ transportAddressIPv4WithPort() | transportAddressIPv6WithPort()
+
+transportAddressWithoutPort() =
+ transportAddressIPv4WithoutPort() | transportAddressIPv6WithoutPort()
+
+transportAddressIPv4() =
+ transportAddressIPv4WithPort() | transportAddressIPv4WithoutPort()
+transportAddressIPv4WithPort =
+ {transportAddressIPv4WithoutPort(), inet:port_number()} |
+ [byte() x 4, byte() x 2]
+transportAddressIPv4WithoutPort =
+ inet:ip4_address() | [byte() x 4]
+
+transportAddressIPv6() =
+ transportAddressIPv6WithPort() | transportAddressIPv6WithoutPort()
+transportAddressIPv6WithPort =
+ {transportAddressIPv6WithoutPort(), inet:port_number()} |
+ [word() x 8, inet:port_number()] |
+ [word() x 8, byte() x 2] |
+ {byte() x 16, byte() x 2]
+transportAddressIPv6WithoutPort =
+ inet:ip6_address() | [word() x 8] | [byte() x 16]
+
+transportAddressMask() =
+ [] | transportAddressWithPort()
+
+byte() = 0..255
+word() = 0..65535
]]></code>
+ <p>For <c>inet:ip4_address()</c>, <c>inet:ip6_address()</c>
+ and <c>inet:port_number()</c>, see also
+ <seealso marker="kernel:inet#type-ip_address">
+ <c>inet:ip_address()</c></seealso></p>
<marker id="agent_entry"></marker>
</section>
+
+
<funcs>
<func>
<name>agent_entry(Tag, Val) -> agent_entry()</name>
<fsummary>Create an agent entry</fsummary>
<type>
- <v>Tag = intAgentIpAddress | intAgentUDPPort | intAgentMaxPacketSize | snmpEngineMaxMessageSize | snmpEngineID</v>
+ <v>Tag = intAgentTransports | intAgentUDPPort | intAgentMaxPacketSize | snmpEngineMaxMessageSize | snmpEngineID</v>
<v>Val = term()</v>
<v>agent_entry() = term()</v>
</type>
@@ -390,17 +426,15 @@ transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
</func>
<func>
- <name>target_addr_entry(Name, Ip, TagList, ParamsName, EngineId) -> target_addr_entry()</name>
- <name>target_addr_entry(Name, Ip, TagList, ParamsName, EngineId, TMask) -> target_addr_entry()</name>
- <name>target_addr_entry(Name, Ip, Udp, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()</name>
- <name>target_addr_entry(Name, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()</name>
- <name>target_addr_entry(Name, Domain, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()</name>
+ <name>target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId) -> target_addr_entry()</name>
+ <name>target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask) -> target_addr_entry()</name>
+ <name>target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()</name>
+ <name>target_addr_entry(Name, Domain, Addr, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()</name>
<fsummary>Create an target_addr entry</fsummary>
<type>
<v>Name = string()</v>
<v>Domain = transportDomain()</v>
- <v>Ip = transportAddressIPv4() | transportAddressIPv6() (depends on Domain)</v>
- <v>Udp = integer()</v>
+ <v>Ip = transportAddress() (depends on Domain)</v>
<v>Timeout = integer()</v>
<v>RetryCount = integer()</v>
<v>TagList = string()</v>
@@ -414,12 +448,12 @@ transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
<p>Create an entry for the agent target_addr config file,
<c>target_addr.conf</c>. </p>
<p><c>Name</c> must be a <em>non-empty</em> string. </p>
- <p><c>target_addr_entry/5</c> translates to the following call:
- <c>target_addr_entry(Name, Ip, TagList, ParamsName, EngineId)</c>. </p>
<p><c>target_addr_entry/6</c> translates to the following call:
- <c>target_addr_entry(Name, Ip, 162, TagList, ParamsName, EngineId, TMask, 2048)</c>. </p>
+ <c>target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, [])</c>. </p>
+ <p><c>target_addr_entry/7</c> translates to the following call:
+ <c>target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048)</c>. </p>
<p><c>target_addr_entry/8</c> translates to the following call:
- <c>target_addr_entry(Name, Ip, Udp, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize)</c>. </p>
+ <c>target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize)</c>. </p>
<p>See
<seealso marker="snmp_agent_config_files#target_addr">Target Address Definitions</seealso>
for more info. </p>
diff --git a/lib/snmp/doc/src/snmpa_discovery_handler.xml b/lib/snmp/doc/src/snmpa_discovery_handler.xml
index 47814221aa..309a21ec32 100644
--- a/lib/snmp/doc/src/snmpa_discovery_handler.xml
+++ b/lib/snmp/doc/src/snmpa_discovery_handler.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_error.xml b/lib/snmp/doc/src/snmpa_error.xml
index 4dbafdfbb7..2cc44a9e79 100644
--- a/lib/snmp/doc/src/snmpa_error.xml
+++ b/lib/snmp/doc/src/snmpa_error.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2010</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_error_io.xml b/lib/snmp/doc/src/snmpa_error_io.xml
index 33fbfac20c..fc90db4bf9 100644
--- a/lib/snmp/doc/src/snmpa_error_io.xml
+++ b/lib/snmp/doc/src/snmpa_error_io.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_error_logger.xml b/lib/snmp/doc/src/snmpa_error_logger.xml
index 06382a6057..b2bf1c4181 100644
--- a/lib/snmp/doc/src/snmpa_error_logger.xml
+++ b/lib/snmp/doc/src/snmpa_error_logger.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_error_report.xml b/lib/snmp/doc/src/snmpa_error_report.xml
index 421202bade..f58287da08 100644
--- a/lib/snmp/doc/src/snmpa_error_report.xml
+++ b/lib/snmp/doc/src/snmpa_error_report.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_local_db.xml b/lib/snmp/doc/src/snmpa_local_db.xml
index c077bc96d8..e617aa0893 100644
--- a/lib/snmp/doc/src/snmpa_local_db.xml
+++ b/lib/snmp/doc/src/snmpa_local_db.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_mib_data.xml b/lib/snmp/doc/src/snmpa_mib_data.xml
index c1ea0a91f9..95a33e603e 100644
--- a/lib/snmp/doc/src/snmpa_mib_data.xml
+++ b/lib/snmp/doc/src/snmpa_mib_data.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2013</year><year>2013</year>
+ <year>2013</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_mib_storage.xml b/lib/snmp/doc/src/snmpa_mib_storage.xml
index a857ce79e8..791fbc80fe 100644
--- a/lib/snmp/doc/src/snmpa_mib_storage.xml
+++ b/lib/snmp/doc/src/snmpa_mib_storage.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2013</year><year>2013</year>
+ <year>2013</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_mpd.xml b/lib/snmp/doc/src/snmpa_mpd.xml
index 202e6b5661..518100d30c 100644
--- a/lib/snmp/doc/src/snmpa_mpd.xml
+++ b/lib/snmp/doc/src/snmpa_mpd.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2010</year>
+ <year>1999</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -43,6 +43,12 @@
<marker id="init"></marker>
</description>
+ <section>
+ <title>DATA TYPES</title>
+ <p>See the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
+ </section>
+
<funcs>
<func>
<name>init(Vsns) -> mpd_state()</name>
@@ -63,16 +69,17 @@
</func>
<func>
- <name>process_packet(Packet, TDomain, TAddress, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
- <name>process_packet(Packet, TDomain, TAddress, LocalEngineID, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
+ <name>process_packet(Packet, From, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
+ <name>process_packet(Packet, From, LocalEngineID, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
<fsummary>Process a packet received from the network</fsummary>
<type>
<v>Packet = binary()</v>
- <v>TDomain = snmpUDPDomain</v>
- <v>TAddress = {Ip, Udp}</v>
+ <v>From = {TDomain, TAddr}</v>
+ <v>TDomain = transportDomainUdpIpv4 | transportDomainUdpIpv6</v>
+ <v>TAddr = {IpAddr, IpPort}</v>
<v>LocalEngineID = string()</v>
- <v>Ip = {integer(), integer(), integer(), integer()}</v>
- <v>Udp = integer()</v>
+ <v>IpAddr = <seealso marker="kernel:inet#type-ip_address">inet:ip_address()</seealso></v>
+ <v>IpPort = inet:port_number()</v>
<v>State = mpd_state()</v>
<v>NoteStore = pid()</v>
<v>Log = snmp_log()</v>
@@ -85,7 +92,7 @@
</type>
<desc>
<p>Processes an incoming packet. Performs authentication and
- decryption as necessary. The return values should be passed the
+ decryption as necessary. The return values should be passed to the
agent.</p>
<note>
@@ -150,14 +157,20 @@
network.
</p>
<p><c>MsgData</c> is the message specific data used in
- the SNMP message. This value is received in a <c>send_pdu</c>
- or <c>send_pdu_req</c> message from the agent. In SNMPv1 and
+ the SNMP message. This value is received in a
+ <seealso marker="snmp_agent_netif#im_send_pdu"><c>send_pdu</c></seealso>
+ or
+ <seealso marker="snmp_agent_netif#im_send_pdu_req">
+ <c>send_pdu_req</c></seealso>
+ message from the agent. In SNMPv1 and
SNMPv2c, this message data is the community string. In
- SNMPv3, it is the context information.
- <c>To</c> is a list of the destination addresses and
+ SNMPv3, it is the context information.</p>
+ <p>
+ <c>To</c> is a list of destination addresses and
their corresponding security parameters. This value is
- also received from the requests mentioned above.
- </p>
+ received in the same message from the agent and then transformed
+ trough <seealso marker="#process_taddrs"><c>process_taddrs</c></seealso>
+ before passed to this function.</p>
<note>
<p>Note that the use of the LocalEngineID argument is only intended
@@ -166,6 +179,32 @@
(see SNMP-FRAMEWORK-MIB). </p>
</note>
+ <marker id="process_taddrs"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>process_taddrs(TDests) -> Dests</name>
+ <fsummary>Transform addresses from internal MIB format to a less internal
+ </fsummary>
+ <type>
+ <v>TDests = [TDest]</v>
+ <v>TDest = {{TDomain, TAddr}, SecData} | {TDomain, TAddr}</v>
+ <v>TDomain = term() % Not at tuple</v>
+ <v>TAddr = term()</v>
+ <v>SecData = term()</v>
+ <v>Dests = [Dest]</v>
+ <v>Dest = {{Domain, Addr}, SecData} | {Domain, Addr}</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddress() % Depends on Domain</v>
+ </type>
+ <desc>
+ <p>Transforms addresses from internal MIB format to one
+ more useful to <seealso marker="snmp_agent_netif">Agent Net if</seealso>.
+ </p>
+ <p>See also <seealso marker="#generate_msg"><c>generate_msg</c>.</seealso>
+ </p>
+
<marker id="discarded_pdu"></marker>
</desc>
</func>
diff --git a/lib/snmp/doc/src/snmpa_network_interface.xml b/lib/snmp/doc/src/snmpa_network_interface.xml
index a986343a4f..5fc51b1e53 100644
--- a/lib/snmp/doc/src/snmpa_network_interface.xml
+++ b/lib/snmp/doc/src/snmpa_network_interface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_network_interface_filter.xml b/lib/snmp/doc/src/snmpa_network_interface_filter.xml
index bff0a24879..eb640e1bc3 100644
--- a/lib/snmp/doc/src/snmpa_network_interface_filter.xml
+++ b/lib/snmp/doc/src/snmpa_network_interface_filter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2012</year>
+ <year>2007</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -58,10 +58,10 @@
on two levels: </p>
<list type="bulleted">
<item>
- <p>The first level is at the UDP entry / exit point, i.e.
- immediately after the receipt of the message, before any message
+ <p>The first level is at the transport entry / exit point, i.e.
+ immediately after the receipt of the message before any message
processing is done (accept_recv) and
- immediately before sending the message, after all message
+ immediately before sending the message after all message
processing is done (accept_send).</p>
</item>
<item>
@@ -78,6 +78,12 @@
<seealso marker="snmp_app#configuration_params">req_limit</seealso> and
the function
<seealso marker="snmpa#register_notification_filter">register_notification_filter</seealso>. </p>
+ <p>Legacy network interface filter modules used arguments on the form
+ <c>(IpAddr, PortNumber,...)</c> instead of
+ <c>(Domain, Addr, ...)</c>, and if the SNMP agent is run without
+ changing the configuration to use transport domains
+ the network interface filter will still get
+ the old arguments and work as before.</p>
</description>
<section>
@@ -88,15 +94,17 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
'set-request' | trap | 'get-bulk-request' | 'inform-request' |
report
</code>
+ <p>See also the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
<marker id="accept_recv"></marker>
</section>
<funcs>
<func>
- <name>accept_recv(Ip, Port) -> boolean()</name>
+ <name>accept_recv(Domain, Addr) -> boolean()</name>
<fsummary>Shall the received message be accepted</fsummary>
<type>
- <v>Ip = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
</type>
<desc>
<p>Called at the reception of a message (before <em>any</em> processing
@@ -107,11 +115,11 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</desc>
</func>
<func>
- <name>accept_send(Ip, Port) -> boolean()</name>
+ <name>accept_send(Domain, Addr) -> boolean()</name>
<fsummary>Shall the message be sent</fsummary>
<type>
- <v>Ip = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
</type>
<desc>
<p>Called before the sending of a message (after <em>all</em> processing
@@ -122,11 +130,11 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</desc>
</func>
<func>
- <name>accept_recv_pdu(Ip, Port, PduType) -> boolean()</name>
+ <name>accept_recv_pdu(Domain, Addr, PduType) -> boolean()</name>
<fsummary>Shall the received pdu be accepted</fsummary>
<type>
- <v>Ip = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
<v>PduType = pdu_type()</v>
</type>
<desc>
@@ -144,7 +152,9 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
<type>
<v>Targets = targets()</v>
<v>targets() = [target()]</v>
- <v>target() = {ip_address(), port()}</v>
+ <v>target() = {Domain, Addr}</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
<v>PduType = pdu_type() > 0</v>
<v>Reply = boolean() | NewTargets</v>
<v>NewTargets = targets()</v>
@@ -155,7 +165,7 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
<p>For the message to be discarded all together, the function
<em>must</em> return <em>false</em>. </p>
<p>Note that it is possible for this function to filter out targets
- (but <em>not</em> add its own) by returning an updated
+ (but <em>not</em> to add its own) by returning an updated
<c>Targets</c> list (<c>NewTargets</c>). </p>
</desc>
</func>
diff --git a/lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml b/lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml
index c52479f76a..814f02a14c 100644
--- a/lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml
+++ b/lib/snmp/doc/src/snmpa_notification_delivery_info_receiver.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2008</year>
- <year>2009</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -45,22 +45,30 @@
must export the following functions: </p>
<list type="bulleted">
<item>
- <p><seealso marker="#delivery_targets">delivery_targets/3</seealso></p>
+ <p><seealso marker="#delivery_targets/3">delivery_targets/3</seealso></p>
</item>
<item>
- <p><seealso marker="#delivery_info">delivery_info/4</seealso></p>
+ <p><seealso marker="#delivery_info/4">delivery_info/4</seealso></p>
</item>
</list>
<p>The semantics of them and their exact signatures are explained
below. </p>
+ <p>Legacy notification delivery information receiver modules
+ used a target argument on the form
+ <c>{IpAddr, PortNumber}</c> instead of
+ <c>{Domain, Addr}</c>, and if the SNMP Agent is run without
+ changing the configuration to use transport domains
+ the notification delivery information receiver will still get
+ the old arguments and work as before.</p>
+
</description>
<section>
<title>DATA TYPES</title>
- <code type="none"><![CDATA[
-address() = A 4-tuple
- ]]></code>
+ <p>See the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
+ <marker id="accept_recv"></marker>
<marker id="delivery_targets"></marker>
</section>
@@ -71,10 +79,8 @@ address() = A 4-tuple
<fsummary>Inform about target addresses</fsummary>
<type>
<v>Tag = term()</v>
- <v>Targets = [target()]</v>
- <v>target() = {Address, Port}</v>
- <v>Address = address()</v>
- <v>Port = integer()</v>
+ <v>Targets = [Target]</v>
+ <v>Target = {transportDomain(), transportAddressWithPort()</v>
<v>Extra = term()</v>
</type>
<desc>
@@ -94,10 +100,8 @@ address() = A 4-tuple
<fsummary>Inform about delivery result</fsummary>
<type>
<v>Tag = term()</v>
- <v>Target = target()</v>
- <v>target() = {Address, Port}</v>
- <v>Address = address()</v>
- <v>Port = integer()</v>
+ <v>Targets = [Target]</v>
+ <v>Target = {transportDomain(), transportAddressWithPort()</v>
<v>DeliveryResult = delivery_result()</v>
<v>delivery_result() = no_response | got_response</v>
<v>Extra = term()</v>
diff --git a/lib/snmp/doc/src/snmpa_notification_filter.xml b/lib/snmp/doc/src/snmpa_notification_filter.xml
index c3b300ecab..accce286bd 100644
--- a/lib/snmp/doc/src/snmpa_notification_filter.xml
+++ b/lib/snmp/doc/src/snmpa_notification_filter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_supervisor.xml b/lib/snmp/doc/src/snmpa_supervisor.xml
index 89b4eb8d54..8fc178b97b 100644
--- a/lib/snmp/doc/src/snmpa_supervisor.xml
+++ b/lib/snmp/doc/src/snmpa_supervisor.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpc.xml b/lib/snmp/doc/src/snmpc.xml
index 61d19251c5..8eb490d391 100644
--- a/lib/snmp/doc/src/snmpc.xml
+++ b/lib/snmp/doc/src/snmpc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpc_cmd.xml b/lib/snmp/doc/src/snmpc_cmd.xml
index 971f8a3cff..e14b9f8e25 100644
--- a/lib/snmp/doc/src/snmpc_cmd.xml
+++ b/lib/snmp/doc/src/snmpc_cmd.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>2011</year><year>2011</year>
+ <year>2011</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml
index a0a1b5716d..ff90e49968 100644
--- a/lib/snmp/doc/src/snmpm.xml
+++ b/lib/snmp/doc/src/snmpm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -69,6 +69,9 @@ sec_name() = string()
sec_level() = noAuthNoPriv | authNoPriv | authPriv
]]></code>
+ <p>See also the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
+
<marker id="monitor"></marker>
</section>
<funcs>
@@ -300,9 +303,9 @@ sec_level = noAuthNoPriv | authNoPriv | authPriv
<p>The type of <c>Val</c> depends on <c>Item</c>: </p>
<code type="none"><![CDATA[
[mandatory] engine_id = string()
-[mandatory] address = ip_address()
-[optional] port = integer()
-[optional] tdomain = transportDomainUdpIpv4 | transportDomainUdpIpv6
+[mandatory] tadress = transportAddress() % Depends on tdomain
+[optional] port = inet:port_number()
+[optional] tdomain = transportDomain()
[optional] community = string()
[optional] timeout = integer() | snmp_timer()
[optional] max_message_size = integer()
@@ -313,7 +316,8 @@ sec_level = noAuthNoPriv | authNoPriv | authPriv
]]></code>
<p>Note that if no <c>tdomain</c> is given, the default value,
<c>transportDomainUdpIpv4</c>, is used.</p>
- <p>Note that if no <c>port</c> is given, the default value is used.</p>
+ <p>Note that if no <c>port</c> is given and if <c>taddress</c> does not
+ contain a port number, the default value is used.</p>
<marker id="unregister_agent"></marker>
</desc>
diff --git a/lib/snmp/doc/src/snmpm_conf.xml b/lib/snmp/doc/src/snmpm_conf.xml
index 177e29faa3..8635fb705b 100644
--- a/lib/snmp/doc/src/snmpm_conf.xml
+++ b/lib/snmp/doc/src/snmpm_conf.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -195,14 +195,14 @@
</desc>
</func>
<func>
- <name>agents_entry(UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry()</name>
+ <name>agents_entry(UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry()</name>
<fsummary>Create an agents entry</fsummary>
<type>
<v>UserId = term()</v>
<v>TargetName = string()</v>
<v>Comm = string()</v>
- <v>Ip = string()</v>
- <v>Port = integer()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddress()</v>
<v>EngineID = string()</v>
<v>Timeout = integer()</v>
<v>MaxMessageSize = integer()</v>
diff --git a/lib/snmp/doc/src/snmpm_mpd.xml b/lib/snmp/doc/src/snmpm_mpd.xml
index 030c79e0e6..c23b2b6833 100644
--- a/lib/snmp/doc/src/snmpm_mpd.xml
+++ b/lib/snmp/doc/src/snmpm_mpd.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -39,7 +39,12 @@
It is supposed to be used from a Network Interface process
(<seealso marker="snmp_manager_netif">Definition of Manager Net if</seealso>).
</p>
+
+ <p>Legacy API function <c>process_msg/7</c> that has got separate
+ <c>IpAddr</c> and <c>PortNumber</c> arguments still works as before
+ for backwards compatibility reasons.</p>
</description>
+
<funcs>
<func>
<name>init_mpd(Vsns) -> mpd_state()</name>
@@ -58,13 +63,12 @@
</desc>
</func>
<func>
- <name>process_msg(Msg, TDomain, Addr, Port, State, NoteStore, Logger) -> {ok, Vsn, Pdu, PduMS, MsgData} | {discarded, Reason}</name>
+ <name>process_msg(Msg, Domain, Addr, State, NoteStore, Logger) -> {ok, Vsn, Pdu, PduMS, MsgData} | {discarded, Reason}</name>
<fsummary>Process a message received from the network</fsummary>
<type>
<v>Msg = binary()</v>
- <v>TDomain = snmpUDPDomain</v>
- <v>Addr = {integer(), integer(), integer(), integer()}</v>
- <v>Port = integer()</v>
+ <v>Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6</v>
+ <v>Addr = {<seealso marker="kernel:inet#type-ip_address">inet:ip_address(), inet:port_number()</seealso>} </v>
<v>State = mpd_state()</v>
<v>NoteStore = pid()</v>
<v>Logger = function()</v>
diff --git a/lib/snmp/doc/src/snmpm_network_interface.xml b/lib/snmp/doc/src/snmpm_network_interface.xml
index 33eb736b8f..bea6b46dc7 100644
--- a/lib/snmp/doc/src/snmpm_network_interface.xml
+++ b/lib/snmp/doc/src/snmpm_network_interface.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -69,6 +69,10 @@
<p>The semantics of them and their exact signatures are explained
below. </p>
+ <p>Legacy API function <c>send_pdu/7</c> that has got separate
+ <c>IpAddr</c> and <c>PortNumber</c> arguments still works as before
+ for backwards compatibility reasons.</p>
+
<marker id="start_link"></marker>
</description>
@@ -103,15 +107,15 @@
</func>
<func>
- <name>send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ExtraInfo) -> void()</name>
+ <name>send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo) -> void()</name>
<fsummary>Request the network interface process to send this pdu</fsummary>
<type>
<v>Pid = pid()</v>
<v>Pdu = pdu()</v>
<v>Vsn = 'version-1' | 'version-2' | 'version-3'</v>
<v>MsgData = term()</v>
- <v>Addr = address()</v>
- <v>Port = integer()</v>
+ <v>Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6</v>
+ <v>Addr = {<seealso marker="kernel:inet#type-ip_address">inet:ip_address(), inet:port_number()</seealso>} </v>
<v>ExtraInfo = term()</v>
</type>
<desc>
diff --git a/lib/snmp/doc/src/snmpm_network_interface_filter.xml b/lib/snmp/doc/src/snmpm_network_interface_filter.xml
index 4dc133dd71..1ef4f29c0f 100644
--- a/lib/snmp/doc/src/snmpm_network_interface_filter.xml
+++ b/lib/snmp/doc/src/snmpm_network_interface_filter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2012</year>
+ <year>2007</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -76,6 +76,12 @@
The default filter accepts all messages.</p>
<p>A network interface filter can e.g. be used during testing or for load
regulation. </p>
+ <p>Legacy network interface filter modules used arguments on the form
+ <c>(IpAddr, PortNumber,...)</c> instead of
+ <c>(Domain, Addr, ...)</c>, and if the SNMP manager is run without
+ changing the configuration to use transport domains
+ the network interface filter will still get
+ the old arguments and work as before.</p>
</description>
<section>
@@ -86,16 +92,18 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
'set-request' | trap | 'get-bulk-request' | 'inform-request' |
report | trappdu
</code>
+ <p>See also the <seealso marker="snmpa_conf#types">
+ data types in <c>snmpa_conf</c></seealso>.</p>
<marker id="accept_recv"></marker>
</section>
<funcs>
<func>
- <name>accept_recv(Addr, Port) -> boolean()</name>
+ <name>accept_recv(Domain, Addr) -> boolean()</name>
<fsummary>Shall the received message be accepted</fsummary>
<type>
- <v>Addr = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
</type>
<desc>
<p>Called at the reception of a message (before <em>any</em> processing
@@ -107,11 +115,11 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</func>
<func>
- <name>accept_send(Addr, Port) -> boolean()</name>
+ <name>accept_send(Domain, Addr) -> boolean()</name>
<fsummary>Shall the message be sent</fsummary>
<type>
- <v>Addr = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
</type>
<desc>
<p>Called before the sending of a message (after <em>all</em> processing
@@ -123,11 +131,11 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</func>
<func>
- <name>accept_recv_pdu(Addr, Port, PduType) -> boolean()</name>
+ <name>accept_recv_pdu(Domain, Addr, PduType) -> boolean()</name>
<fsummary>Shall the received pdu be accepted</fsummary>
<type>
- <v>Addr = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
<v>PduType = pdu_type()</v>
</type>
<desc>
@@ -141,11 +149,11 @@ pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
</func>
<func>
- <name>accept_send_pdu(Addr, Port, PduType) -> boolean()</name>
+ <name>accept_send_pdu(Domain, Addr, PduType) -> boolean()</name>
<fsummary>Shall the pdu be sent</fsummary>
<type>
- <v>Addr = ip_address()</v>
- <v>Port = port()</v>
+ <v>Domain = transportDomain()</v>
+ <v>Addr = transportAddressWithPort()</v>
<v>PduType = pdu_type() > 0</v>
</type>
<desc>
diff --git a/lib/snmp/doc/src/snmpm_user.xml b/lib/snmp/doc/src/snmpm_user.xml
index cb2deab976..a4492839cd 100644
--- a/lib/snmp/doc/src/snmpm_user.xml
+++ b/lib/snmp/doc/src/snmpm_user.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -63,10 +63,15 @@
<p>The semantics of them and their exact signatures are explained
below. </p>
<p>Some of the function has no defined return value (<c>void()</c>),
- they can ofcourse return anythyng. But the functions that do have
+ they can of course return anything. But the functions that do have
specified return value(s) <em>must</em> adhere to this. None of the
functions can use exit of throw to return. </p>
+ <p>If the manager is not configured to use any particular
+ transport domain, the behaviour <c>handle_agent/4</c>
+ will for backwards copmpatibility reasons be called with the old
+ <c>IpAddr</c> and <c>PortNumber</c> arguments</p>
+
<marker id="types"></marker>
</description>
@@ -116,11 +121,11 @@ snmp_v1_trap_info() :: {Enteprise :: snmp:oid(),
</func>
<func>
- <name>handle_agent(Addr, Port, Type, SnmpInfo, UserData) -> Reply</name>
+ <name>handle_agent(Domain, Addr, Type, SnmpInfo, UserData) -> Reply</name>
<fsummary>Handle agent</fsummary>
<type>
- <v>Addr = ip_address()</v>
- <v>Port = integer()</v>
+ <v>Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6</v>
+ <v>Addr = {<seealso marker="kernel:inet#type-ip_address">inet:ip_address(), inet:port_number()</seealso>} </v>
<v>Type = pdu | trap | report | inform</v>
<v>SnmpInfo = SnmpPduInfo | SnmpTrapInfo | SnmpReportInfo | SnmpInformInfo</v>
<v>SnmpPduInfo = snmp_gen_info()</v>
diff --git a/lib/snmp/src/agent/snmp_community_mib.erl b/lib/snmp/src/agent/snmp_community_mib.erl
index 7bdd500727..4546c343b7 100644
--- a/lib/snmp/src/agent/snmp_community_mib.erl
+++ b/lib/snmp/src/agent/snmp_community_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,6 +31,7 @@
-include("snmpa_internal.hrl").
-include("SNMP-COMMUNITY-MIB.hrl").
-include("SNMP-TARGET-MIB.hrl").
+-include("SNMPv2-TM.hrl").
-include("SNMPv2-TC.hrl").
-include("snmp_types.hrl").
@@ -129,10 +130,11 @@ read_community_config_files(Dir) ->
[FileName, D, Reason]),
ok
end,
- Filter = fun(Comms) -> Comms end,
- Check = fun(Entry) -> check_community(Entry) end,
+ Order = fun snmp_conf:no_order/2,
+ Filter = fun snmp_conf:no_filter/1,
+ Check = fun(Entry, State) -> {check_community(Entry), State} end,
[Comms] =
- snmp_conf:read_files(Dir, [{Gen, Filter, Check, "community.conf"}]),
+ snmp_conf:read_files(Dir, [{FileName, Gen, Order, Check, Filter}]),
Comms.
check_community({Index, CommunityName, SecName, CtxName, TransportTag}) ->
@@ -192,7 +194,7 @@ add_community(Idx, CommName, SecName, EngineId, CtxName, TransportTag) ->
do_add_community(Community).
do_add_community(Community) ->
- case (catch check_community(Community)) of
+ try check_community(Community) of
{ok, Row} ->
Key = element(1, Row),
case table_cre_row(snmpCommunityTable, Key, Row) of
@@ -201,11 +203,12 @@ do_add_community(Community) ->
{ok, Key};
false ->
{error, create_failed}
- end;
+ end
+ catch
{error, Reason} ->
{error, Reason};
- Error ->
- {error, Error}
+ Class:Reason ->
+ {error, {Class, Reason, erlang:get_stacktrace()}}
end.
%% FIXME: does not work with mnesia
@@ -243,6 +246,10 @@ gc_tabs() ->
%%-----------------------------------------------------------------
community2vacm(Community, Addr) ->
Idxs = ets:lookup(snmp_community_cache, Community),
+ ?vtrace("community2vacm ->~n"
+ " Community: ~p~n"
+ " Addr: ~p~n"
+ " Idxs: ~p", [Community, Addr, Idxs]),
loop_c2v_rows(lists:keysort(2, Idxs), Addr).
loop_c2v_rows([{_, CommunityIndex} | T], Addr) ->
@@ -250,6 +257,9 @@ loop_c2v_rows([{_, CommunityIndex} | T], Addr) ->
"~n CommunityIndex: ~p", [CommunityIndex]),
case get_row(CommunityIndex) of
{_Community, VacmParams, Tag} ->
+ ?vtrace("loop_c2v_rows ->~n"
+ " VacmParams: ~p~n"
+ " Tag: ~p", [VacmParams, Tag]),
{TDomain, TAddr} = Addr,
case snmp_target_mib:is_valid_tag(Tag, TDomain, TAddr) of
true ->
@@ -506,7 +516,12 @@ snmpTargetAddrExtTable(get_next, RowIndex, Cols) ->
NCols = conv1(Cols),
conv2(next(snmpTargetAddrExtTable, RowIndex, NCols));
snmpTargetAddrExtTable(set, RowIndex, Cols0) ->
- case (catch verify_snmpTargetAddrExtTable_cols(Cols0, [])) of
+ case
+ (catch verify_snmpTargetAddrExtTable_cols(
+ Cols0,
+ get_snmpTargetAddrTDomain(RowIndex, Cols0),
+ []))
+ of
{ok, Cols} ->
NCols = conv3(Cols),
snmp_generic:table_func(set, RowIndex, NCols,
@@ -515,7 +530,11 @@ snmpTargetAddrExtTable(set, RowIndex, Cols0) ->
Error
end;
snmpTargetAddrExtTable(is_set_ok, RowIndex, Cols0) ->
- case (catch verify_snmpTargetAddrExtTable_cols(Cols0, [])) of
+ case (catch verify_snmpTargetAddrExtTable_cols(
+ Cols0,
+ get_snmpTargetAddrTDomain(RowIndex, Cols0),
+ []))
+ of
{ok, Cols} ->
NCols = conv3(Cols),
snmp_generic:table_func(is_set_ok, RowIndex, NCols,
@@ -525,29 +544,49 @@ snmpTargetAddrExtTable(is_set_ok, RowIndex, Cols0) ->
end.
-verify_snmpTargetAddrExtTable_cols([], Cols) ->
+
+get_snmpTargetAddrTDomain(RowIndex, Col) ->
+ case
+ get(
+ snmpTargetAddrTable, RowIndex,
+ [?snmpTargetAddrRowStatus,?snmpTargetAddrTDomain])
+ of
+ [{value,?snmpTargetAddrRowStatus_active},ValueTDomain] ->
+ case ValueTDomain of
+ {value,TDomain} ->
+ TDomain;
+ _ ->
+ ?snmpUDPDomain
+ end;
+ _ ->
+ wrongValue(Col)
+ end.
+
+
+
+verify_snmpTargetAddrExtTable_cols([], _TDomain, Cols) ->
{ok, lists:reverse(Cols)};
-verify_snmpTargetAddrExtTable_cols([{Col, Val0}|Cols], Acc) ->
- Val = verify_snmpTargetAddrExtTable_col(Col, Val0),
- verify_snmpTargetAddrExtTable_cols(Cols, [{Col, Val}|Acc]).
+verify_snmpTargetAddrExtTable_cols([{Col, Val0}|Cols], TDomain, Acc) ->
+ Val = verify_snmpTargetAddrExtTable_col(Col, TDomain, Val0),
+ verify_snmpTargetAddrExtTable_cols(Cols, TDomain, [{Col, Val}|Acc]).
-verify_snmpTargetAddrExtTable_col(?snmpTargetAddrTMask, []) ->
+verify_snmpTargetAddrExtTable_col(?snmpTargetAddrTMask, _TDomain, []) ->
[];
-verify_snmpTargetAddrExtTable_col(?snmpTargetAddrTMask, TMask) ->
- case (catch snmp_conf:check_taddress(TMask)) of
+verify_snmpTargetAddrExtTable_col(?snmpTargetAddrTMask, TDomain, TMask) ->
+ case (catch snmp_conf:check_taddress(TDomain, TMask)) of
ok ->
TMask;
_ ->
wrongValue(?snmpTargetAddrTMask)
end;
-verify_snmpTargetAddrExtTable_col(?snmpTargetAddrMMS, MMS) ->
+verify_snmpTargetAddrExtTable_col(?snmpTargetAddrMMS, _TDomain, MMS) ->
case (catch snmp_conf:check_packet_size(MMS)) of
ok ->
MMS;
_ ->
wrongValue(?snmpTargetAddrMMS)
end;
-verify_snmpTargetAddrExtTable_col(_, Val) ->
+verify_snmpTargetAddrExtTable_col(_, _TDomain, Val) ->
Val.
db(snmpTargetAddrExtTable) -> db(snmpTargetAddrTable);
@@ -583,6 +622,7 @@ conv3([{Idx, Val}|T]) -> [{Idx+10, Val} | conv3(T)];
conv3([]) -> [].
+
get(Name, RowIndex, Cols) ->
snmp_generic:handle_table_get(db(Name), RowIndex, Cols, foi(Name)).
diff --git a/lib/snmp/src/agent/snmp_framework_mib.erl b/lib/snmp/src/agent/snmp_framework_mib.erl
index cc191bd956..6ff9224d34 100644
--- a/lib/snmp/src/agent/snmp_framework_mib.erl
+++ b/lib/snmp/src/agent/snmp_framework_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,6 +41,7 @@
-compile({no_auto_import,[error/1]}).
-export([init/0, configure/1]).
-export([intContextTable/1, intContextTable/3,
+ intAgentTransportDomain/1, intAgentTransports/1,
intAgentUDPPort/1, intAgentIpAddress/1,
snmpEngineID/1,
snmpEngineBoots/1,
@@ -51,7 +52,7 @@
set_engine_boots/1, set_engine_time/1,
table_next/2, check_status/3]).
-export([add_context/1, delete_context/1]).
--export([check_agent/1, check_context/1]).
+-export([check_agent/2, check_context/1, order_agent/2]).
%%-----------------------------------------------------------------
@@ -115,54 +116,46 @@ do_configure(Dir) ->
read_internal_config_files(Dir) ->
?vdebug("read context config file",[]),
- Gen = fun(D, Reason) ->
- convert_context(D, Reason)
- end,
- Filter = fun(Contexts) -> Contexts end,
- Check = fun(Entry) -> check_context(Entry) end,
- [Ctxs] = snmp_conf:read_files(Dir, [{Gen, Filter, Check, "context.conf"}]),
+ Gen = fun gen_context/2,
+ Order = fun snmp_conf:no_order/2,
+ Filter = fun snmp_conf:no_filter/1,
+ Check = fun(Entry, State) -> {check_context(Entry), State} end,
+ [Ctxs] =
+ snmp_conf:read_files
+ (Dir, [{"context.conf", Gen, Order, Check, Filter}]),
Ctxs.
-
read_agent(Dir) ->
?vdebug("read agent config file", []),
- FileName = "agent.conf",
- Check = fun(Entry) -> check_agent(Entry) end,
+ FileName = "agent.conf",
File = filename:join(Dir, FileName),
- Agent =
+ Conf0 =
try
- snmp_conf:read(File, Check)
+ snmp_conf:read(File, fun order_agent/2, fun check_agent/2)
catch
throw:{error, Reason} ->
error({failed_reading_config_file, Dir, FileName, Reason})
end,
- sort_agent(Agent).
-
-
-%%-----------------------------------------------------------------
-%% Make sure that each mandatory agent attribute is present, and
-%% provide default values for the other non-present attributes.
-%%-----------------------------------------------------------------
-sort_agent(L) ->
- Mand = [{intAgentIpAddress, mandatory},
- {intAgentUDPPort, mandatory},
- {snmpEngineMaxMessageSize, mandatory},
- {snmpEngineID, mandatory}],
- {ok, L2} = snmp_conf:check_mandatory(L, Mand),
- lists:keysort(1, L2).
+ Mand =
+ [{intAgentTransports, mandatory},
+ {snmpEngineMaxMessageSize, mandatory},
+ {snmpEngineID, mandatory}],
+ {ok, Conf} = snmp_conf:check_mandatory(Conf0, Mand),
+ Conf.
%%-----------------------------------------------------------------
%% Generate a context.conf file.
%%-----------------------------------------------------------------
-convert_context(Dir, _Reason) ->
+gen_context(Dir, _Reason) ->
config_err("missing context.conf file => generating a default file", []),
File = filename:join(Dir, "context.conf"),
case file:open(File, [write]) of
{ok, Fid} ->
ok = io:format(Fid, "~s\n", [context_header()]),
ok = io:format(Fid, "%% The default context\n\"\".\n", []),
- file:close(Fid);
+ file:close(Fid),
+ [];
{error, Reason} ->
file:delete(File),
error({failed_creating_file, File, Reason})
@@ -196,10 +189,50 @@ check_context(Context) ->
%% Agent
%% {Name, Value}.
%%-----------------------------------------------------------------
-check_agent({intAgentIpAddress, Value}) ->
- snmp_conf:check_ip(Value);
-check_agent({intAgentUDPPort, Value}) ->
- snmp_conf:check_integer(Value);
+check_agent(Entry, undefined) ->
+ check_agent(Entry, {snmp_target_mib:default_domain(), undefined});
+check_agent({intAgentTransportDomain, Domain}, {_, Port}) ->
+ {snmp_conf:check_domain(Domain), {Domain, Port}};
+check_agent({intAgentUDPPort, Port}, {Domain, _}) ->
+ ok = snmp_conf:check_port(Port),
+ {ok, {Domain, Port}};
+check_agent({intAgentIpAddress, _}, {_, undefined}) ->
+ error({missing_mandatory, intAgentUDPPort});
+check_agent({intAgentIpAddress = Tag, Ip} = Entry, {Domain, Port} = State) ->
+ {case snmp_conf:check_ip(Domain, Ip) of
+ ok ->
+ [Entry,
+ {intAgentTransports, [{Domain, {Ip, Port}}]}];
+ {ok, FixedIp} ->
+ [{Tag, FixedIp},
+ {intAgentTransports, [{Domain, {FixedIp, Port}}]}]
+ end, State};
+check_agent({intAgentTransports = Tag, Transports}, {_, Port} = State)
+ when is_list(Transports) ->
+ CheckedTransports =
+ [case Transport of
+ {Domain, Address} ->
+ case
+ case Port of
+ undefined ->
+ snmp_conf:check_address(Domain, Address);
+ _ ->
+ snmp_conf:check_address(Domain, Address, Port)
+ end
+ of
+ ok ->
+ Transport;
+ {ok, FixedAddress} ->
+ {Domain, FixedAddress}
+ end;
+ _ ->
+ error({bad_transport, Transport})
+ end
+ || Transport <- Transports],
+ {{ok, {Tag, CheckedTransports}}, State};
+check_agent(Entry, State) ->
+ {check_agent(Entry), State}.
+
%% This one is kept for backwards compatibility
check_agent({intAgentMaxPacketSize, Value}) ->
snmp_conf:check_packet_size(Value);
@@ -210,6 +243,14 @@ check_agent({snmpEngineID, Value}) ->
check_agent(X) ->
error({invalid_agent_attribute, X}).
+%% Ordering function to sort intAgentTransportDomain first
+%% hence before intAgentIpAddress. Sort other entries on the key.
+order_agent(EntryA, EntryB) ->
+ snmp_conf:keyorder(
+ 1, EntryA, EntryB,
+ [intAgentTransportDomain, intAgentUDPPort | sort]).
+
+
maybe_create_table(Name) ->
case snmpa_local_db:table_exists(db(Name)) of
@@ -382,6 +423,14 @@ intAgentUDPPort(Op) ->
intAgentIpAddress(Op) ->
snmp_generic:variable_func(Op, db(intAgentIpAddress)).
+intAgentTransportDomain(Op) ->
+ snmp_generic:variable_func(Op, db(intAgentTransportDomain)).
+
+intAgentTransports(Op) ->
+ snmp_generic:variable_func(Op, db(intAgentTransports)).
+
+
+
snmpEngineID(print) ->
VarAndValue = [{snmpEngineID, snmpEngineID(get)}],
snmpa_mib_lib:print_variables(VarAndValue);
diff --git a/lib/snmp/src/agent/snmp_generic.erl b/lib/snmp/src/agent/snmp_generic.erl
index 06afa68d96..3195ca2500 100644
--- a/lib/snmp/src/agent/snmp_generic.erl
+++ b/lib/snmp/src/agent/snmp_generic.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -414,7 +414,12 @@ table_check_status(NameDb, Col, ?'RowStatus_createAndGo', RowIndex, Cols) ->
% side effect free and we only use the result temporary.
case catch snmpa_local_db:table_construct_row(
NameDb, RowIndex, ?'RowStatus_createAndGo', Cols) of
- {'EXIT', _} ->
+ {'EXIT', _Reason} ->
+ ?vtrace(
+ "failed construct row (createAndGo): "
+ " n Reason: ~p"
+ " n Stack: ~p",
+ [_Reason, erlang:get_stacktrace()]),
{noCreation, Col}; % Bad RowIndex
Row ->
case lists:member(noinit, tuple_to_list(Row)) of
@@ -431,7 +436,12 @@ table_check_status(NameDb, Col, ?'RowStatus_createAndWait', RowIndex, Cols) ->
false ->
case catch snmpa_local_db:table_construct_row(
NameDb, RowIndex, ?'RowStatus_createAndGo', Cols) of
- {'EXIT', _} ->
+ {'EXIT', _Reason} ->
+ ?vtrace(
+ "failed construct row (createAndWait): "
+ " n Reason: ~p"
+ " n Stack: ~p",
+ [_Reason, erlang:get_stacktrace()]),
{noCreation, Col}; % Bad RowIndex
_Row ->
{noError, 0}
@@ -711,7 +721,19 @@ find_col(Col, [_H | T]) -> find_col(Col, T).
try_apply(nofunc, _) -> {noError, 0};
-try_apply(F, Args) -> apply(F, Args).
+try_apply(F, Args) -> maybe_verbose_apply(F, Args).
+
+maybe_verbose_apply(M, Args) ->
+ case get(verbosity) of
+ false ->
+ apply(M, Args);
+ _ ->
+ ?vlog("~n apply: ~w,~p~n", [M,Args]),
+ Res = apply(M,Args),
+ ?vlog("~n returned: ~p", [Res]),
+ Res
+ end.
+
table_info({Name, _Db}) ->
case snmpa_symbolic_store:table_info(Name) of
diff --git a/lib/snmp/src/agent/snmp_notification_mib.erl b/lib/snmp/src/agent/snmp_notification_mib.erl
index 37e09f5d3e..31c7735226 100644
--- a/lib/snmp/src/agent/snmp_notification_mib.erl
+++ b/lib/snmp/src/agent/snmp_notification_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -106,17 +106,19 @@ do_reconfigure(Dir) ->
read_notify_config_files(Dir) ->
?vdebug("read notify config file",[]),
FileName = "notify.conf",
- Gen = fun(D, Reason) ->
- info_msg("failed reading config file ~s"
- "~n Config Dir: ~s"
- "~n Reason: ~p",
- [FileName, D, Reason]),
- ok
- end,
- Filter = fun(Notifs) -> Notifs end,
- Check = fun(Entry) -> check_notify(Entry) end,
+ Gen =
+ fun (D, Reason) ->
+ info_msg("failed reading config file ~s"
+ "~n Config Dir: ~s"
+ "~n Reason: ~p",
+ [FileName, D, Reason]),
+ ok
+ end,
+ Order = fun snmp_conf:no_order/2,
+ Filter = fun snmp_conf:no_filter/1,
+ Check = fun (Entry, State) -> {check_notify(Entry), State} end,
[Notifs] =
- snmp_conf:read_files(Dir, [{Gen, Filter, Check, "notify.conf"}]),
+ snmp_conf:read_files(Dir, [{FileName, Gen, Order, Check, Filter}]),
Notifs.
check_notify({Name, Tag, Type}) ->
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl
index 766b75022b..aace3fd413 100644
--- a/lib/snmp/src/agent/snmp_standard_mib.erl
+++ b/lib/snmp/src/agent/snmp_standard_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -152,16 +152,19 @@ do_reconfigure(Dir) ->
%%-----------------------------------------------------------------
read_standard(Dir) ->
?vdebug("check standard config file",[]),
- FileName = "standard.conf",
- Gen = fun(D, Reason) ->
- throw({error, {failed_reading_config_file,
- D, FileName,
- list_dir(Dir), Reason}})
- end,
- Filter = fun(Standard) -> sort_standard(Standard) end,
- Check = fun(Entry) -> check_standard(Entry) end,
+ FileName = "standard.conf",
+ Gen =
+ fun (D, Reason) ->
+ throw(
+ {error,
+ {failed_reading_config_file,
+ D, FileName, list_dir(Dir), Reason}})
+ end,
+ Order = fun snmp_conf:no_order/2,
+ Check = fun (Entry, State) -> {check_standard(Entry), State} end,
+ Filter = fun sort_standard/1,
[Standard] =
- snmp_conf:read_files(Dir, [{Gen, Filter, Check, FileName}]),
+ snmp_conf:read_files(Dir, [{FileName, Gen, Order, Check, Filter}]),
Standard.
list_dir(Dir) ->
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl
index b01d536caa..ef9503cda8 100644
--- a/lib/snmp/src/agent/snmp_target_mib.erl
+++ b/lib/snmp/src/agent/snmp_target_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -133,18 +133,22 @@ do_reconfigure(Dir) ->
read_target_config_files(Dir) ->
?vdebug("check target address and parameter config file(s)",[]),
- TAGen = fun(_D, _Reason) -> ok end,
- TAFilter = fun(Addr) -> Addr end,
- TACheck = fun(Entry) -> check_target_addr(Entry) end,
- TPGen = fun(_D, _Reason) -> ok end,
- TPFilter = fun(Params) -> Params end,
- TPCheck = fun(Entry) -> check_target_params(Entry) end,
+ TAName = "target_addr.conf",
+ TACheck = fun (Entry, State) -> {check_target_addr(Entry), State} end,
+
+ TPName = "target_params.conf",
+ TPCheck = fun (Entry, State) -> {check_target_params(Entry), State} end,
+
+ NoGen = fun snmp_conf:no_gen/2,
+ NoOrder = fun snmp_conf:no_order/2,
+ NoFilter = fun snmp_conf:no_filter/1,
[Addrs, Params] =
- snmp_conf:read_files(Dir,
- [{TAGen, TAFilter, TACheck, "target_addr.conf"},
- {TPGen, TPFilter, TPCheck, "target_params.conf"}]),
+ snmp_conf:read_files(
+ Dir,
+ [{TAName, NoGen, NoOrder, TACheck, NoFilter},
+ {TPName, NoGen, NoOrder, TPCheck, NoFilter}]),
{Addrs, Params}.
@@ -154,79 +158,173 @@ read_target_config_files(Dir) ->
%% TMask, MMS}
%%-----------------------------------------------------------------
-check_target_addr({Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
- Params, EngineId, TMask, MMS}) ->
+check_target_addr(
+ {Name, Domain, Ip, Udp, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS}) -> % Arity 11
+ Address = {Ip, Udp},
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS);
+check_target_addr(
+ {Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS}) % Arity 10
+ when is_atom(Domain) ->
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS);
+check_target_addr(
+ {Name, Ip, Udp, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS})
+ when is_integer(Udp) -> % Arity 10
+ Domain = default_domain(),
+ Address = {Ip, Udp},
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, TMask, MMS);
+check_target_addr(
+ {_Name, Domain, Address, _Timeout, _RetryCount, _TagList, _Params,
+ _EngineId, _TMask, _MMS}) -> % Arity 10
+ error({bad_address, {Domain, Address}});
+check_target_addr(
+ {Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId}) % Arity 8
+ when is_atom(Domain) ->
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId);
+check_target_addr(
+ {Name, Ip, Udp, Timeout, RetryCount, TagList, Params,
+ EngineId}) % Arity 8
+ when is_integer(Udp) ->
+ Domain = default_domain(),
+ Address = {Ip, Udp},
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId);
+check_target_addr(
+ {_Name, Domain, Address, _Timeout, _RetryCount, _TagList, _Params,
+ _EngineId}) ->% Arity 8
+ error({bad_address, {Domain, Address}});
+%% Use dummy engine id if the old style is found
+check_target_addr(
+ {Name, Domain, Address, Timeout, RetryCount, TagList, Params}) % Arity 7
+ when is_atom(Domain) ->
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params);
+check_target_addr(
+ {Name, Ip, Udp, Timeout, RetryCount, TagList, Params}) % Arity 7
+ when is_integer(Udp) ->
+ Domain = default_domain(),
+ Address = {Ip, Udp},
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params);
+check_target_addr(
+ {_Name, Domain, Address, _Timeout, _RetryCount, _TagList, _Params}) -> % Arity 7
+ error({bad_address, {Domain, Address}});
+%% Use dummy engine id if the old style is found
+check_target_addr(
+ {Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ TMask, MMS}) % Arity 9
+ when is_atom(Domain) ->
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params, TMask, MMS);
+check_target_addr(
+ {Name, Ip, Udp, Timeout, RetryCount, TagList, Params,
+ TMask, MMS}) % Arity 9
+ when is_integer(Udp) ->
+ Domain = default_domain(),
+ Address = {Ip, Udp},
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params, TMask, MMS);
+check_target_addr(
+ {_Name, Domain, Address, _Timeout, _RetryCount, _TagList, _Params,
+ _TMask, _MMS}) -> % Arity 9
+ error({bad_address, {Domain, Address}});
+check_target_addr(X) ->
+ error({invalid_target_addr, X}).
+
+check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params) -> % Arity 7
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ "dummy").
+%%
+check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId) -> % Arity 8
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, [], 2048).
+%%
+check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ TMask, MMS) -> % Arity 9
+ check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ "dummy", TMask, MMS).
+%%
+check_target_addr(
+ Name, Domain, Address, Timeout, RetryCount, TagList, Params,
+ EngineId, Mask, MMS) -> % Arity 10
?vtrace("check target address with:"
"~n Name: ~s"
"~n Domain: ~p"
- "~n Ip: ~p"
- "~n Udp: ~p"
+ "~n Address: ~p"
"~n Timeout: ~p"
"~n RetryCount: ~p"
"~n TagList: ~p"
"~n Params: ~p"
"~n EngineId: ~p"
- "~n TMask: ~p"
+ "~n Mask: ~p"
"~n MMS: ~p",
- [Name,
- Domain, Ip, Udp,
+ [Name, Domain, Address,
Timeout, RetryCount,
- TagList, Params, EngineId, TMask, MMS]),
+ TagList, Params, EngineId, Mask, MMS]),
snmp_conf:check_string(Name,{gt,0}),
snmp_conf:check_domain(Domain),
- snmp_conf:check_ip(Domain, Ip),
- snmp_conf:check_integer(Udp, {gt, 0}),
+ NAddress = check_address(Domain, Address),
snmp_conf:check_integer(Timeout, {gte, 0}),
snmp_conf:check_integer(RetryCount, {gte,0}),
snmp_conf:check_string(TagList),
snmp_conf:check_string(Params),
check_engine_id(EngineId),
- TAddress = snmp_conf:mk_taddress(Domain, Ip, Udp),
+ NMask = check_mask(Domain, Mask),
TDomain = snmp_conf:mk_tdomain(Domain),
- check_tmask(TDomain, TMask, TAddress),
+ TAddress = snmp_conf:mk_taddress(Domain, NAddress),
+ TMask = snmp_conf:mk_taddress(Domain, NMask),
snmp_conf:check_packet_size(MMS),
?vtrace("check target address done",[]),
Addr = {Name, TDomain, TAddress, Timeout,
RetryCount, TagList, Params,
?'StorageType_nonVolatile', ?'RowStatus_active', EngineId,
TMask, MMS}, % Values for Augmenting table in SNMP-COMMUNITY-MIB
- {ok, Addr};
-check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
- Params, EngineId, TMask, MMS}) ->
- Domain = default_domain(),
- check_target_addr({Name,
- Domain, Ip, Udp,
- Timeout, RetryCount, TagList,
- Params, EngineId, TMask, MMS});
-check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList, Params,
- EngineId}) ->
- check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
- Params, EngineId, [], 2048});
-%% Use dummy engine id if the old style is found
-check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList, Params}) ->
- check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
- Params, "dummy", [], 2048});
-%% Use dummy engine id if the old style is found
-check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList, Params,
- TMask, MMS}) ->
- check_target_addr({Name, Ip, Udp, Timeout, RetryCount, TagList,
- Params, "dummy", TMask, MMS});
-check_target_addr(X) ->
- error({invalid_target_addr, X}).
-
+ {ok, Addr}.
check_engine_id(discovery) ->
ok;
check_engine_id(EngineId) ->
snmp_conf:check_string(EngineId).
+check_address(Domain, Address) ->
+ case snmp_conf:check_address(Domain, Address, 162) of
+ ok ->
+ Address;
+ {ok, NAddress} ->
+ NAddress
+ end.
-check_tmask(_TDomain, [], _TAddress) ->
- ok;
-check_tmask(TDomain, TMask, TAddress) when length(TMask) =:= length(TAddress) ->
- snmp_conf:check_taddress(TDomain, TMask);
-check_tmask(_TDomain, TMask, _TAddr) ->
- throw({error, {invalid_tmask, TMask}}).
+check_mask(_Domain, [] = Mask) ->
+ Mask;
+check_mask(Domain, Mask) ->
+ try snmp_conf:check_address(Domain, Mask) of
+ ok ->
+ Mask;
+ {ok, NMask} ->
+ NMask
+ catch
+ {error, {bad_address, Info}} ->
+ error({bad_mask, Info})
+ end.
%%-----------------------------------------------------------------
@@ -286,16 +384,21 @@ table_del_row(Tab, Key) ->
snmpa_mib_lib:table_del_row(db(Tab), Key).
-add_addr(Name, Ip, Port, Timeout, Retry, TagList,
- Params, EngineId, TMask, MMS) ->
- Domain = default_domain(),
- add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList,
- Params, EngineId, TMask, MMS).
-
-add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList,
- Params, EngineId, TMask, MMS) ->
- Addr = {Name, Domain, Ip, Port, Timeout, Retry, TagList,
- Params, EngineId, TMask, MMS},
+add_addr(
+ Name, Domain_or_Ip, Addr_or_Port, Timeout, Retry, TagList, Params,
+ EngineId, TMask, MMS) ->
+ add_addr(
+ {Name, Domain_or_Ip, Addr_or_Port, Timeout, Retry, TagList, Params,
+ EngineId, TMask, MMS}).
+%%
+add_addr(
+ Name, Domain, Ip, Port, Timeout, Retry, TagList, Params,
+ EngineId, TMask, MMS) ->
+ add_addr(
+ {Name, Domain, Ip, Port, Timeout, Retry, TagList, Params,
+ EngineId, TMask, MMS}).
+%%
+add_addr(Addr) ->
case (catch check_target_addr(Addr)) of
{ok, Row} ->
Key = element(1, Row),
@@ -604,6 +707,20 @@ snmpTargetAddrTable(print) ->
FOI = foi(Table),
PrintRow =
fun(Prefix, Row) ->
+ TDomain = element(?snmpTargetAddrTDomain, Row),
+ Domain =
+ try snmp_conf:tdomain_to_domain(TDomain)
+ catch
+ {error, {bad_tdomain, _}} ->
+ undefined
+ end,
+ TAddress = element(?snmpTargetAddrTAddress, Row),
+ AddrString =
+ try snmp_conf:mk_addr_string({Domain, TAddress})
+ catch
+ {error, {bad_address, _}} ->
+ "-"
+ end,
lists:flatten(
io_lib:format("~sName: ~p"
"~n~sTDomain: ~p (~w)"
@@ -618,21 +735,8 @@ snmpTargetAddrTable(print) ->
"~n~s[Ext] TMask: ~p"
"~n~s[Ext] MMS: ~p",
[Prefix, element(?snmpTargetAddrName, Row),
- Prefix, element(?snmpTargetAddrTDomain, Row),
- case element(?snmpTargetAddrTDomain, Row) of
- ?snmpUDPDomain -> snmpUDPDomain;
- ?transportDomainUdpIpv4 -> transportDomainUdpIpv4;
- ?transportDomainUdpIpv6 -> transportDomainUdpIpv6;
- _ -> undefined
- end,
- Prefix, element(?snmpTargetAddrTAddress, Row),
- case element(?snmpTargetAddrTAddress, Row) of
- [A,B,C,D,U1,U2] ->
- lists:flatten(
- io_lib:format("~w.~w.~w.~w:~w",
- [A, B, C, D, U1 bsl 8 + U2]));
- _ -> "-"
- end,
+ Prefix, TDomain, Domain,
+ Prefix, TAddress, AddrString,
Prefix, element(?snmpTargetAddrTimeout, Row),
Prefix, element(?snmpTargetAddrRetryCount, Row),
Prefix, element(?snmpTargetAddrTagList, Row),
diff --git a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
index 223d3f7218..69dce337ba 100644
--- a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
+++ b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -137,18 +137,20 @@ do_reconfigure(Dir) ->
read_usm_config_files(Dir) ->
?vdebug("read usm config file",[]),
- Gen = fun(D, Reason) -> generate_usm(D, Reason) end,
- Filter = fun(Usms) -> Usms end,
- Check = fun(Entry) -> check_usm(Entry) end,
+ Gen = fun (D, Reason) -> generate_usm(D, Reason) end,
+ Order = fun snmp_conf:no_order/2,
+ Check = fun (Entry, State) -> {check_usm(Entry), State} end,
+ Filter = fun snmp_conf:no_filter/1,
[Usms] =
- snmp_conf:read_files(Dir, [{Gen, Filter, Check, "usm.conf"}]),
+ snmp_conf:read_files(Dir, [{"usm.conf", Gen, Order, Check, Filter}]),
Usms.
generate_usm(Dir, _Reason) ->
info_msg("Incomplete configuration. Generating empty usm.conf.", []),
USMFile = filename:join(Dir, "usm.conf"),
- ok = file:write_file(USMFile, list_to_binary([])).
+ ok = file:write_file(USMFile, list_to_binary([])),
+ [].
check_usm({EngineID, Name, SecName, Clone, AuthP, AuthKeyC, OwnAuthKeyC,
diff --git a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
index c0177b1cea..722bd7ac5b 100644
--- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
+++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -123,15 +123,18 @@ do_reconfigure(Dir) ->
read_vacm_config_files(Dir) ->
?vdebug("read vacm config file",[]),
- Gen = fun(_D, _Reason) -> ok end,
- Filter = fun(Vacms) ->
- Sec2Group = [X || {vacmSecurityToGroup, X} <- Vacms],
- Access = [X || {vacmAccess, X} <- Vacms],
- View = [X || {vacmViewTreeFamily, X} <- Vacms],
- {Sec2Group, Access, View}
- end,
- Check = fun(Entry) -> check_vacm(Entry) end,
- [Vacms] = snmp_conf:read_files(Dir, [{Gen, Filter, Check, "vacm.conf"}]),
+ Gen = fun snmp_conf:no_gen/2,
+ Order = fun snmp_conf:no_order/2,
+ Check = fun (Entry, State) -> {check_vacm(Entry), State} end,
+ Filter =
+ fun (Vacms) ->
+ Sec2Group = [X || {vacmSecurityToGroup, X} <- Vacms],
+ Access = [X || {vacmAccess, X} <- Vacms],
+ View = [X || {vacmViewTreeFamily, X} <- Vacms],
+ {Sec2Group, Access, View}
+ end,
+ [Vacms] =
+ snmp_conf:read_files(Dir, [{"vacm.conf", Gen, Order, Check, Filter}]),
Vacms.
%%-----------------------------------------------------------------
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl
index 9bed6e554e..6d3f1cca4a 100644
--- a/lib/snmp/src/agent/snmpa_agent.erl
+++ b/lib/snmp/src/agent/snmpa_agent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -2512,10 +2512,19 @@ handle_mib_of(MibServer, Oid) ->
%% Func: process_msg/7
%% Returns: RePdu
%%-----------------------------------------------------------------
-process_msg(MibView, Vsn, Pdu, PduMS, Community, {Ip, Udp}, ContextName,
- GbMaxVBs) ->
+process_msg(
+ MibView, Vsn, Pdu, PduMS, Community,
+ SourceAddress, ContextName, GbMaxVBs) ->
#pdu{request_id = ReqId} = Pdu,
- put(snmp_address, {tuple_to_list(Ip), Udp}),
+ put(
+ snmp_address,
+ case SourceAddress of
+ {Domain, _} when is_atom(Domain) ->
+ SourceAddress;
+ {Ip, Port} when is_integer(Port) ->
+ %% Legacy transport domain
+ {tuple_to_list(Ip), Port}
+ end),
put(snmp_request_id, ReqId),
put(snmp_community, Community),
put(snmp_context, ContextName),
diff --git a/lib/snmp/src/agent/snmpa_conf.erl b/lib/snmp/src/agent/snmpa_conf.erl
index c17a6abbd7..534d0e447b 100644
--- a/lib/snmp/src/agent/snmpa_conf.erl
+++ b/lib/snmp/src/agent/snmpa_conf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,7 +47,7 @@
read_standard_config/1,
%% target_addr.conf
- target_addr_entry/5, target_addr_entry/6,
+ target_addr_entry/5, target_addr_entry/6, target_addr_entry/7,
target_addr_entry/8, target_addr_entry/10, target_addr_entry/11,
write_target_addr_config/2, write_target_addr_config/3,
append_target_addr_config/2,
@@ -108,36 +108,25 @@ write_agent_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_agent_config(Dir, Hdr, Conf).
-write_agent_config(Dir, Hdr, Conf)
+write_agent_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_agent_conf(Conf) end,
- Write = fun(Fd) -> write_agent_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "agent.conf", Verify, Write).
-
+ Order = fun snmp_framework_mib:order_agent/2,
+ Check = fun snmp_framework_mib:check_agent/2,
+ Write = fun (Fd, Entries) -> write_agent_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "agent.conf", Order, Check, Write, Conf).
-append_agent_config(Dir, Conf)
+append_agent_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_agent_conf(Conf) end,
- Write = fun(Fd) -> write_agent_conf(Fd, Conf) end,
- append_config_file(Dir, "agent.conf", Verify, Write).
-
+ Order = fun snmp_framework_mib:order_agent/2,
+ Check = fun snmp_framework_mib:check_agent/2,
+ Write = fun write_agent_conf/2,
+ append_config_file(Dir, "agent.conf", Order, Check, Write, Conf).
read_agent_config(Dir) ->
- Verify = fun(Entry) -> verify_agent_conf_entry(Entry) end,
- read_config_file(Dir, "agent.conf", Verify).
+ Order = fun snmp_framework_mib:order_agent/2,
+ Check = fun snmp_framework_mib:check_agent/2,
+ read_config_file(Dir, "agent.conf", Order, Check).
-
-verify_agent_conf([]) ->
- ok;
-verify_agent_conf([H|T]) ->
- verify_agent_conf_entry(H),
- verify_agent_conf(T);
-verify_agent_conf(X) ->
- error({bad_agent_config, X}).
-
-verify_agent_conf_entry(Entry) ->
- ok = snmp_framework_mib:check_agent(Entry),
- ok.
write_agent_conf(Fd, "", Conf) ->
write_agent_conf(Fd, Conf);
@@ -151,6 +140,10 @@ write_agent_conf(Fd, [H|T]) ->
do_write_agent_conf(Fd, H),
write_agent_conf(Fd, T).
+do_write_agent_conf(Fd, {intAgentTransports = Tag, Val}) ->
+ io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
+do_write_agent_conf(Fd, {intAgentTransportDomain = Tag, Val}) ->
+ io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
do_write_agent_conf(Fd, {intAgentIpAddress = Tag, Val}) ->
io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
do_write_agent_conf(Fd, {intAgentUDPPort = Tag, Val} ) ->
@@ -191,34 +184,27 @@ write_context_config(Dir, Conf) ->
write_context_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_context_conf(Conf) end,
- Write = fun(Fd) -> write_context_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "context.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_context/2,
+ Write = fun (Fd, Entries) -> write_context_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "context.conf", Order, Check, Write, Conf).
-append_context_config(Dir, Conf)
+append_context_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_context_conf(Conf) end,
- Write = fun(Fd) -> write_context_conf(Fd, Conf) end,
- append_config_file(Dir, "context.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_context/2,
+ Write = fun write_context_conf/2,
+ append_config_file(Dir, "context.conf", Order, Check, Write, Conf).
read_context_config(Dir) ->
- Verify = fun(Entry) -> verify_context_conf_entry(Entry) end,
- read_config_file(Dir, "context.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_context/2,
+ read_config_file(Dir, "context.conf", Order, Check).
-
-verify_context_conf([]) ->
- ok;
-verify_context_conf([H|T]) ->
- verify_context_conf_entry(H),
- verify_context_conf(T);
-verify_context_conf(X) ->
- error({error_context_config, X}).
-
-verify_context_conf_entry(Context) ->
- {ok, _} = snmp_framework_mib:check_context(Context),
- ok.
+
+check_context(Entry, State) ->
+ {check_ok(snmp_framework_mib:check_context(Entry)),
+ State}.
write_context_conf(Fd, "", Conf) ->
write_context_conf(Fd, Conf);
@@ -271,36 +257,29 @@ write_community_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_community_config(Dir, Hdr, Conf).
-write_community_config(Dir, Hdr, Conf)
+write_community_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_community_conf(Conf) end,
- Write = fun(Fd) -> write_community_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "community.conf", Verify, Write).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_community/2,
+ Write = fun (Fd, Entries) -> write_community_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "community.conf", Order, Check, Write, Conf).
-
-append_community_config(Dir, Conf)
+append_community_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_community_conf(Conf) end,
- Write = fun(Fd) -> write_community_conf(Fd, Conf) end,
- append_config_file(Dir, "community.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_community/2,
+ Write = fun write_community_conf/2,
+ append_config_file(Dir, "community.conf", Order, Check, Write, Conf).
read_community_config(Dir) ->
- Verify = fun(Entry) -> verify_community_conf_entry(Entry) end,
- read_config_file(Dir, "community.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_community/2,
+ read_config_file(Dir, "community.conf", Order, Check).
-
-verify_community_conf([]) ->
- ok;
-verify_community_conf([H|T]) ->
- verify_community_conf_entry(H),
- verify_community_conf(T);
-verify_community_conf(X) ->
- error({invalid_community_config, X}).
-
-verify_community_conf_entry(Context) ->
- {ok, _} = snmp_community_mib:check_community(Context),
- ok.
+
+check_community(Entry, State) ->
+ {check_ok(snmp_community_mib:check_community(Entry)),
+ State}.
write_community_conf(Fd, "", Conf) ->
write_community_conf(Fd, Conf);
@@ -309,14 +288,17 @@ write_community_conf(Fd, Hdr, Conf) ->
write_community_conf(Fd, Conf).
write_community_conf(Fd, Conf) ->
- Fun = fun({Idx, Name, SecName, CtxName, TranspTag}) ->
- io:format(Fd, "{\"~s\", \"~s\", \"~s\", \"~s\", \"~s\"}.~n",
- [Idx, Name, SecName, CtxName, TranspTag]);
+ Fun =
+ fun({Idx, Name, SecName, CtxName, TranspTag}) ->
+ io:format(
+ Fd,
+ "{\"~s\", \"~s\", \"~s\", \"~s\", \"~s\"}.~n",
+ [Idx, Name, SecName, CtxName, TranspTag]);
(Crap) ->
- error({bad_community_config, Crap})
+ error({bad_community_config, Crap})
end,
lists:foreach(Fun, Conf).
-
+
%%
%% ------ standard.conf ------
@@ -343,40 +325,29 @@ write_standard_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_standard_config(Dir, Hdr, Conf).
-write_standard_config(Dir, Hdr, Conf)
+write_standard_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_standard_conf(Conf) end,
- Write = fun(Fd) -> write_standard_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "standard.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_standard/2,
+ Write = fun (Fd, Entries) -> write_standard_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "standard.conf", Order, Check, Write, Conf).
-append_standard_config(Dir, Conf)
+append_standard_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_standard_conf(Conf) end,
- Write = fun(Fd) -> write_standard_conf(Fd, Conf) end,
- append_config_file(Dir, "standard.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_standard/2,
+ Write = fun write_standard_conf/2,
+ append_config_file(Dir, "standard.conf", Order, Check, Write, Conf).
read_standard_config(Dir) ->
- Verify = fun(Entry) -> verify_standard_conf_entry(Entry) end,
- read_config_file(Dir, "standard.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_standard/2,
+ read_config_file(Dir, "standard.conf", Order, Check).
-
-verify_standard_conf([]) ->
- ok;
-verify_standard_conf([H|T]) ->
- verify_standard_conf_entry(H),
- verify_standard_conf(T);
-verify_standard_conf(X) ->
- error({bad_standard_config, X}).
-
-verify_standard_conf_entry(Std) ->
- case snmp_standard_mib:check_standard(Std) of
- ok ->
- ok;
- {ok, _} ->
- ok
- end.
+
+check_standard(Entry, State) ->
+ {check_ok(snmp_standard_mib:check_standard(Entry)),
+ State}.
write_standard_conf(Fd, "", Conf) ->
write_standard_conf(Fd, Conf);
@@ -410,72 +381,48 @@ do_write_standard_conf(_Fd, Tag, Val) ->
%% ------ target_addr.conf ------
%%
-target_addr_entry(Name,
- Ip,
- TagList,
- ParamsName,
- EngineId) ->
+target_addr_entry(
+ Name, Ip, TagList, ParamsName, EngineId) ->
target_addr_entry(Name, Ip, TagList, ParamsName, EngineId, []).
-target_addr_entry(Name,
- Ip,
- TagList,
- ParamsName,
- EngineId,
- TMask) ->
- target_addr_entry(Name, Ip, 162, TagList,
- ParamsName, EngineId,
- TMask, 2048).
-
-target_addr_entry(Name,
- Ip,
- Udp,
- TagList,
- ParamsName,
- EngineId,
- TMask,
- MaxMessageSize) ->
- target_addr_entry(Name, Ip, Udp, 1500, 3, TagList,
- ParamsName, EngineId,
- TMask, MaxMessageSize).
-
-target_addr_entry(Name,
- Ip,
- Udp,
- Timeout,
- RetryCount,
- TagList,
- ParamsName,
- EngineId,
- TMask,
- MaxMessageSize) ->
- target_addr_entry(Name, snmp_target_mib:default_domain(), Ip, Udp,
- Timeout, RetryCount, TagList,
- ParamsName, EngineId,
- TMask, MaxMessageSize).
-
-target_addr_entry(Name,
- Domain,
- Ip,
- Udp,
- Timeout,
- RetryCount,
- TagList,
- ParamsName,
- EngineId,
- TMask,
- MaxMessageSize) ->
- {Name,
- Domain,
- Ip,
- Udp,
- Timeout,
- RetryCount,
- TagList,
- ParamsName,
- EngineId,
- TMask,
- MaxMessageSize}.
+target_addr_entry(
+ Name, Domain, Addr, TagList,
+ ParamsName, EngineId) when is_atom(Domain) ->
+ target_addr_entry(
+ Name, Domain, Addr, TagList,
+ ParamsName, EngineId, []);
+target_addr_entry(
+ Name, Ip, TagList, ParamsName,
+ EngineId, TMask) ->
+ target_addr_entry(
+ Name, Ip, 162, TagList, ParamsName,
+ EngineId, TMask, 2048).
+
+target_addr_entry(
+ Name, Domain_or_Ip, Addr_or_Port, TagList,
+ ParamsName, EngineId, TMask) ->
+ target_addr_entry(
+ Name, Domain_or_Ip, Addr_or_Port, TagList,
+ ParamsName, EngineId, TMask, 2048).
+
+target_addr_entry(
+ Name, Domain_or_Ip, Addr_or_Port, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize) ->
+ target_addr_entry(
+ Name, Domain_or_Ip, Addr_or_Port, 1500, 3, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize).
+
+target_addr_entry(
+ Name, Domain_or_Ip, Addr_or_Port, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize) ->
+ {Name, Domain_or_Ip, Addr_or_Port, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize}.
+
+target_addr_entry(
+ Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
+ ParamsName, EngineId,TMask, MaxMessageSize) ->
+ {Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize}.
write_target_addr_config(Dir, Conf) ->
@@ -504,37 +451,29 @@ write_target_addr_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_target_addr_config(Dir, Hdr, Conf).
-write_target_addr_config(Dir, Hdr, Conf)
+write_target_addr_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_target_addr_conf(Conf) end,
- Write = fun(Fd) -> write_target_addr_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "target_addr.conf", Verify, Write).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_addr/2,
+ Write = fun (Fd, Entries) -> write_target_addr_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "target_addr.conf", Order, Check, Write, Conf).
-
-
-append_target_addr_config(Dir, Conf)
+append_target_addr_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_target_addr_conf(Conf) end,
- Write = fun(Fd) -> write_target_addr_conf(Fd, Conf) end,
- append_config_file(Dir, "target_addr.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_addr/2,
+ Write = fun write_target_addr_conf/2,
+ append_config_file(Dir, "target_addr.conf", Order, Check, Write, Conf).
read_target_addr_config(Dir) ->
- Verify = fun(Entry) -> verify_target_addr_conf_entry(Entry) end,
- read_config_file(Dir, "target_addr.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_addr/2,
+ read_config_file(Dir, "target_addr.conf", Order, Check).
-
-verify_target_addr_conf([]) ->
- ok;
-verify_target_addr_conf([H|T]) ->
- verify_target_addr_conf_entry(H),
- verify_target_addr_conf(T);
-verify_target_addr_conf(X) ->
- error({bad_target_addr_config, X}).
-
-verify_target_addr_conf_entry(Entry) ->
- {ok, _} = snmp_target_mib:check_target_addr(Entry),
- ok.
+
+check_target_addr(Entry, State) ->
+ {check_ok(snmp_target_mib:check_target_addr(Entry)),
+ State}.
write_target_addr_conf(Fd, "", Conf) ->
write_target_addr_conf(Fd, Conf);
@@ -547,29 +486,41 @@ write_target_addr_conf(Fd, Conf) ->
lists:foreach(Fun, Conf),
ok.
-do_write_target_addr_conf(Fd,
- {Name,
- Ip, Udp,
- Timeout, RetryCount, TagList,
- ParamsName, EngineId,
- TMask, MaxMessageSize}) ->
- Domain = snmp_target_mib:default_domain(),
- do_write_target_addr_conf(Fd,
- {Name,
- Domain, Ip, Udp,
- Timeout, RetryCount, TagList,
- ParamsName, EngineId,
- TMask, MaxMessageSize});
-do_write_target_addr_conf(Fd,
- {Name,
- Domain, Ip, Udp,
- Timeout, RetryCount, TagList,
- ParamsName, EngineId,
- TMask, MaxMessageSize}) ->
- io:format(Fd,
- "{\"~s\", ~w, ~w, ~w, ~w, ~w, \"~s\", \"~s\", \"~s\", ~w, ~w}.~n",
- [Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
- ParamsName, EngineId, TMask, MaxMessageSize]);
+do_write_target_addr_conf(
+ Fd,
+ {Name, Domain, Address, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize})
+ when is_atom(Domain) ->
+ io:format(
+ Fd,
+ "{\"~s\", ~w, ~w, ~w, ~w, \"~s\", \"~s\", \"~s\", ~w, ~w}.~n",
+ [Name, Domain, Address, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize]);
+do_write_target_addr_conf(
+ Fd,
+ {Name, Ip, Udp, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize})
+ when is_integer(Udp) ->
+ Domain = snmp_target_mib:default_domain(),
+ Address = {Ip, Udp},
+ do_write_target_addr_conf(
+ Fd,
+ {Name, Domain, Address, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize});
+do_write_target_addr_conf(
+ _Fd,
+ {_Name, Domain, Address, _Timeout, _RetryCount, _TagList,
+ _ParamsName, _EngineId, _TMask, _MaxMessageSize}) ->
+ error({bad_address, {Domain, Address}});
+do_write_target_addr_conf(
+ Fd,
+ {Name, Domain, Ip, Udp, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize}) ->
+ Address = {Ip, Udp},
+ do_write_target_addr_conf(
+ Fd,
+ {Name, Domain, Address, Timeout, RetryCount, TagList,
+ ParamsName, EngineId, TMask, MaxMessageSize});
do_write_target_addr_conf(_Fd, Crap) ->
error({bad_target_addr_config, Crap}).
@@ -613,34 +564,27 @@ write_target_params_config(Dir, Conf) ->
write_target_params_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_target_params_conf(Conf) end,
- Write = fun(Fd) -> write_target_params_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "target_params.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_params/2,
+ Write = fun (Fd, Entries) -> write_target_params_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "target_params.conf", Order, Check, Write, Conf).
append_target_params_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_target_params_conf(Conf) end,
- Write = fun(Fd) -> write_target_params_conf(Fd, Conf) end,
- append_config_file(Dir, "target_params.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_params/2,
+ Write = fun write_target_params_conf/2,
+ append_config_file(Dir, "target_params.conf", Order, Check, Write, Conf).
read_target_params_config(Dir) ->
- Verify = fun(Entry) -> verify_target_params_conf_entry(Entry) end,
- read_config_file(Dir, "target_params.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_target_params/2,
+ read_config_file(Dir, "target_params.conf", Order, Check).
-verify_target_params_conf([]) ->
- ok;
-verify_target_params_conf([H|T]) ->
- verify_target_params_conf_entry(H),
- verify_target_params_conf(T);
-verify_target_params_conf(X) ->
- error({bad_target_params_config, X}).
-
-verify_target_params_conf_entry(Entry) ->
- {ok, _} = snmp_target_mib:check_target_params(Entry),
- ok.
+check_target_params(Entry, State) ->
+ {check_ok(snmp_target_mib:check_target_params(Entry)),
+ State}.
write_target_params_conf(Fd, "", Conf) ->
write_target_params_conf(Fd, Conf);
@@ -685,34 +629,27 @@ write_notify_config(Dir, Conf) ->
write_notify_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_notify_conf(Conf) end,
- Write = fun(Fd) -> write_notify_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "notify.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_notify/2,
+ Write = fun (Fd, Entries) -> write_notify_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "notify.conf", Order, Check, Write, Conf).
append_notify_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_notify_conf(Conf) end,
- Write = fun(Fd) -> write_notify_conf(Fd, Conf) end,
- append_config_file(Dir, "notify.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_notify/2,
+ Write = fun write_notify_conf/2,
+ append_config_file(Dir, "notify.conf", Order, Check, Write, Conf).
read_notify_config(Dir) ->
- Verify = fun(Entry) -> verify_notify_conf_entry(Entry) end,
- read_config_file(Dir, "notify.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_notify/2,
+ read_config_file(Dir, "notify.conf", Order, Check).
-verify_notify_conf([]) ->
- ok;
-verify_notify_conf([H|T]) ->
- verify_notify_conf_entry(H),
- verify_notify_conf(T);
-verify_notify_conf(X) ->
- error({bad_notify_config, X}).
-
-verify_notify_conf_entry(Entry) ->
- {ok, _} = snmp_notification_mib:check_notify(Entry),
- ok.
+check_notify(Entry, State) ->
+ {check_ok(snmp_notification_mib:check_notify(Entry)),
+ State}.
write_notify_conf(Fd, "", Conf) ->
write_notify_conf(Fd, Conf);
@@ -781,34 +718,27 @@ write_usm_config(Dir, Conf) ->
write_usm_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_usm_conf(Conf) end,
- Write = fun(Fd) -> write_usm_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "usm.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm/2,
+ Write = fun (Fd, Entries) -> write_usm_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "usm.conf", Order, Check, Write, Conf).
append_usm_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_usm_conf(Conf) end,
- Write = fun(Fd) -> write_usm_conf(Fd, Conf) end,
- append_config_file(Dir, "usm.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm/2,
+ Write = fun write_usm_conf/2,
+ append_config_file(Dir, "usm.conf", Order, Check, Write, Conf).
read_usm_config(Dir) ->
- Verify = fun(Entry) -> verify_usm_conf_entry(Entry) end,
- read_config_file(Dir, "usm.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm/2,
+ read_config_file(Dir, "usm.conf", Order, Check).
-verify_usm_conf([]) ->
- ok;
-verify_usm_conf([H|T]) ->
- verify_usm_conf_entry(H),
- verify_usm_conf(T);
-verify_usm_conf(X) ->
- error({bad_usm_conf, X}).
-
-verify_usm_conf_entry(Entry) ->
- {ok, _} = snmp_user_based_sm_mib:check_usm(Entry),
- ok.
+check_usm(Entry, State) ->
+ {check_ok(snmp_user_based_sm_mib:check_usm(Entry)),
+ State}.
write_usm_conf(Fd, "", Conf) ->
write_usm_conf(Fd, Conf);
@@ -820,11 +750,12 @@ write_usm_conf(Fd, Conf) ->
Fun = fun(Entry) -> do_write_usm_conf(Fd, Entry) end,
lists:foreach(Fun, Conf).
-do_write_usm_conf(Fd,
- {EngineID, UserName, SecName, Clone,
- AuthP, AuthKeyC, OwnAuthKeyC,
- PrivP, PrivKeyC, OwnPrivKeyC,
- Public, AuthKey, PrivKey}) ->
+do_write_usm_conf(
+ Fd,
+ {EngineID, UserName, SecName, Clone,
+ AuthP, AuthKeyC, OwnAuthKeyC,
+ PrivP, PrivKeyC, OwnPrivKeyC,
+ Public, AuthKey, PrivKey}) ->
io:format(Fd, "{", []),
io:format(Fd, "\"~s\", ", [EngineID]),
io:format(Fd, "\"~s\", ", [UserName]),
@@ -890,34 +821,27 @@ write_vacm_config(Dir, Conf) ->
write_vacm_config(Dir, Hdr, Conf)
when is_list(Dir) and is_list(Hdr) and is_list(Conf) ->
- Verify = fun() -> verify_vacm_conf(Conf) end,
- Write = fun(Fd) -> write_vacm_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, "vacm.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_vacm/2,
+ Write = fun (Fd, Entries) -> write_vacm_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, "vacm.conf", Order, Check, Write, Conf).
append_vacm_config(Dir, Conf)
when is_list(Dir) and is_list(Conf) ->
- Verify = fun() -> verify_vacm_conf(Conf) end,
- Write = fun(Fd) -> write_vacm_conf(Fd, Conf) end,
- append_config_file(Dir, "vacm.conf", Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_vacm/2,
+ Write = fun write_vacm_conf/2,
+ append_config_file(Dir, "vacm.conf", Order, Check, Write, Conf).
read_vacm_config(Dir) ->
- Verify = fun(Entry) -> verify_vacm_conf_entry(Entry) end,
- read_config_file(Dir, "vacm.conf", Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_vacm/2,
+ read_config_file(Dir, "vacm.conf", Order, Check).
-verify_vacm_conf([]) ->
- ok;
-verify_vacm_conf([H|T]) ->
- verify_vacm_conf_entry(H),
- verify_vacm_conf(T);
-verify_vacm_conf(X) ->
- error({bad_vacm_conf, X}).
-
-verify_vacm_conf_entry(Entry) ->
- {ok, _} = snmp_view_based_acm_mib:check_vacm(Entry),
- ok.
+check_vacm(Entry, State) ->
+ {check_ok(snmp_view_based_acm_mib:check_vacm(Entry)),
+ State}.
write_vacm_conf(Fd, "", Conf) ->
write_vacm_conf(Fd, Conf);
@@ -929,49 +853,60 @@ write_vacm_conf(Fd, Conf) ->
Fun = fun(Entry) -> do_write_vacm_conf(Fd, Entry) end,
lists:foreach(Fun, Conf).
-do_write_vacm_conf(Fd,
- {vacmSecurityToGroup,
- SecModel, SecName, GroupName}) ->
- io:format(Fd, "{vacmSecurityToGroup, ~w, \"~s\", \"~s\"}.~n",
- [SecModel, SecName, GroupName]);
-do_write_vacm_conf(Fd,
- {vacmAccess,
- GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV}) ->
- io:format(Fd, "{vacmAccess, \"~s\", \"~s\", ~w, ~w, ~w, "
- "\"~s\", \"~s\", \"~s\"}.~n",
- [GroupName, Prefix, SecModel, SecLevel,
- Match, RV, WV, NV]);
-do_write_vacm_conf(Fd,
- {vacmViewTreeFamily,
- ViewIndex, ViewSubtree, ViewStatus, ViewMask}) ->
- io:format(Fd, "{vacmViewTreeFamily, \"~s\", ~w, ~w, ~w}.~n",
- [ViewIndex, ViewSubtree, ViewStatus, ViewMask]);
+do_write_vacm_conf(
+ Fd,
+ {vacmSecurityToGroup,
+ SecModel, SecName, GroupName}) ->
+ io:format(
+ Fd, "{vacmSecurityToGroup, ~w, \"~s\", \"~s\"}.~n",
+ [SecModel, SecName, GroupName]);
+do_write_vacm_conf(
+ Fd,
+ {vacmAccess,
+ GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV}) ->
+ io:format(
+ Fd, "{vacmAccess, \"~s\", \"~s\", ~w, ~w, ~w, "
+ "\"~s\", \"~s\", \"~s\"}.~n",
+ [GroupName, Prefix, SecModel, SecLevel,
+ Match, RV, WV, NV]);
+do_write_vacm_conf(
+ Fd,
+ {vacmViewTreeFamily,
+ ViewIndex, ViewSubtree, ViewStatus, ViewMask}) ->
+ io:format(
+ Fd, "{vacmViewTreeFamily, \"~s\", ~w, ~w, ~w}.~n",
+ [ViewIndex, ViewSubtree, ViewStatus, ViewMask]);
do_write_vacm_conf(_Fd, Crap) ->
error({bad_vacm_config, Crap}).
%% ---- config file wrapper functions ----
-write_config_file(Dir, File, Verify, Write) ->
- snmp_config:write_config_file(Dir, File, Verify, Write).
+write_config_file(Dir, File, Order, Check, Write, Conf) ->
+ snmp_config:write_config_file(Dir, File, Order, Check, Write, Conf).
-append_config_file(Dir, File, Verify, Write) ->
- snmp_config:append_config_file(Dir, File, Verify, Write).
+append_config_file(Dir, File, Order, Check, Write, Conf) ->
+ snmp_config:append_config_file(Dir, File, Order, Check, Write, Conf).
-read_config_file(Dir, File, Verify) ->
- snmp_config:read_config_file(Dir, File, Verify).
+read_config_file(Dir, File, Order, Check) ->
+ snmp_config:read_config_file(Dir, File, Order, Check).
%% ---- config file utility functions ----
+check_ok(ok) ->
+ ok;
+check_ok({ok, _}) ->
+ ok.
+
header() ->
{Y,Mo,D} = date(),
{H,Mi,S} = time(),
- io_lib:format("%% This file was generated by "
- "~w (version-~s) ~w-~2.2.0w-~2.2.0w "
- "~2.2.0w:~2.2.0w:~2.2.0w\n",
- [?MODULE, ?version, Y, Mo, D, H, Mi, S]).
-
+ io_lib:format(
+ "%% This file was generated by "
+ "~w (version-~s) ~w-~2.2.0w-~2.2.0w "
+ "~2.2.0w:~2.2.0w:~2.2.0w\n",
+ [?MODULE, ?version, Y, Mo, D, H, Mi, S]).
error(R) ->
throw({error, R}).
diff --git a/lib/snmp/src/agent/snmpa_local_db.erl b/lib/snmp/src/agent/snmpa_local_db.erl
index f991244287..292c370d51 100644
--- a/lib/snmp/src/agent/snmpa_local_db.erl
+++ b/lib/snmp/src/agent/snmpa_local_db.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1011,6 +1011,10 @@ table_construct_row(Name, RowIndex, Status, Cols) ->
defvals = Defs, status_col = StatusCol,
first_own_index = FirstOwnIndex, not_accessible = NoAccs} =
snmp_generic:table_info(Name),
+ ?vtrace(
+ "table_construct_row Indexes: ~p~n"
+ " RowIndex: ~p",
+ [Indexes, RowIndex]),
Keys = snmp_generic:split_index_to_keys(Indexes, RowIndex),
OwnKeys = snmp_generic:get_own_indexes(FirstOwnIndex, Keys),
Row = OwnKeys ++ snmp_generic:table_create_rest(length(OwnKeys) + 1,
diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl
index 11ae806866..642b1f7fc5 100644
--- a/lib/snmp/src/agent/snmpa_mpd.erl
+++ b/lib/snmp/src/agent/snmpa_mpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
-export([init/1, reset/0, inc/1, counters/0,
discarded_pdu/1,
- process_packet/6, process_packet/7,
+ process_packet/5, process_packet/6, process_packet/7,
generate_response_msg/5, generate_response_msg/6,
generate_msg/5, generate_msg/6,
generate_discovery_msg/4,
@@ -113,22 +113,30 @@ reset() ->
% length(snmp_pdus:enc_message(M)) + 4.
%%-----------------------------------------------------------------
-%% Func: process_packet(Packet, TDomain, TAddress, State, Log) ->
+%% Func: process_packet(Packet, Domain, Address, State, Log) ->
%% {ok, SnmpVsn, Pdu, PduMS, ACMData} | {discarded, Reason}
%% Types: Packet = binary()
-%% TDomain = snmpUDPDomain | transportDomain()
-%% TAddress = {Ip, Udp} (*but* depends on TDomain)
+%% Domain = snmpUDPDomain | transportDomain()
+%% Address = {Ip, Udp} (*but* depends on Domain)
%% State = #state
%% Purpose: This is the main Message Dispatching function. (see
%% section 4.2.1 in rfc2272)
%%-----------------------------------------------------------------
-process_packet(Packet, TDomain, TAddress, State, NoteStore, Log) ->
+process_packet(Packet, From, State, NoteStore, Log) ->
LocalEngineID = ?DEFAULT_LOCAL_ENGINE_ID,
- process_packet(Packet, TDomain, TAddress, LocalEngineID,
- State, NoteStore, Log).
-
-process_packet(Packet, TDomain, TAddress, LocalEngineID,
- State, NoteStore, Log) ->
+ process_packet(Packet, From, LocalEngineID, State, NoteStore, Log).
+
+process_packet(
+ Packet, Domain, Address, LocalEngineID, State, NoteStore, Log) ->
+ From = {Domain, Address},
+ process_packet(Packet, From, LocalEngineID, State, NoteStore, Log).
+
+process_packet(Packet, Domain, Address, State, NoteStore, Log)
+ when is_atom(Domain) ->
+ LocalEngineID = ?DEFAULT_LOCAL_ENGINE_ID,
+ From = {Domain, Address},
+ process_packet(Packet, From, LocalEngineID, State, NoteStore, Log);
+process_packet(Packet, From, LocalEngineID, State, NoteStore, Log) ->
inc(snmpInPkts),
case catch snmp_pdus:dec_message_only(binary_to_list(Packet)) of
@@ -136,17 +144,17 @@ process_packet(Packet, TDomain, TAddress, LocalEngineID,
when State#state.v1 =:= true ->
?vlog("v1, community: ~s", [Community]),
HS = ?empty_msg_size + length(Community),
- v1_v2c_proc('version-1', NoteStore, Community,
- TDomain, TAddress,
- LocalEngineID, Data, HS, Log, Packet);
+ v1_v2c_proc(
+ 'version-1', NoteStore, Community, From,
+ LocalEngineID, Data, HS, Log, Packet);
#message{version = 'version-2', vsn_hdr = Community, data = Data}
when State#state.v2c =:= true ->
?vlog("v2c, community: ~s", [Community]),
HS = ?empty_msg_size + length(Community),
- v1_v2c_proc('version-2', NoteStore, Community,
- TDomain, TAddress,
- LocalEngineID, Data, HS, Log, Packet);
+ v1_v2c_proc(
+ 'version-2', NoteStore, Community, From,
+ LocalEngineID, Data, HS, Log, Packet);
#message{version = 'version-3', vsn_hdr = V3Hdr, data = Data}
when State#state.v3 =:= true ->
@@ -154,9 +162,9 @@ process_packet(Packet, TDomain, TAddress, LocalEngineID,
[V3Hdr#v3_hdr.msgID,
V3Hdr#v3_hdr.msgFlags,
V3Hdr#v3_hdr.msgSecurityModel]),
- v3_proc(NoteStore, Packet,
- TDomain, TAddress,
- LocalEngineID, V3Hdr, Data, Log);
+ v3_proc(
+ NoteStore, Packet, From,
+ LocalEngineID, V3Hdr, Data, Log);
{'EXIT', {bad_version, Vsn}} ->
?vtrace("exit: bad version: ~p",[Vsn]),
@@ -183,11 +191,32 @@ discarded_pdu(Variable) -> inc(Variable).
%%-----------------------------------------------------------------
%% Handles a Community based message (v1 or v2c).
%%-----------------------------------------------------------------
-v1_v2c_proc(Vsn, NoteStore, Community, Domain,
- {Ip, Udp}, LocalEngineID,
- Data, HS, Log, Packet) ->
- TDomain = snmp_conf:mk_tdomain(Domain),
- TAddress = snmp_conf:mk_taddress(Domain, Ip, Udp),
+v1_v2c_proc(
+ Vsn, NoteStore, Community, From,
+ LocalEngineID, Data, HS, Log, Packet) ->
+ try
+ case From of
+ {D, A} when is_atom(D) ->
+ {snmp_conf:mk_tdomain(D),
+ snmp_conf:mk_taddress(D, A)};
+ {_, P} = A when is_integer(P) ->
+ {snmp_conf:mk_tdomain(),
+ snmp_conf:mk_taddress(A)}
+ end
+ of
+ {TDomain, TAddress} ->
+ v1_v2c_proc_dec(
+ Vsn, NoteStore, Community, TDomain, TAddress,
+ LocalEngineID, Data, HS, Log, Packet)
+ catch
+ _ ->
+ {discarded, {badarg, From}}
+ end.
+
+
+v1_v2c_proc_dec(
+ Vsn, NoteStore, Community, TDomain, TAddress,
+ LocalEngineID, Data, HS, Log, Packet) ->
AgentMS = get_engine_max_message_size(LocalEngineID),
MgrMS = snmp_community_mib:get_target_addr_ext_mms(TDomain, TAddress),
PduMS = case MgrMS of
@@ -214,7 +243,7 @@ v1_v2c_proc(Vsn, NoteStore, Community, Domain,
case Pdu#pdu.type of
'set-request' ->
%% Check if this message has already been processed
- Key = {agent, Ip, ReqId},
+ Key = {agent, {TDomain, TAddress}, ReqId},
case snmp_note_store:get_note(NoteStore, Key) of
undefined ->
%% Set the processed note _after_ pdu processing.
@@ -236,13 +265,7 @@ v1_v2c_proc(Vsn, NoteStore, Community, Domain,
{discarded, Reason};
_TrapPdu ->
{discarded, trap_pdu}
- end;
-v1_v2c_proc(_Vsn, _NoteStore, _Community, snmpUDPDomain, TAddress,
- _LocalEngineID, _Data, _HS, _Log, _Packet) ->
- {discarded, {badarg, TAddress}};
-v1_v2c_proc(_Vsn, _NoteStore, _Community, TDomain, _TAddress,
- _LocalEngineID, _Data, _HS, _Log, _Packet) ->
- {discarded, {badarg, TDomain}}.
+ end.
sec_model('version-1') -> ?SEC_V1;
sec_model('version-2') -> ?SEC_V2C.
@@ -252,8 +275,7 @@ sec_model('version-2') -> ?SEC_V2C.
%% Handles a SNMPv3 Message, following the procedures in rfc2272,
%% section 4.2 and 7.2
%%-----------------------------------------------------------------
-v3_proc(NoteStore, Packet, _TDomain, _TAddress, LocalEngineID,
- V3Hdr, Data, Log) ->
+v3_proc(NoteStore, Packet, _From, LocalEngineID, V3Hdr, Data, Log) ->
case (catch v3_proc(NoteStore, Packet, LocalEngineID, V3Hdr, Data, Log)) of
{'EXIT', Reason} ->
exit(Reason);
@@ -999,7 +1021,7 @@ generate_discovery_msg(NoteStore, {TDomain, TAddress},
InitialUserName,
ContextName, Timeout) ->
- {ok, {_Domain, Address}} = transform_taddr(TDomain, TAddress),
+ {ok, {Domain, Address}} = transform_taddr(TDomain, TAddress),
%% 7.1.7
?vdebug("generate_discovery_msg -> 7.1.7 (~w)", [ManagerEngineID]),
@@ -1041,7 +1063,7 @@ generate_discovery_msg(NoteStore, {TDomain, TAddress},
%% Log(Packet),
inc_snmp_out_vars(Pdu),
?vdebug("generate_discovery_msg -> done", []),
- {Packet, Address};
+ {Domain, Address, Packet};
Error ->
throw(Error)
@@ -1081,8 +1103,22 @@ transform_taddr(?transportDomainUdpIpv4, [A, B, C, D, P1, P2]) ->
{ok, {Domain, Address}};
transform_taddr(?transportDomainUdpIpv4, BadAddr) ->
{error, {bad_transportDomainUdpIpv4_address, BadAddr}};
-transform_taddr(?transportDomainUdpIpv6,
- [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]) ->
+transform_taddr(
+ ?transportDomainUdpIpv6,
+ [A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16,
+ P1, P2]) ->
+ Domain = transportDomainUdpIpv6,
+ Addr =
+ {(A1 bsl 8) bor A2, (A3 bsl 8) bor A4,
+ (A5 bsl 8) bor A6, (A7 bsl 8) bor A8,
+ (A9 bsl 8) bor A10, (A11 bsl 8) bor A12,
+ (A13 bsl 8) bor A14, (A15 bsl 8) bor A16},
+ Port = P1 bsl 8 + P2,
+ Address = {Addr, Port},
+ {ok, {Domain, Address}};
+transform_taddr(
+ ?transportDomainUdpIpv6,
+ [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]) ->
Domain = transportDomainUdpIpv6,
Addr = {A1, A2, A3, A4, A5, A6, A7, A8},
Port = P1 bsl 8 + P2,
@@ -1171,6 +1207,9 @@ mk_v1_v2_packet_list([{Domain, Addr} | T],
%% Sending from default UDP port
inc_snmp_out_vars(Pdu),
Entry = {Domain, Addr, Packet},
+ %% It would be cleaner to return {To, Packet} to not
+ %% break the abstraction for an address on the
+ %% {Domain, Address} format.
mk_v1_v2_packet_list(T, Packet, Len, Pdu, [Entry | Acc]).
@@ -1277,6 +1316,9 @@ mk_v3_packet_entry(NoteStore, Domain, Addr,
req_id = Pdu#pdu.request_id},
snmp_note_store:set_note(NoteStore, 1500, CacheKey, CacheVal),
inc_snmp_out_vars(Pdu),
+ %% It would be cleaner to return {To, Packet} to not
+ %% break the abstraction for an address on the
+ %% {Domain, Address} format.
{ok, {Domain, Addr, Data}}
end.
diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl
index 79c85a6e4e..57d63bab5b 100644
--- a/lib/snmp/src/agent/snmpa_net_if.erl
+++ b/lib/snmp/src/agent/snmpa_net_if.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,18 +35,27 @@
-include("snmp_debug.hrl").
-include("snmp_verbosity.hrl").
--record(state, {parent,
- note_store,
- master_agent,
- usock,
- usock_opts,
- mpd_state,
- log,
- reqs = [],
- debug = false,
- limit = infinity,
- rcnt = [],
- filter}).
+-record(state,
+ {parent,
+ note_store,
+ master_agent,
+ transports = [],
+%% usock,
+%% usock_opts,
+ mpd_state,
+ log,
+ reqs = [],
+ debug = false,
+ limit = infinity,
+%% rcnt = [],
+ filter}).
+%% domain = snmpUDPDomain}).
+
+-record(transport,
+ {socket,
+ domain = snmpUDPDomain,
+ opts = [],
+ req_refs = []}).
-ifndef(default_verbosity).
-define(default_verbosity,silence).
@@ -104,13 +113,9 @@ get_request_limit(Pid) ->
set_request_limit(Pid, NewLimit) ->
call(Pid, {set_request_limit, NewLimit}).
-get_port() ->
- {value, UDPPort} = snmp_framework_mib:intAgentUDPPort(get),
- UDPPort.
-
-get_address() ->
- {value, IPAddress} = snmp_framework_mib:intAgentIpAddress(get),
- IPAddress.
+get_transports() ->
+ {value, Transports} = snmp_framework_mib:intAgentTransports(get),
+ Transports.
filter_reset(Pid) ->
Pid ! filter_reset.
@@ -129,7 +134,22 @@ init(Prio, NoteStore, MasterAgent, Parent, Opts) ->
case (catch do_init(Prio, NoteStore, MasterAgent, Parent, Opts)) of
{ok, State} ->
proc_lib:init_ack({ok, self()}),
- loop(State);
+ try loop(State)
+ catch
+ C:E when C =/= exit, E =/= shutdown ->
+ Fmt =
+ "loop/1 EXCEPTION ~w:~w~n"
+ " ~p",
+ S = erlang:get_stacktrace(),
+ case C of
+ exit ->
+ %% Externally killed, root cause is elsewhere
+ info_msg(Fmt, [C, E, S]);
+ _ ->
+ error_msg(Fmt, [C, E, S])
+ end,
+ erlang:raise(C, E, S)
+ end;
{error, Reason} ->
config_err("failed starting net-if: ~n~p", [Reason]),
proc_lib:init_ack({error, Reason});
@@ -147,12 +167,6 @@ do_init(Prio, NoteStore, MasterAgent, Parent, Opts) ->
put(verbosity,get_verbosity(Opts)),
?vlog("starting",[]),
- %% -- Port and address --
- UDPPort = get_port(),
- ?vdebug("port: ~w",[UDPPort]),
- IPAddress = get_address(),
- ?vdebug("addr: ~w",[IPAddress]),
-
%% -- Versions --
Vsns = get_vsns(Opts),
?vdebug("vsns: ~w",[Vsns]),
@@ -162,39 +176,45 @@ do_init(Prio, NoteStore, MasterAgent, Parent, Opts) ->
?vdebug("Limit: ~w", [Limit]),
FilterOpts = get_filter_opts(Opts),
FilterMod = create_filter(FilterOpts),
- ?vdebug("FilterMod: ~w", [FilterMod]),
+ ?vdebug("FilterMod: ~w FilterOpts: ~p", [FilterMod,FilterOpts]),
%% -- Audit trail log
Log = create_log(),
?vdebug("Log: ~w",[Log]),
-
- %% -- Socket --
- IPOpts1 = ip_opt_bind_to_ip_address(Opts, IPAddress),
- IPOpts2 = ip_opt_no_reuse_address(Opts),
- IPOpts3 = ip_opt_recbuf(Opts),
- IPOpts4 = ip_opt_sndbuf(Opts),
- IPOpts = [binary | IPOpts1 ++ IPOpts2 ++ IPOpts3 ++ IPOpts4],
- ?vdebug("open socket with options: ~w",[IPOpts]),
- case gen_udp_open(UDPPort, IPOpts) of
- {ok, Sock} ->
+ DomainAddresses = get_transports(),
+ ?vdebug("DomainAddresses: ~w",[DomainAddresses]),
+ try
+ [begin
+ SocketOpts = socket_opts(Domain, Address, Opts),
+ Socket = socket_open(Domain, SocketOpts),
+ active_once(Socket),
+ #transport{
+ socket = Socket,
+ domain = Domain,
+ opts = SocketOpts}
+ end || {Domain, Address} <- DomainAddresses]
+ of
+ [] ->
+ ?vinfo("No transports configured: ~p", [DomainAddresses]),
+ {error, {no_transports,DomainAddresses}};
+ Transports ->
MpdState = snmpa_mpd:init(Vsns),
- init_counters(),
- active_once(Sock),
+ init_counters(),
S = #state{parent = Parent,
note_store = NoteStore,
master_agent = MasterAgent,
mpd_state = MpdState,
- usock = Sock,
- usock_opts = IPOpts,
+ transports = Transports,
log = Log,
limit = Limit,
filter = FilterMod},
?vdebug("started with MpdState: ~p", [MpdState]),
- {ok, S};
- {error, Reason} ->
- ?vinfo("Failed to open UDP socket: ~p", [Reason]),
- {error, {udp_open, UDPPort, Reason}}
+ {ok, S}
+ catch
+ Error ->
+ ?vinfo("Failed to initialize socket(s): ~p", [Error]),
+ {error, Error}
end.
@@ -250,48 +270,84 @@ create_filter(BadOpts) ->
throw({error, {bad_filter_opts, BadOpts}}).
-log({_, []}, _, _, _, _) ->
+log({_, []}, _, _, _) ->
ok;
-log({Log, Types}, 'set-request', Packet, Addr, Port) ->
+log({Log, Types}, 'set-request', Packet, Address) ->
case lists:member(write, Types) of
true ->
- snmp_log:log(Log, Packet, Addr, Port);
+ snmp_log:log(Log, Packet, format_address(Address));
false ->
ok
end;
-log({Log, Types}, _, Packet, Addr, Port) ->
+log({Log, Types}, _, Packet, Address) ->
case lists:member(read, Types) of
true ->
- snmp_log:log(Log, Packet, Addr, Port);
+ snmp_log:log(Log, Packet, format_address(Address));
false ->
ok
- end;
-log(_, _, _, _, _) ->
- ok.
-
-
-gen_udp_open(Port, Opts) ->
+ end.
+
+format_address(Address) ->
+ iolist_to_binary(snmp_conf:mk_addr_string(Address)).
+
+
+socket_open(snmpUDPDomain = Domain, [IpPort | Opts]) ->
case init:get_argument(snmp_fd) of
{ok, [[FdStr]]} ->
Fd = list_to_integer(FdStr),
- gen_udp:open(0, [{fd, Fd}|Opts]);
+ ?vdebug("socket_open(~p, [~p | ~p]) Fd: ~p",
+ [Domain, IpPort, Opts, Fd]),
+ gen_udp_open(0, [{fd, Fd} | Opts]);
error ->
case init:get_argument(snmpa_fd) of
{ok, [[FdStr]]} ->
Fd = list_to_integer(FdStr),
- gen_udp:open(0, [{fd, Fd}|Opts]);
+ ?vdebug("socket_open(~p, [~p | ~p]) Fd: ~p",
+ [Domain, IpPort, Opts, Fd]),
+ gen_udp_open(0, [{fd, Fd} | Opts]);
error ->
- gen_udp:open(Port, Opts)
+ ?vdebug("socket_open(~p, [~p | ~p])",
+ [Domain, IpPort, Opts]),
+ gen_udp_open(IpPort, Opts)
end
+ end;
+socket_open(Domain, [IpPort | Opts])
+ when Domain =:= transportDomainUdpIpv4;
+ Domain =:= transportDomainUdpIpv6 ->
+ ?vdebug("socket_open(~p, [~p | ~p])", [Domain, IpPort, Opts]),
+ gen_udp_open(IpPort, Opts);
+socket_open(Domain, Opts) ->
+ throw({socket_open, Domain, Opts}).
+
+gen_udp_open(IpPort, Opts) ->
+ case gen_udp:open(IpPort, Opts) of
+ {ok, Socket} ->
+ Socket;
+ {error, Reason} ->
+ throw({udp_open, IpPort, Reason})
end.
-loop(S) ->
+
+loop(#state{transports = Transports, limit = Limit, parent = Parent} = S) ->
+ ?vdebug("loop(~p)", [S]),
receive
- {udp, _UdpId, Ip, Port, Packet} ->
- ?vlog("got paket from ~w:~w",[Ip,Port]),
- NewS = maybe_handle_recv(S, Ip, Port, Packet),
- loop(NewS);
+ {udp, Socket, IpAddr, IpPort, Packet} = Msg when is_port(Socket) ->
+ ?vlog("got paket from ~w:~w on ~w", [IpAddr, IpPort, Socket]),
+ case lists:keyfind(Socket, #transport.socket, Transports) of
+ #transport{socket = Socket, domain = Domain} = Transport ->
+ From =
+ case Domain of
+ snmpUDPDomain ->
+ {IpAddr, IpPort};
+ _ ->
+ {Domain, {IpAddr, IpPort}}
+ end,
+ loop(maybe_handle_recv(S, Transport, From, Packet));
+ false ->
+ error_msg("Packet on unknown port: ~p", [Msg]),
+ loop(S)
+ end;
{info, ReplyRef, Pid} ->
Info = get_info(S),
@@ -299,47 +355,78 @@ loop(S) ->
loop(S);
%% response (to get/get_next/get_bulk/set requests)
- {snmp_response, Vsn, RePdu, Type, ACMData, Dest, []} ->
+ {snmp_response, Vsn, RePdu, Type, ACMData, To, Extra} ->
?vlog("reply pdu: "
"~n ~s",
[?vapply(snmp_misc, format, [256, "~w", [RePdu]])]),
- NewS = maybe_handle_reply_pdu(S, Vsn, RePdu, Type, ACMData, Dest),
- loop(NewS);
+ {_, ReqRef} = lists:keyfind(request_ref, 1, Extra),
+ case
+ case
+ (Limit =/= infinity) andalso
+ select_transport_from_req_ref(ReqRef, Transports)
+ of
+ false ->
+ select_transport_from_domain(
+ address_to_domain(To),
+ Transports);
+ T ->
+ T
+ end
+ of
+ false ->
+ error_msg(
+ "Can not find transport for response PDU to: ~s",
+ [format_address(To)]),
+ loop(S);
+ Transport ->
+ NewS = update_req_counter_outgoing(S, Transport, ReqRef),
+ maybe_handle_reply_pdu(
+ NewS, Transport, Vsn, RePdu, Type, ACMData, To),
+ loop(NewS)
+ end;
%% Traps/notification
- {send_pdu, Vsn, Pdu, MsgData, To} ->
- ?vdebug("send pdu: "
- "~n Pdu: ~p"
- "~n To: ~p", [Pdu, To]),
- NewS = maybe_handle_send_pdu(S, Vsn, Pdu, MsgData, To, undefined),
+ {send_pdu, Vsn, Pdu, MsgData, TDomAddrs} ->
+ ?vdebug("send pdu:~n"
+ " Pdu: ~p~n"
+ " TDomAddrs: ~p", [Pdu, TDomAddrs]),
+ NewS =
+ maybe_handle_send_pdu(
+ S, Vsn, Pdu, MsgData, TDomAddrs, undefined),
loop(NewS);
%% We dont use the extra-info at this time, ...
- {send_pdu, Vsn, Pdu, MsgData, To, _ExtraInfo} ->
- ?vdebug("send pdu: "
- "~n Pdu: ~p"
- "~n To: ~p", [Pdu, To]),
- NewS = maybe_handle_send_pdu(S, Vsn, Pdu, MsgData, To, undefined),
+ {send_pdu, Vsn, Pdu, MsgData, TDomAddrs, _ExtraInfo} ->
+ ?vdebug("send pdu:~n"
+ " Pdu: ~p~n"
+ " TDomAddrs: ~p", [Pdu, TDomAddrs]),
+ NewS =
+ maybe_handle_send_pdu(
+ S, Vsn, Pdu, MsgData, TDomAddrs, undefined),
loop(NewS);
%% Informs
- {send_pdu_req, Vsn, Pdu, MsgData, To, From} ->
- ?vdebug("send pdu request: "
- "~n Pdu: ~p"
- "~n To: ~p"
- "~n From: ~p",
- [Pdu, To, toname(From)]),
- NewS = maybe_handle_send_pdu(S, Vsn, Pdu, MsgData, To, From),
+ {send_pdu_req, Vsn, Pdu, MsgData, TDomAddrs, From} ->
+ ?vdebug("send pdu request:~n"
+ " Pdu: ~p~n"
+ " TDomAddrs: ~p~n"
+ " From: ~p",
+ [Pdu, TDomAddrs, toname(From)]),
+ NewS =
+ maybe_handle_send_pdu(
+ S, Vsn, Pdu, MsgData, TDomAddrs, From),
loop(NewS);
%% We dont use the extra-info at this time, ...
- {send_pdu_req, Vsn, Pdu, MsgData, To, From, _ExtraInfo} ->
- ?vdebug("send pdu request: "
- "~n Pdu: ~p"
- "~n To: ~p"
- "~n From: ~p",
- [Pdu, To, toname(From)]),
- NewS = maybe_handle_send_pdu(S, Vsn, Pdu, MsgData, To, From),
+ {send_pdu_req, Vsn, Pdu, MsgData, TDomAddrs, From, _ExtraInfo} ->
+ ?vdebug("send pdu request:~n"
+ " Pdu: ~p~n"
+ " TDomAddrs: ~p~n"
+ " From: ~p",
+ [Pdu, TDomAddrs, toname(From)]),
+ NewS =
+ maybe_handle_send_pdu(
+ S, Vsn, Pdu, MsgData, TDomAddrs, From),
loop(NewS);
%% Discovery Inform
@@ -365,15 +452,34 @@ loop(S) ->
NewS = handle_send_discovery(S, Pdu, MsgData, To, From),
loop(NewS);
- {discarded_pdu, _Vsn, ReqId, _ACMData, Variable, _Extra} ->
- ?vdebug("discard PDU: ~p", [Variable]),
+ {discarded_pdu, _Vsn, ReqId, _ACMData, Variable, Extra} ->
+ ?vdebug("discard PDU: ~p - ~p - ~p",
+ [Variable, Extra, Transports]),
snmpa_mpd:discarded_pdu(Variable),
- NewS = update_req_counter_outgoing(S, ReqId),
- loop(NewS);
+ {_, ReqRef} = lists:keyfind(request_ref, 1, Extra),
+ if
+ Limit =:= infinity ->
+ %% The incoming PDU was not registered
+ loop(update_req_counter_outgoing(S, false, ReqRef));
+ true ->
+ case
+ select_transport_from_req_ref(ReqRef, Transports)
+ of
+ false ->
+ error_msg(
+ "Can not find transport for discarded PDU: ~p",
+ [ReqId]),
+ loop(S);
+ Transport ->
+ loop(
+ update_req_counter_outgoing(
+ S, Transport, ReqRef))
+ end
+ end;
{get_log_type, ReplyRef, Pid} ->
?vdebug("get log type: ~p", []),
- #state{log = {_, LogType}} = S,
+ {_, LogType} = S#state.log,
Pid ! {ReplyRef, {ok, LogType}, self()},
loop(S);
@@ -385,7 +491,6 @@ loop(S) ->
{get_request_limit, ReplyRef, Pid} ->
?vdebug("get request limit: ~p", []),
- #state{limit = Limit} = S,
Pid ! {ReplyRef, {ok, Limit}, self()},
loop(S);
@@ -409,36 +514,50 @@ loop(S) ->
reset_counters(),
loop(S);
- {'EXIT', Parent, Reason} when Parent == S#state.parent ->
+ {'EXIT', Parent, Reason} ->
?vlog("parent (~p) exited: "
"~n ~p", [Parent, Reason]),
exit(Reason);
- {'EXIT', Port, Reason} when Port == S#state.usock ->
- UDPPort = get_port(),
- NewS =
- case gen_udp_open(UDPPort, S#state.usock_opts) of
- {ok, Id} ->
- error_msg("Port ~p exited for reason"
- "~n ~p"
- "~n Re-opened (~p)", [Port, Reason, Id]),
- S#state{usock = Id};
- {error, ReopenReason} ->
- error_msg("Port ~p exited for reason"
- "~n ~p"
- "~n Re-open failed with reason"
- "~n ~p",
- [Port, Reason, ReopenReason]),
- ok
- end,
- loop(NewS);
-
- {'EXIT', Port, Reason} when is_port(Port) ->
- error_msg("Exit message from port ~p for reason ~p~n",
- [Port, Reason]),
- loop(S);
-
- {'EXIT', Pid, Reason} ->
+ {'EXIT', Socket, Reason} when is_port(Socket) ->
+ case lists:keyfind(Socket, #transport.socket, Transports) of
+ #transport{
+ socket = Socket,
+ domain = Domain,
+ opts = SocketOpts,
+ req_refs = ReqRefs} = Transport ->
+ try socket_open(Domain, SocketOpts) of
+ NewSocket ->
+ error_msg(
+ "Socket ~p exited for reason"
+ "~n ~p"
+ "~n Re-opened (~p)",
+ [Socket, Reason, NewSocket]),
+ (length(ReqRefs) < Limit) andalso
+ active_once(NewSocket),
+ S#state{
+ transports =
+ lists:keyreplace(
+ Socket, #transport.socket, Transports,
+ Transport#transport{socket = NewSocket})}
+ catch
+ ReopenReason ->
+ error_msg(
+ "Socket ~p exited for reason"
+ "~n ~p"
+ "~n Re-open failed with reason"
+ "~n ~p",
+ [Socket, Reason, ReopenReason]),
+ exit(ReopenReason)
+ end;
+ false ->
+ error_msg(
+ "Exit message from port ~p for reason ~p~n",
+ [Socket, Reason]),
+ loop(S)
+ end;
+
+ {'EXIT', Pid, Reason} when is_pid(Pid) ->
?vlog("~p exited: "
"~n ~p", [Pid, Reason]),
NewS = clear_reqs(Pid, S),
@@ -446,205 +565,321 @@ loop(S) ->
{system, From, Msg} ->
?vdebug("system event ~p from ~p", [Msg, From]),
- sys:handle_system_msg(Msg, From, S#state.parent, ?MODULE, [], S);
+ sys:handle_system_msg(Msg, From, Parent, ?MODULE, [], S);
_ ->
loop(S)
end.
-update_req_counter_incomming(#state{limit = infinity, usock = Sock} = S, _) ->
- active_once(Sock), %% No limit so activate directly
+update_req_counter_incoming(
+ #state{limit = infinity} = S,
+ #transport{socket = Socket},
+ _ReqRef) ->
+ active_once(Socket), %% No limit so activate directly
S;
-update_req_counter_incomming(#state{limit = Limit,
- rcnt = RCnt,
- usock = Sock} = S, Rid)
- when length(RCnt) + 1 == Limit ->
+update_req_counter_incoming(
+ #state{limit = Limit} = S,
+ #transport{socket = Socket, req_refs = ReqRefs} = T,
+ ReqRef) when length(ReqRefs) + 1 >= Limit ->
%% Ok, one more and we are at the limit.
%% Just make sure we are not already processing this one...
- case lists:member(Rid, RCnt) of
+ case lists:member(ReqRef, ReqRefs) of
false ->
%% We are at the limit, do _not_ activate socket
- S#state{rcnt = [Rid|RCnt]};
+ update_transport_req_refs(S, T, [ReqRef | ReqRefs]);
true ->
- active_once(Sock),
+ active_once(Socket),
S
end;
-update_req_counter_incomming(#state{rcnt = RCnt,
- usock = Sock} = S, Rid) ->
- active_once(Sock),
- case lists:member(Rid, RCnt) of
+update_req_counter_incoming(
+ #state{} = S,
+ #transport{socket = Socket, req_refs = ReqRefs} = T,
+ ReqRef) ->
+ active_once(Socket),
+ case lists:member(ReqRef, ReqRefs) of
false ->
- S#state{rcnt = [Rid|RCnt]};
+ update_transport_req_refs(S, T, [ReqRef | ReqRefs]);
true ->
S
end.
-
-update_req_counter_outgoing(#state{limit = infinity} = S, _Rid) ->
+update_req_counter_outgoing(
+ #state{limit = infinity} = S,
+ _Transport, _ReqRef) ->
%% Already activated (in the incoming function)
S;
-update_req_counter_outgoing(#state{limit = Limit,
- rcnt = RCnt,
- usock = Sock} = S, Rid)
- when length(RCnt) == Limit ->
- ?vtrace("handle_req_counter_outgoing(~w) -> entry with"
- "~n Rid: ~w"
- "~n length(RCnt): ~w", [Limit, Rid, length(RCnt)]),
- case lists:delete(Rid, RCnt) of
- NewRCnt when length(NewRCnt) < Limit ->
+update_req_counter_outgoing(
+ #state{limit = Limit} = S,
+ #transport{socket = Socket, req_refs = ReqRefs} = Transport,
+ ReqRef) ->
+ LengthReqRefs = length(ReqRefs),
+ ?vtrace("update_req_counter_outgoing() -> entry with~n"
+ " Limit: ~w~n"
+ " ReqRef: ~w~n"
+ " length(ReqRefs): ~w", [Limit, ReqRef, LengthReqRefs]),
+ NewReqRefs = lists:delete(ReqRef, ReqRefs),
+ (LengthReqRefs >= Limit) andalso (length(NewReqRefs) < Limit) andalso
+ begin
?vtrace("update_req_counter_outgoing -> "
- "passed below limit: activate", []),
- active_once(Sock),
- S#state{rcnt = NewRCnt};
- _ ->
- S
- end;
-update_req_counter_outgoing(#state{limit = Limit, rcnt = RCnt} = S,
- Rid) ->
- ?vtrace("handle_req_counter_outgoing(~w) -> entry with"
- "~n Rid: ~w"
- "~n length(RCnt): ~w", [Limit, Rid, length(RCnt)]),
- NewRCnt = lists:delete(Rid, RCnt),
- S#state{rcnt = NewRCnt}.
-
-
-maybe_handle_recv(#state{usock = Sock, filter = FilterMod} = S,
- Ip, Port, Packet) ->
- case (catch FilterMod:accept_recv(Ip, Port)) of
+ "passed below limit: activate", []),
+ active_once(Socket)
+ end,
+ update_transport_req_refs(S, Transport, NewReqRefs).
+
+update_transport_req_refs(
+ #state{transports = Transports} = S,
+ #transport{socket = Socket} = T,
+ ReqRefs) ->
+ S#state{
+ transports =
+ lists:keyreplace(
+ Socket, #transport.socket, Transports,
+ T#transport{req_refs = ReqRefs})}.
+
+
+maybe_handle_recv(
+ #state{filter = FilterMod} = S,
+ #transport{socket = Socket} = Transport,
+ From, Packet) ->
+ {From_1, From_2} = From,
+ case
+ try FilterMod:accept_recv(From_1, From_2)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_recv(~p, ~p) crashed: ~w:~w~n ~p",
+ [From_1,From_2,Class,Exception,erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
%% Drop the received packet
inc(netIfMsgInDrops),
- active_once(Sock),
+ active_once(Socket),
S;
- _ ->
- handle_recv(S, Ip, Port, Packet)
+ Other ->
+ case Other of
+ true ->
+ ok;
+ _ ->
+ error_msg(
+ "FilterMod:accept_recv(~p, ~p) returned: ~p",
+ [From_1,From_2,Other])
+ end,
+ handle_recv(S, Transport, From, Packet)
end.
-handle_discovery_response(_Ip, _Port, #pdu{request_id = ReqId} = Pdu,
- ManagerEngineId,
- #state{usock = Sock, reqs = Reqs} = S) ->
- case lists:keysearch(ReqId, 1, S#state.reqs) of
- {value, {_, Pid}} ->
- active_once(Sock),
- Pid ! {snmp_discovery_response_received, Pdu, ManagerEngineId},
- NReqs = lists:keydelete(ReqId, 1, Reqs),
- S#state{reqs = NReqs};
- _ ->
- %% Ouch, timeout? resend?
- S
- end.
-
-handle_recv(#state{usock = Sock,
- mpd_state = MpdState,
- note_store = NS,
- log = Log} = S, Ip, Port, Packet) ->
+handle_recv(
+ #state{mpd_state = MpdState, note_store = NS, log = Log} = S,
+ #transport{socket = Socket} = Transport,
+ From, Packet) ->
put(n1, erlang:now()),
- LogF = fun(Type, Data) ->
- log(Log, Type, Data, Ip, Port)
- end,
- Domain = snmp_conf:which_domain(Ip), % What the ****...
- case (catch snmpa_mpd:process_packet(Packet,
- Domain, {Ip, Port},
- MpdState, NS, LogF)) of
+ LogF =
+ fun(Type, Data) ->
+ log(Log, Type, Data, From)
+ end,
+ case (catch snmpa_mpd:process_packet(
+ Packet, From, MpdState, NS, LogF)) of
{ok, _Vsn, Pdu, _PduMS, {discovery, ManagerEngineId}} ->
- handle_discovery_response(Ip, Port, Pdu, ManagerEngineId, S);
+ handle_discovery_response(
+ S, Transport, From, Pdu, ManagerEngineId);
{ok, _Vsn, Pdu, _PduMS, discovery} ->
- handle_discovery_response(Ip, Port, Pdu, undefined, S);
+ handle_discovery_response(
+ S, Transport, From, Pdu, undefined);
{ok, Vsn, Pdu, PduMS, ACMData} ->
?vlog("got pdu ~s",
[?vapply(snmp_misc, format, [256, "~w", [Pdu]])]),
- %% handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData, S);
- maybe_handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData, S);
+ %% handle_recv_pdu(S, Transport, From, Vsn, Pdu, PduMS, ACMData);
+ maybe_handle_recv_pdu(
+ S, Transport, From, Vsn, Pdu, PduMS, ACMData);
{discarded, Reason} ->
?vlog("packet discarded for reason: ~s",
[?vapply(snmp_misc, format, [256, "~w", [Reason]])]),
- active_once(Sock),
+ active_once(Socket),
S;
{discarded, Reason, ReportPacket} ->
?vlog("sending report for reason: "
"~n ~s",
[?vapply(snmp_misc, format, [256, "~w", [Reason]])]),
- (catch udp_send(S#state.usock, Ip, Port, ReportPacket)),
- active_once(Sock),
+ (catch udp_send(Socket, From, ReportPacket)),
+ active_once(Socket),
S;
{discovery, ReportPacket} ->
?vlog("sending discovery report", []),
- (catch udp_send(S#state.usock, Ip, Port, ReportPacket)),
- active_once(Sock),
+ (catch udp_send(Socket, From, ReportPacket)),
+ active_once(Socket),
S;
Error ->
error_msg("processing of received message failed: "
"~n ~p", [Error]),
- active_once(Sock),
+ active_once(Socket),
S
end.
-
-maybe_handle_recv_pdu(Ip, Port, Vsn, #pdu{type = Type} = Pdu, PduMS, ACMData,
- #state{usock = Sock, filter = FilterMod} = S) ->
- case (catch FilterMod:accept_recv_pdu(Ip, Port, Type)) of
+
+handle_discovery_response(
+ #state{reqs = Reqs} = S,
+ #transport{socket = Socket},
+ _From,
+ #pdu{request_id = ReqId} = Pdu,
+ ManagerEngineId) ->
+ case lists:keyfind(ReqId, 1, S#state.reqs) of
+ {ReqId, Pid} ->
+ active_once(Socket),
+ Pid ! {snmp_discovery_response_received, Pdu, ManagerEngineId},
+ %% XXX Strange... Reqs from this Pid should be reaped
+ %% at process exit by clear_reqs/2 so the following
+ %% should be redundant.
+ NReqs = lists:keydelete(ReqId, 1, Reqs),
+ S#state{reqs = NReqs};
+ false ->
+ %% Ouch, timeout? resend?
+ S
+ end.
+
+maybe_handle_recv_pdu(
+ #state{filter = FilterMod} = S,
+ #transport{socket = Socket} = Transport,
+ From, Vsn,
+ #pdu{type = Type} = Pdu, PduMS, ACMData) ->
+ {From_1, From_2} = From,
+ case
+ try FilterMod:accept_recv_pdu(From_1, From_2, Type)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_recv_pdu(~p, ~p, ~p) crashed: ~w:~w~n"
+ " ~p",
+ [From_1,From_2,Type,Class,Exception,
+ erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
inc(netIfPduInDrops),
- active_once(Sock),
- ok;
- _ ->
- handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData, S)
- end;
-maybe_handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData, S) ->
- handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData, S).
+ active_once(Socket),
+ S;
+ Other ->
+ case Other of
+ true ->
+ ok;
+ _ ->
+ error_msg(
+ "FilterMod:accept_recv_pdu(~p, ~p, ~p) returned: ~p",
+ [From_1,From_2,Type,Other])
+ end,
+ handle_recv_pdu(S, Transport, From, Vsn, Pdu, PduMS, ACMData)
+ end.
-handle_recv_pdu(Ip, Port, Vsn, #pdu{type = 'get-response'} = Pdu,
- _PduMS, _ACMData, #state{usock = Sock} = S) ->
- active_once(Sock),
- handle_response(Vsn, Pdu, {Ip, Port}, S),
+handle_recv_pdu(
+ #state{reqs = Reqs} = S,
+ #transport{socket = Socket},
+ From, Vsn,
+ #pdu{type = 'get-response', request_id = ReqId} = Pdu,
+ _PduMS, _ACMData) ->
+ active_once(Socket),
+ case lists:keyfind(ReqId, 1, Reqs) of
+ {ReqId, Pid} ->
+ ?vdebug("handle_recv_pdu -> "
+ "~n send response to receiver ~p", [Pid]),
+ Pid ! {snmp_response_received, Vsn, Pdu, From};
+ false ->
+ ?vdebug("handle_recv_pdu -> "
+ "~n No receiver available for response pdu", [])
+ end,
S;
-handle_recv_pdu(Ip, Port, Vsn, #pdu{request_id = Rid, type = Type} = Pdu,
- PduMS, ACMData, #state{master_agent = Pid} = S)
- when ((Type =:= 'get-request') orelse
- (Type =:= 'get-next-request') orelse
- (Type =:= 'get-bulk-request')) ->
- ?vtrace("handle_recv_pdu -> received get (~w)", [Type]),
- Pid ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, {Ip, Port}, []},
- update_req_counter_incomming(S, Rid);
-handle_recv_pdu(Ip, Port, Vsn, Pdu, PduMS, ACMData,
- #state{usock = Sock, master_agent = Pid} = S) ->
+handle_recv_pdu(
+ #state{master_agent = Pid} = S,
+ #transport{} = Transport,
+ From, Vsn,
+ #pdu{type = Type} = Pdu,
+ PduMS, ACMData)
+ when Type =:= 'set-request';
+ Type =:= 'get-request';
+ Type =:= 'get-next-request';
+ Type =:= 'get-bulk-request' ->
+ ?vtrace("handle_recv_pdu -> received request (~w)", [Type]),
+ ReqRef = make_ref(),
+ Extra = [{request_ref, ReqRef}],
+ Pid ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, Extra},
+ NewS = update_req_counter_incoming(S, Transport, ReqRef),
+ ?vdebug("handle_recv_pdu -> ~p", [NewS]),
+ NewS;
+handle_recv_pdu(
+ #state{master_agent = Pid} = S,
+ #transport{socket = Socket},
+ From, Vsn, Pdu, PduMS, ACMData) ->
?vtrace("handle_recv_pdu -> received other request", []),
- active_once(Sock),
- Pid ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, {Ip, Port}, []},
+ active_once(Socket),
+ Pid ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, []},
S.
-maybe_handle_reply_pdu(#state{filter = FilterMod} = S, Vsn,
- #pdu{request_id = Rid} = Pdu,
- Type, ACMData, {Ip, Port} = Dest) ->
- S1 = update_req_counter_outgoing(S, Rid),
- case (catch FilterMod:accept_send_pdu([{Ip, Port}], Type)) of
+maybe_handle_reply_pdu(
+ #state{filter = FilterMod, transports = Transports} = S,
+ #transport{} = Transport,
+ Vsn,
+ #pdu{} = Pdu,
+ Type, ACMData, To) ->
+ %%
+ Addresses = [fix_filter_address(Transports, To)],
+ case
+ try
+ FilterMod:accept_send_pdu(Addresses, Type)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_send_pdu(~p, ~p) crashed: ~w:~w~n ~p",
+ [Addresses, Type, Class, Exception,
+ erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
inc(netIfPduOutDrops),
ok;
- _ ->
- handle_reply_pdu(S1, Vsn, Pdu, Type, ACMData, Dest)
- end,
- S1.
-
-handle_reply_pdu(#state{log = Log,
- usock = Sock,
- filter = FilterMod},
- Vsn, Pdu, Type, ACMData, {Ip, Port}) ->
- LogF = fun(Type2, Data) ->
- log(Log, Type2, Data, Ip, Port)
- end,
+ Other ->
+ case Other of
+ true ->
+ ok;
+ _ ->
+ error_msg(
+ "FilterMod:accept_send_pdu(~p, ~p) returned: ~p",
+ [Addresses,Type,Other])
+ end,
+ handle_reply_pdu(S, Transport, Vsn, Pdu, Type, ACMData, To)
+ end.
+
+handle_reply_pdu(
+ #state{log = Log} = S,
+ #transport{} = Transport,
+ Vsn,
+ #pdu{} = Pdu,
+ Type, ACMData, To) ->
+ %%
+ LogF =
+ fun(Type2, Data) ->
+ log(Log, Type2, Data, To)
+ end,
case (catch snmpa_mpd:generate_response_msg(Vsn, Pdu, Type,
ACMData, LogF)) of
{ok, Packet} ->
?vinfo("time in agent: ~w mysec", [time_in_agent()]),
- maybe_udp_send(FilterMod, Sock, Ip, Port, Packet);
+ try maybe_udp_send(S, Transport, To, Packet)
+ catch
+ {Reason, Sz} ->
+ error_msg("Cannot send message "
+ "~n size: ~p"
+ "~n reason: ~p"
+ "~n pdu: ~p",
+ [Sz, Reason, Pdu])
+ end;
{discarded, Reason} ->
?vlog("handle_reply_pdu -> "
"~n reply discarded for reason: ~s",
@@ -652,105 +887,116 @@ handle_reply_pdu(#state{log = Log,
ok;
{'EXIT', Reason} ->
user_err("failed generating response message: "
- "~nPDU: ~w~n~w", [Pdu, Reason])
+ "~nPDU: ~p~n~p", [Pdu, Reason])
end.
-
-process_taddrs(To) ->
- process_taddrs(To, []).
-process_taddrs([], Acc) ->
- lists:reverse(Acc);
-%% v3
-process_taddrs([{{_Domain, AddrAndPort}, _SecData}|T], Acc) ->
- process_taddrs(T, [AddrAndPort|Acc]);
-%% v1 & v2
-process_taddrs([{_Domain, AddrAndPort}|T], Acc) ->
- process_taddrs(T, [AddrAndPort|Acc]).
-merge_taddrs(To1, To2) ->
- merge_taddrs(To1, To2, []).
+maybe_handle_send_pdu(
+ #state{filter = FilterMod, transports = Transports} = S,
+ Vsn, Pdu, MsgData, TDomAddrSecs, From) ->
-merge_taddrs([], _To2, Acc) ->
- lists:reverse(Acc);
-%% v3
-merge_taddrs([{{_, AddrAndPort}, _} = H|To1], To2, Acc) ->
- case lists:member(AddrAndPort, To2) of
- true ->
- merge_taddrs(To1, To2, [H|Acc]);
- false ->
- merge_taddrs(To1, To2, Acc)
- end;
-%% v1 & v2
-merge_taddrs([{_, AddrAndPort} = H|To1], To2, Acc) ->
- case lists:member(AddrAndPort, To2) of
- true ->
- merge_taddrs(To1, To2, [H|Acc]);
- false ->
- merge_taddrs(To1, To2, Acc)
- end;
-merge_taddrs([_Crap|To1], To2, Acc) ->
- merge_taddrs(To1, To2, Acc).
-
-
-maybe_handle_send_pdu(#state{filter = FilterMod} = S,
- Vsn, Pdu, MsgData, To0, From) ->
+ ?vtrace("maybe_handle_send_pdu -> entry with~n"
+ " FilterMod: ~p~n"
+ " TDomAddrSecs: ~p", [FilterMod, TDomAddrSecs]),
- ?vtrace("maybe_handle_send_pdu -> entry with"
- "~n FilterMod: ~p"
- "~n To0: ~p", [FilterMod, To0]),
-
- To1 = snmpa_mpd:process_taddrs(To0),
- To2 = process_taddrs(To1),
+ DomAddrSecs = snmpa_mpd:process_taddrs(TDomAddrSecs),
+ AddressesToFilter =
+ case is_legacy_transports(Transports) of
+ true ->
+ [fix_filter_legacy_mpd_address(DAS)
+ || DAS <- DomAddrSecs];
+ false ->
+ [fix_filter_mpd_address(DAS)
+ || DAS <- DomAddrSecs]
+ end,
- case (catch FilterMod:accept_send_pdu(To2, pdu_type_of(Pdu))) of
+ Type = pdu_type_of(Pdu),
+
+ case
+ try FilterMod:accept_send_pdu(AddressesToFilter, Type)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_send_pdu(~p, ~p) crashed: ~w:~w~n ~p",
+ [AddressesToFilter,Type,
+ Class,Exception,erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
inc(netIfPduOutDrops),
ok;
true ->
- handle_send_pdu(S, Vsn, Pdu, MsgData, To1, From);
- To3 when is_list(To3) ->
- To4 = merge_taddrs(To1, To3),
- ?vtrace("maybe_handle_send_pdu -> To4: "
- "~n ~p", [To4]),
- handle_send_pdu(S, Vsn, Pdu, MsgData, To4, From);
- _ ->
- handle_send_pdu(S, Vsn, Pdu, MsgData, To1, From)
+ handle_send_pdu(S, Vsn, Pdu, MsgData, DomAddrSecs, From);
+ FilteredAddresses when is_list(FilteredAddresses) ->
+ FilteredDomAddrSecs =
+ case is_legacy_transports(Transports) of
+ true ->
+ [DAS ||
+ DAS <- DomAddrSecs,
+ lists:member(
+ fix_filter_legacy_mpd_address(DAS),
+ FilteredAddresses)];
+ false ->
+ [DAS ||
+ DAS <- DomAddrSecs,
+ lists:member(
+ fix_filter_mpd_address(DAS),
+ FilteredAddresses)]
+ end,
+ ?vtrace("maybe_handle_send_pdu -> FilteredDomAddrSecs:~n"
+ " ~p", [FilteredDomAddrSecs]),
+ handle_send_pdu(S, Vsn, Pdu, MsgData, FilteredDomAddrSecs, From);
+ Other ->
+ error_msg(
+ "FilterMod:accept_send_pdu(~p, ~p) returned: ~p",
+ [AddressesToFilter,Type,Other]),
+ handle_send_pdu(S, Vsn, Pdu, MsgData, DomAddrSecs, From)
end.
-handle_send_pdu(#state{note_store = NS} = S, Vsn, Pdu, MsgData, To, From) ->
-
- ?vtrace("handle_send_pdu -> entry with"
- "~n Pdu: ~p"
- "~n To: ~p", [Pdu, To]),
+handle_send_pdu(
+ #state{note_store = NS} = S,
+ Vsn, Pdu, MsgData, DomAddrSecs, From) ->
+ %%
+ ?vtrace("handle_send_pdu -> entry with~n"
+ " Pdu: ~p~n"
+ " DomAddrSecs: ~p", [Pdu, DomAddrSecs]),
- case (catch snmpa_mpd:generate_msg(Vsn, NS, Pdu, MsgData, To)) of
+ case (catch snmpa_mpd:generate_msg(
+ Vsn, NS, Pdu, MsgData, DomAddrSecs)) of
{ok, Addresses} ->
- handle_send_pdu(S, Pdu, Addresses);
+ do_handle_send_pdu(S, Pdu, Addresses);
{discarded, Reason} ->
?vlog("handle_send_pdu -> "
"~n PDU ~p not sent due to ~p", [Pdu, Reason]),
ok;
{'EXIT', Reason} ->
user_err("failed generating message: "
- "~nPDU: ~w~n~w", [Pdu, Reason]),
+ "~nPDU: ~p~n~p", [Pdu, Reason]),
ok
end,
case From of
undefined ->
S;
- Pid ->
+ Pid when is_pid(Pid) ->
?vtrace("link to ~p and add to request list", [Pid]),
link(Pid),
- NReqs = snmp_misc:keyreplaceadd(Pid, 2, S#state.reqs,
- {Pdu#pdu.request_id, From}),
+ NReqs =
+ snmp_misc:keyreplaceadd(
+ Pid, 2, S#state.reqs, {Pdu#pdu.request_id, From}),
S#state{reqs = NReqs}
end.
-handle_send_discovery(#state{note_store = NS} = S,
- Pdu, MsgData,
- To, From) ->
+handle_send_discovery(
+ #state{
+ note_store = NS,
+ log = Log,
+ reqs = Reqs,
+ transports = Transports} = S,
+ #pdu{type = Type, request_id = ReqId} = Pdu,
+ MsgData, To, From) when is_pid(From) ->
?vtrace("handle_send_discovery -> entry with"
"~n Pdu: ~p"
@@ -759,155 +1005,173 @@ handle_send_discovery(#state{note_store = NS} = S,
"~n From: ~p", [Pdu, MsgData, To, From]),
case (catch snmpa_mpd:generate_discovery_msg(NS, Pdu, MsgData, To)) of
- {ok, {Packet, {Ip, Port}}} ->
- handle_send_discovery(S, Pdu, Packet, Ip, Port, From);
+ {ok, {Domain, Address, Packet}} ->
+ case select_transport_from_domain(Domain, Transports) of
+ false ->
+ error_msg(
+ "Can not find transport to: ~s",
+ [format_address(To)]),
+ S;
+ #transport{socket = Socket} ->
+ log(Log, Type, Packet, {Domain, Address}),
+ udp_send(Socket, {Domain, Address}, Packet),
+ ?vtrace("handle_send_discovery -> sent (~w)", [ReqId]),
+ NReqs = snmp_misc:keyreplaceadd(From, 2, Reqs, {ReqId, From}),
+ S#state{reqs = NReqs}
+ end;
{discarded, Reason} ->
?vlog("handle_send_discovery -> "
"~n Discovery PDU ~p not sent due to ~p", [Pdu, Reason]),
- ok;
+ S;
{'EXIT', Reason} ->
user_err("failed generating discovery message: "
- "~n PDU: ~w"
- "~n Reason: ~w", [Pdu, Reason]),
- ok
+ "~n PDU: ~p"
+ "~n Reason: ~p", [Pdu, Reason]),
+ S
end.
-handle_send_discovery(#state{log = Log,
- usock = Sock,
- reqs = Reqs} = S,
- #pdu{type = Type,
- request_id = ReqId},
- Packet, Ip, Port, From)
- when is_binary(Packet) ->
- log(Log, Type, Packet, Ip, Port),
- udp_send(Sock, Ip, Port, Packet),
- ?vtrace("handle_send_discovery -> sent (~w)", [ReqId]),
- NReqs = snmp_misc:keyreplaceadd(From, 2, Reqs, {ReqId, From}),
- S#state{reqs = NReqs}.
+do_handle_send_pdu(S, #pdu{type = Type} = Pdu, Addresses) ->
+ do_handle_send_pdu(S, Type, Pdu, Addresses);
+do_handle_send_pdu(S, Trap, Addresses) ->
+ do_handle_send_pdu(S, trappdu, Trap, Addresses).
-handle_send_pdu(S, #pdu{type = Type} = Pdu, Addresses) ->
- handle_send_pdu(S, Type, Pdu, Addresses);
-handle_send_pdu(S, Trap, Addresses) ->
- handle_send_pdu(S, trappdu, Trap, Addresses).
-
-handle_send_pdu(S, Type, Pdu, Addresses) ->
- case (catch handle_send_pdu1(S, Type, Addresses)) of
+do_handle_send_pdu(S, Type, Pdu, Addresses) ->
+ try do_handle_send_pdu1(S, Type, Addresses)
+ catch
{Reason, Sz} ->
- error_msg("Cannot send message "
- "~n size: ~p"
- "~n reason: ~p"
- "~n pdu: ~p",
- [Sz, Reason, Pdu]);
- _ ->
- ok
- end.
-
-handle_send_pdu1(#state{log = Log,
- usock = Sock,
- filter = FilterMod}, Type, Addresses) ->
- SendFun =
- fun({snmpUDPDomain, {Ip, Port}, Packet})
- when is_binary(Packet) ->
- ?vdebug("[snmpUDPDomain] sending packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- ({snmpUDPDomain, {Ip, Port}, {Packet, _LogData}})
- when is_binary(Packet) ->
- ?vdebug("[snmpUDPDomain] sending encrypted packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- ({transportDomainUdpIpv4, {Ip, Port}, Packet})
- when is_binary(Packet) ->
- ?vdebug("[transportDomainUdpIpv4] sending packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- ({transportDomainUdpIpv4, {Ip, Port}, {Packet, _LogData}})
- when is_binary(Packet) ->
- ?vdebug("[transportDomainUdpIpv4] sending encrypted packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- ({transportDomainUdpIpv6, {Ip, Port}, Packet})
- when is_binary(Packet) ->
- ?vdebug("[transportDomainUdpIpv6] sending packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- ({transportDomainUdpIpv6, {Ip, Port}, {Packet, _LogData}})
- when is_binary(Packet) ->
- ?vdebug("[transportDomainUdpIpv6] sending encrypted packet:"
- "~n size: ~p"
- "~n to: ~p:~p",
- [sz(Packet), Ip, Port]),
- maybe_udp_send(FilterMod, Log, Type, Sock, Ip, Port, Packet);
-
- (_X) ->
- ?vlog("** bad res: ~p", [_X]),
- ok
- end,
- lists:foreach(SendFun, Addresses).
-
-
-handle_response(Vsn, Pdu, From, S) ->
- case lists:keysearch(Pdu#pdu.request_id, 1, S#state.reqs) of
- {value, {_, Pid}} ->
- ?vdebug("handle_response -> "
- "~n send response to receiver ~p", [Pid]),
- Pid ! {snmp_response_received, Vsn, Pdu, From};
- _ ->
- ?vdebug("handle_response -> "
- "~n No receiver available for response pdu", [])
+ error_msg(
+ "Can not send message~n"
+ " size: ~p~n"
+ " reason: ~p~n"
+ " pdu: ~p",
+ [Sz, Reason, Pdu])
end.
-maybe_udp_send(FilterMod, Sock, Ip, Port, Packet) ->
- case (catch FilterMod:accept_send(Ip, Port)) of
+do_handle_send_pdu1(
+ #state{transports = Transports} = S,
+ Type, Addresses) ->
+ lists:foreach(
+ fun ({Domain, Address, Packet}) when is_binary(Packet) ->
+ ?vdebug(
+ "[~w] sending packet:~n"
+ " size: ~p~n"
+ " to: ~p", [Domain, sz(Packet), Address]),
+ To = {Domain, Address},
+ case select_transport_from_domain(Domain, Transports) of
+ false ->
+ error_msg(
+ "Can not find transport~n"
+ " size: ~p~n"
+ " to: ~s",
+ [sz(Packet), format_address(To)]);
+ Transport ->
+ maybe_udp_send(S, Transport, To, Packet)
+ end;
+ ({Domain, Address, {Packet, LogData}}) when is_binary(Packet) ->
+ ?vdebug(
+ "[~w] sending encrypted packet:~n"
+ " size: ~p~n"
+ " to: ~p", [Domain, sz(Packet), Address]),
+ To = {Domain, Address},
+ case select_transport_from_domain(Domain, Transports) of
+ false ->
+ error_msg(
+ "Can not find transport~n"
+ " size: ~p~n"
+ " to: ~s",
+ [sz(Packet), format_address(To)]);
+ Transport ->
+ maybe_udp_send(S, Transport, To, Packet, Type, LogData)
+ end
+ end,
+ Addresses).
+
+maybe_udp_send(
+ #state{filter = FilterMod, transports = Transports},
+ #transport{socket = Socket},
+ To, Packet) ->
+ {To_1, To_2} = fix_filter_address(Transports, To),
+ case
+ try FilterMod:accept_send(To_1, To_2)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_send(~p, ~p) crashed: ~w:~w~n ~p",
+ [To_1,To_2,Class,Exception,erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
inc(netIfMsgOutDrops),
ok;
- _ ->
- (catch udp_send(Sock, Ip, Port, Packet))
+ Other ->
+ case Other of
+ true ->
+ ok;
+ _ ->
+ error_msg(
+ "FilterMod:accept_send(~p, ~p) returned: ~p",
+ [To_1,To_2,Other])
+ end,
+ udp_send(Socket, To, Packet)
end.
-maybe_udp_send(FilterMod, AtLog, Type, Sock, Ip, Port, Packet) ->
- case (catch FilterMod:accept_send(Ip, Port)) of
+maybe_udp_send(
+ #state{log = Log, filter = FilterMod, transports = Transports},
+ #transport{socket = Socket},
+ To, Packet, Type, _LogData) ->
+ {To_1, To_2} = fix_filter_address(Transports, To),
+ case
+ try FilterMod:accept_send(To_1, To_2)
+ catch
+ Class:Exception ->
+ error_msg(
+ "FilterMod:accept_send(~p, ~p) crashed for: ~w:~w~n ~p",
+ [To_1, To_2, Class, Exception, erlang:get_stacktrace()]),
+ true
+ end
+ of
false ->
inc(netIfMsgOutDrops),
ok;
- _ ->
- log(AtLog, Type, Packet, Ip, Port),
- (catch udp_send(Sock, Ip, Port, Packet))
+ Other ->
+ case Other of
+ true ->
+ ok;
+ _ ->
+ error_msg(
+ "FilterMod:accept_send(~p, ~p) returned: ~p",
+ [To_1,To_2,Other])
+ end,
+ log(Log, Type, Packet, To),
+ udp_send(Socket, To, Packet)
end.
-
-udp_send(UdpId, AgentIp, UdpPort, B) ->
- case (catch gen_udp:send(UdpId, AgentIp, UdpPort, B)) of
+udp_send(Socket, To, B) ->
+ {IpAddr, IpPort} =
+ case To of
+ {Domain, Addr} when is_atom(Domain) ->
+ Addr;
+ {_, P} = Addr when is_integer(P) ->
+ Addr
+ end,
+ try gen_udp:send(Socket, IpAddr, IpPort, B) of
{error, emsgsize} ->
%% From this message we cannot recover, so exit sending loop
throw({emsgsize, sz(B)});
{error, ErrorReason} ->
error_msg("[error] cannot send message "
"(destination: ~p:~p, size: ~p, reason: ~p)",
- [AgentIp, UdpPort, sz(B), ErrorReason]);
- {'EXIT', ExitReason} ->
- error_msg("[exit] cannot send message "
- "(destination: ~p:~p, size: ~p, reason: ~p)",
- [AgentIp, UdpPort, sz(B), ExitReason]);
- _ ->
+ [IpAddr, IpPort, sz(B), ErrorReason]);
+ ok ->
ok
+ catch
+ error:ExitReason ->
+ error_msg("[exit] cannot send message "
+ "(destination: ~p:~p, size: ~p, reason: ~p, at: ~p)",
+ [IpAddr, IpPort, sz(B), ExitReason,
+ erlang:get_stacktrace()])
end.
sz(L) when is_list(L) -> length(L);
@@ -957,6 +1221,75 @@ active_once(Sock) ->
inet:setopts(Sock, [{active, once}]).
+select_transport_from_req_ref(_, []) ->
+ false;
+select_transport_from_req_ref(
+ ReqRef,
+ [#transport{req_refs = ReqRefs} = Transport | Transports]) ->
+ case lists:member(ReqRef, ReqRefs) of
+ true ->
+ Transport;
+ false ->
+ select_transport_from_req_ref(ReqRef, Transports)
+ end.
+
+select_transport_from_domain(Domain, Transports) when is_atom(Domain) ->
+ Pos = #transport.domain,
+ case lists:keyfind(Domain, Pos, Transports) of
+ #transport{domain = Domain} = Transport ->
+ Transport;
+ false when Domain == snmpUDPDomain ->
+ lists:keyfind(transportDomainUdpIpv4, Pos, Transports);
+ false when Domain == transportDomainUdpIpv4 ->
+ lists:keyfind(snmpUDPDomain, Pos, Transports);
+ false ->
+ false
+ end.
+
+address_to_domain({Domain, _Addr}) when is_atom(Domain) ->
+ Domain;
+address_to_domain({_Ip, Port}) when is_integer(Port) ->
+ snmpUDPDomain.
+
+%% If the agent uses legacy snmpUDPDomain e.g has not set
+%% intAgentTransportDomain, then make sure
+%% snmpa_network_interface_filter gets legacy arguments
+%% to not break backwards compatibility.
+%%
+fix_filter_address(Transports, Address) ->
+ case is_legacy_transports(Transports) of
+ true ->
+ case Address of
+ {Domain, Addr} when is_atom(Domain) ->
+ Addr;
+ {_, IpPort} = Addr when is_integer(IpPort) ->
+ Addr
+ end;
+ false ->
+ Address
+ end.
+
+is_legacy_transports([#transport{domain = snmpUDPDomain}]) ->
+ true;
+is_legacy_transports([#transport{} | _]) ->
+ false.
+
+fix_filter_legacy_mpd_address(Domain_Address_SecData) ->
+ case Domain_Address_SecData of
+ {{Domain, Addr}, _SecData} when is_atom(Domain) -> % v3
+ Addr;
+ {Domain, Addr} when is_atom(Domain) -> % v1 & v2
+ Addr
+ end.
+
+fix_filter_mpd_address(Domain_Address_SecData) ->
+ case Domain_Address_SecData of
+ {{Domain, _Addr} = Address, _SecData} when is_atom(Domain) -> % v3
+ Address;
+ {Domain, _Addr} = Address when is_atom(Domain) -> % v1 & v2
+ Address
+ end.
+
%%%-----------------------------------------------------------------
handle_set_log_type(#state{log = {Log, OldValue}} = State, NewType)
@@ -1113,37 +1446,39 @@ get_counters([Counter|Counters], Acc) ->
%% ----------------------------------------------------------------
-ip_opt_bind_to_ip_address(Opts, Ip) ->
- case get_bind_to_ip_address(Opts) of
- true ->
- [{ip, list_to_tuple(Ip)}];
- _ ->
- []
- end.
-
-ip_opt_no_reuse_address(Opts) ->
- case get_no_reuse_address(Opts) of
- false ->
- [{reuseaddr, true}];
- _ ->
- []
- end.
-
-ip_opt_recbuf(Opts) ->
- case get_recbuf(Opts) of
- use_default ->
- [];
- Sz ->
- [{recbuf, Sz}]
- end.
-
-ip_opt_sndbuf(Opts) ->
- case get_sndbuf(Opts) of
- use_default ->
- [];
- Sz ->
- [{sndbuf, Sz}]
- end.
+socket_opts(Domain, {IpAddr, IpPort}, Opts) ->
+ [IpPort, % Picked off at socket open, separate argument
+ binary
+ | case snmp_conf:tdomain_to_family(Domain) of
+ inet6 = Family ->
+ [Family, {ipv6_v6only, true}];
+ Family ->
+ [Family]
+ end ++
+ case get_bind_to_ip_address(Opts) of
+ true ->
+ [{ip, IpAddr}];
+ _ ->
+ []
+ end ++
+ case get_no_reuse_address(Opts) of
+ false ->
+ [{reuseaddr, true}];
+ _ ->
+ []
+ end ++
+ case get_recbuf(Opts) of
+ use_default ->
+ [];
+ Sz ->
+ [{recbuf, Sz}]
+ end ++
+ case get_sndbuf(Opts) of
+ use_default ->
+ [];
+ Sz ->
+ [{sndbuf, Sz}]
+ end].
%% ----------------------------------------------------------------
@@ -1203,6 +1538,9 @@ get_bind_to_ip_address(Opts) ->
error_msg(F,A) ->
?snmpa_error("NET-IF server: " ++ F, A).
+info_msg(F,A) ->
+ ?snmpa_info("NET-IF server: " ++ F, A).
+
%% ---
user_err(F, A) ->
@@ -1227,14 +1565,14 @@ call(Pid, Req) ->
%% ----------------------------------------------------------------
-get_info(#state{usock = Id, reqs = Reqs}) ->
+get_info(#state{transports = Transports, reqs = Reqs}) ->
ProcSize = proc_mem(self()),
- PortInfo = get_port_info(Id),
Counters = get_counters(),
- [{reqs, Reqs},
- {counters, Counters},
- {process_memory, ProcSize},
- {port_info, PortInfo}].
+ [{reqs, Reqs},
+ {counters, Counters},
+ {process_memory, ProcSize}
+ | [{port_info, get_port_info(Socket)}
+ || #transport{socket = Socket} <- Transports]].
proc_mem(P) when is_pid(P) ->
case (catch erlang:process_info(P, memory)) of
diff --git a/lib/snmp/src/agent/snmpa_net_if_filter.erl b/lib/snmp/src/agent/snmpa_net_if_filter.erl
index 989f7c95b3..dd77b143d0 100644
--- a/lib/snmp/src/agent/snmpa_net_if_filter.erl
+++ b/lib/snmp/src/agent/snmpa_net_if_filter.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -18,35 +18,49 @@
%%
-module(snmpa_net_if_filter).
--export([accept_recv/2,
- accept_send/2,
- accept_recv_pdu/3,
- accept_send_pdu/2]).
+%% Behaviour
+-export([accept_recv/2, accept_send/2, accept_recv_pdu/3, accept_send_pdu/2]).
-include("snmp_debug.hrl").
-accept_recv(_Addr, _Port) ->
- ?d("accept_recv -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p", [_Addr, _Port]),
+accept_recv(Domain, _Address) when is_atom(Domain) ->
+ ?d("accept_recv -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p", [Domain, _Address]),
+ true;
+accept_recv(_Addr, Port) when is_integer(Port) ->
+ ?d("accept_recv -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p", [_Addr, Port]),
true.
-accept_send(_Addr, _Port) ->
- ?d("accept_send -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p", [_Addr, _Port]),
+accept_send(Domain, _Address) when is_atom(Domain) ->
+ ?d("accept_send -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p", [Domain, _Address]),
+ true;
+accept_send(_Addr, Port) when is_integer(Port) ->
+ ?d("accept_send -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p", [_Addr, Port]),
true.
-accept_recv_pdu(_Addr, _Port, _PduType) ->
- ?d("accept_recv_pdu -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n PduType: ~p", [_Addr, _Port, _PduType]),
+accept_recv_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
+ ?d("accept_recv -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p~n"
+ " PduType: ~p", [Domain, _Address, _PduType]),
+ true;
+accept_recv_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
+ ?d("accept_recv_pdu -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p~n"
+ " PduType: ~p", [_Addr, Port, _PduType]),
true.
accept_send_pdu(_Targets, _PduType) ->
- ?d("accept_send_pdu -> entry with"
- "~n Targets: ~p"
- "~n PduType: ~p", [_Targets, _PduType]),
+ ?d("accept_send_pdu -> entry with~n"
+ " Targets: ~p~n"
+ " PduType: ~p", [_Targets, _PduType]),
true.
diff --git a/lib/snmp/src/agent/snmpa_network_interface_filter.erl b/lib/snmp/src/agent/snmpa_network_interface_filter.erl
index 6fa131beee..90aa54a271 100644
--- a/lib/snmp/src/agent/snmpa_network_interface_filter.erl
+++ b/lib/snmp/src/agent/snmpa_network_interface_filter.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
behaviour_info(callbacks) ->
- [{accept_recv, 2},
+ [{accept_recv, 2},
{accept_send, 2},
{accept_recv_pdu, 3},
{accept_send_pdu, 2}];
@@ -31,20 +31,21 @@ behaviour_info(_) ->
undefined.
-%% accept_recv(address(), port()) -> boolean()
+%% accept_recv({domain(), address()}) -> boolean()
%% Called at the receiption of a message
%% (before *any* processing has been done).
%%
-%% accept_send(address(), port()) -> boolean()
+%% accept_send({domain(), address()}) -> boolean()
%% Called before the sending of a message
%% (after *all* processing has been done).
%%
-%% accept_recv_pdu(Addr, Port, pdu_type()) -> boolean()
+%% accept_recv_pdu({domain(), address()}, pdu_type()) -> boolean()
%% Called after the basic message processing (MPD) has been done,
%% but before the pdu is handed over to the master-agent for
%% primary processing.
%%
-%% accept_send_pdu(Targets, pdu_type()) -> boolean() | NewTargets
+%% accept_send_pdu([{domain(), address()}, ...] = Targets, pdu_type()) ->
+%% boolean() | NewTargets
%% Called before the basic message processing (MPD) is done,
%% when a pdu has been received from the master-agent.
%%
diff --git a/lib/snmp/src/agent/snmpa_trap.erl b/lib/snmp/src/agent/snmpa_trap.erl
index b9a2496341..a79b150f57 100644
--- a/lib/snmp/src/agent/snmpa_trap.erl
+++ b/lib/snmp/src/agent/snmpa_trap.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -270,12 +270,13 @@ localise_type({VariableOid, Value}, Mib) when is_list(VariableOid) ->
localise_type(X, _) -> X.
%%-----------------------------------------------------------------
-%% Func: make_v1_trap_pdu/4
+%% Func: make_v1_trap_pdu/5
%% Args: Enterprise = oid()
%% Specific = integer()
%% Varbinds is as returned from initiate_vars
%% (but only {Oid, Type[, Value} permitted)
%% SysUpTime = integer()
+%% AgentIp = {A, B, C, D}
%% Purpose: Make a #trappdu
%% Checks the Varbinds to see that no symbolic names are
%% present, and that each var has a type. Performs a get
@@ -284,7 +285,7 @@ localise_type(X, _) -> X.
%% Fails: yes
%% NOTE: Executed at the MA
%%-----------------------------------------------------------------
-make_v1_trap_pdu(Enterprise, Specific, VarbindList, SysUpTime) ->
+make_v1_trap_pdu(Enterprise, Specific, VarbindList, SysUpTime, AgentIp) ->
{Enterp,Generic,Spec} =
case Enterprise of
?snmp ->
@@ -292,7 +293,6 @@ make_v1_trap_pdu(Enterprise, Specific, VarbindList, SysUpTime) ->
_ ->
{Enterprise,?enterpriseSpecific,Specific}
end,
- {value, AgentIp} = snmp_framework_mib:intAgentIpAddress(get),
#trappdu{enterprise = Enterp,
agent_addr = AgentIp,
generic_trap = Generic,
@@ -369,6 +369,7 @@ send_trap(TrapRec, NotifyName, ContextName, Recv, Vbs, LocalEngineID,
{tag, T},
{err, E},
{stacktrace, erlang:get_stacktrace()}],
+ ?vlog("snmpa_trap:send_trap exception: ~p", [Info]),
{error, {failed_sending_trap, Info}}
end.
@@ -789,23 +790,19 @@ send_trap_pdus([], ContextName, {TrapRec, Vbs},
send_v1_trap(_TrapRec, [], _Vbs, _ExtraInfo, _NetIf, _SysUpTime) ->
ok;
-send_v1_trap(#trap{enterpriseoid = Enter, specificcode = Spec},
- V1Res, Vbs, ExtraInfo, NetIf, SysUpTime) ->
+send_v1_trap(
+ #trap{enterpriseoid = Enter, specificcode = Spec},
+ V1Res, Vbs, ExtraInfo, NetIf, SysUpTime) ->
?vdebug("prepare to send v1 trap "
"~n '~p'"
"~n with"
"~n ~p"
"~n to"
"~n ~p", [Enter, Spec, V1Res]),
- TrapPdu = make_v1_trap_pdu(Enter, Spec, Vbs, SysUpTime),
- AddrCommunities = mk_addr_communities(V1Res),
- lists:foreach(fun({Community, Addrs}) ->
- ?vtrace("send v1 trap pdu to ~p",[Addrs]),
- NetIf ! {send_pdu, 'version-1', TrapPdu,
- {community, Community}, Addrs, ExtraInfo}
- end, AddrCommunities);
-send_v1_trap(#notification{oid = Oid}, V1Res, Vbs, ExtraInfo, NetIf,
- SysUpTime) ->
+ do_send_v1_trap(Enter, Spec, V1Res, Vbs, ExtraInfo, NetIf, SysUpTime);
+send_v1_trap(
+ #notification{oid = Oid},
+ V1Res, Vbs, ExtraInfo, NetIf, SysUpTime) ->
%% Use alg. in rfc2089 to map a v2 trap to a v1 trap
% delete Counter64 objects from vbs
?vdebug("prepare to send v1 trap '~p'",[Oid]),
@@ -822,14 +819,38 @@ send_v1_trap(#notification{oid = Oid}, V1Res, Vbs, ExtraInfo, NetIf,
{lists:reverse(First),Last}
end
end,
- TrapPdu = make_v1_trap_pdu(Enter, Spec, NVbs, SysUpTime),
+ do_send_v1_trap(Enter, Spec, V1Res, NVbs, ExtraInfo, NetIf, SysUpTime).
+
+do_send_v1_trap(Enter, Spec, V1Res, NVbs, ExtraInfo, NetIf, SysUpTime) ->
+ {value, Transports} = snmp_framework_mib:intAgentTransports(get),
+ {_Domain, {AgentIp, _AgentPort}} =
+ case lists:keyfind(snmpUDPDomain, 1, Transports) of
+ false ->
+ case lists:keyfind(transportDomainUdpIpv4, 1, Transports) of
+ false ->
+ ?vtrace(
+ "snmpa_trap: can not send v1 trap "
+ "without IPv4 domain: ~p",
+ [Transports]),
+ user_err(
+ "snmpa_trap: can not send v1 trap "
+ "without IPv4 domain: ~p",
+ [Transports]);
+ DomainAddr ->
+ DomainAddr
+ end;
+ DomainAddr ->
+ DomainAddr
+ end,
+ TrapPdu = make_v1_trap_pdu(Enter, Spec, NVbs, SysUpTime, AgentIp),
AddrCommunities = mk_addr_communities(V1Res),
- lists:foreach(fun({Community, Addrs}) ->
- ?vtrace("send v1 trap to ~p",[Addrs]),
- NetIf ! {send_pdu, 'version-1', TrapPdu,
- {community, Community}, Addrs, ExtraInfo}
- end, AddrCommunities).
-
+ lists:foreach(
+ fun ({Community, Addrs}) ->
+ ?vtrace("send v1 trap to ~p",[Addrs]),
+ NetIf ! {send_pdu, 'version-1', TrapPdu,
+ {community, Community}, Addrs, ExtraInfo}
+ end, AddrCommunities).
+
send_v2_trap(_TrapRec, [], _Vbs, _Recv, _ExtraInfo, _NetIf, _SysUpTime) ->
ok;
send_v2_trap(TrapRec, V2Res, Vbs, Recv, ExtraInfo, NetIf, SysUpTime) ->
@@ -1045,7 +1066,7 @@ deliver_recv(#snmpa_notification_delivery_info{tag = Tag,
"~n DeliveryResult: ~p"
"~n TAddr: ~p"
"", [Tag, Mod, Extra, DeliveryResult, TAddr]),
- Addr = transform_taddr(TAddr),
+ [Addr] = transform_taddrs([TAddr]),
(catch Mod:delivery_info(Tag, Addr, DeliveryResult, Extra));
deliver_recv({Tag, Receiver}, MsgId, Result) ->
?vtrace("deliver_recv -> entry with"
@@ -1072,35 +1093,90 @@ deliver_recv(Else, _MsgId, _Result) ->
[Else]),
user_err("snmpa: bad receiver, ~w\n", [Else]).
-transform_taddrs(Addrs) ->
- [transform_taddr(Addr) || Addr <- Addrs].
+transform_taddrs(TAddrs) ->
+ UseTDomain =
+ case snmp_framework_mib:intAgentTransportDomain(get) of
+ {value,snmpUDPDomain} ->
+ false;
+ {value,_} ->
+ true;
+ genErr ->
+ false
+ end,
+ DomAddrs = [transform_taddr(TAddr) || TAddr <- TAddrs],
+ case UseTDomain of
+ true ->
+ DomAddrs;
+ false ->
+ [Addr || {_Domain, Addr} <- DomAddrs]
+ end.
-transform_taddr({?snmpUDPDomain, [A1, A2, A3, A4, P1, P2]}) -> % v2
- Addr = {A1, A2, A3, A4},
- Port = P1 bsl 8 + P2,
- {Addr, Port};
-transform_taddr({?transportDomainUdpIpv4, [A1, A2, A3, A4, P1, P2]}) -> % v2
- Addr = {A1, A2, A3, A4},
+%% v2
+transform_taddr({?snmpUDPDomain, Addr}) ->
+ transform_taddr(transportDomainIdpIpv4, Addr);
+transform_taddr({?transportDomainUdpIpv4, Addr}) ->
+ transform_taddr(transportDomainUdpIpv4, Addr);
+transform_taddr({?transportDomainUdpIpv6, Addr}) ->
+ transform_taddr(transportDomainUdpIpv6, Addr);
+%% v3
+transform_taddr({{?snmpUDPDomain, Addr}, _MsgData}) ->
+ transform_taddr(transportDomainUdpIpv4, Addr);
+transform_taddr({{?transportDomainUdpIpv4, Addr}, _MsgData}) ->
+ transform_taddr(transportDomainUdpIpv4, Addr);
+transform_taddr({{?transportDomainUdpIpv6, Addr}, _MsgData}) ->
+ transform_taddr(transportDomainUdpIpv6, Addr).
+
+transform_taddr(
+ transportDomainUdpIpv4 = Domain,
+ [A1,A2,A3,A4,P1,P2]) ->
+ Ip = {A1, A2, A3, A4},
Port = P1 bsl 8 + P2,
- {Addr, Port};
-transform_taddr({?transportDomainUdpIpv6,
- [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]}) -> % v2
- Addr = {A1, A2, A3, A4, A5, A6, A7, A8},
+ {Domain, {Ip, Port}};
+transform_taddr(
+ transportDomainUdpIpv6 = Domain,
+ [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]) ->
+ Ip = {A1, A2, A3, A4, A5, A6, A7, A8},
Port = P1 bsl 8 + P2,
- {Addr, Port};
-transform_taddr({{?snmpUDPDomain, [A1, A2, A3, A4, P1, P2]}, _MsgData}) -> % v3
- Addr = {A1, A2, A3, A4},
+ {Domain, {Ip, Port}};
+transform_taddr(
+ transportDomainUdpIpv6 = Domain,
+ [A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16,
+ P1, P2]) ->
+ Ip =
+ {(A1 bsl 8) bor A2, (A3 bsl 8) bor A4,
+ (A5 bsl 8) bor A6, (A7 bsl 8) bor A8,
+ (A9 bsl 8) bor A10, (A11 bsl 8) bor A12,
+ (A13 bsl 8) bor A14, (A15 bsl 8) bor A16},
Port = P1 bsl 8 + P2,
- {Addr, Port};
-transform_taddr({{?transportDomainUdpIpv4, [A1, A2, A3, A4, P1, P2]}, _MsgData}) -> % v3
- Addr = {A1, A2, A3, A4},
- Port = P1 bsl 8 + P2,
- {Addr, Port};
-transform_taddr({{?transportDomainUdpIpv6,
- [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]}, _MsgData}) -> % v3
- Addr = {A1, A2, A3, A4, A5, A6, A7, A8},
- Port = P1 bsl 8 + P2,
- {Addr, Port}.
+ {Domain, {Ip, Port}}.
+
+%% transform_taddr({?snmpUDPDomain, [A1, A2, A3, A4, P1, P2]}) -> % v2
+%% Addr = {A1, A2, A3, A4},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port};
+%% transform_taddr({?transportDomainUdpIpv4, [A1, A2, A3, A4, P1, P2]}) -> % v2
+%% Addr = {A1, A2, A3, A4},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port};
+%% transform_taddr({?transportDomainUdpIpv6,
+%% [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]}) -> % v2
+%% Addr = {A1, A2, A3, A4, A5, A6, A7, A8},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port};
+%% transform_taddr({{?snmpUDPDomain, [A1, A2, A3, A4, P1, P2]}, _MsgData}) -> % v3
+%% Addr = {A1, A2, A3, A4},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port};
+%% transform_taddr({{?transportDomainUdpIpv4, [A1, A2, A3, A4, P1, P2]}, _MsgData}) -> % v3
+%% Addr = {A1, A2, A3, A4},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port};
+%% transform_taddr({{?transportDomainUdpIpv6,
+%% [A1, A2, A3, A4, A5, A6, A7, A8, P1, P2]}, _MsgData}) -> % v3
+%% Addr = {A1, A2, A3, A4, A5, A6, A7, A8},
+%% Port = P1 bsl 8 + P2,
+%% {Addr, Port}.
+
check_all_varbinds(#notification{oid = Oid}, Vbs, MibView) ->
diff --git a/lib/snmp/src/app/snmp.app.src b/lib/snmp/src/app/snmp.app.src
index 904d17954b..cbd292e4c3 100644
--- a/lib/snmp/src/app/snmp.app.src
+++ b/lib/snmp/src/app/snmp.app.src
@@ -136,4 +136,6 @@
%% configuration and use), and in that case mnesia must also be started,
%% before snmp.
{applications, [kernel, stdlib]},
- {mod, {snmp_app, []}}]}.
+ {mod, {snmp_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","mnesia-4.12",
+ "kernel-3.0","erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index fa4b72ab68..081163b368 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,11 +28,17 @@
%% {update, snmpa_local_db, soft, soft_purge, soft_purge, []}
%% {add_module, snmpm_net_if_mt}
[
+ {"5.1.1", [{restart_application, snmp}]},
+ {"5.1", [ % Only compiler changes
+ ]},
+ {"5.0", [{restart_application, snmp}]},
+ {"4.25.1", [{restart_application, snmp}]},
+ {"4.25.0.1", [{restart_application, snmp}]},
+ {"4.25.0.0.1", [{restart_application, snmp}]},
+ {"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
- {"4.24", [{restart_application, snmp}]},
- {"4.23.1", [{restart_application, snmp}]},
- {"4.23", [{restart_application, snmp}]}
+ {"4.24", [{restart_application, snmp}]}
],
%% ------D o w n g r a d e ---------------------------------------------------
@@ -41,11 +47,17 @@
%% {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
[
+ {"5.1.1", [{restart_application, snmp}]},
+ {"5.1", [ % Only compiler changes
+ ]},
+ {"5.0", [{restart_application, snmp}]},
+ {"4.25.1", [{restart_application, snmp}]},
+ {"4.25.0.1", [{restart_application, snmp}]},
+ {"4.25.0.0.1", [{restart_application, snmp}]},
+ {"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
- {"4.24", [{restart_application, snmp}]},
- {"4.23.1", [{restart_application, snmp}]},
- {"4.23", [{restart_application, snmp}]}
+ {"4.24", [{restart_application, snmp}]}
]
}.
diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl
index 5a661cf194..0f6393eeef 100644
--- a/lib/snmp/src/compile/snmpc_lib.erl
+++ b/lib/snmp/src/compile/snmpc_lib.erl
@@ -139,6 +139,7 @@ allow_size_rfc1902('Integer32') -> true;
allow_size_rfc1902('Unsigned32') -> true;
allow_size_rfc1902('OCTET STRING') -> true;
allow_size_rfc1902('Gauge32') -> true;
+allow_size_rfc1902('Opaque') -> true;
allow_size_rfc1902(_) -> false.
guess_integer_type() ->
diff --git a/lib/snmp/src/manager/depend.mk b/lib/snmp/src/manager/depend.mk
index 2e7783c8ed..60f61b0d3b 100644
--- a/lib/snmp/src/manager/depend.mk
+++ b/lib/snmp/src/manager/depend.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2004-2012. All Rights Reserved.
+# Copyright Ericsson AB 2004-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -50,10 +50,11 @@ $(EBIN)/snmpm_net_if.$(EMULATOR): \
snmpm_network_interface.erl
$(EBIN)/snmpm_net_if_mt.$(EMULATOR): \
+ snmpm_net_if_mt.erl \
../../include/snmp_types.hrl \
../misc/snmp_debug.hrl \
../misc/snmp_verbosity.hrl \
- snmpm_net_if_mt.erl \
+ snmpm_net_if.erl \
snmpm_network_interface.erl
$(EBIN)/snmpm_server.$(EMULATOR): \
diff --git a/lib/snmp/src/manager/snmpm.erl b/lib/snmp/src/manager/snmpm.erl
index c97b635fc6..8976322c4e 100644
--- a/lib/snmp/src/manager/snmpm.erl
+++ b/lib/snmp/src/manager/snmpm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -379,21 +379,33 @@ register_agent(UserId, Addr) ->
register_agent(UserId, Addr, ?DEFAULT_AGENT_PORT, []).
%% Backward compatibility
-register_agent(UserId, Addr, Port, Config0) ->
+register_agent(UserId, Domain, Addr, Config0) when is_atom(Domain) ->
case lists:keymember(target_name, 1, Config0) of
false ->
- TargetName = mk_target_name(Addr, Port, Config0),
- Config = [{reg_type, addr_port},
- {address, Addr}, {port, Port} | Config0],
+ TargetName = mk_target_name(Domain, Addr, Config0),
+ Config =
+ [{reg_type, addr_port},
+ {tdomain, Domain}, {taddress, Addr} | Config0],
do_register_agent(UserId, TargetName, ensure_engine_id(Config));
true ->
{value, {_, TargetName}} =
lists:keysearch(target_name, 1, Config0),
Config1 = lists:keydelete(target_name, 1, Config0),
- Config2 = [{reg_type, addr_port},
- {address, Addr}, {port, Port} | Config1],
+ Config2 =
+ [{reg_type, addr_port},
+ {tdomain, Domain}, {taddress, Addr} | Config1],
register_agent(UserId, TargetName, ensure_engine_id(Config2))
- end.
+ end;
+register_agent(UserId, Ip, Port, Config) when is_integer(Port) ->
+ Domain = snmpm_config:default_transport_domain(),
+ Addr =
+ case snmp_conf:check_address(Domain, {Ip, Port}) of
+ ok ->
+ {Ip, Port};
+ {ok, FixedAddr} ->
+ FixedAddr
+ end,
+ register_agent(UserId, Domain, Addr, Config).
unregister_agent(UserId, TargetName) when is_list(TargetName) ->
snmpm_config:unregister_agent(UserId, TargetName);
@@ -402,8 +414,8 @@ unregister_agent(UserId, TargetName) when is_list(TargetName) ->
unregister_agent(UserId, Addr) ->
unregister_agent(UserId, Addr, ?DEFAULT_AGENT_PORT).
-unregister_agent(UserId, Addr, Port) ->
- case target_name(Addr, Port) of
+unregister_agent(UserId, DomainIp, AddressPort) ->
+ case target_name(DomainIp, AddressPort) of
{ok, TargetName} ->
unregister_agent(UserId, TargetName);
Error ->
@@ -1264,14 +1276,17 @@ format_vb_value(Prefix, _Type, Val) ->
%% --- Internal utility functions ---
%%
-target_name(Addr) ->
- target_name(Addr, ?DEFAULT_AGENT_PORT).
+target_name(Ip) ->
+ target_name(Ip, ?DEFAULT_AGENT_PORT).
-target_name(Addr, Port) ->
- snmpm_config:agent_info(Addr, Port, target_name).
+target_name(DomainIp, AddressPort) ->
+ snmpm_config:agent_info(DomainIp, AddressPort, target_name).
mk_target_name(Addr, Port, Config) ->
- snmpm_config:mk_target_name(Addr, Port, Config).
+ R = snmpm_config:mk_target_name(Addr, Port, Config),
+ p(?MODULE_STRING":mk_target_name(~p, ~p, ~p) -> ~p.~n",
+ [Addr, Port, Config, R]),
+ R.
ensure_engine_id(Config) ->
case lists:keymember(engine_id, 1, Config) of
@@ -1287,5 +1302,5 @@ ensure_engine_id(Config) ->
%% p(F) ->
%% p(F, []).
-%% p(F, A) ->
-%% io:format("~w:" ++ F ++ "~n", [?MODULE | A]).
+p(F, A) ->
+ io:format("~w:" ++ F ++ "~n", [?MODULE | A]).
diff --git a/lib/snmp/src/manager/snmpm_conf.erl b/lib/snmp/src/manager/snmpm_conf.erl
index 03dbd028f7..087ef6c6ea 100644
--- a/lib/snmp/src/manager/snmpm_conf.erl
+++ b/lib/snmp/src/manager/snmpm_conf.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -79,43 +78,26 @@ write_manager_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_manager_config(Dir, Hdr, Conf).
-write_manager_config(Dir, Hdr, Conf)
- when is_list(Dir) andalso is_list(Hdr) andalso is_list(Conf) ->
- Verify = fun() -> verify_manager_conf(Conf) end,
- Write = fun(Fid) -> write_manager_conf(Fid, Hdr, Conf) end,
- write_config_file(Dir, ?MANAGER_CONF_FILE, Verify, Write).
-
+write_manager_config(Dir, Hdr, Conf)
+ when is_list(Dir), is_list(Hdr), is_list(Conf) ->
+ Order = fun snmpm_config:order_manager_config/2,
+ Check = fun snmpm_config:check_manager_config/2,
+ Write = fun (Fd, Entries) -> write_manager_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, ?MANAGER_CONF_FILE, Order, Check, Write, Conf).
append_manager_config(Dir, Conf)
- when is_list(Dir) andalso is_list(Conf) ->
- Verify = fun() -> verify_manager_conf(Conf) end,
- Write = fun(Fid) -> write_manager_conf(Fid, Conf) end,
- append_config_file(Dir, ?MANAGER_CONF_FILE, Verify, Write).
-
+ when is_list(Dir), is_list(Conf) ->
+ Order = fun snmpm_config:order_manager_config/2,
+ Check = fun snmpm_config:check_manager_config/2,
+ Write = fun write_manager_conf/2,
+ append_config_file(Dir, ?MANAGER_CONF_FILE, Order, Check, Write, Conf).
-read_manager_config(Dir) ->
- Verify = fun(Entry) -> verify_manager_conf_entry(Entry) end,
- read_config_file(Dir, ?MANAGER_CONF_FILE, Verify).
+read_manager_config(Dir) when is_list(Dir) ->
+ Order = fun snmpm_config:order_manager_config/2,
+ Check = fun snmpm_config:check_manager_config/2,
+ read_config_file(Dir, ?MANAGER_CONF_FILE, Order, Check).
-verify_manager_conf([]) ->
- ok;
-verify_manager_conf([H|T]) ->
- verify_manager_conf_entry(H),
- verify_manager_conf(T);
-verify_manager_conf(X) ->
- error({bad_manager_config, X}).
-
-verify_manager_conf_entry(Entry) ->
- case snmpm_config:check_manager_config(Entry) of
- ok ->
- ok;
-%% {ok, _} ->
-%% ok;
- Error ->
- throw(Error)
- end.
-
write_manager_conf(Fd, "", Conf) ->
write_manager_conf(Fd, Conf);
write_manager_conf(Fd, Hdr, Conf) ->
@@ -128,14 +110,16 @@ write_manager_conf(Fd, [H|T]) ->
do_write_manager_conf(Fd, H),
write_manager_conf(Fd, T).
-do_write_manager_conf(Fd, {address = Tag, Val}) ->
- io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
-do_write_manager_conf(Fd, {port = Tag, Val} ) ->
+do_write_manager_conf(Fd, {Tag, Val})
+ when Tag =:= domain;
+ Tag =:= address;
+ Tag =:= port;
+ Tag =:= transports;
+ Tag =:= max_message_size ->
io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
-do_write_manager_conf(Fd, {engine_id = Tag, Val} ) ->
+do_write_manager_conf(Fd, {Tag, Val})
+ when Tag =:= engine_id ->
io:format(Fd, "{~w, \"~s\"}.~n", [Tag, Val]);
-do_write_manager_conf(Fd, {max_message_size = Tag, Val} ) ->
- io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
do_write_manager_conf(_Fd, Crap) ->
error({bad_manager_config, Crap}).
@@ -168,36 +152,29 @@ write_users_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_users_config(Dir, Hdr, Conf).
-write_users_config(Dir, Hdr, Conf)
+write_users_config(Dir, Hdr, Conf)
when is_list(Dir) andalso is_list(Hdr) andalso is_list(Conf) ->
- Verify = fun() -> verify_users_conf(Conf) end,
- Write = fun(Fd) -> write_users_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, ?USERS_CONF_FILE, Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_user_config/2,
+ Write = fun (Fd, Entries) -> write_users_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, ?USERS_CONF_FILE, Order, Check, Write, Conf).
-append_users_config(Dir, Conf)
+append_users_config(Dir, Conf)
when is_list(Dir) andalso is_list(Conf) ->
- Verify = fun() -> verify_users_conf(Conf) end,
- Write = fun(Fd) -> write_users_conf(Fd, Conf) end,
- append_config_file(Dir, ?USERS_CONF_FILE, Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_user_config/2,
+ Write = fun write_users_conf/2,
+ append_config_file(Dir, ?USERS_CONF_FILE, Order, Check, Write, Conf).
read_users_config(Dir) when is_list(Dir) ->
- Verify = fun(Entry) -> verify_users_conf_entry(Entry) end,
- read_config_file(Dir, ?USERS_CONF_FILE, Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_user_config/2,
+ read_config_file(Dir, ?USERS_CONF_FILE, Order, Check).
-
-verify_users_conf([]) ->
- ok;
-verify_users_conf([H|T]) ->
- verify_users_conf_entry(H),
- verify_users_conf(T);
-verify_users_conf(X) ->
- error({bad_users_conf, X}).
-
-verify_users_conf_entry(Entry) ->
- {ok, _} = snmpm_config:check_user_config(Entry),
- ok.
+
+check_user_config(Entry, State) ->
+ {check_ok(snmpm_config:check_user_config(Entry)),
+ State}.
write_users_conf(Fd, "", Conf) ->
write_users_conf(Fd, Conf);
@@ -223,9 +200,10 @@ do_write_users_conf(_Fd, Crap) ->
%% ------ agents.conf ------
%%
-agents_entry(UserId, TargetName, Comm, Ip, Port, EngineID, Timeout,
- MaxMessageSize, Version, SecModel, SecName, SecLevel) ->
- {UserId, TargetName, Comm, Ip, Port, EngineID, Timeout,
+agents_entry(
+ UserId, TargetName, Comm, Domain_or_Ip, Addr_or_Port, EngineID, Timeout,
+ MaxMessageSize, Version, SecModel, SecName, SecLevel) ->
+ {UserId, TargetName, Comm, Domain_or_Ip, Addr_or_Port, EngineID, Timeout,
MaxMessageSize, Version, SecModel, SecName, SecLevel}.
@@ -240,36 +218,29 @@ write_agents_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_agents_config(Dir, Hdr, Conf).
-write_agents_config(Dir, Hdr, Conf)
+write_agents_config(Dir, Hdr, Conf)
when is_list(Dir) andalso is_list(Hdr) andalso is_list(Conf) ->
- Verify = fun() -> verify_agents_conf(Conf) end,
- Write = fun(Fd) -> write_agents_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, ?AGENTS_CONF_FILE, Verify, Write).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_agent_config/2,
+ Write = fun (Fd, Entries) -> write_agents_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, ?AGENTS_CONF_FILE, Order, Check, Write, Conf).
-
-append_agents_config(Dir, Conf)
+append_agents_config(Dir, Conf)
when is_list(Dir) andalso is_list(Conf) ->
- Verify = fun() -> verify_agents_conf(Conf) end,
- Write = fun(Fd) -> write_agents_conf(Fd, Conf) end,
- append_config_file(Dir, ?AGENTS_CONF_FILE, Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_agent_config/2,
+ Write = fun write_agents_conf/2,
+ append_config_file(Dir, ?AGENTS_CONF_FILE, Order, Check, Write, Conf).
read_agents_config(Dir) ->
- Verify = fun(Entry) -> verify_agents_conf_entry(Entry) end,
- read_config_file(Dir, ?AGENTS_CONF_FILE, Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_agent_config/2,
+ read_config_file(Dir, ?AGENTS_CONF_FILE, Order, Check).
-verify_agents_conf([]) ->
- ok;
-verify_agents_conf([H|T]) ->
- verify_agents_conf_entry(H),
- verify_agents_conf(T);
-verify_agents_conf(X) ->
- error({bad_agents_config, X}).
-
-verify_agents_conf_entry(Entry) ->
- {ok, _} = snmpm_config:check_agent_config(Entry),
- ok.
+check_agent_config(Entry, State) ->
+ {check_ok(snmpm_config:check_agent_config(Entry)),
+ State}.
write_agents_conf(Fd, "", Conf) ->
write_agents_conf(Fd, Conf);
@@ -283,13 +254,15 @@ write_agents_conf(Fd, [H|T]) ->
do_write_agents_conf(Fd, H),
write_agents_conf(Fd, T).
-do_write_agents_conf(Fd,
- {UserId,
- TargetName, Comm, Ip, Port, EngineID,
- Timeout, MaxMessageSize, Version,
- SecModel, SecName, SecLevel} = _A) ->
- io:format(Fd,
- "{~w, \"~s\", \"~s\", ~w, ~w, \"~s\", ~w, ~w, ~w, ~w, \"~s\", ~w}.~n", [UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel]);
+do_write_agents_conf(
+ Fd,
+ {UserId, TargetName, Comm, Ip, Port, EngineID,
+ Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel} = _A) ->
+ io:format(
+ Fd,
+ "{~w, \"~s\", \"~s\", ~w, ~w, \"~s\", ~w, ~w, ~w, ~w, \"~s\", ~w}.~n",
+ [UserId, TargetName, Comm, Ip, Port, EngineID,
+ Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel]);
do_write_agents_conf(_Fd, Crap) ->
error({bad_agents_config, Crap}).
@@ -315,37 +288,30 @@ write_usm_config(Dir, Conf) ->
Hdr = header() ++ Comment,
write_usm_config(Dir, Hdr, Conf).
-write_usm_config(Dir, Hdr, Conf)
+write_usm_config(Dir, Hdr, Conf)
when is_list(Dir) andalso is_list(Hdr) andalso is_list(Conf) ->
- Verify = fun() -> verify_usm_conf(Conf) end,
- Write = fun(Fd) -> write_usm_conf(Fd, Hdr, Conf) end,
- write_config_file(Dir, ?USM_USERS_CONF_FILE, Verify, Write).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm_user_config/2,
+ Write = fun (Fd, Entries) -> write_usm_conf(Fd, Hdr, Entries) end,
+ write_config_file(Dir, ?USM_USERS_CONF_FILE, Order, Check, Write, Conf).
-
-append_usm_config(Dir, Conf)
+append_usm_config(Dir, Conf)
when is_list(Dir) andalso is_list(Conf) ->
- Verify = fun() -> verify_usm_conf(Conf) end,
- Write = fun(Fd) -> write_usm_conf(Fd, Conf) end,
- append_config_file(Dir, ?USM_USERS_CONF_FILE, Verify, Write).
-
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm_user_config/2,
+ Write = fun write_usm_conf/2,
+ append_config_file(Dir, ?USM_USERS_CONF_FILE, Order, Check, Write, Conf).
read_usm_config(Dir)
when is_list(Dir) ->
- Verify = fun(Entry) -> verify_usm_conf_entry(Entry) end,
- read_config_file(Dir, ?USM_USERS_CONF_FILE, Verify).
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_usm_user_config/2,
+ read_config_file(Dir, ?USM_USERS_CONF_FILE, Order, Check).
-verify_usm_conf([]) ->
- ok;
-verify_usm_conf([H|T]) ->
- verify_usm_conf_entry(H),
- verify_usm_conf(T);
-verify_usm_conf(X) ->
- error({bad_usm_conf, X}).
-
-verify_usm_conf_entry(Entry) ->
- {ok, _} = snmpm_config:check_usm_user_config(Entry),
- ok.
+check_usm_user_config(Entry, State) ->
+ {check_ok(snmpm_config:check_usm_user_config(Entry)),
+ State}.
write_usm_conf(Fd, "", Conf) ->
write_usm_conf(Fd, Conf);
@@ -359,41 +325,49 @@ write_usm_conf(Fd, [H|T]) ->
do_write_usm_conf(Fd, H),
write_usm_conf(Fd, T).
-do_write_usm_conf(Fd,
- {EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}) ->
- io:format(Fd, "{\"~s\", \"~s\", ~w, ~w, ~w, ~w}.~n",
- [EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey]);
-do_write_usm_conf(Fd,
- {EngineID, UserName, SecName,
- AuthP, AuthKey, PrivP, PrivKey}) ->
- io:format(Fd, "{\"~s\", \"~s\", \"~s\", í~w, ~w, ~w, ~w}.~n",
- [EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey]);
+do_write_usm_conf(
+ Fd,
+ {EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}) ->
+ io:format(
+ Fd, "{\"~s\", \"~s\", ~w, ~w, ~w, ~w}.~n",
+ [EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey]);
+do_write_usm_conf(
+ Fd,
+ {EngineID, UserName, SecName,
+ AuthP, AuthKey, PrivP, PrivKey}) ->
+ io:format(
+ Fd, "{\"~s\", \"~s\", \"~s\", í~w, ~w, ~w, ~w}.~n",
+ [EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey]);
do_write_usm_conf(_Fd, Crap) ->
error({bad_usm_conf, Crap}).
%% ---- config file wrapper functions ----
-write_config_file(Dir, File, Verify, Write) ->
- snmp_config:write_config_file(Dir, File, Verify, Write).
-
-append_config_file(Dir, File, Verify, Write) ->
- snmp_config:append_config_file(Dir, File, Verify, Write).
+write_config_file(Dir, File, Order, Check, Write, Conf) ->
+ snmp_config:write_config_file(Dir, File, Order, Check, Write, Conf).
-read_config_file(Dir, File, Verify) ->
- snmp_config:read_config_file(Dir, File, Verify).
+append_config_file(Dir, File, Order, Check, Write, Conf) ->
+ snmp_config:append_config_file(Dir, File, Order, Check, Write, Conf).
+read_config_file(Dir, File, Order, Check) ->
+ snmp_config:read_config_file(Dir, File, Order, Check).
%% ---- config file utility functions ----
+check_ok(ok) ->
+ ok;
+check_ok({ok, _}) ->
+ ok.
+
header() ->
{Y,Mo,D} = date(),
{H,Mi,S} = time(),
- io_lib:format("%% This file was generated by "
- "~w (version-~s) ~w-~2.2.0w-~2.2.0w "
- "~2.2.0w:~2.2.0w:~2.2.0w\n",
- [?MODULE, ?version, Y, Mo, D, H, Mi, S]).
-
+ io_lib:format(
+ "%% This file was generated by "
+ "~w (version-~s) ~w-~2.2.0w-~2.2.0w "
+ "~2.2.0w:~2.2.0w:~2.2.0w\n",
+ [?MODULE, ?version, Y, Mo, D, H, Mi, S]).
error(R) ->
throw({error, R}).
diff --git a/lib/snmp/src/manager/snmpm_config.erl b/lib/snmp/src/manager/snmpm_config.erl
index 2101ad46e1..5cab81baf6 100644
--- a/lib/snmp/src/manager/snmpm_config.erl
+++ b/lib/snmp/src/manager/snmpm_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -103,8 +103,10 @@
get_agent_mp_model/2
]).
--export([check_manager_config/1,
- check_user_config/1,
+-export([
+ order_manager_config/2,
+ check_manager_config/2,
+ check_user_config/1,
check_agent_config/1,
check_usm_user_config/1]).
@@ -165,7 +167,7 @@
%%%-------------------------------------------------------------------
default_transport_domain() ->
- transportDomainUdpIpv4.
+ snmpUDPDomain.
start_link(Opts) ->
@@ -190,7 +192,11 @@ register_user(UserId, UserMod, UserData, DefaultAgentConfig)
when (UserId =/= ?DEFAULT_USER) andalso is_list(DefaultAgentConfig) ->
case (catch verify_user_behaviour(UserMod)) of
ok ->
- Config = default_agent_config(DefaultAgentConfig),
+ {ok, SystemDefaultAgentConfig} = agent_info(),
+ Config =
+ ensure_config(SystemDefaultAgentConfig,
+ DefaultAgentConfig),
+%% Config = default_agent_config(DefaultAgentConfig),
call({register_user, UserId, UserMod, UserData, Config});
Error ->
Error
@@ -201,19 +207,19 @@ register_user(UserId, _UserMod, _UserData, DefaultAgentConfig)
register_user(UserId, _, _, _) ->
{error, {bad_user_id, UserId}}.
-default_agent_config(DefaultAgentConfig) ->
- {ok, SystemDefaultAgentConfig} = agent_info(),
- default_agent_config(SystemDefaultAgentConfig, DefaultAgentConfig).
+%% default_agent_config(DefaultAgentConfig) ->
+%% {ok, SystemDefaultAgentConfig} = agent_info(),
+%% default_agent_config(SystemDefaultAgentConfig, DefaultAgentConfig).
-default_agent_config([], DefaultAgentConfig) ->
- DefaultAgentConfig;
-default_agent_config([{Key, _} = Entry|T], DefaultAgentConfig) ->
- case lists:keysearch(Key, 1, DefaultAgentConfig) of
- {value, _} ->
- default_agent_config(T, DefaultAgentConfig);
- false ->
- default_agent_config(T, [Entry|DefaultAgentConfig])
- end.
+%% default_agent_config([], DefaultAgentConfig) ->
+%% DefaultAgentConfig;
+%% default_agent_config([{Key, _} = Entry|T], DefaultAgentConfig) ->
+%% case lists:keymember(Key, 1, DefaultAgentConfig) of
+%% true ->
+%% default_agent_config(T, DefaultAgentConfig);
+%% false ->
+%% default_agent_config(T, [Entry|DefaultAgentConfig])
+%% end.
verify_user_behaviour(UserMod) ->
@@ -280,9 +286,10 @@ do_user_info(_UserId, BadItem) ->
%% A target-name constructed in this way is a string with the following:
%% <IP-address>:<Port>-<Version>
-%% This is intended for backward compatibility and therefor has
+%% This is intended for backward compatibility and therefore has
%% only support for IPv4 addresses and *no* other transport domain.
-mk_target_name(Addr0, Port, Config) when is_list(Config) ->
+mk_target_name(Domain, Addr, Config)
+ when is_atom(Domain), is_list(Config) ->
Version =
case lists:keysearch(version, 1, Config) of
{value, {_, V}} ->
@@ -290,18 +297,35 @@ mk_target_name(Addr0, Port, Config) when is_list(Config) ->
false ->
select_lowest_supported_version()
end,
- case normalize_address(Addr0) of
- {A, B, C, D} ->
- lists:flatten(
- io_lib:format("~w.~w.~w.~w:~w-~w", [A, B, C, D, Port, Version]));
- [A, B, C, D] ->
+ try
+ lists:flatten(
+ io_lib:format(
+ "~s-~w", [snmp_conf:mk_addr_string({Domain, Addr}), Version]))
+ catch
+ _ ->
lists:flatten(
- io_lib:format("~w.~w.~w.~w:~w-~w", [A, B, C, D, Port, Version]));
- _ ->
+ io_lib:format("~p-~w", [Addr, Version]))
+ end;
+mk_target_name(Ip, Port, Config)
+ when is_integer(Port), is_list(Config) ->
+ Domain = default_transport_domain(),
+ try fix_address(Domain, {Ip, Port}) of
+ Address ->
+ mk_target_name(Domain, Address, Config)
+ catch
+ _ ->
+ Version =
+ case lists:keysearch(version, 1, Config) of
+ {value, {_, V}} ->
+ V;
+ false ->
+ select_lowest_supported_version()
+ end,
lists:flatten(
- io_lib:format("~p:~w-~w", [Addr0, Port, Version]))
+ io_lib:format("~p:~w-~w", [Ip, Port, Version]))
end.
-
+
+
select_lowest_supported_version() ->
{ok, Versions} = system_info(versions),
select_lowest_supported_version([v1, v2, v3], Versions).
@@ -335,27 +359,17 @@ register_agent(UserId, TargetName, Config0)
%% is not present
%% 3) Check that there are no invalid or erroneous configs
%% 4) Check that the manager is capable of using the selected version
- case verify_agent_config(Config0) of
- {ok, Config} ->
- call({register_agent, UserId, TargetName, Config});
- Error ->
- Error
- end.
-
-
-verify_agent_config(Conf0) ->
try
- begin
- verify_mandatory(Conf0, [engine_id, address, reg_type]),
- verify_invalid(Conf0, [user_id]),
- Conf = verify_agent_config3(Conf0),
- Vsns = versions(),
- Vsn = which_version(Conf),
- verify_version(Vsn, Vsns),
- {ok, Conf}
- end
+ verify_mandatory(Config0, [engine_id, reg_type]),
+ verify_someof(Config0, [address, taddress]),
+ verify_illegal(Config0, [user_id]),
+ Config = verify_agent_config(Config0),
+ Vsns = versions(),
+ Vsn = which_version(Config),
+ verify_version(Vsn, Vsns),
+ call({register_agent, UserId, TargetName, Config})
catch
- throw:Error ->
+ Error ->
Error
end.
@@ -381,52 +395,43 @@ verify_version(Vsn, Vsns) ->
ok;
false ->
Reason = {version_not_supported_by_manager, Vsn, Vsns},
- throw({error, Reason})
- end.
-
-verify_agent_config3(Conf0) ->
- %% Fix (transport) address and domain
- {TDomain, Conf1} =
- case lists:keysearch(tdomain, 1, Conf0) of
- {value, {tdomain, Dom}} ->
- {Dom, Conf0};
- false ->
- Dom = default_transport_domain(),
- {Dom, [{tdomain, Dom} | Conf0]}
- end,
- Conf2 = case lists:keysearch(address, 1, Conf1) of
- {value, {address, Address}} ->
- lists:keyreplace(address, 1, Conf1,
- {address, {TDomain, Address}});
- false ->
- %% This is a mandatory config option,
- %% a later test will detect this
- Conf1
- end,
- case verify_agent2(Conf2) of
- {ok, Conf} ->
- Conf;
- {error, _} = ERROR ->
- throw(ERROR)
+ error(Reason)
end.
-verify_agent_config2(Conf) ->
- verify_agent2(Conf).
unregister_agent(UserId, TargetName) ->
call({unregister_agent, UserId, TargetName}).
%% This is the old style agent unregistration (using Addr and Port).
-unregister_agent(UserId, Addr0, Port) ->
- Addr = normalize_address(Addr0),
- case do_agent_info(Addr, Port, target_name) of
+unregister_agent(UserId, Domain, Address) when is_atom(Domain) ->
+ try fix_address(Domain, Address) of
+ NAddress ->
+ do_unregister_agent(UserId, Domain, NAddress)
+ catch
+ _ ->
+ {error, not_found}
+ end;
+unregister_agent(UserId, Ip, Port) when is_integer(Port) ->
+ Domain = default_transport_domain(),
+ try fix_address(Domain, {Ip, Port}) of
+ Address ->
+ do_unregister_agent(UserId, Domain, Address)
+ catch
+ _ ->
+ {error, not_found}
+ end.
+
+do_unregister_agent(UserId, Domain, Address) ->
+ case do_agent_info(Domain, Address, target_name) of
{ok, TargetName} ->
unregister_agent(UserId, TargetName);
Error ->
Error
end.
+
+
agent_info() ->
agent_info(?DEFAULT_TARGETNAME, all).
@@ -437,27 +442,76 @@ agent_info(TargetName, all) ->
All ->
{ok, [{Item, Val} || {{_, Item}, Val} <- All]}
end;
+%% Begin backwards compatibility
+agent_info(TargetName, address) ->
+ case agent_info({TargetName, taddress}) of
+ {ok, Val} ->
+ {Addr, _} = Val,
+ {ok, Addr};
+ _ ->
+ %% This should be redundant since 'taddress' should exist
+ agent_info({TargetName, address})
+ end;
+agent_info(TargetName, port) ->
+ case agent_info({TargetName, taddress}) of
+ {ok, Val} ->
+ {_, Port} = Val,
+ {ok, Port};
+ _ ->
+ %% This should be redundant since 'taddress' should exist
+ agent_info({TargetName, port})
+ end;
+%% End backwards compatibility
agent_info(TargetName, Item) ->
- case ets:lookup(snmpm_agent_table, {TargetName, Item}) of
+ agent_info({TargetName, Item}).
+
+agent_info(Key) ->
+ case ets:lookup(snmpm_agent_table, Key) of
[{_, Val}] ->
{ok, Val};
[] ->
{error, not_found}
end.
-
-agent_info(Addr0, Port, Item) ->
- Addr = normalize_address(Addr0),
- do_agent_info(Addr, Port, Item).
-do_agent_info(Addr, Port, target_name = Item) ->
- case ets:lookup(snmpm_agent_table, {Addr, Port, Item}) of
+agent_info(Domain, Address, Item) when is_atom(Domain) ->
+ try fix_address(Domain, Address) of
+ NAddress ->
+ do_agent_info(Domain, NAddress, Item)
+ catch
+ _Thrown ->
+ %% p(?MODULE_STRING":agent_info(~p, ~p, ~p) throwed ~p at.~n"
+ %% " ~p",
+ %% [Domain, Address, Item, _Thrown, erlang:get_stacktrace()]),
+ {error, not_found}
+ end;
+agent_info(Ip, Port, Item) when is_integer(Port) ->
+ %% p(?MODULE_STRING":agent_info(~p, ~p, ~p) entry~n",
+ %% [Ip, Port, Item]),
+ Domain = default_transport_domain(),
+ try fix_address(Domain, {Ip, Port}) of
+ Address ->
+ do_agent_info(Domain, Address, Item)
+ catch
+ _Thrown ->
+ %% p(?MODULE_STRING":agent_info(~p, ~p, ~p) throwed ~p at.~n"
+ %% " ~p",
+ %% [Ip, Port, Item, _Thrown, erlang:get_stacktrace()]),
+ {error, not_found}
+ end.
+
+do_agent_info(Domain, Address, target_name = Item) ->
+ %% p(?MODULE_STRING":do_agent_info(~p, ~p, ~p) entry~n",
+ %% [Domain, Address, Item]),
+ case ets:lookup(snmpm_agent_table, {Domain, Address, Item}) of
[{_, Val}] ->
{ok, Val};
[] ->
{error, not_found}
end;
-do_agent_info(Addr, Port, Item) ->
- case do_agent_info(Addr, Port, target_name) of
+do_agent_info(Domain, Address, Item) ->
+ %% p(?MODULE_STRING":do_agent_info(~p, ~p, ~p) entry~n",
+ %% [Domain, Address, Item]),
+ case do_agent_info(Domain, Address, target_name) of
{ok, TargetName} ->
agent_info(TargetName, Item);
Error ->
@@ -465,6 +519,19 @@ do_agent_info(Addr, Port, Item) ->
end.
+ensure_agent_info(_, [], Info) ->
+ Info;
+ensure_agent_info(TargetName, [Item|Items], Info) ->
+ case lists:keymember(Item, 1, Info) of
+ true ->
+ ensure_agent_info(TargetName, Items, Info);
+ false ->
+ {ok, Value} = agent_info(TargetName, Item),
+ ensure_agent_info(TargetName, Items, [{Item, Value}|Info])
+ end.
+
+
+
which_agents() ->
which_agents('_').
@@ -474,38 +541,6 @@ which_agents(UserId) ->
[TargetName || [TargetName] <- Agents].
-verify_agent_info(TargetName, Info0) ->
- try
- begin
- verify_invalid(Info0, [user_id]),
- %% Check if address is part of the list and
- %% if so update it with the domain info.
- Info =
- case lists:keysearch(address, 1, Info0) of
- {value, {address, Addr}} ->
- %% If domain is part of the info, then use it.
- %% If not, lookup what is already stored for
- %% this agent and use that.
- Domain =
- case lists:keysearch(tdomain, 1, Info0) of
- {value, {tdomain, Dom}} ->
- Dom;
- false ->
- {ok, Dom} =
- agent_info(TargetName, tdomain),
- Dom
- end,
- Addr2 = {Domain, Addr},
- lists:keyreplace(address, 1, Info0, {address, Addr2});
- false ->
- Info0
- end,
- verify_agent2(Info)
- end
- catch
- throw:Error ->
- Error
- end.
update_agent_info(UserId, TargetName, Info) ->
call({update_agent_info, UserId, TargetName, Info}).
@@ -740,7 +775,7 @@ verify_usm_user_config(EngineID, Name, Config) ->
try
begin
verify_mandatory(Config, []),
- verify_invalid(Config, [engine_id, name]),
+ verify_illegal(Config, [engine_id, name]),
verify_usm_user_config2(EngineID, Name, Config)
end
catch
@@ -1073,7 +1108,11 @@ do_init(Opts) ->
%% -- Prio (optional) --
Prio = get_opt(priority, Opts, normal),
ets:insert(snmpm_config_table, {prio, Prio}),
- process_flag(priority, Prio),
+ try process_flag(priority, Prio)
+ catch
+ error:badarg ->
+ error({invalid_priority,Prio})
+ end,
%% -- Server (optional) --
ServerOpts = get_opt(server, Opts, []),
@@ -1271,36 +1310,6 @@ verify_options(Opts, Mandatory) ->
verify_mandatory_options(Opts, Mandatory),
verify_options(Opts).
-%% mandatory() -> [mand()]
-%% mand() -> atom() | {atom, [atom()]}
-verify_mandatory_options(_Opts, []) ->
- ok;
-verify_mandatory_options(Opts, [Mand|Mands]) ->
- verify_mandatory_option(Opts, Mand),
- verify_mandatory_options(Opts, Mands).
-
-verify_mandatory_option(Opts, {Mand, MandSubOpts}) ->
- ?d("verify_mandatory_option -> entry with"
- "~n Mand: ~p"
- "~n MandSubObjs: ~p", [Mand, MandSubOpts]),
- case lists:keysearch(Mand, 1, Opts) of
- {value, {Mand, SubOpts}} ->
- verify_mandatory_options(SubOpts, MandSubOpts);
- false ->
- ?d("missing mandatory option: ~w [~p]", [Mand, MandSubOpts]),
- error({missing_mandatory, Mand, MandSubOpts})
- end;
-verify_mandatory_option(Opts, Mand) ->
- ?d("verify_mandatory_option -> entry with"
- "~n Mand: ~p", [Mand]),
- case lists:keymember(Mand, 1, Opts) of
- true ->
- ok;
- false ->
- ?d("missing mandatory option: ~w", [Mand]),
- error({missing_mandatory, Mand})
- end.
-
verify_options([]) ->
?d("verify_options -> done", []),
ok;
@@ -1506,7 +1515,9 @@ verify_versions([]) ->
ok;
verify_versions([Vsn|Vsns]) ->
verify_version(Vsn),
- verify_versions(Vsns).
+ verify_versions(Vsns);
+verify_versions(Vsns) ->
+ error({invalid_versions, Vsns}).
verify_version(v1) ->
ok;
@@ -1614,7 +1625,38 @@ verify_verbosity(Verbosity) ->
_ ->
error({invalid_verbosity, Verbosity})
end.
+
+%% mandatory() -> [mand()]
+%% mand() -> atom() | {atom, [atom()]}
+verify_mandatory_options(_Opts, []) ->
+ ok;
+verify_mandatory_options(Opts, [Mand|Mands]) ->
+ verify_mandatory_option(Opts, Mand),
+ verify_mandatory_options(Opts, Mands).
+
+verify_mandatory_option(Opts, {Mand, MandSubOpts}) ->
+ ?d("verify_mandatory_option -> entry with"
+ "~n Mand: ~p"
+ "~n MandSubObjs: ~p", [Mand, MandSubOpts]),
+ case lists:keysearch(Mand, 1, Opts) of
+ {value, {Mand, SubOpts}} ->
+ verify_mandatory_options(SubOpts, MandSubOpts);
+ false ->
+ ?d("missing mandatory option: ~w [~p]", [Mand, MandSubOpts]),
+ error({missing_mandatory, Mand, MandSubOpts})
+ end;
+verify_mandatory_option(Opts, Mand) ->
+ ?d("verify_mandatory_option -> entry with"
+ "~n Mand: ~p", [Mand]),
+ case lists:keymember(Mand, 1, Opts) of
+ true ->
+ ok;
+ false ->
+ ?d("missing mandatory option: ~w", [Mand]),
+ error({missing_mandatory, Mand})
+ end.
+
%% ------------------------------------------------------------------------
init_manager_config([]) ->
@@ -1629,181 +1671,91 @@ init_agent_default() ->
%% The purpose of the default_agent is only to have a place
%% to store system wide default values related to agents.
%%
-
- %% Port
- init_agent_default(port, ?DEFAULT_AGENT_PORT),
-
- %% Timeout
- init_agent_default(timeout, 10000),
-
- %% Max message (packet) size
- init_agent_default(max_message_size, 484),
-
- %% MPModel
- init_agent_default(version, v2),
-
- %% SecModel
- init_agent_default(sec_model, v2c),
-
- %% SecName
- init_agent_default(sec_name, "initial"),
-
- %% SecLevel
- init_agent_default(sec_level, noAuthNoPriv),
-
- %% Community
- init_agent_default(community, "all-rights"),
- ok.
-
-
-init_agent_default(Item, Val) when Item =/= user_id ->
- case do_update_agent_info(default_agent, Item, Val) of
- ok ->
- ok;
- {error, Reason} ->
- error(Reason)
- end.
-
+ AgentDefaultConfig =
+ [{port, ?DEFAULT_AGENT_PORT}, % Port
+ {timeout, 10000}, % Timeout
+ {max_message_size, 484}, % Max message (packet) size
+ {version, v2}, % MPModel
+ {sec_model, v2c}, % SecModel
+ {sec_name, "initial"}, % SecName
+ {sec_level, noAuthNoPriv}, % SecLevel
+ {community, "all-rights"}], % Community
+ do_update_agent_info(default_agent, AgentDefaultConfig).
read_agents_config_file(Dir) ->
- Check = fun(C) -> check_agent_config2(C) end,
- case read_file(Dir, "agents.conf", Check, []) of
- {ok, Conf} ->
- Conf;
- Error ->
+ Order = fun snmp_conf:no_order/2,
+ Check = fun check_agent_config/2,
+ try read_file(Dir, "agents.conf", Order, Check, [])
+ catch
+ throw:Error ->
?vlog("agent config error: ~p", [Error]),
- throw(Error)
+ erlang:raise(throw, Error, erlang:get_stacktrace())
end.
-check_agent_config2(Agent) ->
- case (catch check_agent_config(Agent)) of
- {ok, {UserId, TargetName, Conf, Version}} ->
- {ok, Vsns} = system_info(versions),
- case lists:member(Version, Vsns) of
- true ->
- {ok, {UserId, TargetName, Conf}};
- false ->
- error({version_not_supported_by_manager,
- Version, Vsns})
- end;
- Err ->
- throw(Err)
+check_agent_config(Agent, State) ->
+ {ok, {UserId, TargetName, Conf, Version}} = check_agent_config(Agent),
+ {ok, Vsns} = system_info(versions),
+ case lists:member(Version, Vsns) of
+ true ->
+ {{ok, {UserId, TargetName, Conf}}, State};
+ false ->
+ error({version_not_supported_by_manager, Version, Vsns})
end.
%% For backward compatibility
-check_agent_config({UserId,
- TargetName,
- Community,
- Ip, Port,
- EngineId,
- Timeout, MaxMessageSize,
- Version, SecModel, SecName, SecLevel}) ->
- TDomain = default_transport_domain(),
- check_agent_config({UserId,
- TargetName,
- Community,
- TDomain, Ip, Port,
- EngineId,
- Timeout, MaxMessageSize,
- Version, SecModel, SecName, SecLevel});
-
-check_agent_config({UserId,
- TargetName,
- Community,
- TDomain, Ip, Port,
- EngineId,
- Timeout, MaxMessageSize,
- Version, SecModel, SecName, SecLevel}) ->
- ?vtrace("check_agent_config -> entry with"
- "~n UserId: ~p"
- "~n TargetName: ~p"
- "~n Community: ~p"
- "~n TDomain: ~p"
- "~n Ip: ~p"
- "~n Port: ~p"
- "~n EngineId: ~p"
- "~n Timeout: ~p"
- "~n MaxMessageSize: ~p"
- "~n Version: ~p"
- "~n SecModel: ~p"
- "~n SecName: ~p"
- "~n SecLevel: ~p",
- [UserId, TargetName, Community,
- TDomain, Ip, Port,
- EngineId, Timeout, MaxMessageSize,
- Version, SecModel, SecName, SecLevel]),
- Addr = normalize_address(TDomain, Ip),
- ?vtrace("check_agent_config -> Addr: ~p", [Addr]),
- Agent = {UserId,
- TargetName,
- Community,
- TDomain, Addr, Port,
- EngineId,
- Timeout, MaxMessageSize,
- Version, SecModel, SecName, SecLevel},
- {ok, verify_agent(Agent)};
+check_agent_config(
+ {UserId, TargetName, Community, Domain, Addr,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel}) when is_atom(Domain) ->
+ check_agent_config(
+ UserId, TargetName, Community, Domain, Addr,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel);
+check_agent_config(
+ {UserId, TargetName, Community, Ip, Port,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel}) when is_integer(Port) ->
+ Domain = default_transport_domain(),
+ Addr = {Ip, Port},
+ check_agent_config(
+ UserId, TargetName, Community, Domain, Addr,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel);
+check_agent_config(
+ {_UserId, _TargetName, _Community, Domain, Addr,
+ _EngineId, _Timeout, _MaxMessageSize,
+ _Version, _SecModel, _SecName, _SecLevel}) ->
+ error({bad_address, {Domain, Addr}});
+check_agent_config(
+ {UserId, TargetName, Community, Domain, Ip, Port,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel}) ->
+ Addr = {Ip, Port},
+ check_agent_config(
+ UserId, TargetName, Community, Domain, Addr,
+ EngineId, Timeout, MaxMessageSize,
+ Version, SecModel, SecName, SecLevel);
check_agent_config(Agent) ->
error({bad_agent_config, Agent}).
-
-init_agents_config([]) ->
- ok;
-init_agents_config([Agent|Agents]) ->
- init_agent_config(Agent),
- init_agents_config(Agents).
-
-init_agent_config({_UserId, ?DEFAULT_TARGETNAME = TargetName, _Config}) ->
- throw({error, {invalid_target_name, TargetName}});
-init_agent_config({UserId, TargetName, Config}) ->
- case handle_register_agent(UserId, TargetName, Config) of
- ok ->
- ok;
- Error ->
- throw(Error)
- end.
-
-
-%% For backward compatibility
-verify_agent({UserId,
- TargetName,
- Comm,
- Ip, Port,
- EngineId,
- Timeout, MMS,
- Version, SecModel, SecName, SecLevel}) ->
- TDomain = default_transport_domain(),
- verify_agent({UserId,
- TargetName,
- Comm,
- TDomain, Ip, Port,
- EngineId,
- Timeout, MMS,
- Version, SecModel, SecName, SecLevel});
-
-verify_agent({UserId,
- TargetName,
- Comm,
- TDomain, Ip, Port,
- EngineId,
- Timeout, MMS,
- Version, SecModel, SecName, SecLevel}) ->
- ?vdebug("verify_agent -> entry with"
+check_agent_config(
+ UserId, TargetName, Comm, Domain, Addr,
+ EngineId, Timeout, MMS,
+ Version, SecModel, SecName, SecLevel) ->
+ ?vdebug("check_agent_config -> entry with"
"~n UserId: ~p"
"~n TargetName: ~p", [UserId, TargetName]),
snmp_conf:check_string(TargetName, {gt, 0}),
- snmp_conf:check_integer(Port, {gt, 0}),
%% Note that the order of Conf *is* important.
%% Some properties may depend on others, so that
%% in order to verify one property, another must
%% be already verified (and present). An example
- %% of this is the property 'address', for which
+ %% of this is the property 'taddress', for which
%% the property tdomain is needed.
- Conf0 =
+ Conf =
[{reg_type, target_name},
- {tdomain, TDomain},
- %% This should be taddress, but what the*...
- {address, {TDomain, Ip}},
- {port, Port},
+ {tdomain, Domain},
+ {taddress, fix_address(Domain, Addr)},
{community, Comm},
{engine_id, EngineId},
{timeout, Timeout},
@@ -1813,40 +1765,180 @@ verify_agent({UserId,
{sec_name, SecName},
{sec_level, SecLevel}
],
- case verify_agent2(Conf0) of
- {ok, Conf} ->
- {UserId, TargetName, Conf, Version};
- Err ->
- throw(Err)
+ {ok, {UserId, TargetName, verify_agent_config(Conf), Version}}.
+
+
+
+init_agents_config([]) ->
+ ok;
+init_agents_config([Agent|Agents]) ->
+ init_agent_config(Agent),
+ init_agents_config(Agents).
+
+init_agent_config({_UserId, ?DEFAULT_TARGETNAME = TargetName, _Config}) ->
+ error({invalid_target_name, TargetName});
+init_agent_config({UserId, TargetName, Config}) ->
+ case handle_register_agent(UserId, TargetName, Config) of
+ ok ->
+ ok;
+ Error ->
+ throw(Error)
end.
-verify_agent2(Conf) ->
- verify_agent2(Conf, []).
-verify_agent2([], VerifiedConf) ->
- {ok, VerifiedConf};
-verify_agent2([{Item, Val0}|Items], VerifiedConf) ->
- case verify_val(Item, Val0) of
- {ok, Val} ->
- verify_agent2(Items, [{Item, Val} | VerifiedConf]);
- Err ->
- Err
+
+%% Sort 'tdomain' first then 'port' to ensure both
+%% sorts before 'taddress'. Keep the order of other items.
+order_agent(ItemA, ItemB) ->
+ snmp_conf:keyorder(1, ItemA, ItemB, [tdomain, port]).
+
+fix_agent_config(Conf) ->
+ ?vdebug("fix_agent_config -> entry with~n~n"
+ " Conf: ~p", [Conf]),
+ fix_agent_config(lists:sort(fun order_agent/2, Conf), []).
+
+fix_agent_config([], FixedConf) ->
+ Ret = lists:reverse(FixedConf),
+ ?vdebug("fix_agent_config -> returns:~n"
+ " ~p", [Ret]),
+ Ret;
+fix_agent_config([{taddress = Item, Address} = Entry|Conf], FixedConf) ->
+ {value, {tdomain, TDomain}} = lists:keysearch(tdomain, 1, FixedConf),
+ {value, {port, DefaultPort}} = lists:keysearch(port, 1, FixedConf),
+ case snmp_conf:check_address(TDomain, Address, DefaultPort) of
+ ok ->
+ fix_agent_config(Conf, [Entry|FixedConf]);
+ {ok, NAddress} ->
+ fix_agent_config(Conf, [{Item, NAddress}|FixedConf])
end;
-verify_agent2([Bad|_], _VerifiedConf) ->
- {error, {bad_agent_config, Bad}}.
+fix_agent_config([Entry|Conf], FixedConf) ->
+ fix_agent_config(Conf, [Entry|FixedConf]).
+
+
+
+verify_agent_config(Conf) ->
+ verify_agent_config(lists:sort(fun order_agent/2, Conf), []).
+
+verify_agent_config([], VerifiedConf) ->
+ Ret = lists:reverse(VerifiedConf),
+ ?vdebug("verify_agent_config -> returns:~n"
+ " ~p", [Ret]),
+ Ret;
+verify_agent_config([{Item, _} = Entry|Conf], VerifiedConf) ->
+ verify_illegal(VerifiedConf, [Item]), % Duplicates are hereby illegal
+ verify_agent_config(Conf, VerifiedConf, Entry);
+verify_agent_config([Bad|_], _VerifiedConf) ->
+ error({bad_agent_config, Bad}).
+
+verify_agent_config(
+ Conf, VerifiedConf, {taddress = Item, Address} = Entry) ->
+ verify_illegal(VerifiedConf, [address]),
+ {TDomain, VC} =
+ case lists:keysearch(tdomain, 1, VerifiedConf) of
+ {value, {tdomain,TD}} ->
+ {TD, VerifiedConf};
+ _ ->
+ %% Insert tdomain since it is missing
+ %% Note: not default_transport_domain() since
+ %% taddress is the new format hence the application
+ %% should be tdomain aware and therefore addresses
+ %% on the Domain, Addr format should be used and understood.
+ TD = transportDomainUdpIpv4,
+ {TD, [{tdomain, TD}|VerifiedConf]}
+ end,
+ case snmp_conf:check_address(TDomain, Address, 0) of
+ ok ->
+ verify_agent_config(Conf, [Entry|VC]);
+ {ok, NAddress} ->
+ verify_agent_config(Conf, [{Item, NAddress}|VC])
+ end;
+verify_agent_config(Conf, VerifiedConf, {address, Address}) ->
+ Item = taddress,
+ verify_illegal(VerifiedConf, [Item]),
+ {TDomain, VC} =
+ case lists:keysearch(tdomain, 1, VerifiedConf) of
+ {value, {tdomain, TD}} ->
+ {TD, VerifiedConf};
+ _ ->
+ %% Insert tdomain since it is missing
+ TD = default_transport_domain(),
+ {TD, [{tdomain, TD}|VerifiedConf]}
+ end,
+ case snmp_conf:check_address(TDomain, Address, 0) of
+ ok ->
+ verify_agent_config(Conf, [{Item, Address}|VC]);
+ {ok, NAddress} ->
+ verify_agent_config(Conf, [{Item, NAddress}|VC])
+ end;
+verify_agent_config(Conf, VerifiedConf, {Item, Val} = Entry) ->
+ case verify_agent_entry(Item, Val) of
+ ok ->
+ verify_agent_config(Conf, [Entry|VerifiedConf]);
+ {ok, NewVal} ->
+ verify_agent_config(Conf, [{Item, NewVal}|VerifiedConf])
+ end.
+
+verify_agent_entry(user_id, _UserId) ->
+ ok;
+verify_agent_entry(reg_type, RegType) ->
+ if
+ RegType =:= addr_port;
+ RegType =:= target_name ->
+ ok;
+ true ->
+ error({bad_reg_type, RegType})
+ end;
+verify_agent_entry(tdomain, TDomain) ->
+ snmp_conf:check_domain(TDomain);
+verify_agent_entry(port, Port) ->
+ snmp_conf:check_port(Port);
+verify_agent_entry(community, Comm) ->
+ snmp_conf:check_string(Comm);
+verify_agent_entry(engine_id, EngineId) ->
+ case EngineId of
+ discovery ->
+ ok;
+ _ ->
+ snmp_conf:check_string(EngineId)
+ end;
+verify_agent_entry(timeout, Timeout) ->
+ snmp_conf:check_timer(Timeout);
+verify_agent_entry(max_message_size, MMS) ->
+ snmp_conf:check_packet_size(MMS);
+verify_agent_entry(version, V) ->
+ if
+ V =:= v1;
+ V =:= v2;
+ V =:= v3 ->
+ ok;
+ true ->
+ error({bad_version, V})
+ end;
+verify_agent_entry(sec_model, Model) ->
+ snmp_conf:check_sec_model(Model);
+verify_agent_entry(sec_name, Name) ->
+ try snmp_conf:check_string(Name)
+ catch
+ _ ->
+ error({bad_sec_name, Name})
+ end;
+verify_agent_entry(sec_level, Level) ->
+ snmp_conf:check_sec_level(Level);
+verify_agent_entry(Item, _) ->
+ error({unknown_item, Item}).
+
read_users_config_file(Dir) ->
- Check = fun(C) -> check_user_config(C) end,
- case read_file(Dir, "users.conf", Check, []) of
- {ok, Conf} ->
- Conf;
- Error ->
+ Order = fun snmp_conf:no_order/2,
+ Check = fun (User, State) -> {check_user_config(User), State} end,
+ try read_file(Dir, "users.conf", Order, Check, [])
+ catch
+ throw:Error ->
?vlog("failure reading users config file: ~n ~p", [Error]),
- throw(Error)
+ erlang:raise(throw, Error, erlang:get_stacktrace())
end.
-
check_user_config({Id, Mod, Data}) ->
?vtrace("check_user_config -> entry with"
"~n Id: ~p"
@@ -1864,21 +1956,18 @@ check_user_config({Id, Mod, Data, DefaultAgentConfig} = _User)
case (catch verify_user_behaviour(Mod)) of
ok ->
?vtrace("check_user_config -> user behaviour verified", []),
- case verify_user_agent_config(DefaultAgentConfig) of
- {ok, DefAgentConf} ->
- ?vtrace("check_user_config -> "
- "user agent (default) config verified", []),
- User2 = {Id, Mod, Data, DefAgentConf},
- {ok, User2};
- {error, Reason} ->
- error({bad_default_agent_config, Reason})
- end;
+ DefAgentConf =
+ verify_default_agent_config(DefaultAgentConfig),
+ ?vtrace("check_user_config -> "
+ "user agent (default) config verified", []),
+ User2 = {Id, Mod, Data, DefAgentConf},
+ {ok, User2};
Error ->
throw(Error)
end;
check_user_config({Id, _Mod, _Data, DefaultAgentConfig})
when (Id =/= ?DEFAULT_USER) ->
- {error, {bad_default_agent_config, DefaultAgentConfig}};
+ error({bad_default_agent_config, DefaultAgentConfig});
check_user_config({Id, _Mod, _Data, _DefaultAgentConfig}) ->
error({bad_user_id, Id});
check_user_config(User) ->
@@ -1904,7 +1993,7 @@ init_user_config(User) ->
error_msg("user config check failed: "
"~n~w~n~w", [User, Reason])
end.
-
+
verify_user({Id, UserMod, UserData}) ->
verify_user({Id, UserMod, UserData, []});
verify_user({Id, UserMod, UserData, DefaultAgentConfig})
@@ -1917,15 +2006,24 @@ verify_user({Id, UserMod, UserData, DefaultAgentConfig})
[Id, UserMod, UserData, DefaultAgentConfig]),
case (catch verify_user_behaviour(UserMod)) of
ok ->
- case verify_user_agent_config(DefaultAgentConfig) of
- {ok, DefAgentConf} ->
- Config = default_agent_config(DefAgentConf),
- {ok, #user{id = Id,
- mod = UserMod,
- data = UserData,
- default_agent_config = Config}};
- {error, Reason} ->
- error({bad_default_agent_config, Reason})
+ try
+ {ok, SystemDefaultAgentConfig} = agent_info(),
+ Config =
+ ensure_config(
+ SystemDefaultAgentConfig,
+ verify_default_agent_config(DefaultAgentConfig)),
+%% Config =
+%% default_agent_config(
+%% verify_default_agent_config(DefaultAgentConfig)),
+ {ok, #user{id = Id,
+ mod = UserMod,
+ data = UserData,
+ default_agent_config = Config}}
+ catch
+ Error ->
+ ?vdebug("verify_user default_agent_config -> throw"
+ "~n Error: ~p", [Error]),
+ error({bad_default_agent_config, Error})
end;
Error ->
throw(Error)
@@ -1936,27 +2034,24 @@ verify_user({Id, _UserMod, _UserData, DefaultAgentConfig})
verify_user({Id, _, _, _}) ->
{error, {bad_user_id, Id}}.
-verify_user_agent_config(Conf) ->
+verify_default_agent_config(Conf) ->
try
- begin
- verify_invalid(Conf, [user_id, engine_id, address]),
- verify_agent_config2(Conf)
- end
+ verify_illegal(
+ Conf,
+ [user_id, engine_id, address, tdomain, taddress]),
+ verify_agent_config(Conf)
catch
- throw:Error ->
- ?vdebug("verify_user_agent_config -> throw"
+ Error ->
+ ?vdebug("verify_default_agent_config -> throw"
"~n Error: ~p", [Error]),
- Error
+ error({bad_default_agent_config, Error})
end.
+
read_usm_config_file(Dir) ->
- Check = fun(C) -> check_usm_user_config(C) end,
- case read_file(Dir, "usm.conf", Check, []) of
- {ok, Conf} ->
- Conf;
- Error ->
- throw(Error)
- end.
+ Order = fun snmp_conf:no_order/2,
+ Check = fun (User, State) -> {check_usm_user_config(User), State} end,
+ read_file(Dir, "usm.conf", Order, Check, []).
%% Identity-function
check_usm_user_config({EngineId, Name,
@@ -2139,125 +2234,128 @@ is_crypto_supported(Func) ->
read_manager_config_file(Dir) ->
- Check = fun(Conf) -> check_manager_config(Conf) end,
- case read_file(Dir, "manager.conf", Check) of
- {ok, Conf} ->
- ?d("read_manager_config_file -> ok: "
- "~n Conf: ~p", [Conf]),
- %% If the address is not specified, then we assume
- %% it should be the local host.
- %% If the address is not possible to determine
- %% that way, then we give up...
- check_mandatory_manager_config(Conf),
- ensure_manager_config(Conf);
- Error ->
- throw(Error)
- end.
+ Order = fun order_manager_config/2,
+ Check = fun check_manager_config/2,
+ Conf = read_file(Dir, "manager.conf", Order, Check),
+ ?d("read_manager_config_file -> ok: "
+ "~n Conf: ~p", [Conf]),
+ %% If the address is not specified, then we assume
+ %% it should be the local host.
+ %% If the address is not possible to determine
+ %% that way, then we give up...
+ verify_someof(Conf, [port, transports]),
+ verify_mandatory(Conf, [engine_id, max_message_size]),
+ default_manager_config(Conf).
+
+default_manager_config(Conf) ->
+ %% Ensure valid transports entry
+ case lists:keyfind(transports, 1, Conf) of
+ false ->
+ {port, Port} = lists:keyfind(port, 1, Conf),
+ Domain =
+ case lists:keyfind(domain, 1, Conf) of
+ false ->
+ default_transport_domain();
+ {_, D} ->
+ D
+ end,
+ Family = snmp_conf:tdomain_to_family(Domain),
+ {ok, Hostname} = inet:gethostname(),
+ case inet:getaddr(Hostname, Family) of
+ {ok, Address} ->
+ lists:sort(
+ fun order_manager_config/2,
+ [{transports, [{Domain, {Address, Port}}]} | Conf]);
+ {error, _Reason} ->
+ ?d("default_manager_config -> "
+ "failed getting ~w address for ~s:~n"
+ " _Reason: ~p", [Family, Hostname, _Reason]),
+ Conf
+ end;
+ _ ->
+ Conf
+ end.
+
+order_manager_config(EntryA, EntryB) ->
+ snmp_conf:keyorder(1, EntryA, EntryB, [domain, port]).
+
+check_manager_config(Entry, undefined) ->
+ check_manager_config(Entry, {default_transport_domain(), undefined});
+check_manager_config({domain, Domain}, {_, Port}) ->
+ {snmp_conf:check_domain(Domain), {Domain, Port}};
+check_manager_config({port, Port}, {Domain, _}) ->
+ {ok = snmp_conf:check_port(Port), {Domain, Port}};
+check_manager_config({address, _}, {_, undefined}) ->
+ error({missing_mandatory, port});
+check_manager_config({address = Tag, Ip} = Entry, {Domain, Port} = State) ->
+ {case snmp_conf:check_ip(Domain, Ip) of
+ ok ->
+ [Entry,
+ {transports, [{Domain, {Ip, Port}}]}];
+ {ok, FixedIp} ->
+ [{Tag, FixedIp},
+ {transports, [{Domain, {FixedIp, Port}}]}]
+ end, State};
+check_manager_config({transports = Tag, Transports}, {_, Port} = State)
+ when is_list(Transports) ->
+ CheckedTransports =
+ [case Transport of
+ {Domain, Address} ->
+ case
+ case Port of
+ undefined ->
+ snmp_conf:check_address(Domain, Address);
+ _ ->
+ snmp_conf:check_address(Domain, Address, Port)
+ end
+ of
+ ok ->
+ Transport;
+ {ok, FixedAddress} ->
+ {Domain, FixedAddress}
+ end;
+ _Domain when Port =:= undefined->
+ error({missing_mandatory, port});
+ Domain ->
+ Family = snmp_conf:tdomain_to_family(Domain),
+ {ok, Hostname} = inet:gethostname(),
+ case inet:getaddr(Hostname, Family) of
+ {ok, IpAddr} ->
+ {Domain, {IpAddr, Port}};
+ {error, _} ->
+ error({bad_address, {Domain, Hostname}})
+ end
+ end
+ || Transport <- Transports],
+ {{ok, {Tag, CheckedTransports}}, State};
+check_manager_config(Entry, State) ->
+ {check_manager_config(Entry), State}.
-default_manager_config() ->
- {ok, HostName} = inet:gethostname(),
- case inet:getaddr(HostName, inet) of
- {ok, A} ->
- [{address, tuple_to_list(A)}];
- {error, _Reason} ->
- ?d("default_manager_config -> failed getting address: "
- "~n _Reason: ~p", [_Reason]),
- []
- end.
-
-check_manager_config({address, Addr}) ->
- snmp_conf:check_ip(Addr);
-check_manager_config({port, Port}) ->
- snmp_conf:check_integer(Port, {gt, 0});
check_manager_config({engine_id, EngineID}) ->
snmp_conf:check_string(EngineID);
check_manager_config({max_message_size, Max}) ->
snmp_conf:check_integer(Max, {gte, 484});
check_manager_config(Conf) ->
- {error, {unknown_config, Conf}}.
-
-
-check_mandatory_manager_config(Conf) ->
- Mand = [port, engine_id, max_message_size],
- check_mandatory_manager_config(Mand, Conf).
-
-check_mandatory_manager_config([], _Conf) ->
- ok;
-check_mandatory_manager_config([Item|Mand], Conf) ->
- case lists:keysearch(Item, 1, Conf) of
- false ->
- error({missing_mandatory_manager_config, Item});
- _ ->
- check_mandatory_manager_config(Mand, Conf)
- end.
-
-
-ensure_manager_config(Confs) ->
- ensure_manager_config(Confs, default_manager_config()).
-
-ensure_manager_config(Confs, []) ->
- Confs;
-ensure_manager_config(Confs, [{Key,_} = DefKeyVal|Defs]) ->
- case lists:keysearch(Key, 1, Confs) of
- false ->
- ensure_manager_config([DefKeyVal|Confs], Defs);
- {value, _Conf} ->
- ensure_manager_config(Confs, Defs)
- end.
-
-% ensure_manager_config([], Defs, Confs) ->
-% Confs ++ Defs;
-% ensure_manager_config(Confs0, [{Key, DefVal}|Defs], Acc) ->
-% case lists:keysearch(Key, 1, Confs0) of
-% false ->
-% ensure_manager_config(Confs0, Defs, [{Key, DefVal}|Acc]);
-% {value, Conf} ->
-% Confs = lists:keydelete(Key, 1, Confs0),
-% ensure_manager_config(Confs, Defs, [Conf|Acc])
-% end.
-
+ error({unknown_config, Conf}).
-read_file(Dir, FileName, Check, Default) ->
- File = filename:join(Dir, FileName),
- case file:read_file_info(File) of
- {ok, _} ->
- case (catch do_read(File, Check)) of
- {ok, Conf} ->
- {ok, Conf};
- Error ->
- ?vtrace("read_file -> read failed:"
- "~n Error: ~p", [Error]),
- Error
- end;
- {error, Reason} ->
+read_file(Dir, FileName, Order, Check, Default) ->
+ try snmp_conf:read(filename:join(Dir, FileName), Order, Check)
+ catch
+ {error, Reason} when element(1, Reason) =:= failed_open ->
?vlog("failed reading config from ~s: ~p", [FileName, Reason]),
- {ok, Default}
+ Default
end.
-read_file(Dir, FileName, Check) ->
- File = filename:join(Dir, FileName),
- case file:read_file_info(File) of
- {ok, _} ->
- case (catch do_read(File, Check)) of
- {ok, Conf} ->
- ?vtrace("read_file -> read ok"
- "~n Conf: ~p", [Conf]),
- {ok, Conf};
- Error ->
- ?vtrace("read_file -> read failed:"
- "~n Error: ~p", [Error]),
- Error
- end;
- {error, Reason} ->
+read_file(Dir, FileName, Order, Check) ->
+ try snmp_conf:read(filename:join(Dir, FileName), Order, Check)
+ catch
+ throw:{error, Reason} = Error
+ when element(1, Reason) =:= failed_open ->
error_msg("failed reading config from ~s: ~p", [FileName, Reason]),
- {error, {failed_reading, FileName, Reason}}
+ erlang:raise(throw, Error, erlang:get_stacktrace())
end.
-do_read(File, Check) ->
- {ok, snmp_conf:read(File, Check)}.
-
-
%%--------------------------------------------------------------------
%% Func: handle_call/3
%% Returns: {reply, Reply, State} |
@@ -2684,30 +2782,50 @@ handle_register_agent(UserId, TargetName, Config) ->
"~n Config: ~p", [UserId, TargetName, Config]),
case (catch agent_info(TargetName, user_id)) of
{error, _} ->
- ?vtrace("handle_register_agent -> user_id not found in config", []),
+ ?vtrace(
+ "handle_register_agent -> user_id not found in config", []),
case ets:lookup(snmpm_user_table, UserId) of
[#user{default_agent_config = DefConfig}] ->
- ?vtrace("handle_register_agent -> "
- "~n DefConfig: ~p", [DefConfig]),
- %% First, insert this users default config
- ?vtrace("handle_register_agent -> store default config", []),
- do_handle_register_agent(TargetName, DefConfig),
- %% Second, insert the config for this agent
- ?vtrace("handle_register_agent -> store config", []),
- do_handle_register_agent(TargetName,
- [{user_id, UserId}|Config]),
+ ?vtrace("handle_register_agent ->~n"
+ " DefConfig: ~p", [DefConfig]),
+ FixedConfig =
+ fix_agent_config(ensure_config(DefConfig, Config)),
+ ?vtrace("handle_register_agent ->~n"
+ " FixedConfig: ~p", [FixedConfig]),
+ do_handle_register_agent(
+ TargetName, [{user_id, UserId}|FixedConfig]),
%% <DIRTY-BACKWARD-COMPATIBILLITY>
- %% And now for some (backward compatibillity)
+ %% And now for some (backward compatibillity)
%% dirty crossref stuff
- ?vtrace("handle_register_agent -> lookup address", []),
- {ok, Addr} = agent_info(TargetName, address),
- ?vtrace("handle_register_agent -> Addr: ~p, lookup Port",
- [Addr]),
- {ok, Port} = agent_info(TargetName, port),
- ?vtrace("handle_register_agent -> register cross-ref fix", []),
- ets:insert(snmpm_agent_table,
- {{Addr, Port, target_name}, TargetName}),
+ {value, {_, Domain}} =
+ lists:keysearch(tdomain, 1, FixedConfig),
+ {value, {_, Address}} =
+ lists:keysearch(taddress, 1, FixedConfig),
+ ?vtrace(
+ "handle_register_agent -> register cross-ref fix", []),
+ ets:insert(snmpm_agent_table,
+ {{Domain, Address, target_name}, TargetName}),
%% </DIRTY-BACKWARD-COMPATIBILLITY>
+
+%% %% First, insert this users default config
+%% ?vtrace("handle_register_agent -> store default config", []),
+%% do_handle_register_agent(TargetName, DefConfig),
+%% %% Second, insert the config for this agent
+%% ?vtrace("handle_register_agent -> store config", []),
+%% do_handle_register_agent(TargetName,
+%% [{user_id, UserId}|Config]),
+%% %% <DIRTY-BACKWARD-COMPATIBILLITY>
+%% %% And now for some (backward compatibillity)
+%% %% dirty crossref stuff
+%% ?vtrace("handle_register_agent -> lookup taddress", []),
+%% {ok, {Addr, Port} = TAddress} =
+%% agent_info(TargetName, taddress),
+%% ?vtrace("handle_register_agent -> taddress: ~p",
+%% [TAddress]),
+%% ?vtrace("handle_register_agent -> register cross-ref fix", []),
+%% ets:insert(snmpm_agent_table,
+%% {{Addr, Port, target_name}, TargetName}),
+%% %% </DIRTY-BACKWARD-COMPATIBILLITY>
ok;
_ ->
{error, {not_found, UserId}}
@@ -2729,7 +2847,7 @@ handle_register_agent(UserId, TargetName, Config) ->
do_handle_register_agent(_TargetName, []) ->
ok;
do_handle_register_agent(TargetName, [{Item, Val}|Rest]) ->
- ?vtrace("handle_register_agent -> entry with"
+ ?vtrace("do_handle_register_agent -> entry with"
"~n TargetName: ~p"
"~n Item: ~p"
"~n Val: ~p"
@@ -2738,7 +2856,7 @@ do_handle_register_agent(TargetName, [{Item, Val}|Rest]) ->
ok ->
do_handle_register_agent(TargetName, Rest);
{error, Reason} ->
- ?vtrace("handle_register_agent -> failed updating ~p"
+ ?vtrace("do_handle_register_agent -> failed updating ~p"
"~n Item: ~p"
"~n Reason: ~p", [Item, Reason]),
ets:match_delete(snmpm_agent_table, {TargetName, '_'}),
@@ -2762,9 +2880,9 @@ handle_unregister_agent(UserId, TargetName) ->
%% <DIRTY-BACKWARD-COMPATIBILLITY>
%% And now for some (backward compatibillity)
%% dirty crossref stuff
- {ok, Addr} = agent_info(TargetName, address),
- {ok, Port} = agent_info(TargetName, port),
- ets:delete(snmpm_agent_table, {Addr, Port, target_name}),
+ {ok, Domain} = agent_info(TargetName, tdomain),
+ {ok, Address} = agent_info(TargetName, taddress),
+ ets:delete(snmpm_agent_table, {Domain, Address, target_name}),
%% </DIRTY-BACKWARD-COMPATIBILLITY>
ets:match_delete(snmpm_agent_table, {{TargetName, '_'}, '_'}),
ok;
@@ -2790,21 +2908,26 @@ handle_update_agent_info(UserId, TargetName, Info) ->
Error
end.
-handle_update_agent_info(TargetName, Info0) ->
+handle_update_agent_info(TargetName, Info) ->
?vtrace("handle_update_agent_info -> entry with"
"~n TargetName: ~p"
- "~n Info0: ~p", [TargetName, Info0]),
+ "~n Info: ~p", [TargetName, Info]),
%% Verify info
- try verify_agent_info(TargetName, Info0) of
- {ok, Info} ->
- do_update_agent_info(TargetName, Info);
+ try
+ verify_illegal(Info, [user_id]),
+ %% If port or domain is part of the info, then use it.
+ %% If not, lookup what is already stored for
+ %% this agent and use that.
+ do_update_agent_info(
+ TargetName,
+ fix_agent_config(
+ verify_agent_config(
+ ensure_agent_info(TargetName, [port,tdomain], Info))))
+ catch
Error ->
- Error
- catch
- throw:Error ->
Error;
T:E ->
- {error, {failed_info_verification, Info0, T, E}}
+ {error, {failed_info_verification, Info, T, E}}
end.
handle_update_agent_info(UserId, TargetName, Item, Val) ->
@@ -2816,6 +2939,9 @@ handle_update_agent_info(UserId, TargetName, Item, Val) ->
handle_update_agent_info(TargetName, [{Item, Val}]).
do_update_agent_info(TargetName, Info) ->
+ ?vtrace("do_update_agent_info -> entry with~n"
+ " TargetName: ~p~n"
+ " Info: ~p", [TargetName,Info]),
InsertItem =
fun({Item, Val}) ->
ets:insert(snmpm_agent_table, {{TargetName, Item}, Val})
@@ -2997,109 +3123,42 @@ verify_mandatory(Conf, [Mand|Mands]) ->
true ->
verify_mandatory(Conf, Mands);
false ->
- throw({error, {missing_mandatory_config, Mand}})
+ error({missing_mandatory_config, Mand})
end.
-verify_invalid(_, []) ->
+verify_illegal(_, []) ->
ok;
-verify_invalid(Conf, [Inv|Invs]) ->
+verify_illegal(Conf, [Inv|Invs]) ->
case lists:member(Inv, Conf) of
false ->
- verify_invalid(Conf, Invs);
+ verify_illegal(Conf, Invs);
true ->
- throw({error, {illegal_config, Inv}})
+ error({illegal_config, Inv})
end.
-
-verify_val(user_id, UserId) ->
- {ok, UserId};
-verify_val(reg_type, RegType)
- when (RegType =:= addr_port) orelse (RegType =:= target_name) ->
- {ok, RegType};
-verify_val(tdomain = Item, snmpUDPDomain = _Domain) ->
- verify_val(Item, transportDomainUdpIpv4);
-verify_val(tdomain, Domain) ->
- case lists:member(Domain, ?SUPPORTED_DOMAINS) of
+verify_someof(Conf, [Mand|Mands]) ->
+ case lists:keymember(Mand, 1, Conf) of
true ->
- {ok, Domain};
+ ok;
false ->
- case lists:member(Domain, snmp_conf:all_domains()) of
- true ->
- error({unsupported_domain, Domain});
- false ->
- error({unknown_domain, Domain})
+ case Mands of
+ [] ->
+ error({missing_mandatory_config, Mand});
+ _ ->
+ verify_someof(Conf, Mands)
end
- end;
-verify_val(address, {Domain, Addr0}) ->
- case normalize_address(Domain, Addr0) of
- {_A1, _A2, _A3, _A4} = Addr ->
- {ok, Addr};
- {_A1, _A2, _A3, _A4, _A5, _A6, _A7, _A8} = Addr ->
- {ok, Addr};
- _ when is_list(Addr0) ->
- case (catch snmp_conf:check_ip(Addr0)) of
- ok ->
- {ok, list_to_tuple(Addr0)};
- Err ->
- Err
- end;
- _ ->
- error({bad_address, Addr0})
- end;
-verify_val(address, BadAddress) ->
- error({bad_address, BadAddress});
-verify_val(port, Port) ->
- case (catch snmp_conf:check_integer(Port, {gt, 0})) of
- ok ->
- {ok, Port};
- Err ->
- Err
- end;
-verify_val(community, Comm) ->
- case (catch snmp_conf:check_string(Comm)) of
- ok ->
- {ok, Comm};
- Err ->
- Err
- end;
-verify_val(engine_id, discovery = EngineId) ->
- {ok, EngineId};
-verify_val(engine_id, EngineId) ->
- case (catch snmp_conf:check_string(EngineId)) of
- ok ->
- {ok, EngineId};
- Err ->
- Err
- end;
-verify_val(timeout, Timeout) ->
- (catch snmp_conf:check_timer(Timeout));
-verify_val(max_message_size, MMS) ->
- case (catch snmp_conf:check_packet_size(MMS)) of
- ok ->
- {ok, MMS};
- Err ->
- Err
- end;
-verify_val(version, V)
- when (V =:= v1) orelse (V =:= v2) orelse (V =:= v3) ->
- {ok, V};
-verify_val(version, BadVersion) ->
- error({bad_version, BadVersion});
-verify_val(sec_model, Model) ->
- (catch snmp_conf:check_sec_model(Model));
-verify_val(sec_name, Name) when is_list(Name) ->
- case (catch snmp_conf:check_string(Name)) of
- ok ->
- {ok, Name};
- Err ->
- Err
- end;
-verify_val(sec_name, BadName) ->
- error({bad_sec_name, BadName});
-verify_val(sec_level, Level) ->
- (catch snmp_conf:check_sec_level(Level));
-verify_val(Item, _) ->
- {error, {unknown_item, Item}}.
+ end.
+
+ensure_config([], Config) ->
+ Config;
+ensure_config([Default|Defaults], Config) ->
+ case lists:keymember(element(1, Default), 1, Config) of
+ true ->
+ ensure_config(Defaults, Config);
+ false ->
+ ensure_config(Defaults, [Default|Config])
+ end.
+
%%%-------------------------------------------------------------------
@@ -3257,31 +3316,14 @@ init_mini_mib_elems(MibName, [_|T], Res) ->
%%----------------------------------------------------------------------
-normalize_address(Addr) ->
- normalize_address(snmpUDPDomain, Addr).
-
-normalize_address(snmpUDPDomain, Addr) ->
- normalize_address(transportDomainUdpIpv4, Addr);
-
-normalize_address(Domain, Addr) ->
- case inet:getaddr(Addr, td2fam(Domain)) of
- {ok, Addr2} ->
- Addr2;
- _ when is_list(Addr) ->
- case (catch snmp_conf:check_ip(Domain, Addr)) of
- ok ->
- list_to_tuple(Addr);
- _ ->
- Addr
- end;
- _ ->
- Addr
+fix_address(Domain, Address) ->
+ case snmp_conf:check_address(Domain, Address) of
+ ok ->
+ Address;
+ {ok, NAddress} ->
+ NAddress
end.
-td2fam(transportDomainUdpIpv4) -> inet;
-td2fam(transportDomainUdpIpv6) -> inet6.
-
-
%%----------------------------------------------------------------------
call(Req) ->
@@ -3391,4 +3433,3 @@ error_msg(F, A) ->
%% p(F, A) ->
%% io:format("~w:" ++ F ++ "~n", [?MODULE | A]).
-
diff --git a/lib/snmp/src/manager/snmpm_mpd.erl b/lib/snmp/src/manager/snmpm_mpd.erl
index 953c94ab54..f8a7441c0a 100644
--- a/lib/snmp/src/manager/snmpm_mpd.erl
+++ b/lib/snmp/src/manager/snmpm_mpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-export([init/1,
- process_msg/7,
+ process_msg/7, process_msg/6,
generate_msg/5, generate_response_msg/4,
next_msg_id/0,
@@ -92,8 +92,10 @@ reset(#state{v3 = V3}) ->
%% Purpose: This is the main Message Dispatching function. (see
%% section 4.2.1 in rfc2272)
%%-----------------------------------------------------------------
-process_msg(Msg, Domain, Addr, Port, State, NoteStore, Logger) ->
+process_msg(Msg, Domain, Ip, Port, State, NoteStore, Logger) ->
+ process_msg(Msg, Domain, {Ip, Port}, State, NoteStore, Logger).
+process_msg(Msg, Domain, Addr, State, NoteStore, Logger) ->
inc(snmpInPkts),
case (catch snmp_pdus:dec_message_only(binary_to_list(Msg))) of
@@ -102,17 +104,17 @@ process_msg(Msg, Domain, Addr, Port, State, NoteStore, Logger) ->
#message{version = 'version-1', vsn_hdr = Community, data = Data}
when State#state.v1 =:= true ->
HS = ?empty_msg_size + length(Community),
- process_v1_v2c_msg('version-1', NoteStore, Msg,
- Domain, Addr, Port,
- Community, Data, HS, Logger);
+ process_v1_v2c_msg(
+ 'version-1', NoteStore, Msg, Domain, Addr,
+ Community, Data, HS, Logger);
%% Version 2
#message{version = 'version-2', vsn_hdr = Community, data = Data}
when State#state.v2c =:= true ->
HS = ?empty_msg_size + length(Community),
- process_v1_v2c_msg('version-2', NoteStore, Msg,
- Domain, Addr, Port,
- Community, Data, HS, Logger);
+ process_v1_v2c_msg(
+ 'version-2', NoteStore, Msg, Domain, Addr,
+ Community, Data, HS, Logger);
%% Version 3
#message{version = 'version-3', vsn_hdr = H, data = Data}
@@ -122,7 +124,7 @@ process_msg(Msg, Domain, Addr, Port, State, NoteStore, Logger) ->
"~n msgFlags: ~p"
"~n msgSecModel: ~p",
[H#v3_hdr.msgID,H#v3_hdr.msgFlags,H#v3_hdr.msgSecurityModel]),
- process_v3_msg(NoteStore, Msg, H, Data, Addr, Port, Logger);
+ process_v3_msg(NoteStore, Msg, H, Data, Addr, Logger);
%% Crap
{'EXIT', {bad_version, Vsn}} ->
@@ -148,32 +150,27 @@ process_msg(Msg, Domain, Addr, Port, State, NoteStore, Logger) ->
%%-----------------------------------------------------------------
%% Handles a Community based message (v1 or v2c).
%%-----------------------------------------------------------------
-process_v1_v2c_msg(Vsn, _NoteStore, Msg, Domain,
- Addr, Port,
- Community, Data, HS, Log) ->
+process_v1_v2c_msg(
+ Vsn, _NoteStore, Msg, Domain, Addr, Community, Data, HS, Log) ->
?vdebug("process_v1_v2c_msg -> entry with"
"~n Vsn: ~p"
"~n Domain: ~p"
"~n Addr: ~p"
- "~n Port: ~p"
"~n Community: ~p"
- "~n HS: ~p", [Vsn, Domain, Addr, Port, Community, HS]),
-
+ "~n HS: ~p", [Vsn, Domain, Addr, Community, HS]),
+
{TDomain, TAddress} =
try
- begin
- TD = snmp_conf:mk_tdomain(Domain),
- TA = snmp_conf:mk_taddress(Domain, Addr, Port),
- {TD, TA}
- end
+ {snmp_conf:mk_tdomain(Domain),
+ snmp_conf:mk_taddress(Domain, Addr)}
catch
throw:{error, TReason} ->
throw({discarded, {badarg, Domain, TReason}})
end,
Max = get_max_message_size(),
- AgentMax = get_agent_max_message_size(Addr, Port),
+ AgentMax = get_agent_max_message_size(Domain, Addr),
PduMS = pdu_ms(Max, AgentMax, HS),
?vtrace("process_v1_v2c_msg -> PduMS: ~p", [PduMS]),
@@ -213,13 +210,12 @@ sec_model('version-2') -> ?SEC_V2C.
%% Handles a SNMPv3 Message, following the procedures in rfc2272,
%% section 4.2 and 7.2
%%-----------------------------------------------------------------
-process_v3_msg(NoteStore, Msg, Hdr, Data, Addr, Port, Log) ->
+process_v3_msg(NoteStore, Msg, Hdr, Data, Address, Log) ->
+ ?vdebug(
+ "process_v3_msg -> entry with~n"
+ " Hdr: ~p~n"
+ " Address: ~p", [Hdr, Address]),
- ?vdebug("process_v3_msg -> entry with"
- "~n Hdr: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Hdr, Addr, Port]),
-
%% 7.2.3
#v3_hdr{msgID = MsgID,
msgMaxSize = MMS,
@@ -352,8 +348,8 @@ process_v3_msg(NoteStore, Msg, Hdr, Data, Addr, Port, Log) ->
%% 4.2.2.1.1 - we don't handle proxys yet => we only
%% handle CtxEngineID to ourselves
%% Check that we actually know of an agent with this
- %% CtxEngineID and Addr/Port
- case is_known_engine_id(CtxEngineID, Addr, Port) of
+ %% CtxEngineID and Address
+ case is_known_engine_id(CtxEngineID, Address) of
true ->
?vtrace("and the agent EngineID (~p) "
"is know to us", [CtxEngineID]),
@@ -866,14 +862,23 @@ get_max_message_size() ->
end.
%% The the MMS of the agent
-get_agent_max_message_size(Addr, Port) ->
- case snmpm_config:get_agent_engine_max_message_size(Addr, Port) of
+get_agent_max_message_size(Domain, Addr) ->
+ case snmpm_config:get_agent_engine_max_message_size(Domain, Addr) of
{ok, MMS} ->
MMS;
_Error ->
- ?vlog("unknown agent: ~w:~w", [Addr, Port]),
+ ?vlog("unknown agent: ~s",
+ [snmp_conf:mk_addr_string({Domain, Addr})]),
get_max_message_size()
end.
+%% get_agent_max_message_size(Addr, Port) ->
+%% case snmpm_config:get_agent_engine_max_message_size(Addr, Port) of
+%% {ok, MMS} ->
+%% MMS;
+%% _Error ->
+%% ?vlog("unknown agent: ~w:~w", [Addr, Port]),
+%% get_max_message_size()
+%% end.
%% Get "our" (manager) engine id
get_engine_id() ->
@@ -888,9 +893,12 @@ get_engine_id() ->
get_agent_engine_id(Name) ->
snmpm_config:get_agent_engine_id(Name).
-is_known_engine_id(EngineID, Addr, Port) ->
+is_known_engine_id(EngineID, {Addr, Port}) ->
snmpm_config:is_known_engine_id(EngineID, Addr, Port).
+%% is_known_engine_id(EngineID, Addr, Port) ->
+%% snmpm_config:is_known_engine_id(EngineID, Addr, Port).
+
% get_agent_engine_id(Addr, Port) ->
% case snmpm_config:get_agent_engine_id(Addr, Port) of
% {ok, Id} ->
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index 4d6bd9aa33..0e1c51c609 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,7 +17,9 @@
%% %CopyrightEnd%
%%
+-ifndef(snmpm_net_if_mt).
-module(snmpm_net_if).
+-endif.
-behaviour(gen_server).
-behaviour(snmpm_network_interface).
@@ -27,9 +29,9 @@
-export([
start_link/2,
stop/1,
- send_pdu/6, % Backward compatibillity
- send_pdu/7, % Backward compatibillity
- send_pdu/8,
+ send_pdu/6, % Backward compatibility
+ send_pdu/7, % Partly backward compatibility
+ send_pdu/8, % Backward compatibility
inform_response/4,
@@ -55,11 +57,11 @@
%% -define(VMODULE,"NET_IF").
-include("snmp_verbosity.hrl").
--record(state,
+-record(state,
{
server,
note_store,
- sock,
+ transports = [],
mpd_state,
log,
irb = auto, % auto | {user, integer()}
@@ -67,6 +69,9 @@
filter
}).
+-record(transport,
+ {socket,
+ domain = snmpUDPDomain}).
-define(DEFAULT_FILTER_MODULE, snmpm_net_if_filter).
-define(DEFAULT_FILTER_OPTS, [{module, ?DEFAULT_FILTER_MODULE}]).
@@ -99,30 +104,32 @@ start_link(Server, NoteStore) ->
stop(Pid) ->
call(Pid, stop).
-send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port) ->
- send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ?DEFAULT_EXTRA_INFO).
-
-send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ExtraInfo) ->
- Domain = snmpm_config:default_transport_domain(),
- send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo).
+send_pdu(Pid, Pdu, Vsn, MsgData, Domain_or_Ip, Addr_or_Port) ->
+ send_pdu(
+ Pid, Pdu, Vsn, MsgData, Domain_or_Ip, Addr_or_Port, ?DEFAULT_EXTRA_INFO).
-send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo)
+send_pdu(Pid, Pdu, Vsn, MsgData, Domain_or_Ip, Addr_or_Port, ExtraInfo)
when is_record(Pdu, pdu) ->
- ?d("send_pdu -> entry with"
- "~n Pid: ~p"
- "~n Pdu: ~p"
- "~n Vsn: ~p"
- "~n MsgData: ~p"
- "~n Domain: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Pid, Pdu, Vsn, MsgData, Domain, Addr, Port]),
- cast(Pid, {send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo}).
+ ?d("send_pdu -> entry with~n"
+ " Pid: ~p~n"
+ " Pdu: ~p~n"
+ " Vsn: ~p~n"
+ " MsgData: ~p~n"
+ " Domain/IP: ~p~n"
+ " Addr/Port: ~p",
+ [Pid, Pdu, Vsn, MsgData, Domain_or_Ip, Addr_or_Port]),
+ {Domain, Addr} = address(Domain_or_Ip, Addr_or_Port),
+ cast(Pid, {send_pdu, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo}).
+
+send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Ip, Port, ExtraInfo) ->
+ send_pdu(Pid, Pdu, Vsn, MsgData, Domain, {Ip, Port}, ExtraInfo).
note_store(Pid, NoteStore) ->
call(Pid, {note_store, NoteStore}).
-inform_response(Pid, Ref, Addr, Port) ->
- cast(Pid, {inform_response, Ref, Addr, Port}).
+inform_response(Pid, Ref, Domain_or_Ip, Addr_or_Port) ->
+ {Domain, Addr} = address(Domain_or_Ip, Addr_or_Port),
+ cast(Pid, {inform_response, Ref, Domain, Addr}).
info(Pid) ->
call(Pid, info).
@@ -144,6 +151,64 @@ filter_reset(Pid) ->
%%%-------------------------------------------------------------------
+%%% Multi-thread manager
+%%%-------------------------------------------------------------------
+
+-ifdef(snmpm_net_if_mt).
+
+%% This function is called through the macro below to
+%% (in the not multithreaded case) avoid creating the
+%% Failer/4 fun, and to avoid calling the Worker through a fun
+%% (now it shall not be a fun, just a code snippet).
+
+worker(Worker, Failer, #state{log = Log} = State) ->
+ Verbosity = get(verbosity),
+ spawn_opt(
+ fun () ->
+ try
+ put(sname, mnifw),
+ put(verbosity, Verbosity),
+ NewState =
+ case do_reopen_log(Log) of
+ Log ->
+ State;
+ NewLog ->
+ State#state{log = NewLog}
+ end,
+ Worker(NewState)
+ of
+ Result ->
+ %% Winds up in handle_info {'DOWN', ...}
+ erlang:exit({net_if_worker, Result})
+ catch
+ Class:Reason ->
+ %% Winds up in handle_info {'DOWN', ...}
+ erlang:exit(
+ {net_if_worker, Failer,
+ Class, Reason, erlang:get_stacktrace()})
+ end
+ end,
+ [monitor]).
+-define(
+ worker(S, Worker, Failer, State),
+ begin
+ worker(
+ fun (S) -> begin Worker end end,
+ begin Failer end,
+ (State))
+ end).
+
+-else.
+
+-define(
+ worker(S, Worker, _Failer, State),
+ begin (S) = (State), begin Worker end end).
+
+-endif.
+
+
+
+%%%-------------------------------------------------------------------
%%% Callback functions from gen_server
%%%-------------------------------------------------------------------
@@ -158,12 +223,19 @@ init([Server, NoteStore]) ->
?d("init -> entry with"
"~n Server: ~p"
"~n NoteStore: ~p", [Server, NoteStore]),
- case (catch do_init(Server, NoteStore)) of
+ try do_init(Server, NoteStore)
+ catch
{error, Reason} ->
- {stop, Reason};
- {ok, State} ->
- {ok, State}
+ {stop, Reason}
end.
+
+-ifdef(snmpm_net_if_mt).
+%% This should really be protected, but it also needs to
+%% be writable for the worker processes, so...
+-define(inform_table_opts, [set, public, named_table, {keypos, 1}]).
+-else.
+-define(inform_table_opts, [set, protected, named_table, {keypos, 1}]).
+-endif.
do_init(Server, NoteStore) ->
process_flag(trap_exit, true),
@@ -173,18 +245,18 @@ do_init(Server, NoteStore) ->
process_flag(priority, Prio),
%% -- Create inform request table --
- ets:new(snmpm_inform_request_table,
- [set, protected, named_table, {keypos, 1}]),
+ ets:new(snmpm_inform_request_table, ?inform_table_opts),
%% -- Verbosity --
{ok, Verbosity} = snmpm_config:system_info(net_if_verbosity),
- put(sname,mnif),
- put(verbosity,Verbosity),
+ put(sname, mnif),
+ put(verbosity, Verbosity),
?vlog("starting", []),
%% -- MPD --
{ok, Vsns} = snmpm_config:system_info(versions),
MpdState = snmpm_mpd:init(Vsns),
+ ?vdebug("MpdState: ~w", [MpdState]),
%% -- Module dependent options --
{ok, Opts} = snmpm_config:system_info(net_if_options),
@@ -193,14 +265,6 @@ do_init(Server, NoteStore) ->
{ok, IRB} = snmpm_config:system_info(net_if_irb),
IrGcRef = irgc_start(IRB),
- %% -- Socket --
- SndBuf = get_opt(Opts, sndbuf, default),
- RecBuf = get_opt(Opts, recbuf, default),
- BindTo = get_opt(Opts, bind_to, false),
- NoReuse = get_opt(Opts, no_reuse, false),
- {ok, Port} = snmpm_config:system_info(port),
- {ok, Sock} = do_open_port(Port, SndBuf, RecBuf, BindTo, NoReuse),
-
%% Flow control --
FilterOpts = get_opt(Opts, filter, []),
FilterMod = create_filter(FilterOpts),
@@ -209,77 +273,107 @@ do_init(Server, NoteStore) ->
%% -- Audit trail log ---
{ok, ATL} = snmpm_config:system_info(audit_trail_log),
Log = do_init_log(ATL),
+ ?vdebug("Log: ~w", [Log]),
+
+ {ok, DomainAddresses} = snmpm_config:system_info(transports),
+ ?vdebug("DomainAddresses: ~w",[DomainAddresses]),
+ CommonSocketOpts = common_socket_opts(Opts),
+ BindTo = get_opt(Opts, bind_to, false),
+ case
+ [begin
+ {IpPort, SocketOpts} =
+ socket_params(Domain, Address, BindTo, CommonSocketOpts),
+ Socket = socket_open(IpPort, SocketOpts),
+ #transport{socket = Socket, domain = Domain}
+ end || {Domain, Address} <- DomainAddresses]
+ of
+ [] ->
+ ?vinfo("No transports configured: ~p", [DomainAddresses]),
+ throw({error, {no_transports,DomainAddresses}});
+ Transports ->
+ %% -- Initiate counters ---
+ init_counters(),
+
+ %% -- We are done ---
+ State = #state{
+ server = Server,
+ note_store = NoteStore,
+ mpd_state = MpdState,
+ transports = Transports,
+ log = Log,
+ irb = IRB,
+ irgc = IrGcRef,
+ filter = FilterMod},
+ ?vdebug("started", []),
+ {ok, State}
+ end.
- %% -- Initiate counters ---
- init_counters(),
-
- %% -- We are done ---
- State = #state{server = Server,
- note_store = NoteStore,
- mpd_state = MpdState,
- sock = Sock,
- log = Log,
- irb = IRB,
- irgc = IrGcRef,
- filter = FilterMod},
- ?vdebug("started", []),
- {ok, State}.
-
-
-%% Open port
-do_open_port(Port, SendSz, RecvSz, BindTo, NoReuse) ->
- ?vtrace("do_open_port -> entry with"
- "~n Port: ~p"
- "~n SendSz: ~p"
- "~n RecvSz: ~p"
- "~n BindTo: ~p"
- "~n NoReuse: ~p", [Port, SendSz, RecvSz, BindTo, NoReuse]),
- IpOpts1 = bind_to(BindTo),
- IpOpts2 = no_reuse(NoReuse),
- IpOpts3 = recbuf(RecvSz),
- IpOpts4 = sndbuf(SendSz),
- IpOpts = [binary | IpOpts1 ++ IpOpts2 ++ IpOpts3 ++ IpOpts4],
- OpenRes =
- case init:get_argument(snmpm_fd) of
- {ok, [[FdStr]]} ->
- Fd = list_to_integer(FdStr),
- gen_udp:open(0, [{fd, Fd}|IpOpts]);
- error ->
- gen_udp:open(Port, IpOpts)
- end,
- case OpenRes of
+socket_open(IpPort, SocketOpts) ->
+ ?vtrace("socket_open -> entry with~n"
+ " IpPort: ~p~n"
+ " SocketOpts: ~p", [IpPort, SocketOpts]),
+ case gen_udp:open(IpPort, SocketOpts) of
{error, _} = Error ->
throw(Error);
- OK ->
- OK
+ {ok, Socket} ->
+ Socket
end.
-bind_to(true) ->
- case snmpm_config:system_info(address) of
- {ok, Addr} when is_list(Addr) ->
- [{ip, list_to_tuple(Addr)}];
- {ok, Addr} ->
- [{ip, Addr}];
+socket_params(Domain, {IpAddr, IpPort} = Addr, BindTo, CommonSocketOpts) ->
+ Family = snmp_conf:tdomain_to_family(Domain),
+ SocketOpts =
+ case Family of
+ inet6 ->
+ [Family, {ipv6_v6only, true} | CommonSocketOpts];
+ Family ->
+ [Family | CommonSocketOpts]
+ end,
+ case Family of
+ inet ->
+ case init:get_argument(snmpm_fd) of
+ {ok, [[FdStr]]} ->
+ Fd = list_to_integer(FdStr),
+ case BindTo of
+ true ->
+ {IpPort, [{ip, IpAddr}, {fd, Fd} | SocketOpts]};
+ _ ->
+ {0, [{fd, Fd} | SocketOpts]}
+ end;
+ error ->
+ socket_params(SocketOpts, Addr, BindTo)
+ end;
_ ->
- []
- end;
-bind_to(_) ->
- [].
-
-no_reuse(false) ->
- [{reuseaddr, true}];
-no_reuse(_) ->
- [].
-
-recbuf(default) ->
- [];
-recbuf(Sz) ->
- [{recbuf, Sz}].
+ socket_params(SocketOpts, Addr, BindTo)
+ end.
+%%
+socket_params(SocketOpts, {IpAddr, IpPort}, BindTo) ->
+ case BindTo of
+ true ->
+ {IpPort, [{ip, IpAddr} | SocketOpts]};
+ _ ->
+ {IpPort, SocketOpts}
+ end.
-sndbuf(default) ->
- [];
-sndbuf(Sz) ->
- [{sndbuf, Sz}].
+common_socket_opts(Opts) ->
+ [binary
+ | case get_opt(Opts, sndbuf, default) of
+ default ->
+ [];
+ Sz ->
+ [{sndbuf, Sz}]
+ end ++
+ case get_opt(Opts, recbuf, default) of
+ default ->
+ [];
+ Sz ->
+ [{sndbuf, Sz}]
+ end ++
+ case get_opt(Opts, no_reuse, false) of
+ false ->
+ [{reuseaddr, true}];
+ _ ->
+ []
+ end].
create_filter(Opts) when is_list(Opts) ->
@@ -294,6 +388,10 @@ create_filter(BadOpts) ->
throw({error, {bad_filter_opts, BadOpts}}).
+%% ----------------------------------------------------------------------
+%% Audit Trail Logger
+%% ----------------------------------------------------------------------
+
%% Open log
do_init_log(false) ->
?vtrace("do_init_log(false) -> entry", []),
@@ -314,24 +412,69 @@ do_init_log(true) ->
Function = increment_counter,
Args = [atl_seqno, Initial, Max],
SeqNoGen = {Module, Function, Args},
- case snmp_log:create(Name, File,
- SeqNoGen, Size, Repair, true) of
+ case snmp_log:create(
+ Name, File, SeqNoGen, Size, Repair, true) of
{ok, Log} ->
?vdebug("log created: ~w", [Log]),
- {Log, Type};
+ {Name, Log, Type};
{error, Reason} ->
throw({error, {failed_create_audit_log, Reason}})
end;
_ ->
case snmp_log:create(Name, File, Size, Repair, true) of
{ok, Log} ->
- {Log, Type};
+ ?vdebug("log created: ~w", [Log]),
+ {Name, Log, Type};
{error, Reason} ->
throw({error, {failed_create_audit_log, Reason}})
end
end.
-
+-ifdef(snmpm_net_if_mt).
+do_reopen_log(undefined) ->
+ undefined;
+do_reopen_log({Name, Log, Type}) ->
+ case snmp_log:open(Name, Log) of
+ {ok, NewLog} ->
+ {Name, NewLog, Type};
+ {error, Reason} ->
+ warning_msg(
+ "NetIf worker ~p failed to open ATL:~n"
+ " ~p", [self(), Reason]),
+ undefined
+ end.
+-endif.
+
+%% Close log
+do_close_log(undefined) ->
+ ok;
+do_close_log({_Name, Log, _Type}) ->
+ (catch snmp_log:sync(Log)),
+ (catch snmp_log:close(Log)),
+ ok;
+do_close_log(_) ->
+ ok.
+
+%% Log
+logger(undefined, _Type, _Domain, _Addr) ->
+ fun(_) ->
+ ok
+ end;
+logger({_Name, Log, Types}, Type, Domain, Addr) ->
+ case lists:member(Type, Types) of
+ true ->
+ AddrString =
+ iolist_to_binary(snmp_conf:mk_addr_string({Domain, Addr})),
+ fun(Msg) ->
+ snmp_log:log(Log, Msg, AddrString)
+ end;
+ false ->
+ fun(_) ->
+ ok
+ end
+ end.
+
+
%%--------------------------------------------------------------------
%% Func: handle_call/3
%% Returns: {reply, Reply, State} |
@@ -386,25 +529,24 @@ handle_call(Req, From, State) ->
%% {noreply, State, Timeout} |
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_cast({send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo},
+handle_cast({send_pdu, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo},
State) ->
- ?vlog("received send_pdu message with"
- "~n Pdu: ~p"
- "~n Vsn: ~p"
- "~n MsgData: ~p"
- "~n Domain: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Pdu, Vsn, MsgData, Domain, Addr, Port]),
- maybe_process_extra_info(ExtraInfo),
- maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State),
+ ?vlog("received send_pdu message with~n"
+ " Pdu: ~p~n"
+ " Vsn: ~p~n"
+ " MsgData: ~p~n"
+ " Domain: ~p~n"
+ " Addr: ~p", [Pdu, Vsn, MsgData, Domain, Addr]),
+ maybe_process_extra_info(ExtraInfo),
+ maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, State),
{noreply, State};
-handle_cast({inform_response, Ref, Addr, Port}, State) ->
- ?vlog("received inform_response message with"
- "~n Ref: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Ref, Addr, Port]),
- handle_inform_response(Ref, Addr, Port, State),
+handle_cast({inform_response, Ref, Domain, Addr}, State) ->
+ ?vlog("received inform_response message with~n"
+ " Ref: ~p~n"
+ " Domain: ~p~n"
+ " Addr: ~p", [Ref, Domain, Addr]),
+ handle_inform_response(Ref, Domain, Addr, State),
{noreply, State};
handle_cast(filter_reset, State) ->
@@ -423,10 +565,21 @@ handle_cast(Msg, State) ->
%% {noreply, State, Timeout} |
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_info({udp, Sock, Ip, Port, Bytes}, #state{sock = Sock} = State) ->
- ?vlog("received ~w bytes from ~p:~p [~w]", [size(Bytes), Ip, Port, Sock]),
- maybe_handle_recv_msg(Ip, Port, Bytes, State),
- {noreply, State};
+handle_info(
+ {udp, Socket, IpAddr, IpPort, Bytes},
+ #state{transports = Transports} = State) ->
+ Size = byte_size(Bytes),
+ case lists:keyfind(Socket, #transport.socket, Transports) of
+ #transport{socket = Socket, domain = Domain} ->
+ ?vlog("received ~w bytes from ~p:~p [~w]",
+ [Size, IpAddr, IpPort, Socket]),
+ maybe_handle_recv_msg(Domain, {IpAddr, IpPort}, Bytes, State),
+ {noreply, State};
+ false ->
+ warning_msg("Received ~w bytes on unknown port: ~p from ~s",
+ [Size, Socket, format_address({IpAddr, IpPort})]),
+ {noreply, State}
+ end;
handle_info(inform_response_gc, State) ->
?vlog("received inform_response_gc message", []),
@@ -439,11 +592,42 @@ handle_info({disk_log, _Node, Log, Info}, State) ->
State2 = handle_disk_log(Log, Info, State),
{noreply, State2};
+handle_info({'DOWN', _, _, _, _} = Info, State) ->
+ handle_info_down(Info, State);
+
handle_info(Info, State) ->
+ handle_info_unknown(Info, State).
+
+
+handle_info_unknown(Info, State) ->
warning_msg("received unknown info: ~n~p", [Info]),
{noreply, State}.
+-ifdef(snmpm_net_if_mt).
+handle_info_down(
+ {'DOWN', _MRef, process, _Pid,
+ {net_if_worker, _Result}},
+ State) ->
+ ?vdebug("received DOWN message from net_if worker [~w]: "
+ "~n Result: ~p", [_Pid, _Result]),
+ {noreply, State};
+handle_info_down(
+ {'DOWN', _MRef, process, Pid,
+ {net_if_worker, Failer, Class, Reason, Stacktrace} = _ExitStatus},
+ State) ->
+ ?vdebug("received DOWN message from net_if worker [~w]: "
+ "~n ExitStatus: ~p", [Pid, _ExitStatus]),
+ Failer(Pid, Class, Reason, Stacktrace),
+ {noreply, State};
+handle_info_down(Info, State) ->
+ handle_info_unknown(Info, State).
+-else.
+handle_info_down(Info, State) ->
+ handle_info_unknown(Info, State).
+-endif.
+
+
%%--------------------------------------------------------------------
%% Func: terminate/2
%% Purpose: Shutdown the server
@@ -457,68 +641,12 @@ terminate(Reason, #state{log = Log, irgc = IrGcRef}) ->
ok.
-do_close_log({Log, _Type}) ->
- (catch snmp_log:sync(Log)),
- (catch snmp_log:close(Log)),
- ok;
-do_close_log(_) ->
- ok.
-
-
%%----------------------------------------------------------------------
%% Func: code_change/3
%% Purpose: Convert process state when code is changed
%% Returns: {ok, NewState}
%%----------------------------------------------------------------------
-code_change({down, _Vsn}, OldState, downgrade_to_pre_4_14) ->
- ?d("code_change(down, downgrade_to_pre_4_14) -> entry with"
- "~n OldState: ~p", [OldState]),
- #state{server = Server,
- note_store = NoteStore,
- sock = Sock,
- mpd_state = MpdState,
- log = {OldLog, Type},
- irb = IRB,
- irgc = IRGC} = OldState,
- NewLog = snmp_log:downgrade(OldLog),
- State =
- {state, Server, NoteStore, Sock, MpdState, {NewLog, Type}, IRB, IRGC},
- {ok, State};
-
-code_change({down, _Vsn}, OldState, downgrade_to_pre_4_16) ->
- ?d("code_change(down, downgrade_to_pre_4_16) -> entry with"
- "~n OldState: ~p", [OldState]),
- {OldLog, Type} = OldState#state.log,
- NewLog = snmp_log:downgrade(OldLog),
- State = OldState#state{log = {NewLog, Type}},
- {ok, State};
-
-% upgrade
-code_change(_Vsn, OldState, upgrade_from_pre_4_14) ->
- ?d("code_change(up, upgrade_from_pre_4_14) -> entry with"
- "~n OldState: ~p", [OldState]),
- {state, Server, NoteStore, Sock, MpdState, {OldLog, Type}, IRB, IRGC} =
- OldState,
- NewLog = snmp_log:upgrade(OldLog),
- State = #state{server = Server,
- note_store = NoteStore,
- sock = Sock,
- mpd_state = MpdState,
- log = {NewLog, Type},
- irb = IRB,
- irgc = IRGC,
- filter = ?DEFAULT_FILTER_MODULE},
- {ok, State};
-
-code_change(_Vsn, OldState, upgrade_from_pre_4_16) ->
- ?d("code_change(up, upgrade_from_pre_4_16) -> entry with"
- "~n OldState: ~p", [OldState]),
- {OldLog, Type} = OldState#state.log,
- NewLog = snmp_log:upgrade(OldLog),
- State = OldState#state{log = {NewLog, Type}},
- {ok, State};
-
code_change(_Vsn, State, _Extra) ->
?d("code_change -> entry with"
"~n Vsn: ~p"
@@ -531,139 +659,155 @@ code_change(_Vsn, State, _Extra) ->
%%% Internal functions
%%%-------------------------------------------------------------------
-maybe_handle_recv_msg(Addr, Port, Bytes, #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_recv(Addr, Port)) of
+maybe_handle_recv_msg(Domain, Addr, Bytes, State) ->
+ ?worker(
+ S, maybe_handle_recv_msg_mt(Domain, Addr, Bytes, S),
+ fun (Pid, Class, Reason, Stacktrace) ->
+ warning_msg(
+ "Worker process (~p) terminated "
+ "while processing (incomming) message from %s:~n"
+ "~w:~w at ~p",
+ [Pid, snmp_conf:mk_addr_string({Domain, Addr}),
+ Class, Reason, Stacktrace])
+ end,
+ State).
+
+maybe_handle_recv_msg_mt(
+ Domain, Addr, Bytes,
+ #state{filter = FilterMod, transports = Transports} = State) ->
+ {Arg1, Arg2} = fix_filter_address(Transports, {Domain, Addr}),
+ case (catch FilterMod:accept_recv(Arg1, Arg2)) of
false ->
%% Drop the received packet
- inc(netIfMsgInDrops),
- ok;
+ inc(netIfMsgInDrops);
_ ->
- handle_recv_msg(Addr, Port, Bytes, State)
- end.
+ handle_recv_msg(Domain, Addr, Bytes, State)
+ end,
+ ok.
-handle_recv_msg(Addr, Port, Bytes, #state{server = Pid})
+handle_recv_msg(Domain, Addr, Bytes, #state{server = Pid})
when is_binary(Bytes) andalso (size(Bytes) =:= 0) ->
- Pid ! {snmp_error, {empty_message, Addr, Port}, Addr, Port},
- ok;
-
-handle_recv_msg(Addr, Port, Bytes,
- #state{server = Pid,
- note_store = NoteStore,
- mpd_state = MpdState,
- sock = Sock,
- log = Log} = State) ->
- Domain = snmp_conf:which_domain(Addr), % What the ****...
- Logger = logger(Log, read, Addr, Port),
- case (catch snmpm_mpd:process_msg(Bytes, Domain, Addr, Port,
- MpdState, NoteStore, Logger)) of
+ Pid ! {snmp_error, {empty_message, Domain, Addr}, Domain, Addr};
+%%
+handle_recv_msg(
+ Domain, Addr, Bytes,
+ #state{
+ server = Pid,
+ note_store = NoteStore,
+ mpd_state = MpdState,
+ log = Log} = State) ->
+ Logger = logger(Log, read, Domain, Addr),
+ case (catch snmpm_mpd:process_msg(
+ Bytes, Domain, Addr, MpdState, NoteStore, Logger)) of
{ok, Vsn, Pdu, MS, ACM} ->
- maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, MS, ACM,
- Logger, State);
+ maybe_handle_recv_pdu(
+ Domain, Addr, Vsn, Pdu, MS, ACM, Logger, State);
{discarded, Reason, Report} ->
?vdebug("discarded: ~p", [Reason]),
ErrorInfo = {failed_processing_message, Reason},
- Pid ! {snmp_error, ErrorInfo, Addr, Port},
- maybe_udp_send(State#state.filter, Sock, Addr, Port, Report),
- ok;
+ Pid ! {snmp_error, ErrorInfo, Domain, Addr},
+ maybe_udp_send(Domain, Addr, Report, State);
{discarded, Reason} ->
?vdebug("discarded: ~p", [Reason]),
ErrorInfo = {failed_processing_message, Reason},
- Pid ! {snmp_error, ErrorInfo, Addr, Port},
- ok;
+ Pid ! {snmp_error, ErrorInfo, Domain, Addr};
Error ->
error_msg("processing of received message failed: "
- "~n ~p", [Error]),
- ok
+ "~n ~p", [Error])
end.
-maybe_handle_recv_pdu(Addr, Port,
- Vsn, #pdu{type = Type} = Pdu, PduMS, ACM,
- Logger,
- #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_recv_pdu(Addr, Port, Type)) of
+maybe_handle_recv_pdu(
+ Domain, Addr, Vsn, #pdu{type = Type} = Pdu, PduMS, ACM, Logger,
+ #state{filter = FilterMod, transports = Transports} = State) ->
+ {Arg1, Arg2} = fix_filter_address(Transports, {Domain, Addr}),
+ case (catch FilterMod:accept_recv_pdu(Arg1, Arg2, Type)) of
false ->
- inc(netIfPduInDrops),
- ok;
+ inc(netIfPduInDrops);
_ ->
- handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State)
+ handle_recv_pdu(
+ Domain, Addr, Vsn, Pdu, PduMS, ACM, Logger, State)
end;
-maybe_handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger,
- #state{filter = FilterMod} = State)
+maybe_handle_recv_pdu(
+ Domain, Addr, Vsn, Trap, PduMS, ACM, Logger,
+ #state{filter = FilterMod, transports = Transports} = State)
when is_record(Trap, trappdu) ->
- case (catch FilterMod:accept_recv_pdu(Addr, Port, trappdu)) of
+ {Arg1, Arg2} = fix_filter_address(Transports, {Domain, Addr}),
+ case (catch FilterMod:accept_recv_pdu(Arg1, Arg2, trappdu)) of
false ->
- inc(netIfPduInDrops),
- ok;
+ inc(netIfPduInDrops);
_ ->
- handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger, State)
+ handle_recv_pdu(
+ Domain, Addr, Vsn, Trap, PduMS, ACM, Logger, State)
end;
-maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State) ->
- handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State).
-
-
-handle_recv_pdu(Addr, Port,
- Vsn, #pdu{type = 'inform-request'} = Pdu, _PduMS, ACM,
- Logger, #state{server = Pid, irb = IRB} = State) ->
- handle_inform_request(IRB, Pid, Vsn, Pdu, ACM,
- Addr, Port, Logger, State);
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = report} = Pdu, _PduMS, ok,
- _Logger,
- #state{server = Pid} = _State) ->
+maybe_handle_recv_pdu(
+ Domain, Addr, Vsn, Pdu, PduMS, ACM, Logger, State) ->
+ handle_recv_pdu(Domain, Addr, Vsn, Pdu, PduMS, ACM, Logger, State).
+
+
+handle_recv_pdu(
+ Domain, Addr, Vsn,
+ #pdu{type = 'inform-request'} = Pdu, _PduMS, ACM, Logger,
+ #state{server = Pid, irb = IRB} = State) ->
+ handle_inform_request(
+ IRB, Pid, Vsn, Pdu, ACM, Domain, Addr, Logger, State);
+handle_recv_pdu(
+ Domain, Addr, _Vsn,
+ #pdu{type = report} = Pdu, _PduMS, ok, _Logger,
+ #state{server = Pid} = _State) ->
?vtrace("received report - ok", []),
- Pid ! {snmp_report, {ok, Pdu}, Addr, Port};
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = report} = Pdu, _PduMS,
- {error, ReqId, Reason},
- _Logger,
- #state{server = Pid} = _State) ->
+ Pid ! {snmp_report, {ok, Pdu}, Domain, Addr};
+handle_recv_pdu(
+ Domain, Addr, _Vsn,
+ #pdu{type = report} = Pdu, _PduMS, {error, ReqId, Reason}, _Logger,
+ #state{server = Pid} = _State) ->
?vtrace("received report - error", []),
- Pid ! {snmp_report, {error, ReqId, Reason, Pdu}, Addr, Port};
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = 'snmpv2-trap'} = Pdu, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) ->
+ Pid ! {snmp_report, {error, ReqId, Reason, Pdu}, Domain, Addr};
+handle_recv_pdu(
+ Domain, Addr, _Vsn,
+ #pdu{type = 'snmpv2-trap'} = Pdu, _PduMS, _ACM, _Logger,
+ #state{server = Pid} = _State) ->
?vtrace("received snmpv2-trap", []),
- Pid ! {snmp_trap, Pdu, Addr, Port};
-handle_recv_pdu(Addr, Port,
- _Vsn, Trap, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) when is_record(Trap, trappdu) ->
+ Pid ! {snmp_trap, Pdu, Domain, Addr};
+handle_recv_pdu(
+ Domain, Addr, _Vsn, Trap, _PduMS, _ACM, _Logger,
+ #state{server = Pid} = _State) when is_record(Trap, trappdu) ->
?vtrace("received trappdu", []),
- Pid ! {snmp_trap, Trap, Addr, Port};
-handle_recv_pdu(Addr, Port,
- _Vsn, Pdu, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) when is_record(Pdu, pdu) ->
+ Pid ! {snmp_trap, Trap, Domain, Addr};
+handle_recv_pdu(
+ Domain, Addr, _Vsn, Pdu, _PduMS, _ACM, _Logger,
+ #state{server = Pid} = _State) when is_record(Pdu, pdu) ->
?vtrace("received pdu", []),
- Pid ! {snmp_pdu, Pdu, Addr, Port};
-handle_recv_pdu(_Addr, _Port, _Vsn, Pdu, _PduMS, ACM, _Logger, _State) ->
+ Pid ! {snmp_pdu, Pdu, Domain, Addr};
+handle_recv_pdu(
+ _Domain, _Addr, _Vsn, Pdu, _PduMS, ACM, _Logger, _State) ->
?vlog("received unexpected pdu: "
- "~n Pdu: ~p"
- "~n ACM: ~p", [Pdu, ACM]).
+ "~n Pdu: ~p"
+ "~n ACM: ~p", [Pdu, ACM]).
-handle_inform_request(auto, Pid, Vsn, Pdu, ACM, Addr, Port, Logger, State) ->
+handle_inform_request(
+ auto, Pid, Vsn, Pdu, ACM, Domain, Addr, Logger, State) ->
?vtrace("received inform-request (true)", []),
- Pid ! {snmp_inform, ignore, Pdu, Addr, Port},
+ Pid ! {snmp_inform, ignore, Pdu, Domain, Addr},
RePdu = make_response_pdu(Pdu),
- maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger, State);
-handle_inform_request({user, To}, Pid, Vsn, #pdu{request_id = ReqId} = Pdu,
- ACM, Addr, Port, _Logger, _State) ->
+ maybe_send_inform_response(RePdu, Vsn, ACM, Domain, Addr, Logger, State);
+handle_inform_request(
+ {user, To}, Pid, Vsn, #pdu{request_id = ReqId} = Pdu,
+ ACM, Domain, Addr, _Logger, _State) ->
?vtrace("received inform-request (false)", []),
- Pid ! {snmp_inform, ReqId, Pdu, Addr, Port},
+ Pid ! {snmp_inform, ReqId, Pdu, Domain, Addr},
%% Before we go any further, we need to check that we have not
%% already received this message (possible resend).
- Key = {ReqId, Addr, Port},
+ Key = {ReqId, Domain, Addr},
case ets:lookup(snmpm_inform_request_table, Key) of
[_] ->
%% OK, we already know about this. We assume this
@@ -676,40 +820,57 @@ handle_inform_request({user, To}, Pid, Vsn, #pdu{request_id = ReqId} = Pdu,
Rec = {Key, Expire, {Vsn, ACM, RePdu}},
ets:insert(snmpm_inform_request_table, Rec)
end.
-
-handle_inform_response(Ref, Addr, Port, State) ->
- Key = {Ref, Addr, Port},
+
+handle_inform_response(Ref, Domain, Addr, State) ->
+ ?worker(
+ S, handle_inform_response_mt(Ref, Domain, Addr, S),
+ fun (Pid, Class, Reason, Stacktrace) ->
+ warning_msg(
+ "Worker process (~p) terminated "
+ "while processing (outgoing) inform response for %s:~n"
+ "~w:~w at ~p",
+ [Pid, snmp_conf:mk_addr_string({Domain, Addr}),
+ Class, Reason, Stacktrace])
+ end,
+ State).
+
+handle_inform_response_mt(Ref, Domain, Addr, State) ->
+ Key = {Ref, Domain, Addr},
case ets:lookup(snmpm_inform_request_table, Key) of
[{Key, _, {Vsn, ACM, RePdu}}] ->
- Logger = logger(State#state.log, read, Addr, Port),
+ Logger = logger(State#state.log, read, Domain, Addr),
ets:delete(snmpm_inform_request_table, Key),
- maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port,
- Logger, State);
+ maybe_send_inform_response(
+ RePdu, Vsn, ACM, Domain, Addr, Logger, State);
[] ->
%% Already acknowledged, or the user was to slow to reply...
ok
end,
ok.
-maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger,
- #state{server = Pid,
- sock = Sock,
- filter = FilterMod}) ->
- case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(RePdu))) of
+maybe_send_inform_response(
+ RePdu, Vsn, ACM, Domain, Addr, Logger,
+ #state{
+ server = Pid,
+ filter = FilterMod,
+ transports = Transports} = State) ->
+ {Arg1, Arg2} = fix_filter_address(Transports, {Domain, Addr}),
+ case (catch FilterMod:accept_send_pdu(
+ Arg1, Arg2, pdu_type_of(RePdu)))
+ of
false ->
inc(netIfPduOutDrops),
ok;
_ ->
case snmpm_mpd:generate_response_msg(Vsn, RePdu, ACM, Logger) of
{ok, Msg} ->
- maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
+ maybe_udp_send(Domain, Addr, Msg, State);
{discarded, Reason} ->
?vlog("failed generating response message:"
"~n Reason: ~p", [Reason]),
ReqId = RePdu#pdu.request_id,
ErrorInfo = {failed_generating_response, {RePdu, Reason}},
- Pid ! {snmp_error, ReqId, ErrorInfo, Addr, Port},
- ok
+ Pid ! {snmp_error, ReqId, ErrorInfo, Domain, Addr}
end
end.
@@ -742,64 +903,99 @@ irgc_stop(undefined) ->
irgc_stop(Ref) ->
(catch erlang:cancel_timer(Ref)).
-
-maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port,
- #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(Pdu))) of
+maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, State) ->
+ ?worker(
+ S, maybe_handle_send_pdu_mt(Pdu, Vsn, MsgData, Domain, Addr, S),
+ fun (Pid, Class, Reason, Stacktrace) ->
+ warning_msg(
+ "Worker process (~p) terminated "
+ "while processing (outgoing) pdu for %s:~n"
+ "~w:~w at ~p",
+ [Pid, snmp_conf:mk_addr_string({Domain, Addr}),
+ Class, Reason, Stacktrace])
+ end,
+ State).
+
+maybe_handle_send_pdu_mt(
+ Pdu, Vsn, MsgData, Domain, Addr,
+ #state{filter = FilterMod, transports = Transports} = State) ->
+ {Arg1, Arg2} = fix_filter_address(Transports, {Domain, Addr}),
+ case (catch FilterMod:accept_send_pdu(Arg1, Arg2, pdu_type_of(Pdu))) of
false ->
- inc(netIfPduOutDrops),
- ok;
+ inc(netIfPduOutDrops);
_ ->
- handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State)
- end.
+ handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, State)
+ end,
+ ok.
-handle_send_pdu(Pdu, Vsn, MsgData, _Domain, Addr, Port,
- #state{server = Pid,
- note_store = NoteStore,
- sock = Sock,
- log = Log,
- filter = FilterMod}) ->
- Logger = logger(Log, write, Addr, Port),
- case (catch snmpm_mpd:generate_msg(Vsn, NoteStore,
- Pdu, MsgData, Logger)) of
+handle_send_pdu(
+ Pdu, Vsn, MsgData, Domain, Addr,
+ #state{
+ server = Pid,
+ note_store = NoteStore,
+ log = Log} = State) ->
+ Logger = logger(Log, write, Domain, Addr),
+ case (catch snmpm_mpd:generate_msg(
+ Vsn, NoteStore, Pdu, MsgData, Logger)) of
{ok, Msg} ->
?vtrace("handle_send_pdu -> message generated", []),
- maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
+ maybe_udp_send(Domain, Addr, Msg, State);
{discarded, Reason} ->
?vlog("PDU not sent: "
"~n PDU: ~p"
"~n Reason: ~p", [Pdu, Reason]),
- Pid ! {snmp_error, Pdu, Reason},
- ok
+ Pid ! {snmp_error, Pdu, Reason}
end.
-maybe_udp_send(FilterMod, Sock, Addr, Port, Msg) ->
- case (catch FilterMod:accept_send(Addr, Port)) of
+maybe_udp_send(
+ Domain, Addr, Msg,
+ #state{filter = FilterMod, transports = Transports}) ->
+ To = {Domain, Addr},
+ {Arg1, Arg2} = fix_filter_address(Transports, To),
+ case (catch FilterMod:accept_send(Arg1, Arg2)) of
false ->
inc(netIfMsgOutDrops),
ok;
_ ->
- udp_send(Sock, Addr, Port, Msg)
+ case select_transport_from_domain(Domain, Transports) of
+ false ->
+ error_msg(
+ "Can not find transport~n"
+ " size: ~p~n"
+ " to: ~s",
+ [sz(Msg), format_address(To)]);
+ #transport{socket = Socket} ->
+ udp_send(Socket, Addr, Msg)
+ end
end.
-
-
-udp_send(Sock, Addr, Port, Msg) ->
- case (catch gen_udp:send(Sock, Addr, Port, Msg)) of
+
+udp_send(Sock, To, Msg) ->
+ {IpAddr, IpPort} =
+ case To of
+ {Domain, Addr} when is_atom(Domain) ->
+ Addr;
+ {_, P} = Addr when is_integer(P) ->
+ Addr
+ end,
+ try gen_udp:send(Sock, IpAddr, IpPort, Msg) of
ok ->
?vdebug("sent ~w bytes to ~w:~w [~w]",
- [sz(Msg), Addr, Port, Sock]),
+ [sz(Msg), IpAddr, IpPort, Sock]),
ok;
{error, Reason} ->
- error_msg("failed sending message to ~p:~p: "
- "~n ~p",[Addr, Port, Reason]);
- Error ->
- error_msg("failed sending message to ~p:~p: "
- "~n ~p",[Addr, Port, Error])
+ error_msg("failed sending message to ~p:~p:~n"
+ " ~p",[IpAddr, IpPort, Reason])
+ catch
+ error:Error ->
+ error_msg("failed sending message to ~p:~p:~n"
+ " error:~p~n"
+ " ~p",
+ [IpAddr, IpPort, Error, erlang:get_stacktrace()])
end.
sz(B) when is_binary(B) ->
- size(B);
+ byte_size(B);
sz(L) when is_list(L) ->
length(L);
sz(_) ->
@@ -989,6 +1185,45 @@ handle_set_log_type(State, _NewType) ->
{State, {error, not_enabled}}.
+select_transport_from_domain(Domain, Transports) when is_atom(Domain) ->
+ Pos = #transport.domain,
+ case lists:keyfind(Domain, Pos, Transports) of
+ #transport{domain = Domain} = Transport ->
+ Transport;
+ false when Domain == snmpUDPDomain ->
+ lists:keyfind(transportDomainUdpIpv4, Pos, Transports);
+ false when Domain == transportDomainUdpIpv4 ->
+ lists:keyfind(snmpUDPDomain, Pos, Transports);
+ false ->
+ false
+ end.
+
+%% If the manager uses legacy snmpUDPDomain e.g has not set
+%% {domain, _}, then make sure snmpm_network_interface_filter
+%% gets legacy arguments to not break backwards compatibility.
+%%
+fix_filter_address(Transports, Address) ->
+ DefaultDomain = snmpm_config:default_transport_domain(),
+ case Transports of
+ [#transport{domain = DefaultDomain}, DefaultDomain] ->
+ case Address of
+ {Domain, Addr} when is_atom(Domain) ->
+ Addr;
+ {_, IpPort} = Addr when is_integer(IpPort) ->
+ Addr
+ end;
+ _ ->
+ Address
+ end.
+
+address(Domain, Addr) when is_atom(Domain) ->
+ {Domain, Addr};
+address(Ip, Port) when is_integer(Port) ->
+ {snmpm_config:default_transport_domain(), {Ip, Port}}.
+
+format_address(Address) ->
+ iolist_to_binary(snmp_conf:mk_addr_string(Address)).
+
%% -------------------------------------------------------------------
make_response_pdu(#pdu{request_id = ReqId, varbinds = Vbs}) ->
@@ -1029,25 +1264,6 @@ t() ->
%% -------------------------------------------------------------------
-logger(undefined, _Type, _Addr, _Port) ->
- fun(_) ->
- ok
- end;
-logger({Log, Types}, Type, Addr, Port) ->
- case lists:member(Type, Types) of
- true ->
- fun(Msg) ->
- snmp_log:log(Log, Msg, Addr, Port)
- end;
- false ->
- fun(_) ->
- ok
- end
- end.
-
-
-%% -------------------------------------------------------------------
-
%% info_msg(F, A) ->
%% ?snmpm_info("NET-IF server: " ++ F, A).
@@ -1072,10 +1288,11 @@ get_opt(Opts, Key, Def) ->
%% -------------------------------------------------------------------
-get_info(#state{sock = Id}) ->
+get_info(#state{transports = Transports}) ->
ProcSize = proc_mem(self()),
- PortInfo = get_port_info(Id),
- [{process_memory, ProcSize}, {port_info, PortInfo}].
+ [{process_memory, ProcSize}
+ | [{port_info, get_port_info(Socket)}
+ || #transport{socket = Socket} <- Transports]].
proc_mem(P) when is_pid(P) ->
case (catch erlang:process_info(P, memory)) of
@@ -1190,4 +1407,3 @@ call(Pid, Req, Timeout) ->
cast(Pid, Msg) ->
gen_server:cast(Pid, Msg).
-
diff --git a/lib/snmp/src/manager/snmpm_net_if_filter.erl b/lib/snmp/src/manager/snmpm_net_if_filter.erl
index eb0c6efb11..d96ae5c145 100644
--- a/lib/snmp/src/manager/snmpm_net_if_filter.erl
+++ b/lib/snmp/src/manager/snmpm_net_if_filter.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,29 +25,51 @@
-include("snmp_debug.hrl").
-accept_recv(_Addr, _Port) ->
- ?d("accept_recv -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p", [_Addr, _Port]),
+accept_recv(Domain, _Address) when is_atom(Domain) ->
+ ?d("accept_recv -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p", [Domain, _Address]),
+ true;
+accept_recv(_Addr, Port) when is_integer(Port) ->
+ ?d("accept_recv -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p", [_Addr, Port]),
true.
-accept_send(_Addr, _Port) ->
- ?d("accept_send -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p", [_Addr, _Port]),
+accept_send(Domain, _Address) when is_atom(Domain) ->
+ ?d("accept_send -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p", [Domain, _Address]),
+ true;
+accept_send(_Addr, Port) when is_integer(Port) ->
+ ?d("accept_send -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p", [_Addr, Port]),
true.
-accept_recv_pdu(_Addr, _Port, _PduType) ->
- ?d("accept_recv_pdu -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n PduType: ~p", [_Addr, _Port, _PduType]),
+accept_recv_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
+ ?d("accept_recv_pdu -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p~n"
+ " PduType: ~p", [Domain, _Address, _PduType]),
+ true;
+accept_recv_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
+ ?d("accept_recv_pdu -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p~n"
+ " PduType: ~p", [_Addr, Port, _PduType]),
true.
-accept_send_pdu(_Addr, _Port, _PduType) ->
- ?d("accept_send_pdu -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n PduType: ~p", [_Addr, _Port, _PduType]),
+accept_send_pdu(Domain, _Address, _PduType) when is_atom(Domain) ->
+ ?d("accept_send_pdu -> entry with~n"
+ " Domain: ~p~n"
+ " Address: ~p~n"
+ " PduType: ~p", [Domain, _Address, _PduType]),
+ true;
+accept_send_pdu(_Addr, Port, _PduType) when is_integer(Port) ->
+ ?d("accept_send_pdu -> entry with~n"
+ " Addr: ~p~n"
+ " Port: ~p~n"
+ " PduType: ~p", [_Addr, Port, _PduType]),
true.
diff --git a/lib/snmp/src/manager/snmpm_net_if_mt.erl b/lib/snmp/src/manager/snmpm_net_if_mt.erl
index 3e87f6a7fb..62f6023657 100644
--- a/lib/snmp/src/manager/snmpm_net_if_mt.erl
+++ b/lib/snmp/src/manager/snmpm_net_if_mt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,1243 +17,7 @@
%% %CopyrightEnd%
%%
--module(snmpm_net_if_mt).
-
--behaviour(gen_server).
--behaviour(snmpm_network_interface).
-
-
-%% Network Interface callback functions
--export([
- start_link/2,
- stop/1,
- send_pdu/6, % Backward compatibillity
- send_pdu/7, % Backward compatibillity
- send_pdu/8,
-
- inform_response/4,
-
- note_store/2,
-
- info/1,
- verbosity/2,
- %% system_info_updated/2,
- get_log_type/1, set_log_type/2,
- filter_reset/1
- ]).
-
-%% gen_server callbacks
--export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- code_change/3, terminate/2]).
-
--define(SNMP_USE_V3, true).
--include("snmp_types.hrl").
--include("snmpm_internal.hrl").
--include("snmpm_atl.hrl").
--include("snmp_debug.hrl").
-
-%% -define(VMODULE,"NET_IF").
--include("snmp_verbosity.hrl").
-
--record(state,
- {
- server,
- note_store,
- sock,
- mpd_state,
- log,
- irb = auto, % auto | {user, integer()}
- irgc,
- filter
- }).
-
-
--define(DEFAULT_FILTER_MODULE, snmpm_net_if_filter).
--define(DEFAULT_FILTER_OPTS, [{module, ?DEFAULT_FILTER_MODULE}]).
-
--ifdef(snmp_debug).
--define(GS_START_LINK(Args),
- gen_server:start_link(?MODULE, Args, [{debug,[trace]}])).
--else.
--define(GS_START_LINK(Args),
- gen_server:start_link(?MODULE, Args, [])).
--endif.
-
-
--define(IRGC_TIMEOUT, timer:minutes(5)).
-
--define(ATL_SEQNO_INITIAL, 1).
--define(ATL_SEQNO_MAX, 2147483647).
-
-
-%%%-------------------------------------------------------------------
-%%% API
-%%%-------------------------------------------------------------------
-start_link(Server, NoteStore) ->
- ?d("start_link -> entry with"
- "~n Server: ~p"
- "~n NoteStore: ~p", [Server, NoteStore]),
- Args = [Server, NoteStore],
- ?GS_START_LINK(Args).
-
-stop(Pid) ->
- call(Pid, stop).
-
-send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port) ->
- send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ?DEFAULT_EXTRA_INFO).
-
-send_pdu(Pid, Pdu, Vsn, MsgData, Addr, Port, ExtraInfo) ->
- Domain = snmpm_config:default_transport_domain(),
- send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo).
-
-send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo)
- when is_record(Pdu, pdu) ->
- ?d("send_pdu -> entry with"
- "~n Pid: ~p"
- "~n Pdu: ~p"
- "~n Vsn: ~p"
- "~n MsgData: ~p"
- "~n Domain: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Pid, Pdu, Vsn, MsgData, Domain, Addr, Port]),
- cast(Pid, {send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo}).
-
-note_store(Pid, NoteStore) ->
- call(Pid, {note_store, NoteStore}).
-
-inform_response(Pid, Ref, Addr, Port) ->
- cast(Pid, {inform_response, Ref, Addr, Port}).
-
-info(Pid) ->
- call(Pid, info).
-
-verbosity(Pid, V) ->
- call(Pid, {verbosity, V}).
-
-%% system_info_updated(Pid, What) ->
-%% call(Pid, {system_info_updated, What}).
-
-get_log_type(Pid) ->
- call(Pid, get_log_type).
-
-set_log_type(Pid, NewType) ->
- call(Pid, {set_log_type, NewType}).
-
-filter_reset(Pid) ->
- cast(Pid, filter_reset).
-
-
-%%%-------------------------------------------------------------------
-%%% Callback functions from gen_server
-%%%-------------------------------------------------------------------
-
-%%--------------------------------------------------------------------
-%% Func: init/1
-%% Returns: {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%%--------------------------------------------------------------------
-init([Server, NoteStore]) ->
- ?d("init -> entry with"
- "~n Server: ~p"
- "~n NoteStore: ~p", [Server, NoteStore]),
- case (catch do_init(Server, NoteStore)) of
- {error, Reason} ->
- {stop, Reason};
- {ok, State} ->
- {ok, State}
- end.
-
-do_init(Server, NoteStore) ->
- process_flag(trap_exit, true),
-
- %% -- Prio --
- {ok, Prio} = snmpm_config:system_info(prio),
- process_flag(priority, Prio),
-
- %% -- Create inform request table --
- %% This should really be protected, but it also needs to
- %% be writable for the worker processes, so...
- ets:new(snmpm_inform_request_table,
- [set, public, named_table, {keypos, 1}]),
-
- %% -- Verbosity --
- {ok, Verbosity} = snmpm_config:system_info(net_if_verbosity),
- put(sname, mnif),
- put(verbosity, Verbosity),
- ?vlog("starting", []),
-
- %% -- MPD --
- {ok, Vsns} = snmpm_config:system_info(versions),
- MpdState = snmpm_mpd:init(Vsns),
- ?vdebug("MpdState: ~w", [MpdState]),
-
- %% -- Module dependent options --
- {ok, Opts} = snmpm_config:system_info(net_if_options),
-
- %% -- Inform response behaviour --
- {ok, IRB} = snmpm_config:system_info(net_if_irb),
- IrGcRef = irgc_start(IRB),
-
- %% -- Socket --
- SndBuf = get_opt(Opts, sndbuf, default),
- RecBuf = get_opt(Opts, recbuf, default),
- BindTo = get_opt(Opts, bind_to, false),
- NoReuse = get_opt(Opts, no_reuse, false),
- {ok, Port} = snmpm_config:system_info(port),
- {ok, Sock} = do_open_port(Port, SndBuf, RecBuf, BindTo, NoReuse),
-
- %% Flow control --
- FilterOpts = get_opt(Opts, filter, []),
- FilterMod = create_filter(FilterOpts),
- ?vdebug("FilterMod: ~w", [FilterMod]),
-
- %% -- Audit trail log ---
- {ok, ATL} = snmpm_config:system_info(audit_trail_log),
- Log = do_init_log(ATL),
- ?vdebug("Log: ~w", [Log]),
-
- %% -- Initiate counters ---
- init_counters(),
-
- %% -- We are done ---
- State = #state{server = Server,
- note_store = NoteStore,
- mpd_state = MpdState,
- sock = Sock,
- log = Log,
- irb = IRB,
- irgc = IrGcRef,
- filter = FilterMod},
- ?vdebug("started", []),
- {ok, State}.
-
-
-%% Open port
-do_open_port(Port, SendSz, RecvSz, BindTo, NoReuse) ->
- ?vtrace("do_open_port -> entry with"
- "~n Port: ~p"
- "~n SendSz: ~p"
- "~n RecvSz: ~p"
- "~n BindTo: ~p"
- "~n NoReuse: ~p", [Port, SendSz, RecvSz, BindTo, NoReuse]),
- IpOpts1 = bind_to(BindTo),
- IpOpts2 = no_reuse(NoReuse),
- IpOpts3 = recbuf(RecvSz),
- IpOpts4 = sndbuf(SendSz),
- IpOpts = [binary | IpOpts1 ++ IpOpts2 ++ IpOpts3 ++ IpOpts4],
- OpenRes =
- case init:get_argument(snmpm_fd) of
- {ok, [[FdStr]]} ->
- Fd = list_to_integer(FdStr),
- gen_udp:open(0, [{fd, Fd}|IpOpts]);
- error ->
- gen_udp:open(Port, IpOpts)
- end,
- case OpenRes of
- {error, _} = Error ->
- throw(Error);
- OK ->
- OK
- end.
-
-bind_to(true) ->
- case snmpm_config:system_info(address) of
- {ok, Addr} when is_list(Addr) ->
- [{ip, list_to_tuple(Addr)}];
- {ok, Addr} ->
- [{ip, Addr}];
- _ ->
- []
- end;
-bind_to(_) ->
- [].
-
-no_reuse(false) ->
- [{reuseaddr, true}];
-no_reuse(_) ->
- [].
-
-recbuf(default) ->
- [];
-recbuf(Sz) ->
- [{recbuf, Sz}].
-
-sndbuf(default) ->
- [];
-sndbuf(Sz) ->
- [{sndbuf, Sz}].
-
-
-create_filter(Opts) when is_list(Opts) ->
- case get_opt(Opts, module, ?DEFAULT_FILTER_MODULE) of
- ?DEFAULT_FILTER_MODULE = Mod ->
- Mod;
- Module ->
- snmpm_network_interface_filter:verify(Module),
- Module
- end;
-create_filter(BadOpts) ->
- throw({error, {bad_filter_opts, BadOpts}}).
-
-
-%% ----------------------------------------------------------------------
-%% Audit Trail Logger
-%% ----------------------------------------------------------------------
-
-%% Open log
-do_init_log(false) ->
- ?vtrace("do_init_log(false) -> entry", []),
- undefined;
-do_init_log(true) ->
- ?vtrace("do_init_log(true) -> entry", []),
- {ok, Type} = snmpm_config:system_info(audit_trail_log_type),
- {ok, Dir} = snmpm_config:system_info(audit_trail_log_dir),
- {ok, Size} = snmpm_config:system_info(audit_trail_log_size),
- {ok, Repair} = snmpm_config:system_info(audit_trail_log_repair),
- Name = ?audit_trail_log_name,
- File = filename:absname(?audit_trail_log_file, Dir),
- case snmpm_config:system_info(audit_trail_log_seqno) of
- {ok, true} ->
- Initial = ?ATL_SEQNO_INITIAL,
- Max = ?ATL_SEQNO_MAX,
- Module = snmpm_config,
- Function = increment_counter,
- Args = [atl_seqno, Initial, Max],
- SeqNoGen = {Module, Function, Args},
- case snmp_log:create(Name, File, SeqNoGen, Size, Repair, true) of
- {ok, Log} ->
- ?vdebug("log created: ~w", [Log]),
- {Name, Log, Type};
- {error, Reason} ->
- throw({error, {failed_create_audit_log, Reason}})
- end;
- _ ->
- case snmp_log:create(Name, File, Size, Repair, true) of
- {ok, Log} ->
- ?vdebug("log created: ~w", [Log]),
- {Name, Log, Type};
- {error, Reason} ->
- throw({error, {failed_create_audit_log, Reason}})
- end
- end.
-
-
-%% ----------------------------------------------------------------------
-
-%%--------------------------------------------------------------------
-%% Func: handle_call/3
-%% Returns: {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} | (terminate/2 is called)
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_call({verbosity, Verbosity}, _From, State) ->
- ?vlog("received verbosity request", []),
- put(verbosity, Verbosity),
- {reply, ok, State};
-
-%% handle_call({system_info_updated, What}, _From, State) ->
-%% ?vlog("received system_info_updated request with What = ~p", [What]),
-%% {NewState, Reply} = handle_system_info_updated(State, What),
-%% {reply, Reply, NewState};
-
-handle_call(get_log_type, _From, State) ->
- ?vlog("received get-log-type request", []),
- Reply = (catch handle_get_log_type(State)),
- {reply, Reply, State};
-
-handle_call({set_log_type, NewType}, _From, State) ->
- ?vlog("received set-log-type request with NewType = ~p", [NewType]),
- {NewState, Reply} = (catch handle_set_log_type(State, NewType)),
- {reply, Reply, NewState};
-
-handle_call({note_store, Pid}, _From, State) ->
- ?vlog("received new note_store: ~w", [Pid]),
- {reply, ok, State#state{note_store = Pid}};
-
-handle_call(stop, _From, State) ->
- ?vlog("received stop request", []),
- Reply = ok,
- {stop, normal, Reply, State};
-
-handle_call(info, _From, State) ->
- ?vlog("received info request", []),
- Reply = get_info(State),
- {reply, Reply, State};
-
-handle_call(Req, From, State) ->
- warning_msg("received unknown request (from ~p): ~n~p", [Req, From]),
- {reply, {error, {invalid_request, Req}}, State}.
-
-
-%%--------------------------------------------------------------------
-%% Func: handle_cast/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_cast({send_pdu, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo},
- State) ->
- ?vlog("received send_pdu message with"
- "~n Pdu: ~p"
- "~n Vsn: ~p"
- "~n MsgData: ~p"
- "~n Domain: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Pdu, Vsn, MsgData, Domain, Addr, Port]),
- maybe_process_extra_info(ExtraInfo),
- handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State),
- {noreply, State};
-
-handle_cast({inform_response, Ref, Addr, Port}, State) ->
- ?vlog("received inform_response message with"
- "~n Ref: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Ref, Addr, Port]),
- handle_inform_response(Ref, Addr, Port, State),
- {noreply, State};
-
-handle_cast(filter_reset, State) ->
- ?vlog("received filter_reset message", []),
- reset_counters(),
- {noreply, State};
-
-handle_cast(Msg, State) ->
- warning_msg("received unknown message: ~n~p", [Msg]),
- {noreply, State}.
-
-
-%%--------------------------------------------------------------------
-%% Func: handle_info/2
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_info({udp, Sock, Ip, Port, Bytes}, #state{sock = Sock} = State) ->
- ?vlog("received ~w bytes from ~p:~p", [size(Bytes), Ip, Port]),
- handle_udp(Ip, Port, Bytes, State),
- {noreply, State};
-
-handle_info(inform_response_gc, State) ->
- ?vlog("received inform_response_gc message", []),
- State2 = handle_inform_response_gc(State),
- {noreply, State2};
-
-handle_info({disk_log, _Node, Log, Info}, State) ->
- ?vlog("received disk_log message: "
- "~n Info: ~p", [Info]),
- State2 = handle_disk_log(Log, Info, State),
- {noreply, State2};
-
-handle_info({'DOWN', _MRef, process, Pid, {net_if_worker, ExitStatus}},
- State) ->
- ?vdebug("received DOWN message from net_if-worker: "
- "~n ExitStatus: ~p", [ExitStatus]),
- handle_worker_exit(Pid, ExitStatus),
- {noreply, State};
-
-handle_info(Info, State) ->
- warning_msg("received unknown info: ~n~p", [Info]),
- {noreply, State}.
-
-
-%%--------------------------------------------------------------------
-%% Func: terminate/2
-%% Purpose: Shutdown the server
-%% Returns: any (ignored by gen_server)
-%%--------------------------------------------------------------------
-terminate(Reason, #state{log = Log, irgc = IrGcRef}) ->
- ?vdebug("terminate: ~p", [Reason]),
- irgc_stop(IrGcRef),
- %% Close logs
- do_close_log(Log),
- ok.
-
-
-do_close_log({Log, _Type}) ->
- (catch snmp_log:sync(Log)),
- (catch snmp_log:close(Log)),
- ok;
-do_close_log(_) ->
- ok.
-
-
-%%----------------------------------------------------------------------
-%% Func: code_change/3
-%% Purpose: Convert process state when code is changed
-%% Returns: {ok, NewState}
-%%----------------------------------------------------------------------
-
-code_change(_Vsn, State, _Extra) ->
- ?d("code_change -> entry with"
- "~n Vsn: ~p"
- "~n State: ~p"
- "~n Extra: ~p", [_Vsn, State, _Extra]),
- {ok, State}.
-
-
-%%%-------------------------------------------------------------------
-%%% Internal functions
-%%%-------------------------------------------------------------------
-
-handle_udp(Addr, Port, Bytes, State) ->
- Verbosity = get(verbosity),
- spawn_opt(fun() ->
- Log = worker_init(State, Verbosity),
- Res = (catch maybe_handle_recv_msg(
- Addr, Port, Bytes,
- State#state{log = Log})),
- worker_exit(udp, {Addr, Port}, Res)
- end,
- [monitor]).
-
-
-maybe_handle_recv_msg(Addr, Port, Bytes, #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_recv(Addr, Port)) of
- false ->
- %% Drop the received packet
- inc(netIfMsgInDrops),
- ok;
- _ ->
- handle_recv_msg(Addr, Port, Bytes, State)
- end.
-
-
-handle_recv_msg(Addr, Port, Bytes, #state{server = Pid})
- when is_binary(Bytes) andalso (size(Bytes) =:= 0) ->
- Pid ! {snmp_error, {empty_message, Addr, Port}, Addr, Port},
- ok;
-
-handle_recv_msg(Addr, Port, Bytes,
- #state{server = Pid,
- note_store = NoteStore,
- mpd_state = MpdState,
- sock = Sock,
- log = Log} = State) ->
- Domain = snmp_conf:which_domain(Addr), % What the ****...
- Logger = logger(Log, read, Addr, Port),
- case (catch snmpm_mpd:process_msg(Bytes, Domain, Addr, Port,
- MpdState, NoteStore, Logger)) of
-
- {ok, Vsn, Pdu, MS, ACM} ->
- maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, MS, ACM,
- Logger, State);
-
- {discarded, Reason, Report} ->
- ?vdebug("discarded: ~p", [Reason]),
- ErrorInfo = {failed_processing_message, Reason},
- Pid ! {snmp_error, ErrorInfo, Addr, Port},
- maybe_udp_send(State#state.filter, Sock, Addr, Port, Report),
- ok;
-
- {discarded, Reason} ->
- ?vdebug("discarded: ~p", [Reason]),
- ErrorInfo = {failed_processing_message, Reason},
- Pid ! {snmp_error, ErrorInfo, Addr, Port},
- ok;
-
- Error ->
- error_msg("processing of received message failed: "
- "~n ~p", [Error]),
- ok
- end.
-
-
-maybe_handle_recv_pdu(Addr, Port,
- Vsn, #pdu{type = Type} = Pdu, PduMS, ACM,
- Logger,
- #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_recv_pdu(Addr, Port, Type)) of
- false ->
- inc(netIfPduInDrops),
- ok;
- _ ->
- handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State)
- end;
-maybe_handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger,
- #state{filter = FilterMod} = State)
- when is_record(Trap, trappdu) ->
- case (catch FilterMod:accept_recv_pdu(Addr, Port, trappdu)) of
- false ->
- inc(netIfPduInDrops),
- ok;
- _ ->
- handle_recv_pdu(Addr, Port, Vsn, Trap, PduMS, ACM, Logger, State)
- end;
-maybe_handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State) ->
- handle_recv_pdu(Addr, Port, Vsn, Pdu, PduMS, ACM, Logger, State).
-
-
-handle_recv_pdu(Addr, Port,
- Vsn, #pdu{type = 'inform-request'} = Pdu, _PduMS, ACM,
- Logger, #state{server = Pid, irb = IRB} = State) ->
- handle_inform_request(IRB, Pid, Vsn, Pdu, ACM,
- Addr, Port, Logger, State);
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = report} = Pdu, _PduMS, ok,
- _Logger,
- #state{server = Pid} = _State) ->
- ?vtrace("received report - ok", []),
- Pid ! {snmp_report, {ok, Pdu}, Addr, Port},
- ok;
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = report} = Pdu, _PduMS,
- {error, ReqId, Reason},
- _Logger,
- #state{server = Pid} = _State) ->
- ?vtrace("received report - error", []),
- Pid ! {snmp_report, {error, ReqId, Reason, Pdu}, Addr, Port},
- ok;
-handle_recv_pdu(Addr, Port,
- _Vsn, #pdu{type = 'snmpv2-trap'} = Pdu, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) ->
- ?vtrace("received snmpv2-trap", []),
- Pid ! {snmp_trap, Pdu, Addr, Port},
- ok;
-handle_recv_pdu(Addr, Port,
- _Vsn, Trap, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) when is_record(Trap, trappdu) ->
- ?vtrace("received trappdu", []),
- Pid ! {snmp_trap, Trap, Addr, Port},
- ok;
-handle_recv_pdu(Addr, Port,
- _Vsn, Pdu, _PduMS, _ACM,
- _Logger,
- #state{server = Pid} = _State) when is_record(Pdu, pdu) ->
- ?vtrace("received pdu", []),
- Pid ! {snmp_pdu, Pdu, Addr, Port},
- ok;
-handle_recv_pdu(_Addr, _Port, _Vsn, Pdu, _PduMS, ACM, _Logger, _State) ->
- ?vlog("received unexpected pdu: "
- "~n Pdu: ~p"
- "~n ACM: ~p", [Pdu, ACM]),
- ok.
-
-
-handle_inform_request(auto, Pid, Vsn, Pdu, ACM, Addr, Port, Logger, State) ->
- ?vtrace("received inform-request (true)", []),
- Pid ! {snmp_inform, ignore, Pdu, Addr, Port},
- RePdu = make_response_pdu(Pdu),
- maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger, State);
-handle_inform_request({user, To}, Pid, Vsn, #pdu{request_id = ReqId} = Pdu,
- ACM, Addr, Port, _Logger, _State) ->
- ?vtrace("received inform-request (false)", []),
-
- Pid ! {snmp_inform, ReqId, Pdu, Addr, Port},
-
- %% Before we go any further, we need to check that we have not
- %% already received this message (possible resend).
-
- Key = {ReqId, Addr, Port},
- case ets:lookup(snmpm_inform_request_table, Key) of
- [_] ->
- %% OK, we already know about this. We assume this
- %% is a resend. Either the agent is really eager or
- %% the user has not answered yet. Bad user!
- ok;
- [] ->
- RePdu = make_response_pdu(Pdu),
- Expire = t() + To,
- Rec = {Key, Expire, {Vsn, ACM, RePdu}},
- ets:insert(snmpm_inform_request_table, Rec)
- end,
- ok.
-
-handle_inform_response(Ref, Addr, Port, State) ->
- Verbosity = get(verbosity),
- spawn_opt(fun() ->
- Log = worker_init(State, Verbosity),
- Res = (catch do_handle_inform_response(
- Ref,
- Addr, Port,
- State#state{log = Log})),
- worker_exit(inform_reponse, {Addr, Port}, Res)
- end,
- [monitor]).
-
-
-
-do_handle_inform_response(Ref, Addr, Port, State) ->
- Key = {Ref, Addr, Port},
- case ets:lookup(snmpm_inform_request_table, Key) of
- [{Key, _, {Vsn, ACM, RePdu}}] ->
- Logger = logger(State#state.log, read, Addr, Port),
- ets:delete(snmpm_inform_request_table, Key),
- maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port,
- Logger, State);
- [] ->
- %% Already acknowledged, or the user was to slow to reply...
- ok
- end,
- ok.
-
-maybe_send_inform_response(RePdu, Vsn, ACM, Addr, Port, Logger,
- #state{server = Pid,
- sock = Sock,
- filter = FilterMod}) ->
- case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(RePdu))) of
- false ->
- inc(netIfPduOutDrops),
- ok;
- _ ->
- case snmpm_mpd:generate_response_msg(Vsn, RePdu, ACM, Logger) of
- {ok, Msg} ->
- maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
- {discarded, Reason} ->
- ?vlog("failed generating response message:"
- "~n Reason: ~p", [Reason]),
- ReqId = RePdu#pdu.request_id,
- ErrorInfo = {failed_generating_response, {RePdu, Reason}},
- Pid ! {snmp_error, ReqId, ErrorInfo, Addr, Port},
- ok
- end
- end.
-
-handle_inform_response_gc(#state{irb = IRB} = State) ->
- ets:safe_fixtable(snmpm_inform_request_table, true),
- do_irgc(ets:first(snmpm_inform_request_table), t()),
- ets:safe_fixtable(snmpm_inform_request_table, false),
- State#state{irgc = irgc_start(IRB)}.
-
-%% We are deleting at the same time as we are traversing the table!!!
-do_irgc('$end_of_table', _) ->
- ok;
-do_irgc(Key, Now) ->
- Next = ets:next(snmpm_inform_request_table, Key),
- case ets:lookup(snmpm_inform_request_table, Key) of
- [{Key, BestBefore, _}] when BestBefore < Now ->
- ets:delete(snmpm_inform_request_table, Key);
- _ ->
- ok
- end,
- do_irgc(Next, Now).
-
-irgc_start(auto) ->
- undefined;
-irgc_start(_) ->
- erlang:send_after(?IRGC_TIMEOUT, self(), inform_response_gc).
-
-irgc_stop(undefined) ->
- ok;
-irgc_stop(Ref) ->
- (catch erlang:cancel_timer(Ref)).
-
-
-handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State) ->
- Verbosity = get(verbosity),
- spawn_opt(fun() ->
- Log = worker_init(State, Verbosity),
- Res = (catch maybe_handle_send_pdu(
- Pdu, Vsn, MsgData,
- Domain, Addr, Port,
- State#state{log = Log})),
- worker_exit(send_pdu, {Domain, Addr, Port}, Res)
- end,
- [monitor]).
-
-maybe_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port,
- #state{filter = FilterMod} = State) ->
- case (catch FilterMod:accept_send_pdu(Addr, Port, pdu_type_of(Pdu))) of
- false ->
- inc(netIfPduOutDrops),
- ok;
- _ ->
- do_handle_send_pdu(Pdu, Vsn, MsgData, Domain, Addr, Port, State)
- end.
-
-do_handle_send_pdu(Pdu, Vsn, MsgData, _Domain, Addr, Port,
- #state{server = Pid,
- note_store = NoteStore,
- sock = Sock,
- log = Log,
- filter = FilterMod}) ->
- Logger = logger(Log, write, Addr, Port),
- case (catch snmpm_mpd:generate_msg(Vsn, NoteStore,
- Pdu, MsgData, Logger)) of
- {ok, Msg} ->
- ?vtrace("do_handle_send_pdu -> message generated", []),
- maybe_udp_send(FilterMod, Sock, Addr, Port, Msg);
- {discarded, Reason} ->
- ?vlog("PDU not sent: "
- "~n PDU: ~p"
- "~n Reason: ~p", [Pdu, Reason]),
- Pid ! {snmp_error, Pdu, Reason},
- ok
- end.
-
-
-maybe_udp_send(FilterMod, Sock, Addr, Port, Msg) ->
- case (catch FilterMod:accept_send(Addr, Port)) of
- false ->
- inc(netIfMsgOutDrops),
- ok;
- _ ->
- udp_send(Sock, Addr, Port, Msg)
- end.
-
-
-udp_send(Sock, Addr, Port, Msg) ->
- case (catch gen_udp:send(Sock, Addr, Port, Msg)) of
- ok ->
- ?vdebug("sent ~w bytes to ~w:~w [~w]",
- [sz(Msg), Addr, Port, Sock]),
- ok;
- {error, Reason} ->
- error_msg("failed sending message to ~p:~p: "
- "~n ~p",[Addr, Port, Reason]),
- ok;
- Error ->
- error_msg("failed sending message to ~p:~p: "
- "~n ~p",[Addr, Port, Error]),
- ok
- end.
-
-sz(B) when is_binary(B) ->
- size(B);
-sz(L) when is_list(L) ->
- length(L);
-sz(_) ->
- undefined.
-
-
-handle_disk_log(_Log, {wrap, NoLostItems}, State) ->
- ?vlog("Audit Trail Log - wrapped: ~w previously logged items where lost",
- [NoLostItems]),
- State;
-handle_disk_log(_Log, {truncated, NoLostItems}, State) ->
- ?vlog("Audit Trail Log - truncated: ~w items where lost when truncating",
- [NoLostItems]),
- State;
-handle_disk_log(_Log, full, State) ->
- error_msg("Failed to write to Audit Trail Log (full)", []),
- State;
-handle_disk_log(_Log, {error_status, ok}, State) ->
- State;
-handle_disk_log(_Log, {error_status, {error, Reason}}, State) ->
- error_msg("Error status received from Audit Trail Log: "
- "~n~p", [Reason]),
- State;
-handle_disk_log(_Log, _Info, State) ->
- State.
-
-
-%% mk_discovery_msg('version-3', Pdu, _VsnHdr, UserName) ->
-%% ScopedPDU = #scopedPdu{contextEngineID = "",
-%% contextName = "",
-%% data = Pdu},
-%% Bytes = snmp_pdus:enc_scoped_pdu(ScopedPDU),
-%% MsgID = get(msg_id),
-%% put(msg_id,MsgID+1),
-%% UsmSecParams =
-%% #usmSecurityParameters{msgAuthoritativeEngineID = "",
-%% msgAuthoritativeEngineBoots = 0,
-%% msgAuthoritativeEngineTime = 0,
-%% msgUserName = UserName,
-%% msgPrivacyParameters = "",
-%% msgAuthenticationParameters = ""},
-%% SecBytes = snmp_pdus:enc_usm_security_parameters(UsmSecParams),
-%% PduType = Pdu#pdu.type,
-%% Hdr = #v3_hdr{msgID = MsgID,
-%% msgMaxSize = 1000,
-%% msgFlags = snmp_misc:mk_msg_flags(PduType, 0),
-%% msgSecurityModel = ?SEC_USM,
-%% msgSecurityParameters = SecBytes},
-%% Msg = #message{version = 'version-3', vsn_hdr = Hdr, data = Bytes},
-%% case (catch snmp_pdus:enc_message_only(Msg)) of
-%% {'EXIT', Reason} ->
-%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
-%% error;
-%% L when list(L) ->
-%% {Msg, L}
-%% end;
-%% mk_discovery_msg(Version, Pdu, {Com, _, _, _, _}, UserName) ->
-%% Msg = #message{version = Version, vsn_hdr = Com, data = Pdu},
-%% case catch snmp_pdus:enc_message(Msg) of
-%% {'EXIT', Reason} ->
-%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
-%% error;
-%% L when list(L) ->
-%% {Msg, L}
-%% end.
-
-
-%% mk_msg('version-3', Pdu, {Context, User, EngineID, CtxEngineId, SecLevel},
-%% MsgData) ->
-%% %% Code copied from snmp_mpd.erl
-%% {MsgId, SecName, SecData} =
-%% if
-%% tuple(MsgData), Pdu#pdu.type == 'get-response' ->
-%% MsgData;
-%% true ->
-%% Md = get(msg_id),
-%% put(msg_id, Md + 1),
-%% {Md, User, []}
-%% end,
-%% ScopedPDU = #scopedPdu{contextEngineID = CtxEngineId,
-%% contextName = Context,
-%% data = Pdu},
-%% ScopedPDUBytes = snmp_pdus:enc_scoped_pdu(ScopedPDU),
-
-%% PduType = Pdu#pdu.type,
-%% V3Hdr = #v3_hdr{msgID = MsgId,
-%% msgMaxSize = 1000,
-%% msgFlags = snmp_misc:mk_msg_flags(PduType, SecLevel),
-%% msgSecurityModel = ?SEC_USM},
-%% Message = #message{version = 'version-3', vsn_hdr = V3Hdr,
-%% data = ScopedPDUBytes},
-%% SecEngineID = case PduType of
-%% 'get-response' -> snmp_framework_mib:get_engine_id();
-%% _ -> EngineID
-%% end,
-%% case catch snmp_usm:generate_outgoing_msg(Message, SecEngineID,
-%% SecName, SecData, SecLevel) of
-%% {'EXIT', Reason} ->
-%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
-%% error;
-%% {error, Reason} ->
-%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
-%% error;
-%% Packet ->
-%% Packet
-%% end;
-%% mk_msg(Version, Pdu, {Com, _User, _EngineID, _Ctx, _SecLevel}, _SecData) ->
-%% Msg = #message{version = Version, vsn_hdr = Com, data = Pdu},
-%% case catch snmp_pdus:enc_message(Msg) of
-%% {'EXIT', Reason} ->
-%% error("Encoding error. Pdu: ~w. Reason: ~w",[Pdu, Reason]),
-%% error;
-%% B when list(B) ->
-%% B
-%% end.
-
-
-%% handle_system_info_updated(#state{log = {Log, _OldType}} = State,
-%% audit_trail_log_type = _What) ->
-%% %% Just to make sure, check that ATL is actually enabled
-%% case snmpm_config:system_info(audit_trail_log) of
-%% {ok, true} ->
-%% {ok, Type} = snmpm_config:system_info(audit_trail_log_type),
-%% NewState = State#state{log = {Log, Type}},
-%% {NewState, ok};
-%% _ ->
-%% {State, {error, {adt_not_enabled}}}
-%% end;
-%% handle_system_info_updated(_State, _What) ->
-%% ok.
-
-handle_get_log_type(#state{log = {_Log, Value}} = State) ->
- %% Just to make sure, check that ATL is actually enabled
- case snmpm_config:system_info(audit_trail_log) of
- {ok, true} ->
- Type =
- case {lists:member(read, Value), lists:member(write, Value)} of
- {true, true} ->
- read_write;
- {true, false} ->
- read;
- {false, true} ->
- write;
- {false, false} ->
- throw({State, {error, {bad_atl_type, Value}}})
- end,
- {ok, Type};
- _ ->
- {error, not_enabled}
- end;
-handle_get_log_type(_State) ->
- {error, not_enabled}.
-
-handle_set_log_type(#state{log = {Log, OldValue}} = State, NewType) ->
- %% Just to make sure, check that ATL is actually enabled
- case snmpm_config:system_info(audit_trail_log) of
- {ok, true} ->
- NewValue =
- case NewType of
- read ->
- [read];
- write ->
- [write];
- read_write ->
- [read,write];
- _ ->
- throw({State, {error, {bad_atl_type, NewType}}})
- end,
- NewState = State#state{log = {Log, NewValue}},
- OldType =
- case {lists:member(read, OldValue),
- lists:member(write, OldValue)} of
- {true, true} ->
- read_write;
- {true, false} ->
- read;
- {false, true} ->
- write;
- {false, false} ->
- throw({State, {error, {bad_atl_type, OldValue}}})
- end,
- {NewState, {ok, OldType}};
- _ ->
- {State, {error, not_enabled}}
- end;
-handle_set_log_type(State, _NewType) ->
- {State, {error, not_enabled}}.
-
-
-%% -------------------------------------------------------------------
-
-worker_init(#state{log = undefined = Log}, Verbosity) ->
- worker_init2(Log, Verbosity);
-worker_init(#state{log = {Name, Log, Type}}, Verbosity) ->
- case snmp_log:open(Name, Log) of
- {ok, NewLog} ->
- worker_init2({Name, NewLog, Type}, Verbosity);
- {error, Reason} ->
- warning_msg("NetIf worker ~p failed opening ATL: "
- "~n ~p", [self(), Reason]),
- NewLog = undefined,
- worker_init2({Name, NewLog, Type}, Verbosity)
- end;
-worker_init(State, Verbosity) ->
- ?vinfo("worker_init -> entry with invalid data: "
- "~n State: ~p"
- "~n Verbosity: ~p", [State, Verbosity]),
- exit({worker_init, State, Verbosity}).
-
-worker_init2(Log, Verbosity) ->
- put(sname, mnifw),
- put(verbosity, Verbosity),
- Log.
-
-
-worker_exit(Tag, Info, Result) ->
- exit({net_if_worker, {Tag, Info, Result}}).
-
-handle_worker_exit(_, {_, _, ok}) ->
- ok;
-handle_worker_exit(Pid, {udp, {Addr, Port}, ExitStatus}) ->
- warning_msg("Worker process (~p) terminated "
- "while processing (incomming) message from ~w:~w: "
- "~n~p", [Pid, Addr, Port, ExitStatus]),
- ok;
-handle_worker_exit(Pid, {send_pdu, {Domain, Addr, Port}, ExitStatus}) ->
- warning_msg("Worker process (~p) terminated "
- "while processing (outgoing) pdu for [~w] ~w:~w: "
- "~n~p", [Pid, Domain, Addr, Port, ExitStatus]),
- ok;
-handle_worker_exit(Pid, {inform_response, {Addr, Port}, ExitStatus}) ->
- warning_msg("Worker process (~p) terminated "
- "while processing (outgoing) inform response for ~w:~w: "
- "~n~p", [Pid, Addr, Port, ExitStatus]),
- ok;
-handle_worker_exit(_, _) ->
- ok.
-
-
-%% -------------------------------------------------------------------
-
-make_response_pdu(#pdu{request_id = ReqId, varbinds = Vbs}) ->
- #pdu{type = 'get-response',
- request_id = ReqId,
- error_status = noError,
- error_index = 0,
- varbinds = Vbs}.
-
-
-%% ----------------------------------------------------------------
-
-pdu_type_of(#pdu{type = Type}) ->
- Type;
-pdu_type_of(TrapPdu) when is_record(TrapPdu, trappdu) ->
- trap.
-
-
-%% -------------------------------------------------------------------
-
-%% At this point this function is used during testing
-maybe_process_extra_info(?DEFAULT_EXTRA_INFO) ->
- ok;
-maybe_process_extra_info({?SNMPM_EXTRA_INFO_TAG, Fun})
- when is_function(Fun, 0) ->
- (catch Fun()),
- ok;
-maybe_process_extra_info(_ExtraInfo) ->
- ok.
-
-
-%% -------------------------------------------------------------------
-
-t() ->
- {A,B,C} = erlang:now(),
- A*1000000000+B*1000+(C div 1000).
-
-
-%% -------------------------------------------------------------------
-
-logger(undefined, _Type, _Addr, _Port) ->
- fun(_) ->
- ok
- end;
-logger({_Name, Log, Types}, Type, Addr, Port) ->
- case lists:member(Type, Types) of
- true ->
- fun(Msg) ->
- snmp_log:log(Log, Msg, Addr, Port)
- end;
- false ->
- fun(_) ->
- ok
- end
- end.
-
-
-%% -------------------------------------------------------------------
-
-%% info_msg(F, A) ->
-%% ?snmpm_info("NET-IF server: " ++ F, A).
-
-warning_msg(F, A) ->
- ?snmpm_warning("NET-IF server: " ++ F, A).
-
-error_msg(F, A) ->
- ?snmpm_error("NET-IF server: " ++ F, A).
-
-
-
-%%%-------------------------------------------------------------------
-
-% get_opt(Key, Opts) ->
-% ?vtrace("get option ~w", [Key]),
-% snmp_misc:get_option(Key, Opts).
-
-get_opt(Opts, Key, Def) ->
- ?vtrace("get option ~w with default ~p", [Key, Def]),
- snmp_misc:get_option(Key, Opts, Def).
-
-
-%% -------------------------------------------------------------------
-
-get_info(#state{sock = Id}) ->
- ProcSize = proc_mem(self()),
- PortInfo = get_port_info(Id),
- [{process_memory, ProcSize}, {port_info, PortInfo}].
-
-proc_mem(P) when is_pid(P) ->
- case (catch erlang:process_info(P, memory)) of
- {memory, Sz} when is_integer(Sz) ->
- Sz;
- _ ->
- undefined
- end.
-%% proc_mem(_) ->
-%% undefined.
-
-
-get_port_info(Id) ->
- PortInfo =
- case (catch erlang:port_info(Id)) of
- PI when is_list(PI) ->
- [{port_info, PI}];
- _ ->
- []
- end,
- PortStatus =
- case (catch prim_inet:getstatus(Id)) of
- {ok, PS} ->
- [{port_status, PS}];
- _ ->
- []
- end,
- PortAct =
- case (catch inet:getopts(Id, [active])) of
- {ok, PA} ->
- [{port_act, PA}];
- _ ->
- []
- end,
- PortStats =
- case (catch inet:getstat(Id)) of
- {ok, Stat} ->
- [{port_stats, Stat}];
- _ ->
- []
- end,
- IfList =
- case (catch inet:getif(Id)) of
- {ok, IFs} ->
- [{interfaces, IFs}];
- _ ->
- []
- end,
- BufSz =
- case (catch inet:getopts(Id, [recbuf, sndbuf, buffer])) of
- {ok, Sz} ->
- [{buffer_size, Sz}];
- _ ->
- []
- end,
- [{socket, Id}] ++
- IfList ++
- PortStats ++
- PortInfo ++
- PortStatus ++
- PortAct ++
- BufSz.
-
-
-%%-----------------------------------------------------------------
-%% Counter functions
-%%-----------------------------------------------------------------
-init_counters() ->
- F = fun(Counter) -> maybe_create_counter(Counter) end,
- lists:map(F, counters()).
-
-reset_counters() ->
- F = fun(Counter) -> snmpm_config:reset_stats_counter(Counter) end,
- lists:map(F, counters()).
-
-maybe_create_counter(Counter) ->
- snmpm_config:maybe_cre_stats_counter(Counter, 0).
-
-counters() ->
- [
- netIfMsgOutDrops,
- netIfMsgInDrops,
- netIfPduOutDrops,
- netIfPduInDrops
- ].
-
-inc(Name) -> inc(Name, 1).
-inc(Name, N) -> snmpm_config:incr_stats_counter(Name, N).
-
-%% get_counters() ->
-%% Counters = counters(),
-%% get_counters(Counters, []).
-
-%% get_counters([], Acc) ->
-%% lists:reverse(Acc);
-%% get_counters([Counter|Counters], Acc) ->
-%% case snmpm_config:get_stats_counter(Counter) of
-%% {ok, CounterVal} ->
-%% get_counters(Counters, [{Counter, CounterVal}|Acc]);
-%% _ ->
-%% get_counters(Counters, Acc)
-%% end.
-
-
-%% ----------------------------------------------------------------
-
-call(Pid, Req) ->
- call(Pid, Req, infinity).
-
-call(Pid, Req, Timeout) ->
- gen_server:call(Pid, Req, Timeout).
-
-cast(Pid, Msg) ->
- gen_server:cast(Pid, Msg).
+-define(snmpm_net_if_mt, true).
+-module(snmpm_net_if_mt).
+-include("snmpm_net_if.erl").
diff --git a/lib/snmp/src/manager/snmpm_server.erl b/lib/snmp/src/manager/snmpm_server.erl
index 9c79df2748..8fc3359159 100644
--- a/lib/snmp/src/manager/snmpm_server.erl
+++ b/lib/snmp/src/manager/snmpm_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -163,8 +163,7 @@
reg_type,
target,
domain,
- addr,
- port,
+ address,
type,
data,
ref,
@@ -1033,14 +1032,14 @@ handle_info({snmp_error, Pdu, Reason}, State) ->
handle_snmp_error(Pdu, Reason, State),
{noreply, State};
-handle_info({snmp_error, Reason, Addr, Port}, State) ->
+handle_info({snmp_error, Reason, Domain, Addr}, State) ->
?vlog("received snmp_error message", []),
- handle_snmp_error(Addr, Port, -1, Reason, State),
+ handle_snmp_error(Domain, Addr, -1, Reason, State),
{noreply, State};
-handle_info({snmp_error, ReqId, Reason, Addr, Port}, State) ->
+handle_info({snmp_error, ReqId, Reason, Domain, Addr}, State) ->
?vlog("received snmp_error message", []),
- handle_snmp_error(Addr, Port, ReqId, Reason, State),
+ handle_snmp_error(Domain, Addr, ReqId, Reason, State),
{noreply, State};
%% handle_info({snmp_error, ReqId, Pdu, Reason, Addr, Port}, State) ->
@@ -1049,30 +1048,30 @@ handle_info({snmp_error, ReqId, Reason, Addr, Port}, State) ->
%% {noreply, State};
-handle_info({snmp_pdu, Pdu, Addr, Port}, State) ->
+handle_info({snmp_pdu, Pdu, Domain, Addr}, State) ->
?vlog("received snmp_pdu message", []),
- handle_snmp_pdu(Pdu, Addr, Port, State),
+ handle_snmp_pdu(Pdu, Domain, Addr, State),
{noreply, State};
-handle_info({snmp_trap, Trap, Addr, Port}, State) ->
+handle_info({snmp_trap, Trap, Domain, Addr}, State) ->
?vlog("received snmp_trap message", []),
- handle_snmp_trap(Trap, Addr, Port, State),
+ handle_snmp_trap(Trap, Domain, Addr, State),
{noreply, State};
-handle_info({snmp_inform, Ref, Pdu, Addr, Port}, State) ->
+handle_info({snmp_inform, Ref, Pdu, Domain, Addr}, State) ->
?vlog("received snmp_inform message", []),
- handle_snmp_inform(Ref, Pdu, Addr, Port, State),
+ handle_snmp_inform(Ref, Pdu, Domain, Addr, State),
{noreply, State};
-handle_info({snmp_report, {ok, Pdu}, Addr, Port}, State) ->
- handle_snmp_report(Pdu, Addr, Port, State),
+handle_info({snmp_report, {ok, Pdu}, Domain, Addr}, State) ->
+ handle_snmp_report(Pdu, Domain, Addr, State),
{noreply, State};
-handle_info({snmp_report, {error, ReqId, Info, Pdu}, Addr, Port}, State) ->
- handle_snmp_report(ReqId, Pdu, Info, Addr, Port, State),
+handle_info({snmp_report, {error, ReqId, Info, Pdu}, Domain, Addr}, State) ->
+ handle_snmp_report(ReqId, Pdu, Info, Domain, Addr, State),
{noreply, State};
@@ -1176,11 +1175,11 @@ handle_sync_get(Pid, UserId, TargetName, Oids, SendOpts, From, State) ->
"~n From: ~p",
[Pid, UserId, TargetName, Oids, SendOpts, From]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_sync_get -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_sync_get -> ReqId: ~p", [ReqId]),
Msg = {sync_timeout, ReqId, From},
@@ -1193,8 +1192,7 @@ handle_sync_get(Pid, UserId, TargetName, Oids, SendOpts, From, State) ->
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get,
data = MsgData,
ref = Ref,
@@ -1230,11 +1228,11 @@ handle_sync_get_next(Pid, UserId, TargetName, Oids, SendOpts,
"~n From: ~p",
[Pid, UserId, TargetName, Oids, SendOpts, From]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_sync_get_next -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_next_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_sync_get_next -> ReqId: ~p", [ReqId]),
Msg = {sync_timeout, ReqId, From},
@@ -1247,12 +1245,11 @@ handle_sync_get_next(Pid, UserId, TargetName, Oids, SendOpts,
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get_next,
data = MsgData,
ref = Ref,
- mon = MonRef,
+ mon = MonRef,
from = From},
ets:insert(snmpm_request_table, Req),
ok;
@@ -1290,11 +1287,11 @@ handle_sync_get_bulk(Pid, UserId, TargetName, NonRep, MaxRep, Oids, SendOpts,
"~n From: ~p",
[Pid, UserId, TargetName, NonRep, MaxRep, Oids, SendOpts, From]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_sync_get_bulk -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_bulk_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
NonRep, MaxRep, Extra, State),
?vdebug("handle_sync_get_bulk -> ReqId: ~p", [ReqId]),
Msg = {sync_timeout, ReqId, From},
@@ -1307,8 +1304,7 @@ handle_sync_get_bulk(Pid, UserId, TargetName, NonRep, MaxRep, Oids, SendOpts,
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get_bulk,
data = MsgData,
ref = Ref,
@@ -1346,11 +1342,11 @@ handle_sync_set(Pid, UserId, TargetName, VarsAndVals, SendOpts, From, State) ->
"~n From: ~p",
[Pid, UserId, TargetName, VarsAndVals, From]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_sync_set -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_set_request(VarsAndVals, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_sync_set -> ReqId: ~p", [ReqId]),
Msg = {sync_timeout, ReqId, From},
@@ -1363,8 +1359,7 @@ handle_sync_set(Pid, UserId, TargetName, VarsAndVals, SendOpts, From, State) ->
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = set,
data = MsgData,
ref = Ref,
@@ -1400,11 +1395,11 @@ handle_async_get(Pid, UserId, TargetName, Oids, SendOpts, State) ->
"~n SendOpts: ~p",
[Pid, UserId, TargetName, Oids, SendOpts]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_async_get -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_async_get -> ReqId: ~p", [ReqId]),
Expire = ?ASYNC_GET_TIMEOUT(SendOpts),
@@ -1413,8 +1408,7 @@ handle_async_get(Pid, UserId, TargetName, Oids, SendOpts, State) ->
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get,
data = MsgData,
expire = t() + Expire},
@@ -1450,11 +1444,11 @@ handle_async_get_next(Pid, UserId, TargetName, Oids, SendOpts, State) ->
"~n SendOpts: ~p",
[Pid, UserId, TargetName, Oids, SendOpts]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_async_get_next -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_next_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_async_get_next -> ReqId: ~p", [ReqId]),
Expire = ?ASYNC_GET_NEXT_TIMEOUT(SendOpts),
@@ -1463,8 +1457,7 @@ handle_async_get_next(Pid, UserId, TargetName, Oids, SendOpts, State) ->
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get_next,
data = MsgData,
expire = t() + Expire},
@@ -1507,11 +1500,11 @@ handle_async_get_bulk(Pid,
"~n SendOpts: ~p",
[Pid, UserId, TargetName, NonRep, MaxRep, Oids, SendOpts]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_async_get_bulk -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_get_bulk_request(Oids, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
NonRep, MaxRep, Extra, State),
?vdebug("handle_async_get_bulk -> ReqId: ~p", [ReqId]),
Expire = ?ASYNC_GET_BULK_TIMEOUT(SendOpts),
@@ -1520,8 +1513,7 @@ handle_async_get_bulk(Pid,
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = get_bulk,
data = MsgData,
expire = t() + Expire},
@@ -1556,11 +1548,11 @@ handle_async_set(Pid, UserId, TargetName, VarsAndVals, SendOpts, State) ->
"~n SendOpts: ~p",
[Pid, UserId, TargetName, VarsAndVals, SendOpts]),
case agent_data(TargetName, SendOpts) of
- {ok, RegType, Domain, Addr, Port, Vsn, MsgData} ->
+ {ok, RegType, Domain, Addr, Vsn, MsgData} ->
?vtrace("handle_async_set -> send a ~p message", [Vsn]),
Extra = ?GET_EXTRA(SendOpts),
ReqId = send_set_request(VarsAndVals, Vsn, MsgData,
- Domain, Addr, Port,
+ Domain, Addr,
Extra, State),
?vdebug("handle_async_set -> ReqId: ~p", [ReqId]),
Expire = ?ASYNC_SET_TIMEOUT(SendOpts),
@@ -1569,8 +1561,7 @@ handle_async_set(Pid, UserId, TargetName, VarsAndVals, SendOpts, State) ->
reg_type = RegType,
target = TargetName,
domain = Domain,
- addr = Addr,
- port = Port,
+ address = Addr,
type = set,
data = MsgData,
expire = t() + Expire},
@@ -1808,15 +1799,15 @@ handle_snmp_error(CrapError, Reason, _State) ->
"~n~p~n~p", [CrapError, Reason]),
ok.
-handle_snmp_error(Addr, Port, ReqId, Reason, State) ->
+handle_snmp_error(Domain, Addr, ReqId, Reason, State) ->
- ?vtrace("handle_snmp_error -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n ReqId: ~p"
- "~n Reason: ~p", [Addr, Port, ReqId, Reason]),
+ ?vtrace("handle_snmp_error -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " ReqId: ~p~n"
+ " Reason: ~p", [Domain, Addr, ReqId, Reason]),
- case snmpm_config:get_agent_user_id(Addr, Port) of
+ case snmpm_config:get_agent_user_id(Domain, Addr) of
{ok, UserId} ->
case snmpm_config:user_info(UserId) of
{ok, UserMod, UserData} ->
@@ -1831,7 +1822,7 @@ handle_snmp_error(Addr, Port, ReqId, Reason, State) ->
error_msg("failed retreiving the default user "
"info handling snmp error "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, ReqId, Reason])
+ [Domain, Addr, ReqId, Reason])
end
end;
_Error ->
@@ -1843,7 +1834,7 @@ handle_snmp_error(Addr, Port, ReqId, Reason, State) ->
error_msg("failed retreiving the default user "
"info handling snmp error "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, ReqId, Reason])
+ [Domain, Addr, ReqId, Reason])
end
end.
@@ -1867,12 +1858,12 @@ handle_error(_UserId, Mod, Reason, ReqId, Data, _State) ->
handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
- Addr, Port, State) ->
+ Domain, Addr, State) ->
- ?vtrace("handle_snmp_pdu(get-response) -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Pdu: ~p", [Addr, Port, Pdu]),
+ ?vtrace("handle_snmp_pdu(get-response) -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " Pdu: ~p", [Domain, Addr, Pdu]),
case ets:lookup(snmpm_request_table, ReqId) of
@@ -1902,9 +1893,10 @@ handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
SnmpResponse = {EStatus, EIndex, Varbinds2},
case snmpm_config:user_info(UserId) of
{ok, UserMod, UserData} ->
- handle_pdu(UserId, UserMod,
- RegType, Target, Addr, Port,
- ReqId, SnmpResponse, UserData, State),
+ handle_pdu(
+ UserId, UserMod,
+ RegType, Target, Domain, Addr,
+ ReqId, SnmpResponse, UserData, State),
maybe_delete(Disco, ReqId);
_Error ->
%% reply to outstanding request, for which there is no
@@ -1912,15 +1904,16 @@ handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
%% Therefor send it to the default user
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_pdu(DefUserId, DefMod,
- RegType, Target, Addr, Port,
- ReqId, SnmpResponse, DefData, State),
+ handle_pdu(
+ DefUserId, DefMod,
+ RegType, Target, Domain, Addr,
+ ReqId, SnmpResponse, DefData, State),
maybe_delete(Disco, ReqId);
Error ->
error_msg("failed retreiving the default user "
"info handling pdu from "
"~p <~p,~p>: ~n~w~n~w",
- [Target, Addr, Port, Error, Pdu])
+ [Target, Domain, Addr, Error, Pdu])
end
end;
@@ -1974,7 +1967,7 @@ handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
varbinds = Varbinds} = Pdu,
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpInfo = {EStatus, EIndex, Varbinds2},
- case snmpm_config:get_agent_user_id(Addr, Port) of
+ case snmpm_config:get_agent_user_id(Domain, Addr) of
{ok, UserId} ->
%% A very late reply or a reply to a request
%% that has been cancelled.
@@ -1999,7 +1992,7 @@ handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
"user info handling (old) "
"pdu from "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, Error, Pdu])
+ [Domain, Addr, Error, Pdu])
end
end;
@@ -2016,28 +2009,30 @@ handle_snmp_pdu(#pdu{type = 'get-response', request_id = ReqId} = Pdu,
"no agent info found", []),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_agent(DefUserId, DefMod,
- Addr, Port,
- pdu, ignore,
- SnmpInfo, DefData, State);
+ handle_agent(
+ DefUserId, DefMod,
+ Domain, Addr,
+ pdu, ignore,
+ SnmpInfo, DefData, State);
Error ->
error_msg("failed retreiving the default user "
"info handling (old) pdu when no user "
"found from "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, Error, Pdu])
+ [Domain, Addr, Error, Pdu])
end
end
end;
-handle_snmp_pdu(CrapPdu, Addr, Port, _State) ->
+handle_snmp_pdu(CrapPdu, Domain, Addr, _State) ->
error_msg("received crap (snmp) Pdu from ~w:~w =>"
- "~p", [Addr, Port, CrapPdu]),
+ "~p", [Domain, Addr, CrapPdu]),
ok.
-handle_pdu(_UserId, Mod, target_name = _RegType, TargetName, _Addr, _Port,
- ReqId, SnmpResponse, Data, _State) ->
+handle_pdu(
+ _UserId, Mod, target_name = _RegType, TargetName, _Domain, _Addr,
+ ReqId, SnmpResponse, Data, _State) ->
?vtrace("handle_pdu(target_name) -> entry when"
"~n Mod: ~p", [Mod]),
F = fun() ->
@@ -2053,43 +2048,56 @@ handle_pdu(_UserId, Mod, target_name = _RegType, TargetName, _Addr, _Port,
end,
handle_callback(F),
ok;
-handle_pdu(_UserId, Mod, addr_port = _RegType, _TargetName, Addr, Port,
- ReqId, SnmpResponse, Data, _State) ->
+handle_pdu(
+ _UserId, Mod, addr_port = _RegType, _TargetName, _Domain, Addr,
+ ReqId, SnmpResponse, Data, _State) ->
?vtrace("handle_pdu(addr_port) -> entry when"
"~n Mod: ~p", [Mod]),
F = fun() ->
- (catch Mod:handle_pdu(Addr, Port, ReqId, SnmpResponse, Data))
+ {Ip, Port} = Addr,
+ (catch Mod:handle_pdu(Ip, Port, ReqId, SnmpResponse, Data))
end,
handle_callback(F),
ok.
-handle_agent(UserId, Mod, Addr, Port, Type, Ref, SnmpInfo, Data, State) ->
+handle_agent(UserId, Mod, Domain, Addr, Type, Ref, SnmpInfo, Data, State) ->
?vtrace("handle_agent -> entry when"
"~n UserId: ~p"
"~n Type: ~p"
"~n Mod: ~p", [UserId, Type, Mod]),
F = fun() ->
- do_handle_agent(UserId, Mod, Addr, Port,
+ do_handle_agent(UserId, Mod, Domain, Addr,
Type, Ref, SnmpInfo, Data, State)
end,
handle_callback(F),
ok.
do_handle_agent(DefUserId, DefMod,
- Addr, Port,
+ Domain, Addr,
Type, Ref,
SnmpInfo, DefData, State) ->
?vdebug("do_handle_agent -> entry when"
"~n DefUserId: ~p", [DefUserId]),
- try DefMod:handle_agent(Addr, Port, Type, SnmpInfo, DefData) of
+ {Domain_or_Ip, Addr_or_Port} =
+ case Domain of
+ snmpUDPDomain ->
+ Addr;
+ _ ->
+ {Domain, Addr}
+ end,
+ try DefMod:handle_agent(
+ Domain_or_Ip, Addr_or_Port, Type, SnmpInfo, DefData)
+ of
{register, UserId2, TargetName, Config} ->
?vtrace("do_handle_agent -> register: "
"~n UserId2: ~p"
"~n TargetName: ~p"
"~n Config: ~p",
[UserId2, TargetName, Config]),
- Config2 = ensure_present([{address, Addr}, {port, Port}], Config),
+ Config2 =
+ ensure_present(
+ [{tdomain, Domain}, {taddress, Addr}], Config),
Config3 = [{reg_type, target_name} | Config2],
case snmpm_config:register_agent(UserId2,
TargetName, Config3) of
@@ -2099,7 +2107,7 @@ do_handle_agent(DefUserId, DefMod,
error_msg("failed registering agent - "
"handling agent "
"~p <~p,~p>: ~n~w",
- [TargetName, Addr, Port, Reason]),
+ [TargetName, Domain, Addr, Reason]),
ok
end;
@@ -2108,31 +2116,34 @@ do_handle_agent(DefUserId, DefMod,
ok;
InvalidResult ->
- CallbackArgs = [Addr, Port, Type, SnmpInfo, DefData],
+ CallbackArgs =
+ [Domain_or_Ip, Addr_or_Port, Type, SnmpInfo, DefData],
handle_invalid_result(handle_agent, CallbackArgs, InvalidResult)
catch
error:{undef, _} when Type =:= pdu ->
%% Maybe, still on the old API
?vdebug("do_handle_agent -> maybe still on the old api", []),
- case (catch DefMod:handle_agent(Addr, Port, SnmpInfo, DefData)) of
+ {Ip, Port} = Addr,
+ case (catch DefMod:handle_agent(Ip, Port, SnmpInfo, DefData)) of
{register, UserId2, Config} ->
?vtrace("do_handle_agent -> register: "
"~n UserId2: ~p"
"~n Config: ~p", [UserId2, Config]),
- TargetName = mk_target_name(Addr, Port, Config),
- Config2 = [{reg_type, addr_port},
- {address, Addr},
- {port, Port} | Config],
- case snmpm_config:register_agent(UserId2,
- TargetName, Config2) of
+ TargetName = mk_target_name(Domain, Addr, Config),
+ Config2 =
+ ensure_present(
+ [{tdomain, Domain}, {taddress, Addr}], Config),
+ Config3 = [{reg_type, addr_port} | Config2],
+ case snmpm_config:register_agent(
+ UserId2, TargetName, Config3) of
ok ->
ok;
{error, Reason} ->
error_msg("failed registering agent - "
"handling agent "
"~p <~p,~p>: ~n~w",
- [TargetName, Addr, Port, Reason]),
+ [TargetName, Domain, Addr, Reason]),
ok
end;
{register, UserId2, TargetName, Config} ->
@@ -2141,18 +2152,19 @@ do_handle_agent(DefUserId, DefMod,
"~n TargetName: ~p"
"~n Config: ~p",
[UserId2, TargetName, Config]),
- Config2 = ensure_present([{address, Addr}, {port, Port}],
- Config),
+ Config2 =
+ ensure_present(
+ [{tdomain, Domain}, {taddress, Addr}], Config),
Config3 = [{reg_type, target_name} | Config2],
- case snmpm_config:register_agent(UserId2,
- TargetName, Config3) of
+ case snmpm_config:register_agent(
+ UserId2, TargetName, Config3) of
ok ->
ok;
{error, Reason} ->
error_msg("failed registering agent - "
"handling agent "
"~p <~p,~p>: ~n~w",
- [TargetName, Addr, Port, Reason]),
+ [TargetName, Domain, Addr, Reason]),
ok
end;
_Ignore ->
@@ -2170,34 +2182,39 @@ do_handle_agent(DefUserId, DefMod,
%% Backward compatibillity crap
RegType = target_name,
- Target = mk_target_name(Addr, Port, default_agent_config()),
+ Target = mk_target_name(Domain, Addr, default_agent_config()),
case Type of
report ->
SnmpInform = SnmpInfo,
- handle_report(DefUserId, DefMod,
- RegType, Target, Addr, Port,
- SnmpInform, DefData, State);
+ handle_report(
+ DefUserId, DefMod,
+ RegType, Target, Domain, Addr,
+ SnmpInform, DefData, State);
inform ->
SnmpInform = SnmpInfo,
- handle_inform(DefUserId, DefMod, Ref,
- RegType, Target, Addr, Port,
- SnmpInform, DefData, State);
+ handle_inform(
+ DefUserId, DefMod, Ref,
+ RegType, Target, Domain, Addr,
+ SnmpInform, DefData, State);
trap ->
SnmpTrapInfo = SnmpInfo,
- handle_trap(DefUserId, DefMod,
- RegType, Target, Addr, Port,
- SnmpTrapInfo, DefData, State);
+ handle_trap(
+ DefUserId, DefMod,
+ RegType, Target, Domain, Addr,
+ SnmpTrapInfo, DefData, State);
_ ->
- error_msg("failed delivering ~w info to default user - "
- "regarding agent "
- "<~p,~p>: ~n~w", [Type, Addr, Port, SnmpInfo])
+ error_msg(
+ "failed delivering ~w info to default user - "
+ "regarding agent "
+ "<~p,~p>: ~n~w", [Type, Domain, Addr, SnmpInfo])
end;
T:E ->
- CallbackArgs = [Addr, Port, Type, SnmpInfo, DefData],
+ CallbackArgs =
+ [Domain_or_Ip, Addr_or_Port, Type, SnmpInfo, DefData],
handle_invalid_result(handle_agent, CallbackArgs, T, E)
end.
@@ -2215,50 +2232,51 @@ ensure_present([{Key, _Val} = Elem|Ensure], Config) ->
%% Retrieve user info for this agent.
%% If this is an unknown agent, then use the default user
-handle_snmp_trap(#trappdu{enterprise = Enteprise,
- generic_trap = Generic,
- specific_trap = Spec,
- time_stamp = Timestamp,
- varbinds = Varbinds} = Trap,
- Addr, Port, State) ->
-
- ?vtrace("handle_snmp_trap [trappdu] -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Trap: ~p", [Addr, Port, Trap]),
+handle_snmp_trap(
+ #trappdu{enterprise = Enteprise,
+ generic_trap = Generic,
+ specific_trap = Spec,
+ time_stamp = Timestamp,
+ varbinds = Varbinds} = Trap, Domain, Addr, State) ->
+
+ ?vtrace("handle_snmp_trap [trappdu] -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " Trap: ~p", [Domain, Addr, Trap]),
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpTrapInfo = {Enteprise, Generic, Spec, Timestamp, Varbinds2},
- do_handle_snmp_trap(SnmpTrapInfo, Addr, Port, State);
+ do_handle_snmp_trap(SnmpTrapInfo, Domain, Addr, State);
handle_snmp_trap(#pdu{error_status = EStatus,
error_index = EIndex,
varbinds = Varbinds} = Trap,
- Addr, Port, State) ->
+ Domain, Addr, State) ->
- ?vtrace("handle_snmp_trap [pdu] -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Trap: ~p", [Addr, Port, Trap]),
+ ?vtrace("handle_snmp_trap [pdu] -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " Trap: ~p", [Domain, Addr, Trap]),
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpTrapInfo = {EStatus, EIndex, Varbinds2},
- do_handle_snmp_trap(SnmpTrapInfo, Addr, Port, State);
+ do_handle_snmp_trap(SnmpTrapInfo, Domain, Addr, State);
-handle_snmp_trap(CrapTrap, Addr, Port, _State) ->
+handle_snmp_trap(CrapTrap, Domain, Addr, _State) ->
error_msg("received crap (snmp) trap from ~w:~w =>"
- "~p", [Addr, Port, CrapTrap]),
+ "~p", [Domain, Addr, CrapTrap]),
ok.
-do_handle_snmp_trap(SnmpTrapInfo, Addr, Port, State) ->
- case snmpm_config:get_agent_user_info(Addr, Port) of
+do_handle_snmp_trap(SnmpTrapInfo, Domain, Addr, State) ->
+ case snmpm_config:get_agent_user_info(Domain, Addr) of
{ok, UserId, Target, RegType} ->
?vtrace("handle_snmp_trap -> found user: ~p", [UserId]),
case snmpm_config:user_info(UserId) of
{ok, Mod, Data} ->
- handle_trap(UserId, Mod,
- RegType, Target, Addr, Port,
- SnmpTrapInfo, Data, State);
+ handle_trap(
+ UserId, Mod,
+ RegType, Target, Domain, Addr,
+ SnmpTrapInfo, Data, State);
Error1 ->
%% User no longer exists, unregister agent
@@ -2270,66 +2288,72 @@ do_handle_snmp_trap(SnmpTrapInfo, Addr, Port, State) ->
%% Try use the default user
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_agent(DefUserId, DefMod,
- Addr, Port,
- trap, ignore,
- SnmpTrapInfo, DefData, State);
+ handle_agent(
+ DefUserId, DefMod,
+ Domain, Addr,
+ trap, ignore,
+ SnmpTrapInfo, DefData, State);
Error2 ->
- error_msg("failed retreiving the default "
- "user info handling report from "
- "~p <~p,~p>: ~n~w~n~w",
- [Target, Addr, Port,
- Error2, SnmpTrapInfo])
+ error_msg(
+ "failed retreiving the default "
+ "user info handling report from "
+ "~p <~p,~p>: ~n~w~n~w",
+ [Target, Domain, Addr,
+ Error2, SnmpTrapInfo])
end;
Error3 ->
%% Failed unregister agent,
%% now its getting messy...
- warning_msg("failed unregister agent ~p <~p,~p> "
- "belonging to non-existing "
- "user ~p, handling trap: "
- "~n Error: ~w"
- "~n Trap info: ~w",
- [Target, Addr, Port, UserId,
- Error3, SnmpTrapInfo])
+ warning_msg(
+ "failed unregister agent ~p <~p,~p> "
+ "belonging to non-existing "
+ "user ~p, handling trap: "
+ "~n Error: ~w"
+ "~n Trap info: ~w",
+ [Target, Domain, Addr, UserId,
+ Error3, SnmpTrapInfo])
end
end;
Error4 ->
%% Unknown agent, pass it on to the default user
?vlog("[trap] failed retreiving user id for agent <~p,~p>: "
- "~n ~p", [Addr, Port, Error4]),
+ "~n ~p", [Domain, Addr, Error4]),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_agent(DefUserId, DefMod,
- Addr, Port,
- trap, ignore,
- SnmpTrapInfo, DefData, State);
+ handle_agent(
+ DefUserId, DefMod,
+ Domain, Addr,
+ trap, ignore,
+ SnmpTrapInfo, DefData, State);
Error5 ->
- error_msg("failed retreiving "
- "the default user info handling trap from "
- "<~p,~p>: ~n~w~n~w",
- [Addr, Port, Error5, SnmpTrapInfo])
+ error_msg(
+ "failed retreiving "
+ "the default user info handling trap from "
+ "<~p,~p>: ~n~w~n~w",
+ [Domain, Addr, Error5, SnmpTrapInfo])
end
end,
ok.
-handle_trap(UserId, Mod,
- RegType, Target, Addr, Port, SnmpTrapInfo, Data, State) ->
+handle_trap(
+ UserId, Mod, RegType, Target, Domain, Addr, SnmpTrapInfo, Data, State) ->
?vtrace("handle_trap -> entry with"
"~n UserId: ~p"
"~n Mod: ~p", [UserId, Mod]),
F = fun() ->
- do_handle_trap(UserId, Mod,
- RegType, Target, Addr, Port,
- SnmpTrapInfo, Data, State)
+ do_handle_trap(
+ UserId, Mod,
+ RegType, Target, Domain, Addr,
+ SnmpTrapInfo, Data, State)
end,
handle_callback(F),
ok.
-do_handle_trap(UserId, Mod,
- RegType, Target, Addr, Port, SnmpTrapInfo, Data, _State) ->
+do_handle_trap(
+ UserId, Mod, RegType, Target, Domain, Addr, SnmpTrapInfo, Data, _State) ->
?vdebug("do_handle_trap -> entry with"
"~n UserId: ~p", [UserId]),
{HandleTrap, CallbackArgs} =
@@ -2338,8 +2362,9 @@ do_handle_trap(UserId, Mod,
{fun() -> Mod:handle_trap(Target, SnmpTrapInfo, Data) end,
[Target, SnmpTrapInfo, Data]};
addr_port ->
- {fun() -> Mod:handle_trap(Addr, Port, SnmpTrapInfo, Data) end,
- [Addr, Port, SnmpTrapInfo, Data]}
+ {Ip, Port} = Addr,
+ {fun() -> Mod:handle_trap(Ip, Port, SnmpTrapInfo, Data) end,
+ [Ip, Port, SnmpTrapInfo, Data]}
end,
try HandleTrap() of
@@ -2347,9 +2372,10 @@ do_handle_trap(UserId, Mod,
?vtrace("do_handle_trap -> register: "
"~n UserId2: ~p"
"~n Config: ~p", [UserId2, Config]),
- Target2 = mk_target_name(Addr, Port, Config),
- Config2 = [{reg_type, target_name},
- {address, Addr}, {port, Port} | Config],
+ Target2 = mk_target_name(Domain, Addr, Config),
+ Config2 =
+ [{reg_type, target_name},
+ {tdomain, Domain}, {taddress, Addr} | Config],
case snmpm_config:register_agent(UserId2, Target2, Config2) of
ok ->
ok;
@@ -2357,7 +2383,7 @@ do_handle_trap(UserId, Mod,
error_msg("failed registering agent "
"handling trap "
"<~p,~p>: ~n~w",
- [Addr, Port, Reason]),
+ [Domain, Addr, Reason]),
ok
end;
{register, UserId2, Target2, Config} ->
@@ -2375,20 +2401,19 @@ do_handle_trap(UserId, Mod,
error_msg("failed registering agent "
"handling trap "
"~p <~p,~p>: ~n~w",
- [Target2, Addr, Port, Reason]),
+ [Target2, Domain, Addr, Reason]),
reply
end;
unregister ->
?vtrace("do_handle_trap -> unregister", []),
- case snmpm_config:unregister_agent(UserId,
- Addr, Port) of
+ case snmpm_config:unregister_agent(UserId, Domain, Addr) of
ok ->
ok;
{error, Reason} ->
error_msg("failed unregistering agent "
"handling trap "
"<~p,~p>: ~n~w",
- [Addr, Port, Reason]),
+ [Domain, Addr, Reason]),
ok
end;
ignore ->
@@ -2405,28 +2430,30 @@ do_handle_trap(UserId, Mod,
end.
-handle_snmp_inform(Ref,
- #pdu{error_status = EStatus,
- error_index = EIndex,
- varbinds = Varbinds} = Pdu, Addr, Port, State) ->
+handle_snmp_inform(
+ Ref,
+ #pdu{error_status = EStatus,
+ error_index = EIndex,
+ varbinds = Varbinds} = Pdu, Domain, Addr, State) ->
- ?vtrace("handle_snmp_inform -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Pdu: ~p", [Addr, Port, Pdu]),
+ ?vtrace("handle_snmp_inform -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " Pdu: ~p", [Domain, Addr, Pdu]),
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpInform = {EStatus, EIndex, Varbinds2},
- case snmpm_config:get_agent_user_info(Addr, Port) of
+ case snmpm_config:get_agent_user_info(Domain, Addr) of
{ok, UserId, Target, RegType} ->
case snmpm_config:user_info(UserId) of
{ok, Mod, Data} ->
?vdebug("[inform] callback handle_inform with: "
"~n UserId: ~p"
"~n Mod: ~p", [UserId, Mod]),
- handle_inform(UserId, Mod, Ref,
- RegType, Target, Addr, Port,
- SnmpInform, Data, State);
+ handle_inform(
+ UserId, Mod, Ref,
+ RegType, Target, Domain, Addr,
+ SnmpInform, Data, State);
Error1 ->
%% User no longer exists, unregister agent
case snmpm_config:unregister_agent(UserId, Target) of
@@ -2437,15 +2464,16 @@ handle_snmp_inform(Ref,
"~n ~p", [UserId, Error1]),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_agent(DefUserId, DefMod,
- Addr, Port,
- inform, Ref,
- SnmpInform, DefData, State);
+ handle_agent(
+ DefUserId, DefMod,
+ Domain, Addr,
+ inform, Ref,
+ SnmpInform, DefData, State);
Error2 ->
error_msg("failed retreiving the default "
"user info handling inform from "
"~p <~p,~p>: ~n~w~n~w",
- [Target, Addr, Port,
+ [Target, Domain, Addr,
Error2, Pdu])
end;
Error3 ->
@@ -2456,7 +2484,7 @@ handle_snmp_inform(Ref,
"user ~p, handling inform: "
"~n Error: ~w"
"~n Pdu: ~w",
- [Target, Addr, Port, UserId,
+ [Target, Domain, Addr, UserId,
Error3, Pdu])
end
end;
@@ -2464,42 +2492,46 @@ handle_snmp_inform(Ref,
Error4 ->
%% Unknown agent, pass it on to the default user
?vlog("[inform] failed retreiving user id for agent <~p,~p>: "
- "~n ~p", [Addr, Port, Error4]),
+ "~n ~p", [Domain, Addr, Error4]),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
- handle_agent(DefUserId, DefMod,
- Addr, Port,
- inform, Ref,
- SnmpInform, DefData, State);
+ handle_agent(
+ DefUserId, DefMod,
+ Domain, Addr,
+ inform, Ref,
+ SnmpInform, DefData, State);
Error5 ->
error_msg("failed retreiving "
"the default user info handling inform from "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, Error5, Pdu])
+ [Domain, Addr, Error5, Pdu])
end
end,
ok;
-handle_snmp_inform(_Ref, CrapInform, Addr, Port, _State) ->
+handle_snmp_inform(_Ref, CrapInform, Domain, Addr, _State) ->
error_msg("received crap (snmp) inform from ~w:~w =>"
- "~p", [Addr, Port, CrapInform]),
+ "~p", [Domain, Addr, CrapInform]),
ok.
-handle_inform(UserId, Mod, Ref,
- RegType, Target, Addr, Port, SnmpInform, Data, State) ->
+handle_inform(
+ UserId, Mod, Ref,
+ RegType, Target, Domain, Addr, SnmpInform, Data, State) ->
?vtrace("handle_inform -> entry with"
"~n UserId: ~p"
"~n Mod: ~p", [UserId, Mod]),
F = fun() ->
- do_handle_inform(UserId, Mod, Ref,
- RegType, Target, Addr, Port, SnmpInform,
- Data, State)
+ do_handle_inform(
+ UserId, Mod, Ref,
+ RegType, Target, Domain, Addr, SnmpInform,
+ Data, State)
end,
handle_callback(F),
ok.
-do_handle_inform(UserId, Mod, Ref,
- RegType, Target, Addr, Port, SnmpInform, Data, State) ->
+do_handle_inform(
+ UserId, Mod, Ref,
+ RegType, Target, Domain, Addr, SnmpInform, Data, State) ->
?vdebug("do_handle_inform -> entry with"
"~n UserId: ~p", [UserId]),
{HandleInform, CallbackArgs} =
@@ -2508,8 +2540,9 @@ do_handle_inform(UserId, Mod, Ref,
{fun() -> Mod:handle_inform(Target, SnmpInform, Data) end,
[Target, SnmpInform, Data]};
addr_port ->
- {fun() -> Mod:handle_inform(Addr, Port, SnmpInform, Data) end,
- [Addr, Port, SnmpInform, Data]}
+ {Ip, Port} = Addr,
+ {fun() -> Mod:handle_inform(Ip, Port, SnmpInform, Data) end,
+ [Ip, Port, SnmpInform, Data]}
end,
Rep =
@@ -2520,9 +2553,11 @@ do_handle_inform(UserId, Mod, Ref,
"~n Config: ~p", [UserId2, Config]),
%% The only user which would do this is the
%% default user
- Target2 = mk_target_name(Addr, Port, Config),
- Config2 = [{reg_type, target_name},
- {address, Addr}, {port, Port} | Config],
+ Target2 = mk_target_name(Domain, Addr, Config),
+ Config2 =
+ [{reg_type, target_name} |
+ ensure_present(
+ [{tdomain, Domain}, {taddress, Addr}], Config)],
case snmpm_config:register_agent(UserId2, Target2, Config2) of
ok ->
reply;
@@ -2530,7 +2565,7 @@ do_handle_inform(UserId, Mod, Ref,
error_msg("failed registering agent "
"handling inform "
"~p <~p,~p>: ~n~w",
- [Target2, Addr, Port, Reason]),
+ [Target2, Domain, Addr, Reason]),
reply
end;
@@ -2549,21 +2584,21 @@ do_handle_inform(UserId, Mod, Ref,
error_msg("failed registering agent "
"handling inform "
"~p <~p,~p>: ~n~w",
- [Target2, Addr, Port, Reason]),
+ [Target2, Domain, Addr, Reason]),
reply
end;
unregister ->
?vtrace("do_handle_inform -> unregister", []),
- case snmpm_config:unregister_agent(UserId,
- Addr, Port) of
+ case snmpm_config:unregister_agent(
+ UserId, Domain, Addr) of
ok ->
reply;
{error, Reason} ->
error_msg("failed unregistering agent "
"handling inform "
"<~p,~p>: ~n~w",
- [Addr, Port, Reason]),
+ [Domain, Addr, Reason]),
reply
end;
@@ -2576,8 +2611,8 @@ do_handle_inform(UserId, Mod, Ref,
reply;
InvalidResult ->
- handle_invalid_result(handle_inform, CallbackArgs,
- InvalidResult),
+ handle_invalid_result(
+ handle_inform, CallbackArgs, InvalidResult),
reply
catch
@@ -2586,31 +2621,34 @@ do_handle_inform(UserId, Mod, Ref,
reply
end,
- handle_inform_response(Rep, Ref, Addr, Port, State),
+ handle_inform_response(Rep, Ref, Domain, Addr, State),
ok.
-handle_inform_response(_, ignore, _Addr, _Port, _State) ->
+handle_inform_response(_, ignore, _Domain, _Addr, _State) ->
ignore;
-handle_inform_response(no_reply, _Ref, _Addr, _Port, _State) ->
+handle_inform_response(no_reply, _Ref, _Domain, _Addr, _State) ->
no_reply;
-handle_inform_response(_, Ref, Addr, Port,
- #state{net_if = Pid, net_if_mod = Mod}) ->
+handle_inform_response(
+ _, Ref, Domain, Addr,
+ #state{net_if = Pid, net_if_mod = Mod}) ->
?vdebug("handle_inform -> response", []),
- (catch Mod:inform_response(Pid, Ref, Addr, Port)).
+ (catch Mod:inform_response(Pid, Ref, Domain, Addr)).
-handle_snmp_report(#pdu{error_status = EStatus,
- error_index = EIndex,
- varbinds = Varbinds} = Pdu, Addr, Port, State) ->
+handle_snmp_report(
+ #pdu{error_status = EStatus,
+ error_index = EIndex,
+ varbinds = Varbinds} = Pdu,
+ Domain, Addr, State) ->
- ?vtrace("handle_snmp_report -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Pdu: ~p", [Addr, Port, Pdu]),
+ ?vtrace("handle_snmp_report -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " Pdu: ~p", [Domain, Addr, Pdu]),
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpReport = {EStatus, EIndex, Varbinds2},
- case snmpm_config:get_agent_user_info(Addr, Port) of
+ case snmpm_config:get_agent_user_info(Domain, Addr) of
{ok, UserId, Target, RegType} ->
case snmpm_config:user_info(UserId) of
{ok, Mod, Data} ->
@@ -2620,7 +2658,7 @@ handle_snmp_report(#pdu{error_status = EStatus,
"~n ~p"
"~n ~p", [UserId, Mod, Target, SnmpReport]),
handle_report(UserId, Mod,
- RegType, Target, Addr, Port,
+ RegType, Target, Domain, Addr,
SnmpReport, Data, State);
Error1 ->
%% User no longer exists, unregister agent
@@ -2633,7 +2671,7 @@ handle_snmp_report(#pdu{error_status = EStatus,
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
handle_agent(DefUserId, DefMod,
- Addr, Port,
+ Domain, Addr,
report, ignore,
SnmpReport, DefData, State);
@@ -2641,7 +2679,7 @@ handle_snmp_report(#pdu{error_status = EStatus,
error_msg("failed retreiving the default "
"user info handling report from "
"~p <~p,~p>: ~n~w~n~w",
- [Target, Addr, Port,
+ [Target, Domain, Addr,
Error2, Pdu])
end;
Error3 ->
@@ -2652,7 +2690,7 @@ handle_snmp_report(#pdu{error_status = EStatus,
"user ~p, handling report: "
"~n Error: ~w"
"~n Report: ~w",
- [Target, Addr, Port, UserId,
+ [Target, Domain, Addr, UserId,
Error3, Pdu])
end
end;
@@ -2660,25 +2698,25 @@ handle_snmp_report(#pdu{error_status = EStatus,
Error4 ->
%% Unknown agent, pass it on to the default user
?vlog("[report] failed retreiving user id for agent <~p,~p>: "
- "~n ~p", [Addr, Port, Error4]),
+ "~n ~p", [Domain, Addr, Error4]),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
handle_agent(DefUserId, DefMod,
- Addr, Port,
+ Domain, Addr,
report, ignore,
SnmpReport, DefData, State);
Error5 ->
error_msg("failed retreiving "
"the default user info handling report from "
"<~p,~p>: ~n~w~n~w",
- [Addr, Port, Error5, Pdu])
+ [Domain, Addr, Error5, Pdu])
end
end,
ok;
-handle_snmp_report(CrapReport, Addr, Port, _State) ->
+handle_snmp_report(CrapReport, Domain, Addr, _State) ->
error_msg("received crap (snmp) report from ~w:~w =>"
- "~p", [Addr, Port, CrapReport]),
+ "~p", [Domain, Addr, CrapReport]),
ok.
%% This could be from a failed get-request, so we might have a user
@@ -2686,20 +2724,20 @@ handle_snmp_report(CrapReport, Addr, Port, _State) ->
%% get-response (except for tha data which is different). Otherwise,
%% we handle it as an error (reported via the handle_error callback
%% function).
-handle_snmp_report(ReqId,
- #pdu{error_status = EStatus,
- error_index = EIndex,
- varbinds = Varbinds} = Pdu,
- {ReportReason, Info} = Rep,
- Addr, Port, State)
- when is_integer(ReqId) ->
-
- ?vtrace("handle_snmp_report -> entry with"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n ReqId: ~p"
- "~n Rep: ~p"
- "~n Pdu: ~p", [Addr, Port, ReqId, Rep, Pdu]),
+handle_snmp_report(
+ ReqId,
+ #pdu{error_status = EStatus,
+ error_index = EIndex,
+ varbinds = Varbinds} = Pdu,
+ {ReportReason, Info} = Rep,
+ Domain, Addr, State) when is_integer(ReqId) ->
+
+ ?vtrace("handle_snmp_report -> entry with~n"
+ " Domain: ~p~n"
+ " Addr: ~p~n"
+ " ReqId: ~p~n"
+ " Rep: ~p~n"
+ " Pdu: ~p", [Domain, Addr, ReqId, Rep, Pdu]),
Varbinds2 = fix_vbs_BITS(Varbinds),
SnmpReport = {EStatus, EIndex, Varbinds2},
@@ -2744,7 +2782,7 @@ handle_snmp_report(ReqId,
%% Either not a sync request or no such request. Either
%% way, this is error info, so handle it as such.
- case snmpm_config:get_agent_user_id(Addr, Port) of
+ case snmpm_config:get_agent_user_id(Domain, Addr) of
{ok, UserId} ->
case snmpm_config:user_info(UserId) of
{ok, Mod, Data} ->
@@ -2768,7 +2806,7 @@ handle_snmp_report(ReqId,
"default user "
"info handling report from "
"<~p,~p>: ~n~w~n~w~n~w",
- [Addr, Port, Error,
+ [Domain, Addr, Error,
ReqId, Reason])
end
end;
@@ -2776,7 +2814,7 @@ handle_snmp_report(ReqId,
%% Unknown agent, pass it on to the default user
?vlog("[report] failed retreiving user id for "
"agent <~p,~p>: "
- "~n ~p", [Addr, Port, Error]),
+ "~n ~p", [Domain, Addr, Error]),
case snmpm_config:user_info() of
{ok, DefUserId, DefMod, DefData} ->
handle_error(DefUserId, DefMod, Reason, ReqId,
@@ -2786,32 +2824,36 @@ handle_snmp_report(ReqId,
"the default user info handling "
"report from "
"<~p,~p>: ~n~w~n~w~n~w",
- [Addr, Port, Error, ReqId, Reason])
+ [Domain, Addr, Error, ReqId, Reason])
end
end
end,
ok;
-handle_snmp_report(CrapReqId, CrapReport, CrapInfo, Addr, Port, _State) ->
- error_msg("received crap (snmp) report from ~w:~w =>"
- "~n~p~n~p~n~p", [Addr, Port, CrapReqId, CrapReport, CrapInfo]),
+handle_snmp_report(CrapReqId, CrapReport, CrapInfo, Domain, Addr, _State) ->
+ error_msg(
+ "received crap (snmp) report from ~w:~w =>"
+ "~n~p~n~p~n~p",
+ [Domain, Addr, CrapReqId, CrapReport, CrapInfo]),
ok.
-handle_report(UserId, Mod, RegType, Target, Addr, Port,
+handle_report(UserId, Mod, RegType, Target, Domain, Addr,
SnmpReport, Data, State) ->
?vtrace("handle_report -> entry with"
"~n UserId: ~p"
"~n Mod: ~p", [UserId, Mod]),
F = fun() ->
- do_handle_report(UserId, Mod, RegType, Target, Addr, Port,
- SnmpReport, Data, State)
+ do_handle_report(
+ UserId, Mod, RegType, Target, Domain, Addr,
+ SnmpReport, Data, State)
end,
handle_callback(F),
ok.
-do_handle_report(UserId, Mod,
- RegType, Target, Addr, Port, SnmpReport, Data, _State) ->
+do_handle_report(
+ UserId, Mod, RegType, Target, Domain, Addr,
+ SnmpReport, Data, _State) ->
?vdebug("do_handle_report -> entry with"
"~n UserId: ~p", [UserId]),
{HandleReport, CallbackArgs} =
@@ -2820,8 +2862,9 @@ do_handle_report(UserId, Mod,
{fun() -> Mod:handle_report(Target, SnmpReport, Data) end,
[Target, SnmpReport, Data]};
addr_port ->
- {fun() -> Mod:handle_report(Addr, Port, SnmpReport, Data) end,
- [Addr, Port, SnmpReport, Data]}
+ {Ip, Port} = Addr,
+ {fun() -> Mod:handle_report(Ip, Port, SnmpReport, Data) end,
+ [Ip, Port, SnmpReport, Data]}
end,
try HandleReport() of
@@ -2831,17 +2874,18 @@ do_handle_report(UserId, Mod,
"~n Config: ~p", [UserId2, Config]),
%% The only user which would do this is the
%% default user
- Target2 = mk_target_name(Addr, Port, Config),
- Config2 = [{reg_type, target_name},
- {address, Addr}, {port, Port} | Config],
+ Target2 = mk_target_name(Domain, Addr, Config),
+ Config2 =
+ [{reg_type, target_name},
+ {tdomain, Domain}, {taddress, Addr} | Config],
case snmpm_config:register_agent(UserId2, Target2, Config2) of
ok ->
ok;
{error, Reason} ->
error_msg("failed registering agent "
"handling report "
- "<~p,~p>: ~n~w",
- [Addr, Port, Reason]),
+ "<~p,~p>: ~n~w",
+ [Domain, Addr, Reason]),
ok
end;
@@ -2860,21 +2904,20 @@ do_handle_report(UserId, Mod,
error_msg("failed registering agent "
"handling report "
"~p <~p,~p>: ~n~w",
- [Target2, Addr, Port, Reason]),
+ [Target2, Domain, Addr, Reason]),
reply
end;
unregister ->
?vtrace("do_handle_trap -> unregister", []),
- case snmpm_config:unregister_agent(UserId,
- Addr, Port) of
+ case snmpm_config:unregister_agent(UserId, Domain, Addr) of
ok ->
ok;
{error, Reason} ->
error_msg("failed unregistering agent "
"handling report "
"<~p,~p>: ~n~w",
- [Addr, Port, Reason]),
+ [Domain, Addr, Reason]),
ok
end;
@@ -3012,50 +3055,49 @@ do_gc(Key, Now) ->
%%
%%----------------------------------------------------------------------
-send_get_request(Oids, Vsn, MsgData, Domain, Addr, Port, ExtraInfo,
+send_get_request(Oids, Vsn, MsgData, Domain, Addr, ExtraInfo,
#state{net_if = NetIf,
net_if_mod = Mod,
mini_mib = MiniMIB}) ->
Pdu = make_pdu(get, Oids, MiniMIB),
- ?vtrace("send_get_request -> send get-request:"
- "~n Mod: ~p"
- "~n NetIf: ~p"
- "~n Pdu: ~p"
- "~n Vsn: ~p"
- "~n MsgData: ~p"
- "~n Domain: ~p"
- "~n Addr: ~p"
- "~n Port: ~p",
- [Mod, NetIf, Pdu, Vsn, MsgData, Domain, Addr, Port]),
+ ?vtrace("send_get_request -> send get-request:~n"
+ " Mod: ~p~n"
+ " NetIf: ~p~n"
+ " Pdu: ~p~n"
+ " Vsn: ~p~n"
+ " MsgData: ~p~n"
+ " Domain: ~p~n"
+ " Addr: ~p",
+ [Mod, NetIf, Pdu, Vsn, MsgData, Domain, Addr]),
Res = (catch Mod:send_pdu(NetIf, Pdu, Vsn, MsgData,
- Domain, Addr, Port, ExtraInfo)),
+ Domain, Addr, ExtraInfo)),
?vtrace("send_get_request -> send result:"
"~n ~p", [Res]),
Pdu#pdu.request_id.
-send_get_next_request(Oids, Vsn, MsgData, Domain, Addr, Port, ExtraInfo,
+send_get_next_request(Oids, Vsn, MsgData, Domain, Addr, ExtraInfo,
#state{mini_mib = MiniMIB,
net_if = NetIf,
net_if_mod = Mod}) ->
Pdu = make_pdu(get_next, Oids, MiniMIB),
- Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo),
+ Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo),
Pdu#pdu.request_id.
-send_get_bulk_request(Oids, Vsn, MsgData, Domain, Addr, Port,
+send_get_bulk_request(Oids, Vsn, MsgData, Domain, Addr,
NonRep, MaxRep, ExtraInfo,
#state{mini_mib = MiniMIB,
net_if = NetIf,
net_if_mod = Mod}) ->
Pdu = make_pdu(bulk, {NonRep, MaxRep, Oids}, MiniMIB),
- Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo),
+ Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo),
Pdu#pdu.request_id.
-send_set_request(VarsAndVals, Vsn, MsgData, Domain, Addr, Port, ExtraInfo,
+send_set_request(VarsAndVals, Vsn, MsgData, Domain, Addr, ExtraInfo,
#state{mini_mib = MiniMIB,
net_if = NetIf,
net_if_mod = Mod}) ->
Pdu = make_pdu(set, VarsAndVals, MiniMIB),
- Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, Port, ExtraInfo),
+ Mod:send_pdu(NetIf, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo),
Pdu#pdu.request_id.
%% send_discovery(Vsn, MsgData, Addr, Port, ExtraInfo,
@@ -3291,10 +3333,9 @@ agent_data(TargetName, SendOpts) ->
{Comm, SecModel}
end,
Domain = agent_data_item(tdomain, TargetName),
- Addr = agent_data_item(address, TargetName),
- Port = agent_data_item(port, TargetName),
+ Addr = agent_data_item(taddress, TargetName),
RegType = agent_data_item(reg_type, TargetName),
- {ok, RegType, Domain, Addr, Port, version(Version), MsgData};
+ {ok, RegType, Domain, Addr, version(Version), MsgData};
Error ->
Error
end.
@@ -3440,9 +3481,9 @@ maybe_demonitor(MonRef) ->
t() ->
{A,B,C} = erlang:now(),
A*1000000000+B*1000+(C div 1000).
-
-mk_target_name(Addr, Port, Config) ->
- snmpm_config:mk_target_name(Addr, Port, Config).
+
+mk_target_name(Domain, Addr, Config) ->
+ snmpm_config:mk_target_name(Domain, Addr, Config).
default_agent_config() ->
case snmpm_config:agent_info() of
diff --git a/lib/snmp/src/manager/snmpm_user.erl b/lib/snmp/src/manager/snmpm_user.erl
index e6b0b6943e..8e5a874f77 100644
--- a/lib/snmp/src/manager/snmpm_user.erl
+++ b/lib/snmp/src/manager/snmpm_user.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,20 +39,25 @@
%% *** handle_error ***
%% An "asynchronous" error has been detected
--callback handle_error(ReqId :: integer(),
- Reason :: {unexpected_pdu, SnmpInfo :: snmp_gen_info()} |
- {invalid_sec_info, SecInfo :: term(), SnmpInfo :: snmp_gen_info()} |
- {empty_message, Addr :: ip_address(), Port :: port_number()} |
- term(),
- UserData :: term()) ->
+-callback handle_error(
+ ReqId :: integer(),
+ Reason :: {unexpected_pdu, SnmpInfo :: snmp_gen_info()} |
+ {invalid_sec_info,
+ SecInfo :: term(),
+ SnmpInfo :: snmp_gen_info()} |
+ {empty_message,
+ TransportDomain :: atom(),
+ {Addr :: ip_address(), Port :: port_number()}} |
+ term(),
+ UserData :: term()) ->
snmp:void().
%% *** handle_agent ***
%% A message was received from an unknown agent
--callback handle_agent(Addr :: term(),
- Port :: pos_integer(),
+-callback handle_agent(Domain :: atom(),
+ Address :: term(),
Type :: pdu | trap | inform | report,
SnmpInfo :: snmp_gen_info() | snmp_v1_trap_info(),
UserData :: term()) ->
diff --git a/lib/snmp/src/manager/snmpm_user_default.erl b/lib/snmp/src/manager/snmpm_user_default.erl
index 015198cb76..b827713f27 100644
--- a/lib/snmp/src/manager/snmpm_user_default.erl
+++ b/lib/snmp/src/manager/snmpm_user_default.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,13 +36,13 @@ handle_error(ReqId, Reason, UserData) ->
ignore.
-handle_agent(Addr, Port, Type, SnmpInfo, UserData) ->
- info("received handle_agent:"
- "~n Addr: ~p"
- "~n Port: ~p"
- "~n Type: ~p"
- "~n SnmpInfo: ~p"
- "~n UserData: ~p", [Addr, Port, Type, SnmpInfo, UserData]),
+handle_agent(Domain, Address, Type, SnmpInfo, UserData) ->
+ info("received handle_agent:~n"
+ " Domain: ~p~n"
+ " Address: ~p~n"
+ " Type: ~p~n"
+ " SnmpInfo: ~p~n"
+ " UserData: ~p", [Domain, Address, Type, SnmpInfo, UserData]),
ignore.
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index 46625989d5..153c8070c2 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,35 +25,42 @@
%% External exports
%% Avoid warning for local function error/1 clashing with autoimported BIF.
-compile({no_auto_import,[error/1]}).
--export([read_files/2, read/2]).
+-export([read_files/2, no_gen/2, no_order/2, no_filter/1, keyorder/4]).
+-export([read/2, read/3]).
%% Basic (type) check functions
-export([check_mandatory/2,
check_integer/1, check_integer/2,
-
+
check_string/1, check_string/2,
- check_atom/2,
+ check_atom/2,
check_timer/1,
- all_domains/0,
- check_domain/1,
- all_tdomains/0,
- check_tdomain/1,
- mk_tdomain/1,
- which_domain/1,
- check_ip/1, check_ip/2,
- check_taddress/1, check_taddress/2,
- mk_taddress/3,
-
- check_packet_size/1,
+ all_domains/0,
+ check_domain/1,
+ domain_to_name/1,
+ all_tdomains/0,
+ check_tdomain/1,
+ mk_tdomain/0, mk_tdomain/1,
+ tdomain_to_family/1, tdomain_to_domain/1,
+ which_domain/1,
+ mk_addr_string/1,
+ check_ip/1, check_ip/2,
+ check_port/1,
+%% ip_port_to_domaddr/2,
+ check_address/2, check_address/3,
+ check_taddress/2,
+ mk_taddress/1, mk_taddress/2,
+
+ check_packet_size/1,
check_oid/1,
- check_imask/1, check_emask/1,
-
- check_mp_model/1,
- check_sec_model/1, check_sec_model/2, check_sec_model/3,
+ check_imask/1, check_emask/1,
+
+ check_mp_model/1,
+ check_sec_model/1, check_sec_model/2, check_sec_model/3,
check_sec_level/1,
all_integer/1
@@ -70,17 +77,53 @@
-include("snmp_verbosity.hrl").
+-define(is_word(P), (((P) band (bnot 65535)) =:= 0)).
+-define(is_word(P0, P1), ((((P0) bor (P1)) band (bnot 255)) =:= 0)).
+
+mk_word(B0, B1) -> ((B0) bsl 8) bor (B1).
+mk_bytes(W) -> [(W) bsr 8,(W) band 255].
+
+-define(
+ is_ipv4_addr(A0, A1, A2, A3),
+ ((((A0) bor (A1) bor (A2) bor (A3)) band (bnot 255)) =:= 0)).
+
+-define(
+ is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7),
+ ((((A0) bor (A1) bor (A2) bor (A3) bor (A4) bor (A5) bor (A6) bor (A7))
+ band (bnot 65535)) =:= 0)).
+-define(
+ is_ipv6_addr(
+ A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15),
+ ((((A0) bor (A1) bor (A2) bor (A3) bor
+ (A4) bor (A5) bor (A6) bor (A7) bor
+ (A8) bor (A9) bor (A10) bor (A11) bor
+ (A12) bor (A13) bor (A14) bor (A15))
+ band (bnot 65535)) =:= 0)).
+
+
%%-----------------------------------------------------------------
%% read_files(Dir, Files) -> Configs
%% Dir - string() - Full path to the config dir.
-%% Files - [{Gen, Filter, Check, FileName}]
+%% Files - [{FileName, Gen, Order, Check, Filter}]
+%% FileName - string() - Name of the config file.
%% Gen - function/2 - In case of failure when reading the config file,
%% this function is called to either generate a
%% default file or issue the error.
-%% Filter - function/1 - Filters all the config entries read from the file
-%% Check - function/1 - Check each entry as they are read from the file.
-%% FileName - string() - Name of the config file.
+%% Returns a generated config list corresponding
+%% to the written file.
+%% (Dir, Error) -> Configs.
+%% Order - function/2 - An ordering function that is used to process
+%% the read config entries using lists:sort/2.
+%% Returns true if arg 1 compares less than or
+%% equal to arg 2, false otherwise.
+%% Check - function/2 - Check each entry as they are read from the file.
+%% (Entry, State) ->
+%% {ok,NewState} | {{ok,NewEntry},NewState} |
+%% throw(Error)
+%% State =:= 'undefined' the first time.
+%% Filter - function/1 - Process all the config entries read from the file
+%% (Configs) -> [config_entry()].
%% Configs - [config_entry()]
%% config_entry() - term()
@@ -89,99 +132,143 @@ read_files(Dir, Files) when is_list(Dir) andalso is_list(Files) ->
read_files(_Dir, [], Res) ->
lists:reverse(Res);
-read_files(Dir, [{Gen, Filter, Check, FileName}|Files], Res)
- when is_function(Filter) andalso
- is_function(Check) andalso
- is_list(FileName) ->
- ?vdebug("read_files -> entry with"
- "~n FileName: ~p", [FileName]),
+read_files(Dir, [{FileName, Gen, Order, Check, Filter}|Files], Res)
+ when is_list(FileName),
+ is_function(Gen),
+ is_function(Order),
+ is_function(Check),
+ is_function(Filter) ->
+ ?vdebug("read_files -> entry with~n"
+ " FileName: ~p", [FileName]),
File = filename:join(Dir, FileName),
- case file:read_file_info(File) of
- {ok, _} ->
- Confs = read(File, Check),
- read_files(Dir, Files, [Filter(Confs)|Res]);
- {error, R} ->
- ?vlog("failed reading file info for ~s: "
- "~n ~p", [FileName, R]),
- Gen(Dir, R),
- read_files(Dir, Files, [Filter([])|Res])
- end.
-
+ Confs =
+ case file:read_file_info(File) of
+ {ok,_} ->
+ read(File, Order, Check);
+ {error, R} ->
+ ?vlog("failed reading file info for ~s: ~n"
+ " ~p", [FileName, R]),
+ Gen(Dir, R)
+ end,
+ read_files(Dir, Files, [Filter(Confs)|Res]).
+
+
+
+no_gen(_Dir, _R) -> [].
+no_order(_, _) -> true.
+no_filter(X) -> X.
+
+%% Order tuples on element N with Keys first in appearence order.
+%%
+%% An ordering function (A, B) shall return true iff
+%% A is less than or equal to B i.e shall return
+%% false iff A is to be ordered after B.
+keyorder(N, A, B, _) when element(N, A) == element(N, B) ->
+ true;
+keyorder(N, A, B, [Key | _])
+ when tuple_size(A) >= 1, element(N, B) == Key ->
+ false;
+keyorder(N, A, B, [Key | _])
+ when element(N, A) == Key, tuple_size(B) >= 1 ->
+ true;
+keyorder(N, A, B, [_ | Keys]) ->
+ keyorder(N, A, B, Keys);
+keyorder(_, A, B, []) when tuple_size(A) >= 1, tuple_size(B) >= 1 ->
+ %% Do not order other keys
+ true;
+keyorder(N, A, B, sort) ->
+ %% Order other keys according to standard sort order
+ element(N, A) =< element(N, B).
+
+
+read(File, Verify) ->
+ Check = fun (Row, State) -> {Verify(Row), State} end,
+ read(File, fun no_order/2, Check).
%% Ret. Res | exit(Reason)
-read(File, Check) when is_function(Check) ->
- ?vdebug("read -> entry with"
- "~n File: ~p", [File]),
-
+read(File, Order, Check) when is_function(Order), is_function(Check) ->
+ ?vdebug("read -> entry with~n"
+ " File: ~p", [File]),
Fd = open_file(File),
+ read_fd(File, Order, Check, Fd, 1, []).
- case loop(Fd, [], Check, 1, File) of
- {error, Reason} ->
- file:close(Fd),
- error(Reason);
- {ok, Res} ->
- file:close(Fd),
- Res
+read_fd(File, Order, Check, Fd, StartLine, Res) ->
+ case do_read(Fd, "", StartLine) of
+ {ok, Row, EndLine} ->
+ ?vtrace("read_fd ->~n"
+ " Row: ~p~n"
+ " EndLine: ~p", [Row,EndLine]),
+ read_fd(
+ File, Order, Check, Fd, EndLine,
+ [{StartLine, Row, EndLine}|Res]);
+ {error, Error, EndLine} ->
+ ?vtrace("read_fd -> read failure:~n"
+ " Error: ~p~n"
+ " EndLine: ~p", [Error,EndLine]),
+ file:close(Fd),
+ error({failed_reading, File, StartLine, EndLine, Error});
+ {eof, _EndLine} ->
+ Lines =
+ lists:sort(
+ fun ({_, RowA, _}, {_, RowB, _}) ->
+ Order(RowA, RowB)
+ end,
+ lists:reverse(Res)),
+ ?vtrace("read_fd to read_check ->~n"
+ " Lines: ~p", [Lines]),
+ read_check(File, Check, Lines, undefined, [])
end.
-open_file(File) ->
- case file:open(File, [read]) of
- {ok, Fd} ->
- Fd;
- {error, Reason} ->
- error({failed_open, File, Reason})
+read_check(_, _, [], _, Res) ->
+ lists:reverse(Res);
+read_check(File, Check, [{StartLine, Row, EndLine}|Lines], State, Res) ->
+ try Check(Row, State) of
+ {Rows, NewState} when is_list(Rows) ->
+ ?vtrace("read_check -> ok:~n"
+ " Rows: ~p~n", [Rows]),
+ read_check(File, Check, Lines, NewState, Rows ++ Res);
+ {ok, NewState} ->
+ ?vtrace("read_check -> ok", []),
+ read_check(File, Check, Lines, NewState, [Row | Res]);
+ {{ok, NewRow}, NewState} ->
+ ?vtrace("read_check -> ok:~n"
+ " NewRow: ~p~n", [NewRow]),
+ read_check(File, Check, Lines, NewState, [NewRow | Res])
+ catch
+ {error, Reason} ->
+ ?vtrace("read_check -> error:~n"
+ " Reason: ~p", [Reason]),
+ error({failed_check, File, StartLine, EndLine, Reason});
+ Class:Reason ->
+ Error = {Class,Reason,erlang:get_stacktrace()},
+ ?vtrace("read_check -> failure:~n"
+ " Error: ~p", [Error]),
+ error({failed_check, File, StartLine, EndLine, Error})
end.
-loop(Fd, Res, Check, StartLine, File) ->
- case do_read(Fd, "", StartLine) of
- {ok, Row, EndLine} ->
- ?vtrace("loop -> "
- "~n Row: ~p"
- "~n EndLine: ~p", [Row, EndLine]),
- case (catch Check(Row)) of
- ok ->
- ?vtrace("loop -> ok", []),
- loop(Fd, [Row | Res], Check, EndLine, File);
- {ok, NewRow} ->
- ?vtrace("loop -> ok: "
- "~n NewRow: ~p", [NewRow]),
- loop(Fd, [NewRow | Res], Check, EndLine, File);
- {error, Reason} ->
- ?vtrace("loop -> check error: "
- "~n Reason: ~p", [Reason]),
- {error, {failed_check, File, StartLine, EndLine, Reason}};
- Error ->
- ?vtrace("loop -> check failure: "
- "~n Error: ~p", [Error]),
- {error, {failed_check, File, StartLine, EndLine, Error}}
- end;
- {error, EndLine, Error} ->
- ?vtrace("loop -> read failure: "
- "~n Error: ~p", [Error]),
- {error, {failed_reading, File, StartLine, EndLine, Error}};
- eof ->
- {ok, Res}
+open_file(File) ->
+ case file:open(File, [read]) of
+ {ok, Fd} ->
+ Fd;
+ {error, Reason} ->
+ error({failed_open, File, Reason})
end.
-
do_read(Io, Prompt, StartLine) ->
case io:request(Io, {get_until,Prompt,erl_scan,tokens,[StartLine]}) of
- {ok, Toks, EndLine} ->
- case erl_parse:parse_term(Toks) of
- {ok, Term} ->
- {ok, Term, EndLine};
- {error, {Line, erl_parse, Error}} ->
- {error, Line, {parse_error, Error}}
- end;
- {error,E,EndLine} ->
- {error, EndLine, E};
- {eof, _EndLine} ->
- eof;
- Other ->
- Other
+ {ok, Toks, EndLine} ->
+ case erl_parse:parse_term(Toks) of
+ {ok, Term} ->
+ {ok, Term, EndLine};
+ {error, {Line, erl_parse, Error}} ->
+ {error, {parse_error, Error}, Line}
+ end;
+ Other ->
+ Other
end.
+
%%-----------------------------------------------------------------
@@ -384,7 +471,7 @@ all_tdomains() ->
check_tdomain(TDomain) ->
SupportedTDomains =
[
- ?snmpUDPDomain,
+ ?snmpUDPDomain, % Legacy
?transportDomainUdpIpv4,
?transportDomainUdpIpv6
],
@@ -404,6 +491,9 @@ check_tdomain(TDomain) ->
%% ---------
+mk_tdomain() ->
+ mk_tdomain(snmpUDPDomain).
+
mk_tdomain(snmpUDPDomain) ->
mk_tdomain(transportDomainUdpIpv4);
mk_tdomain(transportDomainUdpIpv4) ->
@@ -416,40 +506,64 @@ mk_tdomain(BadDomain) ->
%% ---------
-check_taddress(X) ->
- check_taddress(snmpUDPDomain, X).
+tdomain_to_family(snmpUDPDomain) ->
+ inet;
+tdomain_to_family(transportDomainUdpIpv4) ->
+ inet;
+tdomain_to_family(transportDomainUdpIpv6) ->
+ inet6;
+tdomain_to_family(?snmpUDPDomain) ->
+ inet;
+tdomain_to_family(?transportDomainUdpIpv4) ->
+ inet;
+tdomain_to_family(?transportDomainUdpIpv6) ->
+ inet6;
+tdomain_to_family(BadDomain) ->
+ error({bad_domain, BadDomain}).
+
+
+%% ---------
+
+tdomain_to_domain(?snmpUDPDomain) ->
+ snmpUDPDomain;
+tdomain_to_domain(?transportDomainUdpIpv4) ->
+ transportDomainUdpIpv4;
+tdomain_to_domain(?transportDomainUdpIpv6) ->
+ transportDomainUdpIpv6;
+tdomain_to_domain(BadTDomain) ->
+ error({bad_tdomain, BadTDomain}).
+
+
+%% ---------
check_taddress(?snmpUDPDomain, X) ->
check_taddress(transportDomainUdpIpv4, X);
check_taddress(snmpUDPDomain, X) ->
check_taddress(transportDomainUdpIpv4, X);
-
+%%
check_taddress(?transportDomainUdpIpv4, X) ->
check_taddress(transportDomainUdpIpv4, X);
-check_taddress(transportDomainUdpIpv4, X)
- when is_list(X) andalso (length(X) =:= 6) ->
- case (catch all_integer(X)) of
- true ->
+check_taddress(transportDomainUdpIpv4, X) ->
+ case X of
+ [A0,A1,A2,A3,P0,P1]
+ when ?is_ipv4_addr(A0, A1, A2, A3), ?is_word(P0, P1) ->
ok;
- false ->
+ _ ->
error({invalid_taddress, X})
end;
-check_taddress(transportDomainUdpIpv4, X) ->
- error({invalid_taddress, X});
-
+%%
check_taddress(?transportDomainUdpIpv6, X) ->
check_taddress(transportDomainUdpIpv6, X);
-check_taddress(transportDomainUdpIpv6, X)
- when is_list(X) andalso (length(X) =:= 10) ->
- case (catch all_integer(X)) of
- true ->
+check_taddress(transportDomainUdpIpv6, X) ->
+ case X of
+ [A0,A1,A2,A3,A4,A5,A6,A7,P0,P1]
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7),
+ ?is_word(P0, P1) ->
ok;
- false ->
+ _ ->
error({invalid_taddress, X})
end;
-check_taddress(transportDomainUdpIpv6, X) ->
- error({invalid_taddress, X});
-
+%%
check_taddress(BadDomain, _X) ->
error({invalid_tdomain, BadDomain}).
@@ -512,96 +626,359 @@ all_domains() ->
transportDomainSctpDns
].
+check_domain(snmpUDPDomain) -> ok;
+check_domain(transportDomainUdpIpv4) -> ok;
+check_domain(transportDomainUdpIpv6) -> ok;
check_domain(Domain) ->
- SupportedDomains =
- [
- snmpUDPDomain,
- transportDomainUdpIpv4,
- transportDomainUdpIpv6
- ],
- AllDomains = all_domains(),
- case lists:member(Domain, SupportedDomains) of
+ case lists:member(Domain, all_domains()) of
true ->
- ok;
+ error({unsupported_domain, Domain});
false ->
- case lists:member(Domain, AllDomains) of
- true ->
- error({unsupported_domain, Domain});
- false ->
- error({unknown_domain, Domain})
- end
+ error({unknown_domain, Domain})
end.
-
+
+domain_to_name(snmpUDPDomain) ->
+ undefined;
+domain_to_name(transportDomainUdpIpv4) ->
+ udpIpv4;
+domain_to_name(transportDomainUdpIpv6) ->
+ udpIpv6;
+domain_to_name(transportDomainUdpIpv4z) ->
+ udpIpv4z;
+domain_to_name(transportDomainUdpIpv6z) ->
+ udpIpv6z;
+domain_to_name(transportDomainTcpIpv4) ->
+ tcpIpv4;
+domain_to_name(transportDomainTcpIpv6) ->
+ tcpIpv6;
+domain_to_name(transportDomainTcpIpv4z) ->
+ tcpIpv4z;
+domain_to_name(transportDomainTcpIpv6z) ->
+ tcpIpv6z;
+domain_to_name(transportDomainSctpIpv4) ->
+ sctpIpv4;
+domain_to_name(transportDomainSctpIpv6) ->
+ sctpIpv6;
+domain_to_name(transportDomainSctpIpv4z) ->
+ sctpIpv4z;
+domain_to_name(transportDomainSctpIpv6z) ->
+ sctpIpv6z;
+domain_to_name(transportDomainLocal) ->
+ local;
+domain_to_name(transportDomainUdpDns) ->
+ udpDns;
+domain_to_name(transportDomainTcpDns) ->
+ tcpDns;
+domain_to_name(transportDomainSctpDns) ->
+ sctpDns;
+domain_to_name(BadDomain) ->
+ error({bad_domain, BadDomain}).
%% ---------
-%% The values of Ip and Port has both been checked at this
-%% point, so we dont need to do that again.
-mk_taddress(snmpUDPDomain, Ip, Port) ->
- mk_taddress(transportDomainUdpIpv4, Ip, Port);
-mk_taddress(transportDomainUdpIpv4, Ip, Port) when is_list(Ip) ->
- Ip ++ [Port div 256, Port rem 256];
-mk_taddress(transportDomainUdpIpv4 = Domain, Ip, Port) when is_tuple(Ip) ->
- mk_taddress(Domain, tuple_to_list(Ip), Port);
-mk_taddress(transportDomainUdpIpv6, Ip, Port) when is_list(Ip) ->
- Ip ++ [Port div 256, Port rem 256];
-mk_taddress(transportDomainUdpIpv6 = Domain, Ip, Port) when is_tuple(Ip) ->
- mk_taddress(Domain, tuple_to_list(Ip), Port);
+mk_taddress(Address) ->
+ mk_taddress(snmpUDPDomain, Address).
+%% The values of Domain, Ip and Port has both been checked at this
+%% point, so we dont need to do that again, but this function is
+%% also used on incoming packets from net_if so a little
+%% check that net_if does not supply bad arguments is in order.
+%%
%% These are just for convenience
-mk_taddress(?snmpUDPDomain, Ip, Port) ->
- mk_taddress(snmpUDPDomain, Ip, Port);
-mk_taddress(?transportDomainUdpIpv4, Ip, Port) ->
- mk_taddress(transportDomainUdpIpv4, Ip, Port);
-mk_taddress(?transportDomainUdpIpv6, Ip, Port) ->
- mk_taddress(transportDomainUdpIpv6, Ip, Port);
-
+mk_taddress(?snmpUDPDomain, Address) ->
+ mk_taddress(snmpUDPDomain, Address);
+mk_taddress(?transportDomainUdpIpv4, Address) ->
+ mk_taddress(transportDomainUdpIpv4, Address);
+mk_taddress(?transportDomainUdpIpv6, Address) ->
+ mk_taddress(transportDomainUdpIpv6, Address);
+%%
+mk_taddress(snmpUDPDomain, Address) -> % Legacy
+ mk_taddress(transportDomainUdpIpv4, Address);
+mk_taddress(transportDomainUdpIpv4 = Domain, Address) ->
+ case Address of
+ [] -> % Empty mask
+ [];
+ {Ip, Port} when tuple_size(Ip) =:= 4, is_integer(Port) ->
+ tuple_to_list(Ip) ++ mk_bytes(Port);
+ _ ->
+ erlang:error(badarg, [Domain,Address])
+ end;
+mk_taddress(transportDomainUdpIpv6 = Domain, Address) ->
+ case Address of
+ [] -> % Empty mask
+ [];
+ {{A, B, C, D, E, F, G, H}, Port} ->
+ [A bsr 8, A band 255,
+ B bsr 8, B band 255,
+ C bsr 8, C band 255,
+ D bsr 8, D band 255,
+ E bsr 8, E band 255,
+ F bsr 8, F band 255,
+ G bsr 8, G band 255,
+ H bsr 8, H band 255,
+ Port bsr 8, Port band 255];
+ _ ->
+ erlang:error(badarg, [Domain,Address])
+ end;
%% Bad domain
-mk_taddress(BadDomain, _Ip, _Port) ->
+mk_taddress(BadDomain, _) ->
error({bad_domain, BadDomain}).
-
+
%% ---------
-which_domain(Ip) when is_list(Ip) andalso (length(Ip) =:= 4) ->
+%% XXX remove, when net_if handles one socket per transport domain
+
+which_domain([A0,A1,A2,A3])
+ when ?is_ipv4_addr(A0, A1, A2, A3) ->
transportDomainUdpIpv4;
-which_domain(Ip) when is_tuple(Ip) andalso (size(Ip) =:= 4) ->
+which_domain({A0, A1, A2, A3})
+ when ?is_ipv4_addr(A0, A1, A2, A3) ->
transportDomainUdpIpv4;
-which_domain(Ip) when is_list(Ip) andalso (length(Ip) =:= 8) ->
+which_domain([A0,A1,A2,A3,A4,A5,A6,A7])
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7) ->
+ transportDomainUdpIpv6;
+which_domain([A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15])
+ when ?is_ipv6_addr(
+ A0, A1, A2, A3, A4, A5, A6, A7,
+ A8, A9, A10, A11, A12, A13, A14, A15) ->
transportDomainUdpIpv6;
-which_domain(Ip) when is_tuple(Ip) andalso (size(Ip) =:= 8) ->
+which_domain({A0, A1, A2, A3, A4, A5, A6, A7})
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7) ->
transportDomainUdpIpv6.
-
%% ---------
+mk_addr_string({Domain, Addr}) when is_atom(Domain) ->
+ %% XXX There is only code for IP domains here
+ case check_address_ip(Domain, Addr) of
+ false ->
+ case check_address_ip_port(Domain, Addr) of
+ false ->
+ error({bad_address, {Domain, Addr}});
+ true ->
+ {IP, Port} = Addr,
+ mk_addr_string_ntoa(Domain, IP, Port);
+ {IP, Port} ->
+ mk_addr_string_ntoa(Domain, IP, Port)
+ end;
+ true ->
+ mk_addr_string_ntoa(Domain, Addr);
+ IP ->
+ mk_addr_string_ntoa(Domain, IP)
+ end;
+mk_addr_string({_IP, Port} = Addr) when is_integer(Port) ->
+ mk_addr_string({snmpUDPDomain, Addr});
+mk_addr_string(Strange) ->
+ lists:flatten(io_lib:format("~w", [Strange])).
+
+
+mk_addr_string_ntoa({_, _, _, _} = IP) ->
+ inet:ntoa(IP);
+mk_addr_string_ntoa(IP) ->
+ lists:flatten(io_lib:format("[~s]", [inet:ntoa(IP)])).
+
+mk_addr_string_ntoa(Domain, IP) ->
+ case domain_to_name(Domain) of
+ undefined ->
+ mk_addr_string_ntoa(IP);
+ Name ->
+ lists:flatten(
+ io_lib:format("~w://~s", [Name, mk_addr_string_ntoa(IP)]))
+ end.
+
+mk_addr_string_ntoa(Domain, IP, Port) ->
+ lists:flatten(
+ io_lib:format(
+ "~s:~w", [mk_addr_string_ntoa(Domain, IP), Port])).
+
+%% ---------
+
check_ip(X) ->
check_ip(snmpUDPDomain, X).
-check_ip(snmpUDPDomain, X) ->
- check_ip(transportDomainUdpIpv4, X);
-check_ip(transportDomainUdpIpv4, X) when is_list(X) andalso (length(X) =:= 4) ->
- case (catch all_integer(X)) of
- true ->
+check_ip(Domain, IP) ->
+ %% XXX There is only code for IP domains here
+ case check_address_ip(Domain, IP) of
+ false ->
+ error({bad_address, {Domain, IP}});
+ true ->
ok;
- false ->
- error({invalid_ip_address, X})
- end;
-check_ip(transportDomainUdpIpv4, X) ->
- error({invalid_ip_address, X});
+ FixedIP ->
+ {ok, FixedIP}
+ end.
-check_ip(transportDomainUdpIpv6, X) when is_list(X) andalso (length(X) =:= 8) ->
- case (catch all_integer(X)) of
- true ->
+
+%% ---------
+
+check_port(Port) when ?is_word(Port) ->
+ ok;
+check_port(Port) ->
+ error({bad_port, Port}).
+
+%% ip_port_to_domaddr(IP, Port) when ?is_word(Port) ->
+%% %% XXX There is only code for IP domains here
+%% case check_address_ip(transportDomainUdpIpv4, IP) of
+%% false ->
+%% case check_address_ip(transportDomainUdpIpv6, IP) of
+%% false ->
+%% error({bad_address, {transportDomainUdpIpv4, {IP, Port}}});
+%% true ->
+%% {transportDomainUdpIpv6, {IP, Port}};
+%% FixedIP ->
+%% {transportDomainUdpIpv6, {FixedIP, Port}}
+%% end;
+%% true ->
+%% {transportDomainUdpIpv4, {IP, Port}};
+%% FixedIP ->
+%% {transportDomainUdpIpv4, {FixedIP, Port}}
+%% end;
+%% ip_port_to_domaddr(IP, Port) ->
+%% error({bad_address, {transportDomainUdpIpv4, {IP, Port}}}).
+
+%% Check a configuration term field from a file to see if it
+%% can be fixed to be fed to mk_taddress/2.
+
+check_address(Domain, Address, DefaultPort) ->
+ %% If Address does not contain Port or contains Port =:= 0
+ %% create an address containing DefaultPort
+ %%
+ %% XXX There is only code for IP domains here
+ case check_address_ip(Domain, Address) of
+ false ->
+ case check_address_ip_port(Domain, Address) of
+ false ->
+ error({bad_address, {Domain, Address}});
+ true ->
+ case Address of
+ {IP, 0} ->
+ {ok, {IP, DefaultPort}};
+ _ ->
+ ok
+ end;
+ {FixedIP, 0} ->
+ {ok, {FixedIP, DefaultPort}};
+ FixedAddress ->
+ {ok, FixedAddress}
+ end;
+ true ->
+ {ok, {Address, DefaultPort}};
+ FixedIP ->
+ {ok, {FixedIP, DefaultPort}}
+ end.
+
+check_address(Domain, Address) ->
+ %% Address has to contain Port
+ %%
+ %% XXX There is only code for IP domains here
+ case check_address_ip_port(Domain, Address) of
+ false ->
+ error({bad_address, {Domain, Address}});
+ true ->
ok;
- false ->
- error({invalid_ip_address, X})
+ FixedAddress ->
+ {ok, FixedAddress}
+ end.
+
+%% -> IP
+check_address_ip(Domain, Address)
+ when Domain =:= snmpUDPDomain;
+ Domain =:= transportDomainUdpIpv4 ->
+ case Address of
+ %% Erlang native format
+ {A0, A1, A2, A3}
+ when ?is_ipv4_addr(A0, A1, A2, A3) ->
+ true;
+ %% Erlangish format
+ [A0,A1,A2,A3]
+ when ?is_ipv4_addr(A0, A1, A2, A3) ->
+ {A0, A1, A2, A3};
+ _ ->
+ false
+ end;
+check_address_ip(transportDomainUdpIpv6, Address) ->
+ case Address of
+ %% Erlang native format
+ {A0, A1, A2, A3, A4, A5, A6, A7}
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7) ->
+ true;
+ %% Erlangish format
+ [A0,A1,A2,A3,A4,A5,A6,A7]
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7) ->
+ {A0, A1, A2, A3, A4, A5, A6, A7};
+ %% SNMP standards format
+ [A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15]
+ when ?is_ipv6_addr(
+ A0, A1, A2, A3, A4, A5, A6, A7,
+ A8, A9, A10, A11, A12, A13, A14, A15) ->
+ {mk_word(A0, A1), mk_word(A2, A3),
+ mk_word(A4, A5), mk_word(A6, A7),
+ mk_word(A8, A9), mk_word(A10, A11),
+ mk_word(A12, A13), mk_word(A14, A15)};
+ _ ->
+ false
end;
-check_ip(transportDomainUdpIpv6, X) ->
- error({invalid_ip_address, X});
+check_address_ip(BadDomain, _) ->
+ error({bad_domain, BadDomain}).
-check_ip(BadDomain, _X) ->
- error({invalid_domain, BadDomain}).
+%% -> {IP, Port}
+check_address_ip_port(Domain, Address)
+ when Domain =:= snmpUDPDomain;
+ Domain =:= transportDomainUdpIpv4 ->
+ case Address of
+ {IP, Port} when ?is_word(Port) ->
+ case check_address_ip(Domain, IP) of
+ false ->
+ false;
+ true ->
+ true;
+ FixedIP ->
+ {FixedIP, Port}
+ end;
+ %% SNMP standards format
+ [A0,A1,A2,A3,P0,P1]
+ when ?is_ipv4_addr(A0, A1, A2, A3), ?is_word(P0, P1) ->
+ {{A0, A1, A2, A3}, mk_word(P0, P1)};
+ _ ->
+ false
+ end;
+check_address_ip_port(transportDomainUdpIpv6 = Domain, Address) ->
+ case Address of
+ {IP, Port} when ?is_word(Port) ->
+ case check_address_ip(Domain, IP) of
+ false ->
+ false;
+ true ->
+ true;
+ FixedIP ->
+ {FixedIP, Port}
+ end;
+ %% Erlang friendly list format
+ [A0,A1,A2,A3,A4,A5,A6,A7,P]
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7),
+ ?is_word(P) ->
+ {{A0, A1, A2, A3, A4, A5, A6, A7}, P};
+ %% Strange hybrid format with port as bytes
+ [A0,A1,A2,A3,A4,A5,A6,A7,P0,P1]
+ when ?is_ipv6_addr(A0, A1, A2, A3, A4, A5, A6, A7),
+ ?is_word(P0, P1) ->
+ {{A0, A1, A2, A3, A4, A5, A6, A7}, mk_word(P0, P1)};
+ %% SNMP standards format
+ [A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,P0,P1]
+ when ?is_ipv6_addr(
+ A0, A1, A2, A3, A4, A5, A6, A7,
+ A8, A9, A10, A11, A12, A13, A14, A15),
+ ?is_word(P0, P1) ->
+ {{mk_word(A0, A1), mk_word(A2, A3),
+ mk_word(A4, A5), mk_word(A6, A7),
+ mk_word(A8, A9), mk_word(A10, A11),
+ mk_word(A12, A13), mk_word(A14, A15)},
+ mk_word(P0, P1)};
+ _ ->
+ false
+ end;
+check_address_ip_port(BadDomain, _) ->
+ error({bad_domain, BadDomain}).
diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl
index a222f842e5..17dfcd70b4 100644
--- a/lib/snmp/src/misc/snmp_config.erl
+++ b/lib/snmp/src/misc/snmp_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,24 +26,29 @@
-compile({no_auto_import,[error/1]}).
-export([config/0]).
--export([write_config_file/4, append_config_file/4, read_config_file/3]).
+%%-export([write_config_file/4, append_config_file/4, read_config_file/4]).
+
+-export([write_config_file/6, append_config_file/6, read_config_file/4]).
-export([write_agent_snmp_files/7, write_agent_snmp_files/12,
+ write_agent_snmp_files/6, write_agent_snmp_files/11,
- write_agent_snmp_conf/5,
+ write_agent_snmp_conf/4, write_agent_snmp_conf/5,
write_agent_snmp_context_conf/1,
write_agent_snmp_community_conf/1,
write_agent_snmp_standard_conf/2,
- write_agent_snmp_target_addr_conf/4,
- write_agent_snmp_target_addr_conf/6,
+ write_agent_snmp_target_addr_conf/3,
+ write_agent_snmp_target_addr_conf/4,
+ write_agent_snmp_target_addr_conf/5,
+ write_agent_snmp_target_addr_conf/6,
write_agent_snmp_target_params_conf/2,
write_agent_snmp_notify_conf/2,
write_agent_snmp_usm_conf/5,
write_agent_snmp_vacm_conf/3,
write_manager_snmp_files/8,
- write_manager_snmp_conf/5,
- write_manager_snmp_users_conf/2,
+ write_manager_snmp_conf/4, write_manager_snmp_conf/5,
+ write_manager_snmp_users_conf/2,
write_manager_snmp_agents_conf/2,
write_manager_snmp_usm_conf/2
@@ -90,9 +95,9 @@
]).
--export_type([void/0,
- verify_config_entry_function/0,
- verify_config_function/0,
+-export_type([void/0,
+ order_config_entry_function/0,
+ check_config_entry_function/0,
write_config_function/0]).
@@ -567,11 +572,9 @@ config_agent_snmp(Dir, Vsns) ->
end,
NT
end,
- case (catch write_agent_snmp_files(Dir,
- Vsns, ManagerIP, TrapUdp,
- AgentIP, AgentUDP,
- SysName, NotifType, SecType,
- Passwd, EngineID, MMS)) of
+ case (catch write_agent_snmp_files(
+ Dir, Vsns, ManagerIP, TrapUdp, AgentIP, AgentUDP, SysName,
+ NotifType, SecType, Passwd, EngineID, MMS)) of
ok ->
i("~n- - - - - - - - - - - - -"),
i("Info: 1. SecurityName \"initial\" has noAuthNoPriv read access~n"
@@ -1580,35 +1583,63 @@ remove_newline(Str) ->
%% File generation
%%======================================================================
+write_agent_snmp_files(
+ Dir, Vsns, Domain, ManagerAddr, AgentAddr, SysName)
+ when is_list(Dir),
+ is_list(Vsns),
+ is_atom(Domain),
+ is_list(SysName) ->
+ write_agent_snmp_files(
+ Dir, Vsns, Domain, ManagerAddr, AgentAddr, SysName,
+ trap, none, "", "agentEngine", 484).
+
%%----------------------------------------------------------------------
%% Dir: string() (ex: "../conf/")
%% ManagerIP, AgentIP: [int(),int(),int(),int()]
%% TrapUdp, AgentUDP: integer()
%% SysName: string()
%%----------------------------------------------------------------------
-write_agent_snmp_files(Dir, Vsns, ManagerIP, TrapUdp,
- AgentIP, AgentUDP, SysName)
- when is_list(Dir) andalso
- is_list(Vsns) andalso
- is_list(ManagerIP) andalso
- is_integer(TrapUdp) andalso
- is_list(AgentIP) andalso
- is_integer(AgentUDP) andalso
+write_agent_snmp_files(
+ Dir, Vsns, ManagerIP, TrapUDP, AgentIP, AgentUDP, SysName)
+ when is_list(Dir) andalso
+ is_list(Vsns) andalso
+ is_list(ManagerIP) andalso
+ is_integer(TrapUDP) andalso
+ is_list(AgentIP) andalso
+ is_integer(AgentUDP) andalso
is_list(SysName) ->
- write_agent_snmp_files(Dir, Vsns, ManagerIP, TrapUdp, AgentIP, AgentUDP,
- SysName, "trap", none, "", "agentEngine", 484).
+ write_agent_snmp_files(
+ Dir, Vsns, ManagerIP, TrapUDP, AgentIP, AgentUDP, SysName,
+ trap, none, "", "agentEngine", 484).
%%
%% ----- Agent config files generator functions -----
%%
-write_agent_snmp_files(Dir, Vsns, ManagerIP, TrapUdp, AgentIP, AgentUDP,
- SysName, NotifType, SecType, Passwd, EngineID, MMS) ->
+write_agent_snmp_files(
+ Dir, Vsns, Domain, ManagerAddr, AgentAddr, SysName,
+ NotifType, SecType, Passwd, EngineID, MMS) ->
+ write_agent_snmp_conf(Dir, Domain, AgentAddr, EngineID, MMS),
+ write_agent_snmp_context_conf(Dir),
+ write_agent_snmp_community_conf(Dir),
+ write_agent_snmp_standard_conf(Dir, SysName),
+ write_agent_snmp_target_addr_conf(Dir, Domain, ManagerAddr, Vsns),
+ write_agent_snmp_target_params_conf(Dir, Vsns),
+ write_agent_snmp_notify_conf(Dir, NotifType),
+ write_agent_snmp_usm_conf(Dir, Vsns, EngineID, SecType, Passwd),
+ write_agent_snmp_vacm_conf(Dir, Vsns, SecType),
+ ok.
+
+write_agent_snmp_files(
+ Dir, Vsns, ManagerIP, TrapUDP, AgentIP, AgentUDP, SysName,
+ NotifType, SecType, Passwd, EngineID, MMS) ->
+ Domain = snmp_target_mib:default_domain(),
+ ManagerAddr = {ManagerIP, TrapUDP},
write_agent_snmp_conf(Dir, AgentIP, AgentUDP, EngineID, MMS),
write_agent_snmp_context_conf(Dir),
write_agent_snmp_community_conf(Dir),
write_agent_snmp_standard_conf(Dir, SysName),
- write_agent_snmp_target_addr_conf(Dir, ManagerIP, TrapUdp, Vsns),
+ write_agent_snmp_target_addr_conf(Dir, Domain, ManagerAddr, Vsns),
write_agent_snmp_target_params_conf(Dir, Vsns),
write_agent_snmp_notify_conf(Dir, NotifType),
write_agent_snmp_usm_conf(Dir, Vsns, EngineID, SecType, Passwd),
@@ -1616,11 +1647,40 @@ write_agent_snmp_files(Dir, Vsns, ManagerIP, TrapUdp, AgentIP, AgentUDP,
ok.
+
%%
%% ------ [agent] agent.conf ------
%%
-write_agent_snmp_conf(Dir, AgentIP, AgentUDP, EngineID, MMS) ->
+write_agent_snmp_conf(Dir, Transports, EngineID, MMS) ->
+ Conf =
+ [{intAgentTransports, Transports},
+ {snmpEngineID, EngineID},
+ {snmpEngineMaxMessageSize, MMS}],
+ do_write_agent_snmp_conf(Dir, Conf).
+
+write_agent_snmp_conf(Dir, Domain, AgentAddr, EngineID, MMS)
+ when is_atom(Domain) ->
+ {AgentIP, AgentUDP} = AgentAddr,
+ Conf =
+ [{intAgentTransportDomain, Domain},
+ {intAgentUDPPort, AgentUDP},
+ {intAgentIpAddress, AgentIP},
+ {snmpEngineID, EngineID},
+ {snmpEngineMaxMessageSize, MMS}],
+ do_write_agent_snmp_conf(Dir, Conf);
+write_agent_snmp_conf(Dir, AgentIP, AgentUDP, EngineID, MMS)
+ when is_integer(AgentUDP) ->
+ Conf =
+ [{intAgentUDPPort, AgentUDP},
+ {intAgentIpAddress, AgentIP},
+ {snmpEngineID, EngineID},
+ {snmpEngineMaxMessageSize, MMS}],
+ do_write_agent_snmp_conf(Dir, Conf);
+write_agent_snmp_conf(_Dir, Domain, AgentAddr, _EngineID, _MMS) ->
+ error({bad_address, {Domain, AgentAddr}}).
+
+do_write_agent_snmp_conf(Dir, Conf) ->
Comment =
"%% This file defines the Agent local configuration info\n"
"%% The data is inserted into the snmpEngine* variables defined\n"
@@ -1635,11 +1695,7 @@ write_agent_snmp_conf(Dir, AgentIP, AgentUDP, EngineID, MMS) ->
"%% {snmpEngineID, \"agentEngine\"}.\n"
"%% {snmpEngineMaxMessageSize, 484}.\n"
"%%\n\n",
- Hdr = header() ++ Comment,
- Conf = [{intAgentUDPPort, AgentUDP},
- {intAgentIpAddress, AgentIP},
- {snmpEngineID, EngineID},
- {snmpEngineMaxMessageSize, MMS}],
+ Hdr = header() ++ Comment,
write_agent_config(Dir, Hdr, Conf).
write_agent_config(Dir, Hdr, Conf) ->
@@ -1745,17 +1801,19 @@ update_agent_standard_config(Dir, Conf) ->
%% ------ target_addr.conf ------
%%
-write_agent_snmp_target_addr_conf(Dir, ManagerIp, UDP, Vsns) ->
- Timeout = 1500,
- RetryCount = 3,
- write_agent_snmp_target_addr_conf(Dir, ManagerIp, UDP,
- Timeout, RetryCount,
- Vsns).
+write_agent_snmp_target_addr_conf(Dir, Addresses, Vsns) ->
+ Timeout = 1500,
+ RetryCount = 3,
+ write_agent_snmp_target_addr_conf(
+ Dir, Addresses, Timeout, RetryCount, Vsns).
-write_agent_snmp_target_addr_conf(Dir, ManagerIp, UDP,
- Timeout, RetryCount,
- Vsns) ->
- Comment =
+write_agent_snmp_target_addr_conf(Dir, Domain_or_Ip, Addr_or_Port, Vsns) ->
+ Addresses = [{Domain_or_Ip, Addr_or_Port}],
+ write_agent_snmp_target_addr_conf(Dir, Addresses, Vsns).
+
+write_agent_snmp_target_addr_conf(
+ Dir, Addresses, Timeout, RetryCount, Vsns) ->
+ Comment =
"%% This file defines the target address parameters.\n"
"%% The data is inserted into the snmpTargetAddrTable defined\n"
"%% in SNMP-TARGET-MIB, and in the snmpTargetAddrExtTable defined\n"
@@ -1774,36 +1832,59 @@ write_agent_snmp_target_addr_conf(Dir, ManagerIp, UDP,
"%% [127,0,0,0], 2048}.\n"
"%%\n\n",
Hdr = header() ++ Comment,
- F = fun(v1 = Vsn, Acc) ->
- [{mk_ip(ManagerIp, Vsn),
- snmp_target_mib:default_domain(),
- ManagerIp, UDP, Timeout, RetryCount,
- "std_trap", mk_param(Vsn), "", [], 2048}| Acc];
- (v2 = Vsn, Acc) ->
- [{mk_ip(ManagerIp, Vsn),
- snmp_target_mib:default_domain(),
- ManagerIp, UDP, Timeout, RetryCount,
- "std_trap", mk_param(Vsn), "", [], 2048},
- {lists:flatten(io_lib:format("~s.2",[mk_ip(ManagerIp, Vsn)])),
- ManagerIp, UDP, Timeout, RetryCount,
- "std_inform", mk_param(Vsn), "", [], 2048}| Acc];
- (v3 = Vsn, Acc) ->
- [{mk_ip(ManagerIp, Vsn),
- snmp_target_mib:default_domain(),
- ManagerIp, UDP, Timeout, RetryCount,
- "std_trap", mk_param(Vsn), "", [], 2048},
- {lists:flatten(io_lib:format("~s.3",[mk_ip(ManagerIp, Vsn)])),
- ManagerIp, UDP, Timeout, RetryCount,
- "std_inform", mk_param(Vsn), "mgrEngine", [], 2048}| Acc]
- end,
- Conf = lists:foldl(F, [], Vsns),
+ Conf =
+ lists:foldl(
+ fun ({Domain_or_Ip, Addr_or_Port} = Address, OuterAcc) ->
+ lists:foldl(
+ fun(v1 = Vsn, Acc) ->
+ [{mk_name(Address, Vsn),
+ Domain_or_Ip, Addr_or_Port,
+ Timeout, RetryCount,
+ "std_trap", mk_param(Vsn), "",
+ [], 2048}| Acc];
+ (v2 = Vsn, Acc) ->
+ [{mk_name(Address, Vsn),
+ Domain_or_Ip, Addr_or_Port,
+ Timeout, RetryCount,
+ "std_trap", mk_param(Vsn), "",
+ [], 2048},
+ {lists:flatten(
+ io_lib:format(
+ "~s.2", [mk_name(Address, Vsn)])),
+ Domain_or_Ip, Addr_or_Port,
+ Timeout, RetryCount,
+ "std_inform", mk_param(Vsn), "",
+ [], 2048}| Acc];
+ (v3 = Vsn, Acc) ->
+ [{mk_name(Address, Vsn),
+ Domain_or_Ip, Addr_or_Port,
+ Timeout, RetryCount,
+ "std_trap", mk_param(Vsn), "",
+ [], 2048},
+ {lists:flatten(
+ io_lib:format(
+ "~s.3", [mk_name(Address, Vsn)])),
+ Domain_or_Ip, Addr_or_Port,
+ Timeout, RetryCount,
+ "std_inform", mk_param(Vsn), "mgrEngine",
+ [], 2048} | Acc]
+ end, OuterAcc, Vsns)
+ end, [], Addresses),
write_agent_target_addr_config(Dir, Hdr, Conf).
+write_agent_snmp_target_addr_conf(
+ Dir, Domain_or_Ip, Addr_or_Port, Timeout, RetryCount, Vsns) ->
+ Addresses = [{Domain_or_Ip, Addr_or_Port}],
+ write_agent_snmp_target_addr_conf(
+ Dir, Addresses, Timeout, RetryCount, Vsns).
+
mk_param(Vsn) ->
lists:flatten(io_lib:format("target_~w", [Vsn])).
-mk_ip([A,B,C,D], Vsn) ->
- lists:flatten(io_lib:format("~w.~w.~w.~w ~w", [A,B,C,D,Vsn])).
+mk_name(Address, Vsn) ->
+ lists:flatten(
+ io_lib:format(
+ "~s ~w", [snmp_conf:mk_addr_string(Address), Vsn])).
write_agent_target_addr_config(Dir, Hdr, Conf) ->
snmpa_conf:write_target_addr_config(Dir, Hdr, Conf).
@@ -2037,7 +2118,24 @@ write_manager_snmp_files(Dir, IP, Port, MMS, EngineID,
%% ------ manager.conf ------
%%
-write_manager_snmp_conf(Dir, IP, Port, MMS, EngineID) ->
+write_manager_snmp_conf(Dir, Transports, MMS, EngineID) ->
+ Comment =
+"%% This file defines the Manager local configuration info\n"
+"%% Each row is a 2-tuple:\n"
+"%% {Variable, Value}.\n"
+"%% For example\n"
+"%% {transports, [{transportDomainUdpIpv4, {{127,42,17,5}, 5000}}]}.\n"
+"%% {engine_id, \"managerEngine\"}.\n"
+"%% {max_message_size, 484}.\n"
+"%%\n\n",
+ Hdr = header() ++ Comment,
+ Conf =
+ [{transports, Transports},
+ {engine_id, EngineID},
+ {max_message_size, MMS}],
+ write_manager_config(Dir, Hdr, Conf).
+
+write_manager_snmp_conf(Dir, Domain_or_IP, Addr_or_Port, MMS, EngineID) ->
Comment =
"%% This file defines the Manager local configuration info\n"
"%% Each row is a 2-tuple:\n"
@@ -2049,10 +2147,20 @@ write_manager_snmp_conf(Dir, IP, Port, MMS, EngineID) ->
"%% {max_message_size, 484}.\n"
"%%\n\n",
Hdr = header() ++ Comment,
- Conf = [{port, Port},
- {address, IP},
- {engine_id, EngineID},
- {max_message_size, MMS}],
+ Conf =
+ case Addr_or_Port of
+ {IP, Port} when is_integer(Port), is_atom(Domain_or_IP) ->
+ [{domain, Domain_or_IP},
+ {port, Port},
+ {address, IP}];
+ _ when is_integer(Addr_or_Port) ->
+ [{port, Addr_or_Port},
+ {address, Domain_or_IP}];
+ _ ->
+ error({bad_address, {Domain_or_IP, Addr_or_Port}})
+ end ++
+ [{engine_id, EngineID},
+ {max_message_size, MMS}],
write_manager_config(Dir, Hdr, Conf).
write_manager_config(Dir, Hdr, Conf) ->
@@ -2410,83 +2518,92 @@ header() ->
[?MODULE, ?version, Y, Mo, D, H, Mi, S]).
-%% *If* these functions are successfull, they successfully return anything
-%% (which is ignored), but they fail with either a throw or an exit or
-%% something similar.
-
-%% Verification of one config entry read from a file
--type(verify_config_entry_function() ::
- fun((Entry :: term()) -> ok | {error, Reason :: term()})).
-
-%% Verification of config to be written
--type(verify_config_function() ::
- fun(() -> void())).
-
-%% Write config to file (as defined by Fd)
--type(write_config_function() ::
- fun((Fd :: file:io_device()) -> void())).
-
--spec write_config_file(Dir :: string(),
- FileName :: string(),
- Verify :: verify_config_function(),
- Write :: write_config_function()) ->
- ok | {error, Reason :: term()}.
-
-write_config_file(Dir, FileName, Verify, Write)
- when (is_list(Dir) andalso
- is_list(FileName) andalso
- is_function(Verify) andalso
- is_function(Write)) ->
+%% *If* these functions are successfull, they successfully return
+%% (value is ignored), but they fail preferably with
+%% throw({error, Reason}). Other exceptions are also handled.
+
+%% Sorting order for config entries (see lists:sort/2)
+-type(order_config_entry_function() ::
+ fun((term(), term()) -> boolean())).
+
+%% Check of config entries. Initial State is 'undefined'
+-type(check_config_entry_function() ::
+ fun((Entry :: term(), State :: undefined | term()) ->
+ {ok | {ok, NewEntry :: term()}, NewState :: term()})).
+
+%% Write configuration entries to file descriptor Fd
+-type(write_config_function() ::
+ fun((Fd :: file:io_device(), [Entry :: term()]) -> ok)).
+
+-spec write_config_file(
+ Dir :: string(),
+ FileName :: string(),
+ Order :: order_config_entry_function(),
+ Check :: check_config_entry_function(),
+ Write :: write_config_function(),
+ Entries :: [term()]) ->
+ ok | {error, term()}.
+
+write_config_file(Dir, FileName, Order, Check, Write, Entries)
+ when is_list(Dir), is_list(FileName),
+ is_function(Order), is_function(Check), is_function(Write),
+ is_list(Entries) ->
try
- begin
- do_write_config_file(Dir, FileName, Verify, Write)
- end
+ SortedEntries = lists:sort(Order, Entries),
+ _ =
+ lists:foldl(
+ fun (Entry, State) ->
+ case Check(Entry, State) of
+ {Ok, NewState} when is_list(Ok) ->
+ NewState;
+ {ok, NewState} ->
+ NewState;
+ {{ok, _}, NewState} ->
+ NewState
+ end
+ end, undefined, SortedEntries),
+ ok
+ of
+ _ ->
+ case file:open(filename:join(Dir, FileName), [write]) of
+ {ok, Fd} ->
+ write_config_file(Dir, FileName, Write, Entries, Fd);
+ Error ->
+ Error
+ end
catch
- throw:Error ->
- Error;
- T:E ->
- {error, {failed_write, Dir, FileName, T, E}}
- end.
-
-
-do_write_config_file(Dir, FileName, Verify, Write) ->
- Verify(),
- case file:open(filename:join(Dir, FileName), [write]) of
- {ok, Fd} ->
- file_write_and_close(Write, Fd, Dir, FileName);
Error ->
- Error
- end.
-
-append_config_file(Dir, FileName, Verify, Write)
- when (is_list(Dir) andalso
- is_list(FileName) andalso
- is_function(Verify) andalso
- is_function(Write)) ->
- try
- begin
- do_append_config_file(Dir, FileName, Verify, Write)
- end
- catch
- throw:Error ->
+ S = erlang:get_stacktrace(),
+ d("File write of ~s throwed: ~p~n ~p~n",
+ [FileName, Error, S]),
Error;
- T:E ->
- {error, {failed_append, Dir, FileName, T, E}}
+ C:E ->
+ S = erlang:get_stacktrace(),
+ d("File write of ~s exception: ~p:~p~n ~p~n",
+ [FileName,C,E,S]),
+ {error, {failed_write, Dir, FileName, {C, E, S}}}
end.
-do_append_config_file(Dir, FileName, Verify, Write) ->
- Verify(),
- case file:open(filename:join(Dir, FileName), [read, write]) of
- {ok, Fd} ->
- file:position(Fd, eof),
- file_write_and_close(Write, Fd, Dir, FileName);
+write_config_file(Dir, FileName, Write, Entries, Fd) ->
+ try Write(Fd, Entries) of
+ ok ->
+ close_config_file(Dir, FileName, Fd)
+ catch
Error ->
- Error
+ S = erlang:get_stacktrace(),
+ d("File write of ~s throwed: ~p~n ~p~n",
+ [FileName, Error, S]),
+ close_config_file(Dir, FileName, Fd),
+ Error;
+ C:E ->
+ S = erlang:get_stacktrace(),
+ d("File write of ~s exception: ~p:~p~n ~p~n",
+ [FileName,C,E,S]),
+ close_config_file(Dir, FileName, Fd),
+ {error, {failed_write, Dir, FileName, {C, E, S}}}
end.
-
-file_write_and_close(Write, Fd, Dir, FileName) ->
- ok = Write(Fd),
+close_config_file(Dir, FileName, Fd) ->
case file:sync(Fd) of
ok ->
case file:close(Fd) of
@@ -2496,63 +2613,159 @@ file_write_and_close(Write, Fd, Dir, FileName) ->
{error, {failed_closing, Dir, FileName, Reason}}
end;
{error, Reason} ->
+ _ = file:close(Fd),
{error, {failed_syncing, Dir, FileName, Reason}}
end.
--spec read_config_file(Dir :: string(),
- FileName :: string(),
- Verify :: verify_config_entry_function()) ->
- {ok, Config :: list()} | {error, Reason :: term()}.
-read_config_file(Dir, FileName, Verify)
- when is_list(Dir) andalso is_list(FileName) andalso is_function(Verify) ->
- (catch do_read_config_file(Dir, FileName, Verify)).
+-spec append_config_file(
+ Dir :: string(),
+ FileName :: string(),
+ Order :: order_config_entry_function(),
+ Check :: check_config_entry_function(),
+ Write :: write_config_function(),
+ Entries :: [term()]) ->
+ ok | {error, term()}.
+
+append_config_file(Dir, FileName, Order, Check, Write, Entries)
+ when is_list(Dir), is_list(FileName),
+ is_function(Order), is_function(Check), is_function(Write),
+ is_list(Entries) ->
+ case file:open(filename:join(Dir, FileName), [read, write]) of
+ {ok, Fd} ->
+ append_config_file(
+ Dir, FileName, Order, Check, Write, Entries, Fd);
+ Error ->
+ Error
+ end.
+
+append_config_file(Dir, FileName, Order, Check, Write, Entries, Fd) ->
+ try
+ %% Verify the entries together with the file content
+ LinesInFileR = read_lines(Fd, [], 1),
+ StartLine =
+ case LinesInFileR of
+ [] ->
+ 1;
+ [{_, _, EndLine} | _] ->
+ EndLine
+ end,
+ LinesR = prepend_lines(LinesInFileR, Entries, StartLine),
+ SortedLines = sort_lines(lists:reverse(LinesR), Order),
+ _ = verify_lines(SortedLines, Check, undefined, []),
+ %% Append to the file
+ Write(Fd, Entries)
+ of
+ ok ->
+ close_config_file(Dir, FileName, Fd)
+ catch
+ Error ->
+ S = erlang:get_stacktrace(),
+ d("File append of ~s throwed: ~p~n ~p~n",
+ [FileName, Error, S]),
+ close_config_file(Dir, FileName, Fd),
+ Error;
+ C:E ->
+ S = erlang:get_stacktrace(),
+ d("File append of ~s exception: ~p:~p~n ~p~n",
+ [FileName,C,E,S]),
+ close_config_file(Dir, FileName, Fd),
+ {error, {failed_append, Dir, FileName, {C, E, S}}}
+ end.
+
+%% Fake line numbers, one per entry
+prepend_lines(Lines, [], _) ->
+ Lines;
+prepend_lines(Lines, [Entry | Entries], StartLine) ->
+ EndLine = StartLine + 1,
+ prepend_lines([{StartLine, Entry, EndLine} | Lines], Entries, EndLine).
+
+
-do_read_config_file(Dir, FileName, Verify) ->
+-spec read_config_file(
+ Dir :: string(),
+ FileName :: string(),
+ Order :: order_config_entry_function(),
+ Check :: check_config_entry_function()) ->
+ {ok, Config :: [Entry :: term()]} |
+ {error, Reason :: term()}.
+
+read_config_file(Dir, FileName, Order, Check)
+ when is_list(Dir), is_list(FileName),
+ is_function(Order), is_function(Check) ->
case file:open(filename:join(Dir, FileName), [read]) of
{ok, Fd} ->
- Result = read_loop(Fd, [], Verify, 1),
- file:close(Fd),
- Result;
+ try
+ Lines = lists:reverse(read_lines(Fd, [], 1)),
+ SortedLines = sort_lines(Lines, Order),
+ {ok, verify_lines(SortedLines, Check, undefined, [])}
+ catch
+ Error ->
+ S = erlang:get_stacktrace(),
+ d("File read of ~s throwed: ~p~n ~p~n",
+ [FileName, Error, S]),
+ {error, Error};
+ T:E ->
+ S = erlang:get_stacktrace(),
+ d("File read of ~s exception: ~p:~p~n ~p~n",
+ [FileName,T,E,S]),
+ {error, {failed_read, Dir, FileName, {T, E, S}}}
+ after
+ file:close(Fd)
+ end;
{error, Reason} ->
{error, {Reason, FileName}}
end.
-read_loop(Fd, Acc, Check, StartLine) ->
- case read_term(Fd, StartLine) of
+read_lines(Fd, Acc, StartLine) ->
+ case read_and_parse_term(Fd, StartLine) of
{ok, Term, EndLine} ->
- case (catch Check(Term)) of
- ok ->
- read_loop(Fd, [Term | Acc], Check, EndLine);
- {error, Reason} ->
- {error, {failed_check, StartLine, EndLine, Reason}};
- Error ->
- {error, {failed_check, StartLine, EndLine, Error}}
- end;
- {error, EndLine, Error} ->
- {error, {failed_reading, StartLine, EndLine, Error}};
- eof ->
- {ok, lists:reverse(Acc)}
+ read_lines(Fd, [{StartLine, Term, EndLine}|Acc], EndLine);
+ {error, Error, EndLine} ->
+ throw({failed_reading, StartLine, EndLine, Error});
+ {eof, _EndLine} ->
+ Acc
end.
-
-read_term(Fd, StartLine) ->
+
+read_and_parse_term(Fd, StartLine) ->
case io:request(Fd, {get_until, "", erl_scan, tokens, [StartLine]}) of
{ok, Tokens, EndLine} ->
case erl_parse:parse_term(Tokens) of
{ok, Term} ->
{ok, Term, EndLine};
{error, {Line, erl_parse, Error}} ->
- {error, Line, {parse_error, Error}}
+ {error, {parse_error, Error}, Line}
end;
- {error, E, EndLine} ->
- {error, EndLine, E};
- {eof, _EndLine} ->
- eof;
Other ->
Other
end.
+sort_lines(Lines, Order) ->
+ lists:sort(
+ fun ({_, T1, _}, {_, T2, _}) ->
+ Order(T1, T2)
+ end, Lines).
+
+verify_lines([], _, _, Acc) ->
+ lists:reverse(Acc);
+verify_lines(
+ [{StartLine, Term, EndLine}|Lines], Check, State, Acc) ->
+ try Check(Term, State) of
+ {Terms, NewState} when is_list(Terms) ->
+ verify_lines(Lines, Check, NewState, Terms ++ Acc);
+ {ok, NewState} ->
+ verify_lines(Lines, Check, NewState, [Term|Acc]);
+ {{ok, NewTerm}, NewState} ->
+ verify_lines(Lines, Check, NewState, [NewTerm|Acc])
+ catch
+ {error, Reason} ->
+ throw({failed_check, StartLine, EndLine, Reason});
+ C:R ->
+ S = erlang:get_stacktrace(),
+ throw({failed_check, StartLine, EndLine, {C, R, S}})
+ end.
+
agent_snmp_mk_secret(Alg, Passwd, EngineID) ->
snmp_usm:passwd2localized_key(Alg, Passwd, EngineID).
@@ -2575,8 +2788,8 @@ ensure_started(App) ->
%% -------------------------------------------------------------------------
-% d(F, A) ->
-% i("DBG: " ++ F, A).
+d(F, A) ->
+ i("DBG: " ++ F, A).
i(F) ->
i(F, []).
diff --git a/lib/snmp/src/misc/snmp_log.erl b/lib/snmp/src/misc/snmp_log.erl
index ae28df37fa..4b22281b89 100644
--- a/lib/snmp/src/misc/snmp_log.erl
+++ b/lib/snmp/src/misc/snmp_log.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
-export([
create/4, create/5, create/6, open/1, open/2,
change_size/2, close/1, sync/1, info/1,
- log/4,
+ log/3, log/4,
log_to_txt/6, log_to_txt/7, log_to_txt/8,
log_to_io/5, log_to_io/6, log_to_io/7
]).
@@ -231,7 +231,20 @@ validate(Log, SeqNoReq)
validate_seqno(PrevSN, SeqNo),
{Timestamp, SeqNo};
- ({Timestamp, _Packet, _Addr, _Port}, {PrevTS, _PrevSN}) when SeqNoReq =:= true ->
+ ({Timestamp, SeqNo, _Packet, _AddrStr}, {PrevTS, PrevSN})
+ when is_integer(SeqNo) ->
+ ?vtrace("validating log entry when"
+ "~n Timestamp: ~p"
+ "~n SeqNo: ~p"
+ "~n PrevTS: ~p"
+ "~n PrevSN: ~p",
+ [Timestamp, SeqNo, PrevTS, PrevSN]),
+ validate_timestamp(PrevTS, Timestamp),
+ validate_seqno(PrevSN, SeqNo),
+ {Timestamp, SeqNo};
+
+ ({Timestamp, _Packet, _Addr, _Port}, {PrevTS, _PrevSN})
+ when SeqNoReq =:= true ->
?vtrace("validating log entry when"
"~n Timestamp: ~p"
"~n PrevTS: ~p",
@@ -344,12 +357,20 @@ validate_loop(Error, _Log, _Write, _PrevTS, _PrevSN) ->
%% log(Log, Packet, Addr, Port)
%%-----------------------------------------------------------------
-log(#snmp_log{id = Log, seqno = SeqNo}, Packet, Addr, Port) ->
+log(#snmp_log{id = Log, seqno = SeqNo}, Packet, AddrStr) ->
+ ?vtrace(
+ "log -> entry with~n"
+ " Log: ~p~n"
+ " AddrStr: ~s", [Log, AddrStr]),
+ Entry = make_entry(SeqNo, Packet, AddrStr),
+ disk_log:alog(Log, Entry).
+
+log(#snmp_log{id = Log, seqno = SeqNo}, Packet, Ip, Port) ->
?vtrace("log -> entry with"
"~n Log: ~p"
- "~n Addr: ~p"
- "~n Port: ~p", [Log, Addr, Port]),
- Entry = make_entry(SeqNo, Packet, Addr, Port),
+ "~n Ip: ~p"
+ "~n Port: ~p", [Log, Ip, Port]),
+ Entry = make_entry(SeqNo, Packet, Ip, Port),
%% io:format("log -> "
%% "~n Entry: ~p"
%% "~n Info: ~p"
@@ -361,18 +382,35 @@ log(#snmp_log{id = Log, seqno = SeqNo}, Packet, Addr, Port) ->
%% "~n", [Res, disk_log:info(Log)]),
%% disk_log:sync(Log),
Res.
-
-make_entry(SeqNoGen, Packet, Addr, Port) ->
+
+make_entry(SeqNoGen, Packet, AddrStr)
+ when is_integer(Packet);
+ is_tuple(AddrStr) ->
+ erlang:error(badarg, [SeqNoGen, Packet, AddrStr]);
+make_entry(SeqNoGen, Packet, AddrStr) ->
try next_seqno(SeqNoGen) of
disabled ->
- {timestamp(), Packet, Addr, Port};
- {ok, NextSeqNo} ->
- {timestamp(), NextSeqNo, Packet, Addr, Port}
+ {timestamp(), Packet, AddrStr};
+ {ok, NextSeqNo} when is_integer(NextSeqNo) ->
+ {timestamp(), NextSeqNo, Packet, AddrStr}
catch
_:_ ->
- {timestamp(), Packet, Addr, Port}
+ {timestamp(), Packet, AddrStr}
+ end.
+
+make_entry(SeqNoGen, Packet, Ip, Port) when is_integer(Packet) ->
+ erlang:error(badarg, [SeqNoGen, Packet, Ip, Port]);
+make_entry(SeqNoGen, Packet, Ip, Port) ->
+ try next_seqno(SeqNoGen) of
+ disabled ->
+ {timestamp(), Packet, Ip, Port};
+ {ok, NextSeqNo} when is_integer(NextSeqNo) ->
+ {timestamp(), NextSeqNo, Packet, Ip, Port}
+ catch
+ _:_ ->
+ {timestamp(), Packet, Ip, Port}
end.
next_seqno({M, F, A}) ->
@@ -674,60 +712,68 @@ format_msg(Entry, Mib, Start, Stop) ->
end.
%% This is an old-style entry, that never had the sequence-number
-do_format_msg({Timestamp, Packet, {Addr, Port}}, Mib) ->
- do_format_msg(Timestamp, Packet, Addr, Port, Mib);
+do_format_msg({Timestamp, Packet, {Ip, Port}}, Mib) ->
+ do_format_msg(Timestamp, Packet, ipPort2Str(Ip, Port), Mib);
+%% This is the format without sequence-number
+do_format_msg({Timestamp, Packet, AddrStr}, Mib) ->
+ do_format_msg(Timestamp, Packet, AddrStr, Mib);
+%% This is the format with sequence-number
+do_format_msg({Timestamp, SeqNo, Packet, AddrStr}, Mib)
+ when is_integer(SeqNo) ->
+ do_format_msg(Timestamp, Packet, AddrStr, Mib);
%% This is the format without sequence-number
-do_format_msg({Timestamp, Packet, Addr, Port}, Mib) ->
- do_format_msg(Timestamp, Packet, Addr, Port, Mib);
+do_format_msg({Timestamp, Packet, Ip, Port}, Mib) ->
+ do_format_msg(Timestamp, Packet, ipPort2Str(Ip, Port), Mib);
%% This is the format with sequence-number
-do_format_msg({Timestamp, SeqNo, Packet, Addr, Port}, Mib) ->
- do_format_msg(Timestamp, SeqNo, Packet, Addr, Port, Mib);
+do_format_msg({Timestamp, SeqNo, Packet, Ip, Port}, Mib) ->
+ do_format_msg(Timestamp, SeqNo, Packet, ipPort2Str(Ip, Port), Mib);
%% This is crap...
do_format_msg(_, _) ->
format_tab("** unknown entry in log file\n\n", []).
-do_format_msg(TimeStamp, {V3Hdr, ScopedPdu}, Addr, Port, Mib) ->
+do_format_msg(TimeStamp, {V3Hdr, ScopedPdu}, AddrStr, Mib) ->
case (catch snmp_pdus:dec_scoped_pdu(ScopedPdu)) of
ScopedPDU when is_record(ScopedPDU, scopedPdu) ->
Msg = #message{version = 'version-3',
vsn_hdr = V3Hdr,
data = ScopedPDU},
- f(ts2str(TimeStamp), "", Msg, Addr, Port, Mib);
+ f(ts2str(TimeStamp), "", Msg, AddrStr, Mib);
{'EXIT', Reason} ->
- format_tab("** error in log file at ~s from ~p:~w ~p\n\n",
- [ts2str(TimeStamp), ip(Addr), Port, Reason])
+ format_tab(
+ "** error in log file at ~s from ~s ~p\n\n",
+ [ts2str(TimeStamp), AddrStr, Reason])
end;
-do_format_msg(TimeStamp, Packet, Addr, Port, Mib) ->
+do_format_msg(TimeStamp, Packet, AddrStr, Mib) ->
case (catch snmp_pdus:dec_message(binary_to_list(Packet))) of
Msg when is_record(Msg, message) ->
- f(ts2str(TimeStamp), "", Msg, Addr, Port, Mib);
+ f(ts2str(TimeStamp), "", Msg, AddrStr, Mib);
{'EXIT', Reason} ->
format_tab("** error in log file ~p\n\n", [Reason])
end.
-do_format_msg(TimeStamp, SeqNo, {V3Hdr, ScopedPdu}, Addr, Port, Mib) ->
+do_format_msg(TimeStamp, SeqNo, {V3Hdr, ScopedPdu}, AddrStr, Mib) ->
case (catch snmp_pdus:dec_scoped_pdu(ScopedPdu)) of
ScopedPDU when is_record(ScopedPDU, scopedPdu) ->
Msg = #message{version = 'version-3',
vsn_hdr = V3Hdr,
data = ScopedPDU},
- f(ts2str(TimeStamp), sn2str(SeqNo), Msg, Addr, Port, Mib);
+ f(ts2str(TimeStamp), sn2str(SeqNo), Msg, AddrStr, Mib);
{'EXIT', Reason} ->
- format_tab("** error in log file at ~s from ~p:~w ~p\n\n",
- [ts2str(TimeStamp), sn2str(SeqNo),
- ip(Addr), Port, Reason])
+ format_tab(
+ "** error in log file at ~s from ~s ~p\n\n",
+ [ts2str(TimeStamp), sn2str(SeqNo), AddrStr, Reason])
end;
-do_format_msg(TimeStamp, SeqNo, Packet, Addr, Port, Mib) ->
+do_format_msg(TimeStamp, SeqNo, Packet, AddrStr, Mib) ->
case (catch snmp_pdus:dec_message(binary_to_list(Packet))) of
Msg when is_record(Msg, message) ->
- f(ts2str(TimeStamp), sn2str(SeqNo), Msg, Addr, Port, Mib);
+ f(ts2str(TimeStamp), sn2str(SeqNo), Msg, AddrStr, Mib);
{'EXIT', Reason} ->
- format_tab("** error in log file ~s from ~p:~w ~p\n\n",
- [ts2str(TimeStamp), sn2str(SeqNo),
- ip(Addr), Port, Reason])
+ format_tab(
+ "** error in log file ~s from ~s ~p\n\n",
+ [ts2str(TimeStamp), sn2str(SeqNo), AddrStr, Reason])
end.
@@ -771,44 +817,71 @@ do_format_msg(TimeStamp, SeqNo, Packet, Addr, Port, Mib) ->
f(TimeStamp, SeqNo,
#message{version = Vsn, vsn_hdr = VsnHdr, data = Data},
- Addr, Port, Mib) ->
+ AddrStr, Mib) ->
Str = format_pdu(Data, Mib),
HdrStr = format_header(Vsn, VsnHdr),
- case get_type(Data) of
- trappdu ->
- f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
- 'snmpv2-trap' ->
- f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
- 'inform-request' ->
- f_inform(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
- 'get-response' ->
- f_response(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
- report ->
- f_report(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
- _ ->
- f_request(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port)
- end.
+ Class =
+ case get_type(Data) of
+ trappdu ->
+ trap;
+ 'snmpv2-trap' ->
+ trap;
+ 'inform-request' ->
+ inform;
+ 'get-response' ->
+ response;
+ report ->
+ report;
+ _ ->
+ request
+ end,
+ format_tab(
+ "~w ~s - ~s [~s]~s ~w\n~s",
+ [Class, AddrStr, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+
+%% f(TimeStamp, SeqNo,
+%% #message{version = Vsn, vsn_hdr = VsnHdr, data = Data},
+%% Addr, Port, Mib) ->
+%% Str = format_pdu(Data, Mib),
+%% HdrStr = format_header(Vsn, VsnHdr),
+%% case get_type(Data) of
+%% trappdu ->
+%% f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
+%% 'snmpv2-trap' ->
+%% f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
+%% 'inform-request' ->
+%% f_inform(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
+%% 'get-response' ->
+%% f_response(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
+%% report ->
+%% f_report(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port);
+%% _ ->
+%% f_request(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port)
+%% end.
-f_request(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
- format_tab("request ~s:~w - ~s [~s]~s ~w\n~s",
- [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+%% f_request(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
+%% format_tab("request ~s:~w - ~s [~s]~s ~w\n~s",
+%% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
-f_response(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
- format_tab("response ~s:~w - ~s [~s]~s ~w\n~s",
- [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+%% f_response(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
+%% format_tab("response ~s:~w - ~s [~s]~s ~w\n~s",
+%% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
-f_report(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
- format_tab("report ~s:~w - ~s [~s]~s ~w\n~s",
- [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+%% f_report(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
+%% format_tab("report ~s:~w - ~s [~s]~s ~w\n~s",
+%% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
-f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
- format_tab("trap ~s:~w - ~s [~s]~s ~w\n~s",
- [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+%% f_trap(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
+%% format_tab("trap ~s:~w - ~s [~s]~s ~w\n~s",
+%% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
-f_inform(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
- format_tab("inform ~s:~w - ~s [~s]~s ~w\n~s",
- [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+%% f_inform(TimeStamp, SeqNo, Vsn, HdrStr, Str, Addr, Port) ->
+%% format_tab("inform ~s:~w - ~s [~s]~s ~w\n~s",
+%% [ip(Addr), Port, HdrStr, TimeStamp, SeqNo, Vsn, Str]).
+ipPort2Str(Ip, Port) ->
+ snmp_conf:mk_addr_string({Ip, Port}).
+ %% io_lib:format("~s:~w", [ip(Ip), Port]).
%% Convert a timestamp 2-tupple to a printable string
%%
@@ -909,8 +982,10 @@ get_type(#pdu{type = Type}) ->
Type.
-ip({A,B,C,D}) ->
- io_lib:format("~w.~w.~w.~w", [A,B,C,D]).
+%% ip(Domain, Addr) ->
+%% snmp_conf:mk_addr_string(Domain, Addr).
+%% ip({A,B,C,D}) ->
+%% io_lib:format("~w.~w.~w.~w", [A,B,C,D]).
diff --git a/lib/snmp/src/misc/snmp_pdus.erl b/lib/snmp/src/misc/snmp_pdus.erl
index 15156f7467..90fa4c0dea 100644
--- a/lib/snmp/src/misc/snmp_pdus.erl
+++ b/lib/snmp/src/misc/snmp_pdus.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -174,7 +174,7 @@ dec_pdu_tag(168) ->
dec_pdu([164 | Bytes]) -> % It's a trap
Bytes2 = get_data_bytes(Bytes),
{Enterprise, Rest1} = dec_oid_tag(Bytes2),
- {{'IpAddress', AgentAddr}, Rest2} = dec_value(Rest1),
+ {{'IpAddress', [_, _, _, _] = AgentAddr}, Rest2} = dec_value(Rest1),
{GenericTrap, Rest3} = dec_int_tag(Rest2),
{SpecificTrap, Rest4} = dec_int_tag(Rest3),
{{'TimeTicks', TimeStamp}, VBBytes} = dec_value(Rest4),
@@ -664,7 +664,9 @@ enc_value('BITS', Val) ->
enc_oct_str_tag(bits_to_str(Val));
enc_value('OBJECT IDENTIFIER', Val) ->
enc_oid_tag(Val);
-enc_value('IpAddress', Val) ->
+enc_value('IpAddress', {A, B, C, D}) ->
+ enc_value('IpAddress', [A,B,C,D]);
+enc_value('IpAddress', Val) when is_list(Val) ->
Bytes2 = enc_oct_str_notag(Val),
Len2 = elength(length(Bytes2)),
lists:append([64 | Len2],Bytes2);
diff --git a/lib/snmp/test/Makefile b/lib/snmp/test/Makefile
index f22b7ea8ee..a9bbe7fe62 100644
--- a/lib/snmp/test/Makefile
+++ b/lib/snmp/test/Makefile
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -36,7 +36,7 @@ VSN = $(SNMP_VSN)
include modules.mk
SNMP_ROOT = ..
-SNMP_SUITE = snmp_SUITE
+SNMP_SUITE = snmp_SUITE
ERL_FILES = $(MODULES:%=%.erl)
@@ -93,10 +93,10 @@ ifeq ($(SNMP_DEBUG),e)
SNMP_FLAGS += -Dsnmp_error
endif
ifeq ($(SNMP_DEBUG),l)
- SNMP_FLAGS += -Dsnmp_log
+ SNMP_FLAGS += -Dsnmp_error -Dsnmp_log
endif
ifeq ($(SNMP_DEBUG),d)
- SNMP_FLAGS += -Dsnmp_debug
+ SNMP_FLAGS += -Dsnmp_error -Dsnmp_log -Dsnmp_debug
endif
ifeq ($(DONT_USE_TS),true)
@@ -239,6 +239,7 @@ release_tests_spec: opt
$(INSTALL_DATA) $(RELTEST_FILES) $(COVER_SPEC_FILE) "$(RELSYSDIR)"
chmod -R u+w "$(RELSYSDIR)"
tar cf - snmp_test_data | (cd "$(RELSYSDIR)"; tar xf -)
+ tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
release_docs_spec:
diff --git a/lib/snmp/test/klas3.erl b/lib/snmp/test/klas3.erl
index ec78d19dbb..4cbd852b2d 100644
--- a/lib/snmp/test/klas3.erl
+++ b/lib/snmp/test/klas3.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -67,11 +67,15 @@ fname(get) ->
end,
case snmpa:current_address() of
{value, {[_A,_B,_C,_D], E}} when is_integer(E) -> ok;
- {value, _} -> throw("bad_ip");
- _ -> throw("bad_adr")
+ {value, {D, _}} when is_atom(D) -> ok;
+ {value, Ip} ->
+ throw(format_string("bad_ip: ~p", [Ip]));
+ Other ->
+ throw(format_string("bad_adr: ~p", [Other]))
end,
case snmpa:current_net_if_data() of
{value, []} -> ok;
+ {value, [{request_ref, R}]} when is_reference(R) -> ok;
{value, _} -> throw("bad_nil");
_ -> throw("bad_nid")
end,
@@ -160,3 +164,6 @@ ftab2(get_next, [9], _Cols) ->
% bad return value
io:format("** Here comes Error Report get_next 3 bad return~n"),
[{[1,5],1},{[2,5],3},{[2,6],3}].
+
+format_string(Format, Args) ->
+ lists:flatten(io_lib:format(Format, Args)).
diff --git a/lib/snmp/test/modules.mk b/lib/snmp/test/modules.mk
index 3d658bf8e8..1bf08a9729 100644
--- a/lib/snmp/test/modules.mk
+++ b/lib/snmp/test/modules.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2004-2012. All Rights Reserved.
+# Copyright Ericsson AB 2004-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -19,6 +19,7 @@
SUITE_MODULES = \
snmp_SUITE \
+ snmp_to_snmpnet_SUITE \
snmp_app_test \
snmp_appup_test \
snmp_compiler_test \
@@ -42,6 +43,7 @@ TEST_UTIL_MODULES = \
snmp_test_manager \
snmp_test_mgr \
snmp_test_mgr_misc \
+ snmp_test_mgr_counter_server \
sa \
klas3 \
test1 \
diff --git a/lib/snmp/test/snmp_SUITE.erl b/lib/snmp/test/snmp_SUITE.erl
index 22b9c64588..6fabf6410f 100644
--- a/lib/snmp/test/snmp_SUITE.erl
+++ b/lib/snmp/test/snmp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -80,7 +80,8 @@ groups() ->
{group, note_store_test}]},
{agent, [], [{group, mibs_test},
{group, nfilter_test},
- {group, agent_test}]},
+ {group, agent_test},
+ {group, snmpnet_test}]},
{manager, [], [{group, manager_config_test},
{group, manager_user_test},
{group, manager_test}]},
@@ -95,6 +96,7 @@ groups() ->
{mibs_test, [], [{snmp_agent_mibs_test, all}]},
{nfilter_test, [], [{snmp_agent_nfilter_test, all}]},
{agent_test, [], [{snmp_agent_test, all}]},
+ {snmpnet_test, [], [{snmp_to_snmpnet_SUITE, all}]},
{manager_config_test, [], [{snmp_manager_config_test, all}]},
{manager_user_test, [], [{snmp_manager_user_test, all}]},
{manager_test, [], [{snmp_manager_test, all}]}
@@ -107,15 +109,18 @@ init_per_group(GroupName, Config0) ->
"~n GroupName: ~p"
"~n Config0: ~p", [GroupName, Config0]),
- %% Group name is not really the suite name
- %% (but it is a good enough approximation),
- %% but it does not matter since we only need
- %% it to be unique.
- snmp_test_lib:init_suite_top_dir(GroupName, Config0).
-
-
+ case GroupName of
+ snmpnet_test ->
+ Config0;
+ _ ->
+ %% Group name is not really the suite name
+ %% (but it is a good enough approximation),
+ %% but it does not matter since we only need
+ %% it to be unique.
+ snmp_test_lib:init_suite_top_dir(GroupName, Config0)
+ end.
+
+end_per_group(snmpnet_test, Config) ->
+ Config;
end_per_group(_GroupName, Config) ->
lists:keydelete(snmp_suite_top_dir, 1, Config).
-
-
-
diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl
index b7d34eb198..b4770ad0a9 100644
--- a/lib/snmp/test/snmp_agent_test.erl
+++ b/lib/snmp/test/snmp_agent_test.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,10 +19,6 @@
-module(snmp_agent_test).
-%% TODO
-%% * Test fault-tolerance (kill master etc)
-%%
-
-export([
all/0,
groups/0,
@@ -42,7 +37,7 @@
v1_processing/1,
big/1,
big2/1,
- loop_mib/1,
+ loop_mib_1/1,
api/1,
subagent/1,
mnesia/1,
@@ -303,7 +298,6 @@
%% tickets2
otp8395/1,
otp9884/1
-
]).
%% Internal exports
@@ -395,8 +389,9 @@
usm_read/0,
usm_del_user/0,
usm_bad/0,
- loop_mib_1/0,
- loop_mib_2/0,
+ loop_mib_1_test/0,
+ loop_mib_2_test/0,
+ loop_mib_3_test/0,
otp_1129_i/1,
otp_1162_test/0,
otp_1131_test/0,
@@ -522,9 +517,13 @@ groups() ->
{mib_storage_varm_mnesia, [], varm_mib_storage_mnesia_cases()},
{misc, [], misc_cases()},
{test_v1, [], v1_cases()},
+ {test_v1_ipv6, [], v1_cases_ipv6()},
{test_v2, [], v2_cases()},
+ {test_v2_ipv6, [], v2_cases_ipv6()},
{test_v1_v2, [], v1_v2_cases()},
+ {test_v1_v2_ipv6, [], v1_v2_cases()},
{test_v3, [], v3_cases()},
+ {test_v3_ipv6, [], v3_cases_ipv6()},
{test_multi_threaded, [], mt_cases()},
{multiple_reqs, [], mul_cases()},
{multiple_reqs_2, [], mul_cases_2()},
@@ -533,6 +532,7 @@ groups() ->
{v3_inform, [], v3_inform_cases()},
{v3_security, [], v3_security_cases()},
{standard_mibs, [], standard_mibs_cases()},
+ {standard_mibs_ipv6, [], standard_mibs_cases_ipv6()},
{standard_mibs_2, [], standard_mibs2_cases()},
{standard_mibs_3, [], standard_mibs3_cases()},
{reported_bugs, [], reported_bugs_cases()},
@@ -547,8 +547,9 @@ groups() ->
init_per_suite(Config0) when is_list(Config0) ->
- ?DBG("init_per_suite -> entry with"
- "~n Config0: ~p", [Config0]),
+ p("init_per_suite -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config0, erlang:nodes()]),
Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0),
Config2 = snmp_test_lib:fix_data_dir(Config1),
@@ -559,16 +560,32 @@ init_per_suite(Config0) when is_list(Config0) ->
Config3 = [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2],
- ?DBG("init_per_suite -> end with"
- "~n Config3: ~p", [Config3]),
+ snmp_test_mgr_counter_server:start(),
+
+ p("init_per_suite -> end when"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config3, erlang:nodes()]),
Config3.
end_per_suite(Config) when is_list(Config) ->
- ?DBG("end_per_suite -> entry with"
- "~n Config: ~p", [Config]),
+ p("end_per_suite -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
+ case snmp_test_mgr_counter_server:stop() of
+ {ok, _Counters} ->
+ p("end_per_suite -> sucessfully stopped counter server"
+ "~n Counters: ~p", [_Counters]);
+
+ {error, Reason} ->
+ p("end_per_suite -> failed stopping counter server"
+ "~n Reason: ~p", [Reason])
+ end,
+
+ p("end_per_suite -> end when"
+ "~n Nodes: ~p", [erlang:nodes()]),
Config.
@@ -598,6 +615,14 @@ init_per_group(test_v2 = GroupName, Config) ->
init_v2(snmp_test_lib:init_group_top_dir(GroupName, Config));
init_per_group(test_v1 = GroupName, Config) ->
init_v1(snmp_test_lib:init_group_top_dir(GroupName, Config));
+init_per_group(test_v1_ipv6 = GroupName, Config) ->
+ init_per_group_ipv6(GroupName, Config, fun init_v1/1);
+init_per_group(test_v2_ipv6 = GroupName, Config) ->
+ init_per_group_ipv6(GroupName, Config, fun init_v2/1);
+init_per_group(test_v1_v2_ipv6 = GroupName, Config) ->
+ init_per_group_ipv6(GroupName, Config, fun init_v1_v2/1);
+init_per_group(test_v3_ipv6 = GroupName, Config) ->
+ init_per_group_ipv6(GroupName, Config, fun init_v3/1);
init_per_group(misc = GroupName, Config) ->
init_misc(snmp_test_lib:init_group_top_dir(GroupName, Config));
init_per_group(mib_storage_varm_mnesia = GroupName, Config) ->
@@ -624,6 +649,25 @@ init_per_group(mib_storage_ets = GroupName, Config) ->
init_per_group(GroupName, Config) ->
snmp_test_lib:init_group_top_dir(GroupName, Config).
+init_per_group_ipv6(GroupName, Config, Init) ->
+ case ct:require(ipv6_hosts) of
+ ok ->
+ case gen_udp:open(0, [inet6]) of
+ {ok, S} ->
+ ok = gen_udp:close(S),
+ Init(
+ snmp_test_lib:init_group_top_dir(
+ GroupName,
+ [{ipfamily, inet6},
+ {ip, ?LOCALHOST(inet6)}
+ | lists:keydelete(ip, 1, Config)]));
+ {error, _} ->
+ {skip, "Host seems to not support IPv6"}
+ end;
+ _ ->
+ {skip, "Host does not support IPV6"}
+ end.
+
end_per_group(all_tcs, Config) ->
finish_all(Config);
end_per_group(otp7157, Config) ->
@@ -642,31 +686,39 @@ end_per_group(multiple_reqs_3, Config) ->
finish_mul(Config);
end_per_group(test_multi_threaded, Config) ->
finish_mt(Config);
-end_per_group(test_v3, Config) ->
+end_per_group(test_v3_ipv6, Config) ->
finish_v3(Config);
-end_per_group(test_v1_v2, Config) ->
+end_per_group(test_v1_v2_ipv6, Config) ->
finish_v1_v2(Config);
-end_per_group(test_v2, Config) ->
+end_per_group(test_v2_ipv6, Config) ->
finish_v2(Config);
-end_per_group(test_v1, Config) ->
+end_per_group(test_v1_ipv6, Config) ->
finish_v1(Config);
-end_per_group(misc, Config) ->
+end_per_group(test_v3, Config) ->
+ finish_v3(Config);
+end_per_group(test_v1_v2, Config) ->
+ finish_v1_v2(Config);
+end_per_group(test_v2, Config) ->
+ finish_v2(Config);
+end_per_group(test_v1, Config) ->
+ finish_v1(Config);
+end_per_group(misc, Config) ->
finish_misc(Config);
-end_per_group(mib_storage_varm_mnesia, Config) ->
+end_per_group(mib_storage_varm_mnesia, Config) ->
finish_varm_mib_storage_mnesia(Config);
-end_per_group(mib_storage_varm_dets, Config) ->
+end_per_group(mib_storage_varm_dets, Config) ->
finish_varm_mib_storage_dets(Config);
-end_per_group(mib_storage_size_check_mnesia, Config) ->
+end_per_group(mib_storage_size_check_mnesia, Config) ->
finish_size_check_msm(Config);
-end_per_group(mib_storage_size_check_dets, Config) ->
+end_per_group(mib_storage_size_check_dets, Config) ->
finish_size_check_msd(Config);
-end_per_group(mib_storage_size_check_ets, Config) ->
+end_per_group(mib_storage_size_check_ets, Config) ->
finish_size_check_mse(Config);
-end_per_group(mib_storage_mnesia, Config) ->
+end_per_group(mib_storage_mnesia, Config) ->
finish_mib_storage_mnesia(Config);
-end_per_group(mib_storage_dets, Config) ->
+end_per_group(mib_storage_dets, Config) ->
finish_mib_storage_dets(Config);
-end_per_group(mib_storage_ets, Config) ->
+end_per_group(mib_storage_ets, Config) ->
finish_mib_storage_ets(Config);
end_per_group(_GroupName, Config) ->
Config.
@@ -676,10 +728,16 @@ end_per_group(_GroupName, Config) ->
%% ---- Init Per TestCase ----
init_per_testcase(Case, Config) when is_list(Config) ->
- ?DBG("init_per_testcase -> entry with"
- "~n Config: ~p", [Config]),
+ p("init_per_testcase -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
+
+ Result = init_per_testcase1(Case, Config),
- init_per_testcase1(Case, Config).
+ p("init_per_testcase -> done when"
+ "~n Result: ~p"
+ "~n Nodes: ~p", [Result, erlang:nodes()]),
+ Result.
init_per_testcase1(otp8395 = Case, Config) when is_list(Config) ->
?DBG("init_per_testcase1 -> entry with"
@@ -720,12 +778,18 @@ init_per_testcase1(_Case, Config) when is_list(Config) ->
%% ---- End Per TestCase ----
end_per_testcase(Case, Config) when is_list(Config) ->
- ?DBG("end_per_testcase -> entry with"
- "~n Config: ~p", [Config]),
+ p("end_per_testcase -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
display_log(Config),
- end_per_testcase1(Case, Config).
+ Result = end_per_testcase1(Case, Config),
+
+ p("end_per_testcase -> done with"
+ "~n Result: ~p"
+ "~n Nodes: ~p", [Result, erlang:nodes()]),
+ Result.
end_per_testcase1(otp8395, Config) when is_list(Config) ->
otp8395({fin, Config});
@@ -785,6 +849,10 @@ cases() ->
{group, test_v2},
{group, test_v1_v2},
{group, test_v3},
+ {group, test_v1_ipv6},
+ {group, test_v2_ipv6},
+ {group, test_v1_v2_ipv6},
+ {group, test_v3_ipv6},
{group, test_multi_threaded},
{group, mib_storage},
{group, tickets1}
@@ -840,8 +908,8 @@ start_v2_agent(Config) ->
start_v2_agent(Config, Opts) ->
snmp_agent_test_lib:start_v2_agent(Config, Opts).
-start_v3_agent(Config) ->
- snmp_agent_test_lib:start_v3_agent(Config).
+%% start_v3_agent(Config) ->
+%% snmp_agent_test_lib:start_v3_agent(Config).
start_v3_agent(Config, Opts) ->
snmp_agent_test_lib:start_v3_agent(Config, Opts).
@@ -1174,7 +1242,7 @@ mse_simple(X) -> ?P(mse_simple), simple(X).
mse_v1_processing(X) -> ?P(mse_v1_processing), v1_processing(X).
mse_big(X) -> ?P(mse_big), big(X).
mse_big2(X) -> ?P(mse_big2), big2(X).
-mse_loop_mib(X) -> ?P(mse_loop_mib), loop_mib(X).
+mse_loop_mib(X) -> ?P(mse_loop_mib), loop_mib_1(X).
mse_api(X) -> ?P(mse_api), api(X).
mse_sa_register(X) -> ?P(mse_sa_register), sa_register(X).
mse_v1_trap(X) -> ?P(mse_v1_trap), v1_trap(X).
@@ -1195,7 +1263,7 @@ msd_simple(X) -> ?P(msd_simple), simple(X).
msd_v1_processing(X) -> ?P(msd_v1_processing), v1_processing(X).
msd_big(X) -> ?P(msd_big), big(X).
msd_big2(X) -> ?P(msd_big2), big2(X).
-msd_loop_mib(X) -> ?P(msd_loop_mib), loop_mib(X).
+msd_loop_mib(X) -> ?P(msd_loop_mib), loop_mib_1(X).
msd_api(X) -> ?P(msd_api), api(X).
msd_sa_register(X) -> ?P(msd_sa_register), sa_register(X).
msd_v1_trap(X) -> ?P(msd_v1_trap), v1_trap(X).
@@ -1216,7 +1284,7 @@ msm_simple(X) -> ?P(msm_simple), simple(X).
msm_v1_processing(X) -> ?P(msm_v1_processing), v1_processing(X).
msm_big(X) -> ?P(msm_big2), big(X).
msm_big2(X) -> ?P(msm_loop_mib), big2(X).
-msm_loop_mib(X) -> ?P(msm_loop_mib), loop_mib(X).
+msm_loop_mib(X) -> ?P(msm_loop_mib), loop_mib_1(X).
msm_api(X) -> ?P(msm_api), api(X).
msm_sa_register(X) -> ?P(msm_sa_register), sa_register(X).
msm_v1_trap(X) -> ?P(msm_v1_trap), v1_trap(X).
@@ -1525,11 +1593,11 @@ app_info(Config) when is_list(Config) ->
false ->
"undefined"
end,
- io:format("Root dir: ~s~n"
- "SNMP: Application dir: ~s~n"
- " Application ver: ~s~n"
- "SSL: Application dir: ~s~n"
- "CRYPTO: Application dir: ~s~n",
+ io:format("Root dir: ~ts~n"
+ "SNMP: Application dir: ~ts~n"
+ " Application ver: ~ts~n"
+ "SSL: Application dir: ~ts~n"
+ "CRYPTO: Application dir: ~ts~n",
[code:root_dir(), SnmpDir, AppVsn, SslDir, CryptoDir]),
ok.
@@ -1611,7 +1679,7 @@ del_dir(Dir, Depth) ->
ok
end.
-%v1_cases() -> [loop_mib];
+%v1_cases() -> [loop_mib_1];
v1_cases() ->
[
simple,
@@ -1619,7 +1687,7 @@ v1_cases() ->
v1_processing,
big,
big2,
- loop_mib,
+ loop_mib_1,
api,
subagent,
mnesia,
@@ -1637,14 +1705,40 @@ v1_cases() ->
change_target_addr_config
].
+v1_cases_ipv6() ->
+ [
+ simple,
+ v1_processing,
+ loop_mib_1,
+%% big,
+%% big2,
+ api,
+ subagent,
+%% mnesia,
+%% {group, multiple_reqs},
+ sa_register,
+%% v1_trap, % sends v1 trap
+%% sa_error,
+ next_across_sa,
+ undo,
+%% {group, reported_bugs},
+ {group, standard_mibs_ipv6},
+ sparse_table,
+%% cnt_64, % sends v1 trap
+ opaque
+%% change_target_addr_config % sends v1 trap
+ ].
+
init_v1(Config) when is_list(Config) ->
?line SaNode = ?config(snmp_sa, Config),
?line create_tables(SaNode),
?line AgentConfDir = ?config(agent_conf_dir, Config),
?line MgrDir = ?config(mgr_dir, Config),
?line Ip = ?config(ip, Config),
- ?line config([v1], MgrDir, AgentConfDir,
- tuple_to_list(Ip), tuple_to_list(Ip)),
+ ?line IpFamily = config_ipfamily(Config),
+ ?line config(
+ [v1], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip), IpFamily),
[{vsn, v1} | start_v1_agent(Config)].
finish_v1(Config) when is_list(Config) ->
@@ -1681,14 +1775,43 @@ v2_cases() ->
v2_caps
].
+v2_cases_ipv6() ->
+ [
+ simple_2,
+ v2_processing,
+%% big_2,
+%% big2_2,
+ loop_mib_2,
+ api_2,
+ subagent_2,
+%% mnesia_2,
+%% {group, multiple_reqs_2},
+ sa_register_2,
+ v2_trap,
+ {group, v2_inform},
+%% sa_error_2,
+ next_across_sa_2,
+ undo_2,
+%% {group, reported_bugs_2},
+ {group, standard_mibs_2},
+ v2_types,
+ implied,
+ sparse_table_2,
+ cnt_64_2,
+ opaque_2,
+ v2_caps
+ ].
+
init_v2(Config) when is_list(Config) ->
SaNode = ?config(snmp_sa, Config),
create_tables(SaNode),
AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- config([v2], MgrDir, AgentConfDir,
- tuple_to_list(Ip), tuple_to_list(Ip)),
+ IpFamily = config_ipfamily(Config),
+ config(
+ [v2], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip), IpFamily),
[{vsn, v2} | start_v2_agent(Config)].
finish_v2(Config) when is_list(Config) ->
@@ -1707,8 +1830,9 @@ init_v1_v2(Config) when is_list(Config) ->
AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
+ IpFamily = config_ipfamily(Config),
config([v1,v2], MgrDir, AgentConfDir,
- tuple_to_list(Ip), tuple_to_list(Ip)),
+ tuple_to_list(Ip), tuple_to_list(Ip), IpFamily),
[{vsn, bilingual} | start_bilingual_agent(Config)].
finish_v1_v2(Config) when is_list(Config) ->
@@ -1746,6 +1870,34 @@ v3_cases() ->
v2_caps_3
].
+v3_cases_ipv6() ->
+ [
+ simple_3,
+ v3_processing,
+%% big_3,
+%% big2_3,
+ api_3,
+ subagent_3,
+%% mnesia_3,
+ loop_mib_3,
+%% {group, multiple_reqs_3},
+ sa_register_3,
+ v3_trap,
+ {group, v3_inform},
+%% sa_error_3,
+ next_across_sa_3,
+ undo_3,
+%% {group, reported_bugs_3},
+ {group, standard_mibs_3},
+ {group, v3_security},
+ v2_types_3,
+ implied_3,
+ sparse_table_3,
+ cnt_64_3,
+ opaque_3,
+ v2_caps_3
+ ].
+
init_v3(Config) when is_list(Config) ->
%% Make sure crypto works, otherwise start_agent will fail
%% and we will be stuck with a bunch of mnesia tables for
@@ -1767,9 +1919,16 @@ init_v3(Config) when is_list(Config) ->
AgentConfDir = ?config(agent_conf_dir, Config),
MgrDir = ?config(mgr_dir, Config),
Ip = ?config(ip, Config),
- ?line ok = config([v3], MgrDir, AgentConfDir,
- tuple_to_list(Ip), tuple_to_list(Ip)),
- [{vsn, v3} | start_v3_agent(Config)].
+ IpFamily = config_ipfamily(Config),
+ ?line ok =
+ config(
+ [v3], MgrDir, AgentConfDir,
+ tuple_to_list(Ip), tuple_to_list(Ip), IpFamily),
+ Opts =
+ [{master_agent_verbosity, trace},
+ {agent_verbosity, trace},
+ {net_if_verbosity, trace}],
+ [{vsn, v3} | start_v3_agent(Config, Opts)].
finish_v3(Config) when is_list(Config) ->
delete_tables(),
@@ -2096,9 +2255,9 @@ await_dummy_manager_started(Pid) ->
{ok,Pid,Port};
{'EXIT', Pid, Reason} ->
{error, Pid, Reason};
- O ->
+ _O ->
?LOG("dummy_manager_start -> received unknown message:"
- "~n ~p",[O]),
+ "~n ~p",[_O]),
await_dummy_manager_started(Pid)
end.
@@ -2121,16 +2280,16 @@ dummy_manager_send_trap2(Pid) ->
dummy_manager_await_trap2_ack() ->
?DBG("dummy_manager_await_trap2 -> entry",[]),
receive
- {received_trap,Trap} ->
- ?LOG("dummy_manager_await_trap2 -> received trap: ~p",[Trap]),
+ {received_trap, _Trap} ->
+ ?LOG("dummy_manager_await_trap2 -> received trap: ~p", [_Trap]),
%% Note:
%% Without this sleep the v2_inform_i testcase failes! There
%% is no relation between these two test cases as far as I
%% able to figure out...
?SLEEP(60000),
ok;
- O ->
- ?ERR("dummy_manager_await_trap2 -> unexpected message: ~p",[O]),
+ _O ->
+ ?ERR("dummy_manager_await_trap2 -> unexpected message: ~p",[_O]),
ok
after 10000 ->
?ERR("dummy_manager_await_trap2 -> timeout",[]),
@@ -2156,32 +2315,34 @@ dummy_manager_loop(P,S,MA) ->
"~n Trap: ~p",[Trap]),
snmpa:send_trap(MA, Trap, "standard trap"),
dummy_manager_loop(P,S,MA);
- {udp, _UdpId, Ip, UdpPort, Bytes} ->
+ {udp, _UdpId, _Ip, _UdpPort, Bytes} ->
?LOG("dummy_manager_loop -> received upd message"
"~n from: ~p:~p"
"~n size: ~p",
- [Ip, UdpPort, dummy_manager_message_sz(Bytes)]),
+ [_Ip, _UdpPort, dummy_manager_message_sz(Bytes)]),
R = dummy_manager_handle_message(Bytes),
- ?DBG("dummy_manager_loop -> R: ~p",[R]),
+ ?DBG("dummy_manager_loop -> R: ~p", [R]),
P ! R,
- dummy_manager_loop(P,S,MA);
+ dummy_manager_loop(P, S, MA);
stop ->
?DBG("dummy_manager_loop -> received stop request",[]),
P ! {dummy_manager_stopping, self()},
gen_udp:close(S),
exit(normal);
- O ->
+ _O ->
?LOG("dummy_manager_loop -> received unknown message:"
- "~n ~p",[O]),
- dummy_manager_loop(P,S,MA)
+ "~n ~p", [_O]),
+ dummy_manager_loop(P, S, MA)
end.
+-ifdef(snmp_log).
dummy_manager_message_sz(B) when is_binary(B) ->
size(B);
dummy_manager_message_sz(L) when is_list(L) ->
length(L);
dummy_manager_message_sz(_) ->
undefined.
+-endif.
dummy_manager_handle_message(Bytes) ->
case (catch snmp_pdus:dec_message(Bytes)) of
@@ -3399,11 +3560,11 @@ simple_standard_test() ->
db_notify_client(suite) -> [];
db_notify_client(Config) when is_list(Config) ->
?P(db_notify_client),
- {SaNode, MgrNode, MibDir} = init_case(Config),
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
?DBG("db_notify_client -> case initiated: "
"~n SaNode: ~p"
"~n MgrNode: ~p"
- "~n MibDir: ~p", [SaNode, MgrNode, MibDir]),
+ "~n MibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("db_notify_client -> maximize verbosity", []),
snmpa_local_db:verbosity(trace),
Self = self(),
@@ -4154,8 +4315,8 @@ ma_v2_inform1(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4190,10 +4351,10 @@ ma_v2_inform1(MA) ->
CmdSnmpTargets =
fun(T) ->
receive
- {snmp_targets, T, [Addr]} ->
+ {snmp_targets, T, [_Addr]} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_targets "
- "~n with receiver: ~p",[Addr]),
+ "~n with receiver: ~p", [_Addr]),
ok;
{snmp_targets, T, Addrs} ->
?ERR("ma_v2_inform1 -> "
@@ -4211,16 +4372,16 @@ ma_v2_inform1(MA) ->
Cmd06 =
fun() ->
receive
- {snmp_notification, Tag03, {got_response, Addr}} ->
+ {snmp_notification, Tag03, {got_response, _Addr}} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_notification "
- "[with manager response] from: ~n ~p",[Addr]),
+ "[with manager response] from: ~n ~p", [_Addr]),
ok;
- {snmp_notification, Tag03, {no_response, Addr}} ->
+ {snmp_notification, Tag03, {no_response, _Addr}} ->
?ERR("ma_v2_inform1 -> "
"received unexpected snmp_notification "
"[without manager response] from: ~n ~p",
- [Addr]),
+ [_Addr]),
{error, no_response}
after
20000 ->
@@ -4250,16 +4411,16 @@ ma_v2_inform1(MA) ->
Cmd10 =
fun() ->
receive
- {snmp_notification, Tag07, {got_response, Addr}} ->
+ {snmp_notification, Tag07, {got_response, _Addr}} ->
?ERR("ma_v2_inform1 -> "
"received unexpected snmp_notification "
- "[with manager response] from: ~n ~p", [Addr]),
+ "[with manager response] from: ~n ~p", [_Addr]),
{error, got_response};
- {snmp_notification, Tag07, {no_response, Addr}} ->
+ {snmp_notification, Tag07, {no_response, _Addr}} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_notification "
"[without manager response] from: ~n ~p",
- [Addr]),
+ [_Addr]),
ok
after
240000 ->
@@ -4303,8 +4464,8 @@ ma_v2_inform2(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4384,8 +4545,8 @@ ma_v2_inform3(MA) ->
"~n send notification: testTrapv22", [MA]),
CmdExpectInform =
- fun(No, Response) ->
- ?DBG("CmdExpectInform -> ~p: ~n~p", [No, Response]),
+ fun(_No, Response) ->
+ ?DBG("CmdExpectInform -> ~p: ~n~p", [_No, Response]),
?expect2({inform, Response},
[{[sysUpTime, 0], any},
{[snmpTrapOID, 0], ?system ++ [0,1]}])
@@ -4394,8 +4555,8 @@ ma_v2_inform3(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("CmdExp -> Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("CmdExp -> Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4506,17 +4667,17 @@ delivery_info(Tag, Address, DeliveryResult, Extra) ->
command_handler([]) ->
ok;
-command_handler([{No, Desc, Cmd}|Rest]) ->
- ?LOG("command_handler -> command ~w: ~n ~s", [No, Desc]),
+command_handler([{_No, _Desc, Cmd}|Rest]) ->
+ ?LOG("command_handler -> command ~w: ~n ~s", [_No, _Desc]),
case (catch Cmd()) of
ok ->
- ?LOG("command_handler -> ~w: ok",[No]),
+ ?LOG("command_handler -> ~w: ok", [_No]),
command_handler(Rest);
{error, Reason} ->
- ?ERR("command_handler -> ~w error: ~n~p",[No, Reason]),
+ ?ERR("command_handler -> ~w error: ~n~p", [_No, Reason]),
?line ?FAIL(Reason);
Error ->
- ?ERR("command_handler -> ~w unexpected: ~n~p",[No, Error]),
+ ?ERR("command_handler -> ~w unexpected: ~n~p", [_No, Error]),
?line ?FAIL({unexpected_command_result, Error})
end.
@@ -4683,6 +4844,15 @@ standard_mibs_cases() ->
snmp_view_based_acm_mib
].
+standard_mibs_cases_ipv6() ->
+ [
+ %% snmp_standard_mib, % Sending v1 traps does not work over IPv6
+ snmp_community_mib,
+ snmp_framework_mib,
+ snmp_target_mib,
+ snmp_notification_mib,
+ snmp_view_based_acm_mib
+ ].
%%-----------------------------------------------------------------
%% For this test, the agent is configured for v1.
@@ -5517,57 +5687,59 @@ usm_bad() ->
%% works.
%% Load all std mibs that are not loaded by default.
%%-----------------------------------------------------------------
-loop_mib(suite) -> [];
-loop_mib(Config) when is_list(Config) ->
- ?P(loop_mib),
- ?LOG("loop_mib -> initiate case",[]),
+loop_mib_1(suite) -> [];
+loop_mib_1(Config) when is_list(Config) ->
+ ?P(loop_mib_1),
+ ?LOG("loop_mib_1 -> initiate case",[]),
%% snmpa:verbosity(master_agent,debug),
%% snmpa:verbosity(mib_server,info),
- {SaNode, MgrNode, MibDir} = init_case(Config),
- ?DBG("loop_mib -> ~n"
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
+ ?DBG("loop_mib_1 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
- ?DBG("loop_mib -> load mib SNMP-COMMUNITY-MIB",[]),
+ "\tMibDir: ~p",[_SaNode, _MgrNode, _MibDir]),
+ ?DBG("loop_mib_1 -> load mib SNMP-COMMUNITY-MIB",[]),
?line load_master_std("SNMP-COMMUNITY-MIB"),
- ?DBG("loop_mib -> load mib SNMP-MPD-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-MPD-MIB",[]),
?line load_master_std("SNMP-MPD-MIB"),
- ?DBG("loop_mib -> load mib SNMP-TARGET-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-TARGET-MIB",[]),
?line load_master_std("SNMP-TARGET-MIB"),
- ?DBG("loop_mib -> load mib SNMP-NOTIFICATION-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-NOTIFICATION-MIB",[]),
?line load_master_std("SNMP-NOTIFICATION-MIB"),
- ?DBG("loop_mib -> load mib SNMP-FRAMEWORK-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-FRAMEWORK-MIB",[]),
?line load_master_std("SNMP-FRAMEWORK-MIB"),
- ?DBG("loop_mib -> load mib SNMP-VIEW-BASED-ACM-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-VIEW-BASED-ACM-MIB",[]),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
- ?DBG("loop_mib -> try",[]),
- try_test(loop_mib_1),
- ?DBG("loop_mib -> unload mib SNMP-COMMUNITY-MIB",[]),
+ ?DBG("loop_mib_1 -> try",[]),
+
+ try_test(loop_mib_1_test),
+
+ ?DBG("loop_mib_1 -> unload mib SNMP-COMMUNITY-MIB",[]),
?line unload_master("SNMP-COMMUNITY-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-MPD-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-MPD-MIB",[]),
?line unload_master("SNMP-MPD-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-TARGET-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-TARGET-MIB",[]),
?line unload_master("SNMP-TARGET-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-NOTIFICATION-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-NOTIFICATION-MIB",[]),
?line unload_master("SNMP-NOTIFICATION-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-FRAMEWORK-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-FRAMEWORK-MIB",[]),
?line unload_master("SNMP-FRAMEWORK-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-VIEW-BASED-ACM-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-VIEW-BASED-ACM-MIB",[]),
?line unload_master("SNMP-VIEW-BASED-ACM-MIB"),
%% snmpa:verbosity(master_agent,log),
%% snmpa:verbosity(mib_server,silence),
- ?LOG("loop_mib -> done",[]).
+ ?LOG("loop_mib_1 -> done",[]).
loop_mib_2(suite) -> [];
loop_mib_2(Config) when is_list(Config) ->
?P(loop_mib_2),
?LOG("loop_mib_2 -> initiate case",[]),
- {SaNode, MgrNode, MibDir} = init_case(Config),
- ?DBG("loop_mib_2 -> ~n"
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
+ ?DBG("do_loop_mib_2 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
+ "\tMibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("loop_mib_2 -> load mibs",[]),
?line load_master_std("SNMP-COMMUNITY-MIB"),
?line load_master_std("SNMP-MPD-MIB"),
@@ -5575,7 +5747,9 @@ loop_mib_2(Config) when is_list(Config) ->
?line load_master_std("SNMP-NOTIFICATION-MIB"),
?line load_master_std("SNMP-FRAMEWORK-MIB"),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
- try_test(loop_mib_2),
+
+ try_test(loop_mib_2_test),
+
?DBG("loop_mib_2 -> unload mibs",[]),
?line unload_master("SNMP-COMMUNITY-MIB"),
?line unload_master("SNMP-MPD-MIB"),
@@ -5590,18 +5764,18 @@ loop_mib_3(suite) -> [];
loop_mib_3(Config) when is_list(Config) ->
?P(loop_mib_3),
?LOG("loop_mib_3 -> initiate case",[]),
- {SaNode, MgrNode, MibDir} = init_case(Config),
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
?DBG("loop_mib_3 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
+ "\tMibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("loop_mib_3 -> load mibs",[]),
?line load_master_std("SNMP-TARGET-MIB"),
?line load_master_std("SNMP-NOTIFICATION-MIB"),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
?line load_master_std("SNMP-USER-BASED-SM-MIB"),
- try_test(loop_mib_2),
+ try_test(loop_mib_3_test),
?DBG("loop_mib_3 -> unload mibs",[]),
?line unload_master("SNMP-TARGET-MIB"),
@@ -5612,17 +5786,16 @@ loop_mib_3(Config) when is_list(Config) ->
%% Req. As many mibs all possible
-loop_mib_1() ->
- ?DBG("loop_mib_1 -> entry",[]),
+loop_mib_1_test() ->
+ ?DBG("loop_mib_1_test -> entry",[]),
N = loop_it_1([1,1], 0),
io:format(user, "found ~w varibles\n", [N]),
?line N = if N < 100 -> 100;
true -> N
end.
-
loop_it_1(Oid, N) ->
- ?DBG("loop_it_1 -> entry with~n"
+ ?DBG("loop_it_1_test -> entry with~n"
"\tOid: ~p~n"
"\tN: ~p",[Oid,N]),
case get_next_req([Oid]) of
@@ -5630,13 +5803,13 @@ loop_it_1(Oid, N) ->
error_status = noError,
error_index = 0,
varbinds = [#varbind{oid = NOid,
- value = Value}]} when NOid > Oid ->
- ?DBG("loop_it_1 -> "
+ value = _Value}]} when NOid > Oid ->
+ ?DBG("loop_it_1_test -> "
"~n NOid: ~p"
- "~n Value: ~p",[NOid, Value]),
- ?line [Value2] = get_req(1, [NOid]), % must not be same
- ?DBG("loop_it_1 -> "
- "~n Value2: ~p",[Value2]),
+ "~n Value: ~p", [NOid, _Value]),
+ ?line [_Value2] = get_req(1, [NOid]), % must not be same
+ ?DBG("loop_it_1_test -> "
+ "~n Value2: ~p", [_Value2]),
loop_it_1(NOid, N+1);
#pdu{type = 'get-response',
@@ -5649,7 +5822,7 @@ loop_it_1(Oid, N) ->
error_status = noSuchName,
error_index = 1,
varbinds = [_]} ->
- ?DBG("loop_it_1 -> done: ~p",[N]),
+ ?DBG("loop_it_1_test -> done: ~p",[N]),
N;
#pdu{type = 'get-response',
@@ -5670,14 +5843,13 @@ loop_it_1(Oid, N) ->
%% Req. As many mibs all possible
-loop_mib_2() ->
- ?DBG("loop_mib_1 -> entry",[]),
+loop_mib_2_test() ->
+ ?DBG("loop_mib_2_test -> entry",[]),
N = loop_it_2([1,1], 0),
io:format(user, "found ~w varibles\n", [N]),
?line N = if N < 100 -> 100;
true -> N
end.
-
loop_it_2(Oid, N) ->
?DBG("loop_it_2 -> entry with"
@@ -5687,22 +5859,22 @@ loop_it_2(Oid, N) ->
#pdu{type = 'get-response',
error_status = noError,
error_index = 0,
- varbinds = [#varbind{oid = NOid, value = endOfMibView}]} ->
+ varbinds = [#varbind{oid = _NOid, value = endOfMibView}]} ->
?DBG("loop_it_2 -> "
- "~n NOid: ~p",[NOid]),
+ "~n NOid: ~p", [_NOid]),
N;
#pdu{type = 'get-response',
error_status = noError,
error_index = 0,
varbinds = [#varbind{oid = NOid,
- value = Value}]} when NOid > Oid ->
+ value = _Value}]} when NOid > Oid ->
?DBG("loop_it_2 -> "
"~n NOid: ~p"
- "~n Value: ~p",[NOid, Value]),
- ?line [Value2] = get_req(1, [NOid]), % must not be same
+ "~n Value: ~p", [NOid, _Value]),
+ ?line [_Value2] = get_req(1, [NOid]), % must not be same
?DBG("loop_it_2 -> "
- "~n Value2: ~p",[Value2]),
+ "~n Value2: ~p", [_Value2]),
loop_it_2(NOid, N+1);
#pdu{type = 'get-response',
@@ -5745,6 +5917,10 @@ loop_it_2(Oid, N) ->
end.
+loop_mib_3_test() ->
+ ?DBG("loop_mib_3_test -> entry",[]),
+ loop_mib_2_test().
+
%%%-----------------------------------------------------------------
%%% Testing of reported bugs and other tickets.
@@ -6345,8 +6521,6 @@ otp_4394_config(AgentConfDir, MgrDir, Ip0) ->
?line write_notify_conf(AgentConfDir),
ok.
-
-
otp_4394_finish(Config) when is_list(Config) ->
?DBG("finish_otp_4394 -> entry", []),
C1 = stop_agent(Config),
@@ -6499,6 +6673,7 @@ otp8395({init, Config}) when is_list(Config) ->
%% SubAgentHost = ?HPSTNAME(SubAgentNode),
ManagerHost = ?HOSTNAME(ManagerNode),
+ IpFamily = inet,
Host = snmp_test_lib:hostname(),
Ip = ?LOCALHOST(),
{ok, AgentIP0} = snmp_misc:ip(AgentHost),
@@ -6516,9 +6691,7 @@ otp8395({init, Config}) when is_list(Config) ->
Vsns = [v1],
AgentConfDir = ?config(agent_conf_dir, Config),
ManagerConfDir = ?config(manager_top_dir, Config),
- snmp_agent_test_lib:config(Vsns,
- ManagerConfDir, AgentConfDir,
- ManagerIP, AgentIP),
+ config(Vsns, ManagerConfDir, AgentConfDir, ManagerIP, AgentIP, IpFamily),
%% --
@@ -6527,6 +6700,7 @@ otp8395({init, Config}) when is_list(Config) ->
Config2 = start_agent([{host, Host},
{ip, Ip},
+ {ipfamily, IpFamily},
{agent_node, AgentNode},
{agent_host, AgentHost},
{agent_ip, AgentIP},
@@ -6606,22 +6780,23 @@ otp8395(Config) when is_list(Config) ->
put(mib_dir, ?config(mib_dir, Config)),
put(vsn, v1),
put(master_host, ?config(agent_host, Config)),
+ put(ipfamily, ?config(ipfamily, Config)),
try_test(simple_standard_test),
?SLEEP(1000),
AgentNode = ?config(agent_node, Config),
AgentLogDir = ?config(agent_log_dir, Config),
OutFile = join([AgentLogDir, "otp8395.txt"]),
- {ok, LogInfo} = rpc:call(AgentNode, snmpa, log_info, []),
- ?DBG("otp8395 -> LogInfo: ~p", [LogInfo]),
+ {ok, _LogInfo} = rpc:call(AgentNode, snmpa, log_info, []),
+ ?DBG("otp8395 -> LogInfo: ~p", [_LogInfo]),
%% SyncRes = rpc:call(AgentNode, snmp, log_sync, [?audit_trail_log_name]),
%% ?DBG("otp8395 -> SyncRes: ~p", [SyncRes]),
ok = agent_log_validation(AgentNode),
- LTTRes =
+ _LTTRes =
rpc:call(AgentNode, snmpa, log_to_txt, [AgentLogDir, [], OutFile]),
- ?DBG("otp8395 -> LTTRes: ~p", [LTTRes]),
+ ?DBG("otp8395 -> LTTRes: ~p", [_LTTRes]),
?SLEEP(1000),
?DBG("otp8395 -> done", []),
@@ -6633,126 +6808,12 @@ otp8395(Config) when is_list(Config) ->
otp9884({init, Config}) when is_list(Config) ->
?DBG("otp9884(init) -> entry with"
"~n Config: ~p", [Config]),
-
- %% --
- %% Start nodes
- %%
-
- {ok, AgentNode} = start_node(agent),
-
- %% We don't use a manager in this test but the (common) config
- %% function takes an argument that is derived from this
- {ok, ManagerNode} = start_node(manager),
-
- %% --
- %% Mnesia init
- %%
-
- AgentDbDir = ?config(agent_db_dir, Config),
- AgentMnesiaDir = join([AgentDbDir, "mnesia"]),
- mnesia_init(AgentNode, AgentMnesiaDir),
-
- mnesia_create_schema(AgentNode, [AgentNode]),
-
- mnesia_start(AgentNode),
-
- %% --
- %% Host & IP
- %%
-
- AgentHost = ?HOSTNAME(AgentNode),
- ManagerHost = ?HOSTNAME(ManagerNode),
-
- Host = snmp_test_lib:hostname(),
- Ip = ?LOCALHOST(),
- {ok, AgentIP0} = snmp_misc:ip(AgentHost),
- AgentIP = tuple_to_list(AgentIP0),
- {ok, ManagerIP0} = snmp_misc:ip(ManagerHost),
- ManagerIP = tuple_to_list(ManagerIP0),
-
-
- %% --
- %% Write agent config
- %%
-
- Vsns = [v1],
- ManagerConfDir = ?config(manager_top_dir, Config),
- AgentConfDir = ?config(agent_conf_dir, Config),
- AgentTopDir = ?config(agent_top_dir, Config),
- AgentBkpDir1 = join([AgentTopDir, backup1]),
- AgentBkpDir2 = join([AgentTopDir, backup2]),
- ok = file:make_dir(AgentBkpDir1),
- ok = file:make_dir(AgentBkpDir2),
- AgentBkpDirs = [AgentBkpDir1, AgentBkpDir2],
- snmp_agent_test_lib:config(Vsns,
- ManagerConfDir, AgentConfDir,
- ManagerIP, AgentIP),
-
-
- %% --
- %% Start the agent
- %%
-
- Config2 = start_agent([{host, Host},
- {ip, Ip},
- {agent_node, AgentNode},
- {agent_host, AgentHost},
- {agent_ip, AgentIP},
- {agent_backup_dirs, AgentBkpDirs}|Config]),
-
- %% --
- %% Create watchdog
- %%
-
- Dog = ?WD_START(?MINS(1)),
-
- [{watchdog, Dog} | Config2];
+ init_v1_agent([{ipfamily, inet} | Config]);
otp9884({fin, Config}) when is_list(Config) ->
?DBG("otp9884(fin) -> entry with"
"~n Config: ~p", [Config]),
-
- AgentNode = ?config(agent_node, Config),
- ManagerNode = ?config(manager_node, Config),
-
- %% -
- %% Stop agent (this is the nice way to do it,
- %% so logs and files can be closed in the proper way).
- %%
-
- AgentSup = ?config(agent_sup, Config),
- ?DBG("otp9884(fin) -> stop (stand-alone) agent: ~p", [AgentSup]),
- stop_stdalone_agent(AgentSup),
-
- %% -
- %% Stop mnesia
- %%
- ?DBG("otp9884(fin) -> stop mnesia", []),
- mnesia_stop(AgentNode),
-
-
- %% -
- %% Stop the agent node
- %%
-
- ?DBG("otp9884(fin) -> stop agent node", []),
- stop_node(AgentNode),
-
-
- %% SubAgentNode = ?config(sub_agent_node, Config),
- %% stop_node(SubAgentNode),
-
-
- %% -
- %% Stop the manager node
- %%
-
- ?DBG("otp9884(fin) -> stop manager node", []),
- stop_node(ManagerNode),
-
- Dog = ?config(watchdog, Config),
- ?WD_STOP(Dog),
- lists:keydelete(watchdog, 1, Config);
+ fin_v1_agent(Config);
otp9884(doc) ->
"OTP-9884 - Simlutaneous backup call should not work. ";
@@ -6812,8 +6873,6 @@ otp9884_await_backup_completion(First, Second)
end;
otp9884_await_backup_completion(First, Second) ->
throw({error, {bad_completion, First, Second}}).
-
-
%%-----------------------------------------------------------------
agent_log_validation(Node) ->
@@ -6942,10 +7001,10 @@ stop_stdalone_agent(Pid) when (node(Pid) =/= node()) ->
MRef = erlang:monitor(process, Pid),
rpc:call(node(Pid), ?MODULE, stop_stdalone_agent, [Pid]),
receive
- {'DOWN', MRef, process, Pid, Info} ->
+ {'DOWN', MRef, process, Pid, _Info} ->
?DBG("received expected DOWN message "
"regarding snmp agent supervisor: "
- "~n Info: ~p", [Info]),
+ "~n Info: ~p", [_Info]),
ok
after 5000 ->
?DBG("no DOWN message "
@@ -7004,9 +7063,9 @@ do_info(MaNode) ->
tree_size_bytes,
db_memory]}],
verify_info(Info, Keys),
- OldInfo = snmpa:old_info_format(Info),
- ?DBG("info_test1 -> OldInfo: ~n~p", [OldInfo]),
- verify_old_info(OldInfo),
+ %% OldInfo = snmpa:old_info_format(Info),
+ %% ?DBG("info_test1 -> OldInfo: ~n~p", [OldInfo]),
+ %% verify_old_info(OldInfo),
ok.
verify_info([], []) ->
@@ -7049,20 +7108,20 @@ verify_subinfo(Info0, [Key|Keys]) ->
verify_subinfo(Info, Keys)
end.
-verify_old_info(Info) ->
- Keys = [vsns, subagents, loaded_mibs,
- tree_size_bytes, process_memory, db_memory],
- verify_old_info(Keys, Info).
-
-verify_old_info([], _) ->
- ok;
-verify_old_info([Key|Keys], Info) ->
- case lists:keymember(Key, 1, Info) of
- true ->
- verify_old_info(Keys, Info);
- false ->
- ?FAIL({missing_old_info, Key})
- end.
+%% verify_old_info(Info) ->
+%% Keys = [vsns, subagents, loaded_mibs,
+%% tree_size_bytes, process_memory, db_memory],
+%% verify_old_info(Keys, Info).
+
+%% verify_old_info([], _) ->
+%% ok;
+%% verify_old_info([Key|Keys], Info) ->
+%% case lists:keymember(Key, 1, Info) of
+%% true ->
+%% verify_old_info(Keys, Info);
+%% false ->
+%% ?FAIL({missing_old_info, Key})
+%% end.
%% Index String - string used in index
is(S) -> [length(S) | S].
@@ -7110,6 +7169,9 @@ delete_files(Config) ->
config(Vsns, MgrDir, AgentDir, MIp, AIp) ->
snmp_agent_test_lib:config(Vsns, MgrDir, AgentDir, MIp, AIp).
+config(Vsns, MgrDir, AgentDir, MIp, AIp, IpFamily) ->
+ snmp_agent_test_lib:config(Vsns, MgrDir, AgentDir, MIp, AIp, IpFamily).
+
update_usm(Vsns, Dir) ->
snmp_agent_test_lib:update_usm(Vsns, Dir).
@@ -7354,3 +7416,124 @@ p(F, A) ->
formated_timestamp() ->
snmp_test_lib:formated_timestamp().
+
+init_v1_agent(Config) ->
+ %% --
+ %% Start nodes
+ %%
+
+ {ok, AgentNode} = start_node(agent),
+
+ %% We don't use a manager in this test but the (common) config
+ %% function takes an argument that is derived from this
+ {ok, ManagerNode} = start_node(manager),
+
+ %% --
+ %% Mnesia init
+ %%
+
+ AgentDbDir = ?config(agent_db_dir, Config),
+ AgentMnesiaDir = join([AgentDbDir, "mnesia"]),
+ mnesia_init(AgentNode, AgentMnesiaDir),
+
+ mnesia_create_schema(AgentNode, [AgentNode]),
+
+ mnesia_start(AgentNode),
+
+ %% --
+ %% Host & IP
+ %%
+
+ AgentHost = ?HOSTNAME(AgentNode),
+ ManagerHost = ?HOSTNAME(ManagerNode),
+
+ Host = snmp_test_lib:hostname(),
+ IpFamily = config_ipfamily(Config),
+ Ip = ?LOCALHOST(IpFamily),
+ {ok, AgentIP0} = snmp_misc:ip(AgentHost, IpFamily),
+ AgentIP = tuple_to_list(AgentIP0),
+ {ok, ManagerIP0} = snmp_misc:ip(ManagerHost, IpFamily),
+ ManagerIP = tuple_to_list(ManagerIP0),
+
+
+ %% --
+ %% Write agent config
+ %%
+
+ Vsns = [v1],
+ ManagerConfDir = ?config(manager_top_dir, Config),
+ AgentConfDir = ?config(agent_conf_dir, Config),
+ AgentTopDir = ?config(agent_top_dir, Config),
+ AgentBkpDir1 = join([AgentTopDir, backup1]),
+ AgentBkpDir2 = join([AgentTopDir, backup2]),
+ ok = file:make_dir(AgentBkpDir1),
+ ok = file:make_dir(AgentBkpDir2),
+ AgentBkpDirs = [AgentBkpDir1, AgentBkpDir2],
+ config(Vsns, ManagerConfDir, AgentConfDir, ManagerIP, AgentIP, IpFamily),
+
+
+ %% --
+ %% Start the agent
+ %%
+
+ Config2 = start_agent([{host, Host},
+ {ip, Ip},
+ {agent_node, AgentNode},
+ {agent_host, AgentHost},
+ {agent_ip, AgentIP},
+ {agent_backup_dirs, AgentBkpDirs}|Config]),
+
+ %% --
+ %% Create watchdog
+ %%
+
+ Dog = ?WD_START(?MINS(1)),
+
+ [{watchdog, Dog} | Config2].
+
+fin_v1_agent(Config) ->
+ AgentNode = ?config(agent_node, Config),
+ ManagerNode = ?config(manager_node, Config),
+
+ %% -
+ %% Stop agent (this is the nice way to do it,
+ %% so logs and files can be closed in the proper way).
+ %%
+
+ AgentSup = ?config(agent_sup, Config),
+ stop_stdalone_agent(AgentSup),
+
+ %% -
+ %% Stop mnesia
+ %%
+ mnesia_stop(AgentNode),
+
+
+ %% -
+ %% Stop the agent node
+ %%
+ stop_node(AgentNode),
+
+
+ %% SubAgentNode = ?config(sub_agent_node, Config),
+ %% stop_node(SubAgentNode),
+
+
+ %% -
+ %% Stop the manager node
+ %%
+ stop_node(ManagerNode),
+
+ Dog = ?config(watchdog, Config),
+ ?WD_STOP(Dog),
+ lists:keydelete(watchdog, 1, Config).
+
+
+
+config_ipfamily(Config) ->
+ case ?config(ipfamily, Config) of
+ undefined ->
+ inet;
+ Value ->
+ Value
+ end.
diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl
index 122289c28e..333fe6eb66 100644
--- a/lib/snmp/test/snmp_agent_test_lib.erl
+++ b/lib/snmp/test/snmp_agent_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -39,7 +39,7 @@
get_req/2, get_next_req/1,
- config/5,
+ config/5, config/6,
delete_files/1,
copy_file/2,
update_usm/2,
@@ -232,13 +232,14 @@ init_case(Config) when is_list(Config) ->
MgrNode = ?config(snmp_mgr, Config),
MasterNode = ?config(snmp_master, Config),
%% MasterNode = node(),
-
+ IpFamily = proplists:get_value(ipfamily, Config, inet),
+
SaHost = ?HOSTNAME(SaNode),
MgrHost = ?HOSTNAME(MgrNode),
MasterHost = ?HOSTNAME(MasterNode),
- {ok, MasterIP} = snmp_misc:ip(MasterHost),
- {ok, MIP} = snmp_misc:ip(MgrHost),
- {ok, SIP} = snmp_misc:ip(SaHost),
+ {ok, MasterIP} = snmp_misc:ip(MasterHost, IpFamily),
+ {ok, MIP} = snmp_misc:ip(MgrHost, IpFamily),
+ {ok, SIP} = snmp_misc:ip(SaHost, IpFamily),
put(mgr_node, MgrNode),
@@ -250,6 +251,7 @@ init_case(Config) when is_list(Config) ->
put(mip, tuple_to_list(MIP)),
put(masterip, tuple_to_list(MasterIP)),
put(sip, tuple_to_list(SIP)),
+ put(ipfamily, IpFamily),
MibDir = ?config(mib_dir, Config),
put(mib_dir, MibDir),
@@ -299,10 +301,10 @@ call(N,M,F,A) ->
"~n Loc: ~p", [Rn, Loc]),
put(test_server_loc, Loc),
exit(Rn);
- {done, Ret, Zed} ->
+ {done, Ret, _Zed} ->
?DBG("call -> done:"
"~n Ret: ~p"
- "~n Zed: ~p", [Ret, Zed]),
+ "~n Zed: ~p", [Ret, _Zed]),
case Ret of
{error, Reason} ->
exit(Reason);
@@ -338,8 +340,8 @@ run(Mod, Func, Args, Opts) ->
CtxEngineID = snmp_misc:get_option(context_engine_id, Opts, EngineID),
Community = snmp_misc:get_option(community, Opts, "all-rights"),
?DBG("run -> start crypto app",[]),
- Crypto = ?CRYPTO_START(),
- ?DBG("run -> Crypto: ~p", [Crypto]),
+ _CryptoRes = ?CRYPTO_START(),
+ ?DBG("run -> Crypto: ~p", [_CryptoRes]),
catch snmp_test_mgr:stop(), % If we had a running mgr from a failed case
StdM = join(code:priv_dir(snmp), "mibs") ++ "/",
Vsn = get(vsn),
@@ -358,6 +360,7 @@ run(Mod, Func, Args, Opts) ->
{packet_server_debug,true},
{debug,true},
{agent, get(master_host)},
+ {ipfamily, get(ipfamily)},
{agent_udp, 4000},
{trap_udp, 5000},
{recbuf,65535},
@@ -676,9 +679,9 @@ stop_agent(Config) when is_list(Config) ->
(catch process_info(Sup)),
(catch process_info(Par))]),
- Info = agent_info(Sup),
+ _Info = agent_info(Sup),
?DBG("stop_agent -> Agent info: "
- "~n ~p", [Info]),
+ "~n ~p", [_Info]),
stop_sup(Sup, Par),
@@ -1303,10 +1306,10 @@ get_req(Id, Vars) ->
{ok, Val} ->
?DBG("get_req -> response: ~p",[Val]),
Val;
- {error, _, {ExpFmt, ExpArg}, {ActFmt, ActArg}} ->
+ {error, _, {_ExpFmt, ExpArg}, {_ActFmt, ActArg}} ->
?DBG("get_req -> error for ~p: "
- "~n " ++ ExpFmt ++
- "~n " ++ ActFmt,
+ "~n " ++ _ExpFmt ++
+ "~n " ++ _ActFmt,
[Id] ++ ExpArg ++ ActArg),
exit({unexpected_response, ExpArg, ActArg});
Error ->
@@ -1368,16 +1371,35 @@ stop_node(Node) ->
%%%-----------------------------------------------------------------
config(Vsns, MgrDir, AgentConfDir, MIp, AIp) ->
+ config(Vsns, MgrDir, AgentConfDir, MIp, AIp, inet).
+
+config(Vsns, MgrDir, AgentConfDir, MIp, AIp, IpFamily) ->
?LOG("config -> entry with"
- "~n Vsns: ~p"
- "~n MgrDir: ~p"
- "~n AgentConfDir: ~p"
- "~n MIp: ~p"
- "~n AIp: ~p",
- [Vsns, MgrDir, AgentConfDir, MIp, AIp]),
- ?line snmp_config:write_agent_snmp_files(AgentConfDir, Vsns,
- MIp, ?TRAP_UDP, AIp, 4000,
- "test"),
+ "~n Vsns: ~p"
+ "~n MgrDir: ~p"
+ "~n AgentConfDir: ~p"
+ "~n MIp: ~p"
+ "~n AIp: ~p"
+ "~n IpFamily: ~p",
+ [Vsns, MgrDir, AgentConfDir, MIp, AIp, IpFamily]),
+ ?line {Domain, ManagerAddr} =
+ case IpFamily of
+ inet6 ->
+ Ipv6Domain = transportDomainUdpIpv6,
+ AgentIpv6Addr = {AIp, 4000},
+ ManagerIpv6Addr = {MIp, ?TRAP_UDP},
+ ?line ok =
+ snmp_config:write_agent_snmp_files(
+ AgentConfDir, Vsns,
+ Ipv6Domain, ManagerIpv6Addr, AgentIpv6Addr, "test"),
+ {Ipv6Domain, ManagerIpv6Addr};
+ _ ->
+ ?line ok =
+ snmp_config:write_agent_snmp_files(
+ AgentConfDir, Vsns, MIp, ?TRAP_UDP, AIp, 4000, "test"),
+ {snmpUDPDomain, {MIp, ?TRAP_UDP}}
+ end,
+
?line case update_usm(Vsns, AgentConfDir) of
true ->
?line copy_file(join(AgentConfDir, "usm.conf"),
@@ -1388,7 +1410,7 @@ config(Vsns, MgrDir, AgentConfDir, MIp, AIp) ->
end,
?line update_community(Vsns, AgentConfDir),
?line update_vacm(Vsns, AgentConfDir),
- ?line write_target_addr_conf(AgentConfDir, MIp, ?TRAP_UDP, Vsns),
+ ?line write_target_addr_conf(AgentConfDir, Domain, ManagerAddr, Vsns),
?line write_target_params_conf(AgentConfDir, Vsns),
?line write_notify_conf(AgentConfDir),
ok.
@@ -1486,7 +1508,7 @@ rewrite_usm_mgr(Dir, ShaKey, DesKey) ->
{"mgrEngine", "newUser", "newUser", zeroDotZero,
usmHMACSHAAuthProtocol, "", "",
usmDESPrivProtocol, "", "", "", ShaKey, DesKey}],
- ok = snmp_config:write_agent_usm_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_usm_config(Dir, "", Conf).
reset_usm_mgr(Dir) ->
?line ok = file:rename(join(Dir,"usm.old"),
@@ -1512,13 +1534,15 @@ update_vacm(_Vsn, Dir) ->
write_community_conf(Dir, Conf) ->
- snmp_config:write_agent_community_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_community_config(Dir, "", Conf).
write_target_addr_conf(Dir, Conf) ->
- snmp_config:write_agent_target_addr_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_target_addr_config(Dir, "", Conf).
-write_target_addr_conf(Dir, ManagerIp, UDP, Vsns) ->
- snmp_config:write_agent_snmp_target_addr_conf(Dir, ManagerIp, UDP, Vsns).
+write_target_addr_conf(Dir, Ip_or_Domain, Port_or_Addr, Vsns) ->
+ ?line ok =
+ snmp_config:write_agent_snmp_target_addr_conf(
+ Dir, Ip_or_Domain, Port_or_Addr, Vsns).
rewrite_target_addr_conf(Dir, NewPort) ->
?DBG("rewrite_target_addr_conf -> entry with"
@@ -1527,15 +1551,14 @@ rewrite_target_addr_conf(Dir, NewPort) ->
case file:read_file_info(TAFile) of
{ok, _} ->
ok;
- {error, R} ->
+ {error, _R} ->
?ERR("failure reading file info of "
- "target address config file: ~p",[R]),
+ "target address config file: ~p", [_R]),
ok
end,
?line [TrapAddr|Addrs] =
- snmp_conf:read(TAFile,
- fun(R) -> rewrite_target_addr_conf_check(R) end),
+ snmp_conf:read(TAFile, fun rewrite_target_addr_conf_check/1),
?DBG("rewrite_target_addr_conf -> TrapAddr: ~p",[TrapAddr]),
@@ -1571,14 +1594,14 @@ write_target_params_conf(Dir, Vsns) ->
(v3) -> {"target_v3", v3, usm, "all-rights", noAuthNoPriv}
end,
Conf = [F(Vsn) || Vsn <- Vsns],
- snmp_config:write_agent_target_params_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_target_params_config(Dir, "", Conf).
rewrite_target_params_conf(Dir, SecName, SecLevel)
when is_list(SecName) andalso is_atom(SecLevel) ->
?line ok = file:rename(join(Dir,"target_params.conf"),
join(Dir,"target_params.old")),
Conf = [{"target_v3", v3, usm, SecName, SecLevel}],
- snmp_config:write_agent_target_params_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_target_params_config(Dir, "", Conf).
reset_target_params_conf(Dir) ->
?line ok = file:rename(join(Dir,"target_params.old"),
@@ -1587,12 +1610,12 @@ reset_target_params_conf(Dir) ->
write_notify_conf(Dir) ->
Conf = [{"standard trap", "std_trap", trap},
{"standard inform", "std_inform", inform}],
- snmp_config:write_agent_notify_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_notify_config(Dir, "", Conf).
write_view_conf(Dir) ->
Conf = [{2, [1,3,6], included, null},
{2, ?tDescr_instance, excluded, null}],
- snmp_config:write_agent_view_config(Dir, "", Conf).
+ ?line ok = snmp_config:write_agent_view_config(Dir, "", Conf).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/snmp/test/snmp_appup_test.erl b/lib/snmp/test/snmp_appup_test.erl
index 99994a2410..021d42a978 100644
--- a/lib/snmp/test/snmp_appup_test.erl
+++ b/lib/snmp/test/snmp_appup_test.erl
@@ -63,33 +63,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- TopDir = filename:join(PrivDir, appup),
- case file:make_dir(TopDir) of
- ok ->
- ok;
- Error ->
- fail({failed_creating_subsuite_top_dir, Error})
- end,
- AppFile = file_name(?APPLICATION, ".app"),
- AppupFile = file_name(?APPLICATION, ".appup"),
- [{app_file, AppFile},
- {appup_file, AppupFile},
- {appup_topdir, TopDir} | Config].
+ Config.
-file_name(App, Ext) ->
- Env = init:get_arguments(),
- LibDir =
- case lists:keysearch(clearcase, 1, Env) of
- false ->
- code:lib_dir(App);
- _ ->
- ".."
- end,
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -108,467 +84,6 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup_file(suite) ->
- [];
-appup_file(doc) ->
- "Perform a simple check of the appup file";
+%% Perform a simple check of the appup file
appup_file(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,snmp,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error, File})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- check_module_subset(up, UpFrom),
- check_module_subset(down, DownTo),
- ok.
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up = UpDown, {add_application, ?APPLICATION} = Instr, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [UpDown, Instr, Modules]),
- ok;
-check_depend(down = UpDown, {remove_application, ?APPLICATION} = Instr,
- Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [UpDown, Instr, Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end;
-check_instructions(UpDown, Instructions, _, _, _, _) ->
- fail({bad_instructions, {UpDown, Instructions}}).
-
-check_instruction(_, {restart_application, ?APPLICATION}, _, _Modules) ->
- d("check_instruction -> entry when restart_application instruction"),
- ok;
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-check_instruction(up, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-delete_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({module_cannot_be_deleted, Module})
- end;
-
-%% An new module is deleted
-check_instruction(down, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-delete_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module) and is_atom(Pre) and is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module) and is_atom(Pre) and is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module) and
- is_atom(Pre) and
- is_atom(Post) and
- is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module) and
- is_atom(Pre) and
- is_atom(Post) and
- is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, supervisor}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when supervisor update instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-check_instruction(_, {apply, {Module, Function, Args}}, _, _Modules)
- when is_atom(Module) and is_atom(Function) and is_list(Args) ->
- d("check_instruction -> entry when apply instruction with"
- "~n Module: ~p"
- "~n Function: ~p"
- "~n Args: ~p", [Module, Function, Args]),
- check_apply(Module, Function, Args);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- error({error, {unknown_instruction, Instr}}).
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("updated_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr|Instrs], Modules) ->
- d("updated_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- case instruction_module(Instr) of
- {module, Module} ->
- d("updated_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]);
- no_module ->
- updated_modules(Instrs, Modules)
- end.
-
-instruction_module({add_module, Module}) ->
- {module, Module};
-instruction_module({delete_module, Module}) ->
- {module, Module};
-instruction_module({remove, {Module, _, _}}) ->
- {module, Module};
-instruction_module({load_module, Module, _, _, _}) ->
- {module, Module};
-instruction_module({update, Module, _, _, _, _}) ->
- {module, Module};
-instruction_module({update, Module, _}) ->
- {module, Module};
-instruction_module({apply, {_, _, _}}) ->
- no_module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-
-%% Check that the modules handled in an instruction set for version X
-%% is a subset of the instruction set for version X-1.
-check_module_subset(Direction, Instructions) ->
- d("check_module_subset(~w) -> entry when"
- "~n Instructions: ~p", [Direction,Instructions]),
- do_check_module_subset(modules_of(Instructions)).
-
-do_check_module_subset([]) ->
- ok;
-do_check_module_subset([_]) ->
- ok;
-do_check_module_subset([{_V1, Mods1}|T]) ->
- d("do_check_module_subset -> entry with"
- "~n V1: ~s"
- "~n Mods1: ~p", [_V1, Mods1]),
- {V2, Mods2} = hd(T),
- d("do_check_module_subset -> "
- "~n V2: ~s"
- "~n Mods2: ~p", [V2, Mods2]),
- %% Check that the modules in V1 is a subset of V2
- case do_check_module_subset2(Mods1, Mods2) of
- ok ->
- do_check_module_subset(T);
- {error, Modules} ->
- fail({subset_missing_instructions, V2, Modules})
- end.
-
-do_check_module_subset2(_Mods1, [{restart_application, ?APPLICATION}]) ->
- ok;
-do_check_module_subset2(Mods1, Mods2) ->
- do_check_module_subset2(Mods1, Mods2, []).
-
-do_check_module_subset2([], _, []) ->
- ok;
-do_check_module_subset2([], _, Acc) ->
- {error, lists:reverse(Acc)};
-do_check_module_subset2([Mod|Mods], Mods2, Acc) ->
- case lists:member(Mod, Mods2) of
- true ->
- do_check_module_subset2(Mods, Mods2, Acc);
- false ->
- do_check_module_subset2(Mods, Mods2, [Mod|Acc])
- end.
-
-
-modules_of(Instructions) ->
- modules_of(Instructions, []).
-
-modules_of([], Acc) ->
- lists:reverse(Acc);
-modules_of([{_V,[{restart_application, ?APPLICATION}]}|T], Acc) ->
- modules_of(T, Acc);
-modules_of([{V,Instructions}|T], Acc) ->
- Mods = modules_of2(Instructions, []),
- modules_of(T, [{V, Mods}|Acc]).
-
-modules_of2([], Acc) ->
- lists:reverse(Acc);
-modules_of2([Instr|Instructions], Acc) ->
- d("module_of -> entry with"
- "~n Instr: ~p", [Instr]),
- case module_of(Instr) of
- {value, Mod} ->
- d("module_of -> Mod: ~p", [Mod]),
- modules_of2(Instructions, [Mod|Acc]);
- false ->
- modules_of2(Instructions, Acc)
- end.
-
-module_of({add_module, Module}) ->
- {value, Module};
-module_of({delete_module, Module}) ->
- {value, Module};
-module_of({remove, {Module, _Pre, _Post}}) ->
- {value, Module};
-module_of({load_module, Module, _Pre, _Post, _Depend}) ->
- {value, Module};
-module_of({update, Module, _Change, _Pre, _Post, _Depend}) ->
- {value, Module};
-module_of({update, Module, supervisor}) ->
- {value, Module};
-module_of(_) ->
- false.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M, Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M) and is_list(Deps) ->
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-check_apply(Module, Function, Args) ->
- case (catch Module:module_info()) of
- Info when is_list(Info) ->
- check_exported(Function, Args, Info);
- {'EXIT', {undef, _}} ->
- error({not_existing_module, Module})
- end.
-
-check_exported(Function, Args, Info) ->
- case lists:keysearch(exports, 1, Info) of
- {value, {exports, FuncList}} ->
- Arity = length(Args),
- Arities = [A || {F, A} <- FuncList, F == Function],
- case lists:member(Arity, Arities) of
- true ->
- ok;
- false ->
- fail({not_exported_function, Function, Arity})
- end;
- _ ->
- error({bad_export, Info})
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-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.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F) ->
- d(F, []).
-
-d(F, A) ->
- d(true, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
+ ok = ?t:appup_test(snmp).
diff --git a/lib/snmp/test/snmp_conf_test.erl b/lib/snmp/test/snmp_conf_test.erl
index c4341d8d7e..7f5d11c0e7 100644
--- a/lib/snmp/test/snmp_conf_test.erl
+++ b/lib/snmp/test/snmp_conf_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -373,6 +373,8 @@ verify_ip(Val) ->
case (catch snmp_conf:check_ip(Val)) of
{error, Reason} ->
?FAIL({verify_ip, Val, Reason});
+ {ok, _} ->
+ ok;
ok ->
ok
end.
@@ -401,7 +403,7 @@ check_taddress(Config) when is_list(Config) ->
ok.
verify_taddress(Val) ->
- case (catch snmp_conf:check_taddress(Val)) of
+ case (catch snmp_conf:check_taddress(snmpUDPDomain, Val)) of
{error, Reason} ->
?FAIL({verify_taddress, Val, Reason});
ok ->
@@ -409,7 +411,7 @@ verify_taddress(Val) ->
end.
verify_not_taddress(Val) ->
- case (catch snmp_conf:check_taddress(Val)) of
+ case (catch snmp_conf:check_taddress(snmpUDPDomain, Val)) of
ok ->
?FAIL({verify_taddress, Val});
{error, _Reason} ->
diff --git a/lib/snmp/test/snmp_manager_config_test.erl b/lib/snmp/test/snmp_manager_config_test.erl
index 7b9924b83c..f37e957dae 100644
--- a/lib/snmp/test/snmp_manager_config_test.erl
+++ b/lib/snmp/test/snmp_manager_config_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -693,7 +693,7 @@ start_with_invalid_manager_conf_file1(Conf) when is_list(Conf) ->
"arne_anka", "4001", "500", "\"bmkEngine\""),
?line {error, Reason12} = config_start(Opts),
p("start failed (as expected): ~p", [Reason12]),
- ?line {failed_check, _, _, 2, {invalid_ip_address, _}} = Reason12,
+ ?line {failed_check, _, _, 2, {bad_address, _}} = Reason12,
await_config_not_running(),
%% --
@@ -702,7 +702,7 @@ start_with_invalid_manager_conf_file1(Conf) when is_list(Conf) ->
"9999", "4001", "500", "\"bmkEngine\""),
?line {error, Reason13} = config_start(Opts),
p("start failed (as expected): ~p", [Reason13]),
- ?line {failed_check, _, _, 2, {invalid_ip_address, _}} = Reason13,
+ ?line {failed_check, _, _, 2, {bad_address, _}} = Reason13,
await_config_not_running(),
%% --
@@ -720,7 +720,8 @@ start_with_invalid_manager_conf_file1(Conf) when is_list(Conf) ->
"[134,138,177,189]", "-1", "500", "\"bmkEngine\""),
?line {error, Reason22} = config_start(Opts),
p("start failed (as expected): ~p", [Reason22]),
- ?line {failed_check, _, _, 3, {invalid_integer, _}} = Reason22,
+ io:format("Reason22: ~p~n", [Reason22]),
+ ?line {failed_check, _, _, 3, {bad_port, _}} = Reason22,
await_config_not_running(),
%% --
@@ -729,7 +730,7 @@ start_with_invalid_manager_conf_file1(Conf) when is_list(Conf) ->
"[134,138,177,189]", "\"kalle-anka\"", "500", "\"bmkEngine\""),
?line {error, Reason23} = config_start(Opts),
p("start failed (as expected): ~p", [Reason23]),
- ?line {failed_check, _, _, 3, {invalid_integer, _}} = Reason23,
+ ?line {failed_check, _, _, 3, {bad_port, _}} = Reason23,
await_config_not_running(),
%% --
@@ -1047,7 +1048,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
case config_start(Opts) of
{error, Reason51} ->
p("start failed (as expected): ~p", [Reason51]),
- ?line {failed_check, _, _, _, {bad_address, _}} = Reason51,
+ ?line {failed_check, _, _, _, {bad_domain, _}} = Reason51,
await_config_not_running();
OK_51 ->
exit({error, {unexpected_success, "51", OK_51}})
@@ -1073,7 +1074,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
case config_start(Opts) of
{error, Reason53} ->
p("start failed (as expected): ~p", [Reason53]),
- ?line {failed_check, _, _, _, {invalid_ip_address, _}} = Reason53,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason53,
await_config_not_running();
OK_53 ->
exit({error, {unexpected_success, "53", OK_53}})
@@ -1086,7 +1087,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
case config_start(Opts) of
{error, Reason54} ->
p("start failed (as expected): ~p", [Reason54]),
- ?line {failed_check, _, _, _, {invalid_ip_address, _}} = Reason54,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason54,
await_config_not_running();
OK_54 ->
exit({error, {unexpected_success, "54", OK_54}})
@@ -1098,7 +1099,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
write_agents_conf(ConfDir, [Agent55]),
?line {error, Reason55} = config_start(Opts),
p("start failed (as expected): ~p", [Reason55]),
- ?line {failed_check, _, _, _, {invalid_ip_address, _}} = Reason55,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason55,
await_config_not_running(),
%% --
@@ -1107,7 +1108,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
write_agents_conf(ConfDir, [Agent61]),
?line {error, Reason61} = config_start(Opts),
p("start failed (as expected): ~p", [Reason61]),
- ?line {failed_check, _, _, _, {invalid_integer, _}} = Reason61,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason61,
await_config_not_running(),
%% --
@@ -1116,7 +1117,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
write_agents_conf(ConfDir, [Agent62]),
?line {error, Reason62} = config_start(Opts),
p("start failed (as expected): ~p", [Reason62]),
- ?line {failed_check, _, _, _, {invalid_integer, _}} = Reason62,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason62,
await_config_not_running(),
%% --
@@ -1125,7 +1126,7 @@ start_with_invalid_agents_conf_file1(Conf) when is_list(Conf) ->
write_agents_conf(ConfDir, [Agent63]),
?line {error, Reason63} = config_start(Opts),
p("start failed (as expected): ~p", [Reason63]),
- ?line {failed_check, _, _, _, {invalid_integer, _}} = Reason63,
+ ?line {failed_check, _, _, _, {bad_address, _}} = Reason63,
await_config_not_running(),
%% --
diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl
index 5fe18980bc..fa90872172 100644
--- a/lib/snmp/test/snmp_manager_test.erl
+++ b/lib/snmp/test/snmp_manager_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -139,6 +139,8 @@
-define(NS_TIMEOUT, 10000).
+-define(DEFAULT_MNESIA_DEBUG, none).
+
%%----------------------------------------------------------------------
%% Records
@@ -173,7 +175,9 @@ end_per_suite(Config) when is_list(Config) ->
init_per_testcase(Case, Config) when is_list(Config) ->
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE,Case]),
+ io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
+ p(Case, "init_per_testcase begin when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
%% This version of the API, based on Addr and Port, has been deprecated
DeprecatedApiCases =
[
@@ -187,16 +191,25 @@ init_per_testcase(Case, Config) when is_list(Config) ->
simple_async_get_bulk1,
misc_async1
],
- case lists:member(Case, DeprecatedApiCases) of
- true ->
- %% ?SKIP(api_no_longer_supported);
- {skip, api_no_longer_supported};
- false ->
- init_per_testcase2(Case, Config)
- end.
+ Result =
+ case lists:member(Case, DeprecatedApiCases) of
+ true ->
+ %% ?SKIP(api_no_longer_supported);
+ {skip, api_no_longer_supported};
+ false ->
+ init_per_testcase2(Case, Config)
+ end,
+ p(Case, "init_per_testcase end when"
+ "~n Nodes: ~p"
+ "~n Result: ~p"
+ "~n~n", [Result, erlang:nodes()]),
+ Result.
init_per_testcase2(Case, Config) ->
- ?DBG("init_per_testcase2 -> ~p", [erlang:nodes()]),
+ ?DBG("init_per_testcase2 -> "
+ "~n Case: ~p"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Case, Config, erlang:nodes()]),
CaseTopDir = snmp_test_lib:init_testcase_top_dir(Case, Config),
@@ -228,8 +241,11 @@ init_per_testcase2(Case, Config) ->
AgLogDir = filename:join(AgTopDir, "log/"),
?line ok = file:make_dir(AgLogDir),
+ Family = proplists:get_value(ipfamily, Config, inet),
+
Conf = [{watchdog, ?WD_START(?MINS(5))},
- {ip, ?LOCALHOST()},
+ {ipfamily, Family},
+ {ip, ?LOCALHOST(Family)},
{case_top_dir, CaseTopDir},
{agent_dir, AgTopDir},
{agent_conf_dir, AgConfDir},
@@ -314,6 +330,8 @@ init_per_testcase3(Case, Config) ->
end.
end_per_testcase(Case, Config) when is_list(Config) ->
+ p(Case, "end_per_testcase begin when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
?DBG("fin [~w] Nodes [1]: ~p", [Case, erlang:nodes()]),
Dog = ?config(watchdog, Config),
?WD_STOP(Dog),
@@ -322,6 +340,8 @@ end_per_testcase(Case, Config) when is_list(Config) ->
?DBG("fin [~w] Nodes [2]: ~p", [Case, erlang:nodes()]),
%% TopDir = ?config(top_dir, Conf2),
%% ?DEL_DIR(TopDir),
+ p(Case, "end_per_testcase end when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
Conf2.
end_per_testcase2(Case, Config) ->
@@ -393,7 +413,9 @@ all() ->
{group, event_tests},
{group, event_tests_mt},
discovery,
- {group, tickets}
+ {group, tickets},
+ {group, ipv6},
+ {group, ipv6_mt}
].
groups() ->
@@ -428,10 +450,10 @@ groups() ->
{request_tests, [],
[
{group, get_tests},
- {group, get_next_tests},
+ {group, get_next_tests},
{group, set_tests},
- {group, bulk_tests},
- {group, misc_request_tests}
+ {group, bulk_tests},
+ {group, misc_request_tests}
]
},
{request_tests_mt, [],
@@ -528,9 +550,29 @@ groups() ->
[
otp8395_1
]
- }
+ },
+ {ipv6, [], ipv6_tests()},
+ {ipv6_mt, [], ipv6_tests()}
+
].
+ipv6_tests() ->
+ [
+ register_agent1,
+ simple_sync_get_next3,
+ simple_async_get2,
+ simple_sync_get3,
+ simple_async_get_next2,
+ simple_sync_set3,
+ simple_async_set2,
+ simple_sync_get_bulk2,
+ simple_async_get_bulk3,
+ misc_async2,
+ inform1,
+ inform_swarm
+ ].
+
+
init_per_group(request_tests_mt = GroupName, Config) ->
snmp_test_lib:init_group_top_dir(
GroupName,
@@ -539,10 +581,39 @@ init_per_group(event_tests_mt = GroupName, Config) ->
snmp_test_lib:init_group_top_dir(
GroupName,
[{manager_net_if_module, snmpm_net_if_mt} | Config]);
+init_per_group(ipv6_mt = GroupName, Config) ->
+ case ct:require(ipv6_hosts) of
+ ok ->
+ case gen_udp:open(0, [inet6]) of
+ {ok, S} ->
+ ok = gen_udp:close(S),
+ ipv6_init(
+ snmp_test_lib:init_group_top_dir(
+ GroupName,
+ [{manager_net_if_module, snmpm_net_if_mt}
+ | Config]));
+ {error, _} ->
+ {skip, "Host seems to not support IPv6"}
+ end;
+ _ ->
+ {skip, "Host does not support IPV6"}
+ end;
+init_per_group(ipv6 = GroupName, Config) ->
+ case ct:require(ipv6_hosts) of
+ ok ->
+ case gen_udp:open(0, [inet6]) of
+ {ok, S} ->
+ ok = gen_udp:close(S),
+ ipv6_init(snmp_test_lib:init_group_top_dir(GroupName, Config));
+ {error, _} ->
+ {skip, "Host seems to not support IPv6"}
+ end;
+ _ ->
+ {skip, "Host does not support IPV6"}
+ end;
init_per_group(GroupName, Config) ->
snmp_test_lib:init_group_top_dir(GroupName, Config).
-
-
+
end_per_group(_GroupName, Config) ->
%% Do we really need to do this?
lists:keydelete(snmp_group_top_dir, 1, Config).
@@ -1491,7 +1562,7 @@ register_agent3(Config) when is_list(Config) ->
TargetName2 = "agent3",
?line ok = mgr_register_agent(ManagerNode, user_alfa, TargetName2,
[{tdomain, transportDomainUdpIpv6},
- {address, LocalHost},
+ {address, {0,0,0,0,0,0,0,1}},
{port, 5002},
{engine_id, "agentEngineId-2"}]),
TargetName3 = "agent4",
@@ -5057,7 +5128,7 @@ inform_swarm_collector(N) ->
inform_swarm_collector(N, SentAckCnt, RecvCnt, RespCnt, _)
when ((N == SentAckCnt) and
(N == RespCnt) and
- (N >= RecvCnt)) ->
+ (N =< RecvCnt)) ->
p("inform_swarm_collector -> done when"
"~n N: ~w"
"~n SentAckCnt: ~w"
@@ -5303,34 +5374,59 @@ init_manager(AutoInform, Config) ->
?line Node = start_manager_node(),
+ %% The point with this (try catch block) is to be
+ %% able to do some cleanup in case we fail to
+ %% start some of the apps. That is, if we fail to
+ %% start the apps (mnesia, crypto and snmp agent)
+ %% we stop the (agent) node!
- %% --
- %% Start and initiate crypto on manager node
- %%
+ try
+ begin
- ?line ok = init_crypto(Node),
-
- %%
- %% Write manager config
- %%
+ %% --
+ %% Start and initiate crypto on manager node
+ %%
+
+ ?line ok = init_crypto(Node),
+
+ %%
+ %% Write manager config
+ %%
+
+ ?line ok = write_manager_config(Config),
+
+ IRB = case AutoInform of
+ true ->
+ auto;
+ _ ->
+ user
+ end,
+ Conf = [{manager_node, Node}, {irb, IRB} | Config],
+ Vsns = [v1,v2,v3],
+ start_manager(Node, Vsns, Conf)
+ end
+ catch
+ T:E ->
+ StackTrace = ?STACK(),
+ p("Failure during manager start: "
+ "~n Error Type: ~p"
+ "~n Error: ~p"
+ "~n StackTrace: ~p", [T, E, StackTrace]),
+ %% And now, *try* to cleanup
+ (catch stop_node(Node)),
+ ?FAIL({failed_starting_manager, T, E, StackTrace})
+ end.
- ?line ok = write_manager_config(Config),
-
- IRB = case AutoInform of
- true ->
- auto;
- _ ->
- user
- end,
- Conf = [{manager_node, Node}, {irb, IRB} | Config],
- Vsns = [v1,v2,v3],
- start_manager(Node, Vsns, Conf).
-
fin_manager(Config) ->
Node = ?config(manager_node, Config),
- stop_manager(Node, Config),
- fin_crypto(Node),
- stop_node(Node),
+ StopMgrRes = stop_manager(Node),
+ StopCryptoRes = fin_crypto(Node),
+ StopNode = stop_node(Node),
+ p("fin_agent -> stop apps and (mgr node ~p) node results: "
+ "~n SNMP Mgr: ~p"
+ "~n Crypto: ~p"
+ "~n Node: ~p",
+ [Node, StopMgrRes, StopCryptoRes, StopNode]),
Config.
@@ -5352,52 +5448,93 @@ init_agent(Config) ->
?line Node = start_agent_node(),
+ %% The point with this (try catch block) is to be
+ %% able to do some cleanup in case we fail to
+ %% start some of the apps. That is, if we fail to
+ %% start the apps (mnesia, crypto and snmp agent)
+ %% we stop the (agent) node!
- %% --
- %% Start and initiate mnesia on agent node
- %%
-
- ?line ok = init_mnesia(Node, Dir),
-
-
- %% --
- %% Start and initiate crypto on agent node
- %%
-
- ?line ok = init_crypto(Node),
-
-
- %%
- %% Write agent config
- %%
-
- Vsns = [v1,v2],
- ?line ok = write_agent_config(Vsns, Config),
-
- Conf = [{agent_node, Node},
- {mib_dir, MibDir} | Config],
+ try
+ begin
+
+ %% --
+ %% Start and initiate mnesia on agent node
+ %%
+
+ ?line ok = init_mnesia(Node, Dir, ?config(mnesia_debug, Config)),
+
+
+ %% --
+ %% Start and initiate crypto on agent node
+ %%
+
+ ?line ok = init_crypto(Node),
+
+
+ %%
+ %% Write agent config
+ %%
+
+ Vsns = [v1,v2],
+ ?line ok = write_agent_config(Vsns, Config),
+
+ Conf = [{agent_node, Node},
+ {mib_dir, MibDir} | Config],
- %%
- %% Start the agent
- %%
-
- start_agent(Node, Vsns, Conf).
+ %%
+ %% Start the agent
+ %%
+
+ start_agent(Node, Vsns, Conf)
+ end
+ catch
+ T:E ->
+ StackTrace = ?STACK(),
+ p("Failure during agent start: "
+ "~n Error Type: ~p"
+ "~n Error: ~p"
+ "~n StackTrace: ~p", [T, E, StackTrace]),
+ %% And now, *try* to cleanup
+ (catch stop_node(Node)),
+ ?FAIL({failed_starting_agent, T, E, StackTrace})
+ end.
+
fin_agent(Config) ->
Node = ?config(agent_node, Config),
- stop_agent(Node, Config),
- fin_crypto(Node),
- fin_mnesia(Node),
- stop_node(Node),
+ StopAgentRes = stop_agent(Node),
+ StopCryptoRes = fin_crypto(Node),
+ StopMnesiaRes = fin_mnesia(Node),
+ StopNode = stop_node(Node),
+ p("fin_agent -> stop apps and (agent node ~p) node results: "
+ "~n SNMP Agent: ~p"
+ "~n Crypto: ~p"
+ "~n Mnesia: ~p"
+ "~n Node: ~p",
+ [Node, StopAgentRes, StopCryptoRes, StopMnesiaRes, StopNode]),
Config.
-init_mnesia(Node, Dir) ->
+init_mnesia(Node, Dir, MnesiaDebug)
+ when ((MnesiaDebug =/= none) andalso
+ (MnesiaDebug =/= debug) andalso (MnesiaDebug =/= trace)) ->
+ init_mnesia(Node, Dir, ?DEFAULT_MNESIA_DEBUG);
+init_mnesia(Node, Dir, MnesiaDebug) ->
?DBG("init_mnesia -> load application mnesia", []),
?line ok = load_mnesia(Node),
?DBG("init_mnesia -> application mnesia: set_env dir: ~n~p",[Dir]),
?line ok = set_mnesia_env(Node, dir, filename:join(Dir, "mnesia")),
+ %% Just in case, only set (known to be) valid values for debug
+ if
+ ((MnesiaDebug =:= debug) orelse (MnesiaDebug =:= trace)) ->
+ ?DBG("init_mnesia -> application mnesia: set_env debug: ~w",
+ [MnesiaDebug]),
+ ?line ok = set_mnesia_env(Node, debug, MnesiaDebug);
+ true ->
+ ok
+ end,
+
?DBG("init_mnesia -> create mnesia schema",[]),
?line case create_schema(Node) of
ok ->
@@ -5434,25 +5571,89 @@ fin_crypto(Node) ->
%% -- Misc application wrapper functions --
-load_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:load(App);
-load_app(Node, App) when is_atom(App) ->
- rcall(Node, application, load, [App]).
-
-start_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:start(App);
+load_app(Node, App) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {already_loaded, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed loading app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_load, Node, App, Reason})
+ end,
+ do_load_app(Node, App, VerifySuccess).
+
+do_load_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ %% Local app
+ exec(fun() -> application:load(App) end, VerifySuccess);
+do_load_app(Node, App, VerifySuccess) ->
+ %% Remote app
+ exec(fun() -> rcall(Node, application, load, [App]) end, VerifySuccess).
+
+
start_app(Node, App) ->
- rcall(Node, application, start, [App]).
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {already_started, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed starting app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_start, Node, App, Reason})
+ end,
+ start_app(Node, App, VerifySuccess).
+
+start_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:start(App) end, VerifySuccess);
+start_app(Node, App, VerifySuccess) ->
+ exec(fun() -> rcall(Node, application, start, [App]) end, VerifySuccess).
+
+
+stop_app(Node, App) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {not_started, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed stopping app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_stop, Node, App, Reason})
+ end,
+ stop_app(Node, App, VerifySuccess).
+
+stop_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:stop(App) end, VerifySuccess);
+stop_app(Node, App, VerifySuccess) when is_atom(App) ->
+ exec(fun() -> rcall(Node, application, stop, [App]) end, VerifySuccess).
+
+
+set_app_env(Node, App, Key, Val) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed setting app ~w env on ~p"
+ "~n Key: ~p"
+ "~n Val: ~p"
+ "~n Reason: ~p"
+ "~n ~p", [App, Node, Key, Val, Reason]),
+ ?FAIL({failed_set_app_env,
+ Node, App, Key, Val, Reason})
+ end,
+ set_app_env(Node, App, Key, Val, VerifySuccess).
-stop_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:stop(App);
-stop_app(Node, App) when is_atom(App) ->
- rcall(Node, application, stop, [App]).
+set_app_env(Node, App, Key, Val, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:set_env(App, Key, Val) end, VerifySuccess);
+set_app_env(Node, App, Key, Val, VerifySuccess) when is_atom(App) ->
+ exec(fun() -> rcall(Node, application, set_env, [App, Key, Val]) end,
+ VerifySuccess).
-set_app_env(Node, App, Key, Val) when (Node =:= node()) andalso is_atom(App) ->
- application:set_env(App, Key, Val);
-set_app_env(Node, App, Key, Val) when is_atom(App) ->
- rcall(Node, application, set_env, [App, Key, Val]).
+
+exec(Cmd, VerifySuccess) ->
+ VerifySuccess(Cmd()).
%% -- Misc snmp wrapper functions --
@@ -5603,12 +5804,24 @@ fin_mgr_user(Conf) ->
init_mgr_user_data1(Conf) ->
Node = ?config(manager_node, Conf),
TargetName = ?config(manager_agent_target_name, Conf),
- Addr = ?config(ip, Conf),
+ IpFamily = ?config(ipfamily, Conf),
+ Ip = ?config(ip, Conf),
Port = ?AGENT_PORT,
- ?line ok = mgr_user_register_agent(Node, TargetName,
- [{address, Addr},
- {port, Port},
- {engine_id, "agentEngine"}]),
+ ?line ok =
+ case IpFamily of
+ inet ->
+ mgr_user_register_agent(
+ Node, TargetName,
+ [{address, Ip},
+ {port, Port},
+ {engine_id, "agentEngine"}]);
+ inet6 ->
+ mgr_user_register_agent(
+ Node, TargetName,
+ [{tdomain, transportDomainUdpIpv6},
+ {taddress, {Ip, Port}},
+ {engine_id, "agentEngine"}])
+ end,
_Agents = mgr_user_which_own_agents(Node),
?DBG("Own agents: ~p", [_Agents]),
@@ -5633,12 +5846,24 @@ init_mgr_user_data2(Conf) ->
"~n Conf: ~p", [Conf]),
Node = ?config(manager_node, Conf),
TargetName = ?config(manager_agent_target_name, Conf),
- Addr = ?config(ip, Conf),
+ IpFamily = ?config(ipfamily, Conf),
+ Ip = ?config(ip, Conf),
Port = ?AGENT_PORT,
- ?line ok = mgr_user_register_agent(Node, TargetName,
- [{address, Addr},
- {port, Port},
- {engine_id, "agentEngine"}]),
+ ?line ok =
+ case IpFamily of
+ inet ->
+ mgr_user_register_agent(
+ Node, TargetName,
+ [{address, Ip},
+ {port, Port},
+ {engine_id, "agentEngine"}]);
+ inet6 ->
+ mgr_user_register_agent(
+ Node, TargetName,
+ [{tdomain, transportDomainUdpIpv6},
+ {taddress, {Ip, Port}},
+ {engine_id, "agentEngine"}])
+ end,
_Agents = mgr_user_which_own_agents(Node),
?DBG("Own agents: ~p", [_Agents]),
@@ -5900,9 +6125,9 @@ start_manager(Node, Vsns, Conf0, _Opts) ->
Conf0.
-stop_manager(Node, Conf) ->
- stop_snmp(Node),
- Conf.
+stop_manager(Node) ->
+ stop_snmp(Node).
+
%% -- Misc agent wrapper functions --
@@ -5951,9 +6176,8 @@ start_agent(Node, Vsns, Conf0, _Opts) ->
?line ok = start_snmp(Node),
Conf0.
-stop_agent(Node, Conf) ->
- stop_snmp(Node),
- Conf.
+stop_agent(Node) ->
+ stop_snmp(Node).
agent_load_mib(Node, Mib) ->
rcall(Node, snmpa, load_mibs, [[Mib]]).
@@ -6015,17 +6239,18 @@ stop_node(Node) ->
rpc:cast(Node, erlang, halt, []),
await_stopped(Node, 5).
-await_stopped(_, 0) ->
+await_stopped(Node, 0) ->
+ p("await_stopped -> ~p still exist: giving up", [Node]),
ok;
await_stopped(Node, N) ->
Nodes = erlang:nodes(),
case lists:member(Node, Nodes) of
true ->
- ?DBG("[~w] ~p still exist", [N, Node]),
+ p("await_stopped -> ~p still exist: ~w", [Node, N]),
?SLEEP(1000),
await_stopped(Node, N-1);
false ->
- ?DBG("[~w] ~p gone", [N, Node]),
+ p("await_stopped -> ~p gone: ~w", [Node, N]),
ok
end.
@@ -6035,10 +6260,16 @@ await_stopped(Node, N) ->
write_manager_config(Config) ->
Dir = ?config(manager_conf_dir, Config),
- Ip = ?config(ip, Config),
- Addr = tuple_to_list(Ip),
- snmp_config:write_manager_snmp_files(Dir, Addr, ?MGR_PORT,
- ?MGR_MMS, ?MGR_ENGINE_ID, [], [], []).
+ Ip = tuple_to_list(?config(ip, Config)),
+ {Addr, Port} =
+ case ?config(ipfamily, Config) of
+ inet ->
+ {Ip, ?MGR_PORT};
+ inet6 ->
+ {transportDomainUdpIpv6, {Ip, ?MGR_PORT}}
+ end,
+ snmp_config:write_manager_snmp_files(
+ Dir, Addr, Port, ?MGR_MMS, ?MGR_ENGINE_ID, [], [], []).
write_manager_conf(Dir) ->
Port = "5000",
@@ -6067,25 +6298,27 @@ write_manager_conf(Dir, Str) ->
write_agent_config(Vsns, Conf) ->
Dir = ?config(agent_conf_dir, Conf),
- Ip = ?config(ip, Conf),
- ?line Addr = tuple_to_list(Ip),
- ?line ok = write_agent_config_files(Dir, Vsns, Addr),
+ ?line Ip = tuple_to_list(?config(ip, Conf)),
+ ?line Domain =
+ case ?config(ipfamily, Conf) of
+ inet ->
+ snmpUDPDomain;
+ inet6 ->
+ transportDomainUdpIpv6
+ end,
+ ?line ok = write_agent_config_files(Dir, Vsns, Domain, Ip),
?line ok = update_agent_usm(Vsns, Dir),
?line ok = update_agent_community(Vsns, Dir),
?line ok = update_agent_vacm(Vsns, Dir),
- ?line ok = write_agent_target_addr_conf(Dir, Addr, Vsns),
+ ?line ok = write_agent_target_addr_conf(Dir, Domain, Ip, Vsns),
?line ok = write_agent_target_params_conf(Dir, Vsns),
?line ok = write_agent_notify_conf(Dir),
ok.
-write_agent_config_files(Dir, Vsns, Addr) ->
- snmp_config:write_agent_snmp_files(Dir, Vsns,
- Addr, ?MGR_PORT,
- Addr, ?AGENT_PORT,
- "mgr-test", "trap",
- none, "",
- ?AGENT_ENGINE_ID,
- ?AGENT_MMS).
+write_agent_config_files(Dir, Vsns, Domain, Ip) ->
+ snmp_config:write_agent_snmp_files(
+ Dir, Vsns, Domain, {Ip, ?MGR_PORT}, {Ip, ?AGENT_PORT}, "mgr-test",
+ trap, none, "", ?AGENT_ENGINE_ID, ?AGENT_MMS).
update_agent_usm(Vsns, Dir) ->
case lists:member(v3, Vsns) of
@@ -6153,9 +6386,9 @@ update_agent_vacm(_Vsns, Dir) ->
excluded, null}],
snmp_config:update_agent_vacm_config(Dir, Conf).
-write_agent_target_addr_conf(Dir, Addr, Vsns) ->
- snmp_config:write_agent_snmp_target_addr_conf(Dir, Addr, ?MGR_PORT,
- 300, 3, Vsns).
+write_agent_target_addr_conf(Dir, Domain, Ip, Vsns) ->
+ snmp_config:write_agent_snmp_target_addr_conf(
+ Dir, Domain, {Ip, ?MGR_PORT}, 300, 3, Vsns).
write_agent_target_params_conf(Dir, Vsns) ->
F = fun(v1) -> {"target_v1", v1, v1, "all-rights", noAuthNoPriv};
@@ -6271,7 +6504,7 @@ p(F, A) ->
p(TName, F, A) ->
io:format("*** [~w][~s] ***"
- "~n" ++ F ++ "~n", [TName, formated_timestamp()|A]).
+ "~n " ++ F ++ "~n", [TName, formated_timestamp()|A]).
formated_timestamp() ->
snmp_test_lib:formated_timestamp().
@@ -6279,3 +6512,5 @@ formated_timestamp() ->
%% p(TName, F, A) ->
%% io:format("~w -> " ++ F ++ "~n", [TName|A]).
+ipv6_init(Config) when is_list(Config) ->
+ [{ipfamily, inet6} | Config].
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl
index ddbe156130..46c2b316be 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -109,7 +109,18 @@ start_link(Parent, Id) ->
proc_lib:start_link(?MODULE, main, [true, Parent, self(), Id]).
stop() ->
- cast(stop).
+ MRef = erlang:monitor(process, ?SERVER),
+ cast(stop),
+ receive {'DOWN', MRef, _, _, Info} ->
+ case Info of
+ noproc ->
+ ok;
+ noconnection ->
+ ok;
+ normal ->
+ ok
+ end
+ end.
info() ->
call(info).
diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index fbb891e40d..5e611340a3 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-include_lib("kernel/include/file.hrl").
--export([hostname/0, hostname/1, localhost/0, os_type/0, sz/1,
+-export([hostname/0, hostname/1, localhost/0, localhost/1, os_type/0, sz/1,
display_suite_info/1]).
-export([non_pc_tc_maybe_skip/4, os_based_skip/1]).
-export([fix_data_dir/1,
@@ -60,6 +60,9 @@ from(_H, []) -> [].
localhost() ->
{ok, Ip} = snmp_misc:ip(net_adm:localhost()),
Ip.
+localhost(Family) ->
+ {ok, Ip} = snmp_misc:ip(net_adm:localhost(), Family),
+ Ip.
sz(L) when is_list(L) ->
length(L);
diff --git a/lib/snmp/test/snmp_test_lib.hrl b/lib/snmp/test/snmp_test_lib.hrl
index 8cc3f75dc5..9b7609b831 100644
--- a/lib/snmp/test/snmp_test_lib.hrl
+++ b/lib/snmp/test/snmp_test_lib.hrl
@@ -1,5 +1,5 @@
%%<copyright>
-%% <year>2002-2008</year>
+%% <year>2002-2014</year>
%% <holder>Ericsson AB, All Rights Reserved</holder>
%%</copyright>
%%<legalnotice>
@@ -32,14 +32,15 @@
-define(APPLICATION, snmp).
-endif.
--define(SCONF(K,D,C), snmp_test_lib:set_config(K,D,C)).
--define(GCONF(K,C), snmp_test_lib:get_config(K,C)).
--define(RCONF(K,C,V), snmp_test_lib:replace_config(K,C,V)).
--define(HOSTNAME(N), snmp_test_lib:hostname(N)).
--define(LOCALHOST(), snmp_test_lib:localhost()).
--define(SZ(X), snmp_test_lib:sz(X)).
--define(OSTYPE(), snmp_test_lib:os_type()).
--define(DISPLAY_SUITE_INFO(), snmp_test_lib:display_suite_info(?MODULE)).
+-define(SCONF(K,D,C), snmp_test_lib:set_config(K,D,C)).
+-define(GCONF(K,C), snmp_test_lib:get_config(K,C)).
+-define(RCONF(K,C,V), snmp_test_lib:replace_config(K,C,V)).
+-define(HOSTNAME(N), snmp_test_lib:hostname(N)).
+-define(LOCALHOST(), snmp_test_lib:localhost()).
+-define(LOCALHOST(Family), snmp_test_lib:localhost(Family)).
+-define(SZ(X), snmp_test_lib:sz(X)).
+-define(OSTYPE(), snmp_test_lib:os_type()).
+-define(DISPLAY_SUITE_INFO(), snmp_test_lib:display_suite_info(?MODULE)).
%% - Test case macros -
diff --git a/lib/snmp/test/snmp_test_manager.erl b/lib/snmp/test/snmp_test_manager.erl
index 925ae77ab5..6d8673eecd 100644
--- a/lib/snmp/test/snmp_test_manager.erl
+++ b/lib/snmp/test/snmp_test_manager.erl
@@ -56,7 +56,7 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
code_change/3, terminate/2]).
--record(state, {mgr, parent, req, agent_target_name}).
+-record(state, {parent, req, agent_target_name}).
-define(SERVER, ?MODULE).
-define(USER, ?MODULE).
@@ -130,10 +130,10 @@ init([Parent, Opts]) ->
do_init(Opts) ->
{MgrDir, MgrConf, MgrOpts, AgentTargetName, AgentConf} = parse_opts(Opts),
ok = snmp_config:write_manager_config(MgrDir, "", MgrConf),
- {ok, Pid} = snmpm:start_link(MgrOpts),
+ ok = snmpm:start_link(MgrOpts),
ok = snmpm:register_user(?USER, ?MODULE, self()),
ok = snmpm:register_agent(?USER, AgentTargetName, AgentConf),
- {ok, #state{mgr = Pid, agent_target_name = AgentTargetName}}.
+ {ok, #state{agent_target_name = AgentTargetName}}.
parse_opts(Opts) ->
diff --git a/lib/snmp/test/snmp_test_mgr.erl b/lib/snmp/test/snmp_test_mgr.erl
index 40fcbce8f1..8cb6ec588e 100644
--- a/lib/snmp/test/snmp_test_mgr.erl
+++ b/lib/snmp/test/snmp_test_mgr.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -161,7 +161,7 @@ get_timeout() ->
get_timeout(os:type())
end.
-get_timeout(_) -> 3500.
+get_timeout(_) -> 10000. % Trying to improve test results % 3500.
%%----------------------------------------------------------------------
%% Receives a trap from the agent.
@@ -235,21 +235,23 @@ init({Options, CallerPid}) ->
VsnHdrD =
{Com, User, EngineId, CtxEngineId, mk_seclevel(SecLevel)},
io:format("[~w] ~p -> VsnHdrD: ~p~n", [?MODULE, self(), VsnHdrD]),
+ IpFamily = get_value(ipfamily, Options, inet),
+ io:format("[~w] ~p -> IpFamily: ~p~n", [?MODULE, self(), IpFamily]),
AgIp = case snmp_misc:assq(agent, Options) of
{value, Tuple4} when is_tuple(Tuple4) andalso
(size(Tuple4) =:= 4) ->
Tuple4;
{value, Host} when is_list(Host) ->
- {ok, Ip} = snmp_misc:ip(Host),
+ {ok, Ip} = snmp_misc:ip(Host, IpFamily),
Ip
end,
io:format("[~w] ~p -> AgIp: ~p~n", [?MODULE, self(), AgIp]),
Quiet = lists:member(quiet, Options),
io:format("[~w] ~p -> Quiet: ~p~n", [?MODULE, self(), Quiet]),
- PackServ = start_packet_server(Quiet, Options, CallerPid,
- AgIp, Udp, TrapUdp,
- VsnHdrD, Version, Dir, RecBufSz,
- PacksDbg),
+ PackServ =
+ start_packet_server(
+ Quiet, Options, CallerPid, AgIp, Udp, TrapUdp,
+ VsnHdrD, Version, Dir, RecBufSz, PacksDbg, IpFamily),
d("init -> packet server: ~p",[PackServ]),
State = #state{parent = CallerPid,
quiet = Quiet,
@@ -263,23 +265,21 @@ init({Options, CallerPid}) ->
end.
start_packet_server(false, _Options, _CallerPid, AgIp, Udp, TrapUdp,
- VsnHdrD, Version, Dir, RecBufSz, PacksDbg) ->
+ VsnHdrD, Version, Dir, RecBufSz, PacksDbg, IpFamily) ->
d("start_packet_server -> entry", []),
- ?PACK_SERV:start_link_packet({msg, self()},
- AgIp, Udp, TrapUdp,
- VsnHdrD, Version, Dir, RecBufSz,
- PacksDbg);
+ ?PACK_SERV:start_link_packet(
+ {msg, self()}, AgIp, Udp, TrapUdp,
+ VsnHdrD, Version, Dir, RecBufSz, PacksDbg, IpFamily);
start_packet_server(true, Options, CallerPid, AgIp, Udp, TrapUdp,
- VsnHdrD, Version, Dir, RecBufSz, PacksDbg) ->
+ VsnHdrD, Version, Dir, RecBufSz, PacksDbg, IpFamily) ->
Type = get_value(receive_type, Options, pdu),
d("start_packet_server -> entry with"
"~n CallerPid: ~p"
"~n when"
"~n Type: ~p",[CallerPid, Type]),
- ?PACK_SERV:start_link_packet({Type, CallerPid},
- AgIp, Udp, TrapUdp,
- VsnHdrD, Version, Dir, RecBufSz,
- PacksDbg).
+ ?PACK_SERV:start_link_packet(
+ {Type, CallerPid}, AgIp, Udp, TrapUdp,
+ VsnHdrD, Version, Dir, RecBufSz, PacksDbg, IpFamily).
is_options_ok([{mibs,List}|Opts]) when is_list(List) ->
is_options_ok(Opts);
@@ -287,6 +287,10 @@ is_options_ok([quiet|Opts]) ->
is_options_ok(Opts);
is_options_ok([{agent,_}|Opts]) ->
is_options_ok(Opts);
+is_options_ok([{ipfamily,IpFamily}|Opts])
+ when IpFamily =:= inet;
+ IpFamily =:= inet6 ->
+ is_options_ok(Opts);
is_options_ok([{agent_udp,Int}|Opts]) when is_integer(Int) ->
is_options_ok(Opts);
is_options_ok([{trap_udp,Int}|Opts]) when is_integer(Int) ->
@@ -657,7 +661,8 @@ make_vb(Oid) ->
#varbind{oid = Oid, variabletype = 'NULL', value = 'NULL'}.
make_request_id() ->
- random:uniform(16#FFFFFFF-1).
+ %% random:uniform(16#FFFFFFF-1).
+ snmp_test_mgr_counter_server:increment(mgr_request_id, 1, 1, 2147483647).
echo_pdu(PDU, MiniMIB) ->
io:format("~s", [snmp_misc:format_pdu(PDU, MiniMIB)]).
diff --git a/lib/snmp/test/snmp_test_mgr_counter_server.erl b/lib/snmp/test/snmp_test_mgr_counter_server.erl
new file mode 100644
index 0000000000..db31e0380b
--- /dev/null
+++ b/lib/snmp/test/snmp_test_mgr_counter_server.erl
@@ -0,0 +1,152 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%% The reason for this (test) counter server is that the
+%% agent test suite is implemented in such a way that the
+%% agent is started once and then used for several test cases.
+%% Each request is given a request id which *was* generated using
+%% random! It is therefor possible, although unlikely, that a
+%% request may get a request id that has recently been used,
+%% which will cause the agent to silently reject the request.
+%% For this reason, we start this server at the start of the
+%% agent suite and stop it at the end and all request ids are
+%% generated by this server.
+%%
+
+-module(snmp_test_mgr_counter_server).
+
+-export([start/0, stop/0, increment/4]).
+
+-define(SERVER, ?MODULE).
+-define(TAB, snmp_test_mgr_counter_tab).
+
+
+%%%-------------------------------------------------------------------
+%%% API
+%%%-------------------------------------------------------------------
+
+-spec start() -> ok.
+
+start() ->
+ Parent = self(),
+ ReqIdServer = spawn(fun() -> init(Parent) end),
+ receive
+ {ReqIdServer, ok} ->
+ ok;
+ {ReqIdServer, {error, Reason}} ->
+ exit({failed_starting_counter_server, Reason})
+ after 5000 ->
+ exit(ReqIdServer, kill), % Cleanup, just in case
+ exit({failed_starting_counter_server, timeout})
+ end.
+
+-spec stop() -> {ok, Counters :: list()} | {error, Reason :: term()}.
+
+stop() ->
+ request(stop).
+
+
+-spec increment(Counter :: atom(),
+ Initial :: non_neg_integer(),
+ Increment :: pos_integer(),
+ Max :: pos_integer()) ->
+ Next :: pos_integer().
+
+increment(Counter, Initial, Increment, Max) ->
+ Request = {increment, Counter, Initial, Increment, Max},
+ case request(Request) of
+ {ok, ReqId} ->
+ ReqId;
+ {error, Reason} ->
+ exit(Reason)
+ end.
+
+
+request(Request) ->
+ Id = make_ref(),
+ Msg = {self(), Id, Request},
+ try
+ begin
+ global:send(?SERVER, Msg),
+ receive
+ {reply, Id, Reply} ->
+ {ok, Reply}
+ end
+ end
+ catch
+ T:E ->
+ {error, {T, E}}
+ end.
+
+
+%%%-------------------------------------------------------------------
+%%% Internal functions
+%%%-------------------------------------------------------------------
+
+init(Parent) ->
+ p("starting"),
+ case global:register_name(?SERVER, self()) of
+ yes ->
+ p("name registration ok"),
+ Parent ! {self(), ok};
+ no ->
+ p("name registration failed"),
+ Parent ! {self(), registration_failed},
+ exit(registration_failed)
+ end,
+ ets:new(?TAB, [set, named_table, {keypos, 1}]),
+ loop().
+
+loop() ->
+ receive
+ {From, Id, {increment, Counter, Initial, Increment, Max}} ->
+ Position = 2,
+ Threshold = Max,
+ SetValue = Initial,
+ UpdateOp = {Position, Increment, Threshold, SetValue},
+ NextVal =
+ try ets:update_counter(?TAB, Counter, UpdateOp) of
+ Next when is_integer(Next) ->
+ p("increment ~w: (next) ~w", [Counter, Next]),
+ Next
+ catch
+ error:badarg ->
+ %% Oups, first time
+ p("increment ~w: (initial) ~w", [Counter, Initial]),
+ ets:insert(?TAB, {Counter, Initial}),
+ Initial
+ end,
+ From ! {reply, Id, NextVal},
+ loop();
+
+ {From, Id, stop} ->
+ p("stop"),
+ Counters = ets:tab2list(?TAB),
+ From ! {reply, Id, Counters},
+ exit(normal)
+ end.
+
+
+p(F) ->
+ p(F, []).
+
+p(F, A) ->
+ io:format("*** [~s] COUNTER-SERVER [~w] " ++ F ++ "~n",
+ [snmp_test_lib:formated_timestamp(), self() | A]).
diff --git a/lib/snmp/test/snmp_test_mgr_misc.erl b/lib/snmp/test/snmp_test_mgr_misc.erl
index 5525c5c3ec..5274dcacd9 100644
--- a/lib/snmp/test/snmp_test_mgr_misc.erl
+++ b/lib/snmp/test/snmp_test_mgr_misc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
-module(snmp_test_mgr_misc).
%% API
--export([start_link_packet/8, start_link_packet/9,
+-export([start_link_packet/8, start_link_packet/9, start_link_packet/10,
stop/1,
send_discovery_pdu/2,
send_pdu/2, send_msg/4, send_bytes/2,
@@ -31,7 +31,7 @@
get_pdu/1, set_pdu/2, format_hdr/1]).
%% internal exports
--export([init_packet/10]).
+-export([init_packet/11]).
-compile({no_auto_import, [error/2]}).
@@ -42,22 +42,26 @@
%%----------------------------------------------------------------------
%% The InHandler process will receive messages on the form {snmp_pdu, Pdu}.
%%----------------------------------------------------------------------
-start_link_packet(InHandler,
- AgentIp, UdpPort, TrapUdp,
- VsnHdr, Version, Dir, BufSz) ->
- start_link_packet(InHandler,
- AgentIp, UdpPort, TrapUdp,
- VsnHdr, Version, Dir, BufSz,
- false).
-
-start_link_packet(InHandler,
- AgentIp, UdpPort, TrapUdp,
- VsnHdr, Version, Dir, BufSz,
- Dbg) when is_integer(UdpPort) ->
- Args = [self(), InHandler,
- AgentIp, UdpPort, TrapUdp,
- VsnHdr, Version, Dir, BufSz,
- Dbg],
+start_link_packet(
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz) ->
+ start_link_packet(
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ false).
+
+start_link_packet(
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ Dbg) ->
+ start_link_packet(
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ Dbg, inet).
+
+start_link_packet(
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ Dbg, IpFamily) when is_integer(UdpPort) ->
+ Args =
+ [self(),
+ InHandler, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ Dbg, IpFamily],
proc_lib:start_link(?MODULE, init_packet, Args).
stop(Pid) ->
@@ -90,12 +94,14 @@ send_bytes(Bytes, PacketPid) ->
%%--------------------------------------------------
%% The SNMP encode/decode process
%%--------------------------------------------------
-init_packet(Parent, SnmpMgr,
- AgentIp, UdpPort, TrapUdp,
- VsnHdr, Version, Dir, BufSz, DbgOptions) ->
+init_packet(
+ Parent,
+ SnmpMgr, AgentIp, UdpPort, TrapUdp, VsnHdr, Version, Dir, BufSz,
+ DbgOptions, IpFamily) ->
put(sname, mgr_misc),
init_debug(DbgOptions),
- {ok, UdpId} = gen_udp:open(TrapUdp, [{recbuf,BufSz},{reuseaddr, true}]),
+ {ok, UdpId} =
+ gen_udp:open(TrapUdp, [{recbuf,BufSz}, {reuseaddr, true}, IpFamily]),
put(msg_id, 1),
proc_lib:init_ack(Parent, self()),
init_usm(Version, Dir),
diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE.erl b/lib/snmp/test/snmp_to_snmpnet_SUITE.erl
new file mode 100644
index 0000000000..2f96493ac5
--- /dev/null
+++ b/lib/snmp/test/snmp_to_snmpnet_SUITE.erl
@@ -0,0 +1,559 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% This test suite uses the following external programs:
+%% snmpget From packet 'snmp' (in Ubuntu 12.04)
+%% snmpd From packet 'snmpd' (in Ubuntu 12.04)
+%% snmptrapd From packet 'snmpd' (in Ubuntu 12.04)
+%% They originate from the Net-SNMP applications, see:
+%% http://net-snmp.sourceforge.net/
+
+
+-module(snmp_to_snmpnet_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("snmp/include/STANDARD-MIB.hrl").
+
+-define(AGENT_ENGINE_ID, "ErlangSnmpAgent").
+-define(MANAGER_ENGINE_ID, "ErlangSnmpManager").
+-define(AGENT_PORT, 4000).
+-define(MANAGER_PORT, 8989).
+-define(DEFAULT_MAX_MESSAGE_SIZE, 484).
+
+expected(?sysDescr_instance = Oid, get) ->
+ OidStr = oid_str(Oid),
+ iolist_to_binary([OidStr | " = STRING: \"Erlang SNMP agent\""]).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ {group, ipv4},
+ {group, ipv6},
+ {group, ipv4_ipv6}
+ ].
+
+groups() ->
+ [{ipv4, [],
+ [{group, snmpget},
+ {group, snmptrapd},
+ {group, snmpd_mt},
+ {group, snmpd}
+ ]},
+ {ipv6, [],
+ [{group, snmpget},
+ {group, snmptrapd},
+ {group, snmpd_mt},
+ {group, snmpd}
+ ]},
+ {ipv4_ipv6, [],
+ [{group, snmpget},
+ {group, snmptrapd},
+ {group, snmpd_mt},
+ {group, snmpd}
+ ]},
+ %%
+ {snmpget, [],
+ [erlang_agent_netsnmp_get]},
+ {snmptrapd, [],
+ [erlang_agent_netsnmp_inform]},
+ {snmpd_mt, [],
+ [erlang_manager_netsnmp_get]},
+ {snmpd, [],
+ [erlang_manager_netsnmp_get]}
+ ].
+
+init_per_suite(Config) ->
+ [{agent_port, ?AGENT_PORT}, {manager_port, ?MANAGER_PORT} | Config].
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(ipv4, Config) ->
+ init_per_group_ip([inet], Config);
+init_per_group(ipv6, Config) ->
+ init_per_group_ipv6([inet6], Config);
+init_per_group(ipv4_ipv6, Config) ->
+ init_per_group_ipv6([inet, inet6], Config);
+%%
+init_per_group(snmpget = Exec, Config) ->
+ %% From Ubuntu package snmp
+ init_per_group_agent(Exec, Config);
+init_per_group(snmptrapd = Exec, Config) ->
+ %% From Ubuntu package snmpd
+ init_per_group_agent(Exec, Config);
+init_per_group(snmpd_mt, Config) ->
+ %% From Ubuntu package snmp
+ init_per_group_manager(
+ snmpd,
+ [{manager_net_if_module, snmpm_net_if_mt} | Config]);
+init_per_group(snmpd = Exec, Config) ->
+ %% From Ubuntu package snmp
+ init_per_group_manager(
+ Exec,
+ [{manager_net_if_module, snmpm_net_if} | Config]);
+%%
+init_per_group(_, Config) ->
+ Config.
+
+init_per_group_ipv6(Families, Config) ->
+ case ct:require(ipv6_hosts) of
+ ok ->
+ case gen_udp:open(0, [inet6]) of
+ {ok, S} ->
+ ok = gen_udp:close(S),
+ init_per_group_ip(Families, Config);
+ {error, _} ->
+ {skip, "Host seems to not support IPv6"}
+ end;
+ _ ->
+ {skip, "Test config ipv6_hosts is missing"}
+ end.
+
+init_per_group_ip(Families, Config) ->
+ AgentPort = ?config(agent_port, Config),
+ ManagerPort = ?config(manager_port, Config),
+ {ok, Host} = inet:gethostname(),
+ Transports =
+ [begin
+ {ok, Addr} = inet:getaddr(Host, Family),
+ {domain(Family), {Addr, AgentPort}}
+ end || Family <- Families],
+ Targets =
+ [begin
+ {ok, Addr} = inet:getaddr(Host, Family),
+ {domain(Family), {Addr, ManagerPort}}
+ end || Family <- Families],
+ [{transports, Transports}, {targets, Targets} | Config].
+
+init_per_group_agent(Exec, Config) ->
+ Versions = [v2],
+ Dir = ?config(priv_dir, Config),
+ Transports = ?config(transports, Config),
+ Targets = ?config(targets, Config),
+ agent_config(Dir, Transports, Targets, Versions),
+ find_executable(Exec, [{snmp_versions, Versions} | Config]).
+
+init_per_group_manager(Exec, Config) ->
+ Versions = [v2],
+ Dir = ?config(priv_dir, Config),
+ Targets = ?config(targets, Config),
+ manager_config(Dir, Targets),
+ find_executable(Exec, [{snmp_versions, Versions} | Config]).
+
+
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+init_per_testcase(_Case, Config) ->
+ Dog = ct:timetrap(20000),
+ application:stop(snmp),
+ application:unload(snmp),
+ [{watchdog, Dog} | Config].
+
+end_per_testcase(_, Config) ->
+ case application:stop(snmp) of
+ ok ->
+ ok;
+ E1 ->
+ ct:pal("application:stop(snmp) -> ~p", [E1])
+ end,
+ case application:unload(snmp) of
+ ok ->
+ ok;
+ E2 ->
+ ct:pal("application:unload(snmp) -> ~p", [E2])
+ end,
+ Config.
+
+find_executable(Exec, Config) ->
+ ExecStr = atom_to_list(Exec),
+ case os:find_executable(ExecStr) of
+ false ->
+ %% The sbin dirs are not in the PATH on all platforms...
+ find_sys_executable(
+ Exec, ExecStr,
+ [["usr", "local", "sbin"],
+ ["usr", "sbin"],
+ ["sbin"]],
+ Config);
+ Path ->
+ [{Exec, Path} | Config]
+ end.
+
+find_sys_executable(_Exec, ExecStr, [], _Config) ->
+ {skip, ExecStr ++ " not found"};
+find_sys_executable(Exec, ExecStr, [Dir | Dirs], Config) ->
+ case os:find_executable(filename:join(["/" | Dir] ++ [ExecStr])) of
+ false ->
+ find_sys_executable(Exec, ExecStr, Dirs, Config);
+ Path ->
+ [{Exec, Path} | Config]
+ end.
+
+start_agent(Config) ->
+ ok = application:load(snmp),
+ ok = application:set_env(snmp, agent, agent_app_env(Config)),
+ ok = application:start(snmp).
+
+start_manager(Config) ->
+ ok = application:load(snmp),
+ ok = application:set_env(snmp, manager, manager_app_env(Config)),
+ ok = application:start(snmp).
+
+%%--------------------------------------------------------------------
+%% Test Cases --------------------------------------------------------
+%%--------------------------------------------------------------------
+erlang_agent_netsnmp_get() ->
+ [{doc,"Test that we can access erlang snmp agent "
+ "from snmpnet manager"}].
+
+erlang_agent_netsnmp_get(Config) when is_list(Config) ->
+ Transports = ?config(transports, Config),
+ start_agent(Config),
+ Oid = ?sysDescr_instance,
+ Expected = expected(Oid, get),
+ [Expected = snmpget(Oid, Transport, Config)
+ || Transport <- Transports],
+ ok.
+
+%%--------------------------------------------------------------------
+erlang_manager_netsnmp_get() ->
+ [{doc,"Test that the erlang snmp manager can access snmpnet agent"}].
+
+erlang_manager_netsnmp_get(Config) when is_list(Config) ->
+ Community = "happy-testing",
+ SysDescr = "Net-SNMP agent",
+ TargetName = "Target Net-SNMP agent",
+ Transports = ?config(transports, Config),
+ ProgHandle = start_snmpd(Community, SysDescr, Config),
+ start_manager(Config),
+ snmp_manager_user:start_link(self(), test_user),
+ [snmp_manager_user:register_agent(
+ TargetName++domain_suffix(Domain),
+ [{reg_type, target_name},
+ {tdomain, Domain}, {taddress, Addr},
+ {community, Community}, {engine_id, "EngineId"},
+ {version, v2}, {sec_model, v2c}, {sec_level, noAuthNoPriv}])
+ || {Domain, Addr} <- Transports],
+ Results =
+ [snmp_manager_user:sync_get(
+ TargetName++domain_suffix(Domain),
+ [?sysDescr_instance])
+ || {Domain, _} <- Transports],
+ ct:pal("sync_get -> ~p", [Results]),
+ snmp_manager_user:stop(),
+ stop_program(ProgHandle),
+ [{ok,
+ {noError, 0,
+ [{varbind, ?sysDescr_instance, 'OCTET STRING', SysDescr,1}] },
+ _} = R || R <- Results],
+ ok.
+
+%%--------------------------------------------------------------------
+erlang_agent_netsnmp_inform(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Mib = "TestTrapv2",
+
+ start_agent(Config),
+ ok = snmpa:load_mib(snmp_master_agent, filename:join(DataDir, Mib)),
+
+ ProgHandle = start_snmptrapd(Mib, Config),
+
+ snmpa:send_notification(
+ snmp_master_agent, testTrapv22, {erlang_agent_test, self()}),
+
+ receive
+ {snmp_targets, erlang_agent_test, Addresses} ->
+ ct:pal("Notification sent to: ~p~n", [Addresses]),
+ erlang_agent_netsnmp_inform_responses(Addresses)
+ end,
+ stop_program(ProgHandle).
+
+erlang_agent_netsnmp_inform_responses([]) ->
+ receive
+ {snmp_notification, erlang_agent_test, _} = Unexpected ->
+ ct:pal("Unexpected response: ~p", [Unexpected]),
+ erlang_agent_netsnmp_inform_responses([])
+ after 0 ->
+ ok
+ end;
+erlang_agent_netsnmp_inform_responses([Address | Addresses]) ->
+ receive
+ {snmp_notification, erlang_agent_test,
+ {got_response, Address}} ->
+ ct:pal("Got response from: ~p~n", [Address]),
+ erlang_agent_netsnmp_inform_responses(Addresses);
+ {snmp_notification, erlang_agent_test,
+ {no_response, _} = NoResponse} ->
+ ct:fail(NoResponse)
+ end.
+
+%%--------------------------------------------------------------------
+%% Internal functions ------------------------------------------------
+%%--------------------------------------------------------------------
+snmpget(Oid, Transport, Config) ->
+ Versions = ?config(snmp_versions, Config),
+
+ Args =
+ ["-c", "public", net_snmp_version(Versions),
+ "-m", "",
+ "-Cf",
+ net_snmp_addr_str(Transport),
+ oid_str(Oid)],
+ ProgHandle = start_program(snmpget, Args, none, Config),
+ {_, line, Line} = get_program_output(ProgHandle),
+ stop_program(ProgHandle),
+ Line.
+
+start_snmptrapd(Mibs, Config) ->
+ DataDir = ?config(data_dir, Config),
+ MibDir = filename:join(code:lib_dir(snmp), "mibs"),
+ Targets = ?config(targets, Config),
+ SnmptrapdArgs =
+ ["-f", "-Lo", "-C",
+ "-m", Mibs,
+ "-M", MibDir++":"++DataDir,
+ "--disableAuthorization=yes",
+ "--snmpTrapdAddr=" ++ net_snmp_addr_str(Targets)],
+ {ok, StartCheckMP} = re:compile("NET-SNMP version ", [anchored]),
+ start_program(snmptrapd, SnmptrapdArgs, StartCheckMP, Config).
+
+start_snmpd(Community, SysDescr, Config) ->
+ DataDir = ?config(data_dir, Config),
+ Targets = ?config(targets, Config),
+ Transports = ?config(transports, Config),
+ Port = mk_port_number(),
+ CommunityArgs =
+ ["--rocommunity"++domain_suffix(Domain)++"="
+ ++Community++" "++inet_parse:ntoa(Ip)
+ || {Domain, {Ip, _}} <- Targets],
+ SnmpdArgs =
+ ["-f", "-r", %"-Dverbose",
+ "-c", filename:join(DataDir, "snmpd.conf"),
+ "-C", "-Lo",
+ "-m", "",
+ "--sysDescr="++SysDescr,
+ "--agentXSocket=tcp:localhost:"++integer_to_list(Port)]
+ ++ CommunityArgs
+ ++ [net_snmp_addr_str(Transports)],
+ {ok, StartCheckMP} = re:compile("NET-SNMP version ", [anchored]),
+ start_program(snmpd, SnmpdArgs, StartCheckMP, Config).
+
+start_program(Prog, Args, StartCheckMP, Config) ->
+ ct:pal("Starting program: ~w ~p", [Prog, Args]),
+ Path = ?config(Prog, Config),
+ DataDir = ?config(data_dir, Config),
+ StartWrapper = filename:join(DataDir, "start_stop_wrapper"),
+ Parent = self(),
+ Pid =
+ spawn_link(
+ fun () ->
+ run_program(Parent, StartWrapper, [Path | Args])
+ end),
+ start_check(Pid, erlang:monitor(process, Pid), StartCheckMP).
+
+start_check(Pid, Mon, none) ->
+ {Pid, Mon};
+start_check(Pid, Mon, StartCheckMP) ->
+ receive
+ {Pid, line, Line} ->
+ case re:run(Line, StartCheckMP, [{capture, none}]) of
+ match ->
+ {Pid, Mon};
+ nomatch ->
+ start_check(Pid, Mon, StartCheckMP)
+ end;
+ {'DOWN', Mon, _, _, Reason} ->
+ ct:fail("Prog ~p start failed: ~p", [Pid, Reason])
+ end.
+
+get_program_output({Pid, Mon}) ->
+ receive
+ {Pid, _, _} = Msg ->
+ Msg;
+ {'DOWN', Mon, _, _, Reason} ->
+ ct:fail("Prog ~p crashed: ~p", [Pid, Reason])
+ end.
+
+stop_program({Pid, _} = Handle) ->
+ Pid ! {self(), stop},
+ wait_program_stop(Handle).
+
+wait_program_stop({Pid, Mon}) ->
+ receive
+ {Pid, exit, ExitStatus} ->
+ receive
+ {'DOWN', Mon, _, _, _} ->
+ ExitStatus
+ end;
+ {'DOWN', Mon, _, _, Reason} ->
+ ct:fail("Prog stop: ~p", [Reason])
+ end.
+
+run_program(Parent, StartWrapper, ProgAndArgs) ->
+ [Prog | _] = ProgAndArgs,
+ Port =
+ open_port(
+ {spawn_executable, StartWrapper},
+ [{args, ProgAndArgs}, binary, stderr_to_stdout, {line, 80},
+ exit_status]),
+ ct:pal("Prog ~p started: ~p", [Port, Prog]),
+ run_program_loop(Parent, Port, []).
+
+run_program_loop(Parent, Port, Buf) ->
+ receive
+ {Parent, stop} ->
+ true = port_command(Port, <<"stop\n">>),
+ ct:pal("Prog ~p stop", [Port]),
+ run_program_loop(Parent, Port, Buf);
+ {Port, {data, {Flag, Data}}} ->
+ case Flag of
+ eol ->
+ Line = iolist_to_binary(lists:reverse(Buf, Data)),
+ ct:pal("Prog ~p output: ~s", [Port, Line]),
+ Parent ! {self(), line, Line},
+ run_program_loop(Parent, Port, []);
+ noeol ->
+ run_program_loop(Parent, Port, [Data | Buf])
+ end;
+ {Port, {exit_status,ExitStatus}} ->
+ ct:pal("Prog ~p exit: ~p", [Port, ExitStatus]),
+ catch port_close(Port),
+ Parent ! {self(), exit, ExitStatus};
+ Unexpected ->
+ ct:pal("run_program_loop Unexpected: ~p", [Unexpected]),
+ run_program_loop(Parent, Port, Buf)
+ end.
+
+
+agent_app_env(Config) ->
+ Dir = ?config(priv_dir, Config),
+ Vsns = ?config(snmp_versions, Config),
+ [{versions, Vsns},
+ {agent_type, master},
+ {agent_verbosity, trace},
+ {db_dir, Dir},
+ {audit_trail_log, [{type, read_write},
+ {dir, Dir},
+ {size, {10240, 10}}]},
+ {config, [{dir, Dir},
+ {force_load, true},
+ {verbosity, trace}]},
+ {local_db, [{repair, true},
+ {verbosity, silence}]},
+ {mib_server, [{verbosity, silence}]},
+ {symbolic_store, [{verbosity, silence}]},
+ {note_store, [{verbosity, silence}]},
+ {net_if, [{verbosity, trace}]}].
+
+manager_app_env(Config) ->
+ Dir = ?config(priv_dir, Config),
+ Vsns = ?config(snmp_versions, Config),
+ NetIfModule = ?config(manager_net_if_module, Config),
+ [{versions, Vsns},
+ {audit_trail_log, [{type, read_write},
+ {dir, Dir},
+ {size, {10240, 10}}]},
+ {net_if, [{module, NetIfModule}]},
+ {config, [{dir, Dir},
+ {db_dir, Dir},
+ {verbosity, trace}]}
+ ].
+
+oid_str([1 | Ints]) ->
+ "iso." ++ oid_str_tl(Ints);
+oid_str(Ints) ->
+ oid_str_tl(Ints).
+
+oid_str_tl([]) ->
+ "";
+oid_str_tl([Int]) ->
+ integer_to_list(Int);
+oid_str_tl([Int | Ints]) ->
+ integer_to_list(Int) ++ "." ++ oid_str_tl(Ints).
+
+agent_config(Dir, Transports, Targets, Versions) ->
+ EngineID = ?AGENT_ENGINE_ID,
+ MMS = ?DEFAULT_MAX_MESSAGE_SIZE,
+ ok = snmp_config:write_agent_snmp_conf(Dir, Transports, EngineID, MMS),
+ ok = snmp_config:write_agent_snmp_context_conf(Dir),
+ ok = snmp_config:write_agent_snmp_community_conf(Dir),
+ ok =
+ snmp_config:write_agent_snmp_standard_conf(
+ Dir, "snmp_to_snmpnet_SUITE"),
+ ok =
+ snmp_config:write_agent_snmp_target_addr_conf(
+ Dir, Targets, Versions),
+ ok = snmp_config:write_agent_snmp_target_params_conf(Dir, Versions),
+ ok = snmp_config:write_agent_snmp_notify_conf(Dir, inform),
+ ok = snmp_config:write_agent_snmp_vacm_conf(Dir, Versions, none).
+
+manager_config(Dir, Targets) ->
+ EngineID = ?MANAGER_ENGINE_ID,
+ MMS = ?DEFAULT_MAX_MESSAGE_SIZE,
+ ok = snmp_config:write_manager_snmp_conf(Dir, Targets, MMS, EngineID).
+
+net_snmp_version([v3 | _]) ->
+ "-v3";
+net_snmp_version([v2 | _]) ->
+ "-v2c";
+net_snmp_version([v1 | _]) ->
+ "-v1".
+
+domain(inet) ->
+ transportDomainUdpIpv4;
+domain(inet6) ->
+ transportDomainUdpIpv6.
+
+net_snmp_addr_str([Target | Targets]) ->
+ net_snmp_addr_str(Target) ++
+ case Targets of
+ [] ->
+ [];
+ [_ | _] ->
+ "," ++ net_snmp_addr_str(Targets)
+ end;
+net_snmp_addr_str({transportDomainUdpIpv4, {Addr, Port}}) ->
+ "udp:" ++
+ inet_parse:ntoa(Addr) ++ ":" ++
+ integer_to_list(Port);
+net_snmp_addr_str({transportDomainUdpIpv6, {Addr, Port}}) ->
+ "udp6:[" ++
+ inet_parse:ntoa(Addr) ++ "]:" ++
+ integer_to_list(Port).
+
+domain_suffix(transportDomainUdpIpv4) ->
+ "";
+domain_suffix(transportDomainUdpIpv6) ->
+ "6".
+
+mk_port_number() ->
+ {ok, Socket} = gen_udp:open(0, [{reuseaddr, true}]),
+ {ok, PortNum} = inet:port(Socket),
+ ok = gen_udp:close(Socket),
+ PortNum.
diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.bin b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.bin
new file mode 100644
index 0000000000..9d0790498d
--- /dev/null
+++ b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.bin
Binary files differ
diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.mib b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.mib
new file mode 100644
index 0000000000..679ddc14b0
--- /dev/null
+++ b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/TestTrapv2.mib
@@ -0,0 +1,71 @@
+TestTrapv2 DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ TimeTicks, Counter32, snmpModules, mib-2, enterprises, IpAddress,
+ Integer32
+ FROM SNMPv2-SMI
+ DisplayString, TestAndIncr, TimeStamp, RowStatus, TruthValue,
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+ FROM SNMPv2-CONF
+
+ system, snmp, ifIndex, ifAdminStatus, ifOperStatus
+ FROM RFC1213-MIB
+ snmpTraps
+ FROM SNMPv2-MIB;
+
+testTrapv2 MODULE-IDENTITY
+ LAST-UPDATED "9511090000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ " Marshall T. Rose
+
+ Postal: Dover Beach Consulting, Inc.
+ 420 Whisman Court
+ Mountain View, CA 94043-2186
+ US
+
+ Tel: +1 415 968 1052
+
+ DESCRIPTION
+ "The MIB module for SNMPv2 entities."
+ REVISION "9304010000Z"
+ DESCRIPTION
+ "The initial revision of this MIB module was published as
+ RFC 1450."
+ ::= { system 100 }
+
+
+tst OBJECT IDENTIFIER ::= { system 0 }
+
+testTrapv21 NOTIFICATION-TYPE
+ STATUS current
+ DESCRIPTION
+ "This trap is exactly the v2 correspondance of testTrap1 in
+ TestTrap mib."
+ ::= { snmp 1 }
+
+testTrapv22 NOTIFICATION-TYPE
+ STATUS current
+ DESCRIPTION
+ "This trap is exactly the v2 correspondance of testTrap2 in
+ TestTrap mib."
+ ::= { system 0 1 }
+
+linkUp NOTIFICATION-TYPE
+ OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
+ STATUS current
+ DESCRIPTION
+ "A linkUp trap signifies that the SNMPv2 entity,
+ acting in an agent role, has detected that the
+ ifOperStatus object for one of its communication links
+ has transitioned out of the down state."
+ ::= { snmpTraps 4 }
+
+
+
+
+END
diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE_data/snmpd.conf b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/snmpd.conf
new file mode 100644
index 0000000000..2a5f31680f
--- /dev/null
+++ b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/snmpd.conf
@@ -0,0 +1,12 @@
+sysLocation On the lab network
+sysContact otptest <[email protected]>
+
+createUser myinternaluser SHA dropdead
+
+agentSecName myinternaluser
+
+master agentx
+
+[snmp]
+noPersistentLoad yes
+noPersistentSave yes
diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE_data/start_stop_wrapper b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/start_stop_wrapper
new file mode 100755
index 0000000000..f806ab5c12
--- /dev/null
+++ b/lib/snmp/test/snmp_to_snmpnet_SUITE_data/start_stop_wrapper
@@ -0,0 +1,47 @@
+#! /bin/sh
+##
+## %CopyrightBegin%
+##
+## Copyright Ericsson AB 2014-2014. All Rights Reserved.
+##
+## The contents of this file are subject to the Erlang Public License,
+## Version 1.1, (the "License"); you may not use this file except in
+## compliance with the License. You should have received a copy of the
+## Erlang Public License along with this software. If not, it can be
+## retrieved online at http://www.erlang.org/.
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and limitations
+## under the License.
+##
+## %CopyrightEnd%
+##
+#
+
+## Start the given executable, wait for stop command,
+## stop the running executable and wait for exit.
+
+die () {
+ r=$?
+ echo "$0:" "$*" 1>&2
+ exit $r
+}
+
+test -x "$1" || die "Not Executable: $1"
+
+# Redirect stdin to make sure the stop command is read by us below
+# and does not go to the executable
+"$@" 0< /dev/null &
+PID=$!
+
+# Wait for stop command
+while read LINE; do
+ case :"$LINE" in
+ :"stop")
+ break;;
+ esac
+done
+
+kill $PID
+wait $PID
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 70f7c2b19a..67adf0a34f 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 4.25
+SNMP_VSN = 5.1.2
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssh/doc/src/book.xml b/lib/ssh/doc/src/book.xml
index 3c2375f96d..c031d872d7 100644
--- a/lib/ssh/doc/src/book.xml
+++ b/lib/ssh/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2005</year><year>2012</year>
+ <year>2005</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/fascicules.xml b/lib/ssh/doc/src/fascicules.xml
index 069d9002e0..7e99398c16 100644
--- a/lib/ssh/doc/src/fascicules.xml
+++ b/lib/ssh/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/ssh/doc/src/introduction.xml b/lib/ssh/doc/src/introduction.xml
index e76aa20d64..b42910cb34 100644
--- a/lib/ssh/doc/src/introduction.xml
+++ b/lib/ssh/doc/src/introduction.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index 0d88cbda7a..c77ee1e77a 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -29,6 +29,613 @@
<file>notes.xml</file>
</header>
+<section><title>Ssh 3.2.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Gracefully terminate if sockets is unexpectedly closed.</p>
+ <p>
+ Own Id: OTP-12782</p>
+ </item>
+ <item>
+ <p>
+ Made Codenomicon Defensics test suite pass: <list>
+ <item>limit number of algorithms in kexinit
+ message</item> <item>check 'e' and 'f' parameters in
+ kexdh</item> <item>implement 'keyboard-interactive' user
+ authentication on server side</item> <item> return plain
+ text message to bad version exchange message</item>
+ </list></p>
+ <p>
+ Own Id: OTP-12784</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.2.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A new option for handling the SSH_MSG_DEBUG message's
+ printouts. A fun could be given in the options that will
+ be called whenever the SSH_MSG_DEBUG message arrives.
+ This enables the user to format the printout or just
+ discard it.</p>
+ <p>
+ Own Id: OTP-12738 Aux Id: seq12860 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.2.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ New option <c>id_string</c> for <c>ssh:daemon</c> and
+ <c>ssh:connect</c> for limiting banner grabbing attempts.</p>
+ <p>
+ The possible values are: <c>{id_string,string()}</c> and
+ <c>{id_string,random}</c>. The latter will make ssh
+ generate a random nonsence id-string for each new
+ connection.</p>
+ <p>
+ Own Id: OTP-12659</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.2.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Ssh crashed if a message was sent on a channel with
+ packet_size = 0.</p>
+ <p>
+ A new option for ssh:daemon is also introduced:
+ <c>minimal_remote_max_packet_size</c>. This option sets
+ the least max packet size declaration that the daemon
+ will accept from a client. The default value is 0 to
+ maintain compatibility with OpenSSH and the rfc:s.</p>
+ <p>
+ Own Id: OTP-12645 Aux Id: seq12816 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ If a channel is closed by the peer while using a function
+ with call semantics in ssh_connection.erl return {error,
+ closed}. Document that the functions can return {error,
+ timeout | closed} and not only ssh_request_status()</p>
+ <p>
+ Own Id: OTP-12004</p>
+ </item>
+ <item>
+ <p>
+ Bug that causes ssh:connect to return
+ <c>{error,int()}</c> instead of <c>{error,timeout}</c>
+ when ssh handshake takes too long time.</p>
+ <p>
+ Own Id: OTP-12369</p>
+ </item>
+ <item>
+ <p>
+ Documentation corrections. (Thanks to Rabbe Fogelholm)</p>
+ <p>
+ Own Id: OTP-12399</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Example of ssh_connection:exec added.</p>
+ <p>
+ Own Id: OTP-12558</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure the clean rule for ssh, ssl, eunit and otp_mibs
+ actually removes generated files.</p>
+ <p>
+ Own Id: OTP-12200</p>
+ </item>
+ <item>
+ <p>
+ Improved Property Tests (Thanks to Thomas, John and
+ Tobias at QuviQ)</p>
+ <p>
+ Own Id: OTP-12256</p>
+ </item>
+ <item>
+ <p>
+ Correct typo of renegotiate that could cause rekeying to
+ fail</p>
+ <p>
+ Own Id: OTP-12277 Aux Id: seq12736 </p>
+ </item>
+ <item>
+ <p>
+ The {timeout, Timeout} option passed to
+ ssh_sftp:start_channel was not applied to the early
+ phases of the SSH protocol. This patch passes the Timeout
+ through to ssh:connect. In case the timeout occurs during
+ these phases, {error, timeout} is returned. (Thanks to
+ Simon Cornish)</p>
+ <p>
+ Own Id: OTP-12306</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added API functions ptty_alloc/3 and ptty_alloc/4, to
+ allocate a pseudo tty.</p>
+ <p>
+ Own Id: OTP-11542 Aux Id: seq12493, OTP-11631 </p>
+ </item>
+ <item>
+ <p>
+ Supports tar file creation on other media than file
+ systems mounted on the local machine.</p>
+ <p>
+ The <c>erl_tar</c> api is extended with
+ <c>erl_tar:init/3</c> that enables usage of user provided
+ media storage routines. A ssh-specific set of such
+ routines is hidden in the new function
+ <c>ssh_sftp:open_tar/3</c> to simplify creating a tar
+ archive on a remote ssh server.</p>
+ <p>
+ A chunked file reading option is added to
+ <c>erl_tar:add/3,4</c> to save memory on e.g small
+ embedded systems. The size of the slices read from a file
+ in that case can be specified.</p>
+ <p>
+ Own Id: OTP-12180 Aux Id: seq12715 </p>
+ </item>
+ <item>
+ <p>
+ Always send SSH_DISCONNECT protocol messages when peer
+ sends corrupt messages.</p>
+ <p>
+ Own Id: OTP-12185</p>
+ </item>
+ <item>
+ <p>
+ Hooks for funs that can change binaries sent to remote
+ sites from erl_tar for renote tar file creation are
+ added. See <c>ssh_sftp:open_tar/3,4</c> for details. The
+ hooks could also be used to read remote tar files that
+ need transformation before file extraction.</p>
+ <p>
+ Those hooks are intended for encryption and decryption of
+ tar files. Effort is put into memory, disk and network
+ resource economy.</p>
+ <p>
+ Own Id: OTP-12312 Aux Id: OTP-12180 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixes of login blocking after port scanning.</p>
+ <p>
+ Own Id: OTP-12247 Aux Id: seq12726 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add option sftp_vsn to SFTP</p>
+ <p>
+ Own Id: OTP-12227</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Fix option user_interaction to work as expected. When
+ password authentication is implemented with ssh
+ keyboard-interactive method and the password is already
+ supplied, so that we do not need to query user, then
+ connections should succeed even though user_interaction
+ option is set to false.</p>
+ <p>
+ Own Id: OTP-11329 Aux Id: seq12420, seq12335 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Gracefully handle bad data from the client when expecting
+ ssh version exchange.</p>
+ <p>
+ Own Id: OTP-12157 Aux Id: seq12706 </p>
+ </item>
+ <item>
+ <p>
+ When restarting an ssh daemon, that was stopped with
+ ssh:stop_listner/ [1,2] new options given shall replace
+ old ones.</p>
+ <p>
+ Own Id: OTP-12168 Aux Id: seq12711 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ ssh now has a format_status function to avoid printing
+ sensitive information in error loggs.</p>
+ <p>
+ Own Id: OTP-12030</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ The option <c>parallel_login</c> didn't work with the
+ value <c>true</c>. All logins were serial.</p>
+ <p>
+ Own Id: OTP-12194</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When starting an ssh-daemon giving the option
+ {parallel_login, true}, the timeout for authentication
+ negotiation ({negotiation_timeout, integer()}) was never
+ removed.</p>
+ <p>
+ This caused the session to always be terminated after the
+ timeout if parallel_login was set.</p>
+ <p>
+ Own Id: OTP-12057 Aux Id: seq12663 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Warning: this is experimental and may disappear or change
+ without previous warning.</p>
+ <p>
+ Experimental support for running Quickcheck and PropEr
+ tests from common_test suites is added to common_test.
+ See the reference manual for the new module
+ <c>ct_property_testing</c>.</p>
+ <p>
+ Experimental property tests are added under
+ <c>lib/{inet,ssh}/test/property_test</c>. They can be run
+ directly or from the commont_test suites
+ <c>inet/ftp_property_test_SUITE.erl</c> and
+ <c>ssh/test/ssh_property_test_SUITE.erl</c>.</p>
+ <p>
+ See the code in the <c>test</c> directories and the man
+ page for details.</p>
+ <p>
+ (Thanks to Tuncer Ayaz for a patch adding Triq)</p>
+ <p>
+ Own Id: OTP-12119</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When starting an ssh-daemon giving the option
+ {parallel_login, true}, the timeout for authentication
+ negotiation ({negotiation_timeout, integer()}) was never
+ removed.</p>
+ <p>
+ This caused the session to always be terminated after the
+ timeout if parallel_login was set.</p>
+ <p>
+ Own Id: OTP-12057 Aux Id: seq12663 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Removed mail address from error reports and corrected
+ spelling error (Stacktace -&gt; stacktrace)</p>
+ <p>
+ Own Id: OTP-11883 Aux Id: seq12586 </p>
+ </item>
+ <item>
+ <p>
+ Decode/encode fixes in SSH_MSG_IGNORE and
+ SSH_MSG_UNIMPLEMENTED.</p>
+ <p>
+ Own Id: OTP-11983</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Accepts that some older OpenSSH clients sends incorrect
+ disconnect messages.</p>
+ <p>
+ Own Id: OTP-11972</p>
+ </item>
+ <item>
+ <p>
+ Handle inet and inet6 option correctly</p>
+ <p>
+ Own Id: OTP-11976</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed timeout bug in ssh:connect.</p>
+ <p>
+ Own Id: OTP-11908</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Option <c>max_sessions</c> added to
+ <c>ssh:daemon/{2,3}</c>. This option, if set, limits the
+ number of simultaneous connections accepted by the
+ daemon.</p>
+ <p>
+ Own Id: OTP-11885</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixes the problem that ssh_cli in some cases could delay
+ the prompt if a tty was not requested by the client.</p>
+ <p>
+ Own Id: OTP-10732</p>
+ </item>
+ <item>
+ <p>
+ The variable NewCol is now correctly calculated allowing
+ for tab-completion of function calls even when preceded
+ with blank space (Thanks to Alexander Demidenko)</p>
+ <p>
+ Own Id: OTP-11566</p>
+ </item>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug when ssh:exec executes a linux command on a
+ linux ssh daemon. If the result is sent back from
+ standard error, the length information was not stripped
+ off correctly.</p>
+ <p>
+ Own Id: OTP-11667</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug with the ssh file 'known_hosts' which made
+ the file grow with many equal entries.</p>
+ <p>
+ Own Id: OTP-11671</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Bug fix for <c>ssh:daemon/2,3</c> so that the failfun is
+ called when it should.</p>
+ <p>
+ Own Id: OTP-11680</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug which crashed ssh when SSH_MSG_KEX_DH_GEX_GROUP
+ is received. This could cause a vm-crash for eheap_alloc
+ during garbage collect.</p>
+ <p>
+ Own Id: OTP-11696 Aux Id: 12547, 12532 </p>
+ </item>
+ <item>
+ <p>
+ Fixes a bug that breaks keyboard-interactive
+ authentication. Thanks to Simon Cornish for reporting and
+ suggesting a fix.</p>
+ <p>
+ Own Id: OTP-11698</p>
+ </item>
+ <item>
+ <p>
+ dialyzer specs are now correct for <c>ssh:start/0</c>,
+ <c>ssh:start/1</c>, <c>ssh:stop/0</c> and
+ <c>ssh_connection_handler:open_channel/5</c>. (Thanks to
+ Johannes Weißl )</p>
+ <p>
+ Own Id: OTP-11705</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Fixed dialyzer warning for <c>ssh_connection:send</c>.</p>
+ <p>
+ Own Id: OTP-11821</p>
+ </item>
+ <item>
+ <p>
+ <c>ssh:daemon/2,3</c> : Added options
+ <c>negotiation_timeout</c> and <c>parallel_login</c> to
+ tune the authentication behaviour.</p>
+ <p>
+ Own Id: OTP-11823</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Ssh now fully supports unicode filenames, filecontents,
+ shell and cli. Please note that the underlying os and
+ emulator must also give support for unicode. You may want
+ to start the emulator with "<c>erl +fnu</c>" on Linux.</p>
+ <p>
+ Own Id: OTP-10953</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Ssh 3.0</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/ssh/doc/src/part_notes.xml b/lib/ssh/doc/src/part_notes.xml
index 1b47a12021..c5cc163717 100644
--- a/lib/ssh/doc/src/part_notes.xml
+++ b/lib/ssh/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2010</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/ref_man.xml b/lib/ssh/doc/src/ref_man.xml
index 88203b5034..55339298e8 100644
--- a/lib/ssh/doc/src/ref_man.xml
+++ b/lib/ssh/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index c1a51d57fc..501668ca78 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -36,8 +36,10 @@
<list type="bulleted">
<item>SSH requires the crypto and public_key applications.</item>
<item>Supported SSH version is 2.0 </item>
- <item>Supported MAC algorithms: hmac-sha1</item>
- <item>Supported encryption algorithms: aes128-cb and 3des-cbc</item>
+ <item>Supported MAC algorithms: hmac-sha2-256 and hmac-sha1</item>
+ <item>Supported encryption algorithms: aes128-ctr, aes128-cb and 3des-cbc</item>
+ <item>Supports unicode filenames if the emulator and the underlaying OS supports it. See the DESCRIPTION section in <seealso marker="kernel:file">file</seealso> for information about this subject</item>
+ <item>Supports unicode in shell and cli</item>
</list>
</section>
@@ -95,6 +97,8 @@
<seealso marker="ssh_connection#session_channel/2">ssh_connection:session_channel/[2, 4]</seealso>.</p>
<p>Options are:</p>
<taglist>
+ <tag><c><![CDATA[{inet, inet | inet6}]]></c></tag>
+ <item> IP version to use.</item>
<tag><c><![CDATA[{user_dir, string()}]]></c></tag>
<item>
<p>Sets the user directory i.e. the directory containing
@@ -176,6 +180,15 @@
<item>
<p>If true, the client will not print out anything on authorization.</p>
</item>
+
+ <tag><c><![CDATA[{id_string, random | string()}]]></c></tag>
+ <item>
+ <p>The string that the client presents to a connected server initially. The default value is "Erlang/VSN" where VSN is the ssh application version number.
+ </p>
+ <p>The value <c>random</c> will cause a random string to be created at each connection attempt. This is to make it a bit more difficult for a malicious peer to find the ssh software brand and version.
+ </p>
+ </item>
+
<tag><c><![CDATA[{fd, file_descriptor()}]]></c></tag>
<item>
<p>Allow an existing file descriptor to be used
@@ -188,6 +201,14 @@
<tag><c><![CDATA[{idle_time, integer()}]]></c></tag>
<item>
<p>Sets a timeout on connection when no channels are active, default is infinity</p></item>
+
+ <tag><c><![CDATA[{ssh_msg_debug_fun, fun(ConnectionRef::ssh_connection_ref(), AlwaysDisplay::boolean(), Msg::binary(), LanguageTag::binary()) -> _}]]></c></tag>
+ <item>
+ <p>Provide a fun to implement your own logging of the SSH message SSH_MSG_DEBUG. The last three parameters are from the message, see RFC4253, section 11.3. The <c>ConnectionRef</c> is the reference to the connection on which the message arrived. The return value from the fun is not checked.</p>
+ <p>The default behaviour is ignore the message.
+ To get a printout for each message with <c>AlwaysDisplay = true</c>, use for example <c>{ssh_msg_debug_fun, fun(_,true,M,_)-> io:format("DEBUG: ~p~n", [M]) end}</c></p>
+ </item>
+
</taglist>
</desc>
</func>
@@ -228,11 +249,13 @@
port.</p>
<p>Options are:</p>
<taglist>
- <tag><c><![CDATA[{subsystems, [subsystem_spec()]]]></c></tag>
+ <tag><c><![CDATA[{inet, inet | inet6}]]></c></tag>
+ <item> IP version to use when the host address is specified as <c>any</c>. </item>
+ <tag><c><![CDATA[{subsystems, [subsystem_spec()]}]]></c></tag>
<item>
Provides specifications for handling of subsystems. The
"sftp" subsystem spec can be retrieved by calling
- ssh_sftpd:subsystem_spec/1. If the subsystems option in
+ ssh_sftpd:subsystem_spec/1. If the subsystems option is
not present the value of
<c>[ssh_sftpd:subsystem_spec([])]</c> will be used. It is
of course possible to set the option to the empty list if
@@ -302,6 +325,50 @@
<c><![CDATA[true]]></c> if the password is valid and
<c><![CDATA[false]]></c> otherwise.</p>
</item>
+
+ <tag><c><![CDATA[{negotiation_timeout, integer()}]]></c></tag>
+ <item>
+ <p>Max time in milliseconds for the authentication negotiation. The default value is 2 minutes. If the client fails to login within this time, the connection is closed.
+ </p>
+ </item>
+
+ <tag><c><![CDATA[{max_sessions, pos_integer()}]]></c></tag>
+ <item>
+ <p>The maximum number of simultaneous sessions that are accepted at any time for this daemon. This includes sessions that are being authorized. So if set to <c>N</c>, and <c>N</c> clients have connected but not started the login process, the <c>N+1</c> connection attempt will be aborted. If <c>N</c> connections are authenticated and still logged in, no more loggins will be accepted until one of the existing ones log out.
+ </p>
+ <p>The counter is per listening port, so if two daemons are started, one with <c>{max_sessions,N}</c> and the other with <c>{max_sessions,M}</c> there will be in total <c>N+M</c> connections accepted for the whole ssh application.
+ </p>
+ <p>Note that if <c>parallel_login</c> is <c>false</c>, only one client at a time may be in the authentication phase.
+ </p>
+ <p>As default, the option is not set. This means that the number is not limited.
+ </p>
+ </item>
+
+ <tag><c><![CDATA[{parallel_login, boolean()}]]></c></tag>
+ <item>
+ <p>If set to false (the default value), only one login is handled a time. If set to true, an unlimited number of login attempts will be allowed simultanously.
+ </p>
+ <p>If the <c>max_sessions</c> option is set to <c>N</c> and <c>parallel_login</c> is set to <c>true</c>, the max number of simultaneous login attempts at any time is limited to <c>N-K</c> where <c>K</c> is the number of authenticated connections present at this daemon.
+ </p>
+ <warning>
+ <p>Do not enable <c>parallel_logins</c> without protecting the server by other means, for example the <c>max_sessions</c> option or a firewall configuration. If set to <c>true</c>, there is no protection against DOS attacks.</p>
+ </warning>
+ </item>
+
+ <tag><c><![CDATA[{minimal_remote_max_packet_size, non_negative_integer()}]]></c></tag>
+ <item>
+ <p>The least maximum packet size that the daemon will accept in channel open requests from the client. The default value is 0.
+ </p>
+ </item>
+
+ <tag><c><![CDATA[{id_string, random | string()}]]></c></tag>
+ <item>
+ <p>The string the daemon will present to a connecting peer initially. The default value is "Erlang/VSN" where VSN is the ssh application version number.
+ </p>
+ <p>The value <c>random</c> will cause a random string to be created at each connection attempt. This is to make it a bit more difficult for a malicious peer to find the ssh software brand and version.
+ </p>
+ </item>
+
<tag><c><![CDATA[{key_cb, atom()}]]></c></tag>
<item>
<p>Module implementing the behaviour <seealso marker="ssh_server_key_api">ssh_server_key_api</seealso>.
@@ -324,8 +391,16 @@
<item>
<p>Provide a fun to implement your own logging when a user disconnects from the server.</p>
</item>
- </taglist>
- </desc>
+
+ <tag><c><![CDATA[{ssh_msg_debug_fun, fun(ConnectionRef::ssh_connection_ref(), AlwaysDisplay::boolean(), Msg::binary(), LanguageTag::binary()) -> _}]]></c></tag>
+ <item>
+ <p>Provide a fun to implement your own logging of the SSH message SSH_MSG_DEBUG. The last three parameters are from the message, see RFC4253, section 11.3. The <c>ConnectionRef</c> is the reference to the connection on which the message arrived. The return value from the fun is not checked.</p>
+ <p>The default behaviour is ignore the message.
+ To get a printout for each message with <c>AlwaysDisplay = true</c>, use for example <c>{ssh_msg_debug_fun, fun(_,true,M,_)-> io:format("DEBUG: ~p~n", [M]) end}</c></p>
+ </item>
+
+ </taglist>
+ </desc>
</func>
@@ -365,8 +440,11 @@
</func>
<func>
- <name>stop() -> ok </name>
+ <name>stop() -> ok | {error, Reason}</name>
<fsummary>Stops the SSH application.</fsummary>
+ <type>
+ <v>Reason = term()</v>
+ </type>
<desc>
<p>Stops the SSH application. See also
<seealso marker="kernel:application">application(3)</seealso></p>
diff --git a/lib/ssh/doc/src/ssh_app.xml b/lib/ssh/doc/src/ssh_app.xml
index c01f44936a..a1d2402790 100644
--- a/lib/ssh/doc/src/ssh_app.xml
+++ b/lib/ssh/doc/src/ssh_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/ssh_channel.xml b/lib/ssh/doc/src/ssh_channel.xml
index 66b3b8b656..a52a6a115e 100644
--- a/lib/ssh/doc/src/ssh_channel.xml
+++ b/lib/ssh/doc/src/ssh_channel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/ssh/doc/src/ssh_client_key_api.xml b/lib/ssh/doc/src/ssh_client_key_api.xml
index 2fa06f8bf1..f3d05a8980 100644
--- a/lib/ssh/doc/src/ssh_client_key_api.xml
+++ b/lib/ssh/doc/src/ssh_client_key_api.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/ssh/doc/src/ssh_connection.xml b/lib/ssh/doc/src/ssh_connection.xml
index efd4865a6f..5e2926dfa6 100644
--- a/lib/ssh/doc/src/ssh_connection.xml
+++ b/lib/ssh/doc/src/ssh_connection.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -62,6 +62,7 @@
<p><c>ssh_request_status() = success | failure</c></p>
<p><c>event() = {ssh_cm, ssh_connection_ref(), ssh_event_msg()} </c></p>
<p><c>ssh_event_msg() = data_events() | status_events() | terminal_events() </c></p>
+ <p><c>reason() = timeout | closed </c></p>
<taglist>
<tag><b>data_events()</b></tag>
@@ -137,7 +138,7 @@
<tag><c><![CDATA[{pty, ssh_channel_id(),
boolean() = WantReply, {string() = Terminal, integer() = CharWidth,
- integer() = RowHeight, integer() = PixelWidth, integer() = PixelHight,
+ integer() = RowHeight, integer() = PixelWidth, integer() = PixelHeight,
[{atom() | integer() = Opcode,
integer() = Value}] = TerminalModes}}]]></c></tag>
<item>A pseudo-terminal has been requested for the
@@ -148,11 +149,11 @@
drawable area of the window. The <c>Opcode</c> in the
<c>TerminalModes</c> list is the mnemonic name, represented
as an lowercase erlang atom, defined in
- <url href="http://www.ietf.org/rfc/rfc4254.txt">RFC 4254 </url> section 8,
- or the opcode if the mnemonic name is not listed in the
+ <url href="http://www.ietf.org/rfc/rfc4254.txt">RFC 4254 </url> section 8.
+ It may also be an opcode if the mnemonic name is not listed in the
RFC. Example <c>OP code: 53, mnemonic name ECHO erlang atom:
- echo</c>. There is currently no API function to generate this
- event.</item>
+ echo</c>.This event is sent as result of calling <seealso
+ marker="ssh_connection#ptty_alloc/4">ssh_connection:ptty_alloc/4</seealso></item>
<tag><c><![CDATA[{shell, boolean() = WantReply}]]></c></tag>
<item> This message will request that the user's default shell
@@ -218,7 +219,7 @@
</func>
<func>
- <name>exec(ConnectionRef, ChannelId, Command, TimeOut) -> ssh_request_status() </name>
+ <name>exec(ConnectionRef, ChannelId, Command, TimeOut) -> ssh_request_status() | {error, reason()} </name>
<fsummary>Request that the server start the execution of the given command. </fsummary>
<type>
<v> ConnectionRef = ssh_connection_ref() </v>
@@ -273,7 +274,53 @@
</desc>
</func>
- <func>
+ <func>
+ <name>ptty_alloc(ConnectionRef, ChannelId, Options) -> </name>
+ <name>ptty_alloc(ConnectionRef, ChannelId, Options, Timeout) -> > ssh_request_status() | {error, reason()} </name>
+ <fsummary>Send status replies to requests that want such replies. </fsummary>
+ <type>
+ <v> ConnectionRef = ssh_connection_ref() </v>
+ <v> ChannelId = ssh_channel_id()</v>
+ <v> Options = proplists:proplist()</v>
+ </type>
+ <desc>
+ <p> Sends a SSH Connection Protocol pty_req, to allocate a pseudo tty.
+ Should be called by a SSH client process.
+ Options are:
+ </p>
+
+ <taglist>
+ <tag>{term, string()}</tag>
+ <item>
+ Defaults to os:getenv("TERM") or "vt100" if it is undefined.
+ </item>
+ <tag>{width, integer()}</tag>
+ <item>
+ Defaults to 80 if pixel_width is not defined.
+ </item>
+ <tag>{height, integer()}</tag>
+ <item>
+ Defaults to 24 if pixel_height is not defined.
+ </item>
+ <tag>{pixel_width, integer()}</tag>
+ <item>
+ Is disregarded if width is defined.
+ </item>
+ <tag>{pixel_height, integer()}</tag>
+ <item>
+ Is disregarded if height is defined.
+ </item>
+ <tag>{pty_opts, [{posix_atom(), integer()}]}</tag>
+ <item>
+ Option may be an empty list, otherwise
+ see possible POSIX names in section 8 in <url href="http://www.ietf.org/rfc/rfc4254.txt"> RFC 4254</url>.
+ </item>
+ </taglist>
+
+ </desc>
+ </func>
+
+ <func>
<name>reply_request(ConnectionRef, WantReply, Status, ChannelId) -> ok</name>
<fsummary>Send status replies to requests that want such replies. </fsummary>
<type>
@@ -329,7 +376,7 @@
<func>
<name>session_channel(ConnectionRef, Timeout) -> </name>
<name>session_channel(ConnectionRef, InitialWindowSize,
- MaxPacketSize, Timeout) -> {ok, ssh_channel_id()} | {error, Reason}</name>
+ MaxPacketSize, Timeout) -> {ok, ssh_channel_id()} | {error, reason()}</name>
<fsummary>Opens a channel for a ssh session. </fsummary>
<type>
<v> ConnectionRef = ssh_connection_ref()</v>
@@ -346,7 +393,7 @@
</func>
<func>
- <name>setenv(ConnectionRef, ChannelId, Var, Value, TimeOut) -> ssh_request_status()</name>
+ <name>setenv(ConnectionRef, ChannelId, Var, Value, TimeOut) -> ssh_request_status() | {error, reason()} </name>
<fsummary> Environment variables may be passed to the
shell/command to be started later.</fsummary>
<type>
@@ -364,7 +411,7 @@
</func>
<func>
- <name>shell(ConnectionRef, ChannelId) -> ssh_request_status()
+ <name>shell(ConnectionRef, ChannelId) -> ssh_request_status() | {error, closed}
</name>
<fsummary> Requests that the user's default shell (typically
defined in /etc/passwd in UNIX systems) shall be executed at the server
@@ -381,7 +428,7 @@
</func>
<func>
- <name>subsystem(ConnectionRef, ChannelId, Subsystem, Timeout) -> ssh_request_status()</name>
+ <name>subsystem(ConnectionRef, ChannelId, Subsystem, Timeout) -> ssh_request_status() | {error, reason()} </name>
<fsummary> </fsummary>
<type>
<v> ConnectionRef = ssh_connection_ref() </v>
diff --git a/lib/ssh/doc/src/ssh_protocol.xml b/lib/ssh/doc/src/ssh_protocol.xml
index 28f42f5707..7288266cf7 100644
--- a/lib/ssh/doc/src/ssh_protocol.xml
+++ b/lib/ssh/doc/src/ssh_protocol.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<!-- %EricssonCopyright% -->
<chapter>
<header>
<copyright>
- <year>2013</year>
+ <year>2013</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/ssh_server_key_api.xml b/lib/ssh/doc/src/ssh_server_key_api.xml
index ee537f2f60..f7133e4ba5 100644
--- a/lib/ssh/doc/src/ssh_server_key_api.xml
+++ b/lib/ssh/doc/src/ssh_server_key_api.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml
index 0d61e57edb..ab111562f9 100644
--- a/lib/ssh/doc/src/ssh_sftp.xml
+++ b/lib/ssh/doc/src/ssh_sftp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2005</year><year>2012</year>
+ <year>2005</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -81,6 +81,17 @@
<p>The timeout is passed to the ssh_channel start function,
and defaults to infinity.</p>
</item>
+ <tag>
+ <p><c><![CDATA[{sftp_vsn, integer()}]]></c></p>
+ </tag>
+ <item>
+ <p>
+ Desired SFTP protocol version.
+ The actual version will be the minimum of
+ the desired version and the maximum supported
+ versions by the SFTP server.
+ </p>
+ </item>
</taglist>
<p>All other options are directly passed to
<seealso marker="ssh">ssh:connect/3</seealso> or ignored if a
@@ -183,6 +194,118 @@
can be used for reading directory contents.</p>
</desc>
</func>
+
+ <func>
+ <name>open_tar(ChannelPid, Path, Mode) -></name>
+ <name>open_tar(ChannelPid, Path, Mode, Timeout) -> {ok, Handle} | {error, Reason}</name>
+ <fsummary>Opens a tar file on the server to which <v>ChannelPid</v> is connected and returns a handle</fsummary>
+ <type>
+ <v>ChannelPid = pid()</v>
+ <v>Path = string()</v>
+ <v>Mode = [read] | [write] | [read,EncryptOpt] | [write,DecryptOpt] </v>
+ <v>EncryptOpt = {crypto,{InitFun,EncryptFun,CloseFun}}</v>
+ <v>DecryptOpt = {crypto,{InitFun,DecryptFun}}</v>
+ <v>InitFun = (fun() -> {ok,CryptoState}) | (fun() -> {ok,CryptoState,ChunkSize}) </v>
+ <v>CryptoState = any()</v>
+ <v>ChunkSize = undefined | pos_integer()</v>
+ <v>EncryptFun = (fun(PlainBin,CryptoState) -> EncryptResult)</v>
+ <v>EncryptResult = {ok,EncryptedBin,CryptoState} | {ok,EncryptedBin,CryptoState,ChunkSize}</v>
+ <v>PlainBin = binary()</v>
+ <v>EncryptedBin = binary()</v>
+ <v>DecryptFun = (fun(EncryptedBin,CryptoState) -> DecryptResult)</v>
+ <v>DecryptResult = {ok,PlainBin,CryptoState} | {ok,PlainBin,CryptoState,ChunkSize}</v>
+ <v>CloseFun = (fun(PlainBin,CryptoState) -> {ok,EncryptedBin})</v>
+ <v>Timeout = timeout()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Opens a handle to a tar file on the server associated with <c>ChannelPid</c>. The handle
+ can be used for remote tar creation and extraction as defined by the
+ <seealso marker="stdlib:erl_tar#init/3">erl_tar:init/3</seealso> function.
+ </p>
+ <p>An example of writing and then reading a tar file:</p>
+ <code type="none">
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChannelPid, ?tar_file_name, [write]),
+ ok = erl_tar:add(HandleWrite, .... ),
+ ok = erl_tar:add(HandleWrite, .... ),
+ ...
+ ok = erl_tar:add(HandleWrite, .... ),
+ ok = erl_tar:close(HandleWrite),
+
+ %% And for reading
+ {ok,HandleRead} = ssh_sftp:open_tar(ChannelPid, ?tar_file_name, [read]),
+ {ok,NameValueList} = erl_tar:extract(HandleRead,[memory]),
+ ok = erl_tar:close(HandleRead),
+ </code>
+
+ <p>The <c>crypto</c> mode option is applied to the generated stream of bytes just prior to sending
+ them to the sftp server. This is intended for encryption but could of course be used for other
+ purposes.
+ </p>
+ <p>The <c>InitFun</c> is applied once
+ prior to any other crypto operation. The returned <c>CryptoState</c> is then folded into
+ repeated applications of the <c>EncryptFun</c> or <c>DecryptFun</c>. The binary returned
+ from those Funs are sent further to the remote sftp server. Finally - if doing encryption
+ - the <c>CloseFun</c> is applied to the last piece of data. The <c>CloseFun</c> is
+ responsible for padding (if needed) and encryption of that last piece.
+ </p>
+ <p>The <c>ChunkSize</c> defines the size of the <c>PlainBin</c>s that <c>EncodeFun</c> is applied
+ to. If the <c>ChunkSize</c> is <c>undefined</c> the size of the <c>PlainBin</c>s varies because
+ this is inteded for stream crypto while a fixed <c>ChunkSize</c> is intended for block crypto. It
+ is possible to change the <c>ChunkSize</c>s in the return from the <c>EncryptFun</c> or
+ <c>DecryptFun</c>. It is in fact possible to change the value between <c>pos_integer()</c> and
+ <c>undefined</c>.
+ </p>
+ <p>The write and read example above can be extended with encryption and decryption:</p>
+ <code type="none">
+ %% First three parameters depending on which crypto type we select:
+ Key = &lt;&lt;"This is a 256 bit key. abcdefghi">>,
+ Ivec0 = crypto:rand_bytes(16),
+ DataSize = 1024, % DataSize rem 16 = 0 for aes_cbc
+
+ %% Initialization of the CryptoState, in this case it is the Ivector.
+ InitFun = fun() -> {ok, Ivec0, DataSize} end,
+
+ %% How to encrypt:
+ EncryptFun =
+ fun(PlainBin,Ivec) ->
+ EncryptedBin = crypto:block_encrypt(aes_cbc256, Key, Ivec, PlainBin),
+ {ok, EncryptedBin, crypto:next_iv(aes_cbc,EncryptedBin)}
+ end,
+
+ %% What to do with the very last block:
+ CloseFun =
+ fun(PlainBin, Ivec) ->
+ EncryptedBin = crypto:block_encrypt(aes_cbc256, Key, Ivec,
+ pad(16,PlainBin) %% Last chunk
+ ),
+ {ok, EncryptedBin}
+ end,
+
+ Cw = {InitFun,EncryptFun,CloseFun},
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChannelPid, ?tar_file_name, [write,{crypto,Cw}]),
+ ok = erl_tar:add(HandleWrite, .... ),
+ ok = erl_tar:add(HandleWrite, .... ),
+ ...
+ ok = erl_tar:add(HandleWrite, .... ),
+ ok = erl_tar:close(HandleWrite),
+
+ %% And for decryption (in this crypto example we could use the same InitFun
+ %% as for encryption):
+ DecryptFun =
+ fun(EncryptedBin,Ivec) ->
+ PlainBin = crypto:block_decrypt(aes_cbc256, Key, Ivec, EncryptedBin),
+ {ok, PlainBin, crypto:next_iv(aes_cbc,EncryptedBin)}
+ end,
+
+ Cr = {InitFun,DecryptFun},
+ {ok,HandleRead} = ssh_sftp:open_tar(ChannelPid, ?tar_file_name, [read,{crypto,Cw}]),
+ {ok,NameValueList} = erl_tar:extract(HandleRead,[memory]),
+ ok = erl_tar:close(HandleRead),
+ </code>
+ </desc>
+ </func>
+
<func>
<name>close(ChannelPid, Handle) -> </name>
<name>close(ChannelPid, Handle, Timeout) -> ok | {error, Reason}</name>
diff --git a/lib/ssh/doc/src/ssh_sftpd.xml b/lib/ssh/doc/src/ssh_sftpd.xml
index a73d6e52d4..81c2acc575 100644
--- a/lib/ssh/doc/src/ssh_sftpd.xml
+++ b/lib/ssh/doc/src/ssh_sftpd.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/ssh/doc/src/usersguide.xml b/lib/ssh/doc/src/usersguide.xml
index c818003090..8ab14c2945 100644
--- a/lib/ssh/doc/src/usersguide.xml
+++ b/lib/ssh/doc/src/usersguide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2012</year>
+ <year>2012</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssh/doc/src/using_ssh.xml b/lib/ssh/doc/src/using_ssh.xml
index c994c1c56c..46178d4018 100644
--- a/lib/ssh/doc/src/using_ssh.xml
+++ b/lib/ssh/doc/src/using_ssh.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -33,7 +33,7 @@
all needed applications (crypto, public_key and ssh). All examples
are run in an Erlang shell, or in a bash shell using openssh to
illustrate how the erlang ssh application can be used. The
- exampels are run as the user otptest on a local network where the
+ examples are run as the user otptest on a local network where the
user is authorized to login in over ssh to the host "tarlop". If
nothing else is stated it is persumed that the otptest user has an
entry in tarlop's authorized_keys file (may log in via ssh without
@@ -79,7 +79,7 @@
<p> The option user_dir defaults to the users ~/.ssh directory</p>
<p>In the following example we generate new keys and host keys as
- to be able to run the example without having root privilages</p>
+ to be able to run the example without having root privileges</p>
<code>
$bash> ssh-keygen -t rsa -f /tmp/ssh_daemon/ssh_host_rsa_key
@@ -88,7 +88,7 @@
[...]
</code>
- <p>Create the file /tmp/otptest_user/.ssh/authrized_keys and add the content
+ <p>Create the file /tmp/otptest_user/.ssh/authorized_keys and add the content
of /tmp/otptest_user/.ssh/id_rsa.pub Now we can do</p>
<code type="erl">
diff --git a/lib/ssh/examples/Makefile b/lib/ssh/examples/Makefile
index de019f75b5..9280c42076 100644
--- a/lib/ssh/examples/Makefile
+++ b/lib/ssh/examples/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2005-2012. All Rights Reserved.
+# Copyright Ericsson AB 2005-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -38,7 +38,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/ssh-$(VSN)
MODULES = \
- ssh_sample_cli
+ ssh_sample_cli \
+ ssh_device.erl
ERL_FILES= $(MODULES:=.erl)
diff --git a/lib/ssh/examples/ssh_device.erl b/lib/ssh/examples/ssh_device.erl
new file mode 100644
index 0000000000..f6be812915
--- /dev/null
+++ b/lib/ssh/examples/ssh_device.erl
@@ -0,0 +1,62 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2005-2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(ssh_device).
+
+%% api
+-export([ssh_device/5]).
+
+%%% I wrote this because of i think a fully ssh client sample will be easy to start the ssh module better than
+%%% go though each function file.
+ssh_device(Host, Port, User, Pass, Cmd) ->
+ ssh:start(),
+ case ssh:connect(Host, Port,
+ [{user, User}, {password, Pass},
+ {silently_accept_hosts, true}, {quiet_mode, true}])
+ of
+ {ok, Conn} ->
+ {ok, ChannelId} = ssh_connection:session_channel(Conn,
+ infinity),
+ ssh_connection:exec(Conn, ChannelId, Cmd, infinity),
+ Init_rep = <<>>,
+ wait_for_response(Conn, Host, Init_rep),
+ ssh:close(Conn);
+ {error, nxdomain} ->
+ {error,nxdomain}
+ end.
+
+%%--------------------------------------------------------------------
+%%% Internal application API
+%%--------------------------------------------------------------------
+wait_for_response(Conn, Host, Acc) ->
+ receive
+ {ssh_cm, Conn, Msg} ->
+ case Msg of
+ {closed, _ChannelId} ->
+ {ok,Acc};
+ {data, _, _, A} ->
+ Acc2 = <<Acc/binary, A/binary>>,
+ wait_for_response(Conn, Host, Acc2);
+ _ ->
+ wait_for_response(Conn, Host, Acc)
+ end
+ after
+ 5000 ->
+ {error,timeout}
+ end.
diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile
index 2ef2859fd7..90d71107ad 100644
--- a/lib/ssh/src/Makefile
+++ b/lib/ssh/src/Makefile
@@ -65,6 +65,7 @@ MODULES= \
ssh_cli \
ssh_file \
ssh_io \
+ ssh_info \
ssh_math \
ssh_message \
ssh_no_io \
@@ -115,7 +116,7 @@ $(TARGET_FILES): $(BEHAVIOUR_TARGET_FILES)
debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
clean:
- rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
+ rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(BEHAVIOUR_TARGET_FILES)
rm -f errs core *~
$(APP_TARGET): $(APP_SRC) ../vsn.mk
diff --git a/lib/ssh/src/ssh.app.src b/lib/ssh/src/ssh.app.src
index 74d7293be0..bc01c539e0 100644
--- a/lib/ssh/src/ssh.app.src
+++ b/lib/ssh/src/ssh.app.src
@@ -23,6 +23,7 @@
sshd_sup,
ssh_file,
ssh_io,
+ ssh_info,
ssh_math,
ssh_no_io,
ssh_server_key_api,
@@ -38,6 +39,8 @@
{registered, []},
{applications, [kernel, stdlib, crypto, public_key]},
{env, []},
- {mod, {ssh_app, []}}]}.
+ {mod, {ssh_app, []}},
+ {runtime_dependencies, ["stdlib-2.3","public_key-0.22","kernel-3.0",
+ "erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src
index 32f7cc470b..e76c110c04 100644
--- a/lib/ssh/src/ssh.appup.src
+++ b/lib/ssh/src/ssh.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,13 +19,9 @@
{"%VSN%",
[
- {<<"2.1\\.*">>, [{restart_application, ssh}]},
- {<<"2.0\\.*">>, [{restart_application, ssh}]},
- {<<"1\\.*">>, [{restart_application, ssh}]}
+ {<<".*">>, [{restart_application, ssh}]}
],
[
- {<<"2.1\\.*">>,[{restart_application, ssh}]},
- {<<"2.0\\.*">>, [{restart_application, ssh}]},
- {<<"1\\.*">>, [{restart_application, ssh}]}
+ {<<".*">>, [{restart_application, ssh}]}
]
}.
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 2685b1553b..7ed17618e7 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -1,7 +1,7 @@
-%%
+%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,8 +32,8 @@
shell/1, shell/2, shell/3]).
%%--------------------------------------------------------------------
--spec start() -> ok.
--spec start(permanent | transient | temporary) -> ok.
+-spec start() -> ok | {error, term()}.
+-spec start(permanent | transient | temporary) -> ok | {error, term()}.
%%
%% Description: Starts the ssh application. Default type
%% is temporary. see application(3)
@@ -51,7 +51,7 @@ start(Type) ->
application:start(ssh, Type).
%%--------------------------------------------------------------------
--spec stop() -> ok.
+-spec stop() -> ok | {error, term()}.
%%
%% Description: Stops the ssh application.
%%--------------------------------------------------------------------
@@ -59,8 +59,8 @@ stop() ->
application:stop(ssh).
%%--------------------------------------------------------------------
--spec connect(string(), integer(), proplists:proplists()) -> {ok, pid()} | {error, term()}.
--spec connect(string(), integer(), proplists:proplists(), timeout()) -> {ok, pid()} | {error, term()}.
+-spec connect(string(), integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+-spec connect(string(), integer(), proplists:proplist(), timeout()) -> {ok, pid()} | {error, term()}.
%%
%% Description: Starts an ssh connection.
%%--------------------------------------------------------------------
@@ -73,8 +73,8 @@ connect(Host, Port, Options, Timeout) ->
{SocketOptions, SshOptions} ->
{_, Transport, _} = TransportOpts =
proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
- Inet = proplists:get_value(inet, SshOptions, inet),
- try Transport:connect(Host, Port, [ {active, false}, Inet | SocketOptions], Timeout) of
+ ConnectionTimeout = proplists:get_value(connect_timeout, Options, infinity),
+ try Transport:connect(Host, Port, [ {active, false} | SocketOptions], ConnectionTimeout) of
{ok, Socket} ->
Opts = [{user_pid, self()}, {host, Host} | fix_idle_time(SshOptions)],
ssh_connection_handler:start_connection(client, Socket, Opts, Timeout);
@@ -194,6 +194,7 @@ shell(Host, Port, Options) ->
{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}],
@@ -234,29 +235,33 @@ do_start_daemon(Host, Port, Options, SocketOptions) ->
{port, Port}, {role, server},
{socket_opts, SocketOptions},
{ssh_opts, Options}]) of
- {ok, SysSup} ->
- {ok, SysSup};
{error, {already_started, _}} ->
{error, eaddrinuse};
- {error, R} ->
- {error, R}
+ Result = {Code, _} when (Code == ok) or (Code == error) ->
+ Result
catch
exit:{noproc, _} ->
{error, ssh_not_started}
end;
Sup ->
- case ssh_system_sup:restart_acceptor(Host, Port) of
+ 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, Options}]) of
+ {error, {already_started, _}} ->
+ {error, eaddrinuse};
{ok, _} ->
{ok, Sup};
- _ ->
- {error, eaddrinuse}
+ Other ->
+ Other
end
end.
handle_options(Opts) ->
try handle_option(proplists:unfold(Opts), [], []) of
- {_,_} = Options ->
- Options
+ {Inet, Ssh} ->
+ {handle_ip(Inet), Ssh}
catch
throw:Error ->
Error
@@ -307,6 +312,8 @@ handle_option([{disconnectfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{failfun, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{ssh_msg_debug_fun, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
%%Backwards compatibility should not be underscore between ip and v6 in API
handle_option([{ip_v6_disabled, Value} | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option({ipv6_disabled, Value}) | SshOptions]);
@@ -324,6 +331,8 @@ handle_option([{exec, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{auth_methods, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{auth_method_kb_interactive_data, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{pref_public_key_algs, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{quiet_mode, _} = Opt|Rest], SocketOptions, SshOptions) ->
@@ -332,9 +341,24 @@ handle_option([{idle_time, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{rekey_limit, _} = Opt|Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{max_sessions, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{negotiation_timeout, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{parallel_login, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([parallel_login|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option({parallel_login,true}) | SshOptions]);
+handle_option([{minimal_remote_max_packet_size, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{id_string, _ID} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, [handle_inet_option(Opt) | SocketOptions], SshOptions).
+
+handle_ssh_option({minimal_remote_max_packet_size, Value} = Opt) when is_integer(Value), Value >=0 ->
+ Opt;
handle_ssh_option({system_dir, Value} = Opt) when is_list(Value) ->
Opt;
handle_ssh_option({user_dir, Value} = Opt) when is_list(Value) ->
@@ -360,6 +384,12 @@ handle_ssh_option({pref_public_key_algs, Value} = Opt) when is_list(Value), leng
end;
handle_ssh_option({connect_timeout, Value} = Opt) when is_integer(Value); Value == infinity ->
Opt;
+handle_ssh_option({max_sessions, Value} = Opt) when is_integer(Value), Value>0 ->
+ Opt;
+handle_ssh_option({negotiation_timeout, Value} = Opt) when is_integer(Value); Value == infinity ->
+ Opt;
+handle_ssh_option({parallel_login, Value} = Opt) when Value==true ; Value==false ->
+ Opt;
handle_ssh_option({user, Value} = Opt) when is_list(Value) ->
Opt;
handle_ssh_option({dsa_pass_phrase, Value} = Opt) when is_list(Value) ->
@@ -378,10 +408,18 @@ handle_ssh_option({compression, Value} = Opt) when is_atom(Value) ->
Opt;
handle_ssh_option({exec, {Module, Function, _}} = Opt) when is_atom(Module),
is_atom(Function) ->
-
+ Opt;
+handle_ssh_option({exec, Function} = Opt) when is_function(Function) ->
Opt;
handle_ssh_option({auth_methods, Value} = Opt) when is_list(Value) ->
Opt;
+handle_ssh_option({auth_method_kb_interactive_data, {Name,Instruction,Prompt,Echo}} = Opt) when is_list(Name),
+ is_list(Instruction),
+ is_list(Prompt),
+ is_boolean(Echo) ->
+ Opt;
+handle_ssh_option({auth_method_kb_interactive_data, F} = Opt) when is_function(F,3) ->
+ Opt;
handle_ssh_option({infofun, Value} = Opt) when is_function(Value) ->
Opt;
handle_ssh_option({connectfun, Value} = Opt) when is_function(Value) ->
@@ -390,6 +428,8 @@ handle_ssh_option({disconnectfun , Value} = Opt) when is_function(Value) ->
Opt;
handle_ssh_option({failfun, Value} = Opt) when is_function(Value) ->
Opt;
+handle_ssh_option({ssh_msg_debug_fun, Value} = Opt) when is_function(Value,4) ->
+ Opt;
handle_ssh_option({ipv6_disabled, Value} = Opt) when is_boolean(Value) ->
throw({error, {{ipv6_disabled, Opt}, option_no_longer_valid_use_inet_option_instead}});
@@ -414,17 +454,22 @@ handle_ssh_option({idle_time, Value} = Opt) when is_integer(Value), Value > 0 ->
Opt;
handle_ssh_option({rekey_limit, Value} = Opt) when is_integer(Value) ->
Opt;
+handle_ssh_option({id_string, random}) ->
+ {id_string, {random,2,5}}; %% 2 - 5 random characters
+handle_ssh_option({id_string, ID} = Opt) when is_list(ID) ->
+ Opt;
handle_ssh_option(Opt) ->
throw({error, {eoptions, Opt}}).
handle_inet_option({active, _} = Opt) ->
- throw({error, {{eoptions, Opt}, "Ssh has built in flow control, "
- "and activ is handled internaly user is not allowd"
+ throw({error, {{eoptions, Opt}, "SSH has built in flow control, "
+ "and active is handled internally, user is not allowed"
"to specify this option"}});
-handle_inet_option({inet, Value} = Opt) when (Value == inet) or (Value == inet6) ->
- Opt;
+
+handle_inet_option({inet, Value}) when (Value == inet) or (Value == inet6) ->
+ Value;
handle_inet_option({reuseaddr, _} = Opt) ->
- throw({error, {{eoptions, Opt},"Is set internaly user is not allowd"
+ throw({error, {{eoptions, Opt},"Is set internally, user is not allowed"
"to specify this option"}});
%% Option verified by inet
handle_inet_option(Opt) ->
@@ -445,3 +490,17 @@ handle_pref_algs([H|T], Acc) ->
_ ->
false
end.
+
+handle_ip(Inet) -> %% Default to ipv4
+ case lists:member(inet, Inet) of
+ true ->
+ Inet;
+ false ->
+ case lists:member(inet6, Inet) of
+ true ->
+ Inet;
+ false ->
+ [inet | Inet]
+ end
+ end.
+
diff --git a/lib/ssh/src/ssh.hrl b/lib/ssh/src/ssh.hrl
index 94ced9da6f..0c4d34f89c 100644
--- a/lib/ssh/src/ssh.hrl
+++ b/lib/ssh/src/ssh.hrl
@@ -54,6 +54,7 @@
-define(uint32(X), << ?UINT32(X) >> ).
-define(uint64(X), << ?UINT64(X) >> ).
-define(string(X), << ?STRING(list_to_binary(X)) >> ).
+-define(string_utf8(X), << ?STRING(unicode:characters_to_binary(X)) >> ).
-define(binary(X), << ?STRING(X) >>).
-define(SSH_CIPHER_NONE, 0).
diff --git a/lib/ssh/src/ssh_acceptor.erl b/lib/ssh/src/ssh_acceptor.erl
index 91905b2eaf..34988f17b6 100644
--- a/lib/ssh/src/ssh_acceptor.erl
+++ b/lib/ssh/src/ssh_acceptor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,8 @@
-module(ssh_acceptor).
%% Internal application API
--export([start_link/5]).
+-export([start_link/5,
+ number_of_connections/1]).
%% spawn export
-export([acceptor_init/6, acceptor_loop/6]).
@@ -42,7 +43,7 @@ start_link(Port, Address, SockOpts, Opts, AcceptTimeout) ->
acceptor_init(Parent, Port, Address, SockOpts, Opts, AcceptTimeout) ->
{_, Callback, _} =
proplists:get_value(transport, Opts, {tcp, gen_tcp, tcp_closed}),
- case (catch do_socket_listen(Callback, Port, SockOpts)) of
+ case (catch do_socket_listen(Callback, Port, [{active, false} | SockOpts])) of
{ok, ListenSocket} ->
proc_lib:init_ack(Parent, {ok, self()}),
acceptor_loop(Callback,
@@ -80,15 +81,36 @@ acceptor_loop(Callback, Port, Address, Opts, ListenSocket, AcceptTimeout) ->
ListenSocket, AcceptTimeout)
end.
-handle_connection(_Callback, Address, Port, Options, Socket) ->
+handle_connection(Callback, Address, Port, Options, Socket) ->
SystemSup = ssh_system_sup:system_supervisor(Address, Port),
- {ok, SubSysSup} = ssh_system_sup:start_subsystem(SystemSup, Options),
- ConnectionSup = ssh_subsystem_sup:connection_supervisor(SubSysSup),
- ssh_connection_handler:start_connection(server, Socket,
- [{supervisors, [{system_sup, SystemSup},
- {subsystem_sup, SubSysSup},
- {connection_sup, ConnectionSup}]}
- | Options], infinity).
+ SSHopts = proplists:get_value(ssh_opts, Options, []),
+ MaxSessions = proplists:get_value(max_sessions,SSHopts,infinity),
+ case number_of_connections(SystemSup) < MaxSessions of
+ true ->
+ {ok, SubSysSup} = ssh_system_sup:start_subsystem(SystemSup, Options),
+ ConnectionSup = ssh_subsystem_sup:connection_supervisor(SubSysSup),
+ Timeout = proplists:get_value(negotiation_timeout, SSHopts, 2*60*1000),
+ ssh_connection_handler:start_connection(server, Socket,
+ [{supervisors, [{system_sup, SystemSup},
+ {subsystem_sup, SubSysSup},
+ {connection_sup, ConnectionSup}]}
+ | Options], Timeout);
+ false ->
+ Callback:close(Socket),
+ IPstr = if is_tuple(Address) -> inet:ntoa(Address);
+ true -> Address
+ end,
+ Str = try io_lib:format('~s:~p',[IPstr,Port])
+ catch _:_ -> "port "++integer_to_list(Port)
+ end,
+ error_logger:info_report("Ssh login attempt to "++Str++" denied due to option "
+ "max_sessions limits to "++ io_lib:write(MaxSessions) ++
+ " sessions."
+ ),
+ {error,max_sessions}
+ end.
+
+
handle_error(timeout) ->
ok;
@@ -114,3 +136,11 @@ handle_error(Reason) ->
String = lists:flatten(io_lib:format("Accept error: ~p", [Reason])),
error_logger:error_report(String),
exit({accept_failed, String}).
+
+
+number_of_connections(SystemSup) ->
+ length([X ||
+ {R,X,supervisor,[ssh_subsystem_sup]} <- supervisor:which_children(SystemSup),
+ is_pid(X),
+ is_reference(R)
+ ]).
diff --git a/lib/ssh/src/ssh_acceptor_sup.erl b/lib/ssh/src/ssh_acceptor_sup.erl
index 2be729d305..46fdef07d0 100644
--- a/lib/ssh/src/ssh_acceptor_sup.erl
+++ b/lib/ssh/src/ssh_acceptor_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,7 +26,7 @@
-module(ssh_acceptor_sup).
-behaviour(supervisor).
--export([start_link/1, start_child/2, stop_child/2]).
+-export([start_link/1, start_child/2, stop_child/3]).
%% Supervisor callback
-export([init/1]).
@@ -45,18 +45,17 @@ start_child(AccSup, ServerOpts) ->
{error, already_present} ->
Address = proplists:get_value(address, ServerOpts),
Port = proplists:get_value(port, ServerOpts),
- Name = id(Address, Port),
- supervisor:delete_child(?MODULE, Name),
+ stop_child(AccSup, Address, Port),
supervisor:start_child(AccSup, Spec);
Reply ->
Reply
end.
-stop_child(Address, Port) ->
+stop_child(AccSup, Address, Port) ->
Name = id(Address, Port),
- case supervisor:terminate_child(?MODULE, Name) of
+ case supervisor:terminate_child(AccSup, Name) of
ok ->
- supervisor:delete_child(?MODULE, Name);
+ supervisor:delete_child(AccSup, Name);
Error ->
Error
end.
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 1fa3df847f..9d1ab14ce9 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -83,7 +83,7 @@ password_msg([#ssh{opts = Opts, io_cb = IoCb,
method = "password",
data =
<<?BOOLEAN(?FALSE),
- ?STRING(list_to_binary(Password))>>},
+ ?STRING(unicode:characters_to_binary(Password))>>},
Ssh)
end.
@@ -119,8 +119,7 @@ init_userauth_request_msg(#ssh{opts = Opts} = Ssh) ->
false ->
FirstAlg = proplists:get_value(public_key_alg, Opts, ?PREFERRED_PK_ALG),
SecondAlg = other_alg(FirstAlg),
- AllowUserInt = proplists:get_value(user_interaction, Opts, true),
- Prefs = method_preference(FirstAlg, SecondAlg, AllowUserInt),
+ Prefs = method_preference(FirstAlg, SecondAlg),
ssh_transport:ssh_packet(Msg, Ssh#ssh{user = User,
userauth_preference = Prefs,
userauth_methods = none,
@@ -130,15 +129,13 @@ init_userauth_request_msg(#ssh{opts = Opts} = Ssh) ->
case length(Algs) =:= 2 of
true ->
SecondAlg = other_alg(FirstAlg),
- AllowUserInt = proplists:get_value(user_interaction, Opts, true),
- Prefs = method_preference(FirstAlg, SecondAlg, AllowUserInt),
+ Prefs = method_preference(FirstAlg, SecondAlg),
ssh_transport:ssh_packet(Msg, Ssh#ssh{user = User,
userauth_preference = Prefs,
userauth_methods = none,
service = "ssh-connection"});
_ ->
- AllowUserInt = proplists:get_value(user_interaction, Opts, true),
- Prefs = method_preference(FirstAlg, AllowUserInt),
+ Prefs = method_preference(FirstAlg),
ssh_transport:ssh_packet(Msg, Ssh#ssh{user = User,
userauth_preference = Prefs,
userauth_methods = none,
@@ -187,17 +184,15 @@ handle_userauth_request(#ssh_msg_service_request{name =
handle_userauth_request(#ssh_msg_userauth_request{user = User,
service = "ssh-connection",
method = "password",
- data = Data}, _,
+ data = <<?FALSE, ?UINT32(Sz), BinPwd:Sz/binary>>}, _,
#ssh{opts = Opts} = Ssh) ->
- <<_:8, ?UINT32(Sz), BinPwd:Sz/binary>> = Data,
- Password = binary_to_list(BinPwd),
-
+ Password = unicode:characters_to_list(BinPwd),
case check_password(User, Password, Opts) of
true ->
{authorized, User,
ssh_transport:ssh_packet(#ssh_msg_userauth_success{}, Ssh)};
false ->
- {not_authorized, {User, {passwd, Password}},
+ {not_authorized, {User, {error,"Bad user or password"}},
ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
authentications = "",
partial_success = false}, Ssh)}
@@ -205,6 +200,27 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
handle_userauth_request(#ssh_msg_userauth_request{user = User,
service = "ssh-connection",
+ method = "password",
+ data = <<?TRUE,
+ _/binary
+ %% ?UINT32(Sz1), OldBinPwd:Sz1/binary,
+ %% ?UINT32(Sz2), NewBinPwd:Sz2/binary
+ >>
+ }, _,
+ Ssh) ->
+ %% Password change without us having sent SSH_MSG_USERAUTH_PASSWD_CHANGEREQ (because we never do)
+ %% RFC 4252 says:
+ %% SSH_MSG_USERAUTH_FAILURE without partial success - The password
+ %% has not been changed. Either password changing was not supported,
+ %% or the old password was bad.
+
+ {not_authorized, {User, {error,"Password change not supported"}},
+ ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
+ authentications = "",
+ partial_success = false}, Ssh)};
+
+handle_userauth_request(#ssh_msg_userauth_request{user = User,
+ service = "ssh-connection",
method = "none"}, _,
#ssh{userauth_supported_methods = Methods} = Ssh) ->
{not_authorized, {User, undefined},
@@ -229,7 +245,7 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
ssh_transport:ssh_packet(
#ssh_msg_userauth_success{}, Ssh)};
false ->
- {not_authorized, {User, {error, "Invalid signature"}},
+ {not_authorized, {User, undefined},
ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
authentications="publickey,password",
partial_success = false}, Ssh)}
@@ -243,6 +259,54 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
handle_userauth_request(#ssh_msg_userauth_request{user = User,
service = "ssh-connection",
+ method = "keyboard-interactive",
+ data = _},
+ _, #ssh{opts = Opts} = Ssh) ->
+ %% RFC4256
+ %% The data field contains:
+ %% - language tag (deprecated). If =/=[] SHOULD use it however. We skip
+ %% it for simplicity.
+ %% - submethods. "... the user can give a hint of which actual methods
+ %% he wants to use. ...". It's a "MAY use" so we skip
+ %% it. It also needs an understanding between the client
+ %% and the server.
+ %%
+ %% "The server MUST reply with an SSH_MSG_USERAUTH_SUCCESS,
+ %% SSH_MSG_USERAUTH_FAILURE, or SSH_MSG_USERAUTH_INFO_REQUEST message."
+ Default = {"SSH server",
+ "Enter password for \""++User++"\"",
+ "pwd: ",
+ false},
+
+ {Name, Instruction, Prompt, Echo} =
+ case proplists:get_value(auth_method_kb_interactive_data, Opts) of
+ undefined ->
+ Default;
+ {_,_,_,_}=V ->
+ V;
+ F when is_function(F) ->
+ {_,PeerName} = Ssh#ssh.peer,
+ F(PeerName, User, "ssh-connection")
+ end,
+ EchoEnc = case Echo of
+ true -> <<?TRUE>>;
+ false -> <<?FALSE>>
+ end,
+ Msg = #ssh_msg_userauth_info_request{name = unicode:characters_to_list(Name),
+ instruction = unicode:characters_to_list(Instruction),
+ language_tag = "",
+ num_prompts = 1,
+ data = <<?STRING(unicode:characters_to_binary(Prompt)),
+ EchoEnc/binary
+ >>
+ },
+ {not_authorized, {User, undefined},
+ ssh_transport:ssh_packet(Msg, Ssh#ssh{user = User,
+ opts = [{max_kb_tries,3},{kb_userauth_info_msg,Msg}|Opts]
+ })};
+
+handle_userauth_request(#ssh_msg_userauth_request{user = User,
+ service = "ssh-connection",
method = Other}, _,
#ssh{userauth_supported_methods = Methods} = Ssh) ->
{not_authorized, {User, {authmethod, Other}},
@@ -257,15 +321,44 @@ handle_userauth_info_request(
data = Data}, IoCb,
#ssh{opts = Opts} = Ssh) ->
PromptInfos = decode_keyboard_interactive_prompts(NumPrompts,Data),
- Resps = keyboard_interact_get_responses(IoCb, Opts,
+ Responses = keyboard_interact_get_responses(IoCb, Opts,
Name, Instr, PromptInfos),
- RespBin = list_to_binary(
- lists:map(fun(S) -> <<?STRING(list_to_binary(S))>> end,
- Resps)),
{ok,
ssh_transport:ssh_packet(
#ssh_msg_userauth_info_response{num_responses = NumPrompts,
- data = RespBin}, Ssh)}.
+ data = Responses}, Ssh)}.
+
+handle_userauth_info_response(#ssh_msg_userauth_info_response{num_responses = 1,
+ data = <<?UINT32(Sz), Password:Sz/binary>>},
+ #ssh{opts = Opts0,
+ user = User} = Ssh) ->
+ NumTriesLeft = proplists:get_value(max_kb_tries, Opts0, 0) - 1,
+ Opts = lists:keydelete(max_kb_tries,1,Opts0),
+ case check_password(User, unicode:characters_to_list(Password), Opts) of
+ true ->
+ {authorized, User,
+ ssh_transport:ssh_packet(#ssh_msg_userauth_success{}, Ssh)};
+ false when NumTriesLeft > 0 ->
+ UserAuthInfoMsg =
+ (proplists:get_value(kb_userauth_info_msg,Opts))
+ #ssh_msg_userauth_info_request{name = "",
+ instruction =
+ lists:concat(
+ ["Bad user or password, try again. ",
+ integer_to_list(NumTriesLeft),
+ " tries left."])},
+ {not_authorized, {User, undefined},
+ ssh_transport:ssh_packet(UserAuthInfoMsg,
+ Ssh#ssh{opts = [{max_kb_tries,NumTriesLeft}|Opts]})};
+
+ false ->
+ {not_authorized, {User, {error,"Bad user or password"}},
+ ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
+ authentications = "",
+ partial_success = false},
+ Ssh#ssh{opts = lists:keydelete(kb_userauth_info_msg,1,Opts)}
+ )}
+ end;
handle_userauth_info_response(#ssh_msg_userauth_info_response{},
_Auth) ->
@@ -277,25 +370,16 @@ handle_userauth_info_response(#ssh_msg_userauth_info_response{},
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
-method_preference(Alg1, Alg2, true) ->
+method_preference(Alg1, Alg2) ->
[{"publickey", ?MODULE, publickey_msg, [Alg1]},
{"publickey", ?MODULE, publickey_msg,[Alg2]},
{"password", ?MODULE, password_msg, []},
{"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []}
- ];
-method_preference(Alg1, Alg2, false) ->
- [{"publickey", ?MODULE, publickey_msg, [Alg1]},
- {"publickey", ?MODULE, publickey_msg,[Alg2]},
- {"password", ?MODULE, password_msg, []}
].
-method_preference(Alg1, true) ->
+method_preference(Alg1) ->
[{"publickey", ?MODULE, publickey_msg, [Alg1]},
{"password", ?MODULE, password_msg, []},
{"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []}
- ];
-method_preference(Alg1, false) ->
- [{"publickey", ?MODULE, publickey_msg, [Alg1]},
- {"password", ?MODULE, password_msg, []}
].
user_name(Opts) ->
@@ -352,7 +436,7 @@ verify_sig(SessionId, User, Service, Alg, KeyBlob, SigWLen, Opts) ->
build_sig_data(SessionId, User, Service, KeyBlob, Alg) ->
Sig = [?binary(SessionId),
?SSH_MSG_USERAUTH_REQUEST,
- ?string(User),
+ ?string_utf8(User),
?string(Service),
?binary(<<"publickey">>),
?TRUE,
@@ -363,35 +447,29 @@ build_sig_data(SessionId, User, Service, KeyBlob, Alg) ->
algorithm_string('ssh-rsa') ->
"ssh-rsa";
algorithm_string('ssh-dss') ->
- "ssh-dss".
+ "ssh-dss".
decode_keyboard_interactive_prompts(_NumPrompts, Data) ->
ssh_message:decode_keyboard_interactive_prompts(Data, []).
keyboard_interact_get_responses(IoCb, Opts, Name, Instr, PromptInfos) ->
NumPrompts = length(PromptInfos),
- case proplists:get_value(keyboard_interact_fun, Opts) of
- undefined when NumPrompts == 1 ->
- %% Special case/fallback for just one prompt
- %% (assumed to be the password prompt)
- case proplists:get_value(password, Opts) of
- undefined -> keyboard_interact(IoCb, Name, Instr, PromptInfos, Opts);
- PW -> [PW]
- end;
- undefined ->
- keyboard_interact(IoCb, Name, Instr, PromptInfos, Opts);
- KbdInteractFun ->
- Prompts = lists:map(fun({Prompt, _Echo}) -> Prompt end,
- PromptInfos),
- case KbdInteractFun(Name, Instr, Prompts) of
- Rs when length(Rs) == NumPrompts ->
- Rs;
- Rs ->
- erlang:error({mismatching_number_of_responses,
- {got,Rs},
- {expected,NumPrompts}})
- end
- end.
+ keyboard_interact_get_responses(proplists:get_value(user_interaction, Opts, true),
+ proplists:get_value(keyboard_interact_fun, Opts),
+ proplists:get_value(password, Opts, undefined), IoCb, Name,
+ Instr, PromptInfos, Opts, NumPrompts).
+
+keyboard_interact_get_responses(_, undefined, Password, _, _, _, _, _,
+ 1) when Password =/= undefined ->
+ [Password]; %% Password auth implemented with keyboard-interaction and passwd is known
+keyboard_interact_get_responses(_, _, _, _, _, _, _, _, 0) ->
+ [""];
+keyboard_interact_get_responses(false, undefined, undefined, _, _, _, [Prompt|_], Opts, _) ->
+ ssh_no_io:read_line(Prompt, Opts); %% Throws error as keyboard interaction is not allowed
+keyboard_interact_get_responses(true, undefined, _,IoCb, Name, Instr, PromptInfos, Opts, _) ->
+ keyboard_interact(IoCb, Name, Instr, PromptInfos, Opts);
+keyboard_interact_get_responses(true, Fun, _, Name, Instr, PromptInfos, _, _, NumPrompts) ->
+ keyboard_interact_fun(Fun, Name, Instr, PromptInfos, NumPrompts).
keyboard_interact(IoCb, Name, Instr, Prompts, Opts) ->
if Name /= "" -> IoCb:format("~s", [Name]);
@@ -405,6 +483,21 @@ keyboard_interact(IoCb, Name, Instr, Prompts, Opts) ->
end,
Prompts).
+keyboard_interact_fun(KbdInteractFun, Name, Instr, PromptInfos, NumPrompts) ->
+ Prompts = lists:map(fun({Prompt, _Echo}) -> Prompt end,
+ PromptInfos),
+ case KbdInteractFun(Name, Instr, Prompts) of
+ Rs when length(Rs) == NumPrompts ->
+ Rs;
+ Rs ->
+ throw({mismatching_number_of_responses,
+ {got,Rs},
+ {expected, NumPrompts},
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction failed",
+ language = "en"}})
+ end.
+
other_alg('ssh-rsa') ->
'ssh-dss';
other_alg('ssh-dss') ->
diff --git a/lib/ssh/src/ssh_bits.erl b/lib/ssh/src/ssh_bits.erl
index 2b0241cb83..8aaff93b9f 100644
--- a/lib/ssh/src/ssh_bits.erl
+++ b/lib/ssh/src/ssh_bits.erl
@@ -116,6 +116,10 @@ enc(Xs, [string|Ts], Offset) ->
X0 = hd(Xs),
Y = ?string(X0),
[Y | enc(tl(Xs),Ts,Offset+size(Y))];
+enc(Xs, [string_utf8|Ts], Offset) ->
+ X0 = hd(Xs),
+ Y = ?string_utf8(X0),
+ [Y | enc(tl(Xs),Ts,Offset+size(Y))];
enc(Xs, [binary|Ts], Offset) ->
X0 = hd(Xs),
Y = ?binary(X0),
diff --git a/lib/ssh/src/ssh_channel.erl b/lib/ssh/src/ssh_channel.erl
index 508ae637cf..5c24f362b1 100644
--- a/lib/ssh/src/ssh_channel.erl
+++ b/lib/ssh/src/ssh_channel.erl
@@ -67,7 +67,8 @@
%% Internal application API
-export([cache_create/0, cache_lookup/2, cache_update/2,
cache_delete/1, cache_delete/2, cache_foldl/3,
- cache_find/2]).
+ cache_find/2,
+ get_print_info/1]).
-record(state, {
cm,
@@ -190,6 +191,14 @@ init([Options]) ->
%% {stop, Reason, State}
%% Description: Handling call messages
%%--------------------------------------------------------------------
+handle_call(get_print_info, _From, State) ->
+ Reply =
+ {{State#state.cm,
+ State#state.channel_id},
+ io_lib:format('CB=~p',[State#state.channel_cb])
+ },
+ {reply, Reply, State};
+
handle_call(Request, From, #state{channel_cb = Module,
channel_state = ChannelState} = State) ->
try Module:handle_call(Request, From, ChannelState) of
@@ -333,6 +342,9 @@ cache_find(ChannelPid, Cache) ->
Channel
end.
+get_print_info(Pid) ->
+ call(Pid, get_print_info, 1000).
+
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl
index 2c8e515a14..18841e3d2d 100644
--- a/lib/ssh/src/ssh_cli.erl
+++ b/lib/ssh/src/ssh_cli.erl
@@ -170,10 +170,19 @@ handle_msg({Group, get_unicode_state}, State) ->
{ok, State};
handle_msg({Group, tty_geometry}, #state{group = Group,
- pty = #ssh_pty{width=Width,
- height=Height}
+ pty = Pty
} = State) ->
- Group ! {self(),tty_geometry,{Width,Height}},
+ case Pty of
+ #ssh_pty{width=Width,height=Height} ->
+ Group ! {self(),tty_geometry,{Width,Height}};
+ _ ->
+ %% This is a dirty fix of the problem with the otp ssh:shell
+ %% client. That client will not allocate a tty, but someone
+ %% asks for the tty_geometry just before every erlang prompt.
+ %% If that question is not answered, there is a 2 sec timeout
+ %% Until the prompt is seen by the user at the client side ...
+ Group ! {self(),tty_geometry,{0,0}}
+ end,
{ok,State};
handle_msg({Group, Req}, #state{group = Group, buf = Buf, pty = Pty,
@@ -349,7 +358,7 @@ delete_chars(N, {Buf, BufTail, Col}, Tty) when N > 0 ->
{Buf, NewBufTail, Col}};
delete_chars(N, {Buf, BufTail, Col}, Tty) -> % N < 0
NewBuf = nthtail(-N, Buf),
- NewCol = Col + N,
+ NewCol = case Col + N of V when V >= 0 -> V; _ -> 0 end,
M1 = move_cursor(Col, NewCol, Tty),
M2 = move_cursor(NewCol + length(BufTail) - N, NewCol, Tty),
{[M1, BufTail, lists:duplicate(-N, $ ) | M2],
@@ -448,17 +457,17 @@ bin_to_list(I) when is_integer(I) ->
start_shell(ConnectionHandler, State) ->
Shell = State#state.shell,
- ConnectionInfo = ssh_connection_handler:info(ConnectionHandler,
+ ConnectionInfo = ssh_connection_handler:connection_info(ConnectionHandler,
[peer, user]),
ShellFun = case is_function(Shell) of
true ->
- {ok, User} =
+ User =
proplists:get_value(user, ConnectionInfo),
case erlang:fun_info(Shell, arity) of
{arity, 1} ->
fun() -> Shell(User) end;
{arity, 2} ->
- [{_, PeerAddr}] =
+ {_, PeerAddr} =
proplists:get_value(peer, ConnectionInfo),
fun() -> Shell(User, PeerAddr) end;
_ ->
@@ -476,9 +485,9 @@ start_shell(_ConnectionHandler, Cmd, #state{exec={M, F, A}} = State) ->
State#state{group = Group, buf = empty_buf()};
start_shell(ConnectionHandler, Cmd, #state{exec=Shell} = State) when is_function(Shell) ->
- ConnectionInfo = ssh_connection_handler:info(ConnectionHandler,
+ ConnectionInfo = ssh_connection_handler:connection_info(ConnectionHandler,
[peer, user]),
- {ok, User} =
+ User =
proplists:get_value(user, ConnectionInfo),
ShellFun =
case erlang:fun_info(Shell, arity) of
@@ -487,7 +496,7 @@ start_shell(ConnectionHandler, Cmd, #state{exec=Shell} = State) when is_function
{arity, 2} ->
fun() -> Shell(Cmd, User) end;
{arity, 3} ->
- [{_, PeerAddr}] =
+ {_, PeerAddr} =
proplists:get_value(peer, ConnectionInfo),
fun() -> Shell(Cmd, User, PeerAddr) end;
_ ->
diff --git a/lib/ssh/src/ssh_connect.hrl b/lib/ssh/src/ssh_connect.hrl
index 8421b07167..d14f7ce27d 100644
--- a/lib/ssh/src/ssh_connect.hrl
+++ b/lib/ssh/src/ssh_connect.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,6 +26,7 @@
-define(DEFAULT_PACKET_SIZE, 32768).
-define(DEFAULT_WINDOW_SIZE, 2*?DEFAULT_PACKET_SIZE).
-define(DEFAULT_TIMEOUT, 5000).
+-define(MAX_PROTO_VERSION, 255).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
@@ -164,6 +165,10 @@
recipient_channel
}).
+-define(TERMINAL_WIDTH, 80).
+-define(TERMINAL_HEIGHT, 24).
+-define(DEFAULT_TERMINAL, "vt100").
+
-define(TTY_OP_END,0). %% Indicates end of options.
-define(VINTR,1). %% Interrupt character; 255 if none. Similarly for the
%% other characters. Not all of these characters are
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index 03dddae3c8..654b9d4bde 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,11 +32,11 @@
%% API
-export([session_channel/2, session_channel/4,
exec/4, shell/2, subsystem/4, send/3, send/4, send/5,
- send_eof/2, adjust_window/3, setenv/5, close/2, reply_request/4]).
+ send_eof/2, adjust_window/3, setenv/5, close/2, reply_request/4,
+ ptty_alloc/3, ptty_alloc/4]).
%% Potential API currently unsupported and not tested
--export([open_pty/3, open_pty/7,
- open_pty/9, window_change/4, window_change/6,
+-export([window_change/4, window_change/6,
direct_tcpip/6, direct_tcpip/8, tcpip_forward/3,
cancel_tcpip_forward/3, signal/3, exit_status/3]).
@@ -56,8 +56,8 @@
%%--------------------------------------------------------------------
%%--------------------------------------------------------------------
--spec session_channel(pid(), timeout()) -> {ok, channel_id()} | {error, term()}.
--spec session_channel(pid(), integer(), integer(), timeout()) -> {ok, channel_id()} | {error, term()}.
+-spec session_channel(pid(), timeout()) -> {ok, channel_id()} | {error, timeout | closed}.
+-spec session_channel(pid(), integer(), integer(), timeout()) -> {ok, channel_id()} | {error, timeout | closed}.
%% Description: Opens a channel for a ssh session. A session is a
%% remote execution of a program. The program may be a shell, an
@@ -81,7 +81,8 @@ session_channel(ConnectionHandler, InitialWindowSize,
end.
%%--------------------------------------------------------------------
--spec exec(pid(), channel_id(), string(), timeout()) -> success | failure.
+-spec exec(pid(), channel_id(), string(), timeout()) ->
+ success | failure | {error, timeout | closed}.
%% Description: Will request that the server start the
%% execution of the given command.
@@ -101,8 +102,8 @@ shell(ConnectionHandler, ChannelId) ->
ssh_connection_handler:request(ConnectionHandler, self(), ChannelId,
"shell", false, <<>>, 0).
%%--------------------------------------------------------------------
--spec subsystem(pid(), channel_id(), string(), timeout()) ->
- success | failure | {error, timeout}.
+-spec subsystem(pid(), channel_id(), string(), timeout()) ->
+ success | failure | {error, timeout | closed}.
%%
%% Description: Executes a predefined subsystem.
%%--------------------------------------------------------------------
@@ -142,7 +143,7 @@ send_eof(ConnectionHandler, Channel) ->
ssh_connection_handler:send_eof(ConnectionHandler, Channel).
%%--------------------------------------------------------------------
--spec adjust_window(pid(), channel_id(), integer()) -> ok.
+-spec adjust_window(pid(), channel_id(), integer()) -> ok | {error, closed}.
%%
%%
%% Description: Adjusts the ssh flowcontrol window.
@@ -151,7 +152,8 @@ adjust_window(ConnectionHandler, Channel, Bytes) ->
ssh_connection_handler:adjust_window(ConnectionHandler, Channel, Bytes).
%%--------------------------------------------------------------------
--spec setenv(pid(), channel_id(), string(), string(), timeout()) -> success | failure.
+-spec setenv(pid(), channel_id(), string(), string(), timeout()) ->
+ success | failure | {error, timeout | closed}.
%%
%%
%% Description: Environment variables may be passed to the shell/command to be
@@ -183,6 +185,29 @@ reply_request(_,false, _, _) ->
ok.
%%--------------------------------------------------------------------
+-spec ptty_alloc(pid(), channel_id(), proplists:proplist()) ->
+ success | failiure | {error, closed}.
+-spec ptty_alloc(pid(), channel_id(), proplists:proplist(), timeout()) ->
+ success | failiure | {error, timeout} | {error, closed}.
+
+%%
+%%
+%% Description: Sends a ssh connection protocol pty_req.
+%%--------------------------------------------------------------------
+ptty_alloc(ConnectionHandler, Channel, Options) ->
+ ptty_alloc(ConnectionHandler, Channel, Options, infinity).
+ptty_alloc(ConnectionHandler, Channel, Options, TimeOut) ->
+ {Width, PixWidth} = pty_default_dimensions(width, Options),
+ {Hight, PixHight} = pty_default_dimensions(hight, Options),
+ pty_req(ConnectionHandler, Channel,
+ proplists:get_value(term, Options, default_term()),
+ proplists:get_value(width, Options, Width),
+ proplists:get_value(hight, Options, Hight),
+ proplists:get_value(pixel_widh, Options, PixWidth),
+ proplists:get_value(pixel_hight, Options, PixHight),
+ proplists:get_value(pty_opts, Options, []), TimeOut
+ ).
+%%--------------------------------------------------------------------
%% Not yet officialy supported! The following functions are part of the
%% initial contributed ssh application. They are untested. Do we want them?
%% Should they be documented and tested?
@@ -205,23 +230,6 @@ exit_status(ConnectionHandler, Channel, Status) ->
ssh_connection_handler:request(ConnectionHandler, Channel,
"exit-status", false, [?uint32(Status)], 0).
-open_pty(ConnectionHandler, Channel, TimeOut) ->
- open_pty(ConnectionHandler, Channel,
- os:getenv("TERM"), 80, 24, [], TimeOut).
-
-open_pty(ConnectionHandler, Channel, Term, Width, Height, PtyOpts, TimeOut) ->
- open_pty(ConnectionHandler, Channel, Term, Width,
- Height, 0, 0, PtyOpts, TimeOut).
-
-open_pty(ConnectionHandler, Channel, Term, Width, Height,
- PixWidth, PixHeight, PtyOpts, TimeOut) ->
- ssh_connection_handler:request(ConnectionHandler,
- Channel, "pty-req", true,
- [?string(Term),
- ?uint32(Width), ?uint32(Height),
- ?uint32(PixWidth),?uint32(PixHeight),
- encode_pty_opts(PtyOpts)], TimeOut).
-
direct_tcpip(ConnectionHandler, RemoteHost,
RemotePort, OrigIP, OrigPort, Timeout) ->
direct_tcpip(ConnectionHandler, RemoteHost, RemotePort, OrigIP, OrigPort,
@@ -271,10 +279,36 @@ cancel_tcpip_forward(ConnectionHandler, BindIP, Port) ->
%%--------------------------------------------------------------------
%%% Internal API
%%--------------------------------------------------------------------
+l2b(L) when is_integer(hd(L)) ->
+ try list_to_binary(L)
+ of
+ B -> B
+ catch
+ _:_ ->
+ unicode:characters_to_binary(L)
+ end;
+l2b([H|T]) ->
+ << (l2b(H))/binary, (l2b(T))/binary >>;
+l2b(B) when is_binary(B) ->
+ B;
+l2b([]) ->
+ <<>>.
+
+
+
channel_data(ChannelId, DataType, Data, Connection, From)
when is_list(Data)->
channel_data(ChannelId, DataType,
- list_to_binary(Data), Connection, From);
+%% list_to_binary(Data), Connection, From);
+ l2b(Data), Connection, From);
+ %% try list_to_binary(Data)
+ %% of
+ %% B -> B
+ %% catch
+ %% _:_ -> io:format('BAD BINARY: ~p~n',[Data]),
+ %% unicode:characters_to_binary(Data)
+ %% end,
+ %% Connection, From);
channel_data(ChannelId, DataType, Data,
#connection{channel_cache = Cache} = Connection,
@@ -292,9 +326,7 @@ channel_data(ChannelId, DataType, Data,
SendDataType,
SendData)}
end, SendList),
- FlowCtrlMsgs = flow_control(Replies,
- Channel,
- Cache),
+ FlowCtrlMsgs = flow_control(Replies, Channel, Cache),
{{replies, Replies ++ FlowCtrlMsgs}, Connection};
_ ->
gen_fsm:reply(From, {error, closed}),
@@ -436,18 +468,31 @@ handle_msg(#ssh_msg_channel_window_adjust{recipient_channel = ChannelId,
handle_msg(#ssh_msg_channel_open{channel_type = "session" = Type,
sender_channel = RemoteId,
initial_window_size = WindowSz,
- maximum_packet_size = PacketSz}, Connection0, server) ->
-
- try setup_session(Connection0, RemoteId,
- Type, WindowSz, PacketSz) of
- Result ->
- Result
- catch _:_ ->
+ maximum_packet_size = PacketSz},
+ #connection{options = SSHopts} = Connection0,
+ server) ->
+ MinAcceptedPackSz = proplists:get_value(minimal_remote_max_packet_size, SSHopts, 0),
+
+ if
+ MinAcceptedPackSz =< PacketSz ->
+ try setup_session(Connection0, RemoteId,
+ Type, WindowSz, PacketSz) of
+ Result ->
+ Result
+ catch _:_ ->
+ FailMsg = channel_open_failure_msg(RemoteId,
+ ?SSH_OPEN_CONNECT_FAILED,
+ "Connection refused", "en"),
+ {{replies, [{connection_reply, FailMsg}]},
+ Connection0}
+ end;
+
+ MinAcceptedPackSz > PacketSz ->
FailMsg = channel_open_failure_msg(RemoteId,
- ?SSH_OPEN_CONNECT_FAILED,
- "Connection refused", "en"),
- {{replies, [{connection_reply, FailMsg}]},
- Connection0}
+ ?SSH_OPEN_ADMINISTRATIVELY_PROHIBITED,
+ lists:concat(["Maximum packet size below ",MinAcceptedPackSz,
+ " not supported"]), "en"),
+ {{replies, [{connection_reply, FailMsg}]}, Connection0}
end;
handle_msg(#ssh_msg_channel_open{channel_type = "session",
@@ -467,41 +512,57 @@ handle_msg(#ssh_msg_channel_open{channel_type = "forwarded-tcpip" = Type,
initial_window_size = RWindowSz,
maximum_packet_size = RPacketSz,
data = Data},
- #connection{channel_cache = Cache} = Connection0, server) ->
+ #connection{channel_cache = Cache,
+ options = SSHopts} = Connection0, server) ->
<<?UINT32(ALen), Address:ALen/binary, ?UINT32(Port),
?UINT32(OLen), Orig:OLen/binary, ?UINT32(OrigPort)>> = Data,
- case bound_channel(Address, Port, Connection0) of
- undefined ->
+ MinAcceptedPackSz = proplists:get_value(minimal_remote_max_packet_size, SSHopts, 0),
+
+ if
+ MinAcceptedPackSz =< RPacketSz ->
+ case bound_channel(Address, Port, Connection0) of
+ undefined ->
+ FailMsg = channel_open_failure_msg(RemoteId,
+ ?SSH_OPEN_CONNECT_FAILED,
+ "Connection refused", "en"),
+ {{replies,
+ [{connection_reply, FailMsg}]}, Connection0};
+ ChannelPid ->
+ {ChannelId, Connection1} = new_channel_id(Connection0),
+ LWindowSz = ?DEFAULT_WINDOW_SIZE,
+ LPacketSz = ?DEFAULT_PACKET_SIZE,
+ Channel = #channel{type = Type,
+ sys = "none",
+ user = ChannelPid,
+ local_id = ChannelId,
+ recv_window_size = LWindowSz,
+ recv_packet_size = LPacketSz,
+ send_window_size = RWindowSz,
+ send_packet_size = RPacketSz,
+ send_buf = queue:new()
+ },
+ ssh_channel:cache_update(Cache, Channel),
+ OpenConfMsg = channel_open_confirmation_msg(RemoteId, ChannelId,
+ LWindowSz, LPacketSz),
+ {OpenMsg, Connection} =
+ reply_msg(Channel, Connection1,
+ {open, Channel, {forwarded_tcpip,
+ decode_ip(Address), Port,
+ decode_ip(Orig), OrigPort}}),
+ {{replies, [{connection_reply, OpenConfMsg},
+ OpenMsg]}, Connection}
+ end;
+
+ MinAcceptedPackSz > RPacketSz ->
FailMsg = channel_open_failure_msg(RemoteId,
- ?SSH_OPEN_CONNECT_FAILED,
- "Connection refused", "en"),
- {{replies,
- [{connection_reply, FailMsg}]}, Connection0};
- ChannelPid ->
- {ChannelId, Connection1} = new_channel_id(Connection0),
- LWindowSz = ?DEFAULT_WINDOW_SIZE,
- LPacketSz = ?DEFAULT_PACKET_SIZE,
- Channel = #channel{type = Type,
- sys = "none",
- user = ChannelPid,
- local_id = ChannelId,
- recv_window_size = LWindowSz,
- recv_packet_size = LPacketSz,
- send_window_size = RWindowSz,
- send_packet_size = RPacketSz},
- ssh_channel:cache_update(Cache, Channel),
- OpenConfMsg = channel_open_confirmation_msg(RemoteId, ChannelId,
- LWindowSz, LPacketSz),
- {OpenMsg, Connection} =
- reply_msg(Channel, Connection1,
- {open, Channel, {forwarded_tcpip,
- decode_ip(Address), Port,
- decode_ip(Orig), OrigPort}}),
- {{replies, [{connection_reply, OpenConfMsg},
- OpenMsg]}, Connection}
+ ?SSH_OPEN_ADMINISTRATIVELY_PROHIBITED,
+ lists:concat(["Maximum packet size below ",MinAcceptedPackSz,
+ " not supported"]), "en"),
+ {{replies, [{connection_reply, FailMsg}]}, Connection0}
end;
+
handle_msg(#ssh_msg_channel_open{channel_type = "forwarded-tcpip",
sender_channel = RemoteId},
Connection, client) ->
@@ -756,9 +817,8 @@ handle_cli_msg(#connection{channel_cache = Cache} = Connection,
erlang:monitor(process, Pid),
Channel = Channel0#channel{user = Pid},
ssh_channel:cache_update(Cache, Channel),
- Reply = {connection_reply,
- channel_success_msg(RemoteId)},
- {{replies, [{channel_data, Pid, Reply0}, Reply]}, Connection};
+ {Reply, Connection1} = reply_msg(Channel, Connection, Reply0),
+ {{replies, [Reply]}, Connection1};
_Other ->
Reply = {connection_reply,
channel_failure_msg(RemoteId)},
@@ -884,7 +944,8 @@ start_channel(Cb, Id, Args, SubSysSup, Exec) ->
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
-setup_session(#connection{channel_cache = Cache} = Connection0,
+setup_session(#connection{channel_cache = Cache
+ } = Connection0,
RemoteId,
Type, WindowSize, PacketSize) ->
{ChannelId, Connection} = new_channel_id(Connection0),
@@ -896,6 +957,7 @@ setup_session(#connection{channel_cache = Cache} = Connection0,
recv_packet_size = ?DEFAULT_PACKET_SIZE,
send_window_size = WindowSize,
send_packet_size = PacketSize,
+ send_buf = queue:new(),
remote_id = RemoteId
},
ssh_channel:cache_update(Cache, Channel),
@@ -991,64 +1053,96 @@ request_reply_or_data(#channel{local_id = ChannelId, user = ChannelPid},
update_send_window(Channel, _, undefined,
#connection{channel_cache = Cache}) ->
- do_update_send_window(Channel, Channel#channel.send_buf, Cache);
+ do_update_send_window(Channel, Cache);
-update_send_window(Channel, DataType, Data,
+update_send_window(#channel{send_buf = SendBuffer} = Channel, DataType, Data,
#connection{channel_cache = Cache}) ->
- do_update_send_window(Channel, Channel#channel.send_buf ++ [{DataType, Data}], Cache).
-
-do_update_send_window(Channel0, Buf0, Cache) ->
- {Buf1, NewSz, Buf2} = get_window(Buf0,
- Channel0#channel.send_packet_size,
- Channel0#channel.send_window_size),
+ do_update_send_window(Channel#channel{send_buf = queue:in({DataType, Data}, SendBuffer)},
+ Cache).
- Channel = Channel0#channel{send_window_size = NewSz, send_buf = Buf2},
+do_update_send_window(Channel0, Cache) ->
+ {SendMsgs, Channel} = get_window(Channel0, []),
ssh_channel:cache_update(Cache, Channel),
- {Buf1, Channel}.
-
-get_window(Bs, PSz, WSz) ->
- get_window(Bs, PSz, WSz, []).
-
-get_window(Bs, _PSz, 0, Acc) ->
- {lists:reverse(Acc), 0, Bs};
-get_window([B0 = {DataType, Bin} | Bs], PSz, WSz, Acc) ->
- BSz = size(Bin),
- if BSz =< WSz -> %% will fit into window
- if BSz =< PSz -> %% will fit into a packet
- get_window(Bs, PSz, WSz-BSz, [B0|Acc]);
- true -> %% split into packet size
- <<Bin1:PSz/binary, Bin2/binary>> = Bin,
- get_window([setelement(2, B0, Bin2) | Bs],
- PSz, WSz-PSz,
- [{DataType, Bin1}|Acc])
+ {SendMsgs, Channel}.
+
+get_window(#channel{send_window_size = 0
+ } = Channel, Acc) ->
+ {lists:reverse(Acc), Channel};
+get_window(#channel{send_packet_size = 0
+ } = Channel, Acc) ->
+ {lists:reverse(Acc), Channel};
+get_window(#channel{send_buf = Buffer,
+ send_packet_size = PacketSize,
+ send_window_size = WindowSize0
+ } = Channel, Acc0) ->
+ case queue:out(Buffer) of
+ {{value, {_, Data} = Msg}, NewBuffer} ->
+ case handle_send_window(Msg, size(Data), PacketSize, WindowSize0, Acc0) of
+ {WindowSize, Acc, {_, <<>>}} ->
+ {lists:reverse(Acc), Channel#channel{send_window_size = WindowSize,
+ send_buf = NewBuffer}};
+ {WindowSize, Acc, Rest} ->
+ get_window(Channel#channel{send_window_size = WindowSize,
+ send_buf = queue:in_r(Rest, NewBuffer)}, Acc)
end;
- WSz =< PSz -> %% use rest of window
- <<Bin1:WSz/binary, Bin2/binary>> = Bin,
- get_window([setelement(2, B0, Bin2) | Bs],
- PSz, WSz-WSz,
- [{DataType, Bin1}|Acc]);
- true -> %% use packet size
- <<Bin1:PSz/binary, Bin2/binary>> = Bin,
- get_window([setelement(2, B0, Bin2) | Bs],
- PSz, WSz-PSz,
- [{DataType, Bin1}|Acc])
+ {empty, NewBuffer} ->
+ {[], Channel#channel{send_buf = NewBuffer}}
+ end.
+
+handle_send_window(Msg = {Type, Data}, Size, PacketSize, WindowSize, Acc) when Size =< WindowSize ->
+ case Size =< PacketSize of
+ true ->
+ {WindowSize - Size, [Msg | Acc], {Type, <<>>}};
+ false ->
+ <<Msg1:PacketSize/binary, Msg2/binary>> = Data,
+ {WindowSize - PacketSize, [{Type, Msg1} | Acc], {Type, Msg2}}
end;
-get_window([], _PSz, WSz, Acc) ->
- {lists:reverse(Acc), WSz, []}.
+handle_send_window({Type, Data}, _, PacketSize, WindowSize, Acc) when WindowSize =< PacketSize ->
+ <<Msg1:WindowSize/binary, Msg2/binary>> = Data,
+ {WindowSize - WindowSize, [{Type, Msg1} | Acc], {Type, Msg2}};
+handle_send_window({Type, Data}, _, PacketSize, WindowSize, Acc) ->
+ <<Msg1:PacketSize/binary, Msg2/binary>> = Data,
+ {WindowSize - PacketSize, [{Type, Msg1} | Acc], {Type, Msg2}}.
flow_control(Channel, Cache) ->
flow_control([window_adjusted], Channel, Cache).
-
+
flow_control([], Channel, Cache) ->
ssh_channel:cache_update(Cache, Channel),
[];
-
flow_control([_|_], #channel{flow_control = From,
- send_buf = []} = Channel, Cache) when From =/= undefined ->
- [{flow_control, Cache, Channel, From, ok}];
+ send_buf = Buffer} = Channel, Cache) when From =/= undefined ->
+ case queue:is_empty(Buffer) of
+ true ->
+ ssh_channel:cache_update(Cache, Channel#channel{flow_control = undefined}),
+ [{flow_control, Cache, Channel, From, ok}];
+ false ->
+ []
+ end;
flow_control(_,_,_) ->
- [].
+ [].
+
+pty_req(ConnectionHandler, Channel, Term, Width, Height,
+ PixWidth, PixHeight, PtyOpts, TimeOut) ->
+ ssh_connection_handler:request(ConnectionHandler,
+ Channel, "pty-req", true,
+ [?string(Term),
+ ?uint32(Width), ?uint32(Height),
+ ?uint32(PixWidth),?uint32(PixHeight),
+ encode_pty_opts(PtyOpts)], TimeOut).
+pty_default_dimensions(Dimension, Options) ->
+ case proplists:get_value(Dimension, Options, 0) of
+ N when is_integer(N), N > 0 ->
+ {N, 0};
+ _ ->
+ case proplists:get_value(list_to_atom("pixel_" ++ atom_to_list(Dimension)), Options, 0) of
+ N when is_integer(N), N > 0 ->
+ {0, N};
+ _ ->
+ {?TERMINAL_WIDTH, 0}
+ end
+ end.
encode_pty_opts(Opts) ->
Bin = list_to_binary(encode_pty_opts2(Opts)),
@@ -1246,3 +1340,10 @@ decode_ip(Addr) when is_binary(Addr) ->
{ok,A} -> A
end.
+default_term() ->
+ case os:getenv("TERM") of
+ false ->
+ ?DEFAULT_TERMINAL;
+ Str when is_list(Str)->
+ Str
+ end.
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 3462b98172..f751094211 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,14 +41,16 @@
global_request/4, send/5, send_eof/2, info/1, info/2,
connection_info/2, channel_info/3,
adjust_window/3, close/2, stop/1, renegotiate/1, renegotiate_data/1,
- start_connection/4]).
+ start_connection/4,
+ get_print_info/1]).
%% gen_fsm callbacks
-export([hello/2, kexinit/2, key_exchange/2, new_keys/2,
- userauth/2, connected/2]).
+ userauth/2, connected/2,
+ error/2]).
-export([init/1, handle_event/3,
- handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
+ handle_sync_event/4, handle_info/3, terminate/3, format_status/2, code_change/4]).
-record(state, {
role,
@@ -71,7 +73,8 @@
connection_queue,
address,
port,
- opts
+ opts,
+ recbuf
}).
-type state_name() :: hello | kexinit | key_exchange | new_keys | userauth | connection.
@@ -103,15 +106,23 @@ start_connection(client = Role, Socket, Options, Timeout) ->
end;
start_connection(server = Role, Socket, Options, Timeout) ->
+ SSH_Opts = proplists:get_value(ssh_opts, Options, []),
try
- Sups = proplists:get_value(supervisors, Options),
- ConnectionSup = proplists:get_value(connection_sup, Sups),
- Opts = [{supervisors, Sups}, {user_pid, self()} | proplists:get_value(ssh_opts, Options, [])],
- {ok, Pid} = ssh_connection_sup:start_child(ConnectionSup, [Role, Socket, Opts]),
- {_, Callback, _} = proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
- socket_control(Socket, Pid, Callback),
- Ref = erlang:monitor(process, Pid),
- handshake(Pid, Ref, Timeout)
+ case proplists:get_value(parallel_login, SSH_Opts, false) of
+ true ->
+ HandshakerPid =
+ spawn_link(fun() ->
+ receive
+ {do_handshake, Pid} ->
+ handshake(Pid, erlang:monitor(process,Pid), Timeout)
+ end
+ end),
+ ChildPid = start_the_connection_child(HandshakerPid, Role, Socket, Options),
+ HandshakerPid ! {do_handshake, ChildPid};
+ false ->
+ ChildPid = start_the_connection_child(self(), Role, Socket, Options),
+ handshake(ChildPid, erlang:monitor(process,ChildPid), Timeout)
+ end
catch
exit:{noproc, _} ->
{error, ssh_not_started};
@@ -119,6 +130,16 @@ start_connection(server = Role, Socket, Options, Timeout) ->
{error, Error}
end.
+start_the_connection_child(UserPid, Role, Socket, Options) ->
+ Sups = proplists:get_value(supervisors, Options),
+ ConnectionSup = proplists:get_value(connection_sup, Sups),
+ Opts = [{supervisors, Sups}, {user_pid, UserPid} | proplists:get_value(ssh_opts, Options, [])],
+ {ok, Pid} = ssh_connection_sup:start_child(ConnectionSup, [Role, Socket, Opts]),
+ {_, Callback, _} = proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
+ socket_control(Socket, Pid, Callback),
+ Pid.
+
+
start_link(Role, Socket, Options) ->
{ok, proc_lib:spawn_link(?MODULE, init, [[Role, Socket, Options]])}.
@@ -152,12 +173,26 @@ init([Role, Socket, SshOpts]) ->
State#state{ssh_params = Ssh})
catch
_:Error ->
- gen_fsm:enter_loop(?MODULE, [], error, {Error, State0})
+ gen_fsm:enter_loop(?MODULE, [], error, {Error, State})
end.
+%% Temporary fix for the Nessus error. SYN-> <-SYNACK ACK-> RST-> ?
+error(_Event, {Error,State=#state{}}) ->
+ case Error of
+ {badmatch,{error,enotconn}} ->
+ %% {error,enotconn} probably from inet:peername in
+ %% init_ssh(server,..)/5 called from init/1
+ {stop, {shutdown,"TCP connenction to server was prematurely closed by the client"}, State};
+ _ ->
+ {stop, {shutdown,{init,Error}}, State}
+ end;
+error(Event, State) ->
+ %% State deliberately not checked beeing #state. This is a panic-clause...
+ {stop, {shutdown,{init,{spurious_error,Event}}}, State}.
+
%%--------------------------------------------------------------------
-spec open_channel(pid(), string(), iodata(), integer(), integer(),
- timeout()) -> {open, channel_id()} | {open_error, term(), string(), string()}.
+ timeout()) -> {open, channel_id()} | {error, term()}.
%%--------------------------------------------------------------------
open_channel(ConnectionHandler, ChannelType, ChannelSpecificData,
InitialWindowSize,
@@ -206,7 +241,7 @@ global_request(ConnectionHandler, Type, false = Reply, Data) ->
send_all_state_event(ConnectionHandler, {global_request, self(), Type, Reply, Data}).
%%--------------------------------------------------------------------
--spec send(pid(), channel_id(), integer(), iolist(), timeout()) ->
+-spec send(pid(), channel_id(), integer(), iodata(), timeout()) ->
ok | {error, timeout} | {error, closed}.
%%--------------------------------------------------------------------
send(ConnectionHandler, ChannelId, Type, Data, Timeout) ->
@@ -221,6 +256,9 @@ send_eof(ConnectionHandler, ChannelId) ->
%%--------------------------------------------------------------------
-spec connection_info(pid(), [atom()]) -> proplists:proplist().
%%--------------------------------------------------------------------
+get_print_info(ConnectionHandler) ->
+ sync_send_all_state_event(ConnectionHandler, get_print_info, 1000).
+
connection_info(ConnectionHandler, Options) ->
sync_send_all_state_event(ConnectionHandler, {connection_info, Options}).
@@ -251,8 +289,13 @@ renegotiate_data(ConnectionHandler) ->
-spec close(pid(), channel_id()) -> ok.
%%--------------------------------------------------------------------
close(ConnectionHandler, ChannelId) ->
- sync_send_all_state_event(ConnectionHandler, {close, ChannelId}).
-
+ case sync_send_all_state_event(ConnectionHandler, {close, ChannelId}) of
+ ok ->
+ ok;
+ {error, closed} ->
+ ok
+ end.
+
%%--------------------------------------------------------------------
-spec stop(pid()) -> ok | {error, term()}.
%%--------------------------------------------------------------------
@@ -283,28 +326,42 @@ info(ConnectionHandler, ChannelProcess) ->
hello(socket_control, #state{socket = Socket, ssh_params = Ssh} = State) ->
VsnMsg = ssh_transport:hello_version_msg(string_version(Ssh)),
send_msg(VsnMsg, State),
- inet:setopts(Socket, [{packet, line}, {active, once}]),
- {next_state, hello, State};
+ case getopt(recbuf, Socket) of
+ {ok, Size} ->
+ inet:setopts(Socket, [{packet, line}, {active, once}, {recbuf, ?MAX_PROTO_VERSION}]),
+ {next_state, hello, State#state{recbuf = Size}};
+ {error, Reason} ->
+ {stop, {shutdown, Reason}, State}
+ end;
-hello({info_line, _Line},#state{socket = Socket} = State) ->
+hello({info_line, _Line},#state{role = client, socket = Socket} = State) ->
+ %% The server may send info lines before the version_exchange
inet:setopts(Socket, [{active, once}]),
{next_state, hello, State};
+hello({info_line, _Line},#state{role = server,
+ socket = Socket,
+ transport_cb = Transport } = State) ->
+ %% as openssh
+ Transport:send(Socket, "Protocol mismatch."),
+ {stop, {shutdown,"Protocol mismatch in version exchange."}, State};
+
hello({version_exchange, Version}, #state{ssh_params = Ssh0,
- socket = Socket} = State) ->
+ socket = Socket,
+ recbuf = Size} = State) ->
{NumVsn, StrVsn} = ssh_transport:handle_hello_version(Version),
case handle_version(NumVsn, StrVsn, Ssh0) of
{ok, Ssh1} ->
- inet:setopts(Socket, [{packet,0}, {mode,binary}, {active, once}]),
+ inet:setopts(Socket, [{packet,0}, {mode,binary}, {active, once}, {recbuf, Size}]),
{KeyInitMsg, SshPacket, Ssh} = ssh_transport:key_exchange_init_msg(Ssh1),
send_msg(SshPacket, State),
{next_state, kexinit, next_packet(State#state{ssh_params = Ssh,
key_exchange_init_msg =
KeyInitMsg})};
not_supported ->
- DisconnectMsg =
+ DisconnectMsg =
#ssh_msg_disconnect{code =
- ?SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED,
+ ?SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED,
description = "Protocol version " ++ StrVsn
++ " not supported",
language = "en"},
@@ -442,10 +499,21 @@ userauth(#ssh_msg_userauth_info_request{} = Msg,
{next_state, userauth, next_packet(State#state{ssh_params = Ssh})};
userauth(#ssh_msg_userauth_info_response{} = Msg,
- #state{ssh_params = #ssh{role = server} = Ssh0} = State) ->
- {ok, {Reply, Ssh}} = ssh_auth:handle_userauth_info_response(Msg, Ssh0),
- send_msg(Reply, State),
- {next_state, userauth, next_packet(State#state{ssh_params = Ssh})};
+ #state{ssh_params = #ssh{role = server,
+ peer = {_, Address}} = Ssh0,
+ opts = Opts, starter = Pid} = State) ->
+ case ssh_auth:handle_userauth_info_response(Msg, Ssh0) of
+ {authorized, User, {Reply, Ssh}} ->
+ send_msg(Reply, State),
+ Pid ! ssh_connected,
+ connected_fun(User, Address, "keyboard-interactive", Opts),
+ {next_state, connected,
+ next_packet(State#state{auth_user = User, ssh_params = Ssh})};
+ {not_authorized, {User, Reason}, {Reply, Ssh}} ->
+ retry_fun(User, Address, Reason, Opts),
+ send_msg(Reply, State),
+ {next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
+ end;
userauth(#ssh_msg_userauth_success{}, #state{ssh_params = #ssh{role = client} = Ssh,
starter = Pid} = State) ->
@@ -520,18 +588,18 @@ connected({#ssh_msg_kexinit{}, _Payload} = Event, State) ->
%%--------------------------------------------------------------------
handle_event(#ssh_msg_disconnect{description = Desc} = DisconnectMsg, _StateName, #state{} = State) ->
- handle_disconnect(DisconnectMsg, State),
+ handle_disconnect(peer, DisconnectMsg, State),
{stop, {shutdown, Desc}, State};
handle_event(#ssh_msg_ignore{}, StateName, State) ->
{next_state, StateName, next_packet(State)};
-handle_event(#ssh_msg_debug{always_display = true, message = DbgMsg},
- StateName, State) ->
- io:format("DEBUG: ~p\n", [DbgMsg]),
- {next_state, StateName, next_packet(State)};
-
-handle_event(#ssh_msg_debug{}, StateName, State) ->
+handle_event(#ssh_msg_debug{always_display = Display, message = DbgMsg, language=Lang},
+ StateName, #state{opts = Opts} = State) ->
+ F = proplists:get_value(ssh_msg_debug_fun, Opts,
+ fun(_ConnRef, _AlwaysDisplay, _Msg, _Language) -> ok end
+ ),
+ catch F(self(), Display, DbgMsg, Lang),
{next_state, StateName, next_packet(State)};
handle_event(#ssh_msg_unimplemented{}, StateName, State) ->
@@ -575,7 +643,7 @@ handle_event(renegotiate, connected, #state{ssh_params = Ssh0}
renegotiate = true})};
handle_event(renegotiate, StateName, State) ->
- timer:apply_after(?REKEY_TIMOUT, gen_fsm, send_all_state_event, [self(), renegotiatie]),
+ timer:apply_after(?REKEY_TIMOUT, gen_fsm, send_all_state_event, [self(), renegotiate]),
%% Allready in keyexcahange so ignore
{next_state, StateName, State};
@@ -697,7 +765,9 @@ handle_sync_event({open, ChannelPid, Type, InitialWindowSize, MaxPacketSize, Dat
user = ChannelPid,
local_id = ChannelId,
recv_window_size = InitialWindowSize,
- recv_packet_size = MaxPacketSize},
+ recv_packet_size = MaxPacketSize,
+ send_buf = queue:new()
+ },
ssh_channel:cache_update(Cache, Channel),
State = add_request(true, ChannelId, From, State2),
start_timeout(ChannelId, From, Timeout),
@@ -728,6 +798,20 @@ handle_sync_event({recv_window, ChannelId}, _From, StateName,
end,
{reply, Reply, StateName, next_packet(State)};
+handle_sync_event(get_print_info, _From, StateName, State) ->
+ Reply =
+ try
+ {inet:sockname(State#state.socket),
+ inet:peername(State#state.socket)
+ }
+ of
+ {{ok,Local}, {ok,Remote}} -> {{Local,Remote},io_lib:format("statename=~p",[StateName])};
+ _ -> {{"-",0},"-"}
+ catch
+ _:_ -> {{"?",0},"?"}
+ end,
+ {reply, Reply, StateName, State};
+
handle_sync_event({connection_info, Options}, _From, StateName, State) ->
Info = ssh_info(Options, State, []),
{reply, Info, StateName, State};
@@ -906,6 +990,10 @@ terminate(normal, _, #state{transport_cb = Transport,
(catch Transport:close(Socket)),
ok;
+terminate({shutdown,{init,Reason}}, StateName, State) ->
+ error_logger:info_report(io_lib:format("Erlang ssh in connection handler init: ~p~n",[Reason])),
+ terminate(normal, StateName, State);
+
%% Terminated by supervisor
terminate(shutdown, StateName, #state{ssh_params = Ssh0} = State) ->
DisconnectMsg =
@@ -921,8 +1009,10 @@ terminate({shutdown, #ssh_msg_disconnect{} = Msg}, StateName,
{SshPacket, Ssh} = ssh_transport:ssh_packet(Msg, Ssh0),
send_msg(SshPacket, State),
terminate(normal, StateName, State#state{ssh_params = Ssh});
+
terminate({shutdown, _}, StateName, State) ->
terminate(normal, StateName, State);
+
terminate(Reason, StateName, #state{ssh_params = Ssh0, starter = _Pid,
connection_state = Connection} = State) ->
terminate_subsytem(Connection),
@@ -935,12 +1025,43 @@ terminate(Reason, StateName, #state{ssh_params = Ssh0, starter = _Pid,
send_msg(SshPacket, State),
terminate(normal, StateName, State#state{ssh_params = Ssh}).
+
terminate_subsytem(#connection{system_supervisor = SysSup,
sub_system_supervisor = SubSysSup}) when is_pid(SubSysSup) ->
ssh_system_sup:stop_subsystem(SysSup, SubSysSup);
terminate_subsytem(_) ->
ok.
+format_status(normal, [_, State]) ->
+ [{data, [{"StateData", State}]}];
+format_status(terminate, [_, State]) ->
+ SshParams0 = (State#state.ssh_params),
+ SshParams = SshParams0#ssh{c_keyinit = "***",
+ s_keyinit = "***",
+ send_mac_key = "***",
+ send_mac_size = "***",
+ recv_mac_key = "***",
+ recv_mac_size = "***",
+ encrypt_keys = "***",
+ encrypt_ctx = "***",
+ decrypt_keys = "***",
+ decrypt_ctx = "***",
+ compress_ctx = "***",
+ decompress_ctx = "***",
+ shared_secret = "***",
+ exchanged_hash = "***",
+ session_id = "***",
+ keyex_key = "***",
+ keyex_info = "***",
+ available_host_keys = "***"},
+ [{data, [{"StateData", State#state{decoded_data_buffer = "***",
+ encoded_data_buffer = "***",
+ key_exchange_init_msg = "***",
+ opts = "***",
+ recbuf = "***",
+ ssh_params = SshParams
+ }}]}].
+
%%--------------------------------------------------------------------
-spec code_change(OldVsn::term(), state_name(), Oldstate::term(), Extra::term()) ->
{ok, state_name(), #state{}}.
@@ -1101,7 +1222,14 @@ send_all_state_event(FsmPid, Event) ->
gen_fsm:send_all_state_event(FsmPid, Event).
sync_send_all_state_event(FsmPid, Event) ->
- try gen_fsm:sync_send_all_state_event(FsmPid, Event, infinity)
+ sync_send_all_state_event(FsmPid, Event, infinity).
+
+sync_send_all_state_event(FsmPid, Event, Timeout) ->
+ try gen_fsm:sync_send_all_state_event(FsmPid, Event, Timeout) of
+ {closed, _Channel} ->
+ {error, closed};
+ Result ->
+ Result
catch
exit:{noproc, _} ->
{error, closed};
@@ -1129,10 +1257,9 @@ event(Event, StateName, State) ->
handle_disconnect(DisconnectMsg, State);
throw:{ErrorToDisplay, #ssh_msg_disconnect{} = DisconnectMsg} ->
handle_disconnect(DisconnectMsg, State, ErrorToDisplay);
- _:Error ->
- log_error(Error),
+ _:_ ->
handle_disconnect(#ssh_msg_disconnect{code = error_code(StateName),
- description = "Internal error",
+ description = "Invalid state",
language = "en"}, State)
end.
error_code(key_exchange) ->
@@ -1196,15 +1323,25 @@ generate_event(<<?BYTE(Byte), _/binary>> = Msg, StateName,
end;
generate_event(Msg, StateName, State0, EncData) ->
- Event = ssh_message:decode(Msg),
- State = generate_event_new_state(State0, EncData),
- case Event of
- #ssh_msg_kexinit{} ->
- %% We need payload for verification later.
- event({Event, Msg}, StateName, State);
- _ ->
- event(Event, StateName, State)
- end.
+ try
+ Event = ssh_message:decode(Msg),
+ State = generate_event_new_state(State0, EncData),
+ case Event of
+ #ssh_msg_kexinit{} ->
+ %% We need payload for verification later.
+ event({Event, Msg}, StateName, State);
+ _ ->
+ event(Event, StateName, State)
+ end
+ catch
+ _:_ ->
+ DisconnectMsg =
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_PROTOCOL_ERROR,
+ description = "Encountered unexpected input",
+ language = "en"},
+ handle_disconnect(DisconnectMsg, State0)
+ end.
+
handle_request(ChannelPid, ChannelId, Type, Data, WantReply, From,
@@ -1362,37 +1499,57 @@ handle_ssh_packet(Length, StateName, #state{decoded_data_buffer = DecData0,
ssh_params = Ssh0,
transport_protocol = _Protocol,
socket = _Socket} = State0) ->
- {Ssh1, DecData, EncData, Mac} =
- ssh_transport:unpack(EncData0, Length, Ssh0),
- SshPacket = <<DecData0/binary, DecData/binary>>,
- case ssh_transport:is_valid_mac(Mac, SshPacket, Ssh1) of
- true ->
- PacketData = ssh_transport:msg_data(SshPacket),
- {Ssh1, Msg} = ssh_transport:decompress(Ssh1, PacketData),
- generate_event(Msg, StateName,
- State0#state{ssh_params = Ssh1,
- %% Important to be set for
- %% next_packet
- decoded_data_buffer = <<>>}, EncData);
- false ->
- DisconnectMsg =
+ try
+ {Ssh1, DecData, EncData, Mac} =
+ ssh_transport:unpack(EncData0, Length, Ssh0),
+ SshPacket = <<DecData0/binary, DecData/binary>>,
+ case ssh_transport:is_valid_mac(Mac, SshPacket, Ssh1) of
+ true ->
+ PacketData = ssh_transport:msg_data(SshPacket),
+ {Ssh1, Msg} = ssh_transport:decompress(Ssh1, PacketData),
+ generate_event(Msg, StateName,
+ State0#state{ssh_params = Ssh1,
+ %% Important to be set for
+ %% next_packet
+ decoded_data_buffer = <<>>},
+ EncData);
+ false ->
+ DisconnectMsg =
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_PROTOCOL_ERROR,
+ description = "Bad mac",
+ language = "en"},
+ handle_disconnect(DisconnectMsg, State0)
+ end
+ catch _:_ ->
+ Disconnect =
#ssh_msg_disconnect{code = ?SSH_DISCONNECT_PROTOCOL_ERROR,
- description = "Bad mac",
+ description = "Bad input",
language = "en"},
- handle_disconnect(DisconnectMsg, State0)
- end.
+ handle_disconnect(Disconnect, State0)
+ end.
+
+
+handle_disconnect(DisconnectMsg, State) ->
+ handle_disconnect(own, DisconnectMsg, State).
-handle_disconnect(#ssh_msg_disconnect{description = Desc} = Msg, #state{connection_state = Connection0,
- role = Role} = State0) ->
+handle_disconnect(#ssh_msg_disconnect{} = DisconnectMsg, State, Error) ->
+ handle_disconnect(own, DisconnectMsg, State, Error);
+handle_disconnect(Type, #ssh_msg_disconnect{description = Desc} = Msg, #state{connection_state = Connection0, role = Role} = State0) ->
{disconnect, _, {{replies, Replies}, Connection}} = ssh_connection:handle_msg(Msg, Connection0, Role),
- State = send_replies(Replies, State0),
+ State = send_replies(disconnect_replies(Type, Msg, Replies), State0),
{stop, {shutdown, Desc}, State#state{connection_state = Connection}}.
-handle_disconnect(#ssh_msg_disconnect{description = Desc} = Msg, #state{connection_state = Connection0,
- role = Role} = State0, ErrorMsg) ->
+
+handle_disconnect(Type, #ssh_msg_disconnect{description = Desc} = Msg, #state{connection_state = Connection0,
+ role = Role} = State0, ErrorMsg) ->
{disconnect, _, {{replies, Replies}, Connection}} = ssh_connection:handle_msg(Msg, Connection0, Role),
- State = send_replies(Replies, State0),
+ State = send_replies(disconnect_replies(Type, Msg, Replies), State0),
{stop, {shutdown, {Desc, ErrorMsg}}, State#state{connection_state = Connection}}.
+disconnect_replies(own, Msg, Replies) ->
+ [{connection_reply, Msg} | Replies];
+disconnect_replies(peer, _, Replies) ->
+ Replies.
+
counterpart_versions(NumVsn, StrVsn, #ssh{role = server} = Ssh) ->
Ssh#ssh{c_vsn = NumVsn , c_version = StrVsn};
counterpart_versions(NumVsn, StrVsn, #ssh{role = client} = Ssh) ->
@@ -1474,8 +1631,7 @@ ssh_channel_info([ _ | Rest], Channel, Acc) ->
log_error(Reason) ->
Report = io_lib:format("Erlang ssh connection handler failed with reason: "
- "~p ~n, Stacktace: ~p ~n"
- "please report this to [email protected] \n",
+ "~p ~n, Stacktrace: ~p ~n",
[Reason, erlang:get_stacktrace()]),
error_logger:error_report(Report),
"Internal error".
@@ -1570,10 +1726,19 @@ handshake(Pid, Ref, Timeout) ->
{error, Reason}
after Timeout ->
stop(Pid),
- {error, Timeout}
+ {error, timeout}
end.
start_timeout(_,_, infinity) ->
ok;
start_timeout(Channel, From, Time) ->
erlang:send_after(Time, self(), {timeout, {Channel, From}}).
+
+getopt(Opt, Socket) ->
+ case inet:getopts(Socket, [Opt]) of
+ {ok, [{Opt, Value}]} ->
+ {ok, Value};
+ Other ->
+ {error, {unexpected_getopts_return, Other}}
+ end.
+
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl
index 21cdedc156..5692138a8a 100644
--- a/lib/ssh/src/ssh_file.erl
+++ b/lib/ssh/src/ssh_file.erl
@@ -65,7 +65,7 @@ is_auth_key(Key, User,Opts) ->
%% Used by client
is_host_key(Key, PeerName, Algorithm, Opts) ->
- case lookup_host_key(PeerName, Algorithm, Opts) of
+ case lookup_host_key(Key, PeerName, Algorithm, Opts) of
{ok, Key} ->
true;
_ ->
@@ -121,9 +121,9 @@ decode_ssh_file(Pem, Password) ->
%% return {ok, Key(s)} or {error, not_found}
%%
-lookup_host_key(Host, Alg, Opts) ->
+lookup_host_key(KeyToMatch, Host, Alg, Opts) ->
Host1 = replace_localhost(Host),
- do_lookup_host_key(Host1, Alg, Opts).
+ do_lookup_host_key(KeyToMatch, Host1, Alg, Opts).
add_host_key(Host, Key, Opts) ->
@@ -204,10 +204,10 @@ replace_localhost("localhost") ->
replace_localhost(Host) ->
Host.
-do_lookup_host_key(Host, Alg, Opts) ->
+do_lookup_host_key(KeyToMatch, Host, Alg, Opts) ->
case file:open(file_name(user, "known_hosts", Opts), [read, binary]) of
{ok, Fd} ->
- Res = lookup_host_key_fd(Fd, Host, Alg),
+ Res = lookup_host_key_fd(Fd, KeyToMatch, Host, Alg),
file:close(Fd),
{ok, Res};
{error, enoent} -> {error, not_found};
@@ -228,16 +228,16 @@ identity_pass_phrase('ssh-rsa') ->
identity_pass_phrase("ssh-rsa") ->
rsa_pass_phrase.
-lookup_host_key_fd(Fd, Host, KeyType) ->
+lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType) ->
case io:get_line(Fd, '') of
eof ->
{error, not_found};
Line ->
case ssh_decode_line(Line, known_hosts) of
[{Key, Attributes}] ->
- handle_host(Fd, Host, proplists:get_value(hostnames, Attributes), Key, KeyType);
+ handle_host(Fd, KeyToMatch, Host, proplists:get_value(hostnames, Attributes), Key, KeyType);
[] ->
- lookup_host_key_fd(Fd, Host, KeyType)
+ lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType)
end
end.
@@ -248,13 +248,13 @@ ssh_decode_line(Line, Type) ->
[]
end.
-handle_host(Fd, Host, HostList, Key, KeyType) ->
+handle_host(Fd, KeyToMatch, Host, HostList, Key, KeyType) ->
Host1 = host_name(Host),
- case lists:member(Host1, HostList) and key_match(Key, KeyType) of
- true ->
+ case lists:member(Host1, HostList) andalso key_match(Key, KeyType) of
+ true when KeyToMatch == Key ->
Key;
- false ->
- lookup_host_key_fd(Fd, Host, KeyType)
+ _ ->
+ lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType)
end.
host_name(Atom) when is_atom(Atom) ->
diff --git a/lib/ssh/src/ssh_info.erl b/lib/ssh/src/ssh_info.erl
new file mode 100644
index 0000000000..30df32c4fd
--- /dev/null
+++ b/lib/ssh/src/ssh_info.erl
@@ -0,0 +1,201 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Print some info of a running ssh aplication.
+%%----------------------------------------------------------------------
+
+-module(ssh_info).
+
+-compile(export_all).
+
+print() ->
+ print(user).
+
+print(D) ->
+ try supervisor:which_children(ssh_sup)
+ of
+ _ ->
+ io:nl(D),
+ print_general(D),
+ io:nl(D),
+ underline(D, "Client part", $=),
+ print_clients(D),
+ io:nl(D),
+ underline(D, "Server part", $=),
+ print_servers(D),
+ io:nl(D),
+ %% case os:type() of
+ %% {unix,_} ->
+ %% io:nl(),
+ %% underline("Linux part", $=),
+ %% underline("Listening"),
+ %% catch io:format(os:cmd("netstat -tpln")),
+ %% io:nl(),
+ %% underline("Other"),
+ %% catch io:format(os:cmd("netstat -tpn"));
+ %% _ -> ok
+ %% end,
+ underline(D, "Supervisors", $=),
+ walk_sups(D, ssh_sup),
+ io:nl(D)
+ catch
+ _:_ ->
+ io:format(D,"Ssh not found~n",[])
+ end.
+
+%%%================================================================
+print_general(D) ->
+ {_Name, Slogan, Ver} = lists:keyfind(ssh,1,application:which_applications()),
+ underline(D, io_lib:format("~s ~s", [Slogan, Ver]), $=),
+ io:format(D, 'This printout is generated ~s. ~n',[datetime()]).
+
+%%%================================================================
+print_clients(D) ->
+ PrintClient = fun(X) -> print_client(D,X) end,
+ try
+ lists:foreach(PrintClient, supervisor:which_children(sshc_sup))
+ catch
+ C:E ->
+ io:format(D, '***FAILED: ~p:~p~n',[C,E])
+ end.
+
+print_client(D, {undefined,Pid,supervisor,[ssh_connection_handler]}) ->
+ {{Local,Remote},_Str} = ssh_connection_handler:get_print_info(Pid),
+ io:format(D, " Local=~s Remote=~s~n",[fmt_host_port(Local),fmt_host_port(Remote)]);
+print_client(D, Other) ->
+ io:format(D, " [[Other 1: ~p]]~n",[Other]).
+
+
+%%%================================================================
+print_servers(D) ->
+ PrintServer = fun(X) -> print_server(D,X) end,
+ try
+ lists:foreach(PrintServer, supervisor:which_children(sshd_sup))
+ catch
+ C:E ->
+ io:format(D, '***FAILED: ~p:~p~n',[C,E])
+ end.
+
+print_server(D, {{server,ssh_system_sup,LocalHost,LocalPort},Pid,supervisor,[ssh_system_sup]}) when is_pid(Pid) ->
+ io:format(D, 'Local=~s (~p children)~n',[fmt_host_port({LocalHost,LocalPort}),
+ ssh_acceptor:number_of_connections(Pid)]),
+ PrintSystemSup = fun(X) -> print_system_sup(D,X) end,
+ lists:foreach(PrintSystemSup, supervisor:which_children(Pid));
+print_server(D, Other) ->
+ io:format(D, " [[Other 2: ~p]]~n",[Other]).
+
+print_system_sup(D, {Ref,Pid,supervisor,[ssh_subsystem_sup]}) when is_reference(Ref),
+ is_pid(Pid) ->
+ PrintChannels = fun(X) -> print_channels(D,X) end,
+ lists:foreach(PrintChannels, supervisor:which_children(Pid));
+print_system_sup(D, {{ssh_acceptor_sup,LocalHost,LocalPort}, Pid,supervisor, [ssh_acceptor_sup]}) when is_pid(Pid) ->
+ io:format(D, " [Acceptor for ~s]~n",[fmt_host_port({LocalHost,LocalPort})]);
+print_system_sup(D, Other) ->
+ io:format(D, " [[Other 3: ~p]]~n",[Other]).
+
+print_channels(D, {{server,ssh_channel_sup,_,_},Pid,supervisor,[ssh_channel_sup]}) when is_pid(Pid) ->
+ PrintChannel = fun(X) -> print_channel(D,X) end,
+ lists:foreach(PrintChannel, supervisor:which_children(Pid));
+print_channels(D, Other) ->
+ io:format(D, " [[Other 4: ~p]]~n",[Other]).
+
+
+print_channel(D, {Ref,Pid,worker,[ssh_channel]}) when is_reference(Ref),
+ is_pid(Pid) ->
+ {{ConnManager,ChannelID}, Str} = ssh_channel:get_print_info(Pid),
+ {{Local,Remote},StrM} = ssh_connection_handler:get_print_info(ConnManager),
+ io:format(D, ' ch ~p: ~s ~s',[ChannelID, StrM, Str]),
+ io:format(D, " Local=~s Remote=~s~n",[fmt_host_port(Local),fmt_host_port(Remote)]);
+print_channel(D, Other) ->
+ io:format(D, " [[Other 5: ~p]]~n",[Other]).
+
+%%%================================================================
+-define(inc(N), (N+4)).
+
+walk_sups(D, StartPid) ->
+ io:format(D, "Start at ~p, ~s.~n",[StartPid,dead_or_alive(StartPid)]),
+ walk_sups(D, children(StartPid), _Indent=?inc(0)).
+
+walk_sups(D, [H={_,Pid,SupOrWorker,_}|T], Indent) ->
+ indent(D, Indent), io:format(D, '~200p ~p is ~s~n',[H,Pid,dead_or_alive(Pid)]),
+ case SupOrWorker of
+ supervisor -> walk_sups(D, children(Pid), ?inc(Indent));
+ _ -> ok
+ end,
+ walk_sups(D, T, Indent);
+walk_sups(_D, [], _) ->
+ ok.
+
+dead_or_alive(Name) when is_atom(Name) ->
+ case whereis(Name) of
+ undefined ->
+ "**UNDEFINED**";
+ Pid ->
+ dead_or_alive(Pid)
+ end;
+dead_or_alive(Pid) when is_pid(Pid) ->
+ case process_info(Pid) of
+ undefined -> "**DEAD**";
+ _ -> "alive"
+ end.
+
+indent(D, I) -> io:format(D,'~*c',[I,$ ]).
+
+children(Pid) ->
+ Parent = self(),
+ Helper = spawn(fun() ->
+ Parent ! {self(),supervisor:which_children(Pid)}
+ end),
+ receive
+ {Helper,L} when is_list(L) ->
+ L
+ after
+ 2000 ->
+ catch exit(Helper, kill),
+ []
+ end.
+
+%%%================================================================
+underline(D, Str) ->
+ underline(D, Str, $-).
+
+underline(D, Str, LineChar) ->
+ Len = lists:flatlength(Str),
+ io:format(D, '~s~n',[Str]),
+ line(D,Len,LineChar).
+
+line(D, Len, Char) ->
+ io:format(D, '~*c~n', [Len,Char]).
+
+
+datetime() ->
+ {{YYYY,MM,DD}, {H,M,S}} = calendar:now_to_universal_time(now()),
+ lists:flatten(io_lib:format('~4w-~2..0w-~2..0w ~2..0w:~2..0w:~2..0w UTC',[YYYY,MM,DD, H,M,S])).
+
+
+fmt_host_port({{A,B,C,D},Port}) -> io_lib:format('~p.~p.~p.~p:~p',[A,B,C,D,Port]);
+fmt_host_port({Host,Port}) -> io_lib:format('~s:~p',[Host,Port]).
+
+
+
+nyi(D) ->
+ io:format(D,'Not yet implemented~n',[]),
+ nyi.
diff --git a/lib/ssh/src/ssh_io.erl b/lib/ssh/src/ssh_io.erl
index 832b144db9..97e2dee27a 100644
--- a/lib/ssh/src/ssh_io.erl
+++ b/lib/ssh/src/ssh_io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -73,7 +73,9 @@ read_password(Prompt, Ssh) ->
listify(A) when is_atom(A) ->
atom_to_list(A);
listify(L) when is_list(L) ->
- L.
+ L;
+listify(B) when is_binary(B) ->
+ binary_to_list(B).
format(Fmt, Args) ->
io:format(Fmt, Args).
@@ -81,6 +83,8 @@ format(Fmt, Args) ->
trim(Line) when is_list(Line) ->
lists:reverse(trim1(lists:reverse(trim1(Line))));
+trim(Line) when is_binary(Line) ->
+ trim(unicode:characters_to_list(Line));
trim(Other) -> Other.
trim1([$\s|Cs]) -> trim(Cs);
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index 7bd0375521..66e7717095 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -120,7 +120,7 @@ encode(#ssh_msg_userauth_request{
data = Data
}) ->
ssh_bits:encode([?SSH_MSG_USERAUTH_REQUEST, User, Service, Method, Data],
- [byte, string, string, string, '...']);
+ [byte, string_utf8, string, string, '...']);
encode(#ssh_msg_userauth_failure{
authentications = Auths,
partial_success = Bool
@@ -135,7 +135,7 @@ encode(#ssh_msg_userauth_banner{
language = Lang
}) ->
ssh_bits:encode([?SSH_MSG_USERAUTH_BANNER, Banner, Lang],
- [byte, string, string]);
+ [byte, string_utf8, string]);
encode(#ssh_msg_userauth_pk_ok{
algorithm_name = Alg,
@@ -162,8 +162,15 @@ encode(#ssh_msg_userauth_info_request{
encode(#ssh_msg_userauth_info_response{
num_responses = Num,
data = Data}) ->
- ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num, Data],
- [byte, uint32, '...']);
+ Responses = lists:map(fun("") ->
+ <<>>;
+ (Response) ->
+ ssh_bits:encode([Response], [string])
+ end, Data),
+ Start = ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num],
+ [byte, uint32]),
+ iolist_to_binary([Start, Responses]);
+
encode(#ssh_msg_disconnect{
code = Code,
description = Desc,
@@ -255,7 +262,7 @@ encode(#ssh_msg_ignore{data = Data}) ->
ssh_bits:encode([?SSH_MSG_IGNORE, Data], [byte, string]);
encode(#ssh_msg_unimplemented{sequence = Seq}) ->
- ssh_bits:encode([?SSH_MSG_IGNORE, Seq], [byte, uint32]);
+ ssh_bits:encode([?SSH_MSG_UNIMPLEMENTED, Seq], [byte, uint32]);
encode(#ssh_msg_debug{always_display = Bool,
message = Msg,
@@ -315,8 +322,8 @@ decode(<<?BYTE(?SSH_MSG_CHANNEL_DATA), ?UINT32(Recipient), ?UINT32(Len), Data:Le
recipient_channel = Recipient,
data = Data
};
-decode(<<?BYTE(?SSH_MSG_CHANNEL_EXTENDED_DATA), ?UINT32(Recipient),
- ?UINT32(DataType), Data/binary>>) ->
+decode(<<?BYTE(?SSH_MSG_CHANNEL_EXTENDED_DATA), ?UINT32(Recipient),
+ ?UINT32(DataType), ?UINT32(Len), Data:Len/binary>>) ->
#ssh_msg_channel_extended_data{
recipient_channel = Recipient,
data_type_code = DataType,
@@ -380,18 +387,6 @@ decode(<<?BYTE(?SSH_MSG_USERAUTH_BANNER),
language = Lang
};
-decode(<<?BYTE(?SSH_MSG_USERAUTH_PK_OK), ?UINT32(Len), Alg:Len/binary, KeyBlob/binary>>) ->
- #ssh_msg_userauth_pk_ok{
- algorithm_name = Alg,
- key_blob = KeyBlob
- };
-
-decode(<<?BYTE(?SSH_MSG_USERAUTH_PASSWD_CHANGEREQ), ?UINT32(Len0), Prompt:Len0/binary,
- ?UINT32(Len1), Lang:Len1/binary>>) ->
- #ssh_msg_userauth_passwd_changereq{
- prompt = Prompt,
- languge = Lang
- };
decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary,
?UINT32(Len1), Inst:Len1/binary, ?UINT32(Len2), Lang:Len2/binary,
?UINT32(NumPromtps), Data/binary>>) ->
@@ -402,6 +397,21 @@ decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary,
num_prompts = NumPromtps,
data = Data};
+%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST:
+decode(<<?BYTE(?SSH_MSG_USERAUTH_PASSWD_CHANGEREQ), ?UINT32(Len0), Prompt:Len0/binary,
+ ?UINT32(Len1), Lang:Len1/binary>>) ->
+ #ssh_msg_userauth_passwd_changereq{
+ prompt = Prompt,
+ languge = Lang
+ };
+
+%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST:
+decode(<<?BYTE(?SSH_MSG_USERAUTH_PK_OK), ?UINT32(Len), Alg:Len/binary, KeyBlob/binary>>) ->
+ #ssh_msg_userauth_pk_ok{
+ algorithm_name = Alg,
+ key_blob = KeyBlob
+ };
+
decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_RESPONSE), ?UINT32(Num), Data/binary>>) ->
#ssh_msg_userauth_info_response{
num_responses = Num,
@@ -424,8 +434,9 @@ decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_REQUEST_OLD), ?UINT32(N)>>) ->
#ssh_msg_kex_dh_gex_request_old{
n = N
};
-decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP), ?UINT32(Len0), Prime:Len0/big-signed-integer,
- ?UINT32(Len1), Generator:Len1/big-signed-integer>>) ->
+decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP),
+ ?UINT32(Len0), Prime:Len0/big-signed-integer-unit:8,
+ ?UINT32(Len1), Generator:Len1/big-signed-integer-unit:8>>) ->
#ssh_msg_kex_dh_gex_group{
p = Prime,
g = Generator
@@ -457,10 +468,19 @@ decode(<<?BYTE(?SSH_MSG_DISCONNECT), ?UINT32(Code),
language = Lang
};
+%% Accept bad disconnects from ancient openssh clients that doesn't send language tag. Use english as a work-around.
+decode(<<?BYTE(?SSH_MSG_DISCONNECT), ?UINT32(Code),
+ ?UINT32(Len0), Desc:Len0/binary>>) ->
+ #ssh_msg_disconnect{
+ code = Code,
+ description = unicode:characters_to_list(Desc),
+ language = <<"en">>
+ };
+
decode(<<?SSH_MSG_NEWKEYS>>) ->
#ssh_msg_newkeys{};
-decode(<<?BYTE(?SSH_MSG_IGNORE), Data/binary>>) ->
+decode(<<?BYTE(?SSH_MSG_IGNORE), ?UINT32(Len), Data:Len/binary>>) ->
#ssh_msg_ignore{data = Data};
decode(<<?BYTE(?SSH_MSG_UNIMPLEMENTED), ?UINT32(Seq)>>) ->
@@ -485,6 +505,11 @@ erl_boolean(1) ->
decode_kex_init(<<?BYTE(Bool), ?UINT32(X)>>, Acc, 0) ->
list_to_tuple(lists:reverse([X, erl_boolean(Bool) | Acc]));
+decode_kex_init(<<?BYTE(Bool)>>, Acc, 0) ->
+ %% The mandatory trailing UINT32 is missing. Assume the value it anyhow must have
+ %% See rfc 4253 7.1
+ X = 0,
+ list_to_tuple(lists:reverse([X, erl_boolean(Bool) | Acc]));
decode_kex_init(<<?UINT32(Len), Data:Len/binary, Rest/binary>>, Acc, N) ->
Names = string:tokens(unicode:characters_to_list(Data), ","),
decode_kex_init(Rest, [Names | Acc], N -1).
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index 10167a9223..613f8f25b2 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,8 +33,8 @@
-export([start_channel/1, start_channel/2, start_channel/3, stop_channel/1]).
--export([open/3, opendir/2, close/2, readdir/2, pread/4, read/3,
- open/4, opendir/3, close/3, readdir/3, pread/5, read/4,
+-export([open/3, open_tar/3, opendir/2, close/2, readdir/2, pread/4, read/3,
+ open/4, open_tar/4, opendir/3, close/3, readdir/3, pread/5, read/4,
apread/4, aread/3, pwrite/4, write/3, apwrite/4, awrite/3,
pwrite/5, write/4,
position/3, real_path/2, read_file_info/2, get_file_info/2,
@@ -57,7 +57,8 @@
rep_buf = <<>>,
req_id,
req_list = [], %% {ReqId, Fun}
- inf %% list of fileinf
+ inf, %% list of fileinf,
+ opts
}).
-record(fileinf,
@@ -68,6 +69,18 @@
mode
}).
+-record(bufinf,
+ {
+ mode, % read | write (=from or to buffer by user)
+ crypto_state,
+ crypto_fun, % For encode or decode depending on the mode field
+ size = 0, % # bytes "before" the current buffer for the postion call
+
+ chunksize, % The size of the chunks to be sent or received
+ enc_text_buf = <<>>, % Encrypted text
+ plain_text_buf = <<>> % Decrypted text
+ }).
+
-define(FILEOP_TIMEOUT, infinity).
-define(NEXT_REQID(S),
@@ -85,10 +98,11 @@ start_channel(Host) when is_list(Host) ->
start_channel(Host, []).
start_channel(Cm, Opts) when is_pid(Cm) ->
Timeout = proplists:get_value(timeout, Opts, infinity),
+ {_, SftpOpts} = handle_options(Opts, [], []),
case ssh_xfer:attach(Cm, []) of
{ok, ChannelId, Cm} ->
case ssh_channel:start(Cm, ChannelId,
- ?MODULE, [Cm, ChannelId, Timeout]) of
+ ?MODULE, [Cm, ChannelId, SftpOpts]) of
{ok, Pid} ->
case wait_for_version_negotiation(Pid, Timeout) of
ok ->
@@ -108,11 +122,12 @@ start_channel(Cm, Opts) when is_pid(Cm) ->
start_channel(Host, Opts) ->
start_channel(Host, 22, Opts).
start_channel(Host, Port, Opts) ->
- Timeout = proplists:get_value(timeout, Opts, infinity),
- case ssh_xfer:connect(Host, Port, proplists:delete(timeout, Opts)) of
+ {SshOpts, SftpOpts} = handle_options(Opts, [], []),
+ Timeout = proplists:get_value(timeout, SftpOpts, infinity),
+ case ssh_xfer:connect(Host, Port, SshOpts, Timeout) of
{ok, ChannelId, Cm} ->
case ssh_channel:start(Cm, ChannelId, ?MODULE, [Cm,
- ChannelId, Timeout]) of
+ ChannelId, SftpOpts]) of
{ok, Pid} ->
case wait_for_version_negotiation(Pid, Timeout) of
ok ->
@@ -159,6 +174,77 @@ open(Pid, File, Mode) ->
open(Pid, File, Mode, FileOpTimeout) ->
call(Pid, {open, false, File, Mode}, FileOpTimeout).
+open_tar(Pid, File, Mode) ->
+ open_tar(Pid, File, Mode, ?FILEOP_TIMEOUT).
+open_tar(Pid, File, Mode, FileOpTimeout) ->
+ case {lists:member(write,Mode),
+ lists:member(read,Mode),
+ Mode -- [read,write]} of
+ {true,false,[]} ->
+ {ok,Handle} = open(Pid, File, [write], FileOpTimeout),
+ erl_tar:init(Pid, write,
+ fun(write, {_,Data}) ->
+ write_to_remote_tar(Pid, Handle, to_bin(Data), FileOpTimeout);
+ (position, {_,Pos}) ->
+ position(Pid, Handle, Pos, FileOpTimeout);
+ (close, _) ->
+ close(Pid, Handle, FileOpTimeout)
+ end);
+ {true,false,[{crypto,{CryptoInitFun,CryptoEncryptFun,CryptoEndFun}}]} ->
+ {ok,SftpHandle} = open(Pid, File, [write], FileOpTimeout),
+ BI = #bufinf{mode = write,
+ crypto_fun = CryptoEncryptFun},
+ {ok,BufHandle} = open_buf(Pid, CryptoInitFun, BI, FileOpTimeout),
+ erl_tar:init(Pid, write,
+ fun(write, {_,Data}) ->
+ write_buf(Pid, SftpHandle, BufHandle, to_bin(Data), FileOpTimeout);
+ (position, {_,Pos}) ->
+ position_buf(Pid, SftpHandle, BufHandle, Pos, FileOpTimeout);
+ (close, _) ->
+ {ok,#bufinf{
+ plain_text_buf = PlainBuf0,
+ enc_text_buf = EncBuf0,
+ crypto_state = CState0
+ }} = call(Pid, {get_bufinf,BufHandle}, FileOpTimeout),
+ {ok,EncTextTail} = CryptoEndFun(PlainBuf0, CState0),
+ EncTextBuf = <<EncBuf0/binary, EncTextTail/binary>>,
+ case write(Pid, SftpHandle, EncTextBuf, FileOpTimeout) of
+ ok ->
+ call(Pid, {erase_bufinf,BufHandle}, FileOpTimeout),
+ close(Pid, SftpHandle, FileOpTimeout);
+ Other ->
+ Other
+ end
+ end);
+ {false,true,[]} ->
+ {ok,Handle} = open(Pid, File, [read,binary], FileOpTimeout),
+ erl_tar:init(Pid, read,
+ fun(read2, {_,Len}) ->
+ read_repeat(Pid, Handle, Len, FileOpTimeout);
+ (position, {_,Pos}) ->
+ position(Pid, Handle, Pos, FileOpTimeout);
+ (close, _) ->
+ close(Pid, Handle, FileOpTimeout)
+ end);
+ {false,true,[{crypto,{CryptoInitFun,CryptoDecryptFun}}]} ->
+ {ok,SftpHandle} = open(Pid, File, [read,binary], FileOpTimeout),
+ BI = #bufinf{mode = read,
+ crypto_fun = CryptoDecryptFun},
+ {ok,BufHandle} = open_buf(Pid, CryptoInitFun, BI, FileOpTimeout),
+ erl_tar:init(Pid, read,
+ fun(read2, {_,Len}) ->
+ read_buf(Pid, SftpHandle, BufHandle, Len, FileOpTimeout);
+ (position, {_,Pos}) ->
+ position_buf(Pid, SftpHandle, BufHandle, Pos, FileOpTimeout);
+ (close, _) ->
+ call(Pid, {erase_bufinf,BufHandle}, FileOpTimeout),
+ close(Pid, SftpHandle, FileOpTimeout)
+ end);
+ _ ->
+ {error,{illegal_mode,Mode}}
+ end.
+
+
opendir(Pid, Path) ->
opendir(Pid, Path, ?FILEOP_TIMEOUT).
opendir(Pid, Path, FileOpTimeout) ->
@@ -352,7 +438,7 @@ write_file(Pid, Name, List) ->
write_file(Pid, Name, List, ?FILEOP_TIMEOUT).
write_file(Pid, Name, List, FileOpTimeout) when is_list(List) ->
- write_file(Pid, Name, list_to_binary(List), FileOpTimeout);
+ write_file(Pid, Name, unicode:characters_to_binary(List), FileOpTimeout);
write_file(Pid, Name, Bin, FileOpTimeout) ->
case open(Pid, Name, [write, binary], FileOpTimeout) of
{ok, Handle} ->
@@ -392,7 +478,8 @@ write_file_loop(Pid, Handle, Pos, Bin, Remain, PacketSz, FileOpTimeout) ->
%%
%% Description:
%%--------------------------------------------------------------------
-init([Cm, ChannelId, Timeout]) ->
+init([Cm, ChannelId, Options]) ->
+ Timeout = proplists:get_value(timeout, Options, infinity),
erlang:monitor(process, Cm),
case ssh_connection:subsystem(Cm, ChannelId, "sftp", Timeout) of
success ->
@@ -401,7 +488,8 @@ init([Cm, ChannelId, Timeout]) ->
{ok, #state{xf = Xf,
req_id = 0,
rep_buf = <<>>,
- inf = new_inf()}};
+ inf = new_inf(),
+ opts = Options}};
failure ->
{stop, "server failed to start sftp subsystem"};
Error ->
@@ -442,6 +530,15 @@ handle_cast(_,State) ->
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
+do_handle_call({get_bufinf,BufHandle}, _From, S=#state{inf=I0}) ->
+ {reply, dict:find(BufHandle,I0), S};
+
+do_handle_call({put_bufinf,BufHandle,B}, _From, S=#state{inf=I0}) ->
+ {reply, ok, S#state{inf=dict:store(BufHandle,B,I0)}};
+
+do_handle_call({erase_bufinf,BufHandle}, _From, S=#state{inf=I0}) ->
+ {reply, ok, S#state{inf=dict:erase(BufHandle,I0)}};
+
do_handle_call({open, Async,FileName,Mode}, From, #state{xf = XF} = State) ->
{Access,Flags,Attrs} = open_mode(XF#ssh_xfer.vsn, Mode),
ReqID = State#state.req_id,
@@ -514,7 +611,7 @@ do_handle_call({pread,Async,Handle,At,Length}, From, State) ->
case get_mode(Handle, State2) of
binary -> {{ok,Data}, State2};
text ->
- {{ok,binary_to_list(Data)}, State2}
+ {{ok,unicode:characters_to_list(Data)}, State2}
end;
(Rep, State2) ->
{Rep, State2}
@@ -535,8 +632,7 @@ do_handle_call({read,Async,Handle,Length}, From, State) ->
fun({ok,Data}, State2) ->
case get_mode(Handle, State2) of
binary -> {{ok,Data}, State2};
- text ->
- {{ok,binary_to_list(Data)}, State2}
+ text -> {{ok,binary_to_list(Data)}, State2}
end;
(Rep, State2) -> {Rep, State2}
end);
@@ -547,12 +643,7 @@ do_handle_call({read,Async,Handle,Length}, From, State) ->
do_handle_call({pwrite,Async,Handle,At,Data0}, From, State) ->
case lseek_position(Handle, At, State) of
{ok,Offset} ->
- Data = if
- is_binary(Data0) ->
- Data0;
- is_list(Data0) ->
- list_to_binary(Data0)
- end,
+ Data = to_bin(Data0),
ReqID = State#state.req_id,
Size = size(Data),
ssh_xfer:write(?XF(State),ReqID,Handle,Offset,Data),
@@ -565,12 +656,7 @@ do_handle_call({pwrite,Async,Handle,At,Data0}, From, State) ->
do_handle_call({write,Async,Handle,Data0}, From, State) ->
case lseek_position(Handle, cur, State) of
{ok,Offset} ->
- Data = if
- is_binary(Data0) ->
- Data0;
- is_list(Data0) ->
- list_to_binary(Data0)
- end,
+ Data = to_bin(Data0),
ReqID = State#state.req_id,
Size = size(Data),
ssh_xfer:write(?XF(State),ReqID,Handle,Offset,Data),
@@ -708,8 +794,9 @@ handle_ssh_msg({ssh_cm, _, {exit_status, ChannelId, Status}}, State0) ->
%%
%% Description: Handles channel messages
%%--------------------------------------------------------------------
-handle_msg({ssh_channel_up, _, _}, #state{xf = Xf} = State) ->
- ssh_xfer:protocol_version_request(Xf),
+handle_msg({ssh_channel_up, _, _}, #state{opts = Options, xf = Xf} = State) ->
+ Version = proplists:get_value(sftp_vsn, Options, ?SSH_SFTP_PROTOCOL_VERSION),
+ ssh_xfer:protocol_version_request(Xf, Version),
{ok, State};
%% Version negotiation timed out
@@ -755,6 +842,15 @@ terminate(_Reason, State) ->
%%====================================================================
%% Internal functions
%%====================================================================
+handle_options([], Sftp, Ssh) ->
+ {Ssh, Sftp};
+handle_options([{timeout, _} = Opt | Rest], Sftp, Ssh) ->
+ handle_options(Rest, [Opt | Sftp], Ssh);
+handle_options([{sftp_vsn, _} = Opt| Rest], Sftp, Ssh) ->
+ handle_options(Rest, [Opt | Sftp], Ssh);
+handle_options([Opt | Rest], Sftp, Ssh) ->
+ handle_options(Rest, Sftp, [Opt | Ssh]).
+
call(Pid, Msg, TimeOut) ->
ssh_channel:call(Pid, {{timeout, TimeOut}, Msg}, infinity).
@@ -1112,5 +1208,207 @@ lseek_pos({eof, Offset}, _CurOffset, CurSize)
end;
lseek_pos(_, _, _) ->
{error, einval}.
-
+%%%================================================================
+%%%
+to_bin(Data) when is_list(Data) -> list_to_binary(Data);
+to_bin(Data) when is_binary(Data) -> Data.
+
+
+read_repeat(Pid, Handle, Len, FileOpTimeout) ->
+ {ok,{_WindowSz,PacketSz}} = recv_window(Pid, FileOpTimeout),
+ read_rpt(Pid, Handle, Len, PacketSz, FileOpTimeout, <<>>).
+
+read_rpt(Pid, Handle, WantedLen, PacketSz, FileOpTimeout, Acc) when WantedLen > 0 ->
+ case read(Pid, Handle, min(WantedLen,PacketSz), FileOpTimeout) of
+ {ok, Data} ->
+ read_rpt(Pid, Handle, WantedLen-size(Data), PacketSz, FileOpTimeout, <<Acc/binary, Data/binary>>);
+ eof ->
+ {ok, Acc};
+ Error ->
+ Error
+ end;
+read_rpt(_Pid, _Handle, WantedLen, _PacketSz, _FileOpTimeout, Acc) when WantedLen >= 0 ->
+ {ok,Acc}.
+
+
+write_to_remote_tar(_Pid, _SftpHandle, <<>>, _FileOpTimeout) ->
+ ok;
+write_to_remote_tar(Pid, SftpHandle, Bin, FileOpTimeout) ->
+ {ok,{_Window,Packet}} = send_window(Pid, FileOpTimeout),
+ write_file_loop(Pid, SftpHandle, 0, Bin, size(Bin), Packet, FileOpTimeout).
+
+position_buf(Pid, SftpHandle, BufHandle, Pos, FileOpTimeout) ->
+ {ok,#bufinf{mode = Mode,
+ plain_text_buf = Buf0,
+ size = Size}} = call(Pid, {get_bufinf,BufHandle}, FileOpTimeout),
+ case Pos of
+ {cur,0} when Mode==write ->
+ {ok,Size+size(Buf0)};
+
+ {cur,0} when Mode==read ->
+ {ok,Size};
+
+ _ when Mode==read, is_integer(Pos) ->
+ Skip = Pos-Size,
+ if
+ Skip < 0 ->
+ {error, cannot_rewind};
+ Skip == 0 ->
+ %% Optimization
+ {ok,Pos};
+ Skip > 0 ->
+ case read_buf(Pid, SftpHandle, BufHandle, Skip, FileOpTimeout) of
+ %% A bit innefficient to fetch the bufinf again, but there are lots of
+ %% other more important optimizations waiting....
+ {ok,_} ->
+ {ok,Pos};
+ Other ->
+ Other
+ end
+ end;
+
+ _ ->
+ {error,{not_yet_implemented,{pos,Pos}}}
+ end.
+
+read_buf(Pid, SftpHandle, BufHandle, WantedLen, FileOpTimeout) ->
+ {ok,{_Window,Packet}} = send_window(Pid, FileOpTimeout),
+ {ok,B0} = call(Pid, {get_bufinf,BufHandle}, FileOpTimeout),
+ case do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout, B0) of
+ {ok,ResultBin,B} ->
+ call(Pid, {put_bufinf,BufHandle,B}, FileOpTimeout),
+ {ok,ResultBin};
+ {error,Error} ->
+ {error,Error};
+ {eof,B} ->
+ call(Pid, {put_bufinf,BufHandle,B}, FileOpTimeout),
+ eof
+ end.
+
+do_the_read_buf(_Pid, _SftpHandle, WantedLen, _Packet, _FileOpTimeout,
+ B=#bufinf{plain_text_buf=PlainBuf0,
+ size = Size})
+ when size(PlainBuf0) >= WantedLen ->
+ %% We already have the wanted number of bytes decoded and ready!
+ <<ResultBin:WantedLen/binary, PlainBuf/binary>> = PlainBuf0,
+ {ok,ResultBin,B#bufinf{plain_text_buf=PlainBuf,
+ size = Size + WantedLen}};
+
+do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout,
+ B0=#bufinf{plain_text_buf = PlainBuf0,
+ enc_text_buf = EncBuf0,
+ chunksize = undefined
+ })
+ when size(EncBuf0) > 0 ->
+ %% We have (at least) one decodable byte waiting for decodeing.
+ {ok,DecodedBin,B} = apply_crypto(EncBuf0, B0),
+ do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout,
+ B#bufinf{plain_text_buf = <<PlainBuf0/binary, DecodedBin/binary>>,
+ enc_text_buf = <<>>
+ });
+
+do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout,
+ B0=#bufinf{plain_text_buf = PlainBuf0,
+ enc_text_buf = EncBuf0,
+ chunksize = ChunkSize0
+ })
+ when size(EncBuf0) >= ChunkSize0 ->
+ %% We have (at least) one chunk of decodable bytes waiting for decodeing.
+ <<ToDecode:ChunkSize0/binary, EncBuf/binary>> = EncBuf0,
+ {ok,DecodedBin,B} = apply_crypto(ToDecode, B0),
+ do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout,
+ B#bufinf{plain_text_buf = <<PlainBuf0/binary, DecodedBin/binary>>,
+ enc_text_buf = EncBuf
+ });
+
+do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout, B=#bufinf{enc_text_buf = EncBuf0}) ->
+ %% We must read more bytes and append to the buffer of encoded bytes.
+ case read(Pid, SftpHandle, Packet, FileOpTimeout) of
+ {ok,EncryptedBin} ->
+ do_the_read_buf(Pid, SftpHandle, WantedLen, Packet, FileOpTimeout,
+ B#bufinf{enc_text_buf = <<EncBuf0/binary, EncryptedBin/binary>>});
+ eof ->
+ {eof,B};
+ Other ->
+ Other
+ end.
+
+
+write_buf(Pid, SftpHandle, BufHandle, PlainBin, FileOpTimeout) ->
+ {ok,{_Window,Packet}} = send_window(Pid, FileOpTimeout),
+ {ok,B0=#bufinf{plain_text_buf=PTB}} = call(Pid, {get_bufinf,BufHandle}, FileOpTimeout),
+ case do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B0#bufinf{plain_text_buf = <<PTB/binary,PlainBin/binary>>}) of
+ {ok, B} ->
+ call(Pid, {put_bufinf,BufHandle,B}, FileOpTimeout),
+ ok;
+ {error,Error} ->
+ {error,Error}
+ end.
+
+do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B=#bufinf{enc_text_buf = EncBuf0,
+ size = Size})
+ when size(EncBuf0) >= Packet ->
+ <<BinToWrite:Packet/binary, EncBuf/binary>> = EncBuf0,
+ case write(Pid, SftpHandle, BinToWrite, FileOpTimeout) of
+ ok ->
+ do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B#bufinf{enc_text_buf = EncBuf,
+ size = Size + Packet});
+ Other ->
+ Other
+ end;
+
+do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B0=#bufinf{plain_text_buf = PlainBuf0,
+ enc_text_buf = EncBuf0,
+ chunksize = undefined})
+ when size(PlainBuf0) > 0 ->
+ {ok,EncodedBin,B} = apply_crypto(PlainBuf0, B0),
+ do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B#bufinf{plain_text_buf = <<>>,
+ enc_text_buf = <<EncBuf0/binary, EncodedBin/binary>>});
+
+do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B0=#bufinf{plain_text_buf = PlainBuf0,
+ enc_text_buf = EncBuf0,
+ chunksize = ChunkSize0
+ })
+ when size(PlainBuf0) >= ChunkSize0 ->
+ <<ToEncode:ChunkSize0/binary, PlainBuf/binary>> = PlainBuf0,
+ {ok,EncodedBin,B} = apply_crypto(ToEncode, B0),
+ do_the_write_buf(Pid, SftpHandle, Packet, FileOpTimeout,
+ B#bufinf{plain_text_buf = PlainBuf,
+ enc_text_buf = <<EncBuf0/binary, EncodedBin/binary>>});
+
+do_the_write_buf(_Pid, _SftpHandle, _Packet, _FileOpTimeout, B) ->
+ {ok,B}.
+
+apply_crypto(In, B=#bufinf{crypto_state = CState0,
+ crypto_fun = F}) ->
+ case F(In,CState0) of
+ {ok,EncodedBin,CState} ->
+ {ok, EncodedBin, B#bufinf{crypto_state=CState}};
+ {ok,EncodedBin,CState,ChunkSize} ->
+ {ok, EncodedBin, B#bufinf{crypto_state=CState,
+ chunksize=ChunkSize}}
+ end.
+
+open_buf(Pid, CryptoInitFun, BufInfo0, FileOpTimeout) ->
+ case CryptoInitFun() of
+ {ok,CryptoState} ->
+ open_buf1(Pid, BufInfo0, FileOpTimeout, CryptoState, undefined);
+ {ok,CryptoState,ChunkSize} ->
+ open_buf1(Pid, BufInfo0, FileOpTimeout, CryptoState, ChunkSize);
+ Other ->
+ Other
+ end.
+
+open_buf1(Pid, BufInfo0, FileOpTimeout, CryptoState, ChunkSize) ->
+ BufInfo = BufInfo0#bufinf{crypto_state = CryptoState,
+ chunksize = ChunkSize},
+ BufHandle = make_ref(),
+ call(Pid, {put_bufinf,BufHandle,BufInfo}, FileOpTimeout),
+ {ok,BufHandle}.
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 174ca0126b..04ae6b11e2 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -214,8 +214,7 @@ handle_op(?SSH_FXP_INIT, Version, B, State) when is_binary(B) ->
handle_op(?SSH_FXP_REALPATH, ReqId,
<<?UINT32(Rlen), RPath:Rlen/binary>>,
State0) ->
- RelPath0 = binary_to_list(RPath),
- RelPath = relate_file_name(RelPath0, State0, _Canonicalize=false),
+ RelPath = relate_file_name(RPath, State0, _Canonicalize=false),
{Res, State} = resolve_symlinks(RelPath, State0),
case Res of
{ok, AbsPath} ->
@@ -231,7 +230,7 @@ handle_op(?SSH_FXP_OPENDIR, ReqId,
<<?UINT32(RLen), RPath:RLen/binary>>,
State0 = #state{xf = #ssh_xfer{vsn = Vsn},
file_handler = FileMod, file_state = FS0}) ->
- RelPath = binary_to_list(RPath),
+ RelPath = unicode:characters_to_list(RPath),
AbsPath = relate_file_name(RelPath, State0),
XF = State0#state.xf,
@@ -312,9 +311,8 @@ handle_op(?SSH_FXP_WRITE, ReqId,
?SSH_FX_INVALID_HANDLE),
State
end;
-handle_op(?SSH_FXP_READLINK, ReqId, <<?UINT32(PLen), BPath:PLen/binary>>,
+handle_op(?SSH_FXP_READLINK, ReqId, <<?UINT32(PLen), RelPath:PLen/binary>>,
State = #state{file_handler = FileMod, file_state = FS0}) ->
- RelPath = binary_to_list(BPath),
AbsPath = relate_file_name(RelPath, State),
{Res, FS1} = FileMod:read_link(AbsPath, FS0),
case Res of
@@ -524,10 +522,10 @@ close_our_file({_,Fd}, FileMod, FS0) ->
%%% stat: do the stat
stat(Vsn, ReqId, Data, State, F) when Vsn =< 3->
<<?UINT32(BLen), BPath:BLen/binary>> = Data,
- stat(ReqId, binary_to_list(BPath), State, F);
+ stat(ReqId, unicode:characters_to_list(BPath), State, F);
stat(Vsn, ReqId, Data, State, F) when Vsn >= 4->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(_Flags)>> = Data,
- stat(ReqId, binary_to_list(BPath), State, F).
+ stat(ReqId, unicode:characters_to_list(BPath), State, F).
fstat(Vsn, ReqId, Data, State) when Vsn =< 3->
<<?UINT32(HLen), Handle:HLen/binary>> = Data,
@@ -561,72 +559,86 @@ stat(ReqId, RelPath, State0=#state{file_handler=FileMod,
send_status({error, E}, ReqId, State1)
end.
-decode_4_open_flag(create_new) ->
- [write];
-decode_4_open_flag(create_truncate) ->
- [write];
-decode_4_open_flag(truncate_existing) ->
- [write];
-decode_4_open_flag(open_existing) ->
- [read].
-
-decode_4_flags([OpenFlag | Flags]) ->
- decode_4_flags(Flags, decode_4_open_flag(OpenFlag)).
-
-decode_4_flags([], Flags) ->
- Flags;
-decode_4_flags([append_data|R], _Flags) ->
- decode_4_flags(R, [append]);
-decode_4_flags([append_data_atomic|R], _Flags) ->
- decode_4_flags(R, [append]);
-decode_4_flags([_|R], Flags) ->
- decode_4_flags(R, Flags).
-
-decode_4_access_flag(read_data) ->
- [read];
-decode_4_access_flag(list_directory) ->
- [read];
-decode_4_access_flag(write_data) ->
- [write];
-decode_4_access_flag(add_file) ->
- [write];
-decode_4_access_flag(add_subdirectory) ->
- [read];
-decode_4_access_flag(append_data) ->
- [append];
-decode_4_access_flag(write_attributes) ->
- [write];
-decode_4_access_flag(_) ->
- [read].
-
-decode_4_acess([_ | _] = Flags) ->
+sftp_to_erlang_flag(read, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ read;
+sftp_to_erlang_flag(write, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ write;
+sftp_to_erlang_flag(append, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ append;
+sftp_to_erlang_flag(creat, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ write;
+sftp_to_erlang_flag(trunc, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ write;
+sftp_to_erlang_flag(excl, Vsn) when Vsn == 3;
+ Vsn == 4 ->
+ read;
+sftp_to_erlang_flag(create_new, Vsn) when Vsn > 4 ->
+ write;
+sftp_to_erlang_flag(create_truncate, Vsn) when Vsn > 4 ->
+ write;
+sftp_to_erlang_flag(open_existing, Vsn) when Vsn > 4 ->
+ read;
+sftp_to_erlang_flag(open_or_create, Vsn) when Vsn > 4 ->
+ write;
+sftp_to_erlang_flag(truncate_existing, Vsn) when Vsn > 4 ->
+ write;
+sftp_to_erlang_flag(append_data, Vsn) when Vsn > 4 ->
+ append;
+sftp_to_erlang_flag(append_data_atomic, Vsn) when Vsn > 4 ->
+ append;
+sftp_to_erlang_flag(_, _) ->
+ read.
+
+sftp_to_erlang_flags(Flags, Vsn) ->
lists:map(fun(Flag) ->
- [decode_4_access_flag(Flag)]
- end, Flags);
-decode_4_acess([]) ->
- [].
+ sftp_to_erlang_flag(Flag, Vsn)
+ end, Flags).
+
+sftp_to_erlang_access_flag(read_data, _) ->
+ read;
+sftp_to_erlang_access_flag(list_directory, _) ->
+ read;
+sftp_to_erlang_access_flag(write_data, _) ->
+ write;
+sftp_to_erlang_access_flag(append_data, _) ->
+ append;
+sftp_to_erlang_access_flag(add_subdirectory, _) ->
+ read;
+sftp_to_erlang_access_flag(add_file, _) ->
+ write;
+sftp_to_erlang_access_flag(write_attributes, _) ->
+ write;
+sftp_to_erlang_access_flag(_, _) ->
+ read.
+sftp_to_erlang_access_flags(Flags, Vsn) ->
+ lists:map(fun(Flag) ->
+ sftp_to_erlang_access_flag(Flag, Vsn)
+ end, Flags).
open(Vsn, ReqId, Data, State) when Vsn =< 3 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(PFlags),
_Attrs/binary>> = Data,
- Path = binary_to_list(BPath),
- Flags = ssh_xfer:decode_open_flags(Vsn, PFlags),
+ Path = unicode:characters_to_list(BPath),
+ FlagBits = ssh_xfer:decode_open_flags(Vsn, PFlags),
+ Flags = lists:usort(sftp_to_erlang_flags(FlagBits, Vsn)),
do_open(ReqId, State, Path, Flags);
open(Vsn, ReqId, Data, State) when Vsn >= 4 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(Access),
?UINT32(PFlags), _Attrs/binary>> = Data,
- Path = binary_to_list(BPath),
+ Path = unicode:characters_to_list(BPath),
FlagBits = ssh_xfer:decode_open_flags(Vsn, PFlags),
AcessBits = ssh_xfer:decode_ace_mask(Access),
- %% TODO: This is to make sure the Access flags are not ignored
- %% but this should be thought through better. This solution should
- %% be considered a hack in order to buy some time. At least
- %% it works better than when the Access flags where totally ignored.
- %% A better solution may need some code refactoring that we do
- %% not have time for right now.
- AcessFlags = decode_4_acess(AcessBits),
- Flags = lists:append(lists:umerge(
- [[decode_4_flags(FlagBits)] | AcessFlags])),
+ %% TODO: There are still flags that are not
+ %% fully handled as SSH_FXF_ACCESS_TEXT_MODE and
+ %% a lot a ACE flags, the later we may not need
+ %% to understand as they are NFS flags
+ AcessFlags = sftp_to_erlang_access_flags(AcessBits, Vsn),
+ Flags = lists:usort(sftp_to_erlang_flags(FlagBits, Vsn) ++ AcessFlags),
do_open(ReqId, State, Path, Flags).
do_open(ReqId, State0, Path, Flags) ->
@@ -675,7 +687,7 @@ resolve_symlinks_2(["." | RestPath], State0, LinkCnt, AccPath) ->
resolve_symlinks_2([".." | RestPath], State0, LinkCnt, AccPath) ->
%% Remove the last path component
AccPathComps0 = filename:split(AccPath),
- Path = case lists:reverse(tl(lists:reverse(AccPathComps0))) of
+ Path = case lists:droplast(AccPathComps0) of
[] ->
"";
AccPathComps ->
@@ -712,7 +724,7 @@ relate_file_name(File, State) ->
relate_file_name(File, State, _Canonicalize=true).
relate_file_name(File, State, Canonicalize) when is_binary(File) ->
- relate_file_name(binary_to_list(File), State, Canonicalize);
+ relate_file_name(unicode:characters_to_list(File), State, Canonicalize);
relate_file_name(File, #state{cwd = CWD, root = ""}, Canonicalize) ->
relate_filename_to_path(File, CWD, Canonicalize);
relate_file_name(File, #state{root = Root}, Canonicalize) ->
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index 848133f838..660fe8bb65 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -173,8 +173,8 @@ ssh_acceptor_sup([_ | Rest]) ->
ssh_acceptor_sup(Rest).
stop_acceptor(Sup) ->
- [Name] =
- [SupName || {SupName, _, _, [ssh_acceptor_sup]} <-
+ [{Name, AcceptorSup}] =
+ [{SupName, ASup} || {SupName, ASup, _, [ssh_acceptor_sup]} <-
supervisor:which_children(Sup)],
- supervisor:terminate_child(Sup, Name).
+ supervisor:terminate_child(AcceptorSup, Name).
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 27723dc870..6c0873fd9e 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,12 +44,34 @@
versions(client, Options)->
Vsn = proplists:get_value(vsn, Options, ?DEFAULT_CLIENT_VERSION),
- Version = format_version(Vsn),
- {Vsn, Version};
+ {Vsn, format_version(Vsn, software_version(Options))};
versions(server, Options) ->
Vsn = proplists:get_value(vsn, Options, ?DEFAULT_SERVER_VERSION),
- Version = format_version(Vsn),
- {Vsn, Version}.
+ {Vsn, format_version(Vsn, software_version(Options))}.
+
+software_version(Options) ->
+ case proplists:get_value(id_string, Options) of
+ undefined ->
+ "Erlang"++ssh_vsn();
+ {random,Nlo,Nup} ->
+ random_id(Nlo,Nup);
+ ID ->
+ ID
+ end.
+
+ssh_vsn() ->
+ try {ok,L} = application:get_all_key(ssh),
+ proplists:get_value(vsn,L,"")
+ of
+ "" -> "";
+ VSN when is_list(VSN) -> "/" ++ VSN;
+ _ -> ""
+ catch
+ _:_ -> ""
+ end.
+
+random_id(Nlo, Nup) ->
+ [crypto:rand_uniform($a,$z+1) || _<- lists:duplicate(crypto:rand_uniform(Nlo,Nup+1),x) ].
hello_version_msg(Data) ->
[Data,"\r\n"].
@@ -77,21 +99,26 @@ is_valid_mac(Mac, Data, #ssh{recv_mac = Algorithm,
yes_no(Ssh, Prompt) ->
(Ssh#ssh.io_cb):yes_no(Prompt, Ssh).
-format_version({Major,Minor}) ->
+format_version({Major,Minor}, SoftwareVersion) ->
"SSH-" ++ integer_to_list(Major) ++ "." ++
- integer_to_list(Minor) ++ "-Erlang".
+ integer_to_list(Minor) ++ "-" ++ SoftwareVersion.
handle_hello_version(Version) ->
- StrVersion = trim_tail(Version),
- case string:tokens(Version, "-") of
- [_, "2.0" | _] ->
- {{2,0}, StrVersion};
- [_, "1.99" | _] ->
- {{2,0}, StrVersion};
- [_, "1.3" | _] ->
- {{1,3}, StrVersion};
- [_, "1.5" | _] ->
- {{1,5}, StrVersion}
+ try
+ StrVersion = trim_tail(Version),
+ case string:tokens(Version, "-") of
+ [_, "2.0" | _] ->
+ {{2,0}, StrVersion};
+ [_, "1.99" | _] ->
+ {{2,0}, StrVersion};
+ [_, "1.3" | _] ->
+ {{1,3}, StrVersion};
+ [_, "1.5" | _] ->
+ {{1,5}, StrVersion}
+ end
+ catch
+ error:_ ->
+ {undefined, "unknown version"}
end.
key_exchange_init_msg(Ssh0) ->
@@ -113,15 +140,28 @@ key_init(client, Ssh, Value) ->
key_init(server, Ssh, Value) ->
Ssh#ssh{s_keyinit = Value}.
+available_ssh_algos() ->
+ Supports = crypto:supports(),
+ CipherAlgos = [{aes_ctr, "aes128-ctr"}, {aes_cbc128, "aes128-cbc"}, {des3_cbc, "3des-cbc"}],
+ Ciphers = [SshAlgo ||
+ {CryptoAlgo, SshAlgo} <- CipherAlgos,
+ lists:member(CryptoAlgo, proplists:get_value(ciphers, Supports, []))],
+ HashAlgos = [{sha256, "hmac-sha2-256"}, {sha, "hmac-sha1"}],
+ Hashs = [SshAlgo ||
+ {CryptoAlgo, SshAlgo} <- HashAlgos,
+ lists:member(CryptoAlgo, proplists:get_value(hashs, Supports, []))],
+ {Ciphers, Hashs}.
+
kexinit_messsage(client, Random, Compression, HostKeyAlgs) ->
+ {CipherAlgs, HashAlgs} = available_ssh_algos(),
#ssh_msg_kexinit{
cookie = Random,
kex_algorithms = ["diffie-hellman-group1-sha1"],
server_host_key_algorithms = HostKeyAlgs,
- encryption_algorithms_client_to_server = ["aes128-cbc","3des-cbc"],
- encryption_algorithms_server_to_client = ["aes128-cbc","3des-cbc"],
- mac_algorithms_client_to_server = ["hmac-sha1"],
- mac_algorithms_server_to_client = ["hmac-sha1"],
+ encryption_algorithms_client_to_server = CipherAlgs,
+ encryption_algorithms_server_to_client = CipherAlgs,
+ mac_algorithms_client_to_server = HashAlgs,
+ mac_algorithms_server_to_client = HashAlgs,
compression_algorithms_client_to_server = Compression,
compression_algorithms_server_to_client = Compression,
languages_client_to_server = [],
@@ -129,14 +169,15 @@ kexinit_messsage(client, Random, Compression, HostKeyAlgs) ->
};
kexinit_messsage(server, Random, Compression, HostKeyAlgs) ->
+ {CipherAlgs, HashAlgs} = available_ssh_algos(),
#ssh_msg_kexinit{
cookie = Random,
kex_algorithms = ["diffie-hellman-group1-sha1"],
server_host_key_algorithms = HostKeyAlgs,
- encryption_algorithms_client_to_server = ["aes128-cbc","3des-cbc"],
- encryption_algorithms_server_to_client = ["aes128-cbc","3des-cbc"],
- mac_algorithms_client_to_server = ["hmac-sha1"],
- mac_algorithms_server_to_client = ["hmac-sha1"],
+ encryption_algorithms_client_to_server = CipherAlgs,
+ encryption_algorithms_server_to_client = CipherAlgs,
+ mac_algorithms_client_to_server = HashAlgs,
+ mac_algorithms_server_to_client = HashAlgs,
compression_algorithms_client_to_server = Compression,
compression_algorithms_server_to_client = Compression,
languages_client_to_server = [],
@@ -199,20 +240,30 @@ key_exchange_first_msg('diffie-hellman-group-exchange-sha1', Ssh0) ->
handle_kexdh_init(#ssh_msg_kexdh_init{e = E}, Ssh0) ->
{G, P} = dh_group1(),
- {Private, Public} = dh_gen_key(G, P, 1024),
- K = ssh_math:ipow(E, Private, P),
- Key = get_host_key(Ssh0),
- H = kex_h(Ssh0, Key, E, Public, K),
- H_SIG = sign_host_key(Ssh0, Key, H),
- {SshPacket, Ssh1} = ssh_packet(#ssh_msg_kexdh_reply{public_host_key = Key,
- f = Public,
- h_sig = H_SIG
- }, Ssh0),
-
- {ok, SshPacket, Ssh1#ssh{keyex_key = {{Private, Public}, {G, P}},
- shared_secret = K,
- exchanged_hash = H,
- session_id = sid(Ssh1, H)}}.
+ if
+ 1=<E, E=<(P-1) ->
+ {Private, Public} = dh_gen_key(G, P, 1024),
+ K = ssh_math:ipow(E, Private, P),
+ Key = get_host_key(Ssh0),
+ H = kex_h(Ssh0, Key, E, Public, K),
+ H_SIG = sign_host_key(Ssh0, Key, H),
+ {SshPacket, Ssh1} = ssh_packet(#ssh_msg_kexdh_reply{public_host_key = Key,
+ f = Public,
+ h_sig = H_SIG
+ }, Ssh0),
+
+ {ok, SshPacket, Ssh1#ssh{keyex_key = {{Private, Public}, {G, P}},
+ shared_secret = K,
+ exchanged_hash = H,
+ session_id = sid(Ssh1, H)}};
+ true ->
+ Error = {error,bad_e_from_peer},
+ Disconnect = #ssh_msg_disconnect{
+ code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = "Key exchange failed, 'f' out of bounds",
+ language = "en"},
+ throw({Error, Disconnect})
+ end.
handle_kex_dh_gex_group(#ssh_msg_kex_dh_gex_group{p = P, g = G}, Ssh0) ->
{Private, Public} = dh_gen_key(G,P,1024),
@@ -236,7 +287,7 @@ handle_new_keys(#ssh_msg_newkeys{}, Ssh0) ->
%% %% Select algorithms
handle_kexdh_reply(#ssh_msg_kexdh_reply{public_host_key = HostKey, f = F,
h_sig = H_SIG},
- #ssh{keyex_key = {{Private, Public}, {_G, P}}} = Ssh0) ->
+ #ssh{keyex_key = {{Private, Public}, {_G, P}}} = Ssh0) when 1=<F, F=<(P-1)->
K = ssh_math:ipow(F, Private, P),
H = kex_h(Ssh0, HostKey, Public, F, K),
@@ -252,7 +303,15 @@ handle_kexdh_reply(#ssh_msg_kexdh_reply{public_host_key = HostKey, f = F,
description = "Key exchange failed",
language = "en"},
throw({Error, Disconnect})
- end.
+ end;
+handle_kexdh_reply(#ssh_msg_kexdh_reply{}, _SSH) ->
+ Error = {error,bad_f_from_peer},
+ Disconnect = #ssh_msg_disconnect{
+ code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
+ description = "Key exchange failed, 'f' out of bounds",
+ language = "en"},
+ throw({Error, Disconnect}).
+
handle_kex_dh_gex_request(#ssh_msg_kex_dh_gex_request{min = _Min,
n = _NBits,
@@ -478,10 +537,15 @@ alg_final(SSH0) ->
{ok,SSH6} = decompress_final(SSH5),
SSH6.
-select_all(CL, SL) ->
+select_all(CL, SL) when length(CL) + length(SL) < 50 ->
A = CL -- SL, %% algortihms only used by client
%% algorithms used by client and server (client pref)
- lists:map(fun(ALG) -> list_to_atom(ALG) end, (CL -- A)).
+ lists:map(fun(ALG) -> list_to_atom(ALG) end, (CL -- A));
+select_all(_CL, _SL) ->
+ throw(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_PROTOCOL_ERROR,
+ description = "Too many algorithms",
+ language = "en"}).
+
select([], []) ->
none;
@@ -636,7 +700,21 @@ encrypt_init(#ssh{encrypt = 'aes128-cbc', role = server} = Ssh) ->
<<K:16/binary>> = hash(Ssh, "D", 128),
{ok, Ssh#ssh{encrypt_keys = K,
encrypt_block_size = 16,
- encrypt_ctx = IV}}.
+ encrypt_ctx = IV}};
+encrypt_init(#ssh{encrypt = 'aes128-ctr', role = client} = Ssh) ->
+ IV = hash(Ssh, "A", 128),
+ <<K:16/binary>> = hash(Ssh, "C", 128),
+ State = crypto:stream_init(aes_ctr, K, IV),
+ {ok, Ssh#ssh{encrypt_keys = K,
+ encrypt_block_size = 16,
+ encrypt_ctx = State}};
+encrypt_init(#ssh{encrypt = 'aes128-ctr', role = server} = Ssh) ->
+ IV = hash(Ssh, "B", 128),
+ <<K:16/binary>> = hash(Ssh, "D", 128),
+ State = crypto:stream_init(aes_ctr, K, IV),
+ {ok, Ssh#ssh{encrypt_keys = K,
+ encrypt_block_size = 16,
+ encrypt_ctx = State}}.
encrypt_final(Ssh) ->
{ok, Ssh#ssh{encrypt = none,
@@ -658,7 +736,11 @@ encrypt(#ssh{encrypt = 'aes128-cbc',
encrypt_ctx = IV0} = Ssh, Data) ->
Enc = crypto:block_encrypt(aes_cbc128, K,IV0,Data),
IV = crypto:next_iv(aes_cbc, Enc),
- {Ssh#ssh{encrypt_ctx = IV}, Enc}.
+ {Ssh#ssh{encrypt_ctx = IV}, Enc};
+encrypt(#ssh{encrypt = 'aes128-ctr',
+ encrypt_ctx = State0} = Ssh, Data) ->
+ {State, Enc} = crypto:stream_encrypt(State0,Data),
+ {Ssh#ssh{encrypt_ctx = State}, Enc}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -690,7 +772,21 @@ decrypt_init(#ssh{decrypt = 'aes128-cbc', role = server} = Ssh) ->
hash(Ssh, "C", 128)},
<<K:16/binary>> = KD,
{ok, Ssh#ssh{decrypt_keys = K, decrypt_ctx = IV,
- decrypt_block_size = 16}}.
+ decrypt_block_size = 16}};
+decrypt_init(#ssh{decrypt = 'aes128-ctr', role = client} = Ssh) ->
+ IV = hash(Ssh, "B", 128),
+ <<K:16/binary>> = hash(Ssh, "D", 128),
+ State = crypto:stream_init(aes_ctr, K, IV),
+ {ok, Ssh#ssh{decrypt_keys = K,
+ decrypt_block_size = 16,
+ decrypt_ctx = State}};
+decrypt_init(#ssh{decrypt = 'aes128-ctr', role = server} = Ssh) ->
+ IV = hash(Ssh, "A", 128),
+ <<K:16/binary>> = hash(Ssh, "C", 128),
+ State = crypto:stream_init(aes_ctr, K, IV),
+ {ok, Ssh#ssh{decrypt_keys = K,
+ decrypt_block_size = 16,
+ decrypt_ctx = State}}.
decrypt_final(Ssh) ->
@@ -711,7 +807,11 @@ decrypt(#ssh{decrypt = 'aes128-cbc', decrypt_keys = Key,
decrypt_ctx = IV0} = Ssh, Data) ->
Dec = crypto:block_decrypt(aes_cbc128, Key,IV0,Data),
IV = crypto:next_iv(aes_cbc, Data),
- {Ssh#ssh{decrypt_ctx = IV}, Dec}.
+ {Ssh#ssh{decrypt_ctx = IV}, Dec};
+decrypt(#ssh{decrypt = 'aes128-ctr',
+ decrypt_ctx = State0} = Ssh, Data) ->
+ {State, Enc} = crypto:stream_decrypt(State0,Data),
+ {Ssh#ssh{decrypt_ctx = State}, Enc}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Compression
@@ -846,7 +946,9 @@ mac('hmac-sha1-96', Key, SeqNum, Data) ->
mac('hmac-md5', Key, SeqNum, Data) ->
crypto:hmac(md5, Key, [<<?UINT32(SeqNum)>>, Data]);
mac('hmac-md5-96', Key, SeqNum, Data) ->
- crypto:hmac(md5, Key, [<<?UINT32(SeqNum)>>, Data], mac_digest_size('hmac-md5-96')).
+ crypto:hmac(md5, Key, [<<?UINT32(SeqNum)>>, Data], mac_digest_size('hmac-md5-96'));
+mac('hmac-sha2-256', Key, SeqNum, Data) ->
+ crypto:hmac(sha256, Key, [<<?UINT32(SeqNum)>>, Data]).
%% return N hash bytes (HASH)
hash(SSH, Char, Bits) ->
@@ -911,12 +1013,14 @@ mac_key_size('hmac-sha1') -> 20*8;
mac_key_size('hmac-sha1-96') -> 20*8;
mac_key_size('hmac-md5') -> 16*8;
mac_key_size('hmac-md5-96') -> 16*8;
+mac_key_size('hmac-sha2-256')-> 32*8;
mac_key_size(none) -> 0.
mac_digest_size('hmac-sha1') -> 20;
mac_digest_size('hmac-sha1-96') -> 12;
mac_digest_size('hmac-md5') -> 20;
mac_digest_size('hmac-md5-96') -> 12;
+mac_digest_size('hmac-sha2-256') -> 32;
mac_digest_size(none) -> 0.
peer_name({Host, _}) ->
diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl
index e18e18a9a9..2743b704f1 100644
--- a/lib/ssh/src/ssh_xfer.erl
+++ b/lib/ssh/src/ssh_xfer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,12 +23,12 @@
-module(ssh_xfer).
--export([attach/2, connect/3]).
+-export([attach/2, connect/3, connect/4]).
-export([open/6, opendir/3, readdir/3, close/3, read/5, write/5,
rename/5, remove/3, mkdir/4, rmdir/3, realpath/3, extended/4,
stat/4, fstat/4, lstat/4, setstat/4,
readlink/3, fsetstat/4, symlink/4,
- protocol_version_request/1,
+ protocol_version_request/2,
xf_reply/2,
xf_send_reply/3, xf_send_names/3, xf_send_name/4,
xf_send_status/3, xf_send_status/4, xf_send_status/5,
@@ -58,6 +58,13 @@ connect(Host, Port, Opts) ->
Error -> Error
end.
+connect(Host, Port, Opts, Timeout) ->
+ case ssh:connect(Host, Port, Opts, Timeout) of
+ {ok, CM} -> open_xfer(CM, [{timeout, Timeout}|Opts]);
+ {error, Timeout} -> {error, timeout};
+ Error -> Error
+ end.
+
open_xfer(CM, Opts) ->
TMO = proplists:get_value(timeout, Opts, infinity),
case ssh_connection:session_channel(CM, ?XFER_WINDOW_SIZE, ?XFER_PACKET_SIZE, TMO) of
@@ -67,12 +74,11 @@ open_xfer(CM, Opts) ->
Error
end.
-protocol_version_request(XF) ->
- xf_request(XF, ?SSH_FXP_INIT, <<?UINT32(?SSH_SFTP_PROTOCOL_VERSION)>>).
+protocol_version_request(XF, Version) ->
+ xf_request(XF, ?SSH_FXP_INIT, <<?UINT32(Version)>>).
open(XF, ReqID, FileName, Access, Flags, Attrs) ->
Vsn = XF#ssh_xfer.vsn,
- FileName1 = unicode:characters_to_binary(FileName),
MBits = if Vsn >= 5 ->
M = encode_ace_mask(Access),
?uint32(M);
@@ -82,7 +88,7 @@ open(XF, ReqID, FileName, Access, Flags, Attrs) ->
F = encode_open_flags(Flags),
xf_request(XF,?SSH_FXP_OPEN,
[?uint32(ReqID),
- ?binary(FileName1),
+ ?string_utf8(FileName),
MBits,
?uint32(F),
encode_ATTR(Vsn,Attrs)]).
@@ -90,7 +96,7 @@ open(XF, ReqID, FileName, Access, Flags, Attrs) ->
opendir(XF, ReqID, DirName) ->
xf_request(XF, ?SSH_FXP_OPENDIR,
[?uint32(ReqID),
- ?string(DirName)]).
+ ?string_utf8(DirName)]).
close(XF, ReqID, Handle) ->
@@ -127,13 +133,11 @@ write(XF,ReqID, Handle, Offset, Data) ->
remove(XF, ReqID, File) ->
xf_request(XF, ?SSH_FXP_REMOVE,
[?uint32(ReqID),
- ?string(File)]).
+ ?string_utf8(File)]).
%% Rename a file/directory
-rename(XF, ReqID, Old, New, Flags) ->
+rename(XF, ReqID, OldPath, NewPath, Flags) ->
Vsn = XF#ssh_xfer.vsn,
- OldPath = unicode:characters_to_binary(Old),
- NewPath = unicode:characters_to_binary(New),
FlagBits
= if Vsn >= 5 ->
F0 = encode_rename_flags(Flags),
@@ -143,30 +147,27 @@ rename(XF, ReqID, Old, New, Flags) ->
end,
xf_request(XF, ?SSH_FXP_RENAME,
[?uint32(ReqID),
- ?binary(OldPath),
- ?binary(NewPath),
+ ?string_utf8(OldPath),
+ ?string_utf8(NewPath),
FlagBits]).
%% Create directory
mkdir(XF, ReqID, Path, Attrs) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_MKDIR,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
encode_ATTR(XF#ssh_xfer.vsn, Attrs)]).
%% Remove a directory
rmdir(XF, ReqID, Dir) ->
- Dir1 = unicode:characters_to_binary(Dir),
xf_request(XF, ?SSH_FXP_RMDIR,
[?uint32(ReqID),
- ?binary(Dir1)]).
+ ?string_utf8(Dir)]).
%% Stat file
stat(XF, ReqID, Path, Flags) ->
- Path1 = unicode:characters_to_binary(Path),
Vsn = XF#ssh_xfer.vsn,
AttrFlags = if Vsn >= 5 ->
F = encode_attr_flags(Vsn, Flags),
@@ -176,13 +177,12 @@ stat(XF, ReqID, Path, Flags) ->
end,
xf_request(XF, ?SSH_FXP_STAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
AttrFlags]).
%% Stat file - follow symbolic links
lstat(XF, ReqID, Path, Flags) ->
- Path1 = unicode:characters_to_binary(Path),
Vsn = XF#ssh_xfer.vsn,
AttrFlags = if Vsn >= 5 ->
F = encode_attr_flags(Vsn, Flags),
@@ -192,7 +192,7 @@ lstat(XF, ReqID, Path, Flags) ->
end,
xf_request(XF, ?SSH_FXP_LSTAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
AttrFlags]).
%% Stat open file
@@ -211,10 +211,9 @@ fstat(XF, ReqID, Handle, Flags) ->
%% Modify file attributes
setstat(XF, ReqID, Path, Attrs) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_SETSTAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
encode_ATTR(XF#ssh_xfer.vsn, Attrs)]).
@@ -227,10 +226,9 @@ fsetstat(XF, ReqID, Handle, Attrs) ->
%% Read a symbolic link
readlink(XF, ReqID, Path) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_READLINK,
[?uint32(ReqID),
- ?binary(Path1)]).
+ ?string_utf8(Path)]).
%% Create a symbolic link
@@ -244,10 +242,9 @@ symlink(XF, ReqID, LinkPath, TargetPath) ->
%% Convert a path into a 'canonical' form
realpath(XF, ReqID, Path) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_REALPATH,
[?uint32(ReqID),
- ?binary(Path1)]).
+ ?string_utf8(Path)]).
extended(XF, ReqID, Request, Data) ->
xf_request(XF, ?SSH_FXP_EXTENDED,
@@ -296,7 +293,10 @@ xf_send_names(#ssh_xfer{cm = CM, channel = Channel, vsn = Vsn},
Count = length(NamesAndAttrs),
{Data, Len} = encode_names(Vsn, NamesAndAttrs),
Size = 1 + 4 + 4 + Len,
- ToSend = [<<?UINT32(Size), ?SSH_FXP_NAME, ?UINT32(ReqId), ?UINT32(Count)>>,
+ ToSend = [<<?UINT32(Size),
+ ?SSH_FXP_NAME,
+ ?UINT32(ReqId),
+ ?UINT32(Count)>>,
Data],
ssh_connection:send(CM, Channel, ToSend).
@@ -818,25 +818,27 @@ decode_names(_Vsn, 0, _Data) ->
decode_names(Vsn, I, <<?UINT32(Len), FileName:Len/binary,
?UINT32(LLen), _LongName:LLen/binary,
Tail/binary>>) when Vsn =< 3 ->
- Name = binary_to_list(FileName),
+ Name = unicode:characters_to_list(FileName),
{A, Tail2} = decode_ATTR(Vsn, Tail),
[{Name, A} | decode_names(Vsn, I-1, Tail2)];
decode_names(Vsn, I, <<?UINT32(Len), FileName:Len/binary,
Tail/binary>>) when Vsn >= 4 ->
- Name = binary_to_list(FileName),
+ Name = unicode:characters_to_list(FileName),
{A, Tail2} = decode_ATTR(Vsn, Tail),
[{Name, A} | decode_names(Vsn, I-1, Tail2)].
encode_names(Vsn, NamesAndAttrs) ->
lists:mapfoldl(fun(N, L) -> encode_name(Vsn, N, L) end, 0, NamesAndAttrs).
-encode_name(Vsn, {Name,Attr}, Len) when Vsn =< 3 ->
+encode_name(Vsn, {NameUC,Attr}, Len) when Vsn =< 3 ->
+ Name = binary_to_list(unicode:characters_to_binary(NameUC)),
NLen = length(Name),
EncAttr = encode_ATTR(Vsn, Attr),
ALen = size(EncAttr),
NewLen = Len + NLen*2 + 4 + 4 + ALen,
{[<<?UINT32(NLen)>>, Name, <<?UINT32(NLen)>>, Name, EncAttr], NewLen};
-encode_name(Vsn, {Name,Attr}, Len) when Vsn >= 4 ->
+encode_name(Vsn, {NameUC,Attr}, Len) when Vsn >= 4 ->
+ Name = binary_to_list(unicode:characters_to_binary(NameUC)),
NLen = length(Name),
EncAttr = encode_ATTR(Vsn, Attr),
ALen = size(EncAttr),
@@ -851,9 +853,9 @@ encode_acl_items([ACE|As]) ->
Type = encode_ace_type(ACE#ssh_xfer_ace.type),
Flag = encode_ace_flag(ACE#ssh_xfer_ace.flag),
Mask = encode_ace_mask(ACE#ssh_xfer_ace.mask),
- Who = list_to_binary(ACE#ssh_xfer_ace.who),
+ Who = ACE#ssh_xfer_ace.who,
[?uint32(Type), ?uint32(Flag), ?uint32(Mask),
- ?binary(Who) | encode_acl_items(As)];
+ ?string_utf8(Who) | encode_acl_items(As)];
encode_acl_items([]) ->
[].
@@ -872,7 +874,7 @@ decode_acl_items(I, <<?UINT32(Type),
[#ssh_xfer_ace { type = decode_ace_type(Type),
flag = decode_ace_flag(Flag),
mask = decode_ace_mask(Mask),
- who = binary_to_list(BWho)} | Acc]).
+ who = unicode:characters_to_list(BWho)} | Acc]).
encode_extensions(Exts) ->
Count = length(Exts),
diff --git a/lib/ssh/test/property_test/README b/lib/ssh/test/property_test/README
new file mode 100644
index 0000000000..57602bf719
--- /dev/null
+++ b/lib/ssh/test/property_test/README
@@ -0,0 +1,12 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% WARNING %%%
+%%% %%%
+%%% This is experimental code which may be changed or removed %%%
+%%% anytime without any warning. %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+The test in this directory are written assuming that the user has a QuickCheck license. They are to be run manually. Some may be possible to be run with other tools, e.g. PropEr.
+
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server.erl b/lib/ssh/test/property_test/ssh_eqc_client_server.erl
new file mode 100644
index 0000000000..123b48412b
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server.erl
@@ -0,0 +1,618 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(ssh_eqc_client_server).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+-ifdef(PROPER).
+%% Proper is not supported.
+-else.
+-ifdef(TRIQ).
+%% Proper is not supported.
+-else.
+
+
+%% Limit the testing time on CI server... this needs to be improved in % from total budget.
+-define(TESTINGTIME(Prop), eqc:testing_time(30,Prop)).
+
+
+-include_lib("eqc/include/eqc.hrl").
+-include_lib("eqc/include/eqc_statem.hrl").
+-eqc_group_commands(true).
+
+-define(SSH_DIR,"ssh_eqc_client_server_dirs").
+
+-define(sec, *1000).
+-define(min, *60?sec).
+
+-record(srvr,{ref,
+ address,
+ port
+ }).
+
+-record(conn,{ref,
+ srvr_ref
+ }).
+
+-record(chan, {ref,
+ conn_ref,
+ subsystem,
+ client_pid
+ }).
+
+-record(state,{
+ initialized = false,
+ servers = [], % [#srvr{}]
+ clients = [],
+ connections = [], % [#conn{}]
+ channels = [], % [#chan{}]
+ data_dir
+ }).
+
+%%%===============================================================
+%%%
+%%% Specification of addresses, subsystems and such.
+%%%
+
+-define(MAX_NUM_SERVERS, 3).
+-define(MAX_NUM_CLIENTS, 3).
+
+-define(SUBSYSTEMS, ["echo1", "echo2", "echo3", "echo4"]).
+
+-define(SERVER_ADDRESS, { {127,1,0,choose(1,254)}, % IP
+ choose(1024,65535) % Port
+ }).
+
+-define(SERVER_EXTRA_OPTIONS, [{parallel_login,bool()}] ).
+
+
+%%%================================================================
+%%%
+%%% The properties - one sequantial and one parallel with the same model
+%%%
+%%% Run as
+%%%
+%%% $ (cd ..; make)
+%%% $ erl -pz ..
+%%%
+%%% eqc:quickcheck( ssh_eqc_client_server:prop_seq() ).
+%%% eqc:quickcheck( ssh_eqc_client_server:prop_parallel() ).
+%%% eqc:quickcheck( ssh_eqc_client_server:prop_parallel_multi() ).
+%%%
+
+
+%% To be called as eqc:quickcheck( ssh_eqc_client_server:prop_seq() ).
+prop_seq() ->
+ ?TESTINGTIME(do_prop_seq(?SSH_DIR)).
+
+%% To be called from a common_test test suite
+prop_seq(CT_Config) ->
+ do_prop_seq(full_path(?SSH_DIR, CT_Config)).
+
+
+do_prop_seq(DataDir) ->
+ setup_rsa(DataDir),
+ ?FORALL(Cmds,commands(?MODULE),
+ begin
+ {H,Sf,Result} = run_commands(?MODULE,Cmds,[{data_dir,DataDir}]),
+ present_result(?MODULE, Cmds, {H,Sf,Result}, Result==ok)
+ end).
+
+full_path(SSHdir, CT_Config) ->
+ filename:join(proplists:get_value(property_dir, CT_Config),
+ SSHdir).
+%%%----
+prop_parallel() ->
+ ?TESTINGTIME(do_prop_parallel(?SSH_DIR)).
+
+%% To be called from a common_test test suite
+prop_parallel(CT_Config) ->
+ do_prop_parallel(full_path(?SSH_DIR, CT_Config)).
+
+do_prop_parallel(DataDir) ->
+ setup_rsa(DataDir),
+ ?FORALL(Cmds,parallel_commands(?MODULE),
+ begin
+ {H,Sf,Result} = run_parallel_commands(?MODULE,Cmds,[{data_dir,DataDir}]),
+ present_result(?MODULE, Cmds, {H,Sf,Result}, Result==ok)
+ end).
+
+%%%----
+prop_parallel_multi() ->
+ ?TESTINGTIME(do_prop_parallel_multi(?SSH_DIR)).
+
+%% To be called from a common_test test suite
+prop_parallel_multi(CT_Config) ->
+ do_prop_parallel_multi(full_path(?SSH_DIR, CT_Config)).
+
+do_prop_parallel_multi(DataDir) ->
+ setup_rsa(DataDir),
+ ?FORALL(Repetitions,?SHRINK(1,[10]),
+ ?FORALL(Cmds,parallel_commands(?MODULE),
+ ?ALWAYS(Repetitions,
+ begin
+ {H,Sf,Result} = run_parallel_commands(?MODULE,Cmds,[{data_dir,DataDir}]),
+ present_result(?MODULE, Cmds, {H,Sf,Result}, Result==ok)
+ end))).
+
+%%%================================================================
+%%% State machine spec
+
+%%% called when using commands/1
+initial_state() ->
+ #state{}.
+
+%%% called when using commands/2
+initial_state(DataDir) ->
+ application:stop(ssh),
+ ssh:start().
+
+%%%----------------
+weight(S, ssh_send) -> 5*length([C || C<-S#state.channels, has_subsyst(C)]);
+weight(S, ssh_start_subsyst) -> 3*length([C || C<-S#state.channels, no_subsyst(C)]);
+weight(S, ssh_close_channel) -> 2*length([C || C<-S#state.channels, has_subsyst(C)]);
+weight(S, ssh_open_channel) -> length(S#state.connections);
+weight(_S, _) -> 1.
+
+%%%----------------
+%%% Initialize
+
+initial_state_pre(S) -> not S#state.initialized.
+
+initial_state_args(_) -> [{var,data_dir}].
+
+initial_state_next(S, _, _) -> S#state{initialized=true}.
+
+%%%----------------
+%%% Start a new daemon
+%%% Precondition: not more than ?MAX_NUM_SERVERS started
+
+%%% This is a bit funny because we need to pick an IP address and Port to
+%%% run the server on, but there is no way to atomically select a free Port!
+%%%
+%%% Therefore we just grab one IP-Port pair randomly and try to start the ssh server
+%%% on that pair. If it fails, we just forget about it and goes on. Yes, it
+%%% is a waste of cpu cycles, but at least it works!
+
+ssh_server_pre(S) -> S#state.initialized andalso
+ length(S#state.servers) < ?MAX_NUM_SERVERS.
+
+ssh_server_args(_) -> [?SERVER_ADDRESS, {var,data_dir}, ?SERVER_EXTRA_OPTIONS].
+
+ssh_server({IP,Port}, DataDir, ExtraOptions) ->
+ ok(ssh:daemon(IP, Port,
+ [
+ {system_dir, system_dir(DataDir)},
+ {user_dir, user_dir(DataDir)},
+ {subsystems, [{SS, {ssh_eqc_subsys, [SS]}} || SS <- ?SUBSYSTEMS]}
+ | ExtraOptions
+ ])).
+
+ssh_server_post(_S, _Args, {error,eaddrinuse}) -> true;
+ssh_server_post(_S, _Args, Result) -> is_ok(Result).
+
+ssh_server_next(S, {error,eaddrinuse}, _) -> S;
+ssh_server_next(S, Result, [{IP,Port},_,_]) ->
+ S#state{servers=[#srvr{ref = Result,
+ address = IP,
+ port = Port}
+ | S#state.servers]}.
+
+%%%----------------
+%%% Start a new client
+%%% Precondition: not more than ?MAX_NUM_CLIENTS started
+
+ssh_client_pre(S) -> S#state.initialized andalso
+ length(S#state.clients) < ?MAX_NUM_CLIENTS.
+
+ssh_client_args(_S) -> [].
+
+ssh_client() -> spawn(fun client_init/0).
+
+ssh_client_next(S, Pid, _) -> S#state{clients=[Pid|S#state.clients]}.
+
+
+client_init() -> client_loop().
+
+client_loop() ->
+ receive
+ {please_do,Fun,Ref,Pid} ->
+ Pid ! {my_pleasure, catch Fun(), Ref},
+ client_loop()
+ end.
+
+do(Pid, Fun) -> do(Pid, Fun, 30?sec).
+
+do(Pid, Fun, Timeout) when is_function(Fun,0) ->
+ Pid ! {please_do,Fun,Ref=make_ref(),self()},
+ receive
+ {my_pleasure, Result, Ref} -> Result
+ after
+ Timeout -> {error,do_timeout}
+ end.
+
+%%%----------------
+%%% Start a new connection
+%%% Precondition: deamon exists
+
+ssh_open_connection_pre(S) -> S#state.servers /= [].
+
+ssh_open_connection_args(S) -> [oneof(S#state.servers), {var,data_dir}].
+
+ssh_open_connection(#srvr{address=Ip, port=Port}, DataDir) ->
+ ok(ssh:connect(ensure_string(Ip), Port,
+ [
+ {silently_accept_hosts, true},
+ {user_dir, user_dir(DataDir)},
+ {user_interaction, false},
+ {connect_timeout, 2000}
+ ], 2000)).
+
+ssh_open_connection_post(_S, _Args, Result) -> is_ok(Result).
+
+ssh_open_connection_next(S, ConnRef, [#srvr{ref=SrvrRef},_]) ->
+ S#state{connections=[#conn{ref=ConnRef, srvr_ref=SrvrRef}|S#state.connections]}.
+
+%%%----------------
+%%% Stop a new connection
+%%% Precondition: connection exists
+
+ssh_close_connection_pre(S) -> S#state.connections /= [].
+
+ssh_close_connection_args(S) -> [oneof(S#state.connections)].
+
+ssh_close_connection(#conn{ref=ConnectionRef}) -> ssh:close(ConnectionRef).
+
+ssh_close_connection_next(S, _, [Conn=#conn{ref=ConnRef}]) ->
+ S#state{connections = S#state.connections--[Conn],
+ channels = [C || C <- S#state.channels,
+ C#chan.conn_ref /= ConnRef]
+ }.
+
+%%%----------------
+%%% Start a new channel without a sub system
+%%% Precondition: connection exists
+
+ssh_open_channel_pre(S) -> S#state.connections /= [].
+
+ssh_open_channel_args(S) -> [oneof(S#state.connections)].
+
+%%% For re-arrangement in parallel tests.
+ssh_open_channel_pre(S,[C]) -> lists:member(C,S#state.connections).
+
+ssh_open_channel(#conn{ref=ConnectionRef}) ->
+ ok(ssh_connection:session_channel(ConnectionRef, 20?sec)).
+
+ssh_open_channel_post(_S, _Args, Result) -> is_ok(Result).
+
+ssh_open_channel_next(S, ChannelRef, [#conn{ref=ConnRef}]) ->
+ S#state{channels=[#chan{ref=ChannelRef,
+ conn_ref=ConnRef}
+ | S#state.channels]}.
+
+%%%----------------
+%%% Stop a channel
+%%% Precondition: a channel exists, with or without a subsystem
+
+ssh_close_channel_pre(S) -> S#state.channels /= [].
+
+ssh_close_channel_args(S) -> [oneof(S#state.channels)].
+
+ssh_close_channel(#chan{ref=ChannelRef, conn_ref=ConnectionRef}) ->
+ ssh_connection:close(ConnectionRef, ChannelRef).
+
+ssh_close_channel_next(S, _, [C]) ->
+ S#state{channels = [Ci || Ci <- S#state.channels,
+ sig(C) /= sig(Ci)]}.
+
+
+sig(C) -> {C#chan.ref, C#chan.conn_ref}.
+
+
+%%%----------------
+%%% Start a sub system on a channel
+%%% Precondition: A channel without subsystem exists
+
+ssh_start_subsyst_pre(S) -> lists:any(fun no_subsyst/1, S#state.channels) andalso
+ S#state.clients /= [].
+
+ssh_start_subsyst_args(S) -> [oneof(lists:filter(fun no_subsyst/1, S#state.channels)),
+ oneof(?SUBSYSTEMS),
+ oneof(S#state.clients)
+ ].
+
+%% For re-arrangement in parallel tests.
+ssh_start_subsyst_pre(S, [C|_]) -> lists:member(C,S#state.channels)
+ andalso no_subsyst(C).
+
+ssh_start_subsyst(#chan{ref=ChannelRef, conn_ref=ConnectionRef}, SubSystem, Pid) ->
+ do(Pid, fun()->ssh_connection:subsystem(ConnectionRef, ChannelRef, SubSystem, 120?sec) end).
+
+ssh_start_subsyst_post(_S, _Args, Result) -> Result==success.
+
+ssh_start_subsyst_next(S, _Result, [C,SS,Pid|_]) ->
+ S#state{channels = [C#chan{subsystem=SS,
+ client_pid=Pid}|(S#state.channels--[C])] }.
+
+%%%----------------
+%%% Send a message on a channel
+%%% Precondition: a channel exists with a subsystem connected
+
+ssh_send_pre(S) -> lists:any(fun has_subsyst/1, S#state.channels).
+
+ssh_send_args(S) -> [oneof(lists:filter(fun has_subsyst/1, S#state.channels)),
+ choose(0,1),
+ message()].
+
+%% For re-arrangement in parallel tests.
+ssh_send_pre(S, [C|_]) -> lists:member(C, S#state.channels).
+
+ssh_send(C=#chan{conn_ref=ConnectionRef, ref=ChannelRef, client_pid=Pid}, Type, Msg) ->
+ do(Pid,
+ fun() ->
+ case ssh_connection:send(ConnectionRef, ChannelRef, Type, modify_msg(C,Msg), 10?sec) of
+ ok ->
+ receive
+ {ssh_cm,ConnectionRef,{data,ChannelRef,Type,Answer}} -> Answer
+ after 15?sec ->
+ %% receive
+ %% Other -> {error,{unexpected,Other}}
+ %% after 0 ->
+ {error,receive_timeout}
+ %% end
+ end;
+ Other ->
+ Other
+ end
+ end).
+
+ssh_send_blocking(_S, _Args) ->
+ true.
+
+ssh_send_post(_S, [C,_,Msg], Response) when is_binary(Response) ->
+ Expected = ssh_eqc_subsys:response(modify_msg(C,Msg), C#chan.subsystem),
+ case Response of
+ Expected -> true;
+ _ -> {send_failed, size(Response), size(Expected)}
+ end;
+
+ssh_send_post(_S, _Args, Response) ->
+ {error,Response}.
+
+
+modify_msg(_, <<>>) -> <<>>;
+modify_msg(#chan{subsystem=SS}, Msg) -> <<(list_to_binary(SS))/binary,Msg/binary>>.
+
+%%%================================================================
+%%% Misc functions
+
+message() ->
+ resize(500, binary()).
+
+ %% binary().
+
+ %% oneof([binary(),
+ %% ?LET(Size, choose(0,10000), binary(Size))
+ %% ]).
+
+has_subsyst(C) -> C#chan.subsystem /= undefined.
+
+no_subsyst(C) -> not has_subsyst(C).
+
+
+ok({ok,X}) -> X;
+ok({error,Err}) -> {error,Err}.
+
+is_ok({error,_}) -> false;
+is_ok(_) -> true.
+
+ensure_string({A,B,C,D}) -> lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D]));
+ensure_string(X) -> X.
+
+%%%----------------------------------------------------------------
+present_result(_Module, Cmds, _Triple, true) ->
+ aggregate(with_title("Distribution sequential/parallel"), sequential_parallel(Cmds),
+ aggregate(with_title("Function calls"), cmnd_names(Cmds),
+ aggregate(with_title("Message sizes"), empty_msgs(Cmds),
+ aggregate(print_frequencies(), message_sizes(Cmds),
+ aggregate(title("Length of command sequences",print_frequencies()), num_calls(Cmds),
+ true)))));
+
+present_result(Module, Cmds, Triple, false) ->
+ pretty_commands(Module, Cmds, Triple, [{show_states,true}], false).
+
+
+
+cmnd_names(Cs) -> traverse_commands(fun cmnd_name/1, Cs).
+cmnd_name(L) -> [F || {set,_Var,{call,_Mod,F,_As}} <- L].
+
+empty_msgs(Cs) -> traverse_commands(fun empty_msg/1, Cs).
+empty_msg(L) -> [empty || {set,_,{call,_,ssh_send,[_,_,Msg]}} <- L,
+ size(Msg)==0].
+
+message_sizes(Cs) -> traverse_commands(fun message_size/1, Cs).
+message_size(L) -> [size(Msg) || {set,_,{call,_,ssh_send,[_,_,Msg]}} <- L].
+
+num_calls(Cs) -> traverse_commands(fun num_call/1, Cs).
+num_call(L) -> [length(L)].
+
+sequential_parallel(Cs) ->
+ traverse_commands(fun(L) -> dup_module(L, sequential) end,
+ fun(L) -> [dup_module(L1, mkmod("parallel",num(L1,L))) || L1<-L] end,
+ Cs).
+dup_module(L, ModName) -> lists:duplicate(length(L), ModName).
+mkmod(PfxStr,N) -> list_to_atom(PfxStr++"_"++integer_to_list(N)).
+
+%% Meta functions for the aggregate functions
+traverse_commands(Fun, L) when is_list(L) -> Fun(L);
+traverse_commands(Fun, {Seq, ParLs}) -> Fun(lists:append([Seq|ParLs])).
+
+traverse_commands(Fseq, _Fpar, L) when is_list(L) -> Fseq(L);
+traverse_commands(Fseq, Fpar, {Seq, ParLs}) -> lists:append([Fseq(Seq)|Fpar(ParLs)]).
+
+%%%----------------
+%% PrintMethod([{term(), int()}]) -> any().
+print_frequencies() -> print_frequencies(10).
+
+print_frequencies(Ngroups) -> fun([]) -> io:format('Empty list!~n',[]);
+ (L ) -> print_frequencies(L,Ngroups,0,element(1,lists:last(L)))
+ end.
+
+print_frequencies(Ngroups, MaxValue) -> fun(L) -> print_frequencies(L,Ngroups,0,MaxValue) end.
+
+print_frequencies(L, N, Min, Max) when N>Max -> print_frequencies(L++[{N,0}], N, Min, N);
+print_frequencies(L, N, Min, Max) ->
+%%io:format('L=~p~n',[L]),
+ try
+ IntervalUpperLimits =
+ lists:reverse(
+ [Max | tl(lists:reverse(lists:seq(Min,Max,round((Max-Min)/N))))]
+ ),
+ {Acc0,_} = lists:mapfoldl(fun(Upper,Lower) ->
+ {{{Lower,Upper},0}, Upper+1}
+ end, hd(IntervalUpperLimits), tl(IntervalUpperLimits)),
+ Fs0 = get_frequencies(L, Acc0),
+ SumVal = lists:sum([V||{_,V}<-Fs0]),
+ Fs = with_percentage(Fs0, SumVal),
+ Mean = mean(L),
+ Median = median(L),
+ Npos_value = num_digits(SumVal),
+ Npos_range = num_digits(Max),
+ io:format("Range~*s: ~s~n",[2*Npos_range-2,"", "Number in range"]),
+ io:format("~*c:~*c~n",[2*Npos_range+3,$-, max(16,Npos_value+10),$- ]),
+ [begin
+ io:format("~*w - ~*w: ~*w ~5.1f%",[Npos_range,Rlow,
+ Npos_range,Rhigh,
+ Npos_value,Val,
+ Percent]),
+ [io:format(" <-- mean=~.1f",[Mean]) || in_interval(Mean, Interval)],
+ [io:format(" <-- median=" ++
+ if
+ is_float(Median) -> "~.1f";
+ true -> "~p"
+ end, [Median]) || in_interval(Median, Interval)],
+ io:nl()
+ end
+ || {Interval={Rlow,Rhigh},Val,Percent} <- Fs],
+ io:format('~*c ~*c~n',[2*Npos_range,32,Npos_value+2,$-]),
+ io:format('~*c ~*w~n',[2*Npos_range,32,Npos_value,SumVal])
+ %%,io:format('L=~p~n',[L])
+ catch
+ C:E ->
+ io:format('*** Faild printing (~p:~p) for~n~p~n',[C,E,L])
+ end.
+
+get_frequencies([{I,Num}|T], [{{Lower,Upper},Cnt}|Acc]) when Lower=<I,I=<Upper ->
+ get_frequencies(T, [{{Lower,Upper},Cnt+Num}|Acc]);
+get_frequencies(L=[{I,_Num}|_], [Ah={{_Lower,Upper},_Cnt}|Acc]) when I>Upper ->
+ [Ah | get_frequencies(L,Acc)];
+get_frequencies([], Acc) ->
+ Acc.
+
+with_percentage(Fs, Sum) ->
+ [{Rng,Val,100*Val/Sum} || {Rng,Val} <- Fs].
+
+
+title(Str, Fun) ->
+ fun(L) ->
+ io:format('~s~n',[Str]),
+ Fun(L)
+ end.
+
+num_digits(I) -> 1+trunc(math:log(I)/math:log(10)).
+
+num(Elem, List) -> length(lists:takewhile(fun(E) -> E /= Elem end, List)) + 1.
+
+%%%---- Just for naming an operation for readability
+is_odd(I) -> (I rem 2) == 1.
+
+in_interval(Value, {Rlow,Rhigh}) ->
+ try
+ Rlow=<round(Value) andalso round(Value)=<Rhigh
+ catch
+ _:_ -> false
+ end.
+
+%%%================================================================
+%%% Statistical functions
+
+%%%---- Mean value
+mean(L = [X|_]) when is_number(X) ->
+ lists:sum(L) / length(L);
+mean(L = [{_Value,_Weight}|_]) ->
+ SumOfWeights = lists:sum([W||{_,W}<-L]),
+ WeightedSum = lists:sum([W*V||{V,W}<-L]),
+ WeightedSum / SumOfWeights;
+mean(_) ->
+ undefined.
+
+%%%---- Median
+median(L = [X|_]) when is_number(X) ->
+ case is_odd(length(L)) of
+ true ->
+ hd(lists:nthtail(length(L) div 2, L));
+ false ->
+ %% 1) L has at least on element (the when test).
+ %% 2) Length is even.
+ %% => Length >= 2
+ [M1,M2|_] = lists:nthtail((length(L) div 2)-1, L),
+ (M1+M2) / 2
+ end;
+%% integer Weights...
+median(L = [{_Value,_Weight}|_]) ->
+ median( lists:append([lists:duplicate(W,V) || {V,W} <- L]) );
+median(_) ->
+ undefined.
+
+%%%================================================================
+%%% The rest is taken and modified from ssh_test_lib.erl
+setup_rsa(Dir) ->
+ erase_dir(system_dir(Dir)),
+ erase_dir(user_dir(Dir)),
+ file:make_dir(system_dir(Dir)),
+ file:make_dir(user_dir(Dir)),
+
+ file:copy(data_dir(Dir,"id_rsa"), user_dir(Dir,"id_rsa")),
+ file:copy(data_dir(Dir,"ssh_host_rsa_key"), system_dir(Dir,"ssh_host_rsa_key")),
+ file:copy(data_dir(Dir,"ssh_host_rsa_key"), system_dir(Dir,"ssh_host_rsa_key.pub")),
+ ssh_test_lib:setup_rsa_known_host(data_dir(Dir), user_dir(Dir)),
+ ssh_test_lib:setup_rsa_auth_keys(data_dir(Dir), user_dir(Dir)).
+
+data_dir(Dir, File) -> filename:join(Dir, File).
+system_dir(Dir, File) -> filename:join([Dir, "system", File]).
+user_dir(Dir, File) -> filename:join([Dir, "user", File]).
+
+data_dir(Dir) -> Dir.
+system_dir(Dir) -> system_dir(Dir,"").
+user_dir(Dir) -> user_dir(Dir,"").
+
+erase_dir(Dir) ->
+ case file:list_dir(Dir) of
+ {ok,Files} -> lists:foreach(fun(F) -> file:delete(filename:join(Dir,F)) end,
+ Files);
+ _ -> ok
+ end,
+ file:del_dir(Dir).
+
+-endif.
+-endif.
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_dsa b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_dsa
new file mode 100644
index 0000000000..d306f8b26e
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_dsa
@@ -0,0 +1,13 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvAIBAAKBgQDfi2flSTZZofwT4yQT0NikX/LGNT7UPeB/XEWe/xovEYCElfaQ
+APFixXvEgXwoojmZ5kiQRKzLM39wBP0jPERLbnZXfOOD0PDnw0haMh7dD7XKVMod
+/EigVgHf/qBdM2M8yz1s/rRF7n1UpLSypziKjkzCm7JoSQ2zbWIPdmBIXwIVAMgP
+kpr7Sq3O7sHdb8D601DRjoExAoGAMOQxDfB2Fd8ouz6G96f/UOzRMI/Kdv8kYYKW
+JIGY+pRYrLPyYzUeJznwZreOJgrczAX+luHnKFWJ2Dnk5CyeXk67Wsr7pJ/4MBMD
+OKeIS0S8qoSBN8+Krp79fgA+yS3IfqbkJLtLu4EBaCX4mKQIX4++k44d4U5lc8pt
++9hlEI8CgYEAznKxx9kyC6bVo7LUYKaGhofRFt0SYFc5PVmT2VUGRs1R6+6DPD+e
+uEO6IhFct7JFSRbP9p0JD4Uk+3zlZF+XX6b2PsZkeV8f/02xlNGUSmEzCSiNg1AX
+Cy/WusYhul0MncWCHMcOZB5rIvU/aP5EJJtn3xrRaz6u0SThF6AnT34CFQC63czE
+ZU8w8Q+H7z0j+a+70x2iAw==
+-----END DSA PRIVATE KEY-----
+
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_rsa b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_rsa
new file mode 100644
index 0000000000..9d7e0dd5fb
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/id_rsa
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQD1OET+3O/Bvj/dtjxDTXmj1oiJt4sIph5kGy0RfjoPrZfaS+CU
+DhakCmS6t2ivxWFgtpKWaoGMZMJqWj6F6ZsumyFl3FPBtujwY/35cgifrI9Ns4Tl
+zR1uuengNBmV+WRQ5cd9F2qS6Z8aDQihzt0r8JUqLcK+VQbrmNzboCCQQwIDAQAB
+AoGAPQEyqPTt8JUT7mRXuaacjFXiweAXhp9NEDpyi9eLOjtFe9lElZCrsUOkq47V
+TGUeRKEm9qSodfTbKPoqc8YaBJGJPhUaTAcha+7QcDdfHBvIsgxvU7ePVnlpXRp3
+CCUEMPhlnx6xBoTYP+fRU0e3+xJIPVyVCqX1jAdUMkzfRoECQQD6ux7B1QJAIWyK
+SGkbDUbBilNmzCFNgIpOP6PA+bwfi5d16diTpra5AX09keQABAo/KaP1PdV8Vg0p
+z4P3A7G3AkEA+l+AKG6m0kQTTBMJDqOdVPYwe+5GxunMaqmhokpEbuGsrZBl5Dvd
+WpcBjR7jmenrhKZRIuA+Fz5HPo/UQJPl1QJBAKxstDkeED8j/S2XoFhPKAJ+6t39
+sUVICVTIZQeXdmzHJXCcUSkw8+WEhakqw/3SyW0oaK2FSWQJFWJUZ+8eJj8CQEh3
+xeduB5kKnS9CvzdeghZqX6QvVosSdtlUmfUYW/BgH5PpHKTP8wTaeld3XldZTpMJ
+dKiMkUw2+XYROVUrubUCQD+Na1LhULlpn4ISEtIEfqpdlUhxDgO15Wg8USmsng+x
+ICliVOSQtwaZjm8kwaFt0W7XnpnDxbRs37vIEbIMWak=
+-----END RSA PRIVATE KEY-----
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key
new file mode 100644
index 0000000000..51ab6fbd88
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key
@@ -0,0 +1,13 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBuwIBAAKBgQCClaHzE2ul0gKSUxah5W0W8UiJLy4hXngKEqpaUq9SSdVdY2LK
+wVfKH1gt5iuaf1FfzOhsIC9G/GLnjYttXZc92cv/Gfe3gR+s0ni2++MX+T++mE/Q
+diltXv/Hp27PybS67SmiFW7I+RWnT2OKlMPtw2oUuKeztCe5UWjaj/y5FQIVAPLA
+l9RpiU30Z87NRAHY3NTRaqtrAoGANMRxw8UfdtNVR0CrQj3AgPaXOGE4d+G4Gp4X
+skvnCHycSVAjtYxebUkzUzt5Q6f/IabuLUdge3gXrc8BetvrcKbp+XZgM0/Vj2CF
+Ymmy3in6kzGZq7Fw1sZaku6AOU8vLa5woBT2vAcHLLT1bLAzj7viL048T6MfjrOP
+ef8nHvACgYBhDWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah
+/XcF3DeRF+eEoz48wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+U
+ykSTXYUbtsfTNRFQGBW2/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0CgIVAN4wtL5W
+Lv62jKcdskxNyz2NQoBx
+-----END DSA PRIVATE KEY-----
+
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key.pub b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key.pub
new file mode 100644
index 0000000000..4dbb1305b0
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_dsa_key.pub
@@ -0,0 +1,11 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1kc3MAAACBAIKVofMTa6XSApJTFqHlbRbxSIkvLiFeeAoSqlpSr1JJ1V1j
+YsrBV8ofWC3mK5p/UV/M6GwgL0b8YueNi21dlz3Zy/8Z97eBH6zSeLb74xf5P76YT9B2
+KW1e/8enbs/JtLrtKaIVbsj5FadPY4qUw+3DahS4p7O0J7lRaNqP/LkVAAAAFQDywJfU
+aYlN9GfOzUQB2NzU0WqrawAAAIA0xHHDxR9201VHQKtCPcCA9pc4YTh34bganheyS+cI
+fJxJUCO1jF5tSTNTO3lDp/8hpu4tR2B7eBetzwF62+twpun5dmAzT9WPYIViabLeKfqT
+MZmrsXDWxlqS7oA5Ty8trnCgFPa8BwcstPVssDOPu+IvTjxPox+Os495/yce8AAAAIBh
+DWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah/XcF3DeRF+eEoz48
+wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+UykSTXYUbtsfTNRFQGBW2
+/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0Cg==
+---- END SSH2 PUBLIC KEY ----
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key
new file mode 100644
index 0000000000..79968bdd7d
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key
@@ -0,0 +1,16 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDCZX+4FBDwZIh9y/Uxee1VJnEXlowpz2yDKwj8semM4q843337
+zbNfxHmladB1lpz2NqyxI175xMIJuDxogyZdsOxGnFAzAnthR4dqL/RWRWzjaxSB
+6IAO9SPYVVlrpZ+1hsjLW79fwXK/yc8VdhRuWTeQiRgYY2ek8+OKbOqz4QIDAQAB
+AoGANmvJzJO5hkLuvyDZHKfAnGTtpifcR1wtSa9DjdKUyn8vhKF0mIimnbnYQEmW
+NUUb3gXCZLi9PvkpRSVRrASDOZwcjoU/Kvww163vBUVb2cOZfFhyn6o2Sk88Tt++
+udH3hdjpf9i7jTtUkUe+QYPsia+wgvvrmn4QrahLAH86+kECQQDx5gFeXTME3cnW
+WMpFz3PPumduzjqgqMMWEccX4FtQkMX/gyGa5UC7OHFyh0N/gSWvPbRHa8A6YgIt
+n8DO+fh5AkEAzbqX4DOn8NY6xJIi42q7l/2jIA0RkB6P7YugW5NblhqBZ0XDnpA5
+sMt+rz+K07u9XZtxgh1xi7mNfwY6lEAMqQJBAJBEauCKmRj35Z6OyeQku59SPsnY
++SJEREVvSNw2lH9SOKQQ4wPsYlTGbvKtNVZgAcen91L5MmYfeckYE/fdIZECQQCt
+64zxsTnM1I8iFxj/gP/OYlJBikrKt8udWmjaghzvLMEw+T2DExJyb9ZNeT53+UMB
+m6O+B/4xzU/djvp+0hbhAkAemIt+rA5kTmYlFndhpvzkSSM8a2EXsO4XIPgGWCTT
+tQKS/tTly0ADMjN/TVy11+9d6zcqadNVuHXHGtR4W0GR
+-----END RSA PRIVATE KEY-----
+
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key.pub b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key.pub
new file mode 100644
index 0000000000..75d2025c71
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_client_server_dirs/ssh_host_rsa_key.pub
@@ -0,0 +1,5 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1yc2EAAAADAQABAAAAgQDCZX+4FBDwZIh9y/Uxee1VJnEXlowpz2yDKwj8
+semM4q843337zbNfxHmladB1lpz2NqyxI175xMIJuDxogyZdsOxGnFAzAnthR4dqL/RW
+RWzjaxSB6IAO9SPYVVlrpZ+1hsjLW79fwXK/yc8VdhRuWTeQiRgYY2ek8+OKbOqz4Q==
+---- END SSH2 PUBLIC KEY ----
diff --git a/lib/ssh/test/property_test/ssh_eqc_encode_decode.erl b/lib/ssh/test/property_test/ssh_eqc_encode_decode.erl
new file mode 100644
index 0000000000..57ea2012c1
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_encode_decode.erl
@@ -0,0 +1,395 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(ssh_eqc_encode_decode).
+
+-compile(export_all).
+
+-proptest(eqc).
+-proptest([triq,proper]).
+
+-ifndef(EQC).
+-ifndef(PROPER).
+-ifndef(TRIQ).
+-define(EQC,true).
+%%-define(PROPER,true).
+%%-define(TRIQ,true).
+-endif.
+-endif.
+-endif.
+
+-ifdef(EQC).
+-include_lib("eqc/include/eqc.hrl").
+-define(MOD_eqc,eqc).
+
+-else.
+-ifdef(PROPER).
+-include_lib("proper/include/proper.hrl").
+-define(MOD_eqc,proper).
+
+-else.
+-ifdef(TRIQ).
+-define(MOD_eqc,triq).
+-include_lib("triq/include/triq.hrl").
+
+-endif.
+-endif.
+-endif.
+
+
+%%% Properties:
+
+prop_ssh_decode() ->
+ ?FORALL(Msg, ssh_msg(),
+ try ssh_message:decode(Msg)
+ of
+ _ -> true
+ catch
+ C:E -> io:format('~p:~p~n',[C,E]),
+ false
+ end
+ ).
+
+
+%%% This fails because ssh_message is not symmetric in encode and decode regarding data types
+prop_ssh_decode_encode() ->
+ ?FORALL(Msg, ssh_msg(),
+ Msg == ssh_message:encode(ssh_message:decode(Msg))
+ ).
+
+
+%%%================================================================
+%%%
+%%% Scripts to generate message generators
+%%%
+
+%% awk '/^( |\t)+byte( |\t)+SSH/,/^( |\t)*$/{print}' rfc425?.txt | sed 's/^\( \|\\t\)*//' > msgs.txt
+
+%% awk '/^byte( |\t)+SSH/{print $2","}' < msgs.txt
+
+%% awk 'BEGIN{print "%%%---- BEGIN GENERATED";prev=0} END{print " >>.\n%%%---- END GENERATED"} /^byte( |\t)+SSH/{if (prev==1) print " >>.\n"; prev=1; printf "%c%s%c",39,$2,39; print "()->\n <<?"$2;next} /^string( |\t)+\"/{print " ,"$2;next} /^string( |\t)+.*address/{print " ,(ssh_string_address())/binary %%",$2,$3,$4,$5,$6;next}/^string( |\t)+.*US-ASCII/{print " ,(ssh_string_US_ASCII())/binary %%",$2,$3,$4,$5,$6;next} /^string( |\t)+.*UTF-8/{print " ,(ssh_string_UTF_8())/binary %% ",$2,$3,$4,$5,$6;next} /^[a-z0-9]+( |\t)/{print " ,(ssh_"$1"())/binary %%",$2,$3,$4,$5,$6;next} /^byte\[16\]( |\t)+/{print" ,(ssh_byte_16())/binary %%",$2,$3,$4,$5,$6;next} /^name-list( |\t)+/{print" ,(ssh_name_list())/binary %%",$2,$3,$4,$5,$6;next} /./{print "?? %%",$0}' < msgs.txt > gen.txt
+
+%%%================================================================
+%%%
+%%% Generators
+%%%
+
+ssh_msg() -> ?LET(M,oneof(
+[[msg_code('SSH_MSG_CHANNEL_CLOSE'),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_DATA'),gen_uint32(),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_EOF'),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_EXTENDED_DATA'),gen_uint32(),gen_uint32(),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_FAILURE'),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN'),gen_string("direct-tcpip"),gen_uint32(),gen_uint32(),gen_uint32(),gen_string( ),gen_uint32(),gen_string( ),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN'),gen_string("forwarded-tcpip"),gen_uint32(),gen_uint32(),gen_uint32(),gen_string( ),gen_uint32(),gen_string( ),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN'),gen_string("session"),gen_uint32(),gen_uint32(),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN'),gen_string("x11"),gen_uint32(),gen_uint32(),gen_uint32(),gen_string( ),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN'),gen_string( ),gen_uint32(),gen_uint32(),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN_CONFIRMATION'),gen_uint32(),gen_uint32(),gen_uint32(),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_OPEN_FAILURE'),gen_uint32(),gen_uint32(),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("env"),gen_boolean(),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("exec"),gen_boolean(),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("exit-signal"),0,gen_string( ),gen_boolean(),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("exit-status"),0,gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("pty-req"),gen_boolean(),gen_string( ),gen_uint32(),gen_uint32(),gen_uint32(),gen_uint32(),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("shell"),gen_boolean()],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("signal"),0,gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("subsystem"),gen_boolean(),gen_string( )],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("window-change"),0,gen_uint32(),gen_uint32(),gen_uint32(),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("x11-req"),gen_boolean(),gen_boolean(),gen_string( ),gen_string( ),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string("xon-xoff"),0,gen_boolean()],
+ [msg_code('SSH_MSG_CHANNEL_REQUEST'),gen_uint32(),gen_string( ),gen_boolean()],
+ [msg_code('SSH_MSG_CHANNEL_SUCCESS'),gen_uint32()],
+ [msg_code('SSH_MSG_CHANNEL_WINDOW_ADJUST'),gen_uint32(),gen_uint32()],
+%%Assym [msg_code('SSH_MSG_DEBUG'),gen_boolean(),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_DISCONNECT'),gen_uint32(),gen_string( ),gen_string( )],
+%%Assym [msg_code('SSH_MSG_GLOBAL_REQUEST'),gen_string("cancel-tcpip-forward"),gen_boolean(),gen_string( ),gen_uint32()],
+%%Assym [msg_code('SSH_MSG_GLOBAL_REQUEST'),gen_string("tcpip-forward"),gen_boolean(),gen_string( ),gen_uint32()],
+%%Assym [msg_code('SSH_MSG_GLOBAL_REQUEST'),gen_string( ),gen_boolean()],
+ [msg_code('SSH_MSG_IGNORE'),gen_string( )],
+ %% [msg_code('SSH_MSG_KEXDH_INIT'),gen_mpint()],
+ %% [msg_code('SSH_MSG_KEXDH_REPLY'),gen_string( ),gen_mpint(),gen_string( )],
+ %% [msg_code('SSH_MSG_KEXINIT'),gen_byte(16),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_name_list(),gen_boolean(),gen_uint32()],
+ [msg_code('SSH_MSG_KEX_DH_GEX_GROUP'),gen_mpint(),gen_mpint()],
+ [msg_code('SSH_MSG_NEWKEYS')],
+ [msg_code('SSH_MSG_REQUEST_FAILURE')],
+ [msg_code('SSH_MSG_REQUEST_SUCCESS')],
+ [msg_code('SSH_MSG_REQUEST_SUCCESS'),gen_uint32()],
+ [msg_code('SSH_MSG_SERVICE_ACCEPT'),gen_string( )],
+ [msg_code('SSH_MSG_SERVICE_REQUEST'),gen_string( )],
+ [msg_code('SSH_MSG_UNIMPLEMENTED'),gen_uint32()],
+ [msg_code('SSH_MSG_USERAUTH_BANNER'),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_USERAUTH_FAILURE'),gen_name_list(),gen_boolean()],
+ [msg_code('SSH_MSG_USERAUTH_PASSWD_CHANGEREQ'),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_USERAUTH_PK_OK'),gen_string( ),gen_string( )],
+ [msg_code('SSH_MSG_USERAUTH_SUCCESS')]
+]
+
+), list_to_binary(M)).
+
+
+%%%================================================================
+%%%
+%%% Generator
+%%%
+
+do() ->
+ io_lib:format('[~s~n]',
+ [write_gen(
+ files(["rfc4254.txt",
+ "rfc4253.txt",
+ "rfc4419.txt",
+ "rfc4252.txt",
+ "rfc4256.txt"]))]).
+
+
+write_gen(L) when is_list(L) ->
+ string:join(lists:map(fun write_gen/1, L), ",\n ");
+write_gen({MsgName,Args}) ->
+ lists:flatten(["[",generate_args([MsgName|Args]),"]"]).
+
+generate_args(As) -> string:join([generate_arg(A) || A <- As], ",").
+
+generate_arg({<<"string">>, <<"\"",B/binary>>}) ->
+ S = get_string($",B),
+ ["gen_string(\"",S,"\")"];
+generate_arg({<<"string">>, _}) -> "gen_string( )";
+generate_arg({<<"byte[",B/binary>>, _}) ->
+ io_lib:format("gen_byte(~p)",[list_to_integer(get_string($],B))]);
+generate_arg({<<"byte">> ,_}) -> "gen_byte()";
+generate_arg({<<"uint16">>,_}) -> "gen_uint16()";
+generate_arg({<<"uint32">>,_}) -> "gen_uint32()";
+generate_arg({<<"uint64">>,_}) -> "gen_uint64()";
+generate_arg({<<"mpint">>,_}) -> "gen_mpint()";
+generate_arg({<<"name-list">>,_}) -> "gen_name_list()";
+generate_arg({<<"boolean">>,<<"FALSE">>}) -> "0";
+generate_arg({<<"boolean">>,<<"TRUE">>}) -> "1";
+generate_arg({<<"boolean">>,_}) -> "gen_boolean()";
+generate_arg({<<"....">>,_}) -> ""; %% FIXME
+generate_arg(Name) when is_binary(Name) ->
+ lists:flatten(["msg_code('",binary_to_list(Name),"')"]).
+
+
+gen_boolean() -> choose(0,1).
+
+gen_byte() -> choose(0,255).
+
+gen_uint16() -> gen_byte(2).
+
+gen_uint32() -> gen_byte(4).
+
+gen_uint64() -> gen_byte(8).
+
+gen_byte(N) when N>0 -> [gen_byte() || _ <- lists:seq(1,N)].
+
+gen_char() -> choose($a,$z).
+
+gen_mpint() -> ?LET(Size, choose(1,20),
+ ?LET(Str, vector(Size, gen_byte()),
+ gen_string( strip_0s(Str) )
+ )).
+
+strip_0s([0|T]) -> strip_0s(T);
+strip_0s(X) -> X.
+
+
+gen_string() ->
+ ?LET(Size, choose(0,10),
+ ?LET(Vector,vector(Size, gen_char()),
+ gen_string(Vector)
+ )).
+
+gen_string(S) when is_binary(S) -> gen_string(binary_to_list(S));
+gen_string(S) when is_list(S) -> uint32_to_list(length(S)) ++ S.
+
+gen_name_list() ->
+ ?LET(NumNames, choose(0,10),
+ ?LET(L, [gen_name() || _ <- lists:seq(1,NumNames)],
+ gen_string( string:join(L,"," ) )
+ )).
+
+gen_name() -> gen_string().
+
+uint32_to_list(I) -> binary_to_list(<<I:32/unsigned-big-integer>>).
+
+%%%----
+get_string(Delim, B) ->
+ binary_to_list( element(1, split_binary(B, count_string_chars(Delim,B,0))) ).
+
+count_string_chars(Delim, <<Delim,_/binary>>, Acc) -> Acc;
+count_string_chars(Delim, <<_,B/binary>>, Acc) -> count_string_chars(Delim, B, Acc+1).
+
+
+-define(MSG_CODE(Name,Num),
+msg_code(Name) -> Num;
+msg_code(Num) -> Name
+).
+
+?MSG_CODE('SSH_MSG_USERAUTH_REQUEST', 50);
+?MSG_CODE('SSH_MSG_USERAUTH_FAILURE', 51);
+?MSG_CODE('SSH_MSG_USERAUTH_SUCCESS', 52);
+?MSG_CODE('SSH_MSG_USERAUTH_BANNER', 53);
+?MSG_CODE('SSH_MSG_USERAUTH_PK_OK', 60);
+?MSG_CODE('SSH_MSG_USERAUTH_PASSWD_CHANGEREQ', 60);
+?MSG_CODE('SSH_MSG_DISCONNECT', 1);
+?MSG_CODE('SSH_MSG_IGNORE', 2);
+?MSG_CODE('SSH_MSG_UNIMPLEMENTED', 3);
+?MSG_CODE('SSH_MSG_DEBUG', 4);
+?MSG_CODE('SSH_MSG_SERVICE_REQUEST', 5);
+?MSG_CODE('SSH_MSG_SERVICE_ACCEPT', 6);
+?MSG_CODE('SSH_MSG_KEXINIT', 20);
+?MSG_CODE('SSH_MSG_NEWKEYS', 21);
+?MSG_CODE('SSH_MSG_GLOBAL_REQUEST', 80);
+?MSG_CODE('SSH_MSG_REQUEST_SUCCESS', 81);
+?MSG_CODE('SSH_MSG_REQUEST_FAILURE', 82);
+?MSG_CODE('SSH_MSG_CHANNEL_OPEN', 90);
+?MSG_CODE('SSH_MSG_CHANNEL_OPEN_CONFIRMATION', 91);
+?MSG_CODE('SSH_MSG_CHANNEL_OPEN_FAILURE', 92);
+?MSG_CODE('SSH_MSG_CHANNEL_WINDOW_ADJUST', 93);
+?MSG_CODE('SSH_MSG_CHANNEL_DATA', 94);
+?MSG_CODE('SSH_MSG_CHANNEL_EXTENDED_DATA', 95);
+?MSG_CODE('SSH_MSG_CHANNEL_EOF', 96);
+?MSG_CODE('SSH_MSG_CHANNEL_CLOSE', 97);
+?MSG_CODE('SSH_MSG_CHANNEL_REQUEST', 98);
+?MSG_CODE('SSH_MSG_CHANNEL_SUCCESS', 99);
+?MSG_CODE('SSH_MSG_CHANNEL_FAILURE', 100);
+?MSG_CODE('SSH_MSG_USERAUTH_INFO_REQUEST', 60);
+?MSG_CODE('SSH_MSG_USERAUTH_INFO_RESPONSE', 61);
+?MSG_CODE('SSH_MSG_KEX_DH_GEX_REQUEST_OLD', 30);
+?MSG_CODE('SSH_MSG_KEX_DH_GEX_REQUEST', 34);
+?MSG_CODE('SSH_MSG_KEX_DH_GEX_GROUP', 31);
+?MSG_CODE('SSH_MSG_KEX_DH_GEX_INIT', 32);
+?MSG_CODE('SSH_MSG_KEX_DH_GEX_REPLY', 33).
+
+%%%=============================================================================
+%%%=============================================================================
+%%%=============================================================================
+
+files(Fs) ->
+ Defs = lists:usort(lists:flatten(lists:map(fun file/1, Fs))),
+ DefinedIDs = lists:usort([binary_to_list(element(1,D)) || D <- Defs]),
+ WantedIDs = lists:usort(wanted_messages()),
+ Missing = WantedIDs -- DefinedIDs,
+ case Missing of
+ [] -> ok;
+ _ -> io:format('%% Warning: missing ~p~n', [Missing])
+ end,
+ Defs.
+
+
+file(F) ->
+ {ok,B} = file:read_file(F),
+ hunt_msg_def(B).
+
+
+hunt_msg_def(<<"\n",B/binary>>) -> some_hope(skip_blanks(B));
+hunt_msg_def(<<_, B/binary>>) -> hunt_msg_def(B);
+hunt_msg_def(<<>>) -> [].
+
+some_hope(<<"byte ", B/binary>>) -> try_message(skip_blanks(B));
+some_hope(B) -> hunt_msg_def(B).
+
+try_message(B = <<"SSH_MSG_",_/binary>>) ->
+ {ID,Rest} = get_id(B),
+ case lists:member(binary_to_list(ID), wanted_messages()) of
+ true ->
+ {Lines,More} = get_def_lines(skip_blanks(Rest), []),
+ [{ID,lists:reverse(Lines)} | hunt_msg_def(More)];
+ false ->
+ hunt_msg_def(Rest)
+ end;
+try_message(B) -> hunt_msg_def(B).
+
+
+skip_blanks(<<32, B/binary>>) -> skip_blanks(B);
+skip_blanks(<< 9, B/binary>>) -> skip_blanks(B);
+skip_blanks(B) -> B.
+
+get_def_lines(B0 = <<"\n",B/binary>>, Acc) ->
+ {ID,Rest} = get_id(skip_blanks(B)),
+ case {size(ID), skip_blanks(Rest)} of
+ {0,<<"....",More/binary>>} ->
+ {Text,LineEnd} = get_to_eol(skip_blanks(More)),
+ get_def_lines(LineEnd, [{<<"....">>,Text}|Acc]);
+ {0,_} ->
+ {Acc,B0};
+ {_,Rest1} ->
+ {Text,LineEnd} = get_to_eol(Rest1),
+ get_def_lines(LineEnd, [{ID,Text}|Acc])
+ end;
+get_def_lines(B, Acc) ->
+ {Acc,B}.
+
+
+get_to_eol(B) -> split_binary(B, count_to_eol(B,0)).
+
+count_to_eol(<<"\n",_/binary>>, Acc) -> Acc;
+count_to_eol(<<>>, Acc) -> Acc;
+count_to_eol(<<_,B/binary>>, Acc) -> count_to_eol(B,Acc+1).
+
+
+get_id(B) -> split_binary(B, count_id_chars(B,0)).
+
+count_id_chars(<<C,B/binary>>, Acc) when $A=<C,C=<$Z -> count_id_chars(B,Acc+1);
+count_id_chars(<<C,B/binary>>, Acc) when $a=<C,C=<$z -> count_id_chars(B,Acc+1);
+count_id_chars(<<C,B/binary>>, Acc) when $0=<C,C=<$9 -> count_id_chars(B,Acc+1);
+count_id_chars(<<"_",B/binary>>, Acc) -> count_id_chars(B,Acc+1);
+count_id_chars(<<"-",B/binary>>, Acc) -> count_id_chars(B,Acc+1); %% e.g name-list
+count_id_chars(<<"[",B/binary>>, Acc) -> count_id_chars(B,Acc+1); %% e.g byte[16]
+count_id_chars(<<"]",B/binary>>, Acc) -> count_id_chars(B,Acc+1); %% e.g byte[16]
+count_id_chars(_, Acc) -> Acc.
+
+wanted_messages() ->
+ ["SSH_MSG_CHANNEL_CLOSE",
+ "SSH_MSG_CHANNEL_DATA",
+ "SSH_MSG_CHANNEL_EOF",
+ "SSH_MSG_CHANNEL_EXTENDED_DATA",
+ "SSH_MSG_CHANNEL_FAILURE",
+ "SSH_MSG_CHANNEL_OPEN",
+ "SSH_MSG_CHANNEL_OPEN_CONFIRMATION",
+ "SSH_MSG_CHANNEL_OPEN_FAILURE",
+ "SSH_MSG_CHANNEL_REQUEST",
+ "SSH_MSG_CHANNEL_SUCCESS",
+ "SSH_MSG_CHANNEL_WINDOW_ADJUST",
+ "SSH_MSG_DEBUG",
+ "SSH_MSG_DISCONNECT",
+ "SSH_MSG_GLOBAL_REQUEST",
+ "SSH_MSG_IGNORE",
+ "SSH_MSG_KEXDH_INIT",
+ "SSH_MSG_KEXDH_REPLY",
+ "SSH_MSG_KEXINIT",
+ "SSH_MSG_KEX_DH_GEX_GROUP",
+ "SSH_MSG_KEX_DH_GEX_REQUEST",
+ "SSH_MSG_KEX_DH_GEX_REQUEST_OLD",
+ "SSH_MSG_NEWKEYS",
+ "SSH_MSG_REQUEST_FAILURE",
+ "SSH_MSG_REQUEST_SUCCESS",
+ "SSH_MSG_SERVICE_ACCEPT",
+ "SSH_MSG_SERVICE_REQUEST",
+ "SSH_MSG_UNIMPLEMENTED",
+ "SSH_MSG_USERAUTH_BANNER",
+ "SSH_MSG_USERAUTH_FAILURE",
+%% hard args "SSH_MSG_USERAUTH_INFO_REQUEST",
+%% "SSH_MSG_USERAUTH_INFO_RESPONSE",
+ "SSH_MSG_USERAUTH_PASSWD_CHANGEREQ",
+ "SSH_MSG_USERAUTH_PK_OK",
+%%rfc4252 p12 error "SSH_MSG_USERAUTH_REQUEST",
+ "SSH_MSG_USERAUTH_SUCCESS"].
+
diff --git a/lib/ssh/test/property_test/ssh_eqc_subsys.erl b/lib/ssh/test/property_test/ssh_eqc_subsys.erl
new file mode 100644
index 0000000000..e4b6af166f
--- /dev/null
+++ b/lib/ssh/test/property_test/ssh_eqc_subsys.erl
@@ -0,0 +1,63 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(ssh_eqc_subsys).
+
+-behaviour(ssh_daemon_channel).
+
+-export([init/1, handle_msg/2, handle_ssh_msg/2, terminate/2]).
+
+-export([response/2]).
+
+-record(state, {id,
+ cm,
+ subsyst
+ }).
+
+init([SS]) ->
+ {ok, #state{subsyst=SS}}.
+
+handle_msg({ssh_channel_up, ChannelId, ConnectionManager}, State) ->
+ {ok, State#state{id = ChannelId,
+ cm = ConnectionManager}}.
+
+handle_ssh_msg({ssh_cm, CM, {data, ChannelId, Type, Data}}, S) ->
+ ssh_connection:send(CM, ChannelId, Type, response(Data,S)),
+ {ok, S};
+
+handle_ssh_msg({ssh_cm, _ConnectionManager, {eof, _ChannelId}}, State) ->
+ {ok, State};
+
+handle_ssh_msg({ssh_cm, _, {signal, _, _}}, State) ->
+ %% Ignore signals according to RFC 4254 section 6.9.
+ {ok, State};
+
+handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, _, _Error, _}}, State) ->
+ {stop, ChannelId, State};
+
+handle_ssh_msg({ssh_cm, _, {exit_status, ChannelId, _Status}}, State) ->
+ {stop, ChannelId, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+
+response(Msg, #state{subsyst=SS}) -> response(Msg, SS);
+response(Msg, SS) -> <<"Resp: ",Msg/binary,(list_to_binary(SS))/binary>>.
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index b4e3871efd..fa7b426545 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,6 +38,7 @@ suite() ->
all() ->
[app_test,
+ appup_test,
{group, dsa_key},
{group, rsa_key},
{group, dsa_pass_key},
@@ -46,20 +47,46 @@ all() ->
daemon_already_started,
server_password_option,
server_userpassword_option,
- double_close].
+ double_close,
+ ssh_connect_timeout,
+ ssh_connect_arg4_timeout,
+ packet_size_zero,
+ ssh_daemon_minimal_remote_max_packet_size_option,
+ ssh_msg_debug_fun_option_client,
+ ssh_msg_debug_fun_option_server,
+ id_string_no_opt_client,
+ id_string_own_string_client,
+ id_string_random_client,
+ id_string_no_opt_server,
+ id_string_own_string_server,
+ id_string_random_server,
+ {group, hardening_tests}
+ ].
-groups() ->
+groups() ->
[{dsa_key, [], basic_tests()},
{rsa_key, [], basic_tests()},
{dsa_pass_key, [], [pass_phrase]},
{rsa_pass_key, [], [pass_phrase]},
- {internal_error, [], [internal_error]}
+ {internal_error, [], [internal_error]},
+ {hardening_tests, [], [ssh_connect_nonegtimeout_connected_parallel,
+ ssh_connect_nonegtimeout_connected_sequential,
+ ssh_connect_negtimeout_parallel,
+ ssh_connect_negtimeout_sequential,
+ max_sessions_ssh_connect_parallel,
+ max_sessions_ssh_connect_sequential,
+ max_sessions_sftp_start_channel_parallel,
+ max_sessions_sftp_start_channel_sequential
+ ]}
].
+
basic_tests() ->
[send, close, peername_sockname,
exec, exec_compressed, shell, cli, known_hosts,
- idle_time, rekey, openssh_zlib_basic_test].
+ idle_time, rekey, openssh_zlib_basic_test,
+ misc_ssh_options, inet_option].
+
%%--------------------------------------------------------------------
init_per_suite(Config) ->
@@ -73,6 +100,8 @@ end_per_suite(_Config) ->
ssh:stop(),
crypto:stop().
%%--------------------------------------------------------------------
+init_per_group(hardening_tests, Config) ->
+ init_per_group(dsa_key, Config);
init_per_group(dsa_key, Config) ->
DataDir = ?config(data_dir, Config),
PrivDir = ?config(priv_dir, Config),
@@ -102,6 +131,8 @@ init_per_group(internal_error, Config) ->
init_per_group(_, Config) ->
Config.
+end_per_group(hardening_tests, Config) ->
+ end_per_group(dsa_key, Config);
end_per_group(dsa_key, Config) ->
PrivDir = ?config(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
@@ -150,6 +181,11 @@ app_test(Config) when is_list(Config) ->
?t:app_test(ssh),
ok.
%%--------------------------------------------------------------------
+appup_test() ->
+ [{doc, "Appup file consistency test."}].
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(ssh).
+%%--------------------------------------------------------------------
misc_ssh_options() ->
[{doc, "Test that we can set some misc options not tested elsewhere, "
"some options not yet present are not decided if we should support or "
@@ -158,16 +194,47 @@ misc_ssh_options(Config) when is_list(Config) ->
SystemDir = filename:join(?config(priv_dir, Config), system),
UserDir = ?config(priv_dir, Config),
- CMiscOpt0 = [{connecect_timeout, 1000}, {ip_v6_disabled, false}, {user_dir, UserDir}],
- CMiscOpt1 = [{connecect_timeout, infinity}, {ip_v6_disabled, true}, {user_dir, UserDir}],
- SMiscOpt0 = [{ip_v6_disabled, false}, {user_dir, UserDir}, {system_dir, SystemDir}],
- SMiscOpt1 = [{ip_v6_disabled, true}, {user_dir, UserDir}, {system_dir, SystemDir}],
+ CMiscOpt0 = [{connect_timeout, 1000}, {user_dir, UserDir}],
+ CMiscOpt1 = [{connect_timeout, infinity}, {user_dir, UserDir}],
+ SMiscOpt0 = [{user_dir, UserDir}, {system_dir, SystemDir}],
+ SMiscOpt1 = [{user_dir, UserDir}, {system_dir, SystemDir}],
+
+ basic_test([{client_opts, CMiscOpt0}, {server_opts, SMiscOpt0}]),
+ basic_test([{client_opts, CMiscOpt1}, {server_opts, SMiscOpt1}]).
+
+%%--------------------------------------------------------------------
+inet_option() ->
+ [{doc, "Test configuring IPv4"}].
+inet_option(Config) when is_list(Config) ->
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
- ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ClientOpts = [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false}],
+ ServerOpts = [{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {failfun, fun ssh_test_lib:failfun/2}],
+
+ basic_test([{client_opts, [{inet, inet} | ClientOpts]},
+ {server_opts, [{inet, inet} | ServerOpts]}]).
- basic_test([{client_opts, CMiscOpt0 ++ ClientOpts}, {server_opts, SMiscOpt0 ++ ServerOpts}]),
- basic_test([{client_opts, CMiscOpt1 ++ ClientOpts}, {server_opts, SMiscOpt1 ++ ServerOpts}]).
+%%--------------------------------------------------------------------
+inet6_option() ->
+ [{doc, "Test configuring IPv6"}].
+inet6_option(Config) when is_list(Config) ->
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
+
+ ClientOpts = [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false}],
+ ServerOpts = [{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {failfun, fun ssh_test_lib:failfun/2}],
+
+ basic_test([{client_opts, [{inet, inet6} | ClientOpts]},
+ {server_opts, [{inet, inet6} | ServerOpts]}]).
%%--------------------------------------------------------------------
exec() ->
@@ -429,6 +496,94 @@ server_userpassword_option(Config) when is_list(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+ssh_msg_debug_fun_option_client() ->
+ [{doc, "validate client that uses the 'ssh_msg_debug_fun' option"}].
+ssh_msg_debug_fun_option_client(Config) ->
+ PrivDir = ?config(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),
+
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+ Parent = self(),
+ DbgFun = fun(ConnRef,Displ,Msg,Lang) -> Parent ! {msg_dbg,{ConnRef,Displ,Msg,Lang}} end,
+
+ ConnectionRef =
+ ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_dir, UserDir},
+ {user_interaction, false},
+ {ssh_msg_debug_fun,DbgFun}]),
+ %% Beware, implementation knowledge:
+ gen_fsm:send_all_state_event(ConnectionRef,{ssh_msg_debug,false,<<"Hello">>,<<>>}),
+ receive
+ {msg_dbg,X={ConnectionRef,false,<<"Hello">>,<<>>}} ->
+ ct:log("Got expected dbg msg ~p",[X]),
+ ssh:stop_daemon(Pid);
+ {msg_dbg,X={_,false,<<"Hello">>,<<>>}} ->
+ ct:log("Got dbg msg but bad ConnectionRef (~p expected) ~p",[ConnectionRef,X]),
+ ssh:stop_daemon(Pid),
+ {fail, "Bad ConnectionRef received"};
+ {msg_dbg,X} ->
+ ct:log("Got bad dbg msg ~p",[X]),
+ ssh:stop_daemon(Pid),
+ {fail,"Bad msg received"}
+ after 1000 ->
+ ssh:stop_daemon(Pid),
+ {fail,timeout}
+ end.
+
+%%--------------------------------------------------------------------
+ssh_msg_debug_fun_option_server() ->
+ [{doc, "validate client that uses the 'ssh_msg_debug_fun' option"}].
+ssh_msg_debug_fun_option_server(Config) ->
+ PrivDir = ?config(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),
+
+ Parent = self(),
+ DbgFun = fun(ConnRef,Displ,Msg,Lang) -> Parent ! {msg_dbg,{ConnRef,Displ,Msg,Lang}} end,
+ ConnFun = fun(_,_,_) -> Parent ! {connection_pid,self()} end,
+
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {failfun, fun ssh_test_lib:failfun/2},
+ {connectfun, ConnFun},
+ {ssh_msg_debug_fun, DbgFun}]),
+ _ConnectionRef =
+ ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_dir, UserDir},
+ {user_interaction, false}]),
+ receive
+ {connection_pid,Server} ->
+ %% Beware, implementation knowledge:
+ gen_fsm:send_all_state_event(Server,{ssh_msg_debug,false,<<"Hello">>,<<>>}),
+ receive
+ {msg_dbg,X={_,false,<<"Hello">>,<<>>}} ->
+ ct:log("Got expected dbg msg ~p",[X]),
+ ssh:stop_daemon(Pid);
+ {msg_dbg,X} ->
+ ct:log("Got bad dbg msg ~p",[X]),
+ ssh:stop_daemon(Pid),
+ {fail,"Bad msg received"}
+ after 3000 ->
+ ssh:stop_daemon(Pid),
+ {fail,timeout2}
+ end
+ after 3000 ->
+ ssh:stop_daemon(Pid),
+ {fail,timeout1}
+ end.
+
+%%--------------------------------------------------------------------
known_hosts() ->
[{doc, "check that known_hosts is updated correctly"}].
known_hosts(Config) when is_list(Config) ->
@@ -614,6 +769,304 @@ double_close(Config) when is_list(Config) ->
ok = ssh:close(CM).
%%--------------------------------------------------------------------
+ssh_connect_timeout() ->
+ [{doc, "Test connect_timeout option in ssh:connect/4"}].
+ssh_connect_timeout(_Config) ->
+ ConnTimeout = 2000,
+ {error,{faked_transport,connect,TimeoutToTransport}} =
+ ssh:connect("localhost", 12345,
+ [{transport,{tcp,?MODULE,tcp_closed}},
+ {connect_timeout,ConnTimeout}],
+ 1000),
+ case TimeoutToTransport of
+ ConnTimeout -> ok;
+ Other ->
+ ct:log("connect_timeout is ~p but transport received ~p",[ConnTimeout,Other]),
+ {fail,"ssh:connect/4 wrong connect_timeout received in transport"}
+ end.
+
+%% Help for the test above
+connect(_Host, _Port, _Opts, Timeout) ->
+ {error, {faked_transport,connect,Timeout}}.
+
+
+%%--------------------------------------------------------------------
+ssh_connect_arg4_timeout() ->
+ [{doc, "Test fourth argument in ssh:connect/4"}].
+ssh_connect_arg4_timeout(_Config) ->
+ Timeout = 1000,
+ Parent = self(),
+ %% start the server
+ Server = spawn(fun() ->
+ {ok,Sl} = gen_tcp:listen(0,[]),
+ {ok,{_,Port}} = inet:sockname(Sl),
+ Parent ! {port,self(),Port},
+ Rsa = gen_tcp:accept(Sl),
+ ct:log("Server gen_tcp:accept got ~p",[Rsa]),
+ receive after 2*Timeout -> ok end %% let client timeout first
+ end),
+
+ %% Get listening port
+ Port = receive
+ {port,Server,ServerPort} -> ServerPort
+ end,
+
+ %% try to connect with a timeout, but "supervise" it
+ Client = spawn(fun() ->
+ T0 = now(),
+ Rc = ssh:connect("localhost",Port,[],Timeout),
+ ct:log("Client ssh:connect got ~p",[Rc]),
+ Parent ! {done,self(),Rc,T0}
+ end),
+
+ %% Wait for client reaction on the connection try:
+ receive
+ {done, Client, {error,timeout}, T0} ->
+ Msp = ms_passed(T0, now()),
+ exit(Server,hasta_la_vista___baby),
+ Low = 0.9*Timeout,
+ High = 1.1*Timeout,
+ ct:log("Timeout limits: ~.4f - ~.4f ms, timeout "
+ "was ~.4f ms, expected ~p ms",[Low,High,Msp,Timeout]),
+ %%ct:log("Timeout limits: ~p--~p, my timeout was ~p, expected ~p",[Low,High,Msp0,Timeout]),
+ if
+ Low<Msp, Msp<High -> ok;
+ true -> {fail, "timeout not within limits"}
+ end;
+
+ {done, Client, {error,Other}, _T0} ->
+ ct:log("Error message \"~p\" from the client is unexpected.",[{error,Other}]),
+ {fail, "Unexpected error message"};
+
+ {done, Client, {ok,_Ref}, _T0} ->
+ {fail,"ssh-connected ???"}
+ after
+ 5000 ->
+ exit(Server,hasta_la_vista___baby),
+ exit(Client,hasta_la_vista___baby),
+ {fail, "Didn't timeout"}
+ end.
+
+%% Help function
+%% N2-N1
+ms_passed(N1={_,_,M1}, N2={_,_,M2}) ->
+ {0,{0,Min,Sec}} = calendar:time_difference(calendar:now_to_local_time(N1),
+ calendar:now_to_local_time(N2)),
+ 1000 * (Min*60 + Sec + (M2-M1)/1000000).
+
+%%--------------------------------------------------------------------
+packet_size_zero(Config) ->
+ SystemDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+
+ {Server, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {user_passwords, [{"vego", "morot"}]}]),
+ Conn =
+ ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false},
+ {user, "vego"},
+ {password, "morot"}]),
+
+ {ok,Chan} = ssh_connection:session_channel(Conn, 1000, _MaxPacketSize=0, 60000),
+ ok = ssh_connection:shell(Conn, Chan),
+
+ ssh:close(Conn),
+ ssh:stop_daemon(Server),
+
+ receive
+ {ssh_cm,Conn,{data,Chan,_Type,_Msg1}} = M ->
+ ct:pal("Got ~p",[M]),
+ ct:fail(doesnt_obey_max_packet_size_0)
+ after 5000 ->
+ ok
+ end.
+
+%%--------------------------------------------------------------------
+ssh_daemon_minimal_remote_max_packet_size_option(Config) ->
+ SystemDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+
+ {Server, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {user_passwords, [{"vego", "morot"}]},
+ {failfun, fun ssh_test_lib:failfun/2},
+ {minimal_remote_max_packet_size, 14}]),
+ Conn =
+ ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false},
+ {user, "vego"},
+ {password, "morot"}]),
+
+ %% Try the limits of the minimal_remote_max_packet_size:
+ {ok, _ChannelId} = ssh_connection:session_channel(Conn, 100, 14, infinity),
+ {open_error,_,"Maximum packet size below 14 not supported",_} =
+ ssh_connection:session_channel(Conn, 100, 13, infinity),
+
+ ssh:close(Conn),
+ ssh:stop_daemon(Server).
+
+%%--------------------------------------------------------------------
+id_string_no_opt_client(Config) ->
+ {Server, Host, Port} = fake_daemon(Config),
+ {error,_} = ssh:connect(Host, Port, []),
+ receive
+ {id,Server,"SSH-2.0-Erlang/"++Vsn} ->
+ true = expected_ssh_vsn(Vsn);
+ {id,Server,Other} ->
+ ct:fail("Unexpected id: ~s.",[Other])
+ end.
+
+%%--------------------------------------------------------------------
+id_string_own_string_client(Config) ->
+ {Server, Host, Port} = fake_daemon(Config),
+ {error,_} = ssh:connect(Host, Port, [{id_string,"Pelle"}]),
+ receive
+ {id,Server,"SSH-2.0-Pelle\r\n"} ->
+ ok;
+ {id,Server,Other} ->
+ ct:fail("Unexpected id: ~s.",[Other])
+ end.
+
+%%--------------------------------------------------------------------
+id_string_random_client(Config) ->
+ {Server, Host, Port} = fake_daemon(Config),
+ {error,_} = ssh:connect(Host, Port, [{id_string,random}]),
+ receive
+ {id,Server,Id="SSH-2.0-Erlang"++_} ->
+ ct:fail("Unexpected id: ~s.",[Id]);
+ {id,Server,Rnd="SSH-2.0-"++_} ->
+ ct:log("Got ~s.",[Rnd]);
+ {id,Server,Id} ->
+ ct:fail("Unexpected id: ~s.",[Id])
+ end.
+
+%%--------------------------------------------------------------------
+id_string_no_opt_server(Config) ->
+ {_Server, Host, Port} = std_daemon(Config, []),
+ {ok,S1}=gen_tcp:connect(Host,Port,[{active,false}]),
+ {ok,"SSH-2.0-Erlang/"++Vsn} = gen_tcp:recv(S1, 0, 2000),
+ true = expected_ssh_vsn(Vsn).
+
+%%--------------------------------------------------------------------
+id_string_own_string_server(Config) ->
+ {_Server, Host, Port} = std_daemon(Config, [{id_string,"Olle"}]),
+ {ok,S1}=gen_tcp:connect(Host,Port,[{active,false}]),
+ {ok,"SSH-2.0-Olle\r\n"} = gen_tcp:recv(S1, 0, 2000).
+
+%%--------------------------------------------------------------------
+id_string_random_server(Config) ->
+ {_Server, Host, Port} = std_daemon(Config, [{id_string,random}]),
+ {ok,S1}=gen_tcp:connect(Host,Port,[{active,false}]),
+ {ok,"SSH-2.0-"++Rnd} = gen_tcp:recv(S1, 0, 2000),
+ case Rnd of
+ "Erlang"++_ -> ct:log("Id=~p",[Rnd]),
+ {fail,got_default_id};
+ "Olle\r\n" -> {fail,got_previous_tests_value};
+ _ -> ct:log("Got ~s.",[Rnd])
+ end.
+
+%%--------------------------------------------------------------------
+ssh_connect_negtimeout_parallel(Config) -> ssh_connect_negtimeout(Config,true).
+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),
+ NegTimeOut = 2000, % ms
+ ct:log("Parallel: ~p",[Parallel]),
+
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},{user_dir, UserDir},
+ {parallel_login, Parallel},
+ {negotiation_timeout, NegTimeOut},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+
+ {ok,Socket} = gen_tcp:connect(Host, Port, []),
+ ct:pal("And now sleeping 1.2*NegTimeOut (~p ms)...", [round(1.2 * NegTimeOut)]),
+ receive after round(1.2 * NegTimeOut) -> ok end,
+
+ case inet:sockname(Socket) of
+ {ok,_} -> ct:fail("Socket not closed");
+ {error,_} -> ok
+ end.
+
+%%--------------------------------------------------------------------
+ssh_connect_nonegtimeout_connected_parallel() ->
+ [{doc, "Test that ssh connection does not timeout if the connection is established (parallel)"}].
+ssh_connect_nonegtimeout_connected_parallel(Config) ->
+ ssh_connect_nonegtimeout_connected(Config, true).
+
+ssh_connect_nonegtimeout_connected_sequential() ->
+ [{doc, "Test that ssh connection does not timeout if the connection is established (non-parallel)"}].
+ssh_connect_nonegtimeout_connected_sequential(Config) ->
+ ssh_connect_nonegtimeout_connected(Config, false).
+
+
+ssh_connect_nonegtimeout_connected(Config, Parallel) ->
+ process_flag(trap_exit, true),
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
+ NegTimeOut = 20000, % ms
+ ct:log("Parallel: ~p",[Parallel]),
+
+ {_Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},{user_dir, UserDir},
+ {parallel_login, Parallel},
+ {negotiation_timeout, NegTimeOut},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+ ct:pal("~p Listen ~p:~p",[_Pid,_Host,Port]),
+ ct:sleep(500),
+
+ IO = ssh_test_lib:start_io_server(),
+ Shell = ssh_test_lib:start_shell(Port, IO, UserDir),
+ receive
+ Error = {'EXIT', _, _} ->
+ ct:pal("~p",[Error]),
+ ct:fail(no_ssh_connection);
+ ErlShellStart ->
+ ct:pal("---Erlang shell start: ~p~n", [ErlShellStart]),
+ one_shell_op(IO, NegTimeOut),
+ one_shell_op(IO, NegTimeOut),
+ ct:pal("And now sleeping 1.2*NegTimeOut (~p ms)...", [round(1.2 * NegTimeOut)]),
+ receive after round(1.2 * NegTimeOut) -> ok end,
+ one_shell_op(IO, NegTimeOut)
+ end,
+ exit(Shell, kill).
+
+
+one_shell_op(IO, TimeOut) ->
+ ct:pal("One shell op: Waiting for prompter"),
+ receive
+ ErlPrompt0 -> ct:log("Erlang prompt: ~p~n", [ErlPrompt0])
+ after TimeOut -> ct:fail("Timeout waiting for promter")
+ end,
+
+ IO ! {input, self(), "2*3*7.\r\n"},
+ receive
+ Echo0 -> ct:log("Echo: ~p ~n", [Echo0])
+ after TimeOut -> ct:fail("Timeout waiting for echo")
+ end,
+
+ receive
+ ?NEWLINE -> ct:log("NEWLINE received", [])
+ after TimeOut ->
+ receive Any1 -> ct:log("Bad NEWLINE: ~p",[Any1])
+ after 0 -> ct:fail("Timeout waiting for NEWLINE")
+ end
+ end,
+
+ receive
+ Result0 -> ct:log("Result: ~p~n", [Result0])
+ after TimeOut -> ct:fail("Timeout waiting for result")
+ end.
+
+%%--------------------------------------------------------------------
openssh_zlib_basic_test() ->
[{doc, "Test basic connection with openssh_zlib"}].
@@ -633,12 +1086,107 @@ openssh_zlib_basic_test(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+
+max_sessions_ssh_connect_parallel(Config) ->
+ max_sessions(Config, true, connect_fun(ssh__connect,Config)).
+max_sessions_ssh_connect_sequential(Config) ->
+ max_sessions(Config, false, connect_fun(ssh__connect,Config)).
+
+max_sessions_sftp_start_channel_parallel(Config) ->
+ max_sessions(Config, true, connect_fun(ssh_sftp__start_channel, Config)).
+max_sessions_sftp_start_channel_sequential(Config) ->
+ max_sessions(Config, false, connect_fun(ssh_sftp__start_channel, Config)).
+
+
+%%%---- helpers:
+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_interaction, false},
+ {user, "carni"},
+ {password, "meat"}
+ ])
+ %% ssh_test_lib returns R when ssh:connect returns {ok,R}
+ end;
+connect_fun(ssh_sftp__start_channel, _Config) ->
+ fun(Host,Port) ->
+ {ok,_Pid,ConnRef} =
+ ssh_sftp:start_channel(Host, Port,
+ [{silently_accept_hosts, true},
+ {user, "carni"},
+ {password, "meat"}
+ ]),
+ ConnRef
+ end.
+
+
+max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) ->
+ Connect = fun(Host,Port) ->
+ R = Connect0(Host,Port),
+ ct:pal("Connect(~p,~p) -> ~p",[Host,Port,R]),
+ R
+ end,
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
+ MaxSessions = 5,
+ {Pid, Host, Port} = ssh_test_lib:daemon([
+ {system_dir, SystemDir},
+ {user_dir, UserDir},
+ {user_passwords, [{"carni", "meat"}]},
+ {parallel_login, ParallelLogin},
+ {max_sessions, MaxSessions}
+ ]),
+ ct:pal("~p Listen ~p:~p for max ~p sessions",[Pid,Host,Port,MaxSessions]),
+ try [Connect(Host,Port) || _ <- lists:seq(1,MaxSessions)]
+ of
+ Connections ->
+ %% Step 1 ok: could set up max_sessions connections
+ ct:log("Connections up: ~p",[Connections]),
+ [_|_] = Connections,
+
+ %% Now try one more than alowed:
+ ct:pal("Info Report might come here...",[]),
+ try Connect(Host,Port)
+ of
+ _ConnectionRef1 ->
+ ssh:stop_daemon(Pid),
+ {fail,"Too many connections accepted"}
+ catch
+ error:{badmatch,{error,"Connection closed"}} ->
+ %% Step 2 ok: could not set up max_sessions+1 connections
+ %% This is expected
+ %% Now stop one connection and try to open one more
+ ok = ssh:close(hd(Connections)),
+ try Connect(Host,Port)
+ of
+ _ConnectionRef1 ->
+ %% Step 3 ok: could set up one more connection after killing one
+ %% Thats good.
+ ssh:stop_daemon(Pid),
+ ok
+ catch
+ error:{badmatch,{error,"Connection closed"}} ->
+ %% Bad indeed. Could not set up one more connection even after killing
+ %% one existing. Very bad.
+ ssh:stop_daemon(Pid),
+ {fail,"Does not decrease # active sessions"}
+ end
+ end
+ catch
+ error:{badmatch,{error,"Connection closed"}} ->
+ ssh:stop_daemon(Pid),
+ {fail,"Too few connections accepted"}
+ end.
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
%% Due to timing the error message may or may not be delivered to
%% the "tcp-application" before the socket closed message is recived
-check_error("Internal error") ->
+check_error("Invalid state") ->
ok;
check_error("Connection closed") ->
ok;
@@ -703,3 +1251,46 @@ do_shell(IO, Shell) ->
%% {'EXIT', Shell, killed} ->
%% ok
%% end.
+
+
+std_daemon(Config, ExtraOpts) ->
+ SystemDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+ {_Server, _Host, _Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {failfun, fun ssh_test_lib:failfun/2} | ExtraOpts]).
+
+expected_ssh_vsn(Str) ->
+ try
+ {ok,L} = application:get_all_key(ssh),
+ proplists:get_value(vsn,L,"")++"\r\n"
+ of
+ Str -> true;
+ "\r\n" -> true;
+ _ -> false
+ catch
+ _:_ -> true %% ssh not started so we dont't know
+ end.
+
+
+fake_daemon(_Config) ->
+ Parent = self(),
+ %% start the server
+ Server = spawn(fun() ->
+ {ok,Sl} = gen_tcp:listen(0,[]),
+ {ok,{Host,Port}} = inet:sockname(Sl),
+ Parent ! {sockname,self(),Host,Port},
+ Rsa = gen_tcp:accept(Sl),
+ ct:log("Server gen_tcp:accept got ~p",[Rsa]),
+ {ok,S} = Rsa,
+ receive
+ {tcp, S, Id} -> Parent ! {id,self(),Id}
+ end
+ end),
+ %% Get listening host and port
+ receive
+ {sockname,Server,ServerHost,ServerPort} -> {Server, ServerHost, ServerPort}
+ end.
+
diff --git a/lib/ssh/test/ssh_connection_SUITE.erl b/lib/ssh/test/ssh_connection_SUITE.erl
index f4f0682b40..e3871b3feb 100644
--- a/lib/ssh/test/ssh_connection_SUITE.erl
+++ b/lib/ssh/test/ssh_connection_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,20 +31,37 @@
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
-suite() ->
- [{ct_hooks,[ts_install_cth]}].
+%% suite() ->
+%% [{ct_hooks,[ts_install_cth]}].
all() ->
[
- {group, openssh_payload},
- interrupted_send
+ {group, openssh},
+ interrupted_send,
+ start_shell,
+ start_shell_exec,
+ start_shell_exec_fun,
+ gracefull_invalid_version,
+ gracefull_invalid_start,
+ gracefull_invalid_long_start,
+ gracefull_invalid_long_start_no_nl,
+ stop_listener,
+ start_subsystem_on_closed_channel
].
groups() ->
- [{openssh_payload, [], [simple_exec,
- small_cat,
- big_cat,
- send_after_exit
- ]}].
+ [{openssh, [], payload() ++ ptty()}].
+
+payload() ->
+ [simple_exec,
+ small_cat,
+ big_cat,
+ send_after_exit].
+
+ptty() ->
+ [ptty_alloc_default,
+ ptty_alloc,
+ ptty_alloc_pixel].
+
%%--------------------------------------------------------------------
init_per_suite(Config) ->
case catch crypto:start() of
@@ -58,13 +75,13 @@ end_per_suite(_Config) ->
crypto:stop().
%%--------------------------------------------------------------------
-init_per_group(openssh_payload, _Config) ->
+init_per_group(openssh, _Config) ->
case gen_tcp:connect("localhost", 22, []) of
{error,econnrefused} ->
{skip,"No openssh deamon"};
{ok, Socket} ->
gen_tcp:close(Socket)
- end;
+ end;
init_per_group(_, Config) ->
Config.
@@ -177,10 +194,10 @@ big_cat(Config) when is_list(Config) ->
case size(Data) =:= size(Other) of
true ->
ct:pal("received and sent data are same"
- "size but do not match~n",[]);
+ "size but do not match~n",[]);
false ->
ct:pal("sent ~p but only received ~p~n",
- [size(Data), size(Other)])
+ [size(Data), size(Other)])
end,
ct:fail(receive_data_mismatch);
Else ->
@@ -233,6 +250,43 @@ send_after_exit(Config) when is_list(Config) ->
end.
%%--------------------------------------------------------------------
+ptty_alloc_default() ->
+ [{doc, "Test sending PTTY alloc message with only defaults."}].
+
+ptty_alloc_default(Config) when is_list(Config) ->
+ ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
+ {user_interaction, false}]),
+ {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
+ success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId, []),
+ ssh:close(ConnectionRef).
+
+%%--------------------------------------------------------------------
+ptty_alloc() ->
+ [{doc, "Test sending PTTY alloc message with width,height options."}].
+
+ptty_alloc(Config) when is_list(Config) ->
+ ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
+ {user_interaction, false}]),
+ {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
+ success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId,
+ [{term, default_term()}, {width, 70}, {high, 20}]),
+ ssh:close(ConnectionRef).
+
+
+%%--------------------------------------------------------------------
+ptty_alloc_pixel() ->
+ [{doc, "Test sending PTTY alloc message pixel options."}].
+
+ptty_alloc_pixel(Config) when is_list(Config) ->
+ ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
+ {user_interaction, false}]),
+ {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
+ success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId,
+ [{term, default_term()}, {pixel_widh, 630}, {pixel_hight, 470}]),
+ ssh:close(ConnectionRef).
+
+%%--------------------------------------------------------------------
+
interrupted_send() ->
[{doc, "Use a subsystem that echos n char and then sends eof to cause a channel exit partway through a large send."}].
@@ -247,10 +301,10 @@ interrupted_send(Config) when is_list(Config) ->
{subsystems, [{"echo_n", {ssh_echo_server, [4000000]}}]}]),
ConnectionRef = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
- {user, "foo"},
- {password, "morot"},
- {user_interaction, false},
- {user_dir, UserDir}]),
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, false},
+ {user_dir, UserDir}]),
{ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
@@ -276,6 +330,278 @@ interrupted_send(Config) when is_list(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+start_shell() ->
+ [{doc, "Start a shell"}].
+
+start_shell(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {shell, fun(U, H) -> start_our_shell(U, H) end} ]),
+
+ ConnectionRef = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+
+ {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
+ ok = ssh_connection:shell(ConnectionRef,ChannelId0),
+
+ receive
+ {ssh_cm,ConnectionRef, {data, ChannelId0, 0, <<"Enter command\r\n">>}} ->
+ ok
+ after 5000 ->
+ ct:fail("CLI Timeout")
+ end,
+
+ ssh:close(ConnectionRef),
+ ssh:stop_daemon(Pid).
+%%--------------------------------------------------------------------
+start_shell_exec() ->
+ [{doc, "start shell to exec command"}].
+
+start_shell_exec(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {exec, {?MODULE,ssh_exec,[]}} ]),
+
+ ConnectionRef = ssh_test_lib:connect(Host, Port, [{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_exec_fun() ->
+ [{doc, "start shell to exec command"}].
+
+start_shell_exec_fun(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {exec, fun ssh_exec/1}]),
+
+ ConnectionRef = ssh_test_lib:connect(Host, Port, [{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).
+
+%%--------------------------------------------------------------------
+
+gracefull_invalid_version(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"}]),
+
+ {ok, S} = gen_tcp:connect(Host, Port, []),
+ ok = gen_tcp:send(S, ["SSH-8.-1","\r\n"]),
+ receive
+ Verstring ->
+ ct:pal("Server version: ~p~n", [Verstring]),
+ receive
+ {tcp_closed, S} ->
+ ok
+ end
+ end.
+
+gracefull_invalid_start(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"}]),
+
+ {ok, S} = gen_tcp:connect(Host, Port, []),
+ ok = gen_tcp:send(S, ["foobar","\r\n"]),
+ receive
+ Verstring ->
+ ct:pal("Server version: ~p~n", [Verstring]),
+ receive
+ {tcp_closed, S} ->
+ ok
+ end
+ end.
+
+gracefull_invalid_long_start(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"}]),
+
+ {ok, S} = gen_tcp:connect(Host, Port, []),
+ ok = gen_tcp:send(S, [lists:duplicate(257, $a), "\r\n"]),
+ receive
+ Verstring ->
+ ct:pal("Server version: ~p~n", [Verstring]),
+ receive
+ {tcp_closed, S} ->
+ ok
+ end
+ end.
+
+
+gracefull_invalid_long_start_no_nl(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+ {_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"}]),
+
+ {ok, S} = gen_tcp:connect(Host, Port, []),
+ ok = gen_tcp:send(S, [lists:duplicate(257, $a), "\r\n"]),
+ receive
+ Verstring ->
+ ct:pal("Server version: ~p~n", [Verstring]),
+ receive
+ {tcp_closed, S} ->
+ ok
+ end
+ end.
+
+stop_listener() ->
+ [{doc, "start ssh daemon, setup connections, stop listener, restart listner"}].
+
+stop_listener(Config) when is_list(Config) ->
+ PrivDir = ?config(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),
+
+ {Pid0, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {exec, fun ssh_exec/1}]),
+
+ ConnectionRef0 = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+
+ {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef0, infinity),
+
+ ssh:stop_listener(Host, Port),
+
+ {error, _} = ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+ success = ssh_connection:exec(ConnectionRef0, ChannelId0,
+ "testing", infinity),
+ receive
+ {ssh_cm, ConnectionRef0, {data, ChannelId0, 0, <<"testing\r\n">>}} ->
+ ok
+ after 5000 ->
+ ct:fail("Exec Timeout")
+ end,
+
+ {ok, HostAddr} = inet:getaddr(Host, inet),
+ case ssh_test_lib:daemon(HostAddr, Port, [{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "potatis"},
+ {exec, fun ssh_exec/1}]) of
+ {Pid1, HostAddr, Port} ->
+ ConnectionRef1 = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "potatis"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+ {error, _} = ssh:connect(Host, Port, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+ ssh:close(ConnectionRef0),
+ ssh:close(ConnectionRef1),
+ ssh:stop_daemon(Pid0),
+ ssh:stop_daemon(Pid1);
+ Error ->
+ ct:fail({unexpected, Error})
+ end.
+
+start_subsystem_on_closed_channel(Config) ->
+ PrivDir = ?config(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),
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {subsystems, [{"echo_n", {ssh_echo_server, [4000000]}}]}]),
+
+ 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),
+
+ ok = ssh_connection:close(ConnectionRef, ChannelId),
+
+ {error, closed} = ssh_connection:subsystem(ConnectionRef, ChannelId, "echo_n", infinity),
+
+ ssh:close(ConnectionRef),
+ ssh:stop_daemon(Pid).
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
big_cat_rx(ConnectionRef, ChannelId) ->
@@ -308,3 +634,24 @@ collect_data(ConnectionRef, ChannelId, Acc) ->
after 5000 ->
timeout
end.
+
+%%%-------------------------------------------------------------------
+%% This is taken from the ssh example code.
+start_our_shell(_User, _Peer) ->
+ spawn(fun() ->
+ io:format("Enter command\n")
+ %% Don't actually loop, just exit
+ end).
+
+ssh_exec(Cmd) ->
+ spawn(fun() ->
+ io:format(Cmd ++ "\n")
+ end).
+
+default_term() ->
+ case os:getenv("TERM") of
+ false ->
+ "vt100";
+ Str when is_list(Str)->
+ Str
+ end.
diff --git a/lib/ssh/test/ssh_property_test_SUITE.erl b/lib/ssh/test/ssh_property_test_SUITE.erl
new file mode 100644
index 0000000000..ffad8ebbb7
--- /dev/null
+++ b/lib/ssh/test/ssh_property_test_SUITE.erl
@@ -0,0 +1,107 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+%%% Run like this:
+%%% ct:run_test([{suite,"ssh_property_test_SUITE"}, {logdir,"/ldisk/OTP/LOG"}]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% WARNING %%%
+%%% %%%
+%%% This is experimental code which may be changed or removed %%%
+%%% anytime without any warning. %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-module(ssh_property_test_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+all() -> [{group, messages},
+ {group, client_server}
+ ].
+
+groups() ->
+ [{messages, [], [decode,
+ decode_encode]},
+ {client_server, [], [client_server_sequential,
+ client_server_parallel,
+ client_server_parallel_multi]}
+ ].
+
+
+%%% First prepare Config and compile the property tests for the found tool:
+init_per_suite(Config) ->
+ ct_property_test: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
+ eqc -> Config;
+ X -> {skip, lists:concat([X," is not supported"])}
+ end;
+init_per_group(_, Config) ->
+ Config.
+
+end_per_group(_, Config) ->
+ Config.
+
+%%% Always skip the testcase that is not quite in phase with the
+%%% ssh_message.erl code
+init_per_testcase(decode_encode, _) -> {skip, "Fails - testcase is not ok"};
+init_per_testcase(_TestCase, Config) -> Config.
+
+end_per_testcase(_TestCase, Config) -> Config.
+
+%%%================================================================
+%%% Test suites
+%%%
+decode(Config) ->
+ ct_property_test:quickcheck(
+ ssh_eqc_encode_decode:prop_ssh_decode(),
+ Config
+ ).
+
+decode_encode(Config) ->
+ ct_property_test:quickcheck(
+ ssh_eqc_encode_decode:prop_ssh_decode_encode(),
+ Config
+ ).
+
+client_server_sequential(Config) ->
+ ct_property_test:quickcheck(
+ ssh_eqc_client_server:prop_seq(Config),
+ Config
+ ).
+
+client_server_parallel(Config) ->
+ ct_property_test:quickcheck(
+ ssh_eqc_client_server:prop_parallel(Config),
+ Config
+ ).
+
+client_server_parallel_multi(Config) ->
+ ct_property_test:quickcheck(
+ ssh_eqc_client_server:prop_parallel_multi(Config),
+ Config
+ ).
diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl
index 56b1363b7a..cb74a27638 100644
--- a/lib/ssh/test/ssh_sftp_SUITE.erl
+++ b/lib/ssh/test/ssh_sftp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,6 +32,8 @@
-define(USER, "Alladin").
-define(PASSWD, "Sesame").
+-define(tar_file_name, "sftp_tar_test.tar").
+
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
@@ -63,23 +65,37 @@ end_per_suite(Config) ->
%%--------------------------------------------------------------------
groups() ->
[{erlang_server, [], [open_close_file, open_close_dir, read_file, read_dir,
- write_file, rename_file, mk_rm_dir, remove_file, links,
+ write_file, 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, version_option,
+ {group,remote_tar}]},
+
{openssh_server, [], [open_close_file, open_close_dir, read_file, read_dir,
- write_file, rename_file, mk_rm_dir, remove_file, links,
+ write_file, 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,
+ {group,remote_tar}]},
+
+ {remote_tar, [], [create_empty_tar, files_to_tar, big_file_to_tar, files_chunked_to_tar,
+ directory_to_tar, binaries_to_tar, null_crypto_tar,
+ simple_crypto_tar_small, simple_crypto_tar_big,
+ read_tar, read_null_crypto_tar, read_crypto_tar,
+ aes_cbc256_crypto_tar, aes_ctr_stream_crypto_tar
+ ]}
+ ].
+
init_per_group(erlang_server, Config) ->
PrivDir = ?config(priv_dir, Config),
SysDir = ?config(data_dir, Config),
- Sftpd =
+ Sftpd = {_, HostX, PortX} =
ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, PrivDir},
{user_passwords,
[{?USER, ?PASSWD}]}]),
- [{group, erlang_server}, {sftpd, Sftpd} | Config];
+ [{peer, {fmt_host(HostX),PortX}}, {group, erlang_server}, {sftpd, Sftpd} | Config];
init_per_group(openssh_server, Config) ->
Host = ssh_test_lib:hostname(),
@@ -87,11 +103,31 @@ init_per_group(openssh_server, Config) ->
[{user_interaction, false},
{silently_accept_hosts, true}])) of
{ok, _ChannelPid, Connection} ->
+ [{peer, {_HostName,{IPx,Portx}}}] = ssh:connection_info(Connection,[peer]),
ssh:close(Connection),
- [{group, openssh_server} | Config];
+ [{peer, {fmt_host(IPx),Portx}}, {group, openssh_server} | Config];
_ ->
{skip, "No openssh server"}
- end.
+ end;
+
+init_per_group(remote_tar, Config) ->
+ {Host,Port} = ?config(peer, Config),
+ ct:log("Server (~p) at ~p:~p",[?config(group,Config),Host,Port]),
+ {ok, Connection} =
+ case ?config(group, Config) of
+ erlang_server ->
+ ssh:connect(Host, Port,
+ [{user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]);
+ openssh_server ->
+ ssh:connect(Host, Port,
+ [{user_interaction, false},
+ {silently_accept_hosts, true}])
+ end,
+ [{remote_tar, true},
+ {connection, Connection} | Config].
end_per_group(erlang_server, Config) ->
Config;
@@ -111,33 +147,60 @@ init_per_testcase(sftp_nonexistent_subsystem, Config) ->
]),
[{sftpd, Sftpd} | Config];
-init_per_testcase(Case, Config) ->
+init_per_testcase(version_option, Config) ->
prep(Config),
TmpConfig0 = lists:keydelete(watchdog, 1, Config),
TmpConfig = lists:keydelete(sftp, 1, TmpConfig0),
Dog = ct:timetrap(?default_timeout),
+ {_,Host, Port} = ?config(sftpd, Config),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host, Port,
+ [{sftp_vsn, 3},
+ {user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp,Sftp}, {watchdog, Dog} | TmpConfig];
+
+init_per_testcase(Case, Config0) ->
+ prep(Config0),
+ Config1 = lists:keydelete(watchdog, 1, Config0),
+ Config2 = lists:keydelete(sftp, 1, Config1),
+ Dog = ct:timetrap(?default_timeout),
- case ?config(group, Config) of
- erlang_server ->
- {_,Host, Port} = ?config(sftpd, Config),
- {ok, ChannelPid, Connection} =
- ssh_sftp:start_channel(Host, Port,
- [{user, ?USER},
- {password, ?PASSWD},
- {user_interaction, false},
- {silently_accept_hosts, true}]),
- Sftp = {ChannelPid, Connection},
- [{sftp, Sftp}, {watchdog, Dog} | TmpConfig];
- openssh_server when Case == links ->
- {skip, "known bug in openssh"};
- openssh_server ->
- Host = ssh_test_lib:hostname(),
- {ok, ChannelPid, Connection} =
- ssh_sftp:start_channel(Host,
- [{user_interaction, false},
- {silently_accept_hosts, true}]),
- Sftp = {ChannelPid, Connection},
- [{sftp, Sftp}, {watchdog, Dog} | TmpConfig]
+ Config =
+ case ?config(group,Config2) of
+ erlang_server ->
+ {_,Host, Port} = ?config(sftpd, Config2),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | Config2];
+ openssh_server when Case == links ->
+ {skip, "known bug in openssh"};
+ openssh_server ->
+ Host = ssh_test_lib:hostname(),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host,
+ [{user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | Config2]
+ end,
+
+ case catch ?config(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)),
+ [{channel_pid2,ChPid2} | Config];
+ _ ->
+ Config
end.
end_per_testcase(sftp_nonexistent_subsystem, Config) ->
@@ -153,6 +216,7 @@ end_per_testcase(_, Config) ->
end_per_testcase(Config) ->
{Sftp, Connection} = ?config(sftp, Config),
ssh_sftp:stop_channel(Sftp),
+ catch ssh_sftp:stop_channel(?config(channel_pid2, Config)),
ssh:close(Connection).
%%--------------------------------------------------------------------
@@ -197,6 +261,7 @@ read_file(Config) when is_list(Config) ->
FileName = filename:join(PrivDir, "sftp.txt"),
{Sftp, _} = ?config(sftp, Config),
{ok, Data} = ssh_sftp:read_file(Sftp, FileName),
+ {ok, Data} = ssh_sftp:read_file(Sftp, FileName),
{ok, Data} = file:read_file(FileName).
%%--------------------------------------------------------------------
@@ -221,6 +286,31 @@ write_file(Config) when is_list(Config) ->
{ok, Data} = file:read_file(FileName).
%%--------------------------------------------------------------------
+write_big_file() ->
+ [{doc, "Test API function write_file/2 with big data"}].
+write_big_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, "sftp.txt"),
+ {Sftp, _} = ?config(sftp, Config),
+
+ Data = list_to_binary(lists:duplicate(750000,"a")),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+ {ok, Data} = file:read_file(FileName).
+
+%%--------------------------------------------------------------------
+sftp_read_big_file() ->
+ [{doc, "Test API function read_file/2 with big data"}].
+sftp_read_big_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, "sftp.txt"),
+ {Sftp, _} = ?config(sftp, Config),
+
+ Data = list_to_binary(lists:duplicate(750000,"a")),
+ ct:log("Data size to write is ~p bytes",[size(Data)]),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+ {ok, Data} = ssh_sftp:read_file(Sftp, FileName).
+
+%%--------------------------------------------------------------------
remove_file() ->
[{doc,"Test API function delete/2"}].
remove_file(Config) when is_list(Config) ->
@@ -447,6 +537,254 @@ sftp_nonexistent_subsystem(Config) when is_list(Config) ->
{silently_accept_hosts, true}]).
%%--------------------------------------------------------------------
+version_option() ->
+ [{doc, "Test API option sftp_vsn"}].
+version_option(Config) when is_list(Config) ->
+ open_close_dir(Config).
+
+%%--------------------------------------------------------------------
+create_empty_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ erl_tar:close(Handle),
+ {ChPid,_} = ?config(sftp,Config),
+ {ok, #file_info{type=regular}} =
+ ssh_sftp:read_file_info(ChPid,fnp(?tar_file_name,Config)).
+
+%%--------------------------------------------------------------------
+files_to_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ ok = erl_tar:add(Handle, fn("f1.txt",Config), "f1.txt", [verbose]),
+ ok = erl_tar:add(Handle, fn("f2.txt",Config), "f2.txt", [verbose]),
+ ok = erl_tar:close(Handle),
+ chk_tar(["f1.txt", "f2.txt"], Config).
+
+%%--------------------------------------------------------------------
+big_file_to_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose]),
+ ok = erl_tar:close(Handle),
+ chk_tar(["big.txt"], Config).
+
+
+%%--------------------------------------------------------------------
+files_chunked_to_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ ok = erl_tar:add(Handle, fn("f1.txt",Config), "f1.txt", [verbose,{chunks,2}]),
+ ok = erl_tar:close(Handle),
+ chk_tar(["f1.txt"], Config).
+
+%%--------------------------------------------------------------------
+directory_to_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ ok = erl_tar:add(Handle, fn("d1",Config), "d1", [verbose]),
+ ok = erl_tar:close(Handle),
+ chk_tar(["d1"], Config).
+
+%%--------------------------------------------------------------------
+binaries_to_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ Bin = <<"A binary">>,
+ ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
+ ok = erl_tar:close(Handle),
+ chk_tar([{"b1",Bin}], Config).
+
+%%--------------------------------------------------------------------
+null_crypto_tar(Config) ->
+ ChPid2 = ?config(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},
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,C}]),
+ Bin = <<"A binary">>,
+ ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
+ ok = erl_tar:add(Handle, fn("f1.txt",Config), "f1.txt", [verbose,{chunks,2}]),
+ ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose,{chunks,15000}]),
+ ok = erl_tar:close(Handle),
+ chk_tar([{"b1",Bin}, "f1.txt", "big.txt"], Config).
+
+%%--------------------------------------------------------------------
+simple_crypto_tar_small(Config) ->
+ ChPid2 = ?config(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},
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,C}]),
+ Bin = <<"A binary">>,
+ ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
+ ok = erl_tar:add(Handle, fn("f1.txt",Config), "f1.txt", [verbose,{chunks,2}]),
+ ok = erl_tar:close(Handle),
+ chk_tar([{"b1",Bin}, "f1.txt"], Config, [{crypto,{Cinit,Cdec}}]).
+
+%%--------------------------------------------------------------------
+simple_crypto_tar_big(Config) ->
+ ChPid2 = ?config(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},
+ {ok,Handle} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,C}]),
+ Bin = <<"A binary">>,
+ ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
+ ok = erl_tar:add(Handle, fn("f1.txt",Config), "f1.txt", [verbose,{chunks,2}]),
+ ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose,{chunks,15000}]),
+ ok = erl_tar:close(Handle),
+ chk_tar([{"b1",Bin}, "f1.txt", "big.txt"], Config, [{crypto,{Cinit,Cdec}}]).
+
+stuff(Bin) -> << <<C,C>> || <<C>> <= Bin >>.
+
+unstuff(Bin) -> << <<C>> || <<C,C>> <= Bin >>.
+
+%%--------------------------------------------------------------------
+read_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ NameBins = lists:sort(
+ [{"b1",<<"A binary">>},
+ {"b2",list_to_binary(lists:duplicate(750000,"a"))}
+ ]),
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write]),
+ [ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
+ || {Name,Bin} <- NameBins],
+ ok = erl_tar:close(HandleWrite),
+
+ chk_tar(NameBins, Config).
+
+%%--------------------------------------------------------------------
+read_null_crypto_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ NameBins = lists:sort(
+ [{"b1",<<"A binary">>},
+ {"b2",list_to_binary(lists:duplicate(750000,"a"))}
+ ]),
+ Cinitw = fun() -> {ok, no_state, _SendSize=5} end,
+ Cinitr = fun() -> {ok, no_state, _FetchSize=42} end,
+ Cenc = fun(Bin,CState) -> {ok,Bin,CState,_SendSize=42*42} end,
+ Cdec = fun(Bin,CState) -> {ok,Bin,CState,_FetchSize=19} end,
+ Cendw = fun(Bin,_CState) -> {ok,Bin} end,
+ Cw = {Cinitw,Cenc,Cendw},
+ Cr = {Cinitr,Cdec},
+
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,Cw}]),
+ [ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
+ || {Name,Bin} <- NameBins],
+ ok = erl_tar:close(HandleWrite),
+
+ chk_tar(NameBins, Config, [{crypto,Cr}]).
+
+%%--------------------------------------------------------------------
+read_crypto_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ NameBins = lists:sort(
+ [{"b1",<<"A binary">>},
+ {"b2",list_to_binary(lists:duplicate(750000,"a"))}
+ ]),
+ Cinitw = fun() -> {ok, no_state, _SendSize=5} end,
+ Cinitr = fun() -> {ok, no_state, _FetchSize=42} end,
+
+ Cenc = fun(Bin,CState) -> {ok,stuff(Bin),CState,_SendSize=42*42} end,
+ Cdec = fun(Bin,CState) -> {ok,unstuff(Bin),CState,_FetchSize=120} end,
+ Cendw = fun(Bin,_CState) -> {ok,stuff(Bin)} end,
+ Cw = {Cinitw,Cenc,Cendw},
+ Cr = {Cinitr,Cdec},
+
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,Cw}]),
+ [ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
+ || {Name,Bin} <- NameBins],
+ ok = erl_tar:close(HandleWrite),
+
+ chk_tar(NameBins, Config, [{crypto,Cr}]).
+
+%%--------------------------------------------------------------------
+aes_cbc256_crypto_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ NameBins = lists:sort(
+ [{"b1",<<"A binary">>},
+ {"b2",list_to_binary(lists:duplicate(750000,"a"))},
+ {"d1",fn("d1",Config)} % Dir
+ ]),
+ Key = <<"This is a 256 bit key. Boring...">>,
+ Ivec0 = crypto:rand_bytes(16),
+ DataSize = 1024, % data_size rem 16 = 0 for aes_cbc
+
+ Cinitw = fun() -> {ok, Ivec0, DataSize} end,
+ Cinitr = fun() -> {ok, Ivec0, DataSize} end,
+
+ Cenc = fun(PlainBin,Ivec) ->
+ CipherBin = crypto:block_encrypt(aes_cbc256, Key, Ivec, PlainBin),
+ {ok, CipherBin, crypto:next_iv(aes_cbc,CipherBin), DataSize}
+ end,
+ Cdec = fun(CipherBin,Ivec) ->
+ PlainBin = crypto:block_decrypt(aes_cbc256, Key, Ivec, CipherBin),
+ {ok, PlainBin, crypto:next_iv(aes_cbc,CipherBin), DataSize}
+ end,
+
+ Cendw = fun(PlainBin, _) when PlainBin == <<>> -> {ok, <<>>};
+ (PlainBin, Ivec) ->
+ CipherBin = crypto:block_encrypt(aes_cbc256, Key, Ivec,
+ pad(16,PlainBin)), %% Last chunk
+ {ok, CipherBin}
+ end,
+
+ Cw = {Cinitw,Cenc,Cendw},
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,Cw}]),
+ [ok = erl_tar:add(HandleWrite, Bin, Name, [verbose]) || {Name,Bin} <- NameBins],
+ ok = erl_tar:close(HandleWrite),
+
+ Cr = {Cinitr,Cdec},
+ chk_tar(NameBins, Config, [{crypto,Cr}]).
+
+
+pad(BlockSize, Bin) ->
+ PadSize = (BlockSize - (size(Bin) rem BlockSize)) rem BlockSize,
+ list_to_binary( lists:duplicate(PadSize,0) ).
+
+%%--------------------------------------------------------------------
+aes_ctr_stream_crypto_tar(Config) ->
+ ChPid2 = ?config(channel_pid2, Config),
+ NameBins = lists:sort(
+ [{"b1",<<"A binary">>},
+ {"b2",list_to_binary(lists:duplicate(750000,"a"))},
+ {"d1",fn("d1",Config)} % Dir
+ ]),
+ Key = <<"This is a 256 bit key. Boring...">>,
+ Ivec0 = crypto:rand_bytes(16),
+
+ Cinitw = Cinitr = fun() -> {ok, crypto:stream_init(aes_ctr,Key,Ivec0)} end,
+
+ Cenc = fun(PlainBin,State) ->
+ {NewState,CipherBin} = crypto:stream_encrypt(State, PlainBin),
+ {ok, CipherBin, NewState}
+ end,
+ Cdec = fun(CipherBin,State) ->
+ {NewState,PlainBin} = crypto:stream_decrypt(State, CipherBin),
+ {ok, PlainBin, NewState}
+ end,
+
+ Cendw = fun(PlainBin, _) when PlainBin == <<>> -> {ok, <<>>};
+ (PlainBin, Ivec) ->
+ CipherBin = crypto:block_encrypt(aes_cbc256, Key, Ivec,
+ pad(16,PlainBin)), %% Last chunk
+ {ok, CipherBin}
+ end,
+
+ Cw = {Cinitw,Cenc,Cendw},
+ {ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, fnp(?tar_file_name,Config), [write,{crypto,Cw}]),
+ [ok = erl_tar:add(HandleWrite, Bin, Name, [verbose]) || {Name,Bin} <- NameBins],
+ ok = erl_tar:close(HandleWrite),
+
+ Cr = {Cinitr,Cdec},
+ chk_tar(NameBins, Config, [{crypto,Cr}]).
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
prep(Config) ->
@@ -458,6 +796,7 @@ prep(Config) ->
file:delete(TestFile),
file:delete(TestFile1),
file:delete(TestLink),
+ file:delete(fnp(?tar_file_name,Config)),
%% Initial config
DataDir = ?config(data_dir, Config),
@@ -467,3 +806,94 @@ prep(Config) ->
{ok, FileInfo} = file:read_file_info(TestFile),
ok = file:write_file_info(TestFile,
FileInfo#file_info{mode = Mode}).
+
+
+
+chk_tar(Items, Config) ->
+ chk_tar(Items, Config, []).
+
+chk_tar(Items, Config, Opts) ->
+ chk_tar(Items, fnp(?tar_file_name,Config), Config, Opts).
+
+chk_tar(Items, TarFileName, Config, Opts) when is_list(Opts) ->
+ tar_size(TarFileName, Config),
+ {ChPid,_} = ?config(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),
+ case {lists:sort(expand_items(Items,Config)), lists:sort(NameValueList)} of
+ {L,L} ->
+ true;
+ {Expect,Actual} ->
+ ct:log("Expect: ~p",[Expect]), ct:log("Actual: ~p",[Actual]),
+ case erl_tar:table(TarFileName) of
+ {ok,Names} -> ct:log("names: ~p",[Names]);
+ Other -> ct:log("~p",[Other])
+ end,
+ ct:log("~s",[analyze_report(Expect, Actual)]),
+ ct:fail(bad_tar_contents)
+ end.
+
+analyze_report([E={NameE,BinE}|Es], [A={NameA,BinA}|As]) ->
+ if
+ NameE == NameA,
+ BinE =/= BinA->
+ [["Component ",NameE," differs. \n Expected: ",BinE,"\n Actual: ",BinA,"\n\n"]
+ | analyze_report(Es,As)];
+
+ NameE < NameA ->
+ [["Component ",NameE," is missing.\n\n"]
+ | analyze_report(Es,[A|As])];
+
+ NameE > NameA ->
+ [["Component ",NameA," is not expected.\n\n"]
+ | analyze_report([E|Es],As)];
+ true ->
+ analyze_report(Es, As)
+ end;
+analyze_report([{NameE,_BinE}|Es], []) ->
+ [["Component ",NameE," missing.\n\n"] | analyze_report(Es,[])];
+analyze_report([], [{NameA,_BinA}|As]) ->
+ [["Component ",NameA," not expected.\n\n"] | analyze_report([],As)];
+analyze_report([], []) ->
+ "".
+
+tar_size(TarFileName, Config) ->
+ {ChPid,_} = ?config(sftp,Config),
+ {ok,Data} = ssh_sftp:read_file(ChPid, TarFileName),
+ io:format('Tar file ~p is~n ~p bytes.~n',[TarFileName, size(Data)]).
+
+expand_items(Items, Config) ->
+ lists:flatten(
+ [case Item of
+ {_Name,Bin} when is_binary(Bin) ->
+ Item;
+ {Name,FileName} when is_list(FileName) ->
+ read_item_contents(Name, fn(FileName,Config));
+ FileName when is_list(FileName) ->
+ read_item_contents(FileName, fn(FileName,Config))
+ end || Item <- Items]).
+
+read_item_contents(ItemName, FileName) ->
+ case file:read_file(FileName) of
+ {ok,Bin} ->
+ {ItemName, Bin};
+ {error,eisdir} ->
+ {ok,FileNames} = file:list_dir(FileName),
+ [read_item_contents(filename:join(ItemName,Name),
+ filename:join(FileName,Name))
+ || Name<-FileNames]
+ end.
+
+fn(Name, Config) ->
+ Dir = ?config(data_dir, Config),
+ filename:join([Dir,"sftp_tar_test_data",Name]).
+
+fnp(Name, Config) ->
+ Dir = ?config(priv_dir, Config),
+ filename:join([Dir,Name]).
+
+
+fmt_host({A,B,C,D}) -> lists:concat([A,".",B,".",C,".",D]);
+fmt_host(S) -> S.
+
diff --git a/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/big.txt b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/big.txt
new file mode 100644
index 0000000000..f597b69d4c
--- /dev/null
+++ b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/big.txt
@@ -0,0 +1,16384 @@
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
+All work and no play makes Jack a dull boy.
diff --git a/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f1 b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f1
new file mode 100644
index 0000000000..1bafa9761e
--- /dev/null
+++ b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f1
@@ -0,0 +1 @@
+And hi from the subdirectory too!
diff --git a/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f2 b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f2
new file mode 100644
index 0000000000..8566adaeef
--- /dev/null
+++ b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/d1/f2
@@ -0,0 +1 @@
+one more file
diff --git a/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f1.txt b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f1.txt
new file mode 100644
index 0000000000..137d409d7b
--- /dev/null
+++ b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f1.txt
@@ -0,0 +1 @@
+Hi there!
diff --git a/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f2.txt b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f2.txt
new file mode 100644
index 0000000000..d18c6b11fc
--- /dev/null
+++ b/lib/ssh/test/ssh_sftp_SUITE_data/sftp_tar_test_data/f2.txt
@@ -0,0 +1 @@
+How are you?
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index 7b22e45d5e..0ce8eec906 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -56,7 +56,8 @@ all() ->
retrieve_attributes,
set_attributes,
links,
- ver3_rename,
+ ver3_rename,
+ ver3_open_flags,
relpath,
sshd_read_file,
ver6_basic].
@@ -193,6 +194,39 @@ open_close_file(Config) when is_list(Config) ->
?ACE4_READ_DATA bor ?ACE4_READ_ATTRIBUTES,
?SSH_FXF_OPEN_EXISTING).
+ver3_open_flags() ->
+ [{doc, "Test open flags"}].
+ver3_open_flags(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, "not_exist.txt"),
+ {Cm, Channel} = ?config(sftp, Config),
+ ReqId = 0,
+
+ {ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
+ open_file_v3(FileName, Cm, Channel, ReqId,
+ ?SSH_FXF_CREAT bor ?SSH_FXF_TRUNC),
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
+ ?UINT32(?SSH_FX_OK), _/binary>>, _} = close(Handle, ReqId,
+ Cm, Channel),
+
+ NewFileName = filename:join(PrivDir, "not_exist2.txt"),
+ NewReqId = ReqId + 1,
+ {ok, <<?SSH_FXP_HANDLE, ?UINT32(NewReqId), NewHandle/binary>>, _} =
+ open_file_v3(NewFileName, Cm, Channel, NewReqId,
+ ?SSH_FXF_CREAT bor ?SSH_FXF_EXCL),
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(NewReqId),
+ ?UINT32(?SSH_FX_OK), _/binary>>, _} = close(NewHandle, NewReqId,
+ Cm, Channel),
+
+ NewFileName1 = filename:join(PrivDir, "test.txt"),
+ NewReqId1 = NewReqId + 1,
+ {ok, <<?SSH_FXP_HANDLE, ?UINT32(NewReqId1), NewHandle1/binary>>, _} =
+ open_file_v3(NewFileName1, Cm, Channel, NewReqId1,
+ ?SSH_FXF_READ bor ?SSH_FXF_WRITE bor ?SSH_FXF_APPEND),
+ {ok, <<?SSH_FXP_STATUS, ?UINT32(NewReqId1),
+ ?UINT32(?SSH_FX_OK), _/binary>>, _} = close(NewHandle1, NewReqId1,
+ Cm, Channel).
+
%%--------------------------------------------------------------------
open_close_dir() ->
[{doc,"Test SSH_FXP_OPENDIR and SSH_FXP_CLOSE commands"}].
@@ -662,6 +696,16 @@ open_file(File, Cm, Channel, ReqId, Access, Flags) ->
?SSH_FXP_OPEN, Data/binary>>),
reply(Cm, Channel).
+open_file_v3(File, Cm, Channel, ReqId, Flags) ->
+
+ Data = list_to_binary([?uint32(ReqId),
+ ?binary(list_to_binary(File)),
+ ?uint32(Flags),
+ ?REG_ATTERS]),
+ Size = 1 + size(Data),
+ ssh_connection:send(Cm, Channel, <<?UINT32(Size),
+ ?SSH_FXP_OPEN, Data/binary>>),
+ reply(Cm, Channel).
close(Handle, ReqId, Cm , Channel) ->
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 6ed3dfa68c..b8abf5e80e 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -63,8 +63,13 @@ daemon(Host, Port, Options) ->
Error
end.
+
+
start_shell(Port, IOServer, UserDir) ->
- spawn_link(?MODULE, init_shell, [Port, IOServer, [{user_dir, UserDir}]]).
+ start_shell(Port, IOServer, UserDir, []).
+
+start_shell(Port, IOServer, UserDir, Options) ->
+ spawn_link(?MODULE, init_shell, [Port, IOServer, [{user_dir, UserDir}|Options]]).
start_shell(Port, IOServer) ->
spawn_link(?MODULE, init_shell, [Port, IOServer, []]).
@@ -91,18 +96,26 @@ loop_io_server(TestCase, Buff0) ->
{input, TestCase, Line} ->
loop_io_server(TestCase, Buff0 ++ [Line]);
{io_request, From, ReplyAs, Request} ->
+%%ct:pal("~p",[{io_request, From, ReplyAs, Request}]),
{ok, Reply, Buff} = io_request(Request, TestCase, From,
ReplyAs, Buff0),
+%%ct:pal("io_request(~p)-->~p",[Request,{ok, Reply, Buff}]),
io_reply(From, ReplyAs, Reply),
loop_io_server(TestCase, Buff);
{'EXIT',_, _} ->
- erlang:display('EXIT'),
+ erlang:display('ssh_test_lib:loop_io_server/2 EXIT'),
ok
end.
io_request({put_chars, Chars}, TestCase, _, _, Buff) ->
reply(TestCase, Chars),
{ok, ok, Buff};
+io_request({put_chars, unicode, Chars}, TestCase, _, _, Buff) when is_binary(Chars) ->
+ reply(TestCase, Chars),
+ {ok, ok, Buff};
+io_request({put_chars, unicode, io_lib, format, [Fmt,Args]}, TestCase, _, _, Buff) ->
+ reply(TestCase, io_lib:format(Fmt,Args)),
+ {ok, ok, Buff};
io_request({put_chars, Enc, Chars}, TestCase, _, _, Buff) ->
reply(TestCase, unicode:characters_to_binary(Chars,Enc,latin1)),
{ok, ok, Buff};
@@ -120,11 +133,13 @@ io_request({get_line, _Enc,_}, _, _, _, [Line | Buff]) ->
io_reply(_, _, []) ->
ok;
io_reply(From, ReplyAs, Reply) ->
+%%ct:pal("io_reply ~p sending ~p ! ~p",[self(),From, {io_reply, ReplyAs, Reply}]),
From ! {io_reply, ReplyAs, Reply}.
reply(_, []) ->
ok;
reply(TestCase, Result) ->
+%%ct:pal("reply ~p sending ~p ! ~p",[self(), TestCase, Result]),
TestCase ! Result.
receive_exec_result(Msg) ->
diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl
index 8b5343cecc..af70eeb46c 100644
--- a/lib/ssh/test/ssh_to_openssh_SUITE.erl
+++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,7 +54,9 @@ groups() ->
]},
{erlang_server, [], [erlang_server_openssh_client_exec,
erlang_server_openssh_client_exec_compressed,
- erlang_server_openssh_client_pulic_key_dsa]}
+ erlang_server_openssh_client_pulic_key_dsa,
+ erlang_server_openssh_client_cipher_suites,
+ erlang_server_openssh_client_macs]}
].
init_per_suite(Config) ->
@@ -89,6 +91,12 @@ end_per_group(erlang_server, Config) ->
end_per_group(_, Config) ->
Config.
+init_per_testcase(erlang_server_openssh_client_cipher_suites, Config) ->
+ check_ssh_client_support(Config);
+
+init_per_testcase(erlang_server_openssh_client_macs, Config) ->
+ check_ssh_client_support(Config);
+
init_per_testcase(_TestCase, Config) ->
ssh:start(),
Config.
@@ -111,22 +119,9 @@ erlang_shell_client_openssh_server(Config) when is_list(Config) ->
IO ! {input, self(), "echo Hej\n"},
receive_hej(),
IO ! {input, self(), "exit\n"},
- receive
- <<"logout">> ->
- receive
- <<"Connection closed">> ->
- ok
- end;
- Other0 ->
- ct:fail({unexpected_msg, Other0})
- end,
- receive
- {'EXIT', Shell, normal} ->
- ok;
- Other1 ->
- ct:fail({unexpected_msg, Other1})
- end.
-
+ receive_logout(),
+ receive_normal_exit(Shell).
+
%--------------------------------------------------------------------
erlang_client_openssh_server_exec() ->
[{doc, "Test api function ssh_connection:exec"}].
@@ -221,6 +216,108 @@ erlang_server_openssh_client_exec(Config) when is_list(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+erlang_server_openssh_client_cipher_suites() ->
+ [{doc, "Test that we can connect with different cipher suites."}].
+
+erlang_server_openssh_client_cipher_suites(Config) when is_list(Config) ->
+ SystemDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ KnownHosts = filename:join(PrivDir, "known_hosts"),
+
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+
+
+ ct:sleep(500),
+
+ Supports = crypto:supports(),
+ Ciphers = proplists:get_value(ciphers, Supports),
+ Tests = [
+ {"3des-cbc", lists:member(des3_cbc, Ciphers)},
+ {"aes128-cbc", lists:member(aes_cbc128, Ciphers)},
+ {"aes128-ctr", lists:member(aes_ctr, Ciphers)},
+ {"aes256-cbc", false}
+ ],
+ lists:foreach(fun({Cipher, Expect}) ->
+ Cmd = "ssh -p " ++ integer_to_list(Port) ++
+ " -o UserKnownHostsFile=" ++ KnownHosts ++ " " ++ Host ++ " " ++
+ " -c " ++ Cipher ++ " 1+1.",
+
+ ct:pal("Cmd: ~p~n", [Cmd]),
+
+ SshPort = open_port({spawn, Cmd}, [binary, stderr_to_stdout]),
+
+ case Expect of
+ true ->
+ receive
+ {SshPort,{data, <<"2\n">>}} ->
+ ok
+ after ?TIMEOUT ->
+ ct:fail("Did not receive answer")
+ end;
+ false ->
+ receive
+ {SshPort,{data, <<"no matching cipher found", _/binary>>}} ->
+ ok
+ after ?TIMEOUT ->
+ ct:fail("Did not receive no matching cipher message")
+ end
+ end
+ end, Tests),
+
+ ssh:stop_daemon(Pid).
+
+%%--------------------------------------------------------------------
+erlang_server_openssh_client_macs() ->
+ [{doc, "Test that we can connect with different MACs."}].
+
+erlang_server_openssh_client_macs(Config) when is_list(Config) ->
+ SystemDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ KnownHosts = filename:join(PrivDir, "known_hosts"),
+
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {failfun, fun ssh_test_lib:failfun/2}]),
+
+
+ ct:sleep(500),
+
+ Supports = crypto:supports(),
+ Hashs = proplists:get_value(hashs, Supports),
+ MACs = [{"hmac-sha1", lists:member(sha, Hashs)},
+ {"hmac-sha2-256", lists:member(sha256, Hashs)},
+ {"hmac-md5-96", false},
+ {"hmac-ripemd160", false}],
+ lists:foreach(fun({MAC, Expect}) ->
+ Cmd = "ssh -p " ++ integer_to_list(Port) ++
+ " -o UserKnownHostsFile=" ++ KnownHosts ++ " " ++ Host ++ " " ++
+ " -o MACs=" ++ MAC ++ " 1+1.",
+
+ ct:pal("Cmd: ~p~n", [Cmd]),
+
+ SshPort = open_port({spawn, Cmd}, [binary, stderr_to_stdout]),
+
+ case Expect of
+ true ->
+ receive
+ {SshPort,{data, <<"2\n">>}} ->
+ ok
+ after ?TIMEOUT ->
+ ct:fail("Did not receive answer")
+ end;
+ false ->
+ receive
+ {SshPort,{data, <<"no matching mac found", _/binary>>}} ->
+ ok
+ after ?TIMEOUT ->
+ ct:fail("Did not receive no matching mac message")
+ end
+ end
+ end, MACs),
+
+ ssh:stop_daemon(Pid).
+
+%%--------------------------------------------------------------------
erlang_server_openssh_client_exec_compressed() ->
[{doc, "Test that exec command works."}].
@@ -427,9 +524,67 @@ erlang_client_openssh_server_nonexistent_subsystem(Config) when is_list(Config)
%%--------------------------------------------------------------------
receive_hej() ->
receive
- <<"Hej\n">> = Hej->
+ <<"Hej", _binary>> = Hej ->
+ ct:pal("Expected result: ~p~n", [Hej]);
+ <<"Hej\n", _binary>> = Hej ->
+ ct:pal("Expected result: ~p~n", [Hej]);
+ <<"Hej\r\n", _/binary>> = Hej ->
ct:pal("Expected result: ~p~n", [Hej]);
Info ->
- ct:pal("Extra info: ~p~n", [Info]),
- receive_hej()
+ Lines = binary:split(Info, [<<"\r\n">>], [global]),
+ case lists:member(<<"Hej">>, Lines) of
+ true ->
+ ct:pal("Expected result found in lines: ~p~n", [Lines]),
+ ok;
+ false ->
+ ct:pal("Extra info: ~p~n", [Info]),
+ receive_hej()
+ end
+ end.
+
+receive_logout() ->
+ receive
+ <<"logout">> ->
+ receive
+ <<"Connection closed">> ->
+ ok
+ end;
+ Info ->
+ ct:pal("Extra info when logging out: ~p~n", [Info]),
+ receive_logout()
+ end.
+
+receive_normal_exit(Shell) ->
+ receive
+ {'EXIT', Shell, normal} ->
+ ok;
+ <<"\r\n">> ->
+ receive_normal_exit(Shell);
+ Other ->
+ ct:fail({unexpected_msg, Other})
+ end.
+
+%%--------------------------------------------------------------------
+%%--------------------------------------------------------------------
+%% Check if we have a "newer" ssh client that supports these test cases
+%%--------------------------------------------------------------------
+check_ssh_client_support(Config) ->
+ Port = open_port({spawn, "ssh -Q cipher"}, [exit_status, stderr_to_stdout]),
+ case check_ssh_client_support2(Port) of
+ 0 -> % exit status from command (0 == ok)
+ ssh:start(),
+ Config;
+ _ ->
+ {skip, "test case not supported by ssh client"}
+ end.
+
+check_ssh_client_support2(P) ->
+ receive
+ {P, {data, _A}} ->
+ check_ssh_client_support2(P);
+ {P, {exit_status, E}} ->
+ E
+ after 5000 ->
+ ct:pal("Openssh command timed out ~n"),
+ -1
end.
diff --git a/lib/ssh/test/ssh_unicode_SUITE.erl b/lib/ssh/test/ssh_unicode_SUITE.erl
new file mode 100644
index 0000000000..cc916673b3
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE.erl
@@ -0,0 +1,587 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%% gerl +fnu
+%% ct:run_test([{suite,"ssh_unicode_SUITE"}, {logdir,"LOG"}]).
+
+-module(ssh_unicode_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("kernel/include/file.hrl").
+
+% Default timetrap timeout
+-define(default_timeout, ?t:minutes(1)).
+
+-define(USER, "åke高兴").
+-define(PASSWD, "ärlig日本じん").
+-define('sftp.txt', "sftp瑞点.txt").
+-define('test.txt', "testハンス.txt").
+-define('link_test.txt', "link_test語.txt").
+
+-define(bindata, unicode:characters_to_binary("foobar å 一二三四いちにさんち") ).
+
+-define(NEWLINE, <<"\r\n">>).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+
+%% suite() ->
+%% [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [{group, sftp},
+ {group, shell}
+ ].
+
+
+init_per_suite(Config) ->
+ case {file:native_name_encoding(), (catch crypto:start())} of
+ {utf8, ok} ->
+ ssh:start(),
+ Config;
+ {utf8, _} ->
+ {skip,"Could not start crypto!"};
+ _ ->
+ {skip,"Not unicode filename enabled emulator"}
+ end.
+
+end_per_suite(Config) ->
+ ssh:stop(),
+ crypto:stop(),
+ Config.
+
+%%--------------------------------------------------------------------
+groups() ->
+ [{shell, [], [shell_no_unicode, shell_unicode_string]},
+ {sftp, [], [open_close_file, open_close_dir, read_file, read_dir,
+ write_file, rename_file, mk_rm_dir, remove_file, links,
+ retrieve_attributes, set_attributes, async_read, async_read_bin,
+ async_write
+ %% , position, pos_read, pos_write
+ ]}].
+
+init_per_group(Group, Config) when Group==sftp
+ ; Group==shell ->
+ PrivDir = ?config(priv_dir, Config),
+ SysDir = ?config(data_dir, Config),
+ Sftpd =
+ ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, PrivDir},
+ {user_passwords, [{?USER, ?PASSWD}]}]),
+ [{group,Group}, {sftpd, Sftpd} | Config];
+
+init_per_group(Group, Config) ->
+ [{group,Group} | Config].
+
+
+end_per_group(erlang_server, Config) ->
+ Config;
+end_per_group(_, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+init_per_testcase(_Case, Config) ->
+ prep(Config),
+ TmpConfig0 = lists:keydelete(watchdog, 1, Config),
+ TmpConfig = lists:keydelete(sftp, 1, TmpConfig0),
+ Dog = ct:timetrap(?default_timeout),
+
+ case ?config(group, Config) of
+ sftp ->
+ {_Pid, Host, Port} = ?config(sftpd, Config),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | TmpConfig];
+ shell ->
+ UserDir = ?config(priv_dir, Config),
+ process_flag(trap_exit, true),
+ {_Pid, _Host, Port} = ?config(sftpd, Config),
+ ct:sleep(500),
+ IO = ssh_test_lib:start_io_server(),
+ Shell = ssh_test_lib:start_shell(Port, IO, UserDir,
+ [{silently_accept_hosts, true},
+ {user,?USER},{password,?PASSWD}]),
+%%ct:pal("IO=~p, Shell=~p, self()=~p",[IO,Shell,self()]),
+ wait_for_erlang_first_line([{io,IO}, {shell,Shell} | Config])
+ end.
+
+
+wait_for_erlang_first_line(Config) ->
+ receive
+ {'EXIT', _, _} ->
+ {fail,no_ssh_connection};
+ <<"Eshell ",_/binary>> = ErlShellStart ->
+%% ct:pal("Erlang shell start: ~p~n", [ErlShellStart]),
+ Config;
+ Other ->
+ ct:pal("Unexpected answer from ssh server: ~p",[Other]),
+ {fail,unexpected_answer}
+ after 10000 ->
+ ct:pal("No answer from ssh-server"),
+ {fail,timeout}
+ end.
+
+
+
+end_per_testcase(rename_file, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NewFileName = filename:join(PrivDir, ?'test.txt'),
+ file:delete(NewFileName),
+ end_per_testcase(Config);
+end_per_testcase(_TC, Config) ->
+ end_per_testcase(Config).
+
+end_per_testcase(Config) ->
+ catch exit(?config(shell,Config), kill),
+ case ?config(sftp, Config) of
+ {Sftp, Connection} ->
+ ssh_sftp:stop_channel(Sftp),
+ ssh:close(Connection);
+ _ ->
+ ok
+ end.
+
+%%--------------------------------------------------------------------
+%% Test Cases --------------------------------------------------------
+
+-define(chk_expected(Received,Expected),
+ (fun(R_,E_) when R_==E_ -> ok;
+ (R_,E_) -> ct:pal("Expected: ~p~nReceived: ~p~n", [E_,R_]),
+ E_ = R_
+ end)(Received,Expected)).
+
+-define(receive_chk(Ref,Expected),
+ (fun(E__) ->
+ receive
+ {async_reply, Ref, Received} when Received==E__ ->
+ ?chk_expected(Received, E__);
+ {async_reply, Ref, Received} when Received=/=E__ ->
+ ct:pal("Expected: ~p~nReceived: ~p~n", [E__,Received]),
+ E__ = Received;
+ Msg ->
+ ct:pal("Expected (Ref=~p): ~p", [Ref,E__]),
+ ct:fail(Msg)
+ end
+ end)(Expected)).
+
+%%--------------------------------------------------------------------
+
+
+open_close_file() ->
+ [{doc, "Test API functions open/3 and close/2"}].
+open_close_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ lists:foreach(
+ fun(Mode) ->
+ ct:log("Mode: ~p",[Mode]),
+ %% list_dir(PrivDir),
+ ok = open_close_file(Sftp, FileName, Mode)
+ end,
+ [
+ [read],
+ [write],
+ [write, creat],
+ [write, trunc],
+ [append],
+ [read, binary]
+ ]).
+
+open_close_file(Server, File, Mode) ->
+ {ok, Handle} = ssh_sftp:open(Server, File, Mode),
+ ok = ssh_sftp:close(Server, Handle).
+
+%%--------------------------------------------------------------------
+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 = filename:join(PrivDir, ?'sftp.txt'),
+
+ {ok, Handle} = ssh_sftp:opendir(Sftp, PrivDir),
+ ok = ssh_sftp:close(Sftp, Handle),
+ {error, _} = ssh_sftp:opendir(Sftp, FileName).
+
+%%--------------------------------------------------------------------
+read_file() ->
+ [{doc, "Test API funtion read_file/2"}].
+read_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ ?chk_expected(ssh_sftp:read_file(Sftp,FileName), file:read_file(FileName)).
+
+%%--------------------------------------------------------------------
+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),
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("sftp list dir: ~ts~n", [Files]).
+
+%%--------------------------------------------------------------------
+write_file() ->
+ [{doc, "Test API function write_file/2"}].
+write_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ ok = ssh_sftp:write_file(Sftp, FileName, [?bindata]),
+ ?chk_expected(file:read_file(FileName), {ok,?bindata}).
+
+%%--------------------------------------------------------------------
+remove_file() ->
+ [{doc,"Test API function delete/2"}].
+remove_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ true = lists:member(filename:basename(FileName), Files),
+ ok = ssh_sftp:delete(Sftp, FileName),
+ {ok, NewFiles} = ssh_sftp:list_dir(Sftp, PrivDir),
+ false = lists:member(filename:basename(FileName), NewFiles),
+ {error, _} = ssh_sftp:delete(Sftp, FileName).
+%%--------------------------------------------------------------------
+rename_file() ->
+ [{doc, "Test API function rename_file/2"}].
+rename_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ NewFileName = filename:join(PrivDir, ?'test.txt'),
+
+ {Sftp, _} = ?config(sftp, Config),
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("FileName: ~ts~nFiles: ~ts~n", [FileName, [[$\n,$ ,F]||F<-Files] ]),
+ true = lists:member(filename:basename(FileName), Files),
+ false = lists:member(filename:basename(NewFileName), Files),
+ ok = ssh_sftp:rename(Sftp, FileName, NewFileName),
+ {ok, NewFiles} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("FileName: ~ts, Files: ~ts~n", [FileName, [[$\n,F]||F<-NewFiles] ]),
+
+ false = lists:member(filename:basename(FileName), NewFiles),
+ true = lists:member(filename:basename(NewFileName), NewFiles).
+
+%%--------------------------------------------------------------------
+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),
+
+ DirName = filename:join(PrivDir, "test"),
+ ok = ssh_sftp:make_dir(Sftp, DirName),
+ ok = ssh_sftp:del_dir(Sftp, DirName),
+ NewDirName = filename:join(PrivDir, "foo/bar"),
+ {error, _} = ssh_sftp:make_dir(Sftp, NewDirName),
+ {error, _} = ssh_sftp:del_dir(Sftp, PrivDir).
+
+%%--------------------------------------------------------------------
+links() ->
+ [{doc,"Tests API function make_symlink/3"}].
+links(Config) when is_list(Config) ->
+ case os:type() of
+ {win32, _} ->
+ {skip, "Links are not fully supported by windows"};
+ _ ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ LinkFileName = filename:join(PrivDir, ?'link_test.txt'),
+
+ ok = ssh_sftp:make_symlink(Sftp, LinkFileName, FileName),
+ {ok, FileName} = ssh_sftp:read_link(Sftp, LinkFileName)
+ end.
+
+%%--------------------------------------------------------------------
+retrieve_attributes() ->
+ [{doc, "Test API function read_file_info/3"}].
+retrieve_attributes(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+
+ {Sftp, _} = ?config(sftp, Config),
+ {ok, FileInfo} = ssh_sftp:read_file_info(Sftp, FileName),
+ {ok, NewFileInfo} = file:read_file_info(FileName),
+
+ %% TODO comparison. There are some differences now is that ok?
+ ct:pal("SFTP: ~p~nFILE: ~p~n", [FileInfo, NewFileInfo]).
+
+%%--------------------------------------------------------------------
+set_attributes() ->
+ [{doc,"Test API function write_file_info/3"}].
+set_attributes(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+
+ {Sftp, _} = ?config(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}),
+ {error, eacces} = file:write_file(FileName, "hello again"),
+ ssh_sftp:write_file_info(Sftp, FileName, #file_info{mode=8#600}),
+ ok = file:write_file(FileName, "hello again").
+
+%%--------------------------------------------------------------------
+
+async_read() ->
+ [{doc,"Test API aread/3"}].
+async_read(Config) when is_list(Config) ->
+ do_async_read(Config, false).
+
+async_read_bin() ->
+ [{doc,"Test API aread/3"}].
+async_read_bin(Config) when is_list(Config) ->
+ do_async_read(Config, true).
+
+do_async_read(Config, BinaryFlag) ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {ok,ExpDataBin} = file:read_file(FileName),
+ ExpData = case BinaryFlag of
+ true -> ExpDataBin;
+ false -> binary_to_list(ExpDataBin)
+ end,
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read|case BinaryFlag of
+ true -> [binary];
+ false -> []
+ end]),
+ {async, Ref} = ssh_sftp:aread(Sftp, Handle, 20),
+ ?receive_chk(Ref, {ok,ExpData}).
+
+%%--------------------------------------------------------------------
+async_write() ->
+ [{doc,"Test API awrite/3"}].
+async_write(Config) when is_list(Config) ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
+ Expected = ?bindata,
+ {async, Ref} = ssh_sftp:awrite(Sftp, Handle, Expected),
+
+ receive
+ {async_reply, Ref, ok} ->
+ {ok, Data} = file:read_file(FileName),
+ ?chk_expected(Data, Expected);
+ Msg ->
+ ct:fail(Msg)
+ end.
+
+%%--------------------------------------------------------------------
+
+position() ->
+ [{doc, "Test API functions position/3"}].
+position(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ Data = list_to_binary("1234567890"),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read]),
+
+ {ok, 3} = ssh_sftp:position(Sftp, Handle, {bof, 3}),
+ {ok, "4"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 10} = ssh_sftp:position(Sftp, Handle, eof),
+ eof = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 6} = ssh_sftp:position(Sftp, Handle, {bof, 6}),
+ {ok, "7"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 9} = ssh_sftp:position(Sftp, Handle, {cur, 2}),
+ {ok, "0"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 0} = ssh_sftp:position(Sftp, Handle, bof),
+ {ok, "1"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 1} = ssh_sftp:position(Sftp, Handle, cur),
+ {ok, "2"} = ssh_sftp:read(Sftp, Handle, 1).
+
+%%--------------------------------------------------------------------
+pos_read() ->
+ [{doc,"Test API functions pread/3 and apread/3"}].
+pos_read(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ Data = ?bindata,
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read]),
+ {async, Ref} = ssh_sftp:apread(Sftp, Handle, {bof,5}, 4),
+
+ ?receive_chk(Ref, {ok,binary_part(Data,5,4)}),
+ ?chk_expected(ssh_sftp:pread(Sftp,Handle,{bof,4},4), {ok,binary_part(Data,4,4)}).
+
+
+%%--------------------------------------------------------------------
+pos_write() ->
+ [{doc,"Test API functions pwrite/4 and apwrite/4"}].
+pos_write(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
+
+ Data = unicode:characters_to_list("再见"),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+
+ NewData = unicode:characters_to_list(" さようなら"),
+ {async, Ref} = ssh_sftp:apwrite(Sftp, Handle, {bof, 2}, NewData),
+ ?receive_chk(Ref, ok),
+
+ ok = ssh_sftp:pwrite(Sftp, Handle, eof, unicode:characters_to_list(" adjö ")),
+
+ ?chk_expected(ssh_sftp:read_file(Sftp,FileName),
+ {ok,unicode:characters_to_binary("再见 さようなら adjö ")}).
+
+%%--------------------------------------------------------------------
+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),
+ {error,"server failed to start sftp subsystem"} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user_interaction, false},
+ {user, ?USER},
+ {password, ?PASSWD},
+ {silently_accept_hosts, true}]).
+
+%%--------------------------------------------------------------------
+shell_no_unicode(Config) ->
+ do_shell(?config(io,Config),
+ [new_prompt,
+ {type,"io:format(\"hej ~p~n\",[42])."},
+ {expect,"hej 42"}
+ ]).
+
+%%--------------------------------------------------------------------
+shell_unicode_string(Config) ->
+ do_shell(?config(io,Config),
+ [new_prompt,
+ {type,"io:format(\"こにちわ~ts~n\",[\"四二\"])."},
+ {expect,"こにちわ四二"},
+ {expect,"ok"}
+ ]).
+
+%%--------------------------------------------------------------------
+%% Internal functions ------------------------------------------------
+%%--------------------------------------------------------------------
+prep(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ TestFile = filename:join(PrivDir, ?'sftp.txt'),
+ TestFile1 = filename:join(PrivDir, ?'test.txt'),
+ TestLink = filename:join(PrivDir, ?'link_test.txt'),
+
+ file:delete(TestFile),
+ file:delete(TestFile1),
+ file:delete(TestLink),
+
+ %% Initial config
+ DataDir = ?config(data_dir, Config),
+ FileName = filename:join(DataDir, ?'sftp.txt'),
+ {ok,_BytesCopied} = file:copy(FileName, TestFile),
+ Mode = 8#00400 bor 8#00200 bor 8#00040, % read & write owner, read group
+ {ok, FileInfo} = file:read_file_info(TestFile),
+ ok = file:write_file_info(TestFile,
+ FileInfo#file_info{mode = Mode}).
+
+
+%% list_dir(Dir) ->
+%% ct:pal("prep/1: ls(~p):~n~p~n~ts",[Dir, file:list_dir(Dir),
+%% begin
+%% {ok,DL} = file:list_dir(Dir),
+%% [[$\n|FN] || FN <- DL]
+%% end]).
+
+
+%%--------------------------------------------------------------------
+do_shell(IO, List) -> do_shell(IO, 0, List).
+
+do_shell(IO, N, [new_prompt|More]) ->
+ do_shell(IO, N+1, More);
+
+do_shell(IO, N, Ops=[{Order,Arg}|More]) ->
+ receive
+ X = <<"\r\n">> ->
+%% ct:pal("Skip newline ~p",[X]),
+ do_shell(IO, N, Ops);
+
+ <<P1,"> ">> when (P1-$0)==N ->
+ do_shell_prompt(IO, N, Order, Arg, More);
+
+ <<P1,P2,"> ">> when (P1-$0)*10 + (P2-$0) == N ->
+ do_shell_prompt(IO, N, Order, Arg, More);
+
+ Err when element(1,Err)==error ->
+ ct:fail("do_shell error: ~p~n",[Err]);
+
+ RecBin when Order==expect ; Order==expect_echo ->
+%% ct:pal("received ~p",[RecBin]),
+ RecStr = string:strip(unicode:characters_to_list(RecBin)),
+ ExpStr = string:strip(Arg),
+ case lists:prefix(ExpStr, RecStr) of
+ true when Order==expect ->
+ ct:pal("Matched ~ts",[RecStr]),
+ do_shell(IO, N, More);
+ true when Order==expect_echo ->
+ ct:pal("Matched echo ~ts",[RecStr]),
+ do_shell(IO, N, More);
+ false ->
+ ct:fail("*** Expected ~p, but got ~p",[string:strip(ExpStr),RecStr])
+ end
+ after 10000 ->
+ case Order of
+ expect -> ct:fail("timeout, expected ~p",[string:strip(Arg)]);
+ type -> ct:fail("timeout, no prompt")
+ end
+ end;
+
+do_shell(_, _, []) ->
+ ok.
+
+
+do_shell_prompt(IO, N, type, Str, More) ->
+%% ct:pal("Matched prompt ~p to trigger sending of next line to server",[N]),
+ IO ! {input, self(), Str++"\r\n"},
+ ct:pal("Promt '~p> ', Sent ~ts",[N,Str++"\r\n"]),
+ do_shell(IO, N, [{expect_echo,Str}|More]); % expect echo of the sent line
+do_shell_prompt(IO, N, Op, Str, More) ->
+%% ct:pal("Matched prompt ~p",[N]),
+ do_shell(IO, N, [{Op,Str}|More]).
+
+%%--------------------------------------------------------------------
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt b/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt
new file mode 100644
index 0000000000..3eaaddca21
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt
@@ -0,0 +1 @@
+åäöÅÄÖ瑞語
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt b/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt
new file mode 100644
index 0000000000..3eaaddca21
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt
@@ -0,0 +1 @@
+åäöÅÄÖ瑞語
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key
new file mode 100644
index 0000000000..51ab6fbd88
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key
@@ -0,0 +1,13 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBuwIBAAKBgQCClaHzE2ul0gKSUxah5W0W8UiJLy4hXngKEqpaUq9SSdVdY2LK
+wVfKH1gt5iuaf1FfzOhsIC9G/GLnjYttXZc92cv/Gfe3gR+s0ni2++MX+T++mE/Q
+diltXv/Hp27PybS67SmiFW7I+RWnT2OKlMPtw2oUuKeztCe5UWjaj/y5FQIVAPLA
+l9RpiU30Z87NRAHY3NTRaqtrAoGANMRxw8UfdtNVR0CrQj3AgPaXOGE4d+G4Gp4X
+skvnCHycSVAjtYxebUkzUzt5Q6f/IabuLUdge3gXrc8BetvrcKbp+XZgM0/Vj2CF
+Ymmy3in6kzGZq7Fw1sZaku6AOU8vLa5woBT2vAcHLLT1bLAzj7viL048T6MfjrOP
+ef8nHvACgYBhDWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah
+/XcF3DeRF+eEoz48wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+U
+ykSTXYUbtsfTNRFQGBW2/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0CgIVAN4wtL5W
+Lv62jKcdskxNyz2NQoBx
+-----END DSA PRIVATE KEY-----
+
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub
new file mode 100644
index 0000000000..4dbb1305b0
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub
@@ -0,0 +1,11 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1kc3MAAACBAIKVofMTa6XSApJTFqHlbRbxSIkvLiFeeAoSqlpSr1JJ1V1j
+YsrBV8ofWC3mK5p/UV/M6GwgL0b8YueNi21dlz3Zy/8Z97eBH6zSeLb74xf5P76YT9B2
+KW1e/8enbs/JtLrtKaIVbsj5FadPY4qUw+3DahS4p7O0J7lRaNqP/LkVAAAAFQDywJfU
+aYlN9GfOzUQB2NzU0WqrawAAAIA0xHHDxR9201VHQKtCPcCA9pc4YTh34bganheyS+cI
+fJxJUCO1jF5tSTNTO3lDp/8hpu4tR2B7eBetzwF62+twpun5dmAzT9WPYIViabLeKfqT
+MZmrsXDWxlqS7oA5Ty8trnCgFPa8BwcstPVssDOPu+IvTjxPox+Os495/yce8AAAAIBh
+DWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah/XcF3DeRF+eEoz48
+wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+UykSTXYUbtsfTNRFQGBW2
+/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0Cg==
+---- END SSH2 PUBLIC KEY ----
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 8186f39888..9d486f8890 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,5 +1,4 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 3.0
+SSH_VSN = 3.2.4
APP_VSN = "ssh-$(SSH_VSN)"
-
diff --git a/lib/ssl/doc/src/book.xml b/lib/ssl/doc/src/book.xml
index ecfb915b44..317997b22b 100644
--- a/lib/ssl/doc/src/book.xml
+++ b/lib/ssl/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/fascicules.xml b/lib/ssl/doc/src/fascicules.xml
index 7ee764fda3..7a60e8dd1f 100644
--- a/lib/ssl/doc/src/fascicules.xml
+++ b/lib/ssl/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/ssl/doc/src/notes.xml b/lib/ssl/doc/src/notes.xml
index 141f076eed..fe0606b1a3 100644
--- a/lib/ssl/doc/src/notes.xml
+++ b/lib/ssl/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -25,7 +25,450 @@
<file>notes.xml</file>
</header>
<p>This document describes the changes made to the SSL application.</p>
- <section><title>SSL 5.3.3</title>
+ <section><title>SSL 6.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Terminate gracefully when receving bad input to premaster
+ secret calculation</p>
+ <p>
+ Own Id: OTP-12783</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 6.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Exclude self-signed trusted anchor certificates from
+ certificate prospective certification path according to
+ RFC 3280.</p>
+ <p>
+ This will avoid some unnecessary certificate processing.</p>
+ <p>
+ Own Id: OTP-12449</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Separate client and server session cache internally.</p>
+ <p>
+ Avoid session table growth when client starts many
+ connections in such a manner that many connections are
+ started before session reuse is possible. Only save a new
+ session in client if there is no equivalent session
+ already stored.</p>
+ <p>
+ Own Id: OTP-11365</p>
+ </item>
+ <item>
+ <p>
+ The PEM cache is now validated by a background process,
+ instead of always keeping it if it is small enough and
+ clearing it otherwise. That strategy required that small
+ caches where cleared by API function if a file changes on
+ disk.</p>
+ <p>
+ However export the API function to clear the cache as it
+ may still be useful.</p>
+ <p>
+ Own Id: OTP-12391</p>
+ </item>
+ <item>
+ <p>
+ Add padding check for TLS-1.0 to remove Poodle
+ vulnerability from TLS 1.0, also add the option
+ padding_check. This option only affects TLS-1.0
+ connections and if set to false it disables the block
+ cipher padding check to be able to interoperate with
+ legacy software.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12420</p>
+ </item>
+ <item>
+ <p>
+ Add support for TLS_FALLBACK_SCSV used to prevent
+ undesired TLS version downgrades. If used by a client
+ that is vulnerable to the POODLE attack, and the server
+ also supports TLS_FALLBACK_SCSV, the attack can be
+ prevented.</p>
+ <p>
+ Own Id: OTP-12458</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Make sure the clean rule for ssh, ssl, eunit and otp_mibs
+ actually removes generated files.</p>
+ <p>
+ Own Id: OTP-12200</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Change code to reflect that state data may be secret to
+ avoid breaking dialyzer contracts.</p>
+ <p>
+ Own Id: OTP-12341</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Handle the fact that servers may send an empty SNI
+ extension to the client.</p>
+ <p>
+ Own Id: OTP-12198</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Corrected handling of ECC certificates, there where
+ several small issues with the handling of such
+ certificates in the ssl and public_key application. Now
+ ECC signed ECC certificates shall work and not only RSA
+ signed ECC certificates.</p>
+ <p>
+ Own Id: OTP-12026</p>
+ </item>
+ <item>
+ <p>
+ Check that the certificate chain ends with a trusted ROOT
+ CA e.i. a self-signed certificate, but provide an option
+ partial_chain to enable the application to define an
+ intermediat CA as trusted.</p>
+ <p>
+ Own Id: OTP-12149</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add decode functions for SNI (Server Name Indication)</p>
+ <p>
+ Own Id: OTP-12048</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ ssl:recv now returns {error, einval} if applied to a non
+ passive socket, the same as gen_tcp:recv. </p>
+ <p>
+ Thanks to Danil Zagoskin for reporting this issue</p>
+ <p>
+ Own Id: OTP-11878</p>
+ </item>
+ <item>
+ <p>
+ Corrected handling of default values for
+ signature_algorithms extension in TLS-1.2 and
+ corresponding values used in previous versions that does
+ not support this extension. </p>
+ <p>
+ Thanks to Danil Zagoskin</p>
+ <p>
+ Own Id: OTP-11886</p>
+ </item>
+ <item>
+ <p>
+ Handle socket option inheritance when pooling of accept
+ sockets is used</p>
+ <p>
+ Own Id: OTP-11897</p>
+ </item>
+ <item>
+ <p>
+ Make sure that the list of versions, possibly supplied in
+ the versions option, is not order dependent.</p>
+ <p>
+ Thanks to Ransom Richardson for reporting this issue</p>
+ <p>
+ Own Id: OTP-11912</p>
+ </item>
+ <item>
+ <p>
+ Reject connection if the next_protocol message is sent
+ twice.</p>
+ <p>
+ Own Id: OTP-11926</p>
+ </item>
+ <item>
+ <p>
+ Correct options handling when ssl:ssl_accept/3 is called
+ with new ssl options after calling ssl:listen/2</p>
+ <p>
+ Own Id: OTP-11950</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Gracefully handle unknown alerts</p>
+ <p>
+ Thanks to Atul Atri for reporting this issue</p>
+ <p>
+ Own Id: OTP-11874</p>
+ </item>
+ <item>
+ <p>
+ Gracefully ignore cipher suites sent by client not
+ supported by the SSL/TLS version that the client has
+ negotiated.</p>
+ <p>
+ Thanks to Danil Zagoskin for reporting this issue</p>
+ <p>
+ Own Id: OTP-11875</p>
+ </item>
+ <item>
+ <p>
+ Gracefully handle structured garbage, i.e a client sends
+ some garbage in a ssl record instead of a valid fragment.</p>
+ <p>
+ Thanks to Danil Zagoskin</p>
+ <p>
+ Own Id: OTP-11880</p>
+ </item>
+ <item>
+ <p>
+ Gracefully handle invalid alerts</p>
+ <p>
+ Own Id: OTP-11890</p>
+ </item>
+ <item>
+ <p>
+ Generalize handling of default ciphers</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11966</p>
+ </item>
+ <item>
+ <p>
+ Make sure change cipher spec is correctly handled</p>
+ <p>
+ Own Id: OTP-11975</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Fix possible mismatch between SSL/TLS version and default
+ ciphers. Could happen when you specified SSL/TLS-version
+ in optionlist to listen or accept.</p>
+ <p>
+ Own Id: OTP-11712</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Unicode adaptations</p>
+ <p>
+ Own Id: OTP-11620</p>
+ </item>
+ <item>
+ <p>
+ Added option honor_cipher_order. This instructs the
+ server to prefer its own cipher ordering rather than the
+ client's and can help protect against things like BEAST
+ while maintaining compatability with clients which only
+ support older ciphers. </p>
+ <p>
+ Thanks to Andrew Thompson for the implementation, and
+ Andreas Schultz for the test cases.</p>
+ <p>
+ Own Id: OTP-11621</p>
+ </item>
+ <item>
+ <p>
+ Replace boolean checking in validate_option with
+ is_boolean guard. </p>
+ <p>
+ Thanks to Andreas Schultz.</p>
+ <p>
+ Own Id: OTP-11634</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Correct clean up of certificate database when certs are
+ inputed in pure DER format.The incorrect code could cause
+ a memory leek when certs where inputed in DER. Thanks to
+ Bernard Duggan for reporting this.</p>
+ <p>
+ Own Id: OTP-11733</p>
+ </item>
+ <item>
+ <p>
+ Improved documentation of the cacertfile option</p>
+ <p>
+ Own Id: OTP-11759 Aux Id: seq12535 </p>
+ </item>
+ <item>
+ <p>
+ Avoid next protocol negotiation failure due to incorrect
+ option format.</p>
+ <p>
+ Own Id: OTP-11760</p>
+ </item>
+ <item>
+ <p>
+ Handle v1 CRLs, with no extensions and fixes issues with
+ IDP (Issuing Distribution Point) comparison during CRL
+ validation. </p>
+ <p>
+ Thanks to Andrew Thompson</p>
+ <p>
+ Own Id: OTP-11761</p>
+ </item>
+ <item>
+ <p>
+ Server now ignores client ECC curves that it does not
+ support instead of crashing. </p>
+ <p>
+ Thanks to Danil Zagoskin for reporting the issue and
+ suggesting a solution.</p>
+ <p>
+ Own Id: OTP-11780</p>
+ </item>
+ <item>
+ <p>
+ Handle SNI (Server Name Indication) alert
+ unrecognized_name and gracefully deal with unexpected
+ alerts. </p>
+ <p>
+ Thanks to Masatake Daimon for reporting this.</p>
+ <p>
+ Own Id: OTP-11815</p>
+ </item>
+ <item>
+ <p>
+ Add possibility to specify ssl options when calling
+ ssl:ssl_accept</p>
+ <p>
+ Own Id: OTP-11837</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/ssl/doc/src/pkix_certs.xml b/lib/ssl/doc/src/pkix_certs.xml
index 1de807cadc..cfbc6b08d7 100644
--- a/lib/ssl/doc/src/pkix_certs.xml
+++ b/lib/ssl/doc/src/pkix_certs.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/refman.xml b/lib/ssl/doc/src/refman.xml
index 011819e82b..ae11198edb 100644
--- a/lib/ssl/doc/src/refman.xml
+++ b/lib/ssl/doc/src/refman.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2011</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/release_notes.xml b/lib/ssl/doc/src/release_notes.xml
index e7c766bb91..123e8e1451 100644
--- a/lib/ssl/doc/src/release_notes.xml
+++ b/lib/ssl/doc/src/release_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 1d74faf1b3..0c042f8571 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2013</year>
+ <year>1999</year><year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -163,7 +163,7 @@
is supplied it will override the certfile option.</item>
<tag>{certfile, path()}</tag>
- <item>Path to a file containing the user's certificate.</item>
+ <item>Path to a file containing the user's PEM encoded certificate.</item>
<tag>{key, {'RSAPrivateKey'| 'DSAPrivateKey' | 'ECPrivateKey' |'PrivateKeyInfo', der_encoded()}}</tag>
<item> The DER encoded users private key. If this option
@@ -184,12 +184,6 @@
<item> The DER encoded trusted certificates. If this option
is supplied it will override the cacertfile option.</item>
- <tag>{cacertfile, path()}</tag>
- <item>Path to file containing PEM encoded
- CA certificates (trusted certificates used for verifying a peer
- certificate). May be omitted if you do not want to verify
- the peer.</item>
-
<tag>{ciphers, ciphers()}</tag>
<item>The cipher suites that should be supported. The function
<c>cipher_suites/0</c> can be used to find all ciphers that are
@@ -232,7 +226,7 @@
<p>The verification fun should be defined as:</p>
<code>
-fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
+fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom() | {revoked, atom()}} |
{extension, #'Extension'{}}, InitialUserState :: term()) ->
{valid, UserState :: term()} | {valid_peer, UserState :: term()} |
{fail, Reason :: term()} | {unknown, UserState :: term()}.
@@ -258,7 +252,7 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
always returns {valid, UserState}, the TLS/SSL handshake will
not be terminated with respect to verification failures and
the connection will be established. If called with an
- extension unknown to the user application the return value
+ extension unknown to the user application, the return value
{unknown, UserState} should be used.</p>
<p>The default verify_fun option in verify_peer mode:</p>
@@ -289,9 +283,29 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
end, []}
</code>
-<p>Possible path validation errors: </p>
+ <p>Possible path validation errors are given on the form {bad_cert, Reason} where Reason is:</p>
+
+ <taglist>
+ <tag>unknown_ca</tag>
+ <item>No trusted CA was found in the trusted store. The trusted CA is
+ normally a so called ROOT CA that is a self-signed cert. Trust may
+ be claimed for an intermediat CA (trusted anchor does not have to be self signed
+ according to X-509) by using the option <c>partial_chain</c></item>
+
+ <tag>selfsigned_peer</tag>
+ <item>The chain consisted only of one self-signed certificate.</item>
+
+ <tag>PKIX X-509-path validation error</tag>
+ <item> Possible such reasons see <seealso
+ marker="public_key:public_key#pkix_path_validation-3"> public_key:pkix_path_validation/3 </seealso></item>
+ </taglist>
-<p> {bad_cert, cert_expired}, {bad_cert, invalid_issuer}, {bad_cert, invalid_signature}, {bad_cert, unknown_ca},{bad_cert, selfsigned_peer}, {bad_cert, name_not_permitted}, {bad_cert, missing_basic_constraint}, {bad_cert, invalid_key_usage}</p>
+ </item>
+
+ <tag>{partial_chain, fun(Chain::[DerCert]) -> {trusted_ca, DerCert} | unknown_ca </tag>
+ <item>
+ Claim an intermediat CA in the chain as trusted. TLS will then perform the public_key:pkix_path_validation/3
+ with the selected CA as trusted anchor and the rest of the chain.
</item>
<tag>{versions, [protocol()]}</tag>
@@ -334,11 +348,23 @@ fun(srp, Username :: string(), UserState :: term()) ->
</p>
</item>
+ <tag>{padding_check, boolean()}</tag>
+ <item>
+ <p> This option only affects TLS-1.0 connections.
+ If set to false it disables the block cipher padding check
+ to be able to interoperate with legacy software.
+ </p>
+
+ <warning><p> Using this option makes TLS vulnerable to
+ the Poodle attack</p></warning>
+
+ </item>
+
</taglist>
-
+
</section>
-
- <section>
+
+ <section>
<title>SSL OPTION DESCRIPTIONS - CLIENT SIDE</title>
<p>Options described here are client specific or has a slightly different
@@ -354,7 +380,13 @@ fun(srp, Username :: string(), UserState :: term()) ->
<item>Specifies if client should try to reuse sessions
when possible.
</item>
-
+
+ <tag>{cacertfile, path()}</tag>
+ <item>The path to a file containing PEM encoded CA certificates. The CA
+ certificates are used during server authentication and when building the
+ client certificate chain.
+ </item>
+
<tag>{client_preferred_next_protocols, {Precedence :: server | client, ClientPrefs :: [binary()]}}</tag>
<tag>{client_preferred_next_protocols, {Precedence :: server | client, ClientPrefs :: [binary()], Default :: binary()}}</tag>
<item>
@@ -393,6 +425,23 @@ fun(srp, Username :: string(), UserState :: term()) ->
Indication extension will be sent if possible, this option may also be
used to disable that behavior.</p>
</item>
+ <tag>{fallback, boolean()}</tag>
+ <item>
+ <p> Send special cipher suite TLS_FALLBACK_SCSV to avoid undesired TLS version downgrade.
+ Defaults to false</p>
+ <warning><p>Note this option is not needed in normal TLS usage and should not be used
+ to implement new clients. But legacy clients that that retries connections in the following manner</p>
+
+ <p><c> ssl:connect(Host, Port, [...{versions, ['tlsv2', 'tlsv1.1', 'tlsv1', 'sslv3']}])</c></p>
+ <p><c> ssl:connect(Host, Port, [...{versions, [tlsv1.1', 'tlsv1', 'sslv3']}, {fallback, true}])</c></p>
+ <p><c> ssl:connect(Host, Port, [...{versions, ['tlsv1', 'sslv3']}, {fallback, true}]) </c></p>
+ <p><c> ssl:connect(Host, Port, [...{versions, ['sslv3']}, {fallback, true}]) </c></p>
+
+ <p>may use it to avoid undesired TLS version downgrade. Note that TLS_FALLBACK_SCSV must also
+ be supported by the server for the prevention to work.
+ </p></warning>
+ </item>
+
</taglist>
</section>
@@ -403,7 +452,17 @@ fun(srp, Username :: string(), UserState :: term()) ->
meaning in the server than in the client.</p>
<taglist>
-
+
+ <tag>{cacertfile, path()}</tag>
+ <item>The path to a file containing PEM encoded CA
+ certificates. The CA certificates are used to build the server
+ certificate chain, and for client authentication. Also the CAs
+ are used in the list of acceptable client CAs passed to the
+ client when a certificate is requested. May be omitted if there
+ is no need to verify the client and if there are not any
+ intermediate CAs for the server certificate.
+ </item>
+
<tag>{dh, der_encoded()}</tag>
<item>The DER encoded Diffie Hellman parameters. If this option
is supplied it will override the dhfile option.
@@ -460,6 +519,10 @@ fun(srp, Username :: string(), UserState :: term()) ->
</item>
<tag>{log_alert, boolean()}</tag>
<item>If false, error reports will not be displayed.</item>
+ <tag>{honor_cipher_order, boolean()}</tag>
+ <item>If true, use the server's preference for cipher selection. If false
+ (the default), use the client's preference.
+ </item>
</taglist>
</section>
@@ -504,7 +567,19 @@ fun(srp, Username :: string(), UserState :: term()) ->
</p>
</desc>
</func>
-
+
+ <func>
+ <name>clear_pem_cache() -> ok </name>
+ <fsummary> Clears the pem cache</fsummary>
+
+ <desc><p>PEM files, used by ssl API-functions, are cached. The
+ cache is regularly checked to see if any cache entries should be
+ invalidated, however this function provides a way to
+ unconditionally clear the whole cache.
+ </p>
+ </desc>
+ </func>
+
<func>
<name>connect(Socket, SslOptions) -> </name>
<name>connect(Socket, SslOptions, Timeout) -> {ok, SslSocket}
@@ -754,39 +829,45 @@ fun(srp, Username :: string(), UserState :: term()) ->
</func>
<func>
- <name>ssl_accept(ListenSocket) -> </name>
- <name>ssl_accept(ListenSocket, Timeout) -> ok | {error, Reason}</name>
- <fsummary>Perform server-side SSL handshake</fsummary>
+ <name>ssl_accept(Socket) -> </name>
+ <name>ssl_accept(Socket, Timeout) -> ok | {error, Reason}</name>
+ <fsummary>Perform server-side SSL/TLS handshake</fsummary>
<type>
- <v>ListenSocket = sslsocket()</v>
+ <v>Socket = sslsocket()</v>
<v>Timeout = integer()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>The <c>ssl_accept</c> function establish the SSL connection
- on the server side. It should be called directly after
- <c>transport_accept</c>, in the spawned server-loop.</p>
+ <p> Performs the SSL/TLS server-side handshake <c>Socket</c> is a socket as returned
+ by <seealso
+ marker="#transport_accept-2">ssl:transport_accept/[1,2]</seealso>
+ </p>
</desc>
</func>
<func>
- <name>ssl_accept(ListenSocket, SslOptions) -> </name>
- <name>ssl_accept(ListenSocket, SslOptions, Timeout) -> {ok, Socket} | {error, Reason}</name>
- <fsummary>Perform server-side SSL handshake</fsummary>
+ <name>ssl_accept(Socket, SslOptions) -> </name>
+ <name>ssl_accept(Socket, SslOptions, Timeout) -> {ok, Socket} | ok | {error, Reason}</name>
+ <fsummary>Perform server-side SSL/TLS handshake</fsummary>
<type>
- <v>ListenSocket = socket()</v>
+ <v>Socket = socket() | sslsocket() </v>
<v>SslOptions = ssloptions()</v>
<v>Timeout = integer()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p> Upgrades a gen_tcp, or
- equivalent, socket to an ssl socket i.e. performs the
- ssl server-side handshake.</p>
+ <p> If <c>Socket</c> is a socket() - upgrades a gen_tcp, or equivalent, socket to an ssl socket
+ i.e. performs the SSL/TLS server-side handshake and returns the ssl socket.
+ </p>
+
<warning><p>Note that the listen socket should be in {active, false} mode
before telling the client that the server is ready to upgrade
- and calling this function, otherwise the upgrade may
+ by calling this function, otherwise the upgrade may
or may not succeed depending on timing.</p></warning>
+
+ <p> If <c>Socket</c> is an sslsocket() - provides additional SSL/TLS options to those specified in <seealso
+ marker="#listen-2">ssl:listen/2 </seealso> and then performs the SSL/TLS handshake.
+ </p>
</desc>
</func>
@@ -828,33 +909,38 @@ fun(srp, Username :: string(), UserState :: term()) ->
</func>
<func>
- <name>transport_accept(Socket) -></name>
- <name>transport_accept(Socket, Timeout) ->
+ <name>transport_accept(ListenSocket) -></name>
+ <name>transport_accept(ListenSocket, Timeout) ->
{ok, NewSocket} | {error, Reason}</name>
<fsummary>Accept an incoming connection and
prepare for <c>ssl_accept</c></fsummary>
<type>
- <v>Socket = NewSocket = sslsocket()</v>
+ <v>ListenSocket = NewSocket = sslsocket()</v>
<v>Timeout = integer()</v>
<v>Reason = reason()</v>
</type>
<desc>
<p>Accepts an incoming connection request on a listen socket.
- <c>ListenSocket</c> must be a socket returned from
- <c>listen/2</c>. The socket returned should be passed to
- <c>ssl_accept</c> to complete ssl handshaking and
- establishing the connection.</p>
+ <c>ListenSocket</c> must be a socket returned from
+ <seealso
+ marker="#listen-2"> ssl:listen/2</seealso>.
+ The socket returned should be passed to
+ <seealso marker="#ssl_accept-2"> ssl:ssl_accept[2,3]</seealso>
+ to complete handshaking i.e
+ establishing the SSL/TLS connection.</p>
<warning>
- <p>The socket returned can only be used with <c>ssl_accept</c>,
- no traffic can be sent or received before that call.</p>
+ <p>The socket returned can only be used with
+ <seealso marker="#ssl_accept-2"> ssl:ssl_accept[2,3]</seealso>
+ no traffic can be sent or received before that call.</p>
</warning>
<p>The accepted socket inherits the options set for
- <c>ListenSocket</c> in <c>listen/2</c>.</p>
+ <c>ListenSocket</c> in <seealso
+ marker="#listen-2"> ssl:listen/2</seealso>.</p>
<p>The default
- value for <c>Timeout</c> is <c>infinity</c>. If
- <c>Timeout</c> is specified, and no connection is accepted
- within the given time, <c>{error, timeout}</c> is
- returned.</p>
+ value for <c>Timeout</c> is <c>infinity</c>. If
+ <c>Timeout</c> is specified, and no connection is accepted
+ within the given time, <c>{error, timeout}</c> is
+ returned.</p>
</desc>
</func>
diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml
index 0ee5b23e47..f1377cabda 100644
--- a/lib/ssl/doc/src/ssl_app.xml
+++ b/lib/ssl/doc/src/ssl_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
- <year>1999</year><year>2013</year>
+ <year>1999</year><year>2015</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -82,7 +82,16 @@
callback module, defaults to [].
</p>
</item>
-
+
+ <tag><c><![CDATA[ssl_pem_cache_clean = integer() <optional>]]></c></tag>
+ <item>
+ <p>
+ Number of milliseconds between PEM cache validations.
+ </p>
+ <seealso
+ marker="ssl#clear_pem_cache-0">ssl:clear_pem_cache/0</seealso>
+
+ </item>
</taglist>
</section>
diff --git a/lib/ssl/doc/src/ssl_distribution.xml b/lib/ssl/doc/src/ssl_distribution.xml
index 4ae4ead3ee..4b4d042f70 100644
--- a/lib/ssl/doc/src/ssl_distribution.xml
+++ b/lib/ssl/doc/src/ssl_distribution.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/ssl_protocol.xml b/lib/ssl/doc/src/ssl_protocol.xml
index f540dc999b..80d9cc4ee8 100644
--- a/lib/ssl/doc/src/ssl_protocol.xml
+++ b/lib/ssl/doc/src/ssl_protocol.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -83,7 +83,7 @@
<em>subject</em>. The certificate is signed
with the private key of the issuer of the certificate. A chain
of trust is build by having the issuer in its turn being
- certified by an other certificate and so on until you reach the
+ certified by another certificate and so on until you reach the
so called root certificate that is self signed i.e. issued
by itself.</p>
diff --git a/lib/ssl/doc/src/ssl_session_cache_api.xml b/lib/ssl/doc/src/ssl_session_cache_api.xml
index e0b07961fb..82de1784ca 100644
--- a/lib/ssl/doc/src/ssl_session_cache_api.xml
+++ b/lib/ssl/doc/src/ssl_session_cache_api.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1999</year><year>2010</year>
+ <year>1999</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/usersguide.xml b/lib/ssl/doc/src/usersguide.xml
index 6528c00a0b..b1c7190085 100644
--- a/lib/ssl/doc/src/usersguide.xml
+++ b/lib/ssl/doc/src/usersguide.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/doc/src/using_ssl.xml b/lib/ssl/doc/src/using_ssl.xml
index ab837a156a..cce388d02a 100644
--- a/lib/ssl/doc/src/using_ssl.xml
+++ b/lib/ssl/doc/src/using_ssl.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/ssl/internal_doc/ssl-implementation.txt b/lib/ssl/internal_doc/ssl-implementation.txt
deleted file mode 100644
index e5d6ac8cd0..0000000000
--- a/lib/ssl/internal_doc/ssl-implementation.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
-Important modules:
-
- module behaviour children
- ------ ---------
- ssl_app application ssl_sup
- ssl_sup supervisor ssl_server, ssl_broker_sup
- ssl_server gen_server -
- ssl_broker_sup supervisor ssl_broker
- ssl_broker gen_server -
-
-The ssl_server controls a port program that implements the SSL functionality.
-That port program uses the OpenSSL package.
-
-Each socket has a corresponding broker (listen, accept or connect). A broker
-is created and supervised by the ssl_broker_sup.
-
-All communication is between a user and a broker. The broker communicates
-with the ssl_server, that sends its commands to the port program and handles
-the port program responses, that are distributed to users through the
-brokers.
-
-There is a distinction between commands and data flow between the ssl_server
-and the port program. Each established connection between the user and the
-outside world consists of a local erlang socket (owned by the broker) that
-is read from and written to by the broker. At the other end of the local
-connection is a local socket in the port program.
-
-The "real" socket that connects to the outside world is in the port program
-(including listen sockets). The main purpose of the port program is to
-shuffle data between local sockets and outside world sockets, and detect and
-propagate read and write errors (including detection of closed sockets) to
-the ssl_server.
-
-There is documentation in the ssl_broker.erl module.
-
-There is also documentation in the esock.c and esock_openssl.c files.
-
-The ssl_pem.erl, ssl_pkix.erl and ssl_base64.erl modules are support
-modules for reading SSL certificates. Modules for parsing certificates
-are generated from ASN.1 modules in the `pkix' directory.
-
-The `examples' directory contains functions for generating certificates.
-Those certificates are used in the test suites.
-
-
-
-
-
-
-
-
diff --git a/lib/ssl/src/Makefile b/lib/ssl/src/Makefile
index 131b615277..0c00a650b9 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2013. All Rights Reserved.
+# Copyright Ericsson AB 1999-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -66,6 +66,7 @@ MODULES= \
ssl_session \
ssl_session_cache \
ssl_socket \
+ ssl_listen_tracker_sup \
tls_record \
dtls_record \
ssl_record \
@@ -117,7 +118,7 @@ $(TARGET_FILES): $(BEHAVIOUR_TARGET_FILES)
debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
clean:
- rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
+ rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(BEHAVIOUR_TARGET_FILES)
rm -f errs core *~
$(APP_TARGET): $(APP_SRC) ../vsn.mk
diff --git a/lib/ssl/src/dtls.erl b/lib/ssl/src/dtls.erl
index 1cad9560b5..780bddeb10 100644
--- a/lib/ssl/src/dtls.erl
+++ b/lib/ssl/src/dtls.erl
@@ -31,25 +31,29 @@
handshake/1, handshake/2, handshake/3]).
%%--------------------------------------------------------------------
+%%
+%% Description: Connect to a DTLS server.
+%%--------------------------------------------------------------------
+
-spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
{error, reason()}.
+
+connect(Socket, Options) when is_port(Socket) ->
+ connect(Socket, Options, infinity).
+
-spec connect(host() | port(), [connect_option()] | inet:port_number(),
timeout() | list()) ->
{ok, #sslsocket{}} | {error, reason()}.
--spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
-
-%%
-%% Description: Connect to an DTLS server.
-%%--------------------------------------------------------------------
-connect(Socket, Options) when is_port(Socket) ->
- connect(Socket, Options, infinity).
connect(Socket, SslOptions, Timeout) when is_port(Socket) ->
DTLSOpts = [{protocol, dtls} | SslOptions],
ssl:connect(Socket, DTLSOpts, Timeout);
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
+
+-spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Host, Port, Options, Timeout) ->
DTLSOpts = [{protocol, dtls} | Options],
ssl:connect(Host, Port, DTLSOpts, Timeout).
@@ -65,38 +69,44 @@ listen(Port, Options) ->
ssl:listen(Port, DTLSOpts).
%%--------------------------------------------------------------------
--spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
- {error, reason()}.
%%
%% Description: Performs transport accept on an ssl listen socket
%%--------------------------------------------------------------------
+-spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(ListenSocket) ->
accept(ListenSocket, infinity).
+
+-spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(Socket, Timeout) ->
ssl:transport_accept(Socket, Timeout).
%%--------------------------------------------------------------------
--spec handshake(#sslsocket{}) -> ok | {error, reason()}.
--spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
- | transport_option()]) ->
- ok | {ok, #sslsocket{}} | {error, reason()}.
--spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}) -> ok | {error, reason()}.
+
handshake(ListenSocket) ->
handshake(ListenSocket, infinity).
+
+-spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
+ | transport_option()]) ->
+ ok | {ok, #sslsocket{}} | {error, reason()}.
+
handshake(#sslsocket{} = Socket, Timeout) ->
ssl:ssl_accept(Socket, Timeout);
handshake(ListenSocket, SslOptions) when is_port(ListenSocket) ->
handshake(ListenSocket, SslOptions, infinity).
+
+-spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
handshake(Socket, SslOptions, Timeout) when is_port(Socket) ->
ssl:ssl_accept(Socket, SslOptions, Timeout).
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index da2e076856..508983ddac 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,222 +20,515 @@
%% Internal application API
-%%====================================================================
+-behaviour(gen_fsm).
+
+-include("dtls_connection.hrl").
+-include("dtls_handshake.hrl").
+-include("ssl_alert.hrl").
+-include("dtls_record.hrl").
+-include("ssl_cipher.hrl").
+-include("ssl_api.hrl").
+-include("ssl_internal.hrl").
+-include("ssl_srp.hrl").
+-include_lib("public_key/include/public_key.hrl").
+
%% Internal application API
-%%====================================================================
+%% Setup
+-export([start_fsm/8]).
+
+%% State transition handling
+-export([next_record/1, next_state/4%,
+ %%next_state_connection/2
+ ]).
+
+%% Handshake handling
+-export([%%renegotiate/1,
+ send_handshake/2, send_change_cipher/2]).
+
+%% Alert and close handling
+-export([send_alert/2, handle_own_alert/4, %%handle_close_alert/3,
+ handle_normal_shutdown/3
+ %%handle_unexpected_message/3,
+ %%alert_user/5, alert_user/8
+ ]).
+
+%% Data handling
+-export([%%write_application_data/3,
+ read_application_data/2%%,
+%% passive_receive/2, next_record_if_active/1
+ ]).
+
+%% Called by tls_connection_sup
+-export([start_link/7]).
+%% gen_fsm callbacks
+-export([init/1, hello/2, certify/2, cipher/2,
+ abbreviated/2, connection/2, handle_event/3,
+ handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
-%% %%====================================================================
-%% %% State functions
-%% %%====================================================================
-
-%% -spec hello(start | #hello_request{} | #client_hello{} | #server_hello{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-%% hello(start, #state{host = Host, port = Port, role = client,
-%% ssl_options = SslOpts,
-%% session = #session{own_certificate = Cert} = Session0,
-%% session_cache = Cache, session_cache_cb = CacheCb,
-%% connection_states = ConnectionStates0,
-%% renegotiation = {Renegotiation, _},
-%% client_cookie = Cookie} = State0) ->
-%% Hello = dtls_handshake:client_hello(Host, Port, Cookie, ConnectionStates0, SslOpts,
-%% Cache, CacheCb, Renegotiation, Cert),
-
-%% Version = Hello#client_hello.client_version,
-%% State1 = State0#state{negotiated_version = Version, %% Requested version
-%% session =
-%% Session0#session{session_id = Hello#client_hello.session_id},
-%% dtls_handshake_history = ssl_handshake:init_handshake_history()},
-
-%% State2 = send_flight(Hello, waiting, State1),
-
-%% {Record, State} = next_record(State2),
-%% next_state(hello, hello, Record, State);
-
-%% hello(start, #state{role = server} = State0) ->
-%% {Record, State} = next_record(State0),
-%% next_state(hello, hello, Record, State);
-
-%% hello(#hello_request{}, #state{role = client} = State0) ->
-%% {Record, State} = next_record(State0),
-%% next_state(hello, hello, Record, State);
-
-%% hello(#server_hello{cipher_suite = CipherSuite,
-%% compression_method = Compression} = Hello,
-%% #state{session = #session{session_id = OldId},
-%% connection_states = ConnectionStates0,
-%% role = client,
-%% negotiated_version = ReqVersion,
-%% renegotiation = {Renegotiation, _},
-%% ssl_options = SslOptions} = State1) ->
-%% State0 = flight_done(State1),
-%% case ssl_handshake:hello(Hello, SslOptions, ConnectionStates0, Renegotiation) of
-%% #alert{} = Alert ->
-%% handle_own_alert(Alert, ReqVersion, hello, State0);
-%% {Version, NewId, ConnectionStates, NextProtocol} ->
-%% {KeyAlgorithm, _, _, _} =
-%% ssl_cipher:suite_definition(CipherSuite),
-
-%% PremasterSecret = make_premaster_secret(ReqVersion, KeyAlgorithm),
-
-%% NewNextProtocol = case NextProtocol of
-%% undefined ->
-%% State0#state.next_protocol;
-%% _ ->
-%% NextProtocol
-%% end,
-
-%% State = State0#state{key_algorithm = KeyAlgorithm,
-%% hashsign_algorithm = default_hashsign(Version, KeyAlgorithm),
-%% negotiated_version = Version,
-%% connection_states = ConnectionStates,
-%% premaster_secret = PremasterSecret,
-%% expecting_next_protocol_negotiation = NextProtocol =/= undefined,
-%% next_protocol = NewNextProtocol},
-
-%% case ssl_session:is_new(OldId, NewId) of
-%% true ->
-%% handle_new_session(NewId, CipherSuite, Compression,
-%% State#state{connection_states = ConnectionStates});
-%% false ->
-%% handle_resumed_session(NewId, State#state{connection_states = ConnectionStates})
-%% end
-%% end;
-
-%% hello(#hello_verify_request{cookie = Cookie},
-%% #state{host = Host, port = Port,
-%% session = #session{own_certificate = Cert},
-%% session_cache = Cache, session_cache_cb = CacheCb,
-%% ssl_options = SslOpts,
-%% connection_states = ConnectionStates0,
-%% renegotiation = {Renegotiation, _}} = State0) ->
-%% Hello = ssl_handshake:client_hello(Host, Port, Cookie, ConnectionStates0, SslOpts,
-%% Cache, CacheCb, Renegotiation, Cert),
-%% State1 = State0#state{
-%% tls_handshake_history = ssl_handshake:init_handshake_history(),
-%% client_cookie = Cookie},
-%% State2 = send_flight(Hello, waiting, State1),
-
-%% {Record, State} = next_record(State2),
-%% next_state(hello, hello, Record, State);
-
-
-%% %%--------------------------------------------------------------------
-%% -spec abbreviated(#hello_request{} | #finished{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% abbreviated(timeout, State) ->
-%% { next_state, abbreviated, State, hibernate };
-
-%% abbreviated(Msg, State) ->
-%% handle_unexpected_message(Msg, abbreviated, State).
-
-%% %%--------------------------------------------------------------------
-%% -spec certify(#hello_request{} | #certificate{} | #server_key_exchange{} |
-%% #certificate_request{} | #server_hello_done{} | #client_key_exchange{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-
-%% certify(timeout, State) ->
-%% { next_state, certify, State, hibernate };
-
-%% certify(Msg, State) ->
-%% handle_unexpected_message(Msg, certify, State).
-
-
-%% %%--------------------------------------------------------------------
-%% -spec cipher(#hello_request{} | #certificate_verify{} | #finished{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% cipher(timeout, State) ->
-%% { next_state, cipher, State, hibernate };
-
-%% cipher(Msg, State) ->
-%% handle_unexpected_message(Msg, cipher, State).
-
-%% %%--------------------------------------------------------------------
-%% -spec connection(#hello_request{} | #client_hello{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% connection(timeout, State) ->
-%% {next_state, connection, State, hibernate};
-
-%% connection(Msg, State) ->
-%% handle_unexpected_message(Msg, connection, State).
-
-%% %%--------------------------------------------------------------------
-%% %%% Internal functions
-%% %%--------------------------------------------------------------------
-%% handle_unexpected_message(Msg, Info, #state{negotiated_version = Version} = State) ->
-%% Alert = ?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE),
-%% handle_own_alert(Alert, Version, {Info, Msg}, State).
-
-%% send_flight(HandshakeRec, FlightState, State) ->
-%% send_flight(FlightState, buffer_flight(HandshakeRec, State)).
-
-%% send_flight(FlightState, State = #state{negotiated_version = Version,
-%% flight_buffer = Buffer}) ->
-
-%% State1 = do_send_flight(queue:to_list(Buffer), [], State),
-%% finish_send_flight(Version, FlightState, State1).
-
-%% resend_flight(State = #state{negotiated_version = Version,
-%% flight_state = FlightState,
-%% flight_buffer = Buffer})
-%% when FlightState == finished; FlightState == waiting ->
-%% State1 = do_send_flight(queue:to_list(Buffer), [], State),
-%% finish_send_flight(Version, FlightState, State1);
-
-%% resend_flight(State) ->
-%% State.
-
-%% flight_done(State) ->
-%% cancel_dtls_retransmit_timer(State#state{flight_state = done,
-%% flight_buffer = undefined}).
-
-%% do_send_flight([], BinMsgs, State = #state{transport_cb = Transport, socket = Socket}) ->
-%% Transport:send(Socket, lists:reverse(BinMsgs)),
-%% State;
-%% do_send_flight([{Epoch, MsgSeq, HandshakeRec}|T], BinMsgs0,
-%% State = #state{negotiated_version = Version,
-%% connection_states = ConnectionStates0}) ->
-%% CS0 = ssl_record:connection_state_by_epoch(ConnectionStates0, Epoch, write),
-%% {BinMsgs, CS1} = encode_handshake_rec(HandshakeRec, Version, MsgSeq, BinMsgs0, CS0),
-%% ConnectionStates1 = ssl_record:set_connection_state_by_epoch(ConnectionStates0, CS1, write),
-%% do_send_flight(T, BinMsgs, State#state{connection_states = ConnectionStates1}).
-
-%% cancel_dtls_retransmit_timer(State = #state{dtls_retransmit_timer = TimerRef}) ->
-%% cancel_timer(TimerRef),
-%% State#state{dtls_retransmit_timer = undefined}.
-
-%% rearm_dtls_retransmit_timer(State = #state{dtls_retransmit_timer = undefined}) ->
-%% TimerRef = erlang:start_timer(1000, self(), dtls_retransmit),
-%% State#state{dtls_retransmit_timer = TimerRef};
-%% rearm_dtls_retransmit_timer(State) ->
-%% State.
-
-%% finish_send_flight({254, _}, waiting, State) ->
-%% TimerRef = erlang:start_timer(1000, self(), dtls_retransmit),
-%% State#state{
-%% dtls_retransmit_timer = TimerRef,
-%% last_retransmit = timestamp(),
-%% flight_state = waiting};
-
-%% finish_send_flight(_, FlightState, State) ->
-%% State#state{flight_state = FlightState}.
-
-%% timestamp() ->
-%% {Mega, Sec, Micro} = erlang:now(),
-%% Mega * 1000000 * 1000 + Sec * 1000 + (Micro div 1000).
-
-%% encode_handshake_rec(HandshakeRec, Version, MsgSeq, BinMsgs0, CS0) ->
-%% {_, Fragments} = ssl_handshake:encode_handshake(HandshakeRec, Version, MsgSeq, 1400),
-%% lists:foldl(fun(F, {Bin, C0}) ->
-%% {B, C1} = ssl_record:encode_handshake(F, Version, C0),
-%% {[B|Bin], C1} end, {BinMsgs0, CS0}, Fragments).
+%%====================================================================
+%% Internal application API
+%%====================================================================
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
+ User, {CbModule, _,_, _} = CbInfo,
+ Timeout) ->
+ try
+ {ok, Pid} = dtls_connection_sup:start_child([Role, Host, Port, Socket,
+ Opts, User, CbInfo]),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ ok = ssl_connection:handshake(SslSocket, Timeout),
+ {ok, SslSocket}
+ catch
+ error:{badmatch, {error, _} = Error} ->
+ Error
+ end;
+
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
+ User, {CbModule, _,_, _} = CbInfo,
+ Timeout) ->
+ try
+ {ok, Pid} = dtls_connection_sup:start_child_dist([Role, Host, Port, Socket,
+ Opts, User, CbInfo]),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ ok = ssl_connection:handshake(SslSocket, Timeout),
+ {ok, SslSocket}
+ catch
+ error:{badmatch, {error, _} = Error} ->
+ Error
+ end.
+
+send_handshake(Handshake, #state{negotiated_version = Version,
+ tls_handshake_history = Hist0,
+ connection_states = ConnectionStates0} = State0) ->
+ {BinHandshake, ConnectionStates, Hist} =
+ encode_handshake(Handshake, Version, ConnectionStates0, Hist0),
+ send_flight(BinHandshake, State0#state{connection_states = ConnectionStates,
+ tls_handshake_history = Hist
+ }).
+
+send_alert(Alert, #state{negotiated_version = Version,
+ socket = Socket,
+ transport_cb = Transport,
+ connection_states = ConnectionStates0} = State0) ->
+ {BinMsg, ConnectionStates} =
+ ssl_alert:encode(Alert, Version, ConnectionStates0),
+ Transport:send(Socket, BinMsg),
+ State0#state{connection_states = ConnectionStates}.
+
+send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
+ socket = Socket,
+ negotiated_version = Version,
+ transport_cb = Transport} = State0) ->
+ {BinChangeCipher, ConnectionStates} =
+ encode_change_cipher(Msg, Version, ConnectionStates0),
+ Transport:send(Socket, BinChangeCipher),
+ State0#state{connection_states = ConnectionStates}.
+
+%%====================================================================
+%% tls_connection_sup API
+%%====================================================================
+
+%%--------------------------------------------------------------------
+-spec start_link(atom(), host(), inet:port_number(), port(), list(), pid(), tuple()) ->
+ {ok, pid()} | ignore | {error, reason()}.
+%%
+%% Description: Creates a gen_fsm process which calls Module:init/1 to
+%% initialize. To ensure a synchronized start-up procedure, this function
+%% does not return until Module:init/1 has returned.
+%%--------------------------------------------------------------------
+start_link(Role, Host, Port, Socket, Options, User, CbInfo) ->
+ {ok, proc_lib:spawn_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]])}.
+
+init([Role, Host, Port, Socket, {SSLOpts0, _} = Options, User, CbInfo]) ->
+ process_flag(trap_exit, true),
+ State0 = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
+ Handshake = ssl_handshake:init_handshake_history(),
+ TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
+ try ssl_config:init(SSLOpts0, Role) of
+ {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} ->
+ Session = State0#state.session,
+ State = State0#state{
+ tls_handshake_history = Handshake,
+ session = Session#session{own_certificate = OwnCert,
+ time_stamp = TimeStamp},
+ file_ref_db = FileRefHandle,
+ cert_db_ref = Ref,
+ cert_db = CertDbHandle,
+ session_cache = CacheHandle,
+ private_key = Key,
+ diffie_hellman_params = DHParams},
+ gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State))
+ catch
+ throw:Error ->
+ gen_fsm:enter_loop(?MODULE, [], error, {Error,State0}, get_timeout(State0))
+ end.
+
+%%--------------------------------------------------------------------
+%% Description:There should be one instance of this function for each
+%% possible state name. Whenever a gen_fsm receives an event sent
+%% using gen_fsm:send_event/2, the instance of this function with the
+%% same name as the current state name StateName is called to handle
+%% the event. It is also called if a timeout occurs.
+%%
+hello(start, #state{host = Host, port = Port, role = client,
+ ssl_options = SslOpts,
+ session = #session{own_certificate = Cert} = Session0,
+ session_cache = Cache, session_cache_cb = CacheCb,
+ transport_cb = Transport, socket = Socket,
+ connection_states = ConnectionStates0,
+ renegotiation = {Renegotiation, _}} = State0) ->
+ Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
+ Cache, CacheCb, Renegotiation, Cert),
+
+ Version = Hello#client_hello.client_version,
+ Handshake0 = ssl_handshake:init_handshake_history(),
+ {BinMsg, ConnectionStates, Handshake} =
+ encode_handshake(Hello, Version, ConnectionStates0, Handshake0),
+ Transport:send(Socket, BinMsg),
+ State1 = State0#state{connection_states = ConnectionStates,
+ negotiated_version = Version, %% Requested version
+ session =
+ Session0#session{session_id = Hello#client_hello.session_id},
+ tls_handshake_history = Handshake},
+ {Record, State} = next_record(State1),
+ next_state(hello, hello, Record, State);
+
+hello(Hello = #client_hello{client_version = ClientVersion,
+ extensions = #hello_extensions{hash_signs = HashSigns}},
+ State = #state{connection_states = ConnectionStates0,
+ port = Port, session = #session{own_certificate = Cert} = Session0,
+ renegotiation = {Renegotiation, _},
+ session_cache = Cache,
+ session_cache_cb = CacheCb,
+ ssl_options = SslOpts}) ->
+ case dtls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
+ ConnectionStates0, Cert}, Renegotiation) of
+ {Version, {Type, Session},
+ ConnectionStates,
+ #hello_extensions{ec_point_formats = EcPointFormats,
+ elliptic_curves = EllipticCurves} = ServerHelloExt} ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert,
+ dtls_v1:corresponding_tls_version(Version)),
+ ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
+ State#state{connection_states = ConnectionStates,
+ negotiated_version = Version,
+ session = Session,
+ client_ecc = {EllipticCurves, EcPointFormats}}, ?MODULE);
+ #alert{} = Alert ->
+ handle_own_alert(Alert, ClientVersion, hello, State)
+ end;
+hello(Hello,
+ #state{connection_states = ConnectionStates0,
+ negotiated_version = ReqVersion,
+ role = client,
+ renegotiation = {Renegotiation, _},
+ ssl_options = SslOptions} = State) ->
+ case dtls_handshake:hello(Hello, SslOptions, ConnectionStates0, Renegotiation) of
+ #alert{} = Alert ->
+ handle_own_alert(Alert, ReqVersion, hello, State);
+ {Version, NewId, ConnectionStates, NextProtocol} ->
+ ssl_connection:handle_session(Hello,
+ Version, NewId, ConnectionStates, NextProtocol, State)
+ end;
+
+hello(Msg, State) ->
+ ssl_connection:hello(Msg, State, ?MODULE).
+
+abbreviated(Msg, State) ->
+ ssl_connection:abbreviated(Msg, State, ?MODULE).
+
+certify(Msg, State) ->
+ ssl_connection:certify(Msg, State, ?MODULE).
+
+cipher(Msg, State) ->
+ ssl_connection:cipher(Msg, State, ?MODULE).
+
+connection(#hello_request{}, #state{host = Host, port = Port,
+ session = #session{own_certificate = Cert} = Session0,
+ session_cache = Cache, session_cache_cb = CacheCb,
+ ssl_options = SslOpts,
+ connection_states = ConnectionStates0,
+ renegotiation = {Renegotiation, _}} = State0) ->
+ Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
+ Cache, CacheCb, Renegotiation, Cert),
+ %% TODO DTLS version State1 = send_handshake(Hello, State0),
+ State1 = State0,
+ {Record, State} =
+ next_record(
+ State1#state{session = Session0#session{session_id
+ = Hello#client_hello.session_id}}),
+ next_state(connection, hello, Record, State);
+
+connection(#client_hello{} = Hello, #state{role = server, allow_renegotiate = true} = State) ->
+ %% 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),
+ hello(Hello, State#state{allow_renegotiate = false});
+
+connection(#client_hello{}, #state{role = server, allow_renegotiate = false} = State0) ->
+ Alert = ?ALERT_REC(?WARNING, ?NO_RENEGOTIATION),
+ State = send_alert(Alert, State0),
+ next_state_connection(connection, State);
+
+connection(Msg, State) ->
+ ssl_connection:connection(Msg, State, tls_connection).
+
+%%--------------------------------------------------------------------
+%% Description: Whenever a gen_fsm receives an event sent using
+%% gen_fsm:send_all_state_event/2, this function is called to handle
+%% the event. Not currently used!
+%%--------------------------------------------------------------------
+handle_event(_Event, StateName, State) ->
+ {next_state, StateName, State, get_timeout(State)}.
+
+%%--------------------------------------------------------------------
+%% Description: Whenever a gen_fsm receives an event sent using
+%% gen_fsm:sync_send_all_state_event/2,3, this function is called to handle
+%% the event.
+%%--------------------------------------------------------------------
+handle_sync_event(Event, From, StateName, State) ->
+ ssl_connection:handle_sync_event(Event, From, StateName, State).
+
+%%--------------------------------------------------------------------
+%% Description: This function is called by a gen_fsm when it receives any
+%% other message than a synchronous or asynchronous event
+%% (or a system message).
+%%--------------------------------------------------------------------
+
+%% raw data from socket, unpack records
+handle_info({Protocol, _, Data}, StateName,
+ #state{data_tag = Protocol} = State0) ->
+ %% Simplify for now to avoid dialzer warnings before implementation is compleate
+ %% case next_tls_record(Data, State0) of
+ %% {Record, State} ->
+ %% next_state(StateName, StateName, Record, State);
+ %% #alert{} = Alert ->
+ %% handle_normal_shutdown(Alert, StateName, State0),
+ %% {stop, {shutdown, own_alert}, State0}
+ %% end;
+ {Record, State} = next_tls_record(Data, State0),
+ next_state(StateName, StateName, Record, State);
+
+handle_info({CloseTag, Socket}, StateName,
+ #state{socket = Socket, close_tag = CloseTag,
+ negotiated_version = _Version} = State) ->
+ handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), StateName, State),
+ {stop, {shutdown, transport_closed}, State};
+
+handle_info(Msg, StateName, State) ->
+ ssl_connection:handle_info(Msg, StateName, State).
+
+%%--------------------------------------------------------------------
+%% Description:This function is called by a gen_fsm when it is about
+%% to terminate. It should be the opposite of Module:init/1 and do any
+%% necessary cleaning up. When it returns, the gen_fsm terminates with
+%% Reason. The return value is ignored.
+%%--------------------------------------------------------------------
+terminate(Reason, StateName, State) ->
+ ssl_connection:terminate(Reason, StateName, State).
+
+%%--------------------------------------------------------------------
+%% code_change(OldVsn, StateName, State, Extra) -> {ok, StateName, NewState}
+%% Description: Convert process state when code is changed
+%%--------------------------------------------------------------------
+code_change(_OldVsn, StateName, State, _Extra) ->
+ {ok, StateName, State}.
+
+%%--------------------------------------------------------------------
+%%% Internal functions
+%%--------------------------------------------------------------------
+encode_handshake(Handshake, Version, ConnectionStates0, Hist0) ->
+ Seq = sequence(ConnectionStates0),
+ {EncHandshake, FragmentedHandshake} = dtls_handshake:encode_handshake(Handshake, Version,
+ Seq),
+ Hist = ssl_handshake:update_handshake_history(Hist0, EncHandshake),
+ {Encoded, ConnectionStates} =
+ dtls_record:encode_handshake(FragmentedHandshake,
+ Version, ConnectionStates0),
+ {Encoded, ConnectionStates, Hist}.
+
+next_record(#state{%%flight = #flight{state = finished},
+ protocol_buffers =
+ #protocol_buffers{dtls_packets = [], dtls_cipher_texts = [CT | Rest]}
+ = Buffers,
+ connection_states = ConnStates0} = State) ->
+ case dtls_record:decode_cipher_text(CT, ConnStates0) of
+ {Plain, ConnStates} ->
+ {Plain, State#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_cipher_texts = Rest},
+ connection_states = ConnStates}};
+ #alert{} = Alert ->
+ {Alert, State}
+ end;
+next_record(#state{socket = Socket,
+ transport_cb = Transport} = State) -> %% when FlightState =/= finished
+ ssl_socket:setopts(Transport, Socket, [{active,once}]),
+ {no_record, State};
+
+
+next_record(State) ->
+ {no_record, State}.
+
+next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = State) ->
+ handle_own_alert(Alert, Version, Current, State);
+
+next_state(_,Next, no_record, State) ->
+ {next_state, Next, State, get_timeout(State)};
+
+%% next_state(_,Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, State) ->
+%% Alerts = decode_alerts(EncAlerts),
+%% handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
+
+next_state(Current, Next, #ssl_tls{type = ?HANDSHAKE, fragment = Data},
+ State0 = #state{protocol_buffers =
+ #protocol_buffers{dtls_handshake_buffer = Buf0} = Buffers,
+ negotiated_version = Version}) ->
+ Handle =
+ fun({#hello_request{} = Packet, _}, {next_state, connection = SName, State}) ->
+ %% This message should not be included in handshake
+ %% message hashes. Starts new handshake (renegotiation)
+ Hs0 = ssl_handshake:init_handshake_history(),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs0,
+ renegotiation = {true, peer}});
+ ({#hello_request{} = Packet, _}, {next_state, SName, State}) ->
+ %% This message should not be included in handshake
+ %% message hashes. Already in negotiation so it will be ignored!
+ ?MODULE:SName(Packet, State);
+ ({#client_hello{} = Packet, Raw}, {next_state, connection = SName, State}) ->
+ Version = Packet#client_hello.client_version,
+ Hs0 = ssl_handshake:init_handshake_history(),
+ Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs1,
+ renegotiation = {true, peer}});
+ ({Packet, Raw}, {next_state, SName, State = #state{tls_handshake_history=Hs0}}) ->
+ Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs1});
+ (_, StopState) -> StopState
+ end,
+ try
+ {Packets, Buf} = tls_handshake:get_tls_handshake(Version,Data,Buf0),
+ State = State0#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets = Packets,
+ dtls_handshake_buffer = Buf}},
+ handle_dtls_handshake(Handle, Next, State)
+ catch throw:#alert{} = Alert ->
+ handle_own_alert(Alert, Version, Current, State0)
+ end;
+
+next_state(_, StateName, #ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, State0) ->
+ %% Simplify for now to avoid dialzer warnings before implementation is compleate
+ %% case read_application_data(Data, State0) of
+ %% Stop = {stop,_,_} ->
+ %% Stop;
+ %% {Record, State} ->
+ %% next_state(StateName, StateName, Record, State)
+ %% end;
+ {Record, State} = read_application_data(Data, State0),
+ next_state(StateName, StateName, Record, State);
+
+next_state(Current, Next, #ssl_tls{type = ?CHANGE_CIPHER_SPEC, fragment = <<1>>} =
+ _ChangeCipher,
+ #state{connection_states = ConnectionStates0} = State0) ->
+ ConnectionStates1 =
+ ssl_record:activate_pending_connection_state(ConnectionStates0, read),
+ {Record, State} = next_record(State0#state{connection_states = ConnectionStates1}),
+ next_state(Current, Next, Record, State);
+next_state(Current, Next, #ssl_tls{type = _Unknown}, State0) ->
+ %% Ignore unknown type
+ {Record, State} = next_record(State0),
+ next_state(Current, Next, Record, State).
+
+handle_dtls_handshake(Handle, StateName,
+ #state{protocol_buffers =
+ #protocol_buffers{dtls_packets = [Packet]} = Buffers} = State) ->
+ FsmReturn = {next_state, StateName, State#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets = []}}},
+ Handle(Packet, FsmReturn);
+
+handle_dtls_handshake(Handle, StateName,
+ #state{protocol_buffers =
+ #protocol_buffers{dtls_packets = [Packet | Packets]} = Buffers} =
+ State0) ->
+ FsmReturn = {next_state, StateName, State0#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets =
+ Packets}}},
+ case Handle(Packet, FsmReturn) of
+ {next_state, NextStateName, State, _Timeout} ->
+ handle_dtls_handshake(Handle, NextStateName, State);
+ {stop, _,_} = Stop ->
+ Stop
+ end.
+
+
+send_flight(Fragments, #state{transport_cb = Transport, socket = Socket,
+ protocol_buffers = _PBuffers} = State) ->
+ Transport:send(Socket, Fragments),
+ %% Start retransmission
+ %% State#state{protocol_buffers =
+ %% (PBuffers#protocol_buffers){ #flight{state = waiting}}}}.
+ State.
+
+handle_own_alert(_,_,_, State) -> %% Place holder
+ {stop, {shutdown, own_alert}, State}.
+
+handle_normal_shutdown(_, _, _State) -> %% Place holder
+ ok.
+
+encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
+ dtls_record:encode_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),
+
+ SessionCacheCb = case application:get_env(ssl, session_cb) of
+ {ok, Cb} when is_atom(Cb) ->
+ Cb;
+ _ ->
+ ssl_session_cache
+ end,
+
+ Monitor = erlang:monitor(process, User),
+
+ #state{socket_options = SocketOptions,
+ %% We do not want to save the password in the state so that
+ %% could be written in the clear into error logs.
+ ssl_options = SSLOptions#ssl_options{password = undefined},
+ session = #session{is_resumable = new},
+ transport_cb = CbModule,
+ data_tag = DataTag,
+ close_tag = CloseTag,
+ error_tag = ErrorTag,
+ role = Role,
+ host = Host,
+ port = Port,
+ socket = Socket,
+ connection_states = ConnectionStates,
+ protocol_buffers = #protocol_buffers{},
+ user_application = {Monitor, User},
+ user_data_buffer = <<>>,
+ session_cache_cb = SessionCacheCb,
+ renegotiation = {false, first},
+ start_or_recv_from = undefined,
+ send_queue = queue:new(),
+ protocol_cb = ?MODULE
+ }.
+read_application_data(_,State) ->
+ {#ssl_tls{fragment = <<"place holder">>}, State}.
+
+next_tls_record(_, State) ->
+ {#ssl_tls{fragment = <<"place holder">>}, State}.
+
+get_timeout(_) -> %% Place holder
+ infinity.
+
+next_state_connection(_, State) -> %% Place holder
+ {next_state, connection, State, get_timeout(State)}.
+
+sequence(_) ->
+ %%TODO real imp
+ 1.
diff --git a/lib/ssl/src/dtls_connection.hrl b/lib/ssl/src/dtls_connection.hrl
index b8dff479d5..08707dc8de 100644
--- a/lib/ssl/src/dtls_connection.hrl
+++ b/lib/ssl/src/dtls_connection.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,24 +28,19 @@
-include("ssl_connection.hrl").
-record(protocol_buffers, {
- dtls_packets = [] ::[binary()], % Not yet handled decode ssl/tls packets.
- dtls_record_buffer :: binary(), % Buffer of incomplete records
- dtls_handshake_buffer :: binary(), % Buffer of incomplete handshakes
- dtls_cipher_texts :: [binary()],
- dtls_cipher_texts_next :: [binary()] % Received for Epoch not yet active
+ dtls_packets = [], %%::[binary()], % Not yet handled decode ssl/tls packets.
+ dtls_record_buffer = <<>>, %%:: binary(), % Buffer of incomplete records
+ dtls_handshake_buffer = <<>>, %%:: binary(), % Buffer of incomplete handshakes
+ dtls_cipher_texts = [], %%:: [binary()],
+ dtls_cipher_texts_next %%:: [binary()] % Received for Epoch not yet active
}).
-record(flight, {
last_retransmit,
last_read_seq,
msl_timer,
- flight_state,
- flight_buffer, % buffer of not yet ACKed TLS records
- }).
-
--record(message_sequences, {
- read = 0,
- write = 0
+ state,
+ buffer % buffer of not yet ACKed TLS records
}).
-endif. % -ifdef(dtls_connection).
diff --git a/lib/ssl/src/dtls_connection_sup.erl b/lib/ssl/src/dtls_connection_sup.erl
index 9fe545be18..0b4711cfb4 100644
--- a/lib/ssl/src/dtls_connection_sup.erl
+++ b/lib/ssl/src/dtls_connection_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,8 +26,8 @@
-behaviour(supervisor).
%% API
--export([start_link/0]).
--export([start_child/1]).
+-export([start_link/0, start_link_dist/0]).
+-export([start_child/1, start_child_dist/1]).
%% Supervisor callback
-export([init/1]).
@@ -38,8 +38,14 @@
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+start_link_dist() ->
+ supervisor:start_link({local, dtls_connection_sup_dist}, ?MODULE, []).
+
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
+
+start_child_dist(Args) ->
+ supervisor:start_child(dtls_connection_sup_dist, Args).
%%%=========================================================================
%%% Supervisor callback
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index ec7f21bd35..31d525b295 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,11 +20,15 @@
-include("dtls_handshake.hrl").
-include("dtls_record.hrl").
-include("ssl_internal.hrl").
+-include("ssl_alert.hrl").
--export([client_hello/8, client_hello/9, hello/3,
+-export([client_hello/8, client_hello/9, hello/4,
get_dtls_handshake/2,
- dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
- encode_handshake/4]).
+ %%dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
+ encode_handshake/3]).
+
+-type dtls_handshake() :: #client_hello{} | #hello_verify_request{} |
+ ssl_handshake:ssl_handshake().
%%====================================================================
%% Internal application API
@@ -54,12 +58,12 @@ client_hello(Host, Port, Cookie, ConnectionStates,
ciphers = UserSuites
} = SslOpts,
Cache, CacheCb, Renegotiation, OwnCert) ->
- Version = dtls_record:highest_protocol_version(Versions),
+ Version = dtls_record:highest_protocol_version(Versions),
Pending = ssl_record:pending_connection_state(ConnectionStates, read),
SecParams = Pending#connection_state.security_parameters,
CipherSuites = ssl_handshake:available_suites(UserSuites, Version),
- Extensions = ssl_handshake:client_hello_extensions(Host, Version, CipherSuites,
+ Extensions = ssl_handshake:client_hello_extensions(Host, dtls_v1:corresponding_tls_version(Version), CipherSuites,
SslOpts, ConnectionStates, Renegotiation),
Id = ssl_session:client_id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert),
@@ -73,163 +77,197 @@ client_hello(Host, Port, Cookie, ConnectionStates,
extensions = Extensions
}.
-hello(Address, Port,
- #ssl_tls{epoch = _Epoch, record_seq = _Seq,
- version = Version} = Record) ->
- {[{Hello, _}], _, _} =
- get_dtls_handshake(Record,
- dtls_handshake_new_flight(undefined)),
- #client_hello{client_version = {Major, Minor},
- random = Random,
- session_id = SessionId,
- cipher_suites = CipherSuites,
- compression_methods = CompressionMethods} = Hello,
- CookieData = [address_to_bin(Address, Port),
- <<?BYTE(Major), ?BYTE(Minor)>>,
- Random, SessionId, CipherSuites, CompressionMethods],
- Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
-
- case Hello of
- #client_hello{cookie = Cookie} ->
- accept;
- _ ->
- %% generate HelloVerifyRequest
- HelloVerifyRequest = encode_handshake(#hello_verify_request{protocol_version = Version,
- cookie = Cookie},
- Version, 0, 1400),
- {reply, HelloVerifyRequest}
- end.
+hello(#server_hello{server_version = Version, random = Random,
+ cipher_suite = CipherSuite,
+ compression_method = Compression,
+ session_id = SessionId, extensions = HelloExt},
+ #ssl_options{versions = SupportedVersions} = SslOpt,
+ ConnectionStates0, Renegotiation) ->
+ case dtls_record:is_acceptable_version(Version, SupportedVersions) of
+ true ->
+ handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
+ Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation);
+ false ->
+ ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ end;
-%%--------------------------------------------------------------------
-encode_handshake(Package, Version, MsgSeq, Mss) ->
- {MsgType, Bin} = enc_hs(Package, Version),
+hello(#client_hello{client_version = ClientVersion}, _Options, {_,_,_,_,ConnectionStates,_}, _Renegotiation) ->
+ %% Return correct typ to make dialyzer happy until we have time to make the real imp.
+ {ClientVersion, {new, #session{}}, ConnectionStates, #hello_extensions{}}.
+
+%% hello(Address, Port,
+%% #ssl_tls{epoch = _Epoch, sequence_number = _Seq,
+%% version = Version} = Record) ->
+%% case get_dtls_handshake(Record,
+%% dtls_handshake_new_flight(undefined)) of
+%% {[Hello | _], _} ->
+%% hello(Address, Port, Version, Hello);
+%% {retransmit, HandshakeState} ->
+%% {retransmit, HandshakeState}
+%% end.
+
+%% hello(Address, Port, Version, Hello) ->
+%% #client_hello{client_version = {Major, Minor},
+%% random = Random,
+%% session_id = SessionId,
+%% cipher_suites = CipherSuites,
+%% compression_methods = CompressionMethods} = Hello,
+%% CookieData = [address_to_bin(Address, Port),
+%% <<?BYTE(Major), ?BYTE(Minor)>>,
+%% Random, SessionId, CipherSuites, CompressionMethods],
+%% Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
+
+%% case Hello of
+%% #client_hello{cookie = Cookie} ->
+%% accept;
+%% _ ->
+%% %% generate HelloVerifyRequest
+%% HelloVerifyRequest = enc_hs(#hello_verify_request{protocol_version = Version,
+%% cookie = Cookie},
+%% Version, 0, 1400),
+%% {reply, HelloVerifyRequest}
+%% end.
+
+%% %%--------------------------------------------------------------------
+encode_handshake(Handshake, Version, MsgSeq) ->
+ {MsgType, Bin} = enc_handshake(Handshake, Version),
Len = byte_size(Bin),
- HsHistory = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
- BinMsg = dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, 0, []),
- {HsHistory, BinMsg}.
+ EncHandshake = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
+ FragmentedHandshake = dtls_fragment(erlang:iolist_size(EncHandshake), MsgType, Len, MsgSeq, Bin, 0, []),
+ {EncHandshake, FragmentedHandshake}.
-%--------------------------------------------------------------------
+%%--------------------------------------------------------------------
-spec get_dtls_handshake(#ssl_tls{}, #dtls_hs_state{} | binary()) ->
- {[dtls_handshake()], #dtls_hs_state{}} | {retransmit, #dtls_hs_state{}}.
-%
-% Description: Given a DTLS state and new data from ssl_record, collects
-% and returns it as a list of handshake messages, also returns a new
-% DTLS state
-%--------------------------------------------------------------------
-% get_dtls_handshake(Record, <<>>) ->
-% get_dtls_handshake_aux(Record, dtls_hs_state_init());
+ {[dtls_handshake()], #dtls_hs_state{}} | {retransmit, #dtls_hs_state{}}.
+%%
+%% Description: Given a DTLS state and new data from ssl_record, collects
+%% and returns it as a list of handshake messages, also returns a new
+%% DTLS state
+%%--------------------------------------------------------------------
+get_dtls_handshake(Record, <<>>) ->
+ get_dtls_handshake_aux(Record, #dtls_hs_state{}); %% Init handshake state!?
get_dtls_handshake(Record, HsState) ->
get_dtls_handshake_aux(Record, HsState).
-%--------------------------------------------------------------------
--spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
-%
-% Description: Reset the DTLS decoder state for a new Epoch
-%--------------------------------------------------------------------
-% dtls_handshake_new_epoch(<<>>) ->
-% dtls_hs_state_init();
-dtls_handshake_new_epoch(HsState) ->
- HsState#dtls_hs_state{highest_record_seq = 0,
- starting_read_seq = HsState#dtls_hs_state.current_read_seq,
- fragments = gb_trees:empty(), completed = []}.
-
-%--------------------------------------------------------------------
--spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
-%
-% Description: Init the DTLS decoder state for a new Flight
-dtls_handshake_new_flight(ExpectedReadReq) ->
- #dtls_hs_state{current_read_seq = ExpectedReadReq,
- highest_record_seq = 0,
- starting_read_seq = 0,
- fragments = gb_trees:empty(), completed = []}.
+%% %%--------------------------------------------------------------------
+%% -spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
+%% %%
+%% %% Description: Reset the DTLS decoder state for a new Epoch
+%% %%--------------------------------------------------------------------
+%% dtls_handshake_new_epoch(<<>>) ->
+%% dtls_hs_state_init();
+%% dtls_handshake_new_epoch(HsState) ->
+%% HsState#dtls_hs_state{highest_record_seq = 0,
+%% starting_read_seq = HsState#dtls_hs_state.current_read_seq,
+%% fragments = gb_trees:empty(), completed = []}.
+
+%% %--------------------------------------------------------------------
+%% -spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
+%% %
+%% % Description: Init the DTLS decoder state for a new Flight
+%% dtls_handshake_new_flight(ExpectedReadReq) ->
+%% #dtls_hs_state{current_read_seq = ExpectedReadReq,
+%% highest_record_seq = 0,
+%% starting_read_seq = 0,
+%% fragments = gb_trees:empty(), completed = []}.
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
+ Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation) ->
+ case ssl_handshake:handle_server_hello_extensions(dtls_record, Random, CipherSuite,
+ Compression, HelloExt, Version,
+ SslOpt, ConnectionStates0, Renegotiation) of
+ #alert{} = Alert ->
+ Alert;
+ {ConnectionStates, Protocol} ->
+ {Version, SessionId, ConnectionStates, Protocol}
+ end.
-dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc)
+dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc)
when byte_size(Bin) + 12 < Mss ->
FragmentLen = byte_size(Bin),
BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Bin],
lists:reverse([BinMsg|Acc]);
-dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc) ->
+dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc) ->
FragmentLen = Mss - 12,
<<Fragment:FragmentLen/bytes, Rest/binary>> = Bin,
BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Fragment],
- dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Rest, Offset + FragmentLen, [BinMsg|Acc]).
+ dtls_fragment(Mss, MsgType, Len, MsgSeq, Rest, Offset + FragmentLen, [BinMsg|Acc]).
get_dtls_handshake_aux(#ssl_tls{version = Version,
- record_seq = SeqNo,
- fragment = Data}, HsState) ->
+ sequence_number = SeqNo,
+ fragment = Data}, HsState) ->
get_dtls_handshake_aux(Version, SeqNo, Data, HsState).
get_dtls_handshake_aux(Version, SeqNo,
- <<?BYTE(Type), ?UINT24(Length),
- ?UINT16(MessageSeq),
- ?UINT24(FragmentOffset), ?UINT24(FragmentLength),
- Body:FragmentLength/binary, Rest/binary>>,
- HsState0) ->
+ <<?BYTE(Type), ?UINT24(Length),
+ ?UINT16(MessageSeq),
+ ?UINT24(FragmentOffset), ?UINT24(FragmentLength),
+ Body:FragmentLength/binary, Rest/binary>>,
+ HsState0) ->
case reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState0) of
- {retransmit, HsState1} ->
- case Rest of
- <<>> ->
- {retransmit, HsState1};
- _ ->
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState1)
- end;
- {HsState1, HighestSeqNo, MsgBody} ->
- HsState2 = dec_dtls_fragment(Version, HighestSeqNo, Type, Length, MessageSeq, MsgBody, HsState1),
- HsState3 = process_dtls_fragments(Version, HsState2),
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3);
- HsState2 ->
- HsState3 = process_dtls_fragments(Version, HsState2),
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3)
- end;
+ FragmentOffset, FragmentLength,
+ Body, HsState0) of
+ {retransmit, HsState1} ->
+ case Rest of
+ <<>> ->
+ {retransmit, HsState1};
+ _ ->
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState1)
+ end;
+ {HsState1, HighestSeqNo, MsgBody} ->
+ HsState2 = dec_dtls_fragment(Version, HighestSeqNo, Type, Length, MessageSeq, MsgBody, HsState1),
+ HsState3 = process_dtls_fragments(Version, HsState2),
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3);
+ HsState2 ->
+ HsState3 = process_dtls_fragments(Version, HsState2),
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3)
+ end;
get_dtls_handshake_aux(_Version, _SeqNo, <<>>, HsState) ->
- {lists:reverse(HsState#dtls_hs_state.completed),
- HsState#dtls_hs_state{completed = []}}.
+ {lists:reverse(HsState#dtls_hs_state.completed),
+ HsState#dtls_hs_state{completed = []}}.
dec_dtls_fragment(Version, SeqNo, Type, Length, MessageSeq, MsgBody,
- HsState = #dtls_hs_state{highest_record_seq = HighestSeqNo, completed = Acc}) ->
+ HsState = #dtls_hs_state{highest_record_seq = HighestSeqNo, completed = Acc}) ->
Raw = <<?BYTE(Type), ?UINT24(Length), ?UINT16(MessageSeq), ?UINT24(0), ?UINT24(Length), MsgBody/binary>>,
H = decode_handshake(Version, Type, MsgBody),
HsState#dtls_hs_state{completed = [{H,Raw}|Acc], highest_record_seq = erlang:max(HighestSeqNo, SeqNo)}.
process_dtls_fragments(Version,
- HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
- fragments = Fragments0}) ->
+ HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
+ fragments = Fragments0}) ->
case gb_trees:is_empty(Fragments0) of
- true ->
- HsState0;
- _ ->
- case gb_trees:smallest(Fragments0) of
- {CurrentReadSeq, {SeqNo, Type, Length, CurrentReadSeq, {Length, [{0, Length}], MsgBody}}} ->
- HsState1 = dtls_hs_state_process_seq(HsState0),
- HsState2 = dec_dtls_fragment(Version, SeqNo, Type, Length, CurrentReadSeq, MsgBody, HsState1),
- process_dtls_fragments(Version, HsState2);
- _ ->
- HsState0
- end
- end.
+ true ->
+ HsState0;
+ _ ->
+ case gb_trees:smallest(Fragments0) of
+ {CurrentReadSeq, {SeqNo, Type, Length, CurrentReadSeq, {Length, [{0, Length}], MsgBody}}} ->
+ HsState1 = dtls_hs_state_process_seq(HsState0),
+ HsState2 = dec_dtls_fragment(Version, SeqNo, Type, Length, CurrentReadSeq, MsgBody, HsState1),
+ process_dtls_fragments(Version, HsState2);
+ _ ->
+ HsState0
+ end
+ end.
dtls_hs_state_process_seq(HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
- fragments = Fragments0}) ->
+ fragments = Fragments0}) ->
Fragments1 = gb_trees:delete_any(CurrentReadSeq, Fragments0),
HsState0#dtls_hs_state{current_read_seq = CurrentReadSeq + 1,
- fragments = Fragments1}.
+ fragments = Fragments1}.
dtls_hs_state_add_fragment(MessageSeq, Fragment, HsState0 = #dtls_hs_state{fragments = Fragments0}) ->
Fragments1 = gb_trees:enter(MessageSeq, Fragment, Fragments0),
HsState0#dtls_hs_state{fragments = Fragments1}.
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq, 0, Length,
- Body, HsState0 = #dtls_hs_state{current_read_seq = undefined})
+ Body, HsState0 = #dtls_hs_state{current_read_seq = undefined})
when Type == ?CLIENT_HELLO;
Type == ?SERVER_HELLO;
- Type == ?HELLO_VERIFY_REQUEST ->
+ Type == ?HELLO_VERIFY_REQUEST ->
%% First message, should be client hello
%% return the current message and set the next expected Sequence
%%
@@ -245,8 +283,8 @@ reassemble_dtls_fragment(_SeqNo, _Type, Length, _MessageSeq, _, Length,
HsState;
reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
- Body, HsState0 =
- #dtls_hs_state{starting_read_seq = StartingReadSeq})
+ Body, HsState0 =
+ #dtls_hs_state{starting_read_seq = StartingReadSeq})
when MessageSeq < StartingReadSeq ->
%% this has to be the start of a new flight, let it through
%%
@@ -257,69 +295,69 @@ reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
{HsState, SeqNo, Body};
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
- _Body, HsState =
- #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body, HsState =
+ #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
{retransmit, HsState};
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
- _Body, HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body, HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
HsState;
reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
- Body, HsState0 = #dtls_hs_state{current_read_seq = MessageSeq}) ->
+ Body, HsState0 = #dtls_hs_state{current_read_seq = MessageSeq}) ->
%% Message fully contained and it's the current seq
HsState1 = dtls_hs_state_process_seq(HsState0),
{HsState1, SeqNo, Body};
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq, 0, Length,
- Body, HsState) ->
+ Body, HsState) ->
%% Message fully contained and it's the NOT the current seq -> buffer
Fragment = {SeqNo, Type, Length, MessageSeq,
- dtls_fragment_init(Length, 0, Length, Body)},
+ dtls_fragment_init(Length, 0, Length, Body)},
dtls_hs_state_add_fragment(MessageSeq, Fragment, HsState);
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, FragmentOffset, FragmentLength,
- _Body,
- HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body,
+ HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when FragmentOffset + FragmentLength == Length andalso MessageSeq == (CurrentReadSeq - 1) ->
{retransmit, HsState};
reassemble_dtls_fragment(_SeqNo, _Type, _Length, MessageSeq, _FragmentOffset, _FragmentLength,
- _Body,
- HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body,
+ HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
HsState;
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body,
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ FragmentOffset, FragmentLength,
+ Body,
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
case gb_trees:lookup(MessageSeq, Fragments0) of
- {value, Fragment} ->
- dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, Fragment, HsState);
- none ->
- dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState)
+ {value, Fragment} ->
+ dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
+ FragmentOffset, FragmentLength,
+ Body, Fragment, HsState);
+ none ->
+ dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
+ FragmentOffset, FragmentLength,
+ Body, HsState)
end.
dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ FragmentOffset, FragmentLength,
+ Body, HsState = #dtls_hs_state{fragments = Fragments0}) ->
Fragment = {SeqNo, Type, Length, MessageSeq,
- dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body)},
- Fragments1 = gb_trees:insert(MessageSeq, Fragment, Fragments0),
+ dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body)},
+ Fragments1 = gb_trees:insert(MessageSeq, Fragment, Fragments0),
HsState#dtls_hs_state{fragments = Fragments1}.
dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
FragmentOffset, FragmentLength,
- Body,
- {LastSeqNo, Type, Length, MessageSeq, FragBuffer0},
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ Body,
+ {LastSeqNo, Type, Length, MessageSeq, FragBuffer0},
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
FragBuffer1 = dtls_fragment_add(FragBuffer0, FragmentOffset, FragmentLength, Body),
Fragment = {erlang:max(SeqNo, LastSeqNo), Type, Length, MessageSeq, FragBuffer1},
Fragments1 = gb_trees:enter(MessageSeq, Fragment, Fragments0),
@@ -328,8 +366,8 @@ dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
%% Type, Length or Seq mismatch, drop everything...
%% Note: the RFC is not clear on how to handle this...
dtls_fragment_reassemble(_SeqNo, _Type, _Length, MessageSeq,
- _FragmentOffset, _FragmentLength, _Body, _Fragment,
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ _FragmentOffset, _FragmentLength, _Body, _Fragment,
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
Fragments1 = gb_trees:delete_any(MessageSeq, Fragments0),
HsState#dtls_hs_state{fragments = Fragments1}.
@@ -342,7 +380,7 @@ dtls_fragment_init(Length, 0, Length, Body) ->
{Length, [{0, Length}], Body};
dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body) ->
Bin = dtls_fragment_bin_add(FragmentOffset, FragmentLength, Body, <<0:(Length*8)>>),
- {Length, [{FragmentOffset, FragmentLength}], Bin}.
+ {Length, [{FragmentOffset, FragmentOffset + FragmentLength}], Bin}.
dtls_fragment_bin_add(FragmentOffset, FragmentLength, Add, Buffer) ->
<<First:FragmentOffset/bytes, _:FragmentLength/bytes, Rest/binary>> = Buffer,
@@ -360,7 +398,7 @@ merge_fragment_list(Rest = [{HStart, _HEnd}|_], Frag = {_FStart, FEnd}, Acc)
lists:reverse(Acc) ++ [Frag|Rest];
merge_fragment_list([{HStart, HEnd}|Rest], _Frag = {FStart, FEnd}, Acc)
- when
+ when
FStart =< HEnd orelse FEnd >= HStart ->
Start = erlang:min(HStart, FStart),
End = erlang:max(HEnd, FEnd),
@@ -370,20 +408,20 @@ merge_fragment_list([{HStart, HEnd}|Rest], _Frag = {FStart, FEnd}, Acc)
add_fragment(List, {FragmentOffset, FragmentLength}) ->
merge_fragment_list(List, {FragmentOffset, FragmentOffset + FragmentLength}, []).
-enc_hs(#hello_verify_request{protocol_version = {Major, Minor},
- cookie = Cookie}, _Version) ->
- CookieLength = byte_size(Cookie),
+enc_handshake(#hello_verify_request{protocol_version = {Major, Minor},
+ cookie = Cookie}, _Version) ->
+ CookieLength = byte_size(Cookie),
{?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
- ?BYTE(CookieLength),
- Cookie/binary>>};
-
-enc_hs(#client_hello{client_version = {Major, Minor},
- random = Random,
- session_id = SessionID,
- cookie = Cookie,
- cipher_suites = CipherSuites,
- compression_methods = CompMethods,
- extensions = HelloExtensions}, Version) ->
+ ?BYTE(CookieLength),
+ Cookie/binary>>};
+
+enc_handshake(#client_hello{client_version = {Major, Minor},
+ random = Random,
+ session_id = SessionID,
+ cookie = Cookie,
+ cipher_suites = CipherSuites,
+ compression_methods = CompMethods,
+ extensions = HelloExtensions}, Version) ->
SIDLength = byte_size(SessionID),
BinCookie = enc_client_hello_cookie(Version, Cookie),
BinCompMethods = list_to_binary(CompMethods),
@@ -391,13 +429,13 @@ enc_hs(#client_hello{client_version = {Major, Minor},
BinCipherSuites = list_to_binary(CipherSuites),
CsLength = byte_size(BinCipherSuites),
ExtensionsBin = ssl_handshake:encode_hello_extensions(HelloExtensions),
-
+
{?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
- ?BYTE(SIDLength), SessionID/binary,
- BinCookie/binary,
- ?UINT16(CsLength), BinCipherSuites/binary,
- ?BYTE(CmLength), BinCompMethods/binary, ExtensionsBin/binary>>};
-enc_hs(HandshakeMsg, Version) ->
+ ?BYTE(SIDLength), SessionID/binary,
+ BinCookie/binary,
+ ?UINT16(CsLength), BinCipherSuites/binary,
+ ?BYTE(CmLength), BinCompMethods/binary, ExtensionsBin/binary>>};
+enc_handshake(HandshakeMsg, Version) ->
ssl_handshake:encode_handshake(HandshakeMsg, Version).
enc_client_hello_cookie(_, <<>>) ->
@@ -407,26 +445,26 @@ enc_client_hello_cookie(_, Cookie) ->
<<?BYTE(CookieLength), Cookie/binary>>.
decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
- ?BYTE(SID_length), Session_ID:SID_length/binary,
- ?BYTE(Cookie_length), Cookie:Cookie_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,
+ ?BYTE(Cookie_length), Cookie:Cookie_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(Extensions),
-
+
#client_hello{
client_version = {Major,Minor},
random = Random,
- session_id = Session_ID,
+ session_id = Session_ID,
cookie = Cookie,
cipher_suites = ssl_handshake:decode_suites('2_bytes', CipherSuites),
compression_methods = Comp_methods,
extensions = DecodedExtensions
- };
+ };
decode_handshake(_Version, ?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
- ?BYTE(CookieLength), Cookie:CookieLength/binary>>) ->
+ ?BYTE(CookieLength), Cookie:CookieLength/binary>>) ->
#hello_verify_request{
protocol_version = {Major,Minor},
@@ -434,7 +472,7 @@ decode_handshake(_Version, ?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
decode_handshake(Version, Tag, Msg) ->
ssl_handshake:decode_handshake(Version, Tag, Msg).
-address_to_bin({A,B,C,D}, Port) ->
- <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
-address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
- <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
+%% address_to_bin({A,B,C,D}, Port) ->
+%% <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
+%% address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
+%% <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
diff --git a/lib/ssl/src/dtls_handshake.hrl b/lib/ssl/src/dtls_handshake.hrl
index 5bdf45f627..3b57575b6d 100644
--- a/lib/ssl/src/dtls_handshake.hrl
+++ b/lib/ssl/src/dtls_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,6 +53,4 @@
completed
}).
--type dtls_handshake() :: #client_hello{} | #hello_verify_request{} | ssl_handshake().
-
-endif. % -ifdef(dtls_handshake).
diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl
index b0a7976864..ae35dd7ea4 100644
--- a/lib/ssl/src/dtls_record.erl
+++ b/lib/ssl/src/dtls_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,7 +35,7 @@
-export([decode_cipher_text/2]).
%% Encoding
--export([encode_plain_text/4]).
+-export([encode_plain_text/4, encode_handshake/3, encode_change_cipher_spec/2]).
%% Protocol version handling
-export([protocol_version/1, lowest_protocol_version/2,
@@ -46,6 +46,11 @@
-export([init_connection_state_seq/2, current_connection_state_epoch/2,
set_connection_state_by_epoch/3, connection_state_by_epoch/3]).
+-export_type([dtls_version/0, dtls_atom_version/0]).
+
+-type dtls_version() :: ssl_record:ssl_version().
+-type dtls_atom_version() :: dtlsv1 | 'dtlsv1.2'.
+
-compile(inline).
%%====================================================================
@@ -70,7 +75,7 @@ get_dtls_records_aux(<<?BYTE(?APPLICATION_DATA),?BYTE(MajVer),?BYTE(MinVer),
Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?APPLICATION_DATA,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?HANDSHAKE),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -78,7 +83,7 @@ get_dtls_records_aux(<<?BYTE(?HANDSHAKE),?BYTE(MajVer),?BYTE(MinVer),
Data:Length/binary, Rest/binary>>, Acc) when MajVer >= 128 ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?HANDSHAKE,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?ALERT),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -86,7 +91,7 @@ get_dtls_records_aux(<<?BYTE(?ALERT),?BYTE(MajVer),?BYTE(MinVer),
Rest/binary>>, Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?ALERT,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?CHANGE_CIPHER_SPEC),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -94,7 +99,7 @@ get_dtls_records_aux(<<?BYTE(?CHANGE_CIPHER_SPEC),?BYTE(MajVer),?BYTE(MinVer),
Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?CHANGE_CIPHER_SPEC,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<0:1, _CT:7, ?BYTE(_MajVer), ?BYTE(_MinVer),
@@ -125,14 +130,15 @@ encode_plain_text(Type, Version, Data,
{Comp, CompS1} = ssl_record:compress(CompAlg, Data, CompS0),
WriteState1 = WriteState0#connection_state{compression_state = CompS1},
MacHash = calc_mac_hash(WriteState1, Type, Version, Epoch, Seq, Comp),
- {CipherFragment, WriteState} = ssl_record:cipher(Version, Comp, WriteState1, MacHash),
+ {CipherFragment, WriteState} = ssl_record:cipher(dtls_v1:corresponding_tls_version(Version),
+ Comp, WriteState1, MacHash),
CipherText = encode_tls_cipher_text(Type, Version, Epoch, Seq, CipherFragment),
{CipherText, ConnectionStates#connection_states{current_write =
WriteState#connection_state{sequence_number = Seq +1}}}.
decode_cipher_text(#ssl_tls{type = Type, version = Version,
epoch = Epoch,
- record_seq = Seq,
+ sequence_number = Seq,
fragment = CipherFragment} = CipherText,
#connection_states{current_read =
#connection_state{compression_state = CompressionS0,
@@ -140,8 +146,8 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
= ConnnectionStates0) ->
CompressAlg = SecParams#security_parameters.compression_algorithm,
{PlainFragment, Mac, ReadState1} = ssl_record:decipher(dtls_v1:corresponding_tls_version(Version),
- CipherFragment, ReadState0),
- MacHash = calc_mac_hash(Type, Version, Epoch, Seq, PlainFragment, ReadState1),
+ CipherFragment, ReadState0, true),
+ MacHash = calc_mac_hash(ReadState1, Type, Version, Epoch, Seq, PlainFragment),
case ssl_record:is_correct_mac(Mac, MacHash) of
true ->
{Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
@@ -153,10 +159,27 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
false ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
+%%--------------------------------------------------------------------
+-spec encode_handshake(iolist(), dtls_version(), #connection_states{}) ->
+ {iolist(), #connection_states{}}.
+%%
+%% Description: Encodes a handshake message to send on the ssl-socket.
+%%--------------------------------------------------------------------
+encode_handshake(Frag, Version, ConnectionStates) ->
+ encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
+
+%%--------------------------------------------------------------------
+-spec encode_change_cipher_spec(dtls_version(), #connection_states{}) ->
+ {iolist(), #connection_states{}}.
+%%
+%% Description: Encodes a change_cipher_spec-message to send on the ssl socket.
+%%--------------------------------------------------------------------
+encode_change_cipher_spec(Version, ConnectionStates) ->
+ encode_plain_text(?CHANGE_CIPHER_SPEC, Version, <<1:8>>, ConnectionStates).
%%--------------------------------------------------------------------
--spec protocol_version(tls_atom_version() | tls_version()) ->
- tls_version() | tls_atom_version().
+-spec protocol_version(dtls_atom_version() | dtls_version()) ->
+ dtls_version() | dtls_atom_version().
%%
%% Description: Creates a protocol version record from a version atom
%% or vice versa.
@@ -170,7 +193,7 @@ protocol_version({254, 253}) ->
protocol_version({254, 255}) ->
dtlsv1.
%%--------------------------------------------------------------------
--spec lowest_protocol_version(tls_version(), tls_version()) -> tls_version().
+-spec lowest_protocol_version(dtls_version(), dtls_version()) -> dtls_version().
%%
%% Description: Lowes protocol version of two given versions
%%--------------------------------------------------------------------
@@ -183,7 +206,7 @@ lowest_protocol_version(Version = {M,_}, {N, _}) when M > N ->
lowest_protocol_version(_,Version) ->
Version.
%%--------------------------------------------------------------------
--spec highest_protocol_version([tls_version()]) -> tls_version().
+-spec highest_protocol_version([dtls_version()]) -> dtls_version().
%%
%% Description: Highest protocol version present in a list
%%--------------------------------------------------------------------
@@ -203,7 +226,7 @@ highest_protocol_version(_, [Version | Rest]) ->
%%--------------------------------------------------------------------
--spec supported_protocol_versions() -> [tls_version()].
+-spec supported_protocol_versions() -> [dtls_version()].
%%
%% Description: Protocol versions supported
%%--------------------------------------------------------------------
@@ -234,7 +257,7 @@ supported_connection_protocol_versions([]) ->
?ALL_DATAGRAM_SUPPORTED_VERSIONS.
%%--------------------------------------------------------------------
--spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
+-spec is_acceptable_version(dtls_version(), Supported :: [dtls_version()]) -> boolean().
%%
%% Description: ssl version 2 is not acceptable security risks are too big.
%%
@@ -244,7 +267,7 @@ is_acceptable_version(Version, Versions) ->
%%--------------------------------------------------------------------
--spec init_connection_state_seq(tls_version(), #connection_states{}) ->
+-spec init_connection_state_seq(dtls_version(), #connection_states{}) ->
#connection_state{}.
%%
%% Description: Copy the read sequence number to the write sequence number
@@ -343,5 +366,5 @@ calc_mac_hash(#connection_state{mac_secret = MacSecret,
Length, Fragment).
mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) ->
- dtls_v1:mac_hash(MacAlg, MacSecret, SeqNo, Type, Version,
+ dtls_v1:mac_hash(Version, MacAlg, MacSecret, SeqNo, Type,
Length, Fragment).
diff --git a/lib/ssl/src/dtls_record.hrl b/lib/ssl/src/dtls_record.hrl
index e935d84bdf..edb77fb2b1 100644
--- a/lib/ssl/src/dtls_record.hrl
+++ b/lib/ssl/src/dtls_record.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,16 +28,15 @@
-include("ssl_record.hrl"). %% Common TLS and DTLS records and Constantes
-%% Used to handle tls_plain_text, tls_compressed and tls_cipher_text
+%% Used to handle dtls_plain_text, dtls_compressed and dtls_cipher_text
-record(ssl_tls, {
type,
version,
- record_seq, % used in plain_text
- epoch, % used in plain_text
- message_seq,
- fragment_offset,
- fragment_length,
+ epoch,
+ sequence_number,
+ offset,
+ length,
fragment
}).
diff --git a/lib/ssl/src/dtls_v1.erl b/lib/ssl/src/dtls_v1.erl
index 6e41641483..5a7ab32887 100644
--- a/lib/ssl/src/dtls_v1.erl
+++ b/lib/ssl/src/dtls_v1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-export([suites/1, mac_hash/7, ecc_curves/1, corresponding_tls_version/1]).
--spec suites(Minor:: 253|255) -> [cipher_suite()].
+-spec suites(Minor:: 253|255) -> [ssl_cipher:cipher_suite()].
suites(Minor) ->
tls_v1:suites(corresponding_minor_tls_version(Minor)).
diff --git a/lib/ssl/src/ssl.app.src b/lib/ssl/src/ssl.app.src
index 68ebc49e4a..36681e2897 100644
--- a/lib/ssl/src/ssl.app.src
+++ b/lib/ssl/src/ssl.app.src
@@ -28,6 +28,7 @@
ssl_srp_primes,
ssl_alert,
ssl_socket,
+ ssl_listen_tracker_sup,
%% Erlang Distribution over SSL/TLS
inet_tls_dist,
ssl_tls_dist_proxy,
@@ -47,6 +48,8 @@
{registered, [ssl_sup, ssl_manager]},
{applications, [crypto, public_key, kernel, stdlib]},
{env, []},
- {mod, {ssl_app, []}}]}.
+ {mod, {ssl_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","public_key-0.22","kernel-3.0",
+ "erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index 3a64841976..d100e41930 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,27 +1,18 @@
%% -*- erlang -*-
{"%VSN%",
[
- {<<"5.3.2">>, [{load_module, ssl, soft_purge, soft_purge, []},
- {load_module, ssl_connection, soft_purge, soft_purge, []},
- {load_module, ssl_handshake, soft_purge, soft_purge, []},
- {load_module, tls_connection, soft_purge, soft_purge, []}]},
- {<<"5.3.1">>, [{restart_application, ssl}]},
- {<<"5.2\\*">>, [{restart_application, ssl}]},
- {<<"5.1\\*">>, [{restart_application, ssl}]},
- {<<"5.0\\*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
+ {<<"6.0">>, [{load_module, ssl_handshake, soft_purge, soft_purge, []}]},
+ {<<"5\\.3\\.[1-7]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
],
[
- {<<"5.3.2">>, [{load_module, ssl, soft_purge, soft_purge, []},
- {load_module, ssl_connection, soft_purge, soft_purge, []},
- {load_module, ssl_handshake, soft_purge, soft_purge, []},
- {load_module, tls_connection, soft_purge, soft_purge, []}]},
- {<<"5.3.1">>, [{restart_application, ssl}]},
- {<<"5.2\\*">>, [{restart_application, ssl}]},
- {<<"5.1\\*">>, [{restart_application, ssl}]},
- {<<"5.0\\*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
- ]}.
+ {<<"6.0">>, [{load_module, ssl_handshake, soft_purge, soft_purge, []}]},
+ {<<"5\\.3\\.[1-7]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
+ ]
+}.
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index a7fd9f5f81..5f4ad7f013 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -97,17 +97,17 @@ connect(Socket, SslOptions) when is_port(Socket) ->
connect(Socket, SslOptions0, Timeout) when is_port(Socket) ->
{Transport,_,_,_} = proplists:get_value(cb_info, SslOptions0,
{gen_tcp, tcp, tcp_closed, tcp_error}),
- EmulatedOptions = emulated_options(),
+ EmulatedOptions = ssl_socket:emulated_options(),
{ok, SocketValues} = ssl_socket:getopts(Transport, Socket, EmulatedOptions),
- try handle_options(SslOptions0 ++ SocketValues, client) of
+ try handle_options(SslOptions0 ++ SocketValues) of
{ok, #config{transport_info = CbInfo, ssl = SslOptions, emulated = EmOpts,
connection_cb = ConnectionCb}} ->
- ok = ssl_socket:setopts(Transport, Socket, internal_inet_values()),
+ ok = ssl_socket:setopts(Transport, Socket, ssl_socket:internal_inet_values()),
case ssl_socket:peername(Transport, Socket) of
{ok, {Address, Port}} ->
ssl_connection:connect(ConnectionCb, Address, Port, Socket,
- {SslOptions, EmOpts},
+ {SslOptions, emulated_socket_options(EmOpts, #socket_options{}), undefined},
self(), CbInfo, Timeout);
{error, Error} ->
{error, Error}
@@ -121,7 +121,7 @@ connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
connect(Host, Port, Options, Timeout) ->
- try handle_options(Options, client) of
+ try handle_options(Options) of
{ok, Config} ->
do_connect(Host,Port,Config,Timeout)
catch
@@ -139,12 +139,15 @@ listen(_Port, []) ->
{error, nooptions};
listen(Port, Options0) ->
try
- {ok, Config} = handle_options(Options0, server),
+ {ok, Config} = handle_options(Options0),
ConnectionCb = connection_cb(Options0),
- #config{transport_info = {Transport, _, _, _}, inet_user = Options, connection_cb = ConnectionCb} = Config,
+ #config{transport_info = {Transport, _, _, _}, inet_user = Options, connection_cb = ConnectionCb,
+ ssl = SslOpts, emulated = EmOpts} = Config,
case Transport:listen(Port, Options) of
{ok, ListenSocket} ->
- {ok, #sslsocket{pid = {ListenSocket, Config}}};
+ ok = ssl_socket:setopts(Transport, ListenSocket, ssl_socket:internal_inet_values()),
+ {ok, Tracker} = ssl_socket:inherit_tracker(ListenSocket, EmOpts, SslOpts),
+ {ok, #sslsocket{pid = {ListenSocket, Config#config{emulated = Tracker}}}};
Err = {error, _} ->
Err
end
@@ -164,25 +167,20 @@ transport_accept(ListenSocket) ->
transport_accept(ListenSocket, infinity).
transport_accept(#sslsocket{pid = {ListenSocket,
- #config{transport_info = CbInfo,
+ #config{transport_info = {Transport,_,_, _} =CbInfo,
connection_cb = ConnectionCb,
- ssl = SslOpts}}}, Timeout) ->
- %% The setopt could have been invoked on the listen socket
- %% and options should be inherited.
- EmOptions = emulated_options(),
- {Transport,_,_, _} = CbInfo,
- {ok, SocketValues} = ssl_socket:getopts(Transport, ListenSocket, EmOptions),
- ok = ssl_socket:setopts(Transport, ListenSocket, internal_inet_values()),
+ ssl = SslOpts,
+ emulated = Tracker}}}, Timeout) ->
case Transport:accept(ListenSocket, Timeout) of
{ok, Socket} ->
- ok = ssl_socket:setopts(Transport, ListenSocket, SocketValues),
+ {ok, EmOpts} = ssl_socket:get_emulated_opts(Tracker),
{ok, Port} = ssl_socket:port(Transport, Socket),
ConnArgs = [server, "localhost", Port, Socket,
- {SslOpts, socket_options(SocketValues)}, self(), CbInfo],
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), Tracker}, self(), CbInfo],
ConnectionSup = connection_sup(ConnectionCb),
case ConnectionSup:start_child(ConnArgs) of
{ok, Pid} ->
- ssl_connection:socket_control(ConnectionCb, Socket, Pid, Transport);
+ ssl_connection:socket_control(ConnectionCb, Socket, Pid, Transport, Tracker);
{error, Reason} ->
{error, Reason}
end;
@@ -195,7 +193,8 @@ transport_accept(#sslsocket{pid = {ListenSocket,
-spec ssl_accept(#sslsocket{} | port(), timeout()| [ssl_option()
| transport_option()]) ->
ok | {ok, #sslsocket{}} | {error, reason()}.
--spec ssl_accept(port(), [ssl_option()| transport_option()], timeout()) ->
+
+-spec ssl_accept(#sslsocket{} | port(), [ssl_option()] | [ssl_option()| transport_option()], timeout()) ->
{ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
@@ -210,19 +209,29 @@ ssl_accept(#sslsocket{} = Socket, Timeout) ->
ssl_accept(ListenSocket, SslOptions) when is_port(ListenSocket) ->
ssl_accept(ListenSocket, SslOptions, infinity).
+ssl_accept(#sslsocket{} = Socket, [], Timeout) ->
+ ssl_accept(#sslsocket{} = Socket, Timeout);
+ssl_accept(#sslsocket{fd = {_, _, _, Tracker}} = Socket, SslOpts0, Timeout) ->
+ 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) ->
{Transport,_,_,_} =
proplists:get_value(cb_info, SslOptions, {gen_tcp, tcp, tcp_closed, tcp_error}),
- EmulatedOptions = emulated_options(),
+ EmulatedOptions = ssl_socket:emulated_options(),
{ok, SocketValues} = ssl_socket:getopts(Transport, Socket, EmulatedOptions),
ConnetionCb = connection_cb(SslOptions),
- try handle_options(SslOptions ++ SocketValues, server) of
+ try handle_options(SslOptions ++ SocketValues) of
{ok, #config{transport_info = CbInfo, ssl = SslOpts, emulated = EmOpts}} ->
- ok = ssl_socket:setopts(Transport, Socket, internal_inet_values()),
+ ok = ssl_socket:setopts(Transport, Socket, ssl_socket:internal_inet_values()),
{ok, Port} = ssl_socket:port(Transport, Socket),
ssl_connection:ssl_accept(ConnetionCb, Port, Socket,
- {SslOpts, EmOpts},
- self(), CbInfo, Timeout)
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), undefined},
+ self(), CbInfo, Timeout)
catch
Error = {error, _Reason} -> Error
end.
@@ -276,7 +285,7 @@ controlling_process(#sslsocket{pid = {Listen,
Transport:controlling_process(Listen, NewOwner).
%%--------------------------------------------------------------------
--spec connection_info(#sslsocket{}) -> {ok, {tls_atom_version(), erl_cipher_suite()}} |
+-spec connection_info(#sslsocket{}) -> {ok, {tls_record:tls_atom_version(), ssl_cipher:erl_cipher_suite()}} |
{error, reason()}.
%%
%% Description: Returns ssl protocol and cipher used for the connection
@@ -291,7 +300,7 @@ connection_info(#sslsocket{pid = {Listen, _}}) when is_port(Listen) ->
%%
%% Description: same as inet:peername/1.
%%--------------------------------------------------------------------
-peername(#sslsocket{pid = Pid, fd = {Transport, Socket, _}}) when is_pid(Pid)->
+peername(#sslsocket{pid = Pid, fd = {Transport, Socket, _, _}}) when is_pid(Pid)->
ssl_socket:peername(Transport, Socket);
peername(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}}) ->
ssl_socket:peername(Transport, ListenSocket). %% Will return {error, enotconn}
@@ -312,7 +321,7 @@ peercert(#sslsocket{pid = {Listen, _}}) when is_port(Listen) ->
{error, enotconn}.
%%--------------------------------------------------------------------
--spec suite_definition(cipher_suite()) -> erl_cipher_suite().
+-spec suite_definition(ssl_cipher:cipher_suite()) -> ssl_cipher:erl_cipher_suite().
%%
%% Description: Return erlang cipher suite definition.
%%--------------------------------------------------------------------
@@ -330,28 +339,28 @@ negotiated_next_protocol(#sslsocket{pid = Pid}) ->
ssl_connection:negotiated_next_protocol(Pid).
%%--------------------------------------------------------------------
--spec cipher_suites() -> [erl_cipher_suite()].
--spec cipher_suites(erlang | openssl | all) -> [erl_cipher_suite()] | [string()].
-
+-spec cipher_suites(erlang | openssl | all) -> [ssl_cipher:erl_cipher_suite()] |
+ [string()].
%% Description: Returns all supported cipher suites.
%%--------------------------------------------------------------------
-cipher_suites() ->
- cipher_suites(erlang).
-
cipher_suites(erlang) ->
Version = tls_record:highest_protocol_version([]),
- [suite_definition(S) || S <- ssl_cipher:suites(Version)];
-
+ ssl_cipher:filter_suites([suite_definition(S)
+ || S <- ssl_cipher:suites(Version)]);
cipher_suites(openssl) ->
Version = tls_record:highest_protocol_version([]),
- [ssl_cipher:openssl_suite_name(S) || S <- ssl_cipher:suites(Version)];
+ [ssl_cipher:openssl_suite_name(S)
+ || S <- ssl_cipher:filter_suites(ssl_cipher:suites(Version))];
cipher_suites(all) ->
Version = tls_record:highest_protocol_version([]),
- Supported = ssl_cipher:suites(Version)
+ Supported = ssl_cipher:all_suites(Version)
++ ssl_cipher:anonymous_suites()
++ ssl_cipher:psk_suites(Version)
++ ssl_cipher:srp_suites(),
- [suite_definition(S) || S <- Supported].
+ ssl_cipher:filter_suites([suite_definition(S) || S <- Supported]).
+
+cipher_suites() ->
+ cipher_suites(erlang).
%%--------------------------------------------------------------------
-spec getopts(#sslsocket{}, [gen_tcp:option_name()]) ->
@@ -361,7 +370,7 @@ cipher_suites(all) ->
%%--------------------------------------------------------------------
getopts(#sslsocket{pid = Pid}, OptionTags) when is_pid(Pid), is_list(OptionTags) ->
ssl_connection:get_opts(Pid, OptionTags);
-getopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}},
+getopts(#sslsocket{pid = {_, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket,
OptionTags) when is_list(OptionTags) ->
try ssl_socket:getopts(Transport, ListenSocket, OptionTags) of
{ok, _} = Result ->
@@ -369,8 +378,8 @@ getopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_
{error, InetError} ->
{error, {options, {socket_options, OptionTags, InetError}}}
catch
- _:_ ->
- {error, {options, {socket_options, OptionTags}}}
+ _:Error ->
+ {error, {options, {socket_options, OptionTags, Error}}}
end;
getopts(#sslsocket{}, OptionTags) ->
{error, {options, {socket_options, OptionTags}}}.
@@ -390,7 +399,7 @@ setopts(#sslsocket{pid = Pid}, Options0) when is_pid(Pid), is_list(Options0) ->
{error, {options, {not_a_proplist, Options0}}}
end;
-setopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}}, Options) when is_list(Options) ->
+setopts(#sslsocket{pid = {_, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket, Options) when is_list(Options) ->
try ssl_socket:setopts(Transport, ListenSocket, Options) of
ok ->
ok;
@@ -419,10 +428,10 @@ shutdown(#sslsocket{pid = Pid}, How) ->
%%
%% Description: Same as inet:sockname/1
%%--------------------------------------------------------------------
-sockname(#sslsocket{pid = {Listen, #config{transport_info = {Transport,_, _, _}}}}) when is_port(Listen) ->
+sockname(#sslsocket{pid = {Listen, #config{transport_info = {Transport, _, _, _}}}}) when is_port(Listen) ->
ssl_socket:sockname(Transport, Listen);
-sockname(#sslsocket{pid = Pid, fd = {Transport, Socket, _}}) when is_pid(Pid) ->
+sockname(#sslsocket{pid = Pid, fd = {Transport, Socket, _, _}}) when is_pid(Pid) ->
ssl_socket:sockname(Transport, Socket).
%%---------------------------------------------------------------
@@ -437,8 +446,8 @@ session_info(#sslsocket{pid = {Listen,_}}) when is_port(Listen) ->
{error, enotconn}.
%%---------------------------------------------------------------
--spec versions() -> [{ssl_app, string()} | {supported, [tls_atom_version()]} |
- {available, [tls_atom_version()]}].
+-spec versions() -> [{ssl_app, string()} | {supported, [tls_record:tls_atom_version()]} |
+ {available, [tls_record:tls_atom_version()]}].
%%
%% Description: Returns a list of relevant versions.
%%--------------------------------------------------------------------
@@ -541,7 +550,8 @@ do_connect(Address, Port,
{Transport, _, _, _} = CbInfo,
try Transport:connect(Address, Port, SocketOpts, Timeout) of
{ok, Socket} ->
- ssl_connection:connect(ConnetionCb, Address, Port, Socket, {SslOpts,EmOpts},
+ ssl_connection:connect(ConnetionCb, Address, Port, Socket,
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), undefined},
self(), CbInfo, Timeout);
{error, Reason} ->
{error, Reason}
@@ -554,63 +564,66 @@ do_connect(Address, Port,
{error, {options, {socket_options, UserOpts}}}
end.
-handle_options(Opts0, _Role) ->
+%% Handle extra ssl options given to ssl_accept
+handle_options(Opts0, #ssl_options{protocol = Protocol, cacerts = CaCerts0,
+ cacertfile = CaCertFile0} = InheritedSslOpts) ->
+ RecordCB = record_cb(Protocol),
+ CaCerts = handle_option(cacerts, Opts0, CaCerts0),
+ {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun, PartialChainHanlder} = handle_verify_options(Opts0, CaCerts),
+ CaCertFile = case proplists:get_value(cacertfile, Opts0, CaCertFile0) of
+ undefined ->
+ CaCertDefault;
+ CAFile ->
+ CAFile
+ end,
+
+ NewVerifyOpts = InheritedSslOpts#ssl_options{cacerts = CaCerts,
+ cacertfile = CaCertFile,
+ verify = Verify,
+ verify_fun = VerifyFun,
+ partial_chain = PartialChainHanlder,
+ fail_if_no_peer_cert = FailIfNoPeerCert},
+ SslOpts1 = lists:foldl(fun(Key, PropList) ->
+ proplists:delete(Key, PropList)
+ end, Opts0, [cacerts, cacertfile, verify, verify_fun, partial_chain,
+ fail_if_no_peer_cert]),
+ case handle_option(versions, SslOpts1, []) of
+ [] ->
+ new_ssl_options(SslOpts1, NewVerifyOpts, RecordCB);
+ Value ->
+ Versions = [RecordCB:protocol_version(Vsn) || Vsn <- Value],
+ new_ssl_options(proplists:delete(versions, SslOpts1),
+ NewVerifyOpts#ssl_options{versions = Versions}, record_cb(Protocol))
+ end.
+
+%% Handle all options in listen and connect
+handle_options(Opts0) ->
Opts = proplists:expand([{binary, [{mode, binary}]},
{list, [{mode, list}]}], Opts0),
- ReuseSessionFun = fun(_, _, _, _) -> true end,
-
- DefaultVerifyNoneFun =
- {fun(_,{bad_cert, _}, UserState) ->
- {valid, UserState};
- (_,{extension, _}, UserState) ->
- {unknown, UserState};
- (_, valid, UserState) ->
- {valid, UserState};
- (_, valid_peer, UserState) ->
- {valid, UserState}
- end, []},
-
- VerifyNoneFun = handle_option(verify_fun, Opts, DefaultVerifyNoneFun),
+ assert_proplist(Opts),
+ RecordCb = record_cb(Opts),
- UserFailIfNoPeerCert = handle_option(fail_if_no_peer_cert, Opts, false),
- UserVerifyFun = handle_option(verify_fun, Opts, undefined),
+ ReuseSessionFun = fun(_, _, _, _) -> true end,
CaCerts = handle_option(cacerts, Opts, undefined),
- {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun} =
- %% Handle 0, 1, 2 for backwards compatibility
- case proplists:get_value(verify, Opts, verify_none) of
- 0 ->
- {verify_none, false,
- ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
- 1 ->
- {verify_peer, false,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- 2 ->
- {verify_peer, true,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- verify_none ->
- {verify_none, false,
- ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
- verify_peer ->
- {verify_peer, UserFailIfNoPeerCert,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- Value ->
- throw({error, {options, {verify, Value}}})
- end,
-
+ {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun, PartialChainHanlder} =
+ handle_verify_options(Opts, CaCerts),
+
CertFile = handle_option(certfile, Opts, <<>>),
-
+ RecordCb = record_cb(Opts),
+
Versions = case handle_option(versions, Opts, []) of
[] ->
- tls_record:supported_protocol_versions();
+ RecordCb:supported_protocol_versions();
Vsns ->
- [tls_record:protocol_version(Vsn) || Vsn <- Vsns]
+ [RecordCb:protocol_version(Vsn) || Vsn <- Vsns]
end,
SSLOptions = #ssl_options{
versions = Versions,
verify = validate_option(verify, Verify),
verify_fun = VerifyFun,
+ partial_chain = PartialChainHanlder,
fail_if_no_peer_cert = FailIfNoPeerCert,
verify_client_once = handle_option(verify_client_once, Opts, false),
depth = handle_option(depth, Opts, 1),
@@ -626,7 +639,8 @@ handle_options(Opts0, _Role) ->
user_lookup_fun = handle_option(user_lookup_fun, Opts, undefined),
psk_identity = handle_option(psk_identity, Opts, undefined),
srp_identity = handle_option(srp_identity, Opts, undefined),
- ciphers = handle_option(ciphers, Opts, []),
+ ciphers = handle_cipher_option(proplists:get_value(ciphers, Opts, []),
+ RecordCb:highest_protocol_version(Versions)),
%% Server side option
reuse_session = handle_option(reuse_session, Opts, ReuseSessionFun),
reuse_sessions = handle_option(reuse_sessions, Opts, true),
@@ -640,11 +654,15 @@ handle_options(Opts0, _Role) ->
make_next_protocol_selector(
handle_option(client_preferred_next_protocols, Opts, undefined)),
log_alert = handle_option(log_alert, Opts, true),
- server_name_indication = handle_option(server_name_indication, Opts, undefined)
+ server_name_indication = handle_option(server_name_indication, Opts, undefined),
+ honor_cipher_order = handle_option(honor_cipher_order, Opts, false),
+ protocol = proplists:get_value(protocol, Opts, tls),
+ padding_check = proplists:get_value(padding_check, Opts, true),
+ fallback = proplists:get_value(fallback, Opts, false)
},
CbInfo = proplists:get_value(cb_info, Opts, {gen_tcp, tcp, tcp_closed, tcp_error}),
- SslOptions = [protocol, versions, verify, verify_fun,
+ SslOptions = [protocol, versions, verify, verify_fun, partial_chain,
fail_if_no_peer_cert, verify_client_once,
depth, cert, certfile, key, keyfile,
password, cacerts, cacertfile, dh, dhfile,
@@ -652,16 +670,18 @@ handle_options(Opts0, _Role) ->
reuse_session, reuse_sessions, ssl_imp,
cb_info, renegotiate_at, secure_renegotiate, hibernate_after,
erl_dist, next_protocols_advertised,
- client_preferred_next_protocols, log_alert, server_name_indication],
+ client_preferred_next_protocols, log_alert,
+ server_name_indication, honor_cipher_order, padding_check,
+ fallback],
SockOpts = lists:foldl(fun(Key, PropList) ->
proplists:delete(Key, PropList)
end, Opts, SslOptions),
- {SSLsock, Emulated} = emulated_options(SockOpts),
+ {Sock, Emulated} = emulated_options(SockOpts),
ConnetionCb = connection_cb(Opts),
- {ok, #config{ssl = SSLOptions, emulated = Emulated, inet_ssl = SSLsock,
+ {ok, #config{ssl = SSLOptions, emulated = Emulated, inet_ssl = Sock,
inet_user = SockOpts, transport_info = CbInfo, connection_cb = ConnetionCb
}}.
@@ -695,11 +715,11 @@ validate_option(verify_fun, Fun) when is_function(Fun) ->
end, Fun};
validate_option(verify_fun, {Fun, _} = Value) when is_function(Fun) ->
Value;
-validate_option(fail_if_no_peer_cert, Value)
- when Value == true; Value == false ->
+validate_option(partial_chain, Value) when is_function(Value) ->
+ Value;
+validate_option(fail_if_no_peer_cert, Value) when is_boolean(Value) ->
Value;
-validate_option(verify_client_once, Value)
- when Value == true; Value == false ->
+validate_option(verify_client_once, Value) when is_boolean(Value) ->
Value;
validate_option(depth, Value) when is_integer(Value),
Value >= 0, Value =< 255->
@@ -712,7 +732,7 @@ validate_option(certfile, undefined = Value) ->
validate_option(certfile, Value) when is_binary(Value) ->
Value;
validate_option(certfile, Value) when is_list(Value) ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(key, undefined) ->
undefined;
@@ -729,7 +749,7 @@ validate_option(keyfile, undefined) ->
validate_option(keyfile, Value) when is_binary(Value) ->
Value;
validate_option(keyfile, Value) when is_list(Value), Value =/= "" ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(password, Value) when is_list(Value) ->
Value;
@@ -743,7 +763,7 @@ validate_option(cacertfile, undefined) ->
validate_option(cacertfile, Value) when is_binary(Value) ->
Value;
validate_option(cacertfile, Value) when is_list(Value), Value =/= ""->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(dh, Value) when Value == undefined;
is_binary(Value) ->
Value;
@@ -752,12 +772,12 @@ validate_option(dhfile, undefined = Value) ->
validate_option(dhfile, Value) when is_binary(Value) ->
Value;
validate_option(dhfile, Value) when is_list(Value), Value =/= "" ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(psk_identity, undefined) ->
undefined;
validate_option(psk_identity, Identity)
when is_list(Identity), Identity =/= "", length(Identity) =< 65535 ->
- list_to_binary(Identity);
+ binary_filename(Identity);
validate_option(user_lookup_fun, undefined) ->
undefined;
validate_option(user_lookup_fun, {Fun, _} = Value) when is_function(Fun, 3) ->
@@ -766,25 +786,15 @@ validate_option(srp_identity, undefined) ->
undefined;
validate_option(srp_identity, {Username, Password})
when is_list(Username), is_list(Password), Username =/= "", length(Username) =< 255 ->
- {list_to_binary(Username), list_to_binary(Password)};
+ {unicode:characters_to_binary(Username),
+ unicode:characters_to_binary(Password)};
-validate_option(ciphers, Value) when is_list(Value) ->
- Version = tls_record:highest_protocol_version([]),
- try cipher_suites(Version, Value)
- catch
- exit:_ ->
- throw({error, {options, {ciphers, Value}}});
- error:_->
- throw({error, {options, {ciphers, Value}}})
- end;
validate_option(reuse_session, Value) when is_function(Value) ->
Value;
-validate_option(reuse_sessions, Value) when Value == true;
- Value == false ->
+validate_option(reuse_sessions, Value) when is_boolean(Value) ->
Value;
-validate_option(secure_renegotiate, Value) when Value == true;
- Value == false ->
+validate_option(secure_renegotiate, Value) when is_boolean(Value) ->
Value;
validate_option(renegotiate_at, Value) when is_integer(Value) ->
erlang:min(Value, ?DEFAULT_RENEGOTIATE_AT);
@@ -793,8 +803,7 @@ validate_option(hibernate_after, undefined) ->
undefined;
validate_option(hibernate_after, Value) when is_integer(Value), Value >= 0 ->
Value;
-validate_option(erl_dist,Value) when Value == true;
- Value == false ->
+validate_option(erl_dist,Value) when is_boolean(Value) ->
Value;
validate_option(client_preferred_next_protocols = Opt, {Precedence, PreferredProtocols} = Value)
when is_list(PreferredProtocols) ->
@@ -820,8 +829,7 @@ validate_option(client_preferred_next_protocols = Opt, {Precedence, PreferredPro
validate_option(client_preferred_next_protocols, undefined) ->
undefined;
-validate_option(log_alert, Value) when Value == true;
- Value == false ->
+validate_option(log_alert, Value) when is_boolean(Value) ->
Value;
validate_option(next_protocols_advertised = Opt, Value) when is_list(Value) ->
case tls_record:highest_protocol_version([]) of
@@ -840,6 +848,12 @@ validate_option(server_name_indication, disable) ->
disable;
validate_option(server_name_indication, undefined) ->
undefined;
+validate_option(honor_cipher_order, Value) when is_boolean(Value) ->
+ Value;
+validate_option(padding_check, Value) when is_boolean(Value) ->
+ Value;
+validate_option(fallback, Value) when is_boolean(Value) ->
+ Value;
validate_option(Opt, Value) ->
throw({error, {options, {Opt, Value}}}).
@@ -899,74 +913,72 @@ ca_cert_default(verify_peer, {Fun,_}, _) when is_function(Fun) ->
%% some trusted certs.
ca_cert_default(verify_peer, undefined, _) ->
"".
-
-emulated_options() ->
- [mode, packet, active, header, packet_size].
-
-internal_inet_values() ->
- [{packet_size,0},{packet, 0},{header, 0},{active, false},{mode,binary}].
-
-socket_options(InetValues) ->
- #socket_options{
- mode = proplists:get_value(mode, InetValues, lists),
- header = proplists:get_value(header, InetValues, 0),
- active = proplists:get_value(active, InetValues, active),
- packet = proplists:get_value(packet, InetValues, 0),
- packet_size = proplists:get_value(packet_size, InetValues)
- }.
-
emulated_options(Opts) ->
- emulated_options(Opts, internal_inet_values(), #socket_options{}).
-
-emulated_options([{mode,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(mode,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{mode=Opt});
-emulated_options([{header,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(header,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{header=Opt});
-emulated_options([{active,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(active,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{active=Opt});
-emulated_options([{packet,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(packet,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{packet=Opt});
-emulated_options([{packet_size,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(packet_size,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{packet_size=Opt});
+ emulated_options(Opts, ssl_socket:internal_inet_values(), ssl_socket:default_inet_values()).
+
+emulated_options([{mode, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(mode, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(mode, Emulated)]);
+emulated_options([{header, Value} = Opt | Opts], Inet, Emulated) ->
+ validate_inet_option(header, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(header, Emulated)]);
+emulated_options([{active, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(active, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(active, Emulated)]);
+emulated_options([{packet, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(packet, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(packet, Emulated)]);
+emulated_options([{packet_size, Value} = Opt | Opts], Inet, Emulated) ->
+ validate_inet_option(packet_size, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(packet_size, Emulated)]);
emulated_options([Opt|Opts], Inet, Emulated) ->
emulated_options(Opts, [Opt|Inet], Emulated);
emulated_options([], Inet,Emulated) ->
{Inet, Emulated}.
-cipher_suites(Version, []) ->
- ssl_cipher:suites(Version);
-cipher_suites(Version, [{_,_,_,_}| _] = Ciphers0) -> %% Backwards compatibility
+handle_cipher_option(Value, Version) when is_list(Value) ->
+ try binary_cipher_suites(Version, Value) of
+ Suites ->
+ Suites
+ catch
+ exit:_ ->
+ throw({error, {options, {ciphers, Value}}});
+ error:_->
+ throw({error, {options, {ciphers, Value}}})
+ end.
+
+binary_cipher_suites(Version, []) ->
+ %% Defaults to all supported suites that does
+ %% not require explicit configuration
+ ssl_cipher:filter_suites(ssl_cipher:suites(Version));
+binary_cipher_suites(Version, [{_,_,_,_}| _] = Ciphers0) -> %% Backwards compatibility
Ciphers = [{KeyExchange, Cipher, Hash} || {KeyExchange, Cipher, Hash, _} <- Ciphers0],
- cipher_suites(Version, Ciphers);
-cipher_suites(Version, [{_,_,_}| _] = Ciphers0) ->
+ binary_cipher_suites(Version, Ciphers);
+binary_cipher_suites(Version, [{_,_,_}| _] = Ciphers0) ->
Ciphers = [ssl_cipher:suite(C) || C <- Ciphers0],
- cipher_suites(Version, Ciphers);
+ binary_cipher_suites(Version, Ciphers);
-cipher_suites(Version, [Cipher0 | _] = Ciphers0) when is_binary(Cipher0) ->
- Supported0 = ssl_cipher:suites(Version)
+binary_cipher_suites(Version, [Cipher0 | _] = Ciphers0) when is_binary(Cipher0) ->
+ All = ssl_cipher:suites(Version)
++ ssl_cipher:anonymous_suites()
++ ssl_cipher:psk_suites(Version)
++ ssl_cipher:srp_suites(),
- Supported = ssl_cipher:filter_suites(Supported0),
- case [Cipher || Cipher <- Ciphers0, lists:member(Cipher, Supported)] of
+ case [Cipher || Cipher <- Ciphers0, lists:member(Cipher, All)] of
[] ->
- Supported;
+ %% Defaults to all supported suites that does
+ %% not require explicit configuration
+ ssl_cipher:filter_suites(ssl_cipher:suites(Version));
Ciphers ->
Ciphers
end;
-cipher_suites(Version, [Head | _] = Ciphers0) when is_list(Head) ->
+binary_cipher_suites(Version, [Head | _] = Ciphers0) when is_list(Head) ->
%% Format: ["RC4-SHA","RC4-MD5"]
Ciphers = [ssl_cipher:openssl_suite(C) || C <- Ciphers0],
- cipher_suites(Version, Ciphers);
-cipher_suites(Version, Ciphers0) ->
+ binary_cipher_suites(Version, Ciphers);
+binary_cipher_suites(Version, Ciphers0) ->
%% Format: "RC4-SHA:RC4-MD5"
Ciphers = [ssl_cipher:openssl_suite(C) || C <- string:tokens(Ciphers0, ":")],
- cipher_suites(Version, Ciphers).
+ binary_cipher_suites(Version, Ciphers).
unexpected_format(Error) ->
lists:flatten(io_lib:format("Unexpected error: ~p", [Error])).
@@ -1034,7 +1046,146 @@ connection_cb(dtls) ->
connection_cb(Opts) ->
connection_cb(proplists:get_value(protocol, Opts, tls)).
+record_cb(tls) ->
+ tls_record;
+record_cb(dtls) ->
+ dtls_record;
+record_cb(Opts) ->
+ record_cb(proplists:get_value(protocol, Opts, tls)).
+
connection_sup(tls_connection) ->
tls_connection_sup;
connection_sup(dtls_connection) ->
dtls_connection_sup.
+
+binary_filename(FileName) ->
+ Enc = file:native_name_encoding(),
+ unicode:characters_to_binary(FileName, unicode, Enc).
+
+assert_proplist([]) ->
+ true;
+assert_proplist([{Key,_} | Rest]) when is_atom(Key) ->
+ assert_proplist(Rest);
+%% Handle exceptions
+assert_proplist([inet | Rest]) ->
+ assert_proplist(Rest);
+assert_proplist([inet6 | Rest]) ->
+ assert_proplist(Rest);
+assert_proplist([Value | _]) ->
+ throw({option_not_a_key_value_tuple, Value}).
+
+emulated_socket_options(InetValues, #socket_options{
+ mode = Mode,
+ header = Header,
+ active = Active,
+ packet = Packet,
+ packet_size = Size}) ->
+ #socket_options{
+ mode = proplists:get_value(mode, InetValues, Mode),
+ header = proplists:get_value(header, InetValues, Header),
+ active = proplists:get_value(active, InetValues, Active),
+ packet = proplists:get_value(packet, InetValues, Packet),
+ packet_size = proplists:get_value(packet_size, InetValues, Size)
+ }.
+
+new_ssl_options([], #ssl_options{} = Opts, _) ->
+ Opts;
+new_ssl_options([{verify_client_once, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{verify_client_once = validate_option(verify_client_once, Value)}, RecordCB);
+new_ssl_options([{depth, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{depth = validate_option(depth, Value)}, RecordCB);
+new_ssl_options([{cert, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{cert = validate_option(cert, Value)}, RecordCB);
+new_ssl_options([{certfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{certfile = validate_option(certfile, Value)}, RecordCB);
+new_ssl_options([{key, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{key = validate_option(key, Value)}, RecordCB);
+new_ssl_options([{keyfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{keyfile = validate_option(keyfile, Value)}, RecordCB);
+new_ssl_options([{password, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{password = validate_option(password, Value)}, RecordCB);
+new_ssl_options([{dh, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{dh = validate_option(dh, Value)}, RecordCB);
+new_ssl_options([{dhfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{dhfile = validate_option(dhfile, Value)}, RecordCB);
+new_ssl_options([{user_lookup_fun, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{user_lookup_fun = validate_option(user_lookup_fun, Value)}, RecordCB);
+new_ssl_options([{psk_identity, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{psk_identity = validate_option(psk_identity, Value)}, RecordCB);
+new_ssl_options([{srp_identity, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{srp_identity = validate_option(srp_identity, Value)}, RecordCB);
+new_ssl_options([{ciphers, Value} | Rest], #ssl_options{versions = Versions} = Opts, RecordCB) ->
+ Ciphers = handle_cipher_option(Value, RecordCB:highest_protocol_version(Versions)),
+ new_ssl_options(Rest,
+ Opts#ssl_options{ciphers = Ciphers}, RecordCB);
+new_ssl_options([{reuse_session, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{reuse_session = validate_option(reuse_session, Value)}, RecordCB);
+new_ssl_options([{reuse_sessions, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{reuse_sessions = validate_option(reuse_sessions, Value)}, RecordCB);
+new_ssl_options([{ssl_imp, _Value} | Rest], #ssl_options{} = Opts, RecordCB) -> %% Not used backwards compatibility
+ new_ssl_options(Rest, Opts, RecordCB);
+new_ssl_options([{renegotiate_at, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{ renegotiate_at = validate_option(renegotiate_at, Value)}, RecordCB);
+new_ssl_options([{secure_renegotiate, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{secure_renegotiate = validate_option(secure_renegotiate, Value)}, RecordCB);
+new_ssl_options([{hibernate_after, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{hibernate_after = validate_option(hibernate_after, Value)}, RecordCB);
+new_ssl_options([{next_protocols_advertised, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{next_protocols_advertised = validate_option(next_protocols_advertised, Value)}, RecordCB);
+new_ssl_options([{client_preferred_next_protocols, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{next_protocol_selector =
+ make_next_protocol_selector(validate_option(client_preferred_next_protocols, Value))}, RecordCB);
+new_ssl_options([{log_alert, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{log_alert = validate_option(log_alert, Value)}, RecordCB);
+new_ssl_options([{server_name_indication, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{server_name_indication = validate_option(server_name_indication, Value)}, RecordCB);
+new_ssl_options([{honor_cipher_order, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{honor_cipher_order = validate_option(honor_cipher_order, Value)}, RecordCB);
+new_ssl_options([{Key, Value} | _Rest], #ssl_options{}, _) ->
+ throw({error, {options, {Key, Value}}}).
+
+
+handle_verify_options(Opts, CaCerts) ->
+ DefaultVerifyNoneFun =
+ {fun(_,{bad_cert, _}, UserState) ->
+ {valid, UserState};
+ (_,{extension, _}, UserState) ->
+ {unknown, UserState};
+ (_, valid, UserState) ->
+ {valid, UserState};
+ (_, valid_peer, UserState) ->
+ {valid, UserState}
+ end, []},
+ VerifyNoneFun = handle_option(verify_fun, Opts, DefaultVerifyNoneFun),
+
+ UserFailIfNoPeerCert = handle_option(fail_if_no_peer_cert, Opts, false),
+ UserVerifyFun = handle_option(verify_fun, Opts, undefined),
+
+ PartialChainHanlder = handle_option(partial_chain, Opts,
+ fun(_) -> unknown_ca end),
+
+ %% Handle 0, 1, 2 for backwards compatibility
+ case proplists:get_value(verify, Opts, verify_none) of
+ 0 ->
+ {verify_none, false,
+ ca_cert_default(verify_none, VerifyNoneFun, CaCerts),
+ VerifyNoneFun, PartialChainHanlder};
+ 1 ->
+ {verify_peer, false,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts),
+ UserVerifyFun, PartialChainHanlder};
+ 2 ->
+ {verify_peer, true,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts),
+ UserVerifyFun, PartialChainHanlder};
+ verify_none ->
+ {verify_none, false,
+ ca_cert_default(verify_none, VerifyNoneFun, CaCerts),
+ VerifyNoneFun, PartialChainHanlder};
+ verify_peer ->
+ {verify_peer, UserFailIfNoPeerCert,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts),
+ UserVerifyFun, PartialChainHanlder};
+ Value ->
+ throw({error, {options, {verify, Value}}})
+ end.
diff --git a/lib/ssl/src/ssl_alert.erl b/lib/ssl/src/ssl_alert.erl
index 5c842b4d19..9e372f739a 100644
--- a/lib/ssl/src/ssl_alert.erl
+++ b/lib/ssl/src/ssl_alert.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,22 +31,31 @@
-include("ssl_record.hrl").
-include("ssl_internal.hrl").
--export([encode/3, alert_txt/1, reason_code/2]).
+-export([encode/3, decode/1, alert_txt/1, reason_code/2]).
%%====================================================================
%% Internal application API
%%====================================================================
%%--------------------------------------------------------------------
--spec encode(#alert{}, tls_version(), #connection_states{}) ->
+-spec encode(#alert{}, ssl_record:ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
-%% Description:
+%% Description: Encodes an alert
%%--------------------------------------------------------------------
encode(#alert{} = Alert, Version, ConnectionStates) ->
ssl_record:encode_alert_record(Alert, Version, ConnectionStates).
%%--------------------------------------------------------------------
+-spec decode(binary()) -> [#alert{}] | #alert{}.
+%%
+%% Description: Decode alert(s), will return a singel own alert if peer
+%% sends garbage or too many warning alerts.
+%%--------------------------------------------------------------------
+decode(Bin) ->
+ decode(Bin, [], 0).
+
+%%--------------------------------------------------------------------
-spec reason_code(#alert{}, client | server) -> closed | {essl, string()}.
%%
%% Description: Returns the error reason that will be returned to the
@@ -71,6 +80,22 @@ alert_txt(#alert{level = Level, description = Description, where = {Mod,Line}})
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+
+%% 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);
+decode(<<?BYTE(Level), ?BYTE(Description), Rest/binary>>, Acc, N) when Level == ?WARNING ->
+ Alert = ?ALERT_REC(Level, Description),
+ decode(Rest, [Alert | Acc], N + 1);
+decode(<<?BYTE(Level), ?BYTE(Description), _Rest/binary>>, Acc, _) when Level == ?FATAL->
+ 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);
+decode(<<>>, Acc, _) ->
+ lists:reverse(Acc, []).
+
level_txt(?WARNING) ->
"Warning:";
level_txt(?FATAL) ->
@@ -124,5 +149,19 @@ description_txt(?USER_CANCELED) ->
"user canceled";
description_txt(?NO_RENEGOTIATION) ->
"no renegotiation";
+description_txt(?UNSUPPORTED_EXTENSION) ->
+ "unsupported extension";
+description_txt(?CERTIFICATE_UNOBTAINABLE) ->
+ "certificate unobtainable";
+description_txt(?UNRECOGNISED_NAME) ->
+ "unrecognised name";
+description_txt(?BAD_CERTIFICATE_STATUS_RESPONSE) ->
+ "bad certificate status response";
+description_txt(?BAD_CERTIFICATE_HASH_VALUE) ->
+ "bad certificate hash value";
description_txt(?UNKNOWN_PSK_IDENTITY) ->
- "unknown psk identity".
+ "unknown psk identity";
+description_txt(?INAPPROPRIATE_FALLBACK) ->
+ "inappropriate fallback";
+description_txt(Enum) ->
+ lists:flatten(io_lib:format("unsupported/unknown alert: ~p", [Enum])).
diff --git a/lib/ssl/src/ssl_alert.hrl b/lib/ssl/src/ssl_alert.hrl
index 2a8a91aefa..a3619e4a35 100644
--- a/lib/ssl/src/ssl_alert.hrl
+++ b/lib/ssl/src/ssl_alert.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,7 +48,7 @@
%% unsupported_certificate(43),
%% certificate_revoked(44),
%% certificate_expired(45),
- %% certificate_unknown(46),
+%% certificate_unknown(46),
%% illegal_parameter(47),
%% unknown_ca(48),
%% access_denied(49),
@@ -58,8 +58,16 @@
%% protocol_version(70),
%% insufficient_security(71),
%% internal_error(80),
+%% inappropriate_fallback(86),
%% user_canceled(90),
%% no_renegotiation(100),
+%% RFC 4366
+%% unsupported_extension(110),
+%% certificate_unobtainable(111),
+%% unrecognized_name(112),
+%% bad_certificate_status_response(113),
+%% bad_certificate_hash_value(114),
+%% RFC 4366
%% unknown_psk_identity(115),
%% (255)
%% } AlertDescription;
@@ -86,12 +94,20 @@
-define(PROTOCOL_VERSION, 70).
-define(INSUFFICIENT_SECURITY, 71).
-define(INTERNAL_ERROR, 80).
+-define(INAPPROPRIATE_FALLBACK, 86).
-define(USER_CANCELED, 90).
-define(NO_RENEGOTIATION, 100).
+-define(UNSUPPORTED_EXTENSION, 110).
+-define(CERTIFICATE_UNOBTAINABLE, 111).
+-define(UNRECOGNISED_NAME, 112).
+-define(BAD_CERTIFICATE_STATUS_RESPONSE, 113).
+-define(BAD_CERTIFICATE_HASH_VALUE, 114).
-define(UNKNOWN_PSK_IDENTITY, 115).
-define(ALERT_REC(Level,Desc), #alert{level=Level,description=Desc,where={?FILE, ?LINE}}).
+-define(MAX_ALERTS, 10).
+
%% Alert
-record(alert, {
level,
diff --git a/lib/ssl/src/ssl_api.hrl b/lib/ssl/src/ssl_api.hrl
index 607991750f..22185ff60a 100644
--- a/lib/ssl/src/ssl_api.hrl
+++ b/lib/ssl/src/ssl_api.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,8 +24,6 @@
%% Visible in API
-export_type([connect_option/0, listen_option/0, ssl_option/0, transport_option/0,
- erl_cipher_suite/0, %% From ssl_cipher.hrl
- tls_atom_version/0, %% From ssl_internal.hrl
prf_random/0, sslsocket/0]).
@@ -39,23 +37,24 @@
-type listen_option() :: socket_listen_option() | ssl_option() | transport_option().
-type socket_listen_option() :: gen_tcp:listen_option().
--type ssl_option() :: {verify, verify_type()} |
- {verify_fun, {fun(), InitialUserState::term()}} |
- {fail_if_no_peer_cert, boolean()} | {depth, integer()} |
- {cert, Der::binary()} | {certfile, path()} | {key, Der::binary()} |
- {keyfile, path()} | {password, string()} | {cacerts, [Der::binary()]} |
- {cacertfile, path()} | {dh, Der::binary()} | {dhfile, path()} |
- {user_lookup_fun, {fun(), InitialUserState::term()}} |
- {psk_identity, string()} |
- {srp_identity, {string(), string()}} |
- {ciphers, ciphers()} | {ssl_imp, ssl_imp()} | {reuse_sessions, boolean()} |
- {reuse_session, fun()} | {hibernate_after, integer()|undefined} |
- {next_protocols_advertised, list(binary())} |
- {client_preferred_next_protocols, binary(), client | server, list(binary())}.
+-type ssl_option() :: {versions, ssl_record:ssl_atom_version()} |
+ {verify, verify_type()} |
+ {verify_fun, {fun(), InitialUserState::term()}} |
+ {fail_if_no_peer_cert, boolean()} | {depth, integer()} |
+ {cert, Der::binary()} | {certfile, path()} | {key, Der::binary()} |
+ {keyfile, path()} | {password, string()} | {cacerts, [Der::binary()]} |
+ {cacertfile, path()} | {dh, Der::binary()} | {dhfile, path()} |
+ {user_lookup_fun, {fun(), InitialUserState::term()}} |
+ {psk_identity, string()} |
+ {srp_identity, {string(), string()}} |
+ {ciphers, ciphers()} | {ssl_imp, ssl_imp()} | {reuse_sessions, boolean()} |
+ {reuse_session, fun()} | {hibernate_after, integer()|undefined} |
+ {next_protocols_advertised, list(binary())} |
+ {client_preferred_next_protocols, binary(), client | server, list(binary())}.
-type verify_type() :: verify_none | verify_peer.
-type path() :: string().
--type ciphers() :: [erl_cipher_suite()] |
+-type ciphers() :: [ssl_cipher:erl_cipher_suite()] |
string(). % (according to old API)
-type ssl_imp() :: new | old.
diff --git a/lib/ssl/src/ssl_certificate.erl b/lib/ssl/src/ssl_certificate.erl
index b186a1015a..30d224fee2 100644
--- a/lib/ssl/src/ssl_certificate.erl
+++ b/lib/ssl/src/ssl_certificate.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014 All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,7 +30,7 @@
-include("ssl_internal.hrl").
-include_lib("public_key/include/public_key.hrl").
--export([trusted_cert_and_path/3,
+-export([trusted_cert_and_path/4,
certificate_chain/3,
file_to_certificats/2,
validate_extension/3,
@@ -46,14 +46,14 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec trusted_cert_and_path([der_cert()], db_handle(), certdb_ref()) ->
+-spec trusted_cert_and_path([der_cert()], db_handle(), certdb_ref(), fun()) ->
{der_cert() | unknown_ca, [der_cert()]}.
%%
%% Description: Extracts the root cert (if not presents tries to
%% look it up, if not found {bad_cert, unknown_ca} will be added verification
%% errors. Returns {RootCert, Path, VerifyErrors}
%%--------------------------------------------------------------------
-trusted_cert_and_path(CertChain, CertDbHandle, CertDbRef) ->
+trusted_cert_and_path(CertChain, CertDbHandle, CertDbRef, PartialChainHandler) ->
Path = [Cert | _] = lists:reverse(CertChain),
OtpCert = public_key:pkix_decode_cert(Cert, otp),
SignedAndIssuerID =
@@ -62,32 +62,23 @@ trusted_cert_and_path(CertChain, CertDbHandle, CertDbRef) ->
{ok, IssuerId} = public_key:pkix_issuer_id(OtpCert, self),
{self, IssuerId};
false ->
- case public_key:pkix_issuer_id(OtpCert, other) of
- {ok, IssuerId} ->
- {other, IssuerId};
- {error, issuer_not_found} ->
- case find_issuer(OtpCert, CertDbHandle) of
- {ok, IssuerId} ->
- {other, IssuerId};
- Other ->
- Other
- end
- end
+ other_issuer(OtpCert, CertDbHandle)
end,
case SignedAndIssuerID of
{error, issuer_not_found} ->
%% The root CA was not sent and can not be found.
- {unknown_ca, Path};
+ handle_incomplete_chain(Path, PartialChainHandler);
{self, _} when length(Path) == 1 ->
{selfsigned_peer, Path};
{_ ,{SerialNr, Issuer}} ->
case ssl_manager:lookup_trusted_cert(CertDbHandle, CertDbRef, SerialNr, Issuer) of
- {ok, {BinCert,_}} ->
- {BinCert, Path};
+ {ok, Trusted} ->
+ %% Trusted must be selfsigned or it is an incomplete chain
+ handle_path(Trusted, Path, PartialChainHandler);
_ ->
%% Root CA could not be verified
- {unknown_ca, Path}
+ handle_incomplete_chain(Path, PartialChainHandler)
end
end.
@@ -222,23 +213,27 @@ certificate_chain(CertDbHandle, CertsDbRef, Chain, SerialNr, Issuer, _SelfSigned
_ ->
%% The trusted cert may be obmitted from the chain as the
%% counter part needs to have it anyway to be able to
- %% verify it. This will be the normal case for servers
- %% that does not verify the clients and hence have not
- %% specified the cacertfile.
+ %% verify it.
{ok, lists:reverse(Chain)}
end.
find_issuer(OtpCert, CertDbHandle) ->
- IsIssuerFun = fun({_Key, {_Der, #'OTPCertificate'{} = ErlCertCandidate}}, Acc) ->
- case public_key:pkix_is_issuer(OtpCert, ErlCertCandidate) of
- true ->
- throw(public_key:pkix_issuer_id(ErlCertCandidate, self));
- false ->
- Acc
- end;
- (_, Acc) ->
- Acc
- end,
+ IsIssuerFun =
+ fun({_Key, {_Der, #'OTPCertificate'{} = ErlCertCandidate}}, Acc) ->
+ case public_key:pkix_is_issuer(OtpCert, ErlCertCandidate) of
+ true ->
+ case verify_cert_signer(OtpCert, ErlCertCandidate#'OTPCertificate'.tbsCertificate) of
+ true ->
+ throw(public_key:pkix_issuer_id(ErlCertCandidate, self));
+ false ->
+ Acc
+ end;
+ false ->
+ Acc
+ end;
+ (_, Acc) ->
+ Acc
+ end,
try ssl_pkix_db:foldl(IsIssuerFun, issuer_not_found, CertDbHandle) of
issuer_not_found ->
@@ -254,3 +249,57 @@ is_valid_extkey_usage(KeyUse, client) ->
is_valid_extkey_usage(KeyUse, server) ->
%% Server wants to verify client
is_valid_key_usage(KeyUse, ?'id-kp-clientAuth').
+
+verify_cert_signer(OtpCert, SignerTBSCert) ->
+ PublicKey = public_key(SignerTBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo),
+ public_key:pkix_verify(public_key:pkix_encode('OTPCertificate', OtpCert, otp), PublicKey).
+
+public_key(#'OTPSubjectPublicKeyInfo'{algorithm = #'PublicKeyAlgorithm'{algorithm = ?'id-ecPublicKey',
+ parameters = Params},
+ subjectPublicKey = Point}) ->
+ {Point, Params};
+public_key(#'OTPSubjectPublicKeyInfo'{algorithm = #'PublicKeyAlgorithm'{algorithm = ?'rsaEncryption'},
+ subjectPublicKey = Key}) ->
+ Key;
+public_key(#'OTPSubjectPublicKeyInfo'{algorithm = #'PublicKeyAlgorithm'{algorithm = ?'id-dsa',
+ parameters = {params, Params}},
+ subjectPublicKey = Key}) ->
+ {Key, Params}.
+
+other_issuer(OtpCert, CertDbHandle) ->
+ case public_key:pkix_issuer_id(OtpCert, other) of
+ {ok, IssuerId} ->
+ {other, IssuerId};
+ {error, issuer_not_found} ->
+ case find_issuer(OtpCert, CertDbHandle) of
+ {ok, IssuerId} ->
+ {other, IssuerId};
+ Other ->
+ Other
+ end
+ end.
+
+handle_path({BinCert, OTPCert}, Path, PartialChainHandler) ->
+ case public_key:pkix_is_self_signed(OTPCert) of
+ true ->
+ {BinCert, lists:delete(BinCert, Path)};
+ false ->
+ handle_incomplete_chain(Path, PartialChainHandler)
+ end.
+
+handle_incomplete_chain(Chain, Fun) ->
+ case catch Fun(Chain) of
+ {trusted_ca, DerCert} ->
+ new_trusteded_chain(DerCert, Chain);
+ unknown_ca = Error ->
+ {Error, Chain};
+ _ ->
+ {unknown_ca, Chain}
+ end.
+
+new_trusteded_chain(DerCert, [DerCert | Chain]) ->
+ {DerCert, Chain};
+new_trusteded_chain(DerCert, [_ | Rest]) ->
+ new_trusteded_chain(DerCert, Rest);
+new_trusteded_chain(_, []) ->
+ unknown_ca.
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index b2077c662a..bec0055353 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,10 +33,25 @@
-include_lib("public_key/include/public_key.hrl").
-export([security_parameters/2, security_parameters/3, suite_definition/1,
- decipher/5, cipher/5,
- suite/1, suites/1, ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
+ decipher/6, cipher/5, suite/1, suites/1, all_suites/1,
+ ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
openssl_suite/1, openssl_suite_name/1, filter/2, filter_suites/1,
- hash_algorithm/1, sign_algorithm/1, is_acceptable_hash/2]).
+ hash_algorithm/1, sign_algorithm/1, is_acceptable_hash/2, is_fallback/1]).
+
+-export_type([cipher_suite/0,
+ erl_cipher_suite/0, openssl_cipher_suite/0,
+ key_algo/0]).
+
+-type cipher() :: null |rc4_128 | idea_cbc | des40_cbc | des_cbc | '3des_ede_cbc'
+ | aes_128_cbc | aes_256_cbc.
+-type hash() :: null | sha | md5 | sha224 | sha256 | sha384 | sha512.
+-type key_algo() :: null | rsa | dhe_rsa | dhe_dss | ecdhe_ecdsa| ecdh_ecdsa | ecdh_rsa| srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | dh_anon | ecdh_anon | srp_anon.
+-type erl_cipher_suite() :: {key_algo(), cipher(), hash()}.
+-type int_cipher_suite() :: {key_algo(), cipher(), hash(), hash() | default_prf}.
+-type cipher_suite() :: binary().
+-type cipher_enum() :: integer().
+-type openssl_cipher_suite() :: string().
+
-compile(inline).
@@ -51,7 +66,7 @@ security_parameters(?TLS_NULL_WITH_NULL_NULL = CipherSuite, SecParams) ->
security_parameters(undefined, CipherSuite, SecParams).
%%--------------------------------------------------------------------
--spec security_parameters(tls_version() | undefined, cipher_suite(), #security_parameters{}) ->
+-spec security_parameters(ssl_record:ssl_version() | undefined, cipher_suite(), #security_parameters{}) ->
#security_parameters{}.
%%
%% Description: Returns a security parameters record where the
@@ -72,7 +87,7 @@ security_parameters(Version, CipherSuite, SecParams) ->
hash_size = hash_size(Hash)}.
%%--------------------------------------------------------------------
--spec cipher(cipher_enum(), #cipher_state{}, binary(), iolist(), tls_version()) ->
+-spec cipher(cipher_enum(), #cipher_state{}, binary(), iodata(), ssl_record:ssl_version()) ->
{binary(), #cipher_state{}}.
%%
%% Description: Encrypts the data and the MAC using chipher described
@@ -127,17 +142,18 @@ block_cipher(Fun, BlockSz, #cipher_state{key=Key, iv=IV} = CS0,
{T, CS0#cipher_state{iv=NextIV}}.
%%--------------------------------------------------------------------
--spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(), tls_version()) ->
+-spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(),
+ ssl_record:ssl_version(), boolean()) ->
{binary(), binary(), #cipher_state{}} | #alert{}.
%%
%% Description: Decrypts the data and the MAC using cipher described
%% by cipher_enum() and updating the cipher state.
%%-------------------------------------------------------------------
-decipher(?NULL, _HashSz, CipherState, Fragment, _) ->
+decipher(?NULL, _HashSz, CipherState, Fragment, _, _) ->
{Fragment, <<>>, CipherState};
-decipher(?RC4, HashSz, CipherState, Fragment, _) ->
+decipher(?RC4, HashSz, CipherState, Fragment, _, _) ->
State0 = case CipherState#cipher_state.state of
- undefined -> crypto:stream_init(rc4, CipherState#cipher_state.key);
+ undefined -> crypto:stream_init(rc4, CipherState#cipher_state.key);
S -> S
end,
try crypto:stream_decrypt(State0, Fragment) of
@@ -155,23 +171,23 @@ decipher(?RC4, HashSz, CipherState, Fragment, _) ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end;
-decipher(?DES, HashSz, CipherState, Fragment, Version) ->
+decipher(?DES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
block_decipher(fun(Key, IV, T) ->
crypto:block_decrypt(des_cbc, Key, IV, T)
- end, CipherState, HashSz, Fragment, Version);
-decipher(?'3DES', HashSz, CipherState, Fragment, Version) ->
+ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
+decipher(?'3DES', HashSz, CipherState, Fragment, Version, PaddingCheck) ->
block_decipher(fun(<<K1:8/binary, K2:8/binary, K3:8/binary>>, IV, T) ->
crypto:block_decrypt(des3_cbc, [K1, K2, K3], IV, T)
- end, CipherState, HashSz, Fragment, Version);
-decipher(?AES, HashSz, CipherState, Fragment, Version) ->
+ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
+decipher(?AES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
block_decipher(fun(Key, IV, T) when byte_size(Key) =:= 16 ->
crypto:block_decrypt(aes_cbc128, Key, IV, T);
(Key, IV, T) when byte_size(Key) =:= 32 ->
crypto:block_decrypt(aes_cbc256, Key, IV, T)
- end, CipherState, HashSz, Fragment, Version).
+ end, CipherState, HashSz, Fragment, Version, PaddingCheck).
block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
- HashSz, Fragment, Version) ->
+ HashSz, Fragment, Version, PaddingCheck) ->
try
Text = Fun(Key, IV, Fragment),
NextIV = next_iv(Fragment, IV),
@@ -179,7 +195,7 @@ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
Content = GBC#generic_block_cipher.content,
Mac = GBC#generic_block_cipher.mac,
CipherState1 = CipherState0#cipher_state{iv=GBC#generic_block_cipher.next_iv},
- case is_correct_padding(GBC, Version) of
+ case is_correct_padding(GBC, Version, PaddingCheck) of
true ->
{Content, Mac, CipherState1};
false ->
@@ -200,7 +216,7 @@ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
%%--------------------------------------------------------------------
--spec suites(tls_version()) -> [cipher_suite()].
+-spec suites(ssl_record:ssl_version()) -> [cipher_suite()].
%%
%% Description: Returns a list of supported cipher suites.
%%--------------------------------------------------------------------
@@ -209,6 +225,11 @@ suites({3, 0}) ->
suites({3, N}) ->
tls_v1:suites(N).
+all_suites(Version) ->
+ suites(Version)
+ ++ ssl_cipher:anonymous_suites()
+ ++ ssl_cipher:psk_suites(Version)
+ ++ ssl_cipher:srp_suites().
%%--------------------------------------------------------------------
-spec anonymous_suites() -> [cipher_suite()].
%%
@@ -229,7 +250,7 @@ anonymous_suites() ->
?TLS_ECDH_anon_WITH_AES_256_CBC_SHA].
%%--------------------------------------------------------------------
--spec psk_suites(tls_version() | integer()) -> [cipher_suite()].
+-spec psk_suites(ssl_record:ssl_version() | integer()) -> [cipher_suite()].
%%
%% Description: Returns a list of the PSK cipher suites, only supported
%% if explicitly set by user.
@@ -998,7 +1019,8 @@ openssl_suite_name(Cipher) ->
%%--------------------------------------------------------------------
-spec filter(undefined | binary(), [cipher_suite()]) -> [cipher_suite()].
%%
-%% Description: .
+%% Description: Select the cipher suites that can be used together with the
+%% supplied certificate. (Server side functionality)
%%-------------------------------------------------------------------
filter(undefined, Ciphers) ->
Ciphers;
@@ -1032,7 +1054,7 @@ filter(DerCert, Ciphers) ->
%%--------------------------------------------------------------------
-spec filter_suites([cipher_suite()]) -> [cipher_suite()].
%%
-%% Description: filter suites for algorithms
+%% Description: Filter suites for algorithms supported by crypto.
%%-------------------------------------------------------------------
filter_suites(Suites = [{_,_,_}|_]) ->
Algos = crypto:supports(),
@@ -1086,6 +1108,9 @@ is_acceptable_prf(default_prf, _) ->
is_acceptable_prf(Prf, Algos) ->
proplists:get_bool(Prf, Algos).
+is_fallback(CipherSuites)->
+ lists:member(?TLS_FALLBACK_SCSV, CipherSuites).
+
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
@@ -1266,16 +1291,18 @@ generic_stream_cipher_from_bin(T, HashSz) ->
#generic_stream_cipher{content=Content,
mac=Mac}.
-%% For interoperability reasons we do not check the padding content in
-%% SSL 3.0 and TLS 1.0 as it is not strictly required and breaks
-%% interopability with for instance Google.
is_correct_padding(#generic_block_cipher{padding_length = Len,
- padding = Padding}, {3, N})
- when N == 0; N == 1 ->
- Len == byte_size(Padding);
-%% Padding must be check in TLS 1.1 and after
+ padding = Padding}, {3, 0}, _) ->
+ Len == byte_size(Padding); %% Only length check is done in SSL 3.0 spec
+%% For interoperability reasons it is possible to disable
+%% the padding check when using TLS 1.0, as it is not strictly required
+%% in the spec (only recommended), howerver this makes TLS 1.0 vunrable to the Poodle attack
+%% so by default this clause will not match
+is_correct_padding(GenBlockCipher, {3, 1}, false) ->
+ is_correct_padding(GenBlockCipher, {3, 0}, false);
+%% Padding must be checked in TLS 1.1 and after
is_correct_padding(#generic_block_cipher{padding_length = Len,
- padding = Padding}, _) ->
+ padding = Padding}, _, _) ->
Len == byte_size(Padding) andalso
list_to_binary(lists:duplicate(Len, Len)) == Padding.
diff --git a/lib/ssl/src/ssl_cipher.hrl b/lib/ssl/src/ssl_cipher.hrl
index 62a5269def..3e50563f0a 100644
--- a/lib/ssl/src/ssl_cipher.hrl
+++ b/lib/ssl/src/ssl_cipher.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,16 +26,6 @@
-ifndef(ssl_cipher).
-define(ssl_cipher, true).
--type cipher() :: null |rc4_128 | idea_cbc | des40_cbc | des_cbc | '3des_ede_cbc'
- | aes_128_cbc | aes_256_cbc.
--type hash() :: null | sha | md5 | sha224 | sha256 | sha384 | sha512.
--type key_algo() :: null | rsa | dhe_rsa | dhe_dss | ecdhe_ecdsa| ecdh_ecdsa | ecdh_rsa| srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | dh_anon | ecdh_anon | srp_anon.
--type erl_cipher_suite() :: {key_algo(), cipher(), hash()}.
--type int_cipher_suite() :: {key_algo(), cipher(), hash(), hash() | default_prf}.
--type cipher_suite() :: binary().
--type cipher_enum() :: integer().
--type openssl_cipher_suite() :: string().
-
%%% SSL cipher protocol %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-define(CHANGE_CIPHER_SPEC_PROTO, 1). % _PROTO to not clash with
% SSL record protocol
@@ -365,6 +355,10 @@
%% hello extension data as they should.
-define(TLS_EMPTY_RENEGOTIATION_INFO_SCSV, <<?BYTE(16#00), ?BYTE(16#FF)>>).
+%% TLS Fallback Signaling Cipher Suite Value (SCSV) for Preventing Protocol
+%% Downgrade Attacks
+-define(TLS_FALLBACK_SCSV, <<?BYTE(16#56), ?BYTE(16#00)>>).
+
%%% PSK Cipher Suites RFC 4279
%% TLS_PSK_WITH_RC4_128_SHA = { 0x00, 0x8A };
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 82106935cb..b6059eac58 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,8 +36,8 @@
-include_lib("public_key/include/public_key.hrl").
%% Setup
--export([connect/8, ssl_accept/7, handshake/2,
- socket_control/4]).
+-export([connect/8, ssl_accept/7, handshake/2, handshake/3,
+ socket_control/4, socket_control/5]).
%% User Events
-export([send/2, recv/3, close/1, shutdown/2,
@@ -50,14 +50,18 @@
%% SSL FSM state functions
-export([hello/3, abbreviated/3, certify/3, cipher/3, connection/3]).
%% SSL all state functions
--export([handle_sync_event/4, handle_info/3, terminate/3]).
+-export([handle_sync_event/4, handle_info/3, terminate/3, format_status/2]).
+
%%====================================================================
%% Internal application API
%%====================================================================
%%--------------------------------------------------------------------
-spec connect(tls_connection | dtls_connection,
- host(), inet:port_number(), port(), {#ssl_options{}, #socket_options{}},
+ host(), inet:port_number(), port(),
+ {#ssl_options{}, #socket_options{},
+ %% Tracker only needed on server side
+ undefined},
pid(), tuple(), timeout()) ->
{ok, #sslsocket{}} | {error, reason()}.
%%
@@ -72,9 +76,10 @@ connect(Connection, Host, Port, Socket, Options, User, CbInfo, Timeout) ->
end.
%%--------------------------------------------------------------------
-spec ssl_accept(tls_connection | dtls_connection,
- inet:port_number(), port(), {#ssl_options{}, #socket_options{}},
- pid(), tuple(), timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
+ inet:port_number(), port(),
+ {#ssl_options{}, #socket_options{}, undefined | pid()},
+ pid(), tuple(), timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
@@ -99,6 +104,21 @@ handshake(#sslsocket{pid = Pid}, Timeout) ->
Error ->
Error
end.
+
+%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}, {#ssl_options{},#socket_options{}},
+ timeout()) -> ok | {error, reason()}.
+%%
+%% Description: Starts ssl handshake with some new options
+%%--------------------------------------------------------------------
+handshake(#sslsocket{pid = Pid}, SslOptions, Timeout) ->
+ case sync_send_all_state_event(Pid, {start, SslOptions, Timeout}) of
+ connected ->
+ ok;
+ Error ->
+ Error
+ end.
+
%--------------------------------------------------------------------
-spec socket_control(tls_connection | dtls_connection, port(), pid(), atom()) ->
{ok, #sslsocket{}} | {error, reason()}.
@@ -106,9 +126,16 @@ handshake(#sslsocket{pid = Pid}, Timeout) ->
%% Description: Set the ssl process to own the accept socket
%%--------------------------------------------------------------------
socket_control(Connection, Socket, Pid, Transport) ->
+ socket_control(Connection, Socket, Pid, Transport, undefined).
+
+%--------------------------------------------------------------------
+-spec socket_control(tls_connection | dtls_connection, port(), pid(), atom(), pid()| undefined) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+%%--------------------------------------------------------------------
+socket_control(Connection, Socket, Pid, Transport, ListenTracker) ->
case Transport:controlling_process(Socket, Pid) of
ok ->
- {ok, ssl_socket:socket(Pid, Transport, Socket, Connection)};
+ {ok, ssl_socket:socket(Pid, Transport, Socket, Connection, ListenTracker)};
{error, Reason} ->
{error, Reason}
end.
@@ -275,12 +302,11 @@ hello(#hello_request{}, #state{role = client} = State0, Connection) ->
{Record, State} = Connection:next_record(State0),
Connection:next_state(hello, hello, Record, State);
-hello({common_client_hello, Type, ServerHelloExt, HashSign},
- #state{session = #session{cipher_suite = CipherSuite},
- negotiated_version = Version} = State, Connection) ->
- {KeyAlg, _, _, _} = ssl_cipher:suite_definition(CipherSuite),
- NegotiatedHashSign = negotiated_hashsign(HashSign, KeyAlg, Version),
+hello({common_client_hello, Type, ServerHelloExt, NegotiatedHashSign},
+ State, Connection) ->
do_server_hello(Type, ServerHelloExt,
+ %% Note NegotiatedHashSign is only negotiated for real if
+ %% if TLS version is at least TLS-1.2
State#state{hashsign_algorithm = NegotiatedHashSign}, Connection);
hello(timeout, State, _) ->
@@ -301,6 +327,7 @@ abbreviated(#hello_request{}, State0, Connection) ->
abbreviated(#finished{verify_data = Data} = Finished,
#state{role = server,
negotiated_version = Version,
+ expecting_finished = true,
tls_handshake_history = Handshake,
session = #session{master_secret = MasterSecret},
connection_states = ConnectionStates0} =
@@ -313,7 +340,8 @@ abbreviated(#finished{verify_data = Data} = Finished,
ssl_record:set_client_verify_data(current_both, Data, ConnectionStates0),
Connection:next_state_connection(abbreviated,
ack_connection(
- State#state{connection_states = ConnectionStates}));
+ State#state{connection_states = ConnectionStates,
+ expecting_finished = false}));
#alert{} = Alert ->
Connection:handle_own_alert(Alert, Version, abbreviated, State)
end;
@@ -333,7 +361,7 @@ abbreviated(#finished{verify_data = Data} = Finished,
finalize_handshake(State0#state{connection_states = ConnectionStates1},
abbreviated, Connection),
Connection:next_state_connection(abbreviated,
- ack_connection(State));
+ ack_connection(State#state{expecting_finished = false}));
#alert{} = Alert ->
Connection:handle_own_alert(Alert, Version, abbreviated, State0)
end;
@@ -344,7 +372,7 @@ abbreviated(#next_protocol{selected_protocol = SelectedProtocol},
#state{role = server, expecting_next_protocol_negotiation = true} = State0,
Connection) ->
{Record, State} = Connection:next_record(State0#state{next_protocol = SelectedProtocol}),
- Connection:next_state(abbreviated, abbreviated, Record, State);
+ Connection:next_state(abbreviated, abbreviated, Record, State#state{expecting_next_protocol_negotiation = false});
abbreviated(timeout, State, _) ->
{next_state, abbreviated, State, hibernate };
@@ -386,7 +414,9 @@ certify(#certificate{} = Cert,
ssl_options = Opts} = State, Connection) ->
case ssl_handshake:certify(Cert, CertDbHandle, CertDbRef, Opts#ssl_options.depth,
Opts#ssl_options.verify,
- Opts#ssl_options.verify_fun, Role) of
+ Opts#ssl_options.verify_fun,
+ Opts#ssl_options.partial_chain,
+ Role) of
{PeerCert, PublicKeyInfo} ->
handle_peer_cert(Role, PeerCert, PublicKeyInfo,
State#state{client_certificate_requested = false}, Connection);
@@ -417,7 +447,8 @@ certify(#server_key_exchange{exchange_keys = Keys},
calculate_secret(Params#server_key_params.params,
State#state{hashsign_algorithm = HashSign}, Connection);
false ->
- ?ALERT_REC(?FATAL, ?DECRYPT_ERROR)
+ Connection:handle_own_alert(?ALERT_REC(?FATAL, ?DECRYPT_ERROR),
+ Version, certify, State)
end
end;
@@ -426,8 +457,9 @@ certify(#server_key_exchange{} = Msg,
Connection:handle_unexpected_message(Msg, certify_server_keyexchange, State);
certify(#certificate_request{hashsign_algorithms = HashSigns},
- #state{session = #session{own_certificate = Cert}} = State0, Connection) ->
- HashSign = ssl_handshake:select_hashsign(HashSigns, Cert),
+ #state{session = #session{own_certificate = Cert},
+ negotiated_version = Version} = State0, Connection) ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert, Version),
{Record, State} = Connection:next_record(State0#state{client_certificate_requested = true}),
Connection:next_state(certify, certify, Record,
State#state{cert_hashsign_algorithm = HashSign});
@@ -544,7 +576,7 @@ cipher(#certificate_verify{signature = Signature, hashsign_algorithm = CertHashS
tls_handshake_history = Handshake
} = State0, Connection) ->
- HashSign = ssl_handshake:select_cert_hashsign(CertHashSign, Algo, Version),
+ HashSign = ssl_handshake:select_hashsign_algs(CertHashSign, Algo, Version),
case ssl_handshake:certificate_verify(Signature, PublicKeyInfo,
Version, HashSign, MasterSecret, Handshake) of
valid ->
@@ -566,6 +598,7 @@ cipher(#finished{verify_data = Data} = Finished,
host = Host,
port = Port,
role = Role,
+ expecting_finished = true,
session = #session{master_secret = MasterSecret}
= Session0,
connection_states = ConnectionStates0,
@@ -576,7 +609,7 @@ cipher(#finished{verify_data = Data} = Finished,
MasterSecret, Handshake0) of
verified ->
Session = register_session(Role, Host, Port, Session0),
- cipher_role(Role, Data, Session, State, Connection);
+ cipher_role(Role, Data, Session, State#state{expecting_finished = false}, Connection);
#alert{} = Alert ->
Connection:handle_own_alert(Alert, Version, cipher, State)
end;
@@ -584,9 +617,10 @@ cipher(#finished{verify_data = Data} = Finished,
%% only allowed to send next_protocol message after change cipher spec
%% & before finished message and it is not allowed during renegotiation
cipher(#next_protocol{selected_protocol = SelectedProtocol},
- #state{role = server, expecting_next_protocol_negotiation = true} = State0, Connection) ->
+ #state{role = server, expecting_next_protocol_negotiation = true,
+ expecting_finished = true} = State0, Connection) ->
{Record, State} = Connection:next_record(State0#state{next_protocol = SelectedProtocol}),
- Connection:next_state(cipher, cipher, Record, State);
+ Connection:next_state(cipher, cipher, Record, State#state{expecting_next_protocol_negotiation = false});
cipher(timeout, State, _) ->
{next_state, cipher, State, hibernate};
@@ -626,12 +660,27 @@ handle_sync_event({application_data, Data}, From, StateName,
State#state{send_queue = queue:in({From, Data}, Queue)},
get_timeout(State)};
-handle_sync_event({start, Timeout}, StartFrom, hello, #state{protocol_cb = Connection} = State) ->
- Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
- Connection:hello(start, State#state{start_or_recv_from = StartFrom,
- timer = Timer});
+handle_sync_event({start, Timeout}, StartFrom, hello, #state{role = Role,
+ protocol_cb = Connection,
+ ssl_options = SSLOpts} = State0) ->
+ try
+ State = ssl_config(SSLOpts, Role, State0),
+ Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
+ Connection:hello(start, State#state{start_or_recv_from = StartFrom,
+ timer = Timer})
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State0}
+ end;
-%% The two clauses below could happen if a server upgrades a socket in
+handle_sync_event({start, {Opts, EmOpts}, Timeout}, From, StateName, State) ->
+ try
+ handle_sync_event({start, Timeout}, From, StateName, State#state{socket_options = EmOpts,
+ ssl_options = Opts})
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State}
+ end;
+
+%% These two clauses below could happen if a server upgrades a socket in
%% active mode. Note that in this case we are lucky that
%% controlling_process has been evalueated before receiving handshake
%% messages from client. The server should put the socket in passive
@@ -641,13 +690,16 @@ handle_sync_event({start, Timeout}, StartFrom, hello, #state{protocol_cb = Conne
%% they upgrade an active socket.
handle_sync_event({start,_}, _, connection, State) ->
{reply, connected, connection, State, get_timeout(State)};
-handle_sync_event({start,_}, _From, error, {Error, State = #state{}}) ->
- {stop, {shutdown, Error}, {error, Error}, State};
-handle_sync_event({start, Timeout}, StartFrom, StateName, State) ->
- Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
- {next_state, StateName, State#state{start_or_recv_from = StartFrom,
- timer = Timer}, get_timeout(State)};
+handle_sync_event({start, Timeout}, StartFrom, StateName, #state{role = Role, ssl_options = SslOpts} = State0) ->
+ try
+ State = ssl_config(SslOpts, Role, State0),
+ Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
+ {next_state, StateName, State#state{start_or_recv_from = StartFrom,
+ timer = Timer}, get_timeout(State)}
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State0}
+ end;
handle_sync_event(close, _, StateName, #state{protocol_cb = Connection} = State) ->
%% Run terminate before returning
@@ -655,7 +707,6 @@ handle_sync_event(close, _, StateName, #state{protocol_cb = Connection} = State)
%% as intended.
(catch Connection:terminate(user_close, StateName, State)),
{stop, normal, ok, State#state{terminated = true}};
-
handle_sync_event({shutdown, How0}, _, StateName,
#state{transport_cb = Transport,
negotiated_version = Version,
@@ -677,13 +728,14 @@ handle_sync_event({shutdown, How0}, _, StateName,
Error ->
{stop, normal, Error, State}
end;
-
+handle_sync_event({recv, _N, _Timeout}, _RecvFrom, StateName,
+ #state{socket_options = #socket_options{active = Active}} = State) when Active =/= false ->
+ {reply, {error, einval}, StateName, State, get_timeout(State)};
handle_sync_event({recv, N, Timeout}, RecvFrom, connection = StateName,
#state{protocol_cb = Connection} = State0) ->
Timer = start_or_recv_cancel_timer(Timeout, RecvFrom),
Connection:passive_receive(State0#state{bytes_to_read = N,
start_or_recv_from = RecvFrom, timer = Timer}, StateName);
-
%% Doing renegotiate wait with handling request until renegotiate is
%% finished. Will be handled by next_state_is_connection/2.
handle_sync_event({recv, N, Timeout}, RecvFrom, StateName, State) ->
@@ -691,26 +743,22 @@ handle_sync_event({recv, N, Timeout}, RecvFrom, StateName, State) ->
{next_state, StateName, State#state{bytes_to_read = N, start_or_recv_from = RecvFrom,
timer = Timer},
get_timeout(State)};
-
handle_sync_event({new_user, User}, _From, StateName,
State =#state{user_application = {OldMon, _}}) ->
NewMon = erlang:monitor(process, User),
erlang:demonitor(OldMon, [flush]),
{reply, ok, StateName, State#state{user_application = {NewMon,User}},
get_timeout(State)};
-
handle_sync_event({get_opts, OptTags}, _From, StateName,
#state{socket = Socket,
transport_cb = Transport,
socket_options = SockOpts} = State) ->
OptsReply = get_socket_opts(Transport, Socket, OptTags, SockOpts, []),
{reply, OptsReply, StateName, State, get_timeout(State)};
-
handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protocol = undefined} = State) ->
{reply, {error, next_protocol_not_negotiated}, StateName, State, get_timeout(State)};
handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protocol = NextProtocol} = State) ->
{reply, {ok, NextProtocol}, StateName, State, get_timeout(State)};
-
handle_sync_event({set_opts, Opts0}, _From, StateName0,
#state{socket_options = Opts1,
protocol_cb = Connection,
@@ -749,13 +797,10 @@ handle_sync_event({set_opts, Opts0}, _From, StateName0,
end
end
end;
-
handle_sync_event(renegotiate, From, connection, #state{protocol_cb = Connection} = State) ->
Connection:renegotiate(State#state{renegotiation = {true, From}});
-
handle_sync_event(renegotiate, _, StateName, State) ->
{reply, {error, already_renegotiating}, StateName, State, get_timeout(State)};
-
handle_sync_event({prf, Secret, Label, Seed, WantedLength}, _, StateName,
#state{connection_states = ConnectionStates,
negotiated_version = Version} = State) ->
@@ -781,7 +826,6 @@ handle_sync_event({prf, Secret, Label, Seed, WantedLength}, _, StateName,
error:Reason -> {error, Reason}
end,
{reply, Reply, StateName, State, get_timeout(State)};
-
handle_sync_event(info, _, StateName,
#state{negotiated_version = Version,
session = #session{cipher_suite = Suite}} = State) ->
@@ -789,14 +833,12 @@ handle_sync_event(info, _, StateName,
AtomVersion = tls_record:protocol_version(Version),
{reply, {ok, {AtomVersion, ssl:suite_definition(Suite)}},
StateName, State, get_timeout(State)};
-
handle_sync_event(session_info, _, StateName,
#state{session = #session{session_id = Id,
cipher_suite = Suite}} = State) ->
{reply, [{session_id, Id},
{cipher_suite, ssl:suite_definition(Suite)}],
StateName, State, get_timeout(State)};
-
handle_sync_event(peer_certificate, _, StateName,
#state{session = #session{peer_certificate = Cert}}
= State) ->
@@ -806,8 +848,9 @@ handle_info({ErrorTag, Socket, econnaborted}, StateName,
#state{socket = Socket, transport_cb = Transport,
start_or_recv_from = StartFrom, role = Role,
protocol_cb = Connection,
- error_tag = ErrorTag} = State) when StateName =/= connection ->
- Connection:alert_user(Transport, Socket, StartFrom, ?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), Role),
+ error_tag = ErrorTag,
+ tracker = Tracker} = State) when StateName =/= connection ->
+ Connection:alert_user(Transport, Tracker,Socket, StartFrom, ?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), Role),
{stop, normal, State};
handle_info({ErrorTag, Socket, Reason}, StateName, #state{socket = Socket,
@@ -857,7 +900,6 @@ terminate(_, _, #state{terminated = true}) ->
%% we want to guarantee that Transport:close has been called
%% when ssl:close/1 returns.
ok;
-
terminate({shutdown, transport_closed}, StateName, #state{send_queue = SendQueue,
renegotiation = Renegotiate} = State) ->
handle_unrecv_data(StateName, State),
@@ -870,7 +912,6 @@ terminate({shutdown, own_alert}, _StateName, #state{send_queue = SendQueue,
handle_trusted_certs_db(State),
notify_senders(SendQueue),
notify_renegotiater(Renegotiate);
-
terminate(Reason, connection, #state{negotiated_version = Version,
protocol_cb = Connection,
connection_states = ConnectionStates,
@@ -887,7 +928,6 @@ terminate(Reason, connection, #state{negotiated_version = Version,
_ ->
ok
end;
-
terminate(_Reason, _StateName, #state{transport_cb = Transport,
socket = Socket, send_queue = SendQueue,
renegotiation = Renegotiate} = State) ->
@@ -896,9 +936,50 @@ terminate(_Reason, _StateName, #state{transport_cb = Transport,
notify_renegotiater(Renegotiate),
Transport:close(Socket).
+format_status(normal, [_, State]) ->
+ [{data, [{"StateData", State}]}];
+format_status(terminate, [_, State]) ->
+ SslOptions = (State#state.ssl_options),
+ NewOptions = SslOptions#ssl_options{password = ?SECRET_PRINTOUT,
+ cert = ?SECRET_PRINTOUT,
+ cacerts = ?SECRET_PRINTOUT,
+ key = ?SECRET_PRINTOUT,
+ dh = ?SECRET_PRINTOUT,
+ psk_identity = ?SECRET_PRINTOUT,
+ srp_identity = ?SECRET_PRINTOUT},
+ [{data, [{"StateData", State#state{connection_states = ?SECRET_PRINTOUT,
+ protocol_buffers = ?SECRET_PRINTOUT,
+ user_data_buffer = ?SECRET_PRINTOUT,
+ tls_handshake_history = ?SECRET_PRINTOUT,
+ session = ?SECRET_PRINTOUT,
+ private_key = ?SECRET_PRINTOUT,
+ diffie_hellman_params = ?SECRET_PRINTOUT,
+ diffie_hellman_keys = ?SECRET_PRINTOUT,
+ srp_params = ?SECRET_PRINTOUT,
+ srp_keys = ?SECRET_PRINTOUT,
+ premaster_secret = ?SECRET_PRINTOUT,
+ ssl_options = NewOptions
+ }}]}].
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+ssl_config(Opts, Role, State) ->
+ {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} =
+ ssl_config:init(Opts, Role),
+ Handshake = ssl_handshake:init_handshake_history(),
+ TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
+ Session = State#state.session,
+ State#state{tls_handshake_history = Handshake,
+ session = Session#session{own_certificate = OwnCert,
+ time_stamp = TimeStamp},
+ file_ref_db = FileRefHandle,
+ cert_db_ref = Ref,
+ cert_db = CertDbHandle,
+ session_cache = CacheHandle,
+ private_key = Key,
+ diffie_hellman_params = DHParams,
+ ssl_options = Opts}.
+
do_server_hello(Type, #hello_extensions{next_protocol_negotiation = NextProtocols} =
ServerHelloExt,
#state{negotiated_version = Version,
@@ -964,9 +1045,6 @@ server_hello_done(State, Connection) ->
HelloDone = ssl_handshake:server_hello_done(),
Connection:send_handshake(HelloDone, State).
-
-
-
handle_peer_cert(Role, PeerCert, PublicKeyInfo,
#state{session = #session{cipher_suite = CipherSuite} = Session} = State0,
Connection) ->
@@ -1540,60 +1618,6 @@ cipher_role(server, Data, Session, #state{connection_states = ConnectionStates0
session = Session}, cipher, Connection),
Connection:next_state_connection(cipher, ack_connection(State#state{session = Session})).
-negotiated_hashsign(undefined, Algo, Version) ->
- default_hashsign(Version, Algo);
-negotiated_hashsign(HashSign = {_, _}, _, _) ->
- HashSign.
-
-%% RFC 5246, Sect. 7.4.1.4.1. Signature Algorithms
-%% If the client does not send the signature_algorithms extension, the
-%% server MUST do the following:
-%%
-%% - If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
-%% DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had
-%% sent the value {sha1,rsa}.
-%%
-%% - If the negotiated key exchange algorithm is one of (DHE_DSS,
-%% DH_DSS), behave as if the client had sent the value {sha1,dsa}.
-%%
-%% - If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
-%% ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}.
-
-default_hashsign(_Version = {Major, Minor}, KeyExchange)
- when Major >= 3 andalso Minor >= 3 andalso
- (KeyExchange == rsa orelse
- KeyExchange == dhe_rsa orelse
- KeyExchange == dh_rsa orelse
- KeyExchange == ecdhe_rsa orelse
- KeyExchange == ecdh_rsa orelse
- KeyExchange == srp_rsa) ->
- {sha, rsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == rsa;
- KeyExchange == dhe_rsa;
- KeyExchange == dh_rsa;
- KeyExchange == ecdhe_rsa;
- KeyExchange == ecdh_rsa;
- KeyExchange == srp_rsa ->
- {md5sha, rsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == ecdhe_ecdsa;
- KeyExchange == ecdh_ecdsa ->
- {sha, ecdsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == dhe_dss;
- KeyExchange == dh_dss;
- KeyExchange == srp_dss ->
- {sha, dsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == dh_anon;
- KeyExchange == ecdh_anon;
- KeyExchange == psk;
- KeyExchange == dhe_psk;
- KeyExchange == rsa_psk;
- KeyExchange == srp_anon ->
- {null, anon}.
-
select_curve(#state{client_ecc = {[Curve|_], _}}) ->
{namedCurve, Curve};
select_curve(_) ->
@@ -1757,12 +1781,12 @@ handle_unrecv_data(StateName, #state{socket = Socket, transport_cb = Transport,
Connection:handle_close_alert(Data, StateName, State)
end.
-handle_trusted_certs_db(#state{ssl_options = #ssl_options{cacertfile = <<>>}}) ->
+handle_trusted_certs_db(#state{ssl_options = #ssl_options{cacertfile = <<>>, cacerts = []}}) ->
%% No trusted certs specified
ok;
handle_trusted_certs_db(#state{cert_db_ref = Ref,
cert_db = CertDb,
- ssl_options = #ssl_options{cacertfile = undefined}}) ->
+ ssl_options = #ssl_options{cacertfile = <<>>}}) ->
%% Certs provided as DER directly can not be shared
%% with other connections and it is safe to delete them when the connection ends.
ssl_pkix_db:remove_trusted_certs(Ref, CertDb);
@@ -1854,3 +1878,15 @@ make_premaster_secret({MajVer, MinVer}, rsa) ->
<<?BYTE(MajVer), ?BYTE(MinVer), Rand/binary>>;
make_premaster_secret(_, _) ->
undefined.
+
+negotiated_hashsign(undefined, Alg, Version) ->
+ %% Not negotiated choose default
+ case is_anonymous(Alg) of
+ true ->
+ {null, anon};
+ false ->
+ ssl_handshake:select_hashsign_algs(Alg, Version)
+ end;
+negotiated_hashsign(HashSign = {_, _}, _, _) ->
+ HashSign.
+
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index 27489ca325..b9a1ef3a84 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,44 +41,46 @@
data_tag :: atom(), % ex tcp.
close_tag :: atom(), % ex tcp_closed
error_tag :: atom(), % ex tcp_error
- host :: string() | inet:ipaddress(),
+ host :: string() | inet:ip_address(),
port :: integer(),
socket :: port(),
ssl_options :: #ssl_options{},
socket_options :: #socket_options{},
- connection_states :: #connection_states{},
- protocol_buffers :: term(), %% #protocol_buffers{} from tls_record.hrl or dtls_recor.hrl
- tls_handshake_history ::tls_handshake_history(),
+ connection_states :: #connection_states{} | secret_printout(),
+ protocol_buffers :: term() | secret_printout() , %% #protocol_buffers{} from tls_record.hrl or dtls_recor.hrl
+ tls_handshake_history :: ssl_handshake:ssl_handshake_history() | secret_printout(),
cert_db :: reference(),
- session :: #session{},
+ session :: #session{} | secret_printout(),
session_cache :: db_handle(),
session_cache_cb :: atom(),
- negotiated_version :: tls_version(),
+ negotiated_version :: ssl_record:ssl_version(),
client_certificate_requested = false :: boolean(),
- key_algorithm :: key_algo(),
+ key_algorithm :: ssl_cipher:key_algo(),
hashsign_algorithm = {undefined, undefined},
cert_hashsign_algorithm,
- public_key_info ::public_key_info(),
- private_key ::public_key:private_key(),
- diffie_hellman_params, % PKIX: #'DHParameter'{} relevant for server side
- diffie_hellman_keys, % {PublicKey, PrivateKey}
+ public_key_info :: ssl_handshake:public_key_info(),
+ private_key :: public_key:private_key() | secret_printout(),
+ diffie_hellman_params:: #'DHParameter'{} | undefined | secret_printout(),
+ diffie_hellman_keys :: {PublicKey :: binary(), PrivateKey :: binary()} | #'ECPrivateKey'{} | undefined | secret_printout(),
psk_identity :: binary(), % server psk identity hint
- srp_params :: #srp_user{},
- srp_keys ::{PublicKey :: binary(), PrivateKey :: binary()},
- premaster_secret :: binary(),
+ srp_params :: #srp_user{} | secret_printout(),
+ srp_keys ::{PublicKey :: binary(), PrivateKey :: binary()} | secret_printout(),
+ premaster_secret :: binary() | secret_printout() ,
file_ref_db :: db_handle(),
cert_db_ref :: certdb_ref(),
bytes_to_read :: undefined | integer(), %% bytes to read in passive mode
- user_data_buffer :: undefined | binary(),
+ user_data_buffer :: undefined | binary() | secret_printout(),
renegotiation :: undefined | {boolean(), From::term() | internal | peer},
start_or_recv_from :: term(),
timer :: undefined | reference(), % start_or_recive_timer
- send_queue :: queue(),
+ send_queue :: queue:queue(),
terminated = false ::boolean(),
allow_renegotiate = true ::boolean(),
expecting_next_protocol_negotiation = false ::boolean(),
+ expecting_finished = false ::boolean(),
next_protocol = undefined :: undefined | binary(),
- client_ecc % {Curves, PointFmt}
+ client_ecc, % {Curves, PointFmt}
+ tracker :: pid() %% Tracker process for listen socket
}).
-define(DEFAULT_DIFFIE_HELLMAN_PARAMS,
diff --git a/lib/ssl/src/ssl_dist_sup.erl b/lib/ssl/src/ssl_dist_sup.erl
index 22614a2d34..58efeaf892 100644
--- a/lib/ssl/src/ssl_dist_sup.erl
+++ b/lib/ssl/src/ssl_dist_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,9 +45,11 @@ start_link() ->
init([]) ->
SessionCertManager = session_and_cert_manager_child_spec(),
ConnetionManager = connection_manager_child_spec(),
+ ListenOptionsTracker = listen_options_tracker_child_spec(),
ProxyServer = proxy_server_child_spec(),
- {ok, {{one_for_all, 10, 3600}, [SessionCertManager, ConnetionManager,
+ {ok, {{one_for_all, 10, 3600}, [SessionCertManager, ConnetionManager,
+ ListenOptionsTracker,
ProxyServer]}}.
%%--------------------------------------------------------------------
@@ -68,7 +70,7 @@ connection_manager_child_spec() ->
StartFunc = {tls_connection_sup, start_link_dist, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [ssl_connection],
+ Modules = [tls_connection_sup],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
@@ -81,3 +83,11 @@ proxy_server_child_spec() ->
Type = worker,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
+listen_options_tracker_child_spec() ->
+ Name = ssl_socket_dist,
+ StartFunc = {ssl_listen_tracker_sup, start_link_dist, []},
+ Restart = permanent,
+ Shutdown = 4000,
+ Modules = [ssl_socket],
+ Type = supervisor,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 2b9bae6e80..29b64f7a81 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,13 +31,25 @@
-include("ssl_srp.hrl").
-include_lib("public_key/include/public_key.hrl").
+-export_type([ssl_handshake/0, ssl_handshake_history/0,
+ public_key_info/0, oid/0]).
+
+-type oid() :: tuple().
+-type public_key_params() :: #'Dss-Parms'{} | {namedCurve, oid()} | #'ECParameters'{} | term().
+-type public_key_info() :: {oid(), #'RSAPublicKey'{} | integer() | #'ECPoint'{}, public_key_params()}.
+-type ssl_handshake_history() :: {[binary()], [binary()]}.
+
+-type ssl_handshake() :: #server_hello{} | #server_hello_done{} | #certificate{} | #certificate_request{} |
+ #client_key_exchange{} | #finished{} | #certificate_verify{} |
+ #hello_request{} | #next_protocol{}.
+
%% Handshake messages
-export([hello_request/0, server_hello/4, server_hello_done/0,
certificate/4, certificate_request/4, key_exchange/3,
finished/5, next_protocol/1]).
%% Handle handshake messages
--export([certify/7, client_certificate_verify/6, certificate_verify/6, verify_signature/5,
+-export([certify/8, client_certificate_verify/6, certificate_verify/6, verify_signature/5,
master_secret/5, server_key_exchange_hash/2, verify_connection/6,
init_handshake_history/0, update_handshake_history/2, verify_server_key/5
]).
@@ -61,7 +73,8 @@
]).
%% MISC
--export([select_version/3, prf/5, select_hashsign/2, select_cert_hashsign/3,
+-export([select_version/3, prf/5, select_hashsign/3,
+ select_hashsign_algs/2, select_hashsign_algs/3,
premaster_secret/2, premaster_secret/3, premaster_secret/4]).
%%====================================================================
@@ -80,7 +93,7 @@ hello_request() ->
#hello_request{}.
%%--------------------------------------------------------------------
--spec server_hello(#session{}, tls_version(), #connection_states{},
+-spec server_hello(#session{}, ssl_record:ssl_version(), #connection_states{},
#hello_extensions{}) -> #server_hello{}.
%%
%% Description: Creates a server hello message.
@@ -164,8 +177,8 @@ next_protocol(SelectedProtocol) ->
%%--------------------------------------------------------------------
-spec client_certificate_verify(undefined | der_cert(), binary(),
- tls_version(), term(), private_key(),
- tls_handshake_history()) ->
+ ssl_record:ssl_version(), term(), public_key:private_key(),
+ ssl_handshake_history()) ->
#certificate_verify{} | ignore | #alert{}.
%%
%% Description: Creates a certificate_verify message, called by the client.
@@ -188,13 +201,13 @@ client_certificate_verify(OwnCert, MasterSecret, Version,
end.
%%--------------------------------------------------------------------
--spec certificate_request(erl_cipher_suite(), db_handle(), certdb_ref(), tls_version()) ->
+-spec certificate_request(ssl_cipher:cipher_suite(), db_handle(), certdb_ref(), ssl_record:ssl_version()) ->
#certificate_request{}.
%%
%% Description: Creates a certificate_request message, called by the server.
%%--------------------------------------------------------------------
certificate_request(CipherSuite, CertDbHandle, CertDbRef, Version) ->
- Types = certificate_types(CipherSuite),
+ Types = certificate_types(ssl_cipher:suite_definition(CipherSuite), Version),
HashSigns = advertised_hash_signs(Version),
Authorities = certificate_authorities(CertDbHandle, CertDbRef),
#certificate_request{
@@ -203,16 +216,16 @@ certificate_request(CipherSuite, CertDbHandle, CertDbRef, Version) ->
certificate_authorities = Authorities
}.
%%--------------------------------------------------------------------
--spec key_exchange(client | server, tls_version(),
+-spec key_exchange(client | server, ssl_record:ssl_version(),
{premaster_secret, binary(), public_key_info()} |
{dh, binary()} |
{dh, {binary(), binary()}, #'DHParameter'{}, {HashAlgo::atom(), SignAlgo::atom()},
- binary(), binary(), private_key()} |
+ binary(), binary(), public_key:private_key()} |
{ecdh, #'ECPrivateKey'{}} |
{psk, binary()} |
{dhe_psk, binary(), binary()} |
{srp, {binary(), binary()}, #srp_user{}, {HashAlgo::atom(), SignAlgo::atom()},
- binary(), binary(), private_key()}) ->
+ binary(), binary(), public_key:private_key()}) ->
#client_key_exchange{} | #server_key_exchange{}.
%%
@@ -304,7 +317,7 @@ key_exchange(server, Version, {srp, {PublicKey, _},
ClientRandom, ServerRandom, PrivateKey).
%%--------------------------------------------------------------------
--spec finished(tls_version(), client | server, integer(), binary(), tls_handshake_history()) ->
+-spec finished(ssl_record:ssl_version(), client | server, integer(), binary(), ssl_handshake_history()) ->
#finished{}.
%%
%% Description: Creates a handshake finished message
@@ -315,8 +328,7 @@ finished(Version, Role, PrfAlgo, MasterSecret, {Handshake, _}) -> % use the curr
%% ---------- Handle handshake messages ----------
-verify_server_key(#server_key_params{params = Params,
- params_bin = EncParams,
+verify_server_key(#server_key_params{params_bin = EncParams,
signature = Signature},
HashSign = {HashAlgo, _},
ConnectionStates, Version, PubKeyInfo) ->
@@ -332,8 +344,8 @@ verify_server_key(#server_key_params{params = Params,
verify_signature(Version, Hash, HashSign, Signature, PubKeyInfo).
%%--------------------------------------------------------------------
--spec certificate_verify(binary(), public_key_info(), tls_version(), term(),
- binary(), tls_handshake_history()) -> valid | #alert{}.
+-spec certificate_verify(binary(), public_key_info(), ssl_record:ssl_version(), term(),
+ binary(), ssl_handshake_history()) -> valid | #alert{}.
%%
%% Description: Checks that the certificate_verify message is valid.
%%--------------------------------------------------------------------
@@ -347,7 +359,7 @@ certificate_verify(Signature, PublicKeyInfo, Version,
?ALERT_REC(?FATAL, ?BAD_CERTIFICATE)
end.
%%--------------------------------------------------------------------
--spec verify_signature(tls_version(), binary(), {term(), term()}, binary(),
+-spec verify_signature(ssl_record:ssl_version(), binary(), {term(), term()}, binary(),
public_key_info()) -> true | false.
%%
%% Description: Checks that a public_key signature is valid.
@@ -371,13 +383,13 @@ verify_signature(_Version, Hash, {HashAlgo, ecdsa}, Signature,
%%--------------------------------------------------------------------
-spec certify(#certificate{}, db_handle(), certdb_ref(), integer() | nolimit,
- verify_peer | verify_none, {fun(), term},
+ verify_peer | verify_none, {fun(), term}, fun(),
client | server) -> {der_cert(), public_key_info()} | #alert{}.
%%
%% Description: Handles a certificate handshake message
%%--------------------------------------------------------------------
certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef,
- MaxPathLen, _Verify, VerifyFunAndState, Role) ->
+ MaxPathLen, _Verify, VerifyFunAndState, PartialChain, Role) ->
[PeerCert | _] = ASN1Certs,
ValidationFunAndState =
@@ -409,7 +421,7 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef,
try
{TrustedErlCert, CertPath} =
- ssl_certificate:trusted_cert_and_path(ASN1Certs, CertDbHandle, CertDbRef),
+ ssl_certificate:trusted_cert_and_path(ASN1Certs, CertDbHandle, CertDbRef, PartialChain),
case public_key:pkix_path_validation(TrustedErlCert,
CertPath,
[{max_path_length,
@@ -427,8 +439,8 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef,
end.
%%--------------------------------------------------------------------
--spec verify_connection(tls_version(), #finished{}, client | server, integer(), binary(),
- tls_handshake_history()) -> verified | #alert{}.
+-spec verify_connection(ssl_record:ssl_version(), #finished{}, client | server, integer(), binary(),
+ ssl_handshake_history()) -> verified | #alert{}.
%%
%% Description: Checks the ssl handshake finished message to verify
%% the connection.
@@ -444,7 +456,7 @@ verify_connection(Version, #finished{verify_data = Data},
end.
%%--------------------------------------------------------------------
--spec init_handshake_history() -> tls_handshake_history().
+-spec init_handshake_history() -> ssl_handshake_history().
%%
%% Description: Initialize the empty handshake history buffer.
@@ -453,8 +465,8 @@ init_handshake_history() ->
{[], []}.
%%--------------------------------------------------------------------
--spec update_handshake_history(tls_handshake_history(), Data ::term()) ->
- tls_handshake_history().
+-spec update_handshake_history(ssl_handshake:ssl_handshake_history(), Data ::term()) ->
+ ssl_handshake:ssl_handshake_history().
%%
%% Description: Update the handshake history buffer with Data.
%%--------------------------------------------------------------------
@@ -488,19 +500,27 @@ update_handshake_history({Handshake0, _Prev}, Data) ->
%% end.
premaster_secret(OtherPublicDhKey, MyPrivateKey, #'DHParameter'{} = Params) ->
- public_key:compute_key(OtherPublicDhKey, MyPrivateKey, Params);
-
+ try
+ public_key:compute_key(OtherPublicDhKey, MyPrivateKey, Params)
+ catch
+ error:computation_failed ->
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
+ end;
premaster_secret(PublicDhKey, PrivateDhKey, #server_dh_params{dh_p = Prime, dh_g = Base}) ->
- crypto:compute_key(dh, PublicDhKey, PrivateDhKey, [Prime, Base]);
+ try
+ crypto:compute_key(dh, PublicDhKey, PrivateDhKey, [Prime, Base])
+ catch
+ error:computation_failed ->
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
+ end;
premaster_secret(#client_srp_public{srp_a = ClientPublicKey}, ServerKey, #srp_user{prime = Prime,
verifier = Verifier}) ->
case crypto:compute_key(srp, ClientPublicKey, ServerKey, {host, [Verifier, Prime, '6a']}) of
error ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER));
PremasterSecret ->
PremasterSecret
end;
-
premaster_secret(#server_srp_params{srp_n = Prime, srp_g = Generator, srp_s = Salt, srp_b = Public},
ClientKeys, {Username, Password}) ->
case ssl_srp_primes:check_srp_params(Generator, Prime) of
@@ -508,21 +528,19 @@ premaster_secret(#server_srp_params{srp_n = Prime, srp_g = Generator, srp_s = Sa
DerivedKey = crypto:hash(sha, [Salt, crypto:hash(sha, [Username, <<$:>>, Password])]),
case crypto:compute_key(srp, Public, ClientKeys, {user, [DerivedKey, Prime, Generator, '6a']}) of
error ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER));
PremasterSecret ->
PremasterSecret
end;
_ ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER)
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
end;
-
premaster_secret(#client_rsa_psk_identity{
identity = PSKIdentity,
exchange_keys = #encrypted_premaster_secret{premaster_secret = EncPMS}
}, #'RSAPrivateKey'{} = Key, PSKLookup) ->
PremasterSecret = premaster_secret(EncPMS, Key),
psk_secret(PSKIdentity, PSKLookup, PremasterSecret);
-
premaster_secret(#server_dhe_psk_params{
hint = IdentityHint,
dh_params = #server_dh_params{dh_y = PublicDhKey} = Params},
@@ -530,7 +548,6 @@ premaster_secret(#server_dhe_psk_params{
LookupFun) ->
PremasterSecret = premaster_secret(PublicDhKey, PrivateDhKey, Params),
psk_secret(IdentityHint, LookupFun, PremasterSecret);
-
premaster_secret({rsa_psk, PSKIdentity}, PSKLookup, RSAPremasterSecret) ->
psk_secret(PSKIdentity, PSKLookup, RSAPremasterSecret).
@@ -539,13 +556,10 @@ premaster_secret(#client_dhe_psk_identity{
dh_public = PublicDhKey}, PrivateKey, #'DHParameter'{} = Params, PSKLookup) ->
PremasterSecret = premaster_secret(PublicDhKey, PrivateKey, Params),
psk_secret(PSKIdentity, PSKLookup, PremasterSecret).
-
premaster_secret(#client_psk_identity{identity = PSKIdentity}, PSKLookup) ->
psk_secret(PSKIdentity, PSKLookup);
-
premaster_secret({psk, PSKIdentity}, PSKLookup) ->
psk_secret(PSKIdentity, PSKLookup);
-
premaster_secret(#'ECPoint'{} = ECPoint, #'ECPrivateKey'{} = ECDHKeys) ->
public_key:compute_key(ECPoint, ECDHKeys);
premaster_secret(EncSecret, #'RSAPrivateKey'{} = RSAPrivateKey) ->
@@ -568,7 +582,7 @@ server_key_exchange_hash(md5sha, Value) ->
server_key_exchange_hash(Hash, Value) ->
crypto:hash(Hash, Value).
%%--------------------------------------------------------------------
--spec prf(tls_version(), binary(), binary(), [binary()], non_neg_integer()) ->
+-spec prf(ssl_record:ssl_version(), binary(), binary(), [binary()], non_neg_integer()) ->
{ok, binary()} | {error, undefined}.
%%
%% Description: use the TLS PRF to generate key material
@@ -579,23 +593,25 @@ prf({3,1}, Secret, Label, Seed, WantedLength) ->
{ok, tls_v1:prf(?MD5SHA, Secret, Label, Seed, WantedLength)};
prf({3,_N}, Secret, Label, Seed, WantedLength) ->
{ok, tls_v1:prf(?SHA256, Secret, Label, Seed, WantedLength)}.
+
+
%%--------------------------------------------------------------------
--spec select_hashsign(#hash_sign_algos{}| undefined, undefined | binary()) ->
- [{atom(), atom()}] | undefined.
+-spec select_hashsign(#hash_sign_algos{}| undefined, undefined | binary(), ssl_record:ssl_version()) ->
+ {atom(), atom()} | undefined.
%%
%% Description:
%%--------------------------------------------------------------------
-select_hashsign(_, undefined) ->
+select_hashsign(_, undefined, _Version) ->
{null, anon};
-select_hashsign(undefined, Cert) ->
+select_hashsign(undefined, Cert, Version) ->
#'OTPCertificate'{tbsCertificate = TBSCert} = public_key:pkix_decode_cert(Cert, otp),
#'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
- select_cert_hashsign(undefined, Algo, {undefined, undefined});
-select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert) ->
+ select_hashsign_algs(undefined, Algo, Version);
+select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert, Version) ->
#'OTPCertificate'{tbsCertificate = TBSCert} =public_key:pkix_decode_cert(Cert, otp),
#'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
- DefaultHashSign = {_, Sign} = select_cert_hashsign(undefined, Algo, {undefined, undefined}),
+ DefaultHashSign = {_, Sign} = select_hashsign_algs(undefined, Algo, Version),
case lists:filter(fun({sha, dsa}) ->
true;
({_, dsa}) ->
@@ -611,28 +627,61 @@ select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert) ->
[HashSign| _] ->
HashSign
end.
+
%%--------------------------------------------------------------------
--spec select_cert_hashsign(#hash_sign_algos{}| undefined, oid(), tls_version() | {undefined, undefined}) ->
+-spec select_hashsign_algs(#hash_sign_algos{}| undefined, oid(), ssl_record:ssl_version()) ->
{atom(), atom()}.
+%% Description: For TLS 1.2 hash function and signature algorithm pairs can be
+%% negotiated with the signature_algorithms extension,
+%% for previous versions always use appropriate defaults.
+%% RFC 5246, Sect. 7.4.1.4.1. Signature Algorithms
+%% If the client does not send the signature_algorithms extension, the
+%% server MUST do the following: (e.i defaults for TLS 1.2)
+%%
+%% - If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
+%% DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had
+%% sent the value {sha1,rsa}.
%%
-%% Description: For TLS 1.2 selected cert_hash_sign will be recived
-%% in the handshake message, for previous versions use appropriate defaults.
-%% This function is also used by select_hashsign to extract
-%% the alogrithm of the server cert key.
+%% - If the negotiated key exchange algorithm is one of (DHE_DSS,
+%% DH_DSS), behave as if the client had sent the value {sha1,dsa}.
+%%
+%% - If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
+%% ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}.
+
%%--------------------------------------------------------------------
-select_cert_hashsign(HashSign, _, {Major, Minor}) when HashSign =/= undefined andalso
+select_hashsign_algs(HashSign, _, {Major, Minor}) when HashSign =/= undefined andalso
Major >= 3 andalso Minor >= 3 ->
HashSign;
-select_cert_hashsign(undefined,?'id-ecPublicKey', _) ->
+select_hashsign_algs(undefined, ?rsaEncryption, {Major, Minor}) when Major >= 3 andalso Minor >= 3 ->
+ {sha, rsa};
+select_hashsign_algs(undefined,?'id-ecPublicKey', _) ->
{sha, ecdsa};
-select_cert_hashsign(undefined, ?rsaEncryption, _) ->
+select_hashsign_algs(undefined, ?rsaEncryption, _) ->
{md5sha, rsa};
-select_cert_hashsign(undefined, ?'id-dsa', _) ->
+select_hashsign_algs(undefined, ?'id-dsa', _) ->
{sha, dsa}.
+-spec select_hashsign_algs(atom(), ssl_record:ssl_version()) -> {atom(), atom()}.
+%% Wrap function to keep the knowledge of the default values in
+%% one place only
+select_hashsign_algs(Alg, Version) when (Alg == rsa orelse
+ Alg == dhe_rsa orelse
+ Alg == dh_rsa orelse
+ Alg == ecdhe_rsa orelse
+ Alg == ecdh_rsa orelse
+ Alg == srp_rsa) ->
+ select_hashsign_algs(undefined, ?rsaEncryption, Version);
+select_hashsign_algs(Alg, Version) when (Alg == dhe_dss orelse
+ Alg == dh_dss orelse
+ Alg == srp_dss) ->
+ select_hashsign_algs(undefined, ?'id-dsa', Version);
+select_hashsign_algs(Alg, Version) when (Alg == ecdhe_ecdsa orelse
+ Alg == ecdh_ecdsa) ->
+ select_hashsign_algs(undefined, ?'id-ecPublicKey', Version).
+
%%--------------------------------------------------------------------
--spec master_secret(atom(), tls_version(), #session{} | binary(), #connection_states{},
+-spec master_secret(atom(), ssl_record:ssl_version(), #session{} | binary(), #connection_states{},
client | server) -> {binary(), #connection_states{}} | #alert{}.
%%
%% Description: Sets or calculates the master secret and calculate keys,
@@ -817,7 +866,7 @@ enc_server_key_exchange(Version, Params, {HashAlgo, SignAlgo},
end.
%%--------------------------------------------------------------------
--spec decode_client_key(binary(), key_algo(), tls_version()) ->
+-spec decode_client_key(binary(), ssl_cipher:key_algo(), ssl_record:ssl_version()) ->
#encrypted_premaster_secret{}
| #client_diffie_hellman_public{}
| #client_ec_diffie_hellman_public{}
@@ -832,7 +881,7 @@ decode_client_key(ClientKey, Type, Version) ->
dec_client_key(ClientKey, key_exchange_alg(Type), Version).
%%--------------------------------------------------------------------
--spec decode_server_key(binary(), key_algo(), tls_version()) ->
+-spec decode_server_key(binary(), ssl_cipher:key_algo(), ssl_record:ssl_version()) ->
#server_key_params{}.
%%
%% Description: Decode server_key data and return appropriate type
@@ -1006,12 +1055,9 @@ decode_suites('3_bytes', Dec) ->
%%-------------Cipeher suite handling --------------------------------
available_suites(UserSuites, Version) ->
- case UserSuites of
- [] ->
- ssl_cipher:suites(Version);
- _ ->
- UserSuites
- end.
+ lists:filtermap(fun(Suite) ->
+ lists:member(Suite, ssl_cipher:all_suites(Version))
+ end, UserSuites).
available_suites(ServerCert, UserSuites, Version, Curve) ->
ssl_cipher:filter(ServerCert, available_suites(UserSuites, Version))
@@ -1029,14 +1075,15 @@ cipher_suites(Suites, true) ->
select_session(SuggestedSessionId, CipherSuites, Compressions, Port, #session{ecc = ECCCurve} =
Session, Version,
- #ssl_options{ciphers = UserSuites} = SslOpts, Cache, CacheCb, Cert) ->
+ #ssl_options{ciphers = UserSuites, honor_cipher_order = HCO} = SslOpts,
+ Cache, CacheCb, Cert) ->
{SessionId, Resumed} = ssl_session:server_id(Port, SuggestedSessionId,
SslOpts, Cert,
Cache, CacheCb),
case Resumed of
undefined ->
Suites = available_suites(Cert, UserSuites, Version, ECCCurve),
- CipherSuite = select_cipher_suite(CipherSuites, Suites),
+ CipherSuite = select_cipher_suite(CipherSuites, Suites, HCO),
Compression = select_compression(Compressions),
{new, Session#session{session_id = SessionId,
cipher_suite = CipherSuite,
@@ -1053,19 +1100,31 @@ supported_ecc(_) ->
%%-------------certificate handling --------------------------------
-certificate_types({KeyExchange, _, _, _})
- when KeyExchange == rsa;
- KeyExchange == dhe_dss;
- KeyExchange == dhe_rsa;
- KeyExchange == ecdhe_rsa ->
- <<?BYTE(?RSA_SIGN), ?BYTE(?DSS_SIGN)>>;
+certificate_types(_, {N, M}) when N >= 3 andalso M >= 3 ->
+ case proplists:get_bool(ecdsa,
+ proplists:get_value(public_keys, crypto:supports())) of
+ true ->
+ <<?BYTE(?ECDSA_SIGN), ?BYTE(?RSA_SIGN), ?BYTE(?DSS_SIGN)>>;
+ false ->
+ <<?BYTE(?RSA_SIGN), ?BYTE(?DSS_SIGN)>>
+ end;
+
+certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == rsa;
+ KeyExchange == dhe_rsa;
+ KeyExchange == ecdhe_rsa ->
+ <<?BYTE(?RSA_SIGN)>>;
-certificate_types({KeyExchange, _, _, _})
- when KeyExchange == dh_ecdsa;
- KeyExchange == dhe_ecdsa ->
+certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == dhe_dss;
+ KeyExchange == srp_dss ->
+ <<?BYTE(?DSS_SIGN)>>;
+
+certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == dh_ecdsa;
+ KeyExchange == dhe_ecdsa;
+ KeyExchange == ecdh_ecdsa;
+ KeyExchange == ecdhe_ecdsa ->
<<?BYTE(?ECDSA_SIGN)>>;
-certificate_types(_) ->
+certificate_types(_, _) ->
<<?BYTE(?RSA_SIGN)>>.
certificate_authorities(CertDbHandle, CertDbRef) ->
@@ -1654,7 +1713,16 @@ dec_hello_extensions(<<?UINT16(?SIGNATURE_ALGORITHMS_EXT), ?UINT16(Len),
dec_hello_extensions(<<?UINT16(?ELLIPTIC_CURVES_EXT), ?UINT16(Len),
ExtData:Len/binary, Rest/binary>>, Acc) ->
<<?UINT16(_), EllipticCurveList/binary>> = ExtData,
- EllipticCurves = [tls_v1:enum_to_oid(X) || <<X:16>> <= EllipticCurveList],
+ %% Ignore unknown curves
+ Pick = fun(Enum) ->
+ case tls_v1:enum_to_oid(Enum) of
+ undefined ->
+ false;
+ Oid ->
+ {true, Oid}
+ end
+ end,
+ EllipticCurves = lists:filtermap(Pick, [ECC || <<ECC:16>> <= EllipticCurveList]),
dec_hello_extensions(Rest, Acc#hello_extensions{elliptic_curves =
#elliptic_curves{elliptic_curve_list =
EllipticCurves}});
@@ -1665,6 +1733,14 @@ dec_hello_extensions(<<?UINT16(?EC_POINT_FORMATS_EXT), ?UINT16(Len),
dec_hello_extensions(Rest, Acc#hello_extensions{ec_point_formats =
#ec_point_formats{ec_point_format_list =
ECPointFormats}});
+
+dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len), Rest/binary>>, Acc) when Len == 0 ->
+ dec_hello_extensions(Rest, Acc#hello_extensions{sni = ""}); %% Server may send an empy SNI
+
+dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len),
+ ExtData:Len/binary, Rest/binary>>, Acc) ->
+ <<?UINT16(_), NameList/binary>> = ExtData,
+ dec_hello_extensions(Rest, Acc#hello_extensions{sni = dec_sni(NameList)});
%% Ignore data following the ClientHello (i.e.,
%% extensions) if not understood.
@@ -1677,6 +1753,13 @@ dec_hello_extensions(_, Acc) ->
dec_hashsign(<<?BYTE(HashAlgo), ?BYTE(SignAlgo)>>) ->
{ssl_cipher:hash_algorithm(HashAlgo), ssl_cipher:sign_algorithm(SignAlgo)}.
+%% Ignore unknown names (only host_name is supported)
+dec_sni(<<?BYTE(?SNI_NAMETYPE_HOST_NAME), ?UINT16(Len),
+ HostName:Len/binary, _/binary>>) ->
+ #sni{hostname = binary_to_list(HostName)};
+dec_sni(<<?BYTE(_), ?UINT16(Len), _:Len, Rest/binary>>) -> dec_sni(Rest);
+dec_sni(_) -> undefined.
+
decode_next_protocols({next_protocol_negotiation, Protocols}) ->
decode_next_protocols(Protocols, []).
decode_next_protocols(<<>>, Acc) ->
@@ -1796,6 +1879,11 @@ handle_srp_extension(#srp{username = Username}, Session) ->
%%-------------Misc --------------------------------
+select_cipher_suite(CipherSuites, Suites, false) ->
+ select_cipher_suite(CipherSuites, Suites);
+select_cipher_suite(CipherSuites, Suites, true) ->
+ select_cipher_suite(Suites, CipherSuites).
+
select_cipher_suite([], _) ->
no_suite;
select_cipher_suite([Suite | ClientSuites], SupportedSuites) ->
@@ -1847,7 +1935,7 @@ psk_secret(PSKIdentity, PSKLookup) ->
#alert{} = Alert ->
Alert;
_ ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER)
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
end.
psk_secret(PSKIdentity, PSKLookup, PremasterSecret) ->
@@ -1859,7 +1947,7 @@ psk_secret(PSKIdentity, PSKLookup, PremasterSecret) ->
#alert{} = Alert ->
Alert;
_ ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER)
+ throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
end.
handle_psk_identity(_PSKIdentity, LookupFun)
diff --git a/lib/ssl/src/ssl_handshake.hrl b/lib/ssl/src/ssl_handshake.hrl
index 75160526b9..80284faef0 100644
--- a/lib/ssl/src/ssl_handshake.hrl
+++ b/lib/ssl/src/ssl_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -352,18 +352,4 @@
hostname = undefined
}).
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Dialyzer types
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--type oid() :: tuple().
--type public_key_params() :: #'Dss-Parms'{} | {namedCurve, oid()} | #'ECParameters'{} | term().
--type public_key_info() :: {oid(), #'RSAPublicKey'{} | integer() | #'ECPoint'{}, public_key_params()}.
--type tls_handshake_history() :: {[binary()], [binary()]}.
-
--type ssl_handshake() :: #server_hello{} | #server_hello_done{} | #certificate{} | #certificate_request{} |
- #client_key_exchange{} | #finished{} | #certificate_verify{} |
- #hello_request{} | #next_protocol{}.
-
-
-endif. % -ifdef(ssl_handshake).
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
index 0186f9fca2..88105cac5a 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,21 +24,21 @@
-include_lib("public_key/include/public_key.hrl").
+-define(SECRET_PRINTOUT, "***").
+
-type reason() :: term().
-type reply() :: term().
-type msg() :: term().
-type from() :: term().
-type host() :: inet:ip_address() | inet:hostname().
-type session_id() :: 0 | binary().
--type tls_version() :: {integer(), integer()}.
--type tls_atom_version() :: sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'.
-type certdb_ref() :: reference().
-type db_handle() :: term().
-type der_cert() :: binary().
--type private_key() :: #'RSAPrivateKey'{} | #'DSAPrivateKey'{} | #'ECPrivateKey'{}.
-type issuer() :: tuple().
-type serialnumber() :: integer().
-type cert_key() :: {reference(), integer(), issuer()}.
+-type secret_printout() :: list().
%% basic binary constructors
-define(BOOLEAN(X), X:8/unsigned-big-integer).
@@ -74,25 +74,26 @@
-record(ssl_options, {
protocol :: tls | dtls,
- versions :: ['tlsv1.2' | 'tlsv1.1' | tlsv1 | sslv3] | ['dtlsv1.2' | dtlsv1],
+ versions :: [ssl_record:ssl_version()], %% ssl_record:atom_version() in API
verify :: verify_none | verify_peer,
verify_fun, %%:: fun(CertVerifyErrors::term()) -> boolean(),
+ partial_chain :: fun(),
fail_if_no_peer_cert :: boolean(),
verify_client_once :: boolean(),
%% fun(Extensions, State, Verify, AccError) -> {Extensions, State, AccError}
validate_extensions_fun,
depth :: integer(),
certfile :: binary(),
- cert :: der_encoded(),
+ cert :: public_key:der_encoded() | secret_printout(),
keyfile :: binary(),
- key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded()},
- password :: string(),
- cacerts :: [der_encoded()],
+ key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', public_key:der_encoded()} | secret_printout(),
+ password :: string() | secret_printout(),
+ cacerts :: [public_key:der_encoded()] | secret_printout(),
cacertfile :: binary(),
- dh :: der_encoded(),
- dhfile :: binary(),
+ dh :: public_key:der_encoded() | secret_printout(),
+ dhfile :: binary() | secret_printout(),
user_lookup_fun, % server option, fun to lookup the user
- psk_identity :: binary(),
+ psk_identity :: binary() | secret_printout() ,
srp_identity, % client option {User, Password}
ciphers, %
%% Local policy for the server if it want's to reuse the session
@@ -104,7 +105,6 @@
reuse_sessions :: boolean(),
renegotiate_at,
secure_renegotiate,
- debug,
%% undefined if not hibernating, or number of ms of
%% inactivity after which ssl_connection will go into
%% hibernation
@@ -114,17 +114,14 @@
next_protocols_advertised = undefined, %% [binary()],
next_protocol_selector = undefined, %% fun([binary()]) -> binary())
log_alert :: boolean(),
- server_name_indication = undefined
+ server_name_indication = undefined,
+ %% Should the server prefer its own cipher order over the one provided by
+ %% the client?
+ honor_cipher_order = false,
+ padding_check = true,
+ fallback = false
}).
--record(config, {ssl, %% SSL parameters
- inet_user, %% User set inet options
- emulated, %% #socket_option{} emulated
- inet_ssl, %% inet options for internal ssl socket
- transport_info, %% Callback info
- connection_cb
- }).
-
-record(socket_options,
{
mode = list,
@@ -134,6 +131,15 @@
active = true
}).
+-record(config, {ssl, %% SSL parameters
+ inet_user, %% User set inet options
+ emulated, %% Emulated option list or "inherit_tracker" pid
+ inet_ssl, %% inet options for internal ssl socket
+ transport_info, %% Callback info
+ connection_cb
+ }).
+
+
-type state_name() :: hello | abbreviated | certify | cipher | connection.
-type gen_fsm_state_return() :: {next_state, state_name(), term()} |
{next_state, state_name(), term(), timeout()} |
diff --git a/lib/ssl/src/ssl_listen_tracker_sup.erl b/lib/ssl/src/ssl_listen_tracker_sup.erl
new file mode 100644
index 0000000000..29f40e846d
--- /dev/null
+++ b/lib/ssl/src/ssl_listen_tracker_sup.erl
@@ -0,0 +1,71 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Supervisor for a listen options tracker
+%%----------------------------------------------------------------------
+-module(ssl_listen_tracker_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0, start_link_dist/0]).
+-export([start_child/1, start_child_dist/1]).
+
+%% Supervisor callback
+-export([init/1]).
+
+%%%=========================================================================
+%%% API
+%%%=========================================================================
+start_link() ->
+ supervisor:start_link({local, tracker_name(normal)}, ?MODULE, []).
+
+start_link_dist() ->
+ supervisor:start_link({local, tracker_name(dist)}, ?MODULE, []).
+
+start_child(Args) ->
+ supervisor:start_child(tracker_name(normal), Args).
+
+start_child_dist(Args) ->
+ supervisor:start_child(tracker_name(dist), Args).
+
+%%%=========================================================================
+%%% Supervisor callback
+%%%=========================================================================
+init(_O) ->
+ RestartStrategy = simple_one_for_one,
+ MaxR = 0,
+ MaxT = 3600,
+
+ Name = undefined, % As simple_one_for_one is used.
+ StartFunc = {ssl_socket, start_link, []},
+ Restart = temporary, % E.g. should not be restarted
+ Shutdown = 4000,
+ Modules = [ssl_socket],
+ Type = worker,
+
+ ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
+ {ok, {{RestartStrategy, MaxR, MaxT}, [ChildSpec]}}.
+
+tracker_name(normal) ->
+ ?MODULE;
+tracker_name(dist) ->
+ list_to_atom(atom_to_list(?MODULE) ++ "dist").
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl
index 4d5eaeb607..c4f1f7f193 100644
--- a/lib/ssl/src/ssl_manager.erl
+++ b/lib/ssl/src/ssl_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,10 +30,10 @@
lookup_trusted_cert/4,
new_session_id/1, clean_cert_db/2,
register_session/2, register_session/3, invalidate_session/2,
- invalidate_session/3, clear_pem_cache/0, manager_name/1]).
+ invalidate_session/3, invalidate_pem/1, clear_pem_cache/0, manager_name/1]).
% Spawn export
--export([init_session_validator/1]).
+-export([init_session_validator/1, init_pem_cache_validator/1]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -49,11 +49,13 @@
session_lifetime,
certificate_db,
session_validation_timer,
- last_delay_timer = {undefined, undefined}%% Keep for testing purposes
+ last_delay_timer = {undefined, undefined},%% Keep for testing purposes
+ last_pem_check,
+ clear_pem_cache
}).
--define('24H_in_msec', 8640000).
--define('24H_in_sec', 8640).
+-define('24H_in_msec', 86400000).
+-define('24H_in_sec', 86400).
-define(GEN_UNIQUE_ID_MAX_TRIES, 10).
-define(SESSION_VALIDATION_INTERVAL, 60000).
-define(CLEAR_PEM_CACHE, 120000).
@@ -117,14 +119,13 @@ connection_init(Trustedcerts, Role) ->
%% Description: Cache a pem file and return its content.
%%--------------------------------------------------------------------
cache_pem_file(File, DbHandle) ->
- MD5 = crypto:hash(md5, File),
- case ssl_pkix_db:lookup_cached_pem(DbHandle, MD5) of
+ case ssl_pkix_db:lookup_cached_pem(DbHandle, File) of
[{Content,_}] ->
{ok, Content};
[Content] ->
{ok, Content};
undefined ->
- call({cache_pem, {MD5, File}})
+ call({cache_pem, File})
end.
%%--------------------------------------------------------------------
@@ -167,30 +168,35 @@ clean_cert_db(Ref, File) ->
ok.
%%--------------------------------------------------------------------
--spec register_session(inet:port_number(), #session{}) -> ok.
--spec register_session(host(), inet:port_number(), #session{}) -> ok.
%%
%% Description: Make the session available for reuse.
%%--------------------------------------------------------------------
+-spec register_session(host(), inet:port_number(), #session{}) -> ok.
register_session(Host, Port, Session) ->
cast({register_session, Host, Port, Session}).
+-spec register_session(inet:port_number(), #session{}) -> ok.
register_session(Port, Session) ->
cast({register_session, Port, Session}).
%%--------------------------------------------------------------------
--spec invalidate_session(inet:port_number(), #session{}) -> ok.
--spec invalidate_session(host(), inet:port_number(), #session{}) -> ok.
%%
%% Description: Make the session unavailable for reuse. After
%% a the session has been marked "is_resumable = false" for some while
%% it will be safe to remove the data from the session database.
%%--------------------------------------------------------------------
+-spec invalidate_session(host(), inet:port_number(), #session{}) -> ok.
invalidate_session(Host, Port, Session) ->
cast({invalidate_session, Host, Port, Session}).
+-spec invalidate_session(inet:port_number(), #session{}) -> ok.
invalidate_session(Port, Session) ->
cast({invalidate_session, Port, Session}).
+
+-spec invalidate_pem(File::binary()) -> ok.
+invalidate_pem(File) ->
+ cast({invalidate_pem, File}).
+
%%====================================================================
%% gen_server callbacks
%%====================================================================
@@ -212,12 +218,16 @@ init([Name, Opts]) ->
SessionCache = CacheCb:init(proplists:get_value(session_cb_init_args, Opts, [])),
Timer = erlang:send_after(SessionLifeTime * 1000 + 5000,
self(), validate_sessions),
- erlang:send_after(?CLEAR_PEM_CACHE, self(), clear_pem_cache),
+ Interval = pem_check_interval(),
+ erlang:send_after(Interval, self(), clear_pem_cache),
{ok, #state{certificate_db = CertDb,
session_cache = SessionCache,
session_cache_cb = CacheCb,
session_lifetime = SessionLifeTime,
- session_validation_timer = Timer}}.
+ session_validation_timer = Timer,
+ last_pem_check = os:timestamp(),
+ clear_pem_cache = Interval
+ }}.
%%--------------------------------------------------------------------
-spec handle_call(msg(), from(), #state{}) -> {reply, reply(), #state{}}.
@@ -256,7 +266,7 @@ handle_call({{new_session_id,Port}, _},
{reply, Id, State};
-handle_call({{cache_pem, File}, _Pid}, _,
+handle_call({{cache_pem,File}, _Pid}, _,
#state{certificate_db = Db} = State) ->
try ssl_pkix_db:cache_pem_file(File, Db) of
Result ->
@@ -303,7 +313,12 @@ handle_cast({invalidate_session, Host, Port,
handle_cast({invalidate_session, Port, #session{session_id = ID} = Session},
#state{session_cache = Cache,
session_cache_cb = CacheCb} = State) ->
- invalidate_session(Cache, CacheCb, {Port, ID}, Session, State).
+ invalidate_session(Cache, CacheCb, {Port, ID}, Session, State);
+
+handle_cast({invalidate_pem, File},
+ #state{certificate_db = [_, _, PemCache]} = State) ->
+ ssl_pkix_db:remove(File, PemCache),
+ {noreply, State}.
%%--------------------------------------------------------------------
-spec handle_info(msg(), #state{}) -> {noreply, #state{}}.
@@ -328,15 +343,13 @@ handle_info({delayed_clean_session, Key}, #state{session_cache = Cache,
CacheCb:delete(Cache, Key),
{noreply, State};
-handle_info(clear_pem_cache, #state{certificate_db = [_,_,PemChace]} = State) ->
- case ssl_pkix_db:db_size(PemChace) of
- N when N < ?NOT_TO_BIG ->
- ok;
- _ ->
- ssl_pkix_db:clear(PemChace)
- end,
- erlang:send_after(?CLEAR_PEM_CACHE, self(), clear_pem_cache),
- {noreply, State};
+handle_info(clear_pem_cache, #state{certificate_db = [_,_,PemChace],
+ clear_pem_cache = Interval,
+ last_pem_check = CheckPoint} = State) ->
+ NewCheckPoint = os:timestamp(),
+ start_pem_cache_validator(PemChace, CheckPoint),
+ erlang:send_after(Interval, self(), clear_pem_cache),
+ {noreply, State#state{last_pem_check = NewCheckPoint}};
handle_info({clean_cert_db, Ref, File},
@@ -482,10 +495,9 @@ new_id(Port, Tries, Cache, CacheCb) ->
clean_cert_db(Ref, CertDb, RefDb, PemCache, File) ->
case ssl_pkix_db:ref_count(Ref, RefDb, 0) of
0 ->
- MD5 = crypto:hash(md5, File),
- case ssl_pkix_db:lookup_cached_pem(PemCache, MD5) of
+ case ssl_pkix_db:lookup_cached_pem(PemCache, File) of
[{Content, Ref}] ->
- ssl_pkix_db:insert(MD5, Content, PemCache);
+ ssl_pkix_db:insert(File, Content, PemCache);
_ ->
ok
end,
@@ -494,3 +506,39 @@ clean_cert_db(Ref, CertDb, RefDb, PemCache, File) ->
_ ->
ok
end.
+
+start_pem_cache_validator(PemCache, CheckPoint) ->
+ spawn_link(?MODULE, init_pem_cache_validator,
+ [[get(ssl_manager), PemCache, CheckPoint]]).
+
+init_pem_cache_validator([SslManagerName, PemCache, CheckPoint]) ->
+ put(ssl_manager, SslManagerName),
+ ssl_pkix_db:foldl(fun pem_cache_validate/2,
+ CheckPoint, PemCache).
+
+pem_cache_validate({File, _}, CheckPoint) ->
+ case file:read_file_info(File, []) of
+ {ok, #file_info{mtime = Time}} ->
+ case is_before_checkpoint(Time, CheckPoint) of
+ true ->
+ ok;
+ false ->
+ invalidate_pem(File)
+ end;
+ _ ->
+ invalidate_pem(File)
+ end,
+ CheckPoint.
+
+pem_check_interval() ->
+ case application:get_env(ssl, ssl_pem_cache_clean) of
+ {ok, Interval} when is_integer(Interval) ->
+ Interval;
+ _ ->
+ ?CLEAR_PEM_CACHE
+ end.
+
+is_before_checkpoint(Time, CheckPoint) ->
+ calendar:datetime_to_gregorian_seconds(calendar:now_to_datetime(CheckPoint)) -
+ calendar:datetime_to_gregorian_seconds(Time) > 0.
+
diff --git a/lib/ssl/src/ssl_pkix_db.erl b/lib/ssl/src/ssl_pkix_db.erl
index 9de50c8f26..8531445ba4 100644
--- a/lib/ssl/src/ssl_pkix_db.erl
+++ b/lib/ssl/src/ssl_pkix_db.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -81,10 +81,10 @@ lookup_trusted_cert(DbHandle, Ref, SerialNumber, Issuer) ->
{ok, Certs}
end.
-lookup_cached_pem([_, _, PemChache], MD5) ->
- lookup_cached_pem(PemChache, MD5);
-lookup_cached_pem(PemChache, MD5) ->
- lookup(MD5, PemChache).
+lookup_cached_pem([_, _, PemChache], File) ->
+ lookup_cached_pem(PemChache, File);
+lookup_cached_pem(PemChache, File) ->
+ lookup(File, PemChache).
%%--------------------------------------------------------------------
-spec add_trusted_certs(pid(), {erlang:timestamp(), string()} |
@@ -100,36 +100,35 @@ add_trusted_certs(_Pid, {der, DerList}, [CerDb, _,_]) ->
{ok, NewRef};
add_trusted_certs(_Pid, File, [CertsDb, RefDb, PemChache] = Db) ->
- MD5 = crypto:hash(md5, File),
- case lookup_cached_pem(Db, MD5) of
+ case lookup_cached_pem(Db, File) of
[{_Content, Ref}] ->
ref_count(Ref, RefDb, 1),
{ok, Ref};
[Content] ->
Ref = make_ref(),
update_counter(Ref, 1, RefDb),
- insert(MD5, {Content, Ref}, PemChache),
+ insert(File, {Content, Ref}, PemChache),
add_certs_from_pem(Content, Ref, CertsDb),
{ok, Ref};
undefined ->
- new_trusted_cert_entry({MD5, File}, Db)
+ new_trusted_cert_entry(File, Db)
end.
%%--------------------------------------------------------------------
--spec cache_pem_file({binary(), binary()}, [db_handle()]) -> {ok, term()}.
--spec cache_pem_file(reference(), {binary(), binary()}, [db_handle()]) -> {ok, term()}.
%%
%% Description: Cache file as binary in DB
%%--------------------------------------------------------------------
-cache_pem_file({MD5, File}, [_CertsDb, _RefDb, PemChache]) ->
+-spec cache_pem_file(binary(), [db_handle()]) -> {ok, term()}.
+cache_pem_file(File, [_CertsDb, _RefDb, PemChache]) ->
{ok, PemBin} = file:read_file(File),
Content = public_key:pem_decode(PemBin),
- insert(MD5, Content, PemChache),
+ insert(File, Content, PemChache),
{ok, Content}.
-cache_pem_file(Ref, {MD5, File}, [_CertsDb, _RefDb, PemChache]) ->
+-spec cache_pem_file(reference(), binary(), [db_handle()]) -> {ok, term()}.
+cache_pem_file(Ref, File, [_CertsDb, _RefDb, PemChache]) ->
{ok, PemBin} = file:read_file(File),
Content = public_key:pem_decode(PemBin),
- insert(MD5, {Content, Ref}, PemChache),
+ insert(File, {Content, Ref}, PemChache),
{ok, Content}.
%%--------------------------------------------------------------------
@@ -245,9 +244,9 @@ add_certs(Cert, Ref, CertsDb) ->
error_logger:info_report(Report)
end.
-new_trusted_cert_entry(FileRef, [CertsDb, RefDb, _] = Db) ->
+new_trusted_cert_entry(File, [CertsDb, RefDb, _] = Db) ->
Ref = make_ref(),
update_counter(Ref, 1, RefDb),
- {ok, Content} = cache_pem_file(Ref, FileRef, Db),
+ {ok, Content} = cache_pem_file(Ref, File, Db),
add_certs_from_pem(Content, Ref, CertsDb),
{ok, Ref}.
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 018c8befe0..025a46bf65 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,7 +48,12 @@
-export([compress/3, uncompress/3, compressions/0]).
%% Payload encryption/decryption
--export([cipher/4, decipher/3, is_correct_mac/2]).
+-export([cipher/4, decipher/4, is_correct_mac/2]).
+
+-export_type([ssl_version/0, ssl_atom_version/0]).
+
+-type ssl_version() :: {integer(), integer()}.
+-type ssl_atom_version() :: tls_record:tls_atom_version().
%%====================================================================
%% Internal application API
@@ -299,7 +304,7 @@ set_pending_cipher_state(#connection_states{pending_read = Read,
%%--------------------------------------------------------------------
--spec encode_handshake(iolist(), tls_version(), #connection_states{}) ->
+-spec encode_handshake(iolist(), ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes a handshake message to send on the ssl-socket.
@@ -308,7 +313,7 @@ encode_handshake(Frag, Version, ConnectionStates) ->
encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_alert_record(#alert{}, tls_version(), #connection_states{}) ->
+-spec encode_alert_record(#alert{}, ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes an alert message to send on the ssl-socket.
@@ -319,7 +324,7 @@ encode_alert_record(#alert{level = Level, description = Description},
ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_change_cipher_spec(tls_version(), #connection_states{}) ->
+-spec encode_change_cipher_spec(ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes a change_cipher_spec-message to send on the ssl socket.
@@ -328,7 +333,7 @@ encode_change_cipher_spec(Version, ConnectionStates) ->
encode_plain_text(?CHANGE_CIPHER_SPEC, Version, <<1:8>>, ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_data(binary(), tls_version(), #connection_states{}) ->
+-spec encode_data(binary(), ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes data to send on the ssl-socket.
@@ -356,7 +361,7 @@ compressions() ->
[?byte(?NULL)].
%%--------------------------------------------------------------------
--spec cipher(tls_version(), iolist(), #connection_state{}, MacHash::binary()) ->
+-spec cipher(ssl_version(), iodata(), #connection_state{}, MacHash::binary()) ->
{CipherFragment::binary(), #connection_state{}}.
%%
%% Description: Payload encryption
@@ -371,8 +376,9 @@ cipher(Version, Fragment,
{CipherFragment, CipherS1} =
ssl_cipher:cipher(BulkCipherAlgo, CipherS0, MacHash, Fragment, Version),
{CipherFragment, WriteState0#connection_state{cipher_state = CipherS1}}.
+
%%--------------------------------------------------------------------
--spec decipher(tls_version(), binary(), #connection_state{}) -> {binary(), binary(), #connection_state{}}.
+-spec decipher(ssl_version(), binary(), #connection_state{}, boolean()) -> {binary(), binary(), #connection_state{}} | #alert{}.
%%
%% Description: Payload decryption
%%--------------------------------------------------------------------
@@ -382,8 +388,8 @@ decipher(Version, CipherFragment,
BulkCipherAlgo,
hash_size = HashSz},
cipher_state = CipherS0
- } = ReadState) ->
- case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version) of
+ } = ReadState, PaddingCheck) ->
+ case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version, PaddingCheck) of
{PlainFragment, Mac, CipherS1} ->
CS1 = ReadState#connection_state{cipher_state = CipherS1},
{PlainFragment, Mac, CS1};
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl
index c17fa53a62..6aab35d6da 100644
--- a/lib/ssl/src/ssl_record.hrl
+++ b/lib/ssl/src/ssl_record.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
%%
%%----------------------------------------------------------------------
%% Purpose: Record and constant defenitions for the SSL-record protocol
-%% see RFC 2246
+% see RFC 2246
%%----------------------------------------------------------------------
-ifndef(ssl_record).
@@ -70,7 +70,7 @@
-define(INITIAL_BYTES, 5).
--define(MAX_SEQENCE_NUMBER, 18446744073709552000). %% math:pow(2, 64) - 1 = 1.8446744073709552e19
+-define(MAX_SEQENCE_NUMBER, 18446744073709551615). %% (1 bsl 64) - 1 = 18446744073709551615
%% Sequence numbers can not wrap so when max is about to be reached we should renegotiate.
%% We will renegotiate a little before so that there will be sequence numbers left
%% for the rehandshake and a little data. Currently we decided to renegotiate a little more
diff --git a/lib/ssl/src/ssl_socket.erl b/lib/ssl/src/ssl_socket.erl
index 1b6e637cd3..55eb569b20 100644
--- a/lib/ssl/src/ssl_socket.erl
+++ b/lib/ssl/src/ssl_socket.erl
@@ -1,20 +1,73 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
-module(ssl_socket).
+-behaviour(gen_server).
+
-include("ssl_internal.hrl").
-include("ssl_api.hrl").
--export([socket/4, setopts/3, getopts/3, peername/2, sockname/2, port/2]).
+-export([socket/5, setopts/3, getopts/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,
+ handle_info/2, code_change/3]).
+
+-record(state, {
+ emulated_opts,
+ port,
+ ssl_opts
+ }).
-socket(Pid, Transport, Socket, ConnectionCb) ->
+%%--------------------------------------------------------------------
+%%% Internal API
+%%--------------------------------------------------------------------
+socket(Pid, Transport, Socket, ConnectionCb, Tracker) ->
#sslsocket{pid = Pid,
%% "The name "fd" is keept for backwards compatibility
- fd = {Transport, Socket, ConnectionCb}}.
-
+ fd = {Transport, Socket, ConnectionCb, Tracker}}.
+setopts(gen_tcp, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOpts, EmulatedOpts} = split_options(Options),
+ ok = set_emulated_opts(Tracker, EmulatedOpts),
+ inet:setopts(ListenSocket, SockOpts);
+setopts(_, #sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_},
+ emulated = Tracker}}}, Options) ->
+ {SockOpts, EmulatedOpts} = split_options(Options),
+ ok = set_emulated_opts(Tracker, EmulatedOpts),
+ Transport:setopts(ListenSocket, SockOpts);
+%%% Following clauses will not be called for emulated options, they are handled in the connection process
setopts(gen_tcp, Socket, Options) ->
inet:setopts(Socket, Options);
setopts(Transport, Socket, Options) ->
Transport:setopts(Socket, Options).
+getopts(gen_tcp, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOptNames, EmulatedOptNames} = split_options(Options),
+ EmulatedOpts = get_emulated_opts(Tracker, EmulatedOptNames),
+ SocketOpts = get_socket_opts(ListenSocket, SockOptNames, inet),
+ {ok, EmulatedOpts ++ SocketOpts};
+getopts(Transport, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOptNames, EmulatedOptNames} = split_options(Options),
+ EmulatedOpts = get_emulated_opts(Tracker, EmulatedOptNames),
+ SocketOpts = get_socket_opts(ListenSocket, SockOptNames, Transport),
+ {ok, EmulatedOpts ++ SocketOpts};
+%%% Following clauses will not be called for emulated options, they are handled in the connection process
getopts(gen_tcp, Socket, Options) ->
inet:getopts(Socket, Options);
getopts(Transport, Socket, Options) ->
@@ -34,3 +87,151 @@ port(gen_tcp, Socket) ->
inet:port(Socket);
port(Transport, Socket) ->
Transport:port(Socket).
+
+emulated_options() ->
+ [mode, packet, active, header, packet_size].
+
+internal_inet_values() ->
+ [{packet_size,0}, {packet, 0}, {header, 0}, {active, false}, {mode,binary}].
+
+default_inet_values() ->
+ [{packet_size, 0}, {packet,0}, {header, 0}, {active, true}, {mode, list}].
+
+inherit_tracker(ListenSocket, EmOpts, #ssl_options{erl_dist = false} = SslOpts) ->
+ ssl_listen_tracker_sup:start_child([ListenSocket, EmOpts, SslOpts]);
+inherit_tracker(ListenSocket, EmOpts, #ssl_options{erl_dist = true} = SslOpts) ->
+ ssl_listen_tracker_sup:start_child_dist([ListenSocket, EmOpts, SslOpts]).
+
+get_emulated_opts(TrackerPid) ->
+ call(TrackerPid, get_emulated_opts).
+set_emulated_opts(TrackerPid, InetValues) ->
+ call(TrackerPid, {set_emulated_opts, InetValues}).
+get_all_opts(TrackerPid) ->
+ call(TrackerPid, get_all_opts).
+
+%%====================================================================
+%% ssl_listen_tracker_sup API
+%%====================================================================
+
+start_link(Port, SockOpts, SslOpts) ->
+ gen_server:start_link(?MODULE, [Port, SockOpts, SslOpts], []).
+
+%%--------------------------------------------------------------------
+-spec init(list()) -> {ok, #state{}}.
+%% Possible return values not used now.
+%% | {ok, #state{}, timeout()} | ignore | {stop, term()}.
+%%
+%% Description: Initiates the server
+%%--------------------------------------------------------------------
+init([Port, Opts, SslOpts]) ->
+ process_flag(trap_exit, true),
+ true = link(Port),
+ {ok, #state{emulated_opts = Opts, port = Port, ssl_opts = SslOpts}}.
+
+%%--------------------------------------------------------------------
+-spec handle_call(msg(), from(), #state{}) -> {reply, reply(), #state{}}.
+%% Possible return values not used now.
+%% {reply, reply(), #state{}, timeout()} |
+%% {noreply, #state{}} |
+%% {noreply, #state{}, timeout()} |
+%% {stop, reason(), reply(), #state{}} |
+%% {stop, reason(), #state{}}.
+%%
+%% Description: Handling call messages
+%%--------------------------------------------------------------------
+handle_call({set_emulated_opts, Opts0}, _From,
+ #state{emulated_opts = Opts1} = State) ->
+ Opts = do_set_emulated_opts(Opts0, Opts1),
+ {reply, ok, State#state{emulated_opts = Opts}};
+handle_call(get_emulated_opts, _From,
+ #state{emulated_opts = Opts} = State) ->
+ {reply, {ok, Opts}, State};
+handle_call(get_all_opts, _From,
+ #state{emulated_opts = EmOpts,
+ ssl_opts = SslOpts} = State) ->
+ {reply, {ok, EmOpts, SslOpts}, State}.
+
+%%--------------------------------------------------------------------
+-spec handle_cast(msg(), #state{}) -> {noreply, #state{}}.
+%% Possible return values not used now.
+%% | {noreply, #state{}, timeout()} |
+%% {stop, reason(), #state{}}.
+%%
+%% Description: Handling cast messages
+%%--------------------------------------------------------------------
+handle_cast(_, State)->
+ {noreply, State}.
+
+%%--------------------------------------------------------------------
+-spec handle_info(msg(), #state{}) -> {stop, reason(), #state{}}.
+%% Possible return values not used now.
+%% {noreply, #state{}}.
+%% |{noreply, #state{}, timeout()} |
+%%
+%%
+%% Description: Handling all non call/cast messages
+%%-------------------------------------------------------------------
+handle_info({'EXIT', Port, _}, #state{port = Port} = State) ->
+ {stop, normal, State}.
+
+
+%%--------------------------------------------------------------------
+-spec terminate(reason(), #state{}) -> ok.
+%%
+%% Description: This function is called by a gen_server when it is about to
+%% terminate. It should be the opposite of Module:init/1 and do any necessary
+%% cleaning up. When it returns, the gen_server terminates with Reason.
+%% The return value is ignored.
+%%--------------------------------------------------------------------
+terminate(_Reason, _State) ->
+ ok.
+
+%%--------------------------------------------------------------------
+-spec code_change(term(), #state{}, list()) -> {ok, #state{}}.
+%%
+%% Description: Convert process state when code is changed
+%%--------------------------------------------------------------------
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+%%--------------------------------------------------------------------
+%%% Internal functions
+%%--------------------------------------------------------------------
+call(Pid, Msg) ->
+ gen_server:call(Pid, Msg, infinity).
+
+split_options(Opts) ->
+ split_options(Opts, emulated_options(), [], []).
+split_options([], _, SocketOpts, EmuOpts) ->
+ {SocketOpts, EmuOpts};
+split_options([{Name, _} = Opt | Opts], Emu, SocketOpts, EmuOpts) ->
+ case lists:member(Name, Emu) of
+ true ->
+ split_options(Opts, Emu, SocketOpts, [Opt | EmuOpts]);
+ false ->
+ split_options(Opts, Emu, [Opt | SocketOpts], EmuOpts)
+ end;
+split_options([Name | Opts], Emu, SocketOptNames, EmuOptNames) ->
+ case lists:member(Name, Emu) of
+ true ->
+ split_options(Opts, Emu, SocketOptNames, [Name | EmuOptNames]);
+ false ->
+ split_options(Opts, Emu, [Name | SocketOptNames], EmuOptNames)
+ end.
+
+do_set_emulated_opts([], Opts) ->
+ Opts;
+do_set_emulated_opts([{Name,_} = Opt | Rest], Opts) ->
+ do_set_emulated_opts(Rest, [Opt | proplists:delete(Name, Opts)]).
+
+get_socket_opts(_, [], _) ->
+ [];
+get_socket_opts(ListenSocket, SockOptNames, Cb) ->
+ {ok, Opts} = Cb:getopts(ListenSocket, SockOptNames),
+ Opts.
+
+get_emulated_opts(TrackerPid, EmOptNames) ->
+ {ok, EmOpts} = get_emulated_opts(TrackerPid),
+ lists:map(fun(Name) -> {value, Value} = lists:keysearch(Name, 1, EmOpts),
+ Value end,
+ EmOptNames).
diff --git a/lib/ssl/src/ssl_sup.erl b/lib/ssl/src/ssl_sup.erl
index 77b40a7b38..7cccf8d5a5 100644
--- a/lib/ssl/src/ssl_sup.erl
+++ b/lib/ssl/src/ssl_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -47,8 +47,10 @@ init([]) ->
TLSConnetionManager = tls_connection_manager_child_spec(),
%% Not supported yet
%%DTLSConnetionManager = tls_connection_manager_child_spec(),
-
- {ok, {{one_for_all, 10, 3600}, [SessionCertManager, TLSConnetionManager]}}.
+ %% Handles emulated options so that they inherited by the accept socket, even when setopts is performed on
+ %% the listen socket
+ ListenOptionsTracker = listen_options_tracker_child_spec(),
+ {ok, {{one_for_all, 10, 3600}, [SessionCertManager, TLSConnetionManager, ListenOptionsTracker]}}.
manager_opts() ->
@@ -85,19 +87,30 @@ tls_connection_manager_child_spec() ->
StartFunc = {tls_connection_sup, start_link, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [tls_connection, ssl_connection],
+ Modules = [tls_connection_sup],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
-dtls_connection_manager_child_spec() ->
- Name = dtls_connection,
- StartFunc = {dtls_connection_sup, start_link, []},
+%% dtls_connection_manager_child_spec() ->
+%% Name = dtls_connection,
+%% StartFunc = {dtls_connection_sup, start_link, []},
+%% Restart = permanent,
+%% Shutdown = 4000,
+%% Modules = [dtls_connection, ssl_connection],
+%% Type = supervisor,
+%% {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
+
+listen_options_tracker_child_spec() ->
+ Name = ssl_socket,
+ StartFunc = {ssl_listen_tracker_sup, start_link, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [dtls_connection, ssl_connection],
+ Modules = [ssl_socket],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
session_cb_init_args() ->
case application:get_env(ssl, session_cb_init_args) of
{ok, Args} when is_list(Args) ->
diff --git a/lib/ssl/src/ssl_v3.erl b/lib/ssl/src/ssl_v3.erl
index d477b3df81..68f7f5dee2 100644
--- a/lib/ssl/src/ssl_v3.erl
+++ b/lib/ssl/src/ssl_v3.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -130,7 +130,7 @@ setup_keys(MasterSecret, ServerRandom, ClientRandom, HS, KML, _EKML, IVS) ->
{ClientWriteMacSecret, ServerWriteMacSecret, ClientWriteKey,
ServerWriteKey, ClientIV, ServerIV}.
--spec suites() -> [cipher_suite()].
+-spec suites() -> [ssl_cipher:cipher_suite()].
suites() ->
[
diff --git a/lib/ssl/src/tls.erl b/lib/ssl/src/tls.erl
index 3e7b2db9c2..c829129250 100644
--- a/lib/ssl/src/tls.erl
+++ b/lib/ssl/src/tls.erl
@@ -30,25 +30,29 @@
handshake/1, handshake/2, handshake/3]).
%%--------------------------------------------------------------------
--spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec connect(host() | port(), [connect_option()] | inet:port_number(),
- timeout() | list()) ->
- {ok, #sslsocket{}} | {error, reason()}.
--spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
-
%%
%% Description: Connect to an TLS server.
%%--------------------------------------------------------------------
+-spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
+ {error, reason()}.
+
connect(Socket, Options) when is_port(Socket) ->
connect(Socket, Options, infinity).
+
+-spec connect(host() | port(), [connect_option()] | inet:port_number(),
+ timeout() | list()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Socket, SslOptions, Timeout) when is_port(Socket) ->
TLSOpts = [{protocol, tls} | SslOptions],
ssl:connect(Socket, TLSOpts, Timeout);
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
+
+-spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Host, Port, Options, Timeout) ->
TLSOpts = [{protocol, tls} | Options],
ssl:connect(Host, Port, TLSOpts, Timeout).
@@ -64,39 +68,44 @@ listen(Port, Options) ->
ssl:listen(Port, TLSOpts).
%%--------------------------------------------------------------------
--spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
- {error, reason()}.
%%
%% Description: Performs transport accept on an ssl listen socket
%%--------------------------------------------------------------------
+-spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(ListenSocket) ->
accept(ListenSocket, infinity).
+
+-spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(Socket, Timeout) ->
ssl:transport_accept(Socket, Timeout).
%%--------------------------------------------------------------------
--spec handshake(#sslsocket{}) -> ok | {error, reason()}.
--spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
- | transport_option()]) ->
- ok | {ok, #sslsocket{}} | {error, reason()}.
--spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}) -> ok | {error, reason()}.
+
handshake(ListenSocket) ->
handshake(ListenSocket, infinity).
+-spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
+ | transport_option()]) ->
+ ok | {ok, #sslsocket{}} | {error, reason()}.
+
handshake(#sslsocket{} = Socket, Timeout) ->
ssl:ssl_accept(Socket, Timeout);
handshake(ListenSocket, SslOptions) when is_port(ListenSocket) ->
handshake(ListenSocket, SslOptions, infinity).
+
+-spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
handshake(Socket, SslOptions, Timeout) when is_port(Socket) ->
ssl:ssl_accept(Socket, SslOptions, Timeout).
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index ffa04ee8ba..77d3aa7889 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,7 +53,7 @@
%% Alert and close handling
-export([send_alert/2, handle_own_alert/4, handle_close_alert/3,
handle_normal_shutdown/3, handle_unexpected_message/3,
- workaround_transport_delivery_problems/2, alert_user/5, alert_user/8
+ workaround_transport_delivery_problems/2, alert_user/6, alert_user/9
]).
%% Data handling
@@ -66,18 +66,18 @@
%% gen_fsm callbacks
-export([init/1, hello/2, certify/2, cipher/2,
abbreviated/2, connection/2, handle_event/3,
- handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
+ handle_sync_event/4, handle_info/3, terminate/3, code_change/4, format_status/2]).
%%====================================================================
%% Internal application API
%%====================================================================
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = tls_connection_sup:start_child([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -85,13 +85,13 @@ start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
Error
end;
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = tls_connection_sup:start_child_dist([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -144,29 +144,10 @@ send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
start_link(Role, Host, Port, Socket, Options, User, CbInfo) ->
{ok, proc_lib:spawn_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]])}.
-init([Role, Host, Port, Socket, {SSLOpts0, _} = Options, User, CbInfo]) ->
+init([Role, Host, Port, Socket, Options, User, CbInfo]) ->
process_flag(trap_exit, true),
- State0 = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
- Handshake = ssl_handshake:init_handshake_history(),
- TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
- try ssl_config:init(SSLOpts0, Role) of
- {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} ->
- Session = State0#state.session,
- State = State0#state{
- tls_handshake_history = Handshake,
- session = Session#session{own_certificate = OwnCert,
- time_stamp = TimeStamp},
- file_ref_db = FileRefHandle,
- cert_db_ref = Ref,
- cert_db = CertDbHandle,
- session_cache = CacheHandle,
- private_key = Key,
- diffie_hellman_params = DHParams},
- gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State))
- catch
- throw:Error ->
- gen_fsm:enter_loop(?MODULE, [], error, {Error,State0}, get_timeout(State0))
- end.
+ State = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
+ gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State)).
%%--------------------------------------------------------------------
%% Description:There should be one instance of this function for each
@@ -208,11 +189,11 @@ hello(Hello = #client_hello{client_version = ClientVersion,
session_cache = Cache,
session_cache_cb = CacheCb,
ssl_options = SslOpts}) ->
- HashSign = ssl_handshake:select_hashsign(HashSigns, Cert),
case tls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
ConnectionStates0, Cert}, Renegotiation) of
{Version, {Type, Session},
ConnectionStates, ServerHelloExt} ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert, Version),
ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
State#state{connection_states = ConnectionStates,
negotiated_version = Version,
@@ -342,16 +323,21 @@ handle_info(Msg, StateName, State) ->
%% Reason. The return value is ignored.
%%--------------------------------------------------------------------
terminate(Reason, StateName, State) ->
- ssl_connection:terminate(Reason, StateName, State).
-
+ catch ssl_connection:terminate(Reason, StateName, State).
%%--------------------------------------------------------------------
%% code_change(OldVsn, StateName, State, Extra) -> {ok, StateName, NewState}
%% Description: Convert process state when code is changed
%%--------------------------------------------------------------------
-code_change(_OldVsn, StateName, State, _Extra) ->
+code_change(_OldVsn, StateName, State0, {Direction, From, To}) ->
+ State = convert_state(State0, Direction, From, To),
+ {ok, StateName, State};
+code_change(_OldVsn, StateName, State, _) ->
{ok, StateName, State}.
+format_status(Type, Data) ->
+ ssl_connection:format_status(Type, Data).
+
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
@@ -362,22 +348,13 @@ encode_handshake(Handshake, Version, ConnectionStates0, Hist0) ->
ssl_record:encode_handshake(Frag, Version, ConnectionStates0),
{Encoded, ConnectionStates, Hist}.
-
encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
ssl_record:encode_change_cipher_spec(Version, ConnectionStates).
-
-
decode_alerts(Bin) ->
- decode_alerts(Bin, []).
+ ssl_alert:decode(Bin).
-decode_alerts(<<?BYTE(Level), ?BYTE(Description), Rest/binary>>, Acc) ->
- A = ?ALERT_REC(Level, Description),
- decode_alerts(Rest, [A | Acc]);
-decode_alerts(<<>>, Acc) ->
- lists:reverse(Acc, []).
-
-initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
+initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions, Tracker}, User,
{CbModule, DataTag, CloseTag, ErrorTag}) ->
ConnectionStates = ssl_record:init_connection_states(Role),
@@ -391,9 +368,7 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
Monitor = erlang:monitor(process, User),
#state{socket_options = SocketOptions,
- %% We do not want to save the password in the state so that
- %% could be written in the clear into error logs.
- ssl_options = SSLOptions#ssl_options{password = undefined},
+ ssl_options = SSLOptions,
session = #session{is_resumable = new},
transport_cb = CbModule,
data_tag = DataTag,
@@ -411,7 +386,8 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
renegotiation = {false, first},
start_or_recv_from = undefined,
send_queue = queue:new(),
- protocol_cb = ?MODULE
+ protocol_cb = ?MODULE,
+ tracker = Tracker
}.
next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = State) ->
@@ -420,10 +396,13 @@ next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = S
next_state(_,Next, no_record, State) ->
{next_state, Next, State, get_timeout(State)};
-next_state(_,Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, State) ->
- Alerts = decode_alerts(EncAlerts),
- handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
-
+next_state(Current, Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, #state{negotiated_version = Version} = State) ->
+ case decode_alerts(EncAlerts) of
+ Alerts = [_|_] ->
+ handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
+ #alert{} = Alert ->
+ handle_own_alert(Alert, Version, Current, State)
+ end;
next_state(Current, Next, #ssl_tls{type = ?HANDSHAKE, fragment = Data},
State0 = #state{protocol_buffers =
#protocol_buffers{tls_handshake_buffer = Buf0} = Buffers,
@@ -468,12 +447,16 @@ next_state(_, StateName, #ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, St
next_state(StateName, StateName, Record, State)
end;
next_state(Current, Next, #ssl_tls{type = ?CHANGE_CIPHER_SPEC, fragment = <<1>>} =
- _ChangeCipher,
- #state{connection_states = ConnectionStates0} = State0) ->
+ _ChangeCipher,
+ #state{connection_states = ConnectionStates0} = State0)
+ when Next == cipher; Next == abbreviated ->
ConnectionStates1 =
ssl_record:activate_pending_connection_state(ConnectionStates0, read),
{Record, State} = next_record(State0#state{connection_states = ConnectionStates1}),
- next_state(Current, Next, Record, State);
+ next_state(Current, Next, Record, State#state{expecting_finished = true});
+next_state(Current, _Next, #ssl_tls{type = ?CHANGE_CIPHER_SPEC, fragment = <<1>>} =
+ _ChangeCipher, #state{negotiated_version = Version} = State) ->
+ handle_own_alert(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE), Version, Current, State);
next_state(Current, Next, #ssl_tls{type = _Unknown}, State0) ->
%% Ignore unknown type
{Record, State} = next_record(State0),
@@ -499,8 +482,9 @@ next_record(#state{protocol_buffers = #protocol_buffers{tls_packets = [], tls_ci
next_record(#state{protocol_buffers =
#protocol_buffers{tls_packets = [], tls_cipher_texts = [CT | Rest]}
= Buffers,
- connection_states = ConnStates0} = State) ->
- case tls_record:decode_cipher_text(CT, ConnStates0) of
+ connection_states = ConnStates0,
+ ssl_options = #ssl_options{padding_check = Check}} = State) ->
+ case tls_record:decode_cipher_text(CT, ConnStates0, Check) of
{Plain, ConnStates} ->
{Plain, State#state{protocol_buffers =
Buffers#protocol_buffers{tls_cipher_texts = Rest},
@@ -513,7 +497,7 @@ next_record(State) ->
next_record_if_active(State =
#state{socket_options =
- #socket_options{active = false}}) ->
+ #socket_options{active = false}}) ->
{no_record ,State};
next_record_if_active(State) ->
@@ -577,7 +561,8 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
bytes_to_read = BytesToRead,
start_or_recv_from = RecvFrom,
timer = Timer,
- user_data_buffer = Buffer0} = State0) ->
+ user_data_buffer = Buffer0,
+ tracker = Tracker} = State0) ->
Buffer1 = if
Buffer0 =:= <<>> -> Data;
Data =:= <<>> -> Buffer0;
@@ -585,7 +570,7 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
end,
case get_data(SOpts, BytesToRead, Buffer1) of
{ok, ClientData, Buffer} -> % Send data
- SocketOpt = deliver_app_data(Transport, Socket, SOpts, ClientData, Pid, RecvFrom),
+ SocketOpt = deliver_app_data(Transport, Socket, SOpts, ClientData, Pid, RecvFrom, Tracker),
cancel_timer(Timer),
State = State0#state{user_data_buffer = Buffer,
start_or_recv_from = undefined,
@@ -606,7 +591,7 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
{passive, Buffer} ->
next_record_if_active(State0#state{user_data_buffer = Buffer});
{error,_Reason} -> %% Invalid packet in packet mode
- deliver_packet_error(Transport, Socket, SOpts, Buffer1, Pid, RecvFrom),
+ deliver_packet_error(Transport, Socket, SOpts, Buffer1, Pid, RecvFrom, Tracker),
{stop, normal, State0}
end.
@@ -661,8 +646,8 @@ decode_packet(Type, Buffer, PacketOpts) ->
%% HTTP headers using the {packet, httph} option, we don't do any automatic
%% switching of states.
deliver_app_data(Transport, Socket, SOpts = #socket_options{active=Active, packet=Type},
- Data, Pid, From) ->
- send_or_reply(Active, Pid, From, format_reply(Transport, Socket, SOpts, Data)),
+ Data, Pid, From, Tracker) ->
+ send_or_reply(Active, Pid, From, format_reply(Transport, Socket, SOpts, Data, Tracker)),
SO = case Data of
{P, _, _, _} when ((P =:= http_request) or (P =:= http_response)),
((Type =:= http) or (Type =:= http_bin)) ->
@@ -682,20 +667,20 @@ deliver_app_data(Transport, Socket, SOpts = #socket_options{active=Active, packe
end.
format_reply(_, _,#socket_options{active = false, mode = Mode, packet = Packet,
- header = Header}, Data) ->
+ header = Header}, Data, _) ->
{ok, do_format_reply(Mode, Packet, Header, Data)};
format_reply(Transport, Socket, #socket_options{active = _, mode = Mode, packet = Packet,
- header = Header}, Data) ->
- {ssl, ssl_socket:socket(self(), Transport, Socket, ?MODULE),
+ header = Header}, Data, Tracker) ->
+ {ssl, ssl_socket:socket(self(), Transport, Socket, ?MODULE, Tracker),
do_format_reply(Mode, Packet, Header, Data)}.
-deliver_packet_error(Transport, Socket, SO= #socket_options{active = Active}, Data, Pid, From) ->
- send_or_reply(Active, Pid, From, format_packet_error(Transport, Socket, SO, Data)).
+deliver_packet_error(Transport, Socket, SO= #socket_options{active = Active}, Data, Pid, From, Tracker) ->
+ send_or_reply(Active, Pid, From, format_packet_error(Transport, Socket, SO, Data, Tracker)).
-format_packet_error(_, _,#socket_options{active = false, mode = Mode}, Data) ->
+format_packet_error(_, _,#socket_options{active = false, mode = Mode}, Data, _) ->
{error, {invalid_packet, do_format_reply(Mode, raw, 0, Data)}};
-format_packet_error(Transport, Socket, #socket_options{active = _, mode = Mode}, Data) ->
- {ssl_error, ssl_socket:socket(self(), Transport, Socket, ?MODULE),
+format_packet_error(Transport, Socket, #socket_options{active = _, mode = Mode}, Data, Tracker) ->
+ {ssl_error, ssl_socket:socket(self(), Transport, Socket, ?MODULE, Tracker),
{invalid_packet, do_format_reply(Mode, raw, 0, Data)}}.
do_format_reply(binary, _, N, Data) when N > 0 -> % Header mode
@@ -751,7 +736,11 @@ handle_tls_handshake(Handle, StateName,
handle_tls_handshake(Handle, NextStateName, State);
{stop, _,_} = Stop ->
Stop
- end.
+ end;
+
+handle_tls_handshake(_Handle, _StateName, #state{}) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+
write_application_data(Data0, From,
#state{socket = Socket,
negotiated_version = Version,
@@ -835,10 +824,10 @@ handle_alert(#alert{level = ?FATAL} = Alert, StateName,
#state{socket = Socket, transport_cb = Transport,
ssl_options = SslOpts, start_or_recv_from = From, host = Host,
port = Port, session = Session, user_application = {_Mon, Pid},
- role = Role, socket_options = Opts} = State) ->
+ role = Role, socket_options = Opts, tracker = Tracker} = State) ->
invalidate_session(Role, Host, Port, Session),
log_alert(SslOpts#ssl_options.log_alert, StateName, Alert),
- alert_user(Transport, Socket, StateName, Opts, Pid, From, Alert, Role),
+ alert_user(Transport, Tracker, Socket, StateName, Opts, Pid, From, Alert, Role),
{stop, normal, State};
handle_alert(#alert{level = ?WARNING, description = ?CLOSE_NOTIFY} = Alert,
@@ -859,36 +848,37 @@ handle_alert(#alert{level = ?WARNING, description = ?NO_RENEGOTIATION} = Alert,
{Record, State} = next_record(State0),
next_state(StateName, connection, Record, State);
-handle_alert(#alert{level = ?WARNING, description = ?USER_CANCELED} = Alert, StateName,
+%% Gracefully log and ignore all other warning alerts
+handle_alert(#alert{level = ?WARNING} = Alert, StateName,
#state{ssl_options = SslOpts} = State0) ->
log_alert(SslOpts#ssl_options.log_alert, StateName, Alert),
{Record, State} = next_record(State0),
next_state(StateName, StateName, Record, State).
-alert_user(Transport, Socket, connection, Opts, Pid, From, Alert, Role) ->
- alert_user(Transport,Socket, Opts#socket_options.active, Pid, From, Alert, Role);
-alert_user(Transport, Socket,_, _, _, From, Alert, Role) ->
- alert_user(Transport, Socket, From, Alert, Role).
+alert_user(Transport, Tracker, Socket, connection, Opts, Pid, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, Opts#socket_options.active, Pid, From, Alert, Role);
+alert_user(Transport, Tracker, Socket,_, _, _, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, From, Alert, Role).
-alert_user(Transport, Socket, From, Alert, Role) ->
- alert_user(Transport, Socket, false, no_pid, From, Alert, Role).
+alert_user(Transport, Tracker, Socket, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, false, no_pid, From, Alert, Role).
-alert_user(_,_, false = Active, Pid, From, Alert, Role) ->
+alert_user(_, _, _, false = Active, Pid, From, Alert, Role) ->
%% If there is an outstanding ssl_accept | recv
%% From will be defined and send_or_reply will
%% send the appropriate error message.
ReasonCode = ssl_alert:reason_code(Alert, Role),
send_or_reply(Active, Pid, From, {error, ReasonCode});
-alert_user(Transport, Socket, Active, Pid, From, Alert, Role) ->
+alert_user(Transport, Tracker, Socket, Active, Pid, From, Alert, Role) ->
case ssl_alert:reason_code(Alert, Role) of
closed ->
send_or_reply(Active, Pid, From,
{ssl_closed, ssl_socket:socket(self(),
- Transport, Socket, ?MODULE)});
+ Transport, Socket, ?MODULE, Tracker)});
ReasonCode ->
send_or_reply(Active, Pid, From,
{ssl_error, ssl_socket:socket(self(),
- Transport, Socket, ?MODULE), ReasonCode})
+ Transport, Socket, ?MODULE, Tracker), ReasonCode})
end.
log_alert(true, Info, Alert) ->
@@ -921,15 +911,17 @@ handle_own_alert(Alert, Version, StateName,
handle_normal_shutdown(Alert, _, #state{socket = Socket,
transport_cb = Transport,
start_or_recv_from = StartFrom,
+ tracker = Tracker,
role = Role, renegotiation = {false, first}}) ->
- alert_user(Transport, Socket, StartFrom, Alert, Role);
+ alert_user(Transport, Tracker,Socket, StartFrom, Alert, Role);
handle_normal_shutdown(Alert, StateName, #state{socket = Socket,
socket_options = Opts,
transport_cb = Transport,
user_application = {_Mon, Pid},
+ tracker = Tracker,
start_or_recv_from = RecvFrom, role = Role}) ->
- alert_user(Transport, Socket, StateName, Opts, Pid, RecvFrom, Alert, Role).
+ alert_user(Transport, Tracker, Socket, StateName, Opts, Pid, RecvFrom, Alert, Role).
handle_unexpected_message(Msg, Info, #state{negotiated_version = Version} = State) ->
Alert = ?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE),
@@ -970,3 +962,14 @@ workaround_transport_delivery_problems(Socket, gen_tcp = Transport) ->
Transport:recv(Socket, 0, 30000);
workaround_transport_delivery_problems(Socket, Transport) ->
Transport:close(Socket).
+
+convert_state(#state{ssl_options = Options} = State, up, "5.3.5", "5.3.6") ->
+ State#state{ssl_options = convert_options_partial_chain(Options, up)};
+convert_state(#state{ssl_options = Options} = State, down, "5.3.6", "5.3.5") ->
+ State#state{ssl_options = convert_options_partial_chain(Options, down)}.
+
+convert_options_partial_chain(Options, up) ->
+ {Head, Tail} = lists:split(5, tuple_to_list(Options)),
+ list_to_tuple(Head ++ [{partial_chain, fun(_) -> unknown_ca end}] ++ Tail);
+convert_options_partial_chain(Options, down) ->
+ list_to_tuple(proplists:delete(partial_chain, tuple_to_list(Options))).
diff --git a/lib/ssl/src/tls_connection_sup.erl b/lib/ssl/src/tls_connection_sup.erl
index 6f0d8a7262..7a637c212a 100644
--- a/lib/ssl/src/tls_connection_sup.erl
+++ b/lib/ssl/src/tls_connection_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -59,7 +59,7 @@ init(_O) ->
StartFunc = {tls_connection, start_link, []},
Restart = temporary, % E.g. should not be restarted
Shutdown = 4000,
- Modules = [tls_connection],
+ Modules = [tls_connection, ssl_connection],
Type = worker,
ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 01abefca46..b0b6d5a8e3 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -28,11 +28,14 @@
-include("tls_record.hrl").
-include("ssl_alert.hrl").
-include("ssl_internal.hrl").
+-include("ssl_cipher.hrl").
-include_lib("public_key/include/public_key.hrl").
-export([client_hello/8, hello/4,
get_tls_handshake/3, encode_handshake/2, decode_handshake/3]).
+-type tls_handshake() :: #client_hello{} | ssl_handshake:ssl_handshake().
+
%%====================================================================
%% Internal application API
%%====================================================================
@@ -45,22 +48,28 @@
%%--------------------------------------------------------------------
client_hello(Host, Port, ConnectionStates,
#ssl_options{versions = Versions,
- ciphers = UserSuites
+ ciphers = UserSuites,
+ fallback = Fallback
} = SslOpts,
Cache, CacheCb, Renegotiation, OwnCert) ->
Version = tls_record:highest_protocol_version(Versions),
Pending = ssl_record:pending_connection_state(ConnectionStates, read),
SecParams = Pending#connection_state.security_parameters,
- CipherSuites = ssl_handshake:available_suites(UserSuites, Version),
+ AvailableCipherSuites = ssl_handshake:available_suites(UserSuites, Version),
Extensions = ssl_handshake:client_hello_extensions(Host, Version,
- CipherSuites,
+ AvailableCipherSuites,
SslOpts, ConnectionStates, Renegotiation),
-
- Id = ssl_session:client_id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert),
-
+ CipherSuites =
+ case Fallback of
+ true ->
+ [?TLS_FALLBACK_SCSV | ssl_handshake:cipher_suites(AvailableCipherSuites, Renegotiation)];
+ false ->
+ ssl_handshake:cipher_suites(AvailableCipherSuites, Renegotiation)
+ end,
+ Id = ssl_session:client_id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert),
#client_hello{session_id = Id,
client_version = Version,
- cipher_suites = ssl_handshake:cipher_suites(CipherSuites, Renegotiation),
+ cipher_suites = CipherSuites,
compression_methods = ssl_record:compressions(),
random = SecParams#security_parameters.client_random,
extensions = Extensions
@@ -71,11 +80,11 @@ client_hello(Host, Port, ConnectionStates,
#connection_states{} | {inet:port_number(), #session{}, db_handle(),
atom(), #connection_states{}, binary() | undefined},
boolean()) ->
- {tls_version(), session_id(), #connection_states{}, binary() | undefined}|
- {tls_version(), {resumed | new, #session{}}, #connection_states{},
- [binary()] | undefined,
- [oid()] | undefined, [oid()] | undefined} |
- #alert{}.
+ {tls_record:tls_version(), session_id(), #connection_states{}, binary() | undefined}|
+ {tls_record:tls_version(), {resumed | new, #session{}}, #connection_states{},
+ [binary()] | undefined,
+ [ssl_handshake:oid()] | undefined, [ssl_handshake:oid()] | undefined} |
+ #alert{}.
%%
%% Description: Handles a recieved hello message
%%--------------------------------------------------------------------
@@ -94,35 +103,24 @@ hello(#server_hello{server_version = Version, random = Random,
end;
hello(#client_hello{client_version = ClientVersion,
- session_id = SugesstedId,
- cipher_suites = CipherSuites,
- compression_methods = Compressions,
- random = Random,
- extensions = #hello_extensions{elliptic_curves = Curves} = HelloExt},
+ cipher_suites = CipherSuites} = Hello,
#ssl_options{versions = Versions} = SslOpts,
- {Port, Session0, Cache, CacheCb, ConnectionStates0, Cert}, Renegotiation) ->
+ Info, Renegotiation) ->
Version = ssl_handshake:select_version(tls_record, ClientVersion, Versions),
- case tls_record:is_acceptable_version(Version, Versions) of
- true ->
- ECCCurve = ssl_handshake:select_curve(Curves, ssl_handshake:supported_ecc(Version)),
- {Type, #session{cipher_suite = CipherSuite} = Session1}
- = ssl_handshake:select_session(SugesstedId, CipherSuites, Compressions,
- Port, Session0#session{ecc = ECCCurve}, Version,
- SslOpts, Cache, CacheCb, Cert),
- case CipherSuite of
- no_suite ->
- ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
- _ ->
- handle_client_hello_extensions(Version, Type, Random, CipherSuites, HelloExt,
- SslOpts, Session1, ConnectionStates0,
- Renegotiation)
+ case ssl_cipher:is_fallback(CipherSuites) of
+ true ->
+ Highest = tls_record:highest_protocol_version(Versions),
+ case tls_record:is_higher(Highest, Version) of
+ true ->
+ ?ALERT_REC(?FATAL, ?INAPPROPRIATE_FALLBACK);
+ false ->
+ handle_client_hello(Version, Hello, SslOpts, Info, Renegotiation)
end;
false ->
- ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ handle_client_hello(Version, Hello, SslOpts, Info, Renegotiation)
end.
-
%%--------------------------------------------------------------------
--spec encode_handshake(tls_handshake(), tls_version()) -> iolist().
+-spec encode_handshake(tls_handshake(), tls_record:tls_version()) -> iolist().
%%
%% Description: Encode a handshake packet
%%--------------------------------------------------------------------x
@@ -132,7 +130,7 @@ encode_handshake(Package, Version) ->
[MsgType, ?uint24(Len), Bin].
%%--------------------------------------------------------------------
--spec get_tls_handshake(tls_version(), binary(), binary() | iolist()) ->
+-spec get_tls_handshake(tls_record:tls_version(), binary(), binary() | iolist()) ->
{[tls_handshake()], binary()}.
%%
%% Description: Given buffered and new data from ssl_record, collects
@@ -147,6 +145,32 @@ get_tls_handshake(Version, Data, Buffer) ->
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+handle_client_hello(Version, #client_hello{session_id = SugesstedId,
+ cipher_suites = CipherSuites,
+ compression_methods = Compressions,
+ random = Random,
+ extensions = #hello_extensions{elliptic_curves = Curves} = HelloExt},
+ #ssl_options{versions = Versions} = SslOpts,
+ {Port, Session0, Cache, CacheCb, ConnectionStates0, Cert}, Renegotiation) ->
+ case tls_record:is_acceptable_version(Version, Versions) of
+ true ->
+ ECCCurve = ssl_handshake:select_curve(Curves, ssl_handshake:supported_ecc(Version)),
+ {Type, #session{cipher_suite = CipherSuite} = Session1}
+ = ssl_handshake:select_session(SugesstedId, CipherSuites, Compressions,
+ Port, Session0#session{ecc = ECCCurve}, Version,
+ SslOpts, Cache, CacheCb, Cert),
+ case CipherSuite of
+ no_suite ->
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
+ _ ->
+ handle_client_hello_extensions(Version, Type, Random, CipherSuites, HelloExt,
+ SslOpts, Session1, ConnectionStates0,
+ Renegotiation)
+ end;
+ false ->
+ ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ end.
+
get_tls_handshake_aux(Version, <<?BYTE(Type), ?UINT24(Length),
Body:Length/binary,Rest/binary>>, Acc) ->
Raw = <<?BYTE(Type), ?UINT24(Length), Body/binary>>,
diff --git a/lib/ssl/src/tls_handshake.hrl b/lib/ssl/src/tls_handshake.hrl
index dbe930cb90..1646e5b6f2 100644
--- a/lib/ssl/src/tls_handshake.hrl
+++ b/lib/ssl/src/tls_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,6 +37,4 @@
extensions
}).
--type tls_handshake() :: #client_hello{} | ssl_handshake().
-
-endif. % -ifdef(tls_handshake).
diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl
index 88107557a0..168b2c8fd3 100644
--- a/lib/ssl/src/tls_record.erl
+++ b/lib/ssl/src/tls_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,16 +34,21 @@
-export([get_tls_records/2]).
%% Decoding
--export([decode_cipher_text/2]).
+-export([decode_cipher_text/3]).
%% Encoding
-export([encode_plain_text/4]).
%% Protocol version handling
-export([protocol_version/1, lowest_protocol_version/2,
- highest_protocol_version/1, supported_protocol_versions/0,
+ highest_protocol_version/1, is_higher/2, supported_protocol_versions/0,
is_acceptable_version/1, is_acceptable_version/2]).
+-export_type([tls_version/0, tls_atom_version/0]).
+
+-type tls_version() :: ssl_record:ssl_version().
+-type tls_atom_version() :: sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'.
+
-compile(inline).
%%====================================================================
@@ -137,33 +142,38 @@ encode_plain_text(Type, Version, Data,
{CipherText, ConnectionStates#connection_states{current_write = WriteState#connection_state{sequence_number = Seq +1}}}.
%%--------------------------------------------------------------------
--spec decode_cipher_text(#ssl_tls{}, #connection_states{}) ->
+-spec decode_cipher_text(#ssl_tls{}, #connection_states{}, boolean()) ->
{#ssl_tls{}, #connection_states{}}| #alert{}.
%%
%% Description: Decode cipher text
%%--------------------------------------------------------------------
decode_cipher_text(#ssl_tls{type = Type, version = Version,
- fragment = CipherFragment} = CipherText, ConnnectionStates0) ->
- ReadState0 = ConnnectionStates0#connection_states.current_read,
- #connection_state{compression_state = CompressionS0,
- sequence_number = Seq,
- security_parameters = SecParams} = ReadState0,
- CompressAlg = SecParams#security_parameters.compression_algorithm,
- {PlainFragment, Mac, ReadState1} = ssl_record:decipher(Version, CipherFragment, ReadState0),
- MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
- case ssl_record:is_correct_mac(Mac, MacHash) of
- true ->
- {Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
- PlainFragment, CompressionS0),
- ConnnectionStates = ConnnectionStates0#connection_states{
- current_read = ReadState1#connection_state{
- sequence_number = Seq + 1,
- compression_state = CompressionS1}},
- {CipherText#ssl_tls{fragment = Plain}, ConnnectionStates};
- false ->
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
- end.
-
+ fragment = CipherFragment} = CipherText,
+ #connection_states{current_read =
+ #connection_state{
+ compression_state = CompressionS0,
+ sequence_number = Seq,
+ security_parameters=
+ #security_parameters{compression_algorithm = CompressAlg}
+ } = ReadState0} = ConnnectionStates0, PaddingCheck) ->
+ case ssl_record:decipher(Version, CipherFragment, ReadState0, PaddingCheck) of
+ {PlainFragment, Mac, ReadState1} ->
+ MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
+ case ssl_record:is_correct_mac(Mac, MacHash) of
+ true ->
+ {Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
+ PlainFragment, CompressionS0),
+ ConnnectionStates = ConnnectionStates0#connection_states{
+ current_read = ReadState1#connection_state{
+ sequence_number = Seq + 1,
+ compression_state = CompressionS1}},
+ {CipherText#ssl_tls{fragment = Plain}, ConnnectionStates};
+ false ->
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ end;
+ #alert{} = Alert ->
+ Alert
+ end.
%%--------------------------------------------------------------------
-spec protocol_version(tls_atom_version() | tls_version()) ->
tls_version() | tls_atom_version().
@@ -226,6 +236,13 @@ highest_protocol_version(Version = {M,_}, [{N,_} | Rest]) when M > N ->
highest_protocol_version(_, [Version | Rest]) ->
highest_protocol_version(Version, Rest).
+is_higher({M, N}, {M, O}) when N > O ->
+ true;
+is_higher({M, _}, {N, _}) when M > N ->
+ true;
+is_higher(_, _) ->
+ false.
+
%%--------------------------------------------------------------------
-spec supported_protocol_versions() -> [tls_version()].
%%
@@ -262,18 +279,18 @@ supported_protocol_versions([_|_] = Vsns) ->
Vsns.
%%--------------------------------------------------------------------
--spec is_acceptable_version(tls_version()) -> boolean().
--spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
%%
%% Description: ssl version 2 is not acceptable security risks are too big.
%%
%%--------------------------------------------------------------------
+-spec is_acceptable_version(tls_version()) -> boolean().
is_acceptable_version({N,_})
when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION ->
true;
is_acceptable_version(_) ->
false.
+-spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
is_acceptable_version({N,_} = Version, Versions)
when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION ->
lists:member(Version, Versions);
diff --git a/lib/ssl/src/tls_v1.erl b/lib/ssl/src/tls_v1.erl
index 2395e98642..7a5f9c1b38 100644
--- a/lib/ssl/src/tls_v1.erl
+++ b/lib/ssl/src/tls_v1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -166,7 +166,7 @@ setup_keys(Version, PrfAlgo, MasterSecret, ServerRandom, ClientRandom, HashSize,
{ClientWriteMacSecret, ServerWriteMacSecret, ClientWriteKey,
ServerWriteKey, ClientIV, ServerIV}.
--spec mac_hash(integer(), binary(), integer(), integer(), tls_version(),
+-spec mac_hash(integer(), binary(), integer(), integer(), tls_record:tls_version(),
integer(), binary()) -> binary().
mac_hash(Method, Mac_write_secret, Seq_num, Type, {Major, Minor},
@@ -181,25 +181,9 @@ mac_hash(Method, Mac_write_secret, Seq_num, Type, {Major, Minor},
Fragment]),
Mac.
--spec suites(1|2|3) -> [cipher_suite()].
-
-suites(Minor) when Minor == 1; Minor == 2->
- case sufficent_ec_support() of
- true ->
- all_suites(Minor);
- false ->
- no_ec_suites(Minor)
- end;
-
-suites(Minor) when Minor == 3 ->
- case sufficent_ec_support() of
- true ->
- all_suites(3) ++ all_suites(2);
- false ->
- no_ec_suites(3) ++ no_ec_suites(2)
- end.
-
-all_suites(Minor) when Minor == 1; Minor == 2->
+-spec suites(1|2|3) -> [ssl_cipher:cipher_suite()].
+
+suites(Minor) when Minor == 1; Minor == 2 ->
[
?TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
?TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
@@ -235,7 +219,7 @@ all_suites(Minor) when Minor == 1; Minor == 2->
?TLS_RSA_WITH_DES_CBC_SHA
];
-all_suites(3) ->
+suites(3) ->
[
?TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
?TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
@@ -254,33 +238,7 @@ all_suites(3) ->
?TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
?TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
?TLS_RSA_WITH_AES_128_CBC_SHA256
- ].
-
-no_ec_suites(Minor) when Minor == 1; Minor == 2->
- [
- ?TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
- ?TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
- ?TLS_RSA_WITH_AES_256_CBC_SHA,
- ?TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
- ?TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
- ?TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- ?TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
- ?TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
- ?TLS_RSA_WITH_AES_128_CBC_SHA,
- ?TLS_RSA_WITH_RC4_128_SHA,
- ?TLS_RSA_WITH_RC4_128_MD5,
- ?TLS_DHE_RSA_WITH_DES_CBC_SHA,
- ?TLS_RSA_WITH_DES_CBC_SHA
- ];
-no_ec_suites(3) ->
- [
- ?TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
- ?TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
- ?TLS_RSA_WITH_AES_256_CBC_SHA256,
- ?TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
- ?TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
- ?TLS_RSA_WITH_AES_128_CBC_SHA256
- ].
+ ] ++ suites(2).
%%--------------------------------------------------------------------
%%% Internal functions
@@ -368,11 +326,19 @@ finished_label(server) ->
%% list ECC curves in prefered order
ecc_curves(_Minor) ->
- [?sect571r1,?sect571k1,?secp521r1,?sect409k1,?sect409r1,
- ?secp384r1,?sect283k1,?sect283r1,?secp256k1,?secp256r1,
- ?sect239k1,?sect233k1,?sect233r1,?secp224k1,?secp224r1,
- ?sect193r1,?sect193r2,?secp192k1,?secp192r1,?sect163k1,
- ?sect163r1,?sect163r2,?secp160k1,?secp160r1,?secp160r2].
+ TLSCurves = [sect571r1,sect571k1,secp521r1,brainpoolP512r1,
+ sect409k1,sect409r1,brainpoolP384r1,secp384r1,
+ sect283k1,sect283r1,brainpoolP256r1,secp256k1,secp256r1,
+ sect239k1,sect233k1,sect233r1,secp224k1,secp224r1,
+ sect193r1,sect193r2,secp192k1,secp192r1,sect163k1,
+ sect163r1,sect163r2,secp160k1,secp160r1,secp160r2],
+ CryptoCurves = crypto:ec_curves(),
+ lists:foldr(fun(Curve, Curves) ->
+ case proplists:get_bool(Curve, CryptoCurves) of
+ true -> [pubkey_cert_records:namedCurves(Curve)|Curves];
+ false -> Curves
+ end
+ end, [], TLSCurves).
%% ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005)
oid_to_enum(?sect163k1) -> 1;
@@ -399,7 +365,10 @@ oid_to_enum(?secp224r1) -> 21;
oid_to_enum(?secp256k1) -> 22;
oid_to_enum(?secp256r1) -> 23;
oid_to_enum(?secp384r1) -> 24;
-oid_to_enum(?secp521r1) -> 25.
+oid_to_enum(?secp521r1) -> 25;
+oid_to_enum(?brainpoolP256r1) -> 26;
+oid_to_enum(?brainpoolP384r1) -> 27;
+oid_to_enum(?brainpoolP512r1) -> 28.
enum_to_oid(1) -> ?sect163k1;
enum_to_oid(2) -> ?sect163r1;
@@ -425,8 +394,9 @@ enum_to_oid(21) -> ?secp224r1;
enum_to_oid(22) -> ?secp256k1;
enum_to_oid(23) -> ?secp256r1;
enum_to_oid(24) -> ?secp384r1;
-enum_to_oid(25) -> ?secp521r1.
-
-sufficent_ec_support() ->
- CryptoSupport = crypto:supports(),
- proplists:get_bool(ecdh, proplists:get_value(public_keys, CryptoSupport)).
+enum_to_oid(25) -> ?secp521r1;
+enum_to_oid(26) -> ?brainpoolP256r1;
+enum_to_oid(27) -> ?brainpoolP384r1;
+enum_to_oid(28) -> ?brainpoolP512r1;
+enum_to_oid(_) ->
+ undefined.
diff --git a/lib/ssl/test/Makefile b/lib/ssl/test/Makefile
index 244eb5ce0a..0d241707d9 100644
--- a/lib/ssl/test/Makefile
+++ b/lib/ssl/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2013. All Rights Reserved.
+# Copyright Ericsson AB 1999-2015. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -39,12 +39,14 @@ MODULES = \
ssl_basic_SUITE \
ssl_cipher_SUITE \
ssl_certificate_verify_SUITE\
+ ssl_crl_SUITE\
ssl_dist_SUITE \
ssl_handshake_SUITE \
ssl_npn_hello_SUITE \
ssl_npn_handshake_SUITE \
ssl_packet_SUITE \
ssl_payload_SUITE \
+ ssl_pem_cache_SUITE \
ssl_session_cache_SUITE \
ssl_to_openssl_SUITE \
ssl_ECC_SUITE \
diff --git a/lib/ssl/test/erl_make_certs.erl b/lib/ssl/test/erl_make_certs.erl
index 22dc951ac1..daf4466f11 100644
--- a/lib/ssl/test/erl_make_certs.erl
+++ b/lib/ssl/test/erl_make_certs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -325,14 +325,14 @@ sign_algorithm(#'RSAPrivateKey'{}, Opts) ->
{Type, 'NULL'};
sign_algorithm(#'DSAPrivateKey'{p=P, q=Q, g=G}, _Opts) ->
{?'id-dsa-with-sha1', {params,#'Dss-Parms'{p=P, q=Q, g=G}}};
-sign_algorithm(#'ECPrivateKey'{}, Opts) ->
+sign_algorithm(#'ECPrivateKey'{parameters = Parms}, Opts) ->
Type = case proplists:get_value(digest, Opts, sha1) of
sha1 -> ?'ecdsa-with-SHA1';
sha512 -> ?'ecdsa-with-SHA512';
sha384 -> ?'ecdsa-with-SHA384';
sha256 -> ?'ecdsa-with-SHA256'
end,
- {Type, 'NULL'}.
+ {Type, Parms}.
make_key(rsa, _Opts) ->
%% (OBS: for testing only)
diff --git a/lib/ssl/test/make_certs.erl b/lib/ssl/test/make_certs.erl
index 4603a9f846..15a7e118ff 100644
--- a/lib/ssl/test/make_certs.erl
+++ b/lib/ssl/test/make_certs.erl
@@ -18,23 +18,71 @@
%%
-module(make_certs).
+-compile([export_all]).
--export([all/2]).
+%-export([all/1, all/2, rootCA/2, intermediateCA/3, endusers/3, enduser/3, revoke/3, gencrl/2, verify/3]).
--record(dn, {commonName,
+-record(config, {commonName,
organizationalUnitName = "Erlang OTP",
organizationName = "Ericsson AB",
localityName = "Stockholm",
countryName = "SE",
- emailAddress = "[email protected]"}).
+ emailAddress = "[email protected]",
+ default_bits = 2048,
+ v2_crls = true,
+ ecc_certs = false,
+ issuing_distribution_point = false,
+ crl_port = 8000,
+ openssl_cmd = "openssl"}).
+
+
+default_config() ->
+ #config{}.
+
+make_config(Args) ->
+ make_config(Args, #config{}).
+
+make_config([], C) ->
+ C;
+make_config([{organizationalUnitName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationalUnitName = Name});
+make_config([{organizationName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationName = Name});
+make_config([{localityName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{localityName = Name});
+make_config([{countryName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{countryName = Name});
+make_config([{emailAddress, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{emailAddress = Name});
+make_config([{default_bits, Bits}|T], C) when is_integer(Bits) ->
+ make_config(T, C#config{default_bits = Bits});
+make_config([{v2_crls, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{v2_crls = Bool});
+make_config([{crl_port, Port}|T], C) when is_integer(Port) ->
+ make_config(T, C#config{crl_port = Port});
+make_config([{ecc_certs, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{ecc_certs = Bool});
+make_config([{issuing_distribution_point, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{issuing_distribution_point = Bool});
+make_config([{openssl_cmd, Cmd}|T], C) when is_list(Cmd) ->
+ make_config(T, C#config{openssl_cmd = Cmd}).
+
+
+all([DataDir, PrivDir]) ->
+ all(DataDir, PrivDir).
all(DataDir, PrivDir) ->
- OpenSSLCmd = "openssl",
+ all(DataDir, PrivDir, #config{}).
+
+all(DataDir, PrivDir, C) when is_list(C) ->
+ all(DataDir, PrivDir, make_config(C));
+all(DataDir, PrivDir, C = #config{}) ->
+ ok = filelib:ensure_dir(filename:join(PrivDir, "erlangCA")),
create_rnd(DataDir, PrivDir), % For all requests
- rootCA(PrivDir, OpenSSLCmd, "erlangCA"),
- intermediateCA(PrivDir, OpenSSLCmd, "otpCA", "erlangCA"),
- endusers(PrivDir, OpenSSLCmd, "otpCA", ["client", "server"]),
- collect_certs(PrivDir, ["erlangCA", "otpCA"], ["client", "server"]),
+ rootCA(PrivDir, "erlangCA", C),
+ intermediateCA(PrivDir, "otpCA", "erlangCA", C),
+ endusers(PrivDir, "otpCA", ["client", "server", "revoked"], C),
+ endusers(PrivDir, "erlangCA", ["localhost"], C),
%% Create keycert files
SDir = filename:join([PrivDir, "server"]),
SC = filename:join([SDir, "cert.pem"]),
@@ -46,7 +94,14 @@ all(DataDir, PrivDir) ->
CK = filename:join([CDir, "key.pem"]),
CKC = filename:join([CDir, "keycert.pem"]),
append_files([CK, CC], CKC),
- remove_rnd(PrivDir).
+ RDir = filename:join([PrivDir, "revoked"]),
+ RC = filename:join([RDir, "cert.pem"]),
+ RK = filename:join([RDir, "key.pem"]),
+ RKC = filename:join([RDir, "keycert.pem"]),
+ revoke(PrivDir, "otpCA", "revoked", C),
+ append_files([RK, RC], RKC),
+ remove_rnd(PrivDir),
+ {ok, C}.
append_files(FileNames, ResultFileName) ->
{ok, ResultFile} = file:open(ResultFileName, [write]),
@@ -59,111 +114,176 @@ do_append_files([F|Fs], RF) ->
ok = file:write(RF, Data),
do_append_files(Fs, RF).
-rootCA(Root, OpenSSLCmd, Name) ->
- create_ca_dir(Root, Name, ca_cnf(Name)),
- DN = #dn{commonName = Name},
- create_self_signed_cert(Root, OpenSSLCmd, Name, req_cnf(DN)),
- ok.
+rootCA(Root, Name, C) ->
+ create_ca_dir(Root, Name, ca_cnf(C#config{commonName = Name})),
+ create_self_signed_cert(Root, Name, req_cnf(C#config{commonName = Name}), C),
+ file:copy(filename:join([Root, Name, "cert.pem"]), filename:join([Root, Name, "cacerts.pem"])),
+ gencrl(Root, Name, C).
-intermediateCA(Root, OpenSSLCmd, CA, ParentCA) ->
- CA = "otpCA",
- create_ca_dir(Root, CA, ca_cnf(CA)),
+intermediateCA(Root, CA, ParentCA, C) ->
+ create_ca_dir(Root, CA, ca_cnf(C#config{commonName = CA})),
CARoot = filename:join([Root, CA]),
- DN = #dn{commonName = CA},
CnfFile = filename:join([CARoot, "req.cnf"]),
- file:write_file(CnfFile, req_cnf(DN)),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = CA})),
KeyFile = filename:join([CARoot, "private", "key.pem"]),
ReqFile = filename:join([CARoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
CertFile = filename:join([CARoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, ParentCA, "ca_cert", ReqFile, CertFile).
-
-endusers(Root, OpenSSLCmd, CA, Users) ->
- lists:foreach(fun(User) -> enduser(Root, OpenSSLCmd, CA, User) end, Users).
-
-enduser(Root, OpenSSLCmd, CA, User) ->
+ sign_req(Root, ParentCA, "ca_cert", ReqFile, CertFile, C),
+ CACertsFile = filename:join(CARoot, "cacerts.pem"),
+ file:copy(filename:join([Root, ParentCA, "cacerts.pem"]), CACertsFile),
+ %% append this CA's cert to the cacerts file
+ {ok, Bin} = file:read_file(CertFile),
+ {ok, FD} = file:open(CACertsFile, [append]),
+ file:write(FD, ["\n", Bin]),
+ file:close(FD),
+ gencrl(Root, CA, C).
+
+endusers(Root, CA, Users, C) ->
+ [enduser(Root, CA, User, C) || User <- Users].
+
+enduser(Root, CA, User, C) ->
UsrRoot = filename:join([Root, User]),
file:make_dir(UsrRoot),
CnfFile = filename:join([UsrRoot, "req.cnf"]),
- DN = #dn{commonName = User},
- file:write_file(CnfFile, req_cnf(DN)),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = User})),
KeyFile = filename:join([UsrRoot, "key.pem"]),
ReqFile = filename:join([UsrRoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
+ %create_req(Root, CnfFile, KeyFile, ReqFile),
CertFileAllUsage = filename:join([UsrRoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert", ReqFile, CertFileAllUsage),
+ sign_req(Root, CA, "user_cert", ReqFile, CertFileAllUsage, C),
CertFileDigitalSigOnly = filename:join([UsrRoot, "digital_signature_only_cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly).
-
-collect_certs(Root, CAs, Users) ->
- Bins = lists:foldr(
- fun(CA, Acc) ->
- File = filename:join([Root, CA, "cert.pem"]),
- {ok, Bin} = file:read_file(File),
- [Bin, "\n" | Acc]
- end, [], CAs),
- lists:foreach(
- fun(User) ->
- File = filename:join([Root, User, "cacerts.pem"]),
- file:write_file(File, Bins)
- end, Users).
+ sign_req(Root, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly, C),
+ CACertsFile = filename:join(UsrRoot, "cacerts.pem"),
+ file:copy(filename:join([Root, CA, "cacerts.pem"]), CACertsFile),
+ ok.
+
+revoke(Root, CA, User, C) ->
+ UsrCert = filename:join([Root, User, "cert.pem"]),
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -revoke ", UsrCert,
+ [" -crl_reason keyCompromise" || C#config.v2_crls ],
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ gencrl(Root, CA, C).
+
+gencrl(Root, CA, C) ->
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -gencrl ",
+ " -crlhours 24",
+ " -out ", CACRLFile,
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
-create_self_signed_cert(Root, OpenSSLCmd, CAName, Cnf) ->
+verify(Root, CA, User, C) ->
+ CAFile = filename:join([Root, User, "cacerts.pem"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ CertFile = filename:join([Root, User, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " verify"
+ " -CAfile ", CAFile,
+ " -CRLfile ", CACRLFile, %% this is undocumented, but seems to work
+ " -crl_check ",
+ CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ try cmd(Cmd, Env) catch
+ exit:{eval_cmd, _, _} ->
+ invalid
+ end.
+
+create_self_signed_cert(Root, CAName, Cnf, C = #config{ecc_certs = true}) ->
CARoot = filename:join([Root, CAName]),
CnfFile = filename:join([CARoot, "req.cnf"]),
file:write_file(CnfFile, Cnf),
KeyFile = filename:join([CARoot, "private", "key.pem"]),
CertFile = filename:join([CARoot, "cert.pem"]),
- Cmd = [OpenSSLCmd, " req"
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+
+ Cmd2 = [C#config.openssl_cmd, " req"
" -new"
" -x509"
" -config ", CnfFile,
- " -keyout ", KeyFile,
+ " -key ", KeyFile,
+ " -outform PEM ",
" -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
-
-% openssl 1.0 generates key files in pkcs8 format by default and we don't handle this format
-fix_key_file(OpenSSLCmd, KeyFile) ->
- KeyFileTmp = KeyFile ++ ".tmp",
- Cmd = [OpenSSLCmd, " rsa",
- " -in ",
- KeyFile,
- " -out ",
- KeyFileTmp],
- cmd(Cmd, []),
- ok = file:rename(KeyFileTmp, KeyFile).
+ cmd(Cmd2, Env);
+create_self_signed_cert(Root, CAName, Cnf, C) ->
+ CARoot = filename:join([Root, CAName]),
+ CnfFile = filename:join([CARoot, "req.cnf"]),
+ file:write_file(CnfFile, Cnf),
+ KeyFile = filename:join([CARoot, "private", "key.pem"]),
+ CertFile = filename:join([CARoot, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " req"
+ " -new"
+ " -x509"
+ " -config ", CnfFile,
+ " -keyout ", KeyFile,
+ " -outform PEM",
+ " -out ", CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+
create_ca_dir(Root, CAName, Cnf) ->
CARoot = filename:join([Root, CAName]),
+ ok = filelib:ensure_dir(CARoot),
file:make_dir(CARoot),
create_dirs(CARoot, ["certs", "crl", "newcerts", "private"]),
create_rnd(Root, filename:join([CAName, "private"])),
create_files(CARoot, [{"serial", "01\n"},
+ {"crlnumber", "01"},
{"index.txt", ""},
{"ca.cnf", Cnf}]).
-create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile) ->
- Cmd = [OpenSSLCmd, " req"
+create_req(Root, CnfFile, KeyFile, ReqFile, C = #config{ecc_certs = true}) ->
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ Cmd2 = [C#config.openssl_cmd, " req"
+ " -new ",
+ " -key ", KeyFile,
+ " -outform PEM ",
+ " -out ", ReqFile,
+ " -config ", CnfFile],
+ cmd(Cmd2, Env);
+ %fix_key_file(KeyFile).
+create_req(Root, CnfFile, KeyFile, ReqFile, C) ->
+ Cmd = [C#config.openssl_cmd, " req"
" -new"
" -config ", CnfFile,
+ " -outform PEM ",
" -keyout ", KeyFile,
" -out ", ReqFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+ %fix_key_file(KeyFile).
+
-sign_req(Root, OpenSSLCmd, CA, CertType, ReqFile, CertFile) ->
+sign_req(Root, CA, CertType, ReqFile, CertFile, C) ->
CACnfFile = filename:join([Root, CA, "ca.cnf"]),
- Cmd = [OpenSSLCmd, " ca"
+ Cmd = [C#config.openssl_cmd, " ca"
" -batch"
" -notext"
" -config ", CACnfFile,
" -extensions ", CertType,
" -in ", ReqFile,
" -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
cmd(Cmd, Env).
%%
@@ -194,19 +314,19 @@ cmd(Cmd, Env) ->
FCmd = lists:flatten(Cmd),
Port = open_port({spawn, FCmd}, [stream, eof, exit_status, stderr_to_stdout,
{env, Env}]),
- eval_cmd(Port).
+ eval_cmd(Port, FCmd).
-eval_cmd(Port) ->
+eval_cmd(Port, Cmd) ->
receive
{Port, {data, _}} ->
- eval_cmd(Port);
+ eval_cmd(Port, Cmd);
{Port, eof} ->
ok
end,
receive
{Port, {exit_status, Status}} when Status /= 0 ->
%% io:fwrite("exit status: ~w~n", [Status]),
- exit({eval_cmd, Status})
+ exit({eval_cmd, Cmd, Status})
after 0 ->
ok
end.
@@ -215,7 +335,7 @@ eval_cmd(Port) ->
%% Contents of configuration files
%%
-req_cnf(DN) ->
+req_cnf(C) ->
["# Purpose: Configuration for requests (end users and CAs)."
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -224,10 +344,10 @@ req_cnf(DN) ->
"[req]\n"
"input_password = secret\n"
"output_password = secret\n"
- "default_bits = 1024\n"
+ "default_bits = ", integer_to_list(C#config.default_bits), "\n"
"RANDFILE = $ROOTDIR/RAND\n"
"encrypt_key = no\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"#string_mask = pkix\n"
"x509_extensions = ca_ext\n"
"prompt = no\n"
@@ -235,12 +355,12 @@ req_cnf(DN) ->
"\n"
"[name]\n"
- "commonName = ", DN#dn.commonName, "\n"
- "organizationalUnitName = ", DN#dn.organizationalUnitName, "\n"
- "organizationName = ", DN#dn.organizationName, "\n"
- "localityName = ", DN#dn.localityName, "\n"
- "countryName = ", DN#dn.countryName, "\n"
- "emailAddress = ", DN#dn.emailAddress, "\n"
+ "commonName = ", C#config.commonName, "\n"
+ "organizationalUnitName = ", C#config.organizationalUnitName, "\n"
+ "organizationName = ", C#config.organizationName, "\n"
+ "localityName = ", C#config.localityName, "\n"
+ "countryName = ", C#config.countryName, "\n"
+ "emailAddress = ", C#config.emailAddress, "\n"
"\n"
"[ca_ext]\n"
@@ -249,8 +369,7 @@ req_cnf(DN) ->
"subjectKeyIdentifier = hash\n"
"subjectAltName = email:copy\n"].
-
-ca_cnf(CA) ->
+ca_cnf(C) ->
["# Purpose: Configuration for CAs.\n"
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -258,21 +377,23 @@ ca_cnf(CA) ->
"\n"
"[ca]\n"
- "dir = $ROOTDIR/", CA, "\n"
+ "dir = $ROOTDIR/", C#config.commonName, "\n"
"certs = $dir/certs\n"
"crl_dir = $dir/crl\n"
"database = $dir/index.txt\n"
"new_certs_dir = $dir/newcerts\n"
"certificate = $dir/cert.pem\n"
"serial = $dir/serial\n"
- "crl = $dir/crl.pem\n"
+ "crl = $dir/crl.pem\n",
+ ["crlnumber = $dir/crlnumber\n" || C#config.v2_crls],
"private_key = $dir/private/key.pem\n"
"RANDFILE = $dir/private/RAND\n"
"\n"
- "x509_extensions = user_cert\n"
+ "x509_extensions = user_cert\n",
+ ["crl_extensions = crl_ext\n" || C#config.v2_crls],
"unique_subject = no\n"
"default_days = 3600\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"preserve = no\n"
"policy = policy_match\n"
"\n"
@@ -286,6 +407,13 @@ ca_cnf(CA) ->
"emailAddress = supplied\n"
"\n"
+ "[crl_ext]\n"
+ "authorityKeyIdentifier=keyid:always,issuer:always\n",
+ ["issuingDistributionPoint=critical, @idpsec\n" || C#config.issuing_distribution_point],
+
+ "[idpsec]\n"
+ "fullname=URI:http://localhost:8000/",C#config.commonName,"/crl.pem\n"
+
"[user_cert]\n"
"basicConstraints = CA:false\n"
"keyUsage = nonRepudiation, digitalSignature, keyEncipherment\n"
@@ -293,6 +421,12 @@ ca_cnf(CA) ->
"authorityKeyIdentifier = keyid,issuer:always\n"
"subjectAltName = email:copy\n"
"issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+
+ "[crl_section]\n"
+ %% intentionally invalid
+ "URI.1=http://localhost/",C#config.commonName,"/crl.pem\n"
+ "URI.2=http://localhost:",integer_to_list(C#config.crl_port),"/",C#config.commonName,"/crl.pem\n"
"\n"
"[user_cert_digital_signature_only]\n"
@@ -310,4 +444,7 @@ ca_cnf(CA) ->
"subjectKeyIdentifier = hash\n"
"authorityKeyIdentifier = keyid:always,issuer:always\n"
"subjectAltName = email:copy\n"
- "issuerAltName = issuer:copy\n"].
+ "issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+ ].
+
diff --git a/lib/ssl/test/ssl_ECC_SUITE.erl b/lib/ssl/test/ssl_ECC_SUITE.erl
index 608f2f11c3..3566a8a0a5 100644
--- a/lib/ssl/test/ssl_ECC_SUITE.erl
+++ b/lib/ssl/test/ssl_ECC_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -57,41 +57,51 @@ all_versions_groups ()->
].
key_cert_combinations() ->
- [client_ec_server_ec,
- client_rsa_server_ec,
- client_ec_server_rsa,
- client_rsa_server_rsa].
+ [client_ecdh_server_ecdh,
+ client_rsa_server_ecdh,
+ client_ecdh_server_rsa,
+ client_rsa_server_rsa,
+ client_ecdsa_server_ecdsa,
+ client_ecdsa_server_rsa,
+ client_rsa_server_ecdsa
+ ].
%%--------------------------------------------------------------------
-init_per_suite(Config) ->
- catch crypto:stop(),
+init_per_suite(Config0) ->
+ end_per_suite(Config0),
try crypto:start() of
ok ->
- ssl:start(),
- Config
+ %% make rsa certs using oppenssl
+ Result =
+ (catch make_certs:all(?config(data_dir, Config0),
+ ?config(priv_dir, Config0))),
+ ct:log("Make certs ~p~n", [Result]),
+ Config1 = ssl_test_lib:make_ecdsa_cert(Config0),
+ Config2 = ssl_test_lib:make_ecdh_rsa_cert(Config1),
+ ssl_test_lib:cert_options(Config2)
catch _:_ ->
{skip, "Crypto did not start"}
end.
end_per_suite(_Config) ->
- ssl:stop(),
+ application:stop(ssl),
application:stop(crypto).
%%--------------------------------------------------------------------
-init_per_group(erlang_client, Config) ->
+init_per_group(erlang_client = Group, Config) ->
case ssl_test_lib:is_sane_ecc(openssl) of
true ->
- common_init_per_group(erlang_client, [{server_type, openssl},
- {client_type, erlang} | Config]);
+ common_init_per_group(Group, [{server_type, openssl},
+ {client_type, erlang} | Config]);
false ->
{skip, "Known ECC bug in openssl"}
end;
-init_per_group(erlang_server, Config) ->
+init_per_group(erlang_server = Group, Config) ->
case ssl_test_lib:is_sane_ecc(openssl) of
true ->
- common_init_per_group(erlang_client, [{server_type, erlang},
- {client_type, openssl} | Config]);
+ common_init_per_group(Group, [{server_type, erlang},
+ {client_type, openssl} | Config]);
false ->
{skip, "Known ECC bug in openssl"}
end;
@@ -99,11 +109,21 @@ init_per_group(erlang_server, Config) ->
init_per_group(erlang = Group, Config) ->
case ssl_test_lib:sufficient_crypto_support(Group) of
true ->
- common_init_per_group(erlang, [{server_type, erlang},
- {client_type, erlang} | Config]);
+ common_init_per_group(Group, [{server_type, erlang},
+ {client_type, erlang} | Config]);
+ false ->
+ {skip, "Crypto does not support ECC"}
+ end;
+
+init_per_group(openssl = Group, Config) ->
+ case ssl_test_lib:sufficient_crypto_support(Group) of
+ true ->
+ common_init_per_group(Group, [{server_type, openssl},
+ {client_type, openssl} | Config]);
false ->
{skip, "Crypto does not support ECC"}
- end;
+ end;
+
init_per_group(Group, Config) ->
common_init_per_group(Group, Config).
@@ -121,76 +141,118 @@ end_per_group(_GroupName, Config) ->
%%--------------------------------------------------------------------
-init_per_testcase(_TestCase, Config) ->
+init_per_testcase(TestCase, Config) ->
ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()]),
ct:log("Ciphers: ~p~n ", [ ssl:cipher_suites()]),
+ end_per_testcase(TestCase, Config),
+ ssl:start(),
Config.
-end_per_testcase(_TestCase, Config) ->
+end_per_testcase(_TestCase, Config) ->
+ application:stop(ssl),
Config.
%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
%%--------------------------------------------------------------------
-client_ec_server_ec(Config) when is_list(Config) ->
- basic_test("ec1.crt", "ec1.key", "ec2.crt", "ec2.key", Config).
-
-client_ec_server_rsa(Config) when is_list(Config) ->
- basic_test("ec1.crt", "ec1.key", "rsa1.crt", "rsa1.key", Config).
+client_ecdh_server_ecdh(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdh_rsa_opts, Config),
+ SOpts = ?config(server_ecdh_rsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
+
+client_ecdh_server_rsa(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdh_rsa_opts, Config),
+ SOpts = ?config(server_ecdh_rsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
+
+client_rsa_server_ecdh(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdh_rsa_opts, Config),
+ SOpts = ?config(server_ecdh_rsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
+
+client_rsa_server_rsa(Config) when is_list(Config) ->
+ COpts = ?config(client_verification_opts, Config),
+ SOpts = ?config(server_verification_opts, Config),
+ basic_test(COpts, SOpts, Config).
+
+client_ecdsa_server_ecdsa(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdsa_opts, Config),
+ SOpts = ?config(server_ecdsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
-client_rsa_server_ec(Config) when is_list(Config) ->
- basic_test("rsa1.crt", "rsa1.key", "ec2.crt", "ec2.key", Config).
+client_ecdsa_server_rsa(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdsa_opts, Config),
+ SOpts = ?config(server_ecdsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
-client_rsa_server_rsa(Config) when is_list(Config) ->
- basic_test("rsa1.crt", "rsa1.key", "rsa2.crt", "rsa2.key", Config).
+client_rsa_server_ecdsa(Config) when is_list(Config) ->
+ COpts = ?config(client_ecdsa_opts, Config),
+ SOpts = ?config(server_ecdsa_verify_opts, Config),
+ basic_test(COpts, SOpts, Config).
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
-basic_test(ClientCert, ClientKey, ServerCert, ServerKey, Config) ->
- DataDir = ?config(data_dir, Config),
+basic_test(COpts, SOpts, Config) ->
+ basic_test(proplists:get_value(certfile, COpts),
+ proplists:get_value(keyfile, COpts),
+ proplists:get_value(cacertfile, COpts),
+ proplists:get_value(certfile, SOpts),
+ proplists:get_value(keyfile, SOpts),
+ proplists:get_value(cacertfile, SOpts),
+ Config).
+
+basic_test(ClientCert, ClientKey, ClientCA, ServerCert, ServerKey, ServerCA, Config) ->
SType = ?config(server_type, Config),
CType = ?config(client_type, Config),
{Server, Port} = start_server(SType,
- filename:join(DataDir, "CA.pem"),
- filename:join(DataDir, ServerCert),
- filename:join(DataDir, ServerKey),
+ ClientCA, ServerCA,
+ ServerCert,
+ ServerKey,
Config),
- Client = start_client(CType, Port, filename:join(DataDir, "CA.pem"),
- filename:join(DataDir, ClientCert),
- filename:join(DataDir, ClientKey), Config),
- check_result(Server, SType, Client, CType).
+ Client = start_client(CType, Port, ServerCA, ClientCA,
+ ClientCert,
+ ClientKey, Config),
+ check_result(Server, SType, Client, CType),
+ close(Server, Client).
-start_client(openssl, Port, CA, Cert, Key, _) ->
+start_client(openssl, Port, CA, OwnCa, Cert, Key, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NewCA = new_ca(filename:join(PrivDir, "new_ca.pem"), CA, OwnCa),
Version = tls_record:protocol_version(tls_record:highest_protocol_version([])),
- Cmd = "openssl s_client -port " ++ integer_to_list(Port) ++ ssl_test_lib:version_flag(Version) ++
- " -cert " ++ Cert ++ " -CAfile " ++ CA
- ++ " -key " ++ Key ++ " -host localhost -msg",
+ Cmd = "openssl s_client -verify 2 -port " ++ integer_to_list(Port) ++ ssl_test_lib:version_flag(Version) ++
+ " -cert " ++ Cert ++ " -CAfile " ++ NewCA
+ ++ " -key " ++ Key ++ " -host localhost -msg -debug",
OpenSslPort = open_port({spawn, Cmd}, [stderr_to_stdout]),
true = port_command(OpenSslPort, "Hello world"),
OpenSslPort;
-start_client(erlang, Port, CA, Cert, Key, Config) ->
+start_client(erlang, Port, CA, _, Cert, Key, Config) ->
{ClientNode, _, Hostname} = ssl_test_lib:run_where(Config),
ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
{host, Hostname},
{from, self()},
{mfa, {ssl_test_lib, send_recv_result_active, []}},
- {options, [{verify, verify_peer}, {cacertfile, CA},
+ {options, [{verify, verify_peer},
+ {cacertfile, CA},
{certfile, Cert}, {keyfile, Key}]}]).
-start_server(openssl, CA, Cert, Key, _) ->
+start_server(openssl, CA, OwnCa, Cert, Key, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NewCA = new_ca(filename:join(PrivDir, "new_ca.pem"), CA, OwnCa),
+
Port = ssl_test_lib:inet_port(node()),
Version = tls_record:protocol_version(tls_record:highest_protocol_version([])),
Cmd = "openssl s_server -accept " ++ integer_to_list(Port) ++ ssl_test_lib:version_flag(Version) ++
- " -cert " ++ Cert ++ " -CAfile " ++ CA
- ++ " -key " ++ Key ++ " -Verify 2 -msg",
+ " -verify 2 -cert " ++ Cert ++ " -CAfile " ++ NewCA
+ ++ " -key " ++ Key ++ " -msg -debug",
OpenSslPort = open_port({spawn, Cmd}, [stderr_to_stdout]),
ssl_test_lib:wait_for_openssl_server(),
true = port_command(OpenSslPort, "Hello world"),
{OpenSslPort, Port};
-start_server(erlang, CA, Cert, Key, Config) ->
+start_server(erlang, CA, _, Cert, Key, Config) ->
+
{_, ServerNode, _} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -217,9 +279,31 @@ openssl_check(_, Config) ->
TLSVersion = ?config(tls_version, Config),
case ssl_test_lib:check_sane_openssl_version(TLSVersion) of
true ->
- ssl:start(),
Config;
false ->
{skip, "TLS version not supported by openssl"}
end.
+close(Port1, Port2) when is_port(Port1), is_port(Port2) ->
+ ssl_test_lib:close_port(Port1),
+ ssl_test_lib:close_port(Port2);
+close(Port, Pid) when is_port(Port) ->
+ ssl_test_lib:close_port(Port),
+ ssl_test_lib:close(Pid);
+close(Pid, Port) when is_port(Port) ->
+ ssl_test_lib:close_port(Port),
+ ssl_test_lib:close(Pid);
+close(Client, Server) ->
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%% Work around OpenSSL bug, apparently the same bug as we had fixed in
+%% 11629690ba61f8e0c93ef9b2b6102fd279825977
+new_ca(FileName, CA, OwnCa) ->
+ {ok, P1} = file:read_file(CA),
+ 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),
+ FileName.
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/CA.pem b/lib/ssl/test/ssl_ECC_SUITE_data/CA.pem
deleted file mode 100644
index f82efdefc5..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/CA.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICGjCCAYegAwIBAgIQZIIqq4RXfpBKJXV69Jc4BjAJBgUrDgMCHQUAMB0xGzAZ
-BgNVBAMTEklTQSBUZXN0IEF1dGhvcml0eTAeFw0xMjAzMjAxNzEzMjFaFw0zOTEy
-MzEyMzU5NTlaMB0xGzAZBgNVBAMTEklTQSBUZXN0IEF1dGhvcml0eTCBnzANBgkq
-hkiG9w0BAQEFAAOBjQAwgYkCgYEAqnt6FSyFQVSDyP7mY63IhCzgysTxBEg1qDb8
-nBHj9REReZA5UQ5iyEOdTbdLyOaSk2rJyA2wdTjYkNnLzK49nZFlpf89r3/bakAM
-wZv69S3FJi9W2z9m4JPv/5+QCYnFNRSnnHw3maNElwoQyknx96I3W7EuVOvKtKhh
-4DaD0WsCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zBOBgNVHQEERzBFgBBCHwn2
-8AmbN+cvJl1iJ1bsoR8wHTEbMBkGA1UEAxMSSVNBIFRlc3QgQXV0aG9yaXR5ghBk
-giqrhFd+kEoldXr0lzgGMAkGBSsOAwIdBQADgYEAIlVecua5Cr1z/cdwQ8znlgOU
-U+y/uzg0nupKkopzVnRYhwV4hxZt3izAz4C/SJZB7eL0bUKlg1ceGjbQsGEm0fzF
-LEV3vym4G51bxv03Iecwo96G4NgjJ7+9/7ciBVzfxZyfuCpYG1M2LyrbOyuevtTy
-2+vIueT0lv6UftgBfIE=
------END CERTIFICATE-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/ec1.crt b/lib/ssl/test/ssl_ECC_SUITE_data/ec1.crt
deleted file mode 100644
index 7d2b9cde9d..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/ec1.crt
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIBhjCB8AIBBjANBgkqhkiG9w0BAQUFADAdMRswGQYDVQQDExJJU0EgVGVzdCBB
-dXRob3JpdHkwHhcNMTMwODA4MTAxNDI3WhcNMjMwODA2MTAxNDI3WjBFMQswCQYD
-VQQGEwJVUzERMA8GA1UECBMIVmlyZ2luaWExFTATBgNVBAcTDEZvcnQgQmVsdm9p
-cjEMMAoGA1UEAxMDZWMxMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEpiRIxUCESROR
-P8IByg+vBv1fDdAg7yXfAh95GxFtvhBqZs6ATwaRKyLmZYgUm/4NUAyUeqmTBb7s
-2msKo5mnNzANBgkqhkiG9w0BAQUFAAOBgQAmwzoB1DVO69FQOUdBVnyups4t0c1c
-8h+1z/5P4EtPltk4o3mRn0AZogqdXCpNbuSGbSJh+dep5xW30VLxNHdc+tZSLK6j
-pT7A3hymMk8qbi13hxeH/VpEP25y1EjHowow9Wmb6ebtT/v7qFQ9AAHD9ONcIM4I
-FCC8vdFo7M5GgQ==
------END CERTIFICATE-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/ec1.key b/lib/ssl/test/ssl_ECC_SUITE_data/ec1.key
deleted file mode 100644
index 2dc9508b3c..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/ec1.key
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN EC PARAMETERS-----
-BgUrgQQACg==
------END EC PARAMETERS-----
------BEGIN EC PRIVATE KEY-----
-MHQCAQEEIOO0WK8znNzLyZIoGRIlaKnCNr2Wy8uk9i+GGFIhDGNAoAcGBSuBBAAK
-oUQDQgAEpiRIxUCESRORP8IByg+vBv1fDdAg7yXfAh95GxFtvhBqZs6ATwaRKyLm
-ZYgUm/4NUAyUeqmTBb7s2msKo5mnNw==
------END EC PRIVATE KEY-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/ec2.crt b/lib/ssl/test/ssl_ECC_SUITE_data/ec2.crt
deleted file mode 100644
index b0558a0ebc..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/ec2.crt
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIBhjCB8AIBBzANBgkqhkiG9w0BAQUFADAdMRswGQYDVQQDExJJU0EgVGVzdCBB
-dXRob3JpdHkwHhcNMTMwODA4MTAxNDM0WhcNMjMwODA2MTAxNDM0WjBFMQswCQYD
-VQQGEwJVUzERMA8GA1UECBMIVmlyZ2luaWExFTATBgNVBAcTDEZvcnQgQmVsdm9p
-cjEMMAoGA1UEAxMDZWMyMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEzXaYReUyvoYl
-FwGOe0MJEXWCUncMfr2xG4GMjGYlfZsvLGEokefsJIvW+I+9jgUT2UFjxFXYNAvm
-uD1A1iWVWjANBgkqhkiG9w0BAQUFAAOBgQBFa6iIlrT9DWptIdB8uSYvp7qwiHxN
-hiVH5YhGIHHqjGZqtRHrSxqNEYMXXrgH9Hxc6gDbk9PsHZyVVoh/HgVWddqW1inh
-tStZm420PAKCuH4T6Cfsk76GE2m7FRzJvw9TM1f2A5nIy9abyrpup8lZGcIL4Kmq
-1Fix1LRtrmLNTA==
------END CERTIFICATE-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/ec2.key b/lib/ssl/test/ssl_ECC_SUITE_data/ec2.key
deleted file mode 100644
index 366d13648b..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/ec2.key
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN EC PARAMETERS-----
-BgUrgQQACg==
------END EC PARAMETERS-----
------BEGIN EC PRIVATE KEY-----
-MHQCAQEEIPR3ORUpAFMTQhUJ0jllN38LKWziG8yP2H54Y/9vh1PwoAcGBSuBBAAK
-oUQDQgAEzXaYReUyvoYlFwGOe0MJEXWCUncMfr2xG4GMjGYlfZsvLGEokefsJIvW
-+I+9jgUT2UFjxFXYNAvmuD1A1iWVWg==
------END EC PRIVATE KEY-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.crt b/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.crt
deleted file mode 100644
index ed9beacf68..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.crt
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDVjCCAr8CAQkwDQYJKoZIhvcNAQEFBQAwHTEbMBkGA1UEAxMSSVNBIFRlc3Qg
-QXV0aG9yaXR5MB4XDTEzMDgwODEwMTUzNFoXDTQwMTIyNDEwMTUzNFowRjELMAkG
-A1UEBhMCVVMxETAPBgNVBAgTCFZpcmdpbmlhMRUwEwYDVQQHEwxGb3J0IEJlbHZv
-aXIxDTALBgNVBAMTBHJzYTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
-AQC62v40w1AjV3oJuyYC2Fw6XhTOi1il6xZFnB9J1WhCmuxAB/VMhBcNypx38mNk
-eQ7a/ERQ5ddhZey29DYeFYU8oqfDURgWx5USHufb90xBen9KPmX3VNuQ8ZFP2q8Q
-b01/oRHBJQRBuaCtFHzpGIVBjC6dD5yeQgJsYaF4u+PBbonsIGROXMybcvUzXmjU
-dwpy2NhjGQL5sWcOdIeRP43APSyRYvq4tuBUZk2XxWfBcvA8LpcoYPMlRTf6jGL1
-/fAAcCYJ9lh3h92w0NZ/7ZRa/ebTplxK6yqCftuSKui1KdL69m0WZqHl79AUSfs9
-lsOwx9lHkyYvJeMofyeDbZ+3OYLmVqEBG1fza2aV2XVh9zJ8fAwmXy/c2IDhw/oD
-HAe/rSg/Sgt03ydIKqtZHbl3v0EexQQRlJRULIzdtON02dJMUd4EFUgQ9OUtEmC2
-Psj9Jdu1g5cevU7Mymu8Ot+fjHiGTcBUsXNuXFCbON3Gw7cIDl4+iv+cpDHHVC9L
-HK3PMEq3vu3qOGXSz+LDOoqkfROcLG7BclBuN2zoVSsMHFkB4aJhwy7eHhGz0z2W
-c6LTVd+GAApdY80kmjOjT//QxHEsX/n1useHza3OszQqZiArr4ub4rtq+l1DxAS/
-DWrZ/JGsbKL8cjWso6qBF94xTi8WhjkKuUYhsm+qLAbNOQIDAQABMA0GCSqGSIb3
-DQEBBQUAA4GBAIcuzqRkfypV/9Z85ZQCCoejPm5Urhv7dfg1/B3QtazogPBZLgL5
-e60fG1uAw5GmqTViHLvW06z73oQvJrFkrCLVvadDNtrKYKXnXqdkgVyk36F/B737
-A43HGnMfSxCfRhIOuKZB9clP5PiNlhw36yi3DratqT6TUvI69hg8a7jA
------END CERTIFICATE-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.key b/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.key
deleted file mode 100644
index 6e0d913d79..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/rsa1.key
+++ /dev/null
@@ -1,51 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIJKAIBAAKCAgEAutr+NMNQI1d6CbsmAthcOl4UzotYpesWRZwfSdVoQprsQAf1
-TIQXDcqcd/JjZHkO2vxEUOXXYWXstvQ2HhWFPKKnw1EYFseVEh7n2/dMQXp/Sj5l
-91TbkPGRT9qvEG9Nf6ERwSUEQbmgrRR86RiFQYwunQ+cnkICbGGheLvjwW6J7CBk
-TlzMm3L1M15o1HcKctjYYxkC+bFnDnSHkT+NwD0skWL6uLbgVGZNl8VnwXLwPC6X
-KGDzJUU3+oxi9f3wAHAmCfZYd4fdsNDWf+2UWv3m06ZcSusqgn7bkirotSnS+vZt
-Fmah5e/QFEn7PZbDsMfZR5MmLyXjKH8ng22ftzmC5lahARtX82tmldl1YfcyfHwM
-Jl8v3NiA4cP6AxwHv60oP0oLdN8nSCqrWR25d79BHsUEEZSUVCyM3bTjdNnSTFHe
-BBVIEPTlLRJgtj7I/SXbtYOXHr1OzMprvDrfn4x4hk3AVLFzblxQmzjdxsO3CA5e
-Por/nKQxx1QvSxytzzBKt77t6jhl0s/iwzqKpH0TnCxuwXJQbjds6FUrDBxZAeGi
-YcMu3h4Rs9M9lnOi01XfhgAKXWPNJJozo0//0MRxLF/59brHh82tzrM0KmYgK6+L
-m+K7avpdQ8QEvw1q2fyRrGyi/HI1rKOqgRfeMU4vFoY5CrlGIbJvqiwGzTkCAwEA
-AQKCAgBkXyaWKSRvF5pSh9lPRfGk2MzMdkXUOofoNIkKHDy5KocljiDSTVIk8mVC
-eU2ytuSn9UKtQgmEJEAXtu8rEdxUSftcC7+o3OTSqw9ZNWoc8jRWKVaUmVyoa1rn
-Tk0jwuYaXOcwnTXAKHqK/qpqe+V45FhVvgEfcc3jcj5OoH8jdMFZubyn62ltRz83
-rMsa9icCskDqWpEil40IUshP2ZfHYBUEs+qCNpoiPCIKGNw3KgqqCUzhP9LcfmYn
-jCnMge/eDGAikdXLv4vyYvwWFATRK/pGTuLcy542IvbHeY0vY5wVezH2CoOFBGD9
-xQ/UcZwE5hVtQToNsYhoRIVxL/3Of0qDk1M6W2Plh2MAstyejIHE3ct0pPfW3rsu
-j/9Z/H0P9Q5ghSjarwOp2qGrrz6/4LVbbTDY8V1L928l4SqbUMtEQxcxTBN8YFoD
-mPV3Jc3zls9wiiEX53RcH8MK5tjrcRwWqurTZvi/pkLfXlGDgKGCOaa3HgWVQyU+
-L6jVZM+u1nwN+jNXQYGeLEro/6tvG8WQbRMHQoxLG+rm4V3/SwH0DcfrVFDTg+i6
-3wMU1GC/aQEdTFWXvHAkpwrf4M9QWvjtheiaSxtBUoAY6l+ixCVHKrIk6glKLEjx
-92HxmcJdopQScFETAyg8eVKV0kOGfVeFEpIqwq7hVedmTflpQQKCAQEA44h4dAta
-cYeBqBr8eljWcgs79gmgwBEQxQUnwE/zuzLKn5NxAW324Kh25V/n/MupUzBlLPWn
-91UHfw9PCXT8/HvgYQ4S5sXbKRbGmuPSsTmz4Rfe2ix6RggVNUOwORVNDyM7SQh7
-USdzZH5dMxKfF5L/b4Byx7eQZaoeKlfaXcqgikNZZ6pkhVCNxUKi9vvjS9r2wwCd
-xtgu5MfTpdEci0zH1+uuRisVRcEbcRX9umUTCiZrmEeddZXNiwTAS3FtX7qGzuq9
-LKIeETwcOZrWj0E48UvbSfK4Axn7sf5J0n7/Qo7I089S5QQEI6ZDP501i71dNFhn
-qfcY30c1k3TC7QKCAQEA0juuVHExKNLLNmQejNPfuHYoH0Uk2BH/8x96/Mkj6k6K
-SUCHDS3iWOljXGw8YtpS8v5mGBGgMhJ+s/vCRM6R9eXYTc8u2ktY/kjyW0PgW8/Z
-vb9VrQpn5svTNwj2Q8qYsTqXnQKO7YuL+hnQpQNAcID6FTeOASVLGObEf810qRfN
-4y3RqCWUnYXXTyXj+cJdbXTxfF7HVZPIAQKqE7J5Qo9ynYILY62oSmUGC6m8VKyE
-rrvDMK1IVi0X4w+Jx4HX0IC2+DBKxCaLWT69bE1IwjB06Q5zoTQPVi6c6qQp7K0H
-kqSyLJ/ctwcEubu0DPNmvMlgWtAbAsoESA5GbIit/QKCAQEAxRzp9OYNAUM6AK74
-QOmLRZsT4+6tUxa1p2jy6fiZlnfG731kra9c630mG0n9iJPK6aWIUO20CGGiL+HM
-P84YiIaseIgfucp4NV1kyrRJR31MptjuF6Xme5ru/IjaNmmMq2uDJZ7ybfi2T73k
-8aTVLDANl8P4K6qLrnc00MvxAcXTVFRKNLN5h8CkQNqcoUjPvVxA3+g9xxBrd4jh
-gsnoZ4kpq5WiEWmrcRV8t3gsqfh8CRQFrBOGhmIzgZapG/J0pTTLKqBTKEJ9t8KS
-VRkdfVcshGWJ4MMjxJQS5zz7KR8Z9cgKlOwLzRiwmU2k/owr4hY3k2xuyeClrHBd
-KpRBdQKCAQBvDk/dE55gbloi9WieBB6eluxC+IeqDHgkunCBsM9kKvEqGQg+kgqL
-5V4zqImNvr8q1fCgrk7tpI+CDHBnYKgCOdS15cheUIdGbMp6I7UVSws/DR/5NRIF
-/Y4p+HX/Abr/hHAq5PsTyS+8gn6RbNJRnBB/vMUrHcQ5902+JY6G9KgyZjXmmVOU
-kutWSDHR8jbgZ3JZvMeYEWUKA5pMpW8hFh35zoStt0K7afpzlsqCAFBm7ZEC2cbo
-nxGLRN4HojObVSNSoFAepi3eiyINYBYbXvWjV5sFgTbI0/7YhLgQ6qahdJcas6go
-l3CLnPhUDxAqkkZwMpbSNl1kowXYt6sRAoIBAAOWnXgf9Bdb9OWKGgt42gVfC4cz
-zj2JoLpbDTtbEdHNn8XQvPhGbpdtgnsuEMijIMy1UTlmv17jbFWdZTDeN31EUJrC
-smgKX0OlVFKD90AI0BiIREK0hJUBV0pV4JoUjwnQBHGvranD06/wAtHEqgqF1Ipp
-DCAKwxggM7qtB1R1vkrc/aLQej+mlwA8N6q92rnEsg+EnEbhtLDDZQcV/q5cSDCN
-MMcnM+QdyjKwEeCVXHaqNfeSqKg/Ab2eZbS9VxA+XZD73+eUY/JeJsg7LfZrRz0T
-ij5LCS7A+nVB5/B5tGkk4fcNhk2n356be6l46S98BEgtuwGLC9pqXf7zyp4=
------END RSA PRIVATE KEY-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.crt b/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.crt
deleted file mode 100644
index 06ca92dda3..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.crt
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDVjCCAr8CAQowDQYJKoZIhvcNAQEFBQAwHTEbMBkGA1UEAxMSSVNBIFRlc3Qg
-QXV0aG9yaXR5MB4XDTEzMDgwODEwMTYwMloXDTQwMTIyNDEwMTYwMlowRjELMAkG
-A1UEBhMCVVMxETAPBgNVBAgTCFZpcmdpbmlhMRUwEwYDVQQHEwxGb3J0IEJlbHZv
-aXIxDTALBgNVBAMTBHJzYTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
-AQCjQUe0BGOpULjOAmLbXM4SSQzJvxJbCFi3tryyd+OARq6Fdp6/fslVhsr0PhWE
-X8yRbAugIjseTpLwz+1OC6LavOGV1ixzGTI/9HDXGKbf8qoCrSdh28sqQJnmqGT4
-UCKLn6Rqjg2iyBBcSK3LrtKEPI4C7NaSOZUtANkppvziEMwm+0r16sgHh2Xx6mxd
-22q01kq1lJqwEnIDPMSz3+ESUVQQ4T3ka7yFIhc9PYmILIXkZi0x7AiDeRkIILul
-GQrduTWSPGY3prXeDAbmQNazxrHp8fcR2AfFSI6HYxMALq9jWxc4xDIkss6BO2Et
-riJOIgXFpbyVsYCbkI1kXhEWFDt3uJBIcmtJKGzro4xv+XLG6BbUeTJgSHXMc7Cb
-fX87+CBIFR5a/aqkEKh/mcvsDdaV+kpNKdr7q4wAuIQb8g7IyXEDuAm1VZjQs9WC
-KFRGSq9sergEw9gna0iThRZjD+dzNzB17XmlAK4wa98a7MntwqpAt/GsCFOiPM8E
-c+8gpuo8WqC0kP8OpImyw9cQhlZ3dca1qkr2cyKyAOGxUxyA67FgiHSsxJJ2Xhse
-o49qeKTjMZd8zhSokM2TH6qEf7YfOePU51YRfAHUhzRmE31N/MExqDjFjklksEtM
-iHhbPo+cOoxV8x1u13umdUvtTaAUSBA/DpvzWdnORvnaqQIDAQABMA0GCSqGSIb3
-DQEBBQUAA4GBAFD+O7h+5R5S1rIN9eC+oEGpvRhMG4v4G3pJp+c7bbtO7ifFx1WP
-bta1b5YtiQYcKP0ORABm/3Kcvsb3VbaMH/zkxWEbASZsmIcBY3ml4f2kkn6WT2hD
-Wc6VMIAR3N6Mj1b30yI1qYVIid+zIouiykMB+zqllm+Uar0SPNjKxDU/
------END CERTIFICATE-----
diff --git a/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.key b/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.key
deleted file mode 100644
index d415ef0391..0000000000
--- a/lib/ssl/test/ssl_ECC_SUITE_data/rsa2.key
+++ /dev/null
@@ -1,51 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIJJwIBAAKCAgEAo0FHtARjqVC4zgJi21zOEkkMyb8SWwhYt7a8snfjgEauhXae
-v37JVYbK9D4VhF/MkWwLoCI7Hk6S8M/tTgui2rzhldYscxkyP/Rw1xim3/KqAq0n
-YdvLKkCZ5qhk+FAii5+kao4NosgQXEity67ShDyOAuzWkjmVLQDZKab84hDMJvtK
-9erIB4dl8epsXdtqtNZKtZSasBJyAzzEs9/hElFUEOE95Gu8hSIXPT2JiCyF5GYt
-MewIg3kZCCC7pRkK3bk1kjxmN6a13gwG5kDWs8ax6fH3EdgHxUiOh2MTAC6vY1sX
-OMQyJLLOgTthLa4iTiIFxaW8lbGAm5CNZF4RFhQ7d7iQSHJrSShs66OMb/lyxugW
-1HkyYEh1zHOwm31/O/ggSBUeWv2qpBCof5nL7A3WlfpKTSna+6uMALiEG/IOyMlx
-A7gJtVWY0LPVgihURkqvbHq4BMPYJ2tIk4UWYw/nczcwde15pQCuMGvfGuzJ7cKq
-QLfxrAhTojzPBHPvIKbqPFqgtJD/DqSJssPXEIZWd3XGtapK9nMisgDhsVMcgOux
-YIh0rMSSdl4bHqOPanik4zGXfM4UqJDNkx+qhH+2Hznj1OdWEXwB1Ic0ZhN9TfzB
-Mag4xY5JZLBLTIh4Wz6PnDqMVfMdbtd7pnVL7U2gFEgQPw6b81nZzkb52qkCAwEA
-AQKCAgBORLHXwHL3bdfsDIDQooG5ioQzBQQL2MiP63A0L/5GNZzeJ6ycKnDkLCeJ
-SWqPeE5fOemo8EBfm1QfV9BxpmqBbCTK7U+KLv5EYzDmLs9ydqjDd7h11iZlL2uZ
-hgpCckjdn7/3xfsLm9ccJ0wLZtlOxKlhBaMpn6nBVbLHoWOEDoGR/tBFbjZQRb2+
-aaFirhtOb56Jx6ER4QYAP1Ye1qrVWWBwZ0yBApXzThDOL36MZqwagFISqRK71YcG
-uoq78HGhM3ZXkdV/wNFYj3OPWG6W6h/KBVNqnqO7FbofdoRZhghYHgfYE1fm+ELA
-+nLwr5eK1gzmYTs0mVELRBZFlEOkCfYNOnuRgysFezEklS+ICp3HzIhYXza3kyTf
-B2ZBwZZVCv/94MKyibyANErmv1a5ugY5Hsn9/WKC8qTto+qLYoyFCvBjzj0PSaVX
-/3cty2DY0SK16K1Y4AOPtJMYTXYB3tVX8Akgjz1F6REBtZSOXrSQ3Vhy1ORl3Hzf
-WCBYDqL8K0hJiBVgkvneIyIjmFHsdM60Nr7EldBEnJ/UrPzsl2VuWFPZlnasfUaW
-x+vq1H4Dfz+bHt8coBRHDjKgUvwkfFeBQOBR5DG3vMrxguVRA1EYYMRR5C3yxk2m
-ARAtdh4VxUQDQjjrmr7Dl/y1rU34aInXIrrFWpuvIhl8Ht09sQKCAQEA1pXKK5f0
-HkKfM/qk5xzF+WdHClBrPXi0XwLN6UQ+WWMMNhkGZ+FMPXl/6IJDT91s6DA3tPhr
-OZF64n9ZFaGgHNBXNiB+Txjv5vZeSBMFt3hSonqt42aijx6gXfmLnkA+TYpa6Wex
-YCeEgdH8LocJa7Gj2vzrYliPYk3deh6SnZZ6N8bI+ciwK3ZGF/pkWaTX83dIFq3w
-YyZ+0dEpNGbA9812wNVourPg3OfqG3/CdnTfvY1M9KCC3JalpyzQL4Zm5soXF0wj
-36C2yTxA02AyFz3TvUIBrvsN6i0gmGfE79+UIp29JYrFRsIgBDt+ze2vQWUz2MX5
-GeX6/yCBgiTXtwKCAQEAwsNf6k2m5Cw+WtuLzzUfBBJCN+t1lrnYJ6lF0HubW6TZ
-vX1kBWyc+Rpo4ljr/+f4R9aC/gTEQOmV/hNVZy1RU2dAI8cH+r6JWG9lgif+8h//
-5R81txE7gnuK1Na7PmvnQPPN661zsQZ5e1ENPXS3TJmUW/M01JxAMqEQjvAPa/II
-H2KjL5NX28k9Hiw9rP6n+qXAfG/LEwXgoVCcehPwfANqQ1l95UgOdKDmjG94dipI
-h2DEK70ZbrsgQbT60Wd8I5h0yhiQsik2/bVkqLmcG4SSg0/5cf2vZMApgoH/adUz
-rJFdthm7iGPLhwS6fbhXew17Af96FvzfkifUV+cgnwKCAQBNUlYyFSQKz1jMgxFu
-kciokNVhWw75bIgaAEmwNz38OZuJ1sSfI+iz8hbr8hxNJ+15UP6RwD3q1YghG2A/
-Uij+mPgD8ftxhvvTDo10jR4vOTUVhP0phq8mwRNqKWRs1ptcl3Egz5NzoWm22bJ0
-FYaIfs8bNq2el2i7NHGM8n1EOZe6h2+dyfno/0pMk5YbUzHZce7Q9UY8g/+InUSq
-tCfuYuPaokuFkxGAqDSMSiIJSx3gEI1dTIU69TGlppkxts1XdhSR+YanqyKSKpr1
-T6FdDJNCjAlNQvuFmVM4d5PYF4kqXApu/60MTSD6RXHwxCe1ecEP6G5VLbCew9jG
-y33LAoIBAGsWyC9pwQEm/qYwn4AwYjx32acrtX1J9HtiTLvkqzjJvNu/DXcaEHm7
-tr32TNVp9A9z+JS5hDt49Hs+oC/aMCRe2lqRvmZ1y8kvfy4A1eLGC4stDPj65bDK
-QzziURRyejYxmCElPz6wI63VlCUdfwgEThn88SiSPY5ZF2SwxJoC+8peDwJCzwVP
-cmabxtHPOAfOibciNRPhoHCyhUdunUVjD1O26k1ewGwKaJoBVMgMWdLuNw8hq9FB
-3OukGmF3uD9OPbE9rpn3pX/89Dr9y8MpsvG20J6H8Z/BNVHILus/SmlxiIhvP7kv
-viIgTHaCHL/RWrhvg+8N3dRcSBqJQFsCggEAFe2TMEq2AlnBn4gsuAOIuZPYKQCg
-2a+tl1grQzmNth6AGGQcIqShadICD6SnVMIS64HHV/m18Cuz7GhJ06ZVjXJsHueG
-UpTE9wAmI2LxnNkupkLJu+SVcW3N86PujWmQBFpHkd+IRPLS51xjD9W5zLJ7HL4/
-fnKO+B+ZK6Imxbe5C5vJezkGfeOSyQoVtt6MT/XtSKNEGPBX+M6fLKgUMMg2H2Mt
-/SsD7DkOzFteKXzaEg/K8oOTpsOPkVDwNl2KErlEqbJv0k7yEVw50mYmsn/OLjh8
-+9EibISwCODbPxB+PhV6u2ue1IvGLRqtsN60lFOvbGn+kSewy9EUVHHQDQ==
------END RSA PRIVATE KEY-----
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index 1006b23a30..df9432a43b 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -84,16 +84,20 @@ all_versions_groups ()->
basic_tests() ->
[app,
+ appup,
alerts,
send_close,
+ version_option,
connect_twice,
connect_dist,
- clear_pem_cache
+ clear_pem_cache,
+ fallback
].
options_tests() ->
[der_input,
misc_ssl_options,
+ ssl_options_not_proplist,
socket_options,
invalid_inet_get_option,
invalid_inet_get_option_not_list,
@@ -110,7 +114,13 @@ options_tests() ->
empty_protocol_versions,
ipv6,
reuseaddr,
- tcp_reuseaddr].
+ tcp_reuseaddr,
+ honor_server_cipher_order,
+ honor_client_cipher_order,
+ ciphersuite_vs_version,
+ unordered_protocol_versions_server,
+ unordered_protocol_versions_client
+].
api_tests() ->
[connection_info,
@@ -131,7 +141,9 @@ api_tests() ->
ssl_accept_timeout,
ssl_recv_timeout,
versions_option,
- server_name_indication_option
+ server_name_indication_option,
+ accept_pool,
+ new_options_in_accept
].
session_tests() ->
@@ -180,7 +192,11 @@ error_handling_tests()->
tcp_error_propagation_in_active_mode,
tcp_connect,
tcp_connect_big,
- close_transport_accept
+ close_transport_accept,
+ recv_active,
+ recv_active_once,
+ recv_error_handling,
+ dont_crash_on_handshake_garbage
].
rizzo_tests() ->
@@ -233,11 +249,14 @@ end_per_group(_GroupName, Config) ->
Config.
%%--------------------------------------------------------------------
-init_per_testcase(no_authority_key_identifier, Config) ->
- %% Clear cach so that root cert will not
- %% be found.
- ssl:clear_pem_cache(),
- Config;
+init_per_testcase(Case, Config) when Case == unordered_protocol_versions_client;
+ Case == unordered_protocol_versions_server->
+ case proplists:get_value(supported, ssl:versions()) of
+ ['tlsv1.2' | _] ->
+ Config;
+ _ ->
+ {skip, "TLS 1.2 need but not supported on this platform"}
+ end;
init_per_testcase(protocol_versions, Config) ->
ssl:stop(),
@@ -263,6 +282,14 @@ init_per_testcase(empty_protocol_versions, Config) ->
ssl:start(),
Config;
+init_per_testcase(fallback, Config) ->
+ case tls_record:highest_protocol_version([]) of
+ {3, N} when N > 1 ->
+ Config;
+ _ ->
+ {skip, "Not relevant if highest supported version is less than 3.2"}
+ end;
+
%% init_per_testcase(different_ca_peer_sign, Config0) ->
%% ssl_test_lib:make_mix_cert(Config0);
@@ -288,6 +315,11 @@ app() ->
app(Config) when is_list(Config) ->
ok = ?t:app_test(ssl).
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the ssl appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(ssl).
+%%--------------------------------------------------------------------
alerts() ->
[{doc, "Test ssl_alert:alert_txt/1"}].
alerts(Config) when is_list(Config) ->
@@ -298,7 +330,11 @@ alerts(Config) when is_list(Config) ->
?ILLEGAL_PARAMETER, ?UNKNOWN_CA, ?ACCESS_DENIED, ?DECODE_ERROR,
?DECRYPT_ERROR, ?EXPORT_RESTRICTION, ?PROTOCOL_VERSION,
?INSUFFICIENT_SECURITY, ?INTERNAL_ERROR, ?USER_CANCELED,
- ?NO_RENEGOTIATION],
+ ?NO_RENEGOTIATION, ?UNSUPPORTED_EXTENSION, ?CERTIFICATE_UNOBTAINABLE,
+ ?UNRECOGNISED_NAME, ?BAD_CERTIFICATE_STATUS_RESPONSE,
+ ?BAD_CERTIFICATE_HASH_VALUE, ?UNKNOWN_PSK_IDENTITY,
+ 255 %% Unsupported/unknow alert will result in a description too
+ ],
Alerts = [?ALERT_REC(?WARNING, ?CLOSE_NOTIFY) |
[?ALERT_REC(?FATAL, Desc) || Desc <- Descriptions]],
lists:foreach(fun(Alert) ->
@@ -310,6 +346,38 @@ alerts(Config) when is_list(Config) ->
end
end, Alerts).
%%--------------------------------------------------------------------
+new_options_in_accept() ->
+ [{doc,"Test that you can set ssl options in ssl_accept/3 and not tcp upgrade"}].
+new_options_in_accept(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts0 = ?config(server_dsa_opts, Config),
+ [_ , _ | ServerSslOpts] = ?config(server_opts, Config), %% Remove non ssl opts
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {ssl_extra_opts, [{versions, [sslv3]},
+ {ciphers,[{rsa,rc4_128,sha}]} | ServerSslOpts]}, %% To be set in ssl_accept/3
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, proplists:delete(cacertfile, ServerOpts0)}]),
+
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, [sslv3]} | ClientOpts]}]),
+
+ ct:log("Testcase ~p, Client ~p Server ~p ~n",
+ [self(), Client, Server]),
+
+ ServerMsg = ClientMsg = {ok, {sslv3, {rsa, rc4_128, sha}}},
+
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+%%--------------------------------------------------------------------
+
connection_info() ->
[{doc,"Test the API function ssl:connection_info/1"}].
connection_info(Config) when is_list(Config) ->
@@ -349,6 +417,7 @@ protocol_versions() ->
protocol_versions(Config) when is_list(Config) ->
basic_test(Config).
+
%%--------------------------------------------------------------------
empty_protocol_versions() ->
[{doc,"Test to set an empty list of protocol versions in app environment."}].
@@ -583,6 +652,34 @@ clear_pem_cache(Config) when is_list(Config) ->
0 = ets:info(FilRefDb, size).
%%--------------------------------------------------------------------
+
+fallback() ->
+ [{doc, "Test TLS_FALLBACK_SCSV downgrade prevention"}].
+
+fallback(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server =
+ ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {options, ServerOpts}]),
+
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client =
+ ssl_test_lib:start_client_error([{node, ClientNode},
+ {port, Port}, {host, Hostname},
+ {from, self()}, {options,
+ [{fallback, true},
+ {versions, ['tlsv1']}
+ | ClientOpts]}]),
+
+ ssl_test_lib:check_result(Server, {error,{tls_alert,"inappropriate fallback"}},
+ Client, {error,{tls_alert,"inappropriate fallback"}}).
+
+%%--------------------------------------------------------------------
peername() ->
[{doc,"Test API function peername/1"}].
@@ -980,7 +1077,7 @@ misc_ssl_options(Config) when is_list(Config) ->
ServerOpts = ?config(server_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
- %% Chek that ssl options not tested elsewhere are filtered away e.i. not passed to inet.
+ %% Check that ssl options not tested elsewhere are filtered away e.i. not passed to inet.
TestOpts = [{depth, 1},
{key, undefined},
{password, []},
@@ -1008,6 +1105,17 @@ misc_ssl_options(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
+ssl_options_not_proplist() ->
+ [{doc,"Test what happens if an option is not a key value tuple"}].
+
+ssl_options_not_proplist(Config) when is_list(Config) ->
+ BadOption = {client_preferred_next_protocols,
+ client, [<<"spdy/3">>,<<"http/1.1">>], <<"http/1.1">>},
+ {option_not_a_key_value_tuple, BadOption} =
+ ssl:connect("twitter.com", 443, [binary, {active, false},
+ BadOption]).
+
+%%--------------------------------------------------------------------
versions() ->
[{doc,"Test API function versions/0"}].
@@ -1069,6 +1177,13 @@ send_close(Config) when is_list(Config) ->
{error, _} = ssl:send(SslS, "Hello world").
%%--------------------------------------------------------------------
+version_option() ->
+ [{doc, "Use version option and do no specify ciphers list. Bug specified incorrect ciphers"}].
+version_option(Config) when is_list(Config) ->
+ Versions = proplists:get_value(supported, ssl:versions()),
+ [version_option_test(Config, Version) || Version <- Versions].
+
+%%--------------------------------------------------------------------
close_transport_accept() ->
[{doc,"Tests closing ssl socket when waiting on ssl:transport_accept/1"}].
@@ -1089,6 +1204,57 @@ close_transport_accept(Config) when is_list(Config) ->
Other ->
exit({?LINE, Other})
end.
+%%--------------------------------------------------------------------
+recv_active() ->
+ [{doc,"Test recv on active socket"}].
+
+recv_active(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active, []}},
+ {options, [{active, true} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active, []}},
+ {options, [{active, true} | ClientOpts]}]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
+recv_active_once() ->
+ [{doc,"Test recv on active socket"}].
+
+recv_active_once(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active_once, []}},
+ {options, [{active, once} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active_once, []}},
+ {options, [{active, once} | ClientOpts]}]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
dh_params() ->
@@ -1112,7 +1278,7 @@ dh_params(Config) when is_list(Config) ->
{from, self()},
{mfa, {ssl_test_lib, send_recv_result_active, []}},
{options,
- [{ciphers,[{dhe_rsa,aes_256_cbc,sha,ignore}]} |
+ [{ciphers,[{dhe_rsa,aes_256_cbc,sha}]} |
ClientOpts]}]),
ssl_test_lib:check_result(Server, ok, Client, ok),
@@ -1211,7 +1377,7 @@ tcp_connect() ->
tcp_connect(Config) when is_list(Config) ->
ServerOpts = ?config(server_opts, Config),
{_, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
- TcpOpts = [binary, {reuseaddr, true}],
+ TcpOpts = [binary, {reuseaddr, true}, {active, false}],
Server = ssl_test_lib:start_upgrade_server_error([{node, ServerNode}, {port, 0},
{from, self()},
@@ -1237,6 +1403,7 @@ tcp_connect_big() ->
[{doc,"Test what happens when a tcp tries to connect, i,e. a bad big (ssl) packet is sent first"}].
tcp_connect_big(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
ServerOpts = ?config(server_opts, Config),
{_, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
TcpOpts = [binary, {reuseaddr, true}],
@@ -1262,7 +1429,9 @@ tcp_connect_big(Config) when is_list(Config) ->
{Server, {error, timeout}} ->
ct:fail("hangs");
{Server, {error, Error}} ->
- ct:log("Error ~p", [Error])
+ ct:log("Error ~p", [Error]);
+ {'EXIT', Server, _} ->
+ ok
end
end.
@@ -2197,7 +2366,14 @@ der_input(Config) when is_list(Config) ->
ssl_test_lib:check_result(Server, ok, Client, ok),
ssl_test_lib:close(Server),
- ssl_test_lib:close(Client).
+ ssl_test_lib:close(Client),
+
+ {status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)),
+ [_, _,_, _, Prop] = StatusInfo,
+ State = ssl_test_lib:state(Prop),
+ [CADb | _] = element(5, State),
+ [] = ets:tab2list(CADb).
+
%%--------------------------------------------------------------------
der_input_opts(Opts) ->
Certfile = proplists:get_value(certfile, Opts),
@@ -2443,6 +2619,126 @@ tcp_reuseaddr(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+honor_server_cipher_order() ->
+ [{doc,"Test API honor server cipher order."}].
+honor_server_cipher_order(Config) when is_list(Config) ->
+ ClientCiphers = [{rsa, aes_128_cbc, sha}, {rsa, aes_256_cbc, sha}],
+ ServerCiphers = [{rsa, aes_256_cbc, sha}, {rsa, aes_128_cbc, sha}],
+honor_cipher_order(Config, true, ServerCiphers, ClientCiphers, {rsa, aes_256_cbc, sha}).
+
+honor_client_cipher_order() ->
+ [{doc,"Test API honor server cipher order."}].
+honor_client_cipher_order(Config) when is_list(Config) ->
+ ClientCiphers = [{rsa, aes_128_cbc, sha}, {rsa, aes_256_cbc, sha}],
+ ServerCiphers = [{rsa, aes_256_cbc, sha}, {rsa, aes_128_cbc, sha}],
+honor_cipher_order(Config, false, ServerCiphers, ClientCiphers, {rsa, aes_128_cbc, sha}).
+
+honor_cipher_order(Config, Honor, ServerCiphers, ClientCiphers, Expected) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{ciphers, ServerCiphers}, {honor_cipher_order, Honor}
+ | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{ciphers, ClientCiphers}, {honor_cipher_order, Honor}
+ | ClientOpts]}]),
+
+ Version =
+ tls_record:protocol_version(tls_record:highest_protocol_version([])),
+
+ ServerMsg = ClientMsg = {ok, {Version, Expected}},
+
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
+ciphersuite_vs_version(Config) when is_list(Config) ->
+
+ {_ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ {ok, Socket} = gen_tcp:connect(Hostname, Port, [binary, {active, false}]),
+ ok = gen_tcp:send(Socket,
+ <<22, 3,0, 49:16, % handshake, SSL 3.0, length
+ 1, 45:24, % client_hello, length
+ 3,0, % SSL 3.0
+ 16#deadbeef:256, % 32 'random' bytes = 256 bits
+ 0, % no session ID
+ %% three cipher suites -- null, one with sha256 hash and one with sha hash
+ 6:16, 0,255, 0,61, 0,57,
+ 1, 0 % no compression
+ >>),
+ {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),
+ case ServerHello of
+ #server_hello{server_version = {3,0}, cipher_suite = <<0,57>>} ->
+ ok;
+ _ ->
+ ct:fail({unexpected_server_hello, ServerHello})
+ end.
+
+%%--------------------------------------------------------------------
+
+dont_crash_on_handshake_garbage() ->
+ [{doc, "Ensure SSL server worker thows an alert on garbage during handshake "
+ "instead of crashing and exposing state to user code"}].
+
+dont_crash_on_handshake_garbage(Config) ->
+ ServerOpts = ?config(server_opts, Config),
+
+ {_ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ServerOpts}]),
+ unlink(Server), monitor(process, Server),
+ Port = ssl_test_lib:inet_port(Server),
+
+ {ok, Socket} = gen_tcp:connect(Hostname, Port, [binary, {active, false}]),
+
+ % Send hello and garbage record
+ ok = gen_tcp:send(Socket,
+ [<<22, 3,3, 49:16, 1, 45:24, 3,3, % client_hello
+ 16#deadbeef:256, % 32 'random' bytes = 256 bits
+ 0, 6:16, 0,255, 0,61, 0,57, 1, 0 >>, % some hello values
+
+ <<22, 3,3, 5:16, 92,64,37,228,209>> % garbage
+ ]),
+ % Send unexpected change_cipher_spec
+ ok = gen_tcp:send(Socket, <<20, 0,0,12, 111,40,244,7,137,224,16,109,197,110,249,152>>),
+
+ % Ensure we receive an alert, not sudden disconnect
+ {ok, <<21, _/binary>>} = drop_handshakes(Socket, 1000).
+
+drop_handshakes(Socket, Timeout) ->
+ {ok, <<RecType:8, _RecMajor:8, _RecMinor:8, RecLen:16>> = Header} = gen_tcp:recv(Socket, 5, Timeout),
+ {ok, <<Frag:RecLen/binary>>} = gen_tcp:recv(Socket, RecLen, Timeout),
+ case RecType of
+ 22 -> drop_handshakes(Socket, Timeout);
+ _ -> {ok, <<Header/binary, Frag/binary>>}
+ end.
+
+
+%%--------------------------------------------------------------------
+
hibernate() ->
[{doc,"Check that an SSL connection that is started with option "
"{hibernate_after, 1000} indeed hibernates after 1000ms of "
@@ -2840,6 +3136,57 @@ versions_option(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+unordered_protocol_versions_server() ->
+ [{doc,"Test that the highest protocol is selected even"
+ " when it is not first in the versions list."}].
+
+unordered_protocol_versions_server(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, ['tlsv1.1', 'tlsv1.2']} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, ClientOpts}]),
+ CipherSuite = first_rsa_suite(ssl:cipher_suites()),
+ ServerMsg = ClientMsg = {ok, {'tlsv1.2', CipherSuite}},
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg).
+
+%%--------------------------------------------------------------------
+unordered_protocol_versions_client() ->
+ [{doc,"Test that the highest protocol is selected even"
+ " when it is not first in the versions list."}].
+
+unordered_protocol_versions_client(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, ServerOpts }]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, ['tlsv1.1', 'tlsv1.2']} | ClientOpts]}]),
+
+ CipherSuite = first_rsa_suite(ssl:cipher_suites()),
+ ServerMsg = ClientMsg = {ok, {'tlsv1.2', CipherSuite}},
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg).
+
+%%--------------------------------------------------------------------
server_name_indication_option() ->
[{doc,"Test API server_name_indication option to connect."}].
@@ -2877,6 +3224,53 @@ server_name_indication_option(Config) when is_list(Config) ->
ssl_test_lib:close(Server),
ssl_test_lib:close(Client0),
ssl_test_lib:close(Client1).
+%%--------------------------------------------------------------------
+
+accept_pool() ->
+ [{doc,"Test having an accept pool."}].
+accept_pool(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server0 = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {accepters, 3},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server0),
+ [Server1, Server2] = ssl_test_lib:accepters(2),
+
+ Client0 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ Client1 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ Client2 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ ssl_test_lib:check_ok([Server0, Server1, Server2, Client0, Client1, Client2]),
+
+ ssl_test_lib:close(Server0),
+ ssl_test_lib:close(Server1),
+ ssl_test_lib:close(Server2),
+ ssl_test_lib:close(Client0),
+ ssl_test_lib:close(Client1),
+ ssl_test_lib:close(Client2).
+
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
@@ -3337,7 +3731,7 @@ run_suites(Ciphers, Version, Config, Type) ->
Result = lists:map(fun(Cipher) ->
cipher(Cipher, Version, Config, ClientOpts, ServerOpts) end,
- Ciphers),
+ ssl_test_lib:filter_suites(Ciphers)),
case lists:flatten(Result) of
[] ->
ok;
@@ -3388,6 +3782,10 @@ cipher(CipherSuite, Version, Config, ClientOpts, ServerOpts) ->
connection_info_result(Socket) ->
ssl:connection_info(Socket).
+version_info_result(Socket) ->
+ {ok, {Version, _}} = ssl:connection_info(Socket),
+ {ok, Version}.
+
connect_dist_s(S) ->
Msg = term_to_binary({erlang,term}),
ok = ssl:send(S, Msg).
@@ -3440,3 +3838,47 @@ shutdown_both_result(Socket, client) ->
peername_result(S) ->
ssl:peername(S).
+
+version_option_test(Config, Version) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false}, {versions, [Version]}| ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false}, {versions, [Version]}| ClientOpts]}]),
+
+ ct:log("Testcase ~p, Client ~p Server ~p ~n",
+ [self(), Client, Server]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+try_recv_active(Socket) ->
+ ssl:send(Socket, "Hello world"),
+ {error, einval} = ssl:recv(Socket, 11),
+ ok.
+try_recv_active_once(Socket) ->
+ {error, einval} = ssl:recv(Socket, 11),
+ ok.
+
+first_rsa_suite([{ecdhe_rsa, _, _} = Suite | _]) ->
+ Suite;
+first_rsa_suite([{dhe_rsa, _, _} = Suite| _]) ->
+ Suite;
+first_rsa_suite([{rsa, _, _} = Suite| _]) ->
+ Suite;
+first_rsa_suite([_ | Rest]) ->
+ first_rsa_suite(Rest).
+
+
diff --git a/lib/ssl/test/ssl_certificate_verify_SUITE.erl b/lib/ssl/test/ssl_certificate_verify_SUITE.erl
index 14047c6e9c..dab7a941db 100644
--- a/lib/ssl/test/ssl_certificate_verify_SUITE.erl
+++ b/lib/ssl/test/ssl_certificate_verify_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -58,6 +58,10 @@ tests() ->
server_verify_none,
server_require_peer_cert_ok,
server_require_peer_cert_fail,
+ server_require_peer_cert_partial_chain,
+ server_require_peer_cert_allow_partial_chain,
+ server_require_peer_cert_do_not_allow_partial_chain,
+ server_require_peer_cert_partial_chain_fun_fail,
verify_fun_always_run_client,
verify_fun_always_run_server,
cert_expired,
@@ -143,8 +147,8 @@ server_verify_none() ->
[{doc,"Test server option verify_none"}].
server_verify_none(Config) when is_list(Config) ->
- ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ClientOpts = ?config(client_verification_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
Active = ?config(active, Config),
ReceiveFunction = ?config(receive_function, Config),
@@ -261,6 +265,163 @@ server_require_peer_cert_fail(Config) when is_list(Config) ->
end.
%%--------------------------------------------------------------------
+
+server_require_peer_cert_partial_chain() ->
+ [{doc, "Client sends an incompleate chain, by default not acceptable."}].
+
+server_require_peer_cert_partial_chain(Config) when is_list(Config) ->
+ ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
+ | ?config(server_verification_opts, Config)],
+ ClientOpts = ?config(client_verification_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ {ok, ClientCAs} = file:read_file(proplists:get_value(cacertfile, ClientOpts)),
+ [{_,RootCA,_}, {_, _, _}] = public_key:pem_decode(ClientCAs),
+
+
+ Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, [{active, false} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client_error([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, [{active, false},
+ {cacerts, [RootCA]} |
+ proplists:delete(cacertfile, ClientOpts)]}]),
+ receive
+ {Server, {error, {tls_alert, "unknown ca"}}} ->
+ receive
+ {Client, {error, {tls_alert, "unknown ca"}}} ->
+ ok;
+ {Client, {error, closed}} ->
+ ok
+ end
+ end.
+%%--------------------------------------------------------------------
+server_require_peer_cert_allow_partial_chain() ->
+ [{doc, "Server trusts intermediat CA and accepts a partial chain. (partial_chain option)"}].
+
+server_require_peer_cert_allow_partial_chain(Config) when is_list(Config) ->
+ ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
+ | ?config(server_verification_opts, Config)],
+ ClientOpts = ?config(client_verification_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ {ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
+ [{_,_,_}, {_, IntermidiateCA, _}] = public_key:pem_decode(ServerCAs),
+
+ PartialChain = fun(CertChain) ->
+ case lists:member(IntermidiateCA, CertChain) of
+ true ->
+ {trusted_ca, IntermidiateCA};
+ false ->
+ unknown_ca
+ end
+ end,
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, [{cacerts, [IntermidiateCA]},
+ {partial_chain, PartialChain} |
+ proplists:delete(cacertfile, ServerOpts)]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}]),
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+ %%--------------------------------------------------------------------
+server_require_peer_cert_do_not_allow_partial_chain() ->
+ [{doc, "Server does not accept the chain sent by the client as ROOT CA is unkown, "
+ "and we do not choose to trust the intermediate CA. (partial_chain option)"}].
+
+server_require_peer_cert_do_not_allow_partial_chain(Config) when is_list(Config) ->
+ ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
+ | ?config(server_verification_opts, Config)],
+ ClientOpts = ?config(client_verification_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ {ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
+ [{_,_,_}, {_, IntermidiateCA, _}] = public_key:pem_decode(ServerCAs),
+
+ PartialChain = fun(_CertChain) ->
+ unknown_ca
+ end,
+
+ Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, [{cacerts, [IntermidiateCA]},
+ {partial_chain, PartialChain} |
+ proplists:delete(cacertfile, ServerOpts)]}]),
+
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client_error([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+
+ receive
+ {Server, {error, {tls_alert, "unknown ca"}}} ->
+ receive
+ {Client, {error, {tls_alert, "unknown ca"}}} ->
+ ok;
+ {Client, {error, closed}} ->
+ ok
+ end
+ end.
+
+ %%--------------------------------------------------------------------
+server_require_peer_cert_partial_chain_fun_fail() ->
+ [{doc, "If parial_chain fun crashes, treat it as if it returned unkown_ca"}].
+
+server_require_peer_cert_partial_chain_fun_fail(Config) when is_list(Config) ->
+ ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
+ | ?config(server_verification_opts, Config)],
+ ClientOpts = ?config(client_verification_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ {ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
+ [{_,_,_}, {_, IntermidiateCA, _}] = public_key:pem_decode(ServerCAs),
+
+ PartialChain = fun(_CertChain) ->
+ ture = false %% crash on purpose
+ end,
+
+ Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, [{cacerts, [IntermidiateCA]},
+ {partial_chain, PartialChain} |
+ proplists:delete(cacertfile, ServerOpts)]}]),
+
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client_error([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+
+ receive
+ {Server, {error, {tls_alert, "unknown ca"}}} ->
+ receive
+ {Client, {error, {tls_alert, "unknown ca"}}} ->
+ ok;
+ {Client, {error, closed}} ->
+ ok
+ end
+ end.
+
+%%--------------------------------------------------------------------
verify_fun_always_run_client() ->
[{doc,"Verify that user verify_fun is always run (for valid and valid_peer not only unknown_extension)"}].
@@ -282,7 +443,7 @@ verify_fun_always_run_client(Config) when is_list(Config) ->
{unknown, UserState};
(_, valid, [ChainLen]) ->
{valid, [ChainLen + 1]};
- (_, valid_peer, [2]) ->
+ (_, valid_peer, [1]) ->
{fail, "verify_fun_was_always_run"};
(_, valid_peer, UserState) ->
{valid, UserState}
@@ -321,7 +482,7 @@ verify_fun_always_run_server(Config) when is_list(Config) ->
{unknown, UserState};
(_, valid, [ChainLen]) ->
{valid, [ChainLen + 1]};
- (_, valid_peer, [2]) ->
+ (_, valid_peer, [1]) ->
{fail, "verify_fun_was_always_run"};
(_, valid_peer, UserState) ->
{valid, UserState}
@@ -434,10 +595,16 @@ cert_expired(Config) when is_list(Config) ->
Client = ssl_test_lib:start_client_error([{node, ClientNode}, {port, Port},
{host, Hostname},
{from, self()},
- {options, [{verify, verify_peer} | ClientOpts]}]),
-
- ssl_test_lib:check_result(Server, {error, {tls_alert, "certificate expired"}},
- Client, {error, {tls_alert, "certificate expired"}}).
+ {options, [{verify, verify_peer} | ClientOpts]}]),
+ receive
+ {Client, {error, {tls_alert, "certificate expired"}}} ->
+ receive
+ {Server, {error, {tls_alert, "certificate expired"}}} ->
+ ok;
+ {Server, {error, closed}} ->
+ ok
+ end
+ end.
two_digits_str(N) when N < 10 ->
lists:flatten(io_lib:format("0~p", [N]));
@@ -632,7 +799,7 @@ no_authority_key_identifier() ->
no_authority_key_identifier(Config) when is_list(Config) ->
ClientOpts = ?config(client_verification_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
PrivDir = ?config(priv_dir, Config),
KeyFile = filename:join(PrivDir, "otpCA/private/key.pem"),
@@ -804,7 +971,7 @@ unknown_server_ca_fail() ->
[{doc,"Test that the client fails if the ca is unknown in verify_peer mode"}].
unknown_server_ca_fail(Config) when is_list(Config) ->
ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
{from, self()},
@@ -833,11 +1000,11 @@ unknown_server_ca_fail(Config) when is_list(Config) ->
{verify_fun, FunAndState}
| ClientOpts]}]),
receive
- {Server, {error, {tls_alert, "unknown ca"}}} ->
+ {Client, {error, {tls_alert, "unknown ca"}}} ->
receive
- {Client, {error, {tls_alert, "unknown ca"}}} ->
+ {Server, {error, {tls_alert, "unknown ca"}}} ->
ok;
- {Client, {error, closed}} ->
+ {Server, {error, closed}} ->
ok
end
end.
@@ -848,7 +1015,7 @@ unknown_server_ca_accept_verify_none() ->
[{doc,"Test that the client succeds if the ca is unknown in verify_none mode"}].
unknown_server_ca_accept_verify_none(Config) when is_list(Config) ->
ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -873,7 +1040,7 @@ unknown_server_ca_accept_verify_peer() ->
" with a verify_fun that accepts the unknown ca error"}].
unknown_server_ca_accept_verify_peer(Config) when is_list(Config) ->
ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -912,7 +1079,7 @@ unknown_server_ca_accept_backwardscompatibility() ->
[{doc,"Test that old style verify_funs will work"}].
unknown_server_ca_accept_backwardscompatibility(Config) when is_list(Config) ->
ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ServerOpts = ?config(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
diff --git a/lib/ssl/test/ssl_cipher_SUITE.erl b/lib/ssl/test/ssl_cipher_SUITE.erl
index 45e91786d4..0e48b674e0 100644
--- a/lib/ssl/test/ssl_cipher_SUITE.erl
+++ b/lib/ssl/test/ssl_cipher_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,7 +38,7 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [aes_decipher_good, aes_decipher_good_tls11, aes_decipher_fail, aes_decipher_fail_tls11].
+ [aes_decipher_good, aes_decipher_fail, padding_test].
groups() ->
[].
@@ -73,93 +73,123 @@ end_per_testcase(_TestCase, Config) ->
%% Test Cases --------------------------------------------------------
%%--------------------------------------------------------------------
aes_decipher_good() ->
- [{doc,"Decipher a known cryptotext."}].
+ [{doc,"Decipher a known cryptotext using a correct key"}].
aes_decipher_good(Config) when is_list(Config) ->
HashSz = 32,
- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
- Content = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56, "HELLO\n">>,
- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
- Version = {3,0},
- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
- Version1 = {3,1},
- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
- ok.
-
-%%--------------------------------------------------------------------
-
-aes_decipher_good_tls11() ->
- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
-
-%% the fragment is actuall a TLS 1.1 record, with
-%% Version = TLS 1.1, we get the correct NextIV in #cipher_state
-aes_decipher_good_tls11(Config) when is_list(Config) ->
- HashSz = 32,
- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
- Content = <<"HELLO\n">>,
- NextIV = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
- Version = {3,2},
- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
- Version1 = {3,2},
- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
- ok.
+ CipherState = correct_cipher_state(),
+ decipher_check_good(HashSz, CipherState, {3,0}),
+ decipher_check_good(HashSz, CipherState, {3,1}),
+ decipher_check_good(HashSz, CipherState, {3,2}),
+ decipher_check_good(HashSz, CipherState, {3,3}).
%%--------------------------------------------------------------------
aes_decipher_fail() ->
- [{doc,"Decipher a known cryptotext."}].
+ [{doc,"Decipher a known cryptotext using a incorrect key"}].
-%% same as above, last byte of key replaced
aes_decipher_fail(Config) when is_list(Config) ->
HashSz = 32,
- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
- Version = {3,0},
- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
- 32 = byte_size(Content),
- 32 = byte_size(Mac),
- Version1 = {3,1},
- {Content1, Mac1, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
- 32 = byte_size(Content1),
- 32 = byte_size(Mac1),
- ok.
-%%--------------------------------------------------------------------
-
-aes_decipher_fail_tls11() ->
- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
-
-%% same as above, last byte of key replaced
-%% stricter padding checks in TLS 1.1 mean we get an alert instead
-aes_decipher_fail_tls11(Config) when is_list(Config) ->
- HashSz = 32,
- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
- Version = {3,2},
- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
- Version1 = {3,3},
- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
- ok.
+ CipherState = incorrect_cipher_state(),
+ decipher_check_fail(HashSz, CipherState, {3,0}),
+ decipher_check_fail(HashSz, CipherState, {3,1}),
+ decipher_check_fail(HashSz, CipherState, {3,2}),
+ decipher_check_fail(HashSz, CipherState, {3,3}).
%%--------------------------------------------------------------------
+padding_test(Config) when is_list(Config) ->
+ HashSz = 16,
+ CipherState = correct_cipher_state(),
+ pad_test(HashSz, CipherState, {3,0}),
+ pad_test(HashSz, CipherState, {3,1}),
+ pad_test(HashSz, CipherState, {3,2}),
+ pad_test(HashSz, CipherState, {3,3}).
+
+%%--------------------------------------------------------------------
+% Internal functions --------------------------------------------------------
+%%--------------------------------------------------------------------
+decipher_check_good(HashSz, CipherState, Version) ->
+ {Content, NextIV, Mac} = content_nextiv_mac(Version),
+ {Content, Mac, #cipher_state{iv = NextIV}} =
+ ssl_cipher:decipher(?AES, HashSz, CipherState, aes_fragment(Version), Version, true).
+
+decipher_check_fail(HashSz, CipherState, Version) ->
+ {Content, NextIV, Mac} = content_nextiv_mac(Version),
+ true = {Content, Mac, #cipher_state{iv = NextIV}} =/=
+ ssl_cipher:decipher(?AES, HashSz, CipherState, aes_fragment(Version), Version, true).
+
+pad_test(HashSz, CipherState, {3,0} = Version) ->
+ %% 3.0 does not have padding test
+ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
+ {Content, Mac, #cipher_state{iv = NextIV}} =
+ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, true),
+ {Content, Mac, #cipher_state{iv = NextIV}} =
+ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, false);
+pad_test(HashSz, CipherState, {3,1} = Version) ->
+ %% 3.1 should have padding test, but may be disabled
+ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
+ BadCont = badpad_content(Content),
+ {Content, Mac, #cipher_state{iv = NextIV}} =
+ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,1}) , {3,1}, false),
+ {BadCont, Mac, #cipher_state{iv = NextIV}} =
+ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,1}), {3,1}, true);
+pad_test(HashSz, CipherState, Version) ->
+ %% 3.2 and 3.3 must have padding test
+ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
+ BadCont = badpad_content(Content),
+ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState,
+ badpad_aes_fragment(Version), Version, false),
+ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState,
+ badpad_aes_fragment(Version), Version, true).
+
+aes_fragment({3,N}) when N == 0; N == 1->
+ <<197,9,6,109,242,87,80,154,85,250,110,81,119,95,65,185,53,206,216,153,246,169,
+ 119,177,178,238,248,174,253,220,242,81,33,0,177,251,91,44,247,53,183,198,165,
+ 63,20,194,159,107>>;
+
+aes_fragment(_) ->
+ <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+ 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+ 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+ 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>.
+
+badpad_aes_fragment({3,N}) when N == 0; N == 1 ->
+ <<186,139,125,10,118,21,26,248,120,108,193,104,87,118,145,79,225,55,228,10,105,
+ 30,190,37,1,88,139,243,210,99,65,41>>;
+badpad_aes_fragment(_) ->
+ <<137,31,14,77,228,80,76,103,183,125,55,250,68,190,123,131,117,23,229,180,207,
+ 94,121,137,117,157,109,99,113,61,190,138,131,229,201,120,142,179,172,48,77,
+ 234,19,240,33,38,91,93>>.
+
+content_nextiv_mac({3,N}) when N == 0; N == 1 ->
+ {<<"HELLO\n">>,
+ <<33,0, 177,251, 91,44, 247,53, 183,198, 165,63, 20,194, 159,107>>,
+ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>};
+content_nextiv_mac(_) ->
+ {<<"HELLO\n">>,
+ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
+ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>}.
+
+badpad_content_nextiv_mac({3,N}) when N == 0; N == 1 ->
+ {<<"HELLO\n">>,
+ <<225,55,228,10,105,30,190,37,1,88,139,243,210,99,65,41>>,
+ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
+ };
+badpad_content_nextiv_mac(_) ->
+ {<<"HELLO\n">>,
+ <<133,211,45,189,179,229,56,86,11,178,239,159,14,160,253,140>>,
+ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
+ }.
+
+badpad_content(Content) ->
+ %% BadContent will fail mac test
+ <<16#F0, Content/binary>>.
+
+correct_cipher_state() ->
+ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>}.
+
+incorrect_cipher_state() ->
+ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>}.
diff --git a/lib/ssl/test/ssl_crl_SUITE.erl b/lib/ssl/test/ssl_crl_SUITE.erl
new file mode 100644
index 0000000000..bad0949ec4
--- /dev/null
+++ b/lib/ssl/test/ssl_crl_SUITE.erl
@@ -0,0 +1,542 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(ssl_crl_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("public_key/include/public_key.hrl").
+
+-define(TIMEOUT, 120000).
+-define(LONG_TIMEOUT, 600000).
+-define(SLEEP, 1000).
+-define(OPENSSL_RENEGOTIATE, "R\n").
+-define(OPENSSL_QUIT, "Q\n").
+-define(OPENSSL_GARBAGE, "P\n").
+-define(EXPIRE, 10).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ {group, basic},
+ {group, v1_crl},
+ {group, idp_crl}
+ ].
+
+groups() ->
+ [{basic, [], basic_tests()},
+ {v1_crl, [], v1_crl_tests()},
+ {idp_crl, [], idp_crl_tests()}].
+
+basic_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+v1_crl_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+idp_crl_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+%%%================================================================
+%%% Suite init/end
+
+init_per_suite(Config0) ->
+ Dog = ct:timetrap(?LONG_TIMEOUT *2),
+ case os:find_executable("openssl") of
+ false ->
+ {skip, "Openssl not found"};
+ _ ->
+ TLSVersion = ?config(tls_version, Config0),
+ OpenSSL_version = (catch os:cmd("openssl version")),
+ ct:log("TLS version: ~p~nOpenSSL version: ~p~n~n~p:module_info(): ~p~n~nssl:module_info(): ~p~n",
+ [TLSVersion, OpenSSL_version, ?MODULE, ?MODULE:module_info(), ssl:module_info()]),
+ case ssl_test_lib:enough_openssl_crl_support(OpenSSL_version) of
+ false ->
+ {skip, io_lib:format("Bad openssl version: ~p",[OpenSSL_version])};
+ _ ->
+ catch crypto:stop(),
+ try crypto:start() of
+ ok ->
+ ssl:start(),
+ {ok, Hostname0} = inet:gethostname(),
+ IPfamily =
+ case lists:member(list_to_atom(Hostname0), ct:get_config(ipv6_hosts,[])) of
+ true -> inet6;
+ false -> inet
+ end,
+ [{ipfamily,IPfamily}, {watchdog, Dog}, {openssl_version,OpenSSL_version} | Config0]
+ catch _C:_E ->
+ ct:log("crypto:start() caught ~p:~p",[_C,_E]),
+ {skip, "Crypto did not start"}
+ end
+ end
+ end.
+
+end_per_suite(_Config) ->
+ ssl:stop(),
+ application:stop(crypto).
+
+%%%================================================================
+%%% Group init/end
+
+init_per_group(Group, Config) ->
+ ssl:start(),
+ inets:start(),
+ CertDir = filename:join(?config(priv_dir, Config), Group),
+ DataDir = ?config(data_dir, Config),
+ ServerRoot = make_dir_path([?config(priv_dir,Config), Group, tmp]),
+ %% start a HTTP server to serve the CRLs
+ {ok, Httpd} = inets:start(httpd, [{ipfamily, ?config(ipfamily,Config)},
+ {server_name, "localhost"}, {port, 0},
+ {server_root, ServerRoot},
+ {document_root, CertDir},
+ {modules, [mod_get]}
+ ]),
+ [{port,Port}] = httpd:info(Httpd, [port]),
+ ct:log("~p:~p~nHTTPD IP family=~p, port=~p~n", [?MODULE, ?LINE, ?config(ipfamily,Config), Port]),
+ CertOpts = [{crl_port,Port}|cert_opts(Group)],
+ Result = make_certs:all(DataDir, CertDir, CertOpts),
+ ct:log("~p:~p~nmake_certs:all(~n DataDir=~p,~n CertDir=~p,~n ServerRoot=~p~n Opts=~p~n) returned ~p~n", [?MODULE,?LINE,DataDir, CertDir, ServerRoot, CertOpts, Result]),
+ [{make_cert_result, Result}, {cert_dir, CertDir}, {httpd, Httpd} | Config].
+
+cert_opts(v1_crl) -> [{v2_crls, false}];
+cert_opts(idp_crl) -> [{issuing_distribution_point, true}];
+cert_opts(_) -> [].
+
+make_dir_path(PathComponents) ->
+ lists:foldl(fun(F,P0) -> file:make_dir(P=filename:join(P0,F)), P end,
+ "",
+ PathComponents).
+
+
+end_per_group(_GroupName, Config) ->
+ case ?config(httpd, Config) of
+ undefined -> ok;
+ Pid ->
+ ct:log("Stop httpd ~p",[Pid]),
+ ok = inets:stop(httpd, Pid)
+ ,ct:log("Stopped",[])
+ end,
+ inets:stop(),
+ Config.
+
+%%%================================================================
+%%% Test cases
+
+crl_verify_valid() ->
+ [{doc,"Verify a simple valid CRL chain"}].
+crl_verify_valid(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ PrivDir = ?config(cert_dir, Config),
+ ServerOpts = [{keyfile, filename:join([PrivDir, "server", "key.pem"])},
+ {certfile, filename:join([PrivDir, "server", "cert.pem"])},
+ {cacertfile, filename:join([PrivDir, "server", "cacerts.pem"])}],
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Data = "From openssl to erlang",
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ %{mfa, {ssl_test_lib, no_result, []}},
+ {options, ServerOpts}]),
+ ct:log("~p:~p~nreturn from ssl_test_lib:start_server:~n~p",[?MODULE,?LINE,Server]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ CACerts = load_cert(filename:join([PrivDir, "erlangCA", "cacerts.pem"])),
+
+ ClientOpts = [{cacerts, CACerts},
+ {verify, verify_peer},
+ {verify_fun, {fun validate_function/3, {CACerts, []}}}],
+
+
+ ct:log("~p:~p~ncalling ssl_test_lib:start_client",[?MODULE,?LINE]),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE,
+ erlang_ssl_send, [Data]}},
+ %{mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+ ct:log("~p:~p~nreturn from ssl_test_lib:start_client:~n~p",[?MODULE,?LINE,Client]),
+
+ ssl_test_lib:check_result(Client, ok, Server, ok),
+
+ %% Clean close down! Server needs to be closed first !!
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client),
+ process_flag(trap_exit, false).
+
+crl_verify_revoked() ->
+ [{doc,"Verify a simple valid CRL chain"}].
+crl_verify_revoked(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ PrivDir = ?config(cert_dir, Config),
+ ServerOpts = [{keyfile, filename:join([PrivDir, "revoked", "key.pem"])},
+ {certfile, filename:join([PrivDir, "revoked", "cert.pem"])},
+ {cacertfile, filename:join([PrivDir, "revoked", "cacerts.pem"])}],
+ ct:log("~p:~p~nserver opts ~p~n", [?MODULE,?LINE, ServerOpts]),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ %{mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ CACerts = load_cert(filename:join([PrivDir, "erlangCA", "cacerts.pem"])),
+ ClientOpts = [{cacerts, CACerts},
+ {verify, verify_peer},
+ {verify_fun, {fun validate_function/3, {CACerts, []}}}],
+
+ {connect_failed, _} = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ %{mfa, {?MODULE,
+ %erlang_ssl_receive, [Data]}},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+
+ %% Clean close down! Server needs to be closed first !!
+ ssl_test_lib:close(Server),
+ process_flag(trap_exit, false).
+
+%%%================================================================
+%%% Lib
+
+erlang_ssl_receive(Socket, Data) ->
+ ct:log("~p:~p~nConnection info: ~p~n",
+ [?MODULE,?LINE, ssl:connection_info(Socket)]),
+ receive
+ {ssl, Socket, Data} ->
+ ct:log("~p:~p~nReceived ~p~n",[?MODULE,?LINE, Data]),
+ %% open_ssl server sometimes hangs waiting in blocking read
+ ssl:send(Socket, "Got it"),
+ ok;
+ {ssl, Socket, Byte} when length(Byte) == 1 ->
+ erlang_ssl_receive(Socket, tl(Data));
+ {Port, {data,Debug}} when is_port(Port) ->
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
+ erlang_ssl_receive(Socket,Data);
+ Other ->
+ ct:fail({unexpected_message, Other})
+ after 4000 ->
+ ct:fail({did_not_get, Data})
+ end.
+
+
+erlang_ssl_send(Socket, Data) ->
+ ct:log("~p:~p~nConnection info: ~p~n",
+ [?MODULE,?LINE, ssl:connection_info(Socket)]),
+ ssl:send(Socket, Data),
+ ok.
+
+load_certs(undefined) ->
+ undefined;
+load_certs(CertDir) ->
+ case file:list_dir(CertDir) of
+ {ok, Certs} ->
+ load_certs(lists:map(fun(Cert) -> filename:join(CertDir, Cert)
+ end, Certs), []);
+ {error, _} ->
+ undefined
+ end.
+
+load_certs([], Acc) ->
+ ct:log("~p:~p~nSuccessfully loaded ~p CA certificates~n", [?MODULE,?LINE, length(Acc)]),
+ Acc;
+load_certs([Cert|Certs], Acc) ->
+ case filelib:is_dir(Cert) of
+ true ->
+ load_certs(Certs, Acc);
+ _ ->
+ %ct:log("~p:~p~nLoading certificate ~p~n", [?MODULE,?LINE, Cert]),
+ load_certs(Certs, load_cert(Cert) ++ Acc)
+ end.
+
+load_cert(Cert) ->
+ {ok, Bin} = file:read_file(Cert),
+ case filename:extension(Cert) of
+ ".der" ->
+ %% no decoding necessary
+ [Bin];
+ _ ->
+ %% assume PEM otherwise
+ Contents = public_key:pem_decode(Bin),
+ [DER || {Type, DER, Cipher} <- Contents, Type == 'Certificate', Cipher == 'not_encrypted']
+ end.
+
+%% @doc Validator function for SSL negotiation.
+%%
+validate_function(Cert, valid_peer, State) ->
+ ct:log("~p:~p~nvaliding peer ~p with ~p intermediate certs~n",
+ [?MODULE,?LINE, get_common_name(Cert),
+ length(element(2, State))]),
+ %% peer certificate validated, now check the CRL
+ Res = (catch check_crl(Cert, State)),
+ ct:log("~p:~p~nCRL validate result for ~p: ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert), Res]),
+ {Res, State};
+validate_function(Cert, valid, {TrustedCAs, IntermediateCerts}=State) ->
+ case public_key:pkix_is_self_signed(Cert) of
+ true ->
+ ct:log("~p:~p~nroot certificate~n",[?MODULE,?LINE]),
+ %% this is a root cert, no CRL
+ {valid, {TrustedCAs, [Cert|IntermediateCerts]}};
+ false ->
+ %% check is valid CA certificate, add to the list of
+ %% intermediates
+ Res = (catch check_crl(Cert, State)),
+ ct:log("~p:~p~nCRL intermediate CA validate result for ~p: ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert), Res]),
+ {Res, {TrustedCAs, [Cert|IntermediateCerts]}}
+ end;
+validate_function(_Cert, _Event, State) ->
+ %ct:log("~p:~p~nignoring event ~p~n", [?MODULE,?LINE, _Event]),
+ {valid, State}.
+
+%% @doc Given a certificate, find CRL distribution points for the given
+%% certificate, fetch, and attempt to validate each CRL through
+%% issuer_function/4.
+%%
+check_crl(Cert, State) ->
+ %% pull the CRL distribution point(s) out of the certificate, if any
+ ct:log("~p:~p~ncheck_crl(~n Cert=~p,~nState=~p~n)",[?MODULE,?LINE,Cert,State]),
+ case pubkey_cert:select_extension(
+ ?'id-ce-cRLDistributionPoints',
+ pubkey_cert:extensions_list(Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.extensions)) of
+ undefined ->
+ ct:log("~p:~p~nno CRL distribution points for ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert)]),
+ %% fail; we can't validate if there's no CRL
+ no_crl;
+ CRLExtension ->
+ ct:log("~p:~p~nCRLExtension=~p)",[?MODULE,?LINE,CRLExtension]),
+ CRLDistPoints = CRLExtension#'Extension'.extnValue,
+ DPointsAndCRLs = lists:foldl(fun(Point, Acc) ->
+ %% try to read the CRL over http or from a
+ %% local file
+ case fetch_point(Point) of
+ not_available ->
+ ct:log("~p:~p~nfetch_point returned~n~p~n)",[?MODULE,?LINE,not_available]),
+ Acc;
+ Res ->
+ ct:log("~p:~p~nfetch_point returned~n~p~n)",[?MODULE,?LINE,Res]),
+ [{Point, Res} | Acc]
+ end
+ end, [], CRLDistPoints),
+ public_key:pkix_crls_validate(Cert,
+ DPointsAndCRLs,
+ [{issuer_fun,
+ {fun issuer_function/4, State}}])
+ end.
+
+%% @doc Given a list of distribution points for CRLs, certificates and
+%% both trusted and intermediary certificates, attempt to build and
+%% authority chain back via build_chain to verify that it is valid.
+%%
+issuer_function(_DP, CRL, _Issuer, {TrustedCAs, IntermediateCerts}) ->
+ %% XXX the 'Issuer' we get passed here is the AuthorityKeyIdentifier,
+ %% which we are not currently smart enough to understand
+ %% Read the CA certs out of the file
+ ct:log("~p:~p~nissuer_function(~nCRL=~p,~nLast param=~p)",[?MODULE,?LINE,CRL, {TrustedCAs, IntermediateCerts}]),
+ Certs = [public_key:pkix_decode_cert(DER, otp) || DER <- TrustedCAs],
+ %% get the real issuer out of the CRL
+ Issuer = public_key:pkix_normalize_name(
+ pubkey_cert_records:transform(
+ CRL#'CertificateList'.tbsCertList#'TBSCertList'.issuer, decode)),
+ %% assume certificates are ordered from root to tip
+ case find_issuer(Issuer, IntermediateCerts ++ Certs) of
+ undefined ->
+ ct:log("~p:~p~nunable to find certificate matching CRL issuer ~p~n",
+ [?MODULE,?LINE, Issuer]),
+ error;
+ IssuerCert ->
+ ct:log("~p:~p~nIssuerCert=~p~n)",[?MODULE,?LINE,IssuerCert]),
+ case build_chain({public_key:pkix_encode('OTPCertificate',
+ IssuerCert,
+ otp),
+ IssuerCert}, IntermediateCerts, Certs, []) of
+ undefined ->
+ error;
+ {OTPCert, Path} ->
+ {ok, OTPCert, Path}
+ end
+ end.
+
+%% @doc Attempt to build authority chain back using intermediary
+%% certificates, falling back on trusted certificates if the
+%% intermediary chain of certificates does not fully extend to the
+%% root.
+%%
+%% Returns: {RootCA :: #OTPCertificate{}, Chain :: [der_encoded()]}
+%%
+build_chain({DER, Cert}, IntCerts, TrustedCerts, Acc) ->
+ %% check if this cert is self-signed, if it is, we've reached the
+ %% root of the chain
+ Issuer = public_key:pkix_normalize_name(
+ Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.issuer),
+ Subject = public_key:pkix_normalize_name(
+ Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ case Issuer == Subject of
+ true ->
+ case find_issuer(Issuer, TrustedCerts) of
+ undefined ->
+ ct:log("~p:~p~nself-signed certificate is NOT trusted~n",[?MODULE,?LINE]),
+ undefined;
+ TrustedCert ->
+ %% return the cert from the trusted list, to prevent
+ %% issuer spoofing
+ {TrustedCert,
+ [public_key:pkix_encode(
+ 'OTPCertificate', TrustedCert, otp)|Acc]}
+ end;
+ false ->
+ Match = lists:foldl(
+ fun(C, undefined) ->
+ S = public_key:pkix_normalize_name(C#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ %% compare the subject to the current issuer
+ case Issuer == S of
+ true ->
+ %% we've found our man
+ {public_key:pkix_encode('OTPCertificate', C, otp), C};
+ false ->
+ undefined
+ end;
+ (_E, A) ->
+ %% already matched
+ A
+ end, undefined, IntCerts),
+ case Match of
+ undefined when IntCerts /= TrustedCerts ->
+ %% continue the chain by using the trusted CAs
+ ct:log("~p:~p~nRan out of intermediate certs, switching to trusted certs~n",[?MODULE,?LINE]),
+ build_chain({DER, Cert}, TrustedCerts, TrustedCerts, Acc);
+ undefined ->
+ ct:log("Can't construct chain of trust beyond ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert)]),
+ %% can't find the current cert's issuer
+ undefined;
+ Match ->
+ build_chain(Match, IntCerts, TrustedCerts, [DER|Acc])
+ end
+ end.
+
+%% @doc Given a certificate and a list of trusted or intermediary
+%% certificates, attempt to find a match in the list or bail with
+%% undefined.
+find_issuer(Issuer, Certs) ->
+ lists:foldl(
+ fun(OTPCert, undefined) ->
+ %% check if this certificate matches the issuer
+ Normal = public_key:pkix_normalize_name(
+ OTPCert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ case Normal == Issuer of
+ true ->
+ OTPCert;
+ false ->
+ undefined
+ end;
+ (_E, Acc) ->
+ %% already found a match
+ Acc
+ end, undefined, Certs).
+
+%% @doc Find distribution points for a given CRL and then attempt to
+%% fetch the CRL from the first available.
+fetch_point(#'DistributionPoint'{distributionPoint={fullName, Names}}) ->
+ Decoded = [{NameType,
+ pubkey_cert_records:transform(Name, decode)}
+ || {NameType, Name} <- Names],
+ ct:log("~p:~p~ncall fetch(~nDecoded=~p~n)",[?MODULE,?LINE,Decoded]),
+ fetch(Decoded).
+
+%% @doc Given a list of locations to retrieve a CRL from, attempt to
+%% retrieve either from a file or http resource and bail as soon as
+%% it can be found.
+%%
+%% Currently, only hand a armored PEM or DER encoded file, with
+%% defaulting to DER.
+%%
+fetch([]) ->
+ not_available;
+fetch([{uniformResourceIdentifier, "http"++_=URL}|Rest]) ->
+ ct:log("~p:~p~ngetting CRL from ~p~n", [?MODULE,?LINE, URL]),
+ case httpc:request(get, {URL, []}, [], [{body_format, binary}]) of
+ {ok, {_Status, _Headers, Body}} ->
+ case Body of
+ <<"-----BEGIN", _/binary>> ->
+ ct:log("~p:~p~npublic_key:pem_decode,~nBody=~p~n)",[?MODULE,?LINE,Body]),
+ [{'CertificateList',
+ DER, _}=CertList] = public_key:pem_decode(Body),
+ ct:log("~p:~p~npublic_key:pem_entry_decode,~nCertList=~p~n)",[?MODULE,?LINE,CertList]),
+ {DER, public_key:pem_entry_decode(CertList)};
+ _ ->
+ ct:log("~p:~p~npublic_key:pem_entry_decode,~nBody=~p~n)",[?MODULE,?LINE,{'CertificateList', Body, not_encrypted}]),
+ %% assume DER encoded
+ try
+ public_key:pem_entry_decode({'CertificateList', Body, not_encrypted})
+ of
+ CertList -> {Body, CertList}
+ catch
+ _C:_E ->
+ ct:log("~p:~p~nfailed DER assumption~nRest=~p", [?MODULE,?LINE,Rest]),
+ fetch(Rest)
+ end
+ end;
+ {error, _Reason} ->
+ ct:log("~p:~p~nfailed to get CRL ~p~n", [?MODULE,?LINE, _Reason]),
+ fetch(Rest);
+ Other ->
+ ct:log("~p:~p~nreally failed to get CRL ~p~n", [?MODULE,?LINE, Other]),
+ fetch(Rest)
+ end;
+fetch([Loc|Rest]) ->
+ %% unsupported CRL location
+ ct:log("~p:~p~nunable to fetch CRL from unsupported location ~p~n",
+ [?MODULE,?LINE, Loc]),
+ fetch(Rest).
+
+%% get the common name attribute out of an OTPCertificate record
+get_common_name(OTPCert) ->
+ %% You'd think there'd be an easier way than this giant mess, but I
+ %% couldn't find one.
+ {rdnSequence, Subject} = OTPCert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject,
+ case [Attribute#'AttributeTypeAndValue'.value || [Attribute] <- Subject,
+ Attribute#'AttributeTypeAndValue'.type == ?'id-at-commonName'] of
+ [Att] ->
+ case Att of
+ {teletexString, Str} -> Str;
+ {printableString, Str} -> Str;
+ {utf8String, Bin} -> binary_to_list(Bin)
+ end;
+ _ ->
+ unknown
+ end.
+
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index d3b523ca8c..1a1b2af8d4 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -324,7 +324,7 @@ start_ssl_node_raw(Name, Args) ->
[binary, {packet, 4}, {active, false}]),
{ok, ListenPort} = inet:port(LSock),
CmdLine = mk_node_cmdline(ListenPort, Name, Args),
- ?t:format("Attempting to start ssl node ~s: ~s~n", [Name, CmdLine]),
+ ?t:format("Attempting to start ssl node ~ts: ~ts~n", [Name, CmdLine]),
case open_port({spawn, CmdLine}, []) of
Port when is_port(Port) ->
unlink(Port),
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl
index 7e8e8d2611..8dca733526 100644
--- a/lib/ssl/test/ssl_handshake_SUITE.erl
+++ b/lib/ssl/test/ssl_handshake_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,6 +26,7 @@
-include_lib("common_test/include/ct.hrl").
-include("ssl_internal.hrl").
-include("tls_handshake.hrl").
+-include_lib("public_key/include/public_key.hrl").
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -34,8 +35,12 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() -> [decode_hello_handshake,
decode_single_hello_extension_correctly,
+ decode_supported_elliptic_curves_hello_extension_correctly,
decode_unknown_hello_extension_correctly,
- encode_single_hello_sni_extension_correctly].
+ encode_single_hello_sni_extension_correctly,
+ decode_single_hello_sni_extension_correctly,
+ decode_empty_server_sni_correctly,
+ select_proper_tls_1_2_rsa_default_hashsign].
%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
@@ -67,6 +72,17 @@ decode_single_hello_extension_correctly(_Config) ->
#renegotiation_info{renegotiated_connection = <<0>>}
= Extensions#hello_extensions.renegotiation_info.
+decode_supported_elliptic_curves_hello_extension_correctly(_Config) ->
+ % List of supported and unsupported curves (RFC4492:S5.1.1)
+ ClientEllipticCurves = [0, tls_v1:oid_to_enum(?sect233k1), 37, tls_v1:oid_to_enum(?sect193r2), 16#badc],
+ % Construct extension binary - modified version of ssl_handshake:encode_hello_extensions([#elliptic_curves{}], _)
+ EllipticCurveList = << <<X:16>> || X <- ClientEllipticCurves>>,
+ ListLen = byte_size(EllipticCurveList),
+ Len = ListLen + 2,
+ Extension = <<?UINT16(?ELLIPTIC_CURVES_EXT), ?UINT16(Len), ?UINT16(ListLen), EllipticCurveList/binary>>,
+ % after decoding we should see only valid curves
+ #hello_extensions{elliptic_curves = DecodedCurves} = ssl_handshake:decode_hello_extensions(Extension),
+ #elliptic_curves{elliptic_curve_list = [?sect233k1, ?sect193r2]} = DecodedCurves.
decode_unknown_hello_extension_correctly(_Config) ->
FourByteUnknown = <<16#CA,16#FE, ?UINT16(4), 3, 0, 1, 2>>,
@@ -83,3 +99,25 @@ encode_single_hello_sni_extension_correctly(_Config) ->
HelloExt = <<ExtSize:16/unsigned-big-integer, SNI/binary>>,
Encoded = ssl_handshake:encode_hello_extensions(Exts),
HelloExt = Encoded.
+
+decode_single_hello_sni_extension_correctly(_Config) ->
+ Exts = #hello_extensions{sni = #sni{hostname = "test.com"}},
+ SNI = <<16#00, 16#00, 16#00, 16#0d, 16#00, 16#0b, 16#00, 16#00, 16#08,
+ $t, $e, $s, $t, $., $c, $o, $m>>,
+ Decoded = ssl_handshake:decode_hello_extensions(SNI),
+ Exts = Decoded.
+
+decode_empty_server_sni_correctly(_Config) ->
+ Exts = #hello_extensions{sni = ""},
+ SNI = <<?UINT16(?SNI_EXT),?UINT16(0)>>,
+ Decoded = ssl_handshake:decode_hello_extensions(SNI),
+ Exts = Decoded.
+
+
+select_proper_tls_1_2_rsa_default_hashsign(_Config) ->
+ % RFC 5246 section 7.4.1.4.1 tells to use {sha1,rsa} as default signature_algorithm for RSA key exchanges
+ {sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,3}),
+ % Older versions use MD5/SHA1 combination
+ {md5sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,2}),
+ {md5sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,0}).
+
diff --git a/lib/ssl/test/ssl_pem_cache_SUITE.erl b/lib/ssl/test/ssl_pem_cache_SUITE.erl
new file mode 100644
index 0000000000..843079e2fe
--- /dev/null
+++ b/lib/ssl/test/ssl_pem_cache_SUITE.erl
@@ -0,0 +1,127 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2015-2015. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.2
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+
+-module(ssl_pem_cache_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("kernel/include/file.hrl").
+
+-define(CLEANUP_INTERVAL, 5000).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+all() ->
+ [pem_cleanup].
+
+groups() ->
+ [].
+
+init_per_suite(Config0) ->
+ catch crypto:stop(),
+ try crypto:start() of
+ ok ->
+ ssl:start(),
+ %% make rsa certs using oppenssl
+ Result =
+ (catch make_certs:all(?config(data_dir, Config0),
+ ?config(priv_dir, Config0))),
+ ct:log("Make certs ~p~n", [Result]),
+
+ Config1 = ssl_test_lib:make_dsa_cert(Config0),
+ ssl_test_lib:cert_options(Config1)
+ catch _:_ ->
+ {skip, "Crypto did not start"}
+ end.
+
+end_per_suite(_Config) ->
+ application:stop(crypto).
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+init_per_testcase(pem_cleanup, Config) ->
+ ssl:stop(),
+ application:load(ssl),
+ application:set_env(ssl, ssl_pem_cache_clean, ?CLEANUP_INTERVAL),
+ ssl:start(),
+ Config.
+
+end_per_testcase(_TestCase, Config) ->
+ %%ssl:stop(),
+ Config.
+
+%%--------------------------------------------------------------------
+%% Test Cases --------------------------------------------------------
+%%--------------------------------------------------------------------
+pem_cleanup() ->
+ [{doc, "Test pem cache invalidate mechanism"}].
+pem_cleanup(Config)when is_list(Config) ->
+ process_flag(trap_exit, true),
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode},
+ {port, Port}, {host, Hostname},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {from, self()}, {options, ClientOpts}]),
+
+ Size = ssl_pkix_db:db_size(get_pem_cache()),
+ Certfile = proplists:get_value(certfile, ServerOpts),
+ {ok, FileInfo} = file:read_file_info(Certfile),
+ Time = later(),
+ ok = file:write_file_info(Certfile, FileInfo#file_info{mtime = Time}),
+ ct:sleep(2 * ?CLEANUP_INTERVAL),
+ Size1 = ssl_pkix_db:db_size(get_pem_cache()),
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client),
+ false = Size == Size1.
+
+get_pem_cache() ->
+ {status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)),
+ [_, _,_, _, Prop] = StatusInfo,
+ State = ssl_test_lib:state(Prop),
+ case element(5, State) of
+ [_CertDb, _FileRefDb, PemChace] ->
+ PemChace;
+ _ ->
+ undefined
+ end.
+
+later()->
+ DateTime = calendar:now_to_local_time(os:timestamp()),
+ Gregorian = calendar:datetime_to_gregorian_seconds(DateTime),
+ calendar:gregorian_seconds_to_datetime(Gregorian + (2 * ?CLEANUP_INTERVAL)).
+
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 74fadc0cc7..74d71263de 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -60,14 +60,23 @@ run_server(Opts) ->
Options = proplists:get_value(options, Opts),
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
- ct:log("ssl:listen(~p, ~p)~n", [Port, Options]),
+ ct:log("~p:~p~nssl:listen(~p, ~p)~n", [?MODULE,?LINE, Port, Options]),
{ok, ListenSocket} = rpc:call(Node, Transport, listen, [Port, Options]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
run_server(ListenSocket, Opts).
run_server(ListenSocket, Opts) ->
- do_run_server(ListenSocket, connect(ListenSocket, Opts), Opts).
+ Accepters = proplists:get_value(accepters, Opts, 1),
+ run_server(ListenSocket, Opts, Accepters).
+
+run_server(ListenSocket, Opts, 1) ->
+ do_run_server(ListenSocket, connect(ListenSocket, Opts), Opts);
+run_server(ListenSocket, Opts, N) ->
+ Pid = proplists:get_value(from, Opts),
+ Server = spawn(?MODULE, run_server, [ListenSocket, Opts, 1]),
+ Pid ! {accepter, N, Server},
+ run_server(ListenSocket, Opts, N-1).
do_run_server(_, {error, timeout} = Result, Opts) ->
Pid = proplists:get_value(from, Opts),
@@ -78,13 +87,13 @@ do_run_server(ListenSocket, AcceptSocket, Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("Server: apply(~p,~p,~p)~n",
- [Module, Function, [AcceptSocket | Args]]),
+ ct:log("~p:~p~nServer: apply(~p,~p,~p)~n",
+ [?MODULE,?LINE, Module, Function, [AcceptSocket | Args]]),
case rpc:call(Node, Module, Function, [AcceptSocket | Args]) of
no_result_msg ->
ok;
Msg ->
- ct:log("Server Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nServer Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg}
end,
receive
@@ -93,10 +102,10 @@ do_run_server(ListenSocket, AcceptSocket, Opts) ->
{listen, MFA} ->
run_server(ListenSocket, [MFA | proplists:delete(mfa, Opts)]);
close ->
- ct:log("Server closing ~p ~n", [self()]),
+ ct:log("~p:~p~nServer closing ~p ~n", [?MODULE,?LINE, self()]),
Result = rpc:call(Node, Transport, close, [AcceptSocket], 500),
Result1 = rpc:call(Node, Transport, close, [ListenSocket], 500),
- ct:log("Result ~p : ~p ~n", [Result, Result1]);
+ ct:log("~p:~p~nResult ~p : ~p ~n", [?MODULE,?LINE, Result, Result1]);
{ssl_closed, _} ->
ok
end.
@@ -106,7 +115,8 @@ connect(#sslsocket{} = ListenSocket, Opts) ->
Node = proplists:get_value(node, Opts),
ReconnectTimes = proplists:get_value(reconnect_times, Opts, 0),
Timeout = proplists:get_value(timeout, Opts, infinity),
- AcceptSocket = connect(ListenSocket, Node, 1 + ReconnectTimes, dummy, Timeout),
+ SslOpts = proplists:get_value(ssl_extra_opts, Opts, []),
+ AcceptSocket = connect(ListenSocket, Node, 1 + ReconnectTimes, dummy, Timeout, SslOpts),
case ReconnectTimes of
0 ->
AcceptSocket;
@@ -116,27 +126,35 @@ connect(#sslsocket{} = ListenSocket, Opts) ->
end;
connect(ListenSocket, Opts) ->
Node = proplists:get_value(node, Opts),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept,
[ListenSocket]),
AcceptSocket.
-connect(_, _, 0, AcceptSocket, _) ->
+connect(_, _, 0, AcceptSocket, _, _) ->
AcceptSocket;
-connect(ListenSocket, Node, N, _, Timeout) ->
+
+connect(ListenSocket, Node, N, _, Timeout, []) ->
ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, ssl, transport_accept,
[ListenSocket]),
- ct:log("ssl:ssl_accept(~p, ~p)~n", [AcceptSocket, Timeout]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n", [?MODULE,?LINE, AcceptSocket, Timeout]),
case rpc:call(Node, ssl, ssl_accept, [AcceptSocket, Timeout]) of
ok ->
- connect(ListenSocket, Node, N-1, AcceptSocket, Timeout);
+ connect(ListenSocket, Node, N-1, AcceptSocket, Timeout, []);
Result ->
+ ct:log("~p:~p~nssl:ssl_accept@~p ret ~p",[?MODULE,?LINE, Node,Result]),
Result
- end.
+ end;
+connect(ListenSocket, Node, _, _, Timeout, Opts) ->
+ ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
+ {ok, AcceptSocket} = rpc:call(Node, ssl, transport_accept,
+ [ListenSocket]),
+ ct:log("ssl:ssl_accept(~p,~p, ~p)~n", [AcceptSocket, Opts, Timeout]),
+ rpc:call(Node, ssl, ssl_accept, [AcceptSocket, Opts, Timeout]),
+ AcceptSocket.
-
remove_close_msg(0) ->
ok;
remove_close_msg(ReconnectTimes) ->
@@ -146,15 +164,21 @@ remove_close_msg(ReconnectTimes) ->
end.
start_client(Args) ->
- Result = spawn_link(?MODULE, run_client, [lists:delete(return_socket, Args)]),
+ Result = spawn_link(?MODULE, run_client_init, [lists:delete(return_socket, Args)]),
receive
- { connected, Socket } ->
- case lists:member(return_socket, Args) of
- true -> { Result, Socket };
- false -> Result
- end
+ {connected, Socket} ->
+ case lists:member(return_socket, Args) of
+ true -> {Result, Socket};
+ false -> Result
+ end;
+ {connect_failed, Reason} ->
+ {connect_failed, Reason}
end.
+run_client_init(Opts) ->
+ put(retries, 0),
+ run_client(Opts).
+
run_client(Opts) ->
Node = proplists:get_value(node, Opts),
Host = proplists:get_value(host, Opts),
@@ -162,70 +186,72 @@ run_client(Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
Options = proplists:get_value(options, Opts),
- ct:log("ssl:connect(~p, ~p, ~p)~n", [Host, Port, Options]),
+ ct:log("~p:~p~n~p:connect(~p, ~p)@~p~n", [?MODULE,?LINE, Transport, Host, Port, Node]),
case rpc:call(Node, Transport, connect, [Host, Port, Options]) of
{ok, Socket} ->
- Pid ! { connected, Socket },
- ct:log("Client: connected~n", []),
+ Pid ! {connected, Socket},
+ ct:log("~p:~p~nClient: connected~n", [?MODULE,?LINE]),
%% In special cases we want to know the client port, it will
%% be indicated by sending {port, 0} in options list!
send_selected_port(Pid, proplists:get_value(port, Options), Socket),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("Client: apply(~p,~p,~p)~n",
- [Module, Function, [Socket | Args]]),
+ ct:log("~p:~p~nClient: apply(~p,~p,~p)~n",
+ [?MODULE,?LINE, Module, Function, [Socket | Args]]),
case rpc:call(Node, Module, Function, [Socket | Args]) of
no_result_msg ->
ok;
Msg ->
- ct:log("Client Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nClient Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg}
end,
receive
close ->
- ct:log("Client closing~n", []),
+ ct:log("~p:~p~nClient closing~n", [?MODULE,?LINE]),
rpc:call(Node, Transport, close, [Socket]);
{ssl_closed, Socket} ->
ok;
{gen_tcp, closed} ->
ok
end;
+ {error, econnrefused = Reason} ->
+ case get(retries) of
+ N when N < 5 ->
+ ct:log("~p:~p~neconnrefused retries=~p sleep ~p",[?MODULE,?LINE, N,?SLEEP]),
+ put(retries, N+1),
+ ct:sleep(?SLEEP),
+ run_client(Opts);
+ _ ->
+ ct:log("~p:~p~nClient faild several times: connection failed: ~p ~n", [?MODULE,?LINE, Reason]),
+ Pid ! {self(), {error, Reason}}
+ end;
{error, Reason} ->
- ct:log("Client: connection failed: ~p ~n", [Reason]),
- Pid ! {self(), {error, Reason}}
+ ct:log("~p:~p~nClient: connection failed: ~p ~n", [?MODULE,?LINE, Reason]),
+ Pid ! {connect_failed, Reason};
+ {badrpc,BadRPC} ->
+ ct:log("~p:~p~nBad rpc: ~p",[?MODULE,?LINE, BadRPC]),
+ Pid ! {connect_failed, {badrpc,BadRPC}}
end.
close(Pid) ->
- ct:log("Close ~p ~n", [Pid]),
+ ct:log("~p:~p~nClose ~p ~n", [?MODULE,?LINE, Pid]),
Monitor = erlang:monitor(process, Pid),
Pid ! close,
receive
{'DOWN', Monitor, process, Pid, Reason} ->
erlang:demonitor(Monitor),
- ct:log("Pid: ~p down due to:~p ~n", [Pid, Reason])
+ ct:log("~p:~p~nPid: ~p down due to:~p ~n", [?MODULE,?LINE, Pid, Reason])
end.
check_result(Server, ServerMsg, Client, ClientMsg) ->
receive
- {Server, ServerMsg} ->
- receive
- {Client, ClientMsg} ->
- ok;
- Unexpected ->
- Reason = {{expected, {Client, ClientMsg}},
- {got, Unexpected}},
- ct:fail(Reason)
- end;
- {Client, ClientMsg} ->
- receive
- {Server, ServerMsg} ->
- ok;
- Unexpected ->
- Reason = {{expected, {Server, ClientMsg}},
- {got, Unexpected}},
- ct:fail(Reason)
- end;
+ {Server, ServerMsg} ->
+ check_result(Client, ClientMsg);
+
+ {Client, ClientMsg} ->
+ check_result(Server, ServerMsg);
+
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
check_result(Server, ServerMsg, Client, ClientMsg);
Unexpected ->
@@ -239,7 +265,7 @@ check_result(Pid, Msg) ->
{Pid, Msg} ->
ok;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
check_result(Pid,Msg);
Unexpected ->
Reason = {{expected, {Pid, Msg}},
@@ -264,19 +290,28 @@ wait_for_result(Server, ServerMsg, Client, ClientMsg) ->
%% Unexpected
end;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
wait_for_result(Server, ServerMsg, Client, ClientMsg)
%% Unexpected ->
%% Unexpected
end.
-
+check_ok([]) ->
+ ok;
+check_ok(Pids) ->
+ receive
+ {Pid, ok} ->
+ check_ok(lists:delete(Pid, Pids));
+ Other ->
+ ct:fail({expected, {"pid()", ok}, got, Other})
+ end.
+
wait_for_result(Pid, Msg) ->
receive
{Pid, Msg} ->
ok;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
wait_for_result(Pid,Msg)
%% Unexpected ->
%% Unexpected
@@ -415,7 +450,7 @@ make_ecdsa_cert(Config) ->
{cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{server_ecdsa_verify_opts, [{ssl_imp, new},{reuseaddr, true},
- {cacertfile, ClientCaCertFile},
+ {cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile},
{verify, verify_peer}]},
{client_ecdsa_opts, [{ssl_imp, new},{reuseaddr, true},
@@ -440,7 +475,7 @@ make_ecdh_rsa_cert(Config) ->
{cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{server_ecdh_rsa_verify_opts, [{ssl_imp, new},{reuseaddr, true},
- {cacertfile, ClientCaCertFile},
+ {cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile},
{verify, verify_peer}]},
{client_ecdh_rsa_opts, [{ssl_imp, new},{reuseaddr, true},
@@ -501,33 +536,33 @@ run_upgrade_server(Opts) ->
SslOptions = proplists:get_value(ssl_options, Opts),
Pid = proplists:get_value(from, Opts),
- ct:log("gen_tcp:listen(~p, ~p)~n", [Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:listen(~p, ~p)~n", [?MODULE,?LINE, Port, TcpOptions]),
{ok, ListenSocket} = rpc:call(Node, gen_tcp, listen, [Port, TcpOptions]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept, [ListenSocket]),
try
{ok, SslAcceptSocket} = case TimeOut of
infinity ->
- ct:log("ssl:ssl_accept(~p, ~p)~n",
- [AcceptSocket, SslOptions]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions]);
_ ->
- ct:log("ssl:ssl_accept(~p, ~p, ~p)~n",
- [AcceptSocket, SslOptions, TimeOut]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions, TimeOut]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions, TimeOut])
end,
{Module, Function, Args} = proplists:get_value(mfa, Opts),
Msg = rpc:call(Node, Module, Function, [SslAcceptSocket | Args]),
- ct:log("Upgrade Server Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nUpgrade Server Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg},
receive
close ->
- ct:log("Upgrade Server closing~n", []),
+ ct:log("~p:~p~nUpgrade Server closing~n", [?MODULE,?LINE]),
rpc:call(Node, ssl, close, [SslAcceptSocket])
end
catch error:{badmatch, Error} ->
@@ -545,24 +580,24 @@ run_upgrade_client(Opts) ->
TcpOptions = proplists:get_value(tcp_options, Opts),
SslOptions = proplists:get_value(ssl_options, Opts),
- ct:log("gen_tcp:connect(~p, ~p, ~p)~n",
- [Host, Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:connect(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, Host, Port, TcpOptions]),
{ok, Socket} = rpc:call(Node, gen_tcp, connect, [Host, Port, TcpOptions]),
send_selected_port(Pid, Port, Socket),
- ct:log("ssl:connect(~p, ~p)~n", [Socket, SslOptions]),
+ ct:log("~p:~p~nssl:connect(~p, ~p)~n", [?MODULE,?LINE, Socket, SslOptions]),
{ok, SslSocket} = rpc:call(Node, ssl, connect, [Socket, SslOptions]),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("apply(~p, ~p, ~p)~n",
- [Module, Function, [SslSocket | Args]]),
+ ct:log("~p:~p~napply(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, Module, Function, [SslSocket | Args]]),
Msg = rpc:call(Node, Module, Function, [SslSocket | Args]),
- ct:log("Upgrade Client Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nUpgrade Client Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg},
receive
close ->
- ct:log("Upgrade Client closing~n", []),
+ ct:log("~p:~p~nUpgrade Client closing~n", [?MODULE,?LINE]),
rpc:call(Node, ssl, close, [SslSocket])
end.
@@ -581,21 +616,21 @@ run_upgrade_server_error(Opts) ->
SslOptions = proplists:get_value(ssl_options, Opts),
Pid = proplists:get_value(from, Opts),
- ct:log("gen_tcp:listen(~p, ~p)~n", [Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:listen(~p, ~p)~n", [?MODULE,?LINE, Port, TcpOptions]),
{ok, ListenSocket} = rpc:call(Node, gen_tcp, listen, [Port, TcpOptions]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept, [ListenSocket]),
Error = case TimeOut of
infinity ->
- ct:log("ssl:ssl_accept(~p, ~p)~n",
- [AcceptSocket, SslOptions]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions]);
_ ->
- ct:log("ssl:ssl_accept(~p, ~p, ~p)~n",
- [AcceptSocket, SslOptions, TimeOut]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions, TimeOut]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions, TimeOut])
end,
@@ -614,26 +649,26 @@ run_server_error(Opts) ->
Options = proplists:get_value(options, Opts),
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
- ct:log("ssl:listen(~p, ~p)~n", [Port, Options]),
+ ct:log("~p:~p~nssl:listen(~p, ~p)~n", [?MODULE,?LINE, Port, Options]),
case rpc:call(Node, Transport, listen, [Port, Options]) of
{ok, #sslsocket{} = ListenSocket} ->
%% To make sure error_client will
%% get {error, closed} and not {error, connection_refused}
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~nssl:transport_accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
case rpc:call(Node, Transport, transport_accept, [ListenSocket]) of
{error, _} = Error ->
Pid ! {self(), Error};
{ok, AcceptSocket} ->
- ct:log("ssl:ssl_accept(~p)~n", [AcceptSocket]),
+ ct:log("~p:~p~nssl:ssl_accept(~p)~n", [?MODULE,?LINE, AcceptSocket]),
Error = rpc:call(Node, ssl, ssl_accept, [AcceptSocket]),
Pid ! {self(), Error}
end;
{ok, ListenSocket} ->
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("~p:accept(~p)~n", [Transport, ListenSocket]),
+ ct:log("~p:~p~n~p:accept(~p)~n", [?MODULE,?LINE, Transport, ListenSocket]),
case rpc:call(Node, Transport, accept, [ListenSocket]) of
{error, _} = Error ->
Pid ! {self(), Error}
@@ -655,10 +690,21 @@ run_client_error(Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
Options = proplists:get_value(options, Opts),
- ct:log("ssl:connect(~p, ~p, ~p)~n", [Host, Port, Options]),
+ ct:log("~p:~p~nssl:connect(~p, ~p, ~p)~n", [?MODULE,?LINE, Host, Port, Options]),
Error = rpc:call(Node, Transport, connect, [Host, Port, Options]),
Pid ! {self(), Error}.
+accepters(N) ->
+ accepters([], N).
+
+accepters(Acc, 0) ->
+ Acc;
+accepters(Acc, N) ->
+ receive
+ {accepter, _, Server} ->
+ accepters([Server| Acc], N-1)
+ end.
+
inet_port(Pid) when is_pid(Pid)->
receive
{Pid, {port, Port}} ->
@@ -826,25 +872,34 @@ psk_suites() ->
{psk, '3des_ede_cbc', sha},
{psk, aes_128_cbc, sha},
{psk, aes_256_cbc, sha},
+ {psk, aes_128_cbc, sha256},
+ {psk, aes_256_cbc, sha384},
{dhe_psk, rc4_128, sha},
{dhe_psk, '3des_ede_cbc', sha},
{dhe_psk, aes_128_cbc, sha},
{dhe_psk, aes_256_cbc, sha},
+ {dhe_psk, aes_128_cbc, sha256},
+ {dhe_psk, aes_256_cbc, sha384},
{rsa_psk, rc4_128, sha},
{rsa_psk, '3des_ede_cbc', sha},
{rsa_psk, aes_128_cbc, sha},
- {rsa_psk, aes_256_cbc, sha}],
+ {rsa_psk, aes_256_cbc, sha},
+ {rsa_psk, aes_128_cbc, sha256},
+ {rsa_psk, aes_256_cbc, sha384}
+],
ssl_cipher:filter_suites(Suites).
psk_anon_suites() ->
- [{psk, rc4_128, sha},
- {psk, '3des_ede_cbc', sha},
- {psk, aes_128_cbc, sha},
- {psk, aes_256_cbc, sha},
- {dhe_psk, rc4_128, sha},
- {dhe_psk, '3des_ede_cbc', sha},
- {dhe_psk, aes_128_cbc, sha},
- {dhe_psk, aes_256_cbc, sha}].
+ Suites =
+ [{psk, rc4_128, sha},
+ {psk, '3des_ede_cbc', sha},
+ {psk, aes_128_cbc, sha},
+ {psk, aes_256_cbc, sha},
+ {dhe_psk, rc4_128, sha},
+ {dhe_psk, '3des_ede_cbc', sha},
+ {dhe_psk, aes_128_cbc, sha},
+ {dhe_psk, aes_256_cbc, sha}],
+ ssl_cipher:filter_suites(Suites).
srp_suites() ->
Suites =
@@ -857,9 +912,11 @@ srp_suites() ->
ssl_cipher:filter_suites(Suites).
srp_anon_suites() ->
- [{srp_anon, '3des_ede_cbc', sha},
- {srp_anon, aes_128_cbc, sha},
- {srp_anon, aes_256_cbc, sha}].
+ Suites =
+ [{srp_anon, '3des_ede_cbc', sha},
+ {srp_anon, aes_128_cbc, sha},
+ {srp_anon, aes_256_cbc, sha}],
+ ssl_cipher:filter_suites(Suites).
srp_dss_suites() ->
Suites =
@@ -878,7 +935,7 @@ der_to_pem(File, Entries) ->
cipher_result(Socket, Result) ->
Result = ssl:connection_info(Socket),
- ct:log("Successfull connect: ~p~n", [Result]),
+ ct:log("~p:~p~nSuccessfull connect: ~p~n", [?MODULE,?LINE, Result]),
%% Importante to send two packets here
%% to properly test "cipher state" handling
ssl:send(Socket, "Hello\n"),
@@ -1047,10 +1104,13 @@ check_sane_openssl_version(Version) ->
true
end.
+enough_openssl_crl_support("OpenSSL 0." ++ _) -> false;
+enough_openssl_crl_support(_) -> true.
+
wait_for_openssl_server() ->
receive
{Port, {data, Debug}} when is_port(Port) ->
- ct:log("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
%% openssl has started make sure
%% it will be in accept. Parsing
%% output is too error prone. (Even
@@ -1066,3 +1126,46 @@ version_flag('tlsv1.2') ->
" -tls1_2 ";
version_flag(sslv3) ->
" -ssl3 ".
+
+filter_suites(Ciphers0) ->
+ Version = tls_record:highest_protocol_version([]),
+ Supported0 = ssl_cipher:suites(Version)
+ ++ ssl_cipher:anonymous_suites()
+ ++ ssl_cipher:psk_suites(Version)
+ ++ ssl_cipher:srp_suites(),
+ Supported1 = ssl_cipher:filter_suites(Supported0),
+ Supported2 = [ssl:suite_definition(S) || S <- Supported1],
+ [Cipher || Cipher <- Ciphers0, lists:member(Cipher, Supported2)].
+
+-define(OPENSSL_QUIT, "Q\n").
+close_port(Port) ->
+ catch port_command(Port, ?OPENSSL_QUIT),
+ close_loop(Port, 500, false).
+
+close_loop(Port, Time, SentClose) ->
+ receive
+ {Port, {data,Debug}} when is_port(Port) ->
+ ct:log("openssl ~s~n",[Debug]),
+ close_loop(Port, Time, SentClose);
+ {ssl,_,Msg} ->
+ ct:log("ssl Msg ~s~n",[Msg]),
+ close_loop(Port, Time, SentClose);
+ {Port, closed} ->
+ ct:log("Port Closed~n",[]),
+ ok;
+ {'EXIT', Port, Reason} ->
+ ct:log("Port Closed ~p~n",[Reason]),
+ ok;
+ Msg ->
+ ct:log("Port Msg ~p~n",[Msg]),
+ close_loop(Port, Time, SentClose)
+ after Time ->
+ case SentClose of
+ false ->
+ ct:log("Closing port ~n",[]),
+ catch erlang:port_close(Port),
+ close_loop(Port, Time, true);
+ true ->
+ ct:log("Timeout~n",[])
+ end
+ end.
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 21f0172dba..942c446ec4 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -154,22 +154,31 @@ special_init(TestCase, Config)
TestCase == erlang_client_openssl_server_nowrap_seqnum;
TestCase == erlang_server_openssl_client_nowrap_seqnum
->
- check_sane_openssl_renegotaite(Config);
+ {ok, Version} = application:get_env(ssl, protocol_version),
+ check_sane_openssl_renegotaite(Config, Version);
special_init(ssl2_erlang_server_openssl_client, Config) ->
check_sane_openssl_sslv2(Config);
special_init(TestCase, Config)
when TestCase == erlang_client_openssl_server_npn;
- TestCase == erlang_server_openssl_client_npn;
- TestCase == erlang_server_openssl_client_npn_renegotiate;
- TestCase == erlang_client_openssl_server_npn_renegotiate;
+ TestCase == erlang_server_openssl_client_npn;
TestCase == erlang_server_openssl_client_npn_only_server;
TestCase == erlang_server_openssl_client_npn_only_client;
TestCase == erlang_client_openssl_server_npn_only_client;
TestCase == erlang_client_openssl_server_npn_only_server ->
check_openssl_npn_support(Config);
+special_init(TestCase, Config)
+ when TestCase == erlang_server_openssl_client_npn_renegotiate;
+ TestCase == erlang_client_openssl_server_npn_renegotiate ->
+ {ok, Version} = application:get_env(ssl, protocol_version),
+ case check_sane_openssl_renegotaite(Config, Version) of
+ {skip, _} = Skip ->
+ Skip;
+ _ ->
+ check_openssl_npn_support(Config)
+ end;
special_init(_, Config) ->
Config.
@@ -217,7 +226,7 @@ basic_erlang_client_openssl_server(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -239,7 +248,7 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) ->
Port = ssl_test_lib:inet_port(Server),
Cmd = "openssl s_client -port " ++ integer_to_list(Port) ++
- " -host localhost",
+ " -host localhost" ++ workaround_openssl_s_clinent(),
ct:log("openssl cmd: ~p~n", [Cmd]),
@@ -250,7 +259,7 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false),
ok.
%%--------------------------------------------------------------------
@@ -289,7 +298,7 @@ erlang_client_openssl_server(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -323,11 +332,9 @@ erlang_server_openssl_client(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false).
-%%--------------------------------------------------------------------
-
erlang_client_openssl_server_dsa_cert() ->
[{doc,"Test erlang server with openssl client"}].
erlang_client_openssl_server_dsa_cert(Config) when is_list(Config) ->
@@ -367,7 +374,7 @@ erlang_client_openssl_server_dsa_cert(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false),
ok.
@@ -405,7 +412,7 @@ erlang_server_openssl_client_dsa_cert(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false).
%%--------------------------------------------------------------------
@@ -441,7 +448,7 @@ erlang_server_openssl_client_reuse_session(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false),
ok.
@@ -487,7 +494,7 @@ erlang_client_openssl_server_renegotiate(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false),
ok.
@@ -533,7 +540,7 @@ erlang_client_openssl_server_nowrap_seqnum(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
%%--------------------------------------------------------------------
@@ -572,7 +579,7 @@ erlang_server_openssl_client_nowrap_seqnum(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false).
%%--------------------------------------------------------------------
@@ -615,7 +622,7 @@ erlang_client_openssl_server_no_server_ca_cert(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -657,7 +664,7 @@ erlang_client_openssl_server_client_cert(Config) when is_list(Config) ->
ssl_test_lib:check_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -699,7 +706,7 @@ erlang_server_openssl_client_client_cert(Config) when is_list(Config) ->
ssl_test_lib:check_result(Server, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
ssl_test_lib:close(Server),
process_flag(trap_exit, false).
@@ -812,7 +819,7 @@ erlang_client_bad_openssl_server(Config) when is_list(Config) ->
[{versions, [Version]} | ClientOpts]}]),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client1),
process_flag(trap_exit, false),
ok.
@@ -869,7 +876,7 @@ expired_session(Config) when is_list(Config) ->
{from, self()}, {options, ClientOpts}]),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client2),
process_flag(trap_exit, false).
@@ -903,8 +910,16 @@ ssl2_erlang_server_openssl_client(Config) when is_list(Config) ->
{'EXIT', OpenSslPort, _} = Exit ->
ct:log("Received: ~p ~n", [Exit]),
ok
-
end,
+ receive
+ {'EXIT', _, _} = UnkownExit ->
+ Msg = lists:flatten(io_lib:format("Received: ~p ~n", [UnkownExit])),
+ ct:log(Msg),
+ ct:comment(Msg),
+ ok
+ after 0 ->
+ ok
+ end,
ssl_test_lib:check_result(Server, {error, {tls_alert, "protocol version"}}),
process_flag(trap_exit, false).
@@ -1072,7 +1087,7 @@ cipher(CipherSuite, Version, Config, ClientOpts, ServerOpts) ->
Result = ssl_test_lib:wait_for_result(Client, ok),
%% Clean close down! Server needs to be closed first !!
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
ssl_test_lib:close(Client),
Return = case Result of
@@ -1119,7 +1134,7 @@ start_erlang_client_and_openssl_server_with_opts(Config, ErlangClientOpts, Opens
Callback(Client, OpensslPort),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -1158,7 +1173,7 @@ start_erlang_client_and_openssl_server_for_npn_negotiation(Config, Data, Callbac
Callback(Client, OpensslPort),
%% Clean close down! Server needs to be closed first !!
- close_port(OpensslPort),
+ ssl_test_lib:close_port(OpensslPort),
ssl_test_lib:close(Client),
process_flag(trap_exit, false).
@@ -1188,7 +1203,7 @@ start_erlang_server_and_openssl_client_for_npn_negotiation(Config, Data, Callbac
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false).
@@ -1217,7 +1232,7 @@ start_erlang_server_and_openssl_client_with_opts(Config, ErlangServerOpts, OpenS
ssl_test_lib:close(Server),
- close_port(OpenSslPort),
+ ssl_test_lib:close_port(OpenSslPort),
process_flag(trap_exit, false).
@@ -1265,39 +1280,6 @@ delayed_send(Socket, [ErlData, OpenSslData]) ->
ssl:send(Socket, ErlData),
erlang_ssl_receive(Socket, OpenSslData).
-close_port(Port) ->
- catch port_command(Port, ?OPENSSL_QUIT),
- close_loop(Port, 500, false).
-
-close_loop(Port, Time, SentClose) ->
- receive
- {Port, {data,Debug}} when is_port(Port) ->
- ct:log("openssl ~s~n",[Debug]),
- close_loop(Port, Time, SentClose);
- {ssl,_,Msg} ->
- ct:log("ssl Msg ~s~n",[Msg]),
- close_loop(Port, Time, SentClose);
- {Port, closed} ->
- ct:log("Port Closed~n",[]),
- ok;
- {'EXIT', Port, Reason} ->
- ct:log("Port Closed ~p~n",[Reason]),
- ok;
- Msg ->
- ct:log("Port Msg ~p~n",[Msg]),
- close_loop(Port, Time, SentClose)
- after Time ->
- case SentClose of
- false ->
- ct:log("Closing port ~n",[]),
- catch erlang:port_close(Port),
- close_loop(Port, Time, true);
- true ->
- ct:log("Timeout~n",[])
- end
- end.
-
-
server_sent_garbage(Socket) ->
receive
server_sent_garbage ->
@@ -1315,8 +1297,25 @@ check_openssl_npn_support(Config) ->
Config
end.
+check_sane_openssl_renegotaite(Config, Version) when Version == 'tlsv1.1';
+ Version == 'tlsv1.2' ->
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1c" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1b" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1a" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1 " ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ _ ->
+ check_sane_openssl_renegotaite(Config)
+ end;
+check_sane_openssl_renegotaite(Config, _) ->
+ check_sane_openssl_renegotaite(Config).
+
check_sane_openssl_renegotaite(Config) ->
- case os:cmd("openssl version") of
+ case os:cmd("openssl version") of
"OpenSSL 0.9.8" ++ _ ->
{skip, "Known renegotiation bug in OpenSSL"};
"OpenSSL 0.9.7" ++ _ ->
@@ -1349,3 +1348,20 @@ supports_sslv2(Port) ->
true
end.
+workaround_openssl_s_clinent() ->
+ %% http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683159
+ %% https://bugs.archlinux.org/task/33919
+ %% Bug seems to manifests it self if TLS version is not
+ %% explicitly specified
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1c" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1d" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1e" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1f" ++ _ ->
+ " -no_tls1_2 ";
+ _ ->
+ ""
+ end.
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index a6e0efed25..d5a9a71736 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 5.3.3
+SSL_VSN = 6.0.1
diff --git a/lib/stdlib/doc/src/Makefile b/lib/stdlib/doc/src/Makefile
index 6f1e61e70c..ff77c3eea0 100644
--- a/lib/stdlib/doc/src/Makefile
+++ b/lib/stdlib/doc/src/Makefile
@@ -71,6 +71,7 @@ XML_REF3_FILES = \
lib.xml \
lists.xml \
log_mf_h.xml \
+ maps.xml \
math.xml \
ms_transform.xml \
orddict.xml \
diff --git a/lib/stdlib/doc/src/array.xml b/lib/stdlib/doc/src/array.xml
index a79fcd487e..b03a2fa0cc 100644
--- a/lib/stdlib/doc/src/array.xml
+++ b/lib/stdlib/doc/src/array.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2007</year><year>2011</year>
+ <year>2007</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -84,7 +84,7 @@ the default value cannot be confused with the values of set entries.</p>
{'EXIT',{badarg,_}} = (catch array:get(18, A3)).</pre></description>
<datatypes>
<datatype>
- <name><marker id="type-array">array()</marker></name>
+ <name name="array" n_vars="1"/>
<desc>
<p>A functional, extendible array. The representation is
not documented and is subject to change without notice. Note that
@@ -92,6 +92,12 @@ the default value cannot be confused with the values of set entries.</p>
</desc>
</datatype>
<datatype>
+ <name name="array" n_vars="0"/>
+ <desc>
+ <p><c>array()</c> is equivalent to <c>array(term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
<name name="array_indx"/>
</datatype>
<datatype>
@@ -189,7 +195,7 @@ the default value cannot be confused with the values of set entries.</p>
<desc><marker id="from_orddict-2"/>
-<p>Convert an ordered list of pairs <c>{Index, Value}</c> to a
+<p>Convert an ordered list of pairs <c>{Index, <anno>Value</anno>}</c> to a
corresponding extendible array. <c><anno>Default</anno></c> is used as the value for
uninitialized entries of the array. If <c><anno>Orddict</anno></c> is not a proper,
ordered list of pairs whose first elements are nonnegative
@@ -455,7 +461,7 @@ cannot be changed once the array has been created.</p>
<desc><marker id="sparse_to_orddict-1"/>
-<p>Convert the array to an ordered list of pairs <c>{Index, Value}</c>,
+<p>Convert the array to an ordered list of pairs <c>{Index, <anno>Value</anno>}</c>,
skipping default-valued entries.
</p>
<p><em>See also:</em> <seealso marker="#to_orddict-1">to_orddict/1</seealso>.</p>
@@ -476,7 +482,7 @@ cannot be changed once the array has been created.</p>
<desc><marker id="to_orddict-1"/>
-<p>Convert the array to an ordered list of pairs <c>{Index, Value}</c>.
+<p>Convert the array to an ordered list of pairs <c>{Index, <anno>Value</anno>}</c>.
</p>
<p><em>See also:</em> <seealso marker="#from_orddict-2">from_orddict/2</seealso>, <seealso marker="#sparse_to_orddict-1">sparse_to_orddict/1</seealso>.</p>
</desc></func></funcs>
diff --git a/lib/stdlib/doc/src/base64.xml b/lib/stdlib/doc/src/base64.xml
index f90a82187d..c4982f4eaa 100644
--- a/lib/stdlib/doc/src/base64.xml
+++ b/lib/stdlib/doc/src/base64.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml
index db65eb3848..eb4974a79f 100644
--- a/lib/stdlib/doc/src/beam_lib.xml
+++ b/lib/stdlib/doc/src/beam_lib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml
index 06cfad0b0b..2410f1f9b8 100644
--- a/lib/stdlib/doc/src/binary.xml
+++ b/lib/stdlib/doc/src/binary.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2009</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/book.xml b/lib/stdlib/doc/src/book.xml
index 10ee6f3855..b1b67d661c 100644
--- a/lib/stdlib/doc/src/book.xml
+++ b/lib/stdlib/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml
index f2e3d8fb44..b49fa6ad67 100644
--- a/lib/stdlib/doc/src/c.xml
+++ b/lib/stdlib/doc/src/c.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/calendar.xml b/lib/stdlib/doc/src/calendar.xml
index f8db48e00c..e32a639b81 100644
--- a/lib/stdlib/doc/src/calendar.xml
+++ b/lib/stdlib/doc/src/calendar.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/dets.xml b/lib/stdlib/doc/src/dets.xml
index 215ec154ed..6bbedb0662 100644
--- a/lib/stdlib/doc/src/dets.xml
+++ b/lib/stdlib/doc/src/dets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml
index b01acd02bf..0771682a25 100644
--- a/lib/stdlib/doc/src/dict.xml
+++ b/lib/stdlib/doc/src/dict.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -41,9 +41,15 @@
<datatypes>
<datatype>
- <name><marker id="type-dict">dict()</marker></name>
+ <name name="dict" n_vars="2"/>
<desc><p>Dictionary as returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="dict" n_vars="0"/>
+ <desc>
+ <p><c>dict()</c> is equivalent to <c>dict(term(), term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -115,7 +121,7 @@
<c><anno>Dict</anno></c> together with an extra argument <c>Acc</c>
(short for accumulator). <c><anno>Fun</anno></c> must return a new
accumulator which is passed to the next call. <c><anno>Acc0</anno></c> is
- returned if the list is empty. The evaluation order is
+ returned if the dict is empty. The evaluation order is
undefined.</p>
</desc>
</func>
@@ -177,6 +183,13 @@ merge(Fun, D1, D2) ->
</desc>
</func>
<func>
+ <name name="is_empty" arity="1"/>
+ <fsummary>Return true if the dictionary is empty</fsummary>
+ <desc>
+ <p>Returns <c>true</c> if <c><anno>Dict</anno></c> has no elements, <c>false</c> otherwise.</p>
+ </desc>
+ </func>
+ <func>
<name name="store" arity="3"/>
<fsummary>Store a value in a dictionary</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/digraph.xml b/lib/stdlib/doc/src/digraph.xml
index 0afc70ebe0..9b9b48584b 100644
--- a/lib/stdlib/doc/src/digraph.xml
+++ b/lib/stdlib/doc/src/digraph.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -98,7 +98,7 @@
<name name="d_protection"/>
</datatype>
<datatype>
- <name><marker id="type-digraph">digraph()</marker></name>
+ <name name="graph"/>
<desc><p>A digraph as returned by <c>new/0,1</c>.</p></desc>
</datatype>
<datatype>
diff --git a/lib/stdlib/doc/src/digraph_utils.xml b/lib/stdlib/doc/src/digraph_utils.xml
index ef6e1cb46f..ef6f9d8611 100644
--- a/lib/stdlib/doc/src/digraph_utils.xml
+++ b/lib/stdlib/doc/src/digraph_utils.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2012</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml
index df7bf883fc..452341f7d2 100644
--- a/lib/stdlib/doc/src/epp.xml
+++ b/lib/stdlib/doc/src/epp.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -46,8 +46,10 @@
valid encodings are <c>Latin-1</c> and <c>UTF-8</c> where the
case of the characters can be chosen freely. Examples:</p>
<pre>
-%% coding: utf-8
-%% For this file we have chosen encoding = Latin-1
+%% coding: utf-8</pre>
+ <pre>
+%% For this file we have chosen encoding = Latin-1</pre>
+ <pre>
%% -*- coding: latin-1 -*-</pre>
</description>
<datatypes>
@@ -64,11 +66,29 @@
</datatypes>
<funcs>
<func>
+ <name name="open" arity="1"/>
+ <fsummary>Open a file for preprocessing</fsummary>
+ <desc>
+ <p>Opens a file for preprocessing.</p>
+ <p>If <c>extra</c> is given in
+ <c><anno>Options</anno></c>, the return value will be
+ <c>{ok, <anno>Epp</anno>, <anno>Extra</anno>}</c> instead
+ of <c>{ok, <anno>Epp</anno>}</c>.</p>
+ </desc>
+ </func>
+ <func>
<name name="open" arity="2"/>
+ <fsummary>Open a file for preprocessing</fsummary>
+ <desc>
+ <p>Equivalent to <c>epp:open([{name, FileName}, {includes, IncludePath}])</c>.</p>
+ </desc>
+ </func>
+ <func>
<name name="open" arity="3"/>
<fsummary>Open a file for preprocessing</fsummary>
<desc>
- <p>Opens a file for preprocessing.</p>
+ <p>Equivalent to <c>epp:open([{name, FileName}, {includes, IncludePath},
+ {macros, PredefMacros}])</c>.</p>
</desc>
</func>
<func>
@@ -89,12 +109,24 @@
</desc>
</func>
<func>
- <name name="parse_file" arity="3"/>
+ <name name="parse_file" arity="2"/>
<fsummary>Preprocess and parse an Erlang source file</fsummary>
<desc>
<p>Preprocesses and parses an Erlang source file.
- Note that the tuple <c>{eof, <anno>Line</anno>}</c> returned at end-of-file is
- included as a "form".</p>
+ Note that the tuple <c>{eof, <anno>Line</anno>}</c> returned
+ at end-of-file is included as a "form".</p>
+ <p>If <c>extra</c> is given in
+ <c><anno>Options</anno></c>, the return value will be
+ <c>{ok, [<anno>Form</anno>], <anno>Extra</anno>}</c> instead
+ of <c>{ok, [<anno>Form</anno>]}</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="parse_file" arity="3"/>
+ <fsummary>Preprocess and parse an Erlang source file</fsummary>
+ <desc>
+ <p>Equivalent to <c>epp:parse_file(FileName, [{includes, IncludePath},
+ {macros, PredefMacros}])</c>.</p>
</desc>
</func>
<func>
@@ -111,7 +143,7 @@
<p>Returns a string representation of an encoding. The string
is recognized by <c>read_encoding/1,2</c>,
<c>read_encoding_from_binary/1,2</c>, and
- <c>set_encoding/1</c> as a valid encoding.</p>
+ <c>set_encoding/1,2</c> as a valid encoding.</p>
</desc>
</func>
<func>
@@ -157,6 +189,22 @@
</desc>
</func>
<func>
+ <name name="set_encoding" arity="2"/>
+ <fsummary>Read and set the encoding of an IO device</fsummary>
+ <desc>
+ <p>Reads the <seealso marker="#encoding">encoding</seealso> from
+ an IO device and sets the encoding of the device
+ accordingly. The position of the IO device referenced by
+ <c><anno>File</anno></c> is not affected. If no valid
+ encoding can be read from the IO device the encoding of the
+ IO device is set to the
+ <seealso marker="#encoding">encoding</seealso> given by
+ <c><anno>Default</anno></c>.</p>
+ <p>Returns the read encoding, or <c>none</c> if no valid
+ encoding was found.</p>
+ </desc>
+ </func>
+ <func>
<name name="format_error" arity="1"/>
<fsummary>Format an error descriptor</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/erl_eval.xml b/lib/stdlib/doc/src/erl_eval.xml
index fd78788a45..b707dbcc02 100644
--- a/lib/stdlib/doc/src/erl_eval.xml
+++ b/lib/stdlib/doc/src/erl_eval.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/erl_expand_records.xml b/lib/stdlib/doc/src/erl_expand_records.xml
index 8ead438b31..1b5ee5de36 100644
--- a/lib/stdlib/doc/src/erl_expand_records.xml
+++ b/lib/stdlib/doc/src/erl_expand_records.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2005</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_id_trans.xml b/lib/stdlib/doc/src/erl_id_trans.xml
index 18cc2460f9..0f7042f0c6 100644
--- a/lib/stdlib/doc/src/erl_id_trans.xml
+++ b/lib/stdlib/doc/src/erl_id_trans.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_internal.xml b/lib/stdlib/doc/src/erl_internal.xml
index b8d5ad73b3..54e560f8b9 100644
--- a/lib/stdlib/doc/src/erl_internal.xml
+++ b/lib/stdlib/doc/src/erl_internal.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_lint.xml b/lib/stdlib/doc/src/erl_lint.xml
index b7fbdd8799..1ca58baf9a 100644
--- a/lib/stdlib/doc/src/erl_lint.xml
+++ b/lib/stdlib/doc/src/erl_lint.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index 56a7131821..cf0bff48cd 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -173,6 +173,7 @@
</func>
<func>
<name name="abstract" arity="2"/>
+ <type name="encoding_func"/>
<fsummary>Convert an Erlang term into an abstract form</fsummary>
<desc>
<p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
@@ -183,7 +184,12 @@
selecting which integer lists will be considered
as strings. The default is to use the encoding returned by
<seealso marker="epp#default_encoding/0">
- <c>epp:default_encoding/0</c></seealso></p>
+ <c>epp:default_encoding/0</c></seealso>.
+ The value <c>none</c> means that no integer lists will be
+ considered as strings. The <c>encoding_func()</c> will be
+ called with one integer of a list at a time, and if it
+ returns <c>true</c> for every integer the list will be
+ considered a string.</p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/doc/src/erl_pp.xml b/lib/stdlib/doc/src/erl_pp.xml
index 9ae4f3d91f..005c101973 100644
--- a/lib/stdlib/doc/src/erl_pp.xml
+++ b/lib/stdlib/doc/src/erl_pp.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_scan.xml b/lib/stdlib/doc/src/erl_scan.xml
index 54240dea19..855c8fc195 100644
--- a/lib/stdlib/doc/src/erl_scan.xml
+++ b/lib/stdlib/doc/src/erl_scan.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/erl_tar.xml b/lib/stdlib/doc/src/erl_tar.xml
index fe166dbd01..95eefb8f9b 100644
--- a/lib/stdlib/doc/src/erl_tar.xml
+++ b/lib/stdlib/doc/src/erl_tar.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,10 +35,11 @@
<modulesummary>Unix 'tar' utility for reading and writing tar archives</modulesummary>
<description>
<p>The <c>erl_tar</c> module archives and extract files to and from
- a tar file. The tar file format is the POSIX extended tar file format
- specified in IEEE Std 1003.1 and ISO/IEC&nbsp;9945-1. That is the same
- format as used by <c>tar</c> program on Solaris, but is not the same
- as used by the GNU tar program.</p>
+ a tar file. <c>erl_tar</c> supports the <c>ustar</c> format
+ (IEEE Std 1003.1 and ISO/IEC&nbsp;9945-1). All modern <c>tar</c>
+ programs (including GNU tar) can read this format. To ensure that
+ that GNU tar produces a tar file that <c>erl_tar</c> can read,
+ give the <c>--format=ustar</c> option to GNU tar.</p>
<p>By convention, the name of a tar file should end in "<c>.tar</c>".
To abide to the convention, you'll need to add "<c>.tar</c>" yourself
to the name.</p>
@@ -65,6 +66,26 @@
</description>
<section>
+ <title>UNICODE SUPPORT</title>
+ <p>If <seealso
+ marker="kernel:file#native_name_encoding/0">file:native_name_encoding/0</seealso>
+ returns <c>utf8</c>, path names will be encoded in UTF-8 when
+ creating tar files and path names will be assumed to be encoded in
+ UTF-8 when extracting tar files.</p>
+
+ <p>If <seealso
+ marker="kernel:file#native_name_encoding/0">file:native_name_encoding/0</seealso>
+ returns <c>latin1</c>, no translation of path names will be
+ done.</p>
+ </section>
+
+ <section>
+ <title>OTHER STORAGE MEDIA</title>
+ <p>The <c>erl_ftp</c> module normally accesses the tar-file on disk using the <seealso marker="kernel:file">file module</seealso>. When other needs arise, there is a way to define your own low-level Erlang functions to perform the writing and reading on the storage media. See <seealso marker="#init/3">init/3</seealso> for usage.</p>
+ <p>An example of this is the sftp support in <seealso marker="ssh:ssh_sftp#open_tar/3">ssh_sftp:open_tar/3</seealso>. That function opens a tar file on a remote machine using an sftp channel.</p>
+ </section>
+
+ <section>
<title>LIMITATIONS</title>
<p>For maximum compatibility, it is safe to archive files with names
up to 100 characters in length. Such tar files can generally be
@@ -84,7 +105,8 @@
<v>TarDescriptor = term()</v>
<v>Filename = filename()</v>
<v>Options = [Option]</v>
- <v>Option = dereference|verbose</v>
+ <v>Option = dereference|verbose|{chunks,ChunkSize}</v>
+ <v>ChunkSize = positive_integer()</v>
<v>RetValue = ok|{error,{Filename,Reason}}</v>
<v>Reason = term()</v>
</type>
@@ -104,6 +126,12 @@
<item>
<p>Print an informational message about the file being added.</p>
</item>
+ <tag><c>{chunks,ChunkSize}</c></tag>
+ <item>
+ <p>Read data in parts from the file. This is intended for memory-limited
+ machines that for example builds a tar file on a remote machine over
+ <seealso marker="ssh:ssh_sftp#open_tar/3">sftp</seealso>.</p>
+ </item>
</taglist>
</desc>
</func>
@@ -112,8 +140,8 @@
<fsummary>Add a file to an open tar file</fsummary>
<type>
<v>TarDescriptor = term()</v>
- <v>FilenameOrBin = Filename()|binary()</v>
- <v>Filename = filename()()</v>
+ <v>FilenameOrBin = filename()|binary()</v>
+ <v>Filename = filename()</v>
<v>NameInArchive = filename()</v>
<v>Options = [Option]</v>
<v>Option = dereference|verbose</v>
@@ -374,6 +402,101 @@
</warning>
</desc>
</func>
+
+ <func>
+ <name>init(UserPrivate, AccessMode, Fun) -> {ok,TarDescriptor} | {error,Reason}
+</name>
+ <fsummary>Creates a TarDescriptor used in subsequent tar operations when
+ defining own low-level storage access functions
+ </fsummary>
+ <type>
+ <v>UserPrivate = term()</v>
+ <v>AccessMode = [write] | [read]</v>
+ <v>Fun when AccessMode is [write] = fun(write, {UserPrivate,DataToWrite})->...;
+ (position,{UserPrivate,Position})->...;
+ (close, UserPrivate)->...
+ end
+ </v>
+ <v>Fun when AccessMode is [read] = fun(read2, {UserPrivate,Size})->...;
+ (position,{UserPrivate,Position})->...;
+ (close, UserPrivate)->...
+ end
+ </v>
+ <v>TarDescriptor = term()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>The <c>Fun</c> is the definition of what to do when the different
+ storage operations functions are to be called from the higher tar
+ handling functions (<c>add/3</c>, <c>add/4</c>, <c>close/1</c>...).
+ </p>
+ <p>The <c>Fun</c> will be called when the tar function wants to do
+ a low-level operation, like writing a block to a file. The Fun is called
+ as <c>Fun(Op,{UserPrivate,Parameters...})</c> where <c>Op</c> is the operation name,
+ <c>UserPrivate</c> is the term passed as the first argument to <c>init/1</c> and
+ <c>Parameters...</c> are the data added by the tar function to be passed down to
+ the storage handling function.
+ </p>
+ <p>The parameter <c>UserPrivate</c> is typically the result of opening a low level
+ structure like a file descriptor, a sftp channel id or such. The different <c>Fun</c>
+ clauses operates on that very term.
+ </p>
+ <p>The fun clauses parameter lists are:
+ <taglist>
+ <tag><c>(write, {UserPrivate,DataToWrite})</c></tag>
+ <item>Write the term <c>DataToWrite</c> using <c>UserPrivate</c></item>
+ <tag><c>(close, UserPrivate)</c></tag>
+ <item>Close the access.</item>
+ <tag><c>(read2, {UserPrivate,Size})</c></tag>
+ <item>Read using <c>UserPrivate</c> but only <c>Size</c> bytes. Note that there is
+ only an arity-2 read function, not an arity-1
+ </item>
+ <tag><c> (position,{UserPrivate,Position})</c></tag>
+ <item>Sets the position of <c>UserPrivate</c> as defined for files in <seealso marker="kernel:file#position-2">file:position/2</seealso></item>
+ <tag><c></c></tag>
+ <item></item>
+ </taglist>
+ </p>
+ <p>A complete <c>Fun</c> parameter for reading and writing on files using the
+ <seealso marker="kernel:file">file module</seealso> could be:
+ </p>
+ <code type="none">
+ ExampleFun =
+ fun(write, {Fd,Data}) -> file:write(Fd, Data);
+ (position, {Fd,Pos}) -> file:position(Fd, Pos);
+ (read2, {Fd,Size}) -> file:read(Fd,Size);
+ (close, Fd) -> file:close(Fd)
+ end
+ </code>
+ <p>where <c>Fd</c> was given to the <c>init/3</c> function as:</p>
+ <code>
+ {ok,Fd} = file:open(Name,...).
+ {ok,TarDesc} = erl_tar:init(Fd, [write], ExampleFun),
+ </code>
+ <p>The <c>TarDesc</c> is then used:</p>
+ <code>
+ erl_tar:add(TarDesc, SomeValueIwantToAdd, FileNameInTarFile),
+ ....,
+ erl_tar:close(TarDesc)
+ </code>
+ <p>When the erl_tar core wants to e.g. write a piece of Data, it would call
+ <c>ExampleFun(write,{UserPrivate,Data})</c>.
+ </p>
+ <note>
+ <p>The example above with <c>file</c> module operations is not necessary to
+ use directly since that is what the <seealso marker="#open">open</seealso> function
+ in principle does.
+ </p>
+ </note>
+ <warning>
+ <p>The <c>TarDescriptor</c> term is not a file descriptor.
+ You should not rely on the specific contents of the <c>TarDescriptor</c>
+ term, as it may change in future versions as more features are added
+ to the <c>erl_tar</c> module.</p>
+ </warning>
+ </desc>
+ </func>
+
<func>
<name>table(Name) -> RetValue</name>
<fsummary>Retrieve the name of all files in a tar file</fsummary>
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index 6db1ae3aa3..3df24bf688 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -171,6 +171,10 @@
<p>Returns a list of all tables at the node. Named tables are
given by their names, unnamed tables are given by their
table identifiers.</p>
+ <p>There is no guarantee of consistency in the returned list. Tables created
+ or deleted by other processes "during" the ets:all() call may or may
+ not be included in the list. Only tables created/deleted <em>before</em>
+ ets:all() is called are guaranteed to be included/excluded.</p>
</desc>
</func>
<func>
diff --git a/lib/stdlib/doc/src/fascicules.xml b/lib/stdlib/doc/src/fascicules.xml
index b30d34186e..0ded9007e0 100644
--- a/lib/stdlib/doc/src/fascicules.xml
+++ b/lib/stdlib/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/stdlib/doc/src/file_sorter.xml b/lib/stdlib/doc/src/file_sorter.xml
index a6b3633066..16572df3c5 100644
--- a/lib/stdlib/doc/src/file_sorter.xml
+++ b/lib/stdlib/doc/src/file_sorter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml
index d24d17be80..6fa39f97f6 100644
--- a/lib/stdlib/doc/src/filelib.xml
+++ b/lib/stdlib/doc/src/filelib.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/filename.xml b/lib/stdlib/doc/src/filename.xml
index 9296319b83..49b652f969 100644
--- a/lib/stdlib/doc/src/filename.xml
+++ b/lib/stdlib/doc/src/filename.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/gb_sets.xml b/lib/stdlib/doc/src/gb_sets.xml
index f91fac9c82..ea96c14472 100644
--- a/lib/stdlib/doc/src/gb_sets.xml
+++ b/lib/stdlib/doc/src/gb_sets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -115,28 +115,40 @@
<datatypes>
<datatype>
- <name><marker id="type-gb_set">gb_set()</marker></name>
+ <name name="set" n_vars="1"/>
<desc><p>A GB set.</p></desc>
</datatype>
<datatype>
- <name name="iter"/>
+ <name name="set" n_vars="0"/>
+ <desc>
+ <p><c>set()</c> is equivalent to <c>set(term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="iter" n_vars="1"/>
<desc><p>A GB set iterator.</p></desc>
</datatype>
+ <datatype>
+ <name name="iter" n_vars="0"/>
+ <desc>
+ <p><c>iter()</c> is equivalent to <c>iter(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
<name name="add" arity="2"/>
<name name="add_element" arity="2"/>
- <fsummary>Add a (possibly existing) element to a gb_set</fsummary>
+ <fsummary>Add a (possibly existing) element to a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> inserted. If <c><anno>Element</anno></c> is already an
element in <c><anno>Set1</anno></c>, nothing is changed.</p>
</desc>
</func>
<func>
<name name="balance" arity="1"/>
- <fsummary>Rebalance tree representation of a gb_set</fsummary>
+ <fsummary>Rebalance tree representation of a set</fsummary>
<desc>
<p>Rebalances the tree representation of <c><anno>Set1</anno></c>. Note that
this is rarely necessary, but may be motivated when a large
@@ -148,9 +160,9 @@
</func>
<func>
<name name="delete" arity="2"/>
- <fsummary>Remove an element from a gb_set</fsummary>
+ <fsummary>Remove an element from a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> removed. Assumes that <c><anno>Element</anno></c> is present
in <c><anno>Set1</anno></c>.</p>
</desc>
@@ -158,9 +170,9 @@
<func>
<name name="delete_any" arity="2"/>
<name name="del_element" arity="2"/>
- <fsummary>Remove a (possibly non-existing) element from a gb_set</fsummary>
+ <fsummary>Remove a (possibly non-existing) element from a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> removed. If <c><anno>Element</anno></c> is not an element
in <c><anno>Set1</anno></c>, nothing is changed.</p>
</desc>
@@ -168,7 +180,7 @@
<func>
<name name="difference" arity="2"/>
<name name="subtract" arity="2"/>
- <fsummary>Return the difference of two gb_sets</fsummary>
+ <fsummary>Return the difference of two sets</fsummary>
<desc>
<p>Returns only the elements of <c><anno>Set1</anno></c> which are not also
elements of <c><anno>Set2</anno></c>.</p>
@@ -177,14 +189,14 @@
<func>
<name name="empty" arity="0"/>
<name name="new" arity="0"/>
- <fsummary>Return an empty gb_set</fsummary>
+ <fsummary>Return an empty set</fsummary>
<desc>
- <p>Returns a new empty gb_set.</p>
+ <p>Returns a new empty set.</p>
</desc>
</func>
<func>
<name name="filter" arity="2"/>
- <fsummary>Filter gb_set elements</fsummary>
+ <fsummary>Filter set elements</fsummary>
<desc>
<p>Filters elements in <c><anno>Set1</anno></c> using predicate function
<c><anno>Pred</anno></c>.</p>
@@ -192,7 +204,7 @@
</func>
<func>
<name name="fold" arity="3"/>
- <fsummary>Fold over gb_set elements</fsummary>
+ <fsummary>Fold over set elements</fsummary>
<desc>
<p>Folds <c><anno>Function</anno></c> over every element in <c><anno>Set</anno></c>
returning the final value of the accumulator.</p>
@@ -200,46 +212,46 @@
</func>
<func>
<name name="from_list" arity="1"/>
- <fsummary>Convert a list into a gb_set</fsummary>
+ <fsummary>Convert a list into a set</fsummary>
<desc>
- <p>Returns a gb_set of the elements in <c><anno>List</anno></c>, where
+ <p>Returns a set of the elements in <c><anno>List</anno></c>, where
<c><anno>List</anno></c> may be unordered and contain duplicates.</p>
</desc>
</func>
<func>
<name name="from_ordset" arity="1"/>
- <fsummary>Make a gb_set from an ordset list</fsummary>
+ <fsummary>Make a set from an ordset list</fsummary>
<desc>
- <p>Turns an ordered-set list <c><anno>List</anno></c> into a gb_set. The list
+ <p>Turns an ordered-set list <c><anno>List</anno></c> into a set. The list
must not contain duplicates.</p>
</desc>
</func>
<func>
<name name="insert" arity="2"/>
- <fsummary>Add a new element to a gb_set</fsummary>
+ <fsummary>Add a new element to a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> inserted. Assumes that <c><anno>Element</anno></c> is not
present in <c><anno>Set1</anno></c>.</p>
</desc>
</func>
<func>
<name name="intersection" arity="2"/>
- <fsummary>Return the intersection of two gb_sets</fsummary>
+ <fsummary>Return the intersection of two sets</fsummary>
<desc>
<p>Returns the intersection of <c><anno>Set1</anno></c> and <c><anno>Set2</anno></c>.</p>
</desc>
</func>
<func>
<name name="intersection" arity="1"/>
- <fsummary>Return the intersection of a list of gb_sets</fsummary>
+ <fsummary>Return the intersection of a list of sets</fsummary>
<desc>
- <p>Returns the intersection of the non-empty list of gb_sets.</p>
+ <p>Returns the intersection of the non-empty list of sets.</p>
</desc>
</func>
<func>
<name name="is_disjoint" arity="2"/>
- <fsummary>Check whether two gb_sets are disjoint</fsummary>
+ <fsummary>Check whether two sets are disjoint</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Set1</anno></c> and
<c><anno>Set2</anno></c> are disjoint (have no elements in common),
@@ -248,7 +260,7 @@
</func>
<func>
<name name="is_empty" arity="1"/>
- <fsummary>Test for empty gb_set</fsummary>
+ <fsummary>Test for empty set</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Set</anno></c> is an empty set, and
<c>false</c> otherwise.</p>
@@ -257,7 +269,7 @@
<func>
<name name="is_member" arity="2"/>
<name name="is_element" arity="2"/>
- <fsummary>Test for membership of a gb_set</fsummary>
+ <fsummary>Test for membership of a set</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Element</anno></c> is an element of
<c><anno>Set</anno></c>, otherwise <c>false</c>.</p>
@@ -265,9 +277,9 @@
</func>
<func>
<name name="is_set" arity="1"/>
- <fsummary>Test for a gb_set</fsummary>
+ <fsummary>Test for a set</fsummary>
<desc>
- <p>Returns <c>true</c> if <c><anno>Term</anno></c> appears to be a gb_set,
+ <p>Returns <c>true</c> if <c><anno>Term</anno></c> appears to be a set,
otherwise <c>false</c>.</p>
</desc>
</func>
@@ -281,7 +293,7 @@
</func>
<func>
<name name="iterator" arity="1"/>
- <fsummary>Return an iterator for a gb_set</fsummary>
+ <fsummary>Return an iterator for a set</fsummary>
<desc>
<p>Returns an iterator that can be used for traversing the
entries of <c><anno>Set</anno></c>; see <c>next/1</c>. The implementation
@@ -303,7 +315,7 @@
</func>
<func>
<name name="next" arity="1"/>
- <fsummary>Traverse a gb_set with an iterator</fsummary>
+ <fsummary>Traverse a set with an iterator</fsummary>
<desc>
<p>Returns <c>{<anno>Element</anno>, <anno>Iter2</anno>}</c> where <c><anno>Element</anno></c> is the
smallest element referred to by the iterator <c><anno>Iter1</anno></c>,
@@ -314,14 +326,14 @@
</func>
<func>
<name name="singleton" arity="1"/>
- <fsummary>Return a gb_set with one element</fsummary>
+ <fsummary>Return a set with one element</fsummary>
<desc>
- <p>Returns a gb_set containing only the element <c><anno>Element</anno></c>.</p>
+ <p>Returns a set containing only the element <c><anno>Element</anno></c>.</p>
</desc>
</func>
<func>
<name name="size" arity="1"/>
- <fsummary>Return the number of elements in a gb_set</fsummary>
+ <fsummary>Return the number of elements in a set</fsummary>
<desc>
<p>Returns the number of elements in <c><anno>Set</anno></c>.</p>
</desc>
@@ -356,24 +368,24 @@
</func>
<func>
<name name="to_list" arity="1"/>
- <fsummary>Convert a gb_set into a list</fsummary>
+ <fsummary>Convert a set into a list</fsummary>
<desc>
<p>Returns the elements of <c><anno>Set</anno></c> as a list.</p>
</desc>
</func>
<func>
<name name="union" arity="2"/>
- <fsummary>Return the union of two gb_sets</fsummary>
+ <fsummary>Return the union of two sets</fsummary>
<desc>
- <p>Returns the merged (union) gb_set of <c><anno>Set1</anno></c> and
+ <p>Returns the merged (union) set of <c><anno>Set1</anno></c> and
<c><anno>Set2</anno></c>.</p>
</desc>
</func>
<func>
<name name="union" arity="1"/>
- <fsummary>Return the union of a list of gb_sets</fsummary>
+ <fsummary>Return the union of a list of sets</fsummary>
<desc>
- <p>Returns the merged (union) gb_set of the list of gb_sets.</p>
+ <p>Returns the merged (union) set of the list of sets.</p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml
index 9316d60b1a..b2f237e1d7 100644
--- a/lib/stdlib/doc/src/gb_trees.xml
+++ b/lib/stdlib/doc/src/gb_trees.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -59,13 +59,25 @@
<datatypes>
<datatype>
- <name><marker id="type-gb_tree">gb_tree()</marker></name>
+ <name name="tree" n_vars="2"/>
<desc><p>A GB tree.</p></desc>
</datatype>
<datatype>
- <name name="iter"/>
+ <name name="tree" n_vars="0"/>
+ <desc>
+ <p><c>tree()</c> is equivalent to <c>tree(term(), term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="iter" n_vars="2"/>
<desc><p>A GB tree iterator.</p></desc>
</datatype>
+ <datatype>
+ <name name="iter" n_vars="0"/>
+ <desc>
+ <p><c>iter()</c> is equivalent to <c>iter(term(), term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -108,9 +120,9 @@
<name name="enter" arity="3"/>
<fsummary>Insert or update key with value in a tree</fsummary>
<desc>
- <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Val</anno></c> into <c><anno>Tree1</anno></c> if
+ <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> into <c><anno>Tree1</anno></c> if
the key is not present in the tree, otherwise updates
- <c><anno>Key</anno></c> to value <c><anno>Val</anno></c> in <c><anno>Tree1</anno></c>. Returns the
+ <c><anno>Key</anno></c> to value <c><anno>Value</anno></c> in <c><anno>Tree1</anno></c>. Returns the
new tree.</p>
</desc>
</func>
@@ -135,7 +147,7 @@
<name name="insert" arity="3"/>
<fsummary>Insert a new key and value in a tree</fsummary>
<desc>
- <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Val</anno></c> into <c><anno>Tree1</anno></c>;
+ <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> into <c><anno>Tree1</anno></c>;
returns the new tree. Assumes that the key is not present in
the tree, crashes otherwise.</p>
</desc>
@@ -181,8 +193,8 @@
<name name="largest" arity="1"/>
<fsummary>Return largest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>}</c>, where <c><anno>Key</anno></c> is the largest
- key in <c><anno>Tree</anno></c>, and <c><anno>Val</anno></c> is the value associated
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>}</c>, where <c><anno>Key</anno></c> is the largest
+ key in <c><anno>Tree</anno></c>, and <c><anno>Value</anno></c> is the value associated
with this key. Assumes that the tree is nonempty.</p>
</desc>
</func>
@@ -191,7 +203,7 @@
<fsummary>Look up a key in a tree</fsummary>
<desc>
<p>Looks up <c><anno>Key</anno></c> in <c><anno>Tree</anno></c>; returns
- <c>{value, <anno>Val</anno>}</c>, or <c>none</c> if <c><anno>Key</anno></c> is not
+ <c>{value, <anno>Value</anno>}</c>, or <c>none</c> if <c><anno>Key</anno></c> is not
present.</p>
</desc>
</func>
@@ -207,7 +219,7 @@
<name name="next" arity="1"/>
<fsummary>Traverse a tree with an iterator</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Iter2</anno>}</c> where <c><anno>Key</anno></c> is the
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Iter2</anno>}</c> where <c><anno>Key</anno></c> is the
smallest key referred to by the iterator <c><anno>Iter1</anno></c>, and
<c><anno>Iter2</anno></c> is the new iterator to be used for
traversing the remaining nodes, or the atom <c>none</c> if no
@@ -225,8 +237,8 @@
<name name="smallest" arity="1"/>
<fsummary>Return smallest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>}</c>, where <c><anno>Key</anno></c> is the smallest
- key in <c><anno>Tree</anno></c>, and <c><anno>Val</anno></c> is the value associated
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>}</c>, where <c><anno>Key</anno></c> is the smallest
+ key in <c><anno>Tree</anno></c>, and <c><anno>Value</anno></c> is the value associated
with this key. Assumes that the tree is nonempty.</p>
</desc>
</func>
@@ -234,8 +246,8 @@
<name name="take_largest" arity="1"/>
<fsummary>Extract largest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
- largest key in <c><anno>Tree1</anno></c>, <c><anno>Val</anno></c> is the value
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
+ largest key in <c><anno>Tree1</anno></c>, <c><anno>Value</anno></c> is the value
associated with this key, and <c><anno>Tree2</anno></c> is this tree with
the corresponding node deleted. Assumes that the tree is
nonempty.</p>
@@ -245,8 +257,8 @@
<name name="take_smallest" arity="1"/>
<fsummary>Extract smallest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
- smallest key in <c><anno>Tree1</anno></c>, <c><anno>Val</anno></c> is the value
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
+ smallest key in <c><anno>Tree1</anno></c>, <c><anno>Value</anno></c> is the value
associated with this key, and <c><anno>Tree2</anno></c> is this tree with
the corresponding node deleted. Assumes that the tree is
nonempty.</p>
@@ -263,7 +275,7 @@
<name name="update" arity="3"/>
<fsummary>Update a key to new value in a tree</fsummary>
<desc>
- <p>Updates <c><anno>Key</anno></c> to value <c><anno>Val</anno></c> in <c><anno>Tree1</anno></c>;
+ <p>Updates <c><anno>Key</anno></c> to value <c><anno>Value</anno></c> in <c><anno>Tree1</anno></c>;
returns the new tree. Assumes that the key is present in the
tree.</p>
</desc>
diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml
index 1601ea9892..b9dfff833e 100644
--- a/lib/stdlib/doc/src/gen_event.xml
+++ b/lib/stdlib/doc/src/gen_event.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/gen_fsm.xml b/lib/stdlib/doc/src/gen_fsm.xml
index 73c1911f1e..848d57f3e6 100644
--- a/lib/stdlib/doc/src/gen_fsm.xml
+++ b/lib/stdlib/doc/src/gen_fsm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -115,7 +115,7 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
If <c>FsmName={global,GlobalName}</c>, the gen_fsm is
registered globally as <c>GlobalName</c> using
<c>global:register_name/2</c>.
- If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will
+ If <c>FsmName={via,Module,ViaName}</c>, the gen_fsm will
register with the registry represented by <c>Module</c>.
The <c>Module</c> callback should export the functions
<c>register_name/2</c>, <c>unregister_name/1</c>,
@@ -210,7 +210,7 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4
registered at another node, or</item>
<item><c>{global,GlobalName}</c>, if the gen_fsm is globally
registered.</item>
- <item><c>{via,Module,ViaName}</c>, if the event manager is registered
+ <item><c>{via,Module,ViaName}</c>, if the gen_fsm is registered
through an alternative process registry.</item>
</list>
<p><c>Event</c> is an arbitrary term which is passed as one of
diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml
index abb4c73c7b..62c0394479 100644
--- a/lib/stdlib/doc/src/gen_server.xml
+++ b/lib/stdlib/doc/src/gen_server.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -113,7 +113,7 @@ gen_server:abcast -----> Module:handle_cast/2
registered globally as <c>GlobalName</c> using
<c>global:register_name/2</c>. If no name is provided,
the gen_server is not registered.
- If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will
+ If <c>ServerName={via,Module,ViaName}</c>, the gen_server will
register with the registry represented by <c>Module</c>.
The <c>Module</c> callback should export the functions
<c>register_name/2</c>, <c>unregister_name/1</c>,
diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
index 90f24c4cbc..a28180b42a 100644
--- a/lib/stdlib/doc/src/io.xml
+++ b/lib/stdlib/doc/src/io.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
index 68352ffeb1..3312b08064 100644
--- a/lib/stdlib/doc/src/io_lib.xml
+++ b/lib/stdlib/doc/src/io_lib.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/io_protocol.xml b/lib/stdlib/doc/src/io_protocol.xml
index d36bf2042f..21da404c35 100644
--- a/lib/stdlib/doc/src/io_protocol.xml
+++ b/lib/stdlib/doc/src/io_protocol.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1999</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -49,7 +49,7 @@ current I/O-protocol.</p>
<p>The original I/O-protocol was simple and flexible. Demands for spacial
and execution time efficiency has triggered extensions to the protocol
over the years, making the protocol larger and somewhat less easy to
-implement than the original. It can certainly be argumented that the
+implement than the original. It can certainly be argued that the
current protocol is too complex, but this text describes how it looks
today, not how it should have looked.</p>
@@ -76,10 +76,11 @@ the server eventually sends a corresponding <c>io_reply</c> tuple.</p>
the I/O server sends the IO reply to.</item>
<item><c>ReplyAs</c> can be any datum and is returned in the corresponding
-<c>io_reply</c>. The <seealso marker="stdlib:io">io</seealso> module simply uses the pid()
-of the I/O server as the <c>ReplyAs</c> datum, but a more complicated client
+<c>io_reply</c>. The <seealso marker="stdlib:io">io</seealso> module monitors
+the I/O server, and uses the monitor reference as the <c>ReplyAs</c> datum.
+A more complicated client
could have several outstanding I/O requests to the same I/O server and
-would then use i.e. a <c>reference()</c> or something else to differentiate among
+would then use different references (or something else) to differentiate among
the incoming IO replies. The <c>ReplyAs</c> element should be considered
opaque by the I/O server. Note that the <c>pid()</c> of the I/O server is not
explicitly present in the <c>io_reply</c> tuple. The reply can be sent from any
diff --git a/lib/stdlib/doc/src/lib.xml b/lib/stdlib/doc/src/lib.xml
index 19fb827cbf..30f164826c 100644
--- a/lib/stdlib/doc/src/lib.xml
+++ b/lib/stdlib/doc/src/lib.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 16f81bdba1..ee3c51c62c 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -123,6 +123,14 @@
</desc>
</func>
<func>
+ <name name="droplast" arity="1"/>
+ <fsummary>Drop the last element of a list</fsummary>
+ <desc>
+ <p>Drops the last element of a <c><anno>List</anno></c>. The list should
+ be non-empty, otherwise the function will crash with a <c>function_clause</c></p>
+ </desc>
+ </func>
+ <func>
<name name="dropwhile" arity="2"/>
<fsummary>Drop elements from a list while a predicate is true</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/log_mf_h.xml b/lib/stdlib/doc/src/log_mf_h.xml
index f2b09b58eb..3ef659f579 100644
--- a/lib/stdlib/doc/src/log_mf_h.xml
+++ b/lib/stdlib/doc/src/log_mf_h.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/maps.xml b/lib/stdlib/doc/src/maps.xml
new file mode 100644
index 0000000000..f766c843be
--- /dev/null
+++ b/lib/stdlib/doc/src/maps.xml
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+ </legalnotice>
+ <title>maps</title>
+ <prepared>Björn-Egil Dahlberg</prepared>
+ <docno>1</docno>
+ <date>2014-02-28</date>
+ <rev>A</rev>
+ </header>
+ <module>maps</module>
+ <modulesummary>Maps Processing Functions</modulesummary>
+ <description>
+ <p>This module contains functions for maps processing.</p>
+ </description>
+ <funcs>
+
+ <func>
+ <name name="find" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a tuple <c>{ok, Value}</c> where <c><anno>Value</anno></c> is the value associated with <c><anno>Key</anno></c>,
+ or <c>error</c> if no value is associated with <c><anno>Key</anno></c> in <c><anno>Map</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"hi" => 42},
+ Key = "hi",
+ maps:find(Key,Map).
+{ok,42} </code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="fold" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Calls <c>F(K, V, AccIn)</c> for every <c><anno>K</anno></c> to value <c><anno>V</anno></c>
+ association in <c><anno>Map</anno></c> in
+ arbitrary order. The function <c>fun F/3</c> must return a new accumulator
+ which is passed to the next successive call. <c>maps:fold/3</c> returns the final
+ value of the accumulator. The initial accumulator value <c><anno>Init</anno></c> is returned if
+ the map is empty.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Fun = fun(K,V,AccIn) when is_list(K) -> AccIn + V end,
+ Map = #{"k1" => 1, "k2" => 2, "k3" => 3},
+ maps:fold(Fun,0,Map).
+6</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="from_list" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function takes a list of key-value tuples elements and builds a
+ map. The associations may be in any order and both keys and values in the
+ association may be of any term. If the same key appears more than once,
+ the latter (rightmost) value is used and the previous values are ignored.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> List = [{"a",ignored},{1337,"value two"},{42,value_three},{"a",1}],
+ maps:from_list(List).
+#{42 => value_three,1337 => "value two","a" => 1}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="get" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns the value <c><anno>Value</anno></c> associated with <c><anno>Key</anno></c> if
+ <c><anno>Map</anno></c> contains <c><anno>Key</anno></c>.
+ If no value is associated with <c><anno>Key</anno></c> then the call will
+ fail with an exception.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Key = 1337,
+ Map = #{42 => value_two,1337 => "value one","a" => 1},
+ maps:get(Key,Map).
+"value one"</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="get" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns the value <c><anno>Value</anno></c> associated with <c><anno>Key</anno></c> if
+ <c><anno>Map</anno></c> contains <c><anno>Key</anno></c>.
+ If no value is associated with <c><anno>Key</anno></c> then returns <c><anno>Default</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{ key1 => val1, key2 => val2 }.
+#{key1 => val1,key2 => val2}
+> maps:get(key1, Map, "Default value").
+val1
+> maps:get(key3, Map, "Default value").
+"Default value"</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="is_key" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns <c>true</c> if map <c><anno>Map</anno></c> contains <c><anno>Key</anno></c> and returns
+ <c>false</c> if it does not contain the <c><anno>Key</anno></c>.
+ The function will fail with an exception if <c><anno>Map</anno></c> is not a Map.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"42" => value}.
+#{"42"> => value}
+> maps:is_key("42",Map).
+true
+> maps:is_key(value,Map).
+false</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="keys" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a complete list of keys, in arbitrary order, which resides within <c><anno>Map</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:keys(Map).
+[42,1337,"a"]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="map" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function produces a new map <c><anno>Map2</anno></c> by calling the function <c>fun F(K, V1)</c> for
+ every <c><anno>K</anno></c> to value <c><anno>V1</anno></c> association in <c><anno>Map1</anno></c> in arbitrary order.
+ The function <c>fun F/2</c> must return the value <c><anno>V2</anno></c> to be associated with key <c><anno>K</anno></c> for
+ the new map <c><anno>Map2</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Fun = fun(K,V1) when is_list(K) -> V1*2 end,
+ Map = #{"k1" => 1, "k2" => 2, "k3" => 3},
+ maps:map(Fun,Map).
+#{"k1" => 2,"k2" => 4,"k3" => 6}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="merge" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Merges two maps into a single map <c><anno>Map3</anno></c>. If two keys exists in both maps the
+ value in <c><anno>Map1</anno></c> will be superseded by the value in <c><anno>Map2</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map1 = #{a => "value_one", b => "value_two"},
+ Map2 = #{a => 1, c => 2},
+ maps:merge(Map1,Map2).
+#{a => 1,b => "value_two",c => 2}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="new" arity="0"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a new empty map.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> maps:new().
+#{}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="put" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Associates <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> and inserts the association into map <c>Map2</c>.
+ If key <c><anno>Key</anno></c> already exists in map <c><anno>Map1</anno></c>, the old associated value is
+ replaced by value <c><anno>Value</anno></c>. The function returns a new map <c><anno>Map2</anno></c> containing the new association and
+ the old associations in <c><anno>Map1</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:put("a", 42, Map).
+#{"a" => 42}
+> maps:put("b", 1337, Map).
+#{"a" => 1,"b" => 1337}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="remove" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function removes the <c><anno>Key</anno></c>, if it exists, and its associated value from
+ <c><anno>Map1</anno></c> and returns a new map <c><anno>Map2</anno></c> without key <c><anno>Key</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:remove("a",Map).
+#{}
+> maps:remove("b",Map).
+#{"a" => 1}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="size" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function returns the number of key-value associations in the <c><anno>Map</anno></c>.
+ This operation happens in constant time.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_two,1337 => "value one","a" => 1},
+ maps:size(Map).
+3</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="to_list" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The fuction returns a list of pairs representing the key-value associations of <c><anno>Map</anno></c>,
+ where the pairs, <c>[{K1,V1}, ..., {Kn,Vn}]</c>, are returned in arbitrary order.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:to_list(Map).
+[{42,value_three},{1337,"value two"},{"a",1}]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="update" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ If <c><anno>Key</anno></c> exists in <c><anno>Map1</anno></c> the old associated value is
+ replaced by value <c><anno>Value</anno></c>. The function returns a new map <c><anno>Map2</anno></c> containing
+ the new associated value. If <c><anno>Key</anno></c> does not exist in <c><anno>Map1</anno></c> an exception is
+ generated.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:update("a", 42, Map).
+#{"a" => 42}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="values" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a complete list of values, in arbitrary order, contained in map <c>M</c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:values(Map).
+[value_three,"value two",1]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="with" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a new map <c><anno>Map2</anno></c> with the keys <c>K1</c> through <c>Kn</c> and their associated values from map <c><anno>Map1</anno></c>.
+ Any key in <c><anno>Ks</anno></c> that does not exist in <c><anno>Map1</anno></c> are ignored.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ Ks = ["a",42,"other key"],
+ maps:with(Ks,Map).
+#{42 => value_three,"a" => 1}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="without" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a new map <c><anno>Map2</anno></c> without the keys <c>K1</c> through <c>Kn</c> and their associated values from map <c><anno>Map1</anno></c>.
+ Any key in <c><anno>Ks</anno></c> that does not exist in <c><anno>Map1</anno></c> are ignored.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ Ks = ["a",42,"other key"],
+ maps:without(Ks,Map).
+#{1337 => "value two"}</code>
+ </desc>
+ </func>
+ </funcs>
+</erlref>
diff --git a/lib/stdlib/doc/src/math.xml b/lib/stdlib/doc/src/math.xml
index 0219dcce10..43cd20e726 100644
--- a/lib/stdlib/doc/src/math.xml
+++ b/lib/stdlib/doc/src/math.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/ms_transform.xml b/lib/stdlib/doc/src/ms_transform.xml
index ad5f8bd5ac..e89dd41f26 100644
--- a/lib/stdlib/doc/src/ms_transform.xml
+++ b/lib/stdlib/doc/src/ms_transform.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml
index e94a4d6a55..301a5ee2e8 100644
--- a/lib/stdlib/doc/src/notes.xml
+++ b/lib/stdlib/doc/src/notes.xml
@@ -30,6 +30,701 @@
</header>
<p>This document describes the changes made to the STDLIB application.</p>
+<section><title>STDLIB 2.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Behaviour of character types \d, \w and \s has always
+ been to not match characters with value above 255, not
+ 128, i.e. they are limited to ISO-Latin-1 and not ASCII</p>
+ <p>
+ Own Id: OTP-12521</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ c:m/1 now displays the module's MD5 sum.</p>
+ <p>
+ Own Id: OTP-12500</p>
+ </item>
+ <item>
+ <p>
+ Make ets:i/1 handle binary input from IO server.</p>
+ <p>
+ Own Id: OTP-12550</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 2.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The documentation of string:tokens/2 now explicitly
+ specifies that adjacent separator characters do not give
+ any empty strings in the resulting list of tokens.</p>
+ <p>
+ Own Id: OTP-12036</p>
+ </item>
+ <item>
+ <p>
+ Fix broken deprecation warnings in ssh application</p>
+ <p>
+ Own Id: OTP-12187</p>
+ </item>
+ <item>
+ <p>
+ Maps: Properly align union typed assoc values in
+ documentation</p>
+ <p>
+ Own Id: OTP-12190</p>
+ </item>
+ <item>
+ <p>
+ Fix filelib:wildcard/2 when 'Cwd' ends with a dot</p>
+ <p>
+ Own Id: OTP-12212</p>
+ </item>
+ <item>
+ <p>
+ Allow <c>Name/Arity</c> syntax in maps values inside
+ attributes.</p>
+ <p>
+ Own Id: OTP-12213</p>
+ </item>
+ <item>
+ <p>
+ Fix edlin to correctly save text killed with ctrl-u.
+ Prior to this fix, entering text into the Erlang shell
+ and then killing it with ctrl-u followed by yanking it
+ back with ctrl-y would result in the yanked text being
+ the reverse of the original killed text.</p>
+ <p>
+ Own Id: OTP-12224</p>
+ </item>
+ <item>
+ <p>
+ If a callback function was terminated with exit/1, there
+ would be no stack trace in the ERROR REPORT produced by
+ gen_server. This has been corrected.</p>
+ <p>
+ To keep the backwards compatibility, the actual exit
+ reason for the process is not changed.</p>
+ <p>
+ Own Id: OTP-12263 Aux Id: seq12733 </p>
+ </item>
+ <item>
+ <p>
+ Warnings produced by <c>ms_transform</c> could point out
+ the wrong line number.</p>
+ <p>
+ Own Id: OTP-12264</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Supports tar file creation on other media than file
+ systems mounted on the local machine.</p>
+ <p>
+ The <c>erl_tar</c> api is extended with
+ <c>erl_tar:init/3</c> that enables usage of user provided
+ media storage routines. A ssh-specific set of such
+ routines is hidden in the new function
+ <c>ssh_sftp:open_tar/3</c> to simplify creating a tar
+ archive on a remote ssh server.</p>
+ <p>
+ A chunked file reading option is added to
+ <c>erl_tar:add/3,4</c> to save memory on e.g small
+ embedded systems. The size of the slices read from a file
+ in that case can be specified.</p>
+ <p>
+ Own Id: OTP-12180 Aux Id: seq12715 </p>
+ </item>
+ <item>
+ <p>
+ I/O requests are optimized for long message queues in the
+ calling process.</p>
+ <p>
+ Own Id: OTP-12315</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 2.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The type spec of the FormFunc argument to
+ sys:handle_debug/4 was erroneously pointing to dbg_fun().
+ This is now corrected and the new type is format_fun().</p>
+ <p>
+ Own Id: OTP-11800</p>
+ </item>
+ <item>
+ <p>
+ Behaviors such as gen_fsm and gen_server should always
+ invoke format_status/2 before printing the state to the
+ logs.</p>
+ <p>
+ Own Id: OTP-11967</p>
+ </item>
+ <item>
+ <p> The documentation of <c>dets:insert_new/2</c> has
+ been corrected. (Thanks to Alexei Sholik for reporting
+ the bug.) </p>
+ <p>
+ Own Id: OTP-12024</p>
+ </item>
+ <item>
+ <p>
+ Printing a term with io_lib:format and control sequence
+ w, precision P and field width F, where F&lt; P would
+ fail in one of the two following ways:</p>
+ <p>
+ 1) If P &lt; printed length of the term, an infinite loop
+ would be entered, consuming all available memory.</p>
+ <p>
+ 2) If P &gt;= printed length of the term, an exception
+ would be raised.</p>
+ <p>
+ These two problems are now corrected.</p>
+ <p>
+ Own Id: OTP-12041</p>
+ </item>
+ <item>
+ <p>
+ The documentation of <c>maps:values/1</c> has been
+ corrected.</p>
+ <p>
+ Own Id: OTP-12055</p>
+ </item>
+ <item>
+ <p>
+ Expand shell functions in map expressions.</p>
+ <p>
+ Own Id: OTP-12063</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add maps:with/2</p>
+ <p>
+ Own Id: OTP-12137</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 2.1.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ OTP-11850 fixed filelib:wildcard/1 to work with broken
+ symlinks. This correction, however, introduced problems
+ since symlinks were no longer followed for functions like
+ filelib:ensure_dir/1, filelib:is_dir/1,
+ filelib:file_size/1, etc. This is now corrected.</p>
+ <p>
+ Own Id: OTP-12054 Aux Id: seq12660 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 2.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p><c>filelib:wildcard("broken_symlink")</c> would return
+ an empty list if "broken_symlink" was a symlink that did
+ not point to an existing file.</p>
+ <p>
+ Own Id: OTP-11850 Aux Id: seq12571 </p>
+ </item>
+ <item>
+ <p><c>erl_tar</c> can now handle files names that contain
+ Unicode characters. See "UNICODE SUPPORT" in the
+ documentation for <c>erl_tar</c>.</p>
+ <p>When creating a tar file, <c>erl_tar</c> would
+ sometime write a too short end of tape marker. GNU tar
+ would correctly extract files from such tar file, but
+ would complain about "A lone zero block at...".</p>
+ <p>
+ Own Id: OTP-11854</p>
+ </item>
+ <item>
+ <p> When redefining and exporting the type <c>map()</c>
+ the Erlang Code Linter (<c>erl_lint</c>) erroneously
+ emitted an error. This bug has been fixed. </p>
+ <p>
+ Own Id: OTP-11872</p>
+ </item>
+ <item>
+ <p>
+ Fix evaluation of map updates in the debugger and
+ erl_eval</p>
+ <p>
+ Reported-by: José Valim</p>
+ <p>
+ Own Id: OTP-11922</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The following native functions now bump an appropriate
+ amount of reductions and yield when out of
+ reductions:</p> <list>
+ <item><c>erlang:binary_to_list/1</c></item>
+ <item><c>erlang:binary_to_list/3</c></item>
+ <item><c>erlang:bitstring_to_list/1</c></item>
+ <item><c>erlang:list_to_binary/1</c></item>
+ <item><c>erlang:iolist_to_binary/1</c></item>
+ <item><c>erlang:list_to_bitstring/1</c></item>
+ <item><c>binary:list_to_bin/1</c></item> </list>
+ <p>Characteristics impact:</p> <taglist>
+ <tag>Performance</tag> <item>The functions converting
+ from lists got a performance loss for very small lists,
+ and a performance gain for very large lists.</item>
+ <tag>Priority</tag> <item>Previously a process executing
+ one of these functions effectively got an unfair priority
+ boost. This priority boost depended on the input size.
+ The larger the input was, the larger the priority boost
+ got. This unfair priority boost is now lost. </item>
+ </taglist>
+ <p>
+ Own Id: OTP-11888</p>
+ </item>
+ <item>
+ <p>
+ Add <c>maps:get/3</c> to maps module. The function will
+ return the supplied default value if the key does not
+ exist in the map.</p>
+ <p>
+ Own Id: OTP-11951</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 2.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The option dupnames did not work as intended in re. When
+ looking for names with {capture, [Name, ...]}, re:run
+ returned a random instance of the match for that name,
+ instead of the leftmost matching instance, which was what
+ the documentation stated. This is now corrected to adhere
+ to the documentation. The option {capture,all_names}
+ along with a re:inspect/2 function is also added to
+ further help in using named subpatterns.</p>
+ <p>
+ Own Id: OTP-11205</p>
+ </item>
+ <item>
+ <p>
+ If option 'binary' was set for standard_input, then c:i()
+ would hang if the output was more than one page long -
+ i.e. then input after "(c)ontinue (q)uit --&gt;" could
+ not be read. This has been corrected. (Thanks to José
+ Valim)</p>
+ <p>
+ Own Id: OTP-11589</p>
+ </item>
+ <item>
+ <p>
+ stdlib/lists: Add function droplast/1 This functions
+ drops the last element of a non-empty list. lists:last/1
+ and lists:droplast/1 are the dual of hd/1 and tl/1 but
+ for the end of a list. (Thanks to Hans Svensson)</p>
+ <p>
+ Own Id: OTP-11677</p>
+ </item>
+ <item>
+ <p>
+ Allow all auto imports to be suppressed at once.
+ Introducing the no_auto_import attribute:
+ -compile(no_auto_import). Useful for code generation
+ tools that always use the qualified function names and
+ want to avoid the auto imported functions clashing with
+ local ones. (Thanks to José Valim.)</p>
+ <p>
+ Own Id: OTP-11682</p>
+ </item>
+ <item>
+ <p>
+ supervisor_bridge does no longer report normal
+ termination of children. The reason is that in some
+ cases, for instance when the restart strategy is
+ simple_one_for_one, the log could be completely
+ overloaded with reports about normally terminating
+ processes. (Thanks to Artem Ocheredko)</p>
+ <p>
+ Own Id: OTP-11685</p>
+ </item>
+ <item>
+ <p> The type annotations for alternative registries using
+ the {via, Module, Name} syntax for sup_name() and
+ sup_ref() in the supervisor module are now consistent
+ with the documentation. Dialyzer should no longer
+ complain about valid supervisor:start_link() and
+ supervisor:start_child() calls. (Thanks to Caleb
+ Helbling.) </p>
+ <p>
+ Own Id: OTP-11707</p>
+ </item>
+ <item>
+ <p> Two Dets bugs have been fixed. When trying to open a
+ short file that is not a Dets file, the file was deleted
+ even with just read access. Calling
+ <c>dets:is_dets_file/1</c> with a file that is not a Dets
+ file, a file descriptor was left open. (Thanks to Håkan
+ Mattsson for reporting the bugs.) </p>
+ <p>
+ Own Id: OTP-11709</p>
+ </item>
+ <item>
+ <p>
+ Fix race bug in <c>ets:all</c>. Concurrent creation of
+ tables could cause other tables to not be included in the
+ result. (Thanks to Florian Schintke for bug report)</p>
+ <p>
+ Own Id: OTP-11726</p>
+ </item>
+ <item>
+ <p>
+ erl_eval now properly evaluates '=='/2 when it is used in
+ guards. (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11747</p>
+ </item>
+ <item>
+ <p>
+ Calls to proplists:get_value/3 are replaced by the faster
+ lists:keyfind/3 in io_lib_pretty. Elements in the list
+ are always 2-tuples. (Thanks to Andrew Thompson)</p>
+ <p>
+ Own Id: OTP-11752</p>
+ </item>
+ <item>
+ <p> A qlc bug where filters were erroneously optimized
+ away has been fixed. Thanks to Sam Bobroff for reporting
+ the bug. </p>
+ <p>
+ Own Id: OTP-11758</p>
+ </item>
+ <item>
+ <p>
+ A number of compiler errors where unusual or nonsensical
+ code would crash the compiler have been reported by Ulf
+ Norell and corrected by Anthony Ramine.</p>
+ <p>
+ Own Id: OTP-11770</p>
+ </item>
+ <item>
+ <p> Since Erlang/OTP R16B the Erlang Core Linter
+ (<c>erl_lint</c>) has not emitted errors when built-in
+ types were re-defined. This bug has been fixed. (Thanks
+ to Roberto Aloi.) </p>
+ <p>
+ Own Id: OTP-11772</p>
+ </item>
+ <item>
+ <p>
+ The functions <c>sys:get_state/1,2</c> and
+ <c>sys:replace_state/2,3</c> are fixed so they can now be
+ run while the process is sys suspended. To accomplish
+ this, the new callbacks <c>Mod:system_get_state/1</c> and
+ <c>Mod:system_replace_state/2</c> are added, which are
+ also implemented by the generic behaviours
+ <c>gen_server</c>, <c>gen_event</c> and <c>gen_fsm</c>.</p>
+ <p>
+ The potential incompatibility refers to</p>
+ <p>
+ <list> <item>The previous behaviour of intercepting the
+ system message and passing a tuple of size 2 as the last
+ argument to <c>sys:handle_system_msg/6</c> is no longer
+ supported.</item> <item>The error handling when
+ <c>StateFun</c> in <c>sys:replace_state/2,3</c> fails is
+ changed from being totally silent to possibly (if the
+ callback module does not catch) throw an exception in the
+ client process.</item> </list></p>
+ <p>
+ (Thanks to James Fish and Steve Vinoski)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11817</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Options to set match_limit and match_limit_recursion are
+ added to re:run. The option report_errors is also added
+ to get more information when re:run fails due to limits
+ or compilation errors.</p>
+ <p>
+ Own Id: OTP-10285</p>
+ </item>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ <item>
+ <p> Dialyzer's <c>unmatched_return</c> warnings have been
+ corrected. </p>
+ <p>
+ Own Id: OTP-10908</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ The version of the PCRE library Used by Erlang's re
+ module is raised to 8.33 from 7.6. This means, among
+ other things, better Unicode and Unicode Character
+ Properties support. New options connected to PCRE 8.33
+ are also added to the re module (ucd, notempty_atstart,
+ no_start_optimize). PCRE has extended the regular
+ expression syntax between 7.6 and 8.33, why this imposes
+ a potential incompatibility. Only very complicated
+ regular expressions may be affected, but if you know you
+ are using obscure features, please test run your regular
+ expressions and verify that their behavior has not
+ changed.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11204</p>
+ </item>
+ <item>
+ <p>
+ Added dict:is_empty/1 and orddict:is_empty/1. (Thanks to
+ Magnus Henoch.)</p>
+ <p>
+ Own Id: OTP-11353</p>
+ </item>
+ <item>
+ <p>
+ A call to either the <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF may trigger garbage
+ collection of another processes than the process calling
+ the BIF. The previous implementations performed these
+ kinds of garbage collections without considering the
+ internal state of the process being garbage collected. In
+ order to be able to more easily and more efficiently
+ implement yielding native code, these types of garbage
+ collections have been rewritten. A garbage collection
+ like this is now triggered by an asynchronous request
+ signal, the actual garbage collection is performed by the
+ process being garbage collected itself, and finalized by
+ a reply signal to the process issuing the request. Using
+ this approach processes can disable garbage collection
+ and yield without having to set up the heap in a state
+ that can be garbage collected.</p>
+ <p>
+ The <seealso
+ marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>,
+ and <seealso
+ marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso>
+ BIFs have been introduced. Both taking an option list as
+ last argument. Using these, one can issue asynchronous
+ requests.</p>
+ <p>
+ <c>code:purge/1</c> and <c>code:soft_purge/1</c> have
+ been rewritten to utilize asynchronous
+ <c>check_process_code</c> requests in order to
+ parallelize work.</p>
+ <p>
+ Characteristics impact: A call to the
+ <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF will normally take longer
+ time to complete while the system as a whole wont be as
+ much negatively effected by the operation as before. A
+ call to <c>code:purge/1</c> and <c>code:soft_purge/1</c>
+ may complete faster or slower depending on the state of
+ the system while the system as a whole wont be as much
+ negatively effected by the operation as before.</p>
+ <p>
+ Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p>
+ </item>
+ <item>
+ <p> Improve the documentation of the supervisor's
+ <c>via</c> reference. (Thanks to MaximMinin.) </p>
+ <p>
+ Own Id: OTP-11399</p>
+ </item>
+ <item>
+ <p><c>orddict:from_list/1</c> now uses the optimized sort
+ routines in the <c>lists</c> module instead of
+ (essentially) an insertion sort. Depending on the input
+ data, the speed of the new <c>from_list/1</c> is anything
+ from slightly faster up to several orders of magnitude
+ faster than the old <c>from_list/1</c>.</p> (Thanks to
+ Steve Vinoski.)
+ <p>
+ Own Id: OTP-11552</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see Map Expressions in the
+ <seealso marker="doc/reference_manual:expressions#map_expressions">
+ Reference Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p>
+ When tab completing the erlang shell now expands
+ zero-arity functions all the way to closing parenthesis,
+ unless there is another function with the same name and a
+ different arity. (Thanks to Pierre Fenoll.)</p>
+ <p>
+ Own Id: OTP-11684</p>
+ </item>
+ <item>
+ <p> The Erlang Code Preprocessor (<c>epp</c>) could loop
+ when encountering a circular macro definition in an
+ included file. This bug has been fixed. </p> <p> Thanks
+ to Maruthavanan Subbarayan for reporting the bug, and to
+ Richard Carlsson for providing a bug fix. </p>
+ <p>
+ Own Id: OTP-11728</p>
+ </item>
+ <item>
+ <p> The Erlang Code Linter (<c>erl_lint</c>) has since
+ Erlang/OTP R13B emitted warnings whenever any of the
+ types <c>arity()</c>, <c>bitstring()</c>,
+ <c>iodata()</c>, or <c>boolean()</c> were re-defined. Now
+ errors are emitted instead. </p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11771</p>
+ </item>
+ <item>
+ <p> The <c>encoding</c> option of
+ <c>erl_parse:abstract/2</c> has been extended to include
+ <c>none</c> and a callback function (a predicate). </p>
+ <p>
+ Own Id: OTP-11807</p>
+ </item>
+ <item>
+ <p>
+ Export zip option types to allow referal from other
+ modules.</p>
+ <p>
+ Thanks to Pierre Fenoll and Håkan Mattson</p>
+ <p>
+ Own Id: OTP-11828</p>
+ </item>
+ <item>
+ <p>
+ The module <c>pg</c> has been deprecated and will be
+ removed in Erlang/OTP 18.</p>
+ <p>
+ Own Id: OTP-11840</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>STDLIB 1.19.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
@@ -1809,7 +2504,7 @@
platforms than before. If <c>configure</c> warns about no
atomic implementation available, try using the
<c>libatomic_ops</c> library. Use the <seealso
- marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--with-libatomic_ops=PATH</seealso>
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--with-libatomic_ops=PATH</seealso>
<c>configure</c> command line argument when specifying
where the <c>libatomic_ops</c> installation is located.
The <c>libatomic_ops</c> library can be downloaded from:
@@ -1827,7 +2522,7 @@
the pentium 4 processor. If you want the runtime system
to be compatible with older processors (back to 486) you
need to pass the <seealso
- marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--enable-ethread-pre-pentium4-compatibility</seealso>
+ marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--enable-ethread-pre-pentium4-compatibility</seealso>
<c>configure</c> command line argument when configuring
the system.</p>
<p>
diff --git a/lib/stdlib/doc/src/notes_history.xml b/lib/stdlib/doc/src/notes_history.xml
index 85997f1717..328855f6dd 100644
--- a/lib/stdlib/doc/src/notes_history.xml
+++ b/lib/stdlib/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/orddict.xml b/lib/stdlib/doc/src/orddict.xml
index 319083d35b..6d1702bc59 100644
--- a/lib/stdlib/doc/src/orddict.xml
+++ b/lib/stdlib/doc/src/orddict.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -187,6 +187,13 @@ merge(Fun, D1, D2) ->
</desc>
</func>
<func>
+ <name name="is_empty" arity="1"/>
+ <fsummary>Return true if the dictionary is empty</fsummary>
+ <desc>
+ <p>Returns <c>true</c> if <c><anno>Orddict</anno></c> has no elements, <c>false</c> otherwise.</p>
+ </desc>
+ </func>
+ <func>
<name name="store" arity="3"/>
<fsummary>Store a value in a dictionary</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/ordsets.xml b/lib/stdlib/doc/src/ordsets.xml
index 1e26fc2022..277c1c32ab 100644
--- a/lib/stdlib/doc/src/ordsets.xml
+++ b/lib/stdlib/doc/src/ordsets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/part.xml b/lib/stdlib/doc/src/part.xml
index 25ca56ad86..5589d11e3e 100644
--- a/lib/stdlib/doc/src/part.xml
+++ b/lib/stdlib/doc/src/part.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
<year>1996</year>
- <year>2009</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/part_notes.xml b/lib/stdlib/doc/src/part_notes.xml
index 66ad294753..cdd35ac370 100644
--- a/lib/stdlib/doc/src/part_notes.xml
+++ b/lib/stdlib/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/part_notes_history.xml b/lib/stdlib/doc/src/part_notes_history.xml
index 5e055ee606..15e0a0f1d3 100644
--- a/lib/stdlib/doc/src/part_notes_history.xml
+++ b/lib/stdlib/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/pg.xml b/lib/stdlib/doc/src/pg.xml
index c56db8c6e6..a3b69884b6 100644
--- a/lib/stdlib/doc/src/pg.xml
+++ b/lib/stdlib/doc/src/pg.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -32,6 +32,9 @@
<module>pg</module>
<modulesummary>Distributed, Named Process Groups</modulesummary>
<description>
+ <warning>
+ <p>This module is deprecated and will be removed in Erlang/OTP 18.</p>
+ </warning>
<p>This (experimental) module implements process groups. A process
group is a group of processes that can be accessed by a common
name. For example, a group named <c>foobar</c> can include a set
diff --git a/lib/stdlib/doc/src/pool.xml b/lib/stdlib/doc/src/pool.xml
index 39a79e5dc5..1b903984f9 100644
--- a/lib/stdlib/doc/src/pool.xml
+++ b/lib/stdlib/doc/src/pool.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml
index b597074044..b0bad9d27b 100644
--- a/lib/stdlib/doc/src/proc_lib.xml
+++ b/lib/stdlib/doc/src/proc_lib.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -173,7 +173,7 @@
<name name="init_ack" arity="2"/>
<fsummary>Used by a process when it has started.</fsummary>
<desc>
- <p>This function must used by a process that has been started by
+ <p>This function must be used by a process that has been started by
a <seealso marker="#start/3">start[_link]/3,4,5</seealso>
function. It tells <c><anno>Parent</anno></c> that the process has
initialized itself, has started, or has failed to initialize
diff --git a/lib/stdlib/doc/src/proplists.xml b/lib/stdlib/doc/src/proplists.xml
index a0063a58d3..1655133b2b 100644
--- a/lib/stdlib/doc/src/proplists.xml
+++ b/lib/stdlib/doc/src/proplists.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/qlc.xml b/lib/stdlib/doc/src/qlc.xml
index ce50631ca9..8682936c08 100644
--- a/lib/stdlib/doc/src/qlc.xml
+++ b/lib/stdlib/doc/src/qlc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/queue.xml b/lib/stdlib/doc/src/queue.xml
index 383f52d10d..9c994154d4 100644
--- a/lib/stdlib/doc/src/queue.xml
+++ b/lib/stdlib/doc/src/queue.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -90,9 +90,15 @@
<datatypes>
<datatype>
- <name><marker id="type-queue">queue()</marker></name>
+ <name name="queue" n_vars="1"/>
<desc><p>As returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="queue" n_vars="0"/>
+ <desc>
+ <p><c>queue()</c> is equivalent to <c>queue(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml
index 1b8fa44883..e001058e19 100644
--- a/lib/stdlib/doc/src/random.xml
+++ b/lib/stdlib/doc/src/random.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/re.xml b/lib/stdlib/doc/src/re.xml
index 7a9f37ca90..5af1468e9b 100644
--- a/lib/stdlib/doc/src/re.xml
+++ b/lib/stdlib/doc/src/re.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2007</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -101,7 +101,7 @@
<p><marker id="compile_options"/>The options have the following meanings:</p>
<taglist>
<tag><c>unicode</c></tag>
- <item>The regular expression is given as a Unicode <c>charlist()</c> and the resulting regular expression code is to be run against a valid Unicode <c>charlist()</c> subject.</item>
+ <item>The regular expression is given as a Unicode <c>charlist()</c> and the resulting regular expression code is to be run against a valid Unicode <c>charlist()</c> subject. Also consider the <c>ucp</c> option when using Unicode characters.</item>
<tag><c>anchored</c></tag>
<item>The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched (the "subject string"). This effect can also be achieved by appropriate constructs in the pattern itself.</item>
<tag><c>caseless</c></tag>
@@ -147,11 +147,55 @@ This option makes it possible to include comments inside complicated patterns. N
<item>Specifies specifically that \R is to match only the cr, lf or crlf sequences, not the Unicode specific newline characters.</item>
<tag><c>bsr_unicode</c></tag>
<item>Specifies specifically that \R is to match all the Unicode newline characters (including crlf etc, the default).</item>
+ <tag><c>no_start_optimize</c></tag>
+ <item>This option disables optimization that may malfunction if "Special start-of-pattern items" are present in the regular expression. A typical example would be when matching "DEFABC" against "(*COMMIT)ABC", where the start optimization of PCRE would skip the subject up to the "A" and would never realize that the (*COMMIT) instruction should have made the matching fail. This option is only relevant if you use "start-of-pattern items", as discussed in the section "PCRE regular expression details" below.</item>
+ <tag><c>ucp</c></tag>
+ <item>Specifies that Unicode Character Properties should be used when
+ resolving \B, \b, \D, \d, \S, \s, \W and \w. Without this flag, only
+ ISO-Latin-1 properties are used. Using Unicode properties hurts
+ performance, but is semantically correct when working with Unicode
+ characters beyond the ISO-Latin-1 range.</item>
+ <tag><c>never_utf</c></tag>
+ <item>Specifies that the (*UTF) and/or (*UTF8) "start-of-pattern items" are forbidden. This flag can not be combined with <c>unicode</c>. Useful if ISO-Latin-1 patterns from an external source are to be compiled.</item>
</taglist>
</desc>
</func>
<func>
+ <name name="inspect" arity="2"/>
+ <fsummary>Inspects a compiled regular expression</fsummary>
+ <desc>
+ <p>This function takes a compiled regular expression and an item, returning the relevant data from the regular expression. Currently the only supported item is <c>namelist</c>, which returns the tuple <c>{namelist, [ binary()]}</c>, containing the names of all (unique) named subpatterns in the regular expression.</p>
+ <p>Example:</p>
+ <code type="none">
+1&gt; {ok,MP} = re:compile("(?&lt;A&gt;A)|(?&lt;B&gt;B)|(?&lt;C&gt;C)").
+{ok,{re_pattern,3,0,0,
+ &lt;&lt;69,82,67,80,119,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,
+ 255,255,...&gt;&gt;}}
+2&gt; re:inspect(MP,namelist).
+{namelist,[&lt;&lt;"A"&gt;&gt;,&lt;&lt;"B"&gt;&gt;,&lt;&lt;"C"&gt;&gt;]}
+3&gt; {ok,MPD} = re:compile("(?&lt;C&gt;A)|(?&lt;B&gt;B)|(?&lt;C&gt;C)",[dupnames]).
+{ok,{re_pattern,3,0,0,
+ &lt;&lt;69,82,67,80,119,0,0,0,0,0,8,0,1,0,0,0,255,255,255,255,
+ 255,255,...&gt;&gt;}}
+4&gt; re:inspect(MPD,namelist).
+{namelist,[&lt;&lt;"B"&gt;&gt;,&lt;&lt;"C"&gt;&gt;]}</code>
+ <p>Note specifically in the second example that the duplicate name only occurs once in the returned list, and that the list is in alphabetical order regardless of where the names are positioned in the regular expression. The order of the names is the same as the order of captured subexpressions if <c>{capture, all_names}</c> is given as an option to <c>re:run/3</c>. You can therefore create a name-to-value mapping from the result of <c>re:run/3</c> like this:</p>
+<code>
+1&gt; {ok,MP} = re:compile("(?&lt;A&gt;A)|(?&lt;B&gt;B)|(?&lt;C&gt;C)").
+{ok,{re_pattern,3,0,0,
+ &lt;&lt;69,82,67,80,119,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,
+ 255,255,...&gt;&gt;}}
+2&gt; {namelist, N} = re:inspect(MP,namelist).
+{namelist,[&lt;&lt;"A"&gt;&gt;,&lt;&lt;"B"&gt;&gt;,&lt;&lt;"C"&gt;&gt;]}
+3&gt; {match,L} = re:run("AA",MP,[{capture,all_names,binary}]).
+{match,[&lt;&lt;"A"&gt;&gt;,&lt;&lt;&gt;&gt;,&lt;&lt;&gt;&gt;]}
+4&gt; NameMap = lists:zip(N,L).
+[{&lt;&lt;"A"&gt;&gt;,&lt;&lt;"A"&gt;&gt;},{&lt;&lt;"B"&gt;&gt;,&lt;&lt;&gt;&gt;},{&lt;&lt;"C"&gt;&gt;,&lt;&lt;&gt;&gt;}]</code>
+ <p>More items are expected to be added in the future.</p>
+ </desc>
+ </func>
+ <func>
<name name="run" arity="2"/>
<fsummary>Match a subject against regular expression and capture subpatterns</fsummary>
<desc>
@@ -178,13 +222,18 @@ This option makes it possible to include comments inside complicated patterns. N
<p>If the regular expression is previously compiled, the option
list can only contain the options <c>anchored</c>,
- <c>global</c>, <c>notbol</c>, <c>noteol</c>,
- <c>notempty</c>, <c>{offset, integer() >= 0}</c>, <c>{newline,
- <anno>NLSpec</anno>}</c> and <c>{capture, <anno>ValueSpec</anno>}/{capture, <anno>ValueSpec</anno>,
+ <c>global</c>, <c>notbol</c>, <c>noteol</c>, <c>report_errors</c>,
+ <c>notempty</c>, <c>notempty_atstart</c>, <c>{offset, integer() >= 0}</c>,
+ <c>{match_limit, integer() >= 0}</c>,
+ <c>{match_limit_recursion, integer() >= 0}</c>,
+ <c>{newline,
+ <anno>NLSpec</anno>}</c> and
+ <c>{capture, <anno>ValueSpec</anno>}/{capture, <anno>ValueSpec</anno>,
<anno>Type</anno>}</c>. Otherwise all options valid for the
<c>re:compile/2</c> function are allowed as well. Options
allowed both for compilation and execution of a match, namely
- <c>anchored</c> and <c>{newline, <anno>NLSpec</anno>}</c>, will affect both
+ <c>anchored</c> and <c>{newline, <anno>NLSpec</anno>}</c>,
+ will affect both
the compilation and execution if present together with a non
pre-compiled regular expression.</p>
@@ -214,6 +263,17 @@ This option makes it possible to include comments inside complicated patterns. N
be done either by specifying <c>none</c> or an empty list as
<c><anno>ValueSpec</anno></c>.</p>
+ <p>The <c>report_errors</c> option adds the possibility that an
+ error tuple is returned. The tuple will either indicate a
+ matching error (<c>match_limit</c> or
+ <c>match_limit_recursion</c>) or a compilation error, where the
+ error tuple has the format <c>{error, {compile,
+ <anno>CompileErr</anno>}}</c>. Note that if the option
+ <c>report_errors</c> is not given, the function never returns
+ error tuples, but will report compilation errors as a badarg
+ exception and failed matches due to exceeded match limits simply
+ as <c>nomatch</c>.</p>
+
<p>The options relevant for execution are:</p>
<taglist>
@@ -241,7 +301,7 @@ This option makes it possible to include comments inside complicated patterns. N
When the global option is given, <c>re:run/3</c> handles empty
matches in the same way as Perl: a zero-length match at any
point will be retried with the options <c>[anchored,
- notempty]</c> as well. If that search gives a result of length
+ notempty_atstart]</c> as well. If that search gives a result of length
&gt; 0, the result is included. For example:</p>
<code> re:run("cat","(|at)",[global]).</code>
@@ -254,9 +314,9 @@ This option makes it possible to include comments inside complicated patterns. N
<c>[{0,0},{0,0}]</c> (the second <c>{0,0}</c> is due to the
subexpression marked by the parentheses). As the length of the
match is 0, we don't advance to the next position yet.</item>
- <tag>At offset <c>0</c> with <c>[anchored, notempty]</c></tag>
+ <tag>At offset <c>0</c> with <c>[anchored, notempty_atstart]</c></tag>
<item> The search is retried
- with the options <c>[anchored, notempty]</c> at the same
+ with the options <c>[anchored, notempty_atstart]</c> at the same
position, which does not give any interesting result of longer
length, so the search position is now advanced to the next
character (<c>a</c>).</item>
@@ -264,7 +324,7 @@ This option makes it possible to include comments inside complicated patterns. N
<item>This time, the search results in
<c>[{1,0},{1,0}]</c>, so this search will also be repeated
with the extra options.</item>
- <tag>At offset <c>1</c> with <c>[anchored, notempty]</c></tag>
+ <tag>At offset <c>1</c> with <c>[anchored, notempty_atstart]</c></tag>
<item>Now the <c>ab</c> alternative
is found and the result will be [{1,2},{1,2}]. The result is
added to the list of results and the position in the
@@ -272,7 +332,7 @@ This option makes it possible to include comments inside complicated patterns. N
<tag>At offset <c>3</c></tag>
<item>The search now once again
matches the empty string, giving <c>[{3,0},{3,0}]</c>.</item>
- <tag>At offset <c>1</c> with <c>[anchored, notempty]</c></tag>
+ <tag>At offset <c>1</c> with <c>[anchored, notempty_atstart]</c></tag>
<item>This will give no result of length &gt; 0 and we are at
the last position, so the global search is complete.</item>
</taglist>
@@ -293,15 +353,21 @@ This option makes it possible to include comments inside complicated patterns. N
subject. With the <c>notempty</c> option, this match is not
valid, so re:run/3 searches further into the string for
occurrences of "a" or "b".</p>
-
- <p>Perl has no direct equivalent of <c>notempty</c>, but it does
- make a special case of a pattern match of the empty string
- within its split() function, and when using the /g modifier. It
- is possible to emulate Perl's behavior after matching a null
- string by first trying the match again at the same offset with
- <c>notempty</c> and <c>anchored</c>, and then, if that fails, by
- advancing the starting offset (see below) and trying an ordinary
- match again.</p>
+ </item>
+ <tag><c>notempty_atstart</c></tag>
+ <item>
+ <p>This is like <c>notempty</c>, except that an empty string
+ match that is not at the start of the subject is permitted. If
+ the pattern is anchored, such a match can occur only if the
+ pattern contains \K.</p>
+ <p>Perl has no direct equivalent of <c>notempty</c> or <c>notempty_atstart</c>, but it does
+ make a special case of a pattern match of the empty string
+ within its split() function, and when using the /g modifier. It
+ is possible to emulate Perl's behavior after matching a null
+ string by first trying the match again at the same offset with
+ <c>notempty_atstart</c> and <c>anchored</c>, and then, if that fails, by
+ advancing the starting offset (see below) and trying an ordinary
+ match again.</p>
</item>
<tag><c>notbol</c></tag>
@@ -322,6 +388,116 @@ This option makes it possible to include comments inside complicated patterns. N
behavior of the dollar metacharacter. It does not affect \Z or
\z.</item>
+ <tag><c>report_errors</c></tag>
+
+ <item><p>This option gives better control of the error handling in <c>re:run/3</c>. When it is given, compilation errors (if the regular expression isn't already compiled) as well as run-time errors are explicitly returned as an error tuple.</p>
+ <p>The possible run-time errors are:</p>
+ <taglist>
+ <tag><c>match_limit</c></tag>
+
+ <item>The PCRE library sets a limit on how many times the
+ internal match function can be called. The default value for
+ this is 10000000 in the library compiled for Erlang. If
+ <c>{error, match_limit}</c> is returned, it means that the
+ execution of the regular expression has reached this
+ limit. Normally this is to be regarded as a <c>nomatch</c>,
+ which is the default return value when this happens, but by
+ specifying <c>report_errors</c>, you will get informed when
+ the match fails due to to many internal calls.</item>
+
+ <tag><c>match_limit_recursion</c></tag>
+
+ <item>This error is very similar to <c>match_limit</c>, but
+ occurs when the internal match function of PCRE is
+ "recursively" called more times than the
+ "match_limit_recursion" limit, which is by default 10000000 as
+ well. Note that as long as the <c>match_limit</c> and
+ <c>match_limit_default</c> values are kept at the default
+ values, the <c>match_limit_recursion</c> error can not occur,
+ as the <c>match_limit</c> error will occur before that (each
+ recursive call is also a call, but not vice versa). Both
+ limits can however be changed, either by setting limits
+ directly in the regular expression string (see reference
+ section below) or by giving options to <c>re:run/3</c></item>
+
+ </taglist>
+ <p>It is important to understand that what is referred to as
+ "recursion" when limiting matches is not actually recursion on
+ the C stack of the Erlang machine, neither is it recursion on
+ the Erlang process stack. The version of PCRE compiled into the
+ Erlang VM uses machine "heap" memory to store values that needs to be
+ kept over recursion in regular expression matches.</p>
+ </item>
+ <tag><c>{match_limit, integer() >= 0}</c></tag>
+
+ <item><p>This option limits the execution time of a match in an
+ implementation-specific way. It is described in the following
+ way by the PCRE documentation:</p>
+
+ <code>
+The match_limit field provides a means of preventing PCRE from using
+up a vast amount of resources when running patterns that are not going
+to match, but which have a very large number of possibilities in their
+search trees. The classic example is a pattern that uses nested
+unlimited repeats.
+
+Internally, pcre_exec() uses a function called match(), which it calls
+repeatedly (sometimes recursively). The limit set by match_limit is
+imposed on the number of times this function is called during a match,
+which has the effect of limiting the amount of backtracking that can
+take place. For patterns that are not anchored, the count restarts
+from zero for each position in the subject string.</code>
+
+ <p>This means that runaway regular expression matches can fail
+ faster if the limit is lowered using this option. The default
+ value compiled into the Erlang virtual machine is 10000000</p>
+
+ <note><p>This option does in no way affect the execution of the
+ Erlang virtual machine in terms of "long running
+ BIF's". <c>re:run</c> always give control back to the scheduler
+ of Erlang processes at intervals that ensures the real time
+ properties of the Erlang system.</p></note>
+ </item>
+
+ <tag><c>{match_limit_recursion, integer() >= 0}</c></tag>
+
+ <item><p>This option limits the execution time and memory
+ consumption of a match in an implementation-specific way, very
+ similar to <c>match_limit</c>. It is described in the following
+ way by the PCRE documentation:</p>
+
+ <code>
+The match_limit_recursion field is similar to match_limit, but instead
+of limiting the total number of times that match() is called, it
+limits the depth of recursion. The recursion depth is a smaller number
+than the total number of calls, because not all calls to match() are
+recursive. This limit is of use only if it is set smaller than
+match_limit.
+
+Limiting the recursion depth limits the amount of machine stack that
+can be used, or, when PCRE has been compiled to use memory on the heap
+instead of the stack, the amount of heap memory that can be
+used.</code>
+
+ <p>The Erlang virtual machine uses a PCRE library where heap
+ memory is used when regular expression match recursion happens,
+ why this limits the usage of machine heap, not C stack.</p>
+
+ <p>Specifying a lower value may result in matches with deep recursion failing, when they should actually have matched:</p>
+ <code type="none">
+1&gt; re:run("aaaaaaaaaaaaaz","(a+)*z").
+{match,[{0,14},{0,13}]}
+2&gt; re:run("aaaaaaaaaaaaaz","(a+)*z",[{match_limit_recursion,5}]).
+nomatch
+3&gt; re:run("aaaaaaaaaaaaaz","(a+)*z",[{match_limit_recursion,5},report_errors]).
+{error,match_limit_recursion}</code>
+
+ <p>This option, as well as the <c>match_limit</c> option should
+ only be used in very rare cases. Understanding of the PCRE
+ library internals is recommended before tampering with these
+ limits.</p>
+ </item>
+
<tag><c>{offset, integer() >= 0}</c></tag>
<item>Start matching at the offset (position) given in the
@@ -394,6 +570,9 @@ This option makes it possible to include comments inside complicated patterns. N
<taglist>
<tag><c>all</c></tag>
<item>All captured subpatterns including the complete matching string. This is the default.</item>
+ <tag><c>all_names</c></tag>
+ <item>All <em>named</em> subpatterns in the regular expression, as if a <c>list()</c>
+ of all the names <em>in alphabetical order</em> was given. The list of all names can also be retrieved with the <seealso marker="#inspect/2">inspect/2</seealso> function.</item>
<tag><c>first</c></tag>
<item>Only the first captured subpattern, which is always the complete matching part of the subject. All explicitly captured subpatterns are discarded.</item>
<tag><c>all_but_first</c></tag>
@@ -721,12 +900,12 @@ published by O'Reilly, covers regular expressions in great detail. This
description of PCRE's regular expressions is intended as reference material.</p>
<p>The reference material is divided into the following sections:</p>
<list>
-<item><seealso marker="#sect1">Newline conventions</seealso></item>
+<item><seealso marker="#sect1">Special start-of-pattern items</seealso></item>
<item><seealso marker="#sect2">Characters and metacharacters</seealso></item>
<item><seealso marker="#sect3">Backslash</seealso></item>
<item><seealso marker="#sect4">Circumflex and dollar</seealso></item>
-<item><seealso marker="#sect5">Full stop (period, dot)</seealso></item>
-<item><seealso marker="#sect6">Matching a single byte</seealso></item>
+<item><seealso marker="#sect5">Full stop (period, dot) and \N</seealso></item>
+<item><seealso marker="#sect6">Matching a single data unit</seealso></item>
<item><seealso marker="#sect7">Square brackets and character classes</seealso></item>
<item><seealso marker="#sect8">POSIX character classes</seealso></item>
<item><seealso marker="#sect9">Vertical bar</seealso></item>
@@ -742,6 +921,7 @@ description of PCRE's regular expressions is intended as reference material.</p>
<item><seealso marker="#sect19">Comments</seealso></item>
<item><seealso marker="#sect20">Recursive patterns</seealso></item>
<item><seealso marker="#sect21">Subpatterns as subroutines</seealso></item>
+<item><seealso marker="#sect22">Oniguruma subroutine syntax</seealso></item>
<!-- XXX C Interface
<item><seealso marker="#sect22">Callouts</seealso></item>
-->
@@ -751,7 +931,55 @@ description of PCRE's regular expressions is intended as reference material.</p>
</section>
-<section><marker id="sect1"></marker><title>Newline conventions</title>
+<section><marker id="sect1"></marker><title>Special start-of-pattern items</title>
+
+<p>A number of options that can be passed to <c>re:compile/2</c> can also be set
+by special items at the start of a pattern. These are not Perl-compatible, but
+are provided to make these options accessible to pattern writers who are not
+able to change the program that processes the pattern. Any number of these
+items may appear, but they must all be together right at the start of the
+pattern string, and the letters must be in upper case.</p>
+
+<p><em>UTF support</em></p>
+<p>
+Unicode support is basically UTF-8 based. To use Unicode characters, you either
+call <c>re:compile/2</c>/<c>re:run/3</c> with the <c>unicode</c> option, or the
+ pattern must start with one of these special sequences:</p>
+<quote>
+<p> (*UTF8)</p>
+<p> (*UTF)</p>
+</quote>
+
+<p>Both options give the same effect, the input string is interpreted
+as UTF-8. Note that with these instructions, the automatic conversion
+of lists to UTF-8 is not performed by the <c>re</c> functions, why
+using these options is not recommended. Add the <c>unicode</c> option
+when running <c>re:compile/2</c> instead.</p>
+
+<p>
+Some applications that allow their users to supply patterns may wish to
+restrict them to non-UTF data for security reasons. If the <c>never_utf</c>
+option is set at compile time, (*UTF) etc. are not allowed, and their
+appearance causes an error.
+</p>
+
+<p><em>Unicode property support</em></p>
+<p>Another special sequence that may appear at the start of a pattern is</p>
+<quote>
+<p> (*UCP)</p>
+</quote>
+<p>This has the same effect as setting the <c>ucp</c> option: it causes sequences
+such as \d and \w to use Unicode properties to determine character types,
+instead of recognizing only characters with codes less than 256 via a lookup
+table.
+</p>
+
+<p><em>Disabling start-up optimizations</em></p>
+<p>
+If a pattern starts with (*NO_START_OPT), it has the same effect as setting the
+<c>no_Start_optimize</c> option at compile time.</p>
+
+<p><em>Newline conventions</em></p>
<p>PCRE supports
five
@@ -780,23 +1008,37 @@ example, the pattern:</p>
</quote>
<p>changes the convention to CR. That pattern matches "a\nb" because LF is no
-longer a newline. Note that these special settings, which are not
-Perl-compatible, are recognized only at the very start of a pattern, and that
-they must be in upper case. If more than one of them is present, the last one
+longer a newline. If more than one of them is present, the last one
is used.</p>
-<p>The newline convention does not affect what the \R escape sequence matches. By
-default, this is any Unicode newline sequence, for Perl compatibility. However,
-this can be changed; see the description of \R in the section entitled
+<p>The newline convention affects where the circumflex and dollar assertions are
+true. It also affects the interpretation of the dot metacharacter when
+<c>dotall</c> is not set, and the behaviour of \N. However, it does not affect
+what the \R escape sequence matches. By default, this is any Unicode newline
+sequence, for Perl compatibility. However, this can be changed; see the
+description of \R in the section entitled
-"Newline sequences"
+<em>"Newline sequences"</em>
below. A change of \R setting can be combined with a change of newline
convention.</p>
+<p><em>Setting match and recursion limits</em></p>
+
+<p>The caller of <c>re:run/3</c> can set a limit on the number of times the internal match() function is called and on the maximum depth of recursive calls. These facilities are provided to catch runaway matches that are provoked by patterns with huge matching trees (a typical example is a pattern with nested unlimited repeats) and to avoid running out of system stack by too much recursion. When one of these limits is reached, pcre_exec() gives an error return. The limits can also be set by items at the start of the pattern of the form</p>
+<quote>
+<p> (*LIMIT_MATCH=d)</p>
+<p> (*LIMIT_RECURSION=d)</p>
+</quote>
+<p>where d is any number of decimal digits. However, the value of the setting must be less than the value set by the caller of <c>re:run/3</c> for it to have any effect. In other words, the pattern writer can lower the limit set by the programmer, but not raise it. If there is more than one setting of one of these limits, the lower value is used.</p>
+
+<p>The current default value for both the limits are 10000000 in the Erlang
+VM. Note that the recursion limit does not actually affect the stack
+depth of the VM, as PCRE for Erlang is compiled in such a way that the
+match function never does recursion on the "C-stack".</p>
+
</section>
-
<section><marker id="sect2"></marker><title>Characters and metacharacters</title>
<!-- .rs -->
@@ -862,7 +1104,7 @@ a character class the only metacharacters are:</p>
<p>The backslash character has several uses. Firstly, if it is followed by a
-non-alphanumeric character, it takes away any special meaning that character
+character that is not a number or a letter, it takes away any special meaning that character
may have. This use of backslash as an escape character applies both inside and
outside character classes.</p>
@@ -872,10 +1114,14 @@ otherwise be interpreted as a metacharacter, so it is always safe to precede a
non-alphanumeric with backslash to specify that it stands for itself. In
particular, if you want to match a backslash, you write \\.</p>
-<p>If a pattern is compiled with the <c>extended</c> option, whitespace in the
+<p>In <c>unicode</c> mode, only ASCII numbers and letters have any special meaning after a
+backslash. All other characters (in particular, those whose codepoints are
+greater than 127) are treated as literals.</p>
+
+<p>If a pattern is compiled with the <c>extended</c> option, white space in the
pattern (other than in a character class) and characters between a # outside
a character class and the next newline are ignored. An escaping backslash can
-be used to include a whitespace or # character as part of the pattern.</p>
+be used to include a white space or # character as part of the pattern.</p>
<p>If you want to remove the special meaning from a sequence of characters, you
can do so by putting them between \Q and \E. This is different from Perl in
@@ -889,42 +1135,54 @@ Perl, $ and @ cause variable interpolation. Note the following examples:</p>
\Qabc\E\$\Qxyz\E abc$xyz abc$xyz</code>
-<p>The \Q...\E sequence is recognized both inside and outside character classes.</p>
-
+<p>The \Q...\E sequence is recognized both inside and outside
+character classes. An isolated \E that is not preceded by \Q is
+ignored. If \Q is not followed by \E later in the pattern, the literal
+interpretation continues to the end of the pattern (that is, \E is
+assumed at the end). If the isolated \Q is inside a character class,
+this causes an error, because the character class is not
+terminated.</p>
<p><em>Non-printing characters</em></p>
<p>A second use of backslash provides a way of encoding non-printing characters
in patterns in a visible manner. There is no restriction on the appearance of
non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is usually easier to
-use one of the following escape sequences than the binary character it
-represents:</p>
+but when a pattern is being prepared by text editing, it is often easier to use
+one of the following escape sequences than the binary character it represents:</p>
<taglist>
<tag>\a</tag> <item>alarm, that is, the BEL character (hex 07)</item>
- <tag>\cx</tag> <item>"control-x", where x is any character</item>
+ <tag>\cx</tag> <item>"control-x", where x is any ASCII character</item>
<tag>\e </tag> <item>escape (hex 1B)</item>
- <tag>\f</tag> <item>formfeed (hex 0C)</item>
+ <tag>\f</tag> <item>form feed (hex 0C)</item>
<tag>\n</tag> <item>linefeed (hex 0A)</item>
<tag>\r</tag> <item>carriage return (hex 0D)</item>
<tag>\t </tag> <item>tab (hex 09)</item>
- <tag>\ddd</tag> <item>character with octal code ddd, or backreference</item>
+ <tag>\ddd</tag> <item>character with octal code ddd, or back reference</item>
<tag>\xhh </tag> <item>character with hex code hh</item>
<tag>\x{hhh..}</tag> <item>character with hex code hhh..</item>
</taglist>
-<p>The precise effect of \cx is as follows: if x is a lower case letter, it
-is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
-Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c; becomes hex
-7B.</p>
+<p>The precise effect of \cx on ASCII characters is as follows: if x is a lower
+case letter, it is converted to upper case. Then bit 6 of the character (hex
+40) is inverted. Thus \cA to \cZ become hex 01 to hex 1A (A is 41, Z is 5A),
+but \c{ becomes hex 3B ({ is 7B), and \c; becomes hex 7B (; is 3B). If the
+data item (byte or 16-bit value) following \c has a value greater than 127, a
+compile-time error occurs. This locks out non-ASCII characters in all modes.</p>
+
+<p>The \c facility was designed for use with ASCII characters, but with the
+extension to Unicode it is even less useful than it once was.</p>
-<p>After \x, from zero to two hexadecimal digits are read (letters can be in
-upper or lower case). Any number of hexadecimal digits may appear between \x{
-and }, but the value of the character code must be less than 256 in non-UTF-8
-mode, and less than 2**31 in UTF-8 mode. That is, the maximum value in
-hexadecimal is 7FFFFFFF. Note that this is bigger than the largest Unicode code
-point, which is 10FFFF.</p>
+<p>By default, after \x, from zero to two hexadecimal digits are read (letters
+can be in upper or lower case). Any number of hexadecimal digits may appear
+between \x{ and }, but the character code is constrained as follows:</p>
+<taglist>
+ <tag>8-bit non-Unicode mode</tag> <item>less than 0x100</item>
+ <tag>8-bit UTF-8 mode</tag> <item>less than 0x10ffff and a valid codepoint</item>
+</taglist>
+<p>Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
+"surrogate" codepoints), and 0xffef.</p>
<p>If characters other than hexadecimal digits appear between \x{ and }, or if
there is no terminating }, this form of escape is not recognized. Instead, the
@@ -952,17 +1210,12 @@ later, following the discussion of parenthesized subpatterns.</p>
<p>Inside a character class, or if the decimal number is greater than 9 and there
have not been that many capturing subpatterns, PCRE re-reads up to three octal
digits following the backslash, and uses them to generate a data character. Any
-subsequent digits stand for themselves.
-The value of a
-character specified in octal must be less than \400.
-In non-UTF-8 mode, the value of a
-character specified in octal must be less than \400. In UTF-8 mode, values up
-to \777 are permitted.
-
+subsequent digits stand for themselves. The value of the character is
+constrained in the same way as characters specified in hexadecimal.
For example:</p>
<taglist>
- <tag>\040</tag> <item>is another way of writing a space</item>
+ <tag>\040</tag> <item>is another way of writing a ASCII space</item>
<tag>\40</tag> <item>is the same, provided there are fewer than 40
previous capturing subpatterns</item>
@@ -977,7 +1230,7 @@ For example:</p>
character with octal code 113</item>
<tag>\377</tag> <item>might be a back reference, otherwise
- the byte consisting entirely of 1 bits</item>
+ the value 255 (decimal)</item>
<tag>\81</tag> <item>is either a back reference, or a binary zero
followed by the two characters "8" and "1"</item>
@@ -987,12 +1240,19 @@ For example:</p>
a leading zero, because no more than three octal digits are ever
read.</p>
-<p>All the sequences that define a single character value can be used
-both inside and outside character classes. In addition, inside a
-character class, the sequence \b is interpreted as the backspace
-character (hex 08), and the sequences \R and \X are interpreted as
-the characters "R" and "X", respectively. Outside a character class,
-these sequences have different meanings (see below).</p>
+<p>All the sequences that define a single character value can be used both inside
+and outside character classes. In addition, inside a character class, \b is
+interpreted as the backspace character (hex 08).</p>
+<p>\N is not allowed in a character class. \B, \R, and \X are not special
+inside a character class. Like other unrecognized escape sequences, they are
+treated as the literal characters "B", "R", and "X". Outside a character class, these
+sequences have different meanings.</p>
+
+<p><em>Unsupported escape sequences</em></p>
+
+<p>In Perl, the sequences \l, \L, \u, and \U are recognized by its string
+handler and used to modify the case of following characters. PCRE
+does not support these escape sequences.</p>
<p><em>Absolute and relative back references</em></p>
@@ -1002,30 +1262,42 @@ reference. A named back reference can be coded as \g{name}. Back
references are discussed later, following the discussion of
parenthesized subpatterns.</p>
+<p><em>Absolute and relative subroutine calls</em></p>
+<p>For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
+a number enclosed either in angle brackets or single quotes, is an alternative
+syntax for referencing a subpattern as a "subroutine". Details are discussed
+later.
+Note that \g{...} (Perl syntax) and \g&lt;...&gt; (Oniguruma syntax) are <em>not</em>
+synonymous. The former is a back reference; the latter is a
+subroutine call.</p>
+
<p><em>Generic character types</em></p>
-<p>Another use of backslash is for specifying generic character types. The
-following are always recognized:</p>
+<p>Another use of backslash is for specifying generic character types:</p>
<taglist>
<tag>\d</tag> <item>any decimal digit</item>
<tag>\D</tag> <item>any character that is not a decimal digit</item>
- <tag>\h</tag> <item>any horizontal whitespace character</item>
- <tag>\H</tag> <item>any character that is not a horizontal whitespace character</item>
- <tag>\s</tag> <item>any whitespace character</item>
- <tag>\S</tag> <item>any character that is not a whitespace character</item>
- <tag>\v</tag> <item>any vertical whitespace character</item>
- <tag>\V</tag> <item>any character that is not a vertical whitespace character</item>
+ <tag>\h</tag> <item>any horizontal white space character</item>
+ <tag>\H</tag> <item>any character that is not a horizontal white space character</item>
+ <tag>\s</tag> <item>any white space character</item>
+ <tag>\S</tag> <item>any character that is not a white space character</item>
+ <tag>\v</tag> <item>any vertical white space character</item>
+ <tag>\V</tag> <item>any character that is not a vertical white space character</item>
<tag>\w</tag> <item>any "word" character</item>
<tag>\W</tag> <item>any "non-word" character</item>
</taglist>
-<p>Each pair of escape sequences partitions the complete set of characters into
-two disjoint sets. Any given character matches one, and only one, of each pair.</p>
+<p>There is also the single sequence \N, which matches a non-newline character.
+This is the same as the "." metacharacter
+when <c>dotall</c> is not set. Perl also uses \N to match characters by name;
+PCRE does not support this.</p>
-<p>These character type sequences can appear both inside and outside character
+<p>Each pair of lower and upper case escape sequences partitions the complete set
+of characters into two disjoint sets. Any given character matches one, and only
+one, of each pair. The sequences can appear both inside and outside character
classes. They each match one character of the appropriate type. If the current
-matching point is at the end of the subject string, all of them fail, since
+matching point is at the end of the subject string, all of them fail, because
there is no character to match.</p>
<p>For compatibility with Perl, \s does not match the VT character (code 11).
@@ -1034,18 +1306,35 @@ are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is
included in a Perl script, \s may match the VT character. In PCRE, it never
does.</p>
-<p>In UTF-8 mode, characters with values greater than 128 never match \d, \s, or
-\w, and always match \D, \S, and \W. This is true even when Unicode
-character property support is available. These sequences retain their original
-meanings from before UTF-8 support was available, mainly for efficiency
-reasons.</p>
+<p>A "word" character is an underscore or any character that is a letter or digit.
+By default, the definition of letters and digits is controlled by PCRE's
+low-valued character tables, in Erlang's case (and without the <c>unicode</c> option),
+the ISO-Latin-1 character set.</p>
+
+<p>By default, in <c>unicode</c> mode, characters with values greater than 255,
+i.e. all characters outside the ISO-Latin-1 character set, never match
+\d, \s, or \w, and always match \D, \S, and \W. These sequences retain
+their original meanings from before UTF support was available, mainly for
+efficiency reasons. However, if the <c>ucp</c> option is set, the behaviour is changed so that Unicode
+properties are used to determine character types, as follows:</p>
+<taglist>
+ <tag>\d</tag> <item>any character that \p{Nd} matches (decimal digit)</item>
+ <tag>\s</tag> <item>any character that \p{Z} matches, plus HT, LF, FF, CR)</item>
+ <tag> \w</tag> <item>any character that \p{L} or \p{N} matches, plus underscore)</item>
+</taglist>
+<p>The upper case escapes match the inverse sets of characters. Note that \d
+matches only decimal digits, whereas \w matches any Unicode digit, as well as
+any Unicode letter, and underscore. Note also that <c>ucp</c> affects \b, and
+\B because they are defined in terms of \w and \W. Matching these sequences
+is noticeably slower when <c>ucp</c> is set.</p>
-<p>The sequences \h, \H, \v, and \V are Perl 5.10 features. In contrast to the
-other sequences, these do match certain high-valued codepoints in UTF-8 mode.
-The horizontal space characters are:</p>
+<p>The sequences \h, \H, \v, and \V are features that were added to Perl at
+release 5.10. In contrast to the other sequences, which match only ASCII
+characters by default, these always match certain high-valued codepoints,
+whether or not <c>ucp</c> is set. The horizontal space characters are:</p>
<taglist>
- <tag>U+0009</tag> <item>Horizontal tab</item>
+ <tag>U+0009</tag> <item>Horizontal tab (HT)</item>
<tag>U+0020</tag> <item>Space</item>
<tag>U+00A0</tag> <item>Non-break space</item>
<tag>U+1680</tag> <item>Ogham space mark</item>
@@ -1069,23 +1358,22 @@ The horizontal space characters are:</p>
<p>The vertical space characters are:</p>
<taglist>
- <tag>U+000A</tag> <item>Linefeed</item>
- <tag>U+000B</tag> <item>Vertical tab</item>
- <tag>U+000C</tag> <item>Formfeed</item>
- <tag>U+000D</tag> <item>Carriage return</item>
- <tag>U+0085</tag> <item>Next line</item>
+ <tag>U+000A</tag> <item>Linefeed (LF)</item>
+ <tag>U+000B</tag> <item>Vertical tab (VT)</item>
+ <tag>U+000C</tag> <item>Form feed (FF)</item>
+ <tag>U+000D</tag> <item>Carriage return (CR)</item>
+ <tag>U+0085</tag> <item>Next line (NEL)</item>
<tag>U+2028</tag> <item>Line separator</item>
<tag>U+2029</tag> <item>Paragraph separator</item>
</taglist>
-<p>A "word" character is an underscore or any character less than 256 that is a
-letter or digit. The definition of letters and digits is controlled by PCRE's
-low-valued character tables, which are always ISO-8859-1.</p>
+<p>In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
+relevant.</p>
<p><em>Newline sequences</em></p>
<p>Outside a character class, by default, the escape sequence \R matches any
-Unicode newline sequence. This is a Perl 5.10 feature. In non-UTF-8 mode \R is
+Unicode newline sequence. In non-UTF-8 mode \R is
equivalent to the following:</p>
<quote><p> (?&gt;\r\n|\n|\x0b|\f|\r|\x85)</p></quote>
@@ -1094,11 +1382,11 @@ equivalent to the following:</p>
<p>This particular group matches either the two-character sequence CR followed by
LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
-U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next
+U+000B), FF (form feed, U+000C), CR (carriage return, U+000D), or NEL (next
line, U+0085). The two-character sequence is treated as a single unit that
cannot be split.</p>
-<p>In UTF-8 mode, two additional characters whose codepoints are greater than 255
+<p>In Unicode mode, two additional characters whose codepoints are greater than 255
are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
Unicode character property support is not needed for these characters to be
recognized.</p>
@@ -1115,35 +1403,39 @@ one of the following sequences:</p>
<p> (*BSR_ANYCRLF) CR, LF, or CRLF only
(*BSR_UNICODE) any Unicode newline sequence</p>
-<p>These override the default and the options given to <c>re:compile/2</c>, but
-they can be overridden by options given to <c>re:run/3</c>. Note that these
-special settings, which are not Perl-compatible, are recognized only at the
-very start of a pattern, and that they must be in upper case. If more than one
-of them is present, the last one is used. They can be combined with a change of
-newline convention, for example, a pattern can start with:</p>
+<p>These override the default and the options given to the compiling function, but
+they can themselves be overridden by options given to a matching function. Note
+that these special settings, which are not Perl-compatible, are recognized only
+at the very start of a pattern, and that they must be in upper case. If more
+than one of them is present, the last one is used. They can be combined with a
+change of newline convention; for example, a pattern can start with:</p>
<p> (*ANY)(*BSR_ANYCRLF)</p>
-<p>Inside a character class, \R matches the letter "R".</p>
-
+<p>They can also be combined with the (*UTF8), (*UTF) or
+(*UCP) special sequences. Inside a character class, \R is treated as an
+unrecognized escape sequence, and so matches the letter "R" by default.</p>
<p><em>Unicode character properties</em></p>
-<p>When PCRE is built with Unicode character property support, three additional
+<p>Three additional
escape sequences that match characters with specific properties are available.
-When not in UTF-8 mode, these sequences are of course limited to testing
+When in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
characters whose codepoints are less than 256, but they do work in this mode.
The extra escape sequences are:</p>
+<taglist>
+<tag>\p{<em>xx</em>}</tag> <item>a character with the <em>xx</em> property</item>
+<tag>\P{<em>xx</em>}</tag> <item>a character without the <em>xx</em> property</item>
+<tag>\X</tag> <item>a Unicode extended grapheme cluster</item>
+</taglist>
-<p> \p{<em>xx</em>} a character with the <em>xx</em> property
- \P{<em>xx</em>} a character without the <em>xx</em> property
- \X an extended Unicode sequence</p>
-
-<p>The property names represented by <em>xx</em> above are limited to the Unicode
-script names, the general category properties, and "Any", which matches any
-character (including newline). Other properties such as "InMusicalSymbols" are
-not currently supported by PCRE. Note that \P{Any} does not match any
-characters, so always causes a match failure.</p>
+<p>The property names represented by <i>xx</i> above are limited to the Unicode
+script names, the general category properties, "Any", which matches any
+character (including newline), and some special PCRE properties (described
+in the next section).
+Other Perl properties such as "InMusicalSymbols" are not currently supported by
+PCRE. Note that \P{Any} does not match any characters, so always causes a
+match failure.</p>
<p>Sets of Unicode characters are defined as belonging to certain scripts. A
character from one of these sets can be matched using a script name. For
@@ -1158,13 +1450,19 @@ example:</p>
<list>
<item>Arabic</item>
<item>Armenian</item>
+<item>Avestan</item>
<item>Balinese</item>
+<item>Bamum</item>
+<item>Batak</item>
<item>Bengali</item>
<item>Bopomofo</item>
<item>Braille</item>
<item>Buginese</item>
<item>Buhid</item>
<item>Canadian_Aboriginal</item>
+<item>Carian</item>
+<item>Chakma</item>
+<item>Cham</item>
<item>Cherokee</item>
<item>Common</item>
<item>Coptic</item>
@@ -1173,6 +1471,7 @@ example:</p>
<item>Cyrillic</item>
<item>Deseret</item>
<item>Devanagari</item>
+<item>Egyptian_Hieroglyphs</item>
<item>Ethiopic</item>
<item>Georgian</item>
<item>Glagolitic</item>
@@ -1185,16 +1484,31 @@ example:</p>
<item>Hanunoo</item>
<item>Hebrew</item>
<item>Hiragana</item>
+<item>Imperial_Aramaic</item>
<item>Inherited</item>
+<item>Inscriptional_Pahlavi</item>
+<item>Inscriptional_Parthian</item>
+<item>Javanese</item>
+<item>Kaithi</item>
<item>Kannada</item>
<item>Katakana</item>
+<item>Kayah_Li</item>
<item>Kharoshthi</item>
<item>Khmer</item>
<item>Lao</item>
<item>Latin</item>
+<item>Lepcha</item>
<item>Limbu</item>
<item>Linear_B</item>
+<item>Lisu</item>
+<item>Lycian</item>
+<item>Lydian</item>
<item>Malayalam</item>
+<item>Mandaic</item>
+<item>Meetei_Mayek</item>
+<item>Meroitic_Cursive</item>
+<item>Meroitic_Hieroglyphs</item>
+<item>Miao</item>
<item>Mongolian</item>
<item>Myanmar</item>
<item>New_Tai_Lue</item>
@@ -1203,17 +1517,29 @@ example:</p>
<item>Old_Italic</item>
<item>Old_Persian</item>
<item>Oriya</item>
+<item>Old_South_Arabian</item>
+<item>Old_Turkic</item>
+<item>Ol_Chiki</item>
<item>Osmanya</item>
<item>Phags_Pa</item>
<item>Phoenician</item>
+<item>Rejang</item>
<item>Runic</item>
+<item>Samaritan</item>
+<item>Saurashtra</item>
+<item>Sharada</item>
<item>Shavian</item>
<item>Sinhala</item>
+<item>Sora_Sompeng</item>
+<item>Sundanese</item>
<item>Syloti_Nagri</item>
<item>Syriac</item>
<item>Tagalog</item>
<item>Tagbanwa</item>
<item>Tai_Le</item>
+<item>Tai_Tham</item>
+<item>Tai_Viet</item>
+<item>Takri</item>
<item>Tamil</item>
<item>Telugu</item>
<item>Thaana</item>
@@ -1221,13 +1547,14 @@ example:</p>
<item>Tibetan</item>
<item>Tifinagh</item>
<item>Ugaritic</item>
+<item>Vai</item>
<item>Yi</item>
</list>
-<p>Each character has exactly one general category property, specified by a
-two-letter abbreviation. For compatibility with Perl, negation can be specified
-by including a circumflex between the opening brace and the property name. For
-example, \p{^Lu} is the same as \P{Lu}.</p>
+<p>Each character has exactly one Unicode general category property, specified by
+a two-letter abbreviation. For compatibility with Perl, negation can be
+specified by including a circumflex between the opening brace and the property
+name. For example, \p{^Lu} is the same as \P{Lu}.</p>
<p>If only one letter is specified with \p or \P, it includes all the general
category properties that start with that letter. In this case, in the absence
@@ -1303,13 +1630,10 @@ the Lu, Ll, or Lt property, in other words, a letter that is not classified as
a modifier or "other".</p>
<p>The Cs (Surrogate) property applies only to characters in the range U+D800 to
-U+DFFF. Such characters are not valid in UTF-8 strings (see RFC 3629) and so
-cannot be tested by PCRE, unless UTF-8 validity checking has been turned off
-(see the discussion of <c>no_utf8_check</c> in the
-<em>pcreapi</em>
-page).</p>
+U+DFFF. Such characters are not valid in Unicode strings and so
+cannot be tested by PCRE. Perl does not support the Cs property</p>
-<p>The long synonyms for these properties that Perl supports (such as \p{Letter})
+<p>The long synonyms for property names that Perl supports (such as \p{Letter})
are not supported by PCRE, nor is it permitted to prefix any of these
properties with "Is".</p>
@@ -1318,31 +1642,79 @@ Instead, this property is assumed for any code point that is not in the
Unicode table.</p>
<p>Specifying caseless matching does not affect these escape sequences. For
-example, \p{Lu} always matches only upper case letters.</p>
-
-<p>The \X escape matches any number of Unicode characters that form an extended
-Unicode sequence. \X is equivalent to</p>
+example, \p{Lu} always matches only upper case letters. This is different from
+the behaviour of current versions of Perl.</p>
+<p>Matching characters by Unicode property is not fast, because PCRE has to do a
+multistage table lookup in order to find a character's property. That is why
+the traditional escape sequences such as \d and \w do not use Unicode
+properties in PCRE by default, though you can make them do so by setting the
+<c>ucp</c> option or by starting the pattern with (*UCP).</p>
+
+<p><em>Extended grapheme clusters</em></p>
+<p>The \X escape matches any number of Unicode characters that form an "extended
+grapheme cluster", and treats the sequence as an atomic group (see below).
+Up to and including release 8.31, PCRE matched an earlier, simpler definition
+that was equivalent to</p>
<quote><p> (?&gt;\PM\pM*)</p></quote>
-<p>That is, it matches a character without the "mark" property, followed by zero
-or more characters with the "mark" property, and treats the sequence as an
-atomic group
-(see below).
-Characters with the "mark" property are typically accents that affect the
-preceding character. None of them have codepoints less than 256, so in
-non-UTF-8 mode \X matches any one character.</p>
+<p>That is, it matched a character without the "mark" property, followed by zero
+or more characters with the "mark" property. Characters with the "mark"
+property are typically non-spacing accents that affect the preceding character.</p>
+
+<p>This simple definition was extended in Unicode to include more complicated
+kinds of composite character by giving each character a grapheme breaking
+property, and creating rules that use these properties to define the boundaries
+of extended grapheme clusters. In releases of PCRE later than 8.31, \X matches
+one of these clusters.</p>
-<p>Matching characters by Unicode property is not fast, because PCRE has to search
-a structure that contains data for over fifteen thousand characters. That is
-why the traditional escape sequences such as \d and \w do not use Unicode
-properties in PCRE.</p>
+<p>\X always matches at least one character. Then it decides whether to add
+additional characters according to the following rules for ending a cluster:</p>
+<taglist>
+<tag>1.</tag> <item>End at the end of the subject string.</item>
+<tag>2.</tag> <item>Do not end between CR and LF; otherwise end after any control character.</item>
+<tag>3.</tag> <item>Do not break Hangul (a Korean script) syllable sequences. Hangul characters
+are of five types: L, V, T, LV, and LVT. An L character may be followed by an
+L, V, LV, or LVT character; an LV or V character may be followed by a V or T
+character; an LVT or T character may be follwed only by a T character.</item>
+<tag>4.</tag> <item>Do not end before extending characters or spacing marks. Characters with
+the "mark" property always have the "extend" grapheme breaking property.</item>
+<tag>5.</tag> <item>Do not end after prepend characters.</item>
+<tag>6.</tag> <item>Otherwise, end the cluster.</item>
+</taglist>
+
+<p><em>PCRE's additional properties</em></p>
+
+<p>As well as the standard Unicode properties described above, PCRE supports four
+more that make it possible to convert traditional escape sequences such as \w
+and \s and POSIX character classes to use Unicode properties. PCRE uses these
+non-standard, non-Perl properties internally when PCRE_UCP is set. However,
+they may also be used explicitly. These properties are:</p>
+<taglist>
+ <tag>Xan</tag> <item>Any alphanumeric character</item>
+ <tag>Xps</tag> <item>Any POSIX space character</item>
+ <tag>Xsp</tag> <item>Any Perl space character</item>
+ <tag>Xwd</tag> <item>Any Perl "word" character</item>
+</taglist>
+<p>Xan matches characters that have either the L (letter) or the N (number)
+property. Xps matches the characters tab, linefeed, vertical tab, form feed, or
+carriage return, and any other character that has the Z (separator) property.
+Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the
+same characters as Xan, plus underscore.</p>
+
+<p>There is another non-standard property, Xuc, which matches any character that
+can be represented by a Universal Character Name in C++ and other programming
+languages. These are the characters $, @, ` (grave accent), and all characters
+with Unicode code points greater than or equal to U+00A0, except for the
+surrogates U+D800 to U+DFFF. Note that most base (ASCII) characters are
+excluded. (Universal Character Names are of the form \uHHHH or \UHHHHHHHH
+where H is a hexadecimal digit. Note that the Xuc property does not match these
+sequences but the characters that they represent.)</p>
<p><em>Resetting the match start</em></p>
-<p>The escape sequence \K, which is a Perl 5.10 feature, causes any previously
-matched characters not to be included in the final matched sequence. For
-example, the pattern:</p>
+<p>The escape sequence \K causes any previously matched characters not to be
+included in the final matched sequence. For example, the pattern:</p>
<quote><p> foo\Kbar</p></quote>
@@ -1362,6 +1734,10 @@ For example, when the pattern</p>
<p>matches "foobar", the first substring is still set to "foo".</p>
+<p>Perl documents that the use of \K within assertions is "not well defined". In
+PCRE, \K is acted upon when it occurs inside positive assertions, but is
+ignored in negative assertions.</p>
+
<p><em>Simple assertions</em></p>
<p>The final use of backslash is for certain simple assertions. An
@@ -1382,13 +1758,20 @@ described below. The backslashed assertions are:</p>
subject</item>
</taglist>
-<p>These assertions may not appear in character classes (but note that \b has a
-different meaning, namely the backspace character, inside a character class).</p>
+<p>Inside a character class, \b has a different meaning; it matches the backspace
+character. If any other of these assertions appears in a character class, by
+default it matches the corresponding literal character (for example, \B
+matches the letter B). </p>
<p>A word boundary is a position in the subject string where the current character
and the previous character do not both match \w or \W (i.e. one matches
\w and the other matches \W), or the start or end of the string if the
-first or last character matches \w, respectively.</p>
+first or last character matches \w, respectively. In a UTF mode, the meanings
+of \w and \W can be changed by setting the <c>ucp</c> option. When this is
+done, it also affects \b and \B. Neither PCRE nor Perl has a separate "start
+of word" or "end of word" metasequence. However, whatever follows \b normally
+determines which it is. For example, the fragment \ba matches "a" at the start
+of a word.</p>
<p>The \A, \Z, and \z assertions differ from the traditional circumflex and
dollar (described in the next section) in that they only ever match at the very
@@ -1422,9 +1805,13 @@ regular expression.</p>
<section><marker id="sect4"></marker><title>Circumflex and dollar</title>
+<p>The circumflex and dollar metacharacters are zero-width assertions. That is,
+they test for a particular condition being true without consuming any
+characters from the subject string.</p>
+
<p>Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching point is
-at the start of the subject string. If the <em>startoffset</em> argument of
+character is an assertion that is true only if the current matching point is at
+the start of the subject string. If the <i>startoffset</i> argument of
<c>re:run/3</c> is non-zero, circumflex can never match if the <c>multiline</c>
option is unset. Inside a character class, circumflex has an entirely different
meaning (see below).</p>
@@ -1437,12 +1824,12 @@ constrained to match only at the start of the subject, it is said to be an
"anchored" pattern. (There are also other constructs that can cause a pattern
to be anchored.)</p>
-<p>A dollar character is an assertion that is true only if the current matching
-point is at the end of the subject string, or immediately before a newline
-at the end of the string (by default). Dollar need not be the last character of
-the pattern if a number of alternatives are involved, but it should be the last
-item in any branch in which it appears. Dollar has no special meaning in a
-character class.</p>
+<p>The dollar character is an assertion that is true only if the current matching
+point is at the end of the subject string, or immediately before a newline at
+the end of the string (by default). Note, however, that it does not actually
+match the newline. Dollar need not be the last character of the pattern if a
+number of alternatives are involved, but it should be the last item in any
+branch in which it appears. Dollar has no special meaning in a character class.</p>
<p>The meaning of dollar can be changed so that it matches only at the
very end of the string, by setting the <c>dollar_endonly</c> option at
@@ -1471,12 +1858,11 @@ end of the subject in both modes, and if all branches of a pattern start with
</section>
-<section><marker id="sect5"></marker><title>Full stop (period, dot)</title>
+<section><marker id="sect5"></marker><title>Full stop (period, dot) and \N</title>
<p>Outside a character class, a dot in the pattern matches any one character in
the subject string except (by default) a character that signifies the end of a
line.
- In UTF-8 mode, the matched character may be more than one byte long.
</p>
<p>When a line ending is defined as a single character, dot never matches that
@@ -1497,111 +1883,138 @@ the subject string, it takes two dots to match it.</p>
circumflex and dollar, the only relationship being that they both
involve newlines. Dot has no special meaning in a character class.</p>
+<p>The escape sequence \N behaves like a dot, except that it is not affected by
+the PCRE_DOTALL option. In other words, it matches any character except one
+that signifies the end of a line. Perl also uses \N to match characters by
+name; PCRE does not support this.</p>
+
</section>
-<section><marker id="sect6"></marker><title>Matching a single byte</title>
+<section><marker id="sect6"></marker><title>Matching a single data unit</title>
-<p>Outside a character class, the escape sequence \C matches any one byte, both
-in and out of UTF-8 mode. Unlike a dot, it always matches any line-ending
-characters. The feature is provided in Perl in order to match individual bytes
-in UTF-8 mode. Because it breaks up UTF-8 characters into individual bytes,
-what remains in the string may be a malformed UTF-8 string. For this reason,
-the \C escape sequence is best avoided.</p>
+<p>Outside a character class, the escape sequence \C matches any one data unit,
+whether or not a UTF mode is set. One data unit is one
+byte. Unlike a dot, \C always
+matches line-ending characters. The feature is provided in Perl in order to
+match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
+used. Because \C breaks up characters into individual data units, matching one
+unit with \C in a UTF mode means that the rest of the string may start with a
+malformed UTF character. This has undefined results, because PCRE assumes that
+it is dealing with valid UTF strings.</p>
-<p>PCRE does not allow \C to appear in lookbehind assertions (described below),
-because in UTF-8 mode this would make it impossible to calculate the length of
+<p>PCRE does not allow \C to appear in lookbehind assertions (described below)
+in a UTF mode, because this would make it impossible to calculate the length of
the lookbehind.</p>
+<p>In general, the \C escape sequence is best avoided. However, one
+way of using it that avoids the problem of malformed UTF characters is to use a
+lookahead to check the length of the next character, as in this pattern, which
+could be used with a UTF-8 string (ignore white space and line breaks):</p>
+
+<code type="none">
+ (?| (?=[\x00-\x7f])(\C) |
+ (?=[\x80-\x{7ff}])(\C)(\C) |
+ (?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
+ (?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))</code>
+
+<p>A group that starts with (?| resets the capturing parentheses numbers in each
+alternative (see "Duplicate Subpattern Numbers"
+below). The assertions at the start of each branch check the next UTF-8
+character for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
+character's individual bytes are then captured by the appropriate number of
+groups.</p>
+
</section>
<section><marker id="sect7"></marker><title>Square brackets and character classes</title>
-<p>An opening square bracket introduces a character class, terminated
-by a closing square bracket. A closing square bracket on its own is
-not special. If a closing square bracket is required as a member of
-the class, it should be the first data character in the class (after
-an initial circumflex, if present) or escaped with a backslash.</p>
-
-<p>A character class matches a single character in the subject.
-In
-UTF-8 mode, the character may occupy more than one byte.
-A matched
-character must be in the set of characters defined by the class,
-unless the first character in the class definition is a circumflex, in
-which case the subject character must not be in the set defined by the
-class. If a circumflex is actually required as a member of the class,
-ensure it is not the first character, or escape it with a
+<p>An opening square bracket introduces a character class, terminated by a closing
+square bracket. A closing square bracket on its own is not special by default.
+However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square
+bracket causes a compile-time error. If a closing square bracket is required as
+a member of the class, it should be the first data character in the class
+(after an initial circumflex, if present) or escaped with a backslash.</p>
+
+<p>A character class matches a single character in the subject. In a UTF mode, the
+character may be more than one data unit long. A matched character must be in
+the set of characters defined by the class, unless the first character in the
+class definition is a circumflex, in which case the subject character must not
+be in the set defined by the class. If a circumflex is actually required as a
+member of the class, ensure it is not the first character, or escape it with a
backslash.</p>
<p>For example, the character class [aeiou] matches any lower case vowel, while
[^aeiou] matches any character that is not a lower case vowel. Note that a
circumflex is just a convenient notation for specifying the characters that
are in the class by enumerating those that are not. A class that starts with a
-circumflex is not an assertion: it still consumes a character from the subject
+circumflex is not an assertion; it still consumes a character from the subject
string, and therefore it fails if the current pointer is at the end of the
string.</p>
-<p>In UTF-8 mode, characters with values greater than 255 can be included in a
-class as a literal string of bytes, or by using the \x{ escaping mechanism.</p>
+<p>In UTF-8 mode, characters with values greater than 255 (0xffff)
+can be included in a class as a literal string of data units, or by using the
+\x{ escaping mechanism.</p>
<p>When caseless matching is set, any letters in a class represent both their
upper case and lower case versions, so for example, a caseless [aeiou] matches
"A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
-caseful version would.
-In UTF-8 mode, PCRE always understands the concept of
-case for characters whose values are less than 128, so caseless matching is
+caseful version would. In a UTF mode, PCRE always understands the concept of
+case for characters whose values are less than 256, so caseless matching is
always possible. For characters with higher values, the concept of case is
supported if PCRE is compiled with Unicode property support, but not otherwise.
-If you want to use caseless matching for characters 128 and above, you must
-ensure that PCRE is compiled with Unicode property support as well as with
-UTF-8 support.
-</p>
-
-<p>Characters that might indicate line breaks are never treated in any
-special way when matching character classes, whatever line-ending
-sequence is in use, and whatever setting of the <c>dotall</c> and
-<c>multiline</c> options is used. A class such as [^a] always matches
-one of these characters.</p>
-
-<p>The minus (hyphen) character can be used to specify a range of
-characters in a character class. For example, [d-m] matches any letter
-between d and m, inclusive. If a minus character is required in a
-class, it must be escaped with a backslash or appear in a position
-where it cannot be interpreted as indicating a range, typically as the
-first or last character in the class.</p>
-
-<p>It is not possible to have the literal character "]" as the end
-character of a range. A pattern such as [W-]46] is interpreted as a
-class of two characters ("W" and "-") followed by a literal string
-"46]", so it would match "W46]" or "-46]". However, if the "]" is
-escaped with a backslash it is interpreted as the end of range, so
-[W-\]46] is interpreted as a class containing a range followed by two
-other characters. The octal or hexadecimal representation of "]" can
-also be used to end a range.</p>
+If you want to use caseless matching in a UTF mode for characters 256 and
+above, you must ensure that PCRE is compiled with Unicode property support as
+well as with UTF support.</p>
+
+<p>Characters that might indicate line breaks are never treated in any special way
+when matching character classes, whatever line-ending sequence is in use, and
+whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class
+such as [^a] always matches one of these characters.</p>
+
+<p>The minus (hyphen) character can be used to specify a range of characters in a
+character class. For example, [d-m] matches any letter between d and m,
+inclusive. If a minus character is required in a class, it must be escaped with
+a backslash or appear in a position where it cannot be interpreted as
+indicating a range, typically as the first or last character in the class.</p>
+
+<p>It is not possible to have the literal character "]" as the end character of a
+range. A pattern such as [W-]46] is interpreted as a class of two characters
+("W" and "-") followed by a literal string "46]", so it would match "W46]" or
+"-46]". However, if the "]" is escaped with a backslash it is interpreted as
+the end of range, so [W-\]46] is interpreted as a class containing a range
+followed by two other characters. The octal or hexadecimal representation of
+"]" can also be used to end a range.</p>
<p>Ranges operate in the collating sequence of character values. They can also be
-used for characters specified numerically, for example [\000-\037].
-In UTF-8
-mode, ranges can include characters whose values are greater than 255, for
-example [\x{100}-\x{2ff}].
-</p>
+used for characters specified numerically, for example [\000-\037]. Ranges
+can include any characters that are valid for the current mode.</p>
<p>If a range that includes letters is used when caseless matching is set, it
matches the letters in either case. For example, [W-c] is equivalent to
-[][\\^_`wxyzabc], matched caselessly
-, and in non-UTF-8 mode, if character
+[][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
tables for a French locale are in use, [\xc8-\xcb] matches accented E
-characters in both cases. In UTF-8 mode, PCRE supports the concept of case for
-characters with values greater than 128 only when it is compiled with Unicode
+characters in both cases. In UTF modes, PCRE supports the concept of case for
+characters with values greater than 255 only when it is compiled with Unicode
property support.</p>
-<p>The character types \d, \D, \p, \P, \s, \S, \w, and \W may
-also appear in a character class, and add the characters that they
-match to the class. For example, [\dABCDEF] matches any hexadecimal
-digit. A circumflex can conveniently be used with the upper case
-character types to specify a more restricted set of characters than
-the matching lower case type. For example, the class [^\W_] matches
-any letter or digit, but not underscore.</p>
+<p>The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v,
+\V, \w, and \W may appear in a character class, and add the characters that
+they match to the class. For example, [\dABCDEF] matches any hexadecimal
+digit. In UTF modes, the <c>ucp</c> option affects the meanings of \d, \s, \w
+and their upper case partners, just as it does when they appear outside a
+character class, as described in the section entitled
+"Generic character types"
+above. The escape sequence \b has a different meaning inside a character
+class; it matches the backspace character. The sequences \B, \N, \R, and \X
+are not special inside a character class. Like any other unrecognized escape
+sequences, they are treated as the literal characters "B", "N", "R", and "X".</p>
+
+<p>A circumflex can conveniently be used with the upper case character types to
+specify a more restricted set of characters than the matching lower case type.
+For example, the class [^\W_] matches any letter or digit, but not underscore,
+whereas [\w] includes underscore. A positive character class should be read as
+"something OR something OR ..." and a negative class as "NOT something AND NOT
+something AND NOT ...".</p>
<p>The only metacharacters that are recognized in character classes
are backslash, hyphen (only where it can be interpreted as specifying
@@ -1611,7 +2024,6 @@ next section), and the terminating closing square bracket. However,
escaping other non-alphanumeric characters does no harm.</p>
</section>
-
<section><marker id="sect8"></marker><title>POSIX character classes</title>
<p>Perl supports the POSIX notation for character classes. This uses names
@@ -1621,7 +2033,7 @@ this notation. For example,</p>
<quote><p> [01[:alpha:]%]</p></quote>
<p>matches "0", "1", any alphabetic character, or "%". The supported class names
-are</p>
+are:</p>
<taglist>
<tag>alnum</tag> <item>letters and digits</item>
@@ -1633,7 +2045,7 @@ are</p>
<tag>graph</tag> <item>printing characters, excluding space</item>
<tag>lower</tag> <item>lower case letters</item>
<tag>print</tag> <item>printing characters, including space</item>
- <tag>punct</tag> <item>printing characters, excluding letters and digits</item>
+ <tag>punct</tag> <item>printing characters, excluding letters and digits and space</item>
<tag>space</tag> <item>whitespace (not quite the same as \s)</item>
<tag>upper</tag> <item>upper case letters</item>
<tag>word</tag> <item>"word" characters (same as \w)</item>
@@ -1655,8 +2067,26 @@ by a ^ character after the colon. For example,</p>
syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
supported, and an error is given if they are encountered.</p>
-<p>In UTF-8 mode, characters with values greater than 128 do not match any of
-the POSIX character classes.</p>
+<p>By default, in UTF modes, characters with values greater than 255 do not match
+any of the POSIX character classes. However, if the PCRE_UCP option is passed
+to <b>pcre_compile()</b>, some of the classes are changed so that Unicode
+character properties are used. This is achieved by replacing the POSIX classes
+by other sequences, as follows:</p>
+
+<taglist>
+ <tag>[:alnum:]</tag> <item>becomes <em>\p{Xan}</em></item>
+ <tag>[:alpha:]</tag> <item>becomes <em>\p{L}</em></item>
+ <tag>[:blank:]</tag> <item>becomes <em>\h</em></item>
+ <tag>[:digit:</tag>] <item>becomes <em>\p{Nd}</em></item>
+ <tag>[:lower:]</tag> <item>becomes <em>\p{Ll}</em></item>
+ <tag>[:space:]</tag> <item>becomes <em>\p{Xps}</em></item>
+ <tag>[:upper:</tag>] <item>becomes <em>\p{Lu}</em></item>
+ <tag>[:word:]</tag> <item>becomes <em>\p{Xwd}</em></item>
+</taglist>
+
+<p>Negated versions, such as [:^alpha:] use \P instead of \p. The other POSIX
+classes are unchanged, and match only characters with code points less than
+256.</p>
</section>
@@ -1703,19 +2133,13 @@ unset.</p>
<c>extra</c> can be changed in the same way as the Perl-compatible
options by using the characters J, U and X respectively.</p>
-<p>When an option change occurs at top level (that is, not inside subpattern
-parentheses), the change applies to the remainder of the pattern that follows.
-If the change is placed right at the start of a pattern, PCRE extracts it into
-the global options
-<!-- XXX C Interface
-(and it will therefore show up in data extracted by the
-<c>pcre_fullinfo()</c> function).
--->
-</p>
+<p>When one of these option changes occurs at top level (that is, not inside
+subpattern parentheses), the change applies to the remainder of the pattern
+that follows. If the change is placed right at the start of a pattern, PCRE
+extracts it into the global options.</p>
-<p>An option change within a subpattern (see below for a description
-of subpatterns) affects only that part of the current pattern that
-follows it, so</p>
+<p>An option change within a subpattern (see below for a description of
+subpatterns) affects only that part of the subpattern that follows it, so</p>
<quote><p> (a(?i)b)c</p></quote>
@@ -1733,11 +2157,16 @@ option settings happen at compile time. There would be some very weird
behaviour otherwise.</p>
<p><em>Note:</em> There are other PCRE-specific options that can be set by the
-application when the compile or match functions are called. In some cases the
-pattern can contain special leading sequences to override what the application
-has set or what has been defaulted. Details are given in the section entitled
-"Newline sequences" above.</p>
-
+application when the compiling or matching functions are called. In some cases
+the pattern can contain special leading sequences such as (*CRLF) to override
+what the application has set or what has been defaulted. Details are given in
+the section entitled "Newline sequences"
+above. There are also the (*UTF8) and (*UCP) leading
+sequences that can be used to set UTF and Unicode property modes; they are
+equivalent to setting the <c>unicode</c> and the <c>ucp</c>
+options, respectively. The (*UTF) sequence is a generic version that can be
+used with any of the libraries. However, the application can set the
+<c>never_utf</c> option, which locks out the use of the (*UTF) sequences.</p>
</section>
@@ -1751,16 +2180,17 @@ things:</p>
<quote><p> cat(aract|erpillar|)</p></quote>
-<p>matches one of the words "cat", "cataract", or "caterpillar". Without the
-parentheses, it would match "cataract", "erpillar" or an empty string.</p>
+<p>matches "cataract", "caterpillar", or "cat". Without the parentheses, it would
+match "cataract", "erpillar" or an empty string.</p>
<p>2. It sets up the subpattern as a capturing subpattern. This means that, when
the complete pattern matches, that portion of the subject string that matched the
subpattern is passed back to the caller via the return value of
-<c>re:run/3</c>. Opening parentheses are counted from left to right (starting
-from 1) to obtain numbers for the capturing subpatterns.</p>
-
-<p>For example, if the string "the red king" is matched against the pattern</p>
+<c>re:run/3</c>.</p>
+
+<p>Opening parentheses are counted from left to right (starting
+from 1) to obtain numbers for the capturing subpatterns.For example, if the string
+"the red king" is matched against the pattern</p>
<quote><p> the ((red|white) (king|queen))</p></quote>
@@ -1793,7 +2223,6 @@ from left to right, and options are not reset until the end of the subpattern
is reached, an option setting in one branch does affect subsequent branches, so
the above patterns match "SUNDAY" as well as "Saturday".</p>
-
</section>
<section><marker id="sect12"></marker><title>Duplicate subpattern numbers</title>
@@ -1811,18 +2240,30 @@ at captured substring number one, whichever alternative matched. This construct
is useful when you want to capture part, but not all, of one of a number of
alternatives. Inside a (?| group, parentheses are numbered as usual, but the
number is reset at the start of each branch. The numbers of any capturing
-buffers that follow the subpattern start after the highest number used in any
-branch. The following example is taken from the Perl documentation.
-The numbers underneath show in which buffer the captured content will be
-stored.</p>
+parentheses that follow the subpattern start after the highest number used in
+any branch. The following example is taken from the Perl documentation. The
+numbers underneath show in which buffer the captured content will be stored.</p>
<code type="none">
# before ---------------branch-reset----------- after
/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
# 1 2 2 3 2 3 4</code>
-<p>A backreference or a recursive call to a numbered subpattern always
-refers to the first one in the pattern with the given number.</p>
+<p>A back reference to a numbered subpattern uses the most recent value that is
+set for that number by any subpattern. The following pattern matches "abcabc"
+or "defdef":</p>
+
+<quote><p> /(?|(abc)|(def))\1/</p></quote>
+
+<p>In contrast, a subroutine call to a numbered subpattern always refers to the
+first one in the pattern with the given number. The following pattern matches
+"abcabc" or "defabc":</p>
+
+<quote><p> /(?|(abc)|(def))(?1)/</p></quote>
+
+<p>If a condition test
+for a subpattern's having matched refers to a non-unique number, the test is
+true if any of the subpatterns of that number have matched.</p>
<p>An alternative approach to using this "branch reset" feature is to use
duplicate named subpatterns, as described in the next section.</p>
@@ -1837,12 +2278,13 @@ if an expression is modified, the numbers may change. To help with this
difficulty, PCRE supports the naming of subpatterns. This feature was not
added to Perl until release 5.10. Python had the feature earlier, and PCRE
introduced it at release 4.0, using the Python syntax. PCRE now supports both
-the Perl and the Python syntax.</p>
+the Perl and the Python syntax. Perl allows identically numbered subpatterns to
+have different names, but PCRE does not.</p>
<p>In PCRE, a subpattern can be named in one of three ways:
(?&lt;name&gt;...) or (?'name'...) as in Perl, or (?P&lt;name&gt;...)
as in Python. References to capturing parentheses from other parts of
-the pattern, such as backreferences, recursion, and conditions, can be
+the pattern, such as back references, recursion, and conditions, can be
made by name as well as by number.</p>
<p>Names consist of up to 32 alphanumeric characters and underscores. Named
@@ -1857,11 +2299,13 @@ The <c>capture</c> specification to <c>re:run/3</c> can use named values if they
</p>
<p>By default, a name must be unique within a pattern, but it is possible to relax
-this constraint by setting the <c>dupnames</c> option at compile time. This can
-be useful for patterns where only one instance of the named parentheses can
-match. Suppose you want to match the name of a weekday, either as a 3-letter
-abbreviation or as the full name, and in both cases you want to extract the
-abbreviation. This pattern (ignoring the line breaks) does the job:</p>
+this constraint by setting the <c>dupnames</c> option at compile time. (Duplicate
+names are also always permitted for subpatterns with the same number, set up as
+described in the previous section.) Duplicate names can be useful for patterns
+where only one instance of the named parentheses can match. Suppose you want to
+match the name of a weekday, either as a 3-letter abbreviation or as the full
+name, and in both cases you want to extract the abbreviation. This pattern
+(ignoring the line breaks) does the job:</p>
<code type="none">
(?&lt;DN&gt;Mon|Fri|Sun)(?:day)?|
@@ -1887,7 +2331,13 @@ details of the interfaces for handling named subpatterns, see the
documentation.</p>
-->
-<p>In case of capturing named subpatterns which are not unique, the first occurrence is returned from <c>re:exec/3</c>, if the name is specified int the <c>values</c> part of the <c>capture</c> statement.</p>
+<p>In case of capturing named subpatterns which names are not unique, the first matching occurrence (counted from left to right in the subject) is returned from <c>re:exec/3</c>, if the name is specified in the <c>values</c> part of the <c>capture</c> statement. The <c>all_names</c> capturing value will match all of the names in the same way.</p>
+
+<p><em>Warning:</em> You cannot use different names to distinguish between two
+subpatterns with the same number because PCRE uses only the numbers when
+matching. For this reason, an error is given at compile time if different names
+are given to subpatterns with the same number. However, you can give the same
+name to subpatterns with the same number, even when <c>dupnames</c> is not set.</p>
</section>
@@ -1900,14 +2350,13 @@ following items:</p>
<item>a literal data character</item>
<item>the dot metacharacter</item>
<item>the \C escape sequence</item>
- <item>the \X escape sequence
-(in UTF-8 mode with Unicode properties)
- </item>
+ <item>the \X escape sequence</item>
<item>the \R escape sequence</item>
- <item>an escape such as \d that matches a single character</item>
+ <item>an escape such as \d or \pL that matches a single character</item>
<item>a character class</item>
<item>a back reference (see next section)</item>
- <item>a parenthesized subpattern (unless it is an assertion)</item>
+ <item>a parenthesized subpattern (including assertions)</item>
+ <item>a subroutine call to a subpattern (recursive or otherwise)</item>
</list>
<p>The general repetition quantifier specifies a minimum and maximum number of
@@ -1933,14 +2382,18 @@ where a quantifier is not allowed, or one that does not match the syntax of a
quantifier, is taken as a literal character. For example, {,6} is not a
quantifier, but a literal string of four characters.</p>
-<p>In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individual
-bytes. Thus, for example, \x{100}{2} matches two UTF-8 characters, each of
-which is represented by a two-byte sequence. Similarly, when Unicode property
-support is available, \X{3} matches three Unicode extended sequences, each of
-which may be several bytes long (and they may be of different lengths).</p>
-
+<p>In Unicode mode, quantifiers apply to characters rather than to individual data
+units. Thus, for example, \x{100}{2} matches two characters, each of
+which is represented by a two-byte sequence in a UTF-8 string. Similarly,
+\X{3} matches three Unicode extended grapheme clusters, each of which may be
+several data units long (and they may be of different lengths).</p>
<p>The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present.</p>
+previous item and the quantifier were not present. This may be useful for
+subpatterns that are referenced as subroutines
+from elsewhere in the pattern (but see also the section entitled
+"Defining subpatterns for use by reference only"
+below). Items other than subpatterns that have a {0} quantifier are omitted
+from the compiled pattern.</p>
<p>For convenience, the three most common quantifiers have single-character
abbreviations:</p>
@@ -2014,8 +2467,8 @@ pattern as though it were preceded by \A.</p>
worth setting <c>dotall</c> in order to obtain this optimization, or
alternatively using ^ to indicate anchoring explicitly.</p>
-<p>However, there is one situation where the optimization cannot be used. When .*
-is inside capturing parentheses that are the subject of a backreference
+<p>However, there are some cases where the optimization cannot be used. When .*
+is inside capturing parentheses that are the subject of a back reference
elsewhere in the pattern, a match at the start may fail where a later one
succeeds. Consider, for example:</p>
@@ -2024,6 +2477,15 @@ succeeds. Consider, for example:</p>
<p>If the subject is "xyz123abc123" the match point is the fourth character. For
this reason, such a pattern is not implicitly anchored.</p>
+<p>Another case where implicit anchoring is not applied is when the leading .* is
+inside an atomic group. Once again, a match at the start may fail where a later
+one succeeds. Consider this pattern:</p>
+
+<quote><p> (?&gt;.*?a)b</p></quote>
+
+<p>It matches "ab" in the subject "aab". The use of the backtracking control verbs
+(*PRUNE) and (*SKIP) also disable this optimization.</p>
+
<p>When a capturing subpattern is repeated, the value captured is the substring
that matched the final iteration. For example, after</p>
@@ -2162,11 +2624,10 @@ further details of the handling of digits following a backslash. There
is no such problem when named parentheses are used. A back reference
to any subpattern is possible using named parentheses (see below).</p>
-<p>Another way of avoiding the ambiguity inherent in the use of digits
-following a backslash is to use the \g escape sequence, which is a
-feature introduced in Perl 5.10. This escape must be followed by an
-unsigned number or a negative number, optionally enclosed in
-braces. These examples are all identical:</p>
+<p>Another way of avoiding the ambiguity inherent in the use of digits following a
+backslash is to use the \g escape sequence. This escape must be followed by an
+unsigned number or a negative number, optionally enclosed in braces. These
+examples are all identical:</p>
<list>
<item>(ring), \1</item>
@@ -2182,10 +2643,10 @@ reference. Consider this example:</p>
<quote><p> (abc(def)ghi)\g{-1}</p></quote>
<p>The sequence \g{-1} is a reference to the most recently started capturing
-subpattern before \g, that is, is it equivalent to \2. Similarly, \g{-2}
-would be equivalent to \1. The use of relative references can be helpful in
-long patterns, and also in patterns that are created by joining together
-fragments that contain references within themselves.</p>
+subpattern before \g, that is, is it equivalent to \2 in this example.
+Similarly, \g{-2} would be equivalent to \1. The use of relative references
+can be helpful in long patterns, and also in patterns that are created by
+joining together fragments that contain references within themselves.</p>
<p>A back reference matches whatever actually matched the capturing
subpattern in the current subject string, rather than anything
@@ -2234,6 +2695,8 @@ some delimiter must be used to terminate the back reference. If the
<c>extended</c> option is set, this can be whitespace. Otherwise an
empty comment (see "Comments" below) can be used.</p>
+<p><em>Recursive back references</em></p>
+
<p>A back reference that occurs inside the parentheses to which it refers fails
when the subpattern is first used, so, for example, (a\1) never matches.
However, such references can be useful inside repeated subpatterns. For
@@ -2248,6 +2711,11 @@ that the first iteration does not need to match the back reference. This can be
done using alternation, as in the example above, or by a quantifier with a
minimum of zero.</p>
+<p>Back references of this type cause the group that they reference to be treated
+as an atomic group.
+Once the whole group has been matched, a subsequent matching failure cannot
+cause backtracking into the middle of the group.</p>
+
</section>
<section><marker id="sect17"></marker><title>Assertions</title>
@@ -2263,12 +2731,27 @@ those that look ahead of the current position in the subject string, and those
that look behind it. An assertion subpattern is matched in the normal way,
except that it does not cause the current matching position to be changed.</p>
-<p>Assertion subpatterns are not capturing subpatterns, and may not be repeated,
-because it makes no sense to assert the same thing several times. If any kind
-of assertion contains capturing subpatterns within it, these are counted for
-the purposes of numbering the capturing subpatterns in the whole pattern.
-However, substring capturing is carried out only for positive assertions,
-because it does not make sense for negative assertions.</p>
+<p>Assertion subpatterns are not capturing subpatterns. If such an assertion
+contains capturing subpatterns within it, these are counted for the purposes of
+numbering the capturing subpatterns in the whole pattern. However, substring
+capturing is carried out only for positive assertions. (Perl sometimes, but not
+always, does do capturing in negative assertions.)</p>
+
+<p>For compatibility with Perl, assertion subpatterns may be repeated; though
+it makes no sense to assert the same thing several times, the side effect of
+capturing parentheses may occasionally be useful. In practice, there only three
+cases:</p>
+
+<taglist>
+<tag>(1)</tag> <item>If the quantifier is {0}, the assertion is never obeyed during matching.
+However, it may contain internal capturing parenthesized groups that are called
+from elsewhere via the subroutine mechanism.</item>
+<tag>(2)</tag> <item>If quantifier is {0,n} where n is greater than zero, it is treated as if it
+were {0,1}. At run time, the rest of the pattern match is tried with and
+without the assertion, the order depending on the greediness of the quantifier.</item>
+<tag>(3)</tag> <item>If the minimum repetition is greater than zero, the quantifier is ignored.
+The assertion is obeyed just once when encountered during matching.</item>
+</taglist>
<p><em>Lookahead assertions</em></p>
@@ -2294,7 +2777,8 @@ lookbehind assertion is needed to achieve the other effect.</p>
<p>If you want to force a matching failure at some point in a pattern, the most
convenient way to do it is with (?!) because an empty string always matches, so
-an assertion that requires there not to be an empty string must always fail.</p>
+an assertion that requires there not to be an empty string must always fail.
+The backtracking control verb (*FAIL) or (*F) is a synonym for (?!).</p>
<p><em>Lookbehind assertions</em></p>
@@ -2317,33 +2801,38 @@ do not all have to have the same fixed length. Thus</p>
<p>causes an error at compile time. Branches that match different length strings
are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl (at least for 5.8), which requires all branches to
+extension compared with Perl, which requires all branches to
match the same length of string. An assertion such as</p>
<quote><p> (?&lt;=ab(c|de))</p></quote>
<p>is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable if rewritten to use two top-level branches:</p>
+lengths, but it is acceptable to PCRE if rewritten to use two top-level
+branches:</p>
<quote><p> (?&lt;=abc|abde)</p></quote>
-<p>In some cases, the Perl 5.10 escape sequence \K (see above) can be
-used instead of a lookbehind assertion; this is not restricted to a
-fixed-length.</p>
+<p>In some cases, the escape sequence \K (see above) can be
+used instead of a lookbehind assertion to get round the fixed-length
+restriction.</p>
<p>The implementation of lookbehind assertions is, for each alternative, to
temporarily move the current position back by the fixed length and then try to
match. If there are insufficient characters before the current position, the
assertion fails.</p>
-<p>PCRE does not allow the \C escape (which matches a single byte in UTF-8 mode)
-to appear in lookbehind assertions, because it makes it impossible to calculate
-the length of the lookbehind. The \X and \R escapes, which can match
-different numbers of bytes, are also not permitted.</p>
+<p>In a UTF mode, PCRE does not allow the \C escape (which matches a single data
+unit even in a UTF mode) to appear in lookbehind assertions, because it makes
+it impossible to calculate the length of the lookbehind. The \X and \R
+escapes, which can match different numbers of data units, are also not
+permitted.</p>
+<p>"Subroutine" calls (see below) such as (?2) or (?&amp;X) are permitted in lookbehinds, as long
+as the subpattern matches a fixed-length string. Recursion,
+however, is not supported.</p>
<p>Possessive quantifiers can be used in conjunction with lookbehind assertions to
-specify efficient matching at the end of the subject string. Consider a simple
-pattern such as</p>
+specify efficient matching of fixed-length strings at the end of subject
+strings. Consider a simple pattern such as</p>
<quote><p> abcd$</p></quote>
@@ -2406,8 +2895,8 @@ characters that are not "999".</p>
<p>It is possible to cause the matching process to obey a subpattern
conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a previous capturing subpattern matched
-or not. The two possible forms of conditional subpattern are</p>
+the result of an assertion, or whether a specific capturing subpattern has
+already been matched. The two possible forms of conditional subpattern are:</p>
<list>
<item>(?(condition)yes-pattern)</item>
@@ -2416,7 +2905,13 @@ or not. The two possible forms of conditional subpattern are</p>
<p>If the condition is satisfied, the yes-pattern is used; otherwise the
no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs.</p>
+subpattern, a compile-time error occurs. Each of the two alternatives may
+itself contain nested subpatterns of any form, including conditional
+subpatterns; the restriction to two alternatives applies only at the level of
+the condition. This pattern fragment is an example where the alternatives are
+complex:</p>
+
+<quote><p> (?(1) (A|B|C) | (D | (?(2)E|F) | E) )</p></quote>
<p>There are four kinds of condition: references to subpatterns, references to
recursion, a pseudo-condition called DEFINE, and assertions.</p>
@@ -2425,13 +2920,16 @@ recursion, a pseudo-condition called DEFINE, and assertions.</p>
<p><em>Checking for a used subpattern by number</em></p>
<p>If the text between the parentheses consists of a sequence of
-digits, the condition is true if the capturing subpattern of that
-number has previously matched. An alternative notation is to precede
-the digits with a plus or minus sign. In this case, the subpattern
-number is relative rather than absolute. The most recently opened
-parentheses can be referenced by (?(-1), the next most recent by
-(?(-2), and so on. In looping constructs it can also make sense to
-refer to subsequent groups with constructs such as (?(+2).</p>
+digits, the condition is true if a capturing subpattern of that number has previously
+matched. If there is more than one capturing subpattern with the same number
+(see the earlier section about duplicate subpattern numbers),
+the condition is true if any of them have matched. An alternative notation is
+to precede the digits with a plus or minus sign. In this case, the subpattern
+number is relative rather than absolute. The most recently opened parentheses
+can be referenced by (?(-1), the next most recent by (?(-2), and so on. Inside
+loops it can also make sense to refer to subsequent groups. The next
+parentheses to be opened can be referenced as (?(+1), and so on. (The value
+zero in any of these forms is not used; it provokes a compile-time error.)</p>
<p>Consider the following pattern, which contains non-significant
whitespace to make it more readable (assume the <c>extended</c>
@@ -2442,7 +2940,7 @@ option) and to divide it into three parts for ease of discussion:</p>
<p>The first part matches an optional opening parenthesis, and if that
character is present, sets it as the first captured substring. The second part
matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether the first set of parentheses matched
+conditional subpattern that tests whether or not the first set of parentheses matched
or not. If they did, that is, if subject started with an opening parenthesis,
the condition is true, and so the yes-pattern is executed and a closing
parenthesis is required. Otherwise, since no-pattern is not present, the
@@ -2472,6 +2970,10 @@ consist entirely of digits is not recommended.</p>
<quote><p> (?&lt;OPEN&gt; \( )? [^()]+ (?(&lt;OPEN&gt;) \) )</p></quote>
+<p>If the name used in a condition of this kind is a duplicate, the test is
+applied to all subpatterns of the same name, and is true if any one of them has
+matched.</p>
+
<p><em>Checking for pattern recursion</em></p>
<p>If the condition is the string (R), and there is no subpattern with
@@ -2481,12 +2983,14 @@ by ampersand follow the letter R, for example:</p>
<quote><p> (?(R3)...) or (?(R&amp;name)...)</p></quote>
-<p>the condition is true if the most recent recursion is into the
+<p>the condition is true if the most recent recursion is into a
subpattern whose number or name is given. This condition does not
-check the entire recursion stack.</p>
+check the entire recursion stack. If the name used in a condition of this kind is a duplicate, the test is
+applied to all subpatterns of the same name, and is true if any one of them is
+the most recent recursion.</p>
-<p>At "top level", all these recursion test conditions are false. Recursive
-patterns are described below.</p>
+<p>At "top level", all these recursion test conditions are false. The syntax for recursive
+patterns is described below.</p>
<p><em>Defining subpatterns for use by reference only</em></p>
@@ -2494,21 +2998,21 @@ patterns are described below.</p>
name DEFINE, the condition is always false. In this case, there may be only one
alternative in the subpattern. It is always skipped if control reaches this
point in the pattern; the idea of DEFINE is that it can be used to define
-"subroutines" that can be referenced from elsewhere. (The use of "subroutines"
-is described below.) For example, a pattern to match an IPv4 address could be
+"subroutines" that can be referenced from elsewhere. (The use of subroutines
+is described below.) For example, a pattern to match an IPv4 address such as
+"192.168.23.245" could be
written like this (ignore whitespace and line breaks):</p>
<quote><p> (?(DEFINE) (?&lt;byte&gt; 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
\b (?&amp;byte) (\.(?&amp;byte)){3} \b</p></quote>
-<p>The first part of the pattern is a DEFINE group inside which a another group
-named "byte" is defined. This matches an individual component of an IPv4
-address (a number less than 256). When matching takes place, this part of the
-pattern is skipped because DEFINE acts like a false condition.</p>
-
-<p>The rest of the pattern uses references to the named group to match the four
-dot-separated components of an IPv4 address, insisting on a word boundary at
-each end.</p>
+<p>The first part of the pattern is a DEFINE group inside which a
+another group named "byte" is defined. This matches an individual
+component of an IPv4 address (a number less than 256). When matching
+takes place, this part of the pattern is skipped because DEFINE acts
+like a false condition. The rest of the pattern uses references to the
+named group to match the four dot-separated components of an IPv4
+address, insisting on a word boundary at each end.</p>
<p><em>Assertion conditions</em></p>
@@ -2533,14 +3037,31 @@ dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.</p>
<section><marker id="sect19"></marker><title>Comments</title>
-<p>The sequence (?# marks the start of a comment that continues up to the next
-closing parenthesis. Nested parentheses are not permitted. The characters
-that make up a comment play no part in the pattern matching at all.</p>
-
-<p>If the <c>extended</c> option is set, an unescaped # character outside a
-character class introduces a comment that continues to immediately after the
-next newline in the pattern.</p>
+<p>There are two ways of including comments in patterns that are processed by
+PCRE. In both cases, the start of the comment must not be in a character class,
+nor in the middle of any other sequence of related characters such as (?: or a
+subpattern name or number. The characters that make up a comment play no part
+in the pattern matching.</p>
+<p>The sequence (?# marks the start of a comment that continues up to the next
+closing parenthesis. Nested parentheses are not permitted. If the PCRE_EXTENDED
+option is set, an unescaped # character also introduces a comment, which in
+this case continues to immediately after the next newline character or
+character sequence in the pattern. Which characters are interpreted as newlines
+is controlled by the options passed to a compiling function or by a special
+sequence at the start of the pattern, as described in the section entitled
+"Newline conventions"
+above. Note that the end of this type of comment is a literal newline sequence
+in the pattern; escape sequences that happen to represent a newline do not
+count. For example, consider this pattern when <c>extended</c> is set, and the
+default newline convention is in force:</p>
+
+<quote><p> abc #comment \n still comment</p></quote>
+
+<p>On encountering the # character, <b>pcre_compile()</b> skips along, looking for
+a newline in the pattern. The sequence \n is still literal at this stage, so
+it does not terminate the comment. Only an actual character with the code value
+0x0a (the default newline) does so.</p>
</section>
@@ -2566,51 +3087,45 @@ case refers recursively to the pattern in which it appears.</p>
<p>Obviously, PCRE cannot support the interpolation of Perl code. Instead, it
supports special syntax for recursion of the entire pattern, and also for
individual subpattern recursion. After its introduction in PCRE and Python,
-this kind of recursion was introduced into Perl at release 5.10.</p>
+this kind of recursion was subsequently introduced into Perl at release 5.10.</p>
<p>A special item that consists of (? followed by a number greater
-than zero and a closing parenthesis is a recursive call of the
+than zero and a closing parenthesis is a recursive subroutine call of the
subpattern of the given number, provided that it occurs inside that
-subpattern. (If not, it is a "subroutine" call, which is described in
+subpattern. (If not, it is a non-recursive subroutine call, which is described in
the next section.) The special item (?R) or (?0) is a recursive call
of the entire regular expression.</p>
-<p>In PCRE (like Python, but unlike Perl), a recursive subpattern call
-is always treated as an atomic group. That is, once it has matched
-some of the subject string, it is never re-entered, even if it
-contains untried alternatives and there is a subsequent matching
-failure.</p>
-
<p>This PCRE pattern solves the nested parentheses problem (assume the
<c>extended</c> option is set so that whitespace is ignored):</p>
-<quote><p> \( ( (?&gt;[^()]+) | (?R) )* \)</p></quote>
+<quote><p> \( ( [^()]++ | (?R) )* \)</p></quote>
<p>First it matches an opening parenthesis. Then it matches any number
of substrings which can either be a sequence of non-parentheses, or a
recursive match of the pattern itself (that is, a correctly
-parenthesized substring). Finally there is a closing parenthesis.</p>
+parenthesized substring). Finally there is a closing
+parenthesis. Note the use of a possessive quantifier to avoid
+backtracking into sequences of non-parentheses.</p>
<p>If this were part of a larger pattern, you would not want to
recurse the entire pattern, so instead you could use this:</p>
-<quote><p> ( \( ( (?&gt;[^()]+) | (?1) )* \) )</p></quote>
+<quote><p> ( \( ( [^()]++ | (?1) )* \) )</p></quote>
<p>We have put the pattern into parentheses, and caused the recursion
to refer to them instead of the whole pattern.</p>
-<p>In a larger pattern, keeping track of parenthesis numbers can be
-tricky. This is made easier by the use of relative references. (A Perl
-5.10 feature.) Instead of (?1) in the pattern above you can write
-(?-2) to refer to the second most recently opened parentheses
-preceding the recursion. In other words, a negative number counts
-capturing parentheses leftwards from the point at which it is
-encountered.</p>
+<p>In a larger pattern, keeping track of parenthesis numbers can be tricky. This
+is made easier by the use of relative references. Instead of (?1) in the
+pattern above you can write (?-2) to refer to the second most recently opened
+parentheses preceding the recursion. In other words, a negative number counts
+capturing parentheses leftwards from the point at which it is encountered.</p>
<p>It is also possible to refer to subsequently opened parentheses, by
writing references such as (?+2). However, these cannot be recursive
because the reference is not inside the parentheses that are
-referenced. They are always "subroutine" calls, as described in the
+referenced. They are always non-recursive subroutine calls, as described in the
next section.</p>
<p>An alternative approach is to use named parentheses instead. The
@@ -2618,75 +3133,136 @@ Perl syntax for this is (?&amp;name); PCRE's earlier syntax
(?P&gt;name) is also supported. We could rewrite the above example as
follows:</p>
-<quote><p> (?&lt;pn&gt; \( ( (?&gt;[^()]+) | (?&amp;pn) )* \) )</p></quote>
+<quote><p> (?&lt;pn&gt; \( ( [^()]++ | (?&amp;pn) )* \) )</p></quote>
<p>If there is more than one subpattern with the same name, the earliest one is
used.</p>
<p>This particular example pattern that we have been looking at contains nested
-unlimited repeats, and so the use of atomic grouping for matching strings of
-non-parentheses is important when applying the pattern to strings that do not
-match. For example, when this pattern is applied to</p>
+unlimited repeats, and so the use of a possessive quantifier for matching
+strings of non-parentheses is important when applying the pattern to strings
+that do not match. For example, when this pattern is applied to</p>
<quote><p> (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()</p></quote>
-<p>it yields "no match" quickly. However, if atomic grouping is not used,
+<p>it yields "no match" quickly. However, if a possessive quantifier is not used,
the match runs for a very long time indeed because there are so many different
ways the + and * repeats can carve up the subject, and all have to be tested
before failure can be reported.</p>
-<p>At the end of a match, the values set for any capturing subpatterns are those
-from the outermost level of the recursion at which the subpattern value is set.
+<p>At the end of a match, the values of capturing parentheses are those from
+the outermost level. If the pattern above is matched against</p>
-<!-- XXX C Interface
-If you want to obtain intermediate values, a callout function can be used (see
-below and the
+<quote><p> (ab(cd)ef)</p></quote>
-<em>pcrecallout</em>
+<p>the value for the inner capturing parentheses (numbered 2) is "ef", which is
+the last value taken on at the top level. If a capturing subpattern is not
+matched at the top level, its final captured value is unset, even if it was
+(temporarily) set at a deeper level during the matching process.</p>
-documentation).
--->
-If the pattern above is matched against</p>
+<p>Do not confuse the (?R) item with the condition (R), which tests for recursion.
+Consider this pattern, which matches text in angle brackets, allowing for
+arbitrary nesting. Only digits are allowed in nested brackets (that is, when
+recursing), whereas any characters are permitted at the outer level.</p>
-<quote><p> (ab(cd)ef)</p></quote>
+<quote><p> &lt; (?: (?(R) \d++ | [^&lt;&gt;]*+) | (?R)) * &gt;</p></quote>
-<p>the value for the capturing parentheses is "ef", which is the last value taken
-on at the top level. If additional parentheses are added, giving</p>
+<p>In this pattern, (?(R) is the start of a conditional subpattern, with two
+different alternatives for the recursive and non-recursive cases. The (?R) item
+is the actual recursive call.</p>
+
+<p><em>Differences in recursion processing between PCRE and Perl</em></p>
+
+<p>Recursion processing in PCRE differs from Perl in two important ways. In PCRE
+(like Python, but unlike Perl), a recursive subpattern call is always treated
+as an atomic group. That is, once it has matched some of the subject string, it
+is never re-entered, even if it contains untried alternatives and there is a
+subsequent matching failure. This can be illustrated by the following pattern,
+which purports to match a palindromic string that contains an odd number of
+characters (for example, "a", "aba", "abcba", "abcdcba"):</p>
+
+<quote><p> ^(.|(.)(?1)\2)$</p></quote>
+
+<p>The idea is that it either matches a single character, or two identical
+characters surrounding a sub-palindrome. In Perl, this pattern works; in PCRE
+it does not if the pattern is longer than three characters. Consider the
+subject string "abcba":</p>
+
+<p>At the top level, the first character is matched, but as it is not at the end
+of the string, the first alternative fails; the second alternative is taken
+and the recursion kicks in. The recursive call to subpattern 1 successfully
+matches the next character ("b"). (Note that the beginning and end of line
+tests are not part of the recursion).</p>
+
+<p>Back at the top level, the next character ("c") is compared with what
+subpattern 2 matched, which was "a". This fails. Because the recursion is
+treated as an atomic group, there are now no backtracking points, and so the
+entire match fails. (Perl is able, at this point, to re-enter the recursion and
+try the second alternative.) However, if the pattern is written with the
+alternatives in the other order, things are different:</p>
+
+<quote><p> ^((.)(?1)\2|.)$</p></quote>
+
+<p>This time, the recursing alternative is tried first, and continues to recurse
+until it runs out of characters, at which point the recursion fails. But this
+time we do have another alternative to try at the higher level. That is the big
+difference: in the previous case the remaining alternative is at a deeper
+recursion level, which PCRE cannot use.</p>
+
+<p>To change the pattern so that it matches all palindromic strings, not just
+those with an odd number of characters, it is tempting to change the pattern to
+this:</p>
-<code type="none">
- \( ( ( (?&gt;[^()]+) | (?R) )* ) \)
- ^ ^
- ^ ^</code>
+<quote><p> ^((.)(?1)\2|.?)$</p></quote>
-<p>the string they capture is "ab(cd)ef", the contents of the top level
-parentheses.
-<!-- XXX C interface
-If there are more than 15 capturing parentheses in a pattern, PCRE
-has to obtain extra memory to store data during a recursion, which it does by
-using <em>pcre_malloc</em>, freeing it via <em>pcre_free</em> afterwards. If no
-memory can be obtained, the match fails with the <c>error_nomemory</c> error.</p>
--->
-</p>
+<p>Again, this works in Perl, but not in PCRE, and for the same reason. When a
+deeper recursion has matched a single character, it cannot be entered again in
+order to match an empty string. The solution is to separate the two cases, and
+write out the odd and even cases as alternatives at the higher level:</p>
-<p>Do not confuse the (?R) item with the condition (R), which tests
-for recursion. Consider this pattern, which matches text in angle
-brackets, allowing for arbitrary nesting. Only digits are allowed in
-nested brackets (that is, when recursing), whereas any characters are
-permitted at the outer level.</p>
+<quote><p> ^(?:((.)(?1)\2|)|((.)(?3)\4|.))</p></quote>
-<quote><p> &lt; (?: (?(R) \d++ | [^&lt;&gt;]*+) | (?R)) * &gt;</p></quote>
+<p>If you want to match typical palindromic phrases, the pattern has to ignore all
+non-word characters, which can be done like this:</p>
+
+ <quote><p> ^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$</p></quote>
+
+<p>If run with the <c>caseless</c> option, this pattern matches phrases such as "A
+man, a plan, a canal: Panama!" and it works well in both PCRE and Perl. Note
+the use of the possessive quantifier *+ to avoid backtracking into sequences of
+non-word characters. Without this, PCRE takes a great deal longer (ten times or
+more) to match typical phrases, and Perl takes so long that you think it has
+gone into a loop.</p>
+
+<p><em>WARNING</em>: The palindrome-matching patterns above work only if the subject
+string does not start with a palindrome that is shorter than the entire string.
+For example, although "abcba" is correctly matched, if the subject is "ababa",
+PCRE finds the palindrome "aba" at the start, then fails at top level because
+the end of the string does not follow. Once again, it cannot jump back into the
+recursion to try other alternatives, so the entire match fails.</p>
-<p>In this pattern, (?(R) is the start of a conditional subpattern,
-with two different alternatives for the recursive and non-recursive
-cases. The (?R) item is the actual recursive call.</p>
+<p>The second way in which PCRE and Perl differ in their recursion processing is
+in the handling of captured values. In Perl, when a subpattern is called
+recursively or as a subpattern (see the next section), it has no access to any
+values that were captured outside the recursion, whereas in PCRE these values
+can be referenced. Consider this pattern:</p>
+
+<quote><p> ^(.)(\1|a(?2))</p></quote>
+
+<p>In PCRE, this pattern matches "bab". The first capturing parentheses match "b",
+then in the second group, when the back reference \1 fails to match "b", the
+second alternative matches "a" and then recurses. In the recursion, \1 does
+now match "b" and so the whole match succeeds. In Perl, the pattern fails to
+match because inside the recursive call \1 cannot access the externally set
+value.</p>
</section>
<section><marker id="sect21"></marker><title>Subpatterns as subroutines</title>
-<p>If the syntax for a recursive subpattern reference (either by number or by
+<p>If the syntax for a recursive subpattern call (either by number or by
name) is used outside the parentheses to which it refers, it operates like a
-subroutine in a programming language. The "called" subpattern may be defined
+subroutine in a programming language. The called subpattern may be defined
before or after the reference. A numbered reference can be absolute or
relative, as in these examples:</p>
@@ -2708,23 +3284,40 @@ relative, as in these examples:</p>
<p>is used, it does match "sense and responsibility" as well as the other two
strings. Another example is given in the discussion of DEFINE above.</p>
-<p>Like recursive subpatterns, a "subroutine" call is always treated
-as an atomic group. That is, once it has matched some of the subject
-string, it is never re-entered, even if it contains untried
-alternatives and there is a subsequent matching failure.</p>
-
-<p>When a subpattern is used as a subroutine, processing options such as
-case-independence are fixed when the subpattern is defined. They cannot be
-changed for different calls. For example, consider this pattern:</p>
+<p>All subroutine calls, whether recursive or not, are always treated as atomic
+groups. That is, once a subroutine has matched some of the subject string, it
+is never re-entered, even if it contains untried alternatives and there is a
+subsequent matching failure. Any capturing parentheses that are set during the
+subroutine call revert to their previous values afterwards.</p>
+<p>Processing options such as case-independence are fixed when a subpattern is
+defined, so if it is used as a subroutine, such options cannot be changed for
+different calls. For example, consider this pattern:</p>
<quote><p> (abc)(?i:(?-1))</p></quote>
<p>It matches "abcabc". It does not match "abcABC" because the change of
processing option does not affect the called subpattern.</p>
-
</section>
+<section><marker id="sect22"></marker><title>Oniguruma subroutine syntax</title>
+<p>For compatibility with Oniguruma, the non-Perl syntax \g followed by a name or
+a number enclosed either in angle brackets or single quotes, is an alternative
+syntax for referencing a subpattern as a subroutine, possibly recursively. Here
+are two of the examples used above, rewritten using this syntax:</p>
+<quote>
+ <p> (?&lt;pn&gt; \( ( (?&gt;[^()]+) | \g&lt;pn&gt; )* \) )</p>
+ <p> (sens|respons)e and \g'1'ibility</p>
+</quote>
+<p>PCRE supports an extension to Oniguruma: if a number is preceded by a
+plus or a minus sign it is taken as a relative reference. For example:</p>
+
+ <quote><p> (abc)(?i:\g&lt;-1&gt;)</p></quote>
+
+<p>Note that \g{...} (Perl syntax) and \g&lt;...&gt; (Oniguruma syntax) are <i>not</i>
+synonymous. The former is a back reference; the latter is a subroutine call.</p>
+
+</section>
<!-- XXX C interface
<section> <marker id="sect22"><title>Callouts</title></marker>
@@ -2767,116 +3360,387 @@ documentation.</p>
<section><marker id="sect23"></marker><title>Backtracking control</title>
<p>Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which
-are described in the Perl documentation as "experimental and subject to change
-or removal in a future version of Perl". It goes on to say: "Their usage in
-production code should be noted to avoid problems during upgrades." The same
+are still described in the Perl documentation as "experimental and subject to
+change or removal in a future version of Perl". It goes on to say: "Their usage
+in production code should be noted to avoid problems during upgrades." The same
remarks apply to the PCRE features described in this section.</p>
+<p>The new verbs make use of what was previously invalid syntax: an opening
+parenthesis followed by an asterisk. They are generally of the form
+(*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
+differently depending on whether or not a name is present. A name is any
+sequence of characters that does not include a closing parenthesis. The maximum
+length of name is 255 in the 8-bit library and 65535 in the 16-bit and 32-bit
+libraries. If the name is empty, that is, if the closing parenthesis
+immediately follows the colon, the effect is as if the colon were not there.
+Any number of these verbs may occur in a pattern.</p>
+
<!-- XXX C interface
-<p>Since these verbs are specifically related to backtracking, they can be used
-only when the pattern is to be matched using <c>re:run/3</c>, which uses a
-backtracking algorithm. They cause an error if encountered by
-<c>pcre_dfa_exec()</c>.</p>
+<p>Since these verbs are specifically related to backtracking, most of them can be
+used only when the pattern is to be matched using one of the traditional
+matching functions, because these use a backtracking algorithm. With the
+exception of (*FAIL), which behaves like a failing negative assertion, the
+backtracking control verbs cause an error if encountered by a DFA matching
+function.</p>
-->
+<p>The behaviour of these verbs in
+repeated groups, assertions,
+and in subpatterns called as subroutines
+(whether or not recursively) is documented below.</p>
-<p>The new verbs make use of what was previously invalid syntax: an opening
-parenthesis followed by an asterisk. In Perl, they are generally of the form
-(*VERB:ARG) but PCRE does not support the use of arguments, so its general
-form is just (*VERB). Any number of these verbs may occur in a pattern. There
-are two kinds:</p>
+<p><em>Optimizations that affect backtracking verbs</em></p>
+
+<p>PCRE contains some optimizations that are used to speed up matching by running
+some checks at the start of each match attempt. For example, it may know the
+minimum length of matching subject, or that a particular character must be
+present. When one of these optimizations bypasses the running of a match, any
+included backtracking verbs will not, of course, be processed. You can suppress
+the start-of-match optimizations by setting the <c>no_start_optimize</c> option
+when calling <c>re:compile/2</c> or <c>re:run/3</c>, or by starting the
+pattern with (*NO_START_OPT).</p>
+<p>Experiments with Perl suggest that it too has similar optimizations, sometimes
+leading to anomalous results.</p>
<p><em>Verbs that act immediately</em></p>
-<p>The following verbs act as soon as they are encountered:</p>
+<p>The following verbs act as soon as they are encountered. They may not be
+followed by a name.</p>
-<quote><p> (*ACCEPT)</p></quote>
+<quote><p> (*ACCEPT)</p></quote>
<p>This verb causes the match to end successfully, skipping the remainder of the
-pattern. When inside a recursion, only the innermost pattern is ended
-immediately. PCRE differs from Perl in what happens if the (*ACCEPT) is inside
-capturing parentheses. In Perl, the data so far is captured: in PCRE no data is
-captured. For example:</p>
+pattern. However, when it is inside a subpattern that is called as a
+subroutine, only that subpattern is ended successfully. Matching then continues
+at the outer level. If (*ACCEPT) in triggered in a positive assertion, the
+assertion succeeds; in a negative assertion, the assertion fails.</p>
+
+<p>If (*ACCEPT) is inside capturing parentheses, the data so far is captured. For
+example:</p>
-<quote><p> A(A|B(*ACCEPT)|C)D</p></quote>
+<quote><p> A((?:A|B(*ACCEPT)|C)D)</p></quote>
-<p>This matches "AB", "AAD", or "ACD", but when it matches "AB", no data is
-captured.</p>
+<p>This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by
+the outer parentheses.</p>
-<quote><p> (*FAIL) or (*F)</p></quote>
+<quote><p> (*FAIL) or (*F)</p></quote>
-<p>This verb causes the match to fail, forcing backtracking to occur. It is
+<p>This verb causes a matching failure, forcing backtracking to occur. It is
equivalent to (?!) but easier to read. The Perl documentation notes that it is
probably useful only when combined with (?{}) or (??{}). Those are, of course,
Perl features that are not present in PCRE. The nearest equivalent is the
callout feature, as for example in this pattern:</p>
-<quote><p> a+(?C)(*FAIL)</p></quote>
+<quote><p> a+(?C)(*FAIL)</p></quote>
<p>A match with the string "aaaa" always fails, but the callout is taken before
each backtrack happens (in this example, 10 times).</p>
-
+<p><em>Recording which path was taken</em></p>
+
+<p>There is one verb whose main purpose is to track how a match was arrived at,
+though it also has a secondary use in conjunction with advancing the match
+starting point (see (*SKIP) below).</p>
+
+<warning>
+<p>In Erlang, there is no interface to retrieve a mark with <c>re:run/{2,3]</c>,
+so only the secondary purpose is relevant to the Erlang programmer!</p>
+<p>The rest of this section is therefore deliberately not adapted for reading
+by the Erlang programmer, however the examples might help in understanding NAMES as
+they can be used by (*SKIP).</p>
+</warning>
+
+<quote><p> (*MARK:NAME) or (*:NAME)</p></quote>
+
+<p>A name is always required with this verb. There may be as many instances of
+(*MARK) as you like in a pattern, and their names do not have to be unique.</p>
+
+<p>When a match succeeds, the name of the last-encountered (*MARK:NAME),
+(*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to the
+caller as described in the section entitled "Extra data for <c>pcre_exec()</c>"
+in the <c>pcreapi</c>
+documentation. Here is an example of <c>pcretest</c> output, where the /K
+modifier requests the retrieval and outputting of (*MARK) data:</p>
+<code>
+ re&gt; /X(*MARK:A)Y|X(*MARK:B)Z/K
+ data&gt; XY
+ 0: XY
+ MK: A
+ XZ
+ 0: XZ
+ MK: B</code>
+
+<p>The (*MARK) name is tagged with "MK:" in this output, and in this example it
+indicates which of the two alternatives matched. This is a more efficient way
+of obtaining this information than putting each alternative in its own
+capturing parentheses.</p>
+
+<p>If a verb with a name is encountered in a positive assertion that is true, the
+name is recorded and passed back if it is the last-encountered. This does not
+happen for negative assertions or failing positive assertions.</p>
+
+<p>After a partial match or a failed match, the last encountered name in the
+entire match process is returned. For example:</p>
+<code>
+ re&gt; /X(*MARK:A)Y|X(*MARK:B)Z/K
+ data&gt; XP
+ No match, mark = B</code>
+
+<p>Note that in this unanchored example the mark is retained from the match
+attempt that started at the letter "X" in the subject. Subsequent match
+attempts starting at "P" and then with an empty string do not get as far as the
+(*MARK) item, but nevertheless do not reset it.</p>
+
+<!--
+<p>If you are interested in (*MARK) values after failed matches, you should
+probably set the PCRE_NO_START_OPTIMIZE option
+(see above)
+to ensure that the match is always attempted.</p>
+-->
<p><em>Verbs that act after backtracking</em></p>
<p>The following verbs do nothing when they are encountered. Matching continues
-with what follows, but if there is no subsequent match, a failure is forced.
-The verbs differ in exactly what kind of failure occurs.</p>
-
-<quote><p> (*COMMIT)</p></quote>
-
-<p>This verb causes the whole match to fail outright if the rest of the pattern
-does not match. Even if the pattern is unanchored, no further attempts to find
-a match by advancing the start point take place. Once (*COMMIT) has been
-passed, <c>re:run/3</c> is committed to finding a match at the current
-starting point, or not at all. For example:</p>
+with what follows, but if there is no subsequent match, causing a backtrack to
+the verb, a failure is forced. That is, backtracking cannot pass to the left of
+the verb. However, when one of these verbs appears inside an atomic group or an
+assertion that is true, its effect is confined to that group, because once the
+group has been matched, there is never any backtracking into it. In this
+situation, backtracking can "jump back" to the left of the entire atomic group
+or assertion. (Remember also, as stated above, that this localization also
+applies in subroutine calls.)</p>
+
+<p>These verbs differ in exactly what kind of failure occurs when backtracking
+reaches them. The behaviour described below is what happens when the verb is
+not in a subroutine or an assertion. Subsequent sections cover these special
+cases.</p>
+
+<quote><p> (*COMMIT)</p></quote>
+
+<p>This verb, which may not be followed by a name, causes the whole match to fail
+outright if there is a later matching failure that causes backtracking to reach
+it. Even if the pattern is unanchored, no further attempts to find a match by
+advancing the starting point take place. If (*COMMIT) is the only backtracking
+verb that is encountered, once it has been passed <c>re:run/{2,3}</c> is
+committed to finding a match at the current starting point, or not at all. For
+example:</p>
-<quote><p> a+(*COMMIT)b</p></quote>
+<quote><p> a+(*COMMIT)b</p></quote>
<p>This matches "xxaab" but not "aacaab". It can be thought of as a kind of
-dynamic anchor, or "I've started, so I must finish."</p>
+dynamic anchor, or "I've started, so I must finish." The name of the most
+recently passed (*MARK) in the path is passed back when (*COMMIT) forces a
+match failure.</p>
-<quote><p> (*PRUNE)</p></quote>
+<p>If there is more than one backtracking verb in a pattern, a different one that
+follows (*COMMIT) may be triggered first, so merely passing (*COMMIT) during a
+match does not always guarantee that a match must be at this starting point.</p>
-<p>This verb causes the match to fail at the current position if the rest of the
-pattern does not match. If the pattern is unanchored, the normal "bumpalong"
-advance to the next starting character then happens. Backtracking can occur as
-usual to the left of (*PRUNE), or when matching to the right of (*PRUNE), but
-if there is no match to the right, backtracking cannot cross (*PRUNE).
-In simple cases, the use of (*PRUNE) is just an alternative to an atomic
-group or possessive quantifier, but there are some uses of (*PRUNE) that cannot
-be expressed in any other way.</p>
-
-<quote><p> (*SKIP)</p></quote>
-
-<p>This verb is like (*PRUNE), except that if the pattern is unanchored, the
-"bumpalong" advance is not to the next character, but to the position in the
-subject where (*SKIP) was encountered. (*SKIP) signifies that whatever text
-was matched leading up to it cannot be part of a successful match. Consider:</p>
-
-<quote><p> a+(*SKIP)b</p></quote>
+<p>Note that (*COMMIT) at the start of a pattern is not the same as an anchor,
+unless PCRE's start-of-match optimizations are turned off, as shown in this
+ example:</p>
+<code type="none">
+ 1&gt; re:run("xyzabc","(*COMMIT)abc",[{capture,all,list}]).
+ {match,["abc"]}
+ 2&gt; re:run("xyzabc","(*COMMIT)abc",[{capture,all,list},no_start_optimize]).
+ nomatch</code>
+
+<p>PCRE knows that any match must start with "a", so the optimization skips along
+the subject to "a" before running the first match attempt, which succeeds. When
+the optimization is disabled by the <c>no_start_optimize</c> option, the match
+starts at "x" and so the (*COMMIT) causes it to fail without trying any other
+starting points.</p>
+
+<quote><p> (*PRUNE) or (*PRUNE:NAME)</p></quote>
+
+<p>This verb causes the match to fail at the current starting position in the
+subject if there is a later matching failure that causes backtracking to reach
+it. If the pattern is unanchored, the normal "bumpalong" advance to the next
+starting character then happens. Backtracking can occur as usual to the left of
+(*PRUNE), before it is reached, or when matching to the right of (*PRUNE), but
+if there is no match to the right, backtracking cannot cross (*PRUNE). In
+simple cases, the use of (*PRUNE) is just an alternative to an atomic group or
+possessive quantifier, but there are some uses of (*PRUNE) that cannot be
+expressed in any other way. In an anchored pattern (*PRUNE) has the same effect
+as (*COMMIT).</p>
+
+<p>The behaviour of (*PRUNE:NAME) is the not the same as (*MARK:NAME)(*PRUNE).
+It is like (*MARK:NAME) in that the name is remembered for passing back to the
+caller. However, (*SKIP:NAME) searches only for names set with (*MARK).</p>
+
+<warning>
+<p>The fact that (*PRUNE:NAME) remembers the name is useless to the Erlang programmer,
+as names can not be retrieved.</p>
+</warning>
+
+<quote><p> (*SKIP)</p></quote>
+
+<p>This verb, when given without a name, is like (*PRUNE), except that if the
+pattern is unanchored, the "bumpalong" advance is not to the next character,
+but to the position in the subject where (*SKIP) was encountered. (*SKIP)
+signifies that whatever text was matched leading up to it cannot be part of a
+successful match. Consider:</p>
+
+<quote><p> a+(*SKIP)b</p></quote>
<p>If the subject is "aaaac...", after the first match attempt fails (starting at
the first character in the string), the starting point skips on to start the
-next attempt at "c". Note that a possessive quantifier does not have the same
-effect in this example; although it would suppress backtracking during the
+next attempt at "c". Note that a possessive quantifer does not have the same
+effect as this example; although it would suppress backtracking during the
first match attempt, the second attempt would start at the second character
instead of skipping on to "c".</p>
-<quote><p> (*THEN)</p></quote>
+<quote><p> (*SKIP:NAME)</p></quote>
+
+<p>When (*SKIP) has an associated name, its behaviour is modified. When it is
+triggered, the previous path through the pattern is searched for the most
+recent (*MARK) that has the same name. If one is found, the "bumpalong" advance
+is to the subject position that corresponds to that (*MARK) instead of to where
+(*SKIP) was encountered. If no (*MARK) with a matching name is found, the
+(*SKIP) is ignored.</p>
-<p>This verb causes a skip to the next alternation if the rest of the pattern does
-not match. That is, it cancels pending backtracking, but only within the
-current alternation. Its name comes from the observation that it can be used
-for a pattern-based if-then-else block:</p>
+<p>Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It ignores
+names that are set by (*PRUNE:NAME) or (*THEN:NAME).</p>
-<quote><p> ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...</p></quote>
+<quote><p> (*THEN) or (*THEN:NAME)</p></quote>
+
+<p>This verb causes a skip to the next innermost alternative when backtracking
+reaches it. That is, it cancels any further backtracking within the current
+alternative. Its name comes from the observation that it can be used for a
+pattern-based if-then-else block:</p>
+
+<quote><p> ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...</p></quote>
<p>If the COND1 pattern matches, FOO is tried (and possibly further items after
-the end of the group if FOO succeeds); on failure the matcher skips to the
-second alternative and tries COND2, without backtracking into COND1. If (*THEN)
-is used outside of any alternation, it acts exactly like (*PRUNE).</p>
+the end of the group if FOO succeeds); on failure, the matcher skips to the
+second alternative and tries COND2, without backtracking into COND1. If that
+succeeds and BAR fails, COND3 is tried. If subsequently BAZ fails, there are no
+more alternatives, so there is a backtrack to whatever came before the entire
+group. If (*THEN) is not inside an alternation, it acts like (*PRUNE).</p>
+
+<p>The behaviour of (*THEN:NAME) is the not the same as (*MARK:NAME)(*THEN).
+It is like (*MARK:NAME) in that the name is remembered for passing back to the
+caller. However, (*SKIP:NAME) searches only for names set with (*MARK).</p>
+
+<warning>
+<p>The fact that (*THEN:NAME) remembers the name is useless to the Erlang programmer,
+as names can not be retrieved.</p>
+</warning>
+
+<p>A subpattern that does not contain a | character is just a part of the
+enclosing alternative; it is not a nested alternation with only one
+alternative. The effect of (*THEN) extends beyond such a subpattern to the
+enclosing alternative. Consider this pattern, where A, B, etc. are complex
+pattern fragments that do not contain any | characters at this level:</p>
+
+<quote><p> A (B(*THEN)C) | D</p></quote>
+
+<p>If A and B are matched, but there is a failure in C, matching does not
+backtrack into A; instead it moves to the next alternative, that is, D.
+However, if the subpattern containing (*THEN) is given an alternative, it
+behaves differently:</p>
+
+<quote><p> A (B(*THEN)C | (*FAIL)) | D</p></quote>
+
+<p>The effect of (*THEN) is now confined to the inner subpattern. After a failure
+in C, matching moves to (*FAIL), which causes the whole subpattern to fail
+because there are no more alternatives to try. In this case, matching does now
+backtrack into A.</p>
+
+<p>Note that a conditional subpattern is not considered as having two
+alternatives, because only one is ever used. In other words, the | character in
+a conditional subpattern has a different meaning. Ignoring white space,
+consider:</p>
+
+<quote><p> ^.*? (?(?=a) a | b(*THEN)c )</p></quote>
+
+<p>If the subject is "ba", this pattern does not match. Because .*? is ungreedy,
+it initially matches zero characters. The condition (?=a) then fails, the
+character "b" is matched, but "c" is not. At this point, matching does not
+backtrack to .*? as might perhaps be expected from the presence of the |
+character. The conditional subpattern is part of the single alternative that
+comprises the whole pattern, and so the match fails. (If there was a backtrack
+into .*?, allowing it to match "b", the match would succeed.)</p>
+
+<p>The verbs just described provide four different "strengths" of control when
+subsequent matching fails. (*THEN) is the weakest, carrying on the match at the
+next alternative. (*PRUNE) comes next, failing the match at the current
+starting position, but allowing an advance to the next character (for an
+unanchored pattern). (*SKIP) is similar, except that the advance may be more
+than one character. (*COMMIT) is the strongest, causing the entire match to
+fail.</p>
+
+
+<p><em>More than one backtracking verb</em></p>
+
+<p>If more than one backtracking verb is present in a pattern, the one that is
+backtracked onto first acts. For example, consider this pattern, where A, B,
+etc. are complex pattern fragments:</p>
+
+<quote><p> (A(*COMMIT)B(*THEN)C|ABD)</p></quote>
+
+<p>If A matches but B fails, the backtrack to (*COMMIT) causes the entire match to
+fail. However, if A and B match, but C fails, the backtrack to (*THEN) causes
+the next alternative (ABD) to be tried. This behaviour is consistent, but is
+not always the same as Perl's. It means that if two or more backtracking verbs
+appear in succession, all the the last of them has no effect. Consider this
+example:</p>
+
+<quote><p> ...(*COMMIT)(*PRUNE)...</p></quote>
+
+<p>If there is a matching failure to the right, backtracking onto (*PRUNE) cases
+it to be triggered, and its action is taken. There can never be a backtrack
+onto (*COMMIT).</p>
+
+<p><em>Backtracking verbs in repeated groups</em></p>
+
+<p>PCRE differs from Perl in its handling of backtracking verbs in repeated
+groups. For example, consider:</p>
+
+<quote><p> /(a(*COMMIT)b)+ac/</p></quote>
+
+<p>If the subject is "abac", Perl matches, but PCRE fails because the (*COMMIT) in
+the second repeat of the group acts.</p>
+
+<p><em>Backtracking verbs in assertions</em></p>
+
+<p>(*FAIL) in an assertion has its normal effect: it forces an immediate backtrack.</p>
+
+<p>(*ACCEPT) in a positive assertion causes the assertion to succeed without any
+further processing. In a negative assertion, (*ACCEPT) causes the assertion to
+fail without any further processing.</p>
+
+<p>The other backtracking verbs are not treated specially if they appear in a
+positive assertion. In particular, (*THEN) skips to the next alternative in the
+innermost enclosing group that has alternations, whether or not this is within
+the assertion.</p>
+
+<p>Negative assertions are, however, different, in order to ensure that changing a
+positive assertion into a negative assertion changes its result. Backtracking
+into (*COMMIT), (*SKIP), or (*PRUNE) causes a negative assertion to be true,
+without considering any further alternative branches in the assertion.
+Backtracking into (*THEN) causes it to skip to the next enclosing alternative
+within the assertion (the normal behaviour), but if the assertion does not have
+such an alternative, (*THEN) behaves like (*PRUNE).</p>
+
+<p><em>Backtracking verbs in subroutines</em></p>
+
+<p>These behaviours occur whether or not the subpattern is called recursively.
+Perl's treatment of subroutines is different in some cases.</p>
+
+<p>(*FAIL) in a subpattern called as a subroutine has its normal effect: it forces
+an immediate backtrack.</p>
+
+<p>(*ACCEPT) in a subpattern called as a subroutine causes the subroutine match to
+succeed without any further processing. Matching then continues after the
+subroutine call.</p>
+
+<p>(*COMMIT), (*SKIP), and (*PRUNE) in a subpattern called as a subroutine cause
+the subroutine match to fail.</p>
+
+<p>(*THEN) skips to the next alternative in the innermost enclosing group within
+the subpattern that has alternatives. If there is no such group within the
+subpattern, (*THEN) causes the subroutine match to fail.</p>
</section>
diff --git a/lib/stdlib/doc/src/ref_man.xml b/lib/stdlib/doc/src/ref_man.xml
index 0f277f6c5e..6c35578bdf 100644
--- a/lib/stdlib/doc/src/ref_man.xml
+++ b/lib/stdlib/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -68,6 +68,7 @@
<xi:include href="lib.xml"/>
<xi:include href="lists.xml"/>
<xi:include href="log_mf_h.xml"/>
+ <xi:include href="maps.xml"/>
<xi:include href="math.xml"/>
<xi:include href="ms_transform.xml"/>
<xi:include href="orddict.xml"/>
diff --git a/lib/stdlib/doc/src/sets.xml b/lib/stdlib/doc/src/sets.xml
index 071ee437cb..c5b8dce4b7 100644
--- a/lib/stdlib/doc/src/sets.xml
+++ b/lib/stdlib/doc/src/sets.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -45,9 +45,15 @@
<datatypes>
<datatype>
- <name><marker id="type-dict">set()</marker></name>
+ <name name="set" n_vars="1"/>
<desc><p>As returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="set" n_vars="0"/>
+ <desc>
+ <p><c>set()</c> is equivalent to <c>set(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml
index 7f251c863e..3ca80ed900 100644
--- a/lib/stdlib/doc/src/shell.xml
+++ b/lib/stdlib/doc/src/shell.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/shell_default.xml b/lib/stdlib/doc/src/shell_default.xml
index f7e7d5388a..2355ba92f9 100644
--- a/lib/stdlib/doc/src/shell_default.xml
+++ b/lib/stdlib/doc/src/shell_default.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/slave.xml b/lib/stdlib/doc/src/slave.xml
index 15b6711731..f5d0436a20 100644
--- a/lib/stdlib/doc/src/slave.xml
+++ b/lib/stdlib/doc/src/slave.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/sofs.xml b/lib/stdlib/doc/src/sofs.xml
index 37c41501ae..6c97fd0bc0 100644
--- a/lib/stdlib/doc/src/sofs.xml
+++ b/lib/stdlib/doc/src/sofs.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2012</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/specs.xml b/lib/stdlib/doc/src/specs.xml
index 49c60529d2..60a04ed5e7 100644
--- a/lib/stdlib/doc/src/specs.xml
+++ b/lib/stdlib/doc/src/specs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<specs xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../specs/specs_array.xml"/>
<xi:include href="../specs/specs_base64.xml"/>
@@ -34,6 +34,7 @@
<xi:include href="../specs/specs_lib.xml"/>
<xi:include href="../specs/specs_lists.xml"/>
<xi:include href="../specs/specs_log_mf_h.xml"/>
+ <xi:include href="../specs/specs_maps.xml"/>
<xi:include href="../specs/specs_math.xml"/>
<xi:include href="../specs/specs_ms_transform.xml"/>
<xi:include href="../specs/specs_orddict.xml"/>
diff --git a/lib/stdlib/doc/src/stdlib_app.xml b/lib/stdlib/doc/src/stdlib_app.xml
index 2391bb6f03..de4cc65396 100644
--- a/lib/stdlib/doc/src/stdlib_app.xml
+++ b/lib/stdlib/doc/src/stdlib_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
diff --git a/lib/stdlib/doc/src/string.xml b/lib/stdlib/doc/src/string.xml
index 549c871aed..b05d5cbc08 100644
--- a/lib/stdlib/doc/src/string.xml
+++ b/lib/stdlib/doc/src/string.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2012</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -124,6 +124,10 @@
<code type="none">
> tokens("abc defxxghix jkl", "x ").
["abc", "def", "ghi", "jkl"] </code>
+ <p>Note that, as shown in the example above, two or more
+ adjacent separator characters in <c><anno>String</anno></c>
+ will be treated as one. That is, there will not be any empty
+ strings in the resulting list of tokens.</p>
</desc>
</func>
<func>
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index e2c9c14e6a..3a5027d595 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -262,12 +262,12 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
locally as <c>Name</c> using <c>register/2</c>. If
<c><anno>SupName</anno>={global,Name}</c> the supervisor is registered
globally as <c>Name</c> using <c>global:register_name/2</c>. If
- <c><anno>SupName</anno>={via,Module,Name}</c> the supervisor
+ <c><anno>SupName</anno>={via,<anno>Module</anno>,<anno>Name</anno>}</c> the supervisor
is registered as <c>Name</c> using the registry represented by
<c>Module</c>. The <c>Module</c> callback should export the functions
<c>register_name/2</c>, <c>unregister_name/1</c> and <c>send/2</c>,
which should behave like the corresponding functions in <c>global</c>.
- Thus, <c>{via,global,Name}</c> is a valid reference.</p>
+ Thus, <c>{via,global,<anno>Name</anno>}</c> is a valid reference.</p>
<p>If no name is provided, the supervisor is not registered.</p>
<p><c><anno>Module</anno></c> is the name of the callback module.</p>
<p><c><anno>Args</anno></c> is an arbitrary term which is passed as
diff --git a/lib/stdlib/doc/src/supervisor_bridge.xml b/lib/stdlib/doc/src/supervisor_bridge.xml
index f6712d6c1d..d16b258b6c 100644
--- a/lib/stdlib/doc/src/supervisor_bridge.xml
+++ b/lib/stdlib/doc/src/supervisor_bridge.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml
index b66a6b17bd..19605f325b 100644
--- a/lib/stdlib/doc/src/sys.xml
+++ b/lib/stdlib/doc/src/sys.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -115,6 +115,9 @@
<datatype>
<name name="dbg_fun"/>
</datatype>
+ <datatype>
+ <name name="format_fun"/>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -246,6 +249,22 @@
<c>{Module, Id, HandlerState}</c>, where <c>Module</c> is the event handler's module name,
<c>Id</c> is the handler's ID (which is the value <c>false</c> if it was registered without
an ID), and <c>HandlerState</c> is the handler's state.</p>
+ <p>If the callback module exports a <c>system_get_state/1</c> function, it will be called in the
+ target process to get its state. Its argument is the same as the <c>Misc</c> value returned by
+ <seealso marker="#get_status-1">get_status/1,2</seealso>, and the <c>system_get_state/1</c>
+ function is expected to extract the callback module's state from it. The <c>system_get_state/1</c>
+ function must return <c>{ok, State}</c> where <c>State</c> is the callback module's state.</p>
+ <p>If the callback module does not export a <c>system_get_state/1</c> function, <c>get_state/1,2</c>
+ assumes the <c>Misc</c> value is the callback module's state and returns it directly instead.</p>
+ <p>If the callback module's <c>system_get_state/1</c> function crashes or throws an exception, the
+ caller exits with error <c>{callback_failed, {Module, system_get_state}, {Class, Reason}}</c> where
+ <c>Module</c> is the name of the callback module and <c>Class</c> and <c>Reason</c> indicate
+ details of the exception.</p>
+ <p>The <c>system_get_state/1</c> function is primarily useful for user-defined
+ behaviours and modules that implement OTP <seealso marker="#special_process">special
+ processes</seealso>. The <c>gen_server</c>, <c>gen_fsm</c>, and <c>gen_event</c> OTP
+ behaviour modules export this function, and so callback modules for those behaviours
+ need not supply their own.</p>
<p>To obtain more information about a process, including its state, see
<seealso marker="#get_status-1">get_status/1</seealso> and
<seealso marker="#get_status-2">get_status/2</seealso>.</p>
@@ -289,6 +308,28 @@
function means that only the state of the particular event handler it was working on when it
failed or crashed is unchanged; it can still succeed in changing the states of other event
handlers registered in the same <c>gen_event</c> process.</p>
+ <p>If the callback module exports a <c>system_replace_state/2</c> function, it will be called in the
+ target process to replace its state using <c>StateFun</c>. Its two arguments are <c>StateFun</c>
+ and <c>Misc</c>, where <c>Misc</c> is the same as the <c>Misc</c> value returned by
+ <seealso marker="#get_status-1">get_status/1,2</seealso>. A <c>system_replace_state/2</c> function
+ is expected to return <c>{ok, NewState, NewMisc}</c> where <c>NewState</c> is the callback module's
+ new state obtained by calling <c>StateFun</c>, and <c>NewMisc</c> is a possibly new value used to
+ replace the original <c>Misc</c> (required since <c>Misc</c> often contains the callback
+ module's state within it).</p>
+ <p>If the callback module does not export a <c>system_replace_state/2</c> function,
+ <c>replace_state/2,3</c> assumes the <c>Misc</c> value is the callback module's state, passes it
+ to <c>StateFun</c> and uses the return value as both the new state and as the new value of
+ <c>Misc</c>.</p>
+ <p>If the callback module's <c>system_replace_state/2</c> function crashes or throws an exception,
+ the caller exits with error <c>{callback_failed, {Module, system_replace_state}, {Class, Reason}}</c>
+ where <c>Module</c> is the name of the callback module and <c>Class</c> and <c>Reason</c> indicate details
+ of the exception. If the callback module does not provide a <c>system_replace_state/2</c> function and
+ <c>StateFun</c> crashes or throws an exception, the caller exits with error
+ <c>{callback_failed, StateFun, {Class, Reason}}</c>.</p>
+ <p>The <c>system_replace_state/2</c> function is primarily useful for user-defined behaviours and
+ modules that implement OTP <seealso marker="#special_process">special processes</seealso>. The
+ <c>gen_server</c>, <c>gen_fsm</c>, and <c>gen_event</c> OTP behaviour modules export this function,
+ and so callback modules for those behaviours need not supply their own.</p>
</desc>
</func>
<func>
@@ -322,7 +363,7 @@
<section>
<title>Process Implementation Functions</title>
- <p>The following functions are used when implementing a
+ <p><marker id="special_process"/>The following functions are used when implementing a
special process. This is an ordinary process which does not use a
standard behaviour, but a process which understands the standard system messages.</p>
</section>
@@ -375,8 +416,9 @@
process continues the execution, or
<c><anno>Module</anno>:system_terminate(Reason, <anno>Parent</anno>, <anno>Debug</anno>, <anno>Misc</anno>)</c> if
the process should terminate. The <c><anno>Module</anno></c> must export
- <c>system_continue/3</c>, <c>system_terminate/4</c>, and
- <c>system_code_change/4</c> (see below).
+ <c>system_continue/3</c>, <c>system_terminate/4</c>,
+ <c>system_code_change/4</c>, <c>system_get_state/1</c> and
+ <c>system_replace_state/2</c> (see below).
</p>
<p>The <c><anno>Misc</anno></c> argument can be used to save internal data
in a process, for example its state. It is sent to
@@ -444,6 +486,34 @@
defined, the atom <c>undefined</c> is sent.</p>
</desc>
</func>
+ <func>
+ <name>Mod:system_get_state(Misc) -> {ok, State}</name>
+ <fsummary>Called when the process should return its current state</fsummary>
+ <type>
+ <v>Misc = term()</v>
+ <v>State = term()</v>
+ </type>
+ <desc>
+ <p>This function is called from <c>sys:handle_system_msg/6</c> when the process
+ should return a term that reflects its current state. <c>State</c> is the
+ value returned by <c>sys:get_state/2</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name>Mod:system_replace_state(StateFun, Misc) -> {ok, NState, NMisc}</name>
+ <fsummary>Called when the process should replace its current state</fsummary>
+ <type>
+ <v>StateFun = fun((State :: term()) -> NState)</v>
+ <v>Misc = term()</v>
+ <v>NState = term()</v>
+ <v>NMisc = term()</v>
+ </type>
+ <desc>
+ <p>This function is called from <c>sys:handle_system_msg/6</c> when the process
+ should replace its current state. <c>NState</c> is the value returned by
+ <c>sys:replace_state/3</c>.</p>
+ </desc>
+ </func>
</funcs>
</erlref>
diff --git a/lib/stdlib/doc/src/timer.xml b/lib/stdlib/doc/src/timer.xml
index 0c1e398dc4..eca9a72d36 100644
--- a/lib/stdlib/doc/src/timer.xml
+++ b/lib/stdlib/doc/src/timer.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/unicode.xml b/lib/stdlib/doc/src/unicode.xml
index deba6adb11..6f8a289432 100644
--- a/lib/stdlib/doc/src/unicode.xml
+++ b/lib/stdlib/doc/src/unicode.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml
index 1f64b38554..29b8940c62 100644
--- a/lib/stdlib/doc/src/unicode_usage.xml
+++ b/lib/stdlib/doc/src/unicode_usage.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1999</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -41,21 +41,17 @@
future.</p>
<p>The functionality described in EEP10 was implemented in Erlang/OTP
- as of R13A, but that was by no means the end of it. In R14B01 support
+ R13A, but that was by no means the end of it. In Erlang/OTP R14B01 support
for Unicode file names was added, although it was in no way complete
and was by default disabled on platforms where no guarantee was given
- for the file name encoding. With R16A came support for UTF-8 encoded
+ for the file name encoding. With Erlang/OTP R16A came support for UTF-8 encoded
source code, among with enhancements to many of the applications to
support both Unicode encoded file names as well as support for UTF-8
encoded files in several circumstances. Most notable is the support
for UTF-8 in files read by <c>file:consult/1</c>, release handler support
for UTF-8 and more support for Unicode character sets in the
- I/O-system.</p>
-
- <p>In R17, the encoding default for Erlang source files will be
- switched to UTF-8 and in R18 Erlang will support atoms in the full
- Unicode range, meaning full Unicode function and module
- names</p>
+ I/O-system. In Erlang/OTP 17.0, the encoding default for Erlang source files was
+ switched to UTF-8.</p>
<p>This guide outlines the current Unicode support and gives a couple
of recipes for working with Unicode data.</p>
@@ -222,7 +218,7 @@
<tag>Representation</tag>
<item>To handle Unicode characters in Erlang, we have to have a
common representation both in lists and binaries. The EEP (10) and
- the subsequent initial implementation in R13A settled a standard
+ the subsequent initial implementation in Erlang/OTP R13A settled a standard
representation of Unicode characters in Erlang.</item>
<tag>Manipulation</tag>
<item>The Unicode characters need to be processed by the Erlang
@@ -274,9 +270,9 @@
(<c>+fnu</c>) on platforms where this is not the default.</item>
<tag>Source code encoding</tag>
<item>When it comes to the Erlang source code, there is support
- for the UTF-8 encoding and bytewise encoding. The default in R16B
- is bytewise (or latin1) encoding. You can control the encoding by
- a comment like:
+ for the UTF-8 encoding and bytewise encoding. The default in
+ Erlang/OTP R16B was bytewise (or latin1) encoding; in Erlang/OTP 17.0
+ it was changed to UTF-8. You can control the encoding by a comment like:
<code>
%% -*- coding: utf-8 -*-
</code>
@@ -289,8 +285,8 @@
<tag>The language</tag>
<item>Having the source code in UTF-8 also allows you to write
string literals containing Unicode characters with code points &gt;
- 255, although atoms, module names and function names will be
- restricted to the ISO-Latin-1 range until the R18 release. Binary
+ 255, although atoms, module names and function names are
+ restricted to the ISO-Latin-1 range. Binary
literals where you use the <c>/utf8</c> type, can also be
expressed using Unicode characters &gt; 255. Having module names
using characters other than 7-bit ASCII can cause trouble on
@@ -304,7 +300,7 @@
<section>
<title>Standard Unicode Representation</title>
<p>In Erlang, strings are actually lists of integers. A string was
- up until R13 defined to be encoded in the ISO-latin-1 (ISO8859-1)
+ up until Erlang/OTP R13 defined to be encoded in the ISO-latin-1 (ISO8859-1)
character set, which is, code point by code point, a sub-range of
the Unicode character set.</p>
<p>The standard list encoding for strings was therefore easily
@@ -321,7 +317,7 @@
encoding has to be decided upon and the string should be converted
to a binary in the preferred encoding using
<c>unicode:characters_to_binary/{1,2,3}</c>. Strings are not
- generally lists of bytes, as they were before R13. They are lists of
+ generally lists of bytes, as they were before Erlang/OTP R13. They are lists of
characters. Characters are not generally bytes, they are Unicode
code points.</p>
@@ -385,8 +381,7 @@ external_charlist() = maybe_improper_list(char() |
using characters from the ISO-latin-1 character set and atoms are
restricted to the same ISO-latin-1 range. These restrictions in the
language are of course independent of the encoding of the source
- file. Erlang/OTP R18 is expected to handle functions named in
- Unicode as well as Unicode atoms.</p>
+ file.</p>
<section>
<title>Bit-syntax</title>
<p>The bit-syntax contains types for coping with binary data in the
@@ -447,8 +442,8 @@ Bin4 = &lt;&lt;"Hello"/utf16&gt;&gt;,</code>
probably will not appreciate). Another way is to keep it backwards
compatible so that only the ISO-Latin-1 character set is used to
detect a string. A third way would be to let the user decide
- exactly what Unicode ranges are to be viewed as characters. In
- R16B you can select either the whole Unicode range or the
+ exactly what Unicode ranges are to be viewed as characters. Since
+ Erlang/OTP R16B you can select either the whole Unicode range or the
ISO-Latin-1 range by supplying the startup flag <c>+pc
</c><i>Range</i>, where <i>Range</i> is either <c>latin1</c> or
<c>unicode</c>. For backwards compatibility, the default is
@@ -662,11 +657,14 @@ Eshell V5.10.1 (abort with ^G)
containing characters having code points between 128 and 255 may
be named either as plain ISO-latin-1 or using UTF-8 encoding. As
no consistency is enforced, the Erlang VM can do no consistent
- translation of all file names. If the VM would automatically
- select encoding based on heuristics, one could get unexpected
- behavior on these systems. By default, Erlang starts in "latin1"
- file name mode on such systems, meaning bytewise encoding in file
- names. This allows for list representation of all file names in
+ translation of all file names.</p>
+
+ <p>By default on such systems, Erlang starts in <c>utf8</c> file
+ name mode if the terminal supports UTF-8, otherwise in
+ <c>latin1</c> mode.</p>
+
+ <p>In the <c>latin1</c> mode, file names are bytewise endcoded.
+ This allows for list representation of all file names in
the system, but, for example, a file named "Östersund.txt", will
appear in <c>file:list_dir/1</c> as either "Östersund.txt" (if
the file name was encoded in bytewise ISO-Latin-1 by the program
@@ -682,7 +680,7 @@ Eshell V5.10.1 (abort with ^G)
</item>
</taglist>
- <p>The Unicode file naming support was introduced with OTP release
+ <p>The Unicode file naming support was introduced with Erlang/OTP
R14B01. A VM operating in Unicode file name translation mode can
work with files having names in any language or character set (as
long as it is supported by the underlying OS and file system). The
@@ -706,7 +704,7 @@ Eshell V5.10.1 (abort with ^G)
problem even if it uses transparent file naming. Very few systems
have mixed file name encodings. A consistent UTF-8 named system will
work perfectly in Unicode file name mode. It was still however
- considered experimental in R14B01 and is still not the default on
+ considered experimental in Erlang/OTP R14B01 and is still not the default on
such systems. Unicode file name translation is turned on with the
<c>+fnu</c> switch to the On Linux, a VM started without explicitly
stating the file name translation mode will default to <c>latin1</c>
@@ -752,9 +750,9 @@ Eshell V5.10.1 (abort with ^G)
<section>
<title>Notes About Raw File Names</title>
-
+ <marker id="notes-about-raw-filenames"/>
<p>Raw file names were introduced together with Unicode file name
- support in erts-5.8.2 (OTP R14B01). The reason &quot;raw file
+ support in erts-5.8.2 (Erlang/OTP R14B01). The reason &quot;raw file
names&quot; was introduced in the system was to be able to
consistently represent file names given in different encodings on
the same system. Having the VM automatically translate a file name
@@ -795,10 +793,10 @@ Eshell V5.10.1 (abort with ^G)
the argument as a binary.</p>
<p>To force Unicode file name translation mode on systems where this
- is not the default was considered experimental in OTP R14B01 due to
+ is not the default was considered experimental in Erlang/OTP R14B01 due to
the fact that the initial implementation did not ignore wrongly
encoded file names, so that raw file names could spread unexpectedly
- throughout the system. Beginning with R16B, the wrongly encoded file
+ throughout the system. Beginning with Erlang/OTP R16B, the wrongly encoded file
names are only retrieved by special functions
(e.g. <c>file:list_dir_all/1</c>), so the impact on existing code is
much lower, why it is now supported. Unicode file name translation
@@ -845,6 +843,7 @@ Eshell V5.10.1 (abort with ^G)
</section>
<section>
<title>Unicode in Environment and Parameters</title>
+ <marker id="unicode_in_environment_and_parameters"/>
<p>Environment variables and their interpretation is handled much in
the same way as file names. If Unicode file names are enabled,
environment variables as well as parameters to the Erlang VM are
@@ -993,7 +992,8 @@ ok
</pre>
</section>
<section>
- <title><marker id="unicode_options_summary"/>Summary of Options</title>
+ <title>Summary of Options</title>
+ <marker id="unicode_options_summary"/>
<p>The Unicode support is controlled by both command line switches,
some standard environment variables and the version of OTP you are
using. Most options affect mainly the way Unicode data is displayed,
@@ -1014,7 +1014,8 @@ ok
allowed. This setting should correspond to the actual terminal
you are using.</p>
<p>The environment can also affect file name interpretation, if
- Erlang is started with the <c>+fna</c> flag.</p>
+ Erlang is started with the <c>+fna</c> flag (which is default from
+ Erlang/OTP 17.0).</p>
<p>You can check the setting of this by calling
<c>io:getopts()</c>, which will give you an option list
containing <c>{encoding,unicode}</c> or
@@ -1028,7 +1029,7 @@ ok
<c>io</c>/<c>io_lib:format</c> with the <c>"~tp"</c> and
<c>~tP</c> formatting instructions, as described above.</p>
<p>You can check this option by calling io:printable_range/0,
- which in R16B will return <c>unicode</c> or <c>latin1</c>. To be
+ which will return <c>unicode</c> or <c>latin1</c>. To be
compatible with future (expected) extensions to the settings,
one should rather use <c>io_lib:printable_list/1</c> to check if
a list is printable according to the setting. That function will
@@ -1046,8 +1047,7 @@ ok
&gt; 255.</p>
<p><c>+fnl</c> means bytewise interpretation of file names, which
was the usual way to represent ISO-Latin-1 file names before
- UTF-8 file naming got widespread. This is the default on all
- Unix-like operating systems except MacOS X.</p>
+ UTF-8 file naming got widespread.</p>
<p><c>+fnu</c> means that file names are encoded in UTF-8, which
is nowadays the common scheme (although not enforced).</p>
<p><c>+fna</c> means that you automatically select between
@@ -1055,8 +1055,8 @@ ok
<c>LC_CTYPE</c> environment variables. This is optimistic
heuristics indeed, nothing enforces a user to have a terminal
with the same encoding as the file system, but usually, this is
- the case. This might be the default behavior in a future
- release.</p>
+ the case. This is the default on all Unix-like operating
+ systems except MacOS X.</p>
<p>The file name translation mode can be read with the
<c>file:native_name_encoding/0</c> function, which returns
@@ -1067,8 +1067,8 @@ ok
<item>
<p>This function returns the default encoding for Erlang source
files (if no encoding comment is present) in the currently
- running release. For R16 this returns <c>latin1</c> (meaning
- bytewise encoding). In R17 and forward it is expected to return
+ running release. In Erlang/OTP R16B <c>latin1</c> was returned (meaning
+ bytewise encoding). In Erlang/OTP 17.0 and forward it returns
<c>utf8</c>.</p>
<p>The encoding of each file can be specified using comments as
described in
diff --git a/lib/stdlib/doc/src/win32reg.xml b/lib/stdlib/doc/src/win32reg.xml
index 99fd7fdeb6..8835f931b2 100644
--- a/lib/stdlib/doc/src/win32reg.xml
+++ b/lib/stdlib/doc/src/win32reg.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/stdlib/doc/src/zip.xml b/lib/stdlib/doc/src/zip.xml
index 484bf0e080..48b376743d 100644
--- a/lib/stdlib/doc/src/zip.xml
+++ b/lib/stdlib/doc/src/zip.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -123,6 +123,18 @@
</taglist>
</desc>
</datatype>
+ <datatype>
+ <name name="filename"/>
+ <p>The name of a zip file.</p>
+ </datatype>
+ <datatype><name name="extension"/></datatype>
+ <datatype><name name="extension_spec"/></datatype>
+ <datatype>
+ <name name="create_option"/>
+ <desc>
+ <p>These options are described in <seealso marker="#zip_options">create/3</seealso>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -160,6 +172,7 @@
set to <c>["gif", "jpg"]</c> and <c>uncompress</c> is set to
<c>["jpg"]</c>, only files with <c>"gif"</c> as extension will
be compressed. No other files will be compressed.</p>
+ <marker id="zip_options"></marker>
<p>The following options are available:</p>
<taglist>
<tag><c>cooked</c></tag>
diff --git a/lib/stdlib/examples/erl_id_trans.erl b/lib/stdlib/examples/erl_id_trans.erl
index 51def8c8e1..e71e26e51a 100644
--- a/lib/stdlib/examples/erl_id_trans.erl
+++ b/lib/stdlib/examples/erl_id_trans.erl
@@ -144,6 +144,13 @@ pattern({cons,Line,H0,T0}) ->
pattern({tuple,Line,Ps0}) ->
Ps1 = pattern_list(Ps0),
{tuple,Line,Ps1};
+pattern({map,Line,Ps0}) ->
+ Ps1 = pattern_list(Ps0),
+ {map,Line,Ps1};
+pattern({map_field_exact,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = pattern(V),
+ {map_field_exact,Line,Ke,Ve};
%%pattern({struct,Line,Tag,Ps0}) ->
%% Ps1 = pattern_list(Ps0),
%% {struct,Line,Tag,Ps1};
@@ -251,6 +258,20 @@ gexpr({float,Line,F}) -> {float,Line,F};
gexpr({atom,Line,A}) -> {atom,Line,A};
gexpr({string,Line,S}) -> {string,Line,S};
gexpr({nil,Line}) -> {nil,Line};
+gexpr({map,Line,Map0,Es0}) ->
+ [Map1|Es1] = gexpr_list([Map0|Es0]),
+ {map,Line,Map1,Es1};
+gexpr({map,Line,Es0}) ->
+ Es1 = gexpr_list(Es0),
+ {map,Line,Es1};
+gexpr({map_field_assoc,Line,K,V}) ->
+ Ke = gexpr(K),
+ Ve = gexpr(V),
+ {map_field_assoc,Line,Ke,Ve};
+gexpr({map_field_exact,Line,K,V}) ->
+ Ke = gexpr(K),
+ Ve = gexpr(V),
+ {map_field_exact,Line,Ke,Ve};
gexpr({cons,Line,H0,T0}) ->
H1 = gexpr(H0),
T1 = gexpr(T0), %They see the same variables
@@ -356,6 +377,20 @@ expr({bc,Line,E0,Qs0}) ->
expr({tuple,Line,Es0}) ->
Es1 = expr_list(Es0),
{tuple,Line,Es1};
+expr({map,Line,Map0,Es0}) ->
+ [Map1|Es1] = exprs([Map0|Es0]),
+ {map,Line,Map1,Es1};
+expr({map,Line,Es0}) ->
+ Es1 = exprs(Es0),
+ {map,Line,Es1};
+expr({map_field_assoc,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = expr(V),
+ {map_field_assoc,Line,Ke,Ve};
+expr({map_field_exact,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = expr(V),
+ {map_field_exact,Line,Ke,Ve};
%%expr({struct,Line,Tag,Es0}) ->
%% Es1 = pattern_list(Es0),
%% {struct,Line,Tag,Es1};
@@ -419,6 +454,8 @@ expr({'fun',Line,Body}) ->
A = expr(A0),
{'fun',Line,{function,M,F,A}}
end;
+expr({named_fun,Loc,Name,Cs}) ->
+ {named_fun,Loc,Name,fun_clauses(Cs)};
expr({call,Line,F0,As0}) ->
%% N.B. If F an atom then call to local function or BIF, if F a
%% remote structure (see below) then call to other module,
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
index f3387d669b..9ab2cd4134 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
@@ -91,6 +91,7 @@ MODULES= \
lib \
lists \
log_mf_h \
+ maps \
math \
ms_transform \
otp_internal \
diff --git a/lib/stdlib/src/array.erl b/lib/stdlib/src/array.erl
index 2f69e2b0a4..10d2ccea45 100644
--- a/lib/stdlib/src/array.erl
+++ b/lib/stdlib/src/array.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -86,6 +86,8 @@
foldr/3, sparse_foldl/3, sparse_foldr/3, fix/1, relax/1, is_fix/1,
resize/1, resize/2]).
+-export_type([array/0, array/1]).
+
%%-define(TEST,1).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
@@ -144,18 +146,28 @@
%%--------------------------------------------------------------------------
+-type element_tuple(T) ::
+ {T, T, T, T, T, T, T, T, T, T}
+ | {element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), non_neg_integer()}.
+
+-type elements(T) :: non_neg_integer()
+ | element_tuple(T)
+ | nil(). % kill reference, for GC
+
-record(array, {size :: non_neg_integer(), %% number of defined entries
max :: non_neg_integer(), %% maximum number of entries
%% in current tree
default, %% the default value (usually 'undefined')
- elements %% the tuple tree
+ elements :: elements(_) %% the tuple tree
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #array{}
-%% structure and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque array() :: #array{}.
+
+-opaque array() :: array(term()).
+
+-opaque array(Type) ::
+ #array{default :: Type, elements :: elements(Type)}.
%%
%% Types
@@ -164,13 +176,13 @@
-type array_indx() :: non_neg_integer().
-type array_opt() :: {'fixed', boolean()} | 'fixed'
- | {'default', Value :: term()}
+ | {'default', Type :: term()}
| {'size', N :: non_neg_integer()}
| (N :: non_neg_integer()).
-type array_opts() :: array_opt() | [array_opt()].
--type indx_pair() :: {Index :: array_indx(), Value :: term()}.
--type indx_pairs() :: [indx_pair()].
+-type indx_pair(Type) :: {Index :: array_indx(), Type}.
+-type indx_pairs(Type) :: [indx_pair(Type)].
%%--------------------------------------------------------------------------
@@ -321,7 +333,7 @@ size(_) -> erlang:error(badarg).
%%
%% @see new/2
--spec default(Array :: array()) -> term().
+-spec default(Array :: array(Type)) -> Value :: Type.
default(#array{default = D}) -> D;
default(_) -> erlang:error(badarg).
@@ -404,7 +416,7 @@ new_test_() ->
%% automatically upon insertion; see also {@link set/3}.
%% @see relax/1
--spec fix(Array :: array()) -> array().
+-spec fix(Array :: array(Type)) -> array(Type).
fix(#array{}=A) ->
A#array{max = 0}.
@@ -452,7 +464,7 @@ fix_test_() ->
%% fix/1}.)
%% @see fix/1
--spec relax(Array :: array()) -> array().
+-spec relax(Array :: array(Type)) -> array(Type).
relax(#array{size = N}=A) ->
A#array{max = find_max(N-1, ?LEAFSIZE)}.
@@ -477,7 +489,8 @@ relax_test_() ->
%% integer, the call fails with reason `badarg'. If the given array has
%% fixed size, the resulting array will also have fixed size.
--spec resize(Size :: non_neg_integer(), Array :: array()) -> array().
+-spec resize(Size :: non_neg_integer(), Array :: array(Type)) ->
+ array(Type).
resize(Size, #array{size = N, max = M, elements = E}=A)
when is_integer(Size), Size >= 0 ->
@@ -508,7 +521,7 @@ resize(_Size, _) ->
%% @see resize/2
%% @see sparse_size/1
--spec resize(Array :: array()) -> array().
+-spec resize(Array :: array(Type)) -> array(Type).
resize(Array) ->
resize(sparse_size(Array), Array).
@@ -558,7 +571,7 @@ resize_test_() ->
%% @see get/2
%% @see reset/2
--spec set(I :: array_indx(), Value :: term(), Array :: array()) -> array().
+-spec set(I :: array_indx(), Value :: Type, Array :: array(Type)) -> array(Type).
set(I, Value, #array{size = N, max = M, default = D, elements = E}=A)
when is_integer(I), I >= 0 ->
@@ -621,7 +634,7 @@ expand(I, _S, X, D) ->
%% @see set/3
--spec get(I :: array_indx(), Array :: array()) -> term().
+-spec get(I :: array_indx(), Array :: array(Type)) -> Value :: Type.
get(I, #array{size = N, max = M, elements = E, default = D})
when is_integer(I), I >= 0 ->
@@ -661,7 +674,7 @@ get_1(I, E, _D) ->
%% TODO: a reset_range function
--spec reset(I :: array_indx(), Array :: array()) -> array().
+-spec reset(I :: array_indx(), Array :: array(Type)) -> array(Type).
reset(I, #array{size = N, max = M, default = D, elements = E}=A)
when is_integer(I), I >= 0 ->
@@ -747,7 +760,7 @@ set_get_test_() ->
%% @see from_list/2
%% @see sparse_to_list/1
--spec to_list(Array :: array()) -> list().
+-spec to_list(Array :: array(Type)) -> list(Value :: Type).
to_list(#array{size = 0}) ->
[];
@@ -820,7 +833,7 @@ to_list_test_() ->
%%
%% @see to_list/1
--spec sparse_to_list(Array :: array()) -> list().
+-spec sparse_to_list(Array :: array(Type)) -> list(Value :: Type).
sparse_to_list(#array{size = 0}) ->
[];
@@ -887,7 +900,7 @@ sparse_to_list_test_() ->
%% @equiv from_list(List, undefined)
--spec from_list(List :: list()) -> array().
+-spec from_list(List :: list(Value :: Type)) -> array(Type).
from_list(List) ->
from_list(List, undefined).
@@ -899,7 +912,7 @@ from_list(List) ->
%% @see new/2
%% @see to_list/1
--spec from_list(List :: list(), Default :: term()) -> array().
+-spec from_list(List :: list(Value :: Type), Default :: term()) -> array(Type).
from_list([], Default) ->
new({default,Default});
@@ -998,7 +1011,7 @@ from_list_test_() ->
%% @see from_orddict/2
%% @see sparse_to_orddict/1
--spec to_orddict(Array :: array()) -> indx_pairs().
+-spec to_orddict(Array :: array(Type)) -> indx_pairs(Value :: Type).
to_orddict(#array{size = 0}) ->
[];
@@ -1035,16 +1048,16 @@ to_orddict_3(N, R, D, L, E, S) ->
to_orddict_2(element(N, E), R, D, L),
E, S).
--spec push_pairs(non_neg_integer(), array_indx(), term(), indx_pairs()) ->
- indx_pairs().
+-spec push_pairs(non_neg_integer(), array_indx(), term(), indx_pairs(Type)) ->
+ indx_pairs(Type).
push_pairs(0, _I, _E, L) ->
L;
push_pairs(N, I, E, L) ->
push_pairs(N-1, I-1, E, [{I, E} | L]).
--spec push_tuple_pairs(non_neg_integer(), array_indx(), term(), indx_pairs()) ->
- indx_pairs().
+-spec push_tuple_pairs(non_neg_integer(), array_indx(), term(), indx_pairs(Type)) ->
+ indx_pairs(Type).
push_tuple_pairs(0, _I, _T, L) ->
L;
@@ -1090,7 +1103,7 @@ to_orddict_test_() ->
%%
%% @see to_orddict/1
--spec sparse_to_orddict(Array :: array()) -> indx_pairs().
+-spec sparse_to_orddict(Array :: array(Type)) -> indx_pairs(Value :: Type).
sparse_to_orddict(#array{size = 0}) ->
[];
@@ -1128,7 +1141,7 @@ sparse_to_orddict_3(N, R, D, L, E, S) ->
E, S).
-spec sparse_push_tuple_pairs(non_neg_integer(), array_indx(),
- _, _, indx_pairs()) -> indx_pairs().
+ _, _, indx_pairs(Type)) -> indx_pairs(Type).
sparse_push_tuple_pairs(0, _I, _D, _T, L) ->
L;
@@ -1170,7 +1183,7 @@ sparse_to_orddict_test_() ->
%% @equiv from_orddict(Orddict, undefined)
--spec from_orddict(Orddict :: indx_pairs()) -> array().
+-spec from_orddict(Orddict :: indx_pairs(Value :: Type)) -> array(Type).
from_orddict(Orddict) ->
from_orddict(Orddict, undefined).
@@ -1184,7 +1197,8 @@ from_orddict(Orddict) ->
%% @see new/2
%% @see to_orddict/1
--spec from_orddict(Orddict :: indx_pairs(), Default :: term()) -> array().
+-spec from_orddict(Orddict :: indx_pairs(Value :: Type), Default :: Type) ->
+ array(Type).
from_orddict([], Default) ->
new({default,Default});
@@ -1379,8 +1393,8 @@ from_orddict_test_() ->
%% @see foldr/3
%% @see sparse_map/2
--spec map(Function, Array :: array()) -> array() when
- Function :: fun((Index :: array_indx(), Value :: _) -> _).
+-spec map(Function, Array :: array(Type1)) -> array(Type2) when
+ Function :: fun((Index :: array_indx(), Type1) -> Type2).
map(Function, Array=#array{size = N, elements = E, default = D})
when is_function(Function, 2) ->
@@ -1471,8 +1485,8 @@ map_test_() ->
%%
%% @see map/2
--spec sparse_map(Function, Array :: array()) -> array() when
- Function :: fun((Index :: array_indx(), Value :: _) -> _).
+-spec sparse_map(Function, Array :: array(Type1)) -> array(Type2) when
+ Function :: fun((Index :: array_indx(), Type1) -> Type2).
sparse_map(Function, Array=#array{size = N, elements = E, default = D})
when is_function(Function, 2) ->
@@ -1567,8 +1581,8 @@ sparse_map_test_() ->
%% @see map/2
%% @see sparse_foldl/3
--spec foldl(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec foldl(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
foldl(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1640,8 +1654,8 @@ foldl_test_() ->
%% @see foldl/3
%% @see sparse_foldr/3
--spec sparse_foldl(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec sparse_foldl(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
sparse_foldl(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1717,8 +1731,8 @@ sparse_foldl_test_() ->
%% @see foldl/3
%% @see map/2
--spec foldr(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec foldr(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
foldr(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1796,8 +1810,8 @@ foldr_test_() ->
%% @see foldr/3
%% @see sparse_foldl/3
--spec sparse_foldr(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec sparse_foldr(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
sparse_foldr(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
diff --git a/lib/stdlib/src/beam_lib.erl b/lib/stdlib/src/beam_lib.erl
index 121f9febed..1a7b7d5a5e 100644
--- a/lib/stdlib/src/beam_lib.erl
+++ b/lib/stdlib/src/beam_lib.erl
@@ -904,7 +904,7 @@ call_crypto_server(Req) ->
end.
call_crypto_server_1(Req) ->
- gen_server:start({local,?CRYPTO_KEY_SERVER}, ?MODULE, [], []),
+ {ok, _} = gen_server:start({local,?CRYPTO_KEY_SERVER}, ?MODULE, [], []),
erlang:yield(),
call_crypto_server(Req).
diff --git a/lib/stdlib/src/binary.erl b/lib/stdlib/src/binary.erl
index 4850a59eb6..8d07a356dd 100644
--- a/lib/stdlib/src/binary.erl
+++ b/lib/stdlib/src/binary.erl
@@ -89,9 +89,9 @@ copy(_, _) ->
decode_unsigned(_) ->
erlang:nif_error(undef).
--spec decode_unsigned(Subject, Endianess) -> Unsigned when
+-spec decode_unsigned(Subject, Endianness) -> Unsigned when
Subject :: binary(),
- Endianess :: big | little,
+ Endianness :: big | little,
Unsigned :: non_neg_integer().
decode_unsigned(_, _) ->
@@ -103,9 +103,9 @@ decode_unsigned(_, _) ->
encode_unsigned(_) ->
erlang:nif_error(undef).
--spec encode_unsigned(Unsigned, Endianess) -> binary() when
+-spec encode_unsigned(Unsigned, Endianness) -> binary() when
Unsigned :: non_neg_integer(),
- Endianess :: big | little.
+ Endianness :: big | little.
encode_unsigned(_, _) ->
erlang:nif_error(undef).
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index 6e96e3d564..9860adf04d 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -330,13 +330,18 @@ choice(F) ->
end.
get_line(P, Default) ->
- case io:get_line(P) of
+ case line_string(io:get_line(P)) of
"\n" ->
Default;
L ->
L
end.
+%% If the standard input is set to binary mode
+%% convert it to a list so we can properly match.
+line_string(Binary) when is_binary(Binary) -> unicode:characters_to_list(Binary);
+line_string(Other) -> Other.
+
mfa_string(Fun) when is_function(Fun) ->
{module,M} = erlang:fun_info(Fun, module),
{name,F} = erlang:fun_info(Fun, name),
@@ -450,7 +455,7 @@ m() ->
foreach(fun ({Mod,File}) -> mformat(Mod, File) end, sort(code:all_loaded())).
mformat(A1, A2) ->
- format("~-20s ~s\n", [A1,A2]).
+ format("~-20s ~ts\n", [A1,A2]).
%% erlangrc(Home)
%% Try to run a ".erlang" file, first in the current directory
@@ -504,9 +509,12 @@ m(M) ->
{exports,E} = lists:keyfind(exports, 1, L),
Time = get_compile_time(L),
COpts = get_compile_options(L),
- format("Module ~w compiled: ",[M]), print_time(Time),
- format("Compiler options: ~p~n", [COpts]),
+ format("Module: ~w~n", [M]),
+ print_md5(L),
+ format("Compiled: "),
+ print_time(Time),
print_object_file(M),
+ format("Compiler options: ~p~n", [COpts]),
format("Exports: ~n",[]), print_exports(keysort(1, E)).
print_object_file(Mod) ->
@@ -517,6 +525,12 @@ print_object_file(Mod) ->
ignore
end.
+print_md5(L) ->
+ case lists:keyfind(md5, 1, L) of
+ {md5,<<MD5:128>>} -> io:format("MD5: ~.16b~n",[MD5]);
+ _ -> ok
+ end.
+
get_compile_time(L) ->
case get_compile_info(L, time) of
{ok,Val} -> Val;
@@ -564,8 +578,8 @@ split_print_exports([{F1, A1}|T1], [{F2, A2} | T2]) ->
split_print_exports([], []) -> ok.
print_time({Year,Month,Day,Hour,Min,_Secs}) ->
- format("Date: ~s ~w ~w, ", [month(Month),Day,Year]),
- format("Time: ~.2.0w.~.2.0w~n", [Hour,Min]);
+ format("~s ~w ~w, ", [month(Month),Day,Year]),
+ format("~.2.0w:~.2.0w~n", [Hour,Min]);
print_time(notime) ->
format("No compile time info available~n",[]).
@@ -694,7 +708,7 @@ pwd() ->
Dir :: file:name().
cd(Dir) ->
- file:set_cwd(Dir),
+ _ = file:set_cwd(Dir),
pwd().
%% ls()
@@ -716,7 +730,7 @@ ls(Dir) ->
{error, enotdir} ->
ls_print([Dir]);
{error, Error} ->
- format("~s\n", [file:format_error(Error)])
+ format("~ts\n", [file:format_error(Error)])
end.
ls_print([]) -> ok;
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl
index 68b157c13c..a4bd45ea19 100644
--- a/lib/stdlib/src/dets.erl
+++ b/lib/stdlib/src/dets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -440,9 +440,10 @@ insert(Tab, Objs) when is_list(Objs) ->
insert(Tab, Obj) ->
badarg(treq(Tab, {insert, [Obj]}), [Tab, Obj]).
--spec insert_new(Name, Objects) -> boolean() when
+-spec insert_new(Name, Objects) -> boolean() | {'error', Reason} when
Name :: tab_name(),
- Objects :: object() | [object()].
+ Objects :: object() | [object()],
+ Reason :: term().
insert_new(Tab, Objs) when is_list(Objs) ->
badarg(treq(Tab, {insert_new, Objs}), [Tab, Objs]);
@@ -469,7 +470,7 @@ is_compatible_bchunk_format(Tab, Term) ->
is_dets_file(FileName) ->
case catch read_file_header(FileName, read, false) of
{ok, Fd, FH} ->
- file:close(Fd),
+ _ = file:close(Fd),
FH#fileheader.cookie =:= ?MAGIC;
{error, {tooshort, _}} ->
false;
@@ -1384,7 +1385,8 @@ do_apply_op(Op, From, Head, N) ->
end,
if
From =/= self() ->
- From ! {self(), {error, {dets_bug, Name, Op, Bad}}};
+ From ! {self(), {error, {dets_bug, Name, Op, Bad}}},
+ ok;
true -> % auto_save | may_grow | {delayed_write, _}
ok
end,
@@ -1634,7 +1636,8 @@ start_auto_save_timer(Head) when Head#head.auto_save =:= infinity ->
ok;
start_auto_save_timer(Head) ->
Millis = Head#head.auto_save,
- erlang:send_after(Millis, self(), ?DETS_CALL(self(), auto_save)).
+ _Ref = erlang:send_after(Millis, self(), ?DETS_CALL(self(), auto_save)),
+ ok.
%% Version 9: Peek the message queue and try to evaluate several
%% lookup requests in parallel. Evalute delete_object, delete and
@@ -1683,7 +1686,7 @@ stream_end(Head, Pids0, C, N, Next) ->
%% replies to delete and insert requests even if the
%% latter requests were made before the lookup requests,
%% which can be confusing.)
- lookup_replies(Found),
+ _ = lookup_replies(Found),
stream_end1(Pids0, Next, N, C, Head1, PwriteList);
Head1 when is_record(Head1, head) ->
stream_end2(Pids0, Pids0, Next, N, C, Head1, ok);
@@ -1733,7 +1736,7 @@ lookup_replies(Q) ->
lookup_replies(P, O, []) ->
lookup_reply(P, O);
lookup_replies(P, O, [{P2,O2} | L]) ->
- lookup_reply(P, O),
+ _ = lookup_reply(P, O),
lookup_replies(P2, lists:append(O2), L).
%% If a list of Pid then op was {member, Key}. Inlined.
@@ -1783,6 +1786,7 @@ read_file_header(FileName, Access, RamFile) ->
Version =:= 9 ->
dets_v9:read_file_header(Fd, FileName);
true ->
+ _ = file:close(Fd),
throw({error, {not_a_dets_file, FileName}})
end.
@@ -1790,12 +1794,15 @@ fclose(Head) ->
{Head1, Res} = perform_save(Head, false),
case Head1#head.ram_file of
true ->
- ignore;
+ Res;
false ->
dets_utils:stop_disk_map(),
- file:close(Head1#head.fptr)
- end,
- Res.
+ Res2 = file:close(Head1#head.fptr),
+ if
+ Res2 =:= ok -> Res;
+ true -> Res2
+ end
+ end.
%% -> {NewHead, Res}
perform_save(Head, DoSync) when Head#head.update_mode =:= dirty;
@@ -2002,7 +2009,7 @@ remove_fix(Head, Pid, How) ->
end.
do_stop(Head) ->
- unlink_fixing_procs(Head),
+ _NewHead = unlink_fixing_procs(Head),
fclose(Head).
unlink_fixing_procs(Head) ->
@@ -2010,7 +2017,7 @@ unlink_fixing_procs(Head) ->
false ->
Head;
{_, Counters} ->
- lists:map(fun({Pid, _Counter}) -> unlink(Pid) end, Counters),
+ lists:foreach(fun({Pid, _Counter}) -> unlink(Pid) end, Counters),
Head#head{fixed = false,
freelists = dets_utils:get_freelists(Head)}
end.
@@ -2021,8 +2028,9 @@ check_growth(Head) ->
NoThings = no_things(Head),
if
NoThings > Head#head.next ->
- erlang:send_after(200, self(),
- ?DETS_CALL(self(), may_grow)); % Catch up.
+ _Ref = erlang:send_after
+ (200, self(), ?DETS_CALL(self(), may_grow)), % Catch up.
+ ok;
true ->
ok
end.
@@ -2107,6 +2115,8 @@ test_bchunk_format(Head, Term) ->
do_open_file([Fname, Verbose], Parent, Server, Ref) ->
case catch fopen2(Fname, Ref) of
+ {error, {tooshort, _}} ->
+ err({error, {not_a_dets_file, Fname}});
{error, _Reason} = Error ->
err(Error);
{ok, Head} ->
@@ -2120,11 +2130,10 @@ do_open_file([Fname, Verbose], Parent, Server, Ref) ->
[Bad]),
{error, {dets_bug, Fname, Bad}}
end;
-do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref) ->
+do_open_file([Tab, OpenArgs, Verb], Parent, Server, _Ref) ->
case catch fopen3(Tab, OpenArgs) of
{error, {tooshort, _}} ->
- file:delete(OpenArgs#open_args.file),
- do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref);
+ err({error, {not_a_dets_file, OpenArgs#open_args.file}});
{error, _Reason} = Error ->
err(Error);
{ok, Head} ->
@@ -2480,7 +2489,6 @@ fopen2(Fname, Tab) ->
{ok, _} ->
Acc = read_write,
Ram = false,
- %% Fd is not always closed upon error, but exit is soon called.
{ok, Fd, FH} = read_file_header(Fname, Acc, Ram),
Mod = FH#fileheader.mod,
Do = case Mod:check_file_header(FH, Fd) of
@@ -2536,7 +2544,6 @@ fopen_existing_file(Tab, OpenArgs) ->
ram_file = Ram, delayed_write = CacheSz, auto_save =
Auto, access = Acc, version = Version, debug = Debug} =
OpenArgs,
- %% Fd is not always closed upon error, but exit is soon called.
{ok, Fd, FH} = read_file_header(Fname, Acc, Ram),
V9 = (Version =:= 9) or (Version =:= default),
MinF = (MinSlots =:= default) or (MinSlots =:= FH#fileheader.min_no_slots),
@@ -2671,11 +2678,11 @@ fopen_init_file(Tab, OpenArgs) ->
case catch Mod:initiate_file(Fd, Tab, Fname, Type, Kp, MinSlots, MaxSlots,
Ram, CacheSz, Auto, true) of
{error, Reason} when Ram ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, Reason});
{error, Reason} ->
- file:close(Fd),
- file:delete(Fname),
+ _ = file:close(Fd),
+ _ = file:delete(Fname),
throw({error, Reason});
{ok, Head} ->
start_auto_save_timer(Head),
@@ -2730,8 +2737,8 @@ compact(SourceHead) ->
{ok, H} ->
H;
Error ->
- file:close(Fd),
- file:delete(Tmp),
+ _ = file:close(Fd),
+ _ = file:delete(Tmp),
throw(Error)
end,
@@ -2748,12 +2755,12 @@ compact(SourceHead) ->
if
R =:= ok -> ok;
true ->
- file:delete(Tmp),
+ _ = file:delete(Tmp),
throw(R)
end;
Err ->
- file:close(Fd),
- file:delete(Tmp),
+ _ = file:close(Fd),
+ _ = file:delete(Tmp),
throw(Err)
end.
@@ -2777,7 +2784,7 @@ fsck(Fd, Tab, Fname, FH, MinSlotsArg, MaxSlotsArg, Version) ->
BetterSlotNumbers = {MinSlots, BetterNoSlots, MaxSlots},
case fsck_try(Fd, Tab, FH, Fname, BetterSlotNumbers, Version) of
{try_again, _} ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {cannot_repair, Fname}};
Else ->
Else
@@ -2818,31 +2825,36 @@ fsck_try(Fd, Tab, FH, Fname, SlotNumbers, Version) ->
if
R =:= ok -> ok;
true ->
- file:delete(Tmp),
+ _ = file:delete(Tmp),
R
end;
TryAgainOrError ->
- file:delete(Tmp),
+ _ = file:delete(Tmp),
TryAgainOrError
end;
Error ->
- file:close(Fd),
+ _ = file:close(Fd),
Error
end.
tempfile(Fname) ->
Tmp = lists:concat([Fname, ".TMP"]),
- tempfile(Tmp, 10).
-
-tempfile(Tmp, 0) ->
- Tmp;
-tempfile(Tmp, N) ->
case file:delete(Tmp) of
- {error, eacces} -> % 'dets_process_died' happened anyway... (W-nd-ws)
- timer:sleep(1000),
- tempfile(Tmp, N-1);
- _ ->
- Tmp
+ {error, _Reason} -> % typically enoent
+ ok;
+ ok ->
+ assure_no_file(Tmp)
+ end,
+ Tmp.
+
+assure_no_file(File) ->
+ case file:read_file_info(File) of
+ {ok, _FileInfo} ->
+ %% Wait for some other process to close the file:
+ timer:sleep(100),
+ assure_no_file(File);
+ {error, _} ->
+ ok
end.
%% -> {ok, NewHead} | {try_again, integer()} | Error
@@ -2855,13 +2867,13 @@ fsck_try_est(Head, Fd, Fname, SlotNumbers, FH) ->
Bulk = false,
case Reply of
{ok, NoDups, H1} ->
- file:close(Fd),
+ _ = file:close(Fd),
fsck_copy(SizeData, H1, Bulk, NoDups);
{try_again, _} = Return ->
close_files(Bulk, SizeData, Head),
Return;
Else ->
- file:close(Fd),
+ _ = file:close(Fd),
close_files(Bulk, SizeData, Head),
Else
end.
@@ -2896,14 +2908,20 @@ fsck_copy1([SzData | L], Head, Bulk, NoDups) ->
{LogSz, Pos, {FileName, Fd}, NoObjects} = SzData,
Size = if NoObjects =:= 0 -> 0; true -> ?POW(LogSz-1) end,
ExpectedSize = Size * NoObjects,
- close_tmp(Fd),
- case file:position(Out, Pos) of
- {ok, Pos} -> ok;
- PError -> dets_utils:file_error(FileName, PError)
+ case close_tmp(Fd) of
+ ok -> ok;
+ Err ->
+ close_files(Bulk, L, Head),
+ dets_utils:file_error(FileName, Err)
end,
- {ok, Pos} = file:position(Out, Pos),
+ case file:position(Out, Pos) of
+ {ok, Pos} -> ok;
+ Err2 ->
+ close_files(Bulk, L, Head),
+ dets_utils:file_error(Head#head.filename, Err2)
+ end,
CR = file:copy({FileName, [raw,binary]}, Out),
- file:delete(FileName),
+ _ = file:delete(FileName),
case CR of
{ok, Copied} when Copied =:= ExpectedSize;
NoObjects =:= 0 -> % the segments
@@ -2937,11 +2955,11 @@ free_n_objects(Head, Addr, Size, N) ->
free_n_objects(NewHead, NewAddr, Size, N-1).
close_files(false, SizeData, Head) ->
- file:close(Head#head.fptr),
+ _ = file:close(Head#head.fptr),
close_files(true, SizeData, Head);
close_files(true, SizeData, _Head) ->
Fun = fun({_Size, _Pos, {FileName, Fd}, _No}) ->
- close_tmp(Fd),
+ _ = close_tmp(Fd),
file:delete(FileName);
(_) ->
ok
@@ -3261,7 +3279,7 @@ err(Error) ->
file_info(FileName) ->
case catch read_file_header(FileName, read, false) of
{ok, Fd, FH} ->
- file:close(Fd),
+ _ = file:close(Fd),
(FH#fileheader.mod):file_info(FH);
Other ->
Other
@@ -3290,7 +3308,7 @@ view(FileName) ->
X ->
X
end
- after file:close(Fd)
+ after _ = file:close(Fd)
end;
X ->
X
diff --git a/lib/stdlib/src/dets_server.erl b/lib/stdlib/src/dets_server.erl
index 931112088e..3164d40f35 100644
--- a/lib/stdlib/src/dets_server.erl
+++ b/lib/stdlib/src/dets_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -171,9 +171,15 @@ handle_info({pending_reply, {Ref, Result0}}, State) ->
link(Pid),
do_link(Store, FromPid),
true = ets:insert(Store, {FromPid, Tab}),
- true = ets:insert(?REGISTRY, {Tab, 1, Pid}),
- true = ets:insert(?OWNERS, {Pid, Tab}),
+ %% do_internal_open() has already done the following:
+ %% true = ets:insert(?REGISTRY, {Tab, 1, Pid}),
+ %% true = ets:insert(?OWNERS, {Pid, Tab}),
{ok, Tab};
+ {Reply, internal_open} ->
+ %% Clean up what do_internal_open() did:
+ true = ets:delete(?REGISTRY, Tab),
+ true = ets:delete(?OWNERS, Pid),
+ Reply;
{Reply, _} -> % ok or Error
Reply
end,
@@ -241,8 +247,8 @@ ensure_started() ->
init() ->
set_verbose(verbose_flag()),
process_flag(trap_exit, true),
- ets:new(?REGISTRY, [set, named_table]),
- ets:new(?OWNERS, [set, named_table]),
+ ?REGISTRY = ets:new(?REGISTRY, [set, named_table]),
+ ?OWNERS = ets:new(?OWNERS, [set, named_table]),
ets:new(?STORE, [duplicate_bag]).
verbose_flag() ->
@@ -309,6 +315,12 @@ do_internal_open(State, From, Args) ->
[T, _, _] -> T;
[_, _] -> Ref
end,
+ %% Pretend the table is open. If someone else tries to
+ %% open the file it will always become a pending
+ %% 'add_user' request. If someone tries to use the table
+ %% there will be a delay, but that is OK.
+ true = ets:insert(?REGISTRY, {Tab, 1, Pid}),
+ true = ets:insert(?OWNERS, {Pid, Tab}),
pending_call(Tab, Pid, Ref, From, Args, internal_open, State);
Error ->
{Error, State}
@@ -338,7 +350,7 @@ handle_close(State, Req, {FromPid,_Tag}=From, Tab) ->
[{Tab, _Counter, Pid}] ->
do_unlink(Store, FromPid),
true = ets:match_delete(Store, {FromPid, Tab}),
- [true = ets:insert(Store, K) || K <- Keep],
+ true = ets:insert(Store, Keep),
ets:update_counter(?REGISTRY, Tab, -1),
pending_call(Tab, Pid, make_ref(), From, [],
remove_user, State)
diff --git a/lib/stdlib/src/dets_utils.erl b/lib/stdlib/src/dets_utils.erl
index 7bbb34dd15..6c176ad513 100644
--- a/lib/stdlib/src/dets_utils.erl
+++ b/lib/stdlib/src/dets_utils.erl
@@ -230,8 +230,12 @@ write_file(Head, Bin) ->
{ok, Fd} ->
R1 = file:write(Fd, Bin),
R2 = file:sync(Fd),
- file:close(Fd),
- if R1 =:= ok -> R2; true -> R1 end;
+ R3 = file:close(Fd),
+ case {R1, R2, R3} of
+ {ok, ok, R3} -> R3;
+ {ok, R2, _} -> R2;
+ {R1, _, _} -> R1
+ end;
Else ->
Else
end,
@@ -277,12 +281,7 @@ open(FileSpec, Args) ->
end.
truncate(Fd, FileName, Pos) ->
- if
- Pos =:= cur ->
- ok;
- true ->
- position(Fd, FileName, Pos)
- end,
+ _ = [position(Fd, FileName, Pos) || Pos =/= cur],
case file:truncate(Fd) of
ok ->
ok;
@@ -327,10 +326,10 @@ pread_close(Fd, FileName, Pos, Size) ->
{error, Error} ->
file_error_close(Fd, FileName, {error, Error});
{ok, Bin} when byte_size(Bin) < Size ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {tooshort, FileName}});
eof ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {tooshort, FileName}});
OK -> OK
end.
@@ -339,7 +338,7 @@ file_error(FileName, {error, Reason}) ->
throw({error, {file_error, FileName, Reason}}).
file_error_close(Fd, FileName, {error, Reason}) ->
- file:close(Fd),
+ _ = file:close(Fd),
throw({error, {file_error, FileName, Reason}}).
debug_mode() ->
@@ -977,7 +976,8 @@ dm([{P,<<Sz:32,X:32>>} | Bs], T) ->
true = ets:insert(T, {P,{pointer,X,Sz}}),
if
Sz =:= 0 ->
- X = 0;
+ X = 0,
+ true;
true ->
true = ets:insert(T, {{pointer,X}, P})
end,
diff --git a/lib/stdlib/src/dets_v8.erl b/lib/stdlib/src/dets_v8.erl
index 24d6e06ec8..f188502017 100644
--- a/lib/stdlib/src/dets_v8.erl
+++ b/lib/stdlib/src/dets_v8.erl
@@ -199,10 +199,10 @@
%% -> ok | throw({NewHead,Error})
mark_dirty(Head) ->
Dirty = [{?CLOSED_PROPERLY_POS, <<?NOT_PROPERLY_CLOSED:32>>}],
- dets_utils:pwrite(Head, Dirty),
- dets_utils:sync(Head),
- dets_utils:position(Head, Head#head.freelists_p),
- dets_utils:truncate(Head, cur).
+ {_NewHead, ok} = dets_utils:pwrite(Head, Dirty),
+ ok = dets_utils:sync(Head),
+ {ok, _Pos} = dets_utils:position(Head, Head#head.freelists_p),
+ ok = dets_utils:truncate(Head, cur).
%% -> {ok, head()} | throw(Error)
initiate_file(Fd, Tab, Fname, Type, Kp, MinSlots, MaxSlots,
diff --git a/lib/stdlib/src/dets_v9.erl b/lib/stdlib/src/dets_v9.erl
index 308f81c23b..2af93ec800 100644
--- a/lib/stdlib/src/dets_v9.erl
+++ b/lib/stdlib/src/dets_v9.erl
@@ -284,9 +284,9 @@
%% -> ok | throw({NewHead,Error})
mark_dirty(Head) ->
Dirty = [{?CLOSED_PROPERLY_POS, <<?NOT_PROPERLY_CLOSED:32>>}],
- dets_utils:pwrite(Head, Dirty),
- dets_utils:sync(Head),
- dets_utils:position(Head, Head#head.freelists_p),
+ {_H, ok} = dets_utils:pwrite(Head, Dirty),
+ ok = dets_utils:sync(Head),
+ {ok, _Pos} = dets_utils:position(Head, Head#head.freelists_p),
dets_utils:truncate(Head, cur).
%% -> {ok, head()} | throw(Error) | throw(badarg)
@@ -1385,13 +1385,13 @@ segment_file(SizeT, Head, FileData, SegEnd) ->
case Data of
{InFile,In0} ->
{OutFile, Out} = temp_file(Head, SizeT, I),
- file:close(In0),
+ _ = file:close(In0),
{ok, In} = dets_utils:open(InFile, [raw,binary,read]),
{ok, 0} = dets_utils:position(In, InFile, bof),
seg_file(SegAddr, SegAddr, In, InFile, Out, OutFile, SizeT,
SegEnd),
- file:close(In),
- file:delete(InFile),
+ _ = file:close(In),
+ _ = file:delete(InFile),
{OutFile,Out};
Objects ->
{LastAddr, B} = seg_file(Objects, SegAddr, SegAddr, SizeT, []),
@@ -1702,7 +1702,7 @@ free_list_to_file(Ftab, H, Pos, Sz, Ws, WsSz) ->
free_list_to_file(Ftab, H, Pos+1, Sz, NWs, NWsSz).
free_lists_from_file(H, Pos) ->
- dets_utils:position(H#head.fptr, H#head.filename, Pos),
+ {ok, Pos} = dets_utils:position(H#head.fptr, H#head.filename, Pos),
FL = dets_utils:empty_free_lists(),
case catch bin_to_tree([], H, start, FL, -1, []) of
{'EXIT', _} ->
diff --git a/lib/stdlib/src/dict.erl b/lib/stdlib/src/dict.erl
index 4b42f64609..cf8fb3114a 100644
--- a/lib/stdlib/src/dict.erl
+++ b/lib/stdlib/src/dict.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,11 +36,13 @@
-module(dict).
%% Standard interface.
--export([new/0,is_key/2,to_list/1,from_list/1,size/1]).
+-export([new/0,is_key/2,to_list/1,from_list/1,size/1,is_empty/1]).
-export([fetch/2,find/2,fetch_keys/1,erase/2]).
-export([store/3,append/3,append_list/3,update/3,update/4,update_counter/3]).
-export([fold/3,map/2,filter/2,merge/3]).
+-export_type([dict/0, dict/2]).
+
%% Low-level interface.
%%-export([get_slot/2,get_bucket/2,on_bucket/3,fold_dict/3,
%% maybe_expand/2,maybe_contract/2]).
@@ -54,6 +55,8 @@
-define(exp_size, (?seg_size * ?expand_load)).
-define(con_size, (?seg_size * ?contract_load)).
+-type segs(_Key, _Value) :: tuple().
+
%% Define a hashtable. The default values are the standard ones.
-record(dict,
{size=0 :: non_neg_integer(), % Number of elements
@@ -63,14 +66,13 @@
exp_size=?exp_size :: non_neg_integer(), % Size to expand at
con_size=?con_size :: non_neg_integer(), % Size to contract at
empty :: tuple(), % Empty segment
- segs :: tuple() % Segments
+ segs :: segs(_, _) % Segments
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #dict{}
-%% structure and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque dict() :: #dict{}.
+
+
+-opaque dict() :: dict(_, _).
+
+-opaque dict(Key, Value) :: #dict{segs :: segs(Key, Value)}.
-define(kv(K,V), [K|V]). % Key-Value pair format
%%-define(kv(K,V), {K,V}). % Key-Value pair format
@@ -82,8 +84,7 @@ new() ->
#dict{empty=Empty,segs={Empty}}.
-spec is_key(Key, Dict) -> boolean() when
- Key :: term(),
- Dict :: dict().
+ Dict :: dict(Key, Value :: term()).
is_key(Key, D) ->
Slot = get_slot(D, Key),
@@ -95,15 +96,15 @@ find_key(K, [_|Bkt]) -> find_key(K, Bkt);
find_key(_, []) -> false.
-spec to_list(Dict) -> List when
- Dict :: dict(),
- List :: [{Key :: term(), Value :: term()}].
+ Dict :: dict(Key, Value),
+ List :: [{Key, Value}].
to_list(D) ->
fold(fun (Key, Val, List) -> [{Key,Val}|List] end, [], D).
-spec from_list(List) -> Dict when
- List :: [{Key :: term(), Value :: term()}],
- Dict :: dict().
+ Dict :: dict(Key, Value),
+ List :: [{Key, Value}].
from_list(L) ->
lists:foldl(fun ({K,V}, D) -> store(K, V, D) end, new(), L).
@@ -113,10 +114,13 @@ from_list(L) ->
size(#dict{size=N}) when is_integer(N), N >= 0 -> N.
+-spec is_empty(Dict) -> boolean() when
+ Dict :: dict().
+
+is_empty(#dict{size=N}) -> N =:= 0.
+
-spec fetch(Key, Dict) -> Value when
- Key :: term(),
- Dict :: dict(),
- Value :: term().
+ Dict :: dict(Key, Value).
fetch(Key, D) ->
Slot = get_slot(D, Key),
@@ -131,9 +135,7 @@ fetch_val(K, [_|Bkt]) -> fetch_val(K, Bkt);
fetch_val(_, []) -> throw(badarg).
-spec find(Key, Dict) -> {'ok', Value} | 'error' when
- Key :: term(),
- Dict :: dict(),
- Value :: term().
+ Dict :: dict(Key, Value).
find(Key, D) ->
Slot = get_slot(D, Key),
@@ -145,16 +147,16 @@ find_val(K, [_|Bkt]) -> find_val(K, Bkt);
find_val(_, []) -> error.
-spec fetch_keys(Dict) -> Keys when
- Dict :: dict(),
- Keys :: [term()].
+ Dict :: dict(Key, Value :: term()),
+ Keys :: [Key].
fetch_keys(D) ->
fold(fun (Key, _Val, Keys) -> [Key|Keys] end, [], D).
-spec erase(Key, Dict1) -> Dict2 when
- Key :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
+
%% Erase all elements with key Key.
erase(Key, D0) ->
@@ -170,10 +172,8 @@ erase_key(Key, [E|Bkt0]) ->
erase_key(_, []) -> {[],0}.
-spec store(Key, Value, Dict1) -> Dict2 when
- Key :: term(),
- Value :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
store(Key, Val, D0) ->
Slot = get_slot(D0, Key),
@@ -190,10 +190,8 @@ store_bkt_val(Key, New, [Other|Bkt0]) ->
store_bkt_val(Key, New, []) -> {[?kv(Key,New)],1}.
-spec append(Key, Value, Dict1) -> Dict2 when
- Key :: term(),
- Value :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
append(Key, Val, D0) ->
Slot = get_slot(D0, Key),
@@ -210,10 +208,9 @@ append_bkt(Key, Val, [Other|Bkt0]) ->
append_bkt(Key, Val, []) -> {[?kv(Key,[Val])],1}.
-spec append_list(Key, ValList, Dict1) -> Dict2 when
- Key :: term(),
- ValList :: [Value :: term()],
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ ValList :: [Value].
append_list(Key, L, D0) ->
Slot = get_slot(D0, Key),
@@ -284,10 +281,9 @@ app_list_bkt(Key, L, []) -> {[?kv(Key,L)],1}.
%% {[Other|Bkt1],Dc}.
-spec update(Key, Fun, Dict1) -> Dict2 when
- Key :: term(),
- Fun :: fun((Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Fun :: fun((Value1 :: Value) -> Value2 :: Value).
update(Key, F, D0) ->
Slot = get_slot(D0, Key),
@@ -307,11 +303,10 @@ update_bkt(_Key, _F, []) ->
throw(badarg).
-spec update(Key, Fun, Initial, Dict1) -> Dict2 when
- Key :: term(),
- Initial :: term(),
- Fun :: fun((Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Fun :: fun((Value1 :: Value) -> Value2 :: Value),
+ Initial :: Value.
update(Key, F, Init, D0) ->
Slot = get_slot(D0, Key),
@@ -327,10 +322,9 @@ update_bkt(Key, F, I, [Other|Bkt0]) ->
update_bkt(Key, F, I, []) when is_function(F, 1) -> {[?kv(Key,I)],1}.
-spec update_counter(Key, Increment, Dict1) -> Dict2 when
- Key :: term(),
- Increment :: number(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Increment :: number().
update_counter(Key, Incr, D0) when is_number(Incr) ->
Slot = get_slot(D0, Key),
@@ -347,36 +341,35 @@ counter_bkt(Key, I, []) -> {[?kv(Key,I)],1}.
-spec fold(Fun, Acc0, Dict) -> Acc1 when
Fun :: fun((Key, Value, AccIn) -> AccOut),
- Key :: term(),
- Value :: term(),
- Acc0 :: term(),
- Acc1 :: term(),
- AccIn :: term(),
- AccOut :: term(),
- Dict :: dict().
+ Dict :: dict(Key, Value),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc.
+
%% Fold function Fun over all "bags" in Table and return Accumulator.
fold(F, Acc, D) -> fold_dict(F, Acc, D).
-spec map(Fun, Dict1) -> Dict2 when
- Fun :: fun((Key :: term(), Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Fun :: fun((Key, Value1) -> Value2),
+ Dict1 :: dict(Key, Value1),
+ Dict2 :: dict(Key, Value2).
map(F, D) -> map_dict(F, D).
-spec filter(Pred, Dict1) -> Dict2 when
- Pred :: fun((Key :: term(), Value :: term()) -> boolean()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Pred :: fun((Key , Value) -> boolean()),
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
filter(F, D) -> filter_dict(F, D).
-spec merge(Fun, Dict1, Dict2) -> Dict3 when
- Fun :: fun((Key :: term(), Value1 :: term(), Value2 :: term()) -> Value :: term()),
- Dict1 :: dict(),
- Dict2 :: dict(),
- Dict3 :: dict().
+ Fun :: fun((Key, Value1, Value2) -> Value),
+ Dict1 :: dict(Key, Value1),
+ Dict2 :: dict(Key, Value2),
+ Dict3 :: dict(Key, Value).
merge(F, D1, D2) when D1#dict.size < D2#dict.size ->
fold_dict(fun (K, V1, D) ->
diff --git a/lib/stdlib/src/digraph.erl b/lib/stdlib/src/digraph.erl
index 78f74631dc..0c21271529 100644
--- a/lib/stdlib/src/digraph.erl
+++ b/lib/stdlib/src/digraph.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,18 +36,14 @@
-export([get_short_path/3, get_short_cycle/2]).
--export_type([digraph/0, d_type/0, vertex/0, edge/0]).
+-export_type([graph/0, d_type/0, vertex/0, edge/0]).
-record(digraph, {vtab = notable :: ets:tab(),
etab = notable :: ets:tab(),
ntab = notable :: ets:tab(),
cyclic = true :: boolean()}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #digraph{}
-%% record and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque digraph() :: #digraph{}.
+
+-opaque graph() :: #digraph{}.
-type edge() :: term().
-type label() :: term().
@@ -67,11 +63,11 @@
-type d_cyclicity() :: 'acyclic' | 'cyclic'.
-type d_type() :: d_cyclicity() | d_protection().
--spec new() -> digraph().
+-spec new() -> graph().
new() -> new([]).
--spec new(Type) -> digraph() when
+-spec new(Type) -> graph() when
Type :: [d_type()].
new(Type) ->
@@ -106,7 +102,7 @@ check_type(_, _, _) -> error.
%%
%% Set graph type
%%
--spec set_type([{'cyclic', boolean()}], digraph()) -> digraph().
+-spec set_type([{'cyclic', boolean()}], graph()) -> graph().
set_type([{cyclic,V} | Ks], G) ->
set_type(Ks, G#digraph{cyclic = V});
@@ -116,7 +112,7 @@ set_type([], G) -> G.
%% Data access functions
-spec delete(G) -> 'true' when
- G :: digraph().
+ G :: graph().
delete(G) ->
ets:delete(G#digraph.vtab),
@@ -124,7 +120,7 @@ delete(G) ->
ets:delete(G#digraph.ntab).
-spec info(G) -> InfoList when
- G :: digraph(),
+ G :: graph(),
InfoList :: [{'cyclicity', Cyclicity :: d_cyclicity()} |
{'memory', NoWords :: non_neg_integer()} |
{'protection', Protection :: d_protection()}].
@@ -142,20 +138,20 @@ info(G) ->
[{cyclicity, Cyclicity}, {memory, Memory}, {protection, Protection}].
-spec add_vertex(G) -> vertex() when
- G :: digraph().
+ G :: graph().
add_vertex(G) ->
do_add_vertex({new_vertex_id(G), []}, G).
-spec add_vertex(G, V) -> vertex() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
add_vertex(G, V) ->
do_add_vertex({V, []}, G).
-spec add_vertex(G, V, Label) -> vertex() when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Label :: label().
@@ -163,21 +159,21 @@ add_vertex(G, V, D) ->
do_add_vertex({V, D}, G).
-spec del_vertex(G, V) -> 'true' when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
del_vertex(G, V) ->
do_del_vertex(V, G).
-spec del_vertices(G, Vertices) -> 'true' when
- G :: digraph(),
+ G :: graph(),
Vertices :: [vertex()].
del_vertices(G, Vs) ->
do_del_vertices(Vs, G).
-spec vertex(G, V) -> {V, Label} | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Label :: label().
@@ -188,37 +184,37 @@ vertex(G, V) ->
end.
-spec no_vertices(G) -> non_neg_integer() when
- G :: digraph().
+ G :: graph().
no_vertices(G) ->
ets:info(G#digraph.vtab, size).
-spec vertices(G) -> Vertices when
- G :: digraph(),
+ G :: graph(),
Vertices :: [vertex()].
vertices(G) ->
ets:select(G#digraph.vtab, [{{'$1', '_'}, [], ['$1']}]).
--spec source_vertices(digraph()) -> [vertex()].
+-spec source_vertices(graph()) -> [vertex()].
source_vertices(G) ->
collect_vertices(G, in).
--spec sink_vertices(digraph()) -> [vertex()].
+-spec sink_vertices(graph()) -> [vertex()].
sink_vertices(G) ->
collect_vertices(G, out).
-spec in_degree(G, V) -> non_neg_integer() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
in_degree(G, V) ->
length(ets:lookup(G#digraph.ntab, {in, V})).
-spec in_neighbours(G, V) -> Vertex when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertex :: [vertex()].
@@ -228,7 +224,7 @@ in_neighbours(G, V) ->
collect_elems(ets:lookup(NT, {in, V}), ET, 2).
-spec in_edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -236,14 +232,14 @@ in_edges(G, V) ->
ets:select(G#digraph.ntab, [{{{in, V}, '$1'}, [], ['$1']}]).
-spec out_degree(G, V) -> non_neg_integer() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
out_degree(G, V) ->
length(ets:lookup(G#digraph.ntab, {out, V})).
-spec out_neighbours(G, V) -> Vertices when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex()].
@@ -253,7 +249,7 @@ out_neighbours(G, V) ->
collect_elems(ets:lookup(NT, {out, V}), ET, 3).
-spec out_edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -261,7 +257,7 @@ out_edges(G, V) ->
ets:select(G#digraph.ntab, [{{{out, V}, '$1'}, [], ['$1']}]).
-spec add_edge(G, V1, V2) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex().
@@ -269,7 +265,7 @@ add_edge(G, V1, V2) ->
do_add_edge({new_edge_id(G), V1, V2, []}, G).
-spec add_edge(G, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Label :: label().
@@ -278,7 +274,7 @@ add_edge(G, V1, V2, D) ->
do_add_edge({new_edge_id(G), V1, V2, D}, G).
-spec add_edge(G, E, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
E :: edge(),
V1 :: vertex(),
V2 :: vertex(),
@@ -288,34 +284,34 @@ add_edge(G, E, V1, V2, D) ->
do_add_edge({E, V1, V2, D}, G).
-spec del_edge(G, E) -> 'true' when
- G :: digraph(),
+ G :: graph(),
E :: edge().
del_edge(G, E) ->
do_del_edges([E], G).
-spec del_edges(G, Edges) -> 'true' when
- G :: digraph(),
+ G :: graph(),
Edges :: [edge()].
del_edges(G, Es) ->
do_del_edges(Es, G).
-spec no_edges(G) -> non_neg_integer() when
- G :: digraph().
+ G :: graph().
no_edges(G) ->
ets:info(G#digraph.etab, size).
-spec edges(G) -> Edges when
- G :: digraph(),
+ G :: graph(),
Edges :: [edge()].
edges(G) ->
ets:select(G#digraph.etab, [{{'$1', '_', '_', '_'}, [], ['$1']}]).
-spec edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -324,7 +320,7 @@ edges(G, V) ->
{{{in, V}, '$1'}, [], ['$1']}]).
-spec edge(G, E) -> {E, V1, V2, Label} | 'false' when
- G :: digraph(),
+ G :: graph(),
E :: edge(),
V1 :: vertex(),
V2 :: vertex(),
@@ -339,7 +335,7 @@ edge(G, E) ->
%%
%% Generate a "unique" edge identifier (relative to this graph)
%%
--spec new_edge_id(digraph()) -> edge().
+-spec new_edge_id(graph()) -> edge().
new_edge_id(G) ->
NT = G#digraph.ntab,
@@ -351,7 +347,7 @@ new_edge_id(G) ->
%%
%% Generate a "unique" vertex identifier (relative to this graph)
%%
--spec new_vertex_id(digraph()) -> vertex().
+-spec new_vertex_id(graph()) -> vertex().
new_vertex_id(G) ->
NT = G#digraph.ntab,
@@ -371,7 +367,7 @@ collect_elems([{_,Key}|Keys], Table, Index, Acc) ->
[ets:lookup_element(Table, Key, Index)|Acc]);
collect_elems([], _, _, Acc) -> Acc.
--spec do_add_vertex({vertex(), label()}, digraph()) -> vertex().
+-spec do_add_vertex({vertex(), label()}, graph()) -> vertex().
do_add_vertex({V, _Label} = VL, G) ->
ets:insert(G#digraph.vtab, VL),
@@ -430,14 +426,14 @@ do_del_edge(E, V1, V2, G) ->
{{{out,V1}, E}, [], [true]}]),
ets:delete(G#digraph.etab, E).
--spec rm_edges([vertex(),...], digraph()) -> 'true'.
+-spec rm_edges([vertex(),...], graph()) -> 'true'.
rm_edges([V1, V2|Vs], G) ->
rm_edge(V1, V2, G),
rm_edges([V2|Vs], G);
rm_edges(_, _) -> true.
--spec rm_edge(vertex(), vertex(), digraph()) -> 'ok'.
+-spec rm_edge(vertex(), vertex(), graph()) -> 'ok'.
rm_edge(V1, V2, G) ->
Es = out_edges(G, V1),
@@ -456,7 +452,7 @@ rm_edge_0([], _, _, #digraph{}) -> ok.
%%
%% Check that endpoints exist
%%
--spec do_add_edge({edge(), vertex(), vertex(), label()}, digraph()) ->
+-spec do_add_edge({edge(), vertex(), vertex(), label()}, graph()) ->
edge() | {'error', add_edge_err_rsn()}.
do_add_edge({E, V1, V2, Label}, G) ->
@@ -484,14 +480,14 @@ other_edge_exists(#digraph{etab = ET}, E, V1, V2) ->
false
end.
--spec do_insert_edge(edge(), vertex(), vertex(), label(), digraph()) -> edge().
+-spec do_insert_edge(edge(), vertex(), vertex(), label(), graph()) -> edge().
do_insert_edge(E, V1, V2, Label, #digraph{ntab=NT, etab=ET}) ->
ets:insert(NT, [{{out, V1}, E}, {{in, V2}, E}]),
ets:insert(ET, {E, V1, V2, Label}),
E.
--spec acyclic_add_edge(edge(), vertex(), vertex(), label(), digraph()) ->
+-spec acyclic_add_edge(edge(), vertex(), vertex(), label(), graph()) ->
edge() | {'error', {'bad_edge', [vertex()]}}.
acyclic_add_edge(_E, V1, V2, _L, _G) when V1 =:= V2 ->
@@ -507,7 +503,7 @@ acyclic_add_edge(E, V1, V2, Label, G) ->
%%
-spec del_path(G, V1, V2) -> 'true' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex().
@@ -529,7 +525,7 @@ del_path(G, V1, V2) ->
%%
-spec get_cycle(G, V) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex(),...].
@@ -550,7 +546,7 @@ get_cycle(G, V) ->
%%
-spec get_path(G, V1, V2) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Vertices :: [vertex(),...].
@@ -589,7 +585,7 @@ one_path([], _, [], _, _, _, _, _Counter) -> false.
%%
-spec get_short_cycle(G, V) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex(),...].
@@ -602,7 +598,7 @@ get_short_cycle(G, V) ->
%%
-spec get_short_path(G, V1, V2) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Vertices :: [vertex(),...].
diff --git a/lib/stdlib/src/digraph_utils.erl b/lib/stdlib/src/digraph_utils.erl
index 807b5c12a1..011bcd0260 100644
--- a/lib/stdlib/src/digraph_utils.erl
+++ b/lib/stdlib/src/digraph_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -43,28 +43,28 @@
%%
-spec components(Digraph) -> [Component] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Component :: [digraph:vertex()].
components(G) ->
forest(G, fun inout/3).
-spec strong_components(Digraph) -> [StrongComponent] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
StrongComponent :: [digraph:vertex()].
strong_components(G) ->
forest(G, fun in/3, revpostorder(G)).
-spec cyclic_strong_components(Digraph) -> [StrongComponent] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
StrongComponent :: [digraph:vertex()].
cyclic_strong_components(G) ->
remove_singletons(strong_components(G), G, []).
-spec reachable(Vertices, Digraph) -> Reachable when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reachable :: [digraph:vertex()].
@@ -72,7 +72,7 @@ reachable(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun out/3, Vs, first)).
-spec reachable_neighbours(Vertices, Digraph) -> Reachable when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reachable :: [digraph:vertex()].
@@ -80,7 +80,7 @@ reachable_neighbours(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun out/3, Vs, not_first)).
-spec reaching(Vertices, Digraph) -> Reaching when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reaching :: [digraph:vertex()].
@@ -88,7 +88,7 @@ reaching(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun in/3, Vs, first)).
-spec reaching_neighbours(Vertices, Digraph) -> Reaching when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reaching :: [digraph:vertex()].
@@ -96,7 +96,7 @@ reaching_neighbours(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun in/3, Vs, not_first)).
-spec topsort(Digraph) -> Vertices | 'false' when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
topsort(G) ->
@@ -107,13 +107,13 @@ topsort(G) ->
end.
-spec is_acyclic(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_acyclic(G) ->
loop_vertices(G) =:= [] andalso topsort(G) =/= false.
-spec arborescence_root(Digraph) -> 'no' | {'yes', Root} when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Root :: digraph:vertex().
arborescence_root(G) ->
@@ -136,29 +136,29 @@ arborescence_root(G) ->
end.
-spec is_arborescence(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_arborescence(G) ->
arborescence_root(G) =/= no.
-spec is_tree(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_tree(G) ->
(digraph:no_edges(G) =:= digraph:no_vertices(G) - 1)
andalso (length(components(G)) =:= 1).
-spec loop_vertices(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
loop_vertices(G) ->
[V || V <- digraph:vertices(G), is_reflexive_vertex(V, G)].
-spec subgraph(Digraph, Vertices) -> SubGraph when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
- SubGraph :: digraph().
+ SubGraph :: digraph:graph().
subgraph(G, Vs) ->
try
@@ -169,8 +169,8 @@ subgraph(G, Vs) ->
end.
-spec subgraph(Digraph, Vertices, Options) -> SubGraph when
- Digraph :: digraph(),
- SubGraph :: digraph(),
+ Digraph :: digraph:graph(),
+ SubGraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Options :: [{'type', SubgraphType} | {'keep_labels', boolean()}],
SubgraphType :: 'inherit' | [digraph:d_type()].
@@ -184,8 +184,8 @@ subgraph(G, Vs, Opts) ->
end.
-spec condensation(Digraph) -> CondensedDigraph when
- Digraph :: digraph(),
- CondensedDigraph :: digraph().
+ Digraph :: digraph:graph(),
+ CondensedDigraph :: digraph:graph().
condensation(G) ->
SCs = strong_components(G),
@@ -209,14 +209,14 @@ condensation(G) ->
SCG.
-spec preorder(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
preorder(G) ->
lists:reverse(revpreorder(G)).
-spec postorder(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
postorder(G) ->
@@ -370,5 +370,5 @@ condense('$end_of_table', _T, _SC, _G, _SCG, _I2C) ->
condense(I, T, SC, G, SCG, I2C) ->
[{_,C}] = ets:lookup(I2C, I),
digraph:add_vertex(SCG, C),
- [digraph:add_edge(SCG, SC, C) || C =/= SC],
+ _ = [digraph:add_edge(SCG, SC, C) || C =/= SC],
condense(ets:next(T, I), T, SC, G, SCG, I2C).
diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl
index f5998c54fd..b3bc5f6d92 100644
--- a/lib/stdlib/src/edlin.erl
+++ b/lib/stdlib/src/edlin.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -391,7 +390,7 @@ do_op(end_of_line, Bef, [C|Aft], Rs) ->
do_op(end_of_line, Bef, [], Rs) ->
{{Bef,[]},Rs};
do_op(ctlu, Bef, Aft, Rs) ->
- put(kill_buffer, Bef),
+ put(kill_buffer, reverse(Bef)),
{{[], Aft}, [{delete_chars, -length(Bef)} | Rs]};
do_op(beep, Bef, Aft, Rs) ->
{{Bef,Aft},[beep|Rs]};
diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl
index 516c0aa30b..a2b4663219 100644
--- a/lib/stdlib/src/edlin_expand.erl
+++ b/lib/stdlib/src/edlin_expand.erl
@@ -73,7 +73,7 @@ to_atom(Str) ->
error
end.
-match(Prefix, Alts, Extra) ->
+match(Prefix, Alts, Extra0) ->
Len = length(Prefix),
Matches = lists:sort(
[{S, A} || {H, A} <- Alts,
@@ -89,7 +89,11 @@ match(Prefix, Alts, Extra) ->
{yes, Remain, []}
end;
{complete, Str} ->
- {yes, nthtail(Len, Str) ++ Extra, []};
+ Extra = case {Extra0,Matches} of
+ {"(",[{Str,0}]} -> "()";
+ {_,_} -> Extra0
+ end,
+ {yes, nthtail(Len, Str) ++ Extra, []};
no ->
{no, [], []}
end.
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index d1d060ebc8..5f8637c118 100644
--- a/lib/stdlib/src/epp.erl
+++ b/lib/stdlib/src/epp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,12 +20,12 @@
%% An Erlang code preprocessor.
--export([open/2,open/3,open/5,close/1,format_error/1]).
+-export([open/1, open/2,open/3,open/5,close/1,format_error/1]).
-export([scan_erl_form/1,parse_erl_form/1,macro_defs/1]).
--export([parse_file/1, parse_file/3]).
+-export([parse_file/1, parse_file/2, parse_file/3]).
-export([default_encoding/0, encoding_to_string/1,
read_encoding_from_binary/1, read_encoding_from_binary/2,
- set_encoding/1, read_encoding/1, read_encoding/2]).
+ set_encoding/1, set_encoding/2, read_encoding/1, read_encoding/2]).
-export([interpret_file_attribute/1]).
-export([normalize_typed_record_fields/1,restore_typed_record_fields/1]).
@@ -33,21 +33,34 @@
-export_type([source_encoding/0]).
--type macros() :: [{atom(), term()}].
+-type macros() :: [atom() | {atom(), term()}].
-type epp_handle() :: pid().
-type source_encoding() :: latin1 | utf8.
+-type ifdef() :: 'ifdef' | 'ifndef' | 'else'.
+
+-type name() :: {'atom', atom()}.
+-type argspec() :: 'none' %No arguments
+ | non_neg_integer(). %Number of arguments
+-type tokens() :: [erl_scan:token()].
+-type used() :: {name(), argspec()}.
+
+-define(DEFAULT_ENCODING, utf8).
+
%% Epp state record.
--record(epp, {file, %Current file
- location, %Current location
- delta, %Offset from Location (-file)
- name="", %Current file name
- name2="", %-"-, modified by -file
- istk=[], %Ifdef stack
- sstk=[], %State stack
- path=[], %Include-path
- macs = dict:new() :: dict(), %Macros (don't care locations)
- uses = dict:new() :: dict(), %Macro use structure
+-record(epp, {file :: file:io_device(), %Current file
+ location=1, %Current location
+ delta=0 :: non_neg_integer(), %Offset from Location (-file)
+ name="" :: file:name(), %Current file name
+ name2="" :: file:name(), %-"-, modified by -file
+ istk=[] :: [ifdef()], %Ifdef stack
+ sstk=[] :: [#epp{}], %State stack
+ path=[] :: [file:name()], %Include-path
+ macs = dict:new() %Macros (don't care locations)
+ :: dict:dict(name(), {argspec(), tokens()}),
+ uses = dict:new() %Macro use structure
+ :: dict:dict(name(), [{argspec(), [used()]}]),
+ default_encoding = ?DEFAULT_ENCODING :: source_encoding(),
pre_opened = false :: boolean()
}).
@@ -58,6 +71,7 @@
%%% distinction in the internal representation would simplify the code
%%% a little.
+%% open(Options)
%% open(FileName, IncludePath)
%% open(FileName, IncludePath, PreDefMacros)
%% open(FileName, IoDevice, StartLocation, IncludePath, PreDefMacros)
@@ -65,6 +79,7 @@
%% scan_erl_form(Epp)
%% parse_erl_form(Epp)
%% parse_file(Epp)
+%% parse_file(FileName, Options)
%% parse_file(FileName, IncludePath, PreDefMacros)
%% macro_defs(Epp)
@@ -87,14 +102,43 @@ open(Name, Path) ->
ErrorDescriptor :: term().
open(Name, Path, Pdm) ->
- Self = self(),
- Epp = spawn(fun() -> server(Self, Name, Path, Pdm) end),
- epp_request(Epp).
+ internal_open([{name, Name}, {includes, Path}, {macros, Pdm}], #epp{}).
open(Name, File, StartLocation, Path, Pdm) ->
- Self = self(),
- Epp = spawn(fun() -> server(Self, Name, File, StartLocation,Path,Pdm) end),
- epp_request(Epp).
+ internal_open([{name, Name}, {includes, Path}, {macros, Pdm}],
+ #epp{file=File, pre_opened=true, location=StartLocation}).
+
+-spec open(Options) ->
+ {'ok', Epp} | {'ok', Epp, Extra} | {'error', ErrorDescriptor} when
+ Options :: [{'default_encoding', DefEncoding :: source_encoding()} |
+ {'includes', IncludePath :: [DirectoryName :: file:name()]} |
+ {'macros', PredefMacros :: macros()} |
+ {'name',FileName :: file:name()} |
+ 'extra'],
+ Epp :: epp_handle(),
+ Extra :: [{'encoding', source_encoding() | 'none'}],
+ ErrorDescriptor :: term().
+
+open(Options) ->
+ internal_open(Options, #epp{}).
+
+internal_open(Options, St) ->
+ case proplists:get_value(name, Options) of
+ undefined ->
+ erlang:error(badarg);
+ Name ->
+ Self = self(),
+ Epp = spawn(fun() -> server(Self, Name, Options, St) end),
+ case epp_request(Epp) of
+ {ok, Pid, Encoding} ->
+ case proplists:get_bool(extra, Options) of
+ true -> {ok, Pid, [{encoding, Encoding}]};
+ false -> {ok, Pid}
+ end;
+ Other ->
+ Other
+ end
+ end.
-spec close(Epp) -> 'ok' when
Epp :: epp_handle().
@@ -170,9 +214,6 @@ format_error({'NYI',What}) ->
io_lib:format("not yet implemented '~s'", [What]);
format_error(E) -> file:format_error(E).
-%% parse_file(FileName, IncludePath, [PreDefMacro]) ->
-%% {ok,[Form]} | {error,OpenError}
-
-spec parse_file(FileName, IncludePath, PredefMacros) ->
{'ok', [Form]} | {error, OpenError} when
FileName :: file:name(),
@@ -184,17 +225,40 @@ format_error(E) -> file:format_error(E).
OpenError :: file:posix() | badarg | system_limit.
parse_file(Ifile, Path, Predefs) ->
- case open(Ifile, Path, Predefs) of
+ parse_file(Ifile, [{includes, Path}, {macros, Predefs}]).
+
+-spec parse_file(FileName, Options) ->
+ {'ok', [Form]} | {'ok', [Form], Extra} | {error, OpenError} when
+ FileName :: file:name(),
+ Options :: [{'includes', IncludePath :: [DirectoryName :: file:name()]} |
+ {'macros', PredefMacros :: macros()} |
+ {'default_encoding', DefEncoding :: source_encoding()} |
+ 'extra'],
+ Form :: erl_parse:abstract_form() | {'error', ErrorInfo} | {'eof',Line},
+ Line :: erl_scan:line(),
+ ErrorInfo :: erl_scan:error_info() | erl_parse:error_info(),
+ Extra :: [{'encoding', source_encoding() | 'none'}],
+ OpenError :: file:posix() | badarg | system_limit.
+
+parse_file(Ifile, Options) ->
+ case internal_open([{name, Ifile} | Options], #epp{}) of
{ok,Epp} ->
Forms = parse_file(Epp),
close(Epp),
{ok,Forms};
+ {ok,Epp,Extra} ->
+ Forms = parse_file(Epp),
+ close(Epp),
+ {ok,Forms,Extra};
{error,E} ->
{error,E}
end.
-%% parse_file(Epp) ->
-%% [Form]
+-spec parse_file(Epp) -> [Form] when
+ Epp :: epp_handle(),
+ Form :: erl_parse:abstract_form() | {'error', ErrorInfo} | {'eof',Line},
+ Line :: erl_scan:line(),
+ ErrorInfo :: erl_scan:error_info() | erl_parse:error_info().
parse_file(Epp) ->
case parse_erl_form(Epp) of
@@ -219,8 +283,6 @@ parse_file(Epp) ->
[{eof,Location}]
end.
--define(DEFAULT_ENCODING, latin1).
-
-spec default_encoding() -> source_encoding().
default_encoding() ->
@@ -258,9 +320,16 @@ read_encoding(Name, Options) ->
File :: io:device(). % pid(); raw files don't work
set_encoding(File) ->
+ set_encoding(File, ?DEFAULT_ENCODING).
+
+-spec set_encoding(File, Default) -> source_encoding() | none when
+ Default :: source_encoding(),
+ File :: io:device(). % pid(); raw files don't work
+
+set_encoding(File, Default) ->
Encoding = read_encoding_from_file(File, true),
Enc = case Encoding of
- none -> default_encoding();
+ none -> Default;
Encoding -> Encoding
end,
ok = io:setopts(File, [{encoding, Enc}]),
@@ -446,35 +515,37 @@ restore_typed_record_fields([{attribute,La,type,{{record,Record},Fields,[]}}|
restore_typed_record_fields([Form|Forms]) ->
[Form|restore_typed_record_fields(Forms)].
-%% server(StarterPid, FileName, Path, PreDefMacros)
-
-server(Pid, Name, Path, Pdm) ->
+server(Pid, Name, Options, #epp{pre_opened=PreOpened}=St) ->
process_flag(trap_exit, true),
- case file:open(Name, [read]) of
- {ok,File} ->
- Location = 1,
- init_server(Pid, Name, File, Location, Path, Pdm, false);
- {error,E} ->
- epp_reply(Pid, {error,E})
+ case PreOpened of
+ false ->
+ case file:open(Name, [read]) of
+ {ok,File} ->
+ init_server(Pid, Name, Options, St#epp{file = File});
+ {error,E} ->
+ epp_reply(Pid, {error,E})
+ end;
+ true ->
+ init_server(Pid, Name, Options, St)
end.
-%% server(StarterPid, FileName, IoDevice, Location, Path, PreDefMacros)
-server(Pid, Name, File, AtLocation, Path, Pdm) ->
- process_flag(trap_exit, true),
- init_server(Pid, Name, File, AtLocation, Path, Pdm, true).
-
-init_server(Pid, Name, File, AtLocation, Path, Pdm, Pre) ->
+init_server(Pid, Name, Options, St0) ->
+ Pdm = proplists:get_value(macros, Options, []),
Ms0 = predef_macros(Name),
case user_predef(Pdm, Ms0) of
{ok,Ms1} ->
- _ = set_encoding(File),
- epp_reply(Pid, {ok,self()}),
+ #epp{file = File, location = AtLocation} = St0,
+ DefEncoding = proplists:get_value(default_encoding, Options,
+ ?DEFAULT_ENCODING),
+ Encoding = set_encoding(File, DefEncoding),
+ epp_reply(Pid, {ok,self(),Encoding}),
%% ensure directory of current source file is
%% first in path
- Path1 = [filename:dirname(Name) | Path],
- St = #epp{file=File, location=AtLocation, delta=0,
- name=Name, name2=Name, path=Path1, macs=Ms1,
- pre_opened = Pre},
+ Path = [filename:dirname(Name) |
+ proplists:get_value(includes, Options, [])],
+ St = St0#epp{delta=0, name=Name, name2=Name,
+ path=Path, macs=Ms1,
+ default_encoding=DefEncoding},
From = wait_request(St),
enter_file_reply(From, Name, AtLocation, AtLocation),
wait_req_scan(St);
@@ -600,9 +671,11 @@ enter_file2(NewF, Pname, From, St0, AtLocation) ->
%% the path) must be dropped, otherwise the path used within the current
%% file will depend on the order of file inclusions in the parent files
Path = [filename:dirname(Pname) | tl(St0#epp.path)],
- _ = set_encoding(NewF),
+ DefEncoding = St0#epp.default_encoding,
+ _ = set_encoding(NewF, DefEncoding),
#epp{file=NewF,location=Loc,name=Pname,name2=Pname,delta=0,
- sstk=[St0|St0#epp.sstk],path=Path,macs=Ms}.
+ sstk=[St0|St0#epp.sstk],path=Path,macs=Ms,
+ default_encoding=DefEncoding}.
enter_file_reply(From, Name, Location, AtLocation) ->
Attr = loc_attr(AtLocation),
@@ -640,11 +713,11 @@ leave_file(From, St) ->
Ms = dict:store({atom,'FILE'},
{none,[{string,CurrLoc,OldName2}]},
St#epp.macs),
- NextSt = OldSt#epp{sstk=Sts,macs=Ms},
+ NextSt = OldSt#epp{sstk=Sts,macs=Ms,uses=St#epp.uses},
enter_file_reply(From, OldName, CurrLoc, CurrLoc),
case OldName2 =:= OldName of
true ->
- From;
+ ok;
false ->
NFrom = wait_request(NextSt),
enter_file_reply(NFrom, OldName2, OldLoc,
@@ -1048,8 +1121,20 @@ skip_toks(From, St, [I|Sis]) ->
skip_toks(From, St#epp{location=Cl}, Sis);
{ok,_Toks,Cl} ->
skip_toks(From, St#epp{location=Cl}, [I|Sis]);
- {error,_E,Cl} ->
- skip_toks(From, St#epp{location=Cl}, [I|Sis]);
+ {error,E,Cl} ->
+ case E of
+ {_,file_io_server,invalid_unicode} ->
+ %% The compiler needs to know that there was
+ %% invalid unicode characters in the file
+ %% (and there is no point in continuing anyway
+ %% since io server process has terminated).
+ epp_reply(From, {error,E}),
+ leave_file(wait_request(St), St);
+ _ ->
+ %% Some other invalid token, such as a bad floating
+ %% point number. Just ignore it.
+ skip_toks(From, St#epp{location=Cl}, [I|Sis])
+ end;
{eof,Cl} ->
leave_file(From, St#epp{location=Cl,istk=[I|Sis]});
{error,_E} ->
@@ -1247,6 +1332,8 @@ macro_arg([{'case',Lc}|Toks], E, Arg) ->
macro_arg(Toks, ['end'|E], [{'case',Lc}|Arg]);
macro_arg([{'fun',Lc}|[{'(',_}|_]=Toks], E, Arg) ->
macro_arg(Toks, ['end'|E], [{'fun',Lc}|Arg]);
+macro_arg([{'fun',_}=Fun,{var,_,_}=Name|[{'(',_}|_]=Toks], E, Arg) ->
+ macro_arg(Toks, ['end'|E], [Name,Fun|Arg]);
macro_arg([{'receive',Lr}|Toks], E, Arg) ->
macro_arg(Toks, ['end'|E], [{'receive',Lr}|Arg]);
macro_arg([{'try',Lr}|Toks], E, Arg) ->
diff --git a/lib/stdlib/src/erl_compile.erl b/lib/stdlib/src/erl_compile.erl
index 8c3d59467b..caed4d41d6 100644
--- a/lib/stdlib/src/erl_compile.erl
+++ b/lib/stdlib/src/erl_compile.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,10 +21,12 @@
-include("erl_compile.hrl").
-include("file.hrl").
--export([compile_cmdline/1]).
+-export([compile_cmdline/0]).
-export_type([cmd_line_arg/0]).
+-define(STDERR, standard_error). %Macro to avoid misspellings.
+
%% Mapping from extension to {M,F} to run the correct compiler.
compiler(".erl") -> {compile, compile};
@@ -47,9 +49,10 @@ compiler(_) -> no.
-type cmd_line_arg() :: atom() | string().
--spec compile_cmdline([cmd_line_arg()]) -> no_return().
+-spec compile_cmdline() -> no_return().
-compile_cmdline(List) ->
+compile_cmdline() ->
+ List = init:get_plain_arguments(),
case compile(List) of
ok -> my_halt(0);
error -> my_halt(1);
@@ -63,86 +66,204 @@ my_halt(Reason) ->
compile(List) ->
process_flag(trap_exit, true),
- Pid = spawn_link(fun() -> compiler_runner(List) end),
+ Pid = spawn_link(compiler_runner(List)),
receive
{'EXIT', Pid, {compiler_result, Result}} ->
Result;
+ {'EXIT', Pid, {compiler_error, Error}} ->
+ io:put_chars(?STDERR, Error),
+ io:nl(?STDERR),
+ error;
{'EXIT', Pid, Reason} ->
- io:format("Runtime error: ~tp~n", [Reason]),
+ io:format(?STDERR, "Runtime error: ~tp~n", [Reason]),
error
end.
--spec compiler_runner([cmd_line_arg()]) -> no_return().
+-spec compiler_runner([cmd_line_arg()]) -> fun(() -> no_return()).
compiler_runner(List) ->
- %% We don't want the current directory in the code path.
- %% Remove it.
- Path = [D || D <- code:get_path(), D =/= "."],
- true = code:set_path(Path),
- exit({compiler_result, compile1(List)}).
+ fun() ->
+ %% We don't want the current directory in the code path.
+ %% Remove it.
+ Path = [D || D <- code:get_path(), D =/= "."],
+ true = code:set_path(Path),
+ exit({compiler_result, compile1(List)})
+ end.
%% Parses the first part of the option list.
-compile1(['@cwd', Cwd|Rest]) ->
- CwdL = atom_to_list(Cwd),
- compile1(Rest, CwdL, #options{outdir=CwdL, cwd=CwdL});
compile1(Args) ->
- %% From R13B02, the @cwd argument is optional.
{ok, Cwd} = file:get_cwd(),
- compile1(Args, Cwd, #options{outdir=Cwd, cwd=Cwd}).
+ compile1(Args, #options{outdir=Cwd,cwd=Cwd}).
%% Parses all options.
-compile1(['@i', Dir|Rest], Cwd, Opts) ->
+compile1(["--"|Files], Opts) ->
+ compile2(Files, Opts);
+compile1(["-"++Option|T], Opts) ->
+ parse_generic_option(Option, T, Opts);
+compile1(["+"++Option|Rest], Opts) ->
+ Term = make_term(Option),
+ Specific = Opts#options.specific,
+ compile1(Rest, Opts#options{specific=[Term|Specific]});
+compile1(Files, Opts) ->
+ compile2(Files, Opts).
+
+parse_generic_option("b"++Opt, T0, Opts) ->
+ {OutputType,T} = get_option("b", Opt, T0),
+ compile1(T, Opts#options{output_type=list_to_atom(OutputType)});
+parse_generic_option("D"++Opt, T0, #options{defines=Defs}=Opts) ->
+ {Val0,T} = get_option("D", Opt, T0),
+ {Key0,Val1} = split_at_equals(Val0, []),
+ Key = list_to_atom(Key0),
+ case Val1 of
+ [] ->
+ compile1(T, Opts#options{defines=[Key|Defs]});
+ Val2 ->
+ Val = make_term(Val2),
+ compile1(T, Opts#options{defines=[{Key,Val}|Defs]})
+ end;
+parse_generic_option("help", _, _Opts) ->
+ usage();
+parse_generic_option("I"++Opt, T0, #options{cwd=Cwd}=Opts) ->
+ {Dir,T} = get_option("I", Opt, T0),
AbsDir = filename:absname(Dir, Cwd),
- compile1(Rest, Cwd, Opts#options{includes=[AbsDir|Opts#options.includes]});
-compile1(['@outdir', Dir|Rest], Cwd, Opts) ->
+ compile1(T, Opts#options{includes=[AbsDir|Opts#options.includes]});
+parse_generic_option("M"++Opt, T0, #options{specific=Spec}=Opts) ->
+ case parse_dep_option(Opt, T0) of
+ error ->
+ error;
+ {SpecOpts,T} ->
+ compile1(T, Opts#options{specific=SpecOpts++Spec})
+ end;
+parse_generic_option("o"++Opt, T0, #options{cwd=Cwd}=Opts) ->
+ {Dir,T} = get_option("o", Opt, T0),
AbsName = filename:absname(Dir, Cwd),
case file_or_directory(AbsName) of
file ->
- compile1(Rest, Cwd, Opts#options{outfile=AbsName});
+ compile1(T, Opts#options{outfile=AbsName});
directory ->
- compile1(Rest, Cwd, Opts#options{outdir=AbsName})
+ compile1(T, Opts#options{outdir=AbsName})
end;
-compile1(['@d', Name|Rest], Cwd, Opts) ->
- Defines = Opts#options.defines,
- compile1(Rest, Cwd, Opts#options{defines=[Name|Defines]});
-compile1(['@dv', Name, Term|Rest], Cwd, Opts) ->
- Defines = Opts#options.defines,
- Value = make_term(atom_to_list(Term)),
- compile1(Rest, Cwd, Opts#options{defines=[{Name, Value}|Defines]});
-compile1(['@warn', Level0|Rest], Cwd, Opts) ->
- case catch list_to_integer(atom_to_list(Level0)) of
- Level when is_integer(Level) ->
- compile1(Rest, Cwd, Opts#options{warning=Level});
+parse_generic_option("O"++Opt, T, Opts) ->
+ case Opt of
+ "" ->
+ compile1(T, Opts#options{optimize=1});
_ ->
- compile1(Rest, Cwd, Opts)
+ Term = make_term(Opt),
+ compile1(T, Opts#options{optimize=Term})
end;
-compile1(['@verbose', false|Rest], Cwd, Opts) ->
- compile1(Rest, Cwd, Opts#options{verbose=false});
-compile1(['@verbose', true|Rest], Cwd, Opts) ->
- compile1(Rest, Cwd, Opts#options{verbose=true});
-compile1(['@optimize', Atom|Rest], Cwd, Opts) ->
- Term = make_term(atom_to_list(Atom)),
- compile1(Rest, Cwd, Opts#options{optimize=Term});
-compile1(['@option', Atom|Rest], Cwd, Opts) ->
- Term = make_term(atom_to_list(Atom)),
- Specific = Opts#options.specific,
- compile1(Rest, Cwd, Opts#options{specific=[Term|Specific]});
-compile1(['@output_type', OutputType|Rest], Cwd, Opts) ->
- compile1(Rest, Cwd, Opts#options{output_type=OutputType});
-compile1(['@files'|Rest], Cwd, Opts) ->
- Includes = lists:reverse(Opts#options.includes),
- compile2(Rest, Cwd, Opts#options{includes=Includes}).
-
-compile2(Files, Cwd, Opts) ->
- case {Opts#options.outfile, length(Files)} of
+parse_generic_option("v", T, Opts) ->
+ compile1(T, Opts#options{verbose=true});
+parse_generic_option("W"++Warn, T, #options{specific=Spec}=Opts) ->
+ case Warn of
+ "all" ->
+ compile1(T, Opts#options{warning=999});
+ "error" ->
+ compile1(T, Opts#options{specific=[warnings_as_errors|Spec]});
+ "" ->
+ compile1(T, Opts#options{warning=1});
+ _ ->
+ try list_to_integer(Warn) of
+ Level ->
+ compile1(T, Opts#options{warning=Level})
+ catch
+ error:badarg ->
+ usage()
+ end
+ end;
+parse_generic_option("E", T, #options{specific=Spec}=Opts) ->
+ compile1(T, Opts#options{specific=['E'|Spec]});
+parse_generic_option("P", T, #options{specific=Spec}=Opts) ->
+ compile1(T, Opts#options{specific=['P'|Spec]});
+parse_generic_option("S", T, #options{specific=Spec}=Opts) ->
+ compile1(T, Opts#options{specific=['S'|Spec]});
+parse_generic_option(Option, _T, _Opts) ->
+ io:format(?STDERR, "Unknown option: -~s\n", [Option]),
+ usage().
+
+parse_dep_option("", T) ->
+ {[makedep,{makedep_output,standard_io}],T};
+parse_dep_option("D", T) ->
+ {[makedep],T};
+parse_dep_option("F"++Opt, T0) ->
+ {File,T} = get_option("MF", Opt, T0),
+ {[makedep,{makedep_output,File}],T};
+parse_dep_option("G", T) ->
+ {[makedep_add_missing],T};
+parse_dep_option("P", T) ->
+ {[makedep_phony],T};
+parse_dep_option("Q"++Opt, T0) ->
+ {Target,T} = get_option("MT", Opt, T0),
+ {[makedep_quote_target,{makedep_target,Target}],T};
+parse_dep_option("T"++Opt, T0) ->
+ {Target,T} = get_option("MT", Opt, T0),
+ {[{makedep_target,Target}],T};
+parse_dep_option(Opt, _T) ->
+ io:format(?STDERR, "Unknown option: -M~s\n", [Opt]),
+ usage().
+
+usage() ->
+ H = [{"-b type","type of output file (e.g. beam)"},
+ {"-d","turn on debugging of erlc itself"},
+ {"-Dname","define name"},
+ {"-Dname=value","define name to have value"},
+ {"-help","shows this help text"},
+ {"-I path","where to search for include files"},
+ {"-M","generate a rule for make(1) describing the dependencies"},
+ {"-MF file","write the dependencies to 'file'"},
+ {"-MT target","change the target of the rule emitted by dependency "
+ "generation"},
+ {"-MQ target","same as -MT but quote characters special to make(1)"},
+ {"-MG","consider missing headers as generated files and add them to "
+ "the dependencies"},
+ {"-MP","add a phony target for each dependency"},
+ {"-MD","same as -M -MT file (with default 'file')"},
+ {"-o name","name output directory or file"},
+ {"-pa path","add path to the front of Erlang's code path"},
+ {"-pz path","add path to the end of Erlang's code path"},
+ {"-smp","compile using SMP emulator"},
+ {"-v","verbose compiler output"},
+ {"-Werror","make all warnings into errors"},
+ {"-W0","disable warnings"},
+ {"-Wnumber","set warning level to number"},
+ {"-Wall","enable all warnings"},
+ {"-W","enable warnings (default; same as -W1)"},
+ {"-E","generate listing of expanded code (Erlang compiler)"},
+ {"-S","generate assembly listing (Erlang compiler)"},
+ {"-P","generate listing of preprocessed code (Erlang compiler)"},
+ {"+term","pass the Erlang term unchanged to the compiler"}],
+ io:put_chars(?STDERR,
+ ["Usage: erlc [Options] file.ext ...\n",
+ "Options:\n",
+ [io_lib:format("~-14s ~s\n", [K,D]) || {K,D} <- H]]),
+ error.
+
+get_option(_Name, [], [[C|_]=Option|T]) when C =/= $- ->
+ {Option,T};
+get_option(_Name, [_|_]=Option, T) ->
+ {Option,T};
+get_option(Name, _, _) ->
+ exit({compiler_error,"No value given to -"++Name++" option"}).
+
+split_at_equals([$=|T], Acc) ->
+ {lists:reverse(Acc),T};
+split_at_equals([H|T], Acc) ->
+ split_at_equals(T, [H|Acc]);
+split_at_equals([], Acc) ->
+ {lists:reverse(Acc),[]}.
+
+compile2(Files, #options{cwd=Cwd,includes=Incl,outfile=Outfile}=Opts0) ->
+ Opts = Opts0#options{includes=lists:reverse(Incl)},
+ case {Outfile,length(Files)} of
{"", _} ->
compile3(Files, Cwd, Opts);
{[_|_], 1} ->
compile3(Files, Cwd, Opts);
{[_|_], _N} ->
- io:format("Output file name given, but more than one input file.~n"),
+ io:put_chars(?STDERR,
+ "Output file name given, "
+ "but more than one input file.\n"),
error
end.
@@ -170,23 +291,25 @@ compile3([], _Cwd, _Options) -> ok.
%% Invokes the appropriate compiler, depending on the file extension.
compile_file("", Input, _Output, _Options) ->
- io:format("File has no extension: ~ts~n", [Input]),
+ io:format(?STDERR, "File has no extension: ~ts~n", [Input]),
error;
compile_file(Ext, Input, Output, Options) ->
case compiler(Ext) of
no ->
- io:format("Unknown extension: '~ts'\n", [Ext]),
+ io:format(?STDERR, "Unknown extension: '~ts'\n", [Ext]),
error;
{M, F} ->
case catch M:F(Input, Output, Options) of
ok -> ok;
error -> error;
{'EXIT',Reason} ->
- io:format("Compiler function ~w:~w/3 failed:\n~p~n",
+ io:format(?STDERR,
+ "Compiler function ~w:~w/3 failed:\n~p~n",
[M,F,Reason]),
error;
Other ->
- io:format("Compiler function ~w:~w/3 returned:\n~p~n",
+ io:format(?STDERR,
+ "Compiler function ~w:~w/3 returned:\n~p~n",
[M,F,Other]),
error
end
@@ -215,10 +338,10 @@ make_term(Str) ->
case erl_parse:parse_term(Tokens ++ [{dot, 1}]) of
{ok, Term} -> Term;
{error, {_,_,Reason}} ->
- io:format("~ts: ~ts~n", [Reason, Str]),
+ io:format(?STDERR, "~ts: ~ts~n", [Reason, Str]),
throw(error)
end;
{error, {_,_,Reason}, _} ->
- io:format("~ts: ~ts~n", [Reason, Str]),
+ io:format(?STDERR, "~ts: ~ts~n", [Reason, Str]),
throw(error)
end.
diff --git a/lib/stdlib/src/erl_eval.erl b/lib/stdlib/src/erl_eval.erl
index ca6a4b5c58..639ddfc214 100644
--- a/lib/stdlib/src/erl_eval.erl
+++ b/lib/stdlib/src/erl_eval.erl
@@ -18,6 +18,9 @@
%%
-module(erl_eval).
+%% Guard is_map/1 is not yet supported in HiPE.
+-compile(no_native).
+
%% An evaluator for Erlang abstract syntax.
-export([exprs/2,exprs/3,exprs/4,expr/2,expr/3,expr/4,expr/5,
@@ -74,7 +77,7 @@
%% Only exprs/2 checks the command by calling erl_lint. The reason is
%% that if there is a function handler present, then it is possible
%% that there are valid constructs in Expression to be taken care of
-%% by a function handler but considerad errors by erl_lint.
+%% by a function handler but considered errors by erl_lint.
-spec(exprs(Expressions, Bindings) -> {value, Value, NewBindings} when
Expressions :: expressions(),
@@ -179,8 +182,12 @@ check_command(Es, Bs) ->
fun_data(F) when is_function(F) ->
case erlang:fun_info(F, module) of
{module,erl_eval} ->
- {env, [FBs,_FEf,_FLf,FCs]} = erlang:fun_info(F, env),
- {fun_data,FBs,FCs};
+ case erlang:fun_info(F, env) of
+ {env,[{FBs,_FLf,_FEf,FCs}]} ->
+ {fun_data,FBs,FCs};
+ {env,[{FBs,_FLf,_FEf,FCs,FName}]} ->
+ {named_fun_data,FBs,FName,FCs}
+ end;
_ ->
false
end;
@@ -235,6 +242,28 @@ expr({record,_,Name,_}, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, {undef_record,Name}, stacktrace());
expr({record,_,_,Name,_}, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, {undef_record,Name}, stacktrace());
+
+%% map
+expr({map,_,Binding,Es}, Bs0, Lf, Ef, RBs) ->
+ {value, Map0, Bs1} = expr(Binding, Bs0, Lf, Ef, none),
+ case Map0 of
+ #{} ->
+ {Vs,Bs2} = eval_map_fields(Es, Bs0, Lf, Ef),
+ Map1 = lists:foldl(fun ({map_assoc,K,V}, Mi) ->
+ maps:put(K, V, Mi);
+ ({map_exact,K,V}, Mi) ->
+ maps:update(K, V, Mi)
+ end, Map0, Vs),
+ ret_expr(Map1, merge_bindings(Bs2, Bs1), RBs);
+ _ ->
+ erlang:raise(error, {badarg,Map0}, stacktrace())
+ end;
+expr({map,_,Es}, Bs0, Lf, Ef, RBs) ->
+ {Vs,Bs} = eval_map_fields(Es, Bs0, Lf, Ef),
+ ret_expr(lists:foldl(fun
+ ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi)
+ end, maps:new(), Vs), Bs, RBs);
+
expr({block,_,Es}, Bs, Lf, Ef, RBs) ->
exprs(Es, Bs, Lf, Ef, RBs);
expr({'if',_,Cs}, Bs, Lf, Ef, RBs) ->
@@ -262,51 +291,99 @@ expr({'fun',Line,{clauses,Cs}} = Ex, Bs, Lf, Ef, RBs) ->
{Ex1, _} = hide_calls(Ex, 0),
{ok,Used} = erl_lint:used_vars([Ex1], Bs),
En = orddict:filter(fun(K,_V) -> member(K,Used) end, Bs),
+ Info = {En,Lf,Ef,Cs},
%% This is a really ugly hack!
F =
case length(element(3,hd(Cs))) of
- 0 -> fun () -> eval_fun(Cs, [], En, Lf, Ef) end;
- 1 -> fun (A) -> eval_fun(Cs, [A], En, Lf, Ef) end;
- 2 -> fun (A,B) -> eval_fun(Cs, [A,B], En, Lf, Ef) end;
- 3 -> fun (A,B,C) -> eval_fun(Cs, [A,B,C], En, Lf, Ef) end;
- 4 -> fun (A,B,C,D) -> eval_fun(Cs, [A,B,C,D], En, Lf, Ef) end;
- 5 -> fun (A,B,C,D,E) -> eval_fun(Cs, [A,B,C,D,E], En, Lf, Ef) end;
- 6 -> fun (A,B,C,D,E,F) -> eval_fun(Cs, [A,B,C,D,E,F], En, Lf, Ef) end;
- 7 -> fun (A,B,C,D,E,F,G) ->
- eval_fun(Cs, [A,B,C,D,E,F,G], En, Lf, Ef) end;
- 8 -> fun (A,B,C,D,E,F,G,H) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H], En, Lf, Ef) end;
- 9 -> fun (A,B,C,D,E,F,G,H,I) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I], En, Lf, Ef) end;
- 10 -> fun (A,B,C,D,E,F,G,H,I,J) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J], En, Lf, Ef) end;
- 11 -> fun (A,B,C,D,E,F,G,H,I,J,K) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K], En, Lf, Ef) end;
- 12 -> fun (A,B,C,D,E,F,G,H,I,J,K,L) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L], En, Lf, Ef) end;
- 13 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M], En, Lf, Ef) end;
- 14 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N], En, Lf, Ef) end;
- 15 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O], En, Lf, Ef) end;
- 16 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P], En, Lf, Ef) end;
- 17 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q], En, Lf, Ef) end;
- 18 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R], En, Lf, Ef) end;
- 19 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S],
- En, Lf, Ef) end;
- 20 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T) ->
- eval_fun(Cs, [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T],
- En, Lf, Ef) end;
+ 0 -> fun () -> eval_fun([], Info) end;
+ 1 -> fun (A) -> eval_fun([A], Info) end;
+ 2 -> fun (A,B) -> eval_fun([A,B], Info) end;
+ 3 -> fun (A,B,C) -> eval_fun([A,B,C], Info) end;
+ 4 -> fun (A,B,C,D) -> eval_fun([A,B,C,D], Info) end;
+ 5 -> fun (A,B,C,D,E) -> eval_fun([A,B,C,D,E], Info) end;
+ 6 -> fun (A,B,C,D,E,F) -> eval_fun([A,B,C,D,E,F], Info) end;
+ 7 -> fun (A,B,C,D,E,F,G) -> eval_fun([A,B,C,D,E,F,G], Info) end;
+ 8 -> fun (A,B,C,D,E,F,G,H) -> eval_fun([A,B,C,D,E,F,G,H], Info) end;
+ 9 -> fun (A,B,C,D,E,F,G,H,I) -> eval_fun([A,B,C,D,E,F,G,H,I], Info) end;
+ 10 -> fun (A,B,C,D,E,F,G,H,I,J) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J], Info) end;
+ 11 -> fun (A,B,C,D,E,F,G,H,I,J,K) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K], Info) end;
+ 12 -> fun (A,B,C,D,E,F,G,H,I,J,K,L) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L], Info) end;
+ 13 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M], Info) end;
+ 14 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N], Info) end;
+ 15 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O], Info) end;
+ 16 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P], Info) end;
+ 17 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q], Info) end;
+ 18 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R], Info) end;
+ 19 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S], Info) end;
+ 20 -> fun (A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T) ->
+ eval_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T], Info) end;
_Other ->
erlang:raise(error, {'argument_limit',{'fun',Line,Cs}},
stacktrace())
end,
ret_expr(F, Bs, RBs);
+expr({named_fun,Line,Name,Cs} = Ex, Bs, Lf, Ef, RBs) ->
+ %% Save only used variables in the function environment.
+ %% {value,L,V} are hidden while lint finds used variables.
+ {Ex1, _} = hide_calls(Ex, 0),
+ {ok,Used} = erl_lint:used_vars([Ex1], Bs),
+ En = orddict:filter(fun(K,_V) -> member(K,Used) end, Bs),
+ Info = {En,Lf,Ef,Cs,Name},
+ %% This is a really ugly hack!
+ F =
+ case length(element(3,hd(Cs))) of
+ 0 -> fun RF() -> eval_named_fun([], RF, Info) end;
+ 1 -> fun RF(A) -> eval_named_fun([A], RF, Info) end;
+ 2 -> fun RF(A,B) -> eval_named_fun([A,B], RF, Info) end;
+ 3 -> fun RF(A,B,C) -> eval_named_fun([A,B,C], RF, Info) end;
+ 4 -> fun RF(A,B,C,D) -> eval_named_fun([A,B,C,D], RF, Info) end;
+ 5 -> fun RF(A,B,C,D,E) -> eval_named_fun([A,B,C,D,E], RF, Info) end;
+ 6 -> fun RF(A,B,C,D,E,F) -> eval_named_fun([A,B,C,D,E,F], RF, Info) end;
+ 7 -> fun RF(A,B,C,D,E,F,G) ->
+ eval_named_fun([A,B,C,D,E,F,G], RF, Info) end;
+ 8 -> fun RF(A,B,C,D,E,F,G,H) ->
+ eval_named_fun([A,B,C,D,E,F,G,H], RF, Info) end;
+ 9 -> fun RF(A,B,C,D,E,F,G,H,I) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I], RF, Info) end;
+ 10 -> fun RF(A,B,C,D,E,F,G,H,I,J) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J], RF, Info) end;
+ 11 -> fun RF(A,B,C,D,E,F,G,H,I,J,K) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K], RF, Info) end;
+ 12 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L], RF, Info) end;
+ 13 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M], RF, Info) end;
+ 14 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N], RF, Info) end;
+ 15 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O], RF, Info) end;
+ 16 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P], RF, Info) end;
+ 17 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q], RF, Info) end;
+ 18 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R], RF, Info) end;
+ 19 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S],
+ RF, Info) end;
+ 20 -> fun RF(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T) ->
+ eval_named_fun([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T],
+ RF, Info) end;
+ _Other ->
+ erlang:raise(error, {'argument_limit',{named_fun,Line,Name,Cs}},
+ stacktrace())
+ end,
+ ret_expr(F, Bs, RBs);
expr({call,_,{remote,_,{atom,_,qlc},{atom,_,q}},[{lc,_,_E,_Qs}=LC | As0]},
Bs0, Lf, Ef, RBs) when length(As0) =< 1 ->
%% No expansion or evaluation of module name or function name.
@@ -534,7 +611,7 @@ do_apply(Func, As, Bs0, Ef, RBs) ->
no_env
end,
case {Env,Ef} of
- {{env,[FBs, FEf, FLf, FCs]},_} ->
+ {{env,[{FBs,FLf,FEf,FCs}]},_} ->
%% If we are evaluting within another function body
%% (RBs =/= none), we return RBs when this function body
%% has been evalutated, otherwise we return Bs0, the
@@ -549,6 +626,17 @@ do_apply(Func, As, Bs0, Ef, RBs) ->
_ ->
erlang:raise(error, {badarity,{Func,As}},stacktrace())
end;
+ {{env,[{FBs,FLf,FEf,FCs,FName}]},_} ->
+ NRBs = if
+ RBs =:= none -> Bs0;
+ true -> RBs
+ end,
+ case {erlang:fun_info(Func, arity), length(As)} of
+ {{arity, Arity}, Arity} ->
+ eval_named_fun(FCs, As, FBs, FLf, FEf, FName, Func, NRBs);
+ _ ->
+ erlang:raise(error, {badarity,{Func,As}},stacktrace())
+ end;
{no_env,none} when RBs =:= value ->
%% Make tail recursive calls when possible.
apply(Func, As);
@@ -663,6 +751,24 @@ eval_filter(F, Bs0, Lf, Ef, CompFun, Acc) ->
end
end.
+%% eval_map_fields([Field], Bindings, LocalFunctionHandler,
+%% ExternalFuncHandler) ->
+%% {[{map_assoc | map_exact,Key,Value}],Bindings}
+
+eval_map_fields(Fs, Bs, Lf, Ef) ->
+ eval_map_fields(Fs, Bs, Lf, Ef, []).
+
+eval_map_fields([{map_field_assoc,_,K0,V0}|Fs], Bs0, Lf, Ef, Acc) ->
+ {value,K1,Bs1} = expr(K0, Bs0, Lf, Ef, none),
+ {value,V1,Bs2} = expr(V0, Bs1, Lf, Ef, none),
+ eval_map_fields(Fs, Bs2, Lf, Ef, [{map_assoc,K1,V1}|Acc]);
+eval_map_fields([{map_field_exact,_,K0,V0}|Fs], Bs0, Lf, Ef, Acc) ->
+ {value,K1,Bs1} = expr(K0, Bs0, Lf, Ef, none),
+ {value,V1,Bs2} = expr(V0, Bs1, Lf, Ef, none),
+ eval_map_fields(Fs, Bs2, Lf, Ef, [{map_exact,K1,V1}|Acc]);
+eval_map_fields([], Bs, _Lf, _Ef, Acc) ->
+ {lists:reverse(Acc),Bs}.
+
%% RBs is the bindings to return when the evalution of a function
%% (fun) has finished. If RBs =:= none, then the evalution took place
@@ -676,12 +782,12 @@ ret_expr(V, Bs, none) ->
ret_expr(V, _Bs, RBs) when is_list(RBs) ->
{value,V,RBs}.
-%% eval_fun(Clauses, Arguments, Bindings, LocalFunctionHandler,
-%% ExternalFunctionHandler) -> Value
+%% eval_fun(Arguments, {Bindings,LocalFunctionHandler,
+%% ExternalFunctionHandler,Clauses}) -> Value
%% This function is called when the fun is called from compiled code
%% or from apply.
-eval_fun(Cs, As, Bs0, Lf, Ef) ->
+eval_fun(As, {Bs0,Lf,Ef,Cs}) ->
eval_fun(Cs, As, Bs0, Lf, Ef, value).
eval_fun([{clause,_,H,G,B}|Cs], As, Bs0, Lf, Ef, RBs) ->
@@ -699,6 +805,27 @@ eval_fun([], As, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, function_clause,
[{?MODULE,'-inside-an-interpreted-fun-',As}|stacktrace()]).
+
+eval_named_fun(As, Fun, {Bs0,Lf,Ef,Cs,Name}) ->
+ eval_named_fun(Cs, As, Bs0, Lf, Ef, Name, Fun, value).
+
+eval_named_fun([{clause,_,H,G,B}|Cs], As, Bs0, Lf, Ef, Name, Fun, RBs) ->
+ Bs1 = add_binding(Name, Fun, Bs0),
+ case match_list(H, As, new_bindings(), Bs1) of
+ {match,Bsn} -> % The new bindings for the head
+ Bs2 = add_bindings(Bsn, Bs1), % which then shadow!
+ case guard(G, Bs2, Lf, Ef) of
+ true -> exprs(B, Bs2, Lf, Ef, RBs);
+ false -> eval_named_fun(Cs, As, Bs0, Lf, Ef, Name, Fun, RBs)
+ end;
+ nomatch ->
+ eval_named_fun(Cs, As, Bs0, Lf, Ef, Name, Fun, RBs)
+ end;
+eval_named_fun([], As, _Bs, _Lf, _Ef, _Name, _Fun, _RBs) ->
+ erlang:raise(error, function_clause,
+ [{?MODULE,'-inside-an-interpreted-fun-',As}|stacktrace()]).
+
+
%% expr_list(ExpressionList, Bindings)
%% expr_list(ExpressionList, Bindings, LocalFuncHandler)
%% expr_list(ExpressionList, Bindings, LocalFuncHandler, ExternalFuncHandler)
@@ -889,12 +1016,16 @@ guard0([], _Bs, _Lf, _Ef) -> true.
guard_test({call,L,{atom,Ln,F},As0}, Bs0, Lf, Ef) ->
TT = type_test(F),
G = {call,L,{atom,Ln,TT},As0},
- try {value,true,_} = expr(G, Bs0, Lf, Ef, none)
- catch error:_ -> {value,false,Bs0} end;
-guard_test({call,L,{remote,_Lr,{atom,_Lm,erlang},{atom,_Lf,_F}=T},As0},
+ expr_guard_test(G, Bs0, Lf, Ef);
+guard_test({call,L,{remote,Lr,{atom,Lm,erlang},{atom,Lf,F}},As0},
Bs0, Lf, Ef) ->
- guard_test({call,L,T,As0}, Bs0, Lf, Ef);
+ TT = type_test(F),
+ G = {call,L,{remote,Lr,{atom,Lm,erlang},{atom,Lf,TT}},As0},
+ expr_guard_test(G, Bs0, Lf, Ef);
guard_test(G, Bs0, Lf, Ef) ->
+ expr_guard_test(G, Bs0, Lf, Ef).
+
+expr_guard_test(G, Bs0, Lf, Ef) ->
try {value,true,_} = expr(G, Bs0, Lf, Ef, none)
catch error:_ -> {value,false,Bs0} end.
@@ -910,6 +1041,7 @@ type_test(port) -> is_port;
type_test(function) -> is_function;
type_test(binary) -> is_binary;
type_test(record) -> is_record;
+type_test(map) -> is_map;
type_test(Test) -> Test.
@@ -991,6 +1123,10 @@ match1({tuple,_,Elts}, Tuple, Bs, BBs)
match_tuple(Elts, Tuple, 1, Bs, BBs);
match1({tuple,_,_}, _, _Bs, _BBs) ->
throw(nomatch);
+match1({map,_,Fs}, #{}=Map, Bs, BBs) ->
+ match_map(Fs, Map, Bs, BBs);
+match1({map,_,_}, _, _Bs, _BBs) ->
+ throw(nomatch);
match1({bin, _, Fs}, <<_/bitstring>>=B, Bs0, BBs) ->
eval_bits:match_bits(Fs, B, Bs0, BBs,
match_fun(BBs),
@@ -1034,6 +1170,18 @@ match_tuple([E|Es], Tuple, I, Bs0, BBs) ->
match_tuple([], _, _, Bs, _BBs) ->
{match,Bs}.
+match_map([{map_field_exact, _, K, V}|Fs], Map, Bs0, BBs) ->
+ Vm = try
+ {value, Ke, _} = expr(K, new_bindings()),
+ maps:get(Ke,Map)
+ catch error:_ ->
+ throw(nomatch)
+ end,
+ {match, Bs} = match1(V, Vm, Bs0, BBs),
+ match_map(Fs, Map, Bs, BBs);
+match_map([], _, Bs, _) ->
+ {match, Bs}.
+
%% match_list(PatternList, TermList, Bindings) ->
%% {match,NewBindings} | nomatch
%% Try to match a list of patterns against a list of terms with the
diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl
index d05f630d8e..64a00acd88 100644
--- a/lib/stdlib/src/erl_expand_records.erl
+++ b/lib/stdlib/src/erl_expand_records.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -38,6 +38,8 @@
checked_ra=[] % successfully accessed records
}).
+-define(REC_OFFSET, 100000000). % A hundred millions. Also in v3_core.
+
-spec(module(AbsForms, CompileOptions) -> AbsForms when
AbsForms :: [erl_parse:abstract_form()],
CompileOptions :: [compile:option()]).
@@ -132,15 +134,23 @@ pattern({cons,Line,H,T}, St0) ->
pattern({tuple,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{tuple,Line,TPs},St1};
+pattern({map,Line,Ps}, St0) ->
+ {TPs,St1} = pattern_list(Ps, St0),
+ {{map,Line,TPs},St1};
+pattern({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = pattern(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{struct,Line,Tag,TPs},TPsvs,St1};
pattern({record_index,Line,Name,Field}, St) ->
{index_expr(Line, Field, Name, record_fields(Name, St)),St};
-pattern({record,Line,Name,Pfs}, St0) ->
+pattern({record,Line0,Name,Pfs}, St0) ->
Fs = record_fields(Name, St0),
{TMs,St1} = pattern_list(pattern_fields(Fs, Pfs), St0),
- {{tuple,Line,[{atom,Line,Name} | TMs]},St1};
+ Line = record_offset(Line0, St1),
+ {{tuple,Line,[{atom,Line0,Name} | TMs]},St1};
pattern({bin,Line,Es0}, St0) ->
{Es1,St1} = pattern_bin(Es0, St0),
{{bin,Line,Es1},St1};
@@ -301,14 +311,30 @@ expr({bc,Line,E0,Qs0}, St0) ->
expr({tuple,Line,Es0}, St0) ->
{Es1,St1} = expr_list(Es0, St0),
{{tuple,Line,Es1},St1};
+expr({map,Line,Es0}, St0) ->
+ {Es1,St1} = expr_list(Es0, St0),
+ {{map,Line,Es1},St1};
+expr({map,Line,Arg0,Es0}, St0) ->
+ {Arg1,St1} = expr(Arg0, St0),
+ {Es1,St2} = expr_list(Es0, St1),
+ {{map,Line,Arg1,Es1},St2};
+expr({map_field_assoc,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_assoc,Line,K,V},St2};
+expr({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%expr({struct,Line,Tag,Es0}, Vs, St0) ->
%% {Es1,Esvs,Esus,St1} = expr_list(Es0, Vs, St0),
%% {{struct,Line,Tag,Es1},Esvs,Esus,St1};
expr({record_index,Line,Name,F}, St) ->
I = index_expr(Line, F, Name, record_fields(Name, St)),
expr(I, St);
-expr({record,Line,Name,Is}, St) ->
- expr({tuple,Line,[{atom,Line,Name} |
+expr({record,Line0,Name,Is}, St) ->
+ Line = record_offset(Line0, St),
+ expr({tuple,Line,[{atom,Line0,Name} |
record_inits(record_fields(Name, St), Is)]},
St);
expr({record_field,Line,R,Name,F}, St) ->
@@ -344,6 +370,9 @@ expr({'fun',_,{function,_M,_F,_A}}=Fun, St) ->
expr({'fun',Line,{clauses,Cs0}}, St0) ->
{Cs,St1} = clauses(Cs0, St0),
{{'fun',Line,{clauses,Cs}},St1};
+expr({named_fun,Line,Name,Cs0}, St0) ->
+ {Cs,St1} = clauses(Cs0, St0),
+ {{named_fun,Line,Name,Cs},St1};
expr({call,Line,{atom,_,is_record},[A,{atom,_,Name}]}, St) ->
record_test(Line, A, Name, St);
expr({call,Line,{remote,_,{atom,_,erlang},{atom,_,is_record}},
@@ -557,8 +586,9 @@ strict_get_record_field(Line, R, {atom,_,F}=Index, Name, St0) ->
I = index_expr(F, Fs, 2),
P = record_pattern(2, I, Var, length(Fs)+1, Line, [{atom,Line,Name}]),
NLine = neg_line(Line),
+ RLine = record_offset(NLine, St),
E = {'case',NLine,R,
- [{clause,NLine,[{tuple,NLine,P}],[],[Var]},
+ [{clause,NLine,[{tuple,RLine,P}],[],[Var]},
{clause,NLine,[{var,NLine,'_'}],[],
[{call,NLine,{remote,NLine,
{atom,NLine,erlang},
@@ -672,9 +702,10 @@ record_update(R, Name, Fs, Us0, St0) ->
record_match(R, Name, Lr, Fs, Us, St0) ->
{Ps,News,St1} = record_upd_fs(Fs, Us, St0),
NLr = neg_line(Lr),
+ RLine = record_offset(Lr, St1),
{{'case',Lr,R,
- [{clause,Lr,[{tuple,Lr,[{atom,Lr,Name} | Ps]}],[],
- [{tuple,Lr,[{atom,Lr,Name} | News]}]},
+ [{clause,Lr,[{tuple,RLine,[{atom,Lr,Name} | Ps]}],[],
+ [{tuple,RLine,[{atom,Lr,Name} | News]}]},
{clause,NLr,[{var,NLr,'_'}],[],
[call_error(NLr, {tuple,NLr,[{atom,NLr,badrecord},{atom,NLr,Name}]})]}
]},
@@ -703,6 +734,10 @@ record_setel(R, Name, Fs, Us0) ->
Lr = element(2, hd(Us)),
Wildcards = duplicate(length(Fs), {var,Lr,'_'}),
NLr = neg_line(Lr),
+ %% Note: calling record_offset() here is not necessary since it is
+ %% targeted at Dialyzer which always calls the compiler with
+ %% 'strict_record_updates' meaning that record_setel() will never
+ %% be called.
{'case',Lr,R,
[{clause,Lr,[{tuple,Lr,[{atom,Lr,Name} | Wildcards]}],[],
[foldr(fun ({I,Lf,Val}, Acc) ->
@@ -811,7 +846,7 @@ optimize_is_record(H0, G0, #exprec{compile=Opts}) ->
[] ->
{H0,G0};
Rs0 ->
- case lists:member(no_is_record_optimization, Opts) of
+ case lists:member(dialyzer, Opts) of % no_is_record_optimization
true ->
{H0,G0};
false ->
@@ -936,3 +971,10 @@ opt_remove_2(A, _) -> A.
neg_line(L) ->
erl_parse:set_line(L, fun(Line) -> -abs(Line) end).
+
+record_offset(L, St) ->
+ case lists:member(dialyzer, St#exprec.compile) of
+ true when L >= 0 -> L+?REC_OFFSET;
+ true when L < 0 -> L-?REC_OFFSET;
+ false -> L
+ end.
diff --git a/lib/stdlib/src/erl_internal.erl b/lib/stdlib/src/erl_internal.erl
index 378e629ac9..edfb097de0 100644
--- a/lib/stdlib/src/erl_internal.erl
+++ b/lib/stdlib/src/erl_internal.erl
@@ -70,6 +70,7 @@ guard_bif(bit_size, 1) -> true;
guard_bif(byte_size, 1) -> true;
guard_bif(element, 2) -> true;
guard_bif(self, 0) -> true;
+guard_bif(map_size, 1) -> true;
guard_bif(node, 0) -> true;
guard_bif(node, 1) -> true;
guard_bif(tuple_size, 1) -> true;
@@ -82,6 +83,7 @@ guard_bif(is_function, 1) -> true;
guard_bif(is_function, 2) -> true;
guard_bif(is_integer, 1) -> true;
guard_bif(is_list, 1) -> true;
+guard_bif(is_map, 1) -> true;
guard_bif(is_number, 1) -> true;
guard_bif(is_pid, 1) -> true;
guard_bif(is_port, 1) -> true;
@@ -113,6 +115,7 @@ new_type_test(is_function, 1) -> true;
new_type_test(is_function, 2) -> true;
new_type_test(is_integer, 1) -> true;
new_type_test(is_list, 1) -> true;
+new_type_test(is_map, 1) -> true;
new_type_test(is_number, 1) -> true;
new_type_test(is_pid, 1) -> true;
new_type_test(is_port, 1) -> true;
@@ -267,6 +270,7 @@ bif(bitstring_to_list, 1) -> true;
bif(byte_size, 1) -> true;
bif(check_old_code, 1) -> true;
bif(check_process_code, 2) -> true;
+bif(check_process_code, 3) -> true;
bif(date, 0) -> true;
bif(delete_module, 1) -> true;
bif(demonitor, 1) -> true;
@@ -286,6 +290,7 @@ bif(float_to_binary, 1) -> true;
bif(float_to_binary, 2) -> true;
bif(garbage_collect, 0) -> true;
bif(garbage_collect, 1) -> true;
+bif(garbage_collect, 2) -> true;
bif(get, 0) -> true;
bif(get, 1) -> true;
bif(get_keys, 1) -> true;
@@ -313,6 +318,7 @@ bif(is_function, 1) -> true;
bif(is_function, 2) -> true;
bif(is_integer, 1) -> true;
bif(is_list, 1) -> true;
+bif(is_map, 1) -> true;
bif(is_number, 1) -> true;
bif(is_pid, 1) -> true;
bif(is_port, 1) -> true;
@@ -333,6 +339,7 @@ bif(list_to_pid, 1) -> true;
bif(list_to_tuple, 1) -> true;
bif(load_module, 2) -> true;
bif(make_ref, 0) -> true;
+bif(map_size,1) -> true;
bif(max,2) -> true;
bif(min,2) -> true;
bif(module_loaded, 1) -> true;
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index f599881c07..39cc03cf7a 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -80,13 +80,17 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
-type fa() :: {atom(), arity()}. % function+arity
-type ta() :: {atom(), arity()}. % type+arity
+-record(typeinfo, {attr, line}).
+
%% Usage of records, functions, and imports. The variable table, which
%% is passed on as an argument, holds the usage of variables.
-record(usage, {
calls = dict:new(), %Who calls who
imported = [], %Actually imported functions
- used_records=sets:new() :: set(), %Used record definitions
- used_types = dict:new() :: dict() %Used type definitions
+ used_records = sets:new() %Used record definitions
+ :: sets:set(atom()),
+ used_types = dict:new() %Used type definitions
+ :: dict:dict(ta(), line())
}).
%% Define the lint state record.
@@ -95,13 +99,17 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
-record(lint, {state=start :: 'start' | 'attribute' | 'function',
module=[], %Module
behaviour=[], %Behaviour
- exports=gb_sets:empty() :: gb_set(), %Exports
- imports=[], %Imports
+ exports=gb_sets:empty() :: gb_sets:set(fa()),%Exports
+ imports=[] :: [fa()], %Imports, an orddict()
compile=[], %Compile flags
- records=dict:new() :: dict(), %Record definitions
- locals=gb_sets:empty() :: gb_set(), %All defined functions (prescanned)
- no_auto=gb_sets:empty() :: gb_set(), %Functions explicitly not autoimported
- defined=gb_sets:empty() :: gb_set(), %Defined fuctions
+ records=dict:new() %Record definitions
+ :: dict:dict(atom(), {line(),Fields :: term()}),
+ locals=gb_sets:empty() %All defined functions (prescanned)
+ :: gb_sets:set(fa()),
+ no_auto=gb_sets:empty() %Functions explicitly not autoimported
+ :: gb_sets:set(fa()) | 'all',
+ defined=gb_sets:empty() %Defined fuctions
+ :: gb_sets:set(fa()),
on_load=[] :: [fa()], %On-load function
on_load_line=0 :: line(), %Line for on_load
clashes=[], %Exported functions named as BIFs
@@ -116,12 +124,16 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
%outside any fun or lc
xqlc= false :: boolean(), %true if qlc.hrl included
new = false :: boolean(), %Has user-defined 'new/N'
- called= [] :: [{fa(),line()}], %Called functions
+ called= [] :: [{fa(),line()}], %Called functions
usage = #usage{} :: #usage{},
- specs = dict:new() :: dict(), %Type specifications
- callbacks = dict:new() :: dict(), %Callback types
- types = dict:new() :: dict(), %Type definitions
- exp_types=gb_sets:empty():: gb_set() %Exported types
+ specs = dict:new() %Type specifications
+ :: dict:dict(mfa(), line()),
+ callbacks = dict:new() %Callback types
+ :: dict:dict(mfa(), line()),
+ types = dict:new() %Type definitions
+ :: dict:dict(ta(), #typeinfo{}),
+ exp_types=gb_sets:empty() %Exported types
+ :: gb_sets:set(ta())
}).
-type lint_state() :: #lint{}.
@@ -225,6 +237,10 @@ format_error({too_many_arguments,Arity}) ->
"maximum allowed is ~w", [Arity,?MAX_ARGUMENTS]);
%% --- patterns and guards ---
format_error(illegal_pattern) -> "illegal pattern";
+format_error(illegal_map_key) ->
+ "illegal map key";
+format_error({illegal_map_key_variable,K}) ->
+ io_lib:format("illegal use of variable ~w in map",[K]);
format_error(illegal_bin_pattern) ->
"binary patterns cannot be matched in parallel using '='";
format_error(illegal_expr) -> "illegal expression";
@@ -232,6 +248,9 @@ format_error({illegal_guard_local_call, {F,A}}) ->
io_lib:format("call to local/imported function ~w/~w is illegal in guard",
[F,A]);
format_error(illegal_guard_expr) -> "illegal guard expression";
+%% --- maps ---
+format_error(illegal_map_construction) ->
+ "only association operators '=>' are allowed in map construction";
%% --- records ---
format_error({undefined_record,T}) ->
io_lib:format("record ~w undefined", [T]);
@@ -281,6 +300,8 @@ format_error(utf_bittype_size_or_unit) ->
"neither size nor unit must be given for segments of type utf8/utf16/utf32";
format_error({bad_bitsize,Type}) ->
io_lib:format("bad ~s bit size", [Type]);
+format_error(unsized_binary_in_bin_gen_pattern) ->
+ "binary fields without size are not allowed in patterns of bit string generators";
%% --- behaviours ---
format_error({conflicting_behaviours,{Name,Arity},B,FirstL,FirstB}) ->
io_lib:format("conflicting behaviours - callback ~w/~w required by both '~p' "
@@ -310,10 +331,14 @@ format_error({undefined_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s undefined", [TypeName, gen_type_paren(Arity)]);
format_error({unused_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s is unused", [TypeName, gen_type_paren(Arity)]);
-format_error({new_builtin_type, {TypeName, Arity}}) ->
- io_lib:format("type ~w~s is a new builtin type; "
+%% format_error({new_builtin_type, {TypeName, Arity}}) ->
+%% io_lib:format("type ~w~s is a new builtin type; "
+%% "its (re)definition is allowed only until the next release",
+%% [TypeName, gen_type_paren(Arity)]);
+format_error({new_var_arity_type, TypeName}) ->
+ io_lib:format("type ~w is a new builtin type; "
"its (re)definition is allowed only until the next release",
- [TypeName, gen_type_paren(Arity)]);
+ [TypeName]);
format_error({builtin_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s is a builtin type; it cannot be redefined",
[TypeName, gen_type_paren(Arity)]);
@@ -337,9 +362,19 @@ format_error(spec_wrong_arity) ->
"spec has the wrong arity";
format_error(callback_wrong_arity) ->
"callback has the wrong arity";
-format_error({imported_predefined_type, Name}) ->
- io_lib:format("referring to built-in type ~w as a remote type; "
- "please take out the module name", [Name]);
+format_error({deprecated_builtin_type, {Name, Arity},
+ Replacement, Rel}) ->
+ UseS = case Replacement of
+ {Mod, NewName} ->
+ io_lib:format("use ~w:~w/~w", [Mod, NewName, Arity]);
+ {Mod, NewName, NewArity} ->
+ io_lib:format("use ~w:~w/~w or preferably ~w:~w/~w",
+ [Mod, NewName, Arity,
+ Mod, NewName, NewArity])
+ end,
+ io_lib:format("type ~w/~w is deprecated and will be "
+ "removed in ~s; use ~s",
+ [Name, Arity, Rel, UseS]);
format_error({not_exported_opaque, {TypeName, Arity}}) ->
io_lib:format("opaque type ~w~s is not exported",
[TypeName, gen_type_paren(Arity)]);
@@ -491,6 +526,9 @@ start(File, Opts) ->
{deprecated_function,
bool_option(warn_deprecated_function, nowarn_deprecated_function,
true, Opts)},
+ {deprecated_type,
+ bool_option(warn_deprecated_type, nowarn_deprecated_type,
+ true, Opts)},
{obsolete_guard,
bool_option(warn_obsolete_guard, nowarn_obsolete_guard,
true, Opts)},
@@ -842,8 +880,9 @@ behaviour_callbacks(Line, B, St0) ->
{[], St1}
end.
-behaviour_missing_callbacks([{{Line,B},Bfs}|T], #lint{exports=Exp}=St0) ->
- Missing = ordsets:subtract(ordsets:from_list(Bfs), gb_sets:to_list(Exp)),
+behaviour_missing_callbacks([{{Line,B},Bfs}|T], St0) ->
+ Exports = gb_sets:to_list(exports(St0)),
+ Missing = ordsets:subtract(ordsets:from_list(Bfs), Exports),
St = foldl(fun (F, S0) ->
add_warning(Line, {undefined_behaviour_func,F,B}, S0)
end, St0, Missing),
@@ -1007,9 +1046,10 @@ check_undefined_types(#lint{usage=Usage,types=Def}=St0) ->
Used = Usage#usage.used_types,
UTAs = dict:fetch_keys(Used),
Undef = [{TA,dict:fetch(TA, Used)} ||
- TA <- UTAs,
+ {T,_}=TA <- UTAs,
not dict:is_key(TA, Def),
- not is_default_type(TA)],
+ not is_default_type(TA),
+ not is_newly_introduced_var_arity_type(T)],
foldl(fun ({TA,L}, St) ->
add_error(L, {undefined_type,TA}, St)
end, St0, Undef).
@@ -1147,6 +1187,14 @@ export_type(Line, ETs, #lint{usage = Usage, exp_types = ETs0} = St0) ->
add_error(Line, {bad_export_type, ETs}, St0)
end.
+-spec exports(lint_state()) -> gb_sets:set(fa()).
+
+exports(#lint{compile = Opts, defined = Defs, exports = Es}) ->
+ case lists:member(export_all, Opts) of
+ true -> Defs;
+ false -> Es
+ end.
+
-type import() :: {module(), [fa()]} | module().
-spec import(line(), import(), lint_state()) -> lint_state().
@@ -1355,6 +1403,21 @@ pattern({cons,_Line,H,T}, Vt, Old, Bvt, St0) ->
{vtmerge_pat(Hvt, Tvt),vtmerge_pat(Bvt1,Bvt2),St2};
pattern({tuple,_Line,Ps}, Vt, Old, Bvt, St) ->
pattern_list(Ps, Vt, Old, Bvt, St);
+pattern({map,_Line,Ps}, Vt, Old, Bvt, St) ->
+ foldl(fun
+ ({map_field_assoc,L,_,_}, {Psvt,Bvt0,St0}) ->
+ {Psvt,Bvt0,add_error(L, illegal_pattern, St0)};
+ ({map_field_exact,L,KP,VP}, {Psvt,Bvt0,St0}) ->
+ case is_valid_map_key(KP, pattern, St0) of
+ true ->
+ {Pvt,Bvt1,St1} = pattern(VP, Vt, Old, Bvt, St0),
+ {vtmerge_pat(Pvt, Psvt),vtmerge_pat(Bvt0, Bvt1), St1};
+ false ->
+ {Psvt,Bvt0,add_error(L, illegal_map_key, St0)};
+ {false,variable,Var} ->
+ {Psvt,Bvt0,add_error(L, {illegal_map_key_variable,Var}, St0)}
+ end
+ end, {[],[],St}, Ps);
%%pattern({struct,_Line,_Tag,Ps}, Vt, Old, Bvt, St) ->
%% pattern_list(Ps, Vt, Old, Bvt, St);
pattern({record_index,Line,Name,Field}, _Vt, _Old, _Bvt, St) ->
@@ -1742,6 +1805,12 @@ gexpr({cons,_Line,H,T}, Vt, St) ->
gexpr_list([H,T], Vt, St);
gexpr({tuple,_Line,Es}, Vt, St) ->
gexpr_list(Es, Vt, St);
+gexpr({map,_Line,Es}, Vt, St) ->
+ map_fields(Es, Vt, check_assoc_fields(Es, St), fun gexpr_list/3);
+gexpr({map,_Line,Src,Es}, Vt, St) ->
+ {Svt,St1} = gexpr(Src, Vt, St),
+ {Fvt,St2} = map_fields(Es, Vt, St1, fun gexpr_list/3),
+ {vtmerge(Svt, Fvt),St2};
gexpr({record_index,Line,Name,Field}, _Vt, St) ->
check_record(Line, Name, St,
fun (Dfs, St1) -> record_field(Field, Name, Dfs, St1) end );
@@ -1814,6 +1883,10 @@ gexpr({op,Line,Op,A}, Vt, St0) ->
true -> {Avt,St1};
false -> {Avt,add_error(Line, illegal_guard_expr, St1)}
end;
+gexpr({op,_,'andalso',L,R}, Vt, St) ->
+ gexpr_list([L,R], Vt, St);
+gexpr({op,_,'orelse',L,R}, Vt, St) ->
+ gexpr_list([L,R], Vt, St);
gexpr({op,Line,Op,L,R}, Vt, St0) ->
{Avt,St1} = gexpr_list([L,R], Vt, St0),
case is_gexpr_op(Op, 2) of
@@ -1851,7 +1924,7 @@ is_guard_test(Expression, Forms) ->
end, start(), RecordAttributes),
is_guard_test2(zip_file_and_line(Expression, "nofile"), St0#lint.records).
-%% is_guard_test2(Expression, RecordDefs :: dict()) -> boolean().
+%% is_guard_test2(Expression, RecordDefs :: dict:dict()) -> boolean().
is_guard_test2({call,Line,{atom,Lr,record},[E,A]}, RDs) ->
is_gexpr({call,Line,{atom,Lr,is_record},[E,A]}, RDs);
is_guard_test2({call,_Line,{atom,_La,Test},As}=Call, RDs) ->
@@ -1900,12 +1973,14 @@ is_gexpr({call,L,{tuple,Lt,[{atom,Lm,erlang},{atom,Lf,F}]},As}, RDs) ->
is_gexpr({call,L,{remote,Lt,{atom,Lm,erlang},{atom,Lf,F}},As}, RDs);
is_gexpr({op,_L,Op,A}, RDs) ->
is_gexpr_op(Op, 1) andalso is_gexpr(A, RDs);
+is_gexpr({op,_L,'andalso',A1,A2}, RDs) ->
+ is_gexpr_list([A1,A2], RDs);
+is_gexpr({op,_L,'orelse',A1,A2}, RDs) ->
+ is_gexpr_list([A1,A2], RDs);
is_gexpr({op,_L,Op,A1,A2}, RDs) ->
is_gexpr_op(Op, 2) andalso is_gexpr_list([A1,A2], RDs);
is_gexpr(_Other, _RDs) -> false.
-is_gexpr_op('andalso', 2) -> true;
-is_gexpr_op('orelse', 2) -> true;
is_gexpr_op(Op, A) ->
try erl_internal:op_type(Op, A) of
arith -> true;
@@ -1959,6 +2034,12 @@ expr({bc,_Line,E,Qs}, Vt, St) ->
handle_comprehension(E, Qs, Vt, St);
expr({tuple,_Line,Es}, Vt, St) ->
expr_list(Es, Vt, St);
+expr({map,_Line,Es}, Vt, St) ->
+ map_fields(Es, Vt, check_assoc_fields(Es, St), fun expr_list/3);
+expr({map,_Line,Src,Es}, Vt, St) ->
+ {Svt,St1} = expr(Src, Vt, St),
+ {Fvt,St2} = map_fields(Es, Vt, St1, fun expr_list/3),
+ {vtupdate(Svt, Fvt),St2};
expr({record_index,Line,Name,Field}, _Vt, St) ->
check_record(Line, Name, St,
fun (Dfs, St1) -> record_field(Field, Name, Dfs, St1) end);
@@ -2028,6 +2109,15 @@ expr({'fun',Line,Body}, Vt, St) ->
{Bvt, St1} = expr_list([M,F,A], Vt, St),
{vtupdate(Bvt, Vt),St1}
end;
+expr({named_fun,_,'_',Cs}, Vt, St) ->
+ fun_clauses(Cs, Vt, St);
+expr({named_fun,Line,Name,Cs}, Vt, St0) ->
+ Nvt0 = [{Name,{bound,unused,[Line]}}],
+ St1 = shadow_vars(Nvt0, Vt, 'named fun', St0),
+ Nvt1 = vtupdate(vtsubtract(Vt, Nvt0), Nvt0),
+ {Csvt,St2} = fun_clauses(Cs, Nvt1, St1),
+ {_,St3} = check_unused_vars(vtupdate(Csvt, Nvt0), [], St2),
+ {vtold(Csvt, Vt),St3};
expr({call,_Line,{atom,_Lr,is_record},[E,{atom,Ln,Name}]}, Vt, St0) ->
{Rvt,St1} = expr(E, Vt, St0),
{Rvt,exist_record(Ln, Name, St1)};
@@ -2157,6 +2247,26 @@ record_expr(Line, Rec, Vt, St0) ->
St1 = warn_invalid_record(Line, Rec, St0),
expr(Rec, Vt, St1).
+check_assoc_fields([{map_field_exact,Line,_,_}|Fs], St) ->
+ check_assoc_fields(Fs, add_error(Line, illegal_map_construction, St));
+check_assoc_fields([{map_field_assoc,_,_,_}|Fs], St) ->
+ check_assoc_fields(Fs, St);
+check_assoc_fields([], St) ->
+ St.
+
+map_fields([{Tag,Line,K,V}|Fs], Vt, St, F) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact ->
+ St1 = case is_valid_map_key(K, St) of
+ true -> St;
+ false -> add_error(Line, illegal_map_key, St);
+ {false,variable,Var} -> add_error(Line, {illegal_map_key_variable,Var}, St)
+ end,
+ {Pvt,St2} = F([K,V], Vt, St1),
+ {Vts,St3} = map_fields(Fs, Vt, St2, F),
+ {vtupdate(Pvt, Vts),St3};
+map_fields([], Vt, St, _) ->
+ {Vt,St}.
+
%% warn_invalid_record(Line, Record, State0) -> State
%% Adds warning if the record is invalid.
@@ -2180,6 +2290,7 @@ is_valid_record(Rec) ->
{lc, _, _, _} -> false;
{record_index, _, _, _} -> false;
{'fun', _, _} -> false;
+ {named_fun, _, _, _} -> false;
_ -> true
end.
@@ -2208,6 +2319,70 @@ is_valid_call(Call) ->
_ -> true
end.
+%% is_valid_map_key(K,St) -> true | false | {false, Var::atom()}
+%% check for value expression without variables
+
+is_valid_map_key(K,St) ->
+ is_valid_map_key(K,expr,St).
+is_valid_map_key(K,Ctx,St) ->
+ case expr(K,[],St) of
+ {[],_} ->
+ is_valid_map_key_value(K,Ctx);
+ {[Var|_],_} ->
+ {false,variable,element(1,Var)}
+ end.
+
+is_valid_map_key_value(K,Ctx) ->
+ case K of
+ {char,_,_} -> true;
+ {integer,_,_} -> true;
+ {float,_,_} -> true;
+ {string,_,_} -> true;
+ {nil,_} -> true;
+ {atom,_,_} -> true;
+ {cons,_,H,T} ->
+ is_valid_map_key_value(H,Ctx) andalso
+ is_valid_map_key_value(T,Ctx);
+ {tuple,_,Es} ->
+ foldl(fun(E,B) ->
+ B andalso is_valid_map_key_value(E,Ctx)
+ end,true,Es);
+ {map,_,Arg,Ps} ->
+ % only check for value expressions to be valid
+ % invalid map expressions are later checked in
+ % core and kernel
+ is_valid_map_key_value(Arg,Ctx) andalso foldl(fun
+ ({Tag,_,Ke,Ve},B) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact, Ctx =:= expr ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx);
+ (_,_) -> false
+ end,true,Ps);
+ {map,_,Ps} ->
+ foldl(fun
+ ({Tag,_,Ke,Ve},B) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact, Ctx =:= expr ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx);
+ (_,_) -> false
+ end, true, Ps);
+ {record,_,_,Fs} ->
+ foldl(fun
+ ({record_field,_,Ke,Ve},B) ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx)
+ end,true,Fs);
+ {bin,_,Es} ->
+ % only check for value expressions to be valid
+ % invalid binary expressions are later checked in
+ % core and kernel
+ foldl(fun
+ ({bin_element,_,E,_,_},B) ->
+ B andalso is_valid_map_key_value(E,Ctx)
+ end,true,Es);
+ _ -> false
+ end.
+
%% record_def(Line, RecordName, [RecField], State) -> State.
%% Add a record definition if it does not already exist. Normalise
%% so that all fields have explicit initial value.
@@ -2420,8 +2595,6 @@ find_field(_F, []) -> error.
%% Attr :: 'type' | 'opaque'
%% Checks that a type definition is valid.
--record(typeinfo, {attr, line}).
-
type_def(_Attr, _Line, {record, _RecName}, Fields, [], St0) ->
%% The record field names and such are checked in the record format.
%% We only need to check the types.
@@ -2438,32 +2611,46 @@ type_def(Attr, Line, TypeName, ProtoType, Args, St0) ->
CheckType = {type, -1, product, [ProtoType|Args]},
check_type(CheckType, St#lint{types=NewDefs})
end,
- case (dict:is_key(TypePair, TypeDefs) orelse is_var_arity_type(TypeName)) of
- true ->
- case is_default_type(TypePair) of
- true ->
- case is_newly_introduced_builtin_type(TypePair) of
- %% allow some types just for bootstrapping
- true ->
- Warn = {new_builtin_type, TypePair},
- St1 = add_warning(Line, Warn, St0),
- StoreType(St1);
- false ->
- add_error(Line, {builtin_type, TypePair}, St0)
- end;
- false -> add_error(Line, {redefine_type, TypePair}, St0)
- end;
- false ->
- St1 = case
- Attr =:= opaque andalso
- is_underspecified(ProtoType, Arity)
- of
- true ->
- Warn = {underspecified_opaque, TypePair},
- add_warning(Line, Warn, St0);
- false -> St0
- end,
- StoreType(St1)
+ case is_default_type(TypePair) of
+ true ->
+ case is_obsolete_builtin_type(TypePair) of
+ true -> StoreType(St0);
+ false -> add_error(Line, {builtin_type, TypePair}, St0)
+%% case is_newly_introduced_builtin_type(TypePair) of
+%% %% allow some types just for bootstrapping
+%% true ->
+%% Warn = {new_builtin_type, TypePair},
+%% St1 = add_warning(Line, Warn, St0),
+%% StoreType(St1);
+%% false ->
+%% add_error(Line, {builtin_type, TypePair}, St0)
+%% end
+ end;
+ false ->
+ case
+ dict:is_key(TypePair, TypeDefs) orelse
+ is_var_arity_type(TypeName)
+ of
+ true ->
+ case is_newly_introduced_var_arity_type(TypeName) of
+ true ->
+ Warn = {new_var_arity_type, TypeName},
+ add_warning(Line, Warn, St0);
+ false ->
+ add_error(Line, {redefine_type, TypePair}, St0)
+ end;
+ false ->
+ St1 = case
+ Attr =:= opaque andalso
+ is_underspecified(ProtoType, Arity)
+ of
+ true ->
+ Warn = {underspecified_opaque, TypePair},
+ add_warning(Line, Warn, St0);
+ false -> St0
+ end,
+ StoreType(St1)
+ end
end.
is_underspecified({type,_,term,[]}, 0) -> true;
@@ -2487,18 +2674,12 @@ check_type({paren_type, _L, [Type]}, SeenVars, St) ->
check_type(Type, SeenVars, St);
check_type({remote_type, L, [{atom, _, Mod}, {atom, _, Name}, Args]},
SeenVars, #lint{module=CurrentMod} = St) ->
- St1 =
- case is_default_type({Name, length(Args)})
- orelse is_var_arity_type(Name) of
- true -> add_error(L, {imported_predefined_type, Name}, St);
- false -> St
- end,
case Mod =:= CurrentMod of
- true -> check_type({type, L, Name, Args}, SeenVars, St1);
+ true -> check_type({type, L, Name, Args}, SeenVars, St);
false ->
lists:foldl(fun(T, {AccSeenVars, AccSt}) ->
check_type(T, AccSeenVars, AccSt)
- end, {SeenVars, St1}, Args)
+ end, {SeenVars, St}, Args)
end;
check_type({integer, _L, _}, SeenVars, St) -> {SeenVars, St};
check_type({atom, _L, _}, SeenVars, St) -> {SeenVars, St};
@@ -2528,6 +2709,13 @@ check_type({type, L, range, [From, To]}, SeenVars, St) ->
_ -> add_error(L, {type_syntax, range}, St)
end,
{SeenVars, St1};
+check_type({type, _L, map, any}, SeenVars, St) -> {SeenVars, St};
+check_type({type, _L, map, Pairs}, SeenVars, St) ->
+ lists:foldl(fun(Pair, {AccSeenVars, AccSt}) ->
+ check_type(Pair, AccSeenVars, AccSt)
+ end, {SeenVars, St}, Pairs);
+check_type({type, _L, map_field_assoc, Dom, Range}, SeenVars, St) ->
+ check_type({type, -1, product, [Dom, Range]}, SeenVars, St);
check_type({type, _L, tuple, any}, SeenVars, St) -> {SeenVars, St};
check_type({type, _L, any}, SeenVars, St) -> {SeenVars, St};
check_type({type, L, binary, [Base, Unit]}, SeenVars, St) ->
@@ -2549,14 +2737,35 @@ check_type({type, _L, product, Args}, SeenVars, St) ->
lists:foldl(fun(T, {AccSeenVars, AccSt}) ->
check_type(T, AccSeenVars, AccSt)
end, {SeenVars, St}, Args);
-check_type({type, La, TypeName, Args}, SeenVars, #lint{usage=Usage} = St) ->
+check_type({type, La, TypeName, Args}, SeenVars, St) ->
+ #lint{usage=Usage, module = Module, types=Types} = St,
Arity = length(Args),
+ TypePair = {TypeName, Arity},
St1 = case is_var_arity_type(TypeName) of
true -> St;
false ->
- OldUsed = Usage#usage.used_types,
- UsedTypes = dict:store({TypeName, Arity}, La, OldUsed),
- St#lint{usage=Usage#usage{used_types=UsedTypes}}
+ Obsolete = (is_warn_enabled(deprecated_type, St)
+ andalso obsolete_builtin_type(TypePair)),
+ IsObsolete =
+ case Obsolete of
+ {deprecated, Repl, _} when element(1, Repl) =/= Module ->
+ case dict:find(TypePair, Types) of
+ {ok, _} -> false;
+ error -> true
+ end;
+ _ -> false
+ end,
+ case IsObsolete of
+ true ->
+ {deprecated, Replacement, Rel} = Obsolete,
+ Tag = deprecated_builtin_type,
+ W = {Tag, TypePair, Replacement, Rel},
+ add_warning(La, W, St);
+ false ->
+ OldUsed = Usage#usage.used_types,
+ UsedTypes = dict:store(TypePair, La, OldUsed),
+ St#lint{usage=Usage#usage{used_types=UsedTypes}}
+ end
end,
check_type({type, -1, product, Args}, SeenVars, St1);
check_type(I, SeenVars, St) ->
@@ -2601,6 +2810,7 @@ check_record_types([], _Name, _DefFields, SeenVars, St, _SeenFields) ->
{SeenVars, St}.
is_var_arity_type(tuple) -> true;
+is_var_arity_type(map) -> true;
is_var_arity_type(product) -> true;
is_var_arity_type(union) -> true;
is_var_arity_type(record) -> true;
@@ -2663,20 +2873,32 @@ is_default_type({timeout, 0}) -> true;
is_default_type({var, 1}) -> true;
is_default_type(_) -> false.
-%% R13
-is_newly_introduced_builtin_type({arity, 0}) -> true;
-is_newly_introduced_builtin_type({array, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({bitstring, 0}) -> true;
-is_newly_introduced_builtin_type({dict, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({digraph, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({gb_set, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({gb_tree, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({iodata, 0}) -> true;
-is_newly_introduced_builtin_type({queue, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({set, 0}) -> true; % opaque
-%% R13B01
-is_newly_introduced_builtin_type({boolean, 0}) -> true;
-is_newly_introduced_builtin_type({Name, _}) when is_atom(Name) -> false.
+is_newly_introduced_var_arity_type(map) -> true;
+is_newly_introduced_var_arity_type(_) -> false.
+
+%% is_newly_introduced_builtin_type({Name, _}) when is_atom(Name) -> false.
+
+is_obsolete_builtin_type(TypePair) ->
+ obsolete_builtin_type(TypePair) =/= no.
+
+%% Obsolete in OTP 17.0.
+obsolete_builtin_type({array, 0}) ->
+ {deprecated, {array, array, 1}, "OTP 18.0"};
+obsolete_builtin_type({dict, 0}) ->
+ {deprecated, {dict, dict, 2}, "OTP 18.0"};
+obsolete_builtin_type({digraph, 0}) ->
+ {deprecated, {digraph, graph}, "OTP 18.0"};
+obsolete_builtin_type({gb_set, 0}) ->
+ {deprecated, {gb_sets, set, 1}, "OTP 18.0"};
+obsolete_builtin_type({gb_tree, 0}) ->
+ {deprecated, {gb_trees, tree, 2}, "OTP 18.0"};
+obsolete_builtin_type({queue, 0}) ->
+ {deprecated, {queue, queue, 1}, "OTP 18.0"};
+obsolete_builtin_type({set, 0}) ->
+ {deprecated, {sets, set, 1}, "OTP 18.0"};
+obsolete_builtin_type({tid, 0}) ->
+ {deprecated, {ets, tid}, "OTP 18.0"};
+obsolete_builtin_type({Name, A}) when is_atom(Name), is_integer(A) -> no.
%% spec_decl(Line, Fun, Types, State) -> State.
@@ -2882,7 +3104,8 @@ lc_quals([{generate,_Line,P,E} | Qs], Vt0, Uvt0, St0) ->
{Vt,Uvt,St} = handle_generator(P,E,Vt0,Uvt0,St0),
lc_quals(Qs, Vt, Uvt, St);
lc_quals([{b_generate,_Line,P,E} | Qs], Vt0, Uvt0, St0) ->
- {Vt,Uvt,St} = handle_generator(P,E,Vt0,Uvt0,St0),
+ St1 = handle_bitstring_gen_pat(P,St0),
+ {Vt,Uvt,St} = handle_generator(P,E,Vt0,Uvt0,St1),
lc_quals(Qs, Vt, Uvt, St);
lc_quals([F|Qs], Vt, Uvt, St0) ->
{Fvt,St1} = case is_guard_test2(F, St0#lint.records) of
@@ -2910,6 +3133,22 @@ handle_generator(P,E,Vt,Uvt,St0) ->
Vt3 = vtupdate(vtsubtract(Vt2, Binvt), Binvt),
{Vt3,NUvt,St5}.
+handle_bitstring_gen_pat({bin,_,Segments=[_|_]},St) ->
+ case lists:last(Segments) of
+ {bin_element,Line,{var,_,_},default,Flags} when is_list(Flags) ->
+ case member(binary, Flags) orelse member(bits, Flags)
+ orelse member(bitstring, Flags) of
+ true ->
+ add_error(Line, unsized_binary_in_bin_gen_pattern, St);
+ false ->
+ St
+ end;
+ _ ->
+ St
+ end;
+handle_bitstring_gen_pat(_,St) ->
+ St.
+
%% fun_clauses(Clauses, ImportVarTable, State) ->
%% {UsedVars, State}.
%% Fun's cannot export any variables.
@@ -3544,15 +3783,22 @@ is_imported_from_erlang(ImportSet,{Func,Arity}) ->
{ok,erlang} -> true;
_ -> false
end.
-%% Build set of functions where auto-import is explicitly supressed
+%% Build set of functions where auto-import is explicitly suppressed
auto_import_suppressed(CompileFlags) ->
- L0 = [ X || {no_auto_import,X} <- CompileFlags ],
- L1 = [ {Y,Z} || {Y,Z} <- lists:flatten(L0), is_atom(Y), is_integer(Z) ],
- gb_sets:from_list(L1).
-%% Predicate to find out if autoimport is explicitly supressed for a function
+ case lists:member(no_auto_import, CompileFlags) of
+ true ->
+ all;
+ false ->
+ L0 = [ X || {no_auto_import,X} <- CompileFlags ],
+ L1 = [ {Y,Z} || {Y,Z} <- lists:flatten(L0), is_atom(Y), is_integer(Z) ],
+ gb_sets:from_list(L1)
+ end.
+%% Predicate to find out if autoimport is explicitly suppressed for a function
+is_autoimport_suppressed(all,{_Func,_Arity}) ->
+ true;
is_autoimport_suppressed(NoAutoSet,{Func,Arity}) ->
gb_sets:is_element({Func,Arity},NoAutoSet).
-%% Predicate to find out if a function specific bif-clash supression (old deprecated) is present
+%% Predicate to find out if a function specific bif-clash suppression (old deprecated) is present
bif_clash_specifically_disabled(St,{F,A}) ->
Nowarn = nowarn_function(nowarn_bif_clash, St#lint.compile),
lists:member({F,A},Nowarn).
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 7145b0858f..1d4a2a1fef 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,6 +34,7 @@ binary_comprehension
tuple
%struct
record_expr record_tuple record_field record_fields
+map_expr map_tuple map_field map_field_assoc map_field_exact map_fields map_key
if_expr if_clause if_clauses case_expr cr_clause cr_clauses receive_expr
fun_expr fun_clause fun_clauses atom_or_var integer_or_var
try_expr try_catch try_clause try_clauses
@@ -47,6 +48,7 @@ opt_bit_size_expr bit_size_expr opt_bit_type_list bit_type_list bit_type
top_type top_type_100 top_types type typed_expr typed_attr_val
type_sig type_sigs type_guard type_guards fun_type fun_type_100 binary_type
type_spec spec_fun typed_exprs typed_record_fields field_types field_type
+map_pair_types map_pair_type
bin_base_type bin_unit_type type_200 type_300 type_400 type_500.
Terminals
@@ -59,7 +61,7 @@ char integer float atom string var
'*' '/' 'div' 'rem' 'band' 'and'
'+' '-' 'bor' 'bxor' 'bsl' 'bsr' 'or' 'xor'
'++' '--'
-'==' '/=' '=<' '<' '>=' '>' '=:=' '=/=' '<='
+'==' '/=' '=<' '<' '>=' '>' '=:=' '=/=' '<=' '=>' ':='
'<<' '>>'
'!' '=' '::' '..' '...'
'spec' 'callback' % helper
@@ -154,6 +156,8 @@ type -> '[' ']' : {type, ?line('$1'), nil, []}.
type -> '[' top_type ']' : {type, ?line('$1'), list, ['$2']}.
type -> '[' top_type ',' '...' ']' : {type, ?line('$1'),
nonempty_list, ['$2']}.
+type -> '#' '{' '}' : {type, ?line('$1'), map, []}.
+type -> '#' '{' map_pair_types '}' : {type, ?line('$1'), map, '$3'}.
type -> '{' '}' : {type, ?line('$1'), tuple, []}.
type -> '{' top_types '}' : {type, ?line('$1'), tuple, '$2'}.
type -> '#' atom '{' '}' : {type, ?line('$1'), record, ['$2']}.
@@ -175,6 +179,10 @@ fun_type -> '(' top_types ')' '->' top_type
: {type, ?line('$1'), 'fun',
[{type, ?line('$1'), product, '$2'},'$5']}.
+map_pair_types -> map_pair_type : ['$1'].
+map_pair_types -> map_pair_type ',' map_pair_types : ['$1'|'$3'].
+map_pair_type -> top_type '=>' top_type : {type, ?line('$2'), map_field_assoc,'$1','$3'}.
+
field_types -> field_type : ['$1'].
field_types -> field_type ',' field_types : ['$1'|'$3'].
@@ -247,6 +255,7 @@ expr_500 -> expr_600 : '$1'.
expr_600 -> prefix_op expr_700 :
?mkop1('$1', '$2').
+expr_600 -> map_expr : '$1'.
expr_600 -> expr_700 : '$1'.
expr_700 -> function_call : '$1'.
@@ -327,6 +336,30 @@ tuple -> '{' exprs '}' : {tuple,?line('$1'),'$2'}.
%%struct -> atom tuple :
%% {struct,?line('$1'),element(3, '$1'),element(3, '$2')}.
+map_expr -> '#' map_tuple :
+ {map, ?line('$1'),'$2'}.
+map_expr -> expr_max '#' map_tuple :
+ {map, ?line('$2'),'$1','$3'}.
+map_expr -> map_expr '#' map_tuple :
+ {map, ?line('$2'),'$1','$3'}.
+
+map_tuple -> '{' '}' : [].
+map_tuple -> '{' map_fields '}' : '$2'.
+
+map_fields -> map_field : ['$1'].
+map_fields -> map_field ',' map_fields : ['$1' | '$3'].
+
+map_field -> map_field_assoc : '$1'.
+map_field -> map_field_exact : '$1'.
+
+map_field_assoc -> map_key '=>' expr :
+ {map_field_assoc,?line('$1'),'$1','$3'}.
+
+map_field_exact -> map_key ':=' expr :
+ {map_field_exact,?line('$1'),'$1','$3'}.
+
+map_key -> expr : '$1'.
+
%% N.B. This is called from expr_700.
%% N.B. Field names are returned as the complete object, even if they are
@@ -406,6 +439,9 @@ fun_clause -> argument_list clause_guard clause_body :
{Args,Pos} = '$1',
{clause,Pos,'fun',Args,'$2','$3'}.
+fun_clause -> var argument_list clause_guard clause_body :
+ {clause,element(2, '$1'),element(3, '$1'),element(1, '$2'),'$3','$4'}.
+
try_expr -> 'try' exprs 'of' cr_clauses try_catch :
build_try(?line('$1'),'$2','$4','$5').
try_expr -> 'try' exprs try_catch :
@@ -645,6 +681,8 @@ skip_paren(Type) ->
build_gen_type({atom, La, tuple}) ->
{type, La, tuple, any};
+build_gen_type({atom, La, map}) ->
+ {type, La, map, any};
build_gen_type({atom, La, Name}) ->
{type, La, Name, []}.
@@ -715,6 +753,9 @@ attribute_farity({cons,L,H,T}) ->
attribute_farity({tuple,L,Args0}) ->
Args = attribute_farity_list(Args0),
{tuple,L,Args};
+attribute_farity({map,L,Args0}) ->
+ Args = attribute_farity_map(Args0),
+ {map,L,Args};
attribute_farity({op,L,'/',{atom,_,_}=Name,{integer,_,_}=Arity}) ->
{tuple,L,[Name,Arity]};
attribute_farity(Other) -> Other.
@@ -722,6 +763,10 @@ attribute_farity(Other) -> Other.
attribute_farity_list(Args) ->
[attribute_farity(A) || A <- Args].
+%% It is not meaningful to have farity keys.
+attribute_farity_map(Args) ->
+ [{Op,L,K,attribute_farity(V)} || {Op,L,K,V} <- Args].
+
-spec error_bad_decl(integer(), attributes()) -> no_return().
error_bad_decl(L, S) ->
@@ -799,14 +844,23 @@ build_rule(Cs) ->
%% build_fun(Line, [Clause]) -> {'fun',Line,{clauses,[Clause]}}.
build_fun(Line, Cs) ->
+ Name = element(3, hd(Cs)),
Arity = length(element(4, hd(Cs))),
- {'fun',Line,{clauses,check_clauses(Cs, 'fun', Arity)}}.
+ CheckedCs = check_clauses(Cs, Name, Arity),
+ case Name of
+ 'fun' ->
+ {'fun',Line,{clauses,CheckedCs}};
+ Name ->
+ {named_fun,Line,Name,CheckedCs}
+ end.
check_clauses(Cs, Name, Arity) ->
- mapl(fun ({clause,L,N,As,G,B}) when N =:= Name, length(As) =:= Arity ->
- {clause,L,As,G,B};
- ({clause,L,_N,_As,_G,_B}) ->
- ret_err(L, "head mismatch") end, Cs).
+ [case C of
+ {clause,L,N,As,G,B} when N =:= Name, length(As) =:= Arity ->
+ {clause,L,As,G,B};
+ {clause,L,_N,_As,_G,_B} ->
+ ret_err(L, "head mismatch")
+ end || C <- Cs].
build_try(L,Es,Scs,{Ccs,As}) ->
{'try',L,Es,Scs,Ccs,As}.
@@ -816,17 +870,6 @@ ret_err(L, S) ->
{location,Location} = get_attribute(L, location),
return_error(Location, S).
-%% mapl(F,List)
-%% an alternative map which always maps from left to right
-%% and makes it possible to interrupt the mapping with throw on
-%% the first occurence from left as expected.
-%% can be removed when the jam machine (and all other machines)
-%% uses the standardized (Erlang 5.0) evaluation order (from left to right)
-mapl(F, [H|T]) ->
- V = F(H),
- [V | mapl(F,T)];
-mapl(_, []) ->
- [].
%% Convert between the abstract form of a term and a term.
@@ -850,6 +893,12 @@ normalise({cons,_,Head,Tail}) ->
[normalise(Head)|normalise(Tail)];
normalise({tuple,_,Args}) ->
list_to_tuple(normalise_list(Args));
+normalise({map,_,Pairs}=M) ->
+ maps:from_list(lists:map(fun
+ %% only allow '=>'
+ ({map_field_assoc,_,K,V}) -> {normalise(K),normalise(V)};
+ (_) -> erlang:error({badarg,M})
+ end, Pairs));
%% Special case for unary +/-.
normalise({op,_,'+',{char,_,I}}) -> I;
normalise({op,_,'+',{integer,_,I}}) -> I;
@@ -868,59 +917,65 @@ normalise_list([]) ->
Data :: term(),
AbsTerm :: abstract_expr().
abstract(T) ->
- abstract(T, 0, epp:default_encoding()).
+ abstract(T, 0, enc_func(epp:default_encoding())).
+
+-type encoding_func() :: fun((non_neg_integer()) -> boolean()).
%%% abstract/2 takes line and encoding options
-spec abstract(Data, Options) -> AbsTerm when
Data :: term(),
Options :: Line | [Option],
Option :: {line, Line} | {encoding, Encoding},
- Encoding :: latin1 | unicode | utf8,
+ Encoding :: 'latin1' | 'unicode' | 'utf8' | 'none' | encoding_func(),
Line :: erl_scan:line(),
AbsTerm :: abstract_expr().
abstract(T, Line) when is_integer(Line) ->
- abstract(T, Line, epp:default_encoding());
+ abstract(T, Line, enc_func(epp:default_encoding()));
abstract(T, Options) when is_list(Options) ->
Line = proplists:get_value(line, Options, 0),
Encoding = proplists:get_value(encoding, Options,epp:default_encoding()),
- abstract(T, Line, Encoding).
+ EncFunc = enc_func(Encoding),
+ abstract(T, Line, EncFunc).
-define(UNICODE(C),
- is_integer(C) andalso
- (C >= 0 andalso C < 16#D800 orelse
+ (C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
+enc_func(latin1) -> fun(C) -> C < 256 end;
+enc_func(unicode) -> fun(C) -> ?UNICODE(C) end;
+enc_func(utf8) -> fun(C) -> ?UNICODE(C) end;
+enc_func(none) -> none;
+enc_func(Fun) when is_function(Fun, 1) -> Fun;
+enc_func(Term) -> erlang:error({badarg, Term}).
+
abstract(T, L, _E) when is_integer(T) -> {integer,L,T};
abstract(T, L, _E) when is_float(T) -> {float,L,T};
abstract(T, L, _E) when is_atom(T) -> {atom,L,T};
abstract([], L, _E) -> {nil,L};
abstract(B, L, _E) when is_bitstring(B) ->
{bin, L, [abstract_byte(Byte, L) || Byte <- bitstring_to_list(B)]};
-abstract([C|T], L, unicode=E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C], L, E);
-abstract([C|T], L, utf8=E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C], L, E);
-abstract([C|T], L, latin1=E) when is_integer(C), 0 =< C, C < 256 ->
- abstract_string(T, [C], L, E);
-abstract([H|T], L, E) ->
+abstract([H|T], L, none=E) ->
{cons,L,abstract(H, L, E),abstract(T, L, E)};
+abstract(List, L, E) when is_list(List) ->
+ abstract_list(List, [], L, E);
abstract(Tuple, L, E) when is_tuple(Tuple) ->
- {tuple,L,abstract_list(tuple_to_list(Tuple), L, E)}.
-
-abstract_string([C|T], String, L, E) when is_integer(C), 0 =< C, C < 256 ->
- abstract_string(T, [C|String], L, E);
-abstract_string([], String, L, _E) ->
- {string, L, lists:reverse(String)};
-abstract_string(T, String, L, E) ->
- not_string(String, abstract(T, L, E), L, E).
-
-abstract_unicode_string([C|T], String, L, E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C|String], L, E);
-abstract_unicode_string([], String, L, _E) ->
+ {tuple,L,abstract_tuple_list(tuple_to_list(Tuple), L, E)};
+abstract(Map, L, E) when is_map(Map) ->
+ {map,L,abstract_map_fields(maps:to_list(Map),L,E)}.
+
+abstract_list([H|T], String, L, E) ->
+ case is_integer(H) andalso H >= 0 andalso E(H) of
+ true ->
+ abstract_list(T, [H|String], L, E);
+ false ->
+ AbstrList = {cons,L,abstract(H, L, E),abstract(T, L, E)},
+ not_string(String, AbstrList, L, E)
+ end;
+abstract_list([], String, L, _E) ->
{string, L, lists:reverse(String)};
-abstract_unicode_string(T, String, L, E) ->
+abstract_list(T, String, L, E) ->
not_string(String, abstract(T, L, E), L, E).
not_string([C|T], Result, L, E) ->
@@ -928,11 +983,14 @@ not_string([C|T], Result, L, E) ->
not_string([], Result, _L, _E) ->
Result.
-abstract_list([H|T], L, E) ->
- [abstract(H, L, E)|abstract_list(T, L, E)];
-abstract_list([], _L, _E) ->
+abstract_tuple_list([H|T], L, E) ->
+ [abstract(H, L, E)|abstract_tuple_list(T, L, E)];
+abstract_tuple_list([], _L, _E) ->
[].
+abstract_map_fields(Fs,L,E) ->
+ [{map_field_assoc,L,abstract(K,L,E),abstract(V,L,E)}||{K,V}<-Fs].
+
abstract_byte(Byte, L) when is_integer(Byte) ->
{bin_element, L, {integer, L, Byte}, default, default};
abstract_byte(Bits, L) ->
@@ -1050,3 +1108,5 @@ get_attribute(L, Name) ->
get_attributes(L) ->
erl_scan:attributes_info(L).
+
+%% vim: ft=erlang
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index 657cb5d34c..1fd6d2a8df 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -256,6 +256,10 @@ ltype({type,_Line,nonempty_list,[T]}) ->
{seq,$[,$],[$,],[ltype(T),leaf("...")]};
ltype({type,Line,nil,[]}) ->
lexpr({nil,Line}, 0, options(none));
+ltype({type,Line,map,any}) ->
+ simple_type({atom,Line,map}, []);
+ltype({type,_Line,map,Pairs}) ->
+ map_type(Pairs);
ltype({type,Line,tuple,any}) ->
simple_type({atom,Line,tuple}, []);
ltype({type,_Line,tuple,Ts}) ->
@@ -289,6 +293,23 @@ binary_type(I1, I2) ->
E2 = [[leaf("_:_*"),lexpr(I2, P, options(none))] || U],
{seq,'<<','>>',[$,],E1++E2}.
+map_type(Fs) ->
+ {first,[$#],map_pair_types(Fs)}.
+
+map_pair_types(Fs) ->
+ tuple_type(Fs, fun map_pair_type/1).
+
+map_pair_type({type,_Line,map_field_assoc,Ktype,Vtype}) ->
+ map_assoc_typed(ltype(Ktype), Vtype).
+
+map_assoc_typed(B, {type,_,union,Ts}) ->
+ {first,[B,$\s],{seq,[],[],[],map_assoc_union_type(Ts)}};
+map_assoc_typed(B, Type) ->
+ {list,[{cstep,[B," =>"],ltype(Type)}]}.
+
+map_assoc_union_type([T|Ts]) ->
+ [[leaf("=> "),ltype(T)] | ltypes(Ts, fun union_elem/1)].
+
record_type(Name, Fields) ->
{first,[record_name(Name)],field_types(Fields)}.
@@ -479,6 +500,15 @@ lexpr({record_field, _, Rec, F}, Prec, Opts) ->
{L,P,R} = inop_prec('.'),
El = [lexpr(Rec, L, Opts),$.,lexpr(F, R, Opts)],
maybe_paren(P, Prec, El);
+lexpr({map, _, Fs}, Prec, Opts) ->
+ {P,_R} = preop_prec('#'),
+ El = {first,leaf("#"),map_fields(Fs, Opts)},
+ maybe_paren(P, Prec, El);
+lexpr({map, _, Map, Fs}, Prec, Opts) ->
+ {L,P,_R} = inop_prec('#'),
+ Rl = lexpr(Map, L, Opts),
+ El = {first,[Rl,leaf("#")],map_fields(Fs, Opts)},
+ maybe_paren(P, Prec, El);
lexpr({block,_,Es}, _, Opts) ->
{list,[{step,'begin',body(Es, Opts)},'end']};
lexpr({'if',_,Cs}, _, Opts) ->
@@ -511,10 +541,17 @@ lexpr({'fun',_,{function,M,F,A}}, _Prec, Opts) ->
ArityItem = lexpr(A, Opts),
["fun ",NameItem,$:,CallItem,$/,ArityItem];
lexpr({'fun',_,{clauses,Cs}}, _Prec, Opts) ->
- {list,[{first,'fun',fun_clauses(Cs, Opts)},'end']};
+ {list,[{first,'fun',fun_clauses(Cs, Opts, unnamed)},'end']};
+lexpr({named_fun,_,Name,Cs}, _Prec, Opts) ->
+ {list,[{first,['fun', " "],fun_clauses(Cs, Opts, {named, Name})},'end']};
lexpr({'fun',_,{clauses,Cs},Extra}, _Prec, Opts) ->
{force_nl,fun_info(Extra),
- {list,[{first,'fun',fun_clauses(Cs, Opts)},'end']}};
+ {list,[{first,'fun',fun_clauses(Cs, Opts, unnamed)},'end']}};
+lexpr({named_fun,_,Name,Cs,Extra}, _Prec, Opts) ->
+ {force_nl,fun_info(Extra),
+ {list,[{first,['fun', " "],fun_clauses(Cs, Opts, {named, Name})},'end']}};
+lexpr({'query',_,Lc}, _Prec, Opts) ->
+ {list,[{step,leaf("query"),lexpr(Lc, 0, Opts)},'end']};
lexpr({call,_,{remote,_,{atom,_,M},{atom,_,F}=N}=Name,Args}, Prec, Opts) ->
case erl_internal:bif(M, F, length(Args)) of
true ->
@@ -664,6 +701,16 @@ record_field({typed_record_field,Field,Type}, Opts) ->
record_field({record_field,_,F}, Opts) ->
lexpr(F, 0, Opts).
+map_fields(Fs, Opts) ->
+ tuple(Fs, fun map_field/2, Opts).
+
+map_field({map_field_assoc,_,K,V}, Opts) ->
+ Pl = lexpr(K, 0, Opts),
+ {list,[{step,[Pl,leaf(" =>")],lexpr(V, 0, Opts)}]};
+map_field({map_field_exact,_,K,V}, Opts) ->
+ Pl = lexpr(K, 0, Opts),
+ {list,[{step,[Pl,leaf(" :=")],lexpr(V, 0, Opts)}]}.
+
list({cons,_,H,T}, Es, Opts) ->
list(T, [H|Es], Opts);
list({nil,_}, Es, Opts) ->
@@ -729,8 +776,13 @@ stack_backtrace(S, El, Opts) ->
%% fun_clauses(Clauses, Opts) -> [Char].
%% Print 'fun' clauses.
-fun_clauses(Cs, Opts) ->
- nl_clauses(fun fun_clause/2, [$;], Opts, Cs).
+fun_clauses(Cs, Opts, unnamed) ->
+ nl_clauses(fun fun_clause/2, [$;], Opts, Cs);
+fun_clauses(Cs, Opts, {named, Name}) ->
+ nl_clauses(fun (C, H) ->
+ {step,Gl,Bl} = fun_clause(C, H),
+ {step,[atom_to_list(Name),Gl],Bl}
+ end, [$;], Opts, Cs).
fun_clause({clause,_,A,G,B}, Opts) ->
El = args(A, Opts),
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index d988a4d8c7..6fd6bb888b 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -570,7 +569,7 @@ scan1("++"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "++", '++', 2);
scan1("+"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
-%% =:= =/= =< ==
+%% =:= =/= =< == =>
scan1("=:="++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "=:=", '=:=', 3);
scan1("=:"=Cs, _St, Line, Col, Toks) ->
@@ -581,6 +580,8 @@ scan1("=/"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
scan1("=<"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "=<", '=<', 2);
+scan1("=>"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=>", '=>', 2);
scan1("=="++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "==", '==', 2);
scan1("="=Cs, _St, Line, Col, Toks) ->
@@ -595,6 +596,9 @@ scan1("||"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "||", '||', 2);
scan1("|"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% :=
+scan1(":="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":=", ':=', 2);
%% :-
scan1(":-"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, ":-", ':-', 2);
@@ -1071,7 +1075,7 @@ scan_number([$#|Cs]=Cs0, St, Line, Col, Toks, Ncs0) ->
Ncs = lists:reverse(Ncs0),
case catch list_to_integer(Ncs) of
B when B >= 2, B =< 1+$Z-$A+10 ->
- Bcs = ?STR(St, Ncs++[$#]),
+ Bcs = Ncs++[$#],
scan_based_int(Cs, St, Line, Col, Toks, {B,[],Bcs});
B ->
Len = length(Ncs),
@@ -1104,7 +1108,7 @@ scan_based_int(Cs, St, Line, Col, Toks, {B,Ncs0,Bcs}) ->
Ncs = lists:reverse(Ncs0),
case catch erlang:list_to_integer(Ncs, B) of
N when is_integer(N) ->
- tok3(Cs, St, Line, Col, Toks, integer, ?STR(St, Bcs++Ncs), N);
+ tok3(Cs, St, Line, Col, Toks, integer, Bcs++Ncs, N);
_ ->
Len = length(Bcs)+length(Ncs),
Ncol = incr_column(Col, Len),
diff --git a/lib/stdlib/src/erl_tar.erl b/lib/stdlib/src/erl_tar.erl
index 40ef6c8998..caa3276d09 100644
--- a/lib/stdlib/src/erl_tar.erl
+++ b/lib/stdlib/src/erl_tar.erl
@@ -22,7 +22,7 @@
%% Purpose: Unix tar (tape archive) utility.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--export([create/2, create/3, extract/1, extract/2, table/1, table/2,
+-export([init/3, create/2, create/3, extract/1, extract/2, table/1, table/2,
open/2, close/1, add/3, add/4,
t/1, tt/1, format_error/1]).
@@ -30,10 +30,16 @@
-record(add_opts,
{read_info, % Fun to use for read file/link info.
+ chunk_size = 0, % For file reading when sending to sftp. 0=do not chunk
verbose = false :: boolean()}). % Verbose on/off.
%% Opens a tar archive.
+init(UsrHandle, AccessMode, Fun) when is_function(Fun,2) ->
+ {ok, {AccessMode,{tar_descriptor,UsrHandle,Fun}}}.
+
+%%%================================================================
+%%% The open function with friends is to keep the file and binary api of this module
open(Name, Mode) ->
case open_mode(Mode) of
{ok, Access, Raw, Opts} ->
@@ -45,31 +51,38 @@ open(Name, Mode) ->
open1({binary,Bin}, read, _Raw, Opts) ->
case file:open(Bin, [ram,binary,read]) of
{ok,File} ->
- case Opts of
- [compressed] -> ram_file:uncompress(File);
- [] -> ok
- end,
- {ok,{read,File}};
+ _ = [ram_file:uncompress(File) || Opts =:= [compressed]],
+ init(File,read,file_fun());
Error ->
Error
end;
open1({file, Fd}, read, _Raw, _Opts) ->
- {ok, {read, Fd}};
+ init(Fd, read, file_fun());
open1(Name, Access, Raw, Opts) ->
case file:open(Name, Raw ++ [binary, Access|Opts]) of
{ok, File} ->
- {ok, {Access, File}};
+ init(File, Access, file_fun());
{error, Reason} ->
{error, {Name, Reason}}
end.
+file_fun() ->
+ fun(write, {Fd,Data}) -> file:write(Fd, Data);
+ (position, {Fd,Pos}) -> file:position(Fd, Pos);
+ (read2, {Fd,Size}) -> file:read(Fd,Size);
+ (close, Fd) -> file:close(Fd)
+ end.
+
+%%% End of file and binary api (except for open_mode/1 downwards
+%%%================================================================
+
%% Closes a tar archive.
close({read, File}) ->
- ok = file:close(File);
+ ok = do_close(File);
close({write, File}) ->
PadResult = pad_file(File),
- ok = file:close(File),
+ ok = do_close(File),
PadResult;
close(_) ->
{error, einval}.
@@ -78,7 +91,6 @@ close(_) ->
add(File, Name, Options) ->
add(File, Name, Name, Options).
-
add({write, File}, Name, NameInArchive, Options) ->
Opts = #add_opts{read_info=fun(F) -> file:read_link_info(F) end},
add1(File, Name, NameInArchive, add_opts(Options, Opts));
@@ -91,6 +103,8 @@ add_opts([dereference|T], Opts) ->
add_opts(T, Opts#add_opts{read_info=fun(F) -> file:read_file_info(F) end});
add_opts([verbose|T], Opts) ->
add_opts(T, Opts#add_opts{verbose=true});
+add_opts([{chunks,N}|T], Opts) ->
+ add_opts(T, Opts#add_opts{chunk_size=N});
add_opts([_|T], Opts) ->
add_opts(T, Opts);
add_opts([], Opts) ->
@@ -324,16 +338,46 @@ add1(TarFile, Name, NameInArchive, Opts) ->
{error, {Name, Reason}}
end.
+add1(Tar, Name, Header, chunked, Options) ->
+ add_verbose(Options, "a ~ts [chunked ", [Name]),
+ try
+ ok = do_write(Tar, Header),
+ {ok,D} = file:open(Name, [read,binary]),
+ {ok,NumBytes} = add_read_write_chunks(D, Tar, Options#add_opts.chunk_size, 0, Options),
+ _ = file:close(D),
+ ok = do_write(Tar, padding(NumBytes,?record_size))
+ of
+ ok ->
+ add_verbose(Options, "~n", []),
+ ok
+ catch
+ error:{badmatch,{error,Error}} ->
+ add_verbose(Options, "~n", []),
+ {error,{Name,Error}}
+ end;
add1(Tar, Name, Header, Bin, Options) ->
add_verbose(Options, "a ~ts~n", [Name]),
- file:write(Tar, [Header, Bin, padding(byte_size(Bin), ?record_size)]).
+ do_write(Tar, [Header, Bin, padding(byte_size(Bin), ?record_size)]).
+
+add_read_write_chunks(D, Tar, ChunkSize, SumNumBytes, Options) ->
+ case file:read(D, ChunkSize) of
+ {ok,Bin} ->
+ ok = do_write(Tar, Bin),
+ add_verbose(Options, ".", []),
+ add_read_write_chunks(D, Tar, ChunkSize, SumNumBytes+byte_size(Bin), Options);
+ eof ->
+ add_verbose(Options, "]", []),
+ {ok,SumNumBytes};
+ Other ->
+ Other
+ end.
add_directory(TarFile, DirName, NameInArchive, Info, Options) ->
case file:list_dir(DirName) of
{ok, []} ->
add_verbose(Options, "a ~ts~n", [DirName]),
Header = create_header(NameInArchive, Info),
- file:write(TarFile, Header);
+ do_write(TarFile, Header);
{ok, Files} ->
Add = fun (File) ->
add1(TarFile,
@@ -384,7 +428,12 @@ to_octal(Int, Count, Result) ->
to_octal(Int div 8, Count-1, [Int rem 8 + $0|Result]).
to_string(Str0, Count) ->
- Str = list_to_binary(Str0),
+ Str = case file:native_name_encoding() of
+ utf8 ->
+ unicode:characters_to_binary(Str0);
+ latin1 ->
+ list_to_binary(Str0)
+ end,
case byte_size(Str) of
Size when Size < Count ->
[Str|zeroes(Count-Size)];
@@ -394,10 +443,18 @@ to_string(Str0, Count) ->
%% Pads out end of file.
pad_file(File) ->
- {ok,Position} = file:position(File, {cur,0}),
- %% There must be at least one empty record at the end of the file.
- Zeros = zeroes(?block_size - (Position rem ?block_size)),
- file:write(File, Zeros).
+ {ok,Position} = do_position(File, {cur,0}),
+ %% There must be at least two zero records at the end.
+ Fill = case ?block_size - (Position rem ?block_size) of
+ Fill0 when Fill0 < 2*?record_size ->
+ %% We need to another block here to ensure that there
+ %% are at least two zero records at the end.
+ Fill0 + ?block_size;
+ Fill0 ->
+ %% Large enough.
+ Fill0
+ end,
+ do_write(File, zeroes(Fill)).
split_filename(Name) when length(Name) =< ?th_name_len ->
{"", Name};
@@ -475,27 +532,36 @@ read_opts([_|Rest], Opts) ->
read_opts([], Opts) ->
Opts.
+foldl_read({AccessMode,TD={tar_descriptor,_UsrHandle,_AccessFun}}, Fun, Accu, Opts) ->
+ case AccessMode of
+ read ->
+ foldl_read0(TD, Fun, Accu, Opts);
+ _ ->
+ {error,{read_mode_expected,AccessMode}}
+ end;
foldl_read(TarName, Fun, Accu, Opts) ->
case open(TarName, [read|Opts#read_opts.open_mode]) of
{ok, {read, File}} ->
- Result =
- case catch foldl_read1(Fun, Accu, File, Opts) of
- {'EXIT', Reason} ->
- exit(Reason);
- {error, {Reason, Format, Args}} ->
- read_verbose(Opts, Format, Args),
- {error, Reason};
- {error, Reason} ->
- {error, Reason};
- Ok ->
- Ok
- end,
- ok = file:close(File),
+ Result = foldl_read0(File, Fun, Accu, Opts),
+ ok = do_close(File),
Result;
Error ->
Error
end.
+foldl_read0(File, Fun, Accu, Opts) ->
+ case catch foldl_read1(Fun, Accu, File, Opts) of
+ {'EXIT', Reason} ->
+ exit(Reason);
+ {error, {Reason, Format, Args}} ->
+ read_verbose(Opts, Format, Args),
+ {error, Reason};
+ {error, Reason} ->
+ {error, Reason};
+ Ok ->
+ Ok
+ end.
+
foldl_read1(Fun, Accu0, File, Opts) ->
case get_header(File) of
eof ->
@@ -549,7 +615,7 @@ check_extract(Name, #read_opts{files=Files}) ->
ordsets:is_element(Name, Files).
get_header(File) ->
- case file:read(File, ?record_size) of
+ case do_read(File, ?record_size) of
eof ->
throw({error,eof});
{ok, Bin} when is_binary(Bin) ->
@@ -611,7 +677,22 @@ typeflag(Bin) ->
%% Get the name of the file from the prefix and name fields of the
%% tar header.
-get_name(Bin) ->
+get_name(Bin0) ->
+ List0 = get_name_raw(Bin0),
+ case file:native_name_encoding() of
+ utf8 ->
+ Bin = list_to_binary(List0),
+ case unicode:characters_to_list(Bin) of
+ {error,_,_} ->
+ List0;
+ List when is_list(List) ->
+ List
+ end;
+ latin1 ->
+ List0
+ end.
+
+get_name_raw(Bin) ->
Name = from_string(Bin, ?th_name, ?th_name_len),
case binary_to_list(Bin, ?th_prefix+1, ?th_prefix+1) of
[0] ->
@@ -665,7 +746,7 @@ get_element(File, #tar_header{size = 0}) ->
skip_to_next(File),
{ok,<<>>};
get_element(File, #tar_header{size = Size}) ->
- case file:read(File, Size) of
+ case do_read(File, Size) of
{ok,Bin}=Res when byte_size(Bin) =:= Size ->
skip_to_next(File),
Res;
@@ -855,7 +936,7 @@ skip(File, Size) ->
%% Note: There is no point in handling failure to get the current position
%% in the file. If it doesn't work, something serious is wrong.
Amount = ((Size + ?record_size - 1) div ?record_size) * ?record_size,
- {ok,_} = file:position(File, {cur, Amount}),
+ {ok,_} = do_position(File, {cur, Amount}),
ok.
%% Skips to the next record in the file.
@@ -863,9 +944,9 @@ skip(File, Size) ->
skip_to_next(File) ->
%% Note: There is no point in handling failure to get the current position
%% in the file. If it doesn't work, something serious is wrong.
- {ok, Position} = file:position(File, {cur, 0}),
+ {ok, Position} = do_position(File, {cur, 0}),
NewPosition = ((Position + ?record_size - 1) div ?record_size) * ?record_size,
- {ok,NewPosition} = file:position(File, NewPosition),
+ {ok,NewPosition} = do_position(File, NewPosition),
ok.
%% Prints the message on if the verbose option is given.
@@ -891,6 +972,9 @@ posix_to_erlang_time(Sec) ->
read_file_and_info(Name, Opts) ->
ReadInfo = Opts#add_opts.read_info,
case ReadInfo(Name) of
+ {ok,Info} when Info#file_info.type =:= regular,
+ Opts#add_opts.chunk_size>0 ->
+ {ok,chunked,Info};
{ok,Info} when Info#file_info.type =:= regular ->
case file:read_file(Name) of
{ok,Bin} ->
@@ -937,3 +1021,12 @@ open_mode([], Access, Raw, Opts) ->
{ok, Access, Raw, Opts};
open_mode(_, _, _, _) ->
{error, einval}.
+
+%%%================================================================
+do_write({tar_descriptor,UsrHandle,Fun}, Data) -> Fun(write,{UsrHandle,Data}).
+
+do_position({tar_descriptor,UsrHandle,Fun}, Pos) -> Fun(position,{UsrHandle,Pos}).
+
+do_read({tar_descriptor,UsrHandle,Fun}, Len) -> Fun(read2,{UsrHandle,Len}).
+
+do_close({tar_descriptor,UsrHandle,Fun}) -> Fun(close,UsrHandle).
diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl
index ad5891f191..e92142d154 100644
--- a/lib/stdlib/src/error_logger_tty_h.erl
+++ b/lib/stdlib/src/error_logger_tty_h.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,7 +54,7 @@ init([]) ->
handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
{ok, State};
handle_event(Event, State) ->
- write_event(tag_event(Event),io),
+ ok = write_event(tag_event(Event),io),
{ok, State}.
handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
@@ -66,10 +66,10 @@ handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
PrevHandler, go_back}
end;
handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
- write_event(tag_event({emulator, GL, Chars}),io),
+ ok = write_event(tag_event({emulator, GL, Chars}),io),
{ok, State};
handle_info({emulator, noproc, Chars}, State) ->
- write_event(tag_event({emulator, noproc, Chars}),io),
+ ok = write_event(tag_event({emulator, noproc, Chars}),io),
{ok, State};
handle_info(_, State) ->
{ok, State}.
@@ -99,10 +99,11 @@ set_group_leader() ->
tag_event(Event) ->
{erlang:universaltime(), Event}.
+%% IOMOd is always 'io'
write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
write_events1([Event|Es],IOMod) ->
- write_event(Event,IOMod),
+ ok = write_event(Event,IOMod),
write_events1(Es,IOMod);
write_events1([],_IOMod) ->
ok.
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index fea718541d..6bd0eb8a22 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -59,7 +59,6 @@
file:filename()
| {file:filename(), binary()}
| {file:filename(), binary(), file:file_info()}.
--type zip_create_option() :: term().
-type section() ::
shebang
| {shebang, shebang() | default | undefined}
@@ -68,8 +67,8 @@
| {emu_args, emu_args() | undefined}
| {source, file:filename() | binary()}
| {beam, file:filename() | binary()}
- | {archive, file:filename() | binary()}
- | {archive, [zip_file()], [zip_create_option()]}.
+ | {archive, zip:filename() | binary()}
+ | {archive, [zip_file()], [zip:create_option()]}.
%%-----------------------------------------------------------------------
@@ -289,6 +288,8 @@ start(EscriptOptions) ->
my_halt(127)
end.
+-spec parse_and_run(_, _, _) -> no_return().
+
parse_and_run(File, Args, Options) ->
CheckOnly = lists:member("s", Options),
{Source, Module, FormsOrBin, HasRecs, Mode} =
@@ -727,6 +728,8 @@ epp_parse_file2(Epp, S, Forms, Parsed) ->
%% Evaluate script
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec debug(_, _, _) -> no_return().
+
debug(Module, AbsMod, Args) ->
case hidden_apply(debugger, debugger, start, []) of
{ok, _} ->
@@ -742,6 +745,8 @@ debug(Module, AbsMod, Args) ->
fatal("Cannot start the debugger")
end.
+-spec run(_, _) -> no_return().
+
run(Module, Args) ->
try
Module:main(Args),
@@ -751,6 +756,8 @@ run(Module, Args) ->
fatal(format_exception(Class, Reason))
end.
+-spec interpret(_, _, _, _) -> no_return().
+
interpret(Forms, HasRecs, File, Args) ->
%% Basic validation before execution
case erl_lint:module(Forms) of
@@ -771,9 +778,11 @@ interpret(Forms, HasRecs, File, Args) ->
ArgsA = erl_parse:abstract(Args, 0),
Call = {call,0,{atom,0,main},[ArgsA]},
try
- erl_eval:expr(Call,
- erl_eval:new_bindings(),
- {value,fun(I, J) -> code_handler(I, J, Dict, File) end}),
+ _ = erl_eval:expr(Call,
+ erl_eval:new_bindings(),
+ {value,fun(I, J) ->
+ code_handler(I, J, Dict, File)
+ end}),
my_halt(0)
catch
Class:Reason ->
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index 77c8029f59..93c4f59896 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,10 +53,8 @@
| {tab(),integer(),integer(),binary(),list(),integer()}
| {tab(),_,_,integer(),binary(),list(),integer(),integer()}.
-%% a similar definition is also in erl_types
-opaque tid() :: integer().
-%% these ones are also defined in erl_bif_types
-type match_pattern() :: atom() | tuple().
-type match_spec() :: [{match_pattern(), [_], [_]}].
@@ -507,7 +505,7 @@ fun2ms(ShellFun) when is_function(ShellFun) ->
Else ->
Else
end;
- false ->
+ _ ->
exit({badarg,{?MODULE,fun2ms,
[function,called,with,real,'fun',
should,be,transformed,with,
@@ -719,7 +717,7 @@ tab2file(Tab, File) ->
tab2file(Tab, File, Options) ->
try
{ok, FtOptions} = parse_ft_options(Options),
- file:delete(File),
+ _ = file:delete(File),
case file:read_file_info(File) of
{error, enoent} -> ok;
_ -> throw(eaccess)
@@ -750,14 +748,18 @@ tab2file(Tab, File, Options) ->
{fun(Oldstate,Termlist) ->
{NewState,BinList} =
md5terms(Oldstate,Termlist),
- disk_log:blog_terms(Name,BinList),
- NewState
+ case disk_log:blog_terms(Name,BinList) of
+ ok -> NewState;
+ {error, Reason2} -> throw(Reason2)
+ end
end,
erlang:md5_init()};
false ->
{fun(_,Termlist) ->
- disk_log:log_terms(Name,Termlist),
- true
+ case disk_log:log_terms(Name,Termlist) of
+ ok -> true;
+ {error, Reason2} -> throw(Reason2)
+ end
end,
true}
end,
@@ -792,16 +794,16 @@ tab2file(Tab, File, Options) ->
disk_log:close(Name)
catch
throw:TReason ->
- disk_log:close(Name),
- file:delete(File),
+ _ = disk_log:close(Name),
+ _ = file:delete(File),
throw(TReason);
exit:ExReason ->
- disk_log:close(Name),
- file:delete(File),
+ _ = disk_log:close(Name),
+ _ = file:delete(File),
exit(ExReason);
error:ErReason ->
- disk_log:close(Name),
- file:delete(File),
+ _ = disk_log:close(Name),
+ _ = file:delete(File),
erlang:raise(error,ErReason,erlang:get_stacktrace())
end
catch
@@ -892,25 +894,32 @@ file2tab(File, Opts) ->
try
{ok,Verify,TabArg} = parse_f2t_opts(Opts,false,[]),
Name = make_ref(),
- {ok, Major, Minor, FtOptions, MD5State, FullHeader, DLContext} =
+ {ok, Name} =
case disk_log:open([{name, Name},
{file, File},
{mode, read_only}]) of
{ok, Name} ->
- get_header_data(Name,Verify);
+ {ok, Name};
{repaired, Name, _,_} -> %Uh? cannot happen?
case Verify of
true ->
- disk_log:close(Name),
+ _ = disk_log:close(Name),
throw(badfile);
false ->
- get_header_data(Name,Verify)
+ {ok, Name}
end;
{error, Other1} ->
throw({read_error, Other1});
Other2 ->
throw(Other2)
end,
+ {ok, Major, Minor, FtOptions, MD5State, FullHeader, DLContext} =
+ try get_header_data(Name, Verify)
+ catch
+ badfile ->
+ _ = disk_log:close(Name),
+ throw(badfile)
+ end,
try
if
Major > ?MAJOR_F2T_VERSION ->
@@ -974,7 +983,7 @@ file2tab(File, Opts) ->
erlang:raise(error,ErReason,erlang:get_stacktrace())
end
after
- disk_log:close(Name)
+ _ = disk_log:close(Name)
end
catch
throw:TReason2 ->
@@ -1293,20 +1302,30 @@ named_table(false) -> [].
tabfile_info(File) when is_list(File) ; is_atom(File) ->
try
Name = make_ref(),
- {ok, Major, Minor, _FtOptions, _MD5State, FullHeader, _DLContext} =
+ {ok, Name} =
case disk_log:open([{name, Name},
{file, File},
{mode, read_only}]) of
{ok, Name} ->
- get_header_data(Name,false);
+ {ok, Name};
{repaired, Name, _,_} -> %Uh? cannot happen?
- get_header_data(Name,false);
+ {ok, Name};
{error, Other1} ->
throw({read_error, Other1});
Other2 ->
throw(Other2)
end,
- disk_log:close(Name),
+ {ok, Major, Minor, _FtOptions, _MD5State, FullHeader, _DLContext} =
+ try get_header_data(Name, false)
+ catch
+ badfile ->
+ _ = disk_log:close(Name),
+ throw(badfile)
+ end,
+ case disk_log:close(Name) of
+ ok -> ok;
+ {error, Reason} -> throw(Reason)
+ end,
{value, N} = lists:keysearch(name, 1, FullHeader),
{value, Type} = lists:keysearch(type, 1, FullHeader),
{value, P} = lists:keysearch(protection, 1, FullHeader),
@@ -1594,13 +1613,18 @@ choice(Height, Width, P, Mode, Tab, Key, Turn, Opos) ->
end.
get_line(P, Default) ->
- case io:get_line(P) of
+ case line_string(io:get_line(P)) of
"\n" ->
Default;
L ->
L
end.
+%% If the standard input is set to binary mode
+%% convert it to a list so we can properly match.
+line_string(Binary) when is_binary(Binary) -> unicode:characters_to_list(Binary);
+line_string(Other) -> Other.
+
nonl(S) -> string:strip(S, right, $\n).
print_number(Tab, Key, Num) ->
diff --git a/lib/stdlib/src/eval_bits.erl b/lib/stdlib/src/eval_bits.erl
index e49cbc1fd1..75fe2c00c7 100644
--- a/lib/stdlib/src/eval_bits.erl
+++ b/lib/stdlib/src/eval_bits.erl
@@ -192,7 +192,7 @@ bin_gen_field({bin_element,Line,VE,Size0,Options0},
make_bit_type(Line, Size0, Options0),
V = erl_eval:partial_eval(VE),
NewV = coerce_to_float(V, Type),
- match_check_size(Mfun, Size1, BBs0),
+ match_check_size(Mfun, Size1, BBs0, false),
{value, Size, _BBs} = Efun(Size1, BBs0),
bin_gen_field1(Bin, Type, Size, Unit, Sign, Endian, NewV, Bs0, BBs0, Mfun).
@@ -380,20 +380,25 @@ make_bit_type(_Line, Size, Type0) -> %Size evaluates to an integer or 'all'
{error,Reason} -> error(Reason)
end.
-match_check_size(Mfun, {var,_,V}, Bs) ->
+match_check_size(Mfun, Size, Bs) ->
+ match_check_size(Mfun, Size, Bs, true).
+
+match_check_size(Mfun, {var,_,V}, Bs, _AllowAll) ->
case Mfun(binding, {V,Bs}) of
{value,_} -> ok;
unbound -> throw(invalid) % or, rather, error({unbound,V})
end;
-match_check_size(_, {atom,_,all}, _Bs) ->
+match_check_size(_, {atom,_,all}, _Bs, true) ->
ok;
-match_check_size(_, {atom,_,undefined}, _Bs) ->
+match_check_size(_, {atom,_,all}, _Bs, false) ->
+ throw(invalid);
+match_check_size(_, {atom,_,undefined}, _Bs, _AllowAll) ->
ok;
-match_check_size(_, {integer,_,_}, _Bs) ->
+match_check_size(_, {integer,_,_}, _Bs, _AllowAll) ->
ok;
-match_check_size(_, {value,_,_}, _Bs) ->
+match_check_size(_, {value,_,_}, _Bs, _AllowAll) ->
ok; %From the debugger.
-match_check_size(_, _, _Bs) ->
+match_check_size(_, _, _Bs, _AllowAll) ->
throw(invalid).
%% error(Reason) -> exception thrown
diff --git a/lib/stdlib/src/file_sorter.erl b/lib/stdlib/src/file_sorter.erl
index 2bf88959b7..687d72b4bd 100644
--- a/lib/stdlib/src/file_sorter.erl
+++ b/lib/stdlib/src/file_sorter.erl
@@ -547,7 +547,7 @@ files(_I, L, _LSz, #w{seq = 1, out = Out}=W, []) ->
NW = close_input(W1),
outfun(close, NW);
Out ->
- write_run(L, W, Out),
+ _ = write_run(L, W, Out),
ok
end;
files(_I, L, _LSz, W, []) ->
@@ -638,7 +638,7 @@ last_merge(R, W) when length(R) =< W#w.no_files ->
NW = close_input(W2),
outfun(close, NW);
Out ->
- merge_files(R, W, Out),
+ _ = merge_files(R, W, Out),
ok
end;
last_merge(R, W) ->
@@ -1110,10 +1110,12 @@ read_fun2(Fd, Bin, Size, FileName, Owner) ->
end.
close_read_fun(Fd, _FileName, user) ->
- file:close(Fd);
+ _ = file:close(Fd),
+ ok;
close_read_fun(Fd, FileName, fsort) ->
- file:close(Fd),
- file:delete(FileName).
+ _ = file:close(Fd),
+ _ = file:delete(FileName),
+ ok.
read_objs(Fd, FileName, I, L, Bin0, Size0, LSz, W) ->
Max = erlang:max(Size0, ?CHUNKSIZE),
@@ -1481,10 +1483,10 @@ cleanup(W) ->
F = fun(IFun) when is_function(IFun) ->
IFun(close);
({Fd,FileName}) ->
- file:close(Fd),
- file:delete(FileName);
+ _ = file:close(Fd),
+ _= file:delete(FileName);
(FileName) ->
- file:delete(FileName)
+ _= file:delete(FileName)
end,
lists:foreach(F, W1#w.temp).
@@ -1502,8 +1504,12 @@ close_out(_) ->
close_file(Fd, W) ->
{Fd, FileName} = lists:keyfind(Fd, 1, W#w.temp),
?DEBUG("closing ~tp~n", [FileName]),
- file:close(Fd),
- W#w{temp = [FileName | lists:keydelete(Fd, 1, W#w.temp)]}.
+ case file:close(Fd) of
+ ok ->
+ W#w{temp = [FileName | lists:keydelete(Fd, 1, W#w.temp)]};
+ Error ->
+ file_error(FileName, Error, W)
+ end.
%%%
%%% Format 'term'.
@@ -1536,10 +1542,10 @@ file_rterms2(Fd, L, LSz, FileName, Files) when LSz < ?CHUNKSIZE ->
B = term_to_binary(Term),
file_rterms2(Fd, [B | L], LSz + byte_size(B), FileName, Files);
eof ->
- file:close(Fd),
+ _ = file:close(Fd),
{lists:reverse(L), file_rterms(no_file, Files)};
_Error ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {bad_term, FileName}}
end;
file_rterms2(Fd, L, _LSz, FileName, Files) ->
@@ -1568,7 +1574,7 @@ write_terms(Fd, F, [B | Bs], Args) ->
ok ->
write_terms(Fd, F, Bs, Args);
{error, Reason} ->
- file:close(Fd),
+ _ = file:close(Fd),
{error, {file_error, F, Reason}}
end;
write_terms(Fd, F, [], Args) ->
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl
index b8c0576e56..daae1fd2d2 100644
--- a/lib/stdlib/src/filelib.erl
+++ b/lib/stdlib/src/filelib.erl
@@ -234,7 +234,7 @@ ensure_dir(F) ->
%% Protect against infinite loop
{error,einval};
false ->
- ensure_dir(Dir),
+ _ = ensure_dir(Dir),
case file:make_dir(Dir) of
{error,eexist}=EExist ->
case do_is_dir(Dir, file) of
@@ -265,7 +265,7 @@ do_wildcard(Pattern, Cwd, Mod) ->
lists:sort(Files).
do_wildcard_1({exists,File}, Mod) ->
- case eval_read_file_info(File, Mod) of
+ case eval_read_link_info(File, Mod) of
{ok,_} -> [File];
_ -> []
end;
@@ -371,7 +371,7 @@ compile_wildcard(Pattern, Cwd0) ->
[Root|Rest] = filename:split(Pattern),
case filename:pathtype(Root) of
relative ->
- Cwd = filename:join([Cwd0]),
+ Cwd = prepare_base(Cwd0),
compile_wildcard_2([Root|Rest], {cwd,Cwd});
_ ->
compile_wildcard_2(Rest, {root,0,Root})
@@ -497,6 +497,16 @@ eval_read_file_info(File, erl_prim_loader) ->
eval_read_file_info(File, Mod) ->
Mod:read_file_info(File).
+eval_read_link_info(File, file) ->
+ file:read_link_info(File);
+eval_read_link_info(File, erl_prim_loader) ->
+ case erl_prim_loader:read_link_info(File) of
+ error -> {error, erl_prim_loader};
+ Res-> Res
+ end;
+eval_read_link_info(File, Mod) ->
+ Mod:read_link_info(File).
+
eval_list_dir(Dir, file) ->
file:list_dir(Dir);
eval_list_dir(Dir, erl_prim_loader) ->
diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl
index 66e54ef221..e6bde5673c 100644
--- a/lib/stdlib/src/filename.erl
+++ b/lib/stdlib/src/filename.erl
@@ -516,8 +516,10 @@ pathtype(Atom) when is_atom(Atom) ->
pathtype(atom_to_list(Atom));
pathtype(Name) when is_list(Name) or is_binary(Name) ->
case os:type() of
- {unix, _} -> unix_pathtype(Name);
- {win32, _} -> win32_pathtype(Name)
+ {win32, _} ->
+ win32_pathtype(Name);
+ {_, _} ->
+ unix_pathtype(Name)
end.
unix_pathtype(<<$/,_/binary>>) ->
diff --git a/lib/stdlib/src/gb_sets.erl b/lib/stdlib/src/gb_sets.erl
index ba35a7170a..0a26d0182d 100644
--- a/lib/stdlib/src/gb_sets.erl
+++ b/lib/stdlib/src/gb_sets.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -197,31 +196,32 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Some types.
--export_type([iter/0]).
+-export_type([set/0, set/1, iter/0, iter/1]).
--type gb_set_node() :: 'nil' | {term(), _, _}.
+-type gb_set_node(Element) :: 'nil' | {Element, _, _}.
+-type gb_set_node() :: gb_set_node(_).
+-opaque set(Element) :: {non_neg_integer(), gb_set_node(Element)}.
+-opaque set() :: set(_).
+-opaque iter(Element) :: [gb_set_node(Element)].
-opaque iter() :: [gb_set_node()].
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque gb_set() :: {non_neg_integer(), gb_set_node()}.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% gb_sets:set() in OTP 17 only.
+
-spec empty() -> Set when
- Set :: gb_set().
+ Set :: gb_sets:set().
empty() ->
{0, nil}.
-spec new() -> Set when
- Set :: gb_set().
+ Set :: gb_sets:set().
new() -> empty().
-spec is_empty(Set) -> boolean() when
- Set :: gb_set().
+ Set :: gb_sets:set().
is_empty({0, nil}) ->
true;
@@ -229,27 +229,24 @@ is_empty(_) ->
false.
-spec size(Set) -> non_neg_integer() when
- Set :: gb_set().
+ Set :: gb_sets:set().
size({Size, _}) ->
Size.
--spec singleton(Element) -> gb_set() when
- Element :: term().
+-spec singleton(Element) -> set(Element).
singleton(Key) ->
{1, {Key, nil, nil}}.
-spec is_element(Element, Set) -> boolean() when
- Element :: term(),
- Set :: gb_set().
+ Set :: set(Element).
is_element(Key, S) ->
is_member(Key, S).
-spec is_member(Element, Set) -> boolean() when
- Element :: term(),
- Set :: gb_set().
+ Set :: set(Element).
is_member(Key, {_, T}) ->
is_member_1(Key, T).
@@ -264,9 +261,8 @@ is_member_1(_, nil) ->
false.
-spec insert(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
insert(Key, {S, T}) ->
S1 = S + 1,
@@ -323,8 +319,8 @@ count(nil) ->
{1, 0}.
-spec balance(Set1) -> Set2 when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
balance({S, T}) ->
{S, balance(T, S)}.
@@ -350,17 +346,15 @@ balance_list_1(L, 0) ->
{nil, L}.
-spec add_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add_element(X, S) ->
add(X, S).
-spec add(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add(X, S) ->
case is_member(X, S) of
@@ -371,32 +365,30 @@ add(X, S) ->
end.
-spec from_list(List) -> Set when
- List :: [term()],
- Set :: gb_set().
+ List :: [Element],
+ Set :: set(Element).
from_list(L) ->
from_ordset(ordsets:from_list(L)).
-spec from_ordset(List) -> Set when
- List :: [term()],
- Set :: gb_set().
+ List :: [Element],
+ Set :: set(Element).
from_ordset(L) ->
S = length(L),
{S, balance_list(L, S)}.
-spec del_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
del_element(Key, S) ->
delete_any(Key, S).
-spec delete_any(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
delete_any(Key, S) ->
case is_member(Key, S) of
@@ -407,9 +399,8 @@ delete_any(Key, S) ->
end.
-spec delete(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
delete(Key, {S, T}) ->
{S - 1, delete_1(Key, T)}.
@@ -432,9 +423,8 @@ merge(Smaller, Larger) ->
{Key, Smaller, Larger1}.
-spec take_smallest(Set1) -> {Element, Set2} when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Element :: term().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
take_smallest({S, T}) ->
{Key, Larger} = take_smallest1(T),
@@ -446,8 +436,8 @@ take_smallest1({Key, Smaller, Larger}) ->
{Key1, Smaller1} = take_smallest1(Smaller),
{Key1, {Key, Smaller1, Larger}}.
--spec smallest(Set) -> term() when
- Set :: gb_set().
+-spec smallest(Set) -> Element when
+ Set :: set(Element).
smallest({_, T}) ->
smallest_1(T).
@@ -458,9 +448,8 @@ smallest_1({_Key, Smaller, _Larger}) ->
smallest_1(Smaller).
-spec take_largest(Set1) -> {Element, Set2} when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Element :: term().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
take_largest({S, T}) ->
{Key, Smaller} = take_largest1(T),
@@ -472,8 +461,8 @@ take_largest1({Key, Smaller, Larger}) ->
{Key1, Larger1} = take_largest1(Larger),
{Key1, {Key, Smaller, Larger1}}.
--spec largest(Set) -> term() when
- Set :: gb_set().
+-spec largest(Set) -> Element when
+ Set :: set(Element).
largest({_, T}) ->
largest_1(T).
@@ -484,8 +473,8 @@ largest_1({_Key, _Smaller, Larger}) ->
largest_1(Larger).
-spec to_list(Set) -> List when
- Set :: gb_set(),
- List :: [term()].
+ Set :: set(Element),
+ List :: [Element].
to_list({_, T}) ->
to_list(T, []).
@@ -497,8 +486,8 @@ to_list({Key, Small, Big}, L) ->
to_list(nil, L) -> L.
-spec iterator(Set) -> Iter when
- Set :: gb_set(),
- Iter :: iter().
+ Set :: set(Element),
+ Iter :: iter(Element).
iterator({_, T}) ->
iterator(T, []).
@@ -514,9 +503,8 @@ iterator(nil, As) ->
As.
-spec next(Iter1) -> {Element, Iter2} | 'none' when
- Iter1 :: iter(),
- Iter2 :: iter(),
- Element :: term().
+ Iter1 :: iter(Element),
+ Iter2 :: iter(Element).
next([{X, _, T} | As]) ->
{X, iterator(T, As)};
@@ -547,9 +535,9 @@ next([]) ->
%% overhead.
-spec union(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
union({N1, T1}, {N2, T2}) when N2 < N1 ->
union(to_list_1(T2), N2, T1, N1);
@@ -571,7 +559,7 @@ union(L, N1, T2, N2) ->
union_1(L, mk_set(N2, T2))
end.
--spec mk_set(non_neg_integer(), gb_set_node()) -> gb_set().
+-spec mk_set(non_neg_integer(), gb_set_node(T)) -> set(T).
mk_set(N, T) ->
{N, T}.
@@ -652,8 +640,8 @@ balance_revlist_1(L, 0) ->
{nil, L}.
-spec union(SetList) -> Set when
- SetList :: [gb_set(),...],
- Set :: gb_set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
union([S | Ss]) ->
union_list(S, Ss);
@@ -667,9 +655,9 @@ union_list(S, []) -> S.
%% The rest is modelled on the above.
-spec intersection(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
intersection({N1, T1}, {N2, T2}) when N2 < N1 ->
intersection(to_list_1(T2), N2, T1, N1);
@@ -718,8 +706,8 @@ intersection_2(_, [], As, S) ->
{S, balance_revlist(As, S)}.
-spec intersection(SetList) -> Set when
- SetList :: [gb_set(),...],
- Set :: gb_set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
intersection([S | Ss]) ->
intersection_list(S, Ss).
@@ -729,8 +717,8 @@ intersection_list(S, [S1 | Ss]) ->
intersection_list(S, []) -> S.
-spec is_disjoint(Set1, Set2) -> boolean() when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_disjoint({N1, T1}, {N2, T2}) when N1 < N2 ->
is_disjoint_1(T1, T2);
@@ -759,17 +747,17 @@ is_disjoint_1(_, nil) ->
%% traverse the whole element list of the left operand.
-spec subtract(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
subtract(S1, S2) ->
difference(S1, S2).
-spec difference(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
difference({N1, T1}, {N2, T2}) ->
difference(to_list_1(T1), N1, T2, N2).
@@ -818,8 +806,8 @@ difference_2(Xs, [], As, S) ->
%% without the construction of a new set.
-spec is_subset(Set1, Set2) -> boolean() when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_subset({N1, T1}, {N2, T2}) ->
is_subset(to_list_1(T1), N1, T2, N2).
@@ -868,20 +856,20 @@ is_set({N, {_, _, _}}) when is_integer(N), N >= 0 -> true;
is_set(_) -> false.
-spec filter(Pred, Set1) -> Set2 when
- Pred :: fun((E :: term()) -> boolean()),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Pred :: fun((Element) -> boolean()),
+ Set1 :: set(Element),
+ Set2 :: set(Element).
filter(F, S) ->
from_ordset([X || X <- to_list(S), F(X)]).
-spec fold(Function, Acc0, Set) -> Acc1 when
- Function :: fun((E :: term(), AccIn) -> AccOut),
- Acc0 :: term(),
- Acc1 :: term(),
- AccIn :: term(),
- AccOut :: term(),
- Set :: gb_set().
+ Function :: fun((Element, AccIn) -> AccOut),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc,
+ Set :: set(Element).
fold(F, A, {_, T}) when is_function(F, 2) ->
fold_1(F, A, T).
diff --git a/lib/stdlib/src/gb_trees.erl b/lib/stdlib/src/gb_trees.erl
index de0c239e26..7069b61873 100644
--- a/lib/stdlib/src/gb_trees.erl
+++ b/lib/stdlib/src/gb_trees.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -153,25 +152,25 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Some types.
--export_type([iter/0]).
+-export_type([tree/0, tree/2, iter/0, iter/2]).
--type gb_tree_node() :: 'nil' | {_, _, _, _}.
+-type gb_tree_node(K, V) :: 'nil'
+ | {K, V, gb_tree_node(K, V), gb_tree_node(K, V)}.
+-type gb_tree_node() :: gb_tree_node(_, _).
+-opaque tree(Key, Value) :: {non_neg_integer(), gb_tree_node(Key, Value)}.
+-opaque tree() :: tree(_, _).
+-opaque iter(Key, Value) :: [gb_tree_node(Key, Value)].
-opaque iter() :: [gb_tree_node()].
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque gb_tree() :: {non_neg_integer(), gb_tree_node()}.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec empty() -> gb_tree().
+-spec empty() -> tree().
empty() ->
{0, nil}.
-spec is_empty(Tree) -> boolean() when
- Tree :: gb_tree().
+ Tree :: tree().
is_empty({0, nil}) ->
true;
@@ -179,17 +178,15 @@ is_empty(_) ->
false.
-spec size(Tree) -> non_neg_integer() when
- Tree :: gb_tree().
+ Tree :: tree().
size({Size, _}) when is_integer(Size), Size >= 0 ->
Size.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec lookup(Key, Tree) -> 'none' | {'value', Val} when
- Key :: term(),
- Val :: term(),
- Tree :: gb_tree().
+-spec lookup(Key, Tree) -> 'none' | {'value', Value} when
+ Tree :: tree(Key, Value).
lookup(Key, {_, T}) ->
lookup_1(Key, T).
@@ -215,8 +212,7 @@ lookup_1(_, nil) ->
%% This is a specialized version of `lookup'.
-spec is_defined(Key, Tree) -> boolean() when
- Key :: term(),
- Tree :: gb_tree().
+ Tree :: tree(Key, Value :: term()).
is_defined(Key, {_, T}) ->
is_defined_1(Key, T).
@@ -234,10 +230,8 @@ is_defined_1(_, nil) ->
%% This is a specialized version of `lookup'.
--spec get(Key, Tree) -> Val when
- Key :: term(),
- Tree :: gb_tree(),
- Val :: term().
+-spec get(Key, Tree) -> Value when
+ Tree :: tree(Key, Value).
get(Key, {_, T}) ->
get_1(Key, T).
@@ -251,11 +245,9 @@ get_1(_, {_, Value, _, _}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec update(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec update(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
update(Key, Val, {S, T}) ->
T1 = update_1(Key, Val, T),
@@ -272,11 +264,9 @@ update_1(Key, Value, {_, _, Smaller, Bigger}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec insert(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec insert(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
insert(Key, Val, {S, T}) when is_integer(S) ->
S1 = S+1,
@@ -325,11 +315,9 @@ insert_1(Key, _, _, _) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec enter(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec enter(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
enter(Key, Val, T) ->
case is_defined(Key, T) of
@@ -353,8 +341,8 @@ count(nil) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec balance(Tree1) -> Tree2 when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
balance({S, T}) ->
{S, balance(T, S)}.
@@ -380,8 +368,8 @@ balance_list_1(L, 0) ->
{nil, L}.
-spec from_orddict(List) -> Tree when
- List :: [{Key :: term(), Val :: term()}],
- Tree :: gb_tree().
+ List :: [{Key, Value}],
+ Tree :: tree(Key, Value).
from_orddict(L) ->
S = length(L),
@@ -390,9 +378,8 @@ from_orddict(L) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec delete_any(Key, Tree1) -> Tree2 when
- Key :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
delete_any(Key, T) ->
case is_defined(Key, T) of
@@ -405,9 +392,8 @@ delete_any(Key, T) ->
%%% delete. Assumes that key is present.
-spec delete(Key, Tree1) -> Tree2 when
- Key :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
delete(Key, {S, T}) when is_integer(S), S >= 0 ->
{S - 1, delete_1(Key, T)}.
@@ -433,11 +419,9 @@ merge(Smaller, Larger) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec take_smallest(Tree1) -> {Key, Val, Tree2} when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec take_smallest(Tree1) -> {Key, Value, Tree2} when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
take_smallest({Size, Tree}) when is_integer(Size), Size >= 0 ->
{Key, Value, Larger} = take_smallest1(Tree),
@@ -449,10 +433,8 @@ take_smallest1({Key, Value, Smaller, Larger}) ->
{Key1, Value1, Smaller1} = take_smallest1(Smaller),
{Key1, Value1, {Key, Value, Smaller1, Larger}}.
--spec smallest(Tree) -> {Key, Val} when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec smallest(Tree) -> {Key, Value} when
+ Tree :: tree(Key, Value).
smallest({_, Tree}) ->
smallest_1(Tree).
@@ -462,11 +444,9 @@ smallest_1({Key, Value, nil, _Larger}) ->
smallest_1({_Key, _Value, Smaller, _Larger}) ->
smallest_1(Smaller).
--spec take_largest(Tree1) -> {Key, Val, Tree2} when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec take_largest(Tree1) -> {Key, Value, Tree2} when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
take_largest({Size, Tree}) when is_integer(Size), Size >= 0 ->
{Key, Value, Smaller} = take_largest1(Tree),
@@ -478,10 +458,8 @@ take_largest1({Key, Value, Smaller, Larger}) ->
{Key1, Value1, Larger1} = take_largest1(Larger),
{Key1, Value1, {Key, Value, Smaller, Larger1}}.
--spec largest(Tree) -> {Key, Val} when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec largest(Tree) -> {Key, Value} when
+ Tree :: tree(Key, Value).
largest({_, Tree}) ->
largest_1(Tree).
@@ -493,10 +471,8 @@ largest_1({_Key, _Value, _Smaller, Larger}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec to_list(Tree) -> [{Key, Val}] when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec to_list(Tree) -> [{Key, Value}] when
+ Tree :: tree(Key, Value).
to_list({_, T}) ->
to_list(T, []).
@@ -510,8 +486,7 @@ to_list(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec keys(Tree) -> [Key] when
- Tree :: gb_tree(),
- Key :: term().
+ Tree :: tree(Key, Value :: term()).
keys({_, T}) ->
keys(T, []).
@@ -522,9 +497,8 @@ keys(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec values(Tree) -> [Val] when
- Tree :: gb_tree(),
- Val :: term().
+-spec values(Tree) -> [Value] when
+ Tree :: tree(Key :: term(), Value).
values({_, T}) ->
values(T, []).
@@ -536,8 +510,8 @@ values(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec iterator(Tree) -> Iter when
- Tree :: gb_tree(),
- Iter :: iter().
+ Tree :: tree(Key, Value),
+ Iter :: iter(Key, Value).
iterator({_, T}) ->
iterator_1(T).
@@ -555,11 +529,9 @@ iterator({_, _, L, _} = T, As) ->
iterator(nil, As) ->
As.
--spec next(Iter1) -> 'none' | {Key, Val, Iter2} when
- Iter1 :: iter(),
- Iter2 :: iter(),
- Key :: term(),
- Val :: term().
+-spec next(Iter1) -> 'none' | {Key, Value, Iter2} when
+ Iter1 :: iter(Key, Value),
+ Iter2 :: iter(Key, Value).
next([{X, V, _, T} | As]) ->
{X, V, iterator(T, As)};
@@ -569,9 +541,9 @@ next([]) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec map(Function, Tree1) -> Tree2 when
- Function :: fun((K :: term(), V1 :: term()) -> V2 :: term()),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Function :: fun((K :: Key, V1 :: Value1) -> V2 :: Value2),
+ Tree1 :: tree(Key, Value1),
+ Tree2 :: tree(Key, Value2).
map(F, {Size, Tree}) when is_function(F, 2) ->
{Size, map_1(F, Tree)}.
diff --git a/lib/stdlib/src/gen.erl b/lib/stdlib/src/gen.erl
index 7281549ea7..63116fa16e 100644
--- a/lib/stdlib/src/gen.erl
+++ b/lib/stdlib/src/gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -37,7 +37,9 @@
%%-----------------------------------------------------------------
-type linkage() :: 'link' | 'nolink'.
--type emgr_name() :: {'local', atom()} | {'global', term()} | {via, atom(), term()}.
+-type emgr_name() :: {'local', atom()}
+ | {'global', term()}
+ | {'via', Module :: module(), Name :: term()}.
-type start_ret() :: {'ok', pid()} | 'ignore' | {'error', term()}.
diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl
index 7629e88fbf..469acdc37c 100644
--- a/lib/stdlib/src/gen_event.erl
+++ b/lib/stdlib/src/gen_event.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -40,6 +40,8 @@
system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
-export_type([handler/0, handler_args/0, add_handler_ret/0,
@@ -47,8 +49,6 @@
-import(error_logger, [error_msg/2]).
--define(reply(X), From ! {element(2,Tag), X}).
-
-record(handler, {module :: atom(),
id = false,
state,
@@ -229,24 +229,6 @@ wake_hib(Parent, ServerName, MSL, Debug) ->
fetch_msg(Parent, ServerName, MSL, Debug, Hib) ->
receive
- {system, From, get_state} ->
- States = [{Mod,Id,State} || #handler{module=Mod, id=Id, state=State} <- MSL],
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {States, [ServerName, MSL, Hib]}, Hib);
- {system, From, {replace_state, StateFun}} ->
- {NMSL, NStates} =
- lists:unzip([begin
- Cur = {Mod,Id,State},
- try
- NState = {Mod,Id,NS} = StateFun(Cur),
- {HS#handler{state=NS}, NState}
- catch
- _:_ ->
- {HS, Cur}
- end
- end || #handler{module=Mod, id=Id, state=State}=HS <- MSL]),
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NStates, [ServerName, NMSL, Hib]}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[ServerName, MSL, Hib],Hib);
@@ -265,49 +247,49 @@ handle_msg(Msg, Parent, ServerName, MSL, Debug) ->
{notify, Event} ->
{Hib,MSL1} = server_notify(Event, handle_event, MSL, ServerName),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, {sync_notify, Event}} ->
+ {_From, Tag, {sync_notify, Event}} ->
{Hib, MSL1} = server_notify(Event, handle_event, MSL, ServerName),
- ?reply(ok),
+ reply(Tag, ok),
loop(Parent, ServerName, MSL1, Debug, Hib);
{'EXIT', From, Reason} ->
MSL1 = handle_exit(From, Reason, MSL, ServerName),
loop(Parent, ServerName, MSL1, Debug, false);
- {From, Tag, {call, Handler, Query}} ->
+ {_From, Tag, {call, Handler, Query}} ->
{Hib, Reply, MSL1} = server_call(Handler, Query, MSL, ServerName),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, {add_handler, Handler, Args}} ->
+ {_From, Tag, {add_handler, Handler, Args}} ->
{Hib, Reply, MSL1} = server_add_handler(Handler, Args, MSL),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, {add_sup_handler, Handler, Args, SupP}} ->
+ {_From, Tag, {add_sup_handler, Handler, Args, SupP}} ->
{Hib, Reply, MSL1} = server_add_sup_handler(Handler, Args, MSL, SupP),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, {delete_handler, Handler, Args}} ->
+ {_From, Tag, {delete_handler, Handler, Args}} ->
{Reply, MSL1} = server_delete_handler(Handler, Args, MSL,
ServerName),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, false);
- {From, Tag, {swap_handler, Handler1, Args1, Handler2, Args2}} ->
+ {_From, Tag, {swap_handler, Handler1, Args1, Handler2, Args2}} ->
{Hib, Reply, MSL1} = server_swap_handler(Handler1, Args1, Handler2,
Args2, MSL, ServerName),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, {swap_sup_handler, Handler1, Args1, Handler2, Args2,
+ {_From, Tag, {swap_sup_handler, Handler1, Args1, Handler2, Args2,
Sup}} ->
{Hib, Reply, MSL1} = server_swap_handler(Handler1, Args1, Handler2,
Args2, MSL, Sup, ServerName),
- ?reply(Reply),
+ reply(Tag, Reply),
loop(Parent, ServerName, MSL1, Debug, Hib);
- {From, Tag, stop} ->
+ {_From, Tag, stop} ->
catch terminate_server(normal, Parent, MSL, ServerName),
- ?reply(ok);
- {From, Tag, which_handlers} ->
- ?reply(the_handlers(MSL)),
+ reply(Tag, ok);
+ {_From, Tag, which_handlers} ->
+ reply(Tag, the_handlers(MSL)),
loop(Parent, ServerName, MSL, Debug, false);
- {From, Tag, get_modules} ->
- ?reply(get_modules(MSL)),
+ {_From, Tag, get_modules} ->
+ reply(Tag, get_modules(MSL)),
loop(Parent, ServerName, MSL, Debug, false);
Other ->
{Hib, MSL1} = server_notify(Other, handle_info, MSL, ServerName),
@@ -319,6 +301,10 @@ terminate_server(Reason, Parent, MSL, ServerName) ->
do_unlink(Parent, MSL),
exit(Reason).
+reply({From, Ref}, Msg) ->
+ From ! {Ref, Msg},
+ ok.
+
%% unlink the supervisor process of all supervised handlers.
%% We do not want a handler supervisor to EXIT due to the
%% termination of the event manager (server).
@@ -383,6 +369,23 @@ system_code_change([ServerName, MSL, Hib], Module, OldVsn, Extra) ->
MSL),
{ok, [ServerName, MSL1, Hib]}.
+system_get_state([_ServerName, MSL, _Hib]) ->
+ {ok, [{Mod,Id,State} || #handler{module=Mod, id=Id, state=State} <- MSL]}.
+
+system_replace_state(StateFun, [ServerName, MSL, Hib]) ->
+ {NMSL, NStates} =
+ lists:unzip([begin
+ Cur = {Mod,Id,State},
+ try
+ NState = {Mod,Id,NS} = StateFun(Cur),
+ {HS#handler{state=NS}, NState}
+ catch
+ _:_ ->
+ {HS, Cur}
+ end
+ end || #handler{module=Mod, id=Id, state=State}=HS <- MSL]),
+ {ok, NStates, [ServerName, NMSL, Hib]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl
index 9e9d4ee4bb..5afe3e8b09 100644
--- a/lib/stdlib/src/gen_fsm.erl
+++ b/lib/stdlib/src/gen_fsm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -118,6 +118,8 @@
system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
-import(error_logger, [format/2]).
@@ -422,17 +424,6 @@ wake_hib(Parent, Name, StateName, StateData, Mod, Debug) ->
decode_msg(Msg,Parent, Name, StateName, StateData, Mod, Time, Debug, Hib) ->
case Msg of
- {system, From, get_state} ->
- Misc = [Name, StateName, StateData, Mod, Time],
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {{StateName, StateData}, Misc}, Hib);
- {system, From, {replace_state, StateFun}} ->
- State = {StateName, StateData},
- NState = {NStateName, NStateData} = try StateFun(State)
- catch _:_ -> State end,
- NMisc = [Name, NStateName, NStateData, Mod, Time],
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NState, NMisc}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[Name, StateName, StateData, Mod, Time], Hib);
@@ -467,6 +458,13 @@ system_code_change([Name, StateName, StateData, Mod, Time],
Else -> Else
end.
+system_get_state([_Name, StateName, StateData, _Mod, _Time]) ->
+ {ok, {StateName, StateData}}.
+
+system_replace_state(StateFun, [Name, StateName, StateData, Mod, Time]) ->
+ Result = {NStateName, NStateData} = StateFun({StateName, StateData}),
+ {ok, Result, [Name, NStateName, NStateData, Mod, Time]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
@@ -549,7 +547,7 @@ handle_msg(Msg, Parent, Name, StateName, StateData, Mod, _Time, Debug) ->
{stop, Reason, Reply, NStateData} when From =/= undefined ->
{'EXIT', R} = (catch terminate(Reason, Name, Msg, Mod,
StateName, NStateData, Debug)),
- reply(Name, From, Reply, Debug, StateName),
+ _ = reply(Name, From, Reply, Debug, StateName),
exit(R);
{'EXIT', What} ->
terminate(What, Name, Msg, Mod, StateName, StateData, Debug);
@@ -596,7 +594,8 @@ reply(Name, {To, Tag}, Reply, Debug, StateName) ->
terminate(Reason, Name, Msg, Mod, StateName, StateData, Debug) ->
case catch Mod:terminate(Reason, StateName, StateData) of
{'EXIT', R} ->
- error_info(R, Name, Msg, StateName, StateData, Debug),
+ FmtStateData = format_status(terminate, Mod, get(), StateData),
+ error_info(R, Name, Msg, StateName, FmtStateData, Debug),
exit(R);
_ ->
case Reason of
@@ -607,17 +606,7 @@ terminate(Reason, Name, Msg, Mod, StateName, StateData, Debug) ->
{shutdown,_}=Shutdown ->
exit(Shutdown);
_ ->
- FmtStateData =
- case erlang:function_exported(Mod, format_status, 2) of
- true ->
- Args = [get(), StateData],
- case catch Mod:format_status(terminate, Args) of
- {'EXIT', _} -> StateData;
- Else -> Else
- end;
- _ ->
- StateData
- end,
+ FmtStateData = format_status(terminate, Mod, get(), StateData),
error_info(Reason,Name,Msg,StateName,FmtStateData,Debug),
exit(Reason)
end
@@ -682,21 +671,29 @@ format_status(Opt, StatusData) ->
Header = gen:format_status_header("Status for state machine",
Name),
Log = sys:get_debug(log, Debug, []),
- DefaultStatus = [{data, [{"StateData", StateData}]}],
- Specfic =
- case erlang:function_exported(Mod, format_status, 2) of
- true ->
- case catch Mod:format_status(Opt,[PDict,StateData]) of
- {'EXIT', _} -> DefaultStatus;
- StatusList when is_list(StatusList) -> StatusList;
- Else -> [Else]
- end;
- _ ->
- DefaultStatus
- end,
+ Specfic = format_status(Opt, Mod, PDict, StateData),
+ Specfic = case format_status(Opt, Mod, PDict, StateData) of
+ S when is_list(S) -> S;
+ S -> [S]
+ end,
[{header, Header},
{data, [{"Status", SysState},
{"Parent", Parent},
{"Logged events", Log},
{"StateName", StateName}]} |
Specfic].
+
+format_status(Opt, Mod, PDict, State) ->
+ DefStatus = case Opt of
+ terminate -> State;
+ _ -> [{data, [{"StateData", State}]}]
+ end,
+ case erlang:function_exported(Mod, format_status, 2) of
+ true ->
+ case catch Mod:format_status(Opt, [PDict, State]) of
+ {'EXIT', _} -> DefStatus;
+ Else -> Else
+ end;
+ _ ->
+ DefStatus
+ end.
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index df68a37c06..18ef4a2507 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -98,6 +98,8 @@
-export([system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
%% Internal exports
@@ -372,13 +374,6 @@ wake_hib(Parent, Name, State, Mod, Debug) ->
decode_msg(Msg, Parent, Name, State, Mod, Time, Debug, Hib) ->
case Msg of
- {system, From, get_state} ->
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {State, [Name, State, Mod, Time]}, Hib);
- {system, From, {replace_state, StateFun}} ->
- NState = try StateFun(State) catch _:_ -> State end,
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NState, [Name, NState, Mod, Time]}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[Name, State, Mod, Time], Hib);
@@ -572,28 +567,88 @@ start_monitor(Node, Name) when is_atom(Node), is_atom(Name) ->
end
end.
+%% ---------------------------------------------------
+%% Helper functions for try-catch of callbacks.
+%% Returns the return value of the callback, or
+%% {'EXIT', ExitReason, ReportReason} (if an exception occurs)
+%%
+%% ExitReason is the reason that shall be used when the process
+%% terminates.
+%%
+%% ReportReason is the reason that shall be printed in the error
+%% report.
+%%
+%% These functions are introduced in order to add the stack trace in
+%% the error report produced when a callback is terminated with
+%% erlang:exit/1 (OTP-12263).
+%% ---------------------------------------------------
+
+try_dispatch({'$gen_cast', Msg}, Mod, State) ->
+ try_dispatch(Mod, handle_cast, Msg, State);
+try_dispatch(Info, Mod, State) ->
+ try_dispatch(Mod, handle_info, Info, State).
+
+try_dispatch(Mod, Func, Msg, State) ->
+ try
+ {ok, Mod:Func(Msg, State)}
+ catch
+ throw:R ->
+ {ok, R};
+ error:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', {R, Stacktrace}, {R, Stacktrace}};
+ exit:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', R, {R, Stacktrace}}
+ end.
+
+try_handle_call(Mod, Msg, From, State) ->
+ try
+ {ok, Mod:handle_call(Msg, From, State)}
+ catch
+ throw:R ->
+ {ok, R};
+ error:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', {R, Stacktrace}, {R, Stacktrace}};
+ exit:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', R, {R, Stacktrace}}
+ end.
+
+try_terminate(Mod, Reason, State) ->
+ try
+ {ok, Mod:terminate(Reason, State)}
+ catch
+ throw:R ->
+ {ok, R};
+ error:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', {R, Stacktrace}, {R, Stacktrace}};
+ exit:R ->
+ Stacktrace = erlang:get_stacktrace(),
+ {'EXIT', R, {R, Stacktrace}}
+ end.
+
+
%%% ---------------------------------------------------
%%% Message handling functions
%%% ---------------------------------------------------
-dispatch({'$gen_cast', Msg}, Mod, State) ->
- Mod:handle_cast(Msg, State);
-dispatch(Info, Mod, State) ->
- Mod:handle_info(Info, State).
-
handle_msg({'$gen_call', From, Msg}, Parent, Name, State, Mod) ->
- case catch Mod:handle_call(Msg, From, State) of
- {reply, Reply, NState} ->
+ Result = try_handle_call(Mod, Msg, From, State),
+ case Result of
+ {ok, {reply, Reply, NState}} ->
reply(From, Reply),
loop(Parent, Name, NState, Mod, infinity, []);
- {reply, Reply, NState, Time1} ->
+ {ok, {reply, Reply, NState, Time1}} ->
reply(From, Reply),
loop(Parent, Name, NState, Mod, Time1, []);
- {noreply, NState} ->
+ {ok, {noreply, NState}} ->
loop(Parent, Name, NState, Mod, infinity, []);
- {noreply, NState, Time1} ->
+ {ok, {noreply, NState, Time1}} ->
loop(Parent, Name, NState, Mod, Time1, []);
- {stop, Reason, Reply, NState} ->
+ {ok, {stop, Reason, Reply, NState}} ->
{'EXIT', R} =
(catch terminate(Reason, Name, Msg, Mod, NState, [])),
reply(From, Reply),
@@ -601,67 +656,68 @@ handle_msg({'$gen_call', From, Msg}, Parent, Name, State, Mod) ->
Other -> handle_common_reply(Other, Parent, Name, Msg, Mod, State)
end;
handle_msg(Msg, Parent, Name, State, Mod) ->
- Reply = (catch dispatch(Msg, Mod, State)),
+ Reply = try_dispatch(Msg, Mod, State),
handle_common_reply(Reply, Parent, Name, Msg, Mod, State).
handle_msg({'$gen_call', From, Msg}, Parent, Name, State, Mod, Debug) ->
- case catch Mod:handle_call(Msg, From, State) of
- {reply, Reply, NState} ->
+ Result = try_handle_call(Mod, Msg, From, State),
+ case Result of
+ {ok, {reply, Reply, NState}} ->
Debug1 = reply(Name, From, Reply, NState, Debug),
loop(Parent, Name, NState, Mod, infinity, Debug1);
- {reply, Reply, NState, Time1} ->
+ {ok, {reply, Reply, NState, Time1}} ->
Debug1 = reply(Name, From, Reply, NState, Debug),
loop(Parent, Name, NState, Mod, Time1, Debug1);
- {noreply, NState} ->
+ {ok, {noreply, NState}} ->
Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
{noreply, NState}),
loop(Parent, Name, NState, Mod, infinity, Debug1);
- {noreply, NState, Time1} ->
+ {ok, {noreply, NState, Time1}} ->
Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
{noreply, NState}),
loop(Parent, Name, NState, Mod, Time1, Debug1);
- {stop, Reason, Reply, NState} ->
+ {ok, {stop, Reason, Reply, NState}} ->
{'EXIT', R} =
(catch terminate(Reason, Name, Msg, Mod, NState, Debug)),
- reply(Name, From, Reply, NState, Debug),
+ _ = reply(Name, From, Reply, NState, Debug),
exit(R);
Other ->
handle_common_reply(Other, Parent, Name, Msg, Mod, State, Debug)
end;
handle_msg(Msg, Parent, Name, State, Mod, Debug) ->
- Reply = (catch dispatch(Msg, Mod, State)),
+ Reply = try_dispatch(Msg, Mod, State),
handle_common_reply(Reply, Parent, Name, Msg, Mod, State, Debug).
handle_common_reply(Reply, Parent, Name, Msg, Mod, State) ->
case Reply of
- {noreply, NState} ->
+ {ok, {noreply, NState}} ->
loop(Parent, Name, NState, Mod, infinity, []);
- {noreply, NState, Time1} ->
+ {ok, {noreply, NState, Time1}} ->
loop(Parent, Name, NState, Mod, Time1, []);
- {stop, Reason, NState} ->
+ {ok, {stop, Reason, NState}} ->
terminate(Reason, Name, Msg, Mod, NState, []);
- {'EXIT', What} ->
- terminate(What, Name, Msg, Mod, State, []);
- _ ->
- terminate({bad_return_value, Reply}, Name, Msg, Mod, State, [])
+ {'EXIT', ExitReason, ReportReason} ->
+ terminate(ExitReason, ReportReason, Name, Msg, Mod, State, []);
+ {ok, BadReply} ->
+ terminate({bad_return_value, BadReply}, Name, Msg, Mod, State, [])
end.
handle_common_reply(Reply, Parent, Name, Msg, Mod, State, Debug) ->
case Reply of
- {noreply, NState} ->
+ {ok, {noreply, NState}} ->
Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
{noreply, NState}),
loop(Parent, Name, NState, Mod, infinity, Debug1);
- {noreply, NState, Time1} ->
+ {ok, {noreply, NState, Time1}} ->
Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
{noreply, NState}),
loop(Parent, Name, NState, Mod, Time1, Debug1);
- {stop, Reason, NState} ->
+ {ok, {stop, Reason, NState}} ->
terminate(Reason, Name, Msg, Mod, NState, Debug);
- {'EXIT', What} ->
- terminate(What, Name, Msg, Mod, State, Debug);
- _ ->
- terminate({bad_return_value, Reply}, Name, Msg, Mod, State, Debug)
+ {'EXIT', ExitReason, ReportReason} ->
+ terminate(ExitReason, ReportReason, Name, Msg, Mod, State, Debug);
+ {ok, BadReply} ->
+ terminate({bad_return_value, BadReply}, Name, Msg, Mod, State, Debug)
end.
reply(Name, {To, Tag}, Reply, State, Debug) ->
@@ -687,6 +743,13 @@ system_code_change([Name, State, Mod, Time], _Module, OldVsn, Extra) ->
Else -> Else
end.
+system_get_state([_Name, State, _Mod, _Time]) ->
+ {ok, State}.
+
+system_replace_state(StateFun, [Name, State, Mod, Time]) ->
+ NState = StateFun(State),
+ {ok, NState, [Name, NState, Mod, Time]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
@@ -715,13 +778,20 @@ print_event(Dev, Event, Name) ->
%%% Terminate the server.
%%% ---------------------------------------------------
+-spec terminate(_, _, _, _, _, _) -> no_return().
terminate(Reason, Name, Msg, Mod, State, Debug) ->
- case catch Mod:terminate(Reason, State) of
- {'EXIT', R} ->
- error_info(R, Name, Msg, State, Debug),
- exit(R);
+ terminate(Reason, Reason, Name, Msg, Mod, State, Debug).
+
+-spec terminate(_, _, _, _, _, _, _) -> no_return().
+terminate(ExitReason, ReportReason, Name, Msg, Mod, State, Debug) ->
+ Reply = try_terminate(Mod, ExitReason, State),
+ case Reply of
+ {'EXIT', ExitReason1, ReportReason1} ->
+ FmtState = format_status(terminate, Mod, get(), State),
+ error_info(ReportReason1, Name, Msg, FmtState, Debug),
+ exit(ExitReason1);
_ ->
- case Reason of
+ case ExitReason of
normal ->
exit(normal);
shutdown ->
@@ -729,19 +799,9 @@ terminate(Reason, Name, Msg, Mod, State, Debug) ->
{shutdown,_}=Shutdown ->
exit(Shutdown);
_ ->
- FmtState =
- case erlang:function_exported(Mod, format_status, 2) of
- true ->
- Args = [get(), State],
- case catch Mod:format_status(terminate, Args) of
- {'EXIT', _} -> State;
- Else -> Else
- end;
- _ ->
- State
- end,
- error_info(Reason, Name, Msg, FmtState, Debug),
- exit(Reason)
+ FmtState = format_status(terminate, Mod, get(), State),
+ error_info(ReportReason, Name, Msg, FmtState, Debug),
+ exit(ExitReason)
end
end.
@@ -873,23 +933,29 @@ name_to_pid(Name) ->
%%-----------------------------------------------------------------
format_status(Opt, StatusData) ->
[PDict, SysState, Parent, Debug, [Name, State, Mod, _Time]] = StatusData,
- Header = gen:format_status_header("Status for generic server",
- Name),
+ Header = gen:format_status_header("Status for generic server", Name),
Log = sys:get_debug(log, Debug, []),
- DefaultStatus = [{data, [{"State", State}]}],
- Specfic =
- case erlang:function_exported(Mod, format_status, 2) of
- true ->
- case catch Mod:format_status(Opt, [PDict, State]) of
- {'EXIT', _} -> DefaultStatus;
- StatusList when is_list(StatusList) -> StatusList;
- Else -> [Else]
- end;
- _ ->
- DefaultStatus
- end,
+ Specfic = case format_status(Opt, Mod, PDict, State) of
+ S when is_list(S) -> S;
+ S -> [S]
+ end,
[{header, Header},
{data, [{"Status", SysState},
{"Parent", Parent},
{"Logged events", Log}]} |
Specfic].
+
+format_status(Opt, Mod, PDict, State) ->
+ DefStatus = case Opt of
+ terminate -> State;
+ _ -> [{data, [{"State", State}]}]
+ end,
+ case erlang:function_exported(Mod, format_status, 2) of
+ true ->
+ case catch Mod:format_status(Opt, [PDict, State]) of
+ {'EXIT', _} -> DefStatus;
+ Else -> Else
+ end;
+ _ ->
+ DefStatus
+ end.
diff --git a/lib/stdlib/src/io.erl b/lib/stdlib/src/io.erl
index b11d41e2eb..b9ace2f442 100644
--- a/lib/stdlib/src/io.erl
+++ b/lib/stdlib/src/io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -177,13 +177,15 @@ get_password(Io) ->
| {'expand_fun', expand_fun()}
| {'encoding', encoding()}.
--spec getopts() -> [opt_pair()].
+-spec getopts() -> [opt_pair()] | {'error', Reason} when
+ Reason :: term().
getopts() ->
getopts(default_input()).
--spec getopts(IoDevice) -> [opt_pair()] when
- IoDevice :: device().
+-spec getopts(IoDevice) -> [opt_pair()] | {'error', Reason} when
+ IoDevice :: device(),
+ Reason :: term().
getopts(Io) ->
request(Io, getopts).
@@ -564,12 +566,23 @@ request(Name, Request) when is_atom(Name) ->
execute_request(Pid, {Convert,Converted}) ->
Mref = erlang:monitor(process, Pid),
- Pid ! {io_request,self(),Pid,Converted},
- if
- Convert ->
- convert_binaries(wait_io_mon_reply(Pid, Mref));
- true ->
- wait_io_mon_reply(Pid, Mref)
+ Pid ! {io_request,self(),Mref,Converted},
+
+ receive
+ {io_reply, Mref, Reply} ->
+ erlang:demonitor(Mref, [flush]),
+ if
+ Convert ->
+ convert_binaries(Reply);
+ true ->
+ Reply
+ end;
+ {'DOWN', Mref, _, _, _} ->
+ receive
+ {'EXIT', Pid, _What} -> true
+ after 0 -> true
+ end,
+ {error,terminated}
end.
requests(Requests) -> %Requests as atomic action
@@ -595,26 +608,6 @@ default_input() ->
default_output() ->
group_leader().
-wait_io_mon_reply(From, Mref) ->
- receive
- {io_reply, From, Reply} ->
- erlang:demonitor(Mref, [flush]),
- Reply;
- {'EXIT', From, _What} ->
- receive
- {'DOWN', Mref, _, _, _} -> true
- after 0 -> true
- end,
- {error,terminated};
- {'DOWN', Mref, _, _, _} ->
- receive
- {'EXIT', From, _What} -> true
- after 0 -> true
- end,
- {error,terminated}
- end.
-
-
%% io_requests(Requests)
%% Transform requests into correct i/o server messages. Only handle the
%% one we KNOW must be changed, others, including incorrect ones, are
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index 9e69601770..adc9a0cf5f 100644
--- a/lib/stdlib/src/io_lib.erl
+++ b/lib/stdlib/src/io_lib.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -258,7 +257,9 @@ write(T, D) when is_tuple(T) ->
[write(element(1, T), D-1)|
write_tail(tl(tuple_to_list(T)), D-1, $,)],
$}]
- end.
+ end;
+%write(Term, D) when is_map(Term) -> write_map(Term, D);
+write(Term, D) -> write_map(Term, D).
%% write_tail(List, Depth, CharacterBeforeDots)
%% Test the terminating case first as this looks better with depth.
@@ -276,6 +277,18 @@ write_port(Port) ->
write_ref(Ref) ->
erlang:ref_to_list(Ref).
+write_map(Map, D) when is_integer(D) ->
+ [$#,${,write_map_body(maps:to_list(Map), D),$}].
+
+write_map_body(_, 0) -> "...";
+write_map_body([],_) -> [];
+write_map_body([{K,V}],D) -> write_map_assoc(K,V,D);
+write_map_body([{K,V}|KVs], D) ->
+ [write_map_assoc(K,V,D),$, | write_map_body(KVs,D-1)].
+
+write_map_assoc(K,V,D) ->
+ [write(K,D - 1),"=>",write(V,D-1)].
+
write_binary(B, D) when is_integer(D) ->
[$<,$<,write_binary_body(B, D),$>,$>].
diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl
index 56e15a17ec..89ae6fb187 100644
--- a/lib/stdlib/src/io_lib_format.erl
+++ b/lib/stdlib/src/io_lib_format.erl
@@ -255,7 +255,7 @@ term(T, none, _Adj, none, _Pad) -> T;
term(T, none, Adj, P, Pad) -> term(T, P, Adj, P, Pad);
term(T, F, Adj, P0, Pad) ->
L = lists:flatlength(T),
- P = case P0 of none -> erlang:min(L, F); _ -> P0 end,
+ P = erlang:min(L, case P0 of none -> F; _ -> min(P0, F) end),
if
L > P ->
adjust(chars($*, P), chars(Pad, F-P), Adj);
diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl
index 7637ad7a3d..aece06afa6 100644
--- a/lib/stdlib/src/io_lib_pretty.erl
+++ b/lib/stdlib/src/io_lib_pretty.erl
@@ -64,13 +64,13 @@ print(Term) ->
(term(), options()) -> chars().
print(Term, Options) when is_list(Options) ->
- Col = proplists:get_value(column, Options, 1),
- Ll = proplists:get_value(line_length, Options, 80),
- D = proplists:get_value(depth, Options, -1),
- M = proplists:get_value(max_chars, Options, -1),
- RecDefFun = proplists:get_value(record_print_fun, Options, no_fun),
- Encoding = proplists:get_value(encoding, Options, epp:default_encoding()),
- Strings = proplists:get_value(strings, Options, true),
+ Col = get_option(column, Options, 1),
+ Ll = get_option(line_length, Options, 80),
+ D = get_option(depth, Options, -1),
+ M = get_option(max_chars, Options, -1),
+ RecDefFun = get_option(record_print_fun, Options, no_fun),
+ Encoding = get_option(encoding, Options, epp:default_encoding()),
+ Strings = get_option(strings, Options, true),
print(Term, Col, Ll, D, M, RecDefFun, Encoding, Strings);
print(Term, RecDefFun) ->
print(Term, -1, RecDefFun).
@@ -101,6 +101,7 @@ print(Term, Col, Ll, D, M, RecDefFun, Enc, Str) when Col =< 0 ->
print(Term, 1, Ll, D, M, RecDefFun, Enc, Str);
print(Term, Col, Ll, D, M0, RecDefFun, Enc, Str) when is_tuple(Term);
is_list(Term);
+ is_map(Term);
is_bitstring(Term) ->
If = {_S, Len} = print_length(Term, D, RecDefFun, Enc, Str),
M = max_cs(M0, Len),
@@ -137,6 +138,10 @@ pp({{tuple,true,L}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[${, pp_tag_tuple(L, Col, Ll, M, TInd, Ind, LD, W + 1), $}];
pp({{tuple,false,L}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[${, pp_list(L, Col + 1, Ll, M, TInd, indent(1, Ind), LD, $,, W + 1), $}];
+pp({{map,Pairs},_Len}, Col, Ll, M, TInd, Ind, LD, W) ->
+ [$#,${, pp_list(Pairs, Col + 2, Ll, M, TInd, indent(2, Ind), LD, $,, W + 1), $}];
+pp({{map_pair,K,V},_Len}, Col, Ll, M, TInd, Ind, LD, W) ->
+ [pp(K, Col, Ll, M, TInd, Ind, LD, W), " => ", pp(V, Col, Ll, M, TInd, Ind, LD, W)];
pp({{record,[{Name,NLen} | L]}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[Name, ${, pp_record(L, NLen, Col, Ll, M, TInd, Ind, LD, W + NLen+1), $}];
pp({{bin,S}, _Len}, Col, Ll, M, _TInd, Ind, LD, W) ->
@@ -283,6 +288,10 @@ write({{tuple, _IsTagged, L}, _}) ->
[${, write_list(L, $,), $}];
write({{list, L}, _}) ->
[$[, write_list(L, $|), $]];
+write({{map, Pairs}, _}) ->
+ [$#,${, write_list(Pairs, $,), $}];
+write({{map_pair, K, V}, _}) ->
+ [write(K)," => ",write(V)];
write({{record, [{Name,_} | L]}, _}) ->
[Name, ${, write_fields(L), $}];
write({{bin, S}, _}) ->
@@ -331,6 +340,8 @@ print_length([], _D, _RF, _Enc, _Str) ->
{"[]", 2};
print_length({}, _D, _RF, _Enc, _Str) ->
{"{}", 2};
+print_length(#{}=M, _D, _RF, _Enc, _Str) when map_size(M) =:= 0 ->
+ {"#{}", 3};
print_length(List, D, RF, Enc, Str) when is_list(List) ->
case Str andalso printable_list(List, D, Enc) of
true ->
@@ -356,6 +367,8 @@ print_length(R, D, RF, Enc, Str) when is_atom(element(1, R)),
end;
print_length(Tuple, D, RF, Enc, Str) when is_tuple(Tuple) ->
print_length_tuple(Tuple, D, RF, Enc, Str);
+print_length(Map, D, RF, Enc, Str) when is_map(Map) ->
+ print_length_map(Map, D, RF, Enc, Str);
print_length(<<>>, _D, _RF, _Enc, _Str) ->
{"<<>>", 4};
print_length(<<_/bitstring>>, 1, _RF, _Enc, _Str) ->
@@ -389,6 +402,25 @@ print_length(Term, _D, _RF, _Enc, _Str) ->
S = io_lib:write(Term),
{S, lists:flatlength(S)}.
+print_length_map(_Map, 1, _RF, _Enc, _Str) ->
+ {"#{...}", 6};
+print_length_map(Map, D, RF, Enc, Str) when is_map(Map) ->
+ Pairs = print_length_map_pairs(maps:to_list(Map), D, RF, Enc, Str),
+ {{map, Pairs}, list_length(Pairs, 3)}.
+
+print_length_map_pairs([], _D, _RF, _Enc, _Str) ->
+ [];
+print_length_map_pairs(_Pairs, 1, _RF, _Enc, _Str) ->
+ {dots, 3};
+print_length_map_pairs([{K,V}|Pairs], D, RF, Enc, Str) ->
+ [print_length_map_pair(K,V,D-1,RF,Enc,Str) |
+ print_length_map_pairs(Pairs,D-1,RF,Enc,Str)].
+
+print_length_map_pair(K, V, D, RF, Enc, Str) ->
+ {KS, KL} = print_length(K, D, RF, Enc, Str),
+ {VS, VL} = print_length(V, D, RF, Enc, Str),
+ {{map_pair, {KS,KL}, {VS,VL}}, KL + VL}.
+
print_length_tuple(_Tuple, 1, _RF, _Enc, _Str) ->
{"{...}", 5};
print_length_tuple(Tuple, D, RF, Enc, Str) ->
@@ -727,3 +759,10 @@ chars(C, N) when (N band 1) =:= 0 ->
chars(C, N) ->
S = chars(C, N bsr 1),
[C, S | S].
+
+get_option(Key, TupleList, Default) ->
+ case lists:keyfind(Key, 1, TupleList) of
+ false -> Default;
+ {Key, Value} -> Value;
+ _ -> Default
+ end.
diff --git a/lib/stdlib/src/lists.erl b/lib/stdlib/src/lists.erl
index d6a9f4645d..6303465d3d 100644
--- a/lib/stdlib/src/lists.erl
+++ b/lib/stdlib/src/lists.erl
@@ -22,7 +22,7 @@
-compile({no_auto_import,[min/2]}).
-export([append/2, append/1, subtract/2, reverse/1,
- nth/2, nthtail/2, prefix/2, suffix/2, last/1,
+ nth/2, nthtail/2, prefix/2, suffix/2, droplast/1, last/1,
seq/2, seq/3, sum/1, duplicate/2, min/1, max/1, sublist/2, sublist/3,
delete/2,
unzip/1, unzip3/1, zip/2, zip3/3, zipwith/3, zipwith3/4,
@@ -203,6 +203,19 @@ suffix(Suffix, List) ->
Delta = length(List) - length(Suffix),
Delta >= 0 andalso nthtail(Delta, List) =:= Suffix.
+%% droplast(List) returns the list dropping its last element
+
+-spec droplast(List) -> InitList when
+ List :: [T, ...],
+ InitList :: [T],
+ T :: term().
+
+%% This is the simple recursive implementation
+%% reverse(tl(reverse(L))) is faster on average,
+%% but creates more garbage.
+droplast([_T]) -> [];
+droplast([H|T]) -> [H|droplast(T)].
+
%% last(List) returns the last element in a list.
-spec last(List) -> Last when
diff --git a/lib/stdlib/src/log_mf_h.erl b/lib/stdlib/src/log_mf_h.erl
index 19b555a48c..6b42363979 100644
--- a/lib/stdlib/src/log_mf_h.erl
+++ b/lib/stdlib/src/log_mf_h.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -135,7 +135,12 @@ handle_event(Event, State) ->
State#state{cur_fd = NewFd, curF = NewF, curB = 0}
end,
[Hi,Lo] = put_int16(Size),
- file:write(NewState#state.cur_fd, [Hi, Lo, Bin]),
+ case file:write(NewState#state.cur_fd, [Hi, Lo, Bin]) of
+ ok ->
+ ok;
+ {error, Reason} ->
+ exit({file_exit, Reason})
+ end,
{ok, NewState#state{curB = NewState#state.curB + Size + 2}};
_ ->
{ok, State}
@@ -174,7 +179,7 @@ file_open(Dir, FileNo) ->
write_index_file(Dir, FileNo),
{ok, Fd};
_ ->
- exit({file, open})
+ exit(file_open)
end.
put_int16(I) ->
@@ -211,7 +216,7 @@ write_index_file(Dir, Index) ->
ok = file:close(Fd),
ok = file:rename(TmpFile,File),
ok;
- _ -> exit(open_index_file)
+ _ -> exit(write_index_file)
end.
inc(N, Max) ->
diff --git a/lib/stdlib/src/maps.erl b/lib/stdlib/src/maps.erl
new file mode 100644
index 0000000000..ba4d6a5c87
--- /dev/null
+++ b/lib/stdlib/src/maps.erl
@@ -0,0 +1,214 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(maps).
+
+-export([
+ fold/3,
+ map/2,
+ size/1,
+ without/2,
+ with/2,
+ get/3
+ ]).
+
+
+%%% BIFs
+-export([
+ get/2,
+ find/2,
+ from_list/1,
+ is_key/2,
+ keys/1,
+ merge/2,
+ new/0,
+ put/3,
+ remove/2,
+ to_list/1,
+ update/3,
+ values/1
+ ]).
+
+-spec get(Key,Map) -> Value when
+ Key :: term(),
+ Map :: map(),
+ Value :: term().
+
+get(_,_) -> erlang:nif_error(undef).
+
+
+-spec find(Key,Map) -> {ok, Value} | error when
+ Key :: term(),
+ Map :: map(),
+ Value :: term().
+
+find(_,_) -> erlang:nif_error(undef).
+
+
+-spec from_list(List) -> Map when
+ List :: [{Key,Value}],
+ Key :: term(),
+ Value :: term(),
+ Map :: map().
+
+from_list(_) -> erlang:nif_error(undef).
+
+
+-spec is_key(Key,Map) -> boolean() when
+ Key :: term(),
+ Map :: map().
+
+is_key(_,_) -> erlang:nif_error(undef).
+
+
+-spec keys(Map) -> Keys when
+ Map :: map(),
+ Keys :: [Key],
+ Key :: term().
+
+keys(_) -> erlang:nif_error(undef).
+
+
+-spec merge(Map1,Map2) -> Map3 when
+ Map1 :: map(),
+ Map2 :: map(),
+ Map3 :: map().
+
+merge(_,_) -> erlang:nif_error(undef).
+
+
+
+-spec new() -> Map when
+ Map :: map().
+
+new() -> erlang:nif_error(undef).
+
+
+-spec put(Key,Value,Map1) -> Map2 when
+ Key :: term(),
+ Value :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+put(_,_,_) -> erlang:nif_error(undef).
+
+
+-spec remove(Key,Map1) -> Map2 when
+ Key :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+remove(_,_) -> erlang:nif_error(undef).
+
+
+-spec to_list(Map) -> [{Key,Value}] when
+ Map :: map(),
+ Key :: term(),
+ Value :: term().
+
+to_list(_) -> erlang:nif_error(undef).
+
+
+-spec update(Key,Value,Map1) -> Map2 when
+ Key :: term(),
+ Value :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+update(_,_,_) -> erlang:nif_error(undef).
+
+
+-spec values(Map) -> Values when
+ Map :: map(),
+ Values :: [Value],
+ Value :: term().
+
+values(_) -> erlang:nif_error(undef).
+
+
+%%% End of BIFs
+
+-spec get(Key, Map, Default) -> Value | Default when
+ Key :: term(),
+ Map :: map(),
+ Value :: term(),
+ Default :: term().
+
+get(Key, Map, Default) ->
+ case maps:find(Key, Map) of
+ {ok, Value} ->
+ Value;
+ error ->
+ Default
+ end.
+
+
+-spec fold(Fun,Init,Map) -> Acc when
+ Fun :: fun((K, V, AccIn) -> AccOut),
+ Init :: term(),
+ Acc :: term(),
+ AccIn :: term(),
+ AccOut :: term(),
+ Map :: map(),
+ K :: term(),
+ V :: term().
+
+fold(Fun, Init, Map) when is_function(Fun,3), is_map(Map) ->
+ lists:foldl(fun({K,V},A) -> Fun(K,V,A) end,Init,maps:to_list(Map)).
+
+-spec map(Fun,Map1) -> Map2 when
+ Fun :: fun((K, V1) -> V2),
+ Map1 :: map(),
+ Map2 :: map(),
+ K :: term(),
+ V1 :: term(),
+ V2 :: term().
+
+map(Fun, Map) when is_function(Fun, 2), is_map(Map) ->
+ maps:from_list(lists:map(fun
+ ({K,V}) ->
+ {K,Fun(K,V)}
+ end,maps:to_list(Map))).
+
+
+-spec size(Map) -> non_neg_integer() when
+ Map :: map().
+
+size(Map) when is_map(Map) ->
+ erlang:map_size(Map).
+
+
+-spec without(Ks,Map1) -> Map2 when
+ Ks :: [K],
+ Map1 :: map(),
+ Map2 :: map(),
+ K :: term().
+
+without(Ks, M) when is_list(Ks), is_map(M) ->
+ maps:from_list([{K,V}||{K,V} <- maps:to_list(M), not lists:member(K, Ks)]).
+
+
+-spec with(Ks, Map1) -> Map2 when
+ Ks :: [K],
+ Map1 :: map(),
+ Map2 :: map(),
+ K :: term().
+
+with(Ks, M) when is_list(Ks), is_map(M) ->
+ maps:from_list([{K,V}||{K,V} <- maps:to_list(M), lists:member(K, Ks)]).
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl
index 4e2ce39ec2..97564e2e44 100644
--- a/lib/stdlib/src/ms_transform.erl
+++ b/lib/stdlib/src/ms_transform.erl
@@ -369,6 +369,13 @@ copy({var,_Line,Name} = VarDef,Bound) ->
copy({'fun',Line,{clauses,Clauses}},Bound) -> % Dont export bindings from funs
{NewClauses,_IgnoredBindings} = copy_list(Clauses,Bound),
{{'fun',Line,{clauses,NewClauses}},Bound};
+copy({named_fun,Line,Name,Clauses},Bound) -> % Dont export bindings from funs
+ Bound1 = case Name of
+ '_' -> Bound;
+ Name -> gb_sets:add(Name,Bound)
+ end,
+ {NewClauses,_IgnoredBindings} = copy_list(Clauses,Bound1),
+ {{named_fun,Line,Name,NewClauses},Bound};
copy({'case',Line,Of,ClausesList},Bound) -> % Dont export bindings from funs
{NewOf,NewBind0} = copy(Of,Bound),
{NewClausesList,NewBindings} = copy_case_clauses(ClausesList,NewBind0,[]),
@@ -718,10 +725,10 @@ transform_head([V],OuterBound) ->
th(NewV,NewBind,OuterBound).
-toplevel_head_match({match,Line,{var,_,VName},Expr},B,OB) ->
+toplevel_head_match({match,_,{var,Line,VName},Expr},B,OB) ->
warn_var_clash(Line,VName,OB),
{Expr,new_bind({VName,'$_'},B)};
-toplevel_head_match({match,Line,Expr,{var,_,VName}},B,OB) ->
+toplevel_head_match({match,_,Expr,{var,Line,VName}},B,OB) ->
warn_var_clash(Line,VName,OB),
{Expr,new_bind({VName,'$_'},B)};
toplevel_head_match(Other,B,_OB) ->
@@ -903,6 +910,7 @@ bool_test(is_pid,1) -> true;
bool_test(is_port,1) -> true;
bool_test(is_reference,1) -> true;
bool_test(is_tuple,1) -> true;
+bool_test(is_map,1) -> true;
bool_test(is_binary,1) -> true;
bool_test(is_function,1) -> true;
bool_test(is_record,2) -> true;
@@ -917,6 +925,7 @@ real_guard_function(node,0) -> true;
real_guard_function(node,1) -> true;
real_guard_function(round,1) -> true;
real_guard_function(size,1) -> true;
+real_guard_function(map_size,1) -> true;
real_guard_function(tl,1) -> true;
real_guard_function(trunc,1) -> true;
real_guard_function(self,0) -> true;
diff --git a/lib/stdlib/src/orddict.erl b/lib/stdlib/src/orddict.erl
index 45d3c84b3e..c98d78b34d 100644
--- a/lib/stdlib/src/orddict.erl
+++ b/lib/stdlib/src/orddict.erl
@@ -20,7 +20,7 @@
-module(orddict).
%% Standard interface.
--export([new/0,is_key/2,to_list/1,from_list/1,size/1]).
+-export([new/0,is_key/2,to_list/1,from_list/1,size/1,is_empty/1]).
-export([fetch/2,find/2,fetch_keys/1,erase/2]).
-export([store/3,append/3,append_list/3,update/3,update/4,update_counter/3]).
-export([fold/3,map/2,filter/2,merge/3]).
@@ -56,14 +56,22 @@ to_list(Dict) -> Dict.
List :: [{Key :: term(), Value :: term()}],
Orddict :: orddict().
+from_list([]) -> [];
+from_list([{_,_}]=Pair) -> Pair;
from_list(Pairs) ->
- lists:foldl(fun ({K,V}, D) -> store(K, V, D) end, [], Pairs).
+ lists:ukeysort(1, reverse_pairs(Pairs, [])).
-spec size(Orddict) -> non_neg_integer() when
Orddict :: orddict().
size(D) -> length(D).
+-spec is_empty(Orddict) -> boolean() when
+ Orddict :: orddict().
+
+is_empty([]) -> true;
+is_empty([_|_]) -> false.
+
-spec fetch(Key, Orddict) -> Value when
Key :: term(),
Value :: term(),
@@ -229,3 +237,7 @@ merge(F, [{K1,V1}|D1], [{_K2,V2}|D2]) -> %K1 == K2
[{K1,F(K1, V1, V2)}|merge(F, D1, D2)];
merge(F, [], D2) when is_function(F, 3) -> D2;
merge(F, D1, []) when is_function(F, 3) -> D1.
+
+reverse_pairs([{_,_}=H|T], Acc) ->
+ reverse_pairs(T, [H|Acc]);
+reverse_pairs([], Acc) -> Acc.
diff --git a/lib/stdlib/src/otp_internal.erl b/lib/stdlib/src/otp_internal.erl
index cebc9c91bd..6c25beabe9 100644
--- a/lib/stdlib/src/otp_internal.erl
+++ b/lib/stdlib/src/otp_internal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -83,18 +83,18 @@ obsolete_1(crypto, sha_init, 0) ->
{deprecated, {crypto, hash_init, 1}};
obsolete_1(crypto, md4_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, md5_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, sha_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, md4_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, md5_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, sha_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, md5_mac, 2) ->
{deprecated, {crypto, hmac, 3}};
@@ -104,9 +104,9 @@ obsolete_1(crypto, sha_mac, 3) ->
{deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, sha_mac_96, 2) ->
- {deprecated, {crypto, hmac_n, 3}};
+ {deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, md5_mac_96, 2) ->
- {deprecated, {crypto, hmac_n, 3}};
+ {deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, rsa_sign, 2) ->
{deprecated, {crypto, sign, 4}};
@@ -123,9 +123,9 @@ obsolete_1(crypto, dss_sign, 3) ->
{deprecated, {crypto, sign, 4}};
obsolete_1(crypto, dss_verify, 3) ->
- {deprecated, {crypto, verify, 4}};
+ {deprecated, {crypto, verify, 5}};
obsolete_1(crypto, dss_verify, 4) ->
- {deprecated, {crypto, verify, 4}};
+ {deprecated, {crypto, verify, 5}};
obsolete_1(crypto, mod_exp, 3) ->
{deprecated, {crypto, mod_pow, 3}};
@@ -133,7 +133,7 @@ obsolete_1(crypto, mod_exp, 3) ->
obsolete_1(crypto, dh_compute_key, 3) ->
{deprecated, {crypto, compute_key, 4}};
obsolete_1(crypto, dh_generate_key, 1) ->
- {deprecated, {crypto, generate_key, 3}};
+ {deprecated, {crypto, generate_key, 2}};
obsolete_1(crypto, dh_generate_key, 2) ->
{deprecated, {crypto, generate_key, 3}};
@@ -250,12 +250,12 @@ obsolete_1(snmp, N, A) ->
false ->
no;
true ->
- {deprecated, "Deprecated (will be removed in R17B); use snmpa:"++atom_to_list(N)++"/"++
+ {deprecated, "Deprecated (will be removed in OTP 18); use snmpa:"++atom_to_list(N)++"/"++
integer_to_list(A)++" instead"}
end;
obsolete_1(snmpa, old_info_format, 1) ->
- {deprecated, "Deprecated; (will be removed in R17B); use \"new\" format instead"};
+ {deprecated, "Deprecated; (will be removed in OTP 18); use \"new\" format instead"};
obsolete_1(snmpm, agent_info, 3) ->
{removed, {snmpm, agent_info, 2}, "R16B"};
obsolete_1(snmpm, update_agent_info, 5) ->
@@ -366,23 +366,6 @@ obsolete_1(auth, node_cookie, 1) ->
obsolete_1(auth, node_cookie, 2) ->
{deprecated, "Deprecated; use erlang:set_cookie/2 and net_adm:ping/1 instead"};
-obsolete_1(erlang, is_constant, 1) ->
- {removed, "Removed in R13B"};
-
-%% Added in R12B-0.
-obsolete_1(ssl, port, 1) ->
- {removed, {ssl, sockname, 1}, "R13B"};
-obsolete_1(ssl, accept, A) when A =:= 1; A =:= 2 ->
- {removed, "deprecated; use ssl:transport_accept/1,2 and ssl:ssl_accept/1,2"};
-obsolete_1(erlang, fault, 1) ->
- {removed, {erlang,error,1}, "R13B"};
-obsolete_1(erlang, fault, 2) ->
- {removed, {erlang,error,2}, "R13B"};
-
-%% Added in R12B-2.
-obsolete_1(file, rawopen, 2) ->
- {removed, "deprecated (will be removed in R13B); use file:open/2 with the raw option"};
-
obsolete_1(http, request, 1) -> {removed,{httpc,request,1},"R15B"};
obsolete_1(http, request, 2) -> {removed,{httpc,request,2},"R15B"};
obsolete_1(http, request, 4) -> {removed,{httpc,request,4},"R15B"};
@@ -438,13 +421,13 @@ obsolete_1(ssh_cm, stop_listener, 1) ->
obsolete_1(ssh_cm, session_open, A) when A =:= 2; A =:= 4 ->
{removed,{ssh_connection,session_channel,A},"R14B"};
obsolete_1(ssh_cm, direct_tcpip, A) when A =:= 6; A =:= 8 ->
- {removed,{ssh_connection,direct_tcpip,A}};
+ {removed,{ssh_connection,direct_tcpip,A},"R14B"};
obsolete_1(ssh_cm, tcpip_forward, 3) ->
{removed,{ssh_connection,tcpip_forward,3},"R14B"};
obsolete_1(ssh_cm, cancel_tcpip_forward, 3) ->
{removed,{ssh_connection,cancel_tcpip_forward,3},"R14B"};
obsolete_1(ssh_cm, open_pty, A) when A =:= 3; A =:= 7; A =:= 9 ->
- {removed,{ssh_connection,open_pty,A},"R14"};
+ {removed,{ssh_connection,open_pty,A},"R14B"};
obsolete_1(ssh_cm, setenv, 5) ->
{removed,{ssh_connection,setenv,5},"R14B"};
obsolete_1(ssh_cm, shell, 2) ->
@@ -458,11 +441,11 @@ obsolete_1(ssh_cm, winch, A) when A =:= 4; A =:= 6 ->
obsolete_1(ssh_cm, signal, 3) ->
{removed,{ssh_connection,signal,3},"R14B"};
obsolete_1(ssh_cm, attach, A) when A =:= 2; A =:= 3 ->
- {removed,{ssh,attach,A}};
+ {removed,"no longer useful; removed in R14B"};
obsolete_1(ssh_cm, detach, 2) ->
- {removed,"no longer useful; will be removed in R14B"};
+ {removed,"no longer useful; removed in R14B"};
obsolete_1(ssh_cm, set_user_ack, 4) ->
- {removed,"no longer useful; will be removed in R14B"};
+ {removed,"no longer useful; removed in R14B"};
obsolete_1(ssh_cm, adjust_window, 3) ->
{removed,{ssh_connection,adjust_window,3},"R14B"};
obsolete_1(ssh_cm, close, 2) ->
@@ -478,9 +461,9 @@ obsolete_1(ssh_cm, send_ack, A) when 3 =< A, A =< 5 ->
obsolete_1(ssh_ssh, connect, A) when 1 =< A, A =< 3 ->
{removed,{ssh,shell,A},"R14B"};
obsolete_1(ssh_sshd, listen, A) when 0 =< A, A =< 3 ->
- {removed,{ssh,daemon,[1,2,3]},"R14"};
+ {removed,{ssh,daemon,[1,2,3]},"R14B"};
obsolete_1(ssh_sshd, stop, 1) ->
- {removed,{ssh,stop_listener,1}};
+ {removed,{ssh,stop_listener,1},"R14B"};
%% Added in R13A.
obsolete_1(regexp, _, _) ->
@@ -524,7 +507,7 @@ obsolete_1(docb_xml_check, _, _) ->
%% Added in R15B
obsolete_1(asn1rt, F, _) when F == load_driver; F == unload_driver ->
- {deprecated,"deprecated (will be removed in R16A); has no effect as drivers are no longer used."};
+ {deprecated,"deprecated (will be removed in OTP 18); has no effect as drivers are no longer used"};
obsolete_1(ssl, pid, 1) ->
{removed,"was removed in R16; is no longer needed"};
obsolete_1(inviso, _, _) ->
@@ -532,7 +515,7 @@ obsolete_1(inviso, _, _) ->
%% Added in R15B01.
obsolete_1(gs, _, _) ->
- {deprecated,"the gs application has been deprecated and will be removed in R17; use the wx application instead"};
+ {deprecated,"the gs application has been deprecated and will be removed in OTP 18; use the wx application instead"};
obsolete_1(ssh, sign_data, 2) ->
{deprecated,"deprecated (will be removed in R16A); use public_key:pem_decode/1, public_key:pem_entry_decode/1 "
"and public_key:sign/3 instead"};
@@ -577,6 +560,26 @@ obsolete_1(wxCursor, new, 3) ->
obsolete_1(wxCursor, new, 4) ->
{deprecated,"deprecated function not available in wxWidgets-2.9 and later"};
+%% Added in OTP 17.
+obsolete_1(asn1ct, decode,3) ->
+ {deprecated,"deprecated; use Mod:decode/2 instead"};
+obsolete_1(asn1ct, encode, 3) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, decode,3) ->
+ {deprecated,"deprecated; use Mod:decode/2 instead"};
+obsolete_1(asn1rt, encode, 2) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, encode, 3) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, info, 1) ->
+ {deprecated,"deprecated; use Mod:info/0 instead"};
+obsolete_1(asn1rt, utf8_binary_to_list, 1) ->
+ {deprecated,{unicode,characters_to_list,1}};
+obsolete_1(asn1rt, utf8_list_to_binary, 1) ->
+ {deprecated,{unicode,characters_to_binary,1}};
+obsolete_1(pg, _, _) ->
+ {deprecated,"deprecated; will be removed in OTP 18"};
+
obsolete_1(_, _, _) ->
no.
diff --git a/lib/stdlib/src/pg.erl b/lib/stdlib/src/pg.erl
index ee177e4e0b..a41fd329c2 100644
--- a/lib/stdlib/src/pg.erl
+++ b/lib/stdlib/src/pg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -17,6 +17,7 @@
%% %CopyrightEnd%
%%
-module(pg).
+-deprecated(module).
%% pg provides a process group facility. Messages
%% can be multicasted to all members in the group
diff --git a/lib/stdlib/src/pool.erl b/lib/stdlib/src/pool.erl
index a5eb191ab2..dfe6318dea 100644
--- a/lib/stdlib/src/pool.erl
+++ b/lib/stdlib/src/pool.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -63,7 +63,7 @@ start(Name) ->
Args :: string(),
Nodes :: [node()].
start(Name, Args) when is_atom(Name) ->
- gen_server:start({global, pool_master}, pool, [], []),
+ _ = gen_server:start({global, pool_master}, pool, [], []),
Hosts = net_adm:host_file(),
Nodes = start_nodes(Hosts, Name, Args),
lists:foreach(fun attach/1, Nodes),
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl
index 1eb6fc2e86..bf2a4e7ac5 100644
--- a/lib/stdlib/src/proc_lib.erl
+++ b/lib/stdlib/src/proc_lib.erl
@@ -216,10 +216,8 @@ ensure_link(SpawnOpts) ->
init_p(Parent, Ancestors, Fun) when is_function(Fun) ->
put('$ancestors', [Parent|Ancestors]),
- {module,Mod} = erlang:fun_info(Fun, module),
- {name,Name} = erlang:fun_info(Fun, name),
- {arity,Arity} = erlang:fun_info(Fun, arity),
- put('$initial_call', {Mod,Name,Arity}),
+ Mfa = erlang:fun_info_mfa(Fun),
+ put('$initial_call', Mfa),
try
Fun()
catch
diff --git a/lib/stdlib/src/qlc.erl b/lib/stdlib/src/qlc.erl
index 48f6622565..002032d48d 100644
--- a/lib/stdlib/src/qlc.erl
+++ b/lib/stdlib/src/qlc.erl
@@ -1266,6 +1266,8 @@ abstr_term(Fun, Line) when is_function(Fun) ->
case erl_eval:fun_data(Fun) of
{fun_data, _Bs, Cs} ->
{'fun', Line, {clauses, Cs}};
+ {named_fun_data, _Bs, Name, Cs} ->
+ {named_fun, Line, Name, Cs};
false ->
{name, Name} = erlang:fun_info(Fun, name),
{arity, Arity} = erlang:fun_info(Fun, arity),
diff --git a/lib/stdlib/src/qlc_pt.erl b/lib/stdlib/src/qlc_pt.erl
index 26bc4d1bdf..b6bb758dfb 100644
--- a/lib/stdlib/src/qlc_pt.erl
+++ b/lib/stdlib/src/qlc_pt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1218,13 +1218,14 @@ lu_skip(ColConstants, FilterData, PatternFrame, PatternVars,
%% column, the filter will not be skipped.
%% (an example: {X=1} <- ..., X =:= 1).
length(D = Cols -- PatternColumns) =:= 1,
- Frame <- SFs,
- begin
+ {{_,Col} = Column, Constants} <- D,
+ %% Check that the following holds for all frames.
+ lists:all(
+ fun(Frame) ->
%% The column is compared/matched against a constant.
%% If there are no more comparisons/matches then
%% the filter can be replaced by the lookup of
%% the constant.
- [{{_,Col} = Column, Constants}] = D,
{VarI, FrameI} = unify_column(Frame, PV, Col, BindFun,
Imported),
VarValues = deref_skip(VarI, FrameI, LookupOp, Imported),
@@ -1253,7 +1254,7 @@ lu_skip(ColConstants, FilterData, PatternFrame, PatternVars,
length(VarValues) =< 1 andalso
(Constants -- LookedUpConstants =:= []) andalso
bindings_is_subset(Frame, F2, Imported)
- end],
+ end, SFs)],
ColFils = family_list(ColFil),
%% The skip tag 'all' means that all filters are covered by the lookup.
%% It does not imply that there is only one generator as is the case
@@ -2540,6 +2541,19 @@ nos({'fun',L,{clauses,Cs}}, S) ->
{clause,Ln,H,G,B}
end || {clause,Ln,H0,G0,B0} <- Cs],
{{'fun',L,{clauses,NCs}}, S};
+nos({named_fun,Loc,Name,Cs}, S) ->
+ {{var,NLoc,NName}, S1} = case Name of
+ '_' ->
+ S;
+ Name ->
+ nos_pattern({var,Loc,Name}, S)
+ end,
+ NCs = [begin
+ {H, S2} = nos_pattern(H0, S1),
+ {[G, B], _} = nos([G0, B0], S2),
+ {clause,CLoc,H,G,B}
+ end || {clause,CLoc,H0,G0,B0} <- Cs],
+ {{named_fun,NLoc,NName,NCs}, S};
nos({lc,L,E0,Qs0}, S) ->
%% QLCs as well as LCs. It is OK to modify LCs as long as they
%% occur within QLCs--the warning messages have already been found
@@ -2713,6 +2727,9 @@ var2const(E) ->
var_map(F, {var, _, _}=V) ->
F(V);
+var_map(F, {named_fun,NLoc,NName,Cs}) ->
+ {var,Loc,Name} = F({var,NLoc,NName}),
+ {named_fun,Loc,Name,var_map(F, Cs)};
var_map(F, T) when is_tuple(T) ->
list_to_tuple(var_map(F, tuple_to_list(T)));
var_map(F, [E | Es]) ->
diff --git a/lib/stdlib/src/queue.erl b/lib/stdlib/src/queue.erl
index 4bbf5de8a5..472d503b99 100644
--- a/lib/stdlib/src/queue.erl
+++ b/lib/stdlib/src/queue.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,6 +32,8 @@
-export([cons/2,head/1,tail/1,
snoc/2,last/1,daeh/1,init/1,liat/1,lait/1]).
+-export_type([queue/0, queue/1]).
+
%%--------------------------------------------------------------------------
%% Efficient implementation of double ended fifo queues
%%
@@ -44,10 +46,9 @@
%% that is; the RearList is reversed.
%%
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque queue() :: {list(), list()}.
+-opaque queue(Item) :: {list(Item), list(Item)}.
+
+-opaque queue() :: queue(_).
%% Creation, inspection and conversion
@@ -79,7 +80,7 @@ len(Q) ->
erlang:error(badarg, [Q]).
%% O(len(Q))
--spec to_list(Q :: queue()) -> list().
+-spec to_list(Q :: queue(Item)) -> list(Item).
to_list({In,Out}) when is_list(In), is_list(Out) ->
Out++lists:reverse(In, []);
to_list(Q) ->
@@ -88,7 +89,7 @@ to_list(Q) ->
%% Create queue from list
%%
%% O(length(L))
--spec from_list(L :: list()) -> queue().
+-spec from_list(L :: list(Item)) -> queue(Item).
from_list(L) when is_list(L) ->
f2r(L);
from_list(L) ->
@@ -97,7 +98,7 @@ from_list(L) ->
%% Return true or false depending on if element is in queue
%%
%% O(length(Q)) worst case
--spec member(Item :: term(), Q :: queue()) -> boolean().
+-spec member(Item, Q :: queue(Item)) -> boolean().
member(X, {R,F}) when is_list(R), is_list(F) ->
lists:member(X, R) orelse lists:member(X, F);
member(X, Q) ->
@@ -110,7 +111,7 @@ member(X, Q) ->
%% Put at least one element in each list, if it is cheap
%%
%% O(1)
--spec in(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec in(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
in(X, {[_]=In,[]}) ->
{[X], In};
in(X, {In,Out}) when is_list(In), is_list(Out) ->
@@ -122,7 +123,7 @@ in(X, Q) ->
%% Put at least one element in each list, if it is cheap
%%
%% O(1)
--spec in_r(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec in_r(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
in_r(X, {[],[_]=F}) ->
{F,[X]};
in_r(X, {R,F}) when is_list(R), is_list(F) ->
@@ -133,9 +134,9 @@ in_r(X, Q) ->
%% Take from head/front
%%
%% O(1) amortized, O(len(Q)) worst case
--spec out(Q1 :: queue()) ->
- {{value, Item :: term()}, Q2 :: queue()} |
- {empty, Q1 :: queue()}.
+-spec out(Q1 :: queue(Item)) ->
+ {{value, Item}, Q2 :: queue(Item)} |
+ {empty, Q1 :: queue(Item)}.
out({[],[]}=Q) ->
{empty,Q};
out({[V],[]}) ->
@@ -153,9 +154,9 @@ out(Q) ->
%% Take from tail/rear
%%
%% O(1) amortized, O(len(Q)) worst case
--spec out_r(Q1 :: queue()) ->
- {{value, Item :: term()}, Q2 :: queue()} |
- {empty, Q1 :: queue()}.
+-spec out_r(Q1 :: queue(Item)) ->
+ {{value, Item}, Q2 :: queue(Item)} |
+ {empty, Q1 :: queue(Item)}.
out_r({[],[]}=Q) ->
{empty,Q};
out_r({[],[V]}) ->
@@ -176,7 +177,7 @@ out_r(Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec get(Q :: queue()) -> Item :: term().
+-spec get(Q :: queue(Item)) -> Item.
get({[],[]}=Q) ->
erlang:error(empty, [Q]);
get({R,F}) when is_list(R), is_list(F) ->
@@ -195,7 +196,7 @@ get([_|R], []) -> % malformed queue -> O(len(Q))
%% Return the last element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec get_r(Q :: queue()) -> Item :: term().
+-spec get_r(Q :: queue(Item)) -> Item.
get_r({[],[]}=Q) ->
erlang:error(empty, [Q]);
get_r({[H|_],F}) when is_list(F) ->
@@ -210,7 +211,7 @@ get_r(Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec peek(Q :: queue()) -> empty | {value,Item :: term()}.
+-spec peek(Q :: queue(Item)) -> empty | {value, Item}.
peek({[],[]}) ->
empty;
peek({R,[H|_]}) when is_list(R) ->
@@ -225,7 +226,7 @@ peek(Q) ->
%% Return the last element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec peek_r(Q :: queue()) -> empty | {value,Item :: term()}.
+-spec peek_r(Q :: queue(Item)) -> empty | {value, Item}.
peek_r({[],[]}) ->
empty;
peek_r({[H|_],F}) when is_list(F) ->
@@ -240,7 +241,7 @@ peek_r(Q) ->
%% Remove the first element and return resulting queue
%%
%% O(1) amortized
--spec drop(Q1 :: queue()) -> Q2 :: queue().
+-spec drop(Q1 :: queue(Item)) -> Q2 :: queue(Item).
drop({[],[]}=Q) ->
erlang:error(empty, [Q]);
drop({[_],[]}) ->
@@ -258,7 +259,7 @@ drop(Q) ->
%% Remove the last element and return resulting queue
%%
%% O(1) amortized
--spec drop_r(Q1 :: queue()) -> Q2 :: queue().
+-spec drop_r(Q1 :: queue(Item)) -> Q2 :: queue(Item).
drop_r({[],[]}=Q) ->
erlang:error(empty, [Q]);
drop_r({[],[_]}) ->
@@ -279,7 +280,7 @@ drop_r(Q) ->
%% Return reversed queue
%%
%% O(1)
--spec reverse(Q1 :: queue()) -> Q2 :: queue().
+-spec reverse(Q1 :: queue(Item)) -> Q2 :: queue(Item).
reverse({R,F}) when is_list(R), is_list(F) ->
{F,R};
reverse(Q) ->
@@ -289,7 +290,7 @@ reverse(Q) ->
%%
%% Q2 empty: O(1)
%% else: O(len(Q1))
--spec join(Q1 :: queue(), Q2 :: queue()) -> Q3 :: queue().
+-spec join(Q1 :: queue(Item), Q2 :: queue(Item)) -> Q3 :: queue(Item).
join({R,F}=Q, {[],[]}) when is_list(R), is_list(F) ->
Q;
join({[],[]}, {R,F}=Q) when is_list(R), is_list(F) ->
@@ -303,8 +304,8 @@ join(Q1, Q2) ->
%%
%% N = 0..len(Q)
%% O(max(N, len(Q)))
--spec split(N :: non_neg_integer(), Q1 :: queue()) ->
- {Q2 :: queue(),Q3 :: queue()}.
+-spec split(N :: non_neg_integer(), Q1 :: queue(Item)) ->
+ {Q2 :: queue(Item),Q3 :: queue(Item)}.
split(0, {R,F}=Q) when is_list(R), is_list(F) ->
{{[],[]},Q};
split(N, {R,F}=Q) when is_integer(N), N >= 1, is_list(R), is_list(F) ->
@@ -345,8 +346,8 @@ split_r1_to_f2(N, [X|R1], F1, R2, F2) ->
%%
%% Fun(_) -> List: O(length(List) * len(Q))
%% else: O(len(Q)
--spec filter(Fun, Q1 :: queue()) -> Q2 :: queue() when
- Fun :: fun((Item :: term()) -> boolean() | list()).
+-spec filter(Fun, Q1 :: queue(Item)) -> Q2 :: queue(Item) when
+ Fun :: fun((Item) -> boolean() | list(Item)).
filter(Fun, {R0,F0}) when is_function(Fun, 1), is_list(R0), is_list(F0) ->
F = filter_f(Fun, F0),
R = filter_r(Fun, R0),
@@ -422,7 +423,7 @@ filter_r(Fun, [X|R0]) ->
%% Cons to head
%%
--spec cons(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec cons(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
cons(X, Q) ->
in_r(X, Q).
@@ -431,7 +432,7 @@ cons(X, Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec head(Q :: queue()) -> Item :: term().
+-spec head(Q :: queue(Item)) -> Item.
head({[],[]}=Q) ->
erlang:error(empty, [Q]);
head({R,F}) when is_list(R), is_list(F) ->
@@ -441,7 +442,7 @@ head(Q) ->
%% Remove head element and return resulting queue
%%
--spec tail(Q1 :: queue()) -> Q2 :: queue().
+-spec tail(Q1 :: queue(Item)) -> Q2 :: queue(Item).
tail(Q) ->
drop(Q).
@@ -449,22 +450,22 @@ tail(Q) ->
%% Cons to tail
%%
--spec snoc(Q1 :: queue(), Item :: term()) -> Q2 :: queue().
+-spec snoc(Q1 :: queue(Item), Item) -> Q2 :: queue(Item).
snoc(Q, X) ->
in(X, Q).
%% Return last element
--spec daeh(Q :: queue()) -> Item :: term().
+-spec daeh(Q :: queue(Item)) -> Item.
daeh(Q) -> get_r(Q).
--spec last(Q :: queue()) -> Item :: term().
+-spec last(Q :: queue(Item)) -> Item.
last(Q) -> get_r(Q).
%% Remove last element and return resulting queue
--spec liat(Q1 :: queue()) -> Q2 :: queue().
+-spec liat(Q1 :: queue(Item)) -> Q2 :: queue(Item).
liat(Q) -> drop_r(Q).
--spec lait(Q1 :: queue()) -> Q2 :: queue().
+-spec lait(Q1 :: queue(Item)) -> Q2 :: queue(Item).
lait(Q) -> drop_r(Q). %% Oops, mis-spelled 'tail' reversed. Forget this one.
--spec init(Q1 :: queue()) -> Q2 :: queue().
+-spec init(Q1 :: queue(Item)) -> Q2 :: queue(Item).
init(Q) -> drop_r(Q).
%%--------------------------------------------------------------------------
diff --git a/lib/stdlib/src/re.erl b/lib/stdlib/src/re.erl
index c5109ec455..7f3cd8f592 100644
--- a/lib/stdlib/src/re.erl
+++ b/lib/stdlib/src/re.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,20 +19,20 @@
-module(re).
-export([grun/3,urun/3,ucompile/2,replace/3,replace/4,split/2,split/3]).
-%-opaque mp() :: {re_pattern, _, _, _}.
--type mp() :: {re_pattern, _, _, _}.
+-type mp() :: {re_pattern, _, _, _, _}.
-type nl_spec() :: cr | crlf | lf | anycrlf | any.
-type compile_option() :: unicode | anchored | caseless | dollar_endonly
| dotall | extended | firstline | multiline
| no_auto_capture | dupnames | ungreedy
- | {newline, nl_spec()}| bsr_anycrlf
- | bsr_unicode.
+ | {newline, nl_spec()}
+ | bsr_anycrlf | bsr_unicode
+ | no_start_optimize | ucp | never_utf.
%%% BIFs
--export([compile/1, compile/2, run/2, run/3]).
+-export([compile/1, compile/2, run/2, run/3, inspect/2]).
-spec compile(Regexp) -> {ok, MP} | {error, ErrSpec} when
Regexp :: iodata(),
@@ -63,17 +63,21 @@ run(_, _) ->
-spec run(Subject, RE, Options) -> {match, Captured} |
match |
- nomatch when
+ nomatch |
+ {error, ErrType} when
Subject :: iodata() | unicode:charlist(),
RE :: mp() | iodata() | unicode:charlist(),
Options :: [Option],
- Option :: anchored | global | notbol | noteol | notempty
+ Option :: anchored | global | notbol | noteol | notempty
+ | notempty_atstart | report_errors
| {offset, non_neg_integer()} |
+ {match_limit, non_neg_integer()} |
+ {match_limit_recursion, non_neg_integer()} |
{newline, NLSpec :: nl_spec()} |
bsr_anycrlf | bsr_unicode | {capture, ValueSpec} |
{capture, ValueSpec, Type} | CompileOpt,
Type :: index | list | binary,
- ValueSpec :: all | all_but_first | first | none | ValueList,
+ ValueSpec :: all | all_but_first | all_names | first | none | ValueList,
ValueList :: [ValueID],
ValueID :: integer() | string() | atom(),
CompileOpt :: compile_option(),
@@ -83,11 +87,21 @@ run(_, _) ->
| binary(),
ListConversionData :: string()
| {error, string(), binary()}
- | {incomplete, string(), binary()}.
+ | {incomplete, string(), binary()},
+ ErrType :: match_limit | match_limit_recursion | {compile, CompileErr},
+ CompileErr :: {ErrString :: string(), Position :: non_neg_integer()}.
run(_, _, _) ->
erlang:nif_error(undef).
+-spec inspect(MP,Item) -> {namelist, [ binary() ]} when
+ MP :: mp(),
+ Item :: namelist.
+
+inspect(_,_) ->
+ erlang:nif_error(undef).
+
+
%%% End of BIFs
-spec split(Subject, RE) -> SplitList when
@@ -102,8 +116,10 @@ split(Subject,RE) ->
Subject :: iodata() | unicode:charlist(),
RE :: mp() | iodata() | unicode:charlist(),
Options :: [ Option ],
- Option :: anchored | notbol | noteol | notempty
+ Option :: anchored | notbol | noteol | notempty | notempty_atstart
| {offset, non_neg_integer()} | {newline, nl_spec()}
+ | {match_limit, non_neg_integer()}
+ | {match_limit_recursion, non_neg_integer()}
| bsr_anycrlf | bsr_unicode | {return, ReturnType}
| {parts, NumParts} | group | trim | CompileOpt,
NumParts :: non_neg_integer() | infinity,
@@ -266,7 +282,7 @@ extend_subpatterns([],N) ->
extend_subpatterns([H|T],N) ->
[H | extend_subpatterns(T,N-1)].
-compile_split({re_pattern,N,_,_} = Comp, Options) ->
+compile_split({re_pattern,N,_,_,_} = Comp, Options) ->
{Comp,N,Options};
compile_split(Pat,Options0) when not is_tuple(Pat) ->
Options = lists:filter(fun(O) ->
@@ -275,7 +291,7 @@ compile_split(Pat,Options0) when not is_tuple(Pat) ->
case re:compile(Pat,Options) of
{error,Err} ->
{error,Err};
- {ok, {re_pattern,N,_,_} = Comp} ->
+ {ok, {re_pattern,N,_,_,_} = Comp} ->
NewOpt = lists:filter(fun(OO) -> (not copt(OO)) end, Options0),
{Comp,N,NewOpt}
end;
@@ -295,8 +311,11 @@ replace(Subject,RE,Replacement) ->
RE :: mp() | iodata() | unicode:charlist(),
Replacement :: iodata() | unicode:charlist(),
Options :: [Option],
- Option :: anchored | global | notbol | noteol | notempty
+ Option :: anchored | global | notbol | noteol | notempty
+ | notempty_atstart
| {offset, non_neg_integer()} | {newline, NLSpec} | bsr_anycrlf
+ | {match_limit, non_neg_integer()}
+ | {match_limit_recursion, non_neg_integer()}
| bsr_unicode | {return, ReturnType} | CompileOpt,
ReturnType :: iodata | list | binary,
CompileOpt :: compile_option(),
@@ -352,6 +371,8 @@ process_repl_params([],Convert,Unicode) ->
process_repl_params([unicode|T],C,_U) ->
{NT,NC,NU} = process_repl_params(T,C,true),
{[unicode|NT],NC,NU};
+process_repl_params([report_errors|_],_,_) ->
+ throw(badopt);
process_repl_params([{capture,_,_}|_],_,_) ->
throw(badopt);
process_repl_params([{capture,_}|_],_,_) ->
@@ -387,6 +408,8 @@ process_split_params([group|T],C,U,L,S,_G) ->
process_split_params(T,C,U,L,S,true);
process_split_params([global|_],_,_,_,_,_) ->
throw(badopt);
+process_split_params([report_errors|_],_,_,_,_,_) ->
+ throw(badopt);
process_split_params([{capture,_,_}|_],_,_,_,_,_) ->
throw(badopt);
process_split_params([{capture,_}|_],_,_,_,_,_) ->
@@ -487,17 +510,31 @@ do_replace(Subject,Repl,SubExprs0) ->
end || Part <- Repl ].
-check_for_unicode({re_pattern,_,1,_},_) ->
+check_for_unicode({re_pattern,_,1,_,_},_) ->
true;
-check_for_unicode({re_pattern,_,0,_},_) ->
+check_for_unicode({re_pattern,_,0,_,_},_) ->
false;
check_for_unicode(_,L) ->
lists:member(unicode,L).
+
+check_for_crlf({re_pattern,_,_,1,_},_) ->
+ true;
+check_for_crlf({re_pattern,_,_,0,_},_) ->
+ false;
+check_for_crlf(_,L) ->
+ case lists:keysearch(newline,1,L) of
+ {value,{newline,any}} -> true;
+ {value,{newline,crlf}} -> true;
+ {value,{newline,anycrlf}} -> true;
+ _ -> false
+ end.
% SelectReturn = false | all | stirpfirst | none
% ConvertReturn = index | list | binary
% {capture, all} -> all (untouchded)
-% {capture, first} -> kept in argumentt list and Select all
+% {capture, all_names} -> if names are present: treated as a name {capture, [...]}
+% else: same as {capture, []}
+% {capture, first} -> kept in argument list and Select all
% {capture, all_but_first} -> removed from argument list and selects stripfirst
% {capture, none} -> removed from argument list and selects none
% {capture, []} -> removed from argument list and selects none
@@ -506,23 +543,30 @@ check_for_unicode(_,L) ->
% Call as process_parameters([],0,false,index,NeedClean)
-process_parameters([],InitialOffset, SelectReturn, ConvertReturn,_) ->
+process_parameters([],InitialOffset, SelectReturn, ConvertReturn,_,_) ->
{[], InitialOffset, SelectReturn, ConvertReturn};
-process_parameters([{offset, N} | T],_Init0,Select0,Return0,CC) ->
- process_parameters(T,N,Select0,Return0,CC);
-process_parameters([global | T],Init0,Select0,Return0,CC) ->
- process_parameters(T,Init0,Select0,Return0,CC);
-process_parameters([{capture,Values,Type}|T],Init0,Select0,_Return0,CC) ->
- process_parameters([{capture,Values}|T],Init0,Select0,Type,CC);
-process_parameters([{capture,Values}|T],Init0,Select0,Return0,CC) ->
+process_parameters([{offset, N} | T],_Init0,Select0,Return0,CC,RE) ->
+ process_parameters(T,N,Select0,Return0,CC,RE);
+process_parameters([global | T],Init0,Select0,Return0,CC,RE) ->
+ process_parameters(T,Init0,Select0,Return0,CC,RE);
+process_parameters([{capture,Values,Type}|T],Init0,Select0,_Return0,CC,RE) ->
+ process_parameters([{capture,Values}|T],Init0,Select0,Type,CC,RE);
+process_parameters([{capture,Values}|T],Init0,Select0,Return0,CC,RE) ->
% First process the rest to see if capture was already present
{NewTail, Init1, Select1, Return1} =
- process_parameters(T,Init0,Select0,Return0,CC),
+ process_parameters(T,Init0,Select0,Return0,CC,RE),
case Select1 of
false ->
case Values of
all ->
{[{capture,all} | NewTail], Init1, all, Return0};
+ all_names ->
+ case re:inspect(RE,namelist) of
+ {namelist, []} ->
+ {[{capture,first} | NewTail], Init1, none, Return0};
+ {namelist, List} ->
+ {[{capture,[0|List]} | NewTail], Init1, stripfirst, Return0}
+ end;
first ->
{[{capture,first} | NewTail], Init1, all, Return0};
all_but_first ->
@@ -541,20 +585,20 @@ process_parameters([{capture,Values}|T],Init0,Select0,Return0,CC) ->
% Found overriding further down list, ignore this one
{NewTail, Init1, Select1, Return1}
end;
-process_parameters([H|T],Init0,Select0,Return0,true) ->
+process_parameters([H|T],Init0,Select0,Return0,true,RE) ->
case copt(H) of
true ->
- process_parameters(T,Init0,Select0,Return0,true);
+ process_parameters(T,Init0,Select0,Return0,true,RE);
false ->
{NewT,Init,Select,Return} =
- process_parameters(T,Init0,Select0,Return0,true),
+ process_parameters(T,Init0,Select0,Return0,true,RE),
{[H|NewT],Init,Select,Return}
end;
-process_parameters([H|T],Init0,Select0,Return0,false) ->
+process_parameters([H|T],Init0,Select0,Return0,false,RE) ->
{NewT,Init,Select,Return} =
- process_parameters(T,Init0,Select0,Return0,false),
+ process_parameters(T,Init0,Select0,Return0,false,RE),
{[H|NewT],Init,Select,Return};
-process_parameters(_,_,_,_,_) ->
+process_parameters(_,_,_,_,_,_) ->
throw(badlist).
postprocess({match,[]},_,_,_,_) ->
@@ -662,7 +706,7 @@ urun2(Subject0,RE0,Options0) ->
RE = case RE0 of
BinRE when is_binary(BinRE) ->
BinRE;
- {re_pattern,_,_,_} = ReCompiled ->
+ {re_pattern,_,_,_,_} = ReCompiled ->
ReCompiled;
ListRE ->
unicode:characters_to_binary(ListRE,unicode)
@@ -703,38 +747,46 @@ grun(Subject,RE,{Options,NeedClean,OrigRE}) ->
grun2(Subject,RE,{Options,NeedClean}) ->
Unicode = check_for_unicode(RE,Options),
+ CRLF = check_for_crlf(RE,Options),
FlatSubject = to_binary(Subject, Unicode),
- do_grun(FlatSubject,Subject,Unicode,RE,{Options,NeedClean}).
+ do_grun(FlatSubject,Subject,Unicode,CRLF,RE,{Options,NeedClean}).
-do_grun(FlatSubject,Subject,Unicode,RE,{Options0,NeedClean}) ->
+do_grun(FlatSubject,Subject,Unicode,CRLF,RE,{Options0,NeedClean}) ->
{StrippedOptions, InitialOffset,
SelectReturn, ConvertReturn} =
case (catch
- process_parameters(Options0, 0, false, index, NeedClean)) of
+ process_parameters(Options0, 0, false, index, NeedClean,RE)) of
badlist ->
erlang:error(badarg,[Subject,RE,Options0]);
CorrectReturn ->
CorrectReturn
end,
- postprocess(loopexec(FlatSubject,RE,InitialOffset,
- byte_size(FlatSubject),
- Unicode,StrippedOptions),
- SelectReturn,ConvertReturn,FlatSubject,Unicode).
+ try
+ postprocess(loopexec(FlatSubject,RE,InitialOffset,
+ byte_size(FlatSubject),
+ Unicode,CRLF,StrippedOptions),
+ SelectReturn,ConvertReturn,FlatSubject,Unicode)
+ catch
+ throw:ErrTuple ->
+ ErrTuple
+ end.
-loopexec(_,_,X,Y,_,_) when X > Y ->
+loopexec(_,_,X,Y,_,_,_) when X > Y ->
{match,[]};
-loopexec(Subject,RE,X,Y,Unicode,Options) ->
+loopexec(Subject,RE,X,Y,Unicode,CRLF,Options) ->
case re:run(Subject,RE,[{offset,X}]++Options) of
+ {error, Err} ->
+ throw({error,Err});
nomatch ->
{match,[]};
{match,[{A,B}|More]} ->
{match,Rest} =
case B>0 of
true ->
- loopexec(Subject,RE,A+B,Y,Unicode,Options);
+ loopexec(Subject,RE,A+B,Y,Unicode,CRLF,Options);
false ->
{match,M} =
- case re:run(Subject,RE,[{offset,X},notempty,
+ case re:run(Subject,RE,[{offset,X},notempty_atstart,
anchored]++Options) of
nomatch ->
{match,[]};
@@ -745,10 +797,10 @@ loopexec(Subject,RE,X,Y,Unicode,Options) ->
[{_,NStep}|_] when NStep > 0 ->
A+NStep;
_ ->
- forward(Subject,A,1,Unicode)
+ forward(Subject,A,1,Unicode,CRLF)
end,
{match,MM} = loopexec(Subject,RE,NewA,Y,
- Unicode,Options),
+ Unicode,CRLF,Options),
case M of
[] ->
{match,MM};
@@ -759,11 +811,22 @@ loopexec(Subject,RE,X,Y,Unicode,Options) ->
{match,[[{A,B}|More] | Rest]}
end.
-forward(_Chal,A,0,_) ->
+forward(_Chal,A,0,_,_) ->
A;
-forward(_Chal,A,N,false) ->
- A+N;
-forward(Chal,A,N,true) ->
+forward(Chal,A,N,U,true) ->
+ <<_:A/binary,Tl/binary>> = Chal,
+ case Tl of
+ <<$\r,$\n,_/binary>> ->
+ forward(Chal,A+2,N-1,U,true);
+ _ ->
+ forward2(Chal,A,N,U,true)
+ end;
+forward(Chal,A,N,U,false) ->
+ forward2(Chal,A,N,U,false).
+
+forward2(Chal,A,N,false,CRLF) ->
+ forward(Chal,A+1,N-1,false,CRLF);
+forward2(Chal,A,N,true,CRLF) ->
<<_:A/binary,Tl/binary>> = Chal,
Forw = case Tl of
<<1:1,1:1,0:1,_:5,_/binary>> ->
@@ -775,10 +838,16 @@ forward(Chal,A,N,true) ->
_ ->
1
end,
- forward(Chal,A+Forw,N-1,true).
+ forward(Chal,A+Forw,N-1,true,CRLF).
copt(caseless) ->
true;
+copt(no_start_optimize) ->
+ true;
+copt(never_utf) ->
+ true;
+copt(ucp) ->
+ true;
copt(dollar_endonly) ->
true;
copt(dotall) ->
@@ -809,6 +878,8 @@ copt(_) ->
runopt(notempty) ->
true;
+runopt(notempty_atstart) ->
+ true;
runopt(notbol) ->
true;
runopt(noteol) ->
@@ -821,6 +892,10 @@ runopt({capture,_}) ->
true;
runopt(global) ->
true;
+runopt({match_limit,_}) ->
+ true;
+runopt({match_limit_recursion,_}) ->
+ true;
runopt(_) ->
false.
diff --git a/lib/stdlib/src/sets.erl b/lib/stdlib/src/sets.erl
index e6f05b71d4..167a676281 100644
--- a/lib/stdlib/src/sets.erl
+++ b/lib/stdlib/src/sets.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,6 +43,8 @@
-export([subtract/2,is_subset/2]).
-export([fold/3,filter/2]).
+-export_type([set/0, set/1]).
+
%% Note: mk_seg/1 must be changed too if seg_size is changed.
-define(seg_size, 16).
-define(max_seg, 32).
@@ -54,8 +55,8 @@
%%------------------------------------------------------------------------------
--type seg() :: tuple().
--type segs() :: tuple().
+-type seg() :: tuple().
+-type segs(_Element) :: tuple().
%% Define a hash set. The default values are the standard ones.
-record(set,
@@ -66,14 +67,12 @@
exp_size=?exp_size :: non_neg_integer(), % Size to expand at
con_size=?con_size :: non_neg_integer(), % Size to contract at
empty :: seg(), % Empty segment
- segs :: segs() % Segments
+ segs :: segs(_) % Segments
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #set{}
-%% record and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque set() :: #set{}.
+
+-opaque set() :: set(_).
+
+-opaque set(Element) :: #set{segs :: segs(Element)}.
%%------------------------------------------------------------------------------
@@ -99,24 +98,23 @@ size(S) -> S#set.size.
%% to_list(Set) -> [Elem].
%% Return the elements in Set as a list.
-spec to_list(Set) -> List when
- Set :: set(),
- List :: [term()].
+ Set :: set(Element),
+ List :: [Element].
to_list(S) ->
fold(fun (Elem, List) -> [Elem|List] end, [], S).
%% from_list([Elem]) -> Set.
%% Build a set from the elements in List.
-spec from_list(List) -> Set when
- List :: [term()],
- Set :: set().
+ List :: [Element],
+ Set :: set(Element).
from_list(L) ->
lists:foldl(fun (E, S) -> add_element(E, S) end, new(), L).
%% is_element(Element, Set) -> boolean().
%% Return 'true' if Element is an element of Set, else 'false'.
-spec is_element(Element, Set) -> boolean() when
- Element :: term(),
- Set :: set().
+ Set :: set(Element).
is_element(E, S) ->
Slot = get_slot(S, E),
Bkt = get_bucket(S, Slot),
@@ -125,9 +123,8 @@ is_element(E, S) ->
%% add_element(Element, Set) -> Set.
%% Return Set with Element inserted in it.
-spec add_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add_element(E, S0) ->
Slot = get_slot(S0, E),
{S1,Ic} = on_bucket(fun (B0) -> add_bkt_el(E, B0, B0) end, S0, Slot),
@@ -142,9 +139,8 @@ add_bkt_el(E, [], Bkt) -> {[E|Bkt],1}.
%% del_element(Element, Set) -> Set.
%% Return Set but with Element removed.
-spec del_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
del_element(E, S0) ->
Slot = get_slot(S0, E),
{S1,Dc} = on_bucket(fun (B0) -> del_bkt_el(E, B0) end, S0, Slot),
@@ -160,9 +156,9 @@ del_bkt_el(_, []) -> {[],0}.
%% union(Set1, Set2) -> Set
%% Return the union of Set1 and Set2.
-spec union(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
union(S1, S2) when S1#set.size < S2#set.size ->
fold(fun (E, S) -> add_element(E, S) end, S2, S1);
union(S1, S2) ->
@@ -171,14 +167,14 @@ union(S1, S2) ->
%% union([Set]) -> Set
%% Return the union of the list of sets.
-spec union(SetList) -> Set when
- SetList :: [set()],
- Set :: set().
+ SetList :: [set(Element)],
+ Set :: set(Element).
union([S1,S2|Ss]) ->
union1(union(S1, S2), Ss);
union([S]) -> S;
union([]) -> new().
--spec union1(set(), [set()]) -> set().
+-spec union1(set(E), [set(E)]) -> set(E).
union1(S1, [S2|Ss]) ->
union1(union(S1, S2), Ss);
union1(S1, []) -> S1.
@@ -186,9 +182,9 @@ union1(S1, []) -> S1.
%% intersection(Set1, Set2) -> Set.
%% Return the intersection of Set1 and Set2.
-spec intersection(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
intersection(S1, S2) when S1#set.size < S2#set.size ->
filter(fun (E) -> is_element(E, S2) end, S1);
intersection(S1, S2) ->
@@ -197,13 +193,13 @@ intersection(S1, S2) ->
%% intersection([Set]) -> Set.
%% Return the intersection of the list of sets.
-spec intersection(SetList) -> Set when
- SetList :: [set(),...],
- Set :: set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
intersection([S1,S2|Ss]) ->
intersection1(intersection(S1, S2), Ss);
intersection([S]) -> S.
--spec intersection1(set(), [set()]) -> set().
+-spec intersection1(set(E), [set(E)]) -> set(E).
intersection1(S1, [S2|Ss]) ->
intersection1(intersection(S1, S2), Ss);
intersection1(S1, []) -> S1.
@@ -211,8 +207,8 @@ intersection1(S1, []) -> S1.
%% is_disjoint(Set1, Set2) -> boolean().
%% Check whether Set1 and Set2 are disjoint.
-spec is_disjoint(Set1, Set2) -> boolean() when
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_disjoint(S1, S2) when S1#set.size < S2#set.size ->
fold(fun (_, false) -> false;
(E, true) -> not is_element(E, S2)
@@ -226,9 +222,9 @@ is_disjoint(S1, S2) ->
%% Return all and only the elements of Set1 which are not also in
%% Set2.
-spec subtract(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
subtract(S1, S2) ->
filter(fun (E) -> not is_element(E, S2) end, S1).
@@ -236,34 +232,34 @@ subtract(S1, S2) ->
%% Return 'true' when every element of Set1 is also a member of
%% Set2, else 'false'.
-spec is_subset(Set1, Set2) -> boolean() when
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_subset(S1, S2) ->
fold(fun (E, Sub) -> Sub andalso is_element(E, S2) end, true, S1).
%% fold(Fun, Accumulator, Set) -> Accumulator.
%% Fold function Fun over all elements in Set and return Accumulator.
-spec fold(Function, Acc0, Set) -> Acc1 when
- Function :: fun((E :: term(),AccIn) -> AccOut),
- Set :: set(),
- Acc0 :: T,
- Acc1 :: T,
- AccIn :: T,
- AccOut :: T.
+ Function :: fun((Element, AccIn) -> AccOut),
+ Set :: set(Element),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc.
fold(F, Acc, D) -> fold_set(F, Acc, D).
%% filter(Fun, Set) -> Set.
%% Filter Set with Fun.
-spec filter(Pred, Set1) -> Set2 when
- Pred :: fun((E :: term()) -> boolean()),
- Set1 :: set(),
- Set2 :: set().
+ Pred :: fun((Element) -> boolean()),
+ Set1 :: set(Element),
+ Set2 :: set(Element).
filter(F, D) -> filter_set(F, D).
%% get_slot(Hashdb, Key) -> Slot.
%% Get the slot. First hash on the new range, if we hit a bucket
%% which has not been split use the unsplit buddy bucket.
--spec get_slot(set(), term()) -> non_neg_integer().
+-spec get_slot(set(E), E) -> non_neg_integer().
get_slot(T, Key) ->
H = erlang:phash(Key, T#set.maxn),
if
@@ -277,8 +273,8 @@ get_bucket(T, Slot) -> get_bucket_s(T#set.segs, Slot).
%% on_bucket(Fun, Hashdb, Slot) -> {NewHashDb,Result}.
%% Apply Fun to the bucket in Slot and replace the returned bucket.
--spec on_bucket(fun((_) -> {[_], 0 | 1}), set(), non_neg_integer()) ->
- {set(), 0 | 1}.
+-spec on_bucket(fun((_) -> {[_], 0 | 1}), set(E), non_neg_integer()) ->
+ {set(E), 0 | 1}.
on_bucket(F, T, Slot) ->
SegI = ((Slot-1) div ?seg_size) + 1,
BktI = ((Slot-1) rem ?seg_size) + 1,
@@ -352,7 +348,7 @@ put_bucket_s(Segs, Slot, Bkt) ->
Seg = setelement(BktI, element(SegI, Segs), Bkt),
setelement(SegI, Segs, Seg).
--spec maybe_expand(set(), 0 | 1) -> set().
+-spec maybe_expand(set(E), 0 | 1) -> set(E).
maybe_expand(T0, Ic) when T0#set.size + Ic > T0#set.exp_size ->
T = maybe_expand_segs(T0), %Do we need more segments.
N = T#set.n + 1, %Next slot to expand into
@@ -370,14 +366,14 @@ maybe_expand(T0, Ic) when T0#set.size + Ic > T0#set.exp_size ->
segs = Segs2};
maybe_expand(T, Ic) -> T#set{size = T#set.size + Ic}.
--spec maybe_expand_segs(set()) -> set().
+-spec maybe_expand_segs(set(E)) -> set(E).
maybe_expand_segs(T) when T#set.n =:= T#set.maxn ->
T#set{maxn = 2 * T#set.maxn,
bso = 2 * T#set.bso,
segs = expand_segs(T#set.segs, T#set.empty)};
maybe_expand_segs(T) -> T.
--spec maybe_contract(set(), non_neg_integer()) -> set().
+-spec maybe_contract(set(E), non_neg_integer()) -> set(E).
maybe_contract(T, Dc) when T#set.size - Dc < T#set.con_size,
T#set.n > ?seg_size ->
N = T#set.n,
@@ -396,7 +392,7 @@ maybe_contract(T, Dc) when T#set.size - Dc < T#set.con_size,
segs = Segs2});
maybe_contract(T, Dc) -> T#set{size = T#set.size - Dc}.
--spec maybe_contract_segs(set()) -> set().
+-spec maybe_contract_segs(set(E)) -> set(E).
maybe_contract_segs(T) when T#set.n =:= T#set.bso ->
T#set{maxn = T#set.maxn div 2,
bso = T#set.bso div 2,
@@ -423,7 +419,7 @@ mk_seg(16) -> {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}.
%% of segments. We special case the powers of 2 upto 32, this should
%% catch most case. N.B. the last element in the segments tuple is
%% an extra element containing a default empty segment.
--spec expand_segs(segs(), seg()) -> segs().
+-spec expand_segs(segs(E), seg()) -> segs(E).
expand_segs({B1}, Empty) ->
{B1,Empty};
expand_segs({B1,B2}, Empty) ->
@@ -441,7 +437,7 @@ expand_segs(Segs, Empty) ->
list_to_tuple(tuple_to_list(Segs)
++ lists:duplicate(tuple_size(Segs), Empty)).
--spec contract_segs(segs()) -> segs().
+-spec contract_segs(segs(E)) -> segs(E).
contract_segs({B1,_}) ->
{B1};
contract_segs({B1,B2,_,_}) ->
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index c6c706c3a7..679c13f0cf 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -58,7 +58,7 @@ start(NoCtrlG) ->
start(NoCtrlG, false).
start(NoCtrlG, StartSync) ->
- code:ensure_loaded(user_default),
+ _ = code:ensure_loaded(user_default),
spawn(fun() -> server(NoCtrlG, StartSync) end).
%% Find the pid of the current evaluator process.
@@ -371,6 +371,14 @@ expand_expr({bc,L,E,Qs}, C) ->
{bc,L,expand_expr(E, C),expand_quals(Qs, C)};
expand_expr({tuple,L,Elts}, C) ->
{tuple,L,expand_exprs(Elts, C)};
+expand_expr({map,L,Es}, C) ->
+ {map,L,expand_exprs(Es, C)};
+expand_expr({map,L,Arg,Es}, C) ->
+ {map,L,expand_expr(Arg, C),expand_exprs(Es, C)};
+expand_expr({map_field_assoc,L,K,V}, C) ->
+ {map_field_assoc,L,expand_expr(K, C),expand_expr(V, C)};
+expand_expr({map_field_exact,L,K,V}, C) ->
+ {map_field_exact,L,expand_expr(K, C),expand_expr(V, C)};
expand_expr({record_index,L,Name,F}, C) ->
{record_index,L,Name,expand_expr(F, C)};
expand_expr({record,L,Name,Is}, C) ->
@@ -424,6 +432,8 @@ expand_expr({remote,L,M,F}, C) ->
{remote,L,expand_expr(M, C),expand_expr(F, C)};
expand_expr({'fun',L,{clauses,Cs}}, C) ->
{'fun',L,{clauses,expand_exprs(Cs, C)}};
+expand_expr({named_fun,L,Name,Cs}, C) ->
+ {named_fun,L,Name,expand_exprs(Cs, C)};
expand_expr({clause,L,H,G,B}, C) ->
%% Could expand H and G, but then erl_eval has to be changed as well.
{clause,L,H, G, expand_exprs(B, C)};
@@ -677,8 +687,10 @@ exprs([E0|Es], Bs1, RT, Lf, Ef, Bs0, W) ->
if
Es =:= [] ->
VS = pp(V0, 1, RT),
- [io:requests([{put_chars, unicode, VS}, nl]) ||
- W =:= cmd],
+ case W of
+ cmd -> io:requests([{put_chars, unicode, VS}, nl]);
+ pmt -> ok
+ end,
%% Don't send the result back if it will be
%% discarded anyway.
V = if
@@ -1311,6 +1323,11 @@ list_bindings([{Name,Val}|Bs], RT) ->
F = {'fun',0,{clauses,FCs}},
M = {match,0,{var,0,Name},F},
io:fwrite(<<"~ts\n">>, [erl_pp:expr(M, enc())]);
+ {named_fun_data,_FBs,FName,FCs0} ->
+ FCs = expand_value(FCs0), % looks nicer
+ F = {named_fun,0,FName,FCs},
+ M = {match,0,{var,0,Name},F},
+ io:fwrite(<<"~ts\n">>, [erl_pp:expr(M, enc())]);
false ->
Namel = io_lib:fwrite(<<"~s = ">>, [Name]),
Nl = iolist_size(Namel)+1,
diff --git a/lib/stdlib/src/slave.erl b/lib/stdlib/src/slave.erl
index 9c74041f56..1898dc8aba 100644
--- a/lib/stdlib/src/slave.erl
+++ b/lib/stdlib/src/slave.erl
@@ -289,7 +289,11 @@ register_unique_name(Number) ->
%% If the node should run on the local host, there is
%% no need to use rsh.
-mk_cmd(Host, Name, Args, Waiter, Prog) ->
+mk_cmd(Host, Name, Args, Waiter, Prog0) ->
+ Prog = case os:type() of
+ {ose,_} -> mk_ose_prog(Prog0);
+ _ -> quote_progname(Prog0)
+ end,
BasicCmd = lists:concat([Prog,
" -detached -noinput -master ", node(),
" ", long_or_short(), Name, "@", Host,
@@ -309,6 +313,49 @@ mk_cmd(Host, Name, Args, Waiter, Prog) ->
end
end.
+%% On OSE we have to pass the beam arguments directory to the slave
+%% process. To find out what arguments that should be passed on we
+%% make an assumption. All arguments after the last "--" should be
+%% skipped. So given these arguments:
+%% -Muycs256 -A 1 -- -root /mst/ -progname beam.debug.smp -- -home /mst/ -- -kernel inetrc '"/mst/inetrc.conf"' -- -name test@localhost
+%% we send
+%% -Muycs256 -A 1 -- -root /mst/ -progname beam.debug.smp -- -home /mst/ -- -kernel inetrc '"/mst/inetrc.conf"' --
+%% to the slave with whatever other args that are added in mk_cmd.
+mk_ose_prog(Prog) ->
+ SkipTail = fun("--",[]) ->
+ ["--"];
+ (_,[]) ->
+ [];
+ (Arg,Args) ->
+ [Arg," "|Args]
+ end,
+ [Prog,tl(lists:foldr(SkipTail,[],erlang:system_info(emu_args)))].
+
+%% This is an attempt to distinguish between spaces in the program
+%% path and spaces that separate arguments. The program is quoted to
+%% allow spaces in the path.
+%%
+%% Arguments could exist either if the executable is excplicitly given
+%% (through start/5) or if the -program switch to beam is used and
+%% includes arguments (typically done by cerl in OTP test environment
+%% in order to ensure that slave/peer nodes are started with the same
+%% emulator and flags as the test node. The return from lib:progname()
+%% could then typically be '/<full_path_to>/cerl -gcov').
+quote_progname(Progname) ->
+ do_quote_progname(string:tokens(to_list(Progname)," ")).
+
+do_quote_progname([Prog]) ->
+ "\""++Prog++"\"";
+do_quote_progname([Prog,Arg|Args]) ->
+ case os:find_executable(Prog) of
+ false ->
+ do_quote_progname([Prog++" "++Arg | Args]);
+ _ ->
+ %% this one has an executable - we assume the rest are arguments
+ "\""++Prog++"\""++
+ lists:flatten(lists:map(fun(X) -> [" ",X] end, [Arg|Args]))
+ end.
+
%% Give the user an opportunity to run another program,
%% than the "rsh". On HP-UX rsh is called remsh; thus HP users
%% must start erlang as erl -rsh remsh.
diff --git a/lib/stdlib/src/sofs.erl b/lib/stdlib/src/sofs.erl
index 34eb224647..0bd67db100 100644
--- a/lib/stdlib/src/sofs.erl
+++ b/lib/stdlib/src/sofs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1509,7 +1509,7 @@ family_projection(SetFun, F) when ?IS_SET(F) ->
%%%
-spec(family_to_digraph(Family) -> Graph when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family()).
family_to_digraph(F) when ?IS_SET(F) ->
case ?TYPE(F) of
@@ -1519,7 +1519,7 @@ family_to_digraph(F) when ?IS_SET(F) ->
end.
-spec(family_to_digraph(Family, GraphType) -> Graph when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family(),
GraphType :: [digraph:d_type()]).
family_to_digraph(F, Type) when ?IS_SET(F) ->
@@ -1541,7 +1541,7 @@ family_to_digraph(F, Type) when ?IS_SET(F) ->
end.
-spec(digraph_to_family(Graph) -> Family when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family()).
digraph_to_family(G) ->
case catch digraph_family(G) of
@@ -1550,7 +1550,7 @@ digraph_to_family(G) ->
end.
-spec(digraph_to_family(Graph, Type) -> Family when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family(),
Type :: type()).
digraph_to_family(G, T) ->
diff --git a/lib/stdlib/src/stdlib.app.src b/lib/stdlib/src/stdlib.app.src
index a30685e830..aa9899da3b 100644
--- a/lib/stdlib/src/stdlib.app.src
+++ b/lib/stdlib/src/stdlib.app.src
@@ -71,6 +71,7 @@
lib,
lists,
log_mf_h,
+ maps,
math,
ms_transform,
orddict,
@@ -101,5 +102,8 @@
{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,
dets]},
{applications, [kernel]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["sasl-2.4","kernel-3.0.2","erts-6.2","crypto-3.3",
+ "compiler-5.0"]}
+]}.
diff --git a/lib/stdlib/src/stdlib.appup.src b/lib/stdlib/src/stdlib.appup.src
index 55c8087475..951dbca68e 100644
--- a/lib/stdlib/src/stdlib.appup.src
+++ b/lib/stdlib/src/stdlib.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,12 +16,12 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
- [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14
- %% Down to - max two major revisions back
- [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15
- {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14
+ %% Up from - max one major revision back
+ [{<<"2\\.[1-3](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3
+ {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
+ [{<<"2\\.[1-3](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3
+ {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/stdlib/src/string.erl b/lib/stdlib/src/string.erl
index d0bd0cb26e..f9b083a56d 100644
--- a/lib/stdlib/src/string.erl
+++ b/lib/stdlib/src/string.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 6d8e25b1de..ede2742875 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -45,10 +45,13 @@
-type restart() :: 'permanent' | 'transient' | 'temporary'.
-type shutdown() :: 'brutal_kill' | timeout().
-type worker() :: 'worker' | 'supervisor'.
--type sup_name() :: {'local', Name :: atom()} | {'global', Name :: atom()}.
+-type sup_name() :: {'local', Name :: atom()}
+ | {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}.
-type sup_ref() :: (Name :: atom())
| {Name :: atom(), Node :: node()}
| {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}
| pid().
-type child_spec() :: {Id :: child_id(),
StartFunc :: mfargs(),
@@ -74,14 +77,15 @@
modules = [] :: modules()}).
-type child_rec() :: #child{}.
--define(DICT, dict).
+-define(DICTS, dict).
+-define(DICT, dict:dict).
-define(SETS, sets).
--define(SET, set).
+-define(SET, sets:set).
-record(state, {name,
strategy :: strategy(),
children = [] :: [child_rec()],
- dynamics :: ?DICT() | ?SET(),
+ dynamics :: ?DICT(pid(), list()) | ?SET(pid()),
intensity :: non_neg_integer(),
period :: pos_integer(),
restarts = [],
@@ -260,7 +264,7 @@ init_children(State, StartSpec) ->
{ok, NChildren} ->
{ok, State#state{children = NChildren}};
{error, NChildren, Reason} ->
- terminate_children(NChildren, SupName),
+ _ = terminate_children(NChildren, SupName),
{stop, {shutdown, Reason}}
end;
Error ->
@@ -441,7 +445,7 @@ handle_call(which_children, _From, #state{children = [#child{restart_type = RTyp
State) when ?is_simple(State) ->
Reply = lists:map(fun({?restarting(_),_}) -> {undefined,restarting,CT,Mods};
({Pid, _}) -> {undefined, Pid, CT, Mods} end,
- ?DICT:to_list(dynamics_db(RType, State#state.dynamics))),
+ ?DICTS:to_list(dynamics_db(RType, State#state.dynamics))),
{reply, Reply, State};
handle_call(which_children, _From, State) ->
@@ -480,7 +484,7 @@ handle_call(count_children, _From, #state{children = [#child{restart_type = RTy
child_type = CT}]} = State)
when ?is_simple(State) ->
{Active, Count} =
- ?DICT:fold(fun(Pid, _Val, {Alive, Tot}) ->
+ ?DICTS:fold(fun(Pid, _Val, {Alive, Tot}) ->
case is_pid(Pid) andalso is_process_alive(Pid) of
true ->
{Alive+1, Tot +1};
@@ -752,10 +756,16 @@ restart(Child, State) ->
Id = if ?is_simple(State) -> Child#child.pid;
true -> Child#child.name
end,
- timer:apply_after(0,?MODULE,try_again_restart,[self(),Id]),
+ {ok, _TRef} = timer:apply_after(0,
+ ?MODULE,
+ try_again_restart,
+ [self(),Id]),
{ok,NState2};
{try_again, NState2, #child{name=ChName}} ->
- timer:apply_after(0,?MODULE,try_again_restart,[self(),ChName]),
+ {ok, _TRef} = timer:apply_after(0,
+ ?MODULE,
+ try_again_restart,
+ [self(),ChName]),
{ok,NState2};
Other ->
Other
@@ -768,17 +778,17 @@ restart(Child, State) ->
restart(simple_one_for_one, Child, State) ->
#child{pid = OldPid, mfargs = {M, F, A}} = Child,
- Dynamics = ?DICT:erase(OldPid, dynamics_db(Child#child.restart_type,
+ Dynamics = ?DICTS:erase(OldPid, dynamics_db(Child#child.restart_type,
State#state.dynamics)),
case do_start_child_i(M, F, A) of
{ok, Pid} ->
- NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
+ NState = State#state{dynamics = ?DICTS:store(Pid, A, Dynamics)},
{ok, NState};
{ok, Pid, _Extra} ->
- NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
+ NState = State#state{dynamics = ?DICTS:store(Pid, A, Dynamics)},
{ok, NState};
{error, Error} ->
- NState = State#state{dynamics = ?DICT:store(restarting(OldPid), A,
+ NState = State#state{dynamics = ?DICTS:store(restarting(OldPid), A,
Dynamics)},
report_error(start_error, Error, Child, State#state.name),
{try_again, NState}
@@ -850,7 +860,7 @@ terminate_children(Children, SupName) ->
%% we do want them to be shut down as many functions from this module
%% use this function to just clear everything.
terminate_children([Child = #child{restart_type=temporary} | Children], SupName, Res) ->
- do_terminate(Child, SupName),
+ _ = do_terminate(Child, SupName),
terminate_children(Children, SupName, Res);
terminate_children([Child | Children], SupName, Res) ->
NChild = do_terminate(Child, SupName),
@@ -971,7 +981,7 @@ terminate_dynamic_children(Child, Dynamics, SupName) ->
wait_dynamic_children(Child, Pids, Sz, TRef, EStack0)
end,
%% Unroll stacked errors and report them
- ?DICT:fold(fun(Reason, Ls, _) ->
+ ?DICTS:fold(fun(Reason, Ls, _) ->
report_error(shutdown_error, Reason,
Child#child{pid=Ls}, SupName)
end, ok, EStack).
@@ -985,22 +995,22 @@ monitor_dynamic_children(#child{restart_type=temporary}, Dynamics) ->
{error, normal} ->
{Pids, EStack};
{error, Reason} ->
- {Pids, ?DICT:append(Reason, P, EStack)}
+ {Pids, ?DICTS:append(Reason, P, EStack)}
end
- end, {?SETS:new(), ?DICT:new()}, Dynamics);
+ end, {?SETS:new(), ?DICTS:new()}, Dynamics);
monitor_dynamic_children(#child{restart_type=RType}, Dynamics) ->
- ?DICT:fold(fun(P, _, {Pids, EStack}) when is_pid(P) ->
+ ?DICTS:fold(fun(P, _, {Pids, EStack}) when is_pid(P) ->
case monitor_child(P) of
ok ->
{?SETS:add_element(P, Pids), EStack};
{error, normal} when RType =/= permanent ->
{Pids, EStack};
{error, Reason} ->
- {Pids, ?DICT:append(Reason, P, EStack)}
+ {Pids, ?DICTS:append(Reason, P, EStack)}
end;
(?restarting(_), _, {Pids, EStack}) ->
{Pids, EStack}
- end, {?SETS:new(), ?DICT:new()}, Dynamics).
+ end, {?SETS:new(), ?DICTS:new()}, Dynamics).
wait_dynamic_children(_Child, _Pids, 0, undefined, EStack) ->
@@ -1008,7 +1018,7 @@ wait_dynamic_children(_Child, _Pids, 0, undefined, EStack) ->
wait_dynamic_children(_Child, _Pids, 0, TRef, EStack) ->
%% If the timer has expired before its cancellation, we must empty the
%% mail-box of the 'timeout'-message.
- erlang:cancel_timer(TRef),
+ _ = erlang:cancel_timer(TRef),
receive
{timeout, TRef, kill} ->
EStack
@@ -1024,7 +1034,7 @@ wait_dynamic_children(#child{shutdown=brutal_kill} = Child, Pids, Sz,
{'DOWN', _MRef, process, Pid, Reason} ->
wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1,
- TRef, ?DICT:append(Reason, Pid, EStack))
+ TRef, ?DICTS:append(Reason, Pid, EStack))
end;
wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz,
TRef, EStack) ->
@@ -1039,7 +1049,7 @@ wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz,
{'DOWN', _MRef, process, Pid, Reason} ->
wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1,
- TRef, ?DICT:append(Reason, Pid, EStack));
+ TRef, ?DICTS:append(Reason, Pid, EStack));
{timeout, TRef, kill} ->
?SETS:fold(fun(P, _) -> exit(P, kill) end, ok, Pids),
@@ -1064,12 +1074,12 @@ save_child(Child, #state{children = Children} = State) ->
save_dynamic_child(temporary, Pid, _, #state{dynamics = Dynamics} = State) ->
State#state{dynamics = ?SETS:add_element(Pid, dynamics_db(temporary, Dynamics))};
save_dynamic_child(RestartType, Pid, Args, #state{dynamics = Dynamics} = State) ->
- State#state{dynamics = ?DICT:store(Pid, Args, dynamics_db(RestartType, Dynamics))}.
+ State#state{dynamics = ?DICTS:store(Pid, Args, dynamics_db(RestartType, Dynamics))}.
dynamics_db(temporary, undefined) ->
?SETS:new();
dynamics_db(_, undefined) ->
- ?DICT:new();
+ ?DICTS:new();
dynamics_db(_,Dynamics) ->
Dynamics.
@@ -1078,14 +1088,14 @@ dynamic_child_args(Pid, Dynamics) ->
true ->
{ok, undefined};
false ->
- ?DICT:find(Pid, Dynamics)
+ ?DICTS:find(Pid, Dynamics)
end.
state_del_child(#child{pid = Pid, restart_type = temporary}, State) when ?is_simple(State) ->
NDynamics = ?SETS:del_element(Pid, dynamics_db(temporary, State#state.dynamics)),
State#state{dynamics = NDynamics};
state_del_child(#child{pid = Pid, restart_type = RType}, State) when ?is_simple(State) ->
- NDynamics = ?DICT:erase(Pid, dynamics_db(RType, State#state.dynamics)),
+ NDynamics = ?DICTS:erase(Pid, dynamics_db(RType, State#state.dynamics)),
State#state{dynamics = NDynamics};
state_del_child(Child, State) ->
NChildren = del_child(Child#child.name, State#state.children),
@@ -1148,7 +1158,7 @@ is_dynamic_pid(Pid, Dynamics) ->
true ->
?SETS:is_element(Pid, Dynamics);
false ->
- ?DICT:is_key(Pid, Dynamics)
+ ?DICTS:is_key(Pid, Dynamics)
end.
replace_child(Child, State) ->
diff --git a/lib/stdlib/src/supervisor_bridge.erl b/lib/stdlib/src/supervisor_bridge.erl
index e8405ab9a4..ff4502f0b9 100644
--- a/lib/stdlib/src/supervisor_bridge.erl
+++ b/lib/stdlib/src/supervisor_bridge.erl
@@ -101,7 +101,16 @@ handle_cast(_, State) ->
{noreply, State}.
handle_info({'EXIT', Pid, Reason}, State) when State#state.pid =:= Pid ->
- report_error(child_terminated, Reason, State),
+ case Reason of
+ normal ->
+ ok;
+ shutdown ->
+ ok;
+ {shutdown, _Term} ->
+ ok;
+ _ ->
+ report_error(child_terminated, Reason, State)
+ end,
{stop, Reason, State#state{pid = undefined}};
handle_info(_, State) ->
{noreply, State}.
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl
index c186eab940..d3ba09ce82 100644
--- a/lib/stdlib/src/sys.erl
+++ b/lib/stdlib/src/sys.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -46,7 +46,7 @@
{N :: non_neg_integer(),
[{Event :: system_event(),
FuncState :: _,
- FormFunc :: dbg_fun()}]}}
+ FormFunc :: format_fun()}]}}
| {'statistics', {file:date_time(),
{'reductions', non_neg_integer()},
MessagesIn :: non_neg_integer(),
@@ -57,6 +57,10 @@
Event :: system_event(),
ProcState :: _) -> 'done' | (NewFuncState :: _)).
+-type format_fun() :: fun((Device :: io:device() | file:io_device(),
+ Event :: system_event(),
+ Extra :: term()) -> any()).
+
%%-----------------------------------------------------------------
%% System messages
%%-----------------------------------------------------------------
@@ -102,20 +106,31 @@ get_status(Name, Timeout) -> send_system_msg(Name, get_status, Timeout).
-spec get_state(Name) -> State when
Name :: name(),
State :: term().
-get_state(Name) -> send_system_msg(Name, get_state).
+get_state(Name) ->
+ case send_system_msg(Name, get_state) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec get_state(Name, Timeout) -> State when
Name :: name(),
Timeout :: timeout(),
State :: term().
-get_state(Name, Timeout) -> send_system_msg(Name, get_state, Timeout).
+get_state(Name, Timeout) ->
+ case send_system_msg(Name, get_state, Timeout) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec replace_state(Name, StateFun) -> NewState when
Name :: name(),
StateFun :: fun((State :: term()) -> NewState :: term()),
NewState :: term().
replace_state(Name, StateFun) ->
- send_system_msg(Name, {replace_state, StateFun}).
+ case send_system_msg(Name, {replace_state, StateFun}) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec replace_state(Name, StateFun, Timeout) -> NewState when
Name :: name(),
@@ -123,7 +138,10 @@ replace_state(Name, StateFun) ->
Timeout :: timeout(),
NewState :: term().
replace_state(Name, StateFun, Timeout) ->
- send_system_msg(Name, {replace_state, StateFun}, Timeout).
+ case send_system_msg(Name, {replace_state, StateFun}, Timeout) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec change_code(Name, Module, OldVsn, Extra) -> 'ok' | {error, Reason} when
Name :: name(),
@@ -317,10 +335,10 @@ handle_system_msg(Msg, From, Parent, Mod, Debug, Misc, Hib) ->
handle_system_msg(SysState, Msg, From, Parent, Mod, Debug, Misc, Hib) ->
case do_cmd(SysState, Msg, Parent, Mod, Debug, Misc) of
{suspended, Reply, NDebug, NMisc} ->
- gen:reply(From, Reply),
+ _ = gen:reply(From, Reply),
suspend_loop(suspended, Parent, Mod, NDebug, NMisc, Hib);
{running, Reply, NDebug, NMisc} ->
- gen:reply(From, Reply),
+ _ = gen:reply(From, Reply),
Mod:system_continue(Parent, NDebug, NMisc)
end.
@@ -332,7 +350,7 @@ handle_system_msg(SysState, Msg, From, Parent, Mod, Debug, Misc, Hib) ->
%%-----------------------------------------------------------------
-spec handle_debug(Debug, FormFunc, Extra, Event) -> [dbg_opt()] when
Debug :: [dbg_opt()],
- FormFunc :: dbg_fun(),
+ FormFunc :: format_fun(),
Extra :: term(),
Event :: system_event().
handle_debug([{trace, true} | T], FormFunc, State, Event) ->
@@ -390,10 +408,11 @@ do_cmd(_, suspend, _Parent, _Mod, Debug, Misc) ->
{suspended, ok, Debug, Misc};
do_cmd(_, resume, _Parent, _Mod, Debug, Misc) ->
{running, ok, Debug, Misc};
-do_cmd(SysState, get_state, _Parent, _Mod, Debug, {State, Misc}) ->
- {SysState, State, Debug, Misc};
-do_cmd(SysState, replace_state, _Parent, _Mod, Debug, {State, Misc}) ->
- {SysState, State, Debug, Misc};
+do_cmd(SysState, get_state, _Parent, Mod, Debug, Misc) ->
+ {SysState, do_get_state(Mod, Misc), Debug, Misc};
+do_cmd(SysState, {replace_state, StateFun}, _Parent, Mod, Debug, Misc) ->
+ {Res, NMisc} = do_replace_state(StateFun, Mod, Misc),
+ {SysState, Res, Debug, NMisc};
do_cmd(SysState, get_status, Parent, Mod, Debug, Misc) ->
Res = get_status(SysState, Parent, Mod, Debug, Misc),
{SysState, Res, Debug, Misc};
@@ -407,6 +426,40 @@ do_cmd(suspended, {change_code, Module, Vsn, Extra}, _Parent,
do_cmd(SysState, Other, _Parent, _Mod, Debug, Misc) ->
{SysState, {error, {unknown_system_msg, Other}}, Debug, Misc}.
+do_get_state(Mod, Misc) ->
+ case erlang:function_exported(Mod, system_get_state, 1) of
+ true ->
+ try
+ {ok, State} = Mod:system_get_state(Misc),
+ State
+ catch
+ Cl:Exc ->
+ {error, {callback_failed,{Mod,system_get_state},{Cl,Exc}}}
+ end;
+ false ->
+ Misc
+ end.
+
+do_replace_state(StateFun, Mod, Misc) ->
+ case erlang:function_exported(Mod, system_replace_state, 2) of
+ true ->
+ try
+ {ok, State, NMisc} = Mod:system_replace_state(StateFun, Misc),
+ {State, NMisc}
+ catch
+ Cl:Exc ->
+ {{error, {callback_failed,{Mod,system_replace_state},{Cl,Exc}}}, Misc}
+ end;
+ false ->
+ try
+ NMisc = StateFun(Misc),
+ {NMisc, NMisc}
+ catch
+ Cl:Exc ->
+ {{error, {callback_failed,StateFun,{Cl,Exc}}}, Misc}
+ end
+ end.
+
get_status(SysState, Parent, Mod, Debug, Misc) ->
PDict = get(),
FmtMisc =
diff --git a/lib/stdlib/src/timer.erl b/lib/stdlib/src/timer.erl
index 3cf358630f..72a2dd9616 100644
--- a/lib/stdlib/src/timer.erl
+++ b/lib/stdlib/src/timer.erl
@@ -258,7 +258,7 @@ ensure_started() ->
undefined ->
C = {timer_server, {?MODULE, start_link, []}, permanent, 1000,
worker, [?MODULE]},
- supervisor:start_child(kernel_safe_sup, C), % kernel_safe_sup
+ _ = supervisor:start_child(kernel_safe_sup, C),
ok;
_ -> ok
end.
diff --git a/lib/stdlib/src/zip.erl b/lib/stdlib/src/zip.erl
index c40ce8e203..b768c6d0b9 100644
--- a/lib/stdlib/src/zip.erl
+++ b/lib/stdlib/src/zip.erl
@@ -203,8 +203,18 @@
zip_comment_length}).
--type zip_file() :: #zip_file{}.
+-type create_option() :: memory | cooked | verbose | {comment, string()}
+ | {cwd, file:filename()}
+ | {compress, extension_spec()}
+ | {uncompress, extension_spec()}.
+-type extension() :: string().
+-type extension_spec() :: all | [extension()] | {add, [extension()]} | {del, [extension()]}.
+-type filename() :: file:filename().
+
-type zip_comment() :: #zip_comment{}.
+-type zip_file() :: #zip_file{}.
+
+-export_type([create_option/0, filename/0]).
%% Open a zip archive with options
%%
@@ -340,13 +350,13 @@ unzip(F) -> unzip(F, []).
-spec(unzip(Archive, Options) -> RetValue when
Archive :: file:name() | binary(),
Options :: [Option],
- Option :: {file_list, FileList}
+ Option :: {file_list, FileList} | cooked
| keep_old_files | verbose | memory |
{file_filter, FileFilter} | {cwd, CWD},
FileList :: [file:name()],
FileBinList :: [{file:name(),binary()}],
FileFilter :: fun((ZipFile) -> boolean()),
- CWD :: string(),
+ CWD :: file:filename(),
ZipFile :: zip_file(),
RetValue :: {ok, FileList}
| {ok, FileBinList}
@@ -430,7 +440,7 @@ zip(F, Files) -> zip(F, Files, []).
What :: all | [Extension] | {add, [Extension]} | {del, [Extension]},
Extension :: string(),
Comment :: string(),
- CWD :: string(),
+ CWD :: file:filename(),
RetValue :: {ok, FileName :: file:name()}
| {ok, {FileName :: file:name(), binary()}}
| {error, Reason :: term()}).
@@ -712,8 +722,8 @@ table(F, O) -> list_dir(F, O).
FileList :: [FileSpec],
FileSpec :: file:name() | {file:name(), binary()}
| {file:name(), binary(), file:file_info()},
- RetValue :: {ok, FileName :: file:name()}
- | {ok, {FileName :: file:name(), binary()}}
+ RetValue :: {ok, FileName :: filename()}
+ | {ok, {FileName :: filename(), binary()}}
| {error, Reason :: term()}).
create(F, Fs) -> zip(F, Fs).
@@ -724,14 +734,9 @@ create(F, Fs) -> zip(F, Fs).
FileSpec :: file:name() | {file:name(), binary()}
| {file:name(), binary(), file:file_info()},
Options :: [Option],
- Option :: memory | cooked | verbose | {comment, Comment}
- | {cwd, CWD} | {compress, What} | {uncompress, What},
- What :: all | [Extension] | {add, [Extension]} | {del, [Extension]},
- Extension :: string(),
- Comment :: string(),
- CWD :: string(),
- RetValue :: {ok, FileName :: file:name()}
- | {ok, {FileName :: file:name(), binary()}}
+ Option :: create_option(),
+ RetValue :: {ok, FileName :: filename()}
+ | {ok, {FileName :: filename(), binary()}}
| {error, Reason :: term()}).
create(F, Fs, O) -> zip(F, Fs, O).
@@ -755,7 +760,7 @@ extract(F) -> unzip(F).
FileList :: [file:name()],
FileBinList :: [{file:name(),binary()}],
FileFilter :: fun((ZipFile) -> boolean()),
- CWD :: string(),
+ CWD :: file:filename(),
ZipFile :: zip_file(),
RetValue :: {ok, FileList}
| {ok, FileBinList}
@@ -1153,7 +1158,7 @@ zip_open(Archive) -> zip_open(Archive, []).
Archive :: file:name() | binary(),
ZipHandle :: pid(),
Options :: [Option],
- Option :: cooked | memory | {cwd, CWD :: string()},
+ Option :: cooked | memory | {cwd, CWD :: file:filename()},
Reason :: term()).
zip_open(Archive, Options) ->
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index af82f22b21..a271229c59 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -73,6 +73,8 @@ MODULES= \
supervisor_SUITE \
supervisor_bridge_SUITE \
sys_SUITE \
+ sys_sp1 \
+ sys_sp2 \
tar_SUITE \
timer_SUITE \
timer_simple_SUITE \
@@ -83,7 +85,8 @@ MODULES= \
zip_SUITE \
random_unicode_list \
random_iolist \
- error_logger_forwarder
+ error_logger_forwarder \
+ maps_SUITE
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/lib/stdlib/test/base64_SUITE.erl b/lib/stdlib/test/base64_SUITE.erl
index b28df94221..b0da6408ff 100644
--- a/lib/stdlib/test/base64_SUITE.erl
+++ b/lib/stdlib/test/base64_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl
index 00fb20489b..32cec0db6f 100644
--- a/lib/stdlib/test/binary_module_SUITE.erl
+++ b/lib/stdlib/test/binary_module_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -41,7 +40,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
% Default timetrap timeout (set in init_per_testcase).
% Some of these testcases are really heavy...
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, ?t:minutes(30)).
-endif.
diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl
index 059d553b00..3b08ac165e 100644
--- a/lib/stdlib/test/dets_SUITE.erl
+++ b/lib/stdlib/test/dets_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -52,7 +52,7 @@
simultaneous_open/1, insert_new/1, repair_continuation/1,
otp_5487/1, otp_6206/1, otp_6359/1, otp_4738/1, otp_7146/1,
otp_8070/1, otp_8856/1, otp_8898/1, otp_8899/1, otp_8903/1,
- otp_8923/1, otp_9282/1, otp_11245/1]).
+ otp_8923/1, otp_9282/1, otp_11245/1, otp_11709/1]).
-export([dets_dirty_loop/0]).
@@ -109,7 +109,7 @@ all() ->
many_clients, otp_4906, otp_5402, simultaneous_open,
insert_new, repair_continuation, otp_5487, otp_6206,
otp_6359, otp_4738, otp_7146, otp_8070, otp_8856, otp_8898,
- otp_8899, otp_8903, otp_8923, otp_9282, otp_11245
+ otp_8899, otp_8903, otp_8923, otp_9282, otp_11245, otp_11709
].
groups() ->
@@ -223,8 +223,7 @@ open(Config, Version) ->
?format("Crashing dets server \n", []),
process_flag(trap_exit, true),
- Procs = [whereis(?DETS_SERVER) | map(fun(Tab) -> dets:info(Tab, pid) end,
- Tabs)],
+ Procs = [whereis(?DETS_SERVER) | [dets:info(Tab, pid) || Tab <- Tabs]],
foreach(fun(Pid) -> exit(Pid, kill) end, Procs),
timer:sleep(100),
c:flush(), %% flush all the EXIT sigs
@@ -235,18 +234,32 @@ open(Config, Version) ->
open_files(1, All, Version),
?format("Checking contents of repaired files \n", []),
check(Tabs, Data),
-
- close_all(Tabs),
+ close_all(Tabs),
delete_files(All),
- P1 = pps(),
+
{Ports0, Procs0} = P0,
- {Ports1, Procs1} = P1,
- true = Ports1 =:= Ports0,
- %% The dets_server process has been restarted:
- [_] = Procs0 -- Procs1,
- [_] = Procs1 -- Procs0,
- ok.
+ Test = fun() ->
+ P1 = pps(),
+ {Ports1, Procs1} = P1,
+ show("Old port", Ports0 -- Ports1),
+ show("New port", Ports1 -- Ports0),
+ show("Old procs", Procs0 -- Procs1),
+ show("New procs", Procs1 -- Procs0),
+ io:format("Remaining Dets-pids (should be nil): ~p~n",
+ [find_dets_pids()]),
+ true = Ports1 =:= Ports0,
+ %% The dets_server process has been restarted:
+ [_] = Procs0 -- Procs1,
+ [_] = Procs1 -- Procs0,
+ ok
+ end,
+ case catch Test() of
+ ok -> ok;
+ _ ->
+ timer:sleep(500),
+ ok = Test()
+ end.
check(Tabs, Data) ->
foreach(fun(Tab) ->
@@ -772,9 +785,9 @@ open_1(Config, V) ->
crash(Fname, TypePos),
{error, {invalid_type_code,Fname}} = dets:open_file(Fname),
truncate(Fname, HeadSize - 10),
- {error, {tooshort,Fname}} = dets:open_file(Fname),
- {ok, TabRef} = dets:open_file(TabRef, [{file,Fname},{version,V}]),
- ok = dets:close(TabRef),
+ {error,{not_a_dets_file,Fname}} = dets:open_file(Fname),
+ {error,{not_a_dets_file,Fname}} =
+ dets:open_file(TabRef, [{file,Fname},{version,V}]),
file:delete(Fname),
{error,{file_error,{foo,bar},_}} = dets:is_dets_file({foo,bar}),
@@ -967,10 +980,12 @@ fast_init_table(Config) ->
{'EXIT', _} =
(catch dets:init_table(TabRef, fun(foo) -> bar end, {format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{'EXIT', _} = (catch dets:init_table(TabRef, fun() -> foo end,
{format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{'EXIT', {badarg, _}} =
(catch dets:init_table(TabRef, nofun, {format,bchunk})),
@@ -979,10 +994,12 @@ fast_init_table(Config) ->
away = (catch dets:init_table(TabRef, fun(_) -> throw(away) end,
{format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{error, {init_fun, fopp}} =
dets:init_table(TabRef, fun(read) -> fopp end, {format,bchunk}),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
dets:safe_fixtable(TabRef, true),
{error, {fixed_table, TabRef}} =
@@ -1389,23 +1406,6 @@ repair(Config, V) ->
{ok, TabRef} = dets:open_file(TabRef, [{file,Fname},{version,V}]),
ok = ins(TabRef, 100),
ok = dets:close(TabRef),
- truncate(Fname, HeadSize - 10),
- %% a new file is created ('tooshort')
- {ok, TabRef} = dets:open_file(TabRef,
- [{file,Fname},{version,V},
- {min_no_slots,1000},
- {max_no_slots,1000000}]),
- case dets:info(TabRef, no_slots) of
- undefined -> ok;
- {Min1,Slot1,Max1} ->
- true = Min1 =< Slot1, true = Slot1 =< Max1,
- true = 1000 < Min1, true = 1000+256 > Min1,
- true = 1000000 < Max1, true = (1 bsl 20)+256 > Max1
- end,
- 0 = dets:info(TabRef, size),
- no_keys_test(TabRef),
- _ = histogram(TabRef, silent),
- ok = dets:close(TabRef),
file:delete(Fname),
%% version bump (v8)
@@ -2045,6 +2045,12 @@ match(Config, Version) ->
CrashPos = if Version =:= 8 -> 5; Version =:= 9 -> 1 end,
crash(Fname, ObjPos2+CrashPos),
{ok, _} = dets:open_file(T, Args),
+ case dets:insert_new(T, Obj) of % OTP-12024
+ ok ->
+ bad_object(dets:sync(T), Fname);
+ Else3 ->
+ bad_object(Else3, Fname)
+ end,
io:format("Expect corrupt table:~n"),
case ins(T, N) of
ok ->
@@ -3282,12 +3288,22 @@ simultaneous_open(Config) ->
File = filename(Tab, Config),
ok = monit(Tab, File),
- ok = kill_while_repairing(Tab, File),
- ok = kill_while_init(Tab, File),
- ok = open_ro(Tab, File),
- ok = open_w(Tab, File, 0, Config),
- ok = open_w(Tab, File, 100, Config),
- ok.
+ case feasible() of
+ false -> {comment, "OK, but did not run all of the test"};
+ true ->
+ ok = kill_while_repairing(Tab, File),
+ ok = kill_while_init(Tab, File),
+ ok = open_ro(Tab, File),
+ ok = open_w(Tab, File, 0, Config),
+ ok = open_w(Tab, File, 100, Config)
+ end.
+
+feasible() ->
+ LP = erlang:system_info(logical_processors),
+ (is_integer(LP)
+ andalso LP >= erlang:system_info(schedulers_online)
+ andalso not erlang:system_info(debug_compiled)
+ andalso not erlang:system_info(lock_checking)).
%% One process logs and another process closes the log. Before
%% monitors were used, this would make the client never return.
@@ -3314,7 +3330,6 @@ kill_while_repairing(Tab, File) ->
Delay = 1000,
dets:start(),
Parent = self(),
- Ps = processes(),
F = fun() ->
R = (catch dets:open_file(Tab, [{file,File}])),
timer:sleep(Delay),
@@ -3325,7 +3340,7 @@ kill_while_repairing(Tab, File) ->
P1 = spawn(F),
P2 = spawn(F),
P3 = spawn(F),
- DetsPid = find_dets_pid([P1, P2, P3 | Ps]),
+ DetsPid = find_dets_pid(),
exit(DetsPid, kill),
receive {P1,R1} -> R1 end,
@@ -3349,12 +3364,6 @@ kill_while_repairing(Tab, File) ->
file:delete(File),
ok.
-find_dets_pid(P0) ->
- case lists:sort(processes() -- P0) of
- [P, _] -> P;
- _ -> timer:sleep(100), find_dets_pid(P0)
- end.
-
find_dets_pid() ->
case find_dets_pids() of
[] ->
@@ -3428,6 +3437,13 @@ open_ro(Tab, File) ->
open_w(Tab, File, Delay, Config) ->
create_opened_log(File),
+
+ Tab2 = t2,
+ File2 = filename(Tab2, Config),
+ file:delete(File2),
+ {ok,Tab2} = dets:open_file(Tab2, [{file,File2}]),
+ ok = dets:close(Tab2),
+
Parent = self(),
F = fun() ->
R = dets:open_file(Tab, [{file,File}]),
@@ -3437,16 +3453,16 @@ open_w(Tab, File, Delay, Config) ->
Pid1 = spawn(F),
Pid2 = spawn(F),
Pid3 = spawn(F),
- undefined = dets:info(Tab), % is repairing now
- 0 = qlen(),
- Tab2 = t2,
- File2 = filename(Tab2, Config),
- file:delete(File2),
+ ok = wait_for_repair_to_start(Tab),
+
+ %% It is assumed that it takes some time to repair the file.
{ok,Tab2} = dets:open_file(Tab2, [{file,File2}]),
+ %% The Dets server managed to handle to open_file request.
+ 0 = qlen(), % still repairing
+
ok = dets:close(Tab2),
file:delete(File2),
- 0 = qlen(), % still repairing
receive {Pid1,R1} -> {ok, Tab} = R1 end,
receive {Pid2,R2} -> {ok, Tab} = R2 end,
@@ -3463,6 +3479,15 @@ open_w(Tab, File, Delay, Config) ->
file:delete(File),
ok.
+wait_for_repair_to_start(Tab) ->
+ case catch dets_server:get_pid(Tab) of
+ {'EXIT', _} ->
+ timer:sleep(1),
+ wait_for_repair_to_start(Tab);
+ Pid when is_pid(Pid) ->
+ ok
+ end.
+
qlen() ->
{_, {_, N}} = lists:keysearch(message_queue_len, 1, process_info(self())),
N.
@@ -3920,19 +3945,52 @@ otp_11245(Config) when is_list(Config) ->
file:delete(File),
ok.
+otp_11709(doc) ->
+ ["OTP-11709. Bugfixes."];
+otp_11709(suite) ->
+ [];
+otp_11709(Config) when is_list(Config) ->
+ Short = <<"foo">>,
+ Long = <<"a sufficiently long text">>,
+
+ %% Bug: leaking file descriptor
+ P0 = pps(),
+ File = filename(otp_11709, Config),
+ ok = file:write_file(File, Long),
+ false = dets:is_dets_file(File),
+ check_pps(P0),
+
+ %% Bug: deleting file
+ Args = [[{access, A}, {repair, R}] ||
+ A <- [read, read_write],
+ R <- [true, false, force]],
+ Fun1 = fun(S, As) ->
+ P1 = pps(),
+ ok = file:write_file(File, S),
+ {error,{not_a_dets_file,File}} = dets:open_file(File, As),
+ {ok, S} = file:read_file(File),
+ check_pps(P1)
+ end,
+ Fun2 = fun(S) ->
+ _ = [Fun1(S, As) || As <- Args],
+ ok
+ end,
+ ok = Fun2(Long), % no change here
+ ok = Fun2(Short), % mimic the behaviour for longer files
+
+ %% open_file/1
+ ok = file:write_file(File, Long),
+ {error,{not_a_dets_file,File}} = dets:open_file(File), % no change
+ ok = file:write_file(File, Short),
+ {error,{not_a_dets_file,File}} = dets:open_file(File), % mimic
+
+ _ = file:delete(File),
+ ok.
+
%%
%% Parts common to several test cases
%%
-start_node_rel(Name, Rel, How) ->
- Release = [{release, atom_to_list(Rel)}],
- Pa = filename:dirname(code:which(?MODULE)),
- test_server:start_node(Name, How,
- [{args,
- " -kernel net_setuptime 100 "
- " -pa " ++ Pa},
- {erl, Release}]).
-
crash(File, Where) ->
crash(File, Where, 10).
@@ -4323,7 +4381,8 @@ check_badarg({'EXIT', {badarg, [{M,F,Args,_} | _]}}, M, F, Args) ->
check_badarg({'EXIT', {badarg, [{M,F,A,_} | _]}}, M, F, Args) ->
true = test_server:is_native(M) andalso length(Args) =:= A.
-check_pps(P0) ->
+check_pps({Ports0,Procs0} = P0) ->
+ ok = check_dets_tables(),
case pps() of
P0 ->
ok;
@@ -4335,22 +4394,60 @@ check_pps(P0) ->
case pps() of
P0 ->
ok;
- P1 ->
- io:format("failure, got ~p~n, expected ~p\n", [P1, P0]),
- {Ports0,Procs0} = P0,
- {Ports1,Procs1} = P1,
- show("Old ports", Ports0 -- Ports1),
- show("New ports", Ports1 -- Ports0),
- show("Old procs", Procs0 -- Procs1),
- show("New procs", Procs1 -- Procs0),
- ?t:fail()
- end
+ {Ports1,Procs1} = P1 ->
+ case {Ports1 -- Ports0, Procs1 -- Procs0} of
+ {[], []} -> ok;
+ {PortsDiff,ProcsDiff} ->
+ io:format("failure, got ~p~n, expected ~p\n", [P1, P0]),
+ show("Old port", Ports0 -- Ports1),
+ show("New port", PortsDiff),
+ show("Old proc", Procs0 -- Procs1),
+ show("New proc", ProcsDiff),
+ ?t:fail()
+ end
+ end
+ end.
+
+%% Copied from dets_server.erl:
+-define(REGISTRY, dets_registry).
+-define(OWNERS, dets_owners).
+-define(STORE, dets).
+
+check_dets_tables() ->
+ Store = [T ||
+ T <- ets:all(),
+ ets:info(T, name) =:= ?STORE,
+ owner(T) =:= dets],
+ S = case Store of
+ [Tab] -> ets:tab2list(Tab);
+ [] -> []
+ end,
+ case {ets:tab2list(?REGISTRY), ets:tab2list(?OWNERS), S} of
+ {[], [], []} -> ok;
+ {R, O, _} ->
+ io:format("Registry: ~p~n", [R]),
+ io:format("Owners: ~p~n", [O]),
+ io:format("Store: ~p~n", [S]),
+ not_ok
+ end.
+
+owner(Tab) ->
+ Owner = ets:info(Tab, owner),
+ case process_info(Owner, registered_name) of
+ {registered_name, Name} -> Name;
+ _ -> Owner
end.
show(_S, []) ->
ok;
-show(S, L) ->
- io:format("~s: ~p~n", [S, L]).
+show(S, [{Pid, Name, InitCall}|Pids]) when is_pid(Pid) ->
+ io:format("~s: ~w (~w), ~w: ~p~n",
+ [S, Pid, proc_reg_name(Name), InitCall,
+ erlang:process_info(Pid)]),
+ show(S, Pids);
+show(S, [{Port, _}|Ports]) when is_port(Port)->
+ io:format("~s: ~w: ~p~n", [S, Port, erlang:port_info(Port)]),
+ show(S, Ports).
pps() ->
dets:start(),
@@ -4365,5 +4462,8 @@ process_list() ->
safe_second_element(process_info(P, initial_call))} ||
P <- processes()].
+proc_reg_name({registered_name, Name}) -> Name;
+proc_reg_name([]) -> no_reg_name.
+
safe_second_element({_,Info}) -> Info;
safe_second_element(Other) -> Other.
diff --git a/lib/stdlib/test/dict_SUITE.erl b/lib/stdlib/test/dict_SUITE.erl
index 0223240479..69814e12ce 100644
--- a/lib/stdlib/test/dict_SUITE.erl
+++ b/lib/stdlib/test/dict_SUITE.erl
@@ -17,7 +17,7 @@
%% %CopyrightEnd%
%%
-%% This module tests the ordsets, sets, and gb_sets modules.
+%% This module tests the orddict, dict, and gb_trees modules.
%%
-module(dict_SUITE).
@@ -68,6 +68,7 @@ create_1(M) ->
D0 = M(empty, []),
[] = M(to_list, D0),
0 = M(size, D0),
+ true = M(is_empty, D0),
D0.
store(Config) when is_list(Config) ->
@@ -81,6 +82,14 @@ store_1(List, M) ->
D1 = foldl(fun({K,V}, Dict) -> M(enter, {K,V,Dict}) end,
M(empty, []), List),
true = M(equal, {D0,D1}),
+ case List of
+ [] ->
+ true = M(is_empty, D0),
+ true = M(is_empty, D1);
+ [_|_] ->
+ false = M(is_empty, D0),
+ false = M(is_empty, D1)
+ end,
D0.
%%%
diff --git a/lib/stdlib/test/dict_test_lib.erl b/lib/stdlib/test/dict_test_lib.erl
index e308fd0721..4fdb4fa0bd 100644
--- a/lib/stdlib/test/dict_test_lib.erl
+++ b/lib/stdlib/test/dict_test_lib.erl
@@ -28,6 +28,7 @@ new(Mod, Eq) ->
(from_list, L) -> from_list(Mod, L);
(module, []) -> Mod;
(size, D) -> Mod:size(D);
+ (is_empty, D) -> Mod:is_empty(D);
(to_list, D) -> to_list(Mod, D)
end.
diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl
index 0cd2688e2e..43c980e994 100644
--- a/lib/stdlib/test/edlin_expand_SUITE.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE.erl
@@ -26,11 +26,11 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
+%% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
init_per_testcase(_Case, Config) ->
- ?line Dog = ?t:timetrap(?default_timeout),
+ Dog = ?t:timetrap(?default_timeout),
[{watchdog, Dog} | Config].
end_per_testcase(_Case, Config) ->
Dog = ?config(watchdog, Config),
@@ -67,20 +67,21 @@ normal(doc) ->
normal(suite) ->
[];
normal(Config) when is_list(Config) ->
- ?line {module,expand_test} = c:l(expand_test),
- % These tests might fail if another module with the prefix "expand_" happens
- % to also be loaded.
- ?line {yes, "test:", []} = edlin_expand:expand(lists:reverse("expand_")),
- ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
- ?line {no,[],
- [{"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(lists:reverse("expand_test:")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("expand_test:a_")),
+ {module,expand_test} = c:l(expand_test),
+ %% These tests might fail if another module with the prefix
+ %% "expand_" happens to also be loaded.
+ {yes, "test:", []} = do_expand("expand_"),
+ {no, [], []} = do_expand("expandXX_"),
+ {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"expand0arity_entirely",0},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("expand_test:"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("expand_test:a_"),
+ {yes,"arity_entirely()",[]} = do_expand("expand_test:expand0"),
ok.
quoted_fun(doc) ->
@@ -88,38 +89,35 @@ quoted_fun(doc) ->
quoted_fun(suite) ->
[];
quoted_fun(Config) when is_list(Config) ->
- ?line {module,expand_test} = c:l(expand_test),
- ?line {module,expand_test1} = c:l(expand_test1),
+ {module,expand_test} = c:l(expand_test),
+ {module,expand_test1} = c:l(expand_test1),
%% should be no colon after test this time
- ?line {yes, "test", []} = edlin_expand:expand(lists:reverse("expand_")),
- ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
- ?line {no,[],[{"'#weird-fun-name'",0},
- {"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0},
- {"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(
- lists:reverse("expand_test1:")),
- ?line {yes,"_",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:a")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("expand_test1:a_")),
- ?line {yes,[],
- [{"'#weird-fun-name'",0},
+ {yes, "test", []} = do_expand("expand_"),
+ {no, [], []} = do_expand("expandXX_"),
+ {no,[],[{"'#weird-fun-name'",1},
{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("expand_test1:'")),
- ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:'Q")),
- ?line {yes,[],
- [{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("expand_test1:'Quoted_fun_")),
- ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:'#")),
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("expand_test1:"),
+ {yes,"_",[]} = do_expand("expand_test1:a"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("expand_test1:a_"),
+ {yes,[],
+ [{"'#weird-fun-name'",1},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("expand_test1:'"),
+ {yes,"uoted_fun_",[]} = do_expand("expand_test1:'Q"),
+ {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("expand_test1:'Quoted_fun_"),
+ {yes,"weird-fun-name'(",[]} = do_expand("expand_test1:'#"),
+
+ %% Since there is a module_info/1 as well as a module_info/0
+ %% there should not be a closing parenthesis added.
+ {yes,"(",[]} = do_expand("expand_test:module_info"),
ok.
quoted_module(doc) ->
@@ -127,51 +125,46 @@ quoted_module(doc) ->
quoted_module(suite) ->
[];
quoted_module(Config) when is_list(Config) ->
- ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
- ?line {yes, "Caps':", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
- ?line {no,[],
- [{"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(lists:reverse("'ExpandTestCaps':")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps':a_")),
+ {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ {yes, "Caps':", []} = do_expand("'ExpandTest"),
+ {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("'ExpandTestCaps':"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("'ExpandTestCaps':a_"),
ok.
quoted_both(suite) ->
[];
quoted_both(Config) when is_list(Config) ->
- ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
- ?line {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
+ {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
%% should be no colon (or quote) after test this time
- ?line {yes, "Caps", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
- ?line {no,[],[{"'#weird-fun-name'",0},
- {"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0},
- {"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':")),
- ?line {yes,"_",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':a")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':a_")),
- ?line {yes,[],
- [{"'#weird-fun-name'",0},
+ {yes, "Caps", []} = do_expand("'ExpandTest"),
+ {no,[],[{"'#weird-fun-name'",0},
{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'")),
- ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'Q")),
- ?line {yes,[],
- [{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'Quoted_fun_")),
- ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'#")),
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("'ExpandTestCaps1':"),
+ {yes,"_",[]} = do_expand("'ExpandTestCaps1':a"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("'ExpandTestCaps1':a_"),
+ {yes,[],
+ [{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("'ExpandTestCaps1':'"),
+ {yes,"uoted_fun_",[]} = do_expand("'ExpandTestCaps1':'Q"),
+ {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("'ExpandTestCaps1':'Quoted_fun_"),
+ {yes,"weird-fun-name'()",[]} = do_expand("'ExpandTestCaps1':'#"),
ok.
+
+do_expand(String) ->
+ edlin_expand:expand(lists:reverse(String)).
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index 0cbdf76270..b17e8bd186 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,8 @@
variable_1/1, otp_4870/1, otp_4871/1, otp_5362/1,
pmod/1, not_circular/1, skip_header/1, otp_6277/1, otp_7702/1,
otp_8130/1, overload_mac/1, otp_8388/1, otp_8470/1, otp_8503/1,
- otp_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1]).
+ otp_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1,
+ otp_11728/1, encoding/1]).
-export([epp_parse_erl_form/2]).
@@ -67,7 +68,8 @@ all() ->
{group, variable}, otp_4870, otp_4871, otp_5362, pmod,
not_circular, skip_header, otp_6277, otp_7702, otp_8130,
overload_mac, otp_8388, otp_8470, otp_8503, otp_8562,
- otp_8665, otp_8911, otp_10302, otp_10820].
+ otp_8665, otp_8911, otp_10302, otp_10820, otp_11728,
+ encoding].
groups() ->
[{upcase_mac, [], [upcase_mac_1, upcase_mac_2]},
@@ -122,10 +124,22 @@ include_local(Config) when is_list(Config) ->
%%% regular epp:parse_file, the test case will time out, and then epp
%%% server will go on growing until we dump core.
epp_parse_file(File, Inc, Predef) ->
- {ok, Epp} = epp:open(File, Inc, Predef),
+ List = do_epp_parse_file(fun() ->
+ epp:open(File, Inc, Predef)
+ end),
+ List = do_epp_parse_file(fun() ->
+ Opts = [{name, File},
+ {includes, Inc},
+ {macros, Predef}],
+ epp:open(Opts)
+ end),
+ {ok, List}.
+
+do_epp_parse_file(Open) ->
+ {ok, Epp} = Open(),
List = collect_epp_forms(Epp),
epp:close(Epp),
- {ok, List}.
+ List.
collect_epp_forms(Epp) ->
Result = epp_parse_erl_form(Epp),
@@ -1387,6 +1401,88 @@ do_otp_10820(File, C, PC) ->
true = test_server:stop_node(Node),
ok.
+otp_11728(doc) ->
+ ["OTP-11728. Bugfix circular macro."];
+otp_11728(suite) ->
+ [];
+otp_11728(Config) when is_list(Config) ->
+ Dir = ?config(priv_dir, Config),
+ H = <<"-define(MACRO,[[]++?MACRO]).">>,
+ HrlFile = filename:join(Dir, "otp_11728.hrl"),
+ ok = file:write_file(HrlFile, H),
+ C = <<"-module(otp_11728).
+ -compile(export_all).
+
+ -include(\"otp_11728.hrl\").
+
+ function_name()->
+ A=?MACRO, % line 7
+ ok">>,
+ ErlFile = filename:join(Dir, "otp_11728.erl"),
+ ok = file:write_file(ErlFile, C),
+ {ok, L} = epp:parse_file(ErlFile, [Dir], []),
+ true = lists:member({error,{7,epp,{circular,'MACRO',none}}}, L),
+ _ = file:delete(HrlFile),
+ _ = file:delete(ErlFile),
+ ok.
+
+%% Check the new API for setting the default encoding.
+encoding(Config) when is_list(Config) ->
+ Dir = ?config(priv_dir, Config),
+ ErlFile = filename:join(Dir, "encoding.erl"),
+
+ %% Try a latin-1 file with no encoding given.
+ C1 = <<"-module(encoding).
+ %% ",246,"
+ ">>,
+ ok = file:write_file(ErlFile, C1),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {error,_},
+ {error,{2,epp,cannot_parse}},
+ {eof,2}]} = epp:parse_file(ErlFile, []),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,3}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,3}],[{encoding,none}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1},extra]),
+
+ %% Try a latin-1 file with encoding given in a comment.
+ C2 = <<"-module(encoding).
+ %% encoding: latin-1
+ %% ",246,"
+ ">>,
+ ok = file:write_file(ErlFile, C2),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, []),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, [{default_encoding,utf8}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [extra]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1},extra]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [{default_encoding,utf8},extra]),
+ ok.
+
+
check(Config, Tests) ->
eval_tests(Config, fun check_test/2, Tests).
diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl
index 18ec17a4bf..b55324161b 100644
--- a/lib/stdlib/test/erl_eval_SUITE.erl
+++ b/lib/stdlib/test/erl_eval_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -26,7 +25,7 @@
match_bin/1,
string_plusplus/1,
pattern_expr/1,
- guard_3/1, guard_4/1,
+ guard_3/1, guard_4/1, guard_5/1,
lc/1,
simple_cases/1,
unary_plus/1,
@@ -42,7 +41,9 @@
funs/1,
try_catch/1,
eval_expr_5/1,
- zero_width/1]).
+ zero_width/1,
+ eep37/1,
+ eep43/1]).
%%
%% Define to run outside of test server
@@ -78,10 +79,11 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[guard_1, guard_2, match_pattern, string_plusplus,
- pattern_expr, match_bin, guard_3, guard_4, lc,
+ pattern_expr, match_bin, guard_3, guard_4, guard_5, lc,
simple_cases, unary_plus, apply_atom, otp_5269,
otp_6539, otp_6543, otp_6787, otp_6977, otp_7550,
- otp_8133, otp_10622, funs, try_catch, eval_expr_5, zero_width].
+ otp_8133, otp_10622, funs, try_catch, eval_expr_5, zero_width,
+ eep37, eep43].
groups() ->
[].
@@ -246,6 +248,20 @@ guard_4(Config) when is_list(Config) ->
false),
ok.
+guard_5(doc) ->
+ ["Guards with erlang:'=='/2"];
+guard_5(suite) ->
+ [];
+guard_5(Config) when is_list(Config) ->
+ {ok,Tokens ,_} =
+ erl_scan:string("case 1 of A when erlang:'=='(A, 1) -> true end."),
+ {ok, [Expr]} = erl_parse:parse_exprs(Tokens),
+ true = guard_5_compiled(),
+ {value, true, [{'A',1}]} = erl_eval:expr(Expr, []),
+ ok.
+
+guard_5_compiled() ->
+ case 1 of A when erlang:'=='(A, 1) -> true end.
lc(doc) ->
["OTP-4518."];
@@ -1402,6 +1418,50 @@ zero_width(Config) when is_list(Config) ->
"ok end.", ok),
ok.
+eep37(Config) when is_list(Config) ->
+ check(fun () -> (fun _(X) -> X end)(42) end,
+ "(fun _(X) -> X end)(42).",
+ 42),
+ check(fun () -> (fun _Id(X) -> X end)(42) end,
+ "(fun _Id(X) -> X end)(42).", 42),
+ check(fun () -> is_function((fun Self() -> Self end)(), 0) end,
+ "is_function((fun Self() -> Self end)(), 0).",
+ true),
+ check(fun () ->
+ F = fun Fact(N) when N > 0 ->
+ N * Fact(N - 1);
+ Fact(0) ->
+ 1
+ end,
+ F(6)
+ end,
+ "(fun Fact(N) when N > 0 -> N * Fact(N - 1); Fact(0) -> 1 end)(6).",
+ 720),
+ ok.
+
+eep43(Config) when is_list(Config) ->
+ check(fun () -> #{} end, " #{}.", #{}),
+ check(fun () -> #{a => b} end, "#{a => b}.", #{a => b}),
+ check(fun () ->
+ Map = #{a => b},
+ {Map#{a := b},Map#{a => c},Map#{d => e}}
+ end,
+ "begin "
+ " Map = #{a => B=b}, "
+ " {Map#{a := B},Map#{a => c},Map#{d => e}} "
+ "end.",
+ {#{a => b},#{a => c},#{a => b,d => e}}),
+ check(fun () ->
+ lists:map(fun (X) -> X#{price := 0} end,
+ [#{hello => 0, price => nil}])
+ end,
+ "lists:map(fun (X) -> X#{price := 0} end,
+ [#{hello => 0, price => nil}]).",
+ [#{hello => 0, price => 0}]),
+ error_check("[camembert]#{}.", {badarg,[camembert]}),
+ error_check("#{} = 1.", {badmatch,1}),
+ ok.
+
%% Check the string in different contexts: as is; in fun; from compiled code.
check(F, String, Result) ->
check1(F, String, Result),
diff --git a/lib/stdlib/test/erl_expand_records_SUITE.erl b/lib/stdlib/test/erl_expand_records_SUITE.erl
index 94b4397a9c..43e679f7ed 100644
--- a/lib/stdlib/test/erl_expand_records_SUITE.erl
+++ b/lib/stdlib/test/erl_expand_records_SUITE.erl
@@ -38,7 +38,7 @@
-export([attributes/1, expr/1, guard/1,
init/1, pattern/1, strict/1, update/1,
otp_5915/1, otp_7931/1, otp_5990/1,
- otp_7078/1, otp_7101/1]).
+ otp_7078/1, otp_7101/1, maps/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
@@ -56,7 +56,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[attributes, expr, guard, init,
- pattern, strict, update, {group, tickets}].
+ pattern, strict, update, maps, {group, tickets}].
groups() ->
[{tickets, [],
@@ -402,7 +402,22 @@ update(Config) when is_list(Config) ->
],
?line run(Config, Ts),
ok.
-
+
+maps(Config) when is_list(Config) ->
+ Ts = [<<"-record(rr, {a,b,c}).
+ t() ->
+ R0 = id(#rr{a=1,b=2,c=3}),
+ R1 = id(#rr{a=4,b=5,c=6}),
+ [{R0,R1}] =
+ maps:to_list(#{#rr{a=1,b=2,c=3} => #rr{a=4,b=5,c=6}}),
+ #{#rr{a=1,b=2,c=3} := #rr{a=1,b=2,c=3}} =
+ #{#rr{a=1,b=2,c=3} => R1}#{#rr{a=1,b=2,c=3} := R0},
+ ok.
+
+ id(X) -> X.
+ ">>],
+ run(Config, Ts, [strict_record_tests]),
+ ok.
otp_5915(doc) ->
"Strict record tests in guards.";
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 48ddeac478..ea61b2082b 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,9 +48,11 @@
unused_function/1,
unsafe_vars/1,unsafe_vars2/1,
unsafe_vars_try/1,
+ unsized_binary_in_bin_gen_pattern/1,
guard/1, otp_4886/1, otp_4988/1, otp_5091/1, otp_5276/1, otp_5338/1,
otp_5362/1, otp_5371/1, otp_7227/1, otp_5494/1, otp_5644/1, otp_5878/1,
otp_5917/1, otp_6585/1, otp_6885/1, otp_10436/1, otp_11254/1,
+ otp_11772/1, otp_11771/1, otp_11872/1,
export_all/1,
bif_clash/1,
behaviour_basic/1, behaviour_multiple/1,
@@ -59,7 +61,9 @@
format_warn/1,
on_load_successful/1, on_load_failing/1,
too_many_arguments/1,
- basic_errors/1,bin_syntax_errors/1
+ basic_errors/1,bin_syntax_errors/1,
+ predef/1,
+ maps/1,maps_type/1
]).
% Default timetrap timeout (set in init_per_testcase).
@@ -80,12 +84,15 @@ all() ->
[{group, unused_vars_warn}, export_vars_warn,
shadow_vars, unused_import, unused_function,
unsafe_vars, unsafe_vars2, unsafe_vars_try, guard,
+ unsized_binary_in_bin_gen_pattern,
otp_4886, otp_4988, otp_5091, otp_5276, otp_5338,
otp_5362, otp_5371, otp_7227, otp_5494, otp_5644,
- otp_5878, otp_5917, otp_6585, otp_6885, otp_10436, otp_11254,export_all,
+ otp_5878, otp_5917, otp_6585, otp_6885, otp_10436, otp_11254,
+ otp_11772, otp_11771, otp_11872, export_all,
bif_clash, behaviour_basic, behaviour_multiple,
otp_7550, otp_8051, format_warn, {group, on_load},
- too_many_arguments, basic_errors, bin_syntax_errors].
+ too_many_arguments, basic_errors, bin_syntax_errors, predef,
+ maps, maps_type].
groups() ->
[{unused_vars_warn, [],
@@ -573,7 +580,7 @@ unused_vars_warn_rec(Config) when is_list(Config) ->
ok.
unused_vars_warn_fun(doc) ->
- "Warnings for unused variables in records.";
+ "Warnings for unused variables in funs.";
unused_vars_warn_fun(suite) -> [];
unused_vars_warn_fun(Config) when is_list(Config) ->
Ts = [{fun1,
@@ -641,7 +648,60 @@ unused_vars_warn_fun(Config) when is_list(Config) ->
{22,erl_lint,{unused_var,'U'}},
{24,erl_lint,{unused_var,'U'}},
{26,erl_lint,{unused_var,'U'}},
- {26,erl_lint,{shadowed_var,'U','fun'}}]}}
+ {26,erl_lint,{shadowed_var,'U','fun'}}]}},
+ {named_fun,
+ <<"u() ->
+ fun U() -> foo end, % U unused.
+ U; % U unbound.
+ u() ->
+ case foo of
+ true ->
+ U = 2;
+ false ->
+ true
+ end,
+ fun U() -> foo end, % U unused.
+ U; % U unsafe.
+ u() ->
+ case foo of
+ true ->
+ U = 2;
+ false ->
+ U = 3
+ end,
+ fun U() -> foo end, % U shadowed. U unused.
+ U;
+ u() ->
+ case foo of
+ true ->
+ U = 2; % U unused.
+ false ->
+ U = 3 % U unused.
+ end,
+ fun U() -> foo end; % U shadowed. U unused.
+ u() ->
+ fun U(U) -> foo end; % U shadowed. U unused.
+ u() ->
+ fun U(1) -> U; U(U) -> foo end; % U shadowed. U unused.
+ u() ->
+ fun _(N) -> N + 1 end. % Cover handling of '_' name.
+ ">>,
+ [warn_unused_vars],
+ {error,[{3,erl_lint,{unbound_var,'U'}},
+ {12,erl_lint,{unsafe_var,'U',{'case',5}}}],
+ [{2,erl_lint,{unused_var,'U'}},
+ {11,erl_lint,{unused_var,'U'}},
+ {20,erl_lint,{unused_var,'U'}},
+ {20,erl_lint,{shadowed_var,'U','named fun'}},
+ {25,erl_lint,{unused_var,'U'}},
+ {27,erl_lint,{unused_var,'U'}},
+ {29,erl_lint,{unused_var,'U'}},
+ {29,erl_lint,{shadowed_var,'U','named fun'}},
+ {31,erl_lint,{unused_var,'U'}},
+ {31,erl_lint,{unused_var,'U'}},
+ {31,erl_lint,{shadowed_var,'U','fun'}},
+ {33,erl_lint,{unused_var,'U'}},
+ {33,erl_lint,{shadowed_var,'U','fun'}}]}}
],
?line [] = run(Config, Ts),
ok.
@@ -1127,6 +1187,35 @@ unsafe_vars_try(Config) when is_list(Config) ->
?line [] = run(Config, Ts),
ok.
+unsized_binary_in_bin_gen_pattern(doc) ->
+ "Unsized binary fields are forbidden in patterns of bit string generators";
+unsized_binary_in_bin_gen_pattern(suite) -> [];
+unsized_binary_in_bin_gen_pattern(Config) when is_list(Config) ->
+ Ts = [{unsized_binary_in_bin_gen_pattern,
+ <<"t({bc,binary,Bin}) ->
+ << <<X,Tail/binary>> || <<X,Tail/binary>> <= Bin >>;
+ t({bc,bits,Bin}) ->
+ << <<X,Tail/bits>> || <<X,Tail/bits>> <= Bin >>;
+ t({bc,bitstring,Bin}) ->
+ << <<X,Tail/bits>> || <<X,Tail/bitstring>> <= Bin >>;
+ t({lc,binary,Bin}) ->
+ [ {X,Tail} || <<X,Tail/binary>> <= Bin ];
+ t({lc,bits,Bin}) ->
+ [ {X,Tail} || <<X,Tail/bits>> <= Bin ];
+ t({lc,bitstring,Bin}) ->
+ [ {X,Tail} || <<X,Tail/bitstring>> <= Bin ].">>,
+ [],
+ {errors,
+ [{2,erl_lint,unsized_binary_in_bin_gen_pattern},
+ {4,erl_lint,unsized_binary_in_bin_gen_pattern},
+ {6,erl_lint,unsized_binary_in_bin_gen_pattern},
+ {8,erl_lint,unsized_binary_in_bin_gen_pattern},
+ {10,erl_lint,unsized_binary_in_bin_gen_pattern},
+ {12,erl_lint,unsized_binary_in_bin_gen_pattern}],
+ []}}],
+ [] = run(Config, Ts),
+ ok.
+
guard(doc) ->
"OTP-4670. Guards, is_record in particular.";
guard(suite) -> [];
@@ -1190,10 +1279,9 @@ guard(Config) when is_list(Config) ->
tuple.
">>,
[nowarn_obsolete_guard],
- {error,
+ {errors,
[{6,erl_lint,illegal_guard_expr},{18,erl_lint,illegal_guard_expr}],
- [{18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}}]}},
+ []}},
{guard2,
<<"-record(apa,{}).
t1(A) when atom(A), atom(A) ->
@@ -1252,14 +1340,11 @@ guard(Config) when is_list(Config) ->
tuple.
">>,
[nowarn_obsolete_guard],
- {error,[{6,erl_lint,illegal_guard_expr},
- {6,erl_lint,illegal_guard_expr},
- {18,erl_lint,illegal_guard_expr},
- {18,erl_lint,illegal_guard_expr}],
- [{18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}},
- {18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}}]}},
+ {errors,[{6,erl_lint,illegal_guard_expr},
+ {6,erl_lint,illegal_guard_expr},
+ {18,erl_lint,illegal_guard_expr},
+ {18,erl_lint,illegal_guard_expr}],
+ []}},
{guard3,
<<"-record(apa,{}).
t2(A) when atom(A); atom(A) ->
@@ -1409,7 +1494,15 @@ guard(Config) when is_list(Config) ->
[],
{errors,[{1,erl_lint,illegal_guard_expr},
{2,erl_lint,illegal_guard_expr},
- {3,erl_lint,illegal_guard_expr}],[]}}
+ {3,erl_lint,illegal_guard_expr}],[]}},
+ {guard9,
+ <<"t(X, Y) when erlang:'andalso'(X, Y) -> ok;
+ t(X, Y) when erlang:'orelse'(X, Y) -> ok.
+ ">>,
+ [],
+ {errors,[{1,erl_lint,illegal_guard_expr},
+ {2,erl_lint,illegal_guard_expr}],
+ []}}
],
?line [] = run(Config, Ts1),
ok.
@@ -2170,7 +2263,8 @@ otp_5878(Config) when is_list(Config) ->
<<"-record(r1, {t = case foo of _ -> 3 end}).
-record(r2, {a = case foo of A -> A; _ -> 3 end}).
-record(r3, {a = case foo of A -> A end}).
- t() -> {#r1{},#r2{},#r3{}}.
+ -record(r4, {a = fun _AllowedFunName() -> allowed end}).
+ t() -> {#r1{},#r2{},#r3{},#r4{}}.
">>,
[warn_unused_record],
{errors,[{2,erl_lint,{variable_in_record_def,'A'}},
@@ -2467,7 +2561,7 @@ otp_10436(Config) when is_list(Config) ->
ok.
otp_11254(doc) ->
- "OTP-11254. Warnings for opaque types.";
+ "OTP-11254. M:F/A could crash the linter.";
otp_11254(suite) -> [];
otp_11254(Config) when is_list(Config) ->
Ts = <<"-module(p2).
@@ -2480,6 +2574,85 @@ otp_11254(Config) when is_list(Config) ->
run_test2(Config, Ts, []),
ok.
+otp_11772(doc) ->
+ "OTP-11772. Reintroduce errors for redefined builtin types.";
+otp_11772(suite) -> [];
+otp_11772(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(newly).
+
+ -compile(export_all).
+
+ %% Built-in:
+ -type node() :: node().
+ -type mfa() :: tuple().
+ -type gb_tree() :: mfa(). % Allowed since Erlang/OTP 17.0
+ -type digraph() :: [_]. % Allowed since Erlang/OTP 17.0
+
+ -type t() :: mfa() | digraph() | gb_tree() | node().
+
+ -spec t() -> t().
+
+ t() ->
+ 1.
+ ">>,
+ {errors,[{7,erl_lint,{builtin_type,{node,0}}},
+ {8,erl_lint,{builtin_type,{mfa,0}}}],
+ []} = run_test2(Config, Ts, []),
+ ok.
+
+otp_11771(doc) ->
+ "OTP-11771. Do not allow redefinition of the types arity(_) &c..";
+otp_11771(suite) -> [];
+otp_11771(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(newly).
+
+ -compile(export_all).
+
+ %% No longer allowed in 17.0:
+ -type arity() :: atom().
+ -type bitstring() :: list().
+ -type iodata() :: integer().
+ -type boolean() :: iodata().
+
+ -type t() :: arity() | bitstring() | iodata() | boolean().
+
+ -spec t() -> t().
+
+ t() ->
+ 1.
+ ">>,
+ {errors,[{7,erl_lint,{builtin_type,{arity,0}}},
+ {8,erl_lint,{builtin_type,{bitstring,0}}},
+ {9,erl_lint,{builtin_type,{iodata,0}}},
+ {10,erl_lint,{builtin_type,{boolean,0}}}],
+ []} = run_test2(Config, Ts, []),
+ ok.
+
+otp_11872(doc) ->
+ "OTP-11872. The type map() undefined when exported.";
+otp_11872(suite) -> [];
+otp_11872(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(map).
+
+ -compile(export_all).
+
+ -export_type([map/0, product/0]).
+
+ -opaque map() :: dict().
+
+ -spec t() -> map().
+
+ t() ->
+ 1.
+ ">>,
+ {error,[{6,erl_lint,{undefined_type,{product,0}}}],
+ [{8,erl_lint,{new_var_arity_type,map}}]} =
+ run_test2(Config, Ts, []),
+ ok.
+
export_all(doc) ->
"OTP-7392. Warning for export_all.";
export_all(Config) when is_list(Config) ->
@@ -2742,7 +2915,24 @@ bif_clash(Config) when is_list(Config) ->
{6,erl_lint,{illegal_guard_local_call,{is_tuple,1}}},
{7,erl_lint,{illegal_guard_local_call,{is_list,1}}},
{8,erl_lint,{illegal_guard_local_call,{is_record,3}}},
- {9,erl_lint,{illegal_guard_local_call,{is_record,3}}}],[]}}
+ {9,erl_lint,{illegal_guard_local_call,{is_record,3}}}],[]}},
+ %% We can also suppress all auto imports at once
+ {clash22,
+ <<"-export([size/1, binary_part/2]).
+ -compile(no_auto_import).
+ size([]) ->
+ 0;
+ size({N,_}) ->
+ N;
+ size([_|T]) ->
+ 1+size(T).
+ binary_part({B,_},{X,Y}) ->
+ binary_part(B,{X,Y});
+ binary_part(B,{X,Y}) ->
+ binary:part(B,X,Y).
+ ">>,
+ [],
+ []}
],
?line [] = run(Config, Ts),
@@ -2774,7 +2964,15 @@ behaviour_basic(Config) when is_list(Config) ->
stop(_) -> ok.
">>,
[],
- []}
+ []},
+
+ {behaviour4,
+ <<"-behavior(application). %% Test callbacks with export_all
+ -compile(export_all).
+ stop(_) -> ok.
+ ">>,
+ [],
+ {warnings,[{1,erl_lint,{undefined_behaviour_func,{start,2},application}}]}}
],
?line [] = run(Config, Ts),
ok.
@@ -3131,6 +3329,151 @@ bin_syntax_errors(Config) ->
[] = run(Config, Ts),
ok.
+predef(doc) ->
+ "OTP-10342: Predefined types: array(), digraph(), and so on";
+predef(suite) -> [];
+predef(Config) when is_list(Config) ->
+ W = get_compilation_warnings(Config, "predef", []),
+ [] = W,
+ W2 = get_compilation_warnings(Config, "predef2", []),
+ Tag = deprecated_builtin_type,
+ [{7,erl_lint,{Tag,{array,0},{array,array,1},"OTP 18.0"}},
+ {12,erl_lint,{Tag,{dict,0},{dict,dict,2},"OTP 18.0"}},
+ {17,erl_lint,{Tag,{digraph,0},{digraph,graph},"OTP 18.0"}},
+ {27,erl_lint,{Tag,{gb_set,0},{gb_sets,set,1},"OTP 18.0"}},
+ {32,erl_lint,{Tag,{gb_tree,0},{gb_trees,tree,2},"OTP 18.0"}},
+ {37,erl_lint,{Tag,{queue,0},{queue,queue,1},"OTP 18.0"}},
+ {42,erl_lint,{Tag,{set,0},{sets,set,1},"OTP 18.0"}},
+ {47,erl_lint,{Tag,{tid,0},{ets,tid},"OTP 18.0"}}] = W2,
+ Ts = [{otp_10342_1,
+ <<"-compile(nowarn_deprecated_type).
+
+ -spec t(dict()) -> non_neg_integer().
+
+ t(D) ->
+ erlang:phash2(D, 3000).
+ ">>,
+ {[nowarn_unused_function]},
+ []},
+ {otp_10342_2,
+ <<"-spec t(dict()) -> non_neg_integer().
+
+ t(D) ->
+ erlang:phash2(D, 3000).
+ ">>,
+ {[nowarn_unused_function]},
+ {warnings,[{1,erl_lint,
+ {deprecated_builtin_type,{dict,0},{dict,dict,2},
+ "OTP 18.0"}}]}}],
+ [] = run(Config, Ts),
+ ok.
+
+maps(Config) ->
+ %% TODO: test key patterns, not done because map patterns are going to be
+ %% changed a lot.
+ Ts = [{illegal_map_construction,
+ <<"t() ->
+ #{ a := b,
+ c => d,
+ e := f
+ }#{ a := b,
+ c => d,
+ e := f };
+ t() when is_map(#{ a := b,
+ c => d
+ }#{ a := b,
+ c => d,
+ e := f }) ->
+ ok.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,illegal_map_construction},
+ {4,erl_lint,illegal_map_construction},
+ {8,erl_lint,illegal_map_construction}],
+ []}},
+ {illegal_pattern,
+ <<"t(#{ a := A,
+ c => d,
+ e := F,
+ g := 1 + 1,
+ h := _,
+ i := (_X = _Y),
+ j := (x ! y) }) ->
+ {A,F}.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,illegal_pattern},
+ {7,erl_lint,illegal_pattern}],
+ []}},
+ {error_in_illegal_map_construction,
+ <<"t() -> #{ a := X }.">>,
+ [],
+ {errors,[{1,erl_lint,illegal_map_construction},
+ {1,erl_lint,{unbound_var,'X'}}],
+ []}},
+ {errors_in_map_keys,
+ <<"t(V) -> #{ a => 1,
+ #{a=>V} => 2,
+ #{ \"hi\" => wazzup, hi => ho } => yep,
+ [try a catch _:_ -> b end] => nope,
+ ok => 1.0,
+ [3+3] => nope,
+ 1.0 => yep,
+ {3.0+3} => nope,
+ {yep} => yep,
+ [case a of a -> a end] => nope
+ }.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,{illegal_map_key_variable,'V'}},
+ {4,erl_lint,illegal_map_key},
+ {6,erl_lint,illegal_map_key},
+ {8,erl_lint,illegal_map_key},
+ {10,erl_lint,illegal_map_key}],[]}},
+ {errors_in_map_keys_pattern,
+ <<"t(#{ a := 2,
+ #{} := A,
+ #{ 3 => 33 } := hi,
+ #{ 3 := 33 } := hi,
+ #{ hi => 54, \"hello\" => 45 } := hi,
+ #{ V => 33 } := hi }) ->
+ A.
+ ">>,
+ [],
+ {errors,[{4,erl_lint,illegal_map_key},
+ {6,erl_lint,{illegal_map_key_variable,'V'}}],[]}}],
+ [] = run(Config, Ts),
+ ok.
+
+maps_type(Config) when is_list(Config) ->
+ Ts = [
+ {maps_type1,
+ <<"
+ -type m() :: #{a => integer()}.
+ -spec t1(#{k=>term()}) -> {term(), map()}.
+
+ t1(#{k:=V}=M) -> {V,M}.
+
+ -spec t2(m()) -> integer().
+
+ t2(#{a:=V}) -> V.
+ ">>,
+ [],
+ []},
+ {maps_type2,
+ <<"
+ %% Built-in var arity map type:
+ -type map() :: tuple().
+ -type a() :: map().
+
+ -spec t(a()) -> a().
+ t(M) -> M.
+ ">>,
+ [],
+ {warnings,[{3,erl_lint,{new_var_arity_type,map}}]}}],
+ [] = run(Config, Ts),
+ ok.
+
run(Config, Tests) ->
F = fun({N,P,Ws,E}, BadL) ->
case catch run_test(Config, P, Ws) of
@@ -3153,8 +3496,10 @@ get_compilation_warnings(Conf, Filename, Warnings) ->
FileS = binary_to_list(Bin),
{match,[{Start,Length}|_]} = re:run(FileS, "-module.*\\n"),
Test = lists:nthtail(Start+Length, FileS),
- {warnings, Ws} = run_test(Conf, Test, Warnings),
- Ws.
+ case run_test(Conf, Test, Warnings) of
+ {warnings, Ws} -> Ws;
+ [] -> []
+ end.
%% Compiles a test module and returns the list of errors and warnings.
diff --git a/lib/stdlib/test/erl_lint_SUITE_data/predef.erl b/lib/stdlib/test/erl_lint_SUITE_data/predef.erl
new file mode 100644
index 0000000000..ee9073aa67
--- /dev/null
+++ b/lib/stdlib/test/erl_lint_SUITE_data/predef.erl
@@ -0,0 +1,67 @@
+-module(predef).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+%% Before Erlang/OTP 17.0 local re-definitions of pre-defined opaque
+%% types were ignored but did not generate any warning.
+-opaque array() :: atom().
+-opaque digraph() :: atom().
+-opaque gb_set() :: atom().
+-type dict() :: atom().
+-type gb_tree() :: atom().
+-type queue() :: atom().
+-type set() :: atom().
+-type tid() :: atom().
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl b/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl
new file mode 100644
index 0000000000..b1d941a49a
--- /dev/null
+++ b/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl
@@ -0,0 +1,56 @@
+-module(predef2).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index 2b7cec87df..927fe0b595 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -46,6 +46,7 @@
import_export/1, misc_attrs/1, dialyzer_attrs/1,
hook/1,
neg_indent/1,
+ maps_syntax/1,
otp_6321/1, otp_6911/1, otp_6914/1, otp_8150/1, otp_8238/1,
otp_8473/1, otp_8522/1, otp_8567/1, otp_8664/1, otp_9147/1,
@@ -76,7 +77,8 @@ groups() ->
[{expr, [],
[func, call, recs, try_catch, if_then, receive_after,
bits, head_tail, cond1, block, case1, ops,
- messages, old_mnemosyne_syntax]},
+ messages, old_mnemosyne_syntax, maps_syntax
+ ]},
{attributes, [], [misc_attrs, import_export, dialyzer_attrs]},
{tickets, [],
[otp_6321, otp_6911, otp_6914, otp_8150, otp_8238,
@@ -130,7 +132,27 @@ func(Config) when is_list(Config) ->
true
end)().">>},
{func_7,
- <<"t(M, F, A) -> fun M:F/A.">>}
+ <<"t(M, F, A) -> fun M:F/A.">>},
+ {func_8,
+ <<"-record(r1, {a,b}).
+ -record(r3, {a = fun Id(_) -> #r1{} end(1), b}).
+
+ t() ->
+ fun Id(A) when record(A#r3.a, r1) -> 7 end(#r3{}).
+ ">>},
+ {func_9,
+ <<"-record(r1, {a,b}).
+ -record(r3, {a = fun Id(_) -> #r1{} end(1), b}).
+
+ t() ->
+ fsdfsdfjsdfjkljf:sdlfjdsfjlf(
+ fun Id(sdfsd) -> {sdkjsdf,sdfjsdkljfsdl,sdfkjdklf} end).
+ ">>},
+ {func_10,
+ <<"t() ->
+ (fun True() ->
+ true
+ end)().">>}
],
?line compile(Config, Ts),
ok.
@@ -158,6 +180,7 @@ recs(Config) when is_list(Config) ->
-record(r1, {a,b}).
-record(r2, {a = #r1{},b,c=length([1,2,3])}).
-record(r3, {a = fun(_) -> #r1{} end(1), b}).
+ -record(r4, {a = fun R1(_) -> #r1{} end(1), b}).
t() ->
foo = fun(A) when A#r1.a > A#r1.b -> foo end(#r1{b = 2}),
@@ -581,20 +604,20 @@ import_export(Config) when is_list(Config) ->
misc_attrs(suite) ->
[];
misc_attrs(Config) when is_list(Config) ->
- ?line ok = pp_forms(<<"-module(m). ">>),
- ?line ok = pp_forms(<<"-module(m, [Aafjlksfjdlsjflsdfjlsdjflkdsfjlk,"
- "Blsjfdlslfjsdf]). ">>),
- ?line ok = pp_forms(<<"-export([]). ">>),
- ?line ok = pp_forms(<<"-export([foo/2, bar/0]). ">>),
- ?line ok = pp_forms(<<"-export([bar/0]). ">>),
- ?line ok = pp_forms(<<"-import(lists, []). ">>),
- ?line ok = pp_forms(<<"-import(lists, [map/2]). ">>),
- ?line ok = pp_forms(<<"-import(lists, [map/2, foreach/2]). ">>),
- ?line ok = pp_forms(<<"-'wild '({attr2,3}). ">>),
- ?line ok = pp_forms(<<"-record(a, {b,c}). ">>),
- ?line ok = pp_forms(<<"-record(' a ', {}). ">>),
- ?line ok = pp_forms(<<"-record(' a ', {foo = foo:bar()}). ">>),
-
+ ok = pp_forms(<<"-module(m). ">>),
+ ok = pp_forms(<<"-module(m, [Aafjlksfjdlsjflsdfjlsdjflkdsfjlk,"
+ "Blsjfdlslfjsdf]). ">>),
+ ok = pp_forms(<<"-export([]). ">>),
+ ok = pp_forms(<<"-export([foo/2, bar/0]). ">>),
+ ok = pp_forms(<<"-export([bar/0]). ">>),
+ ok = pp_forms(<<"-import(lists, []). ">>),
+ ok = pp_forms(<<"-import(lists, [map/2]). ">>),
+ ok = pp_forms(<<"-import(lists, [map/2, foreach/2]). ">>),
+ ok = pp_forms(<<"-'wild '({attr2,3}). ">>),
+ ok = pp_forms(<<"-record(a, {b,c}). ">>),
+ ok = pp_forms(<<"-record(' a ', {}). ">>),
+ ok = pp_forms(<<"-record(' a ', {foo = foo:bar()}). ">>),
+ ok = pp_forms(<<"-custom1(#{test1 => init/2, test2 => [val/1, val/2]}). ">>),
ok.
dialyzer_attrs(suite) ->
@@ -741,6 +764,7 @@ neg_indent(Config) when is_list(Config) ->
?line ok = pp_expr(<<"{[a,b,c],[d,e|f]}">>),
?line ok = pp_expr(<<"f(a,b,c)">>),
?line ok = pp_expr(<<"fun() when a,b;c,d -> a end">>),
+ ?line ok = pp_expr(<<"fun A() when a,b;c,d -> a end">>),
?line ok = pp_expr(<<"<<34:32,17:32>>">>),
?line ok = pp_expr(<<"if a,b,c -> d; e,f,g -> h,i end">>),
?line ok = pp_expr(<<"if a -> d; c -> d end">>),
@@ -763,6 +787,9 @@ neg_indent(Config) when is_list(Config) ->
Fun2 = {'fun',2,{clauses,[{clause,2,[],[],[{atom,3,true}]}]},
{0,108059557,'-t/0-fun-0-'}},
?line "fun() -> true end" = flat_expr(Fun2),
+ Fun3 = {named_fun,3,'True',[{clause,3,[],[],[{atom,3,true}]}],
+ {0,424242424,'-t/0-True-0-'}},
+ ?line "fun True() -> true end" = flat_expr(Fun3),
ok.
@@ -950,6 +977,35 @@ count_atom(L, A) when is_list(L) ->
count_atom(_, _) ->
0.
+maps_syntax(doc) -> "Maps syntax";
+maps_syntax(suite) -> [];
+maps_syntax(Config) when is_list(Config) ->
+ Ts = [{map_fun_1,
+ <<"t() ->\n"
+ " M0 = #{ 1 => hi, hi => 42, 1.0 => {hi,world}},\n"
+ " M1 = M0#{ 1 := hello, new_val => 1337 },\n"
+ " map_fun_2:val(M1).\n">>},
+ {map_fun_2,
+ <<"val(#{ 1 := V1, hi := V2, new_val := V3}) -> {V1,V2,V3}.\n">>}],
+ compile(Config, Ts),
+
+ ok = pp_expr(<<"#{}">>),
+ ok = pp_expr(<<"#{ a => 1, <<\"hi\">> => \"world\", 33 => 1.0 }">>),
+ ok = pp_expr(<<"#{ a := V1, <<\"hi\">> := V2 } = M">>),
+ ok = pp_expr(<<"M#{ a => V1, <<\"hi\">> := V2 }">>),
+ F = <<"-module(maps_type_syntax).\n"
+ "-compile(export_all).\n"
+ "-type t1() :: map().\n"
+ "-type t2() :: #{ atom() => integer(), atom() => float() }.\n"
+ "-spec f1(t1()) -> 'true'.\n"
+ "f1(M) when is_map(M) -> true.\n"
+ "-spec f2(t2()) -> integer().\n"
+ "f2(#{a := V1,b := V2}) -> V1 + V2.\n"
+ "\n">>,
+ ok = pp_forms(F),
+ ok.
+
+
otp_8567(doc) ->
"OTP_8567. Avoid duplicated 'undefined' in record field types.";
otp_8567(suite) -> [];
@@ -1091,7 +1147,7 @@ otp_10820(Config) when is_list(Config) ->
C1 = <<"%% coding: utf-8\n -module(any).">>,
ok = do_otp_10820(Config, C1, "+pc latin1"),
ok = do_otp_10820(Config, C1, "+pc unicode"),
- C2 = <<"-module(any).">>,
+ C2 = <<"%% coding: latin-1\n -module(any).">>,
ok = do_otp_10820(Config, C2, "+pc latin1"),
ok = do_otp_10820(Config, C2, "+pc unicode").
diff --git a/lib/stdlib/test/erl_scan_SUITE.erl b/lib/stdlib/test/erl_scan_SUITE.erl
index 361abbb771..9be9f641c8 100644
--- a/lib/stdlib/test/erl_scan_SUITE.erl
+++ b/lib/stdlib/test/erl_scan_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +21,7 @@
init_per_group/2,end_per_group/2]).
-export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1,
- otp_10990/1, otp_10992/1]).
+ otp_10990/1, otp_10992/1, otp_11807/1]).
-import(lists, [nth/2,flatten/1]).
-import(io_lib, [print/1]).
@@ -61,7 +60,8 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992].
+ [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992,
+ otp_11807].
groups() ->
[{error, [], [error_1, error_2]}].
@@ -204,20 +204,20 @@ reserved_words() ->
[begin
?line {RW, true} = {RW, erl_scan:reserved_word(RW)},
S = atom_to_list(RW),
- Ts = [{RW,1}],
+ Ts = [{RW,{1,1}}],
?line test_string(S, Ts)
end || RW <- L],
ok.
atoms() ->
- ?line test_string("a
- b", [{atom,1,a},{atom,2,b}]),
- ?line test_string("'a b'", [{atom,1,'a b'}]),
- ?line test_string("a", [{atom,1,a}]),
- ?line test_string("a@2", [{atom,1,a@2}]),
- ?line test_string([39,65,200,39], [{atom,1,'AÈ'}]),
- ?line test_string("ärlig östen", [{atom,1,ärlig},{atom,1,östen}]),
+ test_string("a
+ b", [{atom,{1,1},a},{atom,{2,18},b}]),
+ test_string("'a b'", [{atom,{1,1},'a b'}]),
+ test_string("a", [{atom,{1,1},a}]),
+ test_string("a@2", [{atom,{1,1},a@2}]),
+ test_string([39,65,200,39], [{atom,{1,1},'AÈ'}]),
+ test_string("ärlig östen", [{atom,{1,1},ärlig},{atom,{1,7},östen}]),
?line {ok,[{atom,_,'$a'}],{1,6}} =
erl_scan:string("'$\\a'", {1,1}),
?line test("'$\\a'"),
@@ -225,12 +225,12 @@ atoms() ->
punctuations() ->
L = ["<<", "<-", "<=", "<", ">>", ">=", ">", "->", "--",
- "-", "++", "+", "=:=", "=/=", "=<", "==", "=", "/=",
- "/", "||", "|", ":-", "::", ":"],
+ "-", "++", "+", "=:=", "=/=", "=<", "=>", "==", "=", "/=",
+ "/", "||", "|", ":=", ":-", "::", ":"],
%% One token at a time:
[begin
W = list_to_atom(S),
- Ts = [{W,1}],
+ Ts = [{W,{1,1}}],
?line test_string(S, Ts)
end || S <- L],
Three = ["/=:=", "<=:=", "==:=", ">=:="], % three tokens...
@@ -246,53 +246,60 @@ punctuations() ->
[begin
W1 = list_to_atom(S1),
W2 = list_to_atom(S2),
- Ts = [{W1,1},{W2,1}],
+ Ts = [{W1,{1,1}},{W2,{1,-L2+1}}],
?line test_string(S, Ts)
- end || {S,[{_,S1,S2}|_]} <- SL],
+ end || {S,[{L2,S1,S2}|_]} <- SL],
- PTs1 = [{'!',1},{'(',1},{')',1},{',',1},{';',1},{'=',1},{'[',1},
- {']',1},{'{',1},{'|',1},{'}',1}],
+ PTs1 = [{'!',{1,1}},{'(',{1,2}},{')',{1,3}},{',',{1,4}},{';',{1,5}},
+ {'=',{1,6}},{'[',{1,7}},{']',{1,8}},{'{',{1,9}},{'|',{1,10}},
+ {'}',{1,11}}],
?line test_string("!(),;=[]{|}", PTs1),
- PTs2 = [{'#',1},{'&',1},{'*',1},{'+',1},{'/',1},
- {':',1},{'<',1},{'>',1},{'?',1},{'@',1},
- {'\\',1},{'^',1},{'`',1},{'~',1}],
+ PTs2 = [{'#',{1,1}},{'&',{1,2}},{'*',{1,3}},{'+',{1,4}},{'/',{1,5}},
+ {':',{1,6}},{'<',{1,7}},{'>',{1,8}},{'?',{1,9}},{'@',{1,10}},
+ {'\\',{1,11}},{'^',{1,12}},{'`',{1,13}},{'~',{1,14}}],
?line test_string("#&*+/:<>?@\\^`~", PTs2),
- ?line test_string(".. ", [{'..',1}]),
- ?line test("1 .. 2"),
- ?line test_string("...", [{'...',1}]),
+ test_string(".. ", [{'..',{1,1}}]),
+ test_string("1 .. 2",
+ [{integer,{1,1},1},{'..',{1,3}},{integer,{1,6},2}]),
+ test_string("...", [{'...',{1,1}}]),
ok.
comments() ->
?line test("a %%\n b"),
?line {ok,[],1} = erl_scan:string("%"),
?line test("a %%\n b"),
- ?line {ok,[{atom,_,a},{atom,_,b}],{2,3}} =
+ {ok,[{atom,{1,1},a},{atom,{2,2},b}],{2,3}} =
erl_scan:string("a %%\n b",{1,1}),
- ?line {ok,[{atom,_,a},{comment,_,"%%"},{atom,_,b}],{2,3}} =
+ {ok,[{atom,{1,1},a},{comment,{1,3},"%%"},{atom,{2,2},b}],{2,3}} =
erl_scan:string("a %%\n b",{1,1}, [return_comments]),
- ?line {ok,[{atom,_,a},
- {white_space,_," "},
- {white_space,_,"\n "},
- {atom,_,b}],
- {2,3}} =
+ {ok,[{atom,{1,1},a},
+ {white_space,{1,2}," "},
+ {white_space,{1,5},"\n "},
+ {atom,{2,2},b}],
+ {2,3}} =
erl_scan:string("a %%\n b",{1,1},[return_white_spaces]),
- ?line {ok,[{atom,_,a},
- {white_space,_," "},
- {comment,_,"%%"},
- {white_space,_,"\n "},
- {atom,_,b}],
- {2,3}} = erl_scan:string("a %%\n b",{1,1},[return]),
+ {ok,[{atom,{1,1},a},
+ {white_space,{1,2}," "},
+ {comment,{1,3},"%%"},
+ {white_space,{1,5},"\n "},
+ {atom,{2,2},b}],
+ {2,3}} = erl_scan:string("a %%\n b",{1,1},[return]),
ok.
errors() ->
?line {error,{1,erl_scan,{string,$',"qa"}},1} = erl_scan:string("'qa"), %'
+ {error,{{1,1},erl_scan,{string,$',"qa"}},{1,4}} = %'
+ erl_scan:string("'qa", {1,1}, []), %'
?line {error,{1,erl_scan,{string,$","str"}},1} = %"
erl_scan:string("\"str"), %"
+ {error,{{1,1},erl_scan,{string,$","str"}},{1,5}} = %"
+ erl_scan:string("\"str", {1,1}, []), %"
?line {error,{1,erl_scan,char},1} = erl_scan:string("$"),
- ?line test_string([34,65,200,34], [{string,1,"AÈ"}]),
- ?line test_string("\\", [{'\\',1}]),
+ {error,{{1,1},erl_scan,char},{1,2}} = erl_scan:string("$", {1,1}, []),
+ test_string([34,65,200,34], [{string,{1,1},"AÈ"}]),
+ test_string("\\", [{'\\',{1,1}}]),
?line {'EXIT',_} =
(catch {foo, erl_scan:string('$\\a', {1,1})}), % type error
?line {'EXIT',_} =
@@ -304,7 +311,7 @@ errors() ->
integers() ->
[begin
I = list_to_integer(S),
- Ts = [{integer,1,I}],
+ Ts = [{integer,{1,1},I}],
?line test_string(S, Ts)
end || S <- [[N] || N <- lists:seq($0, $9)] ++ ["2323","000"] ],
ok.
@@ -313,14 +320,16 @@ base_integers() ->
[begin
B = list_to_integer(BS),
I = erlang:list_to_integer(S, B),
- Ts = [{integer,1,I}],
+ Ts = [{integer,{1,1},I}],
?line test_string(BS++"#"++S, Ts)
end || {BS,S} <- [{"2","11"}, {"5","23234"}, {"12","05a"},
{"16","abcdef"}, {"16","ABCDEF"}] ],
?line {error,{1,erl_scan,{base,1}},1} = erl_scan:string("1#000"),
+ {error,{{1,1},erl_scan,{base,1}},{1,2}} =
+ erl_scan:string("1#000", {1,1}, []),
- ?line test_string("12#bc", [{integer,1,11},{atom,1,c}]),
+ test_string("12#bc", [{integer,{1,1},11},{atom,{1,5},c}]),
[begin
Str = BS ++ "#" ++ S,
@@ -329,40 +338,53 @@ base_integers() ->
end || {BS,S} <- [{"3","3"},{"15","f"}, {"12","c"}] ],
?line {ok,[{integer,1,239},{'@',1}],1} = erl_scan:string("16#ef@"),
- ?line {ok,[{integer,1,14},{atom,1,g@}],1} = erl_scan:string("16#eg@"),
+ {ok,[{integer,{1,1},239},{'@',{1,6}}],{1,7}} =
+ erl_scan:string("16#ef@", {1,1}, []),
+ {ok,[{integer,{1,1},14},{atom,{1,5},g@}],{1,7}} =
+ erl_scan:string("16#eg@", {1,1}, []),
ok.
floats() ->
[begin
F = list_to_float(FS),
- Ts = [{float,1,F}],
+ Ts = [{float,{1,1},F}],
?line test_string(FS, Ts)
end || FS <- ["1.0","001.17","3.31200","1.0e0","1.0E17",
"34.21E-18", "17.0E+14"]],
- ?line test_string("1.e2", [{integer,1,1},{'.',1},{atom,1,e2}]),
+ test_string("1.e2", [{integer,{1,1},1},{'.',{1,2}},{atom,{1,3},e2}]),
?line {error,{1,erl_scan,{illegal,float}},1} =
erl_scan:string("1.0e400"),
+ {error,{{1,1},erl_scan,{illegal,float}},{1,8}} =
+ erl_scan:string("1.0e400", {1,1}, []),
[begin
- ?line {error,{1,erl_scan,{illegal,float}},1} = erl_scan:string(S)
+ {error,{1,erl_scan,{illegal,float}},1} = erl_scan:string(S),
+ {error,{{1,1},erl_scan,{illegal,float}},{1,_}} =
+ erl_scan:string(S, {1,1}, [])
end || S <- ["1.14Ea"]],
ok.
dots() ->
- Dot = [{".", {ok,[{dot,1}],1}},
- {". ", {ok,[{dot,1}],1}},
- {".\n", {ok,[{dot,1}],2}},
- {".%", {ok,[{dot,1}],1}},
- {".\210",{ok,[{dot,1}],1}},
- {".% öh",{ok,[{dot,1}],1}},
- {".%\n", {ok,[{dot,1}],2}},
- {".$", {error,{1,erl_scan,char},1}},
- {".$\\", {error,{1,erl_scan,char},1}},
- {".a", {ok,[{'.',1},{atom,1,a}],1}}
+ Dot = [{".", {ok,[{dot,1}],1}, {ok,[{dot,{1,1}}],{1,2}}},
+ {". ", {ok,[{dot,1}],1}, {ok,[{dot,{1,1}}],{1,3}}},
+ {".\n", {ok,[{dot,1}],2}, {ok,[{dot,{1,1}}],{2,1}}},
+ {".%", {ok,[{dot,1}],1}, {ok,[{dot,{1,1}}],{1,3}}},
+ {".\210",{ok,[{dot,1}],1}, {ok,[{dot,{1,1}}],{1,3}}},
+ {".% öh",{ok,[{dot,1}],1}, {ok,[{dot,{1,1}}],{1,6}}},
+ {".%\n", {ok,[{dot,1}],2}, {ok,[{dot,{1,1}}],{2,1}}},
+ {".$", {error,{1,erl_scan,char},1},
+ {error,{{1,2},erl_scan,char},{1,3}}},
+ {".$\\", {error,{1,erl_scan,char},1},
+ {error,{{1,2},erl_scan,char},{1,4}}},
+ {".a", {ok,[{'.',1},{atom,1,a}],1},
+ {ok,[{'.',{1,1}},{atom,{1,2},a}],{1,3}}}
],
- ?line [R = erl_scan:string(S) || {S, R} <- Dot],
+ [begin
+ R = erl_scan:string(S),
+ R2 = erl_scan:string(S, {1,1}, [])
+ end || {S, R, R2} <- Dot],
?line {ok,[{dot,_}=T1],{1,2}} = erl_scan:string(".", {1,1}, text),
?line [{column,1},{length,1},{line,1},{text,"."}] =
@@ -379,55 +401,55 @@ dots() ->
?line {error,{{1,2},erl_scan,char},{1,4}} =
erl_scan:string(".$\\", {1,1}),
- ?line test(". "),
- ?line test(". "),
- ?line test(".\n"),
- ?line test(".\n\n"),
- ?line test(".\n\r"),
- ?line test(".\n\n\n"),
- ?line test(".\210"),
- ?line test(".%\n"),
- ?line test(".a"),
-
- ?line test("%. \n. "),
+ test_string(". ", [{dot,{1,1}}]),
+ test_string(". ", [{dot,{1,1}}]),
+ test_string(".\n", [{dot,{1,1}}]),
+ test_string(".\n\n", [{dot,{1,1}}]),
+ test_string(".\n\r", [{dot,{1,1}}]),
+ test_string(".\n\n\n", [{dot,{1,1}}]),
+ test_string(".\210", [{dot,{1,1}}]),
+ test_string(".%\n", [{dot,{1,1}}]),
+ test_string(".a", [{'.',{1,1}},{atom,{1,2},a}]),
+
+ test_string("%. \n. ", [{dot,{2,1}}]),
?line {more,C} = erl_scan:tokens([], "%. ",{1,1}, return),
- ?line {done,{ok,[{comment,_,"%. "},
- {white_space,_,"\n"},
- {dot,_}],
- {2,3}}, ""} =
+ {done,{ok,[{comment,{1,1},"%. "},
+ {white_space,{1,4},"\n"},
+ {dot,{2,1}}],
+ {2,3}}, ""} =
erl_scan:tokens(C, "\n. ", {1,1}, return), % any loc, any options
?line [test_string(S, R) ||
- {S, R} <- [{".$\n", [{'.',1},{char,1,$\n}]},
- {"$\\\n", [{char,1,$\n}]},
- {"'\\\n'", [{atom,1,'\n'}]},
- {"$\n", [{char,1,$\n}]}] ],
+ {S, R} <- [{".$\n", [{'.',{1,1}},{char,{1,2},$\n}]},
+ {"$\\\n", [{char,{1,1},$\n}]},
+ {"'\\\n'", [{atom,{1,1},'\n'}]},
+ {"$\n", [{char,{1,1},$\n}]}] ],
ok.
chars() ->
[begin
L = lists:flatten(io_lib:format("$\\~.8b", [C])),
- Ts = [{char,1,C}],
+ Ts = [{char,{1,1},C}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255)],
%% Leading zeroes...
[begin
L = lists:flatten(io_lib:format("$\\~3.8.0b", [C])),
- Ts = [{char,1,C}],
+ Ts = [{char,{1,1},C}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255)],
%% $\^\n now increments the line...
[begin
L = "$\\^" ++ [C],
- Ts = [{char,1,C band 2#11111}],
+ Ts = [{char,{1,1},C band 2#11111}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255)],
[begin
L = "$\\" ++ [C],
- Ts = [{char,1,V}],
+ Ts = [{char,{1,1},V}],
?line test_string(L, Ts)
end || {C,V} <- [{$n,$\n}, {$r,$\r}, {$t,$\t}, {$v,$\v},
{$b,$\b}, {$f,$\f}, {$e,$\e}, {$s,$\s},
@@ -440,45 +462,45 @@ chars() ->
No = EC ++ Ds ++ X ++ New,
[begin
L = "$\\" ++ [C],
- Ts = [{char,1,C}],
+ Ts = [{char,{1,1},C}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255) -- No],
[begin
L = "'$\\" ++ [C] ++ "'",
- Ts = [{atom,1,list_to_atom("$"++[C])}],
+ Ts = [{atom,{1,1},list_to_atom("$"++[C])}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255) -- No],
- ?line test_string("\"\\013a\\\n\"", [{string,1,"\va\n"}]),
+ test_string("\"\\013a\\\n\"", [{string,{1,1},"\va\n"}]),
- ?line test_string("'\n'", [{atom,1,'\n'}]),
- ?line test_string("\"\n\a\"", [{string,1,"\na"}]),
+ test_string("'\n'", [{atom,{1,1},'\n'}]),
+ test_string("\"\n\a\"", [{string,{1,1},"\na"}]),
%% No escape
[begin
L = "$" ++ [C],
- Ts = [{char,1,C}],
+ Ts = [{char,{1,1},C}],
?line test_string(L, Ts)
end || C <- lists:seq(0, 255) -- (No ++ [$\\])],
- ?line test_string("$\n", [{char,1,$\n}]),
+ test_string("$\n", [{char,{1,1},$\n}]),
?line {error,{{1,1},erl_scan,char},{1,4}} =
erl_scan:string("$\\^",{1,1}),
- ?line test_string("$\\\n", [{char,1,$\n}]),
+ test_string("$\\\n", [{char,{1,1},$\n}]),
%% Robert's scanner returns line 1:
- ?line test_string("$\\\n", [{char,1,$\n}]),
- ?line test_string("$\n\n", [{char,1,$\n}]),
+ test_string("$\\\n", [{char,{1,1},$\n}]),
+ test_string("$\n\n", [{char,{1,1},$\n}]),
?line test("$\n\n"),
ok.
variables() ->
- ?line test_string(" \237_Aouåeiyäö", [{var,1,'_Aouåeiyäö'}]),
- ?line test_string("A_b_c@", [{var,1,'A_b_c@'}]),
- ?line test_string("V@2", [{var,1,'V@2'}]),
- ?line test_string("ABDÀ", [{var,1,'ABDÀ'}]),
- ?line test_string("Ärlig Östen", [{var,1,'Ärlig'},{var,1,'Östen'}]),
+ test_string(" \237_Aouåeiyäö", [{var,{1,7},'_Aouåeiyäö'}]),
+ test_string("A_b_c@", [{var,{1,1},'A_b_c@'}]),
+ test_string("V@2", [{var,{1,1},'V@2'}]),
+ test_string("ABDÀ", [{var,{1,1},'ABDÀ'}]),
+ test_string("Ärlig Östen", [{var,{1,1},'Ärlig'},{var,{1,7},'Östen'}]),
ok.
eof() ->
@@ -508,11 +530,25 @@ eof() ->
?line {done,{ok,[{atom,1,a}],1},eof} =
erl_scan:tokens(C5,eof,1),
+ %% With column.
+ {more, C6} = erl_scan:tokens([], "a", {1,1}),
+ %% An error before R13A.
+ %% {done,{error,{1,erl_scan,scan},1},eof} =
+ {done,{ok,[{atom,{1,1},a}],{1,2}},eof} =
+ erl_scan:tokens(C6,eof,1),
+
%% A dot followed by eof is special:
?line {more, C} = erl_scan:tokens([], "a.", 1),
?line {done,{ok,[{atom,1,a},{dot,1}],1},eof} = erl_scan:tokens(C,eof,1),
?line {ok,[{atom,1,foo},{dot,1}],1} = erl_scan:string("foo."),
+ %% With column.
+ {more, CCol} = erl_scan:tokens([], "a.", {1,1}),
+ {done,{ok,[{atom,{1,1},a},{dot,{1,2}}],{1,3}},eof} =
+ erl_scan:tokens(CCol,eof,1),
+ {ok,[{atom,{1,1},foo},{dot,{1,4}}],{1,5}} =
+ erl_scan:string("foo.", {1,1}, []),
+
ok.
illegal() ->
@@ -816,34 +852,34 @@ unicode() ->
erl_scan:string([1089]),
?line {error,{{1,1},erl_scan,{illegal,character}},{1,2}} =
erl_scan:string([1089], {1,1}),
- ?line {error,{1,erl_scan,{illegal,atom}},1} =
+ {error,{1,erl_scan,{illegal,atom}},1} =
erl_scan:string("'a"++[1089]++"b'", 1),
- ?line {error,{{1,1},erl_scan,{illegal,atom}},{1,6}} =
+ {error,{{1,1},erl_scan,{illegal,atom}},{1,6}} =
erl_scan:string("'a"++[1089]++"b'", {1,1}),
?line test("\"a"++[1089]++"b\""),
- ?line {ok,[{char,1,1}],1} =
+ {ok,[{char,1,1}],1} =
erl_scan:string([$$,$\\,$^,1089], 1),
- ?line {error,{1,erl_scan,Error},1} =
+ {error,{1,erl_scan,Error},1} =
erl_scan:string("\"qa\x{aaa}", 1),
- ?line "unterminated string starting with \"qa"++[2730]++"\"" =
+ "unterminated string starting with \"qa"++[2730]++"\"" =
erl_scan:format_error(Error),
?line {error,{{1,1},erl_scan,_},{1,11}} =
erl_scan:string("\"qa\\x{aaa}",{1,1}),
- ?line {error,{{1,1},erl_scan,{illegal,atom}},{1,12}} =
+ {error,{{1,1},erl_scan,{illegal,atom}},{1,12}} =
erl_scan:string("'qa\\x{aaa}'",{1,1}),
- ?line {ok,[{char,1,1089}],1} =
+ {ok,[{char,1,1089}],1} =
erl_scan:string([$$,1089], 1),
- ?line {ok,[{char,1,1089}],1} =
+ {ok,[{char,1,1089}],1} =
erl_scan:string([$$,$\\,1089], 1),
Qs = "$\\x{aaa}",
- ?line {ok,[{char,1,$\x{aaa}}],1} =
+ {ok,[{char,1,$\x{aaa}}],1} =
erl_scan:string(Qs, 1),
- ?line {ok,[Q2],{1,9}} =
+ {ok,[Q2],{1,9}} =
erl_scan:string("$\\x{aaa}", {1,1}, [text]),
- ?line [{category,char},{column,1},{length,8},
+ [{category,char},{column,1},{length,8},
{line,1},{symbol,16#aaa},{text,Qs}] =
erl_scan:token_info(Q2),
@@ -1065,8 +1101,8 @@ otp_10302(Config) when is_list(Config) ->
{string,0,"str"} = erl_parse:abstract("str"),
{cons,0,
{integer,0,$a},
- {cons,0,{integer,0,1024},{string,0,"c"}}} =
- erl_parse:abstract("a"++[1024]++"c"),
+ {cons,0,{integer,0,55296},{string,0,"c"}}} =
+ erl_parse:abstract("a"++[55296]++"c"),
Line = 17,
{integer,Line,1} = erl_parse:abstract(1, Line),
@@ -1081,8 +1117,8 @@ otp_10302(Config) when is_list(Config) ->
{string,Line,"str"} = erl_parse:abstract("str", Line),
{cons,Line,
{integer,Line,$a},
- {cons,Line,{integer,Line,1024},{string,Line,"c"}}} =
- erl_parse:abstract("a"++[1024]++"c", Line),
+ {cons,Line,{integer,Line,55296},{string,Line,"c"}}} =
+ erl_parse:abstract("a"++[55296]++"c", Line),
Opts1 = [{line,17}],
{integer,Line,1} = erl_parse:abstract(1, Opts1),
@@ -1097,8 +1133,8 @@ otp_10302(Config) when is_list(Config) ->
{string,Line,"str"} = erl_parse:abstract("str", Opts1),
{cons,Line,
{integer,Line,$a},
- {cons,Line,{integer,Line,1024},{string,Line,"c"}}} =
- erl_parse:abstract("a"++[1024]++"c", Opts1),
+ {cons,Line,{integer,Line,55296},{string,Line,"c"}}} =
+ erl_parse:abstract("a"++[55296]++"c", Opts1),
[begin
{integer,Line,1} = erl_parse:abstract(1, Opts2),
@@ -1145,7 +1181,32 @@ otp_10992(Config) when is_list(Config) ->
erl_parse:abstract([$A,42.0], [{encoding,utf8}]),
ok.
-test_string(String, Expected) ->
+otp_11807(doc) ->
+ "OTP-11807. Generalize erl_parse:abstract/2.";
+otp_11807(suite) ->
+ [];
+otp_11807(Config) when is_list(Config) ->
+ {cons,0,{integer,0,97},{cons,0,{integer,0,98},{nil,0}}} =
+ erl_parse:abstract("ab", [{encoding,none}]),
+ {cons,0,{integer,0,-1},{nil,0}} =
+ erl_parse:abstract([-1], [{encoding,latin1}]),
+ ASCII = fun(I) -> I >= 0 andalso I < 128 end,
+ {string,0,"xyz"} = erl_parse:abstract("xyz", [{encoding,ASCII}]),
+ {cons,0,{integer,0,228},{nil,0}} =
+ erl_parse:abstract([228], [{encoding,ASCII}]),
+ {cons,0,{integer,0,97},{atom,0,a}} =
+ erl_parse:abstract("a"++a, [{encoding,latin1}]),
+ {'EXIT', {{badarg,bad},_}} = % minor backward incompatibility
+ (catch erl_parse:abstract("string", [{encoding,bad}])),
+ ok.
+
+test_string(String, ExpectedWithCol) ->
+ {ok, ExpectedWithCol, _EndWithCol} = erl_scan:string(String, {1, 1}, []),
+ Expected = [ begin
+ {L,_C} = element(2, T),
+ setelement(2, T, L)
+ end
+ || T <- ExpectedWithCol ],
{ok, Expected, _End} = erl_scan:string(String),
test(String).
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 2b29566942..8dc8b2c291 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,7 +33,7 @@
-export([ match1/1, match2/1, match_object/1, match_object2/1]).
-export([ dups/1, misc1/1, safe_fixtable/1, info/1, tab2list/1]).
-export([ tab2file/1, tab2file2/1, tabfile_ext1/1,
- tabfile_ext2/1, tabfile_ext3/1, tabfile_ext4/1]).
+ tabfile_ext2/1, tabfile_ext3/1, tabfile_ext4/1, badfile/1]).
-export([ heavy_lookup/1, heavy_lookup_element/1, heavy_concurrent/1]).
-export([ lookup_element_mult/1]).
-export([]).
@@ -75,6 +75,7 @@
-export([otp_9932/1]).
-export([otp_9423/1]).
-export([otp_10182/1]).
+-export([ets_all/1]).
-export([memory_check_summary/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -151,6 +152,7 @@ all() ->
otp_10182,
otp_9932,
otp_9423,
+ ets_all,
memory_check_summary]. % MUST BE LAST
@@ -171,7 +173,7 @@ groups() ->
[misc1, safe_fixtable, info, dups, tab2list]},
{files, [],
[tab2file, tab2file2, tabfile_ext1,
- tabfile_ext2, tabfile_ext3, tabfile_ext4]},
+ tabfile_ext2, tabfile_ext3, tabfile_ext4, badfile]},
{heavy, [],
[heavy_lookup, heavy_lookup_element, heavy_concurrent]},
{fold, [],
@@ -4202,7 +4204,56 @@ tabfile_ext4(Config) when is_list(Config) ->
file:delete(FName),
ok.
+badfile(suite) ->
+ [];
+badfile(doc) ->
+ ["Tests that no disk_log is left open when file has been corrupted"];
+badfile(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ File = filename:join(PrivDir, "badfile"),
+ _ = file:delete(File),
+ T = ets:new(table, []),
+ true = ets:insert(T, [{a,1},{b,2}]),
+ ok = ets:tab2file(T, File, []),
+ true = ets:delete(T),
+ [H0 | Ts ] = get_all_terms(l, File),
+ H1 = tuple_to_list(H0),
+ H2 = [{K,V} || {K,V} <- H1, K =/= protection],
+ H = list_to_tuple(H2),
+ ok = file:delete(File),
+ write_terms(l, File, [H | Ts]),
+ %% All mandatory keys are no longer members of the header
+ {error, badfile} = ets:file2tab(File),
+ {error, badfile} = ets:tabfile_info(File),
+ file:delete(File),
+ {[],[]} = disk_log:accessible_logs(),
+ ok.
+get_all_terms(Log, File) ->
+ {ok, Log} = disk_log:open([{name,Log},
+ {file, File},
+ {mode, read_only}]),
+ Ts = get_all_terms(Log),
+ ok = disk_log:close(Log),
+ Ts.
+
+get_all_terms(Log) ->
+ get_all_terms1(Log, start, []).
+
+get_all_terms1(Log, Cont, Res) ->
+ case disk_log:chunk(Log, Cont) of
+ {error, _R} ->
+ throw(fel);
+ {Cont2, Terms} ->
+ get_all_terms1(Log, Cont2, Res ++ Terms);
+ eof ->
+ Res
+ end.
+
+write_terms(Log, File, Terms) ->
+ {ok, Log} = disk_log:open([{name,Log},{file, File},{mode,read_write}]),
+ ok = disk_log:log(Log, Terms),
+ ok = disk_log:close(Log).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5516,7 +5567,19 @@ otp_10182(Config) when is_list(Config) ->
ets:delete(Db),
In = Out.
-
+%% Test that ets:all include/exclude tables that we know are created/deleted
+ets_all(Config) when is_list(Config) ->
+ Pids = [spawn_link(fun() -> ets_all_run() end) || _ <- [1,2]],
+ receive after 3*1000 -> ok end,
+ [begin unlink(P), exit(P,kill) end || P <- Pids],
+ ok.
+
+ets_all_run() ->
+ Table = ets:new(undefined, []),
+ true = lists:member(Table, ets:all()),
+ ets:delete(Table),
+ false = lists:member(Table, ets:all()),
+ ets_all_run().
%
diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/expand_test.erl
index 63e4bc3aa0..b9db32c352 100644
--- a/lib/stdlib/test/expand_test.erl
+++ b/lib/stdlib/test/expand_test.erl
@@ -20,7 +20,8 @@
-export([a_fun_name/1,
a_less_fun_name/1,
- b_comes_after_a/1]).
+ b_comes_after_a/1,
+ expand0arity_entirely/0]).
a_fun_name(X) ->
X.
@@ -30,3 +31,6 @@ a_less_fun_name(X) ->
b_comes_after_a(X) ->
X.
+
+expand0arity_entirely () ->
+ ok.
diff --git a/lib/stdlib/test/expand_test1.erl b/lib/stdlib/test/expand_test1.erl
index 11b6fec0f3..1d375e5677 100644
--- a/lib/stdlib/test/expand_test1.erl
+++ b/lib/stdlib/test/expand_test1.erl
@@ -23,7 +23,7 @@
b_comes_after_a/1,
'Quoted_fun_name'/0,
'Quoted_fun_too'/0,
- '#weird-fun-name'/0]).
+ '#weird-fun-name'/1]).
a_fun_name(X) ->
X.
@@ -40,5 +40,5 @@ b_comes_after_a(X) ->
'Quoted_fun_too'() ->
too.
-'#weird-fun-name'() ->
+'#weird-fun-name'(_) ->
weird.
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 4a67d68428..bd313390b3 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,8 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
wildcard_one/1,wildcard_two/1,wildcard_errors/1,
- fold_files/1,otp_5960/1,ensure_dir_eexist/1]).
+ fold_files/1,otp_5960/1,ensure_dir_eexist/1,ensure_dir_symlink/1,
+ wildcard_symlink/1, is_file_symlink/1, file_props_symlink/1]).
-import(lists, [foreach/2]).
@@ -43,7 +44,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[wildcard_one, wildcard_two, wildcard_errors,
- fold_files, otp_5960, ensure_dir_eexist].
+ fold_files, otp_5960, ensure_dir_eexist, ensure_dir_symlink,
+ wildcard_symlink, is_file_symlink, file_props_symlink].
groups() ->
[].
@@ -86,6 +88,7 @@ wildcard_two(Config) when is_list(Config) ->
?line ok = file:make_dir(Dir),
?line do_wildcard_1(Dir, fun(Wc) -> io:format("~p~n",[{Wc,Dir, X = filelib:wildcard(Wc, Dir)}]),X end),
?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/") end),
+ ?line do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/.") end),
case os:type() of
{win32,_} ->
ok;
@@ -366,3 +369,139 @@ ensure_dir_eexist(Config) when is_list(Config) ->
?line {error, eexist} = filelib:ensure_dir(NeedFile),
?line {error, eexist} = filelib:ensure_dir(NeedFileB),
ok.
+
+ensure_dir_symlink(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Dir = filename:join(PrivDir, "ensure_dir_symlink"),
+ Name = filename:join(Dir, "same_name_as_file_and_dir"),
+ ok = filelib:ensure_dir(Name),
+ ok = file:write_file(Name, <<"some string\n">>),
+ %% With a symlink to the directory.
+ Symlink = filename:join(PrivDir, "ensure_dir_symlink_link"),
+ case file:make_symlink(Dir, Symlink) of
+ {error,enotsup} ->
+ {skip,"Symlinks not supported on this platform"};
+ {error,eperm} ->
+ {win32,_} = os:type(),
+ {skip,"Windows user not privileged to create symlinks"};
+ ok ->
+ SymlinkedName = filename:join(Symlink, "same_name_as_file_and_dir"),
+ ok = filelib:ensure_dir(SymlinkedName)
+ end.
+
+wildcard_symlink(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Dir = filename:join(PrivDir, ?MODULE_STRING++"_wildcard_symlink"),
+ SubDir = filename:join(Dir, "sub"),
+ AFile = filename:join(SubDir, "a_file"),
+ Alias = filename:join(Dir, "symlink"),
+ ok = file:make_dir(Dir),
+ ok = file:make_dir(SubDir),
+ ok = file:write_file(AFile, "not that big\n"),
+ case file:make_symlink(AFile, Alias) of
+ {error, enotsup} ->
+ {skip, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skip, "Windows user not privileged to create symlinks"};
+ ok ->
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"))),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"))),
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"),
+ erl_prim_loader)),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"),
+ erl_prim_loader)),
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"),
+ prim_file)),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"),
+ prim_file)),
+ ok = file:delete(AFile),
+ %% The symlink should still be visible even when its target
+ %% has been deleted.
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"))),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"))),
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"),
+ erl_prim_loader)),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"),
+ erl_prim_loader)),
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"),
+ prim_file)),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"),
+ prim_file)),
+ ok
+ end.
+
+basenames(Dir, Files) ->
+ [begin
+ Dir = filename:dirname(F),
+ filename:basename(F)
+ end || F <- Files].
+
+is_file_symlink(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Dir = filename:join(PrivDir, ?MODULE_STRING++"_is_file_symlink"),
+ SubDir = filename:join(Dir, "sub"),
+ AFile = filename:join(SubDir, "a_file"),
+ DirAlias = filename:join(Dir, "dir_symlink"),
+ FileAlias = filename:join(Dir, "file_symlink"),
+ ok = file:make_dir(Dir),
+ ok = file:make_dir(SubDir),
+ ok = file:write_file(AFile, "not that big\n"),
+ case file:make_symlink(SubDir, DirAlias) of
+ {error, enotsup} ->
+ {skip, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skip, "Windows user not privileged to create symlinks"};
+ ok ->
+ true = filelib:is_dir(DirAlias),
+ true = filelib:is_dir(DirAlias, erl_prim_loader),
+ true = filelib:is_dir(DirAlias, prim_file),
+ true = filelib:is_file(DirAlias),
+ true = filelib:is_file(DirAlias, erl_prim_loader),
+ true = filelib:is_file(DirAlias, prim_file),
+ ok = file:make_symlink(AFile,FileAlias),
+ true = filelib:is_file(FileAlias),
+ true = filelib:is_file(FileAlias, erl_prim_loader),
+ true = filelib:is_file(FileAlias, prim_file),
+ true = filelib:is_regular(FileAlias),
+ true = filelib:is_regular(FileAlias, erl_prim_loader),
+ true = filelib:is_regular(FileAlias, prim_file),
+ ok
+ end.
+
+file_props_symlink(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Dir = filename:join(PrivDir, ?MODULE_STRING++"_file_props_symlink"),
+ AFile = filename:join(Dir, "a_file"),
+ Alias = filename:join(Dir, "symlink"),
+ ok = file:make_dir(Dir),
+ ok = file:write_file(AFile, "not that big\n"),
+ case file:make_symlink(AFile, Alias) of
+ {error, enotsup} ->
+ {skip, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skip, "Windows user not privileged to create symlinks"};
+ ok ->
+ {_,_} = LastMod = filelib:last_modified(AFile),
+ LastMod = filelib:last_modified(Alias),
+ LastMod = filelib:last_modified(Alias, erl_prim_loader),
+ LastMod = filelib:last_modified(Alias, prim_file),
+ FileSize = filelib:file_size(AFile),
+ FileSize = filelib:file_size(Alias),
+ FileSize = filelib:file_size(Alias, erl_prim_loader),
+ FileSize = filelib:file_size(Alias, prim_file)
+ end.
diff --git a/lib/stdlib/test/filename_SUITE.erl b/lib/stdlib/test/filename_SUITE.erl
index 232df6a13f..ecd9cff9f9 100644
--- a/lib/stdlib/test/filename_SUITE.erl
+++ b/lib/stdlib/test/filename_SUITE.erl
@@ -96,11 +96,19 @@ absname(Config) when is_list(Config) ->
?line file:set_cwd(Cwd),
ok;
- {unix, _} ->
- ?line ok = file:set_cwd("/usr"),
- ?line "/usr/foo" = filename:absname(foo),
- ?line "/usr/foo" = filename:absname("foo"),
- ?line "/usr/../ebin" = filename:absname("../ebin"),
+ Type ->
+ case Type of
+ {unix, _} ->
+ ?line ok = file:set_cwd("/usr"),
+ ?line "/usr/foo" = filename:absname(foo),
+ ?line "/usr/foo" = filename:absname("foo"),
+ ?line "/usr/../ebin" = filename:absname("../ebin");
+ {ose, _} ->
+ ?line ok = file:set_cwd("/romfs"),
+ ?line "/romfs/foo" = filename:absname(foo),
+ ?line "/romfs/foo" = filename:absname("foo"),
+ ?line "/romfs/../ebin" = filename:absname("../ebin")
+ end,
?line file:set_cwd("/"),
?line "/foo" = filename:absname(foo),
@@ -155,7 +163,7 @@ absname_2(Config) when is_list(Config) ->
?line "a:/erlang" = filename:absname("a:erlang", [Drive|":/"]),
ok;
- {unix, _} ->
+ _ ->
?line "/usr/foo" = filename:absname(foo, "/usr"),
?line "/usr/foo" = filename:absname("foo", "/usr"),
?line "/usr/../ebin" = filename:absname("../ebin", "/usr"),
@@ -189,7 +197,7 @@ basename_1(Config) when is_list(Config) ->
?line "foo" = filename:basename(["usr\\foo\\"]),
?line "foo" = filename:basename("A:\\usr\\foo"),
?line "foo" = filename:basename("A:foo");
- {unix, _} ->
+ _ ->
?line "strange\\but\\true" =
filename:basename("strange\\but\\true")
end,
@@ -219,7 +227,7 @@ basename_2(Config) when is_list(Config) ->
?line "foo.erl" = filename:basename("c:\\usr.hrl\\foo.erl",
".hrl"),
?line "foo" = filename:basename("A:\\usr\\foo", ".hrl");
- {unix, _} ->
+ _ ->
?line "strange\\but\\true" =
filename:basename("strange\\but\\true.erl", ".erl"),
?line "strange\\but\\true" =
@@ -317,7 +325,7 @@ join(Config) when is_list(Config) ->
filename:join(["A:","C:usr","foo.erl"]),
?line "d:/foo" = filename:join([$D, $:, $/, []], "foo"),
ok;
- {unix, _} ->
+ _ ->
ok
end.
@@ -332,7 +340,7 @@ pathtype(Config) when is_list(Config) ->
?line volumerelative = filename:pathtype("/usr/local/bin"),
?line volumerelative = filename:pathtype("A:usr/local/bin"),
ok;
- {unix, _} ->
+ _ ->
?line absolute = filename:pathtype("/"),
?line absolute = filename:pathtype("/usr/local/bin"),
ok
@@ -450,10 +458,17 @@ absname_bin(Config) when is_list(Config) ->
?line file:set_cwd(Cwd),
ok;
- {unix, _} ->
- ?line ok = file:set_cwd(<<"/usr">>),
- ?line <<"/usr/foo">> = filename:absname(<<"foo">>),
- ?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>),
+ Type ->
+ case Type of
+ {unix,_} ->
+ ?line ok = file:set_cwd(<<"/usr">>),
+ ?line <<"/usr/foo">> = filename:absname(<<"foo">>),
+ ?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>);
+ {ose,_} ->
+ ?line ok = file:set_cwd(<<"/romfs">>),
+ ?line <<"/romfs/foo">> = filename:absname(<<"foo">>),
+ ?line <<"/romfs/../ebin">> = filename:absname(<<"../ebin">>)
+ end,
?line file:set_cwd(<<"/">>),
?line <<"/foo">> = filename:absname(<<"foo">>),
@@ -503,7 +518,7 @@ absname_bin_2(Config) when is_list(Config) ->
?line <<"a:/erlang">> = filename:absname(<<"a:erlang">>, <<Drive:8,":/">>),
ok;
- {unix, _} ->
+ _ ->
?line <<"/usr/foo">> = filename:absname(<<"foo">>, <<"/usr">>),
?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>, <<"/usr">>),
@@ -527,7 +542,7 @@ basename_bin_1(Config) when is_list(Config) ->
{win32, _} ->
?line <<"foo">> = filename:basename(<<"A:\\usr\\foo">>),
?line <<"foo">> = filename:basename(<<"A:foo">>);
- {unix, _} ->
+ _ ->
?line <<"strange\\but\\true">> =
filename:basename(<<"strange\\but\\true">>)
end,
@@ -551,7 +566,7 @@ basename_bin_2(Config) when is_list(Config) ->
?line <<"foo.erl">> = filename:basename(<<"c:\\usr.hrl\\foo.erl">>,
<<".hrl">>),
?line <<"foo">> = filename:basename(<<"A:\\usr\\foo">>, <<".hrl">>);
- {unix, _} ->
+ _ ->
?line <<"strange\\but\\true">> =
filename:basename(<<"strange\\but\\true.erl">>, <<".erl">>),
?line <<"strange\\but\\true">> =
@@ -639,7 +654,7 @@ join_bin(Config) when is_list(Config) ->
filename:join([<<"A:">>,<<"C:usr">>,<<"foo.erl">>]),
?line <<"d:/foo">> = filename:join([$D, $:, $/, []], <<"foo">>),
ok;
- {unix, _} ->
+ _ ->
ok
end.
@@ -653,7 +668,7 @@ pathtype_bin(Config) when is_list(Config) ->
volumerelative = filename:pathtype(<<"/usr/local/bin">>),
volumerelative = filename:pathtype(<<"A:usr/local/bin">>),
ok;
- {unix, _} ->
+ _ ->
absolute = filename:pathtype(<<"/">>),
absolute = filename:pathtype(<<"/usr/local/bin">>),
ok
diff --git a/lib/stdlib/test/gen_event_SUITE.erl b/lib/stdlib/test/gen_event_SUITE.erl
index 5819ef3890..60a1ba8c60 100644
--- a/lib/stdlib/test/gen_event_SUITE.erl
+++ b/lib/stdlib/test/gen_event_SUITE.erl
@@ -974,6 +974,10 @@ get_state(Config) when is_list(Config) ->
[{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result1),
Result2 = sys:get_state(Pid, 5000),
[{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result2),
+ ok = sys:suspend(Pid),
+ Result3 = sys:get_state(Pid),
+ [{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result3),
+ ok = sys:resume(Pid),
ok = gen_event:stop(Pid),
ok.
@@ -998,4 +1002,11 @@ replace_state(Config) when is_list(Config) ->
Replace3 = fun(_) -> exit(fail) end,
[{dummy1_h,false,NState2}] = sys:replace_state(Pid, Replace3),
[{dummy1_h,false,NState2}] = sys:get_state(Pid),
+ %% verify state replaced if process sys suspended
+ NState3 = "replaced again and again",
+ Replace4 = fun({dummy1_h,false,_}=S) -> setelement(3,S,NState3) end,
+ ok = sys:suspend(Pid),
+ [{dummy1_h,false,NState3}] = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ [{dummy1_h,false,NState3}] = sys:get_state(Pid),
ok.
diff --git a/lib/stdlib/test/gen_fsm_SUITE.erl b/lib/stdlib/test/gen_fsm_SUITE.erl
index fd15838b7d..39f0442824 100644
--- a/lib/stdlib/test/gen_fsm_SUITE.erl
+++ b/lib/stdlib/test/gen_fsm_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,7 +31,9 @@
-export([shutdown/1]).
--export([ sys1/1, call_format_status/1, error_format_status/1, get_state/1, replace_state/1]).
+-export([ sys1/1,
+ call_format_status/1, error_format_status/1, terminate_crash_format/1,
+ get_state/1, replace_state/1]).
-export([hibernate/1,hiber_idle/3,hiber_wakeup/3,hiber_idle/2,hiber_wakeup/2]).
@@ -66,7 +68,8 @@ groups() ->
start8, start9, start10, start11, start12]},
{abnormal, [], [abnormal1, abnormal2]},
{sys, [],
- [sys1, call_format_status, error_format_status, get_state, replace_state]}].
+ [sys1, call_format_status, error_format_status, terminate_crash_format,
+ get_state, replace_state]}].
init_per_suite(Config) ->
Config.
@@ -403,7 +406,7 @@ error_format_status(Config) when is_list(Config) ->
receive
{error,_GroupLeader,{Pid,
"** State machine"++_,
- [Pid,{_,_,badreturn},idle,StateData,_]}} ->
+ [Pid,{_,_,badreturn},idle,{formatted,StateData},_]}} ->
ok;
Other ->
?line io:format("Unexpected: ~p", [Other]),
@@ -413,6 +416,29 @@ error_format_status(Config) when is_list(Config) ->
process_flag(trap_exit, OldFl),
ok.
+terminate_crash_format(Config) when is_list(Config) ->
+ error_logger_forwarder:register(),
+ OldFl = process_flag(trap_exit, true),
+ StateData = crash_terminate,
+ {ok, Pid} = gen_fsm:start(gen_fsm_SUITE, {state_data, StateData}, []),
+ stop_it(Pid),
+ receive
+ {error,_GroupLeader,{Pid,
+ "** State machine"++_,
+ [Pid,{_,_,_},idle,{formatted, StateData},_]}} ->
+ ok;
+ Other ->
+ io:format("Unexpected: ~p", [Other]),
+ ?t:fail()
+ after 5000 ->
+ io:format("Timeout: expected error logger msg", []),
+ ?t:fail()
+ end,
+ _ = ?t:messages_get(),
+ process_flag(trap_exit, OldFl),
+ ok.
+
+
get_state(Config) when is_list(Config) ->
State = self(),
{ok, Pid} = gen_fsm:start(?MODULE, {state_data, State}, []),
@@ -426,6 +452,14 @@ get_state(Config) when is_list(Config) ->
{idle, State} = sys:get_state(gfsm),
{idle, State} = sys:get_state(gfsm, 5000),
stop_it(Pid2),
+
+ %% check that get_state works when pid is sys suspended
+ {ok, Pid3} = gen_fsm:start(gen_fsm_SUITE, {state_data, State}, []),
+ {idle, State} = sys:get_state(Pid3),
+ ok = sys:suspend(Pid3),
+ {idle, State} = sys:get_state(Pid3, 5000),
+ ok = sys:resume(Pid3),
+ stop_it(Pid3),
ok.
replace_state(Config) when is_list(Config) ->
@@ -442,8 +476,18 @@ replace_state(Config) when is_list(Config) ->
{state0, NState2} = sys:get_state(Pid),
%% verify no change in state if replace function crashes
Replace3 = fun(_) -> error(fail) end,
- {state0, NState2} = sys:replace_state(Pid, Replace3),
+ {'EXIT',{{callback_failed,
+ {gen_fsm,system_replace_state},{error,fail}},_}} =
+ (catch sys:replace_state(Pid, Replace3)),
{state0, NState2} = sys:get_state(Pid),
+ %% verify state replaced if process sys suspended
+ ok = sys:suspend(Pid),
+ Suffix2 = " and again",
+ NState3 = NState2 ++ Suffix2,
+ Replace4 = fun({StateName, _}) -> {StateName, NState3} end,
+ {state0, NState3} = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ {state0, NState3} = sys:get_state(Pid, 5000),
stop_it(Pid),
ok.
@@ -849,7 +893,8 @@ init({state_data, StateData}) ->
init(_) ->
{ok, idle, state_data}.
-
+terminate(_, _State, crash_terminate) ->
+ exit({crash, terminate});
terminate({From, stopped}, State, _Data) ->
From ! {self(), {stopped, State}},
ok;
@@ -987,6 +1032,6 @@ handle_sync_event({get, _Pid}, _From, State, Data) ->
{reply, {state, State, Data}, State, Data}.
format_status(terminate, [_Pdict, StateData]) ->
- StateData;
+ {formatted, StateData};
format_status(normal, [_Pdict, _StateData]) ->
[format_status_called].
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index a360a0809b..0f03fda30a 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,7 +32,8 @@
spec_init_local_registered_parent/1,
spec_init_global_registered_parent/1,
otp_5854/1, hibernate/1, otp_7669/1, call_format_status/1,
- error_format_status/1, get_state/1, replace_state/1, call_with_huge_message_queue/1
+ error_format_status/1, terminate_crash_format/1,
+ get_state/1, replace_state/1, call_with_huge_message_queue/1
]).
% spawn export
@@ -56,7 +57,8 @@ all() ->
call_remote_n3, spec_init,
spec_init_local_registered_parent,
spec_init_global_registered_parent, otp_5854, hibernate,
- otp_7669, call_format_status, error_format_status,
+ otp_7669,
+ call_format_status, error_format_status, terminate_crash_format,
get_state, replace_state,
call_with_huge_message_queue].
@@ -273,7 +275,9 @@ crash(Config) when is_list(Config) ->
receive
{error,_GroupLeader4,{Pid4,
"** Generic server"++_,
- [Pid4,crash,state4,crashed]}} ->
+ [Pid4,crash,{formatted, state4},
+ {crashed,[{?MODULE,handle_call,3,_}
+ |_Stacktrace]}]}} ->
ok;
Other4a ->
?line io:format("Unexpected: ~p", [Other4a]),
@@ -1024,7 +1028,9 @@ error_format_status(Config) when is_list(Config) ->
receive
{error,_GroupLeader,{Pid,
"** Generic server"++_,
- [Pid,crash,State,crashed]}} ->
+ [Pid,crash,{formatted, State},
+ {crashed,[{?MODULE,handle_call,3,_}
+ |_Stacktrace]}]}} ->
ok;
Other ->
?line io:format("Unexpected: ~p", [Other]),
@@ -1034,6 +1040,33 @@ error_format_status(Config) when is_list(Config) ->
process_flag(trap_exit, OldFl),
ok.
+%% Verify that error when terminating correctly calls our format_status/2 fun
+%%
+terminate_crash_format(Config) when is_list(Config) ->
+ error_logger_forwarder:register(),
+ OldFl = process_flag(trap_exit, true),
+ State = crash_terminate,
+ {ok, Pid} = gen_server:start_link(?MODULE, {state, State}, []),
+ gen_server:call(Pid, stop),
+ receive {'EXIT', Pid, {crash, terminate}} -> ok end,
+ receive
+ {error,_GroupLeader,{Pid,
+ "** Generic server"++_,
+ [Pid,stop, {formatted, State},
+ {{crash, terminate},[{?MODULE,terminate,2,_}
+ |_Stacktrace]}]}} ->
+ ok;
+ Other ->
+ io:format("Unexpected: ~p", [Other]),
+ ?t:fail()
+ after 5000 ->
+ io:format("Timeout: expected error logger msg", []),
+ ?t:fail()
+ end,
+ ?t:messages_get(),
+ process_flag(trap_exit, OldFl),
+ ok.
+
%% Verify that sys:get_state correctly returns gen_server state
%%
get_state(suite) ->
@@ -1049,6 +1082,9 @@ get_state(Config) when is_list(Config) ->
{ok, Pid} = gen_server:start_link(?MODULE, {state,State}, []),
State = sys:get_state(Pid),
State = sys:get_state(Pid, 5000),
+ ok = sys:suspend(Pid),
+ State = sys:get_state(Pid),
+ ok = sys:resume(Pid),
ok.
%% Verify that sys:replace_state correctly replaces gen_server state
@@ -1075,8 +1111,18 @@ replace_state(Config) when is_list(Config) ->
NState2 = sys:get_state(Pid, 5000),
%% verify no change in state if replace function crashes
Replace3 = fun(_) -> throw(fail) end,
- NState2 = sys:replace_state(Pid, Replace3),
+ {'EXIT',{{callback_failed,
+ {gen_server,system_replace_state},{throw,fail}},_}} =
+ (catch sys:replace_state(Pid, Replace3)),
NState2 = sys:get_state(Pid, 5000),
+ %% verify state replaced if process sys suspended
+ ok = sys:suspend(Pid),
+ Suffix2 = " and again",
+ NState3 = NState2 ++ Suffix2,
+ Replace4 = fun(S) -> S ++ Suffix2 end,
+ NState3 = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ NState3 = sys:get_state(Pid, 5000),
ok.
%% Test that the time for a huge message queue is not
@@ -1310,10 +1356,12 @@ terminate({From, stopped}, _State) ->
terminate({From, stopped_info}, _State) ->
From ! {self(), stopped_info},
ok;
+terminate(_, crash_terminate) ->
+ exit({crash, terminate});
terminate(_Reason, _State) ->
ok.
format_status(terminate, [_PDict, State]) ->
- State;
+ {formatted, State};
format_status(normal, [_PDict, _State]) ->
format_status_called.
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index 9f828c6d2d..2203dd8f51 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -31,7 +30,8 @@
io_fread_newlines/1, otp_8989/1, io_lib_fread_literal/1,
printable_range/1,
io_lib_print_binary_depth_one/1, otp_10302/1, otp_10755/1,
- otp_10836/1]).
+ otp_10836/1, io_lib_width_too_small/1,
+ io_with_huge_message_queue/1]).
-export([pretty/2]).
@@ -70,7 +70,8 @@ all() ->
io_lib_collect_line_3_wb, cr_whitespace_in_string,
io_fread_newlines, otp_8989, io_lib_fread_literal,
printable_range,
- io_lib_print_binary_depth_one, otp_10302, otp_10755, otp_10836].
+ io_lib_print_binary_depth_one, otp_10302, otp_10755, otp_10836,
+ io_lib_width_too_small, io_with_huge_message_queue].
groups() ->
[].
@@ -2214,3 +2215,49 @@ compile_file(File, Text, Config) ->
try compile:file(Fname, [return])
after ok %file:delete(Fname)
end.
+
+io_lib_width_too_small(Config) ->
+ "**" = lists:flatten(io_lib:format("~2.3w", [3.14])),
+ "**" = lists:flatten(io_lib:format("~2.5w", [3.14])),
+ ok.
+
+%% Test that the time for a huge message queue is not
+%% significantly slower than with an empty message queue.
+io_with_huge_message_queue(Config) when is_list(Config) ->
+ case test_server:is_native(gen) of
+ true ->
+ {skip,
+ "gen is native - huge message queue optimization "
+ "is not implemented"};
+ false ->
+ do_io_with_huge_message_queue(Config)
+ end.
+
+do_io_with_huge_message_queue(Config) ->
+ PrivDir = ?privdir(Config),
+ File = filename:join(PrivDir, "slask"),
+ {ok, F1} = file:open(File, [write]),
+
+ {Time,ok} = timer:tc(fun() -> writes(1000, F1) end),
+
+ [self() ! {msg,N} || N <- lists:seq(1, 500000)],
+ erlang:garbage_collect(),
+ {NewTime,ok} = timer:tc(fun() -> writes(1000, F1) end),
+ file:close(F1),
+ io:format("Time for empty message queue: ~p", [Time]),
+ io:format("Time for huge message queue: ~p", [NewTime]),
+
+ IsCover = test_server:is_cover(),
+ case (NewTime+1) / (Time+1) of
+ Q when Q < 10; IsCover ->
+ ok;
+ Q ->
+ io:format("Q = ~p", [Q]),
+ ?t:fail()
+ end,
+ ok.
+
+writes(0, _) -> ok;
+writes(N, F1) ->
+ file:write(F1, "hello\n"),
+ writes(N - 1, F1).
diff --git a/lib/stdlib/test/lists_SUITE.erl b/lib/stdlib/test/lists_SUITE.erl
index 92253ef5b9..f4589a8e24 100644
--- a/lib/stdlib/test/lists_SUITE.erl
+++ b/lib/stdlib/test/lists_SUITE.erl
@@ -61,7 +61,7 @@
zip_unzip/1, zip_unzip3/1, zipwith/1, zipwith3/1,
filter_partition/1,
otp_5939/1, otp_6023/1, otp_6606/1, otp_7230/1,
- suffix/1, subtract/1]).
+ suffix/1, subtract/1, droplast/1]).
%% Sort randomized lists until stopped.
%%
@@ -2641,4 +2641,12 @@ sub_non_matching(A, B) ->
sub(A, B) ->
Res = A -- B,
Res = lists:subtract(A, B).
-
+
+%% Test lists:droplast/1
+droplast(Config) when is_list(Config) ->
+ ?line [] = lists:droplast([x]),
+ ?line [x] = lists:droplast([x, y]),
+ ?line {'EXIT', {function_clause, _}} = (catch lists:droplast([])),
+ ?line {'EXIT', {function_clause, _}} = (catch lists:droplast(x)),
+
+ ok.
diff --git a/lib/stdlib/test/maps_SUITE.erl b/lib/stdlib/test/maps_SUITE.erl
new file mode 100644
index 0000000000..dda20a615b
--- /dev/null
+++ b/lib/stdlib/test/maps_SUITE.erl
@@ -0,0 +1,80 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%%----------------------------------------------------------------
+%%% Purpose: Test suite for the 'maps' module.
+%%%-----------------------------------------------------------------
+
+-module(maps_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+
+-define(default_timeout, ?t:minutes(1)).
+
+% Test server specific exports
+-export([all/0]).
+-export([suite/0]).
+-export([init_per_suite/1]).
+-export([end_per_suite/1]).
+-export([init_per_testcase/2]).
+-export([end_per_testcase/2]).
+
+-export([t_get_3/1,t_with_2/1,t_without_2/1]).
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [t_get_3,t_with_2,t_without_2].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_testcase(_Case, Config) ->
+ Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+t_get_3(Config) when is_list(Config) ->
+ Map = #{ key1 => value1, key2 => value2 },
+ DefaultValue = "Default value",
+ value1 = maps:get(key1, Map, DefaultValue),
+ value2 = maps:get(key2, Map, DefaultValue),
+ DefaultValue = maps:get(key3, Map, DefaultValue),
+ ok.
+
+t_without_2(_Config) ->
+ Ki = [11,22,33,44,55,66,77,88,99],
+ M0 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100)]),
+ M1 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100) -- Ki]),
+ M1 = maps:without([{k,I}||I <- Ki],M0),
+ ok.
+
+t_with_2(_Config) ->
+ Ki = [11,22,33,44,55,66,77,88,99],
+ M0 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100)]),
+ M1 = maps:from_list([{{k,I},{v,I}}||I<-Ki]),
+ M1 = maps:with([{k,I}||I <- Ki],M0),
+ ok.
diff --git a/lib/stdlib/test/ms_transform_SUITE.erl b/lib/stdlib/test/ms_transform_SUITE.erl
index a17307b07b..1577caa80f 100644
--- a/lib/stdlib/test/ms_transform_SUITE.erl
+++ b/lib/stdlib/test/ms_transform_SUITE.erl
@@ -40,6 +40,7 @@
-export([action_function/1]).
-export([warnings/1]).
-export([no_warnings/1]).
+-export([eep37/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
init_per_testcase(_Func, Config) ->
@@ -57,7 +58,7 @@ all() ->
record_index, multipass, bitsyntax, record_defaults,
andalso_orelse, float_1_function, action_function,
warnings, no_warnings, top_match, old_guards, autoimported,
- semicolon].
+ semicolon, eep37].
groups() ->
[].
@@ -90,21 +91,23 @@ warnings(Config) when is_list(Config) ->
" end)">>,
?line [{_,[{_,ms_transform,{?WARN_NUMBER_SHADOW,'A'}}]}] =
compile_ww(Prog),
- Prog2 = <<"C=5, "
- "ets:fun2ms(fun({A,B} = C) "
- " when is_integer(A) and (A+5 > B) -> "
- " {A andalso B,C} "
- " end)">>,
- ?line [{_,[{_,ms_transform,{?WARN_NUMBER_SHADOW,'C'}}]}] =
+ Prog2 = <<"C = 5,
+ ets:fun2ms(fun ({A,B} =
+ C) when is_integer(A) and (A+5 > B) ->
+ {A andalso B,C}
+ end)">>,
+ [{_,[{3,ms_transform,{?WARN_NUMBER_SHADOW,'C'}}]}] =
compile_ww(Prog2),
Rec3 = <<"-record(a,{a,b,c,d=foppa}).">>,
- Prog3 = <<"A=3,C=5, "
- "ets:fun2ms(fun(#a{a = A, b = B} = C) "
- " when is_integer(A) and (A+5 > B) -> "
- " {A andalso B,C} "
- " end)">>,
- ?line [{_,[{_,ms_transform,{?WARN_NUMBER_SHADOW,'A'}},
- {_,ms_transform,{?WARN_NUMBER_SHADOW,'C'}}]}] =
+ Prog3 = <<"A = 3,
+ C = 5,
+ ets:fun2ms(fun (C
+ = #a{a = A, b = B})
+ when is_integer(A) and (A+5 > B) ->
+ {A andalso B,C}
+ end)">>,
+ [{_,[{3,ms_transform,{?WARN_NUMBER_SHADOW,'C'}},
+ {4,ms_transform,{?WARN_NUMBER_SHADOW,'A'}}]}] =
compile_ww(Rec3,Prog3),
Rec4 = <<"-record(a,{a,b,c,d=foppa}).">>,
Prog4 = <<"A=3,C=5, "
@@ -806,6 +809,14 @@ action_function(Config) when is_list(Config) ->
ok.
+eep37(Config) when is_list(Config) ->
+ setup(Config),
+ [{'$1',[],['$1']}] =
+ compile_and_run(<<"F = fun _Ms() ->\n"
+ " ets:fun2ms(fun (X) -> X end)\n"
+ " end,\n"
+ "F()">>).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -858,6 +869,7 @@ compile_ww(Records,Expr) ->
"-include_lib(\"stdlib/include/ms_transform.hrl\").\n",
"-export([tmp/0]).\n",
Records/binary,"\n",
+ "-file(?FILE, 0). ",
"tmp() ->\n",
Expr/binary,".\n">>,
FN=temp_name(),
diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl
index a9ea78a58b..37fbb5267b 100644
--- a/lib/stdlib/test/qlc_SUITE.erl
+++ b/lib/stdlib/test/qlc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -72,11 +72,13 @@
otp_5644/1, otp_5195/1, otp_6038_bug/1, otp_6359/1, otp_6562/1,
otp_6590/1, otp_6673/1, otp_6964/1, otp_7114/1, otp_7238/1,
- otp_7232/1, otp_7552/1, otp_6674/1, otp_7714/1,
+ otp_7232/1, otp_7552/1, otp_6674/1, otp_7714/1, otp_11758/1,
manpage/1,
- backward/1, forward/1]).
+ backward/1, forward/1,
+
+ eep37/1]).
%% Internal exports.
-export([bad_table_throw/1, bad_table_exit/1, default_table/1, bad_table/1,
@@ -132,7 +134,7 @@ groups() ->
evaluator, string_to_handle, table, process_dies, sort,
keysort, filesort, cache, cache_list, filter, info,
nested_info, lookup1, lookup2, lookup_rec, indices,
- pre_fun, skip_filters]},
+ pre_fun, skip_filters, eep37]},
{table_impls, [], [ets, dets]},
{join, [],
[join_option, join_filter, join_lookup, join_merge,
@@ -140,7 +142,7 @@ groups() ->
{tickets, [],
[otp_5644, otp_5195, otp_6038_bug, otp_6359, otp_6562,
otp_6590, otp_6673, otp_6964, otp_7114, otp_7232,
- otp_7238, otp_7552, otp_6674, otp_7714]},
+ otp_7238, otp_7552, otp_6674, otp_7714, otp_11758]},
{compat, [], [backward, forward]}].
init_per_suite(Config) ->
@@ -2544,7 +2546,7 @@ info(Config) when is_list(Config) ->
ets:delete(E)">>,
<<"Q1 = qlc:q([W || W <- [a,b]]),
- Q2 = qlc:q([Z || Z <- qlc:sort([1,2,300])], unique),
+ Q2 = qlc:q([Z || Z <- qlc:sort([55296,56296,57296])], unique),
Q3 = qlc:q([{X,Y} || X <- qlc:keysort([2], [{1,a}]),
Y <- qlc:append([Q1, Q2]),
X > Y]),
@@ -2552,7 +2554,7 @@ info(Config) when is_list(Config) ->
[{generate, P1, {list, [{1,a}]}},
{generate, P2, {append, [{list, [a,b]},
{qlc, T2, [{generate, P3,
- {sort, {list,[1,2,300]},[]}}],
+ {sort, {list,[55296,56296,57296]},[]}}],
[{cache,ets},{unique,true}]}]}},F],
[]} = i(Q3, cache_all),
{tuple, _, [{var,_,'X'}, {var,_,'Y'}]} = binary_to_term(T1),
@@ -2562,7 +2564,7 @@ info(Config) when is_list(Config) ->
{var, _, 'Z'} = binary_to_term(T2),
{op, _, '>', {var, _, 'X'}, {var, _, 'Y'}} = binary_to_term(F),
true = binary_to_list(<<
- \"beginV1=qlc:q([Z||Z<-qlc:sort([1,2,300],[])],[{unique,true}]),\"
+ \"beginV1=qlc:q([Z||Z<-qlc:sort([55296,56296,57296],[])],[{unique,true}]),\"
\"qlc:q([{X,Y}||X<-[{1,a}],Y<-qlc:append([[a,b],V1]),X>Y])end\"
>>) == format_info(Q3, true)">>,
@@ -6607,12 +6609,12 @@ otp_7232(Config) when is_list(Config) ->
{nil,_}]} =
qlc:info(qlc:sort(L),{format,abstract_code})">>,
- <<"Q1 = qlc:q([X || X <- [1000,2000]]),
+ <<"Q1 = qlc:q([X || X <- [55296,56296]]),
Q = qlc:sort(Q1, {order, fun(A,B)-> A>B end}),
- \"qlc:sort([1000,2000],[{order,fun'-function/0-fun-2-'/2}])\" =
+ \"qlc:sort([55296,56296],[{order,fun'-function/0-fun-2-'/2}])\" =
format_info(Q, true),
AC = qlc:info(Q, {format, abstract_code}),
- \"qlc:sort([1000,2000], [{order,fun '-function/0-fun-2-'/2}])\" =
+ \"qlc:sort([55296,56296], [{order,fun '-function/0-fun-2-'/2}])\" =
binary_to_list(iolist_to_binary(erl_pp:expr(AC)))">>,
%% OTP-7234. erl_parse:abstract() handles bit strings
@@ -6668,6 +6670,19 @@ otp_7714(Config) when is_list(Config) ->
ets:delete(E2)">>],
?line run(Config, Ts).
+otp_11758(doc) ->
+ "OTP-11758. Bug.";
+otp_11758(suite) -> [];
+otp_11758(Config) when is_list(Config) ->
+ Ts = [<<"T = ets:new(r, [{keypos, 2}]),
+ L = [{rrr, xxx, aaa}, {rrr, yyy, bbb}],
+ true = ets:insert(T, L),
+ QH = qlc:q([{rrr, B, C} || {rrr, B, C} <- ets:table(T),
+ (B =:= xxx) or (B =:= yyy) and (C =:= aaa)]),
+ [{rrr,xxx,aaa}] = qlc:e(QH),
+ ets:delete(T)">>],
+ run(Config, Ts).
+
otp_6674(doc) ->
"OTP-6674. match/comparison.";
otp_6674(suite) -> [];
@@ -7427,6 +7442,14 @@ forward(Config) when is_list(Config) ->
?line run(Config, Ts),
ok.
+eep37(Config) when is_list(Config) ->
+ Ts = [
+ <<"H = (fun _Handle() -> qlc:q([X || X <- []]) end)(),
+ [] = qlc:eval(H)">>
+ ],
+ run(Config, Ts),
+ ok.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bad_table_throw(Tab) ->
diff --git a/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl b/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl
index a631b9dbcf..56c998f761 100644
--- a/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl
+++ b/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl
index 500f5fadb9..87763cbf92 100644
--- a/lib/stdlib/test/re_SUITE.erl
+++ b/lib/stdlib/test/re_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +24,10 @@
global_capture/1,replace_input_types/1,replace_return/1,
split_autogen/1,split_options/1,split_specials/1,
error_handling/1,pcre_cve_2008_2371/1,
- pcre_compile_workspace_overflow/1,re_infinite_loop/1]).
+ pcre_compile_workspace_overflow/1,re_infinite_loop/1,
+ re_backwards_accented/1,opt_dupnames/1,opt_all_names/1,inspect/1,
+ opt_no_start_optimize/1,opt_never_utf/1,opt_ucp/1,
+ match_limit/1,sub_binaries/1]).
-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
@@ -37,7 +39,10 @@ all() ->
replace_autogen, global_capture, replace_input_types,
replace_return, split_autogen, split_options,
split_specials, error_handling, pcre_cve_2008_2371,
- pcre_compile_workspace_overflow, re_infinite_loop].
+ pcre_compile_workspace_overflow, re_infinite_loop,
+ re_backwards_accented, opt_dupnames, opt_all_names,
+ inspect, opt_no_start_optimize,opt_never_utf,opt_ucp,
+ match_limit, sub_binaries].
groups() ->
[].
@@ -469,115 +474,152 @@ error_handling() ->
% The malformed precomiled RE is detected after
% the trap to re:grun from grun, in the grun function clause
% that handles precompiled expressions
- ?line {'EXIT',{badarg,[{re,run,["apa",{1,2,3,4},[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,run,["apa",{1,2,3,4},[global]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:run("apa",{1,2,3,4},[global])),
% An invalid capture list will also cause a badarg late,
% but with a non pre compiled RE, the exception should be thrown by the
% grun function clause that handles RE's compiled implicitly by
% the run/3 BIF before trapping.
- ?line {'EXIT',{badarg,[{re,run,["apa","p",[{capture,[1,{a}]},global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,run,["apa","p",[{capture,[1,{a}]},global]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:run("apa","p",[{capture,[1,{a}]},global])),
% And so the case of a precompiled expression together with
% a compile-option (binary and list subject):
- ?line {ok,RE} = re:compile("(p)"),
- ?line {match,[[{1,1},{1,1}]]} = re:run(<<"apa">>,RE,[global]),
- ?line {match,[[{1,1},{1,1}]]} = re:run("apa",RE,[global]),
- ?line {'EXIT',{badarg,[{re,run,
- [<<"apa">>,
- {re_pattern,1,0,_},
- [global,unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {ok,RE} = re:compile("(p)"),
+ {match,[[{1,1},{1,1}]]} = re:run(<<"apa">>,RE,[global]),
+ {match,[[{1,1},{1,1}]]} = re:run("apa",RE,[global]),
+ {'EXIT',{badarg,[{re,run,
+ [<<"apa">>,
+ {re_pattern,1,0,_,_},
+ [global,unicode]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:run(<<"apa">>,RE,[global,unicode])),
- ?line {'EXIT',{badarg,[{re,run,
- ["apa",
- {re_pattern,1,0,_},
- [global,unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,run,
+ ["apa",
+ {re_pattern,1,0,_,_},
+ [global,unicode]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:run("apa",RE,[global,unicode])),
- ?line {'EXIT',{badarg,_}} = (catch re:run("apa","(p",[])),
- ?line {'EXIT',{badarg,_}} = (catch re:run("apa","(p",[global])),
+ {'EXIT',{badarg,_}} = (catch re:run("apa","(p",[])),
+ {error, {compile, {_,_}}} = re:run("apa","(p",[report_errors]),
+ {'EXIT',{badarg,_}} = (catch re:run("apa","(p",[global])),
+ {error, {compile, {_,_}}} = re:run("apa","(p",[report_errors,global]),
+ % Badly formed options
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,["global"])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{offset,-1}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{offset,ett}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{captore,[1,2],binary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{capture,[1,2],binary,list}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{capture,[1,2],bunary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{capture,{1,2},binary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{newline,3}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{newline,apa}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{njuline,cr}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{<<"newline">>,cr}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[global|dupnames])),
+ {'EXIT',{badarg,_}} = (catch re:run([<<"ap">>|$a],RE,[])), % Not an IO-list
+ {'EXIT',{badarg,_}} = (catch re:compile([<<"ap">>|$a],[])), % Not an IO-list
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,[{capture,[0|1],binary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,
+ [{capture,[<<"apa">>|1],binary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,RE,
+ [{capture,[[<<"ap">>|$a]],binary}])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,[<<"(p">>|41],[])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,{re_pattern,3,0,0,[]},[])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,{re_pattern,3,0,0,<<"apa">>},[])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa">>,{re_pattern,3,0,0,<<"apa",3:2>>},[])),
+ {'EXIT',{badarg,_}} = (catch re:run(<<"apa",2:2>>,<<"(p)">>,[{capture,[0,1],binary}])),
+ <<_:4,Temp:3/binary,_:4>> = <<38,23,6,18>>,
+ {match,[{1,1},{1,1}]} = re:run(Temp,<<"(p)">>,[]), % Unaligned works
% The replace errors:
- ?line {'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:replace("apa",{1,2,3,4},"X",[])),
- ?line {'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[global]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:replace("apa",{1,2,3,4},"X",[global])),
- ?line {'EXIT',{badarg,[{re,replace,
- ["apa",
- {re_pattern,1,0,_},
- "X",
- [unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,replace,
+ ["apa",
+ {re_pattern,1,0,_,_},
+ "X",
+ [unicode]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:replace("apa",RE,"X",[unicode])),
- ?line <<"aXa">> = iolist_to_binary(re:replace("apa","p","X",[])),
- ?line {'EXIT',{badarg,[{re,replace,
- ["apa","p","X",[{capture,all,binary}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ <<"aXa">> = iolist_to_binary(re:replace("apa","p","X",[])),
+ {'EXIT',{badarg,[{re,replace,
+ ["apa","p","X",[report_errors]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
- [{capture,all,binary}]))),
- ?line {'EXIT',{badarg,[{re,replace,
- ["apa","p","X",[{capture,all}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ [report_errors]))),
+ {'EXIT',{badarg,[{re,replace,
+ ["apa","p","X",[{capture,all,binary}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
- [{capture,all}]))),
- ?line {'EXIT',{badarg,[{re,replace,
- ["apa","p","X",[{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ [{capture,all,binary}]))),
+ {'EXIT',{badarg,[{re,replace,
+ ["apa","p","X",[{capture,all}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
- [{return,banana}]))),
- ?line {'EXIT',{badarg,_}} = (catch re:replace("apa","(p","X",[])),
+ [{capture,all}]))),
+ {'EXIT',{badarg,[{re,replace,
+ ["apa","p","X",[{return,banana}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
+ (catch iolist_to_binary(re:replace("apa","p","X",
+ [{return,banana}]))),
+ {'EXIT',{badarg,_}} = (catch re:replace("apa","(p","X",[])),
% Badarg, not compile error.
- ?line {'EXIT',{badarg,[{re,replace,
- ["apa","(p","X",[{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,replace,
+ ["apa","(p","X",[{return,banana}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","(p","X",
- [{return,banana}]))),
+ [{return,banana}]))),
% And the split errors:
- ?line [<<"a">>,<<"a">>] = (catch re:split("apa","p",[])),
- ?line [<<"a">>,<<"p">>,<<"a">>] = (catch re:split("apa",RE,[])),
- ?line {'EXIT',{badarg,[{re,split,["apa","p",[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ [<<"a">>,<<"a">>] = (catch re:split("apa","p",[])),
+ [<<"a">>,<<"p">>,<<"a">>] = (catch re:split("apa",RE,[])),
+ {'EXIT',{badarg,[{re,split,["apa","p",[report_errors]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
+ (catch re:split("apa","p",[report_errors])),
+ {'EXIT',{badarg,[{re,split,["apa","p",[global]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa","p",[global])),
- ?line {'EXIT',{badarg,[{re,split,["apa","p",[{capture,all}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,["apa","p",[{capture,all}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa","p",[{capture,all}])),
- ?line {'EXIT',{badarg,[{re,split,["apa","p",[{capture,all,binary}]],_},
- {?MODULE, error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,["apa","p",[{capture,all,binary}]],_},
+ {?MODULE, error_handling,0,_} | _]}} =
(catch re:split("apa","p",[{capture,all,binary}])),
- ?line {'EXIT',{badarg,[{re,split,["apa",{1,2,3,4},[]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,["apa",{1,2,3,4},[]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa",{1,2,3,4})),
- ?line {'EXIT',{badarg,[{re,split,["apa",{1,2,3,4},[]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,["apa",{1,2,3,4},[]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa",{1,2,3,4},[])),
- ?line {'EXIT',{badarg,[{re,split,
- ["apa",
- RE,
- [unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,
+ ["apa",
+ RE,
+ [unicode]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa",RE,[unicode])),
- ?line {'EXIT',{badarg,[{re,split,
- ["apa",
- RE,
- [{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,
+ ["apa",
+ RE,
+ [{return,banana}]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa",RE,[{return,banana}])),
- ?line {'EXIT',{badarg,[{re,split,
- ["apa",
- RE,
- [banana]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,
+ ["apa",
+ RE,
+ [banana]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa",RE,[banana])),
- ?line {'EXIT',{badarg,_}} = (catch re:split("apa","(p")),
+ {'EXIT',{badarg,_}} = (catch re:split("apa","(p")),
%Exception on bad argument, not compilation error
- ?line {'EXIT',{badarg,[{re,split,
- ["apa",
- "(p",
- [banana]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {'EXIT',{badarg,[{re,split,
+ ["apa",
+ "(p",
+ [banana]],_},
+ {?MODULE,error_handling,0,_} | _]}} =
(catch re:split("apa","(p",[banana])),
?t:timetrap_cancel(Dog),
ok.
@@ -600,13 +642,280 @@ re_infinite_loop(doc) ->
"Make sure matches that really loop infinitely actually fail";
re_infinite_loop(Config) when is_list(Config) ->
Dog = ?t:timetrap(?t:minutes(1)),
- ?line Str =
+ Str =
"http:/www.flickr.com/slideShow/index.gne?group_id=&user_id=69845378@N0",
- ?line EMail_regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+"
+ EMail_regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+"
++ "(\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
++ "@.*([a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
++ "([a-zA-Z]{2}|com|org|net|gov|mil"
++ "|biz|info|mobi|name|aero|jobs|museum)",
- ?line nomatch = re:run(Str, EMail_regex),
+ nomatch = re:run(Str, EMail_regex),
+ nomatch = re:run(Str, EMail_regex, [global]),
+ {error,match_limit} = re:run(Str, EMail_regex,[report_errors]),
+ {error,match_limit} = re:run(Str, EMail_regex,[report_errors,global]),
?t:timetrap_cancel(Dog),
ok.
+re_backwards_accented(doc) ->
+ "Check for nasty bug where accented graphemes can make PCRE back past "
+ "beginning of subject";
+re_backwards_accented(Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?t:minutes(1)),
+ ?line match = re:run(<<65,204,128,65,204,128,97,98,99>>,
+ <<"\\X?abc">>,
+ [unicode,{capture,none}]),
+ ?t:timetrap_cancel(Dog),
+ ok.
+opt_dupnames(doc) ->
+ "Check correct handling of dupnames option to re";
+opt_dupnames(Config) when is_list(Config) ->
+ Days = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
+ _ = [ begin
+ Short = lists:sublist(Day,3),
+ {match,[Short]} =
+ re:run(Day,
+ "(?<DN>Mon|Fri|Sun)(?:day)?|(?<DN>Tue)(?:sday)?|"
+ "(?<DN>Wed)(?:nesday)?|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['DN'], list}])
+ end || Day <- Days ],
+ _ = [ begin
+ Short = list_to_binary(lists:sublist(Day,3)),
+ {match,[Short]} =
+ re:run(Day,
+ "(?<DN>Mon|Fri|Sun)(?:day)?|(?<DN>Tue)(?:sday)?|"
+ "(?<DN>Wed)(?:nesday)?|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['DN'], binary}])
+ end || Day <- Days ],
+ _ = [ begin
+ {match,[{0,3}]} =
+ re:run(Day,
+ "(?<DN>Mon|Fri|Sun)(?:day)?|(?<DN>Tue)(?:sday)?|"
+ "(?<DN>Wed)(?:nesday)?|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['DN'], index}])
+ end || Day <- Days ],
+ {match,[{0,1},{1,3},{7,1}]} = re:run("SMondayX","(?<Skrap>.)(?<DN>Mon|Fri|Sun)(?:day)?(?<Skrap2>.)|"
+ "(?<DN>Tue)(?:sday)?|(?<DN>Wed)nesday|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['Skrap','DN','Skrap2'],index}]),
+ {match,[{-1,0},{0,3},{-1,0}]} = re:run("Wednesday","(?<Skrap>.)(?<DN>Mon|Fri|Sun)(?:day)?(?<Skrap2>.)|"
+ "(?<DN>Tue)(?:sday)?|(?<DN>Wed)nesday|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['Skrap','DN','Skrap2'],index}]),
+ nomatch = re:run("Wednsday","(?<Skrap>.)(?<DN>Mon|Fri|Sun)(?:day)?(?<Skrap2>.)|"
+ "(?<DN>Tue)(?:sday)?|(?<DN>Wed)nesday|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, ['Skrap','DN','Skrap2'],index}]),
+ {match,[<<>>]} = re:run("Subject","b",[dupnames,{capture,['B'],binary}]),
+ {match,[<<"S">>,<<"u">>,<<"b">>,<<"j">>,<<"e">>,<<"c">>,
+ <<"t">>,<<"I">>,<<"s">>,<<"M">>,<<"o">>,<<"r">>,<<"e">>,
+ <<"T">>,<<"h">>,<<"a">>,<<"n">>,<<"T">>,<<"e">>,<<"n">>]} =
+ re:run("SubjectIsMoreThanTen",
+ "(?<S>S)(?<u>u)(?<b>b)(?<j>j)(?<e>e)(?<c>c)(?<t>t)"
+ "(?<I>I)(?<s>s)(?<M>M)(?<o>o)(?<r>r)(?<e>e)(?<T>T)"
+ "(?<h>h)(?<a>a)(?<n>n)(?<T>T)(?<e>e)(?<n>n)",
+ [dupnames,{capture,['S','u','b','j','e','c','t',
+ 'I','s','M','o','r','e','T',
+ 'h','a','n','T','e','n'],binary}]),
+ {match,[<<"S">>,<<"u">>,<<"b">>,<<"j">>,<<"e">>,<<"c">>,
+ <<"t">>,<<"I">>,<<"s">>,<<"M">>,<<"o">>,<<"r">>,<<"e">>,
+ <<"T">>,<<"h">>,<<"a">>,<<"n">>,<<"T">>,<<"e">>,<<"n">>]} =
+ re:run("SubjectIsMoreThanTen",
+ "(?<S>S)(?<u>u)(?<b>b)(?<j>j)(?<e>e)(?<c>c)(?<t>t)"
+ "(?<I>I)(?<s>s)(?<M>M)(?<o>o)(?<r>r)(?<e>e)(?<T>T)"
+ "(?<h>h)(?<a>a)(?<n>n)(?<T>T)(?<e>e)(?<n>n)",
+ [dupnames,
+ {capture,all_but_first,list},
+ {capture,['S','u','b','j','e','c','t',
+ 'I','s','M','o','r','e','T',
+ 'h','a','n','T','e','n'],binary}]),
+ {match,[<<"S">>,<<"u">>,<<"b">>,<<"j">>,<<"e">>,<<"c">>,
+ <<"t">>,<<"I">>,<<"s">>,<<"M">>,<<"o">>,<<"r">>,<<"e">>,
+ <<"T">>,<<"h">>,<<"a">>,<<"n">>,<<"T">>,<<"e">>,<<"n">>]} =
+ re:run("SubjectIsMoreThanTen",
+ "(?<S>S)(?<u>u)(?<b>b)(?<j>j)(?<e>e)(?<c>c)(?<t>t)"
+ "(?<I>I)(?<s>s)(?<M>M)(?<o>o)(?<r>r)(?<e>e)(?<T>T)"
+ "(?<h>h)(?<a>a)(?<n>n)(?<T>T)(?<e>e)(?<n>n)",
+ [dupnames,
+ {capture,["S","u","b","j","e","c","t",
+ "I","s","M","o","r","e","T",
+ "h","a","n","T","e","n"],binary}]),
+ {match,[<<"S">>,<<"u">>,<<"b">>,<<"j">>,<<"e">>,<<"c">>,
+ <<"t">>,<<"I">>,<<"s">>,<<"M">>,<<"o">>,<<"r">>,<<"e">>,
+ <<"T">>,<<"h">>,<<"a">>,<<"n">>,<<"T">>,<<"e">>,<<"n">>]} =
+ re:run("SubjectIsMoreThanTen",
+ "(?<S>S)(?<u>u)(?<b>b)(?<j>j)(?<e>e)(?<c>c)(?<t>t)"
+ "(?<I>I)(?<s>s)(?<M>M)(?<o>o)(?<r>r)(?<e>e)(?<T>T)"
+ "(?<h>h)(?<a>a)(?<n>n)(?<T>T)(?<e>e)(?<then>n)",
+ [dupnames,
+ {capture,["S","u","b","j","e","c","t",
+ "I","s","M","o","r","e","T",
+ "h","a","n","T","e","then"],binary}]),
+ ok.
+
+opt_all_names(doc) ->
+ "Test capturing of all_names";
+opt_all_names(Config) when is_list(Config) ->
+ Days = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
+ {match,[{1,3},{0,1},{7,1}]} = re:run("SMondayX","(?<Skrap>.)(?<DN>Mon|Fri|Sun)(?:day)?(?<Skrap2>.)|"
+ "(?<DN>Tue)(?:sday)?|(?<DN>Wed)nesday|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, all_names,index}]),
+ {match,[{0,3},{-1,0},{-1,0}]} = re:run("Wednesday","(?<Skrap>.)(?<DN>Mon|Fri|Sun)(?:day)?(?<Skrap2>.)|"
+ "(?<DN>Tue)(?:sday)?|(?<DN>Wed)nesday|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, all_names,index}]),
+
+ _ = [ begin
+ {match,[{0,3}]} =
+ re:run(Day,
+ "(?<DN>Mon|Fri|Sun)(?:day)?|(?<DN>Tue)(?:sday)?|"
+ "(?<DN>Wed)(?:nesday)?|(?<DN>Thu)(?:rsday)?|"
+ "(?<DN>Sat)(?:urday)?",
+ [dupnames, {capture, all_names, index}])
+ end || Day <- Days ],
+ _ = [ begin
+ match =
+ re:run(Day,
+ "(Mon|Fri|Sun)(?:day)?|(Tue)(?:sday)?|"
+ "(Wed)(?:nesday)?|(Thu)(?:rsday)?|"
+ "(Sat)(?:urday)?",
+ [dupnames, {capture, all_names, index}])
+ end || Day <- Days ],
+ {match,[{0,1},{-1,0},{-1,0}]} = re:run("A","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, index}]),
+ {match,[{-1,0},{0,1},{-1,0}]} = re:run("B","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, index}]),
+ {match,[{-1,0},{-1,0},{0,1}]} = re:run("C","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, index}]),
+ {match,[<<"A">>,<<>>,<<>>]} = re:run("A","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, binary}]),
+ {match,[<<>>,<<"B">>,<<>>]} = re:run("B","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, binary}]),
+ {match,[<<>>,<<>>,<<"C">>]} = re:run("C","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, binary}]),
+ {match,["A",[],[]]} = re:run("A","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, list}]),
+ {match,[[],"B",[]]} = re:run("B","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, list}]),
+ {match,[[],[],"C"]} = re:run("C","(?<A>A)|(?<B>B)|(?<C>C)",[{capture, all_names, list}]),
+ {match,[{-1,0},{-1,0},{0,1}]} = re:run("A","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, index}]),
+ {match,[{-1,0},{0,1},{-1,0}]} = re:run("B","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, index}]),
+ {match,[{0,1},{-1,0},{-1,0}]} = re:run("C","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, index}]),
+ {match,[<<>>,<<>>,<<"A">>]} = re:run("A","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, binary}]),
+ {match,[<<>>,<<>>,<<"A">>]} = re:run("A","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_but_first, binary},{capture, all_names, binary}]),
+ {match,[<<>>,<<"B">>,<<>>]} = re:run("B","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, binary}]),
+ {match,[<<"C">>,<<>>,<<>>]} = re:run("C","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, binary}]),
+ {match,[[],[],"A"]} = re:run("A","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, list}]),
+ {match,[[],"B",[]]} = re:run("B","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, list}]),
+ {match,["C",[],[]]} = re:run("C","(?<C>A)|(?<B>B)|(?<A>C)",[{capture, all_names, list}]),
+ {match,[[<<>>,<<>>,<<"C">>],
+ [<<>>,<<>>,<<"C">>],
+ [<<>>,<<>>,<<"C">>]]} = re:run("CCC","(?<A>A)|(?<B>B)|(?<C>C)",
+ [global,{capture, all_names, binary}]),
+ {match,[[<<"C">>,<<>>],
+ [<<>>,<<"B">>],
+ [<<"C">>,<<>>]]} = re:run("CBC","(?<A>A)|(?<B>B)|(?<A>C)",
+ [global,dupnames,{capture, all_names, binary}]),
+ {match,[[]]} = re:run("ABCE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,['A'],list}]),
+ {match,["D"]} = re:run("ABCDE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,['A'],list}]),
+ {match,["F"]} = re:run("ABCFE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,['A'],list}]),
+ {match,["F",[]]} = re:run("ABCFE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,['A','B'],list}]),
+ {match,[[],"E"]} = re:run("ABCE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,['A','B'],list}]),
+ {match,[[],"E"]} = re:run("ABCE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,all_names,list}]),
+ {match,[{-1,0},{3,1}]} = re:run("ABCE","(?<A>D)|(?<B>E)|(?<A>F)",[dupnames,{capture,all_names,index}]),
+ match = re:run("Subject","b",[dupnames,{capture,all_names,binary}]),
+ {match,[<<"I">>,<<"M">>,<<"S">>,<<"T">>,<<"a">>,<<"b">>,
+ <<"c">>,<<"e">>,<<"h">>,<<"j">>,<<"n">>,<<"o">>,<<"r">>,
+ <<"s">>,<<"t">>,<<"u">>]} =
+ re:run("SubjectIsMoreThanTen","(?<S>S)(?<u>u)(?<b>b)(?<j>j)"
+ "(?<e>e)(?<c>c)(?<t>t)(?<I>I)(?<s>s)(?<M>M)(?<o>o)(?<r>r)"
+ "(?<e>e)(?<T>T)(?<h>h)(?<a>a)(?<n>n)(?<T>T)(?<e>e)(?<n>n)",
+ [dupnames,{capture,all_names,binary}]),
+ ok.
+
+inspect(doc) ->
+ "Test the minimal inspect function";
+inspect(Config) when is_list(Config)->
+ {ok,MP} = re:compile("(?<A>A)|(?<B>B)|(?<C>C)."),
+ {namelist,[<<"A">>,<<"B">>,<<"C">>]} = re:inspect(MP,namelist),
+ {ok,MPD} = re:compile("(?<A>A)|(?<B>B)|(?<A>C).",[dupnames]),
+ {namelist,[<<"A">>,<<"B">>]} = re:inspect(MPD,namelist),
+ {ok,MPN} = re:compile("(A)|(B)|(C)."),
+ {namelist,[]} = re:inspect(MPN,namelist),
+ {'EXIT',{badarg,_}} = (catch re:inspect(MPD,namelistk)),
+ {'EXIT',{badarg,_}} = (catch re:inspect({re_pattern,3,0,0,<<"kalle">>},namelist)),
+ {'EXIT',{badarg,_}} = (catch re:inspect({re_pattern,3,0,0,<<"kalle",2:2>>},namelist)),
+ ok.
+
+opt_no_start_optimize(doc) ->
+ "Test that the no_start_optimize compilation flag works";
+opt_no_start_optimize(Config) when is_list(Config) ->
+ {match, [{3,3}]} = re:run("DEFABC","(*COMMIT)ABC",[]), % Start optimization makes this result wrong!
+ nomatch = re:run("DEFABC","(*COMMIT)ABC",[no_start_optimize]), % This is the correct result...
+ ok.
+
+opt_never_utf(doc) ->
+ "Check that the never_utf option works";
+opt_never_utf(Config) when is_list(Config) ->
+ {match,[{0,3}]} = re:run("ABC","ABC",[never_utf]),
+ {match,[{0,3}]} = re:run("ABC","(*UTF)ABC",[]),
+ {ok,_} = re:compile("(*UTF)ABC"),
+ {ok,_} = re:compile("(*UTF)ABC",[unicode]),
+ {ok,_} = re:compile("(*UTF8)ABC"),
+ {'EXIT',{badarg,_}} = (catch re:run("ABC","ABC",[unicode,never_utf])),
+ {'EXIT',{badarg,_}} = (catch re:run("ABC","(*UTF)ABC",[never_utf])),
+ {'EXIT',{badarg,_}} = (catch re:run("ABC","(*UTF8)ABC",[never_utf])),
+ {error,_} = (catch re:compile("ABC",[unicode,never_utf])),
+ {error,_} = (catch re:compile("(*UTF)ABC",[never_utf])),
+ {error,_} = (catch re:compile("(*UTF8)ABC",[never_utf])),
+ ok.
+opt_ucp(doc) ->
+ "Check that the ucp option is passed to PCRE";
+opt_ucp(Config) when is_list(Config) ->
+ {match,[{0,1}]} = re:run([$a],"\\w",[unicode]),
+ {match,[{0,2}]} = re:run([229],"\\w",[unicode]), % Latin1 works without UCP, as we have a default
+ % Latin1 table
+ nomatch = re:run([1024],"\\w",[unicode]), % Latin1 word characters only, 1024 is not latin1
+ {match,[{0,2}]} = re:run([1024],"\\w",[unicode,ucp]), % Any Unicode word character works with 'ucp'
+ ok.
+match_limit(doc) ->
+ "Check that the match_limit and match_limit_recursion options work";
+match_limit(Config) when is_list(Config) ->
+ nomatch = re:run("aaaaaaaaaaaaaz","(a+)*zz",[]),
+ nomatch = re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit,3000}]),
+ nomatch = re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit_recursion,10}]),
+ nomatch = re:run("aaaaaaaaaaaaaz","(a+)*zz",[report_errors]),
+ {error,match_limit} = re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit,3000},
+ report_errors]),
+ {error,match_limit_recursion} =
+ re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit_recursion,10},
+ report_errors]),
+ {error,match_limit} = re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit,3000},
+ report_errors,global]),
+ {error,match_limit_recursion} =
+ re:run("aaaaaaaaaaaaaz","(a+)*zz",[{match_limit_recursion,10},
+ report_errors,global]),
+ ["aaaaaaaaaaaaaz"] = re:split("aaaaaaaaaaaaaz","(a+)*zz",
+ [{match_limit_recursion,10},{return,list}]),
+ ["aaaaaaaaaaaaaz"] = re:split("aaaaaaaaaaaaaz","(a+)*zz",
+ [{match_limit,3000},{return,list}]),
+ "aaaaaaaaaaaaaz" = re:replace("aaaaaaaaaaaaaz","(a+)*zz","!",
+ [{match_limit_recursion,10},{return,list}]),
+ "aaaaaaaaaaaaaz" = re:replace("aaaaaaaaaaaaaz","(a+)*zz","!",
+ [{match_limit,3000},{return,list}]),
+ {'EXIT', {badarg,_}} = (catch re:replace("aaaaaaaaaaaaaz","(a+)*zz","!",
+ [{match_limit_recursion,-1},{return,list}])),
+ {'EXIT', {badarg,_}} = (catch re:replace("aaaaaaaaaaaaaz","(a+)*zz","!",
+ [{match_limit,-1},{return,list}])),
+ {'EXIT', {badarg,_}} = (catch re:run("aaaaaaaaaaaaaz","(a+)*zz",
+ [{match_limit_recursion,-1},
+ report_errors,global])),
+ {'EXIT', {badarg,_}} = (catch re:run("aaaaaaaaaaaaaz","(a+)*zz",
+ [{match_limit,-1},
+ report_errors,global])),
+ ok.
+sub_binaries(doc) ->
+ "test that we get sub-binaries if subject is a binary and we "
+ "capture binaries";
+sub_binaries(Config) when is_list(Config) ->
+ Bin = list_to_binary(lists:seq(1,255)),
+ {match,[B,C]}=re:run(Bin,"(a)",[{capture,all,binary}]),
+ 255 = binary:referenced_byte_size(B),
+ 255 = binary:referenced_byte_size(C),
+ {match,[D]}=re:run(Bin,"(a)",[{capture,[1],binary}]),
+ 255 = binary:referenced_byte_size(D),
+ ok.
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput1 b/lib/stdlib/test/re_SUITE_data/testoutput1
index 3bf4ffbeee..3ed635146a 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput1
+++ b/lib/stdlib/test/re_SUITE_data/testoutput1
@@ -1,3 +1,7 @@
+/-- This set of tests is for features that are compatible with all versions of
+ Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
+ 16-bit PCRE libraries. --/
+
/the quick brown fox/
the quick brown fox
0: the quick brown fox
@@ -2281,7 +2285,7 @@ No match
0: c
*** Failers
0: s
- abk
+ abk
No match
/[^k]{2,3}$/
@@ -2289,7 +2293,7 @@ No match
0: abc
kbc
0: bc
- kabc
+ kabc
0: abc
*** Failers
0: ers
@@ -2859,7 +2863,7 @@ No match
the \"quick\" brown fox
0: "quick"
1: quick
- \"the \\\"quick\\\" brown fox\"
+ \"the \\\"quick\\\" brown fox\"
0: "the \"quick\" brown fox"
1: brown fox
@@ -3749,10 +3753,10 @@ No match
foobarbaz
No match
-/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
-/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
+/The cases of aaaa and aaaaaa are missed out below because Perl does things/
+/differently. We know that odd, and maybe incorrect, things happen with/
No match
-/where it does set $1 to aa when matching aaaaaa./
+/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
No match
/^(a\1?){4}$/
@@ -3762,9 +3766,6 @@ No match
No match
aaa
No match
- aaaa
- 0: aaaa
- 1: a
aaaaa
0: aaaaa
1: a
@@ -6159,11 +6160,9 @@ No match
1: bc
2: bc
-/-- This tests for an IPv6 address in the form where it can have up to --/
-/-- eight components, one and only one of which is empty. This must be --/
-No match
-/-- an internal component. --/
-No match
+/-- This tests for an IPv6 address in the form where it can have up to
+ eight components, one and only one of which is empty. This must be
+ an internal component. --/
/^(?!:) # colon disallowed at start
(?: # start of item
@@ -6605,4 +6604,2600 @@ No match
p
0: p
-/ End of testinput1 /
+/.*[op][xyz]/
+ fooabcfoo
+No match
+
+/(?(?=.*b)b|^)/
+ adc
+ 0:
+ abc
+ 0: b
+
+/(?(?=^.*b)b|^)/
+ adc
+ 0:
+ abc
+No match
+
+/(?(?=.*b)b|^)*/
+ adc
+ 0:
+ abc
+ 0:
+
+/(?(?=.*b)b|^)+/
+ adc
+ 0:
+ abc
+ 0: b
+
+/(?(?=b).*b|^d)/
+ abc
+ 0: b
+
+/(?(?=.*b).*b|^d)/
+ abc
+ 0: ab
+
+/^%((?(?=[a])[^%])|b)*%$/
+ %ab%
+ 0: %ab%
+ 1:
+
+/(?i)a(?-i)b|c/
+ XabX
+ 0: ab
+ XAbX
+ 0: Ab
+ CcC
+ 0: c
+ ** Failers
+No match
+ XABX
+No match
+
+/[\x00-\xff\s]+/
+ \x0a\x0b\x0c\x0d
+ 0: \x0a\x0b\x0c\x0d
+
+/^\c/
+ ?
+ 0: ?
+
+/(abc)\1/i
+ abc
+No match
+
+/(abc)\1/
+ abc
+No match
+
+/[^a]*/i
+ 12abc
+ 0: 12
+ 12ABC
+ 0: 12
+
+/[^a]*+/i
+ 12abc
+ 0: 12
+ 12ABC
+ 0: 12
+
+/[^a]*?X/i
+ ** Failers
+No match
+ 12abc
+No match
+ 12ABC
+No match
+
+/[^a]+?X/i
+ ** Failers
+No match
+ 12abc
+No match
+ 12ABC
+No match
+
+/[^a]?X/i
+ 12aXbcX
+ 0: X
+ 12AXBCX
+ 0: X
+ BCX
+ 0: CX
+
+/[^a]??X/i
+ 12aXbcX
+ 0: X
+ 12AXBCX
+ 0: X
+ BCX
+ 0: CX
+
+/[^a]?+X/i
+ 12aXbcX
+ 0: cX
+ 12AXBCX
+ 0: CX
+ BCX
+ 0: CX
+
+/[^a]{2,3}/i
+ abcdef
+ 0: bcd
+ ABCDEF
+ 0: BCD
+
+/[^a]{2,3}?/i
+ abcdef
+ 0: bc
+ ABCDEF
+ 0: BC
+
+/[^a]{2,3}+/i
+ abcdef
+ 0: bcd
+ ABCDEF
+ 0: BCD
+
+/((a|)+)+Z/
+ Z
+ 0: Z
+ 1:
+ 2:
+
+/(a)b|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?>(a))b|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?=(a))ab|(a)c/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/((?>(a))b|(a)c)/
+ ac
+ 0: ac
+ 1: ac
+ 2: <unset>
+ 3: a
+
+/((?>(a))b|(a)c)++/
+ ac
+ 0: ac
+ 1: ac
+ 2: <unset>
+ 3: a
+
+/(?:(?>(a))b|(a)c)++/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?=(?>(a))b|(a)c)(..)/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+ 3: ac
+
+/(?>(?>(a))b|(a)c)/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: a
+
+/(?:(?>([ab])))+a=/+
+ =ba=
+ 0: ba=
+ 0+
+ 1: b
+
+/(?>([ab]))+a=/+
+ =ba=
+ 0: ba=
+ 0+
+ 1: b
+
+/((?>(a+)b)+(aabab))/
+ aaaabaaabaabab
+ 0: aaaabaaabaabab
+ 1: aaaabaaabaabab
+ 2: aaa
+ 3: aabab
+
+/(?>a+|ab)+?c/
+ aabc
+No match
+
+/(?>a+|ab)+c/
+ aabc
+No match
+
+/(?:a+|ab)+c/
+ aabc
+ 0: aabc
+
+/(?(?=(a))a)/
+ a
+ 0: a
+ 1: a
+
+/(?(?=(a))a)(b)/
+ ab
+ 0: ab
+ 1: a
+ 2: b
+
+/^(?:a|ab)++c/
+ aaaabc
+No match
+
+/^(?>a|ab)++c/
+ aaaabc
+No match
+
+/^(?:a|ab)+c/
+ aaaabc
+ 0: aaaabc
+
+/(?=abc){3}abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)+abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)++abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc){0}xyz/
+ xyz
+ 0: xyz
+
+/(?=abc){1}xyz/
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=(a))?./
+ ab
+ 0: a
+ 1: a
+ bc
+ 0: b
+
+/(?=(a))??./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+ 0: ba
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ 0: abd
+ 1: b
+ zcdxx
+ 0: zcd
+ 1: c
+
+/^(?!a){0}\w+/
+ aaaaa
+ 0: aaaaa
+
+/(?<=(abc))?xyz/
+ abcxyz
+ 0: xyz
+ 1: abc
+ pqrxyz
+ 0: xyz
+
+/^[\g<a>]+/
+ ggg<<<aaa>>>
+ 0: ggg<<<aaa>>>
+ ** Failers
+No match
+ \\ga
+No match
+
+/^[\ga]+/
+ gggagagaxyz
+ 0: gggagaga
+
+/^[:a[:digit:]]+/
+ aaaa444:::Z
+ 0: aaaa444:::
+
+/^[:a[:digit:]:b]+/
+ aaaa444:::bbbZ
+ 0: aaaa444:::bbb
+
+/[:a]xxx[b:]/
+ :xxx:
+ 0: :xxx:
+
+/(?<=a{2})b/i
+ xaabc
+ 0: b
+ ** Failers
+No match
+ xabc
+No match
+
+/(?<!a{2})b/i
+ xabc
+ 0: b
+ ** Failers
+No match
+ xaabc
+No match
+
+/(?<=a\h)c/
+ xa c
+ 0: c
+
+/(?<=[^a]{2})b/
+ axxbc
+ 0: b
+ aAAbc
+ 0: b
+ ** Failers
+No match
+ xaabc
+No match
+
+/(?<=[^a]{2})b/i
+ axxbc
+ 0: b
+ ** Failers
+No match
+ aAAbc
+No match
+ xaabc
+No match
+
+/(?<=a\H)c/
+ abc
+ 0: c
+
+/(?<=a\V)c/
+ abc
+ 0: c
+
+/(?<=a\v)c/
+ a\nc
+ 0: c
+
+/(?(?=c)c|d)++Y/
+ XcccddYX
+ 0: cccddY
+
+/(?(?=c)c|d)*+Y/
+ XcccddYX
+ 0: cccddY
+
+/^(a{2,3}){2,}+a/
+ aaaaaaa
+ 0: aaaaaaa
+ 1: aaa
+ ** Failers
+No match
+ aaaaaa
+No match
+ aaaaaaaaa
+No match
+
+/^(a{2,3})++a/
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/^(a{2,3})*+a/
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/ab\Cde/
+ abXde
+ 0: abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+ 0: X
+
+/a[\CD]b/
+ aCb
+ 0: aCb
+ aDb
+ 0: aDb
+
+/a[\C-X]b/
+ aJb
+ 0: aJb
+
+/\H\h\V\v/
+ X X\x0a
+ 0: X X\x0a
+ X\x09X\x0b
+ 0: X\x09X\x0b
+ ** Failers
+No match
+ \xa0 X\x0a
+No match
+
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0X\x0a\x0b\x0c\x0d
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0\x0a\x0b\x0c\x0d
+ \x09\x20\xa0\x0a\x0b\x0c
+ 0: \x09 \xa0\x0a\x0b\x0c
+ ** Failers
+No match
+ \x09\x20\xa0\x0a\x0b
+No match
+
+/\H{3,4}/
+ XY ABCDE
+ 0: ABCD
+ XY PQR ST
+ 0: PQR
+
+/.\h{3,4}./
+ XY AB PQRS
+ 0: B P
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ 0: XNNNYZ
+ > X NYQZ
+ 0: X NYQZ
+ ** Failers
+No match
+ >XYZ
+No match
+ > X NY Z
+No match
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ 0: XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+ 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/(foo)\Kbar/
+ foobar
+ 0: bar
+ 1: foo
+
+/(foo)(\Kbar|baz)/
+ foobar
+ 0: bar
+ 1: foo
+ 2: bar
+ foobaz
+ 0: foobaz
+ 1: foo
+ 2: baz
+
+/(foo\Kbar)baz/
+ foobarbaz
+ 0: barbaz
+ 1: foobar
+
+/abc\K|def\K/g+
+ Xabcdefghi
+ 0:
+ 0+ defghi
+ 0:
+ 0+ ghi
+
+/ab\Kc|de\Kf/g+
+ Xabcdefghi
+ 0: c
+ 0+ defghi
+ 0: f
+ 0+ ghi
+
+/(?=C)/g+
+ ABCDECBA
+ 0:
+ 0+ CDECBA
+ 0:
+ 0+ CBA
+
+/^abc\K/+
+ abcdef
+ 0:
+ 0+ def
+ ** Failers
+No match
+ defabcxyz
+No match
+
+/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
+ ababababbbabZXXXX
+ 0: ababababbbabZ
+ 1: ab
+ 2: b
+
+/(?<A>tom|bon)-\g{A}/
+ tom-tom
+ 0: tom-tom
+ 1: tom
+ bon-bon
+ 0: bon-bon
+ 1: bon
+
+/(^(a|b\g{-1}))/
+ bacxxx
+No match
+
+/(?|(abc)|(xyz))\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+ xyzxyz
+ 0: xyzxyz
+ 1: xyz
+ ** Failers
+No match
+ abcxyz
+No match
+ xyzabc
+No match
+
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ 0: abcabc
+ 1: abc
+ xyzabc
+ 0: xyzabc
+ 1: xyz
+ ** Failers
+No match
+ xyzxyz
+No match
+
+/^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: c
+ 4: d
+ 5: Y
+
+/^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: <unset>
+ 4: <unset>
+ 5: c
+ 6: d
+ 7: Y
+
+/^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: <unset>
+ 4: <unset>
+ 5: c
+ 6: d
+ 7: Y
+
+/(?'abc'\w+):\k<abc>{2}/
+ a:aaxyz
+ 0: a:aa
+ 1: a
+ ab:ababxyz
+ 0: ab:abab
+ 1: ab
+ ** Failers
+No match
+ a:axyz
+No match
+ ab:abxyz
+No match
+
+/(?'abc'\w+):\g{abc}{2}/
+ a:aaxyz
+ 0: a:aa
+ 1: a
+ ab:ababxyz
+ 0: ab:abab
+ 1: ab
+ ** Failers
+No match
+ a:axyz
+No match
+ ab:abxyz
+No match
+
+/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
+ abd
+ 0: abd
+ 1: a
+ ce
+ 0: ce
+
+/^(a.)\g-1Z/
+ aXaXZ
+ 0: aXaXZ
+ 1: aX
+
+/^(a.)\g{-1}Z/
+ aXaXZ
+ 0: aXaXZ
+ 1: aX
+
+/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
+ abcd
+ 0: ab
+
+/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\d+)
+ )/x
+ metcalfe 33
+ 0: metcalfe 33
+ 1: metcalfe
+ 2: 33
+
+/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
+ 1.2.3.4
+ 0: 1.2.3.4
+ 1: <unset>
+ 2: .4
+ 131.111.10.206
+ 0: 131.111.10.206
+ 1: <unset>
+ 2: .206
+ 10.0.0.0
+ 0: 10.0.0.0
+ 1: <unset>
+ 2: .0
+ ** Failers
+No match
+ 10.6
+No match
+ 455.3.4.5
+No match
+
+/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
+ 1.2.3.4
+ 0: 1.2.3.4
+ 1: .4
+ 131.111.10.206
+ 0: 131.111.10.206
+ 1: .206
+ 10.0.0.0
+ 0: 10.0.0.0
+ 1: .0
+ ** Failers
+No match
+ 10.6
+No match
+ 455.3.4.5
+No match
+
+/^(\w++|\s++)*$/
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ 1: party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d++)(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: a
+ *** Failers
+No match
+ 12345+
+No match
+
+/a++b/
+ aaab
+ 0: aaab
+
+/(a++b)/
+ aaab
+ 0: aaab
+ 1: aaab
+
+/(a++)b/
+ aaab
+ 0: aaab
+ 1: aaa
+
+/([^()]++|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: x
+
+/\(([^()]++|\([^()]+\))+\)/
+ (abc)
+ 0: (abc)
+ 1: abc
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ 1: xyz
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ 0: abc
+ 1: c
+ a(b)c
+ 0: a(b)c
+ 1: c
+ a(b(c))d
+ 0: a(b(c))d
+ 1: d
+ *** Failers)
+No match
+ a(b(c)d
+No match
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ 0: >abc>123<xyz<
+ 1: 3
+ >abc>1(2)3<xyz<
+ 0: >abc>1(2)3<xyz<
+ 1: 3
+ >abc>(1(2)3)<xyz<
+ 0: >abc>(1(2)3)<xyz<
+ 1: (1(2)3)
+
+/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satanoscillatemymetallicsonatas
+ 0: Satanoscillatemymetallicsonatas
+ 1: <unset>
+ 2: <unset>
+ 3: Satanoscillatemymetallicsonatas
+ 4: S
+ AmanaplanacanalPanama
+ 0: AmanaplanacanalPanama
+ 1: <unset>
+ 2: <unset>
+ 3: AmanaplanacanalPanama
+ 4: A
+ AblewasIereIsawElba
+ 0: AblewasIereIsawElba
+ 1: <unset>
+ 2: <unset>
+ 3: AblewasIereIsawElba
+ 4: A
+ *** Failers
+No match
+ Thequickbrownfox
+No match
+
+/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
+ 12
+ 0: 12
+ 1: 12
+ (((2+2)*-3)-7)
+ 0: (((2+2)*-3)-7)
+ 1: (((2+2)*-3)-7)
+ 2: -
+ -12
+ 0: -12
+ 1: -12
+ *** Failers
+No match
+ ((2+2)*-3)-7)
+No match
+
+/^(x(y|(?1){2})z)/
+ xyz
+ 0: xyz
+ 1: xyz
+ 2: y
+ xxyzxyzz
+ 0: xxyzxyzz
+ 1: xxyzxyzz
+ 2: xyzxyz
+ *** Failers
+No match
+ xxyzz
+No match
+ xxyzxyzxyzz
+No match
+
+/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
+ <>
+ 0: <>
+ 1: <>
+ 2: <>
+ <abcd>
+ 0: <abcd>
+ 1: <abcd>
+ 2: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ 1: <abc <123> hij>
+ 2: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ 1: <def>
+ 2: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ 1: <abc<>def>
+ 2: <abc<>def>
+ <abc<>
+ 0: <>
+ 1: <>
+ 2: <>
+ *** Failers
+No match
+ <abc
+No match
+
+/^a+(*FAIL)/
+ aaaaaa
+No match
+
+/a+b?c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*PRUNE)c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*COMMIT)c+(*FAIL)/
+ aaabccc
+No match
+
+/a+b?(*SKIP)c+(*FAIL)/
+ aaabcccaaabccc
+No match
+
+/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ 0: aaaxxxxxx
+ aaa++++++
+ 0: aaa
+ bbbxxxxx
+ 0: bbbxxxxx
+ bbb+++++
+ 0: bbb
+ cccxxxx
+ 0: cccxxxx
+ ccc++++
+ 0: ccc
+ dddddddd
+ 0: ddd
+
+/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
+ aaaxxxxxx
+ 0: aaaxxxxxx
+ 1: aaaxxxxxx
+ aaa++++++
+ 0: aaa
+ 1: aaa
+ bbbxxxxx
+ 0: bbbxxxxx
+ 1: bbbxxxxx
+ bbb+++++
+ 0: bbb
+ 1: bbb
+ cccxxxx
+ 0: cccxxxx
+ 1: cccxxxx
+ ccc++++
+ 0: ccc
+ 1: ccc
+ dddddddd
+ 0: ddd
+ 1: ddd
+
+/a+b?(*THEN)c+(*FAIL)/
+ aaabccc
+No match
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+ 0: AB
+ 1: AB
+ 2: B
+ ABX
+ 0: AB
+ 1: AB
+ 2: B
+ AADE
+ 0: AADE
+ 1: AAD
+ 2: A
+ 3: E
+ ACDE
+ 0: ACDE
+ 1: ACD
+ 2: C
+ 3: E
+ ** Failers
+No match
+ AD
+No match
+
+/^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satan, oscillate my metallic sonatas!
+ 0: Satan, oscillate my metallic sonatas!
+ 1: <unset>
+ 2: <unset>
+ 3: Satan, oscillate my metallic sonatas
+ 4: S
+ A man, a plan, a canal: Panama!
+ 0: A man, a plan, a canal: Panama!
+ 1: <unset>
+ 2: <unset>
+ 3: A man, a plan, a canal: Panama
+ 4: A
+ Able was I ere I saw Elba.
+ 0: Able was I ere I saw Elba.
+ 1: <unset>
+ 2: <unset>
+ 3: Able was I ere I saw Elba
+ 4: A
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/^((.)(?1)\2|.)$/
+ a
+ 0: a
+ 1: a
+ aba
+ 0: aba
+ 1: aba
+ 2: a
+ aabaa
+ 0: aabaa
+ 1: aabaa
+ 2: a
+ abcdcba
+ 0: abcdcba
+ 1: abcdcba
+ 2: a
+ pqaabaaqp
+ 0: pqaabaaqp
+ 1: pqaabaaqp
+ 2: p
+ ablewasiereisawelba
+ 0: ablewasiereisawelba
+ 1: ablewasiereisawelba
+ 2: a
+ rhubarb
+No match
+ the quick brown fox
+No match
+
+/(a)(?<=b(?1))/
+ baz
+ 0: a
+ 1: a
+ ** Failers
+No match
+ caz
+No match
+
+/(?<=b(?1))(a)/
+ zbaaz
+ 0: a
+ 1: a
+ ** Failers
+No match
+ aaa
+No match
+
+/(?<X>a)(?<=b(?&X))/
+ baz
+ 0: a
+ 1: a
+
+/^(?|(abc)|(def))\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+ defdef
+ 0: defdef
+ 1: def
+ ** Failers
+No match
+ abcdef
+No match
+ defabc
+No match
+
+/^(?|(abc)|(def))(?1)/
+ abcabc
+ 0: abcabc
+ 1: abc
+ defabc
+ 0: defabc
+ 1: def
+ ** Failers
+No match
+ defdef
+No match
+ abcdef
+No match
+
+/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
+ a\"aaaaa
+ 0: a"aaaaa
+ 1: "
+ 2: <unset>
+ 3: "
+ b\"aaaaa
+ 0: b"aaaaa
+ 1: <unset>
+ 2: <unset>
+ 3: <unset>
+ 4: "
+ 5: <unset>
+ 6: "
+ ** Failers
+No match
+ b\"11111
+No match
+
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ 0: BC
+ 1: C
+ CCD
+ 0: CC
+ 1: C
+ ** Failers
+No match
+ CAD
+No match
+
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ 0: CC
+ 1: C
+ BCD
+ 0: BC
+ 1: C
+ ** Failers
+No match
+ ABCD
+No match
+ CAD
+No match
+ BAD
+No match
+
+/(?:(?1)|B)(A(*ACCEPT)XX|C)D/
+ AAD
+ 0: AA
+ 1: A
+ ACD
+ 0: ACD
+ 1: C
+ BAD
+ 0: BA
+ 1: A
+ BCD
+ 0: BCD
+ 1: C
+ BAX
+ 0: BA
+ 1: A
+ ** Failers
+No match
+ ACX
+No match
+ ABC
+No match
+
+/(?(DEFINE)(A))B(?1)C/
+ BAC
+ 0: BAC
+
+/(?(DEFINE)((A)\2))B(?1)C/
+ BAAC
+ 0: BAAC
+
+/(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
+ (ab(cd)ef)
+ 0: (ab(cd)ef)
+ 1: (ab(cd)ef)
+ 2: ef
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+No match
+ ac
+No match
+
+/^(?=a(*PRUNE)b)/
+ ab
+ 0:
+ ** Failers
+No match
+ ac
+No match
+
+/^(?=a(*ACCEPT)b)/
+ ac
+ 0:
+
+/(?>a\Kb)/
+ ab
+ 0: b
+
+/((?>a\Kb))/
+ ab
+ 0: b
+ 1: ab
+
+/(a\Kb)/
+ ab
+ 0: b
+ 1: ab
+
+/^a\Kcz|ac/
+ ac
+ 0: ac
+
+/(?>a\Kbz|ab)/
+ ab
+ 0: ab
+
+/^(?&t)(?(DEFINE)(?<t>a\Kb))$/
+ ab
+ 0: b
+
+/^([^()]|\((?1)*\))*$/
+ a(b)c
+ 0: a(b)c
+ 1: c
+ a(b(c)d)e
+ 0: a(b(c)d)e
+ 1: e
+
+/(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
+ 0
+ 0: 0
+ 1: 0
+ 00
+ 0: 00
+ 1: 00
+ 2: 0
+ 0000
+ 0: 0000
+ 1: 0000
+ 2: 0
+
+/(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
+ 0
+ 0: 0
+ 1: 0
+ 2: 0
+ 00
+ 0: 0
+ 1: 0
+ 2: 0
+ 0000
+ 0: 0
+ 1: 0
+ 2: 0
+
+/--- This one does fail, as expected, in Perl. It needs the complex item at the
+ end of the pattern. A single letter instead of (B|D) makes it not fail,
+ which I think is a Perl bug. --- /
+
+/A(*COMMIT)(B|D)/
+ ACABX
+No match
+
+/--- Check the use of names for failure ---/
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/--- Force no study, otherwise mark is not seen. The studied version is in
+ test 2 because it isn't Perl-compatible. ---/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: A
+ D
+No match, mark = A
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ ** Failers
+No match
+ CB
+No match, mark = B
+
+/^(?:A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+No match, mark = B
+
+/^(?>A(*THEN:A)B|C(*THEN:B)D)/K
+ CB
+No match, mark = B
+
+/--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
+that we have to have something complicated such as (B|Z) at the end because,
+for Perl, a simple character somehow causes an unwanted optimization to mess
+with the handling of backtracking verbs. ---/
+
+/A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Test skipping over a non-matching mark. ---/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Check shorthand for MARK ---/
+
+/A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/--- Don't loop! Force no study, otherwise mark is not seen. ---/
+
+/(*:A)A+(*SKIP:A)(B|Z)/KSS
+ AAAC
+No match, mark = A
+
+/--- This should succeed, as a non-existent skip name disables the skip ---/
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
+ AAAC
+ 0: AC
+MK: B
+
+/--- COMMIT at the start of a pattern should act like an anchor. Again,
+however, we need the complication for Perl. ---/
+
+/(*COMMIT)(A|P)(B|P)(C|P)/
+ ABCDEFG
+ 0: ABC
+ 1: A
+ 2: B
+ 3: C
+ ** Failers
+No match
+ DEFGABC
+No match
+
+/--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
+
+/(\w+)(?>b(*COMMIT))\w{2}/
+ abbb
+ 0: abbb
+ 1: a
+
+/(\w+)b(*COMMIT)\w{2}/
+ abbb
+No match
+
+/--- Check opening parens in comment when seeking forward reference. ---/
+
+/(?&t)(?#()(?(DEFINE)(?<t>a))/
+ bac
+ 0: a
+
+/--- COMMIT should override THEN ---/
+
+/(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/b?(*SKIP)c/
+ bc
+ 0: bc
+ abc
+ 0: bc
+
+/(*SKIP)bc/
+ a
+No match
+
+/(*SKIP)b/
+ a
+No match
+
+/(?P<abn>(?P=abn)xxx|)+/
+ xxx
+ 0:
+ 1:
+
+/(?i:([^b]))(?1)/
+ aa
+ 0: aa
+ 1: a
+ aA
+ 0: aA
+ 1: a
+ ** Failers
+ 0: **
+ 1: *
+ ab
+No match
+ aB
+No match
+ Ba
+No match
+ ba
+No match
+
+/^(?&t)*+(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ 0: aaaaaaX
+ ** Failers
+No match
+ aaaaaa
+No match
+
+/^(?&t)*(?(DEFINE)(?<t>a))\w$/
+ aaaaaaX
+ 0: aaaaaaX
+ aaaaaa
+ 0: aaaaaa
+
+/^(a)*+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ YZ
+ 0: Y
+ 1: <unset>
+ 2: Y
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(?:a)*+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ YZ
+ 0: Y
+ 1: Y
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(a)++(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaaa
+No match
+ YZ
+No match
+
+/^(?:a)++(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaaa
+No match
+ YZ
+No match
+
+/^(a)?+(\w)/
+ aaaaX
+ 0: aa
+ 1: a
+ 2: a
+ YZ
+ 0: Y
+ 1: <unset>
+ 2: Y
+
+/^(?:a)?+(\w)/
+ aaaaX
+ 0: aa
+ 1: a
+ YZ
+ 0: Y
+ 1: Y
+
+/^(a){2,}+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaa
+No match
+ YZ
+No match
+
+/^(?:a){2,}+(\w)/
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaa
+No match
+ YZ
+No match
+
+/(a|)*(?1)b/
+ b
+ 0: b
+ 1:
+ ab
+ 0: ab
+ 1:
+ aab
+ 0: aab
+ 1:
+
+/(a)++(?1)b/
+ ** Failers
+No match
+ ab
+No match
+ aab
+No match
+
+/(a)*+(?1)b/
+ ** Failers
+No match
+ ab
+No match
+ aab
+No match
+
+/(?1)(?:(b)){0}/
+ b
+ 0: b
+
+/(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
+ foo(bar(baz)+baz(bop))
+ 0: foo(bar(baz)+baz(bop))
+ 1: foo(bar(baz)+baz(bop))
+ 2: (bar(baz)+baz(bop))
+ 3: bar(baz)+baz(bop)
+
+/(A (A|B(*ACCEPT)|C) D)(E)/x
+ AB
+ 0: AB
+ 1: AB
+ 2: B
+
+/\A.*?(a|bc)/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(?:a|bc)++/
+ ba
+ 0: ba
+
+/\A.*?(a|bc)++/
+ ba
+ 0: ba
+ 1: a
+
+/\A.*?(?:a|bc|d)/
+ ba
+ 0: ba
+
+/(?:(b))++/
+ beetle
+ 0: b
+ 1: b
+
+/(?(?=(a(*ACCEPT)z))a)/
+ a
+ 0: a
+ 1: a
+
+/^(a)(?1)+ab/
+ aaaab
+ 0: aaaab
+ 1: a
+
+/^(a)(?1)++ab/
+ aaaab
+No match
+
+/^(?=a(*:M))aZ/K
+ aZbc
+ 0: aZ
+MK: M
+
+/^(?!(*:M)b)aZ/K
+ aZbc
+ 0: aZ
+
+/(?(DEFINE)(a))?b(?1)/
+ backgammon
+ 0: ba
+
+/^\N+/
+ abc\ndef
+ 0: abc
+
+/^\N{1,}/
+ abc\ndef
+ 0: abc
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+ 0: aaaab
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+ 0: aaaab
+ 1: aaaa
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+ 1: aaaab
+
+/((?(R1)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+ 1: aaaab
+
+/a(*:any
+name)/K
+ abc
+ 0: a
+MK: any \x0aname
+
+/(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
+ a
+ 0: a
+ ba
+ 0: a
+ bba
+ 0: a
+
+/--- Checking revised (*THEN) handling ---/
+
+/--- Capture ---/
+
+/^.*? (a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*? ( (a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+ 1: ab
+ 2: ab
+
+/^.*? ( (a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Non-capture ---/
+
+/^.*? (?:a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (?:a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Atomic ---/
+
+/^.*? (?>a(*THEN)b) c/x
+ aabc
+No match
+
+/^.*? (?>a(*THEN)b|(*F)) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
+ aabc
+ 0: aabc
+
+/^.*? (?> (?>a(*THEN)b) ) c/x
+ aabc
+No match
+
+/--- Possessive capture ---/
+
+/^.*? (a(*THEN)b)++ c/x
+ aabc
+No match
+
+/^.*? (a(*THEN)b|(*F))++ c/x
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+ 0: aabc
+ 1: ab
+ 2: ab
+
+/^.*? ( (a(*THEN)b)++ )++ c/x
+ aabc
+No match
+
+/--- Possessive non-capture ---/
+
+/^.*? (?:a(*THEN)b)++ c/x
+ aabc
+No match
+
+/^.*? (?:a(*THEN)b|(*F))++ c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
+ aabc
+ 0: aabc
+
+/^.*? (?: (?:a(*THEN)b)++ )++ c/x
+ aabc
+No match
+
+/--- Condition assertion ---/
+
+/^(?(?=a(*THEN)b)ab|ac)/
+ ac
+ 0: ac
+
+/--- Condition ---/
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+No match
+
+/^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
+ ba
+ 0: ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+No match
+
+/--- Assertion ---/
+
+/^.*(?=a(*THEN)b)/
+ aabc
+ 0: a
+
+/------------------------------/
+
+/(?>a(*:m))/imsxSK
+ a
+ 0: a
+MK: m
+
+/(?>(a)(*:m))/imsxSK
+ a
+ 0: a
+ 1: a
+MK: m
+
+/(?<=a(*ACCEPT)b)c/
+ xacd
+ 0: c
+
+/(?<=(a(*ACCEPT)b))c/
+ xacd
+ 0: c
+ 1: a
+
+/(?<=(a(*COMMIT)b))c/
+ xabcd
+ 0: c
+ 1: ab
+ ** Failers
+No match
+ xacd
+No match
+
+/(?<!a(*FAIL)b)c/
+ xcd
+ 0: c
+ acd
+ 0: c
+
+/(?<=a(*:N)b)c/K
+ xabcd
+ 0: c
+MK: N
+
+/(?<=a(*PRUNE)b)c/
+ xabcd
+ 0: c
+
+/(?<=a(*SKIP)b)c/
+ xabcd
+ 0: c
+
+/(?<=a(*THEN)b)c/
+ xabcd
+ 0: c
+
+/(a)(?2){2}(.)/
+ abcd
+ 0: abcd
+ 1: a
+ 2: d
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*PRUNE:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KSY
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/(*MARK:A)(*THEN:B)(C|X)/KSS
+ C
+ 0: C
+ 1: C
+MK: B
+ D
+No match, mark = B
+
+/--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
+
+/A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- Same --/
+
+/A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+No match, mark = B
+
+/A(*:A)A+(*SKIP)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- This should fail, as a null name is the same as no name ---/
+
+/A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/--- A check on what happens after hitting a mark and them bumping along to
+something that does not even start. Perl reports tags after the failures here,
+though it does not when the individual letters are made into something
+more complicated. ---/
+
+/A(*:A)B|XX(*:B)Y/K
+ AABC
+ 0: AB
+MK: A
+ XXYZ
+ 0: XXY
+MK: B
+ ** Failers
+No match
+ XAQQ
+No match, mark = A
+ XAQQXZZ
+No match, mark = A
+ AXQQQ
+No match, mark = A
+ AXXQQQ
+No match, mark = B
+
+/^(A(*THEN:A)B|C(*THEN:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+MK: A
+ CD
+ 0: CD
+ 1: CD
+MK: B
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+MK: A
+ CD
+ 0: CD
+ 1: CD
+MK: B
+ ** Failers
+No match
+ AC
+No match, mark = A
+ CB
+No match, mark = B
+
+/--- An empty name does not pass back an empty string. It is the same as if no
+name were given. ---/
+
+/^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
+ AB
+ 0: AB
+ 1: AB
+ CD
+ 0: CD
+ 1: CD
+MK: B
+
+/--- PRUNE goes to next bumpalong; COMMIT does not. ---/
+
+/A(*PRUNE:A)B/K
+ ACAB
+ 0: AB
+MK: A
+
+/--- Mark names can be duplicated ---/
+
+/A(*:A)B|X(*:A)Y/K
+ AABC
+ 0: AB
+MK: A
+ XXYZ
+ 0: XY
+MK: A
+
+/b(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/b(*:m)f|aw/K
+ abaw
+ 0: aw
+ ** Failers
+No match
+ abc
+No match, mark = m
+ abax
+No match, mark = m
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
+ AAAC
+ 0: AAC
+
+/a(*PRUNE:X)bc|qq/KY
+ ** Failers
+No match, mark = X
+ axy
+No match, mark = X
+
+/a(*THEN:X)bc|qq/KY
+ ** Failers
+No match, mark = X
+ axy
+No match, mark = X
+
+/(?=a(*MARK:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*MARK:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*PRUNE:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*PRUNE:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*THEN:A)b)..x/K
+ abxy
+ 0: abx
+MK: A
+ ** Failers
+No match
+ abpq
+No match
+
+/(?=a(*THEN:A)b)..(*:Y)x/K
+ abxy
+ 0: abx
+MK: Y
+ ** Failers
+No match
+ abpq
+No match
+
+/(another)?(\1?)test/
+ hello world test
+ 0: test
+ 1: <unset>
+ 2:
+
+/(another)?(\1+)test/
+ hello world test
+No match
+
+/(a(*COMMIT)b){0}a(?1)|aac/
+ aac
+ 0: aac
+
+/((?:a?)*)*c/
+ aac
+ 0: aac
+ 1:
+
+/((?>a?)*)*c/
+ aac
+ 0: aac
+ 1:
+
+/(?>.*?a)(?<=ba)/
+ aba
+ 0: ba
+
+/(?:.*?a)(?<=ba)/
+ aba
+ 0: aba
+
+/.*?a(*PRUNE)b/
+ aab
+ 0: ab
+
+/.*?a(*PRUNE)b/s
+ aab
+ 0: ab
+
+/^a(*PRUNE)b/s
+ aab
+No match
+
+/.*?a(*SKIP)b/
+ aab
+ 0: ab
+
+/(?>.*?a)b/s
+ aab
+ 0: ab
+
+/(?>.*?a)b/
+ aab
+ 0: ab
+
+/(?>^a)b/s
+ aab
+No match
+
+/(?>.*?)(?<=(abcd)|(wxyz))/
+ alphabetabcd
+ 0:
+ 1: abcd
+ endingwxyz
+ 0:
+ 1: <unset>
+ 2: wxyz
+
+/(?>.*)(?<=(abcd)|(wxyz))/
+ alphabetabcd
+ 0: alphabetabcd
+ 1: abcd
+ endingwxyz
+ 0: endingwxyz
+ 1: <unset>
+ 2: wxyz
+
+"(?>.*)foo"
+ abcdfooxyz
+No match
+
+"(?>.*?)foo"
+ abcdfooxyz
+ 0: foo
+
+/(?:(a(*PRUNE)b)){0}(?:(?1)|ac)/
+ ac
+ 0: ac
+
+/(?:(a(*SKIP)b)){0}(?:(?1)|ac)/
+ ac
+ 0: ac
+
+/(?<=(*SKIP)ac)a/
+ aa
+No match
+
+/A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
+ AAAC
+ 0: AC
+
+/a(*SKIP:m)x|ac(*:n)(*SKIP:n)d|ac/K
+ acacd
+ 0: acd
+MK: n
+
+/A(*SKIP:m)x|A(*SKIP:n)x|AB/K
+ AB
+ 0: AB
+
+/((*SKIP:r)d){0}a(*SKIP:m)x|ac(*:n)|ac/K
+ acacd
+ 0: ac
+MK: n
+
+/-- Tests that try to figure out how Perl works. My hypothesis is that the
+ first verb that is backtracked onto is the one that acts. This seems to be
+ the case almost all the time, but there is one exception that is perhaps a
+ bug. --/
+
+/-- This matches "aaaac"; each PRUNE advances one character until the subject
+ no longer starts with 5 'a's. --/
+
+/aaaaa(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/-- Putting SKIP in front of PRUNE makes no difference, as it is never
+backtracked onto, whether or not it has a label. --/
+
+/aaaaa(*SKIP)(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/aaaaa(*SKIP:N)(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/-- Putting THEN in front makes no difference. */
+
+/aaaaa(*THEN)(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/-- However, putting COMMIT in front of the prune changes it to "no match". I
+ think this is inconsistent and possibly a bug. For the moment, running this
+ test is moved out of the Perl-compatible file. --/
+
+/aaaaa(*COMMIT)(*PRUNE)b|a+c/
+
+
+/---- OK, lets play the same game again using SKIP instead of PRUNE. ----/
+
+/-- This matches "ac" because SKIP forces the next match to start on the
+ sixth "a". --/
+
+/aaaaa(*SKIP)b|a+c/
+ aaaaaac
+ 0: ac
+
+/-- Putting PRUNE in front makes no difference. --/
+
+/aaaaa(*PRUNE)(*SKIP)b|a+c/
+ aaaaaac
+ 0: ac
+
+/-- Putting THEN in front makes no difference. --/
+
+/aaaaa(*THEN)(*SKIP)b|a+c/
+ aaaaaac
+ 0: ac
+
+/-- In this case, neither does COMMIT. This still matches "ac". --/
+
+/aaaaa(*COMMIT)(*SKIP)b|a+c/
+ aaaaaac
+ 0: ac
+
+/-- This gives "no match", as expected. --/
+
+/aaaaa(*COMMIT)b|a+c/
+ aaaaaac
+No match
+
+
+/------ Tests using THEN ------/
+
+/-- This matches "aaaaaac", as expected. --/
+
+/aaaaa(*THEN)b|a+c/
+ aaaaaac
+ 0: aaaaaac
+
+/-- Putting SKIP in front makes no difference. --/
+
+/aaaaa(*SKIP)(*THEN)b|a+c/
+ aaaaaac
+ 0: aaaaaac
+
+/-- Putting PRUNE in front makes no difference. --/
+
+/aaaaa(*PRUNE)(*THEN)b|a+c/
+ aaaaaac
+ 0: aaaaaac
+
+/-- Putting COMMIT in front makes no difference. --/
+
+/aaaaa(*COMMIT)(*THEN)b|a+c/
+ aaaaaac
+ 0: aaaaaac
+
+/-- End of "priority" tests --/
+
+/aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+/
+ aaaaaa
+ 0: a
+
+/aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
+ aaaaaa
+ 0: a
+
+/aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+/
+ aaaaaa
+ 0: aaaa
+
+/aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
+ aaaaaa
+ 0: a
+
+/a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c/
+ aaaac
+ 0: aac
+
+/a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c/
+ aaaac
+ 0: ac
+
+/aaa(*PRUNE:A)a(*SKIP:A)b|a+c/
+ aaaac
+ 0: aac
+
+/aaa(*MARK:A)a(*SKIP:A)b|a+c/
+ aaaac
+ 0: ac
+
+/a(*:m)a(*COMMIT)(*SKIP:m)b|a+c/K
+ aaaaaac
+ 0: ac
+
+/.?(a|b(*THEN)c)/
+ ba
+ 0: ba
+ 1: a
+
+/(a(*COMMIT)b)c|abd/
+ abc
+ 0: abc
+ 1: ab
+ abd
+No match
+
+/(?=a(*COMMIT)b)abc|abd/
+ abc
+ 0: abc
+ abd
+ 0: abd
+
+/(?>a(*COMMIT)b)c|abd/
+ abc
+ 0: abc
+ abd
+ 0: abd
+
+/a(?=b(*COMMIT)c)[^d]|abd/
+ abd
+No match
+ abc
+ 0: ab
+
+/a(?=bc).|abd/
+ abd
+ 0: abd
+ abc
+ 0: ab
+
+/a(?>b(*COMMIT)c)d|abd/
+ abceabd
+No match
+
+/a(?>bc)d|abd/
+ abceabd
+ 0: abd
+
+/(?>a(*COMMIT)b)c|abd/
+ abd
+ 0: abd
+
+/(?>a(*COMMIT)c)d|abd/
+ abd
+No match
+
+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+ ac
+ 0: ac
+ 1: <unset>
+ 2: c
+
+/-- These tests were formerly in test 2, but changes in PCRE and Perl have
+ made them compatible. --/
+
+/^(a)?(?(1)a|b)+$/
+ *** Failers
+No match
+ a
+No match
+
+/(?=a\Kb)ab/
+ ab
+ 0: b
+
+/(?!a\Kb)ac/
+ ac
+ 0: ac
+
+/^abc(?<=b\Kc)d/
+ abcd
+ 0: cd
+
+/^abc(?<!b\Kq)d/
+ abcd
+ 0: abcd
+
+
+/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
+ AAAC
+No match, mark = A
+
+/^((abc|abcx)(*THEN)y|abcd)/
+ abcd
+ 0: abcd
+ 1: abcd
+ *** Failers
+No match
+ abcxy
+No match
+
+/^((yes|no)(*THEN)(*F))?/
+ yes
+No match
+
+/(A (.*) C? (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C? (*THEN) | A D) \s* z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (?:C|) (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) C{0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*) (CE){0,6} (*THEN) | A D) z/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*) (CE*){0,6} (*THEN) | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+ ac
+No match
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+ ac
+No match
+
+/--------/
+
+/(?(?!b(*THEN)a)bn|bnn)/
+ bnn
+ 0: bn
+
+/(?!b(*SKIP)a)bn|bnn/
+ bnn
+ 0: bn
+
+/(?(?!b(*SKIP)a)bn|bnn)/
+ bnn
+ 0: bn
+
+/(?!b(*PRUNE)a)bn|bnn/
+ bnn
+ 0: bn
+
+/(?(?!b(*PRUNE)a)bn|bnn)/
+ bnn
+ 0: bn
+
+/(?!b(*COMMIT)a)bn|bnn/
+ bnn
+ 0: bn
+
+/(?(?!b(*COMMIT)a)bn|bnn)/
+ bnn
+ 0: bn
+
+/(?=b(*SKIP)a)bn|bnn/
+ bnn
+No match
+
+/(?=b(*THEN)a)bn|bnn/
+ bnn
+ 0: bnn
+
+ /^(?!a(*SKIP)b)/
+ ac
+ 0:
+
+ /^(?!a(*SKIP)b)../
+ acd
+ 0: ac
+
+/(?!a(*SKIP)b)../
+ acd
+ 0: ac
+
+/^(?(?!a(*SKIP)b))/
+ ac
+ 0:
+
+/^(?!a(*PRUNE)b)../
+ acd
+ 0: ac
+
+/(?!a(*PRUNE)b)../
+ acd
+ 0: ac
+
+ /(?!a(*COMMIT)b)ac|cd/
+ ac
+ 0: ac
+
+/\A.*?(?:a|bc)/
+ ba
+ 0: ba
+
+/^(A(*THEN)B|C(*THEN)D)/
+ CD
+ 0: CD
+ 1: CD
+
+/(*:m(m)(?&y)(?(DEFINE)(?<y>b))/K
+ abc
+ 0: b
+MK: m(m
+
+/(*PRUNE:m(m)(?&y)(?(DEFINE)(?<y>b))/K
+ abc
+ 0: b
+MK: m(m
+
+/(*SKIP:m(m)(?&y)(?(DEFINE)(?<y>b))/K
+ abc
+ 0: b
+
+/(*THEN:m(m)(?&y)(?(DEFINE)(?<y>b))/K
+ abc
+ 0: b
+MK: m(m
+
+/^\d*\w{4}/
+ 1234
+ 0: 1234
+ 123
+No match
+
+/^[^b]*\w{4}/
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/^[^b]*\w{4}/i
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/^a*\w{4}/
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/^a*\w{4}/i
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/-- End of testinput1 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput10 b/lib/stdlib/test/re_SUITE_data/testoutput10
index dbd59241ad..c1c85f9a3b 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput10
+++ b/lib/stdlib/test/re_SUITE_data/testoutput10
@@ -1,19 +1,18 @@
/-- These are a few representative patterns whose lengths and offsets are to be
shown when the link size is 2. This is just a doublecheck test to ensure the
sizes don't go horribly wrong when something is changed. The pattern contents
-are all themselves checked in other tests. --/
+are all themselves checked in other tests. Unicode, including property support,
+is required for these tests. --/
/((?i)b)/BM
-Memory allocation (code space): 21
+Memory allocation (code space): 17
------------------------------------------------------------------
- 0 17 Bra
- 3 9 CBra 1
- 8 01 Opt
- 10 NC b
- 12 9 Ket
- 15 00 Opt
- 17 17 Ket
- 20 End
+ 0 13 Bra
+ 3 7 CBra 1
+ 8 /i b
+ 10 7 Ket
+ 13 13 Ket
+ 16 End
------------------------------------------------------------------
/(?s)(.*X|^B)/BM
@@ -21,7 +20,7 @@ Memory allocation (code space): 25
------------------------------------------------------------------
0 21 Bra
3 9 CBra 1
- 8 Any*
+ 8 AllAny*
10 X
12 6 Alt
15 ^
@@ -32,21 +31,18 @@ Memory allocation (code space): 25
------------------------------------------------------------------
/(?s:.*X|^B)/BM
-Memory allocation (code space): 29
+Memory allocation (code space): 23
------------------------------------------------------------------
- 0 25 Bra
- 3 9 Bra
- 6 04 Opt
- 8 Any*
- 10 X
- 12 8 Alt
- 15 04 Opt
- 17 ^
- 18 B
- 20 17 Ket
- 23 00 Opt
- 25 25 Ket
- 28 End
+ 0 19 Bra
+ 3 7 Bra
+ 6 AllAny*
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
------------------------------------------------------------------
/^[[:alnum:]]/BM
@@ -115,17 +111,15 @@ Memory allocation (code space): 19
------------------------------------------------------------------
/(x)*+/BM
-Memory allocation (code space): 24
+Memory allocation (code space): 18
------------------------------------------------------------------
- 0 20 Bra
- 3 14 Once
- 6 Brazero
- 7 7 CBra 1
- 12 x
- 14 7 KetRmax
- 17 14 Ket
- 20 20 Ket
- 23 End
+ 0 14 Bra
+ 3 Braposzero
+ 4 7 CBraPos 1
+ 9 x
+ 11 7 KetRpos
+ 14 14 Ket
+ 17 End
------------------------------------------------------------------
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/BM
@@ -172,18 +166,16 @@ Memory allocation (code space): 816
------------------------------------------------------------------
/(a(?1)b)/BM
-Memory allocation (code space): 28
+Memory allocation (code space): 22
------------------------------------------------------------------
- 0 24 Bra
- 3 18 CBra 1
+ 0 18 Bra
+ 3 12 CBra 1
8 a
- 10 6 Once
- 13 3 Recurse
- 16 6 Ket
- 19 b
- 21 18 Ket
- 24 24 Ket
- 27 End
+ 10 3 Recurse
+ 13 b
+ 15 12 Ket
+ 18 18 Ket
+ 21 End
------------------------------------------------------------------
/(a(?1)+b)/BM
@@ -202,7 +194,7 @@ Memory allocation (code space): 28
------------------------------------------------------------------
/a(?P<name1>b|c)d(?P<longername2>e)/BM
-Memory allocation (code space): 42
+Memory allocation (code space): 36
------------------------------------------------------------------
0 32 Bra
3 a
@@ -220,7 +212,7 @@ Memory allocation (code space): 42
------------------------------------------------------------------
/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/BM
-Memory allocation (code space): 54
+Memory allocation (code space): 45
------------------------------------------------------------------
0 41 Bra
3 25 Bra
@@ -240,9 +232,9 @@ Memory allocation (code space): 54
------------------------------------------------------------------
/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 43
+Memory allocation (code space): 34
------------------------------------------------------------------
- 0 36 Bra
+ 0 30 Bra
3 7 CBra 1
8 a
10 7 Ket
@@ -251,12 +243,10 @@ Memory allocation (code space): 43
15 Any
16 \1
19 bbb
- 25 6 Once
- 28 3 Recurse
- 31 6 Ket
- 34 d
- 36 36 Ket
- 39 End
+ 25 3 Recurse
+ 28 d
+ 30 30 Ket
+ 33 End
------------------------------------------------------------------
/abc(?C255)de(?C)f/BM
@@ -327,32 +317,17 @@ Memory allocation (code space): 12
11 End
------------------------------------------------------------------
-/\x{1000000}/8BM
-Memory allocation (code space): 13
-------------------------------------------------------------------
- 0 9 Bra
- 3 \x{1000000}
- 9 9 Ket
- 12 End
-------------------------------------------------------------------
-
-/\x{4000000}/8BM
-Memory allocation (code space): 14
+/\x{10ffff}/8BM
+Memory allocation (code space): 12
------------------------------------------------------------------
- 0 10 Bra
- 3 \x{4000000}
- 10 10 Ket
- 13 End
+ 0 8 Bra
+ 3 \x{10ffff}
+ 8 8 Ket
+ 11 End
------------------------------------------------------------------
-/\x{7fffFFFF}/8BM
-Memory allocation (code space): 14
-------------------------------------------------------------------
- 0 10 Bra
- 3 \x{7fffffff}
- 10 10 Ket
- 13 End
-------------------------------------------------------------------
+/\x{110000}/8BM
+Failed: character value in \x{...} sequence is too large at offset 9
/[\x{ff}]/8BM
Memory allocation (code space): 10
@@ -364,12 +339,12 @@ Memory allocation (code space): 10
------------------------------------------------------------------
/[\x{100}]/8BM
-Memory allocation (code space): 15
+Memory allocation (code space): 10
------------------------------------------------------------------
- 0 11 Bra
- 3 [\x{100}]
- 11 11 Ket
- 14 End
+ 0 6 Bra
+ 3 \x{100}
+ 6 6 Ket
+ 9 End
------------------------------------------------------------------
/\x80/8BM
@@ -399,7 +374,7 @@ Memory allocation (code space): 18
17 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
First char = 'A'
Need char = '.'
@@ -412,9 +387,9 @@ Memory allocation (code space): 19
18 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 237
-Need char = 180
+Options: utf
+First char = \x{ed}
+Need char = \x{b4}
/\x{65e5}\x{672c}\x{8a9e}/D8M
Memory allocation (code space): 19
@@ -425,17 +400,17 @@ Memory allocation (code space): 19
18 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 230
-Need char = 158
+Options: utf
+First char = \x{e6}
+Need char = \x{9e}
/[\x{100}]/8BM
-Memory allocation (code space): 15
+Memory allocation (code space): 10
------------------------------------------------------------------
- 0 11 Bra
- 3 [\x{100}]
- 11 11 Ket
- 14 End
+ 0 6 Bra
+ 3 \x{100}
+ 6 6 Ket
+ 9 End
------------------------------------------------------------------
/[Z\x{100}]/8BM
@@ -537,7 +512,7 @@ Memory allocation (code space): 48
Memory allocation (code space): 25
------------------------------------------------------------------
0 21 Bra
- 3 NC A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
21 21 Ket
24 End
------------------------------------------------------------------
@@ -616,7 +591,7 @@ Memory allocation (code space): 9
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
- 3 \xaa
+ 3 \x{aa}
5 5 Ket
8 End
------------------------------------------------------------------
@@ -652,18 +627,87 @@ Memory allocation (code space): 9
Memory allocation (code space): 9
------------------------------------------------------------------
0 5 Bra
- 3 [^\xaa]
+ 3 [^\x{aa}]
5 5 Ket
8 End
------------------------------------------------------------------
/[^\xaa]/8BM
-Memory allocation (code space): 40
+Memory allocation (code space): 10
------------------------------------------------------------------
- 0 36 Bra
- 3 [\x00-\xa9\xab-\xff] (neg)
- 36 36 Ket
- 39 End
+ 0 6 Bra
+ 3 [^\x{aa}]
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+
+/[^\d]/8WB
+------------------------------------------------------------------
+ 0 11 Bra
+ 3 [^\p{Nd}]
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
-/ End of testinput10 /
+/[[:^alpha:][:^cntrl:]]+/8WB
+------------------------------------------------------------------
+ 0 44 Bra
+ 3 [ -~\x80-\xff\P{L}]+
+ 44 44 Ket
+ 47 End
+------------------------------------------------------------------
+
+/[[:^cntrl:][:^alpha:]]+/8WB
+------------------------------------------------------------------
+ 0 44 Bra
+ 3 [ -~\x80-\xff\P{L}]+
+ 44 44 Ket
+ 47 End
+------------------------------------------------------------------
+
+/[[:alpha:]]+/8WB
+------------------------------------------------------------------
+ 0 12 Bra
+ 3 [\p{L}]+
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+
+/[[:^alpha:]\S]+/8WB
+------------------------------------------------------------------
+ 0 15 Bra
+ 3 [\P{L}\P{Xsp}]+
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+------------------------------------------------------------------
+ 0 73 Bra
+ 3 abc
+ 9 7 CBra 1
+ 14 d
+ 16 5 Alt
+ 19 e
+ 21 12 Ket
+ 24 *THEN
+ 25 x
+ 27 14 CBra 2
+ 32 123
+ 38 *THEN
+ 39 4
+ 41 29 Alt
+ 44 567
+ 50 7 CBra 3
+ 55 b
+ 57 5 Alt
+ 60 q
+ 62 12 Ket
+ 65 *THEN
+ 66 xx
+ 70 43 Ket
+ 73 73 Ket
+ 76 End
+------------------------------------------------------------------
+
+/-- End of testinput11 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput2 b/lib/stdlib/test/re_SUITE_data/testoutput2
index dba227f503..fd958c2eb7 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput2
+++ b/lib/stdlib/test/re_SUITE_data/testoutput2
@@ -1,3 +1,13 @@
+/-- This set of tests is not Perl-compatible. It checks on special features
+ of PCRE's API, error diagnostics, and the compiled code of some patterns.
+ It also checks the non-Perl syntax the PCRE supports (Python, .NET,
+ Oniguruma). Finally, there are some tests where PCRE and Perl differ,
+ either because PCRE can't be compatible, or there is a possible Perl
+ bug.
+
+ NOTE: This is a non-UTF set of tests. When UTF support is needed, use
+ test 5, and if Unicode Property Support is needed, use test 7. --/
+
/(a)b|/I
Capturing subpattern count = 1
No options
@@ -40,28 +50,24 @@ No match
/a+bc/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'c'
/a*bc/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'c'
/a{3}bc/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'c'
/(abc|a+z)/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char = 'a'
No need char
@@ -96,6 +102,36 @@ Failed: missing terminating ] for character class at offset 5
/(?X)[\B]/
Failed: invalid escape sequence in character class at offset 6
+/(?X)[\R]/
+Failed: invalid escape sequence in character class at offset 6
+
+/(?X)[\X]/
+Failed: invalid escape sequence in character class at offset 6
+
+/[\B]/BZ
+------------------------------------------------------------------
+ Bra
+ B
+ Ket
+ End
+------------------------------------------------------------------
+
+/[\R]/BZ
+------------------------------------------------------------------
+ Bra
+ R
+ Ket
+ End
+------------------------------------------------------------------
+
+/[\X]/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ Ket
+ End
+------------------------------------------------------------------
+
/[z-a]/
Failed: range out of order in character class at offset 3
@@ -113,14 +149,12 @@ Failed: unrecognized character after (? or (?- at offset 2
/.*b/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char at start or follows newline
Need char = 'b'
/.*?b/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char at start or follows newline
Need char = 'b'
@@ -140,6 +174,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 3
Starting byte set: c d e
this sentence eventually mentions a cat
0: cat
@@ -151,6 +186,7 @@ Capturing subpattern count = 0
Options: caseless
No first char
No need char
+Subject length lower bound = 3
Starting byte set: C D E c d e
this sentence eventually mentions a CAT cat
0: CAT
@@ -162,6 +198,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b c d
/(a|[^\dZ])/IS
@@ -169,6 +206,7 @@ Capturing subpattern count = 1
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
\x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
\x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
@@ -189,6 +227,7 @@ Capturing subpattern count = 1
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
/(ab\2)/
@@ -324,7 +363,6 @@ No need char
/.*((abc)$|(def))/I
Capturing subpattern count = 3
-Partial matching not supported
No options
First char at start or follows newline
No need char
@@ -338,61 +376,6 @@ No need char
2: <unset>
3: def
-/abc/IP
- abc
- 0: abc
- *** Failers
-No match: POSIX code 17: match failed
-
-/^abc|def/IP
- abcdef
- 0: abc
- abcdef\B
- 0: def
-
-/.*((abc)$|(def))/IP
- defabc
- 0: defabc
- 1: abc
- 2: abc
- \Zdefabc
- 0: def
- 1: def
- 3: def
-
-/the quick brown fox/IP
- the quick brown fox
- 0: the quick brown fox
- *** Failers
-No match: POSIX code 17: match failed
- The Quick Brown Fox
-No match: POSIX code 17: match failed
-
-/the quick brown fox/IPi
- the quick brown fox
- 0: the quick brown fox
- The Quick Brown Fox
- 0: The Quick Brown Fox
-
-/abc.def/IP
- *** Failers
-No match: POSIX code 17: match failed
- abc\ndef
-No match: POSIX code 17: match failed
-
-/abc$/IP
- abc
- 0: abc
- abc\n
- 0: abc
-
-/(abc)\2/IP
-Failed: POSIX code 15: bad back reference at offset 7
-
-/(abc\1)/IP
- abc
-No match: POSIX code 17: match failed
-
/)/
Failed: unmatched parentheses at offset 0
@@ -401,7 +384,6 @@ Failed: missing terminating ] for character class at offset 4
/[^aeiou ]{3,}/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -410,7 +392,6 @@ No need char
/<.*>/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = '<'
Need char = '>'
@@ -419,7 +400,6 @@ Need char = '>'
/<.*?>/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = '<'
Need char = '>'
@@ -428,7 +408,6 @@ Need char = '>'
/<.*>/IU
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
@@ -437,7 +416,6 @@ Need char = '>'
/(?U)<.*>/I
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
@@ -446,7 +424,6 @@ Need char = '>'
/<.*?>/IU
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
@@ -455,7 +432,6 @@ Need char = '>'
/={3,}/IU
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = '='
Need char = '='
@@ -464,7 +440,6 @@ Need char = '='
/(?U)={3,}?/I
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = '='
Need char = '='
@@ -473,6 +448,7 @@ Need char = '='
/(?<!bar|cattle)foo/I
Capturing subpattern count = 0
+Max lookbehind = 6
No options
First char = 'f'
Need char = 'o'
@@ -522,7 +498,6 @@ No need char
/(?s).*/I
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -532,6 +507,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b c d
/(?i)[abcd]/IS
@@ -539,6 +515,7 @@ Capturing subpattern count = 0
Options: caseless
No first char
No need char
+Subject length lower bound = 1
Starting byte set: A B C D a b c d
/(?m)[xy]|(b|c)/IS
@@ -546,6 +523,7 @@ Capturing subpattern count = 1
Options: multiline
No first char
No need char
+Subject length lower bound = 1
Starting byte set: b c x y
/(^a|^b)/Im
@@ -584,7 +562,6 @@ Failed: syntax error in subpattern name (missing terminator) at offset 7
/((?s)blah)\s+\1/I
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
No options
First char = 'b'
Need char = 'h'
@@ -592,7 +569,6 @@ Need char = 'h'
/((?i)blah)\s+\1/I
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
No options
First char = 'b' (caseless)
Need char = 'h' (caseless)
@@ -601,10 +577,8 @@ Need char = 'h' (caseless)
------------------------------------------------------------------
Bra
CBra 1
- 01 Opt
- NC b
+ /i b
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
@@ -612,14 +586,15 @@ Capturing subpattern count = 1
No options
First char = 'b' (caseless)
No need char
-Study returned NULL
+Subject length lower bound = 1
+No set of starting bytes
/(a*b|(?i:c*(?-i)d))/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: C a b c d
/a$/I
@@ -656,6 +631,7 @@ No match
/\Aabc/Im
Capturing subpattern count = 0
+Max lookbehind = 1
Options: anchored multiline
No first char
No need char
@@ -668,7 +644,6 @@ Need char = 'c'
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
Capturing subpattern count = 5
-Partial matching not supported
Options: anchored
No first char
No need char
@@ -682,16 +657,20 @@ No need char
/(?<=foo)[ab]/IS
Capturing subpattern count = 0
+Max lookbehind = 3
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
/(?<!foo)(alpha|omega)/IS
Capturing subpattern count = 1
+Max lookbehind = 3
No options
No first char
Need char = 'a'
+Subject length lower bound = 5
Starting byte set: a o
/(?!alphabet)[ab]/IS
@@ -699,10 +678,12 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
/(?<=foo\n)^bar/Im
Capturing subpattern count = 0
+Max lookbehind = 4
Contains explicit CR or LF match
Options: multiline
No first char
@@ -720,6 +701,7 @@ No match
/^(?<=foo\n)bar/Im
Capturing subpattern count = 0
+Max lookbehind = 4
Contains explicit CR or LF match
Options: multiline
First char at start or follows newline
@@ -762,6 +744,7 @@ Failed: lookbehind assertion is not fixed length at offset 13
/(?<=bullock|donkey)-cart/I
Capturing subpattern count = 0
+Max lookbehind = 7
No options
First char = '-'
Need char = 't'
@@ -778,15 +761,16 @@ No match
/(?<=ab(?i)x|y|z)/I
Capturing subpattern count = 0
+Max lookbehind = 3
No options
No first char
No need char
/(?>.*)(?<=(abcd)|(xyz))/I
Capturing subpattern count = 2
-Partial matching not supported
+Max lookbehind = 4
No options
-First char at start or follows newline
+No first char
No need char
alphabetabcd
0: alphabetabcd
@@ -798,6 +782,7 @@ No need char
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
Capturing subpattern count = 0
+Max lookbehind = 4
No options
First char = 'Z'
Need char = 'Z'
@@ -826,6 +811,7 @@ No match
/(?<!(foo)a)bar/I
Capturing subpattern count = 1
+Max lookbehind = 4
No options
First char = 'b'
Need char = 'r'
@@ -838,23 +824,7 @@ No match
fooabar
No match
-/This one is here because Perl 5.005_02 doesn't fail it/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 't'
-
-/^(a)?(?(1)a|b)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
- *** Failers
-No match
- a
-No match
-
-/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I
+/This one is here because Perl behaves differently; see also the following/I
Capturing subpattern count = 0
No options
First char = 'T'
@@ -866,9 +836,34 @@ Max back reference = 1
Options: anchored
No first char
No need char
+ aaaa
+No match
aaaaaa
- 0: aaaaaa
- 1: aa
+No match
+
+/Perl does not fail these two for the final subjects. Neither did PCRE until/
+/release 8.01. The problem is in backtracking into a subpattern that contains/
+No match
+/a recursive reference to itself. PCRE has now made these into atomic patterns./
+No match
+
+/^(xa|=?\1a){2}$/
+ xa=xaa
+ 0: xa=xaa
+ 1: =xaa
+ ** Failers
+No match
+ xa=xaaa
+No match
+
+/^(xa|=?\1a)+$/
+ xa=xaa
+ 0: xa=xaa
+ 1: =xaa
+ ** Failers
+No match
+ xa=xaaa
+No match
/These are syntax tests from Perl 5.005/I
Capturing subpattern count = 0
@@ -975,9 +970,6 @@ Failed: numbers out of order in {} quantifier at offset 7
/abc/\
Failed: \ at end of pattern at offset 4
-/abc/\P
-Failed: POSIX code 9: bad escape sequence at offset 4
-
/abc/\i
Failed: \ at end of pattern at offset 4
@@ -1003,7 +995,6 @@ copy substring 5 failed -7
/(.{20})/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -1021,7 +1012,6 @@ No need char
/(.{15})/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -1036,7 +1026,6 @@ No need char
/(.{16})/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -1096,14 +1085,13 @@ No first char
No need char
abc\00def\L\C0
0: abc\x00def
- 0C abc (7)
+ 0C abc\x00def (7)
0L abc
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
)?)?)?)?)?)?)?)?)?otherword/I
Capturing subpattern count = 8
-Partial matching not supported
Contains explicit CR or LF match
No options
First char = 'w'
@@ -1118,7 +1106,6 @@ Need char = 'd'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
First char at start or follows newline
Need char = 'X'
@@ -1126,13 +1113,12 @@ Need char = 'X'
/.*X/IDZs
------------------------------------------------------------------
Bra
- Any*
+ AllAny*
X
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored dotall
No first char
Need char = 'X'
@@ -1151,7 +1137,6 @@ Need char = 'X'
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Partial matching not supported
No options
First char at start or follows newline
No need char
@@ -1160,7 +1145,7 @@ No need char
------------------------------------------------------------------
Bra
CBra 1
- Any*
+ AllAny*
X
Alt
^
@@ -1170,7 +1155,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -1179,7 +1163,7 @@ No need char
------------------------------------------------------------------
Bra
CBra 1
- Any*
+ AllAny*
X
Alt
^
@@ -1189,7 +1173,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -1198,26 +1181,23 @@ No need char
------------------------------------------------------------------
Bra
Bra
- 04 Opt
- Any*
+ AllAny*
X
Alt
- 04 Opt
^
B
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-No options
-First char at start or follows newline
+Options: anchored
+No first char
No need char
/\Biss\B/I+
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
@@ -1225,11 +1205,6 @@ Need char = 's'
0: iss
0+ issippi
-/\Biss\B/I+P
- Mississippi
- 0: iss
- 0+ issippi
-
/iss/IG+
Capturing subpattern count = 0
No options
@@ -1243,6 +1218,7 @@ Need char = 's'
/\Biss\B/IG+
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
@@ -1252,6 +1228,7 @@ Need char = 's'
/\Biss\B/Ig+
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
@@ -1267,6 +1244,7 @@ No match
/(?<=[Ms])iss/Ig+
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
@@ -1278,6 +1256,7 @@ Need char = 's'
/(?<=[Ms])iss/IG+
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = 'i'
Need char = 's'
@@ -1296,7 +1275,6 @@ No need char
/.*iss/Ig+
Capturing subpattern count = 0
-Partial matching not supported
No options
First char at start or follows newline
Need char = 's'
@@ -1360,7 +1338,7 @@ Capturing subpattern count = 0
Contains explicit CR or LF match
Options: multiline
First char at start or follows newline
-Need char = 10
+Need char = \x0a
ab\nab\ncd
0: ab\x0a
0+ ab\x0acd
@@ -1399,42 +1377,36 @@ Need char = 'c'
/a*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
/a+/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
/(baa|a+)/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
Need char = 'a'
/a{0,3}/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
/baa{3,}/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'b'
Need char = 'a'
/"([^\\"]+|\\.)*"/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char = '"'
Need char = '"'
@@ -1465,6 +1437,7 @@ Need char = 'r'
/...(?<=abc)/I
Capturing subpattern count = 0
+Max lookbehind = 3
No options
No first char
No need char
@@ -1489,70 +1462,60 @@ Need char = 'b'
/abc*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
/ab.c*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
/a.c*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
/.c*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
/ac*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
/(a.c*|b.c*)/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
/a.c*|aba/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
/.+a/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'a'
/(?=abcda)a.*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'a'
/(?=a)a.*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
@@ -1565,14 +1528,12 @@ No need char
/a\d*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
/ab\d*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -1591,7 +1552,6 @@ Need char = 'd'
/ab\d+/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -1666,39 +1626,13 @@ No need char
\Nabc
No match
-/a*(b+)(z)(z)/IP
- aaaabbbbzzzz
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O0
- aaaabbbbzzzz\O1
- 0: aaaabbbbzz
- aaaabbbbzzzz\O2
- 0: aaaabbbbzz
- 1: bbbb
- aaaabbbbzzzz\O3
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- aaaabbbbzzzz\O4
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
- aaaabbbbzzzz\O5
- 0: aaaabbbbzz
- 1: bbbb
- 2: z
- 3: z
-
/^.?abcd/IS
Capturing subpattern count = 0
Options: anchored
No first char
Need char = 'd'
-Study returned NULL
+Subject length lower bound = 4
+No set of starting bytes
/\( # ( at start
(?: # Non-capturing bracket
@@ -1709,7 +1643,6 @@ Study returned NULL
\) # Closing )
/Ix
Capturing subpattern count = 0
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1738,7 +1671,6 @@ No match
/\( ( (?>[^()]+) | (?R) )* \) /Ixg
Capturing subpattern count = 1
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1753,7 +1685,6 @@ Need char = ')'
/\( (?: (?>[^()]+) | (?R) ) \) /Ix
Capturing subpattern count = 0
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1772,7 +1703,6 @@ No match
/\( (?: (?>[^()]+) | (?R) )? \) /Ix
Capturing subpattern count = 0
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1783,7 +1713,6 @@ Need char = ')'
/\( ( (?>[^()]+) | (?R) )* \) /Ix
Capturing subpattern count = 1
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1793,7 +1722,6 @@ Need char = ')'
/\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 2
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1804,7 +1732,6 @@ Need char = ')'
/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1821,7 +1748,6 @@ Need char = ')'
/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1838,7 +1764,6 @@ Need char = ')'
/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
Capturing subpattern count = 11
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1858,7 +1783,6 @@ Need char = ')'
/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
Capturing subpattern count = 3
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1866,11 +1790,9 @@ Need char = ')'
0: (abcd(xyz<p>qrs)123)
1: abcd(xyz<p>qrs)123
2: 123
- 3: <unset>
/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
Capturing subpattern count = 3
-Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1942,6 +1864,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
_ a b c d e f g h i j k l m n o p q r s t u v w x y z
@@ -2003,6 +1926,7 @@ Contains explicit CR or LF match
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: \x09 \x0a \x0b \x0c \x0d \x20
/^[[:cntrl:]]/DZ
@@ -2249,7 +2173,6 @@ Need char = 'd'
/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
Capturing subpattern count = 271
Max back reference = 270
-Partial matching not supported
No options
No first char
No need char
@@ -2746,8 +2669,7 @@ No need char
------------------------------------------------------------------
Bra
a
- 01 Opt
- NC b
+ /i b
Ket
End
------------------------------------------------------------------
@@ -2769,10 +2691,8 @@ No match
Bra
CBra 1
a
- 01 Opt
- NC b
+ /i b
Ket
- 00 Opt
Ket
End
------------------------------------------------------------------
@@ -2794,7 +2714,7 @@ No match
/ (?i)abc/IxDZ
------------------------------------------------------------------
Bra
- NC abc
+ /i abc
Ket
End
------------------------------------------------------------------
@@ -2807,7 +2727,7 @@ Need char = 'c' (caseless)
(?i)abc/IxDZ
------------------------------------------------------------------
Bra
- NC abc
+ /i abc
Ket
End
------------------------------------------------------------------
@@ -2930,7 +2850,6 @@ Need char = 'c'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -2959,7 +2878,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'x'
No need char
@@ -2975,7 +2893,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'x'
No need char
@@ -2983,12 +2900,10 @@ No need char
/(x)*+/DZ
------------------------------------------------------------------
Bra
- Once
- Brazero
- CBra 1
+ Braposzero
+ CBraPos 1
x
- KetRmax
- Ket
+ KetRpos
Ket
End
------------------------------------------------------------------
@@ -2999,7 +2914,6 @@ No need char
/^(\w++|\s++)*$/I
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored
No first char
No need char
@@ -3013,7 +2927,6 @@ No match
/(\d++)(\w)/I
Capturing subpattern count = 2
-Partial matching not supported
No options
No first char
No need char
@@ -3028,7 +2941,6 @@ No match
/a++b/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -3037,7 +2949,6 @@ Need char = 'b'
/(a++b)/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -3047,7 +2958,6 @@ Need char = 'b'
/(a++)b/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -3057,7 +2967,6 @@ Need char = 'b'
/([^()]++|\([^()]*\))+/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -3067,7 +2976,6 @@ No need char
/\(([^()]++|\([^()]+\))+\)/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char = '('
Need char = ')'
@@ -3130,7 +3038,6 @@ Failed: nothing to repeat at offset 7
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'x'
Need char = 'b'
@@ -3147,7 +3054,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: ungreedy
First char = 'x'
Need char = 'b'
@@ -3176,7 +3082,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 5
-Partial matching not supported
Options: anchored
No first char
No need char
@@ -3192,7 +3097,6 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored
No first char
Need char = 'b'
@@ -3210,7 +3114,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored
No first char
Need char = 'b'
@@ -3225,19 +3128,19 @@ Failed: POSIX collating elements are not supported at offset 0
Failed: POSIX named classes are supported only within a class at offset 0
/\l/I
-Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
/\L/I
-Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
/\N{name}/I
-Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
/\u/I
-Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
/\U/I
-Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
/[/I
Failed: missing terminating ] for character class at offset 1
@@ -3286,7 +3189,6 @@ No need char
/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
Capturing subpattern count = 0
-Partial matching not supported
Options: extended
First char = '<'
Need char = '>'
@@ -3316,6 +3218,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = '8'
Need char = 'X'
@@ -3329,6 +3232,7 @@ Need char = 'X'
End
------------------------------------------------------------------
Capturing subpattern count = 0
+Max lookbehind = 1
No options
First char = '$'
Need char = 'X'
@@ -3336,14 +3240,12 @@ Need char = 'X'
/(.*)\d+\1/I
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
No options
No first char
No need char
/(.*)\d+/I
Capturing subpattern count = 1
-Partial matching not supported
No options
First char at start or follows newline
No need char
@@ -3351,14 +3253,12 @@ No need char
/(.*)\d+\1/Is
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
Options: dotall
No first char
No need char
/(.*)\d+/Is
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -3366,7 +3266,6 @@ No need char
/(.*(xyz))\d+\2/I
Capturing subpattern count = 2
Max back reference = 2
-Partial matching not supported
No options
First char at start or follows newline
Need char = 'z'
@@ -3374,7 +3273,6 @@ Need char = 'z'
/((.*))\d+\1/I
Capturing subpattern count = 2
Max back reference = 1
-Partial matching not supported
No options
No first char
No need char
@@ -3391,7 +3289,6 @@ Need char = 'b'
/(?=a).*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
First char = 'a'
No need char
@@ -3497,6 +3394,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
/[^a]/I
@@ -3516,6 +3414,7 @@ Capturing subpattern count = 0
No options
No first char
Need char = '6'
+Subject length lower bound = 4
Starting byte set: 0 1 2 3 4 5 6 7 8 9
/a^b/I
@@ -3549,6 +3448,7 @@ Capturing subpattern count = 0
Options: caseless
No first char
No need char
+Subject length lower bound = 1
Starting byte set: A B a b
/[ab](?i)cd/IS
@@ -3556,6 +3456,7 @@ Capturing subpattern count = 0
No options
No first char
Need char = 'd' (caseless)
+Subject length lower bound = 3
Starting byte set: a b
/abc(?C)def/I
@@ -3591,7 +3492,27 @@ Need char = 'f'
1 ^ ^ f
0: abcdef
-/(?C1)\dabc(?C2)def/I
+/(?C1)\dabc(?C2)def/IS
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'f'
+Subject length lower bound = 7
+Starting byte set: 0 1 2 3 4 5 6 7 8 9
+ 1234abcdef
+--->1234abcdef
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 2 ^ ^ d
+ 0: 4abcdef
+ *** Failers
+No match
+ abcdef
+No match
+
+/(?C1)\dabc(?C2)def/ISS
Capturing subpattern count = 0
No options
No first char
@@ -3713,7 +3634,6 @@ No need char
/(\d{3}(?C))*/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -3828,6 +3748,7 @@ Callout 2: last capture = -1
/(?<=(abc)(?C))xyz/I
Capturing subpattern count = 1
+Max lookbehind = 3
No options
First char = 'x'
Need char = 'z'
@@ -3842,7 +3763,6 @@ Callout 0: last capture = 1
/a(b+)(c*)(?C1)/I
Capturing subpattern count = 2
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -3868,7 +3788,6 @@ No match
/a(b+?)(c*?)(?C1)/I
Capturing subpattern count = 2
-Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -3909,6 +3828,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
/(?R)/I
@@ -3997,9 +3917,7 @@ Need char = '<'
Bra
CBra 1
a
- Once
Recurse
- Ket
b
Ket
Ket
@@ -4028,43 +3946,8 @@ No options
First char = 'a'
Need char = 'b'
-/^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii
-Capturing subpattern count = 4
-Max back reference = 4
-Partial matching not supported
-Options: anchored caseless
-No first char
-No need char
- 1221
- 0: 1221
- 1: 1221
- 2: 1
- Satan, oscillate my metallic sonatas!
- 0: Satan, oscillate my metallic sonatas!
- 1: <unset>
- 2: <unset>
- 3: Satan, oscillate my metallic sonatas
- 4: S
- A man, a plan, a canal: Panama!
- 0: A man, a plan, a canal: Panama!
- 1: <unset>
- 2: <unset>
- 3: A man, a plan, a canal: Panama
- 4: A
- Able was I ere I saw Elba.
- 0: Able was I ere I saw Elba.
- 1: <unset>
- 2: <unset>
- 3: Able was I ere I saw Elba
- 4: A
- *** Failers
-No match
- The quick brown fox
-No match
-
/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
Capturing subpattern count = 2
-Partial matching not supported
Options: anchored
No first char
No need char
@@ -4105,7 +3988,6 @@ No match
/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
Capturing subpattern count = 2
-Partial matching not supported
Options: extended
First char = '<'
Need char = '>'
@@ -4256,9 +4138,7 @@ Need char = 'a'
Any
\1
bbb
- Once
Recurse
- Ket
d
Ket
End
@@ -4279,7 +4159,6 @@ Named capturing subpatterns:
one 1
three 3
two 2
-Partial matching not supported
Options: anchored caseless
No first char
No need char
@@ -4325,7 +4204,6 @@ No need char
/(.*)a/Is
Capturing subpattern count = 1
-Partial matching not supported
Options: anchored dotall
No first char
Need char = 'a'
@@ -4333,7 +4211,6 @@ Need char = 'a'
/(.*)a\1/Is
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
Options: dotall
No first char
Need char = 'a'
@@ -4341,14 +4218,12 @@ Need char = 'a'
/(.*)a(b)\2/Is
Capturing subpattern count = 2
Max back reference = 2
-Partial matching not supported
Options: anchored dotall
No first char
Need char = 'b'
/((.*)a|(.*)b)z/Is
Capturing subpattern count = 3
-Partial matching not supported
Options: anchored dotall
No first char
Need char = 'z'
@@ -4356,7 +4231,6 @@ Need char = 'z'
/((.*)a|(.*)b)z\1/Is
Capturing subpattern count = 3
Max back reference = 1
-Partial matching not supported
Options: dotall
No first char
Need char = 'z'
@@ -4364,7 +4238,6 @@ Need char = 'z'
/((.*)a|(.*)b)z\2/Is
Capturing subpattern count = 3
Max back reference = 2
-Partial matching not supported
Options: dotall
No first char
Need char = 'z'
@@ -4372,7 +4245,6 @@ Need char = 'z'
/((.*)a|(.*)b)z\3/Is
Capturing subpattern count = 3
Max back reference = 3
-Partial matching not supported
Options: dotall
No first char
Need char = 'z'
@@ -4380,14 +4252,12 @@ Need char = 'z'
/((.*)a|^(.*)b)z\3/Is
Capturing subpattern count = 3
Max back reference = 3
-Partial matching not supported
Options: anchored dotall
No first char
Need char = 'z'
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
Capturing subpattern count = 31
-Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -4395,7 +4265,6 @@ No need char
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
Capturing subpattern count = 31
Max back reference = 31
-Partial matching not supported
Options: dotall
No first char
No need char
@@ -4403,7 +4272,6 @@ No need char
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
Capturing subpattern count = 32
Max back reference = 32
-Partial matching not supported
Options: dotall
No first char
No need char
@@ -4470,7 +4338,6 @@ Need char = 'c'
/(a+)*zz/I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
Need char = 'z'
@@ -4481,7 +4348,7 @@ Minimum match() recursion limit = 6
1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaz\M
Minimum match() limit = 32768
-Minimum match() recursion limit = 42
+Minimum match() recursion limit = 29
No match
/(aaa(?C1)bbb|ab)/I
@@ -4607,7 +4474,6 @@ Failed: two named subpatterns have the same name at offset 30
Capturing subpattern count = 3
Named capturing subpatterns:
elem 2
-Partial matching not supported
No options
First char = '['
Need char = ']'
@@ -4625,7 +4491,6 @@ No match
Capturing subpattern count = 3
Named capturing subpatterns:
elem 2
-Partial matching not supported
No options
First char = '['
Need char = ']'
@@ -4645,9 +4510,7 @@ Need char = ']'
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4667,9 +4530,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
KetRmax
@@ -4690,9 +4551,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4701,9 +4560,7 @@ No need char
a
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -4732,7 +4589,6 @@ No need char
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
Capturing subpattern count = 3
-Partial matching not supported
Options: caseless
No first char
Need char = 'g' (caseless)
@@ -4742,11 +4598,11 @@ Need char = 'g' (caseless)
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
Capturing subpattern count = 3
-Partial matching not supported
Options: caseless
No first char
Need char = 'g' (caseless)
-Study returned NULL
+Subject length lower bound = 8
+No set of starting bytes
Baby Bjorn Active Carrier - With free SHIPPING!!
0: Baby Bjorn Active Carrier - With free SHIPPING!!
1: Baby Bjorn Active Carrier - With free SHIPPING!!
@@ -4761,11 +4617,11 @@ Study returned NULL
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'b'
-Study returned NULL
+Subject length lower bound = 1
+No set of starting bytes
/(a|b)*.?c/ISDZ
------------------------------------------------------------------
@@ -4785,7 +4641,8 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'c'
-Study returned NULL
+Subject length lower bound = 1
+No set of starting bytes
/abc(?C255)de(?C)f/DZ
------------------------------------------------------------------
@@ -4842,7 +4699,51 @@ Need char = 'e'
+4 ^ ^ e
No match
-/a*b/ICDZ
+/a*b/ICDZS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 2
+ a*+
+ Callout 255 2 1
+ b
+ Callout 255 3 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options:
+No first char
+Need char = 'b'
+Subject length lower bound = 1
+Starting byte set: a b
+ ab
+--->ab
+ +0 ^ a*
+ +2 ^^ b
+ +3 ^ ^
+ 0: ab
+ aaaab
+--->aaaab
+ +0 ^ a*
+ +2 ^ ^ b
+ +3 ^ ^
+ 0: aaaab
+ aaaacb
+--->aaaacb
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +0 ^ a*
+ +2 ^^ b
+ +0 ^ a*
+ +2 ^ b
+ +3 ^^
+ 0: b
+
+/a*b/ICDZSS
------------------------------------------------------------------
Bra
Callout 255 0 2
@@ -4854,7 +4755,6 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options:
No first char
Need char = 'b'
@@ -4899,7 +4799,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options:
First char = 'a'
Need char = 'b'
@@ -4927,7 +4826,83 @@ Need char = 'b'
+2 ^^ b
No match
-/(abc|def)x/ICDZ
+/(abc|def)x/ICDZS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 9
+ CBra 1
+ Callout 255 1 1
+ a
+ Callout 255 2 1
+ b
+ Callout 255 3 1
+ c
+ Callout 255 4 0
+ Alt
+ Callout 255 5 1
+ d
+ Callout 255 6 1
+ e
+ Callout 255 7 1
+ f
+ Callout 255 8 0
+ Ket
+ Callout 255 9 1
+ x
+ Callout 255 10 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+Need char = 'x'
+Subject length lower bound = 4
+Starting byte set: a d
+ abcx
+--->abcx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
++10 ^ ^
+ 0: abcx
+ 1: abc
+ defx
+--->defx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
++10 ^ ^
+ 0: defx
+ 1: def
+ ** Failers
+No match
+ abcdefzx
+--->abcdefzx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
+No match
+
+/(abc|def)x/ICDZSS
------------------------------------------------------------------
Bra
Callout 255 0 9
@@ -4981,6 +4956,8 @@ Need char = 'x'
+10 ^ ^
0: defx
1: def
+ ** Failers
+No match
abcdefzx
--->abcdefzx
+0 ^ (abc|def)
@@ -5081,7 +5058,58 @@ No need char
0: abcdcdcd
1: cd
-/([ab]{,4}c|xy)/ICDZ
+/([ab]{,4}c|xy)/ICDZS
+------------------------------------------------------------------
+ Bra
+ Callout 255 0 14
+ CBra 1
+ Callout 255 1 4
+ [ab]
+ Callout 255 5 1
+ {
+ Callout 255 6 1
+ ,
+ Callout 255 7 1
+ 4
+ Callout 255 8 1
+ }
+ Callout 255 9 1
+ c
+ Callout 255 10 0
+ Alt
+ Callout 255 11 1
+ x
+ Callout 255 12 1
+ y
+ Callout 255 13 0
+ Ket
+ Callout 255 14 0
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b x
+ Note: that { does NOT introduce a quantifier
+--->Note: that { does NOT introduce a quantifier
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+No match
+
+/([ab]{,4}c|xy)/ICDZSS
------------------------------------------------------------------
Bra
Callout 255 0 14
@@ -5337,7 +5365,6 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Partial matching not supported
Options:
No first char
Need char = '3'
@@ -5369,7 +5396,7 @@ Need char = '3'
/\b.*/I
Capturing subpattern count = 0
-Partial matching not supported
+Max lookbehind = 1
No options
No first char
No need char
@@ -5378,7 +5405,7 @@ No need char
/\b.*/Is
Capturing subpattern count = 0
-Partial matching not supported
+Max lookbehind = 1
Options: dotall
No first char
No need char
@@ -5387,7 +5414,6 @@ No need char
/(?!.bcd).*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5400,15 +5426,15 @@ No options
First char = 'a'
Need char = 'e'
ab\P
-Partial match
+Partial match: ab
abc\P
-Partial match
+Partial match: abc
abcd\P
-Partial match
+Partial match: abcd
abcde\P
0: abcde
the quick brown abc\P
-Partial match
+Partial match: abc
** Failers\P
No match
the quick brown abxyz fox\P
@@ -5433,23 +5459,23 @@ Need char = '/'
1: 02
2: 05
1\P
-Partial match
+Partial match: 1
1/2\P
-Partial match
+Partial match: 1/2
1/2/0\P
-Partial match
+Partial match: 1/2/0
1/2/04\P
0: 1/2/04
1: 1
2: 2
0\P
-Partial match
+Partial match: 0
02/\P
-Partial match
+Partial match: 02/
02/0\P
-Partial match
+Partial match: 02/0
02/1\P
-Partial match
+Partial match: 02/1
** Failers\P
No match
\P
@@ -5471,28 +5497,24 @@ No match
/0{0,2}ABC/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'C'
/\d{3,}ABC/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'C'
/\d*ABC/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'C'
/[abc]+DE/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = 'E'
@@ -5505,13 +5527,13 @@ Need char = '3'
123\P
0: 123
a\P
-Partial match
+Partial match: a
b\P
-Partial match
+Partial match: b
c\P
-Partial match
+Partial match: c
c12\P
-Partial match
+Partial match: c12
c123\P
0: c123
@@ -5521,17 +5543,17 @@ Options: anchored
No first char
Need char = 'X'
1\P
-Partial match
+Partial match: 1
123\P
-Partial match
+Partial match: 123
123X
0: 123X
1234\P
-Partial match
+Partial match: 1234
1234X
0: 1234X
12345\P
-Partial match
+Partial match: 12345
12345X
0: 12345X
*** Failers
@@ -5541,14 +5563,33 @@ No match
123456\P
No match
-/abc/I>testsavedregex
+/abc/IS>testsavedregex
Capturing subpattern count = 0
No options
First char = 'a'
Need char = 'c'
-Compiled regex written to testsavedregex
+Subject length lower bound = 3
+No set of starting bytes
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
<testsavedregex
-Compiled regex loaded from testsavedregex
+Compiled pattern loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/abc/ISS>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
No study data
abc
0: abc
@@ -5557,14 +5598,33 @@ No match
bca
No match
-/abc/IF>testsavedregex
+/abc/IFS>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Subject length lower bound = 3
+No set of starting bytes
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/abc/IFSS>testsavedregex
Capturing subpattern count = 0
No options
First char = 'a'
Need char = 'c'
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
No study data
abc
0: abc
@@ -5578,11 +5638,12 @@ Capturing subpattern count = 1
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
Study data written to testsavedregex
<testsavedregex
-Compiled regex loaded from testsavedregex
+Compiled pattern loaded from testsavedregex
Study data loaded from testsavedregex
abc
0: a
@@ -5593,16 +5654,35 @@ Study data loaded from testsavedregex
def
No match
+/(a|b)/ISS>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+No study data
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
/(a|b)/ISF>testsavedregex
Capturing subpattern count = 1
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b
-Compiled regex written to testsavedregex
+Compiled pattern written to testsavedregex
Study data written to testsavedregex
<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
Study data loaded from testsavedregex
abc
0: a
@@ -5613,14 +5693,31 @@ Study data loaded from testsavedregex
def
No match
+/(a|b)/ISSF>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+No study data
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
~<(\w+)/?>(.)*</(\1)>~smgI
Capturing subpattern count = 3
Max back reference = 1
-Partial matching not supported
Options: multiline dotall
First char = '<'
Need char = '>'
- <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+ \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite>
1: seite
2: \x0a
@@ -5669,24 +5766,6 @@ No match
line one\nthis is a line\nbreak in the second line
No match
-/ab.cd/IP
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ** Failers
-No match: POSIX code 17: match failed
- ab\ncd
-No match: POSIX code 17: match failed
-
-/ab.cd/IPs
- ab-cd
- 0: ab-cd
- ab=cd
- 0: ab=cd
- ab\ncd
- 0: ab\x0acd
-
/(?i)(?-i)AbCd/I
Capturing subpattern count = 0
No options
@@ -5923,7 +6002,6 @@ Matched, but too many substrings
/[^()]*(?:\((?R)\)[^()]*)*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5936,7 +6014,6 @@ No need char
/[^()]*(?:\((?>(?R))\)[^()]*)*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5947,7 +6024,6 @@ No need char
/[^()]*(?:\((?R)\))*[^()]*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5958,7 +6034,6 @@ No need char
/(?:\((?R)\))*[^()]*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5971,7 +6046,6 @@ No need char
/(?:\((?R)\))|[^()]*/I
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
No need char
@@ -5984,21 +6058,10 @@ No need char
((this))
0: ((this))
-/a(b)c/IPN
- abc
-Matched with REG_NOSUB
-
-/a(?P<name>b)c/IPN
- abc
-Matched with REG_NOSUB
-
-/\x{100}/I
-Failed: character value in \x{...} sequence is too large at offset 6
-
/\x{0000ff}/I
Capturing subpattern count = 0
No options
-First char = 255
+First char = \xff
No need char
/^((?P<A>a1)|(?P<A>a2)b)/I
@@ -6108,7 +6171,7 @@ no parentheses with name "Z"
0: a1
1: a1
2: a1
-copy substring Z failed -7
+get substring Z failed -7
G a1 (2) A
/^(?P<A>a)(?P<A>b)/IJ
@@ -6140,7 +6203,7 @@ No need char
G a (1) A
cd\GA
0: cd
-copy substring A failed -7
+get substring A failed -7
/^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
Capturing subpattern count = 4
@@ -6308,15 +6371,12 @@ No need char
9:
10: Y
-/\777/I
-Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
-
/\s*,\s*/IS
Capturing subpattern count = 0
-Partial matching not supported
No options
No first char
Need char = ','
+Subject length lower bound = 1
Starting byte set: \x09 \x0a \x0c \x0d \x20 ,
\x0b,\x0b
0: ,
@@ -6443,7 +6503,6 @@ Unknown newline type at: <bad>
/.*/I<lf>
Capturing subpattern count = 0
-Partial matching not supported
Options:
Forced newline sequence: LF
First char at start or follows newline
@@ -6469,7 +6528,6 @@ No need char
/\w+(.)(.)?def/Is
Capturing subpattern count = 2
-Partial matching not supported
Options: dotall
No first char
Need char = 'f'
@@ -6486,7 +6544,6 @@ Need char = 'f'
+((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
@@ -6621,10 +6678,10 @@ No need char
/(a*b|(?i:c*(?-i)d))/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: C a b c d
/()[ab]xyz/IS
@@ -6632,6 +6689,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b
/(|)[ab]xyz/IS
@@ -6639,6 +6697,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b
/(|c)[ab]xyz/IS
@@ -6646,6 +6705,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b c
/(|c?)[ab]xyz/IS
@@ -6653,6 +6713,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b c
/(d?|c?)[ab]xyz/IS
@@ -6660,6 +6721,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b c d
/(d?|c)[ab]xyz/IS
@@ -6667,6 +6729,7 @@ Capturing subpattern count = 1
No options
No first char
Need char = 'z'
+Subject length lower bound = 4
Starting byte set: a b c d
/^a*b\d/DZ
@@ -6680,7 +6743,6 @@ Starting byte set: a b c d
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored
No first char
Need char = 'b'
@@ -6696,7 +6758,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored
No first char
Need char = 'b'
@@ -6712,7 +6773,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored
No first char
Need char = 'b'
@@ -6728,7 +6788,6 @@ Need char = 'b'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored
No first char
Need char = 'A'
@@ -6743,14 +6802,13 @@ No match
------------------------------------------------------------------
Bra
^
- a*
- NC A
+ /i a*
+ /i A
\d
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
Options: anchored caseless
No first char
Need char = 'A' (caseless)
@@ -6761,34 +6819,34 @@ Need char = 'A' (caseless)
/(a*|b*)[cd]/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b c d
/(a+|b*)[cd]/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b c d
/(a*|b+)[cd]/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: a b c d
/(a+|b+)[cd]/IS
Capturing subpattern count = 1
-Partial matching not supported
No options
No first char
No need char
+Subject length lower bound = 2
Starting byte set: a b
/((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
@@ -7373,8 +7431,8 @@ Matched, but too many substrings
/[^a]+a/BZi
------------------------------------------------------------------
Bra
- [^A]++
- NC a
+ /i [^a]++
+ /i a
Ket
End
------------------------------------------------------------------
@@ -7382,8 +7440,8 @@ Matched, but too many substrings
/[^a]+A/BZi
------------------------------------------------------------------
Bra
- [^A]++
- NC A
+ /i [^a]++
+ /i A
Ket
End
------------------------------------------------------------------
@@ -7578,9 +7636,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
[()]
CBra 1
Ket
@@ -7594,7 +7650,7 @@ No match
^
CBra 1
Cond
- 2 Cond ref
+ 2 Cond nref
y
Ket
[()]
@@ -7614,9 +7670,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
()
CBra 1
Ket
@@ -7628,9 +7682,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
[(\]a]
CBra 1
Ket
@@ -7643,9 +7695,7 @@ No match
------------------------------------------------------------------
Bra
^
- Once
Recurse
- Ket
CBra 1
Ket
Ket
@@ -7660,7 +7710,6 @@ Named capturing subpatterns:
one 1
three 3
two 2
-Partial matching not supported
Options: anchored caseless
No first char
No need char
@@ -7694,7 +7743,6 @@ No match
/(?=(\w+))\1:/I
Capturing subpattern count = 1
Max back reference = 1
-Partial matching not supported
No options
No first char
Need char = ':'
@@ -7707,7 +7755,6 @@ Capturing subpattern count = 1
Max back reference = 1
Named capturing subpatterns:
abc 1
-Partial matching not supported
No options
No first char
Need char = ':'
@@ -7715,20 +7762,6 @@ Need char = ':'
0: abcd:
1: abcd
-/(?'abc'\w+):\k<abc>{2}/
- a:aaxyz
- 0: a:aa
- 1: a
- ab:ababxyz
- 0: ab:abab
- 1: ab
- ** Failers
-No match
- a:axyz
-No match
- ab:abxyz
-No match
-
/(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
adaa
0: adaa
@@ -7755,13 +7788,6 @@ No match
bddd
No match
-/^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
- abd
- 0: abd
- 1: a
- ce
- 0: ce
-
/(?(<bc))/
Failed: malformed number or name after (?( at offset 6
@@ -7792,24 +7818,6 @@ Failed: reference to non-existent subpattern at offset 29
1: abcabc1Xabc2XabcX
2: abcabc1Xabc2XabcX
-/^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
- abcd
- 0: ab
- 1: <unset>
- 2: <unset>
-
-/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
- (?(DEFINE)
- (?<NAME_PAT>[a-z]+)
- (?<ADDRESS_PAT>\d+)
- )/x
- metcalfe 33
- 0: metcalfe 33
- 1: metcalfe
- 2: 33
- 3: <unset>
- 4: <unset>
-
/^(?(DEFINE) abc | xyz ) /x
Failed: DEFINE group contains more than one branch at offset 22
@@ -7819,9 +7827,6 @@ Options: extended
First char = 'x'
Need char = 'z'
-/(?(DEFINE) abc){3} xyz/x
-Failed: repeating a DEFINE group is not allowed at offset 17
-
/(a|)*\d/
\O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
No match
@@ -7851,7 +7856,7 @@ No match
No match
/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
0: abc1
0: abc2
0: abc3
@@ -7861,7 +7866,7 @@ No match
0: abc7
/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
0: abc1
0: abc2
0: abc3
@@ -7987,46 +7992,6 @@ Need char = 'P'
0: PXP
1: P
-/(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
- 1.2.3.4
- 0: 1.2.3.4
- 1: <unset>
- 2: .4
- 131.111.10.206
- 0: 131.111.10.206
- 1: <unset>
- 2: .206
- 10.0.0.0
- 0: 10.0.0.0
- 1: <unset>
- 2: .0
- ** Failers
-No match
- 10.6
-No match
- 455.3.4.5
-No match
-
-/\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
- 1.2.3.4
- 0: 1.2.3.4
- 1: .4
- 2: <unset>
- 131.111.10.206
- 0: 131.111.10.206
- 1: .206
- 2: <unset>
- 10.0.0.0
- 0: 10.0.0.0
- 1: .0
- 2: <unset>
- ** Failers
-No match
- 10.6
-No match
- 455.3.4.5
-No match
-
/(?:a(?&abc)b)*(?<abc>x)/
123axbaxbaxbx456
0: axbaxbaxbx
@@ -8064,23 +8029,17 @@ No match
DEFabcABCXYZ
No match
-/^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
- ababababbbabZXXXX
- 0: ababababbbabZ
- 1: ab
- 2: b
-
/^(a)\g-2/
Failed: reference to non-existent subpattern at offset 7
/^(a)\g/
-Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 5
+Failed: a numbered reference must not be zero at offset 5
/^(a)\g{0}/
-Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 7
+Failed: a numbered reference must not be zero at offset 8
/^(a)\g{3/
-Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 8
+Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8
/^(a)\g{4a}/
Failed: reference to non-existent subpattern at offset 9
@@ -8163,7 +8122,7 @@ No match
0+
/abc.$/mgx<anycrlf>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
0: abc1
0: abc4
0: abc5
@@ -8185,10 +8144,8 @@ No match
Alt
c
Ket
- Once
Recurse
Ket
- Ket
End
------------------------------------------------------------------
abc
@@ -8199,9 +8156,7 @@ No match
------------------------------------------------------------------
Bra
xy
- Once
Recurse
- Ket
CBra 1
abc
Ket
@@ -8217,13 +8172,13 @@ No match
No match
/x(?-0)y/
-Failed: (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number at offset 5
+Failed: a numbered reference must not be zero at offset 5
/x(?-1)y/
Failed: reference to non-existent subpattern at offset 5
/x(?+0)y/
-Failed: (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number at offset 5
+Failed: a numbered reference must not be zero at offset 5
/x(?+1)y/
Failed: reference to non-existent subpattern at offset 5
@@ -8325,26 +8280,6 @@ Failed: reference to non-existent subpattern at offset 7
0: Y!
1: !
-/(foo)\Kbar/
- foobar
- 0: bar
- 1: foo
-
-/(foo)(\Kbar|baz)/
- foobar
- 0: bar
- 1: foo
- 2: bar
- foobaz
- 0: foobaz
- 1: foo
- 2: baz
-
-/(foo\Kbar)baz/
- foobarbaz
- 0: barbaz
- 1: foobar
-
/(?<A>tom|bon)-\k{A}/
tom-tom
0: tom-tom
@@ -8357,14 +8292,6 @@ No match
tom-bon
No match
-/(?<A>tom|bon)-\g{A}/
- tom-tom
- 0: tom-tom
- 1: tom
- bon-bon
- 0: bon-bon
- 1: bon
-
/\g{A/
Failed: syntax error in subpattern name (missing terminator) at offset 4
@@ -8459,142 +8386,6 @@ Failed: syntax error in subpattern name (missing terminator) at offset 4
3: <unset>
4: x
-/(?|(abc)|(xyz))\1/
- abcabc
- 0: abcabc
- 1: abc
- xyzxyz
- 0: xyzxyz
- 1: xyz
- ** Failers
-No match
- abcxyz
-No match
- xyzabc
-No match
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- 0: abcabc
- 1: abc
- xyzabc
- 0: xyzabc
- 1: xyz
- ** Failers
-No match
- xyzxyz
-No match
-
-/\H\h\V\v/
- X X\x0a
- 0: X X\x0a
- X\x09X\x0b
- 0: X\x09X\x0b
- ** Failers
-No match
- \xa0 X\x0a
-No match
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0X\x0a\x0b\x0c\x0d
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0\x0a\x0b\x0c\x0d
- \x09\x20\xa0\x0a\x0b\x0c
- 0: \x09 \xa0\x0a\x0b\x0c
- ** Failers
-No match
- \x09\x20\xa0\x0a\x0b
-No match
-
-/\H{3,4}/
- XY ABCDE
- 0: ABCD
- XY PQR ST
- 0: PQR
-
-/.\h{3,4}./
- XY AB PQRS
- 0: B P
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- 0: XNNNYZ
- > X NYQZ
- 0: X NYQZ
- ** Failers
-No match
- >XYZ
-No match
- > X NY Z
-No match
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- 0: XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-
-/[\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]
- Ket
- End
-------------------------------------------------------------------
- >\x09<
- 0: \x09
-
-/[\h]+/BZ
-------------------------------------------------------------------
- Bra
- [\x09 \xa0]+
- Ket
- End
-------------------------------------------------------------------
- >\x09\x20\xa0<
- 0: \x09 \xa0
-
-/[\v]/BZ
-------------------------------------------------------------------
- Bra
- [\x0a-\x0d\x85]
- Ket
- End
-------------------------------------------------------------------
-
-/[\H]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[^\h]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-
-/[\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x09\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
-/[\x0a\V]/BZ
-------------------------------------------------------------------
- Bra
- [\x00-\x0a\x0e-\x84\x86-\xff]
- Ket
- End
-------------------------------------------------------------------
-
/\H++X/BZ
------------------------------------------------------------------
Bra
@@ -8786,7 +8577,7 @@ No match
------------------------------------------------------------------
/\( (?: [^()]* | (?R) )* \)/x
-(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
+\J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
0: (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
/[\E]AAA/
@@ -8831,87 +8622,6 @@ Failed: missing terminating ] for character class at offset 10
End
------------------------------------------------------------------
-/^a+(*FAIL)/
- aaaaaa
-No match
-
-/a+b?c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*PRUNE)c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*COMMIT)c+(*FAIL)/
- aaabccc
-No match
-
-/a+b?(*SKIP)c+(*FAIL)/
- aaabcccaaabccc
-No match
-
-/^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- 0: aaaxxxxxx
- aaa++++++
- 0: aaa
- bbbxxxxx
- 0: bbbxxxxx
- bbb+++++
- 0: bbb
- cccxxxx
- 0: cccxxxx
- ccc++++
- 0: ccc
- dddddddd
- 0: ddd
-
-/^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- 0: aaaxxxxxx
- 1: aaaxxxxxx
- aaa++++++
- 0: aaa
- 1: aaa
- bbbxxxxx
- 0: bbbxxxxx
- 1: bbbxxxxx
- bbb+++++
- 0: bbb
- 1: bbb
- cccxxxx
- 0: cccxxxx
- 1: cccxxxx
- ccc++++
- 0: ccc
- 1: ccc
- dddddddd
- 0: ddd
- 1: ddd
-
-/a+b?(*THEN)c+(*FAIL)/
- aaabccc
-No match
-
-/(A (A|B(*ACCEPT)|C) D)(E)/x
- ABX
- 0: AB
- AADE
- 0: AADE
- 1: AAD
- 2: A
- 3: E
- ACDE
- 0: ACDE
- 1: ACD
- 2: C
- 3: E
- ** Failers
-No match
- AD
-No match
-
/^a+(*FAIL)/C
aaaaaa
--->aaaaaa
@@ -9040,11 +8750,8 @@ No match
+13 ^ ^ (*FAIL)
No match
-/a(*PRUNE:XXX)b/
-Failed: (*VERB) with an argument is not supported at offset 8
-
/a(*MARK)b/
-Failed: (*VERB) not recognized at offset 7
+Failed: (*MARK) must have an argument at offset 7
/(?i:A{1,}\6666666666)/
Failed: number is too big at offset 19
@@ -9052,8 +8759,13 @@ Failed: number is too big at offset 19
/\g6666666666/
Failed: number is too big at offset 11
-/[\g6666666666]/
-Failed: number is too big at offset 12
+/[\g6666666666]/BZ
+------------------------------------------------------------------
+ Bra
+ [6g]
+ Ket
+ End
+------------------------------------------------------------------
/(?1)\c[/
Failed: reference to non-existent subpattern at offset 3
@@ -9076,7 +8788,7 @@ No match
1: \x0a
/a(*CR)b/
-Failed: (*VERB) not recognized at offset 5
+Failed: (*VERB) not recognized or malformed at offset 5
/(*CR)a.b/
a\nb
@@ -9133,6 +8845,27 @@ No match
No match
a\x85b
No match
+
+/(*ANY).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*ANYCRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*CRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
/a\Rb/I<bsr_anycrlf>
Capturing subpattern count = 0
@@ -9216,7 +8949,6 @@ No match
/a\R{2,4}b/I<bsr_anycrlf>
Capturing subpattern count = 0
-Partial matching not supported
Options: bsr_anycrlf
First char = 'a'
Need char = 'b'
@@ -9235,7 +8967,6 @@ No match
/a\R{2,4}b/I<bsr_unicode>
Capturing subpattern count = 0
-Partial matching not supported
Options: bsr_unicode
First char = 'a'
Need char = 'b'
@@ -9340,6 +9071,12 @@ Failed: subpattern name expected at offset 3
/\k{}/
Failed: subpattern name expected at offset 3
+/\k/
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
+
+/\kabc/
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
+
/(?P=)/
Failed: subpattern name expected at offset 4
@@ -9385,4 +9122,3547 @@ Failed: unknown POSIX class name at offset 6
/[[:a\dz:]]/
Failed: unknown POSIX class name at offset 3
-/ End of testinput2 /
+/(^(a|b\g<-1'c))/
+Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
+
+/^(?+1)(?<a>x|y){0}z/
+ xzxx
+ 0: xz
+ yzyy
+ 0: yz
+ ** Failers
+No match
+ xxz
+No match
+
+/(\3)(\1)(a)/
+ cat
+No match
+
+/(\3)(\1)(a)/<JS>
+ cat
+ 0: a
+ 1:
+ 2:
+ 3: a
+
+/TA]/
+ The ACTA] comes
+ 0: TA]
+
+/TA]/<JS>
+Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2
+
+/(?2)[]a()b](abc)/
+Failed: reference to non-existent subpattern at offset 3
+
+/(?2)[^]a()b](abc)/
+Failed: reference to non-existent subpattern at offset 3
+
+/(?1)[]a()b](abc)/
+ abcbabc
+ 0: abcbabc
+ 1: abc
+ ** Failers
+No match
+ abcXabc
+No match
+
+/(?1)[^]a()b](abc)/
+ abcXabc
+ 0: abcXabc
+ 1: abc
+ ** Failers
+No match
+ abcbabc
+No match
+
+/(?2)[]a()b](abc)(xyz)/
+ xyzbabcxyz
+ 0: xyzbabcxyz
+ 1: abc
+ 2: xyz
+
+/(?&N)[]a(?<N>)](?<M>abc)/
+Failed: reference to non-existent subpattern at offset 4
+
+/(?&N)[]a(?<N>)](abc)/
+Failed: reference to non-existent subpattern at offset 4
+
+/a[]b/
+Failed: missing terminating ] for character class at offset 4
+
+/a[^]b/
+Failed: missing terminating ] for character class at offset 5
+
+/a[]b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]*+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]b/<JS>
+ aXb
+ 0: aXb
+ a\nb
+ 0: a\x0ab
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]+b/<JS>
+ aXb
+ 0: aXb
+ a\nX\nXb
+ 0: a\x0aX\x0aXb
+ ** Failers
+No match
+ ab
+No match
+
+/a(?!)+b/
+Failed: nothing to repeat at offset 5
+
+/a(*FAIL)+b/
+Failed: nothing to repeat at offset 8
+
+/(abc|pqr|123){0}[xyz]/SI
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Subject length lower bound = 1
+Starting byte set: x y z
+
+/(?(?=.*b)b|^)/CI
+Capturing subpattern count = 0
+Options:
+No first char
+No need char
+ adc
+--->adc
+ +0 ^ (?(?=.*b)b|^)
+ +2 ^ (?=.*b)
+ +5 ^ .*
+ +7 ^ ^ b
+ +7 ^ ^ b
+ +7 ^^ b
+ +7 ^ b
++11 ^ ^
++12 ^ )
++13 ^
+ 0:
+ abc
+--->abc
+ +0 ^ (?(?=.*b)b|^)
+ +2 ^ (?=.*b)
+ +5 ^ .*
+ +7 ^ ^ b
+ +7 ^ ^ b
+ +7 ^^ b
+ +8 ^ ^ )
+ +9 ^ b
+ +0 ^ (?(?=.*b)b|^)
+ +2 ^ (?=.*b)
+ +5 ^ .*
+ +7 ^ ^ b
+ +7 ^^ b
+ +7 ^ b
+ +8 ^^ )
+ +9 ^ b
++10 ^^ |
++13 ^^
+ 0: b
+
+/(?(?=b).*b|^d)/I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/(?(?=.*b).*b|^d)/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+No need char
+
+/xyz/C
+ xyz
+--->xyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz\Y
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ ** Failers
+No match
+ abc
+No match
+ abc\Y
+--->abc
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+ abcxypqr
+No match
+ abcxypqr\Y
+--->abcxypqr
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
+
+/xyz/CY
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+
+/^"((?(?=[a])[^"])|b)*"$/C
+ "ab"
+--->"ab"
+ +0 ^ ^
+ +1 ^ "
+ +2 ^^ ((?(?=[a])[^"])|b)*
+ +3 ^^ (?(?=[a])[^"])
+ +5 ^^ (?=[a])
+ +8 ^^ [a]
++11 ^ ^ )
++12 ^^ [^"]
++16 ^ ^ )
++17 ^ ^ |
+ +3 ^ ^ (?(?=[a])[^"])
+ +5 ^ ^ (?=[a])
+ +8 ^ ^ [a]
++17 ^ ^ |
++21 ^ ^ "
++18 ^ ^ b
++19 ^ ^ )
+ +3 ^ ^ (?(?=[a])[^"])
+ +5 ^ ^ (?=[a])
+ +8 ^ ^ [a]
++17 ^ ^ |
++21 ^ ^ "
++22 ^ ^ $
++23 ^ ^
+ 0: "ab"
+ 1:
+
+/^"((?(?=[a])[^"])|b)*"$/
+ "ab"
+ 0: "ab"
+ 1:
+
+/^X(?5)(a)(?|(b)|(q))(c)(d)Y/
+Failed: reference to non-existent subpattern at offset 5
+
+/^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: c
+ 4: d
+ 5: Y
+
+/Xa{2,4}b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/Xa{2,4}?b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/Xa{2,4}+b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\d{2,4}b/
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\d{2,4}?b/
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\d{2,4}+b/
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\D{2,4}b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\D{2,4}?b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\D{2,4}+b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc]{2,4}b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc]{2,4}?b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc]{2,4}+b/
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[^a]{2,4}b/
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/X[^a]{2,4}?b/
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/X[^a]{2,4}+b/
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/(Y)X\1{2,4}b/
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/(Y)X\1{2,4}?b/
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/(Y)X\1{2,4}+b/
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/\++\KZ|\d+X|9+Y/
+ ++++123999\P
+Partial match: 123999
+ ++++123999Y\P
+ 0: 999Y
+ ++++Z1234\P
+ 0: Z
+
+/Z(*F)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/Z(?!)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/dog(sbody)?/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dog(sbody)??/
+ dogs\P
+ 0: dog
+ dogs\P\P
+ 0: dog
+
+/dog|dogsbody/
+ dogs\P
+ 0: dog
+ dogs\P\P
+ 0: dog
+
+/dogsbody|dog/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/\bthe cat\b/
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/abc/
+ abc\P
+ 0: abc
+ abc\P\P
+ 0: abc
+
+/abc\K123/
+ xyzabc123pqr
+ 0: 123
+ xyzabc12\P
+Partial match: abc12
+ xyzabc12\P\P
+Partial match: abc12
+
+/(?<=abc)123/
+ xyzabc123pqr
+ 0: 123
+ xyzabc12\P
+Partial match at offset 6: abc12
+ xyzabc12\P\P
+Partial match at offset 6: abc12
+
+/\babc\b/
+ +++abc+++
+ 0: abc
+ +++ab\P
+Partial match at offset 3: +ab
+ +++ab\P\P
+Partial match at offset 3: +ab
+
+/(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
+------------------------------------------------------------------
+ Bra
+ Recurse
+ Recurse
+ Cond
+ Cond def
+ CBra 1
+ <
+ [^m]
+ [^>]
+ >
+ [^<]
+ Ket
+ CBra 2
+ \w*+
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
+------------------------------------------------------------------
+ Bra
+ Recurse
+ Recurse
+ Cond
+ Cond def
+ CBra 1
+ <
+ [\x00-/:-\xff] (neg)
+ [^>]
+ >
+ [^<]
+ Ket
+ CBra 2
+ \w*+
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ ab
+ Ket
+ CBra 2
+ x
+ CBra 3
+ y
+ Ket
+ z
+ CBra 4
+ cd
+ Close 4
+ Close 2
+ *ACCEPT
+ Ket
+ Ket
+ pq
+ Ket
+ End
+------------------------------------------------------------------
+
+/abc\K/+
+ abcdef
+ 0:
+ 0+ def
+ abcdef\N\N
+ 0:
+ 0+ def
+ xyzabcdef\N\N
+ 0:
+ 0+ def
+ ** Failers
+No match
+ abcdef\N
+No match
+ xyzabcdef\N
+No match
+
+/^(?:(?=abc)|abc\K)/+
+ abcdef
+ 0:
+ 0+ abcdef
+ abcdef\N\N
+ 0:
+ 0+ def
+ ** Failers
+No match
+ abcdef\N
+No match
+
+/a?b?/+
+ xyz
+ 0:
+ 0+ xyz
+ xyzabc
+ 0:
+ 0+ xyzabc
+ xyzabc\N
+ 0: ab
+ 0+ c
+ xyzabc\N\N
+ 0:
+ 0+ yzabc
+ xyz\N\N
+ 0:
+ 0+ yz
+ ** Failers
+ 0:
+ 0+ ** Failers
+ xyz\N
+No match
+
+/^a?b?/+
+ xyz
+ 0:
+ 0+ xyz
+ xyzabc
+ 0:
+ 0+ xyzabc
+ ** Failers
+ 0:
+ 0+ ** Failers
+ xyzabc\N
+No match
+ xyzabc\N\N
+No match
+ xyz\N\N
+No match
+ xyz\N
+No match
+
+/^(?<name>a|b\g<name>c)/
+ aaaa
+ 0: a
+ 1: a
+ bacxxx
+ 0: bac
+ 1: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+
+/^(?<name>a|b\g'name'c)/
+ aaaa
+ 0: a
+ 1: a
+ bacxxx
+ 0: bac
+ 1: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+
+/^(a|b\g<1>c)/
+ aaaa
+ 0: a
+ 1: a
+ bacxxx
+ 0: bac
+ 1: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+
+/^(a|b\g'1'c)/
+ aaaa
+ 0: a
+ 1: a
+ bacxxx
+ 0: bac
+ 1: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+
+/^(a|b\g'-1'c)/
+ aaaa
+ 0: a
+ 1: a
+ bacxxx
+ 0: bac
+ 1: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+
+/(^(a|b\g<-1>c))/
+ aaaa
+ 0: a
+ 1: a
+ 2: a
+ bacxxx
+ 0: bac
+ 1: bac
+ 2: bac
+ bbaccxxx
+ 0: bbacc
+ 1: bbacc
+ 2: bbacc
+ bbbacccxx
+ 0: bbbaccc
+ 1: bbbaccc
+ 2: bbbaccc
+
+/(?-i:\g<name>)(?i:(?<name>a))/
+ XaaX
+ 0: aa
+ 1: a
+ XAAX
+ 0: AA
+ 1: A
+
+/(?i:\g<name>)(?-i:(?<name>a))/
+ XaaX
+ 0: aa
+ 1: a
+ ** Failers
+No match
+ XAAX
+No match
+
+/(?-i:\g<+1>)(?i:(a))/
+ XaaX
+ 0: aa
+ 1: a
+ XAAX
+ 0: AA
+ 1: A
+
+/(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
+
+/(?<n>a|b|c)\g<n>*/
+ abc
+ 0: abc
+ 1: a
+ accccbbb
+ 0: accccbbb
+ 1: a
+
+/^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
+ XYabcdY
+ 0: XYabcdY
+ 1: a
+ 2: b
+ 3: <unset>
+ 4: <unset>
+ 5: c
+ 6: d
+ 7: Y
+
+/(?<=b(?1)|zzz)(a)/
+ xbaax
+ 0: a
+ 1: a
+ xzzzax
+ 0: a
+ 1: a
+
+/(a)(?<=b\1)/
+Failed: lookbehind assertion is not fixed length at offset 10
+
+/(a)(?<=b+(?1))/
+Failed: lookbehind assertion is not fixed length at offset 13
+
+/(a+)(?<=b(?1))/
+Failed: lookbehind assertion is not fixed length at offset 14
+
+/(a(?<=b(?1)))/
+Failed: lookbehind assertion is not fixed length at offset 13
+
+/(?<=b(?1))xyz/
+Failed: reference to non-existent subpattern at offset 8
+
+/(?<=b(?1))xyz(b+)pqrstuvew/
+Failed: lookbehind assertion is not fixed length at offset 26
+
+/(a|bc)\1/SI
+Capturing subpattern count = 1
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/(a|bc)\1{2,3}/SI
+Capturing subpattern count = 1
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 3
+Starting byte set: a b
+
+/(a|bc)(?1)/SI
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/(a|b\1)(a|b\1)/SI
+Capturing subpattern count = 2
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/(a|b\1){2}/SI
+Capturing subpattern count = 1
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/(a|bbbb\1)(a|bbbb\1)/SI
+Capturing subpattern count = 2
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/(a|bbbb\1){2}/SI
+Capturing subpattern count = 1
+Max back reference = 1
+No options
+No first char
+No need char
+Subject length lower bound = 2
+Starting byte set: a b
+
+/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
+Capturing subpattern count = 1
+Options: anchored
+No first char
+Need char = ':'
+Subject length lower bound = 22
+No set of starting bytes
+
+/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
+Capturing subpattern count = 11
+Options: caseless dotall
+First char = '<'
+Need char = '>'
+Subject length lower bound = 47
+No set of starting bytes
+
+"(?>.*/)foo"SI
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'o'
+Subject length lower bound = 4
+No set of starting bytes
+
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI
+Capturing subpattern count = 0
+Options: extended
+No first char
+Need char = '-'
+Subject length lower bound = 8
+No set of starting bytes
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
+Capturing subpattern count = 1
+Options: caseless
+No first char
+No need char
+Subject length lower bound = 1
+Starting byte set: A B C a b c
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'b'
+Subject length lower bound = 41
+Starting byte set: c d
+
+/<a[\s]+href[\s]*=[\s]* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isxSI
+Capturing subpattern count = 3
+Max back reference = 1
+Options: caseless extended dotall
+First char = '<'
+Need char = '='
+Subject length lower bound = 9
+No set of starting bytes
+
+/^(?!:) # colon disallowed at start
+ (?: # start of item
+ (?: [0-9a-f]{1,4} | # 1-4 hex digits or
+ (?(1)0 | () ) ) # if null previously matched, fail; else null
+ : # followed by colon
+ ){1,7} # end item; 1-7 of them required
+ [0-9a-f]{1,4} $ # final hex number at end of string
+ (?(1)|.) # check that there was an empty component
+ /xiIS
+Capturing subpattern count = 1
+Options: anchored caseless extended
+No first char
+Need char = ':'
+Subject length lower bound = 2
+No set of starting bytes
+
+/(?|(?<a>A)|(?<a>B))/I
+Capturing subpattern count = 1
+Named capturing subpatterns:
+ a 1
+ a 1
+No options
+No first char
+No need char
+ AB\Ca
+ 0: A
+ 1: A
+ C A (1) a
+ BA\Ca
+ 0: B
+ 1: B
+ C B (1) a
+
+/(?|(?<a>A)|(?<b>B))/
+Failed: different names for subpatterns of the same number are not allowed at offset 15
+
+/(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
+ b(?<quote> (?<apostrophe>')|(?<realquote>")) )
+ (?('quote')[a-z]+|[0-9]+)/JIx
+Capturing subpattern count = 6
+Named capturing subpatterns:
+ apostrophe 2
+ apostrophe 5
+ quote 1
+ quote 4
+ realquote 3
+ realquote 6
+Options: extended dupnames
+No first char
+No need char
+ a"aaaaa
+ 0: a"aaaaa
+ 1: "
+ 2: <unset>
+ 3: "
+ b"aaaaa
+ 0: b"aaaaa
+ 1: <unset>
+ 2: <unset>
+ 3: <unset>
+ 4: "
+ 5: <unset>
+ 6: "
+ ** Failers
+No match
+ b"11111
+No match
+ a"11111
+No match
+
+/^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
+------------------------------------------------------------------
+ Bra
+ ^
+ Bra
+ CBra 1
+ a
+ Ket
+ CBra 2
+ b
+ Ket
+ CBra 3
+ c
+ Ket
+ CBra 4
+ d
+ Ket
+ Alt
+ CBra 1
+ e
+ Ket
+ Ket
+ Cond
+ 4 Cond nref
+ X
+ Alt
+ Y
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 4
+Named capturing subpatterns:
+ D 4
+ D 1
+Options: anchored extended dupnames
+No first char
+No need char
+ abcdX
+ 0: abcdX
+ 1: a
+ 2: b
+ 3: c
+ 4: d
+ eX
+ 0: eX
+ 1: e
+ ** Failers
+No match
+ abcdY
+No match
+ ey
+No match
+
+/(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ a
+ Ket
+ CBra 2
+ b
+ Ket
+ CBra 3
+ c
+ Ket
+ CBra 4
+ d
+ Cond
+ Cond nrecurse 1
+ $
+ Alt
+ Recurse
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 4
+Named capturing subpatterns:
+ A 1
+ A 4
+Options: extended dupnames
+First char = 'a'
+Need char = 'd'
+ abcdd
+ 0: abcdd
+ 1: a
+ 2: b
+ 3: c
+ 4: dd
+ ** Failers
+No match
+ abcdde
+No match
+
+/abcd*/
+ xxxxabcd\P
+ 0: abcd
+ xxxxabcd\P\P
+Partial match: abcd
+
+/abcd*/i
+ xxxxabcd\P
+ 0: abcd
+ xxxxabcd\P\P
+Partial match: abcd
+ XXXXABCD\P
+ 0: ABCD
+ XXXXABCD\P\P
+Partial match: ABCD
+
+/abc\d*/
+ xxxxabc1\P
+ 0: abc1
+ xxxxabc1\P\P
+Partial match: abc1
+
+/(a)bc\1*/
+ xxxxabca\P
+ 0: abca
+ 1: a
+ xxxxabca\P\P
+Partial match: abca
+
+/abc[de]*/
+ xxxxabcde\P
+ 0: abcde
+ xxxxabcde\P\P
+Partial match: abcde
+
+/-- This is not in the Perl-compatible test because Perl seems currently to be
+ broken and not behaving as specified in that it *does* bumpalong after
+ hitting (*COMMIT). --/
+
+/(?1)(A(*COMMIT)|B)D/
+ ABD
+ 0: ABD
+ 1: B
+ XABD
+ 0: ABD
+ 1: B
+ BAD
+ 0: BAD
+ 1: A
+ ABXABD
+ 0: ABD
+ 1: B
+ ** Failers
+No match
+ ABX
+No match
+ BAXBAD
+No match
+
+/(\3)(\1)(a)/<JS>
+ cat
+ 0: a
+ 1:
+ 2:
+ 3: a
+
+/(\3)(\1)(a)/SI<JS>
+Capturing subpattern count = 3
+Max back reference = 3
+Options:
+No first char
+Need char = 'a'
+Subject length lower bound = 1
+No set of starting bytes
+ cat
+ 0: a
+ 1:
+ 2:
+ 3: a
+
+/(\3)(\1)(a)/SI
+Capturing subpattern count = 3
+Max back reference = 3
+No options
+No first char
+Need char = 'a'
+Subject length lower bound = 3
+No set of starting bytes
+ cat
+No match
+
+/i(?(DEFINE)(?<s>a))/SI
+Capturing subpattern count = 1
+Named capturing subpatterns:
+ s 1
+No options
+First char = 'i'
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+ i
+ 0: i
+
+/()i(?(1)a)/SI
+Capturing subpattern count = 1
+No options
+No first char
+Need char = 'i'
+Subject length lower bound = 1
+Starting byte set: i
+ ia
+ 0: ia
+ 1:
+
+/(?i)a(?-i)b|c/BZ
+------------------------------------------------------------------
+ Bra
+ /i a
+ b
+ Alt
+ c
+ Ket
+ End
+------------------------------------------------------------------
+ XabX
+ 0: ab
+ XAbX
+ 0: Ab
+ CcC
+ 0: c
+ ** Failers
+No match
+ XABX
+No match
+
+/(?i)a(?s)b|c/BZ
+------------------------------------------------------------------
+ Bra
+ /i ab
+ Alt
+ /i c
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?i)a(?s-i)b|c/BZ
+------------------------------------------------------------------
+ Bra
+ /i a
+ b
+ Alt
+ c
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(ab(c\1)d|x){2}$/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Once
+ CBra 1
+ ab
+ CBra 2
+ c
+ \1
+ Ket
+ d
+ Alt
+ x
+ Ket
+ Ket
+ Once
+ CBra 1
+ ab
+ CBra 2
+ c
+ \1
+ Ket
+ d
+ Alt
+ x
+ Ket
+ Ket
+ $
+ Ket
+ End
+------------------------------------------------------------------
+ xabcxd
+ 0: xabcxd
+ 1: abcxd
+ 2: cx
+
+/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Braposzero
+ SBraPos
+ Recurse
+ KetRpos
+ Cond
+ Cond def
+ CBra 1
+ Any
+ Ket
+ Ket
+ $
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Brazero
+ Once
+ Recurse
+ KetRmax
+ Cond
+ Cond def
+ CBra 1
+ Any
+ Ket
+ Ket
+ $
+ Ket
+ End
+------------------------------------------------------------------
+
+/ -- This one is here because Perl gives the match as "b" rather than "ab". I
+ believe this to be a Perl bug. --/
+
+/(?>a\Kb)z|(ab)/
+ ab
+ 0: ab
+ 1: ab
+
+/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
+Failed: recursive call could loop indefinitely at offset 31
+
+/abc(*MARK:)pqr/
+Failed: (*MARK) must have an argument at offset 10
+
+/abc(*:)pqr/
+Failed: (*MARK) must have an argument at offset 6
+
+/abc(*FAIL:123)xyz/
+Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
+
+/--- This should, and does, fail. In Perl, it does not, which I think is a
+ bug because replacing the B in the pattern by (B|D) does make it fail. ---/
+
+/A(*COMMIT)B/+K
+ ACABX
+No match
+
+/--- These should be different, but in Perl they are not, which I think
+ is a bug in Perl. ---/
+
+/A(*THEN)B|A(*THEN)C/K
+ AC
+ 0: AC
+
+/A(*PRUNE)B|A(*PRUNE)C/K
+ AC
+No match
+
+/--- Mark names can be duplicated. Perl doesn't give a mark for this one,
+though PCRE does. ---/
+
+/^A(*:A)B|^X(*:A)Y/K
+ ** Failers
+No match
+ XAQQ
+No match, mark = A
+
+/--- COMMIT at the start of a pattern should be the same as an anchor. Perl
+optimizations defeat this. So does the PCRE optimization unless we disable it
+with \Y. ---/
+
+/(*COMMIT)ABC/
+ ABCDEFG
+ 0: ABC
+ ** Failers
+No match
+ DEFGABC\Y
+No match
+
+/^(ab (c+(*THEN)cd) | xyz)/x
+ abcccd
+No match
+
+/^(ab (c+(*PRUNE)cd) | xyz)/x
+ abcccd
+No match
+
+/^(ab (c+(*FAIL)cd) | xyz)/x
+ abcccd
+No match
+
+/--- Perl gets some of these wrong ---/
+
+/(?>.(*ACCEPT))*?5/
+ abcde
+ 0: a
+
+/(.(*ACCEPT))*?5/
+ abcde
+ 0: a
+ 1: a
+
+/(.(*ACCEPT))5/
+ abcde
+ 0: a
+ 1: a
+
+/(.(*ACCEPT))*5/
+ abcde
+ 0: a
+ 1: a
+
+/A\NB./BZ
+------------------------------------------------------------------
+ Bra
+ A
+ Any
+ B
+ Any
+ Ket
+ End
+------------------------------------------------------------------
+ ACBD
+ 0: ACBD
+ *** Failers
+No match
+ A\nB
+No match
+ ACB\n
+No match
+
+/A\NB./sBZ
+------------------------------------------------------------------
+ Bra
+ A
+ Any
+ B
+ AllAny
+ Ket
+ End
+------------------------------------------------------------------
+ ACBD
+ 0: ACBD
+ ACB\n
+ 0: ACB\x0a
+ *** Failers
+No match
+ A\nB
+No match
+
+/A\NB/<crlf>
+ A\nB
+ 0: A\x0aB
+ A\rB
+ 0: A\x0dB
+ ** Failers
+No match
+ A\r\nB
+No match
+
+/\R+b/BZ
+------------------------------------------------------------------
+ Bra
+ \R++
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\R+\n/BZ
+------------------------------------------------------------------
+ Bra
+ \R+
+ \x0a
+ Ket
+ End
+------------------------------------------------------------------
+
+/\R+\d/BZ
+------------------------------------------------------------------
+ Bra
+ \R++
+ \d
+ Ket
+ End
+------------------------------------------------------------------
+
+/\d*\R/BZ
+------------------------------------------------------------------
+ Bra
+ \d*+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+
+/\s*\R/BZ
+------------------------------------------------------------------
+ Bra
+ \s*
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ \x20\x0a
+ 0: \x0a
+ \x20\x0d
+ 0: \x0d
+ \x20\x0d\x0a
+ 0: \x0d\x0a
+
+/\S*\R/BZ
+------------------------------------------------------------------
+ Bra
+ \S*+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ a\x0a
+ 0: a\x0a
+
+/X\h*\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \h*+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x20\x0a
+ 0: X \x0a
+
+/X\H*\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H*
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+ 0: X\x0d\x0a
+
+/X\H+\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H+
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+ 0: X\x0d\x0a
+
+/X\H++\R/BZ
+------------------------------------------------------------------
+ Bra
+ X
+ \H++
+ \R
+ Ket
+ End
+------------------------------------------------------------------
+ X\x0d\x0a
+No match
+
+/(?<=abc)def/
+ abc\P\P
+Partial match at offset 3: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ abc\>1
+ 0: bc
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24 (bad offset value)
+ abc\>-4
+Error -24 (bad offset value)
+
+/^\cģ/
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ \1
+ xxx
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ a
+ \1
+ z
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+Failed: syntax error in subpattern name (missing terminator) at offset 29
+
+/(?P<abn>(?P=axn)xxx)/BZ
+Failed: reference to non-existent subpattern at offset 15
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ \2
+ xxx
+ Ket
+ CBra 2
+ yy
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/-- These tests are here because Perl gets the first one wrong. --/
+
+/(\R*)(.)/s
+ \r\n
+ 0: \x0d
+ 1:
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+
+/(\R)*(.)/s
+ \r\n
+ 0: \x0d
+ 1: <unset>
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0a
+ 2: \x0d
+
+/((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
+ \r\n
+ 0: \x0d
+ 1:
+ 2: \x0d
+ \r\r\n\n\r
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+ \r\r\n\n\r\n
+ 0: \x0d\x0d\x0a\x0a\x0d
+ 1: \x0d\x0d\x0a\x0a
+ 2: \x0d
+
+/-- --/
+
+/^abc$/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ abc
+ $
+ Ket
+ End
+------------------------------------------------------------------
+
+/^abc$/BZm
+------------------------------------------------------------------
+ Bra
+ /m ^
+ abc
+ /m $
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(a)*+(\w)/S
+ aaaaX
+ 0: aaaaX
+ 1: a
+ 2: X
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(?:a)*+(\w)/S
+ aaaaX
+ 0: aaaaX
+ 1: X
+ ** Failers
+No match
+ aaaa
+No match
+
+/(a)++1234/SDZ
+------------------------------------------------------------------
+ Bra
+ CBraPos 1
+ a
+ KetRpos
+ 1234
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = '4'
+Subject length lower bound = 5
+No set of starting bytes
+
+/([abc])++1234/SI
+Capturing subpattern count = 1
+No options
+No first char
+Need char = '4'
+Subject length lower bound = 5
+Starting byte set: a b c
+
+/(?<=(abc)+)X/
+Failed: lookbehind assertion is not fixed length at offset 10
+
+/(^ab)/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab)++/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab|^)+/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(^ab|^)++/I
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+
+/(?:^ab)/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab)++/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab|^)+/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?:^ab|^)++/I
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(.*ab)/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(.*ab)++/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(.*ab|.*)+/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+No need char
+
+/(.*ab|.*)++/I
+Capturing subpattern count = 1
+No options
+First char at start or follows newline
+No need char
+
+/(?:.*ab)/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(?:.*ab)++/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+Need char = 'b'
+
+/(?:.*ab|.*)+/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+No need char
+
+/(?:.*ab|.*)++/I
+Capturing subpattern count = 0
+No options
+First char at start or follows newline
+No need char
+
+/(?=a)[bcd]/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/((?=a))[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/((?=a))+[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/((?=a))++[bcd]/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/(?=a+)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a+?)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a++)[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+No need char
+
+/(?=a{3})[bcd]/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+Need char = 'a' (caseless)
+
+/(abc)\1+/S
+
+/-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
+
+/(?1)(?:(b(*ACCEPT))){0}/
+ b
+ 0: b
+
+/(?1)(?:(b(*ACCEPT))){0}c/
+ bc
+ 0: bc
+ ** Failers
+No match
+ b
+No match
+
+/(?1)(?:((*ACCEPT))){0}c/
+ c
+ 0: c
+ c\N
+ 0: c
+
+/^.*?(?(?=a)a|b(*THEN)c)/
+ ba
+No match
+
+/^.*?(?(?=a)a|bc)/
+ ba
+ 0: ba
+
+/^.*?(?(?=a)a(*THEN)b|c)/
+ ac
+No match
+
+/^.*?(?(?=a)a(*THEN)b)c/
+ ac
+No match
+
+/^.*?(a(*THEN)b)c/
+ aabc
+No match
+
+/^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
+ aabc
+ 0: aabc
+
+/^.*?(a(*THEN)b|z)c/
+ aabc
+ 0: aabc
+ 1: ab
+
+/^.*?(z|a(*THEN)b)c/
+ aabc
+ 0: aabc
+ 1: ab
+
+/-- --/
+
+/-- These studied versions are here because they are not Perl-compatible; the
+ studying means the mark is not seen. --/
+
+/(*MARK:A)(*SKIP:B)(C|X)/KS
+ C
+ 0: C
+ 1: C
+MK: A
+ D
+No match, mark = A
+
+/(*:A)A+(*SKIP:A)(B|Z)/KS
+ AAAC
+No match, mark = A
+
+/-- --/
+
+"(?=a*(*ACCEPT)b)c"
+ c
+ 0: c
+ c\N
+ 0: c
+
+/(?1)c(?(DEFINE)((*ACCEPT)b))/
+ c
+ 0: c
+ c\N
+ 0: c
+
+/(?>(*ACCEPT)b)c/
+ c
+ 0:
+ c\N
+No match
+
+/(?:(?>(a)))+a%/++
+ %aa%
+ 0: aa%
+ 0+
+ 1: a
+ 1+ a%
+
+/(a)b|ac/++SS
+ ac\O3
+ 0: ac
+ 0+
+
+/(a)(b)x|abc/++
+ abc\O6
+ 0: abc
+ 0+
+
+/(a)bc|(a)(b)\2/
+ \O3abc
+Matched, but too many substrings
+ 0: abc
+ \O4abc
+Matched, but too many substrings
+ 0: abc
+
+/(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+
+/(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 3
+Starting byte set: a b
+
+/(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+Subject length lower bound = 4
+Starting byte set: a b
+
+/(abc)(?1)/SI
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'c'
+Subject length lower bound = 6
+No set of starting bytes
+
+/^(?>a)++/
+ aa\M
+Minimum match() limit = 5
+Minimum match() recursion limit = 2
+ 0: aa
+ aaaaaaaaa\M
+Minimum match() limit = 12
+Minimum match() recursion limit = 2
+ 0: aaaaaaaaa
+
+/(a)(?1)++/
+ aa\M
+Minimum match() limit = 7
+Minimum match() recursion limit = 4
+ 0: aa
+ 1: a
+ aaaaaaaaa\M
+Minimum match() limit = 21
+Minimum match() recursion limit = 4
+ 0: aaaaaaaaa
+ 1: a
+
+/(?:(foo)|(bar)|(baz))X/SS=
+ bazfooX
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ foobazbarX
+ 0: barX
+ 1: <unset>
+ 2: bar
+ 3: <unset>
+ barfooX
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ bazX
+ 0: bazX
+ 1: <unset>
+ 2: <unset>
+ 3: baz
+ foobarbazX
+ 0: bazX
+ 1: <unset>
+ 2: <unset>
+ 3: baz
+ bazfooX\O0
+Matched, but too many substrings
+ bazfooX\O2
+Matched, but too many substrings
+ 0: fooX
+ bazfooX\O4
+Matched, but too many substrings
+ 0: fooX
+ 1: <unset>
+ bazfooX\O6
+Matched, but too many substrings
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ bazfooX\O8
+Matched, but too many substrings
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+ bazfooX\O10
+ 0: fooX
+ 1: foo
+ 2: <unset>
+ 3: <unset>
+
+/(?=abc){3}abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc)+abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc)++abc/BZ
+------------------------------------------------------------------
+ Bra
+ Assert
+ abc
+ Ket
+ abc
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=abc){0}xyz/BZ
+------------------------------------------------------------------
+ Bra
+ Skip zero
+ Assert
+ abc
+ Ket
+ xyz
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=(a))?./BZ
+------------------------------------------------------------------
+ Bra
+ Brazero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ Any
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=(a))??./BZ
+------------------------------------------------------------------
+ Bra
+ Braminzero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ Any
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?=(a)){0}b(?1)/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Skip zero
+ Assert
+ CBra 1
+ a
+ Ket
+ Ket
+ b
+ Recurse
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?(DEFINE)(a))?b(?1)/BZ
+------------------------------------------------------------------
+ Bra
+ Cond
+ Cond def
+ CBra 1
+ a
+ Ket
+ Ket
+ b
+ Recurse
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?=(?1))?[az]([abc])d/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Brazero
+ Assert
+ Recurse
+ Ket
+ [az]
+ CBra 1
+ [a-c]
+ Ket
+ d
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?!a){0}\w+/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Skip zero
+ Assert not
+ a
+ Ket
+ \w+
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?<=(abc))?xyz/BZ
+------------------------------------------------------------------
+ Bra
+ Brazero
+ AssertB
+ Reverse
+ CBra 1
+ abc
+ Ket
+ Ket
+ xyz
+ Ket
+ End
+------------------------------------------------------------------
+
+/[:a[:abc]b:]/BZ
+------------------------------------------------------------------
+ Bra
+ [:[a-c]
+ b:]
+ Ket
+ End
+------------------------------------------------------------------
+
+/((?2))((?1))/SS
+ abc
+Error -26 (nested recursion at the same subject position)
+
+/((?(R2)a+|(?1)b))/SS
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(?(R)a*(?1)|((?R))b)/SS
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(a+|(?R)b)/
+Failed: recursive call could loop indefinitely at offset 7
+
+/^(a(*:A)(d|e(*:B))z|aeq)/C
+ adz
+--->adz
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++10 ^ ^ |
++18 ^ ^ z
++19 ^ ^ |
++24 ^ ^
+ 0: adz
+ 1: adz
+ 2: d
+ aez
+--->aez
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++11 ^^ e
++12 ^ ^ (*:B)
++17 ^ ^ )
+Latest Mark: B
++18 ^ ^ z
++19 ^ ^ |
++24 ^ ^
+ 0: aez
+ 1: aez
+ 2: e
+ aeqwerty
+--->aeqwerty
+ +0 ^ ^
+ +1 ^ (a(*:A)(d|e(*:B))z|aeq)
+ +2 ^ a
+ +3 ^^ (*:A)
+ +8 ^^ (d|e(*:B))
+Latest Mark: A
+ +9 ^^ d
++11 ^^ e
++12 ^ ^ (*:B)
++17 ^ ^ )
+Latest Mark: B
++18 ^ ^ z
++20 ^ a
++21 ^^ e
++22 ^ ^ q
++23 ^ ^ )
++24 ^ ^
+ 0: aeq
+ 1: aeq
+
+/.(*F)/
+ \P\Pabc
+No match
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
+Capturing subpattern count = 0
+Max lookbehind = 1
+No options
+First char = 't'
+Need char = 't'
+Subject length lower bound = 18
+No set of starting bytes
+
+/\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
+Capturing subpattern count = 0
+Max lookbehind = 1
+No options
+No first char
+No need char
+Subject length lower bound = 8
+Starting byte set: < o t u
+
+/a(*SKIP)c|b(*ACCEPT)|/+S!I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Subject length lower bound = -1
+No set of starting bytes
+ a
+ 0:
+ 0+
+
+/a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Subject length lower bound = -1
+Starting byte set: a b x
+ ax
+ 0: x
+
+'a*(*ACCEPT)b'+
+ \N\N
+No match
+ abc\N\N
+ 0: a
+ 0+ bc
+ bbb\N\N
+ 0:
+ 0+ bb
+
+/(*ACCEPT)a/+I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+ bax
+ 0:
+ 0+ bax
+
+/z(*ACCEPT)a/+I
+Capturing subpattern count = 0
+No options
+First char = 'z'
+No need char
+ baxzbx
+ 0: z
+ 0+ bx
+
+/a(?:.)*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 65
+Minimum match() recursion limit = 2
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 86
+Minimum match() recursion limit = 45
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/a(?:.(*THEN:ABC))*?a/ims
+ \Mabbbbbbbbbbbbbbbbbbbbba
+Minimum match() limit = 86
+Minimum match() recursion limit = 45
+ 0: abbbbbbbbbbbbbbbbbbbbba
+
+/^(?>a+)(?>(z+))\w/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ Once_NC
+ a+
+ Ket
+ Once
+ CBra 1
+ z+
+ Ket
+ Ket
+ \w
+ Ket
+ End
+------------------------------------------------------------------
+ aaaazzzzb
+ 0: aaaazzzzb
+ 1: zzzz
+ ** Failers
+No match
+ aazz
+No match
+
+/(.)(\1|a(?2))/
+ bab
+ 0: bab
+ 1: b
+ 2: ab
+
+/\1|(.)(?R)\1/
+ cbbbc
+ 0: cbbbc
+ 1: c
+
+/(.)((?(1)c|a)|a(?2))/
+ baa
+No match
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ \1
+ xxx
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ a
+ \1
+ z
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
+ \Maabbccddee
+Minimum match() limit = 12
+Minimum match() recursion limit = 3
+ 0: aabbccddee
+
+/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
+ \Maabbccddee
+Minimum match() limit = 22
+Minimum match() recursion limit = 21
+ 0: aabbccddee
+ 1: aa
+ 2: bb
+ 3: cc
+ 4: dd
+ 5: ee
+
+/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
+ \Maabbccddee
+Minimum match() limit = 18
+Minimum match() recursion limit = 13
+ 0: aabbccddee
+ 1: aa
+ 2: cc
+ 3: ee
+
+/^a\x41z/<JS>
+ aAz
+ 0: aAz
+ *** Failers
+No match
+ ax41z
+No match
+
+/^a[m\x41]z/<JS>
+ aAz
+ 0: aAz
+
+/^a\x1z/<JS>
+ ax1z
+ 0: ax1z
+
+/^a\u0041z/<JS>
+ aAz
+ 0: aAz
+ *** Failers
+No match
+ au0041z
+No match
+
+/^a[m\u0041]z/<JS>
+ aAz
+ 0: aAz
+
+/^a\u041z/<JS>
+ au041z
+ 0: au041z
+ *** Failers
+No match
+ aAz
+No match
+
+/^a\U0041z/<JS>
+ aU0041z
+ 0: aU0041z
+ *** Failers
+No match
+ aAz
+No match
+
+/(?(?=c)c|d)++Y/BZ
+------------------------------------------------------------------
+ Bra
+ BraPos
+ Cond
+ Assert
+ c
+ Ket
+ c
+ Alt
+ d
+ Ket
+ KetRpos
+ Y
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?(?=c)c|d)*+Y/BZ
+------------------------------------------------------------------
+ Bra
+ Braposzero
+ BraPos
+ Cond
+ Assert
+ c
+ Ket
+ c
+ Alt
+ d
+ Ket
+ KetRpos
+ Y
+ Ket
+ End
+------------------------------------------------------------------
+
+/a[\NB]c/
+Failed: \N is not supported in a class at offset 3
+
+/a[B-\Nc]/
+Failed: \N is not supported in a class at offset 5
+
+/(a)(?2){0,1999}?(b)/
+
+/(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
+
+/--- This test, with something more complicated than individual letters, causes
+different behaviour in Perl. Perhaps it disables some optimization; no tag is
+passed back for the failures, whereas in PCRE there is a tag. ---/
+
+/(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
+ AABC
+ 0: AB
+ 1: A
+ 2: B
+MK: A
+ XXYZ
+ 0: XXY
+ 1: <unset>
+ 2: <unset>
+ 3: X
+ 4: X
+ 5: Y
+MK: B
+ ** Failers
+No match
+ XAQQ
+No match, mark = A
+ XAQQXZZ
+No match, mark = A
+ AXQQQ
+No match, mark = A
+ AXXQQQ
+No match, mark = B
+
+/-- Perl doesn't give marks for these, though it does if the alternatives are
+replaced by single letters. --/
+
+/(b|q)(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/(q|b)(*:m)f|a(*:n)w/K
+ aw
+ 0: aw
+MK: n
+ ** Failers
+No match, mark = n
+ abc
+No match, mark = m
+
+/-- After a partial match, the behaviour is as for a failure. --/
+
+/^a(*:X)bcde/K
+ abc\P
+Partial match, mark=X: abc
+
+/-- These are here because Perl doesn't return a mark, except for the first --/
+
+/(?=(*:x))(q|)/K+
+ abc
+ 0:
+ 0+ abc
+ 1:
+MK: x
+
+/(?=(*:x))((*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+ 1:
+MK: x
+
+/(?=(*:x))(?:(*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+MK: x
+
+/(?=(*:x))(?>(*:y)q|)/K+
+ abc
+ 0:
+ 0+ abc
+MK: x
+
+/(?=a(*:x))(?!a(*:y)c)/K+
+ ab
+ 0:
+ 0+ ab
+MK: x
+
+/(?=a(*:x))(?=a(*:y)c|)/K+
+ ab
+ 0:
+ 0+ ab
+MK: x
+
+/(..)\1/
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+ 0: abab
+ 1: ab
+
+/(..)\1/i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+ 0: aBAb
+ 1: aB
+
+/(..)\1{2,}/
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+Partial match: abab
+ ababa\P
+Partial match: ababa
+ ababab\P
+ 0: ababab
+ 1: ab
+ ababab\P\P
+Partial match: ababab
+ abababa\P
+ 0: ababab
+ 1: ab
+ abababa\P\P
+Partial match: abababa
+
+/(..)\1{2,}/i
+ ab\P
+Partial match: ab
+ aBa\P
+Partial match: aBa
+ aBAb\P
+Partial match: aBAb
+ AbaBA\P
+Partial match: AbaBA
+ abABAb\P
+ 0: abABAb
+ 1: ab
+ aBAbaB\P\P
+Partial match: aBAbaB
+ abABabA\P
+ 0: abABab
+ 1: ab
+ abaBABa\P\P
+Partial match: abaBABa
+
+/(..)\1{2,}?x/i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+Partial match: aBAb
+ abaBA\P
+Partial match: abaBA
+ abAbaB\P
+Partial match: abAbaB
+ abaBabA\P
+Partial match: abaBabA
+ abAbABaBx\P
+ 0: abAbABaBx
+ 1: ab
+
+/^(..)\1/
+ aba\P
+Partial match: aba
+
+/^(..)\1{2,3}x/
+ aba\P
+Partial match: aba
+ ababa\P
+Partial match: ababa
+ ababa\P\P
+Partial match: ababa
+ abababx
+ 0: abababx
+ 1: ab
+ ababababx
+ 0: ababababx
+ 1: ab
+
+/^(..)\1{2,3}?x/
+ aba\P
+Partial match: aba
+ ababa\P
+Partial match: ababa
+ ababa\P\P
+Partial match: ababa
+ abababx
+ 0: abababx
+ 1: ab
+ ababababx
+ 0: ababababx
+ 1: ab
+
+/^(..)(\1{2,3})ab/
+ abababab
+ 0: abababab
+ 1: ab
+ 2: abab
+
+/^\R/
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/^\R{2,3}x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R{2,3}?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ x
+ 0: x
+ \rx
+ 0: \x0dx
+
+/^\R+x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\n\P
+Partial match: \x0d\x0a
+ \r\n\P\P
+Partial match: \x0d\x0a
+ \rx
+ 0: \x0dx
+
+/^a$/<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^a$/m<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ 0: a\x0d
+ 1: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ 0: a\x0d
+ 1: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/./<CRLF>
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/.{2,3}/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/.{2,3}?/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d
+ \r\r\r\P\P
+ 0: \x0d\x0d
+
+"AB(C(D))(E(F))?(?(?=\2)(?=\4))"
+ ABCDGHI\O03
+Matched, but too many substrings
+ 0: ABCD
+
+/-- These are all run as real matches in test 1; here we are just checking the
+settings of the anchored and startline bits. --/
+
+/(?>.*?a)(?<=ba)/I
+Capturing subpattern count = 0
+Max lookbehind = 2
+No options
+No first char
+Need char = 'a'
+
+/(?:.*?a)(?<=ba)/I
+Capturing subpattern count = 0
+Max lookbehind = 2
+No options
+First char at start or follows newline
+Need char = 'a'
+
+/.*?a(*PRUNE)b/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'b'
+
+/.*?a(*PRUNE)b/sI
+Capturing subpattern count = 0
+Options: dotall
+No first char
+Need char = 'b'
+
+/^a(*PRUNE)b/sI
+Capturing subpattern count = 0
+Options: anchored dotall
+No first char
+No need char
+
+/.*?a(*SKIP)b/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'b'
+
+/(?>.*?a)b/sI
+Capturing subpattern count = 0
+Options: dotall
+No first char
+Need char = 'b'
+
+/(?>.*?a)b/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'b'
+
+/(?>^a)b/sI
+Capturing subpattern count = 0
+Options: anchored dotall
+No first char
+No need char
+
+/(?>.*?)(?<=(abcd)|(wxyz))/I
+Capturing subpattern count = 2
+Max lookbehind = 4
+No options
+No first char
+No need char
+
+/(?>.*)(?<=(abcd)|(wxyz))/I
+Capturing subpattern count = 2
+Max lookbehind = 4
+No options
+No first char
+No need char
+
+"(?>.*)foo"I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'o'
+
+"(?>.*?)foo"I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'o'
+
+/(?>^abc)/mI
+Capturing subpattern count = 0
+Options: multiline
+First char at start or follows newline
+Need char = 'c'
+
+/(?>.*abc)/mI
+Capturing subpattern count = 0
+Options: multiline
+No first char
+Need char = 'c'
+
+/(?:.*abc)/mI
+Capturing subpattern count = 0
+Options: multiline
+First char at start or follows newline
+Need char = 'c'
+
+/-- Check PCRE_STUDY_EXTRA_NEEDED --/
+
+/.?/S-I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Study returned NULL
+
+/.?/S!I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Subject length lower bound = -1
+No set of starting bytes
+
+/(?:(a)+(?C1)bb|aa(?C2)b)/
+ aab\C+
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^ ^ b
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^^ b
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ b
+ 0: aab
+
+/(?:(a)++(?C1)bb|aa(?C2)b)/
+ aab\C+
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^ ^ b
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ b
+ 0: aab
+
+/(?:(?>(a))(?C1)bb|aa(?C2)b)/
+ aab\C+
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^^ b
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ b
+ 0: aab
+
+/(?:(?1)(?C1)x|ab(?C2))((a)){0}/
+ aab\C+
+Callout 1: last capture = -1
+ 0: <unset>
+--->aab
+ ^^ x
+Callout 1: last capture = -1
+ 0: <unset>
+--->aab
+ ^^ x
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ )
+ 0: ab
+
+/(?1)(?C1)((a)(?C2)){0}/
+ aab\C+
+Callout 2: last capture = 2
+ 0: <unset>
+ 1: <unset>
+ 2: a
+--->aab
+ ^^ )
+Callout 1: last capture = -1
+ 0: <unset>
+--->aab
+ ^^ ((a)(?C2)){0}
+ 0: a
+
+/(?:(a)+(?C1)bb|aa(?C2)b)++/
+ aab\C+
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^ ^ b
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: a
+--->aab
+ ^^ b
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ b
+ 0: aab
+ aab\C+\O2
+Callout 1: last capture = 1
+ 0: <unset>
+--->aab
+ ^ ^ b
+Callout 1: last capture = 1
+ 0: <unset>
+--->aab
+ ^^ b
+Callout 2: last capture = -1
+ 0: <unset>
+--->aab
+ ^ ^ b
+ 0: aab
+
+/(ab)x|ab/
+ ab\O3
+ 0: ab
+ ab\O2
+ 0: ab
+
+/(ab)/
+ ab\O3
+Matched, but too many substrings
+ 0: ab
+ ab\O2
+Matched, but too many substrings
+ 0: ab
+
+/(?<=123)(*MARK:xx)abc/K
+ xxxx123a\P\P
+Partial match at offset 7, mark=xx: 123a
+ xxxx123a\P
+Partial match at offset 7, mark=xx: 123a
+
+/123\Kabc/
+ xxxx123a\P\P
+Partial match: 123a
+ xxxx123a\P
+Partial match: 123a
+
+/^(?(?=a)aa|bb)/C
+ bb
+--->bb
+ +0 ^ ^
+ +1 ^ (?(?=a)aa|bb)
+ +3 ^ (?=a)
+ +6 ^ a
++11 ^ b
++12 ^^ b
++13 ^ ^ )
++14 ^ ^
+ 0: bb
+
+/(?C1)^(?C2)(?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))(?C11)/
+ bb
+--->bb
+ 1 ^ ^
+ 2 ^ (?(?C99)(?=(?C3)a(?C4))(?C5)a(?C6)a(?C7)|(?C8)b(?C9)b(?C10))
+ 99 ^ (?=(?C3)a(?C4))
+ 3 ^ a
+ 8 ^ b
+ 9 ^^ b
+ 10 ^ ^ )
+ 11 ^ ^
+ 0: bb
+
+/-- Perl seems to have a bug with this one --/
+
+/aaaaa(*COMMIT)(*PRUNE)b|a+c/
+ aaaaaac
+ 0: aaaac
+
+/-- Here are some that Perl treats differently because of the way it handles
+backtracking verbs. --/
+
+ /(?!a(*COMMIT)b)ac|ad/
+ ac
+ 0: ac
+ ad
+ 0: ad
+
+/^(?!a(*THEN)b|ac)../
+ ac
+No match
+ ad
+ 0: ad
+
+/^(?=a(*THEN)b|ac)/
+ ac
+ 0:
+
+/\A.*?(?:a|b(*THEN)c)/
+ ba
+ 0: ba
+
+/\A.*?(?:a|b(*THEN)c)++/
+ ba
+ 0: ba
+
+/\A.*?(?:a|b(*THEN)c|d)/
+ ba
+ 0: ba
+
+/(?:(a(*MARK:X)a+(*SKIP:X)b)){0}(?:(?1)|aac)/
+ aac
+ 0: aac
+
+/\A.*?(a|b(*THEN)c)/
+ ba
+ 0: ba
+ 1: a
+
+/^(A(*THEN)B|A(*THEN)D)/
+ AD
+ 0: AD
+ 1: AD
+
+/(?!b(*THEN)a)bn|bnn/
+ bnn
+ 0: bn
+
+/(?(?=b(*SKIP)a)bn|bnn)/
+ bnn
+No match
+
+/(?=b(*THEN)a|)bn|bnn/
+ bnn
+ 0: bn
+
+/-------------------------/
+
+/(*LIMIT_MATCH=12bc)abc/
+Failed: (*VERB) not recognized or malformed at offset 7
+
+/(*LIMIT_MATCH=4294967290)abc/
+Failed: (*VERB) not recognized or malformed at offset 7
+
+/(*LIMIT_RECURSION=4294967280)abc/I
+Capturing subpattern count = 0
+Recursion limit = 4294967280
+No options
+First char = 'a'
+Need char = 'c'
+
+/(a+)*zz/
+ aaaaaaaaaaaaaz
+No match
+ aaaaaaaaaaaaaz\q3000
+Error -8 (match limit exceeded)
+
+/(a+)*zz/S-
+ aaaaaaaaaaaaaz\Q10
+Error -21 (recursion limit exceeded)
+
+/(*LIMIT_MATCH=3000)(a+)*zz/I
+Capturing subpattern count = 1
+Match limit = 3000
+No options
+No first char
+Need char = 'z'
+ aaaaaaaaaaaaaz
+Error -8 (match limit exceeded)
+ aaaaaaaaaaaaaz\q60000
+Error -8 (match limit exceeded)
+
+/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
+Capturing subpattern count = 1
+Match limit = 3000
+No options
+No first char
+Need char = 'z'
+ aaaaaaaaaaaaaz
+Error -8 (match limit exceeded)
+
+/(*LIMIT_MATCH=60000)(a+)*zz/I
+Capturing subpattern count = 1
+Match limit = 60000
+No options
+No first char
+Need char = 'z'
+ aaaaaaaaaaaaaz
+No match
+ aaaaaaaaaaaaaz\q3000
+Error -8 (match limit exceeded)
+
+/(*LIMIT_RECURSION=10)(a+)*zz/IS-
+Capturing subpattern count = 1
+Recursion limit = 10
+No options
+No first char
+Need char = 'z'
+Subject length lower bound = 2
+Starting byte set: a z
+ aaaaaaaaaaaaaz
+Error -21 (recursion limit exceeded)
+ aaaaaaaaaaaaaz\Q1000
+Error -21 (recursion limit exceeded)
+
+/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/IS-
+Capturing subpattern count = 1
+Recursion limit = 10
+No options
+No first char
+Need char = 'z'
+Subject length lower bound = 2
+Starting byte set: a z
+ aaaaaaaaaaaaaz
+Error -21 (recursion limit exceeded)
+
+/(*LIMIT_RECURSION=1000)(a+)*zz/IS-
+Capturing subpattern count = 1
+Recursion limit = 1000
+No options
+No first char
+Need char = 'z'
+Subject length lower bound = 2
+Starting byte set: a z
+ aaaaaaaaaaaaaz
+No match
+ aaaaaaaaaaaaaz\Q10
+Error -21 (recursion limit exceeded)
+
+/-- End of testinput2 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput3 b/lib/stdlib/test/re_SUITE_data/testoutput3
index 28b1c3aaaf..7b0a3e926e 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput3
+++ b/lib/stdlib/test/re_SUITE_data/testoutput3
@@ -1,3 +1,7 @@
+/-- This set of tests checks local-specific features, using the fr_FR locale.
+ It is not Perl-compatible. There is different version called wintestinput3
+ f or use on Windows, where the locale is called "french". --/
+
/^[\w]+/
*** Failers
No match
@@ -83,6 +87,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
@@ -91,6 +96,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
+Subject length lower bound = 1
Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
@@ -160,4 +166,4 @@ No options
No first char
No need char
-/ End of testinput3 /
+/-- End of testinput3 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput4 b/lib/stdlib/test/re_SUITE_data/testoutput4
index d87ea4bcc4..6694111fb5 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput4
+++ b/lib/stdlib/test/re_SUITE_data/testoutput4
@@ -1,9 +1,7 @@
-/-- Do not use the \x{} construct except with patterns that have the --/
-/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
-No match
-/-- that option is set. However, the latest Perls recognize them always. --/
-No match
-
+/-- This set of tests is for UTF support, excluding Unicode properties. It is
+ compatible with all versions of Perl >= 5.10 and both the 8-bit and 16-bit
+ PCRE libraries. --/
+
/a.b/8
acb
0: acb
@@ -258,46 +256,6 @@ No match
XYZ
No match
-/X(\C{3})/8
- X\x{1234}
- 0: X\x{1234}
- 1: \x{1234}
-
-/X(\C{4})/8
- X\x{1234}YZ
- 0: X\x{1234}Y
- 1: \x{1234}Y
-
-/X\C*/8
- XYZabcdce
- 0: XYZabcdce
-
-/X\C*?/8
- XYZabcde
- 0: X
-
-/X\C{3,5}/8
- Xabcdefg
- 0: Xabcde
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}YZ
- X\x{1234}\x{512}
- 0: X\x{1234}\x{512}
- X\x{1234}\x{512}YZ
- 0: X\x{1234}\x{512}
-
-/X\C{3,5}?/8
- Xabcdefg
- 0: Xabc
- X\x{1234}
- 0: X\x{1234}
- X\x{1234}YZ
- 0: X\x{1234}
- X\x{1234}\x{512}
- 0: X\x{1234}
-
/[^a]+/8g
bcd
0: bcd
@@ -794,22 +752,6 @@ No match
\x{200}X
No match
-/a\Cb/
- aXb
- 0: aXb
- a\nb
- 0: a\x0ab
-
-/a\Cb/8
- aXb
- 0: aXb
- a\nb
- 0: a\x{0a}b
- *** Failers
-No match
- a\x{100}b
-No match
-
/[z-\x{100}]/8i
z
0: z
@@ -1071,4 +1013,248 @@ No match
/[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8
-/ End of testinput4 /
+/^[^d]*?$/
+ abc
+ 0: abc
+
+/^[^d]*?$/8
+ abc
+ 0: abc
+
+/^[^d]*?$/i
+ abc
+ 0: abc
+
+/^[^d]*?$/8i
+ abc
+ 0: abc
+
+/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8
+
+/^[a\x{c0}]b/8
+ \x{c0}b
+ 0: \x{c0}b
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aa
+ 1: a\x{c0}
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aa
+ 1: a\x{c0}
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}aa
+ 1: a\x{c0}a\x{c0}
+
+/^([a\x{c0}]*)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aaaa
+ 1: a\x{c0}aa
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}aaa
+ 1: a\x{c0}a\x{c0}a
+
+/^([a\x{c0}]*)a\x{c0}/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}
+ 1:
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}
+ 1: a\x{c0}
+
+/A*/g8
+ AAB\x{123}BAA
+ 0: AA
+ 0:
+ 0:
+ 0:
+ 0: AA
+ 0:
+
+/(abc)\1/8i
+ abc
+No match
+
+/(abc)\1/8
+ abc
+No match
+
+/a(*:a\x{1234}b)/8K
+ abc
+ 0: a
+MK: a\x{1234}b
+
+/a(*:a£b)/8K
+ abc
+ 0: a
+MK: a\x{a3}b
+
+/-- Noncharacters --/
+
+/./8
+ \x{fffe}
+ 0: \x{fffe}
+ \x{ffff}
+ 0: \x{ffff}
+ \x{1fffe}
+ 0: \x{1fffe}
+ \x{1ffff}
+ 0: \x{1ffff}
+ \x{2fffe}
+ 0: \x{2fffe}
+ \x{2ffff}
+ 0: \x{2ffff}
+ \x{3fffe}
+ 0: \x{3fffe}
+ \x{3ffff}
+ 0: \x{3ffff}
+ \x{4fffe}
+ 0: \x{4fffe}
+ \x{4ffff}
+ 0: \x{4ffff}
+ \x{5fffe}
+ 0: \x{5fffe}
+ \x{5ffff}
+ 0: \x{5ffff}
+ \x{6fffe}
+ 0: \x{6fffe}
+ \x{6ffff}
+ 0: \x{6ffff}
+ \x{7fffe}
+ 0: \x{7fffe}
+ \x{7ffff}
+ 0: \x{7ffff}
+ \x{8fffe}
+ 0: \x{8fffe}
+ \x{8ffff}
+ 0: \x{8ffff}
+ \x{9fffe}
+ 0: \x{9fffe}
+ \x{9ffff}
+ 0: \x{9ffff}
+ \x{afffe}
+ 0: \x{afffe}
+ \x{affff}
+ 0: \x{affff}
+ \x{bfffe}
+ 0: \x{bfffe}
+ \x{bffff}
+ 0: \x{bffff}
+ \x{cfffe}
+ 0: \x{cfffe}
+ \x{cffff}
+ 0: \x{cffff}
+ \x{dfffe}
+ 0: \x{dfffe}
+ \x{dffff}
+ 0: \x{dffff}
+ \x{efffe}
+ 0: \x{efffe}
+ \x{effff}
+ 0: \x{effff}
+ \x{ffffe}
+ 0: \x{ffffe}
+ \x{fffff}
+ 0: \x{fffff}
+ \x{10fffe}
+ 0: \x{10fffe}
+ \x{10ffff}
+ 0: \x{10ffff}
+ \x{fdd0}
+ 0: \x{fdd0}
+ \x{fdd1}
+ 0: \x{fdd1}
+ \x{fdd2}
+ 0: \x{fdd2}
+ \x{fdd3}
+ 0: \x{fdd3}
+ \x{fdd4}
+ 0: \x{fdd4}
+ \x{fdd5}
+ 0: \x{fdd5}
+ \x{fdd6}
+ 0: \x{fdd6}
+ \x{fdd7}
+ 0: \x{fdd7}
+ \x{fdd8}
+ 0: \x{fdd8}
+ \x{fdd9}
+ 0: \x{fdd9}
+ \x{fdda}
+ 0: \x{fdda}
+ \x{fddb}
+ 0: \x{fddb}
+ \x{fddc}
+ 0: \x{fddc}
+ \x{fddd}
+ 0: \x{fddd}
+ \x{fdde}
+ 0: \x{fdde}
+ \x{fddf}
+ 0: \x{fddf}
+ \x{fde0}
+ 0: \x{fde0}
+ \x{fde1}
+ 0: \x{fde1}
+ \x{fde2}
+ 0: \x{fde2}
+ \x{fde3}
+ 0: \x{fde3}
+ \x{fde4}
+ 0: \x{fde4}
+ \x{fde5}
+ 0: \x{fde5}
+ \x{fde6}
+ 0: \x{fde6}
+ \x{fde7}
+ 0: \x{fde7}
+ \x{fde8}
+ 0: \x{fde8}
+ \x{fde9}
+ 0: \x{fde9}
+ \x{fdea}
+ 0: \x{fdea}
+ \x{fdeb}
+ 0: \x{fdeb}
+ \x{fdec}
+ 0: \x{fdec}
+ \x{fded}
+ 0: \x{fded}
+ \x{fdee}
+ 0: \x{fdee}
+ \x{fdef}
+ 0: \x{fdef}
+
+/^\d*\w{4}/8
+ 1234
+ 0: 1234
+ 123
+No match
+
+/^[^b]*\w{4}/8
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/^[^b]*\w{4}/8i
+ aaaa
+ 0: aaaa
+ aaa
+No match
+
+/^\x{100}*.{4}/8
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ \x{100}\x{100}\x{100}
+No match
+
+/^\x{100}*.{4}/8i
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ \x{100}\x{100}\x{100}
+No match
+
+/-- End of testinput4 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput5 b/lib/stdlib/test/re_SUITE_data/testoutput5
index abbe1c87de..d583119dd9 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput5
+++ b/lib/stdlib/test/re_SUITE_data/testoutput5
@@ -1,110 +1,9 @@
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
+/-- This set of tests checks the API, internals, and non-Perl stuff for UTF
+ support, excluding Unicode properties. However, tests that give different
+ results in 8-bit and 16-bit modes are excluded (see tests 16 and 17). --/
-/\x{1000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 225
-Need char = 128
-
-/\x{10000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{10000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 128
-
-/\x{100000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 244
-Need char = 128
-
-/\x{1000000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{1000000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 249
-Need char = 128
-
-/\x{4000000}/8DZ
-------------------------------------------------------------------
- Bra
- \x{4000000}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 252
-Need char = 128
-
-/\x{7fffFFFF}/8DZ
-------------------------------------------------------------------
- Bra
- \x{7fffffff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 253
-Need char = 191
-
-/[\x{ff}]/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x{100}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
+/\x{110000}/8DZ
+Failed: character value in \x{...} sequence is too large at offset 9
/\x{ffffffff}/8
Failed: character value in \x{...} sequence is too large at offset 11
@@ -112,34 +11,20 @@ Failed: character value in \x{...} sequence is too large at offset 11
/\x{100000000}/8
Failed: character value in \x{...} sequence is too large at offset 12
+/\x{d800}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\x{dfff}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\x{d7ff}/8
+
+/\x{e000}/8
+
/^\x{100}a\x{1234}/8
\x{100}a\x{1234}bcd
0: \x{100}a\x{1234}
-/\x80/8DZ
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
-
-/\xff/8DZ
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
-
/\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
------------------------------------------------------------------
Bra
@@ -148,100 +33,12 @@ Need char = 191
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
First char = 'A'
Need char = '.'
\x{0041}\x{2262}\x{0391}\x{002e}
0: A\x{2262}\x{391}.
-/\x{D55c}\x{ad6d}\x{C5B4}/DZ8
-------------------------------------------------------------------
- Bra
- \x{d55c}\x{ad6d}\x{c5b4}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 237
-Need char = 180
- \x{D55c}\x{ad6d}\x{C5B4}
- 0: \x{d55c}\x{ad6d}\x{c5b4}
-
-/\x{65e5}\x{672c}\x{8a9e}/DZ8
-------------------------------------------------------------------
- Bra
- \x{65e5}\x{672c}\x{8a9e}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 230
-Need char = 158
- \x{65e5}\x{672c}\x{8a9e}
- 0: \x{65e5}\x{672c}\x{8a9e}
-
-/\x{80}/DZ8
-------------------------------------------------------------------
- Bra
- \x{80}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
-
-/\x{084}/DZ8
-------------------------------------------------------------------
- Bra
- \x{84}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 132
-
-/\x{104}/DZ8
-------------------------------------------------------------------
- Bra
- \x{104}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 132
-
-/\x{861}/DZ8
-------------------------------------------------------------------
- Bra
- \x{861}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 224
-Need char = 161
-
-/\x{212ab}/DZ8
-------------------------------------------------------------------
- Bra
- \x{212ab}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 171
-
/.{3,5}X/DZ8
------------------------------------------------------------------
Bra
@@ -252,14 +49,12 @@ Need char = 171
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
Need char = 'X'
\x{212ab}\x{212ab}\x{212ab}\x{861}X
0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
-
/.{3,5}?/DZ8
------------------------------------------------------------------
Bra
@@ -269,69 +64,15 @@ Need char = 'X'
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
\x{212ab}\x{212ab}\x{212ab}\x{861}
0: \x{212ab}\x{212ab}\x{212ab}
-/-- These tests are here rather than in testinput4 because Perl 5.6 has some
-problems with UTF-8 support, in the area of \x{..} where the value is < 255.
-It grumbles about invalid UTF-8 strings. --/
-
-/^[a\x{c0}]b/8
- \x{c0}b
- 0: \x{c0}b
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aa
- 1: a\x{c0}a\x{c0}
-
-/^([a\x{c0}]*)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aaaa
- 1: a\x{c0}aa
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aaa
- 1: a\x{c0}a\x{c0}a
-
-/^([a\x{c0}]*)a\x{c0}/8
- a\x{c0}aaaa/
- 0: a\x{c0}
- 1:
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}
- 1: a\x{c0}
-
-/-- --/
-
/(?<=\C)X/8
Failed: \C not allowed in lookbehind assertion at offset 6
-/-- This one is here not because it's different to Perl, but because the way
-the captured single-byte is displayed. (In Perl it becomes a character, and you
-can't tell the difference.) --/
-
-/X(\C)(.*)/8
- X\x{1234}
- 0: X\x{1234}
- 1: \xe1
- 2: \x88\xb4
- X\nabc
- 0: X\x{0a}abc
- 1: \x{0a}
- 2: abc
-
/^[ab]/8DZ
------------------------------------------------------------------
Bra
@@ -341,7 +82,7 @@ can't tell the difference.) --/
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
bar
@@ -364,7 +105,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
c
@@ -378,135 +119,6 @@ No need char
aaa
No match
-/[^ab\xC0-\xF0]/8SDZ
-------------------------------------------------------------------
- Bra
- [\x00-`c-\xbf\xf1-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
- \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
- \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
- 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
- Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
- \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
- \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
- \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
- \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
- \xfe \xff
- \x{f1}
- 0: \x{f1}
- \x{bf}
- 0: \x{bf}
- \x{100}
- 0: \x{100}
- \x{1000}
- 0: \x{1000}
- *** Failers
- 0: *
- \x{c0}
-No match
- \x{f0}
-No match
-
-/Ā{3,4}/8SDZ
-------------------------------------------------------------------
- Bra
- \x{100}{3}
- \x{100}?
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 196
-Need char = 128
-Study returned NULL
- \x{100}\x{100}\x{100}\x{100\x{100}
- 0: \x{100}\x{100}\x{100}
-
-/(\x{100}+|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}+
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Partial matching not supported
-Options: utf8
-No first char
-No need char
-Starting byte set: x \xc4
-
-/(\x{100}*a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}*+
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Partial matching not supported
-Options: utf8
-No first char
-No need char
-Starting byte set: a x \xc4
-
-/(\x{100}{0,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}{0,2}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Partial matching not supported
-Options: utf8
-No first char
-No need char
-Starting byte set: a x \xc4
-
-/(\x{100}{1,2}a|x)/8SDZ
-------------------------------------------------------------------
- Bra
- CBra 1
- \x{100}
- \x{100}{0,1}
- a
- Alt
- x
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Partial matching not supported
-Options: utf8
-No first char
-No need char
-Starting byte set: x \xc4
-
/\x{100}*(\d+|"(?1)")/8
1234
0: 1234
@@ -531,18 +143,6 @@ No match
\x{100}\x{100}abcd
No match
-/\x{100}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
-
/\x{100}*/8DZ
------------------------------------------------------------------
Bra
@@ -551,8 +151,7 @@ Need char = 128
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -565,8 +164,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
First char = 'a'
No need char
@@ -579,39 +177,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
First char = 'a'
Need char = 'b'
-/a\x{100}\x{101}*/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}*
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 'a'
-Need char = 128
-
-/a\x{100}\x{101}+/8DZ
-------------------------------------------------------------------
- Bra
- a\x{100}
- \x{101}+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 'a'
-Need char = 129
-
/\x{100}*A/8DZ
------------------------------------------------------------------
Bra
@@ -621,8 +190,7 @@ Need char = 129
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
Need char = 'A'
A
@@ -633,61 +201,14 @@ Need char = 'A'
Bra
\x{100}*+
\d
- Once
Recurse
Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-No first char
-No need char
-
-/[^\x{c4}]/DZ
-------------------------------------------------------------------
- Bra
- [^\xc4]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[^\x{c4}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xc3\xc5-\xff] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-
-/[\x{100}]/8DZ
-------------------------------------------------------------------
- Bra
- [\x{100}]
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
-No match
/[Z\x{100}]/8DZ
------------------------------------------------------------------
@@ -697,7 +218,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
Z\x{100}
@@ -732,7 +253,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
@@ -744,7 +265,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: utf
No first char
No need char
\x{100}
@@ -755,35 +276,21 @@ No need char
/[\xFF]/DZ
------------------------------------------------------------------
Bra
- \xff
+ \x{ff}
Ket
End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
-First char = 255
+First char = \xff
No need char
>\xff<
0: \xff
-/[\xff]/DZ8
-------------------------------------------------------------------
- Bra
- \x{ff}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
- >\x{ff}<
- 0: \x{ff}
-
/[^\xFF]/DZ
------------------------------------------------------------------
Bra
- [^\xff]
+ [^\x{ff}]
Ket
End
------------------------------------------------------------------
@@ -792,18 +299,6 @@ No options
No first char
No need char
-/[^\xff]/8DZ
-------------------------------------------------------------------
- Bra
- [\x00-\xfe] (neg)
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-
/[Ä-Ü]/8
Ö # Matches without Study
0: \x{d6}
@@ -828,99 +323,6 @@ No need char
\x{d6}
0: \x{d6}
-/[�]/8
-Failed: invalid UTF-8 string at offset 2
-
-/�/8
-Failed: invalid UTF-8 string at offset 0
-
-/���xxx/8
-Failed: invalid UTF-8 string at offset 1
-
-/���xxx/8?DZ
-------------------------------------------------------------------
- Bra
- \X{c0}\X{c0}\X{c0}xxx
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8 no_utf8_check
-First char = 195
-Need char = 'x'
-
-/abc/8
- �]
-Error -10
- �
-Error -10
- ���
-Error -10
- ���\?
-No match
-
-/anything/8
- \xc0\x80
-Error -10
- \xc1\x8f
-Error -10
- \xe0\x9f\x80
-Error -10
- \xf0\x8f\x80\x80
-Error -10
- \xf8\x87\x80\x80\x80
-Error -10
- \xfc\x83\x80\x80\x80\x80
-Error -10
- \xfe\x80\x80\x80\x80\x80
-Error -10
- \xff\x80\x80\x80\x80\x80
-Error -10
- \xc3\x8f
-No match
- \xe0\xaf\x80
-No match
- \xe1\x80\x80
-No match
- \xf0\x9f\x80\x80
-No match
- \xf1\x8f\x80\x80
-No match
- \xf8\x88\x80\x80\x80
-Error -10
- \xf9\x87\x80\x80\x80
-Error -10
- \xfc\x84\x80\x80\x80\x80
-Error -10
- \xfd\x83\x80\x80\x80\x80
-Error -10
- \?\xf8\x88\x80\x80\x80
-No match
- \?\xf9\x87\x80\x80\x80
-No match
- \?\xfc\x84\x80\x80\x80\x80
-No match
- \?\xfd\x83\x80\x80\x80\x80
-No match
-
-/\x{100}abc(xyz(?1))/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}abc
- CBra 1
- xyz
- Once
- Recurse
- Ket
- Ket
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 1
-Options: utf8
-First char = 196
-Need char = 'z'
-
/[^\x{100}]abc(xyz(?1))/8DZ
------------------------------------------------------------------
Bra
@@ -928,15 +330,13 @@ Need char = 'z'
abc
CBra 1
xyz
- Once
Recurse
Ket
Ket
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Options: utf8
+Options: utf
No first char
Need char = 'z'
@@ -947,15 +347,13 @@ Need char = 'z'
abc
CBra 1
xyz
- Once
Recurse
Ket
Ket
- Ket
End
------------------------------------------------------------------
Capturing subpattern count = 1
-Options: utf8
+Options: utf
No first char
Need char = 'z'
@@ -967,9 +365,7 @@ Need char = 'z'
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -977,7 +373,7 @@ Need char = 'z'
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -990,9 +386,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1001,9 +395,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1012,7 +404,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -1024,9 +416,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1034,7 +424,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -1047,9 +437,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1058,9 +446,7 @@ No need char
\x{100}
CBra 2
b
- Once
Recurse
- Ket
c
Ket
Ket
@@ -1069,7 +455,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 2
-Options: utf8
+Options: utf
No first char
No need char
@@ -1083,10 +469,6 @@ No need char
\x{100}X
0: X
-/a\x{1234}b/P8
- a\x{1234}b
- 0: a\x{1234}b
-
/^\ሴ/8DZ
------------------------------------------------------------------
Bra
@@ -1096,23 +478,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: anchored utf8
+Options: anchored utf
No first char
No need char
-/\777/I
-Failed: octal value is greater than \377 (not in UTF-8 mode) at offset 3
-
-/\777/8I
-Capturing subpattern count = 0
-Options: utf8
-First char = 199
-Need char = 191
- \x{1ff}
- 0: \x{1ff}
- \777
- 0: \x{1ff}
-
/\x{100}*\d/8DZ
------------------------------------------------------------------
Bra
@@ -1122,8 +491,7 @@ Need char = 191
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -1136,8 +504,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -1150,8 +517,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -1164,8 +530,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -1178,8 +543,7 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
@@ -1192,53 +556,10 @@ No need char
End
------------------------------------------------------------------
Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
+Options: utf
No first char
No need char
-/\x{100}+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 196
-Need char = 128
-
-/\x{100}+X/8DZ
-------------------------------------------------------------------
- Bra
- \x{100}++
- X
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 196
-Need char = 'X'
-
-/X+\x{200}/8DZ
-------------------------------------------------------------------
- Bra
- X++
- \x{200}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-First char = 'X'
-Need char = 128
-
/()()()()()()()()()()
()()()()()()()()()()
()()()()()()()()()()
@@ -1280,9 +601,6 @@ Matched, but too many substrings
End
------------------------------------------------------------------
-/^[\QĀ\E-\QŐ\E/BZ8
-Failed: missing terminating ] for character class at offset 15
-
/^abc./mgx8<any>
abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
0: abc1
@@ -1468,7 +786,7 @@ No match
/[\H]/8BZ
------------------------------------------------------------------
Bra
- [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff\x{100}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{7fffffff}]
+ [\x00-\x08\x0a-\x1f!-\x9f\x{a1}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}]
Ket
End
------------------------------------------------------------------
@@ -1476,7 +794,7 @@ No match
/[\V]/8BZ
------------------------------------------------------------------
Bra
- [\x00-\x09\x0e-\x84\x86-\xff\x{100}-\x{2027}\x{2029}-\x{7fffffff}]
+ [\x00-\x09\x0e-\x84\x{86}-\x{2027}\x{202a}-\x{10ffff}]
Ket
End
------------------------------------------------------------------
@@ -1485,39 +803,9 @@ No match
\x{1ec5}
0: \x{1ec5}
-/-- This tests the stricter UTF-8 check according to RFC 3629. --/
-
-/X/8
- \x{0}\x{d7ff}\x{e000}\x{10ffff}
-No match
- \x{d800}
-Error -10
- \x{d800}\?
-No match
- \x{da00}
-Error -10
- \x{da00}\?
-No match
- \x{dfff}
-Error -10
- \x{dfff}\?
-No match
- \x{110000}
-Error -10
- \x{110000}\?
-No match
- \x{2000000}
-Error -10
- \x{2000000}\?
-No match
- \x{7fffffff}
-Error -10
- \x{7fffffff}\?
-No match
-
/a\Rb/I8<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1535,7 +823,7 @@ No match
/a\Rb/I8<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1557,7 +845,7 @@ No match
/a\R?b/I8<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1575,7 +863,7 @@ No match
/a\R?b/I8<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode utf
First char = 'a'
Need char = 'b'
a\rb
@@ -1608,4 +896,954 @@ No match
/[[:a\x{100}b:]]/8
Failed: unknown POSIX class name at offset 3
-/ End of testinput5 /
+/a[^]b/<JS>8
+ a\x{1234}b
+ 0: a\x{1234}b
+ a\nb
+ 0: a\x{0a}b
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]+b/<JS>8
+ aXb
+ 0: aXb
+ a\nX\nX\x{1234}b
+ 0: a\x{0a}X\x{0a}X\x{1234}b
+ ** Failers
+No match
+ ab
+No match
+
+/(\x{de})\1/
+ \x{de}\x{de}
+ 0: \xde\xde
+ 1: \xde
+
+/X/8f<any>
+ A\x{1ec5}ABCXYZ
+ 0: X
+
+/Xa{2,4}b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/Xa{2,4}?b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/Xa{2,4}+b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\x{123}{2,4}b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X\x{123}{2,4}?b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X\x{123}{2,4}+b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X\x{123}{2,4}b/8
+ Xx\P
+No match
+ X\x{123}x\P
+No match
+ X\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}\x{123}x\P
+No match
+
+/X\x{123}{2,4}?b/8
+ Xx\P
+No match
+ X\x{123}x\P
+No match
+ X\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}\x{123}x\P
+No match
+
+/X\x{123}{2,4}+b/8
+ Xx\P
+No match
+ X\x{123}x\P
+No match
+ X\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}x\P
+No match
+ X\x{123}\x{123}\x{123}\x{123}x\P
+No match
+
+/X\d{2,4}b/8
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\d{2,4}?b/8
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\d{2,4}+b/8
+ X\P
+Partial match: X
+ X3\P
+Partial match: X3
+ X33\P
+Partial match: X33
+ X333\P
+Partial match: X333
+ X3333\P
+Partial match: X3333
+
+/X\D{2,4}b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\D{2,4}?b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\D{2,4}+b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X\D{2,4}b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X\D{2,4}?b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X\D{2,4}+b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[abc]{2,4}b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc]{2,4}?b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc]{2,4}+b/8
+ X\P
+Partial match: X
+ Xa\P
+Partial match: Xa
+ Xaa\P
+Partial match: Xaa
+ Xaaa\P
+Partial match: Xaaa
+ Xaaaa\P
+Partial match: Xaaaa
+
+/X[abc\x{123}]{2,4}b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[abc\x{123}]{2,4}?b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[abc\x{123}]{2,4}+b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[^a]{2,4}b/8
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/X[^a]{2,4}?b/8
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/X[^a]{2,4}+b/8
+ X\P
+Partial match: X
+ Xz\P
+Partial match: Xz
+ Xzz\P
+Partial match: Xzz
+ Xzzz\P
+Partial match: Xzzz
+ Xzzzz\P
+Partial match: Xzzzz
+
+/X[^a]{2,4}b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[^a]{2,4}?b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/X[^a]{2,4}+b/8
+ X\P
+Partial match: X
+ X\x{123}\P
+Partial match: X\x{123}
+ X\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}
+ X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: X\x{123}\x{123}\x{123}\x{123}
+
+/(Y)X\1{2,4}b/8
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/(Y)X\1{2,4}?b/8
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/(Y)X\1{2,4}+b/8
+ YX\P
+Partial match: YX
+ YXY\P
+Partial match: YXY
+ YXYY\P
+Partial match: YXYY
+ YXYYY\P
+Partial match: YXYYY
+ YXYYYY\P
+Partial match: YXYYYY
+
+/(\x{123})X\1{2,4}b/8
+ \x{123}X\P
+Partial match: \x{123}X
+ \x{123}X\x{123}\P
+Partial match: \x{123}X\x{123}
+ \x{123}X\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
+
+/(\x{123})X\1{2,4}?b/8
+ \x{123}X\P
+Partial match: \x{123}X
+ \x{123}X\x{123}\P
+Partial match: \x{123}X\x{123}
+ \x{123}X\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
+
+/(\x{123})X\1{2,4}+b/8
+ \x{123}X\P
+Partial match: \x{123}X
+ \x{123}X\x{123}\P
+Partial match: \x{123}X\x{123}
+ \x{123}X\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}
+ \x{123}X\x{123}\x{123}\x{123}\x{123}\P
+Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
+
+/\bthe cat\b/8
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/abcd*/8
+ xxxxabcd\P
+ 0: abcd
+ xxxxabcd\P\P
+Partial match: abcd
+
+/abcd*/i8
+ xxxxabcd\P
+ 0: abcd
+ xxxxabcd\P\P
+Partial match: abcd
+ XXXXABCD\P
+ 0: ABCD
+ XXXXABCD\P\P
+Partial match: ABCD
+
+/abc\d*/8
+ xxxxabc1\P
+ 0: abc1
+ xxxxabc1\P\P
+Partial match: abc1
+
+/(a)bc\1*/8
+ xxxxabca\P
+ 0: abca
+ 1: a
+ xxxxabca\P\P
+Partial match: abca
+
+/abc[de]*/8
+ xxxxabcde\P
+ 0: abcde
+ xxxxabcde\P\P
+Partial match: abcde
+
+/X\W{3}X/8
+ \PX
+Partial match: X
+
+/\sxxx\s/8T1
+ AB\x{85}xxx\x{a0}XYZ
+ 0: \x{85}xxx\x{a0}
+ AB\x{a0}xxx\x{85}XYZ
+ 0: \x{a0}xxx\x{85}
+
+/\S \S/8T1
+ \x{a2} \x{84}
+ 0: \x{a2} \x{84}
+
+'A#хц'8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ A
+ Ket
+ End
+------------------------------------------------------------------
+
+'A#хц
+ PQ'8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ APQ
+ Ket
+ End
+------------------------------------------------------------------
+
+/a+#хaa
+ z#XX?/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ a++
+ z
+ Ket
+ End
+------------------------------------------------------------------
+
+/a+#хaa
+ z#х?/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ a++
+ z
+ Ket
+ End
+------------------------------------------------------------------
+
+/\g{A}xxx#bXX(?'A'123) (?'A'456)/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ \1
+ xxx
+ CBra 1
+ 456
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/\g{A}xxx#bх(?'A'123) (?'A'456)/8x<any>BZ
+------------------------------------------------------------------
+ Bra
+ \1
+ xxx
+ CBra 1
+ 456
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/^\cģ/8
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(\R*)(.)/s8
+ \r\n
+ 0: \x{0d}
+ 1:
+ 2: \x{0d}
+ \r\r\n\n\r
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0d}\x{0d}\x{0a}\x{0a}
+ 2: \x{0d}
+ \r\r\n\n\r\n
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0d}\x{0d}\x{0a}\x{0a}
+ 2: \x{0d}
+
+/(\R)*(.)/s8
+ \r\n
+ 0: \x{0d}
+ 1: <unset>
+ 2: \x{0d}
+ \r\r\n\n\r
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0a}
+ 2: \x{0d}
+ \r\r\n\n\r\n
+ 0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
+ 1: \x{0a}
+ 2: \x{0d}
+
+/[^\x{1234}]+/iS8I
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+
+/[^\x{1234}]+?/iS8I
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+
+/[^\x{1234}]++/iS8I
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+Subject length lower bound = 1
+No set of starting bytes
+
+/[^\x{1234}]{2}/iS8I
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+Subject length lower bound = 2
+No set of starting bytes
+
+//<bsr_anycrlf><bsr_unicode>
+Failed: inconsistent NEWLINE options at offset 0
+
+/f.*/
+ \P\Pfor
+Partial match: for
+
+/f.*/s
+ \P\Pfor
+Partial match: for
+
+/f.*/8
+ \P\Pfor
+Partial match: for
+
+/f.*/8s
+ \P\Pfor
+Partial match: for
+
+/\x{d7ff}\x{e000}/8
+
+/\x{d800}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\x{dfff}/8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 7
+
+/\h+/8
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ 0: \x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
+ 0: \x{200a}\x{a0}\x{2000}
+
+/[\h\x{e000}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x09 \xa0\x{1680}\x{180e}\x{2000}-\x{200a}\x{202f}\x{205f}\x{3000}\x{e000}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1681}\x{200b}\x{1680}\x{2000}\x{202f}\x{3000}
+ 0: \x{1680}\x{2000}\x{202f}\x{3000}
+ \x{3001}\x{2fff}\x{200a}\x{a0}\x{2000}
+ 0: \x{200a}\x{a0}\x{2000}
+
+/\H+/8
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ 0: \x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ 0: \x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ 0: \x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+ 0: \x{9f}\x{a1}\x{2fff}\x{3001}
+
+/[\H\x{d7ff}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x08\x0a-\x1f!-\x9f\x{a1}-\x{167f}\x{1681}-\x{180d}\x{180f}-\x{1fff}\x{200b}-\x{202e}\x{2030}-\x{205e}\x{2060}-\x{2fff}\x{3001}-\x{10ffff}\x{d7ff}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{180e}\x{167f}\x{1681}\x{180d}\x{180f}
+ 0: \x{167f}\x{1681}\x{180d}\x{180f}
+ \x{2000}\x{200a}\x{1fff}\x{200b}
+ 0: \x{1fff}\x{200b}
+ \x{202f}\x{205f}\x{202e}\x{2030}\x{205e}\x{2060}
+ 0: \x{202e}\x{2030}\x{205e}\x{2060}
+ \x{a0}\x{3000}\x{9f}\x{a1}\x{2fff}\x{3001}
+ 0: \x{9f}\x{a1}\x{2fff}\x{3001}
+
+/\v+/8
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/[\v\x{e000}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x0a-\x0d\x85\x{2028}-\x{2029}\x{e000}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/\V+/8
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ 0: \x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+ 0: \x{09}\x{0e}\x{84}\x{86}
+
+/[\V\x{d7ff}]+/8BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x09\x0e-\x84\x{86}-\x{2027}\x{202a}-\x{10ffff}\x{d7ff}]+
+ Ket
+ End
+------------------------------------------------------------------
+ \x{2028}\x{2029}\x{2027}\x{2030}
+ 0: \x{2027}\x{2030}
+ \x{85}\x0a\x0b\x0c\x0d\x09\x0e\x{84}\x{86}
+ 0: \x{09}\x{0e}\x{84}\x{86}
+
+/\R+/8<bsr_unicode>
+ \x{2027}\x{2030}\x{2028}\x{2029}
+ 0: \x{2028}\x{2029}
+ \x09\x0e\x{84}\x{86}\x{85}\x0a\x0b\x0c\x0d
+ 0: \x{85}\x{0a}\x{0b}\x{0c}\x{0d}
+
+/(..)\1/8
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+ 0: abab
+ 1: ab
+
+/(..)\1/8i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+ 0: aBAb
+ 1: aB
+
+/(..)\1{2,}/8
+ ab\P
+Partial match: ab
+ aba\P
+Partial match: aba
+ abab\P
+Partial match: abab
+ ababa\P
+Partial match: ababa
+ ababab\P
+ 0: ababab
+ 1: ab
+ ababab\P\P
+Partial match: ababab
+ abababa\P
+ 0: ababab
+ 1: ab
+ abababa\P\P
+Partial match: abababa
+
+/(..)\1{2,}/8i
+ ab\P
+Partial match: ab
+ aBa\P
+Partial match: aBa
+ aBAb\P
+Partial match: aBAb
+ AbaBA\P
+Partial match: AbaBA
+ abABAb\P
+ 0: abABAb
+ 1: ab
+ aBAbaB\P\P
+Partial match: aBAbaB
+ abABabA\P
+ 0: abABab
+ 1: ab
+ abaBABa\P\P
+Partial match: abaBABa
+
+/(..)\1{2,}?x/8i
+ ab\P
+Partial match: ab
+ abA\P
+Partial match: abA
+ aBAb\P
+Partial match: aBAb
+ abaBA\P
+Partial match: abaBA
+ abAbaB\P
+Partial match: abAbaB
+ abaBabA\P
+Partial match: abaBabA
+ abAbABaBx\P
+ 0: abAbABaBx
+ 1: ab
+
+/./8<CRLF>
+ \r\P
+ 0: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+
+/.{2,3}/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/.{2,3}?/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\r\P\P
+ 0: \x{0d}\x{0d}
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZ
+------------------------------------------------------------------
+ Bra
+ [^\x{100}]
+ [^\x{1234}]
+ [^\x{ffff}]
+ [^\x{10000}]
+ [^\x{10ffff}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{100}][^\x{1234}][^\x{ffff}][^\x{10000}][^\x{10ffff}]/8BZi
+------------------------------------------------------------------
+ Bra
+ /i [^\x{100}]
+ /i [^\x{1234}]
+ /i [^\x{ffff}]
+ /i [^\x{10000}]
+ /i [^\x{10ffff}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZ
+------------------------------------------------------------------
+ Bra
+ [^\x{100}]*
+ [^\x{10000}]+
+ [^\x{10ffff}]??
+ [^\x{8000}]{4}
+ [^\x{8000}]*
+ [^\x{7fff}]{2}
+ [^\x{7fff}]{0,7}?
+ [^\x{fffff}]{5}
+ [^\x{fffff}]?+
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{100}]*[^\x{10000}]+[^\x{10ffff}]??[^\x{8000}]{4,}[^\x{7fff}]{2,9}?[^\x{fffff}]{5,6}+/8BZi
+------------------------------------------------------------------
+ Bra
+ /i [^\x{100}]*
+ /i [^\x{10000}]+
+ /i [^\x{10ffff}]??
+ /i [^\x{8000}]{4}
+ /i [^\x{8000}]*
+ /i [^\x{7fff}]{2}
+ /i [^\x{7fff}]{0,7}?
+ Once
+ /i [^\x{fffff}]{5}
+ /i [^\x{fffff}]?
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?<=\x{1234}\x{1234})\bxy/I8
+Capturing subpattern count = 0
+Max lookbehind = 2
+Options: utf
+First char = 'x'
+Need char = 'y'
+
+/(?<!^)ETA/8
+ ETA
+No match
+
+/\u0100/<JS>8BZ
+------------------------------------------------------------------
+ Bra
+ \x{100}
+ Ket
+ End
+------------------------------------------------------------------
+
+/[\u0100-\u0200]/<JS>8BZ
+------------------------------------------------------------------
+ Bra
+ [\x{100}-\x{200}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/\ud800/<JS>8
+Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 5
+
+/-- End of testinput5 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput6 b/lib/stdlib/test/re_SUITE_data/testoutput6
index db825b08c1..b1d4579926 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput6
+++ b/lib/stdlib/test/re_SUITE_data/testoutput6
@@ -1,3 +1,6 @@
+/-- This set of tests is for Unicode property support. It is compatible with
+ Perl >= 5.15. --/
+
/^\pC\pL\pM\pN\pP\pS\pZ</8
\x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
@@ -98,14 +101,6 @@ No match
\x{09f}
No match
-/^\p{Cs}/8
- \?\x{dfff}
- 0: \x{dfff}
- ** Failers
-No match
- \x{09f}
-No match
-
/^\p{Ll}/8
a
0: a
@@ -338,18 +333,6 @@ No match
\x{f3b}
No match
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- 0: $\x{a2}\x{a3}\x{a4}\x{a5}
- \x{9f2}
- 0: \x{9f2}
- ** Failers
-No match
- X
-No match
- \x{2c2}
-No match
-
/^\p{Sk}/8
\x{2c2}
0: \x{2c2}
@@ -402,26 +385,6 @@ No match
\x{2028}
No match
-/^\p{Zs}/8
- \ \
- 0:
- \x{a0}
- 0: \x{a0}
- \x{1680}
- 0: \x{1680}
- \x{180e}
- 0: \x{180e}
- \x{2000}
- 0: \x{2000}
- \x{2001}
- 0: \x{2001}
- ** Failers
-No match
- \x{2028}
-No match
- \x{200d}
-No match
-
/\p{Nd}+(..)/8
\x{660}\x{661}\x{662}ABC
0: \x{660}\x{661}\x{662}AB
@@ -494,34 +457,6 @@ No match
\x{660}\x{661}\x{662}ABC
No match
-/\p{Lu}/8i
- A
- 0: A
- a\x{10a0}B
- 0: \x{10a0}
- ** Failers
- 0: F
- a
-No match
- \x{1d00}
-No match
-
-/\p{^Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
-/\P{Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
-No match
-
/(?<=A\p{Nd})XYZ/8
A2XYZ
0: XYZ
@@ -548,103 +483,6 @@ No match
WXYZ
No match
-/[\p{L}]/DZ
-------------------------------------------------------------------
- Bra
- [\p{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\p{^L}]/DZ
-------------------------------------------------------------------
- Bra
- [\P{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\P{L}]/DZ
-------------------------------------------------------------------
- Bra
- [\P{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[\P{^L}]/DZ
-------------------------------------------------------------------
- Bra
- [\p{L}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-
-/[abc\p{L}\x{0660}]/8DZ
-------------------------------------------------------------------
- Bra
- [a-c\p{L}\x{660}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
-
-/[\p{Nd}]/8DZ
-------------------------------------------------------------------
- Bra
- [\p{Nd}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-No first char
-No need char
- 1234
- 0: 1
-
-/[\p{Nd}+-]+/8DZ
-------------------------------------------------------------------
- Bra
- [+\-\p{Nd}]+
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Partial matching not supported
-Options: utf8
-No first char
-No need char
- 1234
- 0: 1234
- 12-34
- 0: 12-34
- 12+\x{661}-34
- 0: 12+\x{661}-34
- ** Failers
-No match
- abcd
-No match
-
/[\P{Nd}]+/8
abcd
0: abcd
@@ -725,28 +563,6 @@ No match
ABC
No match
-/\p{Ll}/8i
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
-No match
-
-/^\x{c0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
A\x{391}\x{10427}\x{ff3a}\x{1fb0}
0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
@@ -777,54 +593,6 @@ No match
A\x{391}\x{10427}\x{ff3a}\x{1fb8}
0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ
-------------------------------------------------------------------
- Bra
- NC A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf8
-First char = 'A' (caseless)
-No need char
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'A'
-Need char = 176
-
-/AB\x{1fb0}/8DZ
-------------------------------------------------------------------
- Bra
- AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'A'
-Need char = 176
-
-/AB\x{1fb0}/8DZi
-------------------------------------------------------------------
- Bra
- NC AB\x{1fb0}
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf8
-First char = 'A' (caseless)
-Need char = 'B' (caseless)
-
/\x{391}+/8i
\x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
@@ -849,98 +617,6 @@ Need char = 'B' (caseless)
\x{ff5a}
0: \x{ff5a}
-/[\x{c0}\x{391}]/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/[\x{105}-\x{109}]/8iDZ
-------------------------------------------------------------------
- Bra
- [\x{104}-\x{109}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf8
-No first char
-No need char
- \x{104}
- 0: \x{104}
- \x{105}
- 0: \x{105}
- \x{109}
- 0: \x{109}
- ** Failers
-No match
- \x{100}
-No match
- \x{10a}
-No match
-
-/[z-\x{100}]/8iDZ
-------------------------------------------------------------------
- Bra
- [Z\x{39c}\x{178}z-\x{101}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf8
-No first char
-No need char
- Z
- 0: Z
- z
- 0: z
- \x{39c}
- 0: \x{39c}
- \x{178}
- 0: \x{178}
- |
- 0: |
- \x{80}
- 0: \x{80}
- \x{ff}
- 0: \x{ff}
- \x{100}
- 0: \x{100}
- \x{101}
- 0: \x{101}
- ** Failers
-No match
- \x{102}
-No match
- Y
-No match
- y
-No match
-
-/[z-\x{100}]/8DZi
-------------------------------------------------------------------
- Bra
- [Z\x{39c}\x{178}z-\x{101}]
- Ket
- End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: caseless utf8
-No first char
-No need char
-
-/^\X/8
- A
- 0: A
- A\x{300}BC
- 0: A\x{300}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}
- *** Failers
- 0: *
- \x{300}
-No match
-
/^[\X]/8
X123
0: X
@@ -1019,7 +695,17 @@ No match
A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
0: A\x{300}\x{301}B\x{300}C
1: C
-
+
+/^\X/8
+ A
+ 0: A
+ A\x{300}BC
+ 0: A\x{300}
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}
+ \x{300}
+ 0: \x{300}
+
/^\p{Han}+/8
\x{2e81}\x{3007}\x{2f804}\x{31a0}
0: \x{2e81}\x{3007}\x{2f804}
@@ -1408,42 +1094,10 @@ No match
1: L=abc
2: abc
-/The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
-will match it only with UCP support, because without that it has no notion
-of case for anything other than the ASCII letters. /
-
-/((?i)[\x{c0}])/8
- \x{c0}
- 0: \x{c0}
- 1: \x{c0}
- \x{e0}
- 0: \x{e0}
- 1: \x{e0}
-
-/(?i:[\x{c0}])/8
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
/^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/8
\x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
0: \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
-/The next two are special cases where the lengths of the different cases of the
-same character differ. The first went wrong with heap fram storage; the 2nd
-was broken in all cases./
-
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
- 0: \x{23a}\x{2c65}\x{130}
- 1: \x{130}
-
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
- 0: \x{23a}\x{2c65}
- 1: \x{2c65}
-
/Check property support in non-UTF-8 mode/
/\p{L}{4}/
@@ -1468,61 +1122,9 @@ No match
A\x80
0: A\x80
-/(?:[\PPa*]*){8,}/
-
-/[\P{Any}]/BZ
-------------------------------------------------------------------
- Bra
- [\P{Any}]
- Ket
- End
-------------------------------------------------------------------
-
-/[\P{Any}\E]/BZ
-------------------------------------------------------------------
- Bra
- [\P{Any}]
- Ket
- End
-------------------------------------------------------------------
-
-/(\P{Yi}+\277)/
-
-/(\P{Yi}+\277)?/
-
-/(?<=\P{Yi}{3}A)X/
-
-/\p{Yi}+(\P{Yi}+)(?1)/
-
-/(\P{Yi}{2}\277)?/
-
-/[\P{Yi}A]/
-
-/[\P{Yi}\P{Yi}\P{Yi}A]/
-
-/[^\P{Yi}A]/
-
-/[^\P{Yi}\P{Yi}\P{Yi}A]/
-
-/(\P{Yi}*\277)*/
-
-/(\P{Yi}*?\277)*/
-
-/(\p{Yi}*+\277)*/
-
-/(\P{Yi}?\277)*/
-
-/(\P{Yi}??\277)*/
-
-/(\p{Yi}?+\277)*/
-
-/(\P{Yi}{0,3}\277)*/
-
-/(\P{Yi}{0,3}?\277)*/
-
-/(\p{Yi}{0,3}+\277)*/
-
/^[\p{Arabic}]/8
+ \x{604}
+ 0: \x{604}
\x{60e}
0: \x{60e}
\x{656}
@@ -1543,6 +1145,8 @@ No match
0: \x{65d}
\x{65e}
0: \x{65e}
+ \x{65f}
+ 0: \x{65f}
\x{66a}
0: \x{66a}
\x{6e9}
@@ -1553,8 +1157,6 @@ No match
0: \x{6fa}
** Failers
No match
- \x{600}
-No match
\x{650}
No match
\x{651}
@@ -1567,8 +1169,6 @@ No match
No match
\x{655}
No match
- \x{65f}
-No match
/^\p{Cyrillic}/8
\x{1d2b}
@@ -1585,8 +1185,6 @@ No match
0: \x{964}
\x{965}
0: \x{965}
- \x{970}
- 0: \x{970}
/^\p{Inherited}/8
\x{64b}
@@ -1634,49 +1232,918 @@ No match
\x{104aa}
No match
-/\p{Zl}{2,3}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Zl {2}
- prop Zl ?+
- Ket
- End
-------------------------------------------------------------------
- \xe2\x80\xa8\xe2\x80\xa8
- 0: \x{2028}\x{2028}
- \x{2028}\x{2028}\x{2028}
- 0: \x{2028}\x{2028}\x{2028}
+/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8
+ \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
+ 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
+
+/\x{a77d}\x{1d79}/8i
+ \x{a77d}\x{1d79}
+ 0: \x{a77d}\x{1d79}
+ \x{1d79}\x{a77d}
+ 0: \x{1d79}\x{a77d}
+
+/\x{a77d}\x{1d79}/8
+ \x{a77d}\x{1d79}
+ 0: \x{a77d}\x{1d79}
+ ** Failers
+No match
+ \x{1d79}\x{a77d}
+No match
+
+/(A)\1/8i
+ AA
+ 0: AA
+ 1: A
+ Aa
+ 0: Aa
+ 1: A
+ aa
+ 0: aa
+ 1: a
+ aA
+ 0: aA
+ 1: a
+
+/(\x{10a})\1/8i
+ \x{10a}\x{10a}
+ 0: \x{10a}\x{10a}
+ 1: \x{10a}
+ \x{10a}\x{10b}
+ 0: \x{10a}\x{10b}
+ 1: \x{10a}
+ \x{10b}\x{10b}
+ 0: \x{10b}\x{10b}
+ 1: \x{10b}
+ \x{10b}\x{10a}
+ 0: \x{10b}\x{10a}
+ 1: \x{10b}
+
+/The next two tests are for property support in non-UTF-8 mode/
+
+/(?:\p{Lu}|\x20)+/
+ \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
+ 0: A P\xc2T\xc9 TODAY
+
+/[\p{Lu}\x20]+/
+ \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
+ 0: A P\xc2T\xc9 TODAY
+
+/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/8
+ \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0}
+ 0: \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{800}\x{1aad}\x{aac0}
+
+/^\w+/8W
+ Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
+ 0: Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
+
+/^[[:xdigit:]]*/8W
+ 1a\x{660}\x{bef}\x{16ee}
+ 0: 1a
+
+/^\d+/8W
+ 1\x{660}\x{bef}\x{16ee}
+ 0: 1\x{660}\x{bef}
+
+/^[[:digit:]]+/8W
+ 1\x{660}\x{bef}\x{16ee}
+ 0: 1\x{660}\x{bef}
+
+/^>\s+/8W
+ >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
+ 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}
+
+/^>\pZ+/8W
+ >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
+ 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}
+
+/^>[[:space:]]*/8W
+ >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
+ 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
+
+/^>[[:blank:]]*/8W
+ >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
+ 0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09}
+
+/^[[:alpha:]]*/8W
+ Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
+ 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
+
+/^[[:alnum:]]*/8W
+ Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
+ 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
+
+/^[[:cntrl:]]*/8W
+ \x{0}\x{09}\x{1f}\x{7f}\x{9f}
+ 0: \x{00}\x{09}\x{1f}\x{7f}
+
+/^[[:graph:]]*/8W
+ A\x{a1}\x{a0}
+ 0: A
+
+/^[[:print:]]*/8W
+ A z\x{a0}\x{a1}
+ 0: A z
+
+/^[[:punct:]]*/8W
+ .+\x{a1}\x{a0}
+ 0: .+
+
+/\p{Zs}*?\R/
+ ** Failers
+No match
+ a\xFCb
+No match
+
+/\p{Zs}*\R/
+ ** Failers
+No match
+ a\xFCb
+No match
+
+/ⱥ/8i
+ ⱥ
+ 0: \x{2c65}
+ Ⱥx
+ 0: \x{23a}
+ Ⱥ
+ 0: \x{23a}
+
+/[ⱥ]/8i
+ ⱥ
+ 0: \x{2c65}
+ Ⱥx
+ 0: \x{23a}
+ Ⱥ
+ 0: \x{23a}
+
+/Ⱥ/8i
+ Ⱥ
+ 0: \x{23a}
+ ⱥ
+ 0: \x{2c65}
+
+/-- These are tests for extended grapheme clusters --/
+
+/^\X/8+
+ G\x{34e}\x{34e}X
+ 0: G\x{34e}\x{34e}
+ 0+ X
+ \x{34e}\x{34e}X
+ 0: \x{34e}\x{34e}
+ 0+ X
+ \x04X
+ 0: \x{04}
+ 0+ X
+ \x{1100}X
+ 0: \x{1100}
+ 0+ X
+ \x{1100}\x{34e}X
+ 0: \x{1100}\x{34e}
+ 0+ X
+ \x{1b04}\x{1b04}X
+ 0: \x{1b04}\x{1b04}
+ 0+ X
+ *These match up to the roman letters
+ 0: *
+ 0+ These match up to the roman letters
+ \x{1111}\x{1111}L,L
+ 0: \x{1111}\x{1111}
+ 0+ L,L
+ \x{1111}\x{1111}\x{1169}L,L,V
+ 0: \x{1111}\x{1111}\x{1169}
+ 0+ L,L,V
+ \x{1111}\x{ae4c}L, LV
+ 0: \x{1111}\x{ae4c}
+ 0+ L, LV
+ \x{1111}\x{ad89}L, LVT
+ 0: \x{1111}\x{ad89}
+ 0+ L, LVT
+ \x{1111}\x{ae4c}\x{1169}L, LV, V
+ 0: \x{1111}\x{ae4c}\x{1169}
+ 0+ L, LV, V
+ \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V
+ 0: \x{1111}\x{ae4c}\x{1169}\x{1169}
+ 0+ L, LV, V, V
+ \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T
+ 0: \x{1111}\x{ae4c}\x{1169}\x{11fe}
+ 0+ L, LV, V, T
+ \x{1111}\x{ad89}\x{11fe}L, LVT, T
+ 0: \x{1111}\x{ad89}\x{11fe}
+ 0+ L, LVT, T
+ \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T
+ 0: \x{1111}\x{ad89}\x{11fe}\x{11fe}
+ 0+ L, LVT, T, T
+ \x{ad89}\x{11fe}\x{11fe}LVT, T, T
+ 0: \x{ad89}\x{11fe}\x{11fe}
+ 0+ LVT, T, T
+ *These match just the first codepoint (invalid sequence)
+ 0: *
+ 0+ These match just the first codepoint (invalid sequence)
+ \x{1111}\x{11fe}L, T
+ 0: \x{1111}
+ 0+ \x{11fe}L, T
+ \x{ae4c}\x{1111}LV, L
+ 0: \x{ae4c}
+ 0+ \x{1111}LV, L
+ \x{ae4c}\x{ae4c}LV, LV
+ 0: \x{ae4c}
+ 0+ \x{ae4c}LV, LV
+ \x{ae4c}\x{ad89}LV, LVT
+ 0: \x{ae4c}
+ 0+ \x{ad89}LV, LVT
+ \x{1169}\x{1111}V, L
+ 0: \x{1169}
+ 0+ \x{1111}V, L
+ \x{1169}\x{ae4c}V, LV
+ 0: \x{1169}
+ 0+ \x{ae4c}V, LV
+ \x{1169}\x{ad89}V, LVT
+ 0: \x{1169}
+ 0+ \x{ad89}V, LVT
+ \x{ad89}\x{1111}LVT, L
+ 0: \x{ad89}
+ 0+ \x{1111}LVT, L
+ \x{ad89}\x{1169}LVT, V
+ 0: \x{ad89}
+ 0+ \x{1169}LVT, V
+ \x{ad89}\x{ae4c}LVT, LV
+ 0: \x{ad89}
+ 0+ \x{ae4c}LVT, LV
+ \x{ad89}\x{ad89}LVT, LVT
+ 0: \x{ad89}
+ 0+ \x{ad89}LVT, LVT
+ \x{11fe}\x{1111}T, L
+ 0: \x{11fe}
+ 0+ \x{1111}T, L
+ \x{11fe}\x{1169}T, V
+ 0: \x{11fe}
+ 0+ \x{1169}T, V
+ \x{11fe}\x{ae4c}T, LV
+ 0: \x{11fe}
+ 0+ \x{ae4c}T, LV
+ \x{11fe}\x{ad89}T, LVT
+ 0: \x{11fe}
+ 0+ \x{ad89}T, LVT
+ *Test extend and spacing mark
+ 0: *
+ 0+ Test extend and spacing mark
+ \x{1111}\x{ae4c}\x{0711}L, LV, extend
+ 0: \x{1111}\x{ae4c}\x{711}
+ 0+ L, LV, extend
+ \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark
+ 0: \x{1111}\x{ae4c}\x{1b04}
+ 0+ L, LV, spacing mark
+ \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark
+ 0: \x{1111}\x{ae4c}\x{1b04}\x{711}\x{1b04}
+ 0+ L, LV, spacing mark, extend, spacing mark
+ *Test CR, LF, and control
+ 0: *
+ 0+ Test CR, LF, and control
+ \x0d\x{0711}CR, extend
+ 0: \x{0d}
+ 0+ \x{711}CR, extend
+ \x0d\x{1b04}CR, spacingmark
+ 0: \x{0d}
+ 0+ \x{1b04}CR, spacingmark
+ \x0a\x{0711}LF, extend
+ 0: \x{0a}
+ 0+ \x{711}LF, extend
+ \x0a\x{1b04}LF, spacingmark
+ 0: \x{0a}
+ 0+ \x{1b04}LF, spacingmark
+ \x0b\x{0711}Control, extend
+ 0: \x{0b}
+ 0+ \x{711}Control, extend
+ \x09\x{1b04}Control, spacingmark
+ 0: \x{09}
+ 0+ \x{1b04}Control, spacingmark
+ *There are no Prepend characters, so we can't test Prepend, CR
+ 0: *
+ 0+ There are no Prepend characters, so we can't test Prepend, CR
+
+/^(?>\X{2})X/8+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+
+/^\X{2,4}X/8+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+
+/^\X{2,4}?X/8+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+ \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
+ 0+
+
+/-- --/
+
+/\x{1e9e}+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+/[z\x{1e9e}]+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+/\x{00df}+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+/[z\x{00df}]+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+/\x{1f88}+/8i
+ \x{1f88}\x{1f80}
+ 0: \x{1f88}\x{1f80}
+
+/[z\x{1f88}]+/8i
+ \x{1f88}\x{1f80}
+ 0: \x{1f88}\x{1f80}
+
+/-- Characters with more than one other case; test in classes --/
+
+/[z\x{00b5}]+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+/[z\x{039c}]+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+/[z\x{03bc}]+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+/[z\x{00c5}]+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+/[z\x{00e5}]+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+/[z\x{212b}]+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+/[z\x{01c4}]+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+/[z\x{01c5}]+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+/[z\x{01c6}]+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+/[z\x{01c7}]+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+/[z\x{01c8}]+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+/[z\x{01c9}]+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+/[z\x{01ca}]+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+/[z\x{01cb}]+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+/[z\x{01cc}]+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+/[z\x{01f1}]+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+/[z\x{01f2}]+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+/[z\x{01f3}]+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+/[z\x{0345}]+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/[z\x{0399}]+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/[z\x{03b9}]+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/[z\x{1fbe}]+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/[z\x{0392}]+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+/[z\x{03b2}]+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+/[z\x{03d0}]+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+/[z\x{0395}]+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+/[z\x{03b5}]+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+/[z\x{03f5}]+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+/[z\x{0398}]+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/[z\x{03b8}]+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/[z\x{03d1}]+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/[z\x{03f4}]+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/[z\x{039a}]+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+/[z\x{03ba}]+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+/[z\x{03f0}]+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+/[z\x{03a0}]+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+/[z\x{03c0}]+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+/[z\x{03d6}]+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+/[z\x{03a1}]+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+/[z\x{03c1}]+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+/[z\x{03f1}]+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+/[z\x{03a3}]+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+/[z\x{03c2}]+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+/[z\x{03c3}]+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+/[z\x{03a6}]+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+/[z\x{03c6}]+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+/[z\x{03d5}]+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+/[z\x{03c9}]+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+/[z\x{03a9}]+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+/[z\x{2126}]+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+/[z\x{1e60}]+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+/[z\x{1e61}]+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+/[z\x{1e9b}]+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+/-- Perl 5.12.4 gets these wrong, but 5.15.3 is OK --/
+
+/[z\x{004b}]+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+/[z\x{006b}]+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+/[z\x{212a}]+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+/[z\x{0053}]+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/[z\x{0073}]+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/[z\x{017f}]+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/-- --/
+
+/(ΣΆΜΟΣ) \1/8i
+ ΣΆΜΟΣ ΣΆΜΟΣ
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ ΣΆΜΟΣ σάμος
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ σάμος σάμος
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ σάμος σάμοσ
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ σάμος ΣΆΜΟΣ
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+
+/(σάμος) \1/8i
+ ΣΆΜΟΣ ΣΆΜΟΣ
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ ΣΆΜΟΣ σάμος
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ σάμος σάμος
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ σάμος σάμοσ
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ σάμος ΣΆΜΟΣ
+ 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+
+/(ΣΆΜΟΣ) \1*/8i
+ ΣΆΜΟΣ\x20
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+ ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος
+ 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
+ 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
+
+/-- Perl matches these --/
+
+/\x{00b5}+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+/\x{039c}+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+/\x{03bc}+/8i
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+
+
+/\x{00c5}+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+/\x{00e5}+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+/\x{212b}+/8i
+ \x{00c5}\x{00e5}\x{212b}
+ 0: \x{c5}\x{e5}\x{212b}
+
+
+/\x{01c4}+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+/\x{01c5}+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+/\x{01c6}+/8i
+ \x{01c4}\x{01c5}\x{01c6}
+ 0: \x{1c4}\x{1c5}\x{1c6}
+
+
+/\x{01c7}+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+/\x{01c8}+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+/\x{01c9}+/8i
+ \x{01c7}\x{01c8}\x{01c9}
+ 0: \x{1c7}\x{1c8}\x{1c9}
+
+
+/\x{01ca}+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+/\x{01cb}+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+/\x{01cc}+/8i
+ \x{01ca}\x{01cb}\x{01cc}
+ 0: \x{1ca}\x{1cb}\x{1cc}
+
+
+/\x{01f1}+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+/\x{01f2}+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+/\x{01f3}+/8i
+ \x{01f1}\x{01f2}\x{01f3}
+ 0: \x{1f1}\x{1f2}\x{1f3}
+
+
+/\x{0345}+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/\x{0399}+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/\x{03b9}+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+/\x{1fbe}+/8i
+ \x{0345}\x{0399}\x{03b9}\x{1fbe}
+ 0: \x{345}\x{399}\x{3b9}\x{1fbe}
+
+
+/\x{0392}+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+/\x{03b2}+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+/\x{03d0}+/8i
+ \x{0392}\x{03b2}\x{03d0}
+ 0: \x{392}\x{3b2}\x{3d0}
+
+
+/\x{0395}+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+/\x{03b5}+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+/\x{03f5}+/8i
+ \x{0395}\x{03b5}\x{03f5}
+ 0: \x{395}\x{3b5}\x{3f5}
+
+
+/\x{0398}+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/\x{03b8}+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/\x{03d1}+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+/\x{03f4}+/8i
+ \x{0398}\x{03b8}\x{03d1}\x{03f4}
+ 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
+
+
+/\x{039a}+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+/\x{03ba}+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+/\x{03f0}+/8i
+ \x{039a}\x{03ba}\x{03f0}
+ 0: \x{39a}\x{3ba}\x{3f0}
+
+
+/\x{03a0}+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+/\x{03c0}+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+/\x{03d6}+/8i
+ \x{03a0}\x{03c0}\x{03d6}
+ 0: \x{3a0}\x{3c0}\x{3d6}
+
+
+/\x{03a1}+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+/\x{03c1}+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+/\x{03f1}+/8i
+ \x{03a1}\x{03c1}\x{03f1}
+ 0: \x{3a1}\x{3c1}\x{3f1}
+
+
+/\x{03a3}+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+/\x{03c2}+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+/\x{03c3}+/8i
+ \x{03A3}\x{03C2}\x{03C3}
+ 0: \x{3a3}\x{3c2}\x{3c3}
+
+
+/\x{03a6}+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+/\x{03c6}+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+/\x{03d5}+/8i
+ \x{03a6}\x{03c6}\x{03d5}
+ 0: \x{3a6}\x{3c6}\x{3d5}
+
+
+/\x{03c9}+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+/\x{03a9}+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+/\x{2126}+/8i
+ \x{03c9}\x{03a9}\x{2126}
+ 0: \x{3c9}\x{3a9}\x{2126}
+
+
+/\x{1e60}+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+/\x{1e61}+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+/\x{1e9b}+/8i
+ \x{1e60}\x{1e61}\x{1e9b}
+ 0: \x{1e60}\x{1e61}\x{1e9b}
+
+
+/\x{1e9e}+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+/\x{00df}+/8i
+ \x{1e9e}\x{00df}
+ 0: \x{1e9e}\x{df}
+
+
+/\x{1f88}+/8i
+ \x{1f88}\x{1f80}
+ 0: \x{1f88}\x{1f80}
+
+/\x{1f80}+/8i
+ \x{1f88}\x{1f80}
+ 0: \x{1f88}\x{1f80}
+
+
+/-- Perl 5.12.4 gets these wrong, but 5.15.3 is OK --/
+
+/\x{004b}+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+/\x{006b}+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+/\x{212a}+/8i
+ \x{004b}\x{006b}\x{212a}
+ 0: Kk\x{212a}
+
+
+/\x{0053}+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/\x{0073}+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/\x{017f}+/8i
+ \x{0053}\x{0073}\x{017f}
+ 0: Ss\x{17f}
+
+/^\p{Any}*\d{4}/8
+ 1234
+ 0: 1234
+ 123
+No match
+
+/^\X*\w{4}/8
+ 1234
+ 0: 1234
+ 123
+No match
-/\p{Zl}/8BZ
-------------------------------------------------------------------
- Bra
- prop Zl
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Lu}{3}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Lu {3}
- Ket
- End
-------------------------------------------------------------------
-
-/\pL{2}+/8BZ
-------------------------------------------------------------------
- Bra
- prop L {2}
- Ket
- End
-------------------------------------------------------------------
-
-/\p{Cc}{2}+/8BZ
-------------------------------------------------------------------
- Bra
- prop Cc {2}
- Ket
- End
-------------------------------------------------------------------
-
-/ End of testinput6 /
+/-- End of testinput6 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput7 b/lib/stdlib/test/re_SUITE_data/testoutput7
index d8e3833f39..ddd96fc2ed 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput7
+++ b/lib/stdlib/test/re_SUITE_data/testoutput7
@@ -1,7215 +1,1581 @@
-/abc/
- abc
- 0: abc
-
-/ab*c/
- abc
- 0: abc
- abbbbc
- 0: abbbbc
- ac
- 0: ac
-
-/ab+c/
- abc
- 0: abc
- abbbbbbc
- 0: abbbbbbc
- *** Failers
-No match
- ac
-No match
- ab
-No match
-
-/a*/
- a
- 0: a
- 1:
- aaaaaaaaaaaaaaaaa
- 0: aaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaa
- 5: aaaaaaaaaaaa
- 6: aaaaaaaaaaa
- 7: aaaaaaaaaa
- 8: aaaaaaaaa
- 9: aaaaaaaa
-10: aaaaaaa
-11: aaaaaa
-12: aaaaa
-13: aaaa
-14: aaa
-15: aa
-16: a
-17:
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaa
-17: aaaaaaaaaaaaa
-18: aaaaaaaaaaaa
-19: aaaaaaaaaaa
-20: aaaaaaaaaa
-21: aaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
- 0:
-
-/(a|abcd|african)/
- a
- 0: a
- abcd
- 0: abcd
- 1: a
- african
- 0: african
- 1: a
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/^abc/m
- abcdef
- 0: abc
- xyz\nabc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Aabc/
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Aabc/m
- abcdef
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyz\nabc
-No match
-
-/\Gabc/
- abcdef
- 0: abc
- xyzabc\>3
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
- xyzabc\>2
-No match
-
-/x\dy\Dz/
- x9yzz
- 0: x9yzz
- x0y+z
- 0: x0y+z
- *** Failers
-No match
- xyz
-No match
- xxy0z
-No match
-
-/x\sy\Sz/
- x yzz
- 0: x yzz
- x y+z
- 0: x y+z
- *** Failers
-No match
- xyz
-No match
- xxyyz
-No match
-
-/x\wy\Wz/
- xxy+z
- 0: xxy+z
- *** Failers
-No match
- xxy0z
-No match
- x+y+z
-No match
-
-/x.y/
- x+y
- 0: x+y
- x-y
- 0: x-y
- *** Failers
-No match
- x\ny
-No match
-
-/x.y/s
- x+y
- 0: x+y
- x-y
- 0: x-y
- x\ny
- 0: x\x0ay
-
-/(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- 0: a+bc+dp+q
- a+bc\ndp+q
- 0: a+bc\x0adp+q
- x\nyp+q
- 0: x\x0ayp+q
- *** Failers
-No match
- a\nbc\ndp+q
-No match
- a+bc\ndp\nq
-No match
- x\nyp\nq
-No match
-
-/a\d\z/
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\z/m
- ba0
- 0: a0
- *** Failers
-No match
- ba0\n
-No match
- ba0\ncd
-No match
-
-/a\d\Z/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
-No match
- ba0\ncd
-No match
+/-- These tests for Unicode property support test PCRE's API and show some of
+ the compiled code. They are not Perl-compatible. --/
+
+/[\p{L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[\p{^L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[\P{L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[\P{^L}]/DZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[abc\p{L}\x{0660}]/8DZ
+------------------------------------------------------------------
+ Bra
+ [a-c\p{L}\x{660}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
+
+/[\p{Nd}]/8DZ
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
+ 1234
+ 0: 1
-/a\d\Z/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
+/[\p{Nd}+-]+/8DZ
+------------------------------------------------------------------
+ Bra
+ [+\-\p{Nd}]+
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf
+No first char
+No need char
+ 1234
+ 0: 1234
+ 12-34
+ 0: 12-34
+ 12+\x{661}-34
+ 0: 12+\x{661}-34
+ ** Failers
No match
- ba0\ncd
+ abcd
No match
-/a\d$/
- ba0
- 0: a0
- ba0\n
- 0: a0
- *** Failers
+/[\x{105}-\x{109}]/8iDZ
+------------------------------------------------------------------
+ Bra
+ [\x{104}-\x{109}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+ \x{104}
+ 0: \x{104}
+ \x{105}
+ 0: \x{105}
+ \x{109}
+ 0: \x{109}
+ ** Failers
No match
- ba0\ncd
+ \x{100}
No match
-
-/a\d$/m
- ba0
- 0: a0
- ba0\n
- 0: a0
- ba0\ncd
- 0: a0
- *** Failers
+ \x{10a}
No match
-
-/abc/i
- abc
- 0: abc
- aBc
- 0: aBc
- ABC
- 0: ABC
-/[^a]/
- abcd
- 0: b
-
-/ab?\w/
- abz
- 0: abz
- 1: ab
- abbz
- 0: abb
- 1: ab
- azz
- 0: az
-
-/x{0,3}yz/
- ayzq
- 0: yz
- axyzq
- 0: xyz
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
-
-/x{3}yz/
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
-No match
- ayzq
-No match
- axyzq
-No match
- axxyz
-No match
-
-/x{2,3}yz/
- axxyz
- 0: xxyz
- axxxyzq
- 0: xxxyz
- axxxxyzq
- 0: xxxyz
- *** Failers
-No match
- ax
-No match
- axx
+/[z-\x{100}]/8iDZ
+------------------------------------------------------------------
+ Bra
+ [Z\x{39c}\x{3bc}\x{1e9e}\x{178}z-\x{101}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
+ Z
+ 0: Z
+ z
+ 0: z
+ \x{39c}
+ 0: \x{39c}
+ \x{178}
+ 0: \x{178}
+ |
+ 0: |
+ \x{80}
+ 0: \x{80}
+ \x{ff}
+ 0: \x{ff}
+ \x{100}
+ 0: \x{100}
+ \x{101}
+ 0: \x{101}
+ ** Failers
No match
- ayzq
+ \x{102}
No match
- axyzq
+ Y
No match
-
-/[^a]+/
- bac
- 0: b
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- aaaaa
+ y
No match
-/[^a]*/
- bac
- 0: b
- 1:
- bcdefax
- 0: bcdef
- 1: bcde
- 2: bcd
- 3: bc
- 4: b
- 5:
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- 3: **
- 4: *
- 5:
- aaaaa
- 0:
-
-/[^a]{3,5}/
- xyz
- 0: xyz
- awxyza
- 0: wxyz
- 1: wxy
- abcdefa
- 0: bcdef
- 1: bcde
- 2: bcd
- abcdefghijk
- 0: bcdef
- 1: bcde
- 2: bcd
- *** Failers
- 0: *** F
- 1: ***
- 2: ***
- axya
-No match
- axa
-No match
- aaaaa
-No match
+/[z-\x{100}]/8DZi
+------------------------------------------------------------------
+ Bra
+ [Z\x{39c}\x{3bc}\x{1e9e}\x{178}z-\x{101}]
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+No need char
-/\d*/
- 1234b567
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 4:
- xyz
- 0:
-
-/\D*/
- a1234b567
- 0: a
- 1:
- xyz
- 0: xyz
- 1: xy
- 2: x
- 3:
-
-/\d+/
- ab1234c56
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- *** Failers
-No match
- xyz
-No match
-
-/\D+/
- ab123c56
- 0: ab
- 1: a
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 789
-No match
-
-/\d?A/
- 045ABC
- 0: 5A
- ABC
- 0: A
- *** Failers
-No match
- XYZ
-No match
-
-/\D?A/
- ABC
- 0: A
- BAC
- 0: BA
- 9ABC
- 0: A
- *** Failers
-No match
+/(?:[\PPa*]*){8,}/
-/a+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^.*xyz/
- xyz
- 0: xyz
- ggggggggxyz
- 0: ggggggggxyz
-
-/^.+xyz/
- abcdxyz
- 0: abcdxyz
- axyz
- 0: axyz
- *** Failers
-No match
- xyz
-No match
-
-/^.?xyz/
- xyz
- 0: xyz
- cxyz
- 0: cxyz
-
-/^\d{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
- *** Failers
-No match
- X
-No match
- 1X
-No match
- 1234X
-No match
+/[\P{Any}]/BZ
+------------------------------------------------------------------
+ Bra
+ [\P{Any}]
+ Ket
+ End
+------------------------------------------------------------------
-/^[abcd]\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- *** Failers
-No match
- e45
-No match
- abcd
-No match
- abcd1234
-No match
- 1234
-No match
+/[\P{Any}\E]/BZ
+------------------------------------------------------------------
+ Bra
+ [\P{Any}]
+ Ket
+ End
+------------------------------------------------------------------
-/^[abcd]*\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- 1234
- 0: 1
- *** Failers
-No match
- e45
-No match
- abcd
-No match
+/(\P{Yi}+\277)/
-/^[abcd]+\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- abcd1234
- 0: abcd1
- *** Failers
-No match
- 1234
-No match
- e45
-No match
- abcd
-No match
+/(\P{Yi}+\277)?/
-/^a+X/
- aX
- 0: aX
- aaX
- 0: aaX
-
-/^[abcd]?\d/
- a45
- 0: a4
- b93
- 0: b9
- c99z
- 0: c9
- d04
- 0: d0
- 1234
- 0: 1
- *** Failers
-No match
- abcd1234
-No match
- e45
-No match
+/(?<=\P{Yi}{3}A)X/
-/^[abcd]{2,3}\d/
- ab45
- 0: ab4
- bcd93
- 0: bcd9
- *** Failers
-No match
- 1234
-No match
- a36
-No match
- abcd1234
-No match
- ee45
-No match
+/\p{Yi}+(\P{Yi}+)(?1)/
-/^(abc)*\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- 42xyz
- 0: 4
- *** Failers
-No match
+/(\P{Yi}{2}\277)?/
-/^(abc)+\d/
- abc45
- 0: abc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- 42xyz
-No match
+/[\P{Yi}A]/
-/^(abc)?\d/
- abc45
- 0: abc4
- 42xyz
- 0: 4
- *** Failers
-No match
- abcabcabc45
-No match
+/[\P{Yi}\P{Yi}\P{Yi}A]/
-/^(abc){2,3}\d/
- abcabc45
- 0: abcabc4
- abcabcabc45
- 0: abcabcabc4
- *** Failers
-No match
- abcabcabcabc45
-No match
- abc45
-No match
- 42xyz
-No match
+/[^\P{Yi}A]/
-/1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 0: 1abc2abc3
- 1abc2xyz3456
- 0: 1abc2xyz3
+/[^\P{Yi}\P{Yi}\P{Yi}A]/
-/^(a*\w|ab)=(a*\w|ab)/
- ab=ab
- 0: ab=ab
- 1: ab=a
+/(\P{Yi}*\277)*/
-/^(a*\w|ab)=(?1)/
- ab=ab
- 0: ab=ab
+/(\P{Yi}*?\277)*/
-/^([^()]|\((?1)*\))*$/
- abc
- 0: abc
- a(b)c
- 0: a(b)c
- a(b(c))d
- 0: a(b(c))d
- *** Failers)
-No match
- a(b(c)d
-No match
+/(\p{Yi}*+\277)*/
-/^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- 0: >abc>123<xyz<
- >abc>1(2)3<xyz<
- 0: >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
- 0: >abc>(1(2)3)<xyz<
-
-/^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
- *** Failers
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
+/(\P{Yi}?\277)*/
-/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- 0: <>
- <abcd>
- 0: <abcd>
- <abc <123> hij>
- 0: <abc <123> hij>
- <abc <def> hij>
- 0: <def>
- <abc<>def>
- 0: <abc<>def>
- <abc<>
- 0: <>
- *** Failers
-No match
- <abc
-No match
+/(\P{Yi}??\277)*/
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
+/(\p{Yi}?+\277)*/
-/^(?=abc)\w{5}:$/
- abcde:
- 0: abcde:
- *** Failers
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
-
-/^(?!abc)\d\d$/
- 12
- 0: 12
- *** Failers
-No match
- abcde:
-No match
- abc..
-No match
- 123
-No match
- vwxyz
-No match
+/(\P{Yi}{0,3}\277)*/
-/(?<=abc|xy)123/
- abc12345
- 0: 123
- wxy123z
- 0: 123
- *** Failers
-No match
- 123abc
-No match
+/(\P{Yi}{0,3}?\277)*/
-/(?<!abc|xy)123/
- 123abc
- 0: 123
- mno123456
- 0: 123
- *** Failers
-No match
- abc12345
-No match
- wxy123z
-No match
-
-/abc(?C1)xyz/
- abcxyz
---->abcxyz
- 1 ^ ^ x
- 0: abcxyz
- 123abcxyz999
---->123abcxyz999
- 1 ^ ^ x
- 0: abcxyz
-
-/(ab|cd){3,4}/C
- ababab
---->ababab
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- 0: ababab
- abcdabcd
---->abcdabcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +2 ^ ^ b
- +3 ^ ^ |
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdabcd
- 1: abcdab
- abcdcdcdcdcd
---->abcdcdcdcdcd
- +0 ^ (ab|cd){3,4}
- +1 ^ a
- +4 ^ c
- +2 ^^ b
- +3 ^ ^ |
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- +1 ^ ^ a
- +4 ^ ^ c
- +5 ^ ^ d
- +6 ^ ^ )
-+12 ^ ^
- 0: abcdcdcd
- 1: abcdcd
-
-/^abc/
- abcdef
- 0: abc
- *** Failers
-No match
- abcdef\B
-No match
+/(\p{Yi}{0,3}+\277)*/
-/^(a*|xyz)/
- bcd
- 0:
- aaabcd
- 0: aaa
- 1: aa
- 2: a
- 3:
- xyz
- 0: xyz
- 1:
- xyz\N
- 0: xyz
- *** Failers
- 0:
- bcd\N
-No match
+/\p{Zl}{2,3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl {2}
+ prop Zl ?+
+ Ket
+ End
+------------------------------------------------------------------
+ 


+ 0: \x{2028}\x{2028}
+ \x{2028}\x{2028}\x{2028}
+ 0: \x{2028}\x{2028}\x{2028}
-/xyz$/
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
- xyz\n\Z
-No match
-
-/xyz$/m
- xyz
- 0: xyz
- xyz\n
- 0: xyz
- abcxyz\npqr
- 0: xyz
- abcxyz\npqr\Z
- 0: xyz
- xyz\n\Z
- 0: xyz
- *** Failers
-No match
- xyz\Z
-No match
+/\p{Zl}/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Zl
+ Ket
+ End
+------------------------------------------------------------------
-/\Gabc/
- abcdef
- 0: abc
- defabcxyz\>3
- 0: abc
- *** Failers
-No match
- defabcxyz
-No match
+/\p{Lu}{3}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Lu {3}
+ Ket
+ End
+------------------------------------------------------------------
-/^abcdef/
- ab\P
-Partial match: ab
- abcde\P
-Partial match: abcde
- abcdef\P
- 0: abcdef
- *** Failers
-No match
- abx\P
-No match
+/\pL{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop L {2}
+ Ket
+ End
+------------------------------------------------------------------
-/^a{2,4}\d+z/
- a\P
-Partial match: a
- aa\P
-Partial match: aa
- aa2\P
-Partial match: aa2
- aaa\P
-Partial match: aaa
- aaa23\P
-Partial match: aaa23
- aaaa12345\P
-Partial match: aaaa12345
- aa0z\P
- 0: aa0z
- aaaa4444444444444z\P
- 0: aaaa4444444444444z
- *** Failers
-No match
- az\P
-No match
- aaaaa\P
-No match
- a56\P
-No match
+/\p{Cc}{2}+/8BZ
+------------------------------------------------------------------
+ Bra
+ prop Cc {2}
+ Ket
+ End
+------------------------------------------------------------------
-/^abcdef/
- abc\P
-Partial match: abc
- def\R
- 0: def
-
-/(?<=foo)bar/
- xyzfo\P
-No match
- foob\P\>2
-Partial match: b
- foobar...\R\P\>4
- 0: ar
- xyzfo\P
-No match
- foobar\>2
- 0: bar
- *** Failers
-No match
- xyzfo\P
-No match
- obar\R
-No match
-
-/(ab*(cd|ef))+X/
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
-No match
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
-Partial match: abbbbbbcdaefabbbbbbbefa
- cdabbbbbbbb\P\R\B\Z
-Partial match: cdabbbbbbbb
- efabbbbbbbbbbbbbbbb\P\R\B\Z
-Partial match: efabbbbbbbbbbbbbbbb
- bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
- 0: bbbbbbbbbbbbcdX
-
-/(a|b)/SF>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
+/^\p{Cs}/8
+ \?\x{dfff}
+ 0: \x{dfff}
** Failers
- 0: a
- def
-No match
-
-/the quick brown fox/
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
-No match
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
-No match
-
-/The quick brown fox/i
- the quick brown fox
- 0: the quick brown fox
- The quick brown FOX
- 0: The quick brown FOX
- What do you know about the quick brown fox?
- 0: the quick brown fox
- What do you know about THE QUICK BROWN FOX?
- 0: THE QUICK BROWN FOX
-
-/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
-
-/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- 0: abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- 0: aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- 0: aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- 0: aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- 0: aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- 0: abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- 0: aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- 0: abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- 0: aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- 0: aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- 0: aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- 0: aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- 0: aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- 0: abcxyzpqrrrabbxyyyypqAzz
- *** Failers
-No match
- abxyzpqrrabbxyyyypqAzz
-No match
- abxyzpqrrrrabbxyyyypqAzz
-No match
- abxyzpqrrrabxyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
-No match
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
-No match
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
-No match
-
-/^(abc){1,2}zz/
- abczz
- 0: abczz
- abcabczz
- 0: abcabczz
- *** Failers
-No match
- zz
-No match
- abcabcabczz
-No match
- >>abczz
-No match
-
-/^(b+?|a){1,2}?c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}c/
- bc
- 0: bc
- bbc
- 0: bbc
- bbbc
- 0: bbbc
- bac
- 0: bac
- bbac
- 0: bbac
- aac
- 0: aac
- abbbbbbbbbbbc
- 0: abbbbbbbbbbbc
- bbbbbbbbbbbac
- 0: bbbbbbbbbbbac
- *** Failers
-No match
- aaac
-No match
- abbbbbbbbbbbac
-No match
-
-/^(b+|a){1,2}?bc/
- bbc
- 0: bbc
-
-/^(b*|ba){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
No match
- bababbc
+ \x{09f}
No match
- babababc
-No match
-
-/^(ba|b*){1,2}?bc/
- babc
- 0: babc
- bbabc
- 0: bbabc
- bababc
- 0: bababc
- *** Failers
-No match
- bababbc
-No match
- babababc
-No match
-
-/^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
- 0: \x01\x01\x1b;z
-
-/^[ab\]cde]/
- athing
- 0: a
- bthing
- 0: b
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- fthing
-No match
- [thing
-No match
- \\thing
-No match
-
-/^[]cde]/
- ]thing
- 0: ]
- cthing
- 0: c
- dthing
- 0: d
- ething
- 0: e
- *** Failers
-No match
- athing
-No match
- fthing
-No match
-
-/^[^ab\]cde]/
- fthing
- 0: f
- [thing
- 0: [
- \\thing
- 0: \
- *** Failers
- 0: *
- athing
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ 0: $\x{a2}\x{a3}\x{a4}\x{a5}
+ \x{9f2}
+ 0: \x{9f2}
+ ** Failers
No match
- bthing
+ X
No match
- ]thing
+ \x{2c2}
No match
- cthing
+
+/^\p{Zs}/8
+ \ \
+ 0:
+ \x{a0}
+ 0: \x{a0}
+ \x{1680}
+ 0: \x{1680}
+ \x{180e}
+ 0: \x{180e}
+ \x{2000}
+ 0: \x{2000}
+ \x{2001}
+ 0: \x{2001}
+ ** Failers
No match
- dthing
+ \x{2028}
No match
- ething
+ \x{200d}
No match
-
-/^[^]cde]/
- athing
- 0: a
- fthing
- 0: f
- *** Failers
+
+/-- These four are here rather than in test 6 because Perl has problems with
+ the negative versions of the properties. --/
+
+/\p{^Lu}/8i
+ 1234
+ 0: 1
+ ** Failers
0: *
- ]thing
-No match
- cthing
-No match
- dthing
-No match
- ething
+ ABC
No match
-/^\�/
- �
- 0: \x81
-
-/^�/
- �
- 0: \xff
-
-/^[0-9]+$/
- 0
- 0: 0
- 1
+/\P{Lu}/8i
+ 1234
0: 1
- 2
- 0: 2
- 3
- 0: 3
- 4
- 0: 4
- 5
- 0: 5
- 6
- 0: 6
- 7
- 0: 7
- 8
- 0: 8
- 9
- 0: 9
- 10
- 0: 10
- 100
- 0: 100
- *** Failers
-No match
- abc
-No match
-
-/^.*nter/
- enter
- 0: enter
- inter
- 0: inter
- uponter
- 0: uponter
-
-/^xxx[0-9]+$/
- xxx0
- 0: xxx0
- xxx1234
- 0: xxx1234
- *** Failers
-No match
- xxx
-No match
-
-/^.+[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^.+?[0-9][0-9][0-9]$/
- x123
- 0: x123
- xx123
- 0: xx123
- 123456
- 0: 123456
- *** Failers
-No match
- 123
-No match
- x1234
- 0: x1234
-
-/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- 0: abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
-No match
- !pqr=apquxz.ixr.zzz.ac.uk
-No match
- abc!=apquxz.ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz:ixr.zzz.ac.uk
-No match
- abc!pqr=apquxz.ixr.zzz.ac.ukk
-No match
-
-/:/
- Well, we need a colon: somewhere
- 0: :
- *** Fail if we don't
-No match
-
-/([\da-f:]+)$/i
- 0abc
- 0: 0abc
- abc
- 0: abc
- fed
- 0: fed
- E
- 0: E
- ::
- 0: ::
- 5f03:12C0::932e
- 0: 5f03:12C0::932e
- fed def
- 0: def
- Any old stuff
- 0: ff
- *** Failers
-No match
- 0zzz
-No match
- gzzz
-No match
- fed\x20
-No match
- Any old rubbish
-No match
-
-/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- 0: .1.2.3
- A.12.123.0
- 0: A.12.123.0
- *** Failers
-No match
- .1.2.3333
-No match
- 1.2.3
-No match
- 1234.2.3
-No match
-
-/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 0: 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- 0: 1 IN SOA non-sp1 non-sp2 (
- *** Failers
-No match
- 1IN SOA non-sp1 non-sp2(
-No match
-
-/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- 0: a.
- Z.
- 0: Z.
- 2.
- 0: 2.
- ab-c.pq-r.
- 0: ab-c.pq-r.
- sxk.zzz.ac.uk.
- 0: sxk.zzz.ac.uk.
- x-.y-.
- 0: x-.y-.
- *** Failers
-No match
- -abc.peq.
-No match
-
-/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- 0: *.a
- *.b0-a
- 0: *.b0-a
- *.c3-b.c
- 0: *.c3-b.c
- *.c-a.b-c
- 0: *.c-a.b-c
- *** Failers
-No match
- *.0
-No match
- *.a-
-No match
- *.a-b.c-
-No match
- *.c-a.0-c
-No match
-
-/^(?=ab(de))(abd)(e)/
- abde
- 0: abde
-
-/^(?!(ab)de|x)(abd)(f)/
- abdf
- 0: abdf
-
-/^(?=(ab(cd)))(ab)/
- abcd
- 0: ab
-
-/^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- 0: a.b.c.d
- A.B.C.D
- 0: A.B.C.D
- a.b.c.1.2.3.C
- 0: a.b.c.1.2.3.C
-
-/^\".*\"\s*(;.*)?$/
- \"1234\"
- 0: "1234"
- \"abcd\" ;
- 0: "abcd" ;
- \"\" ; rhubarb
- 0: "" ; rhubarb
- *** Failers
-No match
- \"1234\" : things
-No match
-
-/^$/
- \
- 0:
- *** Failers
-No match
-
-/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- 0: ab c
- *** Failers
-No match
- abc
-No match
- ab cde
-No match
-
-/^ a\ b[c ]d $/x
- a bcd
- 0: a bcd
- a b d
- 0: a b d
- *** Failers
-No match
- abcd
-No match
- ab d
+ ** Failers
+ 0: *
+ ABC
No match
-/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- 0: abcdefhijklm
-
-/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- 0: a+ Z0+\x08\x0a\x1d\x12
-
-/^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- 0: .^$(*+)|{?,?}
- 1: .^$(*+)|{?,?
- 2: .^$(*+)|{?,
- 3: .^$(*+)|{?
- 4: .^$(*+)|{
- 5: .^$(*+)|
- 6: .^$(*+)
- 7: .^$(*+
- 8: .^$(*
- 9: .^$(
-10: .^$
-11: .^
-12: .
-
-/^a*\w/
- z
- 0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
+/\p{Ll}/8i
a
0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a*?\w/
- z
+ Az
0: z
- az
- 0: az
- 1: a
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- 3: a
- a
- 0: a
- aa
- 0: aa
- 1: a
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- a+
- 0: a
- aa+
- 0: aa
- 1: a
-
-/^a+\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
-
-/^a+?\w/
- az
- 0: az
- aaaz
- 0: aaaz
- 1: aaa
- 2: aa
- aa
- 0: aa
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- aa+
- 0: aa
-
-/^\d{8}\w{2,}/
- 1234567890
- 0: 1234567890
- 12345678ab
- 0: 12345678ab
- 12345678__
- 0: 12345678__
- *** Failers
-No match
- 1234567
-No match
-
-/^[aeiou\d]{4,5}$/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- aaaaa
- 0: aaaaa
- *** Failers
-No match
- 123456
-No match
-
-/^[aeiou\d]{4,5}?/
- uoie
- 0: uoie
- 1234
- 0: 1234
- 12345
- 0: 12345
- 1: 1234
- aaaaa
- 0: aaaaa
- 1: aaaa
- 123456
- 0: 12345
- 1: 1234
-
-/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
-
-/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- 0: From abcd Mon Sep 01 12:33
- From abcd Mon Sep 1 12:33:02 1997
- 0: From abcd Mon Sep 1 12:33
- *** Failers
-No match
- From abcd Sep 01 12:33:02 1997
-No match
-
-/^12.34/s
- 12\n34
- 0: 12\x0a34
- 12\r34
- 0: 12\x0d34
-
-/\w+(?=\t)/
- the quick brown\t fox
- 0: brown
-
-/foo(?!bar)(.*)/
- foobar is foolish see?
- 0: foolish see?
- 1: foolish see
- 2: foolish se
- 3: foolish s
- 4: foolish
- 5: foolish
- 6: foolis
- 7: fooli
- 8: fool
- 9: foo
-
-/(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- 0: rowbar etc
- 1: rowbar et
- 2: rowbar e
- 3: rowbar
- 4: rowbar
- barrel
- 0: barrel
- 1: barre
- 2: barr
- 3: bar
- 2barrel
- 0: 2barrel
- 1: 2barre
- 2: 2barr
- 3: 2bar
- A barrel
- 0: A barrel
- 1: A barre
- 2: A barr
- 3: A bar
-
-/^(\D*)(?=\d)(?!123)/
- abc456
- 0: abc
- *** Failers
-No match
- abc123
-No match
-
-/^1234(?# test newlines
- inside)/
- 1234
- 0: 1234
-
-/^1234 #comment in extended re
- /x
- 1234
- 0: 1234
-
-/#rhubarb
- abcd/x
- abcd
- 0: abcd
-
-/^abcd#rhubarb/x
- abcd
- 0: abcd
-
-/(?!^)abc/
- the abc
- 0: abc
- *** Failers
-No match
- abc
-No match
-
-/(?=^)abc/
- abc
- 0: abc
- *** Failers
-No match
- the abc
-No match
-
-/^[ab]{1,3}(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}?(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/^[ab]{1,3}(ab*?|b)/
- aabbbbb
- 0: aabbbbb
- 1: aabbbb
- 2: aabbb
- 3: aabb
- 4: aab
- 5: aa
-
-/ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional leading comment
-(?: (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # one word, optionally followed by....
-(?:
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
-\(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) | # comments, or...
-
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-# quoted strings
-)*
-< (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # leading <
-(?: @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* , (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-)* # further okay, if led by comma
-: # closing colon
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* )? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) # initial word
-(?: (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-" (?: # opening quote...
-[^\\\x80-\xff\n\015"] # Anything except backslash and quote
-| # or
-\\ [^\x80-\xff] # Escaped something (something != CR)
-)* " # closing quote
-) )* # further okay, if led by a period
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* @ (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # initial subdomain
-(?: #
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* \. # if led by a period...
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* (?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-| \[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-) # ...further okay
-)*
-# address spec
-(?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* > # trailing >
-# name and address
-) (?: [\040\t] | \(
-(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
-\) )* # optional trailing comment
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <[email protected]>
- <user\@dom.ain>
- 1: user@dom
- user\@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <[email protected]> (a comment)
- 1: "A. Other" <[email protected]>
- 2: "A. Other" <[email protected]>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <[email protected]> (a comment)
- 1: Other <[email protected]>
- 2: Other <[email protected]>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional leading comment
-(?:
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address
-| # or
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-# leading word
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
-(?:
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-|
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-) # "special" comment or quoted string
-[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
-)*
-<
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# <
-(?:
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-(?: ,
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-)* # additional domains
-:
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)? # optional route
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-# Atom
-| # or
-" # "
-[^\\\x80-\xff\n\015"] * # normal
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
-" # "
-# Quoted string
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# additional words
-)*
-@
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-(?:
-\.
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-(?:
-[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
-(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
-|
-\[ # [
-(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
-\] # ]
-)
-[\040\t]* # Nab whitespace.
-(?:
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: # (
-(?: \\ [^\x80-\xff] |
-\( # (
-[^\\\x80-\xff\n\015()] * # normal*
-(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
-\) # )
-) # special
-[^\\\x80-\xff\n\015()] * # normal*
-)* # )*
-\) # )
-[\040\t]* )* # If comment found, allow more spaces.
-# optional trailing comments
-)*
-# address spec
-> # >
-# name and address
-)
-/x
- Alan Other <user\@dom.ain>
- 0: Alan Other <[email protected]>
- <user\@dom.ain>
- 1: user@dom
- user\@dom.ain
- 1: user@dom
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- 0: "A. Other" <[email protected]>
- A. Other <user.1234\@dom.ain> (a comment)
- 0: Other <[email protected]>
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
- 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
- A missing angle <user\@some.where
- 1: user@some
- *** Failers
-No match
- The quick brown fox
-No match
-
-/abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- 0: abc\x00def\x00pqr\x00xyz\x000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- 0: abc\x00def\x00pqr\x00xyz\x000AB
-
-/abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- 0: abc\x0def\x00pqr\x000xyz\x0000AB
-
-/^[\000-\037]/
- \0A
- 0: \x00
- \01B
- 0: \x01
- \037C
- 0: \x1f
-
-/\0*/
- \0\0\0\0
- 0: \x00\x00\x00\x00
- 1: \x00\x00\x00
- 2: \x00\x00
- 3: \x00
- 4:
-
-/A\x0{2,3}Z/
- The A\x0\x0Z
- 0: A\x00\x00Z
- An A\0\x0\0Z
- 0: A\x00\x00\x00Z
- *** Failers
-No match
- A\0Z
-No match
- A\0\x0\0\x0Z
-No match
-
-/^\s/
- \040abc
- 0:
- \x0cabc
- 0: \x0c
- \nabc
- 0: \x0a
- \rabc
- 0: \x0d
- \tabc
- 0: \x09
- *** Failers
-No match
- abc
-No match
-
-/^a b
- c/x
- abc
- 0: abc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
- abbbc
- 0: abbbc
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abbbbbc
-No match
-
-/([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- 0: track1.title:TBlah blah blah
- 1: track1.title:TBlah blah bla
- 2: track1.title:TBlah blah bl
- 3: track1.title:TBlah blah b
- 4: track1.title:TBlah blah
- 5: track1.title:TBlah blah
- 6: track1.title:TBlah bla
- 7: track1.title:TBlah bl
- 8: track1.title:TBlah b
- 9: track1.title:TBlah
-10: track1.title:TBlah
-11: track1.title:TBla
-12: track1.title:TBl
-13: track1.title:TB
-14: track1.title:T
-
-/^[W-c]+$/
- WXY_^abc
- 0: WXY_^abc
- *** Failers
-No match
- wxy
-No match
-
-/^[W-c]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^[\x3f-\x5F]+$/i
- WXY_^abc
- 0: WXY_^abc
- wxy_^ABC
- 0: wxy_^ABC
-
-/^abc$/m
- abc
- 0: abc
- qqq\nabc
- 0: abc
- abc\nzzz
- 0: abc
- qqq\nabc\nzzz
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\Aabc\Z/m
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-/\A(.)*\Z/s
- abc\ndef
- 0: abc\x0adef
-
-/\A(.)*\Z/m
- *** Failers
- 0: *** Failers
- abc\ndef
-No match
-
-/(?:b)|(?::+)/
- b::c
- 0: b
- c::b
- 0: ::
- 1: :
-
-/[-az]+/
- az-
- 0: az-
- 1: az
- 2: a
- *** Failers
- 0: a
- b
-No match
-
-/[az-]+/
- za-
- 0: za-
- 1: za
- 2: z
- *** Failers
- 0: a
- b
-No match
-
-/[a\-z]+/
- a-z
- 0: a-z
- 1: a-
- 2: a
- *** Failers
+ ** Failers
0: a
- b
-No match
-
-/[a-z]+/
- abcdxyz
- 0: abcdxyz
- 1: abcdxy
- 2: abcdx
- 3: abcd
- 4: abc
- 5: ab
- 6: a
-
-/[\d-]+/
- 12-34
- 0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- *** Failers
-No match
- aaa
+ ABC
No match
-/[\d-z]+/
- 12-34z
- 0: 12-34z
- 1: 12-34
- 2: 12-3
- 3: 12-
- 4: 12
- 5: 1
- *** Failers
-No match
- aaa
-No match
-
-/\x5c/
- \\
- 0: \
-
-/\x20Z/
- the Zoo
- 0: Z
- *** Failers
-No match
- Zulu
-No match
-
-/ab{3cd/
- ab{3cd
- 0: ab{3cd
-
-/ab{3,cd/
- ab{3,cd
- 0: ab{3,cd
-
-/ab{3,4a}cd/
- ab{3,4a}cd
- 0: ab{3,4a}cd
-
-/{4,5a}bc/
- {4,5a}bc
- 0: {4,5a}bc
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- *** Failers
-No match
- a\nb
-No match
-
-/abc$/
- abc
- 0: abc
- abc\n
- 0: abc
- *** Failers
-No match
- abc\ndef
-No match
-
-/(abc)\123/
- abc\x53
- 0: abcS
-
-/(abc)\223/
- abc\x93
- 0: abc\x93
-
-/(abc)\323/
- abc\xd3
- 0: abc\xd3
-
-/(abc)\100/
- abc\x40
- 0: abc@
- abc\100
- 0: abc@
-
-/(abc)\1000/
- abc\x400
- 0: abc@0
- abc\x40\x30
- 0: abc@0
- abc\1000
- 0: abc@0
- abc\100\x30
- 0: abc@0
- abc\100\060
- 0: abc@0
- abc\100\60
- 0: abc@0
-
-/abc\81/
- abc\081
- 0: abc\x0081
- abc\0\x38\x31
- 0: abc\x0081
-
-/abc\91/
- abc\091
- 0: abc\x0091
- abc\0\x39\x31
- 0: abc\x0091
-
-/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- 0: abcdefghijk\x0aS
-
-/ab\idef/
- abidef
- 0: abidef
-
-/a{0}bc/
- bc
- 0: bc
-
-/(a|(bc)){0,0}?xyz/
- xyz
- 0: xyz
-
-/abc[\10]de/
- abc\010de
- 0: abc\x08de
-
-/abc[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(abc)[\1]de/
- abc\1de
- 0: abc\x01de
-
-/(?s)a.b/
- a\nb
- 0: a\x0ab
-
-/^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- 0: baNOTcccc
- 1: baNOTccc
- 2: baNOTcc
- 3: baNOTc
- 4: baNOT
- baNOTcccd
- 0: baNOTccc
- 1: baNOTcc
- 2: baNOTc
- 3: baNOT
- baNOTccd
- 0: baNOTcc
- 1: baNOTc
- 2: baNOT
- bacccd
- 0: baccc
- *** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- anything
-No match
- b\bc
-No match
- baccd
-No match
-
-/[^a]/
- Abc
+/\p{Lu}/8i
+ A
0: A
-
-/[^a]/i
- Abc
- 0: b
-
-/[^a]+/
- AAAaAbc
- 0: AAA
- 1: AA
- 2: A
-
-/[^a]+/i
- AAAaAbc
- 0: bc
- 1: b
-
-/[^a]+/
- bbb\nccc
- 0: bbb\x0accc
- 1: bbb\x0acc
- 2: bbb\x0ac
- 3: bbb\x0a
- 4: bbb
- 5: bb
- 6: b
-
-/[^k]$/
- abc
- 0: c
- *** Failers
- 0: s
- abk
-No match
-
-/[^k]{2,3}$/
- abc
- 0: abc
- kbc
- 0: bc
- kabc
- 0: abc
- *** Failers
- 0: ers
- abk
-No match
- akb
-No match
- akk
-No match
-
-/^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- *** Failers
-No match
- 12345678\@x.y.uk
+ a\x{10a0}B
+ 0: \x{10a0}
+ ** Failers
+ 0: F
+ a
No match
- 1234567\@a.b.c.d
+ \x{1d00}
No match
-/[^a]/
- aaaabcd
- 0: b
- aaAabcd
- 0: A
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
-/[^a]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
+/-- The next two are special cases where the lengths of the different cases of
+the same character differ. The first went wrong with heap frame storage; the
+second was broken in all cases. --/
-/[^az]/
- aaaabcd
- 0: b
- aaAabcd
+/^\x{023a}+?(\x{0130}+)/8i
+ \x{023a}\x{2c65}\x{0130}
+ 0: \x{23a}\x{2c65}\x{130}
+ 1: \x{130}
+
+/^\x{023a}+([^X])/8i
+ \x{023a}\x{2c65}X
+ 0: \x{23a}\x{2c65}
+ 1: \x{2c65}
+
+/\x{c0}+\x{116}+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+
+/[\x{c0}\x{116}]+/8i
+ \x{c0}\x{e0}\x{116}\x{117}
+ 0: \x{c0}\x{e0}\x{116}\x{117}
+
+/(\x{de})\1/8i
+ \x{de}\x{de}
+ 0: \x{de}\x{de}
+ 1: \x{de}
+ \x{de}\x{fe}
+ 0: \x{de}\x{fe}
+ 1: \x{de}
+ \x{fe}\x{fe}
+ 0: \x{fe}\x{fe}
+ 1: \x{fe}
+ \x{fe}\x{de}
+ 0: \x{fe}\x{de}
+ 1: \x{fe}
+
+/^\x{c0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/^\x{e0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
+will match it only with UCP support, because without that it has no notion
+of case for anything other than the ASCII letters. --/
+
+/((?i)[\x{c0}])/8
+ \x{c0}
+ 0: \x{c0}
+ 1: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+ 1: \x{e0}
+
+/(?i:[\x{c0}])/8
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
+
+/^\p{Xan}/8
+ ABCD
0: A
-
-/[^az]/i
- aaaabcd
- 0: b
- aaAabcd
- 0: b
-
-/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
-
-/P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- 0: PSTAIREISLL
-
-/(\.\d\d[1-9]?)\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- 6: .875
- 1.235
- 0: .235
-
-/(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 0: .230
- 1: .23
- 1.875000282
- 0: .875
- *** Failers
-No match
- 1.235
-No match
-
-/a(?)b/
- ab
- 0: ab
-
-/\b(foo)\s+(\w+)/i
- Food is on the foo table
- 0: foo table
- 1: foo tabl
- 2: foo tab
- 3: foo ta
- 4: foo t
-
-/foo(.*)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/foo(.*?)bar/
- The food is under the bar in the barn.
- 0: food is under the bar in the bar
- 1: food is under the bar
-
-/(.*)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*?)(\d*)/
- I have 2 numbers: 53147
-Matched, but too many subsidiary matches
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2 numbers:
- 6: I have 2 numbers:
- 7: I have 2 numbers
- 8: I have 2 number
- 9: I have 2 numbe
-10: I have 2 numb
-11: I have 2 num
-12: I have 2 nu
-13: I have 2 n
-14: I have 2
-15: I have 2
-16: I have
-17: I have
-18: I hav
-19: I ha
-20: I h
-21: I
-
-/(.*?)(\d+)/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
- 1: I have 2 numbers: 5314
- 2: I have 2 numbers: 531
- 3: I have 2 numbers: 53
- 4: I have 2 numbers: 5
- 5: I have 2
-
-/(.*)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*?)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*)\b(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/(.*\D)(\d+)$/
- I have 2 numbers: 53147
- 0: I have 2 numbers: 53147
-
-/^\D*(?!123)/
- ABC123
- 0: AB
- 1: A
- 2:
-
-/^(\D*)(?=\d)(?!123)/
- ABC445
- 0: ABC
- *** Failers
-No match
- ABC123
-No match
-
-/^[W-]46]/
- W46]789
- 0: W46]
- -46]789
- 0: -46]
- *** Failers
-No match
- Wall
-No match
- Zebra
-No match
- 42
-No match
- [abcd]
-No match
- ]abcd[
-No match
-
-/^[W-\]46]/
- W46]789
- 0: W
- Wall
- 0: W
- Zebra
- 0: Z
- Xylophone
- 0: X
- 42
- 0: 4
- [abcd]
- 0: [
- ]abcd[
- 0: ]
- \\backslash
- 0: \
- *** Failers
-No match
- -46]789
-No match
- well
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
No match
-
-/\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- 0: 01/01/2000
-
-/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
+ _ABC
No match
-/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+/^\p{Xan}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ ** Failers
No match
-
-/^(a){0,0}/
- bcd
- 0:
- abc
- 0:
- aab
- 0:
-
-/^(a){0,1}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: a
- 1:
-
-/^(a){0,2}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
-
-/^(a){0,3}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
-
-/^(a){0,}/
- bcd
- 0:
- abc
- 0: a
- 1:
- aab
- 0: aa
- 1: a
- 2:
- aaa
- 0: aaa
- 1: aa
- 2: a
- 3:
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
- 8:
-
-/^(a){1,1}/
- bcd
+ _ABC
No match
- abc
- 0: a
- aab
- 0: a
-/^(a){1,2}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
+/^\p{Xan}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}
-/^(a){1,3}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
-
-/^(a){1,}/
- bcd
-No match
- abc
- 0: a
- aab
- 0: aa
- 1: a
- aaa
- 0: aaa
- 1: aa
- 2: a
- aaaaaaaa
- 0: aaaaaaaa
- 1: aaaaaaa
- 2: aaaaaa
- 3: aaaaa
- 4: aaaa
- 5: aaa
- 6: aa
- 7: a
-
-/.*\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.{0,}\.gif/
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/m
- borfle\nbib.gif\nno
- 0: bib.gif
-
-/.*\.gif/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
-
-/.*\.gif/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif
+/^\p{Xan}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
-/.*$/
- borfle\nbib.gif\nno
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno
- 0: borfle\x0abib.gif\x0ano
- 1: borfle\x0abib.gif
- 2: borfle
+/^\p{Xan}{2,9}/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}
-/.*$/
- borfle\nbib.gif\nno\n
- 0: no
-
-/.*$/m
- borfle\nbib.gif\nno\n
- 0: borfle
-
-/.*$/s
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
-
-/.*$/ms
- borfle\nbib.gif\nno\n
- 0: borfle\x0abib.gif\x0ano\x0a
- 1: borfle\x0abib.gif\x0ano
- 2: borfle\x0abib.gif
- 3: borfle
+/^\p{Xan}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}\x{a6c}
-/(.*X|^B)/
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/m
- abcde\n1234Xyz
- 0: 1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(.*X|^B)/s
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(.*X|^B)/ms
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- abcde\nBar
- 0: B
-
-/(?s)(.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/(?s:.*X|^B)/
- abcde\n1234Xyz
- 0: abcde\x0a1234X
- BarFoo
- 0: B
- *** Failers
-No match
- abcde\nBar
-No match
-
-/^.*B/
- **** Failers
-No match
- abc\nB
-No match
-
-/(?s)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?m)^.*B/
- abc\nB
- 0: B
-
-/(?ms)^.*B/
- abc\nB
- 0: abc\x0aB
-
-/(?ms)^B/
- abc\nB
- 0: B
-
-/(?s)B$/
- B\n
- 0: B
-
-/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
- 0: 123456654321
-
-/^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- 0: 123456654321
-
-/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
- 0: 123456654321
-
-/^[abc]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[a-c]{12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^(a|b|c){12}/
- abcabcabcabc
- 0: abcabcabcabc
-
-/^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- 0: n
- *** Failers
-No match
- z
-No match
-
-/abcde{0,0}/
- abcd
- 0: abcd
- *** Failers
-No match
- abce
-No match
-
-/ab[cd]{0,0}e/
- abe
- 0: abe
- *** Failers
+/^[\p{Xan}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ ** Failers
No match
- abcde
+ _ABC
No match
-
-/ab(c){0,0}d/
- abd
- 0: abd
- *** Failers
+
+/^[\p{Xan}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
+ ** Failers
No match
- abcd
+ _ABC
No match
-/a(b*)/
- a
- 0: a
- ab
- 0: ab
- 1: a
- abbbb
- 0: abbbb
- 1: abbb
- 2: abb
- 3: ab
- 4: a
- *** Failers
- 0: a
- bbbbb
-No match
-
-/ab\d{0}e/
- abe
- 0: abe
- *** Failers
+/^>\p{Xsp}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ >\x{a0}
+ 0: >\x{a0}
+ ** Failers
No match
- ab1e
+ \x{0b}
No match
-
-/"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- 0: "quick"
- \"the \\\"quick\\\" brown fox\"
- 0: "the \"quick\" brown fox"
-/.*?/g+
- abc
- 0: abc
- 0+
- 1: ab
- 2: a
- 3:
- 0:
- 0+
-
-/\b/g+
- abc
- 0:
- 0+ abc
- 0:
- 0+
+/^>\p{Xsp}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/\b/+g
- abc
- 0:
- 0+ abc
- 0:
- 0+
+/^>\p{Xsp}+?/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
-//g
- abc
- 0:
- 0:
- 0:
- 0:
-
-/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
-
-/a[^a]b/
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/a.b/
- acb
- 0: acb
- *** Failers
-No match
- a\nb
-No match
+/^>\p{Xsp}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/a[^a]b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
+/^>\p{Xsp}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
-/a.b/s
- acb
- 0: acb
- a\nb
- 0: a\x0ab
-
-/^(b+?|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
-
-/^(b+|a){1,2}?c/
- bac
- 0: bac
- bbac
- 0: bbac
- bbbac
- 0: bbbac
- bbbbac
- 0: bbbbac
- bbbbbac
- 0: bbbbbac
+/^>\p{Xsp}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}
-/(?!\A)x/m
- x\nb\n
-No match
- a\bx\n
- 0: x
-
-/\x0{ab}/
- \0{ab}
- 0: \x00{ab}
-
-/(A|B)*?CD/
- CD
- 0: CD
-
-/(A|B)*CD/
- CD
- 0: CD
-
-/(?<!bar)foo/
- foo
- 0: foo
- catfood
- 0: foo
- arfootle
- 0: foo
- rfoosh
- 0: foo
- *** Failers
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/\w{3}(?<!bar)foo/
- catfood
- 0: catfoo
- *** Failers
-No match
- foo
-No match
- barfoo
+/^>[\p{Xsp}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
+
+/^>[\p{Xsp}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}
+
+/^>\p{Xps}/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
+ >\x{a0}
+ 0: >\x{a0}
+ ** Failers
No match
- towbarfoo
+ \x{0b}
No match
-/(?<=(foo)a)bar/
- fooabar
- 0: bar
- *** Failers
-No match
- bar
-No match
- foobbar
-No match
-
-/\Aabc\z/m
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
+/^>\p{Xps}+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-No match
+/^>\p{Xps}+?/8
+ >\x{1680}\x{2028}\x{0b}
+ 0: >\x{1680}
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 0: .230003938
- 1: .23000393
- 2: .2300039
- 3: .230003
- 4: .23000
- 5: .2300
- 6: .230
- 1.875000282
- 0: .875000282
- 1: .87500028
- 2: .8750002
- 3: .875000
- 4: .87500
- 5: .8750
- *** Failers
-No match
- 1.235
-No match
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
+/^>\p{Xps}*/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(\d+)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: 1234
- 3: 123
- 4: 12
- 12345+
- 0: 12345
- 1: 1234
- 2: 123
- 3: 12
-
-/((?>\d+))(\w)/
- 12345a
- 0: 12345a
- *** Failers
-No match
- 12345+
-No match
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/(?>b)+/
- aaabbbccc
- 0: bbb
- 1: bb
- 2: b
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbc
+/^>\p{Xps}{2,9}/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbcccc
- 1: aaabbbbccc
- 2: aaabbbbcc
- 3: aaabbbbc
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
+/^>\p{Xps}{2,9}?/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- (abc(def)xyz)
- 0: (abc(def)xyz)
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/a(?-i)b/i
- ab
- 0: ab
- Ab
- 0: Ab
- *** Failers
-No match
- aB
-No match
- AB
-No match
-
-/(a (?x)b c)d e/
- a bcd e
- 0: a bcd e
- *** Failers
-No match
- a b cd e
-No match
- abcd e
-No match
- a bcde
-No match
+/^>[\p{Xps}]/8
+ >\x{2028}\x{0b}
+ 0: >\x{2028}
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- 0: a bcde f
- *** Failers
-No match
- abcdef
-No match
+/^>[\p{Xps}]+/8
+ > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
+ 0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-/(a(?i)b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- abC
-No match
- aBC
-No match
- Abc
-No match
- ABc
-No match
- ABC
-No match
- AbC
-No match
-
-/a(?i:b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- ABC
-No match
- abC
-No match
- aBC
-No match
-
-/a(?i:b)*c/
- aBc
- 0: aBc
- aBBc
- 0: aBBc
- *** Failers
-No match
- aBC
-No match
- aBBC
-No match
-
-/a(?=b(?i)c)\w\wd/
- abcd
- 0: abcd
- abCd
- 0: abCd
- *** Failers
-No match
- aBCd
-No match
- abcD
-No match
-
-/(?s-i:more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
+/^\p{Xwd}/8
+ ABCD
+ 0: A
+ 1234
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
+ ** Failers
No match
- more \n than \n million
+ []
No match
-/(?:(?s-i)more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?>a(?i)b+)+c/
- abc
- 0: abc
- aBbc
- 0: aBbc
- aBBc
- 0: aBBc
- *** Failers
-No match
- Abc
-No match
- abAb
-No match
- abbC
-No match
-
-/(?=a(?i)b)\w\wc/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- Ab
-No match
- abC
-No match
- aBC
-No match
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- 0: xxc
- aBxxc
- 0: xxc
- *** Failers
-No match
- Abxxc
-No match
- ABxxc
-No match
- abxxC
-No match
+/^\p{Xwd}+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
+/^\p{Xwd}+?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
+/^\p{Xwd}*/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-/(?(?<=foo)bar|cat)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?(?<!foo)cat|bar)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aa
- 0: aa
- 1:
- aaaa
- 0: aaaa
- 1:
+/^\p{Xwd}{2,9}/8
+ A_B12\x{6ca}\x{a6c}\x{10a7}
+ 0: A_B12\x{6ca}\x{a6c}\x{10a7}
-/(abc|)+/
- abc
- 0: abc
- 1:
- abcabc
- 0: abcabc
- 1: abc
- 2:
- abcabcabc
- 0: abcabcabc
- 1: abcabc
- 2: abc
- 3:
- xyz
- 0:
-
-/([a]*)*/
- a
- 0: a
- 1:
- aaaaa
- 0: aaaaa
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
-
-/([ab]*)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- ababab
- 0: ababab
- 1: ababa
- 2: abab
- 3: aba
- 4: ab
- 5: a
- 6:
- aaaabcde
- 0: aaaab
- 1: aaaa
- 2: aaa
- 3: aa
- 4: a
- 5:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
-
-/([^a]*)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*)*/
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- abab
- 0:
-
-/([a]*?)*/
- a
- 0: a
- 1:
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/([ab]*?)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- abab
- 0: abab
- 1: aba
- 2: ab
- 3: a
- 4:
- baba
- 0: baba
- 1: bab
- 2: ba
- 3: b
- 4:
-
-/([^a]*?)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1: bbb
- 2: bb
- 3: b
- 4:
- aaa
- 0:
-
-/([^ab]*?)*/
- c
- 0: c
- 1:
- cccc
- 0: cccc
- 1: ccc
- 2: cc
- 3: c
- 4:
- baba
- 0:
-
-/(?>a*)*/
- a
- 0: a
- 1:
- aaabcde
- 0: aaa
- 1:
-
-/((?>a*))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/((?>a*?))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 0: 12-sep-98
- 12-09-98
- 0: 12-09-98
- *** Failers
-No match
- sep-12-98
-No match
-
-/(?i:saturday|sunday)/
- saturday
- 0: saturday
- sunday
- 0: sunday
- Saturday
- 0: Saturday
- Sunday
- 0: Sunday
- SATURDAY
- 0: SATURDAY
- SUNDAY
- 0: SUNDAY
- SunDay
- 0: SunDay
+/^\p{Xwd}{2,9}?/8
+ \x{6ca}\x{a6c}\x{10a7}_
+ 0: \x{6ca}\x{a6c}
-/(a(?i)bc|BB)x/
- abcx
- 0: abcx
- aBCx
- 0: aBCx
- bbx
- 0: bbx
- BBx
- 0: BBx
- *** Failers
-No match
- abcX
-No match
- aBCX
-No match
- bbX
-No match
- BBX
-No match
-
-/^([ab](?i)[cd]|[ef])/
- ac
- 0: ac
- aC
- 0: aC
- bD
- 0: bD
- elephant
- 0: e
- Europe
- 0: E
- frog
- 0: f
- France
- 0: F
- *** Failers
-No match
- Africa
-No match
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- 0: ab
- aBd
- 0: aBd
- xy
- 0: xy
- xY
- 0: xY
- zebra
- 0: z
- Zambesi
- 0: Z
- *** Failers
-No match
- aCD
-No match
- XY
-No match
-
-/(?<=foo\n)^bar/m
- foo\nbar
- 0: bar
- *** Failers
-No match
- bar
-No match
- baz\nbar
-No match
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- 0: baz
- barbarbaz
- 0: baz
- koobarbaz
- 0: baz
- *** Failers
-No match
- baz
-No match
- foobarbaz
-No match
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-No match
-
-/abc/
- abc
- 0: abc
- xabcy
- 0: abc
- ababc
- 0: abc
- *** Failers
-No match
- xbc
-No match
- axc
+/^[\p{Xwd}]/8
+ ABCD1234_
+ 0: A
+ 1234abcd_
+ 0: 1
+ \x{6ca}
+ 0: \x{6ca}
+ \x{a6c}
+ 0: \x{a6c}
+ \x{10a7}
+ 0: \x{10a7}
+ _ABC
+ 0: _
+ ** Failers
No match
- abx
+ []
No match
-
-/ab*c/
- abc
- 0: abc
-
-/ab*bc/
- abc
+
+/^[\p{Xwd}]+/8
+ ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+ 0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
+
+/-- A check not in UTF-8 mode --/
+
+/^[\p{Xwd}]+/
+ ABCD1234_
+ 0: ABCD1234_
+
+/-- Some negative checks --/
+
+/^[\P{Xwd}]+/8
+ !.+\x{019}\x{35a}AB
+ 0: !.+\x{19}\x{35a}
+
+/^[\p{^Xwd}]+/8
+ !.+\x{019}\x{35a}AB
+ 0: !.+\x{19}\x{35a}
+
+/[\D]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+ 1\x{3c8}2
+ 0: \x{3c8}
+
+/[\d]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{6f4}<
+ 0: \x{6f4}
+
+/[\S]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Xsp}]
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{6f4}\x{1680}
+ 0: \x{6f4}
+
+/[\s]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Xsp}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1680}<
+ 0: \x{1680}
+
+/[\W]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\P{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+ A\x{1712}B
+ 0: \x{1712}
+
+/[\w]/WBZ8
+------------------------------------------------------------------
+ Bra
+ [\p{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1723}<
+ 0: \x{1723}
+
+/\D/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Nd
+ Ket
+ End
+------------------------------------------------------------------
+ 1\x{3c8}2
+ 0: \x{3c8}
+
+/\d/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Nd
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{6f4}<
+ 0: \x{6f4}
+
+/\S/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Xsp
+ Ket
+ End
+------------------------------------------------------------------
+ \x{1680}\x{6f4}\x{1680}
+ 0: \x{6f4}
+
+/\s/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Xsp
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1680}>
+ 0: \x{1680}
+
+/\W/WBZ8
+------------------------------------------------------------------
+ Bra
+ notprop Xwd
+ Ket
+ End
+------------------------------------------------------------------
+ A\x{1712}B
+ 0: \x{1712}
+
+/\w/WBZ8
+------------------------------------------------------------------
+ Bra
+ prop Xwd
+ Ket
+ End
+------------------------------------------------------------------
+ >\x{1723}<
+ 0: \x{1723}
+
+/[[:alpha:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:lower:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Ll}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:upper:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Lu}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:alnum:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xan}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:ascii:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x7f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:cntrl:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\x00-\x1f\x7f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:digit:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Nd}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:graph:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [!-~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:print:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:punct:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [!-/:-@[-`{-~]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:space:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xps}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:word:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{Xwd}]
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:xdigit:]]/WBZ
+------------------------------------------------------------------
+ Bra
+ [0-9A-Fa-f]
+ Ket
+ End
+------------------------------------------------------------------
+
+/-- Unicode properties for \b abd \B --/
+
+/\b...\B/8W
+ abc_
+ 0: abc
+ \x{37e}abc\x{376}
+ 0: abc
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ 0: \x{376}\x{371}\x{393}
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\x{c1}
+ !\x{c0}+++++
+ 0: \x{c0}++
+
+/-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
+
+/\b...\B/8
+ abc_
0: abc
- abbc
- 0: abbc
- abbbbc
- 0: abbbbc
-
-/.{1}/
- abbbbc
- 0: a
-
-/.{3,4}/
- abbbbc
- 0: abbb
- 1: abb
-
-/ab{0,}bc/
- abbbbc
- 0: abbbbc
-
-/ab+bc/
- abbc
- 0: abbc
- *** Failers
+ ** Failers
+ 0: Fai
+ \x{37e}abc\x{376}
No match
- abc
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
No match
- abq
+ !\x{c0}++\x{c1}\x{c2}
No match
-
-/ab{1,}bc/
-
-/ab+bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,}bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
-
-/ab{3,4}bc/
- abbbbc
- 0: abbbbc
-
-/ab{4,5}bc/
- *** Failers
-No match
- abq
+ !\x{c0}+++++
No match
- abbbbc
-No match
-
-/ab?bc/
- abbc
- 0: abbc
- abc
- 0: abc
-
-/ab{0,1}bc/
- abc
- 0: abc
-/ab?bc/
+/-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
-/ab?c/
- abc
+/\b...\B/W
+ abc_
0: abc
+ !\x{c0}++\x{c1}\x{c2}
+ 0: ++\xc1
+ !\x{c0}+++++
+ 0: \xc0++
-/ab{0,1}c/
- abc
- 0: abc
+/-- Some of these are silly, but they check various combinations --/
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- abbbbc
-No match
- abcc
-No match
-
-/^abc/
- abcc
- 0: abc
-
-/^abc$/
-
-/abc$/
- aabc
- 0: abc
- *** Failers
-No match
- aabc
+/[[:^alpha:][:^cntrl:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~\x80-\xff\P{L}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
+ abc
0: abc
- aabcd
-No match
-
-/^/
- abc
- 0:
-/$/
- abc
- 0:
-
-/a.c/
- abc
+/[[:^cntrl:][:^alpha:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [ -~\x80-\xff\P{L}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
+ abc
0: abc
- axc
- 0: axc
-
-/a.*c/
- axyzc
- 0: axyzc
-
-/a[bc]d/
- abd
- 0: abd
- *** Failers
-No match
- axyzd
-No match
- abc
-No match
-
-/a[b-d]e/
- ace
- 0: ace
-
-/a[b-d]/
- aac
- 0: ac
-
-/a[-b]/
- a-
- 0: a-
-
-/a[b-]/
- a-
- 0: a-
-
-/a]/
- a]
- 0: a]
-
-/a[]]b/
- a]b
- 0: a]b
-
-/a[^bc]d/
- aed
- 0: aed
- *** Failers
-No match
- abd
-No match
- abd
-No match
-
-/a[^-b]c/
- adc
- 0: adc
-
-/a[^]b]c/
- adc
- 0: adc
- *** Failers
-No match
- a-c
- 0: a-c
- a]c
-No match
-
-/\ba\b/
- a-
- 0: a
- -a
- 0: a
- -a-
- 0: a
-
-/\by\b/
- *** Failers
-No match
- xy
-No match
- yz
-No match
- xyz
-No match
-
-/\Ba\B/
- *** Failers
- 0: a
- a-
-No match
- -a
-No match
- -a-
-No match
-
-/\By\b/
- xy
- 0: y
-
-/\by\B/
- yz
- 0: y
-
-/\By\B/
- xyz
- 0: y
-
-/\w/
- a
- 0: a
-
-/\W/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a\sb/
- a b
- 0: a b
-
-/a\Sb/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/\d/
- 1
- 0: 1
-
-/\D/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/[\w]/
- a
- 0: a
-
-/[\W]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-/a[\s]b/
- a b
- 0: a b
-
-/a[\S]b/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/[\d]/
- 1
- 0: 1
-
-/[\D]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/ab|cd/
- abc
- 0: ab
- abcd
- 0: ab
-
-/()ef/
- def
- 0: ef
-
-/$b/
-
-/a\(b/
- a(b
- 0: a(b
-
-/a\(*b/
- ab
- 0: ab
- a((b
- 0: a((b
-
-/a\\b/
- a\b
-No match
-
-/((a))/
- abc
- 0: a
-
-/(a)b(c)/
+/[[:alpha:]]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [\p{L}]+
+ Ket
+ End
+------------------------------------------------------------------
abc
0: abc
-/a+b+c/
- aabbabc
+/[[:^alpha:]\S]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [\P{L}\P{Xsp}]+
+ Ket
+ End
+------------------------------------------------------------------
+ 123
+ 0: 123
+ abc
0: abc
-/a{1,}b{1,}c/
- aabbabc
+/[^\d]+/8WBZ
+------------------------------------------------------------------
+ Bra
+ [^\p{Nd}]+
+ Ket
+ End
+------------------------------------------------------------------
+ abc123
0: abc
-
-/a.+?c/
- abcabc
- 0: abcabc
- 1: abc
-
-/(a+|b)*/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b){0,}/
- ab
- 0: ab
- 1: a
- 2:
-
-/(a+|b)+/
- ab
- 0: ab
- 1: a
-
-/(a+|b){1,}/
- ab
- 0: ab
- 1: a
-
-/(a+|b)?/
- ab
- 0: a
- 1:
-
-/(a+|b){0,1}/
- ab
- 0: a
- 1:
-
-/[^ab]*/
- cde
- 0: cde
- 1: cd
- 2: c
- 3:
-
-/abc/
- *** Failers
+ abc\x{123}
+ 0: abc\x{123}
+ \x{660}abc
+ 0: abc
+
+/\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ prop Lu ++
+ 9
+ prop Lu +
+ B
+ prop Lu ++
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ notprop Lu +
+ 9
+ notprop Lu ++
+ B
+ notprop Lu +
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
+------------------------------------------------------------------
+ Bra
+ notprop Lu +
+ 9
+ notprop Lu ++
+ B
+ notprop Lu +
+ b
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Han}+X\p{Greek}+\x{370}/BZ8
+------------------------------------------------------------------
+ Bra
+ prop Han ++
+ X
+ prop Greek +
+ \x{370}
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xan}+!\p{Xan}+A/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xan ++
+ !
+ prop Xan +
+ A
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xsp}+!\p{Xsp}\t/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xsp ++
+ !
+ prop Xsp
+ \x09
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xps}+!\p{Xps}\t/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xps ++
+ !
+ prop Xps
+ \x09
+ Ket
+ End
+------------------------------------------------------------------
+
+/\p{Xwd}+!\p{Xwd}_/BZ
+------------------------------------------------------------------
+ Bra
+ prop Xwd ++
+ !
+ prop Xwd
+ _
+ Ket
+ End
+------------------------------------------------------------------
+
+/A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
+------------------------------------------------------------------
+ Bra
+ A++
+ prop N
+ A++
+ prop Nd
+ B+
+ prop N *+
+ B+
+ prop Nd *
+ Ket
+ End
+------------------------------------------------------------------
+
+/-- These behaved oddly in Perl, so they are kept in this test --/
+
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
+No match
+
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥ
+No match
+
+/(\x{23a}\x{23a}\x{23a})?\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(ȺȺȺ)?\1/8i
+ ȺȺȺⱥⱥⱥ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
+No match
+
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥ
+No match
+
+/(\x{23a}\x{23a}\x{23a})\1/8i
+ \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(ȺȺȺ)\1/8i
+ ȺȺȺⱥⱥⱥ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{2c65}\x{2c65})\1/8i
+ \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 1: \x{2c65}\x{2c65}
+
+/(ⱥⱥ)\1/8i
+ ⱥⱥȺȺ
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}
+ 1: \x{2c65}\x{2c65}
+
+/(\x{23a}\x{23a}\x{23a})\1Y/8i
+ X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
+ 0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
+ 1: \x{23a}\x{23a}\x{23a}
+
+/(\x{2c65}\x{2c65})\1Y/8i
+ X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
+ 0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
+ 1: \x{2c65}\x{2c65}
+
+/-- --/
+
+/-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
+
+/^[\p{Batak}]/8
+ \x{1bc0}
+ 0: \x{1bc0}
+ \x{1bff}
+ 0: \x{1bff}
+ ** Failers
No match
- b
+ \x{1bf4}
No match
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
- 0: abbbcd
-
-/([abc])*bcd/
- abcd
- 0: abcd
-
-/a|b|c|d|e/
- e
- 0: e
-
-/(a|b|c|d|e)f/
- ef
- 0: ef
-
-/abcd*efg/
- abcdefg
- 0: abcdefg
-
-/ab*/
- xabyabbbz
- 0: ab
- 1: a
- xayabbbz
- 0: a
-
-/(ab|cd)e/
- abcde
- 0: cde
-
-/[abhgefdc]ij/
- hij
- 0: hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
- 0: ef
-
-/(a|b)c*d/
- abcd
- 0: bcd
-
-/(ab|ab*)bc/
- abc
- 0: abc
-
-/a([bc]*)c*/
- abc
- 0: abc
- 1: ab
- 2: a
-
-/a([bc]*)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]+)(c*d)/
- abcd
- 0: abcd
-
-/a([bc]*)(c+d)/
- abcd
- 0: abcd
-
-/a[bcd]*dcdcde/
- adcdcde
- 0: adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
-No match
- abcde
-No match
- adcdcde
-No match
-
-/(ab|a)b*c/
- abc
- 0: abc
-
-/((a)(b)c)(d)/
- abcd
- 0: abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- 0: alpha
- 1: alph
- 2: alp
- 3: al
- 4: a
-
-/^a(bc+|b[eh])g|.h$/
- abh
- 0: bh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- 0: effgz
- ij
- 0: ij
- reffgz
- 0: effgz
- *** Failers
-No match
- effg
-No match
- bcdd
-No match
-
-/((((((((((a))))))))))/
- a
- 0: a
-
-/(((((((((a)))))))))/
- a
- 0: a
-
-/multiple words of text/
- *** Failers
-No match
- aa
-No match
- uh-uh
-No match
-
-/multiple words/
- multiple words, yeah
- 0: multiple words
-
-/(.*)c(.*)/
- abcde
- 0: abcde
- 1: abcd
- 2: abc
-
-/\((.*), (.*)\)/
- (a, b)
- 0: (a, b)
-
-/[k]/
-
-/abcd/
- abcd
- 0: abcd
-
-/a(bc)d/
- abcd
- 0: abcd
-
-/a[-]?c/
- ac
- 0: ac
-
-/abc/i
- ABC
- 0: ABC
- XABCY
- 0: ABC
- ABABC
- 0: ABC
- *** Failers
-No match
- aaxabxbaxbbx
-No match
- XBC
-No match
- AXC
-No match
- ABX
-No match
-
-/ab*c/i
- ABC
- 0: ABC
-
-/ab*bc/i
- ABC
- 0: ABC
- ABBC
- 0: ABBC
-
-/ab*?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab+?bc/i
- ABBC
- 0: ABBC
-
-/ab+bc/i
- *** Failers
-No match
- ABC
-No match
- ABQ
-No match
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
-No match
- ABQ
-No match
- ABBBBC
-No match
-
-/ab??bc/i
- ABBC
- 0: ABBC
- ABC
- 0: ABC
-
-/ab{0,1}?bc/i
- ABC
- 0: ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
- 0: ABC
-
-/ab{0,1}?c/i
- ABC
- 0: ABC
-
-/^abc$/i
- ABC
- 0: ABC
- *** Failers
-No match
- ABBBBC
-No match
- ABCC
-No match
-
-/^abc/i
- ABCC
- 0: ABC
-
-/^abc$/i
-
-/abc$/i
- AABC
- 0: ABC
-
-/^/i
- ABC
- 0:
-
-/$/i
- ABC
- 0:
-
-/a.c/i
- ABC
- 0: ABC
- AXC
- 0: AXC
-
-/a.*?c/i
- AXYZC
- 0: AXYZC
-
-/a.*c/i
- *** Failers
-No match
- AABC
- 0: AABC
- AXYZD
-No match
-
-/a[bc]d/i
- ABD
- 0: ABD
-
-/a[b-d]e/i
- ACE
- 0: ACE
- *** Failers
-No match
- ABC
-No match
- ABD
-No match
-
-/a[b-d]/i
- AAC
- 0: AC
-
-/a[-b]/i
- A-
- 0: A-
-
-/a[b-]/i
- A-
- 0: A-
-
-/a]/i
- A]
- 0: A]
-
-/a[]]b/i
- A]B
- 0: A]B
-
-/a[^bc]d/i
- AED
- 0: AED
-
-/a[^-b]c/i
- ADC
- 0: ADC
- *** Failers
-No match
- ABD
+/^[\p{Brahmi}]/8
+ \x{11000}
+ 0: \x{11000}
+ \x{1106f}
+ 0: \x{1106f}
+ ** Failers
No match
- A-C
+ \x{1104e}
No match
-
-/a[^]b]c/i
- ADC
- 0: ADC
-
-/ab|cd/i
- ABC
- 0: AB
- ABCD
- 0: AB
-
-/()ef/i
- DEF
- 0: EF
-
-/$b/i
- *** Failers
-No match
- A]C
+
+/^[\p{Mandaic}]/8
+ \x{840}
+ 0: \x{840}
+ \x{85e}
+ 0: \x{85e}
+ ** Failers
No match
- B
+ \x{85c}
No match
-
-/a\(b/i
- A(B
- 0: A(B
-
-/a\(*b/i
- AB
- 0: AB
- A((B
- 0: A((B
-
-/a\\b/i
- A\B
+ \x{85d}
No match
-/((a))/i
- ABC
- 0: A
-
-/(a)b(c)/i
- ABC
- 0: ABC
-
-/a+b+c/i
- AABBABC
- 0: ABC
-
-/a{1,}b{1,}c/i
- AABBABC
- 0: ABC
-
-/a.+?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.*?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a.{0,5}?c/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/(a+|b)*/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b){0,}/i
- AB
- 0: AB
- 1: A
- 2:
-
-/(a+|b)+/i
- AB
- 0: AB
- 1: A
-
-/(a+|b){1,}/i
- AB
- 0: AB
- 1: A
-
-/(a+|b)?/i
- AB
- 0: A
- 1:
-
-/(a+|b){0,1}/i
- AB
- 0: A
- 1:
+/-- --/
-/(a+|b){0,1}?/i
- AB
+/(\X*)(.)/s8
+ A\x{300}
0: A
1:
-
-/[^ab]*/i
- CDE
- 0: CDE
- 1: CD
- 2: C
- 3:
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
- 0: ABBBCD
-
-/([abc])*bcd/i
- ABCD
- 0: ABCD
-
-/a|b|c|d|e/i
- E
- 0: E
-
-/(a|b|c|d|e)f/i
- EF
- 0: EF
-
-/abcd*efg/i
- ABCDEFG
- 0: ABCDEFG
-
-/ab*/i
- XABYABBBZ
- 0: AB
- 1: A
- XAYABBBZ
- 0: A
-
-/(ab|cd)e/i
- ABCDE
- 0: CDE
-
-/[abhgefdc]ij/i
- HIJ
- 0: HIJ
-
-/^(ab|cd)e/i
- ABCDE
-No match
-
-/(abc|)ef/i
- ABCDEF
- 0: EF
-
-/(a|b)c*d/i
- ABCD
- 0: BCD
-
-/(ab|ab*)bc/i
- ABC
- 0: ABC
-
-/a([bc]*)c*/i
- ABC
- 0: ABC
- 1: AB
2: A
-/a([bc]*)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
- 0: ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
- 0: ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
- 0: ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
- 0: ABC
-
-/((a)(b)c)(d)/i
- ABCD
- 0: ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- 0: ALPHA
- 1: ALPH
- 2: ALP
- 3: AL
- 4: A
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
- 0: BH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- 0: EFFGZ
- IJ
- 0: IJ
- REFFGZ
- 0: EFFGZ
- *** Failers
-No match
- ADCDCDE
-No match
- EFFG
-No match
- BCDD
-No match
-
-/((((((((((a))))))))))/i
- A
- 0: A
-
-/(((((((((a)))))))))/i
- A
- 0: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- 0: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- 0: C
-
-/multiple words of text/i
- *** Failers
-No match
- AA
-No match
- UH-UH
-No match
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
- 0: MULTIPLE WORDS
-
-/(.*)c(.*)/i
- ABCDE
- 0: ABCDE
- 1: ABCD
- 2: ABC
-
-/\((.*), (.*)\)/i
- (A, B)
- 0: (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
- 0: ABCD
-
-/a(bc)d/i
- ABCD
- 0: ABCD
-
-/a[-]?c/i
- AC
- 0: AC
-
-/a(?!b)./
- abad
- 0: ad
-
-/a(?=d)./
- abad
- 0: ad
-
-/a(?=c|d)./
- abad
- 0: ad
-
-/a(?:b|c|d)(.)/
- ace
- 0: ace
-
-/a(?:b|c|d)*(.)/
- ace
- 0: ace
- 1: ac
-
-/a(?:b|c|d)+?(.)/
- ace
- 0: ace
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
- 2: acdbcd
- 3: acdbc
- 4: acdb
- 5: acd
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
- 0: acdb
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: acdbcd
-
-/((foo)|(bar))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: acdbcdb
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- 0: ace
-
-/^(.+)?B/
- AB
- 0: AB
-
-/^([^a-z])|(\^)$/
- .
- 0: .
-
-/^[<>]&/
- <&OUT
- 0: <&
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- 0: foobar
- 1: foo
- 2:
-
-/(?<=a)b/
- ab
- 0: b
- *** Failers
-No match
- cb
-No match
- b
-No match
-
-/(?<!c)b/
- ab
- 0: b
- b
- 0: b
- b
- 0: b
-
-/(?:..)*a/
- aba
- 0: aba
- 1: a
-
-/(?:..)*?a/
- aba
- 0: aba
- 1: a
-
-/^(){3,5}/
- abc
- 0:
-
-/^(a+)*ax/
- aax
- 0: aax
-
-/^((a|b)+)*ax/
- aax
- 0: aax
-
-/^((a|bc)+)*ax/
- aax
- 0: aax
-
-/(a|x)*ab/
- cab
- 0: ab
-
-/(a)*ab/
- cab
- 0: ab
-
-/(?:(?i)a)b/
- ab
- 0: ab
-
-/((?i)a)b/
- ab
- 0: ab
-
-/(?:(?i)a)b/
- Ab
- 0: Ab
-
-/((?i)a)b/
- Ab
- 0: Ab
-
-/(?:(?i)a)b/
- *** Failers
-No match
- cb
-No match
- aB
-No match
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
- 0: ab
-
-/((?i:a))b/
- ab
- 0: ab
-
-/(?i:a)b/
- Ab
- 0: Ab
-
-/((?i:a))b/
- Ab
- 0: Ab
-
-/(?i:a)b/
- *** Failers
-No match
- aB
-No match
- aB
-No match
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
- 0: ab
-
-/((?-i)a)b/i
- ab
- 0: ab
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- aB
- 0: aB
- Ab
-No match
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
- 0: ab
-
-/((?-i:a))b/i
- ab
- 0: ab
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- AB
-No match
- Ab
-No match
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
-
-/(?-i:a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
-No match
- AB
-No match
- a\nB
-No match
-
-/((?s-i:a.))b/i
- a\nB
- 0: a\x0aB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- 0: cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/foo\w*\d{4}baz/
- foobar1234baz
- 0: foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
- 0: x~~
- 1: x
-
-/^a(?#xxx){3}c/
- aaac
- 0: aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
- 0: aaac
-
-/(?<![cd])b/
- *** Failers
-No match
- B\nB
-No match
- dbcb
-No match
-
-/(?<![cd])[ab]/
- dbaacb
- 0: a
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
- 0: a
-
-/(?<!cd)[ab]/
- cdaccb
- 0: b
-
-/^(?:a?b?)*$/
- *** Failers
-No match
- dbcb
-No match
- a--
-No match
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- 0: a\x0ab
-
-/((?m)^b$)/
- a\nb\nc\n
- 0: b
-
-/(?m)^b/
- a\nb\n
- 0: b
-
-/(?m)^(b)/
- a\nb\n
- 0: b
-
-/((?m)^b)/
- a\nb\n
- 0: b
-
-/\n((?m)^b)/
- a\nb\n
- 0: \x0ab
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- 0: \x0ac
- a\nb\nc\n
- 0: \x0ac
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- 0: b\x0ac
- a\nb\nc\n
- 0: b\x0ac
-
-/^b/
-
-/()^b/
- *** Failers
-No match
- a\nb\nc\n
-No match
- a\nb\nc\n
-No match
-
-/((?m)^b)/
- a\nb\nc\n
- 0: b
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
- 0: a
-
-/(?(?=a)b|a)/
- *** Failers
-No match
- a
-No match
- a
-No match
-
-/(?(?=a)a|b)/
- a
- 0: a
-
-/(\w+:)+/
- one:
- 0: one:
-
-/$(?<=^(a))/
- a
- 0:
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(a*)b+/
- caab
- 0: aab
-
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- *** Failers
- 0: Failers
- abcd:
-No match
- abcd:
-No match
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/([[:]+)/
- a:[b]:
- 0: :[
- 1: :
-
-/([[=]+)/
- a=[b]=
- 0: =[
- 1: =
-
-/([[.]+)/
- a.[b].
- 0: .[
- 1: .
-
-/((?>a+)b)/
- aaab
- 0: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: abc(ade)ufh()()
- 2: abc(ade)ufh()
- 3: abc(ade)ufh
- 4: abc(ade)
- 5: abc
-
-/a\Z/
- *** Failers
-No match
- aaab
-No match
- a\nb\n
-No match
-
-/b\Z/
- a\nb\n
- 0: b
-
-/b\z/
-
-/b\Z/
- a\nb
- 0: b
-
-/b\z/
- a\nb
- 0: b
- *** Failers
-No match
+/^S(\X*)e(\X*)$/8
+ Stéréo
+ 0: Ste\x{301}re\x{301}o
+ 1: te\x{301}r
+ 2: \x{301}o
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- 0: alphabetabcd
- endingwxyz
- 0: endingwxyz
- *** Failers
-No match
- a rather long string that doesn't end with one of them
-No match
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
+/^\X/8
+ ́réo
+ 0: \x{301}
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
+/^a\X41z/<JS>
+ aX41z
+ 0: aX41z
*** Failers
No match
- 123999foo
-No match
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
+ aAz
No match
-/((Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z()|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/(Z(())|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: Z
- 2:
-
-/((?>)+|A)*/
- ZABCDEFG
- 0:
-
-/a*/g
- abbab
- 0: a
- 1:
- 0:
- 0:
- 0: a
- 1:
- 0:
- 0:
+/(?<=ab\Cde)X/8
+Failed: \C not allowed in lookbehind assertion at offset 10
-/^[a-\d]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/^[\d-a]/
- abcde
+/\X/
+ a\P
0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d\x0b
- 1: \x09\x0a\x0c\x0d
- 2: \x09\x0a\x0c
- 3: \x09\x0a
- 4: \x09
- 5:
-
-/[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09
- 1:
-
-/[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/\s+/
- > \x09\x0a\x0c\x0d\x0b<
- 0: \x09\x0a\x0c\x0d
- 1: \x09\x0a\x0c
- 2: \x09\x0a
- 3: \x09
- 4:
-
-/a b/x
- ab
-No match
-
-/(?!\A)x/m
- a\nxb\n
- 0: x
-
-/(?!^)x/m
- a\nxb\n
-No match
-
-/abc\Qabc\Eabc/
- abcabcabc
- 0: abcabcabc
-
-/abc\Q(*+|\Eabc/
- abc(*+|abc
- 0: abc(*+|abc
-
-/ abc\Q abc\Eabc/x
- abc abcabc
- 0: abc abcabc
- *** Failers
-No match
- abcabcabc
-No match
-
-/abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- 0: abc#not comment\x0a literal
-
-/\Qabc\$xyz\E/
- abc\\\$xyz
- 0: abc\$xyz
-
-/\Qabc\E\$\Qxyz\E/
- abc\$xyz
- 0: abc$xyz
-
-/\Gabc/
- abc
- 0: abc
- *** Failers
-No match
- xyzabc
-No match
-
-/\Gabc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
-
-/abc./g
- abc1abc2xyzabc3
- 0: abc1
- 0: abc2
- 0: abc3
-
-/a(?x: b c )d/
- XabcdY
- 0: abcd
- *** Failers
-No match
- Xa b c d Y
-No match
-
-/((?x)x y z | a b c)/
- XabcY
- 0: abc
- AxyzB
- 0: xyz
+ a\P\P
+Partial match: a
-/(?i)AB(?-i)C/
- XabCY
- 0: abC
- *** Failers
-No match
- XabcY
-No match
+/\Xa/
+ aa\P
+ 0: aa
+ aa\P\P
+ 0: aa
-/((?i)AB(?-i)C|D)E/
- abCE
- 0: abCE
- DE
- 0: DE
- *** Failers
-No match
- abcE
-No match
- abCe
-No match
- dE
-No match
- De
-No match
+/\X{2}/
+ aa\P
+ 0: aa
+ aa\P\P
+Partial match: aa
-/[z\Qa-d]\E]/
- z
- 0: z
- a
- 0: a
- -
- 0: -
- d
- 0: d
- ]
- 0: ]
- *** Failers
- 0: a
- b
-No match
+/\X+a/
+ a\P
+Partial match: a
+ aa\P
+ 0: aa
+ aa\P\P
+Partial match: aa
-/[\z\C]/
- z
- 0: z
- C
- 0: C
-
-/\M/
- M
- 0: M
-
-/(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/(?i)reg(?:ul(?:[a�]|ae)r|ex)/
- REGular
- 0: REGular
- regulaer
- 0: regulaer
- Regex
- 0: Regex
- regul�r
- 0: regul\xe4r
-
-/����[�-��-�]+/
- �����
- 0: \xc5\xe6\xe5\xe4\xe0
- �����
- 0: \xc5\xe6\xe5\xe4\xff
- �����
- 0: \xc5\xe6\xe5\xe4\xc0
- �����
- 0: \xc5\xe6\xe5\xe4\xdf
-
-/(?<=Z)X./
- \x84XAZXB
- 0: XB
-
-/^(?(2)a|(1)(2))+$/
- 123a
-Error -17
-
-/(?<=a|bbbb)c/
- ac
- 0: c
- bbbbc
- 0: c
-
-/abc/>testsavedregex
-Compiled regex written to testsavedregex
-<testsavedregex
-Compiled regex loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
+/\X+?a/
+ a\P
+Partial match: a
+ ab\P
+Partial match: ab
+ aa\P
+ 0: aa
+ aa\P\P
+ 0: aa
+ aba\P
+ 0: aba
-/abc/F>testsavedregex
-Compiled regex written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-No study data
- abc
- 0: abc
- *** Failers
-No match
- bca
-No match
+/-- These Unicode 6.1.0 scripts are not known to Perl. --/
-/(a|b)/S>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/(a|b)/SF>testsavedregex
-Compiled regex written to testsavedregex
-Study data written to testsavedregex
-<testsavedregex
-Compiled regex (byte-inverted) loaded from testsavedregex
-Study data loaded from testsavedregex
- abc
- 0: a
- *** Failers
- 0: a
- def
-No match
-
-/line\nbreak/
- this is a line\nbreak
- 0: line\x0abreak
- line one\nthis is a line\nbreak in the second line
- 0: line\x0abreak
-
-/line\nbreak/f
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
+/\p{Chakma}\d/8W
+ \x{11100}\x{1113c}
+ 0: \x{11100}\x{1113c}
-/line\nbreak/mf
- this is a line\nbreak
- 0: line\x0abreak
- ** Failers
-No match
- line one\nthis is a line\nbreak in the second line
-No match
+/\p{Takri}\d/8W
+ \x{11680}\x{116c0}
+ 0: \x{11680}\x{116c0}
-/1234/
- 123\P
-Partial match: 123
- a4\P\R
-No match
+/^\X/8
+ A\P
+ 0: A
+ A\P\P
+Partial match: A
+ A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{301}\P
+ 0: A\x{301}
+ A\x{301}\P\P
+Partial match: A\x{301}
+
+/^\X{2,3}/8
+ A\P
+Partial match: A
+ A\P\P
+Partial match: A
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X{2}/8
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+ A\x{300}\x{301}A\x{300}\x{301}\P
+ 0: A\x{300}\x{301}A\x{300}\x{301}
+ A\x{300}\x{301}A\x{300}\x{301}\P\P
+Partial match: A\x{300}\x{301}A\x{300}\x{301}
+
+/^\X+/8
+ AA\P
+ 0: AA
+ AA\P\P
+Partial match: AA
+
+/^\X+?Z/8
+ AA\P
+Partial match: AA
+ AA\P\P
+Partial match: AA
+
+/A\x{3a3}B/8iDZ
+------------------------------------------------------------------
+ Bra
+ /i A
+ clist 03a3 03c2 03c3
+ /i B
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+First char = 'A' (caseless)
+Need char = 'B' (caseless)
+
+/\x{3a3}B/8iDZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3
+ /i B
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless utf
+No first char
+Need char = 'B' (caseless)
+
+/[\x{3a3}]/8iBZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{3a3}]/8iBZ
+------------------------------------------------------------------
+ Bra
+ not clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/[\x{3a3}]+/8iBZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3 +
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{3a3}]+/8iBZ
+------------------------------------------------------------------
+ Bra
+ not clist 03a3 03c2 03c3 +
+ Ket
+ End
+------------------------------------------------------------------
+
+/a*\x{3a3}/8iBZ
+------------------------------------------------------------------
+ Bra
+ /i a*+
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/\x{3a3}+a/8iBZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3 ++
+ /i a
+ Ket
+ End
+------------------------------------------------------------------
+
+/\x{3a3}*\x{3c2}/8iBZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3 *
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/\x{3a3}{3}/8i+
+ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+ 0: \x{3a3}\x{3c3}\x{3c2}
+ 0+ \x{3a3}\x{3c3}\x{3c2}
+
+/\x{3a3}{2,4}/8i+
+ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+ 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}
+ 0+ \x{3c3}\x{3c2}
+
+/\x{3a3}{2,4}?/8i+
+ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+ 0: \x{3a3}\x{3c3}
+ 0+ \x{3c2}\x{3a3}\x{3c3}\x{3c2}
+
+/\x{3a3}+./8i+
+ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+ 0: \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+ 0+
-/1234/
- 123\P
-Partial match: 123
- 4\P\R
- 0: 4
-
-/^/mg
- a\nb\nc\n
- 0:
- 0:
- 0:
- \
- 0:
-
-/(?<=C\n)^/mg
- A\nC\nC\n
- 0:
-
-/(?s)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?s)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A?B/
- AB
- 0: AB
- aB
- 0: B
-
-/(?m)A*B/
- AB
- 0: AB
- aB
- 0: B
-
-/Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
- 0: Content-Type:xxxxxyyy
- 1: Content-Type:xxxxxyy
- 2: Content-Type:xxxxxy
-
-/Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
- 0: Content-Type:xxxxxyyyz
-
-/Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
- 0: Content-Type:xxxyyy
-
-/Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
- 0: Content-Type:xxxyyyz
-
-/^abc/m
- xyz\nabc
- 0: abc
- xyz\nabc\<lf>
- 0: abc
- xyz\r\nabc\<lf>
- 0: abc
- xyz\rabc\<cr>
- 0: abc
- xyz\r\nabc\<crlf>
- 0: abc
- ** Failers
-No match
- xyz\nabc\<cr>
-No match
- xyz\r\nabc\<cr>
-No match
- xyz\nabc\<crlf>
-No match
- xyz\rabc\<crlf>
-No match
- xyz\rabc\<lf>
-No match
-
-/abc$/m<lf>
- xyzabc
- 0: abc
- xyzabc\n
- 0: abc
- xyzabc\npqr
- 0: abc
- xyzabc\r\<cr>
- 0: abc
- xyzabc\rpqr\<cr>
- 0: abc
- xyzabc\r\n\<crlf>
- 0: abc
- xyzabc\r\npqr\<crlf>
- 0: abc
+/\x{3a3}++./8i+
** Failers
No match
- xyzabc\r
-No match
- xyzabc\rpqr
-No match
- xyzabc\r\n
-No match
- xyzabc\r\npqr
-No match
-
-/^abc/m<cr>
- xyz\rabcdef
- 0: abc
- xyz\nabcdef\<lf>
- 0: abc
- ** Failers
-No match
- xyz\nabcdef
-No match
-
-/^abc/m<lf>
- xyz\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/^abc/m<crlf>
- xyz\r\nabcdef
- 0: abc
- xyz\rabcdef\<cr>
- 0: abc
- ** Failers
-No match
- xyz\rabcdef
-No match
-
-/.*/<lf>
- abc\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- abc\r\ndef
- 0: abc\x0d
- 1: abc
- 2: ab
- 3: a
- 4:
- \<cr>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<cr>abc\rdef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<cr>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
- \<crlf>abc\ndef
- 0: abc\x0adef
- 1: abc\x0ade
- 2: abc\x0ad
- 3: abc\x0a
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\rdef
- 0: abc\x0ddef
- 1: abc\x0dde
- 2: abc\x0dd
- 3: abc\x0d
- 4: abc
- 5: ab
- 6: a
- 7:
- \<crlf>abc\r\ndef
- 0: abc
- 1: ab
- 2: a
- 3:
-
-/\w+(.)(.)?def/s
- abc\ndef
- 0: abc\x0adef
- abc\rdef
- 0: abc\x0ddef
- abc\r\ndef
- 0: abc\x0d\x0adef
-
-/^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- 0: abc=xyz\\x0apqr
- 1: abc=xyz\\x0apq
- 2: abc=xyz\\x0ap
- 3: abc=xyz\\x0a
- 4: abc=xyz\
- 5: abc=xyz
- 6: abc=xy
- 7: abc=x
- 8: abc=
-
-/^(a()*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(?:a(?:(?:))*)*/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
- 4:
-
-/^(a()+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/^(?:a(?:(?:))+)+/
- aaaa
- 0: aaaa
- 1: aaa
- 2: aa
- 3: a
-
-/(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-
-/^a.b/<lf>
- a\rb
- 0: a\x0db
- a\nb\<cr>
- 0: a\x0ab
+ \x{3a3}\x{3c3}\x{3c2}\x{3a3}\x{3c3}\x{3c2}
+No match
+
+/\x{3a3}*\x{3c2}/8iBZ
+------------------------------------------------------------------
+ Bra
+ clist 03a3 03c2 03c3 *
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^\x{3a3}]*\x{3c2}/8iBZ
+------------------------------------------------------------------
+ Bra
+ not clist 03a3 03c2 03c3 *+
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/[^a]*\x{3c2}/8iBZ
+------------------------------------------------------------------
+ Bra
+ /i [^a]*
+ clist 03a3 03c2 03c3
+ Ket
+ End
+------------------------------------------------------------------
+
+/ist/8iBZ
+------------------------------------------------------------------
+ Bra
+ /i i
+ clist 0053 0073 017f
+ /i t
+ Ket
+ End
+------------------------------------------------------------------
+ ikt
+No match
+
+/is+t/8i
+ iSs\x{17f}t
+ 0: iSs\x{17f}t
+ ikt
+No match
+
+/is+?t/8i
+ ikt
+No match
+
+/is?t/8i
+ ikt
+No match
+
+/is{2}t/8i
+ iskt
+No match
+
+/-- This property is a PCRE special --/
+
+/^\p{Xuc}/8
+ $abc
+ 0: $
+ @abc
+ 0: @
+ `abc
+ 0: `
+ \x{1234}abc
+ 0: \x{1234}
** Failers
No match
- a\nb
-No match
- a\nb\<any>
-No match
- a\rb\<cr>
-No match
- a\rb\<any>
+ abc
No match
-/^abc./mgx<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc7
-
-/abc.$/mgx<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
- 0: abc1
- 0: abc2
- 0: abc3
- 0: abc4
- 0: abc5
- 0: abc6
- 0: abc9
-
-/^a\Rb/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
+/^\p{Xuc}+/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`\x{a0}\x{1234}\x{e000}
** Failers
No match
- a\n\rb
+ \x{9f}
No match
-/^a\R*b/<bsr_unicode>
- ab
- 0: ab
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
-
-/^a\R+b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\rb
- 0: a\x0db
- a\r\nb
- 0: a\x0d\x0ab
- a\x0bb
- 0: a\x0bb
- a\x0cb
- 0: a\x0cb
- a\x85b
- 0: a\x85b
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85\x0cb
- 0: a\x0a\x0d\x85\x0cb
- ** Failers
-No match
- ab
-No match
-
-/^a\R{1,3}b/<bsr_unicode>
- a\nb
- 0: a\x0ab
- a\n\rb
- 0: a\x0a\x0db
- a\n\r\x85b
- 0: a\x0a\x0d\x85b
- a\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0ab
- a\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
- a\n\r\n\rb
- 0: a\x0a\x0d\x0a\x0db
- a\n\n\r\nb
- 0: a\x0a\x0a\x0d\x0ab
+/^\p{Xuc}+?/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $
** Failers
No match
- a\n\n\n\rb
-No match
- a\r
+ \x{9f}
No match
-/^a[\R]b/<bsr_unicode>
- aRb
- 0: aRb
+/^\p{Xuc}+?\*/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`\x{a0}\x{1234}\x{e000}*
** Failers
No match
- a\nb
+ \x{9f}
No match
-/.+foo/
- afoo
- 0: afoo
- ** Failers
-No match
- \r\nfoo
-No match
- \nfoo
-No match
-
-/.+foo/<crlf>
- afoo
- 0: afoo
- \nfoo
- 0: \x0afoo
- ** Failers
-No match
- \r\nfoo
-No match
-
-/.+foo/<any>
- afoo
- 0: afoo
- ** Failers
-No match
- \nfoo
-No match
- \r\nfoo
-No match
-
-/.+foo/s
- afoo
- 0: afoo
- \r\nfoo
- 0: \x0d\x0afoo
- \nfoo
- 0: \x0afoo
-
-/^$/mg<any>
- abc\r\rxyz
- 0:
- abc\n\rxyz
- 0:
- ** Failers
-No match
- abc\r\nxyz
-No match
-
-/^X/m
- XABC
- 0: X
- ** Failers
+/^\p{Xuc}++/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`\x{a0}\x{1234}\x{e000}
+ ** Failers
No match
- XABC\B
+ \x{9f}
No match
-/(?m)^$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a
-
-/(?m)^$|^\r\n/<any>g+
- abc\r\n\r\n
- 0: \x0d\x0a
- 0+
- 1:
-
-/(?m)$/<any>g+
- abc\r\n\r\n
- 0:
- 0+ \x0d\x0a\x0d\x0a
- 0:
- 0+ \x0d\x0a
- 0:
- 0+
-
-/(?|(abc)|(xyz))/
- >abc<
- 0: abc
- >xyz<
- 0: xyz
-
-/(x)(?|(abc)|(xyz))(x)/
- xabcx
- 0: xabcx
- xxyzx
- 0: xxyzx
-
-/(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- 0: xabcpqrx
- xxyzx
- 0: xxyzx
-
-/(?|(abc)|(xyz))(?1)/
- abcabc
- 0: abcabc
- xyzabc
- 0: xyzabc
- ** Failers
-No match
- xyzxyz
-No match
-
-/\H\h\V\v/
- X X\x0a
- 0: X X\x0a
- X\x09X\x0b
- 0: X\x09X\x0b
+/^\p{Xuc}{3,5}/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`\x{a0}\x{1234}
** Failers
No match
- \xa0 X\x0a
+ \x{9f}
No match
-
-/\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0X\x0a\x0b\x0c\x0d
- 1: \x09 \xa0X\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- 0: \x09 \xa0\x0a\x0b\x0c\x0d
- 1: \x09 \xa0\x0a\x0b\x0c
- \x09\x20\xa0\x0a\x0b\x0c
- 0: \x09 \xa0\x0a\x0b\x0c
- ** Failers
-No match
- \x09\x20\xa0\x0a\x0b
-No match
-
-/\H{3,4}/
- XY ABCDE
- 0: ABCD
- 1: ABC
- XY PQR ST
- 0: PQR
-
-/.\h{3,4}./
- XY AB PQRS
- 0: B P
- 1: B
-
-/\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- 0: XNNNYZ
- > X NYQZ
- 0: X NYQZ
+
+/^\p{Xuc}{3,5}?/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`
** Failers
No match
- >XYZ
+ \x{9f}
No match
- > X NY Z
-No match
-
-/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- 0: XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
-/.+A/<crlf>
- \r\nA
-No match
-
-/\nA/<crlf>
- \r\nA
- 0: \x0aA
-
-/[\r\n]A/<crlf>
- \r\nA
- 0: \x0aA
-
-/(\r|\n)A/<crlf>
- \r\nA
- 0: \x0aA
-
-/a\Rb/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
+/^[\p{Xuc}]/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $
** Failers
No match
- a\x85b
-No match
- a\x0bb
+ \x{9f}
No match
-/a\Rb/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R?b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
+/^[\p{Xuc}]+/8
+ $@`\x{a0}\x{1234}\x{e000}**
+ 0: $@`\x{a0}\x{1234}\x{e000}
** Failers
No match
- a\x85b
-No match
- a\x0bb
+ \x{9f}
No match
-/a\R?b/I<bsr_unicode>
-Capturing subpattern count = 0
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\rb
- 0: a\x0db
- a\nb
- 0: a\x0ab
- a\r\nb
- 0: a\x0d\x0ab
- a\x85b
- 0: a\x85b
- a\x0bb
- 0: a\x0bb
- ** Failers
-No match
- a\x85b\<bsr_anycrlf>
-No match
- a\x0bb\<bsr_anycrlf>
-No match
-
-/a\R{2,4}b/I<bsr_anycrlf>
-Capturing subpattern count = 0
-Partial matching not supported
-Options: bsr_anycrlf
-First char = 'a'
-Need char = 'b'
- a\r\n\nb
- 0: a\x0d\x0a\x0ab
- a\n\r\rb
- 0: a\x0a\x0d\x0db
- a\r\n\r\n\r\n\r\nb
- 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
+/^\P{Xuc}/8
+ abc
+ 0: a
** Failers
+ 0: *
+ $abc
No match
- a\x85\85b
-No match
- a\x0b\0bb
+ @abc
No match
-
-/a\R{2,4}b/I<bsr_unicode>
-Capturing subpattern count = 0
-Partial matching not supported
-Options: bsr_unicode
-First char = 'a'
-Need char = 'b'
- a\r\rb
- 0: a\x0d\x0db
- a\n\n\nb
- 0: a\x0a\x0a\x0ab
- a\r\n\n\r\rb
- 0: a\x0d\x0a\x0a\x0d\x0db
- a\x85\85b
+ `abc
No match
- a\x0b\0bb
+ \x{1234}abc
No match
- ** Failers
+
+/^[\P{Xuc}]/8
+ abc
+ 0: a
+ ** Failers
+ 0: *
+ $abc
No match
- a\r\r\r\r\rb
+ @abc
No match
- a\x85\85b\<bsr_anycrlf>
+ `abc
No match
- a\x0b\0bb\<bsr_anycrlf>
+ \x{1234}abc
No match
-/ End of testinput7 /
+/-- End of testinput7 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput8 b/lib/stdlib/test/re_SUITE_data/testoutput8
index 631e5b82f9..75affbe2d4 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput8
+++ b/lib/stdlib/test/re_SUITE_data/testoutput8
@@ -1,1035 +1,6813 @@
-/-- Do not use the \x{} construct except with patterns that have the --/
-/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
+/-- This set of tests check the DFA matching functionality of pcre_dfa_exec().
+ The -dfa flag must be used with pcretest when running it. --/
+
+/abc/
+ abc
+ 0: abc
+
+/ab*c/
+ abc
+ 0: abc
+ abbbbc
+ 0: abbbbc
+ ac
+ 0: ac
+
+/ab+c/
+ abc
+ 0: abc
+ abbbbbbc
+ 0: abbbbbbc
+ *** Failers
No match
-/-- that option is set. However, the latest Perls recognize them always. --/
+ ac
No match
-
-/\x{100}ab/8
- \x{100}ab
- 0: \x{100}ab
-
-/a\x{100}*b/8
ab
- 0: ab
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
-
-/a\x{100}+b/8
- a\x{100}b
- 0: a\x{100}b
- a\x{100}\x{100}b
- 0: a\x{100}\x{100}b
+No match
+
+/a*/
+ a
+ 0: a
+ 1:
+ aaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaa
+ 5: aaaaaaaaaaaa
+ 6: aaaaaaaaaaa
+ 7: aaaaaaaaaa
+ 8: aaaaaaaaa
+ 9: aaaaaaaa
+10: aaaaaaa
+11: aaaaaa
+12: aaaaa
+13: aaaa
+14: aaa
+15: aa
+16: a
+17:
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but offsets vector is too small to show all matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaa
+17: aaaaaaaaaaaaa
+18: aaaaaaaaaaaa
+19: aaaaaaaaaaa
+20: aaaaaaaaaa
+21: aaaaaaaaa
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
+ 0:
+
+/(a|abcd|african)/
+ a
+ 0: a
+ abcd
+ 0: abcd
+ 1: a
+ african
+ 0: african
+ 1: a
+
+/^abc/
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyz\nabc
+No match
+
+/^abc/m
+ abcdef
+ 0: abc
+ xyz\nabc
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+
+/\Aabc/
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyz\nabc
+No match
+
+/\Aabc/m
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyz\nabc
+No match
+
+/\Gabc/
+ abcdef
+ 0: abc
+ xyzabc\>3
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+ xyzabc\>2
+No match
+
+/x\dy\Dz/
+ x9yzz
+ 0: x9yzz
+ x0y+z
+ 0: x0y+z
+ *** Failers
+No match
+ xyz
+No match
+ xxy0z
+No match
+
+/x\sy\Sz/
+ x yzz
+ 0: x yzz
+ x y+z
+ 0: x y+z
+ *** Failers
+No match
+ xyz
+No match
+ xxyyz
+No match
+
+/x\wy\Wz/
+ xxy+z
+ 0: xxy+z
+ *** Failers
+No match
+ xxy0z
+No match
+ x+y+z
+No match
+
+/x.y/
+ x+y
+ 0: x+y
+ x-y
+ 0: x-y
+ *** Failers
+No match
+ x\ny
+No match
+
+/x.y/s
+ x+y
+ 0: x+y
+ x-y
+ 0: x-y
+ x\ny
+ 0: x\x0ay
+
+/(a.b(?s)c.d|x.y)p.q/
+ a+bc+dp+q
+ 0: a+bc+dp+q
+ a+bc\ndp+q
+ 0: a+bc\x0adp+q
+ x\nyp+q
+ 0: x\x0ayp+q
*** Failers
No match
- ab
+ a\nbc\ndp+q
+No match
+ a+bc\ndp\nq
+No match
+ x\nyp\nq
+No match
+
+/a\d\z/
+ ba0
+ 0: a0
+ *** Failers
+No match
+ ba0\n
+No match
+ ba0\ncd
+No match
+
+/a\d\z/m
+ ba0
+ 0: a0
+ *** Failers
+No match
+ ba0\n
+No match
+ ba0\ncd
+No match
+
+/a\d\Z/
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ *** Failers
+No match
+ ba0\ncd
No match
+
+/a\d\Z/m
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ *** Failers
+No match
+ ba0\ncd
+No match
+
+/a\d$/
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ *** Failers
+No match
+ ba0\ncd
+No match
+
+/a\d$/m
+ ba0
+ 0: a0
+ ba0\n
+ 0: a0
+ ba0\ncd
+ 0: a0
+ *** Failers
+No match
+
+/abc/i
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ ABC
+ 0: ABC
+
+/[^a]/
+ abcd
+ 0: b
+
+/ab?\w/
+ abz
+ 0: abz
+ 1: ab
+ abbz
+ 0: abb
+ 1: ab
+ azz
+ 0: az
+
+/x{0,3}yz/
+ ayzq
+ 0: yz
+ axyzq
+ 0: xyz
+ axxyz
+ 0: xxyz
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
+ *** Failers
+No match
+ ax
+No match
+ axx
+No match
+
+/x{3}yz/
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
+ *** Failers
+No match
+ ax
+No match
+ axx
+No match
+ ayzq
+No match
+ axyzq
+No match
+ axxyz
+No match
+
+/x{2,3}yz/
+ axxyz
+ 0: xxyz
+ axxxyzq
+ 0: xxxyz
+ axxxxyzq
+ 0: xxxyz
+ *** Failers
+No match
+ ax
+No match
+ axx
+No match
+ ayzq
+No match
+ axyzq
+No match
+
+/[^a]+/
+ bac
+ 0: b
+ bcdefax
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ 3: bc
+ 4: b
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ 3: **
+ 4: *
+ aaaaa
+No match
+
+/[^a]*/
+ bac
+ 0: b
+ 1:
+ bcdefax
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ 3: bc
+ 4: b
+ 5:
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ 3: **
+ 4: *
+ 5:
+ aaaaa
+ 0:
+
+/[^a]{3,5}/
+ xyz
+ 0: xyz
+ awxyza
+ 0: wxyz
+ 1: wxy
+ abcdefa
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ abcdefghijk
+ 0: bcdef
+ 1: bcde
+ 2: bcd
+ *** Failers
+ 0: *** F
+ 1: ***
+ 2: ***
+ axya
+No match
+ axa
+No match
+ aaaaa
+No match
+
+/\d*/
+ 1234b567
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
+ 4:
+ xyz
+ 0:
+
+/\D*/
+ a1234b567
+ 0: a
+ 1:
+ xyz
+ 0: xyz
+ 1: xy
+ 2: x
+ 3:
-/\bX/8
- Xoanon
- 0: X
- +Xoanon
- 0: X
- \x{300}Xoanon
- 0: X
- *** Failers
+/\d+/
+ ab1234c56
+ 0: 1234
+ 1: 123
+ 2: 12
+ 3: 1
+ *** Failers
No match
- YXoanon
+ xyz
No match
-/\BX/8
- YXoanon
- 0: X
+/\D+/
+ ab123c56
+ 0: ab
+ 1: a
*** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ 7: ***
+ 8: ***
+ 9: **
+10: *
+ 789
No match
- Xoanon
+
+/\d?A/
+ 045ABC
+ 0: 5A
+ ABC
+ 0: A
+ *** Failers
No match
- +Xoanon
+ XYZ
No match
- \x{300}Xoanon
+
+/\D?A/
+ ABC
+ 0: A
+ BAC
+ 0: BA
+ 9ABC
+ 0: A
+ *** Failers
No match
-/X\b/8
- X+oanon
- 0: X
- ZX\x{300}oanon
- 0: X
- FAX
- 0: X
+/a+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/^.*xyz/
+ xyz
+ 0: xyz
+ ggggggggxyz
+ 0: ggggggggxyz
+
+/^.+xyz/
+ abcdxyz
+ 0: abcdxyz
+ axyz
+ 0: axyz
+ *** Failers
+No match
+ xyz
+No match
+
+/^.?xyz/
+ xyz
+ 0: xyz
+ cxyz
+ 0: cxyz
+
+/^\d{2,3}X/
+ 12X
+ 0: 12X
+ 123X
+ 0: 123X
+ *** Failers
+No match
+ X
+No match
+ 1X
+No match
+ 1234X
+No match
+
+/^[abcd]\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ *** Failers
+No match
+ e45
+No match
+ abcd
+No match
+ abcd1234
+No match
+ 1234
+No match
+
+/^[abcd]*\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ abcd1234
+ 0: abcd1
+ 1234
+ 0: 1
+ *** Failers
+No match
+ e45
+No match
+ abcd
+No match
+
+/^[abcd]+\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ abcd1234
+ 0: abcd1
+ *** Failers
+No match
+ 1234
+No match
+ e45
+No match
+ abcd
+No match
+
+/^a+X/
+ aX
+ 0: aX
+ aaX
+ 0: aaX
+
+/^[abcd]?\d/
+ a45
+ 0: a4
+ b93
+ 0: b9
+ c99z
+ 0: c9
+ d04
+ 0: d0
+ 1234
+ 0: 1
+ *** Failers
+No match
+ abcd1234
+No match
+ e45
+No match
+
+/^[abcd]{2,3}\d/
+ ab45
+ 0: ab4
+ bcd93
+ 0: bcd9
+ *** Failers
+No match
+ 1234
+No match
+ a36
+No match
+ abcd1234
+No match
+ ee45
+No match
+
+/^(abc)*\d/
+ abc45
+ 0: abc4
+ abcabcabc45
+ 0: abcabcabc4
+ 42xyz
+ 0: 4
+ *** Failers
+No match
+
+/^(abc)+\d/
+ abc45
+ 0: abc4
+ abcabcabc45
+ 0: abcabcabc4
+ *** Failers
+No match
+ 42xyz
+No match
+
+/^(abc)?\d/
+ abc45
+ 0: abc4
+ 42xyz
+ 0: 4
+ *** Failers
+No match
+ abcabcabc45
+No match
+
+/^(abc){2,3}\d/
+ abcabc45
+ 0: abcabc4
+ abcabcabc45
+ 0: abcabcabc4
+ *** Failers
+No match
+ abcabcabcabc45
+No match
+ abc45
+No match
+ 42xyz
+No match
+
+/1(abc|xyz)2(?1)3/
+ 1abc2abc3456
+ 0: 1abc2abc3
+ 1abc2xyz3456
+ 0: 1abc2xyz3
+
+/^(a*\w|ab)=(a*\w|ab)/
+ ab=ab
+ 0: ab=ab
+ 1: ab=a
+
+/^(a*\w|ab)=(?1)/
+ ab=ab
+ 0: ab=ab
+ 1: ab=a
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ 0: abc
+ a(b)c
+ 0: a(b)c
+ a(b(c))d
+ 0: a(b(c))d
+ *** Failers)
+No match
+ a(b(c)d
+No match
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ 0: >abc>123<xyz<
+ >abc>1(2)3<xyz<
+ 0: >abc>1(2)3<xyz<
+ >abc>(1(2)3)<xyz<
+ 0: >abc>(1(2)3)<xyz<
+
+/^(?>a*)\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
*** Failers
No match
- Xoanon
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
+ <>
+ 0: <>
+ <abcd>
+ 0: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ <abc<>
+ 0: <>
+ *** Failers
+No match
+ <abc
+No match
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
+ *** Failers
+No match
+ 123
+No match
+ xyz
+No match
+
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
+ *** Failers
+No match
+ 123
+No match
+ xyz
+No match
+
+/^(?=abc)\w{5}:$/
+ abcde:
+ 0: abcde:
+ *** Failers
+No match
+ abc..
+No match
+ 123
+No match
+ vwxyz
+No match
+
+/^(?!abc)\d\d$/
+ 12
+ 0: 12
+ *** Failers
+No match
+ abcde:
+No match
+ abc..
+No match
+ 123
+No match
+ vwxyz
+No match
+
+/(?<=abc|xy)123/
+ abc12345
+ 0: 123
+ wxy123z
+ 0: 123
+ *** Failers
+No match
+ 123abc
+No match
+
+/(?<!abc|xy)123/
+ 123abc
+ 0: 123
+ mno123456
+ 0: 123
+ *** Failers
+No match
+ abc12345
+No match
+ wxy123z
+No match
+
+/abc(?C1)xyz/
+ abcxyz
+--->abcxyz
+ 1 ^ ^ x
+ 0: abcxyz
+ 123abcxyz999
+--->123abcxyz999
+ 1 ^ ^ x
+ 0: abcxyz
+
+/(ab|cd){3,4}/C
+ ababab
+--->ababab
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ 0: ababab
+ abcdabcd
+--->abcdabcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +2 ^ ^ b
+ +3 ^ ^ |
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdabcd
+ 1: abcdab
+ abcdcdcdcdcd
+--->abcdcdcdcdcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +4 ^ c
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdcdcd
+ 1: abcdcd
+
+/^abc/
+ abcdef
+ 0: abc
+ *** Failers
+No match
+ abcdef\B
+No match
+
+/^(a*|xyz)/
+ bcd
+ 0:
+ aaabcd
+ 0: aaa
+ 1: aa
+ 2: a
+ 3:
+ xyz
+ 0: xyz
+ 1:
+ xyz\N
+ 0: xyz
+ *** Failers
+ 0:
+ bcd\N
No match
-/X\B/8
- Xoanon
- 0: X
+/xyz$/
+ xyz
+ 0: xyz
+ xyz\n
+ 0: xyz
*** Failers
No match
- X+oanon
+ xyz\Z
+No match
+ xyz\n\Z
No match
- ZX\x{300}oanon
+
+/xyz$/m
+ xyz
+ 0: xyz
+ xyz\n
+ 0: xyz
+ abcxyz\npqr
+ 0: xyz
+ abcxyz\npqr\Z
+ 0: xyz
+ xyz\n\Z
+ 0: xyz
+ *** Failers
+No match
+ xyz\Z
+No match
+
+/\Gabc/
+ abcdef
+ 0: abc
+ defabcxyz\>3
+ 0: abc
+ *** Failers
No match
- FAX
+ defabcxyz
+No match
+
+/^abcdef/
+ ab\P
+Partial match: ab
+ abcde\P
+Partial match: abcde
+ abcdef\P
+ 0: abcdef
+ *** Failers
+No match
+ abx\P
+No match
+
+/^a{2,4}\d+z/
+ a\P
+Partial match: a
+ aa\P
+Partial match: aa
+ aa2\P
+Partial match: aa2
+ aaa\P
+Partial match: aaa
+ aaa23\P
+Partial match: aaa23
+ aaaa12345\P
+Partial match: aaaa12345
+ aa0z\P
+ 0: aa0z
+ aaaa4444444444444z\P
+ 0: aaaa4444444444444z
+ *** Failers
+No match
+ az\P
+No match
+ aaaaa\P
+No match
+ a56\P
+No match
+
+/^abcdef/
+ abc\P
+Partial match: abc
+ def\R
+ 0: def
+
+/(?<=foo)bar/
+ xyzfo\P
+No match
+ foob\P\>2
+Partial match at offset 3: foob
+ foobar...\R\P\>4
+ 0: ar
+ xyzfo\P
+No match
+ foobar\>2
+ 0: bar
+ *** Failers
+No match
+ xyzfo\P
+No match
+ obar\R
+No match
+
+/(ab*(cd|ef))+X/
+ adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
+No match
+ lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
+Partial match: abbbbbbcdaefabbbbbbbefa
+ cdabbbbbbbb\P\R\B\Z
+Partial match: cdabbbbbbbb
+ efabbbbbbbbbbbbbbbb\P\R\B\Z
+Partial match: efabbbbbbbbbbbbbbbb
+ bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
+ 0: bbbbbbbbbbbbcdX
+
+/(a|b)/SF>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ ** Failers
+ 0: a
+ def
No match
-/[^a]/8
- abcd
+/the quick brown fox/
+ the quick brown fox
+ 0: the quick brown fox
+ The quick brown FOX
+No match
+ What do you know about the quick brown fox?
+ 0: the quick brown fox
+ What do you know about THE QUICK BROWN FOX?
+No match
+
+/The quick brown fox/i
+ the quick brown fox
+ 0: the quick brown fox
+ The quick brown FOX
+ 0: The quick brown FOX
+ What do you know about the quick brown fox?
+ 0: the quick brown fox
+ What do you know about THE QUICK BROWN FOX?
+ 0: THE QUICK BROWN FOX
+
+/abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
+ abcd\t\n\r\f\a\e9;\$\\?caxyz
+ 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
+
+/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
+ abxyzpqrrrabbxyyyypqAzz
+ 0: abxyzpqrrrabbxyyyypqAzz
+ abxyzpqrrrabbxyyyypqAzz
+ 0: abxyzpqrrrabbxyyyypqAzz
+ aabxyzpqrrrabbxyyyypqAzz
+ 0: aabxyzpqrrrabbxyyyypqAzz
+ aaabxyzpqrrrabbxyyyypqAzz
+ 0: aaabxyzpqrrrabbxyyyypqAzz
+ aaaabxyzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzpqrrrabbxyyyypqAzz
+ abcxyzpqrrrabbxyyyypqAzz
+ 0: abcxyzpqrrrabbxyyyypqAzz
+ aabcxyzpqrrrabbxyyyypqAzz
+ 0: aabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypAzz
+ 0: aaabcxyzpqrrrabbxyyyypAzz
+ aaabcxyzpqrrrabbxyyyypqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
+ aaabcxyzpqrrrabbxyyyypqqqqqqAzz
+ 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
+ aaaabcxyzpqrrrabbxyyyypqAzz
+ 0: aaaabcxyzpqrrrabbxyyyypqAzz
+ abxyzzpqrrrabbxyyyypqAzz
+ 0: abxyzzpqrrrabbxyyyypqAzz
+ aabxyzzzpqrrrabbxyyyypqAzz
+ 0: aabxyzzzpqrrrabbxyyyypqAzz
+ aaabxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaabxyzzzzpqrrrabbxyyyypqAzz
+ aaaabxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
+ abcxyzzpqrrrabbxyyyypqAzz
+ 0: abcxyzzpqrrrabbxyyyypqAzz
+ aabcxyzzzpqrrrabbxyyyypqAzz
+ 0: aabcxyzzzpqrrrabbxyyyypqAzz
+ aaabcxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbxyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
+ aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
+ 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
+ aaabcxyzpqrrrabbxyyyypABzz
+ 0: aaabcxyzpqrrrabbxyyyypABzz
+ aaabcxyzpqrrrabbxyyyypABBzz
+ 0: aaabcxyzpqrrrabbxyyyypABBzz
+ >>>aaabxyzpqrrrabbxyyyypqAzz
+ 0: aaabxyzpqrrrabbxyyyypqAzz
+ >aaaabxyzpqrrrabbxyyyypqAzz
+ 0: aaaabxyzpqrrrabbxyyyypqAzz
+ >>>>abcxyzpqrrrabbxyyyypqAzz
+ 0: abcxyzpqrrrabbxyyyypqAzz
+ *** Failers
+No match
+ abxyzpqrrabbxyyyypqAzz
+No match
+ abxyzpqrrrrabbxyyyypqAzz
+No match
+ abxyzpqrrrabxyyyypqAzz
+No match
+ aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
+No match
+ aaaabcxyzzzzpqrrrabbbxyyypqAzz
+No match
+ aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
+No match
+
+/^(abc){1,2}zz/
+ abczz
+ 0: abczz
+ abcabczz
+ 0: abcabczz
+ *** Failers
+No match
+ zz
+No match
+ abcabcabczz
+No match
+ >>abczz
+No match
+
+/^(b+?|a){1,2}?c/
+ bc
+ 0: bc
+ bbc
+ 0: bbc
+ bbbc
+ 0: bbbc
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ aac
+ 0: aac
+ abbbbbbbbbbbc
+ 0: abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ 0: bbbbbbbbbbbac
+ *** Failers
+No match
+ aaac
+No match
+ abbbbbbbbbbbac
+No match
+
+/^(b+|a){1,2}c/
+ bc
+ 0: bc
+ bbc
+ 0: bbc
+ bbbc
+ 0: bbbc
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ aac
+ 0: aac
+ abbbbbbbbbbbc
+ 0: abbbbbbbbbbbc
+ bbbbbbbbbbbac
+ 0: bbbbbbbbbbbac
+ *** Failers
+No match
+ aaac
+No match
+ abbbbbbbbbbbac
+No match
+
+/^(b+|a){1,2}?bc/
+ bbc
+ 0: bbc
+
+/^(b*|ba){1,2}?bc/
+ babc
+ 0: babc
+ bbabc
+ 0: bbabc
+ bababc
+ 0: bababc
+ *** Failers
+No match
+ bababbc
+No match
+ babababc
+No match
+
+/^(ba|b*){1,2}?bc/
+ babc
+ 0: babc
+ bbabc
+ 0: bbabc
+ bababc
+ 0: bababc
+ *** Failers
+No match
+ bababbc
+No match
+ babababc
+No match
+
+/^\ca\cA\c[\c{\c:/
+ \x01\x01\e;z
+ 0: \x01\x01\x1b;z
+
+/^[ab\]cde]/
+ athing
+ 0: a
+ bthing
0: b
- a\x{100}
- 0: \x{100}
+ ]thing
+ 0: ]
+ cthing
+ 0: c
+ dthing
+ 0: d
+ ething
+ 0: e
+ *** Failers
+No match
+ fthing
+No match
+ [thing
+No match
+ \\thing
+No match
-/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
- ab99
- 0: ab9
- \x{123}\x{123}45
- 0: \x{123}\x{123}4
- \x{400}\x{401}\x{402}6
- 0: \x{400}\x{401}\x{402}6
+/^[]cde]/
+ ]thing
+ 0: ]
+ cthing
+ 0: c
+ dthing
+ 0: d
+ ething
+ 0: e
*** Failers
No match
- d99
+ athing
+No match
+ fthing
No match
- \x{123}\x{122}4
+
+/^[^ab\]cde]/
+ fthing
+ 0: f
+ [thing
+ 0: [
+ \\thing
+ 0: \
+ *** Failers
+ 0: *
+ athing
No match
- \x{400}\x{403}6
+ bthing
No match
- \x{400}\x{401}\x{402}\x{402}6
+ ]thing
+No match
+ cthing
+No match
+ dthing
+No match
+ ething
No match
-/abc/8
- �]
-Error -10
- �
-Error -10
- ���
-Error -10
- ���\?
+/^[^]cde]/
+ athing
+ 0: a
+ fthing
+ 0: f
+ *** Failers
+ 0: *
+ ]thing
+No match
+ cthing
+No match
+ dthing
+No match
+ ething
No match
-/a.b/8
- acb
- 0: acb
- a\x7fb
- 0: a\x{7f}b
- a\x{100}b
- 0: a\x{100}b
+/^\�/
+ �
+ 0: \x81
+
+/^�/
+ �
+ 0: \xff
+
+/^[0-9]+$/
+ 0
+ 0: 0
+ 1
+ 0: 1
+ 2
+ 0: 2
+ 3
+ 0: 3
+ 4
+ 0: 4
+ 5
+ 0: 5
+ 6
+ 0: 6
+ 7
+ 0: 7
+ 8
+ 0: 8
+ 9
+ 0: 9
+ 10
+ 0: 10
+ 100
+ 0: 100
*** Failers
No match
- a\nb
+ abc
+No match
+
+/^.*nter/
+ enter
+ 0: enter
+ inter
+ 0: inter
+ uponter
+ 0: uponter
+
+/^xxx[0-9]+$/
+ xxx0
+ 0: xxx0
+ xxx1234
+ 0: xxx1234
+ *** Failers
+No match
+ xxx
+No match
+
+/^.+[0-9][0-9][0-9]$/
+ x123
+ 0: x123
+ xx123
+ 0: xx123
+ 123456
+ 0: 123456
+ *** Failers
+No match
+ 123
+No match
+ x1234
+ 0: x1234
+
+/^.+?[0-9][0-9][0-9]$/
+ x123
+ 0: x123
+ xx123
+ 0: xx123
+ 123456
+ 0: 123456
+ *** Failers
+No match
+ 123
+No match
+ x1234
+ 0: x1234
+
+/^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
+ abc!pqr=apquxz.ixr.zzz.ac.uk
+ 0: abc!pqr=apquxz.ixr.zzz.ac.uk
+ *** Failers
+No match
+ !pqr=apquxz.ixr.zzz.ac.uk
+No match
+ abc!=apquxz.ixr.zzz.ac.uk
+No match
+ abc!pqr=apquxz:ixr.zzz.ac.uk
+No match
+ abc!pqr=apquxz.ixr.zzz.ac.ukk
+No match
+
+/:/
+ Well, we need a colon: somewhere
+ 0: :
+ *** Fail if we don't
+No match
+
+/([\da-f:]+)$/i
+ 0abc
+ 0: 0abc
+ abc
+ 0: abc
+ fed
+ 0: fed
+ E
+ 0: E
+ ::
+ 0: ::
+ 5f03:12C0::932e
+ 0: 5f03:12C0::932e
+ fed def
+ 0: def
+ Any old stuff
+ 0: ff
+ *** Failers
+No match
+ 0zzz
+No match
+ gzzz
+No match
+ fed\x20
+No match
+ Any old rubbish
+No match
+
+/^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
+ .1.2.3
+ 0: .1.2.3
+ A.12.123.0
+ 0: A.12.123.0
+ *** Failers
+No match
+ .1.2.3333
+No match
+ 1.2.3
+No match
+ 1234.2.3
+No match
+
+/^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
+ 1 IN SOA non-sp1 non-sp2(
+ 0: 1 IN SOA non-sp1 non-sp2(
+ 1 IN SOA non-sp1 non-sp2 (
+ 0: 1 IN SOA non-sp1 non-sp2 (
+ *** Failers
+No match
+ 1IN SOA non-sp1 non-sp2(
+No match
+
+/^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
+ a.
+ 0: a.
+ Z.
+ 0: Z.
+ 2.
+ 0: 2.
+ ab-c.pq-r.
+ 0: ab-c.pq-r.
+ sxk.zzz.ac.uk.
+ 0: sxk.zzz.ac.uk.
+ x-.y-.
+ 0: x-.y-.
+ *** Failers
+No match
+ -abc.peq.
+No match
+
+/^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
+ *.a
+ 0: *.a
+ *.b0-a
+ 0: *.b0-a
+ *.c3-b.c
+ 0: *.c3-b.c
+ *.c-a.b-c
+ 0: *.c-a.b-c
+ *** Failers
+No match
+ *.0
+No match
+ *.a-
+No match
+ *.a-b.c-
+No match
+ *.c-a.0-c
+No match
+
+/^(?=ab(de))(abd)(e)/
+ abde
+ 0: abde
+
+/^(?!(ab)de|x)(abd)(f)/
+ abdf
+ 0: abdf
+
+/^(?=(ab(cd)))(ab)/
+ abcd
+ 0: ab
+
+/^[\da-f](\.[\da-f])*$/i
+ a.b.c.d
+ 0: a.b.c.d
+ A.B.C.D
+ 0: A.B.C.D
+ a.b.c.1.2.3.C
+ 0: a.b.c.1.2.3.C
+
+/^\".*\"\s*(;.*)?$/
+ \"1234\"
+ 0: "1234"
+ \"abcd\" ;
+ 0: "abcd" ;
+ \"\" ; rhubarb
+ 0: "" ; rhubarb
+ *** Failers
+No match
+ \"1234\" : things
+No match
+
+/^$/
+ \
+ 0:
+ *** Failers
+No match
+
+/ ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
+ ab c
+ 0: ab c
+ *** Failers
+No match
+ abc
+No match
+ ab cde
+No match
+
+/(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
+ ab c
+ 0: ab c
+ *** Failers
+No match
+ abc
+No match
+ ab cde
+No match
+
+/^ a\ b[c ]d $/x
+ a bcd
+ 0: a bcd
+ a b d
+ 0: a b d
+ *** Failers
+No match
+ abcd
+No match
+ ab d
+No match
+
+/^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
+ abcdefhijklm
+ 0: abcdefhijklm
+
+/^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
+ abcdefhijklm
+ 0: abcdefhijklm
+
+/^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
+ a+ Z0+\x08\n\x1d\x12
+ 0: a+ Z0+\x08\x0a\x1d\x12
+
+/^[.^$|()*+?{,}]+/
+ .^\$(*+)|{?,?}
+ 0: .^$(*+)|{?,?}
+ 1: .^$(*+)|{?,?
+ 2: .^$(*+)|{?,
+ 3: .^$(*+)|{?
+ 4: .^$(*+)|{
+ 5: .^$(*+)|
+ 6: .^$(*+)
+ 7: .^$(*+
+ 8: .^$(*
+ 9: .^$(
+10: .^$
+11: .^
+12: .
+
+/^a*\w/
+ z
+ 0: z
+ az
+ 0: az
+ 1: a
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ 3: a
+ a
+ 0: a
+ aa
+ 0: aa
+ 1: a
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ a+
+ 0: a
+ aa+
+ 0: aa
+ 1: a
+
+/^a*?\w/
+ z
+ 0: z
+ az
+ 0: az
+ 1: a
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ 3: a
+ a
+ 0: a
+ aa
+ 0: aa
+ 1: a
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ a+
+ 0: a
+ aa+
+ 0: aa
+ 1: a
+
+/^a+\w/
+ az
+ 0: az
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ aa
+ 0: aa
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ aa+
+ 0: aa
+
+/^a+?\w/
+ az
+ 0: az
+ aaaz
+ 0: aaaz
+ 1: aaa
+ 2: aa
+ aa
+ 0: aa
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ aa+
+ 0: aa
+
+/^\d{8}\w{2,}/
+ 1234567890
+ 0: 1234567890
+ 12345678ab
+ 0: 12345678ab
+ 12345678__
+ 0: 12345678__
+ *** Failers
+No match
+ 1234567
No match
-/a(.{3})b/8
- a\x{4000}xyb
- 0: a\x{4000}xyb
- a\x{4000}\x7fyb
- 0: a\x{4000}\x{7f}yb
- a\x{4000}\x{100}yb
- 0: a\x{4000}\x{100}yb
+/^[aeiou\d]{4,5}$/
+ uoie
+ 0: uoie
+ 1234
+ 0: 1234
+ 12345
+ 0: 12345
+ aaaaa
+ 0: aaaaa
*** Failers
No match
- a\x{4000}b
+ 123456
No match
- ac\ncb
+
+/^[aeiou\d]{4,5}?/
+ uoie
+ 0: uoie
+ 1234
+ 0: 1234
+ 12345
+ 0: 12345
+ 1: 1234
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 123456
+ 0: 12345
+ 1: 1234
+
+/^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
+ From abcd Mon Sep 01 12:33:02 1997
+ 0: From abcd Mon Sep 01 12:33
+
+/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
+ From abcd Mon Sep 01 12:33:02 1997
+ 0: From abcd Mon Sep 01 12:33
+ From abcd Mon Sep 1 12:33:02 1997
+ 0: From abcd Mon Sep 1 12:33
+ *** Failers
+No match
+ From abcd Sep 01 12:33:02 1997
No match
-/a(.*?)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
+/^12.34/s
+ 12\n34
+ 0: 12\x0a34
+ 12\r34
+ 0: 12\x0d34
-/a(.*?)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
-
-/a(.*)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: a\xc0\x88
- 2: a\xc0
+/\w+(?=\t)/
+ the quick brown\t fox
+ 0: brown
-/a(.*)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: a\x{100}
+/foo(?!bar)(.*)/
+ foobar is foolish see?
+ 0: foolish see?
+ 1: foolish see
+ 2: foolish se
+ 3: foolish s
+ 4: foolish
+ 5: foolish
+ 6: foolis
+ 7: fooli
+ 8: fool
+ 9: foo
-/a(.)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
+/(?:(?!foo)...|^.{0,2})bar(.*)/
+ foobar crowbar etc
+ 0: rowbar etc
+ 1: rowbar et
+ 2: rowbar e
+ 3: rowbar
+ 4: rowbar
+ barrel
+ 0: barrel
+ 1: barre
+ 2: barr
+ 3: bar
+ 2barrel
+ 0: 2barrel
+ 1: 2barre
+ 2: 2barr
+ 3: 2bar
+ A barrel
+ 0: A barrel
+ 1: A barre
+ 2: A barr
+ 3: A bar
-/a(.)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
-
-/a(.?)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
-
-/a(.?)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
-
-/a(.??)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: a\xc0
+/^(\D*)(?=\d)(?!123)/
+ abc456
+ 0: abc
+ *** Failers
+No match
+ abc123
+No match
-/a(.??)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: a\x{240}
+/^1234(?# test newlines
+ inside)/
+ 1234
+ 0: 1234
-/a(.{3})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
+/^1234 #comment in extended re
+ /x
+ 1234
+ 0: 1234
+
+/#rhubarb
+ abcd/x
+ abcd
+ 0: abcd
+
+/^abcd#rhubarb/x
+ abcd
+ 0: abcd
+
+/(?!^)abc/
+ the abc
+ 0: abc
*** Failers
No match
- a\x{1234}b
+ abc
No match
- ac\ncb
+
+/(?=^)abc/
+ abc
+ 0: abc
+ *** Failers
No match
+ the abc
+No match
+
+/^[ab]{1,3}(ab*|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}?(ab*|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}?(ab*?|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/^[ab]{1,3}(ab*?|b)/
+ aabbbbb
+ 0: aabbbbb
+ 1: aabbbb
+ 2: aabbb
+ 3: aabb
+ 4: aab
+ 5: aa
+
+/ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional leading comment
+(?: (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # one word, optionally followed by....
+(?:
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
+\(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) | # comments, or...
-/a(.{3,})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+# quoted strings
+)*
+< (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # leading <
+(?: @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* , (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+)* # further okay, if led by comma
+: # closing colon
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* )? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) # initial word
+(?: (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+" (?: # opening quote...
+[^\\\x80-\xff\n\015"] # Anything except backslash and quote
+| # or
+\\ [^\x80-\xff] # Escaped something (something != CR)
+)* " # closing quote
+) )* # further okay, if led by a period
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* @ (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # initial subdomain
+(?: #
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* \. # if led by a period...
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* (?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+| \[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+) # ...further okay
+)*
+# address spec
+(?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* > # trailing >
+# name and address
+) (?: [\040\t] | \(
+(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
+\) )* # optional trailing comment
+/x
+ Alan Other <user\@dom.ain>
+ 0: Alan Other <[email protected]>
+ <user\@dom.ain>
+ 1: user@dom
+ user\@dom.ain
+ 1: user@dom
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ 0: "A. Other" <[email protected]> (a comment)
+ 1: "A. Other" <[email protected]>
+ 2: "A. Other" <[email protected]>
+ A. Other <user.1234\@dom.ain> (a comment)
+ 0: Other <[email protected]> (a comment)
+ 1: Other <[email protected]>
+ 2: Other <[email protected]>
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
+ 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
+ A missing angle <user\@some.where
+ 1: user@some
*** Failers
No match
- a\x{1234}b
+ The quick brown fox
No match
-/a(.{3,}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+/[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional leading comment
+(?:
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address
+| # or
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+# leading word
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
+(?:
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+|
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+) # "special" comment or quoted string
+[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
+)*
+<
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# <
+(?:
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+(?: ,
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+)* # additional domains
+:
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)? # optional route
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+# Atom
+| # or
+" # "
+[^\\\x80-\xff\n\015"] * # normal
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
+" # "
+# Quoted string
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# additional words
+)*
+@
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+(?:
+\.
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+(?:
+[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
+|
+\[ # [
+(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
+\] # ]
+)
+[\040\t]* # Nab whitespace.
+(?:
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: # (
+(?: \\ [^\x80-\xff] |
+\( # (
+[^\\\x80-\xff\n\015()] * # normal*
+(?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
+\) # )
+) # special
+[^\\\x80-\xff\n\015()] * # normal*
+)* # )*
+\) # )
+[\040\t]* )* # If comment found, allow more spaces.
+# optional trailing comments
+)*
+# address spec
+> # >
+# name and address
+)
+/x
+ Alan Other <user\@dom.ain>
+ 0: Alan Other <[email protected]>
+ <user\@dom.ain>
+ 1: user@dom
+ user\@dom.ain
+ 1: user@dom
+ \"A. Other\" <user.1234\@dom.ain> (a comment)
+ 0: "A. Other" <[email protected]>
+ A. Other <user.1234\@dom.ain> (a comment)
+ 0: Other <[email protected]>
+ \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
+ 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
+ 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
+ A missing angle <user\@some.where
+ 1: user@some
*** Failers
No match
- a\x{1234}b
+ The quick brown fox
No match
-/a(.{3,5})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
+/abc\0def\00pqr\000xyz\0000AB/
+ abc\0def\00pqr\000xyz\0000AB
+ 0: abc\x00def\x00pqr\x00xyz\x000AB
+ abc456 abc\0def\00pqr\000xyz\0000ABCDE
+ 0: abc\x00def\x00pqr\x00xyz\x000AB
+
+/abc\x0def\x00pqr\x000xyz\x0000AB/
+ abc\x0def\x00pqr\x000xyz\x0000AB
+ 0: abc\x0def\x00pqr\x000xyz\x0000AB
+ abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
+ 0: abc\x0def\x00pqr\x000xyz\x0000AB
+
+/^[\000-\037]/
+ \0A
+ 0: \x00
+ \01B
+ 0: \x01
+ \037C
+ 0: \x1f
+
+/\0*/
+ \0\0\0\0
+ 0: \x00\x00\x00\x00
+ 1: \x00\x00\x00
+ 2: \x00\x00
+ 3: \x00
+ 4:
+
+/A\x0{2,3}Z/
+ The A\x0\x0Z
+ 0: A\x00\x00Z
+ An A\0\x0\0Z
+ 0: A\x00\x00\x00Z
*** Failers
No match
- a\x{1234}b
+ A\0Z
No match
- axxxxxxbcdefghijb
+ A\0\x0\0\x0Z
No match
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- 0: axxxxb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- 0: axbxxb
- axxxxxbcdefghijb
- 0: axxxxxb
+/^\s/
+ \040abc
+ 0:
+ \x0cabc
+ 0: \x0c
+ \nabc
+ 0: \x0a
+ \rabc
+ 0: \x0d
+ \tabc
+ 0: \x09
*** Failers
No match
- a\x{1234}b
+ abc
No match
- axxxxxxbcdefghijb
+
+/^a b
+ c/x
+ abc
+ 0: abc
+
+/ab{1,3}bc/
+ abbbbc
+ 0: abbbbc
+ abbbc
+ 0: abbbc
+ abbc
+ 0: abbc
+ *** Failers
+No match
+ abc
+No match
+ abbbbbc
No match
-/^[a\x{c0}]/8
+/([^.]*)\.([^:]*):[T ]+(.*)/
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/([^.]*)\.([^:]*):[T ]+(.*)/i
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/([^.]*)\.([^:]*):[t ]+(.*)/i
+ track1.title:TBlah blah blah
+ 0: track1.title:TBlah blah blah
+ 1: track1.title:TBlah blah bla
+ 2: track1.title:TBlah blah bl
+ 3: track1.title:TBlah blah b
+ 4: track1.title:TBlah blah
+ 5: track1.title:TBlah blah
+ 6: track1.title:TBlah bla
+ 7: track1.title:TBlah bl
+ 8: track1.title:TBlah b
+ 9: track1.title:TBlah
+10: track1.title:TBlah
+11: track1.title:TBla
+12: track1.title:TBl
+13: track1.title:TB
+14: track1.title:T
+
+/^[W-c]+$/
+ WXY_^abc
+ 0: WXY_^abc
*** Failers
No match
- \x{100}
+ wxy
No match
-/(?<=aXb)cd/8
- aXbcd
- 0: cd
+/^[W-c]+$/i
+ WXY_^abc
+ 0: WXY_^abc
+ wxy_^ABC
+ 0: wxy_^ABC
+
+/^[\x3f-\x5F]+$/i
+ WXY_^abc
+ 0: WXY_^abc
+ wxy_^ABC
+ 0: wxy_^ABC
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
- 0: cd
+/^abc$/m
+ abc
+ 0: abc
+ qqq\nabc
+ 0: abc
+ abc\nzzz
+ 0: abc
+ qqq\nabc\nzzz
+ 0: abc
+
+/^abc$/
+ abc
+ 0: abc
+ *** Failers
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
- 0: cd
+/\Aabc\Z/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ *** Failers
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- 0: \x{100}\x{100}\x{100}b
- *** Failers
+/\A(.)*\Z/s
+ abc\ndef
+ 0: abc\x0adef
+
+/\A(.)*\Z/m
+ *** Failers
+ 0: *** Failers
+ abc\ndef
+No match
+
+/(?:b)|(?::+)/
+ b::c
+ 0: b
+ c::b
+ 0: ::
+ 1: :
+
+/[-az]+/
+ az-
+ 0: az-
+ 1: az
+ 2: a
+ *** Failers
+ 0: a
+ b
+No match
+
+/[az-]+/
+ za-
+ 0: za-
+ 1: za
+ 2: z
+ *** Failers
+ 0: a
+ b
+No match
+
+/[a\-z]+/
+ a-z
+ 0: a-z
+ 1: a-
+ 2: a
+ *** Failers
+ 0: a
+ b
+No match
+
+/[a-z]+/
+ abcdxyz
+ 0: abcdxyz
+ 1: abcdxy
+ 2: abcdx
+ 3: abcd
+ 4: abc
+ 5: ab
+ 6: a
+
+/[\d-]+/
+ 12-34
+ 0: 12-34
+ 1: 12-3
+ 2: 12-
+ 3: 12
+ 4: 1
+ *** Failers
+No match
+ aaa
+No match
+
+/[\d-z]+/
+ 12-34z
+ 0: 12-34z
+ 1: 12-34
+ 2: 12-3
+ 3: 12-
+ 4: 12
+ 5: 1
+ *** Failers
No match
- \x{100}\x{100}b
+ aaa
No match
-/\x{ab}/8
- \x{ab}
- 0: \x{ab}
- \xc2\xab
- 0: \x{ab}
+/\x5c/
+ \\
+ 0: \
+
+/\x20Z/
+ the Zoo
+ 0: Z
+ *** Failers
+No match
+ Zulu
+No match
+
+/ab{3cd/
+ ab{3cd
+ 0: ab{3cd
+
+/ab{3,cd/
+ ab{3,cd
+ 0: ab{3,cd
+
+/ab{3,4a}cd/
+ ab{3,4a}cd
+ 0: ab{3,4a}cd
+
+/{4,5a}bc/
+ {4,5a}bc
+ 0: {4,5a}bc
+
+/^a.b/<lf>
+ a\rb
+ 0: a\x0db
+ *** Failers
+No match
+ a\nb
+No match
+
+/abc$/
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ *** Failers
+No match
+ abc\ndef
+No match
+
+/(abc)\123/
+ abc\x53
+ 0: abcS
+
+/(abc)\223/
+ abc\x93
+ 0: abc\x93
+
+/(abc)\323/
+ abc\xd3
+ 0: abc\xd3
+
+/(abc)\100/
+ abc\x40
+ 0: abc@
+ abc\100
+ 0: abc@
+
+/(abc)\1000/
+ abc\x400
+ 0: abc@0
+ abc\x40\x30
+ 0: abc@0
+ abc\1000
+ 0: abc@0
+ abc\100\x30
+ 0: abc@0
+ abc\100\060
+ 0: abc@0
+ abc\100\60
+ 0: abc@0
+
+/abc\81/
+ abc\081
+ 0: abc\x0081
+ abc\0\x38\x31
+ 0: abc\x0081
+
+/abc\91/
+ abc\091
+ 0: abc\x0091
+ abc\0\x39\x31
+ 0: abc\x0091
+
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
+ abcdefghijk\12S
+ 0: abcdefghijk\x0aS
+
+/ab\idef/
+ abidef
+ 0: abidef
+
+/a{0}bc/
+ bc
+ 0: bc
+
+/(a|(bc)){0,0}?xyz/
+ xyz
+ 0: xyz
+
+/abc[\10]de/
+ abc\010de
+ 0: abc\x08de
+
+/abc[\1]de/
+ abc\1de
+ 0: abc\x01de
+
+/(abc)[\1]de/
+ abc\1de
+ 0: abc\x01de
+
+/(?s)a.b/
+ a\nb
+ 0: a\x0ab
+
+/^([^a])([^\b])([^c]*)([^d]{3,4})/
+ baNOTccccd
+ 0: baNOTcccc
+ 1: baNOTccc
+ 2: baNOTcc
+ 3: baNOTc
+ 4: baNOT
+ baNOTcccd
+ 0: baNOTccc
+ 1: baNOTcc
+ 2: baNOTc
+ 3: baNOT
+ baNOTccd
+ 0: baNOTcc
+ 1: baNOTc
+ 2: baNOT
+ bacccd
+ 0: baccc
+ *** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ anything
+No match
+ b\bc
+No match
+ baccd
+No match
+
+/[^a]/
+ Abc
+ 0: A
+
+/[^a]/i
+ Abc
+ 0: b
+
+/[^a]+/
+ AAAaAbc
+ 0: AAA
+ 1: AA
+ 2: A
+
+/[^a]+/i
+ AAAaAbc
+ 0: bc
+ 1: b
+
+/[^a]+/
+ bbb\nccc
+ 0: bbb\x0accc
+ 1: bbb\x0acc
+ 2: bbb\x0ac
+ 3: bbb\x0a
+ 4: bbb
+ 5: bb
+ 6: b
+
+/[^k]$/
+ abc
+ 0: c
+ *** Failers
+ 0: s
+ abk
+No match
+
+/[^k]{2,3}$/
+ abc
+ 0: abc
+ kbc
+ 0: bc
+ kabc
+ 0: abc
+ *** Failers
+ 0: ers
+ abk
+No match
+ akb
+No match
+ akk
+No match
+
+/^\d{8,}\@.+[^k]$/
+ 12345678\@a.b.c.d
+ 123456789\@x.y.z
+ *** Failers
+No match
+ 12345678\@x.y.uk
+No match
+ 1234567\@a.b.c.d
+No match
+
+/[^a]/
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: A
+
+/[^a]/i
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: b
+
+/[^az]/
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: A
+
+/[^az]/i
+ aaaabcd
+ 0: b
+ aaAabcd
+ 0: b
+
+/\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
+ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
+ 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
+
+/P[^*]TAIRE[^*]{1,6}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+ 0: PSTAIREISLL
+
+/P[^*]TAIRE[^*]{1,}?LL/
+ xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
+ 0: PSTAIREISLL
+
+/(\.\d\d[1-9]?)\d+/
+ 1.230003938
+ 0: .230003938
+ 1: .23000393
+ 2: .2300039
+ 3: .230003
+ 4: .23000
+ 5: .2300
+ 6: .230
+ 1.875000282
+ 0: .875000282
+ 1: .87500028
+ 2: .8750002
+ 3: .875000
+ 4: .87500
+ 5: .8750
+ 6: .875
+ 1.235
+ 0: .235
+
+/(\.\d\d((?=0)|\d(?=\d)))/
+ 1.230003938
+ 0: .230
+ 1: .23
+ 1.875000282
+ 0: .875
*** Failers
No match
- \x00{ab}
+ 1.235
No match
+
+/a(?)b/
+ ab
+ 0: ab
+
+/\b(foo)\s+(\w+)/i
+ Food is on the foo table
+ 0: foo table
+ 1: foo tabl
+ 2: foo tab
+ 3: foo ta
+ 4: foo t
+
+/foo(.*)bar/
+ The food is under the bar in the barn.
+ 0: food is under the bar in the bar
+ 1: food is under the bar
+
+/foo(.*?)bar/
+ The food is under the bar in the barn.
+ 0: food is under the bar in the bar
+ 1: food is under the bar
-/(?<=(.))X/8
- WXYZ
- 0: X
- \x{256}XYZ
+/(.*)(\d*)/
+ I have 2 numbers: 53147
+Matched, but offsets vector is too small to show all matches
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2 numbers:
+ 6: I have 2 numbers:
+ 7: I have 2 numbers
+ 8: I have 2 number
+ 9: I have 2 numbe
+10: I have 2 numb
+11: I have 2 num
+12: I have 2 nu
+13: I have 2 n
+14: I have 2
+15: I have 2
+16: I have
+17: I have
+18: I hav
+19: I ha
+20: I h
+21: I
+
+/(.*)(\d+)/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2
+
+/(.*?)(\d*)/
+ I have 2 numbers: 53147
+Matched, but offsets vector is too small to show all matches
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2 numbers:
+ 6: I have 2 numbers:
+ 7: I have 2 numbers
+ 8: I have 2 number
+ 9: I have 2 numbe
+10: I have 2 numb
+11: I have 2 num
+12: I have 2 nu
+13: I have 2 n
+14: I have 2
+15: I have 2
+16: I have
+17: I have
+18: I hav
+19: I ha
+20: I h
+21: I
+
+/(.*?)(\d+)/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+ 1: I have 2 numbers: 5314
+ 2: I have 2 numbers: 531
+ 3: I have 2 numbers: 53
+ 4: I have 2 numbers: 5
+ 5: I have 2
+
+/(.*)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*?)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*)\b(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/(.*\D)(\d+)$/
+ I have 2 numbers: 53147
+ 0: I have 2 numbers: 53147
+
+/^\D*(?!123)/
+ ABC123
+ 0: AB
+ 1: A
+ 2:
+
+/^(\D*)(?=\d)(?!123)/
+ ABC445
+ 0: ABC
+ *** Failers
+No match
+ ABC123
+No match
+
+/^[W-]46]/
+ W46]789
+ 0: W46]
+ -46]789
+ 0: -46]
+ *** Failers
+No match
+ Wall
+No match
+ Zebra
+No match
+ 42
+No match
+ [abcd]
+No match
+ ]abcd[
+No match
+
+/^[W-\]46]/
+ W46]789
+ 0: W
+ Wall
+ 0: W
+ Zebra
+ 0: Z
+ Xylophone
0: X
+ 42
+ 0: 4
+ [abcd]
+ 0: [
+ ]abcd[
+ 0: ]
+ \\backslash
+ 0: \
*** Failers
No match
- XYZ
+ -46]789
No match
+ well
+No match
+
+/\d\d\/\d\d\/\d\d\d\d/
+ 01/01/2000
+ 0: 01/01/2000
-/[^a]+/8g
- bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8
- \x{100}bcAa
- 0: \x{100}bcA
- 1: \x{100}bc
- 2: \x{100}b
-
-/^[^a]{2,}?/8
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
-
-/[^a]+/8ig
+/word (?:[a-zA-Z0-9]+ ){0,10}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+No match
+
+/word (?:[a-zA-Z0-9]+ ){0,300}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+No match
+
+/^(a){0,0}/
bcd
- 0: bcd
- 1: bc
- 2: b
- \x{100}aY\x{256}Z
- 0: \x{100}
- 0: Y\x{256}Z
- 1: Y\x{256}
- 2: Y
-
-/^[^a]{2}/8i
- \x{100}bc
- 0: \x{100}b
-
-/^[^a]{2,}/8i
- \x{100}bcAa
- 0: \x{100}bc
- 1: \x{100}b
+ 0:
+ abc
+ 0:
+ aab
+ 0:
-/^[^a]{2,}?/8i
- \x{100}bca
- 0: \x{100}bc
- 1: \x{100}b
+/^(a){0,1}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: a
+ 1:
-/\x{100}{0,0}/8
- abcd
+/^(a){0,2}/
+ bcd
0:
-
-/\x{100}?/8
- abcd
+ abc
+ 0: a
+ 1:
+ aab
+ 0: aa
+ 1: a
+ 2:
+
+/^(a){0,3}/
+ bcd
0:
- \x{100}\x{100}
- 0: \x{100}
+ abc
+ 0: a
1:
+ aab
+ 0: aa
+ 1: a
+ 2:
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+ 3:
-/\x{100}{0,3}/8
- \x{100}\x{100}
- 0: \x{100}\x{100}
- 1: \x{100}
+/^(a){0,}/
+ bcd
+ 0:
+ abc
+ 0: a
+ 1:
+ aab
+ 0: aa
+ 1: a
2:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
3:
+ aaaaaaaa
+ 0: aaaaaaaa
+ 1: aaaaaaa
+ 2: aaaaaa
+ 3: aaaaa
+ 4: aaaa
+ 5: aaa
+ 6: aa
+ 7: a
+ 8:
+
+/^(a){1,1}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: a
+
+/^(a){1,2}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+
+/^(a){1,3}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+
+/^(a){1,}/
+ bcd
+No match
+ abc
+ 0: a
+ aab
+ 0: aa
+ 1: a
+ aaa
+ 0: aaa
+ 1: aa
+ 2: a
+ aaaaaaaa
+ 0: aaaaaaaa
+ 1: aaaaaaa
+ 2: aaaaaa
+ 3: aaaaa
+ 4: aaaa
+ 5: aaa
+ 6: aa
+ 7: a
+
+/.*\.gif/
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.{0,}\.gif/
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.*\.gif/m
+ borfle\nbib.gif\nno
+ 0: bib.gif
+
+/.*\.gif/s
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif
+
+/.*\.gif/ms
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif
-/\x{100}*/8
- abce
- 0:
- \x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
- 4:
+/.*$/
+ borfle\nbib.gif\nno
+ 0: no
-/\x{100}{1,1}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}
-
-/\x{100}{1,3}/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}
- 1: \x{100}\x{100}
- 2: \x{100}
-
-/\x{100}+/8
- abcd\x{100}\x{100}\x{100}\x{100}
- 0: \x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}
- 2: \x{100}\x{100}
- 3: \x{100}
-
-/\x{100}{3}/8
- abcd\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}
-
-/\x{100}{3,5}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}
-
-/\x{100}{3,}/8
- abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}
-
-/(?<=a\x{100}{2}b)X/8
- Xyyya\x{100}\x{100}bXzzz
- 0: X
+/.*$/m
+ borfle\nbib.gif\nno
+ 0: borfle
-/\D*/8
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\D*/8
- \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-Matched, but too many subsidiary matches
- 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 3: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 4: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 5: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 6: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 7: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 8: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
- 9: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-10: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-11: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-12: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-13: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-14: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-15: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-16: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-17: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-18: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-19: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-20: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-21: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
-
-/\D/8
- 1X2
- 0: X
- 1\x{100}2
- 0: \x{100}
+/.*$/s
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif\x0ano
+
+/.*$/ms
+ borfle\nbib.gif\nno
+ 0: borfle\x0abib.gif\x0ano
+ 1: borfle\x0abib.gif
+ 2: borfle
+
+/.*$/
+ borfle\nbib.gif\nno\n
+ 0: no
+
+/.*$/m
+ borfle\nbib.gif\nno\n
+ 0: borfle
+
+/.*$/s
+ borfle\nbib.gif\nno\n
+ 0: borfle\x0abib.gif\x0ano\x0a
+ 1: borfle\x0abib.gif\x0ano
+
+/.*$/ms
+ borfle\nbib.gif\nno\n
+ 0: borfle\x0abib.gif\x0ano\x0a
+ 1: borfle\x0abib.gif\x0ano
+ 2: borfle\x0abib.gif
+ 3: borfle
+
+/(.*X|^B)/
+ abcde\n1234Xyz
+ 0: 1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(.*X|^B)/m
+ abcde\n1234Xyz
+ 0: 1234X
+ BarFoo
+ 0: B
+ abcde\nBar
+ 0: B
+
+/(.*X|^B)/s
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(.*X|^B)/ms
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ abcde\nBar
+ 0: B
+
+/(?s)(.*X|^B)/
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/(?s:.*X|^B)/
+ abcde\n1234Xyz
+ 0: abcde\x0a1234X
+ BarFoo
+ 0: B
+ *** Failers
+No match
+ abcde\nBar
+No match
+
+/^.*B/
+ **** Failers
+No match
+ abc\nB
+No match
+
+/(?s)^.*B/
+ abc\nB
+ 0: abc\x0aB
+
+/(?m)^.*B/
+ abc\nB
+ 0: B
+
+/(?ms)^.*B/
+ abc\nB
+ 0: abc\x0aB
+
+/(?ms)^B/
+ abc\nB
+ 0: B
+
+/(?s)B$/
+ B\n
+ 0: B
+
+/^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
+ 123456654321
+ 0: 123456654321
-/>\S/8
- > >X Y
- 0: >X
- > >\x{100} Y
- 0: >\x{100}
+/^\d\d\d\d\d\d\d\d\d\d\d\d/
+ 123456654321
+ 0: 123456654321
+
+/^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
+ 123456654321
+ 0: 123456654321
-/\d/8
- \x{100}3
- 0: 3
+/^[abc]{12}/
+ abcabcabcabc
+ 0: abcabcabcabc
-/\s/8
- \x{100} X
- 0:
+/^[a-c]{12}/
+ abcabcabcabc
+ 0: abcabcabcabc
-/\D+/8
- 12abcd34
+/^(a|b|c){12}/
+ abcabcabcabc
+ 0: abcabcabcabc
+
+/^[abcdefghijklmnopqrstuvwxy0123456789]/
+ n
+ 0: n
+ *** Failers
+No match
+ z
+No match
+
+/abcde{0,0}/
+ abcd
0: abcd
- 1: abc
- 2: ab
- 3: a
*** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- 1234
+No match
+ abce
No match
-/\D{2,3}/8
- 12abcd34
- 0: abc
- 1: ab
- 12ab34
+/ab[cd]{0,0}e/
+ abe
+ 0: abe
+ *** Failers
+No match
+ abcde
+No match
+
+/ab(c){0,0}d/
+ abd
+ 0: abd
+ *** Failers
+No match
+ abcd
+No match
+
+/a(b*)/
+ a
+ 0: a
+ ab
0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
+ 1: a
+ abbbb
+ 0: abbbb
+ 1: abbb
+ 2: abb
+ 3: ab
+ 4: a
+ *** Failers
+ 0: a
+ bbbbb
No match
- 12a34
+
+/ab\d{0}e/
+ abe
+ 0: abe
+ *** Failers
No match
+ ab1e
+No match
+
+/"([^\\"]+|\\.)*"/
+ the \"quick\" brown fox
+ 0: "quick"
+ \"the \\\"quick\\\" brown fox\"
+ 0: "the \"quick\" brown fox"
-/\D{2,3}?/8
- 12abcd34
+/.*?/g+
+ abc
0: abc
+ 0+
1: ab
- 12ab34
+ 2: a
+ 3:
+ 0:
+ 0+
+
+/\b/g+
+ abc
+ 0:
+ 0+ abc
+ 0:
+ 0+
+
+/\b/+g
+ abc
+ 0:
+ 0+ abc
+ 0:
+ 0+
+
+//g
+ abc
+ 0:
+ 0:
+ 0:
+ 0:
+
+/<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
+ <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+ 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
+
+/a[^a]b/
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/a.b/
+ acb
+ 0: acb
+ *** Failers
+No match
+ a\nb
+No match
+
+/a[^a]b/s
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/a.b/s
+ acb
+ 0: acb
+ a\nb
+ 0: a\x0ab
+
+/^(b+?|a){1,2}?c/
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ bbbac
+ 0: bbbac
+ bbbbac
+ 0: bbbbac
+ bbbbbac
+ 0: bbbbbac
+
+/^(b+|a){1,2}?c/
+ bac
+ 0: bac
+ bbac
+ 0: bbac
+ bbbac
+ 0: bbbac
+ bbbbac
+ 0: bbbbac
+ bbbbbac
+ 0: bbbbbac
+
+/(?!\A)x/m
+ x\nb\n
+No match
+ a\bx\n
+ 0: x
+
+/\x0{ab}/
+ \0{ab}
+ 0: \x00{ab}
+
+/(A|B)*?CD/
+ CD
+ 0: CD
+
+/(A|B)*CD/
+ CD
+ 0: CD
+
+/(?<!bar)foo/
+ foo
+ 0: foo
+ catfood
+ 0: foo
+ arfootle
+ 0: foo
+ rfoosh
+ 0: foo
+ *** Failers
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/\w{3}(?<!bar)foo/
+ catfood
+ 0: catfoo
+ *** Failers
+No match
+ foo
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/(?<=(foo)a)bar/
+ fooabar
+ 0: bar
+ *** Failers
+No match
+ bar
+No match
+ foobbar
+No match
+
+/\Aabc\z/m
+ abc
+ 0: abc
+ *** Failers
+No match
+ abc\n
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+ 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+
+/(?>(\.\d\d[1-9]?))\d+/
+ 1.230003938
+ 0: .230003938
+ 1: .23000393
+ 2: .2300039
+ 3: .230003
+ 4: .23000
+ 5: .2300
+ 6: .230
+ 1.875000282
+ 0: .875000282
+ 1: .87500028
+ 2: .8750002
+ 3: .875000
+ 4: .87500
+ 5: .8750
+ *** Failers
+No match
+ 1.235
+No match
+
+/^((?>\w+)|(?>\s+))*$/
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d+)(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: 1234
+ 3: 123
+ 4: 12
+ 12345+
+ 0: 12345
+ 1: 1234
+ 2: 123
+ 3: 12
+
+/((?>\d+))(\w)/
+ 12345a
+ 0: 12345a
+ *** Failers
+No match
+ 12345+
+No match
+
+/(?>a+)b/
+ aaab
+ 0: aaab
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+
+/(?>b)+/
+ aaabbbccc
+ 0: bbb
+ 1: bb
+ 2: b
+
+/(?>a+|b+|c+)*c/
+ aaabbbbccccd
+ 0: aaabbbbcccc
+ 1: aaabbbbc
+
+/(a+|b+|c+)*c/
+ aaabbbbccccd
+ 0: aaabbbbcccc
+ 1: aaabbbbccc
+ 2: aaabbbbcc
+ 3: aaabbbbc
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: abc(ade)ufh()()
+ 2: abc(ade)ufh()
+ 3: abc(ade)ufh
+ 4: abc(ade)
+ 5: abc
+
+/\(((?>[^()]+)|\([^()]+\))+\)/
+ (abc)
+ 0: (abc)
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/a(?-i)b/i
+ ab
0: ab
- *** Failers
- 0: ***
- 1: **
- 1234
+ Ab
+ 0: Ab
+ *** Failers
+No match
+ aB
No match
- 12a34
+ AB
+No match
+
+/(a (?x)b c)d e/
+ a bcd e
+ 0: a bcd e
+ *** Failers
+No match
+ a b cd e
+No match
+ abcd e
+No match
+ a bcde
+No match
+
+/(a b(?x)c d (?-x)e f)/
+ a bcde f
+ 0: a bcde f
+ *** Failers
+No match
+ abcdef
No match
-/\d+/8
- 12abcd34
- 0: 12
- 1: 1
+/(a(?i)b)c/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ abC
+No match
+ aBC
+No match
+ Abc
+No match
+ ABc
+No match
+ ABC
+No match
+ AbC
+No match
+
+/a(?i:b)c/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ ABC
+No match
+ abC
+No match
+ aBC
+No match
+
+/a(?i:b)*c/
+ aBc
+ 0: aBc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ aBC
+No match
+ aBBC
+No match
+
+/a(?=b(?i)c)\w\wd/
+ abcd
+ 0: abcd
+ abCd
+ 0: abCd
+ *** Failers
+No match
+ aBCd
+No match
+ abcD
+No match
+
+/(?s-i:more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
*** Failers
No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
-/\d{2,3}/8
- 12abcd34
+/(?:(?s-i)more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
+ *** Failers
+No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
+
+/(?>a(?i)b+)+c/
+ abc
+ 0: abc
+ aBbc
+ 0: aBbc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ Abc
+No match
+ abAb
+No match
+ abbC
+No match
+
+/(?=a(?i)b)\w\wc/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ Ab
+No match
+ abC
+No match
+ aBC
+No match
+
+/(?<=a(?i)b)(\w\w)c/
+ abxxc
+ 0: xxc
+ aBxxc
+ 0: xxc
+ *** Failers
+No match
+ Abxxc
+No match
+ ABxxc
+No match
+ abxxC
+No match
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 0: abc:
+ 12
0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
+ *** Failers
+No match
+ 123
No match
- 1.4
+ xyz
No match
-/\d{2,3}?/8
- 12abcd34
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 0: abc:
+ 12
0: 12
- 1234abcd
- 0: 123
- 1: 12
- *** Failers
-No match
- 1.4
-No match
-
-/\S+/8
- 12abcd34
- 0: 12abcd34
- 1: 12abcd3
- 2: 12abcd
- 3: 12abc
- 4: 12ab
- 5: 12a
- 6: 12
- 7: 1
- *** Failers
- 0: ***
- 1: **
- 2: *
- \ \
-No match
-
-/\S{2,3}/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
*** Failers
- 0: ***
- 1: **
- \ \
+No match
+ 123
+No match
+ xyz
+No match
+
+/(?(?<=foo)bar|cat)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
+ *** Failers
+No match
+ foocat
No match
-/\S{2,3}?/8
- 12abcd34
- 0: 12a
- 1: 12
- 1234abcd
- 0: 123
- 1: 12
+/(?(?<!foo)cat|bar)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
+ *** Failers
+No match
+ foocat
+No match
+
+/(?>a*)*/
+ a
+ 0: a
+ 1:
+ aa
+ 0: aa
+ 1:
+ aaaa
+ 0: aaaa
+ 1:
+
+/(abc|)+/
+ abc
+ 0: abc
+ 1:
+ abcabc
+ 0: abcabc
+ 1: abc
+ 2:
+ abcabcabc
+ 0: abcabcabc
+ 1: abcabc
+ 2: abc
+ 3:
+ xyz
+ 0:
+
+/([a]*)*/
+ a
+ 0: a
+ 1:
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+ 5:
+
+/([ab]*)*/
+ a
+ 0: a
+ 1:
+ b
+ 0: b
+ 1:
+ ababab
+ 0: ababab
+ 1: ababa
+ 2: abab
+ 3: aba
+ 4: ab
+ 5: a
+ 6:
+ aaaabcde
+ 0: aaaab
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+ 5:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+
+/([^a]*)*/
+ b
+ 0: b
+ 1:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+ aaa
+ 0:
+
+/([^ab]*)*/
+ cccc
+ 0: cccc
+ 1: ccc
+ 2: cc
+ 3: c
+ 4:
+ abab
+ 0:
+
+/([a]*?)*/
+ a
+ 0: a
+ 1:
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/([ab]*?)*/
+ a
+ 0: a
+ 1:
+ b
+ 0: b
+ 1:
+ abab
+ 0: abab
+ 1: aba
+ 2: ab
+ 3: a
+ 4:
+ baba
+ 0: baba
+ 1: bab
+ 2: ba
+ 3: b
+ 4:
+
+/([^a]*?)*/
+ b
+ 0: b
+ 1:
+ bbbb
+ 0: bbbb
+ 1: bbb
+ 2: bb
+ 3: b
+ 4:
+ aaa
+ 0:
+
+/([^ab]*?)*/
+ c
+ 0: c
+ 1:
+ cccc
+ 0: cccc
+ 1: ccc
+ 2: cc
+ 3: c
+ 4:
+ baba
+ 0:
+
+/(?>a*)*/
+ a
+ 0: a
+ 1:
+ aaabcde
+ 0: aaa
+ 1:
+
+/((?>a*))*/
+ aaaaa
+ 0: aaaaa
+ 1:
+ aabbaa
+ 0: aa
+ 1:
+
+/((?>a*?))*/
+ aaaaa
+ 0: aaaaa
+ 1:
+ aabbaa
+ 0: aa
+ 1:
+
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
+ 12-sep-98
+ 0: 12-sep-98
+ 12-09-98
+ 0: 12-09-98
*** Failers
- 0: ***
- 1: **
- \ \
+No match
+ sep-12-98
+No match
+
+/(?i:saturday|sunday)/
+ saturday
+ 0: saturday
+ sunday
+ 0: sunday
+ Saturday
+ 0: Saturday
+ Sunday
+ 0: Sunday
+ SATURDAY
+ 0: SATURDAY
+ SUNDAY
+ 0: SUNDAY
+ SunDay
+ 0: SunDay
+
+/(a(?i)bc|BB)x/
+ abcx
+ 0: abcx
+ aBCx
+ 0: aBCx
+ bbx
+ 0: bbx
+ BBx
+ 0: BBx
+ *** Failers
+No match
+ abcX
+No match
+ aBCX
+No match
+ bbX
+No match
+ BBX
No match
-/>\s+</8
- 12> <34
- 0: > <
+/^([ab](?i)[cd]|[ef])/
+ ac
+ 0: ac
+ aC
+ 0: aC
+ bD
+ 0: bD
+ elephant
+ 0: e
+ Europe
+ 0: E
+ frog
+ 0: f
+ France
+ 0: F
*** Failers
No match
+ Africa
+No match
-/>\s{2,3}</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
+/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
+ ab
+ 0: ab
+ aBd
+ 0: aBd
+ xy
+ 0: xy
+ xY
+ 0: xY
+ zebra
+ 0: z
+ Zambesi
+ 0: Z
*** Failers
No match
- ab> <cd
+ aCD
+No match
+ XY
No match
-/>\s{2,3}?</8
- ab> <cd
- 0: > <
- ab> <ce
- 0: > <
+/(?<=foo\n)^bar/m
+ foo\nbar
+ 0: bar
*** Failers
No match
- ab> <cd
+ bar
+No match
+ baz\nbar
No match
-/\w+/8
- 12 34
- 0: 12
- 1: 1
+/(?<=(?<!foo)bar)baz/
+ barbaz
+ 0: baz
+ barbarbaz
+ 0: baz
+ koobarbaz
+ 0: baz
*** Failers
- 0: Failers
- 1: Failer
- 2: Faile
- 3: Fail
- 4: Fai
- 5: Fa
- 6: F
- +++=*!
No match
+ baz
+No match
+ foobarbaz
+No match
+
+/The following tests are taken from the Perl 5.005 test suite; some of them/
+/are compatible with 5.004, but I'd rather not have to sort them out./
+No match
+
+/abc/
+ abc
+ 0: abc
+ xabcy
+ 0: abc
+ ababc
+ 0: abc
+ *** Failers
+No match
+ xbc
+No match
+ axc
+No match
+ abx
+No match
+
+/ab*c/
+ abc
+ 0: abc
+
+/ab*bc/
+ abc
+ 0: abc
+ abbc
+ 0: abbc
+ abbbbc
+ 0: abbbbc
+
+/.{1}/
+ abbbbc
+ 0: a
+
+/.{3,4}/
+ abbbbc
+ 0: abbb
+ 1: abb
+
+/ab{0,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab+bc/
+ abbc
+ 0: abbc
+ *** Failers
+No match
+ abc
+No match
+ abq
+No match
+
+/ab+bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,3}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{3,4}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{4,5}bc/
+ *** Failers
+No match
+ abq
+No match
+ abbbbc
+No match
+
+/ab?bc/
+ abbc
+ 0: abbc
+ abc
+ 0: abc
+
+/ab{0,1}bc/
+ abc
+ 0: abc
+
+/ab?bc/
+
+/ab?c/
+ abc
+ 0: abc
+
+/ab{0,1}c/
+ abc
+ 0: abc
+
+/^abc$/
+ abc
+ 0: abc
+ *** Failers
+No match
+ abbbbc
+No match
+ abcc
+No match
+
+/^abc/
+ abcc
+ 0: abc
+
+/^abc$/
+
+/abc$/
+ aabc
+ 0: abc
+ *** Failers
+No match
+ aabc
+ 0: abc
+ aabcd
+No match
+
+/^/
+ abc
+ 0:
+
+/$/
+ abc
+ 0:
+
+/a.c/
+ abc
+ 0: abc
+ axc
+ 0: axc
+
+/a.*c/
+ axyzc
+ 0: axyzc
+
+/a[bc]d/
+ abd
+ 0: abd
+ *** Failers
+No match
+ axyzd
+No match
+ abc
+No match
+
+/a[b-d]e/
+ ace
+ 0: ace
+
+/a[b-d]/
+ aac
+ 0: ac
+
+/a[-b]/
+ a-
+ 0: a-
+
+/a[b-]/
+ a-
+ 0: a-
-/\w{2,3}/8
- ab cd
+/a]/
+ a]
+ 0: a]
+
+/a[]]b/
+ a]b
+ 0: a]b
+
+/a[^bc]d/
+ aed
+ 0: aed
+ *** Failers
+No match
+ abd
+No match
+ abd
+No match
+
+/a[^-b]c/
+ adc
+ 0: adc
+
+/a[^]b]c/
+ adc
+ 0: adc
+ *** Failers
+No match
+ a-c
+ 0: a-c
+ a]c
+No match
+
+/\ba\b/
+ a-
+ 0: a
+ -a
+ 0: a
+ -a-
+ 0: a
+
+/\by\b/
+ *** Failers
+No match
+ xy
+No match
+ yz
+No match
+ xyz
+No match
+
+/\Ba\B/
+ *** Failers
+ 0: a
+ a-
+No match
+ -a
+No match
+ -a-
+No match
+
+/\By\b/
+ xy
+ 0: y
+
+/\by\B/
+ yz
+ 0: y
+
+/\By\B/
+ xyz
+ 0: y
+
+/\w/
+ a
+ 0: a
+
+/\W/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a\sb/
+ a b
+ 0: a b
+
+/a\Sb/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/\d/
+ 1
+ 0: 1
+
+/\D/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/[\w]/
+ a
+ 0: a
+
+/[\W]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a[\s]b/
+ a b
+ 0: a b
+
+/a[\S]b/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/[\d]/
+ 1
+ 0: 1
+
+/[\D]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/ab|cd/
+ abc
+ 0: ab
+ abcd
0: ab
- abcd ce
+
+/()ef/
+ def
+ 0: ef
+
+/$b/
+
+/a\(b/
+ a(b
+ 0: a(b
+
+/a\(*b/
+ ab
+ 0: ab
+ a((b
+ 0: a((b
+
+/a\\b/
+ a\b
+No match
+
+/((a))/
+ abc
+ 0: a
+
+/(a)b(c)/
+ abc
0: abc
- 1: ab
+
+/a+b+c/
+ aabbabc
+ 0: abc
+
+/a{1,}b{1,}c/
+ aabbabc
+ 0: abc
+
+/a.+?c/
+ abcabc
+ 0: abcabc
+ 1: abc
+
+/(a+|b)*/
+ ab
+ 0: ab
+ 1: a
+ 2:
+
+/(a+|b){0,}/
+ ab
+ 0: ab
+ 1: a
+ 2:
+
+/(a+|b)+/
+ ab
+ 0: ab
+ 1: a
+
+/(a+|b){1,}/
+ ab
+ 0: ab
+ 1: a
+
+/(a+|b)?/
+ ab
+ 0: a
+ 1:
+
+/(a+|b){0,1}/
+ ab
+ 0: a
+ 1:
+
+/[^ab]*/
+ cde
+ 0: cde
+ 1: cd
+ 2: c
+ 3:
+
+/abc/
*** Failers
- 0: Fai
- 1: Fa
- a.b.c
No match
+ b
+No match
+
+
+/a*/
+
+
+/([abc])*d/
+ abbbcd
+ 0: abbbcd
+
+/([abc])*bcd/
+ abcd
+ 0: abcd
+
+/a|b|c|d|e/
+ e
+ 0: e
-/\w{2,3}?/8
- ab cd
+/(a|b|c|d|e)f/
+ ef
+ 0: ef
+
+/abcd*efg/
+ abcdefg
+ 0: abcdefg
+
+/ab*/
+ xabyabbbz
0: ab
- abcd ce
+ 1: a
+ xayabbbz
+ 0: a
+
+/(ab|cd)e/
+ abcde
+ 0: cde
+
+/[abhgefdc]ij/
+ hij
+ 0: hij
+
+/^(ab|cd)e/
+
+/(abc|)ef/
+ abcdef
+ 0: ef
+
+/(a|b)c*d/
+ abcd
+ 0: bcd
+
+/(ab|ab*)bc/
+ abc
+ 0: abc
+
+/a([bc]*)c*/
+ abc
0: abc
1: ab
+ 2: a
+
+/a([bc]*)(c*d)/
+ abcd
+ 0: abcd
+
+/a([bc]+)(c*d)/
+ abcd
+ 0: abcd
+
+/a([bc]*)(c+d)/
+ abcd
+ 0: abcd
+
+/a[bcd]*dcdcde/
+ adcdcde
+ 0: adcdcde
+
+/a[bcd]+dcdcde/
*** Failers
- 0: Fai
- 1: Fa
- a.b.c
No match
+ abcde
+No match
+ adcdcde
+No match
+
+/(ab|a)b*c/
+ abc
+ 0: abc
-/\W+/8
- 12====34
- 0: ====
- 1: ===
- 2: ==
- 3: =
+/((a)(b)c)(d)/
+ abcd
+ 0: abcd
+
+/[a-zA-Z_][a-zA-Z0-9_]*/
+ alpha
+ 0: alpha
+ 1: alph
+ 2: alp
+ 3: al
+ 4: a
+
+/^a(bc+|b[eh])g|.h$/
+ abh
+ 0: bh
+
+/(bc+d$|ef*g.|h?i(j|k))/
+ effgz
+ 0: effgz
+ ij
+ 0: ij
+ reffgz
+ 0: effgz
*** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
No match
+ effg
+No match
+ bcdd
+No match
+
+/((((((((((a))))))))))/
+ a
+ 0: a
+
+/(((((((((a)))))))))/
+ a
+ 0: a
-/\W{2,3}/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
+/multiple words of text/
*** Failers
- 0: ***
- 1: **
- a.b.c
No match
+ aa
+No match
+ uh-uh
+No match
+
+/multiple words/
+ multiple words, yeah
+ 0: multiple words
+
+/(.*)c(.*)/
+ abcde
+ 0: abcde
+ 1: abcd
+ 2: abc
-/\W{2,3}?/8
- ab====cd
- 0: ===
- 1: ==
- ab==cd
- 0: ==
+/\((.*), (.*)\)/
+ (a, b)
+ 0: (a, b)
+
+/[k]/
+
+/abcd/
+ abcd
+ 0: abcd
+
+/a(bc)d/
+ abcd
+ 0: abcd
+
+/a[-]?c/
+ ac
+ 0: ac
+
+/abc/i
+ ABC
+ 0: ABC
+ XABCY
+ 0: ABC
+ ABABC
+ 0: ABC
*** Failers
- 0: ***
- 1: **
- a.b.c
+No match
+ aaxabxbaxbbx
+No match
+ XBC
+No match
+ AXC
+No match
+ ABX
No match
-/[\x{100}]/8
- \x{100}
- 0: \x{100}
- Z\x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
+/ab*c/i
+ ABC
+ 0: ABC
+
+/ab*bc/i
+ ABC
+ 0: ABC
+ ABBC
+ 0: ABBC
+
+/ab*?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{0,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab+?bc/i
+ ABBC
+ 0: ABBC
+
+/ab+bc/i
+ *** Failers
+No match
+ ABC
+No match
+ ABQ
No match
-/[Z\x{100}]/8
- Z\x{100}
- 0: Z
- \x{100}
- 0: \x{100}
- \x{100}Z
- 0: \x{100}
- *** Failers
+/ab{1,}bc/i
+
+/ab+bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,3}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{3,4}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{4,5}?bc/i
+ *** Failers
+No match
+ ABQ
+No match
+ ABBBBC
No match
-/[\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- *** Failers
-No match
-
-/[\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- *** Failers
-No match
-
-/[z-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Q\x{100}-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- Q?
- 0: Q
- *** Failers
-No match
-
-/[Qz-\x{200}]/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{111}cd
- 0: \x{111}
- abzcd
- 0: z
- ab|cd
- 0: |
- Q?
- 0: Q
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/[Q\x{100}\x{200}]{1,3}?/8
- ab\x{100}cd
- 0: \x{100}
- ab\x{200}cd
- 0: \x{200}
- ab\x{200}\x{100}\x{200}\x{100}cd
- 0: \x{200}\x{100}\x{200}
- 1: \x{200}\x{100}
- 2: \x{200}
- *** Failers
-No match
-
-/(?<=[\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
+/ab??bc/i
+ ABBC
+ 0: ABBC
+ ABC
+ 0: ABC
+
+/ab{0,1}?bc/i
+ ABC
+ 0: ABC
+
+/ab??bc/i
+
+/ab??c/i
+ ABC
+ 0: ABC
+
+/ab{0,1}?c/i
+ ABC
+ 0: ABC
+
+/^abc$/i
+ ABC
+ 0: ABC
*** Failers
No match
- X
+ ABBBBC
+No match
+ ABCC
No match
-/(?<=[Q\x{100}\x{200}])X/8
- abc\x{200}X
- 0: X
- abc\x{100}X
- 0: X
- abQX
- 0: X
+/^abc/i
+ ABCC
+ 0: ABC
+
+/^abc$/i
+
+/abc$/i
+ AABC
+ 0: ABC
+
+/^/i
+ ABC
+ 0:
+
+/$/i
+ ABC
+ 0:
+
+/a.c/i
+ ABC
+ 0: ABC
+ AXC
+ 0: AXC
+
+/a.*?c/i
+ AXYZC
+ 0: AXYZC
+
+/a.*c/i
*** Failers
No match
- X
+ AABC
+ 0: AABC
+ AXYZD
No match
-/(?<=[\x{100}\x{200}]{3})X/8
- abc\x{100}\x{200}\x{100}X
- 0: X
+/a[bc]d/i
+ ABD
+ 0: ABD
+
+/a[b-d]e/i
+ ACE
+ 0: ACE
*** Failers
No match
- abc\x{200}X
+ ABC
No match
- X
+ ABD
No match
-/[^\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
+/a[b-d]/i
+ AAC
+ 0: AC
+
+/a[-b]/i
+ A-
+ 0: A-
+
+/a[b-]/i
+ A-
+ 0: A-
+
+/a]/i
+ A]
+ 0: A]
+
+/a[]]b/i
+ A]B
+ 0: A]B
+
+/a[^bc]d/i
+ AED
+ 0: AED
+
+/a[^-b]c/i
+ ADC
+ 0: ADC
*** Failers
No match
- \x{100}X
+ ABD
No match
- \x{200}X
+ A-C
No match
-/[^Q\x{100}\x{200}]X/8
- AX
- 0: AX
- \x{150}X
- 0: \x{150}X
- \x{500}X
- 0: \x{500}X
+/a[^]b]c/i
+ ADC
+ 0: ADC
+
+/ab|cd/i
+ ABC
+ 0: AB
+ ABCD
+ 0: AB
+
+/()ef/i
+ DEF
+ 0: EF
+
+/$b/i
*** Failers
No match
- \x{100}X
+ A]C
No match
- \x{200}X
+ B
No match
- QX
+
+/a\(b/i
+ A(B
+ 0: A(B
+
+/a\(*b/i
+ AB
+ 0: AB
+ A((B
+ 0: A((B
+
+/a\\b/i
+ A\B
No match
-/[^\x{100}-\x{200}]X/8
- AX
- 0: AX
- \x{500}X
- 0: \x{500}X
+/((a))/i
+ ABC
+ 0: A
+
+/(a)b(c)/i
+ ABC
+ 0: ABC
+
+/a+b+c/i
+ AABBABC
+ 0: ABC
+
+/a{1,}b{1,}c/i
+ AABBABC
+ 0: ABC
+
+/a.+?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/a.*?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/a.{0,5}?c/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/(a+|b)*/i
+ AB
+ 0: AB
+ 1: A
+ 2:
+
+/(a+|b){0,}/i
+ AB
+ 0: AB
+ 1: A
+ 2:
+
+/(a+|b)+/i
+ AB
+ 0: AB
+ 1: A
+
+/(a+|b){1,}/i
+ AB
+ 0: AB
+ 1: A
+
+/(a+|b)?/i
+ AB
+ 0: A
+ 1:
+
+/(a+|b){0,1}/i
+ AB
+ 0: A
+ 1:
+
+/(a+|b){0,1}?/i
+ AB
+ 0: A
+ 1:
+
+/[^ab]*/i
+ CDE
+ 0: CDE
+ 1: CD
+ 2: C
+ 3:
+
+/abc/i
+
+/a*/i
+
+
+/([abc])*d/i
+ ABBBCD
+ 0: ABBBCD
+
+/([abc])*bcd/i
+ ABCD
+ 0: ABCD
+
+/a|b|c|d|e/i
+ E
+ 0: E
+
+/(a|b|c|d|e)f/i
+ EF
+ 0: EF
+
+/abcd*efg/i
+ ABCDEFG
+ 0: ABCDEFG
+
+/ab*/i
+ XABYABBBZ
+ 0: AB
+ 1: A
+ XAYABBBZ
+ 0: A
+
+/(ab|cd)e/i
+ ABCDE
+ 0: CDE
+
+/[abhgefdc]ij/i
+ HIJ
+ 0: HIJ
+
+/^(ab|cd)e/i
+ ABCDE
+No match
+
+/(abc|)ef/i
+ ABCDEF
+ 0: EF
+
+/(a|b)c*d/i
+ ABCD
+ 0: BCD
+
+/(ab|ab*)bc/i
+ ABC
+ 0: ABC
+
+/a([bc]*)c*/i
+ ABC
+ 0: ABC
+ 1: AB
+ 2: A
+
+/a([bc]*)(c*d)/i
+ ABCD
+ 0: ABCD
+
+/a([bc]+)(c*d)/i
+ ABCD
+ 0: ABCD
+
+/a([bc]*)(c+d)/i
+ ABCD
+ 0: ABCD
+
+/a[bcd]*dcdcde/i
+ ADCDCDE
+ 0: ADCDCDE
+
+/a[bcd]+dcdcde/i
+
+/(ab|a)b*c/i
+ ABC
+ 0: ABC
+
+/((a)(b)c)(d)/i
+ ABCD
+ 0: ABCD
+
+/[a-zA-Z_][a-zA-Z0-9_]*/i
+ ALPHA
+ 0: ALPHA
+ 1: ALPH
+ 2: ALP
+ 3: AL
+ 4: A
+
+/^a(bc+|b[eh])g|.h$/i
+ ABH
+ 0: BH
+
+/(bc+d$|ef*g.|h?i(j|k))/i
+ EFFGZ
+ 0: EFFGZ
+ IJ
+ 0: IJ
+ REFFGZ
+ 0: EFFGZ
*** Failers
No match
- \x{100}X
+ ADCDCDE
No match
- \x{150}X
+ EFFG
No match
- \x{200}X
+ BCDD
No match
-/[z-\x{100}]/8i
- z
- 0: z
- Z
- 0: Z
- \x{100}
- 0: \x{100}
+/((((((((((a))))))))))/i
+ A
+ 0: A
+
+/(((((((((a)))))))))/i
+ A
+ 0: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+ A
+ 0: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
+ C
+ 0: C
+
+/multiple words of text/i
*** Failers
No match
- \x{102}
+ AA
No match
- y
+ UH-UH
No match
-/[\xFF]/
- >\xff<
- 0: \xff
+/multiple words/i
+ MULTIPLE WORDS, YEAH
+ 0: MULTIPLE WORDS
-/[\xff]/8
- >\x{ff}<
- 0: \x{ff}
+/(.*)c(.*)/i
+ ABCDE
+ 0: ABCDE
+ 1: ABCD
+ 2: ABC
-/[^\xFF]/
- XYZ
- 0: X
+/\((.*), (.*)\)/i
+ (A, B)
+ 0: (A, B)
-/[^\xff]/8
- XYZ
- 0: X
- \x{123}
- 0: \x{123}
+/[k]/i
+
+/abcd/i
+ ABCD
+ 0: ABCD
+
+/a(bc)d/i
+ ABCD
+ 0: ABCD
+
+/a[-]?c/i
+ AC
+ 0: AC
+
+/a(?!b)./
+ abad
+ 0: ad
+
+/a(?=d)./
+ abad
+ 0: ad
+
+/a(?=c|d)./
+ abad
+ 0: ad
+
+/a(?:b|c|d)(.)/
+ ace
+ 0: ace
+
+/a(?:b|c|d)*(.)/
+ ace
+ 0: ace
+ 1: ac
+
+/a(?:b|c|d)+?(.)/
+ ace
+ 0: ace
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+ 2: acdbcd
+ 3: acdbc
+ 4: acdb
+ 5: acd
+
+/a(?:b|c|d)+(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+ 2: acdbcd
+ 3: acdbc
+ 4: acdb
+ 5: acd
+
+/a(?:b|c|d){2}(.)/
+ acdbcdbe
+ 0: acdb
+
+/a(?:b|c|d){4,5}(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: acdbcd
+
+/a(?:b|c|d){4,5}?(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: acdbcd
+
+/((foo)|(bar))*/
+ foobar
+ 0: foobar
+ 1: foo
+ 2:
+
+/a(?:b|c|d){6,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+
+/a(?:b|c|d){6,7}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+
+/a(?:b|c|d){5,6}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,6}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|c|d){5,7}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: acdbcdb
+
+/a(?:b|(c|e){1,2}?|d)+?(.)/
+ ace
+ 0: ace
+
+/^(.+)?B/
+ AB
+ 0: AB
+
+/^([^a-z])|(\^)$/
+ .
+ 0: .
+
+/^[<>]&/
+ <&OUT
+ 0: <&
+
+/(?:(f)(o)(o)|(b)(a)(r))*/
+ foobar
+ 0: foobar
+ 1: foo
+ 2:
+
+/(?<=a)b/
+ ab
+ 0: b
+ *** Failers
+No match
+ cb
+No match
+ b
+No match
+
+/(?<!c)b/
+ ab
+ 0: b
+ b
+ 0: b
+ b
+ 0: b
+
+/(?:..)*a/
+ aba
+ 0: aba
+ 1: a
+
+/(?:..)*?a/
+ aba
+ 0: aba
+ 1: a
+
+/^(){3,5}/
+ abc
+ 0:
+
+/^(a+)*ax/
+ aax
+ 0: aax
+
+/^((a|b)+)*ax/
+ aax
+ 0: aax
+
+/^((a|bc)+)*ax/
+ aax
+ 0: aax
+
+/(a|x)*ab/
+ cab
+ 0: ab
+
+/(a)*ab/
+ cab
+ 0: ab
+
+/(?:(?i)a)b/
+ ab
+ 0: ab
+
+/((?i)a)b/
+ ab
+ 0: ab
+
+/(?:(?i)a)b/
+ Ab
+ 0: Ab
+
+/((?i)a)b/
+ Ab
+ 0: Ab
+
+/(?:(?i)a)b/
+ *** Failers
+No match
+ cb
+No match
+ aB
+No match
+
+/((?i)a)b/
+
+/(?i:a)b/
+ ab
+ 0: ab
+
+/((?i:a))b/
+ ab
+ 0: ab
+
+/(?i:a)b/
+ Ab
+ 0: Ab
+
+/((?i:a))b/
+ Ab
+ 0: Ab
+
+/(?i:a)b/
+ *** Failers
+No match
+ aB
+No match
+ aB
+No match
+
+/((?i:a))b/
+
+/(?:(?-i)a)b/i
+ ab
+ 0: ab
+
+/((?-i)a)b/i
+ ab
+ 0: ab
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ aB
+ 0: aB
+ Ab
+No match
+
+/((?-i)a)b/i
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i)a)b/i
+
+/(?-i:a)b/i
+ ab
+ 0: ab
+
+/((?-i:a))b/i
+ ab
+ 0: ab
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+
+/(?-i:a)b/i
+ *** Failers
+No match
+ AB
+No match
+ Ab
+No match
+
+/((?-i:a))b/i
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+
+/(?-i:a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i:a))b/i
+
+/((?-i:a.))b/i
+ *** Failers
+No match
+ AB
+No match
+ a\nB
+No match
+
+/((?s-i:a.))b/i
+ a\nB
+ 0: a\x0aB
+
+/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
+ cabbbb
+ 0: cabbbb
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
+ caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+ 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+
+/foo\w*\d{4}baz/
+ foobar1234baz
+ 0: foobar1234baz
+
+/x(~~)*(?:(?:F)?)?/
+ x~~
+ 0: x~~
+ 1: x
-/^[ac]*b/8
- xb
+/^a(?#xxx){3}c/
+ aaac
+ 0: aaac
+
+/^a (?#xxx) (?#yyy) {3}c/x
+ aaac
+ 0: aaac
+
+/(?<![cd])b/
+ *** Failers
+No match
+ B\nB
+No match
+ dbcb
+No match
+
+/(?<![cd])[ab]/
+ dbaacb
+ 0: a
+
+/(?<!(c|d))b/
+
+/(?<!(c|d))[ab]/
+ dbaacb
+ 0: a
+
+/(?<!cd)[ab]/
+ cdaccb
+ 0: b
+
+/^(?:a?b?)*$/
+ *** Failers
+No match
+ dbcb
+No match
+ a--
+No match
+
+/((?s)^a(.))((?m)^b$)/
+ a\nb\nc\n
+ 0: a\x0ab
+
+/((?m)^b$)/
+ a\nb\nc\n
+ 0: b
+
+/(?m)^b/
+ a\nb\n
+ 0: b
+
+/(?m)^(b)/
+ a\nb\n
+ 0: b
+
+/((?m)^b)/
+ a\nb\n
+ 0: b
+
+/\n((?m)^b)/
+ a\nb\n
+ 0: \x0ab
+
+/((?s).)c(?!.)/
+ a\nb\nc\n
+ 0: \x0ac
+ a\nb\nc\n
+ 0: \x0ac
+
+/((?s)b.)c(?!.)/
+ a\nb\nc\n
+ 0: b\x0ac
+ a\nb\nc\n
+ 0: b\x0ac
+
+/^b/
+
+/()^b/
+ *** Failers
+No match
+ a\nb\nc\n
+No match
+ a\nb\nc\n
No match
-/^[ac\x{100}]*b/8
- xb
+/((?m)^b)/
+ a\nb\nc\n
+ 0: b
+
+/(?(?!a)a|b)/
+
+/(?(?!a)b|a)/
+ a
+ 0: a
+
+/(?(?=a)b|a)/
+ *** Failers
+No match
+ a
+No match
+ a
+No match
+
+/(?(?=a)a|b)/
+ a
+ 0: a
+
+/(\w+:)+/
+ one:
+ 0: one:
+
+/$(?<=^(a))/
+ a
+ 0:
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
+
+/(a*)b+/
+ caab
+ 0: aab
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+ *** Failers
+ 0: Failers
+ abcd:
+No match
+ abcd:
+No match
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
+
+/(>a+)ab/
+
+/(?>a+)b/
+ aaab
+ 0: aaab
+
+/([[:]+)/
+ a:[b]:
+ 0: :[
+ 1: :
+
+/([[=]+)/
+ a=[b]=
+ 0: =[
+ 1: =
+
+/([[.]+)/
+ a.[b].
+ 0: .[
+ 1: .
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: abc(ade)ufh()()
+ 2: abc(ade)ufh()
+ 3: abc(ade)ufh
+ 4: abc(ade)
+ 5: abc
+
+/a\Z/
+ *** Failers
+No match
+ aaab
+No match
+ a\nb\n
No match
-/^[^x]*b/8i
- xb
+/b\Z/
+ a\nb\n
+ 0: b
+
+/b\z/
+
+/b\Z/
+ a\nb
+ 0: b
+
+/b\z/
+ a\nb
+ 0: b
+ *** Failers
+No match
+
+/(?>.*)(?<=(abcd|wxyz))/
+ alphabetabcd
+ 0: alphabetabcd
+ endingwxyz
+ 0: endingwxyz
+ *** Failers
+No match
+ a rather long string that doesn't end with one of them
No match
-/^[^x]*b/8
- xb
+/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
No match
-/^\d*b/8
- xb
+/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
No match
-/(|a)/g8
- catac
+/(?<=\d{3}(?!999))foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=(?!...999)\d{3})foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=\d{3}(?!999)...)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
+No match
+
+/(?<=\d{3}...)(?<!999)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
+No match
+
+/((Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/(Z()|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/(Z(())|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/((?>Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: Z
+ 2:
+
+/((?>)+|A)*/
+ ZABCDEFG
0:
+
+/a*/g
+ abbab
0: a
1:
0:
+ 0:
0: a
1:
0:
0:
- a\x{256}a
+
+/^[a-\d]/
+ abcde
0: a
- 1:
- 0:
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/^[\d-a]/
+ abcde
0: a
- 1:
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/[[:space:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d\x0b
+ 1: \x09\x0a\x0c\x0d
+ 2: \x09\x0a\x0c
+ 3: \x09\x0a
+ 4: \x09
+ 5:
+
+/[[:blank:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09
+ 1:
+
+/[\s]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+ 1: \x09\x0a\x0c
+ 2: \x09\x0a
+ 3: \x09
+ 4:
+
+/\s+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+ 1: \x09\x0a\x0c
+ 2: \x09\x0a
+ 3: \x09
+ 4:
+
+/a b/x
+ ab
+No match
+
+/(?!\A)x/m
+ a\nxb\n
+ 0: x
+
+/(?!^)x/m
+ a\nxb\n
+No match
+
+/abc\Qabc\Eabc/
+ abcabcabc
+ 0: abcabcabc
+
+/abc\Q(*+|\Eabc/
+ abc(*+|abc
+ 0: abc(*+|abc
+
+/ abc\Q abc\Eabc/x
+ abc abcabc
+ 0: abc abcabc
+ *** Failers
+No match
+ abcabcabc
+No match
+
+/abc#comment
+ \Q#not comment
+ literal\E/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment
+ /x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/\Qabc\$xyz\E/
+ abc\\\$xyz
+ 0: abc\$xyz
+
+/\Qabc\E\$\Qxyz\E/
+ abc\$xyz
+ 0: abc$xyz
+
+/\Gabc/
+ abc
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+
+/\Gabc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+
+/abc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+ 0: abc3
+
+/a(?x: b c )d/
+ XabcdY
+ 0: abcd
+ *** Failers
+No match
+ Xa b c d Y
+No match
+
+/((?x)x y z | a b c)/
+ XabcY
+ 0: abc
+ AxyzB
+ 0: xyz
+
+/(?i)AB(?-i)C/
+ XabCY
+ 0: abC
+ *** Failers
+No match
+ XabcY
+No match
+
+/((?i)AB(?-i)C|D)E/
+ abCE
+ 0: abCE
+ DE
+ 0: DE
+ *** Failers
+No match
+ abcE
+No match
+ abCe
+No match
+ dE
+No match
+ De
+No match
+
+/[z\Qa-d]\E]/
+ z
+ 0: z
+ a
+ 0: a
+ -
+ 0: -
+ d
+ 0: d
+ ]
+ 0: ]
+ *** Failers
+ 0: a
+ b
+No match
+
+/[\z\C]/
+ z
+ 0: z
+ C
+ 0: C
+
+/\M/
+ M
+ 0: M
+
+/(a+)*b/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/(?i)reg(?:ul(?:[a�]|ae)r|ex)/
+ REGular
+ 0: REGular
+ regulaer
+ 0: regulaer
+ Regex
+ 0: Regex
+ regul�r
+ 0: regul\xe4r
+
+/����[�-��-�]+/
+ �����
+ 0: \xc5\xe6\xe5\xe4\xe0
+ �����
+ 0: \xc5\xe6\xe5\xe4\xff
+ �����
+ 0: \xc5\xe6\xe5\xe4\xc0
+ �����
+ 0: \xc5\xe6\xe5\xe4\xdf
+
+/(?<=Z)X./
+ \x84XAZXB
+ 0: XB
+
+/^(?(2)a|(1)(2))+$/
+ 123a
+Error -17 (backreference condition or recursion test not supported for DFA matching)
+
+/(?<=a|bbbb)c/
+ ac
+ 0: c
+ bbbbc
+ 0: c
+
+/abc/SS>testsavedregex
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+No study data
+ abc
+ 0: abc
+ *** Failers
+No match
+ bca
+No match
+
+/abc/FSS>testsavedregex
+Compiled pattern written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+No study data
+ abc
+ 0: abc
+ *** Failers
+No match
+ bca
+No match
+
+/(a|b)/S>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ *** Failers
+ 0: a
+ def
+No match
+
+/(a|b)/SF>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled pattern (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+ abc
+ 0: a
+ *** Failers
+ 0: a
+ def
+No match
+
+/line\nbreak/
+ this is a line\nbreak
+ 0: line\x0abreak
+ line one\nthis is a line\nbreak in the second line
+ 0: line\x0abreak
+
+/line\nbreak/f
+ this is a line\nbreak
+ 0: line\x0abreak
+ ** Failers
+No match
+ line one\nthis is a line\nbreak in the second line
+No match
+
+/line\nbreak/mf
+ this is a line\nbreak
+ 0: line\x0abreak
+ ** Failers
+No match
+ line one\nthis is a line\nbreak in the second line
+No match
+
+/1234/
+ 123\P
+Partial match: 123
+ a4\P\R
+No match
+
+/1234/
+ 123\P
+Partial match: 123
+ 4\P\R
+ 0: 4
+
+/^/mg
+ a\nb\nc\n
+ 0:
+ 0:
0:
+ \
+ 0:
+
+/(?<=C\n)^/mg
+ A\nC\nC\n
+ 0:
+
+/(?s)A?B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?s)A*B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?m)A?B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/(?m)A*B/
+ AB
+ 0: AB
+ aB
+ 0: B
+
+/Content-Type\x3A[^\r\n]{6,}/
+ Content-Type:xxxxxyyy
+ 0: Content-Type:xxxxxyyy
+ 1: Content-Type:xxxxxyy
+ 2: Content-Type:xxxxxy
+
+/Content-Type\x3A[^\r\n]{6,}z/
+ Content-Type:xxxxxyyyz
+ 0: Content-Type:xxxxxyyyz
+
+/Content-Type\x3A[^a]{6,}/
+ Content-Type:xxxyyy
+ 0: Content-Type:xxxyyy
+
+/Content-Type\x3A[^a]{6,}z/
+ Content-Type:xxxyyyz
+ 0: Content-Type:xxxyyyz
+
+/^abc/m
+ xyz\nabc
+ 0: abc
+ xyz\nabc\<lf>
+ 0: abc
+ xyz\r\nabc\<lf>
+ 0: abc
+ xyz\rabc\<cr>
+ 0: abc
+ xyz\r\nabc\<crlf>
+ 0: abc
+ ** Failers
+No match
+ xyz\nabc\<cr>
+No match
+ xyz\r\nabc\<cr>
+No match
+ xyz\nabc\<crlf>
+No match
+ xyz\rabc\<crlf>
+No match
+ xyz\rabc\<lf>
+No match
+
+/abc$/m<lf>
+ xyzabc
+ 0: abc
+ xyzabc\n
+ 0: abc
+ xyzabc\npqr
+ 0: abc
+ xyzabc\r\<cr>
+ 0: abc
+ xyzabc\rpqr\<cr>
+ 0: abc
+ xyzabc\r\n\<crlf>
+ 0: abc
+ xyzabc\r\npqr\<crlf>
+ 0: abc
+ ** Failers
+No match
+ xyzabc\r
+No match
+ xyzabc\rpqr
+No match
+ xyzabc\r\n
+No match
+ xyzabc\r\npqr
+No match
+
+/^abc/m<cr>
+ xyz\rabcdef
+ 0: abc
+ xyz\nabcdef\<lf>
+ 0: abc
+ ** Failers
+No match
+ xyz\nabcdef
+No match
+
+/^abc/m<lf>
+ xyz\nabcdef
+ 0: abc
+ xyz\rabcdef\<cr>
+ 0: abc
+ ** Failers
+No match
+ xyz\rabcdef
+No match
+
+/^abc/m<crlf>
+ xyz\r\nabcdef
+ 0: abc
+ xyz\rabcdef\<cr>
+ 0: abc
+ ** Failers
+No match
+ xyz\rabcdef
+No match
+
+/.*/<lf>
+ abc\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ abc\rdef
+ 0: abc\x0ddef
+ 1: abc\x0dde
+ 2: abc\x0dd
+ 3: abc\x0d
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ abc\r\ndef
+ 0: abc\x0d
+ 1: abc
+ 2: ab
+ 3: a
+ 4:
+ \<cr>abc\ndef
+ 0: abc\x0adef
+ 1: abc\x0ade
+ 2: abc\x0ad
+ 3: abc\x0a
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<cr>abc\rdef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ \<cr>abc\r\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+ \<crlf>abc\ndef
+ 0: abc\x0adef
+ 1: abc\x0ade
+ 2: abc\x0ad
+ 3: abc\x0a
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<crlf>abc\rdef
+ 0: abc\x0ddef
+ 1: abc\x0dde
+ 2: abc\x0dd
+ 3: abc\x0d
+ 4: abc
+ 5: ab
+ 6: a
+ 7:
+ \<crlf>abc\r\ndef
+ 0: abc
+ 1: ab
+ 2: a
+ 3:
+
+/\w+(.)(.)?def/s
+ abc\ndef
+ 0: abc\x0adef
+ abc\rdef
+ 0: abc\x0ddef
+ abc\r\ndef
+ 0: abc\x0d\x0adef
-/^\x{85}$/8i
- \x{85}
- 0: \x{85}
+/^\w+=.*(\\\n.*)*/
+ abc=xyz\\\npqr
+ 0: abc=xyz\\x0apqr
+ 1: abc=xyz\\x0apq
+ 2: abc=xyz\\x0ap
+ 3: abc=xyz\\x0a
+ 4: abc=xyz\
+ 5: abc=xyz
+ 6: abc=xy
+ 7: abc=x
+ 8: abc=
+
+/^(a()*)*/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/^(?:a(?:(?:))*)*/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+ 4:
+
+/^(a()+)+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/^(?:a(?:(?:))+)+/
+ aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/(a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/(?>a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
-/^abc./mgx8<any>
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+/(?:a|)*\d/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
+
+/^a.b/<lf>
+ a\rb
+ 0: a\x0db
+ a\nb\<cr>
+ 0: a\x0ab
+ ** Failers
+No match
+ a\nb
+No match
+ a\nb\<any>
+No match
+ a\rb\<cr>
+No match
+ a\rb\<any>
+No match
+
+/^abc./mgx<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
0: abc1
0: abc2
0: abc3
@@ -1037,100 +6815,92 @@ No match
0: abc5
0: abc6
0: abc7
- 0: abc8
- 0: abc9
-/abc.$/mgx8<any>
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+/abc.$/mgx<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
0: abc1
0: abc2
0: abc3
0: abc4
0: abc5
0: abc6
- 0: abc7
- 0: abc8
0: abc9
-/^a\Rb/8<bsr_unicode>
+/^a\Rb/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
a\x0cb
- 0: a\x{0c}b
- a\x{85}b
- 0: a\x{85}b
- a\x{2028}b
- 0: a\x{2028}b
- a\x{2029}b
- 0: a\x{2029}b
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
** Failers
No match
a\n\rb
No match
-/^a\R*b/8<bsr_unicode>
+/^a\R*b/<bsr_unicode>
ab
0: ab
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0bb
+ a\x0cb
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ 0: a\x0a\x0db
+ a\n\r\x85\x0cb
+ 0: a\x0a\x0d\x85\x0cb
-/^a\R+b/8<bsr_unicode>
+/^a\R+b/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
a\x0bb
- 0: a\x{0b}b
- a\x0c\x{2028}\x{2029}b
- 0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0bb
+ a\x0cb
+ 0: a\x0cb
+ a\x85b
+ 0: a\x85b
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
- 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+ 0: a\x0a\x0db
+ a\n\r\x85\x0cb
+ 0: a\x0a\x0d\x85\x0cb
** Failers
No match
ab
No match
-
-/^a\R{1,3}b/8<bsr_unicode>
+
+/^a\R{1,3}b/<bsr_unicode>
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\n\rb
- 0: a\x{0a}\x{0d}b
- a\n\r\x{85}b
- 0: a\x{0a}\x{0d}\x{85}b
+ 0: a\x0a\x0db
+ a\n\r\x85b
+ 0: a\x0a\x0d\x85b
a\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0d\x0a\x0d\x0ab
a\r\n\r\n\r\nb
- 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
a\n\r\n\rb
- 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
+ 0: a\x0a\x0d\x0a\x0db
a\n\n\r\nb
- 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
+ 0: a\x0a\x0a\x0d\x0ab
** Failers
No match
a\n\n\n\rb
@@ -1138,150 +6908,1116 @@ No match
a\r
No match
-/\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
+/^a[\R]b/<bsr_unicode>
+ aRb
+ 0: aRb
+ ** Failers
+No match
+ a\nb
+No match
-/\V?\v{3,4}/8
- \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: X\x{0a}\x{0b}\x{0c}
+/.+foo/
+ afoo
+ 0: afoo
+ ** Failers
+No match
+ \r\nfoo
+No match
+ \nfoo
+No match
-/\h+\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
+/.+foo/<crlf>
+ afoo
+ 0: afoo
+ \nfoo
+ 0: \x0afoo
+ ** Failers
+No match
+ \r\nfoo
+No match
+
+/.+foo/<any>
+ afoo
+ 0: afoo
+ ** Failers
+No match
+ \nfoo
+No match
+ \r\nfoo
+No match
-/\V?\v{3,4}/8
- >\x09\x20\x{a0}X\x0a\x0a\x0a<
- 0: X\x{0a}\x{0a}\x{0a}
+/.+foo/s
+ afoo
+ 0: afoo
+ \r\nfoo
+ 0: \x0d\x0afoo
+ \nfoo
+ 0: \x0afoo
-/\H\h\V\v/8
+/^$/mg<any>
+ abc\r\rxyz
+ 0:
+ abc\n\rxyz
+ 0:
+ ** Failers
+No match
+ abc\r\nxyz
+No match
+
+/^X/m
+ XABC
+ 0: X
+ ** Failers
+No match
+ XABC\B
+No match
+
+/(?m)^$/<any>g+
+ abc\r\n\r\n
+ 0:
+ 0+ \x0d\x0a
+
+/(?m)^$|^\r\n/<any>g+
+ abc\r\n\r\n
+ 0: \x0d\x0a
+ 0+
+ 1:
+
+/(?m)$/<any>g+
+ abc\r\n\r\n
+ 0:
+ 0+ \x0d\x0a\x0d\x0a
+ 0:
+ 0+ \x0d\x0a
+ 0:
+ 0+
+
+/(?|(abc)|(xyz))/
+ >abc<
+ 0: abc
+ >xyz<
+ 0: xyz
+
+/(x)(?|(abc)|(xyz))(x)/
+ xabcx
+ 0: xabcx
+ xxyzx
+ 0: xxyzx
+
+/(x)(?|(abc)(pqr)|(xyz))(x)/
+ xabcpqrx
+ 0: xabcpqrx
+ xxyzx
+ 0: xxyzx
+
+/(?|(abc)|(xyz))(?1)/
+ abcabc
+ 0: abcabc
+ xyzabc
+ 0: xyzabc
+ ** Failers
+No match
+ xyzxyz
+No match
+
+/\H\h\V\v/
X X\x0a
- 0: X X\x{0a}
+ 0: X X\x0a
X\x09X\x0b
- 0: X\x{09}X\x{0b}
+ 0: X\x09X\x0b
** Failers
No match
- \x{a0} X\x0a
+ \xa0 X\x0a
No match
-/\H*\h+\V?\v{3,4}/8
- \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
- 1: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
- \x09\x20\x{a0}\x0a\x0b\x0c
- 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+/\H*\h+\V?\v{3,4}/
+ \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0X\x0a\x0b\x0c\x0d
+ 1: \x09 \xa0X\x0a\x0b\x0c
+ \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
+ 0: \x09 \xa0\x0a\x0b\x0c\x0d
+ 1: \x09 \xa0\x0a\x0b\x0c
+ \x09\x20\xa0\x0a\x0b\x0c
+ 0: \x09 \xa0\x0a\x0b\x0c
** Failers
No match
- \x09\x20\x{a0}\x0a\x0b
+ \x09\x20\xa0\x0a\x0b
No match
-/\H\h\V\v/8
- \x{3001}\x{3000}\x{2030}\x{2028}
- 0: \x{3001}\x{3000}\x{2030}\x{2028}
- X\x{180e}X\x{85}
- 0: X\x{180e}X\x{85}
+/\H{3,4}/
+ XY ABCDE
+ 0: ABCD
+ 1: ABC
+ XY PQR ST
+ 0: PQR
+
+/.\h{3,4}./
+ XY AB PQRS
+ 0: B P
+ 1: B
+
+/\h*X\h?\H+Y\H?Z/
+ >XNNNYZ
+ 0: XNNNYZ
+ > X NYQZ
+ 0: X NYQZ
** Failers
No match
- \x{2009} X\x0a
+ >XYZ
No match
-
-/\H*\h+\V?\v{3,4}/8
- \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
- 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
- 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}
- \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
- 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
- 1: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}
- \x09\x20\x{202f}\x0a\x0b\x0c
- 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
- ** Failers
+ > X NY Z
No match
- \x09\x{200a}\x{a0}\x{2028}\x0b
+
+/\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
+ >XY\x0aZ\x0aA\x0bNN\x0c
+ 0: XY\x0aZ\x0aA\x0bNN\x0c
+ >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+ 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
+
+/.+A/<crlf>
+ \r\nA
No match
-
-/a\Rb/I8<bsr_anycrlf>
+
+/\nA/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/[\r\n]A/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/(\r|\n)A/<crlf>
+ \r\nA
+ 0: \x0aA
+
+/a\Rb/I<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
** Failers
No match
- a\x{85}b
+ a\x85b
No match
a\x0bb
No match
-/a\Rb/I8<bsr_unicode>
+/a\Rb/I<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
** Failers
No match
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
No match
a\x0bb\<bsr_anycrlf>
No match
-/a\R?b/I8<bsr_anycrlf>
+/a\R?b/I<bsr_anycrlf>
Capturing subpattern count = 0
-Options: bsr_anycrlf utf8
+Options: bsr_anycrlf
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
+ 0: a\x0d\x0ab
** Failers
No match
- a\x{85}b
+ a\x85b
No match
a\x0bb
No match
-/a\R?b/I8<bsr_unicode>
+/a\R?b/I<bsr_unicode>
Capturing subpattern count = 0
-Options: bsr_unicode utf8
+Options: bsr_unicode
First char = 'a'
Need char = 'b'
a\rb
- 0: a\x{0d}b
+ 0: a\x0db
a\nb
- 0: a\x{0a}b
+ 0: a\x0ab
a\r\nb
- 0: a\x{0d}\x{0a}b
- a\x{85}b
- 0: a\x{85}b
+ 0: a\x0d\x0ab
+ a\x85b
+ 0: a\x85b
a\x0bb
- 0: a\x{0b}b
+ 0: a\x0bb
** Failers
No match
- a\x{85}b\<bsr_anycrlf>
+ a\x85b\<bsr_anycrlf>
No match
a\x0bb\<bsr_anycrlf>
No match
+
+/a\R{2,4}b/I<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf
+First char = 'a'
+Need char = 'b'
+ a\r\n\nb
+ 0: a\x0d\x0a\x0ab
+ a\n\r\rb
+ 0: a\x0a\x0d\x0db
+ a\r\n\r\n\r\n\r\nb
+ 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
+ ** Failers
+No match
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+
+/a\R{2,4}b/I<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode
+First char = 'a'
+Need char = 'b'
+ a\r\rb
+ 0: a\x0d\x0db
+ a\n\n\nb
+ 0: a\x0a\x0a\x0ab
+ a\r\n\n\r\rb
+ 0: a\x0d\x0a\x0a\x0d\x0db
+ a\x85\85b
+No match
+ a\x0b\0bb
+No match
+ ** Failers
+No match
+ a\r\r\r\r\rb
+No match
+ a\x85\85b\<bsr_anycrlf>
+No match
+ a\x0b\0bb\<bsr_anycrlf>
+No match
+
+/a(?!)|\wbc/
+ abc
+ 0: abc
+
+/a[]b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[]*+b/<JS>
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]b/<JS>
+ aXb
+ 0: aXb
+ a\nb
+ 0: a\x0ab
+ ** Failers
+No match
+ ab
+No match
+
+/a[^]+b/<JS>
+ aXb
+ 0: aXb
+ a\nX\nXb
+ 0: a\x0aX\x0aXb
+ ** Failers
+No match
+ ab
+No match
+
+/X$/E
+ X
+ 0: X
+ ** Failers
+No match
+ X\n
+No match
+
+/X$/
+ X
+ 0: X
+ X\n
+ 0: X
+
+/xyz/C
+ xyz
+--->xyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ abcxyz\Y
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
+ ** Failers
+No match
+ abc
+No match
+ abc\Y
+--->abc
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+ abcxypqr
+No match
+ abcxypqr\Y
+--->abcxypqr
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
+
+/(?C)ab/
+ ab
+--->ab
+ 0 ^ a
+ 0: ab
+ \C-ab
+ 0: ab
+
+/ab/C
+ ab
+--->ab
+ +0 ^ a
+ +1 ^^ b
+ +2 ^ ^
+ 0: ab
+ \C-ab
+ 0: ab
+
+/^"((?(?=[a])[^"])|b)*"$/C
+ "ab"
+--->"ab"
+ +0 ^ ^
+ +1 ^ "
+ +2 ^^ ((?(?=[a])[^"])|b)*
++21 ^^ "
+ +3 ^^ (?(?=[a])[^"])
++18 ^^ b
+ +5 ^^ (?=[a])
+ +8 ^ [a]
++11 ^^ )
++12 ^^ [^"]
++16 ^ ^ )
++17 ^ ^ |
++21 ^ ^ "
+ +3 ^ ^ (?(?=[a])[^"])
++18 ^ ^ b
+ +5 ^ ^ (?=[a])
+ +8 ^ [a]
++19 ^ ^ )
++21 ^ ^ "
+ +3 ^ ^ (?(?=[a])[^"])
++18 ^ ^ b
+ +5 ^ ^ (?=[a])
+ +8 ^ [a]
++17 ^ ^ |
++22 ^ ^ $
++23 ^ ^
+ 0: "ab"
+ \C-"ab"
+ 0: "ab"
+
+/\d+X|9+Y/
+ ++++123999\P
+Partial match: 123999
+ ++++123999Y\P
+ 0: 999Y
+
+/Z(*F)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/Z(?!)/
+ Z\P
+No match
+ ZA\P
+No match
+
+/dog(sbody)?/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dog(sbody)??/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/dog|dogsbody/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
-/ End of testinput 8 /
+/dogsbody|dog/
+ dogs\P
+ 0: dog
+ dogs\P\P
+Partial match: dogs
+
+/Z(*F)Q|ZXY/
+ Z\P
+Partial match: Z
+ ZA\P
+No match
+ X\P
+No match
+
+/\bthe cat\b/
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/dog(sbody)?/
+ dogs\D\P
+ 0: dog
+ body\D\R
+ 0: body
+
+/dog(sbody)?/
+ dogs\D\P\P
+Partial match: dogs
+ body\D\R
+ 0: body
+
+/abc/
+ abc\P
+ 0: abc
+ abc\P\P
+ 0: abc
+
+/abc\K123/
+ xyzabc123pqr
+Error -16 (item unsupported for DFA matching)
+
+/(?<=abc)123/
+ xyzabc123pqr
+ 0: 123
+ xyzabc12\P
+Partial match at offset 6: abc12
+ xyzabc12\P\P
+Partial match at offset 6: abc12
+
+/\babc\b/
+ +++abc+++
+ 0: abc
+ +++ab\P
+Partial match at offset 3: +ab
+ +++ab\P\P
+Partial match at offset 3: +ab
+
+/(?=C)/g+
+ ABCDECBA
+ 0:
+ 0+ CDECBA
+ 0:
+ 0+ CBA
+
+/(abc|def|xyz)/I
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+ terhjk;abcdaadsfe
+ 0: abc
+ the quick xyz brown fox
+ 0: xyz
+ \Yterhjk;abcdaadsfe
+ 0: abc
+ \Ythe quick xyz brown fox
+ 0: xyz
+ ** Failers
+No match
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+
+/(abc|def|xyz)/SI
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Subject length lower bound = 3
+Starting byte set: a d x
+ terhjk;abcdaadsfe
+ 0: abc
+ the quick xyz brown fox
+ 0: xyz
+ \Yterhjk;abcdaadsfe
+ 0: abc
+ \Ythe quick xyz brown fox
+ 0: xyz
+ ** Failers
+No match
+ thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+ \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
+No match
+
+/abcd*/+
+ xxxxabcd\P
+ 0: abcd
+ 0+
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
+ dddxxx\R
+ 0: ddd
+ 0+ xxx
+ 1: dd
+ 2: d
+ 3:
+ xxxxabcd\P\P
+Partial match: abcd
+ xxx\R
+ 0:
+ 0+ xxx
+
+/abcd*/i
+ xxxxabcd\P
+ 0: abcd
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
+ XXXXABCD\P
+ 0: ABCD
+ 1: ABC
+ XXXXABCD\P\P
+Partial match: ABCD
+
+/abc\d*/
+ xxxxabc1\P
+ 0: abc1
+ 1: abc
+ xxxxabc1\P\P
+Partial match: abc1
+
+/abc[de]*/
+ xxxxabcde\P
+ 0: abcde
+ 1: abcd
+ 2: abc
+ xxxxabcde\P\P
+Partial match: abcde
+
+/(?:(?1)|B)(A(*F)|C)/
+ ABCD
+ 0: BC
+ CCD
+ 0: CC
+ ** Failers
+No match
+ CAD
+No match
+
+/^(?:(?1)|B)(A(*F)|C)/
+ CCD
+ 0: CC
+ BCD
+ 0: BC
+ ** Failers
+No match
+ ABCD
+No match
+ CAD
+No match
+ BAD
+No match
+
+/^(?!a(*SKIP)b)/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*SKIP)b|ac)/
+ ** Failers
+No match
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*THEN)b|ac)/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?=a(*PRUNE)b)/
+ ab
+Error -16 (item unsupported for DFA matching)
+ ** Failers
+No match
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/^(?(?!a(*SKIP)b))/
+ ac
+Error -16 (item unsupported for DFA matching)
+
+/(?<=abc)def/
+ abc\P\P
+Partial match at offset 3: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ 1: ab
+ 2: a
+ abc\>1
+ 0: bc
+ 1: b
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24 (bad offset value)
+ abc\>-4
+Error -24 (bad offset value)
+
+/^(?:a)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/^(?:aa|(?:a)++\w)/
+ aaaab
+ 0: aaaab
+ 1: aa
+ aaaa
+ 0: aa
+ ** Failers
+No match
+ bbb
+No match
+
+/^(?:a)*+\w/
+ aaaab
+ 0: aaaab
+ bbb
+ 0: b
+ ** Failers
+No match
+ aaaa
+No match
+
+/^(a)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/^(a|)++\w/
+ aaaab
+ 0: aaaab
+ ** Failers
+No match
+ aaaa
+No match
+ bbb
+No match
+
+/(?=abc){3}abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)+abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc)++abc/+
+ abcabcabc
+ 0: abc
+ 0+ abcabc
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=abc){0}xyz/
+ xyz
+ 0: xyz
+
+/(?=abc){1}xyz/
+ ** Failers
+No match
+ xyz
+No match
+
+/(?=(a))?./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/(?=(a))??./
+ ab
+ 0: a
+ bc
+ 0: b
+
+/^(?=(a)){0}b(?1)/
+ backgammon
+ 0: ba
+
+/^(?=(?1))?[az]([abc])d/
+ abd
+ 0: abd
+ zcdxx
+ 0: zcd
+
+/^(?!a){0}\w+/
+ aaaaa
+ 0: aaaaa
+ 1: aaaa
+ 2: aaa
+ 3: aa
+ 4: a
+
+/(?<=(abc))?xyz/
+ abcxyz
+ 0: xyz
+ pqrxyz
+ 0: xyz
+
+/((?2))((?1))/
+ abc
+Error -26 (nested recursion at the same subject position)
+
+/(?(R)a+|(?R)b)/
+ aaaabcde
+ 0: aaaab
+
+/(?(R)a+|((?R))b)/
+ aaaabcde
+ 0: aaaab
+
+/((?(R)a+|(?1)b))/
+ aaaabcde
+ 0: aaaab
+
+/((?(R2)a+|(?1)b))/
+ aaaabcde
+Error -17 (backreference condition or recursion test not supported for DFA matching)
+
+/(?(R)a*(?1)|((?R))b)/
+ aaaabcde
+Error -26 (nested recursion at the same subject position)
+
+/(a+)/
+ \O6aaaa
+Matched, but offsets vector is too small to show all matches
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ \O8aaaa
+ 0: aaaa
+ 1: aaa
+ 2: aa
+ 3: a
+
+/ab\Cde/
+ abXde
+ 0: abXde
+
+/(?<=ab\Cde)X/
+ abZdeX
+ 0: X
+
+/^\R/
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/^\R{2,3}x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R{2,3}?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+Partial match: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+Partial match: \x0d\x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+ \r\rx
+ 0: \x0d\x0dx
+ \r\r\rx
+ 0: \x0d\x0d\x0dx
+
+/^\R?x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ x
+ 0: x
+ \rx
+ 0: \x0dx
+
+/^\R+x/
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\n\P
+Partial match: \x0d\x0a
+ \r\n\P\P
+Partial match: \x0d\x0a
+ \rx
+ 0: \x0dx
+
+/^a$/<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^a$/m<CRLF>
+ a\r\P
+Partial match: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/<CRLF>
+ a\r\P
+ 0: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/^(a$|a\r)/m<CRLF>
+ a\r\P
+ 0: a\x0d
+ a\r\P\P
+Partial match: a\x0d
+
+/./<CRLF>
+ \r\P
+ 0: \x0d
+ \r\P\P
+Partial match: \x0d
+
+/.{2,3}/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ 1: \x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/.{2,3}?/<CRLF>
+ \r\P
+Partial match: \x0d
+ \r\P\P
+Partial match: \x0d
+ \r\r\P
+ 0: \x0d\x0d
+ \r\r\P\P
+Partial match: \x0d\x0d
+ \r\r\r\P
+ 0: \x0d\x0d\x0d
+ 1: \x0d\x0d
+ \r\r\r\P\P
+Partial match: \x0d\x0d\x0d
+
+/-- Test simple validity check for restarts --/
+
+/abcdef/
+ abc\R
+Error -30 (invalid data in workspace for DFA restart)
+
+/<H((?(?!<H|F>)(.)|(?R))++)*F>/
+ text <H more text <H texting more hexA0-"\xA0" hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
+ 0: <H more text <H texting more hexA0-"\xa0" hex above 7F-"\xbc" F> text xxxxx <H text F> text F>
+
+/^(?>.{4})abc|^\w\w.xabcd/
+ xxxxabcd
+ 0: xxxxabcd
+ 1: xxxxabc
+ xx\xa0xabcd
+ 0: xx\xa0xabcd
+ 1: xx\xa0xabc
+
+/^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
+ xxxxxxxxabcd
+ 0: xxxxxxxxabcd
+ 1: xxxxxxxxabc
+ xx\xa0xxxxxabcd
+ 0: xx\xa0xxxxxabcd
+ 1: xx\xa0xxxxxabc
+
+/abcd/
+ abcd\O0
+Matched, but offsets vector is too small to show all matches
+
+/-- End of testinput8 --/
diff --git a/lib/stdlib/test/re_SUITE_data/testoutput9 b/lib/stdlib/test/re_SUITE_data/testoutput9
index acaeb398dd..0bb101ad61 100644
--- a/lib/stdlib/test/re_SUITE_data/testoutput9
+++ b/lib/stdlib/test/re_SUITE_data/testoutput9
@@ -1,1643 +1,1371 @@
-/\pL\P{Nd}/8
- AB
- 0: AB
- *** Failers
- 0: Fa
- A0
+/-- This set of tests checks UTF-8 support with the DFA matching functionality
+ of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running
+ it. --/
+
+/\x{100}ab/8
+ \x{100}ab
+ 0: \x{100}ab
+
+/a\x{100}*b/8
+ ab
+ 0: ab
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+
+/a\x{100}+b/8
+ a\x{100}b
+ 0: a\x{100}b
+ a\x{100}\x{100}b
+ 0: a\x{100}\x{100}b
+ *** Failers
No match
- 00
+ ab
No match
-
-/\X./8
- AB
- 0: AB
- A\x{300}BC
- 0: A\x{300}B
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
- *** Failers
- 0: **
- \x{300}
+
+/\bX/8
+ Xoanon
+ 0: X
+ +Xoanon
+ 0: X
+ \x{300}Xoanon
+ 0: X
+ *** Failers
No match
-
-/\X\X/8
- ABC
- 0: AB
- A\x{300}B\x{300}\x{301}C
- 0: A\x{300}B\x{300}\x{301}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}B
+ YXoanon
+No match
+
+/\BX/8
+ YXoanon
+ 0: X
*** Failers
- 0: **
- \x{300}
No match
-
-/^\pL+/8
- abcd
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- a
- 0: a
- *** Failers
+ Xoanon
No match
-
-/^\PL+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- =
- 0: =
- *** Failers
- 0: ***
- 1: ***
- 2: **
- 3: *
- abcd
+ +Xoanon
+No match
+ \x{300}Xoanon
No match
-/^\X+/8
- abcdA\x{300}\x{301}\x{302}
- 0: abcdA\x{300}\x{301}\x{302}
- 1: abcd
- 2: abc
- 3: ab
- 4: a
- A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}
- 1: A\x{300}\x{301}\x{302}
- a
- 0: a
+/X\b/8
+ X+oanon
+ 0: X
+ ZX\x{300}oanon
+ 0: X
+ FAX
+ 0: X
*** Failers
- 0: *** Failers
- 1: *** Failer
- 2: *** Faile
- 3: *** Fail
- 4: *** Fai
- 5: *** Fa
- 6: *** F
- 7: ***
- 8: ***
- 9: **
-10: *
- \x{300}\x{301}\x{302}
No match
-
-/\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
+ Xoanon
No match
-
-/^\X?abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
+
+/X\B/8
+ Xoanon
+ 0: X
*** Failers
No match
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
+ X+oanon
No match
- \x{300}abc
+ ZX\x{300}oanon
No match
-
-/\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
- \x{300}abc
- 0: abc
- *** Failers
+ FAX
No match
+
+/[^a]/8
+ abcd
+ 0: b
+ a\x{100}
+ 0: \x{100}
-/^\X*abc/8
- abc
- 0: abc
- A\x{300}abc
- 0: A\x{300}abc
- A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abcxyz
- 0: A\x{300}\x{301}\x{302}A\x{300}A\x{300}A\x{300}abc
+/^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8
+ ab99
+ 0: ab9
+ \x{123}\x{123}45
+ 0: \x{123}\x{123}4
+ \x{400}\x{401}\x{402}6
+ 0: \x{400}\x{401}\x{402}6
*** Failers
No match
- \x{300}abc
+ d99
No match
-
-/^\pL?=./8
- A=b
- 0: A=b
- =c
- 0: =c
- *** Failers
+ \x{123}\x{122}4
No match
- 1=2
+ \x{400}\x{403}6
No match
- AAAA=b
+ \x{400}\x{401}\x{402}\x{402}6
No match
-/^\pL*=./8
- AAAA=b
- 0: AAAA=b
- =c
- 0: =c
+/a.b/8
+ acb
+ 0: acb
+ a\x7fb
+ 0: a\x{7f}b
+ a\x{100}b
+ 0: a\x{100}b
*** Failers
No match
- 1=2
+ a\nb
No match
-/^\X{2,3}X/8
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
- 0: A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+/a(.{3})b/8
+ a\x{4000}xyb
+ 0: a\x{4000}xyb
+ a\x{4000}\x7fyb
+ 0: a\x{4000}\x{7f}yb
+ a\x{4000}\x{100}yb
+ 0: a\x{4000}\x{100}yb
*** Failers
No match
- X
+ a\x{4000}b
+No match
+ ac\ncb
+No match
+
+/a(.*?)(.)/
+ a\xc0\x88b
+ 0: a\xc0\x88b
+ 1: a\xc0\x88
+ 2: a\xc0
+
+/a(.*?)(.)/8
+ a\x{100}b
+ 0: a\x{100}b
+ 1: a\x{100}
+
+/a(.*)(.)/
+ a\xc0\x88b
+ 0: a\xc0\x88b
+ 1: a\xc0\x88
+ 2: a\xc0
+
+/a(.*)(.)/8
+ a\x{100}b
+ 0: a\x{100}b
+ 1: a\x{100}
+
+/a(.)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+
+/a(.)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+
+/a(.?)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: a\xc0
+
+/a(.?)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: a\x{240}
+
+/a(.??)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: a\xc0
+
+/a(.??)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: a\x{240}
+
+/a(.{3})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ *** Failers
No match
- A\x{300}\x{301}\x{302}X
+ a\x{1234}b
No match
- A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}A\x{300}\x{301}\x{302}X
+ ac\ncb
No match
-/^\pC\pL\pM\pN\pP\pS\pZ</8
- \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
- \np\x{300}9!\$ <
- 0: \x{0a}p\x{300}9!$ <
- ** Failers
-No match
- ap\x{300}9!\$ <
-No match
-
-/^\PC/8
- X
- 0: X
- ** Failers
- 0: *
- \x7f
+/a(.{3,})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxbcdefghijb
+ 1: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
No match
-
-/^\PL/8
- 9
- 0: 9
- ** Failers
- 0: *
- \x{c0}
+ a\x{1234}b
+No match
+
+/a(.{3,}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxbcdefghijb
+ 1: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
No match
-
-/^\PM/8
- X
- 0: X
- ** Failers
- 0: *
- \x{30f}
+ a\x{1234}b
+No match
+
+/a(.{3,5})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ 0: axbxxb
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ *** Failers
No match
-
-/^\PN/8
- X
- 0: X
- ** Failers
- 0: *
- \x{660}
+ a\x{1234}b
+No match
+ axxxxxxbcdefghijb
+No match
+
+/a(.{3,5}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ 0: axxxxb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ 0: axbxxb
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ *** Failers
No match
-
-/^\PP/8
- X
- 0: X
- ** Failers
+ a\x{1234}b
No match
- \x{66c}
+ axxxxxxbcdefghijb
No match
-
-/^\PS/8
- X
- 0: X
- ** Failers
- 0: *
- \x{f01}
+
+/^[a\x{c0}]/8
+ *** Failers
No match
-
-/^\PZ/8
- X
- 0: X
- ** Failers
- 0: *
- \x{1680}
+ \x{100}
No match
+
+/(?<=aXb)cd/8
+ aXbcd
+ 0: cd
+
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
+ 0: cd
+
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
+ 0: cd
-/^\p{Cc}/8
- \x{017}
- 0: \x{17}
- \x{09f}
- 0: \x{9f}
- ** Failers
-No match
- \x{0600}
-No match
-
-/^\p{Cf}/8
- \x{601}
- 0: \x{601}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cn}/8
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Co}/8
- \x{f8ff}
- 0: \x{f8ff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Cs}/8
- \?\x{dfff}
- 0: \x{dfff}
- ** Failers
-No match
- \x{09f}
-No match
-
-/^\p{Ll}/8
- a
- 0: a
- ** Failers
-No match
- Z
-No match
- \x{e000}
-No match
-
-/^\p{Lm}/8
- \x{2b0}
- 0: \x{2b0}
- ** Failers
-No match
- a
-No match
-
-/^\p{Lo}/8
- \x{1bb}
- 0: \x{1bb}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lt}/8
- \x{1c5}
- 0: \x{1c5}
- ** Failers
-No match
- a
-No match
- \x{2b0}
-No match
-
-/^\p{Lu}/8
- A
- 0: A
- ** Failers
-No match
- \x{2b0}
-No match
-
-/^\p{Mc}/8
- \x{903}
- 0: \x{903}
- ** Failers
-No match
- X
-No match
- \x{300}
-No match
-
-/^\p{Me}/8
- \x{488}
- 0: \x{488}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
- \x{300}
-No match
-
-/^\p{Mn}/8
- \x{300}
- 0: \x{300}
- ** Failers
-No match
- X
-No match
- \x{903}
-No match
-
-/^\p{Nd}+/8
- 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
- 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
- 1: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}
- 2: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}
- 3: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}
- 4: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}
- 5: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}
- 6: 0123456789\x{660}\x{661}\x{662}\x{663}
- 7: 0123456789\x{660}\x{661}\x{662}
- 8: 0123456789\x{660}\x{661}
- 9: 0123456789\x{660}
-10: 0123456789
-11: 012345678
-12: 01234567
-13: 0123456
-14: 012345
-15: 01234
-16: 0123
-17: 012
-18: 01
-19: 0
- \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
- 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
- 1: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}
- 2: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}
- 3: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}
- 4: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}
- 5: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}
- 6: \x{6f0}\x{6f1}\x{6f2}\x{6f3}
- 7: \x{6f0}\x{6f1}\x{6f2}
- 8: \x{6f0}\x{6f1}
- 9: \x{6f0}
- \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
- 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
- 1: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}
- 2: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}
- 3: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}
- 4: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}
- 5: \x{966}\x{967}\x{968}\x{969}\x{96a}
- 6: \x{966}\x{967}\x{968}\x{969}
- 7: \x{966}\x{967}\x{968}
- 8: \x{966}\x{967}
- 9: \x{966}
- ** Failers
-No match
- X
-No match
-
-/^\p{Nl}/8
- \x{16ee}
- 0: \x{16ee}
- ** Failers
-No match
- X
-No match
- \x{966}
-No match
-
-/^\p{No}/8
- \x{b2}
- 0: \x{b2}
- \x{b3}
- 0: \x{b3}
- ** Failers
-No match
- X
-No match
- \x{16ee}
-No match
-
-/^\p{Pc}/8
- \x5f
- 0: _
- \x{203f}
- 0: \x{203f}
- ** Failers
-No match
- X
-No match
- -
-No match
- \x{58a}
-No match
-
-/^\p{Pd}/8
- -
- 0: -
- \x{58a}
- 0: \x{58a}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Pe}/8
- )
- 0: )
- ]
- 0: ]
- }
- 0: }
- \x{f3b}
- 0: \x{f3b}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
- (
-No match
- [
-No match
- {
-No match
- \x{f3c}
-No match
-
-/^\p{Pf}/8
- \x{bb}
- 0: \x{bb}
- \x{2019}
- 0: \x{2019}
- ** Failers
-No match
- X
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ 0: \x{100}\x{100}\x{100}b
+ *** Failers
No match
- \x{203f}
+ \x{100}\x{100}b
No match
-
-/^\p{Pi}/8
- \x{ab}
+
+/\x{ab}/8
+ \x{ab}
0: \x{ab}
- \x{2018}
- 0: \x{2018}
- ** Failers
-No match
- X
-No match
- \x{203f}
-No match
-
-/^\p{Po}/8
- !
- 0: !
- \x{37e}
- 0: \x{37e}
- ** Failers
- 0: *
- X
-No match
- \x{203f}
-No match
-
-/^\p{Ps}/8
- (
- 0: (
- [
- 0: [
- {
- 0: {
- \x{f3c}
- 0: \x{f3c}
- ** Failers
-No match
- X
-No match
- )
-No match
- ]
-No match
- }
-No match
- \x{f3b}
-No match
-
-/^\p{Sc}+/8
- $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
- 0: $\x{a2}\x{a3}\x{a4}\x{a5}
- 1: $\x{a2}\x{a3}\x{a4}
- 2: $\x{a2}\x{a3}
- 3: $\x{a2}
- 4: $
- \x{9f2}
- 0: \x{9f2}
- ** Failers
-No match
- X
-No match
- \x{2c2}
-No match
-
-/^\p{Sk}/8
- \x{2c2}
- 0: \x{2c2}
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{Sm}+/8
- +<|~\x{ac}\x{2044}
- 0: +<|~\x{ac}\x{2044}
- 1: +<|~\x{ac}
- 2: +<|~
- 3: +<|
- 4: +<
- 5: +
- ** Failers
-No match
- X
-No match
- \x{9f2}
-No match
-
-/^\p{So}/8
- \x{a6}
- 0: \x{a6}
- \x{482}
- 0: \x{482}
- ** Failers
-No match
- X
-No match
- \x{9f2}
+ \xc2\xab
+ 0: \x{ab}
+ *** Failers
No match
-
-/^\p{Zl}/8
- \x{2028}
- 0: \x{2028}
- ** Failers
+ \x00{ab}
No match
- X
+
+/(?<=(.))X/8
+ WXYZ
+ 0: X
+ \x{256}XYZ
+ 0: X
+ *** Failers
No match
- \x{2029}
+ XYZ
No match
+
+/[^a]+/8g
+ bcd
+ 0: bcd
+ 1: bc
+ 2: b
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+ 1: Y\x{256}
+ 2: Y
+
+/^[^a]{2}/8
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8
+ \x{100}bcAa
+ 0: \x{100}bcA
+ 1: \x{100}bc
+ 2: \x{100}b
+
+/^[^a]{2,}?/8
+ \x{100}bca
+ 0: \x{100}bc
+ 1: \x{100}b
+
+/[^a]+/8ig
+ bcd
+ 0: bcd
+ 1: bc
+ 2: b
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+ 1: Y\x{256}
+ 2: Y
+
+/^[^a]{2}/8i
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
+ 0: \x{100}bc
+ 1: \x{100}b
+
+/^[^a]{2,}?/8i
+ \x{100}bca
+ 0: \x{100}bc
+ 1: \x{100}b
+
+/\x{100}{0,0}/8
+ abcd
+ 0:
+
+/\x{100}?/8
+ abcd
+ 0:
+ \x{100}\x{100}
+ 0: \x{100}
+ 1:
+
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ 0: \x{100}\x{100}
+ 1: \x{100}
+ 2:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}
+ 2: \x{100}
+ 3:
+
+/\x{100}*/8
+ abce
+ 0:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}
+ 3: \x{100}
+ 4:
+
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}
+
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}
+ 2: \x{100}
+
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}
+ 3: \x{100}
+
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}
+
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}\x{100}\x{100}
+ 3: \x{100}\x{100}\x{100}\x{100}
+ 4: \x{100}\x{100}\x{100}
+
+/(?<=a\x{100}{2}b)X/8
+ Xyyya\x{100}\x{100}bXzzz
+ 0: X
+
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+Matched, but offsets vector is too small to show all matches
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+Matched, but offsets vector is too small to show all matches
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 3: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 4: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 5: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 6: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 7: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 8: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 9: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+10: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+11: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+12: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+13: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+14: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+15: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+16: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+17: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+18: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+19: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+20: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+21: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\D/8
+ 1X2
+ 0: X
+ 1\x{100}2
+ 0: \x{100}
-/^\p{Zp}/8
- \x{2029}
- 0: \x{2029}
- ** Failers
-No match
- X
-No match
- \x{2028}
-No match
+/>\S/8
+ > >X Y
+ 0: >X
+ > >\x{100} Y
+ 0: >\x{100}
-/^\p{Zs}/8
- \ \
+/\d/8
+ \x{100}3
+ 0: 3
+
+/\s/8
+ \x{100} X
0:
- \x{a0}
- 0: \x{a0}
- \x{1680}
- 0: \x{1680}
- \x{180e}
- 0: \x{180e}
- \x{2000}
- 0: \x{2000}
- \x{2001}
- 0: \x{2001}
- ** Failers
-No match
- \x{2028}
-No match
- \x{200d}
-No match
-
-/\p{Nd}+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}+?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
-
-/\p{Nd}{2,}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}*(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}*?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
- 2: \x{660}\x{661}\x{662}
- 3: \x{660}\x{661}
-
-/\p{Nd}{2}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}{2,3}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
- 1: \x{660}\x{661}\x{662}A
-
-/\p{Nd}?(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}??(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}
- 1: \x{660}\x{661}
-
-/\p{Nd}*+(..)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}AB
-
-/\p{Nd}*+(...)/8
- \x{660}\x{661}\x{662}ABC
- 0: \x{660}\x{661}\x{662}ABC
-
-/\p{Nd}*+(....)/8
- ** Failers
- 0: ** F
- \x{660}\x{661}\x{662}ABC
+
+/\D+/8
+ 12abcd34
+ 0: abcd
+ 1: abc
+ 2: ab
+ 3: a
+ *** Failers
+ 0: *** Failers
+ 1: *** Failer
+ 2: *** Faile
+ 3: *** Fail
+ 4: *** Fai
+ 5: *** Fa
+ 6: *** F
+ 7: ***
+ 8: ***
+ 9: **
+10: *
+ 1234
No match
-
-/\p{Lu}/8i
- A
- 0: A
- a\x{10a0}B
- 0: \x{10a0}
- ** Failers
- 0: F
- a
+
+/\D{2,3}/8
+ 12abcd34
+ 0: abc
+ 1: ab
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: ***
+ 1: **
+ 1234
No match
- \x{1d00}
+ 12a34
No match
-/\p{^Lu}/8i
+/\D{2,3}?/8
+ 12abcd34
+ 0: abc
+ 1: ab
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: ***
+ 1: **
1234
- 0: 1
- ** Failers
- 0: *
- ABC
+No match
+ 12a34
No match
-/\P{Lu}/8i
- 1234
- 0: 1
- ** Failers
- 0: *
- ABC
+/\d+/8
+ 12abcd34
+ 0: 12
+ 1: 1
+ *** Failers
No match
-/(?<=A\p{Nd})XYZ/8
- A2XYZ
- 0: XYZ
- 123A5XYZPQR
- 0: XYZ
- ABA\x{660}XYZpqr
- 0: XYZ
- ** Failers
+/\d{2,3}/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
No match
- AXYZ
+ 1.4
No match
- XYZ
+
+/\d{2,3}?/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
No match
-
-/(?<!\pL)XYZ/8
- 1XYZ
- 0: XYZ
- AB=XYZ..
- 0: XYZ
- XYZ
- 0: XYZ
- ** Failers
+ 1.4
No match
- WXYZ
+
+/\S+/8
+ 12abcd34
+ 0: 12abcd34
+ 1: 12abcd3
+ 2: 12abcd
+ 3: 12abc
+ 4: 12ab
+ 5: 12a
+ 6: 12
+ 7: 1
+ *** Failers
+ 0: ***
+ 1: **
+ 2: *
+ \ \
+No match
+
+/\S{2,3}/8
+ 12abcd34
+ 0: 12a
+ 1: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
+ 0: ***
+ 1: **
+ \ \
+No match
+
+/\S{2,3}?/8
+ 12abcd34
+ 0: 12a
+ 1: 12
+ 1234abcd
+ 0: 123
+ 1: 12
+ *** Failers
+ 0: ***
+ 1: **
+ \ \
No match
-/[\p{Nd}]/8
- 1234
- 0: 1
+/>\s+</8
+ 12> <34
+ 0: > <
+ *** Failers
+No match
-/[\p{Nd}+-]+/8
- 1234
- 0: 1234
- 1: 123
- 2: 12
- 3: 1
- 12-34
- 0: 12-34
- 1: 12-3
- 2: 12-
- 3: 12
- 4: 1
- 12+\x{661}-34
- 0: 12+\x{661}-34
- 1: 12+\x{661}-3
- 2: 12+\x{661}-
- 3: 12+\x{661}
- 4: 12+
- 5: 12
- 6: 1
- ** Failers
+/>\s{2,3}</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
No match
- abcd
+ ab> <cd
No match
-/[\P{Nd}]+/8
- abcd
- 0: abcd
- 1: abc
- 2: ab
- 3: a
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- 1234
+/>\s{2,3}?</8
+ ab> <cd
+ 0: > <
+ ab> <ce
+ 0: > <
+ *** Failers
No match
-
-/\D+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\P{Nd}+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/[\D\P{Nd}]+/8
- 11111111111111111111111111111111111111111111111111111111111111111111111
-No match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-Matched, but too many subsidiary matches
- 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 3: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 4: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 6: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 7: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 8: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- 9: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/\pL/8
- a
- 0: a
- A
- 0: A
-
-/\pL/8i
- a
- 0: a
- A
- 0: A
-
-/\p{Lu}/8
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
+ ab> <cd
No match
-/\p{Lu}/8i
- A
- 0: A
- aZ
- 0: Z
- ** Failers
- 0: F
- abc
+/\w+/8
+ 12 34
+ 0: 12
+ 1: 1
+ *** Failers
+ 0: Failers
+ 1: Failer
+ 2: Faile
+ 3: Fail
+ 4: Fai
+ 5: Fa
+ 6: F
+ +++=*!
+No match
+
+/\w{2,3}/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ 1: ab
+ *** Failers
+ 0: Fai
+ 1: Fa
+ a.b.c
No match
-/\p{Ll}/8
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
+/\w{2,3}?/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ 1: ab
+ *** Failers
+ 0: Fai
+ 1: Fa
+ a.b.c
No match
-/\p{Ll}/8i
- a
- 0: a
- Az
- 0: z
- ** Failers
- 0: a
- ABC
+/\W+/8
+ 12====34
+ 0: ====
+ 1: ===
+ 2: ==
+ 3: =
+ *** Failers
+ 0: ***
+ 1: ***
+ 2: **
+ 3: *
+ abcd
No match
-/^\x{c0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/^\x{e0}$/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- ** Failers
+/\W{2,3}/8
+ ab====cd
+ 0: ===
+ 1: ==
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ 1: **
+ a.b.c
No match
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
-No match
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-No match
-
-/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
- A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
- a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
- A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
- A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
- 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
- A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
- A\x{391}\x{10427}\x{ff3a}\x{1fb8}
- 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-
-/\x{391}+/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}
- 2: \x{391}\x{3b1}\x{3b1}
- 3: \x{391}\x{3b1}
- 4: \x{391}
-
-/\x{391}{3,5}(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/\x{391}{3,5}?(.)/8i
- \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
- 1: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
- 2: \x{391}\x{3b1}\x{3b1}\x{3b1}
-
-/[\x{391}\x{ff3a}]/8i
- \x{391}
- 0: \x{391}
- \x{ff3a}
- 0: \x{ff3a}
- \x{3b1}
- 0: \x{3b1}
- \x{ff5a}
- 0: \x{ff5a}
-
-/[\x{c0}\x{391}]/8i
- \x{c0}
- 0: \x{c0}
- \x{e0}
- 0: \x{e0}
-
-/[\x{105}-\x{109}]/8i
- \x{104}
- 0: \x{104}
- \x{105}
- 0: \x{105}
- \x{109}
- 0: \x{109}
- ** Failers
+
+/\W{2,3}?/8
+ ab====cd
+ 0: ===
+ 1: ==
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ 1: **
+ a.b.c
No match
+
+/[\x{100}]/8
\x{100}
+ 0: \x{100}
+ Z\x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
- \x{10a}
-No match
-
-/[z-\x{100}]/8i
- Z
+
+/[Z\x{100}]/8
+ Z\x{100}
0: Z
- z
- 0: z
- \x{39c}
- 0: \x{39c}
- \x{178}
- 0: \x{178}
- |
- 0: |
- \x{80}
- 0: \x{80}
- \x{ff}
- 0: \x{ff}
\x{100}
0: \x{100}
- \x{101}
- 0: \x{101}
- ** Failers
-No match
- \x{102}
-No match
- Y
-No match
- y
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
-/[z-\x{100}]/8i
-
-/^\X/8
- A
- 0: A
- A\x{300}BC
- 0: A\x{300}
- A\x{300}\x{301}\x{302}BC
- 0: A\x{300}\x{301}\x{302}
- *** Failers
- 0: *
- \x{300}
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ *** Failers
No match
-/^[\X]/8
- X123
- 0: X
- *** Failers
-No match
- AXYZ
-No match
-
-/^(\X*)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*?)C/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BC
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BC
-
-/^(\X*)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^(\X*?)(.)/8
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
- 0: A\x{300}\x{301}\x{302}BCA
- 1: A\x{300}\x{301}\x{302}BC
- 2: A\x{300}\x{301}\x{302}B
- 3: A
- A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
- 1: A\x{300}\x{301}\x{302}BCA
- 2: A\x{300}\x{301}\x{302}BC
- 3: A\x{300}\x{301}\x{302}B
- 4: A
-
-/^\X(.)/8
- *** Failers
- 0: **
- A\x{300}\x{301}\x{302}
-No match
-
-/^\X{2,3}(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\X{2,3}?(.)/8
- A\x{300}\x{301}B\x{300}X
- 0: A\x{300}\x{301}B\x{300}X
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}
- 0: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
- 1: A\x{300}\x{301}B\x{300}C
- A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
- 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
- 1: A\x{300}\x{301}B\x{300}C
-
-/^\pN{2,3}X/
- 12X
- 0: 12X
- 123X
- 0: 123X
- *** Failers
-No match
- X
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ *** Failers
No match
- 1X
+
+/[z-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ *** Failers
No match
- 1234X
+
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ Q?
+ 0: Q
+ *** Failers
No match
-/\x{100}/i8
- \x{100}
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
0: \x{100}
- \x{101}
- 0: \x{101}
-
-/^\p{Han}+/8
- \x{2e81}\x{3007}\x{2f804}\x{31a0}
- 0: \x{2e81}\x{3007}\x{2f804}
- 1: \x{2e81}\x{3007}
- 2: \x{2e81}
- ** Failers
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ Q?
+ 0: Q
+ *** Failers
No match
- \x{2e7f}
+
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ Q?
+ 0: Q
+ *** Failers
No match
-/^\P{Katakana}+/8
- \x{3105}
- 0: \x{3105}
- ** Failers
- 0: ** Failers
- 1: ** Failer
- 2: ** Faile
- 3: ** Fail
- 4: ** Fai
- 5: ** Fa
- 6: ** F
- 7: **
- 8: **
- 9: *
- \x{30ff}
-No match
-
-/^[\p{Arabic}]/8
- \x{06e9}
- 0: \x{6e9}
- \x{060b}
- 0: \x{60b}
- ** Failers
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
- X\x{06e9}
+
+/[\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^[\P{Yi}]/8
- \x{2f800}
- 0: \x{2f800}
- ** Failers
- 0: *
- \x{a014}
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
- \x{a4c6}
+
+/[Q\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ 1: \x{200}\x{100}
+ 2: \x{200}
+ *** Failers
No match
-/^\p{Any}X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ *** Failers
No match
X
No match
-
-/^\P{Any}X/8
- ** Failers
-No match
- AX
-No match
-
-/^\p{Any}?X/8
- XYZ
+
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
+ abc\x{100}X
+ 0: X
+ abQX
+ 0: X
+ *** Failers
No match
- ABXYZ
+ X
No match
-/^\P{Any}?X/8
- XYZ
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
0: X
- ** Failers
-No match
- AXYZ
+ *** Failers
No match
- \x{1234}XYZ
+ abc\x{200}X
No match
- ABXYZ
+ X
No match
-/^\p{Any}+X/8
- AXYZ
+/[^\x{100}\x{200}]X/8
+ AX
0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- XYZ
+ \x{100}X
No match
-
-/^\P{Any}+X/8
- ** Failers
+ \x{200}X
No match
- AXYZ
+
+/[^Q\x{100}\x{200}]X/8
+ AX
+ 0: AX
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- \x{1234}XYZ
+ \x{100}X
No match
- A\x{1234}XYZ
+ \x{200}X
No match
- XYZ
+ QX
No match
-/^\p{Any}*X/8
- XYZ
- 0: X
- AXYZ
+/[^\x{100}-\x{200}]X/8
+ AX
0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
-
-/^\P{Any}*X/8
- XYZ
- 0: X
- ** Failers
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
No match
- AXYZ
+ \x{100}X
No match
- \x{1234}XYZ
+ \x{150}X
No match
- A\x{1234}XYZ
+ \x{200}X
No match
-/^[\p{Any}]X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- X
+/[z-\x{100}]/8i
+ z
+ 0: z
+ Z
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ *** Failers
No match
-
-/^[\P{Any}]X/8
- ** Failers
+ \x{102}
No match
- AX
+ y
No match
-
-/^[\p{Any}]?X/8
+
+/[\xFF]/
+ >\xff<
+ 0: \xff
+
+/[\xff]/8
+ >\x{ff}<
+ 0: \x{ff}
+
+/[^\xFF]/
XYZ
0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- ** Failers
-No match
- ABXYZ
-No match
-/^[\P{Any}]?X/8
+/[^\xff]/8
XYZ
0: X
- ** Failers
-No match
- AXYZ
-No match
- \x{1234}XYZ
-No match
- ABXYZ
-No match
+ \x{123}
+ 0: \x{123}
-/^[\p{Any}]+X/8
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
- ** Failers
-No match
- XYZ
+/^[ac]*b/8
+ xb
No match
-/^[\P{Any}]+X/8
- ** Failers
-No match
- AXYZ
+/^[ac\x{100}]*b/8
+ xb
No match
- \x{1234}XYZ
+
+/^[^x]*b/8i
+ xb
No match
- A\x{1234}XYZ
+
+/^[^x]*b/8
+ xb
No match
- XYZ
+
+/^\d*b/8
+ xb
No match
-/^[\p{Any}]*X/8
- XYZ
- 0: X
- AXYZ
- 0: AX
- \x{1234}XYZ
- 0: \x{1234}X
- A\x{1234}XYZ
- 0: A\x{1234}X
+/(|a)/g8
+ catac
+ 0:
+ 0: a
+ 1:
+ 0:
+ 0: a
+ 1:
+ 0:
+ 0:
+ a\x{256}a
+ 0: a
+ 1:
+ 0:
+ 0: a
+ 1:
+ 0:
+
+/^\x{85}$/8i
+ \x{85}
+ 0: \x{85}
+
+/^abc./mgx8<any>
+ abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/abc.$/mgx8<any>
+ abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
+ 0: abc1
+ 0: abc2
+ 0: abc3
+ 0: abc4
+ 0: abc5
+ 0: abc6
+ 0: abc7
+ 0: abc8
+ 0: abc9
+
+/^a\Rb/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0cb
+ 0: a\x{0c}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x{2028}b
+ 0: a\x{2028}b
+ a\x{2029}b
+ 0: a\x{2029}b
** Failers
No match
-
-/^[\P{Any}]*X/8
- XYZ
- 0: X
+ a\n\rb
+No match
+
+/^a\R*b/8<bsr_unicode>
+ ab
+ 0: ab
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
+
+/^a\R+b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\rb
+ 0: a\x{0d}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x0bb
+ 0: a\x{0b}b
+ a\x0c\x{2028}\x{2029}b
+ 0: a\x{0c}\x{2028}\x{2029}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}\x0cb
+ 0: a\x{0a}\x{0d}\x{85}\x{0c}b
** Failers
No match
- AXYZ
+ ab
+No match
+
+/^a\R{1,3}b/8<bsr_unicode>
+ a\nb
+ 0: a\x{0a}b
+ a\n\rb
+ 0: a\x{0a}\x{0d}b
+ a\n\r\x{85}b
+ 0: a\x{0a}\x{0d}\x{85}b
+ a\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\r\n\r\n\r\nb
+ 0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
+ a\n\r\n\rb
+ 0: a\x{0a}\x{0d}\x{0a}\x{0d}b
+ a\n\n\r\nb
+ 0: a\x{0a}\x{0a}\x{0d}\x{0a}b
+ ** Failers
No match
- \x{1234}XYZ
+ a\n\n\n\rb
No match
- A\x{1234}XYZ
+ a\r
No match
-/^\p{Any}{3,5}?/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
+/\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
-/^\p{Any}{3,5}/8
- abcdefgh
- 0: abcde
- 1: abcd
- 2: abc
- \x{1234}\n\r\x{3456}xyz
- 0: \x{1234}\x{0a}\x{0d}\x{3456}x
- 1: \x{1234}\x{0a}\x{0d}\x{3456}
- 2: \x{1234}\x{0a}\x{0d}
+/\V?\v{3,4}/8
+ \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: X\x{0a}\x{0b}\x{0c}
-/^\P{Any}{3,5}?/8
- ** Failers
-No match
- abcdefgh
-No match
- \x{1234}\n\r\x{3456}xyz
-No match
+/\h+\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: \x{09} \x{a0}X\x{0a}\x{0a}\x{0a}
-/^\p{L&}X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
-
-/^[\p{L&}]X/8
- AXY
- 0: AX
- aXY
- 0: aX
- \x{1c5}XY
- 0: \x{1c5}X
- ** Failers
-No match
- \x{1bb}XY
-No match
- \x{2b0}XY
-No match
- !XY
-No match
+/\V?\v{3,4}/8
+ >\x09\x20\x{a0}X\x0a\x0a\x0a<
+ 0: X\x{0a}\x{0a}\x{0a}
-/^\p{L&}+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
+/\H\h\V\v/8
+ X X\x0a
+ 0: X X\x{0a}
+ X\x09X\x0b
+ 0: X\x{09}X\x{0b}
+ ** Failers
No match
- \x{1bb}XY
+ \x{a0} X\x0a
No match
- \x{2b0}XY
+
+/\H*\h+\V?\v{3,4}/8
+ \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}
+ \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
+ 1: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+ \x09\x20\x{a0}\x0a\x0b\x0c
+ 0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
+ ** Failers
No match
- !XY
+ \x09\x20\x{a0}\x0a\x0b
No match
-
-/^[\p{L&}]+X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
+
+/\H\h\V\v/8
+ \x{3001}\x{3000}\x{2030}\x{2028}
+ 0: \x{3001}\x{3000}\x{2030}\x{2028}
+ X\x{180e}X\x{85}
+ 0: X\x{180e}X\x{85}
+ ** Failers
No match
- \x{1bb}XY
+ \x{2009} X\x0a
No match
- \x{2b0}XY
+
+/\H*\h+\V?\v{3,4}/8
+ \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
+ 0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
+ 1: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}
+ \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
+ 0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
+ 1: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}
+ \x09\x20\x{202f}\x0a\x0b\x0c
+ 0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
+ ** Failers
No match
- !XY
+ \x09\x{200a}\x{a0}\x{2028}\x0b
No match
-
-/^\p{L&}+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
+
+/a\Rb/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
No match
- \x{1bb}XY
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\Rb/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
No match
- \x{2b0}XY
+ a\x{85}b\<bsr_anycrlf>
No match
- !XY
+ a\x0bb\<bsr_anycrlf>
No match
-
-/^[\p{L&}]+?X/8
- AXY
- 0: AX
- aXY
- 0: aX
- AbcdeXyz
- 0: AbcdeX
- \x{1c5}AbXY
- 0: \x{1c5}AbX
- abcDEXypqreXlmn
- 0: abcDEXypqreX
- 1: abcDEX
- ** Failers
+
+/a\R?b/I8<bsr_anycrlf>
+Capturing subpattern count = 0
+Options: bsr_anycrlf utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ ** Failers
No match
- \x{1bb}XY
+ a\x{85}b
+No match
+ a\x0bb
+No match
+
+/a\R?b/I8<bsr_unicode>
+Capturing subpattern count = 0
+Options: bsr_unicode utf
+First char = 'a'
+Need char = 'b'
+ a\rb
+ 0: a\x{0d}b
+ a\nb
+ 0: a\x{0a}b
+ a\r\nb
+ 0: a\x{0d}\x{0a}b
+ a\x{85}b
+ 0: a\x{85}b
+ a\x0bb
+ 0: a\x{0b}b
+ ** Failers
No match
- \x{2b0}XY
+ a\x{85}b\<bsr_anycrlf>
No match
- !XY
+ a\x0bb\<bsr_anycrlf>
No match
+
+/X/8f<any>
+ A\x{1ec5}ABCXYZ
+ 0: X
-/^\P{L&}X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
+/abcd*/8
+ xxxxabcd\P
+ 0: abcd
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
-/^[\P{L&}]X/8
- !XY
- 0: !X
- \x{1bb}XY
- 0: \x{1bb}X
- \x{2b0}XY
- 0: \x{2b0}X
- ** Failers
-No match
- \x{1c5}XY
-No match
- AXY
-No match
+/abcd*/i8
+ xxxxabcd\P
+ 0: abcd
+ 1: abc
+ xxxxabcd\P\P
+Partial match: abcd
+ XXXXABCD\P
+ 0: ABCD
+ 1: ABC
+ XXXXABCD\P\P
+Partial match: ABCD
+
+/abc\d*/8
+ xxxxabc1\P
+ 0: abc1
+ 1: abc
+ xxxxabc1\P\P
+Partial match: abc1
-/^\x{023a}+?(\x{0130}+)/8i
- \x{023a}\x{2c65}\x{0130}
- 0: \x{23a}\x{2c65}\x{130}
+/abc[de]*/8
+ xxxxabcde\P
+ 0: abcde
+ 1: abcd
+ 2: abc
+ xxxxabcde\P\P
+Partial match: abcde
+
+/\bthe cat\b/8
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/ab\Cde/8
+ abXde
+Error -16 (item unsupported for DFA matching)
+
+/(?<=ab\Cde)X/8
+Failed: \C not allowed in lookbehind assertion at offset 10
+
+/./8<CRLF>
+ \r\P
+ 0: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
-/^\x{023a}+([^X])/8i
- \x{023a}\x{2c65}X
- 0: \x{23a}\x{2c65}
-
-/Check property support in non-UTF-8 mode/
-
-/\p{L}{4}/
- 123abcdefg
- 0: abcd
- 123abc\xc4\xc5zz
- 0: abc\xc4
+/.{2,3}/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ 1: \x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/.{2,3}?/8<CRLF>
+ \r\P
+Partial match: \x{0d}
+ \r\P\P
+Partial match: \x{0d}
+ \r\r\P
+ 0: \x{0d}\x{0d}
+ \r\r\P\P
+Partial match: \x{0d}\x{0d}
+ \r\r\r\P
+ 0: \x{0d}\x{0d}\x{0d}
+ 1: \x{0d}\x{0d}
+ \r\r\r\P\P
+Partial match: \x{0d}\x{0d}\x{0d}
+
+/[^\x{100}]/8
+ \x{100}\x{101}X
+ 0: \x{101}
+
+/[^\x{100}]+/8
+ \x{100}\x{101}X
+ 0: \x{101}X
+ 1: \x{101}
-/ End /
+/-- End of testinput9 --/
diff --git a/lib/stdlib/test/re_testoutput1_replacement_test.erl b/lib/stdlib/test/re_testoutput1_replacement_test.erl
index 8f8d8762ad..e475b180eb 100644
--- a/lib/stdlib/test/re_testoutput1_replacement_test.erl
+++ b/lib/stdlib/test/re_testoutput1_replacement_test.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,697 +19,755 @@
-module(re_testoutput1_replacement_test).
-compile(export_all).
-compile(no_native).
--include("test_server.hrl").
%% This file is generated by running run_pcre_tests:gen_repl_test("re_SUITE_data/testoutput1")
run() ->
-?line <<"WkCthe quick brown foxtthe quick brown foxjthe quick brown foxPpfmthe quick brown foxthe quick brown foxy">> = iolist_to_binary(re:replace("the quick brown fox","the quick brown fox","WkC&t\\1\\1&j&Ppfm&&y",[])),
-?line <<"WkCthe quick brown foxtthe quick brown foxjthe quick brown foxPpfmthe quick brown foxthe quick brown foxy">> = iolist_to_binary(re:replace("the quick brown fox","the quick brown fox","WkC&t\\1\\1&j&Ppfm&&y",[global])),
-?line <<"The quick brown FOX">> = iolist_to_binary(re:replace("The quick brown FOX","the quick brown fox","in&&CSwx",[])),
-?line <<"The quick brown FOX">> = iolist_to_binary(re:replace("The quick brown FOX","the quick brown fox","in&&CSwx",[global])),
-?line <<"What do you know about ORtMvuTRHtLthe quick brown foxiYthe quick brown foxGi?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","the quick brown fox","ORtMvuTRHtL&iY&Gi",[])),
-?line <<"What do you know about ORtMvuTRHtLthe quick brown foxiYthe quick brown foxGi?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","the quick brown fox","ORtMvuTRHtL&iY&Gi",[global])),
-?line <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","the quick brown fox","\\1nfTnvooMaxHdXgGO",[])),
-?line <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","the quick brown fox","\\1nfTnvooMaxHdXgGO",[global])),
-?line <<"hSniFQTqBU">> = iolist_to_binary(re:replace("the quick brown fox","The quick brown fox","hSniFQTqBU",[caseless])),
-?line <<"hSniFQTqBU">> = iolist_to_binary(re:replace("the quick brown fox","The quick brown fox","hSniFQTqBU",[caseless,
- global])),
-?line <<"q">> = iolist_to_binary(re:replace("The quick brown FOX","The quick brown fox","q",[caseless])),
-?line <<"q">> = iolist_to_binary(re:replace("The quick brown FOX","The quick brown fox","q",[caseless,
- global])),
-?line <<"What do you know about uJnke?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","The quick brown fox","uJ\\1nke",[caseless])),
-?line <<"What do you know about uJnke?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","The quick brown fox","uJ\\1nke",[caseless,
- global])),
-?line <<"What do you know about VRUTHE QUICK BROWN FOXYgJqUVfiTHE QUICK BROWN FOXqb?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","The quick brown fox","VRU&YgJqUVfi&\\1qb",[caseless])),
-?line <<"What do you know about VRUTHE QUICK BROWN FOXYgJqUVfiTHE QUICK BROWN FOXqb?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","The quick brown fox","VRU&YgJqUVfi&\\1qb",[caseless,
- global])),
-?line <<"jeUmEaUYOfHpPURCabcd
- 9;$\\?caxyz">> = iolist_to_binary(re:replace("abcd
- 9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz","jeUmEaUYOfHpPURC&",[])),
-?line <<"jeUmEaUYOfHpPURCabcd
- 9;$\\?caxyz">> = iolist_to_binary(re:replace("abcd
- 9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz","jeUmEaUYOfHpPURC&",[global])),
-?line <<"YVh">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","YVh",[])),
-?line <<"YVh">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","YVh",[global])),
-?line <<"wDCxbqXSqpabxyzpqrrrabbxyyyypqAzzX">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","wDCxbqXSqp&X",[])),
-?line <<"wDCxbqXSqpabxyzpqrrrabbxyyyypqAzzX">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","wDCxbqXSqp&X",[global])),
-?line <<"XOnDbhuPYPfGm">> = iolist_to_binary(re:replace("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1XOnDbhuP\\1Y\\1PfGm",[])),
-?line <<"XOnDbhuPYPfGm">> = iolist_to_binary(re:replace("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1XOnDbhuP\\1Y\\1PfGm",[global])),
-?line <<"vgswmIcA">> = iolist_to_binary(re:replace("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","vgswmI\\1cA",[])),
-?line <<"vgswmIcA">> = iolist_to_binary(re:replace("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","vgswmI\\1cA",[global])),
-?line <<"YaaaabxyzpqrrrabbxyyyypqAzzOXXRaa">> = iolist_to_binary(re:replace("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Y&OXXRaa",[])),
-?line <<"YaaaabxyzpqrrrabbxyyyypqAzzOXXRaa">> = iolist_to_binary(re:replace("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Y&OXXRaa",[global])),
-?line <<"CAeqsXe">> = iolist_to_binary(re:replace("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1CAeq\\1s\\1Xe",[])),
-?line <<"CAeqsXe">> = iolist_to_binary(re:replace("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1CAeq\\1s\\1Xe",[global])),
-?line <<"cDLaApdgW">> = iolist_to_binary(re:replace("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","cDLaApdgW",[])),
-?line <<"cDLaApdgW">> = iolist_to_binary(re:replace("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","cDLaApdgW",[global])),
-?line <<"aLfXiUYS">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","aLf\\1XiUYS",[])),
-?line <<"aLfXiUYS">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","aLf\\1XiUYS",[global])),
-?line <<"aaabcxyzpqrrrabbxyyyypqAzzBcaaabcxyzpqrrrabbxyyyypqAzzDAyoYqGn">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1&Bc&DAyoYqGn",[])),
-?line <<"aaabcxyzpqrrrabbxyyyypqAzzBcaaabcxyzpqrrrabbxyyyypqAzzDAyoYqGn">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1&Bc&DAyoYqGn",[global])),
-?line <<"aaabcxyzpqrrrabbxyyyypqqAzzijaaabcxyzpqrrrabbxyyyypqqAzzdIBcB">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&ij&dI\\1BcB",[])),
-?line <<"aaabcxyzpqrrrabbxyyyypqqAzzijaaabcxyzpqrrrabbxyyyypqqAzzdIBcB">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&ij&dI\\1BcB",[global])),
-?line <<"qrxTuPSgEjNvkaaabcxyzpqrrrabbxyyyypqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1qrx\\1\\1TuPSgEjNvk&",[])),
-?line <<"qrxTuPSgEjNvkaaabcxyzpqrrrabbxyyyypqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1qrx\\1\\1TuPSgEjNvk&",[global])),
-?line <<"oWxyrN">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1oWx\\1y\\1rN",[])),
-?line <<"oWxyrN">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1oWx\\1y\\1rN",[global])),
-?line <<"TPbeAcarX">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1T\\1PbeAcarX",[])),
-?line <<"TPbeAcarX">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1T\\1PbeAcarX",[global])),
-?line <<"xWhhgaaabcxyzpqrrrabbxyyyypqqqqqqAzzsHcQaaabcxyzpqrrrabbxyyyypqqqqqqAzzAeU">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","xWh\\1hg&sHcQ&AeU",[])),
-?line <<"xWhhgaaabcxyzpqrrrabbxyyyypqqqqqqAzzsHcQaaabcxyzpqrrrabbxyyyypqqqqqqAzzAeU">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","xWh\\1hg&sHcQ&AeU",[global])),
-?line <<"HasuDgVdEpaaaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Hasu\\1\\1DgV\\1dEp&",[])),
-?line <<"HasuDgVdEpaaaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Hasu\\1\\1DgV\\1dEp&",[global])),
-?line <<"XWMcabxyzzpqrrrabbxyyyypqAzzIUK">> = iolist_to_binary(re:replace("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XWMc&\\1IUK",[])),
-?line <<"XWMcabxyzzpqrrrabbxyyyypqAzzIUK">> = iolist_to_binary(re:replace("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XWMc&\\1IUK",[global])),
-?line <<"UBljDAPnposGdT">> = iolist_to_binary(re:replace("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","UBljDAPnposGdT",[])),
-?line <<"UBljDAPnposGdT">> = iolist_to_binary(re:replace("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","UBljDAPnposGdT",[global])),
-?line <<"boTxGt">> = iolist_to_binary(re:replace("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","boTxGt",[])),
-?line <<"boTxGt">> = iolist_to_binary(re:replace("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","boTxGt",[global])),
-?line <<"mnBWBx">> = iolist_to_binary(re:replace("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","mnB\\1\\1WBx",[])),
-?line <<"mnBWBx">> = iolist_to_binary(re:replace("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","mnB\\1\\1WBx",[global])),
-?line <<"lcgIVpnY">> = iolist_to_binary(re:replace("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","lcgIVpnY\\1",[])),
-?line <<"lcgIVpnY">> = iolist_to_binary(re:replace("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","lcgIVpnY\\1",[global])),
-?line <<"aabcxyzzzpqrrrabbxyyyypqAzznutiQsQaabcxyzzzpqrrrabbxyyyypqAzzokm">> = iolist_to_binary(re:replace("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&n\\1\\1utiQsQ&o\\1km",[])),
-?line <<"aabcxyzzzpqrrrabbxyyyypqAzznutiQsQaabcxyzzzpqrrrabbxyyyypqAzzokm">> = iolist_to_binary(re:replace("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&n\\1\\1utiQsQ&o\\1km",[global])),
-?line <<"rshbaaabcxyzzzzpqrrrabbxyyyypqAzzyCaaabcxyzzzzpqrrrabbxyyyypqAzzFuphTaaabcxyzzzzpqrrrabbxyyyypqAzzb">> = iolist_to_binary(re:replace("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","rshb&yC&FuphT&b",[])),
-?line <<"rshbaaabcxyzzzzpqrrrabbxyyyypqAzzyCaaabcxyzzzzpqrrrabbxyyyypqAzzFuphTaaabcxyzzzzpqrrrabbxyyyypqAzzb">> = iolist_to_binary(re:replace("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","rshb&yC&FuphT&b",[global])),
-?line <<"aaaabcxyzzzzpqrrrabbxyyyypqAzzDpUaaaabcxyzzzzpqrrrabbxyyyypqAzzWxWLwIQUnS">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&DpU&WxW\\1LwIQUnS",[])),
-?line <<"aaaabcxyzzzzpqrrrabbxyyyypqAzzDpUaaaabcxyzzzzpqrrrabbxyyyypqAzzWxWLwIQUnS">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&DpU&WxW\\1LwIQUnS",[global])),
-?line <<"maaaabcxyzzzzpqrrrabbbxyyyypqAzzaaaabcxyzzzzpqrrrabbbxyyyypqAzzdV">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","m\\1&&dV",[])),
-?line <<"maaaabcxyzzzzpqrrrabbbxyyyypqAzzaaaabcxyzzzzpqrrrabbbxyyyypqAzzdV">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","m\\1&&dV",[global])),
-?line <<"qABAquMpjbGrEQl">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","qAB\\1A\\1quMpjbGrEQl",[])),
-?line <<"qABAquMpjbGrEQl">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","qAB\\1A\\1quMpjbGrEQl",[global])),
-?line <<"XEmwtsQHVhnjgxANa">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XEmw\\1tsQHVhn\\1jgx\\1ANa",[])),
-?line <<"XEmwtsQHVhnjgxANa">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XEmw\\1tsQHVhn\\1jgx\\1ANa",[global])),
-?line <<"agMMGdMqblL">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","agMMGdMq\\1blL\\1",[])),
-?line <<"agMMGdMqblL">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","agMMGdMq\\1blL\\1",[global])),
-?line <<">>>EFCLJKUGJXH">> = iolist_to_binary(re:replace(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","EFCLJKUGJXH",[])),
-?line <<">>>EFCLJKUGJXH">> = iolist_to_binary(re:replace(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","EFCLJKUGJXH",[global])),
-?line <<">IW">> = iolist_to_binary(re:replace(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1IW",[])),
-?line <<">IW">> = iolist_to_binary(re:replace(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1IW",[global])),
-?line <<">>>>uiixDteuEA">> = iolist_to_binary(re:replace(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1uiixD\\1teuEA",[])),
-?line <<">>>>uiixDteuEA">> = iolist_to_binary(re:replace(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1uiixD\\1teuEA",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","vayXo\\1eo\\1H",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","vayXo\\1eo\\1H",[global])),
-?line <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","nJK",[])),
-?line <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","nJK",[global])),
-?line <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","msrV\\1",[])),
-?line <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","msrV\\1",[global])),
-?line <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","nVAVmEdY&rfTu",[])),
-?line <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","nVAVmEdY&rfTu",[global])),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&G&\\1eyiM",[])),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&G&\\1eyiM",[global])),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","AIYq\\1nFUePr&s\\1s",[])),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","AIYq\\1nFUePr&s\\1s",[global])),
-?line <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","G\\1\\1XF\\1XcTk&D&Vd",[])),
-?line <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","G\\1\\1XF\\1XcTk&D&Vd",[global])),
-?line <<"NMabcYpabcatqabczzabczzReBo">> = iolist_to_binary(re:replace("abczz","^(abc){1,2}zz","NM\\1Yp\\1atq&&ReBo",[])),
-?line <<"NMabcYpabcatqabczzabczzReBo">> = iolist_to_binary(re:replace("abczz","^(abc){1,2}zz","NM\\1Yp\\1atq&&ReBo",[global])),
-?line <<"PabcabczzabcsubxWpWrabcCabcabczzBDsb">> = iolist_to_binary(re:replace("abcabczz","^(abc){1,2}zz","P&\\1subxWpWr\\1C&BDsb",[])),
-?line <<"PabcabczzabcsubxWpWrabcCabcabczzBDsb">> = iolist_to_binary(re:replace("abcabczz","^(abc){1,2}zz","P&\\1subxWpWr\\1C&BDsb",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(abc){1,2}zz","u&MSQ\\1MwaXNEFxKb\\1v\\1r",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(abc){1,2}zz","u&MSQ\\1MwaXNEFxKb\\1v\\1r",[global])),
-?line <<"zz">> = iolist_to_binary(re:replace("zz","^(abc){1,2}zz","&XIfLMiKJsG&X",[])),
-?line <<"zz">> = iolist_to_binary(re:replace("zz","^(abc){1,2}zz","&XIfLMiKJsG&X",[global])),
-?line <<"abcabcabczz">> = iolist_to_binary(re:replace("abcabcabczz","^(abc){1,2}zz","k\\1S&UT&HR\\1\\1MHKIh&mv",[])),
-?line <<"abcabcabczz">> = iolist_to_binary(re:replace("abcabcabczz","^(abc){1,2}zz","k\\1S&UT&HR\\1\\1MHKIh&mv",[global])),
-?line <<">>abczz">> = iolist_to_binary(re:replace(">>abczz","^(abc){1,2}zz","R\\1GKCdWtC&\\1ULoV",[])),
-?line <<">>abczz">> = iolist_to_binary(re:replace(">>abczz","^(abc){1,2}zz","R\\1GKCdWtC&\\1ULoV",[global])),
-?line <<"bcbcvRuVbMbcbcOSuQfOJbc">> = iolist_to_binary(re:replace("bc","^(b+?|a){1,2}?c","&bcvRuV\\1M&&OSuQfOJ\\1c",[])),
-?line <<"bcbcvRuVbMbcbcOSuQfOJbc">> = iolist_to_binary(re:replace("bc","^(b+?|a){1,2}?c","&bcvRuV\\1M&&OSuQfOJ\\1c",[global])),
-?line <<"L">> = iolist_to_binary(re:replace("bbc","^(b+?|a){1,2}?c","L",[])),
-?line <<"L">> = iolist_to_binary(re:replace("bbc","^(b+?|a){1,2}?c","L",[global])),
-?line <<"pFFAeA">> = iolist_to_binary(re:replace("bbbc","^(b+?|a){1,2}?c","pFFAeA",[])),
-?line <<"pFFAeA">> = iolist_to_binary(re:replace("bbbc","^(b+?|a){1,2}?c","pFFAeA",[global])),
-?line <<"OpEK">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","OpEK",[])),
-?line <<"OpEK">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","OpEK",[global])),
-?line <<"bbacQeabbactAVaalybbacdBwbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","&Qe\\1&tAV\\1\\1ly&dBw&",[])),
-?line <<"bbacQeabbactAVaalybbacdBwbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","&Qe\\1&tAV\\1\\1ly&dBw&",[global])),
-?line <<"atVuxqLMNgBtlattKaT">> = iolist_to_binary(re:replace("aac","^(b+?|a){1,2}?c","\\1tVuxqLMNgBtl\\1ttKaT",[])),
-?line <<"atVuxqLMNgBtlattKaT">> = iolist_to_binary(re:replace("aac","^(b+?|a){1,2}?c","\\1tVuxqLMNgBtl\\1ttKaT",[global])),
-?line <<"Y">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+?|a){1,2}?c","Y",[])),
-?line <<"Y">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+?|a){1,2}?c","Y",[global])),
-?line <<"bbbbbbbbbbbactDhmKI">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+?|a){1,2}?c","&tDhmKI",[])),
-?line <<"bbbbbbbbbbbactDhmKI">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+?|a){1,2}?c","&tDhmKI",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+?|a){1,2}?c","qVVVR&C\\1&etAsmWh",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+?|a){1,2}?c","qVVVR&C\\1&etAsmWh",[global])),
-?line <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+?|a){1,2}?c","jD\\1&q&KCdV&RhT",[])),
-?line <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+?|a){1,2}?c","jD\\1&q&KCdV&RhT",[global])),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+?|a){1,2}?c","\\1jT&nRG",[])),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+?|a){1,2}?c","\\1jT&nRG",[global])),
-?line <<"bcXfvbIubUfhmIRev">> = iolist_to_binary(re:replace("bc","^(b+|a){1,2}c","&Xfv\\1IubUfhmIRev",[])),
-?line <<"bcXfvbIubUfhmIRev">> = iolist_to_binary(re:replace("bc","^(b+|a){1,2}c","&Xfv\\1IubUfhmIRev",[global])),
-?line <<"EbbbbcwbbWbbcVuAOqROLkbbcwbbc">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}c","E\\1&w\\1W&VuAOqROLk&w&",[])),
-?line <<"EbbbbcwbbWbbcVuAOqROLkbbcwbbc">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}c","E\\1&w\\1W&VuAOqROLk&w&",[global])),
-?line <<"I">> = iolist_to_binary(re:replace("bbbc","^(b+|a){1,2}c","I",[])),
-?line <<"I">> = iolist_to_binary(re:replace("bbbc","^(b+|a){1,2}c","I",[global])),
-?line <<"dctSELQIPb">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}c","dctSELQIPb",[])),
-?line <<"dctSELQIPb">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}c","dctSELQIPb",[global])),
-?line <<"kbdarKarpbbacbbacbDO">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}c","kbd\\1rK\\1rp&&bDO",[])),
-?line <<"kbdarKarpbbacbbacbDO">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}c","kbd\\1rK\\1rp&&bDO",[global])),
-?line <<"aFIlpaasKQWsFRadP">> = iolist_to_binary(re:replace("aac","^(b+|a){1,2}c","\\1FIlp\\1\\1sKQWsFR\\1dP",[])),
-?line <<"aFIlpaasKQWsFRadP">> = iolist_to_binary(re:replace("aac","^(b+|a){1,2}c","\\1FIlp\\1\\1sKQWsFR\\1dP",[global])),
-?line <<"bbbbbbbbbbbfbbbbbbbbbbbHo">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+|a){1,2}c","\\1f\\1Ho",[])),
-?line <<"bbbbbbbbbbbfbbbbbbbbbbbHo">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+|a){1,2}c","\\1f\\1Ho",[global])),
-?line <<"bbbbbbbbbbbacOuqvbbbbbbbbbbbaclVwIa">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+|a){1,2}c","&Ouqv&lVwI\\1",[])),
-?line <<"bbbbbbbbbbbacOuqvbbbbbbbbbbbaclVwIa">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+|a){1,2}c","&Ouqv&lVwI\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+|a){1,2}c","\\1sSSP\\1Tw&R&byI\\1TN",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+|a){1,2}c","\\1sSSP\\1Tw&R&byI\\1TN",[global])),
-?line <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+|a){1,2}c","lBeqV\\1ygD\\1oXXqs",[])),
-?line <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+|a){1,2}c","lBeqV\\1ygD\\1oXXqs",[global])),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+|a){1,2}c","HVL\\1kIEVrx\\1hyh\\1&eY\\1R",[])),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+|a){1,2}c","HVL\\1kIEVrx\\1hyh\\1&eY\\1R",[global])),
-?line <<"ScHjJbbcrs">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}?bc","ScHjJ&rs",[])),
-?line <<"ScHjJbbcrs">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}?bc","ScHjJ&rs",[global])),
-?line <<"xbabcCeyVbabcbaXLUCoov">> = iolist_to_binary(re:replace("babc","^(b*|ba){1,2}?bc","x&CeyV&\\1XLUCoov",[])),
-?line <<"xbabcCeyVbabcbaXLUCoov">> = iolist_to_binary(re:replace("babc","^(b*|ba){1,2}?bc","x&CeyV&\\1XLUCoov",[global])),
-?line <<"HbPsbrWbbabcba">> = iolist_to_binary(re:replace("bbabc","^(b*|ba){1,2}?bc","HbPsbrW&\\1",[])),
-?line <<"HbPsbrWbbabcba">> = iolist_to_binary(re:replace("bbabc","^(b*|ba){1,2}?bc","HbPsbrW&\\1",[global])),
-?line <<"IpbababcRBSkmAw">> = iolist_to_binary(re:replace("bababc","^(b*|ba){1,2}?bc","Ip&RBSkmAw",[])),
-?line <<"IpbababcRBSkmAw">> = iolist_to_binary(re:replace("bababc","^(b*|ba){1,2}?bc","Ip&RBSkmAw",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b*|ba){1,2}?bc","e\\1\\1Tx",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b*|ba){1,2}?bc","e\\1\\1Tx",[global])),
-?line <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(b*|ba){1,2}?bc","llyNxYhfjNKiNYM\\1&Ko",[])),
-?line <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(b*|ba){1,2}?bc","llyNxYhfjNKiNYM\\1&Ko",[global])),
-?line <<"babababc">> = iolist_to_binary(re:replace("babababc","^(b*|ba){1,2}?bc","R&TKD\\1JpYJGqtjf",[])),
-?line <<"babababc">> = iolist_to_binary(re:replace("babababc","^(b*|ba){1,2}?bc","R&TKD\\1JpYJGqtjf",[global])),
-?line <<"babcfHFubaafbYLoJba">> = iolist_to_binary(re:replace("babc","^(ba|b*){1,2}?bc","&fHFu\\1afbYLoJ\\1",[])),
-?line <<"babcfHFubaafbYLoJba">> = iolist_to_binary(re:replace("babc","^(ba|b*){1,2}?bc","&fHFu\\1afbYLoJ\\1",[global])),
-?line <<"ewhbbabc">> = iolist_to_binary(re:replace("bbabc","^(ba|b*){1,2}?bc","ewh&",[])),
-?line <<"ewhbbabc">> = iolist_to_binary(re:replace("bbabc","^(ba|b*){1,2}?bc","ewh&",[global])),
-?line <<"L">> = iolist_to_binary(re:replace("bababc","^(ba|b*){1,2}?bc","L",[])),
-?line <<"L">> = iolist_to_binary(re:replace("bababc","^(ba|b*){1,2}?bc","L",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ba|b*){1,2}?bc","\\1wv",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ba|b*){1,2}?bc","\\1wv",[global])),
-?line <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(ba|b*){1,2}?bc","&F",[])),
-?line <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(ba|b*){1,2}?bc","&F",[global])),
-?line <<"babababc">> = iolist_to_binary(re:replace("babababc","^(ba|b*){1,2}?bc","Yk",[])),
-?line <<"babababc">> = iolist_to_binary(re:replace("babababc","^(ba|b*){1,2}?bc","Yk",[global])),
-?line <<"rdI;zTYuI;zcdx">> = iolist_to_binary(re:replace(";z","^\\ca\\cA\\c[\\c{\\c:","rdI&TYuI&cdx\\1",[])),
-?line <<"rdI;zTYuI;zcdx">> = iolist_to_binary(re:replace(";z","^\\ca\\cA\\c[\\c{\\c:","rdI&TYuI&cdx\\1",[global])),
-?line <<"XgOhHATXLthing">> = iolist_to_binary(re:replace("athing","^[ab\\]cde]","XgO\\1hHATXL",[])),
-?line <<"XgOhHATXLthing">> = iolist_to_binary(re:replace("athing","^[ab\\]cde]","XgO\\1hHATXL",[global])),
-?line <<"xIBYFthing">> = iolist_to_binary(re:replace("bthing","^[ab\\]cde]","xIBYF",[])),
-?line <<"xIBYFthing">> = iolist_to_binary(re:replace("bthing","^[ab\\]cde]","xIBYF",[global])),
-?line <<"]lthing">> = iolist_to_binary(re:replace("]thing","^[ab\\]cde]","&l",[])),
-?line <<"]lthing">> = iolist_to_binary(re:replace("]thing","^[ab\\]cde]","&l",[global])),
-?line <<"qbsthing">> = iolist_to_binary(re:replace("cthing","^[ab\\]cde]","\\1qbs",[])),
-?line <<"qbsthing">> = iolist_to_binary(re:replace("cthing","^[ab\\]cde]","\\1qbs",[global])),
-?line <<"gyOCYsthing">> = iolist_to_binary(re:replace("dthing","^[ab\\]cde]","gyOCYs",[])),
-?line <<"gyOCYsthing">> = iolist_to_binary(re:replace("dthing","^[ab\\]cde]","gyOCYs",[global])),
-?line <<"DrUmPIeSUthing">> = iolist_to_binary(re:replace("ething","^[ab\\]cde]","DrUmP\\1IeSU",[])),
-?line <<"DrUmPIeSUthing">> = iolist_to_binary(re:replace("ething","^[ab\\]cde]","DrUmP\\1IeSU",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[ab\\]cde]","Xi\\1luACtdK",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[ab\\]cde]","Xi\\1luACtdK",[global])),
-?line <<"fthing">> = iolist_to_binary(re:replace("fthing","^[ab\\]cde]","&u&Y\\1obNLU\\1tyonhH",[])),
-?line <<"fthing">> = iolist_to_binary(re:replace("fthing","^[ab\\]cde]","&u&Y\\1obNLU\\1tyonhH",[global])),
-?line <<"[thing">> = iolist_to_binary(re:replace("[thing","^[ab\\]cde]","TVEAE&ooeuGQJgKnrqW",[])),
-?line <<"[thing">> = iolist_to_binary(re:replace("[thing","^[ab\\]cde]","TVEAE&ooeuGQJgKnrqW",[global])),
-?line <<"\\thing">> = iolist_to_binary(re:replace("\\thing","^[ab\\]cde]","vRby\\1&",[])),
-?line <<"\\thing">> = iolist_to_binary(re:replace("\\thing","^[ab\\]cde]","vRby\\1&",[global])),
-?line <<"]n]ExaxasbKqYi]CHthing">> = iolist_to_binary(re:replace("]thing","^[]cde]","&n&Ex\\1axa\\1sbKqYi&CH",[])),
-?line <<"]n]ExaxasbKqYi]CHthing">> = iolist_to_binary(re:replace("]thing","^[]cde]","&n&Ex\\1axa\\1sbKqYi&CH",[global])),
-?line <<"nLnsthing">> = iolist_to_binary(re:replace("cthing","^[]cde]","nLns",[])),
-?line <<"nLnsthing">> = iolist_to_binary(re:replace("cthing","^[]cde]","nLns",[global])),
-?line <<"dOETLdnanQKLkkVthing">> = iolist_to_binary(re:replace("dthing","^[]cde]","\\1&OET\\1L&nanQKLkkV",[])),
-?line <<"dOETLdnanQKLkkVthing">> = iolist_to_binary(re:replace("dthing","^[]cde]","\\1&OET\\1L&nanQKLkkV",[global])),
-?line <<"UKthing">> = iolist_to_binary(re:replace("ething","^[]cde]","UK",[])),
-?line <<"UKthing">> = iolist_to_binary(re:replace("ething","^[]cde]","UK",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[]cde]","OEN&h&RDky",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[]cde]","OEN&h&RDky",[global])),
-?line <<"athing">> = iolist_to_binary(re:replace("athing","^[]cde]","ADIYuoD\\1PwBWBN",[])),
-?line <<"athing">> = iolist_to_binary(re:replace("athing","^[]cde]","ADIYuoD\\1PwBWBN",[global])),
-?line <<"fthing">> = iolist_to_binary(re:replace("fthing","^[]cde]","H&UGGJFd\\1Ys\\1xgEg",[])),
-?line <<"fthing">> = iolist_to_binary(re:replace("fthing","^[]cde]","H&UGGJFd\\1Ys\\1xgEg",[global])),
-?line <<"yipHChvHfthing">> = iolist_to_binary(re:replace("fthing","^[^ab\\]cde]","yi\\1pHC\\1hvH&",[])),
-?line <<"yipHChvHfthing">> = iolist_to_binary(re:replace("fthing","^[^ab\\]cde]","yi\\1pHC\\1hvH&",[global])),
-?line <<"pthing">> = iolist_to_binary(re:replace("[thing","^[^ab\\]cde]","p",[])),
-?line <<"pthing">> = iolist_to_binary(re:replace("[thing","^[^ab\\]cde]","p",[global])),
-?line <<"nvbthing">> = iolist_to_binary(re:replace("\\thing","^[^ab\\]cde]","n\\1v\\1b",[])),
-?line <<"nvbthing">> = iolist_to_binary(re:replace("\\thing","^[^ab\\]cde]","n\\1v\\1b",[global])),
-?line <<"o*r*CQayoALTVo** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^ab\\]cde]","o&r&CQa\\1yoALTVo\\1",[])),
-?line <<"o*r*CQayoALTVo** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^ab\\]cde]","o&r&CQa\\1yoALTVo\\1",[global])),
-?line <<"athing">> = iolist_to_binary(re:replace("athing","^[^ab\\]cde]","k\\1&MCQ",[])),
-?line <<"athing">> = iolist_to_binary(re:replace("athing","^[^ab\\]cde]","k\\1&MCQ",[global])),
-?line <<"bthing">> = iolist_to_binary(re:replace("bthing","^[^ab\\]cde]","XKeFQEPnv",[])),
-?line <<"bthing">> = iolist_to_binary(re:replace("bthing","^[^ab\\]cde]","XKeFQEPnv",[global])),
-?line <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^ab\\]cde]","\\1",[])),
-?line <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^ab\\]cde]","\\1",[global])),
-?line <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^ab\\]cde]","NU",[])),
-?line <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^ab\\]cde]","NU",[global])),
-?line <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^ab\\]cde]","GVUo\\1m&I",[])),
-?line <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^ab\\]cde]","GVUo\\1m&I",[global])),
-?line <<"ething">> = iolist_to_binary(re:replace("ething","^[^ab\\]cde]","Ms\\1&GwiawlCHng&EEX",[])),
-?line <<"ething">> = iolist_to_binary(re:replace("ething","^[^ab\\]cde]","Ms\\1&GwiawlCHng&EEX",[global])),
-?line <<"lqtFwcAYthing">> = iolist_to_binary(re:replace("athing","^[^]cde]","lqtFwcAY",[])),
-?line <<"lqtFwcAYthing">> = iolist_to_binary(re:replace("athing","^[^]cde]","lqtFwcAY",[global])),
-?line <<"Fxtpjthing">> = iolist_to_binary(re:replace("fthing","^[^]cde]","Fxt\\1pj",[])),
-?line <<"Fxtpjthing">> = iolist_to_binary(re:replace("fthing","^[^]cde]","Fxt\\1pj",[global])),
-?line <<"xT*oD*U** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^]cde]","xT&oD\\1&U",[])),
-?line <<"xT*oD*U** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^]cde]","xT&oD\\1&U",[global])),
-?line <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^]cde]","R\\1M&\\1m",[])),
-?line <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^]cde]","R\\1M&\\1m",[global])),
-?line <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^]cde]","\\1tF\\1WOFN&fB",[])),
-?line <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^]cde]","\\1tF\\1WOFN&fB",[global])),
-?line <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^]cde]","y\\1I&MoqRPG&GQa\\1l",[])),
-?line <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^]cde]","y\\1I&MoqRPG&GQa\\1l",[global])),
-?line <<"ething">> = iolist_to_binary(re:replace("ething","^[^]cde]","AsxwUn\\1GqkWNdgRJk",[])),
-?line <<"ething">> = iolist_to_binary(re:replace("ething","^[^]cde]","AsxwUn\\1GqkWNdgRJk",[global])),
-?line <<"RornKmOnaFrtWgtW">> = iolist_to_binary(re:replace("","^\\","R\\1o\\1r\\1nKmOnaFr&tWgtW",[])),
-?line <<"RornKmOnaFrtWgtW">> = iolist_to_binary(re:replace("","^\\","R\\1o\\1r\\1nKmOnaFr&tWgtW",[global])),
-?line <<"ufbmbfOYuKÿwfÿEÿdx">> = iolist_to_binary(re:replace("ÿ","^ÿ","ufbmbfOYuK&wf&E&\\1dx",[])),
-?line <<"ufbmbfOYuKÿwfÿEÿdx">> = iolist_to_binary(re:replace("ÿ","^ÿ","ufbmbfOYuK&wf&E&\\1dx",[global])),
-?line <<"oAdJme0jw">> = iolist_to_binary(re:replace("0","^[0-9]+$","oAdJme\\1&jw",[])),
-?line <<"oAdJme0jw">> = iolist_to_binary(re:replace("0","^[0-9]+$","oAdJme\\1&jw",[global])),
-?line <<"1aoKN">> = iolist_to_binary(re:replace("1","^[0-9]+$","&aoKN",[])),
-?line <<"1aoKN">> = iolist_to_binary(re:replace("1","^[0-9]+$","&aoKN",[global])),
-?line <<"tIHn">> = iolist_to_binary(re:replace("2","^[0-9]+$","tIHn\\1",[])),
-?line <<"tIHn">> = iolist_to_binary(re:replace("2","^[0-9]+$","tIHn\\1",[global])),
-?line <<"wgA3cJbrrCyMvMXM3">> = iolist_to_binary(re:replace("3","^[0-9]+$","wgA&cJbrrCyMv\\1M\\1XM&",[])),
-?line <<"wgA3cJbrrCyMvMXM3">> = iolist_to_binary(re:replace("3","^[0-9]+$","wgA&cJbrrCyMv\\1M\\1XM&",[global])),
-?line <<"huUpJ">> = iolist_to_binary(re:replace("4","^[0-9]+$","huUpJ",[])),
-?line <<"huUpJ">> = iolist_to_binary(re:replace("4","^[0-9]+$","huUpJ",[global])),
-?line <<"Fe5F5">> = iolist_to_binary(re:replace("5","^[0-9]+$","F\\1e&F&",[])),
-?line <<"Fe5F5">> = iolist_to_binary(re:replace("5","^[0-9]+$","F\\1e&F&",[global])),
-?line <<"HJ">> = iolist_to_binary(re:replace("6","^[0-9]+$","HJ",[])),
-?line <<"HJ">> = iolist_to_binary(re:replace("6","^[0-9]+$","HJ",[global])),
-?line <<"e">> = iolist_to_binary(re:replace("7","^[0-9]+$","e",[])),
-?line <<"e">> = iolist_to_binary(re:replace("7","^[0-9]+$","e",[global])),
-?line <<"Fmds88NtMX">> = iolist_to_binary(re:replace("8","^[0-9]+$","F\\1mds&&Nt\\1MX",[])),
-?line <<"Fmds88NtMX">> = iolist_to_binary(re:replace("8","^[0-9]+$","F\\1mds&&Nt\\1MX",[global])),
-?line <<"99cE9SqMch">> = iolist_to_binary(re:replace("9","^[0-9]+$","&&cE&\\1SqMch",[])),
-?line <<"99cE9SqMch">> = iolist_to_binary(re:replace("9","^[0-9]+$","&&cE&\\1SqMch",[global])),
-?line <<"xhR">> = iolist_to_binary(re:replace("10","^[0-9]+$","xhR",[])),
-?line <<"xhR">> = iolist_to_binary(re:replace("10","^[0-9]+$","xhR",[global])),
-?line <<"j100">> = iolist_to_binary(re:replace("100","^[0-9]+$","j&",[])),
-?line <<"j100">> = iolist_to_binary(re:replace("100","^[0-9]+$","j&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[0-9]+$","SR&tOYsEgJid&hfCF",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[0-9]+$","SR&tOYsEgJid&hfCF",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","^[0-9]+$","JK&",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","^[0-9]+$","JK&",[global])),
-?line <<"rXjkB">> = iolist_to_binary(re:replace("enter","^.*nter","rXjkB",[])),
-?line <<"rXjkB">> = iolist_to_binary(re:replace("enter","^.*nter","rXjkB",[global])),
-?line <<"oOEtqV">> = iolist_to_binary(re:replace("inter","^.*nter","oO\\1EtqV",[])),
-?line <<"oOEtqV">> = iolist_to_binary(re:replace("inter","^.*nter","oO\\1EtqV",[global])),
-?line <<"">> = iolist_to_binary(re:replace("uponter","^.*nter","\\1",[])),
-?line <<"">> = iolist_to_binary(re:replace("uponter","^.*nter","\\1",[global])),
-?line <<"SODUcOgFnbuQEN">> = iolist_to_binary(re:replace("xxx0","^xxx[0-9]+$","\\1\\1SODU\\1\\1cOgFnbuQEN",[])),
-?line <<"SODUcOgFnbuQEN">> = iolist_to_binary(re:replace("xxx0","^xxx[0-9]+$","\\1\\1SODU\\1\\1cOgFnbuQEN",[global])),
-?line <<"hsacOxxx1234kudxxx1234sEIrIdI">> = iolist_to_binary(re:replace("xxx1234","^xxx[0-9]+$","hsacO\\1&kud&s\\1EIrIdI\\1",[])),
-?line <<"hsacOxxx1234kudxxx1234sEIrIdI">> = iolist_to_binary(re:replace("xxx1234","^xxx[0-9]+$","hsacO\\1&kud&s\\1EIrIdI\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^xxx[0-9]+$","e",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^xxx[0-9]+$","e",[global])),
-?line <<"xxx">> = iolist_to_binary(re:replace("xxx","^xxx[0-9]+$","oSBYD&M",[])),
-?line <<"xxx">> = iolist_to_binary(re:replace("xxx","^xxx[0-9]+$","oSBYD&M",[global])),
-?line <<"x123HgGUYCx123PowSBtYb">> = iolist_to_binary(re:replace("x123","^.+[0-9][0-9][0-9]$","&HgGUYC&PowSBtY\\1b",[])),
-?line <<"x123HgGUYCx123PowSBtYb">> = iolist_to_binary(re:replace("x123","^.+[0-9][0-9][0-9]$","&HgGUYC&PowSBtY\\1b",[global])),
-?line <<"mEVxx123SNuYPQIaJ">> = iolist_to_binary(re:replace("xx123","^.+[0-9][0-9][0-9]$","mE\\1V\\1&SNuYPQIa\\1J",[])),
-?line <<"mEVxx123SNuYPQIaJ">> = iolist_to_binary(re:replace("xx123","^.+[0-9][0-9][0-9]$","mE\\1V\\1&SNuYPQIa\\1J",[global])),
-?line <<"l123456O123456">> = iolist_to_binary(re:replace("123456","^.+[0-9][0-9][0-9]$","l&O&",[])),
-?line <<"l123456O123456">> = iolist_to_binary(re:replace("123456","^.+[0-9][0-9][0-9]$","l&O&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+[0-9][0-9][0-9]$","MX&hxvs",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+[0-9][0-9][0-9]$","MX&hxvs",[global])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^.+[0-9][0-9][0-9]$","RBYgTXkgO&TLdWqjEUps",[])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^.+[0-9][0-9][0-9]$","RBYgTXkgO&TLdWqjEUps",[global])),
-?line <<"fgx1234">> = iolist_to_binary(re:replace("x1234","^.+[0-9][0-9][0-9]$","fg&",[])),
-?line <<"fgx1234">> = iolist_to_binary(re:replace("x1234","^.+[0-9][0-9][0-9]$","fg&",[global])),
-?line <<"FLbkgx123RdPrD">> = iolist_to_binary(re:replace("x123","^.+?[0-9][0-9][0-9]$","FLbkg&R\\1dPrD",[])),
-?line <<"FLbkgx123RdPrD">> = iolist_to_binary(re:replace("x123","^.+?[0-9][0-9][0-9]$","FLbkg&R\\1dPrD",[global])),
-?line <<"C">> = iolist_to_binary(re:replace("xx123","^.+?[0-9][0-9][0-9]$","C",[])),
-?line <<"C">> = iolist_to_binary(re:replace("xx123","^.+?[0-9][0-9][0-9]$","C",[global])),
-?line <<"oWjVDKTAoaLU">> = iolist_to_binary(re:replace("123456","^.+?[0-9][0-9][0-9]$","oW\\1jVDK\\1TAoaLU",[])),
-?line <<"oWjVDKTAoaLU">> = iolist_to_binary(re:replace("123456","^.+?[0-9][0-9][0-9]$","oW\\1jVDK\\1TAoaLU",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+?[0-9][0-9][0-9]$","xA&\\1sIV",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+?[0-9][0-9][0-9]$","xA&\\1sIV",[global])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^.+?[0-9][0-9][0-9]$","ONX&",[])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^.+?[0-9][0-9][0-9]$","ONX&",[global])),
-?line <<"oLgQtiSmGx1234wqbuoRB">> = iolist_to_binary(re:replace("x1234","^.+?[0-9][0-9][0-9]$","\\1oLgQtiSm\\1\\1G&wqbuoRB",[])),
-?line <<"oLgQtiSmGx1234wqbuoRB">> = iolist_to_binary(re:replace("x1234","^.+?[0-9][0-9][0-9]$","\\1oLgQtiSm\\1\\1G&wqbuoRB",[global])),
-?line <<"mcpuCvaabc!pqr=apquxz.ixr.zzz.ac.ukgabc!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","mcpuCva&g&",[])),
-?line <<"mcpuCvaabc!pqr=apquxz.ixr.zzz.ac.ukgabc!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","mcpuCva&g&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","J&a\\1HaapJjylMMyeA\\1e",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","J&a\\1HaapJjylMMyeA\\1e",[global])),
-?line <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","FOOFh&nQLU\\1c",[])),
-?line <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","FOOFh&nQLU\\1c",[global])),
-?line <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","H\\1G",[])),
-?line <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","H\\1G",[global])),
-?line <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","&tBS&",[])),
-?line <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","&tBS&",[global])),
-?line <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","Gd&\\1CN\\1",[])),
-?line <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","Gd&\\1CN\\1",[global])),
-?line <<"Well, we need a colonGTdcJbUips: somewhere">> = iolist_to_binary(re:replace("Well, we need a colon: somewhere",":","GTdc\\1J\\1bUips\\1&",[])),
-?line <<"Well, we need a colonGTdcJbUips: somewhere">> = iolist_to_binary(re:replace("Well, we need a colon: somewhere",":","GTdc\\1J\\1bUips\\1&",[global])),
-?line <<"*** Fail if we don't">> = iolist_to_binary(re:replace("*** Fail if we don't",":","d",[])),
-?line <<"*** Fail if we don't">> = iolist_to_binary(re:replace("*** Fail if we don't",":","d",[global])),
-?line <<"0abcDqVs0abc0abcptNR">> = iolist_to_binary(re:replace("0abc","([\\da-f:]+)$","\\1DqVs\\1\\1ptNR",[caseless])),
-?line <<"0abcDqVs0abc0abcptNR">> = iolist_to_binary(re:replace("0abc","([\\da-f:]+)$","\\1DqVs\\1\\1ptNR",[caseless,
- global])),
-?line <<"abctJK">> = iolist_to_binary(re:replace("abc","([\\da-f:]+)$","&tJK",[caseless])),
-?line <<"abctJK">> = iolist_to_binary(re:replace("abc","([\\da-f:]+)$","&tJK",[caseless,
- global])),
-?line <<"quighClnfedRB">> = iolist_to_binary(re:replace("fed","([\\da-f:]+)$","quighCln\\1RB",[caseless])),
-?line <<"quighClnfedRB">> = iolist_to_binary(re:replace("fed","([\\da-f:]+)$","quighCln\\1RB",[caseless,
- global])),
-?line <<"ENd">> = iolist_to_binary(re:replace("E","([\\da-f:]+)$","\\1Nd",[caseless])),
-?line <<"ENd">> = iolist_to_binary(re:replace("E","([\\da-f:]+)$","\\1Nd",[caseless,
- global])),
-?line <<"o::U::lkIj::XoRWPah::s">> = iolist_to_binary(re:replace("::","([\\da-f:]+)$","o&U&lkIj\\1XoRWPah&s",[caseless])),
-?line <<"o::U::lkIj::XoRWPah::s">> = iolist_to_binary(re:replace("::","([\\da-f:]+)$","o&U&lkIj\\1XoRWPah&s",[caseless,
- global])),
-?line <<"ab5f03:12C0::932eONbt5f03:12C0::932ehnfLI5f03:12C0::932esqYx5f03:12C0::932e">> = iolist_to_binary(re:replace("5f03:12C0::932e","([\\da-f:]+)$","ab&ONbt\\1hnfLI\\1sqYx&",[caseless])),
-?line <<"ab5f03:12C0::932eONbt5f03:12C0::932ehnfLI5f03:12C0::932esqYx5f03:12C0::932e">> = iolist_to_binary(re:replace("5f03:12C0::932e","([\\da-f:]+)$","ab&ONbt\\1hnfLI\\1sqYx&",[caseless,
- global])),
-?line <<"fed OAMdefijvdef">> = iolist_to_binary(re:replace("fed def","([\\da-f:]+)$","OAM\\1ijv&",[caseless])),
-?line <<"fed OAMdefijvdef">> = iolist_to_binary(re:replace("fed def","([\\da-f:]+)$","OAM\\1ijv&",[caseless,
- global])),
-?line <<"Any old stuSVffaffeYffCjDlYffhWTMo">> = iolist_to_binary(re:replace("Any old stuff","([\\da-f:]+)$","SV&a\\1eY&CjDlY&hWTMo",[caseless])),
-?line <<"Any old stuSVffaffeYffCjDlYffhWTMo">> = iolist_to_binary(re:replace("Any old stuff","([\\da-f:]+)$","SV&a\\1eY&CjDlY&hWTMo",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","([\\da-f:]+)$","j&R\\1oXiR",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","([\\da-f:]+)$","j&R\\1oXiR",[caseless,
- global])),
-?line <<"0zzz">> = iolist_to_binary(re:replace("0zzz","([\\da-f:]+)$","&HUuWH\\1&VEg",[caseless])),
-?line <<"0zzz">> = iolist_to_binary(re:replace("0zzz","([\\da-f:]+)$","&HUuWH\\1&VEg",[caseless,
- global])),
-?line <<"gzzz">> = iolist_to_binary(re:replace("gzzz","([\\da-f:]+)$","l&n&p&DKUsLBFC",[caseless])),
-?line <<"gzzz">> = iolist_to_binary(re:replace("gzzz","([\\da-f:]+)$","l&n&p&DKUsLBFC",[caseless,
- global])),
-?line <<"fed ">> = iolist_to_binary(re:replace("fed ","([\\da-f:]+)$","KuLffd&Y",[caseless])),
-?line <<"fed ">> = iolist_to_binary(re:replace("fed ","([\\da-f:]+)$","KuLffd&Y",[caseless,
- global])),
-?line <<"Any old rubbish">> = iolist_to_binary(re:replace("Any old rubbish","([\\da-f:]+)$","Mid\\1",[caseless])),
-?line <<"Any old rubbish">> = iolist_to_binary(re:replace("Any old rubbish","([\\da-f:]+)$","Mid\\1",[caseless,
+ run0(),
+ run1(),
+ run2(),
+ run3(),
+ run4(),
+ run5(),
+ run6(),
+ run7(),
+ run8(),
+ run9(),
+ run10(),
+ run11(),
+ run12(),
+ run13(),
+ run14(),
+ run15(),
+ run16(),
+ run17(),
+ run18(),
+ run19(),
+ run20(),
+ run21(),
+ run22(),
+ run23(),
+ run24(),
+ run25(),
+ run26(),
+ run27(),
+ run28(),
+ run29(),
+ run30(),
+ run31(),
+ run32(),
+ run33(),
+ run34(),
+ run35(),
+ run36(),
+ run37(),
+ run38(),
+ run39(),
+ run40(),
+ run41(),
+ run42(),
+ run43(),
+ run44(),
+ run45(),
+ run46(),
+ run47(),
+ run48(),
+ run49(),
+ run50(),
+ run51(),
+ run52(),
+ run53(),
+ run54(),
+ ok.
+run0() ->
+ <<"KXii">> = iolist_to_binary(re:replace("the quick brown fox","the quick brown fox","KXii",[])),
+ <<"KXii">> = iolist_to_binary(re:replace("the quick brown fox","the quick brown fox","KXii",[global])),
+ <<"The quick brown FOX">> = iolist_to_binary(re:replace("The quick brown FOX","the quick brown fox","HRC\\1&rBc&X&M\\1",[])),
+ <<"The quick brown FOX">> = iolist_to_binary(re:replace("The quick brown FOX","the quick brown fox","HRC\\1&rBc&X&M\\1",[global])),
+ <<"What do you know about Hthe quick brown foxgViGthe quick brown fox?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","the quick brown fox","H&gViG\\1&",[])),
+ <<"What do you know about Hthe quick brown foxgViGthe quick brown fox?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","the quick brown fox","H&gViG\\1&",[global])),
+ <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","the quick brown fox","N&hDtbGaV",[])),
+ <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","the quick brown fox","N&hDtbGaV",[global])),
+ <<"hQCthe quick brown foxthe quick brown foxjQpvbBuHjthe quick brown foxw">> = iolist_to_binary(re:replace("the quick brown fox","The quick brown fox","hQC&&jQ\\1pvbBuHj&w",[caseless])),
+ <<"hQCthe quick brown foxthe quick brown foxjQpvbBuHjthe quick brown foxw">> = iolist_to_binary(re:replace("the quick brown fox","The quick brown fox","hQC&&jQ\\1pvbBuHj&w",[caseless,
+ global])),
+ <<"gkWwP">> = iolist_to_binary(re:replace("The quick brown FOX","The quick brown fox","gkWwP",[caseless])),
+ <<"gkWwP">> = iolist_to_binary(re:replace("The quick brown FOX","The quick brown fox","gkWwP",[caseless,
+ global])),
+ <<"What do you know about ncBxuJXMsIrBx?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","The quick brown fox","ncBxuJXMsIr\\1Bx",[caseless])),
+ <<"What do you know about ncBxuJXMsIrBx?">> = iolist_to_binary(re:replace("What do you know about the quick brown fox?","The quick brown fox","ncBxuJXMsIr\\1Bx",[caseless,
+ global])),
+ <<"What do you know about ESkbGx?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","The quick brown fox","ESkbGx",[caseless])),
+ <<"What do you know about ESkbGx?">> = iolist_to_binary(re:replace("What do you know about THE QUICK BROWN FOX?","The quick brown fox","ESkbGx",[caseless,
+ global])),
+ <<"UImxeSkabcd
+ 9;$\\?caxyzF">> = iolist_to_binary(re:replace("abcd
+ 9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz","UImxeSk&F",[])),
+ <<"UImxeSkabcd
+ 9;$\\?caxyzF">> = iolist_to_binary(re:replace("abcd
+ 9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz","UImxeSk&F",[global])),
+ <<"LhHLabxyzpqrrrabbxyyyypqAzzkWRsxabxyzpqrrrabbxyyyypqAzzVMIt">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","LhHL&kWRsx\\1\\1&VMIt",[])),
+ <<"LhHLabxyzpqrrrabbxyyyypqAzzkWRsxabxyzpqrrrabbxyyyypqAzzVMIt">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","LhHL&kWRsx\\1\\1&VMIt",[global])),
+ <<"HLabxyzpqrrrabbxyyyypqAzzOTupMnssabxyzpqrrrabbxyyyypqAzzJs">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","HL&OTupMnss&\\1Js",[])),
+ <<"HLabxyzpqrrrabbxyyyypqAzzOTupMnssabxyzpqrrrabbxyyyypqAzzJs">> = iolist_to_binary(re:replace("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","HL&OTupMnss&\\1Js",[global])),
+ <<"HrnoCAoMBaabxyzpqrrrabbxyyyypqAzzUYaabxyzpqrrrabbxyyyypqAzzXaabxyzpqrrrabbxyyyypqAzzaabxyzpqrrrabbxyyyypqAzzaabxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","HrnoCA\\1oM\\1B&\\1UY&X&&&",[])),
+ <<"HrnoCAoMBaabxyzpqrrrabbxyyyypqAzzUYaabxyzpqrrrabbxyyyypqAzzXaabxyzpqrrrabbxyyyypqAzzaabxyzpqrrrabbxyyyypqAzzaabxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","HrnoCA\\1oM\\1B&\\1UY&X&&&",[global])),
+ <<"aaabxyzpqrrrabbxyyyypqAzzsiD">> = iolist_to_binary(re:replace("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&siD",[])),
+ <<"aaabxyzpqrrrabbxyyyypqAzzsiD">> = iolist_to_binary(re:replace("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&siD",[global])),
+ <<"aaaabxyzpqrrrabbxyyyypqAzzqgRtoWloBl">> = iolist_to_binary(re:replace("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&q\\1gRt\\1oWloB\\1\\1\\1l",[])),
+ <<"aaaabxyzpqrrrabbxyyyypqAzzqgRtoWloBl">> = iolist_to_binary(re:replace("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&q\\1gRt\\1oWloB\\1\\1\\1l",[global])),
+ <<"sRmsQabcxyzpqrrrabbxyyyypqAzzThd">> = iolist_to_binary(re:replace("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sRmsQ&Thd",[])),
+ <<"sRmsQabcxyzpqrrrabbxyyyypqAzzThd">> = iolist_to_binary(re:replace("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sRmsQ&Thd",[global])),
+ <<"aabcxyzpqrrrabbxyyyypqAzzRHoaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&RHo&",[])),
+ <<"aabcxyzpqrrrabbxyyyypqAzzRHoaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&RHo&",[global])),
+ <<"kaaabcxyzpqrrrabbxyyyypAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","k\\1&",[])),
+ <<"kaaabcxyzpqrrrabbxyyyypAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","k\\1&",[global])),
+ <<"RxvGiseEerlAfPpFb">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","RxvGiseEerlAfPp\\1F\\1b",[])),
+ <<"RxvGiseEerlAfPpFb">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","RxvGiseEerlAfPp\\1F\\1b",[global])),
+ <<"sUgRgemex">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sUgR\\1gem\\1ex\\1",[])),
+ <<"sUgRgemex">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sUgR\\1gem\\1ex\\1",[global])),
+ <<"S">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","S",[])),
+ <<"S">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","S",[global])),
+ <<"QCVAHkaaabcxyzpqrrrabbxyyyypqqqqAzzCsM">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","QCVAHk&CsM",[])),
+ <<"QCVAHkaaabcxyzpqrrrabbxyyyypqqqqAzzCsM">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","QCVAHk&CsM",[global])),
+ <<"kV">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","kV",[])),
+ <<"kV">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","kV",[global])),
+ <<"sEX">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sEX",[])),
+ <<"sEX">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sEX",[global])),
+ <<"lgaaaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1lg&",[])),
+ <<"lgaaaabcxyzpqrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1lg&",[global])),
+ <<"H">> = iolist_to_binary(re:replace("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","H",[])),
+ <<"H">> = iolist_to_binary(re:replace("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","H",[global])),
+ <<"sLyaabxyzzzpqrrrabbxyyyypqAzzJJPghXisEdXaabxyzzzpqrrrabbxyyyypqAzzS">> = iolist_to_binary(re:replace("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sLy&JJPghXi\\1sEdX&S\\1",[])),
+ <<"sLyaabxyzzzpqrrrabbxyyyypqAzzJJPghXisEdXaabxyzzzpqrrrabbxyyyypqAzzS">> = iolist_to_binary(re:replace("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","sLy&JJPghXi\\1sEdX&S\\1",[global])),
+ <<"">> = iolist_to_binary(re:replace("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1",[])),
+ <<"">> = iolist_to_binary(re:replace("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1",[global])),
+ <<"XHrPpSaaaabxyzzzzpqrrrabbxyyyypqAzzgAh">> = iolist_to_binary(re:replace("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XHr\\1PpS&gAh",[])),
+ <<"XHrPpSaaaabxyzzzzpqrrrabbxyyyypqAzzgAh">> = iolist_to_binary(re:replace("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XHr\\1PpS&gAh",[global])),
+ <<"NeJBabcxyzzpqrrrabbxyyyypqAzzGo">> = iolist_to_binary(re:replace("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","NeJB&Go",[])),
+ <<"NeJBabcxyzzpqrrrabbxyyyypqAzzGo">> = iolist_to_binary(re:replace("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","NeJB&Go",[global])),
+ <<"mu">> = iolist_to_binary(re:replace("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","mu",[])),
+ <<"mu">> = iolist_to_binary(re:replace("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","mu",[global])),
+ <<"aaabcxyzzzzpqrrrabbxyyyypqAzzaaabcxyzzzzpqrrrabbxyyyypqAzzN">> = iolist_to_binary(re:replace("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&&N",[])),
+ <<"aaabcxyzzzzpqrrrabbxyyyypqAzzaaabcxyzzzzpqrrrabbxyyyypqAzzN">> = iolist_to_binary(re:replace("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","&&N",[global])),
+ <<"TY">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","TY",[])),
+ <<"TY">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","TY",[global])),
+ <<"BSUyMaaaabcxyzzzzpqrrrabbbxyyyypqAzzeeab">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","BSUyM&e\\1eab",[])),
+ <<"BSUyMaaaabcxyzzzzpqrrrabbbxyyyypqAzzeeab">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","BSUyM&e\\1eab",[global])),
+ <<"bLbpTaaaabcxyzzzzpqrrrabbbxyyyyypqAzzcn">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1bLbp\\1T&cn",[])),
+ <<"bLbpTaaaabcxyzzzzpqrrrabbbxyyyyypqAzzcn">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1bLbp\\1T&cn",[global])),
+ <<"qOqibaaabcxyzpqrrrabbxyyyypABzzFnNENBaaabcxyzpqrrrabbxyyyypABzza">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","qOqib&F\\1\\1nNENB\\1&a",[])),
+ <<"qOqibaaabcxyzpqrrrabbxyyyypABzzFnNENBaaabcxyzpqrrrabbxyyyypABzza">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","qOqib&F\\1\\1nNENB\\1&a",[global])),
+ <<"SBfQjRuQKXkm">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","SBf\\1\\1QjR\\1uQKXkm\\1",[])),
+ <<"SBfQjRuQKXkm">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","SBf\\1\\1QjR\\1uQKXkm\\1",[global])),
+ <<">>>bVaaabxyzpqrrrabbxyyyypqAzzaaabxyzpqrrrabbxyyyypqAzzAiToCwaaabxyzpqrrrabbxyyyypqAzzcehOK">> = iolist_to_binary(re:replace(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","bV\\1\\1&&\\1AiToCw&cehOK",[])),
+ <<">>>bVaaabxyzpqrrrabbxyyyypqAzzaaabxyzpqrrrabbxyyyypqAzzAiToCwaaabxyzpqrrrabbxyyyypqAzzcehOK">> = iolist_to_binary(re:replace(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","bV\\1\\1&&\\1AiToCw&cehOK",[global])),
+ <<">RYHNAEdfNPaaaabxyzpqrrrabbxyyyypqAzzHLi">> = iolist_to_binary(re:replace(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","RY\\1HNA\\1\\1EdfNP&HLi",[])),
+ <<">RYHNAEdfNPaaaabxyzpqrrrabbxyyyypqAzzHLi">> = iolist_to_binary(re:replace(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","RY\\1HNA\\1\\1EdfNP&HLi",[global])),
+ <<">>>>wRIXabcxyzpqrrrabbxyyyypqAzzhabcxyzpqrrrabbxyyyypqAzzaCoikaFu">> = iolist_to_binary(re:replace(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1wRIX&h&aCoika\\1Fu",[])),
+ <<">>>>wRIXabcxyzpqrrrabbxyyyypqAzzhabcxyzpqrrrabbxyyyypqAzzaCoikaFu">> = iolist_to_binary(re:replace(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","\\1wRIX&h&aCoika\\1Fu",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XSdFB",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","XSdFB",[global])),
+ <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","p&sjpo&\\1MeLw",[])),
+ <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","p&sjpo&\\1MeLw",[global])),
+ <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Np\\1BvTaI&WRss&",[])),
+ <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Np\\1BvTaI&WRss&",[global])),
+ <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Jm\\1&IqjePLT",[])),
+ <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(re:replace("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","Jm\\1&IqjePLT",[global])),
+ <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","X&\\1EJejYwBT\\1N&Vu\\1\\1hj",[])),
+ <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","X&\\1EJejYwBT\\1N&Vu\\1\\1hj",[global])),
+ <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","ACr\\1ExPn&TggeSRc&pgC",[])),
+ <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(re:replace("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","ACr\\1ExPn&TggeSRc&pgC",[global])),
+ <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","AQG",[])),
+ <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(re:replace("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz","AQG",[global])),
+ <<"Ms">> = iolist_to_binary(re:replace("abczz","^(abc){1,2}zz","Ms",[])),
+ <<"Ms">> = iolist_to_binary(re:replace("abczz","^(abc){1,2}zz","Ms",[global])),
+ <<"abcjqKYJWAabcabczzXCsCP">> = iolist_to_binary(re:replace("abcabczz","^(abc){1,2}zz","\\1jqKYJWA&XCsCP",[])),
+ <<"abcjqKYJWAabcabczzXCsCP">> = iolist_to_binary(re:replace("abcabczz","^(abc){1,2}zz","\\1jqKYJWA&XCsCP",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(abc){1,2}zz","Q\\1PQoCjb\\1eQ&\\1JaSTQ",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(abc){1,2}zz","Q\\1PQoCjb\\1eQ&\\1JaSTQ",[global])),
+ <<"zz">> = iolist_to_binary(re:replace("zz","^(abc){1,2}zz","DxU",[])),
+ <<"zz">> = iolist_to_binary(re:replace("zz","^(abc){1,2}zz","DxU",[global])),
+ <<"abcabcabczz">> = iolist_to_binary(re:replace("abcabcabczz","^(abc){1,2}zz","wRiyMR&vafm&",[])),
+ <<"abcabcabczz">> = iolist_to_binary(re:replace("abcabcabczz","^(abc){1,2}zz","wRiyMR&vafm&",[global])),
+ <<">>abczz">> = iolist_to_binary(re:replace(">>abczz","^(abc){1,2}zz","fCQBocoTpl&om",[])),
+ <<">>abczz">> = iolist_to_binary(re:replace(">>abczz","^(abc){1,2}zz","fCQBocoTpl&om",[global])),
+ <<"BbtYviciAuOmX">> = iolist_to_binary(re:replace("bc","^(b+?|a){1,2}?c","B\\1tYviciAuOmX",[])),
+ <<"BbtYviciAuOmX">> = iolist_to_binary(re:replace("bc","^(b+?|a){1,2}?c","B\\1tYviciAuOmX",[global])),
+ <<"bbcbbcmoxNDbcM">> = iolist_to_binary(re:replace("bbc","^(b+?|a){1,2}?c","&&moxND\\1cM",[])),
+ <<"bbcbbcmoxNDbcM">> = iolist_to_binary(re:replace("bbc","^(b+?|a){1,2}?c","&&moxND\\1cM",[global])),
+ <<"HmYAbbbcbbuUEdmhvgxQbbbb">> = iolist_to_binary(re:replace("bbbc","^(b+?|a){1,2}?c","HmYA&\\1uUEdmhvgxQ\\1\\1",[])),
+ <<"HmYAbbbcbbuUEdmhvgxQbbbb">> = iolist_to_binary(re:replace("bbbc","^(b+?|a){1,2}?c","HmYA&\\1uUEdmhvgxQ\\1\\1",[global])),
+ <<"YRq">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","YRq",[])),
+ <<"YRq">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","YRq",[global])),
+ <<"bbacaOVQYgoesBaHi">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","&\\1OVQYgoesB\\1Hi",[])),
+ <<"bbacaOVQYgoesBaHi">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","&\\1OVQYgoesB\\1Hi",[global])),
+ <<"dIraaacvlpk">> = iolist_to_binary(re:replace("aac","^(b+?|a){1,2}?c","dIr\\1&vlpk",[])),
+ <<"dIraaacvlpk">> = iolist_to_binary(re:replace("aac","^(b+?|a){1,2}?c","dIr\\1&vlpk",[global])),
+ <<"KbbbbbbbbbbbobbbbbbbbbbbFjgyx">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+?|a){1,2}?c","K\\1o\\1Fjgyx",[])),
+ <<"KbbbbbbbbbbbobbbbbbbbbbbFjgyx">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+?|a){1,2}?c","K\\1o\\1Fjgyx",[global])),
+ <<"dkNSkahOVMwoAfbbbbbbbbbbbacchbbbbbbbbbbbacKA">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+?|a){1,2}?c","dkNSk\\1hOVMwoAf&ch&KA",[])),
+ <<"dkNSkahOVMwoAfbbbbbbbbbbbacchbbbbbbbbbbbacKA">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+?|a){1,2}?c","dkNSk\\1hOVMwoAf&ch&KA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+?|a){1,2}?c","lRqMfmvH",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+?|a){1,2}?c","lRqMfmvH",[global])),
+ <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+?|a){1,2}?c","Ya\\1SeSYOH",[])),
+ <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+?|a){1,2}?c","Ya\\1SeSYOH",[global])),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+?|a){1,2}?c","Mjs\\1&mpd",[])),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+?|a){1,2}?c","Mjs\\1&mpd",[global])),
+ <<"MbGjTbfbuoXTyLDU">> = iolist_to_binary(re:replace("bc","^(b+|a){1,2}c","M\\1GjT\\1f\\1uoXTyLDU",[])),
+ <<"MbGjTbfbuoXTyLDU">> = iolist_to_binary(re:replace("bc","^(b+|a){1,2}c","M\\1GjT\\1f\\1uoXTyLDU",[global])),
+ <<"Xbbbbcbbihpfm">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}c","X\\1&\\1ihpfm",[])),
+ <<"Xbbbbcbbihpfm">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}c","X\\1&\\1ihpfm",[global])),
+ <<"bbbbbbpCDbbLKbbbq">> = iolist_to_binary(re:replace("bbbc","^(b+|a){1,2}c","\\1\\1pCDbbLK\\1q",[])),
+ <<"bbbbbbpCDbbLKbbbq">> = iolist_to_binary(re:replace("bbbc","^(b+|a){1,2}c","\\1\\1pCDbbLK\\1q",[global])),
+ <<"bacjc">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}c","&jc",[])),
+ <<"bacjc">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}c","&jc",[global])),
+ <<"bbacmybbacWtbbacjPQXaybbacl">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}c","&my&Wt&jPQXay&l",[])),
+ <<"bbacmybbacWtbbacjPQXaybbacl">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}c","&my&Wt&jPQXay&l",[global])),
+ <<"QcYXpaaGA">> = iolist_to_binary(re:replace("aac","^(b+|a){1,2}c","QcYXpa\\1GA",[])),
+ <<"QcYXpaaGA">> = iolist_to_binary(re:replace("aac","^(b+|a){1,2}c","QcYXpa\\1GA",[global])),
+ <<"habbbbbbbbbbbcYbbbbbbbbbbbY">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+|a){1,2}c","h&Y\\1Y",[])),
+ <<"habbbbbbbbbbbcYbbbbbbbbbbbY">> = iolist_to_binary(re:replace("abbbbbbbbbbbc","^(b+|a){1,2}c","h&Y\\1Y",[global])),
+ <<"DkD">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+|a){1,2}c","DkD",[])),
+ <<"DkD">> = iolist_to_binary(re:replace("bbbbbbbbbbbac","^(b+|a){1,2}c","DkD",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+|a){1,2}c","UgARueRrJoL\\1\\1WgjAP",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b+|a){1,2}c","UgARueRrJoL\\1\\1WgjAP",[global])),
+ <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+|a){1,2}c","IGJPbXNc&kfu\\1xi",[])),
+ <<"aaac">> = iolist_to_binary(re:replace("aaac","^(b+|a){1,2}c","IGJPbXNc&kfu\\1xi",[global])),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+|a){1,2}c","pWvBeG&&iyL",[])),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(re:replace("abbbbbbbbbbbac","^(b+|a){1,2}c","pWvBeG&&iyL",[global])),
+ <<"g">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}?bc","g",[])),
+ <<"g">> = iolist_to_binary(re:replace("bbc","^(b+|a){1,2}?bc","g",[global])),
+ <<"rXsdbaababcQbambabcWcnvbj">> = iolist_to_binary(re:replace("babc","^(b*|ba){1,2}?bc","rXsd\\1a&Q\\1m&Wcnvbj",[])),
+ <<"rXsdbaababcQbambabcWcnvbj">> = iolist_to_binary(re:replace("babc","^(b*|ba){1,2}?bc","rXsd\\1a&Q\\1m&Wcnvbj",[global])),
+ <<"x">> = iolist_to_binary(re:replace("bbabc","^(b*|ba){1,2}?bc","x",[])),
+ <<"x">> = iolist_to_binary(re:replace("bbabc","^(b*|ba){1,2}?bc","x",[global])),
+ <<"TMNcgqpTbaE">> = iolist_to_binary(re:replace("bababc","^(b*|ba){1,2}?bc","TMNcgqpT\\1E",[])),
+ <<"TMNcgqpTbaE">> = iolist_to_binary(re:replace("bababc","^(b*|ba){1,2}?bc","TMNcgqpT\\1E",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b*|ba){1,2}?bc","IM",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(b*|ba){1,2}?bc","IM",[global])),
+ <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(b*|ba){1,2}?bc","TbVp\\1&mhNgFw\\1",[])),
+ <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(b*|ba){1,2}?bc","TbVp\\1&mhNgFw\\1",[global])),
+ <<"babababc">> = iolist_to_binary(re:replace("babababc","^(b*|ba){1,2}?bc","&yrdhkl&hx&\\1M\\1\\1BiFK",[])),
+ <<"babababc">> = iolist_to_binary(re:replace("babababc","^(b*|ba){1,2}?bc","&yrdhkl&hx&\\1M\\1\\1BiFK",[global])),
+ <<"bailvqbafDWIOQe">> = iolist_to_binary(re:replace("babc","^(ba|b*){1,2}?bc","\\1ilvq\\1fDWIOQe",[])),
+ <<"bailvqbafDWIOQe">> = iolist_to_binary(re:replace("babc","^(ba|b*){1,2}?bc","\\1ilvq\\1fDWIOQe",[global])),
+ <<"o">> = iolist_to_binary(re:replace("bbabc","^(ba|b*){1,2}?bc","o",[])),
+ <<"o">> = iolist_to_binary(re:replace("bbabc","^(ba|b*){1,2}?bc","o",[global])),
+ <<"qyH">> = iolist_to_binary(re:replace("bababc","^(ba|b*){1,2}?bc","qyH",[])),
+ <<"qyH">> = iolist_to_binary(re:replace("bababc","^(ba|b*){1,2}?bc","qyH",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ba|b*){1,2}?bc","GBLVYAxKwO",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ba|b*){1,2}?bc","GBLVYAxKwO",[global])),
+ <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(ba|b*){1,2}?bc","u&GWGypjK&r\\1\\1&",[])),
+ <<"bababbc">> = iolist_to_binary(re:replace("bababbc","^(ba|b*){1,2}?bc","u&GWGypjK&r\\1\\1&",[global])),
+ <<"babababc">> = iolist_to_binary(re:replace("babababc","^(ba|b*){1,2}?bc","Vb",[])),
+ <<"babababc">> = iolist_to_binary(re:replace("babababc","^(ba|b*){1,2}?bc","Vb",[global])),
+ <<"nli;znvMfDQEb;zGHXN">> = iolist_to_binary(re:replace(";z","^\\ca\\cA\\c[\\c{\\c:","nli\\1\\1&nv\\1MfDQEb&GHXN",[])),
+ <<"nli;znvMfDQEb;zGHXN">> = iolist_to_binary(re:replace(";z","^\\ca\\cA\\c[\\c{\\c:","nli\\1\\1&nv\\1MfDQEb&GHXN",[global])),
+ <<"yxcaleHEFWgGiwbQathing">> = iolist_to_binary(re:replace("athing","^[ab\\]cde]","\\1yxc\\1&leHE\\1FWgGiwbQ&",[])),
+ <<"yxcaleHEFWgGiwbQathing">> = iolist_to_binary(re:replace("athing","^[ab\\]cde]","\\1yxc\\1&leHE\\1FWgGiwbQ&",[global])),
+ <<"MeNvthing">> = iolist_to_binary(re:replace("bthing","^[ab\\]cde]","MeNv\\1",[])),
+ <<"MeNvthing">> = iolist_to_binary(re:replace("bthing","^[ab\\]cde]","MeNv\\1",[global])),
+ <<"]T]qQDvRdthing">> = iolist_to_binary(re:replace("]thing","^[ab\\]cde]","&T&qQDvRd",[])),
+ <<"]T]qQDvRdthing">> = iolist_to_binary(re:replace("]thing","^[ab\\]cde]","&T&qQDvRd",[global])),
+ <<"GFxthing">> = iolist_to_binary(re:replace("cthing","^[ab\\]cde]","GFx",[])),
+ <<"GFxthing">> = iolist_to_binary(re:replace("cthing","^[ab\\]cde]","GFx",[global])),
+ <<"kLFxTOaEthing">> = iolist_to_binary(re:replace("dthing","^[ab\\]cde]","kLFxTOaE",[])),
+ <<"kLFxTOaEthing">> = iolist_to_binary(re:replace("dthing","^[ab\\]cde]","kLFxTOaE",[global])),
+ <<"RtthVFthing">> = iolist_to_binary(re:replace("ething","^[ab\\]cde]","Rtt\\1hVF",[])),
+ <<"RtthVFthing">> = iolist_to_binary(re:replace("ething","^[ab\\]cde]","Rtt\\1hVF",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[ab\\]cde]","Srer\\1pi",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[ab\\]cde]","Srer\\1pi",[global])),
+ <<"fthing">> = iolist_to_binary(re:replace("fthing","^[ab\\]cde]","&AaO",[])),
+ <<"fthing">> = iolist_to_binary(re:replace("fthing","^[ab\\]cde]","&AaO",[global])),
+ <<"[thing">> = iolist_to_binary(re:replace("[thing","^[ab\\]cde]","GujQJxlam\\1f\\1FD",[])),
+ <<"[thing">> = iolist_to_binary(re:replace("[thing","^[ab\\]cde]","GujQJxlam\\1f\\1FD",[global])),
+ <<"\\thing">> = iolist_to_binary(re:replace("\\thing","^[ab\\]cde]","&&yX",[])),
+ <<"\\thing">> = iolist_to_binary(re:replace("\\thing","^[ab\\]cde]","&&yX",[global])),
+ <<"s]tXLkthing">> = iolist_to_binary(re:replace("]thing","^[]cde]","s&tXLk",[])),
+ <<"s]tXLkthing">> = iolist_to_binary(re:replace("]thing","^[]cde]","s&tXLk",[global])),
+ <<"HiVDFyrMvAaDvdYdUthing">> = iolist_to_binary(re:replace("cthing","^[]cde]","H\\1iVDFyrMvAaDv\\1\\1dYdU",[])),
+ <<"HiVDFyrMvAaDvdYdUthing">> = iolist_to_binary(re:replace("cthing","^[]cde]","H\\1iVDFyrMvAaDv\\1\\1dYdU",[global])),
+ <<"jkWeKNthing">> = iolist_to_binary(re:replace("dthing","^[]cde]","jkWeKN",[])),
+ <<"jkWeKNthing">> = iolist_to_binary(re:replace("dthing","^[]cde]","jkWeKN",[global])),
+ <<"strycWDFQcthing">> = iolist_to_binary(re:replace("ething","^[]cde]","stry\\1cWDFQc",[])),
+ <<"strycWDFQcthing">> = iolist_to_binary(re:replace("ething","^[]cde]","stry\\1cWDFQc",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[]cde]","s",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[]cde]","s",[global])),
+ <<"athing">> = iolist_to_binary(re:replace("athing","^[]cde]","\\1xREinh\\1vCv",[])),
+ <<"athing">> = iolist_to_binary(re:replace("athing","^[]cde]","\\1xREinh\\1vCv",[global])),
+ <<"fthing">> = iolist_to_binary(re:replace("fthing","^[]cde]","\\1h&Y\\1HwTkCc",[])),
+ <<"fthing">> = iolist_to_binary(re:replace("fthing","^[]cde]","\\1h&Y\\1HwTkCc",[global])),
+ <<"uifmTffffWmKXllBthing">> = iolist_to_binary(re:replace("fthing","^[^ab\\]cde]","ui&mT&f&&WmKXllB",[])),
+ <<"uifmTffffWmKXllBthing">> = iolist_to_binary(re:replace("fthing","^[^ab\\]cde]","ui&mT&f&&WmKXllB",[global])),
+ <<"Kyn[lihrXoXthing">> = iolist_to_binary(re:replace("[thing","^[^ab\\]cde]","Kyn&lihrXoX",[])),
+ <<"Kyn[lihrXoXthing">> = iolist_to_binary(re:replace("[thing","^[^ab\\]cde]","Kyn&lihrXoX",[global])),
+ <<"UXMYd\\fthing">> = iolist_to_binary(re:replace("\\thing","^[^ab\\]cde]","U\\1XMYd\\1\\1&f\\1",[])),
+ <<"UXMYd\\fthing">> = iolist_to_binary(re:replace("\\thing","^[^ab\\]cde]","U\\1XMYd\\1\\1&f\\1",[global])),
+ <<"QYuh*KpbKbO** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^ab\\]cde]","\\1QYuh&KpbKbO",[])),
+ <<"QYuh*KpbKbO** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^ab\\]cde]","\\1QYuh&KpbKbO",[global])),
+ <<"athing">> = iolist_to_binary(re:replace("athing","^[^ab\\]cde]","JwKDqeNpO\\1&m",[])),
+ <<"athing">> = iolist_to_binary(re:replace("athing","^[^ab\\]cde]","JwKDqeNpO\\1&m",[global])),
+ <<"bthing">> = iolist_to_binary(re:replace("bthing","^[^ab\\]cde]","G",[])),
+ <<"bthing">> = iolist_to_binary(re:replace("bthing","^[^ab\\]cde]","G",[global])),
+ <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^ab\\]cde]","VomLLa&\\1xDtJWx",[])),
+ <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^ab\\]cde]","VomLLa&\\1xDtJWx",[global])),
+ <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^ab\\]cde]","&DWkG&&kk",[])),
+ <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^ab\\]cde]","&DWkG&&kk",[global])),
+ <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^ab\\]cde]","MYpgcbh&\\1knLFcDqwN",[])),
+ <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^ab\\]cde]","MYpgcbh&\\1knLFcDqwN",[global])),
+ <<"ething">> = iolist_to_binary(re:replace("ething","^[^ab\\]cde]","h\\1nb\\1c&&KMVOIu",[])),
+ <<"ething">> = iolist_to_binary(re:replace("ething","^[^ab\\]cde]","h\\1nb\\1c&&KMVOIu",[global])),
+ <<"qRaQDneiathing">> = iolist_to_binary(re:replace("athing","^[^]cde]","qR&QDnei&",[])),
+ <<"qRaQDneiathing">> = iolist_to_binary(re:replace("athing","^[^]cde]","qR&QDnei&",[global])),
+ <<"YtUthing">> = iolist_to_binary(re:replace("fthing","^[^]cde]","YtU",[])),
+ <<"YtUthing">> = iolist_to_binary(re:replace("fthing","^[^]cde]","YtU",[global])),
+ <<"PUGKhoJ*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^]cde]","P\\1UGKhoJ&",[])),
+ <<"PUGKhoJ*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[^]cde]","P\\1UGKhoJ&",[global])),
+ <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^]cde]","Xh&gbPHspjXNu&YKXwHH",[])),
+ <<"]thing">> = iolist_to_binary(re:replace("]thing","^[^]cde]","Xh&gbPHspjXNu&YKXwHH",[global])),
+ <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^]cde]","kmMlgoXI&xF\\1hwlT",[])),
+ <<"cthing">> = iolist_to_binary(re:replace("cthing","^[^]cde]","kmMlgoXI&xF\\1hwlT",[global])),
+ <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^]cde]","ue\\1\\1DU",[])),
+ <<"dthing">> = iolist_to_binary(re:replace("dthing","^[^]cde]","ue\\1\\1DU",[global])),
+ <<"ething">> = iolist_to_binary(re:replace("ething","^[^]cde]","x\\1CM",[])),
+ <<"ething">> = iolist_to_binary(re:replace("ething","^[^]cde]","x\\1CM",[global])),
+ <<"skV">> = iolist_to_binary(re:replace("0","^[0-9]+$","sk\\1V\\1",[])),
+ <<"skV">> = iolist_to_binary(re:replace("0","^[0-9]+$","sk\\1V\\1",[global])),
+ <<"dchqDQcnPE1m">> = iolist_to_binary(re:replace("1","^[0-9]+$","dchqDQcnPE&m",[])),
+ <<"dchqDQcnPE1m">> = iolist_to_binary(re:replace("1","^[0-9]+$","dchqDQcnPE&m",[global])),
+ <<"iKMEYpXlyVKXB">> = iolist_to_binary(re:replace("2","^[0-9]+$","iKMEYpXlyVK\\1XB",[])),
+ <<"iKMEYpXlyVKXB">> = iolist_to_binary(re:replace("2","^[0-9]+$","iKMEYpXlyVK\\1XB",[global])),
+ <<"lTM3XtBQD3KqG33G">> = iolist_to_binary(re:replace("3","^[0-9]+$","lTM&X\\1tBQD&KqG&&G",[])),
+ <<"lTM3XtBQD3KqG33G">> = iolist_to_binary(re:replace("3","^[0-9]+$","lTM&X\\1tBQD&KqG&&G",[global])),
+ <<"A4RtR4paCNffVmKS44ru">> = iolist_to_binary(re:replace("4","^[0-9]+$","A&RtR&paCNffVmKS&&ru",[])),
+ <<"A4RtR4paCNffVmKS44ru">> = iolist_to_binary(re:replace("4","^[0-9]+$","A&RtR&paCNffVmKS&&ru",[global])),
+ <<"FvNdw">> = iolist_to_binary(re:replace("5","^[0-9]+$","F\\1vNdw",[])),
+ <<"FvNdw">> = iolist_to_binary(re:replace("5","^[0-9]+$","F\\1vNdw",[global])),
+ <<"6bMIirlh">> = iolist_to_binary(re:replace("6","^[0-9]+$","&bMIi\\1rlh",[])),
+ <<"6bMIirlh">> = iolist_to_binary(re:replace("6","^[0-9]+$","&bMIi\\1rlh",[global])),
+ <<"7IgF">> = iolist_to_binary(re:replace("7","^[0-9]+$","\\1\\1&IgF\\1\\1",[])),
+ <<"7IgF">> = iolist_to_binary(re:replace("7","^[0-9]+$","\\1\\1&IgF\\1\\1",[global])),
+ <<"kXpaB8C">> = iolist_to_binary(re:replace("8","^[0-9]+$","kXpaB&C",[])),
+ <<"kXpaB8C">> = iolist_to_binary(re:replace("8","^[0-9]+$","kXpaB&C",[global])),
+ <<"rxDNFoULsT">> = iolist_to_binary(re:replace("9","^[0-9]+$","rxDNFoULsT",[])),
+ <<"rxDNFoULsT">> = iolist_to_binary(re:replace("9","^[0-9]+$","rxDNFoULsT",[global])),
+ <<"YmBdr10cd10f10RQlRK">> = iolist_to_binary(re:replace("10","^[0-9]+$","YmBd\\1r&cd&f&RQlRK",[])),
+ <<"YmBdr10cd10f10RQlRK">> = iolist_to_binary(re:replace("10","^[0-9]+$","YmBd\\1r&cd&f&RQlRK",[global])),
+ <<"RLqdwwceTW">> = iolist_to_binary(re:replace("100","^[0-9]+$","RLqdwwceTW\\1",[])),
+ <<"RLqdwwceTW">> = iolist_to_binary(re:replace("100","^[0-9]+$","RLqdwwceTW\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[0-9]+$","BdnjJh\\1urLa&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[0-9]+$","BdnjJh\\1urLa&",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","^[0-9]+$","&&oa&dfYGxAdt&\\1\\1Q&m",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","^[0-9]+$","&&oa&dfYGxAdt&\\1\\1Q&m",[global])),
+ <<"ndenterMpPenterqHbSYUGGN">> = iolist_to_binary(re:replace("enter","^.*nter","nd&MpP&qHb\\1SY\\1UGGN",[])),
+ <<"ndenterMpPenterqHbSYUGGN">> = iolist_to_binary(re:replace("enter","^.*nter","nd&MpP&qHb\\1SY\\1UGGN",[global])),
+ <<"LSinterEPdYinterHoNIyUIDOinter">> = iolist_to_binary(re:replace("inter","^.*nter","LS&\\1EPdY&Ho\\1NIyUIDO&",[])),
+ <<"LSinterEPdYinterHoNIyUIDOinter">> = iolist_to_binary(re:replace("inter","^.*nter","LS&\\1EPdY&Ho\\1NIyUIDO&",[global])),
+ <<"IIUwhHsQfXMYBSb">> = iolist_to_binary(re:replace("uponter","^.*nter","IIUwhHsQ\\1fX\\1MYBS\\1b",[])),
+ <<"IIUwhHsQfXMYBSb">> = iolist_to_binary(re:replace("uponter","^.*nter","IIUwhHsQ\\1fX\\1MYBS\\1b",[global])),
+ ok.
+run1() ->
+ <<"Bp">> = iolist_to_binary(re:replace("xxx0","^xxx[0-9]+$","B\\1\\1\\1p",[])),
+ <<"Bp">> = iolist_to_binary(re:replace("xxx0","^xxx[0-9]+$","B\\1\\1\\1p",[global])),
+ <<"xxx1234okNYhxxx1234tobCxxx1234fg">> = iolist_to_binary(re:replace("xxx1234","^xxx[0-9]+$","&okNYh&tobC\\1&fg",[])),
+ <<"xxx1234okNYhxxx1234tobCxxx1234fg">> = iolist_to_binary(re:replace("xxx1234","^xxx[0-9]+$","&okNYh&tobC\\1&fg",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^xxx[0-9]+$","hQ&ULnO\\1\\1\\1nNlLbQ",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^xxx[0-9]+$","hQ&ULnO\\1\\1\\1nNlLbQ",[global])),
+ <<"xxx">> = iolist_to_binary(re:replace("xxx","^xxx[0-9]+$","&KwHk\\1a\\1\\1\\1&&i",[])),
+ <<"xxx">> = iolist_to_binary(re:replace("xxx","^xxx[0-9]+$","&KwHk\\1a\\1\\1\\1&&i",[global])),
+ <<"ohMDx123xpx123mNT">> = iolist_to_binary(re:replace("x123","^.+[0-9][0-9][0-9]$","ohMD&xp\\1&mNT",[])),
+ <<"ohMDx123xpx123mNT">> = iolist_to_binary(re:replace("x123","^.+[0-9][0-9][0-9]$","ohMD&xp\\1&mNT",[global])),
+ <<"gYaxx123xx123XaaNxx123bNU">> = iolist_to_binary(re:replace("xx123","^.+[0-9][0-9][0-9]$","gYa&&XaaN&bNU",[])),
+ <<"gYaxx123xx123XaaNxx123bNU">> = iolist_to_binary(re:replace("xx123","^.+[0-9][0-9][0-9]$","gYa&&XaaN&bNU",[global])),
+ <<"iElVtor">> = iolist_to_binary(re:replace("123456","^.+[0-9][0-9][0-9]$","i\\1ElV\\1tor",[])),
+ <<"iElVtor">> = iolist_to_binary(re:replace("123456","^.+[0-9][0-9][0-9]$","i\\1ElV\\1tor",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+[0-9][0-9][0-9]$","BWxJ\\1uhGy&vgMLA",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+[0-9][0-9][0-9]$","BWxJ\\1uhGy&vgMLA",[global])),
+ <<"123">> = iolist_to_binary(re:replace("123","^.+[0-9][0-9][0-9]$","xTGS&sW\\1G&NlcW",[])),
+ <<"123">> = iolist_to_binary(re:replace("123","^.+[0-9][0-9][0-9]$","xTGS&sW\\1G&NlcW",[global])),
+ <<"Ix1234IUy">> = iolist_to_binary(re:replace("x1234","^.+[0-9][0-9][0-9]$","I\\1&\\1I\\1Uy",[])),
+ <<"Ix1234IUy">> = iolist_to_binary(re:replace("x1234","^.+[0-9][0-9][0-9]$","I\\1&\\1I\\1Uy",[global])),
+ <<"DBYEAgkI">> = iolist_to_binary(re:replace("x123","^.+?[0-9][0-9][0-9]$","DBYE\\1AgkI",[])),
+ <<"DBYEAgkI">> = iolist_to_binary(re:replace("x123","^.+?[0-9][0-9][0-9]$","DBYE\\1AgkI",[global])),
+ <<"EABxx123">> = iolist_to_binary(re:replace("xx123","^.+?[0-9][0-9][0-9]$","EAB&\\1",[])),
+ <<"EABxx123">> = iolist_to_binary(re:replace("xx123","^.+?[0-9][0-9][0-9]$","EAB&\\1",[global])),
+ <<"w">> = iolist_to_binary(re:replace("123456","^.+?[0-9][0-9][0-9]$","w",[])),
+ <<"w">> = iolist_to_binary(re:replace("123456","^.+?[0-9][0-9][0-9]$","w",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+?[0-9][0-9][0-9]$","jiMwkAneSrQ&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.+?[0-9][0-9][0-9]$","jiMwkAneSrQ&",[global])),
+ <<"123">> = iolist_to_binary(re:replace("123","^.+?[0-9][0-9][0-9]$","pg\\1cjQ&&&",[])),
+ <<"123">> = iolist_to_binary(re:replace("123","^.+?[0-9][0-9][0-9]$","pg\\1cjQ&&&",[global])),
+ <<"APdx1234Jdelcg">> = iolist_to_binary(re:replace("x1234","^.+?[0-9][0-9][0-9]$","A\\1Pd&Jdelcg",[])),
+ <<"APdx1234Jdelcg">> = iolist_to_binary(re:replace("x1234","^.+?[0-9][0-9][0-9]$","A\\1Pd&Jdelcg",[global])),
+ <<"abcVE">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","\\1VE",[])),
+ <<"abcVE">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","\\1VE",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","ysSa&O\\1ogTi\\1e\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","ysSa&O\\1ogTi\\1e\\1",[global])),
+ <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","eCQWoiG\\1",[])),
+ <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","eCQWoiG\\1",[global])),
+ <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","rYbgJDpc",[])),
+ <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","rYbgJDpc",[global])),
+ <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","vkuwBMsxa",[])),
+ <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(re:replace("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","vkuwBMsxa",[global])),
+ <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","e\\1KF&BD\\1C&kxH&rwWnu",[])),
+ <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(re:replace("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$","e\\1KF&BD\\1C&kxH&rwWnu",[global])),
+ <<"Well, we need a colongxIksrpvcmlefi:WmR somewhere">> = iolist_to_binary(re:replace("Well, we need a colon: somewhere",":","g\\1xIksrpvcmlefi&WmR",[])),
+ <<"Well, we need a colongxIksrpvcmlefi:WmR somewhere">> = iolist_to_binary(re:replace("Well, we need a colon: somewhere",":","g\\1xIksrpvcmlefi&WmR",[global])),
+ <<"*** Fail if we don't">> = iolist_to_binary(re:replace("*** Fail if we don't",":","g&BggNgoAXIe&s\\1NH",[])),
+ <<"*** Fail if we don't">> = iolist_to_binary(re:replace("*** Fail if we don't",":","g&BggNgoAXIe&s\\1NH",[global])),
+ <<"TkV0abcQpF0abci0abcyiC">> = iolist_to_binary(re:replace("0abc","([\\da-f:]+)$","TkV\\1QpF\\1i&yiC",[caseless])),
+ <<"TkV0abcQpF0abci0abcyiC">> = iolist_to_binary(re:replace("0abc","([\\da-f:]+)$","TkV\\1QpF\\1i&yiC",[caseless,
global])),
-?line <<"g.1.2.3WLxQ1s">> = iolist_to_binary(re:replace(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","g&WLxQ\\1s",[])),
-?line <<"g.1.2.3WLxQ1s">> = iolist_to_binary(re:replace(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","g&WLxQ\\1s",[global])),
-?line <<"12Oy">> = iolist_to_binary(re:replace("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1Oy",[])),
-?line <<"12Oy">> = iolist_to_binary(re:replace("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1Oy",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","eX\\1nRbXcnyEu",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","eX\\1nRbXcnyEu",[global])),
-?line <<".1.2.3333">> = iolist_to_binary(re:replace(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&iIBylLhNq",[])),
-?line <<".1.2.3333">> = iolist_to_binary(re:replace(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&iIBylLhNq",[global])),
-?line <<"1.2.3">> = iolist_to_binary(re:replace("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1G&pFELr\\1\\1&\\1HPX",[])),
-?line <<"1.2.3">> = iolist_to_binary(re:replace("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1G&pFELr\\1\\1&\\1HPX",[global])),
-?line <<"1234.2.3">> = iolist_to_binary(re:replace("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&qtoJnh\\1h",[])),
-?line <<"1234.2.3">> = iolist_to_binary(re:replace("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&qtoJnh\\1h",[global])),
-?line <<"eaSBc111LbN">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","eaSBc\\1\\1\\1LbN",[])),
-?line <<"eaSBc111LbN">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","eaSBc\\1\\1\\1LbN",[global])),
-?line <<"1 IN SOA non-sp1 non-sp2 (yranl1 IN SOA non-sp1 non-sp2 (kU">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","&yranl&kU",[])),
-?line <<"1 IN SOA non-sp1 non-sp2 (yranl1 IN SOA non-sp1 non-sp2 (kU">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","&yranl&kU",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","W",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","W",[global])),
-?line <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","UyNVyrR",[])),
-?line <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","UyNVyrR",[global])),
-?line <<"pbeGIhIlhvhv">> = iolist_to_binary(re:replace("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","pbeGIhIl\\1hvhv",[])),
-?line <<"pbeGIhIlhvhv">> = iolist_to_binary(re:replace("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","pbeGIhIl\\1hvhv",[global])),
-?line <<"gFDyTxSYOppWiRv">> = iolist_to_binary(re:replace("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","gFDyTxSYOppWiR\\1v",[])),
-?line <<"gFDyTxSYOppWiRv">> = iolist_to_binary(re:replace("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","gFDyTxSYOppWiR\\1v",[global])),
-?line <<"HSc2.vOMD">> = iolist_to_binary(re:replace("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","HSc&\\1vO\\1MD\\1",[])),
-?line <<"HSc2.vOMD">> = iolist_to_binary(re:replace("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","HSc&\\1vO\\1MD\\1",[global])),
-?line <<".pq-rd.pq-rG.pq-rUab-c.pq-r.HCGaTI">> = iolist_to_binary(re:replace("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","\\1d\\1G\\1U&HCGaTI",[])),
-?line <<".pq-rd.pq-rG.pq-rUab-c.pq-r.HCGaTI">> = iolist_to_binary(re:replace("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","\\1d\\1G\\1U&HCGaTI",[global])),
-?line <<"RwF">> = iolist_to_binary(re:replace("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","RwF",[])),
-?line <<"RwF">> = iolist_to_binary(re:replace("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","RwF",[global])),
-?line <<"oAJdUx-.y-.GMx-.y-.iBCRNx-.y-.wBW">> = iolist_to_binary(re:replace("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","oAJdU&GM&iBCRN&wBW",[])),
-?line <<"oAJdUx-.y-.GMx-.y-.iBCRNx-.y-.wBW">> = iolist_to_binary(re:replace("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","oAJdU&GM&iBCRN&wBW",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","wwA&\\1snkRSCcfnG&S",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","wwA&\\1snkRSCcfnG&S",[global])),
-?line <<"-abc.peq.">> = iolist_to_binary(re:replace("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","YaFu&cvVYqVy",[])),
-?line <<"-abc.peq.">> = iolist_to_binary(re:replace("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","YaFu&cvVYqVy",[global])),
-?line <<"*.aXojEWCW">> = iolist_to_binary(re:replace("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&\\1XojEWCW",[])),
-?line <<"*.aXojEWCW">> = iolist_to_binary(re:replace("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&\\1XojEWCW",[global])),
-?line <<"djXR0-a0-aFXv*.b0-awEtv">> = iolist_to_binary(re:replace("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","djXR\\1\\1FXv&wEtv",[])),
-?line <<"djXR0-a0-aFXv*.b0-awEtv">> = iolist_to_binary(re:replace("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","djXR\\1\\1FXv&wEtv",[global])),
-?line <<"*.c3-b.cregb">> = iolist_to_binary(re:replace("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&regb",[])),
-?line <<"*.c3-b.cregb">> = iolist_to_binary(re:replace("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&regb",[global])),
-?line <<"Vlm">> = iolist_to_binary(re:replace("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","Vlm",[])),
-?line <<"Vlm">> = iolist_to_binary(re:replace("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","Vlm",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","Vxm\\1SKnM",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","Vxm\\1SKnM",[global])),
-?line <<"*.0">> = iolist_to_binary(re:replace("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","n\\1",[])),
-?line <<"*.0">> = iolist_to_binary(re:replace("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","n\\1",[global])),
-?line <<"*.a-">> = iolist_to_binary(re:replace("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","SbmRQSxio",[])),
-?line <<"*.a-">> = iolist_to_binary(re:replace("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","SbmRQSxio",[global])),
-?line <<"*.a-b.c-">> = iolist_to_binary(re:replace("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","xINKaLRww\\1&\\1",[])),
-?line <<"*.a-b.c-">> = iolist_to_binary(re:replace("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","xINKaLRww\\1&\\1",[global])),
-?line <<"*.c-a.0-c">> = iolist_to_binary(re:replace("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","akuY\\1pMWNGWjJ\\1oFTV\\1t",[])),
-?line <<"*.c-a.0-c">> = iolist_to_binary(re:replace("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","akuY\\1pMWNGWjJ\\1oFTV\\1t",[global])),
-?line <<"Dy">> = iolist_to_binary(re:replace("abde","^(?=ab(de))(abd)(e)","Dy",[])),
-?line <<"Dy">> = iolist_to_binary(re:replace("abde","^(?=ab(de))(abd)(e)","Dy",[global])),
-?line <<"Sf">> = iolist_to_binary(re:replace("abdf","^(?!(ab)de|x)(abd)(f)","Sf",[])),
-?line <<"Sf">> = iolist_to_binary(re:replace("abdf","^(?!(ab)de|x)(abd)(f)","Sf",[global])),
-?line <<"IabcdJcd">> = iolist_to_binary(re:replace("abcd","^(?=(ab(cd)))(ab)","I\\1J",[])),
-?line <<"IabcdJcd">> = iolist_to_binary(re:replace("abcd","^(?=(ab(cd)))(ab)","I\\1J",[global])),
-?line <<"rvnE.d">> = iolist_to_binary(re:replace("a.b.c.d","^[\\da-f](\\.[\\da-f])*$","rvnE\\1",[caseless])),
-?line <<"rvnE.d">> = iolist_to_binary(re:replace("a.b.c.d","^[\\da-f](\\.[\\da-f])*$","rvnE\\1",[caseless,
- global])),
-?line <<"niA.B.C.DL.DCGxjcuA.B.C.DhA.B.C.DT.DA.B.C.D.DM">> = iolist_to_binary(re:replace("A.B.C.D","^[\\da-f](\\.[\\da-f])*$","ni&L\\1CGxjcu&h&T\\1&\\1M",[caseless])),
-?line <<"niA.B.C.DL.DCGxjcuA.B.C.DhA.B.C.DT.DA.B.C.D.DM">> = iolist_to_binary(re:replace("A.B.C.D","^[\\da-f](\\.[\\da-f])*$","ni&L\\1CGxjcu&h&T\\1&\\1M",[caseless,
- global])),
-?line <<"wARa.b.c.1.2.3.Ca.b.c.1.2.3.C.CpUAa.b.c.1.2.3.Cg">> = iolist_to_binary(re:replace("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$","wAR&&\\1pUA&g",[caseless])),
-?line <<"wARa.b.c.1.2.3.Ca.b.c.1.2.3.C.CpUAa.b.c.1.2.3.Cg">> = iolist_to_binary(re:replace("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$","wAR&&\\1pUA&g",[caseless,
- global])),
-?line <<"a">> = iolist_to_binary(re:replace("\"1234\"","^\\\".*\\\"\\s*(;.*)?$","\\1a",[])),
-?line <<"a">> = iolist_to_binary(re:replace("\"1234\"","^\\\".*\\\"\\s*(;.*)?$","\\1a",[global])),
-?line <<"CIv">> = iolist_to_binary(re:replace("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$","CIv",[])),
-?line <<"CIv">> = iolist_to_binary(re:replace("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$","CIv",[global])),
-?line <<"; rhubarbK">> = iolist_to_binary(re:replace("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$","\\1K",[])),
-?line <<"; rhubarbK">> = iolist_to_binary(re:replace("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$","\\1K",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\\".*\\\"\\s*(;.*)?$","aWrdsUS\\1QSjQ&dFoGfF",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\\".*\\\"\\s*(;.*)?$","aWrdsUS\\1QSjQ&dFoGfF",[global])),
-?line <<"\"1234\" : things">> = iolist_to_binary(re:replace("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$","khMGlmiUM&d\\1\\1GGb",[])),
-?line <<"\"1234\" : things">> = iolist_to_binary(re:replace("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$","khMGlmiUM&d\\1\\1GGb",[global])),
-?line <<"ddsaVnvP">> = iolist_to_binary(re:replace("","^$","ddsaVnvP",[])),
-?line <<"ddsaVnvP">> = iolist_to_binary(re:replace("","^$","ddsaVnvP",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^$","d\\1yl\\1chv&DYUrRBp",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^$","d\\1yl\\1chv&DYUrRBp",[global])),
-?line <<"ubIEeu">> = iolist_to_binary(re:replace("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","ubIEeu",[extended])),
-?line <<"ubIEeu">> = iolist_to_binary(re:replace("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","ubIEeu",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","hTyFd&e\\1&PttRSXjwggW",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","hTyFd&e\\1&PttRSXjwggW",[extended,
- global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","RUKr",[extended])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","RUKr",[extended,
- global])),
-?line <<"ab cde">> = iolist_to_binary(re:replace("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","&wELTyPo&oJqp&vLg\\1T",[extended])),
-?line <<"ab cde">> = iolist_to_binary(re:replace("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","&wELTyPo&oJqp&vLg\\1T",[extended,
- global])),
-?line <<"NNDSkqab cNfQkVqmWj">> = iolist_to_binary(re:replace("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","NN\\1DSk\\1q&NfQkVqmWj",[])),
-?line <<"NNDSkqab cNfQkVqmWj">> = iolist_to_binary(re:replace("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","NN\\1DSk\\1q&NfQkVqmWj",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","vkwk\\1js\\1pepFK\\1\\1Wa&g",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","vkwk\\1js\\1pepFK\\1\\1Wa&g",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","\\1&fYSPEB",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","\\1&fYSPEB",[global])),
-?line <<"ab cde">> = iolist_to_binary(re:replace("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","\\1D\\1\\1\\1by&lUP\\1jTlVc",[])),
-?line <<"ab cde">> = iolist_to_binary(re:replace("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","\\1D\\1\\1\\1by&lUP\\1jTlVc",[global])),
-?line <<"Pca bcdDXLbDTDa bcdja bcdTa bcdX">> = iolist_to_binary(re:replace("a bcd","^ a\\ b[c ]d $","Pc&DXLbDTD&j&T&X\\1",[extended])),
-?line <<"Pca bcdDXLbDTDa bcdja bcdTa bcdX">> = iolist_to_binary(re:replace("a bcd","^ a\\ b[c ]d $","Pc&DXLbDTD&j&T&X\\1",[extended,
- global])),
-?line <<"cbruWa b dWvF">> = iolist_to_binary(re:replace("a b d","^ a\\ b[c ]d $","cbruW&WvF\\1",[extended])),
-?line <<"cbruWa b dWvF">> = iolist_to_binary(re:replace("a b d","^ a\\ b[c ]d $","cbruW&WvF\\1",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^ a\\ b[c ]d $","xLsLvmNGGbWjEqU\\1q",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^ a\\ b[c ]d $","xLsLvmNGGbWjEqU\\1q",[extended,
- global])),
-?line <<"abcd">> = iolist_to_binary(re:replace("abcd","^ a\\ b[c ]d $","QvID",[extended])),
-?line <<"abcd">> = iolist_to_binary(re:replace("abcd","^ a\\ b[c ]d $","QvID",[extended,
+ <<"gAHIDgPO">> = iolist_to_binary(re:replace("abc","([\\da-f:]+)$","gAHIDgPO",[caseless])),
+ <<"gAHIDgPO">> = iolist_to_binary(re:replace("abc","([\\da-f:]+)$","gAHIDgPO",[caseless,
+ global])),
+ <<"QqLxYfedlXtfedNm">> = iolist_to_binary(re:replace("fed","([\\da-f:]+)$","QqLxY&lXt\\1Nm",[caseless])),
+ <<"QqLxYfedlXtfedNm">> = iolist_to_binary(re:replace("fed","([\\da-f:]+)$","QqLxY&lXt\\1Nm",[caseless,
global])),
-?line <<"ab d">> = iolist_to_binary(re:replace("ab d","^ a\\ b[c ]d $","CEUu&Jt",[extended])),
-?line <<"ab d">> = iolist_to_binary(re:replace("ab d","^ a\\ b[c ]d $","CEUu&Jt",[extended,
- global])),
-?line <<"ohu">> = iolist_to_binary(re:replace("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$","ohu",[])),
-?line <<"ohu">> = iolist_to_binary(re:replace("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$","ohu",[global])),
-?line <<"rbcmNabcdefhijklmabcdefhijklmNGkLNbcabcdefhijklmxnbclO">> = iolist_to_binary(re:replace("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$","r\\1mN&&NGkLN\\1&xn\\1lO",[])),
-?line <<"rbcmNabcdefhijklmabcdefhijklmNGkLNbcabcdefhijklmxnbclO">> = iolist_to_binary(re:replace("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$","r\\1mN&&NGkLN\\1&xn\\1lO",[global])),
-?line <<"I">> = iolist_to_binary(re:replace("a+ Z0+
-","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]","I",[])),
-?line <<"I">> = iolist_to_binary(re:replace("a+ Z0+
-","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]","I",[global])),
-?line <<"ANdwkyHnc">> = iolist_to_binary(re:replace(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+","ANdwkyHnc",[])),
-?line <<"ANdwkyHnc">> = iolist_to_binary(re:replace(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+","ANdwkyHnc",[global])),
-?line <<"Dx">> = iolist_to_binary(re:replace("z","^a*\\w","Dx",[])),
-?line <<"Dx">> = iolist_to_binary(re:replace("z","^a*\\w","Dx",[global])),
-?line <<"OpVTjQkTaz">> = iolist_to_binary(re:replace("az","^a*\\w","OpVTjQkT&",[])),
-?line <<"OpVTjQkTaz">> = iolist_to_binary(re:replace("az","^a*\\w","OpVTjQkT&",[global])),
-?line <<"LexbuooAmFDifW">> = iolist_to_binary(re:replace("aaaz","^a*\\w","LexbuooAm\\1FDifW",[])),
-?line <<"LexbuooAmFDifW">> = iolist_to_binary(re:replace("aaaz","^a*\\w","LexbuooAm\\1FDifW",[global])),
-?line <<"arpLCDAadYpPkb">> = iolist_to_binary(re:replace("a","^a*\\w","arpLCDAadYpPk\\1b",[])),
-?line <<"arpLCDAadYpPkb">> = iolist_to_binary(re:replace("a","^a*\\w","arpLCDAadYpPk\\1b",[global])),
-?line <<"CyElaaTHfV">> = iolist_to_binary(re:replace("aa","^a*\\w","CyEl&T\\1HfV",[])),
-?line <<"CyElaaTHfV">> = iolist_to_binary(re:replace("aa","^a*\\w","CyEl&T\\1HfV",[global])),
-?line <<"v">> = iolist_to_binary(re:replace("aaaa","^a*\\w","v\\1\\1",[])),
-?line <<"v">> = iolist_to_binary(re:replace("aaaa","^a*\\w","v\\1\\1",[global])),
-?line <<"COSWtMTXCLic+">> = iolist_to_binary(re:replace("a+","^a*\\w","COSWtMTXCLic",[])),
-?line <<"COSWtMTXCLic+">> = iolist_to_binary(re:replace("a+","^a*\\w","COSWtMTXCLic",[global])),
-?line <<"kaaDuaauKGaaIaaFUK+">> = iolist_to_binary(re:replace("aa+","^a*\\w","k&Du&uKG\\1&I&FU\\1\\1K\\1",[])),
-?line <<"kaaDuaauKGaaIaaFUK+">> = iolist_to_binary(re:replace("aa+","^a*\\w","k&Du&uKG\\1&I&FU\\1\\1K\\1",[global])),
-?line <<"Pttz">> = iolist_to_binary(re:replace("z","^a*?\\w","Ptt&",[])),
-?line <<"Pttz">> = iolist_to_binary(re:replace("z","^a*?\\w","Ptt&",[global])),
-?line <<"QEHxyFSkkaz">> = iolist_to_binary(re:replace("az","^a*?\\w","QEHxyFSkk&",[])),
-?line <<"QEHxyFSkkaz">> = iolist_to_binary(re:replace("az","^a*?\\w","QEHxyFSkk&",[global])),
-?line <<"atHEjpaKrKaaz">> = iolist_to_binary(re:replace("aaaz","^a*?\\w","&tHE\\1jp&KrK",[])),
-?line <<"atHEjpaKrKaaz">> = iolist_to_binary(re:replace("aaaz","^a*?\\w","&tHE\\1jp&KrK",[global])),
-?line <<"YaSeqaaeBiLO">> = iolist_to_binary(re:replace("a","^a*?\\w","Y&Seq\\1&&eBiLO",[])),
-?line <<"YaSeqaaeBiLO">> = iolist_to_binary(re:replace("a","^a*?\\w","Y&Seq\\1&&eBiLO",[global])),
-?line <<"UlaGeGnImSoQaHibARka">> = iolist_to_binary(re:replace("aa","^a*?\\w","Ul&GeGnImSoQ&HibARk",[])),
-?line <<"UlaGeGnImSoQaHibARka">> = iolist_to_binary(re:replace("aa","^a*?\\w","Ul&GeGnImSoQ&HibARk",[global])),
-?line <<"upDbxncvqbwvaaa">> = iolist_to_binary(re:replace("aaaa","^a*?\\w","upDbxncvqb\\1wv",[])),
-?line <<"upDbxncvqbwvaaa">> = iolist_to_binary(re:replace("aaaa","^a*?\\w","upDbxncvqb\\1wv",[global])),
-?line <<"MalqdUPrj+">> = iolist_to_binary(re:replace("a+","^a*?\\w","M&\\1lqdUPr\\1j\\1\\1",[])),
-?line <<"MalqdUPrj+">> = iolist_to_binary(re:replace("a+","^a*?\\w","M&\\1lqdUPr\\1j\\1\\1",[global])),
-?line <<"JTa+">> = iolist_to_binary(re:replace("aa+","^a*?\\w","JT",[])),
-?line <<"JTa+">> = iolist_to_binary(re:replace("aa+","^a*?\\w","JT",[global])),
-?line <<"nnvJUazdlV">> = iolist_to_binary(re:replace("az","^a+\\w","\\1nnvJU&dlV",[])),
-?line <<"nnvJUazdlV">> = iolist_to_binary(re:replace("az","^a+\\w","\\1nnvJU&dlV",[global])),
-?line <<"aaaz">> = iolist_to_binary(re:replace("aaaz","^a+\\w","\\1&",[])),
-?line <<"aaaz">> = iolist_to_binary(re:replace("aaaz","^a+\\w","\\1&",[global])),
-?line <<"daaRBaauOlL">> = iolist_to_binary(re:replace("aa","^a+\\w","d&RB&uO\\1lL",[])),
-?line <<"daaRBaauOlL">> = iolist_to_binary(re:replace("aa","^a+\\w","d&RB&uO\\1lL",[global])),
-?line <<"uaaaajkPXJqfBddNNYaaaa">> = iolist_to_binary(re:replace("aaaa","^a+\\w","u&jkPXJqfBddNNY&",[])),
-?line <<"uaaaajkPXJqfBddNNYaaaa">> = iolist_to_binary(re:replace("aaaa","^a+\\w","u&jkPXJqfBddNNY&",[global])),
-?line <<"YAJlePYgQb+">> = iolist_to_binary(re:replace("aa+","^a+\\w","YAJlePYgQb",[])),
-?line <<"YAJlePYgQb+">> = iolist_to_binary(re:replace("aa+","^a+\\w","YAJlePYgQb",[global])),
-?line <<"MXsW">> = iolist_to_binary(re:replace("az","^a+?\\w","MXsW",[])),
-?line <<"MXsW">> = iolist_to_binary(re:replace("az","^a+?\\w","MXsW",[global])),
-?line <<"GaaMGsaaPiMScaz">> = iolist_to_binary(re:replace("aaaz","^a+?\\w","G&MGs&P\\1i\\1MSc",[])),
-?line <<"GaaMGsaaPiMScaz">> = iolist_to_binary(re:replace("aaaz","^a+?\\w","G&MGs&P\\1i\\1MSc",[global])),
-?line <<"aaYUHgT">> = iolist_to_binary(re:replace("aa","^a+?\\w","&YUHgT",[])),
-?line <<"aaYUHgT">> = iolist_to_binary(re:replace("aa","^a+?\\w","&YUHgT",[global])),
-?line <<"ePknVhaa">> = iolist_to_binary(re:replace("aaaa","^a+?\\w","ePknVh\\1",[])),
-?line <<"ePknVhaa">> = iolist_to_binary(re:replace("aaaa","^a+?\\w","ePknVh\\1",[global])),
-?line <<"+">> = iolist_to_binary(re:replace("aa+","^a+?\\w","\\1",[])),
-?line <<"+">> = iolist_to_binary(re:replace("aa+","^a+?\\w","\\1",[global])),
-?line <<"AFRGuhtn1234567890rEtjU">> = iolist_to_binary(re:replace("1234567890","^\\d{8}\\w{2,}","\\1AFRGuhtn&rEtjU",[])),
-?line <<"AFRGuhtn1234567890rEtjU">> = iolist_to_binary(re:replace("1234567890","^\\d{8}\\w{2,}","\\1AFRGuhtn&rEtjU",[global])),
-?line <<"nNSL12345678abRY">> = iolist_to_binary(re:replace("12345678ab","^\\d{8}\\w{2,}","nNSL&RY",[])),
-?line <<"nNSL12345678abRY">> = iolist_to_binary(re:replace("12345678ab","^\\d{8}\\w{2,}","nNSL&RY",[global])),
-?line <<"12345678__JUDy">> = iolist_to_binary(re:replace("12345678__","^\\d{8}\\w{2,}","&JUDy",[])),
-?line <<"12345678__JUDy">> = iolist_to_binary(re:replace("12345678__","^\\d{8}\\w{2,}","&JUDy",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8}\\w{2,}","&OcK\\1P&XNvgrP",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8}\\w{2,}","&OcK\\1P&XNvgrP",[global])),
-?line <<"1234567">> = iolist_to_binary(re:replace("1234567","^\\d{8}\\w{2,}","&Mo",[])),
-?line <<"1234567">> = iolist_to_binary(re:replace("1234567","^\\d{8}\\w{2,}","&Mo",[global])),
-?line <<"O">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}$","O",[])),
-?line <<"O">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}$","O",[global])),
-?line <<"1234b1234n">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}$","&b&n",[])),
-?line <<"1234b1234n">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}$","&b&n",[global])),
-?line <<"YBp12345Ul">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}$","YBp&Ul",[])),
-?line <<"YBp12345Ul">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}$","YBp&Ul",[global])),
-?line <<"SVHQqBtcrMAtQxy">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}$","SVHQqBtcrMAtQxy\\1",[])),
-?line <<"SVHQqBtcrMAtQxy">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}$","SVHQqBtcrMAtQxy\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[aeiou\\d]{4,5}$","ne",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[aeiou\\d]{4,5}$","ne",[global])),
-?line <<"123456">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}$","QA&F\\1LJ",[])),
-?line <<"123456">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}$","QA&F\\1LJ",[global])),
-?line <<"gKGpFvTeUK">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}?","gKGpFvTeUK",[])),
-?line <<"gKGpFvTeUK">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}?","gKGpFvTeUK",[global])),
-?line <<"LCEqvLxHGWXWrexD">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}?","LCE\\1qvL\\1xHGWXWrexD",[])),
-?line <<"LCEqvLxHGWXWrexD">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}?","LCE\\1qvL\\1xHGWXWrexD",[global])),
-?line <<"QWV1234vhndnkkT1234l5">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}?","\\1QWV&\\1vhndnkk\\1T&l",[])),
-?line <<"QWV1234vhndnkkT1234l5">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}?","\\1QWV&\\1vhndnkk\\1T&l",[global])),
-?line <<"aaaaIaaaayaaaaEoAPYra">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}?","&I&y&E\\1oAPYr",[])),
-?line <<"aaaaIaaaayaaaaEoAPYra">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}?","&I&y&E\\1oAPYr",[global])),
-?line <<"xKUWgRs56">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}?","xKUWgRs",[])),
-?line <<"xKUWgRs56">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}?","xKUWgRs",[global])),
-?line <<"JlUywcabcvRabcPFPabcYSXE">> = iolist_to_binary(re:replace("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z","JlUywc\\1vR\\1PFP\\1YSXE",[])),
-?line <<"JlUywcabcvRabcPFPabcYSXE">> = iolist_to_binary(re:replace("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z","JlUywc\\1vR\\1PFP\\1YSXE",[global])),
-?line <<"def=defdefdefbucdef=defdefdef">> = iolist_to_binary(re:replace("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z","&buc&",[])),
-?line <<"def=defdefdefbucdef=defdefdef">> = iolist_to_binary(re:replace("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z","&buc&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z","AYuyHUCDlwjQc\\1OS",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z","AYuyHUCDlwjQc\\1OS",[global])),
-?line <<"abc=defdef">> = iolist_to_binary(re:replace("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z","PM&h\\1\\1xD\\1&",[])),
-?line <<"abc=defdef">> = iolist_to_binary(re:replace("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z","PM&h\\1\\1xD\\1&",[global])),
-?line <<"UFhaagoHObvFc">> = iolist_to_binary(re:replace("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","UFh\\1\\1goHObvFc",[])),
-?line <<"UFhaagoHObvFc">> = iolist_to_binary(re:replace("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","UFh\\1\\1goHObvFc",[global])),
-?line <<"aabcdefghijkkkkcda2abcdefghijkkkkcda2abcdefghijkkkkcda2vuYabcdefghijkkkkcda2xdabcdefghijkkkkcda2njaJQEF">> = iolist_to_binary(re:replace("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","\\1&&&vuY&xd&nj\\1JQEF",[])),
-?line <<"aabcdefghijkkkkcda2abcdefghijkkkkcda2abcdefghijkkkkcda2vuYabcdefghijkkkkcda2xdabcdefghijkkkkcda2njaJQEF">> = iolist_to_binary(re:replace("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","\\1&&&vuY&xd&nj\\1JQEF",[global])),
-?line <<"mcataractcataract cataract23YTkMcataract cataract23">> = iolist_to_binary(re:replace("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","m\\1&YTkM&",[])),
-?line <<"mcataractcataract cataract23YTkMcataract cataract23">> = iolist_to_binary(re:replace("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","m\\1&YTkM&",[global])),
-?line <<"OXcatatonicoHKaXHQpryKFyhVcatatonic">> = iolist_to_binary(re:replace("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","OX\\1oHKaXHQpryKFyhV\\1",[])),
-?line <<"OXcatatonicoHKaXHQpryKFyhVcatatonic">> = iolist_to_binary(re:replace("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","OX\\1oHKaXHQpryKFyhV\\1",[global])),
-?line <<"caterpillarcaterpillar caterpillar23foVlhvplLSebcaterpillar">> = iolist_to_binary(re:replace("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","\\1&foVlhvplLSeb\\1",[])),
-?line <<"caterpillarcaterpillar caterpillar23foVlhvplLSebcaterpillar">> = iolist_to_binary(re:replace("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","\\1&foVlhvplLSeb\\1",[global])),
-?line <<"From abcd Mon Sep 01 12:33TNVlANgYabcdabcdFrom abcd Mon Sep 01 12:33aIFrom abcd Mon Sep 01 12:33TqsabcdQ:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]","&TNVlANgY\\1\\1&aI&Tqs\\1Q",[])),
-?line <<"From abcd Mon Sep 01 12:33TNVlANgYabcdabcdFrom abcd Mon Sep 01 12:33aIFrom abcd Mon Sep 01 12:33TqsabcdQ:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]","&TNVlANgY\\1\\1&aI&Tqs\\1Q",[global])),
-?line <<"isKrFrom abcd Mon Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","isKr&",[])),
-?line <<"isKrFrom abcd Mon Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","isKr&",[global])),
-?line <<"lNtEJS:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","lNtEJS",[])),
-?line <<"lNtEJS:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","lNtEJS",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","aR\\1i&Fxe",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","aR\\1i&Fxe",[global])),
-?line <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","\\1NsrJ&\\1&PtWlXT",[])),
-?line <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","\\1NsrJ&\\1&PtWlXT",[global])),
-?line <<"nGixKixjMO12
-34BhoReSp">> = iolist_to_binary(re:replace("12
-34","^12.34","nGixKixjMO&BhoReSp",[dotall])),
-?line <<"nGixKixjMO12
-34BhoReSp">> = iolist_to_binary(re:replace("12
-34","^12.34","nGixKixjMO&BhoReSp",[dotall,global])),
-?line <<"12 34OBfpF12 3412 34fh">> = iolist_to_binary(re:replace("12 34","^12.34","&OBfpF&&fh",[dotall])),
-?line <<"12 34OBfpF12 3412 34fh">> = iolist_to_binary(re:replace("12 34","^12.34","&OBfpF&&fh",[dotall,
- global])),
-?line <<"the quick brownhubrownbrownubrownQ fox">> = iolist_to_binary(re:replace("the quick brown fox","\\w+(?=\\t)","&hu&&u&Q",[])),
-?line <<"the quick brownhubrownbrownubrownQ fox">> = iolist_to_binary(re:replace("the quick brown fox","\\w+(?=\\t)","&hu&&u&Q",[global])),
-?line <<"foobar is uqH">> = iolist_to_binary(re:replace("foobar is foolish see?","foo(?!bar)(.*)","uqH",[])),
-?line <<"foobar is uqH">> = iolist_to_binary(re:replace("foobar is foolish see?","foo(?!bar)(.*)","uqH",[global])),
-?line <<"foobar cn">> = iolist_to_binary(re:replace("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)","n",[])),
-?line <<"foobar cn">> = iolist_to_binary(re:replace("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)","n",[global])),
-?line <<"CpDjibh">> = iolist_to_binary(re:replace("barrel","(?:(?!foo)...|^.{0,2})bar(.*)","CpDjibh",[])),
-?line <<"CpDjibh">> = iolist_to_binary(re:replace("barrel","(?:(?!foo)...|^.{0,2})bar(.*)","CpDjibh",[global])),
-?line <<"wlcfLrelprelgrelD">> = iolist_to_binary(re:replace("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)","wlcfL\\1p\\1g\\1D",[])),
-?line <<"wlcfLrelprelgrelD">> = iolist_to_binary(re:replace("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)","wlcfL\\1p\\1g\\1D",[global])),
-?line <<"wbDA barrelYA barrelcQA barrelplrelA barrelXPrel">> = iolist_to_binary(re:replace("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)","wbD&Y&cQ&pl\\1&XP\\1",[])),
-?line <<"wbDA barrelYA barrelcQA barrelplrelA barrelXPrel">> = iolist_to_binary(re:replace("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)","wbD&Y&cQ&pl\\1&XP\\1",[global])),
-?line <<"PJMqUabctmoSPC456">> = iolist_to_binary(re:replace("abc456","^(\\D*)(?=\\d)(?!123)","PJMqU\\1tmoSPC",[])),
-?line <<"PJMqUabctmoSPC456">> = iolist_to_binary(re:replace("abc456","^(\\D*)(?=\\d)(?!123)","PJMqU\\1tmoSPC",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","k\\1&lgXOi",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","k\\1&lgXOi",[global])),
-?line <<"abc123">> = iolist_to_binary(re:replace("abc123","^(\\D*)(?=\\d)(?!123)","UgE&XTVNX&ygyaQdYO&",[])),
-?line <<"abc123">> = iolist_to_binary(re:replace("abc123","^(\\D*)(?=\\d)(?!123)","UgE&XTVNX&ygyaQdYO&",[global])),
-?line <<"CByu1234Oj12341234">> = iolist_to_binary(re:replace("1234","^1234(?# test newlines
- inside)","CByu&Oj&&",[])),
-?line <<"CByu1234Oj12341234">> = iolist_to_binary(re:replace("1234","^1234(?# test newlines
- inside)","CByu&Oj&&",[global])),
-?line <<"AVF1234DSEvHi">> = iolist_to_binary(re:replace("1234","^1234 #comment in extended re
- ","AVF&DSEvHi",[extended])),
-?line <<"AVF1234DSEvHi">> = iolist_to_binary(re:replace("1234","^1234 #comment in extended re
- ","AVF&DSEvHi",[extended,global])),
-?line <<"wiUNsYJdROkkkabcdSabcdjvS">> = iolist_to_binary(re:replace("abcd","#rhubarb
- abcd","wiUNsYJdROkkk&S&jvS",[extended])),
-?line <<"wiUNsYJdROkkkabcdSabcdjvS">> = iolist_to_binary(re:replace("abcd","#rhubarb
- abcd","wiUNsYJdROkkk&S&jvS",[extended,global])),
-?line <<"wxabcdyOpSDe">> = iolist_to_binary(re:replace("abcd","^abcd#rhubarb","wx&yOpSDe",[extended])),
-?line <<"wxabcdyOpSDe">> = iolist_to_binary(re:replace("abcd","^abcd#rhubarb","wx&yOpSDe",[extended,
+ <<"aXaxRLpEPRwSlQEEw">> = iolist_to_binary(re:replace("E","([\\da-f:]+)$","aXaxRLp\\1PRwSlQ\\1\\1w",[caseless])),
+ <<"aXaxRLpEPRwSlQEEw">> = iolist_to_binary(re:replace("E","([\\da-f:]+)$","aXaxRLp\\1PRwSlQ\\1\\1w",[caseless,
+ global])),
+ <<"srXTndsE::::kfsP::LR">> = iolist_to_binary(re:replace("::","([\\da-f:]+)$","srXTndsE&&kfsP&LR",[caseless])),
+ <<"srXTndsE::::kfsP::LR">> = iolist_to_binary(re:replace("::","([\\da-f:]+)$","srXTndsE&&kfsP&LR",[caseless,
+ global])),
+ <<"5f03:12C0::932ejAFV">> = iolist_to_binary(re:replace("5f03:12C0::932e","([\\da-f:]+)$","&jAFV",[caseless])),
+ <<"5f03:12C0::932ejAFV">> = iolist_to_binary(re:replace("5f03:12C0::932e","([\\da-f:]+)$","&jAFV",[caseless,
+ global])),
+ <<"fed yjdefSWAl">> = iolist_to_binary(re:replace("fed def","([\\da-f:]+)$","yj&SWAl",[caseless])),
+ <<"fed yjdefSWAl">> = iolist_to_binary(re:replace("fed def","([\\da-f:]+)$","yj&SWAl",[caseless,
+ global])),
+ <<"Any old stuqffffafSffkdOlpalffuffR">> = iolist_to_binary(re:replace("Any old stuff","([\\da-f:]+)$","q&\\1afS&kdOlpal&u\\1R",[caseless])),
+ <<"Any old stuqffffafSffkdOlpalffuffR">> = iolist_to_binary(re:replace("Any old stuff","([\\da-f:]+)$","q&\\1afS&kdOlpal&u\\1R",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","([\\da-f:]+)$","IyKK\\1DBvmhe",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","([\\da-f:]+)$","IyKK\\1DBvmhe",[caseless,
+ global])),
+ <<"0zzz">> = iolist_to_binary(re:replace("0zzz","([\\da-f:]+)$","rdo\\1x&nKGAa",[caseless])),
+ <<"0zzz">> = iolist_to_binary(re:replace("0zzz","([\\da-f:]+)$","rdo\\1x&nKGAa",[caseless,
+ global])),
+ <<"gzzz">> = iolist_to_binary(re:replace("gzzz","([\\da-f:]+)$","CUmRDqbGoniV\\1",[caseless])),
+ <<"gzzz">> = iolist_to_binary(re:replace("gzzz","([\\da-f:]+)$","CUmRDqbGoniV\\1",[caseless,
+ global])),
+ <<"fed ">> = iolist_to_binary(re:replace("fed ","([\\da-f:]+)$","bMg\\1\\1Smk",[caseless])),
+ <<"fed ">> = iolist_to_binary(re:replace("fed ","([\\da-f:]+)$","bMg\\1\\1Smk",[caseless,
+ global])),
+ <<"Any old rubbish">> = iolist_to_binary(re:replace("Any old rubbish","([\\da-f:]+)$","&NxG\\1osbOqKBX\\1UUxiI",[caseless])),
+ <<"Any old rubbish">> = iolist_to_binary(re:replace("Any old rubbish","([\\da-f:]+)$","&NxG\\1osbOqKBX\\1UUxiI",[caseless,
+ global])),
+ <<"xn1t">> = iolist_to_binary(re:replace(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","xn\\1t",[])),
+ <<"xn1t">> = iolist_to_binary(re:replace(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","xn\\1t",[global])),
+ <<"xuA.12.123.0pmID">> = iolist_to_binary(re:replace("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","xu&pmID",[])),
+ <<"xuA.12.123.0pmID">> = iolist_to_binary(re:replace("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","xu&pmID",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","p&&t\\1\\1M&oKI",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","p&&t\\1\\1M&oKI",[global])),
+ <<".1.2.3333">> = iolist_to_binary(re:replace(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&p",[])),
+ <<".1.2.3333">> = iolist_to_binary(re:replace(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","&p",[global])),
+ <<"1.2.3">> = iolist_to_binary(re:replace("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1&LbVkk&K&F&b",[])),
+ <<"1.2.3">> = iolist_to_binary(re:replace("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","\\1&LbVkk&K&F&b",[global])),
+ <<"1234.2.3">> = iolist_to_binary(re:replace("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","Paehh\\1",[])),
+ <<"1234.2.3">> = iolist_to_binary(re:replace("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$","Paehh\\1",[global])),
+ <<"1LAfJBRwFABikGlQ1 IN SOA non-sp1 non-sp2(jE1 IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","\\1LAfJBRwFABikGlQ&jE&",[])),
+ <<"1LAfJBRwFABikGlQ1 IN SOA non-sp1 non-sp2(jE1 IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","\\1LAfJBRwFABikGlQ&jE&",[global])),
+ <<"vcbW">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","vcbW",[])),
+ <<"vcbW">> = iolist_to_binary(re:replace("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","vcbW",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","N",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","N",[global])),
+ <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","F\\1lEQb&&o&c&&",[])),
+ <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(re:replace("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$","F\\1lEQb&&o&c&&",[global])),
+ <<"csJqaGLOa.a.Ca.Ma.ja.r">> = iolist_to_binary(re:replace("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","c\\1s\\1JqaGLO&&C&M&j&r",[])),
+ <<"csJqaGLOa.a.Ca.Ma.ja.r">> = iolist_to_binary(re:replace("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","c\\1s\\1JqaGLO&&C&M&j&r",[global])),
+ <<"TBVOOLuZ.Y">> = iolist_to_binary(re:replace("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","TBVOO\\1Lu&Y",[])),
+ <<"TBVOOLuZ.Y">> = iolist_to_binary(re:replace("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","TBVOO\\1Lu&Y",[global])),
+ <<"lAHLHAaNu2.yfAUu">> = iolist_to_binary(re:replace("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","lAH\\1LHAaNu\\1&yfAUu",[])),
+ <<"lAHLHAaNu2.yfAUu">> = iolist_to_binary(re:replace("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","lAH\\1LHAaNu\\1&yfAUu",[global])),
+ <<"EKpab-c.pq-r.">> = iolist_to_binary(re:replace("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","EKp&",[])),
+ <<"EKpab-c.pq-r.">> = iolist_to_binary(re:replace("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","EKp&",[global])),
+ <<"Ersxk.zzz.ac.uk.">> = iolist_to_binary(re:replace("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Er&",[])),
+ <<"Ersxk.zzz.ac.uk.">> = iolist_to_binary(re:replace("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Er&",[global])),
+ <<"Xqs">> = iolist_to_binary(re:replace("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Xqs",[])),
+ <<"Xqs">> = iolist_to_binary(re:replace("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Xqs",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","&DsB",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","&DsB",[global])),
+ <<"-abc.peq.">> = iolist_to_binary(re:replace("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Kqq&&AIru&&FA\\1gbG",[])),
+ <<"-abc.peq.">> = iolist_to_binary(re:replace("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$","Kqq&&AIru&&FA\\1gbG",[global])),
+ <<"OmWMM*.acuHiylpsiKq">> = iolist_to_binary(re:replace("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","\\1OmWMM&cuHiylpsiKq",[])),
+ <<"OmWMM*.acuHiylpsiKq">> = iolist_to_binary(re:replace("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","\\1OmWMM&cuHiylpsiKq",[global])),
+ <<"j0-a0-aXQ">> = iolist_to_binary(re:replace("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","j\\1\\1XQ",[])),
+ <<"j0-a0-aXQ">> = iolist_to_binary(re:replace("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","j\\1\\1XQ",[global])),
+ <<"r3-b">> = iolist_to_binary(re:replace("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","r\\1",[])),
+ <<"r3-b">> = iolist_to_binary(re:replace("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","r\\1",[global])),
+ <<"EAXRf*.c-a.b-cpOaqRe*.c-a.b-c-a*.c-a.b-cpGer*.c-a.b-c">> = iolist_to_binary(re:replace("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","EAXRf&pOaqRe&\\1&pGer&",[])),
+ <<"EAXRf*.c-a.b-cpOaqRe*.c-a.b-c-a*.c-a.b-cpGer*.c-a.b-c">> = iolist_to_binary(re:replace("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","EAXRf&pOaqRe&\\1&pGer&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","RmO\\1XAOA\\1p",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","RmO\\1XAOA\\1p",[global])),
+ <<"*.0">> = iolist_to_binary(re:replace("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&&iBqKyU",[])),
+ <<"*.0">> = iolist_to_binary(re:replace("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","&&iBqKyU",[global])),
+ <<"*.a-">> = iolist_to_binary(re:replace("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","sHEtAniwkH&",[])),
+ <<"*.a-">> = iolist_to_binary(re:replace("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","sHEtAniwkH&",[global])),
+ <<"*.a-b.c-">> = iolist_to_binary(re:replace("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","qy",[])),
+ <<"*.a-b.c-">> = iolist_to_binary(re:replace("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","qy",[global])),
+ <<"*.c-a.0-c">> = iolist_to_binary(re:replace("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","iH\\1J\\1\\1&iul\\1uosFI",[])),
+ <<"*.c-a.0-c">> = iolist_to_binary(re:replace("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$","iH\\1J\\1\\1&iul\\1uosFI",[global])),
+ <<"RW">> = iolist_to_binary(re:replace("abde","^(?=ab(de))(abd)(e)","RW",[])),
+ <<"RW">> = iolist_to_binary(re:replace("abde","^(?=ab(de))(abd)(e)","RW",[global])),
+ <<"xrNrabdft">> = iolist_to_binary(re:replace("abdf","^(?!(ab)de|x)(abd)(f)","xrNr&t",[])),
+ <<"xrNrabdft">> = iolist_to_binary(re:replace("abdf","^(?!(ab)de|x)(abd)(f)","xrNr&t",[global])),
+ <<"PaGpuabSCqabcdabababpbcd">> = iolist_to_binary(re:replace("abcd","^(?=(ab(cd)))(ab)","PaGpu&SCq\\1&&&pb",[])),
+ <<"PaGpuabSCqabcdabababpbcd">> = iolist_to_binary(re:replace("abcd","^(?=(ab(cd)))(ab)","PaGpu&SCq\\1&&&pb",[global])),
+ <<"eB.d.dgKSFa.b.c.dVO">> = iolist_to_binary(re:replace("a.b.c.d","^[\\da-f](\\.[\\da-f])*$","eB\\1\\1gKSF&VO",[caseless])),
+ <<"eB.d.dgKSFa.b.c.dVO">> = iolist_to_binary(re:replace("a.b.c.d","^[\\da-f](\\.[\\da-f])*$","eB\\1\\1gKSF&VO",[caseless,
+ global])),
+ <<"jpA.B.C.D.Dc.DTWA.B.C.Dl.DKIiy">> = iolist_to_binary(re:replace("A.B.C.D","^[\\da-f](\\.[\\da-f])*$","jp&\\1c\\1TW&l\\1KIiy",[caseless])),
+ <<"jpA.B.C.D.Dc.DTWA.B.C.Dl.DKIiy">> = iolist_to_binary(re:replace("A.B.C.D","^[\\da-f](\\.[\\da-f])*$","jp&\\1c\\1TW&l\\1KIiy",[caseless,
+ global])),
+ <<"NToo.Ca.Ca.b.c.1.2.3.C">> = iolist_to_binary(re:replace("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$","NToo\\1a\\1&",[caseless])),
+ <<"NToo.Ca.Ca.b.c.1.2.3.C">> = iolist_to_binary(re:replace("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$","NToo\\1a\\1&",[caseless,
+ global])),
+ <<"EftEvTFmRH">> = iolist_to_binary(re:replace("\"1234\"","^\\\".*\\\"\\s*(;.*)?$","\\1\\1EftEvTFmRH",[])),
+ <<"EftEvTFmRH">> = iolist_to_binary(re:replace("\"1234\"","^\\\".*\\\"\\s*(;.*)?$","\\1\\1EftEvTFmRH",[global])),
+ <<"j\"abcd\" ;Hyx\"abcd\" ;QTtQvYM\"abcd\" ;BK">> = iolist_to_binary(re:replace("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$","j&Hyx&QTtQvYM&BK",[])),
+ <<"j\"abcd\" ;Hyx\"abcd\" ;QTtQvYM\"abcd\" ;BK">> = iolist_to_binary(re:replace("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$","j&Hyx&QTtQvYM&BK",[global])),
+ <<"nM">> = iolist_to_binary(re:replace("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$","nM",[])),
+ <<"nM">> = iolist_to_binary(re:replace("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$","nM",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\\".*\\\"\\s*(;.*)?$","oRWmakO\\1L&pj",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\\".*\\\"\\s*(;.*)?$","oRWmakO\\1L&pj",[global])),
+ <<"\"1234\" : things">> = iolist_to_binary(re:replace("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$","kLuRd&B",[])),
+ <<"\"1234\" : things">> = iolist_to_binary(re:replace("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$","kLuRd&B",[global])),
+ <<"ixuQHwgCDVra">> = iolist_to_binary(re:replace("","^$","\\1&i\\1x\\1uQHw&\\1&gCDVra",[])),
+ <<"ixuQHwgCDVra">> = iolist_to_binary(re:replace("","^$","\\1&i\\1x\\1uQHw&\\1&gCDVra",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^$","Rg\\1SwLH\\1bP\\1&&S\\1Xa\\1S&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^$","Rg\\1SwLH\\1bP\\1&&S\\1Xa\\1S&",[global])),
+ <<"bgab cxhab cxfOtXqErdcf">> = iolist_to_binary(re:replace("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","bg&xh&xfOtXqE\\1rdcf",[extended])),
+ <<"bgab cxhab cxfOtXqErdcf">> = iolist_to_binary(re:replace("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","bg&xh&xfOtXqE\\1rdcf",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","kltlQqVmioWPcgb\\1",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","kltlQqVmioWPcgb\\1",[extended,
+ global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","F\\1FmlIs\\1\\1A&gEMuW",[extended])),
+ <<"abc">> = iolist_to_binary(re:replace("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","F\\1FmlIs\\1\\1A&gEMuW",[extended,
+ global])),
+ <<"ab cde">> = iolist_to_binary(re:replace("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","&wqEXOys\\1L",[extended])),
+ <<"ab cde">> = iolist_to_binary(re:replace("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","&wqEXOys\\1L",[extended,
+ global])),
+ <<"yxGLPQCju">> = iolist_to_binary(re:replace("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","yxGLPQCju",[])),
+ <<"yxGLPQCju">> = iolist_to_binary(re:replace("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","yxGLPQCju",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","JqU&Xjf\\1JY\\1c",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","JqU&Xjf\\1JY\\1c",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","ASnRhMlmWOb\\1Y&&",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","ASnRhMlmWOb\\1Y&&",[global])),
+ <<"ab cde">> = iolist_to_binary(re:replace("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","QcD",[])),
+ <<"ab cde">> = iolist_to_binary(re:replace("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)","QcD",[global])),
+ <<"yao">> = iolist_to_binary(re:replace("a bcd","^ a\\ b[c ]d $","\\1yao",[extended])),
+ <<"yao">> = iolist_to_binary(re:replace("a bcd","^ a\\ b[c ]d $","\\1yao",[extended,
+ global])),
+ <<"TrwOQA">> = iolist_to_binary(re:replace("a b d","^ a\\ b[c ]d $","TrwOQA",[extended])),
+ <<"TrwOQA">> = iolist_to_binary(re:replace("a b d","^ a\\ b[c ]d $","TrwOQA",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^ a\\ b[c ]d $","&rUS&afjjm&",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^ a\\ b[c ]d $","&rUS&afjjm&",[extended,
+ global])),
+ <<"abcd">> = iolist_to_binary(re:replace("abcd","^ a\\ b[c ]d $","L&XB\\1P",[extended])),
+ <<"abcd">> = iolist_to_binary(re:replace("abcd","^ a\\ b[c ]d $","L&XB\\1P",[extended,
+ global])),
+ <<"ab d">> = iolist_to_binary(re:replace("ab d","^ a\\ b[c ]d $","UMS&\\1tPBWwogPDQ&",[extended])),
+ <<"ab d">> = iolist_to_binary(re:replace("ab d","^ a\\ b[c ]d $","UMS&\\1tPBWwogPDQ&",[extended,
+ global])),
+ <<"xToOqchxqabch">> = iolist_to_binary(re:replace("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$","xToOqchxq\\1h",[])),
+ <<"xToOqchxqabch">> = iolist_to_binary(re:replace("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$","xToOqchxq\\1h",[global])),
+ ok.
+run2() ->
+ <<"LpAcLI">> = iolist_to_binary(re:replace("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$","LpAcLI",[])),
+ <<"LpAcLI">> = iolist_to_binary(re:replace("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$","LpAcLI",[global])),
+ <<"MFa+ Z0+
+QQ">> = iolist_to_binary(re:replace("a+ Z0+
+","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]","MF\\1&QQ",[])),
+ <<"MFa+ Z0+
+QQ">> = iolist_to_binary(re:replace("a+ Z0+
+","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]","MF\\1&QQ",[global])),
+ <<".^$(*+)|{?,?}.^$(*+)|{?,?}suXo">> = iolist_to_binary(re:replace(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+","&&s\\1uX\\1o",[])),
+ <<".^$(*+)|{?,?}.^$(*+)|{?,?}suXo">> = iolist_to_binary(re:replace(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+","&&s\\1uX\\1o",[global])),
+ <<"KDgPpAUcYEXSK">> = iolist_to_binary(re:replace("z","^a*\\w","KDgP\\1pAUcYEX\\1SK",[])),
+ <<"KDgPpAUcYEXSK">> = iolist_to_binary(re:replace("z","^a*\\w","KDgP\\1pAUcYEX\\1SK",[global])),
+ <<"slipoLkQ">> = iolist_to_binary(re:replace("az","^a*\\w","slipoLkQ",[])),
+ <<"slipoLkQ">> = iolist_to_binary(re:replace("az","^a*\\w","slipoLkQ",[global])),
+ <<"ritcgAWBT">> = iolist_to_binary(re:replace("aaaz","^a*\\w","ritcgAWBT",[])),
+ <<"ritcgAWBT">> = iolist_to_binary(re:replace("aaaz","^a*\\w","ritcgAWBT",[global])),
+ <<"XcRsWQyYNjiYwb">> = iolist_to_binary(re:replace("a","^a*\\w","X\\1cRsWQyYNjiYwb",[])),
+ <<"XcRsWQyYNjiYwb">> = iolist_to_binary(re:replace("a","^a*\\w","X\\1cRsWQyYNjiYwb",[global])),
+ <<"MaaFKe">> = iolist_to_binary(re:replace("aa","^a*\\w","M&F\\1\\1K\\1e",[])),
+ <<"MaaFKe">> = iolist_to_binary(re:replace("aa","^a*\\w","M&F\\1\\1K\\1e",[global])),
+ <<"h">> = iolist_to_binary(re:replace("aaaa","^a*\\w","h",[])),
+ <<"h">> = iolist_to_binary(re:replace("aaaa","^a*\\w","h",[global])),
+ <<"qYN+">> = iolist_to_binary(re:replace("a+","^a*\\w","qYN",[])),
+ <<"qYN+">> = iolist_to_binary(re:replace("a+","^a*\\w","qYN",[global])),
+ <<"EfVPxKaaaaewBXaaaawUW+">> = iolist_to_binary(re:replace("aa+","^a*\\w","EfVPx\\1K&&ewBX&&wUW",[])),
+ <<"EfVPxKaaaaewBXaaaawUW+">> = iolist_to_binary(re:replace("aa+","^a*\\w","EfVPx\\1K&&ewBX&&wUW",[global])),
+ <<"hslzzPMpWzzIkdYL">> = iolist_to_binary(re:replace("z","^a*?\\w","hsl&&PMpW&&I\\1kdYL",[])),
+ <<"hslzzPMpWzzIkdYL">> = iolist_to_binary(re:replace("z","^a*?\\w","hsl&&PMpW&&I\\1kdYL",[global])),
+ <<"RBz">> = iolist_to_binary(re:replace("az","^a*?\\w","R\\1B",[])),
+ <<"RBz">> = iolist_to_binary(re:replace("az","^a*?\\w","R\\1B",[global])),
+ <<"IvEhVdavyqnaaz">> = iolist_to_binary(re:replace("aaaz","^a*?\\w","IvEhVd&vy\\1qn",[])),
+ <<"IvEhVdavyqnaaz">> = iolist_to_binary(re:replace("aaaz","^a*?\\w","IvEhVd&vy\\1qn",[global])),
+ <<"JnVaaH">> = iolist_to_binary(re:replace("a","^a*?\\w","JnV&&\\1H\\1",[])),
+ <<"JnVaaH">> = iolist_to_binary(re:replace("a","^a*?\\w","JnV&&\\1H\\1",[global])),
+ <<"JFfVUa">> = iolist_to_binary(re:replace("aa","^a*?\\w","\\1J\\1FfVU",[])),
+ <<"JFfVUa">> = iolist_to_binary(re:replace("aa","^a*?\\w","\\1J\\1FfVU",[global])),
+ <<"aDPvxaYarvWrRabShaHaaa">> = iolist_to_binary(re:replace("aaaa","^a*?\\w","aDPvx&Y&rvWrR&bShaH",[])),
+ <<"aDPvxaYarvWrRabShaHaaa">> = iolist_to_binary(re:replace("aaaa","^a*?\\w","aDPvx&Y&rvWrR&bShaH",[global])),
+ <<"Aih+">> = iolist_to_binary(re:replace("a+","^a*?\\w","Ai\\1h",[])),
+ <<"Aih+">> = iolist_to_binary(re:replace("a+","^a*?\\w","Ai\\1h",[global])),
+ <<"xbMsOXBdaaAa+">> = iolist_to_binary(re:replace("aa+","^a*?\\w","xbMsOXBd&&A",[])),
+ <<"xbMsOXBdaaAa+">> = iolist_to_binary(re:replace("aa+","^a*?\\w","xbMsOXBd&&A",[global])),
+ <<"azvPASpIqMtrikazJ">> = iolist_to_binary(re:replace("az","^a+\\w","&vPASpIq\\1Mt\\1r\\1ik&J",[])),
+ <<"azvPASpIqMtrikazJ">> = iolist_to_binary(re:replace("az","^a+\\w","&vPASpIq\\1Mt\\1r\\1ik&J",[global])),
+ <<"ofnsOlLLpmuNPiXJE">> = iolist_to_binary(re:replace("aaaz","^a+\\w","ofnsOlLLpmuNPiXJE",[])),
+ <<"ofnsOlLLpmuNPiXJE">> = iolist_to_binary(re:replace("aaaz","^a+\\w","ofnsOlLLpmuNPiXJE",[global])),
+ <<"baaDpxe">> = iolist_to_binary(re:replace("aa","^a+\\w","b&D\\1pxe",[])),
+ <<"baaDpxe">> = iolist_to_binary(re:replace("aa","^a+\\w","b&D\\1pxe",[global])),
+ <<"blkOVluqr">> = iolist_to_binary(re:replace("aaaa","^a+\\w","b\\1lkOV\\1luqr",[])),
+ <<"blkOVluqr">> = iolist_to_binary(re:replace("aaaa","^a+\\w","b\\1lkOV\\1luqr",[global])),
+ <<"RNRBD+">> = iolist_to_binary(re:replace("aa+","^a+\\w","RNRBD",[])),
+ <<"RNRBD+">> = iolist_to_binary(re:replace("aa+","^a+\\w","RNRBD",[global])),
+ <<"CyazerWDQaNazazxDT">> = iolist_to_binary(re:replace("az","^a+?\\w","Cy&\\1erWDQaN&&xDT\\1",[])),
+ <<"CyazerWDQaNazazxDT">> = iolist_to_binary(re:replace("az","^a+?\\w","Cy&\\1erWDQaN&&xDT\\1",[global])),
+ <<"pqJrRaaNRaz">> = iolist_to_binary(re:replace("aaaz","^a+?\\w","pq\\1J\\1rR&NR",[])),
+ <<"pqJrRaaNRaz">> = iolist_to_binary(re:replace("aaaz","^a+?\\w","pq\\1J\\1rR&NR",[global])),
+ <<"aaAdj">> = iolist_to_binary(re:replace("aa","^a+?\\w","&Ad\\1j",[])),
+ <<"aaAdj">> = iolist_to_binary(re:replace("aa","^a+?\\w","&Ad\\1j",[global])),
+ <<"JsRWaaEHmuaaFaaArLaNaaaa">> = iolist_to_binary(re:replace("aaaa","^a+?\\w","JsRW&EHmu&F&\\1ArLaN&",[])),
+ <<"JsRWaaEHmuaaFaaArLaNaaaa">> = iolist_to_binary(re:replace("aaaa","^a+?\\w","JsRW&EHmu&F&\\1ArLaN&",[global])),
+ <<"hQmeo+">> = iolist_to_binary(re:replace("aa+","^a+?\\w","hQmeo",[])),
+ <<"hQmeo+">> = iolist_to_binary(re:replace("aa+","^a+?\\w","hQmeo",[global])),
+ <<"tSwgJd1234567890">> = iolist_to_binary(re:replace("1234567890","^\\d{8}\\w{2,}","tSwgJd&",[])),
+ <<"tSwgJd1234567890">> = iolist_to_binary(re:replace("1234567890","^\\d{8}\\w{2,}","tSwgJd&",[global])),
+ <<"u">> = iolist_to_binary(re:replace("12345678ab","^\\d{8}\\w{2,}","u",[])),
+ <<"u">> = iolist_to_binary(re:replace("12345678ab","^\\d{8}\\w{2,}","u",[global])),
+ <<"12345678__JvTBhjF">> = iolist_to_binary(re:replace("12345678__","^\\d{8}\\w{2,}","&JvTBhj\\1F",[])),
+ <<"12345678__JvTBhjF">> = iolist_to_binary(re:replace("12345678__","^\\d{8}\\w{2,}","&JvTBhj\\1F",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8}\\w{2,}","JQw&GNCBooSB",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8}\\w{2,}","JQw&GNCBooSB",[global])),
+ <<"1234567">> = iolist_to_binary(re:replace("1234567","^\\d{8}\\w{2,}","oTp&mFd\\1",[])),
+ <<"1234567">> = iolist_to_binary(re:replace("1234567","^\\d{8}\\w{2,}","oTp&mFd\\1",[global])),
+ <<"truoieVC">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}$","tr&V\\1\\1C",[])),
+ <<"truoieVC">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}$","tr&V\\1\\1C",[global])),
+ <<"SIBB1234a">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}$","SIBB\\1&a",[])),
+ <<"SIBB1234a">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}$","SIBB\\1&a",[global])),
+ <<"12345KiNQWVML12345HyU">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}$","&KiN\\1QWVML&HyU",[])),
+ <<"12345KiNQWVML12345HyU">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}$","&KiN\\1QWVML&HyU",[global])),
+ <<"hxENo">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}$","\\1hxENo\\1",[])),
+ <<"hxENo">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}$","\\1hxENo\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[aeiou\\d]{4,5}$","h&RGpLB\\1hlS&pk\\1&yKh",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[aeiou\\d]{4,5}$","h&RGpLB\\1hlS&pk\\1&yKh",[global])),
+ <<"123456">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}$","&\\1rrEfxa\\1mc",[])),
+ <<"123456">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}$","&\\1rrEfxa\\1mc",[global])),
+ <<"hJscruoieFbuoie">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}?","hJs\\1cr&Fb&",[])),
+ <<"hJscruoieFbuoie">> = iolist_to_binary(re:replace("uoie","^[aeiou\\d]{4,5}?","hJs\\1cr&Fb&",[global])),
+ <<"OK12341234bV">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}?","OK&&bV",[])),
+ <<"OK12341234bV">> = iolist_to_binary(re:replace("1234","^[aeiou\\d]{4,5}?","OK&&bV",[global])),
+ <<"g5">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}?","g\\1",[])),
+ <<"g5">> = iolist_to_binary(re:replace("12345","^[aeiou\\d]{4,5}?","g\\1",[global])),
+ <<"MKbLkaaaajjoeeykaaaaa">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}?","MKbLk&jjoeeyk&",[])),
+ <<"MKbLkaaaajjoeeykaaaaa">> = iolist_to_binary(re:replace("aaaaa","^[aeiou\\d]{4,5}?","MKbLk&jjoeeyk&",[global])),
+ <<"qExB1234GQ56">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}?","qExB&GQ",[])),
+ <<"qExB1234GQ56">> = iolist_to_binary(re:replace("123456","^[aeiou\\d]{4,5}?","qExB&GQ",[global])),
+ <<"abc=abcabcshRMauJabceabcMabcvDjywabcw">> = iolist_to_binary(re:replace("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z","&shRMauJ\\1e\\1M\\1vDjyw\\1w",[])),
+ <<"abc=abcabcshRMauJabceabcMabcvDjywabcw">> = iolist_to_binary(re:replace("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z","&shRMauJ\\1e\\1M\\1vDjyw\\1w",[global])),
+ <<"def=defdefdefM">> = iolist_to_binary(re:replace("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z","&M",[])),
+ <<"def=defdefdefM">> = iolist_to_binary(re:replace("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z","&M",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z","\\1ums",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z","\\1ums",[global])),
+ <<"abc=defdef">> = iolist_to_binary(re:replace("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z","DkIJLD&Cwg&\\1kq&tsp&&",[])),
+ <<"abc=defdef">> = iolist_to_binary(re:replace("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z","DkIJLD&Cwg&\\1kq&tsp&&",[global])),
+ <<"uaahabcdefghijkcda2aqkRJhtVuiyWJaG">> = iolist_to_binary(re:replace("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","u\\1ah&\\1qkRJhtVuiyWJaG",[])),
+ <<"uaahabcdefghijkcda2aqkRJhtVuiyWJaG">> = iolist_to_binary(re:replace("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","u\\1ah&\\1qkRJhtVuiyWJaG",[global])),
+ <<"lBSDdJXabcdefghijkkkkcda2DPEXjc">> = iolist_to_binary(re:replace("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","lBSDdJX&DPEXjc",[])),
+ <<"lBSDdJXabcdefghijkkkkcda2DPEXjc">> = iolist_to_binary(re:replace("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$","lBSDdJX&DPEXjc",[global])),
+ <<"tEYloj">> = iolist_to_binary(re:replace("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","tEYloj",[])),
+ <<"tEYloj">> = iolist_to_binary(re:replace("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","tEYloj",[global])),
+ <<"catatonic catatonic23HiXcatatonic catatonic23">> = iolist_to_binary(re:replace("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","&HiX&",[])),
+ <<"catatonic catatonic23HiXcatatonic catatonic23">> = iolist_to_binary(re:replace("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","&HiX&",[global])),
+ <<"EtmqcaterpillarvtVmieDAa">> = iolist_to_binary(re:replace("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","Etmq\\1vtVmieDAa",[])),
+ <<"EtmqcaterpillarvtVmieDAa">> = iolist_to_binary(re:replace("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)","Etmq\\1vtVmieDAa",[global])),
+ <<"rFrom abcd Mon Sep 01 12:33aThFrom abcd Mon Sep 01 12:33rJabcd:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]","r&aTh&rJ\\1",[])),
+ <<"rFrom abcd Mon Sep 01 12:33aThFrom abcd Mon Sep 01 12:33rJabcd:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]","r&aTh&rJ\\1",[global])),
+ <<"tKjeGYi:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","tKjeGYi",[])),
+ <<"tKjeGYi:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","tKjeGYi",[global])),
+ <<"From abcd Mon Sep 1 12:33Sep WqBFrom abcd Mon Sep 1 12:33UFrom abcd Mon Sep 1 12:33MHUFrom abcd Mon Sep 1 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","&\\1WqB&U&MHU&",[])),
+ <<"From abcd Mon Sep 1 12:33Sep WqBFrom abcd Mon Sep 1 12:33UFrom abcd Mon Sep 1 12:33MHUFrom abcd Mon Sep 1 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","&\\1WqB&U&MHU&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","RWw&\\1f",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","RWw&\\1f",[global])),
+ <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","lDKNKPmMpd",[])),
+ <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(re:replace("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d","lDKNKPmMpd",[global])),
+ <<"eNnWbKP">> = iolist_to_binary(re:replace("12
+34","^12.34","eNnWbK\\1P",[dotall])),
+ <<"eNnWbKP">> = iolist_to_binary(re:replace("12
+34","^12.34","eNnWbK\\1P",[dotall,global])),
+ <<"fI12 34N">> = iolist_to_binary(re:replace("12 34","^12.34","fI&N\\1",[dotall])),
+ <<"fI12 34N">> = iolist_to_binary(re:replace("12 34","^12.34","fI&N\\1",[dotall,
+ global])),
+ <<"the quick jmlgbrownfrbrownIaXThxdySok fox">> = iolist_to_binary(re:replace("the quick brown fox","\\w+(?=\\t)","j\\1mlg&fr&IaXThxdySok",[])),
+ <<"the quick jmlgbrownfrbrownIaXThxdySok fox">> = iolist_to_binary(re:replace("the quick brown fox","\\w+(?=\\t)","j\\1mlg&fr&IaXThxdySok",[global])),
+ <<"foobar is vjQvQsKSfoolish see?cmTPlish see?DB">> = iolist_to_binary(re:replace("foobar is foolish see?","foo(?!bar)(.*)","vjQvQsKS&cmTP\\1DB",[])),
+ <<"foobar is vjQvQsKSfoolish see?cmTPlish see?DB">> = iolist_to_binary(re:replace("foobar is foolish see?","foo(?!bar)(.*)","vjQvQsKS&cmTP\\1DB",[global])),
+ <<"foobar cGBmrowbar etcrowbar etcxPCf etc">> = iolist_to_binary(re:replace("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)","GBm&&xPCf\\1",[])),
+ <<"foobar cGBmrowbar etcrowbar etcxPCf etc">> = iolist_to_binary(re:replace("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)","GBm&&xPCf\\1",[global])),
+ <<"GDErP">> = iolist_to_binary(re:replace("barrel","(?:(?!foo)...|^.{0,2})bar(.*)","GDErP",[])),
+ <<"GDErP">> = iolist_to_binary(re:replace("barrel","(?:(?!foo)...|^.{0,2})bar(.*)","GDErP",[global])),
+ <<"VFDc2barrelqsDrelRKrelbMVIi2barrelb2barrel">> = iolist_to_binary(re:replace("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)","VFDc&qsD\\1RK\\1bMVIi&b&",[])),
+ <<"VFDc2barrelqsDrelRKrelbMVIi2barrelb2barrel">> = iolist_to_binary(re:replace("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)","VFDc&qsD\\1RK\\1bMVIi&b&",[global])),
+ <<"DreltMOOKlgrelMMOgA barrel">> = iolist_to_binary(re:replace("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)","D\\1tMOOKlg\\1MMOg&",[])),
+ <<"DreltMOOKlgrelMMOgA barrel">> = iolist_to_binary(re:replace("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)","D\\1tMOOKlg\\1MMOg&",[global])),
+ <<"DiLKve456">> = iolist_to_binary(re:replace("abc456","^(\\D*)(?=\\d)(?!123)","DiLKve",[])),
+ <<"DiLKve456">> = iolist_to_binary(re:replace("abc456","^(\\D*)(?=\\d)(?!123)","DiLKve",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","BTbC",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","BTbC",[global])),
+ <<"abc123">> = iolist_to_binary(re:replace("abc123","^(\\D*)(?=\\d)(?!123)","DJbM\\1wLxB\\1J&&H\\1&uHc",[])),
+ <<"abc123">> = iolist_to_binary(re:replace("abc123","^(\\D*)(?=\\d)(?!123)","DJbM\\1wLxB\\1J&&H\\1&uHc",[global])),
+ ok.
+run3() ->
+ <<"1234cNbGaCaxuI">> = iolist_to_binary(re:replace("1234","^1234(?# test newlines
+ inside)","&cNbGaCaxuI",[])),
+ <<"1234cNbGaCaxuI">> = iolist_to_binary(re:replace("1234","^1234(?# test newlines
+ inside)","&cNbGaCaxuI",[global])),
+ <<"jmCvIAMNV1234nNrfW1234GM">> = iolist_to_binary(re:replace("1234","^1234 #comment in extended re
+ ","\\1jmCvIAMNV\\1&nNrfW&GM",[extended])),
+ <<"jmCvIAMNV1234nNrfW1234GM">> = iolist_to_binary(re:replace("1234","^1234 #comment in extended re
+ ","\\1jmCvIAMNV\\1&nNrfW&GM",[extended,global])),
+ <<"YyiILRKFjY">> = iolist_to_binary(re:replace("abcd","#rhubarb
+ abcd","YyiILRKFjY",[extended])),
+ <<"YyiILRKFjY">> = iolist_to_binary(re:replace("abcd","#rhubarb
+ abcd","YyiILRKFjY",[extended,global])),
+ <<"XbpsAef">> = iolist_to_binary(re:replace("abcd","^abcd#rhubarb","Xbps\\1Aef",[extended])),
+ <<"XbpsAef">> = iolist_to_binary(re:replace("abcd","^abcd#rhubarb","Xbps\\1Aef",[extended,
global])),
-?line <<"aqfaaaab">> = iolist_to_binary(re:replace("aaab","^(a)\\1{2,3}(.)","\\1qf\\1&",[])),
-?line <<"aqfaaaab">> = iolist_to_binary(re:replace("aaab","^(a)\\1{2,3}(.)","\\1qf\\1&",[global])),
-?line <<"aLGaaaabhavaLLxaIaaaabJaaaabidaaaab">> = iolist_to_binary(re:replace("aaaab","^(a)\\1{2,3}(.)","\\1LG&h\\1v\\1LLx\\1I&J&id&",[])),
-?line <<"aLGaaaabhavaLLxaIaaaabJaaaabidaaaab">> = iolist_to_binary(re:replace("aaaab","^(a)\\1{2,3}(.)","\\1LG&h\\1v\\1LLx\\1I&J&id&",[global])),
-?line <<"aaaaaEaaaaagaawPOaNaaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a)\\1{2,3}(.)","&E&g\\1\\1wPO\\1N&",[])),
-?line <<"aaaaaEaaaaagaawPOaNaaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a)\\1{2,3}(.)","&E&g\\1\\1wPO\\1N&",[global])),
-?line <<"QwegtaHxecVVVaaaaaab">> = iolist_to_binary(re:replace("aaaaaab","^(a)\\1{2,3}(.)","QwegtaHxecVVV&",[])),
-?line <<"QwegtaHxecVVVaaaaaab">> = iolist_to_binary(re:replace("aaaaaab","^(a)\\1{2,3}(.)","QwegtaHxecVVV&",[global])),
-?line <<"the EcabcmU">> = iolist_to_binary(re:replace("the abc","(?!^)abc","Ec&mU",[])),
-?line <<"the EcabcmU">> = iolist_to_binary(re:replace("the abc","(?!^)abc","Ec&mU",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?!^)abc","NA",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?!^)abc","NA",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(?!^)abc","yjhaoMMFW\\1",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(?!^)abc","yjhaoMMFW\\1",[global])),
-?line <<"PKCfTNYlWMooD">> = iolist_to_binary(re:replace("abc","(?=^)abc","\\1PK\\1CfTNYlWMooD",[])),
-?line <<"PKCfTNYlWMooD">> = iolist_to_binary(re:replace("abc","(?=^)abc","\\1PK\\1CfTNYlWMooD",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=^)abc","fR\\1ltffBHNVYixMX",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=^)abc","fR\\1ltffBHNVYixMX",[global])),
-?line <<"the abc">> = iolist_to_binary(re:replace("the abc","(?=^)abc","L\\1JJFtgfU&l",[])),
-?line <<"the abc">> = iolist_to_binary(re:replace("the abc","(?=^)abc","L\\1JJFtgfU&l",[global])),
-?line <<"aabbvbOdaabbyVtUjIbqObbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*|b)","&v\\1Od&yVtUjI\\1qO\\1",[])),
-?line <<"aabbvbOdaabbyVtUjIbqObbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*|b)","&v\\1Od&yVtUjI\\1qO\\1",[global])),
-?line <<"PLPJVxaabbbbbYrEOEywwHFp">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*|b)","PLPJVxa\\1YrEOEywwHFp",[])),
-?line <<"PLPJVxaabbbbbYrEOEywwHFp">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*|b)","PLPJVxa\\1YrEOEywwHFp",[global])),
-?line <<"VmghaaMBBitDaaaRnWKaaaAbbbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*?|b)","Vmgh&MBBitD&\\1RnWK&\\1A",[])),
-?line <<"VmghaaMBBitDaaaRnWKaaaAbbbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*?|b)","Vmgh&MBBitD&\\1RnWK&\\1A",[global])),
-?line <<"baabblNbbLhaabbtbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*?|b)","\\1&lNb\\1Lh&t",[])),
-?line <<"baabblNbbLhaabbtbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*?|b)","\\1&lNb\\1Lh&t",[global])),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
+ <<"iPHiDDB">> = iolist_to_binary(re:replace("aaab","^(a)\\1{2,3}(.)","iPHiDDB",[])),
+ <<"iPHiDDB">> = iolist_to_binary(re:replace("aaab","^(a)\\1{2,3}(.)","iPHiDDB",[global])),
+ <<"IXEQflgnaWgr">> = iolist_to_binary(re:replace("aaaab","^(a)\\1{2,3}(.)","IXEQflgn\\1Wgr",[])),
+ <<"IXEQflgnaWgr">> = iolist_to_binary(re:replace("aaaab","^(a)\\1{2,3}(.)","IXEQflgn\\1Wgr",[global])),
+ <<"gToJhaaaaaOaaaaaaaaaaaiaaaaaHLaNAWab">> = iolist_to_binary(re:replace("aaaaab","^(a)\\1{2,3}(.)","gToJh&O\\1&&i&HL\\1NAW\\1",[])),
+ <<"gToJhaaaaaOaaaaaaaaaaaiaaaaaHLaNAWab">> = iolist_to_binary(re:replace("aaaaab","^(a)\\1{2,3}(.)","gToJh&O\\1&&i&HL\\1NAW\\1",[global])),
+ <<"aaaaaaGwEYYdXmTRmaaaaasXab">> = iolist_to_binary(re:replace("aaaaaab","^(a)\\1{2,3}(.)","&\\1GwEYYdXmTRm&sX",[])),
+ <<"aaaaaaGwEYYdXmTRmaaaaasXab">> = iolist_to_binary(re:replace("aaaaaab","^(a)\\1{2,3}(.)","&\\1GwEYYdXmTRm&sX",[global])),
+ <<"the abcabcLiXhGXmrloabcEfabcAbS">> = iolist_to_binary(re:replace("the abc","(?!^)abc","&&LiXhGXmrlo&Ef&AbS",[])),
+ <<"the abcabcLiXhGXmrloabcEfabcAbS">> = iolist_to_binary(re:replace("the abc","(?!^)abc","&&LiXhGXmrlo&Ef&AbS",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?!^)abc","uyPPG",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?!^)abc","uyPPG",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?!^)abc","x\\1sgS\\1tB\\1RcyA\\1enf",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?!^)abc","x\\1sgS\\1tB\\1RcyA\\1enf",[global])),
+ <<"abcubl">> = iolist_to_binary(re:replace("abc","(?=^)abc","&ubl",[])),
+ <<"abcubl">> = iolist_to_binary(re:replace("abc","(?=^)abc","&ubl",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=^)abc","NPTqioPj",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=^)abc","NPTqioPj",[global])),
+ <<"the abc">> = iolist_to_binary(re:replace("the abc","(?=^)abc","\\1pNTRQmK\\1Hj",[])),
+ <<"the abc">> = iolist_to_binary(re:replace("the abc","(?=^)abc","\\1pNTRQmK\\1Hj",[global])),
+ <<"QpbbCJcbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*|b)","Qp\\1bCJc",[])),
+ <<"QpbbCJcbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*|b)","Qp\\1bCJc",[global])),
+ <<"PcVuJcWmvIiq">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*|b)","PcVuJcWmvIiq",[])),
+ <<"PcVuJcWmvIiq">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*|b)","PcVuJcWmvIiq",[global])),
+ <<"fwRaaeKbsaanjaKaUaadaaybbbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*?|b)","fwR&eKbs&nj\\1K\\1U&d\\1\\1y",[])),
+ <<"fwRaaeKbsaanjaKaUaadaaybbbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}?(ab*?|b)","fwR&eKbs&nj\\1K\\1U&d\\1\\1y",[global])),
+ <<"bblQaabbCsbbeeQvYbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*?|b)","\\1\\1lQ&Cs\\1\\1eeQvY",[])),
+ <<"bblQaabbCsbbeeQvYbbb">> = iolist_to_binary(re:replace("aabbbbb","^[ab]{1,3}(ab*?|b)","\\1\\1lQ&Cs\\1\\1eeQvY",[global])),
+ <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -902,8 +959,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","Ag",[extended])),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","SOd&j",[extended])),
+ <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1095,9 +1152,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","Ag",[extended,
- global])),
-?line <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","SOd&j",[extended,
+ global])),
+ <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1289,8 +1346,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","OcN\\1",[extended])),
-?line <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","Rli",[extended])),
+ <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1482,9 +1539,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","OcN\\1",[extended,
- global])),
-?line <<"user.ain">> = iolist_to_binary(re:replace("user.ain"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","Rli",[extended,
+ global])),
+ <<"user.ain">> = iolist_to_binary(re:replace("user.ain"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1676,8 +1733,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","P\\1\\1",[extended])),
-?line <<"user.ain">> = iolist_to_binary(re:replace("user.ain"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","g&TWfEDY",[extended])),
+ <<"user.ain">> = iolist_to_binary(re:replace("user.ain"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1869,9 +1926,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","P\\1\\1",[extended,
- global])),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","g&TWfEDY",[extended,
+ global])),
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2063,8 +2120,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","tFTD&XMAPNeq",[extended])),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","Cw",[extended])),
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2256,9 +2313,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","tFTD&XMAPNeq",[extended,
- global])),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","Cw",[extended,
+ global])),
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2450,8 +2507,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","c\\1&C&YTXnfnhWs\\1g",[extended])),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","ej",[extended])),
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2643,9 +2700,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","c\\1&C&YTXnfnhWs\\1g",[extended,
- global])),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","ej",[extended,
+ global])),
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2837,8 +2894,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","\\1R&P&\\1aCnlgH",[extended])),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","y\\1D",[extended])),
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3030,9 +3087,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","\\1R&P&\\1aCnlgH",[extended,
- global])),
-?line <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","y\\1D",[extended,
+ global])),
+ <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3224,8 +3281,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","p\\1u\\1REy&",[extended])),
-?line <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","\\1jrwjC",[extended])),
+ <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3417,9 +3474,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","p\\1u\\1REy&",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","\\1jrwjC",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3611,8 +3668,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","qytCjuWj\\1fpNNv\\1&ya",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","&qqjm",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3804,9 +3861,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","qytCjuWj\\1fpNNv\\1&ya",[extended,
- global])),
-?line <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","&qqjm",[extended,
+ global])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3998,8 +4055,8 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","L",[extended])),
-?line <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox"," (?: [\\040\\t] | \\(
+\\) )* # optional trailing comment","m\\1K&o&&mg&qC&f\\1V\\1i",[extended])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4191,9 +4248,9 @@ run() ->
# name and address
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
-\\) )* # optional trailing comment","L",[extended,
- global])),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
+\\) )* # optional trailing comment","m\\1K&o&&mg&qC&f\\1V\\1i",[extended,
+ global])),
+ <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -4773,8 +4830,8 @@ run() ->
# address spec
> # >
# name and address
-)","\\1",[extended])),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
+)","d\\1&sJD\\1oA\\1Aruv",[extended])),
+ <<"Alan Other <user.ain>">> = iolist_to_binary(re:replace("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -5354,8 +5411,8 @@ run() ->
# address spec
> # >
# name and address
-)","\\1",[extended,global])),
-?line <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>","[\\040\\t]* # Nab whitespace.
+)","d\\1&sJD\\1oA\\1Aruv",[extended,global])),
+ <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -5935,8 +5992,8 @@ run() ->
# address spec
> # >
# name and address
-)","On",[extended])),
-?line <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>","[\\040\\t]* # Nab whitespace.
+)","HuWGl&iF&NPX&",[extended])),
+ <<"<user.ain>">> = iolist_to_binary(re:replace("<user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -6516,8 +6573,8 @@ run() ->
# address spec
> # >
# name and address
-)","On",[extended,global])),
-?line <<"user.ain">> = iolist_to_binary(re:replace("user.ain","[\\040\\t]* # Nab whitespace.
+)","HuWGl&iF&NPX&",[extended,global])),
+ <<"user.ain">> = iolist_to_binary(re:replace("user.ain","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -7097,8 +7154,8 @@ run() ->
# address spec
> # >
# name and address
-)","OLL\\1TqepmsD\\1V\\1\\1h\\1DsD",[extended])),
-?line <<"user.ain">> = iolist_to_binary(re:replace("user.ain","[\\040\\t]* # Nab whitespace.
+)","VhK&cYXg&Bq\\1f&F",[extended])),
+ <<"user.ain">> = iolist_to_binary(re:replace("user.ain","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -7678,8 +7735,8 @@ run() ->
# address spec
> # >
# name and address
-)","OLL\\1TqepmsD\\1V\\1\\1h\\1DsD",[extended,global])),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+)","VhK&cYXg&Bq\\1f&F",[extended,global])),
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -8259,8 +8316,8 @@ run() ->
# address spec
> # >
# name and address
-)","SHuKuC\\1Td",[extended])),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+)","a\\1&eMwwW",[extended])),
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -8840,8 +8897,8 @@ run() ->
# address spec
> # >
# name and address
-)","SHuKuC\\1Td",[extended,global])),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+)","a\\1&eMwwW",[extended,global])),
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -9421,8 +9478,8 @@ run() ->
# address spec
> # >
# name and address
-)","D&t&LSQGMfQpSXj",[extended])),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+)","\\1n\\1nYhyxBv&nk&&Sa",[extended])),
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(re:replace("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -10002,8 +10059,8 @@ run() ->
# address spec
> # >
# name and address
-)","D&t&LSQGMfQpSXj",[extended,global])),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
+)","\\1n\\1nYhyxBv&nk&&Sa",[extended,global])),
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -10583,8 +10640,8 @@ run() ->
# address spec
> # >
# name and address
-)","qDSGw",[extended])),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
+)","\\1fdORBWKv\\1&",[extended])),
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(re:replace("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -11164,8 +11221,8 @@ run() ->
# address spec
> # >
# name and address
-)","qDSGw",[extended,global])),
-?line <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
+)","\\1fdORBWKv\\1&",[extended,global])),
+ <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -11745,8 +11802,8 @@ run() ->
# address spec
> # >
# name and address
-)","SOYovQniOUVJIil\\1",[extended])),
-?line <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
+)","Utb&\\1l&M\\1aori&\\1&W",[extended])),
+ <<"A missing angle <user.where">> = iolist_to_binary(re:replace("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -12326,8 +12383,8 @@ run() ->
# address spec
> # >
# name and address
-)","SOYovQniOUVJIil\\1",[extended,global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\040\\t]* # Nab whitespace.
+)","Utb&\\1l&M\\1aori&\\1&W",[extended,global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -12907,8 +12964,8 @@ run() ->
# address spec
> # >
# name and address
-)","D\\1",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\040\\t]* # Nab whitespace.
+)","\\1&RUPp\\1",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -13488,8 +13545,8 @@ run() ->
# address spec
> # >
# name and address
-)","D\\1",[extended,global])),
-?line <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","[\\040\\t]* # Nab whitespace.
+)","\\1&RUPp\\1",[extended,global])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -14069,8 +14126,8 @@ run() ->
# address spec
> # >
# name and address
-)","X&ayUGYrNMDenjwrkvT",[extended])),
-?line <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","[\\040\\t]* # Nab whitespace.
+)","M",[extended])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -14650,3409 +14707,3433 @@ run() ->
# address spec
> # >
# name and address
-)","X&ayUGYrNMDenjwrkvT",[extended,global])),
-?line <<"abcdefpqrxyz0AB">> = iolist_to_binary(re:replace("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB","bYVVTfV",[])),
-?line <<"abcdefpqrxyz0AB">> = iolist_to_binary(re:replace("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB","bYVVTfV",[global])),
-?line <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(re:replace("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB","ALc",[])),
-?line <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(re:replace("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB","ALc",[global])),
-?line <<"abc efpqr0xyz00AB">> = iolist_to_binary(re:replace("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","FJjJa&MUN",[])),
-?line <<"abc efpqr0xyz00AB">> = iolist_to_binary(re:replace("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","FJjJa&MUN",[global])),
-?line <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(re:replace("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","IsJK",[])),
-?line <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(re:replace("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","IsJK",[global])),
-?line <<"A">> = iolist_to_binary(re:replace("A","^[\\000-\\037]","&&&l&oFiYRb&dwnRVIB",[])),
-?line <<"A">> = iolist_to_binary(re:replace("A","^[\\000-\\037]","&&&l&oFiYRb&dwnRVIB",[global])),
-?line <<"pJINBIVHkbsQpNB">> = iolist_to_binary(re:replace("B","^[\\000-\\037]","p\\1JINBIVHkbs&QpN",[])),
-?line <<"pJINBIVHkbsQpNB">> = iolist_to_binary(re:replace("B","^[\\000-\\037]","p\\1JINBIVHkbs&QpN",[global])),
-?line <<"qnaxlKtxgBKMC">> = iolist_to_binary(re:replace("C","^[\\000-\\037]","qnax&lKtxgB&KM",[])),
-?line <<"qnaxlKtxgBKMC">> = iolist_to_binary(re:replace("C","^[\\000-\\037]","qnax&lKtxgB&KM",[global])),
-?line <<"WuuRxIy">> = iolist_to_binary(re:replace("","\\0*","Wu&uRxIy",[])),
-?line <<"WuuRxIy">> = iolist_to_binary(re:replace("","\\0*","Wu&uRxIy",[global])),
-?line <<"The AZ">> = iolist_to_binary(re:replace("The AZ","A\\x0{2,3}Z","ggJSniphIbt",[])),
-?line <<"The AZ">> = iolist_to_binary(re:replace("The AZ","A\\x0{2,3}Z","ggJSniphIbt",[global])),
-?line <<"An AZ">> = iolist_to_binary(re:replace("An AZ","A\\x0{2,3}Z","s&\\1Bwkjj",[])),
-?line <<"An AZ">> = iolist_to_binary(re:replace("An AZ","A\\x0{2,3}Z","s&\\1Bwkjj",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","A\\x0{2,3}Z","\\1eJyYpl",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","A\\x0{2,3}Z","\\1eJyYpl",[global])),
-?line <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","aK\\1qVDC\\1uB",[])),
-?line <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","aK\\1qVDC\\1uB",[global])),
-?line <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","DMN&CNdjTe",[])),
-?line <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","DMN&CNdjTe",[global])),
-?line <<"cowcowbelldrlcowNSbcowcowbelladivdcowcowbell">> = iolist_to_binary(re:replace("cowcowbell","^(cow|)\\1(bell)","&drl\\1NSb&adivd&",[])),
-?line <<"cowcowbelldrlcowNSbcowcowbelladivdcowcowbell">> = iolist_to_binary(re:replace("cowcowbell","^(cow|)\\1(bell)","&drl\\1NSb&adivd&",[global])),
-?line <<"UUUBpbellPtC">> = iolist_to_binary(re:replace("bell","^(cow|)\\1(bell)","UUUBp&P\\1tC",[])),
-?line <<"UUUBpbellPtC">> = iolist_to_binary(re:replace("bell","^(cow|)\\1(bell)","UUUBp&P\\1tC",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(cow|)\\1(bell)","\\1\\1L\\1foe&LDaKY",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(cow|)\\1(bell)","\\1\\1L\\1foe&LDaKY",[global])),
-?line <<"cowbell">> = iolist_to_binary(re:replace("cowbell","^(cow|)\\1(bell)","&pE",[])),
-?line <<"cowbell">> = iolist_to_binary(re:replace("cowbell","^(cow|)\\1(bell)","&pE",[global])),
-?line <<"KEPMMarMefAQoabc">> = iolist_to_binary(re:replace(" abc","^\\s","KEP\\1MMa\\1rMefAQ\\1\\1\\1o",[])),
-?line <<"KEPMMarMefAQoabc">> = iolist_to_binary(re:replace(" abc","^\\s","KEP\\1MMa\\1rMefAQ\\1\\1\\1o",[global])),
-?line <<"mdPwbKbGabc">> = iolist_to_binary(re:replace(" abc","^\\s","mdPwbKbG",[])),
-?line <<"mdPwbKbGabc">> = iolist_to_binary(re:replace(" abc","^\\s","mdPwbKbG",[global])),
-?line <<"Ed
-FNgfabc">> = iolist_to_binary(re:replace("
-abc","^\\s","Ed&FNgf",[])),
-?line <<"Ed
-FNgfabc">> = iolist_to_binary(re:replace("
-abc","^\\s","Ed&FNgf",[global])),
-?line <<"iYCabc">> = iolist_to_binary(re:replace(" abc","^\\s","iYC",[])),
-?line <<"iYCabc">> = iolist_to_binary(re:replace(" abc","^\\s","iYC",[global])),
-?line <<"Y KyKjBtWUscEoeabc">> = iolist_to_binary(re:replace(" abc","^\\s","Y\\1&\\1KyKjBtWUscEoe",[])),
-?line <<"Y KyKjBtWUscEoeabc">> = iolist_to_binary(re:replace(" abc","^\\s","Y\\1&\\1KyKjBtWUscEoe",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\s","fMXHNBeT",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\s","fMXHNBeT",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","^\\s","GF\\1s&cS\\1yGC",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","^\\s","GF\\1s&cS\\1yGC",[global])),
-?line <<"Ur">> = iolist_to_binary(re:replace("abc","^a b
- c","Ur",[extended])),
-?line <<"Ur">> = iolist_to_binary(re:replace("abc","^a b
- c","Ur",[extended,global])),
-?line <<"UQqfOFVevBwaga">> = iolist_to_binary(re:replace("ab","^(a|)\\1*b","UQqfOFVevBwag\\1",[])),
-?line <<"UQqfOFVevBwaga">> = iolist_to_binary(re:replace("ab","^(a|)\\1*b","UQqfOFVevBwag\\1",[global])),
-?line <<"cAc">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1*b","cAc",[])),
-?line <<"cAc">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1*b","cAc",[global])),
-?line <<"QGbTLPFbbYYwpIhdW">> = iolist_to_binary(re:replace("b","^(a|)\\1*b","QG&TLPF&&YYwp\\1Ih\\1dW",[])),
-?line <<"QGbTLPFbbYYwpIhdW">> = iolist_to_binary(re:replace("b","^(a|)\\1*b","QG&TLPF&&YYwp\\1Ih\\1dW",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1*b","wY",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1*b","wY",[global])),
-?line <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1*b","IpD\\1tRUS",[])),
-?line <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1*b","IpD\\1tRUS",[global])),
-?line <<"PMaabaRKsKVgnxCiJtgp">> = iolist_to_binary(re:replace("aab","^(a|)\\1+b","PM&\\1RKsKVgnxCiJtgp",[])),
-?line <<"PMaabaRKsKVgnxCiJtgp">> = iolist_to_binary(re:replace("aab","^(a|)\\1+b","PM&\\1RKsKVgnxCiJtgp",[global])),
-?line <<"quaJPXxLfMHlVxH">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1+b","qu\\1JPXxLfMHlVxH",[])),
-?line <<"quaJPXxLfMHlVxH">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1+b","qu\\1JPXxLfMHlVxH",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","^(a|)\\1+b","&",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","^(a|)\\1+b","&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1+b","ywXwC",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1+b","ywXwC",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1+b","hwwbvhOrVEaVOsD\\1",[])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1+b","hwwbvhOrVEaVOsD\\1",[global])),
-?line <<"tNvaWAg">> = iolist_to_binary(re:replace("ab","^(a|)\\1?b","tNv\\1WAg",[])),
-?line <<"tNvaWAg">> = iolist_to_binary(re:replace("ab","^(a|)\\1?b","tNv\\1WAg",[global])),
-?line <<"K">> = iolist_to_binary(re:replace("aab","^(a|)\\1?b","K",[])),
-?line <<"K">> = iolist_to_binary(re:replace("aab","^(a|)\\1?b","K",[global])),
-?line <<"bRibsTbLcleUeb">> = iolist_to_binary(re:replace("b","^(a|)\\1?b","&Ri\\1&sT&L\\1cl\\1e\\1Ue&",[])),
-?line <<"bRibsTbLcleUeb">> = iolist_to_binary(re:replace("b","^(a|)\\1?b","&Ri\\1&sT&L\\1cl\\1e\\1Ue&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1?b","&CGRslcRfjatPWbOMT",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1?b","&CGRslcRfjatPWbOMT",[global])),
-?line <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1?b","&k\\1aoVMtug&hJsI",[])),
-?line <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1?b","&k\\1aoVMtug&hJsI",[global])),
-?line <<"gaaabFGtJRckPahi">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2}b","g&FGtJRckP\\1hi",[])),
-?line <<"gaaabFGtJRckPahi">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2}b","g&FGtJRckP\\1hi",[global])),
-?line <<"bINnRM">> = iolist_to_binary(re:replace("b","^(a|)\\1{2}b","bINnR\\1M",[])),
-?line <<"bINnRM">> = iolist_to_binary(re:replace("b","^(a|)\\1{2}b","bINnR\\1M",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2}b","cm",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2}b","cm",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2}b","yT\\1\\1NlFQVleuHkXnE\\1",[])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2}b","yT\\1\\1NlFQVleuHkXnE\\1",[global])),
-?line <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2}b","PwBRhyP\\1txXQhbjE\\1a",[])),
-?line <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2}b","PwBRhyP\\1txXQhbjE\\1a",[global])),
-?line <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2}b","cxo",[])),
-?line <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2}b","cxo",[global])),
-?line <<"aaabXaaabMaaabdHhnqsiti">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2,3}b","&X&M&dHhnqsiti",[])),
-?line <<"aaabXaaabMaaabdHhnqsiti">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2,3}b","&X&M&dHhnqsiti",[global])),
-?line <<"QaaaablaaaabNnVdaaaabpaQEaaaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2,3}b","Q&l&NnVd&p\\1QE\\1&",[])),
-?line <<"QaaaablaaaabNnVdaaaabpaQEaaaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2,3}b","Q&l&NnVd&p\\1QE\\1&",[global])),
-?line <<"bCw">> = iolist_to_binary(re:replace("b","^(a|)\\1{2,3}b","&Cw",[])),
-?line <<"bCw">> = iolist_to_binary(re:replace("b","^(a|)\\1{2,3}b","&Cw",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2,3}b","\\1&puY",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2,3}b","\\1&puY",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2,3}b","pbextvQnRWgXs",[])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2,3}b","pbextvQnRWgXs",[global])),
-?line <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2,3}b","fHRaaYYIr\\1l\\1",[])),
-?line <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2,3}b","fHRaaYYIr\\1l\\1",[global])),
-?line <<"aaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a|)\\1{2,3}b","nXt&Aw\\1XCfLg\\1GGPmN",[])),
-?line <<"aaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a|)\\1{2,3}b","nXt&Aw\\1XCfLg\\1GGPmN",[global])),
-?line <<"eRwvgLU">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","eRwvgLU",[])),
-?line <<"eRwvgLU">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","eRwvgLU",[global])),
-?line <<"mDnlkabbbcfTJ">> = iolist_to_binary(re:replace("abbbc","ab{1,3}bc","m\\1Dnl\\1k&fTJ",[])),
-?line <<"mDnlkabbbcfTJ">> = iolist_to_binary(re:replace("abbbc","ab{1,3}bc","m\\1Dnl\\1k&fTJ",[global])),
-?line <<"QabbcqIjjWabbchabbcBrTp">> = iolist_to_binary(re:replace("abbc","ab{1,3}bc","Q&qIjjW&h\\1&BrTp",[])),
-?line <<"QabbcqIjjWabbchabbcBrTp">> = iolist_to_binary(re:replace("abbc","ab{1,3}bc","Q&qIjjW&h\\1&BrTp",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{1,3}bc","\\1Wj&Y&ML\\1RBiGiweww",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{1,3}bc","\\1Wj&Y&ML\\1RBiGiweww",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","ab{1,3}bc","HmlRU&NUwwokL",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","ab{1,3}bc","HmlRU&NUwwokL",[global])),
-?line <<"abbbbbc">> = iolist_to_binary(re:replace("abbbbbc","ab{1,3}bc","FUyCCDShGVXhEHX\\1V\\1bK",[])),
-?line <<"abbbbbc">> = iolist_to_binary(re:replace("abbbbbc","ab{1,3}bc","FUyCCDShGVXhEHX\\1V\\1bK",[global])),
-?line <<"track1astrack1track1tIDhtrack1.title:TBlah blah blahiA">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","\\1as\\1\\1tIDh&iA",[])),
-?line <<"track1astrack1track1tIDhtrack1.title:TBlah blah blahiA">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","\\1as\\1\\1tIDh&iA",[global])),
-?line <<"wUVSR">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","wUVSR",[caseless])),
-?line <<"wUVSR">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","wUVSR",[caseless,
- global])),
-?line <<"htrack1TCNtrack1.title:TBlah blah blahpLtrack1.title:TBlah blah blahtrack1.title:TBlah blah blahFnNtrack1jOBdd">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)","h\\1TCN&pL&&FnN\\1jOBdd",[caseless])),
-?line <<"htrack1TCNtrack1.title:TBlah blah blahpLtrack1.title:TBlah blah blahtrack1.title:TBlah blah blahFnNtrack1jOBdd">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)","h\\1TCN&pL&&FnN\\1jOBdd",[caseless,
- global])),
-?line <<"OKnYPU">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","OKnYPU",[])),
-?line <<"OKnYPU">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","OKnYPU",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-c]+$","\\1GX\\1YVV&\\1WF",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-c]+$","\\1GX\\1YVV&\\1WF",[global])),
-?line <<"wxy">> = iolist_to_binary(re:replace("wxy","^[W-c]+$","Uax\\1F",[])),
-?line <<"wxy">> = iolist_to_binary(re:replace("wxy","^[W-c]+$","Uax\\1F",[global])),
-?line <<"WXY_^abcARKQ">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","&ARK\\1Q",[caseless])),
-?line <<"WXY_^abcARKQ">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","&ARK\\1Q",[caseless,
- global])),
-?line <<"fIwxy_^ABCwxy_^ABCGwxy_^ABCwAHLMA">> = iolist_to_binary(re:replace("wxy_^ABC","^[W-c]+$","fI&&G&w\\1AHL\\1MA",[caseless])),
-?line <<"fIwxy_^ABCwxy_^ABCGwxy_^ABCwAHLMA">> = iolist_to_binary(re:replace("wxy_^ABC","^[W-c]+$","fI&&G&w\\1AHL\\1MA",[caseless,
- global])),
-?line <<"WXY_^abcrgsgXuYrmtfAuS">> = iolist_to_binary(re:replace("WXY_^abc","^[\\x3f-\\x5F]+$","&rgsgXuYrmtfAuS",[caseless])),
-?line <<"WXY_^abcrgsgXuYrmtfAuS">> = iolist_to_binary(re:replace("WXY_^abc","^[\\x3f-\\x5F]+$","&rgsgXuYrmtfAuS",[caseless,
- global])),
-?line <<"FmwJKwxy_^ABCyluQcjQVnwQ">> = iolist_to_binary(re:replace("wxy_^ABC","^[\\x3f-\\x5F]+$","FmwJK&yluQcjQVnwQ",[caseless])),
-?line <<"FmwJKwxy_^ABCyluQcjQVnwQ">> = iolist_to_binary(re:replace("wxy_^ABC","^[\\x3f-\\x5F]+$","FmwJK&yluQcjQVnwQ",[caseless,
- global])),
-?line <<"abcabcMObxlD">> = iolist_to_binary(re:replace("abc","^abc$","&\\1&MObxlD",[multiline])),
-?line <<"abcabcMObxlD">> = iolist_to_binary(re:replace("abc","^abc$","&\\1&MObxlD",[multiline,
- global])),
-?line <<"qqq
-wgabc">> = iolist_to_binary(re:replace("qqq
-abc","^abc$","wg&",[multiline])),
-?line <<"qqq
-wgabc">> = iolist_to_binary(re:replace("qqq
-abc","^abc$","wg&",[multiline,global])),
-?line <<"abcwXeRgabcKmklKpYiE
+)","M",[extended,global])),
+ <<"abcdefpqrxyz0AB">> = iolist_to_binary(re:replace("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB","\\1\\1giII\\1hWW&bdV&",[])),
+ <<"abcdefpqrxyz0AB">> = iolist_to_binary(re:replace("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB","\\1\\1giII\\1hWW&bdV&",[global])),
+ <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(re:replace("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB","cc\\1IiVp",[])),
+ <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(re:replace("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB","cc\\1IiVp",[global])),
+ <<"abc efpqr0xyz00AB">> = iolist_to_binary(re:replace("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","prtuhkbIaj&qwHuPpE",[])),
+ <<"abc efpqr0xyz00AB">> = iolist_to_binary(re:replace("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","prtuhkbIaj&qwHuPpE",[global])),
+ <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(re:replace("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","&yfjpcn",[])),
+ <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(re:replace("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB","&yfjpcn",[global])),
+ <<"A">> = iolist_to_binary(re:replace("A","^[\\000-\\037]","fNpC&qUvThkjHh",[])),
+ <<"A">> = iolist_to_binary(re:replace("A","^[\\000-\\037]","fNpC&qUvThkjHh",[global])),
+ <<"QyKsB">> = iolist_to_binary(re:replace("B","^[\\000-\\037]","QyKs",[])),
+ <<"QyKsB">> = iolist_to_binary(re:replace("B","^[\\000-\\037]","QyKs",[global])),
+ <<"ESQC">> = iolist_to_binary(re:replace("C","^[\\000-\\037]","ESQ",[])),
+ <<"ESQC">> = iolist_to_binary(re:replace("C","^[\\000-\\037]","ESQ",[global])),
+ <<"aTcfAMkUonvqo">> = iolist_to_binary(re:replace("","\\0*","aT&cfAM&\\1kU\\1onvq&o",[])),
+ <<"aTcfAMkUonvqo">> = iolist_to_binary(re:replace("","\\0*","aT&cfAM&\\1kU\\1onvq&o",[global])),
+ <<"The AZ">> = iolist_to_binary(re:replace("The AZ","A\\x0{2,3}Z","vmgVokP\\1Omhk&",[])),
+ <<"The AZ">> = iolist_to_binary(re:replace("The AZ","A\\x0{2,3}Z","vmgVokP\\1Omhk&",[global])),
+ <<"An AZ">> = iolist_to_binary(re:replace("An AZ","A\\x0{2,3}Z","VQmaqWv&eULrw\\1glxho",[])),
+ <<"An AZ">> = iolist_to_binary(re:replace("An AZ","A\\x0{2,3}Z","VQmaqWv&eULrw\\1glxho",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","A\\x0{2,3}Z","UjPLaoqUhTok\\1&kA\\1G",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","A\\x0{2,3}Z","UjPLaoqUhTok\\1&kA\\1G",[global])),
+ <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","\\1&y&cuh&VgTD&wTnGp",[])),
+ <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","\\1&y&cuh&VgTD&wTnGp",[global])),
+ <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","gEElh\\1ECMKe&HElIjJc",[])),
+ <<"AZ">> = iolist_to_binary(re:replace("AZ","A\\x0{2,3}Z","gEElh\\1ECMKe&HElIjJc",[global])),
+ <<"cowcowbellYcowcowbelludyJcowE">> = iolist_to_binary(re:replace("cowcowbell","^(cow|)\\1(bell)","&Y&udyJ\\1E",[])),
+ <<"cowcowbellYcowcowbelludyJcowE">> = iolist_to_binary(re:replace("cowcowbell","^(cow|)\\1(bell)","&Y&udyJ\\1E",[global])),
+ <<"XIIG">> = iolist_to_binary(re:replace("bell","^(cow|)\\1(bell)","XIIG\\1",[])),
+ <<"XIIG">> = iolist_to_binary(re:replace("bell","^(cow|)\\1(bell)","XIIG\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(cow|)\\1(bell)","FV&UIVc&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(cow|)\\1(bell)","FV&UIVc&",[global])),
+ <<"cowbell">> = iolist_to_binary(re:replace("cowbell","^(cow|)\\1(bell)","C&&\\1YwKbOHQIgm&R\\1\\1t",[])),
+ <<"cowbell">> = iolist_to_binary(re:replace("cowbell","^(cow|)\\1(bell)","C&&\\1YwKbOHQIgm&R\\1\\1t",[global])),
+ <<"ywr abc">> = iolist_to_binary(re:replace(" abc","^\\s","ywr&",[])),
+ <<"ywr abc">> = iolist_to_binary(re:replace(" abc","^\\s","ywr&",[global])),
+ <<" fRabc">> = iolist_to_binary(re:replace(" abc","^\\s","&fR",[])),
+ <<" fRabc">> = iolist_to_binary(re:replace(" abc","^\\s","&fR",[global])),
+ <<"CHbSJabc">> = iolist_to_binary(re:replace("
+abc","^\\s","CHbSJ",[])),
+ <<"CHbSJabc">> = iolist_to_binary(re:replace("
+abc","^\\s","CHbSJ",[global])),
+ <<"nivOFemIauK XVEPabc">> = iolist_to_binary(re:replace(" abc","^\\s","n\\1ivOFemIauK&&XVEP",[])),
+ <<"nivOFemIauK XVEPabc">> = iolist_to_binary(re:replace(" abc","^\\s","n\\1ivOFemIauK&&XVEP",[global])),
+ <<"Hs Cwabc">> = iolist_to_binary(re:replace(" abc","^\\s","Hs&Cw",[])),
+ <<"Hs Cwabc">> = iolist_to_binary(re:replace(" abc","^\\s","Hs&Cw",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\s","wydaKxDrmaSC\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\s","wydaKxDrmaSC\\1",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","^\\s","&mmImPqIRmsQLWtEuv\\1",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","^\\s","&mmImPqIRmsQLWtEuv\\1",[global])),
+ ok.
+run4() ->
+ <<"KvcEQcubkfx">> = iolist_to_binary(re:replace("abc","^a b
+ c","KvcEQc\\1\\1ubkfx",[extended])),
+ <<"KvcEQcubkfx">> = iolist_to_binary(re:replace("abc","^a b
+ c","KvcEQc\\1\\1ubkfx",[extended,global])),
+ <<"IEabanuYG">> = iolist_to_binary(re:replace("ab","^(a|)\\1*b","IE&\\1nuYG",[])),
+ <<"IEabanuYG">> = iolist_to_binary(re:replace("ab","^(a|)\\1*b","IE&\\1nuYG",[global])),
+ <<"oaVSaaaabg">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1*b","o\\1VS&g",[])),
+ <<"oaVSaaaabg">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1*b","o\\1VS&g",[global])),
+ <<"midgkQDfLoqgoK">> = iolist_to_binary(re:replace("b","^(a|)\\1*b","midgk\\1\\1Q\\1DfLoqgoK",[])),
+ <<"midgkQDfLoqgoK">> = iolist_to_binary(re:replace("b","^(a|)\\1*b","midgk\\1\\1Q\\1DfLoqgoK",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1*b","iq\\1HM&PoX",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1*b","iq\\1HM&PoX",[global])),
+ <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1*b","pGDNJCvYBCUc&G&\\1\\1nc",[])),
+ <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1*b","pGDNJCvYBCUc&G&\\1\\1nc",[global])),
+ <<"NFaDYqrUAXIDCar">> = iolist_to_binary(re:replace("aab","^(a|)\\1+b","NFaDYqrUAXIDC\\1r",[])),
+ <<"NFaDYqrUAXIDCar">> = iolist_to_binary(re:replace("aab","^(a|)\\1+b","NFaDYqrUAXIDC\\1r",[global])),
+ <<"rVeVeoaaaabXIMIhaaaaboaRr">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1+b","rVeVeo&XIMIh&o\\1Rr",[])),
+ <<"rVeVeoaaaabXIMIhaaaaboaRr">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1+b","rVeVeo&XIMIh&o\\1Rr",[global])),
+ <<"MOSbVKbFIBNV">> = iolist_to_binary(re:replace("b","^(a|)\\1+b","MOS\\1&VKbFIBNV",[])),
+ <<"MOSbVKbFIBNV">> = iolist_to_binary(re:replace("b","^(a|)\\1+b","MOS\\1&VKbFIBNV",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1+b","&X\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1+b","&X\\1",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1+b","HAk\\1RB",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1+b","HAk\\1RB",[global])),
+ <<"T">> = iolist_to_binary(re:replace("ab","^(a|)\\1?b","T",[])),
+ <<"T">> = iolist_to_binary(re:replace("ab","^(a|)\\1?b","T",[global])),
+ <<"NpaabpafbAIXVrowk">> = iolist_to_binary(re:replace("aab","^(a|)\\1?b","Np&p\\1fbAIXVrowk",[])),
+ <<"NpaabpafbAIXVrowk">> = iolist_to_binary(re:replace("aab","^(a|)\\1?b","Np&p\\1fbAIXVrowk",[global])),
+ <<"bTLqWwDhuNEDr">> = iolist_to_binary(re:replace("b","^(a|)\\1?b","&TLqWwDhuNEDr",[])),
+ <<"bTLqWwDhuNEDr">> = iolist_to_binary(re:replace("b","^(a|)\\1?b","&TLqWwDhuNEDr",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1?b","k&M&WqVpmLKP",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1?b","k&M&WqVpmLKP",[global])),
+ <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1?b","sukwIjuiB",[])),
+ <<"acb">> = iolist_to_binary(re:replace("acb","^(a|)\\1?b","sukwIjuiB",[global])),
+ <<"rHnDYYvSYMasyvaMyaaabqJ">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2}b","rHnDYYvSYM\\1syv\\1My&qJ",[])),
+ <<"rHnDYYvSYMasyvaMyaaabqJ">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2}b","rHnDYYvSYM\\1syv\\1My&qJ",[global])),
+ <<"gdeUBJebtvLObDlYQ">> = iolist_to_binary(re:replace("b","^(a|)\\1{2}b","gdeU\\1BJe&tvL\\1ObDlYQ",[])),
+ <<"gdeUBJebtvLObDlYQ">> = iolist_to_binary(re:replace("b","^(a|)\\1{2}b","gdeU\\1BJe&tvL\\1ObDlYQ",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2}b","AVUEjXCeg&i\\1T\\1ejtKi",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2}b","AVUEjXCeg&i\\1T\\1ejtKi",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2}b","E\\1YBlG",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2}b","E\\1YBlG",[global])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2}b","&Oq&\\1IcB&LT",[])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2}b","&Oq&\\1IcB&LT",[global])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2}b","Xh",[])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2}b","Xh",[global])),
+ <<"gPaMHaaabaaabnaaOMIaVa">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2,3}b","gP\\1MH&&n\\1aOMI\\1Va",[])),
+ <<"gPaMHaaabaaabnaaOMIaVa">> = iolist_to_binary(re:replace("aaab","^(a|)\\1{2,3}b","gP\\1MH&&n\\1aOMI\\1Va",[global])),
+ <<"aaaabWf">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2,3}b","&Wf",[])),
+ <<"aaaabWf">> = iolist_to_binary(re:replace("aaaab","^(a|)\\1{2,3}b","&Wf",[global])),
+ <<"KKYfigIbbfyLvtL">> = iolist_to_binary(re:replace("b","^(a|)\\1{2,3}b","KKYfigI&&fyL\\1v\\1tL",[])),
+ <<"KKYfigIbbfyLvtL">> = iolist_to_binary(re:replace("b","^(a|)\\1{2,3}b","KKYfigI&&fyL\\1v\\1tL",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2,3}b","NFHl",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a|)\\1{2,3}b","NFHl",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2,3}b","ob\\1\\1J&ES\\1av\\1AM",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a|)\\1{2,3}b","ob\\1\\1J&ES\\1av\\1AM",[global])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2,3}b","\\1viNfcaQTcNH&ggGt",[])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^(a|)\\1{2,3}b","\\1viNfcaQTcNH&ggGt",[global])),
+ <<"aaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a|)\\1{2,3}b","vu",[])),
+ <<"aaaaab">> = iolist_to_binary(re:replace("aaaaab","^(a|)\\1{2,3}b","vu",[global])),
+ <<"aHJVskcmUR">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","\\1aHJVskcmUR",[])),
+ <<"aHJVskcmUR">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","\\1aHJVskcmUR",[global])),
+ <<"Rmabbbccackw">> = iolist_to_binary(re:replace("abbbc","ab{1,3}bc","Rm&cackw",[])),
+ <<"Rmabbbccackw">> = iolist_to_binary(re:replace("abbbc","ab{1,3}bc","Rm&cackw",[global])),
+ <<"VHGaMs">> = iolist_to_binary(re:replace("abbc","ab{1,3}bc","VHGaMs",[])),
+ <<"VHGaMs">> = iolist_to_binary(re:replace("abbc","ab{1,3}bc","VHGaMs",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{1,3}bc","UM&MN\\1&vHpV\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{1,3}bc","UM&MN\\1&vHpV\\1",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","ab{1,3}bc","os&Rm\\1akB\\1pkOAH",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","ab{1,3}bc","os&Rm\\1akB\\1pkOAH",[global])),
+ <<"abbbbbc">> = iolist_to_binary(re:replace("abbbbbc","ab{1,3}bc","oujXAne\\1\\1JsV&Y&I&",[])),
+ <<"abbbbbc">> = iolist_to_binary(re:replace("abbbbbc","ab{1,3}bc","oujXAne\\1\\1JsV&Y&I&",[global])),
+ <<"NCkLQtrack1">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","NCkLQ\\1",[])),
+ <<"NCkLQtrack1">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","NCkLQ\\1",[global])),
+ <<"track1.title:TBlah blah blahOtrack1.title:TBlah blah blahwtrack1fuQWtrack1.title:TBlah blah blahStrack1.title:TBlah blah blahkEFVKOH">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","&O&w\\1fuQW&S&kEFVKOH",[caseless])),
+ <<"track1.title:TBlah blah blahOtrack1.title:TBlah blah blahwtrack1fuQWtrack1.title:TBlah blah blahStrack1.title:TBlah blah blahkEFVKOH">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)","&O&w\\1fuQW&S&kEFVKOH",[caseless,
+ global])),
+ <<"VWgicEGtrack1">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)","VWgicEG\\1",[caseless])),
+ <<"VWgicEGtrack1">> = iolist_to_binary(re:replace("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)","VWgicEG\\1",[caseless,
+ global])),
+ <<"UKrqsWXY_^abcTa">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","UKr\\1\\1qs&Ta",[])),
+ <<"UKrqsWXY_^abcTa">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","UKr\\1\\1qs&Ta",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-c]+$","LV\\1&\\1&\\1Je&M\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-c]+$","LV\\1&\\1&\\1Je&M\\1",[global])),
+ <<"wxy">> = iolist_to_binary(re:replace("wxy","^[W-c]+$","yqUKKN",[])),
+ <<"wxy">> = iolist_to_binary(re:replace("wxy","^[W-c]+$","yqUKKN",[global])),
+ <<"MxOWXY_^abcqjWXY_^abcWXY_^abcocGDNJgwU">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","MxO&qj&&ocGDNJgwU",[caseless])),
+ <<"MxOWXY_^abcqjWXY_^abcWXY_^abcocGDNJgwU">> = iolist_to_binary(re:replace("WXY_^abc","^[W-c]+$","MxO&qj&&ocGDNJgwU",[caseless,
+ global])),
+ <<"lgkBEwxy_^ABCC">> = iolist_to_binary(re:replace("wxy_^ABC","^[W-c]+$","\\1lgkBE&C\\1",[caseless])),
+ <<"lgkBEwxy_^ABCC">> = iolist_to_binary(re:replace("wxy_^ABC","^[W-c]+$","\\1lgkBE&C\\1",[caseless,
+ global])),
+ <<"QSQrWXY_^abcvBpJUdCPFVxS">> = iolist_to_binary(re:replace("WXY_^abc","^[\\x3f-\\x5F]+$","QSQr&vBpJUdCP\\1F\\1VxS",[caseless])),
+ <<"QSQrWXY_^abcvBpJUdCPFVxS">> = iolist_to_binary(re:replace("WXY_^abc","^[\\x3f-\\x5F]+$","QSQr&vBpJUdCP\\1F\\1VxS",[caseless,
+ global])),
+ <<"tgwxy_^ABChAjHBwxy_^ABC">> = iolist_to_binary(re:replace("wxy_^ABC","^[\\x3f-\\x5F]+$","tg&hAjHB&",[caseless])),
+ <<"tgwxy_^ABChAjHBwxy_^ABC">> = iolist_to_binary(re:replace("wxy_^ABC","^[\\x3f-\\x5F]+$","tg&hAjHB&",[caseless,
+ global])),
+ <<"uyphoJSabcD">> = iolist_to_binary(re:replace("abc","^abc$","uyphoJS&D",[multiline])),
+ <<"uyphoJSabcD">> = iolist_to_binary(re:replace("abc","^abc$","uyphoJS&D",[multiline,
+ global])),
+ <<"qqq
+wupoAabcauHHyGGVeUwVabc">> = iolist_to_binary(re:replace("qqq
+abc","^abc$","wupoA&au\\1HHyGGVeUwV&",[multiline])),
+ <<"qqq
+wupoAabcauHHyGGVeUwVabc">> = iolist_to_binary(re:replace("qqq
+abc","^abc$","wupoA&au\\1HHyGGVeUwV&",[multiline,global])),
+ <<"gfEviFcl
zzz">> = iolist_to_binary(re:replace("abc
-zzz","^abc$","&wXe\\1Rg&K\\1mklKpYiE",[multiline])),
-?line <<"abcwXeRgabcKmklKpYiE
+zzz","^abc$","gf\\1EviFcl",[multiline])),
+ <<"gfEviFcl
zzz">> = iolist_to_binary(re:replace("abc
-zzz","^abc$","&wXe\\1Rg&K\\1mklKpYiE",[multiline,global])),
-?line <<"qqq
-CabcCKxlJamS
+zzz","^abc$","gf\\1EviFcl",[multiline,global])),
+ <<"qqq
+jwoabcabcBysLOHCR
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","^abc$","C&CKxlJam\\1S",[multiline])),
-?line <<"qqq
-CabcCKxlJamS
+zzz","^abc$","jwo&&BysLOHC\\1R",[multiline])),
+ <<"qqq
+jwoabcabcBysLOHCR
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","^abc$","C&CKxlJam\\1S",[multiline,global])),
-?line <<"MLKPlabcY">> = iolist_to_binary(re:replace("abc","^abc$","MLKPl&\\1Y",[])),
-?line <<"MLKPlabcY">> = iolist_to_binary(re:replace("abc","^abc$","MLKPl&\\1Y",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","\\1uRnMNc&\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","\\1uRnMNc&\\1",[global])),
-?line <<"qqq
+zzz","^abc$","jwo&&BysLOHC\\1R",[multiline,global])),
+ <<"fPMabcFHNJXabcJChQyabcU">> = iolist_to_binary(re:replace("abc","^abc$","fPM&FHNJX&JCh\\1Qy&U",[])),
+ <<"fPMabcFHNJXabcJChQyabcU">> = iolist_to_binary(re:replace("abc","^abc$","fPM&FHNJX&JCh\\1Qy&U",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","&\\1&R\\1oixQQMrImGsd&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","&\\1&R\\1oixQQMrImGsd&",[global])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","^abc$","b\\1",[])),
-?line <<"qqq
+abc","^abc$","rAUAF&gmNHyoIX\\1ymqk",[])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","^abc$","b\\1",[global])),
-?line <<"abc
+abc","^abc$","rAUAF&gmNHyoIX\\1ymqk",[global])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","^abc$","RAJ\\1a&Mvoue\\1d",[])),
-?line <<"abc
+zzz","^abc$","&&qL\\1YUdNN\\1\\1\\1O\\1",[])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","^abc$","RAJ\\1a&Mvoue\\1d",[global])),
-?line <<"qqq
+zzz","^abc$","&&qL\\1YUdNN\\1\\1\\1O\\1",[global])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","^abc$","\\1NghvSn\\1GSQvu&&grYN",[])),
-?line <<"qqq
+zzz","^abc$","u",[])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","^abc$","\\1NghvSn\\1GSQvu&&grYN",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&",[multiline])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&",[multiline,
- global])),
-?line <<"XQevmabcHXD">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","XQevm&HXD",[multiline])),
-?line <<"XQevmabcHXD">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","XQevm&HXD",[multiline,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\Z","plNA&&\\1Myw&e",[multiline])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\Z","plNA&&\\1Myw&e",[multiline,
- global])),
-?line <<"qqq
+zzz","^abc$","u",[global])),
+ <<"abcRqIabcuWabcabcFN">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&\\1RqI&uW&&F\\1N",[multiline])),
+ <<"abcRqIabcuWabcabcFN">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&\\1RqI&uW&&F\\1N",[multiline,
+ global])),
+ <<"abciwrfICONabcYabc">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&iwrf\\1ICON&\\1Y&\\1\\1",[multiline])),
+ <<"abciwrfICONabcYabc">> = iolist_to_binary(re:replace("abc","\\Aabc\\Z","&iwrf\\1ICON&\\1Y&\\1\\1",[multiline,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\Z","RsIorq&kLBrJVt&Dq",[multiline])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\Z","RsIorq&kLBrJVt&Dq",[multiline,
+ global])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","\\Aabc\\Z","tActj",[multiline])),
-?line <<"qqq
+abc","\\Aabc\\Z","bByD\\1yC\\1hlr",[multiline])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","\\Aabc\\Z","tActj",[multiline,global])),
-?line <<"abc
+abc","\\Aabc\\Z","bByD\\1yC\\1hlr",[multiline,global])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","\\Aabc\\Z","&PAnUmSADdk",[multiline])),
-?line <<"abc
+zzz","\\Aabc\\Z","AuwHER\\1cj\\1XMx\\1jBcr&u",[multiline])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","\\Aabc\\Z","&PAnUmSADdk",[multiline,global])),
-?line <<"qqq
+zzz","\\Aabc\\Z","AuwHER\\1cj\\1XMx\\1jBcr&u",[multiline,
+ global])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","\\Aabc\\Z","O&&GYJA",[multiline])),
-?line <<"qqq
+zzz","\\Aabc\\Z","kiYxAVR&jFLIO&t\\1to&",[multiline])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","\\Aabc\\Z","O&&GYJA",[multiline,global])),
-?line <<"ejfGpamjOGidXfWabc
-defiXJg">> = iolist_to_binary(re:replace("abc
-def","\\A(.)*\\Z","ej\\1GpamjOGidX\\1W&iXJg",[dotall])),
-?line <<"ejfGpamjOGidXfWabc
-defiXJg">> = iolist_to_binary(re:replace("abc
-def","\\A(.)*\\Z","ej\\1GpamjOGidX\\1W&iXJg",[dotall,global])),
-?line <<"UTI*** FailersagVgtIFYe*** Failerss*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(.)*\\Z","UTI&agVgtIFYe&\\1&",[multiline])),
-?line <<"UTI*** FailersagVgtIFYe*** Failerss*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\A(.)*\\Z","UTI&agVgtIFYe&\\1&",[multiline,
- global])),
-?line <<"abc
+zzz","\\Aabc\\Z","kiYxAVR&jFLIO&t\\1to&",[multiline,global])),
+ <<"DGWRrfDctbIpuofabc
+defabc
+defHPf">> = iolist_to_binary(re:replace("abc
+def","\\A(.)*\\Z","DGWRr\\1DctbIpuo\\1&&HPf",[dotall])),
+ <<"DGWRrfDctbIpuofabc
+defabc
+defHPf">> = iolist_to_binary(re:replace("abc
+def","\\A(.)*\\Z","DGWRr\\1DctbIpuo\\1&&HPf",[dotall,global])),
+ <<"XsHV*** FailerstLRmsk*** FailersMPy">> = iolist_to_binary(re:replace("*** Failers","\\A(.)*\\Z","XsHV&tLRm\\1k&MPy",[multiline])),
+ <<"XsHV*** FailerstLRmsk*** FailersMPy">> = iolist_to_binary(re:replace("*** Failers","\\A(.)*\\Z","XsHV&tLRm\\1k&MPy",[multiline,
+ global])),
+ <<"abc
def">> = iolist_to_binary(re:replace("abc
-def","\\A(.)*\\Z","&PHW&rh&xcxs\\1Cy&Chhd",[multiline])),
-?line <<"abc
+def","\\A(.)*\\Z","v",[multiline])),
+ <<"abc
def">> = iolist_to_binary(re:replace("abc
-def","\\A(.)*\\Z","&PHW&rh&xcxs\\1Cy&Chhd",[multiline,global])),
-?line <<"cjOwaTTW::c">> = iolist_to_binary(re:replace("b::c","(?:b)|(?::+)","cjOwaTTW",[])),
-?line <<"cjOwaTTWcjOwaTTWc">> = iolist_to_binary(re:replace("b::c","(?:b)|(?::+)","cjOwaTTW",[global])),
-?line <<"c::ReJbWufqTUdDqlXQb">> = iolist_to_binary(re:replace("c::b","(?:b)|(?::+)","\\1&ReJbWufqTUdDqlXQ",[])),
-?line <<"c::ReJbWufqTUdDqlXQbReJbWufqTUdDqlXQ">> = iolist_to_binary(re:replace("c::b","(?:b)|(?::+)","\\1&ReJbWufqTUdDqlXQ",[global])),
-?line <<"az-uaz-obYOlaz-DVbrqaz-y">> = iolist_to_binary(re:replace("az-","[-az]+","&u&obYOl&DVbrq&y",[])),
-?line <<"az-uaz-obYOlaz-DVbrqaz-y">> = iolist_to_binary(re:replace("az-","[-az]+","&u&obYOl&DVbrq&y",[global])),
-?line <<"*** FAlNlPvDnUXilers">> = iolist_to_binary(re:replace("*** Failers","[-az]+","AlNlPvDn\\1UX",[])),
-?line <<"*** FAlNlPvDnUXilers">> = iolist_to_binary(re:replace("*** Failers","[-az]+","AlNlPvDn\\1UX",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[-az]+","&xa\\1Q\\1BSaQG",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[-az]+","&xa\\1Q\\1BSaQG",[global])),
-?line <<"rJXv">> = iolist_to_binary(re:replace("za-","[az-]+","\\1rJXv",[])),
-?line <<"rJXv">> = iolist_to_binary(re:replace("za-","[az-]+","\\1rJXv",[global])),
-?line <<"*** FIQWDsCilers">> = iolist_to_binary(re:replace("*** Failers","[az-]+","IQWD\\1\\1sC",[])),
-?line <<"*** FIQWDsCilers">> = iolist_to_binary(re:replace("*** Failers","[az-]+","IQWD\\1\\1sC",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[az-]+","G\\1TcEO\\1EAeKKLc&eOBg",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[az-]+","G\\1TcEO\\1EAeKKLc&eOBg",[global])),
-?line <<"DsdWoREvsWCDpa-z">> = iolist_to_binary(re:replace("a-z","[a\\-z]+","Dsd\\1WoREvsWCD\\1p&",[])),
-?line <<"DsdWoREvsWCDpa-z">> = iolist_to_binary(re:replace("a-z","[a\\-z]+","Dsd\\1WoREvsWCD\\1p&",[global])),
-?line <<"*** FaUqEUvbeKTpilers">> = iolist_to_binary(re:replace("*** Failers","[a\\-z]+","&U\\1qEUvbeKTp",[])),
-?line <<"*** FaUqEUvbeKTpilers">> = iolist_to_binary(re:replace("*** Failers","[a\\-z]+","&U\\1qEUvbeKTp",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[a\\-z]+","IdIH&",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[a\\-z]+","IdIH&",[global])),
-?line <<"CHIiEabcdxyzAXhIPVabcdxyz">> = iolist_to_binary(re:replace("abcdxyz","[a-z]+","CHIiE&AXhIPV&",[])),
-?line <<"CHIiEabcdxyzAXhIPVabcdxyz">> = iolist_to_binary(re:replace("abcdxyz","[a-z]+","CHIiE&AXhIPV&",[global])),
-?line <<"Tk12-34ptREc12-34dF">> = iolist_to_binary(re:replace("12-34","[\\d-]+","Tk&ptREc&dF\\1",[])),
-?line <<"Tk12-34ptREc12-34dF">> = iolist_to_binary(re:replace("12-34","[\\d-]+","Tk&ptREc&dF\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-]+","PO\\1\\1HuRnqA\\1miVVsKv",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-]+","PO\\1\\1HuRnqA\\1miVVsKv",[global])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-]+","QMUbdeC\\1fKgUg",[])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-]+","QMUbdeC\\1fKgUg",[global])),
-?line <<"YypJ">> = iolist_to_binary(re:replace("12-34z","[\\d-z]+","YypJ",[])),
-?line <<"YypJ">> = iolist_to_binary(re:replace("12-34z","[\\d-z]+","YypJ",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-z]+","d&ErDHl\\1&GDjyQy",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-z]+","d&ErDHl\\1&GDjyQy",[global])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-z]+","EVkS",[])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-z]+","EVkS",[global])),
-?line <<"cHd\\ltkGr\\BqrhP ">> = iolist_to_binary(re:replace("\\ ","\\x5c","cHd&ltkGr&Bqr\\1hP",[])),
-?line <<"cHd\\ltkGr\\BqrhP ">> = iolist_to_binary(re:replace("\\ ","\\x5c","cHd&ltkGr&Bqr\\1hP",[global])),
-?line <<"the Z Z ZciyfJLvoo">> = iolist_to_binary(re:replace("the Zoo","\\x20Z","&&&ciyf\\1JLv",[])),
-?line <<"the Z Z ZciyfJLvoo">> = iolist_to_binary(re:replace("the Zoo","\\x20Z","&&&ciyf\\1JLv",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\x20Z","ry\\1S\\1&\\1\\1MkYc",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\x20Z","ry\\1S\\1&\\1\\1MkYc",[global])),
-?line <<"Zulu">> = iolist_to_binary(re:replace("Zulu","\\x20Z","b\\1Wc&RB\\1&&pO&Dd\\1&A",[])),
-?line <<"Zulu">> = iolist_to_binary(re:replace("Zulu","\\x20Z","b\\1Wc&RB\\1&&pO&Dd\\1&A",[global])),
-?line <<"aabcabcUxryabcAPabcabcDGgL">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","a&Uxry\\1AP&DGgL",[caseless])),
-?line <<"aabcabcUxryabcAPabcabcDGgL">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","a&Uxry\\1AP&DGgL",[caseless,
- global])),
-?line <<"oStOWABCvVHVfFqojojfABC">> = iolist_to_binary(re:replace("ABCabc","(abc)\\1","oStOW\\1vVHVfFqojojf\\1",[caseless])),
-?line <<"oStOWABCvVHVfFqojojfABC">> = iolist_to_binary(re:replace("ABCabc","(abc)\\1","oStOW\\1vVHVfFqojojf\\1",[caseless,
- global])),
-?line <<"GabcABCrGLdSabcABCWnHabcabcABCP">> = iolist_to_binary(re:replace("abcABC","(abc)\\1","G&rGLdS&WnH\\1&P",[caseless])),
-?line <<"GabcABCrGLdSabcABCWnHabcabcABCP">> = iolist_to_binary(re:replace("abcABC","(abc)\\1","G&rGLdS&WnH\\1&P",[caseless,
- global])),
-?line <<"KVwWyab{3cdEWMab{3cdPr">> = iolist_to_binary(re:replace("ab{3cd","ab{3cd","KVwWy&\\1EWM&Pr",[])),
-?line <<"KVwWyab{3cdEWMab{3cdPr">> = iolist_to_binary(re:replace("ab{3cd","ab{3cd","KVwWy&\\1EWM&Pr",[global])),
-?line <<"KuJab{3,cd">> = iolist_to_binary(re:replace("ab{3,cd","ab{3,cd","KuJ&",[])),
-?line <<"KuJab{3,cd">> = iolist_to_binary(re:replace("ab{3,cd","ab{3,cd","KuJ&",[global])),
-?line <<"squJfab{3,4a}cd">> = iolist_to_binary(re:replace("ab{3,4a}cd","ab{3,4a}cd","squ\\1Jf&",[])),
-?line <<"squJfab{3,4a}cd">> = iolist_to_binary(re:replace("ab{3,4a}cd","ab{3,4a}cd","squ\\1Jf&",[global])),
-?line <<"{4,5a}bc{4,5a}bcH">> = iolist_to_binary(re:replace("{4,5a}bc","{4,5a}bc","&&H",[])),
-?line <<"{4,5a}bc{4,5a}bcH">> = iolist_to_binary(re:replace("{4,5a}bc","{4,5a}bc","&&H",[global])),
-?line <<"nb">> = iolist_to_binary(re:replace("abc","abc$","nb",[])),
-?line <<"nb">> = iolist_to_binary(re:replace("abc","abc$","nb",[global])),
-?line <<"aabcTslrEK">> = iolist_to_binary(re:replace("abc","abc$","a&TslrEK",[])),
-?line <<"aabcTslrEK">> = iolist_to_binary(re:replace("abc","abc$","a&TslrEK",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","rVkXRL&nq&w\\1NDuHM\\1dj",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","rVkXRL&nq&w\\1NDuHM\\1dj",[global])),
-?line <<"abc
+def","\\A(.)*\\Z","v",[multiline,global])),
+ <<"RmbbMhEEp::c">> = iolist_to_binary(re:replace("b::c","(?:b)|(?::+)","Rmb&MhEEp",[])),
+ <<"RmbbMhEEpRmb::MhEEpc">> = iolist_to_binary(re:replace("b::c","(?:b)|(?::+)","Rmb&MhEEp",[global])),
+ <<"cYDT::rLb">> = iolist_to_binary(re:replace("c::b","(?:b)|(?::+)","YDT\\1&rL",[])),
+ <<"cYDT::rLYDTbrL">> = iolist_to_binary(re:replace("c::b","(?:b)|(?::+)","YDT\\1&rL",[global])),
+ <<"ehR">> = iolist_to_binary(re:replace("az-","[-az]+","ehR",[])),
+ <<"ehR">> = iolist_to_binary(re:replace("az-","[-az]+","ehR",[global])),
+ <<"*** FsaiTaeaWvwilers">> = iolist_to_binary(re:replace("*** Failers","[-az]+","s&\\1iT\\1&eaWvw",[])),
+ <<"*** FsaiTaeaWvwilers">> = iolist_to_binary(re:replace("*** Failers","[-az]+","s&\\1iT\\1&eaWvw",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","[-az]+","mdHw",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","[-az]+","mdHw",[global])),
+ ok.
+run5() ->
+ <<"EDUoLiFaCJDko">> = iolist_to_binary(re:replace("za-","[az-]+","EDUoL\\1i\\1FaCJ\\1Dko",[])),
+ <<"EDUoLiFaCJDko">> = iolist_to_binary(re:replace("za-","[az-]+","EDUoL\\1i\\1FaCJ\\1Dko",[global])),
+ <<"*** FapAfSayQoaaFksilers">> = iolist_to_binary(re:replace("*** Failers","[az-]+","&\\1pAfS&yQo&&Fks\\1",[])),
+ <<"*** FapAfSayQoaaFksilers">> = iolist_to_binary(re:replace("*** Failers","[az-]+","&\\1pAfS&yQo&&Fks\\1",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","[az-]+","\\1LDAG\\1JLRNo",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","[az-]+","\\1LDAG\\1JLRNo",[global])),
+ <<"">> = iolist_to_binary(re:replace("a-z","[a\\-z]+","\\1",[])),
+ <<"">> = iolist_to_binary(re:replace("a-z","[a\\-z]+","\\1",[global])),
+ <<"*** FvVgilers">> = iolist_to_binary(re:replace("*** Failers","[a\\-z]+","vVg",[])),
+ <<"*** FvVgilers">> = iolist_to_binary(re:replace("*** Failers","[a\\-z]+","vVg",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","[a\\-z]+","bfgfonbXIj",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","[a\\-z]+","bfgfonbXIj",[global])),
+ <<"QYKd">> = iolist_to_binary(re:replace("abcdxyz","[a-z]+","Q\\1\\1Y\\1Kd\\1",[])),
+ <<"QYKd">> = iolist_to_binary(re:replace("abcdxyz","[a-z]+","Q\\1\\1Y\\1Kd\\1",[global])),
+ <<"UYmP12-3412-34">> = iolist_to_binary(re:replace("12-34","[\\d-]+","U\\1\\1YmP&&",[])),
+ <<"UYmP12-3412-34">> = iolist_to_binary(re:replace("12-34","[\\d-]+","U\\1\\1YmP&&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-]+","JWPgf\\1Eng\\1E\\1n",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-]+","JWPgf\\1Eng\\1E\\1n",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-]+","sRhgqdg&E",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-]+","sRhgqdg&E",[global])),
+ <<"efmQUhkdSK12-34zR12-34z12-34zTb">> = iolist_to_binary(re:replace("12-34z","[\\d-z]+","ef\\1mQUh\\1kdSK&R&&Tb",[])),
+ <<"efmQUhkdSK12-34zR12-34z12-34zTb">> = iolist_to_binary(re:replace("12-34z","[\\d-z]+","ef\\1mQUh\\1kdSK&R&&Tb",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-z]+","PJaMxeM",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\d-z]+","PJaMxeM",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-z]+","My\\1Kbyr&\\1",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","[\\d-z]+","My\\1Kbyr&\\1",[global])),
+ <<"QpJFT\\cphXBPQ ">> = iolist_to_binary(re:replace("\\ ","\\x5c","QpJF\\1T&cphXBPQ\\1",[])),
+ <<"QpJFT\\cphXBPQ ">> = iolist_to_binary(re:replace("\\ ","\\x5c","QpJF\\1T&cphXBPQ\\1",[global])),
+ <<"theHwjgWjRYr ZofH ZkBtIoo">> = iolist_to_binary(re:replace("the Zoo","\\x20Z","HwjgWjRYr&\\1ofH&kBtI",[])),
+ <<"theHwjgWjRYr ZofH ZkBtIoo">> = iolist_to_binary(re:replace("the Zoo","\\x20Z","HwjgWjRYr&\\1ofH&kBtI",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\x20Z","&STbBPwwLA",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\x20Z","&STbBPwwLA",[global])),
+ <<"Zulu">> = iolist_to_binary(re:replace("Zulu","\\x20Z","buG&ki&QEXQhj\\1\\1W",[])),
+ <<"Zulu">> = iolist_to_binary(re:replace("Zulu","\\x20Z","buG&ki&QEXQhj\\1\\1W",[global])),
+ <<"bhNKmH">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","bhNKmH",[caseless])),
+ <<"bhNKmH">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","bhNKmH",[caseless,
+ global])),
+ <<"jdFUGABCabcjABCabc">> = iolist_to_binary(re:replace("ABCabc","(abc)\\1","jdFUG&j&",[caseless])),
+ <<"jdFUGABCabcjABCabc">> = iolist_to_binary(re:replace("ABCabc","(abc)\\1","jdFUG&j&",[caseless,
+ global])),
+ <<"YSEabcsfRWrD">> = iolist_to_binary(re:replace("abcABC","(abc)\\1","YSE\\1sfRWrD",[caseless])),
+ <<"YSEabcsfRWrD">> = iolist_to_binary(re:replace("abcABC","(abc)\\1","YSE\\1sfRWrD",[caseless,
+ global])),
+ <<"CbQoKIFQqeNT">> = iolist_to_binary(re:replace("ab{3cd","ab{3cd","CbQoKIFQqeNT\\1",[])),
+ <<"CbQoKIFQqeNT">> = iolist_to_binary(re:replace("ab{3cd","ab{3cd","CbQoKIFQqeNT\\1",[global])),
+ <<"rhgUEyXbklwXmp">> = iolist_to_binary(re:replace("ab{3,cd","ab{3,cd","rhgUEyXbk\\1lwXmp",[])),
+ <<"rhgUEyXbklwXmp">> = iolist_to_binary(re:replace("ab{3,cd","ab{3,cd","rhgUEyXbk\\1lwXmp",[global])),
+ <<"Xlab{3,4a}cdcbaPbaKyKQGBb">> = iolist_to_binary(re:replace("ab{3,4a}cd","ab{3,4a}cd","Xl&cbaPbaKyKQG\\1Bb",[])),
+ <<"Xlab{3,4a}cdcbaPbaKyKQGBb">> = iolist_to_binary(re:replace("ab{3,4a}cd","ab{3,4a}cd","Xl&cbaPbaKyKQG\\1Bb",[global])),
+ <<"bSQWjrSvge">> = iolist_to_binary(re:replace("{4,5a}bc","{4,5a}bc","b\\1SQWjr\\1\\1Svge",[])),
+ <<"bSQWjrSvge">> = iolist_to_binary(re:replace("{4,5a}bc","{4,5a}bc","b\\1SQWjr\\1\\1Svge",[global])),
+ <<"SLxoL">> = iolist_to_binary(re:replace("abc","abc$","SLxoL",[])),
+ <<"SLxoL">> = iolist_to_binary(re:replace("abc","abc$","SLxoL",[global])),
+ <<"RJabcnabcqnisabctgJA">> = iolist_to_binary(re:replace("abc","abc$","RJ&n&qnis&tgJA",[])),
+ <<"RJabcnabcqnisabctgJA">> = iolist_to_binary(re:replace("abc","abc$","RJ&n&qnis&tgJA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","cEO&P&qRklP&Nlb\\1H\\1K",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","cEO&P&qRklP&Nlb\\1H\\1K",[global])),
+ <<"abc
def">> = iolist_to_binary(re:replace("abc
-def","abc$","M",[])),
-?line <<"abc
+def","abc$","h&&nb\\1&NBSkhYb",[])),
+ <<"abc
def">> = iolist_to_binary(re:replace("abc
-def","abc$","M",[global])),
-?line <<"abcWCabcSYXGPjRugTabcVGabcSX">> = iolist_to_binary(re:replace("abcS","(abc)\\123","\\1WC&YXGPjRugT\\1VG&X",[])),
-?line <<"abcWCabcSYXGPjRugTabcVGabcSX">> = iolist_to_binary(re:replace("abcS","(abc)\\123","\\1WC&YXGPjRugT\\1VG&X",[global])),
-?line <<"fabc“Uabc“UmiqabceCsabcabc“">> = iolist_to_binary(re:replace("abc“","(abc)\\223","f&U&Umiq\\1eCs\\1&",[])),
-?line <<"fabc“Uabc“UmiqabceCsabcabc“">> = iolist_to_binary(re:replace("abc“","(abc)\\223","f&U&Umiq\\1eCs\\1&",[global])),
-?line <<"JRFabcxnbabcÓVkabcÓfWigQMuaY">> = iolist_to_binary(re:replace("abcÓ","(abc)\\323","JRF\\1xnb&Vk&fWigQMuaY",[])),
-?line <<"JRFabcxnbabcÓVkabcÓfWigQMuaY">> = iolist_to_binary(re:replace("abcÓ","(abc)\\323","JRF\\1xnb&Vk&fWigQMuaY",[global])),
-?line <<"vgabc@QQ">> = iolist_to_binary(re:replace("abc@","(abc)\\100","vg&QQ",[])),
-?line <<"vgabc@QQ">> = iolist_to_binary(re:replace("abc@","(abc)\\100","vg&QQ",[global])),
-?line <<"abc@OkvNytabc@abcabc@a">> = iolist_to_binary(re:replace("abc@","(abc)\\100","&OkvNyt&\\1&a",[])),
-?line <<"abc@OkvNytabc@abcabc@a">> = iolist_to_binary(re:replace("abc@","(abc)\\100","&OkvNyt&\\1&a",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","P&kRot\\1ILA",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","P&kRot\\1ILA",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","iULjBTiVDW&K\\1p&bj",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","iULjBTiVDW&K\\1p&bj",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","cplYw\\1iuv\\1Okstb\\1p",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","cplYw\\1iuv\\1Okstb\\1p",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","LDaRV&lAu\\1i",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","LDaRV&lAu\\1i",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","K\\1",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","K\\1",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","cXHTTaJLMXvR&\\1",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","cXHTTaJLMXvR&\\1",[global])),
-?line <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","\\1kB&oGS\\1\\1lPn",[])),
-?line <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","\\1kB&oGS\\1\\1lPn",[global])),
-?line <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","\\1",[])),
-?line <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","\\1",[global])),
-?line <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","\\1GKLIQYEGVpGIxagx&&",[])),
-?line <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","\\1GKLIQYEGVpGIxagx&&",[global])),
-?line <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","og&&Tlj&jCLkmrllagN",[])),
-?line <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","og&&Tlj&jCLkmrllagN",[global])),
-?line <<"xMFEgabcdefghijkllSDGabcdefghijkllSN">> = iolist_to_binary(re:replace("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123","xMFEg&DG&N",[])),
-?line <<"xMFEgabcdefghijkllSDGabcdefghijkllSN">> = iolist_to_binary(re:replace("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123","xMFEg&DG&N",[global])),
-?line <<"WyroFQabcdefghijk
-SNfabcdefghijk
-SahyoPabcdefghijk
-Sqfbs">> = iolist_to_binary(re:replace("abcdefghijk
-S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123","WyroFQ&Nf&ahyoP&qfbs",[])),
-?line <<"WyroFQabcdefghijk
-SNfabcdefghijk
-SahyoPabcdefghijk
-Sqfbs">> = iolist_to_binary(re:replace("abcdefghijk
-S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123","WyroFQ&Nf&ahyoP&qfbs",[global])),
-?line <<"fCnqsFE">> = iolist_to_binary(re:replace("abidef","ab\\idef","fCnqs\\1FE",[])),
-?line <<"fCnqsFE">> = iolist_to_binary(re:replace("abidef","ab\\idef","fCnqs\\1FE",[global])),
-?line <<"QFATItqr">> = iolist_to_binary(re:replace("bc","a{0}bc","Q\\1FAT\\1Itqr",[])),
-?line <<"QFATItqr">> = iolist_to_binary(re:replace("bc","a{0}bc","Q\\1FAT\\1Itqr",[global])),
-?line <<"DnNn">> = iolist_to_binary(re:replace("xyz","(a|(bc)){0,0}?xyz","DnNn",[])),
-?line <<"DnNn">> = iolist_to_binary(re:replace("xyz","(a|(bc)){0,0}?xyz","DnNn",[global])),
-?line <<"GlvWIgK">> = iolist_to_binary(re:replace("abcde","abc[\\10]de","GlvW\\1\\1IgK",[])),
-?line <<"GlvWIgK">> = iolist_to_binary(re:replace("abcde","abc[\\10]de","GlvW\\1\\1IgK",[global])),
-?line <<"KDyabcdeXgxxbvI">> = iolist_to_binary(re:replace("abcde","abc[\\1]de","KDy&XgxxbvI",[])),
-?line <<"KDyabcdeXgxxbvI">> = iolist_to_binary(re:replace("abcde","abc[\\1]de","KDy&XgxxbvI",[global])),
-?line <<"abcSYuXabcUabckewfJS">> = iolist_to_binary(re:replace("abcde","(abc)[\\1]de","\\1SYuX\\1U\\1kewfJS",[])),
-?line <<"abcSYuXabcUabckewfJS">> = iolist_to_binary(re:replace("abcde","(abc)[\\1]de","\\1SYuX\\1U\\1kewfJS",[global])),
-?line <<"a
-b">> = iolist_to_binary(re:replace("a
-b","(?s)a.b","&",[])),
-?line <<"a
-b">> = iolist_to_binary(re:replace("a
-b","(?s)a.b","&",[global])),
-?line <<"sILYgbGPUbaNOTcccceynxed">> = iolist_to_binary(re:replace("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","sILYg\\1GPU&eynxe",[])),
-?line <<"sILYgbGPUbaNOTcccceynxed">> = iolist_to_binary(re:replace("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","sILYg\\1GPU&eynxe",[global])),
-?line <<"bURwd">> = iolist_to_binary(re:replace("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","\\1URw",[])),
-?line <<"bURwd">> = iolist_to_binary(re:replace("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","\\1URw",[global])),
-?line <<"rRcqtdVUmd">> = iolist_to_binary(re:replace("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","rRcqtdVUm",[])),
-?line <<"rRcqtdVUmd">> = iolist_to_binary(re:replace("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","rRcqtdVUm",[global])),
-?line <<"lYsStJbdoraarRd">> = iolist_to_binary(re:replace("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","lYsStJ\\1doraarR",[])),
-?line <<"lYsStJbdoraarRd">> = iolist_to_binary(re:replace("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","lYsStJ\\1doraarR",[global])),
-?line <<"*** Failersyu**c*** Failers*KH">> = iolist_to_binary(re:replace("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})","&yu\\1\\1c&\\1KH",[])),
-?line <<"*** Failersyu**c*** Failers*KH">> = iolist_to_binary(re:replace("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})","&yu\\1\\1c&\\1KH",[global])),
-?line <<"anything">> = iolist_to_binary(re:replace("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})","&xLcPYkjD\\1YuJHCYWAIc",[])),
-?line <<"anything">> = iolist_to_binary(re:replace("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})","&xLcPYkjD\\1YuJHCYWAIc",[global])),
-?line <<"bc">> = iolist_to_binary(re:replace("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})","l\\1RIA&evjlHaNPGsYSx",[])),
-?line <<"bc">> = iolist_to_binary(re:replace("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})","l\\1RIA&evjlHaNPGsYSx",[global])),
-?line <<"baccd">> = iolist_to_binary(re:replace("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","SfTsSTMDCrU",[])),
-?line <<"baccd">> = iolist_to_binary(re:replace("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","SfTsSTMDCrU",[global])),
-?line <<"KqAssSsdXronRAsbc">> = iolist_to_binary(re:replace("Abc","[^a]","Kq&s\\1sSsdXronR&s\\1",[])),
-?line <<"KqAssSsdXronRAsKqbssSsdXronRbsKqcssSsdXronRcs">> = iolist_to_binary(re:replace("Abc","[^a]","Kq&s\\1sSsdXronR&s\\1",[global])),
-?line <<"AXxbehbnMtJMOjc">> = iolist_to_binary(re:replace("Abc","[^a]","Xx&eh&nMtJMOj",[caseless])),
-?line <<"AXxbehbnMtJMOjXxcehcnMtJMOj">> = iolist_to_binary(re:replace("Abc","[^a]","Xx&eh&nMtJMOj",[caseless,
- global])),
-?line <<"owGHnKmdtjnrJgSkEfaAbc">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","owGHnKmdtjnrJgSkEf",[])),
-?line <<"owGHnKmdtjnrJgSkEfaowGHnKmdtjnrJgSkEf">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","owGHnKmdtjnrJgSkEf",[global])),
-?line <<"AAAaAkm">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","\\1km",[caseless])),
-?line <<"AAAaAkm">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","\\1km",[caseless,
- global])),
-?line <<"iBIdW">> = iolist_to_binary(re:replace("bbb
-ccc","[^a]+","iB\\1I\\1d\\1\\1W",[])),
-?line <<"iBIdW">> = iolist_to_binary(re:replace("bbb
-ccc","[^a]+","iB\\1I\\1d\\1\\1W",[global])),
-?line <<"abDIvvGgnrbcKkaSCbuiv">> = iolist_to_binary(re:replace("abc","[^k]$","DIvvGgnrb&KkaSCbuiv\\1",[])),
-?line <<"abDIvvGgnrbcKkaSCbuiv">> = iolist_to_binary(re:replace("abc","[^k]$","DIvvGgnrb&KkaSCbuiv\\1",[global])),
-?line <<"*** FailerbswvPHxEss">> = iolist_to_binary(re:replace("*** Failers","[^k]$","b&wvPH\\1xE&&",[])),
-?line <<"*** FailerbswvPHxEss">> = iolist_to_binary(re:replace("*** Failers","[^k]$","b&wvPH\\1xE&&",[global])),
-?line <<"abk">> = iolist_to_binary(re:replace("abk","[^k]$","nWvCPNUa\\1iDnbay",[])),
-?line <<"abk">> = iolist_to_binary(re:replace("abk","[^k]$","nWvCPNUa\\1iDnbay",[global])),
-?line <<"HWSo">> = iolist_to_binary(re:replace("abc","[^k]{2,3}$","HWSo\\1",[])),
-?line <<"HWSo">> = iolist_to_binary(re:replace("abc","[^k]{2,3}$","HWSo\\1",[global])),
-?line <<"kNKYkjbsvgnUOybcsuN">> = iolist_to_binary(re:replace("kbc","[^k]{2,3}$","NKYkjbsvgn\\1UO\\1y&suN",[])),
-?line <<"kNKYkjbsvgnUOybcsuN">> = iolist_to_binary(re:replace("kbc","[^k]{2,3}$","NKYkjbsvgn\\1UO\\1y&suN",[global])),
-?line <<"kDhBIRhnabc">> = iolist_to_binary(re:replace("kabc","[^k]{2,3}$","DhBIRhn&",[])),
-?line <<"kDhBIRhnabc">> = iolist_to_binary(re:replace("kabc","[^k]{2,3}$","DhBIRhn&",[global])),
-?line <<"*** FailQmVy">> = iolist_to_binary(re:replace("*** Failers","[^k]{2,3}$","QmVy",[])),
-?line <<"*** FailQmVy">> = iolist_to_binary(re:replace("*** Failers","[^k]{2,3}$","QmVy",[global])),
-?line <<"abk">> = iolist_to_binary(re:replace("abk","[^k]{2,3}$","L&e",[])),
-?line <<"abk">> = iolist_to_binary(re:replace("abk","[^k]{2,3}$","L&e",[global])),
-?line <<"akb">> = iolist_to_binary(re:replace("akb","[^k]{2,3}$","\\1aD\\1u&",[])),
-?line <<"akb">> = iolist_to_binary(re:replace("akb","[^k]{2,3}$","\\1aD\\1u&",[global])),
-?line <<"akk">> = iolist_to_binary(re:replace("akk","[^k]{2,3}$","lPwfbQvWcRAypQ&",[])),
-?line <<"akk">> = iolist_to_binary(re:replace("akk","[^k]{2,3}$","lPwfbQvWcRAypQ&",[global])),
-?line <<"12345678.b.c.d">> = iolist_to_binary(re:replace("12345678.b.c.d","^\\d{8,}\\@.+[^k]$","VKe&\\1iCfITU\\1&nqEh",[])),
-?line <<"12345678.b.c.d">> = iolist_to_binary(re:replace("12345678.b.c.d","^\\d{8,}\\@.+[^k]$","VKe&\\1iCfITU\\1&nqEh",[global])),
-?line <<"123456789.y.z">> = iolist_to_binary(re:replace("123456789.y.z","^\\d{8,}\\@.+[^k]$","aW\\1Jg&g",[])),
-?line <<"123456789.y.z">> = iolist_to_binary(re:replace("123456789.y.z","^\\d{8,}\\@.+[^k]$","aW\\1Jg&g",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8,}\\@.+[^k]$","lHO",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8,}\\@.+[^k]$","lHO",[global])),
-?line <<"12345678.y.uk">> = iolist_to_binary(re:replace("12345678.y.uk","^\\d{8,}\\@.+[^k]$","uVLRBqgT\\1c&\\1",[])),
-?line <<"12345678.y.uk">> = iolist_to_binary(re:replace("12345678.y.uk","^\\d{8,}\\@.+[^k]$","uVLRBqgT\\1c&\\1",[global])),
-?line <<"1234567.b.c.d">> = iolist_to_binary(re:replace("1234567.b.c.d","^\\d{8,}\\@.+[^k]$","VRE&uJDdtsECL",[])),
-?line <<"1234567.b.c.d">> = iolist_to_binary(re:replace("1234567.b.c.d","^\\d{8,}\\@.+[^k]$","VRE&uJDdtsECL",[global])),
-?line <<"XJnEEHYdC">> = iolist_to_binary(re:replace("aaaaaaaaa","(a)\\1{8,}","XJnEEHYdC",[])),
-?line <<"XJnEEHYdC">> = iolist_to_binary(re:replace("aaaaaaaaa","(a)\\1{8,}","XJnEEHYdC",[global])),
-?line <<"eviBaaaaaaaaaaaKMfaysHkyJyKi">> = iolist_to_binary(re:replace("aaaaaaaaaa","(a)\\1{8,}","eviB\\1&KMfaysHkyJyKi",[])),
-?line <<"eviBaaaaaaaaaaaKMfaysHkyJyKi">> = iolist_to_binary(re:replace("aaaaaaaaaa","(a)\\1{8,}","eviB\\1&KMfaysHkyJyKi",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a)\\1{8,}","DjllScfItkb&J&&Nv\\1\\1C",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a)\\1{8,}","DjllScfItkb&J&&Nv\\1\\1C",[global])),
-?line <<"aaaaaaa">> = iolist_to_binary(re:replace("aaaaaaa","(a)\\1{8,}","W&Bp\\1Bem",[])),
-?line <<"aaaaaaa">> = iolist_to_binary(re:replace("aaaaaaa","(a)\\1{8,}","W&Bp\\1Bem",[global])),
-?line <<"aaaaIEWbcd">> = iolist_to_binary(re:replace("aaaabcd","[^a]","IEW\\1&",[])),
-?line <<"aaaaIEWbIEWcIEWd">> = iolist_to_binary(re:replace("aaaabcd","[^a]","IEW\\1&",[global])),
-?line <<"aarhjHFaNDBbwVabcd">> = iolist_to_binary(re:replace("aaAabcd","[^a]","r\\1hjHFaNDBbwV",[])),
-?line <<"aarhjHFaNDBbwVarhjHFaNDBbwVrhjHFaNDBbwVrhjHFaNDBbwV">> = iolist_to_binary(re:replace("aaAabcd","[^a]","r\\1hjHFaNDBbwV",[global])),
-?line <<"aaaaUVFcd">> = iolist_to_binary(re:replace("aaaabcd","[^a]","U\\1V\\1F",[caseless])),
-?line <<"aaaaUVFUVFUVF">> = iolist_to_binary(re:replace("aaaabcd","[^a]","U\\1V\\1F",[caseless,
- global])),
-?line <<"aaAacbLmqbDepcd">> = iolist_to_binary(re:replace("aaAabcd","[^a]","c&Lmq&De\\1p",[caseless])),
-?line <<"aaAacbLmqbDepccLmqcDepcdLmqdDep">> = iolist_to_binary(re:replace("aaAabcd","[^a]","c&Lmq&De\\1p",[caseless,
- global])),
-?line <<"aaaaFtrLcd">> = iolist_to_binary(re:replace("aaaabcd","[^az]","Ftr\\1L",[])),
-?line <<"aaaaFtrLFtrLFtrL">> = iolist_to_binary(re:replace("aaaabcd","[^az]","Ftr\\1L",[global])),
-?line <<"aaxQoACFyabcd">> = iolist_to_binary(re:replace("aaAabcd","[^az]","xQo&C\\1Fy",[])),
-?line <<"aaxQoACFyaxQobCFyxQocCFyxQodCFy">> = iolist_to_binary(re:replace("aaAabcd","[^az]","xQo&C\\1Fy",[global])),
-?line <<"aaaawiJAqfcd">> = iolist_to_binary(re:replace("aaaabcd","[^az]","wiJ\\1Aq\\1f",[caseless])),
-?line <<"aaaawiJAqfwiJAqfwiJAqf">> = iolist_to_binary(re:replace("aaaabcd","[^az]","wiJ\\1Aq\\1f",[caseless,
- global])),
-?line <<"aaAabheGsmSFcd">> = iolist_to_binary(re:replace("aaAabcd","[^az]","bheGsmSF",[caseless])),
-?line <<"aaAabheGsmSFbheGsmSFbheGsmSF">> = iolist_to_binary(re:replace("aaAabcd","[^az]","bheGsmSF",[caseless,
- global])),
-?line <<"xxxxxxxxxxxINrCehGlgxfQWogKhXjxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL","INrCe\\1hGlgxfQWogKhXj",[])),
-?line <<"xxxxxxxxxxxINrCehGlgxfQWogKhXjxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL","INrCe\\1hGlgxfQWogKhXj",[global])),
-?line <<"xxxxxxxxxxxSxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL","S",[])),
-?line <<"xxxxxxxxxxxSxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL","S",[global])),
-?line <<"1yO.230003938DJNUSE">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d[1-9]?)\\d+","yO&DJNUSE",[])),
-?line <<"1yO.230003938DJNUSE">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d[1-9]?)\\d+","yO&DJNUSE",[global])),
-?line <<"1J.875RCmc.875000282SWmWrLgf">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d[1-9]?)\\d+","J\\1RCmc&SWmWrLgf",[])),
-?line <<"1J.875RCmc.875000282SWmWrLgf">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d[1-9]?)\\d+","J\\1RCmc&SWmWrLgf",[global])),
-?line <<"1QhH.23A.235j">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d[1-9]?)\\d+","QhH\\1A&j",[])),
-?line <<"1QhH.23A.235j">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d[1-9]?)\\d+","QhH\\1A&j",[global])),
-?line <<"1ASoXGLgq.23gkJkohg.23pCC0003938">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))","ASoXGLgq\\1gkJkohg\\1pCC",[])),
-?line <<"1ASoXGLgq.23gkJkohg.23pCC0003938">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))","ASoXGLgq\\1gkJkohg\\1pCC",[global])),
-?line <<"1rmMcAlqV000282">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))","rmMcAlqV",[])),
-?line <<"1rmMcAlqV000282">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))","rmMcAlqV",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))","wpfYj&AA",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))","wpfYj&AA",[global])),
-?line <<"1.235">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))","Kq&VgFL",[])),
-?line <<"1.235">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))","Kq&VgFL",[global])),
-?line <<"JabwbScGoababcabE">> = iolist_to_binary(re:replace("ab","a(?)b","J&wbSc\\1Go&\\1\\1&c&E",[])),
-?line <<"JabwbScGoababcabE">> = iolist_to_binary(re:replace("ab","a(?)b","J&wbSc\\1Go&\\1\\1&c&E",[global])),
-?line <<"Food is on the Qfoo tableygvPjujxbaDigfoo tablegCefoo table">> = iolist_to_binary(re:replace("Food is on the foo table","\\b(foo)\\s+(\\w+)","Q&ygvPjujxbaDig&gCe&",[caseless])),
-?line <<"Food is on the Qfoo tableygvPjujxbaDigfoo tablegCefoo table">> = iolist_to_binary(re:replace("Food is on the foo table","\\b(foo)\\s+(\\w+)","Q&ygvPjujxbaDig&gCe&",[caseless,
- global])),
-?line <<"The pBETCXLfood is under the bar in the barWwWn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*)bar","pBETCXL&WwW",[])),
-?line <<"The pBETCXLfood is under the bar in the barWwWn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*)bar","pBETCXL&WwW",[global])),
-?line <<"The nfood is under the barnSrtWBfood is under the barXapfood is under the barr in the barn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*?)bar","n&nSrtWB&Xap&r",[])),
-?line <<"The nfood is under the barnSrtWBfood is under the barXapfood is under the barr in the barn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*?)bar","n&nSrtWB&Xap&r",[global])),
-?line <<"GI have 2 numbers: 53147mNBu">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d*)","G&mNBu",[])),
-?line <<"GI have 2 numbers: 53147mNBuGmNBu">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d*)","G&mNBu",[global])),
-?line <<"SI have 2 numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)","S&",[])),
-?line <<"SI have 2 numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)","S&",[global])),
-?line <<"bGeEvMOYIVDQHJHuI have 2 numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d*)","bGeEvMO\\1YIVDQ&HJHu",[])),
-?line <<"bGeEvMOYIVDQHJHubGeEvMOIYIVDQIHJHubGeEvMOYIVDQHJHubGeEvMO YIVDQ HJHubGeEvMOYIVDQHJHubGeEvMOhYIVDQhHJHubGeEvMOYIVDQHJHubGeEvMOaYIVDQaHJHubGeEvMOYIVDQHJHubGeEvMOvYIVDQvHJHubGeEvMOYIVDQHJHubGeEvMOeYIVDQeHJHubGeEvMOYIVDQHJHubGeEvMO YIVDQ 2HJHubGeEvMOYIVDQHJHubGeEvMO YIVDQ HJHubGeEvMOYIVDQHJHubGeEvMOnYIVDQnHJHubGeEvMOYIVDQHJHubGeEvMOuYIVDQuHJHubGeEvMOYIVDQHJHubGeEvMOmYIVDQmHJHubGeEvMOYIVDQHJHubGeEvMObYIVDQbHJHubGeEvMOYIVDQHJHubGeEvMOeYIVDQeHJHubGeEvMOYIVDQHJHubGeEvMOrYIVDQrHJHubGeEvMOYIVDQHJHubGeEvMOsYIVDQsHJHubGeEvMOYIVDQHJHubGeEvMO:YIVDQ:HJHubGeEvMOYIVDQHJHubGeEvMO YIVDQ 53147HJHubGeEvMOYIVDQHJHu">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d*)","bGeEvMO\\1YIVDQ&HJHu",[global])),
-?line <<"I have tsI have cgpNHsI have I have U numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)","\\1ts\\1cgpNHs\\1\\1U",[])),
-?line <<"I have tsI have cgpNHsI have I have U numbers: ts numbers: cgpNHs numbers: numbers: U">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)","\\1ts\\1cgpNHs\\1\\1U",[global])),
-?line <<"mwinCVPlFdkqGucU">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)$","mwinCVPlFdkqGucU",[])),
-?line <<"mwinCVPlFdkqGucU">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)$","mwinCVPlFdkqGucU",[global])),
-?line <<"I have 2 numbers: 53147I have 2 numbers: 53147I have 2 numbers: 53147pEI have 2 numbers: 53147o">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)$","&&&pE&o",[])),
-?line <<"I have 2 numbers: 53147I have 2 numbers: 53147I have 2 numbers: 53147pEI have 2 numbers: 53147o">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)$","&&&pE&o",[global])),
-?line <<"ym">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)\\b(\\d+)$","ym",[])),
-?line <<"ym">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)\\b(\\d+)$","ym",[global])),
-?line <<"FI have 2 numbers: 53147QSb">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*\\D)(\\d+)$","F&QSb",[])),
-?line <<"FI have 2 numbers: 53147QSb">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*\\D)(\\d+)$","F&QSb",[global])),
-?line <<"ABDGFHjyNAtuJTC123">> = iolist_to_binary(re:replace("ABC123","^\\D*(?!123)","&DGFHjyNAtu\\1JT",[])),
-?line <<"ABDGFHjyNAtuJTC123">> = iolist_to_binary(re:replace("ABC123","^\\D*(?!123)","&DGFHjyNAtu\\1JT",[global])),
-?line <<"ABCUxCRnmWFAQVrawlJ445">> = iolist_to_binary(re:replace("ABC445","^(\\D*)(?=\\d)(?!123)","\\1UxCRnmWFAQVrawlJ",[])),
-?line <<"ABCUxCRnmWFAQVrawlJ445">> = iolist_to_binary(re:replace("ABC445","^(\\D*)(?=\\d)(?!123)","\\1UxCRnmWFAQVrawlJ",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","X\\1uOv\\1PUbsw&IOcqB",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","X\\1uOv\\1PUbsw&IOcqB",[global])),
-?line <<"ABC123">> = iolist_to_binary(re:replace("ABC123","^(\\D*)(?=\\d)(?!123)","&efpcH\\1vtp",[])),
-?line <<"ABC123">> = iolist_to_binary(re:replace("ABC123","^(\\D*)(?=\\d)(?!123)","&efpcH\\1vtp",[global])),
-?line <<"X789">> = iolist_to_binary(re:replace("W46]789","^[W-]46]","X",[])),
-?line <<"X789">> = iolist_to_binary(re:replace("W46]789","^[W-]46]","X",[global])),
-?line <<"-46]GqowvnKBMivOCTQ789">> = iolist_to_binary(re:replace("-46]789","^[W-]46]","&GqowvnKBMiv\\1\\1OCTQ",[])),
-?line <<"-46]GqowvnKBMivOCTQ789">> = iolist_to_binary(re:replace("-46]789","^[W-]46]","&GqowvnKBMiv\\1\\1OCTQ",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-]46]","VkkVbQHsQJe\\1Oqgp",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-]46]","VkkVbQHsQJe\\1Oqgp",[global])),
-?line <<"Wall">> = iolist_to_binary(re:replace("Wall","^[W-]46]","A\\1",[])),
-?line <<"Wall">> = iolist_to_binary(re:replace("Wall","^[W-]46]","A\\1",[global])),
-?line <<"Zebra">> = iolist_to_binary(re:replace("Zebra","^[W-]46]","D\\1Gh&rRMY",[])),
-?line <<"Zebra">> = iolist_to_binary(re:replace("Zebra","^[W-]46]","D\\1Gh&rRMY",[global])),
-?line <<"42">> = iolist_to_binary(re:replace("42","^[W-]46]","&NkVKe",[])),
-?line <<"42">> = iolist_to_binary(re:replace("42","^[W-]46]","&NkVKe",[global])),
-?line <<"[abcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-]46]","UhUNReBRM\\1AIyjJpNT",[])),
-?line <<"[abcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-]46]","UhUNReBRM\\1AIyjJpNT",[global])),
-?line <<"]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-]46]","&GSivk\\1PUgboDgD\\1Q&\\1",[])),
-?line <<"]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-]46]","&GSivk\\1PUgboDgD\\1Q&\\1",[global])),
-?line <<"CiPKWjJuYp46]789">> = iolist_to_binary(re:replace("W46]789","^[W-\\]46]","CiPK&jJuYp",[])),
-?line <<"CiPKWjJuYp46]789">> = iolist_to_binary(re:replace("W46]789","^[W-\\]46]","CiPK&jJuYp",[global])),
-?line <<"WWGQUxNBall">> = iolist_to_binary(re:replace("Wall","^[W-\\]46]","&&G\\1QUxN\\1\\1B",[])),
-?line <<"WWGQUxNBall">> = iolist_to_binary(re:replace("Wall","^[W-\\]46]","&&G\\1QUxN\\1\\1B",[global])),
-?line <<"BBmKOIEOebra">> = iolist_to_binary(re:replace("Zebra","^[W-\\]46]","BBmKOI\\1E\\1O",[])),
-?line <<"BBmKOIEOebra">> = iolist_to_binary(re:replace("Zebra","^[W-\\]46]","BBmKOI\\1E\\1O",[global])),
-?line <<"fsXBGOoQmDJroEwPIXEylophone">> = iolist_to_binary(re:replace("Xylophone","^[W-\\]46]","f\\1s&BGOoQmDJroEwPI&E",[])),
-?line <<"fsXBGOoQmDJroEwPIXEylophone">> = iolist_to_binary(re:replace("Xylophone","^[W-\\]46]","f\\1s&BGOoQmDJroEwPI&E",[global])),
-?line <<"rtkSPUv4c2">> = iolist_to_binary(re:replace("42","^[W-\\]46]","rtkSPUv&c",[])),
-?line <<"rtkSPUv4c2">> = iolist_to_binary(re:replace("42","^[W-\\]46]","rtkSPUv&c",[global])),
-?line <<"AqCR[dTqabcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-\\]46]","AqCR\\1&dTq",[])),
-?line <<"AqCR[dTqabcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-\\]46]","AqCR\\1&dTq",[global])),
-?line <<"XG]JRsPEtL]eoabcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-\\]46]","XG&JRsPEtL&e\\1o",[])),
-?line <<"XG]JRsPEtL]eoabcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-\\]46]","XG&JRsPEtL&e\\1o",[global])),
-?line <<"YrokgJhnnbackslash">> = iolist_to_binary(re:replace("\\backslash","^[W-\\]46]","YrokgJhnn\\1",[])),
-?line <<"YrokgJhnnbackslash">> = iolist_to_binary(re:replace("\\backslash","^[W-\\]46]","YrokgJhnn\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-\\]46]","\\1l",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-\\]46]","\\1l",[global])),
-?line <<"-46]789">> = iolist_to_binary(re:replace("-46]789","^[W-\\]46]","lUctT",[])),
-?line <<"-46]789">> = iolist_to_binary(re:replace("-46]789","^[W-\\]46]","lUctT",[global])),
-?line <<"well">> = iolist_to_binary(re:replace("well","^[W-\\]46]","xELX&QH\\1AsnFr&SH",[])),
-?line <<"well">> = iolist_to_binary(re:replace("well","^[W-\\]46]","xELX&QH\\1AsnFr&SH",[global])),
-?line <<"vword cat dog elephant mussel cow horse canary baboon snake shark otherwordword cat dog elephant mussel cow horse canary baboon snake shark otherwordKteyKVE">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword","v&&KteyKVE\\1",[])),
-?line <<"vword cat dog elephant mussel cow horse canary baboon snake shark otherwordword cat dog elephant mussel cow horse canary baboon snake shark otherwordKteyKVE">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword","v&&KteyKVE\\1",[global])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword","wUEYJgw",[])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword","wUEYJgw",[global])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword","ABdTK\\1Y\\1",[])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword","ABdTK\\1Y\\1",[global])),
-?line <<"CahYoKbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,0}","\\1CahYoK",[])),
-?line <<"CahYoKbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,0}","\\1CahYoK",[global])),
-?line <<"QcFabc">> = iolist_to_binary(re:replace("abc","^(a){0,0}","&QcF",[])),
-?line <<"QcFabc">> = iolist_to_binary(re:replace("abc","^(a){0,0}","&QcF",[global])),
-?line <<"BvdvcHaab">> = iolist_to_binary(re:replace("aab","^(a){0,0}","BvdvcH",[])),
-?line <<"BvdvcHaab">> = iolist_to_binary(re:replace("aab","^(a){0,0}","BvdvcH",[global])),
-?line <<"mtLIyIhdbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,1}","mtL\\1IyIhd",[])),
-?line <<"mtLIyIhdbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,1}","mtL\\1IyIhd",[global])),
-?line <<"oaDoeSPhHaNhncDqkiabc">> = iolist_to_binary(re:replace("abc","^(a){0,1}","o\\1DoeSPhH&NhncDqki\\1",[])),
-?line <<"oaDoeSPhHaNhncDqkiabc">> = iolist_to_binary(re:replace("abc","^(a){0,1}","o\\1DoeSPhH&NhncDqki\\1",[global])),
-?line <<"ahaXsxVhaFHSKPhapJQab">> = iolist_to_binary(re:replace("aab","^(a){0,1}","\\1h\\1XsxVh\\1FHSKPhapJQ",[])),
-?line <<"ahaXsxVhaFHSKPhapJQab">> = iolist_to_binary(re:replace("aab","^(a){0,1}","\\1h\\1XsxVh\\1FHSKPhapJQ",[global])),
-?line <<"iMdtvIhKruTIdObcd">> = iolist_to_binary(re:replace("bcd","^(a){0,2}","iMd\\1\\1\\1tvIhK&r\\1uTIdO",[])),
-?line <<"iMdtvIhKruTIdObcd">> = iolist_to_binary(re:replace("bcd","^(a){0,2}","iMd\\1\\1\\1tvIhK&r\\1uTIdO",[global])),
-?line <<"WYRQMjbc">> = iolist_to_binary(re:replace("abc","^(a){0,2}","WYRQMj",[])),
-?line <<"WYRQMjbc">> = iolist_to_binary(re:replace("abc","^(a){0,2}","WYRQMj",[global])),
-?line <<"XaKbiaaaEub">> = iolist_to_binary(re:replace("aab","^(a){0,2}","XaKbi\\1&Eu",[])),
-?line <<"XaKbiaaaEub">> = iolist_to_binary(re:replace("aab","^(a){0,2}","XaKbi\\1&Eu",[global])),
-?line <<"cFVbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,3}","&c&&FV&",[])),
-?line <<"cFVbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,3}","&c&&FV&",[global])),
-?line <<"gEwbc">> = iolist_to_binary(re:replace("abc","^(a){0,3}","gEw",[])),
-?line <<"gEwbc">> = iolist_to_binary(re:replace("abc","^(a){0,3}","gEw",[global])),
-?line <<"aaSuagMaaaaIaaKb">> = iolist_to_binary(re:replace("aab","^(a){0,3}","&Su\\1gM&&I&K",[])),
-?line <<"aaSuagMaaaaIaaKb">> = iolist_to_binary(re:replace("aab","^(a){0,3}","&Su\\1gM&&I&K",[global])),
-?line <<"GaaahIAJLaMaaaaaSBlaaaTU">> = iolist_to_binary(re:replace("aaa","^(a){0,3}","G&hIAJL\\1M\\1&aSBl&TU",[])),
-?line <<"GaaahIAJLaMaaaaaSBlaaaTU">> = iolist_to_binary(re:replace("aaa","^(a){0,3}","G&hIAJL\\1M\\1&aSBl&TU",[global])),
-?line <<"gcHyvqMebtbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,}","g&cHyvqMebt",[])),
-?line <<"gcHyvqMebtbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,}","g&cHyvqMebt",[global])),
-?line <<"atJaOxHRjOnDbc">> = iolist_to_binary(re:replace("abc","^(a){0,}","\\1tJaOxHRjOnD",[])),
-?line <<"atJaOxHRjOnDbc">> = iolist_to_binary(re:replace("abc","^(a){0,}","\\1tJaOxHRjOnD",[global])),
-?line <<"RlAewSMFrb">> = iolist_to_binary(re:replace("aab","^(a){0,}","RlAewSMFr",[])),
-?line <<"RlAewSMFrb">> = iolist_to_binary(re:replace("aab","^(a){0,}","RlAewSMFr",[global])),
-?line <<"FaaaBoIPaaaLaaaYfapavgA">> = iolist_to_binary(re:replace("aaa","^(a){0,}","F&BoIP&L&Yf\\1p\\1vgA",[])),
-?line <<"FaaaBoIPaaaLaaaYfapavgA">> = iolist_to_binary(re:replace("aaa","^(a){0,}","F&BoIP&L&Yf\\1p\\1vgA",[global])),
-?line <<"baaaaaaaacUvaaaaaaaaCgeDoaRaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){0,}","b&cUv&CgeDo\\1R&",[])),
-?line <<"baaaaaaaacUvaaaaaaaaCgeDoaRaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){0,}","b&cUv&CgeDo\\1R&",[global])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,1}","F&vqwCbrndilc&Wb\\1LRH",[])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,1}","F&vqwCbrndilc&Wb\\1LRH",[global])),
-?line <<"BaaYanfjPxbaabc">> = iolist_to_binary(re:replace("abc","^(a){1,1}","B\\1\\1Y\\1nfjPxb\\1&",[])),
-?line <<"BaaYanfjPxbaabc">> = iolist_to_binary(re:replace("abc","^(a){1,1}","B\\1\\1Y\\1nfjPxb\\1&",[global])),
-?line <<"Pab">> = iolist_to_binary(re:replace("aab","^(a){1,1}","P",[])),
-?line <<"Pab">> = iolist_to_binary(re:replace("aab","^(a){1,1}","P",[global])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,2}","eK\\1B&ypECvCJqtlr&",[])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,2}","eK\\1B&ypECvCJqtlr&",[global])),
-?line <<"QYbc">> = iolist_to_binary(re:replace("abc","^(a){1,2}","QY",[])),
-?line <<"QYbc">> = iolist_to_binary(re:replace("abc","^(a){1,2}","QY",[global])),
-?line <<"MbnVXaaaXhaab">> = iolist_to_binary(re:replace("aab","^(a){1,2}","MbnVX&\\1Xh&",[])),
-?line <<"MbnVXaaaXhaab">> = iolist_to_binary(re:replace("aab","^(a){1,2}","MbnVX&\\1Xh&",[global])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,3}","UKOH",[])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,3}","UKOH",[global])),
-?line <<"TJxKYHFmaaadWlbc">> = iolist_to_binary(re:replace("abc","^(a){1,3}","TJxKYHFm&&\\1dWl",[])),
-?line <<"TJxKYHFmaaadWlbc">> = iolist_to_binary(re:replace("abc","^(a){1,3}","TJxKYHFm&&\\1dWl",[global])),
-?line <<"ub">> = iolist_to_binary(re:replace("aab","^(a){1,3}","u",[])),
-?line <<"ub">> = iolist_to_binary(re:replace("aab","^(a){1,3}","u",[global])),
-?line <<"FOX">> = iolist_to_binary(re:replace("aaa","^(a){1,3}","FOX",[])),
-?line <<"FOX">> = iolist_to_binary(re:replace("aaa","^(a){1,3}","FOX",[global])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,}","W\\1Urn\\1O",[])),
-?line <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,}","W\\1Urn\\1O",[global])),
-?line <<"awalKDgaLeMbc">> = iolist_to_binary(re:replace("abc","^(a){1,}","\\1w\\1lKDg&LeM",[])),
-?line <<"awalKDgaLeMbc">> = iolist_to_binary(re:replace("abc","^(a){1,}","\\1w\\1lKDg&LeM",[global])),
-?line <<"qHVYNjismoeaasSpb">> = iolist_to_binary(re:replace("aab","^(a){1,}","qHVYNjismoe&sSp",[])),
-?line <<"qHVYNjismoeaasSpb">> = iolist_to_binary(re:replace("aab","^(a){1,}","qHVYNjismoe&sSp",[global])),
-?line <<"laa">> = iolist_to_binary(re:replace("aaa","^(a){1,}","la\\1",[])),
-?line <<"laa">> = iolist_to_binary(re:replace("aaa","^(a){1,}","la\\1",[global])),
-?line <<"UJqaaaaaaaarcaaaaaaaaQHavwaGaaaaaaaaoX">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){1,}","UJq&rc&QH\\1vw\\1G&oX",[])),
-?line <<"UJqaaaaaaaarcaaaaaaaaQHavwaGaaaaaaaaoX">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){1,}","UJq&rc&QH\\1vw\\1G&oX",[global])),
-?line <<"borfle
-bib.gifs
+def","abc$","h&&nb\\1&NBSkhYb",[global])),
+ <<"trlaTa">> = iolist_to_binary(re:replace("abcS","(abc)\\123","trlaTa",[])),
+ <<"trlaTa">> = iolist_to_binary(re:replace("abcS","(abc)\\123","trlaTa",[global])),
+ <<"Oabc“MWabcjRDvJhyeF">> = iolist_to_binary(re:replace("abc“","(abc)\\223","O&MW\\1jRDvJhyeF",[])),
+ <<"Oabc“MWabcjRDvJhyeF">> = iolist_to_binary(re:replace("abc“","(abc)\\223","O&MW\\1jRDvJhyeF",[global])),
+ <<"uLBUEpabcÓabcjn">> = iolist_to_binary(re:replace("abcÓ","(abc)\\323","uLBUEp&\\1jn",[])),
+ <<"uLBUEpabcÓabcjn">> = iolist_to_binary(re:replace("abcÓ","(abc)\\323","uLBUEp&\\1jn",[global])),
+ <<"Pi">> = iolist_to_binary(re:replace("abc@","(abc)\\100","Pi",[])),
+ <<"Pi">> = iolist_to_binary(re:replace("abc@","(abc)\\100","Pi",[global])),
+ <<"NLS">> = iolist_to_binary(re:replace("abc@","(abc)\\100","NLS",[])),
+ <<"NLS">> = iolist_to_binary(re:replace("abc@","(abc)\\100","NLS",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","gshb&NCwCI&\\1&O\\1Y&OU",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","gshb&NCwCI&\\1&O\\1Y&OU",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","wfQfG",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","wfQfG",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","nlTLMMuUL\\1dek",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","nlTLMMuUL\\1dek",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","VP\\1&nVqym",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","VP\\1&nVqym",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","YmKMMo",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","YmKMMo",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","POFFExkEtjS",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1000","POFFExkEtjS",[global])),
+ <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","FLXryNI\\1vKW\\1l",[])),
+ <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","FLXryNI\\1vKW\\1l",[global])),
+ <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","xwedFGU&&joLFV",[])),
+ <<"abc81">> = iolist_to_binary(re:replace("abc81","abc\\81","xwedFGU&&joLFV",[global])),
+ <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","QiTym",[])),
+ <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","QiTym",[global])),
+ <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","r",[])),
+ <<"abc91">> = iolist_to_binary(re:replace("abc91","abc\\91","r",[global])),
+ ok.
+run6() ->
+ <<"JavrrCGIJrabcdefghijkllSabcdefghijkllSRCgujabcdefghijkllSnS">> = iolist_to_binary(re:replace("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123","J\\1vrrCGIJr&&RCguj&nS",[])),
+ <<"JavrrCGIJrabcdefghijkllSabcdefghijkllSRCgujabcdefghijkllSnS">> = iolist_to_binary(re:replace("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123","J\\1vrrCGIJr&&RCguj&nS",[global])),
+ <<"Iabcdefghijk
+SoGoIaaBybRYC">> = iolist_to_binary(re:replace("abcdefghijk
+S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123","I&oGoI\\1\\1BybRYC",[])),
+ <<"Iabcdefghijk
+SoGoIaaBybRYC">> = iolist_to_binary(re:replace("abcdefghijk
+S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123","I&oGoI\\1\\1BybRYC",[global])),
+ <<"RGabidefuGO">> = iolist_to_binary(re:replace("abidef","ab\\idef","RG&u\\1G\\1O",[])),
+ <<"RGabidefuGO">> = iolist_to_binary(re:replace("abidef","ab\\idef","RG&u\\1G\\1O",[global])),
+ <<"khlnfNEs">> = iolist_to_binary(re:replace("bc","a{0}bc","khlnfNEs",[])),
+ <<"khlnfNEs">> = iolist_to_binary(re:replace("bc","a{0}bc","khlnfNEs",[global])),
+ <<"rqJj">> = iolist_to_binary(re:replace("xyz","(a|(bc)){0,0}?xyz","rqJj",[])),
+ <<"rqJj">> = iolist_to_binary(re:replace("xyz","(a|(bc)){0,0}?xyz","rqJj",[global])),
+ <<"lSP">> = iolist_to_binary(re:replace("abcde","abc[\\10]de","lSP",[])),
+ <<"lSP">> = iolist_to_binary(re:replace("abcde","abc[\\10]de","lSP",[global])),
+ <<"CKJxmayjvTnPabcdeFvA">> = iolist_to_binary(re:replace("abcde","abc[\\1]de","CKJxmayjvTnP&FvA",[])),
+ <<"CKJxmayjvTnPabcdeFvA">> = iolist_to_binary(re:replace("abcde","abc[\\1]de","CKJxmayjvTnP&FvA",[global])),
+ <<"WyBabcdeCxJkWabcdeipq">> = iolist_to_binary(re:replace("abcde","(abc)[\\1]de","WyB&CxJkW&ipq",[])),
+ <<"WyBabcdeCxJkWabcdeipq">> = iolist_to_binary(re:replace("abcde","(abc)[\\1]de","WyB&CxJkW&ipq",[global])),
+ <<"Ua
+bXVska
+bg">> = iolist_to_binary(re:replace("a
+b","(?s)a.b","U&XVsk&g",[])),
+ <<"Ua
+bXVska
+bg">> = iolist_to_binary(re:replace("a
+b","(?s)a.b","U&XVsk&g",[global])),
+ <<"WgjbaNOTcccckIbd">> = iolist_to_binary(re:replace("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","Wgj&kI\\1",[])),
+ <<"WgjbaNOTcccckIbd">> = iolist_to_binary(re:replace("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","Wgj&kI\\1",[global])),
+ <<"DoCtbaMWiqd">> = iolist_to_binary(re:replace("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","DoCt\\1aMWiq",[])),
+ <<"DoCtbaMWiqd">> = iolist_to_binary(re:replace("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","DoCt\\1aMWiq",[global])),
+ <<"thYPIiibbhwYvfLkd">> = iolist_to_binary(re:replace("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","thYPIii\\1bhwYvfLk",[])),
+ <<"thYPIiibbhwYvfLkd">> = iolist_to_binary(re:replace("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","thYPIii\\1bhwYvfLk",[global])),
+ <<"RibMcQxAKFpd">> = iolist_to_binary(re:replace("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","Ri\\1McQxAKFp",[])),
+ <<"RibMcQxAKFpd">> = iolist_to_binary(re:replace("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","Ri\\1McQxAKFp",[global])),
+ <<"vQUa">> = iolist_to_binary(re:replace("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})","vQUa",[])),
+ <<"vQUa">> = iolist_to_binary(re:replace("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})","vQUa",[global])),
+ <<"anything">> = iolist_to_binary(re:replace("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})","bR\\1Bb&yOfWxBSieYBnJ",[])),
+ <<"anything">> = iolist_to_binary(re:replace("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})","bR\\1Bb&yOfWxBSieYBnJ",[global])),
+ <<"bc">> = iolist_to_binary(re:replace("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})","W\\1i\\1DbDlQDP&rWwmD&",[])),
+ <<"bc">> = iolist_to_binary(re:replace("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})","W\\1i\\1DbDlQDP&rWwmD&",[global])),
+ <<"baccd">> = iolist_to_binary(re:replace("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","ICMQ\\1pRu",[])),
+ <<"baccd">> = iolist_to_binary(re:replace("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})","ICMQ\\1pRu",[global])),
+ <<"eUfAADRbc">> = iolist_to_binary(re:replace("Abc","[^a]","\\1\\1e\\1Uf&&\\1DR",[])),
+ <<"eUfAADReUfbbDReUfccDR">> = iolist_to_binary(re:replace("Abc","[^a]","\\1\\1e\\1Uf&&\\1DR",[global])),
+ <<"AbGc">> = iolist_to_binary(re:replace("Abc","[^a]","\\1&G\\1",[caseless])),
+ <<"AbGcG">> = iolist_to_binary(re:replace("Abc","[^a]","\\1&G\\1",[caseless,
+ global])),
+ <<"AAAGAAAIXPHIaAbc">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","&G&I\\1XPHI\\1",[])),
+ <<"AAAGAAAIXPHIaAbcGAbcIXPHI">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","&G&I\\1XPHI\\1",[global])),
+ <<"AAAaAIxSfS">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","IxSf\\1S",[caseless])),
+ <<"AAAaAIxSfS">> = iolist_to_binary(re:replace("AAAaAbc","[^a]+","IxSf\\1S",[caseless,
+ global])),
+ <<"AfTCbbb
+cccEbbb
+cccfDUfwWtHuS">> = iolist_to_binary(re:replace("bbb
+ccc","[^a]+","AfTC&E&fDUfwWtH\\1uS",[])),
+ <<"AfTCbbb
+cccEbbb
+cccfDUfwWtHuS">> = iolist_to_binary(re:replace("bbb
+ccc","[^a]+","AfTC&E&fDUfwWtH\\1uS",[global])),
+ <<"abUUudTcI">> = iolist_to_binary(re:replace("abc","[^k]$","UUud\\1TcI",[])),
+ <<"abUUudTcI">> = iolist_to_binary(re:replace("abc","[^k]$","UUud\\1TcI",[global])),
+ <<"*** FailerAiOYV">> = iolist_to_binary(re:replace("*** Failers","[^k]$","AiOYV",[])),
+ <<"*** FailerAiOYV">> = iolist_to_binary(re:replace("*** Failers","[^k]$","AiOYV",[global])),
+ <<"abk">> = iolist_to_binary(re:replace("abk","[^k]$","UV&w&TjG&\\1O\\1m",[])),
+ <<"abk">> = iolist_to_binary(re:replace("abk","[^k]$","UV&w&TjG&\\1O\\1m",[global])),
+ <<"cabcH">> = iolist_to_binary(re:replace("abc","[^k]{2,3}$","\\1c&\\1H",[])),
+ <<"cabcH">> = iolist_to_binary(re:replace("abc","[^k]{2,3}$","\\1c&\\1H",[global])),
+ <<"kUyCfbcubJVf">> = iolist_to_binary(re:replace("kbc","[^k]{2,3}$","UyCf&\\1\\1ub\\1JVf",[])),
+ <<"kUyCfbcubJVf">> = iolist_to_binary(re:replace("kbc","[^k]{2,3}$","UyCf&\\1\\1ub\\1JVf",[global])),
+ <<"kgiGjY">> = iolist_to_binary(re:replace("kabc","[^k]{2,3}$","giGj\\1\\1\\1Y",[])),
+ <<"kgiGjY">> = iolist_to_binary(re:replace("kabc","[^k]{2,3}$","giGj\\1\\1\\1Y",[global])),
+ <<"*** FailWjNDersauWgsT">> = iolist_to_binary(re:replace("*** Failers","[^k]{2,3}$","WjND&auWgsT",[])),
+ <<"*** FailWjNDersauWgsT">> = iolist_to_binary(re:replace("*** Failers","[^k]{2,3}$","WjND&auWgsT",[global])),
+ <<"abk">> = iolist_to_binary(re:replace("abk","[^k]{2,3}$","Gu\\1",[])),
+ <<"abk">> = iolist_to_binary(re:replace("abk","[^k]{2,3}$","Gu\\1",[global])),
+ <<"akb">> = iolist_to_binary(re:replace("akb","[^k]{2,3}$","a&Wrx\\1hniTRTJRP\\1",[])),
+ <<"akb">> = iolist_to_binary(re:replace("akb","[^k]{2,3}$","a&Wrx\\1hniTRTJRP\\1",[global])),
+ <<"akk">> = iolist_to_binary(re:replace("akk","[^k]{2,3}$","AkLa&fhMYWpv",[])),
+ <<"akk">> = iolist_to_binary(re:replace("akk","[^k]{2,3}$","AkLa&fhMYWpv",[global])),
+ <<"12345678.b.c.d">> = iolist_to_binary(re:replace("12345678.b.c.d","^\\d{8,}\\@.+[^k]$","HDxYDn",[])),
+ <<"12345678.b.c.d">> = iolist_to_binary(re:replace("12345678.b.c.d","^\\d{8,}\\@.+[^k]$","HDxYDn",[global])),
+ <<"123456789.y.z">> = iolist_to_binary(re:replace("123456789.y.z","^\\d{8,}\\@.+[^k]$","VU\\1D",[])),
+ <<"123456789.y.z">> = iolist_to_binary(re:replace("123456789.y.z","^\\d{8,}\\@.+[^k]$","VU\\1D",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8,}\\@.+[^k]$","GeBqm\\1Dmbs&G\\1vR",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\d{8,}\\@.+[^k]$","GeBqm\\1Dmbs&G\\1vR",[global])),
+ <<"12345678.y.uk">> = iolist_to_binary(re:replace("12345678.y.uk","^\\d{8,}\\@.+[^k]$","a&VS\\1&BvR",[])),
+ <<"12345678.y.uk">> = iolist_to_binary(re:replace("12345678.y.uk","^\\d{8,}\\@.+[^k]$","a&VS\\1&BvR",[global])),
+ <<"1234567.b.c.d">> = iolist_to_binary(re:replace("1234567.b.c.d","^\\d{8,}\\@.+[^k]$","A&Ex&\\1\\1M\\1",[])),
+ <<"1234567.b.c.d">> = iolist_to_binary(re:replace("1234567.b.c.d","^\\d{8,}\\@.+[^k]$","A&Ex&\\1\\1M\\1",[global])),
+ <<"UNaaaaaaaaaASae">> = iolist_to_binary(re:replace("aaaaaaaaa","(a)\\1{8,}","UN&AS\\1e",[])),
+ <<"UNaaaaaaaaaASae">> = iolist_to_binary(re:replace("aaaaaaaaa","(a)\\1{8,}","UN&AS\\1e",[global])),
+ <<"tceAbivVhQav">> = iolist_to_binary(re:replace("aaaaaaaaaa","(a)\\1{8,}","tceAbivVhQ\\1v",[])),
+ <<"tceAbivVhQav">> = iolist_to_binary(re:replace("aaaaaaaaaa","(a)\\1{8,}","tceAbivVhQ\\1v",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a)\\1{8,}","&\\1CR\\1G\\1lXwnVv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a)\\1{8,}","&\\1CR\\1G\\1lXwnVv",[global])),
+ <<"aaaaaaa">> = iolist_to_binary(re:replace("aaaaaaa","(a)\\1{8,}","\\1okyxc\\1yX\\1vEJ&&",[])),
+ <<"aaaaaaa">> = iolist_to_binary(re:replace("aaaaaaa","(a)\\1{8,}","\\1okyxc\\1yX\\1vEJ&&",[global])),
+ <<"aaaaXxrcd">> = iolist_to_binary(re:replace("aaaabcd","[^a]","Xxr",[])),
+ <<"aaaaXxrXxrXxr">> = iolist_to_binary(re:replace("aaaabcd","[^a]","Xxr",[global])),
+ <<"aaarLbBCUOMivTWabcd">> = iolist_to_binary(re:replace("aaAabcd","[^a]","arLbBC\\1UOMivTW",[])),
+ <<"aaarLbBCUOMivTWaarLbBCUOMivTWarLbBCUOMivTWarLbBCUOMivTW">> = iolist_to_binary(re:replace("aaAabcd","[^a]","arLbBC\\1UOMivTW",[global])),
+ ok.
+run7() ->
+ <<"aaaapwMAbnNcRDBcd">> = iolist_to_binary(re:replace("aaaabcd","[^a]","pwMA&\\1n\\1NcRDB",[caseless])),
+ <<"aaaapwMAbnNcRDBpwMAcnNcRDBpwMAdnNcRDB">> = iolist_to_binary(re:replace("aaaabcd","[^a]","pwMA&\\1n\\1NcRDB",[caseless,
+ global])),
+ <<"aaAaUjWwoTQoHtojaVMGDcd">> = iolist_to_binary(re:replace("aaAabcd","[^a]","UjWwoTQoHtoja\\1\\1VMGD\\1",[caseless])),
+ <<"aaAaUjWwoTQoHtojaVMGDUjWwoTQoHtojaVMGDUjWwoTQoHtojaVMGD">> = iolist_to_binary(re:replace("aaAabcd","[^a]","UjWwoTQoHtoja\\1\\1VMGD\\1",[caseless,
+ global])),
+ <<"aaaapmJHbuyrGSgPWcd">> = iolist_to_binary(re:replace("aaaabcd","[^az]","pmJH&uyr\\1GSgPW",[])),
+ <<"aaaapmJHbuyrGSgPWpmJHcuyrGSgPWpmJHduyrGSgPW">> = iolist_to_binary(re:replace("aaaabcd","[^az]","pmJH&uyr\\1GSgPW",[global])),
+ <<"aaYcjbFRuBabcd">> = iolist_to_binary(re:replace("aaAabcd","[^az]","Y\\1cjbFRu\\1B",[])),
+ <<"aaYcjbFRuBaYcjbFRuBYcjbFRuBYcjbFRuB">> = iolist_to_binary(re:replace("aaAabcd","[^az]","Y\\1cjbFRu\\1B",[global])),
+ <<"aaaaBbjBVQSSpboacd">> = iolist_to_binary(re:replace("aaaabcd","[^az]","\\1B&jB\\1VQSSp&\\1\\1o\\1a",[caseless])),
+ <<"aaaaBbjBVQSSpboaBcjBVQSSpcoaBdjBVQSSpdoa">> = iolist_to_binary(re:replace("aaaabcd","[^az]","\\1B&jB\\1VQSSp&\\1\\1o\\1a",[caseless,
+ global])),
+ <<"aaAaibNcd">> = iolist_to_binary(re:replace("aaAabcd","[^az]","i&N",[caseless])),
+ <<"aaAaibNicNidN">> = iolist_to_binary(re:replace("aaAabcd","[^az]","i&N",[caseless,
+ global])),
+ <<"xxxxxxxxxxxyxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL","y",[])),
+ <<"xxxxxxxxxxxyxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL","y",[global])),
+ <<"xxxxxxxxxxxPSTAIREISLLQxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL","&Q",[])),
+ <<"xxxxxxxxxxxPSTAIREISLLQxxxxxxxxx">> = iolist_to_binary(re:replace("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL","&Q",[global])),
+ <<"1uJmu.23V.23UHIOGab">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d[1-9]?)\\d+","uJmu\\1V\\1UHIOGab",[])),
+ <<"1uJmu.23V.23UHIOGab">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d[1-9]?)\\d+","uJmu\\1V\\1UHIOGab",[global])),
+ <<"1DI.875.875000282NK.875000282.875j">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d[1-9]?)\\d+","DI\\1&NK&\\1j",[])),
+ <<"1DI.875.875000282NK.875000282.875j">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d[1-9]?)\\d+","DI\\1&NK&\\1j",[global])),
+ <<"1L.235.23HWQNY.23KfHhq.235.23ggY">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d[1-9]?)\\d+","L&\\1HWQNY\\1KfHhq&\\1ggY",[])),
+ <<"1L.235.23HWQNY.23KfHhq.235.23ggY">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d[1-9]?)\\d+","L&\\1HWQNY\\1KfHhq&\\1ggY",[global])),
+ <<"1DSE0003938">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))","DSE",[])),
+ <<"1DSE0003938">> = iolist_to_binary(re:replace("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))","DSE",[global])),
+ <<"1LaUySoWUFF.875.875.875000282">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))","LaUySoWUFF&&\\1",[])),
+ <<"1LaUySoWUFF.875.875.875000282">> = iolist_to_binary(re:replace("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))","LaUySoWUFF&&\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))","tRWNXmOIDc\\1&GGpOuk",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))","tRWNXmOIDc\\1&GGpOuk",[global])),
+ <<"1.235">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))","lYmo&PAOYv",[])),
+ <<"1.235">> = iolist_to_binary(re:replace("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))","lYmo&PAOYv",[global])),
+ <<"reSOwDabTAGPdSa">> = iolist_to_binary(re:replace("ab","a(?)b","reSOwD\\1&TAGPdSa",[])),
+ <<"reSOwDabTAGPdSa">> = iolist_to_binary(re:replace("ab","a(?)b","reSOwD\\1&TAGPdSa",[global])),
+ <<"Food is on the OvbQHtTuN">> = iolist_to_binary(re:replace("Food is on the foo table","\\b(foo)\\s+(\\w+)","OvbQHtTuN",[caseless])),
+ <<"Food is on the OvbQHtTuN">> = iolist_to_binary(re:replace("Food is on the foo table","\\b(foo)\\s+(\\w+)","OvbQHtTuN",[caseless,
+ global])),
+ <<"The jd is under the bar in the d is under the bar in the food is under the bar in the barRfood is under the bar in the barfood is under the bar in the barjESIDd is under the bar in the GWBDn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*)bar","j\\1\\1&R&&jESID\\1GWBD",[])),
+ <<"The jd is under the bar in the d is under the bar in the food is under the bar in the barRfood is under the bar in the barfood is under the bar in the barjESIDd is under the bar in the GWBDn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*)bar","j\\1\\1&R&&jESID\\1GWBD",[global])),
+ <<"The Mtfood is under the bard is under the sCjcC in the barn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*?)bar","Mt&\\1sCjcC",[])),
+ <<"The Mtfood is under the bard is under the sCjcC in the barn.">> = iolist_to_binary(re:replace("The food is under the bar in the barn.","foo(.*?)bar","Mt&\\1sCjcC",[global])),
+ <<"II have 2 numbers: 53147sQEJI have 2 numbers: 53147I have 2 numbers: 53147QI have 2 numbers: 53147I have 2 numbers: 53147Y">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d*)","I&sQEJ\\1\\1Q\\1\\1Y",[])),
+ <<"II have 2 numbers: 53147sQEJI have 2 numbers: 53147I have 2 numbers: 53147QI have 2 numbers: 53147I have 2 numbers: 53147YIsQEJQY">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d*)","I&sQEJ\\1\\1Q\\1\\1Y",[global])),
+ <<"BjeLtTBnKKfmuI have 2 numbers: 53147Q">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)","BjeLtTBnKKfmu&Q",[])),
+ <<"BjeLtTBnKKfmuI have 2 numbers: 53147Q">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)","BjeLtTBnKKfmu&Q",[global])),
+ <<"XjUoIVWVCosccRPCI have 2 numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d*)","XjUoIVW\\1VCosccRPC&&",[])),
+ <<"XjUoIVWVCosccRPCXjUoIVWIVCosccRPCIIXjUoIVWVCosccRPCXjUoIVW VCosccRPC XjUoIVWVCosccRPCXjUoIVWhVCosccRPChhXjUoIVWVCosccRPCXjUoIVWaVCosccRPCaaXjUoIVWVCosccRPCXjUoIVWvVCosccRPCvvXjUoIVWVCosccRPCXjUoIVWeVCosccRPCeeXjUoIVWVCosccRPCXjUoIVW VCosccRPC 2 2XjUoIVWVCosccRPCXjUoIVW VCosccRPC XjUoIVWVCosccRPCXjUoIVWnVCosccRPCnnXjUoIVWVCosccRPCXjUoIVWuVCosccRPCuuXjUoIVWVCosccRPCXjUoIVWmVCosccRPCmmXjUoIVWVCosccRPCXjUoIVWbVCosccRPCbbXjUoIVWVCosccRPCXjUoIVWeVCosccRPCeeXjUoIVWVCosccRPCXjUoIVWrVCosccRPCrrXjUoIVWVCosccRPCXjUoIVWsVCosccRPCssXjUoIVWVCosccRPCXjUoIVW:VCosccRPC::XjUoIVWVCosccRPCXjUoIVW VCosccRPC 53147 53147XjUoIVWVCosccRPC">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d*)","XjUoIVW\\1VCosccRPC&&",[global])),
+ <<"LnetbRUI have woRN numbers: 53147">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)","LnetbRU\\1woRN",[])),
+ <<"LnetbRUI have woRNLnetbRU numbers: woRN">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)","LnetbRU\\1woRN",[global])),
+ <<"dD">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)$","dD",[])),
+ <<"dD">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)(\\d+)$","dD",[global])),
+ <<"I have 2 numbers: vpu">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)$","\\1vpu",[])),
+ <<"I have 2 numbers: vpu">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*?)(\\d+)$","\\1vpu",[global])),
+ <<"rEcQnOiThojYmI have 2 numbers: ysnN">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)\\b(\\d+)$","rEcQnOiThojYm\\1ysnN",[])),
+ <<"rEcQnOiThojYmI have 2 numbers: ysnN">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*)\\b(\\d+)$","rEcQnOiThojYm\\1ysnN",[global])),
+ <<"DI have 2 numbers: 53147WrwmlgEQLiI have 2 numbers: 53147NE">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*\\D)(\\d+)$","D&WrwmlgEQLi&NE",[])),
+ <<"DI have 2 numbers: 53147WrwmlgEQLiI have 2 numbers: 53147NE">> = iolist_to_binary(re:replace("I have 2 numbers: 53147","(.*\\D)(\\d+)$","D&WrwmlgEQLi&NE",[global])),
+ ok.
+run8() ->
+ <<"ABcsqUeQdAAByYxNC123">> = iolist_to_binary(re:replace("ABC123","^\\D*(?!123)","&csq\\1UeQdA&yYxN",[])),
+ <<"ABcsqUeQdAAByYxNC123">> = iolist_to_binary(re:replace("ABC123","^\\D*(?!123)","&csq\\1UeQdA&yYxN",[global])),
+ <<"KABCABCBP445">> = iolist_to_binary(re:replace("ABC445","^(\\D*)(?=\\d)(?!123)","K\\1&BP",[])),
+ <<"KABCABCBP445">> = iolist_to_binary(re:replace("ABC445","^(\\D*)(?=\\d)(?!123)","K\\1&BP",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","kBiY&gp\\1BUO\\1l",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\D*)(?=\\d)(?!123)","kBiY&gp\\1BUO\\1l",[global])),
+ <<"ABC123">> = iolist_to_binary(re:replace("ABC123","^(\\D*)(?=\\d)(?!123)","\\1YYe",[])),
+ <<"ABC123">> = iolist_to_binary(re:replace("ABC123","^(\\D*)(?=\\d)(?!123)","\\1YYe",[global])),
+ <<"W46]pbAIEqJRW46]W46]cNuYW46]789">> = iolist_to_binary(re:replace("W46]789","^[W-]46]","&pbAIEqJ\\1R&&cNuY&",[])),
+ <<"W46]pbAIEqJRW46]W46]cNuYW46]789">> = iolist_to_binary(re:replace("W46]789","^[W-]46]","&pbAIEqJ\\1R&&cNuY&",[global])),
+ <<"AXCFhT-46]LP-46]gILH-46]rA789">> = iolist_to_binary(re:replace("-46]789","^[W-]46]","AXCFhT&LP&gIL\\1H&rA",[])),
+ <<"AXCFhT-46]LP-46]gILH-46]rA789">> = iolist_to_binary(re:replace("-46]789","^[W-]46]","AXCFhT&LP&gIL\\1H&rA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-]46]","ke&s",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-]46]","ke&s",[global])),
+ <<"Wall">> = iolist_to_binary(re:replace("Wall","^[W-]46]","\\1C\\1VS&grCoMvM\\1",[])),
+ <<"Wall">> = iolist_to_binary(re:replace("Wall","^[W-]46]","\\1C\\1VS&grCoMvM\\1",[global])),
+ <<"Zebra">> = iolist_to_binary(re:replace("Zebra","^[W-]46]","G\\1\\1",[])),
+ <<"Zebra">> = iolist_to_binary(re:replace("Zebra","^[W-]46]","G\\1\\1",[global])),
+ <<"42">> = iolist_to_binary(re:replace("42","^[W-]46]","k\\1p&\\1&E&OlmU",[])),
+ <<"42">> = iolist_to_binary(re:replace("42","^[W-]46]","k\\1p&\\1&E&OlmU",[global])),
+ <<"[abcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-]46]","BHuM&QWt&V&Fw&R\\1",[])),
+ <<"[abcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-]46]","BHuM&QWt&V&Fw&R\\1",[global])),
+ <<"]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-]46]","bm\\1kBng&&HJv",[])),
+ <<"]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-]46]","bm\\1kBng&&HJv",[global])),
+ <<"YiVQVvgWY46]789">> = iolist_to_binary(re:replace("W46]789","^[W-\\]46]","Yi\\1VQVv\\1g&Y",[])),
+ <<"YiVQVvgWY46]789">> = iolist_to_binary(re:replace("W46]789","^[W-\\]46]","Yi\\1VQVv\\1g&Y",[global])),
+ <<"KJall">> = iolist_to_binary(re:replace("Wall","^[W-\\]46]","K\\1J",[])),
+ <<"KJall">> = iolist_to_binary(re:replace("Wall","^[W-\\]46]","K\\1J",[global])),
+ <<"ghebra">> = iolist_to_binary(re:replace("Zebra","^[W-\\]46]","gh",[])),
+ <<"ghebra">> = iolist_to_binary(re:replace("Zebra","^[W-\\]46]","gh",[global])),
+ <<"TQpylophone">> = iolist_to_binary(re:replace("Xylophone","^[W-\\]46]","TQp\\1",[])),
+ <<"TQpylophone">> = iolist_to_binary(re:replace("Xylophone","^[W-\\]46]","TQp\\1",[global])),
+ <<"4yTdgOXvDDmWf2">> = iolist_to_binary(re:replace("42","^[W-\\]46]","&y\\1TdgOXvDDm\\1Wf",[])),
+ <<"4yTdgOXvDDmWf2">> = iolist_to_binary(re:replace("42","^[W-\\]46]","&y\\1TdgOXvDDm\\1Wf",[global])),
+ <<"[OVexyXabcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-\\]46]","&OVexyX",[])),
+ <<"[OVexyXabcd]">> = iolist_to_binary(re:replace("[abcd]","^[W-\\]46]","&OVexyX",[global])),
+ <<"HparACpuFCvG]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-\\]46]","HparACp\\1uFCvG&",[])),
+ <<"HparACpuFCvG]abcd[">> = iolist_to_binary(re:replace("]abcd[","^[W-\\]46]","HparACp\\1uFCvG&",[global])),
+ <<"HQnantyI\\wNbackslash">> = iolist_to_binary(re:replace("\\backslash","^[W-\\]46]","HQnantyI&wN",[])),
+ <<"HQnantyI\\wNbackslash">> = iolist_to_binary(re:replace("\\backslash","^[W-\\]46]","HQnantyI&wN",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-\\]46]","AMd&J\\1SokjY\\1\\1nK",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[W-\\]46]","AMd&J\\1SokjY\\1\\1nK",[global])),
+ <<"-46]789">> = iolist_to_binary(re:replace("-46]789","^[W-\\]46]","RyY&cCj",[])),
+ <<"-46]789">> = iolist_to_binary(re:replace("-46]789","^[W-\\]46]","RyY&cCj",[global])),
+ <<"well">> = iolist_to_binary(re:replace("well","^[W-\\]46]","XPRm\\1VTejwB",[])),
+ <<"well">> = iolist_to_binary(re:replace("well","^[W-\\]46]","XPRm\\1VTejwB",[global])),
+ <<"oroGlaQAqnbI">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword","oroGlaQAqnbI",[])),
+ <<"oroGlaQAqnbI">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword","oroGlaQAqnbI",[global])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword","&E\\1",[])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword","&E\\1",[global])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword","b\\1sLq\\1\\1P",[])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword","b\\1sLq\\1\\1P",[global])),
+ <<"fPbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,0}","fP",[])),
+ <<"fPbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,0}","fP",[global])),
+ <<"jFVHnjWvnETRabc">> = iolist_to_binary(re:replace("abc","^(a){0,0}","jFVHn&j&WvnETR",[])),
+ <<"jFVHnjWvnETRabc">> = iolist_to_binary(re:replace("abc","^(a){0,0}","jFVHn&j&WvnETR",[global])),
+ <<"NDaab">> = iolist_to_binary(re:replace("aab","^(a){0,0}","ND",[])),
+ <<"NDaab">> = iolist_to_binary(re:replace("aab","^(a){0,0}","ND",[global])),
+ <<"RNIIKIcNvfeSEvtOPRObcd">> = iolist_to_binary(re:replace("bcd","^(a){0,1}","RNIIKIcNvfeSEvtO\\1PRO",[])),
+ <<"RNIIKIcNvfeSEvtOPRObcd">> = iolist_to_binary(re:replace("bcd","^(a){0,1}","RNIIKIcNvfeSEvtO\\1PRO",[global])),
+ <<"dDaaaaCaSvbc">> = iolist_to_binary(re:replace("abc","^(a){0,1}","dD&&&&C&Sv",[])),
+ <<"dDaaaaCaSvbc">> = iolist_to_binary(re:replace("abc","^(a){0,1}","dD&&&&C&Sv",[global])),
+ <<"cBbGtgJQnrojHMab">> = iolist_to_binary(re:replace("aab","^(a){0,1}","cBbGtgJQnrojHM",[])),
+ <<"cBbGtgJQnrojHMab">> = iolist_to_binary(re:replace("aab","^(a){0,1}","cBbGtgJQnrojHM",[global])),
+ <<"Mhbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,2}","\\1&M\\1h",[])),
+ <<"Mhbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,2}","\\1&M\\1h",[global])),
+ <<"aauJmduMieraXgHfaobc">> = iolist_to_binary(re:replace("abc","^(a){0,2}","&&uJmduMier\\1XgHf&o",[])),
+ <<"aauJmduMieraXgHfaobc">> = iolist_to_binary(re:replace("abc","^(a){0,2}","&&uJmduMier\\1XgHf&o",[global])),
+ <<"aaunb">> = iolist_to_binary(re:replace("aab","^(a){0,2}","&un",[])),
+ <<"aaunb">> = iolist_to_binary(re:replace("aab","^(a){0,2}","&un",[global])),
+ <<"osculgsNbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,3}","osculg&s&N&",[])),
+ <<"osculgsNbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,3}","osculg&s&N&",[global])),
+ <<"gerhgaeJRbnhIdabc">> = iolist_to_binary(re:replace("abc","^(a){0,3}","gerhg&eJRbnhId&",[])),
+ <<"gerhgaeJRbnhIdabc">> = iolist_to_binary(re:replace("abc","^(a){0,3}","gerhg&eJRbnhId&",[global])),
+ <<"emmqaaaesYb">> = iolist_to_binary(re:replace("aab","^(a){0,3}","emmq&\\1esY",[])),
+ <<"emmqaaaesYb">> = iolist_to_binary(re:replace("aab","^(a){0,3}","emmq&\\1esY",[global])),
+ <<"Rfafau">> = iolist_to_binary(re:replace("aaa","^(a){0,3}","Rf\\1f\\1u",[])),
+ <<"Rfafau">> = iolist_to_binary(re:replace("aaa","^(a){0,3}","Rf\\1f\\1u",[global])),
+ <<"Bbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,}","B",[])),
+ <<"Bbcd">> = iolist_to_binary(re:replace("bcd","^(a){0,}","B",[global])),
+ <<"aOlCbc">> = iolist_to_binary(re:replace("abc","^(a){0,}","\\1OlC",[])),
+ <<"aOlCbc">> = iolist_to_binary(re:replace("abc","^(a){0,}","\\1OlC",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("aab","^(a){0,}","\\1",[])),
+ <<"ab">> = iolist_to_binary(re:replace("aab","^(a){0,}","\\1",[global])),
+ <<"ECTqSuTCy">> = iolist_to_binary(re:replace("aaa","^(a){0,}","ECTqSuTCy",[])),
+ <<"ECTqSuTCy">> = iolist_to_binary(re:replace("aaa","^(a){0,}","ECTqSuTCy",[global])),
+ <<"WQhDeFb">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){0,}","WQhDeFb",[])),
+ <<"WQhDeFb">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){0,}","WQhDeFb",[global])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,1}","k&&&pAWV&FHAQeCpc",[])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,1}","k&&&pAWV&FHAQeCpc",[global])),
+ <<"rorUbgMQXaSaYGambc">> = iolist_to_binary(re:replace("abc","^(a){1,1}","rorUbgMQX&S\\1YG\\1m",[])),
+ <<"rorUbgMQXaSaYGambc">> = iolist_to_binary(re:replace("abc","^(a){1,1}","rorUbgMQX&S\\1YG\\1m",[global])),
+ <<"aNaaab">> = iolist_to_binary(re:replace("aab","^(a){1,1}","aN&\\1",[])),
+ <<"aNaaab">> = iolist_to_binary(re:replace("aab","^(a){1,1}","aN&\\1",[global])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,2}","j\\1w\\1UDgbH",[])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,2}","j\\1w\\1UDgbH",[global])),
+ <<"kNacaAaaHgaaWTaWaubc">> = iolist_to_binary(re:replace("abc","^(a){1,2}","kN\\1c\\1Aa&Hg\\1&WT&W&u",[])),
+ <<"kNacaAaaHgaaWTaWaubc">> = iolist_to_binary(re:replace("abc","^(a){1,2}","kN\\1c\\1Aa&Hg\\1&WT&W&u",[global])),
+ <<"AjaaammeJIb">> = iolist_to_binary(re:replace("aab","^(a){1,2}","Aj&\\1mmeJI",[])),
+ <<"AjaaammeJIb">> = iolist_to_binary(re:replace("aab","^(a){1,2}","Aj&\\1mmeJI",[global])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,3}","&&TTjl\\1nt",[])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,3}","&&TTjl\\1nt",[global])),
+ <<"UeMuRbc">> = iolist_to_binary(re:replace("abc","^(a){1,3}","UeMuR",[])),
+ <<"UeMuRbc">> = iolist_to_binary(re:replace("abc","^(a){1,3}","UeMuR",[global])),
+ <<"vFaaaSDjb">> = iolist_to_binary(re:replace("aab","^(a){1,3}","vF\\1&SDj",[])),
+ <<"vFaaaSDjb">> = iolist_to_binary(re:replace("aab","^(a){1,3}","vF\\1&SDj",[global])),
+ <<"CNwXaaa">> = iolist_to_binary(re:replace("aaa","^(a){1,3}","CNwX&",[])),
+ <<"CNwXaaa">> = iolist_to_binary(re:replace("aaa","^(a){1,3}","CNwX&",[global])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,}","E\\1eK",[])),
+ <<"bcd">> = iolist_to_binary(re:replace("bcd","^(a){1,}","E\\1eK",[global])),
+ <<"IWaNYMwyOaJnfoPPMbc">> = iolist_to_binary(re:replace("abc","^(a){1,}","IW&NYMwyO\\1JnfoPPM",[])),
+ <<"IWaNYMwyOaJnfoPPMbc">> = iolist_to_binary(re:replace("abc","^(a){1,}","IW&NYMwyO\\1JnfoPPM",[global])),
+ <<"SaaafHrCab">> = iolist_to_binary(re:replace("aab","^(a){1,}","S&\\1fHrCa",[])),
+ <<"SaaafHrCab">> = iolist_to_binary(re:replace("aab","^(a){1,}","S&\\1fHrCa",[global])),
+ <<"MaYaaaRaAXUO">> = iolist_to_binary(re:replace("aaa","^(a){1,}","M\\1Y&R\\1AXUO",[])),
+ <<"MaYaaaRaAXUO">> = iolist_to_binary(re:replace("aaa","^(a){1,}","M\\1Y&R\\1AXUO",[global])),
+ <<"BsHaS">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){1,}","BsH\\1S",[])),
+ <<"BsHaS">> = iolist_to_binary(re:replace("aaaaaaaa","^(a){1,}","BsH\\1S",[global])),
+ <<"borfle
+nJEnJAvwAybib.gifXvq
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","&s",[])),
-?line <<"borfle
-bib.gifs
+no",".*\\.gif","nJEnJAvwAy&Xvq\\1",[])),
+ <<"borfle
+nJEnJAvwAybib.gifXvq
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","&s",[global])),
-?line <<"borfle
-BD
+no",".*\\.gif","nJEnJAvwAy&Xvq\\1",[global])),
+ <<"borfle
+Nmmq
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".{0,}\\.gif","BD",[])),
-?line <<"borfle
-BD
+no",".{0,}\\.gif","Nmmq",[])),
+ <<"borfle
+Nmmq
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".{0,}\\.gif","BD",[global])),
-?line <<"borfle
-vDNsbib.gif
+no",".{0,}\\.gif","Nmmq",[global])),
+ <<"borfle
+BVKBwIDwbib.gifjgEqWxbib.gifEW
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","vDNs&",[multiline])),
-?line <<"borfle
-vDNsbib.gif
+no",".*\\.gif","BVKBwIDw&jgEqW\\1x&EW",[multiline])),
+ <<"borfle
+BVKBwIDwbib.gifjgEqWxbib.gifEW
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","vDNs&",[multiline,global])),
-?line <<"dPgeQVbGVD
+no",".*\\.gif","BVKBwIDw&jgEqW\\1x&EW",[multiline,global])),
+ <<"borfle
+bib.giffF
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","dPge\\1QVbGVD",[dotall])),
-?line <<"dPgeQVbGVD
+no",".*\\.gif","&fF",[dotall])),
+ <<"borfle
+bib.giffF
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","dPge\\1QVbGVD",[dotall,global])),
-?line <<"SGyevborfle
-bib.gifCborfle
-bib.gifWUWborfle
-bib.gifHd
+no",".*\\.gif","&fF",[dotall,global])),
+ ok.
+run9() ->
+ <<"ARdLYmTSnXAA
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","SGyev&C\\1&\\1\\1WUW&Hd\\1",[multiline,dotall])),
-?line <<"SGyevborfle
-bib.gifCborfle
-bib.gifWUWborfle
-bib.gifHd
+no",".*\\.gif","AR\\1dLYmTSnXAA",[multiline,dotall])),
+ <<"ARdLYmTSnXAA
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*\\.gif","SGyev&C\\1&\\1\\1WUW&Hd\\1",[multiline,dotall,
- global])),
-?line <<"borfle
+no",".*\\.gif","AR\\1dLYmTSnXAA",[multiline,dotall,global])),
+ <<"borfle
bib.gif
-BKNYIMcbaV">> = iolist_to_binary(re:replace("borfle
+anoc">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","BKNYIMcbaV",[])),
-?line <<"borfle
+no",".*$","a&c",[])),
+ <<"borfle
bib.gif
-BKNYIMcbaVBKNYIMcbaV">> = iolist_to_binary(re:replace("borfle
+anocac">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","BKNYIMcbaV",[global])),
-?line <<"borflevLMilNh
+no",".*$","a&c",[global])),
+ <<"fborfleDas
bib.gif
no">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","&vLM\\1ilNh\\1",[multiline])),
-?line <<"borflevLMilNhvLMilNh
-bib.gifvLMilNhvLMilNh
-novLMilNhvLMilNh">> = iolist_to_binary(re:replace("borfle
+no",".*$","f&Das",[multiline])),
+ <<"fborfleDasfDas
+fbib.gifDasfDas
+fnoDasfDas">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","&vLM\\1ilNh\\1",[multiline,global])),
-?line <<"borfle
+no",".*$","f&Das",[multiline,global])),
+ <<"eUveborfle
bib.gif
-noMtTxgborfle
+nopjBhborfle
bib.gif
-noXborfle
+noEXborfle
bib.gif
-noqKCRborfle
+nodborfle
bib.gif
-noRFb">> = iolist_to_binary(re:replace("borfle
+noiGXw">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","&MtTxg&X&qKCR&RFb",[dotall])),
-?line <<"borfle
+no",".*$","eUve&pjBh&EX&d&iGXw",[dotall])),
+ <<"eUveborfle
bib.gif
-noMtTxgborfle
+nopjBhborfle
bib.gif
-noXborfle
+noEXborfle
bib.gif
-noqKCRborfle
+nodborfle
bib.gif
-noRFbMtTxgXqKCRRFb">> = iolist_to_binary(re:replace("borfle
+noiGXweUvepjBhEXdiGXw">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","&MtTxg&X&qKCR&RFb",[dotall,global])),
-?line <<"rb">> = iolist_to_binary(re:replace("borfle
+no",".*$","eUve&pjBh&EX&d&iGXw",[dotall,global])),
+ <<"RIMAHborfle
bib.gif
-no",".*$","rb",[multiline,dotall])),
-?line <<"rbrb">> = iolist_to_binary(re:replace("borfle
+norborfle
bib.gif
-no",".*$","rb",[multiline,dotall,global])),
-?line <<"borfle
+no">> = iolist_to_binary(re:replace("borfle
bib.gif
-dTAVnoxiWSnoiuGHA">> = iolist_to_binary(re:replace("borfle
+no",".*$","R\\1IMAH&\\1r&",[multiline,dotall])),
+ <<"RIMAHborfle
bib.gif
-no",".*$","dTAV&xiWS&iuGH\\1A\\1",[])),
-?line <<"borfle
+norborfle
bib.gif
-dTAVnoxiWSnoiuGHAdTAVxiWSiuGHA">> = iolist_to_binary(re:replace("borfle
+noRIMAHr">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","dTAV&xiWS&iuGH\\1A\\1",[global])),
-?line <<"bcnFLv
+no",".*$","R\\1IMAH&\\1r&",[multiline,dotall,global])),
+ <<"borfle
bib.gif
-no">> = iolist_to_binary(re:replace("borfle
+IXHXnoNO">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","bc\\1nFLv",[multiline])),
-?line <<"bcnFLvbcnFLv
-bcnFLvbcnFLv
-bcnFLvbcnFLv">> = iolist_to_binary(re:replace("borfle
+no",".*$","IXHX&NO",[])),
+ <<"borfle
bib.gif
-no",".*$","bc\\1nFLv",[multiline,global])),
-?line <<"LIQosdWborfle
+IXHXnoNOIXHXNO">> = iolist_to_binary(re:replace("borfle
bib.gif
-nogcg">> = iolist_to_binary(re:replace("borfle
+no",".*$","IXHX&NO",[global])),
+ <<"iGCnBCJborfleUborflenLutTYS
bib.gif
-no",".*$","L\\1IQosd\\1W&gcg",[dotall])),
-?line <<"LIQosdWborfle
+no">> = iolist_to_binary(re:replace("borfle
bib.gif
-nogcgLIQosdWgcg">> = iolist_to_binary(re:replace("borfle
+no",".*$","\\1iGCnBC\\1J&U&nL\\1utTYS",[multiline])),
+ <<"iGCnBCJborfleUborflenLutTYSiGCnBCJUnLutTYS
+iGCnBCJbib.gifUbib.gifnLutTYSiGCnBCJUnLutTYS
+iGCnBCJnoUnonLutTYSiGCnBCJUnLutTYS">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","L\\1IQosd\\1W&gcg",[dotall,global])),
-?line <<"EcPBKTVborfle
+no",".*$","\\1iGCnBC\\1J&U&nL\\1utTYS",[multiline,global])),
+ <<"dkaborfle
bib.gif
-noPrborfle
+nocxpCSRwborfle
bib.gif
-noXxQSc">> = iolist_to_binary(re:replace("borfle
+noJQHcx">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","EcPBKTV&Pr&XxQSc",[multiline,dotall])),
-?line <<"EcPBKTVborfle
+no",".*$","dka&cxpCSRw&JQ\\1Hc\\1x",[dotall])),
+ <<"dkaborfle
bib.gif
-noPrborfle
+nocxpCSRwborfle
bib.gif
-noXxQScEcPBKTVPrXxQSc">> = iolist_to_binary(re:replace("borfle
+noJQHcxdkacxpCSRwJQHcx">> = iolist_to_binary(re:replace("borfle
bib.gif
-no",".*$","EcPBKTV&Pr&XxQSc",[multiline,dotall,global])),
-?line <<"abcde
-uhjjD1234XGTHcATIgH1234X1234XfbByz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","uhjjD&GTHcATIgH\\1\\1fbB",[])),
-?line <<"abcde
-uhjjD1234XGTHcATIgH1234X1234XfbByz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","uhjjD&GTHcATIgH\\1\\1fbB",[global])),
-?line <<"dbqarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","dbq",[])),
-?line <<"dbqarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","dbq",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","tdwOa\\1DQul",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","tdwOa\\1DQul",[global])),
-?line <<"abcde
-Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","j\\1&fFKu\\1tLJjDOmjkU",[])),
-?line <<"abcde
-Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","j\\1&fFKu\\1tLJjDOmjkU",[global])),
-?line <<"abcde
-cKv1234XFUwb1234XTPoWrycn1234XO1234Xyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","cKv&FUwb&TPoWrycn&O&",[multiline])),
-?line <<"abcde
-cKv1234XFUwb1234XTPoWrycn1234XO1234Xyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","cKv&FUwb&TPoWrycn&O&",[multiline,global])),
-?line <<"FBHWgBBNiGBkIarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","F&HWgB\\1NiG\\1kI",[multiline])),
-?line <<"FBHWgBBNiGBkIarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","F&HWgB\\1NiG\\1kI",[multiline,
- global])),
-?line <<"abcde
-oArar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","oAr",[multiline])),
-?line <<"abcde
-oArar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","oAr",[multiline,global])),
-?line <<"abcde
-1234XpqJuWOcKJabcde
-1234XyXyvjQwPyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","\\1pqJuWOcKJ&yXyvjQwP",[dotall])),
-?line <<"abcde
-1234XpqJuWOcKJabcde
-1234XyXyvjQwPyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","\\1pqJuWOcKJ&yXyvjQwP",[dotall,global])),
-?line <<"BHBBBLbBBgBBoarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","BH\\1&&Lb&&g\\1&o",[dotall])),
-?line <<"BHBBBLbBBgBBoarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","BH\\1&&Lb&&g\\1&o",[dotall,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","&LH",[dotall])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","&LH",[dotall,
- global])),
-?line <<"abcde
+no",".*$","dka&cxpCSRw&JQ\\1Hc\\1x",[dotall,global])),
+ <<"tnQDxLEhTFjTiWwouU">> = iolist_to_binary(re:replace("borfle
+bib.gif
+no",".*$","tnQDxLEhTF\\1jTiWwouU",[multiline,dotall])),
+ <<"tnQDxLEhTFjTiWwouUtnQDxLEhTFjTiWwouU">> = iolist_to_binary(re:replace("borfle
+bib.gif
+no",".*$","tnQDxLEhTF\\1jTiWwouU",[multiline,dotall,global])),
+ <<"abcde
+fSiqVi1234Xw1234XWyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","fSiqVi&w\\1W",[])),
+ <<"abcde
+fSiqVi1234Xw1234XWyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","fSiqVi&w\\1W",[global])),
+ <<"apCVoPCVMeDBpBBarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","apCVoPCVMeD&p\\1&",[])),
+ <<"apCVoPCVMeDBpBBarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","apCVoPCVMeD&p\\1&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","FiTmKNSyXk",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","FiTmKNSyXk",[global])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","HvNOg&qrhICiO",[dotall])),
-?line <<"abcde
+Bar","(.*X|^B)","&",[])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","HvNOg&qrhICiO",[dotall,global])),
-?line <<"eabcde
+Bar","(.*X|^B)","&",[global])),
+ <<"abcde
+1234XY1234X1234X1234XiJfcfLjk1234Xyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","&Y\\1\\1\\1iJfcfLjk\\1",[multiline])),
+ <<"abcde
+1234XY1234X1234X1234XiJfcfLjk1234Xyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","&Y\\1\\1\\1iJfcfLjk\\1",[multiline,global])),
+ <<"BUrWBJarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","&UrW\\1J",[multiline])),
+ <<"BUrWBJarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","&UrW\\1J",[multiline,
+ global])),
+ <<"abcde
+vpiar">> = iolist_to_binary(re:replace("abcde
+Bar","(.*X|^B)","vpi",[multiline])),
+ <<"abcde
+vpiar">> = iolist_to_binary(re:replace("abcde
+Bar","(.*X|^B)","vpi",[multiline,global])),
+ <<"abcde
1234Xabcde
-1234XIRtabcde
1234Xabcde
-1234XCMGsyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","e\\1&IRt\\1\\1CMGs",[multiline,dotall])),
-?line <<"eabcde
+1234XOwvyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","\\1\\1&Owv",[dotall])),
+ <<"abcde
1234Xabcde
-1234XIRtabcde
1234Xabcde
-1234XCMGsyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(.*X|^B)","e\\1&IRt\\1\\1CMGs",[multiline,dotall,global])),
-?line <<"MBMpwYiMLarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","M\\1MpwYiML",[multiline,
- dotall])),
-?line <<"MBMpwYiMLarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","M\\1MpwYiML",[multiline,
- dotall,
- global])),
-?line <<"abcde
-SOfar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","SOf",[multiline,dotall])),
-?line <<"abcde
-SOfar">> = iolist_to_binary(re:replace("abcde
-Bar","(.*X|^B)","SOf",[multiline,dotall,global])),
-?line <<"Xabcde
-1234XIabcde
-1234XJyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(?s)(.*X|^B)","X\\1I\\1J",[])),
-?line <<"Xabcde
-1234XIabcde
-1234XJyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(?s)(.*X|^B)","X\\1I\\1J",[global])),
-?line <<"ckBBgDwBNcECcmswBGrarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s)(.*X|^B)","ck\\1&gDw\\1NcECcmsw\\1Gr",[])),
-?line <<"ckBBgDwBNcECcmswBGrarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s)(.*X|^B)","ck\\1&gDw\\1NcECcmsw\\1Gr",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s)(.*X|^B)","dC\\1SBGDJPgKye\\1iTO",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s)(.*X|^B)","dC\\1SBGDJPgKye\\1iTO",[global])),
-?line <<"abcde
+1234XOwvyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","\\1\\1&Owv",[dotall,global])),
+ <<"csBOSrLyBynarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","cs\\1OSrLy\\1yn",[dotall])),
+ <<"csBOSrLyBynarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","cs\\1OSrLy\\1yn",[dotall,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","\\1qVOKf\\1jqa",[dotall])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(.*X|^B)","\\1qVOKf\\1jqa",[dotall,
+ global])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(?s)(.*X|^B)","hL&HrGi&",[])),
-?line <<"abcde
+Bar","(.*X|^B)","p",[dotall])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(?s)(.*X|^B)","hL&HrGi&",[global])),
-?line <<"abcde
-1234Xabcde
-1234XBpOYYilckyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(?s:.*X|^B)","&&\\1BpOYYilck",[])),
-?line <<"abcde
-1234Xabcde
-1234XBpOYYilckyz">> = iolist_to_binary(re:replace("abcde
-1234Xyz","(?s:.*X|^B)","&&\\1BpOYYilck",[global])),
-?line <<"ThDpSQKkSSwHarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s:.*X|^B)","ThDpSQ\\1KkSSwH",[])),
-?line <<"ThDpSQKkSSwHarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s:.*X|^B)","ThDpSQ\\1KkSSwH",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s:.*X|^B)","H&KaW\\1iKok\\1x&gEh&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s:.*X|^B)","H&KaW\\1iKok\\1x&gEh&",[global])),
-?line <<"abcde
+Bar","(.*X|^B)","p",[dotall,global])),
+ <<"YiHiyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","YiHi",[multiline,dotall])),
+ <<"YiHiyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(.*X|^B)","YiHi",[multiline,dotall,global])),
+ <<"DDQRgXBHBBSBcHarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","DDQRgXBH&&S\\1cH",[multiline,
+ dotall])),
+ <<"DDQRgXBHBBSBcHarFoo">> = iolist_to_binary(re:replace("BarFoo","(.*X|^B)","DDQRgXBH&&S\\1cH",[multiline,
+ dotall,
+ global])),
+ <<"abcde
+KTLNdCWtmar">> = iolist_to_binary(re:replace("abcde
+Bar","(.*X|^B)","KTLNdCWtm",[multiline,dotall])),
+ <<"abcde
+KTLNdCWtmar">> = iolist_to_binary(re:replace("abcde
+Bar","(.*X|^B)","KTLNdCWtm",[multiline,dotall,global])),
+ <<"UnqSIGfraCIjabcde
+1234Xlyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(?s)(.*X|^B)","UnqSIGfraCIj&l",[])),
+ <<"UnqSIGfraCIjabcde
+1234Xlyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(?s)(.*X|^B)","UnqSIGfraCIj&l",[global])),
+ <<"aDBarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s)(.*X|^B)","aDB",[])),
+ <<"aDBarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s)(.*X|^B)","aDB",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s)(.*X|^B)","hbfv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s)(.*X|^B)","hbfv",[global])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(?s:.*X|^B)","DFJoEUQUCdLTM\\1ETp",[])),
-?line <<"abcde
+Bar","(?s)(.*X|^B)","&UWQV\\1&\\1\\1E",[])),
+ <<"abcde
Bar">> = iolist_to_binary(re:replace("abcde
-Bar","(?s:.*X|^B)","DFJoEUQUCdLTM\\1ETp",[global])),
-?line <<"**** Failers">> = iolist_to_binary(re:replace("**** Failers","^.*B","N&QUc\\1IX&",[])),
-?line <<"**** Failers">> = iolist_to_binary(re:replace("**** Failers","^.*B","N&QUc\\1IX&",[global])),
-?line <<"abc
-B">> = iolist_to_binary(re:replace("abc
-B","^.*B","XtHO\\1dFCGIat\\1\\1A\\1yj\\1",[])),
-?line <<"abc
-B">> = iolist_to_binary(re:replace("abc
-B","^.*B","XtHO\\1dFCGIat\\1\\1A\\1yj\\1",[global])),
-?line <<"yKkFabc
+Bar","(?s)(.*X|^B)","&UWQV\\1&\\1\\1E",[global])),
+ <<"KYpUjyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(?s:.*X|^B)","KY\\1\\1pUj\\1",[])),
+ <<"KYpUjyz">> = iolist_to_binary(re:replace("abcde
+1234Xyz","(?s:.*X|^B)","KY\\1\\1pUj\\1",[global])),
+ <<"BSkyfarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s:.*X|^B)","\\1BSk\\1y\\1\\1f",[])),
+ <<"BSkyfarFoo">> = iolist_to_binary(re:replace("BarFoo","(?s:.*X|^B)","\\1BSk\\1y\\1\\1f",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s:.*X|^B)","IG\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s:.*X|^B)","IG\\1",[global])),
+ <<"abcde
+Bar">> = iolist_to_binary(re:replace("abcde
+Bar","(?s:.*X|^B)","&OchEkLBdrDrxVm&",[])),
+ <<"abcde
+Bar">> = iolist_to_binary(re:replace("abcde
+Bar","(?s:.*X|^B)","&OchEkLBdrDrxVm&",[global])),
+ <<"**** Failers">> = iolist_to_binary(re:replace("**** Failers","^.*B","cYoDF\\1rwds&i&y&&XoFT",[])),
+ <<"**** Failers">> = iolist_to_binary(re:replace("**** Failers","^.*B","cYoDF\\1rwds&i&y&&XoFT",[global])),
+ <<"abc
B">> = iolist_to_binary(re:replace("abc
-B","(?s)^.*B","yKkF&",[])),
-?line <<"yKkFabc
+B","^.*B","gXmgvN\\1oh",[])),
+ <<"abc
B">> = iolist_to_binary(re:replace("abc
-B","(?s)^.*B","yKkF&",[global])),
-?line <<"abc
-AQ">> = iolist_to_binary(re:replace("abc
-B","(?m)^.*B","AQ",[])),
-?line <<"abc
-AQ">> = iolist_to_binary(re:replace("abc
-B","(?m)^.*B","AQ",[global])),
-?line <<"abc
-BDabc
-BNabc
-BxoUHHabc
-Bo">> = iolist_to_binary(re:replace("abc
-B","(?ms)^.*B","\\1&D&N&xoUHH&o",[])),
-?line <<"abc
-BDabc
-BNabc
-BxoUHHabc
-Bo">> = iolist_to_binary(re:replace("abc
-B","(?ms)^.*B","\\1&D&N&xoUHH&o",[global])),
-?line <<"abc
-GHgiVrjlVxqskBLR">> = iolist_to_binary(re:replace("abc
-B","(?ms)^B","GHgiVrj\\1lVxqsk&LR",[])),
-?line <<"abc
-GHgiVrjlVxqskBLR">> = iolist_to_binary(re:replace("abc
-B","(?ms)^B","GHgiVrj\\1lVxqsk&LR",[global])),
-?line <<"RBtqaBce">> = iolist_to_binary(re:replace("B","(?s)B$","R&tqaBce",[])),
-?line <<"RBtqaBce">> = iolist_to_binary(re:replace("B","(?s)B$","R&tqaBce",[global])),
-?line <<"kG">> = iolist_to_binary(re:replace("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]","kG",[])),
-?line <<"kG">> = iolist_to_binary(re:replace("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]","kG",[global])),
-?line <<"Tx">> = iolist_to_binary(re:replace("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d","Tx",[])),
-?line <<"Tx">> = iolist_to_binary(re:replace("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d","Tx",[global])),
-?line <<"xB">> = iolist_to_binary(re:replace("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]","xB",[])),
-?line <<"xB">> = iolist_to_binary(re:replace("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]","xB",[global])),
-?line <<"OpPIBabcabcabcabcDcxDvlIdSoa">> = iolist_to_binary(re:replace("abcabcabcabc","^[abc]{12}","OpPIB&DcxDvlIdSoa",[])),
-?line <<"OpPIBabcabcabcabcDcxDvlIdSoa">> = iolist_to_binary(re:replace("abcabcabcabc","^[abc]{12}","OpPIB&DcxDvlIdSoa",[global])),
-?line <<"LGEMfnjAabcabcabcabcuAotOabcabcabcabcs">> = iolist_to_binary(re:replace("abcabcabcabc","^[a-c]{12}","LGEMfnj\\1A&uAotO&s",[])),
-?line <<"LGEMfnjAabcabcabcabcuAotOabcabcabcabcs">> = iolist_to_binary(re:replace("abcabcabcabc","^[a-c]{12}","LGEMfnj\\1A&uAotO&s",[global])),
-?line <<"PNcwcmOyx">> = iolist_to_binary(re:replace("abcabcabcabc","^(a|b|c){12}","PN\\1w\\1mOyx",[])),
-?line <<"PNcwcmOyx">> = iolist_to_binary(re:replace("abcabcabcabc","^(a|b|c){12}","PN\\1w\\1mOyx",[global])),
-?line <<"hVfRbFrAh">> = iolist_to_binary(re:replace("n","^[abcdefghijklmnopqrstuvwxy0123456789]","hVfRbFrAh",[])),
-?line <<"hVfRbFrAh">> = iolist_to_binary(re:replace("n","^[abcdefghijklmnopqrstuvwxy0123456789]","hVfRbFrAh",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]","R\\1gE\\1TmOo&B&\\1EaaIWLL",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]","R\\1gE\\1TmOo&B&\\1EaaIWLL",[global])),
-?line <<"z">> = iolist_to_binary(re:replace("z","^[abcdefghijklmnopqrstuvwxy0123456789]","dPAGng",[])),
-?line <<"z">> = iolist_to_binary(re:replace("z","^[abcdefghijklmnopqrstuvwxy0123456789]","dPAGng",[global])),
-?line <<"GalPHuLJkabcdJ">> = iolist_to_binary(re:replace("abcd","abcde{0,0}","Gal\\1PHu\\1LJk&J",[])),
-?line <<"GalPHuLJkabcdJ">> = iolist_to_binary(re:replace("abcd","abcde{0,0}","Gal\\1PHu\\1LJk&J",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abcde{0,0}","nRSqklns\\1RNQ",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abcde{0,0}","nRSqklns\\1RNQ",[global])),
-?line <<"abce">> = iolist_to_binary(re:replace("abce","abcde{0,0}","aYgl\\1WJ",[])),
-?line <<"abce">> = iolist_to_binary(re:replace("abce","abcde{0,0}","aYgl\\1WJ",[global])),
-?line <<"JSDhTpxGUy">> = iolist_to_binary(re:replace("abe","ab[cd]{0,0}e","J\\1SDhT\\1pxGUy",[])),
-?line <<"JSDhTpxGUy">> = iolist_to_binary(re:replace("abe","ab[cd]{0,0}e","J\\1SDhT\\1pxGUy",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab[cd]{0,0}e","K\\1VVqQdlOY\\1IFC",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab[cd]{0,0}e","K\\1VVqQdlOY\\1IFC",[global])),
-?line <<"abcde">> = iolist_to_binary(re:replace("abcde","ab[cd]{0,0}e","CBmXc&",[])),
-?line <<"abcde">> = iolist_to_binary(re:replace("abcde","ab[cd]{0,0}e","CBmXc&",[global])),
-?line <<"YKTMKcsKabd">> = iolist_to_binary(re:replace("abd","ab(c){0,0}d","YKT\\1MKcsK&",[])),
-?line <<"YKTMKcsKabd">> = iolist_to_binary(re:replace("abd","ab(c){0,0}d","YKT\\1MKcsK&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab(c){0,0}d","&j&dtuA\\1A&vS",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab(c){0,0}d","&j&dtuA\\1A&vS",[global])),
-?line <<"abcd">> = iolist_to_binary(re:replace("abcd","ab(c){0,0}d","&ceeJC\\1HRtWmI",[])),
-?line <<"abcd">> = iolist_to_binary(re:replace("abcd","ab(c){0,0}d","&ceeJC\\1HRtWmI",[global])),
-?line <<"k">> = iolist_to_binary(re:replace("a","a(b*)","\\1k",[])),
-?line <<"k">> = iolist_to_binary(re:replace("a","a(b*)","\\1k",[global])),
-?line <<"abnwnAb">> = iolist_to_binary(re:replace("ab","a(b*)","&nwnA\\1",[])),
-?line <<"abnwnAb">> = iolist_to_binary(re:replace("ab","a(b*)","&nwnA\\1",[global])),
-?line <<"nLIbbbbd">> = iolist_to_binary(re:replace("abbbb","a(b*)","nLI\\1d",[])),
-?line <<"nLIbbbbd">> = iolist_to_binary(re:replace("abbbb","a(b*)","nLI\\1d",[global])),
-?line <<"*** FMxgxBanxQaNgAilers">> = iolist_to_binary(re:replace("*** Failers","a(b*)","Mxgx\\1\\1B&nxQ&NgA",[])),
-?line <<"*** FMxgxBanxQaNgAilers">> = iolist_to_binary(re:replace("*** Failers","a(b*)","Mxgx\\1\\1B&nxQ&NgA",[global])),
-?line <<"bbbbb">> = iolist_to_binary(re:replace("bbbbb","a(b*)","Yho\\1QKp",[])),
-?line <<"bbbbb">> = iolist_to_binary(re:replace("bbbbb","a(b*)","Yho\\1QKp",[global])),
-?line <<"c">> = iolist_to_binary(re:replace("abe","ab\\d{0}e","c",[])),
-?line <<"c">> = iolist_to_binary(re:replace("abe","ab\\d{0}e","c",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab\\d{0}e","e\\1Nu\\1BSg\\1Rxb",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab\\d{0}e","e\\1Nu\\1BSg\\1Rxb",[global])),
-?line <<"ab1e">> = iolist_to_binary(re:replace("ab1e","ab\\d{0}e","C\\1xDlVAxYcYUK\\1fMs",[])),
-?line <<"ab1e">> = iolist_to_binary(re:replace("ab1e","ab\\d{0}e","C\\1xDlVAxYcYUK\\1fMs",[global])),
-?line <<"the MipoEquickBcm brown fox">> = iolist_to_binary(re:replace("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"","MipoE\\1Bcm",[])),
-?line <<"the MipoEquickBcm brown fox">> = iolist_to_binary(re:replace("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"","MipoE\\1Bcm",[global])),
-?line <<"\"the \\\"quick\\\" brown fox\"\"the \\\"quick\\\" brown fox\"K brown fox\"the \\\"quick\\\" brown fox\"twdFEi\"the \\\"quick\\\" brown fox\"Tf">> = iolist_to_binary(re:replace("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"","&&K\\1&twdFEi&Tf",[])),
-?line <<"\"the \\\"quick\\\" brown fox\"\"the \\\"quick\\\" brown fox\"K brown fox\"the \\\"quick\\\" brown fox\"twdFEi\"the \\\"quick\\\" brown fox\"Tf">> = iolist_to_binary(re:replace("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"","&&K\\1&twdFEi&Tf",[global])),
-?line <<"uOiYpObvYvnabc">> = iolist_to_binary(re:replace("abc","","uOiYp&\\1Obv&Yvn",[])),
-?line <<"uOiYpObvYvnauOiYpObvYvnbuOiYpObvYvncuOiYpObvYvn">> = iolist_to_binary(re:replace("abc","","uOiYp&\\1Obv&Yvn",[global])),
-?line <<"cacbJUVL">> = iolist_to_binary(re:replace("acb","a[^a]b","c&JUVL",[])),
-?line <<"cacbJUVL">> = iolist_to_binary(re:replace("acb","a[^a]b","c&JUVL",[global])),
-?line <<"a
-bnnciOUFa
-bttqb">> = iolist_to_binary(re:replace("a
-b","a[^a]b","&nnciOUF&ttq\\1b",[])),
-?line <<"a
-bnnciOUFa
-bttqb">> = iolist_to_binary(re:replace("a
-b","a[^a]b","&nnciOUF&ttq\\1b",[global])),
-?line <<"acbrJrBLmacbnacb">> = iolist_to_binary(re:replace("acb","a.b","&rJrBLm&n&",[])),
-?line <<"acbrJrBLmacbnacb">> = iolist_to_binary(re:replace("acb","a.b","&rJrBLm&n&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.b","lUyaU",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.b","lUyaU",[global])),
-?line <<"a
+B","^.*B","gXmgvN\\1oh",[global])),
+ <<"EQuXabc
+Babc
+BcTMO">> = iolist_to_binary(re:replace("abc
+B","(?s)^.*B","EQuX&&\\1cTMO",[])),
+ <<"EQuXabc
+Babc
+BcTMO">> = iolist_to_binary(re:replace("abc
+B","(?s)^.*B","EQuX&&\\1cTMO",[global])),
+ <<"abc
+gtvPyITnci">> = iolist_to_binary(re:replace("abc
+B","(?m)^.*B","\\1gtvPyIT\\1\\1nci\\1",[])),
+ <<"abc
+gtvPyITnci">> = iolist_to_binary(re:replace("abc
+B","(?m)^.*B","\\1gtvPyIT\\1\\1nci\\1",[global])),
+ <<"Xiabc
+BFQs">> = iolist_to_binary(re:replace("abc
+B","(?ms)^.*B","Xi&FQs",[])),
+ <<"Xiabc
+BFQs">> = iolist_to_binary(re:replace("abc
+B","(?ms)^.*B","Xi&FQs",[global])),
+ <<"abc
+KEQlgWBJydBXBMDBU">> = iolist_to_binary(re:replace("abc
+B","(?ms)^B","KEQlgW&Jy\\1d&X&\\1\\1MD&U",[])),
+ <<"abc
+KEQlgWBJydBXBMDBU">> = iolist_to_binary(re:replace("abc
+B","(?ms)^B","KEQlgW&Jy\\1d&X&\\1\\1MD&U",[global])),
+ ok.
+run10() ->
+ <<"eucnXdJhktgj">> = iolist_to_binary(re:replace("B","(?s)B$","eucnXd\\1Jhktgj",[])),
+ <<"eucnXdJhktgj">> = iolist_to_binary(re:replace("B","(?s)B$","eucnXd\\1Jhktgj",[global])),
+ <<"huCb">> = iolist_to_binary(re:replace("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]","huCb",[])),
+ <<"huCb">> = iolist_to_binary(re:replace("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]","huCb",[global])),
+ <<"X123456654321">> = iolist_to_binary(re:replace("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d","X&",[])),
+ <<"X123456654321">> = iolist_to_binary(re:replace("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d","X&",[global])),
+ <<"TYfrdKv123456654321eOFnwwLVc">> = iolist_to_binary(re:replace("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]","TY\\1frdK\\1\\1v&eOFnwwLVc",[])),
+ <<"TYfrdKv123456654321eOFnwwLVc">> = iolist_to_binary(re:replace("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]","TY\\1frdK\\1\\1v&eOFnwwLVc",[global])),
+ <<"ARvxabcabcabcabcbhP">> = iolist_to_binary(re:replace("abcabcabcabc","^[abc]{12}","ARvx&bhP",[])),
+ <<"ARvxabcabcabcabcbhP">> = iolist_to_binary(re:replace("abcabcabcabc","^[abc]{12}","ARvx&bhP",[global])),
+ <<"VtabcabcabcabcaabcabcabcabcoPm">> = iolist_to_binary(re:replace("abcabcabcabc","^[a-c]{12}","V\\1t&a&oPm",[])),
+ <<"VtabcabcabcabcaabcabcabcabcoPm">> = iolist_to_binary(re:replace("abcabcabcabc","^[a-c]{12}","V\\1t&a&oPm",[global])),
+ <<"XSAxPcCWabcabcabcabccaabcabcabcabcC">> = iolist_to_binary(re:replace("abcabcabcabc","^(a|b|c){12}","XSAxPcCW&\\1a&C",[])),
+ <<"XSAxPcCWabcabcabcabccaabcabcabcabcC">> = iolist_to_binary(re:replace("abcabcabcabc","^(a|b|c){12}","XSAxPcCW&\\1a&C",[global])),
+ <<"KlnPsQA">> = iolist_to_binary(re:replace("n","^[abcdefghijklmnopqrstuvwxy0123456789]","Kl&\\1PsQA",[])),
+ <<"KlnPsQA">> = iolist_to_binary(re:replace("n","^[abcdefghijklmnopqrstuvwxy0123456789]","Kl&\\1PsQA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]","\\1fJAGtEidKGXUnys",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]","\\1fJAGtEidKGXUnys",[global])),
+ <<"z">> = iolist_to_binary(re:replace("z","^[abcdefghijklmnopqrstuvwxy0123456789]","\\1rHkd&\\1jm&b&RxM\\1SHJ",[])),
+ <<"z">> = iolist_to_binary(re:replace("z","^[abcdefghijklmnopqrstuvwxy0123456789]","\\1rHkd&\\1jm&b&RxM\\1SHJ",[global])),
+ <<"imcGUm">> = iolist_to_binary(re:replace("abcd","abcde{0,0}","imcGUm",[])),
+ <<"imcGUm">> = iolist_to_binary(re:replace("abcd","abcde{0,0}","imcGUm",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abcde{0,0}","Tqn",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abcde{0,0}","Tqn",[global])),
+ <<"abce">> = iolist_to_binary(re:replace("abce","abcde{0,0}","&vfSkYqj",[])),
+ <<"abce">> = iolist_to_binary(re:replace("abce","abcde{0,0}","&vfSkYqj",[global])),
+ <<"DvcVJ">> = iolist_to_binary(re:replace("abe","ab[cd]{0,0}e","D\\1vc\\1VJ",[])),
+ <<"DvcVJ">> = iolist_to_binary(re:replace("abe","ab[cd]{0,0}e","D\\1vc\\1VJ",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab[cd]{0,0}e","fqC",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab[cd]{0,0}e","fqC",[global])),
+ <<"abcde">> = iolist_to_binary(re:replace("abcde","ab[cd]{0,0}e","EVGlB",[])),
+ <<"abcde">> = iolist_to_binary(re:replace("abcde","ab[cd]{0,0}e","EVGlB",[global])),
+ <<"ttqYHXMabdKMHbogw">> = iolist_to_binary(re:replace("abd","ab(c){0,0}d","ttqY\\1HXM&KMHbo\\1gw",[])),
+ <<"ttqYHXMabdKMHbogw">> = iolist_to_binary(re:replace("abd","ab(c){0,0}d","ttqY\\1HXM&KMHbo\\1gw",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab(c){0,0}d","UO\\1n&&dgD&x&puRS\\1PEE",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab(c){0,0}d","UO\\1n&&dgD&x&puRS\\1PEE",[global])),
+ <<"abcd">> = iolist_to_binary(re:replace("abcd","ab(c){0,0}d","AnMJgUHAxI\\1ekAaM",[])),
+ <<"abcd">> = iolist_to_binary(re:replace("abcd","ab(c){0,0}d","AnMJgUHAxI\\1ekAaM",[global])),
+ <<"OXylllC">> = iolist_to_binary(re:replace("a","a(b*)","OX\\1ylllC",[])),
+ <<"OXylllC">> = iolist_to_binary(re:replace("a","a(b*)","OX\\1ylllC",[global])),
+ <<"BDoOabpX">> = iolist_to_binary(re:replace("ab","a(b*)","BDoO&pX",[])),
+ <<"BDoOabpX">> = iolist_to_binary(re:replace("ab","a(b*)","BDoO&pX",[global])),
+ <<"WumvpDmPRlDEFbbbbbbbbw">> = iolist_to_binary(re:replace("abbbb","a(b*)","WumvpDmPRlDEF\\1\\1w",[])),
+ <<"WumvpDmPRlDEFbbbbbbbbw">> = iolist_to_binary(re:replace("abbbb","a(b*)","WumvpDmPRlDEF\\1\\1w",[global])),
+ <<"*** FXEpRailers">> = iolist_to_binary(re:replace("*** Failers","a(b*)","XEpR&",[])),
+ <<"*** FXEpRailers">> = iolist_to_binary(re:replace("*** Failers","a(b*)","XEpR&",[global])),
+ <<"bbbbb">> = iolist_to_binary(re:replace("bbbbb","a(b*)","oxX\\1mji\\1R&A",[])),
+ <<"bbbbb">> = iolist_to_binary(re:replace("bbbbb","a(b*)","oxX\\1mji\\1R&A",[global])),
+ <<"nabehjEWAKJbF">> = iolist_to_binary(re:replace("abe","ab\\d{0}e","n&hjEWA\\1\\1KJbF",[])),
+ <<"nabehjEWAKJbF">> = iolist_to_binary(re:replace("abe","ab\\d{0}e","n&hjEWA\\1\\1KJbF",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab\\d{0}e","IK\\1nN\\1xr",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab\\d{0}e","IK\\1nN\\1xr",[global])),
+ <<"ab1e">> = iolist_to_binary(re:replace("ab1e","ab\\d{0}e","S\\1HX\\1V\\1hjKR",[])),
+ <<"ab1e">> = iolist_to_binary(re:replace("ab1e","ab\\d{0}e","S\\1HX\\1V\\1hjKR",[global])),
+ <<"the quickf\"quick\"cqEH\"quick\"quickWsS brown fox">> = iolist_to_binary(re:replace("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"","\\1f&cqEH&\\1WsS",[])),
+ <<"the quickf\"quick\"cqEH\"quick\"quickWsS brown fox">> = iolist_to_binary(re:replace("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"","\\1f&cqEH&\\1WsS",[global])),
+ <<"mRaOvRxI">> = iolist_to_binary(re:replace("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"","mRaOvRxI",[])),
+ <<"mRaOvRxI">> = iolist_to_binary(re:replace("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"","mRaOvRxI",[global])),
+ <<"OVRmBCabc">> = iolist_to_binary(re:replace("abc","","OVR&m&BC",[])),
+ <<"OVRmBCaOVRmBCbOVRmBCcOVRmBC">> = iolist_to_binary(re:replace("abc","","OVR&m&BC",[global])),
+ <<"lMTacbbGqK">> = iolist_to_binary(re:replace("acb","a[^a]b","lMT&bGq\\1K",[])),
+ <<"lMTacbbGqK">> = iolist_to_binary(re:replace("acb","a[^a]b","lMT&bGq\\1K",[global])),
+ <<"a
+ba
+bLxcQMea
+bHjqB">> = iolist_to_binary(re:replace("a
+b","a[^a]b","\\1\\1&&LxcQMe&Hj\\1qB",[])),
+ <<"a
+ba
+bLxcQMea
+bHjqB">> = iolist_to_binary(re:replace("a
+b","a[^a]b","\\1\\1&&LxcQMe&Hj\\1qB",[global])),
+ <<"acbVVpcHAOaqv">> = iolist_to_binary(re:replace("acb","a.b","&VVpcHAOaqv",[])),
+ <<"acbVVpcHAOaqv">> = iolist_to_binary(re:replace("acb","a.b","&VVpcHAOaqv",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.b","rP",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.b","rP",[global])),
+ <<"a
b">> = iolist_to_binary(re:replace("a
-b","a.b","&etys",[])),
-?line <<"a
+b","a.b","rUNVcR\\1i\\1S",[])),
+ <<"a
b">> = iolist_to_binary(re:replace("a
-b","a.b","&etys",[global])),
-?line <<"BRCBYDDacbacbacbLfVw">> = iolist_to_binary(re:replace("acb","a[^a]b","BRCBY\\1D\\1D&&\\1&LfVw",[dotall])),
-?line <<"BRCBYDDacbacbacbLfVw">> = iolist_to_binary(re:replace("acb","a[^a]b","BRCBY\\1D\\1D&&\\1&LfVw",[dotall,
- global])),
-?line <<"a
-bQkfhPqa
-bka
-byK">> = iolist_to_binary(re:replace("a
-b","a[^a]b","&Qk\\1fhPq&k&yK",[dotall])),
-?line <<"a
-bQkfhPqa
-bka
-byK">> = iolist_to_binary(re:replace("a
-b","a[^a]b","&Qk\\1fhPq&k&yK",[dotall,global])),
-?line <<"nKFpFMMacbmxur">> = iolist_to_binary(re:replace("acb","a.b","\\1nKF\\1\\1pF\\1MM\\1&mxur",[dotall])),
-?line <<"nKFpFMMacbmxur">> = iolist_to_binary(re:replace("acb","a.b","\\1nKF\\1\\1pF\\1MM\\1&mxur",[dotall,
- global])),
-?line <<"RESrDVpIxqsoAT">> = iolist_to_binary(re:replace("a
-b","a.b","\\1RES\\1rDVpIxqso\\1AT",[dotall])),
-?line <<"RESrDVpIxqsoAT">> = iolist_to_binary(re:replace("a
-b","a.b","\\1RES\\1rDVpIxqso\\1AT",[dotall,global])),
-?line <<"aNchRRBHywejNvbacE">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","\\1NchRRBHywejNv&E",[])),
-?line <<"aNchRRBHywejNvbacE">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","\\1NchRRBHywejNv&E",[global])),
-?line <<"tOamCbbacgsmxbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","tO\\1mC&gsmx&",[])),
-?line <<"tOamCbbacgsmxbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","tO\\1mC&gsmx&",[global])),
-?line <<"xHTFdauecabbbacGpaol">> = iolist_to_binary(re:replace("bbbac","^(b+?|a){1,2}?c","xHTFd\\1uec\\1&Gp\\1ol",[])),
-?line <<"xHTFdauecabbbacGpaol">> = iolist_to_binary(re:replace("bbbac","^(b+?|a){1,2}?c","xHTFd\\1uec\\1&Gp\\1ol",[global])),
-?line <<"baapjPEIagYbbbbacvbbbbacUPkPJ">> = iolist_to_binary(re:replace("bbbbac","^(b+?|a){1,2}?c","b\\1\\1pjPEI\\1gY&v&UPkPJ",[])),
-?line <<"baapjPEIagYbbbbacvbbbbacUPkPJ">> = iolist_to_binary(re:replace("bbbbac","^(b+?|a){1,2}?c","b\\1\\1pjPEI\\1gY&v&UPkPJ",[global])),
-?line <<"atqCLSTaKnviKn">> = iolist_to_binary(re:replace("bbbbbac","^(b+?|a){1,2}?c","\\1tqCLST\\1KnviKn",[])),
-?line <<"atqCLSTaKnviKn">> = iolist_to_binary(re:replace("bbbbbac","^(b+?|a){1,2}?c","\\1tqCLST\\1KnviKn",[global])),
-?line <<"x">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}?c","x",[])),
-?line <<"x">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}?c","x",[global])),
-?line <<"ysaxGbbachYTP">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}?c","ysaxG&hYTP",[])),
-?line <<"ysaxGbbachYTP">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}?c","ysaxG&hYTP",[global])),
-?line <<"IxpOsaoUxbbbacCEcBow">> = iolist_to_binary(re:replace("bbbac","^(b+|a){1,2}?c","IxpOs\\1oUx&CEcBow",[])),
-?line <<"IxpOsaoUxbbbacCEcBow">> = iolist_to_binary(re:replace("bbbac","^(b+|a){1,2}?c","IxpOs\\1oUx&CEcBow",[global])),
-?line <<"bbbbacDeITf">> = iolist_to_binary(re:replace("bbbbac","^(b+|a){1,2}?c","&DeITf",[])),
-?line <<"bbbbacDeITf">> = iolist_to_binary(re:replace("bbbbac","^(b+|a){1,2}?c","&DeITf",[global])),
-?line <<"XlWabAqKnj">> = iolist_to_binary(re:replace("bbbbbac","^(b+|a){1,2}?c","XlW\\1bAqKnj",[])),
-?line <<"XlWabAqKnj">> = iolist_to_binary(re:replace("bbbbbac","^(b+|a){1,2}?c","XlW\\1bAqKnj",[global])),
-?line <<"x
+b","a.b","rUNVcR\\1i\\1S",[global])),
+ <<"UHo">> = iolist_to_binary(re:replace("acb","a[^a]b","UHo",[dotall])),
+ <<"UHo">> = iolist_to_binary(re:replace("acb","a[^a]b","UHo",[dotall,
+ global])),
+ <<"muQa
+bDGfm">> = iolist_to_binary(re:replace("a
+b","a[^a]b","muQ&DGfm",[dotall])),
+ <<"muQa
+bDGfm">> = iolist_to_binary(re:replace("a
+b","a[^a]b","muQ&DGfm",[dotall,global])),
+ <<"mPIfJVBacbQacbtacbVacb">> = iolist_to_binary(re:replace("acb","a.b","m\\1PIfJVB&Q&t\\1&V&",[dotall])),
+ <<"mPIfJVBacbQacbtacbVacb">> = iolist_to_binary(re:replace("acb","a.b","m\\1PIfJVB&Q&t\\1&V&",[dotall,
+ global])),
+ <<"aNa
+bBIrkip">> = iolist_to_binary(re:replace("a
+b","a.b","aN&BIrkip",[dotall])),
+ <<"aNa
+bBIrkip">> = iolist_to_binary(re:replace("a
+b","a.b","aN&BIrkip",[dotall,global])),
+ ok.
+run11() ->
+ <<"vhgx">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","vhgx",[])),
+ <<"vhgx">> = iolist_to_binary(re:replace("bac","^(b+?|a){1,2}?c","vhgx",[global])),
+ <<"ybvbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","ybv&",[])),
+ <<"ybvbbac">> = iolist_to_binary(re:replace("bbac","^(b+?|a){1,2}?c","ybv&",[global])),
+ <<"KDBmQaFUbbbbacKDvahagVH">> = iolist_to_binary(re:replace("bbbac","^(b+?|a){1,2}?c","KDBmQ\\1FUb&KDv\\1h\\1gVH",[])),
+ <<"KDBmQaFUbbbbacKDvahagVH">> = iolist_to_binary(re:replace("bbbac","^(b+?|a){1,2}?c","KDBmQ\\1FUb&KDv\\1h\\1gVH",[global])),
+ <<"uPboDyBKbbbbaccsL">> = iolist_to_binary(re:replace("bbbbac","^(b+?|a){1,2}?c","uPboDyBK&csL",[])),
+ <<"uPboDyBKbbbbaccsL">> = iolist_to_binary(re:replace("bbbbac","^(b+?|a){1,2}?c","uPboDyBK&csL",[global])),
+ <<"QeDbbbbbacbbbbbacXxKbbbbbacTlGRhFObbbbbaccF">> = iolist_to_binary(re:replace("bbbbbac","^(b+?|a){1,2}?c","QeD&&XxK&TlGRhFO&cF",[])),
+ <<"QeDbbbbbacbbbbbacXxKbbbbbacTlGRhFObbbbbaccF">> = iolist_to_binary(re:replace("bbbbbac","^(b+?|a){1,2}?c","QeD&&XxK&TlGRhFO&cF",[global])),
+ <<"bacUbacihaieDLiAIBbacGLD">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}?c","&U&ih\\1ieDLiAIB&GLD",[])),
+ <<"bacUbacihaieDLiAIBbacGLD">> = iolist_to_binary(re:replace("bac","^(b+|a){1,2}?c","&U&ih\\1ieDLiAIB&GLD",[global])),
+ <<"YFsyGywxuIMvbbacmaha">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}?c","YFsyGywxuIMv&m\\1h\\1",[])),
+ <<"YFsyGywxuIMvbbacmaha">> = iolist_to_binary(re:replace("bbac","^(b+|a){1,2}?c","YFsyGywxuIMv&m\\1h\\1",[global])),
+ <<"qbbbacaLIOdWFbbbacbbbacJBItjgaqJ">> = iolist_to_binary(re:replace("bbbac","^(b+|a){1,2}?c","q&\\1LIOdWF&&JBItjg\\1qJ",[])),
+ <<"qbbbacaLIOdWFbbbacbbbacJBItjgaqJ">> = iolist_to_binary(re:replace("bbbac","^(b+|a){1,2}?c","q&\\1LIOdWF&&JBItjg\\1qJ",[global])),
+ <<"QqiEfi">> = iolist_to_binary(re:replace("bbbbac","^(b+|a){1,2}?c","QqiEfi",[])),
+ <<"QqiEfi">> = iolist_to_binary(re:replace("bbbbac","^(b+|a){1,2}?c","QqiEfi",[global])),
+ <<"YDPanLeWvajbbbbbacabnHyjk">> = iolist_to_binary(re:replace("bbbbbac","^(b+|a){1,2}?c","YDPanLeWv\\1j&\\1bnHyjk",[])),
+ <<"YDPanLeWvajbbbbbacabnHyjk">> = iolist_to_binary(re:replace("bbbbbac","^(b+|a){1,2}?c","YDPanLeWv\\1j&\\1bnHyjk",[global])),
+ <<"x
b">> = iolist_to_binary(re:replace("x
-b","(?!\\A)x","DxdEs\\1&\\1LKts&",[multiline])),
-?line <<"x
+b","(?!\\A)x","TB&e&lCSta",[multiline])),
+ <<"x
b">> = iolist_to_binary(re:replace("x
-b","(?!\\A)x","DxdEs\\1&\\1LKts&",[multiline,global])),
-?line <<"aAx">> = iolist_to_binary(re:replace("ax","(?!\\A)x","Ax",[multiline])),
-?line <<"aAx">> = iolist_to_binary(re:replace("ax","(?!\\A)x","Ax",[multiline,
- global])),
-?line <<"{ab}">> = iolist_to_binary(re:replace("{ab}","\\x0{ab}","aOVgpiCu\\1P\\1xjYe\\1",[])),
-?line <<"{ab}">> = iolist_to_binary(re:replace("{ab}","\\x0{ab}","aOVgpiCu\\1P\\1xjYe\\1",[global])),
-?line <<"PilCDnyDeI">> = iolist_to_binary(re:replace("CD","(A|B)*?CD","Pil&\\1nyDeI",[])),
-?line <<"PilCDnyDeI">> = iolist_to_binary(re:replace("CD","(A|B)*?CD","Pil&\\1nyDeI",[global])),
-?line <<"WrpDiffmnCDPINGCDSe">> = iolist_to_binary(re:replace("CD","(A|B)*CD","WrpDiffmn&PING&Se",[])),
-?line <<"WrpDiffmnCDPINGCDSe">> = iolist_to_binary(re:replace("CD","(A|B)*CD","WrpDiffmn&PING&Se",[global])),
-?line <<"mIeAB">> = iolist_to_binary(re:replace("ABABAB","(AB)*?\\1","mIe",[])),
-?line <<"mIeAB">> = iolist_to_binary(re:replace("ABABAB","(AB)*?\\1","mIe",[global])),
-?line <<"JThaowd">> = iolist_to_binary(re:replace("ABABAB","(AB)*\\1","JThaowd",[])),
-?line <<"JThaowd">> = iolist_to_binary(re:replace("ABABAB","(AB)*\\1","JThaowd",[global])),
-?line <<"mxivbdfooiW">> = iolist_to_binary(re:replace("foo","(?<!bar)foo","m\\1xi\\1\\1vbd&iW",[])),
-?line <<"mxivbdfooiW">> = iolist_to_binary(re:replace("foo","(?<!bar)foo","m\\1xi\\1\\1vbd&iW",[global])),
-?line <<"cathTPTYtGud">> = iolist_to_binary(re:replace("catfood","(?<!bar)foo","hTPTYtGu",[])),
-?line <<"cathTPTYtGud">> = iolist_to_binary(re:replace("catfood","(?<!bar)foo","hTPTYtGu",[global])),
-?line <<"arTMXuVvEElifooRfooXqctle">> = iolist_to_binary(re:replace("arfootle","(?<!bar)foo","TMXu\\1VvEEli&R&Xqc",[])),
-?line <<"arTMXuVvEElifooRfooXqctle">> = iolist_to_binary(re:replace("arfootle","(?<!bar)foo","TMXu\\1VvEEli&R&Xqc",[global])),
-?line <<"rCCfnfoopTfbpOVUOFBsh">> = iolist_to_binary(re:replace("rfoosh","(?<!bar)foo","CCfn&pT\\1fbpOVUOFB",[])),
-?line <<"rCCfnfoopTfbpOVUOFBsh">> = iolist_to_binary(re:replace("rfoosh","(?<!bar)foo","CCfn&pT\\1fbpOVUOFB",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<!bar)foo","bxdEUE&SEpWXK&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<!bar)foo","bxdEUE&SEpWXK&",[global])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<!bar)foo","ghAth&\\1XCvK&&",[])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<!bar)foo","ghAth&\\1XCvK&&",[global])),
-?line <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","(?<!bar)foo","soY&O&QNmTi\\1xspnti&T",[])),
-?line <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","(?<!bar)foo","soY&O&QNmTi\\1xspnti&T",[global])),
-?line <<"JBHNVNd">> = iolist_to_binary(re:replace("catfood","\\w{3}(?<!bar)foo","J\\1BHN\\1VN\\1",[])),
-?line <<"JBHNVNd">> = iolist_to_binary(re:replace("catfood","\\w{3}(?<!bar)foo","J\\1BHN\\1VN\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\w{3}(?<!bar)foo","&ucJ",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\w{3}(?<!bar)foo","&ucJ",[global])),
-?line <<"foo">> = iolist_to_binary(re:replace("foo","\\w{3}(?<!bar)foo","uasVxSucjJKX",[])),
-?line <<"foo">> = iolist_to_binary(re:replace("foo","\\w{3}(?<!bar)foo","uasVxSucjJKX",[global])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","\\w{3}(?<!bar)foo","u&&Su\\1&YWVvwAftwcE&",[])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","\\w{3}(?<!bar)foo","u&&Su\\1&YWVvwAftwcE&",[global])),
-?line <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","\\w{3}(?<!bar)foo","IH",[])),
-?line <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","\\w{3}(?<!bar)foo","IH",[global])),
-?line <<"fooabarSWfoobar">> = iolist_to_binary(re:replace("fooabar","(?<=(foo)a)bar","&SW\\1&",[])),
-?line <<"fooabarSWfoobar">> = iolist_to_binary(re:replace("fooabar","(?<=(foo)a)bar","&SW\\1&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo)a)bar","&ShYlKf",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo)a)bar","&ShYlKf",[global])),
-?line <<"bar">> = iolist_to_binary(re:replace("bar","(?<=(foo)a)bar","Usk\\1PJ&",[])),
-?line <<"bar">> = iolist_to_binary(re:replace("bar","(?<=(foo)a)bar","Usk\\1PJ&",[global])),
-?line <<"foobbar">> = iolist_to_binary(re:replace("foobbar","(?<=(foo)a)bar","\\1pXSA",[])),
-?line <<"foobbar">> = iolist_to_binary(re:replace("foobbar","(?<=(foo)a)bar","\\1pXSA",[global])),
-?line <<"gWabcqJMuvLrGqnPLJK">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","gW&qJ\\1MuvLrGqnPLJK",[multiline])),
-?line <<"gWabcqJMuvLrGqnPLJK">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","gW&qJ\\1MuvLrGqnPLJK",[multiline,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\z","tcIt&YpWtGEy\\1p",[multiline])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\z","tcIt&YpWtGEy\\1p",[multiline,
- global])),
-?line <<"abcM">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","&M",[multiline])),
-?line <<"abcM">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","&M",[multiline,
- global])),
-?line <<"qqq
+b","(?!\\A)x","TB&e&lCSta",[multiline,global])),
+ <<"axHTxRqfqP">> = iolist_to_binary(re:replace("ax","(?!\\A)x","&HT&\\1Rq\\1fqP",[multiline])),
+ <<"axHTxRqfqP">> = iolist_to_binary(re:replace("ax","(?!\\A)x","&HT&\\1Rq\\1fqP",[multiline,
+ global])),
+ <<"{ab}">> = iolist_to_binary(re:replace("{ab}","\\x0{ab}","nqnNdxgun\\1T",[])),
+ <<"{ab}">> = iolist_to_binary(re:replace("{ab}","\\x0{ab}","nqnNdxgun\\1T",[global])),
+ <<"OrUCDJnCTtDo">> = iolist_to_binary(re:replace("CD","(A|B)*?CD","OrU&J\\1nCTtDo",[])),
+ <<"OrUCDJnCTtDo">> = iolist_to_binary(re:replace("CD","(A|B)*?CD","OrU&J\\1nCTtDo",[global])),
+ <<"MkLtcbirH">> = iolist_to_binary(re:replace("CD","(A|B)*CD","MkLtcbirH",[])),
+ <<"MkLtcbirH">> = iolist_to_binary(re:replace("CD","(A|B)*CD","MkLtcbirH",[global])),
+ <<"ABABrABABomDFFpAABABSfrABGABVAB">> = iolist_to_binary(re:replace("ABABAB","(AB)*?\\1","\\1\\1r&omDFFpA&Sfr\\1G\\1V",[])),
+ <<"ABABrABABomDFFpAABABSfrABGABVAB">> = iolist_to_binary(re:replace("ABABAB","(AB)*?\\1","\\1\\1r&omDFFpA&Sfr\\1G\\1V",[global])),
+ <<"NpABABABGmqeABABABABrmlyABABABdq">> = iolist_to_binary(re:replace("ABABAB","(AB)*\\1","Np&Gmqe\\1&rmly&dq",[])),
+ <<"NpABABABGmqeABABABABrmlyABABABdq">> = iolist_to_binary(re:replace("ABABAB","(AB)*\\1","Np&Gmqe\\1&rmly&dq",[global])),
+ <<"qRqrQeDLnUtUIooiI">> = iolist_to_binary(re:replace("foo","(?<!bar)foo","q\\1RqrQeDLn\\1UtUIoo\\1iI",[])),
+ <<"qRqrQeDLnUtUIooiI">> = iolist_to_binary(re:replace("foo","(?<!bar)foo","q\\1RqrQeDLn\\1UtUIoo\\1iI",[global])),
+ <<"catOdXBXoDHfooHbldUpfood">> = iolist_to_binary(re:replace("catfood","(?<!bar)foo","OdXBXoDH&HbldUp&",[])),
+ <<"catOdXBXoDHfooHbldUpfood">> = iolist_to_binary(re:replace("catfood","(?<!bar)foo","OdXBXoDH&HbldUp&",[global])),
+ <<"arDtle">> = iolist_to_binary(re:replace("arfootle","(?<!bar)foo","D",[])),
+ <<"arDtle">> = iolist_to_binary(re:replace("arfootle","(?<!bar)foo","D",[global])),
+ <<"rYPYoYugCsh">> = iolist_to_binary(re:replace("rfoosh","(?<!bar)foo","YPYoYug\\1C",[])),
+ <<"rYPYoYugCsh">> = iolist_to_binary(re:replace("rfoosh","(?<!bar)foo","YPYoYug\\1C",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<!bar)foo","i",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<!bar)foo","i",[global])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<!bar)foo","cbUElrx&&\\1\\1YM\\1aBcUl",[])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<!bar)foo","cbUElrx&&\\1\\1YM\\1aBcUl",[global])),
+ <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","(?<!bar)foo","saPM\\1\\1OgLT\\1h\\1KWyOtmQ",[])),
+ <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","(?<!bar)foo","saPM\\1\\1OgLT\\1h\\1KWyOtmQ",[global])),
+ <<"EPmld">> = iolist_to_binary(re:replace("catfood","\\w{3}(?<!bar)foo","EPml",[])),
+ <<"EPmld">> = iolist_to_binary(re:replace("catfood","\\w{3}(?<!bar)foo","EPml",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\w{3}(?<!bar)foo","MhJ&dGwUuIb\\1JIoqE",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\w{3}(?<!bar)foo","MhJ&dGwUuIb\\1JIoqE",[global])),
+ <<"foo">> = iolist_to_binary(re:replace("foo","\\w{3}(?<!bar)foo","&wjHKW&gb",[])),
+ <<"foo">> = iolist_to_binary(re:replace("foo","\\w{3}(?<!bar)foo","&wjHKW&gb",[global])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","\\w{3}(?<!bar)foo","B",[])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","\\w{3}(?<!bar)foo","B",[global])),
+ <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","\\w{3}(?<!bar)foo","Jspqw\\1R\\1ldUs",[])),
+ <<"towbarfoo">> = iolist_to_binary(re:replace("towbarfoo","\\w{3}(?<!bar)foo","Jspqw\\1R\\1ldUs",[global])),
+ <<"fooarfooVALbarfooUbfooCrGfoobarhbarlfu">> = iolist_to_binary(re:replace("fooabar","(?<=(foo)a)bar","r\\1VAL&\\1Ub\\1CrG\\1&h&lfu",[])),
+ <<"fooarfooVALbarfooUbfooCrGfoobarhbarlfu">> = iolist_to_binary(re:replace("fooabar","(?<=(foo)a)bar","r\\1VAL&\\1Ub\\1CrG\\1&h&lfu",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo)a)bar","Xup&&F\\1h\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo)a)bar","Xup&&F\\1h\\1",[global])),
+ <<"bar">> = iolist_to_binary(re:replace("bar","(?<=(foo)a)bar","IyyUVRu\\1&J&EmI&",[])),
+ <<"bar">> = iolist_to_binary(re:replace("bar","(?<=(foo)a)bar","IyyUVRu\\1&J&EmI&",[global])),
+ <<"foobbar">> = iolist_to_binary(re:replace("foobbar","(?<=(foo)a)bar","yUdI",[])),
+ <<"foobbar">> = iolist_to_binary(re:replace("foobbar","(?<=(foo)a)bar","yUdI",[global])),
+ <<"TjyabckVlQOnp">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","Tjy&kVlQOnp",[multiline])),
+ <<"TjyabckVlQOnp">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","Tjy&kVlQOnp",[multiline,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\z","jAW\\1V&Gcxh&iaRsV\\1",[multiline])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Aabc\\z","jAW\\1V&Gcxh&iaRsV\\1",[multiline,
+ global])),
+ <<"xQWabcHT">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","\\1xQW&H\\1T",[multiline])),
+ <<"xQWabcHT">> = iolist_to_binary(re:replace("abc","\\Aabc\\z","\\1xQW&H\\1T",[multiline,
+ global])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","\\Aabc\\z","B\\1B\\1fqK\\1nocSHwGCCiM",[multiline])),
-?line <<"qqq
+abc","\\Aabc\\z","Y\\1YcwSrGNHt&\\1bI&",[multiline])),
+ <<"qqq
abc">> = iolist_to_binary(re:replace("qqq
-abc","\\Aabc\\z","B\\1B\\1fqK\\1nocSHwGCCiM",[multiline,global])),
-?line <<"abc
+abc","\\Aabc\\z","Y\\1YcwSrGNHt&\\1bI&",[multiline,global])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","\\Aabc\\z","P",[multiline])),
-?line <<"abc
+zzz","\\Aabc\\z","hxWEtDjrfttJGQ",[multiline])),
+ <<"abc
zzz">> = iolist_to_binary(re:replace("abc
-zzz","\\Aabc\\z","P",[multiline,global])),
-?line <<"qqq
+zzz","\\Aabc\\z","hxWEtDjrfttJGQ",[multiline,global])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","\\Aabc\\z","\\1adD\\1",[multiline])),
-?line <<"qqq
+zzz","\\Aabc\\z","\\1AYG&TDth",[multiline])),
+ <<"qqq
abc
zzz">> = iolist_to_binary(re:replace("qqq
abc
-zzz","\\Aabc\\z","\\1adD\\1",[multiline,global])),
-?line <<"1U">> = iolist_to_binary(re:replace("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+","U",[])),
-?line <<"1U">> = iolist_to_binary(re:replace("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+","U",[global])),
-?line <<"1bJ.875fwFYOodDWXyr.875tm.875000282.875000282">> = iolist_to_binary(re:replace("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+","bJ\\1fwFYOodDWXyr\\1tm&&",[])),
-?line <<"1bJ.875fwFYOodDWXyr.875tm.875000282.875000282">> = iolist_to_binary(re:replace("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+","bJ\\1fwFYOodDWXyr\\1tm&&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+","e\\1JPFf&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+","e\\1JPFf&",[global])),
-?line <<"1.235">> = iolist_to_binary(re:replace("1.235","(?>(\\.\\d\\d[1-9]?))\\d+","yOPhp&Vy&fKXLBmiJx\\1a",[])),
-?line <<"1.235">> = iolist_to_binary(re:replace("1.235","(?>(\\.\\d\\d[1-9]?))\\d+","yOPhp&Vy&fKXLBmiJx\\1a",[global])),
-?line <<"partynow is the time for all good men to come to the aid of the partycnow is the time for all good men to come to the aid of the partynow is the time for all good men to come to the aid of the partypartyyecj">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$","\\1&c&&\\1yecj",[])),
-?line <<"partynow is the time for all good men to come to the aid of the partycnow is the time for all good men to come to the aid of the partynow is the time for all good men to come to the aid of the partypartyyecj">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$","\\1&c&&\\1yecj",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((?>\\w+)|(?>\\s+))*$","\\1u",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((?>\\w+)|(?>\\s+))*$","\\1u",[global])),
-?line <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$","gH&CX\\1&vnufnGXYAun",[])),
-?line <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$","gH&CX\\1&vnufnGXYAun",[global])),
-?line <<"K1234512345aH12345a">> = iolist_to_binary(re:replace("12345a","(\\d+)(\\w)","K\\1&H&",[])),
-?line <<"K1234512345aH12345a">> = iolist_to_binary(re:replace("12345a","(\\d+)(\\w)","K\\1&H&",[global])),
-?line <<"IdNK+">> = iolist_to_binary(re:replace("12345+","(\\d+)(\\w)","IdNK",[])),
-?line <<"IdNK+">> = iolist_to_binary(re:replace("12345+","(\\d+)(\\w)","IdNK",[global])),
-?line <<"jvjjhmthsl">> = iolist_to_binary(re:replace("12345a","((?>\\d+))(\\w)","jvjjhmthsl",[])),
-?line <<"jvjjhmthsl">> = iolist_to_binary(re:replace("12345a","((?>\\d+))(\\w)","jvjjhmthsl",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?>\\d+))(\\w)","eK&NTn&\\1T",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?>\\d+))(\\w)","eK&NTn&\\1T",[global])),
-?line <<"12345+">> = iolist_to_binary(re:replace("12345+","((?>\\d+))(\\w)","&&TXSquRgMqkDs&K&",[])),
-?line <<"12345+">> = iolist_to_binary(re:replace("12345+","((?>\\d+))(\\w)","&&TXSquRgMqkDs&K&",[global])),
-?line <<"NeYcvQCaaabtbOkx">> = iolist_to_binary(re:replace("aaab","(?>a+)b","NeYcvQC&tbOkx\\1",[])),
-?line <<"NeYcvQCaaabtbOkx">> = iolist_to_binary(re:replace("aaab","(?>a+)b","NeYcvQC&tbOkx\\1",[global])),
-?line <<"aaabbaaabFOSaaabKKtRUNaaabLDTCH">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","&b&FOS&KKtRUN\\1LDTCH",[])),
-?line <<"aaabbaaabFOSaaabKKtRUNaaabLDTCH">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","&b&FOS&KKtRUN\\1LDTCH",[global])),
-?line <<"xaaabaaabaaaiaaabCaGaaaaaabaaaaaaaaabaaabaaaF">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","x\\1b&\\1i&CaG\\1&\\1\\1&&\\1F",[])),
-?line <<"xaaabaaabaaaiaaabCaGaaaaaabaaaaaaaaabaaabaaaF">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","x\\1b&\\1i&CaG\\1&\\1\\1&&\\1F",[global])),
-?line <<"aaaLDSAYvgtbbbotccc">> = iolist_to_binary(re:replace("aaabbbccc","(?>b)+","LDSAYvgt&ot",[])),
-?line <<"aaaLDSAYvgtbbbotccc">> = iolist_to_binary(re:replace("aaabbbccc","(?>b)+","LDSAYvgt&ot",[global])),
-?line <<"ABQFhQjYaaabbbbcAcccd">> = iolist_to_binary(re:replace("aaabbbbccccd","(?>a+|b+|c+)*c","ABQ\\1Fh\\1QjY&A",[])),
-?line <<"ABQFhQjYaaabbbbcAABQFhQjYcAABQFhQjYcAABQFhQjYcAd">> = iolist_to_binary(re:replace("aaabbbbccccd","(?>a+|b+|c+)*c","ABQ\\1Fh\\1QjY&A",[global])),
-?line <<"((xiabc(ade)ufh()()xpJf">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","\\1i&pJf",[])),
-?line <<"((xiabc(ade)ufh()()xpJf">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","\\1i&pJf",[global])),
-?line <<"NBF">> = iolist_to_binary(re:replace("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","NBF",[])),
-?line <<"NBF">> = iolist_to_binary(re:replace("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","NBF",[global])),
-?line <<"(abc(def)xyz)AFLTv">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","&AFLTv",[])),
-?line <<"(abc(def)xyz)AFLTv">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","&AFLTv",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)","P\\1OC",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)","P\\1OC",[global])),
-?line <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)","u\\1\\1H\\1TOt\\1fVI&X",[])),
-?line <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)","u\\1\\1H\\1TOt\\1fVI&X",[global])),
-?line <<"E">> = iolist_to_binary(re:replace("ab","a(?-i)b","E",[caseless])),
-?line <<"E">> = iolist_to_binary(re:replace("ab","a(?-i)b","E",[caseless,
- global])),
-?line <<"hAboOovpk">> = iolist_to_binary(re:replace("Ab","a(?-i)b","h&oOovpk",[caseless])),
-?line <<"hAboOovpk">> = iolist_to_binary(re:replace("Ab","a(?-i)b","h&oOovpk",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?-i)b","liOu",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?-i)b","liOu",[caseless,
- global])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","a(?-i)b","P",[caseless])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","a(?-i)b","P",[caseless,
- global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","a(?-i)b","GdSF&e&",[caseless])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","a(?-i)b","GdSF&e&",[caseless,
- global])),
-?line <<"a bcd eSPWrUhOwa">> = iolist_to_binary(re:replace("a bcd e","(a (?x)b c)d e","&SPWrUhOwa",[])),
-?line <<"a bcd eSPWrUhOwa">> = iolist_to_binary(re:replace("a bcd e","(a (?x)b c)d e","&SPWrUhOwa",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a (?x)b c)d e","IgDGvOUoEIi",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a (?x)b c)d e","IgDGvOUoEIi",[global])),
-?line <<"a b cd e">> = iolist_to_binary(re:replace("a b cd e","(a (?x)b c)d e","C\\1Lora&uj\\1nePq",[])),
-?line <<"a b cd e">> = iolist_to_binary(re:replace("a b cd e","(a (?x)b c)d e","C\\1Lora&uj\\1nePq",[global])),
-?line <<"abcd e">> = iolist_to_binary(re:replace("abcd e","(a (?x)b c)d e","M",[])),
-?line <<"abcd e">> = iolist_to_binary(re:replace("abcd e","(a (?x)b c)d e","M",[global])),
-?line <<"a bcde">> = iolist_to_binary(re:replace("a bcde","(a (?x)b c)d e","mNwUc&",[])),
-?line <<"a bcde">> = iolist_to_binary(re:replace("a bcde","(a (?x)b c)d e","mNwUc&",[global])),
-?line <<"a bcde fTra bcde fnDatbuPn">> = iolist_to_binary(re:replace("a bcde f","(a b(?x)c d (?-x)e f)","&Tr\\1nDatbuPn",[])),
-?line <<"a bcde fTra bcde fnDatbuPn">> = iolist_to_binary(re:replace("a bcde f","(a b(?x)c d (?-x)e f)","&Tr\\1nDatbuPn",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a b(?x)c d (?-x)e f)","\\1AXE&qrGnJBeg",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a b(?x)c d (?-x)e f)","\\1AXE&qrGnJBeg",[global])),
-?line <<"abcdef">> = iolist_to_binary(re:replace("abcdef","(a b(?x)c d (?-x)e f)","YXaHuSXEMrxHLIUXuNu\\1",[])),
-?line <<"abcdef">> = iolist_to_binary(re:replace("abcdef","(a b(?x)c d (?-x)e f)","YXaHuSXEMrxHLIUXuNu\\1",[global])),
-?line <<"AmT">> = iolist_to_binary(re:replace("abc","(a(?i)b)c","AmT",[])),
-?line <<"AmT">> = iolist_to_binary(re:replace("abc","(a(?i)b)c","AmT",[global])),
-?line <<"CYjrwVi">> = iolist_to_binary(re:replace("aBc","(a(?i)b)c","CYjrwVi",[])),
-?line <<"CYjrwVi">> = iolist_to_binary(re:replace("aBc","(a(?i)b)c","CYjrwVi",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)b)c","STYFgfjhE&dcc",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)b)c","STYFgfjhE&dcc",[global])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","(a(?i)b)c","BAcmfc\\1fAfr&o",[])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","(a(?i)b)c","BAcmfc\\1fAfr&o",[global])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","(a(?i)b)c","NGkAgBCJxbCgR",[])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","(a(?i)b)c","NGkAgBCJxbCgR",[global])),
-?line <<"Abc">> = iolist_to_binary(re:replace("Abc","(a(?i)b)c","aS&kKYGwkOB&YhadhLX",[])),
-?line <<"Abc">> = iolist_to_binary(re:replace("Abc","(a(?i)b)c","aS&kKYGwkOB&YhadhLX",[global])),
-?line <<"ABc">> = iolist_to_binary(re:replace("ABc","(a(?i)b)c","hP\\1RiAIeDp",[])),
-?line <<"ABc">> = iolist_to_binary(re:replace("ABc","(a(?i)b)c","hP\\1RiAIeDp",[global])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","(a(?i)b)c","Jj&j\\1&I&\\1&CR\\1qDG",[])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","(a(?i)b)c","Jj&j\\1&I&\\1&CR\\1qDG",[global])),
-?line <<"AbC">> = iolist_to_binary(re:replace("AbC","(a(?i)b)c","\\1h\\1XCNuqcxa",[])),
-?line <<"AbC">> = iolist_to_binary(re:replace("AbC","(a(?i)b)c","\\1h\\1XCNuqcxa",[global])),
-?line <<"hsDxrqJjHQabc">> = iolist_to_binary(re:replace("abc","a(?i:b)c","hsDxrqJjHQ&",[])),
-?line <<"hsDxrqJjHQabc">> = iolist_to_binary(re:replace("abc","a(?i:b)c","hsDxrqJjHQ&",[global])),
-?line <<"QltXULOSWaBcFaBcS">> = iolist_to_binary(re:replace("aBc","a(?i:b)c","Qlt\\1XU\\1L\\1OSW&F&S",[])),
-?line <<"QltXULOSWaBcFaBcS">> = iolist_to_binary(re:replace("aBc","a(?i:b)c","Qlt\\1XU\\1L\\1OSW&F&S",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)c","owyoniUsut",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)c","owyoniUsut",[global])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","a(?i:b)c","unB&TlphDWAD",[])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","a(?i:b)c","unB&TlphDWAD",[global])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","a(?i:b)c","\\1XaX&kAbe&\\1V",[])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","a(?i:b)c","\\1XaX&kAbe&\\1V",[global])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)c","IY\\1aQ&tM\\1",[])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)c","IY\\1aQ&tM\\1",[global])),
-?line <<"aBcOHQouBOaBc">> = iolist_to_binary(re:replace("aBc","a(?i:b)*c","&O\\1HQo\\1uBO&",[])),
-?line <<"aBcOHQouBOaBc">> = iolist_to_binary(re:replace("aBc","a(?i:b)*c","&O\\1HQo\\1uBO&",[global])),
-?line <<"lvjhpFaBBceaBBciWQNaBBcr">> = iolist_to_binary(re:replace("aBBc","a(?i:b)*c","lvjhpF&e&i\\1WQN\\1&r",[])),
-?line <<"lvjhpFaBBceaBBciWQNaBBcr">> = iolist_to_binary(re:replace("aBBc","a(?i:b)*c","lvjhpF&e&i\\1WQN\\1&r",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)*c","\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)*c","\\1",[global])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)*c","OaR&&ytX",[])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)*c","OaR&&ytX",[global])),
-?line <<"aBBC">> = iolist_to_binary(re:replace("aBBC","a(?i:b)*c","Su",[])),
-?line <<"aBBC">> = iolist_to_binary(re:replace("aBBC","a(?i:b)*c","Su",[global])),
-?line <<"abcdabcdalFfabcdsPxC">> = iolist_to_binary(re:replace("abcd","a(?=b(?i)c)\\w\\wd","&&alFf&sPxC",[])),
-?line <<"abcdabcdalFfabcdsPxC">> = iolist_to_binary(re:replace("abcd","a(?=b(?i)c)\\w\\wd","&&alFf&sPxC",[global])),
-?line <<"hNuQEFvcSEabCdQTlwEabCd">> = iolist_to_binary(re:replace("abCd","a(?=b(?i)c)\\w\\wd","hNuQEFvcSE\\1&QTlwE&",[])),
-?line <<"hNuQEFvcSEabCdQTlwEabCd">> = iolist_to_binary(re:replace("abCd","a(?=b(?i)c)\\w\\wd","hNuQEFvcSE\\1&QTlwE&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?=b(?i)c)\\w\\wd","YLT",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?=b(?i)c)\\w\\wd","YLT",[global])),
-?line <<"aBCd">> = iolist_to_binary(re:replace("aBCd","a(?=b(?i)c)\\w\\wd","u",[])),
-?line <<"aBCd">> = iolist_to_binary(re:replace("aBCd","a(?=b(?i)c)\\w\\wd","u",[global])),
-?line <<"abcD">> = iolist_to_binary(re:replace("abcD","a(?=b(?i)c)\\w\\wd","PIaL\\1rCHujWQjtBluw",[])),
-?line <<"abcD">> = iolist_to_binary(re:replace("abcD","a(?=b(?i)c)\\w\\wd","PIaL\\1rCHujWQjtBluw",[global])),
-?line <<"JklClgvcUHdcbpmore than million">> = iolist_to_binary(re:replace("more than million","(?s-i:more.*than).*million","JklCl\\1gvc\\1UHdcbp&",[caseless])),
-?line <<"JklClgvcUHdcbpmore than million">> = iolist_to_binary(re:replace("more than million","(?s-i:more.*than).*million","JklCl\\1gvc\\1UHdcbp&",[caseless,
- global])),
-?line <<"RaiCEcYVVcTj">> = iolist_to_binary(re:replace("more than MILLION","(?s-i:more.*than).*million","R\\1\\1\\1aiCEcYVVcTj",[caseless])),
-?line <<"RaiCEcYVVcTj">> = iolist_to_binary(re:replace("more than MILLION","(?s-i:more.*than).*million","R\\1\\1\\1aiCEcYVVcTj",[caseless,
- global])),
-?line <<"AGtSe">> = iolist_to_binary(re:replace("more
- than Million","(?s-i:more.*than).*million","AGtSe",[caseless])),
-?line <<"AGtSe">> = iolist_to_binary(re:replace("more
- than Million","(?s-i:more.*than).*million","AGtSe",[caseless,global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s-i:more.*than).*million","vIAbYe&Vw\\1&VD",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s-i:more.*than).*million","vIAbYe&Vw\\1&VD",[caseless,
- global])),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?s-i:more.*than).*million","LhBYPjwD\\1kJ\\1",[caseless])),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?s-i:more.*than).*million","LhBYPjwD\\1kJ\\1",[caseless,
- global])),
-?line <<"more
+zzz","\\Aabc\\z","\\1AYG&TDth",[multiline,global])),
+ <<"1D">> = iolist_to_binary(re:replace("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+","D",[])),
+ <<"1D">> = iolist_to_binary(re:replace("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+","D",[global])),
+ <<"1.875Vkl.875egB.875000282cg">> = iolist_to_binary(re:replace("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+","\\1Vkl\\1egB&cg",[])),
+ <<"1.875Vkl.875egB.875000282cg">> = iolist_to_binary(re:replace("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+","\\1Vkl\\1egB&cg",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+","d&&VkB&QYebMC",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+","d&&VkB&QYebMC",[global])),
+ <<"1.235">> = iolist_to_binary(re:replace("1.235","(?>(\\.\\d\\d[1-9]?))\\d+","i\\1S\\1\\1&Yq&Pg&J&\\1",[])),
+ <<"1.235">> = iolist_to_binary(re:replace("1.235","(?>(\\.\\d\\d[1-9]?))\\d+","i\\1S\\1\\1&Yq&Pg&J&\\1",[global])),
+ <<"cjqYdkkpartyparty">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$","cjqYdkk\\1\\1",[])),
+ <<"cjqYdkkpartyparty">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$","cjqYdkk\\1\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((?>\\w+)|(?>\\s+))*$","BK",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((?>\\w+)|(?>\\s+))*$","BK",[global])),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$","sakHEC\\1tyC",[])),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$","sakHEC\\1tyC",[global])),
+ <<"a12345ax12345a">> = iolist_to_binary(re:replace("12345a","(\\d+)(\\w)","a&x&",[])),
+ <<"a12345ax12345a">> = iolist_to_binary(re:replace("12345a","(\\d+)(\\w)","a&x&",[global])),
+ <<"12345Mx1234LDmSq+">> = iolist_to_binary(re:replace("12345+","(\\d+)(\\w)","&Mx\\1LDmSq",[])),
+ <<"12345Mx1234LDmSq+">> = iolist_to_binary(re:replace("12345+","(\\d+)(\\w)","&Mx\\1LDmSq",[global])),
+ <<"kx12345GkJIBKkR12345aIDW12345ar">> = iolist_to_binary(re:replace("12345a","((?>\\d+))(\\w)","kx\\1GkJIBKkR&IDW&r",[])),
+ <<"kx12345GkJIBKkR12345aIDW12345ar">> = iolist_to_binary(re:replace("12345a","((?>\\d+))(\\w)","kx\\1GkJIBKkR&IDW&r",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?>\\d+))(\\w)","AFie\\1JMiAGf&BhuHi\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?>\\d+))(\\w)","AFie\\1JMiAGf&BhuHi\\1",[global])),
+ <<"12345+">> = iolist_to_binary(re:replace("12345+","((?>\\d+))(\\w)","l&&bFVdpjaGHV",[])),
+ <<"12345+">> = iolist_to_binary(re:replace("12345+","((?>\\d+))(\\w)","l&&bFVdpjaGHV",[global])),
+ <<"EqHtaaabaaabaaabSwdBiGUaaab">> = iolist_to_binary(re:replace("aaab","(?>a+)b","EqHt&&&SwdBiGU&",[])),
+ <<"EqHtaaabaaabaaabSwdBiGUaaab">> = iolist_to_binary(re:replace("aaab","(?>a+)b","EqHt&&&SwdBiGU&",[global])),
+ <<"SfjgLalqtcaaabaaablpXe">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","SfjgLalqtc\\1&lpXe",[])),
+ <<"SfjgLalqtcaaabaaablpXe">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","SfjgLalqtc\\1&lpXe",[global])),
+ ok.
+run12() ->
+ <<"uUMJaaabSIfpB">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","uUMJ&SIfpB",[])),
+ <<"uUMJaaabSIfpB">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","uUMJ&SIfpB",[global])),
+ <<"aaaYgHODtKiOcNErSSbbbccc">> = iolist_to_binary(re:replace("aaabbbccc","(?>b)+","YgHODtKiOcNErSS&\\1",[])),
+ <<"aaaYgHODtKiOcNErSSbbbccc">> = iolist_to_binary(re:replace("aaabbbccc","(?>b)+","YgHODtKiOcNErSS&\\1",[global])),
+ <<"oaaabbbbcaaabbbbcEpdElkPiPeaeLnncccd">> = iolist_to_binary(re:replace("aaabbbbccccd","(?>a+|b+|c+)*c","o\\1&&EpdEl\\1kPiPeaeLnn",[])),
+ <<"oaaabbbbcaaabbbbcEpdElkPiPeaeLnnoccEpdElkPiPeaeLnnoccEpdElkPiPeaeLnnoccEpdElkPiPeaeLnnd">> = iolist_to_binary(re:replace("aaabbbbccccd","(?>a+|b+|c+)*c","o\\1&&EpdEl\\1kPiPeaeLnn",[global])),
+ <<"((HxYTsih">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","HxYTsih",[])),
+ <<"((HxYTsih">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","HxYTsih",[global])),
+ <<"iJnuXdUjqgsabcM(abc)OUgSEW">> = iolist_to_binary(re:replace("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","iJnuXdUjqgs\\1M&OUgSEW",[])),
+ <<"iJnuXdUjqgsabcM(abc)OUgSEW">> = iolist_to_binary(re:replace("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","iJnuXdUjqgs\\1M&OUgSEW",[global])),
+ <<"oxyzdq">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","o\\1dq",[])),
+ <<"oxyzdq">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)","o\\1dq",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)","RViX",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)","RViX",[global])),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)","H",[])),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)","H",[global])),
+ <<"tbhUMBhabLFA">> = iolist_to_binary(re:replace("ab","a(?-i)b","tbhUMBh&\\1LFA",[caseless])),
+ <<"tbhUMBhabLFA">> = iolist_to_binary(re:replace("ab","a(?-i)b","tbhUMBh&\\1LFA",[caseless,
+ global])),
+ <<"QUAETVEmTTESUWK">> = iolist_to_binary(re:replace("Ab","a(?-i)b","QUAETVEmTT\\1\\1ESUWK",[caseless])),
+ <<"QUAETVEmTTESUWK">> = iolist_to_binary(re:replace("Ab","a(?-i)b","QUAETVEmTT\\1\\1ESUWK",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?-i)b","\\1UHB",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?-i)b","\\1UHB",[caseless,
+ global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","a(?-i)b","\\1\\1tHVtVAphgcPH",[caseless])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","a(?-i)b","\\1\\1tHVtVAphgcPH",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","a(?-i)b","EHcIhNYa\\1KSgqWOK",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","a(?-i)b","EHcIhNYa\\1KSgqWOK",[caseless,
+ global])),
+ <<"FILLIygQ">> = iolist_to_binary(re:replace("a bcd e","(a (?x)b c)d e","FILLIygQ",[])),
+ <<"FILLIygQ">> = iolist_to_binary(re:replace("a bcd e","(a (?x)b c)d e","FILLIygQ",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a (?x)b c)d e","wJGN&cKBOuESq\\1&Wj",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a (?x)b c)d e","wJGN&cKBOuESq\\1&Wj",[global])),
+ <<"a b cd e">> = iolist_to_binary(re:replace("a b cd e","(a (?x)b c)d e","A\\1AwoRg&BJXQG",[])),
+ <<"a b cd e">> = iolist_to_binary(re:replace("a b cd e","(a (?x)b c)d e","A\\1AwoRg&BJXQG",[global])),
+ <<"abcd e">> = iolist_to_binary(re:replace("abcd e","(a (?x)b c)d e","u",[])),
+ <<"abcd e">> = iolist_to_binary(re:replace("abcd e","(a (?x)b c)d e","u",[global])),
+ <<"a bcde">> = iolist_to_binary(re:replace("a bcde","(a (?x)b c)d e","oNi\\1yapjj\\1GmPvu\\1Y\\1qv",[])),
+ <<"a bcde">> = iolist_to_binary(re:replace("a bcde","(a (?x)b c)d e","oNi\\1yapjj\\1GmPvu\\1Y\\1qv",[global])),
+ <<"Aa bcde fa bcde faa bcde fEL">> = iolist_to_binary(re:replace("a bcde f","(a b(?x)c d (?-x)e f)","A&&a&EL",[])),
+ <<"Aa bcde fa bcde faa bcde fEL">> = iolist_to_binary(re:replace("a bcde f","(a b(?x)c d (?-x)e f)","A&&a&EL",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a b(?x)c d (?-x)e f)","tNNP\\1V&C",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a b(?x)c d (?-x)e f)","tNNP\\1V&C",[global])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","(a b(?x)c d (?-x)e f)","ty&TPg&J\\1hrKvQIX\\1",[])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","(a b(?x)c d (?-x)e f)","ty&TPg&J\\1hrKvQIX\\1",[global])),
+ <<"Bfe">> = iolist_to_binary(re:replace("abc","(a(?i)b)c","Bfe",[])),
+ <<"Bfe">> = iolist_to_binary(re:replace("abc","(a(?i)b)c","Bfe",[global])),
+ <<"aBaBeoqaBaBdaIDJFJSKhel">> = iolist_to_binary(re:replace("aBc","(a(?i)b)c","\\1\\1eoq\\1\\1daIDJFJSKhel",[])),
+ <<"aBaBeoqaBaBdaIDJFJSKhel">> = iolist_to_binary(re:replace("aBc","(a(?i)b)c","\\1\\1eoq\\1\\1daIDJFJSKhel",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)b)c","RRCuLD&CCSP&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)b)c","RRCuLD&CCSP&",[global])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","(a(?i)b)c","&YVGhj",[])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","(a(?i)b)c","&YVGhj",[global])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","(a(?i)b)c","&\\1ABy\\1Tud",[])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","(a(?i)b)c","&\\1ABy\\1Tud",[global])),
+ <<"Abc">> = iolist_to_binary(re:replace("Abc","(a(?i)b)c","vHc&EssOdEtsm",[])),
+ <<"Abc">> = iolist_to_binary(re:replace("Abc","(a(?i)b)c","vHc&EssOdEtsm",[global])),
+ <<"ABc">> = iolist_to_binary(re:replace("ABc","(a(?i)b)c","&&O",[])),
+ <<"ABc">> = iolist_to_binary(re:replace("ABc","(a(?i)b)c","&&O",[global])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","(a(?i)b)c","&&&G\\1GLMkRej\\1y\\1aOQ",[])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","(a(?i)b)c","&&&G\\1GLMkRej\\1y\\1aOQ",[global])),
+ <<"AbC">> = iolist_to_binary(re:replace("AbC","(a(?i)b)c","ajN\\1emNFkTh&UCTlp&Y",[])),
+ <<"AbC">> = iolist_to_binary(re:replace("AbC","(a(?i)b)c","ajN\\1emNFkTh&UCTlp&Y",[global])),
+ <<"fabcabcccGlcVpJl">> = iolist_to_binary(re:replace("abc","a(?i:b)c","f&&ccGlcVpJl",[])),
+ <<"fabcabcccGlcVpJl">> = iolist_to_binary(re:replace("abc","a(?i:b)c","f&&ccGlcVpJl",[global])),
+ <<"NeHDaBcCVyaBcpFA">> = iolist_to_binary(re:replace("aBc","a(?i:b)c","Ne\\1\\1\\1HD&C\\1Vy&pFA",[])),
+ <<"NeHDaBcCVyaBcpFA">> = iolist_to_binary(re:replace("aBc","a(?i:b)c","Ne\\1\\1\\1HD&C\\1Vy&pFA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)c","Sqq",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)c","Sqq",[global])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","a(?i:b)c","&FRMp\\1nIrrC\\1IVSckPvd",[])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","a(?i:b)c","&FRMp\\1nIrrC\\1IVSckPvd",[global])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","a(?i:b)c","x\\1WM&dj&&KIBo",[])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","a(?i:b)c","x\\1WM&dj&&KIBo",[global])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)c","XiKEHtEtj",[])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)c","XiKEHtEtj",[global])),
+ <<"SjNSaBcGWaBcwcaBcTf">> = iolist_to_binary(re:replace("aBc","a(?i:b)*c","\\1\\1SjNS&GW&wc&Tf",[])),
+ <<"SjNSaBcGWaBcwcaBcTf">> = iolist_to_binary(re:replace("aBc","a(?i:b)*c","\\1\\1SjNS&GW&wc&Tf",[global])),
+ <<"rOaBBckjJDolGaBBcie">> = iolist_to_binary(re:replace("aBBc","a(?i:b)*c","rO&kjJDolG&\\1ie",[])),
+ <<"rOaBBckjJDolGaBBcie">> = iolist_to_binary(re:replace("aBBc","a(?i:b)*c","rO&kjJDolG&\\1ie",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)*c","rnHfd\\1uJBJn",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?i:b)*c","rnHfd\\1uJBJn",[global])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)*c","T",[])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","a(?i:b)*c","T",[global])),
+ <<"aBBC">> = iolist_to_binary(re:replace("aBBC","a(?i:b)*c","qC&IV\\1WPwD&&raPOEJG",[])),
+ <<"aBBC">> = iolist_to_binary(re:replace("aBBC","a(?i:b)*c","qC&IV\\1WPwD&&raPOEJG",[global])),
+ <<"fxbDabcdcebhuXknd">> = iolist_to_binary(re:replace("abcd","a(?=b(?i)c)\\w\\wd","fxbD&cebhuX\\1knd",[])),
+ <<"fxbDabcdcebhuXknd">> = iolist_to_binary(re:replace("abcd","a(?=b(?i)c)\\w\\wd","fxbD&cebhuX\\1knd",[global])),
+ <<"hmNjfiwabCdOns">> = iolist_to_binary(re:replace("abCd","a(?=b(?i)c)\\w\\wd","hmN\\1jfiw&On\\1s",[])),
+ <<"hmNjfiwabCdOns">> = iolist_to_binary(re:replace("abCd","a(?=b(?i)c)\\w\\wd","hmN\\1jfiw&On\\1s",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?=b(?i)c)\\w\\wd","l",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?=b(?i)c)\\w\\wd","l",[global])),
+ <<"aBCd">> = iolist_to_binary(re:replace("aBCd","a(?=b(?i)c)\\w\\wd","QVfGTQBraI&PoV&&B\\1B",[])),
+ <<"aBCd">> = iolist_to_binary(re:replace("aBCd","a(?=b(?i)c)\\w\\wd","QVfGTQBraI&PoV&&B\\1B",[global])),
+ <<"abcD">> = iolist_to_binary(re:replace("abcD","a(?=b(?i)c)\\w\\wd","WTVxdU\\1Ql&Ori\\1DCqn&",[])),
+ <<"abcD">> = iolist_to_binary(re:replace("abcD","a(?=b(?i)c)\\w\\wd","WTVxdU\\1Ql&Ori\\1DCqn&",[global])),
+ <<"yHdfkVmore than millionmore than millione">> = iolist_to_binary(re:replace("more than million","(?s-i:more.*than).*million","yHd\\1fkV&&e\\1",[caseless])),
+ <<"yHdfkVmore than millionmore than millione">> = iolist_to_binary(re:replace("more than million","(?s-i:more.*than).*million","yHd\\1fkV&&e\\1",[caseless,
+ global])),
+ <<"mQsFkPLr">> = iolist_to_binary(re:replace("more than MILLION","(?s-i:more.*than).*million","mQsFkPLr",[caseless])),
+ <<"mQsFkPLr">> = iolist_to_binary(re:replace("more than MILLION","(?s-i:more.*than).*million","mQsFkPLr",[caseless,
+ global])),
+ <<"mvDmore
+ than MillionmVTJEmore
+ than MillionTJNmore
+ than MillionLwu">> = iolist_to_binary(re:replace("more
+ than Million","(?s-i:more.*than).*million","mvD&mVTJE&TJN&Lwu",[caseless])),
+ <<"mvDmore
+ than MillionmVTJEmore
+ than MillionTJNmore
+ than MillionLwu">> = iolist_to_binary(re:replace("more
+ than Million","(?s-i:more.*than).*million","mvD&mVTJE&TJN&Lwu",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s-i:more.*than).*million","t\\1vYtKJq&frCR\\1",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?s-i:more.*than).*million","t\\1vYtKJq&frCR\\1",[caseless,
+ global])),
+ <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?s-i:more.*than).*million","\\1gn&G\\1&",[caseless])),
+ <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?s-i:more.*than).*million","\\1gn&G\\1&",[caseless,
+ global])),
+ <<"more
than
million">> = iolist_to_binary(re:replace("more
than
- million","(?s-i:more.*than).*million","SSp\\1ttOwEGO&H",[caseless])),
-?line <<"more
+ million","(?s-i:more.*than).*million","WmlNcmK\\1\\1DMpX\\1WToOHF",[caseless])),
+ <<"more
than
million">> = iolist_to_binary(re:replace("more
than
- million","(?s-i:more.*than).*million","SSp\\1ttOwEGO&H",[caseless,
- global])),
-?line <<"dmore than millionhFexWTaTmclBHK">> = iolist_to_binary(re:replace("more than million","(?:(?s-i)more.*than).*million","d&hFexWTaT\\1\\1mc\\1\\1lBHK",[caseless])),
-?line <<"dmore than millionhFexWTaTmclBHK">> = iolist_to_binary(re:replace("more than million","(?:(?s-i)more.*than).*million","d&hFexWTaT\\1\\1mc\\1\\1lBHK",[caseless,
- global])),
-?line <<"wcVAikDmore than MILLIONFsmore than MILLIONIceKiuDm">> = iolist_to_binary(re:replace("more than MILLION","(?:(?s-i)more.*than).*million","wcVAikD&Fs&Ice\\1KiuDm",[caseless])),
-?line <<"wcVAikDmore than MILLIONFsmore than MILLIONIceKiuDm">> = iolist_to_binary(re:replace("more than MILLION","(?:(?s-i)more.*than).*million","wcVAikD&Fs&Ice\\1KiuDm",[caseless,
- global])),
-?line <<"BMxnsX">> = iolist_to_binary(re:replace("more
- than Million","(?:(?s-i)more.*than).*million","BMx\\1nsX",[caseless])),
-?line <<"BMxnsX">> = iolist_to_binary(re:replace("more
- than Million","(?:(?s-i)more.*than).*million","BMx\\1nsX",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?s-i)more.*than).*million","e\\1KeC\\1LrMA",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?s-i)more.*than).*million","e\\1KeC\\1LrMA",[caseless,
- global])),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?:(?s-i)more.*than).*million","Oo&U&\\1O\\1royLyh\\1Uj\\1&e",[caseless])),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?:(?s-i)more.*than).*million","Oo&U&\\1O\\1royLyh\\1Uj\\1&e",[caseless,
- global])),
-?line <<"more
+ million","(?s-i:more.*than).*million","WmlNcmK\\1\\1DMpX\\1WToOHF",[caseless,
+ global])),
+ <<"psmore than millionTuKupIvfmRjB">> = iolist_to_binary(re:replace("more than million","(?:(?s-i)more.*than).*million","ps&T\\1uKupIvfmRjB",[caseless])),
+ <<"psmore than millionTuKupIvfmRjB">> = iolist_to_binary(re:replace("more than million","(?:(?s-i)more.*than).*million","ps&T\\1uKupIvfmRjB",[caseless,
+ global])),
+ <<"IhKcRCpQge">> = iolist_to_binary(re:replace("more than MILLION","(?:(?s-i)more.*than).*million","I\\1\\1hKcRCpQg\\1e",[caseless])),
+ <<"IhKcRCpQge">> = iolist_to_binary(re:replace("more than MILLION","(?:(?s-i)more.*than).*million","I\\1\\1hKcRCpQg\\1e",[caseless,
+ global])),
+ <<"more
+ than MillionOISUnAOTGvtRakU">> = iolist_to_binary(re:replace("more
+ than Million","(?:(?s-i)more.*than).*million","&OISU\\1nAOTGvtRakU\\1",[caseless])),
+ <<"more
+ than MillionOISUnAOTGvtRakU">> = iolist_to_binary(re:replace("more
+ than Million","(?:(?s-i)more.*than).*million","&OISU\\1nAOTGvtRakU\\1",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?s-i)more.*than).*million","TNips\\1&J\\1mqnbuyC",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?s-i)more.*than).*million","TNips\\1&J\\1mqnbuyC",[caseless,
+ global])),
+ <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?:(?s-i)more.*than).*million","\\1qCci&VKLJ&QtwPOr",[caseless])),
+ <<"MORE THAN MILLION">> = iolist_to_binary(re:replace("MORE THAN MILLION","(?:(?s-i)more.*than).*million","\\1qCci&VKLJ&QtwPOr",[caseless,
+ global])),
+ <<"more
than
million">> = iolist_to_binary(re:replace("more
than
- million","(?:(?s-i)more.*than).*million","rsd\\1UhwpU\\1&S",[caseless])),
-?line <<"more
+ million","(?:(?s-i)more.*than).*million","N",[caseless])),
+ <<"more
than
million">> = iolist_to_binary(re:replace("more
than
- million","(?:(?s-i)more.*than).*million","rsd\\1UhwpU\\1&S",[caseless,
- global])),
-?line <<"rTdtycUabcoabcVaVEt">> = iolist_to_binary(re:replace("abc","(?>a(?i)b+)+c","r\\1\\1T\\1dtycU&o&V\\1aV\\1Et",[])),
-?line <<"rTdtycUabcoabcVaVEt">> = iolist_to_binary(re:replace("abc","(?>a(?i)b+)+c","r\\1\\1T\\1dtycU&o&V\\1aV\\1Et",[global])),
-?line <<"geFTAcqhWJc">> = iolist_to_binary(re:replace("aBbc","(?>a(?i)b+)+c","geFTAc\\1qhWJ\\1c",[])),
-?line <<"geFTAcqhWJc">> = iolist_to_binary(re:replace("aBbc","(?>a(?i)b+)+c","geFTAc\\1qhWJ\\1c",[global])),
-?line <<"lHStMaBBcnaBBcjCaBBcgdfm">> = iolist_to_binary(re:replace("aBBc","(?>a(?i)b+)+c","lHStM&n&jC&g\\1df\\1m",[])),
-?line <<"lHStMaBBcnaBBcjCaBBcgdfm">> = iolist_to_binary(re:replace("aBBc","(?>a(?i)b+)+c","lHStM&n&jC&g\\1df\\1m",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>a(?i)b+)+c","U\\1pOiN&FCXl",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>a(?i)b+)+c","U\\1pOiN&FCXl",[global])),
-?line <<"Abc">> = iolist_to_binary(re:replace("Abc","(?>a(?i)b+)+c","h",[])),
-?line <<"Abc">> = iolist_to_binary(re:replace("Abc","(?>a(?i)b+)+c","h",[global])),
-?line <<"abAb">> = iolist_to_binary(re:replace("abAb","(?>a(?i)b+)+c","f\\1\\1DwX\\1Y&y\\1dgv&A\\1",[])),
-?line <<"abAb">> = iolist_to_binary(re:replace("abAb","(?>a(?i)b+)+c","f\\1\\1DwX\\1Y&y\\1dgv&A\\1",[global])),
-?line <<"abbC">> = iolist_to_binary(re:replace("abbC","(?>a(?i)b+)+c","&\\1Gd&r\\1shP",[])),
-?line <<"abbC">> = iolist_to_binary(re:replace("abbC","(?>a(?i)b+)+c","&\\1Gd&r\\1shP",[global])),
-?line <<"VIaLabcabcCabcyvwsI">> = iolist_to_binary(re:replace("abc","(?=a(?i)b)\\w\\wc","VIaL&&C&yvwsI",[])),
-?line <<"VIaLabcabcCabcyvwsI">> = iolist_to_binary(re:replace("abc","(?=a(?i)b)\\w\\wc","VIaL&&C&yvwsI",[global])),
-?line <<"gaBcaBc">> = iolist_to_binary(re:replace("aBc","(?=a(?i)b)\\w\\wc","g&&",[])),
-?line <<"gaBcaBc">> = iolist_to_binary(re:replace("aBc","(?=a(?i)b)\\w\\wc","g&&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=a(?i)b)\\w\\wc","RMcFr&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=a(?i)b)\\w\\wc","RMcFr&",[global])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?=a(?i)b)\\w\\wc","y\\1&kD&os\\1E",[])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?=a(?i)b)\\w\\wc","y\\1&kD&os\\1E",[global])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","(?=a(?i)b)\\w\\wc","ms\\1m",[])),
-?line <<"abC">> = iolist_to_binary(re:replace("abC","(?=a(?i)b)\\w\\wc","ms\\1m",[global])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","(?=a(?i)b)\\w\\wc","lD&&vcs",[])),
-?line <<"aBC">> = iolist_to_binary(re:replace("aBC","(?=a(?i)b)\\w\\wc","lD&&vcs",[global])),
-?line <<"abxqXfVViuPuvfMxxcvcj">> = iolist_to_binary(re:replace("abxxc","(?<=a(?i)b)(\\w\\w)c","xqXfVViuPuvfM&vcj",[])),
-?line <<"abxqXfVViuPuvfMxxcvcj">> = iolist_to_binary(re:replace("abxxc","(?<=a(?i)b)(\\w\\w)c","xqXfVViuPuvfM&vcj",[global])),
-?line <<"aBXoxxcXtiuxxXqWYfixxKxxcxxUs">> = iolist_to_binary(re:replace("aBxxc","(?<=a(?i)b)(\\w\\w)c","Xo&Xtiu\\1XqWYfi\\1K&\\1Us",[])),
-?line <<"aBXoxxcXtiuxxXqWYfixxKxxcxxUs">> = iolist_to_binary(re:replace("aBxxc","(?<=a(?i)b)(\\w\\w)c","Xo&Xtiu\\1XqWYfi\\1K&\\1Us",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a(?i)b)(\\w\\w)c","cGWOK&O&A\\1Xq&&aF\\1G",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a(?i)b)(\\w\\w)c","cGWOK&O&A\\1Xq&&aF\\1G",[global])),
-?line <<"Abxxc">> = iolist_to_binary(re:replace("Abxxc","(?<=a(?i)b)(\\w\\w)c","uosfXS&Drr&Nsg",[])),
-?line <<"Abxxc">> = iolist_to_binary(re:replace("Abxxc","(?<=a(?i)b)(\\w\\w)c","uosfXS&Drr&Nsg",[global])),
-?line <<"ABxxc">> = iolist_to_binary(re:replace("ABxxc","(?<=a(?i)b)(\\w\\w)c","mKjv&im",[])),
-?line <<"ABxxc">> = iolist_to_binary(re:replace("ABxxc","(?<=a(?i)b)(\\w\\w)c","mKjv&im",[global])),
-?line <<"abxxC">> = iolist_to_binary(re:replace("abxxC","(?<=a(?i)b)(\\w\\w)c","ferUg\\1J\\1T\\1kWcDAY\\1jM",[])),
-?line <<"abxxC">> = iolist_to_binary(re:replace("abxxC","(?<=a(?i)b)(\\w\\w)c","ferUg\\1J\\1T\\1kWcDAY\\1jM",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("aA","(?:(a)|b)(?(1)A|B)","\\1",[])),
-?line <<"a">> = iolist_to_binary(re:replace("aA","(?:(a)|b)(?(1)A|B)","\\1",[global])),
-?line <<"YdvbBbBsFnnbBKbB">> = iolist_to_binary(re:replace("bB","(?:(a)|b)(?(1)A|B)","Y\\1\\1dv&&\\1sFnn&K&",[])),
-?line <<"YdvbBbBsFnnbBKbB">> = iolist_to_binary(re:replace("bB","(?:(a)|b)(?(1)A|B)","Y\\1\\1dv&&\\1sFnn&K&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(a)|b)(?(1)A|B)","\\1\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(a)|b)(?(1)A|B)","\\1\\1",[global])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?:(a)|b)(?(1)A|B)","\\1To",[])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?:(a)|b)(?(1)A|B)","\\1To",[global])),
-?line <<"bA">> = iolist_to_binary(re:replace("bA","(?:(a)|b)(?(1)A|B)","K\\1UMD",[])),
-?line <<"bA">> = iolist_to_binary(re:replace("bA","(?:(a)|b)(?(1)A|B)","K\\1UMD",[global])),
-?line <<"mLbykSwT">> = iolist_to_binary(re:replace("aa","^(a)?(?(1)a|b)+$","mLbykSwT",[])),
-?line <<"mLbykSwT">> = iolist_to_binary(re:replace("aa","^(a)?(?(1)a|b)+$","mLbykSwT",[global])),
-?line <<"br">> = iolist_to_binary(re:replace("b","^(a)?(?(1)a|b)+$","&r",[])),
-?line <<"br">> = iolist_to_binary(re:replace("b","^(a)?(?(1)a|b)+$","&r",[global])),
-?line <<"yaAboE">> = iolist_to_binary(re:replace("bb","^(a)?(?(1)a|b)+$","yaAb\\1o\\1E",[])),
-?line <<"yaAboE">> = iolist_to_binary(re:replace("bb","^(a)?(?(1)a|b)+$","yaAb\\1o\\1E",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","QkLpQarHEu\\1Fi",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","QkLpQarHEu\\1Fi",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a)?(?(1)a|b)+$","U",[])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","^(a)?(?(1)a|b)+$","U",[global])),
-?line <<"MoTyD">> = iolist_to_binary(re:replace("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$","M\\1oTyD",[])),
-?line <<"MoTyD">> = iolist_to_binary(re:replace("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$","M\\1oTyD",[global])),
-?line <<"kawc12B">> = iolist_to_binary(re:replace("12","^(?(?=abc)\\w{3}:|\\d\\d)$","k\\1awc&B\\1",[])),
-?line <<"kawc12B">> = iolist_to_binary(re:replace("12","^(?(?=abc)\\w{3}:|\\d\\d)$","k\\1awc&B\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$","TAqA",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$","TAqA",[global])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^(?(?=abc)\\w{3}:|\\d\\d)$","WlKxg",[])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^(?(?=abc)\\w{3}:|\\d\\d)$","WlKxg",[global])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$","O",[])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$","O",[global])),
-?line <<"kNqQd">> = iolist_to_binary(re:replace("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$","kNq\\1Q\\1d",[])),
-?line <<"kNqQd">> = iolist_to_binary(re:replace("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$","kNq\\1Q\\1d",[global])),
-?line <<"Cr">> = iolist_to_binary(re:replace("12","^(?(?!abc)\\d\\d|\\w{3}:)$","\\1C\\1r",[])),
-?line <<"Cr">> = iolist_to_binary(re:replace("12","^(?(?!abc)\\d\\d|\\w{3}:)$","\\1C\\1r",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$","&\\1\\1RHBBR",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$","&\\1\\1RHBBR",[global])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^(?(?!abc)\\d\\d|\\w{3}:)$","P",[])),
-?line <<"123">> = iolist_to_binary(re:replace("123","^(?(?!abc)\\d\\d|\\w{3}:)$","P",[global])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$","&awfl",[])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$","&awfl",[global])),
-?line <<"fooHSXSjJapIqY">> = iolist_to_binary(re:replace("foobar","(?(?<=foo)bar|cat)","HSXSjJ\\1apIqY",[])),
-?line <<"fooHSXSjJapIqY">> = iolist_to_binary(re:replace("foobar","(?(?<=foo)bar|cat)","HSXSjJ\\1apIqY",[global])),
-?line <<"IouuQfOcatNN">> = iolist_to_binary(re:replace("cat","(?(?<=foo)bar|cat)","Iouu\\1QfO&NN\\1",[])),
-?line <<"IouuQfOcatNN">> = iolist_to_binary(re:replace("cat","(?(?<=foo)bar|cat)","Iouu\\1QfO&NN\\1",[global])),
-?line <<"fcatxAWTu">> = iolist_to_binary(re:replace("fcat","(?(?<=foo)bar|cat)","&\\1xAWTu",[])),
-?line <<"fcatxAWTu">> = iolist_to_binary(re:replace("fcat","(?(?<=foo)bar|cat)","&\\1xAWTu",[global])),
-?line <<"fodYcNREMccatAcatyvscatidk">> = iolist_to_binary(re:replace("focat","(?(?<=foo)bar|cat)","dYc\\1N\\1REMc&A&yvs&idk",[])),
-?line <<"fodYcNREMccatAcatyvscatidk">> = iolist_to_binary(re:replace("focat","(?(?<=foo)bar|cat)","dYc\\1N\\1REMc&A&yvs&idk",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<=foo)bar|cat)","FmDOEt&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<=foo)bar|cat)","FmDOEt&",[global])),
-?line <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<=foo)bar|cat)","Jj&OFdGEDut\\1HjNDH",[])),
-?line <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<=foo)bar|cat)","Jj&OFdGEDut\\1HjNDH",[global])),
-?line <<"fooEGbarEwDYbarCNxYJbarbD">> = iolist_to_binary(re:replace("foobar","(?(?<!foo)cat|bar)","EG&Ew\\1DY&CN\\1xYJ&bD",[])),
-?line <<"fooEGbarEwDYbarCNxYJbarbD">> = iolist_to_binary(re:replace("foobar","(?(?<!foo)cat|bar)","EG&Ew\\1DY&CN\\1xYJ&bD",[global])),
-?line <<"jHKKpLcatBtkhMt">> = iolist_to_binary(re:replace("cat","(?(?<!foo)cat|bar)","jHKKpL&BtkhMt",[])),
-?line <<"jHKKpLcatBtkhMt">> = iolist_to_binary(re:replace("cat","(?(?<!foo)cat|bar)","jHKKpL&BtkhMt",[global])),
-?line <<"fiJOnynFk">> = iolist_to_binary(re:replace("fcat","(?(?<!foo)cat|bar)","iJ\\1O\\1ny\\1nFk",[])),
-?line <<"fiJOnynFk">> = iolist_to_binary(re:replace("fcat","(?(?<!foo)cat|bar)","iJ\\1O\\1ny\\1nFk",[global])),
-?line <<"foWCSvhChIBqicatcatLjMieK">> = iolist_to_binary(re:replace("focat","(?(?<!foo)cat|bar)","WCSvh\\1ChIBqi&&LjMieK",[])),
-?line <<"foWCSvhChIBqicatcatLjMieK">> = iolist_to_binary(re:replace("focat","(?(?<!foo)cat|bar)","WCSvh\\1ChIBqi&&LjMieK",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<!foo)cat|bar)","v&yn",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<!foo)cat|bar)","v&yn",[global])),
-?line <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<!foo)cat|bar)","\\1&\\1\\1&dvNYDwrfFA\\1&d",[])),
-?line <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<!foo)cat|bar)","\\1&\\1\\1&dvNYDwrfFA\\1&d",[global])),
-?line <<"TQKeRLoqn">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) |) ","T\\1\\1QK\\1e\\1RLoqn",[extended])),
-?line <<"TQKeRLoqn">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) |) ","T\\1\\1QK\\1e\\1RLoqn",[extended,
- global])),
-?line <<"Qd(ovEgf(pkOYCuPDq(R">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ","Qd\\1ovEgf\\1pkOYCuPDq\\1R",[extended])),
-?line <<"Qd(ovEgf(pkOYCuPDq(R">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ","Qd\\1ovEgf\\1pkOYCuPDq\\1R",[extended,
- global])),
-?line <<"Dmthe quick QWSbgBeLthe quick E(abcd) fox">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ","Dm\\1&QWSbgBeL&E",[extended])),
-?line <<"Dmthe quick QWSbgBeLthe quick EDm((abcd)QWSbgBeL(abcd)EDm foxQWSbgBeL foxE">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ","Dm\\1&QWSbgBeL&E",[extended,
- global])),
-?line <<"(Ld">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) |) ","Ld",[extended])),
-?line <<"(Ld">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) |) ","Ld",[extended,
- global])),
-?line <<"abcdiCLfuabcdkd">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) ) ","&iCLfu&kd",[extended])),
-?line <<"abcdiCLfuabcdkd">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) ) ","&iCLfu&kd",[extended,
- global])),
-?line <<"uXgnII((abcd)SMj">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ","uXgnII\\1&SMj",[extended])),
-?line <<"uXgnII((abcd)SMj">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ","uXgnII\\1&SMj",[extended,
- global])),
-?line <<"the quick the quick the quick xjaBhsFamkEL(abcd) fox">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ","&&&xjaBhsFa\\1mkEL\\1",[extended])),
-?line <<"the quick the quick the quick xjaBhsFamkEL(abcd)(abcd)(abcd)xjaBhsFa(mkEL( fox fox foxxjaBhsFamkEL">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ","&&&xjaBhsFa\\1mkEL\\1",[extended,
+ million","(?:(?s-i)more.*than).*million","N",[caseless,global])),
+ <<"dAgcabcrYrHG">> = iolist_to_binary(re:replace("abc","(?>a(?i)b+)+c","dAgc&rYrH\\1\\1G",[])),
+ <<"dAgcabcrYrHG">> = iolist_to_binary(re:replace("abc","(?>a(?i)b+)+c","dAgc&rYrH\\1\\1G",[global])),
+ <<"fXy">> = iolist_to_binary(re:replace("aBbc","(?>a(?i)b+)+c","fXy",[])),
+ <<"fXy">> = iolist_to_binary(re:replace("aBbc","(?>a(?i)b+)+c","fXy",[global])),
+ <<"y">> = iolist_to_binary(re:replace("aBBc","(?>a(?i)b+)+c","y",[])),
+ <<"y">> = iolist_to_binary(re:replace("aBBc","(?>a(?i)b+)+c","y",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>a(?i)b+)+c","riGTl\\1gCN&tFIx",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>a(?i)b+)+c","riGTl\\1gCN&tFIx",[global])),
+ <<"Abc">> = iolist_to_binary(re:replace("Abc","(?>a(?i)b+)+c","QnNFHC\\1\\1AJpJokFLyM",[])),
+ <<"Abc">> = iolist_to_binary(re:replace("Abc","(?>a(?i)b+)+c","QnNFHC\\1\\1AJpJokFLyM",[global])),
+ <<"abAb">> = iolist_to_binary(re:replace("abAb","(?>a(?i)b+)+c","yrdamBD",[])),
+ <<"abAb">> = iolist_to_binary(re:replace("abAb","(?>a(?i)b+)+c","yrdamBD",[global])),
+ <<"abbC">> = iolist_to_binary(re:replace("abbC","(?>a(?i)b+)+c","\\1&a&x",[])),
+ <<"abbC">> = iolist_to_binary(re:replace("abbC","(?>a(?i)b+)+c","\\1&a&x",[global])),
+ <<"WnabchdOabcXw">> = iolist_to_binary(re:replace("abc","(?=a(?i)b)\\w\\wc","Wn\\1\\1&hdO&Xw",[])),
+ <<"WnabchdOabcXw">> = iolist_to_binary(re:replace("abc","(?=a(?i)b)\\w\\wc","Wn\\1\\1&hdO&Xw",[global])),
+ <<"NUnsaGHpA">> = iolist_to_binary(re:replace("aBc","(?=a(?i)b)\\w\\wc","NUnsaGHp\\1A",[])),
+ <<"NUnsaGHpA">> = iolist_to_binary(re:replace("aBc","(?=a(?i)b)\\w\\wc","NUnsaGHp\\1A",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=a(?i)b)\\w\\wc","J",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?=a(?i)b)\\w\\wc","J",[global])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?=a(?i)b)\\w\\wc","rA\\1tmLWYJdpHtIJ\\1",[])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?=a(?i)b)\\w\\wc","rA\\1tmLWYJdpHtIJ\\1",[global])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","(?=a(?i)b)\\w\\wc","O",[])),
+ <<"abC">> = iolist_to_binary(re:replace("abC","(?=a(?i)b)\\w\\wc","O",[global])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","(?=a(?i)b)\\w\\wc","xrOeHr\\1Ws\\1FvkVpoU",[])),
+ <<"aBC">> = iolist_to_binary(re:replace("aBC","(?=a(?i)b)\\w\\wc","xrOeHr\\1Ws\\1FvkVpoU",[global])),
+ <<"abcFSPxxcxxctgbJkxxNdQS">> = iolist_to_binary(re:replace("abxxc","(?<=a(?i)b)(\\w\\w)c","cFSP&&tgbJk\\1NdQS",[])),
+ <<"abcFSPxxcxxctgbJkxxNdQS">> = iolist_to_binary(re:replace("abxxc","(?<=a(?i)b)(\\w\\w)c","cFSP&&tgbJk\\1NdQS",[global])),
+ <<"aBQNAt">> = iolist_to_binary(re:replace("aBxxc","(?<=a(?i)b)(\\w\\w)c","QNAt",[])),
+ <<"aBQNAt">> = iolist_to_binary(re:replace("aBxxc","(?<=a(?i)b)(\\w\\w)c","QNAt",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a(?i)b)(\\w\\w)c","inxwegNttyrc",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a(?i)b)(\\w\\w)c","inxwegNttyrc",[global])),
+ <<"Abxxc">> = iolist_to_binary(re:replace("Abxxc","(?<=a(?i)b)(\\w\\w)c","YUsRHD&",[])),
+ <<"Abxxc">> = iolist_to_binary(re:replace("Abxxc","(?<=a(?i)b)(\\w\\w)c","YUsRHD&",[global])),
+ <<"ABxxc">> = iolist_to_binary(re:replace("ABxxc","(?<=a(?i)b)(\\w\\w)c","CXJBefD\\1kemWbn&fyJ",[])),
+ <<"ABxxc">> = iolist_to_binary(re:replace("ABxxc","(?<=a(?i)b)(\\w\\w)c","CXJBefD\\1kemWbn&fyJ",[global])),
+ <<"abxxC">> = iolist_to_binary(re:replace("abxxC","(?<=a(?i)b)(\\w\\w)c","UjT\\1hGcc&\\1K",[])),
+ <<"abxxC">> = iolist_to_binary(re:replace("abxxC","(?<=a(?i)b)(\\w\\w)c","UjT\\1hGcc&\\1K",[global])),
+ <<"e">> = iolist_to_binary(re:replace("aA","(?:(a)|b)(?(1)A|B)","e",[])),
+ <<"e">> = iolist_to_binary(re:replace("aA","(?:(a)|b)(?(1)A|B)","e",[global])),
+ <<"NMcPpQyHaNfjCbBaD">> = iolist_to_binary(re:replace("bB","(?:(a)|b)(?(1)A|B)","\\1NMcPpQyHaNfjC&aD",[])),
+ <<"NMcPpQyHaNfjCbBaD">> = iolist_to_binary(re:replace("bB","(?:(a)|b)(?(1)A|B)","\\1NMcPpQyHaNfjC&aD",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(a)|b)(?(1)A|B)","\\1Q",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(a)|b)(?(1)A|B)","\\1Q",[global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?:(a)|b)(?(1)A|B)","&SMEo&XGCCInDGmiby",[])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?:(a)|b)(?(1)A|B)","&SMEo&XGCCInDGmiby",[global])),
+ <<"bA">> = iolist_to_binary(re:replace("bA","(?:(a)|b)(?(1)A|B)","UUW&\\1&SC\\1",[])),
+ <<"bA">> = iolist_to_binary(re:replace("bA","(?:(a)|b)(?(1)A|B)","UUW&\\1&SC\\1",[global])),
+ <<"FeSwwOaSaLaaSV">> = iolist_to_binary(re:replace("aa","^(a)?(?(1)a|b)+$","FeSwwO\\1S\\1L&SV",[])),
+ <<"FeSwwOaSaLaaSV">> = iolist_to_binary(re:replace("aa","^(a)?(?(1)a|b)+$","FeSwwO\\1S\\1L&SV",[global])),
+ <<"JTW">> = iolist_to_binary(re:replace("b","^(a)?(?(1)a|b)+$","JTW",[])),
+ <<"JTW">> = iolist_to_binary(re:replace("b","^(a)?(?(1)a|b)+$","JTW",[global])),
+ <<"rbbbbmbfbxJobbhlCHbbbbdR">> = iolist_to_binary(re:replace("bb","^(a)?(?(1)a|b)+$","r&&mbfbxJo&hlCH&&dR\\1",[])),
+ <<"rbbbbmbfbxJobbhlCHbbbbdR">> = iolist_to_binary(re:replace("bb","^(a)?(?(1)a|b)+$","r&&mbfbxJo&hlCH&&dR\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","RLV&s",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","RLV&s",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a)?(?(1)a|b)+$","QoxGv\\1Pa&\\1mowml",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","^(a)?(?(1)a|b)+$","QoxGv\\1Pa&\\1mowml",[global])),
+ <<"cfabc:abc:">> = iolist_to_binary(re:replace("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$","cf&&",[])),
+ <<"cfabc:abc:">> = iolist_to_binary(re:replace("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$","cf&&",[global])),
+ <<"IKeMxScgslGf">> = iolist_to_binary(re:replace("12","^(?(?=abc)\\w{3}:|\\d\\d)$","IKeMxScgsl\\1\\1Gf",[])),
+ <<"IKeMxScgslGf">> = iolist_to_binary(re:replace("12","^(?(?=abc)\\w{3}:|\\d\\d)$","IKeMxScgsl\\1\\1Gf",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$","cCGveJFFUHnS\\1S",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$","cCGveJFFUHnS\\1S",[global])),
+ <<"123">> = iolist_to_binary(re:replace("123","^(?(?=abc)\\w{3}:|\\d\\d)$","kudsG&Hdk",[])),
+ <<"123">> = iolist_to_binary(re:replace("123","^(?(?=abc)\\w{3}:|\\d\\d)$","kudsG&Hdk",[global])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$","&kyqj\\1U\\1\\1\\1",[])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$","&kyqj\\1U\\1\\1\\1",[global])),
+ ok.
+run13() ->
+ <<"yLejabc:ClvDam">> = iolist_to_binary(re:replace("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$","yLej&C\\1lvDa\\1m",[])),
+ <<"yLejabc:ClvDam">> = iolist_to_binary(re:replace("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$","yLej&C\\1lvDa\\1m",[global])),
+ <<"eH12Ase">> = iolist_to_binary(re:replace("12","^(?(?!abc)\\d\\d|\\w{3}:)$","e\\1H&A\\1s\\1\\1e",[])),
+ <<"eH12Ase">> = iolist_to_binary(re:replace("12","^(?(?!abc)\\d\\d|\\w{3}:)$","e\\1H&A\\1s\\1\\1e",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$","SMtlNLKd\\1Va",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$","SMtlNLKd\\1Va",[global])),
+ <<"123">> = iolist_to_binary(re:replace("123","^(?(?!abc)\\d\\d|\\w{3}:)$","VsMY&We",[])),
+ <<"123">> = iolist_to_binary(re:replace("123","^(?(?!abc)\\d\\d|\\w{3}:)$","VsMY&We",[global])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$","j&k\\1tUeAYRn",[])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$","j&k\\1tUeAYRn",[global])),
+ <<"fooS">> = iolist_to_binary(re:replace("foobar","(?(?<=foo)bar|cat)","S\\1",[])),
+ <<"fooS">> = iolist_to_binary(re:replace("foobar","(?(?<=foo)bar|cat)","S\\1",[global])),
+ <<"catdEUboccGWTaRjQo">> = iolist_to_binary(re:replace("cat","(?(?<=foo)bar|cat)","&dEU\\1boccGWTaRjQo\\1",[])),
+ <<"catdEUboccGWTaRjQo">> = iolist_to_binary(re:replace("cat","(?(?<=foo)bar|cat)","&dEU\\1boccGWTaRjQo\\1",[global])),
+ <<"fcatrspJwF">> = iolist_to_binary(re:replace("fcat","(?(?<=foo)bar|cat)","\\1&rs\\1pJwF",[])),
+ <<"fcatrspJwF">> = iolist_to_binary(re:replace("fcat","(?(?<=foo)bar|cat)","\\1&rs\\1pJwF",[global])),
+ <<"foncatePTv">> = iolist_to_binary(re:replace("focat","(?(?<=foo)bar|cat)","n&ePTv",[])),
+ <<"foncatePTv">> = iolist_to_binary(re:replace("focat","(?(?<=foo)bar|cat)","n&ePTv",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<=foo)bar|cat)","jI",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<=foo)bar|cat)","jI",[global])),
+ <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<=foo)bar|cat)","\\1qBlA\\1veXv",[])),
+ <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<=foo)bar|cat)","\\1qBlA\\1veXv",[global])),
+ <<"fooYHnkCeSOb">> = iolist_to_binary(re:replace("foobar","(?(?<!foo)cat|bar)","YHnkCeSOb",[])),
+ <<"fooYHnkCeSOb">> = iolist_to_binary(re:replace("foobar","(?(?<!foo)cat|bar)","YHnkCeSOb",[global])),
+ <<"catcatQAKgfdmvWBVj">> = iolist_to_binary(re:replace("cat","(?(?<!foo)cat|bar)","&&QAK\\1gfdmvWBVj",[])),
+ <<"catcatQAKgfdmvWBVj">> = iolist_to_binary(re:replace("cat","(?(?<!foo)cat|bar)","&&QAK\\1gfdmvWBVj",[global])),
+ <<"fPR">> = iolist_to_binary(re:replace("fcat","(?(?<!foo)cat|bar)","PR",[])),
+ <<"fPR">> = iolist_to_binary(re:replace("fcat","(?(?<!foo)cat|bar)","PR",[global])),
+ <<"fo">> = iolist_to_binary(re:replace("focat","(?(?<!foo)cat|bar)","\\1",[])),
+ <<"fo">> = iolist_to_binary(re:replace("focat","(?(?<!foo)cat|bar)","\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<!foo)cat|bar)","qsIpnmEbaYk\\1H",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?<!foo)cat|bar)","qsIpnmEbaYk\\1H",[global])),
+ <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<!foo)cat|bar)","B",[])),
+ <<"foocat">> = iolist_to_binary(re:replace("foocat","(?(?<!foo)cat|bar)","B",[global])),
+ <<"bclabcdfaLGxBabcdHtjFC">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) |) ","bcl&faLGxB\\1&HtjFC",[extended])),
+ <<"bclabcdfaLGxBabcdHtjFC">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) |) ","bcl&faLGxB\\1&HtjFC",[extended,
+ global])),
+ <<"JpguAHp((E(AF(">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ","JpguAHp\\1\\1E\\1AF\\1",[extended])),
+ <<"JpguAHp((E(AF(">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ","JpguAHp\\1\\1E\\1AF\\1",[extended,
+ global])),
+ <<"yBpRsrthe quick Nr(abcd) fox">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ","yBpRsr&Nr\\1",[extended])),
+ <<"yBpRsrthe quick NryBpRsr(abcd)Nr(yBpRsr foxNr">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ","yBpRsr&Nr\\1",[extended,
+ global])),
+ <<"(dfabcdMfidabcdORabcdXp">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) |) ","df&Mfid\\1\\1&OR&Xp",[extended])),
+ <<"(dfabcdMfidabcdORabcdXp">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) |) ","df&Mfid\\1\\1&OR&Xp",[extended,
+ global])),
+ <<"NEKtshVcSbEQreXJUgabcd">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) ) ","NEKtshVcSbEQre\\1XJUg&",[extended])),
+ <<"NEKtshVcSbEQreXJUgabcd">> = iolist_to_binary(re:replace("abcd","( \\( )? [^()]+ (?(1) \\) ) ","NEKtshVcSbEQre\\1XJUg&",[extended,
+ global])),
+ <<"C">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ","C",[extended])),
+ <<"C">> = iolist_to_binary(re:replace("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ","C",[extended,
+ global])),
+ <<"VsQthe quick tPGwwMthe quick WRxuthe quick (abcd) fox">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ","VsQ&tP\\1Gww\\1M&WRxu&",[extended])),
+ <<"VsQthe quick tPGwwMthe quick WRxuthe quick VsQ(abcd)tP(Gww(M(abcd)WRxu(abcd)VsQ foxtPGwwM foxWRxu fox">> = iolist_to_binary(re:replace("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ","VsQ&tP\\1Gww\\1M&WRxu&",[extended,
global])),
-?line <<"(KuH">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) ) ","K\\1uH",[extended])),
-?line <<"(KuH">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) ) ","K\\1uH",[extended,
- global])),
-?line <<"IMNCUvkRpMGDtA">> = iolist_to_binary(re:replace("12","^(?(2)a|(1)(2))+$","IMNCUvkRpMGDtA",[])),
-?line <<"IMNCUvkRpMGDtA">> = iolist_to_binary(re:replace("12","^(?(2)a|(1)(2))+$","IMNCUvkRpMGDtA",[global])),
-?line <<"YQQcCpqUaDwGin12a1he">> = iolist_to_binary(re:replace("12a","^(?(2)a|(1)(2))+$","YQQcCpqUaDwGin&\\1he",[])),
-?line <<"YQQcCpqUaDwGin12a1he">> = iolist_to_binary(re:replace("12a","^(?(2)a|(1)(2))+$","YQQcCpqUaDwGin&\\1he",[global])),
-?line <<"LiJWEQyka">> = iolist_to_binary(re:replace("12aa","^(?(2)a|(1)(2))+$","LiJWEQyka",[])),
-?line <<"LiJWEQyka">> = iolist_to_binary(re:replace("12aa","^(?(2)a|(1)(2))+$","LiJWEQyka",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(2)a|(1)(2))+$","jNpGudmNvPautj\\1\\1rc",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(2)a|(1)(2))+$","jNpGudmNvPautj\\1\\1rc",[global])),
-?line <<"1234">> = iolist_to_binary(re:replace("1234","^(?(2)a|(1)(2))+$","TKb&DSqQCtNBSjto\\1",[])),
-?line <<"1234">> = iolist_to_binary(re:replace("1234","^(?(2)a|(1)(2))+$","TKb&DSqQCtNBSjto\\1",[global])),
-?line <<"OKbblah blahmEblah blahcAEblah">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+\\1","OKb&mE&cAE\\1",[])),
-?line <<"OKbblah blahmEblah blahcAEblah">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+\\1","OKb&mE&cAE\\1",[global])),
-?line <<"sHRABLAH BLAHDBLAH BLAHofBLAHMonBF">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+\\1","sHRA&D&of\\1MonBF",[])),
-?line <<"sHRABLAH BLAHDBLAH BLAHofBLAHMonBF">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+\\1","sHRA&D&of\\1MonBF",[global])),
-?line <<"rBlah BlahowtRMgXJKNBlah Blah">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+\\1","r&owtRMgXJKN&",[])),
-?line <<"rBlah BlahowtRMgXJKNBlah Blah">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+\\1","r&owtRMgXJKN&",[global])),
-?line <<"JblaHeNvblaHaSeblaHblaH blaHg">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+\\1","J\\1eNv\\1aSe\\1&g",[])),
-?line <<"JblaHeNvblaHaSeblaHblaH blaHg">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+\\1","J\\1eNv\\1aSe\\1&g",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)blah)\\s+\\1","\\1LVUknDVfgj\\1ij\\1eDhAE",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)blah)\\s+\\1","\\1LVUknDVfgj\\1ij\\1eDhAE",[global])),
-?line <<"blah BLAH">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+\\1","auAYHQ\\1S&PKut",[])),
-?line <<"blah BLAH">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+\\1","auAYHQ\\1S&PKut",[global])),
-?line <<"Blah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+\\1","\\1&N\\1tNui&w&CgfgFCbPk",[])),
-?line <<"Blah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+\\1","\\1&N\\1tNui&w&CgfgFCbPk",[global])),
-?line <<"blaH blah">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+\\1","rLouaVXAOeWe",[])),
-?line <<"blaH blah">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+\\1","rLouaVXAOeWe",[global])),
-?line <<"CXblahSqUjfblah blahblah blahblah">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+(?i:\\1)","CX\\1SqUjf&&\\1",[])),
-?line <<"CXblahSqUjfblah blahblah blahblah">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+(?i:\\1)","CX\\1SqUjf&&\\1",[global])),
-?line <<"XBLAHTkBLAHXUjMhbiRBLAH BLAHgXxxti">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+(?i:\\1)","X\\1Tk\\1XUjMhbiR&gXxxti",[])),
-?line <<"XBLAHTkBLAHXUjMhbiRBLAH BLAHgXxxti">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+(?i:\\1)","X\\1Tk\\1XUjMhbiR&gXxxti",[global])),
-?line <<"SBlahlpSqiBlah BlahLvYBlahJBlahxSbx">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+(?i:\\1)","S\\1lpSqi&LvY\\1J\\1xSbx",[])),
-?line <<"SBlahlpSqiBlah BlahLvYBlahJBlahxSbx">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+(?i:\\1)","S\\1lpSqi&LvY\\1J\\1xSbx",[global])),
-?line <<"oIFblaHCV">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+(?i:\\1)","oIF\\1CV",[])),
-?line <<"oIFblaHCV">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+(?i:\\1)","oIF\\1CV",[global])),
-?line <<"blahblah BLAHnOGRLblahgvVwkgjq">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+(?i:\\1)","\\1&nOGRL\\1gvVwkgjq",[])),
-?line <<"blahblah BLAHnOGRLblahgvVwkgjq">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+(?i:\\1)","\\1&nOGRL\\1gvVwkgjq",[global])),
-?line <<"PrLBlahTtgBlah blahpNNDBlah blahBlah blahBlah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+(?i:\\1)","PrL\\1Ttg&pNND&&&",[])),
-?line <<"PrLBlahTtgBlah blahpNNDBlah blahBlah blahBlah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+(?i:\\1)","PrL\\1Ttg&pNND&&&",[global])),
-?line <<"blaH blahGnDblaHFhNOIOmBhblaH blahfblaH blahKt">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+(?i:\\1)","&GnD\\1FhNOIOmBh&f&Kt",[])),
-?line <<"blaH blahGnDblaHFhNOIOmBhblaH blahfblaH blahKt">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+(?i:\\1)","&GnD\\1FhNOIOmBh&f&Kt",[global])),
-?line <<"aW">> = iolist_to_binary(re:replace("a","(?>a*)*","&W",[])),
-?line <<"aWW">> = iolist_to_binary(re:replace("a","(?>a*)*","&W",[global])),
-?line <<"Seaa">> = iolist_to_binary(re:replace("aa","(?>a*)*","Se&",[])),
-?line <<"SeaaSe">> = iolist_to_binary(re:replace("aa","(?>a*)*","Se&",[global])),
-?line <<"itILgCmaaaaioxBkDkO">> = iolist_to_binary(re:replace("aaaa","(?>a*)*","itIL\\1gCm&ioxBkDkO",[])),
-?line <<"itILgCmaaaaioxBkDkOitILgCmioxBkDkO">> = iolist_to_binary(re:replace("aaaa","(?>a*)*","itIL\\1gCm&ioxBkDkO",[global])),
-?line <<"aqm">> = iolist_to_binary(re:replace("abc","(abc|)+","\\1aqm",[])),
-?line <<"aqmaqm">> = iolist_to_binary(re:replace("abc","(abc|)+","\\1aqm",[global])),
-?line <<"tSWTMOLPTnvvJTwabcabcJwE">> = iolist_to_binary(re:replace("abcabc","(abc|)+","tSWTMOLPTnvvJTw\\1&JwE",[])),
-?line <<"tSWTMOLPTnvvJTwabcabcJwEtSWTMOLPTnvvJTwJwE">> = iolist_to_binary(re:replace("abcabc","(abc|)+","tSWTMOLPTnvvJTw\\1&JwE",[global])),
-?line <<"eMhIJbMyp">> = iolist_to_binary(re:replace("abcabcabc","(abc|)+","\\1eMh\\1\\1IJb\\1Myp",[])),
-?line <<"eMhIJbMypeMhIJbMyp">> = iolist_to_binary(re:replace("abcabcabc","(abc|)+","\\1eMh\\1\\1IJb\\1Myp",[global])),
-?line <<"dBxyz">> = iolist_to_binary(re:replace("xyz","(abc|)+","dB",[])),
-?line <<"dBxdBydBzdB">> = iolist_to_binary(re:replace("xyz","(abc|)+","dB",[global])),
-?line <<"wCrHnihkSygW">> = iolist_to_binary(re:replace("a","([a]*)*","wCrHnihkSygW",[])),
-?line <<"wCrHnihkSygWwCrHnihkSygW">> = iolist_to_binary(re:replace("a","([a]*)*","wCrHnihkSygW",[global])),
-?line <<"GjjjYNVefTgBaaaaafMw">> = iolist_to_binary(re:replace("aaaaa","([a]*)*","\\1Gjj\\1jYNVefTgB&fMw",[])),
-?line <<"GjjjYNVefTgBaaaaafMwGjjjYNVefTgBfMw">> = iolist_to_binary(re:replace("aaaaa","([a]*)*","\\1Gjj\\1jYNVefTgB&fMw",[global])),
-?line <<"pXFqCJUNaNU">> = iolist_to_binary(re:replace("a","([ab]*)*","pXFqCJUN&NU",[])),
-?line <<"pXFqCJUNaNUpXFqCJUNNU">> = iolist_to_binary(re:replace("a","([ab]*)*","pXFqCJUN&NU",[global])),
-?line <<"qbGbaTAUHHibHnl">> = iolist_to_binary(re:replace("b","([ab]*)*","q&\\1GbaTAUHHi&Hn\\1l",[])),
-?line <<"qbGbaTAUHHibHnlqGbaTAUHHiHnl">> = iolist_to_binary(re:replace("b","([ab]*)*","q&\\1GbaTAUHHi&Hn\\1l",[global])),
-?line <<"l">> = iolist_to_binary(re:replace("ababab","([ab]*)*","\\1l",[])),
-?line <<"ll">> = iolist_to_binary(re:replace("ababab","([ab]*)*","\\1l",[global])),
-?line <<"scde">> = iolist_to_binary(re:replace("aaaabcde","([ab]*)*","s\\1\\1",[])),
-?line <<"sscsdses">> = iolist_to_binary(re:replace("aaaabcde","([ab]*)*","s\\1\\1",[global])),
-?line <<"cLbwWRDkdHt">> = iolist_to_binary(re:replace("bbbb","([ab]*)*","cL\\1bwWRDkdHt",[])),
-?line <<"cLbwWRDkdHtcLbwWRDkdHt">> = iolist_to_binary(re:replace("bbbb","([ab]*)*","cL\\1bwWRDkdHt",[global])),
-?line <<"nmytevammko">> = iolist_to_binary(re:replace("b","([^a]*)*","nmytevammk\\1o",[])),
-?line <<"nmytevammkonmytevammko">> = iolist_to_binary(re:replace("b","([^a]*)*","nmytevammk\\1o",[global])),
-?line <<"bbbbqIbAMyI">> = iolist_to_binary(re:replace("bbbb","([^a]*)*","&qIbAMyI",[])),
-?line <<"bbbbqIbAMyIqIbAMyI">> = iolist_to_binary(re:replace("bbbb","([^a]*)*","&qIbAMyI",[global])),
-?line <<"ItRSFsauaaa">> = iolist_to_binary(re:replace("aaa","([^a]*)*","ItRS\\1Fs&a&&u",[])),
-?line <<"ItRSFsauaItRSFsauaItRSFsauaItRSFsau">> = iolist_to_binary(re:replace("aaa","([^a]*)*","ItRS\\1Fs&a&&u",[global])),
-?line <<"PKlYUFjsxy">> = iolist_to_binary(re:replace("cccc","([^ab]*)*","PKlYUFjsxy",[])),
-?line <<"PKlYUFjsxyPKlYUFjsxy">> = iolist_to_binary(re:replace("cccc","([^ab]*)*","PKlYUFjsxy",[global])),
-?line <<"eBumQabab">> = iolist_to_binary(re:replace("abab","([^ab]*)*","e\\1BumQ",[])),
-?line <<"eBumQaeBumQbeBumQaeBumQbeBumQ">> = iolist_to_binary(re:replace("abab","([^ab]*)*","e\\1BumQ",[global])),
-?line <<"VsNPa">> = iolist_to_binary(re:replace("a","([a]*?)*","&Vs\\1N&P",[])),
-?line <<"VsNPaVsNaPVsNP">> = iolist_to_binary(re:replace("a","([a]*?)*","&Vs\\1N&P",[global])),
-?line <<"oJTmjRIMESSEdaaaa">> = iolist_to_binary(re:replace("aaaa","([a]*?)*","o&JT\\1\\1\\1&m&jR&IMESSEd",[])),
-?line <<"oJTmjRIMESSEdoaJTamajRaIMESSEdoJTmjRIMESSEdoaJTamajRaIMESSEdoJTmjRIMESSEdoaJTamajRaIMESSEdoJTmjRIMESSEdoaJTamajRaIMESSEdoJTmjRIMESSEd">> = iolist_to_binary(re:replace("aaaa","([a]*?)*","o&JT\\1\\1\\1&m&jR&IMESSEd",[global])),
-?line <<"uSOa">> = iolist_to_binary(re:replace("a","([ab]*?)*","&\\1&u&SO",[])),
-?line <<"uSOaauaSOuSO">> = iolist_to_binary(re:replace("a","([ab]*?)*","&\\1&u&SO",[global])),
-?line <<"BfDNwUAfjUb">> = iolist_to_binary(re:replace("b","([ab]*?)*","B&fDNwU\\1Af&j\\1U\\1",[])),
-?line <<"BfDNwUAfjUBbfDNwUAfbjUBfDNwUAfjU">> = iolist_to_binary(re:replace("b","([ab]*?)*","B&fDNwU\\1Af&j\\1U\\1",[global])),
-?line <<"kTOkbSeRnabab">> = iolist_to_binary(re:replace("abab","([ab]*?)*","k&TOkb\\1\\1S&eR&n&",[])),
-?line <<"kTOkbSeRnkaTOkbSaeRanakTOkbSeRnkbTOkbSbeRbnbkTOkbSeRnkaTOkbSaeRanakTOkbSeRnkbTOkbSbeRbnbkTOkbSeRn">> = iolist_to_binary(re:replace("abab","([ab]*?)*","k&TOkb\\1\\1S&eR&n&",[global])),
-?line <<"Sbaba">> = iolist_to_binary(re:replace("baba","([ab]*?)*","S",[])),
-?line <<"SSSSSSSSS">> = iolist_to_binary(re:replace("baba","([ab]*?)*","S",[global])),
-?line <<"Aotb">> = iolist_to_binary(re:replace("b","([^a]*?)*","A\\1ot",[])),
-?line <<"AotAotAot">> = iolist_to_binary(re:replace("b","([^a]*?)*","A\\1ot",[global])),
-?line <<"CbPnbbbb">> = iolist_to_binary(re:replace("bbbb","([^a]*?)*","CbPn&&",[])),
-?line <<"CbPnCbPnbbCbPnCbPnbbCbPnCbPnbbCbPnCbPnbbCbPn">> = iolist_to_binary(re:replace("bbbb","([^a]*?)*","CbPn&&",[global])),
-?line <<"DUteaaa">> = iolist_to_binary(re:replace("aaa","([^a]*?)*","D\\1\\1Ute",[])),
-?line <<"DUteaDUteaDUteaDUte">> = iolist_to_binary(re:replace("aaa","([^a]*?)*","D\\1\\1Ute",[global])),
-?line <<"ATgsBhAkPic">> = iolist_to_binary(re:replace("c","([^ab]*?)*","ATg\\1sB\\1hAkP&i",[])),
-?line <<"ATgsBhAkPiATgsBhAkPciATgsBhAkPi">> = iolist_to_binary(re:replace("c","([^ab]*?)*","ATg\\1sB\\1hAkP&i",[global])),
-?line <<"lwFoWkRIxUcccc">> = iolist_to_binary(re:replace("cccc","([^ab]*?)*","l&wFoWk\\1RIxU",[])),
-?line <<"lwFoWkRIxUlcwFoWkRIxUlwFoWkRIxUlcwFoWkRIxUlwFoWkRIxUlcwFoWkRIxUlwFoWkRIxUlcwFoWkRIxUlwFoWkRIxU">> = iolist_to_binary(re:replace("cccc","([^ab]*?)*","l&wFoWk\\1RIxU",[global])),
-?line <<"QXSXCbaba">> = iolist_to_binary(re:replace("baba","([^ab]*?)*","&QXSXC",[])),
-?line <<"QXSXCbQXSXCaQXSXCbQXSXCaQXSXC">> = iolist_to_binary(re:replace("baba","([^ab]*?)*","&QXSXC",[global])),
-?line <<"epgEBpyDja">> = iolist_to_binary(re:replace("a","(?>a*)*","e\\1\\1pgEB\\1\\1pyD\\1j&",[])),
-?line <<"epgEBpyDjaepgEBpyDj">> = iolist_to_binary(re:replace("a","(?>a*)*","e\\1\\1pgEB\\1\\1pyD\\1j&",[global])),
-?line <<"SekThCelBbcde">> = iolist_to_binary(re:replace("aaabcde","(?>a*)*","SekT\\1hC\\1\\1elB",[])),
-?line <<"SekThCelBSekThCelBbSekThCelBcSekThCelBdSekThCelBeSekThCelB">> = iolist_to_binary(re:replace("aaabcde","(?>a*)*","SekT\\1hC\\1\\1elB",[global])),
-?line <<"goPCaaaaawO">> = iolist_to_binary(re:replace("aaaaa","((?>a*))*","go\\1PC\\1&\\1wO",[])),
-?line <<"goPCaaaaawOgoPCwO">> = iolist_to_binary(re:replace("aaaaa","((?>a*))*","go\\1PC\\1&\\1wO",[global])),
-?line <<"SCaadJliaaKfxRbbbaa">> = iolist_to_binary(re:replace("aabbaa","((?>a*))*","\\1S\\1C&\\1dJ\\1\\1li&KfxR\\1b",[])),
-?line <<"SCaadJliaaKfxRbSCdJliKfxRbbSCdJliKfxRbbSCaadJliaaKfxRbSCdJliKfxRb">> = iolist_to_binary(re:replace("aabbaa","((?>a*))*","\\1S\\1C&\\1dJ\\1\\1li&KfxR\\1b",[global])),
-?line <<"ssMfBjQEIebjdsmPRaaaaa">> = iolist_to_binary(re:replace("aaaaa","((?>a*?))*","s&s&MfBjQEIebjdsmPR",[])),
-?line <<"ssMfBjQEIebjdsmPRassMfBjQEIebjdsmPRassMfBjQEIebjdsmPRassMfBjQEIebjdsmPRassMfBjQEIebjdsmPRassMfBjQEIebjdsmPR">> = iolist_to_binary(re:replace("aaaaa","((?>a*?))*","s&s&MfBjQEIebjdsmPR",[global])),
-?line <<"VQJGaabbaa">> = iolist_to_binary(re:replace("aabbaa","((?>a*?))*","VQ\\1&J\\1G",[])),
-?line <<"VQJGaVQJGaVQJGbVQJGbVQJGaVQJGaVQJG">> = iolist_to_binary(re:replace("aabbaa","((?>a*?))*","VQ\\1&J\\1G",[global])),
-?line <<"t">> = iolist_to_binary(re:replace("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","t",[extended])),
-?line <<"t">> = iolist_to_binary(re:replace("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","t",[extended,
- global])),
-?line <<"EIgEQmDKuIoMFts">> = iolist_to_binary(re:replace("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","EIgEQmDKuIoMFts",[extended])),
-?line <<"EIgEQmDKuIoMFts">> = iolist_to_binary(re:replace("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","EIgEQmDKuIoMFts",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","M\\1K\\1N",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","M\\1K\\1N",[extended,
- global])),
-?line <<"sep-12-98">> = iolist_to_binary(re:replace("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","Xby\\1g&vVVPgw\\1",[extended])),
-?line <<"sep-12-98">> = iolist_to_binary(re:replace("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","Xby\\1g&vVVPgw\\1",[extended,
- global])),
-?line <<"foonfoobJpbIfooAbKhpTIXfoofooEN">> = iolist_to_binary(re:replace("foobarfoo","(?<=(foo))bar\\1","n\\1bJpbI\\1AbKhpTIX\\1\\1EN",[])),
-?line <<"foonfoobJpbIfooAbKhpTIXfoofooEN">> = iolist_to_binary(re:replace("foobarfoo","(?<=(foo))bar\\1","n\\1bJpbI\\1AbKhpTIX\\1\\1EN",[global])),
-?line <<"foobarfoofooUWdHfoofoocfifXWQdmKgtling">> = iolist_to_binary(re:replace("foobarfootling","(?<=(foo))bar\\1","&\\1UWdH\\1\\1cfifXWQdmKg",[])),
-?line <<"foobarfoofooUWdHfoofoocfifXWQdmKgtling">> = iolist_to_binary(re:replace("foobarfootling","(?<=(foo))bar\\1","&\\1UWdH\\1\\1cfifXWQdmKg",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo))bar\\1","\\1A\\1Do\\1roQX",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo))bar\\1","\\1A\\1Do\\1roQX",[global])),
-?line <<"foobar">> = iolist_to_binary(re:replace("foobar","(?<=(foo))bar\\1","WqywQ",[])),
-?line <<"foobar">> = iolist_to_binary(re:replace("foobar","(?<=(foo))bar\\1","WqywQ",[global])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<=(foo))bar\\1","g&dx",[])),
-?line <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<=(foo))bar\\1","g&dx",[global])),
-?line <<"EqLnXCi">> = iolist_to_binary(re:replace("saturday","(?i:saturday|sunday)","EqLnX\\1Ci\\1",[])),
-?line <<"EqLnXCi">> = iolist_to_binary(re:replace("saturday","(?i:saturday|sunday)","EqLnX\\1Ci\\1",[global])),
-?line <<"rXiCVoMssundayWVsundayg">> = iolist_to_binary(re:replace("sunday","(?i:saturday|sunday)","rXiCVoMs&WV&\\1g",[])),
-?line <<"rXiCVoMssundayWVsundayg">> = iolist_to_binary(re:replace("sunday","(?i:saturday|sunday)","rXiCVoMs&WV&\\1g",[global])),
-?line <<"DCML">> = iolist_to_binary(re:replace("Saturday","(?i:saturday|sunday)","D\\1CML",[])),
-?line <<"DCML">> = iolist_to_binary(re:replace("Saturday","(?i:saturday|sunday)","D\\1CML",[global])),
-?line <<"caYSundaylQsqBJmDFf">> = iolist_to_binary(re:replace("Sunday","(?i:saturday|sunday)","caY&l\\1Q\\1\\1sq\\1BJmD\\1Ff",[])),
-?line <<"caYSundaylQsqBJmDFf">> = iolist_to_binary(re:replace("Sunday","(?i:saturday|sunday)","caY&l\\1Q\\1\\1sq\\1BJmD\\1Ff",[global])),
-?line <<"LSATURDAYSATURDAYb">> = iolist_to_binary(re:replace("SATURDAY","(?i:saturday|sunday)","L&&b",[])),
-?line <<"LSATURDAYSATURDAYb">> = iolist_to_binary(re:replace("SATURDAY","(?i:saturday|sunday)","L&&b",[global])),
-?line <<"J">> = iolist_to_binary(re:replace("SUNDAY","(?i:saturday|sunday)","J",[])),
-?line <<"J">> = iolist_to_binary(re:replace("SUNDAY","(?i:saturday|sunday)","J",[global])),
-?line <<"cCHUgeqmaSunDaySunDayQSunDayHUJ">> = iolist_to_binary(re:replace("SunDay","(?i:saturday|sunday)","c\\1CHUgeqma&&Q&HUJ",[])),
-?line <<"cCHUgeqmaSunDaySunDayQSunDayHUJ">> = iolist_to_binary(re:replace("SunDay","(?i:saturday|sunday)","c\\1CHUgeqma&&Q&HUJ",[global])),
-?line <<"abcEbXpYQWabcxNabcxabcxVrPLd">> = iolist_to_binary(re:replace("abcx","(a(?i)bc|BB)x","\\1EbXpYQW&N&&VrPLd",[])),
-?line <<"abcEbXpYQWabcxNabcxabcxVrPLd">> = iolist_to_binary(re:replace("abcx","(a(?i)bc|BB)x","\\1EbXpYQW&N&&VrPLd",[global])),
-?line <<"jBMIviaBCvaBCxTRLe">> = iolist_to_binary(re:replace("aBCx","(a(?i)bc|BB)x","jBMIvi\\1v&TRLe",[])),
-?line <<"jBMIviaBCvaBCxTRLe">> = iolist_to_binary(re:replace("aBCx","(a(?i)bc|BB)x","jBMIvi\\1v&TRLe",[global])),
-?line <<"wDnyUbbxDgOUSgpsDtqV">> = iolist_to_binary(re:replace("bbx","(a(?i)bc|BB)x","wDnyU&DgOUSgpsDtqV",[])),
-?line <<"wDnyUbbxDgOUSgpsDtqV">> = iolist_to_binary(re:replace("bbx","(a(?i)bc|BB)x","wDnyU&DgOUSgpsDtqV",[global])),
-?line <<"Vx">> = iolist_to_binary(re:replace("BBx","(a(?i)bc|BB)x","Vx",[])),
-?line <<"Vx">> = iolist_to_binary(re:replace("BBx","(a(?i)bc|BB)x","Vx",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)bc|BB)x","vuaWcgIs\\1SRUcqMEb",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)bc|BB)x","vuaWcgIs\\1SRUcqMEb",[global])),
-?line <<"abcX">> = iolist_to_binary(re:replace("abcX","(a(?i)bc|BB)x","V\\1",[])),
-?line <<"abcX">> = iolist_to_binary(re:replace("abcX","(a(?i)bc|BB)x","V\\1",[global])),
-?line <<"aBCX">> = iolist_to_binary(re:replace("aBCX","(a(?i)bc|BB)x","kcaH&mISces&gy\\1Mv",[])),
-?line <<"aBCX">> = iolist_to_binary(re:replace("aBCX","(a(?i)bc|BB)x","kcaH&mISces&gy\\1Mv",[global])),
-?line <<"bbX">> = iolist_to_binary(re:replace("bbX","(a(?i)bc|BB)x","hfQHW",[])),
-?line <<"bbX">> = iolist_to_binary(re:replace("bbX","(a(?i)bc|BB)x","hfQHW",[global])),
-?line <<"BBX">> = iolist_to_binary(re:replace("BBX","(a(?i)bc|BB)x","QWSdgANNG&a&hUuhv&T",[])),
-?line <<"BBX">> = iolist_to_binary(re:replace("BBX","(a(?i)bc|BB)x","QWSdgANNG&a&hUuhv&T",[global])),
-?line <<"tEacrW">> = iolist_to_binary(re:replace("ac","^([ab](?i)[cd]|[ef])","tE\\1rW",[])),
-?line <<"tEacrW">> = iolist_to_binary(re:replace("ac","^([ab](?i)[cd]|[ef])","tE\\1rW",[global])),
-?line <<"jjqwaCaCyaCpaCPWnSv">> = iolist_to_binary(re:replace("aC","^([ab](?i)[cd]|[ef])","jjqw\\1\\1y\\1p&PWnSv",[])),
-?line <<"jjqwaCaCyaCpaCPWnSv">> = iolist_to_binary(re:replace("aC","^([ab](?i)[cd]|[ef])","jjqw\\1\\1y\\1p&PWnSv",[global])),
-?line <<"pbDoK">> = iolist_to_binary(re:replace("bD","^([ab](?i)[cd]|[ef])","p&oK",[])),
-?line <<"pbDoK">> = iolist_to_binary(re:replace("bD","^([ab](?i)[cd]|[ef])","p&oK",[global])),
-?line <<"hOUSaMTfcPejGlephant">> = iolist_to_binary(re:replace("elephant","^([ab](?i)[cd]|[ef])","hOUSaMTfcP&jG",[])),
-?line <<"hOUSaMTfcPejGlephant">> = iolist_to_binary(re:replace("elephant","^([ab](?i)[cd]|[ef])","hOUSaMTfcP&jG",[global])),
-?line <<"EOnTdEESsrQXxRPurope">> = iolist_to_binary(re:replace("Europe","^([ab](?i)[cd]|[ef])","\\1OnTd&&SsrQXxRP",[])),
-?line <<"EOnTdEESsrQXxRPurope">> = iolist_to_binary(re:replace("Europe","^([ab](?i)[cd]|[ef])","\\1OnTd&&SsrQXxRP",[global])),
-?line <<"fhfBHfIDHldAwNfEfqrog">> = iolist_to_binary(re:replace("frog","^([ab](?i)[cd]|[ef])","\\1h&BH\\1IDHldAwN&E\\1q",[])),
-?line <<"fhfBHfIDHldAwNfEfqrog">> = iolist_to_binary(re:replace("frog","^([ab](?i)[cd]|[ef])","\\1h&BH\\1IDHldAwN&E\\1q",[global])),
-?line <<"FFFxSuhnFwrance">> = iolist_to_binary(re:replace("France","^([ab](?i)[cd]|[ef])","\\1&FxSuhn&w",[])),
-?line <<"FFFxSuhnFwrance">> = iolist_to_binary(re:replace("France","^([ab](?i)[cd]|[ef])","\\1&FxSuhn&w",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([ab](?i)[cd]|[ef])","&ff\\1J\\1I",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([ab](?i)[cd]|[ef])","&ff\\1J\\1I",[global])),
-?line <<"Africa">> = iolist_to_binary(re:replace("Africa","^([ab](?i)[cd]|[ef])","nEbgaPXOn\\1",[])),
-?line <<"Africa">> = iolist_to_binary(re:replace("Africa","^([ab](?i)[cd]|[ef])","nEbgaPXOn\\1",[global])),
-?line <<"abcabDXAiaSg">> = iolist_to_binary(re:replace("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&c&DXAiaSg",[])),
-?line <<"abcabDXAiaSg">> = iolist_to_binary(re:replace("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&c&DXAiaSg",[global])),
-?line <<"aBdqaBdmLoaaBdEb">> = iolist_to_binary(re:replace("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&q&mLoa&Eb",[])),
-?line <<"aBdqaBdmLoaaBdEb">> = iolist_to_binary(re:replace("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&q&mLoa&Eb",[global])),
-?line <<"xxyvFo">> = iolist_to_binary(re:replace("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","x&vFo",[])),
-?line <<"xxyvFo">> = iolist_to_binary(re:replace("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","x&vFo",[global])),
-?line <<"eWy">> = iolist_to_binary(re:replace("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","eWy",[])),
-?line <<"eWy">> = iolist_to_binary(re:replace("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","eWy",[global])),
-?line <<"bzVONndeqzaVKebra">> = iolist_to_binary(re:replace("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","b&VONndeq\\1aVK",[])),
-?line <<"bzVONndeqzaVKebra">> = iolist_to_binary(re:replace("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","b&VONndeq\\1aVK",[global])),
-?line <<"ZNZZjZVZJeZnZZCXZambesi">> = iolist_to_binary(re:replace("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&N&&j&V&Je\\1n&\\1CX&",[])),
-?line <<"ZNZZjZVZJeZnZZCXZambesi">> = iolist_to_binary(re:replace("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&N&&j&V&Je\\1n&\\1CX&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","vJ\\1\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","vJ\\1\\1",[global])),
-?line <<"aCD">> = iolist_to_binary(re:replace("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","\\1FKPhO&",[])),
-?line <<"aCD">> = iolist_to_binary(re:replace("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","\\1FKPhO&",[global])),
-?line <<"XY">> = iolist_to_binary(re:replace("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","SEE",[])),
-?line <<"XY">> = iolist_to_binary(re:replace("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","SEE",[global])),
-?line <<"foo
-rwHxBqDqeLQ">> = iolist_to_binary(re:replace("foo
-bar","(?<=foo\\n)^bar","rwHxBqDq\\1eLQ",[multiline])),
-?line <<"foo
-rwHxBqDqeLQ">> = iolist_to_binary(re:replace("foo
-bar","(?<=foo\\n)^bar","rwHxBqDq\\1eLQ",[multiline,global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=foo\\n)^bar","\\1P&&W&\\1oN",[multiline])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=foo\\n)^bar","\\1P&&W&\\1oN",[multiline,
- global])),
-?line <<"bar">> = iolist_to_binary(re:replace("bar","(?<=foo\\n)^bar","rk\\1SSPj&JPOE",[multiline])),
-?line <<"bar">> = iolist_to_binary(re:replace("bar","(?<=foo\\n)^bar","rk\\1SSPj&JPOE",[multiline,
- global])),
-?line <<"baz
+ <<"(BxtHoabcdhwabcdMSlPc">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) ) ","BxtHo&hw&MSlPc",[extended])),
+ <<"(BxtHoabcdhwabcdMSlPc">> = iolist_to_binary(re:replace("(abcd","( \\( )? [^()]+ (?(1) \\) ) ","BxtHo&hw&MSlPc",[extended,
+ global])),
+ <<"112MIb11212MLRT11">> = iolist_to_binary(re:replace("12","^(?(2)a|(1)(2))+$","\\1&MIb\\1&&MLRT\\1\\1",[])),
+ <<"112MIb11212MLRT11">> = iolist_to_binary(re:replace("12","^(?(2)a|(1)(2))+$","\\1&MIb\\1&&MLRT\\1\\1",[global])),
+ <<"NKCJyodsYQD">> = iolist_to_binary(re:replace("12a","^(?(2)a|(1)(2))+$","NKCJyodsYQD",[])),
+ <<"NKCJyodsYQD">> = iolist_to_binary(re:replace("12a","^(?(2)a|(1)(2))+$","NKCJyodsYQD",[global])),
+ <<"12aarChjGgkuN">> = iolist_to_binary(re:replace("12aa","^(?(2)a|(1)(2))+$","&rChjGgkuN",[])),
+ <<"12aarChjGgkuN">> = iolist_to_binary(re:replace("12aa","^(?(2)a|(1)(2))+$","&rChjGgkuN",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(2)a|(1)(2))+$","\\1\\1be\\1ix",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?(2)a|(1)(2))+$","\\1\\1be\\1ix",[global])),
+ <<"1234">> = iolist_to_binary(re:replace("1234","^(?(2)a|(1)(2))+$","cLDE&D",[])),
+ <<"1234">> = iolist_to_binary(re:replace("1234","^(?(2)a|(1)(2))+$","cLDE&D",[global])),
+ <<"kNHtojblahPblahcuUuarKNnoK">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+\\1","kNHtoj\\1P\\1cuUuarKNnoK",[])),
+ <<"kNHtojblahPblahcuUuarKNnoK">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+\\1","kNHtoj\\1P\\1cuUuarKNnoK",[global])),
+ <<"eNBLAHlXaMBLAH BLAH">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+\\1","eN\\1lXaM&",[])),
+ <<"eNBLAHlXaMBLAH BLAH">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+\\1","eN\\1lXaM&",[global])),
+ <<"rBlah BlahSGW">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+\\1","r&SGW",[])),
+ <<"rBlah BlahSGW">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+\\1","r&SGW",[global])),
+ <<"fUTblaH blaHblaH blaHtHeblaH blaHDlblaH blaHwQonyN">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+\\1","fUT&&tHe&Dl&wQonyN",[])),
+ <<"fUTblaH blaHblaH blaHtHeblaH blaHDlblaH blaHwQonyN">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+\\1","fUT&&tHe&Dl&wQonyN",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)blah)\\s+\\1","rjKWYO&gqg",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)blah)\\s+\\1","rjKWYO&gqg",[global])),
+ <<"blah BLAH">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+\\1","\\1PJEx&&NqPQ",[])),
+ <<"blah BLAH">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+\\1","\\1PJEx&&NqPQ",[global])),
+ <<"Blah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+\\1","&IAtxxKcfurkyev\\1nvDJ",[])),
+ <<"Blah blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+\\1","&IAtxxKcfurkyev\\1nvDJ",[global])),
+ <<"blaH blah">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+\\1","\\1\\1H&YJdrM\\1qcj&&",[])),
+ <<"blaH blah">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+\\1","\\1\\1H&YJdrM\\1qcj&&",[global])),
+ <<"QROIQmblah blahmblahblah blahDWblahJ">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+(?i:\\1)","QROIQm&m\\1&DW\\1J",[])),
+ <<"QROIQmblah blahmblahblah blahDWblahJ">> = iolist_to_binary(re:replace("blah blah","((?i)blah)\\s+(?i:\\1)","QROIQm&m\\1&DW\\1J",[global])),
+ <<"vmvjMIXCFx">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+(?i:\\1)","vmvjMIXCFx",[])),
+ <<"vmvjMIXCFx">> = iolist_to_binary(re:replace("BLAH BLAH","((?i)blah)\\s+(?i:\\1)","vmvjMIXCFx",[global])),
+ <<"FBlahSrBlah BlahfdMtkYBlah Blah">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+(?i:\\1)","F\\1Sr&fdMtkY&",[])),
+ <<"FBlahSrBlah BlahfdMtkYBlah Blah">> = iolist_to_binary(re:replace("Blah Blah","((?i)blah)\\s+(?i:\\1)","F\\1Sr&fdMtkY&",[global])),
+ <<"cblaH blaHfGEblaHwablaH blaHDGblaH blaHblaH blaHLcblaHVyTC">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+(?i:\\1)","c&fGE\\1wa&DG&&Lc\\1VyTC",[])),
+ <<"cblaH blaHfGEblaHwablaH blaHDGblaH blaHblaH blaHLcblaHVyTC">> = iolist_to_binary(re:replace("blaH blaH","((?i)blah)\\s+(?i:\\1)","c&fGE\\1wa&DG&&Lc\\1VyTC",[global])),
+ <<"blahaefgWblah">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+(?i:\\1)","\\1aefgW\\1",[])),
+ <<"blahaefgWblah">> = iolist_to_binary(re:replace("blah BLAH","((?i)blah)\\s+(?i:\\1)","\\1aefgW\\1",[global])),
+ <<"Blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+(?i:\\1)","\\1",[])),
+ <<"Blah">> = iolist_to_binary(re:replace("Blah blah","((?i)blah)\\s+(?i:\\1)","\\1",[global])),
+ <<"RXsblaHe">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+(?i:\\1)","RXs\\1e",[])),
+ <<"RXsblaHe">> = iolist_to_binary(re:replace("blaH blah","((?i)blah)\\s+(?i:\\1)","RXs\\1e",[global])),
+ <<"lanoXtvE">> = iolist_to_binary(re:replace("a","(?>a*)*","lano\\1Xt\\1vE",[])),
+ <<"lanoXtvElanoXtvE">> = iolist_to_binary(re:replace("a","(?>a*)*","lano\\1Xt\\1vE",[global])),
+ <<"EfuiyyaaybkaaVI">> = iolist_to_binary(re:replace("aa","(?>a*)*","Ef\\1uiyy&ybk&VI",[])),
+ <<"EfuiyyaaybkaaVIEfuiyyybkVI">> = iolist_to_binary(re:replace("aa","(?>a*)*","Ef\\1uiyy&ybk&VI",[global])),
+ <<"DFPlAS">> = iolist_to_binary(re:replace("aaaa","(?>a*)*","DFPlAS",[])),
+ <<"DFPlASDFPlAS">> = iolist_to_binary(re:replace("aaaa","(?>a*)*","DFPlAS",[global])),
+ <<"swvEIpc">> = iolist_to_binary(re:replace("abc","(abc|)+","sw\\1vEIpc",[])),
+ <<"swvEIpcswvEIpc">> = iolist_to_binary(re:replace("abc","(abc|)+","sw\\1vEIpc",[global])),
+ <<"Vm">> = iolist_to_binary(re:replace("abcabc","(abc|)+","Vm",[])),
+ <<"VmVm">> = iolist_to_binary(re:replace("abcabc","(abc|)+","Vm",[global])),
+ <<"vabcabcabcIecAabcabcabcvabcabcabcabcabcabcPMS">> = iolist_to_binary(re:replace("abcabcabc","(abc|)+","v&\\1IecA&v\\1&&PMS",[])),
+ <<"vabcabcabcIecAabcabcabcvabcabcabcabcabcabcPMSvIecAvPMS">> = iolist_to_binary(re:replace("abcabcabc","(abc|)+","v&\\1IecA&v\\1&&PMS",[global])),
+ <<"YpHLvbPebgHxyz">> = iolist_to_binary(re:replace("xyz","(abc|)+","YpH&LvbPebgH\\1",[])),
+ <<"YpHLvbPebgHxYpHLvbPebgHyYpHLvbPebgHzYpHLvbPebgH">> = iolist_to_binary(re:replace("xyz","(abc|)+","YpH&LvbPebgH\\1",[global])),
+ <<"aaUe">> = iolist_to_binary(re:replace("a","([a]*)*","&&Ue",[])),
+ <<"aaUeUe">> = iolist_to_binary(re:replace("a","([a]*)*","&&Ue",[global])),
+ <<"PaaaaapgFufTSYIkBuaaaaabKYVD">> = iolist_to_binary(re:replace("aaaaa","([a]*)*","P&pgFufTSYIkBu&bKYVD",[])),
+ <<"PaaaaapgFufTSYIkBuaaaaabKYVDPpgFufTSYIkBubKYVD">> = iolist_to_binary(re:replace("aaaaa","([a]*)*","P&pgFufTSYIkBu&bKYVD",[global])),
+ <<"qFRFDX">> = iolist_to_binary(re:replace("a","([ab]*)*","qFRFDX",[])),
+ <<"qFRFDXqFRFDX">> = iolist_to_binary(re:replace("a","([ab]*)*","qFRFDX",[global])),
+ <<"rcPIcjqP">> = iolist_to_binary(re:replace("b","([ab]*)*","rcP\\1IcjqP",[])),
+ <<"rcPIcjqPrcPIcjqP">> = iolist_to_binary(re:replace("b","([ab]*)*","rcP\\1IcjqP",[global])),
+ <<"sRJuN">> = iolist_to_binary(re:replace("ababab","([ab]*)*","s\\1R\\1JuN",[])),
+ <<"sRJuNsRJuN">> = iolist_to_binary(re:replace("ababab","([ab]*)*","s\\1R\\1JuN",[global])),
+ <<"GIaaaabFaYFbcde">> = iolist_to_binary(re:replace("aaaabcde","([ab]*)*","GI&FaYFb",[])),
+ <<"GIaaaabFaYFbGIFaYFbcGIFaYFbdGIFaYFbeGIFaYFb">> = iolist_to_binary(re:replace("aaaabcde","([ab]*)*","GI&FaYFb",[global])),
+ <<"meTmwKOIyGCbbbbANbbbbbbbbH">> = iolist_to_binary(re:replace("bbbb","([ab]*)*","meTmwK\\1OIy\\1GC&AN&&H",[])),
+ <<"meTmwKOIyGCbbbbANbbbbbbbbHmeTmwKOIyGCANH">> = iolist_to_binary(re:replace("bbbb","([ab]*)*","meTmwK\\1OIy\\1GC&AN&&H",[global])),
+ <<"nbjCbhrDRrlgSUiVJ">> = iolist_to_binary(re:replace("b","([^a]*)*","nbjC&hrDRrlgSUiV\\1J",[])),
+ <<"nbjCbhrDRrlgSUiVJnbjChrDRrlgSUiVJ">> = iolist_to_binary(re:replace("b","([^a]*)*","nbjC&hrDRrlgSUiV\\1J",[global])),
+ <<"EDtjVbbbbKGDbbbbmbbbbwKLjiR">> = iolist_to_binary(re:replace("bbbb","([^a]*)*","EDtjV&KGD&m&wK\\1Lj\\1iR",[])),
+ <<"EDtjVbbbbKGDbbbbmbbbbwKLjiREDtjVKGDmwKLjiR">> = iolist_to_binary(re:replace("bbbb","([^a]*)*","EDtjV&KGD&m&wK\\1Lj\\1iR",[global])),
+ <<"HlaUYcKUiWycCnKHNaaa">> = iolist_to_binary(re:replace("aaa","([^a]*)*","HlaUYcKUiWycCnKH\\1N",[])),
+ <<"HlaUYcKUiWycCnKHNaHlaUYcKUiWycCnKHNaHlaUYcKUiWycCnKHNaHlaUYcKUiWycCnKHN">> = iolist_to_binary(re:replace("aaa","([^a]*)*","HlaUYcKUiWycCnKH\\1N",[global])),
+ <<"eaccccgCccccOYNUlccccTcccc">> = iolist_to_binary(re:replace("cccc","([^ab]*)*","ea&g\\1C&OYNUl&\\1T&",[])),
+ <<"eaccccgCccccOYNUlccccTcccceagCOYNUlT">> = iolist_to_binary(re:replace("cccc","([^ab]*)*","ea&g\\1C&OYNUl&\\1T&",[global])),
+ <<"JyKBqDRhnabab">> = iolist_to_binary(re:replace("abab","([^ab]*)*","Jy&\\1KBqDRhn",[])),
+ <<"JyKBqDRhnaJyKBqDRhnbJyKBqDRhnaJyKBqDRhnbJyKBqDRhn">> = iolist_to_binary(re:replace("abab","([^ab]*)*","Jy&\\1KBqDRhn",[global])),
+ <<"vnligHISDuDiBa">> = iolist_to_binary(re:replace("a","([a]*?)*","v\\1nli&\\1gHISDuD\\1iB",[])),
+ <<"vnligHISDuDiBvnliagHISDuDiBvnligHISDuDiB">> = iolist_to_binary(re:replace("a","([a]*?)*","v\\1nli&\\1gHISDuD\\1iB",[global])),
+ <<"CrarAftguXnYNULohKyaaaa">> = iolist_to_binary(re:replace("aaaa","([a]*?)*","CrarAftguXnYN&ULohKy",[])),
+ <<"CrarAftguXnYNULohKyCrarAftguXnYNaULohKyCrarAftguXnYNULohKyCrarAftguXnYNaULohKyCrarAftguXnYNULohKyCrarAftguXnYNaULohKyCrarAftguXnYNULohKyCrarAftguXnYNaULohKyCrarAftguXnYNULohKy">> = iolist_to_binary(re:replace("aaaa","([a]*?)*","CrarAftguXnYN&ULohKy",[global])),
+ <<"BOfINa">> = iolist_to_binary(re:replace("a","([ab]*?)*","B&OfIN&",[])),
+ <<"BOfINBaOfINaBOfIN">> = iolist_to_binary(re:replace("a","([ab]*?)*","B&OfIN&",[global])),
+ <<"HBxFab">> = iolist_to_binary(re:replace("b","([ab]*?)*","H\\1\\1BxF\\1a",[])),
+ <<"HBxFaHBxFaHBxFa">> = iolist_to_binary(re:replace("b","([ab]*?)*","H\\1\\1BxF\\1a",[global])),
+ <<"rkuWEckrabab">> = iolist_to_binary(re:replace("abab","([ab]*?)*","rkuWEc\\1kr",[])),
+ <<"rkuWEckrrkuWEckrrkuWEckrrkuWEckrrkuWEckrrkuWEckrrkuWEckrrkuWEckrrkuWEckr">> = iolist_to_binary(re:replace("abab","([ab]*?)*","rkuWEc\\1kr",[global])),
+ <<"dedrbsbaba">> = iolist_to_binary(re:replace("baba","([ab]*?)*","dedrbs",[])),
+ <<"dedrbsdedrbsdedrbsdedrbsdedrbsdedrbsdedrbsdedrbsdedrbs">> = iolist_to_binary(re:replace("baba","([ab]*?)*","dedrbs",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","([^a]*?)*","\\1",[])),
+ <<"">> = iolist_to_binary(re:replace("b","([^a]*?)*","\\1",[global])),
+ <<"rrARQqtjsbbbb">> = iolist_to_binary(re:replace("bbbb","([^a]*?)*","rr&ARQq\\1\\1tjs",[])),
+ <<"rrARQqtjsrrbARQqtjsrrARQqtjsrrbARQqtjsrrARQqtjsrrbARQqtjsrrARQqtjsrrbARQqtjsrrARQqtjs">> = iolist_to_binary(re:replace("bbbb","([^a]*?)*","rr&ARQq\\1\\1tjs",[global])),
+ <<"PGcsmlReJQeaaa">> = iolist_to_binary(re:replace("aaa","([^a]*?)*","PGcsm&&lReJQe&",[])),
+ <<"PGcsmlReJQeaPGcsmlReJQeaPGcsmlReJQeaPGcsmlReJQe">> = iolist_to_binary(re:replace("aaa","([^a]*?)*","PGcsm&&lReJQe&",[global])),
+ <<"nuspMpmvVOsyyChRc">> = iolist_to_binary(re:replace("c","([^ab]*?)*","nusp&Mp\\1mvVOsyyChR",[])),
+ <<"nuspMpmvVOsyyChRnuspcMpmvVOsyyChRnuspMpmvVOsyyChR">> = iolist_to_binary(re:replace("c","([^ab]*?)*","nusp&Mp\\1mvVOsyyChR",[global])),
+ <<"GbhjrQmJMQvcccc">> = iolist_to_binary(re:replace("cccc","([^ab]*?)*","Gbhj&rQmJMQv",[])),
+ <<"GbhjrQmJMQvGbhjcrQmJMQvGbhjrQmJMQvGbhjcrQmJMQvGbhjrQmJMQvGbhjcrQmJMQvGbhjrQmJMQvGbhjcrQmJMQvGbhjrQmJMQv">> = iolist_to_binary(re:replace("cccc","([^ab]*?)*","Gbhj&rQmJMQv",[global])),
+ <<"qlNFbaba">> = iolist_to_binary(re:replace("baba","([^ab]*?)*","qlNF",[])),
+ <<"qlNFbqlNFaqlNFbqlNFaqlNF">> = iolist_to_binary(re:replace("baba","([^ab]*?)*","qlNF",[global])),
+ <<"KQaNecIrOxNy">> = iolist_to_binary(re:replace("a","(?>a*)*","KQ\\1&NecIrOxNy",[])),
+ <<"KQaNecIrOxNyKQNecIrOxNy">> = iolist_to_binary(re:replace("a","(?>a*)*","KQ\\1&NecIrOxNy",[global])),
+ <<"VSaaaJEKwmaaaUrFoAmveCbcde">> = iolist_to_binary(re:replace("aaabcde","(?>a*)*","VS&JEKwm&UrFoAmv\\1eC",[])),
+ <<"VSaaaJEKwmaaaUrFoAmveCVSJEKwmUrFoAmveCbVSJEKwmUrFoAmveCcVSJEKwmUrFoAmveCdVSJEKwmUrFoAmveCeVSJEKwmUrFoAmveC">> = iolist_to_binary(re:replace("aaabcde","(?>a*)*","VS&JEKwm&UrFoAmv\\1eC",[global])),
+ <<"UCWWaaaaaSi">> = iolist_to_binary(re:replace("aaaaa","((?>a*))*","UCW\\1W&Si",[])),
+ <<"UCWWaaaaaSiUCWWSi">> = iolist_to_binary(re:replace("aaaaa","((?>a*))*","UCW\\1W&Si",[global])),
+ <<"Ynbbaa">> = iolist_to_binary(re:replace("aabbaa","((?>a*))*","Yn",[])),
+ <<"YnYnbYnbYnYn">> = iolist_to_binary(re:replace("aabbaa","((?>a*))*","Yn",[global])),
+ ok.
+run14() ->
+ <<"MLgsOWdfTvaaaaa">> = iolist_to_binary(re:replace("aaaaa","((?>a*?))*","MLgs&OW\\1df&T&v",[])),
+ <<"MLgsOWdfTvaMLgsOWdfTvaMLgsOWdfTvaMLgsOWdfTvaMLgsOWdfTvaMLgsOWdfTv">> = iolist_to_binary(re:replace("aaaaa","((?>a*?))*","MLgs&OW\\1df&T&v",[global])),
+ <<"aabbaa">> = iolist_to_binary(re:replace("aabbaa","((?>a*?))*","&",[])),
+ <<"aabbaa">> = iolist_to_binary(re:replace("aabbaa","((?>a*?))*","&",[global])),
+ <<"gTBVcFPFf12-sep-98nd">> = iolist_to_binary(re:replace("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","gTBVcFPFf&\\1nd",[extended])),
+ <<"gTBVcFPFf12-sep-98nd">> = iolist_to_binary(re:replace("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","gTBVcFPFf&\\1nd",[extended,
+ global])),
+ <<"12-09-98h12-09-98Vrh12-09-98">> = iolist_to_binary(re:replace("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","&h&\\1Vrh\\1&",[extended])),
+ <<"12-09-98h12-09-98Vrh12-09-98">> = iolist_to_binary(re:replace("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","&h&\\1Vrh\\1&",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","W&ve&i&",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","W&ve&i&",[extended,
+ global])),
+ <<"sep-12-98">> = iolist_to_binary(re:replace("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","UrC",[extended])),
+ <<"sep-12-98">> = iolist_to_binary(re:replace("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ","UrC",[extended,
+ global])),
+ <<"foodfooCEjVBAfoo">> = iolist_to_binary(re:replace("foobarfoo","(?<=(foo))bar\\1","d\\1CEjVBA\\1",[])),
+ <<"foodfooCEjVBAfoo">> = iolist_to_binary(re:replace("foobarfoo","(?<=(foo))bar\\1","d\\1CEjVBA\\1",[global])),
+ <<"foovctling">> = iolist_to_binary(re:replace("foobarfootling","(?<=(foo))bar\\1","vc",[])),
+ <<"foovctling">> = iolist_to_binary(re:replace("foobarfootling","(?<=(foo))bar\\1","vc",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo))bar\\1","UXvqXj\\1yXDrW\\1&UV&aD",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(foo))bar\\1","UXvqXj\\1yXDrW\\1&UV&aD",[global])),
+ <<"foobar">> = iolist_to_binary(re:replace("foobar","(?<=(foo))bar\\1","VWpBPnVuwGDg",[])),
+ <<"foobar">> = iolist_to_binary(re:replace("foobar","(?<=(foo))bar\\1","VWpBPnVuwGDg",[global])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<=(foo))bar\\1","&jX",[])),
+ <<"barfoo">> = iolist_to_binary(re:replace("barfoo","(?<=(foo))bar\\1","&jX",[global])),
+ <<"sQWfkfUNJnPcyC">> = iolist_to_binary(re:replace("saturday","(?i:saturday|sunday)","sQ\\1Wf\\1kfUNJnPcyC",[])),
+ <<"sQWfkfUNJnPcyC">> = iolist_to_binary(re:replace("saturday","(?i:saturday|sunday)","sQ\\1Wf\\1kfUNJnPcyC",[global])),
+ <<"xWJnRsundayofsundayP">> = iolist_to_binary(re:replace("sunday","(?i:saturday|sunday)","xWJn\\1R&of\\1&P",[])),
+ <<"xWJnRsundayofsundayP">> = iolist_to_binary(re:replace("sunday","(?i:saturday|sunday)","xWJn\\1R&of\\1&P",[global])),
+ <<"SaturdayWo">> = iolist_to_binary(re:replace("Saturday","(?i:saturday|sunday)","&W\\1o",[])),
+ <<"SaturdayWo">> = iolist_to_binary(re:replace("Saturday","(?i:saturday|sunday)","&W\\1o",[global])),
+ <<"TdQtxuqoDxI">> = iolist_to_binary(re:replace("Sunday","(?i:saturday|sunday)","TdQtxuqoDxI",[])),
+ <<"TdQtxuqoDxI">> = iolist_to_binary(re:replace("Sunday","(?i:saturday|sunday)","TdQtxuqoDxI",[global])),
+ <<"tSATURDAYpA">> = iolist_to_binary(re:replace("SATURDAY","(?i:saturday|sunday)","t&\\1pA",[])),
+ <<"tSATURDAYpA">> = iolist_to_binary(re:replace("SATURDAY","(?i:saturday|sunday)","t&\\1pA",[global])),
+ <<"PSUNDAYVdHPKeqeCHsbPht">> = iolist_to_binary(re:replace("SUNDAY","(?i:saturday|sunday)","P&VdHPKeqeCH\\1sbPht",[])),
+ <<"PSUNDAYVdHPKeqeCHsbPht">> = iolist_to_binary(re:replace("SUNDAY","(?i:saturday|sunday)","P&VdHPKeqeCH\\1sbPht",[global])),
+ <<"ADh">> = iolist_to_binary(re:replace("SunDay","(?i:saturday|sunday)","A\\1D\\1h\\1",[])),
+ <<"ADh">> = iolist_to_binary(re:replace("SunDay","(?i:saturday|sunday)","A\\1D\\1h\\1",[global])),
+ <<"mGKtRabcxPabcxJ">> = iolist_to_binary(re:replace("abcx","(a(?i)bc|BB)x","mGKtR&P&J",[])),
+ <<"mGKtRabcxPabcxJ">> = iolist_to_binary(re:replace("abcx","(a(?i)bc|BB)x","mGKtR&P&J",[global])),
+ <<"oaBCxMk">> = iolist_to_binary(re:replace("aBCx","(a(?i)bc|BB)x","o&Mk",[])),
+ <<"oaBCxMk">> = iolist_to_binary(re:replace("aBCx","(a(?i)bc|BB)x","o&Mk",[global])),
+ <<"BbbxAbbbbw">> = iolist_to_binary(re:replace("bbx","(a(?i)bc|BB)x","B&A\\1\\1w",[])),
+ <<"BbbxAbbbbw">> = iolist_to_binary(re:replace("bbx","(a(?i)bc|BB)x","B&A\\1\\1w",[global])),
+ <<"mJcBBAxatfogiBBBBOBBxw">> = iolist_to_binary(re:replace("BBx","(a(?i)bc|BB)x","mJc\\1Axatfogi\\1\\1O&w",[])),
+ <<"mJcBBAxatfogiBBBBOBBxw">> = iolist_to_binary(re:replace("BBx","(a(?i)bc|BB)x","mJc\\1Axatfogi\\1\\1O&w",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)bc|BB)x","snLiVTr\\1v&GcLOx",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(a(?i)bc|BB)x","snLiVTr\\1v&GcLOx",[global])),
+ <<"abcX">> = iolist_to_binary(re:replace("abcX","(a(?i)bc|BB)x","cUgeDoMeUddk\\1X&",[])),
+ <<"abcX">> = iolist_to_binary(re:replace("abcX","(a(?i)bc|BB)x","cUgeDoMeUddk\\1X&",[global])),
+ <<"aBCX">> = iolist_to_binary(re:replace("aBCX","(a(?i)bc|BB)x","x\\1a&yaxHWdGs&udxU",[])),
+ <<"aBCX">> = iolist_to_binary(re:replace("aBCX","(a(?i)bc|BB)x","x\\1a&yaxHWdGs&udxU",[global])),
+ <<"bbX">> = iolist_to_binary(re:replace("bbX","(a(?i)bc|BB)x","AmUQ&rURn&&",[])),
+ <<"bbX">> = iolist_to_binary(re:replace("bbX","(a(?i)bc|BB)x","AmUQ&rURn&&",[global])),
+ <<"BBX">> = iolist_to_binary(re:replace("BBX","(a(?i)bc|BB)x","&\\1bNvEcoUrediWbu&Pbp",[])),
+ <<"BBX">> = iolist_to_binary(re:replace("BBX","(a(?i)bc|BB)x","&\\1bNvEcoUrediWbu&Pbp",[global])),
+ <<"UvDhoExRiacBIgOkt">> = iolist_to_binary(re:replace("ac","^([ab](?i)[cd]|[ef])","UvDhoExRi&BIgOkt",[])),
+ <<"UvDhoExRiacBIgOkt">> = iolist_to_binary(re:replace("ac","^([ab](?i)[cd]|[ef])","UvDhoExRi&BIgOkt",[global])),
+ <<"xPaCaCRDAtETUaCMGcb">> = iolist_to_binary(re:replace("aC","^([ab](?i)[cd]|[ef])","xP&\\1RDAtETU\\1MGcb",[])),
+ <<"xPaCaCRDAtETUaCMGcb">> = iolist_to_binary(re:replace("aC","^([ab](?i)[cd]|[ef])","xP&\\1RDAtETU\\1MGcb",[global])),
+ <<"YrbDPg">> = iolist_to_binary(re:replace("bD","^([ab](?i)[cd]|[ef])","Yr&Pg",[])),
+ <<"YrbDPg">> = iolist_to_binary(re:replace("bD","^([ab](?i)[cd]|[ef])","Yr&Pg",[global])),
+ <<"vxPeqqmHlephant">> = iolist_to_binary(re:replace("elephant","^([ab](?i)[cd]|[ef])","vxP&qqmH",[])),
+ <<"vxPeqqmHlephant">> = iolist_to_binary(re:replace("elephant","^([ab](?i)[cd]|[ef])","vxP&qqmH",[global])),
+ <<"CXttEDburope">> = iolist_to_binary(re:replace("Europe","^([ab](?i)[cd]|[ef])","CXtt\\1Db",[])),
+ <<"CXttEDburope">> = iolist_to_binary(re:replace("Europe","^([ab](?i)[cd]|[ef])","CXtt\\1Db",[global])),
+ <<"ckdAsOrog">> = iolist_to_binary(re:replace("frog","^([ab](?i)[cd]|[ef])","ckdAsO",[])),
+ <<"ckdAsOrog">> = iolist_to_binary(re:replace("frog","^([ab](?i)[cd]|[ef])","ckdAsO",[global])),
+ <<"FLAarance">> = iolist_to_binary(re:replace("France","^([ab](?i)[cd]|[ef])","\\1LAa",[])),
+ <<"FLAarance">> = iolist_to_binary(re:replace("France","^([ab](?i)[cd]|[ef])","\\1LAa",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([ab](?i)[cd]|[ef])","&dK",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^([ab](?i)[cd]|[ef])","&dK",[global])),
+ <<"Africa">> = iolist_to_binary(re:replace("Africa","^([ab](?i)[cd]|[ef])","he&mN&m",[])),
+ <<"Africa">> = iolist_to_binary(re:replace("Africa","^([ab](?i)[cd]|[ef])","he&mN&m",[global])),
+ <<"QwnababababWRxgc">> = iolist_to_binary(re:replace("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","Qwn&\\1\\1&WRxgc",[])),
+ <<"QwnababababWRxgc">> = iolist_to_binary(re:replace("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","Qwn&\\1\\1&WRxgc",[global])),
+ <<"alixQPHvMhCA">> = iolist_to_binary(re:replace("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","alixQPHvMhCA",[])),
+ <<"alixQPHvMhCA">> = iolist_to_binary(re:replace("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","alixQPHvMhCA",[global])),
+ <<"fRTxgJVEjxyBxyliXrOuh">> = iolist_to_binary(re:replace("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","fRTxgJVEj\\1B\\1liXrOuh",[])),
+ <<"fRTxgJVEjxyBxyliXrOuh">> = iolist_to_binary(re:replace("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","fRTxgJVEj\\1B\\1liXrOuh",[global])),
+ <<"xYRFpytKCFxYlEt">> = iolist_to_binary(re:replace("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&RFpytKCF&lEt",[])),
+ <<"xYRFpytKCFxYlEt">> = iolist_to_binary(re:replace("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&RFpytKCF&lEt",[global])),
+ <<"vgzjebra">> = iolist_to_binary(re:replace("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","vg&j",[])),
+ <<"vgzjebra">> = iolist_to_binary(re:replace("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","vg&j",[global])),
+ <<"eZFmjyambesi">> = iolist_to_binary(re:replace("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","e&Fmjy",[])),
+ <<"eZFmjyambesi">> = iolist_to_binary(re:replace("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","e&Fmjy",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","a",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","a",[global])),
+ <<"aCD">> = iolist_to_binary(re:replace("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","gEOo",[])),
+ <<"aCD">> = iolist_to_binary(re:replace("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","gEOo",[global])),
+ <<"XY">> = iolist_to_binary(re:replace("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&OrTvY&r\\1a\\1tNgO\\1",[])),
+ <<"XY">> = iolist_to_binary(re:replace("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)","&OrTvY&r\\1a\\1tNgO\\1",[global])),
+ <<"foo
+sutSyiAVbardY">> = iolist_to_binary(re:replace("foo
+bar","(?<=foo\\n)^bar","sutSyiAV&dY",[multiline])),
+ <<"foo
+sutSyiAVbardY">> = iolist_to_binary(re:replace("foo
+bar","(?<=foo\\n)^bar","sutSyiAV&dY",[multiline,global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=foo\\n)^bar","SbD\\1F&CKeqGUc\\1&",[multiline])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=foo\\n)^bar","SbD\\1F&CKeqGUc\\1&",[multiline,
+ global])),
+ <<"bar">> = iolist_to_binary(re:replace("bar","(?<=foo\\n)^bar","yi&DP",[multiline])),
+ <<"bar">> = iolist_to_binary(re:replace("bar","(?<=foo\\n)^bar","yi&DP",[multiline,
+ global])),
+ <<"baz
bar">> = iolist_to_binary(re:replace("baz
-bar","(?<=foo\\n)^bar","&JIhqO&Da",[multiline])),
-?line <<"baz
+bar","(?<=foo\\n)^bar","hGG",[multiline])),
+ <<"baz
bar">> = iolist_to_binary(re:replace("baz
-bar","(?<=foo\\n)^bar","&JIhqO&Da",[multiline,global])),
-?line <<"baruQUCmWhYKFBWj">> = iolist_to_binary(re:replace("barbaz","(?<=(?<!foo)bar)baz","uQUCmWhYKF\\1BWj\\1",[])),
-?line <<"baruQUCmWhYKFBWj">> = iolist_to_binary(re:replace("barbaz","(?<=(?<!foo)bar)baz","uQUCmWhYKF\\1BWj\\1",[global])),
-?line <<"barbarTNMlbazRYUbazYJyQER">> = iolist_to_binary(re:replace("barbarbaz","(?<=(?<!foo)bar)baz","TNMl\\1&RYU&YJyQER",[])),
-?line <<"barbarTNMlbazRYUbazYJyQER">> = iolist_to_binary(re:replace("barbarbaz","(?<=(?<!foo)bar)baz","TNMl\\1&RYU&YJyQER",[global])),
-?line <<"koobarxhTvv">> = iolist_to_binary(re:replace("koobarbaz","(?<=(?<!foo)bar)baz","xhTvv\\1",[])),
-?line <<"koobarxhTvv">> = iolist_to_binary(re:replace("koobarbaz","(?<=(?<!foo)bar)baz","xhTvv\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?<!foo)bar)baz","uHmyIQ&yV&hQ&Di&\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?<!foo)bar)baz","uHmyIQ&yV&hQ&Di&\\1",[global])),
-?line <<"baz">> = iolist_to_binary(re:replace("baz","(?<=(?<!foo)bar)baz","B",[])),
-?line <<"baz">> = iolist_to_binary(re:replace("baz","(?<=(?<!foo)bar)baz","B",[global])),
-?line <<"foobarbaz">> = iolist_to_binary(re:replace("foobarbaz","(?<=(?<!foo)bar)baz","BuNXYgf",[])),
-?line <<"foobarbaz">> = iolist_to_binary(re:replace("foobarbaz","(?<=(?<!foo)bar)baz","BuNXYgf",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?){4}$","N\\1&Psi",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?){4}$","N\\1&Psi",[global])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?){4}$","&",[])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?){4}$","&",[global])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?){4}$","\\1OPhpdjl&J&F&j",[])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?){4}$","\\1OPhpdjl&J&F&j",[global])),
-?line <<"oEaaPaaaaFyHMpKbNxCqlyG">> = iolist_to_binary(re:replace("aaaa","^(a\\1?){4}$","oE\\1\\1P&FyHMpKbNxCqlyG",[])),
-?line <<"oEaaPaaaaFyHMpKbNxCqlyG">> = iolist_to_binary(re:replace("aaaa","^(a\\1?){4}$","oE\\1\\1P&FyHMpKbNxCqlyG",[global])),
-?line <<"aaaaaawR">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?){4}$","\\1&wR",[])),
-?line <<"aaaaaawR">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?){4}$","\\1&wR",[global])),
-?line <<"SaWUrMlNUaaaaaaaaaaaaaan">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?){4}$","S\\1WUrMlNU&&n",[])),
-?line <<"SaWUrMlNUaaaaaaaaaaaaaan">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?){4}$","S\\1WUrMlNU&&n",[global])),
-?line <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?){4}$","Vk&&RgxI\\1\\1pJ&&",[])),
-?line <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?){4}$","Vk&&RgxI\\1\\1pJ&&",[global])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","x",[])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","x",[global])),
-?line <<"FEkJCFraaaaaaaaaaaaaaaaaaaaMlwosy">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","FEkJCFr&&Mlwosy",[])),
-?line <<"FEkJCFraaaaaaaaaaaaaaaaaaaaMlwosy">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","FEkJCFr&&Mlwosy",[global])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","&IO",[])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","&IO",[global])),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?){4}$","lKw",[])),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?){4}$","lKw",[global])),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?){4}$","nN&bSVJh\\1J\\1d&Ko",[])),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?){4}$","nN&bSVJh\\1J\\1d&Ko",[global])),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?){4}$","Fut\\1X\\1",[])),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?){4}$","Fut\\1X\\1",[global])),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?){4}$","v",[])),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?){4}$","v",[global])),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?){4}$","b",[])),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?){4}$","b",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","VC",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","VC",[global])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","&&mKsMkXfPP",[])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","&&mKsMkXfPP",[global])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","c\\1HhkFrF&vy&\\1bmNHPw",[])),
-?line <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","c\\1HhkFrF&vy&\\1bmNHPw",[global])),
-?line <<"SnJcTQRFQiat">> = iolist_to_binary(re:replace("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","SnJcTQRFQi\\1t",[])),
-?line <<"SnJcTQRFQiat">> = iolist_to_binary(re:replace("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","SnJcTQRFQi\\1t",[global])),
-?line <<"MaaaaakiYfFeaaaaaetD">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","M&kiYfFe&etD",[])),
-?line <<"MaaaaakiYfFeaaaaaetD">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","M&kiYfFe&etD",[global])),
-?line <<"WDaaaaaasEn">> = iolist_to_binary(re:replace("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","WD&sEn",[])),
-?line <<"WDaaaaaasEn">> = iolist_to_binary(re:replace("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","WD&sEn",[global])),
-?line <<"sauvrqyMaaaaaaaEvrD">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","s\\1uvrqyM&EvrD",[])),
-?line <<"sauvrqyMaaaaaaaEvrD">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","s\\1uvrqyM&EvrD",[global])),
-?line <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","WyhxEMLFTAGuL&Hymc",[])),
-?line <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","WyhxEMLFTAGuL&Hymc",[global])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","\\1WXGI&T&rPigX\\1IAQu",[])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","\\1WXGI&T&rPigX\\1IAQu",[global])),
-?line <<"HaaaaaaaaaajHUn">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","H&jHUn",[])),
-?line <<"HaaaaaaaaaajHUn">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","H&jHUn",[global])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","e",[])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","e",[global])),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dSM\\1GGkyX&xNUIVG&",[])),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dSM\\1GGkyX&xNUIVG&",[global])),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","p\\1T",[])),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","p\\1T",[global])),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","wOWcxD\\1e&",[])),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","wOWcxD\\1e&",[global])),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","C&CWw&kAen&",[])),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","C&CWw&kAen&",[global])),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","rkiiFEQ&WDahG&lSqR",[])),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","rkiiFEQ&WDahG&lSqR",[global])),
-?line <<"babcoabcabcESPlWKsDDog">> = iolist_to_binary(re:replace("abc","abc","b&o&&\\1ES\\1\\1PlWKsD\\1Dog",[])),
-?line <<"babcoabcabcESPlWKsDDog">> = iolist_to_binary(re:replace("abc","abc","b&o&&\\1ES\\1\\1PlWKsD\\1Dog",[global])),
-?line <<"xFfvcJy">> = iolist_to_binary(re:replace("xabcy","abc","FfvcJ",[])),
-?line <<"xFfvcJy">> = iolist_to_binary(re:replace("xabcy","abc","FfvcJ",[global])),
-?line <<"abaGvHrWEIIXoI">> = iolist_to_binary(re:replace("ababc","abc","a\\1\\1G\\1v\\1HrWEIIXoI\\1",[])),
-?line <<"abaGvHrWEIIXoI">> = iolist_to_binary(re:replace("ababc","abc","a\\1\\1G\\1v\\1HrWEIIXoI\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","DOtxCgk&UIBKmk\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","DOtxCgk&UIBKmk\\1",[global])),
-?line <<"xbc">> = iolist_to_binary(re:replace("xbc","abc","qmfvVTE\\1aHl\\1BT&U",[])),
-?line <<"xbc">> = iolist_to_binary(re:replace("xbc","abc","qmfvVTE\\1aHl\\1BT&U",[global])),
-?line <<"axc">> = iolist_to_binary(re:replace("axc","abc","uN&yFKoX\\1pBswe\\1HLf",[])),
-?line <<"axc">> = iolist_to_binary(re:replace("axc","abc","uN&yFKoX\\1pBswe\\1HLf",[global])),
-?line <<"abx">> = iolist_to_binary(re:replace("abx","abc","&v\\1\\1QwMhqY",[])),
-?line <<"abx">> = iolist_to_binary(re:replace("abx","abc","&v\\1\\1QwMhqY",[global])),
-?line <<"FIOGpcHeabcNHJ">> = iolist_to_binary(re:replace("abc","ab*c","FIOGpcHe&NHJ",[])),
-?line <<"FIOGpcHeabcNHJ">> = iolist_to_binary(re:replace("abc","ab*c","FIOGpcHe&NHJ",[global])),
-?line <<"abcbnCUabcnxKKHabcXVaO">> = iolist_to_binary(re:replace("abc","ab*bc","&bnCU&n\\1xKKH&\\1XVaO",[])),
-?line <<"abcbnCUabcnxKKHabcXVaO">> = iolist_to_binary(re:replace("abc","ab*bc","&bnCU&n\\1xKKH&\\1XVaO",[global])),
-?line <<"bFtejUbnDA">> = iolist_to_binary(re:replace("abbc","ab*bc","bFtejUbn\\1DA",[])),
-?line <<"bFtejUbnDA">> = iolist_to_binary(re:replace("abbc","ab*bc","bFtejUbn\\1DA",[global])),
-?line <<"W">> = iolist_to_binary(re:replace("abbbbc","ab*bc","W",[])),
-?line <<"W">> = iolist_to_binary(re:replace("abbbbc","ab*bc","W",[global])),
-?line <<"BlaEararHKSGaabbbbc">> = iolist_to_binary(re:replace("abbbbc",".{1}","Bl&E&r&r\\1HKSG&&\\1",[])),
-?line <<"BlaEararHKSGaaBlbEbrbrHKSGbbBlbEbrbrHKSGbbBlbEbrbrHKSGbbBlbEbrbrHKSGbbBlcEcrcrHKSGcc">> = iolist_to_binary(re:replace("abbbbc",".{1}","Bl&E&r&r\\1HKSG&&\\1",[global])),
-?line <<"pabbbcRXxcEabbbIabbbXTbc">> = iolist_to_binary(re:replace("abbbbc",".{3,4}","p&cRXxcE&I&XT",[])),
-?line <<"pabbbcRXxcEabbbIabbbXTbc">> = iolist_to_binary(re:replace("abbbbc",".{3,4}","p&cRXxcE&I&XT",[global])),
-?line <<"HkIFCqCBaabbbbcyHm">> = iolist_to_binary(re:replace("abbbbc","ab{0,}bc","Hk\\1IFCq\\1CBa&yHm",[])),
-?line <<"HkIFCqCBaabbbbcyHm">> = iolist_to_binary(re:replace("abbbbc","ab{0,}bc","Hk\\1IFCq\\1CBa&yHm",[global])),
-?line <<"HBKHabbcHxdabbciuxleGabbc">> = iolist_to_binary(re:replace("abbc","ab+bc","HBKH&\\1Hx\\1d&iuxleG&",[])),
-?line <<"HBKHabbcHxdabbciuxleGabbc">> = iolist_to_binary(re:replace("abbc","ab+bc","HBKH&\\1Hx\\1d&iuxleG&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","&Pm&sRjS",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","&Pm&sRjS",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","ab+bc","IiWLkYFrIIhMk\\1D\\1vagP",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","ab+bc","IiWLkYFrIIhMk\\1D\\1vagP",[global])),
-?line <<"abq">> = iolist_to_binary(re:replace("abq","ab+bc","&\\1\\1UiX\\1&MgPB",[])),
-?line <<"abq">> = iolist_to_binary(re:replace("abq","ab+bc","&\\1\\1UiX\\1&MgPB",[global])),
-?line <<"WLvlqVMuiA">> = iolist_to_binary(re:replace("abbbbc","ab+bc","WLvlqVMuiA",[])),
-?line <<"WLvlqVMuiA">> = iolist_to_binary(re:replace("abbbbc","ab+bc","WLvlqVMuiA",[global])),
-?line <<"qQ">> = iolist_to_binary(re:replace("abbbbc","ab{1,}bc","qQ",[])),
-?line <<"qQ">> = iolist_to_binary(re:replace("abbbbc","ab{1,}bc","qQ",[global])),
-?line <<"ALwvHVhFGH">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","A\\1LwvHVhFGH",[])),
-?line <<"ALwvHVhFGH">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","A\\1LwvHVhFGH",[global])),
-?line <<"ORLsuabbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{3,4}bc","ORL\\1su&",[])),
-?line <<"ORLsuabbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{3,4}bc","ORL\\1su&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}bc","APwPKjxS\\1Di&\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}bc","APwPKjxS\\1Di&\\1",[global])),
-?line <<"abq">> = iolist_to_binary(re:replace("abq","ab{4,5}bc","FVk",[])),
-?line <<"abq">> = iolist_to_binary(re:replace("abq","ab{4,5}bc","FVk",[global])),
-?line <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{4,5}bc","PO&t",[])),
-?line <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{4,5}bc","PO&t",[global])),
-?line <<"EHtIXyQbabbclaCBg">> = iolist_to_binary(re:replace("abbc","ab?bc","EHtIXyQb&laCBg",[])),
-?line <<"EHtIXyQbabbclaCBg">> = iolist_to_binary(re:replace("abbc","ab?bc","EHtIXyQb&laCBg",[global])),
-?line <<"SVx">> = iolist_to_binary(re:replace("abc","ab?bc","SVx",[])),
-?line <<"SVx">> = iolist_to_binary(re:replace("abc","ab?bc","SVx",[global])),
-?line <<"KJabcWtBNRX">> = iolist_to_binary(re:replace("abc","ab{0,1}bc","KJ&WtBNRX",[])),
-?line <<"KJabcWtBNRX">> = iolist_to_binary(re:replace("abc","ab{0,1}bc","KJ&WtBNRX",[global])),
-?line <<"oabcQlOwmmeXxTySSV">> = iolist_to_binary(re:replace("abc","ab?c","o&Q\\1lOwmmeXx\\1TySSV",[])),
-?line <<"oabcQlOwmmeXxTySSV">> = iolist_to_binary(re:replace("abc","ab?c","o&Q\\1lOwmmeXx\\1TySSV",[global])),
-?line <<"abcQpPYPtQcFabcCDEcWOl">> = iolist_to_binary(re:replace("abc","ab{0,1}c","&QpPY\\1PtQcF&CDEcWOl",[])),
-?line <<"abcQpPYPtQcFabcCDEcWOl">> = iolist_to_binary(re:replace("abc","ab{0,1}c","&QpPY\\1PtQcF&CDEcWOl",[global])),
-?line <<"YbB">> = iolist_to_binary(re:replace("abc","^abc$","YbB",[])),
-?line <<"YbB">> = iolist_to_binary(re:replace("abc","^abc$","YbB",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","r&t\\1OLYfC",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","r&t\\1OLYfC",[global])),
-?line <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","^abc$","P&QwAxc\\1vYfQF",[])),
-?line <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","^abc$","P&QwAxc\\1vYfQF",[global])),
-?line <<"abcc">> = iolist_to_binary(re:replace("abcc","^abc$","d\\1j&LhAN\\1JvojhyCmSwU",[])),
-?line <<"abcc">> = iolist_to_binary(re:replace("abcc","^abc$","d\\1j&LhAN\\1JvojhyCmSwU",[global])),
-?line <<"yabcxAc">> = iolist_to_binary(re:replace("abcc","^abc","y\\1&xA",[])),
-?line <<"yabcxAc">> = iolist_to_binary(re:replace("abcc","^abc","y\\1&xA",[global])),
-?line <<"awrOx">> = iolist_to_binary(re:replace("aabc","abc$","wrOx",[])),
-?line <<"awrOx">> = iolist_to_binary(re:replace("aabc","abc$","wrOx",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","XLe",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","XLe",[global])),
-?line <<"aRthCinfyGSJTg">> = iolist_to_binary(re:replace("aabc","abc$","\\1RthCi\\1nfyGSJTg",[])),
-?line <<"aRthCinfyGSJTg">> = iolist_to_binary(re:replace("aabc","abc$","\\1RthCi\\1nfyGSJTg",[global])),
-?line <<"aabcd">> = iolist_to_binary(re:replace("aabcd","abc$","UT&CPLaUA\\1nluQPA",[])),
-?line <<"aabcd">> = iolist_to_binary(re:replace("aabcd","abc$","UT&CPLaUA\\1nluQPA",[global])),
-?line <<"hYaxcodDoHwNTLtDQoabc">> = iolist_to_binary(re:replace("abc","^","hYaxc&o&dDoHwNTLtDQo",[])),
-?line <<"hYaxcodDoHwNTLtDQoabc">> = iolist_to_binary(re:replace("abc","^","hYaxc&o&dDoHwNTLtDQo",[global])),
-?line <<"abcepxRqYNdJMdQeRKr">> = iolist_to_binary(re:replace("abc","$","epxRqYNdJ&MdQeR&Kr",[])),
-?line <<"abcepxRqYNdJMdQeRKr">> = iolist_to_binary(re:replace("abc","$","epxRqYNdJ&MdQeR&Kr",[global])),
-?line <<"vnabcXvSRrFjWv">> = iolist_to_binary(re:replace("abc","a.c","\\1vn&X\\1vSRrFj\\1Wv",[])),
-?line <<"vnabcXvSRrFjWv">> = iolist_to_binary(re:replace("abc","a.c","\\1vn&X\\1vSRrFj\\1Wv",[global])),
-?line <<"YSYAvHCLl">> = iolist_to_binary(re:replace("axc","a.c","Y\\1\\1SYAvHCLl",[])),
-?line <<"YSYAvHCLl">> = iolist_to_binary(re:replace("axc","a.c","Y\\1\\1SYAvHCLl",[global])),
-?line <<"oTi">> = iolist_to_binary(re:replace("axyzc","a.*c","oTi",[])),
-?line <<"oTi">> = iolist_to_binary(re:replace("axyzc","a.*c","oTi",[global])),
-?line <<"abdd">> = iolist_to_binary(re:replace("abd","a[bc]d","&d",[])),
-?line <<"abdd">> = iolist_to_binary(re:replace("abd","a[bc]d","&d",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bc]d","m",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bc]d","m",[global])),
-?line <<"axyzd">> = iolist_to_binary(re:replace("axyzd","a[bc]d","xw\\1kClblo&A&pX",[])),
-?line <<"axyzd">> = iolist_to_binary(re:replace("axyzd","a[bc]d","xw\\1kClblo&A&pX",[global])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","a[bc]d","DXVJBfd&&nWiQKDXx&p",[])),
-?line <<"abc">> = iolist_to_binary(re:replace("abc","a[bc]d","DXVJBfd&&nWiQKDXx&p",[global])),
-?line <<"qgcyq">> = iolist_to_binary(re:replace("ace","a[b-d]e","qgcyq\\1",[])),
-?line <<"qgcyq">> = iolist_to_binary(re:replace("ace","a[b-d]e","qgcyq\\1",[global])),
-?line <<"aSo">> = iolist_to_binary(re:replace("aac","a[b-d]","S\\1o",[])),
-?line <<"aSo">> = iolist_to_binary(re:replace("aac","a[b-d]","S\\1o",[global])),
-?line <<"FalJiLh">> = iolist_to_binary(re:replace("a-","a[-b]","FalJ\\1iL\\1h",[])),
-?line <<"FalJiLh">> = iolist_to_binary(re:replace("a-","a[-b]","FalJ\\1iL\\1h",[global])),
-?line <<"aea-">> = iolist_to_binary(re:replace("a-","a[b-]","ae&",[])),
-?line <<"aea-">> = iolist_to_binary(re:replace("a-","a[b-]","ae&",[global])),
-?line <<"Uxci">> = iolist_to_binary(re:replace("a]","a]","Uxci",[])),
-?line <<"Uxci">> = iolist_to_binary(re:replace("a]","a]","Uxci",[global])),
-?line <<"fuDs">> = iolist_to_binary(re:replace("a]b","a[]]b","fu\\1Ds",[])),
-?line <<"fuDs">> = iolist_to_binary(re:replace("a]b","a[]]b","fu\\1Ds",[global])),
-?line <<"S">> = iolist_to_binary(re:replace("aed","a[^bc]d","\\1S",[])),
-?line <<"S">> = iolist_to_binary(re:replace("aed","a[^bc]d","\\1S",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^bc]d","q\\1c",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^bc]d","q\\1c",[global])),
-?line <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","CwigRG\\1",[])),
-?line <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","CwigRG\\1",[global])),
-?line <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","G&sOiYoXxtvjC\\1C",[])),
-?line <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","G&sOiYoXxtvjC\\1C",[global])),
-?line <<"WjwradcGadcGdiadcJadcadc">> = iolist_to_binary(re:replace("adc","a[^-b]c","Wjwr&G&Gdi&J&&",[])),
-?line <<"WjwradcGadcGdiadcJadcadc">> = iolist_to_binary(re:replace("adc","a[^-b]c","Wjwr&G&Gdi&J&&",[global])),
-?line <<"sXuNQuSoADXQHaadcc">> = iolist_to_binary(re:replace("adc","a[^]b]c","sXuNQuS\\1oAD\\1XQH\\1a&c",[])),
-?line <<"sXuNQuSoADXQHaadcc">> = iolist_to_binary(re:replace("adc","a[^]b]c","sXuNQuS\\1oAD\\1XQH\\1a&c",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^]b]c","\\1WTVFfqlY\\1I",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^]b]c","\\1WTVFfqlY\\1I",[global])),
-?line <<"a-c">> = iolist_to_binary(re:replace("a-c","a[^]b]c","&",[])),
-?line <<"a-c">> = iolist_to_binary(re:replace("a-c","a[^]b]c","&",[global])),
-?line <<"a]c">> = iolist_to_binary(re:replace("a]c","a[^]b]c","U\\1ASb",[])),
-?line <<"a]c">> = iolist_to_binary(re:replace("a]c","a[^]b]c","U\\1ASb",[global])),
-?line <<"FhmTxP-">> = iolist_to_binary(re:replace("a-","\\ba\\b","FhmTxP",[])),
-?line <<"FhmTxP-">> = iolist_to_binary(re:replace("a-","\\ba\\b","FhmTxP",[global])),
-?line <<"-sIgAwOVeaIs">> = iolist_to_binary(re:replace("-a","\\ba\\b","sIgAwOVe&Is",[])),
-?line <<"-sIgAwOVeaIs">> = iolist_to_binary(re:replace("-a","\\ba\\b","sIgAwOVe&Is",[global])),
-?line <<"-K-">> = iolist_to_binary(re:replace("-a-","\\ba\\b","K",[])),
-?line <<"-K-">> = iolist_to_binary(re:replace("-a-","\\ba\\b","K",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\by\\b","NFs\\1N&no&v&LBhrfD",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\by\\b","NFs\\1N&no&v&LBhrfD",[global])),
-?line <<"xy">> = iolist_to_binary(re:replace("xy","\\by\\b","\\1&WFL&q",[])),
-?line <<"xy">> = iolist_to_binary(re:replace("xy","\\by\\b","\\1&WFL&q",[global])),
-?line <<"yz">> = iolist_to_binary(re:replace("yz","\\by\\b","pjeKdgSu&&",[])),
-?line <<"yz">> = iolist_to_binary(re:replace("yz","\\by\\b","pjeKdgSu&&",[global])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","\\by\\b","hyG",[])),
-?line <<"xyz">> = iolist_to_binary(re:replace("xyz","\\by\\b","hyG",[global])),
-?line <<"*** FCasopdebailers">> = iolist_to_binary(re:replace("*** Failers","\\Ba\\B","C\\1&sopdeb&",[])),
-?line <<"*** FCasopdebailers">> = iolist_to_binary(re:replace("*** Failers","\\Ba\\B","C\\1&sopdeb&",[global])),
-?line <<"a-">> = iolist_to_binary(re:replace("a-","\\Ba\\B","mnLWav",[])),
-?line <<"a-">> = iolist_to_binary(re:replace("a-","\\Ba\\B","mnLWav",[global])),
-?line <<"-a">> = iolist_to_binary(re:replace("-a","\\Ba\\B","X&NpSD\\1If",[])),
-?line <<"-a">> = iolist_to_binary(re:replace("-a","\\Ba\\B","X&NpSD\\1If",[global])),
-?line <<"-a-">> = iolist_to_binary(re:replace("-a-","\\Ba\\B","loFA&cpicKF&FLSfj&",[])),
-?line <<"-a-">> = iolist_to_binary(re:replace("-a-","\\Ba\\B","loFA&cpicKF&FLSfj&",[global])),
-?line <<"xyTAT">> = iolist_to_binary(re:replace("xy","\\By\\b","&TAT",[])),
-?line <<"xyTAT">> = iolist_to_binary(re:replace("xy","\\By\\b","&TAT",[global])),
-?line <<"fxz">> = iolist_to_binary(re:replace("yz","\\by\\B","fx\\1\\1",[])),
-?line <<"fxz">> = iolist_to_binary(re:replace("yz","\\by\\B","fx\\1\\1",[global])),
-?line <<"xKryOdAEz">> = iolist_to_binary(re:replace("xyz","\\By\\B","Kr&OdAE",[])),
-?line <<"xKryOdAEz">> = iolist_to_binary(re:replace("xyz","\\By\\B","Kr&OdAE",[global])),
-?line <<"IRVtaAqLDh">> = iolist_to_binary(re:replace("a","\\w","IRVt&AqLDh\\1",[])),
-?line <<"IRVtaAqLDh">> = iolist_to_binary(re:replace("a","\\w","IRVt&AqLDh\\1",[global])),
-?line <<"EckncnNqwHO">> = iolist_to_binary(re:replace("-","\\W","EckncnNq\\1wHO\\1",[])),
-?line <<"EckncnNqwHO">> = iolist_to_binary(re:replace("-","\\W","EckncnNq\\1wHO\\1",[global])),
-?line <<"Yf*VvjLGbD*h** Failers">> = iolist_to_binary(re:replace("*** Failers","\\W","Yf&VvjLGbD&h",[])),
-?line <<"Yf*VvjLGbD*hYf*VvjLGbD*hYf*VvjLGbD*hYf VvjLGbD hFailers">> = iolist_to_binary(re:replace("*** Failers","\\W","Yf&VvjLGbD&h",[global])),
-?line <<"GBjpbjk">> = iolist_to_binary(re:replace("-","\\W","GBjpbjk",[])),
-?line <<"GBjpbjk">> = iolist_to_binary(re:replace("-","\\W","GBjpbjk",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","\\W","j",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","\\W","j",[global])),
-?line <<"VAiCYGiBXpa bumnbi">> = iolist_to_binary(re:replace("a b","a\\sb","VAiCYGiBX\\1p&umn\\1bi",[])),
-?line <<"VAiCYGiBXpa bumnbi">> = iolist_to_binary(re:replace("a b","a\\sb","VAiCYGiBX\\1p&umn\\1bi",[global])),
-?line <<"Etv">> = iolist_to_binary(re:replace("a-b","a\\Sb","Etv",[])),
-?line <<"Etv">> = iolist_to_binary(re:replace("a-b","a\\Sb","Etv",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Sb","EbhHjGSDvEtLT\\1cSURa",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Sb","EbhHjGSDvEtLT\\1cSURa",[global])),
-?line <<"uD">> = iolist_to_binary(re:replace("a-b","a\\Sb","uD",[])),
-?line <<"uD">> = iolist_to_binary(re:replace("a-b","a\\Sb","uD",[global])),
-?line <<"a b">> = iolist_to_binary(re:replace("a b","a\\Sb","fQm&D&nJmqrWl",[])),
-?line <<"a b">> = iolist_to_binary(re:replace("a b","a\\Sb","fQm&D&nJmqrWl",[global])),
-?line <<"jti">> = iolist_to_binary(re:replace("1","\\d","jti",[])),
-?line <<"jti">> = iolist_to_binary(re:replace("1","\\d","jti",[global])),
-?line <<"-m">> = iolist_to_binary(re:replace("-","\\D","&m",[])),
-?line <<"-m">> = iolist_to_binary(re:replace("-","\\D","&m",[global])),
-?line <<"Tw** Failers">> = iolist_to_binary(re:replace("*** Failers","\\D","\\1Tw",[])),
-?line <<"TwTwTwTwTwTwTwTwTwTwTw">> = iolist_to_binary(re:replace("*** Failers","\\D","\\1Tw",[global])),
-?line <<"T">> = iolist_to_binary(re:replace("-","\\D","T",[])),
-?line <<"T">> = iolist_to_binary(re:replace("-","\\D","T",[global])),
-?line <<"1">> = iolist_to_binary(re:replace("1","\\D","QkyGdjVcibs",[])),
-?line <<"1">> = iolist_to_binary(re:replace("1","\\D","QkyGdjVcibs",[global])),
-?line <<"Vsg">> = iolist_to_binary(re:replace("a","[\\w]","Vsg",[])),
-?line <<"Vsg">> = iolist_to_binary(re:replace("a","[\\w]","Vsg",[global])),
-?line <<"AeUjdVITmvExYR">> = iolist_to_binary(re:replace("-","[\\W]","AeU\\1jdVITmvExYR\\1",[])),
-?line <<"AeUjdVITmvExYR">> = iolist_to_binary(re:replace("-","[\\W]","AeU\\1jdVITmvExYR\\1",[global])),
-?line <<"WhGTRj*eDnCm** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\W]","WhGTRj&eDnCm",[])),
-?line <<"WhGTRj*eDnCmWhGTRj*eDnCmWhGTRj*eDnCmWhGTRj eDnCmFailers">> = iolist_to_binary(re:replace("*** Failers","[\\W]","WhGTRj&eDnCm",[global])),
-?line <<"c-aqg-Be">> = iolist_to_binary(re:replace("-","[\\W]","c&aqg&Be",[])),
-?line <<"c-aqg-Be">> = iolist_to_binary(re:replace("-","[\\W]","c&aqg&Be",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","[\\W]","lS",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","[\\W]","lS",[global])),
-?line <<"aTa bLH">> = iolist_to_binary(re:replace("a b","a[\\s]b","aT&LH\\1",[])),
-?line <<"aTa bLH">> = iolist_to_binary(re:replace("a b","a[\\s]b","aT&LH\\1",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a-b","a[\\S]b","a",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a-b","a[\\S]b","a",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[\\S]b","b\\1E&yC\\1kT&CwD",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[\\S]b","b\\1E&yC\\1kT&CwD",[global])),
-?line <<"a-bfLEHcwVqa-bwEar">> = iolist_to_binary(re:replace("a-b","a[\\S]b","&fLE\\1\\1Hcw\\1V\\1q&wEar",[])),
-?line <<"a-bfLEHcwVqa-bwEar">> = iolist_to_binary(re:replace("a-b","a[\\S]b","&fLE\\1\\1Hcw\\1V\\1q&wEar",[global])),
-?line <<"a b">> = iolist_to_binary(re:replace("a b","a[\\S]b","E\\1NcSC&l",[])),
-?line <<"a b">> = iolist_to_binary(re:replace("a b","a[\\S]b","E\\1NcSC&l",[global])),
-?line <<"U1LgIwNodaqkLmOQ">> = iolist_to_binary(re:replace("1","[\\d]","U\\1&LgIwNo\\1daqkL\\1mOQ",[])),
-?line <<"U1LgIwNodaqkLmOQ">> = iolist_to_binary(re:replace("1","[\\d]","U\\1&LgIwNo\\1daqkL\\1mOQ",[global])),
-?line <<"XTGOaAL-XOENvmW">> = iolist_to_binary(re:replace("-","[\\D]","XTGOa\\1AL&XOE\\1NvmW",[])),
-?line <<"XTGOaAL-XOENvmW">> = iolist_to_binary(re:replace("-","[\\D]","XTGOa\\1AL&XOE\\1NvmW",[global])),
-?line <<"*rIhW*QnqjR*** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\D]","&\\1r\\1I\\1h\\1W&Q\\1n\\1qjR&",[])),
-?line <<"*rIhW*QnqjR**rIhW*QnqjR**rIhW*QnqjR* rIhW QnqjR FrIhWFQnqjRFarIhWaQnqjRairIhWiQnqjRilrIhWlQnqjRlerIhWeQnqjRerrIhWrQnqjRrsrIhWsQnqjRs">> = iolist_to_binary(re:replace("*** Failers","[\\D]","&\\1r\\1I\\1h\\1W&Q\\1n\\1qjR&",[global])),
-?line <<"TEOmg-mrq">> = iolist_to_binary(re:replace("-","[\\D]","TE\\1Omg&\\1mrq",[])),
-?line <<"TEOmg-mrq">> = iolist_to_binary(re:replace("-","[\\D]","TE\\1Omg&\\1mrq",[global])),
-?line <<"1">> = iolist_to_binary(re:replace("1","[\\D]","YI\\1o&\\1IwvchJgD&&",[])),
-?line <<"1">> = iolist_to_binary(re:replace("1","[\\D]","YI\\1o&\\1IwvchJgD&&",[global])),
-?line <<"DKXoAolSGIabc">> = iolist_to_binary(re:replace("abc","ab|cd","DKXoAolSGI&",[])),
-?line <<"DKXoAolSGIabc">> = iolist_to_binary(re:replace("abc","ab|cd","DKXoAolSGI&",[global])),
-?line <<"tFHUIrVcd">> = iolist_to_binary(re:replace("abcd","ab|cd","tFHUIrV\\1",[])),
-?line <<"tFHUIrVtFHUIrV">> = iolist_to_binary(re:replace("abcd","ab|cd","tFHUIrV\\1",[global])),
-?line <<"doeAAefCeUJ">> = iolist_to_binary(re:replace("def","()ef","oeAA&CeUJ",[])),
-?line <<"doeAAefCeUJ">> = iolist_to_binary(re:replace("def","()ef","oeAA&CeUJ",[global])),
-?line <<"B">> = iolist_to_binary(re:replace("a(b","a\\(b","B",[])),
-?line <<"B">> = iolist_to_binary(re:replace("a(b","a\\(b","B",[global])),
-?line <<"sFcBhj">> = iolist_to_binary(re:replace("ab","a\\(*b","sFcBhj",[])),
-?line <<"sFcBhj">> = iolist_to_binary(re:replace("ab","a\\(*b","sFcBhj",[global])),
-?line <<"iTla((bUcHSjwja((ba((b">> = iolist_to_binary(re:replace("a((b","a\\(*b","iTl&UcHSjwj\\1&&",[])),
-?line <<"iTla((bUcHSjwja((ba((b">> = iolist_to_binary(re:replace("a((b","a\\(*b","iTl&UcHSjwj\\1&&",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","a\\\\b","AkoMVU&",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","a\\\\b","AkoMVU&",[global])),
-?line <<"Gbc">> = iolist_to_binary(re:replace("abc","((a))","G",[])),
-?line <<"Gbc">> = iolist_to_binary(re:replace("abc","((a))","G",[global])),
-?line <<"aaabcTualQ">> = iolist_to_binary(re:replace("abc","(a)b(c)","\\1\\1&Tu\\1lQ",[])),
-?line <<"aaabcTualQ">> = iolist_to_binary(re:replace("abc","(a)b(c)","\\1\\1&Tu\\1lQ",[global])),
-?line <<"aabbCivt">> = iolist_to_binary(re:replace("aabbabc","a+b+c","\\1Civt",[])),
-?line <<"aabbCivt">> = iolist_to_binary(re:replace("aabbabc","a+b+c","\\1Civt",[global])),
-?line <<"aabbT">> = iolist_to_binary(re:replace("aabbabc","a{1,}b{1,}c","T",[])),
-?line <<"aabbT">> = iolist_to_binary(re:replace("aabbabc","a{1,}b{1,}c","T",[global])),
-?line <<"VxJHThVabcketabcebWabc">> = iolist_to_binary(re:replace("abcabc","a.+?c","VxJHThV&ket&ebW",[])),
-?line <<"VxJHThVabcketabcebWVxJHThVabcketabcebW">> = iolist_to_binary(re:replace("abcabc","a.+?c","VxJHThV&ket&ebW",[global])),
-?line <<"LXfabNabCqMabHb">> = iolist_to_binary(re:replace("ab","(a+|b)*","LXf&N&CqM&H\\1",[])),
-?line <<"LXfabNabCqMabHbLXfNCqMH">> = iolist_to_binary(re:replace("ab","(a+|b)*","LXf&N&CqM&H\\1",[global])),
-?line <<"NNopapyUJpabVxnQ">> = iolist_to_binary(re:replace("ab","(a+|b){0,}","NNopapyUJpa\\1VxnQ",[])),
-?line <<"NNopapyUJpabVxnQNNopapyUJpaVxnQ">> = iolist_to_binary(re:replace("ab","(a+|b){0,}","NNopapyUJpa\\1VxnQ",[global])),
-?line <<"cejhccpabbAd">> = iolist_to_binary(re:replace("ab","(a+|b)+","cejhccp&\\1Ad",[])),
-?line <<"cejhccpabbAd">> = iolist_to_binary(re:replace("ab","(a+|b)+","cejhccp&\\1Ad",[global])),
-?line <<"uMqbbBaYPvPbkabNdlb">> = iolist_to_binary(re:replace("ab","(a+|b){1,}","uMqb\\1BaYPvP\\1k&Ndl\\1",[])),
-?line <<"uMqbbBaYPvPbkabNdlb">> = iolist_to_binary(re:replace("ab","(a+|b){1,}","uMqb\\1BaYPvP\\1k&Ndl\\1",[global])),
-?line <<"cyKMb">> = iolist_to_binary(re:replace("ab","(a+|b)?","cyKM",[])),
-?line <<"cyKMcyKMcyKM">> = iolist_to_binary(re:replace("ab","(a+|b)?","cyKM",[global])),
-?line <<"uaaPjgxb">> = iolist_to_binary(re:replace("ab","(a+|b){0,1}","u\\1\\1Pjgx",[])),
-?line <<"uaaPjgxubbPjgxuPjgx">> = iolist_to_binary(re:replace("ab","(a+|b){0,1}","u\\1\\1Pjgx",[global])),
-?line <<"JsG">> = iolist_to_binary(re:replace("cde","[^ab]*","\\1J\\1sG",[])),
-?line <<"JsGJsG">> = iolist_to_binary(re:replace("cde","[^ab]*","\\1J\\1sG",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","NyHCvfJjxj\\1SrM&BdF",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","NyHCvfJjxj\\1SrM&BdF",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","abc","T&\\1Jd\\1tQxU\\1&\\1\\1bp",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","abc","T&\\1Jd\\1tQxU\\1&\\1\\1bp",[global])),
-?line <<"AHcabbbcdabbbcdabbbcdSCcNR">> = iolist_to_binary(re:replace("abbbcd","([abc])*d","AH\\1&&&SC\\1NR",[])),
-?line <<"AHcabbbcdabbbcdabbbcdSCcNR">> = iolist_to_binary(re:replace("abbbcd","([abc])*d","AH\\1&&&SC\\1NR",[global])),
-?line <<"jDJabcdqabcdgNaaNoyaGm">> = iolist_to_binary(re:replace("abcd","([abc])*bcd","jDJ&q&gN\\1\\1Noy\\1Gm",[])),
-?line <<"jDJabcdqabcdgNaaNoyaGm">> = iolist_to_binary(re:replace("abcd","([abc])*bcd","jDJ&q&gN\\1\\1Noy\\1Gm",[global])),
-?line <<"IHdxtFuTeF">> = iolist_to_binary(re:replace("e","a|b|c|d|e","IHdxtFuT&F",[])),
-?line <<"IHdxtFuTeF">> = iolist_to_binary(re:replace("e","a|b|c|d|e","IHdxtFuT&F",[global])),
-?line <<"RjceNtss">> = iolist_to_binary(re:replace("ef","(a|b|c|d|e)f","Rjc\\1Ntss",[])),
-?line <<"RjceNtss">> = iolist_to_binary(re:replace("ef","(a|b|c|d|e)f","Rjc\\1Ntss",[global])),
-?line <<"nViLDabcdefg">> = iolist_to_binary(re:replace("abcdefg","abcd*efg","nViL\\1D&\\1",[])),
-?line <<"nViLDabcdefg">> = iolist_to_binary(re:replace("abcdefg","abcd*efg","nViL\\1D&\\1",[global])),
-?line <<"xoJUabyHFyabbbz">> = iolist_to_binary(re:replace("xabyabbbz","ab*","oJ\\1U&yHF",[])),
-?line <<"xoJUabyHFyoJUabbbyHFz">> = iolist_to_binary(re:replace("xabyabbbz","ab*","oJ\\1U&yHF",[global])),
-?line <<"xbaEdBayabbbz">> = iolist_to_binary(re:replace("xayabbbz","ab*","b&EdBa",[])),
-?line <<"xbaEdBaybabbbEdBaz">> = iolist_to_binary(re:replace("xayabbbz","ab*","b&EdBa",[global])),
-?line <<"abHqcde">> = iolist_to_binary(re:replace("abcde","(ab|cd)e","Hq&",[])),
-?line <<"abHqcde">> = iolist_to_binary(re:replace("abcde","(ab|cd)e","Hq&",[global])),
-?line <<"lrrKIUARhij">> = iolist_to_binary(re:replace("hij","[abhgefdc]ij","l\\1\\1r\\1rKIUAR&",[])),
-?line <<"lrrKIUARhij">> = iolist_to_binary(re:replace("hij","[abhgefdc]ij","l\\1\\1r\\1rKIUAR&",[global])),
-?line <<"abcdWfgkefnnefNPAQ">> = iolist_to_binary(re:replace("abcdef","(abc|)ef","\\1Wfgk&nn&\\1NPAQ\\1",[])),
-?line <<"abcdWfgkefnnefNPAQ">> = iolist_to_binary(re:replace("abcdef","(abc|)ef","\\1Wfgk&nn&\\1NPAQ\\1",[global])),
-?line <<"aUbGqmbcdWXLMCpYbbcd">> = iolist_to_binary(re:replace("abcd","(a|b)c*d","U\\1Gqm&WXLMCpY\\1&",[])),
-?line <<"aUbGqmbcdWXLMCpYbbcd">> = iolist_to_binary(re:replace("abcd","(a|b)c*d","U\\1Gqm&WXLMCpY\\1&",[global])),
-?line <<"vYALaabcfgsaUfyDabcjOtcQ">> = iolist_to_binary(re:replace("abc","(ab|ab*)bc","vYAL\\1&fgs\\1UfyD&jOtcQ",[])),
-?line <<"vYALaabcfgsaUfyDabcjOtcQ">> = iolist_to_binary(re:replace("abc","(ab|ab*)bc","vYAL\\1&fgs\\1UfyD&jOtcQ",[global])),
-?line <<"uyabcabcp">> = iolist_to_binary(re:replace("abc","a([bc]*)c*","uy&&p",[])),
-?line <<"uyabcabcp">> = iolist_to_binary(re:replace("abc","a([bc]*)c*","uy&&p",[global])),
-?line <<"iAyJUbcM">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c*d)","iAyJU\\1M",[])),
-?line <<"iAyJUbcM">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c*d)","iAyJU\\1M",[global])),
-?line <<"abcdabcdabcd">> = iolist_to_binary(re:replace("abcd","a([bc]+)(c*d)","&&&",[])),
-?line <<"abcdabcdabcd">> = iolist_to_binary(re:replace("abcd","a([bc]+)(c*d)","&&&",[global])),
-?line <<"UgwJmKabcddNBBm">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c+d)","UgwJmK&dNBBm",[])),
-?line <<"UgwJmKabcddNBBm">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c+d)","UgwJmK&dNBBm",[global])),
-?line <<"glXDRFe">> = iolist_to_binary(re:replace("adcdcde","a[bcd]*dcdcde","glXDRFe\\1",[])),
-?line <<"glXDRFe">> = iolist_to_binary(re:replace("adcdcde","a[bcd]*dcdcde","glXDRFe\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bcd]+dcdcde","&\\1Tw",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bcd]+dcdcde","&\\1Tw",[global])),
-?line <<"abcde">> = iolist_to_binary(re:replace("abcde","a[bcd]+dcdcde","OaFcNB\\1AbGk\\1RcX&\\1hU",[])),
-?line <<"abcde">> = iolist_to_binary(re:replace("abcde","a[bcd]+dcdcde","OaFcNB\\1AbGk\\1RcX&\\1hU",[global])),
-?line <<"adcdcde">> = iolist_to_binary(re:replace("adcdcde","a[bcd]+dcdcde","LRCnDGeISr",[])),
-?line <<"adcdcde">> = iolist_to_binary(re:replace("adcdcde","a[bcd]+dcdcde","LRCnDGeISr",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("abc","(ab|a)b*c","\\1",[])),
-?line <<"ab">> = iolist_to_binary(re:replace("abc","(ab|a)b*c","\\1",[global])),
-?line <<"abcdYujfprabcdqmHBi">> = iolist_to_binary(re:replace("abcd","((a)(b)c)(d)","&Yujfpr&qmHBi",[])),
-?line <<"abcdYujfprabcdqmHBi">> = iolist_to_binary(re:replace("abcd","((a)(b)c)(d)","&Yujfpr&qmHBi",[global])),
-?line <<"HSalphaw">> = iolist_to_binary(re:replace("alpha","[a-zA-Z_][a-zA-Z0-9_]*","HS&w",[])),
-?line <<"HSalphaw">> = iolist_to_binary(re:replace("alpha","[a-zA-Z_][a-zA-Z0-9_]*","HS&w",[global])),
-?line <<"amKrkJTTmWxwbhbhVXebhD">> = iolist_to_binary(re:replace("abh","^a(bc+|b[eh])g|.h$","mKrkJTT\\1mWxw&&VXe&D",[])),
-?line <<"amKrkJTTmWxwbhbhVXebhD">> = iolist_to_binary(re:replace("abh","^a(bc+|b[eh])g|.h$","mKrkJTT\\1mWxw&&VXe&D",[global])),
-?line <<"gkglaeffgzeffgzwvwD">> = iolist_to_binary(re:replace("effgz","(bc+d$|ef*g.|h?i(j|k))","gkgla\\1&wvwD",[])),
-?line <<"gkglaeffgzeffgzwvwD">> = iolist_to_binary(re:replace("effgz","(bc+d$|ef*g.|h?i(j|k))","gkgla\\1&wvwD",[global])),
-?line <<"ivMGijUoGoijri">> = iolist_to_binary(re:replace("ij","(bc+d$|ef*g.|h?i(j|k))","ivMG\\1UoGo\\1ri",[])),
-?line <<"ivMGijUoGoijri">> = iolist_to_binary(re:replace("ij","(bc+d$|ef*g.|h?i(j|k))","ivMG\\1UoGo\\1ri",[global])),
-?line <<"reffgzWeffgzJeffgzeffgzFUK">> = iolist_to_binary(re:replace("reffgz","(bc+d$|ef*g.|h?i(j|k))","&W\\1J\\1&FUK",[])),
-?line <<"reffgzWeffgzJeffgzeffgzFUK">> = iolist_to_binary(re:replace("reffgz","(bc+d$|ef*g.|h?i(j|k))","&W\\1J\\1&FUK",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","qoREgh&sKvuYfqcVSQ",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","qoREgh&sKvuYfqcVSQ",[global])),
-?line <<"effg">> = iolist_to_binary(re:replace("effg","(bc+d$|ef*g.|h?i(j|k))","OSMK&kVLNnI",[])),
-?line <<"effg">> = iolist_to_binary(re:replace("effg","(bc+d$|ef*g.|h?i(j|k))","OSMK&kVLNnI",[global])),
-?line <<"bcdd">> = iolist_to_binary(re:replace("bcdd","(bc+d$|ef*g.|h?i(j|k))","l\\1SFH&\\1WG\\1N&\\1WpNv",[])),
-?line <<"bcdd">> = iolist_to_binary(re:replace("bcdd","(bc+d$|ef*g.|h?i(j|k))","l\\1SFH&\\1WG\\1N&\\1WpNv",[global])),
-?line <<"uCcLk">> = iolist_to_binary(re:replace("a","((((((((((a))))))))))","uCcLk",[])),
-?line <<"uCcLk">> = iolist_to_binary(re:replace("a","((((((((((a))))))))))","uCcLk",[global])),
-?line <<"VCUvbvxORiulavLRaFa">> = iolist_to_binary(re:replace("aa","((((((((((a))))))))))\\10","VCUvbvxORiul\\1vLR\\1F\\1",[])),
-?line <<"VCUvbvxORiulavLRaFa">> = iolist_to_binary(re:replace("aa","((((((((((a))))))))))\\10","VCUvbvxORiul\\1vLR\\1F\\1",[global])),
-?line <<"vFhEaarfaQfeLfaFGiV">> = iolist_to_binary(re:replace("a","(((((((((a)))))))))","vFhE\\1&rf&QfeLf\\1FGiV",[])),
-?line <<"vFhEaarfaQfeLfaFGiV">> = iolist_to_binary(re:replace("a","(((((((((a)))))))))","vFhE\\1&rf&QfeLf\\1FGiV",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","jlWax\\1&H",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","jlWax\\1&H",[global])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","multiple words of text","hsUw",[])),
-?line <<"aa">> = iolist_to_binary(re:replace("aa","multiple words of text","hsUw",[global])),
-?line <<"uh-uh">> = iolist_to_binary(re:replace("uh-uh","multiple words of text","ASEw\\1gOsB",[])),
-?line <<"uh-uh">> = iolist_to_binary(re:replace("uh-uh","multiple words of text","ASEw\\1gOsB",[global])),
-?line <<"dmultiple wordsxkMtmultiple words, yeah">> = iolist_to_binary(re:replace("multiple words, yeah","multiple words","d&x\\1\\1kMt&",[])),
-?line <<"dmultiple wordsxkMtmultiple words, yeah">> = iolist_to_binary(re:replace("multiple words, yeah","multiple words","d&x\\1\\1kMt&",[global])),
-?line <<"ykkVabcdefmldQabUjIJjw">> = iolist_to_binary(re:replace("abcde","(.*)c(.*)","ykkV&fmldQ\\1UjIJjw",[])),
-?line <<"ykkVabcdefmldQabUjIJjw">> = iolist_to_binary(re:replace("abcde","(.*)c(.*)","ykkV&fmldQ\\1UjIJjw",[global])),
-?line <<"efWBSCaa(a, b)Q">> = iolist_to_binary(re:replace("(a, b)","\\((.*), (.*)\\)","efWBSC\\1\\1&Q",[])),
-?line <<"efWBSCaa(a, b)Q">> = iolist_to_binary(re:replace("(a, b)","\\((.*), (.*)\\)","efWBSC\\1\\1&Q",[global])),
-?line <<"abcdBdXhwHpBabcdPC">> = iolist_to_binary(re:replace("abcd","abcd","&Bd\\1XhwHp\\1B&PC",[])),
-?line <<"abcdBdXhwHpBabcdPC">> = iolist_to_binary(re:replace("abcd","abcd","&Bd\\1XhwHp\\1B&PC",[global])),
-?line <<"SbsAruCoIPbckBgbcSyqva">> = iolist_to_binary(re:replace("abcd","a(bc)d","SbsAruCoIP\\1kBg\\1Syqva",[])),
-?line <<"SbsAruCoIPbckBgbcSyqva">> = iolist_to_binary(re:replace("abcd","a(bc)d","SbsAruCoIP\\1kBg\\1Syqva",[global])),
-?line <<"XiUVfmkDnpfY">> = iolist_to_binary(re:replace("ac","a[-]?c","XiUVfmkDnpfY",[])),
-?line <<"XiUVfmkDnpfY">> = iolist_to_binary(re:replace("ac","a[-]?c","XiUVfmkDnpfY",[global])),
-?line <<"GYmabcndabcabcabcabcCjabcabcabcabctjmn">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","GYm\\1nd&&Cj&\\1\\1tjmn",[])),
-?line <<"GYmabcndabcabcabcabcCjabcabcabcabctjmn">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","GYm\\1nd&&Cj&\\1\\1tjmn",[global])),
-?line <<"AabcFabcabcOw">> = iolist_to_binary(re:replace("abcabc","([a-c]*)\\1","A\\1F&Ow",[])),
-?line <<"AabcFabcabcOwAFOw">> = iolist_to_binary(re:replace("abcabc","([a-c]*)\\1","A\\1F&Ow",[global])),
-?line <<"savneuiFiA">> = iolist_to_binary(re:replace("a","(a)|\\1","s&vneuiFiA",[])),
-?line <<"savneuiFiA">> = iolist_to_binary(re:replace("a","(a)|\\1","s&vneuiFiA",[global])),
-?line <<"*** FatXvbwaxGeTrgahaailers">> = iolist_to_binary(re:replace("*** Failers","(a)|\\1","\\1tXvbw&xGeTrg\\1h&\\1",[])),
-?line <<"*** FatXvbwaxGeTrgahaailers">> = iolist_to_binary(re:replace("*** Failers","(a)|\\1","\\1tXvbw&xGeTrg\\1h&\\1",[global])),
-?line <<"ShaaIOaiKrRarjaTFxavb">> = iolist_to_binary(re:replace("ab","(a)|\\1","Sh\\1\\1IO&iKrR\\1rj\\1TFx&v",[])),
-?line <<"ShaaIOaiKrRarjaTFxavb">> = iolist_to_binary(re:replace("ab","(a)|\\1","Sh\\1\\1IO&iKrR\\1rj\\1TFx&v",[global])),
-?line <<"x">> = iolist_to_binary(re:replace("x","(a)|\\1","wG&OmupsBaCA&ULU&br",[])),
-?line <<"x">> = iolist_to_binary(re:replace("x","(a)|\\1","wG&OmupsBaCA&ULU&br",[global])),
-?line <<"ababbsaHOnababbDlUpRwMMqlababbCbbbcbc">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2)*","&saHOn&DlUpRwMMql&C\\1",[])),
-?line <<"ababbsaHOnababbDlUpRwMMqlababbCbbsaHOnDlUpRwMMqlCbcbcsaHOncbcDlUpRwMMqlcbcCcbcsaHOnDlUpRwMMqlC">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2)*","&saHOn&DlUpRwMMql&C\\1",[global])),
-?line <<"YdAFYmyyababbbcbcHpJCababbbcbcQa">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2){3}","YdAFYmyy&HpJC&Qa",[])),
-?line <<"YdAFYmyyababbbcbcHpJCababbbcbcQa">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2){3}","YdAFYmyy&HpJC&Qa",[global])),
-?line <<"aaaxabaxbaaxabbax">> = iolist_to_binary(re:replace("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+","a\\1",[])),
-?line <<"aaaxabaxbaaxabbax">> = iolist_to_binary(re:replace("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+","a\\1",[global])),
-?line <<"bbaababbabaaaaaoh">> = iolist_to_binary(re:replace("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}","oh",[])),
-?line <<"bbaababbabaaaaaoh">> = iolist_to_binary(re:replace("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}","oh",[global])),
-?line <<"fABCaeUgIABCDABCNFvst">> = iolist_to_binary(re:replace("ABC","abc","f&aeUgI&D&\\1NFvst",[caseless])),
-?line <<"fABCaeUgIABCDABCNFvst">> = iolist_to_binary(re:replace("ABC","abc","f&aeUgI&D&\\1NFvst",[caseless,
- global])),
-?line <<"XgOY">> = iolist_to_binary(re:replace("XABCY","abc","gO",[caseless])),
-?line <<"XgOY">> = iolist_to_binary(re:replace("XABCY","abc","gO",[caseless,
+bar","(?<=foo\\n)^bar","hGG",[multiline,global])),
+ <<"barTsM">> = iolist_to_binary(re:replace("barbaz","(?<=(?<!foo)bar)baz","TsM",[])),
+ <<"barTsM">> = iolist_to_binary(re:replace("barbaz","(?<=(?<!foo)bar)baz","TsM",[global])),
+ <<"barbarbazJYNeeiOkukbazbaze">> = iolist_to_binary(re:replace("barbarbaz","(?<=(?<!foo)bar)baz","&JYNeeiOkuk&&e",[])),
+ <<"barbarbazJYNeeiOkukbazbaze">> = iolist_to_binary(re:replace("barbarbaz","(?<=(?<!foo)bar)baz","&JYNeeiOkuk&&e",[global])),
+ <<"koobarbazJDRvnHPtlJvlqbazha">> = iolist_to_binary(re:replace("koobarbaz","(?<=(?<!foo)bar)baz","&JD\\1RvnHPtlJvlq&ha",[])),
+ <<"koobarbazJDRvnHPtlJvlqbazha">> = iolist_to_binary(re:replace("koobarbaz","(?<=(?<!foo)bar)baz","&JD\\1RvnHPtlJvlq&ha",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?<!foo)bar)baz","se&q\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?<!foo)bar)baz","se&q\\1",[global])),
+ <<"baz">> = iolist_to_binary(re:replace("baz","(?<=(?<!foo)bar)baz","\\1FnT\\1ncG\\1qiLitBVlR",[])),
+ <<"baz">> = iolist_to_binary(re:replace("baz","(?<=(?<!foo)bar)baz","\\1FnT\\1ncG\\1qiLitBVlR",[global])),
+ <<"foobarbaz">> = iolist_to_binary(re:replace("foobarbaz","(?<=(?<!foo)bar)baz","TGjyDWNaukC\\1D",[])),
+ <<"foobarbaz">> = iolist_to_binary(re:replace("foobarbaz","(?<=(?<!foo)bar)baz","TGjyDWNaukC\\1D",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?){4}$","PqtMwjvc&wXddSH",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?){4}$","PqtMwjvc&wXddSH",[global])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?){4}$","GgSSdPHMYJhXx",[])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?){4}$","GgSSdPHMYJhXx",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?){4}$","ucLn&Fx&kXfW",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?){4}$","ucLn&Fx&kXfW",[global])),
+ <<"naaaaaaQNEaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?){4}$","n&\\1QNE&&&",[])),
+ <<"naaaaaaQNEaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?){4}$","n&\\1QNE&&&",[global])),
+ <<"ielIaAaXNwripBgIaHTa">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?){4}$","ielI\\1A\\1XNwripBgI\\1HT\\1",[])),
+ <<"ielIaAaXNwripBgIaHTa">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?){4}$","ielI\\1A\\1XNwripBgI\\1HT\\1",[global])),
+ <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?){4}$","HRYVEqqIFqY&Dl",[])),
+ <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?){4}$","HRYVEqqIFqY&Dl",[global])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","&&t\\1s",[])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","&&t\\1s",[global])),
+ <<"NaaaadLeaaaaxAL">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","N\\1dLe\\1xAL",[])),
+ <<"NaaaadLeaaaaxAL">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","N\\1dLe\\1xAL",[global])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","\\1jr",[])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","\\1jr",[global])),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?){4}$","N\\1",[])),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?){4}$","N\\1",[global])),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?){4}$","sQ&xSjdecK&&rSQkA",[])),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?){4}$","sQ&xSjdecK&&rSQkA",[global])),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?){4}$","CsOa",[])),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?){4}$","CsOa",[global])),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?){4}$","&pAEvtoqYnBxGT&Uox",[])),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?){4}$","&pAEvtoqYnBxGT&Uox",[global])),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?){4}$","&icuBLN",[])),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?){4}$","&icuBLN",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","wxtPJAs&D\\1V&xlkaXy&",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","wxtPJAs&D\\1V&xlkaXy&",[global])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","GO\\1&NlEm",[])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","GO\\1&NlEm",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","trMv\\1vGRRdT&L",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","trMv\\1vGRRdT&L",[global])),
+ <<"dtEvrhKayRa">> = iolist_to_binary(re:replace("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dtEvrhK\\1yR\\1",[])),
+ <<"dtEvrhKayRa">> = iolist_to_binary(re:replace("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dtEvrhK\\1yR\\1",[global])),
+ <<"swnY">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","swnY",[])),
+ <<"swnY">> = iolist_to_binary(re:replace("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","swnY",[global])),
+ <<"aaaaaarinTIDxAHEMa">> = iolist_to_binary(re:replace("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","&rinTIDxAHEM\\1",[])),
+ <<"aaaaaarinTIDxAHEMa">> = iolist_to_binary(re:replace("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","&rinTIDxAHEM\\1",[global])),
+ <<"UBvaoaaaaaaaaDUiX">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","UBvao\\1&DUiX",[])),
+ <<"UBvaoaaaaaaaaDUiX">> = iolist_to_binary(re:replace("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","UBvao\\1&DUiX",[global])),
+ <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","H\\1aLBBEpEaB",[])),
+ <<"aaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","H\\1aLBBEpEaB",[global])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dpC",[])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dpC",[global])),
+ <<"taaaaaaaaaahaaaaaaaaaaf">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","t&h&f",[])),
+ <<"taaaaaaaaaahaaaaaaaaaaf">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","t&h&f",[global])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","rgxaXLiOHjVaKNJyPJ",[])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","rgxaXLiOHjVaKNJyPJ",[global])),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","a\\1UVnCvM\\1bOy",[])),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","a\\1UVnCvM\\1bOy",[global])),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","mnxwE",[])),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","mnxwE",[global])),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","R",[])),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","R",[global])),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","CKEn&",[])),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","CKEn&",[global])),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dr\\1B\\1G&W\\1\\1\\1",[])),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$","dr\\1B\\1G&W\\1\\1\\1",[global])),
+ <<"mTTwWHMeBAnTMAy">> = iolist_to_binary(re:replace("abc","abc","mTTwWHMe\\1B\\1AnTMAy",[])),
+ <<"mTTwWHMeBAnTMAy">> = iolist_to_binary(re:replace("abc","abc","mTTwWHMe\\1B\\1AnTMAy",[global])),
+ <<"xFRFntrFXSabcyBabcRky">> = iolist_to_binary(re:replace("xabcy","abc","FRFntrFXS&yB&\\1Rk",[])),
+ <<"xFRFntrFXSabcyBabcRky">> = iolist_to_binary(re:replace("xabcy","abc","FRFntrFXS&yB&\\1Rk",[global])),
+ <<"abmabceyJl">> = iolist_to_binary(re:replace("ababc","abc","m&eyJl",[])),
+ <<"abmabceyJl">> = iolist_to_binary(re:replace("ababc","abc","m&eyJl",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","\\1kN",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","\\1kN",[global])),
+ <<"xbc">> = iolist_to_binary(re:replace("xbc","abc","Rd",[])),
+ <<"xbc">> = iolist_to_binary(re:replace("xbc","abc","Rd",[global])),
+ <<"axc">> = iolist_to_binary(re:replace("axc","abc","qQP\\1gBdX&cfJfv&f",[])),
+ <<"axc">> = iolist_to_binary(re:replace("axc","abc","qQP\\1gBdX&cfJfv&f",[global])),
+ <<"abx">> = iolist_to_binary(re:replace("abx","abc","VMtbG",[])),
+ <<"abx">> = iolist_to_binary(re:replace("abx","abc","VMtbG",[global])),
+ <<"jNyOabclmQAUUabcabcabcM">> = iolist_to_binary(re:replace("abc","ab*c","jNyO&lmQA\\1UU&&&M",[])),
+ <<"jNyOabclmQAUUabcabcabcM">> = iolist_to_binary(re:replace("abc","ab*c","jNyO&lmQA\\1UU&&&M",[global])),
+ <<"NuNKaVVP">> = iolist_to_binary(re:replace("abc","ab*bc","NuNKaVV\\1\\1P",[])),
+ <<"NuNKaVVP">> = iolist_to_binary(re:replace("abc","ab*bc","NuNKaVV\\1\\1P",[global])),
+ <<"v">> = iolist_to_binary(re:replace("abbc","ab*bc","v",[])),
+ <<"v">> = iolist_to_binary(re:replace("abbc","ab*bc","v",[global])),
+ <<"IabbbbcLNYRgEvYHyabbbbctwq">> = iolist_to_binary(re:replace("abbbbc","ab*bc","I&LNYRgEvYHy&tw\\1q",[])),
+ <<"IabbbbcLNYRgEvYHyabbbbctwq">> = iolist_to_binary(re:replace("abbbbc","ab*bc","I&LNYRgEvYHy&tw\\1q",[global])),
+ <<"dcWrPQwrWtCeinonDembbbbc">> = iolist_to_binary(re:replace("abbbbc",".{1}","dcWrPQwrWtCeinonDem",[])),
+ <<"dcWrPQwrWtCeinonDemdcWrPQwrWtCeinonDemdcWrPQwrWtCeinonDemdcWrPQwrWtCeinonDemdcWrPQwrWtCeinonDemdcWrPQwrWtCeinonDem">> = iolist_to_binary(re:replace("abbbbc",".{1}","dcWrPQwrWtCeinonDem",[global])),
+ <<"NwOwabbbabbbCOvabbbenaNbc">> = iolist_to_binary(re:replace("abbbbc",".{3,4}","NwOw&&COv&e\\1naN",[])),
+ <<"NwOwabbbabbbCOvabbbenaNbc">> = iolist_to_binary(re:replace("abbbbc",".{3,4}","NwOw&&COv&e\\1naN",[global])),
+ <<"abbbbcCeTetSKDvAvrabbbbcpa">> = iolist_to_binary(re:replace("abbbbc","ab{0,}bc","&CeTetSKDvAvr&pa",[])),
+ <<"abbbbcCeTetSKDvAvrabbbbcpa">> = iolist_to_binary(re:replace("abbbbc","ab{0,}bc","&CeTetSKDvAvr&pa",[global])),
+ <<"TbtqfbcUrEcTU">> = iolist_to_binary(re:replace("abbc","ab+bc","Tb\\1tqfb\\1cUrEcTU",[])),
+ <<"TbtqfbcUrEcTU">> = iolist_to_binary(re:replace("abbc","ab+bc","Tb\\1tqfb\\1cUrEcTU",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","TeS\\1\\1F",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","TeS\\1\\1F",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","ab+bc","EHEtuOC&GTMRx",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","ab+bc","EHEtuOC&GTMRx",[global])),
+ <<"abq">> = iolist_to_binary(re:replace("abq","ab+bc","\\1ywtK\\1hfkEVdoXy\\1eH",[])),
+ <<"abq">> = iolist_to_binary(re:replace("abq","ab+bc","\\1ywtK\\1hfkEVdoXy\\1eH",[global])),
+ <<"GlETcsroCIlRt">> = iolist_to_binary(re:replace("abbbbc","ab+bc","GlETcsro\\1CIlRt\\1",[])),
+ <<"GlETcsroCIlRt">> = iolist_to_binary(re:replace("abbbbc","ab+bc","GlETcsro\\1CIlRt\\1",[global])),
+ ok.
+run15() ->
+ <<"GjnPRabbbbcabbbbcANabbbbcH">> = iolist_to_binary(re:replace("abbbbc","ab{1,}bc","Gj\\1nPR&&A\\1N&H",[])),
+ <<"GjnPRabbbbcabbbbcANabbbbcH">> = iolist_to_binary(re:replace("abbbbc","ab{1,}bc","Gj\\1nPR&&A\\1N&H",[global])),
+ <<"iPhrUY">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","i\\1Phr\\1UY\\1",[])),
+ <<"iPhrUY">> = iolist_to_binary(re:replace("abbbbc","ab{1,3}bc","i\\1Phr\\1UY\\1",[global])),
+ <<"oBEnPKpabbbbcAUrXVFQn">> = iolist_to_binary(re:replace("abbbbc","ab{3,4}bc","oBEnPK\\1p&AUr\\1X\\1VFQn\\1",[])),
+ <<"oBEnPKpabbbbcAUrXVFQn">> = iolist_to_binary(re:replace("abbbbc","ab{3,4}bc","oBEnPK\\1p&AUr\\1X\\1VFQn\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}bc","VJPhAjJ&qt&R",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}bc","VJPhAjJ&qt&R",[global])),
+ <<"abq">> = iolist_to_binary(re:replace("abq","ab{4,5}bc","\\1issDnwN",[])),
+ <<"abq">> = iolist_to_binary(re:replace("abq","ab{4,5}bc","\\1issDnwN",[global])),
+ <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{4,5}bc","&ty&x",[])),
+ <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","ab{4,5}bc","&ty&x",[global])),
+ <<"UWGc">> = iolist_to_binary(re:replace("abbc","ab?bc","UWGc",[])),
+ <<"UWGc">> = iolist_to_binary(re:replace("abbc","ab?bc","UWGc",[global])),
+ <<"QpFXHqWog">> = iolist_to_binary(re:replace("abc","ab?bc","QpFXHqWog",[])),
+ <<"QpFXHqWog">> = iolist_to_binary(re:replace("abc","ab?bc","QpFXHqWog",[global])),
+ <<"lFwRabc">> = iolist_to_binary(re:replace("abc","ab{0,1}bc","lFwR&\\1",[])),
+ <<"lFwRabc">> = iolist_to_binary(re:replace("abc","ab{0,1}bc","lFwR&\\1",[global])),
+ <<"abcmabcJvgabcabco">> = iolist_to_binary(re:replace("abc","ab?c","&m&Jvg&&\\1\\1o",[])),
+ <<"abcmabcJvgabcabco">> = iolist_to_binary(re:replace("abc","ab?c","&m&Jvg&&\\1\\1o",[global])),
+ <<"jJ">> = iolist_to_binary(re:replace("abc","ab{0,1}c","jJ",[])),
+ <<"jJ">> = iolist_to_binary(re:replace("abc","ab{0,1}c","jJ",[global])),
+ <<"uPAtKYsKtqCBkkp">> = iolist_to_binary(re:replace("abc","^abc$","uPAtKYsKtqCBkkp\\1",[])),
+ <<"uPAtKYsKtqCBkkp">> = iolist_to_binary(re:replace("abc","^abc$","uPAtKYsKtqCBkkp\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","e\\1XAs",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","e\\1XAs",[global])),
+ <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","^abc$","\\1o&fsbP\\1pwbiIRIGb\\1UD",[])),
+ <<"abbbbc">> = iolist_to_binary(re:replace("abbbbc","^abc$","\\1o&fsbP\\1pwbiIRIGb\\1UD",[global])),
+ <<"abcc">> = iolist_to_binary(re:replace("abcc","^abc$","WJthAfXWWmv\\1IWjIe",[])),
+ <<"abcc">> = iolist_to_binary(re:replace("abcc","^abc$","WJthAfXWWmv\\1IWjIe",[global])),
+ <<"UTlfrQeHrOQCMnfc">> = iolist_to_binary(re:replace("abcc","^abc","UTlfr\\1QeH\\1rOQCMnf",[])),
+ <<"UTlfrQeHrOQCMnfc">> = iolist_to_binary(re:replace("abcc","^abc","UTlfr\\1QeH\\1rOQCMnf",[global])),
+ <<"aARabcppSYabcEIbcGwjE">> = iolist_to_binary(re:replace("aabc","abc$","\\1AR&ppSY&EIbc\\1G\\1wjE",[])),
+ <<"aARabcppSYabcEIbcGwjE">> = iolist_to_binary(re:replace("aabc","abc$","\\1AR&ppSY&EIbc\\1G\\1wjE",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","FnSwJ&tmv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc$","FnSwJ&tmv",[global])),
+ <<"aAmIBNLxa">> = iolist_to_binary(re:replace("aabc","abc$","Am\\1IB\\1NLxa",[])),
+ <<"aAmIBNLxa">> = iolist_to_binary(re:replace("aabc","abc$","Am\\1IB\\1NLxa",[global])),
+ <<"aabcd">> = iolist_to_binary(re:replace("aabcd","abc$","&EuxC&eEGEWnwI",[])),
+ <<"aabcd">> = iolist_to_binary(re:replace("aabcd","abc$","&EuxC&eEGEWnwI",[global])),
+ <<"cOryAkFNmtoLruabc">> = iolist_to_binary(re:replace("abc","^","cO\\1r&yAkFNmto\\1Lru&",[])),
+ <<"cOryAkFNmtoLruabc">> = iolist_to_binary(re:replace("abc","^","cO\\1r&yAkFNmto\\1Lru&",[global])),
+ <<"abcKpXarNeriGOdu">> = iolist_to_binary(re:replace("abc","$","Kp\\1XarNeriGOdu&",[])),
+ <<"abcKpXarNeriGOdu">> = iolist_to_binary(re:replace("abc","$","Kp\\1XarNeriGOdu&",[global])),
+ <<"FIusabcabcceEbtWBabc">> = iolist_to_binary(re:replace("abc","a.c","FIus&&ceEb\\1tWB&",[])),
+ <<"FIusabcabcceEbtWBabc">> = iolist_to_binary(re:replace("abc","a.c","FIus&&ceEb\\1tWB&",[global])),
+ <<"KqevmaxcVysaxcPaxc">> = iolist_to_binary(re:replace("axc","a.c","Kqevm&Vys&\\1\\1P&",[])),
+ <<"KqevmaxcVysaxcPaxc">> = iolist_to_binary(re:replace("axc","a.c","Kqevm&Vys&\\1\\1P&",[global])),
+ <<"xUdGxhaJQaxyzc">> = iolist_to_binary(re:replace("axyzc","a.*c","x\\1UdGxhaJQ&",[])),
+ <<"xUdGxhaJQaxyzc">> = iolist_to_binary(re:replace("axyzc","a.*c","x\\1UdGxhaJQ&",[global])),
+ <<"abdHpbYpV">> = iolist_to_binary(re:replace("abd","a[bc]d","&Hp\\1bYpV",[])),
+ <<"abdHpbYpV">> = iolist_to_binary(re:replace("abd","a[bc]d","&Hp\\1bYpV",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bc]d","J&dGU\\1rioQPR\\1&S&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bc]d","J&dGU\\1rioQPR\\1&S&",[global])),
+ <<"axyzd">> = iolist_to_binary(re:replace("axyzd","a[bc]d","LF\\1QgQx\\1kUO&\\1",[])),
+ <<"axyzd">> = iolist_to_binary(re:replace("axyzd","a[bc]d","LF\\1QgQx\\1kUO&\\1",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","a[bc]d","tiUJYyxfVfeAM",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","a[bc]d","tiUJYyxfVfeAM",[global])),
+ <<"lSBTQLYWjuaceCjDace">> = iolist_to_binary(re:replace("ace","a[b-d]e","lSBTQLYWju&CjD&",[])),
+ <<"lSBTQLYWjuaceCjDace">> = iolist_to_binary(re:replace("ace","a[b-d]e","lSBTQLYWju&CjD&",[global])),
+ <<"aWEgjXuNyAacQTNVqSl">> = iolist_to_binary(re:replace("aac","a[b-d]","WEgjXuNyA&QTNVqSl",[])),
+ <<"aWEgjXuNyAacQTNVqSl">> = iolist_to_binary(re:replace("aac","a[b-d]","WEgjXuNyA&QTNVqSl",[global])),
+ ok.
+run16() ->
+ <<"qQmna-Ga-a-rA">> = iolist_to_binary(re:replace("a-","a[-b]","q\\1Qmn&G&&rA",[])),
+ <<"qQmna-Ga-a-rA">> = iolist_to_binary(re:replace("a-","a[-b]","q\\1Qmn&G&&rA",[global])),
+ <<"QJ">> = iolist_to_binary(re:replace("a-","a[b-]","QJ",[])),
+ <<"QJ">> = iolist_to_binary(re:replace("a-","a[b-]","QJ",[global])),
+ <<"yia]ao">> = iolist_to_binary(re:replace("a]","a]","\\1yi&ao",[])),
+ <<"yia]ao">> = iolist_to_binary(re:replace("a]","a]","\\1yi&ao",[global])),
+ <<"FfC">> = iolist_to_binary(re:replace("a]b","a[]]b","FfC",[])),
+ <<"FfC">> = iolist_to_binary(re:replace("a]b","a[]]b","FfC",[global])),
+ <<"oXfcTOWQKFAlvTaedi">> = iolist_to_binary(re:replace("aed","a[^bc]d","oXfcTOWQKFAlvT\\1\\1&i",[])),
+ <<"oXfcTOWQKFAlvTaedi">> = iolist_to_binary(re:replace("aed","a[^bc]d","oXfcTOWQKFAlvT\\1\\1&i",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^bc]d","&bDyTqTc",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^bc]d","&bDyTqTc",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","FjC&R\\1",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","FjC&R\\1",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","aENw",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a[^bc]d","aENw",[global])),
+ <<"adcdOJ">> = iolist_to_binary(re:replace("adc","a[^-b]c","&dOJ",[])),
+ <<"adcdOJ">> = iolist_to_binary(re:replace("adc","a[^-b]c","&dOJ",[global])),
+ <<"ANuydyM">> = iolist_to_binary(re:replace("adc","a[^]b]c","ANuydyM",[])),
+ <<"ANuydyM">> = iolist_to_binary(re:replace("adc","a[^]b]c","ANuydyM",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^]b]c","SweRAVF\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^]b]c","SweRAVF\\1",[global])),
+ <<"UoNrja-cLOLdIhqaTGLt">> = iolist_to_binary(re:replace("a-c","a[^]b]c","UoNrj&LOLdIhqaTGLt",[])),
+ <<"UoNrja-cLOLdIhqaTGLt">> = iolist_to_binary(re:replace("a-c","a[^]b]c","UoNrj&LOLdIhqaTGLt",[global])),
+ <<"a]c">> = iolist_to_binary(re:replace("a]c","a[^]b]c","w&UlR&\\1\\1Oo&I&",[])),
+ <<"a]c">> = iolist_to_binary(re:replace("a]c","a[^]b]c","w&UlR&\\1\\1Oo&I&",[global])),
+ <<"keSyyVigJfGa-">> = iolist_to_binary(re:replace("a-","\\ba\\b","\\1keSyy\\1VigJfG&",[])),
+ <<"keSyyVigJfGa-">> = iolist_to_binary(re:replace("a-","\\ba\\b","\\1keSyy\\1VigJfG&",[global])),
+ <<"-QajTaYNwiaOblsalRbJ">> = iolist_to_binary(re:replace("-a","\\ba\\b","Q&jT&YNwiaOb\\1ls&lRbJ",[])),
+ <<"-QajTaYNwiaOblsalRbJ">> = iolist_to_binary(re:replace("-a","\\ba\\b","Q&jT&YNwiaOb\\1ls&lRbJ",[global])),
+ <<"-jrLliKmS-">> = iolist_to_binary(re:replace("-a-","\\ba\\b","jrLliKm\\1S",[])),
+ <<"-jrLliKmS-">> = iolist_to_binary(re:replace("-a-","\\ba\\b","jrLliKm\\1S",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\by\\b","tFe\\1K\\1&P&w",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\by\\b","tFe\\1K\\1&P&w",[global])),
+ <<"xy">> = iolist_to_binary(re:replace("xy","\\by\\b","&&cw&p\\1BkixXR",[])),
+ <<"xy">> = iolist_to_binary(re:replace("xy","\\by\\b","&&cw&p\\1BkixXR",[global])),
+ <<"yz">> = iolist_to_binary(re:replace("yz","\\by\\b","Mlv\\1O",[])),
+ <<"yz">> = iolist_to_binary(re:replace("yz","\\by\\b","Mlv\\1O",[global])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","\\by\\b","o&V\\1\\1&vaBPhc&YhjA\\1Hl",[])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","\\by\\b","o&V\\1\\1&vaBPhc&YhjA\\1Hl",[global])),
+ <<"*** FEnnRHgdUlleafatdRwilers">> = iolist_to_binary(re:replace("*** Failers","\\Ba\\B","EnnRHgdUlle&f&tdRw",[])),
+ <<"*** FEnnRHgdUlleafatdRwilers">> = iolist_to_binary(re:replace("*** Failers","\\Ba\\B","EnnRHgdUlle&f&tdRw",[global])),
+ <<"a-">> = iolist_to_binary(re:replace("a-","\\Ba\\B","wXKR&jlEbdM&QBJmvK",[])),
+ <<"a-">> = iolist_to_binary(re:replace("a-","\\Ba\\B","wXKR&jlEbdM&QBJmvK",[global])),
+ <<"-a">> = iolist_to_binary(re:replace("-a","\\Ba\\B","f\\1dQc",[])),
+ <<"-a">> = iolist_to_binary(re:replace("-a","\\Ba\\B","f\\1dQc",[global])),
+ <<"-a-">> = iolist_to_binary(re:replace("-a-","\\Ba\\B","WTMu\\1drSum",[])),
+ <<"-a-">> = iolist_to_binary(re:replace("-a-","\\Ba\\B","WTMu\\1drSum",[global])),
+ <<"xheOtJ">> = iolist_to_binary(re:replace("xy","\\By\\b","\\1heOtJ\\1",[])),
+ <<"xheOtJ">> = iolist_to_binary(re:replace("xy","\\By\\b","\\1heOtJ\\1",[global])),
+ <<"xYHVuz">> = iolist_to_binary(re:replace("yz","\\by\\B","xYH\\1\\1Vu",[])),
+ <<"xYHVuz">> = iolist_to_binary(re:replace("yz","\\by\\B","xYH\\1\\1Vu",[global])),
+ <<"xUyfxgltgVyjPz">> = iolist_to_binary(re:replace("xyz","\\By\\B","\\1Uyf\\1xglt\\1gV\\1\\1&jP",[])),
+ <<"xUyfxgltgVyjPz">> = iolist_to_binary(re:replace("xyz","\\By\\B","\\1Uyf\\1xglt\\1gV\\1\\1&jP",[global])),
+ <<"PqSMLiChcHwx">> = iolist_to_binary(re:replace("a","\\w","PqSMLiChcHwx",[])),
+ <<"PqSMLiChcHwx">> = iolist_to_binary(re:replace("a","\\w","PqSMLiChcHwx",[global])),
+ <<"Bl">> = iolist_to_binary(re:replace("-","\\W","Bl",[])),
+ <<"Bl">> = iolist_to_binary(re:replace("-","\\W","Bl",[global])),
+ <<"**rPBnOGDkc** Failers">> = iolist_to_binary(re:replace("*** Failers","\\W","&&\\1rPBnOGDkc",[])),
+ <<"**rPBnOGDkc**rPBnOGDkc**rPBnOGDkc rPBnOGDkcFailers">> = iolist_to_binary(re:replace("*** Failers","\\W","&&\\1rPBnOGDkc",[global])),
+ <<"rI">> = iolist_to_binary(re:replace("-","\\W","rI",[])),
+ <<"rI">> = iolist_to_binary(re:replace("-","\\W","rI",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","\\W","N&\\1h&mf\\1eJ&T",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","\\W","N&\\1h&mf\\1eJ&T",[global])),
+ <<"Ia bHMFKnjmeDa bNCX">> = iolist_to_binary(re:replace("a b","a\\sb","I&HMFKnjm\\1eD&NCX",[])),
+ <<"Ia bHMFKnjmeDa bNCX">> = iolist_to_binary(re:replace("a b","a\\sb","I&HMFKnjm\\1eD&NCX",[global])),
+ <<"a-ba-ba-bnaNLABX">> = iolist_to_binary(re:replace("a-b","a\\Sb","&&&naN\\1LABX\\1",[])),
+ <<"a-ba-ba-bnaNLABX">> = iolist_to_binary(re:replace("a-b","a\\Sb","&&&naN\\1LABX\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Sb","\\1bI&cDB\\1Bpe",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Sb","\\1bI&cDB\\1Bpe",[global])),
+ <<"ILRpJeKfXTxFTY">> = iolist_to_binary(re:replace("a-b","a\\Sb","I\\1L\\1RpJe\\1KfXTxFTY",[])),
+ <<"ILRpJeKfXTxFTY">> = iolist_to_binary(re:replace("a-b","a\\Sb","I\\1L\\1RpJe\\1KfXTxFTY",[global])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a\\Sb","\\1ngH\\1OgaFGbI",[])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a\\Sb","\\1ngH\\1OgaFGbI",[global])),
+ <<"oOycwxv1FKdF">> = iolist_to_binary(re:replace("1","\\d","oOycwxv&FK\\1dF\\1",[])),
+ <<"oOycwxv1FKdF">> = iolist_to_binary(re:replace("1","\\d","oOycwxv&FK\\1dF\\1",[global])),
+ <<"YdKRXgdlJSvnIO">> = iolist_to_binary(re:replace("-","\\D","YdKRXgdl\\1JSvnIO",[])),
+ <<"YdKRXgdlJSvnIO">> = iolist_to_binary(re:replace("-","\\D","YdKRXgdl\\1JSvnIO",[global])),
+ <<"lxE*lk*V** Failers">> = iolist_to_binary(re:replace("*** Failers","\\D","lx\\1E&lk&V",[])),
+ <<"lxE*lk*VlxE*lk*VlxE*lk*VlxE lk VlxEFlkFVlxEalkaVlxEilkiVlxEllklVlxEelkeVlxErlkrVlxEslksV">> = iolist_to_binary(re:replace("*** Failers","\\D","lx\\1E&lk&V",[global])),
+ <<"JRKLvPGXEGf-a">> = iolist_to_binary(re:replace("-","\\D","JRK\\1LvPG\\1XEGf&a",[])),
+ <<"JRKLvPGXEGf-a">> = iolist_to_binary(re:replace("-","\\D","JRK\\1LvPG\\1XEGf&a",[global])),
+ <<"1">> = iolist_to_binary(re:replace("1","\\D","aTH&MPmaOF\\1\\1r",[])),
+ <<"1">> = iolist_to_binary(re:replace("1","\\D","aTH&MPmaOF\\1\\1r",[global])),
+ <<"MGKXIbaJcyWbp">> = iolist_to_binary(re:replace("a","[\\w]","MGKXIb&Jc\\1yWbp",[])),
+ <<"MGKXIbaJcyWbp">> = iolist_to_binary(re:replace("a","[\\w]","MGKXIb&Jc\\1yWbp",[global])),
+ ok.
+run17() ->
+ <<"YqG">> = iolist_to_binary(re:replace("-","[\\W]","YqG",[])),
+ <<"YqG">> = iolist_to_binary(re:replace("-","[\\W]","YqG",[global])),
+ <<"*nxdd*geTTc** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\W]","&nx\\1dd&geTTc",[])),
+ <<"*nxdd*geTTc*nxdd*geTTc*nxdd*geTTc nxdd geTTcFailers">> = iolist_to_binary(re:replace("*** Failers","[\\W]","&nx\\1dd&geTTc",[global])),
+ <<"iqqe">> = iolist_to_binary(re:replace("-","[\\W]","iqqe",[])),
+ <<"iqqe">> = iolist_to_binary(re:replace("-","[\\W]","iqqe",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","[\\W]","wwF\\1Q",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","[\\W]","wwF\\1Q",[global])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a[\\s]b","&",[])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a[\\s]b","&",[global])),
+ <<"SPqkyVa-bP">> = iolist_to_binary(re:replace("a-b","a[\\S]b","SPqkyV&P",[])),
+ <<"SPqkyVa-bP">> = iolist_to_binary(re:replace("a-b","a[\\S]b","SPqkyV&P",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[\\S]b","\\1FDeRsoK&IAJD&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[\\S]b","\\1FDeRsoK&IAJD&",[global])),
+ <<"VDpMoFi">> = iolist_to_binary(re:replace("a-b","a[\\S]b","VDpMoFi",[])),
+ <<"VDpMoFi">> = iolist_to_binary(re:replace("a-b","a[\\S]b","VDpMoFi",[global])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a[\\S]b","r&\\1C&XvsB&",[])),
+ <<"a b">> = iolist_to_binary(re:replace("a b","a[\\S]b","r&\\1C&XvsB&",[global])),
+ <<"oHYpsb1fsM1IhN1n">> = iolist_to_binary(re:replace("1","[\\d]","oHY\\1psb&fsM&IhN\\1&n",[])),
+ <<"oHYpsb1fsM1IhN1n">> = iolist_to_binary(re:replace("1","[\\d]","oHY\\1psb&fsM&IhN\\1&n",[global])),
+ <<"-KJX">> = iolist_to_binary(re:replace("-","[\\D]","&KJX",[])),
+ <<"-KJX">> = iolist_to_binary(re:replace("-","[\\D]","&KJX",[global])),
+ <<"S*I*KU** Failers">> = iolist_to_binary(re:replace("*** Failers","[\\D]","S&\\1I&KU",[])),
+ <<"S*I*KUS*I*KUS*I*KUS I KUSFIFKUSaIaKUSiIiKUSlIlKUSeIeKUSrIrKUSsIsKU">> = iolist_to_binary(re:replace("*** Failers","[\\D]","S&\\1I&KU",[global])),
+ <<"WSKtUY">> = iolist_to_binary(re:replace("-","[\\D]","WSKtUY",[])),
+ <<"WSKtUY">> = iolist_to_binary(re:replace("-","[\\D]","WSKtUY",[global])),
+ <<"1">> = iolist_to_binary(re:replace("1","[\\D]","B\\1iB",[])),
+ <<"1">> = iolist_to_binary(re:replace("1","[\\D]","B\\1iB",[global])),
+ <<"bkabprVc">> = iolist_to_binary(re:replace("abc","ab|cd","bk&prV",[])),
+ <<"bkabprVc">> = iolist_to_binary(re:replace("abc","ab|cd","bk&prV",[global])),
+ <<"oxPHxnpgpabTabDdTmMcd">> = iolist_to_binary(re:replace("abcd","ab|cd","oxPHxnpgp&T&DdTmM",[])),
+ <<"oxPHxnpgpabTabDdTmMoxPHxnpgpcdTcdDdTmM">> = iolist_to_binary(re:replace("abcd","ab|cd","oxPHxnpgp&T&DdTmM",[global])),
+ <<"dpfHboradY">> = iolist_to_binary(re:replace("def","()ef","pfH\\1bor\\1adY",[])),
+ <<"dpfHboradY">> = iolist_to_binary(re:replace("def","()ef","pfH\\1bor\\1adY",[global])),
+ <<"Uma(b">> = iolist_to_binary(re:replace("a(b","a\\(b","Um&",[])),
+ <<"Uma(b">> = iolist_to_binary(re:replace("a(b","a\\(b","Um&",[global])),
+ <<"YyxabuKXMauxXBpkrd">> = iolist_to_binary(re:replace("ab","a\\(*b","Yyx&uKXMauxXBpkrd",[])),
+ <<"YyxabuKXMauxXBpkrd">> = iolist_to_binary(re:replace("ab","a\\(*b","Yyx&uKXMauxXBpkrd",[global])),
+ <<"pDTwGyKkiLEWnnefa((b">> = iolist_to_binary(re:replace("a((b","a\\(*b","pDTwGyKkiLEWnnef&",[])),
+ <<"pDTwGyKkiLEWnnefa((b">> = iolist_to_binary(re:replace("a((b","a\\(*b","pDTwGyKkiLEWnnef&",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","a\\\\b","G\\1H\\1qrOi&\\1&aUty",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","a\\\\b","G\\1H\\1qrOi&\\1&aUty",[global])),
+ <<"eaywaaaVSCBcjnuIfRXabc">> = iolist_to_binary(re:replace("abc","((a))","e&yw&\\1&VSCBcjnuIfRX\\1",[])),
+ <<"eaywaaaVSCBcjnuIfRXabc">> = iolist_to_binary(re:replace("abc","((a))","e&yw&\\1&VSCBcjnuIfRX\\1",[global])),
+ <<"IbabcEabc">> = iolist_to_binary(re:replace("abc","(a)b(c)","Ib&E&",[])),
+ <<"IbabcEabc">> = iolist_to_binary(re:replace("abc","(a)b(c)","Ib&E&",[global])),
+ <<"aabbgflabcrIsYKabcUvEj">> = iolist_to_binary(re:replace("aabbabc","a+b+c","gf\\1\\1l&rIsYK&UvEj",[])),
+ <<"aabbgflabcrIsYKabcUvEj">> = iolist_to_binary(re:replace("aabbabc","a+b+c","gf\\1\\1l&rIsYK&UvEj",[global])),
+ <<"aabbUMebt">> = iolist_to_binary(re:replace("aabbabc","a{1,}b{1,}c","UMeb\\1t",[])),
+ <<"aabbUMebt">> = iolist_to_binary(re:replace("aabbabc","a{1,}b{1,}c","UMeb\\1t",[global])),
+ <<"pPfLrjPUFRjvuHjcjabc">> = iolist_to_binary(re:replace("abcabc","a.+?c","pPf\\1LrjPUFRjvuH\\1jcj\\1",[])),
+ <<"pPfLrjPUFRjvuHjcjpPfLrjPUFRjvuHjcj">> = iolist_to_binary(re:replace("abcabc","a.+?c","pPf\\1LrjPUFRjvuH\\1jcj\\1",[global])),
+ <<"abocUabav">> = iolist_to_binary(re:replace("ab","(a+|b)*","&ocU&av",[])),
+ <<"abocUabavocUav">> = iolist_to_binary(re:replace("ab","(a+|b)*","&ocU&av",[global])),
+ <<"FWabLo">> = iolist_to_binary(re:replace("ab","(a+|b){0,}","FW&Lo",[])),
+ <<"FWabLoFWLo">> = iolist_to_binary(re:replace("ab","(a+|b){0,}","FW&Lo",[global])),
+ <<"EGbhiYYab">> = iolist_to_binary(re:replace("ab","(a+|b)+","EG\\1hiYY&",[])),
+ <<"EGbhiYYab">> = iolist_to_binary(re:replace("ab","(a+|b)+","EG\\1hiYY&",[global])),
+ <<"jbtiMbbNbCoAUbUC">> = iolist_to_binary(re:replace("ab","(a+|b){1,}","j\\1tiM\\1\\1N\\1CoAU\\1UC",[])),
+ <<"jbtiMbbNbCoAUbUC">> = iolist_to_binary(re:replace("ab","(a+|b){1,}","j\\1tiM\\1\\1N\\1CoAU\\1UC",[global])),
+ ok.
+run18() ->
+ <<"aLWaSkPahb">> = iolist_to_binary(re:replace("ab","(a+|b)?","\\1LW\\1SkP&h",[])),
+ <<"aLWaSkPahbLWbSkPbhLWSkPh">> = iolist_to_binary(re:replace("ab","(a+|b)?","\\1LW\\1SkP&h",[global])),
+ <<"Aab">> = iolist_to_binary(re:replace("ab","(a+|b){0,1}","A\\1",[])),
+ <<"AaAbA">> = iolist_to_binary(re:replace("ab","(a+|b){0,1}","A\\1",[global])),
+ <<"QOcdemOcded">> = iolist_to_binary(re:replace("cde","[^ab]*","QO&mO&d",[])),
+ <<"QOcdemOcdedQOmOd">> = iolist_to_binary(re:replace("cde","[^ab]*","QO&mO&d",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","iTWYAHkkEiJ&r",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","iTWYAHkkEiJ&r",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","abc","Q",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","abc","Q",[global])),
+ <<"nboabbbcdffWetJfpMLDkabbbcdjOabbbcd">> = iolist_to_binary(re:replace("abbbcd","([abc])*d","nbo&ffWetJfpMLDk&jO&",[])),
+ <<"nboabbbcdffWetJfpMLDkabbbcdjOabbbcd">> = iolist_to_binary(re:replace("abbbcd","([abc])*d","nbo&ffWetJfpMLDk&jO&",[global])),
+ <<"JaabcduaabcdVPsa">> = iolist_to_binary(re:replace("abcd","([abc])*bcd","J\\1&ua&VPs\\1",[])),
+ <<"JaabcduaabcdVPsa">> = iolist_to_binary(re:replace("abcd","([abc])*bcd","J\\1&ua&VPs\\1",[global])),
+ <<"e">> = iolist_to_binary(re:replace("e","a|b|c|d|e","&",[])),
+ <<"e">> = iolist_to_binary(re:replace("e","a|b|c|d|e","&",[global])),
+ <<"kefefAeXq">> = iolist_to_binary(re:replace("ef","(a|b|c|d|e)f","k&&A\\1Xq",[])),
+ <<"kefefAeXq">> = iolist_to_binary(re:replace("ef","(a|b|c|d|e)f","k&&A\\1Xq",[global])),
+ <<"fsGDN">> = iolist_to_binary(re:replace("abcdefg","abcd*efg","fsG\\1D\\1\\1N\\1",[])),
+ <<"fsGDN">> = iolist_to_binary(re:replace("abcdefg","abcd*efg","fsG\\1D\\1\\1N\\1",[global])),
+ <<"xThMpLDjpnyabbbz">> = iolist_to_binary(re:replace("xabyabbbz","ab*","T\\1hMpLDjpn",[])),
+ <<"xThMpLDjpnyThMpLDjpnz">> = iolist_to_binary(re:replace("xabyabbbz","ab*","T\\1hMpLDjpn",[global])),
+ <<"xqjaJaVJVyabbbz">> = iolist_to_binary(re:replace("xayabbbz","ab*","qj&J&VJV",[])),
+ <<"xqjaJaVJVyqjabbbJabbbVJVz">> = iolist_to_binary(re:replace("xayabbbz","ab*","qj&J&VJV",[global])),
+ <<"abCcdeQnNecduqUkMSfcdGcdecdeh">> = iolist_to_binary(re:replace("abcde","(ab|cd)e","C&QnNe\\1uqUkMSf\\1G&&h",[])),
+ <<"abCcdeQnNecduqUkMSfcdGcdecdeh">> = iolist_to_binary(re:replace("abcde","(ab|cd)e","C&QnNe\\1uqUkMSf\\1G&&h",[global])),
+ <<"gJyOb">> = iolist_to_binary(re:replace("hij","[abhgefdc]ij","gJyOb",[])),
+ <<"gJyOb">> = iolist_to_binary(re:replace("hij","[abhgefdc]ij","gJyOb",[global])),
+ <<"abcdGbYcPqM">> = iolist_to_binary(re:replace("abcdef","(abc|)ef","GbY\\1cPqM",[])),
+ <<"abcdGbYcPqM">> = iolist_to_binary(re:replace("abcdef","(abc|)ef","GbY\\1cPqM",[global])),
+ <<"aUbcdUBbcdAUpIFAbVerWgt">> = iolist_to_binary(re:replace("abcd","(a|b)c*d","U&UB&AUpIFA\\1VerWgt",[])),
+ <<"aUbcdUBbcdAUpIFAbVerWgt">> = iolist_to_binary(re:replace("abcd","(a|b)c*d","U&UB&AUpIFA\\1VerWgt",[global])),
+ <<"abckK">> = iolist_to_binary(re:replace("abc","(ab|ab*)bc","&kK",[])),
+ <<"abckK">> = iolist_to_binary(re:replace("abc","(ab|ab*)bc","&kK",[global])),
+ <<"MFabcMbcbcabcXbcGWabcbc">> = iolist_to_binary(re:replace("abc","a([bc]*)c*","MF&M\\1\\1&X\\1GW&\\1",[])),
+ <<"MFabcMbcbcabcXbcGWabcbc">> = iolist_to_binary(re:replace("abc","a([bc]*)c*","MF&M\\1\\1&X\\1GW&\\1",[global])),
+ <<"bcEbcyv">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c*d)","\\1E\\1yv",[])),
+ <<"bcEbcyv">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c*d)","\\1E\\1yv",[global])),
+ <<"HJx">> = iolist_to_binary(re:replace("abcd","a([bc]+)(c*d)","HJx",[])),
+ <<"HJx">> = iolist_to_binary(re:replace("abcd","a([bc]+)(c*d)","HJx",[global])),
+ ok.
+run19() ->
+ <<"HdbW">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c+d)","Hd\\1W",[])),
+ <<"HdbW">> = iolist_to_binary(re:replace("abcd","a([bc]*)(c+d)","Hd\\1W",[global])),
+ <<"FqCeJOadcdcdeIvQpadcdcdeadcdcdeadcdcdeH">> = iolist_to_binary(re:replace("adcdcde","a[bcd]*dcdcde","FqCeJO&IvQp\\1\\1&&&H",[])),
+ <<"FqCeJOadcdcdeIvQpadcdcdeadcdcdeadcdcdeH">> = iolist_to_binary(re:replace("adcdcde","a[bcd]*dcdcde","FqCeJO&IvQp\\1\\1&&&H",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bcd]+dcdcde","\\1&TNEyDw",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[bcd]+dcdcde","\\1&TNEyDw",[global])),
+ <<"abcde">> = iolist_to_binary(re:replace("abcde","a[bcd]+dcdcde","PqeS\\1GQJ&vSq&YhS",[])),
+ <<"abcde">> = iolist_to_binary(re:replace("abcde","a[bcd]+dcdcde","PqeS\\1GQJ&vSq&YhS",[global])),
+ <<"adcdcde">> = iolist_to_binary(re:replace("adcdcde","a[bcd]+dcdcde","vdBav\\1Ild",[])),
+ <<"adcdcde">> = iolist_to_binary(re:replace("adcdcde","a[bcd]+dcdcde","vdBav\\1Ild",[global])),
+ <<"GIjXVoAJXroabclW">> = iolist_to_binary(re:replace("abc","(ab|a)b*c","GIjXVoAJXro&lW",[])),
+ <<"GIjXVoAJXroabclW">> = iolist_to_binary(re:replace("abc","(ab|a)b*c","GIjXVoAJXro&lW",[global])),
+ <<"pKabcabctabcdqabcdaAabcdpgPtdK">> = iolist_to_binary(re:replace("abcd","((a)(b)c)(d)","pK\\1\\1t&q&aA&pgPtdK",[])),
+ <<"pKabcabctabcdqabcdaAabcdpgPtdK">> = iolist_to_binary(re:replace("abcd","((a)(b)c)(d)","pK\\1\\1t&q&aA&pgPtdK",[global])),
+ <<"XrxalphaplnalphaMFGv">> = iolist_to_binary(re:replace("alpha","[a-zA-Z_][a-zA-Z0-9_]*","Xrx&pln&MFG\\1v",[])),
+ <<"XrxalphaplnalphaMFGv">> = iolist_to_binary(re:replace("alpha","[a-zA-Z_][a-zA-Z0-9_]*","Xrx&pln&MFG\\1v",[global])),
+ <<"ajbhHEObuuuMEIegbh">> = iolist_to_binary(re:replace("abh","^a(bc+|b[eh])g|.h$","j&HEObuu\\1uMEIeg&",[])),
+ <<"ajbhHEObuuuMEIegbh">> = iolist_to_binary(re:replace("abh","^a(bc+|b[eh])g|.h$","j&HEObuu\\1uMEIeg&",[global])),
+ <<"effgzFiGeffgzUwqI">> = iolist_to_binary(re:replace("effgz","(bc+d$|ef*g.|h?i(j|k))","&FiG\\1UwqI",[])),
+ <<"effgzFiGeffgzUwqI">> = iolist_to_binary(re:replace("effgz","(bc+d$|ef*g.|h?i(j|k))","&FiG\\1UwqI",[global])),
+ <<"ijJMstbxCWsijpVijVwQav">> = iolist_to_binary(re:replace("ij","(bc+d$|ef*g.|h?i(j|k))","&JMstbxCWs&pV\\1VwQav",[])),
+ <<"ijJMstbxCWsijpVijVwQav">> = iolist_to_binary(re:replace("ij","(bc+d$|ef*g.|h?i(j|k))","&JMstbxCWs&pV\\1VwQav",[global])),
+ <<"rqYdteffgzVIpOoenIHdd">> = iolist_to_binary(re:replace("reffgz","(bc+d$|ef*g.|h?i(j|k))","qYdt&VIpOoenIHdd",[])),
+ <<"rqYdteffgzVIpOoenIHdd">> = iolist_to_binary(re:replace("reffgz","(bc+d$|ef*g.|h?i(j|k))","qYdt&VIpOoenIHdd",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","aq",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","aq",[global])),
+ <<"effg">> = iolist_to_binary(re:replace("effg","(bc+d$|ef*g.|h?i(j|k))","yHtJLFej\\1yYR\\1sQo&np",[])),
+ <<"effg">> = iolist_to_binary(re:replace("effg","(bc+d$|ef*g.|h?i(j|k))","yHtJLFej\\1yYR\\1sQo&np",[global])),
+ <<"bcdd">> = iolist_to_binary(re:replace("bcdd","(bc+d$|ef*g.|h?i(j|k))","y\\1WeuT\\1",[])),
+ <<"bcdd">> = iolist_to_binary(re:replace("bcdd","(bc+d$|ef*g.|h?i(j|k))","y\\1WeuT\\1",[global])),
+ <<"wodvWYlegweBrV">> = iolist_to_binary(re:replace("a","((((((((((a))))))))))","wodvWYlegweBrV",[])),
+ <<"wodvWYlegweBrV">> = iolist_to_binary(re:replace("a","((((((((((a))))))))))","wodvWYlegweBrV",[global])),
+ <<"gqasCpaas">> = iolist_to_binary(re:replace("aa","((((((((((a))))))))))\\10","gq\\1sCp\\1\\1s",[])),
+ <<"gqasCpaas">> = iolist_to_binary(re:replace("aa","((((((((((a))))))))))\\10","gq\\1sCp\\1\\1s",[global])),
+ <<"GwagSDfa">> = iolist_to_binary(re:replace("a","(((((((((a)))))))))","Gw&gSDf&",[])),
+ <<"GwagSDfa">> = iolist_to_binary(re:replace("a","(((((((((a)))))))))","Gw&gSDf&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","qj&H&TFbc&WmR",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","qj&H&TFbc&WmR",[global])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","multiple words of text","FwU",[])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","multiple words of text","FwU",[global])),
+ <<"uh-uh">> = iolist_to_binary(re:replace("uh-uh","multiple words of text","Tf&&&bwM&KOaXHg\\1WRNk",[])),
+ <<"uh-uh">> = iolist_to_binary(re:replace("uh-uh","multiple words of text","Tf&&&bwM&KOaXHg\\1WRNk",[global])),
+ <<"RdXXlExbAbHAgDE, yeah">> = iolist_to_binary(re:replace("multiple words, yeah","multiple words","R\\1dXXl\\1ExbAbHAgDE",[])),
+ <<"RdXXlExbAbHAgDE, yeah">> = iolist_to_binary(re:replace("multiple words, yeah","multiple words","R\\1dXXl\\1ExbAbHAgDE",[global])),
+ <<"ababcCxabsCTYB">> = iolist_to_binary(re:replace("abcde","(.*)c(.*)","\\1\\1cCx\\1sCTYB",[])),
+ <<"ababcCxabsCTYB">> = iolist_to_binary(re:replace("abcde","(.*)c(.*)","\\1\\1cCx\\1sCTYB",[global])),
+ <<"rW">> = iolist_to_binary(re:replace("(a, b)","\\((.*), (.*)\\)","rW",[])),
+ <<"rW">> = iolist_to_binary(re:replace("(a, b)","\\((.*), (.*)\\)","rW",[global])),
+ <<"dabcd">> = iolist_to_binary(re:replace("abcd","abcd","d&",[])),
+ <<"dabcd">> = iolist_to_binary(re:replace("abcd","abcd","d&",[global])),
+ <<"bclAbcTn">> = iolist_to_binary(re:replace("abcd","a(bc)d","\\1lA\\1Tn",[])),
+ <<"bclAbcTn">> = iolist_to_binary(re:replace("abcd","a(bc)d","\\1lA\\1Tn",[global])),
+ <<"waf">> = iolist_to_binary(re:replace("ac","a[-]?c","waf",[])),
+ <<"waf">> = iolist_to_binary(re:replace("ac","a[-]?c","waf",[global])),
+ <<"HpOuFXbFnUEO">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","HpOuFXbFnUEO",[])),
+ <<"HpOuFXbFnUEO">> = iolist_to_binary(re:replace("abcabc","(abc)\\1","HpOuFXbFnUEO",[global])),
+ ok.
+run20() ->
+ <<"XvCLIKabcabcohl">> = iolist_to_binary(re:replace("abcabc","([a-c]*)\\1","XvCLIK&ohl",[])),
+ <<"XvCLIKabcabcohlXvCLIKohl">> = iolist_to_binary(re:replace("abcabc","([a-c]*)\\1","XvCLIK&ohl",[global])),
+ <<"THmLVdxHpEOamaQ">> = iolist_to_binary(re:replace("a","(a)|\\1","THmLVdxHpEOam\\1Q",[])),
+ <<"THmLVdxHpEOamaQ">> = iolist_to_binary(re:replace("a","(a)|\\1","THmLVdxHpEOam\\1Q",[global])),
+ <<"*** FjGfKKSoilers">> = iolist_to_binary(re:replace("*** Failers","(a)|\\1","jGfKKSo",[])),
+ <<"*** FjGfKKSoilers">> = iolist_to_binary(re:replace("*** Failers","(a)|\\1","jGfKKSo",[global])),
+ <<"pCab">> = iolist_to_binary(re:replace("ab","(a)|\\1","pC&",[])),
+ <<"pCab">> = iolist_to_binary(re:replace("ab","(a)|\\1","pC&",[global])),
+ <<"x">> = iolist_to_binary(re:replace("x","(a)|\\1","U",[])),
+ <<"x">> = iolist_to_binary(re:replace("x","(a)|\\1","U",[global])),
+ <<"nwvlinqmgabbLababbvbcbc">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2)*","nwvlinqmga\\1L&v",[])),
+ <<"nwvlinqmgabbLababbvnwvlinqmgaLvbnwvlinqmgacbcLcbcvnwvlinqmgaLv">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2)*","nwvlinqmga\\1L&v",[global])),
+ <<"XEababbbcbccbcnoei">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2){3}","XE&\\1noei",[])),
+ <<"XEababbbcbccbcnoei">> = iolist_to_binary(re:replace("ababbbcbc","(([a-c])b*?\\2){3}","XE&\\1noei",[global])),
+ <<"aaaxabaxbaaxbbaxQHJip">> = iolist_to_binary(re:replace("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+","&QHJip",[])),
+ <<"aaaxabaxbaaxbbaxQHJip">> = iolist_to_binary(re:replace("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+","&QHJip",[global])),
+ <<"bbaababbabaaaaaFjrtkQstbbaaaabbabbaaaabbaRobbaaaabbaQwbbaJbbaaaabbabbaaaabba">> = iolist_to_binary(re:replace("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}","FjrtkQst&&Ro&Qw\\1J&&",[])),
+ <<"bbaababbabaaaaaFjrtkQstbbaaaabbabbaaaabbaRobbaaaabbaQwbbaJbbaaaabbabbaaaabba">> = iolist_to_binary(re:replace("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}","FjrtkQst&&Ro&Qw\\1J&&",[global])),
+ <<"hryRShiLJ">> = iolist_to_binary(re:replace("ABC","abc","hryRShiL\\1J",[caseless])),
+ <<"hryRShiLJ">> = iolist_to_binary(re:replace("ABC","abc","hryRShiL\\1J",[caseless,
+ global])),
+ <<"XHUenvABCCmAOuuCY">> = iolist_to_binary(re:replace("XABCY","abc","HUenv&C\\1mAOuuC",[caseless])),
+ <<"XHUenvABCCmAOuuCY">> = iolist_to_binary(re:replace("XABCY","abc","HUenv&C\\1mAOuuC",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("ABABC","abc","\\1",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("ABABC","abc","\\1",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","qc&a\\1M&&\\1qqO&&YaV",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","qc&a\\1M&&\\1qqO&&YaV",[caseless,
+ global])),
+ <<"aaxabxbaxbbx">> = iolist_to_binary(re:replace("aaxabxbaxbbx","abc","YoMmmB&v\\1N\\1voc",[caseless])),
+ <<"aaxabxbaxbbx">> = iolist_to_binary(re:replace("aaxabxbaxbbx","abc","YoMmmB&v\\1N\\1voc",[caseless,
+ global])),
+ <<"XBC">> = iolist_to_binary(re:replace("XBC","abc","\\1gwN\\1pcAL\\1le&B",[caseless])),
+ <<"XBC">> = iolist_to_binary(re:replace("XBC","abc","\\1gwN\\1pcAL\\1le&B",[caseless,
+ global])),
+ <<"AXC">> = iolist_to_binary(re:replace("AXC","abc","vQ&&a\\1Kw",[caseless])),
+ <<"AXC">> = iolist_to_binary(re:replace("AXC","abc","vQ&&a\\1Kw",[caseless,
+ global])),
+ <<"ABX">> = iolist_to_binary(re:replace("ABX","abc","pSJJqa&TbyEb",[caseless])),
+ <<"ABX">> = iolist_to_binary(re:replace("ABX","abc","pSJJqa&TbyEb",[caseless,
+ global])),
+ <<"ABCYSKriNcABCxqw">> = iolist_to_binary(re:replace("ABC","ab*c","&YSKriNc&xqw",[caseless])),
+ <<"ABCYSKriNcABCxqw">> = iolist_to_binary(re:replace("ABC","ab*c","&YSKriNc&xqw",[caseless,
+ global])),
+ <<"">> = iolist_to_binary(re:replace("ABC","ab*bc","\\1",[caseless])),
+ <<"">> = iolist_to_binary(re:replace("ABC","ab*bc","\\1",[caseless,
+ global])),
+ <<"xd">> = iolist_to_binary(re:replace("ABBC","ab*bc","xd",[caseless])),
+ <<"xd">> = iolist_to_binary(re:replace("ABBC","ab*bc","xd",[caseless,
global])),
-?line <<"ABnpaQvR">> = iolist_to_binary(re:replace("ABABC","abc","npaQvR",[caseless])),
-?line <<"ABnpaQvR">> = iolist_to_binary(re:replace("ABABC","abc","npaQvR",[caseless,
+ <<"fSNABBBBCXyDgO">> = iolist_to_binary(re:replace("ABBBBC","ab*?bc","fSN&\\1\\1XyDgO\\1",[caseless])),
+ <<"fSNABBBBCXyDgO">> = iolist_to_binary(re:replace("ABBBBC","ab*?bc","fSN&\\1\\1XyDgO\\1",[caseless,
+ global])),
+ <<"kp">> = iolist_to_binary(re:replace("ABBBBC","ab{0,}?bc","kp",[caseless])),
+ <<"kp">> = iolist_to_binary(re:replace("ABBBBC","ab{0,}?bc","kp",[caseless,
+ global])),
+ <<"TjPcYlpdNDABBCAJoFsABBC">> = iolist_to_binary(re:replace("ABBC","ab+?bc","TjPcYlpdND\\1\\1&AJoFs&",[caseless])),
+ <<"TjPcYlpdNDABBCAJoFsABBC">> = iolist_to_binary(re:replace("ABBC","ab+?bc","TjPcYlpdND\\1\\1&AJoFs&",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","WWQXKaM\\1xLF&",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","WWQXKaM\\1xLF&",[caseless,
+ global])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","ab+bc","w",[caseless])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","ab+bc","w",[caseless,
+ global])),
+ <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab+bc","SYdD",[caseless])),
+ <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab+bc","SYdD",[caseless,
+ global])),
+ <<"TABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab+bc","T&",[caseless])),
+ <<"TABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab+bc","T&",[caseless,
+ global])),
+ <<"grMABBBBCABBBBCnRD">> = iolist_to_binary(re:replace("ABBBBC","ab{1,}?bc","grM&&nRD",[caseless])),
+ <<"grMABBBBCABBBBCnRD">> = iolist_to_binary(re:replace("ABBBBC","ab{1,}?bc","grM&&nRD",[caseless,
+ global])),
+ <<"JJtIBfABBBBCaKtYmqwv">> = iolist_to_binary(re:replace("ABBBBC","ab{1,3}?bc","\\1JJtIBf&\\1aKtYmqwv",[caseless])),
+ <<"JJtIBfABBBBCaKtYmqwv">> = iolist_to_binary(re:replace("ABBBBC","ab{1,3}?bc","\\1JJtIBf&\\1aKtYmqwv",[caseless,
+ global])),
+ <<"gwAlxwDfABBBBCNQKABBBBClABBBBCLxf">> = iolist_to_binary(re:replace("ABBBBC","ab{3,4}?bc","gw\\1AlxwDf&NQK&l\\1&Lxf",[caseless])),
+ <<"gwAlxwDfABBBBCNQKABBBBClABBBBCLxf">> = iolist_to_binary(re:replace("ABBBBC","ab{3,4}?bc","gw\\1AlxwDf&NQK&l\\1&Lxf",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}?bc","qiwoP\\1bmIlc\\1&",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}?bc","qiwoP\\1bmIlc\\1&",[caseless,
+ global])),
+ <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab{4,5}?bc","aBG\\1YIvTYXxiuDt&",[caseless])),
+ <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab{4,5}?bc","aBG\\1YIvTYXxiuDt&",[caseless,
+ global])),
+ <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab{4,5}?bc","T\\1d&vifs\\1n\\1Jvt",[caseless])),
+ <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab{4,5}?bc","T\\1d&vifs\\1n\\1Jvt",[caseless,
+ global])),
+ <<"MvyHLhAABBCiABBCN">> = iolist_to_binary(re:replace("ABBC","ab??bc","M\\1vyHLhA\\1&\\1i&N",[caseless])),
+ <<"MvyHLhAABBCiABBCN">> = iolist_to_binary(re:replace("ABBC","ab??bc","M\\1vyHLhA\\1&\\1i&N",[caseless,
+ global])),
+ <<"mlLABCgtDiemoB">> = iolist_to_binary(re:replace("ABC","ab??bc","mlL&gtDiemoB",[caseless])),
+ <<"mlLABCgtDiemoB">> = iolist_to_binary(re:replace("ABC","ab??bc","mlL&gtDiemoB",[caseless,
+ global])),
+ ok.
+run21() ->
+ <<"aMKJBABCqBQrABCWvqqJABCVi">> = iolist_to_binary(re:replace("ABC","ab{0,1}?bc","aMKJB&qBQr&WvqqJ&Vi",[caseless])),
+ <<"aMKJBABCqBQrABCWvqqJABCVi">> = iolist_to_binary(re:replace("ABC","ab{0,1}?bc","aMKJB&qBQr&WvqqJ&Vi",[caseless,
+ global])),
+ <<"KABCqKjWXyABC">> = iolist_to_binary(re:replace("ABC","ab??c","K\\1&qKjWXy\\1&",[caseless])),
+ <<"KABCqKjWXyABC">> = iolist_to_binary(re:replace("ABC","ab??c","K\\1&qKjWXy\\1&",[caseless,
+ global])),
+ <<"t">> = iolist_to_binary(re:replace("ABC","ab{0,1}?c","t",[caseless])),
+ <<"t">> = iolist_to_binary(re:replace("ABC","ab{0,1}?c","t",[caseless,
+ global])),
+ <<"djnySdABCABCxQAR">> = iolist_to_binary(re:replace("ABC","^abc$","djnyS\\1d&&\\1\\1x\\1QAR",[caseless])),
+ <<"djnySdABCABCxQAR">> = iolist_to_binary(re:replace("ABC","^abc$","djnyS\\1d&&\\1\\1x\\1QAR",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","&cOwCIe",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","&cOwCIe",[caseless,
+ global])),
+ <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","^abc$","DTRA&tGT\\1WCjF\\1\\1",[caseless])),
+ <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","^abc$","DTRA&tGT\\1WCjF\\1\\1",[caseless,
+ global])),
+ <<"ABCC">> = iolist_to_binary(re:replace("ABCC","^abc$","YC\\1",[caseless])),
+ <<"ABCC">> = iolist_to_binary(re:replace("ABCC","^abc$","YC\\1",[caseless,
global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","E&beuUX&&",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","abc","E&beuUX&&",[caseless,
- global])),
-?line <<"aaxabxbaxbbx">> = iolist_to_binary(re:replace("aaxabxbaxbbx","abc","\\1hAU\\1hg&Pk",[caseless])),
-?line <<"aaxabxbaxbbx">> = iolist_to_binary(re:replace("aaxabxbaxbbx","abc","\\1hAU\\1hg&Pk",[caseless,
- global])),
-?line <<"XBC">> = iolist_to_binary(re:replace("XBC","abc","yqsG",[caseless])),
-?line <<"XBC">> = iolist_to_binary(re:replace("XBC","abc","yqsG",[caseless,
- global])),
-?line <<"AXC">> = iolist_to_binary(re:replace("AXC","abc","\\1bi&Ff\\1kGVy&V",[caseless])),
-?line <<"AXC">> = iolist_to_binary(re:replace("AXC","abc","\\1bi&Ff\\1kGVy&V",[caseless,
- global])),
-?line <<"ABX">> = iolist_to_binary(re:replace("ABX","abc","x&m\\1jtf&ptFxBd",[caseless])),
-?line <<"ABX">> = iolist_to_binary(re:replace("ABX","abc","x&m\\1jtf&ptFxBd",[caseless,
- global])),
-?line <<"VOTkukABC">> = iolist_to_binary(re:replace("ABC","ab*c","V\\1OTkuk&\\1",[caseless])),
-?line <<"VOTkukABC">> = iolist_to_binary(re:replace("ABC","ab*c","V\\1OTkuk&\\1",[caseless,
+ <<"oCxwvYlagrHYCUNjC">> = iolist_to_binary(re:replace("ABCC","^abc","oC\\1xwvYlagrHYCUN\\1j",[caseless])),
+ <<"oCxwvYlagrHYCUNjC">> = iolist_to_binary(re:replace("ABCC","^abc","oC\\1xwvYlagrHYCUN\\1j",[caseless,
+ global])),
+ <<"AABCYOABCqABCABCXABCKHJVXnu">> = iolist_to_binary(re:replace("AABC","abc$","&YO&q&&X&\\1KHJVXnu",[caseless])),
+ <<"AABCYOABCqABCABCXABCKHJVXnu">> = iolist_to_binary(re:replace("AABC","abc$","&YO&q&&X&\\1KHJVXnu",[caseless,
+ global])),
+ <<"YKSscFvdcxhKQAABC">> = iolist_to_binary(re:replace("ABC","^","YKSscFvdcx\\1hKQA\\1",[caseless])),
+ <<"YKSscFvdcxhKQAABC">> = iolist_to_binary(re:replace("ABC","^","YKSscFvdcx\\1hKQA\\1",[caseless,
+ global])),
+ <<"ABCJPmJKxRqaJn">> = iolist_to_binary(re:replace("ABC","$","JPmJ&K\\1\\1x\\1RqaJ\\1n",[caseless])),
+ <<"ABCJPmJKxRqaJn">> = iolist_to_binary(re:replace("ABC","$","JPmJ&K\\1\\1x\\1RqaJ\\1n",[caseless,
+ global])),
+ <<"KovmYABCBPABCY">> = iolist_to_binary(re:replace("ABC","a.c","KovmY&BP&Y",[caseless])),
+ <<"KovmYABCBPABCY">> = iolist_to_binary(re:replace("ABC","a.c","KovmY&BP&Y",[caseless,
+ global])),
+ <<"tnMtqk">> = iolist_to_binary(re:replace("AXC","a.c","t\\1\\1n\\1Mtqk",[caseless])),
+ <<"tnMtqk">> = iolist_to_binary(re:replace("AXC","a.c","t\\1\\1n\\1Mtqk",[caseless,
global])),
-?line <<"gkYiABCuYNOFDNc">> = iolist_to_binary(re:replace("ABC","ab*bc","g\\1kYi&uYNOFDNc",[caseless])),
-?line <<"gkYiABCuYNOFDNc">> = iolist_to_binary(re:replace("ABC","ab*bc","g\\1kYi&uYNOFDNc",[caseless,
- global])),
-?line <<"GHfaNWh">> = iolist_to_binary(re:replace("ABBC","ab*bc","G\\1HfaNWh",[caseless])),
-?line <<"GHfaNWh">> = iolist_to_binary(re:replace("ABBC","ab*bc","G\\1HfaNWh",[caseless,
- global])),
-?line <<"IJJBqWcABBBBCmU">> = iolist_to_binary(re:replace("ABBBBC","ab*?bc","I\\1JJB\\1\\1qWc&mU",[caseless])),
-?line <<"IJJBqWcABBBBCmU">> = iolist_to_binary(re:replace("ABBBBC","ab*?bc","I\\1JJB\\1\\1qWc&mU",[caseless,
- global])),
-?line <<"YOCTcABBBBCABBBBCbVDCpABBBBChP">> = iolist_to_binary(re:replace("ABBBBC","ab{0,}?bc","YOCTc&&bVDCp&hP",[caseless])),
-?line <<"YOCTcABBBBCABBBBCbVDCpABBBBChP">> = iolist_to_binary(re:replace("ABBBBC","ab{0,}?bc","YOCTc&&bVDCp&hP",[caseless,
- global])),
-?line <<"j">> = iolist_to_binary(re:replace("ABBC","ab+?bc","j",[caseless])),
-?line <<"j">> = iolist_to_binary(re:replace("ABBC","ab+?bc","j",[caseless,
+ <<"PTEd">> = iolist_to_binary(re:replace("AXYZC","a.*?c","PTEd",[caseless])),
+ <<"PTEd">> = iolist_to_binary(re:replace("AXYZC","a.*?c","PTEd",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.*c","\\1XFiq\\1uvPbLR",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.*c","\\1XFiq\\1uvPbLR",[caseless,
+ global])),
+ <<"cqlTAABCy">> = iolist_to_binary(re:replace("AABC","a.*c","cqlT&\\1y",[caseless])),
+ <<"cqlTAABCy">> = iolist_to_binary(re:replace("AABC","a.*c","cqlT&\\1y",[caseless,
+ global])),
+ <<"AXYZD">> = iolist_to_binary(re:replace("AXYZD","a.*c","nHl&b\\1Xh",[caseless])),
+ <<"AXYZD">> = iolist_to_binary(re:replace("AXYZD","a.*c","nHl&b\\1Xh",[caseless,
+ global])),
+ <<"ABDABDdC">> = iolist_to_binary(re:replace("ABD","a[bc]d","&&dC",[caseless])),
+ <<"ABDABDdC">> = iolist_to_binary(re:replace("ABD","a[bc]d","&&dC",[caseless,
+ global])),
+ <<"UqQFWlGkACEBdlidOCI">> = iolist_to_binary(re:replace("ACE","a[b-d]e","UqQF\\1WlGk&BdlidOCI\\1",[caseless])),
+ <<"UqQFWlGkACEBdlidOCI">> = iolist_to_binary(re:replace("ACE","a[b-d]e","UqQF\\1WlGk&BdlidOCI\\1",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[b-d]e","UKuM",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[b-d]e","UKuM",[caseless,
+ global])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","a[b-d]e","W",[caseless])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","a[b-d]e","W",[caseless,
+ global])),
+ <<"ABD">> = iolist_to_binary(re:replace("ABD","a[b-d]e","HF",[caseless])),
+ <<"ABD">> = iolist_to_binary(re:replace("ABD","a[b-d]e","HF",[caseless,
global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","vLfo&Q\\1&uXHE",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab+bc","vLfo&Q\\1&uXHE",[caseless,
+ <<"AFX">> = iolist_to_binary(re:replace("AAC","a[b-d]","FX",[caseless])),
+ <<"AFX">> = iolist_to_binary(re:replace("AAC","a[b-d]","FX",[caseless,
+ global])),
+ <<"aWjCeJjBuA-eA-wLdnI">> = iolist_to_binary(re:replace("A-","a[-b]","aWjCeJj\\1Bu&e&wLdnI",[caseless])),
+ <<"aWjCeJjBuA-eA-wLdnI">> = iolist_to_binary(re:replace("A-","a[-b]","aWjCeJj\\1Bu&e&wLdnI",[caseless,
+ global])),
+ <<"vEBoA-A-hhUA-oyIbqdTA">> = iolist_to_binary(re:replace("A-","a[b-]","vEBo&&hhU&oyIbq\\1d\\1TA",[caseless])),
+ <<"vEBoA-A-hhUA-oyIbqdTA">> = iolist_to_binary(re:replace("A-","a[b-]","vEBo&&hhU&oyIbq\\1d\\1TA",[caseless,
+ global])),
+ <<"lxsWAAwljA]">> = iolist_to_binary(re:replace("A]","a]","lxsW\\1AAwlj&",[caseless])),
+ <<"lxsWAAwljA]">> = iolist_to_binary(re:replace("A]","a]","lxsW\\1AAwlj&",[caseless,
+ global])),
+ <<"A]BBA]BwueRHPvA]BFaS">> = iolist_to_binary(re:replace("A]B","a[]]b","&B&\\1wueRHPv&FaS",[caseless])),
+ <<"A]BBA]BwueRHPvA]BFaS">> = iolist_to_binary(re:replace("A]B","a[]]b","&B&\\1wueRHPv&FaS",[caseless,
+ global])),
+ ok.
+run22() ->
+ <<"UTPAEDUuRpFvTKUIXNAEDH">> = iolist_to_binary(re:replace("AED","a[^bc]d","U\\1TP&UuRpFvTKUIXN&H",[caseless])),
+ <<"UTPAEDUuRpFvTKUIXNAEDH">> = iolist_to_binary(re:replace("AED","a[^bc]d","U\\1TP&UuRpFvTKUIXN&H",[caseless,
global])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","ab+bc","hPVKmARvLrX&l",[caseless])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","ab+bc","hPVKmARvLrX&l",[caseless,
- global])),
-?line <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab+bc","&\\1OP&EAg",[caseless])),
-?line <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab+bc","&\\1OP&EAg",[caseless,
+ <<"EEkBKqX">> = iolist_to_binary(re:replace("ADC","a[^-b]c","EEk\\1BKqX",[caseless])),
+ <<"EEkBKqX">> = iolist_to_binary(re:replace("ADC","a[^-b]c","EEk\\1BKqX",[caseless,
global])),
-?line <<"PElq">> = iolist_to_binary(re:replace("ABBBBC","ab+bc","PElq",[caseless])),
-?line <<"PElq">> = iolist_to_binary(re:replace("ABBBBC","ab+bc","PElq",[caseless,
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^-b]c","W&hcyn\\1LTFcrP",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^-b]c","W&hcyn\\1LTFcrP",[caseless,
+ global])),
+ <<"ABD">> = iolist_to_binary(re:replace("ABD","a[^-b]c","l&hDcBVR&&P\\1HyoS&",[caseless])),
+ <<"ABD">> = iolist_to_binary(re:replace("ABD","a[^-b]c","l&hDcBVR&&P\\1HyoS&",[caseless,
+ global])),
+ <<"A-C">> = iolist_to_binary(re:replace("A-C","a[^-b]c","r&\\1",[caseless])),
+ <<"A-C">> = iolist_to_binary(re:replace("A-C","a[^-b]c","r&\\1",[caseless,
global])),
-?line <<"aqDjyRpvS">> = iolist_to_binary(re:replace("ABBBBC","ab{1,}?bc","\\1a\\1\\1q\\1DjyRpvS\\1",[caseless])),
-?line <<"aqDjyRpvS">> = iolist_to_binary(re:replace("ABBBBC","ab{1,}?bc","\\1a\\1\\1q\\1DjyRpvS\\1",[caseless,
- global])),
-?line <<"aTWqxABBBBCInABBBBCpRFpO">> = iolist_to_binary(re:replace("ABBBBC","ab{1,3}?bc","aTW\\1qx&In&\\1pRFpO",[caseless])),
-?line <<"aTWqxABBBBCInABBBBCpRFpO">> = iolist_to_binary(re:replace("ABBBBC","ab{1,3}?bc","aTW\\1qx&In&\\1pRFpO",[caseless,
- global])),
-?line <<"ABBBBCTlrABBBBCJOlJvqwgABBBBCh">> = iolist_to_binary(re:replace("ABBBBC","ab{3,4}?bc","&T\\1lr&JOl\\1Jvqwg&h",[caseless])),
-?line <<"ABBBBCTlrABBBBCJOlJvqwgABBBBCh">> = iolist_to_binary(re:replace("ABBBBC","ab{3,4}?bc","&T\\1lr&JOl\\1Jvqwg&h",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}?bc","QBVMd\\1eBP&j\\1Y\\1\\1",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","ab{4,5}?bc","QBVMd\\1eBP&j\\1Y\\1\\1",[caseless,
- global])),
-?line <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab{4,5}?bc","pvlNJ\\1o\\1yAcNJhSec\\1",[caseless])),
-?line <<"ABQ">> = iolist_to_binary(re:replace("ABQ","ab{4,5}?bc","pvlNJ\\1o\\1yAcNJhSec\\1",[caseless,
- global])),
-?line <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab{4,5}?bc","dGdgiMqW\\1X",[caseless])),
-?line <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","ab{4,5}?bc","dGdgiMqW\\1X",[caseless,
- global])),
-?line <<"eqlxxIffIhfLhL">> = iolist_to_binary(re:replace("ABBC","ab??bc","eqlxxIffIhfLhL",[caseless])),
-?line <<"eqlxxIffIhfLhL">> = iolist_to_binary(re:replace("ABBC","ab??bc","eqlxxIffIhfLhL",[caseless,
- global])),
-?line <<"bQqNAjyKOqhMXyoABC">> = iolist_to_binary(re:replace("ABC","ab??bc","b\\1QqNAjyKOqhMXyo&",[caseless])),
-?line <<"bQqNAjyKOqhMXyoABC">> = iolist_to_binary(re:replace("ABC","ab??bc","b\\1QqNAjyKOqhMXyo&",[caseless,
- global])),
-?line <<"jJQGABCIRM">> = iolist_to_binary(re:replace("ABC","ab{0,1}?bc","jJQG&IR\\1M",[caseless])),
-?line <<"jJQGABCIRM">> = iolist_to_binary(re:replace("ABC","ab{0,1}?bc","jJQG&IR\\1M",[caseless,
- global])),
-?line <<"gPABCCho">> = iolist_to_binary(re:replace("ABC","ab??c","gP&Cho",[caseless])),
-?line <<"gPABCCho">> = iolist_to_binary(re:replace("ABC","ab??c","gP&Cho",[caseless,
+ <<"wsKsChmsBbyoCwJGFq">> = iolist_to_binary(re:replace("ADC","a[^]b]c","wsKsChm\\1sB\\1byoCwJGFq",[caseless])),
+ <<"wsKsChmsBbyoCwJGFq">> = iolist_to_binary(re:replace("ADC","a[^]b]c","wsKsChm\\1sB\\1byoCwJGFq",[caseless,
+ global])),
+ <<"AdCuC">> = iolist_to_binary(re:replace("ABC","ab|cd","AdCu",[caseless])),
+ <<"AdCuC">> = iolist_to_binary(re:replace("ABC","ab|cd","AdCu",[caseless,
+ global])),
+ <<"kPjHRmkRWABOFqNCD">> = iolist_to_binary(re:replace("ABCD","ab|cd","kPjHRm\\1k\\1RW&OFqN",[caseless])),
+ <<"kPjHRmkRWABOFqNkPjHRmkRWCDOFqN">> = iolist_to_binary(re:replace("ABCD","ab|cd","kPjHRm\\1k\\1RW&OFqN",[caseless,
+ global])),
+ <<"DipEFEFNEFXjXNBJMTG">> = iolist_to_binary(re:replace("DEF","()ef","ip&&N&XjXNBJMTG\\1",[caseless])),
+ <<"DipEFEFNEFXjXNBJMTG">> = iolist_to_binary(re:replace("DEF","()ef","ip&&N&XjXNBJMTG\\1",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","$b","jl",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","$b","jl",[caseless,
+ global])),
+ <<"A]C">> = iolist_to_binary(re:replace("A]C","$b","Ghx\\1\\1nMcXP&D\\1hXTKGqJ",[caseless])),
+ <<"A]C">> = iolist_to_binary(re:replace("A]C","$b","Ghx\\1\\1nMcXP&D\\1hXTKGqJ",[caseless,
+ global])),
+ <<"B">> = iolist_to_binary(re:replace("B","$b","&CU&s",[caseless])),
+ <<"B">> = iolist_to_binary(re:replace("B","$b","&CU&s",[caseless,
+ global])),
+ <<"q">> = iolist_to_binary(re:replace("A(B","a\\(b","q",[caseless])),
+ <<"q">> = iolist_to_binary(re:replace("A(B","a\\(b","q",[caseless,
+ global])),
+ <<"LbAKAddxuaGFABjds">> = iolist_to_binary(re:replace("AB","a\\(*b","LbAKAddx\\1\\1uaGF&jd\\1s",[caseless])),
+ <<"LbAKAddxuaGFABjds">> = iolist_to_binary(re:replace("AB","a\\(*b","LbAKAddx\\1\\1uaGF&jd\\1s",[caseless,
+ global])),
+ <<"WcHNHA((BeLNHyhL">> = iolist_to_binary(re:replace("A((B","a\\(*b","WcH\\1\\1\\1NH&\\1\\1eLNHy\\1hL",[caseless])),
+ <<"WcHNHA((BeLNHyhL">> = iolist_to_binary(re:replace("A((B","a\\(*b","WcH\\1\\1\\1NH&\\1\\1eLNHy\\1hL",[caseless,
+ global])),
+ <<"A">> = iolist_to_binary(re:replace("A","a\\\\b","FD\\1dW",[caseless,
+ notbol])),
+ <<"A">> = iolist_to_binary(re:replace("A","a\\\\b","FD\\1dW",[caseless,
+ notbol,
global])),
-?line <<"iNBxUabjwtTABCLABCvXhABC">> = iolist_to_binary(re:replace("ABC","ab{0,1}?c","iNBxUabjw\\1tT&L&vXh&",[caseless])),
-?line <<"iNBxUabjwtTABCLABCvXhABC">> = iolist_to_binary(re:replace("ABC","ab{0,1}?c","iNBxUabjw\\1tT&L&vXh&",[caseless,
- global])),
-?line <<"iBkpxqXNa">> = iolist_to_binary(re:replace("ABC","^abc$","iBkpxqXNa",[caseless])),
-?line <<"iBkpxqXNa">> = iolist_to_binary(re:replace("ABC","^abc$","iBkpxqXNa",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","OhTwUeW&yJtn",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^abc$","OhTwUeW&yJtn",[caseless,
+ <<"AojAgACCaWeAfuBC">> = iolist_to_binary(re:replace("ABC","((a))","\\1oj&g\\1CCaWe\\1fu",[caseless])),
+ <<"AojAgACCaWeAfuBC">> = iolist_to_binary(re:replace("ABC","((a))","\\1oj&g\\1CCaWe\\1fu",[caseless,
global])),
-?line <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","^abc$","LoawT&xKl\\1&",[caseless])),
-?line <<"ABBBBC">> = iolist_to_binary(re:replace("ABBBBC","^abc$","LoawT&xKl\\1&",[caseless,
- global])),
-?line <<"ABCC">> = iolist_to_binary(re:replace("ABCC","^abc$","iVcopu",[caseless])),
-?line <<"ABCC">> = iolist_to_binary(re:replace("ABCC","^abc$","iVcopu",[caseless,
- global])),
-?line <<"ABCtC">> = iolist_to_binary(re:replace("ABCC","^abc","&t",[caseless])),
-?line <<"ABCtC">> = iolist_to_binary(re:replace("ABCC","^abc","&t",[caseless,
- global])),
-?line <<"AABCWBABCtLipJGm">> = iolist_to_binary(re:replace("AABC","abc$","&W\\1B&tLipJGm",[caseless])),
-?line <<"AABCWBABCtLipJGm">> = iolist_to_binary(re:replace("AABC","abc$","&W\\1B&tLipJGm",[caseless,
- global])),
-?line <<"wDvJtREmkCGdgtGtgABC">> = iolist_to_binary(re:replace("ABC","^","wDvJt\\1REmk\\1CGdgtGtg",[caseless])),
-?line <<"wDvJtREmkCGdgtGtgABC">> = iolist_to_binary(re:replace("ABC","^","wDvJt\\1REmk\\1CGdgtGtg",[caseless,
- global])),
-?line <<"ABCWiqpRnpqRRBAD">> = iolist_to_binary(re:replace("ABC","$","W\\1iqpRnpq\\1RRB&\\1AD",[caseless])),
-?line <<"ABCWiqpRnpqRRBAD">> = iolist_to_binary(re:replace("ABC","$","W\\1iqpRnpq\\1RRB&\\1AD",[caseless,
+ <<"xSJDAQoInQAfBNwlABCJAO">> = iolist_to_binary(re:replace("ABC","(a)b(c)","xSJD\\1QoInQ\\1fBNwl&J\\1O",[caseless])),
+ <<"xSJDAQoInQAfBNwlABCJAO">> = iolist_to_binary(re:replace("ABC","(a)b(c)","xSJD\\1QoInQ\\1fBNwl&J\\1O",[caseless,
+ global])),
+ <<"AABBABCWpU">> = iolist_to_binary(re:replace("AABBABC","a+b+c","&W\\1pU",[caseless])),
+ <<"AABBABCWpU">> = iolist_to_binary(re:replace("AABBABC","a+b+c","&W\\1pU",[caseless,
+ global])),
+ <<"AABBvuHyJYABClhsNABCABC">> = iolist_to_binary(re:replace("AABBABC","a{1,}b{1,}c","vuHyJY&lhsN&&",[caseless])),
+ <<"AABBvuHyJYABClhsNABCABC">> = iolist_to_binary(re:replace("AABBABC","a{1,}b{1,}c","vuHyJY&lhsN&&",[caseless,
+ global])),
+ <<"PuUbOABC">> = iolist_to_binary(re:replace("ABCABC","a.+?c","Pu\\1UbO",[caseless])),
+ <<"PuUbOPuUbO">> = iolist_to_binary(re:replace("ABCABC","a.+?c","Pu\\1UbO",[caseless,
+ global])),
+ <<"FGYfABCDdRACwIXABC">> = iolist_to_binary(re:replace("ABCABC","a.*?c","FGYf&DdRA\\1C\\1\\1wIX",[caseless])),
+ <<"FGYfABCDdRACwIXFGYfABCDdRACwIX">> = iolist_to_binary(re:replace("ABCABC","a.*?c","FGYf&DdRA\\1C\\1\\1wIX",[caseless,
+ global])),
+ <<"hfyssBtPoqABC">> = iolist_to_binary(re:replace("ABCABC","a.{0,5}?c","\\1hfyssBt\\1Poq",[caseless])),
+ <<"hfyssBtPoqhfyssBtPoq">> = iolist_to_binary(re:replace("ABCABC","a.{0,5}?c","\\1hfyssBt\\1Poq",[caseless,
+ global])),
+ <<"aoHgobCXYeRwABSXtABB">> = iolist_to_binary(re:replace("AB","(a+|b)*","aoHgobCXYeRw&SXt&\\1",[caseless])),
+ <<"aoHgobCXYeRwABSXtABBaoHgobCXYeRwSXt">> = iolist_to_binary(re:replace("AB","(a+|b)*","aoHgobCXYeRw&SXt&\\1",[caseless,
global])),
-?line <<"FOABCHABCuJ">> = iolist_to_binary(re:replace("ABC","a.c","FO&H&uJ",[caseless])),
-?line <<"FOABCHABCuJ">> = iolist_to_binary(re:replace("ABC","a.c","FO&H&uJ",[caseless,
+ <<"LYWAHKusKAgrXKh">> = iolist_to_binary(re:replace("AB","(a+|b){0,}","LYWAHKusKAgrXKh",[caseless])),
+ <<"LYWAHKusKAgrXKhLYWAHKusKAgrXKh">> = iolist_to_binary(re:replace("AB","(a+|b){0,}","LYWAHKusKAgrXKh",[caseless,
+ global])),
+ <<"UVXSWR">> = iolist_to_binary(re:replace("AB","(a+|b)+","UVXSWR",[caseless])),
+ <<"UVXSWR">> = iolist_to_binary(re:replace("AB","(a+|b)+","UVXSWR",[caseless,
global])),
-?line <<"mmAXCwHQUmyij">> = iolist_to_binary(re:replace("AXC","a.c","m\\1m&\\1wHQUmyi\\1j",[caseless])),
-?line <<"mmAXCwHQUmyij">> = iolist_to_binary(re:replace("AXC","a.c","m\\1m&\\1wHQUmyi\\1j",[caseless,
- global])),
-?line <<"vKLhT">> = iolist_to_binary(re:replace("AXYZC","a.*?c","vKLhT",[caseless])),
-?line <<"vKLhT">> = iolist_to_binary(re:replace("AXYZC","a.*?c","vKLhT",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.*c","TrBPBlhlCyS&oLwXCYxT",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a.*c","TrBPBlhlCyS&oLwXCYxT",[caseless,
+ <<"lXCwBqLtjKMQjABBokVR">> = iolist_to_binary(re:replace("AB","(a+|b){1,}","lXCw\\1qLtjKMQj&\\1okVR",[caseless])),
+ <<"lXCwBqLtjKMQjABBokVR">> = iolist_to_binary(re:replace("AB","(a+|b){1,}","lXCw\\1qLtjKMQj&\\1okVR",[caseless,
global])),
-?line <<"oNBAABC">> = iolist_to_binary(re:replace("AABC","a.*c","oNB&",[caseless])),
-?line <<"oNBAABC">> = iolist_to_binary(re:replace("AABC","a.*c","oNB&",[caseless,
- global])),
-?line <<"AXYZD">> = iolist_to_binary(re:replace("AXYZD","a.*c","v\\1byeTHd&vaDRL\\1",[caseless])),
-?line <<"AXYZD">> = iolist_to_binary(re:replace("AXYZD","a.*c","v\\1byeTHd&vaDRL\\1",[caseless,
- global])),
-?line <<"puCobgfLFWkTABD">> = iolist_to_binary(re:replace("ABD","a[bc]d","puCobgf\\1LF\\1W\\1kT&",[caseless])),
-?line <<"puCobgfLFWkTABD">> = iolist_to_binary(re:replace("ABD","a[bc]d","puCobgf\\1LF\\1W\\1kT&",[caseless,
- global])),
-?line <<"ACELM">> = iolist_to_binary(re:replace("ACE","a[b-d]e","&LM",[caseless])),
-?line <<"ACELM">> = iolist_to_binary(re:replace("ACE","a[b-d]e","&LM",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[b-d]e","YsqxG&B&NxQkv\\1RY",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[b-d]e","YsqxG&B&NxQkv\\1RY",[caseless,
- global])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","a[b-d]e","o&WeiJHAt\\1vpj",[caseless])),
-?line <<"ABC">> = iolist_to_binary(re:replace("ABC","a[b-d]e","o&WeiJHAt\\1vpj",[caseless,
- global])),
-?line <<"ABD">> = iolist_to_binary(re:replace("ABD","a[b-d]e","S",[caseless])),
-?line <<"ABD">> = iolist_to_binary(re:replace("ABD","a[b-d]e","S",[caseless,
- global])),
-?line <<"AgdndBWDnHACACACVgB">> = iolist_to_binary(re:replace("AAC","a[b-d]","gdndBWDnH&&&VgB",[caseless])),
-?line <<"AgdndBWDnHACACACVgB">> = iolist_to_binary(re:replace("AAC","a[b-d]","gdndBWDnH&&&VgB",[caseless,
- global])),
-?line <<"lpIqxA-sQA-">> = iolist_to_binary(re:replace("A-","a[-b]","lpIqx&sQ&",[caseless])),
-?line <<"lpIqxA-sQA-">> = iolist_to_binary(re:replace("A-","a[-b]","lpIqx&sQ&",[caseless,
- global])),
-?line <<"NJrfcO">> = iolist_to_binary(re:replace("A-","a[b-]","NJrfc\\1O",[caseless])),
-?line <<"NJrfcO">> = iolist_to_binary(re:replace("A-","a[b-]","NJrfc\\1O",[caseless,
- global])),
-?line <<"eA]OcbkaA]qQEbtfTQD">> = iolist_to_binary(re:replace("A]","a]","e&Oc\\1bka&qQEbtfTQD",[caseless])),
-?line <<"eA]OcbkaA]qQEbtfTQD">> = iolist_to_binary(re:replace("A]","a]","e&Oc\\1bka&qQEbtfTQD",[caseless,
+ ok.
+run23() ->
+ <<"MAFkB">> = iolist_to_binary(re:replace("AB","(a+|b)?","M\\1Fk",[caseless])),
+ <<"MAFkMBFkMFk">> = iolist_to_binary(re:replace("AB","(a+|b)?","M\\1Fk",[caseless,
+ global])),
+ <<"STYCeRAuyArB">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}","STYCeR\\1uy\\1r",[caseless])),
+ <<"STYCeRAuyArSTYCeRBuyBrSTYCeRuyr">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}","STYCeR\\1uy\\1r",[caseless,
+ global])),
+ <<"WBHxgnNQAB">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}?","W&BH\\1&\\1x&gnNQ",[caseless])),
+ <<"WBHxgnNQWABHAAAxAgnNQWBHxgnNQWBBHBBBxBgnNQWBHxgnNQ">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}?","W&BH\\1&\\1x&gnNQ",[caseless,
+ global])),
+ <<"MbLbSWbCDEggiClWfEM">> = iolist_to_binary(re:replace("CDE","[^ab]*","MbLbSWb&ggiClWfEM",[caseless])),
+ <<"MbLbSWbCDEggiClWfEMMbLbSWbggiClWfEM">> = iolist_to_binary(re:replace("CDE","[^ab]*","MbLbSWb&ggiClWfEM",[caseless,
global])),
-?line <<"GqJU">> = iolist_to_binary(re:replace("A]B","a[]]b","GqJU",[caseless])),
-?line <<"GqJU">> = iolist_to_binary(re:replace("A]B","a[]]b","GqJU",[caseless,
- global])),
-?line <<"AEDdAEDiIAEDCTAEDj">> = iolist_to_binary(re:replace("AED","a[^bc]d","&d&iI&CT&j",[caseless])),
-?line <<"AEDdAEDiIAEDCTAEDj">> = iolist_to_binary(re:replace("AED","a[^bc]d","&d&iI&CT&j",[caseless,
- global])),
-?line <<"MOKnvQDsS">> = iolist_to_binary(re:replace("ADC","a[^-b]c","MOKn\\1\\1vQDsS\\1",[caseless])),
-?line <<"MOKnvQDsS">> = iolist_to_binary(re:replace("ADC","a[^-b]c","MOKn\\1\\1vQDsS\\1",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^-b]c","dr",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a[^-b]c","dr",[caseless,
- global])),
-?line <<"ABD">> = iolist_to_binary(re:replace("ABD","a[^-b]c","IMKcT&fF&WXbjs\\1\\1",[caseless])),
-?line <<"ABD">> = iolist_to_binary(re:replace("ABD","a[^-b]c","IMKcT&fF&WXbjs\\1\\1",[caseless,
- global])),
-?line <<"A-C">> = iolist_to_binary(re:replace("A-C","a[^-b]c","M&xDIfNL\\1W",[caseless])),
-?line <<"A-C">> = iolist_to_binary(re:replace("A-C","a[^-b]c","M&xDIfNL\\1W",[caseless,
- global])),
-?line <<"wR">> = iolist_to_binary(re:replace("ADC","a[^]b]c","wR",[caseless])),
-?line <<"wR">> = iolist_to_binary(re:replace("ADC","a[^]b]c","wR",[caseless,
- global])),
-?line <<"HKTAABllCQjRABEnXDqjC">> = iolist_to_binary(re:replace("ABC","ab|cd","HKTA&llCQjR&EnXDqj",[caseless])),
-?line <<"HKTAABllCQjRABEnXDqjC">> = iolist_to_binary(re:replace("ABC","ab|cd","HKTA&llCQjR&EnXDqj",[caseless,
- global])),
-?line <<"ABCD">> = iolist_to_binary(re:replace("ABCD","ab|cd","&",[caseless])),
-?line <<"ABCD">> = iolist_to_binary(re:replace("ABCD","ab|cd","&",[caseless,
- global])),
-?line <<"DmgTYsxtpkrXgnoJ">> = iolist_to_binary(re:replace("DEF","()ef","mgTYsxtpkrXgnoJ",[caseless])),
-?line <<"DmgTYsxtpkrXgnoJ">> = iolist_to_binary(re:replace("DEF","()ef","mgTYsxtpkrXgnoJ",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","$b","KN\\1&V",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","$b","KN\\1&V",[caseless,
- global])),
-?line <<"A]C">> = iolist_to_binary(re:replace("A]C","$b","jtB&",[caseless])),
-?line <<"A]C">> = iolist_to_binary(re:replace("A]C","$b","jtB&",[caseless,
- global])),
-?line <<"B">> = iolist_to_binary(re:replace("B","$b","&pRb",[caseless])),
-?line <<"B">> = iolist_to_binary(re:replace("B","$b","&pRb",[caseless,
- global])),
-?line <<"lBUQxBtA(BtBeKAEeJq">> = iolist_to_binary(re:replace("A(B","a\\(b","lBUQ\\1xBt&tBeK\\1AEeJq",[caseless])),
-?line <<"lBUQxBtA(BtBeKAEeJq">> = iolist_to_binary(re:replace("A(B","a\\(b","lBUQ\\1xBt&tBeK\\1AEeJq",[caseless,
- global])),
-?line <<"oXCRABKrhGnMTcHtq">> = iolist_to_binary(re:replace("AB","a\\(*b","oXCR&\\1KrhGnMTcHtq",[caseless])),
-?line <<"oXCRABKrhGnMTcHtq">> = iolist_to_binary(re:replace("AB","a\\(*b","oXCR&\\1KrhGnMTcHtq",[caseless,
+ <<"rjABBBCDfICJABBBCDABBBCDEjJ">> = iolist_to_binary(re:replace("ABBBCD","([abc])*d","rj&fICJ&&EjJ",[caseless])),
+ <<"rjABBBCDfICJABBBCDABBBCDEjJ">> = iolist_to_binary(re:replace("ABBBCD","([abc])*d","rj&fICJ&&EjJ",[caseless,
+ global])),
+ <<"xQ">> = iolist_to_binary(re:replace("ABCD","([abc])*bcd","xQ",[caseless])),
+ <<"xQ">> = iolist_to_binary(re:replace("ABCD","([abc])*bcd","xQ",[caseless,
+ global])),
+ <<"AllmaUiAaKG">> = iolist_to_binary(re:replace("E","a|b|c|d|e","AllmaUiAa\\1KG",[caseless])),
+ <<"AllmaUiAaKG">> = iolist_to_binary(re:replace("E","a|b|c|d|e","AllmaUiAa\\1KG",[caseless,
+ global])),
+ <<"QdfE">> = iolist_to_binary(re:replace("EF","(a|b|c|d|e)f","Qdf\\1",[caseless])),
+ <<"QdfE">> = iolist_to_binary(re:replace("EF","(a|b|c|d|e)f","Qdf\\1",[caseless,
+ global])),
+ <<"ABCDEFGTvQSeJABCDEFGWMXdIOTh">> = iolist_to_binary(re:replace("ABCDEFG","abcd*efg","\\1&TvQSeJ&\\1WMXdIO\\1Th",[caseless])),
+ <<"ABCDEFGTvQSeJABCDEFGWMXdIOTh">> = iolist_to_binary(re:replace("ABCDEFG","abcd*efg","\\1&TvQSeJ&\\1WMXdIO\\1Th",[caseless,
+ global])),
+ <<"XlSgABJHbKHRjUuNjOrYABBBZ">> = iolist_to_binary(re:replace("XABYABBBZ","ab*","lSg&JHbKHRjUuNjOr",[caseless])),
+ <<"XlSgABJHbKHRjUuNjOrYlSgABBBJHbKHRjUuNjOrZ">> = iolist_to_binary(re:replace("XABYABBBZ","ab*","lSg&JHbKHRjUuNjOr",[caseless,
global])),
-?line <<"VyDjHkfygiNMHC">> = iolist_to_binary(re:replace("A((B","a\\(*b","Vy\\1DjH\\1kfygi\\1NM\\1H\\1C",[caseless])),
-?line <<"VyDjHkfygiNMHC">> = iolist_to_binary(re:replace("A((B","a\\(*b","Vy\\1DjH\\1kfygi\\1NM\\1H\\1C",[caseless,
- global])),
-?line <<"A">> = iolist_to_binary(re:replace("A","a\\\\b","DhmiARyCBuVi",[caseless,
- notbol])),
-?line <<"A">> = iolist_to_binary(re:replace("A","a\\\\b","DhmiARyCBuVi",[caseless,
- notbol,
- global])),
-?line <<"FArKeEijRRtjoEBC">> = iolist_to_binary(re:replace("ABC","((a))","F\\1rKeEijRRtjoE",[caseless])),
-?line <<"FArKeEijRRtjoEBC">> = iolist_to_binary(re:replace("ABC","((a))","F\\1rKeEijRRtjoE",[caseless,
+ <<"XNjAAesIAgAYABBBZ">> = iolist_to_binary(re:replace("XAYABBBZ","ab*","Nj&&esI&g&",[caseless])),
+ <<"XNjAAesIAgAYNjABBBABBBesIABBBgABBBZ">> = iolist_to_binary(re:replace("XAYABBBZ","ab*","Nj&&esI&g&",[caseless,
+ global])),
+ <<"ABpvCDEayXCDEDCDSCDECDEwh">> = iolist_to_binary(re:replace("ABCDE","(ab|cd)e","pv&ayX&D\\1S&&wh",[caseless])),
+ <<"ABpvCDEayXCDEDCDSCDECDEwh">> = iolist_to_binary(re:replace("ABCDE","(ab|cd)e","pv&ayX&D\\1S&&wh",[caseless,
+ global])),
+ <<"HIJAJ">> = iolist_to_binary(re:replace("HIJ","[abhgefdc]ij","&A\\1J\\1",[caseless])),
+ <<"HIJAJ">> = iolist_to_binary(re:replace("HIJ","[abhgefdc]ij","&A\\1J\\1",[caseless,
global])),
-?line <<"shGABCXUFAQfAABCy">> = iolist_to_binary(re:replace("ABC","(a)b(c)","shG&XUF\\1Qf\\1&y",[caseless])),
-?line <<"shGABCXUFAQfAABCy">> = iolist_to_binary(re:replace("ABC","(a)b(c)","shG&XUF\\1Qf\\1&y",[caseless,
- global])),
-?line <<"AABBABCmqnIoEABCugfABCNVyK">> = iolist_to_binary(re:replace("AABBABC","a+b+c","&m\\1qnIoE&\\1ug\\1f&NVyK",[caseless])),
-?line <<"AABBABCmqnIoEABCugfABCNVyK">> = iolist_to_binary(re:replace("AABBABC","a+b+c","&m\\1qnIoE&\\1ug\\1f&NVyK",[caseless,
- global])),
-?line <<"AABByABCrABC">> = iolist_to_binary(re:replace("AABBABC","a{1,}b{1,}c","y&r\\1&",[caseless])),
-?line <<"AABByABCrABC">> = iolist_to_binary(re:replace("AABBABC","a{1,}b{1,}c","y&r\\1&",[caseless,
+ <<"ABCDE">> = iolist_to_binary(re:replace("ABCDE","^(ab|cd)e","y&gKEPudO&f\\1Vf",[caseless])),
+ <<"ABCDE">> = iolist_to_binary(re:replace("ABCDE","^(ab|cd)e","y&gKEPudO&f\\1Vf",[caseless,
+ global])),
+ <<"ABCDsEFmkoWgwo">> = iolist_to_binary(re:replace("ABCDEF","(abc|)ef","s&mkoWgwo",[caseless])),
+ <<"ABCDsEFmkoWgwo">> = iolist_to_binary(re:replace("ABCDEF","(abc|)ef","s&mkoWgwo",[caseless,
+ global])),
+ <<"AEKBBQPBA">> = iolist_to_binary(re:replace("ABCD","(a|b)c*d","EK\\1\\1QP\\1A",[caseless])),
+ <<"AEKBBQPBA">> = iolist_to_binary(re:replace("ABCD","(a|b)c*d","EK\\1\\1QP\\1A",[caseless,
global])),
-?line <<"tABC">> = iolist_to_binary(re:replace("ABCABC","a.+?c","t",[caseless])),
-?line <<"tt">> = iolist_to_binary(re:replace("ABCABC","a.+?c","t",[caseless,
- global])),
-?line <<"UABC">> = iolist_to_binary(re:replace("ABCABC","a.*?c","\\1U",[caseless])),
-?line <<"UU">> = iolist_to_binary(re:replace("ABCABC","a.*?c","\\1U",[caseless,
- global])),
-?line <<"EfjDOiBAosuABC">> = iolist_to_binary(re:replace("ABCABC","a.{0,5}?c","EfjDOiBAosu",[caseless])),
-?line <<"EfjDOiBAosuEfjDOiBAosu">> = iolist_to_binary(re:replace("ABCABC","a.{0,5}?c","EfjDOiBAosu",[caseless,
- global])),
-?line <<"CBBliVcPcv">> = iolist_to_binary(re:replace("AB","(a+|b)*","C\\1\\1liVcPcv",[caseless])),
-?line <<"CBBliVcPcvCliVcPcv">> = iolist_to_binary(re:replace("AB","(a+|b)*","C\\1\\1liVcPcv",[caseless,
- global])),
-?line <<"fSc">> = iolist_to_binary(re:replace("AB","(a+|b){0,}","fSc",[caseless])),
-?line <<"fScfSc">> = iolist_to_binary(re:replace("AB","(a+|b){0,}","fSc",[caseless,
- global])),
-?line <<"sABpDnVVBAB">> = iolist_to_binary(re:replace("AB","(a+|b)+","s&pDnVV\\1&",[caseless])),
-?line <<"sABpDnVVBAB">> = iolist_to_binary(re:replace("AB","(a+|b)+","s&pDnVV\\1&",[caseless,
- global])),
-?line <<"bnGKKf">> = iolist_to_binary(re:replace("AB","(a+|b){1,}","bnGKKf",[caseless])),
-?line <<"bnGKKf">> = iolist_to_binary(re:replace("AB","(a+|b){1,}","bnGKKf",[caseless,
- global])),
-?line <<"LpFAjhAtClIGSIAdYAB">> = iolist_to_binary(re:replace("AB","(a+|b)?","LpF&jhAtClIGSI\\1dY\\1",[caseless])),
-?line <<"LpFAjhAtClIGSIAdYALpFBjhAtClIGSIBdYBLpFjhAtClIGSIdY">> = iolist_to_binary(re:replace("AB","(a+|b)?","LpF&jhAtClIGSI\\1dY\\1",[caseless,
- global])),
-?line <<"qbB">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}","qb",[caseless])),
-?line <<"qbqbqb">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}","qb",[caseless,
- global])),
-?line <<"vLbrTRIJAB">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}?","v&L\\1brTRIJ\\1\\1",[caseless])),
-?line <<"vLbrTRIJvALAbrTRIJAAvLbrTRIJvBLBbrTRIJBBvLbrTRIJ">> = iolist_to_binary(re:replace("AB","(a+|b){0,1}?","v&L\\1brTRIJ\\1\\1",[caseless,
+ <<"NnxIEABC">> = iolist_to_binary(re:replace("ABC","(ab|ab*)bc","NnxIE&",[caseless])),
+ <<"NnxIEABC">> = iolist_to_binary(re:replace("ABC","(ab|ab*)bc","NnxIE&",[caseless,
+ global])),
+ <<"owDpyYBCHVgp">> = iolist_to_binary(re:replace("ABC","a([bc]*)c*","owDpyY\\1HVgp",[caseless])),
+ <<"owDpyYBCHVgp">> = iolist_to_binary(re:replace("ABC","a([bc]*)c*","owDpyY\\1HVgp",[caseless,
+ global])),
+ <<"ABCDABCDaSWTqABCDBCABCDKOABCD">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c*d)","&&aSWTq&\\1&KO&",[caseless])),
+ <<"ABCDABCDaSWTqABCDBCABCDKOABCD">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c*d)","&&aSWTq&\\1&KO&",[caseless,
global])),
-?line <<"HtbhHKCDEwOT">> = iolist_to_binary(re:replace("CDE","[^ab]*","Ht\\1\\1bhHK&wOT",[caseless])),
-?line <<"HtbhHKCDEwOTHtbhHKwOT">> = iolist_to_binary(re:replace("CDE","[^ab]*","Ht\\1\\1bhHK&wOT",[caseless,
+ ok.
+run24() ->
+ <<"llhYIK">> = iolist_to_binary(re:replace("ABCD","a([bc]+)(c*d)","llhYIK",[caseless])),
+ <<"llhYIK">> = iolist_to_binary(re:replace("ABCD","a([bc]+)(c*d)","llhYIK",[caseless,
+ global])),
+ <<"qBhyABCDRsUdeBABCDcnABCDJOj">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c+d)","q\\1hy&RsUde\\1&cn&JOj",[caseless])),
+ <<"qBhyABCDRsUdeBABCDcnABCDJOj">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c+d)","q\\1hy&RsUde\\1&cn&JOj",[caseless,
+ global])),
+ <<"sXpCRWnaew">> = iolist_to_binary(re:replace("ADCDCDE","a[bcd]*dcdcde","sXpCRWnae\\1w",[caseless])),
+ <<"sXpCRWnaew">> = iolist_to_binary(re:replace("ADCDCDE","a[bcd]*dcdcde","sXpCRWnae\\1w",[caseless,
+ global])),
+ <<"PKABCMuYNABCABCXtIsm">> = iolist_to_binary(re:replace("ABC","(ab|a)b*c","PK&MuYN&&XtIsm",[caseless])),
+ <<"PKABCMuYNABCABCXtIsm">> = iolist_to_binary(re:replace("ABC","(ab|a)b*c","PK&MuYN&&XtIsm",[caseless,
global])),
-?line <<"vOowROtABBBCD">> = iolist_to_binary(re:replace("ABBBCD","([abc])*d","vOowROt&",[caseless])),
-?line <<"vOowROtABBBCD">> = iolist_to_binary(re:replace("ABBBCD","([abc])*d","vOowROt&",[caseless,
- global])),
-?line <<"TBIuDTLoAqOaABCDMcvVABCDPm">> = iolist_to_binary(re:replace("ABCD","([abc])*bcd","TBIuDTLo\\1qOa&McvV&Pm",[caseless])),
-?line <<"TBIuDTLoAqOaABCDMcvVABCDPm">> = iolist_to_binary(re:replace("ABCD","([abc])*bcd","TBIuDTLo\\1qOa&McvV&Pm",[caseless,
- global])),
-?line <<"EUpqELAv">> = iolist_to_binary(re:replace("E","a|b|c|d|e","&Upq&LAv",[caseless])),
-?line <<"EUpqELAv">> = iolist_to_binary(re:replace("E","a|b|c|d|e","&Upq&LAv",[caseless,
+ <<"pMOU">> = iolist_to_binary(re:replace("ABCD","((a)(b)c)(d)","pMOU",[caseless])),
+ <<"pMOU">> = iolist_to_binary(re:replace("ABCD","((a)(b)c)(d)","pMOU",[caseless,
global])),
-?line <<"oViRJMyEkEPtcEFEM">> = iolist_to_binary(re:replace("EF","(a|b|c|d|e)f","oViRJMy\\1k\\1Ptc&\\1M",[caseless])),
-?line <<"oViRJMyEkEPtcEFEM">> = iolist_to_binary(re:replace("EF","(a|b|c|d|e)f","oViRJMy\\1k\\1Ptc&\\1M",[caseless,
- global])),
-?line <<"ABCDEFGeumABCDEFGxRcjHuSABCDEFGOABCDEFG">> = iolist_to_binary(re:replace("ABCDEFG","abcd*efg","&eum&xRcjHuS&O&",[caseless])),
-?line <<"ABCDEFGeumABCDEFGxRcjHuSABCDEFGOABCDEFG">> = iolist_to_binary(re:replace("ABCDEFG","abcd*efg","&eum&xRcjHuS&O&",[caseless,
- global])),
-?line <<"XOvpxKbYuFMwABVhYABBBZ">> = iolist_to_binary(re:replace("XABYABBBZ","ab*","OvpxKbYuFMw&Vh",[caseless])),
-?line <<"XOvpxKbYuFMwABVhYOvpxKbYuFMwABBBVhZ">> = iolist_to_binary(re:replace("XABYABBBZ","ab*","OvpxKbYuFMw&Vh",[caseless,
- global])),
-?line <<"XXbAAHhcmmXVwkYABBBZ">> = iolist_to_binary(re:replace("XAYABBBZ","ab*","Xb&&Hhcmm\\1XVwk",[caseless])),
-?line <<"XXbAAHhcmmXVwkYXbABBBABBBHhcmmXVwkZ">> = iolist_to_binary(re:replace("XAYABBBZ","ab*","Xb&&Hhcmm\\1XVwk",[caseless,
- global])),
-?line <<"ABPWMPmhUsCDEo">> = iolist_to_binary(re:replace("ABCDE","(ab|cd)e","PWMPmhUs&o",[caseless])),
-?line <<"ABPWMPmhUsCDEo">> = iolist_to_binary(re:replace("ABCDE","(ab|cd)e","PWMPmhUs&o",[caseless,
- global])),
-?line <<"jHIJ">> = iolist_to_binary(re:replace("HIJ","[abhgefdc]ij","j&",[caseless])),
-?line <<"jHIJ">> = iolist_to_binary(re:replace("HIJ","[abhgefdc]ij","j&",[caseless,
- global])),
-?line <<"ABCDE">> = iolist_to_binary(re:replace("ABCDE","^(ab|cd)e","Dc&hlOsc\\1EL\\1Vl",[caseless])),
-?line <<"ABCDE">> = iolist_to_binary(re:replace("ABCDE","^(ab|cd)e","Dc&hlOsc\\1EL\\1Vl",[caseless,
- global])),
-?line <<"ABCDBRPmLBtJGwEFEF">> = iolist_to_binary(re:replace("ABCDEF","(abc|)ef","\\1BRPmLBtJGw\\1&&",[caseless])),
-?line <<"ABCDBRPmLBtJGwEFEF">> = iolist_to_binary(re:replace("ABCDEF","(abc|)ef","\\1BRPmLBtJGw\\1&&",[caseless,
- global])),
-?line <<"ABdnvuIvc">> = iolist_to_binary(re:replace("ABCD","(a|b)c*d","\\1dnvuIvc",[caseless])),
-?line <<"ABdnvuIvc">> = iolist_to_binary(re:replace("ABCD","(a|b)c*d","\\1dnvuIvc",[caseless,
- global])),
-?line <<"ACKWkV">> = iolist_to_binary(re:replace("ABC","(ab|ab*)bc","ACKWkV",[caseless])),
-?line <<"ACKWkV">> = iolist_to_binary(re:replace("ABC","(ab|ab*)bc","ACKWkV",[caseless,
- global])),
-?line <<"LepuBCXf">> = iolist_to_binary(re:replace("ABC","a([bc]*)c*","Lepu\\1Xf",[caseless])),
-?line <<"LepuBCXf">> = iolist_to_binary(re:replace("ABC","a([bc]*)c*","Lepu\\1Xf",[caseless,
- global])),
-?line <<"NDABCDxHBMEtfBGtV">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c*d)","ND&xHBMEtfBGtV",[caseless])),
-?line <<"NDABCDxHBMEtfBGtV">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c*d)","ND&xHBMEtfBGtV",[caseless,
- global])),
-?line <<"eIDCKdi">> = iolist_to_binary(re:replace("ABCD","a([bc]+)(c*d)","eIDCKdi",[caseless])),
-?line <<"eIDCKdi">> = iolist_to_binary(re:replace("ABCD","a([bc]+)(c*d)","eIDCKdi",[caseless,
- global])),
-?line <<"fKBQepABCDABCDhHYaRKHjS">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c+d)","fK\\1Qep&&hHYaRKHjS",[caseless])),
-?line <<"fKBQepABCDABCDhHYaRKHjS">> = iolist_to_binary(re:replace("ABCD","a([bc]*)(c+d)","fK\\1Qep&&hHYaRKHjS",[caseless,
+ <<"bnFWpQALPHAjXlptg">> = iolist_to_binary(re:replace("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*","bnFW\\1pQ&jXl\\1ptg\\1",[caseless])),
+ <<"bnFWpQALPHAjXlptg">> = iolist_to_binary(re:replace("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*","bnFW\\1pQ&jXl\\1ptg\\1",[caseless,
+ global])),
+ <<"ARTSHBHAfemfBHJIBHBHBH">> = iolist_to_binary(re:replace("ABH","^a(bc+|b[eh])g|.h$","RT\\1SH&Afemf&JI&&&",[caseless])),
+ <<"ARTSHBHAfemfBHJIBHBHBH">> = iolist_to_binary(re:replace("ABH","^a(bc+|b[eh])g|.h$","RT\\1SH&Afemf&JI&&&",[caseless,
+ global])),
+ <<"lEFFGZichPjsHBEFFGZe">> = iolist_to_binary(re:replace("EFFGZ","(bc+d$|ef*g.|h?i(j|k))","l\\1ichPjsHB\\1e",[caseless])),
+ <<"lEFFGZichPjsHBEFFGZe">> = iolist_to_binary(re:replace("EFFGZ","(bc+d$|ef*g.|h?i(j|k))","l\\1ichPjsHB\\1e",[caseless,
+ global])),
+ <<"IJnqeTnhpIJ">> = iolist_to_binary(re:replace("IJ","(bc+d$|ef*g.|h?i(j|k))","&nqeTnhp\\1",[caseless])),
+ <<"IJnqeTnhpIJ">> = iolist_to_binary(re:replace("IJ","(bc+d$|ef*g.|h?i(j|k))","&nqeTnhp\\1",[caseless,
+ global])),
+ <<"RTAEFFGZEFFGZtiL">> = iolist_to_binary(re:replace("REFFGZ","(bc+d$|ef*g.|h?i(j|k))","TA\\1&tiL",[caseless])),
+ <<"RTAEFFGZEFFGZtiL">> = iolist_to_binary(re:replace("REFFGZ","(bc+d$|ef*g.|h?i(j|k))","TA\\1&tiL",[caseless,
global])),
-?line <<"yYx">> = iolist_to_binary(re:replace("ADCDCDE","a[bcd]*dcdcde","yYx",[caseless])),
-?line <<"yYx">> = iolist_to_binary(re:replace("ADCDCDE","a[bcd]*dcdcde","yYx",[caseless,
- global])),
-?line <<"gCGlfM">> = iolist_to_binary(re:replace("ABC","(ab|a)b*c","gCGlfM",[caseless])),
-?line <<"gCGlfM">> = iolist_to_binary(re:replace("ABC","(ab|a)b*c","gCGlfM",[caseless,
- global])),
-?line <<"GJGaABCEwhSGeABC">> = iolist_to_binary(re:replace("ABCD","((a)(b)c)(d)","GJGa\\1EwhSGe\\1",[caseless])),
-?line <<"GJGaABCEwhSGeABC">> = iolist_to_binary(re:replace("ABCD","((a)(b)c)(d)","GJGa\\1EwhSGe\\1",[caseless,
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","QSIQtF",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","QSIQtF",[caseless,
+ global])),
+ <<"ADCDCDE">> = iolist_to_binary(re:replace("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))","hkkg&\\1M",[caseless])),
+ <<"ADCDCDE">> = iolist_to_binary(re:replace("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))","hkkg&\\1M",[caseless,
+ global])),
+ <<"EFFG">> = iolist_to_binary(re:replace("EFFG","(bc+d$|ef*g.|h?i(j|k))","b",[caseless])),
+ <<"EFFG">> = iolist_to_binary(re:replace("EFFG","(bc+d$|ef*g.|h?i(j|k))","b",[caseless,
+ global])),
+ <<"BCDD">> = iolist_to_binary(re:replace("BCDD","(bc+d$|ef*g.|h?i(j|k))","TW&UdGE\\1S&N\\1u&LM",[caseless])),
+ <<"BCDD">> = iolist_to_binary(re:replace("BCDD","(bc+d$|ef*g.|h?i(j|k))","TW&UdGE\\1S&N\\1u&LM",[caseless,
+ global])),
+ <<"APvAegF">> = iolist_to_binary(re:replace("A","((((((((((a))))))))))","\\1Pv\\1egF",[caseless])),
+ <<"APvAegF">> = iolist_to_binary(re:replace("A","((((((((((a))))))))))","\\1Pv\\1egF",[caseless,
global])),
-?line <<"GwdBxNJCuOfALPHADSnt">> = iolist_to_binary(re:replace("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*","GwdBxNJCuOf&DSnt",[caseless])),
-?line <<"GwdBxNJCuOfALPHADSnt">> = iolist_to_binary(re:replace("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*","GwdBxNJCuOf&DSnt",[caseless,
+ <<"vCaAAVsbLoAAcsIToC">> = iolist_to_binary(re:replace("AA","((((((((((a))))))))))\\10","vCa&VsbLo&csIToC",[caseless])),
+ <<"vCaAAVsbLoAAcsIToC">> = iolist_to_binary(re:replace("AA","((((((((((a))))))))))\\10","vCa&VsbLo&csIToC",[caseless,
global])),
-?line <<"AMcmNBHqwYsXdABHJTBH">> = iolist_to_binary(re:replace("ABH","^a(bc+|b[eh])g|.h$","McmN&qwYsX\\1dA&JT&",[caseless])),
-?line <<"AMcmNBHqwYsXdABHJTBH">> = iolist_to_binary(re:replace("ABH","^a(bc+|b[eh])g|.h$","McmN&qwYsX\\1dA&JT&",[caseless,
- global])),
-?line <<"JEFFGZWDujiGKchTEFFGZd">> = iolist_to_binary(re:replace("EFFGZ","(bc+d$|ef*g.|h?i(j|k))","J&WDujiGKchT&d",[caseless])),
-?line <<"JEFFGZWDujiGKchTEFFGZd">> = iolist_to_binary(re:replace("EFFGZ","(bc+d$|ef*g.|h?i(j|k))","J&WDujiGKchT&d",[caseless,
- global])),
-?line <<"JIJIJVbIJOWIJT">> = iolist_to_binary(re:replace("IJ","(bc+d$|ef*g.|h?i(j|k))","J\\1\\1Vb\\1OW\\1T",[caseless])),
-?line <<"JIJIJVbIJOWIJT">> = iolist_to_binary(re:replace("IJ","(bc+d$|ef*g.|h?i(j|k))","J\\1\\1Vb\\1OW\\1T",[caseless,
- global])),
-?line <<"REnKX">> = iolist_to_binary(re:replace("REFFGZ","(bc+d$|ef*g.|h?i(j|k))","EnKX",[caseless])),
-?line <<"REnKX">> = iolist_to_binary(re:replace("REFFGZ","(bc+d$|ef*g.|h?i(j|k))","EnKX",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","&bQK&gYPqvKo\\1Dxq&&&",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(bc+d$|ef*g.|h?i(j|k))","&bQK&gYPqvKo\\1Dxq&&&",[caseless,
- global])),
-?line <<"ADCDCDE">> = iolist_to_binary(re:replace("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))","\\1D&uYGYYB\\1mXY",[caseless])),
-?line <<"ADCDCDE">> = iolist_to_binary(re:replace("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))","\\1D&uYGYYB\\1mXY",[caseless,
- global])),
-?line <<"EFFG">> = iolist_to_binary(re:replace("EFFG","(bc+d$|ef*g.|h?i(j|k))","bqLaCGT&\\1\\1StNeJTj",[caseless])),
-?line <<"EFFG">> = iolist_to_binary(re:replace("EFFG","(bc+d$|ef*g.|h?i(j|k))","bqLaCGT&\\1\\1StNeJTj",[caseless,
- global])),
-?line <<"BCDD">> = iolist_to_binary(re:replace("BCDD","(bc+d$|ef*g.|h?i(j|k))","M\\1v\\1T\\1H&OCM\\1",[caseless])),
-?line <<"BCDD">> = iolist_to_binary(re:replace("BCDD","(bc+d$|ef*g.|h?i(j|k))","M\\1v\\1T\\1H&OCM\\1",[caseless,
- global])),
-?line <<"teSxBAbRcV">> = iolist_to_binary(re:replace("A","((((((((((a))))))))))","teSxB\\1bRcV",[caseless])),
-?line <<"teSxBAbRcV">> = iolist_to_binary(re:replace("A","((((((((((a))))))))))","teSxB\\1bRcV",[caseless,
- global])),
-?line <<"AAAAA">> = iolist_to_binary(re:replace("AA","((((((((((a))))))))))\\10","&&\\1",[caseless])),
-?line <<"AAAAA">> = iolist_to_binary(re:replace("AA","((((((((((a))))))))))\\10","&&\\1",[caseless,
- global])),
-?line <<"AAPBpi">> = iolist_to_binary(re:replace("A","(((((((((a)))))))))","&\\1PBpi",[caseless])),
-?line <<"AAPBpi">> = iolist_to_binary(re:replace("A","(((((((((a)))))))))","&\\1PBpi",[caseless,
- global])),
-?line <<"htagTvaaMIaAkgtdgA">> = iolist_to_binary(re:replace("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))","htagTvaaMIaAkgtdg&",[caseless])),
-?line <<"htagTvaaMIaAkgtdgA">> = iolist_to_binary(re:replace("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))","htagTvaaMIaAkgtdg&",[caseless,
- global])),
-?line <<"iVCeGCCLesCClCCD">> = iolist_to_binary(re:replace("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))","iV&eG\\1CLesC&l&\\1D",[caseless])),
-?line <<"iVCeGCCLesCClCCD">> = iolist_to_binary(re:replace("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))","iV&eG\\1CLesC&l&\\1D",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","hKB&NgvvVpXbuP",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","hKB&NgvvVpXbuP",[caseless,
- global])),
-?line <<"AA">> = iolist_to_binary(re:replace("AA","multiple words of text","V&\\1e&n\\1",[caseless])),
-?line <<"AA">> = iolist_to_binary(re:replace("AA","multiple words of text","V&\\1e&n\\1",[caseless,
- global])),
-?line <<"UH-UH">> = iolist_to_binary(re:replace("UH-UH","multiple words of text","w\\1JcoWUQlAryay\\1",[caseless])),
-?line <<"UH-UH">> = iolist_to_binary(re:replace("UH-UH","multiple words of text","w\\1JcoWUQlAryay\\1",[caseless,
+ <<"ADAqIbKy">> = iolist_to_binary(re:replace("A","(((((((((a)))))))))","\\1D\\1qIbKy",[caseless])),
+ <<"ADAqIbKy">> = iolist_to_binary(re:replace("A","(((((((((a)))))))))","\\1D\\1qIbKy",[caseless,
+ global])),
+ <<"HdAAToxA">> = iolist_to_binary(re:replace("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))","Hd\\1\\1Tox&",[caseless])),
+ <<"HdAAToxA">> = iolist_to_binary(re:replace("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))","Hd\\1\\1Tox&",[caseless,
+ global])),
+ <<"FoLn">> = iolist_to_binary(re:replace("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))","FoLn",[caseless])),
+ <<"FoLn">> = iolist_to_binary(re:replace("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))","FoLn",[caseless,
global])),
-?line <<"Ee, YEAH">> = iolist_to_binary(re:replace("MULTIPLE WORDS, YEAH","multiple words","Ee",[caseless])),
-?line <<"Ee, YEAH">> = iolist_to_binary(re:replace("MULTIPLE WORDS, YEAH","multiple words","Ee",[caseless,
- global])),
-?line <<"uTrQvyABCDEABCDEACeABCDE">> = iolist_to_binary(re:replace("ABCDE","(.*)c(.*)","uTrQvy&&ACe&",[caseless])),
-?line <<"uTrQvyABCDEABCDEACeABCDE">> = iolist_to_binary(re:replace("ABCDE","(.*)c(.*)","uTrQvy&&ACe&",[caseless,
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","eKwT&ytF",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","multiple words of text","eKwT&ytF",[caseless,
+ global])),
+ <<"AA">> = iolist_to_binary(re:replace("AA","multiple words of text","&&naWXBUAJEX&uN\\1eWT&",[caseless])),
+ <<"AA">> = iolist_to_binary(re:replace("AA","multiple words of text","&&naWXBUAJEX&uN\\1eWT&",[caseless,
+ global])),
+ <<"UH-UH">> = iolist_to_binary(re:replace("UH-UH","multiple words of text","AxWlS&OyQU",[caseless])),
+ <<"UH-UH">> = iolist_to_binary(re:replace("UH-UH","multiple words of text","AxWlS&OyQU",[caseless,
+ global])),
+ <<"WkAfGvMULTIPLE WORDSvMULTIPLE WORDS, YEAH">> = iolist_to_binary(re:replace("MULTIPLE WORDS, YEAH","multiple words","WkAfGv&v&\\1",[caseless])),
+ <<"WkAfGvMULTIPLE WORDSvMULTIPLE WORDS, YEAH">> = iolist_to_binary(re:replace("MULTIPLE WORDS, YEAH","multiple words","WkAfGv&v&\\1",[caseless,
+ global])),
+ <<"KN">> = iolist_to_binary(re:replace("ABCDE","(.*)c(.*)","KN",[caseless])),
+ <<"KN">> = iolist_to_binary(re:replace("ABCDE","(.*)c(.*)","KN",[caseless,
+ global])),
+ <<"TMyXAYMUnYaLqLp">> = iolist_to_binary(re:replace("(A, B)","\\((.*), (.*)\\)","TMyX\\1YMUnYaLqLp",[caseless])),
+ <<"TMyXAYMUnYaLqLp">> = iolist_to_binary(re:replace("(A, B)","\\((.*), (.*)\\)","TMyX\\1YMUnYaLqLp",[caseless,
+ global])),
+ <<"trKKABCDSCXABCDotxTyYR">> = iolist_to_binary(re:replace("ABCD","abcd","t\\1rKK&SCX&otxTyY\\1R",[caseless])),
+ <<"trKKABCDSCXABCDotxTyYR">> = iolist_to_binary(re:replace("ABCD","abcd","t\\1rKK&SCX&otxTyY\\1R",[caseless,
+ global])),
+ ok.
+run25() ->
+ <<"DMHBCoABCDlywnlEABCDj">> = iolist_to_binary(re:replace("ABCD","a(bc)d","DMH\\1o&lywnlE&j",[caseless])),
+ <<"DMHBCoABCDlywnlEABCDj">> = iolist_to_binary(re:replace("ABCD","a(bc)d","DMH\\1o&lywnlE&j",[caseless,
+ global])),
+ <<"T">> = iolist_to_binary(re:replace("AC","a[-]?c","T",[caseless])),
+ <<"T">> = iolist_to_binary(re:replace("AC","a[-]?c","T",[caseless,
+ global])),
+ <<"ABCsVoEdFABCABCABCABCpABCyABCABCWmPtsF">> = iolist_to_binary(re:replace("ABCABC","(abc)\\1","\\1sVoEdF&&p\\1y&WmPtsF",[caseless])),
+ <<"ABCsVoEdFABCABCABCABCpABCyABCABCWmPtsF">> = iolist_to_binary(re:replace("ABCABC","(abc)\\1","\\1sVoEdF&&p\\1y&WmPtsF",[caseless,
+ global])),
+ <<"KfsABCABCeufABC">> = iolist_to_binary(re:replace("ABCABC","([a-c]*)\\1","Kfs&euf\\1",[caseless])),
+ <<"KfsABCABCeufABCKfseuf">> = iolist_to_binary(re:replace("ABCABC","([a-c]*)\\1","Kfs&euf\\1",[caseless,
global])),
-?line <<"ba(A, B)owqjAHEJ(A, B)qP">> = iolist_to_binary(re:replace("(A, B)","\\((.*), (.*)\\)","ba&owqj\\1HEJ&qP",[caseless])),
-?line <<"ba(A, B)owqjAHEJ(A, B)qP">> = iolist_to_binary(re:replace("(A, B)","\\((.*), (.*)\\)","ba&owqj\\1HEJ&qP",[caseless,
+ <<"abfexgBadad">> = iolist_to_binary(re:replace("abad","a(?!b).","fexg\\1B&&",[])),
+ <<"abfexgBadad">> = iolist_to_binary(re:replace("abad","a(?!b).","fexg\\1B&&",[global])),
+ <<"abArfxtCIjx">> = iolist_to_binary(re:replace("abad","a(?=d).","ArfxtCIjx",[])),
+ <<"abArfxtCIjx">> = iolist_to_binary(re:replace("abad","a(?=d).","ArfxtCIjx",[global])),
+ <<"abQluadxad">> = iolist_to_binary(re:replace("abad","a(?=c|d).","Qlu&x&",[])),
+ <<"abQluadxad">> = iolist_to_binary(re:replace("abad","a(?=c|d).","Qlu&x&",[global])),
+ <<"YMKqcsWCacepOaceeY">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)(.)","YMKqcsWC&pO&\\1Y",[])),
+ <<"YMKqcsWCacepOaceeY">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)(.)","YMKqcsWC&pO&\\1Y",[global])),
+ <<"HHmlgyeRvN">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)*(.)","HHmlgyeRvN",[])),
+ <<"HHmlgyeRvN">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)*(.)","HHmlgyeRvN",[global])),
+ <<"xdTgRuweeyuwdlSacepeacee">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)+?(.)","xdTgRuw\\1\\1yuwdlS&p\\1&\\1",[])),
+ <<"xdTgRuweeyuwdlSacepeacee">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)+?(.)","xdTgRuw\\1\\1yuwdlS&p\\1&\\1",[global])),
+ <<"TYYAdCdfMbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+?(.)","TYYA\\1CdfM",[])),
+ <<"TYYAdCdfMbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+?(.)","TYYA\\1CdfM",[global])),
+ <<"rHwRaCuUc">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+(.)","rHwRaCuUc",[])),
+ <<"rHwRaCuUc">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+(.)","rHwRaCuUc",[global])),
+ <<"acdbWhFfMbSbtdcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){2}(.)","&WhFfM\\1S\\1td",[])),
+ <<"acdbWhFfMbSbtdcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){2}(.)","&WhFfM\\1S\\1td",[global])),
+ <<"bXacdbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}(.)","\\1X&",[])),
+ <<"bXacdbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}(.)","\\1X&",[global])),
+ <<"bCacdbcdobe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}?(.)","bC&o",[])),
+ <<"bCacdbcdobe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}?(.)","bC&o",[global])),
+ <<"barYfoobarsbxTHafoobarIbm">> = iolist_to_binary(re:replace("foobar","((foo)|(bar))*","\\1Y&sbxTHa&Ibm",[])),
+ <<"barYfoobarsbxTHafoobarIbmYsbxTHaIbm">> = iolist_to_binary(re:replace("foobar","((foo)|(bar))*","\\1Y&sbxTHa&Ibm",[global])),
+ <<"eeBieacdbcdbeeIHacdbcdbeNPRhLo">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}(.)","\\1\\1Bi\\1&\\1IH&NPRhLo",[])),
+ <<"eeBieacdbcdbeeIHacdbcdbeNPRhLo">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}(.)","\\1\\1Bi\\1&\\1IH&NPRhLo",[global])),
+ <<"acdbcdbeiacdbcdbevacdbcdbeorW">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}?(.)","&i&v&orW",[])),
+ <<"acdbcdbeiacdbcdbevacdbcdbeorW">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}?(.)","&i&v&orW",[global])),
+ <<"LeePacdbcdbeacdbcdbeCth">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}(.)","L\\1\\1P&&Cth",[])),
+ <<"LeePacdbcdbeacdbcdbeCth">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}(.)","L\\1\\1P&&Cth",[global])),
+ <<"uVacdbcdbWhMacdbcdbNbEue">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}?(.)","uV&WhM&N\\1Eu",[])),
+ <<"uVacdbcdbWhMacdbcdbNbEue">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}?(.)","uV&WhM&N\\1Eu",[global])),
+ <<"acdbcdbeuqWHNeI">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}(.)","&uqWHNeI",[])),
+ <<"acdbcdbeuqWHNeI">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}(.)","&uqWHNeI",[global])),
+ ok.
+run26() ->
+ <<"GacdbcdbbbPbGFTve">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}?(.)","G&\\1\\1P\\1GFTv",[])),
+ <<"GacdbcdbbbPbGFTve">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}?(.)","G&\\1\\1P\\1GFTv",[global])),
+ <<"taceacecgacefBmaHeYaceuace">> = iolist_to_binary(re:replace("ace","a(?:b|(c|e){1,2}?|d)+?(.)","t&&\\1g&fBmaHeY&u&",[])),
+ <<"taceacecgacefBmaHeYaceuace">> = iolist_to_binary(re:replace("ace","a(?:b|(c|e){1,2}?|d)+?(.)","t&&\\1g&fBmaHeY&u&",[global])),
+ <<"FcNioABABQKKAbfVA">> = iolist_to_binary(re:replace("AB","^(.+)?B","FcNio&&QKK\\1bfV\\1",[])),
+ <<"FcNioABABQKKAbfVA">> = iolist_to_binary(re:replace("AB","^(.+)?B","FcNio&&QKK\\1bfV\\1",[global])),
+ <<"QpJsSlDdk">> = iolist_to_binary(re:replace(".","^([^a-z])|(\\^)$","QpJsSlDdk",[])),
+ <<"QpJsSlDdk">> = iolist_to_binary(re:replace(".","^([^a-z])|(\\^)$","QpJsSlDdk",[global])),
+ <<"YtMLJWT<&GSA<&jOUT">> = iolist_to_binary(re:replace("<&OUT","^[<>]&","Y\\1tMLJWT&GSA&j",[])),
+ <<"YtMLJWT<&GSA<&jOUT">> = iolist_to_binary(re:replace("<&OUT","^[<>]&","Y\\1tMLJWT&GSA&j",[global])),
+ <<"RBbN">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","RBbN",[])),
+ <<"RBbN">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","RBbN",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a\\1?){4}$","FHwc\\1\\1biSR",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a\\1?){4}$","FHwc\\1\\1biSR",[global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","^(a\\1?){4}$","rqMyo&\\1IoOAjaJ\\1vY",[])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","^(a\\1?){4}$","rqMyo&\\1IoOAjaJ\\1vY",[global])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","ebuyIYAaCuRmxbiVR",[])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","ebuyIYAaCuRmxbiVR",[global])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","U&\\1R&jmiM\\1\\1W",[])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","U&\\1R&jmiM\\1\\1W",[global])),
+ <<"SyepNqAqGr">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a(?(1)\\1)){4}$","SyepNqAqGr",[])),
+ <<"SyepNqAqGr">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a(?(1)\\1)){4}$","SyepNqAqGr",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a(?(1)\\1)){4}$","idrNArkV&XUmhWGrp\\1rN",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a(?(1)\\1)){4}$","idrNArkV&XUmhWGrp\\1rN",[global])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a(?(1)\\1)){4}$","dVYMTCeoR",[])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a(?(1)\\1)){4}$","dVYMTCeoR",[global])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a(?(1)\\1)){4}$","wtDhOT\\1Pu\\1xOt&P&&&",[])),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a(?(1)\\1)){4}$","wtDhOT\\1Pu\\1xOt&P&&&",[global])),
+ <<"oUbvLQMfrfVt">> = iolist_to_binary(re:replace("foobar","(?:(f)(o)(o)|(b)(a)(r))*","oUbvLQMfr\\1Vt",[])),
+ <<"oUbvLQMfrfVtoUbvLQMfrVt">> = iolist_to_binary(re:replace("foobar","(?:(f)(o)(o)|(b)(a)(r))*","oUbvLQMfr\\1Vt",[global])),
+ <<"aIbOkhquTbuWHx">> = iolist_to_binary(re:replace("ab","(?<=a)b","I&OkhquT&uWH\\1x",[])),
+ <<"aIbOkhquTbuWHx">> = iolist_to_binary(re:replace("ab","(?<=a)b","I&OkhquT&uWH\\1x",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a)b","BQobLoQagH&I&Gf",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a)b","BQobLoQagH&I&Gf",[global])),
+ <<"cb">> = iolist_to_binary(re:replace("cb","(?<=a)b","\\1qi\\1cF&xVKJl\\1&HHO&TH",[])),
+ <<"cb">> = iolist_to_binary(re:replace("cb","(?<=a)b","\\1qi\\1cF&xVKJl\\1&HHO&TH",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","(?<=a)b","aRw&xSWDbr\\1wsnnJ&G",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","(?<=a)b","aRw&xSWDbr\\1wsnnJ&G",[global])),
+ <<"albBEJPbhoUqwpHlyll">> = iolist_to_binary(re:replace("ab","(?<!c)b","l&BEJPbhoUqwpHlyll",[])),
+ <<"albBEJPbhoUqwpHlyll">> = iolist_to_binary(re:replace("ab","(?<!c)b","l&BEJPbhoUqwpHlyll",[global])),
+ <<"iNbLxxT">> = iolist_to_binary(re:replace("b","(?<!c)b","iN&LxxT",[])),
+ <<"iNbLxxT">> = iolist_to_binary(re:replace("b","(?<!c)b","iN&LxxT",[global])),
+ <<"byOfPd">> = iolist_to_binary(re:replace("b","(?<!c)b","&yOfPd",[])),
+ <<"byOfPd">> = iolist_to_binary(re:replace("b","(?<!c)b","&yOfPd",[global])),
+ <<"IblabamNFubVS">> = iolist_to_binary(re:replace("aba","(?:..)*a","Ibl&mNFubVS",[])),
+ <<"IblabamNFubVS">> = iolist_to_binary(re:replace("aba","(?:..)*a","Ibl&mNFubVS",[global])),
+ <<"wvNuoyarrAWFba">> = iolist_to_binary(re:replace("aba","(?:..)*?a","wvNuo\\1y&rrAWF",[])),
+ <<"wvNuoyarrAWFbwvNuoyarrAWF">> = iolist_to_binary(re:replace("aba","(?:..)*?a","wvNuo\\1y&rrAWF",[global])),
+ <<"abVmnPSDabPXSc">> = iolist_to_binary(re:replace("abc","^(?:b|a(?=(.)))*\\1","&VmnPSD&PXS",[])),
+ <<"abVmnPSDabPXSc">> = iolist_to_binary(re:replace("abc","^(?:b|a(?=(.)))*\\1","&VmnPSD&PXS",[global])),
+ <<"MNhLuKuRgFcjoiabc">> = iolist_to_binary(re:replace("abc","^(){3,5}","MNhL\\1uK&uRgFcj\\1o&i\\1\\1",[])),
+ <<"MNhLuKuRgFcjoiabc">> = iolist_to_binary(re:replace("abc","^(){3,5}","MNhL\\1uK&uRgFcj\\1o&i\\1\\1",[global])),
+ <<"aax">> = iolist_to_binary(re:replace("aax","^(a+)*ax","&",[])),
+ <<"aax">> = iolist_to_binary(re:replace("aax","^(a+)*ax","&",[global])),
+ <<"aax">> = iolist_to_binary(re:replace("aax","^((a|b)+)*ax","&",[])),
+ <<"aax">> = iolist_to_binary(re:replace("aax","^((a|b)+)*ax","&",[global])),
+ <<"UaaxEVMyUJoaafaaxbXAGlnX">> = iolist_to_binary(re:replace("aax","^((a|bc)+)*ax","U&EVMyUJoa\\1f&bXAGlnX",[])),
+ <<"UaaxEVMyUJoaafaaxbXAGlnX">> = iolist_to_binary(re:replace("aax","^((a|bc)+)*ax","U&EVMyUJoa\\1f&bXAGlnX",[global])),
+ <<"cHRavababj">> = iolist_to_binary(re:replace("cab","(a|x)*ab","HR\\1av&&j",[])),
+ <<"cHRavababj">> = iolist_to_binary(re:replace("cab","(a|x)*ab","HR\\1av&&j",[global])),
+ <<"ceqqArfabLqGjflabab">> = iolist_to_binary(re:replace("cab","(a)*ab","eqqA\\1rf&LqGjfl&&",[])),
+ <<"ceqqArfabLqGjflabab">> = iolist_to_binary(re:replace("cab","(a)*ab","eqqA\\1rf&LqGjfl&&",[global])),
+ <<"aMdQQ">> = iolist_to_binary(re:replace("ab","(?:(?i)a)b","aMdQQ",[])),
+ <<"aMdQQ">> = iolist_to_binary(re:replace("ab","(?:(?i)a)b","aMdQQ",[global])),
+ ok.
+run27() ->
+ <<"qpLuqQJ">> = iolist_to_binary(re:replace("ab","((?i)a)b","qpLuqQJ",[])),
+ <<"qpLuqQJ">> = iolist_to_binary(re:replace("ab","((?i)a)b","qpLuqQJ",[global])),
+ <<"KU">> = iolist_to_binary(re:replace("Ab","(?:(?i)a)b","KU\\1",[])),
+ <<"KU">> = iolist_to_binary(re:replace("Ab","(?:(?i)a)b","KU\\1",[global])),
+ <<"HbAbcmtA">> = iolist_to_binary(re:replace("Ab","((?i)a)b","Hb&cmt\\1",[])),
+ <<"HbAbcmtA">> = iolist_to_binary(re:replace("Ab","((?i)a)b","Hb&cmt\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?i)a)b","\\1&d\\1h",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?i)a)b","\\1&d\\1h",[global])),
+ <<"cb">> = iolist_to_binary(re:replace("cb","(?:(?i)a)b","QGy\\1\\1s",[])),
+ <<"cb">> = iolist_to_binary(re:replace("cb","(?:(?i)a)b","QGy\\1\\1s",[global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?:(?i)a)b","h&LcJB&\\1koG",[])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?:(?i)a)b","h&LcJB&\\1koG",[global])),
+ <<"hQoabBcSA">> = iolist_to_binary(re:replace("ab","(?i:a)b","h\\1Qo&B\\1cSA",[])),
+ <<"hQoabBcSA">> = iolist_to_binary(re:replace("ab","(?i:a)b","h\\1Qo&B\\1cSA",[global])),
+ <<"C">> = iolist_to_binary(re:replace("ab","((?i:a))b","C",[])),
+ <<"C">> = iolist_to_binary(re:replace("ab","((?i:a))b","C",[global])),
+ <<"GAMAbeosONsSFAblyS">> = iolist_to_binary(re:replace("Ab","(?i:a)b","GAM&eos\\1O\\1Ns\\1SF&lyS",[])),
+ <<"GAMAbeosONsSFAblyS">> = iolist_to_binary(re:replace("Ab","(?i:a)b","GAM&eos\\1O\\1Ns\\1SF&lyS",[global])),
+ <<"AbASQYAbA">> = iolist_to_binary(re:replace("Ab","((?i:a))b","&\\1SQY&\\1",[])),
+ <<"AbASQYAbA">> = iolist_to_binary(re:replace("Ab","((?i:a))b","&\\1SQY&\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i:a)b","EW&tEN\\1\\1&\\1\\1yd",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i:a)b","EW&tEN\\1\\1&\\1\\1yd",[global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","bK&xdvtcfqVCo",[])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","bK&xdvtcfqVCo",[global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","rU",[])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","rU",[global])),
+ <<"fabvvabeKvWlUCaababk">> = iolist_to_binary(re:replace("ab","(?:(?-i)a)b","f&vv&eKvWlUC\\1\\1a&\\1&k",[caseless])),
+ <<"fabvvabeKvWlUCaababk">> = iolist_to_binary(re:replace("ab","(?:(?-i)a)b","f&vv&eKvWlUC\\1\\1a&\\1&k",[caseless,
global])),
-?line <<"ABCDRIpLJwyEwDArCpanW">> = iolist_to_binary(re:replace("ABCD","abcd","&RIpLJwyEwDA\\1rCpan\\1W",[caseless])),
-?line <<"ABCDRIpLJwyEwDArCpanW">> = iolist_to_binary(re:replace("ABCD","abcd","&RIpLJwyEwDA\\1rCpan\\1W",[caseless,
- global])),
-?line <<"xykYBC">> = iolist_to_binary(re:replace("ABCD","a(bc)d","xykY\\1",[caseless])),
-?line <<"xykYBC">> = iolist_to_binary(re:replace("ABCD","a(bc)d","xykY\\1",[caseless,
- global])),
-?line <<"UMfPSTJEqdeS">> = iolist_to_binary(re:replace("AC","a[-]?c","U\\1M\\1\\1fPSTJEqdeS",[caseless])),
-?line <<"UMfPSTJEqdeS">> = iolist_to_binary(re:replace("AC","a[-]?c","U\\1M\\1\\1fPSTJEqdeS",[caseless,
- global])),
-?line <<"ITABCABCABCnxfDlABCpYAXQvxABCABCE">> = iolist_to_binary(re:replace("ABCABC","(abc)\\1","IT\\1&nxfDl\\1pYAXQvx\\1\\1E",[caseless])),
-?line <<"ITABCABCABCnxfDlABCpYAXQvxABCABCE">> = iolist_to_binary(re:replace("ABCABC","(abc)\\1","IT\\1&nxfDl\\1pYAXQvx\\1\\1E",[caseless,
- global])),
-?line <<"JXRRQqcKbpvOgISABCT">> = iolist_to_binary(re:replace("ABCABC","([a-c]*)\\1","JXRRQqcKbpvOgIS\\1T",[caseless])),
-?line <<"JXRRQqcKbpvOgISABCTJXRRQqcKbpvOgIST">> = iolist_to_binary(re:replace("ABCABC","([a-c]*)\\1","JXRRQqcKbpvOgIS\\1T",[caseless,
- global])),
-?line <<"abxuiiVt">> = iolist_to_binary(re:replace("abad","a(?!b).","xuiiVt",[])),
-?line <<"abxuiiVt">> = iolist_to_binary(re:replace("abad","a(?!b).","xuiiVt",[global])),
-?line <<"abMdtNqPOC">> = iolist_to_binary(re:replace("abad","a(?=d).","MdtNqPOC",[])),
-?line <<"abMdtNqPOC">> = iolist_to_binary(re:replace("abad","a(?=d).","MdtNqPOC",[global])),
-?line <<"abmkrHu">> = iolist_to_binary(re:replace("abad","a(?=c|d).","mkrHu",[])),
-?line <<"abmkrHu">> = iolist_to_binary(re:replace("abad","a(?=c|d).","mkrHu",[global])),
-?line <<"JfimtGueeaceUlTKvht">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)(.)","JfimtGu\\1\\1&UlTKvht",[])),
-?line <<"JfimtGueeaceUlTKvht">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)(.)","JfimtGu\\1\\1&UlTKvht",[global])),
-?line <<"IdKeqIicacekGQCace">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)*(.)","IdK\\1qIic&kGQC&",[])),
-?line <<"IdKeqIicacekGQCace">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)*(.)","IdK\\1qIic&kGQC&",[global])),
-?line <<"ovgdwiKdYGGace">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)+?(.)","ovgdwiKdYGG&",[])),
-?line <<"ovgdwiKdYGGace">> = iolist_to_binary(re:replace("ace","a(?:b|c|d)+?(.)","ovgdwiKdYGG&",[global])),
-?line <<"uJgdlOhWXUJpEBdwSbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+?(.)","uJg\\1lOhWXUJpEB\\1wS",[])),
-?line <<"uJgdlOhWXUJpEBdwSbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+?(.)","uJg\\1lOhWXUJpEB\\1wS",[global])),
-?line <<"UMpmieMJkQH">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+(.)","UMpmi\\1MJkQH",[])),
-?line <<"UMpmieMJkQH">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d)+(.)","UMpmi\\1MJkQH",[global])),
-?line <<"pCjGheRqYfSacdbhlDAvcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){2}(.)","pCjGheRqYfS&hlDAv",[])),
-?line <<"pCjGheRqYfSacdbhlDAvcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){2}(.)","pCjGheRqYfS&hlDAv",[global])),
-?line <<"yxwYmacdbcdbbAbacdbcdbbGABe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}(.)","yxwYm&\\1A\\1&bGAB",[])),
-?line <<"yxwYmacdbcdbbAbacdbcdbbGABe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}(.)","yxwYm&\\1A\\1&bGAB",[global])),
-?line <<"dkoReacdbcdhXacdbcdacdbcdcakNJbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}?(.)","\\1koRe&hX&&cakNJ",[])),
-?line <<"dkoReacdbcdhXacdbcdacdbcdcakNJbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){4,5}?(.)","\\1koRe&hX&&cakNJ",[global])),
-?line <<"nVjVDfoobarOjfoobarfoobareL">> = iolist_to_binary(re:replace("foobar","((foo)|(bar))*","nVjVD&Oj&&eL",[])),
-?line <<"nVjVDfoobarOjfoobarfoobareLnVjVDOjeL">> = iolist_to_binary(re:replace("foobar","((foo)|(bar))*","nVjVD&Oj&&eL",[global])),
-?line <<"bJacdbcdbeMVacdbcdbeFAiPYieyEAI">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}(.)","bJ&MV&FAiPYi\\1yEAI",[])),
-?line <<"bJacdbcdbeMVacdbcdbeFAiPYieyEAI">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}(.)","bJ&MV&FAiPYi\\1yEAI",[global])),
-?line <<"cW">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}?(.)","cW",[])),
-?line <<"cW">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){6,7}?(.)","cW",[global])),
-?line <<"EnymbYybacdbcdbeQeCacdbcdbeacdbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}(.)","EnymbYyb&Q\\1C&&",[])),
-?line <<"EnymbYybacdbcdbeQeCacdbcdbeacdbcdbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}(.)","EnymbYyb&Q\\1C&&",[global])),
-?line <<"XCacdbcdbVjuGQacdbcdbBqmsUJe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}?(.)","XC&VjuGQ&BqmsUJ",[])),
-?line <<"XCacdbcdbVjuGQacdbcdbBqmsUJe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,6}?(.)","XC&VjuGQ&BqmsUJ",[global])),
-?line <<"OacdbcdbeCSMacdbcdbensheuoDP">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}(.)","O&CSM&nsh\\1uoDP",[])),
-?line <<"OacdbcdbeCSMacdbcdbensheuoDP">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}(.)","O&CSM&nsh\\1uoDP",[global])),
-?line <<"YReNTbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}?(.)","YReNT\\1",[])),
-?line <<"YReNTbe">> = iolist_to_binary(re:replace("acdbcdbe","a(?:b|c|d){5,7}?(.)","YReNT\\1",[global])),
-?line <<"IJoaceaceHEIicnaaceaceacecq">> = iolist_to_binary(re:replace("ace","a(?:b|(c|e){1,2}?|d)+?(.)","IJo&&HEIi\\1na&&&\\1q",[])),
-?line <<"IJoaceaceHEIicnaaceaceacecq">> = iolist_to_binary(re:replace("ace","a(?:b|(c|e){1,2}?|d)+?(.)","IJo&&HEIi\\1na&&&\\1q",[global])),
-?line <<"PqnTibAldgKNACABm">> = iolist_to_binary(re:replace("AB","^(.+)?B","PqnTib\\1ldgKN\\1C&m",[])),
-?line <<"PqnTibAldgKNACABm">> = iolist_to_binary(re:replace("AB","^(.+)?B","PqnTib\\1ldgKN\\1C&m",[global])),
-?line <<"n.toDyHxNwuj.d.n..l">> = iolist_to_binary(re:replace(".","^([^a-z])|(\\^)$","n\\1toDyHxNwuj\\1d&n\\1\\1l",[])),
-?line <<"n.toDyHxNwuj.d.n..l">> = iolist_to_binary(re:replace(".","^([^a-z])|(\\^)$","n\\1toDyHxNwuj\\1d&n\\1\\1l",[global])),
-?line <<"GOUT">> = iolist_to_binary(re:replace("<&OUT","^[<>]&","G",[])),
-?line <<"GOUT">> = iolist_to_binary(re:replace("<&OUT","^[<>]&","G",[global])),
-?line <<"eQPwy">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","eQPwy",[])),
-?line <<"eQPwy">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a\\1?){4}$","eQPwy",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a\\1?){4}$","fpysabFs",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a\\1?){4}$","fpysabFs",[global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","^(a\\1?){4}$","iySaXMmSpF\\1wGu&i&",[])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","^(a\\1?){4}$","iySaXMmSpF\\1wGu&i&",[global])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","&E&t",[])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a\\1?){4}$","&E&t",[global])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","rv\\1nEUYoTcup\\1",[])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a\\1?){4}$","rv\\1nEUYoTcup\\1",[global])),
-?line <<"Grouf">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a(?(1)\\1)){4}$","Grouf",[])),
-?line <<"Grouf">> = iolist_to_binary(re:replace("aaaaaaaaaa","^(a(?(1)\\1)){4}$","Grouf",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a(?(1)\\1)){4}$","xJ\\1D",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a(?(1)\\1)){4}$","xJ\\1D",[global])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a(?(1)\\1)){4}$","w&PQ&n&C",[])),
-?line <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a(?(1)\\1)){4}$","w&PQ&n&C",[global])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a(?(1)\\1)){4}$","fXiC",[])),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaa","^(a(?(1)\\1)){4}$","fXiC",[global])),
-?line <<"fEfoobarodvfoobarmohu">> = iolist_to_binary(re:replace("foobar","(?:(f)(o)(o)|(b)(a)(r))*","\\1E&odv&mohu",[])),
-?line <<"fEfoobarodvfoobarmohuEodvmohu">> = iolist_to_binary(re:replace("foobar","(?:(f)(o)(o)|(b)(a)(r))*","\\1E&odv&mohu",[global])),
-?line <<"aaHgXnnrbsEWfBvCB">> = iolist_to_binary(re:replace("ab","(?<=a)b","aHgXnnr&sEWfBv\\1CB",[])),
-?line <<"aaHgXnnrbsEWfBvCB">> = iolist_to_binary(re:replace("ab","(?<=a)b","aHgXnnr&sEWfBv\\1CB",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a)b","&\\1J\\1qs\\1\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=a)b","&\\1J\\1qs\\1\\1",[global])),
-?line <<"cb">> = iolist_to_binary(re:replace("cb","(?<=a)b","PBhSDEP\\1&fa&&FAQ",[])),
-?line <<"cb">> = iolist_to_binary(re:replace("cb","(?<=a)b","PBhSDEP\\1&fa&&FAQ",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","(?<=a)b","VGBLJTb\\1",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","(?<=a)b","VGBLJTb\\1",[global])),
-?line <<"aAjOnQvFo">> = iolist_to_binary(re:replace("ab","(?<!c)b","Aj\\1OnQvFo",[])),
-?line <<"aAjOnQvFo">> = iolist_to_binary(re:replace("ab","(?<!c)b","Aj\\1OnQvFo",[global])),
-?line <<"EcsuQFCLbrqGgAba">> = iolist_to_binary(re:replace("b","(?<!c)b","EcsuQ\\1FCLbrqGgA&a",[])),
-?line <<"EcsuQFCLbrqGgAba">> = iolist_to_binary(re:replace("b","(?<!c)b","EcsuQ\\1FCLbrqGgA&a",[global])),
-?line <<"OLbRynrb">> = iolist_to_binary(re:replace("b","(?<!c)b","OL&R\\1\\1ynr&\\1",[])),
-?line <<"OLbRynrb">> = iolist_to_binary(re:replace("b","(?<!c)b","OL&R\\1\\1ynr&\\1",[global])),
-?line <<"YnabankVVRQtUI">> = iolist_to_binary(re:replace("aba","(?:..)*a","Yn&nkVVRQtUI",[])),
-?line <<"YnabankVVRQtUI">> = iolist_to_binary(re:replace("aba","(?:..)*a","Yn&nkVVRQtUI",[global])),
-?line <<"dtatllgba">> = iolist_to_binary(re:replace("aba","(?:..)*?a","dt&tllg",[])),
-?line <<"dtatllgbdtatllg">> = iolist_to_binary(re:replace("aba","(?:..)*?a","dt&tllg",[global])),
-?line <<"abKyOHc">> = iolist_to_binary(re:replace("abc","^(?:b|a(?=(.)))*\\1","&KyOH",[])),
-?line <<"abKyOHc">> = iolist_to_binary(re:replace("abc","^(?:b|a(?=(.)))*\\1","&KyOH",[global])),
-?line <<"olabc">> = iolist_to_binary(re:replace("abc","^(){3,5}","ol",[])),
-?line <<"olabc">> = iolist_to_binary(re:replace("abc","^(){3,5}","ol",[global])),
-?line <<"tQmIRuA">> = iolist_to_binary(re:replace("aax","^(a+)*ax","tQmIRuA",[])),
-?line <<"tQmIRuA">> = iolist_to_binary(re:replace("aax","^(a+)*ax","tQmIRuA",[global])),
-?line <<"RaaxLDgyKaII">> = iolist_to_binary(re:replace("aax","^((a|b)+)*ax","R&LDgyK\\1II",[])),
-?line <<"RaaxLDgyKaII">> = iolist_to_binary(re:replace("aax","^((a|b)+)*ax","R&LDgyK\\1II",[global])),
-?line <<"jxJdaCNaaxAUxaofKF">> = iolist_to_binary(re:replace("aax","^((a|bc)+)*ax","jxJd\\1CN&AUx\\1ofKF",[])),
-?line <<"jxJdaCNaaxAUxaofKF">> = iolist_to_binary(re:replace("aax","^((a|bc)+)*ax","jxJd\\1CN&AUx\\1ofKF",[global])),
-?line <<"cxMJiMAGvYS">> = iolist_to_binary(re:replace("cab","(a|x)*ab","xMJiMA\\1G\\1vYS",[])),
-?line <<"cxMJiMAGvYS">> = iolist_to_binary(re:replace("cab","(a|x)*ab","xMJiMA\\1G\\1vYS",[global])),
-?line <<"cwXU">> = iolist_to_binary(re:replace("cab","(a)*ab","wXU\\1",[])),
-?line <<"cwXU">> = iolist_to_binary(re:replace("cab","(a)*ab","wXU\\1",[global])),
-?line <<"y">> = iolist_to_binary(re:replace("ab","(?:(?i)a)b","y",[])),
-?line <<"y">> = iolist_to_binary(re:replace("ab","(?:(?i)a)b","y",[global])),
-?line <<"xNpTab">> = iolist_to_binary(re:replace("ab","((?i)a)b","xNpT&",[])),
-?line <<"xNpTab">> = iolist_to_binary(re:replace("ab","((?i)a)b","xNpT&",[global])),
-?line <<"UUhQk">> = iolist_to_binary(re:replace("Ab","(?:(?i)a)b","UU\\1\\1h\\1Qk",[])),
-?line <<"UUhQk">> = iolist_to_binary(re:replace("Ab","(?:(?i)a)b","UU\\1\\1h\\1Qk",[global])),
-?line <<"To">> = iolist_to_binary(re:replace("Ab","((?i)a)b","To",[])),
-?line <<"To">> = iolist_to_binary(re:replace("Ab","((?i)a)b","To",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?i)a)b","Iog\\1kPwXTNA\\1u",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?i)a)b","Iog\\1kPwXTNA\\1u",[global])),
-?line <<"cb">> = iolist_to_binary(re:replace("cb","(?:(?i)a)b","\\1eeor\\1PcpHdMT&rFUGQX",[])),
-?line <<"cb">> = iolist_to_binary(re:replace("cb","(?:(?i)a)b","\\1eeor\\1PcpHdMT&rFUGQX",[global])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?:(?i)a)b","f&&\\1Fnb&nOyDHT&Trng",[])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?:(?i)a)b","f&&\\1Fnb&nOyDHT&Trng",[global])),
-?line <<"SCyJabaabEDejJdabuabG">> = iolist_to_binary(re:replace("ab","(?i:a)b","SCyJ\\1&a&EDejJd&\\1u\\1&G",[])),
-?line <<"SCyJabaabEDejJdabuabG">> = iolist_to_binary(re:replace("ab","(?i:a)b","SCyJ\\1&a&EDejJd&\\1u\\1&G",[global])),
-?line <<"nabMYvlVqabaabvabp">> = iolist_to_binary(re:replace("ab","((?i:a))b","n&MYvlVq&\\1&v&p",[])),
-?line <<"nabMYvlVqabaabvabp">> = iolist_to_binary(re:replace("ab","((?i:a))b","n&MYvlVq&\\1&v&p",[global])),
-?line <<"hQhGlGrAbAbxEKrc">> = iolist_to_binary(re:replace("Ab","(?i:a)b","hQhGlGr&&xEKrc\\1",[])),
-?line <<"hQhGlGrAbAbxEKrc">> = iolist_to_binary(re:replace("Ab","(?i:a)b","hQhGlGr&&xEKrc\\1",[global])),
-?line <<"fSgsAnoYq">> = iolist_to_binary(re:replace("Ab","((?i:a))b","fSgs\\1noYq",[])),
-?line <<"fSgsAnoYq">> = iolist_to_binary(re:replace("Ab","((?i:a))b","fSgs\\1noYq",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i:a)b","Lsa",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i:a)b","Lsa",[global])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","&MKfO&mRWgP&yU",[])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","&MKfO&mRWgP&yU",[global])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","S",[])),
-?line <<"aB">> = iolist_to_binary(re:replace("aB","(?i:a)b","S",[global])),
-?line <<"QTabISRDlbwogmSuiJ">> = iolist_to_binary(re:replace("ab","(?:(?-i)a)b","QT&ISRDlbwogmSuiJ",[caseless])),
-?line <<"QTabISRDlbwogmSuiJ">> = iolist_to_binary(re:replace("ab","(?:(?-i)a)b","QT&ISRDlbwogmSuiJ",[caseless,
- global])),
-?line <<"VabWOeTSwSGwOkyIabf">> = iolist_to_binary(re:replace("ab","((?-i)a)b","V&WOeTSwSGwOkyI&f",[caseless])),
-?line <<"VabWOeTSwSGwOkyIabf">> = iolist_to_binary(re:replace("ab","((?-i)a)b","V&WOeTSwSGwOkyI&f",[caseless,
- global])),
-?line <<"pNtk">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","\\1pNtk",[caseless])),
-?line <<"pNtk">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","\\1pNtk",[caseless,
+ <<"a">> = iolist_to_binary(re:replace("ab","((?-i)a)b","a",[caseless])),
+ <<"a">> = iolist_to_binary(re:replace("ab","((?-i)a)b","a",[caseless,
+ global])),
+ <<"YgwHaBaBEobvWdcKm">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","YgwH&&E\\1o\\1bvWdcKm",[caseless])),
+ <<"YgwHaBaBEobvWdcKm">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","YgwH&&E\\1o\\1bvWdcKm",[caseless,
+ global])),
+ <<"gPQtaBiM">> = iolist_to_binary(re:replace("aB","((?-i)a)b","gPQt\\1BiM",[caseless])),
+ <<"gPQtaBiM">> = iolist_to_binary(re:replace("aB","((?-i)a)b","gPQt\\1BiM",[caseless,
global])),
-?line <<"MpdRBTE">> = iolist_to_binary(re:replace("aB","((?-i)a)b","MpdRBTE",[caseless])),
-?line <<"MpdRBTE">> = iolist_to_binary(re:replace("aB","((?-i)a)b","MpdRBTE",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","RiV",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","RiV",[caseless,
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","dAPB\\1lhgJnXJM\\1",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","dAPB\\1lhgJnXJM\\1",[caseless,
+ global])),
+ <<"cpmMjqeoMjqXPSCxgaB">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","cpmMjqeoMjqXPSC\\1xg&",[caseless])),
+ <<"cpmMjqeoMjqXPSCxgaB">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","cpmMjqeoMjqXPSC\\1xg&",[caseless,
+ global])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","ehCMjHfdoLOUT",[caseless])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","ehCMjHfdoLOUT",[caseless,
global])),
-?line <<"tjEITLaBaBtD">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","t\\1jEITL&&tD",[caseless])),
-?line <<"tjEITLaBaBtD">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","t\\1jEITL&&tD",[caseless,
+ <<"aBaBXheDmRWIj">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","&&XheDmRW\\1Ij",[caseless])),
+ <<"aBaBXheDmRWIj">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","&&XheDmRW\\1Ij",[caseless,
global])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","hbvOWn",[caseless])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","hbvOWn",[caseless,
- global])),
-?line <<"s">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","s",[caseless])),
-?line <<"s">> = iolist_to_binary(re:replace("aB","(?:(?-i)a)b","s",[caseless,
- global])),
-?line <<"yfQaBvLFJJQMhKGx">> = iolist_to_binary(re:replace("aB","((?-i)a)b","yfQ&vLFJJQMhKGx",[caseless])),
-?line <<"yfQaBvLFJJQMhKGx">> = iolist_to_binary(re:replace("aB","((?-i)a)b","yfQ&vLFJJQMhKGx",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","QM&L",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","QM&L",[caseless,
- global])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","aVF\\1dL&\\1",[caseless])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","aVF\\1dL&\\1",[caseless,
- global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?:(?-i)a)b","GSb\\1bvleJ",[caseless])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?:(?-i)a)b","GSb\\1bvleJ",[caseless,
- global])),
-?line <<"wAW">> = iolist_to_binary(re:replace("ab","(?-i:a)b","wAW",[caseless])),
-?line <<"wAW">> = iolist_to_binary(re:replace("ab","(?-i:a)b","wAW",[caseless,
- global])),
-?line <<"Atl">> = iolist_to_binary(re:replace("ab","((?-i:a))b","Atl",[caseless])),
-?line <<"Atl">> = iolist_to_binary(re:replace("ab","((?-i:a))b","Atl",[caseless,
+ <<"HaBaBwaBaBarQLsPaLaBH">> = iolist_to_binary(re:replace("aB","((?-i)a)b","H&&w&&\\1rQLsP\\1L&H",[caseless])),
+ <<"HaBaBwaBaBarQLsPaLaBH">> = iolist_to_binary(re:replace("aB","((?-i)a)b","H&&w&&\\1rQLsP\\1L&H",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","rA&&\\1Ox\\1x",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?:(?-i)a)b","rA&&\\1Ox\\1x",[caseless,
+ global])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","qU\\1qgKirHcB",[caseless])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?:(?-i)a)b","qU\\1qgKirHcB",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?:(?-i)a)b","rtc&FUes&I&&V\\1Wi&o",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?:(?-i)a)b","rtc&FUes&I&&V\\1Wi&o",[caseless,
+ global])),
+ ok.
+run28() ->
+ <<"gGfbP">> = iolist_to_binary(re:replace("ab","(?-i:a)b","\\1gGfbP",[caseless])),
+ <<"gGfbP">> = iolist_to_binary(re:replace("ab","(?-i:a)b","\\1gGfbP",[caseless,
+ global])),
+ <<"oibsT">> = iolist_to_binary(re:replace("ab","((?-i:a))b","oibsT",[caseless])),
+ <<"oibsT">> = iolist_to_binary(re:replace("ab","((?-i:a))b","oibsT",[caseless,
+ global])),
+ <<"erLkRe">> = iolist_to_binary(re:replace("aB","(?-i:a)b","erLkRe",[caseless])),
+ <<"erLkRe">> = iolist_to_binary(re:replace("aB","(?-i:a)b","erLkRe",[caseless,
global])),
-?line <<"gP">> = iolist_to_binary(re:replace("aB","(?-i:a)b","gP\\1",[caseless])),
-?line <<"gP">> = iolist_to_binary(re:replace("aB","(?-i:a)b","gP\\1",[caseless,
+ <<"NcuVaBaPaBqlgVJaaAMaBjt">> = iolist_to_binary(re:replace("aB","((?-i:a))b","NcuV&aP&qlgVJ\\1\\1AM&jt",[caseless])),
+ <<"NcuVaBaPaBqlgVJaaAMaBjt">> = iolist_to_binary(re:replace("aB","((?-i:a))b","NcuV&aP&qlgVJ\\1\\1AM&jt",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","xW",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","xW",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","rBT\\1&D&jmNXx",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","rBT\\1&D&jmNXx",[caseless,
+ global])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","oyAx&&hEq\\1",[caseless])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","oyAx&&hEq\\1",[caseless,
+ global])),
+ <<"shG">> = iolist_to_binary(re:replace("aB","(?-i:a)b","\\1shG",[caseless])),
+ <<"shG">> = iolist_to_binary(re:replace("aB","(?-i:a)b","\\1shG",[caseless,
global])),
-?line <<"LFcaNaJixv">> = iolist_to_binary(re:replace("aB","((?-i:a))b","LFc\\1N\\1Jixv",[caseless])),
-?line <<"LFcaNaJixv">> = iolist_to_binary(re:replace("aB","((?-i:a))b","LFc\\1N\\1Jixv",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","FRPuPJIi\\1",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","FRPuPJIi\\1",[caseless,
- global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","TYBp\\1aMFRUwXYyGS\\1&tH",[caseless])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","TYBp\\1aMFRUwXYyGS\\1&tH",[caseless,
- global])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","s",[caseless])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","s",[caseless,
- global])),
-?line <<"XBBaBVaBHwVHaBtFl">> = iolist_to_binary(re:replace("aB","(?-i:a)b","XBB\\1&V&H\\1wVH&t\\1Fl",[caseless])),
-?line <<"XBBaBVaBHwVHaBtFl">> = iolist_to_binary(re:replace("aB","(?-i:a)b","XBB\\1&V&H\\1wVH&t\\1Fl",[caseless,
- global])),
-?line <<"TfbKaBvxl">> = iolist_to_binary(re:replace("aB","((?-i:a))b","TfbK&vxl",[caseless])),
-?line <<"TfbKaBvxl">> = iolist_to_binary(re:replace("aB","((?-i:a))b","TfbK&vxl",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","\\1B\\1v&LjNSAy",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","\\1B\\1v&LjNSAy",[caseless,
- global])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","HQTW",[caseless])),
-?line <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","HQTW",[caseless,
- global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","pG",[caseless])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","pG",[caseless,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?-i:a.))b","U",[caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?-i:a.))b","U",[caseless,
- global])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","((?-i:a.))b","\\1uBjM&tv&\\1tD\\1UO\\1gVY",[caseless])),
-?line <<"AB">> = iolist_to_binary(re:replace("AB","((?-i:a.))b","\\1uBjM&tv&\\1tD\\1UO\\1gVY",[caseless,
- global])),
-?line <<"a
+ <<"OKLO">> = iolist_to_binary(re:replace("aB","((?-i:a))b","OKLO",[caseless])),
+ <<"OKLO">> = iolist_to_binary(re:replace("aB","((?-i:a))b","OKLO",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","DV\\1NmsJ&bJn&F",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?-i:a)b","DV\\1NmsJ&bJn&F",[caseless,
+ global])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","I",[caseless])),
+ <<"Ab">> = iolist_to_binary(re:replace("Ab","(?-i:a)b","I",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","WVyTncmcNoIfn\\1B",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","(?-i:a)b","WVyTncmcNoIfn\\1B",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?-i:a.))b","&UW\\1PRmJQx\\1inQ\\1o&&C",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?-i:a.))b","&UW\\1PRmJQx\\1inQ\\1o&&C",[caseless,
+ global])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","((?-i:a.))b","xFK&bFAyoLB\\1F",[caseless])),
+ <<"AB">> = iolist_to_binary(re:replace("AB","((?-i:a.))b","xFK&bFAyoLB\\1F",[caseless,
+ global])),
+ <<"a
B">> = iolist_to_binary(re:replace("a
-B","((?-i:a.))b","SAx&Io",[caseless])),
-?line <<"a
+B","((?-i:a.))b","\\1E\\1AL\\1QP",[caseless])),
+ <<"a
B">> = iolist_to_binary(re:replace("a
-B","((?-i:a.))b","SAx&Io",[caseless,global])),
-?line <<"LPyepkdfnqsa
-oa
-a
+B","((?-i:a.))b","\\1E\\1AL\\1QP",[caseless,global])),
+ <<"bja
Ba
-M">> = iolist_to_binary(re:replace("a
-B","((?s-i:a.))b","LPyepkdfnqs\\1o\\1&\\1M",[caseless])),
-?line <<"LPyepkdfnqsa
-oa
-a
+wRNOa
+LMvela
+w">> = iolist_to_binary(re:replace("a
+B","((?s-i:a.))b","bj&\\1wRNO\\1LMvel\\1w",[caseless])),
+ <<"bja
Ba
-M">> = iolist_to_binary(re:replace("a
-B","((?s-i:a.))b","LPyepkdfnqs\\1o\\1&\\1M",[caseless,global])),
-?line <<"RG">> = iolist_to_binary(re:replace("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))","RG",[])),
-?line <<"RG">> = iolist_to_binary(re:replace("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))","RG",[global])),
-?line <<"SiMB">> = iolist_to_binary(re:replace("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))","\\1SiMB",[])),
-?line <<"SiMB">> = iolist_to_binary(re:replace("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))","\\1SiMB",[global])),
-?line <<"HNBAb4abYAb4abecqBPfYYBF">> = iolist_to_binary(re:replace("Ab4ab","(ab)\\d\\1","HNB&Y&ecqBPfYYBF",[caseless])),
-?line <<"HNBAb4abYAb4abecqBPfYYBF">> = iolist_to_binary(re:replace("Ab4ab","(ab)\\d\\1","HNB&Y&ecqBPfYYBF",[caseless,
- global])),
-?line <<"eqbVWgJEcab4Ababe">> = iolist_to_binary(re:replace("ab4Ab","(ab)\\d\\1","eqbVWgJEc&\\1e",[caseless])),
-?line <<"eqbVWgJEcab4Ababe">> = iolist_to_binary(re:replace("ab4Ab","(ab)\\d\\1","eqbVWgJEc&\\1e",[caseless,
- global])),
-?line <<"HvsmPfoobar1234bazCYfoobar1234bazqih">> = iolist_to_binary(re:replace("foobar1234baz","foo\\w*\\d{4}baz","HvsmP&CY&qih",[])),
-?line <<"HvsmPfoobar1234bazCYfoobar1234bazqih">> = iolist_to_binary(re:replace("foobar1234baz","foo\\w*\\d{4}baz","HvsmP&CY&qih",[global])),
-?line <<"x~~lsTkD~~qWUPtx~~wj~~R">> = iolist_to_binary(re:replace("x~~","x(~~)*(?:(?:F)?)?","&lsTkD\\1qWUPt&wj\\1R",[])),
-?line <<"x~~lsTkD~~qWUPtx~~wj~~R">> = iolist_to_binary(re:replace("x~~","x(~~)*(?:(?:F)?)?","&lsTkD\\1qWUPt&wj\\1R",[global])),
-?line <<"aaacPnBOLPeN">> = iolist_to_binary(re:replace("aaac","^a(?#xxx){3}c","&P\\1n\\1BOLPeN",[])),
-?line <<"aaacPnBOLPeN">> = iolist_to_binary(re:replace("aaac","^a(?#xxx){3}c","&P\\1n\\1BOLPeN",[global])),
-?line <<"Uh">> = iolist_to_binary(re:replace("aaac","^a (?#xxx) (?#yyy) {3}c","Uh",[extended])),
-?line <<"Uh">> = iolist_to_binary(re:replace("aaac","^a (?#xxx) (?#yyy) {3}c","Uh",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<![cd])b","\\1CWOLaTxilNg\\1W",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<![cd])b","\\1CWOLaTxilNg\\1W",[global])),
-?line <<"B
+wRNOa
+LMvela
+w">> = iolist_to_binary(re:replace("a
+B","((?s-i:a.))b","bj&\\1wRNO\\1LMvel\\1w",[caseless,global])),
+ <<"oi">> = iolist_to_binary(re:replace("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))","oi",[])),
+ <<"oi">> = iolist_to_binary(re:replace("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))","oi",[global])),
+ <<"LPIaGAjcBB">> = iolist_to_binary(re:replace("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))","LPIaGAjc\\1B\\1B",[])),
+ <<"LPIaGAjcBB">> = iolist_to_binary(re:replace("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))","LPIaGAjc\\1B\\1B",[global])),
+ <<"Ab4abmaeqLAb4abK">> = iolist_to_binary(re:replace("Ab4ab","(ab)\\d\\1","&maeqL&K",[caseless])),
+ <<"Ab4abmaeqLAb4abK">> = iolist_to_binary(re:replace("Ab4ab","(ab)\\d\\1","&maeqL&K",[caseless,
+ global])),
+ <<"AUMabjlQ">> = iolist_to_binary(re:replace("ab4Ab","(ab)\\d\\1","AUM\\1jlQ",[caseless])),
+ <<"AUMabjlQ">> = iolist_to_binary(re:replace("ab4Ab","(ab)\\d\\1","AUM\\1jlQ",[caseless,
+ global])),
+ <<"XmYfoobar1234bazkhCJfoobar1234bazrE">> = iolist_to_binary(re:replace("foobar1234baz","foo\\w*\\d{4}baz","\\1\\1XmY&khCJ&rE",[])),
+ <<"XmYfoobar1234bazkhCJfoobar1234bazrE">> = iolist_to_binary(re:replace("foobar1234baz","foo\\w*\\d{4}baz","\\1\\1XmY&khCJ&rE",[global])),
+ <<"j">> = iolist_to_binary(re:replace("x~~","x(~~)*(?:(?:F)?)?","j",[])),
+ <<"j">> = iolist_to_binary(re:replace("x~~","x(~~)*(?:(?:F)?)?","j",[global])),
+ <<"dvmR">> = iolist_to_binary(re:replace("aaac","^a(?#xxx){3}c","dvmR",[])),
+ <<"dvmR">> = iolist_to_binary(re:replace("aaac","^a(?#xxx){3}c","dvmR",[global])),
+ <<"TcvCihggCC">> = iolist_to_binary(re:replace("aaac","^a (?#xxx) (?#yyy) {3}c","TcvCihggCC\\1",[extended])),
+ <<"TcvCihggCC">> = iolist_to_binary(re:replace("aaac","^a (?#xxx) (?#yyy) {3}c","TcvCihggCC\\1",[extended,
+ global])),
+ ok.
+run29() ->
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<![cd])b","aDLvRLT\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<![cd])b","aDLvRLT\\1",[global])),
+ <<"B
B">> = iolist_to_binary(re:replace("B
-B","(?<![cd])b","ruaT\\1JrTa&\\1sLB&iVNCc",[])),
-?line <<"B
+B","(?<![cd])b","&rX",[])),
+ <<"B
B">> = iolist_to_binary(re:replace("B
-B","(?<![cd])b","ruaT\\1JrTa&\\1sLB&iVNCc",[global])),
-?line <<"dbcb">> = iolist_to_binary(re:replace("dbcb","(?<![cd])b","\\1l\\1yKVtpLoPXXvCkO",[])),
-?line <<"dbcb">> = iolist_to_binary(re:replace("dbcb","(?<![cd])b","\\1l\\1yKVtpLoPXXvCkO",[global])),
-?line <<"dbuWHWJTppUTaMYMjwHAacb">> = iolist_to_binary(re:replace("dbaacb","(?<![cd])[ab]","uWHWJTppUT&\\1MYM\\1jwHA",[])),
-?line <<"dbuWHWJTppUTaMYMjwHAuWHWJTppUTaMYMjwHAcb">> = iolist_to_binary(re:replace("dbaacb","(?<![cd])[ab]","uWHWJTppUT&\\1MYM\\1jwHA",[global])),
-?line <<"dbeacb">> = iolist_to_binary(re:replace("dbaacb","(?<!(c|d))[ab]","e",[])),
-?line <<"dbeecb">> = iolist_to_binary(re:replace("dbaacb","(?<!(c|d))[ab]","e",[global])),
-?line <<"cdaccbtNFbjDlrMmYMBg">> = iolist_to_binary(re:replace("cdaccb","(?<!cd)[ab]","\\1\\1btNF&jDlrM\\1mYMBg",[])),
-?line <<"cdaccbtNFbjDlrMmYMBg">> = iolist_to_binary(re:replace("cdaccb","(?<!cd)[ab]","\\1\\1btNF&jDlrM\\1mYMBg",[global])),
-?line <<"s">> = iolist_to_binary(re:replace("","^(?:a?b?)*$","s",[])),
-?line <<"s">> = iolist_to_binary(re:replace("","^(?:a?b?)*$","s",[global])),
-?line <<"odRhXAvKP">> = iolist_to_binary(re:replace("a","^(?:a?b?)*$","odRhXAvKP",[])),
-?line <<"odRhXAvKP">> = iolist_to_binary(re:replace("a","^(?:a?b?)*$","odRhXAvKP",[global])),
-?line <<"o">> = iolist_to_binary(re:replace("ab","^(?:a?b?)*$","\\1o",[])),
-?line <<"o">> = iolist_to_binary(re:replace("ab","^(?:a?b?)*$","\\1o",[global])),
-?line <<"d">> = iolist_to_binary(re:replace("aaa","^(?:a?b?)*$","d",[])),
-?line <<"d">> = iolist_to_binary(re:replace("aaa","^(?:a?b?)*$","d",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:a?b?)*$","fX&M\\1FCCOYOMH\\1lR&ISP",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:a?b?)*$","fX&M\\1FCCOYOMH\\1lR&ISP",[global])),
-?line <<"dbcb">> = iolist_to_binary(re:replace("dbcb","^(?:a?b?)*$","d\\1aeAWVouRdylpC",[])),
-?line <<"dbcb">> = iolist_to_binary(re:replace("dbcb","^(?:a?b?)*$","d\\1aeAWVouRdylpC",[global])),
-?line <<"a--">> = iolist_to_binary(re:replace("a--","^(?:a?b?)*$","uM",[])),
-?line <<"a--">> = iolist_to_binary(re:replace("a--","^(?:a?b?)*$","uM",[global])),
-?line <<"aa--">> = iolist_to_binary(re:replace("aa--","^(?:a?b?)*$","EhSvb&jryIv\\1O&oeR",[])),
-?line <<"aa--">> = iolist_to_binary(re:replace("aa--","^(?:a?b?)*$","EhSvb&jryIv\\1O&oeR",[global])),
-?line <<"yobOa
-ba
-ca
-bcItPS
+B","(?<![cd])b","&rX",[global])),
+ <<"dbcb">> = iolist_to_binary(re:replace("dbcb","(?<![cd])b","RAdHe",[])),
+ <<"dbcb">> = iolist_to_binary(re:replace("dbcb","(?<![cd])b","RAdHe",[global])),
+ <<"dbLDvFpkRnyKFiqpapacb">> = iolist_to_binary(re:replace("dbaacb","(?<![cd])[ab]","LDvFpkRnyKFiqpap",[])),
+ <<"dbLDvFpkRnyKFiqpapLDvFpkRnyKFiqpapcb">> = iolist_to_binary(re:replace("dbaacb","(?<![cd])[ab]","LDvFpkRnyKFiqpap",[global])),
+ <<"dbpCgFRSanfBwdBHacb">> = iolist_to_binary(re:replace("dbaacb","(?<!(c|d))[ab]","pCgFRS&\\1nfBwdBH",[])),
+ <<"dbpCgFRSanfBwdBHpCgFRSanfBwdBHcb">> = iolist_to_binary(re:replace("dbaacb","(?<!(c|d))[ab]","pCgFRS&\\1nfBwdBH",[global])),
+ <<"cdaccJYb">> = iolist_to_binary(re:replace("cdaccb","(?<!cd)[ab]","J\\1Yb",[])),
+ <<"cdaccJYb">> = iolist_to_binary(re:replace("cdaccb","(?<!cd)[ab]","J\\1Yb",[global])),
+ <<"QQBKENcxCtDv">> = iolist_to_binary(re:replace("","^(?:a?b?)*$","\\1&QQ\\1BKENcxCtD&v",[])),
+ <<"QQBKENcxCtDv">> = iolist_to_binary(re:replace("","^(?:a?b?)*$","\\1&QQ\\1BKENcxCtD&v",[global])),
+ <<"EUVqGakpKtkaa">> = iolist_to_binary(re:replace("a","^(?:a?b?)*$","EUVqG&kp\\1\\1Ktk&&",[])),
+ <<"EUVqGakpKtkaa">> = iolist_to_binary(re:replace("a","^(?:a?b?)*$","EUVqG&kp\\1\\1Ktk&&",[global])),
+ <<"PJebYabVrwtUnyyi">> = iolist_to_binary(re:replace("ab","^(?:a?b?)*$","PJebY&Vrw\\1tUnyyi",[])),
+ <<"PJebYabVrwtUnyyi">> = iolist_to_binary(re:replace("ab","^(?:a?b?)*$","PJebY&Vrw\\1tUnyyi",[global])),
+ <<"TaaaaJgnBHpNaaaqW">> = iolist_to_binary(re:replace("aaa","^(?:a?b?)*$","Ta&JgnBHpN&qW",[])),
+ <<"TaaaaJgnBHpNaaaqW">> = iolist_to_binary(re:replace("aaa","^(?:a?b?)*$","Ta&JgnBHpN&qW",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:a?b?)*$","s",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:a?b?)*$","s",[global])),
+ <<"dbcb">> = iolist_to_binary(re:replace("dbcb","^(?:a?b?)*$","D",[])),
+ <<"dbcb">> = iolist_to_binary(re:replace("dbcb","^(?:a?b?)*$","D",[global])),
+ <<"a--">> = iolist_to_binary(re:replace("a--","^(?:a?b?)*$","xqeccmA\\1PK&\\1j\\1QcQv&",[])),
+ <<"a--">> = iolist_to_binary(re:replace("a--","^(?:a?b?)*$","xqeccmA\\1PK&\\1j\\1QcQv&",[global])),
+ <<"aa--">> = iolist_to_binary(re:replace("aa--","^(?:a?b?)*$","&y&JYUp&omM",[])),
+ <<"aa--">> = iolist_to_binary(re:replace("aa--","^(?:a?b?)*$","&y&JYUp&omM",[global])),
+ <<"suK
c">> = iolist_to_binary(re:replace("a
b
-c","((?s)^a(.))((?m)^b$)","yobO&\\1c&cItPS",[])),
-?line <<"yobOa
-ba
-ca
-bcItPS
+c","((?s)^a(.))((?m)^b$)","suK",[])),
+ <<"suK
c">> = iolist_to_binary(re:replace("a
b
-c","((?s)^a(.))((?m)^b$)","yobO&\\1c&cItPS",[global])),
-?line <<"a
-EBbPgb
+c","((?s)^a(.))((?m)^b$)","suK",[global])),
+ <<"a
+bsbrmbHobdxBbb
c">> = iolist_to_binary(re:replace("a
b
-c","((?m)^b$)","EB\\1Pg\\1",[])),
-?line <<"a
-EBbPgb
+c","((?m)^b$)","\\1s&rm\\1Ho&dxB&\\1",[])),
+ <<"a
+bsbrmbHobdxBbb
c">> = iolist_to_binary(re:replace("a
b
-c","((?m)^b$)","EB\\1Pg\\1",[global])),
-?line <<"a
-AybVFSWPOkP">> = iolist_to_binary(re:replace("a
-b","(?m)^b","Ay\\1&VF\\1SWPOkP\\1",[])),
-?line <<"a
-AybVFSWPOkP">> = iolist_to_binary(re:replace("a
-b","(?m)^b","Ay\\1&VF\\1SWPOkP\\1",[global])),
-?line <<"a
-bbTbKbl">> = iolist_to_binary(re:replace("a
-b","(?m)^(b)","b\\1T&K\\1l",[])),
-?line <<"a
-bbTbKbl">> = iolist_to_binary(re:replace("a
-b","(?m)^(b)","b\\1T&K\\1l",[global])),
-?line <<"a
-bsyUb">> = iolist_to_binary(re:replace("a
-b","((?m)^b)","&syU\\1",[])),
-?line <<"a
-bsyUb">> = iolist_to_binary(re:replace("a
-b","((?m)^b)","&syU\\1",[global])),
-?line <<"abh">> = iolist_to_binary(re:replace("a
-b","\\n((?m)^b)","\\1h",[])),
-?line <<"abh">> = iolist_to_binary(re:replace("a
-b","\\n((?m)^b)","\\1h",[global])),
-?line <<"a
-bEu">> = iolist_to_binary(re:replace("a
+c","((?m)^b$)","\\1s&rm\\1Ho&dxB&\\1",[global])),
+ <<"a
+DbLxnGxIyQMiaCJKYa">> = iolist_to_binary(re:replace("a
+b","(?m)^b","D&LxnGxIyQMiaCJKYa\\1",[])),
+ <<"a
+DbLxnGxIyQMiaCJKYa">> = iolist_to_binary(re:replace("a
+b","(?m)^b","D&LxnGxIyQMiaCJKYa\\1",[global])),
+ <<"a
+TbTgrAWgAV">> = iolist_to_binary(re:replace("a
+b","(?m)^(b)","T\\1TgrAWgAV",[])),
+ <<"a
+TbTgrAWgAV">> = iolist_to_binary(re:replace("a
+b","(?m)^(b)","T\\1TgrAWgAV",[global])),
+ <<"a
+KvbbbEUIbCFmvpdpI">> = iolist_to_binary(re:replace("a
+b","((?m)^b)","Kv\\1&&EUI&CFmvpdpI",[])),
+ <<"a
+KvbbbEUIbCFmvpdpI">> = iolist_to_binary(re:replace("a
+b","((?m)^b)","Kv\\1&&EUI&CFmvpdpI",[global])),
+ <<"amFIqrSY
+bYBDTRTmIb">> = iolist_to_binary(re:replace("a
+b","\\n((?m)^b)","mFIqrSY&YBDTRTmI\\1",[])),
+ <<"amFIqrSY
+bYBDTRTmIb">> = iolist_to_binary(re:replace("a
+b","\\n((?m)^b)","mFIqrSY&YBDTRTmI\\1",[global])),
+ <<"a
+bGyvT
+WAEIfT
+">> = iolist_to_binary(re:replace("a
b
-c","((?s).)c(?!.)","Eu",[])),
-?line <<"a
-bEu">> = iolist_to_binary(re:replace("a
+c","((?s).)c(?!.)","GyvT\\1WAEIfT\\1",[])),
+ <<"a
+bGyvT
+WAEIfT
+">> = iolist_to_binary(re:replace("a
b
-c","((?s).)c(?!.)","Eu",[global])),
-?line <<"a
-bvKqN
-cF
-r
-n">> = iolist_to_binary(re:replace("a
+c","((?s).)c(?!.)","GyvT\\1WAEIfT\\1",[global])),
+ <<"a
+bu
+
+ciY
+ONSatC
+q
+cgqg">> = iolist_to_binary(re:replace("a
b
-c","((?s).)c(?!.)","vKqN&F\\1r\\1n",[])),
-?line <<"a
-bvKqN
-cF
-r
-n">> = iolist_to_binary(re:replace("a
+c","((?s).)c(?!.)","u\\1&iY\\1ONSatC\\1q&gqg",[])),
+ <<"a
+bu
+
+ciY
+ONSatC
+q
+cgqg">> = iolist_to_binary(re:replace("a
b
-c","((?s).)c(?!.)","vKqN&F\\1r\\1n",[global])),
-?line <<"a
-ctWb
-Kb
-cinb
-FvJ">> = iolist_to_binary(re:replace("a
+c","((?s).)c(?!.)","u\\1&iY\\1ONSatC\\1q&gqg",[global])),
+ <<"a
+EaHhNb
+cc">> = iolist_to_binary(re:replace("a
b
-c","((?s)b.)c(?!.)","ctW\\1K&in\\1FvJ",[])),
-?line <<"a
-ctWb
-Kb
-cinb
-FvJ">> = iolist_to_binary(re:replace("a
+c","((?s)b.)c(?!.)","EaHhN&c",[])),
+ <<"a
+EaHhNb
+cc">> = iolist_to_binary(re:replace("a
b
-c","((?s)b.)c(?!.)","ctW\\1K&in\\1FvJ",[global])),
-?line <<"a
-Tb
-cnVEJvb
-Bb
-yG">> = iolist_to_binary(re:replace("a
+c","((?s)b.)c(?!.)","EaHhN&c",[global])),
+ <<"a
+Qyf">> = iolist_to_binary(re:replace("a
b
-c","((?s)b.)c(?!.)","T&nVEJv\\1B\\1yG",[])),
-?line <<"a
-Tb
-cnVEJvb
-Bb
-yG">> = iolist_to_binary(re:replace("a
+c","((?s)b.)c(?!.)","Qyf",[])),
+ <<"a
+Qyf">> = iolist_to_binary(re:replace("a
b
-c","((?s)b.)c(?!.)","T&nVEJv\\1B\\1yG",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","()^b","&\\1",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","()^b","&\\1",[global])),
-?line <<"a
+c","((?s)b.)c(?!.)","Qyf",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","()^b","uPupHDfyOM",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","()^b","uPupHDfyOM",[global])),
+ <<"a
b
c">> = iolist_to_binary(re:replace("a
b
-c","()^b","ikT\\1",[])),
-?line <<"a
+c","()^b","ie",[])),
+ <<"a
b
c">> = iolist_to_binary(re:replace("a
b
-c","()^b","ikT\\1",[global])),
-?line <<"a
+c","()^b","ie",[global])),
+ <<"a
b
c">> = iolist_to_binary(re:replace("a
b
-c","()^b","&i&frU",[])),
-?line <<"a
+c","()^b","XOjtYTE&",[])),
+ <<"a
b
c">> = iolist_to_binary(re:replace("a
b
-c","()^b","&i&frU",[global])),
-?line <<"a
-bDbfDWKbixbSbxsSN
+c","()^b","XOjtYTE&",[global])),
+ <<"a
+up
c">> = iolist_to_binary(re:replace("a
b
-c","((?m)^b)","bD\\1fDWK\\1ix\\1S\\1xsSN",[])),
-?line <<"a
-bDbfDWKbixbSbxsSN
+c","((?m)^b)","up",[])),
+ <<"a
+up
c">> = iolist_to_binary(re:replace("a
b
-c","((?m)^b)","bD\\1fDWK\\1ix\\1S\\1xsSN",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(x)?(?(1)a|b)","s&Rt",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(x)?(?(1)a|b)","s&Rt",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","S\\1EQcXTxxFE",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","S\\1EQcXTxxFE",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","JRHc\\1hvpt&&",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","JRHc\\1hvpt&&",[global])),
-?line <<"bQs">> = iolist_to_binary(re:replace("a","(x)?(?(1)b|a)","bQs",[])),
-?line <<"bQs">> = iolist_to_binary(re:replace("a","(x)?(?(1)b|a)","bQs",[global])),
-?line <<"PQeYprqargqfYkWQsJ">> = iolist_to_binary(re:replace("a","()?(?(1)b|a)","PQeY\\1prq&rgqfYk\\1WQsJ",[])),
-?line <<"PQeYprqargqfYkWQsJ">> = iolist_to_binary(re:replace("a","()?(?(1)b|a)","PQeY\\1prq&rgqfYk\\1WQsJ",[global])),
-?line <<"HafNdwOXAFq">> = iolist_to_binary(re:replace("a","()?(?(1)a|b)","H&\\1f\\1NdwOXA\\1Fq",[])),
-?line <<"HafNdwOXAFq">> = iolist_to_binary(re:replace("a","()?(?(1)a|b)","H&\\1f\\1NdwOXA\\1Fq",[global])),
-?line <<"m">> = iolist_to_binary(re:replace("(blah)","^(\\()?blah(?(1)(\\)))$","m",[])),
-?line <<"m">> = iolist_to_binary(re:replace("(blah)","^(\\()?blah(?(1)(\\)))$","m",[global])),
-?line <<"elEwHf">> = iolist_to_binary(re:replace("blah","^(\\()?blah(?(1)(\\)))$","elEwHf",[])),
-?line <<"elEwHf">> = iolist_to_binary(re:replace("blah","^(\\()?blah(?(1)(\\)))$","elEwHf",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\()?blah(?(1)(\\)))$","IGewW&v&qpGlghCJe\\1Y",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\()?blah(?(1)(\\)))$","IGewW&v&qpGlghCJe\\1Y",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(\\()?blah(?(1)(\\)))$","mxf",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","^(\\()?blah(?(1)(\\)))$","mxf",[global])),
-?line <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\()?blah(?(1)(\\)))$","LxtdV",[])),
-?line <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\()?blah(?(1)(\\)))$","LxtdV",[global])),
-?line <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\()?blah(?(1)(\\)))$","Ni\\1CkEtaxcXXYB\\1",[])),
-?line <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\()?blah(?(1)(\\)))$","Ni\\1CkEtaxcXXYB\\1",[global])),
-?line <<"UaAfN(ELb">> = iolist_to_binary(re:replace("(blah)","^(\\(+)?blah(?(1)(\\)))$","UaAfN\\1ELb",[])),
-?line <<"UaAfN(ELb">> = iolist_to_binary(re:replace("(blah)","^(\\(+)?blah(?(1)(\\)))$","UaAfN\\1ELb",[global])),
-?line <<"XrxQosMn">> = iolist_to_binary(re:replace("blah","^(\\(+)?blah(?(1)(\\)))$","Xrx\\1QosMn\\1",[])),
-?line <<"XrxQosMn">> = iolist_to_binary(re:replace("blah","^(\\(+)?blah(?(1)(\\)))$","Xrx\\1QosMn\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\(+)?blah(?(1)(\\)))$","QGGpmf",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\(+)?blah(?(1)(\\)))$","QGGpmf",[global])),
-?line <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\(+)?blah(?(1)(\\)))$","HDFROCUS",[])),
-?line <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\(+)?blah(?(1)(\\)))$","HDFROCUS",[global])),
-?line <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\(+)?blah(?(1)(\\)))$","AVrY",[])),
-?line <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\(+)?blah(?(1)(\\)))$","AVrY",[global])),
-?line <<"HlgBXckVbhp">> = iolist_to_binary(re:replace("a","(?(?!a)b|a)","HlgBXckV\\1bhp",[])),
-?line <<"HlgBXckVbhp">> = iolist_to_binary(re:replace("a","(?(?!a)b|a)","HlgBXckV\\1bhp",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=a)b|a)","&&PIwfc\\1cckXSEYaB",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=a)b|a)","&&PIwfc\\1cckXSEYaB",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","vKjGNVI&ySCYE",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","vKjGNVI&ySCYE",[global])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","lAvpym&eEJad\\1RMs\\1CLu",[])),
-?line <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","lAvpym&eEJad\\1RMs\\1CLu",[global])),
-?line <<"kHAy">> = iolist_to_binary(re:replace("a","(?(?=a)a|b)","kHAy",[])),
-?line <<"kHAy">> = iolist_to_binary(re:replace("a","(?(?=a)a|b)","kHAy",[global])),
-?line <<"amAyaheaaTPJaVdTAyU">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","mAyahe\\1\\1TPJ\\1VdTAyU",[])),
-?line <<"amAyaheaaTPJaVdTAyU">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","mAyahe\\1\\1TPJ\\1VdTAyU",[global])),
-?line <<"pEvYFTwEOhhryoVdG">> = iolist_to_binary(re:replace("one:","(\\w+:)+","pEvYFTwEOhhryoVdG",[])),
-?line <<"pEvYFTwEOhhryoVdG">> = iolist_to_binary(re:replace("one:","(\\w+:)+","pEvYFTwEOhhryoVdG",[global])),
-?line <<"aHho">> = iolist_to_binary(re:replace("a","$(?<=^(a))","Hho",[])),
-?line <<"aHho">> = iolist_to_binary(re:replace("a","$(?<=^(a))","Hho",[global])),
-?line <<"ajuOkagipUraRpaQiaabv">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","juOk\\1gipUr\\1Rp\\1Qi&v",[])),
-?line <<"ajuOkagipUraRpaQiaabv">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","juOk\\1gipUr\\1Rp\\1Qi&v",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?=(a+?))\\1ab","g\\1\\1\\1v",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?=(a+?))\\1ab","g\\1\\1\\1v",[global])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","dj\\1E&",[])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","dj\\1E&",[global])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","\\1UllJHtwTvaUdSmur",[])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","\\1UllJHtwTvaUdSmur",[global])),
-?line <<"juabcdvJAqaNxcabcdrDs">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","ju&vJAqaNxc&rDs\\1",[])),
-?line <<"juabcdvJAqaNxcabcdrDs">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","ju&vJAqaNxc&rDs\\1",[global])),
-?line <<"unOWEMklEbRjSO">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","unOWEMklEbRjSO",[])),
-?line <<"unOWEMklEbRjSO">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","unOWEMklEbRjSO",[global])),
-?line <<"nGqSeaexycfAmCxmxEaexycd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","nGqSe&fAmCxmxE&",[])),
-?line <<"nGqSeaexycfAmCxmxEaexycd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","nGqSe&fAmCxmxE&",[global])),
-?line <<"cwK">> = iolist_to_binary(re:replace("caab","(a*)b+","wK",[])),
-?line <<"cwK">> = iolist_to_binary(re:replace("caab","(a*)b+","wK",[global])),
-?line <<"VKunDTpabcd">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","VKunD\\1Tp&",[])),
-?line <<"VKunDTpabcd">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","VKunD\\1Tp&",[global])),
-?line <<"xy:z:::SXxy:z:::cMHreuKxy:z:::">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","\\1SX\\1cMHreuK\\1",[])),
-?line <<"xy:z:::SXxy:z:::cMHreuKxy:z:::">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","\\1SX\\1cMHreuK\\1",[global])),
-?line <<"*** FhLAjVJbYFailersvFailersQgrO">> = iolist_to_binary(re:replace("*** Failers","([\\w:]+::)?(\\w+)$","FhLAjVJbY&v&QgrO\\1\\1",[])),
-?line <<"*** FhLAjVJbYFailersvFailersQgrO">> = iolist_to_binary(re:replace("*** Failers","([\\w:]+::)?(\\w+)$","FhLAjVJbY&v&QgrO\\1\\1",[global])),
-?line <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","cwV&UpGIKN",[])),
-?line <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","cwV&UpGIKN",[global])),
-?line <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","S",[])),
-?line <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","S",[global])),
-?line <<"Fd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","F",[])),
-?line <<"Fd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","F",[global])),
-?line <<"jBpBHQR">> = iolist_to_binary(re:replace("aaab","(?>a+)b","jBpBHQR",[])),
-?line <<"jBpBHQR">> = iolist_to_binary(re:replace("aaab","(?>a+)b","jBpBHQR",[global])),
-?line <<"a:[J:[:[UyJMIwrPUq:[b]:">> = iolist_to_binary(re:replace("a:[b]:","([[:]+)","\\1J&\\1UyJMIwrPUq\\1",[])),
-?line <<"a:[J:[:[UyJMIwrPUq:[b]:J::UyJMIwrPUq:">> = iolist_to_binary(re:replace("a:[b]:","([[:]+)","\\1J&\\1UyJMIwrPUq\\1",[global])),
-?line <<"asI=[vo=[d=[Y=[nMpb]=">> = iolist_to_binary(re:replace("a=[b]=","([[=]+)","sI\\1vo\\1d\\1Y&nMp",[])),
-?line <<"asI=[vo=[d=[Y=[nMpb]sI=vo=d=Y=nMp">> = iolist_to_binary(re:replace("a=[b]=","([[=]+)","sI\\1vo\\1d\\1Y&nMp",[global])),
-?line <<"aChCrrVW.[ed.[eo.[h.[SYkIb].">> = iolist_to_binary(re:replace("a.[b].","([[.]+)","ChCrrVW\\1ed&eo\\1h\\1SYkI",[])),
-?line <<"aChCrrVW.[ed.[eo.[h.[SYkIb]ChCrrVW.ed.eo.h.SYkI">> = iolist_to_binary(re:replace("a.[b].","([[.]+)","ChCrrVW\\1ed&eo\\1h\\1SYkI",[global])),
-?line <<"BaaabaaabGBaaabJDn">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","B&\\1GB&JDn",[])),
-?line <<"BaaabaaabGBaaabJDn">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","B&\\1GB&JDn",[global])),
-?line <<"kaaabsaaXdPWUBV">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","k&saaXdPWUBV",[])),
-?line <<"kaaabsaaXdPWUBV">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","k&saaXdPWUBV",[global])),
-?line <<"((xpOHCg">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","\\1pOHCg",[])),
-?line <<"((xpOHCg">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","\\1pOHCg",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Z","swCtIfMPh&\\1Yr",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Z","swCtIfMPh&\\1Yr",[global])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","a\\Z","ysA\\1",[])),
-?line <<"aaab">> = iolist_to_binary(re:replace("aaab","a\\Z","ysA\\1",[global])),
-?line <<"a
+c","((?m)^b)","up",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(x)?(?(1)a|b)","Q&VpBvd&HCANVl",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(x)?(?(1)a|b)","Q&VpBvd&HCANVl",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","PJENMvR\\1&\\1nkq\\1j&P&",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","PJENMvR\\1&\\1nkq\\1j&P&",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","hStdV\\1o",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(x)?(?(1)a|b)","hStdV\\1o",[global])),
+ <<"bpiiYpjmbL">> = iolist_to_binary(re:replace("a","(x)?(?(1)b|a)","bpiiYpjmbL",[])),
+ <<"bpiiYpjmbL">> = iolist_to_binary(re:replace("a","(x)?(?(1)b|a)","bpiiYpjmbL",[global])),
+ <<"ldpcm">> = iolist_to_binary(re:replace("a","()?(?(1)b|a)","ldpc\\1m",[])),
+ <<"ldpcm">> = iolist_to_binary(re:replace("a","()?(?(1)b|a)","ldpc\\1m",[global])),
+ ok.
+run30() ->
+ <<"XVaoQoPYY">> = iolist_to_binary(re:replace("a","()?(?(1)a|b)","\\1X\\1V&oQoPYY",[])),
+ <<"XVaoQoPYY">> = iolist_to_binary(re:replace("a","()?(?(1)a|b)","\\1X\\1V&oQoPYY",[global])),
+ <<"NIfcW(blah)G">> = iolist_to_binary(re:replace("(blah)","^(\\()?blah(?(1)(\\)))$","NIfcW&G",[])),
+ <<"NIfcW(blah)G">> = iolist_to_binary(re:replace("(blah)","^(\\()?blah(?(1)(\\)))$","NIfcW&G",[global])),
+ <<"pnblahSJOoELoLblah">> = iolist_to_binary(re:replace("blah","^(\\()?blah(?(1)(\\)))$","pn&SJOoELoL&",[])),
+ <<"pnblahSJOoELoLblah">> = iolist_to_binary(re:replace("blah","^(\\()?blah(?(1)(\\)))$","pn&SJOoELoL&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\()?blah(?(1)(\\)))$","&qo&jitI",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\()?blah(?(1)(\\)))$","&qo&jitI",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(\\()?blah(?(1)(\\)))$","nvEsX\\1dtIq",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(\\()?blah(?(1)(\\)))$","nvEsX\\1dtIq",[global])),
+ <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\()?blah(?(1)(\\)))$","QkLbrxtPSiEFXY",[])),
+ <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\()?blah(?(1)(\\)))$","QkLbrxtPSiEFXY",[global])),
+ <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\()?blah(?(1)(\\)))$","lAP",[])),
+ <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\()?blah(?(1)(\\)))$","lAP",[global])),
+ <<"(LsJwkbg(bfkt(NulbXR">> = iolist_to_binary(re:replace("(blah)","^(\\(+)?blah(?(1)(\\)))$","\\1LsJwkbg\\1bfkt\\1NulbXR",[])),
+ <<"(LsJwkbg(bfkt(NulbXR">> = iolist_to_binary(re:replace("(blah)","^(\\(+)?blah(?(1)(\\)))$","\\1LsJwkbg\\1bfkt\\1NulbXR",[global])),
+ <<"d">> = iolist_to_binary(re:replace("blah","^(\\(+)?blah(?(1)(\\)))$","\\1d",[])),
+ <<"d">> = iolist_to_binary(re:replace("blah","^(\\(+)?blah(?(1)(\\)))$","\\1d",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\(+)?blah(?(1)(\\)))$","EMgTAXywJ\\1sx",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\(+)?blah(?(1)(\\)))$","EMgTAXywJ\\1sx",[global])),
+ <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\(+)?blah(?(1)(\\)))$","LdpE",[])),
+ <<"blah)">> = iolist_to_binary(re:replace("blah)","^(\\(+)?blah(?(1)(\\)))$","LdpE",[global])),
+ <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\(+)?blah(?(1)(\\)))$","x",[])),
+ <<"(blah">> = iolist_to_binary(re:replace("(blah","^(\\(+)?blah(?(1)(\\)))$","x",[global])),
+ <<"DTG">> = iolist_to_binary(re:replace("a","(?(?!a)b|a)","DT\\1G\\1",[])),
+ <<"DTG">> = iolist_to_binary(re:replace("a","(?(?!a)b|a)","DT\\1G\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=a)b|a)","d\\1lnf&YLYNM",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?(?=a)b|a)","d\\1lnf&YLYNM",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","\\1SGC\\1&hP&OBDNrG",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","\\1SGC\\1&hP&OBDNrG",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","\\1O",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(?(?=a)b|a)","\\1O",[global])),
+ <<"ToKaPapJTYo">> = iolist_to_binary(re:replace("a","(?(?=a)a|b)","\\1ToKaP&pJTYo",[])),
+ <<"ToKaPapJTYo">> = iolist_to_binary(re:replace("a","(?(?=a)a|b)","\\1ToKaP&pJTYo",[global])),
+ <<"aaYfA">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","\\1YfA",[])),
+ <<"aaYfA">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","\\1YfA",[global])),
+ <<"Oone:LVumwJGPxKone:">> = iolist_to_binary(re:replace("one:","(\\w+:)+","O&LVumwJGPxK\\1",[])),
+ <<"Oone:LVumwJGPxKone:">> = iolist_to_binary(re:replace("one:","(\\w+:)+","O&LVumwJGPxK\\1",[global])),
+ <<"axOGBQtmfLikDGlXSft">> = iolist_to_binary(re:replace("a","$(?<=^(a))","xOGBQtmfLikDGlXSft",[])),
+ <<"axOGBQtmfLikDGlXSft">> = iolist_to_binary(re:replace("a","$(?<=^(a))","xOGBQtmfLikDGlXSft",[global])),
+ <<"auQKtSaabLmmqtekWvRQaWJ">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","uQKtS&LmmqtekWvRQ\\1WJ",[])),
+ <<"auQKtSaabLmmqtekWvRQaWJ">> = iolist_to_binary(re:replace("aaab","(?=(a+?))(\\1ab)","uQKtS&LmmqtekWvRQ\\1WJ",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?=(a+?))\\1ab","&&USoct\\1R",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?=(a+?))\\1ab","&&USoct\\1R",[global])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","nNyoTw&TuS\\1oXos",[])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","nNyoTw&TuS\\1oXos",[global])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","MAutXFUx",[])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","^(?=(a+?))\\1ab","MAutXFUx",[global])),
+ <<"cXabcdPLyeVVq">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","c\\1X&\\1PLyeV\\1Vq",[])),
+ <<"cXabcdPLyeVVq">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","c\\1X&\\1PLyeV\\1Vq",[global])),
+ <<"jxy:z:::abcdYDxy:z:::Ixy:z:::abcdA">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","j&YD\\1I&A",[])),
+ <<"jxy:z:::abcdYDxy:z:::Ixy:z:::abcdA">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","j&YD\\1I&A",[global])),
+ <<"IbkqaaexycIVtbd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","Ibkqa&IVtb",[])),
+ <<"IbkqaaexycIVtbd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","Ibkqa&IVtb",[global])),
+ <<"cSLuXFBaavfbUaahyxuWowk">> = iolist_to_binary(re:replace("caab","(a*)b+","SLuXFB\\1vfbU\\1hyxuWowk",[])),
+ <<"cSLuXFBaavfbUaahyxuWowk">> = iolist_to_binary(re:replace("caab","(a*)b+","SLuXFB\\1vfbU\\1hyxuWowk",[global])),
+ <<"n">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","n",[])),
+ <<"n">> = iolist_to_binary(re:replace("abcd","([\\w:]+::)?(\\w+)$","n",[global])),
+ <<"xy:z:::abcdSfCyKxy:z:::abcdxy:z:::rOIxy:z:::qaXJV">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","&SfCyK&\\1rOI\\1qaXJV",[])),
+ <<"xy:z:::abcdSfCyKxy:z:::abcdxy:z:::rOIxy:z:::qaXJV">> = iolist_to_binary(re:replace("xy:z:::abcd","([\\w:]+::)?(\\w+)$","&SfCyK&\\1rOI\\1qaXJV",[global])),
+ <<"*** FDIubo">> = iolist_to_binary(re:replace("*** Failers","([\\w:]+::)?(\\w+)$","FDIubo",[])),
+ <<"*** FDIubo">> = iolist_to_binary(re:replace("*** Failers","([\\w:]+::)?(\\w+)$","FDIubo",[global])),
+ <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","\\1\\1FqKhObWFBLnW",[])),
+ <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","\\1\\1FqKhObWFBLnW",[global])),
+ <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","\\1\\1\\1JSX&vwHeWnyicJH",[])),
+ <<"abcd:">> = iolist_to_binary(re:replace("abcd:","([\\w:]+::)?(\\w+)$","\\1\\1\\1JSX&vwHeWnyicJH",[global])),
+ <<"bsuraexycHejcJAclcd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","bsur&HejcJA\\1l\\1",[])),
+ <<"bsuraexycHejcJAclcd">> = iolist_to_binary(re:replace("aexycd","^[^bcd]*(c+)","bsur&HejcJA\\1l\\1",[global])),
+ ok.
+run31() ->
+ <<"C">> = iolist_to_binary(re:replace("aaab","(?>a+)b","\\1C",[])),
+ <<"C">> = iolist_to_binary(re:replace("aaab","(?>a+)b","\\1C",[global])),
+ <<"aNO:[pGn:[:[Hb]:">> = iolist_to_binary(re:replace("a:[b]:","([[:]+)","NO\\1pGn&\\1H",[])),
+ <<"aNO:[pGn:[:[Hb]NO:pGn::H">> = iolist_to_binary(re:replace("a:[b]:","([[:]+)","NO\\1pGn&\\1H",[global])),
+ <<"aUSAUCBri=[uNyXKFxsgAib]=">> = iolist_to_binary(re:replace("a=[b]=","([[=]+)","USAUCBri&uNyXKFxsgAi",[])),
+ <<"aUSAUCBri=[uNyXKFxsgAib]USAUCBri=uNyXKFxsgAi">> = iolist_to_binary(re:replace("a=[b]=","([[=]+)","USAUCBri&uNyXKFxsgAi",[global])),
+ <<"alNmxCu.[.[iUB.[.[b].">> = iolist_to_binary(re:replace("a.[b].","([[.]+)","lNmxCu&&iUB&\\1",[])),
+ <<"alNmxCu.[.[iUB.[.[b]lNmxCu..iUB..">> = iolist_to_binary(re:replace("a.[b].","([[.]+)","lNmxCu&&iUB&\\1",[global])),
+ <<"gGaaab">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","gG&",[])),
+ <<"gGaaab">> = iolist_to_binary(re:replace("aaab","((?>a+)b)","gG&",[global])),
+ <<"XaaaSaaaFUaaabJnaaabMCaaabedCQAgh">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","X\\1S\\1FU&Jn&MC&edCQAgh",[])),
+ <<"XaaaSaaaFUaaabJnaaabMCaaabedCQAgh">> = iolist_to_binary(re:replace("aaab","(?>(a+))b","X\\1S\\1FU&Jn&MC&edCQAgh",[global])),
+ <<"((nxgvJb">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","n\\1gvJb",[])),
+ <<"((nxgvJb">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+","n\\1gvJb",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Z","dnHcIc\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a\\Z","dnHcIc\\1",[global])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","a\\Z","TMH",[])),
+ <<"aaab">> = iolist_to_binary(re:replace("aaab","a\\Z","TMH",[global])),
+ <<"a
b">> = iolist_to_binary(re:replace("a
-b","a\\Z","&ajAlqYVsnk",[])),
-?line <<"a
+b","a\\Z","Dt\\1LIek",[])),
+ <<"a
b">> = iolist_to_binary(re:replace("a
-b","a\\Z","&ajAlqYVsnk",[global])),
-?line <<"a
-lKbbBrmbgrOVeW">> = iolist_to_binary(re:replace("a
-b","b\\Z","l\\1Kb&Brm&gr\\1OVeW",[])),
-?line <<"a
-lKbbBrmbgrOVeW">> = iolist_to_binary(re:replace("a
-b","b\\Z","l\\1Kb&Brm&gr\\1OVeW",[global])),
-?line <<"a
-gnI">> = iolist_to_binary(re:replace("a
-b","b\\Z","g\\1nI",[])),
-?line <<"a
-gnI">> = iolist_to_binary(re:replace("a
-b","b\\Z","g\\1nI",[global])),
-?line <<"a
-bcbdqlbVGu">> = iolist_to_binary(re:replace("a
-b","b\\z","bc&dql&VGu\\1",[])),
-?line <<"a
-bcbdqlbVGu">> = iolist_to_binary(re:replace("a
-b","b\\z","bc&dql&VGu\\1",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","b\\z","e\\1yg",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","b\\z","e\\1yg",[global])),
-?line <<"ad">> = iolist_to_binary(re:replace("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&d",[])),
-?line <<"ad">> = iolist_to_binary(re:replace("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&d",[global])),
-?line <<"Aq">> = iolist_to_binary(re:replace("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","Aq",[])),
-?line <<"Aq">> = iolist_to_binary(re:replace("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","Aq",[global])),
-?line <<"ca-ba-bhLfWdPLa-boe">> = iolist_to_binary(re:replace("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","c&&hLfWdPL&oe",[])),
-?line <<"ca-ba-bhLfWdPLa-boe">> = iolist_to_binary(re:replace("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","c&&hLfWdPL&oe",[global])),
-?line <<"0-90-9YeqrpXMpBjK">> = iolist_to_binary(re:replace("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&\\1&YeqrpXMpBjK",[])),
-?line <<"0-90-9YeqrpXMpBjK">> = iolist_to_binary(re:replace("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&\\1&YeqrpXMpBjK",[global])),
-?line <<"fa.bPwKXcUgqjJm">> = iolist_to_binary(re:replace("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1f&PwKX\\1cUgqjJm",[])),
-?line <<"fa.bPwKXcUgqjJm">> = iolist_to_binary(re:replace("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1f&PwKX\\1cUgqjJm",[global])),
-?line <<"um5.6.7cFpS">> = iolist_to_binary(re:replace("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","um&cFpS\\1",[])),
-?line <<"um5.6.7cFpS">> = iolist_to_binary(re:replace("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","um&cFpS\\1",[global])),
-?line <<"xqtEI">> = iolist_to_binary(re:replace("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","xqtEI",[])),
-?line <<"xqtEI">> = iolist_to_binary(re:replace("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","xqtEI",[global])),
-?line <<"sga100.b200.300cdqqwa100.b200.300cqSJINVa100.b200.300cOyeI">> = iolist_to_binary(re:replace("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","sg&dqqw&qSJINV&OyeI",[])),
-?line <<"sga100.b200.300cdqqwa100.b200.300cqSJINVa100.b200.300cOyeI">> = iolist_to_binary(re:replace("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","sg&dqqw&qSJINV&OyeI",[global])),
-?line <<"rabe12-ab.1245NInvoPCLW12-ab.1245">> = iolist_to_binary(re:replace("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","rabe&NI\\1nvo\\1PCLW&",[])),
-?line <<"rabe12-ab.1245NInvoPCLW12-ab.1245">> = iolist_to_binary(re:replace("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","rabe&NI\\1nvo\\1PCLW&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","jhvaoUW\\1Wye\\1Qkrj",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","jhvaoUW\\1Wye\\1Qkrj",[global])),
-?line <<"">> = iolist_to_binary(re:replace("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","Q&L\\1qk&QWuvQ\\1o",[])),
-?line <<"">> = iolist_to_binary(re:replace("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","Q&L\\1qk&QWuvQ\\1o",[global])),
-?line <<".a">> = iolist_to_binary(re:replace(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","j&I&\\1&myXAKjyO&Mw",[])),
-?line <<".a">> = iolist_to_binary(re:replace(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","j&I&\\1&myXAKjyO&Mw",[global])),
-?line <<"-a">> = iolist_to_binary(re:replace("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","yyHkNcANJB",[])),
-?line <<"-a">> = iolist_to_binary(re:replace("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","yyHkNcANJB",[global])),
-?line <<"a-">> = iolist_to_binary(re:replace("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&\\1tGDVOXc&&\\1aF\\1",[])),
-?line <<"a-">> = iolist_to_binary(re:replace("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","&\\1tGDVOXc&&\\1aF\\1",[global])),
-?line <<"a.">> = iolist_to_binary(re:replace("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1\\1PTJg\\1\\1x",[])),
-?line <<"a.">> = iolist_to_binary(re:replace("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1\\1PTJg\\1\\1x",[global])),
-?line <<"a_b">> = iolist_to_binary(re:replace("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","w&",[])),
-?line <<"a_b">> = iolist_to_binary(re:replace("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","w&",[global])),
-?line <<"a.-">> = iolist_to_binary(re:replace("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","EYTDvAw&\\1hAJjtxh",[])),
-?line <<"a.-">> = iolist_to_binary(re:replace("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","EYTDvAw&\\1hAJjtxh",[global])),
-?line <<"a..">> = iolist_to_binary(re:replace("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","v&",[])),
-?line <<"a..">> = iolist_to_binary(re:replace("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","v&",[global])),
-?line <<"ab..bc">> = iolist_to_binary(re:replace("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","xi\\1TmyKwF&sc",[])),
-?line <<"ab..bc">> = iolist_to_binary(re:replace("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","xi\\1TmyKwF&sc",[global])),
-?line <<"the.quick.brown.fox-">> = iolist_to_binary(re:replace("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","qbJylT\\1",[])),
-?line <<"the.quick.brown.fox-">> = iolist_to_binary(re:replace("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","qbJylT\\1",[global])),
-?line <<"the.quick.brown.fox.">> = iolist_to_binary(re:replace("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","P&\\1dGVbFGwNJ",[])),
-?line <<"the.quick.brown.fox.">> = iolist_to_binary(re:replace("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","P&\\1dGVbFGwNJ",[global])),
-?line <<"the.quick.brown.fox_">> = iolist_to_binary(re:replace("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","V&e",[])),
-?line <<"the.quick.brown.fox_">> = iolist_to_binary(re:replace("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","V&e",[global])),
-?line <<"the.quick.brown.fox+">> = iolist_to_binary(re:replace("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1",[])),
-?line <<"the.quick.brown.fox+">> = iolist_to_binary(re:replace("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1",[global])),
-?line <<"alphabetabcdlJabcdabcdabcdWqGabcd">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd|wxyz))","&lJ\\1\\1\\1WqG\\1",[])),
-?line <<"alphabetabcdlJabcdabcdabcdWqGabcdlJabcdabcdabcdWqGabcd">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd|wxyz))","&lJ\\1\\1\\1WqG\\1",[global])),
-?line <<"Q">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd|wxyz))","Q",[])),
-?line <<"QQ">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd|wxyz))","Q",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>.*)(?<=(abcd|wxyz))","qTAxLBxW",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>.*)(?<=(abcd|wxyz))","qTAxLBxW",[global])),
-?line <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(re:replace("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))","HY\\1",[])),
-?line <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(re:replace("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))","HY\\1",[global])),
-?line <<"KxMJnKmSMrA">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","\\1KxMJnKmSMrA",[])),
-?line <<"KxMJnKmSMrA">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","\\1KxMJnKmSMrA",[global])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","TgCuE\\1Jnjdu",[])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","TgCuE\\1Jnjdu",[global])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword","HJa&S&CWDAtFOINp\\1a",[])),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword","HJa&S&CWDAtFOINp\\1a",[global])),
-?line <<"999GSL">> = iolist_to_binary(re:replace("999foo","(?<=\\d{3}(?!999))foo","GSL",[])),
-?line <<"999GSL">> = iolist_to_binary(re:replace("999foo","(?<=\\d{3}(?!999))foo","GSL",[global])),
-?line <<"123999Lxthrb">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999))foo","Lxthrb",[])),
-?line <<"123999Lxthrb">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999))foo","Lxthrb",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999))foo","K&j&h&\\1&&&nJDCN",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999))foo","K&j&h&\\1&&&nJDCN",[global])),
-?line <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999))foo","Y&X\\1Oe",[])),
-?line <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999))foo","Y&X\\1Oe",[global])),
-?line <<"999lwxfoov">> = iolist_to_binary(re:replace("999foo","(?<=(?!...999)\\d{3})foo","lwx&v",[])),
-?line <<"999lwxfoov">> = iolist_to_binary(re:replace("999foo","(?<=(?!...999)\\d{3})foo","lwx&v",[global])),
-?line <<"123999MgNvfoofooIVfoo">> = iolist_to_binary(re:replace("123999foo","(?<=(?!...999)\\d{3})foo","MgNv\\1&&IV&",[])),
-?line <<"123999MgNvfoofooIVfoo">> = iolist_to_binary(re:replace("123999foo","(?<=(?!...999)\\d{3})foo","MgNv\\1&&IV&",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?!...999)\\d{3})foo","Iv&\\1uOjnSDBEaj",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?!...999)\\d{3})foo","Iv&\\1uOjnSDBEaj",[global])),
-?line <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=(?!...999)\\d{3})foo","sanP",[])),
-?line <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=(?!...999)\\d{3})foo","sanP",[global])),
-?line <<"123abclcAPWfoouwtMfoofDv">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999)...)foo","lcAPW&uwtM&fDv",[])),
-?line <<"123abclcAPWfoouwtMfoofDv">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999)...)foo","lcAPW&uwtM&fDv",[global])),
-?line <<"123456nRFsuNto">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}(?!999)...)foo","nR\\1FsuNto",[])),
-?line <<"123456nRFsuNto">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}(?!999)...)foo","nR\\1FsuNto",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999)...)foo","P&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999)...)foo","P&",[global])),
-?line <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999)...)foo","BdprjW\\1hk\\1K\\1",[])),
-?line <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999)...)foo","BdprjW\\1hk\\1K\\1",[global])),
-?line <<"123abcCB">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}...)(?<!999)foo","CB",[])),
-?line <<"123abcCB">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}...)(?<!999)foo","CB",[global])),
-?line <<"123456g">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}...)(?<!999)foo","g",[])),
-?line <<"123456g">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}...)(?<!999)foo","g",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}...)(?<!999)foo","\\1R&",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}...)(?<!999)foo","\\1R&",[global])),
-?line <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}...)(?<!999)foo","bh&&&M",[])),
-?line <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}...)(?<!999)foo","bh&&&M",[global])),
-?line <<"E<a href=abcd<a href=abcdTofh xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+b","a\\Z","Dt\\1LIek",[global])),
+ <<"a
+ihO">> = iolist_to_binary(re:replace("a
+b","b\\Z","ihO",[])),
+ <<"a
+ihO">> = iolist_to_binary(re:replace("a
+b","b\\Z","ihO",[global])),
+ <<"a
+xaybR">> = iolist_to_binary(re:replace("a
+b","b\\Z","xaybR",[])),
+ <<"a
+xaybR">> = iolist_to_binary(re:replace("a
+b","b\\Z","xaybR",[global])),
+ <<"a
+b">> = iolist_to_binary(re:replace("a
+b","b\\z","&",[])),
+ <<"a
+b">> = iolist_to_binary(re:replace("a
+b","b\\z","&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","b\\z","L\\1\\1ffT&Q\\1\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","b\\z","L\\1\\1ffT&Q\\1\\1",[global])),
+ <<"lKtonNambJv">> = iolist_to_binary(re:replace("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","lKt\\1onN&mbJ\\1v",[])),
+ <<"lKtonNambJv">> = iolist_to_binary(re:replace("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","lKt\\1onN&mbJ\\1v",[global])),
+ <<"pabcYFSdblfLabcy">> = iolist_to_binary(re:replace("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","p&\\1YFSdbl\\1fL&y",[])),
+ <<"pabcYFSdblfLabcy">> = iolist_to_binary(re:replace("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","p&\\1YFSdbl\\1fL&y",[global])),
+ <<"Ta-bKyCljTYNdT">> = iolist_to_binary(re:replace("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","T&KyCljTYN\\1dT",[])),
+ <<"Ta-bKyCljTYNdT">> = iolist_to_binary(re:replace("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","T&KyCljTYN\\1dT",[global])),
+ <<"RHSJc">> = iolist_to_binary(re:replace("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","RHSJc",[])),
+ <<"RHSJc">> = iolist_to_binary(re:replace("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","RHSJc",[global])),
+ <<"dMwhrVYNNa.ba.bGa.br">> = iolist_to_binary(re:replace("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1dMwhrVYNN&&G&r",[])),
+ <<"dMwhrVYNNa.ba.bGa.br">> = iolist_to_binary(re:replace("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","\\1dMwhrVYNN&&G&r",[global])),
+ <<"kPaiiQUiPl">> = iolist_to_binary(re:replace("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","kPaiiQUiPl\\1",[])),
+ <<"kPaiiQUiPl">> = iolist_to_binary(re:replace("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","kPaiiQUiPl\\1",[global])),
+ <<"wvQrLEJUiDlAr">> = iolist_to_binary(re:replace("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","wvQ\\1rLEJUi\\1DlAr",[])),
+ <<"wvQrLEJUiDlAr">> = iolist_to_binary(re:replace("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","wvQ\\1rLEJUi\\1DlAr",[global])),
+ <<"iHa100.b200.300cGyVda100.b200.300cekCw">> = iolist_to_binary(re:replace("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","iH&GyVd&\\1ekCw",[])),
+ <<"iHa100.b200.300cGyVda100.b200.300cekCw">> = iolist_to_binary(re:replace("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","iH&GyVd&\\1ekCw",[global])),
+ <<"O">> = iolist_to_binary(re:replace("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","O",[])),
+ <<"O">> = iolist_to_binary(re:replace("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","O",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","HUtU\\1hwSyIT&Oh\\1&&y",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","HUtU\\1hwSyIT&Oh\\1&&y",[global])),
+ <<"">> = iolist_to_binary(re:replace("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","hNvuQF&Qs&",[])),
+ <<"">> = iolist_to_binary(re:replace("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","hNvuQF&Qs&",[global])),
+ <<".a">> = iolist_to_binary(re:replace(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","QqXr&DuJWM",[])),
+ <<".a">> = iolist_to_binary(re:replace(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","QqXr&DuJWM",[global])),
+ <<"-a">> = iolist_to_binary(re:replace("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","sk\\1IEt",[])),
+ <<"-a">> = iolist_to_binary(re:replace("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","sk\\1IEt",[global])),
+ <<"a-">> = iolist_to_binary(re:replace("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","q&NPicpE",[])),
+ <<"a-">> = iolist_to_binary(re:replace("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","q&NPicpE",[global])),
+ <<"a.">> = iolist_to_binary(re:replace("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","CQXy",[])),
+ <<"a.">> = iolist_to_binary(re:replace("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","CQXy",[global])),
+ <<"a_b">> = iolist_to_binary(re:replace("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","LYXq",[])),
+ <<"a_b">> = iolist_to_binary(re:replace("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","LYXq",[global])),
+ <<"a.-">> = iolist_to_binary(re:replace("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","MD\\1",[])),
+ <<"a.-">> = iolist_to_binary(re:replace("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","MD\\1",[global])),
+ <<"a..">> = iolist_to_binary(re:replace("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","L",[])),
+ <<"a..">> = iolist_to_binary(re:replace("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","L",[global])),
+ <<"ab..bc">> = iolist_to_binary(re:replace("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","BCKwcl\\1kueBcjj",[])),
+ <<"ab..bc">> = iolist_to_binary(re:replace("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","BCKwcl\\1kueBcjj",[global])),
+ <<"the.quick.brown.fox-">> = iolist_to_binary(re:replace("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","JT&&v&ADCCjyxv",[])),
+ <<"the.quick.brown.fox-">> = iolist_to_binary(re:replace("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","JT&&v&ADCCjyxv",[global])),
+ <<"the.quick.brown.fox.">> = iolist_to_binary(re:replace("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","ss",[])),
+ <<"the.quick.brown.fox.">> = iolist_to_binary(re:replace("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","ss",[global])),
+ <<"the.quick.brown.fox_">> = iolist_to_binary(re:replace("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","oN\\1QUG",[])),
+ <<"the.quick.brown.fox_">> = iolist_to_binary(re:replace("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","oN\\1QUG",[global])),
+ <<"the.quick.brown.fox+">> = iolist_to_binary(re:replace("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","dOn\\1&jl\\1b&",[])),
+ <<"the.quick.brown.fox+">> = iolist_to_binary(re:replace("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$","dOn\\1&jl\\1b&",[global])),
+ <<"fkIx">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd|wxyz))","fkIx",[])),
+ <<"fkIxfkIx">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd|wxyz))","fkIx",[global])),
+ <<"endingwxyzendingwxyzuyEXDtendingwxyzFCFendingwxyzgoLpALi">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd|wxyz))","&&uyEXDt&FCF&goLpALi",[])),
+ <<"endingwxyzendingwxyzuyEXDtendingwxyzFCFendingwxyzgoLpALiuyEXDtFCFgoLpALi">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd|wxyz))","&&uyEXDt&FCF&goLpALi",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>.*)(?<=(abcd|wxyz))","ElH",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?>.*)(?<=(abcd|wxyz))","ElH",[global])),
+ <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(re:replace("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))","&GVy",[])),
+ <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(re:replace("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))","&GVy",[global])),
+ <<"IpFbERword cat dog elephant mussel cow horse canary baboon snake shark otherwordvjword cat dog elephant mussel cow horse canary baboon snake shark otherwordaul">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","IpFbER&vj&aul",[])),
+ <<"IpFbERword cat dog elephant mussel cow horse canary baboon snake shark otherwordvjword cat dog elephant mussel cow horse canary baboon snake shark otherwordaul">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","IpFbER&vj&aul",[global])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","JMrCXcb\\1Q&T\\1ypBy",[])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword","JMrCXcb\\1Q&T\\1ypBy",[global])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword","TD&O",[])),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(re:replace("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword","TD&O",[global])),
+ <<"999fooKfooJ">> = iolist_to_binary(re:replace("999foo","(?<=\\d{3}(?!999))foo","&K&J",[])),
+ <<"999fooKfooJ">> = iolist_to_binary(re:replace("999foo","(?<=\\d{3}(?!999))foo","&K&J",[global])),
+ <<"123999ncsryomxOKBBikcY">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999))foo","\\1ncsry\\1omxOKBBikcY",[])),
+ <<"123999ncsryomxOKBBikcY">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999))foo","\\1ncsry\\1omxOKBBikcY",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999))foo","NMXv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999))foo","NMXv",[global])),
+ <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999))foo","B\\1\\1",[])),
+ <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999))foo","B\\1\\1",[global])),
+ <<"999faWvYAfooyphbfooC">> = iolist_to_binary(re:replace("999foo","(?<=(?!...999)\\d{3})foo","f\\1aW\\1vYA\\1&yphb&C",[])),
+ <<"999faWvYAfooyphbfooC">> = iolist_to_binary(re:replace("999foo","(?<=(?!...999)\\d{3})foo","f\\1aW\\1vYA\\1&yphb&C",[global])),
+ <<"123999D">> = iolist_to_binary(re:replace("123999foo","(?<=(?!...999)\\d{3})foo","D",[])),
+ <<"123999D">> = iolist_to_binary(re:replace("123999foo","(?<=(?!...999)\\d{3})foo","D",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?!...999)\\d{3})foo","xk\\1&NP",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=(?!...999)\\d{3})foo","xk\\1&NP",[global])),
+ <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=(?!...999)\\d{3})foo","Cpoo",[])),
+ <<"123abcfoo">> = iolist_to_binary(re:replace("123abcfoo","(?<=(?!...999)\\d{3})foo","Cpoo",[global])),
+ <<"123abcKgjBJrwxNA">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999)...)foo","KgjBJrwxNA",[])),
+ <<"123abcKgjBJrwxNA">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}(?!999)...)foo","KgjBJrwxNA",[global])),
+ <<"123456foomfooUfooUg">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}(?!999)...)foo","&m&U&Ug\\1",[])),
+ <<"123456foomfooUfooUg">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}(?!999)...)foo","&m&U&Ug\\1",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999)...)foo","Ccj\\1&vjH&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}(?!999)...)foo","Ccj\\1&vjH&",[global])),
+ <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999)...)foo","&MeuE&",[])),
+ <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}(?!999)...)foo","&MeuE&",[global])),
+ <<"123abcMdRfooqtYhLSo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}...)(?<!999)foo","Md\\1R&qtYhLSo",[])),
+ <<"123abcMdRfooqtYhLSo">> = iolist_to_binary(re:replace("123abcfoo","(?<=\\d{3}...)(?<!999)foo","Md\\1R&qtYhLSo",[global])),
+ <<"123456IfooHfooFgGWfoobS">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}...)(?<!999)foo","I&H\\1\\1&\\1FgGW&bS",[])),
+ <<"123456IfooHfooFgGWfoobS">> = iolist_to_binary(re:replace("123456foo","(?<=\\d{3}...)(?<!999)foo","I&H\\1\\1&\\1FgGW&bS",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}...)(?<!999)foo","x&KVkVB\\1mIkDO\\1",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?<=\\d{3}...)(?<!999)foo","x&KVkVB\\1mIkDO\\1",[global])),
+ <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}...)(?<!999)foo","imQyT&\\1",[])),
+ <<"123999foo">> = iolist_to_binary(re:replace("123999foo","(?<=\\d{3}...)(?<!999)foo","imQyT&\\1",[global])),
+ ok.
+run32() ->
+ <<"YXkVs xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","E&&Tofh",[caseless,
- dotall,
- extended])),
-?line <<"E<a href=abcd<a href=abcdTofh xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ # quote, otherwise match up to next space","YX\\1kVs",[caseless,
+ dotall,
+ extended])),
+ <<"YXkVs xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","E&&Tofh",[caseless,
- dotall,
- extended,
- global])),
-?line <<"<a href=\"abcd xyz pqr\"Y\"ylaR<a href=\"abcd xyz pqr\"bd cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ # quote, otherwise match up to next space","YX\\1kVs",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"j\"rurrrUhbILCWDO<a href=\"abcd xyz pqr\" cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","&Y\\1ylaR&bd",[caseless,
+ # quote, otherwise match up to next space","j\\1rurrrUhbILCWDO&",[caseless,
+ dotall,
+ extended])),
+ <<"j\"rurrrUhbILCWDO<a href=\"abcd xyz pqr\" cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ ([\\\"\\'])? # find single or double quote
+ (?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space","j\\1rurrrUhbILCWDO&",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"KHDcRniMHRJEBi cats">> = iolist_to_binary(re:replace("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ ([\\\"\\'])? # find single or double quote
+ (?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space","KHDcRniMHRJEBi",[caseless,
dotall,
extended])),
-?line <<"<a href=\"abcd xyz pqr\"Y\"ylaR<a href=\"abcd xyz pqr\"bd cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<"KHDcRniMHRJEBi cats">> = iolist_to_binary(re:replace("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","&Y\\1ylaR&bd",[caseless,
+ # quote, otherwise match up to next space","KHDcRniMHRJEBi",[caseless,
dotall,
extended,
global])),
-?line <<"CdADwL<a href='abcd xyz pqr'b'a'' cats">> = iolist_to_binary(re:replace("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
- ([\\\"\\'])? # find single or double quote
- (?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","CdADwL&b\\1a\\1\\1",[caseless,
- dotall,
- extended])),
-?line <<"CdADwL<a href='abcd xyz pqr'b'a'' cats">> = iolist_to_binary(re:replace("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
- ([\\\"\\'])? # find single or double quote
- (?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","CdADwL&b\\1a\\1\\1",[caseless,
- dotall,
- extended,
- global])),
-?line <<"IAfhYumoIpB xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
+ <<"DRkc<a href=abcd xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","\\1\\1IAfhYumoIpB\\1",[caseless,
- dotall,
- extended])),
-?line <<"IAfhYumoIpB xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
+ # quote, otherwise match up to next space","DRkc&\\1",[caseless,
+ dotall,
+ extended])),
+ <<"DRkc<a href=abcd xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","\\1\\1IAfhYumoIpB\\1",[caseless,
- dotall,
- extended,
- global])),
-?line <<"xrs<a href=\"abcd xyz pqr\"\"tWWeQ\"K<a href=\"abcd xyz pqr\"LjVA\"<a href=\"abcd xyz pqr\" cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
+ # quote, otherwise match up to next space","DRkc&\\1",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"M\"b\"cG cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","xrs&\\1tWWeQ\\1K&LjVA\\1&",[caseless,
- dotall,
- extended])),
-?line <<"xrs<a href=\"abcd xyz pqr\"\"tWWeQ\"K<a href=\"abcd xyz pqr\"LjVA\"<a href=\"abcd xyz pqr\" cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
+ # quote, otherwise match up to next space","M\\1b\\1cG",[caseless,
+ dotall,
+ extended])),
+ <<"M\"b\"cG cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","xrs&\\1tWWeQ\\1K&LjVA\\1&",[caseless,
- dotall,
- extended,
- global])),
-?line <<"QmbmFDyYfP cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
+ # quote, otherwise match up to next space","M\\1b\\1cG",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"<a href = 'abcd xyz pqr'K'RAApBAC'TjXhwL cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","QmbmFDyYfP",[caseless,
- dotall,
- extended])),
-?line <<"QmbmFDyYfP cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
+ # quote, otherwise match up to next space","&K\\1RAApBAC\\1TjXhwL",[caseless,
+ dotall,
+ extended])),
+ <<"<a href = 'abcd xyz pqr'K'RAApBAC'TjXhwL cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","QmbmFDyYfP",[caseless,
- dotall,
- extended,
- global])),
-?line <<"EokGsdLETK xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","&K\\1RAApBAC\\1TjXhwL",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"udPf<a href=abcd<a href=abcdVmHT xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","E\\1okGsdLETK",[caseless,
- dotall,
- extended])),
-?line <<"EokGsdLETK xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","\\1udPf&&VmHT\\1",[caseless,
+ dotall,
+ extended])),
+ <<"udPf<a href=abcd<a href=abcdVmHT xyz">> = iolist_to_binary(re:replace("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","E\\1okGsdLETK",[caseless,
- dotall,
- extended,
- global])),
-?line <<"gy cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","\\1udPf&&VmHT\\1",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"lO<a href=\"abcd xyz pqr\"C<a href=\"abcd xyz pqr\"dAuVMQlg cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","gy",[caseless,
- dotall,
- extended])),
-?line <<"gy cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","lO&C&dAuVMQlg",[caseless,
+ dotall,
+ extended])),
+ <<"lO<a href=\"abcd xyz pqr\"C<a href=\"abcd xyz pqr\"dAuVMQlg cats">> = iolist_to_binary(re:replace("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","gy",[caseless,
- dotall,
- extended,
- global])),
-?line <<"i cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","lO&C&dAuVMQlg",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"kNUDBNNpwgKs'j cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","i",[caseless,
- dotall,
- extended])),
-?line <<"i cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ # quote, otherwise match up to next space","kNUDBNNpwgKs\\1j",[caseless,
+ dotall,
+ extended])),
+ <<"kNUDBNNpwgKs'j cats">> = iolist_to_binary(re:replace("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space","i",[caseless,
- dotall,
- extended,
- global])),
-?line <<"EZADCywAYhLBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((Z)+|A)*","E&DCywAYhL",[])),
-?line <<"EZADCywAYhLEDCywAYhLBEDCywAYhLCEDCywAYhLDEDCywAYhLEEDCywAYhLFEDCywAYhLGEDCywAYhL">> = iolist_to_binary(re:replace("ZABCDEFG","((Z)+|A)*","E&DCywAYhL",[global])),
-?line <<"nyATkLcbFTgYpAunmMXBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","(Z()|A)*","ny\\1TkLcbFTgYp\\1unmMX",[])),
-?line <<"nyATkLcbFTgYpAunmMXnyTkLcbFTgYpunmMXBnyTkLcbFTgYpunmMXCnyTkLcbFTgYpunmMXDnyTkLcbFTgYpunmMXEnyTkLcbFTgYpunmMXFnyTkLcbFTgYpunmMXGnyTkLcbFTgYpunmMX">> = iolist_to_binary(re:replace("ZABCDEFG","(Z()|A)*","ny\\1TkLcbFTgYp\\1unmMX",[global])),
-?line <<"YiJonwVPQAqACHABCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","(Z(())|A)*","YiJonwVPQ\\1q\\1CH\\1",[])),
-?line <<"YiJonwVPQAqACHAYiJonwVPQqCHBYiJonwVPQqCHCYiJonwVPQqCHDYiJonwVPQqCHEYiJonwVPQqCHFYiJonwVPQqCHGYiJonwVPQqCH">> = iolist_to_binary(re:replace("ZABCDEFG","(Z(())|A)*","YiJonwVPQ\\1q\\1CH\\1",[global])),
-?line <<"bZAEAXcNeNwfBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((?>Z)+|A)*","b&E\\1XcNeNwf",[])),
-?line <<"bZAEAXcNeNwfbEXcNeNwfBbEXcNeNwfCbEXcNeNwfDbEXcNeNwfEbEXcNeNwfFbEXcNeNwfGbEXcNeNwf">> = iolist_to_binary(re:replace("ZABCDEFG","((?>Z)+|A)*","b&E\\1XcNeNwf",[global])),
-?line <<"UeIRbNvamSaniIQYPZABCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((?>)+|A)*","UeIRbNv&amSaniIQYP",[])),
-?line <<"UeIRbNvamSaniIQYPZUeIRbNvamSaniIQYPUeIRbNvAamSaniIQYPUeIRbNvamSaniIQYPBUeIRbNvamSaniIQYPCUeIRbNvamSaniIQYPDUeIRbNvamSaniIQYPEUeIRbNvamSaniIQYPFUeIRbNvamSaniIQYPGUeIRbNvamSaniIQYP">> = iolist_to_binary(re:replace("ZABCDEFG","((?>)+|A)*","UeIRbNv&amSaniIQYP",[global])),
-?line <<"AnyTcLbbab">> = iolist_to_binary(re:replace("abbab","a*","AnyTcL",[])),
-?line <<"AnyTcLAnyTcLbAnyTcLbAnyTcLAnyTcLbAnyTcL">> = iolist_to_binary(re:replace("abbab","a*","AnyTcL",[global])),
-?line <<"EfoRdQVibcde">> = iolist_to_binary(re:replace("abcde","^[a-\\d]","EfoRdQVi",[])),
-?line <<"EfoRdQVibcde">> = iolist_to_binary(re:replace("abcde","^[a-\\d]","EfoRdQVi",[global])),
-?line <<"cCcyoUi-GT--drpjthings">> = iolist_to_binary(re:replace("-things","^[a-\\d]","cCcy\\1o\\1Ui&GT&&drpj",[])),
-?line <<"cCcyoUi-GT--drpjthings">> = iolist_to_binary(re:replace("-things","^[a-\\d]","cCcy\\1o\\1Ui&GT&&drpj",[global])),
-?line <<"eddigit">> = iolist_to_binary(re:replace("0digit","^[a-\\d]","ed",[])),
-?line <<"eddigit">> = iolist_to_binary(re:replace("0digit","^[a-\\d]","ed",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-\\d]","\\1wCjwyJQB&COO&&Vyp\\1M",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-\\d]","\\1wCjwyJQB&COO&&Vyp\\1M",[global])),
-?line <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[a-\\d]","EofOaus",[])),
-?line <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[a-\\d]","EofOaus",[global])),
-?line <<"kpGVaTiadJVwJbcde">> = iolist_to_binary(re:replace("abcde","^[\\d-a]","kpG\\1V&Ti&dJVwJ",[])),
-?line <<"kpGVaTiadJVwJbcde">> = iolist_to_binary(re:replace("abcde","^[\\d-a]","kpG\\1V&Ti&dJVwJ",[global])),
-?line <<"Chuymdqthings">> = iolist_to_binary(re:replace("-things","^[\\d-a]","Chu\\1ymdq",[])),
-?line <<"Chuymdqthings">> = iolist_to_binary(re:replace("-things","^[\\d-a]","Chu\\1ymdq",[global])),
-?line <<"TpWPVwVtHJWAdigit">> = iolist_to_binary(re:replace("0digit","^[\\d-a]","TpWPVwV\\1tHJWA",[])),
-?line <<"TpWPVwVtHJWAdigit">> = iolist_to_binary(re:replace("0digit","^[\\d-a]","TpWPVwV\\1tHJWA",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[\\d-a]","WYnxbwypPj",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[\\d-a]","WYnxbwypPj",[global])),
-?line <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[\\d-a]","bnUSwwhPJ",[])),
-?line <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[\\d-a]","bnUSwwhPJ",[global])),
-?line <<">mnfN
- FbS
- ghxwsq<">> = iolist_to_binary(re:replace(">
- <","[[:space:]]+","mnfN&FbS\\1&ghxwsq",[])),
-?line <<">mnfN
- FbS
- ghxwsq<">> = iolist_to_binary(re:replace(">
- <","[[:space:]]+","mnfN&FbS\\1&ghxwsq",[global])),
-?line <<">R
- <">> = iolist_to_binary(re:replace(">
- <","[[:blank:]]+","R",[])),
-?line <<">R
- <">> = iolist_to_binary(re:replace(">
- <","[[:blank:]]+","R",[global])),
-?line <<">PjX
- <">> = iolist_to_binary(re:replace(">
- <","[\\s]+","PjX&",[])),
-?line <<">PjX
+ # quote, otherwise match up to next space","kNUDBNNpwgKs\\1j",[caseless,
+ dotall,
+ extended,
+ global])),
+ <<"SBBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((Z)+|A)*","SB",[])),
+ <<"SBSBBSBCSBDSBESBFSBGSB">> = iolist_to_binary(re:replace("ZABCDEFG","((Z)+|A)*","SB",[global])),
+ <<"TGWhfNtEZAQBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","(Z()|A)*","TGWhfNtE&Q",[])),
+ <<"TGWhfNtEZAQTGWhfNtEQBTGWhfNtEQCTGWhfNtEQDTGWhfNtEQETGWhfNtEQFTGWhfNtEQGTGWhfNtEQ">> = iolist_to_binary(re:replace("ZABCDEFG","(Z()|A)*","TGWhfNtE&Q",[global])),
+ <<"QATmcAAZABCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","(Z(())|A)*","Q\\1Tmc\\1\\1&",[])),
+ <<"QATmcAAZAQTmcBQTmcCQTmcDQTmcEQTmcFQTmcGQTmc">> = iolist_to_binary(re:replace("ZABCDEFG","(Z(())|A)*","Q\\1Tmc\\1\\1&",[global])),
+ <<"LUBCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((?>Z)+|A)*","LU",[])),
+ <<"LULUBLUCLUDLUELUFLUGLU">> = iolist_to_binary(re:replace("ZABCDEFG","((?>Z)+|A)*","LU",[global])),
+ <<"YLMbVmHKJJdvuAVZABCDEFG">> = iolist_to_binary(re:replace("ZABCDEFG","((?>)+|A)*","YL&MbVmHKJJdv\\1&uAV",[])),
+ <<"YLMbVmHKJJdvuAVZYLMbVmHKJJdvuAVYLAMbVmHKJJdvAuAVYLMbVmHKJJdvuAVBYLMbVmHKJJdvuAVCYLMbVmHKJJdvuAVDYLMbVmHKJJdvuAVEYLMbVmHKJJdvuAVFYLMbVmHKJJdvuAVGYLMbVmHKJJdvuAV">> = iolist_to_binary(re:replace("ZABCDEFG","((?>)+|A)*","YL&MbVmHKJJdv\\1&uAV",[global])),
+ <<"qewqabbab">> = iolist_to_binary(re:replace("abbab","a*","qewq&",[])),
+ <<"qewqaqewqbqewqbqewqaqewqbqewq">> = iolist_to_binary(re:replace("abbab","a*","qewq&",[global])),
+ <<"Nabcde">> = iolist_to_binary(re:replace("abcde","^[a-\\d]","N&",[])),
+ <<"Nabcde">> = iolist_to_binary(re:replace("abcde","^[a-\\d]","N&",[global])),
+ <<"sg-aOs-tithings">> = iolist_to_binary(re:replace("-things","^[a-\\d]","sg&a\\1Os&ti",[])),
+ <<"sg-aOs-tithings">> = iolist_to_binary(re:replace("-things","^[a-\\d]","sg&a\\1Os&ti",[global])),
+ <<"DtMdigit">> = iolist_to_binary(re:replace("0digit","^[a-\\d]","DtM",[])),
+ <<"DtMdigit">> = iolist_to_binary(re:replace("0digit","^[a-\\d]","DtM",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-\\d]","dJiX",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[a-\\d]","dJiX",[global])),
+ <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[a-\\d]","AGDlhSs&Gk&u\\1L",[])),
+ <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[a-\\d]","AGDlhSs&Gk&u\\1L",[global])),
+ <<"crLvRhrTbcde">> = iolist_to_binary(re:replace("abcde","^[\\d-a]","crLvRhrT",[])),
+ <<"crLvRhrTbcde">> = iolist_to_binary(re:replace("abcde","^[\\d-a]","crLvRhrT",[global])),
+ <<"XaUtelthings">> = iolist_to_binary(re:replace("-things","^[\\d-a]","XaUtel",[])),
+ <<"XaUtelthings">> = iolist_to_binary(re:replace("-things","^[\\d-a]","XaUtel",[global])),
+ <<"0digit">> = iolist_to_binary(re:replace("0digit","^[\\d-a]","&",[])),
+ <<"0digit">> = iolist_to_binary(re:replace("0digit","^[\\d-a]","&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[\\d-a]","E&gL&oOMM&E",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^[\\d-a]","E&gL&oOMM&E",[global])),
+ <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[\\d-a]","\\1kIKJw&Id",[])),
+ <<"bcdef">> = iolist_to_binary(re:replace("bcdef","^[\\d-a]","\\1kIKJw&Id",[global])),
+ <<">Qi<">> = iolist_to_binary(re:replace(">
+ <","[[:space:]]+","\\1Qi",[])),
+ <<">Qi<">> = iolist_to_binary(re:replace(">
+ <","[[:space:]]+","\\1Qi",[global])),
+ <<">VYrL AlFvYN
<">> = iolist_to_binary(re:replace(">
- <","[\\s]+","PjX&",[global])),
-?line <<">EO
-
- g
-
- DMTFYSd
+ <","[[:blank:]]+","VYrL&AlFvYN",[])),
+ <<">VYrL AlFvYN
<">> = iolist_to_binary(re:replace(">
- <","\\s+","EO&&g&&DMT\\1FY\\1Sd&",[])),
-?line <<">EO
-
- g
-
- DMTFYSd
- <">> = iolist_to_binary(re:replace(">
- <","\\s+","EO&&g&&DMT\\1FY\\1Sd&",[global])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","a b","qihC&Vy",[extended])),
-?line <<"ab">> = iolist_to_binary(re:replace("ab","a b","qihC&Vy",[extended,
- global])),
-?line <<"a
-dxmjb">> = iolist_to_binary(re:replace("a
-xb","(?!\\A)x","dxmj",[multiline])),
-?line <<"a
-dxmjb">> = iolist_to_binary(re:replace("a
-xb","(?!\\A)x","dxmj",[multiline,global])),
-?line <<"a
+ <","[[:blank:]]+","VYrL&AlFvYN",[global])),
+ <<">HJRfpOlI <">> = iolist_to_binary(re:replace(">
+ <","[\\s]+","HJRfpOlI",[])),
+ <<">HJRfpOlI <">> = iolist_to_binary(re:replace(">
+ <","[\\s]+","HJRfpOlI",[global])),
+ <<">
+ t
+ FtuuC <">> = iolist_to_binary(re:replace(">
+ <","\\s+","&\\1t&FtuuC",[])),
+ <<">
+ t
+ FtuuC <">> = iolist_to_binary(re:replace(">
+ <","\\s+","&\\1t&FtuuC",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","a b","&lH\\1E&J\\1&L&&Rx",[extended])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","a b","&lH\\1E&J\\1&L&&Rx",[extended,
+ global])),
+ <<"a
+xWxKmxNIb">> = iolist_to_binary(re:replace("a
+xb","(?!\\A)x","&W&Km&NI",[multiline])),
+ <<"a
+xWxKmxNIb">> = iolist_to_binary(re:replace("a
+xb","(?!\\A)x","&W&Km&NI",[multiline,global])),
+ <<"a
xb">> = iolist_to_binary(re:replace("a
-xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline])),
-?line <<"a
+xb","(?!^)x","jRLFoYEov&K",[multiline])),
+ <<"a
xb">> = iolist_to_binary(re:replace("a
-xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
- global])),
-?line <<"MYdx">> = iolist_to_binary(re:replace("abcabcabc","abc\\Qabc\\Eabc","MYdx",[])),
-?line <<"MYdx">> = iolist_to_binary(re:replace("abcabcabc","abc\\Qabc\\Eabc","MYdx",[global])),
-?line <<"abc(*+|abc">> = iolist_to_binary(re:replace("abc(*+|abc","abc\\Q(*+|\\Eabc","&",[])),
-?line <<"abc(*+|abc">> = iolist_to_binary(re:replace("abc(*+|abc","abc\\Q(*+|\\Eabc","&",[global])),
-?line <<"abc abcabcbMSm">> = iolist_to_binary(re:replace("abc abcabc"," abc\\Q abc\\Eabc","&bM\\1Sm",[extended])),
-?line <<"abc abcabcbMSm">> = iolist_to_binary(re:replace("abc abcabc"," abc\\Q abc\\Eabc","&bM\\1Sm",[extended,
- global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," abc\\Q abc\\Eabc","X\\1\\1&",[extended])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," abc\\Q abc\\Eabc","X\\1\\1&",[extended,
- global])),
-?line <<"abcabcabc">> = iolist_to_binary(re:replace("abcabcabc"," abc\\Q abc\\Eabc","qbvwJpk",[extended])),
-?line <<"abcabcabc">> = iolist_to_binary(re:replace("abcabcabc"," abc\\Q abc\\Eabc","qbvwJpk",[extended,
- global])),
-?line <<"UwGaabc#not comment
- literal">> = iolist_to_binary(re:replace("abc#not comment
+xb","(?!^)x","jRLFoYEov&K",[multiline,global])),
+ <<"JVoGaFQQ">> = iolist_to_binary(re:replace("abcabcabc","abc\\Qabc\\Eabc","JVoGaFQQ",[])),
+ <<"JVoGaFQQ">> = iolist_to_binary(re:replace("abcabcabc","abc\\Qabc\\Eabc","JVoGaFQQ",[global])),
+ <<"DSeVu">> = iolist_to_binary(re:replace("abc(*+|abc","abc\\Q(*+|\\Eabc","DSeVu",[])),
+ <<"DSeVu">> = iolist_to_binary(re:replace("abc(*+|abc","abc\\Q(*+|\\Eabc","DSeVu",[global])),
+ ok.
+run33() ->
+ <<"Li">> = iolist_to_binary(re:replace("abc abcabc"," abc\\Q abc\\Eabc","Li",[extended])),
+ <<"Li">> = iolist_to_binary(re:replace("abc abcabc"," abc\\Q abc\\Eabc","Li",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," abc\\Q abc\\Eabc","njPc\\1Go\\1Mf&&HbU\\1&",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers"," abc\\Q abc\\Eabc","njPc\\1Go\\1Mf&&HbU\\1&",[extended,
+ global])),
+ <<"abcabcabc">> = iolist_to_binary(re:replace("abcabcabc"," abc\\Q abc\\Eabc","&xP&fFtGb&mNes\\1GI\\1",[extended])),
+ <<"abcabcabc">> = iolist_to_binary(re:replace("abcabcabc"," abc\\Q abc\\Eabc","&xP&fFtGb&mNes\\1GI\\1",[extended,
+ global])),
+ <<"gKHkeQRUc">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal\\E","UwGa&",[extended])),
-?line <<"UwGaabc#not comment
- literal">> = iolist_to_binary(re:replace("abc#not comment
+ literal\\E","gKHkeQRUc",[extended])),
+ <<"gKHkeQRUc">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal\\E","UwGa&",[extended,global])),
-?line <<"abc#not comment
- literalSCWsV">> = iolist_to_binary(re:replace("abc#not comment
+ literal\\E","gKHkeQRUc",[extended,global])),
+ <<"gmgWrrxBneXj">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal","&\\1SCWsV",[extended])),
-?line <<"abc#not comment
- literalSCWsV">> = iolist_to_binary(re:replace("abc#not comment
+ literal","gmgWrrxBneXj",[extended])),
+ <<"gmgWrrxBneXj">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal","&\\1SCWsV",[extended,global])),
-?line <<"T">> = iolist_to_binary(re:replace("abc#not comment
+ literal","gmgWrrxBneXj",[extended,global])),
+ <<"JetiXL">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment
- ","T",[extended])),
-?line <<"T">> = iolist_to_binary(re:replace("abc#not comment
+ ","J\\1etiX\\1L",[extended])),
+ <<"JetiXL">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment
- ","T",[extended,global])),
-?line <<"abc#not comment
- literalDFMabc#not comment
- literaliRRuHyq">> = iolist_to_binary(re:replace("abc#not comment
+ ","J\\1etiX\\1L",[extended,global])),
+ <<"nxvXs">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal\\E #more comment","&DFM&\\1\\1iR\\1RuHy\\1q",[extended])),
-?line <<"abc#not comment
- literalDFMabc#not comment
- literaliRRuHyq">> = iolist_to_binary(re:replace("abc#not comment
+ literal\\E #more comment","\\1nxvXs",[extended])),
+ <<"nxvXs">> = iolist_to_binary(re:replace("abc#not comment
literal","abc#comment
\\Q#not comment
- literal\\E #more comment","&DFM&\\1\\1iR\\1RuHy\\1q",[extended,
- global])),
-?line <<"DkSX">> = iolist_to_binary(re:replace("abc\\$xyz","\\Qabc\\$xyz\\E","DkSX",[])),
-?line <<"DkSX">> = iolist_to_binary(re:replace("abc\\$xyz","\\Qabc\\$xyz\\E","DkSX",[global])),
-?line <<"EOaWuCabc$xyzeabc$xyzDrvLP">> = iolist_to_binary(re:replace("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E","EOaWuC&e&DrvLP",[])),
-?line <<"EOaWuCabc$xyzeabc$xyzDrvLP">> = iolist_to_binary(re:replace("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E","EOaWuC&e&DrvLP",[global])),
-?line <<"PUGabcRXWXakpQfboabcw">> = iolist_to_binary(re:replace("abc","\\Gabc","P\\1UG&R\\1XWXakpQfbo&w",[])),
-?line <<"PUGabcRXWXakpQfboabcw">> = iolist_to_binary(re:replace("abc","\\Gabc","P\\1UG&R\\1XWXakpQfbo&w",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Gabc","sssS\\1AVaXM&Is&c",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Gabc","sssS\\1AVaXM&Is&c",[global])),
-?line <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","\\Gabc","r",[])),
-?line <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","\\Gabc","r",[global])),
-?line <<"tScabc2xyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","\\Gabc.","tSc",[])),
-?line <<"tSctScxyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","\\Gabc.","tSc",[global])),
-?line <<"HcJuuopHFgbabc2xyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","abc.","HcJuuopHFgb",[])),
-?line <<"HcJuuopHFgbHcJuuopHFgbxyzHcJuuopHFgb">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","abc.","HcJuuopHFgb",[global])),
-?line <<"XMSabcdaDVucwrGDirY">> = iolist_to_binary(re:replace("XabcdY","a(?x: b c )d","MS&aDVucwrGDir",[])),
-?line <<"XMSabcdaDVucwrGDirY">> = iolist_to_binary(re:replace("XabcdY","a(?x: b c )d","MS&aDVucwrGDir",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?x: b c )d","paXT\\1iPxaNPv",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?x: b c )d","paXT\\1iPxaNPv",[global])),
-?line <<"Xa b c d Y">> = iolist_to_binary(re:replace("Xa b c d Y","a(?x: b c )d","FRHntJTvUtt&w\\1Mhj",[])),
-?line <<"Xa b c d Y">> = iolist_to_binary(re:replace("Xa b c d Y","a(?x: b c )d","FRHntJTvUtt&w\\1Mhj",[global])),
-?line <<"XabcY">> = iolist_to_binary(re:replace("XabcY","((?x)x y z | a b c)","\\1",[])),
-?line <<"XabcY">> = iolist_to_binary(re:replace("XabcY","((?x)x y z | a b c)","\\1",[global])),
-?line <<"AxyznocmxyzxyzxyzfWlBxyzPEB">> = iolist_to_binary(re:replace("AxyzB","((?x)x y z | a b c)","&nocm\\1&&fWlB&PE",[])),
-?line <<"AxyznocmxyzxyzxyzfWlBxyzPEB">> = iolist_to_binary(re:replace("AxyzB","((?x)x y z | a b c)","&nocm\\1&&fWlB&PE",[global])),
-?line <<"XqabCRwY">> = iolist_to_binary(re:replace("XabCY","(?i)AB(?-i)C","q&Rw",[])),
-?line <<"XqabCRwY">> = iolist_to_binary(re:replace("XabCY","(?i)AB(?-i)C","q&Rw",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i)AB(?-i)C","b&Qx",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i)AB(?-i)C","b&Qx",[global])),
-?line <<"XabcY">> = iolist_to_binary(re:replace("XabcY","(?i)AB(?-i)C","VjuCQPxKgGiffeGDHugc",[])),
-?line <<"XabcY">> = iolist_to_binary(re:replace("XabcY","(?i)AB(?-i)C","VjuCQPxKgGiffeGDHugc",[global])),
-?line <<"abCEApGxObicabCaHXabCib">> = iolist_to_binary(re:replace("abCE","((?i)AB(?-i)C|D)E","&ApGxObic\\1aHX\\1ib",[])),
-?line <<"abCEApGxObicabCaHXabCib">> = iolist_to_binary(re:replace("abCE","((?i)AB(?-i)C|D)E","&ApGxObic\\1aHX\\1ib",[global])),
-?line <<"uLoeOQwJDEyFGS">> = iolist_to_binary(re:replace("DE","((?i)AB(?-i)C|D)E","uLoeOQwJ&yFGS",[])),
-?line <<"uLoeOQwJDEyFGS">> = iolist_to_binary(re:replace("DE","((?i)AB(?-i)C|D)E","uLoeOQwJ&yFGS",[global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)AB(?-i)C|D)E","LUuqtYqP\\1RCe",[])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)AB(?-i)C|D)E","LUuqtYqP\\1RCe",[global])),
-?line <<"abcE">> = iolist_to_binary(re:replace("abcE","((?i)AB(?-i)C|D)E","\\1sXBxu\\1",[])),
-?line <<"abcE">> = iolist_to_binary(re:replace("abcE","((?i)AB(?-i)C|D)E","\\1sXBxu\\1",[global])),
-?line <<"abCe">> = iolist_to_binary(re:replace("abCe","((?i)AB(?-i)C|D)E","Y\\1Rgo\\1Ican\\1",[])),
-?line <<"abCe">> = iolist_to_binary(re:replace("abCe","((?i)AB(?-i)C|D)E","Y\\1Rgo\\1Ican\\1",[global])),
-?line <<"dE">> = iolist_to_binary(re:replace("dE","((?i)AB(?-i)C|D)E","XvslPbYV&&PG",[])),
-?line <<"dE">> = iolist_to_binary(re:replace("dE","((?i)AB(?-i)C|D)E","XvslPbYV&&PG",[global])),
-?line <<"De">> = iolist_to_binary(re:replace("De","((?i)AB(?-i)C|D)E","Ry\\1rxj\\1\\1dTXtld&\\1D&&",[])),
-?line <<"De">> = iolist_to_binary(re:replace("De","((?i)AB(?-i)C|D)E","Ry\\1rxj\\1\\1dTXtld&\\1D&&",[global])),
-?line <<"vyabc">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","vy\\1",[])),
-?line <<"vyabc">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","vy\\1",[global])),
-?line <<"aLB">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","LB",[])),
-?line <<"aLB">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","LB",[global])),
-?line <<"HXjXabc123abcabc123abcabc123abcfUay">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","HXjX&&&fUay",[dotall])),
-?line <<"HXjXabc123abcabc123abcabc123abcfUay">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","HXjX&&&fUay",[dotall,
- global])),
-?line <<"aCRabcRSbc123bcbcokUUyuMbc123bcm">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","CRa\\1RS&\\1okUUyuM&m",[dotall])),
-?line <<"aCRabcRSbc123bcbcokUUyuMbc123bcm">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","CRa\\1RS&\\1okUUyuM&m",[dotall,
- global])),
-?line <<"RvRabcJIYH">> = iolist_to_binary(re:replace("abc123abc","((.*))\\d+\\1","RvR\\1JIYH",[])),
-?line <<"RvRabcJIYH">> = iolist_to_binary(re:replace("abc123abc","((.*))\\d+\\1","RvR\\1JIYH",[global])),
-?line <<"aRbc123bcmb">> = iolist_to_binary(re:replace("abc123bc","((.*))\\d+\\1","R&mb",[])),
-?line <<"aRbc123bcmb">> = iolist_to_binary(re:replace("abc123bc","((.*))\\d+\\1","R&mb",[global])),
-?line <<"ET">> = iolist_to_binary(re:replace("a123::a123","^(?!:) # colon disallowed at start
+ literal\\E #more comment","\\1nxvXs",[extended,global])),
+ <<"NHOqEFFabc\\$xyzj">> = iolist_to_binary(re:replace("abc\\$xyz","\\Qabc\\$xyz\\E","NHOqEFF&j",[])),
+ <<"NHOqEFFabc\\$xyzj">> = iolist_to_binary(re:replace("abc\\$xyz","\\Qabc\\$xyz\\E","NHOqEFF&j",[global])),
+ <<"DjW">> = iolist_to_binary(re:replace("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E","DjW",[])),
+ <<"DjW">> = iolist_to_binary(re:replace("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E","DjW",[global])),
+ <<"WAnMpAVfX">> = iolist_to_binary(re:replace("abc","\\Gabc","W\\1AnMpAV\\1f\\1X",[])),
+ <<"WAnMpAVfX">> = iolist_to_binary(re:replace("abc","\\Gabc","W\\1AnMpAV\\1f\\1X",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Gabc","rW&&AVMSknoPI&&w",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\Gabc","rW&&AVMSknoPI&&w",[global])),
+ <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","\\Gabc","DFp\\1NhU&",[])),
+ <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","\\Gabc","DFp\\1NhU&",[global])),
+ <<"abc1ifEabc1hgAabc2xyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","\\Gabc.","\\1&ifE&hgA",[])),
+ <<"abc1ifEabc1hgAabc2ifEabc2hgAxyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","\\Gabc.","\\1&ifE&hgA",[global])),
+ <<"QCUPbyyjrEabc2xyzabc3">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","abc.","QC\\1\\1UPbyyj\\1rE",[])),
+ <<"QCUPbyyjrEQCUPbyyjrExyzQCUPbyyjrE">> = iolist_to_binary(re:replace("abc1abc2xyzabc3","abc.","QC\\1\\1UPbyyj\\1rE",[global])),
+ <<"XJIJfY">> = iolist_to_binary(re:replace("XabcdY","a(?x: b c )d","JIJf",[])),
+ <<"XJIJfY">> = iolist_to_binary(re:replace("XabcdY","a(?x: b c )d","JIJf",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?x: b c )d","i&J&NwHJGVUFHoXlLB",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","a(?x: b c )d","i&J&NwHJGVUFHoXlLB",[global])),
+ <<"Xa b c d Y">> = iolist_to_binary(re:replace("Xa b c d Y","a(?x: b c )d","y&kXPnw&sN&&BHba",[])),
+ <<"Xa b c d Y">> = iolist_to_binary(re:replace("Xa b c d Y","a(?x: b c )d","y&kXPnw&sN&&BHba",[global])),
+ <<"XUQRabcabcUrY">> = iolist_to_binary(re:replace("XabcY","((?x)x y z | a b c)","UQR&\\1Ur",[])),
+ <<"XUQRabcabcUrY">> = iolist_to_binary(re:replace("XabcY","((?x)x y z | a b c)","UQR&\\1Ur",[global])),
+ <<"AgqfObHxyztxyzMXSCB">> = iolist_to_binary(re:replace("AxyzB","((?x)x y z | a b c)","gqfObH\\1t&MXSC",[])),
+ <<"AgqfObHxyztxyzMXSCB">> = iolist_to_binary(re:replace("AxyzB","((?x)x y z | a b c)","gqfObH\\1t&MXSC",[global])),
+ <<"XAAvVabCAjGTsabCPBY">> = iolist_to_binary(re:replace("XabCY","(?i)AB(?-i)C","AAvV&AjGTs&\\1PB",[])),
+ <<"XAAvVabCAjGTsabCPBY">> = iolist_to_binary(re:replace("XabCY","(?i)AB(?-i)C","AAvV&AjGTs&\\1PB",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i)AB(?-i)C","UmCr&Vrv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(?i)AB(?-i)C","UmCr&Vrv",[global])),
+ <<"XabcY">> = iolist_to_binary(re:replace("XabcY","(?i)AB(?-i)C","qxteX",[])),
+ <<"XabcY">> = iolist_to_binary(re:replace("XabcY","(?i)AB(?-i)C","qxteX",[global])),
+ <<"ai">> = iolist_to_binary(re:replace("abCE","((?i)AB(?-i)C|D)E","ai",[])),
+ <<"ai">> = iolist_to_binary(re:replace("abCE","((?i)AB(?-i)C|D)E","ai",[global])),
+ <<"qRLDKtDtqTDE">> = iolist_to_binary(re:replace("DE","((?i)AB(?-i)C|D)E","qRL\\1Kt\\1tqT&",[])),
+ <<"qRLDKtDtqTDE">> = iolist_to_binary(re:replace("DE","((?i)AB(?-i)C|D)E","qRL\\1Kt\\1tqT&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)AB(?-i)C|D)E","tJGWHuAQJuV\\1ohL",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((?i)AB(?-i)C|D)E","tJGWHuAQJuV\\1ohL",[global])),
+ <<"abcE">> = iolist_to_binary(re:replace("abcE","((?i)AB(?-i)C|D)E","SL",[])),
+ <<"abcE">> = iolist_to_binary(re:replace("abcE","((?i)AB(?-i)C|D)E","SL",[global])),
+ <<"abCe">> = iolist_to_binary(re:replace("abCe","((?i)AB(?-i)C|D)E","INyHgcjBTk",[])),
+ <<"abCe">> = iolist_to_binary(re:replace("abCe","((?i)AB(?-i)C|D)E","INyHgcjBTk",[global])),
+ <<"dE">> = iolist_to_binary(re:replace("dE","((?i)AB(?-i)C|D)E","x\\1",[])),
+ <<"dE">> = iolist_to_binary(re:replace("dE","((?i)AB(?-i)C|D)E","x\\1",[global])),
+ <<"De">> = iolist_to_binary(re:replace("De","((?i)AB(?-i)C|D)E","pgmpT&v&DORqu&",[])),
+ <<"De">> = iolist_to_binary(re:replace("De","((?i)AB(?-i)C|D)E","pgmpT&v&DORqu&",[global])),
+ <<"abcpy">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","\\1py",[])),
+ <<"abcpy">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","\\1py",[global])),
+ <<"aeCYXPUlXbcjXWbcK">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","eCYXPUlX\\1jXW\\1K",[])),
+ <<"aeCYXPUlXbcjXWbcK">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","eCYXPUlX\\1jXW\\1K",[global])),
+ <<"hxyLlgCxwsHwpLlIYe">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","hxyLlgCxwsHwpLlIYe",[dotall])),
+ <<"hxyLlgCxwsHwpLlIYe">> = iolist_to_binary(re:replace("abc123abc","(.*)\\d+\\1","hxyLlgCxwsHwpLlIYe",[dotall,
+ global])),
+ <<"aubcbcBbcJobcFXYl">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","u\\1\\1B\\1Jo\\1FXYl",[dotall])),
+ <<"aubcbcBbcJobcFXYl">> = iolist_to_binary(re:replace("abc123bc","(.*)\\d+\\1","u\\1\\1B\\1Jo\\1FXYl",[dotall,
+ global])),
+ <<"BSBMIqq">> = iolist_to_binary(re:replace("abc123abc","((.*))\\d+\\1","BSBMIqq",[])),
+ <<"BSBMIqq">> = iolist_to_binary(re:replace("abc123abc","((.*))\\d+\\1","BSBMIqq",[global])),
+ <<"aWbc123bcnWkNJItYcGAvsDNYbW">> = iolist_to_binary(re:replace("abc123bc","((.*))\\d+\\1","W&nWkNJItYcGAvsDNYbW",[])),
+ <<"aWbc123bcnWkNJItYcGAvsDNYbW">> = iolist_to_binary(re:replace("abc123bc","((.*))\\d+\\1","W&nWkNJItYcGAvsDNYbW",[global])),
+ <<"kDSa123::a123Tp">> = iolist_to_binary(re:replace("a123::a123","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18060,8 +18141,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","ET",[extended,caseless])),
-?line <<"ET">> = iolist_to_binary(re:replace("a123::a123","^(?!:) # colon disallowed at start
+ ","kDS&T\\1p",[extended,caseless])),
+ <<"kDSa123::a123Tp">> = iolist_to_binary(re:replace("a123::a123","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18069,8 +18150,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","ET",[extended,caseless,global])),
-?line <<"nYalhKtcGgINbn">> = iolist_to_binary(re:replace("a123:b342::abcd","^(?!:) # colon disallowed at start
+ ","kDS&T\\1p",[extended,caseless,global])),
+ <<"r">> = iolist_to_binary(re:replace("a123:b342::abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18078,8 +18159,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","nY\\1a\\1lhKtcGgINbn",[extended,caseless])),
-?line <<"nYalhKtcGgINbn">> = iolist_to_binary(re:replace("a123:b342::abcd","^(?!:) # colon disallowed at start
+ ","r",[extended,caseless])),
+ <<"r">> = iolist_to_binary(re:replace("a123:b342::abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18087,8 +18168,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","nY\\1a\\1lhKtcGgINbn",[extended,caseless,global])),
-?line <<"xeKa123:b342::324e:abcdRvTn">> = iolist_to_binary(re:replace("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
+ ","r",[extended,caseless,global])),
+ <<"ia123:b342::324e:abcd">> = iolist_to_binary(re:replace("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18096,8 +18177,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xeK&RvTn",[extended,caseless])),
-?line <<"xeKa123:b342::324e:abcdRvTn">> = iolist_to_binary(re:replace("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
+ ","i&",[extended,caseless])),
+ <<"ia123:b342::324e:abcd">> = iolist_to_binary(re:replace("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18105,8 +18186,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xeK&RvTn",[extended,caseless,global])),
-?line <<"JHrQJuCtAvAt">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
+ ","i&",[extended,caseless,global])),
+ <<"eYuTiBYPtHa123:ddde:b342::324e:abcdJHIw">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18114,8 +18195,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","JHrQJuCtAvAt",[extended,caseless])),
-?line <<"JHrQJuCtAvAt">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
+ ","eYuTiBYPtH&J\\1HIw",[extended,caseless])),
+ <<"eYuTiBYPtHa123:ddde:b342::324e:abcdJHIw">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18123,8 +18204,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","JHrQJuCtAvAt",[extended,caseless,global])),
-?line <<"IphCja">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","eYuTiBYPtH&J\\1HIw",[extended,caseless,global])),
+ <<"">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18132,8 +18213,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","Ip\\1hCj\\1a",[extended,caseless])),
-?line <<"IphCja">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","\\1",[extended,caseless])),
+ <<"">> = iolist_to_binary(re:replace("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18141,8 +18222,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","Ip\\1hCj\\1a",[extended,caseless,global])),
-?line <<"xAGmJctxEa123:ddde:9999:b342::324e:dcba:abcdjhClw">> = iolist_to_binary(re:replace("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","\\1",[extended,caseless,global])),
+ <<"a123:ddde:9999:b342::324e:dcba:abcdoLIelBa123:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18150,8 +18231,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xAGmJctxE&jhClw",[extended,caseless])),
-?line <<"xAGmJctxEa123:ddde:9999:b342::324e:dcba:abcdjhClw">> = iolist_to_binary(re:replace("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","&oLIelB&",[extended,caseless])),
+ <<"a123:ddde:9999:b342::324e:dcba:abcdoLIelBa123:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18159,8 +18240,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xAGmJctxE&jhClw",[extended,caseless,global])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?!:) # colon disallowed at start
+ ","&oLIelB&",[extended,caseless,global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18168,8 +18249,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&jc&",[extended,caseless])),
-?line <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?!:) # colon disallowed at start
+ ","&f\\1I",[extended,caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18177,8 +18258,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&jc&",[extended,caseless,global])),
-?line <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ ","&f\\1I",[extended,caseless,global])),
+ <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18186,8 +18267,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xjuUU",[extended,caseless])),
-?line <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ ","yUIYbm&\\1qdJb",[extended,caseless])),
+ <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18195,8 +18276,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","xjuUU",[extended,caseless,global])),
-?line <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","yUIYbm&\\1qdJb",[extended,caseless,global])),
+ <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18204,8 +18285,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&\\1gJElxfvxu\\1ly",[extended,caseless])),
-?line <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","Xhy\\1&M",[extended,caseless])),
+ <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18213,8 +18294,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&\\1gJElxfvxu\\1ly",[extended,caseless,global])),
-?line <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","Xhy\\1&M",[extended,caseless,global])),
+ <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18222,8 +18303,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","r",[extended,caseless])),
-?line <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ ","sw",[extended,caseless])),
+ <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(re:replace("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18231,8 +18312,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","r",[extended,caseless,global])),
-?line <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ ","sw",[extended,caseless,global])),
+ <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18240,8 +18321,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","\\1",[extended,caseless])),
-?line <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ ","pCUAeIjhQXp\\1K",[extended,caseless])),
+ <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(re:replace("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18249,8 +18330,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","\\1",[extended,caseless,global])),
-?line <<"::1">> = iolist_to_binary(re:replace("::1","^(?!:) # colon disallowed at start
+ ","pCUAeIjhQXp\\1K",[extended,caseless,global])),
+ <<"::1">> = iolist_to_binary(re:replace("::1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18258,8 +18339,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","ymau\\1\\1NVl\\1WdO\\1",[extended,caseless])),
-?line <<"::1">> = iolist_to_binary(re:replace("::1","^(?!:) # colon disallowed at start
+ ","rN\\1Dti&",[extended,caseless])),
+ <<"::1">> = iolist_to_binary(re:replace("::1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18267,8 +18348,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","ymau\\1\\1NVl\\1WdO\\1",[extended,caseless,global])),
-?line <<"abcd:fee0:123::">> = iolist_to_binary(re:replace("abcd:fee0:123::","^(?!:) # colon disallowed at start
+ ","rN\\1Dti&",[extended,caseless,global])),
+ <<"abcd:fee0:123::">> = iolist_to_binary(re:replace("abcd:fee0:123::","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18276,8 +18357,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","KUuIBK&Px&",[extended,caseless])),
-?line <<"abcd:fee0:123::">> = iolist_to_binary(re:replace("abcd:fee0:123::","^(?!:) # colon disallowed at start
+ ","eRNkqHK\\1RXNGFgu",[extended,caseless])),
+ <<"abcd:fee0:123::">> = iolist_to_binary(re:replace("abcd:fee0:123::","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18285,8 +18366,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","KUuIBK&Px&",[extended,caseless,global])),
-?line <<":1">> = iolist_to_binary(re:replace(":1","^(?!:) # colon disallowed at start
+ ","eRNkqHK\\1RXNGFgu",[extended,caseless,global])),
+ <<":1">> = iolist_to_binary(re:replace(":1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18294,8 +18375,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&BwNOmaJ\\1M&\\1TUCr",[extended,caseless])),
-?line <<":1">> = iolist_to_binary(re:replace(":1","^(?!:) # colon disallowed at start
+ ","mbx",[extended,caseless])),
+ <<":1">> = iolist_to_binary(re:replace(":1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18303,8 +18384,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","&BwNOmaJ\\1M&\\1TUCr",[extended,caseless,global])),
-?line <<"1:">> = iolist_to_binary(re:replace("1:","^(?!:) # colon disallowed at start
+ ","mbx",[extended,caseless,global])),
+ <<"1:">> = iolist_to_binary(re:replace("1:","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18312,8 +18393,8 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","J\\1e\\1",[extended,caseless])),
-?line <<"1:">> = iolist_to_binary(re:replace("1:","^(?!:) # colon disallowed at start
+ ","WJB",[extended,caseless])),
+ <<"1:">> = iolist_to_binary(re:replace("1:","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -18321,278 +18402,1557 @@ xb","(?!^)x","\\1tysI\\1v\\1BVwx\\1FOWG\\1&C",[multiline,
){1,7} # end item; 1-7 of them required
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
- ","J\\1e\\1",[extended,caseless,global])),
-?line <<"XpmPL">> = iolist_to_binary(re:replace("z","[z\\Qa-d]\\E]","\\1X\\1pmPL",[])),
-?line <<"XpmPL">> = iolist_to_binary(re:replace("z","[z\\Qa-d]\\E]","\\1X\\1pmPL",[global])),
-?line <<"WrMTefTPBbaVhaDwab">> = iolist_to_binary(re:replace("a","[z\\Qa-d]\\E]","WrMTefTPBb&V\\1\\1h&Dwab",[])),
-?line <<"WrMTefTPBbaVhaDwab">> = iolist_to_binary(re:replace("a","[z\\Qa-d]\\E]","WrMTefTPBb&V\\1\\1h&Dwab",[global])),
-?line <<"uFU-rQ-">> = iolist_to_binary(re:replace("-","[z\\Qa-d]\\E]","uFU\\1\\1&rQ&",[])),
-?line <<"uFU-rQ-">> = iolist_to_binary(re:replace("-","[z\\Qa-d]\\E]","uFU\\1\\1&rQ&",[global])),
-?line <<"QliOKMpfH">> = iolist_to_binary(re:replace("d","[z\\Qa-d]\\E]","QliOKMpfH",[])),
-?line <<"QliOKMpfH">> = iolist_to_binary(re:replace("d","[z\\Qa-d]\\E]","QliOKMpfH",[global])),
-?line <<"t]KdBE">> = iolist_to_binary(re:replace("]","[z\\Qa-d]\\E]","t\\1&KdBE",[])),
-?line <<"t]KdBE">> = iolist_to_binary(re:replace("]","[z\\Qa-d]\\E]","t\\1&KdBE",[global])),
-?line <<"*** FNavaiaOJGqPkBilers">> = iolist_to_binary(re:replace("*** Failers","[z\\Qa-d]\\E]","N&v&i\\1&OJGqPkB",[])),
-?line <<"*** FNavaiaOJGqPkBilers">> = iolist_to_binary(re:replace("*** Failers","[z\\Qa-d]\\E]","N&v&i\\1&OJGqPkB",[global])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[z\\Qa-d]\\E]","R&ba",[])),
-?line <<"b">> = iolist_to_binary(re:replace("b","[z\\Qa-d]\\E]","R&ba",[global])),
-?line <<"sjzSKziFAAJiTVWC">> = iolist_to_binary(re:replace("z","[\\z\\C]","sj&SK&iFAAJiTVWC",[])),
-?line <<"sjzSKziFAAJiTVWC">> = iolist_to_binary(re:replace("z","[\\z\\C]","sj&SK&iFAAJiTVWC",[global])),
-?line <<"DDSbIgCmsBKCTmEuitn">> = iolist_to_binary(re:replace("C","[\\z\\C]","D\\1DSbIg&msBK&TmEuitn",[])),
-?line <<"DDSbIgCmsBKCTmEuitn">> = iolist_to_binary(re:replace("C","[\\z\\C]","D\\1DSbIg&msBK&TmEuitn",[global])),
-?line <<"cY">> = iolist_to_binary(re:replace("M","\\M","cY\\1",[])),
-?line <<"cY">> = iolist_to_binary(re:replace("M","\\M","cY\\1",[global])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b","yWOTIFhIX\\1H",[])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b","yWOTIFhIX\\1H",[global])),
-?line <<"NREGularsRREGularWEYrVRr">> = iolist_to_binary(re:replace("REGular","(?i)reg(?:ul(?:[aä]|ae)r|ex)","N&\\1sR&WEYrVRr",[])),
-?line <<"NREGularsRREGularWEYrVRr">> = iolist_to_binary(re:replace("REGular","(?i)reg(?:ul(?:[aä]|ae)r|ex)","N&\\1sR&WEYrVRr",[global])),
-?line <<"G">> = iolist_to_binary(re:replace("regulaer","(?i)reg(?:ul(?:[aä]|ae)r|ex)","G",[])),
-?line <<"G">> = iolist_to_binary(re:replace("regulaer","(?i)reg(?:ul(?:[aä]|ae)r|ex)","G",[global])),
-?line <<"PSsXtwlmy">> = iolist_to_binary(re:replace("Regex","(?i)reg(?:ul(?:[aä]|ae)r|ex)","PSsXtwlmy",[])),
-?line <<"PSsXtwlmy">> = iolist_to_binary(re:replace("Regex","(?i)reg(?:ul(?:[aä]|ae)r|ex)","PSsXtwlmy",[global])),
-?line <<"regulärmiYTi">> = iolist_to_binary(re:replace("regulär","(?i)reg(?:ul(?:[aä]|ae)r|ex)","&miYTi\\1\\1",[])),
-?line <<"regulärmiYTi">> = iolist_to_binary(re:replace("regulär","(?i)reg(?:ul(?:[aä]|ae)r|ex)","&miYTi\\1\\1",[global])),
-?line <<"WÅæåäàrxhÅæåäàyUoaLOIegmSA">> = iolist_to_binary(re:replace("Åæåäà","Åæåä[à-ÿÀ-ß]+","W&rxh&yUoaL\\1OIegmS\\1A",[])),
-?line <<"WÅæåäàrxhÅæåäàyUoaLOIegmSA">> = iolist_to_binary(re:replace("Åæåäà","Åæåä[à-ÿÀ-ß]+","W&rxh&yUoaL\\1OIegmS\\1A",[global])),
-?line <<"FÅæåäÿgnWPyHehÅæåäÿtXTQ">> = iolist_to_binary(re:replace("Åæåäÿ","Åæåä[à-ÿÀ-ß]+","F&gnWPyHe\\1h&tXTQ",[])),
-?line <<"FÅæåäÿgnWPyHehÅæåäÿtXTQ">> = iolist_to_binary(re:replace("Åæåäÿ","Åæåä[à-ÿÀ-ß]+","F&gnWPyHe\\1h&tXTQ",[global])),
-?line <<"sHerHnAhAdx">> = iolist_to_binary(re:replace("ÅæåäÀ","Åæåä[à-ÿÀ-ß]+","sHer\\1HnA\\1h\\1Adx",[])),
-?line <<"sHerHnAhAdx">> = iolist_to_binary(re:replace("ÅæåäÀ","Åæåä[à-ÿÀ-ß]+","sHer\\1HnA\\1h\\1Adx",[global])),
-?line <<"trobAQoUÅæåäßn">> = iolist_to_binary(re:replace("Åæåäß","Åæåä[à-ÿÀ-ß]+","tr\\1obAQoU&n",[])),
-?line <<"trobAQoUÅæåäßn">> = iolist_to_binary(re:replace("Åæåäß","Åæåä[à-ÿÀ-ß]+","tr\\1obAQoU&n",[global])),
-?line <<"„XAZSd">> = iolist_to_binary(re:replace("„XAZXB","(?<=Z)X.","Sd",[])),
-?line <<"„XAZSd">> = iolist_to_binary(re:replace("„XAZXB","(?<=Z)X.","Sd",[global])),
-?line <<"A">> = iolist_to_binary(re:replace("ab cd defg","ab cd (?x) de fg","\\1A\\1",[])),
-?line <<"A">> = iolist_to_binary(re:replace("ab cd defg","ab cd (?x) de fg","\\1A\\1",[global])),
-?line <<"fab cddefgLdtKCtPab cddefgxvVUHDah">> = iolist_to_binary(re:replace("ab cddefg","ab cd(?x) de fg","f&LdtKC\\1\\1tP&xvVUHDah",[])),
-?line <<"fab cddefgLdtKCtPab cddefgxvVUHDah">> = iolist_to_binary(re:replace("ab cddefg","ab cd(?x) de fg","f&LdtKC\\1\\1tP&xvVUHDah",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","ab cd(?x) de fg","BkO\\1dl&WNuvnGhG&Qkl",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","ab cd(?x) de fg","BkO\\1dl&WNuvnGhG&Qkl",[global])),
-?line <<"abcddefg">> = iolist_to_binary(re:replace("abcddefg","ab cd(?x) de fg","SCJx&",[])),
-?line <<"abcddefg">> = iolist_to_binary(re:replace("abcddefg","ab cd(?x) de fg","SCJx&",[global])),
-?line <<"foobarLvX">> = iolist_to_binary(re:replace("foobarX","(?<![^f]oo)(bar)","&Lv",[])),
-?line <<"foobarLvX">> = iolist_to_binary(re:replace("foobarX","(?<![^f]oo)(bar)","&Lv",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f]oo)(bar)","dRgI\\1vl\\1\\1eC\\1RFQ",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f]oo)(bar)","dRgI\\1vl\\1\\1eC\\1RFQ",[global])),
-?line <<"boobarX">> = iolist_to_binary(re:replace("boobarX","(?<![^f]oo)(bar)","p\\1CU&Q",[])),
-?line <<"boobarX">> = iolist_to_binary(re:replace("boobarX","(?<![^f]oo)(bar)","p\\1CU&Q",[global])),
-?line <<"offmnXHaaIXuXOo">> = iolist_to_binary(re:replace("offX","(?<![^f])X","m\\1n&HaaI\\1&u&Oo",[])),
-?line <<"offmnXHaaIXuXOo">> = iolist_to_binary(re:replace("offX","(?<![^f])X","m\\1n&HaaI\\1&u&Oo",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f])X","jhEwy&w\\1mfw\\1H&VBqnX\\1",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f])X","jhEwy&w\\1mfw\\1H&VBqnX\\1",[global])),
-?line <<"onyX">> = iolist_to_binary(re:replace("onyX","(?<![^f])X","HyLQEU",[])),
-?line <<"onyX">> = iolist_to_binary(re:replace("onyX","(?<![^f])X","HyLQEU",[global])),
-?line <<"onyNXN">> = iolist_to_binary(re:replace("onyX","(?<=[^f])X","\\1N&N",[])),
-?line <<"onyNXN">> = iolist_to_binary(re:replace("onyX","(?<=[^f])X","\\1N&N",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^f])X","kt&SCnnaVhTlQMnFltwd",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^f])X","kt&SCnnaVhTlQMnFltwd",[global])),
-?line <<"offX">> = iolist_to_binary(re:replace("offX","(?<=[^f])X","UsgnsEG\\1LX&DB",[])),
-?line <<"offX">> = iolist_to_binary(re:replace("offX","(?<=[^f])X","UsgnsEG\\1LX&DB",[global])),
-?line <<"FOjOAeQxFFXja
+ ","WJB",[extended,caseless,global])),
+ <<"NdcuJzCbxTd">> = iolist_to_binary(re:replace("z","[z\\Qa-d]\\E]","NdcuJ\\1&CbxTd",[])),
+ <<"NdcuJzCbxTd">> = iolist_to_binary(re:replace("z","[z\\Qa-d]\\E]","NdcuJ\\1&CbxTd",[global])),
+ <<"VLxNqfjwruLh">> = iolist_to_binary(re:replace("a","[z\\Qa-d]\\E]","VL\\1xNqfj\\1wruLh",[])),
+ <<"VLxNqfjwruLh">> = iolist_to_binary(re:replace("a","[z\\Qa-d]\\E]","VL\\1xNqfj\\1wruLh",[global])),
+ <<"jX">> = iolist_to_binary(re:replace("-","[z\\Qa-d]\\E]","jX",[])),
+ <<"jX">> = iolist_to_binary(re:replace("-","[z\\Qa-d]\\E]","jX",[global])),
+ <<"XRHLEUuwPyRxGJEv">> = iolist_to_binary(re:replace("d","[z\\Qa-d]\\E]","X\\1RHLEUuwP\\1yRxGJEv",[])),
+ <<"XRHLEUuwPyRxGJEv">> = iolist_to_binary(re:replace("d","[z\\Qa-d]\\E]","X\\1RHLEUuwP\\1yRxGJEv",[global])),
+ <<"Gtcd">> = iolist_to_binary(re:replace("]","[z\\Qa-d]\\E]","Gt\\1cd",[])),
+ <<"Gtcd">> = iolist_to_binary(re:replace("]","[z\\Qa-d]\\E]","Gt\\1cd",[global])),
+ <<"*** FCaQDFtaYgknvailers">> = iolist_to_binary(re:replace("*** Failers","[z\\Qa-d]\\E]","C&Q\\1\\1\\1DF\\1t&Ygknv&\\1",[])),
+ <<"*** FCaQDFtaYgknvailers">> = iolist_to_binary(re:replace("*** Failers","[z\\Qa-d]\\E]","C&Q\\1\\1\\1DF\\1t&Ygknv&\\1",[global])),
+ <<"b">> = iolist_to_binary(re:replace("b","[z\\Qa-d]\\E]","rUhPPBvokQvYvRC",[])),
+ <<"b">> = iolist_to_binary(re:replace("b","[z\\Qa-d]\\E]","rUhPPBvokQvYvRC",[global])),
+ ok.
+run34() ->
+ <<"jOKAO">> = iolist_to_binary(re:replace("z","[\\z\\C]","jOKAO",[])),
+ <<"jOKAO">> = iolist_to_binary(re:replace("z","[\\z\\C]","jOKAO",[global])),
+ <<"UIfGQohtPCcNiR">> = iolist_to_binary(re:replace("C","[\\z\\C]","\\1UIfGQohtP&c\\1\\1NiR",[])),
+ <<"UIfGQohtPCcNiR">> = iolist_to_binary(re:replace("C","[\\z\\C]","\\1UIfGQohtP&c\\1\\1NiR",[global])),
+ <<"xjHNUJliwGsC">> = iolist_to_binary(re:replace("M","\\M","xjHNUJ\\1liwGsC",[])),
+ <<"xjHNUJliwGsC">> = iolist_to_binary(re:replace("M","\\M","xjHNUJ\\1liwGsC",[global])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b","ss\\1vxH\\1fmwG",[])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b","ss\\1vxH\\1fmwG",[global])),
+ <<"„XAZXS">> = iolist_to_binary(re:replace("„XAZXB","(?<=Z)X.","XS",[])),
+ <<"„XAZXS">> = iolist_to_binary(re:replace("„XAZXB","(?<=Z)X.","XS",[global])),
+ <<"fU">> = iolist_to_binary(re:replace("ab cd defg","ab cd (?x) de fg","fU",[])),
+ <<"fU">> = iolist_to_binary(re:replace("ab cd defg","ab cd (?x) de fg","fU",[global])),
+ <<"ditab cddefg">> = iolist_to_binary(re:replace("ab cddefg","ab cd(?x) de fg","\\1dit&",[])),
+ <<"ditab cddefg">> = iolist_to_binary(re:replace("ab cddefg","ab cd(?x) de fg","\\1dit&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","ab cd(?x) de fg","&Kr&\\1EgsvGfRsKlm",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","ab cd(?x) de fg","&Kr&\\1EgsvGfRsKlm",[global])),
+ <<"abcddefg">> = iolist_to_binary(re:replace("abcddefg","ab cd(?x) de fg","\\1",[])),
+ <<"abcddefg">> = iolist_to_binary(re:replace("abcddefg","ab cd(?x) de fg","\\1",[global])),
+ <<"fooXSbarrbNX">> = iolist_to_binary(re:replace("foobarX","(?<![^f]oo)(bar)","XS\\1rbN",[])),
+ <<"fooXSbarrbNX">> = iolist_to_binary(re:replace("foobarX","(?<![^f]oo)(bar)","XS\\1rbN",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f]oo)(bar)","P\\1\\1\\1&C\\1N\\1DLnhU&T",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f]oo)(bar)","P\\1\\1\\1&C\\1N\\1DLnhU&T",[global])),
+ <<"boobarX">> = iolist_to_binary(re:replace("boobarX","(?<![^f]oo)(bar)","S&HuDj&pl&\\1K",[])),
+ <<"boobarX">> = iolist_to_binary(re:replace("boobarX","(?<![^f]oo)(bar)","S&HuDj&pl&\\1K",[global])),
+ <<"offAWvYjHsJodXLI">> = iolist_to_binary(re:replace("offX","(?<![^f])X","AWvYjHs\\1J\\1od&LI",[])),
+ <<"offAWvYjHsJodXLI">> = iolist_to_binary(re:replace("offX","(?<![^f])X","AWvYjHs\\1J\\1od&LI",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f])X","\\1on",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<![^f])X","\\1on",[global])),
+ <<"onyX">> = iolist_to_binary(re:replace("onyX","(?<![^f])X","&f&D",[])),
+ <<"onyX">> = iolist_to_binary(re:replace("onyX","(?<![^f])X","&f&D",[global])),
+ <<"onyE">> = iolist_to_binary(re:replace("onyX","(?<=[^f])X","E",[])),
+ <<"onyE">> = iolist_to_binary(re:replace("onyX","(?<=[^f])X","E",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^f])X","lEuucWp\\1&m",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^f])X","lEuucWp\\1&m",[global])),
+ <<"offX">> = iolist_to_binary(re:replace("offX","(?<=[^f])X","QNevBRs\\1&OKqB&\\1\\1H",[])),
+ <<"offX">> = iolist_to_binary(re:replace("offX","(?<=[^f])X","QNevBRs\\1&OKqB&\\1\\1H",[global])),
+ <<"lHqgba
b
c">> = iolist_to_binary(re:replace("a
b
-c","^","FOjO&AeQx&FFXj",[multiline])),
-?line <<"FOjOAeQxFFXja
-FOjOAeQxFFXjb
-FOjOAeQxFFXjc">> = iolist_to_binary(re:replace("a
+c","^","lHqg&b&",[multiline])),
+ <<"lHqgba
+lHqgbb
+lHqgbc">> = iolist_to_binary(re:replace("a
b
-c","^","FOjO&AeQx&FFXj",[multiline,global])),
-?line <<"jwIVfrtVCpnVwNgju">> = iolist_to_binary(re:replace("","^","jwIVfrtVCpnVwNgju",[multiline])),
-?line <<"jwIVfrtVCpnVwNgju">> = iolist_to_binary(re:replace("","^","jwIVfrtVCpnVwNgju",[multiline,
- global])),
-?line <<"A
+c","^","lHqg&b&",[multiline,global])),
+ <<"VDMcObuOyb">> = iolist_to_binary(re:replace("","^","VDM&cObuOy\\1b",[multiline])),
+ <<"VDMcObuOyb">> = iolist_to_binary(re:replace("","^","VDM&cObuOy\\1b",[multiline,
+ global])),
+ <<"A
C
-sugWOwdKBC">> = iolist_to_binary(re:replace("A
+luYGJMVrKYIkybC">> = iolist_to_binary(re:replace("A
C
-C","(?<=C\\n)^","sugW&&\\1OwdKB",[multiline])),
-?line <<"A
+C","(?<=C\\n)^","lu\\1Y&GJM\\1VrKY&Ikyb\\1",[multiline])),
+ <<"A
C
-sugWOwdKBC">> = iolist_to_binary(re:replace("A
+luYGJMVrKYIkybC">> = iolist_to_binary(re:replace("A
C
-C","(?<=C\\n)^","sugW&&\\1OwdKB",[multiline,global])),
-?line <<"dIXQXEThebXaXXcLjA">> = iolist_to_binary(re:replace("bXaX","(?:(?(1)a|b)(X))+","dI\\1Q\\1EThe&\\1cLjA",[])),
-?line <<"dIXQXEThebXaXXcLjA">> = iolist_to_binary(re:replace("bXaX","(?:(?(1)a|b)(X))+","dI\\1Q\\1EThe&\\1cLjA",[global])),
-?line <<"AvB">> = iolist_to_binary(re:replace("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+","AvB",[])),
-?line <<"AvB">> = iolist_to_binary(re:replace("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+","AvB",[global])),
-?line <<"EHtFjtbXESMPhXXYaXXaX">> = iolist_to_binary(re:replace("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+","EHtFjt&ESMPh\\1\\1",[])),
-?line <<"EHtFjtbXESMPhXXYaXXaX">> = iolist_to_binary(re:replace("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+","EHtFjt&ESMPh\\1\\1",[global])),
-?line <<"bXnIbjbXebXpecwXaYYaY">> = iolist_to_binary(re:replace("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+","&nIbj&\\1e&p\\1ecw",[])),
-?line <<"bXnIbjbXebXpecwXaYYaY">> = iolist_to_binary(re:replace("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+","&nIbj&\\1e&p\\1ecw",[global])),
-?line <<"Fv">> = iolist_to_binary(re:replace("abc]","[[,abc,]+]","Fv",[])),
-?line <<"Fv">> = iolist_to_binary(re:replace("abc]","[[,abc,]+]","Fv",[global])),
-?line <<"enGFFPGa,b]Vq">> = iolist_to_binary(re:replace("a,b]","[[,abc,]+]","enGFFPG&V\\1q",[])),
-?line <<"enGFFPGa,b]Vq">> = iolist_to_binary(re:replace("a,b]","[[,abc,]+]","enGFFPG&V\\1q",[global])),
-?line <<"SLU[a,b,c]KDFqnru[a,b,c]">> = iolist_to_binary(re:replace("[a,b,c]","[[,abc,]+]","SLU&KDFqnru&",[])),
-?line <<"SLU[a,b,c]KDFqnru[a,b,c]">> = iolist_to_binary(re:replace("[a,b,c]","[[,abc,]+]","SLU&KDFqnru&",[global])),
-?line <<"AFHpB">> = iolist_to_binary(re:replace("A B","(?-x: )","FHp",[extended])),
-?line <<"AFHpB">> = iolist_to_binary(re:replace("A B","(?-x: )","FHp",[extended,
- global])),
-?line <<"ALptWSVme # # # B">> = iolist_to_binary(re:replace("A # B","(?x)(?-x: \\s*#\\s*)","LptWSVme&\\1&&",[])),
-?line <<"ALptWSVme # # # B">> = iolist_to_binary(re:replace("A # B","(?x)(?-x: \\s*#\\s*)","LptWSVme&\\1&&",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x)(?-x: \\s*#\\s*)","enBY&\\1vE&\\1I\\1IhttjD\\1",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x)(?-x: \\s*#\\s*)","enBY&\\1vE&\\1I\\1IhttjD\\1",[global])),
-?line <<"#">> = iolist_to_binary(re:replace("#","(?x)(?-x: \\s*#\\s*)","c\\1cwAsih",[])),
-?line <<"#">> = iolist_to_binary(re:replace("#","(?x)(?-x: \\s*#\\s*)","c\\1cwAsih",[global])),
-?line <<"ARtjg #includeDy #includeg">> = iolist_to_binary(re:replace("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","Rtjg&Dy\\1&g",[])),
-?line <<"ARtjg #includeDy #includeg">> = iolist_to_binary(re:replace("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","Rtjg&Dy\\1&g",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include","tYbpFaHd\\1GjcqHIWx\\1a",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include","tYbpFaHd\\1GjcqHIWx\\1a",[global])),
-?line <<"A#include">> = iolist_to_binary(re:replace("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","nv\\1tgvlSHVHyKOMPNXVF",[])),
-?line <<"A#include">> = iolist_to_binary(re:replace("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","nv\\1tgvlSHVHyKOMPNXVF",[global])),
-?line <<"A #Include">> = iolist_to_binary(re:replace("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","kQdv",[])),
-?line <<"A #Include">> = iolist_to_binary(re:replace("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","kQdv",[global])),
-?line <<"k">> = iolist_to_binary(re:replace("aaabbbb","a*b*\\w","k",[])),
-?line <<"k">> = iolist_to_binary(re:replace("aaabbbb","a*b*\\w","k",[global])),
-?line <<"xaaaa">> = iolist_to_binary(re:replace("aaaa","a*b*\\w","x&",[])),
-?line <<"xaaaa">> = iolist_to_binary(re:replace("aaaa","a*b*\\w","x&",[global])),
-?line <<"pOagbKtJauauHwjM">> = iolist_to_binary(re:replace("a","a*b*\\w","pOagbKtJ&uauHwjM",[])),
-?line <<"pOagbKtJauauHwjM">> = iolist_to_binary(re:replace("a","a*b*\\w","pOagbKtJ&uauHwjM",[global])),
-?line <<"tuaaabbPhWfMuDrCJEUabb">> = iolist_to_binary(re:replace("aaabbbb","a*b?\\w","tu&P\\1h\\1WfMu\\1Dr\\1CJEUa",[])),
-?line <<"tuaaabbPhWfMuDrCJEUatubbPhWfMuDrCJEUa">> = iolist_to_binary(re:replace("aaabbbb","a*b?\\w","tu&P\\1h\\1WfMu\\1Dr\\1CJEUa",[global])),
-?line <<"heEGaaaabPJaaaaaaaakUYNXaaaasNCaaaa">> = iolist_to_binary(re:replace("aaaa","a*b?\\w","heEG&bPJ&&kUYNX&sNC&",[])),
-?line <<"heEGaaaabPJaaaaaaaakUYNXaaaasNCaaaa">> = iolist_to_binary(re:replace("aaaa","a*b?\\w","heEG&bPJ&&kUYNX&sNC&",[global])),
-?line <<"cjDPFiqs">> = iolist_to_binary(re:replace("a","a*b?\\w","cjDPFiq\\1s",[])),
-?line <<"cjDPFiqs">> = iolist_to_binary(re:replace("a","a*b?\\w","cjDPFiq\\1s",[global])),
-?line <<"aaabbbbU">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,4}\\w","&U",[])),
-?line <<"aaabbbbU">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,4}\\w","&U",[global])),
-?line <<"kaaaavgaaaaFaaaa">> = iolist_to_binary(re:replace("aaaa","a*b{0,4}\\w","k&vg&F&",[])),
-?line <<"kaaaavgaaaaFaaaa">> = iolist_to_binary(re:replace("aaaa","a*b{0,4}\\w","k&vg&F&",[global])),
-?line <<"ahHM">> = iolist_to_binary(re:replace("a","a*b{0,4}\\w","&hHM",[])),
-?line <<"ahHM">> = iolist_to_binary(re:replace("a","a*b{0,4}\\w","&hHM",[global])),
-?line <<"aaabbbbkVyXSBUXNHaaabbbbSC">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,}\\w","\\1&kVyXSBUXNH&SC\\1",[])),
-?line <<"aaabbbbkVyXSBUXNHaaabbbbSC">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,}\\w","\\1&kVyXSBUXNH&SC\\1",[global])),
-?line <<"JsaaaaARjP">> = iolist_to_binary(re:replace("aaaa","a*b{0,}\\w","Js&ARjP",[])),
-?line <<"JsaaaaARjP">> = iolist_to_binary(re:replace("aaaa","a*b{0,}\\w","Js&ARjP",[global])),
-?line <<"safA">> = iolist_to_binary(re:replace("a","a*b{0,}\\w","s\\1&fA",[])),
-?line <<"safA">> = iolist_to_binary(re:replace("a","a*b{0,}\\w","s\\1&fA",[global])),
-?line <<"0aGcgVV0aXhLIJ">> = iolist_to_binary(re:replace("0a","a*\\d*\\w","&GcgVV&XhLIJ",[])),
-?line <<"0aGcgVV0aXhLIJ">> = iolist_to_binary(re:replace("0a","a*\\d*\\w","&GcgVV&XhLIJ",[global])),
-?line <<"OWJamuSoHvWtdO">> = iolist_to_binary(re:replace("a","a*\\d*\\w","OWJ&muSoHvWtdO",[])),
-?line <<"OWJamuSoHvWtdO">> = iolist_to_binary(re:replace("a","a*\\d*\\w","OWJ&muSoHvWtdO",[global])),
-?line <<"jLLQBsEdhgm">> = iolist_to_binary(re:replace("a","a*b *\\w","jLLQ\\1BsE\\1dhgm",[extended])),
-?line <<"jLLQBsEdhgm">> = iolist_to_binary(re:replace("a","a*b *\\w","jLLQ\\1BsE\\1dhgm",[extended,
- global])),
-?line <<"JFKdkakQmYFCpg">> = iolist_to_binary(re:replace("a","a*b#comment
- *\\w","JFKdk&kQmYFCpg",[extended])),
-?line <<"JFKdkakQmYFCpg">> = iolist_to_binary(re:replace("a","a*b#comment
- *\\w","JFKdk&kQmYFCpg",[extended,global])),
-?line <<"UeHUaDNFkPaoa">> = iolist_to_binary(re:replace("a","a* b *\\w","UeHU&DNFkP&o&\\1",[extended])),
-?line <<"UeHUaDNFkPaoa">> = iolist_to_binary(re:replace("a","a* b *\\w","UeHU&DNFkP&o&\\1",[extended,
- global])),
-?line <<"Qomltkg
+C","(?<=C\\n)^","lu\\1Y&GJM\\1VrKY&Ikyb\\1",[multiline,global])),
+ <<"siXpqbXaXURhpboidbXaXRg">> = iolist_to_binary(re:replace("bXaX","(?:(?(1)a|b)(X))+","si\\1pq&URhpboid&Rg",[])),
+ <<"siXpqbXaXURhpboidbXaXRg">> = iolist_to_binary(re:replace("bXaX","(?:(?(1)a|b)(X))+","si\\1pq&URhpboid&Rg",[global])),
+ <<"AmhmmmbXXaYYaYAOkoG">> = iolist_to_binary(re:replace("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+","Amhmmm&AOkoG",[])),
+ <<"AmhmmmbXXaYYaYAOkoG">> = iolist_to_binary(re:replace("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+","Amhmmm&AOkoG",[global])),
+ <<"PtXQXEwjfhYaXXaX">> = iolist_to_binary(re:replace("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+","PtXQ\\1Ewjfh",[])),
+ <<"PtXQXEwjfhYaXXaX">> = iolist_to_binary(re:replace("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+","PtXQ\\1Ewjfh",[global])),
+ <<"qpflyycYXuQXaYYaY">> = iolist_to_binary(re:replace("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+","q\\1pflyycY\\1XuQ",[])),
+ <<"qpflyycYXuQXaYYaY">> = iolist_to_binary(re:replace("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+","q\\1pflyycY\\1XuQ",[global])),
+ <<"abc]GgJESKfdixjabc]">> = iolist_to_binary(re:replace("abc]","[[,abc,]+]","&GgJESKf\\1di\\1xj&",[])),
+ <<"abc]GgJESKfdixjabc]">> = iolist_to_binary(re:replace("abc]","[[,abc,]+]","&GgJESKf\\1di\\1xj&",[global])),
+ <<"wa,b]a,b]hta,b]NQ">> = iolist_to_binary(re:replace("a,b]","[[,abc,]+]","w&&ht&N\\1Q",[])),
+ <<"wa,b]a,b]hta,b]NQ">> = iolist_to_binary(re:replace("a,b]","[[,abc,]+]","w&&ht&N\\1Q",[global])),
+ <<"aDIlRnUPE[a,b,c]VAaV[a,b,c]V">> = iolist_to_binary(re:replace("[a,b,c]","[[,abc,]+]","aDIlRnU\\1PE&VAaV&V",[])),
+ <<"aDIlRnUPE[a,b,c]VAaV[a,b,c]V">> = iolist_to_binary(re:replace("[a,b,c]","[[,abc,]+]","aDIlRnU\\1PE&VAaV&V",[global])),
+ <<"AVNFmY XbCfJ B">> = iolist_to_binary(re:replace("A B","(?-x: )","V\\1NFmY\\1&X\\1bC\\1fJ&",[extended])),
+ <<"AVNFmY XbCfJ B">> = iolist_to_binary(re:replace("A B","(?-x: )","V\\1NFmY\\1&X\\1bC\\1fJ&",[extended,
+ global])),
+ <<"ABB">> = iolist_to_binary(re:replace("A # B","(?x)(?-x: \\s*#\\s*)","B",[])),
+ <<"ABB">> = iolist_to_binary(re:replace("A # B","(?x)(?-x: \\s*#\\s*)","B",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x)(?-x: \\s*#\\s*)","&CgSC",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x)(?-x: \\s*#\\s*)","&CgSC",[global])),
+ <<"#">> = iolist_to_binary(re:replace("#","(?x)(?-x: \\s*#\\s*)","&&VXAaYSEf",[])),
+ <<"#">> = iolist_to_binary(re:replace("#","(?x)(?-x: \\s*#\\s*)","&&VXAaYSEf",[global])),
+ <<"A #includeu">> = iolist_to_binary(re:replace("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","&u",[])),
+ <<"A #includeu">> = iolist_to_binary(re:replace("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","&u",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include","KyMhf",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include","KyMhf",[global])),
+ <<"A#include">> = iolist_to_binary(re:replace("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","PFlBaBuo\\1\\1\\1&Uu",[])),
+ <<"A#include">> = iolist_to_binary(re:replace("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","PFlBaBuo\\1\\1\\1&Uu",[global])),
+ <<"A #Include">> = iolist_to_binary(re:replace("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","D\\1SrsbvVOeg\\1OC&Wy",[])),
+ <<"A #Include">> = iolist_to_binary(re:replace("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include","D\\1SrsbvVOeg\\1OC&Wy",[global])),
+ ok.
+run35() ->
+ <<"AYafQSUNhFRibaaabbbbT">> = iolist_to_binary(re:replace("aaabbbb","a*b*\\w","AYafQSUNhFRib&T",[])),
+ <<"AYafQSUNhFRibaaabbbbT">> = iolist_to_binary(re:replace("aaabbbb","a*b*\\w","AYafQSUNhFRib&T",[global])),
+ <<"vKBXMQS">> = iolist_to_binary(re:replace("aaaa","a*b*\\w","vKBXMQS\\1",[])),
+ <<"vKBXMQS">> = iolist_to_binary(re:replace("aaaa","a*b*\\w","vKBXMQS\\1",[global])),
+ <<"atbBVaRw">> = iolist_to_binary(re:replace("a","a*b*\\w","&tbBV&Rw",[])),
+ <<"atbBVaRw">> = iolist_to_binary(re:replace("a","a*b*\\w","&tbBV&Rw",[global])),
+ <<"QDXPfbb">> = iolist_to_binary(re:replace("aaabbbb","a*b?\\w","QDXPf\\1",[])),
+ <<"QDXPfQDXPf">> = iolist_to_binary(re:replace("aaabbbb","a*b?\\w","QDXPf\\1",[global])),
+ <<"qIIJaaaafyqkXQdN">> = iolist_to_binary(re:replace("aaaa","a*b?\\w","qIIJ&fyqkXQ\\1dN",[])),
+ <<"qIIJaaaafyqkXQdN">> = iolist_to_binary(re:replace("aaaa","a*b?\\w","qIIJ&fyqkXQ\\1dN",[global])),
+ <<"aqAJFQ">> = iolist_to_binary(re:replace("a","a*b?\\w","&qAJFQ",[])),
+ <<"aqAJFQ">> = iolist_to_binary(re:replace("a","a*b?\\w","&qAJFQ",[global])),
+ <<"qVNjOTqaaabbbbQfis">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,4}\\w","qV\\1NjOTq\\1&Qf\\1is\\1",[])),
+ <<"qVNjOTqaaabbbbQfis">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,4}\\w","qV\\1NjOTq\\1&Qf\\1is\\1",[global])),
+ <<"caaaaIqaaaa">> = iolist_to_binary(re:replace("aaaa","a*b{0,4}\\w","c&I\\1q&",[])),
+ <<"caaaaIqaaaa">> = iolist_to_binary(re:replace("aaaa","a*b{0,4}\\w","c&I\\1q&",[global])),
+ <<"MJLlapba">> = iolist_to_binary(re:replace("a","a*b{0,4}\\w","MJLl&\\1pb&",[])),
+ <<"MJLlapba">> = iolist_to_binary(re:replace("a","a*b{0,4}\\w","MJLl&\\1pb&",[global])),
+ <<"Uxbbm">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,}\\w","Uxbbm\\1",[])),
+ <<"Uxbbm">> = iolist_to_binary(re:replace("aaabbbb","a*b{0,}\\w","Uxbbm\\1",[global])),
+ <<"fHXfIxomDIMBKtdig">> = iolist_to_binary(re:replace("aaaa","a*b{0,}\\w","f\\1HXfIxomD\\1\\1IMBKtdig",[])),
+ <<"fHXfIxomDIMBKtdig">> = iolist_to_binary(re:replace("aaaa","a*b{0,}\\w","f\\1HXfIxomD\\1\\1IMBKtdig",[global])),
+ <<"hdaYrYD">> = iolist_to_binary(re:replace("a","a*b{0,}\\w","\\1hd&YrYD\\1",[])),
+ <<"hdaYrYD">> = iolist_to_binary(re:replace("a","a*b{0,}\\w","\\1hd&YrYD\\1",[global])),
+ <<"xIjjbHXKSKRKUhwCer">> = iolist_to_binary(re:replace("0a","a*\\d*\\w","xIjjbHXKSKRKUhwCer",[])),
+ <<"xIjjbHXKSKRKUhwCer">> = iolist_to_binary(re:replace("0a","a*\\d*\\w","xIjjbHXKSKRKUhwCer",[global])),
+ <<"aklRHKO">> = iolist_to_binary(re:replace("a","a*\\d*\\w","&klRHK\\1O",[])),
+ <<"aklRHKO">> = iolist_to_binary(re:replace("a","a*\\d*\\w","&klRHK\\1O",[global])),
+ <<"aaaTxVbkRpu">> = iolist_to_binary(re:replace("a","a*b *\\w","&&&TxVbk\\1Rpu",[extended])),
+ <<"aaaTxVbkRpu">> = iolist_to_binary(re:replace("a","a*b *\\w","&&&TxVbk\\1Rpu",[extended,
+ global])),
+ <<"ekWkPj">> = iolist_to_binary(re:replace("a","a*b#comment
+ *\\w","ekWkPj",[extended])),
+ <<"ekWkPj">> = iolist_to_binary(re:replace("a","a*b#comment
+ *\\w","ekWkPj",[extended,global])),
+ <<"XxA">> = iolist_to_binary(re:replace("a","a* b *\\w","XxA",[extended])),
+ <<"XxA">> = iolist_to_binary(re:replace("a","a* b *\\w","XxA",[extended,
+ global])),
+ <<"FL
pqr">> = iolist_to_binary(re:replace("abc=xyz\\
-pqr","^\\w+=.*(\\\\\\n.*)*","\\1Qomltkg",[])),
-?line <<"Qomltkg
+pqr","^\\w+=.*(\\\\\\n.*)*","FL",[])),
+ <<"FL
pqr">> = iolist_to_binary(re:replace("abc=xyz\\
-pqr","^\\w+=.*(\\\\\\n.*)*","\\1Qomltkg",[global])),
-?line <<"abcdVXTDna">> = iolist_to_binary(re:replace("abcd:","(?=(\\w+))\\1:","\\1VXTDna",[])),
-?line <<"abcdVXTDna">> = iolist_to_binary(re:replace("abcd:","(?=(\\w+))\\1:","\\1VXTDna",[global])),
-?line <<"dxHUL">> = iolist_to_binary(re:replace("abcd:","^(?=(\\w+))\\1:","dxHUL",[])),
-?line <<"dxHUL">> = iolist_to_binary(re:replace("abcd:","^(?=(\\w+))\\1:","dxHUL",[global])),
-?line <<"HsivTabcLabcC">> = iolist_to_binary(re:replace("abc","^\\Eabc","H\\1\\1sivT&L&C\\1",[])),
-?line <<"HsivTabcLabcC">> = iolist_to_binary(re:replace("abc","^\\Eabc","H\\1\\1sivT&L&C\\1",[global])),
-?line <<"HaCuWiasgghyJxOoaVMR">> = iolist_to_binary(re:replace("a","^[\\Eabc]","HaCuWi&sgghyJxOo&VMR",[])),
-?line <<"HaCuWiasgghyJxOoaVMR">> = iolist_to_binary(re:replace("a","^[\\Eabc]","HaCuWi&sgghyJxOo&VMR",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\Eabc]","Lc&Jjl&YLfuY",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\Eabc]","Lc&Jjl&YLfuY",[global])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[\\Eabc]","MS\\1e",[])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[\\Eabc]","MS\\1e",[global])),
-?line <<"rtpBWkcLbtGo">> = iolist_to_binary(re:replace("b","^[a-\\Ec]","rtpBWkcL&\\1tGo",[])),
-?line <<"rtpBWkcLbtGo">> = iolist_to_binary(re:replace("b","^[a-\\Ec]","rtpBWkcL&\\1tGo",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a-\\Ec]","IC&T\\1r",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a-\\Ec]","IC&T\\1r",[global])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[a-\\Ec]","CoL\\1S\\1d",[])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[a-\\Ec]","CoL\\1S\\1d",[global])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[a-\\Ec]","\\1T",[])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[a-\\Ec]","\\1T",[global])),
-?line <<"nbUnfwIYbbDEgCj">> = iolist_to_binary(re:replace("b","^[a\\E\\E-\\Ec]","n&Un\\1fwIY\\1&&DEgCj",[])),
-?line <<"nbUnfwIYbbDEgCj">> = iolist_to_binary(re:replace("b","^[a\\E\\E-\\Ec]","n&Un\\1fwIY\\1&&DEgCj",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a\\E\\E-\\Ec]","P\\1VvOTyOaT",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a\\E\\E-\\Ec]","P\\1VvOTyOaT",[global])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[a\\E\\E-\\Ec]","XYUeR",[])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[a\\E\\E-\\Ec]","XYUeR",[global])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[a\\E\\E-\\Ec]","PeFBbxifgd",[])),
-?line <<"E">> = iolist_to_binary(re:replace("E","^[a\\E\\E-\\Ec]","PeFBbxifgd",[global])),
-?line <<"pdeFkRdPoflblrWho">> = iolist_to_binary(re:replace("b","^[\\E\\Qa\\E-\\Qz\\E]+","pdeFkRdPofl&lrWho\\1",[])),
-?line <<"pdeFkRdPoflblrWho">> = iolist_to_binary(re:replace("b","^[\\E\\Qa\\E-\\Qz\\E]+","pdeFkRdPofl&lrWho\\1",[global])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+","mXYgE\\1\\1",[])),
-?line <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+","mXYgE\\1\\1",[global])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[\\E\\Qa\\E-\\Qz\\E]+","KLdkiRi",[])),
-?line <<"-">> = iolist_to_binary(re:replace("-","^[\\E\\Qa\\E-\\Qz\\E]+","KLdkiRi",[global])),
-?line <<"CAXhbVsbB">> = iolist_to_binary(re:replace("a","^[a\\Q]bc\\E]","CAXh\\1bVsbB",[])),
-?line <<"CAXhbVsbB">> = iolist_to_binary(re:replace("a","^[a\\Q]bc\\E]","CAXh\\1bVsbB",[global])),
-?line <<"YFgJL]GhQVUD]Pbp">> = iolist_to_binary(re:replace("]","^[a\\Q]bc\\E]","YFgJL&GhQVU\\1D&Pbp",[])),
-?line <<"YFgJL]GhQVUD]Pbp">> = iolist_to_binary(re:replace("]","^[a\\Q]bc\\E]","YFgJL&GhQVU\\1D&Pbp",[global])),
-?line <<"waUcGiVGxIcKiccYmjc">> = iolist_to_binary(re:replace("c","^[a\\Q]bc\\E]","waU&GiVGxI&Ki&cYmj&",[])),
-?line <<"waUcGiVGxIcKiccYmjc">> = iolist_to_binary(re:replace("c","^[a\\Q]bc\\E]","waU&GiVGxI&Ki&cYmj&",[global])),
-?line <<"yfaacSB">> = iolist_to_binary(re:replace("a","^[a-\\Q\\E]","yf&\\1acSB",[])),
-?line <<"yfaacSB">> = iolist_to_binary(re:replace("a","^[a-\\Q\\E]","yf&\\1acSB",[global])),
-?line <<"f">> = iolist_to_binary(re:replace("-","^[a-\\Q\\E]","f",[])),
-?line <<"f">> = iolist_to_binary(re:replace("-","^[a-\\Q\\E]","f",[global])),
-?line <<"S">> = iolist_to_binary(re:replace("aaaa","^(a()*)*","S",[])),
-?line <<"S">> = iolist_to_binary(re:replace("aaaa","^(a()*)*","S",[global])),
-?line <<"BPPbuaaaaufIV">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))*)*","BPPbu&ufIV",[])),
-?line <<"BPPbuaaaaufIV">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))*)*","BPPbu&ufIV",[global])),
-?line <<"HBMaaaafDaRVOv">> = iolist_to_binary(re:replace("aaaa","^(a()+)+","HBM&fD\\1RVOv",[])),
-?line <<"HBMaaaafDaRVOv">> = iolist_to_binary(re:replace("aaaa","^(a()+)+","HBM&fD\\1RVOv",[global])),
-?line <<"JvvaaaaaaaaXGaaaawkPaaaaNqM">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))+)+","J\\1vv\\1\\1&&XG&w\\1kP&N\\1qM",[])),
-?line <<"JvvaaaaaaaaXGaaaawkPaaaaNqM">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))+)+","J\\1vv\\1\\1&&XG&w\\1kP&N\\1qM",[global])),
-?line <<"GlQPoT">> = iolist_to_binary(re:replace("abbD","(a){0,3}(?(1)b|(c|))*D","GlQPoT",[])),
-?line <<"GlQPoT">> = iolist_to_binary(re:replace("abbD","(a){0,3}(?(1)b|(c|))*D","GlQPoT",[global])),
-?line <<"ApBccccD">> = iolist_to_binary(re:replace("ccccD","(a){0,3}(?(1)b|(c|))*D","\\1\\1ApB&",[])),
-?line <<"ApBccccD">> = iolist_to_binary(re:replace("ccccD","(a){0,3}(?(1)b|(c|))*D","\\1\\1ApB&",[global])),
-?line <<"BC">> = iolist_to_binary(re:replace("D","(a){0,3}(?(1)b|(c|))*D","BC",[])),
-?line <<"BC">> = iolist_to_binary(re:replace("D","(a){0,3}(?(1)b|(c|))*D","BC",[global])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d","gsB\\1",[])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d","gsB\\1",[global])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4FVLiMHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4hlau">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d","&F\\1VLiMH&hlau",[])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4FVLiMHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4hlau">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d","&F\\1VLiMH&hlau",[global])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d","PkrWG&pe\\1uUD&sBHqm",[])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d","PkrWG&pe\\1uUD&sBHqm",[global])),
-?line <<"KmL">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d","KmL",[])),
-?line <<"KmL">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d","KmL",[global])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d","&HUPIn&&&uUmDmrCoAY",[])),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d","&HUPIn&&&uUmDmrCoAY",[global])),
-?line <<"Q">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d","Q",[])),
-?line <<"Q">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d","Q",[global])),
-?line <<"abcR">> = iolist_to_binary(re:replace("abc","\\Z","R",[])),
-?line <<"abcR">> = iolist_to_binary(re:replace("abc","\\Z","R",[global])),
-?line <<"GwfabcD">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","Gwf&D",[])),
-?line <<"GwfabcD">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","Gwf&D",[global])),
-?line <<"EWJHblKuypyqFbP">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","EWJHblKuypyqFbP",[])),
-?line <<"EWJHblKuypyqFbP">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","EWJHblKuypyqFbP",[global])),
-?line <<"fabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","f",[])),
-?line <<"fabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","f",[global])),
-?line <<"cKyLyGabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","cKyL\\1yG",[])),
-?line <<"cKyLyGabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","cKyL\\1yG",[global])),
-?line <<"abcKoYH">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","\\1\\1Ko\\1&Y&H",[])),
-?line <<"abcKoYH">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","\\1\\1Ko\\1&Y&H",[global])),
-?line <<"abcqWjyPjUTIdbm">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","qWjy\\1PjUTIdbm&",[])),
-?line <<"abcqWjyPjUTIdbm">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","qWjy\\1PjUTIdbm&",[global])),
-?line <<"labcdJabcdNUhUnH">> = iolist_to_binary(re:replace("abcd","(.*(.)?)*","l&J\\1&NUhUnH",[])),
-?line <<"labcdJabcdNUhUnHlJNUhUnH">> = iolist_to_binary(re:replace("abcd","(.*(.)?)*","l&J\\1&NUhUnH",[global])),
-?line <<"onfTbTLJLVnabcd">> = iolist_to_binary(re:replace("abcd","( (A | (?(1)0|) )* )","onfTbTLJLVn",[extended])),
-?line <<"onfTbTLJLVnaonfTbTLJLVnbonfTbTLJLVnconfTbTLJLVndonfTbTLJLVn">> = iolist_to_binary(re:replace("abcd","( (A | (?(1)0|) )* )","onfTbTLJLVn",[extended,
- global])),
-?line <<"rilgPabcd">> = iolist_to_binary(re:replace("abcd","( ( (?(1)0|) )* )","ri\\1&lgP",[extended])),
-?line <<"rilgParilgPbrilgPcrilgPdrilgP">> = iolist_to_binary(re:replace("abcd","( ( (?(1)0|) )* )","ri\\1&lgP",[extended,
+pqr","^\\w+=.*(\\\\\\n.*)*","FL",[global])),
+ <<"KDabcd:abcdSabcd:">> = iolist_to_binary(re:replace("abcd:","(?=(\\w+))\\1:","KD&\\1S&",[])),
+ <<"KDabcd:abcdSabcd:">> = iolist_to_binary(re:replace("abcd:","(?=(\\w+))\\1:","KD&\\1S&",[global])),
+ <<"CFNabcd:xwKNSfsabcd">> = iolist_to_binary(re:replace("abcd:","^(?=(\\w+))\\1:","CFN&xwKNSfs\\1",[])),
+ <<"CFNabcd:xwKNSfsabcd">> = iolist_to_binary(re:replace("abcd:","^(?=(\\w+))\\1:","CFN&xwKNSfs\\1",[global])),
+ <<"UabcWq">> = iolist_to_binary(re:replace("abc","^\\Eabc","U&Wq",[])),
+ <<"UabcWq">> = iolist_to_binary(re:replace("abc","^\\Eabc","U&Wq",[global])),
+ <<"yamyDjNjvdapUq">> = iolist_to_binary(re:replace("a","^[\\Eabc]","y&myDjNjvd&pUq\\1",[])),
+ <<"yamyDjNjvdapUq">> = iolist_to_binary(re:replace("a","^[\\Eabc]","y&myDjNjvd&pUq\\1",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\Eabc]","YWGNdA&XaWp\\1",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\Eabc]","YWGNdA&XaWp\\1",[global])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[\\Eabc]","qtud&GONs\\1W\\1I",[])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[\\Eabc]","qtud&GONs\\1W\\1I",[global])),
+ <<"kj">> = iolist_to_binary(re:replace("b","^[a-\\Ec]","kj",[])),
+ <<"kj">> = iolist_to_binary(re:replace("b","^[a-\\Ec]","kj",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a-\\Ec]","U\\1",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a-\\Ec]","U\\1",[global])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[a-\\Ec]","dluKDBOTsxDtQKaGXQn",[])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[a-\\Ec]","dluKDBOTsxDtQKaGXQn",[global])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[a-\\Ec]","j\\1KKHVDRF&\\1hBX\\1nerh",[])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[a-\\Ec]","j\\1KKHVDRF&\\1hBX\\1nerh",[global])),
+ <<"eU">> = iolist_to_binary(re:replace("b","^[a\\E\\E-\\Ec]","\\1eU",[])),
+ <<"eU">> = iolist_to_binary(re:replace("b","^[a\\E\\E-\\Ec]","\\1eU",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a\\E\\E-\\Ec]","Gp\\1hoe\\1ft",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[a\\E\\E-\\Ec]","Gp\\1hoe\\1ft",[global])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[a\\E\\E-\\Ec]","&\\1&\\1dsAR\\1R&kfYLY&Nx",[])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[a\\E\\E-\\Ec]","&\\1&\\1dsAR\\1R&kfYLY&Nx",[global])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[a\\E\\E-\\Ec]","OmwiowAjJ&dB",[])),
+ <<"E">> = iolist_to_binary(re:replace("E","^[a\\E\\E-\\Ec]","OmwiowAjJ&dB",[global])),
+ <<"bLBVEBlTbNy">> = iolist_to_binary(re:replace("b","^[\\E\\Qa\\E-\\Qz\\E]+","&LBVEBlT&Ny",[])),
+ <<"bLBVEBlTbNy">> = iolist_to_binary(re:replace("b","^[\\E\\Qa\\E-\\Qz\\E]+","&LBVEBlT&Ny",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+","&DGXW&\\1G",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+","&DGXW&\\1G",[global])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[\\E\\Qa\\E-\\Qz\\E]+","uh&tV&",[])),
+ <<"-">> = iolist_to_binary(re:replace("-","^[\\E\\Qa\\E-\\Qz\\E]+","uh&tV&",[global])),
+ <<"IgYyaXYfkYHvCal">> = iolist_to_binary(re:replace("a","^[a\\Q]bc\\E]","IgYy&XYf\\1kYH\\1vC&\\1l",[])),
+ <<"IgYyaXYfkYHvCal">> = iolist_to_binary(re:replace("a","^[a\\Q]bc\\E]","IgYy&XYf\\1kYH\\1vC&\\1l",[global])),
+ <<"DGTyeUFsoeifQI">> = iolist_to_binary(re:replace("]","^[a\\Q]bc\\E]","DGTyeUFsoeifQI",[])),
+ <<"DGTyeUFsoeifQI">> = iolist_to_binary(re:replace("]","^[a\\Q]bc\\E]","DGTyeUFsoeifQI",[global])),
+ <<"cdPJxbdO">> = iolist_to_binary(re:replace("c","^[a\\Q]bc\\E]","&dPJxb\\1dO",[])),
+ <<"cdPJxbdO">> = iolist_to_binary(re:replace("c","^[a\\Q]bc\\E]","&dPJxb\\1dO",[global])),
+ <<"achHbHOkynhnR">> = iolist_to_binary(re:replace("a","^[a-\\Q\\E]","&chHbHOkynhnR",[])),
+ <<"achHbHOkynhnR">> = iolist_to_binary(re:replace("a","^[a-\\Q\\E]","&chHbHOkynhnR",[global])),
+ <<"uu-MgaUIMliYd--">> = iolist_to_binary(re:replace("-","^[a-\\Q\\E]","uu\\1&MgaU\\1IMliYd&&",[])),
+ <<"uu-MgaUIMliYd--">> = iolist_to_binary(re:replace("-","^[a-\\Q\\E]","uu\\1&MgaU\\1IMliYd&&",[global])),
+ <<"CP">> = iolist_to_binary(re:replace("aaaa","^(a()*)*","CP",[])),
+ <<"CP">> = iolist_to_binary(re:replace("aaaa","^(a()*)*","CP",[global])),
+ <<"wQTHtaaaakYek">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))*)*","w\\1QTH\\1\\1t&kYe\\1k",[])),
+ <<"wQTHtaaaakYek">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))*)*","w\\1QTH\\1\\1t&kYe\\1k",[global])),
+ ok.
+run36() ->
+ <<"RGaXfvItI">> = iolist_to_binary(re:replace("aaaa","^(a()+)+","RG\\1XfvItI",[])),
+ <<"RGaXfvItI">> = iolist_to_binary(re:replace("aaaa","^(a()+)+","RG\\1XfvItI",[global])),
+ <<"dMSiHuvxupxlcaaaax">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))+)+","dMSiHuvxupxl\\1c&x",[])),
+ <<"dMSiHuvxupxlcaaaax">> = iolist_to_binary(re:replace("aaaa","^(?:a(?:(?:))+)+","dMSiHuvxupxl\\1c&x",[global])),
+ <<"iP">> = iolist_to_binary(re:replace("abbD","(a){0,3}(?(1)b|(c|))*D","iP",[])),
+ <<"iP">> = iolist_to_binary(re:replace("abbD","(a){0,3}(?(1)b|(c|))*D","iP",[global])),
+ <<"ccccDXbTvQpvdoaW">> = iolist_to_binary(re:replace("ccccD","(a){0,3}(?(1)b|(c|))*D","&XbTvQ\\1p\\1vd\\1o\\1\\1\\1aW",[])),
+ <<"ccccDXbTvQpvdoaW">> = iolist_to_binary(re:replace("ccccD","(a){0,3}(?(1)b|(c|))*D","&XbTvQ\\1p\\1vd\\1o\\1\\1\\1aW",[global])),
+ <<"RVoDDTkMDjhW">> = iolist_to_binary(re:replace("D","(a){0,3}(?(1)b|(c|))*D","RVo&&TkM&jhW",[])),
+ <<"RVoDDTkMDjhW">> = iolist_to_binary(re:replace("D","(a){0,3}(?(1)b|(c|))*D","RVo&&TkM&jhW",[global])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d","&\\1DGFkfxXGJ\\1yJ",[])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d","&\\1DGFkfxXGJ\\1yJ",[global])),
+ <<"Kaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4GiaQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4jWNATt">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d","K&GiaQ&jWNATt",[])),
+ <<"Kaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4GiaQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4jWNATt">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d","K&GiaQ&jWNATt",[global])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d","qHVMyR\\1g\\1",[])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d","qHVMyR\\1g\\1",[global])),
+ <<"kGFBeTsPIf">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d","kGFBeTsPI\\1f",[])),
+ <<"kGFBeTsPIf">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d","kGFBeTsPI\\1f",[global])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d","Yx",[])),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d","Yx",[global])),
+ <<"wkl">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d","wkl",[])),
+ <<"wkl">> = iolist_to_binary(re:replace("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d","wkl",[global])),
+ <<"abcqXmkEhjC">> = iolist_to_binary(re:replace("abc","\\Z","qXmkEhjC",[])),
+ <<"abcqXmkEhjC">> = iolist_to_binary(re:replace("abc","\\Z","qXmkEhjC",[global])),
+ <<"RdSYAact">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","RdSYAact",[])),
+ <<"RdSYAact">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","RdSYAact",[global])),
+ <<"JvTabcqFTcnkmyFJ">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","\\1JvT&qFTcnk\\1my\\1FJ",[])),
+ <<"JvTabcqFTcnkmyFJ">> = iolist_to_binary(re:replace("abc","^(?s)(?>.*)(?<!\\n)","\\1JvT&qFTcnk\\1my\\1FJ",[global])),
+ <<"cqXXOeFFGVUWkMabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","cqXXOeFF\\1GVUW\\1kM",[])),
+ <<"cqXXOeFFGVUWkMabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","cqXXOeFF\\1GVUW\\1kM",[global])),
+ <<"JbxrWfegLobSfGKabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","\\1Jbx&rWfe&gLobSfGK",[])),
+ <<"JbxrWfegLobSfGKabc">> = iolist_to_binary(re:replace("abc","^(?![^\\n]*\\n\\z)","\\1Jbx&rWfe&gLobSfGK",[global])),
+ <<"abceDUDjJoFtrgMYDo">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","eDUDjJoFtrgMYD&o",[])),
+ <<"abceDUDjJoFtrgMYDo">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","eDUDjJoFtrgMYD&o",[global])),
+ <<"abcL">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","L",[])),
+ <<"abcL">> = iolist_to_binary(re:replace("abc","\\z(?<!\\n)","L",[global])),
+ <<"abcdddXku">> = iolist_to_binary(re:replace("abcd","(.*(.)?)*","&dd\\1\\1Xku",[])),
+ <<"abcdddXkuddXku">> = iolist_to_binary(re:replace("abcd","(.*(.)?)*","&dd\\1\\1Xku",[global])),
+ <<"pkdLVDscUDDEBUBabcd">> = iolist_to_binary(re:replace("abcd","( (A | (?(1)0|) )* )","pkd&L&VD&scUDDEBUB",[extended])),
+ <<"pkdLVDscUDDEBUBapkdLVDscUDDEBUBbpkdLVDscUDDEBUBcpkdLVDscUDDEBUBdpkdLVDscUDDEBUB">> = iolist_to_binary(re:replace("abcd","( (A | (?(1)0|) )* )","pkd&L&VD&scUDDEBUB",[extended,
+ global])),
+ <<"AuDgWsdmnqYhabcd">> = iolist_to_binary(re:replace("abcd","( ( (?(1)0|) )* )","AuDgW&s&dm&nqYh",[extended])),
+ <<"AuDgWsdmnqYhaAuDgWsdmnqYhbAuDgWsdmnqYhcAuDgWsdmnqYhdAuDgWsdmnqYh">> = iolist_to_binary(re:replace("abcd","( ( (?(1)0|) )* )","AuDgW&s&dm&nqYh",[extended,
+ global])),
+ <<"efinTcnmBlVFabcd">> = iolist_to_binary(re:replace("abcd","( (?(1)0|)* )","efinTc&nmB&\\1lV\\1F",[extended])),
+ <<"efinTcnmBlVFaefinTcnmBlVFbefinTcnmBlVFcefinTcnmBlVFdefinTcnmBlVF">> = iolist_to_binary(re:replace("abcd","( (?(1)0|)* )","efinTc&nmB&\\1lV\\1F",[extended,
+ global])),
+ <<"EDiUXiAlYBAmCeNc">> = iolist_to_binary(re:replace("a]","[[:abcd:xyz]]","EDiUXiAlYBA\\1mCeNc",[])),
+ <<"EDiUXiAlYBAmCeNc">> = iolist_to_binary(re:replace("a]","[[:abcd:xyz]]","EDiUXiAlYBA\\1mCeNc",[global])),
+ <<"k:]h">> = iolist_to_binary(re:replace(":]","[[:abcd:xyz]]","k&h",[])),
+ <<"k:]h">> = iolist_to_binary(re:replace(":]","[[:abcd:xyz]]","k&h",[global])),
+ <<"hwNfUgfOoCtFayhAXX">> = iolist_to_binary(re:replace("a","[abc[:x\\]pqr]","hwNfUgfOo\\1CtF&yhA\\1XX",[])),
+ <<"hwNfUgfOoCtFayhAXX">> = iolist_to_binary(re:replace("a","[abc[:x\\]pqr]","hwNfUgfOo\\1CtF&yhA\\1XX",[global])),
+ <<"">> = iolist_to_binary(re:replace("[","[abc[:x\\]pqr]","\\1\\1",[])),
+ <<"">> = iolist_to_binary(re:replace("[","[abc[:x\\]pqr]","\\1\\1",[global])),
+ <<"fWMiJLaBnsaYQ">> = iolist_to_binary(re:replace(":","[abc[:x\\]pqr]","fWMiJLaBns\\1aYQ",[])),
+ <<"fWMiJLaBnsaYQ">> = iolist_to_binary(re:replace(":","[abc[:x\\]pqr]","fWMiJLaBns\\1aYQ",[global])),
+ <<"IlPjDF">> = iolist_to_binary(re:replace("]","[abc[:x\\]pqr]","IlPjDF\\1",[])),
+ <<"IlPjDF">> = iolist_to_binary(re:replace("]","[abc[:x\\]pqr]","IlPjDF\\1",[global])),
+ <<"jXFpSOncoxfPi">> = iolist_to_binary(re:replace("p","[abc[:x\\]pqr]","\\1jX\\1F&SOncoxf\\1Pi",[])),
+ <<"jXFpSOncoxfPi">> = iolist_to_binary(re:replace("p","[abc[:x\\]pqr]","\\1jX\\1F&SOncoxf\\1Pi",[global])),
+ <<"fooabcfoo">> = iolist_to_binary(re:replace("fooabcfoo",".*[op][xyz]","rU&wHuSyHLW\\1WUJxg\\1",[])),
+ <<"fooabcfoo">> = iolist_to_binary(re:replace("fooabcfoo",".*[op][xyz]","rU&wHuSyHLW\\1WUJxg\\1",[global])),
+ <<"Yadc">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)","\\1\\1Y",[])),
+ <<"Yadc">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)","\\1\\1Y",[global])),
+ <<"asQWunbuTsJvhIUbTxKxbc">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)","sQWun&uTsJvhIU&TxKx&",[])),
+ <<"asQWunbuTsJvhIUbTxKxbc">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)","sQWun&uTsJvhIU&TxKx&",[global])),
+ <<"WsShpCMbadc">> = iolist_to_binary(re:replace("adc","(?(?=^.*b)b|^)","WsShp\\1\\1C\\1Mb",[])),
+ <<"WsShpCMbadc">> = iolist_to_binary(re:replace("adc","(?(?=^.*b)b|^)","WsShp\\1\\1C\\1Mb",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?(?=^.*b)b|^)","PkFnM\\1TJjij\\1s",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(?(?=^.*b)b|^)","PkFnM\\1TJjij\\1s",[global])),
+ <<"QgracuqfskDadc">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)*","Qg\\1r\\1\\1acuqfskD\\1&",[])),
+ <<"QgracuqfskDaQgracuqfskDdQgracuqfskDcQgracuqfskD">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)*","Qg\\1r\\1\\1acuqfskD\\1&",[global])),
+ <<"NOaxcgWJQdJabc">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)*","NOaxc\\1\\1gWJQdJ&",[])),
+ <<"NOaxcgWJQdJaNOaxcgWJQdJbNOaxcgWJQdJcNOaxcgWJQdJ">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)*","NOaxc\\1\\1gWJQdJ&",[global])),
+ ok.
+run37() ->
+ <<"egMccJuvVmsJadc">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)+","egMccJu&\\1vVmsJ",[])),
+ <<"egMccJuvVmsJadc">> = iolist_to_binary(re:replace("adc","(?(?=.*b)b|^)+","egMccJu&\\1vVmsJ",[global])),
+ <<"awbKLc">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)+","wbKL",[])),
+ <<"awbKLc">> = iolist_to_binary(re:replace("abc","(?(?=.*b)b|^)+","wbKL",[global])),
+ <<"aaOKbMsgbwbYMvqpaKc">> = iolist_to_binary(re:replace("abc","(?(?=b).*b|^d)","aOK\\1&Msg&w&YMvqpaK",[])),
+ <<"aaOKbMsgbwbYMvqpaKc">> = iolist_to_binary(re:replace("abc","(?(?=b).*b|^d)","aOK\\1&Msg&w&YMvqpaK",[global])),
+ <<"deMQjInIpkdMc">> = iolist_to_binary(re:replace("abc","(?(?=.*b).*b|^d)","deMQjInI\\1\\1pk\\1dM",[])),
+ <<"deMQjInIpkdMc">> = iolist_to_binary(re:replace("abc","(?(?=.*b).*b|^d)","deMQjInI\\1\\1pk\\1dM",[global])),
+ <<"xONBt%ab%fkt">> = iolist_to_binary(re:replace("%ab%","^%((?(?=[a])[^%])|b)*%$","xONBt\\1&fkt",[])),
+ <<"xONBt%ab%fkt">> = iolist_to_binary(re:replace("%ab%","^%((?(?=[a])[^%])|b)*%$","xONBt\\1&fkt",[global])),
+ <<"XtGNvTytylTOX">> = iolist_to_binary(re:replace("XabX","(?i)a(?-i)b|c","tGN\\1\\1vT\\1yty\\1lTO",[])),
+ <<"XtGNvTytylTOX">> = iolist_to_binary(re:replace("XabX","(?i)a(?-i)b|c","tGN\\1\\1vT\\1yty\\1lTO",[global])),
+ <<"XAbMBAbVAbatgNrMNMDX">> = iolist_to_binary(re:replace("XAbX","(?i)a(?-i)b|c","&MB\\1&V&\\1atgNrMNMD",[])),
+ <<"XAbMBAbVAbatgNrMNMDX">> = iolist_to_binary(re:replace("XAbX","(?i)a(?-i)b|c","&MB\\1&V&\\1atgNrMNMD",[global])),
+ <<"CIeFFRMtpcC">> = iolist_to_binary(re:replace("CcC","(?i)a(?-i)b|c","IeFFRMtp&",[])),
+ <<"CIeFFRMtpcC">> = iolist_to_binary(re:replace("CcC","(?i)a(?-i)b|c","IeFFRMtp&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?i)a(?-i)b|c","sJoTR\\1agT&QVpj&oo",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?i)a(?-i)b|c","sJoTR\\1agT&QVpj&oo",[global])),
+ <<"XABX">> = iolist_to_binary(re:replace("XABX","(?i)a(?-i)b|c","Bx\\1L&vYQ&o",[])),
+ <<"XABX">> = iolist_to_binary(re:replace("XABX","(?i)a(?-i)b|c","Bx\\1L&vYQ&o",[global])),
+ <<"bPwO">> = iolist_to_binary(re:replace("
+ ","[\\x00-\\xff\\s]+","bPwO",[])),
+ <<"bPwO">> = iolist_to_binary(re:replace("
+ ","[\\x00-\\xff\\s]+","bPwO",[global])),
+ <<"tNnUXVoKd">> = iolist_to_binary(re:replace("?","^\\c","tNnUXVoKd\\1",[])),
+ <<"tNnUXVoKd">> = iolist_to_binary(re:replace("?","^\\c","tNnUXVoKd\\1",[global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1","Xcx",[caseless])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1","Xcx",[caseless,
+ global])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1","yV\\1&bIy&bf",[])),
+ <<"abc">> = iolist_to_binary(re:replace("abc","(abc)\\1","yV\\1&bIy&bf",[global])),
+ <<"12llNQ12abc">> = iolist_to_binary(re:replace("12abc","[^a]*","&llNQ\\1&\\1",[caseless])),
+ <<"12llNQ12llNQabcllNQbcllNQ">> = iolist_to_binary(re:replace("12abc","[^a]*","&llNQ\\1&\\1",[caseless,
+ global])),
+ <<"gDpABC">> = iolist_to_binary(re:replace("12ABC","[^a]*","gDp",[caseless])),
+ <<"gDpgDpAgDpgDp">> = iolist_to_binary(re:replace("12ABC","[^a]*","gDp",[caseless,
+ global])),
+ <<"DTxabc">> = iolist_to_binary(re:replace("12abc","[^a]*+","D\\1T\\1x",[caseless])),
+ <<"DTxDTxaDTxDTx">> = iolist_to_binary(re:replace("12abc","[^a]*+","D\\1T\\1x",[caseless,
+ global])),
+ <<"KJ12jqgNXmTv12lyEP12SABC">> = iolist_to_binary(re:replace("12ABC","[^a]*+","KJ&jqgNXm\\1Tv&lyE\\1P&S",[caseless])),
+ <<"KJ12jqgNXmTv12lyEP12SKJjqgNXmTvlyEPSAKJBCjqgNXmTvBClyEPBCSKJjqgNXmTvlyEPS">> = iolist_to_binary(re:replace("12ABC","[^a]*+","KJ&jqgNXm\\1Tv&lyE\\1P&S",[caseless,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","[^a]*?X","Px&vXsBEFCysfMhDqV\\1P",[caseless])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","[^a]*?X","Px&vXsBEFCysfMhDqV\\1P",[caseless,
+ global])),
+ <<"12abc">> = iolist_to_binary(re:replace("12abc","[^a]*?X","q\\1a\\1jtOoCrLWAYsie",[caseless])),
+ <<"12abc">> = iolist_to_binary(re:replace("12abc","[^a]*?X","q\\1a\\1jtOoCrLWAYsie",[caseless,
global])),
-?line <<"LjAUxSNabcd">> = iolist_to_binary(re:replace("abcd","( (?(1)0|)* )","L\\1jAUxSN\\1",[extended])),
-?line <<"LjAUxSNaLjAUxSNbLjAUxSNcLjAUxSNdLjAUxSN">> = iolist_to_binary(re:replace("abcd","( (?(1)0|)* )","L\\1jAUxSN\\1",[extended,
+ <<"12ABC">> = iolist_to_binary(re:replace("12ABC","[^a]*?X","LCDXsQB\\1&fP&vNDlCH\\1",[caseless])),
+ <<"12ABC">> = iolist_to_binary(re:replace("12ABC","[^a]*?X","LCDXsQB\\1&fP&vNDlCH\\1",[caseless,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","[^a]+?X","g&\\1\\1wRCp",[caseless])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","[^a]+?X","g&\\1\\1wRCp",[caseless,
+ global])),
+ <<"12abc">> = iolist_to_binary(re:replace("12abc","[^a]+?X","PO&\\1NINrfwP&\\1AcHiEa",[caseless])),
+ <<"12abc">> = iolist_to_binary(re:replace("12abc","[^a]+?X","PO&\\1NINrfwP&\\1AcHiEa",[caseless,
+ global])),
+ <<"12ABC">> = iolist_to_binary(re:replace("12ABC","[^a]+?X","LesucI&TIspq&O\\1AkOp",[caseless])),
+ <<"12ABC">> = iolist_to_binary(re:replace("12ABC","[^a]+?X","LesucI&TIspq&O\\1AkOp",[caseless,
+ global])),
+ <<"12arSestlSfXbcX">> = iolist_to_binary(re:replace("12aXbcX","[^a]?X","\\1rSestlSf\\1&",[caseless])),
+ <<"12arSestlSfXbrSestlSfcX">> = iolist_to_binary(re:replace("12aXbcX","[^a]?X","\\1rSestlSf\\1&",[caseless,
+ global])),
+ <<"12AVBtPBCX">> = iolist_to_binary(re:replace("12AXBCX","[^a]?X","VBtP",[caseless])),
+ <<"12AVBtPBVBtP">> = iolist_to_binary(re:replace("12AXBCX","[^a]?X","VBtP",[caseless,
+ global])),
+ <<"BCXcYCXS">> = iolist_to_binary(re:replace("BCX","[^a]?X","&cY&S\\1",[caseless])),
+ <<"BCXcYCXS">> = iolist_to_binary(re:replace("BCX","[^a]?X","&cY&S\\1",[caseless,
+ global])),
+ <<"12aMPavbiGCbcX">> = iolist_to_binary(re:replace("12aXbcX","[^a]??X","MPavbi\\1GC",[caseless])),
+ <<"12aMPavbiGCbMPavbiGC">> = iolist_to_binary(re:replace("12aXbcX","[^a]??X","MPavbi\\1GC",[caseless,
+ global])),
+ <<"12AOTaIyfCCPBCX">> = iolist_to_binary(re:replace("12AXBCX","[^a]??X","OTaIy\\1fC\\1CP",[caseless])),
+ <<"12AOTaIyfCCPBOTaIyfCCP">> = iolist_to_binary(re:replace("12AXBCX","[^a]??X","OTaIy\\1fC\\1CP",[caseless,
+ global])),
+ <<"BCXlQqcJ">> = iolist_to_binary(re:replace("BCX","[^a]??X","&\\1l\\1QqcJ",[caseless])),
+ <<"BCXlQqcJ">> = iolist_to_binary(re:replace("BCX","[^a]??X","&\\1l\\1QqcJ",[caseless,
+ global])),
+ <<"12aXbEPWWBEweltvRcX">> = iolist_to_binary(re:replace("12aXbcX","[^a]?+X","EPWWBEweltvR&",[caseless])),
+ <<"12aXbEPWWBEweltvRcX">> = iolist_to_binary(re:replace("12aXbcX","[^a]?+X","EPWWBEweltvR&",[caseless,
+ global])),
+ <<"12AXBLDKxRfr">> = iolist_to_binary(re:replace("12AXBCX","[^a]?+X","LD\\1KxRfr",[caseless])),
+ <<"12AXBLDKxRfr">> = iolist_to_binary(re:replace("12AXBCX","[^a]?+X","LD\\1KxRfr",[caseless,
+ global])),
+ <<"BaWkje">> = iolist_to_binary(re:replace("BCX","[^a]?+X","aWkje",[caseless])),
+ <<"BaWkje">> = iolist_to_binary(re:replace("BCX","[^a]?+X","aWkje",[caseless,
+ global])),
+ <<"alsDrlAVvgef">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}","lsDrlAVvg",[caseless])),
+ <<"alsDrlAVvglsDrlAVvg">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}","lsDrlAVvg",[caseless,
+ global])),
+ <<"AWnBBhxrEF">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}","WnBBhxr\\1",[caseless])),
+ <<"AWnBBhxrWnBBhxr">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}","WnBBhxr\\1",[caseless,
+ global])),
+ <<"aQlBRWDWodef">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}?","QlBRWDWo",[caseless])),
+ <<"aQlBRWDWoQlBRWDWof">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}?","QlBRWDWo",[caseless,
+ global])),
+ <<"ADysgJSywfPBCKKUUWYDEF">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}?","DysgJSywfP\\1&KKUUWY",[caseless])),
+ <<"ADysgJSywfPBCKKUUWYDysgJSywfPDEKKUUWYF">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}?","DysgJSywfP\\1&KKUUWY",[caseless,
+ global])),
+ <<"aWjgnJGWef">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}+","WjgnJ\\1GW",[caseless])),
+ <<"aWjgnJGWWjgnJGW">> = iolist_to_binary(re:replace("abcdef","[^a]{2,3}+","WjgnJ\\1GW",[caseless,
+ global])),
+ <<"ArlhBCDwHgMHHwjEiAEF">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}+","rlh&wHgMHHwjEiA",[caseless])),
+ <<"ArlhBCDwHgMHHwjEiArlhEFwHgMHHwjEiA">> = iolist_to_binary(re:replace("ABCDEF","[^a]{2,3}+","rlh&wHgMHHwjEiA",[caseless,
+ global])),
+ <<"JdTSxtdMYhvAoaO">> = iolist_to_binary(re:replace("Z","((a|)+)+Z","JdTSxtdMYhv\\1AoaO",[])),
+ <<"JdTSxtdMYhvAoaO">> = iolist_to_binary(re:replace("Z","((a|)+)+Z","JdTSxtdMYhv\\1AoaO",[global])),
+ ok.
+run38() ->
+ <<"dAWFejmOJacpU">> = iolist_to_binary(re:replace("ac","(a)b|(a)c","dA\\1\\1WFejmOJ&pU",[])),
+ <<"dAWFejmOJacpU">> = iolist_to_binary(re:replace("ac","(a)b|(a)c","dA\\1\\1WFejmOJ&pU",[global])),
+ <<"XacWp">> = iolist_to_binary(re:replace("ac","(?>(a))b|(a)c","X&Wp",[])),
+ <<"XacWp">> = iolist_to_binary(re:replace("ac","(?>(a))b|(a)c","X&Wp",[global])),
+ <<"VypacbfdlXdCGJofacdRt">> = iolist_to_binary(re:replace("ac","(?=(a))ab|(a)c","Vyp&bfdlXdCGJo\\1f&dRt",[])),
+ <<"VypacbfdlXdCGJofacdRt">> = iolist_to_binary(re:replace("ac","(?=(a))ab|(a)c","Vyp&bfdlXdCGJo\\1f&dRt",[global])),
+ <<"soXacAL">> = iolist_to_binary(re:replace("ac","((?>(a))b|(a)c)","soX&AL",[])),
+ <<"soXacAL">> = iolist_to_binary(re:replace("ac","((?>(a))b|(a)c)","soX&AL",[global])),
+ <<"ackacTacsYVlYVjKacCEL">> = iolist_to_binary(re:replace("ac","((?>(a))b|(a)c)++","&k\\1T&sYVlYVjK&CEL",[])),
+ <<"ackacTacsYVlYVjKacCEL">> = iolist_to_binary(re:replace("ac","((?>(a))b|(a)c)++","&k\\1T&sYVlYVjK&CEL",[global])),
+ <<"qiUiactJ">> = iolist_to_binary(re:replace("ac","(?:(?>(a))b|(a)c)++","qiUi&tJ\\1",[])),
+ <<"qiUiactJ">> = iolist_to_binary(re:replace("ac","(?:(?>(a))b|(a)c)++","qiUi&tJ\\1",[global])),
+ <<"KkacqeX">> = iolist_to_binary(re:replace("ac","(?=(?>(a))b|(a)c)(..)","Kk&qeX",[])),
+ <<"KkacqeX">> = iolist_to_binary(re:replace("ac","(?=(?>(a))b|(a)c)(..)","Kk&qeX",[global])),
+ <<"dtNNac">> = iolist_to_binary(re:replace("ac","(?>(?>(a))b|(a)c)","dtNN&",[])),
+ <<"dtNNac">> = iolist_to_binary(re:replace("ac","(?>(?>(a))b|(a)c)","dtNN&",[global])),
+ <<"maaaabaaabaababGEUEgWaaaabaaabaababRaaaabaaabaababYtLSDKaaaabaaabaababA">> = iolist_to_binary(re:replace("aaaabaaabaabab","((?>(a+)b)+(aabab))","m&GEUEgW\\1R&YtLSDK\\1A",[])),
+ <<"maaaabaaabaababGEUEgWaaaabaaabaababRaaaabaaabaababYtLSDKaaaabaaabaababA">> = iolist_to_binary(re:replace("aaaabaaabaabab","((?>(a+)b)+(aabab))","m&GEUEgW\\1R&YtLSDK\\1A",[global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","(?>a+|ab)+?c","hd\\1shPpIuFmAa\\1aJk&q",[])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","(?>a+|ab)+?c","hd\\1shPpIuFmAa\\1aJk&q",[global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","(?>a+|ab)+c","ekKjsw&",[])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","(?>a+|ab)+c","ekKjsw&",[global])),
+ <<"KRQcpPbvHhi">> = iolist_to_binary(re:replace("aabc","(?:a+|ab)+c","KRQcpPbvHhi",[])),
+ <<"KRQcpPbvHhi">> = iolist_to_binary(re:replace("aabc","(?:a+|ab)+c","KRQcpPbvHhi",[global])),
+ <<"iamaarURhafOTI">> = iolist_to_binary(re:replace("a","(?(?=(a))a)","i&m&&rURh\\1fOTI",[])),
+ <<"iamaarURhafOTIimrURhfOTI">> = iolist_to_binary(re:replace("a","(?(?=(a))a)","i&m&&rURh\\1fOTI",[global])),
+ <<"aba">> = iolist_to_binary(re:replace("ab","(?(?=(a))a)(b)","&a",[])),
+ <<"aba">> = iolist_to_binary(re:replace("ab","(?(?=(a))a)(b)","&a",[global])),
+ <<"aaaabc">> = iolist_to_binary(re:replace("aaaabc","^(?:a|ab)++c","Siik\\1BdqOkNdp\\1",[])),
+ <<"aaaabc">> = iolist_to_binary(re:replace("aaaabc","^(?:a|ab)++c","Siik\\1BdqOkNdp\\1",[global])),
+ <<"aaaabc">> = iolist_to_binary(re:replace("aaaabc","^(?>a|ab)++c","LpFM&EcaXt\\1b\\1",[])),
+ <<"aaaabc">> = iolist_to_binary(re:replace("aaaabc","^(?>a|ab)++c","LpFM&EcaXt\\1b\\1",[global])),
+ <<"FNLSSaaaabcr">> = iolist_to_binary(re:replace("aaaabc","^(?:a|ab)+c","FNLSS&r",[])),
+ <<"FNLSSaaaabcr">> = iolist_to_binary(re:replace("aaaabc","^(?:a|ab)+c","FNLSS&r",[global])),
+ <<"TxGxyzQbpeqVTpoEkrYqxyz">> = iolist_to_binary(re:replace("xyz","(?=abc){0}xyz","TxG\\1&QbpeqVTpoEkrYq&",[])),
+ <<"TxGxyzQbpeqVTpoEkrYqxyz">> = iolist_to_binary(re:replace("xyz","(?=abc){0}xyz","TxG\\1&QbpeqVTpoEkrYq&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?=abc){1}xyz","cR\\1y\\1Q\\1&okEra\\1h",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?=abc){1}xyz","cR\\1y\\1Q\\1&okEra\\1h",[global])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","(?=abc){1}xyz","reg\\1lU\\1RfQVPuOHJA\\1Cq",[])),
+ <<"xyz">> = iolist_to_binary(re:replace("xyz","(?=abc){1}xyz","reg\\1lU\\1RfQVPuOHJA\\1Cq",[global])),
+ <<"xcPaaLxpkaXVHb">> = iolist_to_binary(re:replace("ab","(?=(a))?.","xcP\\1aLxpkaXVH",[])),
+ <<"xcPaaLxpkaXVHxcPaLxpkaXVH">> = iolist_to_binary(re:replace("ab","(?=(a))?.","xcP\\1aLxpkaXVH",[global])),
+ <<"sOiVGLUSbixjsOGc">> = iolist_to_binary(re:replace("bc","(?=(a))?.","s\\1OiVGLUS&ixjsOG",[])),
+ <<"sOiVGLUSbixjsOGsOiVGLUScixjsOG">> = iolist_to_binary(re:replace("bc","(?=(a))?.","s\\1OiVGLUS&ixjsOG",[global])),
+ ok.
+run39() ->
+ <<"VDuEPkfWcTxyeUaBWb">> = iolist_to_binary(re:replace("ab","(?=(a))??.","VDuEPkfWcTxyeU&BW",[])),
+ <<"VDuEPkfWcTxyeUaBWVDuEPkfWcTxyeUbBW">> = iolist_to_binary(re:replace("ab","(?=(a))??.","VDuEPkfWcTxyeU&BW",[global])),
+ <<"mbbCUVsGVbqKPXic">> = iolist_to_binary(re:replace("bc","(?=(a))??.","m&bCUVsGVbqKPXi",[])),
+ <<"mbbCUVsGVbqKPXimcbCUVsGVbqKPXi">> = iolist_to_binary(re:replace("bc","(?=(a))??.","m&bCUVsGVbqKPXi",[global])),
+ <<"vckgammon">> = iolist_to_binary(re:replace("backgammon","^(?=(a)){0}b(?1)","v",[])),
+ <<"vckgammon">> = iolist_to_binary(re:replace("backgammon","^(?=(a)){0}b(?1)","v",[global])),
+ <<"jwhBBBtpN">> = iolist_to_binary(re:replace("abd","^(?=(?1))?[az]([abc])d","jwhBBBtpN",[])),
+ <<"jwhBBBtpN">> = iolist_to_binary(re:replace("abd","^(?=(?1))?[az]([abc])d","jwhBBBtpN",[global])),
+ <<"zcdBcKYPcEyoXnxVFxx">> = iolist_to_binary(re:replace("zcdxx","^(?=(?1))?[az]([abc])d","&B\\1KYPcEyoXnxVF",[])),
+ <<"zcdBcKYPcEyoXnxVFxx">> = iolist_to_binary(re:replace("zcdxx","^(?=(?1))?[az]([abc])d","&B\\1KYPcEyoXnxVF",[global])),
+ <<"eaaaaacuRrwVlw">> = iolist_to_binary(re:replace("aaaaa","^(?!a){0}\\w+","e&cuR\\1rwVlw",[])),
+ <<"eaaaaacuRrwVlw">> = iolist_to_binary(re:replace("aaaaa","^(?!a){0}\\w+","e&cuR\\1rwVlw",[global])),
+ <<"abcrjCWbwUOujlotBJKabcTxyz">> = iolist_to_binary(re:replace("abcxyz","(?<=(abc))?xyz","rjCWbwUOujlotBJK\\1T&",[])),
+ <<"abcrjCWbwUOujlotBJKabcTxyz">> = iolist_to_binary(re:replace("abcxyz","(?<=(abc))?xyz","rjCWbwUOujlotBJK\\1T&",[global])),
+ <<"pqrMKeGrgiv">> = iolist_to_binary(re:replace("pqrxyz","(?<=(abc))?xyz","MKeGrgi\\1v",[])),
+ <<"pqrMKeGrgiv">> = iolist_to_binary(re:replace("pqrxyz","(?<=(abc))?xyz","MKeGrgi\\1v",[global])),
+ <<"RxQ">> = iolist_to_binary(re:replace("ggg<<<aaa>>>","^[\\g<a>]+","\\1RxQ",[])),
+ <<"RxQ">> = iolist_to_binary(re:replace("ggg<<<aaa>>>","^[\\g<a>]+","\\1RxQ",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\g<a>]+","dH",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^[\\g<a>]+","dH",[global])),
+ <<"\\ga">> = iolist_to_binary(re:replace("\\ga","^[\\g<a>]+","Uga",[])),
+ <<"\\ga">> = iolist_to_binary(re:replace("\\ga","^[\\g<a>]+","Uga",[global])),
+ <<"kGIjWAmWxlixyz">> = iolist_to_binary(re:replace("gggagagaxyz","^[\\ga]+","kGIjWAmWxli",[])),
+ <<"kGIjWAmWxlixyz">> = iolist_to_binary(re:replace("gggagagaxyz","^[\\ga]+","kGIjWAmWxli",[global])),
+ <<"aaaa444:::osjAfaaaa444:::myeRjZ">> = iolist_to_binary(re:replace("aaaa444:::Z","^[:a[:digit:]]+","&\\1osjAf&my\\1e\\1Rj",[])),
+ <<"aaaa444:::osjAfaaaa444:::myeRjZ">> = iolist_to_binary(re:replace("aaaa444:::Z","^[:a[:digit:]]+","&\\1osjAf&my\\1e\\1Rj",[global])),
+ <<"qSUaaaa444:::bbbthaaaa444:::bbboRHpyZ">> = iolist_to_binary(re:replace("aaaa444:::bbbZ","^[:a[:digit:]:b]+","qSU&th&oR\\1Hpy",[])),
+ <<"qSUaaaa444:::bbbthaaaa444:::bbboRHpyZ">> = iolist_to_binary(re:replace("aaaa444:::bbbZ","^[:a[:digit:]:b]+","qSU&th&oR\\1Hpy",[global])),
+ <<"mxfweUe">> = iolist_to_binary(re:replace(":xxx:","[:a]xxx[b:]","mxf\\1weUe",[])),
+ <<"mxfweUe">> = iolist_to_binary(re:replace(":xxx:","[:a]xxx[b:]","mxf\\1weUe",[global])),
+ <<"xaaVrvSafReLAbLfQXc">> = iolist_to_binary(re:replace("xaabc","(?<=a{2})b","Vr\\1vSafReLA&\\1LfQX",[caseless])),
+ <<"xaaVrvSafReLAbLfQXc">> = iolist_to_binary(re:replace("xaabc","(?<=a{2})b","Vr\\1vSafReLA&\\1LfQX",[caseless,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=a{2})b","fcR",[caseless])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=a{2})b","fcR",[caseless,
+ global])),
+ <<"xabc">> = iolist_to_binary(re:replace("xabc","(?<=a{2})b","BoRyoqeTXWscX",[caseless])),
+ <<"xabc">> = iolist_to_binary(re:replace("xabc","(?<=a{2})b","BoRyoqeTXWscX",[caseless,
+ global])),
+ <<"xabc">> = iolist_to_binary(re:replace("xabc","(?<!a{2})b","&",[caseless])),
+ <<"xabc">> = iolist_to_binary(re:replace("xabc","(?<!a{2})b","&",[caseless,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<!a{2})b","\\1o\\1eK\\1cENK\\1&djd",[caseless])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<!a{2})b","\\1o\\1eK\\1cENK\\1&djd",[caseless,
+ global])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<!a{2})b","&&o&KwHJm",[caseless])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<!a{2})b","&&o&KwHJm",[caseless,
+ global])),
+ <<"xa ccEEJTcFn">> = iolist_to_binary(re:replace("xa c","(?<=a\\h)c","&&EEJ\\1T&F\\1n",[])),
+ <<"xa ccEEJTcFn">> = iolist_to_binary(re:replace("xa c","(?<=a\\h)c","&&EEJ\\1T&F\\1n",[global])),
+ <<"axxYHmPRLyCdYeBCTMFc">> = iolist_to_binary(re:replace("axxbc","(?<=[^a]{2})b","YHmPRLyCdYeBCTMF",[])),
+ <<"axxYHmPRLyCdYeBCTMFc">> = iolist_to_binary(re:replace("axxbc","(?<=[^a]{2})b","YHmPRLyCdYeBCTMF",[global])),
+ <<"aAAIbac">> = iolist_to_binary(re:replace("aAAbc","(?<=[^a]{2})b","I&a",[])),
+ <<"aAAIbac">> = iolist_to_binary(re:replace("aAAbc","(?<=[^a]{2})b","I&a",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^a]{2})b","Qosgls",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^a]{2})b","Qosgls",[global])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<=[^a]{2})b","Iry\\1",[])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<=[^a]{2})b","Iry\\1",[global])),
+ <<"axxbbc">> = iolist_to_binary(re:replace("axxbc","(?<=[^a]{2})b","&&",[caseless])),
+ <<"axxbbc">> = iolist_to_binary(re:replace("axxbc","(?<=[^a]{2})b","&&",[caseless,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^a]{2})b","oNddUdB\\1XA",[caseless])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=[^a]{2})b","oNddUdB\\1XA",[caseless,
+ global])),
+ <<"aAAbc">> = iolist_to_binary(re:replace("aAAbc","(?<=[^a]{2})b","boNOPUMfK&\\1",[caseless])),
+ <<"aAAbc">> = iolist_to_binary(re:replace("aAAbc","(?<=[^a]{2})b","boNOPUMfK&\\1",[caseless,
+ global])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<=[^a]{2})b","W&iffNoQ\\1",[caseless])),
+ <<"xaabc">> = iolist_to_binary(re:replace("xaabc","(?<=[^a]{2})b","W&iffNoQ\\1",[caseless,
+ global])),
+ <<"abKnqCjyP">> = iolist_to_binary(re:replace("abc","(?<=a\\H)c","KnqCjyP",[])),
+ <<"abKnqCjyP">> = iolist_to_binary(re:replace("abc","(?<=a\\H)c","KnqCjyP",[global])),
+ <<"abTxeCfVaOhSYo">> = iolist_to_binary(re:replace("abc","(?<=a\\V)c","TxeCfV\\1aOhSYo",[])),
+ <<"abTxeCfVaOhSYo">> = iolist_to_binary(re:replace("abc","(?<=a\\V)c","TxeCfV\\1aOhSYo",[global])),
+ <<"a
+gxsYrXgNx">> = iolist_to_binary(re:replace("a
+c","(?<=a\\v)c","g\\1\\1xs\\1Yr\\1XgN\\1x",[])),
+ <<"a
+gxsYrXgNx">> = iolist_to_binary(re:replace("a
+c","(?<=a\\v)c","g\\1\\1xs\\1Yr\\1XgN\\1x",[global])),
+ <<"XcccddYLX">> = iolist_to_binary(re:replace("XcccddYX","(?(?=c)c|d)++Y","&L",[])),
+ <<"XcccddYLX">> = iolist_to_binary(re:replace("XcccddYX","(?(?=c)c|d)++Y","&L",[global])),
+ <<"XjcccddYxcccddYymX">> = iolist_to_binary(re:replace("XcccddYX","(?(?=c)c|d)*+Y","j&x\\1&\\1\\1ym",[])),
+ <<"XjcccddYxcccddYymX">> = iolist_to_binary(re:replace("XcccddYX","(?(?=c)c|d)*+Y","j&x\\1&\\1\\1ym",[global])),
+ ok.
+run40() ->
+ <<"P">> = iolist_to_binary(re:replace("aaaaaaa","^(a{2,3}){2,}+a","P",[])),
+ <<"P">> = iolist_to_binary(re:replace("aaaaaaa","^(a{2,3}){2,}+a","P",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3}){2,}+a","&AJ",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3}){2,}+a","&AJ",[global])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3}){2,}+a","bT&aphetNw&xcisR",[])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3}){2,}+a","bT&aphetNw&xcisR",[global])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a{2,3}){2,}+a","g",[])),
+ <<"aaaaaaaaa">> = iolist_to_binary(re:replace("aaaaaaaaa","^(a{2,3}){2,}+a","g",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3})++a","U",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3})++a","U",[global])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3})++a","CjQf&BIE\\1m&vHKyV",[])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3})++a","CjQf&BIE\\1m&vHKyV",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3})*+a","jEe&kL&\\1Wd",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a{2,3})*+a","jEe&kL&\\1Wd",[global])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3})*+a","&VFXL\\1JOa\\1dHl&Yw",[])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(a{2,3})*+a","&VFXL\\1JOa\\1dHl&Yw",[global])),
+ <<"fByANGarQU">> = iolist_to_binary(re:replace("abXde","ab\\Cde","\\1fByANGarQ\\1U",[])),
+ <<"fByANGarQU">> = iolist_to_binary(re:replace("abXde","ab\\Cde","\\1fByANGarQ\\1U",[global])),
+ <<"abZdeXdDJIltBeDyobKXo">> = iolist_to_binary(re:replace("abZdeX","(?<=ab\\Cde)X","&dDJIltBeDyobK&o",[])),
+ <<"abZdeXdDJIltBeDyobKXo">> = iolist_to_binary(re:replace("abZdeX","(?<=ab\\Cde)X","&dDJIltBeDyobK&o",[global])),
+ <<"hv">> = iolist_to_binary(re:replace("aCb","a[\\CD]b","h\\1v",[])),
+ <<"hv">> = iolist_to_binary(re:replace("aCb","a[\\CD]b","h\\1v",[global])),
+ <<"waDbEkr">> = iolist_to_binary(re:replace("aDb","a[\\CD]b","w&Ekr",[])),
+ <<"waDbEkr">> = iolist_to_binary(re:replace("aDb","a[\\CD]b","w&Ekr",[global])),
+ <<"RCcE">> = iolist_to_binary(re:replace("aJb","a[\\C-X]b","R\\1CcE",[])),
+ <<"RCcE">> = iolist_to_binary(re:replace("aJb","a[\\C-X]b","R\\1CcE",[global])),
+ <<"X X">> = iolist_to_binary(re:replace("X X","\\H\\h\\V\\v","B&pquMp\\1NBcoPfQTdr\\1o",[])),
+ <<"X X">> = iolist_to_binary(re:replace("X X","\\H\\h\\V\\v","B&pquMp\\1NBcoPfQTdr\\1o",[global])),
+ <<"bjVX X X X OAvV">> = iolist_to_binary(re:replace("X X ","\\H\\h\\V\\v","bjV&&OAv\\1V",[])),
+ <<"bjVX X X X OAvV">> = iolist_to_binary(re:replace("X X ","\\H\\h\\V\\v","bjV&&OAv\\1V",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\H\\h\\V\\v","Y",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\H\\h\\V\\v","Y",[global])),
+ <<"  X">> = iolist_to_binary(re:replace("  X","\\H\\h\\V\\v","VrvLpiABSBWYG",[])),
+ <<"  X">> = iolist_to_binary(re:replace("  X","\\H\\h\\V\\v","VrvLpiABSBWYG",[global])),
+ <<"UibLPUMxnHgluPEcwP">> = iolist_to_binary(re:replace("  X
+ ","\\H*\\h+\\V?\\v{3,4}","Ui\\1bLPUMxnHgluPEcwP",[])),
+ <<"UibLPUMxnHgluPEcwP">> = iolist_to_binary(re:replace("  X
+ ","\\H*\\h+\\V?\\v{3,4}","Ui\\1bLPUMxnHgluPEcwP",[global])),
+ <<"  
+  
+ YOgvhC">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","&&YOgvhC\\1\\1",[])),
+ <<"  
+  
+ YOgvhC">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","&&YOgvhC\\1\\1",[global])),
+ <<"o  
+ aixbY  
+ BtbY">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","o&aixbY&BtbY\\1",[])),
+ <<"o  
+ aixbY  
+ BtbY">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","o&aixbY&BtbY\\1",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\H*\\h+\\V?\\v{3,4}","orCME\\1H",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\H*\\h+\\V?\\v{3,4}","orCME\\1H",[global])),
+ <<"  
+ ">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","h&L\\1\\1wk\\1",[])),
+ <<"  
+ ">> = iolist_to_binary(re:replace("  
+ ","\\H*\\h+\\V?\\v{3,4}","h&L\\1\\1wk\\1",[global])),
+ <<"XY aeVjRE">> = iolist_to_binary(re:replace("XY ABCDE","\\H{3,4}","aeVjR",[])),
+ <<"XY aeVjRE">> = iolist_to_binary(re:replace("XY ABCDE","\\H{3,4}","aeVjR",[global])),
+ <<"XY inwBHwGPQRKvfoDb ST">> = iolist_to_binary(re:replace("XY PQR ST","\\H{3,4}","in\\1wBHw\\1G&KvfoDb\\1",[])),
+ <<"XY inwBHwGPQRKvfoDb ST">> = iolist_to_binary(re:replace("XY PQR ST","\\H{3,4}","in\\1wBHw\\1G&KvfoDb\\1",[global])),
+ <<"XY AcCVYFB PYkLB PHB PFIQRB PBeQRS">> = iolist_to_binary(re:replace("XY AB PQRS",".\\h{3,4}.","\\1cCVYF&YkL&H&FIQR&Be",[])),
+ <<"XY AcCVYFB PYkLB PHB PFIQRB PBeQRS">> = iolist_to_binary(re:replace("XY AB PQRS",".\\h{3,4}.","\\1cCVYF&YkL&H&FIQR&Be",[global])),
+ <<">XNNNYZEbXNNNYZXNNNYZQsKnuk">> = iolist_to_binary(re:replace(">XNNNYZ","\\h*X\\h?\\H+Y\\H?Z","&E\\1b&&QsKnuk",[])),
+ <<">XNNNYZEbXNNNYZXNNNYZQsKnuk">> = iolist_to_binary(re:replace(">XNNNYZ","\\h*X\\h?\\H+Y\\H?Z","&E\\1b&&QsKnuk",[global])),
+ <<">m">> = iolist_to_binary(re:replace("> X NYQZ","\\h*X\\h?\\H+Y\\H?Z","m",[])),
+ <<">m">> = iolist_to_binary(re:replace("> X NYQZ","\\h*X\\h?\\H+Y\\H?Z","m",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\h*X\\h?\\H+Y\\H?Z","W\\1BBQbt&HF\\1KkXwm\\1Vdn",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\h*X\\h?\\H+Y\\H?Z","W\\1BBQbt&HF\\1KkXwm\\1Vdn",[global])),
+ <<">XYZ">> = iolist_to_binary(re:replace(">XYZ","\\h*X\\h?\\H+Y\\H?Z","&GW",[])),
+ <<">XYZ">> = iolist_to_binary(re:replace(">XYZ","\\h*X\\h?\\H+Y\\H?Z","&GW",[global])),
+ <<"> X NY Z">> = iolist_to_binary(re:replace("> X NY Z","\\h*X\\h?\\H+Y\\H?Z","JIYAqmdtuCSO",[])),
+ <<"> X NY Z">> = iolist_to_binary(re:replace("> X NY Z","\\h*X\\h?\\H+Y\\H?Z","JIYAqmdtuCSO",[global])),
+ <<">vctAlOgcGXY
+Z
+A NN h">> = iolist_to_binary(re:replace(">XY
+Z
+A NN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c","vc\\1tAl\\1O\\1gcG&h\\1",[])),
+ <<">vctAlOgcGXY
+Z
+A NN h">> = iolist_to_binary(re:replace(">XY
+Z
+A NN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c","vc\\1tAl\\1O\\1gcG&h\\1",[global])),
+ <<">bm
+ X
+Y
+ ZZZ
+AAA NNN uAMN">> = iolist_to_binary(re:replace(">
+ X
+Y
+ ZZZ
+AAA NNN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c","bm&\\1uAMN",[])),
+ <<">bm
+ X
+Y
+ ZZZ
+AAA NNN uAMN">> = iolist_to_binary(re:replace(">
+ X
+Y
+ ZZZ
+AAA NNN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c","bm&\\1uAMN",[global])),
+ <<"foojypfoojma">> = iolist_to_binary(re:replace("foobar","(foo)\\Kbar","jyp\\1jma",[])),
+ <<"foojypfoojma">> = iolist_to_binary(re:replace("foobar","(foo)\\Kbar","jyp\\1jma",[global])),
+ <<"fooUcOiqwyxvfoobar">> = iolist_to_binary(re:replace("foobar","(foo)(\\Kbar|baz)","UcOiqwyxv\\1&",[])),
+ <<"fooUcOiqwyxvfoobar">> = iolist_to_binary(re:replace("foobar","(foo)(\\Kbar|baz)","UcOiqwyxv\\1&",[global])),
+ <<"xXfoobazTfoobazneSQcxWfooBA">> = iolist_to_binary(re:replace("foobaz","(foo)(\\Kbar|baz)","xX&T&neSQcxW\\1BA",[])),
+ <<"xXfoobazTfoobazneSQcxWfooBA">> = iolist_to_binary(re:replace("foobaz","(foo)(\\Kbar|baz)","xX&T&neSQcxW\\1BA",[global])),
+ <<"foovYnKbarbazVqfoobarheyiy">> = iolist_to_binary(re:replace("foobarbaz","(foo\\Kbar)baz","vYnK&Vq\\1heyiy",[])),
+ <<"foovYnKbarbazVqfoobarheyiy">> = iolist_to_binary(re:replace("foobarbaz","(foo\\Kbar)baz","vYnK&Vq\\1heyiy",[global])),
+ <<"wYDabPababababbbabZygQUbMBoQiXXXX">> = iolist_to_binary(re:replace("ababababbbabZXXXX","^(a(b))\\1\\g1\\g{1}\\g-1\\g{-1}\\g{-02}Z","wYD\\1P&ygQUbMBoQi",[])),
+ <<"wYDabPababababbbabZygQUbMBoQiXXXX">> = iolist_to_binary(re:replace("ababababbbabZXXXX","^(a(b))\\1\\g1\\g{1}\\g-1\\g{-1}\\g{-02}Z","wYD\\1P&ygQUbMBoQi",[global])),
+ <<"QJyUVPxY">> = iolist_to_binary(re:replace("tom-tom","(?<A>tom|bon)-\\g{A}","QJyUVPxY",[])),
+ <<"QJyUVPxY">> = iolist_to_binary(re:replace("tom-tom","(?<A>tom|bon)-\\g{A}","QJyUVPxY",[global])),
+ <<"bonvRbon-bonECJDijVbonbon-bonnbonYtaYv">> = iolist_to_binary(re:replace("bon-bon","(?<A>tom|bon)-\\g{A}","\\1vR&ECJDijV\\1&n\\1YtaYv",[])),
+ <<"bonvRbon-bonECJDijVbonbon-bonnbonYtaYv">> = iolist_to_binary(re:replace("bon-bon","(?<A>tom|bon)-\\g{A}","\\1vR&ECJDijV\\1&n\\1YtaYv",[global])),
+ <<"bacxxx">> = iolist_to_binary(re:replace("bacxxx","(^(a|b\\g{-1}))","B",[])),
+ <<"bacxxx">> = iolist_to_binary(re:replace("bacxxx","(^(a|b\\g{-1}))","B",[global])),
+ <<"abcHN">> = iolist_to_binary(re:replace("abcabc","(?|(abc)|(xyz))\\1","\\1HN",[])),
+ <<"abcHN">> = iolist_to_binary(re:replace("abcabc","(?|(abc)|(xyz))\\1","\\1HN",[global])),
+ <<"i">> = iolist_to_binary(re:replace("xyzxyz","(?|(abc)|(xyz))\\1","i",[])),
+ <<"i">> = iolist_to_binary(re:replace("xyzxyz","(?|(abc)|(xyz))\\1","i",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?|(abc)|(xyz))\\1","&RDdXS\\1",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?|(abc)|(xyz))\\1","&RDdXS\\1",[global])),
+ <<"abcxyz">> = iolist_to_binary(re:replace("abcxyz","(?|(abc)|(xyz))\\1","xvrTYMBEX",[])),
+ <<"abcxyz">> = iolist_to_binary(re:replace("abcxyz","(?|(abc)|(xyz))\\1","xvrTYMBEX",[global])),
+ <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","(?|(abc)|(xyz))\\1","gkljK\\1CR\\1BykWHcqqC&G",[])),
+ <<"xyzabc">> = iolist_to_binary(re:replace("xyzabc","(?|(abc)|(xyz))\\1","gkljK\\1CR\\1BykWHcqqC&G",[global])),
+ ok.
+run41() ->
+ <<"EaIdWBoabck">> = iolist_to_binary(re:replace("abcabc","(?|(abc)|(xyz))(?1)","EaIdWBo\\1k",[])),
+ <<"EaIdWBoabck">> = iolist_to_binary(re:replace("abcabc","(?|(abc)|(xyz))(?1)","EaIdWBo\\1k",[global])),
+ <<"xyzabcxyzxyzMvxyzjgRaou">> = iolist_to_binary(re:replace("xyzabc","(?|(abc)|(xyz))(?1)","&\\1\\1Mv\\1jgRaou",[])),
+ <<"xyzabcxyzxyzMvxyzjgRaou">> = iolist_to_binary(re:replace("xyzabc","(?|(abc)|(xyz))(?1)","&\\1\\1Mv\\1jgRaou",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?|(abc)|(xyz))(?1)","&vqt\\1Hv",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?|(abc)|(xyz))(?1)","&vqt\\1Hv",[global])),
+ <<"xyzxyz">> = iolist_to_binary(re:replace("xyzxyz","(?|(abc)|(xyz))(?1)","LyN",[])),
+ <<"xyzxyz">> = iolist_to_binary(re:replace("xyzxyz","(?|(abc)|(xyz))(?1)","LyN",[global])),
+ <<"XYabcdYvXYabcdYXYabcdYXYabcdYjw">> = iolist_to_binary(re:replace("XYabcdY","^X(?5)(a)(?|(b)|(q))(c)(d)(Y)","&v&&&jw",[])),
+ <<"XYabcdYvXYabcdYXYabcdYXYabcdYjw">> = iolist_to_binary(re:replace("XYabcdY","^X(?5)(a)(?|(b)|(q))(c)(d)(Y)","&v&&&jw",[global])),
+ <<"uqndDBXYabcdYGahfmNcwsERUk">> = iolist_to_binary(re:replace("XYabcdY","^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)","uqndDB&G\\1hfmNcwsERUk",[])),
+ <<"uqndDBXYabcdYGahfmNcwsERUk">> = iolist_to_binary(re:replace("XYabcdY","^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)","uqndDB&G\\1hfmNcwsERUk",[global])),
+ <<"XYabcdYtahaNIsaeGvkDDLOQ">> = iolist_to_binary(re:replace("XYabcdY","^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)","&tah\\1NIs\\1eGvkDDLOQ",[])),
+ <<"XYabcdYtahaNIsaeGvkDDLOQ">> = iolist_to_binary(re:replace("XYabcdY","^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)","&tah\\1NIs\\1eGvkDDLOQ",[global])),
+ <<"boxyz">> = iolist_to_binary(re:replace("a:aaxyz","(?'abc'\\w+):\\k<abc>{2}","bo",[])),
+ <<"boxyz">> = iolist_to_binary(re:replace("a:aaxyz","(?'abc'\\w+):\\k<abc>{2}","bo",[global])),
+ <<"sqNrwMWMcRUxyz">> = iolist_to_binary(re:replace("ab:ababxyz","(?'abc'\\w+):\\k<abc>{2}","sqNrwMWMcRU",[])),
+ <<"sqNrwMWMcRUxyz">> = iolist_to_binary(re:replace("ab:ababxyz","(?'abc'\\w+):\\k<abc>{2}","sqNrwMWMcRU",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?'abc'\\w+):\\k<abc>{2}","Ahbk",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?'abc'\\w+):\\k<abc>{2}","Ahbk",[global])),
+ <<"a:axyz">> = iolist_to_binary(re:replace("a:axyz","(?'abc'\\w+):\\k<abc>{2}","yr&SM&HjpyRb",[])),
+ <<"a:axyz">> = iolist_to_binary(re:replace("a:axyz","(?'abc'\\w+):\\k<abc>{2}","yr&SM&HjpyRb",[global])),
+ <<"ab:abxyz">> = iolist_to_binary(re:replace("ab:abxyz","(?'abc'\\w+):\\k<abc>{2}","BQwV",[])),
+ <<"ab:abxyz">> = iolist_to_binary(re:replace("ab:abxyz","(?'abc'\\w+):\\k<abc>{2}","BQwV",[global])),
+ <<"a:aaxnnUMItwyNa:aamCRBaixyz">> = iolist_to_binary(re:replace("a:aaxyz","(?'abc'\\w+):\\g{abc}{2}","&xnnUMItwyN&mCRB\\1i",[])),
+ <<"a:aaxnnUMItwyNa:aamCRBaixyz">> = iolist_to_binary(re:replace("a:aaxyz","(?'abc'\\w+):\\g{abc}{2}","&xnnUMItwyN&mCRB\\1i",[global])),
+ <<"Labjab:ababqxyz">> = iolist_to_binary(re:replace("ab:ababxyz","(?'abc'\\w+):\\g{abc}{2}","L\\1j&q",[])),
+ <<"Labjab:ababqxyz">> = iolist_to_binary(re:replace("ab:ababxyz","(?'abc'\\w+):\\g{abc}{2}","L\\1j&q",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?'abc'\\w+):\\g{abc}{2}","dLG\\1",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?'abc'\\w+):\\g{abc}{2}","dLG\\1",[global])),
+ <<"a:axyz">> = iolist_to_binary(re:replace("a:axyz","(?'abc'\\w+):\\g{abc}{2}","MKB",[])),
+ <<"a:axyz">> = iolist_to_binary(re:replace("a:axyz","(?'abc'\\w+):\\g{abc}{2}","MKB",[global])),
+ <<"ab:abxyz">> = iolist_to_binary(re:replace("ab:abxyz","(?'abc'\\w+):\\g{abc}{2}","BwHek&EFhbw",[])),
+ <<"ab:abxyz">> = iolist_to_binary(re:replace("ab:abxyz","(?'abc'\\w+):\\g{abc}{2}","BwHek&EFhbw",[global])),
+ <<"abdqUabdFaabdtmIkaf">> = iolist_to_binary(re:replace("abd","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)","&qU&Fa&tmIk\\1f",[extended])),
+ <<"abdqUabdFaabdtmIkaf">> = iolist_to_binary(re:replace("abd","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)","&qU&Fa&tmIk\\1f",[extended,
+ global])),
+ <<"haacettwdUtIv">> = iolist_to_binary(re:replace("ce","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)","haa&ttwdU\\1tIv",[extended])),
+ <<"haacettwdUtIv">> = iolist_to_binary(re:replace("ce","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)","haa&ttwdU\\1tIv",[extended,
+ global])),
+ <<"uaXaXZYWULYgJXaXaXaXZg">> = iolist_to_binary(re:replace("aXaXZ","^(a.)\\g-1Z","u&YWULYgJX\\1&g",[])),
+ <<"uaXaXZYWULYgJXaXaXaXZg">> = iolist_to_binary(re:replace("aXaXZ","^(a.)\\g-1Z","u&YWULYgJX\\1&g",[global])),
+ <<"TpaXaXZmaXaXZQhnJ">> = iolist_to_binary(re:replace("aXaXZ","^(a.)\\g{-1}Z","Tp&m&QhnJ",[])),
+ <<"TpaXaXZmaXaXZQhnJ">> = iolist_to_binary(re:replace("aXaXZ","^(a.)\\g{-1}Z","Tp&m&QhnJ",[global])),
+ <<"cNcd">> = iolist_to_binary(re:replace("abcd","^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ","cN",[extended])),
+ <<"cNcd">> = iolist_to_binary(re:replace("abcd","^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ","cN",[extended,
+ global])),
+ <<"S">> = iolist_to_binary(re:replace("metcalfe 33","(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\\d+)
+ )","S",[extended])),
+ <<"S">> = iolist_to_binary(re:replace("metcalfe 33","(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\\d+)
+ )","S",[extended,global])),
+ <<"m1.2.3.4CNSbdi">> = iolist_to_binary(re:replace("1.2.3.4","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","m&CNSbd\\1i",[])),
+ <<"m1.2.3.4CNSbdi">> = iolist_to_binary(re:replace("1.2.3.4","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","m&CNSbd\\1i",[global])),
+ <<"131.111.10.206131.111.10.206DPiNTNK131.111.10.206grPeyEu">> = iolist_to_binary(re:replace("131.111.10.206","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","&&DPiNTN\\1\\1K&grPey\\1Eu",[])),
+ <<"131.111.10.206131.111.10.206DPiNTNK131.111.10.206grPeyEu">> = iolist_to_binary(re:replace("131.111.10.206","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","&&DPiNTN\\1\\1K&grPey\\1Eu",[global])),
+ <<"uBfPy10.0.0.010.0.0.0svWuRdbVVmys">> = iolist_to_binary(re:replace("10.0.0.0","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","u\\1BfPy&&svWuRdbVVmys",[])),
+ <<"uBfPy10.0.0.010.0.0.0svWuRdbVVmys">> = iolist_to_binary(re:replace("10.0.0.0","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","u\\1BfPy&&svWuRdbVVmys",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","jVYSCLvb\\1Rm\\1Vn&",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","jVYSCLvb\\1Rm\\1Vn&",[global])),
+ <<"10.6">> = iolist_to_binary(re:replace("10.6","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","dECob\\1\\1yakWA",[])),
+ <<"10.6">> = iolist_to_binary(re:replace("10.6","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","dECob\\1\\1yakWA",[global])),
+ <<"455.3.4.5">> = iolist_to_binary(re:replace("455.3.4.5","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","r",[])),
+ <<"455.3.4.5">> = iolist_to_binary(re:replace("455.3.4.5","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}","r",[global])),
+ <<"VjWQp">> = iolist_to_binary(re:replace("1.2.3.4","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","VjWQp",[])),
+ <<"VjWQp">> = iolist_to_binary(re:replace("1.2.3.4","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","VjWQp",[global])),
+ <<"VQs131.111.10.206131.111.10.206r.206.206">> = iolist_to_binary(re:replace("131.111.10.206","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","VQs&&r\\1\\1",[])),
+ <<"VQs131.111.10.206131.111.10.206r.206.206">> = iolist_to_binary(re:replace("131.111.10.206","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","VQs&&r\\1\\1",[global])),
+ <<"mebNTtCd10.0.0.010.0.0.010.0.0.010.0.0.0S.0">> = iolist_to_binary(re:replace("10.0.0.0","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","mebNTtCd&&&&S\\1",[])),
+ <<"mebNTtCd10.0.0.010.0.0.010.0.0.010.0.0.0S.0">> = iolist_to_binary(re:replace("10.0.0.0","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","mebNTtCd&&&&S\\1",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","uvmK&GcQ&\\1u\\1",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","uvmK&GcQ&\\1u\\1",[global])),
+ <<"10.6">> = iolist_to_binary(re:replace("10.6","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","TH\\1bkRaOVXKAGH&Wq\\1",[])),
+ <<"10.6">> = iolist_to_binary(re:replace("10.6","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","TH\\1bkRaOVXKAGH&Wq\\1",[global])),
+ <<"455.3.4.5">> = iolist_to_binary(re:replace("455.3.4.5","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","flY&",[])),
+ <<"455.3.4.5">> = iolist_to_binary(re:replace("455.3.4.5","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))","flY&",[global])),
+ <<"XIXOpartynow is the time for all good men to come to the aid of the partyenW">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^(\\w++|\\s++)*$","XIXO\\1&enW",[])),
+ <<"XIXOpartynow is the time for all good men to come to the aid of the partyenW">> = iolist_to_binary(re:replace("now is the time for all good men to come to the aid of the party","^(\\w++|\\s++)*$","XIXO\\1&enW",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\w++|\\s++)*$","bwiYg",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\w++|\\s++)*$","bwiYg",[global])),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^(\\w++|\\s++)*$","d\\1",[])),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(re:replace("this is not a line with only words and spaces!","^(\\w++|\\s++)*$","d\\1",[global])),
+ <<"m12345sdTXRM1234512345a">> = iolist_to_binary(re:replace("12345a","(\\d++)(\\w)","m\\1sdTXRM\\1&",[])),
+ <<"m12345sdTXRM1234512345a">> = iolist_to_binary(re:replace("12345a","(\\d++)(\\w)","m\\1sdTXRM\\1&",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\d++)(\\w)","eFU&\\1cQE\\1\\1grkNJ&Ad\\1f",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","(\\d++)(\\w)","eFU&\\1cQE\\1\\1grkNJ&Ad\\1f",[global])),
+ <<"12345+">> = iolist_to_binary(re:replace("12345+","(\\d++)(\\w)","i&hvp\\1XhCAs&VRh",[])),
+ <<"12345+">> = iolist_to_binary(re:replace("12345+","(\\d++)(\\w)","i&hvp\\1XhCAs&VRh",[global])),
+ <<"NaaabIg">> = iolist_to_binary(re:replace("aaab","a++b","\\1N&Ig",[])),
+ <<"NaaabIg">> = iolist_to_binary(re:replace("aaab","a++b","\\1N&Ig",[global])),
+ <<"maaabaaabgBJFEHXaaabaaabaaabkAaaab">> = iolist_to_binary(re:replace("aaab","(a++b)","m&\\1gBJFEHX&&\\1kA&",[])),
+ <<"maaabaaabgBJFEHXaaabaaabaaabkAaaab">> = iolist_to_binary(re:replace("aaab","(a++b)","m&\\1gBJFEHX&&\\1kA&",[global])),
+ <<"TaaabRaaaaaaeBTpaaaTi">> = iolist_to_binary(re:replace("aaab","(a++)b","T&R\\1\\1eBTp\\1Ti",[])),
+ <<"TaaabRaaaaaaeBTpaaaTi">> = iolist_to_binary(re:replace("aaab","(a++)b","T&R\\1\\1eBTp\\1Ti",[global])),
+ <<"((PwxkrBxNdabc(ade)ufh()()xYBkxEabc(ade)ufh()()xFkxx">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","([^()]++|\\([^()]*\\))+","Pw\\1krB\\1Nd&YBk\\1E&Fk\\1\\1",[])),
+ <<"((PwxkrBxNdabc(ade)ufh()()xYBkxEabc(ade)ufh()()xFkxx">> = iolist_to_binary(re:replace("((abc(ade)ufh()()x","([^()]++|\\([^()]*\\))+","Pw\\1krB\\1Nd&YBk\\1E&Fk\\1\\1",[global])),
+ <<"F(abc)sMN">> = iolist_to_binary(re:replace("(abc)","\\(([^()]++|\\([^()]+\\))+\\)","F&sMN",[])),
+ <<"F(abc)sMN">> = iolist_to_binary(re:replace("(abc)","\\(([^()]++|\\([^()]+\\))+\\)","F&sMN",[global])),
+ <<"SMUJyftxyzxyz(abc(def)xyz)RpnMnA">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(([^()]++|\\([^()]+\\))+\\)","SMUJyft\\1\\1&RpnMnA",[])),
+ <<"SMUJyftxyzxyz(abc(def)xyz)RpnMnA">> = iolist_to_binary(re:replace("(abc(def)xyz)","\\(([^()]++|\\([^()]+\\))+\\)","SMUJyft\\1\\1&RpnMnA",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(([^()]++|\\([^()]+\\))+\\)","p",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","\\(([^()]++|\\([^()]+\\))+\\)","p",[global])),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(([^()]++|\\([^()]+\\))+\\)","gVbYV&vnkHNjeK",[])),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(re:replace("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(([^()]++|\\([^()]+\\))+\\)","gVbYV&vnkHNjeK",[global])),
+ ok.
+run42() ->
+ <<"YHcxHwcJHhabcabcyqOabcio">> = iolist_to_binary(re:replace("abc","^([^()]|\\((?1)*\\))*$","YH\\1xHw\\1JHh&&yqO&io",[])),
+ <<"YHcxHwcJHhabcabcyqOabcio">> = iolist_to_binary(re:replace("abc","^([^()]|\\((?1)*\\))*$","YH\\1xHw\\1JHh&&yqO&io",[global])),
+ <<"Xua(b)ccOqkxg">> = iolist_to_binary(re:replace("a(b)c","^([^()]|\\((?1)*\\))*$","Xu&\\1Oqkxg",[])),
+ <<"Xua(b)ccOqkxg">> = iolist_to_binary(re:replace("a(b)c","^([^()]|\\((?1)*\\))*$","Xu&\\1Oqkxg",[global])),
+ <<"pHOdcaLUi">> = iolist_to_binary(re:replace("a(b(c))d","^([^()]|\\((?1)*\\))*$","pHO\\1caLUi",[])),
+ <<"pHOdcaLUi">> = iolist_to_binary(re:replace("a(b(c))d","^([^()]|\\((?1)*\\))*$","pHO\\1caLUi",[global])),
+ <<"*** Failers)">> = iolist_to_binary(re:replace("*** Failers)","^([^()]|\\((?1)*\\))*$","&YxG",[])),
+ <<"*** Failers)">> = iolist_to_binary(re:replace("*** Failers)","^([^()]|\\((?1)*\\))*$","&YxG",[global])),
+ <<"a(b(c)d">> = iolist_to_binary(re:replace("a(b(c)d","^([^()]|\\((?1)*\\))*$","s\\1BLqc",[])),
+ <<"a(b(c)d">> = iolist_to_binary(re:replace("a(b(c)d","^([^()]|\\((?1)*\\))*$","s\\1BLqc",[global])),
+ <<"puAth">> = iolist_to_binary(re:replace(">abc>123<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","puAth",[])),
+ <<"puAth">> = iolist_to_binary(re:replace(">abc>123<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","puAth",[global])),
+ <<"QVYB>abc>1(2)3<xyz<cFhyH">> = iolist_to_binary(re:replace(">abc>1(2)3<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","QVYB&cFhyH",[])),
+ <<"QVYB>abc>1(2)3<xyz<cFhyH">> = iolist_to_binary(re:replace(">abc>1(2)3<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","QVYB&cFhyH",[global])),
+ <<"(1(2)3)">> = iolist_to_binary(re:replace(">abc>(1(2)3)<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","\\1",[])),
+ <<"(1(2)3)">> = iolist_to_binary(re:replace(">abc>(1(2)3)<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$","\\1",[global])),
+ <<"fb1221w122112211221Q1221yL1221d">> = iolist_to_binary(re:replace("1221","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","fb\\1w\\1&&Q&yL&d",[caseless])),
+ <<"fb1221w122112211221Q1221yL1221d">> = iolist_to_binary(re:replace("1221","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","fb\\1w\\1&&Q&yL&d",[caseless,
+ global])),
+ <<"yadakp">> = iolist_to_binary(re:replace("Satanoscillatemymetallicsonatas","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","ya\\1dakp\\1",[caseless])),
+ <<"yadakp">> = iolist_to_binary(re:replace("Satanoscillatemymetallicsonatas","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","ya\\1dakp\\1",[caseless,
+ global])),
+ <<"aAmanaplanacanalPanamalDAmanaplanacanalPanamaiqyAmanaplanacanalPanamaOSvaJYbQ">> = iolist_to_binary(re:replace("AmanaplanacanalPanama","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","a&lD&i\\1qy&OSv\\1aJYbQ",[caseless])),
+ <<"aAmanaplanacanalPanamalDAmanaplanacanalPanamaiqyAmanaplanacanalPanamaOSvaJYbQ">> = iolist_to_binary(re:replace("AmanaplanacanalPanama","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","a&lD&i\\1qy&OSv\\1aJYbQ",[caseless,
+ global])),
+ <<"UcSlDNWgAva">> = iolist_to_binary(re:replace("AblewasIereIsawElba","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","UcSlD\\1NWgAva\\1",[caseless])),
+ <<"UcSlDNWgAva">> = iolist_to_binary(re:replace("AblewasIereIsawElba","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","UcSlD\\1NWgAva\\1",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","n",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","n",[caseless,
+ global])),
+ <<"Thequickbrownfox">> = iolist_to_binary(re:replace("Thequickbrownfox","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","MuY&Y&DfSiG&KPnRRGOO",[caseless])),
+ <<"Thequickbrownfox">> = iolist_to_binary(re:replace("Thequickbrownfox","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$","MuY&Y&DfSiG&KPnRRGOO",[caseless,
+ global])),
+ <<"Dlcq12uvNpwj">> = iolist_to_binary(re:replace("12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","Dlcq\\1uvNpwj",[])),
+ <<"Dlcq12uvNpwj">> = iolist_to_binary(re:replace("12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","Dlcq\\1uvNpwj",[global])),
+ <<"(((2+2)*-3)-7)Hq(((2+2)*-3)-7)nwjc(((2+2)*-3)-7)OCxTARr">> = iolist_to_binary(re:replace("(((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","&Hq&nwjc\\1OCxTARr",[])),
+ <<"(((2+2)*-3)-7)Hq(((2+2)*-3)-7)nwjc(((2+2)*-3)-7)OCxTARr">> = iolist_to_binary(re:replace("(((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","&Hq&nwjc\\1OCxTARr",[global])),
+ <<"EjPI-12tsA-12ux-12-12-12MfkO">> = iolist_to_binary(re:replace("-12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","EjPI&tsA&ux&\\1\\1MfkO",[])),
+ <<"EjPI-12tsA-12ux-12-12-12MfkO">> = iolist_to_binary(re:replace("-12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","EjPI&tsA&ux&\\1\\1MfkO",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","sxA&v\\1L\\1Q\\1FFDAm\\1hOOv",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","sxA&v\\1L\\1Q\\1FFDAm\\1hOOv",[global])),
+ <<"((2+2)*-3)-7)">> = iolist_to_binary(re:replace("((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","el\\1La",[])),
+ <<"((2+2)*-3)-7)">> = iolist_to_binary(re:replace("((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$","el\\1La",[global])),
+ <<"vRxyzxyzrJYxyzxyzjNtdExyzSxeWm">> = iolist_to_binary(re:replace("xyz","^(x(y|(?1){2})z)","vR\\1\\1rJY&\\1jNtdE&SxeWm",[])),
+ <<"vRxyzxyzrJYxyzxyzjNtdExyzSxeWm">> = iolist_to_binary(re:replace("xyz","^(x(y|(?1){2})z)","vR\\1\\1rJY&\\1jNtdE&SxeWm",[global])),
+ <<"CRxxyzxyzzkQsxxyzxyzzHmiGvxxyzxyzzy">> = iolist_to_binary(re:replace("xxyzxyzz","^(x(y|(?1){2})z)","CR\\1kQs\\1HmiGv\\1y",[])),
+ <<"CRxxyzxyzzkQsxxyzxyzzHmiGvxxyzxyzzy">> = iolist_to_binary(re:replace("xxyzxyzz","^(x(y|(?1){2})z)","CR\\1kQs\\1HmiGv\\1y",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(x(y|(?1){2})z)","qTfvW\\1q\\1&UXxp\\1b",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(x(y|(?1){2})z)","qTfvW\\1q\\1&UXxp\\1b",[global])),
+ <<"xxyzz">> = iolist_to_binary(re:replace("xxyzz","^(x(y|(?1){2})z)","WRW&Ky",[])),
+ <<"xxyzz">> = iolist_to_binary(re:replace("xxyzz","^(x(y|(?1){2})z)","WRW&Ky",[global])),
+ <<"xxyzxyzxyzz">> = iolist_to_binary(re:replace("xxyzxyzxyzz","^(x(y|(?1){2})z)","SgB&TOTaVTG\\1\\1Sy",[])),
+ <<"xxyzxyzxyzz">> = iolist_to_binary(re:replace("xxyzxyzxyzz","^(x(y|(?1){2})z)","SgB&TOTaVTG\\1\\1Sy",[global])),
+ <<"p">> = iolist_to_binary(re:replace("<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","p",[extended])),
+ <<"p">> = iolist_to_binary(re:replace("<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","p",[extended,
+ global])),
+ <<"<abcd>oQy<abcd><abcd>UhI<abcd>g">> = iolist_to_binary(re:replace("<abcd>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","\\1oQy\\1&UhI&g",[extended])),
+ <<"<abcd>oQy<abcd><abcd>UhI<abcd>g">> = iolist_to_binary(re:replace("<abcd>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","\\1oQy\\1&UhI&g",[extended,
+ global])),
+ <<"NymkAa">> = iolist_to_binary(re:replace("<abc <123> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","NymkAa",[extended])),
+ <<"NymkAa">> = iolist_to_binary(re:replace("<abc <123> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","NymkAa",[extended,
+ global])),
+ <<"<abc i<def>g<def>fMHHlJ<def><def> hij>">> = iolist_to_binary(re:replace("<abc <def> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","i&g\\1fMHHlJ\\1\\1",[extended])),
+ <<"<abc i<def>g<def>fMHHlJ<def><def> hij>">> = iolist_to_binary(re:replace("<abc <def> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","i&g\\1fMHHlJ\\1\\1",[extended,
+ global])),
+ <<"yJJ<abc<>def>yo<abc<>def>X">> = iolist_to_binary(re:replace("<abc<>def>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","yJJ&yo\\1X",[extended])),
+ <<"yJJ<abc<>def>yo<abc<>def>X">> = iolist_to_binary(re:replace("<abc<>def>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","yJJ&yo\\1X",[extended,
+ global])),
+ <<"<abcn<>LhiK<>ufT<>q<><>SodEfM">> = iolist_to_binary(re:replace("<abc<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","n\\1LhiK&ufT&q&&SodEfM",[extended])),
+ <<"<abcn<>LhiK<>ufT<>q<><>SodEfM">> = iolist_to_binary(re:replace("<abc<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","n\\1LhiK&ufT&q&&SodEfM",[extended,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","R&",[extended])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","R&",[extended,
+ global])),
+ <<"<abc">> = iolist_to_binary(re:replace("<abc","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","l",[extended])),
+ <<"<abc">> = iolist_to_binary(re:replace("<abc","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))","l",[extended,
+ global])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^a+(*FAIL)","oWDClek&Nwt&&aMO\\1",[])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^a+(*FAIL)","oWDClek&Nwt&&aMO\\1",[global])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?c+(*FAIL)","L\\1&&fllctiK\\1WqBCUQ",[])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?c+(*FAIL)","L\\1&&fllctiK\\1WqBCUQ",[global])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*PRUNE)c+(*FAIL)","Jpy\\1FAL",[])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*PRUNE)c+(*FAIL)","Jpy\\1FAL",[global])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*COMMIT)c+(*FAIL)","I",[])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*COMMIT)c+(*FAIL)","I",[global])),
+ <<"aaabcccaaabccc">> = iolist_to_binary(re:replace("aaabcccaaabccc","a+b?(*SKIP)c+(*FAIL)","cRBQ\\1mL",[])),
+ <<"aaabcccaaabccc">> = iolist_to_binary(re:replace("aaabcccaaabccc","a+b?(*SKIP)c+(*FAIL)","cRBQ\\1mL",[global])),
+ <<"JRWgePSUsExfJfHo">> = iolist_to_binary(re:replace("aaaxxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","\\1JRWgePSUsExfJf\\1Ho",[])),
+ <<"JRWgePSUsExfJfHo">> = iolist_to_binary(re:replace("aaaxxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","\\1JRWgePSUsExfJf\\1Ho",[global])),
+ <<"AlHMdrRl++++++">> = iolist_to_binary(re:replace("aaa++++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","AlHMdrRl",[])),
+ <<"AlHMdrRl++++++">> = iolist_to_binary(re:replace("aaa++++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","AlHMdrRl",[global])),
+ <<"bKH">> = iolist_to_binary(re:replace("bbbxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","bKH",[])),
+ <<"bKH">> = iolist_to_binary(re:replace("bbbxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","bKH",[global])),
+ <<"AyqLHpWSaFmaN+++++">> = iolist_to_binary(re:replace("bbb+++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","AyqLHpWSaFma\\1N",[])),
+ <<"AyqLHpWSaFmaN+++++">> = iolist_to_binary(re:replace("bbb+++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","AyqLHpWSaFma\\1N",[global])),
+ <<"bvYRps">> = iolist_to_binary(re:replace("cccxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","bvYR\\1ps",[])),
+ <<"bvYRps">> = iolist_to_binary(re:replace("cccxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","bvYR\\1ps",[global])),
+ <<"KPYMvODtuotXNIo++++">> = iolist_to_binary(re:replace("ccc++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","KPYMv\\1\\1ODtuotXNIo",[])),
+ <<"KPYMvODtuotXNIo++++">> = iolist_to_binary(re:replace("ccc++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","KPYMv\\1\\1ODtuotXNIo",[global])),
+ <<"kddddd">> = iolist_to_binary(re:replace("dddddddd","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","k",[])),
+ <<"kddddd">> = iolist_to_binary(re:replace("dddddddd","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","k",[global])),
+ <<"kaaaxxxxxxrQaRFqL">> = iolist_to_binary(re:replace("aaaxxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","k\\1rQaRFqL",[])),
+ <<"kaaaxxxxxxrQaRFqL">> = iolist_to_binary(re:replace("aaaxxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","k\\1rQaRFqL",[global])),
+ <<"aaaw++++++">> = iolist_to_binary(re:replace("aaa++++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","\\1w",[])),
+ <<"aaaw++++++">> = iolist_to_binary(re:replace("aaa++++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","\\1w",[global])),
+ <<"JyQqJIbbbxxxxxBAVHEvuuRsYpC">> = iolist_to_binary(re:replace("bbbxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","JyQqJI&BAVHEvuuRsYpC",[])),
+ <<"JyQqJIbbbxxxxxBAVHEvuuRsYpC">> = iolist_to_binary(re:replace("bbbxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","JyQqJI&BAVHEvuuRsYpC",[global])),
+ <<"dBwHTombbbccbbbR+++++">> = iolist_to_binary(re:replace("bbb+++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","dBwHTom&cc&R",[])),
+ <<"dBwHTombbbccbbbR+++++">> = iolist_to_binary(re:replace("bbb+++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","dBwHTom&cc&R",[global])),
+ <<"OcccxxxxeA">> = iolist_to_binary(re:replace("cccxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","O&eA",[])),
+ <<"OcccxxxxeA">> = iolist_to_binary(re:replace("cccxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","O&eA",[global])),
+ <<"DyFCQsccclWCcccy++++">> = iolist_to_binary(re:replace("ccc++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","DyFCQs&lWC&y",[])),
+ <<"DyFCQsccclWCcccy++++">> = iolist_to_binary(re:replace("ccc++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","DyFCQs&lWC&y",[global])),
+ <<"cdddvddddd">> = iolist_to_binary(re:replace("dddddddd","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","c&v",[])),
+ <<"cdddvddddd">> = iolist_to_binary(re:replace("dddddddd","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})","c&v",[global])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*THEN)c+(*FAIL)","PV&\\1x\\1vsUDLpYB\\1\\1t",[])),
+ <<"aaabccc">> = iolist_to_binary(re:replace("aaabccc","a+b?(*THEN)c+(*FAIL)","PV&\\1x\\1vsUDLpYB\\1\\1t",[global])),
+ <<"FhiABxmOfR">> = iolist_to_binary(re:replace("AB","(A (A|B(*ACCEPT)|C) D)(E)","Fhi\\1xmOfR",[extended])),
+ <<"FhiABxmOfR">> = iolist_to_binary(re:replace("AB","(A (A|B(*ACCEPT)|C) D)(E)","Fhi\\1xmOfR",[extended,
+ global])),
+ <<"BHulABQjABrLtABEnSX">> = iolist_to_binary(re:replace("ABX","(A (A|B(*ACCEPT)|C) D)(E)","BHul&Qj&rLt\\1EnS",[extended])),
+ <<"BHulABQjABrLtABEnSX">> = iolist_to_binary(re:replace("ABX","(A (A|B(*ACCEPT)|C) D)(E)","BHul&Qj&rLt\\1EnS",[extended,
+ global])),
+ <<"fwi">> = iolist_to_binary(re:replace("AADE","(A (A|B(*ACCEPT)|C) D)(E)","fwi",[extended])),
+ <<"fwi">> = iolist_to_binary(re:replace("AADE","(A (A|B(*ACCEPT)|C) D)(E)","fwi",[extended,
+ global])),
+ <<"vpACDe">> = iolist_to_binary(re:replace("ACDE","(A (A|B(*ACCEPT)|C) D)(E)","vp\\1e",[extended])),
+ <<"vpACDe">> = iolist_to_binary(re:replace("ACDE","(A (A|B(*ACCEPT)|C) D)(E)","vp\\1e",[extended,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(A (A|B(*ACCEPT)|C) D)(E)","YJgvKXOIgucMHsvWUdgN",[extended])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(A (A|B(*ACCEPT)|C) D)(E)","YJgvKXOIgucMHsvWUdgN",[extended,
+ global])),
+ <<"AD">> = iolist_to_binary(re:replace("AD","(A (A|B(*ACCEPT)|C) D)(E)","ssJb&\\1nwuF&t",[extended])),
+ <<"AD">> = iolist_to_binary(re:replace("AD","(A (A|B(*ACCEPT)|C) D)(E)","ssJb&\\1nwuF&t",[extended,
+ global])),
+ <<"AjVOUn">> = iolist_to_binary(re:replace("1221","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","AjVOUn",[caseless])),
+ <<"AjVOUn">> = iolist_to_binary(re:replace("1221","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","AjVOUn",[caseless,
+ global])),
+ <<"BDdMi">> = iolist_to_binary(re:replace("Satan, oscillate my metallic sonatas!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","B\\1DdMi",[caseless])),
+ <<"BDdMi">> = iolist_to_binary(re:replace("Satan, oscillate my metallic sonatas!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","B\\1DdMi",[caseless,
+ global])),
+ <<"YfFtA man, a plan, a canal: Panama!pwRSbpA man, a plan, a canal: Panama!">> = iolist_to_binary(re:replace("A man, a plan, a canal: Panama!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","YfFt\\1&\\1pwRSb\\1p&",[caseless])),
+ <<"YfFtA man, a plan, a canal: Panama!pwRSbpA man, a plan, a canal: Panama!">> = iolist_to_binary(re:replace("A man, a plan, a canal: Panama!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","YfFt\\1&\\1pwRSb\\1p&",[caseless,
+ global])),
+ <<"xvAble was I ere I saw Elba.HqjQAble was I ere I saw Elba.vR">> = iolist_to_binary(re:replace("Able was I ere I saw Elba.","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","x\\1v&HqjQ&vR",[caseless])),
+ <<"xvAble was I ere I saw Elba.HqjQAble was I ere I saw Elba.vR">> = iolist_to_binary(re:replace("Able was I ere I saw Elba.","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","x\\1v&HqjQ&vR",[caseless,
+ global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","\\1JH",[caseless])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","\\1JH",[caseless,
+ global])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","GCnEOe&\\1HfW&",[caseless])),
+ <<"The quick brown fox">> = iolist_to_binary(re:replace("The quick brown fox","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$","GCnEOe&\\1HfW&",[caseless,
+ global])),
+ <<"EEBtpaXa">> = iolist_to_binary(re:replace("a","^((.)(?1)\\2|.)$","EEBtpaX\\1",[])),
+ <<"EEBtpaXa">> = iolist_to_binary(re:replace("a","^((.)(?1)\\2|.)$","EEBtpaX\\1",[global])),
+ <<"qXEWopOY">> = iolist_to_binary(re:replace("aba","^((.)(?1)\\2|.)$","qXEWopOY",[])),
+ <<"qXEWopOY">> = iolist_to_binary(re:replace("aba","^((.)(?1)\\2|.)$","qXEWopOY",[global])),
+ <<"fQRaabaaaabaaaabaavgdtLaabaaijxUaabaaV">> = iolist_to_binary(re:replace("aabaa","^((.)(?1)\\2|.)$","fQR\\1\\1&vgdtL\\1ijxU\\1V",[])),
+ <<"fQRaabaaaabaaaabaavgdtLaabaaijxUaabaaV">> = iolist_to_binary(re:replace("aabaa","^((.)(?1)\\2|.)$","fQR\\1\\1&vgdtL\\1ijxU\\1V",[global])),
+ <<"rfIabcdcbaQmGUaQxwnGtIhc">> = iolist_to_binary(re:replace("abcdcba","^((.)(?1)\\2|.)$","rfI&QmGUaQxwnGtIhc",[])),
+ <<"rfIabcdcbaQmGUaQxwnGtIhc">> = iolist_to_binary(re:replace("abcdcba","^((.)(?1)\\2|.)$","rfI&QmGUaQxwnGtIhc",[global])),
+ <<"QEpqaabaaqpcpqaabaaqpmxcBpqaabaaqpfErt">> = iolist_to_binary(re:replace("pqaabaaqp","^((.)(?1)\\2|.)$","QE\\1c\\1mxcB&fErt",[])),
+ <<"QEpqaabaaqpcpqaabaaqpmxcBpqaabaaqpfErt">> = iolist_to_binary(re:replace("pqaabaaqp","^((.)(?1)\\2|.)$","QE\\1c\\1mxcB&fErt",[global])),
+ <<"KLFablewasiereisawelbaablewasiereisawelbaIablewasiereisawelbarjablewasiereisawelbasD">> = iolist_to_binary(re:replace("ablewasiereisawelba","^((.)(?1)\\2|.)$","KLF\\1&I&rj&sD",[])),
+ <<"KLFablewasiereisawelbaablewasiereisawelbaIablewasiereisawelbarjablewasiereisawelbasD">> = iolist_to_binary(re:replace("ablewasiereisawelba","^((.)(?1)\\2|.)$","KLF\\1&I&rj&sD",[global])),
+ <<"rhubarb">> = iolist_to_binary(re:replace("rhubarb","^((.)(?1)\\2|.)$","g\\1WKOnON\\1\\1YO\\1\\1Uj\\1F",[])),
+ <<"rhubarb">> = iolist_to_binary(re:replace("rhubarb","^((.)(?1)\\2|.)$","g\\1WKOnON\\1\\1YO\\1\\1Uj\\1F",[global])),
+ <<"the quick brown fox">> = iolist_to_binary(re:replace("the quick brown fox","^((.)(?1)\\2|.)$","JgofHErdXPIu\\1&",[])),
+ <<"the quick brown fox">> = iolist_to_binary(re:replace("the quick brown fox","^((.)(?1)\\2|.)$","JgofHErdXPIu\\1&",[global])),
+ <<"bKFgOfuwLfpxaHaJaz">> = iolist_to_binary(re:replace("baz","(a)(?<=b(?1))","KFgOfuwLfpx&H\\1J\\1",[])),
+ <<"bKFgOfuwLfpxaHaJaz">> = iolist_to_binary(re:replace("baz","(a)(?<=b(?1))","KFgOfuwLfpx&H\\1J\\1",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)(?<=b(?1))","i\\1&j&",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)(?<=b(?1))","i\\1&j&",[global])),
+ <<"caz">> = iolist_to_binary(re:replace("caz","(a)(?<=b(?1))","l&U&&H&t&",[])),
+ <<"caz">> = iolist_to_binary(re:replace("caz","(a)(?<=b(?1))","l&U&&H&t&",[global])),
+ <<"zbaakOqTqMsiTyaSGadz">> = iolist_to_binary(re:replace("zbaaz","(?<=b(?1))(a)","\\1kOqTqMsiTy\\1SG&d",[])),
+ <<"zbaakOqTqMsiTyaSGadz">> = iolist_to_binary(re:replace("zbaaz","(?<=b(?1))(a)","\\1kOqTqMsiTy\\1SG&d",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=b(?1))(a)","\\1osY\\1treCMjxk&Af",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=b(?1))(a)","\\1osY\\1treCMjxk&Af",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","(?<=b(?1))(a)","ykA&qS&nno",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","(?<=b(?1))(a)","ykA&qS&nno",[global])),
+ <<"baOKaGPxYz">> = iolist_to_binary(re:replace("baz","(?<X>a)(?<=b(?&X))","\\1OK&GPxY",[])),
+ <<"baOKaGPxYz">> = iolist_to_binary(re:replace("baz","(?<X>a)(?<=b(?&X))","\\1OK&GPxY",[global])),
+ ok.
+run43() ->
+ <<"abckIo">> = iolist_to_binary(re:replace("abcabc","^(?|(abc)|(def))\\1","\\1kIo",[])),
+ <<"abckIo">> = iolist_to_binary(re:replace("abcabc","^(?|(abc)|(def))\\1","\\1kIo",[global])),
+ <<"sdefdefUbl">> = iolist_to_binary(re:replace("defdef","^(?|(abc)|(def))\\1","s&Ubl",[])),
+ <<"sdefdefUbl">> = iolist_to_binary(re:replace("defdef","^(?|(abc)|(def))\\1","s&Ubl",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?|(abc)|(def))\\1","&m&bWQpRl",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?|(abc)|(def))\\1","&m&bWQpRl",[global])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","^(?|(abc)|(def))\\1","qwUmfoHo&tN",[])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","^(?|(abc)|(def))\\1","qwUmfoHo&tN",[global])),
+ <<"defabc">> = iolist_to_binary(re:replace("defabc","^(?|(abc)|(def))\\1","KGoYhhlYddcruQ&k",[])),
+ <<"defabc">> = iolist_to_binary(re:replace("defabc","^(?|(abc)|(def))\\1","KGoYhhlYddcruQ&k",[global])),
+ <<"PdYfAnnabcPxabcabcHvAQabcabcabcabcabcls">> = iolist_to_binary(re:replace("abcabc","^(?|(abc)|(def))(?1)","PdYfAnn\\1Px&HvAQ&&\\1ls",[])),
+ <<"PdYfAnnabcPxabcabcHvAQabcabcabcabcabcls">> = iolist_to_binary(re:replace("abcabc","^(?|(abc)|(def))(?1)","PdYfAnn\\1Px&HvAQ&&\\1ls",[global])),
+ <<"PAdefabc">> = iolist_to_binary(re:replace("defabc","^(?|(abc)|(def))(?1)","PA&",[])),
+ <<"PAdefabc">> = iolist_to_binary(re:replace("defabc","^(?|(abc)|(def))(?1)","PA&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?|(abc)|(def))(?1)","Fqig",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?|(abc)|(def))(?1)","Fqig",[global])),
+ <<"defdef">> = iolist_to_binary(re:replace("defdef","^(?|(abc)|(def))(?1)","e&yLb\\1&\\1D\\1q\\1UcBtn&",[])),
+ <<"defdef">> = iolist_to_binary(re:replace("defdef","^(?|(abc)|(def))(?1)","e&yLb\\1&\\1D\\1q\\1UcBtn&",[global])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","^(?|(abc)|(def))(?1)","&\\1\\1\\1atTuOfcyl\\1RO&y",[])),
+ <<"abcdef">> = iolist_to_binary(re:replace("abcdef","^(?|(abc)|(def))(?1)","&\\1\\1\\1atTuOfcyl\\1RO&y",[global])),
+ <<"ACBCSBCTCMoOD">> = iolist_to_binary(re:replace("ABCD","(?:(?1)|B)(A(*F)|C)","C&S&T\\1MoO",[])),
+ <<"ACBCSBCTCMoOD">> = iolist_to_binary(re:replace("ABCD","(?:(?1)|B)(A(*F)|C)","C&S&T\\1MoO",[global])),
+ <<"bD">> = iolist_to_binary(re:replace("CCD","(?:(?1)|B)(A(*F)|C)","b",[])),
+ <<"bD">> = iolist_to_binary(re:replace("CCD","(?:(?1)|B)(A(*F)|C)","b",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?:(?1)|B)(A(*F)|C)","u&dbYn\\1jVvV&V\\1XC",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?:(?1)|B)(A(*F)|C)","u&dbYn\\1jVvV&V\\1XC",[global])),
+ <<"CAD">> = iolist_to_binary(re:replace("CAD","(?:(?1)|B)(A(*F)|C)","UbDT\\1DjcdPh",[])),
+ <<"CAD">> = iolist_to_binary(re:replace("CAD","(?:(?1)|B)(A(*F)|C)","UbDT\\1DjcdPh",[global])),
+ <<"CCahPD">> = iolist_to_binary(re:replace("CCD","^(?:(?1)|B)(A(*F)|C)","&ahP",[])),
+ <<"CCahPD">> = iolist_to_binary(re:replace("CCD","^(?:(?1)|B)(A(*F)|C)","&ahP",[global])),
+ <<"IYJaGD">> = iolist_to_binary(re:replace("BCD","^(?:(?1)|B)(A(*F)|C)","IYJaG",[])),
+ <<"IYJaGD">> = iolist_to_binary(re:replace("BCD","^(?:(?1)|B)(A(*F)|C)","IYJaG",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:(?1)|B)(A(*F)|C)","uckGWWHQG&ocJD\\1l\\1T",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:(?1)|B)(A(*F)|C)","uckGWWHQG&ocJD\\1l\\1T",[global])),
+ <<"ABCD">> = iolist_to_binary(re:replace("ABCD","^(?:(?1)|B)(A(*F)|C)","qbEQn",[])),
+ <<"ABCD">> = iolist_to_binary(re:replace("ABCD","^(?:(?1)|B)(A(*F)|C)","qbEQn",[global])),
+ <<"CAD">> = iolist_to_binary(re:replace("CAD","^(?:(?1)|B)(A(*F)|C)","kVqFM&D",[])),
+ <<"CAD">> = iolist_to_binary(re:replace("CAD","^(?:(?1)|B)(A(*F)|C)","kVqFM&D",[global])),
+ <<"BAD">> = iolist_to_binary(re:replace("BAD","^(?:(?1)|B)(A(*F)|C)","nKcCWd\\1",[])),
+ <<"BAD">> = iolist_to_binary(re:replace("BAD","^(?:(?1)|B)(A(*F)|C)","nKcCWd\\1",[global])),
+ <<"mCJFixrmAAAPiiNWHD">> = iolist_to_binary(re:replace("AAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","mCJFixrm&APiiNWH",[])),
+ <<"mCJFixrmAAAPiiNWHD">> = iolist_to_binary(re:replace("AAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","mCJFixrm&APiiNWH",[global])),
+ <<"fjOtIXCc">> = iolist_to_binary(re:replace("ACD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","fjOtIXCc",[])),
+ <<"fjOtIXCc">> = iolist_to_binary(re:replace("ACD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","fjOtIXCc",[global])),
+ <<"KSgQhFSAnBABD">> = iolist_to_binary(re:replace("BAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","KSgQhFS\\1n&B",[])),
+ <<"KSgQhFSAnBABD">> = iolist_to_binary(re:replace("BAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","KSgQhFS\\1n&B",[global])),
+ <<"KdBHaAwVPBCDCGCsRCBCD">> = iolist_to_binary(re:replace("BCD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","KdBHaAwVP&\\1G\\1sRC&",[])),
+ <<"KdBHaAwVPBCDCGCsRCBCD">> = iolist_to_binary(re:replace("BCD","(?:(?1)|B)(A(*ACCEPT)XX|C)D","KdBHaAwVP&\\1G\\1sRC&",[global])),
+ <<"iaomqEcFWGhoDBAAnBAiCX">> = iolist_to_binary(re:replace("BAX","(?:(?1)|B)(A(*ACCEPT)XX|C)D","iaomqEcFWGhoD&\\1n&iC",[])),
+ <<"iaomqEcFWGhoDBAAnBAiCX">> = iolist_to_binary(re:replace("BAX","(?:(?1)|B)(A(*ACCEPT)XX|C)D","iaomqEcFWGhoD&\\1n&iC",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?:(?1)|B)(A(*ACCEPT)XX|C)D","S\\1&OO",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?:(?1)|B)(A(*ACCEPT)XX|C)D","S\\1&OO",[global])),
+ <<"ACX">> = iolist_to_binary(re:replace("ACX","(?:(?1)|B)(A(*ACCEPT)XX|C)D","F\\1&dqt",[])),
+ <<"ACX">> = iolist_to_binary(re:replace("ACX","(?:(?1)|B)(A(*ACCEPT)XX|C)D","F\\1&dqt",[global])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","(?:(?1)|B)(A(*ACCEPT)XX|C)D","bL\\1I",[])),
+ <<"ABC">> = iolist_to_binary(re:replace("ABC","(?:(?1)|B)(A(*ACCEPT)XX|C)D","bL\\1I",[global])),
+ <<"h">> = iolist_to_binary(re:replace("BAC","(?(DEFINE)(A))B(?1)C","\\1h",[])),
+ <<"h">> = iolist_to_binary(re:replace("BAC","(?(DEFINE)(A))B(?1)C","\\1h",[global])),
+ <<"EiDCVEGlgEGIr">> = iolist_to_binary(re:replace("BAAC","(?(DEFINE)((A)\\2))B(?1)C","E\\1iD\\1C\\1V\\1EG\\1lgEGIr",[])),
+ <<"EiDCVEGlgEGIr">> = iolist_to_binary(re:replace("BAAC","(?(DEFINE)((A)\\2))B(?1)C","E\\1iD\\1C\\1V\\1EG\\1lgEGIr",[global])),
+ <<"u(ab(cd)ef)(ab(cd)ef)v(ab(cd)ef)M">> = iolist_to_binary(re:replace("(ab(cd)ef)","(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )","u&\\1v&M",[extended])),
+ <<"u(ab(cd)ef)(ab(cd)ef)v(ab(cd)ef)M">> = iolist_to_binary(re:replace("(ab(cd)ef)","(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )","u&\\1v&M",[extended,
+ global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?=a(*SKIP)b|ac)","EhJBenWdk&&",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?=a(*SKIP)b|ac)","EhJBenWdk&&",[global])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^(?=a(*SKIP)b|ac)","DVmcudRK&vBXmqcVY",[])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^(?=a(*SKIP)b|ac)","DVmcudRK&vBXmqcVY",[global])),
+ <<"qxyHbdqjab">> = iolist_to_binary(re:replace("ab","^(?=a(*PRUNE)b)","qxyH&bdqj",[])),
+ <<"qxyHbdqjab">> = iolist_to_binary(re:replace("ab","^(?=a(*PRUNE)b)","qxyH&bdqj",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?=a(*PRUNE)b)","qDd\\1UHvpsMvHI\\1gEx&d",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?=a(*PRUNE)b)","qDd\\1UHvpsMvHI\\1gEx&d",[global])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^(?=a(*PRUNE)b)","mB\\1\\1R&\\1Ax",[])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^(?=a(*PRUNE)b)","mB\\1\\1R&\\1Ax",[global])),
+ <<"FpGwac">> = iolist_to_binary(re:replace("ac","^(?=a(*ACCEPT)b)","Fp\\1Gw",[])),
+ <<"FpGwac">> = iolist_to_binary(re:replace("ac","^(?=a(*ACCEPT)b)","Fp\\1Gw",[global])),
+ <<"abCqbtkqunCIvDxbdMM">> = iolist_to_binary(re:replace("ab","(?>a\\Kb)","&Cq&t\\1kqunCIvDx&dMM",[])),
+ <<"abCqbtkqunCIvDxbdMM">> = iolist_to_binary(re:replace("ab","(?>a\\Kb)","&Cq&t\\1kqunCIvDx&dMM",[global])),
+ <<"aAk">> = iolist_to_binary(re:replace("ab","((?>a\\Kb))","Ak",[])),
+ <<"aAk">> = iolist_to_binary(re:replace("ab","((?>a\\Kb))","Ak",[global])),
+ <<"anKUUUFwaxNFjPabNJd">> = iolist_to_binary(re:replace("ab","(a\\Kb)","nKUUUFwaxNFjP\\1NJd",[])),
+ <<"anKUUUFwaxNFjPabNJd">> = iolist_to_binary(re:replace("ab","(a\\Kb)","nKUUUFwaxNFjP\\1NJd",[global])),
+ <<"acuYfxPcxoRKaceSXk">> = iolist_to_binary(re:replace("ac","^a\\Kcz|ac","&uYfxPcxoRK\\1\\1&eSXk",[])),
+ <<"acuYfxPcxoRKaceSXk">> = iolist_to_binary(re:replace("ac","^a\\Kcz|ac","&uYfxPcxoRK\\1\\1&eSXk",[global])),
+ <<"abCSFabuababvPlR">> = iolist_to_binary(re:replace("ab","(?>a\\Kbz|ab)","\\1&CSF&u&&vPlR",[])),
+ <<"abCSFabuababvPlR">> = iolist_to_binary(re:replace("ab","(?>a\\Kbz|ab)","\\1&CSF&u&&vPlR",[global])),
+ <<"aomXuCuVpjjUFcrWQIR">> = iolist_to_binary(re:replace("ab","^(?&t)(?(DEFINE)(?<t>a\\Kb))$","omXuCuVpjjUFcrW\\1QIR",[])),
+ <<"aomXuCuVpjjUFcrWQIR">> = iolist_to_binary(re:replace("ab","^(?&t)(?(DEFINE)(?<t>a\\Kb))$","omXuCuVpjjUFcrW\\1QIR",[global])),
+ <<"a(b)clxcg">> = iolist_to_binary(re:replace("a(b)c","^([^()]|\\((?1)*\\))*$","&lx\\1g",[])),
+ <<"a(b)clxcg">> = iolist_to_binary(re:replace("a(b)c","^([^()]|\\((?1)*\\))*$","&lx\\1g",[global])),
+ <<"dUeBGa(b(c)d)emKya(b(c)d)e">> = iolist_to_binary(re:replace("a(b(c)d)e","^([^()]|\\((?1)*\\))*$","dU\\1BG&mKy&",[])),
+ <<"dUeBGa(b(c)d)emKya(b(c)d)e">> = iolist_to_binary(re:replace("a(b(c)d)e","^([^()]|\\((?1)*\\))*$","dU\\1BG&mKy&",[global])),
+ <<"cP00f0uN">> = iolist_to_binary(re:replace("0","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","cP&\\1f&uN",[])),
+ <<"cP00f0uN">> = iolist_to_binary(re:replace("0","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","cP&\\1f&uN",[global])),
+ <<"pV00MD00p00haFc00MG00qG">> = iolist_to_binary(re:replace("00","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","pV\\1MD\\1p\\1haFc&MG&qG",[])),
+ <<"pV00MD00p00haFc00MG00qG">> = iolist_to_binary(re:replace("00","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","pV\\1MD\\1p\\1haFc&MG&qG",[global])),
+ <<"GdBC0000INu00000000Y0000">> = iolist_to_binary(re:replace("0000","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","GdBC&INu&&Y&",[])),
+ <<"GdBC0000INu00000000Y0000">> = iolist_to_binary(re:replace("0000","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))","GdBC&INu&&Y&",[global])),
+ ok.
+run44() ->
+ <<"00RwFP">> = iolist_to_binary(re:replace("0","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","&&RwFP",[])),
+ <<"00RwFP">> = iolist_to_binary(re:replace("0","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","&&RwFP",[global])),
+ <<"TIRVuPlNk0">> = iolist_to_binary(re:replace("00","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","TIRVuPlNk",[])),
+ <<"TIRVuPlNkTIRVuPlNk">> = iolist_to_binary(re:replace("00","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","TIRVuPlNk",[global])),
+ <<"0IxIBm0KbqqiO000">> = iolist_to_binary(re:replace("0000","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","&IxIBm&KbqqiO",[])),
+ <<"0IxIBm0KbqqiO0IxIBm0KbqqiO0IxIBm0KbqqiO0IxIBm0KbqqiO">> = iolist_to_binary(re:replace("0000","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))","&IxIBm&KbqqiO",[global])),
+ <<"ACABX">> = iolist_to_binary(re:replace("ACABX","A(*COMMIT)(B|D)","\\1&&\\1KWXWa",[])),
+ <<"ACABX">> = iolist_to_binary(re:replace("ACABX","A(*COMMIT)(B|D)","\\1&&\\1KWXWa",[global])),
+ <<"ABCgPYRRqRBOrABCABCAHBQDEFG">> = iolist_to_binary(re:replace("ABCDEFG","(*COMMIT)(A|P)(B|P)(C|P)","&gPYRRqRBOr&&\\1HBQ",[])),
+ <<"ABCgPYRRqRBOrABCABCAHBQDEFG">> = iolist_to_binary(re:replace("ABCDEFG","(*COMMIT)(A|P)(B|P)(C|P)","&gPYRRqRBOr&&\\1HBQ",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(*COMMIT)(A|P)(B|P)(C|P)","awq\\1dexeIK&rKgbPrqk",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(*COMMIT)(A|P)(B|P)(C|P)","awq\\1dexeIK&rKgbPrqk",[global])),
+ <<"DEFGABC">> = iolist_to_binary(re:replace("DEFGABC","(*COMMIT)(A|P)(B|P)(C|P)","NRfdYIv\\1HtrT",[])),
+ <<"DEFGABC">> = iolist_to_binary(re:replace("DEFGABC","(*COMMIT)(A|P)(B|P)(C|P)","NRfdYIv\\1HtrT",[global])),
+ <<"jYabbbAGmvaabbbXabbbTAaixGp">> = iolist_to_binary(re:replace("abbb","(\\w+)(?>b(*COMMIT))\\w{2}","jY&AGmv\\1&X&TA\\1ixGp",[])),
+ <<"jYabbbAGmvaabbbXabbbTAaixGp">> = iolist_to_binary(re:replace("abbb","(\\w+)(?>b(*COMMIT))\\w{2}","jY&AGmv\\1&X&TA\\1ixGp",[global])),
+ <<"abbb">> = iolist_to_binary(re:replace("abbb","(\\w+)b(*COMMIT)\\w{2}","\\1mM",[])),
+ <<"abbb">> = iolist_to_binary(re:replace("abbb","(\\w+)b(*COMMIT)\\w{2}","\\1mM",[global])),
+ <<"bofPRc">> = iolist_to_binary(re:replace("bac","(?&t)(?#()(?(DEFINE)(?<t>a))","ofPR",[])),
+ <<"bofPRc">> = iolist_to_binary(re:replace("bac","(?&t)(?#()(?(DEFINE)(?<t>a))","ofPR",[global])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?","&ItXS\\1Uh&ueLGo\\1AKJxK",[])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?","&ItXS\\1Uh&ueLGo\\1AKJxK",[global])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","(?>(*COMMIT)(yes|no)(*THEN)(*F))?","VnOG&\\1W",[])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","(?>(*COMMIT)(yes|no)(*THEN)(*F))?","VnOG&\\1W",[global])),
+ ok.
+run45() ->
+ <<"LVLUbcejbciMOvVvY">> = iolist_to_binary(re:replace("bc","b?(*SKIP)c","LV\\1LU&ej&iMOvVvY",[])),
+ <<"LVLUbcejbciMOvVvY">> = iolist_to_binary(re:replace("bc","b?(*SKIP)c","LV\\1LU&ej&iMOvVvY",[global])),
+ <<"aHUUUhKBfPpjU">> = iolist_to_binary(re:replace("abc","b?(*SKIP)c","\\1HUUUhKBf\\1P\\1pjU",[])),
+ <<"aHUUUhKBfPpjU">> = iolist_to_binary(re:replace("abc","b?(*SKIP)c","\\1HUUUhKBf\\1P\\1pjU",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(*SKIP)bc","\\1F&mJF",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(*SKIP)bc","\\1F&mJF",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","(*SKIP)b","P\\1EF",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","(*SKIP)b","P\\1EF",[global])),
+ <<"EiQojDQBehRidDoNAxxx">> = iolist_to_binary(re:replace("xxx","(?P<abn>(?P=abn)xxx|)+","EiQojDQBehRidDoNA",[])),
+ <<"EiQojDQBehRidDoNAxEiQojDQBehRidDoNAxEiQojDQBehRidDoNAxEiQojDQBehRidDoNA">> = iolist_to_binary(re:replace("xxx","(?P<abn>(?P=abn)xxx|)+","EiQojDQBehRidDoNA",[global])),
+ <<"akmvYT">> = iolist_to_binary(re:replace("aa","(?i:([^b]))(?1)","akmvYT",[])),
+ <<"akmvYT">> = iolist_to_binary(re:replace("aa","(?i:([^b]))(?1)","akmvYT",[global])),
+ <<"alaAraWMaaaAKIgQdaAOaF">> = iolist_to_binary(re:replace("aA","(?i:([^b]))(?1)","\\1l&r\\1WM\\1\\1&KIgQd&O\\1F",[])),
+ <<"alaAraWMaaaAKIgQdaAOaF">> = iolist_to_binary(re:replace("aA","(?i:([^b]))(?1)","\\1l&r\\1WM\\1\\1&KIgQd&O\\1F",[global])),
+ <<"*XAfh**hlh Failers">> = iolist_to_binary(re:replace("** Failers","(?i:([^b]))(?1)","\\1XAfh&hlh",[])),
+ <<"*XAfh**hlh XAfh FhlhaXAfhaihlhlXAfhlehlhrXAfhrshlh">> = iolist_to_binary(re:replace("** Failers","(?i:([^b]))(?1)","\\1XAfh&hlh",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(?i:([^b]))(?1)","e\\1eCmoSn",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(?i:([^b]))(?1)","e\\1eCmoSn",[global])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:([^b]))(?1)","hiocPQeyl&&Nx\\1",[])),
+ <<"aB">> = iolist_to_binary(re:replace("aB","(?i:([^b]))(?1)","hiocPQeyl&&Nx\\1",[global])),
+ <<"Ba">> = iolist_to_binary(re:replace("Ba","(?i:([^b]))(?1)","Q\\1ImC\\1ihLTYkO",[])),
+ <<"Ba">> = iolist_to_binary(re:replace("Ba","(?i:([^b]))(?1)","Q\\1ImC\\1ihLTYkO",[global])),
+ <<"ba">> = iolist_to_binary(re:replace("ba","(?i:([^b]))(?1)","R\\1bTV\\1\\1",[])),
+ <<"ba">> = iolist_to_binary(re:replace("ba","(?i:([^b]))(?1)","R\\1bTV\\1\\1",[global])),
+ <<"mwO">> = iolist_to_binary(re:replace("aaaaaaX","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","mwO",[])),
+ <<"mwO">> = iolist_to_binary(re:replace("aaaaaaX","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","mwO",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","EQl\\1AR",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","EQl\\1AR",[global])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","&yy\\1GJaXojFYo",[])),
+ <<"aaaaaa">> = iolist_to_binary(re:replace("aaaaaa","^(?&t)*+(?(DEFINE)(?<t>a))\\w$","&yy\\1GJaXojFYo",[global])),
+ <<"WMarOaaaaaaXebFIbQKdmm">> = iolist_to_binary(re:replace("aaaaaaX","^(?&t)*(?(DEFINE)(?<t>a))\\w$","\\1W\\1MarO&ebFIbQKdm\\1\\1m",[])),
+ <<"WMarOaaaaaaXebFIbQKdmm">> = iolist_to_binary(re:replace("aaaaaaX","^(?&t)*(?(DEFINE)(?<t>a))\\w$","\\1W\\1MarO&ebFIbQKdm\\1\\1m",[global])),
+ <<"lWw">> = iolist_to_binary(re:replace("aaaaaa","^(?&t)*(?(DEFINE)(?<t>a))\\w$","lWw\\1",[])),
+ <<"lWw">> = iolist_to_binary(re:replace("aaaaaa","^(?&t)*(?(DEFINE)(?<t>a))\\w$","lWw\\1",[global])),
+ <<"IpraaaaXkaKXqwTNFSEgDP">> = iolist_to_binary(re:replace("aaaaX","^(a)*+(\\w)","Ipr&k\\1KXqwTNFSEgDP",[])),
+ <<"IpraaaaXkaKXqwTNFSEgDP">> = iolist_to_binary(re:replace("aaaaX","^(a)*+(\\w)","Ipr&k\\1KXqwTNFSEgDP",[global])),
+ <<"jnYLYhYZ">> = iolist_to_binary(re:replace("YZ","^(a)*+(\\w)","jn&L&\\1\\1hY",[])),
+ <<"jnYLYhYZ">> = iolist_to_binary(re:replace("YZ","^(a)*+(\\w)","jn&L&\\1\\1hY",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a)*+(\\w)","d\\1&ohvven\\1&P\\1\\1exSs",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a)*+(\\w)","d\\1&ohvven\\1&P\\1\\1exSs",[global])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(a)*+(\\w)","biv&rxkne",[])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(a)*+(\\w)","biv&rxkne",[global])),
+ <<"FVSRXhsNXQwYCX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)*+(\\w)","FVSR\\1hsN\\1QwYC\\1",[])),
+ <<"FVSRXhsNXQwYCX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)*+(\\w)","FVSR\\1hsN\\1QwYC\\1",[global])),
+ <<"MiyTnbYYLxIYkYvmDUZ">> = iolist_to_binary(re:replace("YZ","^(?:a)*+(\\w)","MiyTnb&&LxI\\1k\\1vmDU",[])),
+ <<"MiyTnbYYLxIYkYvmDUZ">> = iolist_to_binary(re:replace("YZ","^(?:a)*+(\\w)","MiyTnb&&LxI\\1k\\1vmDU",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a)*+(\\w)","&Ugr\\1y",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a)*+(\\w)","&Ugr\\1y",[global])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(?:a)*+(\\w)","\\1\\1&Qbd\\1SyY&u",[])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(?:a)*+(\\w)","\\1\\1&Qbd\\1SyY&u",[global])),
+ <<"uQsoweaaaaXLoVaaaaaXmpAeu">> = iolist_to_binary(re:replace("aaaaX","^(a)++(\\w)","uQsowe&LoVa&mpAeu",[])),
+ <<"uQsoweaaaaXLoVaaaaaXmpAeu">> = iolist_to_binary(re:replace("aaaaX","^(a)++(\\w)","uQsowe&LoVa&mpAeu",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a)++(\\w)","Nqxlkpdpkdkbt",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a)++(\\w)","Nqxlkpdpkdkbt",[global])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(a)++(\\w)","rKpJsjRH&q",[])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(a)++(\\w)","rKpJsjRH&q",[global])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(a)++(\\w)","\\1kUJik\\1c\\1d\\1wcEQVl",[])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(a)++(\\w)","\\1kUJik\\1c\\1d\\1wcEQVl",[global])),
+ <<"aaaaXaaaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)++(\\w)","&&",[])),
+ <<"aaaaXaaaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)++(\\w)","&&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a)++(\\w)","qJF",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a)++(\\w)","qJF",[global])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(?:a)++(\\w)","Myqjwdc&SqVjwe\\1ab\\1x",[])),
+ <<"aaaa">> = iolist_to_binary(re:replace("aaaa","^(?:a)++(\\w)","Myqjwdc&SqVjwe\\1ab\\1x",[global])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(?:a)++(\\w)","pXmu",[])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(?:a)++(\\w)","pXmu",[global])),
+ <<"dKaaX">> = iolist_to_binary(re:replace("aaaaX","^(a)?+(\\w)","dK",[])),
+ <<"dKaaX">> = iolist_to_binary(re:replace("aaaaX","^(a)?+(\\w)","dK",[global])),
+ <<"QtZ">> = iolist_to_binary(re:replace("YZ","^(a)?+(\\w)","Qt",[])),
+ <<"QtZ">> = iolist_to_binary(re:replace("YZ","^(a)?+(\\w)","Qt",[global])),
+ <<"yaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)?+(\\w)","y",[])),
+ <<"yaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a)?+(\\w)","y",[global])),
+ <<"knhrTYKYCYLYLHYZ">> = iolist_to_binary(re:replace("YZ","^(?:a)?+(\\w)","knhrT\\1K&C&L\\1LH\\1",[])),
+ <<"knhrTYKYCYLYLHYZ">> = iolist_to_binary(re:replace("YZ","^(?:a)?+(\\w)","knhrT\\1K&C&L\\1LH\\1",[global])),
+ <<"qaFxAasVdrHD">> = iolist_to_binary(re:replace("aaaaX","^(a){2,}+(\\w)","q\\1FxAasVdrHD",[])),
+ <<"qaFxAasVdrHD">> = iolist_to_binary(re:replace("aaaaX","^(a){2,}+(\\w)","q\\1FxAasVdrHD",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a){2,}+(\\w)","Ce",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(a){2,}+(\\w)","Ce",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a){2,}+(\\w)","Pr\\1pRjfic",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(a){2,}+(\\w)","Pr\\1pRjfic",[global])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(a){2,}+(\\w)","\\1qc&A\\1p\\1Ce",[])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(a){2,}+(\\w)","\\1qc&A\\1p\\1Ce",[global])),
+ <<"TomaaaaXfexyXrPgPChaaaaXUaaaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a){2,}+(\\w)","Tom&fexy\\1rPgPCh&U&",[])),
+ <<"TomaaaaXfexyXrPgPChaaaaXUaaaaX">> = iolist_to_binary(re:replace("aaaaX","^(?:a){2,}+(\\w)","Tom&fexy\\1rPgPCh&U&",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a){2,}+(\\w)","QxuQNyMAkLj\\1N",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","^(?:a){2,}+(\\w)","QxuQNyMAkLj\\1N",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(?:a){2,}+(\\w)","qs&d\\1p&DFpaHv",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^(?:a){2,}+(\\w)","qs&d\\1p&DFpaHv",[global])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(?:a){2,}+(\\w)","&YUGUUNV&jklvBQ",[])),
+ <<"YZ">> = iolist_to_binary(re:replace("YZ","^(?:a){2,}+(\\w)","&YUGUUNV&jklvBQ",[global])),
+ <<"kRhvBb">> = iolist_to_binary(re:replace("b","(a|)*(?1)b","kRhvB&",[])),
+ <<"kRhvBb">> = iolist_to_binary(re:replace("b","(a|)*(?1)b","kRhvB&",[global])),
+ <<"UabqY">> = iolist_to_binary(re:replace("ab","(a|)*(?1)b","U&qY",[])),
+ <<"UabqY">> = iolist_to_binary(re:replace("ab","(a|)*(?1)b","U&qY",[global])),
+ <<"vmyFiqvLaabXSeOYAObD">> = iolist_to_binary(re:replace("aab","(a|)*(?1)b","vmyFiqvL&XSeOYAObD",[])),
+ <<"vmyFiqvLaabXSeOYAObD">> = iolist_to_binary(re:replace("aab","(a|)*(?1)b","vmyFiqvL&XSeOYAObD",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)++(?1)b","aYXyIdVfFghDXyBuUsnK",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)++(?1)b","aYXyIdVfFghDXyBuUsnK",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(a)++(?1)b","mJgf&UxblrhCqYENY",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(a)++(?1)b","mJgf&UxblrhCqYENY",[global])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","(a)++(?1)b","Nji&a",[])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","(a)++(?1)b","Nji&a",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)*+(?1)b","oFCeDPwP&kYedB",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(a)*+(?1)b","oFCeDPwP&kYedB",[global])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(a)*+(?1)b","&ws\\1adQnsr\\1NinVGyRsh",[])),
+ <<"ab">> = iolist_to_binary(re:replace("ab","(a)*+(?1)b","&ws\\1adQnsr\\1NinVGyRsh",[global])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","(a)*+(?1)b","Sb&x&",[])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","(a)*+(?1)b","Sb&x&",[global])),
+ <<"bQNe">> = iolist_to_binary(re:replace("b","(?1)(?:(b)){0}","&QNe",[])),
+ <<"bQNe">> = iolist_to_binary(re:replace("b","(?1)(?:(b)){0}","&QNe",[global])),
+ <<"KRfoo(bar(baz)+baz(bop))yTvP">> = iolist_to_binary(re:replace("foo(bar(baz)+baz(bop))","(foo ( \\( ((?:(?> [^()]+ )|(?2))*) \\) ) )","KR\\1yTvP",[extended])),
+ <<"KRfoo(bar(baz)+baz(bop))yTvP">> = iolist_to_binary(re:replace("foo(bar(baz)+baz(bop))","(foo ( \\( ((?:(?> [^()]+ )|(?2))*) \\) ) )","KR\\1yTvP",[extended,
+ global])),
+ ok.
+run46() ->
+ <<"Cfqx">> = iolist_to_binary(re:replace("AB","(A (A|B(*ACCEPT)|C) D)(E)","Cfqx",[extended])),
+ <<"Cfqx">> = iolist_to_binary(re:replace("AB","(A (A|B(*ACCEPT)|C) D)(E)","Cfqx",[extended,
+ global])),
+ <<"abaaHraVohxea">> = iolist_to_binary(re:replace("ba","\\A.*?(a|bc)","a&\\1Hr\\1Vohxe\\1",[])),
+ <<"abaaHraVohxea">> = iolist_to_binary(re:replace("ba","\\A.*?(a|bc)","a&\\1Hr\\1Vohxe\\1",[global])),
+ <<"hEyjnxKIbWTujTtR">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc)++","hEyjnxKIbWT\\1ujT\\1tR",[])),
+ <<"hEyjnxKIbWTujTtR">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc)++","hEyjnxKIbWT\\1ujT\\1tR",[global])),
+ <<"oTgqSlaOSViBsWdYFa">> = iolist_to_binary(re:replace("ba","\\A.*?(a|bc)++","oTgqSl\\1OSViBsWdYF\\1",[])),
+ <<"oTgqSlaOSViBsWdYFa">> = iolist_to_binary(re:replace("ba","\\A.*?(a|bc)++","oTgqSl\\1OSViBsWdYF\\1",[global])),
+ <<"pATfIbaqPbaaOQbaSG">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc|d)","pATfI\\1&qP&aOQ&SG\\1",[])),
+ <<"pATfIbaqPbaaOQbaSG">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc|d)","pATfI\\1&qP&aOQ&SG\\1",[global])),
+ <<"bJYJaBVjnbvSceetle">> = iolist_to_binary(re:replace("beetle","(?:(b))++","bJYJaBVjn\\1vSc",[])),
+ <<"bJYJaBVjnbvSceetle">> = iolist_to_binary(re:replace("beetle","(?:(b))++","bJYJaBVjn\\1vSc",[global])),
+ <<"MEbqeMaqej">> = iolist_to_binary(re:replace("a","(?(?=(a(*ACCEPT)z))a)","MEbqeM\\1qej",[])),
+ <<"MEbqeMaqejMEbqeMqej">> = iolist_to_binary(re:replace("a","(?(?=(a(*ACCEPT)z))a)","MEbqeM\\1qej",[global])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a)(?1)+ab","&",[])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a)(?1)+ab","&",[global])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a)(?1)++ab","O&\\1shXpvDpv&VVC",[])),
+ <<"aaaab">> = iolist_to_binary(re:replace("aaaab","^(a)(?1)++ab","O&\\1shXpvDpv&VVC",[global])),
+ <<"RARockgammon">> = iolist_to_binary(re:replace("backgammon","(?(DEFINE)(a))?b(?1)","RARo\\1",[])),
+ <<"RARockgammon">> = iolist_to_binary(re:replace("backgammon","(?(DEFINE)(a))?b(?1)","RARo\\1",[global])),
+ <<"wlgVxP
+def">> = iolist_to_binary(re:replace("abc
+def","^\\N+","wlgVxP",[])),
+ <<"wlgVxP
+def">> = iolist_to_binary(re:replace("abc
+def","^\\N+","wlgVxP",[global])),
+ <<"G
+def">> = iolist_to_binary(re:replace("abc
+def","^\\N{1,}","G",[])),
+ <<"G
+def">> = iolist_to_binary(re:replace("abc
+def","^\\N{1,}","G",[global])),
+ <<"Iocde">> = iolist_to_binary(re:replace("aaaabcde","(?(R)a+|(?R)b)","Io",[])),
+ <<"Iocde">> = iolist_to_binary(re:replace("aaaabcde","(?(R)a+|(?R)b)","Io",[global])),
+ <<"kXRsqrvOjaaaaanNXFFUcde">> = iolist_to_binary(re:replace("aaaabcde","(?(R)a+|((?R))b)","kXRsqrvOja\\1nNXFFU",[])),
+ <<"kXRsqrvOjaaaaanNXFFUcde">> = iolist_to_binary(re:replace("aaaabcde","(?(R)a+|((?R))b)","kXRsqrvOja\\1nNXFFU",[global])),
+ <<"QNpwCPcde">> = iolist_to_binary(re:replace("aaaabcde","((?(R)a+|(?1)b))","QNpwCP",[])),
+ <<"QNpwCPcde">> = iolist_to_binary(re:replace("aaaabcde","((?(R)a+|(?1)b))","QNpwCP",[global])),
+ <<"QcDpPOcde">> = iolist_to_binary(re:replace("aaaabcde","((?(R1)a+|(?1)b))","QcDpPO",[])),
+ <<"QcDpPOcde">> = iolist_to_binary(re:replace("aaaabcde","((?(R1)a+|(?1)b))","QcDpPO",[global])),
+ <<"hIv">> = iolist_to_binary(re:replace("a","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","\\1hIv",[])),
+ <<"hIv">> = iolist_to_binary(re:replace("a","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","\\1hIv",[global])),
+ <<"bHaeaxaaAF">> = iolist_to_binary(re:replace("ba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","H&\\1eax&&AF",[])),
+ <<"bHaeaxaaAF">> = iolist_to_binary(re:replace("ba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","H&\\1eax&&AF",[global])),
+ <<"bbyaRYN">> = iolist_to_binary(re:replace("bba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","y&RYN",[])),
+ <<"bbyaRYN">> = iolist_to_binary(re:replace("bba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))","y&RYN",[global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b) c","y\\1YaiS",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b) c","y\\1YaiS",[extended,
+ global])),
+ ok.
+run47() ->
+ <<"LababMabJVX">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b|(*F)) c","L\\1\\1M\\1JVX",[extended])),
+ <<"LababMabJVX">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b|(*F)) c","L\\1\\1M\\1JVX",[extended,
+ global])),
+ <<"jBPevabLaabcWNWjnnaabcpgwaabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b) | (*F) ) c","jBPev\\1L&WNWjnn&pgw&",[extended])),
+ <<"jBPevabLaabcWNWjnnaabcpgwaabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b) | (*F) ) c","jBPev\\1L&WNWjnn&pgw&",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b) ) c","GOxmfDqgi",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b) ) c","GOxmfDqgi",[extended,
global])),
-?line <<"xYgnYjja]Bgw">> = iolist_to_binary(re:replace("a]","[[:abcd:xyz]]","\\1xYgnYjj&Bgw",[])),
-?line <<"xYgnYjja]Bgw">> = iolist_to_binary(re:replace("a]","[[:abcd:xyz]]","\\1xYgnYjj&Bgw",[global])),
-?line <<"K:]Y:]tTEIHHPgm">> = iolist_to_binary(re:replace(":]","[[:abcd:xyz]]","K\\1&Y&tT\\1EI\\1H\\1HP\\1gm",[])),
-?line <<"K:]Y:]tTEIHHPgm">> = iolist_to_binary(re:replace(":]","[[:abcd:xyz]]","K\\1&Y&tT\\1EI\\1H\\1HP\\1gm",[global])),
-?line <<"pcaYhpF">> = iolist_to_binary(re:replace("a","[abc[:x\\]pqr]","pc&Y\\1hpF",[])),
-?line <<"pcaYhpF">> = iolist_to_binary(re:replace("a","[abc[:x\\]pqr]","pc&Y\\1hpF",[global])),
-?line <<"I[">> = iolist_to_binary(re:replace("[","[abc[:x\\]pqr]","I\\1&",[])),
-?line <<"I[">> = iolist_to_binary(re:replace("[","[abc[:x\\]pqr]","I\\1&",[global])),
-?line <<"SYn:iPpASU">> = iolist_to_binary(re:replace(":","[abc[:x\\]pqr]","SY\\1n&iP\\1pAS\\1U",[])),
-?line <<"SYn:iPpASU">> = iolist_to_binary(re:replace(":","[abc[:x\\]pqr]","SY\\1n&iP\\1pAS\\1U",[global])),
-?line <<"VwLRsMyuKqCwx">> = iolist_to_binary(re:replace("]","[abc[:x\\]pqr]","VwLRsMyuKqCwx",[])),
-?line <<"VwLRsMyuKqCwx">> = iolist_to_binary(re:replace("]","[abc[:x\\]pqr]","VwLRsMyuKqCwx",[global])),
-?line <<"YqUufuU">> = iolist_to_binary(re:replace("p","[abc[:x\\]pqr]","YqU\\1ufuU",[])),
-?line <<"YqUufuU">> = iolist_to_binary(re:replace("p","[abc[:x\\]pqr]","YqU\\1ufuU",[global])),
-ok.
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b) c","H\\1mWytdK\\1",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b) c","H\\1mWytdK\\1",[extended,
+ global])),
+ <<"bpmBlFODKYLa">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b|(*F)) c","bpmBlFO\\1DKYLa",[extended])),
+ <<"bpmBlFODKYLa">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b|(*F)) c","bpmBlFO\\1DKYLa",[extended,
+ global])),
+ <<"JjdAaabcVAKJYnJUNmb">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b) | (*F) ) c","JjdA&VAKJYnJUN\\1mb",[extended])),
+ <<"JjdAaabcVAKJYnJUNmb">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b) | (*F) ) c","JjdA&VAKJYnJUN\\1mb",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b) ) c","th\\1Srp\\1LGEBK",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b) ) c","th\\1Srp\\1LGEBK",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?>a(*THEN)b) c","ukgQQVa\\1qLglPHKE",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?>a(*THEN)b) c","ukgQQVa\\1qLglPHKE",[extended,
+ global])),
+ <<"PVXXt">> = iolist_to_binary(re:replace("aabc","^.*? (?>a(*THEN)b|(*F)) c","PVXXt",[extended])),
+ <<"PVXXt">> = iolist_to_binary(re:replace("aabc","^.*? (?>a(*THEN)b|(*F)) c","PVXXt",[extended,
+ global])),
+ <<"XNnaabcsJeaabciijbma">> = iolist_to_binary(re:replace("aabc","^.*? (?> (?>a(*THEN)b) | (*F) ) c","XNn&sJe&iijbma",[extended])),
+ <<"XNnaabcsJeaabciijbma">> = iolist_to_binary(re:replace("aabc","^.*? (?> (?>a(*THEN)b) | (*F) ) c","XNn&sJe&iijbma",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?> (?>a(*THEN)b) ) c","CtO\\1VdQgHMA&JMp",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?> (?>a(*THEN)b) ) c","CtO\\1VdQgHMA&JMp",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b)++ c","AAl\\1s\\1MAOnKUxaX",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b)++ c","AAl\\1s\\1MAOnKUxaX",[extended,
+ global])),
+ <<"iaabcpWabNRGraabct">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b|(*F))++ c","i&pW\\1NRGr&t",[extended])),
+ <<"iaabcpWabNRGraabct">> = iolist_to_binary(re:replace("aabc","^.*? (a(*THEN)b|(*F))++ c","i&pW\\1NRGr&t",[extended,
+ global])),
+ <<"aabcqfVFpeSPlabMdablfKabP">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b)++ | (*F) )++ c","&qfVFpeSPl\\1Md\\1lfK\\1P",[extended])),
+ <<"aabcqfVFpeSPlabMdablfKabP">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b)++ | (*F) )++ c","&qfVFpeSPl\\1Md\\1lfK\\1P",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b)++ )++ c","b\\1de\\1",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? ( (a(*THEN)b)++ )++ c","b\\1de\\1",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b)++ c","&\\1&MQR\\1u\\1SGG&\\1SpJ",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b)++ c","&\\1&MQR\\1u\\1SGG&\\1SpJ",[extended,
+ global])),
+ ok.
+run48() ->
+ <<"SaabcjaKGAOmOgHE">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b|(*F))++ c","S&\\1jaKGAOmOgHE",[extended])),
+ <<"SaabcjaKGAOmOgHE">> = iolist_to_binary(re:replace("aabc","^.*? (?:a(*THEN)b|(*F))++ c","S&\\1jaKGAOmOgHE",[extended,
+ global])),
+ <<"VvLaabclAtFq">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c","VvL&lAtFq",[extended])),
+ <<"VvLaabclAtFq">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c","VvL&lAtFq",[extended,
+ global])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b)++ )++ c","Mg&",[extended])),
+ <<"aabc">> = iolist_to_binary(re:replace("aabc","^.*? (?: (?:a(*THEN)b)++ )++ c","Mg&",[extended,
+ global])),
+ <<"prdTVmJacpUmv">> = iolist_to_binary(re:replace("ac","^(?(?=a(*THEN)b)ab|ac)","prdT\\1VmJ&pUmv",[])),
+ <<"prdTVmJacpUmv">> = iolist_to_binary(re:replace("ac","^(?(?=a(*THEN)b)ab|ac)","prdT\\1VmJ&pUmv",[global])),
+ <<"ba">> = iolist_to_binary(re:replace("ba","^.*?(?(?=a)a|b(*THEN)c)","wa",[])),
+ <<"ba">> = iolist_to_binary(re:replace("ba","^.*?(?(?=a)a|b(*THEN)c)","wa",[global])),
+ <<"JLcpcbaPX">> = iolist_to_binary(re:replace("ba","^.*?(?:(?(?=a)a|b(*THEN)c)|d)","JLcpc&PX",[])),
+ <<"JLcpcbaPX">> = iolist_to_binary(re:replace("ba","^.*?(?:(?(?=a)a|b(*THEN)c)|d)","JLcpc&PX",[global])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^.*?(?(?=a)a(*THEN)b|c)","P\\1eLsoy&h",[])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","^.*?(?(?=a)a(*THEN)b|c)","P\\1eLsoy&h",[global])),
+ <<"aaQkbjSmrabIabc">> = iolist_to_binary(re:replace("aabc","^.*(?=a(*THEN)b)","&&Q\\1kbjSmr&\\1bI",[])),
+ <<"aaQkbjSmrabIabc">> = iolist_to_binary(re:replace("aabc","^.*(?=a(*THEN)b)","&&Q\\1kbjSmr&\\1bI",[global])),
+ <<"xascDcHDAWsCEkjCgcd">> = iolist_to_binary(re:replace("xacd","(?<=a(*ACCEPT)b)c","s\\1&D&HDAWsCEkjC\\1g&",[])),
+ <<"xascDcHDAWsCEkjCgcd">> = iolist_to_binary(re:replace("xacd","(?<=a(*ACCEPT)b)c","s\\1&D&HDAWsCEkjC\\1g&",[global])),
+ <<"xaTcalxCpPaREWFWqwSqLed">> = iolist_to_binary(re:replace("xacd","(?<=(a(*ACCEPT)b))c","T&\\1lxCpP\\1REWFWqwSqLe",[])),
+ <<"xaTcalxCpPaREWFWqwSqLed">> = iolist_to_binary(re:replace("xacd","(?<=(a(*ACCEPT)b))c","T&\\1lxCpP\\1REWFWqwSqLe",[global])),
+ <<"xababKJXd">> = iolist_to_binary(re:replace("xabcd","(?<=(a(*COMMIT)b))c","\\1KJX",[])),
+ <<"xababKJXd">> = iolist_to_binary(re:replace("xabcd","(?<=(a(*COMMIT)b))c","\\1KJX",[global])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=(a(*COMMIT)b))c","caxcMW&&uQRuH",[])),
+ <<"** Failers">> = iolist_to_binary(re:replace("** Failers","(?<=(a(*COMMIT)b))c","caxcMW&&uQRuH",[global])),
+ <<"xacd">> = iolist_to_binary(re:replace("xacd","(?<=(a(*COMMIT)b))c","FOAJ",[])),
+ <<"xacd">> = iolist_to_binary(re:replace("xacd","(?<=(a(*COMMIT)b))c","FOAJ",[global])),
+ <<"xkklXcAWOSApWPhcsCd">> = iolist_to_binary(re:replace("xcd","(?<!a(*FAIL)b)c","kklX&AWOSApWPhcsC",[])),
+ <<"xkklXcAWOSApWPhcsCd">> = iolist_to_binary(re:replace("xcd","(?<!a(*FAIL)b)c","kklX&AWOSApWPhcsC",[global])),
+ <<"aEd">> = iolist_to_binary(re:replace("acd","(?<!a(*FAIL)b)c","E",[])),
+ <<"aEd">> = iolist_to_binary(re:replace("acd","(?<!a(*FAIL)b)c","E",[global])),
+ <<"xabXbpgbspePmyaYAcaQfd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*PRUNE)b)c","XbpgbspePmyaYA&a\\1Qf\\1",[])),
+ <<"xabXbpgbspePmyaYAcaQfd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*PRUNE)b)c","XbpgbspePmyaYA&a\\1Qf\\1",[global])),
+ <<"xabLEAOaSIPRfaaJd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*SKIP)b)c","LEAO\\1a\\1SIPRfaaJ",[])),
+ <<"xabLEAOaSIPRfaaJd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*SKIP)b)c","LEAO\\1a\\1SIPRfaaJ",[global])),
+ <<"xabaUocAdcnXoUlbd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*THEN)b)c","aUocAdcnXoUlb",[])),
+ <<"xabaUocAdcnXoUlbd">> = iolist_to_binary(re:replace("xabcd","(?<=a(*THEN)b)c","aUocAdcnXoUlb",[global])),
+ <<"nkbGaaSijewUabcdnMG">> = iolist_to_binary(re:replace("abcd","(a)(?2){2}(.)","nkbG\\1aSijewU&nMG",[])),
+ <<"nkbGaaSijewUabcdnMG">> = iolist_to_binary(re:replace("abcd","(a)(?2){2}(.)","nkbG\\1aSijewU&nMG",[global])),
+ ok.
+run49() ->
+ <<"hello world SintestMnKXO">> = iolist_to_binary(re:replace("hello world test","(another)?(\\1?)test","Sin&MnKXO",[])),
+ <<"hello world SintestMnKXO">> = iolist_to_binary(re:replace("hello world test","(another)?(\\1?)test","Sin&MnKXO",[global])),
+ <<"hello world test">> = iolist_to_binary(re:replace("hello world test","(another)?(\\1+)test","EqY&e&Np",[])),
+ <<"hello world test">> = iolist_to_binary(re:replace("hello world test","(another)?(\\1+)test","EqY&e&Np",[global])),
+ <<"aacnRTVpYnGmPcIyAaacWH">> = iolist_to_binary(re:replace("aac","(a(*COMMIT)b){0}a(?1)|aac","\\1&n\\1RTVpYnGmPcIyA&WH",[])),
+ <<"aacnRTVpYnGmPcIyAaacWH">> = iolist_to_binary(re:replace("aac","(a(*COMMIT)b){0}a(?1)|aac","\\1&n\\1RTVpYnGmPcIyA&WH",[global])),
+ <<"saacAdlboHVPY">> = iolist_to_binary(re:replace("aac","((?:a?)*)*c","s&\\1Adlb\\1oHVPY",[])),
+ <<"saacAdlboHVPY">> = iolist_to_binary(re:replace("aac","((?:a?)*)*c","s&\\1Adlb\\1oHVPY",[global])),
+ <<"PQFQipl">> = iolist_to_binary(re:replace("aac","((?>a?)*)*c","\\1PQF\\1Qipl",[])),
+ <<"PQFQipl">> = iolist_to_binary(re:replace("aac","((?>a?)*)*c","\\1PQF\\1Qipl",[global])),
+ <<"aOSwgH">> = iolist_to_binary(re:replace("aba","(?>.*?a)(?<=ba)","OSwg\\1H",[])),
+ <<"aOSwgH">> = iolist_to_binary(re:replace("aba","(?>.*?a)(?<=ba)","OSwg\\1H",[global])),
+ <<"UL">> = iolist_to_binary(re:replace("aba","(?:.*?a)(?<=ba)","UL",[])),
+ <<"UL">> = iolist_to_binary(re:replace("aba","(?:.*?a)(?<=ba)","UL",[global])),
+ <<"akGFFqTULiWlebdQv">> = iolist_to_binary(re:replace("aab",".*?a(*PRUNE)b","kGFFqTU\\1Li\\1\\1Wl\\1ebdQv",[])),
+ <<"akGFFqTULiWlebdQv">> = iolist_to_binary(re:replace("aab",".*?a(*PRUNE)b","kGFFqTU\\1Li\\1\\1Wl\\1ebdQv",[global])),
+ <<"aXPTFWMMabnvLRLXcgs">> = iolist_to_binary(re:replace("aab",".*?a(*PRUNE)b","XP\\1T\\1FWMM&nvLRL\\1Xcgs",[dotall])),
+ <<"aXPTFWMMabnvLRLXcgs">> = iolist_to_binary(re:replace("aab",".*?a(*PRUNE)b","XP\\1T\\1FWMM&nvLRL\\1Xcgs",[dotall,
+ global])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^a(*PRUNE)b","kTbd&d\\1IUxwe",[dotall])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","^a(*PRUNE)b","kTbd&d\\1IUxwe",[dotall,
+ global])),
+ <<"atVababo">> = iolist_to_binary(re:replace("aab",".*?a(*SKIP)b","\\1tV&&o",[])),
+ <<"atVababo">> = iolist_to_binary(re:replace("aab",".*?a(*SKIP)b","\\1tV&&o",[global])),
+ <<"aWeRyiVpKsDiabnl">> = iolist_to_binary(re:replace("aab","(?>.*?a)b","WeR\\1yiVpKsDi&nl\\1",[dotall])),
+ <<"aWeRyiVpKsDiabnl">> = iolist_to_binary(re:replace("aab","(?>.*?a)b","WeR\\1yiVpKsDi&nl\\1",[dotall,
+ global])),
+ <<"aUabbhWWOF">> = iolist_to_binary(re:replace("aab","(?>.*?a)b","U&bhWWOF\\1",[])),
+ <<"aUabbhWWOF">> = iolist_to_binary(re:replace("aab","(?>.*?a)b","U&bhWWOF\\1",[global])),
+ ok.
+run50() ->
+ <<"aab">> = iolist_to_binary(re:replace("aab","(?>^a)b","l",[dotall])),
+ <<"aab">> = iolist_to_binary(re:replace("aab","(?>^a)b","l",[dotall,
+ global])),
+ <<"alphabetabcdeY">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*?)(?<=(abcd)|(wxyz))","eY",[])),
+ <<"alphabetabcdeY">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*?)(?<=(abcd)|(wxyz))","eY",[global])),
+ <<"endingwxyzmUXcfh">> = iolist_to_binary(re:replace("endingwxyz","(?>.*?)(?<=(abcd)|(wxyz))","mUX&cf\\1\\1h",[])),
+ <<"endingwxyzmUXcfh">> = iolist_to_binary(re:replace("endingwxyz","(?>.*?)(?<=(abcd)|(wxyz))","mUX&cf\\1\\1h",[global])),
+ <<"alphabetabcddalphabetabcdHPabcdycalphabetabcdalphabetabcdabcdAsalphabetabcdnalphabetabcd">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd)|(wxyz))","&d&HP\\1yc&&\\1As&n&",[])),
+ <<"alphabetabcddalphabetabcdHPabcdycalphabetabcdalphabetabcdabcdAsalphabetabcdnalphabetabcddHPabcdycabcdAsn">> = iolist_to_binary(re:replace("alphabetabcd","(?>.*)(?<=(abcd)|(wxyz))","&d&HP\\1yc&&\\1As&n&",[global])),
+ <<"nuJausendingwxyzRQmendingwxyzxY">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd)|(wxyz))","nuJaus&RQm&xY",[])),
+ <<"nuJausendingwxyzRQmendingwxyzxYnuJausRQmxY">> = iolist_to_binary(re:replace("endingwxyz","(?>.*)(?<=(abcd)|(wxyz))","nuJaus&RQm&xY",[global])),
+ <<"abcdfooxyz">> = iolist_to_binary(re:replace("abcdfooxyz","(?>.*)foo","tW\\1",[])),
+ <<"abcdfooxyz">> = iolist_to_binary(re:replace("abcdfooxyz","(?>.*)foo","tW\\1",[global])),
+ <<"abcdfooVDUixyz">> = iolist_to_binary(re:replace("abcdfooxyz","(?>.*?)foo","&VDUi",[])),
+ <<"abcdfooVDUixyz">> = iolist_to_binary(re:replace("abcdfooxyz","(?>.*?)foo","&VDUi",[global])),
+ <<"acxmMn">> = iolist_to_binary(re:replace("ac","(?:(a(*PRUNE)b)){0}(?:(?1)|ac)","&\\1xmMn",[])),
+ <<"acxmMn">> = iolist_to_binary(re:replace("ac","(?:(a(*PRUNE)b)){0}(?:(?1)|ac)","&\\1xmMn",[global])),
+ <<"PvKHsAacacQ">> = iolist_to_binary(re:replace("ac","(?:(a(*SKIP)b)){0}(?:(?1)|ac)","P\\1vKHsA&&Q",[])),
+ <<"PvKHsAacacQ">> = iolist_to_binary(re:replace("ac","(?:(a(*SKIP)b)){0}(?:(?1)|ac)","P\\1vKHsA&&Q",[global])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","(?<=(*SKIP)ac)a","g",[])),
+ <<"aa">> = iolist_to_binary(re:replace("aa","(?<=(*SKIP)ac)a","g",[global])),
+ <<"aakcebaaaacgyaaaaceWGsoCOKKn">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)b|a+c","kceb&gy&eWG\\1soCOKKn",[])),
+ <<"aakcebaaaacgyaaaaceWGsoCOKKn">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)b|a+c","kceb&gy&eWG\\1soCOKKn",[global])),
+ <<"aaMwmkmaaaacTVDJaaaacSHIqUKYU">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)(*PRUNE)b|a+c","Mwmk\\1m&TVDJ&SHIqUKYU",[])),
+ <<"aaMwmkmaaaacTVDJaaaacSHIqUKYU">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)(*PRUNE)b|a+c","Mwmk\\1m&TVDJ&SHIqUKYU",[global])),
+ <<"aaaaaacWXE">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP:N)(*PRUNE)b|a+c","&WXE",[])),
+ <<"aaaaaacWXE">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP:N)(*PRUNE)b|a+c","&WXE",[global])),
+ <<"aalIbneaaaac">> = iolist_to_binary(re:replace("aaaaaac","aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c","\\1lI\\1b\\1ne&",[])),
+ <<"aalIbneaaaac">> = iolist_to_binary(re:replace("aaaaaac","aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c","\\1lI\\1b\\1ne&",[global])),
+ <<"aauaaaacUCgqIctaaaacOCUYF">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)(*PRUNE)b|a+c","u&UCg\\1qIct&O\\1CU\\1\\1YF",[])),
+ <<"aauaaaacUCgqIctaaaacOCUYF">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)(*PRUNE)b|a+c","u&UCg\\1qIct&O\\1CU\\1\\1YF",[global])),
+ ok.
+run51() ->
+ <<"aaaaaKQacStnP">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)b|a+c","K\\1Q&St\\1nP",[])),
+ <<"aaaaaKQacStnP">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)b|a+c","K\\1Q&St\\1nP",[global])),
+ <<"aaaaaYggUuQGacfRtKLJ">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)(*SKIP)b|a+c","YggUu\\1QG&\\1fRtKL\\1\\1J\\1",[])),
+ <<"aaaaaYggUuQGacfRtKLJ">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)(*SKIP)b|a+c","YggUu\\1QG&\\1fRtKL\\1\\1J\\1",[global])),
+ <<"aaaaa">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)(*SKIP)b|a+c","\\1",[])),
+ <<"aaaaa">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)(*SKIP)b|a+c","\\1",[global])),
+ <<"aaaaaU">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)(*SKIP)b|a+c","U",[])),
+ <<"aaaaaU">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)(*SKIP)b|a+c","U",[global])),
+ <<"aaaaaac">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)b|a+c","kAM",[])),
+ <<"aaaaaac">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)b|a+c","kAM",[global])),
+ <<"VvCwaaaaaacLKWgIbVKGB">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)b|a+c","VvCw&LKWgIbVKGB",[])),
+ <<"VvCwaaaaaacLKWgIbVKGB">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*THEN)b|a+c","VvCw&LKWgIbVKGB",[global])),
+ <<"abvTAmJ">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)(*THEN)b|a+c","abvTA\\1mJ",[])),
+ <<"abvTAmJ">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*SKIP)(*THEN)b|a+c","abvTA\\1mJ",[global])),
+ <<"phVmoxx">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)(*THEN)b|a+c","phVm\\1oxx",[])),
+ <<"phVmoxx">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*PRUNE)(*THEN)b|a+c","phVm\\1oxx",[global])),
+ <<"GdHapg">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)(*THEN)b|a+c","Gd\\1Hapg",[])),
+ <<"GdHapg">> = iolist_to_binary(re:replace("aaaaaac","aaaaa(*COMMIT)(*THEN)b|a+c","Gd\\1Hapg",[global])),
+ ok.
+run52() ->
+ <<"aaaaa">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+","\\1",[])),
+ <<"aaaaa">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+","\\1",[global])),
+ <<"aaaaaQvaOuCaBoHYMapab">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+","\\1Qv&\\1OuC&BoHYM&pab",[])),
+ <<"aaaaaQvaOuCaBoHYMapab">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+","\\1Qv&\\1OuC&BoHYM&pab",[global])),
+ <<"aauaaaa">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+","u&",[])),
+ <<"aauaaaa">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+","u&",[global])),
+ <<"aaaaaTLn">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+","TLn\\1",[])),
+ <<"aaaaaTLn">> = iolist_to_binary(re:replace("aaaaaa","aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+","TLn\\1",[global])),
+ <<"aaaacEITBRXepyL">> = iolist_to_binary(re:replace("aaaac","a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c","&EITBRXepyL\\1",[])),
+ <<"aaaacEITBRXepyL">> = iolist_to_binary(re:replace("aaaac","a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c","&EITBRXepyL\\1",[global])),
+ <<"aaaMSacMdGgSm">> = iolist_to_binary(re:replace("aaaac","a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c","\\1MS&MdGg\\1Sm",[])),
+ <<"aaaMSacMdGgSm">> = iolist_to_binary(re:replace("aaaac","a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c","\\1MS&MdGg\\1Sm",[global])),
+ <<"aaKCBrjuDaackaactRB">> = iolist_to_binary(re:replace("aaaac","aaa(*PRUNE:A)a(*SKIP:A)b|a+c","KCBrjuD&k&t\\1RB",[])),
+ <<"aaKCBrjuDaackaactRB">> = iolist_to_binary(re:replace("aaaac","aaa(*PRUNE:A)a(*SKIP:A)b|a+c","KCBrjuD&k&t\\1RB",[global])),
+ <<"aaaKWuEddO">> = iolist_to_binary(re:replace("aaaac","aaa(*MARK:A)a(*SKIP:A)b|a+c","KWuEddO",[])),
+ <<"aaaKWuEddO">> = iolist_to_binary(re:replace("aaaac","aaa(*MARK:A)a(*SKIP:A)b|a+c","KWuEddO",[global])),
+ <<"QSDGhNmLAsnYtCIuka">> = iolist_to_binary(re:replace("ba",".?(a|b(*THEN)c)","QSDGhNmLAsnYtCIuka",[])),
+ <<"QSDGhNmLAsnYtCIuka">> = iolist_to_binary(re:replace("ba",".?(a|b(*THEN)c)","QSDGhNmLAsnYtCIuka",[global])),
+ <<"tARW">> = iolist_to_binary(re:replace("abc","(a(*COMMIT)b)c|abd","tARW",[])),
+ <<"tARW">> = iolist_to_binary(re:replace("abc","(a(*COMMIT)b)c|abd","tARW",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(a(*COMMIT)b)c|abd","THra\\1QsHhH&NqVcHjK\\1",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(a(*COMMIT)b)c|abd","THra\\1QsHhH&NqVcHjK\\1",[global])),
+ <<"eJabcbgg">> = iolist_to_binary(re:replace("abc","(?=a(*COMMIT)b)abc|abd","\\1eJ&\\1bgg",[])),
+ <<"eJabcbgg">> = iolist_to_binary(re:replace("abc","(?=a(*COMMIT)b)abc|abd","\\1eJ&\\1bgg",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(?=a(*COMMIT)b)abc|abd","&",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(?=a(*COMMIT)b)abc|abd","&",[global])),
+ <<"SJjtxKabcE">> = iolist_to_binary(re:replace("abc","(?>a(*COMMIT)b)c|abd","SJjt\\1xK&E",[])),
+ <<"SJjtxKabcE">> = iolist_to_binary(re:replace("abc","(?>a(*COMMIT)b)c|abd","SJjt\\1xK&E",[global])),
+ <<"nCO">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)b)c|abd","\\1nCO",[])),
+ <<"nCO">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)b)c|abd","\\1nCO",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a(?=b(*COMMIT)c)[^d]|abd","sicBOgC",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","a(?=b(*COMMIT)c)[^d]|abd","sicBOgC",[global])),
+ <<"OIc">> = iolist_to_binary(re:replace("abc","a(?=b(*COMMIT)c)[^d]|abd","OI",[])),
+ <<"OIc">> = iolist_to_binary(re:replace("abc","a(?=b(*COMMIT)c)[^d]|abd","OI",[global])),
+ <<"cBnM">> = iolist_to_binary(re:replace("abd","a(?=bc).|abd","cBnM",[])),
+ <<"cBnM">> = iolist_to_binary(re:replace("abd","a(?=bc).|abd","cBnM",[global])),
+ <<"uwVabvc">> = iolist_to_binary(re:replace("abc","a(?=bc).|abd","\\1uwV&v",[])),
+ <<"uwVabvc">> = iolist_to_binary(re:replace("abc","a(?=bc).|abd","\\1uwV&v",[global])),
+ <<"abceabd">> = iolist_to_binary(re:replace("abceabd","a(?>b(*COMMIT)c)d|abd","ON\\1oJApWbhJ&h\\1SDD",[])),
+ <<"abceabd">> = iolist_to_binary(re:replace("abceabd","a(?>b(*COMMIT)c)d|abd","ON\\1oJApWbhJ&h\\1SDD",[global])),
+ <<"abceabdFDcsKjWRPJwG">> = iolist_to_binary(re:replace("abceabd","a(?>bc)d|abd","&FDcsK\\1jWRPJwG",[])),
+ <<"abceabdFDcsKjWRPJwG">> = iolist_to_binary(re:replace("abceabd","a(?>bc)d|abd","&FDcsK\\1jWRPJwG",[global])),
+ <<"fTabdENuYeMabdK">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)b)c|abd","fT&ENuY\\1eM&K",[])),
+ <<"fTabdENuYeMabdK">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)b)c|abd","fT&ENuY\\1eM&K",[global])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)c)d|abd","vbE",[])),
+ <<"abd">> = iolist_to_binary(re:replace("abd","(?>a(*COMMIT)c)d|abd","vbE",[global])),
+ <<"iKqJ">> = iolist_to_binary(re:replace("ac","((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))","iKq\\1J",[])),
+ <<"iKqJ">> = iolist_to_binary(re:replace("ac","((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))","iKq\\1J",[global])),
+ ok.
+run53() ->
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","YQRU&",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^(a)?(?(1)a|b)+$","YQRU&",[global])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a)?(?(1)a|b)+$","SLSciT&&F",[])),
+ <<"a">> = iolist_to_binary(re:replace("a","^(a)?(?(1)a|b)+$","SLSciT&&F",[global])),
+ <<"aIbCe">> = iolist_to_binary(re:replace("ab","(?=a\\Kb)ab","IbCe",[])),
+ <<"aIbCe">> = iolist_to_binary(re:replace("ab","(?=a\\Kb)ab","IbCe",[global])),
+ <<"KWEhxbu">> = iolist_to_binary(re:replace("ac","(?!a\\Kb)ac","KWEhxbu",[])),
+ <<"KWEhxbu">> = iolist_to_binary(re:replace("ac","(?!a\\Kb)ac","KWEhxbu",[global])),
+ <<"abObpVTjlSnifUCddjn">> = iolist_to_binary(re:replace("abcd","^abc(?<=b\\Kc)d","ObpV\\1TjlSnifUCddjn",[])),
+ <<"abObpVTjlSnifUCddjn">> = iolist_to_binary(re:replace("abcd","^abc(?<=b\\Kc)d","ObpV\\1TjlSnifUCddjn",[global])),
+ <<"lljlodkrbhYabcdXWQwLIT">> = iolist_to_binary(re:replace("abcd","^abc(?<!b\\Kq)d","llj\\1lodkrbhY&XWQwLIT",[])),
+ <<"lljlodkrbhYabcdXWQwLIT">> = iolist_to_binary(re:replace("abcd","^abc(?<!b\\Kq)d","llj\\1lodkrbhY&XWQwLIT",[global])),
+ <<"abcdabcdabcdHLqtQeabcdEabcdJHiabcdP">> = iolist_to_binary(re:replace("abcd","^((abc|abcx)(*THEN)y|abcd)","&&\\1HLqtQe&E\\1JHi\\1P",[])),
+ <<"abcdabcdabcdHLqtQeabcdEabcdJHiabcdP">> = iolist_to_binary(re:replace("abcd","^((abc|abcx)(*THEN)y|abcd)","&&\\1HLqtQe&E\\1JHi\\1P",[global])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((abc|abcx)(*THEN)y|abcd)","NtVKEpoSj\\1\\1o\\1ESK",[])),
+ <<"*** Failers">> = iolist_to_binary(re:replace("*** Failers","^((abc|abcx)(*THEN)y|abcd)","NtVKEpoSj\\1\\1o\\1ESK",[global])),
+ <<"abcxy">> = iolist_to_binary(re:replace("abcxy","^((abc|abcx)(*THEN)y|abcd)","Jj\\1XL&TAaD",[])),
+ <<"abcxy">> = iolist_to_binary(re:replace("abcxy","^((abc|abcx)(*THEN)y|abcd)","Jj\\1XL&TAaD",[global])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","^((yes|no)(*THEN)(*F))?","fA&L\\1bxmA\\1bu\\1w\\1Lh",[])),
+ <<"yes">> = iolist_to_binary(re:replace("yes","^((yes|no)(*THEN)(*F))?","fA&L\\1bxmA\\1bu\\1w\\1Lh",[global])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","(?=a(*COMMIT)b|ac)ac|ac","uuCjDlLQYP",[])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","(?=a(*COMMIT)b|ac)ac|ac","uuCjDlLQYP",[global])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","(?=a(*COMMIT)b|(ac)) ac | (a)c","\\1W&y&PeDCK\\1cDLtO",[extended])),
+ <<"ac">> = iolist_to_binary(re:replace("ac","(?=a(*COMMIT)b|(ac)) ac | (a)c","\\1W&y&PeDCK\\1cDLtO",[extended,
+ global])),
+ <<"bnWqWn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*THEN)a)bn|bnn)","&WqW",[])),
+ <<"bnWqWn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*THEN)a)bn|bnn)","&WqW",[global])),
+ <<"PGnTXLBnIbnbnbnePKbnn">> = iolist_to_binary(re:replace("bnn","(?!b(*SKIP)a)bn|bnn","PGnTXLBnI&&&e\\1PK&",[])),
+ <<"PGnTXLBnIbnbnbnePKbnn">> = iolist_to_binary(re:replace("bnn","(?!b(*SKIP)a)bn|bnn","PGnTXLBnI&&&e\\1PK&",[global])),
+ <<"iMn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*SKIP)a)bn|bnn)","\\1iM",[])),
+ <<"iMn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*SKIP)a)bn|bnn)","\\1iM",[global])),
+ <<"gcbnaxAn">> = iolist_to_binary(re:replace("bnn","(?!b(*PRUNE)a)bn|bnn","\\1gc&ax\\1\\1A",[])),
+ <<"gcbnaxAn">> = iolist_to_binary(re:replace("bnn","(?!b(*PRUNE)a)bn|bnn","\\1gc&ax\\1\\1A",[global])),
+ <<"dAtbnrKybneTLNeBcn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*PRUNE)a)bn|bnn)","dAt&rKy&eTLNeBc",[])),
+ <<"dAtbnrKybneTLNeBcn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*PRUNE)a)bn|bnn)","dAt&rKy&eTLNeBc",[global])),
+ <<"vXn">> = iolist_to_binary(re:replace("bnn","(?!b(*COMMIT)a)bn|bnn","vX",[])),
+ <<"vXn">> = iolist_to_binary(re:replace("bnn","(?!b(*COMMIT)a)bn|bnn","vX",[global])),
+ <<"EUadjhULxavkwOtGbnqrPn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*COMMIT)a)bn|bnn)","EUadjhULxavkwOtG&qrP",[])),
+ <<"EUadjhULxavkwOtGbnqrPn">> = iolist_to_binary(re:replace("bnn","(?(?!b(*COMMIT)a)bn|bnn)","EUadjhULxavkwOtG&qrP",[global])),
+ <<"bnn">> = iolist_to_binary(re:replace("bnn","(?=b(*SKIP)a)bn|bnn","Fw",[])),
+ <<"bnn">> = iolist_to_binary(re:replace("bnn","(?=b(*SKIP)a)bn|bnn","Fw",[global])),
+ <<"JgfYWGl">> = iolist_to_binary(re:replace("bnn","(?=b(*THEN)a)bn|bnn","Jgf\\1Y\\1W\\1Gl\\1",[])),
+ <<"JgfYWGl">> = iolist_to_binary(re:replace("bnn","(?=b(*THEN)a)bn|bnn","Jgf\\1Y\\1W\\1Gl\\1",[global])),
+ <<"SacJCiWoykVpvXacd">> = iolist_to_binary(re:replace("acd","(?!a(*SKIP)b)..","S&JCiWoykVpvX\\1&",[])),
+ <<"SacJCiWoykVpvXacd">> = iolist_to_binary(re:replace("acd","(?!a(*SKIP)b)..","S&JCiWoykVpvX\\1&",[global])),
+ ok.
+run54() ->
+ <<"CxbMac">> = iolist_to_binary(re:replace("ac","^(?(?!a(*SKIP)b))","&Cxb&M",[])),
+ <<"CxbMac">> = iolist_to_binary(re:replace("ac","^(?(?!a(*SKIP)b))","&Cxb&M",[global])),
+ <<"OceGNacoaFRboacPKd">> = iolist_to_binary(re:replace("acd","^(?!a(*PRUNE)b)..","OceGN&o\\1aF\\1Rb\\1o&PK",[])),
+ <<"OceGNacoaFRboacPKd">> = iolist_to_binary(re:replace("acd","^(?!a(*PRUNE)b)..","OceGN&o\\1aF\\1Rb\\1o&PK",[global])),
+ <<"ysd">> = iolist_to_binary(re:replace("acd","(?!a(*PRUNE)b)..","ys",[])),
+ <<"ysd">> = iolist_to_binary(re:replace("acd","(?!a(*PRUNE)b)..","ys",[global])),
+ <<"nba">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc)","n\\1\\1&",[])),
+ <<"nba">> = iolist_to_binary(re:replace("ba","\\A.*?(?:a|bc)","n\\1\\1&",[global])),
+ <<"CDEeCDYuCDCDb">> = iolist_to_binary(re:replace("CD","^(A(*THEN)B|C(*THEN)D)","&Ee\\1Yu\\1\\1b",[])),
+ <<"CDEeCDYuCDCDb">> = iolist_to_binary(re:replace("CD","^(A(*THEN)B|C(*THEN)D)","&Ee\\1Yu\\1\\1b",[global])),
+ <<"AYtnukv">> = iolist_to_binary(re:replace("1234","^\\d*\\w{4}","AYtn\\1ukv",[])),
+ <<"AYtnukv">> = iolist_to_binary(re:replace("1234","^\\d*\\w{4}","AYtn\\1ukv",[global])),
+ <<"123">> = iolist_to_binary(re:replace("123","^\\d*\\w{4}","oGBqK\\1EWY&VbHw\\1ue&",[])),
+ <<"123">> = iolist_to_binary(re:replace("123","^\\d*\\w{4}","oGBqK\\1EWY&VbHw\\1ue&",[global])),
+ <<"LhHvlYGR">> = iolist_to_binary(re:replace("aaaa","^[^b]*\\w{4}","\\1LhHvlYGR",[])),
+ <<"LhHvlYGR">> = iolist_to_binary(re:replace("aaaa","^[^b]*\\w{4}","\\1LhHvlYGR",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^[^b]*\\w{4}","S\\1wy&o\\1v&ST",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^[^b]*\\w{4}","S\\1wy&o\\1v&ST",[global])),
+ <<"aaaagQaaaalwFSxFUL">> = iolist_to_binary(re:replace("aaaa","^[^b]*\\w{4}","\\1\\1\\1&gQ&lwFSxFU\\1L",[caseless])),
+ <<"aaaagQaaaalwFSxFUL">> = iolist_to_binary(re:replace("aaaa","^[^b]*\\w{4}","\\1\\1\\1&gQ&lwFSxFU\\1L",[caseless,
+ global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^[^b]*\\w{4}","SfymhPOH",[caseless])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^[^b]*\\w{4}","SfymhPOH",[caseless,
+ global])),
+ <<"HTMLYQhAQNJHaaaaJKAva">> = iolist_to_binary(re:replace("aaaa","^a*\\w{4}","HTM\\1L\\1YQhAQNJH&JKAva",[])),
+ <<"HTMLYQhAQNJHaaaaJKAva">> = iolist_to_binary(re:replace("aaaa","^a*\\w{4}","HTM\\1L\\1YQhAQNJH&JKAva",[global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^a*\\w{4}","bfScQRcKYl&\\1&\\1&Aq&C",[])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^a*\\w{4}","bfScQRcKYl&\\1&\\1&Aq&C",[global])),
+ <<"aaaadgKVePEaaaaqdlcK">> = iolist_to_binary(re:replace("aaaa","^a*\\w{4}","&dgKVePE&qdl\\1cK",[caseless])),
+ <<"aaaadgKVePEaaaaqdlcK">> = iolist_to_binary(re:replace("aaaa","^a*\\w{4}","&dgKVePE&qdl\\1cK",[caseless,
+ global])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^a*\\w{4}","ncXKavCFttF",[caseless])),
+ <<"aaa">> = iolist_to_binary(re:replace("aaa","^a*\\w{4}","ncXKavCFttF",[caseless,
+ global])),
+ ok.
diff --git a/lib/stdlib/test/re_testoutput1_split_test.erl b/lib/stdlib/test/re_testoutput1_split_test.erl
index 4fc85b95c0..af3c3caa48 100644
--- a/lib/stdlib/test/re_testoutput1_split_test.erl
+++ b/lib/stdlib/test/re_testoutput1_split_test.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,1369 +19,1423 @@
-module(re_testoutput1_split_test).
-compile(export_all).
-compile(no_native).
--include("test_server.hrl").
%% This file is generated by running run_pcre_tests:gen_split_test("re_SUITE_data/testoutput1")
join([]) -> [];
join([A]) -> [A];
join([H|T]) -> [H,<<":">>|join(T)].
run() ->
-?line <<"">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[]))),
-?line <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[trim]))),
-?line <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[{parts,
- 2}]))),
-?line <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[trim]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[{parts,
- 2}]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[]))),
-?line <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[trim]))),
-?line <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[{parts,
- 2}]))),
-?line <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless,
- trim]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless,
- {parts,
- 2}]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless,
- trim]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless,
- {parts,
- 2}]))),
-?line <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd
+ run0(),
+ run1(),
+ run2(),
+ run3(),
+ run4(),
+ run5(),
+ run6(),
+ run7(),
+ run8(),
+ run9(),
+ run10(),
+ run11(),
+ run12(),
+ run13(),
+ run14(),
+ run15(),
+ run16(),
+ run17(),
+ run18(),
+ run19(),
+ run20(),
+ run21(),
+ run22(),
+ run23(),
+ run24(),
+ run25(),
+ run26(),
+ run27(),
+ run28(),
+ run29(),
+ run30(),
+ run31(),
+ run32(),
+ run33(),
+ run34(),
+ run35(),
+ run36(),
+ run37(),
+ run38(),
+ run39(),
+ run40(),
+ run41(),
+ run42(),
+ run43(),
+ run44(),
+ run45(),
+ run46(),
+ run47(),
+ run48(),
+ run49(),
+ run50(),
+ run51(),
+ run52(),
+ run53(),
+ run54(),
+ ok.
+run0() ->
+ <<"">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("the quick brown fox","the quick brown fox",[]))),
+ <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[trim]))),
+ <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[{parts,
+ 2}]))),
+ <<"The quick brown FOX">> = iolist_to_binary(join(re:split("The quick brown FOX","the quick brown fox",[]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[trim]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[{parts,
+ 2}]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","the quick brown fox",[]))),
+ <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[trim]))),
+ <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[{parts,
+ 2}]))),
+ <<"What do you know about THE QUICK BROWN FOX?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","the quick brown fox",[]))),
+ <<"">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("the quick brown fox","The quick brown fox",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("The quick brown FOX","The quick brown fox",[caseless]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless,
+ trim]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless,
+ {parts,
+ 2}]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about the quick brown fox?","The quick brown fox",[caseless]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless,
+ trim]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless,
+ {parts,
+ 2}]))),
+ <<"What do you know about :?">> = iolist_to_binary(join(re:split("What do you know about THE QUICK BROWN FOX?","The quick brown fox",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd
9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd
+ <<":">> = iolist_to_binary(join(re:split("abcd
9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd
+ <<":">> = iolist_to_binary(join(re:split("abcd
9;$\\?caxyz","abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcxyzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aabcxyzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<">>>">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<">>>:">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypABBzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<">>>">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<">>>:">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<">>>:">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<">">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<">:">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<">>>:">> = iolist_to_binary(join(re:split(">>>aaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<">">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<">:">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<">:">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<">>>>">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<">>>>:">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<">:">> = iolist_to_binary(join(re:split(">aaaabxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<">>>>">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<">>>>:">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<">>>>:">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
- 2}]))),
-?line <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
-?line <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ <<">>>>:">> = iolist_to_binary(join(re:split(">>>>abcxyzpqrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"abxyzpqrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"abxyzpqrrrrabbxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrrabbxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"abxyzpqrrrabxyyyypqAzz">> = iolist_to_binary(join(re:split("abxyzpqrrrabxyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
2}]))),
-?line <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[]))),
-?line <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[trim]))),
-?line <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[{parts,
- 2}]))),
-?line <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[]))),
-?line <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[trim]))),
-?line <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[{parts,
- 2}]))),
-?line <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[]))),
-?line <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[trim]))),
-?line <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[{parts,
+ <<"aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"aaaabcxyzzzzpqrrrabbbxyyypqAzz">> = iolist_to_binary(join(re:split("aaaabcxyzzzzpqrrrabbbxyyypqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[trim]))),
+ <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[{parts,
+ 2}]))),
+ <<"aaabcxyzpqrrrabbxyyyypqqqqqqqAzz">> = iolist_to_binary(join(re:split("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz","a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abczz","^(abc){1,2}zz",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[{parts,
2}]))),
-?line <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabczz","^(abc){1,2}zz",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(abc){1,2}zz",[]))),
+ <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[trim]))),
+ <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[{parts,
+ 2}]))),
+ <<"zz">> = iolist_to_binary(join(re:split("zz","^(abc){1,2}zz",[]))),
+ <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[trim]))),
+ <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[{parts,
+ 2}]))),
+ <<"abcabcabczz">> = iolist_to_binary(join(re:split("abcabcabczz","^(abc){1,2}zz",[]))),
+ <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[trim]))),
+ <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[{parts,
+ 2}]))),
+ <<">>abczz">> = iolist_to_binary(join(re:split(">>abczz","^(abc){1,2}zz",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+?|a){1,2}?c",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[{parts,
+ <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[]))),
+ <<":bb">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[trim]))),
+ <<":bb:">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+?|a){1,2}?c",[]))),
-?line <<":bb">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[trim]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[{parts,
+ <<":bb:">> = iolist_to_binary(join(re:split("bbbc","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[]))),
+ <<":bbbbbbbbbbb">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[trim]))),
+ <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[]))),
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[trim]))),
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+?|a){1,2}?c",[]))),
-?line <<":bbbbbbbbbbb">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[trim]))),
-?line <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[{parts,
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[]))),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[trim]))),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+?|a){1,2}?c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+?|a){1,2}?c",[]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[trim]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+?|a){1,2}?c",[]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[{parts,
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+?|a){1,2}?c",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[]))),
+ <<":bb">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[trim]))),
+ <<":bb:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[{parts,
2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bc","^(b+|a){1,2}c",[]))),
-?line <<":bb">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[trim]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[{parts,
+ <<":bb:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[]))),
+ <<":bbb">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[trim]))),
+ <<":bbb:">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[{parts,
2}]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}c",[]))),
-?line <<":bbb">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[trim]))),
-?line <<":bbb:">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[{parts,
- 2}]))),
-?line <<":bbb:">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[{parts,
+ <<":bbb:">> = iolist_to_binary(join(re:split("bbbc","^(b+|a){1,2}c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[]))),
+ <<":bbbbbbbbbbb">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[trim]))),
+ <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[]))),
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[trim]))),
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aac","^(b+|a){1,2}c",[]))),
-?line <<":bbbbbbbbbbb">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[trim]))),
-?line <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[{parts,
+ <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[]))),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[trim]))),
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[{parts,
2}]))),
-?line <<":bbbbbbbbbbb:">> = iolist_to_binary(join(re:split("abbbbbbbbbbbc","^(b+|a){1,2}c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbbbbbbbac","^(b+|a){1,2}c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b+|a){1,2}c",[]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[trim]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[{parts,
+ <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[{parts,
2}]))),
-?line <<"aaac">> = iolist_to_binary(join(re:split("aaac","^(b+|a){1,2}c",[]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[trim]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[{parts,
- 2}]))),
-?line <<"abbbbbbbbbbbac">> = iolist_to_binary(join(re:split("abbbbbbbbbbbac","^(b+|a){1,2}c",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[{parts,
+ <<":b:">> = iolist_to_binary(join(re:split("bbc","^(b+|a){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[{parts,
+ 2}]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("babc","^(b*|ba){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[{parts,
+ <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(b*|ba){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[{parts,
+ <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[]))),
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[trim]))),
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(b*|ba){1,2}?bc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(b*|ba){1,2}?bc",[]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[trim]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[{parts,
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[]))),
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[trim]))),
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[{parts,
2}]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(b*|ba){1,2}?bc",[]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[trim]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[{parts,
- 2}]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[{parts,
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(b*|ba){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[{parts,
+ 2}]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("babc","^(ba|b*){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[{parts,
+ <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[]))),
+ <<":ba">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[trim]))),
+ <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bbabc","^(ba|b*){1,2}?bc",[]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[trim]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[{parts,
+ <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[]))),
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[trim]))),
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[{parts,
2}]))),
-?line <<":ba:">> = iolist_to_binary(join(re:split("bababc","^(ba|b*){1,2}?bc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ba|b*){1,2}?bc",[]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[trim]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[{parts,
+ <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[]))),
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[trim]))),
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[{parts,
2}]))),
-?line <<"bababbc">> = iolist_to_binary(join(re:split("bababbc","^(ba|b*){1,2}?bc",[]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[trim]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[{parts,
- 2}]))),
-?line <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[{parts,
+ <<"babababc">> = iolist_to_binary(join(re:split("babababc","^(ba|b*){1,2}?bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split(";z","^\\ca\\cA\\c[\\c{\\c:",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[trim]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[]))),
+ <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[trim]))),
+ <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[]))),
+ <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[trim]))),
+ <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[{parts,
+ 2}]))),
+ <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[]))),
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[trim]))),
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[{parts,
+ 2}]))),
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[trim]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[{parts,
+ 2}]))),
+ <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[{parts,
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("bthing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[{parts,
+ <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[{parts,
+ 2}]))),
+ <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[{parts,
+ 2}]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[]))),
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[trim]))),
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[{parts,
+ <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[]))),
+ <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[trim]))),
+ <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[{parts,
+ <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[]))),
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[trim]))),
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[{parts,
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[]))),
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[trim]))),
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[ab\\]cde]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[ab\\]cde]",[]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[trim]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[{parts,
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[]))),
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[trim]))),
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[ab\\]cde]",[]))),
-?line <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[trim]))),
-?line <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[{parts,
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[]))),
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[trim]))),
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[{parts,
2}]))),
-?line <<"[thing">> = iolist_to_binary(join(re:split("[thing","^[ab\\]cde]",[]))),
-?line <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[trim]))),
-?line <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[{parts,
- 2}]))),
-?line <<"\\thing">> = iolist_to_binary(join(re:split("\\thing","^[ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[{parts,
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("]thing","^[]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[{parts,
+ <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[]))),
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[trim]))),
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("cthing","^[]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[{parts,
+ <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[{parts,
+ 2}]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[]))),
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[trim]))),
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("dthing","^[]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[{parts,
+ <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[]))),
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[trim]))),
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[{parts,
2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("ething","^[]cde]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[]cde]",[]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[trim]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[{parts,
+ <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[]))),
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[trim]))),
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[{parts,
2}]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[]cde]",[]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[trim]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[{parts,
+ <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[]))),
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[trim]))),
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[{parts,
2}]))),
-?line <<"fthing">> = iolist_to_binary(join(re:split("fthing","^[]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("[thing","^[^ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("\\thing","^[^ab\\]cde]",[]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^ab\\]cde]",[]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[trim]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"athing">> = iolist_to_binary(join(re:split("athing","^[^ab\\]cde]",[]))),
-?line <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[trim]))),
-?line <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"bthing">> = iolist_to_binary(join(re:split("bthing","^[^ab\\]cde]",[]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[trim]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^ab\\]cde]",[]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[trim]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^ab\\]cde]",[]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[trim]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^ab\\]cde]",[]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[trim]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[{parts,
- 2}]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^ab\\]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[{parts,
- 2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("athing","^[^]cde]",[]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[trim]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[{parts,
- 2}]))),
-?line <<":thing">> = iolist_to_binary(join(re:split("fthing","^[^]cde]",[]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[{parts,
- 2}]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[^]cde]",[]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[trim]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[{parts,
- 2}]))),
-?line <<"]thing">> = iolist_to_binary(join(re:split("]thing","^[^]cde]",[]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[trim]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[{parts,
- 2}]))),
-?line <<"cthing">> = iolist_to_binary(join(re:split("cthing","^[^]cde]",[]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[trim]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[{parts,
- 2}]))),
-?line <<"dthing">> = iolist_to_binary(join(re:split("dthing","^[^]cde]",[]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[trim]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[{parts,
- 2}]))),
-?line <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^\\",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("","^\\",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("","^\\",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ÿ","^ÿ",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ÿ","^ÿ",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ÿ","^ÿ",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[{parts,
+ <<"ething">> = iolist_to_binary(join(re:split("ething","^[^]cde]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("0","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("2","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("3","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("4","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("5","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("6","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("7","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("8","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("9","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("10","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("enter","^.*nter",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("enter","^.*nter",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("enter","^.*nter",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("inter","^.*nter",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("inter","^.*nter",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("inter","^.*nter",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("uponter","^.*nter",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("uponter","^.*nter",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("uponter","^.*nter",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("100","^[0-9]+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[]))),
-?line <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[trim]))),
-?line <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[0-9]+$",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("enter","^.*nter",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("enter","^.*nter",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("enter","^.*nter",[]))),
+ <<"">> = iolist_to_binary(join(re:split("inter","^.*nter",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("inter","^.*nter",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("inter","^.*nter",[]))),
+ <<"">> = iolist_to_binary(join(re:split("uponter","^.*nter",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("uponter","^.*nter",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("uponter","^.*nter",[]))),
+ ok.
+run1() ->
+ <<"">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[{parts,
2}]))),
-?line <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("xxx0","^xxx[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("xxx1234","^xxx[0-9]+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^xxx[0-9]+$",[]))),
+ <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[trim]))),
+ <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[{parts,
+ 2}]))),
+ <<"xxx">> = iolist_to_binary(join(re:split("xxx","^xxx[0-9]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("x123","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("xx123","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[{parts,
+ <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("x1234","^.+[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("x123","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("xx123","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[]))),
-?line <<":abc:pqr">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<":abc:pqr:">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
- 2}]))),
-?line <<":abc:pqr:">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
- 2}]))),
-?line <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
- 2}]))),
-?line <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("x1234","^.+?[0-9][0-9][0-9]$",[]))),
+ <<":abc:pqr">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<":abc:pqr:">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ 2}]))),
+ <<":abc:pqr:">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ 2}]))),
+ <<"!pqr=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("!pqr=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ 2}]))),
+ <<"abc!=apquxz.ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!=apquxz.ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
+ 2}]))),
+ <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
+ <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
2}]))),
-?line <<"abc!pqr=apquxz:ixr.zzz.ac.uk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz:ixr.zzz.ac.uk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[trim]))),
-?line <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[{parts,
- 2}]))),
-?line <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
-?line <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[trim]))),
-?line <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[{parts,
- 2}]))),
-?line <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[]))),
-?line <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[trim]))),
-?line <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[{parts,
- 2}]))),
-?line <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[]))),
-?line <<":0abc">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<":0abc:">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<":0abc:">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless]))),
-?line <<":fed">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless,
+ <<"abc!pqr=apquxz.ixr.zzz.ac.ukk">> = iolist_to_binary(join(re:split("abc!pqr=apquxz.ixr.zzz.ac.ukk","^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$",[]))),
+ <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[trim]))),
+ <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[{parts,
+ 2}]))),
+ <<"Well, we need a colon: somewhere">> = iolist_to_binary(join(re:split("Well, we need a colon: somewhere",":",[]))),
+ <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[trim]))),
+ <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[{parts,
+ 2}]))),
+ <<"*** Fail if we don't">> = iolist_to_binary(join(re:split("*** Fail if we don't",":",[]))),
+ <<":0abc">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless,
trim]))),
-?line <<":fed:">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless,
+ <<":0abc:">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless,
{parts,
2}]))),
-?line <<":fed:">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless]))),
-?line <<":E">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<":E:">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<":E:">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless]))),
-?line <<":::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless,
+ <<":0abc:">> = iolist_to_binary(join(re:split("0abc","([\\da-f:]+)$",[caseless]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless,
trim]))),
-?line <<"::::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless,
+ <<":abc:">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless,
{parts,
2}]))),
-?line <<"::::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless]))),
-?line <<":5f03:12C0::932e">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<":5f03:12C0::932e:">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<":5f03:12C0::932e:">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless]))),
-?line <<"fed :def">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"fed :def:">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"fed :def:">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless]))),
-?line <<"Any old stu:ff">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"Any old stu:ff:">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"Any old stu:ff:">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless]))),
-?line <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless]))),
-?line <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless]))),
-?line <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless]))),
-?line <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless,
- trim]))),
-?line <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless,
- {parts,
- 2}]))),
-?line <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless]))),
-?line <<":1:2:3">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<":1:2:3:">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
- 2}]))),
-?line <<":1:2:3:">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<":12:123:0">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<":12:123:0:">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
- 2}]))),
-?line <<":12:123:0:">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
- 2}]))),
-?line <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abc","([\\da-f:]+)$",[caseless]))),
+ <<":fed">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<":fed:">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<":fed:">> = iolist_to_binary(join(re:split("fed","([\\da-f:]+)$",[caseless]))),
+ <<":E">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<":E:">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<":E:">> = iolist_to_binary(join(re:split("E","([\\da-f:]+)$",[caseless]))),
+ <<":::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"::::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"::::">> = iolist_to_binary(join(re:split("::","([\\da-f:]+)$",[caseless]))),
+ <<":5f03:12C0::932e">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<":5f03:12C0::932e:">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<":5f03:12C0::932e:">> = iolist_to_binary(join(re:split("5f03:12C0::932e","([\\da-f:]+)$",[caseless]))),
+ <<"fed :def">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"fed :def:">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"fed :def:">> = iolist_to_binary(join(re:split("fed def","([\\da-f:]+)$",[caseless]))),
+ <<"Any old stu:ff">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"Any old stu:ff:">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"Any old stu:ff:">> = iolist_to_binary(join(re:split("Any old stuff","([\\da-f:]+)$",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\da-f:]+)$",[caseless]))),
+ <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"0zzz">> = iolist_to_binary(join(re:split("0zzz","([\\da-f:]+)$",[caseless]))),
+ <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"gzzz">> = iolist_to_binary(join(re:split("gzzz","([\\da-f:]+)$",[caseless]))),
+ <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"fed ">> = iolist_to_binary(join(re:split("fed ","([\\da-f:]+)$",[caseless]))),
+ <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless,
+ trim]))),
+ <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless,
+ {parts,
+ 2}]))),
+ <<"Any old rubbish">> = iolist_to_binary(join(re:split("Any old rubbish","([\\da-f:]+)$",[caseless]))),
+ <<":1:2:3">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<":1:2:3:">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
2}]))),
-?line <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
-?line <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ <<":1:2:3:">> = iolist_to_binary(join(re:split(".1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<":12:123:0">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<":12:123:0:">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ 2}]))),
+ <<":12:123:0:">> = iolist_to_binary(join(re:split("A.12.123.0","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
2}]))),
-?line <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
-?line <<":1:non-sp1:non-sp2">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
-?line <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
- 2}]))),
-?line <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
-?line <<":1:non-sp1:non-sp2">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
-?line <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
- 2}]))),
-?line <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
-?line <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
-?line <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
- 2}]))),
-?line <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<":.pq-r">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<":.pq-r:">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<":.pq-r:">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<":.uk">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<":.uk:">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ <<".1.2.3333">> = iolist_to_binary(join(re:split(".1.2.3333","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ 2}]))),
+ <<"1.2.3">> = iolist_to_binary(join(re:split("1.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[trim]))),
+ <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[{parts,
+ 2}]))),
+ <<"1234.2.3">> = iolist_to_binary(join(re:split("1234.2.3","^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$",[]))),
+ <<":1:non-sp1:non-sp2">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
+ <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
2}]))),
-?line <<":.uk:">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<":.y-">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<":.y-:">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<":.y-:">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
-?line <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
+ <<":1:non-sp1:non-sp2">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
+ <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
+ 2}]))),
+ <<":1:non-sp1:non-sp2:">> = iolist_to_binary(join(re:split("1 IN SOA non-sp1 non-sp2 (","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
+ <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[trim]))),
+ <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[{parts,
+ 2}]))),
+ <<"1IN SOA non-sp1 non-sp2(">> = iolist_to_binary(join(re:split("1IN SOA non-sp1 non-sp2(","^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("Z.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("2.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<":.pq-r">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<":.pq-r:">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
2}]))),
-?line <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"::::">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<"::::">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<":0-a">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<":0-a:::">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<":0-a:::">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<":3-b:.c">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<":3-b:.c::">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ <<":.pq-r:">> = iolist_to_binary(join(re:split("ab-c.pq-r.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<":.uk">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<":.uk:">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<":.uk:">> = iolist_to_binary(join(re:split("sxk.zzz.ac.uk.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<":.y-">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<":.y-:">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<":.y-:">> = iolist_to_binary(join(re:split("x-.y-.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[trim]))),
+ <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[{parts,
+ 2}]))),
+ <<"-abc.peq.">> = iolist_to_binary(join(re:split("-abc.peq.","^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"::::">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<"::::">> = iolist_to_binary(join(re:split("*.a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<":0-a">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<":0-a:::">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<":0-a:::">> = iolist_to_binary(join(re:split("*.b0-a","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<":3-b:.c">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<":3-b:.c::">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<":3-b:.c::">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<":-a:.b-c:-c">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<":-a:.b-c:-c:">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
2}]))),
-?line <<":3-b:.c::">> = iolist_to_binary(join(re:split("*.c3-b.c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<":-a:.b-c:-c">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<":-a:.b-c:-c:">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<":-a:.b-c:-c:">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ <<":-a:.b-c:-c:">> = iolist_to_binary(join(re:split("*.c-a.b-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
2}]))),
-?line <<"*.0">> = iolist_to_binary(join(re:split("*.0","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ <<"*.a-">> = iolist_to_binary(join(re:split("*.a-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
+ 2}]))),
+ <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
+ <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
2}]))),
-?line <<"*.a-b.c-">> = iolist_to_binary(join(re:split("*.a-b.c-","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[trim]))),
-?line <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[{parts,
- 2}]))),
-?line <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
-?line <<":de:abd:e">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[trim]))),
-?line <<":de:abd:e:">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[{parts,
- 2}]))),
-?line <<":de:abd:e:">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[]))),
-?line <<"::abd:f">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[trim]))),
-?line <<"::abd:f:">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[{parts,
- 2}]))),
-?line <<"::abd:f:">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[]))),
-?line <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[trim]))),
-?line <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[{parts,
- 2}]))),
-?line <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[]))),
-?line <<":.d">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless,
- trim]))),
-?line <<":.d:">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless,
- {parts,
- 2}]))),
-?line <<":.d:">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
-?line <<":.D">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless,
- trim]))),
-?line <<":.D:">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless,
- {parts,
- 2}]))),
-?line <<":.D:">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
-?line <<":.C">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless,
- trim]))),
-?line <<":.C:">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless,
- {parts,
- 2}]))),
-?line <<":.C:">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[]))),
-?line <<":;">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
-?line <<":;:">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[{parts,
- 2}]))),
-?line <<":;:">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[]))),
-?line <<":; rhubarb">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
-?line <<":; rhubarb:">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[{parts,
- 2}]))),
-?line <<":; rhubarb:">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[{parts,
+ <<"*.c-a.0-c">> = iolist_to_binary(join(re:split("*.c-a.0-c","^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$",[]))),
+ <<":de:abd:e">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[trim]))),
+ <<":de:abd:e:">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[{parts,
+ 2}]))),
+ <<":de:abd:e:">> = iolist_to_binary(join(re:split("abde","^(?=ab(de))(abd)(e)",[]))),
+ <<"::abd:f">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[trim]))),
+ <<"::abd:f:">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[{parts,
+ 2}]))),
+ <<"::abd:f:">> = iolist_to_binary(join(re:split("abdf","^(?!(ab)de|x)(abd)(f)",[]))),
+ <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[trim]))),
+ <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[{parts,
+ 2}]))),
+ <<":abcd:cd:ab:cd">> = iolist_to_binary(join(re:split("abcd","^(?=(ab(cd)))(ab)",[]))),
+ <<":.d">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ trim]))),
+ <<":.d:">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ {parts,
+ 2}]))),
+ <<":.d:">> = iolist_to_binary(join(re:split("a.b.c.d","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
+ <<":.D">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ trim]))),
+ <<":.D:">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ {parts,
+ 2}]))),
+ <<":.D:">> = iolist_to_binary(join(re:split("A.B.C.D","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
+ <<":.C">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ trim]))),
+ <<":.C:">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless,
+ {parts,
+ 2}]))),
+ <<":.C:">> = iolist_to_binary(join(re:split("a.b.c.1.2.3.C","^[\\da-f](\\.[\\da-f])*$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("\"1234\"","^\\\".*\\\"\\s*(;.*)?$",[]))),
+ <<":;">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
+ <<":;:">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[]))),
-?line <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
-?line <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[{parts,
- 2}]))),
-?line <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^$",[trim]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^$",[{parts,
- 2}]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ <<":;:">> = iolist_to_binary(join(re:split("\"abcd\" ;","^\\\".*\\\"\\s*(;.*)?$",[]))),
+ <<":; rhubarb">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
+ <<":; rhubarb:">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[{parts,
+ 2}]))),
+ <<":; rhubarb:">> = iolist_to_binary(join(re:split("\"\" ; rhubarb","^\\\".*\\\"\\s*(;.*)?$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\\".*\\\"\\s*(;.*)?$",[]))),
+ <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[trim]))),
+ <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[{parts,
+ 2}]))),
+ <<"\"1234\" : things">> = iolist_to_binary(join(re:split("\"1234\" : things","^\\\".*\\\"\\s*(;.*)?$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("","^$",[trim]))),
+ <<"">> = iolist_to_binary(join(re:split("","^$",[{parts,
+ 2}]))),
+ <<"">> = iolist_to_binary(join(re:split("","^$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ <<":">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- trim]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
- {parts,
- 2}]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("ab c"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ {parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ trim]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended,
+ {parts,
+ 2}]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde"," ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
- 2}]))),
-?line <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended,
+ <<":">> = iolist_to_binary(join(re:split("ab c","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[trim]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[{parts,
+ 2}]))),
+ <<"ab cde">> = iolist_to_binary(join(re:split("ab cde","(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended,
trim]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended,
+ <<":">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended,
{parts,
2}]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended]))),
-?line <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended,
+ <<":">> = iolist_to_binary(join(re:split("a bcd","^ a\\ b[c ]d $",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended,
trim]))),
-?line <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended,
+ <<":">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended,
{parts,
2}]))),
-?line <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended]))),
-?line <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[trim]))),
-?line <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[{parts,
- 2}]))),
-?line <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[]))),
-?line <<":bc:c:ef:f:ij:j:lm:m">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[trim]))),
-?line <<":bc:c:ef:f:ij:j:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[{parts,
- 2}]))),
-?line <<":bc:c:ef:f:ij:j:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a+ Z0+
+ <<":">> = iolist_to_binary(join(re:split("a b d","^ a\\ b[c ]d $",[extended]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^ a\\ b[c ]d $",[extended]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended,
+ trim]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended,
+ {parts,
+ 2}]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","^ a\\ b[c ]d $",[extended]))),
+ <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended,
+ trim]))),
+ <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended,
+ {parts,
+ 2}]))),
+ <<"ab d">> = iolist_to_binary(join(re:split("ab d","^ a\\ b[c ]d $",[extended]))),
+ <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[trim]))),
+ <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[{parts,
+ 2}]))),
+ <<":abc:bc:c:def:ef:f:hij:ij:j:klm:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$",[]))),
+ ok.
+run2() ->
+ <<":bc:c:ef:f:ij:j:lm:m">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[trim]))),
+ <<":bc:c:ef:f:ij:j:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[{parts,
+ 2}]))),
+ <<":bc:c:ef:f:ij:j:lm:m:">> = iolist_to_binary(join(re:split("abcdefhijklm","^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a+ Z0+
","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a+ Z0+
+ <<":">> = iolist_to_binary(join(re:split("a+ Z0+
","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a+ Z0+
+ <<":">> = iolist_to_binary(join(re:split("a+ Z0+
","^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("z","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","^a*\\w",[{parts,
+ <<"">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split(".^$(*+)|{?,?}","^[.^$|()*+?{,}]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("z","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("z","^a*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("z","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("az","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("az","^a*\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("az","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a*\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("az","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^a*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aa","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","^a*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[]))),
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[trim]))),
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[{parts,
+ 2}]))),
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[trim]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaz","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^a*\\w",[{parts,
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("z","^a*?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("z","^a*?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aa","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a*\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("z","^a*?\\w",[]))),
+ <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[trim]))),
+ <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[{parts,
+ <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[]))),
+ <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[trim]))),
+ <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w",[]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[trim]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[{parts,
+ <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^a*?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^a*?\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^a*?\\w",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[trim]))),
+ <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[{parts,
2}]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*\\w",[]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[trim]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[{parts,
- 2}]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("z","^a*?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","^a*?\\w",[{parts,
+ <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[]))),
+ <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[trim]))),
+ <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[{parts,
+ 2}]))),
+ <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[]))),
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[trim]))),
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","^a*?\\w",[]))),
-?line <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[trim]))),
-?line <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[{parts,
+ <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[]))),
+ <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[trim]))),
+ <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[{parts,
2}]))),
-?line <<":z">> = iolist_to_binary(join(re:split("az","^a*?\\w",[]))),
-?line <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[trim]))),
-?line <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[{parts,
- 2}]))),
-?line <<":aaz">> = iolist_to_binary(join(re:split("aaaz","^a*?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^a*?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^a*?\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^a*?\\w",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[trim]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[{parts,
+ <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("az","^a+\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("az","^a+\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("az","^a+\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[{parts,
2}]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aa","^a*?\\w",[]))),
-?line <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[trim]))),
-?line <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[{parts,
- 2}]))),
-?line <<":aaa">> = iolist_to_binary(join(re:split("aaaa","^a*?\\w",[]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[trim]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aa","^a+\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","^a+\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","^a+\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[{parts,
2}]))),
-?line <<":+">> = iolist_to_binary(join(re:split("a+","^a*?\\w",[]))),
-?line <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[trim]))),
-?line <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[{parts,
- 2}]))),
-?line <<":a+">> = iolist_to_binary(join(re:split("aa+","^a*?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("az","^a+\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a+\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[trim]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[{parts,
+ 2}]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("az","^a+?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("az","^a+?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a+\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("az","^a+?\\w",[]))),
+ <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[trim]))),
+ <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaz","^a+\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aa","^a+\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a+\\w",[{parts,
+ <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a+\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[]))),
+ <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[trim]))),
+ <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^a+\\w",[]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[trim]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[{parts,
+ <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[trim]))),
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[{parts,
2}]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("az","^a+?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a+?\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("az","^a+?\\w",[]))),
-?line <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[trim]))),
-?line <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[{parts,
- 2}]))),
-?line <<":az">> = iolist_to_binary(join(re:split("aaaz","^a+?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","^a+?\\w",[]))),
-?line <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[trim]))),
-?line <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[{parts,
- 2}]))),
-?line <<":aa">> = iolist_to_binary(join(re:split("aaaa","^a+?\\w",[]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[trim]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[{parts,
- 2}]))),
-?line <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[{parts,
+ <<":+">> = iolist_to_binary(join(re:split("aa+","^a+?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1234567890","^\\d{8}\\w{2,}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12345678ab","^\\d{8}\\w{2,}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345678__","^\\d{8}\\w{2,}",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[]))),
-?line <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[trim]))),
-?line <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[{parts,
- 2}]))),
-?line <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8}\\w{2,}",[]))),
+ <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[trim]))),
+ <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[{parts,
+ 2}]))),
+ <<"1234567">> = iolist_to_binary(join(re:split("1234567","^\\d{8}\\w{2,}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[]))),
+ <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[trim]))),
+ <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[aeiou\\d]{4,5}$",[]))),
-?line <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[trim]))),
-?line <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[{parts,
- 2}]))),
-?line <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[{parts,
+ <<"123456">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[]))),
+ <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[trim]))),
+ <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("uoie","^[aeiou\\d]{4,5}?",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[{parts,
+ <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[trim]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^[aeiou\\d]{4,5}?",[]))),
-?line <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[trim]))),
-?line <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[{parts,
- 2}]))),
-?line <<":5">> = iolist_to_binary(join(re:split("12345","^[aeiou\\d]{4,5}?",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[trim]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[{parts,
+ <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[]))),
+ <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[trim]))),
+ <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[{parts,
2}]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaa","^[aeiou\\d]{4,5}?",[]))),
-?line <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[trim]))),
-?line <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[{parts,
- 2}]))),
-?line <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[]))),
-?line <<":abc:abc">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
-?line <<":abc:abc:">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
- 2}]))),
-?line <<":abc:abc:">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
-?line <<":def:def">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
-?line <<":def:def:">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
- 2}]))),
-?line <<":def:def:">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
-?line <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
-?line <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
+ <<":56">> = iolist_to_binary(join(re:split("123456","^[aeiou\\d]{4,5}?",[]))),
+ <<":abc:abc">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
+ <<":abc:abc:">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
+ 2}]))),
+ <<":abc:abc:">> = iolist_to_binary(join(re:split("abc=abcabc","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
+ <<":def:def">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
+ <<":def:def:">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
+ 2}]))),
+ <<":def:def:">> = iolist_to_binary(join(re:split("def=defdefdef","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
2}]))),
-?line <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[trim]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[{parts,
- 2}]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[trim]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[{parts,
- 2}]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[]))),
-?line <<":cataract:aract:ract::3">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
-?line <<":cataract:aract:ract::3:">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
- 2}]))),
-?line <<":cataract:aract:ract::3:">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
-?line <<":catatonic:atonic:tonic::3">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
-?line <<":catatonic:atonic:tonic::3:">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
- 2}]))),
-?line <<":catatonic:atonic:tonic::3:">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
-?line <<":caterpillar:erpillar:::3">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
-?line <<":caterpillar:erpillar:::3:">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
- 2}]))),
-?line <<":caterpillar:erpillar:::3:">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
-?line <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[trim]))),
-?line <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[{parts,
- 2}]))),
-?line <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
- 2}]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
- 2}]))),
-?line <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
-?line <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
-?line <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
- 2}]))),
-?line <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
+ <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[trim]))),
+ <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[{parts,
+ 2}]))),
+ <<"abc=defdef">> = iolist_to_binary(join(re:split("abc=defdef","\\A(abc|def)=(\\1){2,3}\\Z",[]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[trim]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[{parts,
+ 2}]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[trim]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[{parts,
+ 2}]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:cd:">> = iolist_to_binary(join(re:split("abcdefghijkkkkcda2","^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$",[]))),
+ <<":cataract:aract:ract::3">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
+ <<":cataract:aract:ract::3:">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
+ 2}]))),
+ <<":cataract:aract:ract::3:">> = iolist_to_binary(join(re:split("cataract cataract23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
+ <<":catatonic:atonic:tonic::3">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
+ <<":catatonic:atonic:tonic::3:">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
+ 2}]))),
+ <<":catatonic:atonic:tonic::3:">> = iolist_to_binary(join(re:split("catatonic catatonic23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
+ <<":caterpillar:erpillar:::3">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[trim]))),
+ <<":caterpillar:erpillar:::3:">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[{parts,
+ 2}]))),
+ <<":caterpillar:erpillar:::3:">> = iolist_to_binary(join(re:split("caterpillar caterpillar23","(cat(a(ract|tonic)|erpillar)) \\1()2(3)",[]))),
+ <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[trim]))),
+ <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[{parts,
+ 2}]))),
+ <<":abcd::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]",[]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
+ 2}]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
+ 2}]))),
+ <<":Sep ::02 1997">> = iolist_to_binary(join(re:split("From abcd Mon Sep 1 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
+ <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[trim]))),
+ <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[{parts,
+ 2}]))),
+ <<"From abcd Sep 01 12:33:02 1997">> = iolist_to_binary(join(re:split("From abcd Sep 01 12:33:02 1997","^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12
34","^12.34",[dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12
+ <<":">> = iolist_to_binary(join(re:split("12
34","^12.34",[dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12
+ <<":">> = iolist_to_binary(join(re:split("12
34","^12.34",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall]))),
-?line <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[trim]))),
-?line <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12 34","^12.34",[dotall]))),
+ <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[trim]))),
+ <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[{parts,
2}]))),
-?line <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[]))),
-?line <<"foobar is :lish see?">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[trim]))),
-?line <<"foobar is :lish see?:">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[{parts,
- 2}]))),
-?line <<"foobar is :lish see?:">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[]))),
-?line <<"foobar c: etc">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
-?line <<"foobar c: etc:">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
- 2}]))),
-?line <<"foobar c: etc:">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
-?line <<":rel">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
+ <<"the quick : fox">> = iolist_to_binary(join(re:split("the quick brown fox","\\w+(?=\\t)",[]))),
+ <<"foobar is :lish see?">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[trim]))),
+ <<"foobar is :lish see?:">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[{parts,
2}]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
-?line <<":rel">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
+ <<"foobar is :lish see?:">> = iolist_to_binary(join(re:split("foobar is foolish see?","foo(?!bar)(.*)",[]))),
+ <<"foobar c: etc">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
+ <<"foobar c: etc:">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
+ 2}]))),
+ <<"foobar c: etc:">> = iolist_to_binary(join(re:split("foobar crowbar etc","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
+ <<":rel">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
+ <<":rel:">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
+ 2}]))),
+ <<":rel:">> = iolist_to_binary(join(re:split("barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
+ <<":rel">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
+ <<":rel:">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
+ 2}]))),
+ <<":rel:">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
+ <<":rel">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
+ <<":rel:">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
2}]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("2barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
-?line <<":rel">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[trim]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[{parts,
- 2}]))),
-?line <<":rel:">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
-?line <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
+ <<":rel:">> = iolist_to_binary(join(re:split("A barrel","(?:(?!foo)...|^.{0,2})bar(.*)",[]))),
+ <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<":abc:456">> = iolist_to_binary(join(re:split("abc456","^(\\D*)(?=\\d)(?!123)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[]))),
+ <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<"abc123">> = iolist_to_binary(join(re:split("abc123","^(\\D*)(?=\\d)(?!123)",[]))),
+ ok.
+run3() ->
+ <<"">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
inside)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
+ <<":">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
inside)",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
+ <<":">> = iolist_to_binary(join(re:split("1234","^1234(?# test newlines
inside)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
+ <<"">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
+ <<":">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
+ <<":">> = iolist_to_binary(join(re:split("1234","^1234 #comment in extended re
",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","#rhubarb
+ <<"">> = iolist_to_binary(join(re:split("abcd","#rhubarb
abcd",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","#rhubarb
+ <<":">> = iolist_to_binary(join(re:split("abcd","#rhubarb
abcd",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","#rhubarb
+ <<":">> = iolist_to_binary(join(re:split("abcd","#rhubarb
abcd",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[trim]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","^abcd#rhubarb",[extended]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[trim]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[{parts,
+ 2}]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[trim]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[{parts,
2}]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("aaab","^(a)\\1{2,3}(.)",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[trim]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[{parts,
+ <<":a:b:">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[]))),
+ <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[trim]))),
+ <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[{parts,
2}]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("aaaab","^(a)\\1{2,3}(.)",[]))),
-?line <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[trim]))),
-?line <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[{parts,
+ <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[]))),
+ <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[trim]))),
+ <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[{parts,
2}]))),
-?line <<":a:a:b">> = iolist_to_binary(join(re:split("aaaaab","^(a)\\1{2,3}(.)",[]))),
-?line <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[trim]))),
-?line <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[{parts,
- 2}]))),
-?line <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[]))),
-?line <<"the ">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[trim]))),
-?line <<"the :">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[{parts,
- 2}]))),
-?line <<"the :">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[]))),
-?line <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[trim]))),
-?line <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[{parts,
- 2}]))),
-?line <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[trim]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[{parts,
+ <<":a:a:ab">> = iolist_to_binary(join(re:split("aaaaaab","^(a)\\1{2,3}(.)",[]))),
+ <<"the ">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[trim]))),
+ <<"the :">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[{parts,
+ 2}]))),
+ <<"the :">> = iolist_to_binary(join(re:split("the abc","(?!^)abc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?!^)abc",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?!^)abc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=^)abc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=^)abc",[]))),
+ <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[trim]))),
+ <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[{parts,
+ 2}]))),
+ <<"the abc">> = iolist_to_binary(join(re:split("the abc","(?=^)abc",[]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[trim]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[{parts,
+ 2}]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[]))),
+ <<":abbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[trim]))),
+ <<":abbbbb:">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[{parts,
2}]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*|b)",[]))),
-?line <<":abbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[trim]))),
-?line <<":abbbbb:">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[{parts,
- 2}]))),
-?line <<":abbbbb:">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[]))),
-?line <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[trim]))),
-?line <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[{parts,
- 2}]))),
-?line <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[trim]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[{parts,
+ <<":abbbbb:">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*|b)",[]))),
+ <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[trim]))),
+ <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[{parts,
2}]))),
-?line <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
+ <<":a:bbbbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}?(ab*?|b)",[]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[trim]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[{parts,
+ 2}]))),
+ <<":b:bbb">> = iolist_to_binary(join(re:split("aabbbbb","^[ab]{1,3}(ab*?|b)",[]))),
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1575,7 +1628,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1769,7 +1822,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -1962,7 +2015,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2155,7 +2208,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2349,7 +2402,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2542,7 +2595,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2735,7 +2788,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -2929,7 +2982,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3122,7 +3175,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3315,7 +3368,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3509,7 +3562,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3702,7 +3755,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -3895,7 +3948,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4089,7 +4142,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4282,7 +4335,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4475,7 +4528,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4669,7 +4722,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -4862,7 +4915,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -5055,7 +5108,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -5249,7 +5302,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -5442,7 +5495,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -5635,7 +5688,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -5829,7 +5882,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -6022,7 +6075,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -6215,7 +6268,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,trim]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -6409,7 +6462,7 @@ run() ->
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended,
{parts,2}]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox"," (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional leading comment
(?: (?:
@@ -6602,7 +6655,7 @@ run() ->
) (?: [\\040\\t] | \\(
(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*
\\) )* # optional trailing comment",[extended]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -7183,7 +7236,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -7764,7 +7817,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"Alan Other <user.ain>">> = iolist_to_binary(join(re:split("Alan Other <user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -8345,7 +8398,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -8926,7 +8979,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -9507,7 +9560,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
+ <<"<user.ain>">> = iolist_to_binary(join(re:split("<user.ain>","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -10088,7 +10141,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -10669,7 +10722,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -11250,7 +11303,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
+ <<"user.ain">> = iolist_to_binary(join(re:split("user.ain","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -11831,7 +11884,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -12412,7 +12465,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -12993,7 +13046,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"\"A. Other\" <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("\"A. Other\" <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -13574,7 +13627,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -14155,7 +14208,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -14736,7 +14789,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
+ <<"A. Other <user.1234.ain> (a comment)">> = iolist_to_binary(join(re:split("A. Other <user.1234.ain> (a comment)","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -15317,7 +15370,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -15898,7 +15951,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -16479,7 +16532,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
+ <<"\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay">> = iolist_to_binary(join(re:split("\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"-re.lay","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -17060,7 +17113,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -17641,7 +17694,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -18222,7 +18275,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
+ <<"A missing angle <user.where">> = iolist_to_binary(join(re:split("A missing angle <user.where","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -18803,7 +18856,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -19384,7 +19437,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -19965,7 +20018,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -20546,7 +20599,7 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -21127,7 +21180,7 @@ run() ->
> # >
# name and address
)",[extended,trim]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -21708,7 +21761,7 @@ run() ->
> # >
# name and address
)",[extended,{parts,2}]))),
-?line <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","[\\040\\t]* # Nab whitespace.
(?:
\\( # (
[^\\\\\\x80-\\xff\\n\\015()] * # normal*
@@ -22289,5709 +22342,5763 @@ run() ->
> # >
# name and address
)",[extended]))),
-?line <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[trim]))),
-?line <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[{parts,
- 2}]))),
-?line <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[]))),
-?line <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[trim]))),
-?line <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[{parts,
- 2}]))),
-?line <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[]))),
-?line <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[trim]))),
-?line <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[{parts,
- 2}]))),
-?line <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[]))),
-?line <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[trim]))),
-?line <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[{parts,
- 2}]))),
-?line <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[trim]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[{parts,
- 2}]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[]))),
-?line <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[trim]))),
-?line <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[{parts,
- 2}]))),
-?line <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[]))),
-?line <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[trim]))),
-?line <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[{parts,
- 2}]))),
-?line <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("","\\0*",[trim]))),
-?line <<"">> = iolist_to_binary(join(re:split("","\\0*",[{parts,
- 2}]))),
-?line <<"">> = iolist_to_binary(join(re:split("","\\0*",[]))),
-?line <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[trim]))),
-?line <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[{parts,
- 2}]))),
-?line <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[]))),
-?line <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[trim]))),
-?line <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[{parts,
+ <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[trim]))),
+ <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[{parts,
+ 2}]))),
+ <<"abcdefpqrxyz0AB">> = iolist_to_binary(join(re:split("abcdefpqrxyz0AB","abc\\0def\\00pqr\\000xyz\\0000AB",[]))),
+ <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[trim]))),
+ <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[{parts,
+ 2}]))),
+ <<"abc456 abcdefpqrxyz0ABCDE">> = iolist_to_binary(join(re:split("abc456 abcdefpqrxyz0ABCDE","abc\\0def\\00pqr\\000xyz\\0000AB",[]))),
+ <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[trim]))),
+ <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[{parts,
+ 2}]))),
+ <<"abc efpqr0xyz00AB">> = iolist_to_binary(join(re:split("abc efpqr0xyz00AB","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[]))),
+ <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[trim]))),
+ <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[{parts,
+ 2}]))),
+ <<"abc456 abc efpqr0xyz00ABCDE">> = iolist_to_binary(join(re:split("abc456 abc efpqr0xyz00ABCDE","abc\\x0def\\x00pqr\\x000xyz\\x0000AB",[]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[trim]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[{parts,
+ 2}]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","^[\\000-\\037]",[]))),
+ <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[trim]))),
+ <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[{parts,
+ 2}]))),
+ <<":B">> = iolist_to_binary(join(re:split("B","^[\\000-\\037]",[]))),
+ <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[trim]))),
+ <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[{parts,
+ 2}]))),
+ <<":C">> = iolist_to_binary(join(re:split("C","^[\\000-\\037]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("","\\0*",[trim]))),
+ <<"">> = iolist_to_binary(join(re:split("","\\0*",[{parts,
+ 2}]))),
+ <<"">> = iolist_to_binary(join(re:split("","\\0*",[]))),
+ <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[trim]))),
+ <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[{parts,
+ 2}]))),
+ <<"The AZ">> = iolist_to_binary(join(re:split("The AZ","A\\x0{2,3}Z",[]))),
+ <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[trim]))),
+ <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[{parts,
+ 2}]))),
+ <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[trim]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[{parts,
+ 2}]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[trim]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[{parts,
+ 2}]))),
+ <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[]))),
+ <<":cow:bell">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[trim]))),
+ <<":cow:bell:">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[{parts,
+ 2}]))),
+ <<":cow:bell:">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[]))),
+ <<"::bell">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[trim]))),
+ <<"::bell:">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[{parts,
2}]))),
-?line <<"An AZ">> = iolist_to_binary(join(re:split("An AZ","A\\x0{2,3}Z",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","A\\x0{2,3}Z",[]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[trim]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[{parts,
- 2}]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[trim]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[{parts,
- 2}]))),
-?line <<"AZ">> = iolist_to_binary(join(re:split("AZ","A\\x0{2,3}Z",[]))),
-?line <<":cow:bell">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[trim]))),
-?line <<":cow:bell:">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[{parts,
+ <<"::bell:">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[{parts,
2}]))),
-?line <<":cow:bell:">> = iolist_to_binary(join(re:split("cowcowbell","^(cow|)\\1(bell)",[]))),
-?line <<"::bell">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[trim]))),
-?line <<"::bell:">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[{parts,
- 2}]))),
-?line <<"::bell:">> = iolist_to_binary(join(re:split("bell","^(cow|)\\1(bell)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[]))),
-?line <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[trim]))),
-?line <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[{parts,
- 2}]))),
-?line <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
- 2}]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
- 2}]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(cow|)\\1(bell)",[]))),
+ <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[trim]))),
+ <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[{parts,
+ 2}]))),
+ <<"cowbell">> = iolist_to_binary(join(re:split("cowbell","^(cow|)\\1(bell)",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
+ 2}]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
+ 2}]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("
abc","^\\s",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("
+ <<":abc">> = iolist_to_binary(join(re:split("
abc","^\\s",[{parts,2}]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("
+ <<":abc">> = iolist_to_binary(join(re:split("
abc","^\\s",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
- 2}]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
- 2}]))),
-?line <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[{parts,
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^a b
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[{parts,
+ 2}]))),
+ <<":abc">> = iolist_to_binary(join(re:split(" abc","^\\s",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\s",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^\\s",[]))),
+ ok.
+run4() ->
+ <<"">> = iolist_to_binary(join(re:split("abc","^a b
c",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^a b
+ <<":">> = iolist_to_binary(join(re:split("abc","^a b
c",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^a b
+ <<":">> = iolist_to_binary(join(re:split("abc","^a b
c",[extended]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[{parts,
+ <<":a">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[]))),
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[trim]))),
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1*b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1*b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[{parts,
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1*b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1*b",[]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[trim]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[{parts,
- 2}]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1*b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1+b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1+b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[{parts,
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1+b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1+b",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[trim]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[{parts,
2}]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1+b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[]))),
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[trim]))),
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","^(a|)\\1?b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aab","^(a|)\\1?b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1?b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1?b",[]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[trim]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[{parts,
- 2}]))),
-?line <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[{parts,
+ <<"acb">> = iolist_to_binary(join(re:split("acb","^(a|)\\1?b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2}b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2}b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2}b",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[trim]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[{parts,
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[{parts,
2}]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2}b",[]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[trim]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[{parts,
- 2}]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[]))),
-?line <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[trim]))),
-?line <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[{parts,
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2}b",[]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[trim]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[{parts,
+ 2}]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[{parts,
2}]))),
-?line <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2}b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaab","^(a|)\\1{2,3}b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a|)\\1{2,3}b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a|)\\1{2,3}b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a|)\\1{2,3}b",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[trim]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[{parts,
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[{parts,
2}]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a|)\\1{2,3}b",[]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[trim]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[{parts,
- 2}]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[]))),
-?line <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[trim]))),
-?line <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[{parts,
- 2}]))),
-?line <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[{parts,
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a|)\\1{2,3}b",[]))),
+ <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[trim]))),
+ <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[{parts,
+ 2}]))),
+ <<"aaaaab">> = iolist_to_binary(join(re:split("aaaaab","^(a|)\\1{2,3}b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbbc","ab{1,3}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[]))),
-?line <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[trim]))),
-?line <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab{1,3}bc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{1,3}bc",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab{1,3}bc",[]))),
+ <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[trim]))),
+ <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[{parts,
+ 2}]))),
+ <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[]))),
+ <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[trim]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[{parts,
+ 2}]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[]))),
+ <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless,
+ trim]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless,
+ {parts,
+ 2}]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless]))),
+ <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless,
+ trim]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless,
+ {parts,
+ 2}]))),
+ <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[]))),
+ <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[trim]))),
+ <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[{parts,
+ 2}]))),
+ <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless,
+ {parts,
2}]))),
-?line <<"abbbbbc">> = iolist_to_binary(join(re:split("abbbbbc","ab{1,3}bc",[]))),
-?line <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[trim]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[{parts,
- 2}]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[]))),
-?line <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless,
- trim]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless,
- {parts,
- 2}]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[T ]+(.*)",[caseless]))),
-?line <<":track1:title:Blah blah blah">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless,
- trim]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless,
- {parts,
- 2}]))),
-?line <<":track1:title:Blah blah blah:">> = iolist_to_binary(join(re:split("track1.title:TBlah blah blah","([^.]*)\\.([^:]*):[t ]+(.*)",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-c]+$",[]))),
-?line <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[trim]))),
-?line <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[{parts,
- 2}]))),
-?line <<"wxy">> = iolist_to_binary(join(re:split("wxy","^[W-c]+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline]))),
-?line <<"qqq
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[W-c]+$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[W-c]+$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("WXY_^abc","^[\\x3f-\\x5F]+$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("wxy_^ABC","^[\\x3f-\\x5F]+$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[multiline]))),
+ <<"qqq
">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
:">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
:">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[multiline]))),
-?line <<":
+ <<":
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[multiline,trim]))),
-?line <<":
+ <<":
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[multiline,{parts,2}]))),
-?line <<":
+ <<":
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[multiline]))),
-?line <<"qqq
+ <<"qqq
:
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
:
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
:
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[]))),
-?line <<"qqq
+ <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[]))),
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[trim]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","^abc$",[]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[trim]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[{parts,2}]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","^abc$",[]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[trim]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","^abc$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline]))),
-?line <<"qqq
+ <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\Z",[multiline]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\Z",[multiline]))),
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\Z",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\Z",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\Z",[multiline]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\Z",[multiline,trim]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\Z",[multiline,{parts,2}]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\Z",[multiline]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\Z",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\Z",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\Z",[multiline]))),
-?line <<":f">> = iolist_to_binary(join(re:split("abc
+ <<":f">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[dotall,trim]))),
-?line <<":f:">> = iolist_to_binary(join(re:split("abc
+ <<":f:">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[dotall,{parts,2}]))),
-?line <<":f:">> = iolist_to_binary(join(re:split("abc
+ <<":f:">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[dotall]))),
-?line <<":s">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline,
- trim]))),
-?line <<":s:">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline,
- {parts,
- 2}]))),
-?line <<":s:">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline]))),
-?line <<"abc
+ <<":s">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline,
+ trim]))),
+ <<":s:">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline,
+ {parts,
+ 2}]))),
+ <<":s:">> = iolist_to_binary(join(re:split("*** Failers","\\A(.)*\\Z",[multiline]))),
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[multiline,trim]))),
-?line <<"abc
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[multiline,{parts,2}]))),
-?line <<"abc
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","\\A(.)*\\Z",[multiline]))),
-?line <<"::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[trim]))),
-?line <<":::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[{parts,
+ <<"::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[trim]))),
+ <<":::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[{parts,
+ 2}]))),
+ <<"::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[]))),
+ <<"c">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[trim]))),
+ <<"c:b">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[{parts,
+ 2}]))),
+ <<"c::">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("az-","[-az]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("az-","[-az]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("az-","[-az]+",[]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[trim]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[{parts,
2}]))),
-?line <<"::c">> = iolist_to_binary(join(re:split("b::c","(?:b)|(?::+)",[]))),
-?line <<"c">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[trim]))),
-?line <<"c:b">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[{parts,
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[]))),
+ ok.
+run5() ->
+ <<"">> = iolist_to_binary(join(re:split("za-","[az-]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("za-","[az-]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("za-","[az-]+",[]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[trim]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[{parts,
2}]))),
-?line <<"c::">> = iolist_to_binary(join(re:split("c::b","(?:b)|(?::+)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("az-","[-az]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("az-","[-az]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("az-","[-az]+",[]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[trim]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[{parts,
- 2}]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[-az]+",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[{parts,
- 2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[-az]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("za-","[az-]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("za-","[az-]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("za-","[az-]+",[]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[trim]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[{parts,
- 2}]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[{parts,
- 2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[trim]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[{parts,
- 2}]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[{parts,
- 2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[trim]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[{parts,
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[az-]+",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[az-]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[{parts,
2}]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[trim]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a-z","[a\\-z]+",[]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[trim]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[{parts,
+ 2}]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[a\\-z]+",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[a\\-z]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcdxyz","[a-z]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[{parts,
2}]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[]))),
-?line <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[trim]))),
-?line <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("12-34","[\\d-]+",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-]+",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[{parts,
2}]))),
-?line <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[]))),
-?line <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[trim]))),
-?line <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[{parts,
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[{parts,
2}]))),
-?line <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[]))),
-?line <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[trim]))),
-?line <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("12-34z","[\\d-z]+",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\d-z]+",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[{parts,
2}]))),
-?line <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless,
- trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless,
- trim]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless,
- trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[{parts,
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","[\\d-z]+",[]))),
+ <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[trim]))),
+ <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[{parts,
+ 2}]))),
+ <<": ">> = iolist_to_binary(join(re:split("\\ ","\\x5c",[]))),
+ <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[trim]))),
+ <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[{parts,
+ 2}]))),
+ <<"the:oo">> = iolist_to_binary(join(re:split("the Zoo","\\x20Z",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\x20Z",[]))),
+ <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[trim]))),
+ <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[{parts,
+ 2}]))),
+ <<"Zulu">> = iolist_to_binary(join(re:split("Zulu","\\x20Z",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless,
+ trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless,
+ {parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","abc$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","abc$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[]))),
-?line <<"abc
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[caseless]))),
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless,
+ trim]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCabc","(abc)\\1",[caseless]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless,
+ trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcABC","(abc)\\1",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3cd","ab{3cd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3,cd","ab{3,cd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab{3,4a}cd","ab{3,4a}cd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("{4,5a}bc","{4,5a}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","abc$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","abc$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[]))),
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","abc$",[trim]))),
-?line <<"abc
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","abc$",[{parts,2}]))),
-?line <<"abc
+ <<"abc
def">> = iolist_to_binary(join(re:split("abc
def","abc$",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[trim]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[{parts,
+ <<":abc">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[{parts,
2}]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[trim]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abcS","(abc)\\123",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[{parts,
2}]))),
-?line <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[trim]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abc“","(abc)\\223",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[{parts,
2}]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[trim]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abcÓ","(abc)\\323",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[{parts,
2}]))),
-?line <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:l">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[trim]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:l:">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[{parts,
- 2}]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:l:">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k">> = iolist_to_binary(join(re:split("abcdefghijk
+ <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc@","(abc)\\100",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1000",[]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[trim]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[{parts,
+ 2}]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[trim]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[{parts,
+ 2}]))),
+ <<"abc81">> = iolist_to_binary(join(re:split("abc81","abc\\81",[]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[trim]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[{parts,
+ 2}]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[trim]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[{parts,
+ 2}]))),
+ <<"abc91">> = iolist_to_binary(join(re:split("abc91","abc\\91",[]))),
+ ok.
+run6() ->
+ <<":a:b:c:d:e:f:g:h:i:j:k:l">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[trim]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:l:">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[{parts,
+ 2}]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k:l:">> = iolist_to_binary(join(re:split("abcdefghijkllS","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123",[]))),
+ <<":a:b:c:d:e:f:g:h:i:j:k">> = iolist_to_binary(join(re:split("abcdefghijk
S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123",[trim]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:">> = iolist_to_binary(join(re:split("abcdefghijk
+ <<":a:b:c:d:e:f:g:h:i:j:k:">> = iolist_to_binary(join(re:split("abcdefghijk
S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123",[{parts,2}]))),
-?line <<":a:b:c:d:e:f:g:h:i:j:k:">> = iolist_to_binary(join(re:split("abcdefghijk
+ <<":a:b:c:d:e:f:g:h:i:j:k:">> = iolist_to_binary(join(re:split("abcdefghijk
S","(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bc","a{0}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("bc","a{0}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("bc","a{0}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[{parts,
- 2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abidef","ab\\idef",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bc","a{0}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("bc","a{0}bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("bc","a{0}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("xyz","(a|(bc)){0,0}?xyz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\10]de",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcde","abc[\\1]de",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcde","(abc)[\\1]de",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a
b","(?s)a.b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","(?s)a.b",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","(?s)a.b",[]))),
-?line <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
- 2}]))),
-?line <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
2}]))),
-?line <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ <<":b:a:NOT:cccc:d">> = iolist_to_binary(join(re:split("baNOTccccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
2}]))),
-?line <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
- 2}]))),
-?line <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<":*:*:* Fail:ers">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<":*:*:* Fail:ers:">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
- 2}]))),
-?line <<":*:*:* Fail:ers:">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
- 2}]))),
-?line <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
- 2}]))),
-?line <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
-?line <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ <<":b:a:NOT:ccc:d">> = iolist_to_binary(join(re:split("baNOTcccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ 2}]))),
+ <<":b:a:NO:Tcc:d">> = iolist_to_binary(join(re:split("baNOTccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
2}]))),
-?line <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Abc","[^a]",[trim]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("Abc","[^a]",[{parts,
- 2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("Abc","[^a]",[]))),
-?line <<"A">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless,
- trim]))),
-?line <<"A:c">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless,
- {parts,
- 2}]))),
-?line <<"A::">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[trim]))),
-?line <<":aAbc">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[]))),
-?line <<"AAAaA">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless,
- trim]))),
-?line <<"AAAaA:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless,
- {parts,
- 2}]))),
-?line <<"AAAaA:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("bbb
+ <<":b:a::ccc:d">> = iolist_to_binary(join(re:split("bacccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<":*:*:* Fail:ers">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<":*:*:* Fail:ers:">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ 2}]))),
+ <<":*:*:* Fail:ers:">> = iolist_to_binary(join(re:split("*** Failers","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ 2}]))),
+ <<"anything">> = iolist_to_binary(join(re:split("anything","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ 2}]))),
+ <<"bc">> = iolist_to_binary(join(re:split("bc","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[trim]))),
+ <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[{parts,
+ 2}]))),
+ <<"baccd">> = iolist_to_binary(join(re:split("baccd","^([^a])([^\\b])([^c]*)([^d]{3,4})",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Abc","[^a]",[trim]))),
+ <<":bc">> = iolist_to_binary(join(re:split("Abc","[^a]",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("Abc","[^a]",[]))),
+ <<"A">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless,
+ trim]))),
+ <<"A:c">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless,
+ {parts,
+ 2}]))),
+ <<"A::">> = iolist_to_binary(join(re:split("Abc","[^a]",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[trim]))),
+ <<":aAbc">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[]))),
+ <<"AAAaA">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless,
+ trim]))),
+ <<"AAAaA:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless,
+ {parts,
+ 2}]))),
+ <<"AAAaA:">> = iolist_to_binary(join(re:split("AAAaAbc","[^a]+",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("bbb
ccc","[^a]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("bbb
+ <<":">> = iolist_to_binary(join(re:split("bbb
ccc","[^a]+",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("bbb
+ <<":">> = iolist_to_binary(join(re:split("bbb
ccc","[^a]+",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("abc","[^k]$",[trim]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abc","[^k]$",[{parts,
- 2}]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abc","[^k]$",[]))),
-?line <<"*** Failer">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[trim]))),
-?line <<"*** Failer:">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[{parts,
- 2}]))),
-?line <<"*** Failer:">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[trim]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[{parts,
- 2}]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[]))),
-?line <<"k">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[trim]))),
-?line <<"k:">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<"k:">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[]))),
-?line <<"k">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[trim]))),
-?line <<"k:">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<"k:">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[]))),
-?line <<"*** Fail">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[trim]))),
-?line <<"*** Fail:">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<"*** Fail:">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[trim]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[]))),
-?line <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[trim]))),
-?line <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[{parts,
- 2}]))),
-?line <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[]))),
-?line <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[trim]))),
-?line <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[{parts,
+ <<"ab">> = iolist_to_binary(join(re:split("abc","[^k]$",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","[^k]$",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","[^k]$",[]))),
+ <<"*** Failer">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[trim]))),
+ <<"*** Failer:">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[{parts,
+ 2}]))),
+ <<"*** Failer:">> = iolist_to_binary(join(re:split("*** Failers","[^k]$",[]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[trim]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[{parts,
+ 2}]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","[^k]{2,3}$",[]))),
+ <<"k">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[trim]))),
+ <<"k:">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<"k:">> = iolist_to_binary(join(re:split("kbc","[^k]{2,3}$",[]))),
+ <<"k">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[trim]))),
+ <<"k:">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[{parts,
2}]))),
-?line <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[]))),
-?line <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[trim]))),
-?line <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[{parts,
- 2}]))),
-?line <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[]))),
-?line <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[trim]))),
-?line <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[{parts,
- 2}]))),
-?line <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[]))),
-?line <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[trim]))),
-?line <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[{parts,
- 2}]))),
-?line <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[]))),
-?line <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[trim]))),
-?line <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[{parts,
+ <<"k:">> = iolist_to_binary(join(re:split("kabc","[^k]{2,3}$",[]))),
+ <<"*** Fail">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[trim]))),
+ <<"*** Fail:">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<"*** Fail:">> = iolist_to_binary(join(re:split("*** Failers","[^k]{2,3}$",[]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[trim]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<"abk">> = iolist_to_binary(join(re:split("abk","[^k]{2,3}$",[]))),
+ <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[trim]))),
+ <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<"akb">> = iolist_to_binary(join(re:split("akb","[^k]{2,3}$",[]))),
+ <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[trim]))),
+ <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[{parts,
+ 2}]))),
+ <<"akk">> = iolist_to_binary(join(re:split("akk","[^k]{2,3}$",[]))),
+ <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[trim]))),
+ <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[{parts,
2}]))),
-?line <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[{parts,
+ <<"12345678.b.c.d">> = iolist_to_binary(join(re:split("12345678.b.c.d","^\\d{8,}\\@.+[^k]$",[]))),
+ <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[trim]))),
+ <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[{parts,
+ 2}]))),
+ <<"123456789.y.z">> = iolist_to_binary(join(re:split("123456789.y.z","^\\d{8,}\\@.+[^k]$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\d{8,}\\@.+[^k]$",[]))),
+ <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[trim]))),
+ <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[{parts,
+ 2}]))),
+ <<"12345678.y.uk">> = iolist_to_binary(join(re:split("12345678.y.uk","^\\d{8,}\\@.+[^k]$",[]))),
+ <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[trim]))),
+ <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[{parts,
+ 2}]))),
+ <<"1234567.b.c.d">> = iolist_to_binary(join(re:split("1234567.b.c.d","^\\d{8,}\\@.+[^k]$",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaa","(a)\\1{8,}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","(a)\\1{8,}",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[]))),
-?line <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[trim]))),
-?line <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[{parts,
- 2}]))),
-?line <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[]))),
-?line <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[trim]))),
-?line <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a)\\1{8,}",[]))),
+ <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[trim]))),
+ <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[{parts,
+ 2}]))),
+ <<"aaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaa","(a)\\1{8,}",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[trim]))),
+ <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[{parts,
+ 2}]))),
+ <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[]))),
+ <<"aa:a">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[trim]))),
+ <<"aa:abcd">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[{parts,
+ 2}]))),
+ <<"aa:a:::">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[]))),
+ ok.
+run7() ->
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless,
+ trim]))),
+ <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless,
+ {parts,
+ 2}]))),
+ <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless]))),
+ <<"aaAa">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless,
+ trim]))),
+ <<"aaAa:cd">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless,
+ {parts,
+ 2}]))),
+ <<"aaAa:::">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[trim]))),
+ <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[{parts,
2}]))),
-?line <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[]))),
-?line <<"aa:a">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[trim]))),
-?line <<"aa:abcd">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[{parts,
+ <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[]))),
+ <<"aa:a">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[trim]))),
+ <<"aa:abcd">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[{parts,
2}]))),
-?line <<"aa:a:::">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[]))),
-?line <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless,
+ <<"aa:a:::">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless,
trim]))),
-?line <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless,
+ <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless,
{parts,
2}]))),
-?line <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^a]",[caseless]))),
-?line <<"aaAa">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless,
+ <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless]))),
+ <<"aaAa">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless,
trim]))),
-?line <<"aaAa:cd">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless,
+ <<"aaAa:cd">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless,
{parts,
2}]))),
-?line <<"aaAa:::">> = iolist_to_binary(join(re:split("aaAabcd","[^a]",[caseless]))),
-?line <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[trim]))),
-?line <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[{parts,
- 2}]))),
-?line <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[]))),
-?line <<"aa:a">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[trim]))),
-?line <<"aa:abcd">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[{parts,
- 2}]))),
-?line <<"aa:a:::">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[]))),
-?line <<"aaaa">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless,
- trim]))),
-?line <<"aaaa:cd">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless,
- {parts,
- 2}]))),
-?line <<"aaaa:::">> = iolist_to_binary(join(re:split("aaaabcd","[^az]",[caseless]))),
-?line <<"aaAa">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless,
- trim]))),
-?line <<"aaAa:cd">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless,
- {parts,
- 2}]))),
-?line <<"aaAa:::">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[trim]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[{parts,
- 2}]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[trim]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[{parts,
+ <<"aaAa:::">> = iolist_to_binary(join(re:split("aaAabcd","[^az]",[caseless]))),
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[trim]))),
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[{parts,
2}]))),
-?line <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[]))),
-?line <<"1:.23">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[{parts,
- 2}]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[]))),
-?line <<"1:.875">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
-?line <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[{parts,
- 2}]))),
-?line <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[]))),
-?line <<"1:.23">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[{parts,
- 2}]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[]))),
-?line <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
-?line <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
- 2}]))),
-?line <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
-?line <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
-?line <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
- 2}]))),
-?line <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
- 2}]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","a(?)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a(?)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a(?)b",[]))),
-?line <<"Food is on the :foo:table">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless,
- trim]))),
-?line <<"Food is on the :foo:table:">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless,
- {parts,
- 2}]))),
-?line <<"Food is on the :foo:table:">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless]))),
-?line <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[trim]))),
-?line <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[{parts,
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,6}?LL",[]))),
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[trim]))),
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[{parts,
+ 2}]))),
+ <<"xxxxxxxxxxx:xxxxxxxxx">> = iolist_to_binary(join(re:split("xxxxxxxxxxxPSTAIREISLLxxxxxxxxx","P[^*]TAIRE[^*]{1,}?LL",[]))),
+ <<"1:.23">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[{parts,
+ 2}]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d[1-9]?)\\d+",[]))),
+ <<"1:.875">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
+ <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[{parts,
+ 2}]))),
+ <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d[1-9]?)\\d+",[]))),
+ <<"1:.23">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[trim]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[{parts,
+ 2}]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d[1-9]?)\\d+",[]))),
+ <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
+ <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
+ 2}]))),
+ <<"1:.23::0003938">> = iolist_to_binary(join(re:split("1.230003938","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
+ <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
+ <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
+ 2}]))),
+ <<"1:.875:5:000282">> = iolist_to_binary(join(re:split("1.875000282","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[trim]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[{parts,
+ 2}]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(\\.\\d\\d((?=0)|\\d(?=\\d)))",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","a(?)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a(?)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a(?)b",[]))),
+ <<"Food is on the :foo:table">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless,
+ trim]))),
+ <<"Food is on the :foo:table:">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless,
+ {parts,
+ 2}]))),
+ <<"Food is on the :foo:table:">> = iolist_to_binary(join(re:split("Food is on the foo table","\\b(foo)\\s+(\\w+)",[caseless]))),
+ <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[trim]))),
+ <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[{parts,
+ 2}]))),
+ <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[]))),
+ <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[trim]))),
+ <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[{parts,
2}]))),
-?line <<"The :d is under the bar in the :n.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*)bar",[]))),
-?line <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[trim]))),
-?line <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[{parts,
- 2}]))),
-?line <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[]))),
-?line <<":I have 2 numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[trim]))),
-?line <<":I have 2 numbers: 53147::">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[{parts,
+ <<"The :d is under the : in the barn.">> = iolist_to_binary(join(re:split("The food is under the bar in the barn.","foo(.*?)bar",[]))),
+ <<":I have 2 numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[trim]))),
+ <<":I have 2 numbers: 53147::">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[{parts,
+ 2}]))),
+ <<":I have 2 numbers: 53147::">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[]))),
+ <<":I have 2 numbers: 5314:7">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[trim]))),
+ <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[{parts,
+ 2}]))),
+ <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[]))),
+ <<":I::: :::h:::a:::v:::e::: :2:: :::n:::u:::m:::b:::e:::r:::s::::::: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[trim]))),
+ <<":I:: have 2 numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[{parts,
2}]))),
-?line <<":I have 2 numbers: 53147::">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d*)",[]))),
-?line <<":I have 2 numbers: 5314:7">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[trim]))),
-?line <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[{parts,
+ <<":I::: :::h:::a:::v:::e::: :2:: :::n:::u:::m:::b:::e:::r:::s::::::: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[]))),
+ <<":I have :2:: numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[trim]))),
+ <<":I have :2: numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[{parts,
2}]))),
-?line <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)",[]))),
-?line <<":I::: :::h:::a:::v:::e::: :2:: :::n:::u:::m:::b:::e:::r:::s::::::: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[trim]))),
-?line <<":I:: have 2 numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[{parts,
- 2}]))),
-?line <<":I::: :::h:::a:::v:::e::: :2:: :::n:::u:::m:::b:::e:::r:::s::::::: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d*)",[]))),
-?line <<":I have :2:: numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[trim]))),
-?line <<":I have :2: numbers: 53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[{parts,
- 2}]))),
-?line <<":I have :2:: numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[]))),
-?line <<":I have 2 numbers: 5314:7">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[trim]))),
-?line <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[{parts,
+ <<":I have :2:: numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)",[]))),
+ <<":I have 2 numbers: 5314:7">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[trim]))),
+ <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[{parts,
+ 2}]))),
+ <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[]))),
+ <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[trim]))),
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[{parts,
2}]))),
-?line <<":I have 2 numbers: 5314:7:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)(\\d+)$",[]))),
-?line <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[trim]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[{parts,
- 2}]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[]))),
-?line <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[trim]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[{parts,
- 2}]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[]))),
-?line <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[trim]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[{parts,
- 2}]))),
-?line <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[]))),
-?line <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[trim]))),
-?line <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[{parts,
- 2}]))),
-?line <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[]))),
-?line <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[trim]))),
-?line <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[{parts,
- 2}]))),
-?line <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[]))),
-?line <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[trim]))),
-?line <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[{parts,
- 2}]))),
-?line <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[]))),
-?line <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[trim]))),
-?line <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[{parts,
- 2}]))),
-?line <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[]))),
-?line <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[trim]))),
-?line <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[{parts,
- 2}]))),
-?line <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[]))),
-?line <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[trim]))),
-?line <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[{parts,
- 2}]))),
-?line <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[]))),
-?line <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[trim]))),
-?line <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[{parts,
- 2}]))),
-?line <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[]))),
-?line <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[trim]))),
-?line <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[{parts,
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*?)(\\d+)$",[]))),
+ <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[trim]))),
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[{parts,
+ 2}]))),
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*)\\b(\\d+)$",[]))),
+ <<":I have 2 numbers: :53147">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[trim]))),
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[{parts,
+ 2}]))),
+ <<":I have 2 numbers: :53147:">> = iolist_to_binary(join(re:split("I have 2 numbers: 53147","(.*\\D)(\\d+)$",[]))),
+ ok.
+run8() ->
+ <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[trim]))),
+ <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[{parts,
+ 2}]))),
+ <<":C123">> = iolist_to_binary(join(re:split("ABC123","^\\D*(?!123)",[]))),
+ <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<":ABC:445">> = iolist_to_binary(join(re:split("ABC445","^(\\D*)(?=\\d)(?!123)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\D*)(?=\\d)(?!123)",[]))),
+ <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[trim]))),
+ <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[{parts,
+ 2}]))),
+ <<"ABC123">> = iolist_to_binary(join(re:split("ABC123","^(\\D*)(?=\\d)(?!123)",[]))),
+ <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[trim]))),
+ <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[{parts,
2}]))),
-?line <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[]))),
-?line <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[trim]))),
-?line <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[{parts,
+ <<":789">> = iolist_to_binary(join(re:split("W46]789","^[W-]46]",[]))),
+ <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[trim]))),
+ <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[{parts,
2}]))),
-?line <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[]))),
-?line <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[trim]))),
-?line <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[]))),
-?line <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[trim]))),
-?line <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[{parts,
+ <<":789">> = iolist_to_binary(join(re:split("-46]789","^[W-]46]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-]46]",[]))),
+ <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[trim]))),
+ <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[{parts,
+ 2}]))),
+ <<"Wall">> = iolist_to_binary(join(re:split("Wall","^[W-]46]",[]))),
+ <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[trim]))),
+ <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[{parts,
+ 2}]))),
+ <<"Zebra">> = iolist_to_binary(join(re:split("Zebra","^[W-]46]",[]))),
+ <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[trim]))),
+ <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[{parts,
+ 2}]))),
+ <<"42">> = iolist_to_binary(join(re:split("42","^[W-]46]",[]))),
+ <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[trim]))),
+ <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[{parts,
+ 2}]))),
+ <<"[abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-]46]",[]))),
+ <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[trim]))),
+ <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[{parts,
+ 2}]))),
+ <<"]abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-]46]",[]))),
+ <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[trim]))),
+ <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<":46]789">> = iolist_to_binary(join(re:split("W46]789","^[W-\\]46]",[]))),
+ <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[trim]))),
+ <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[]))),
+ <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[trim]))),
+ <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[{parts,
2}]))),
-?line <<":all">> = iolist_to_binary(join(re:split("Wall","^[W-\\]46]",[]))),
-?line <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[trim]))),
-?line <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[{parts,
+ <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[]))),
+ <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[trim]))),
+ <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[]))),
+ <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[trim]))),
+ <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[]))),
+ <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[trim]))),
+ <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[{parts,
2}]))),
-?line <<":ebra">> = iolist_to_binary(join(re:split("Zebra","^[W-\\]46]",[]))),
-?line <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[trim]))),
-?line <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":ylophone">> = iolist_to_binary(join(re:split("Xylophone","^[W-\\]46]",[]))),
-?line <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[trim]))),
-?line <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":2">> = iolist_to_binary(join(re:split("42","^[W-\\]46]",[]))),
-?line <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[trim]))),
-?line <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[]))),
-?line <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[trim]))),
-?line <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[]))),
-?line <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[trim]))),
-?line <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[{parts,
+ <<":abcd]">> = iolist_to_binary(join(re:split("[abcd]","^[W-\\]46]",[]))),
+ <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[trim]))),
+ <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<":abcd[">> = iolist_to_binary(join(re:split("]abcd[","^[W-\\]46]",[]))),
+ <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[trim]))),
+ <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[]))),
-?line <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[trim]))),
-?line <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[]))),
-?line <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[trim]))),
-?line <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[{parts,
- 2}]))),
-?line <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[trim]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[{parts,
- 2}]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[trim]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[{parts,
- 2}]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[trim]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[{parts,
- 2}]))),
-?line <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[trim]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[{parts,
- 2}]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[{parts,
- 2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[{parts,
- 2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[{parts,
+ <<":backslash">> = iolist_to_binary(join(re:split("\\backslash","^[W-\\]46]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[W-\\]46]",[]))),
+ <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[trim]))),
+ <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<"-46]789">> = iolist_to_binary(join(re:split("-46]789","^[W-\\]46]",[]))),
+ <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[trim]))),
+ <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[{parts,
+ 2}]))),
+ <<"well">> = iolist_to_binary(join(re:split("well","^[W-\\]46]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[trim]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[{parts,
+ 2}]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?:[a-zA-Z0-9]+ ){0,10}otherword",[]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[trim]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[{parts,
+ 2}]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?:[a-zA-Z0-9]+ ){0,300}otherword",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[{parts,
2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[{parts,
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,0}",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[{parts,
2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[{parts,
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(a){0,0}",[]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[{parts,
2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[{parts,
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^(a){0,0}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[trim]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[{parts,
- 2}]))),
-?line <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[{parts,
- 2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[{parts,
- 2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[{parts,
- 2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[{parts,
- 2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[trim]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[{parts,
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,1}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[{parts,
2}]))),
-?line <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[trim]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[{parts,
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,1}",[]))),
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[trim]))),
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[{parts,
2}]))),
-?line <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[{parts,
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){0,1}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[{parts,
2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[{parts,
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,2}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[]))),
-?line <<"borfle
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,2}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,2}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,3}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,3}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,3}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,3}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){0,}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){0,}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){0,}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){0,}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){0,}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,1}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,1}",[]))),
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[trim]))),
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[{parts,
+ 2}]))),
+ <<":a:ab">> = iolist_to_binary(join(re:split("aab","^(a){1,1}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,2}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,2}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,2}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,3}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,3}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,3}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,3}",[]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[trim]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[{parts,
+ 2}]))),
+ <<"bcd">> = iolist_to_binary(join(re:split("bcd","^(a){1,}",[]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[trim]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[{parts,
+ 2}]))),
+ <<":a:bc">> = iolist_to_binary(join(re:split("abc","^(a){1,}",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[{parts,
+ 2}]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("aab","^(a){1,}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaa","^(a){1,}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a){1,}",[]))),
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[trim]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[{parts,2}]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".{0,}\\.gif",[trim]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".{0,}\\.gif",[{parts,2}]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".{0,}\\.gif",[]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline,trim]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline,{parts,2}]))),
-?line <<"borfle
+ <<"borfle
:
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline]))),
-?line <<":
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[dotall,trim]))),
-?line <<":
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[dotall,{parts,2}]))),
-?line <<":
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[dotall]))),
-?line <<":
+ ok.
+run9() ->
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline,dotall,trim]))),
-?line <<":
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline,dotall,{parts,2}]))),
-?line <<":
+ <<":
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*\\.gif",[multiline,dotall]))),
-?line <<"borfle
+ <<"borfle
bib.gif
">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[trim]))),
-?line <<"borfle
+ <<"borfle
bib.gif
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[{parts,2}]))),
-?line <<"borfle
+ <<"borfle
bib.gif
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[]))),
-?line <<":
+ <<":
:
">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,trim]))),
-?line <<":
+ <<":
bib.gif
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,{parts,2}]))),
-?line <<":
+ <<":
:
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("borfle
+ <<"">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("borfle
+ <<"">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall]))),
-?line <<"borfle
+ <<"borfle
bib.gif
">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[trim]))),
-?line <<"borfle
+ <<"borfle
bib.gif
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[{parts,2}]))),
-?line <<"borfle
+ <<"borfle
bib.gif
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[]))),
-?line <<":
+ <<":
:
">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,trim]))),
-?line <<":
+ <<":
bib.gif
no">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,{parts,2}]))),
-?line <<":
+ <<":
:
:">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("borfle
+ <<"">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("borfle
+ <<"">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("borfle
+ <<":">> = iolist_to_binary(join(re:split("borfle
bib.gif
no",".*$",[multiline,dotall]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[trim]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[{parts,2}]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[trim]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[{parts,
- 2}]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[]))),
-?line <<"abcde
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[trim]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[{parts,
+ 2}]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[]))),
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[trim]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[{parts,2}]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline,trim]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline,{parts,2}]))),
-?line <<"abcde
+ <<"abcde
:1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
- trim]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
- {parts,
- 2}]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline]))),
-?line <<"abcde
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
+ trim]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
+ {parts,
+ 2}]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline]))),
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline,trim]))),
-?line <<"abcde
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline,{parts,2}]))),
-?line <<"abcde
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[dotall,trim]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[dotall,{parts,2}]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[dotall]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall,
- trim]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall,
- {parts,
- 2}]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall]))),
-?line <<"abcde
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall,
+ trim]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall,
+ {parts,
+ 2}]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[dotall]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(.*X|^B)",[dotall]))),
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[dotall,trim]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[dotall,{parts,2}]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[dotall]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline,dotall,trim]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline,dotall,{parts,2}]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(.*X|^B)",[multiline,dotall]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
+ dotall,
+ trim]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
dotall,
- trim]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
- dotall,
- {parts,
- 2}]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
- dotall]))),
-?line <<"abcde
+ {parts,
+ 2}]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(.*X|^B)",[multiline,
+ dotall]))),
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline,dotall,trim]))),
-?line <<"abcde
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline,dotall,{parts,2}]))),
-?line <<"abcde
+ <<"abcde
:B:ar">> = iolist_to_binary(join(re:split("abcde
Bar","(.*X|^B)",[multiline,dotall]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s)(.*X|^B)",[trim]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s)(.*X|^B)",[{parts,2}]))),
-?line <<":abcde
+ <<":abcde
1234X:yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s)(.*X|^B)",[]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[trim]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[{parts,
- 2}]))),
-?line <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[]))),
-?line <<"abcde
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[trim]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[{parts,
+ 2}]))),
+ <<":B:arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s)(.*X|^B)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s)(.*X|^B)",[]))),
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s)(.*X|^B)",[trim]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s)(.*X|^B)",[{parts,2}]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s)(.*X|^B)",[]))),
-?line <<":yz">> = iolist_to_binary(join(re:split("abcde
+ <<":yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s:.*X|^B)",[trim]))),
-?line <<":yz">> = iolist_to_binary(join(re:split("abcde
+ <<":yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s:.*X|^B)",[{parts,2}]))),
-?line <<":yz">> = iolist_to_binary(join(re:split("abcde
+ <<":yz">> = iolist_to_binary(join(re:split("abcde
1234Xyz","(?s:.*X|^B)",[]))),
-?line <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[trim]))),
-?line <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[{parts,
- 2}]))),
-?line <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[]))),
-?line <<"abcde
+ <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[trim]))),
+ <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[{parts,
+ 2}]))),
+ <<":arFoo">> = iolist_to_binary(join(re:split("BarFoo","(?s:.*X|^B)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s:.*X|^B)",[]))),
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s:.*X|^B)",[trim]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s:.*X|^B)",[{parts,2}]))),
-?line <<"abcde
+ <<"abcde
Bar">> = iolist_to_binary(join(re:split("abcde
Bar","(?s:.*X|^B)",[]))),
-?line <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[trim]))),
-?line <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[{parts,
- 2}]))),
-?line <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[]))),
-?line <<"abc
+ <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[trim]))),
+ <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[{parts,
+ 2}]))),
+ <<"**** Failers">> = iolist_to_binary(join(re:split("**** Failers","^.*B",[]))),
+ <<"abc
B">> = iolist_to_binary(join(re:split("abc
B","^.*B",[trim]))),
-?line <<"abc
+ <<"abc
B">> = iolist_to_binary(join(re:split("abc
B","^.*B",[{parts,2}]))),
-?line <<"abc
+ <<"abc
B">> = iolist_to_binary(join(re:split("abc
B","^.*B",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc
+ <<"">> = iolist_to_binary(join(re:split("abc
B","(?s)^.*B",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc
+ <<":">> = iolist_to_binary(join(re:split("abc
B","(?s)^.*B",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc
+ <<":">> = iolist_to_binary(join(re:split("abc
B","(?s)^.*B",[]))),
-?line <<"abc
+ <<"abc
">> = iolist_to_binary(join(re:split("abc
B","(?m)^.*B",[trim]))),
-?line <<"abc
+ <<"abc
:">> = iolist_to_binary(join(re:split("abc
B","(?m)^.*B",[{parts,2}]))),
-?line <<"abc
+ <<"abc
:">> = iolist_to_binary(join(re:split("abc
B","(?m)^.*B",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc
+ <<"">> = iolist_to_binary(join(re:split("abc
B","(?ms)^.*B",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc
+ <<":">> = iolist_to_binary(join(re:split("abc
B","(?ms)^.*B",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc
+ <<":">> = iolist_to_binary(join(re:split("abc
B","(?ms)^.*B",[]))),
-?line <<"abc
+ <<"abc
">> = iolist_to_binary(join(re:split("abc
B","(?ms)^B",[trim]))),
-?line <<"abc
+ <<"abc
:">> = iolist_to_binary(join(re:split("abc
B","(?ms)^B",[{parts,2}]))),
-?line <<"abc
+ <<"abc
:">> = iolist_to_binary(join(re:split("abc
B","(?ms)^B",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("B","(?s)B$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("B","(?s)B$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("B","(?s)B$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[trim]))),
-?line <<":c:">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[{parts,
- 2}]))),
-?line <<":c:">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
-?line <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
-?line <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
- 2}]))),
-?line <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[{parts,
+ ok.
+run10() ->
+ <<"">> = iolist_to_binary(join(re:split("B","(?s)B$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("B","(?s)B$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("B","(?s)B$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("123456654321","^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[]))),
-?line <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[trim]))),
-?line <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[{parts,
- 2}]))),
-?line <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[abc]{12}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcabcabcabc","^[a-c]{12}",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[trim]))),
+ <<":c:">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[trim]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[{parts,
- 2}]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[{parts,
+ <<":c:">> = iolist_to_binary(join(re:split("abcabcabcabc","^(a|b|c){12}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("n","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
+ <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[trim]))),
+ <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[{parts,
+ 2}]))),
+ <<"z">> = iolist_to_binary(join(re:split("z","^[abcdefghijklmnopqrstuvwxy0123456789]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","abcde{0,0}",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abcde{0,0}",[]))),
+ <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[trim]))),
+ <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[{parts,
+ 2}]))),
+ <<"abce">> = iolist_to_binary(join(re:split("abce","abcde{0,0}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abe","ab[cd]{0,0}e",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[trim]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[{parts,
- 2}]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a(b*)",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","a(b*)",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","a(b*)",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("ab","a(b*)",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","a(b*)",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","a(b*)",[]))),
-?line <<":bbbb">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[trim]))),
-?line <<":bbbb:">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[{parts,
- 2}]))),
-?line <<":bbbb:">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[]))),
-?line <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[trim]))),
-?line <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab[cd]{0,0}e",[]))),
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[trim]))),
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[{parts,
2}]))),
-?line <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[]))),
-?line <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[trim]))),
-?line <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[{parts,
- 2}]))),
-?line <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[]))),
-?line <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[trim]))),
-?line <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[{parts,
- 2}]))),
-?line <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[]))),
-?line <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[trim]))),
-?line <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[{parts,
- 2}]))),
-?line <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[]))),
-?line <<": brown fox">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[trim]))),
-?line <<": brown fox:">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[{parts,
- 2}]))),
-?line <<": brown fox:">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[]))),
-?line <<"a:b:c">> = iolist_to_binary(join(re:split("abc","",[trim]))),
-?line <<"a:bc">> = iolist_to_binary(join(re:split("abc","",[{parts,
- 2}]))),
-?line <<"a:b:c:">> = iolist_to_binary(join(re:split("abc","",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("acb","a[^a]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[{parts,
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","ab[cd]{0,0}e",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("abd","ab(c){0,0}d",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab(c){0,0}d",[]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[trim]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[{parts,
+ 2}]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcd","ab(c){0,0}d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a(b*)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","a(b*)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","a(b*)",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("ab","a(b*)",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","a(b*)",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","a(b*)",[]))),
+ <<":bbbb">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[trim]))),
+ <<":bbbb:">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[{parts,
+ 2}]))),
+ <<":bbbb:">> = iolist_to_binary(join(re:split("abbbb","a(b*)",[]))),
+ <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[trim]))),
+ <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[{parts,
+ 2}]))),
+ <<"*** F::ilers">> = iolist_to_binary(join(re:split("*** Failers","a(b*)",[]))),
+ <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[trim]))),
+ <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a
+ <<"bbbbb">> = iolist_to_binary(join(re:split("bbbbb","a(b*)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abe","ab\\d{0}e",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab\\d{0}e",[]))),
+ <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[trim]))),
+ <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[{parts,
+ 2}]))),
+ <<"ab1e">> = iolist_to_binary(join(re:split("ab1e","ab\\d{0}e",[]))),
+ <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[trim]))),
+ <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[{parts,
+ 2}]))),
+ <<"the :quick: brown fox">> = iolist_to_binary(join(re:split("the \"quick\" brown fox","\"([^\\\\\"]+|\\\\.)*\"",[]))),
+ <<": brown fox">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[trim]))),
+ <<": brown fox:">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[{parts,
+ 2}]))),
+ <<": brown fox:">> = iolist_to_binary(join(re:split("\"the \\\"quick\\\" brown fox\"","\"([^\\\\\"]+|\\\\.)*\"",[]))),
+ <<"a:b:c">> = iolist_to_binary(join(re:split("abc","",[trim]))),
+ <<"a:bc">> = iolist_to_binary(join(re:split("abc","",[{parts,
+ 2}]))),
+ <<"a:b:c:">> = iolist_to_binary(join(re:split("abc","",[]))),
+ <<"">> = iolist_to_binary(join(re:split("acb","a[^a]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("acb","a.b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a.b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a.b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[]))),
-?line <<"a
+ <<"">> = iolist_to_binary(join(re:split("acb","a.b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a.b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a.b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.b",[]))),
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a.b",[trim]))),
-?line <<"a
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a.b",[{parts,2}]))),
-?line <<"a
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a.b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("a
+ <<"">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a[^a]b",[dotall]))),
+ <<"">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a[^a]b",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("acb","a.b",[dotall,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a.b",[dotall,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("acb","a.b",[dotall]))),
-?line <<"">> = iolist_to_binary(join(re:split("a
+ <<"">> = iolist_to_binary(join(re:split("acb","a.b",[dotall,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a.b",[dotall,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("acb","a.b",[dotall]))),
+ <<"">> = iolist_to_binary(join(re:split("a
b","a.b",[dotall,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a.b",[dotall,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a
+ <<":">> = iolist_to_binary(join(re:split("a
b","a.b",[dotall]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[{parts,
+ ok.
+run11() ->
+ <<":a">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+?|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bac","^(b+|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbac","^(b+|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbac","^(b+|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbac","^(b+|a){1,2}?c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[]))),
-?line <<"x
+ <<":a:">> = iolist_to_binary(join(re:split("bbbbbac","^(b+|a){1,2}?c",[]))),
+ <<"x
b">> = iolist_to_binary(join(re:split("x
b","(?!\\A)x",[multiline,trim]))),
-?line <<"x
+ <<"x
b">> = iolist_to_binary(join(re:split("x
b","(?!\\A)x",[multiline,{parts,2}]))),
-?line <<"x
+ <<"x
b">> = iolist_to_binary(join(re:split("x
b","(?!\\A)x",[multiline]))),
-?line <<"a">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline,
- trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline,
- {parts,
- 2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline]))),
-?line <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[trim]))),
-?line <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[{parts,
- 2}]))),
-?line <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[{parts,
+ <<"a">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline,
+ trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline,
+ {parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[{parts,
+ <<"a:">> = iolist_to_binary(join(re:split("ax","(?!\\A)x",[multiline]))),
+ <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[trim]))),
+ <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[{parts,
+ 2}]))),
+ <<"{ab}">> = iolist_to_binary(join(re:split("{ab}","\\x0{ab}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[]))),
-?line <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[trim]))),
-?line <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[{parts,
- 2}]))),
-?line <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[]))),
-?line <<":AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[trim]))),
-?line <<":AB:">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*?CD",[]))),
+ <<"">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("CD","(A|B)*CD",[]))),
+ <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[trim]))),
+ <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[{parts,
2}]))),
-?line <<":AB:">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[]))),
-?line <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[trim]))),
-?line <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[{parts,
+ <<":AB:AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*?\\1",[]))),
+ <<":AB">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[trim]))),
+ <<":AB:">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[{parts,
+ 2}]))),
+ <<":AB:">> = iolist_to_binary(join(re:split("ABABAB","(AB)*\\1",[]))),
+ <<"">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("foo","(?<!bar)foo",[]))),
+ <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[trim]))),
+ <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[]))),
+ <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[trim]))),
+ <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[{parts,
2}]))),
-?line <<"cat:d">> = iolist_to_binary(join(re:split("catfood","(?<!bar)foo",[]))),
-?line <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[trim]))),
-?line <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[{parts,
+ <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[]))),
+ <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[trim]))),
+ <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[trim]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[]))),
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[trim]))),
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[{parts,
2}]))),
-?line <<"ar:tle">> = iolist_to_binary(join(re:split("arfootle","(?<!bar)foo",[]))),
-?line <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[trim]))),
-?line <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"r:sh">> = iolist_to_binary(join(re:split("rfoosh","(?<!bar)foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<!bar)foo",[]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[trim]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<!bar)foo",[]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[trim]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[{parts,
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[]))),
+ <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[trim]))),
+ <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[{parts,
+ 2}]))),
+ <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[]))),
+ <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[trim]))),
+ <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[trim]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[]))),
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[trim]))),
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[{parts,
+ 2}]))),
+ <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[]))),
+ <<"fooa:foo">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[trim]))),
+ <<"fooa:foo:">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[{parts,
2}]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","(?<!bar)foo",[]))),
-?line <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[trim]))),
-?line <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[{parts,
- 2}]))),
-?line <<":d">> = iolist_to_binary(join(re:split("catfood","\\w{3}(?<!bar)foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\w{3}(?<!bar)foo",[]))),
-?line <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[trim]))),
-?line <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[{parts,
+ <<"fooa:foo:">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[trim]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[{parts,
+ 2}]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[]))),
+ <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[trim]))),
+ <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[{parts,
+ 2}]))),
+ <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline,
+ {parts,
2}]))),
-?line <<"foo">> = iolist_to_binary(join(re:split("foo","\\w{3}(?<!bar)foo",[]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[trim]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","\\w{3}(?<!bar)foo",[]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[trim]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[{parts,
- 2}]))),
-?line <<"towbarfoo">> = iolist_to_binary(join(re:split("towbarfoo","\\w{3}(?<!bar)foo",[]))),
-?line <<"fooa:foo">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[trim]))),
-?line <<"fooa:foo:">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[{parts,
- 2}]))),
-?line <<"fooa:foo:">> = iolist_to_binary(join(re:split("fooabar","(?<=(foo)a)bar",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo)a)bar",[]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[trim]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[{parts,
- 2}]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=(foo)a)bar",[]))),
-?line <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[trim]))),
-?line <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[{parts,
- 2}]))),
-?line <<"foobbar">> = iolist_to_binary(join(re:split("foobbar","(?<=(foo)a)bar",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline]))),
-?line <<"qqq
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc\\z",[multiline]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc\\z",[multiline]))),
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\z",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\z",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc">> = iolist_to_binary(join(re:split("qqq
abc","\\Aabc\\z",[multiline]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\z",[multiline,trim]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\z",[multiline,{parts,2}]))),
-?line <<"abc
+ <<"abc
zzz">> = iolist_to_binary(join(re:split("abc
zzz","\\Aabc\\z",[multiline]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\z",[multiline,trim]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\z",[multiline,{parts,2}]))),
-?line <<"qqq
+ <<"qqq
abc
zzz">> = iolist_to_binary(join(re:split("qqq
abc
zzz","\\Aabc\\z",[multiline]))),
-?line <<"1:.23">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
- 2}]))),
-?line <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
-?line <<"1:.875">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
-?line <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
- 2}]))),
-?line <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
- 2}]))),
-?line <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
-?line <<":party">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[trim]))),
-?line <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[{parts,
- 2}]))),
-?line <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[]))),
-?line <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[trim]))),
-?line <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[{parts,
- 2}]))),
-?line <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[]))),
-?line <<":12345:a">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[trim]))),
-?line <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[{parts,
- 2}]))),
-?line <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[]))),
-?line <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[trim]))),
-?line <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[{parts,
- 2}]))),
-?line <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[]))),
-?line <<":12345:a">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[trim]))),
-?line <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[{parts,
- 2}]))),
-?line <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[]))),
-?line <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[trim]))),
-?line <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[{parts,
- 2}]))),
-?line <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[]))),
-?line <<":aaab">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[trim]))),
-?line <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[{parts,
- 2}]))),
-?line <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[]))),
-?line <<":aaa">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[trim]))),
-?line <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[{parts,
- 2}]))),
-?line <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[]))),
-?line <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[trim]))),
-?line <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[{parts,
- 2}]))),
-?line <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[]))),
-?line <<"::::d">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[trim]))),
-?line <<":cccd">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[{parts,
+ <<"1:.23">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
+ 2}]))),
+ <<"1:.23:">> = iolist_to_binary(join(re:split("1.230003938","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
+ <<"1:.875">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
+ <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
+ 2}]))),
+ <<"1:.875:">> = iolist_to_binary(join(re:split("1.875000282","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[trim]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[{parts,
+ 2}]))),
+ <<"1.235">> = iolist_to_binary(join(re:split("1.235","(?>(\\.\\d\\d[1-9]?))\\d+",[]))),
+ <<":party">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[trim]))),
+ <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[{parts,
+ 2}]))),
+ <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^((?>\\w+)|(?>\\s+))*$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((?>\\w+)|(?>\\s+))*$",[]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[trim]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[{parts,
+ 2}]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^((?>\\w+)|(?>\\s+))*$",[]))),
+ <<":12345:a">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[trim]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[{parts,
+ 2}]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d+)(\\w)",[]))),
+ <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[trim]))),
+ <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[{parts,
+ 2}]))),
+ <<":1234:5:+">> = iolist_to_binary(join(re:split("12345+","(\\d+)(\\w)",[]))),
+ <<":12345:a">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[trim]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[{parts,
+ 2}]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","((?>\\d+))(\\w)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[{parts,
2}]))),
-?line <<"::::d">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[]))),
-?line <<"((:x">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[trim]))),
-?line <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[{parts,
- 2}]))),
-?line <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
-?line <<":xyz">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
-?line <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
- 2}]))),
-?line <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
-?line <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
-?line <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
- 2}]))),
-?line <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless,
- trim]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless,
- {parts,
- 2}]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless,
- trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless,
- {parts,
- 2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless]))),
-?line <<":a bc">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[trim]))),
-?line <<":a bc:">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?>\\d+))(\\w)",[]))),
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[trim]))),
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[{parts,
2}]))),
-?line <<":a bc:">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[]))),
-?line <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[trim]))),
-?line <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[{parts,
- 2}]))),
-?line <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[]))),
-?line <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[trim]))),
-?line <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[{parts,
- 2}]))),
-?line <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[]))),
-?line <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[trim]))),
-?line <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[{parts,
- 2}]))),
-?line <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[]))),
-?line <<":a bcde f">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[trim]))),
-?line <<":a bcde f:">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[{parts,
- 2}]))),
-?line <<":a bcde f:">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[]))),
-?line <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[trim]))),
-?line <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[{parts,
- 2}]))),
-?line <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[]))),
-?line <<":ab">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[trim]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[{parts,
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","((?>\\d+))(\\w)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[]))),
+ <<":aaab">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[trim]))),
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[{parts,
2}]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[]))),
-?line <<":aB">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[trim]))),
-?line <<":aB:">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[{parts,
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[]))),
+ ok.
+run12() ->
+ <<":aaa">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[trim]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[{parts,
2}]))),
-?line <<":aB:">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[{parts,
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[]))),
+ <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[trim]))),
+ <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[{parts,
+ 2}]))),
+ <<"aaa:ccc">> = iolist_to_binary(join(re:split("aaabbbccc","(?>b)+",[]))),
+ <<"::::d">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[trim]))),
+ <<":cccd">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[{parts,
+ 2}]))),
+ <<"::::d">> = iolist_to_binary(join(re:split("aaabbbbccccd","(?>a+|b+|c+)*c",[]))),
+ <<"((:x">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[trim]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[{parts,
+ 2}]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[trim]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(((?>[^()]+)|\\([^()]+\\))+\\)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a(?-i)b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("Ab","a(?-i)b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?-i)b",[caseless]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless,
+ trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","a(?-i)b",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless,
+ trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","a(?-i)b",[caseless]))),
+ <<":a bc">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[trim]))),
+ <<":a bc:">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[trim]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[trim]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[trim]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[]))),
-?line <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[trim]))),
-?line <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[trim]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[]))),
-?line <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[trim]))),
-?line <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[{parts,
- 2}]))),
-?line <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[{parts,
+ <<":a bc:">> = iolist_to_binary(join(re:split("a bcd e","(a (?x)b c)d e",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a (?x)b c)d e",[]))),
+ <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[trim]))),
+ <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[{parts,
+ 2}]))),
+ <<"a b cd e">> = iolist_to_binary(join(re:split("a b cd e","(a (?x)b c)d e",[]))),
+ <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[trim]))),
+ <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[{parts,
+ 2}]))),
+ <<"abcd e">> = iolist_to_binary(join(re:split("abcd e","(a (?x)b c)d e",[]))),
+ <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[trim]))),
+ <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[{parts,
+ 2}]))),
+ <<"a bcde">> = iolist_to_binary(join(re:split("a bcde","(a (?x)b c)d e",[]))),
+ <<":a bcde f">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[trim]))),
+ <<":a bcde f:">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[{parts,
+ 2}]))),
+ <<":a bcde f:">> = iolist_to_binary(join(re:split("a bcde f","(a b(?x)c d (?-x)e f)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a b(?x)c d (?-x)e f)",[]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[trim]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[{parts,
+ 2}]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","(a b(?x)c d (?-x)e f)",[]))),
+ <<":ab">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[{parts,
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(?i)b)c",[]))),
+ <<":aB">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[trim]))),
+ <<":aB:">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[{parts,
+ <<":aB:">> = iolist_to_binary(join(re:split("aBc","(a(?i)b)c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[trim]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)b)c",[]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[trim]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[{parts,
+ 2}]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(a(?i)b)c",[]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[trim]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[{parts,
+ 2}]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(a(?i)b)c",[]))),
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[trim]))),
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[{parts,
2}]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[trim]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[{parts,
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(a(?i)b)c",[]))),
+ <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[trim]))),
+ <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[{parts,
2}]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[trim]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[{parts,
+ <<"ABc">> = iolist_to_binary(join(re:split("ABc","(a(?i)b)c",[]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[trim]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[{parts,
+ 2}]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(a(?i)b)c",[]))),
+ <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[trim]))),
+ <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[{parts,
+ 2}]))),
+ <<"AbC">> = iolist_to_binary(join(re:split("AbC","(a(?i)b)c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","a(?i:b)c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)c",[]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[trim]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[{parts,
+ 2}]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a(?i:b)c",[]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[trim]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[{parts,
+ 2}]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","a(?i:b)c",[]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[trim]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[{parts,
+ 2}]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[{parts,
2}]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","a(?i:b)*c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[trim]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aBBc","a(?i:b)*c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?i:b)*c",[]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[trim]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[{parts,
+ 2}]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[]))),
+ <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[trim]))),
+ <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[{parts,
2}]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","a(?i:b)*c",[]))),
-?line <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[trim]))),
-?line <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[{parts,
- 2}]))),
-?line <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[]))),
-?line <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[trim]))),
-?line <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[{parts,
- 2}]))),
-?line <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[]))),
-?line <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[trim]))),
-?line <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[{parts,
- 2}]))),
-?line <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("more
+ <<"aBBC">> = iolist_to_binary(join(re:split("aBBC","a(?i:b)*c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","a(?=b(?i)c)\\w\\wd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abCd","a(?=b(?i)c)\\w\\wd",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?=b(?i)c)\\w\\wd",[]))),
+ <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[trim]))),
+ <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[{parts,
+ 2}]))),
+ <<"aBCd">> = iolist_to_binary(join(re:split("aBCd","a(?=b(?i)c)\\w\\wd",[]))),
+ <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[trim]))),
+ <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[{parts,
+ 2}]))),
+ <<"abcD">> = iolist_to_binary(join(re:split("abcD","a(?=b(?i)c)\\w\\wd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("more than million","(?s-i:more.*than).*million",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?s-i:more.*than).*million",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("more
than Million","(?s-i:more.*than).*million",[caseless,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more
+ <<":">> = iolist_to_binary(join(re:split("more
than Million","(?s-i:more.*than).*million",[caseless,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more
+ <<":">> = iolist_to_binary(join(re:split("more
than Million","(?s-i:more.*than).*million",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless,
- trim]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless]))),
-?line <<"more
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?s-i:more.*than).*million",[caseless]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless,
+ trim]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?s-i:more.*than).*million",[caseless]))),
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?s-i:more.*than).*million",[caseless,trim]))),
-?line <<"more
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?s-i:more.*than).*million",[caseless,{parts,2}]))),
-?line <<"more
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?s-i:more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("more
+ <<"">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("more than million","(?:(?s-i)more.*than).*million",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("more than MILLION","(?:(?s-i)more.*than).*million",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("more
than Million","(?:(?s-i)more.*than).*million",[caseless,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("more
+ <<":">> = iolist_to_binary(join(re:split("more
than Million","(?:(?s-i)more.*than).*million",[caseless,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("more
+ <<":">> = iolist_to_binary(join(re:split("more
than Million","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless,
- trim]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless,
- {parts,
- 2}]))),
-?line <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"more
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?s-i)more.*than).*million",[caseless]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless,
+ trim]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless,
+ {parts,
+ 2}]))),
+ <<"MORE THAN MILLION">> = iolist_to_binary(join(re:split("MORE THAN MILLION","(?:(?s-i)more.*than).*million",[caseless]))),
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?:(?s-i)more.*than).*million",[caseless,trim]))),
-?line <<"more
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?:(?s-i)more.*than).*million",[caseless,{parts,2}]))),
-?line <<"more
+ <<"more
than
million">> = iolist_to_binary(join(re:split("more
than
million","(?:(?s-i)more.*than).*million",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?>a(?i)b+)+c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[trim]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aBbc","(?>a(?i)b+)+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[{parts,
2}]))),
-?line <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[]))),
-?line <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[trim]))),
-?line <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[{parts,
- 2}]))),
-?line <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[]))),
-?line <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[trim]))),
-?line <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[{parts,
- 2}]))),
-?line <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[trim]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[{parts,
- 2}]))),
-?line <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[]))),
-?line <<"ab:xx">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"ab:xx:">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"ab:xx:">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<"aB:xx">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"aB:xx:">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"aB:xx:">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[trim]))),
-?line <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[{parts,
- 2}]))),
-?line <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aBBc","(?>a(?i)b+)+c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>a(?i)b+)+c",[]))),
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[trim]))),
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[{parts,
+ 2}]))),
+ <<"Abc">> = iolist_to_binary(join(re:split("Abc","(?>a(?i)b+)+c",[]))),
+ <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[trim]))),
+ <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[{parts,
+ 2}]))),
+ <<"abAb">> = iolist_to_binary(join(re:split("abAb","(?>a(?i)b+)+c",[]))),
+ <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[trim]))),
+ <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[{parts,
+ 2}]))),
+ <<"abbC">> = iolist_to_binary(join(re:split("abbC","(?>a(?i)b+)+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=a(?i)b)\\w\\wc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[trim]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aBc","(?=a(?i)b)\\w\\wc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?=a(?i)b)\\w\\wc",[]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[{parts,
+ 2}]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?=a(?i)b)\\w\\wc",[]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[{parts,
2}]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[]))),
-?line <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[trim]))),
-?line <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[{parts,
+ <<"abC">> = iolist_to_binary(join(re:split("abC","(?=a(?i)b)\\w\\wc",[]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[trim]))),
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[{parts,
2}]))),
-?line <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[trim]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[{parts,
- 2}]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
+ <<"aBC">> = iolist_to_binary(join(re:split("aBC","(?=a(?i)b)\\w\\wc",[]))),
+ <<"ab:xx">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"ab:xx:">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
+ 2}]))),
+ <<"ab:xx:">> = iolist_to_binary(join(re:split("abxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<"aB:xx">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"aB:xx:">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
+ 2}]))),
+ <<"aB:xx:">> = iolist_to_binary(join(re:split("aBxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[{parts,
2}]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
+ 2}]))),
+ <<"Abxxc">> = iolist_to_binary(join(re:split("Abxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[{parts,
+ 2}]))),
+ <<"ABxxc">> = iolist_to_binary(join(re:split("ABxxc","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[trim]))),
+ <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[{parts,
+ 2}]))),
+ <<"abxxC">> = iolist_to_binary(join(re:split("abxxC","(?<=a(?i)b)(\\w\\w)c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aA","(?:(a)|b)(?(1)A|B)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("bB","(?:(a)|b)(?(1)A|B)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(a)|b)(?(1)A|B)",[]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[{parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(a)|b)(?(1)A|B)",[]))),
+ <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[trim]))),
+ <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[{parts,
+ 2}]))),
+ <<"bA">> = iolist_to_binary(join(re:split("bA","(?:(a)|b)(?(1)A|B)",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aa","^(a)?(?(1)a|b)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","^(a)?(?(1)a|b)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("bb","^(a)?(?(1)a|b)+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(a)?(?(1)a|b)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
2}]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
- 2}]))),
-?line <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[trim]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[{parts,
+ 2}]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?=abc)\\w{3}:|\\d\\d)$",[]))),
+ ok.
+run13() ->
+ <<"">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
2}]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
-?line <<"foo">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[trim]))),
-?line <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[{parts,
- 2}]))),
-?line <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc:","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ 2}]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[trim]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[{parts,
+ 2}]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","^(?(?!abc)\\d\\d|\\w{3}:)$",[]))),
+ <<"foo">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[trim]))),
+ <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[{parts,
+ 2}]))),
+ <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<=foo)bar|cat)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[]))),
+ <<"f">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[trim]))),
+ <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("cat","(?(?<=foo)bar|cat)",[]))),
-?line <<"f">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[trim]))),
-?line <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[{parts,
+ <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[]))),
+ <<"fo">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[trim]))),
+ <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[{parts,
2}]))),
-?line <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<=foo)bar|cat)",[]))),
-?line <<"fo">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[trim]))),
-?line <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[{parts,
+ <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[]))),
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[trim]))),
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[{parts,
2}]))),
-?line <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<=foo)bar|cat)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<=foo)bar|cat)",[]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[trim]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[{parts,
- 2}]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[]))),
-?line <<"foo">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[trim]))),
-?line <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[{parts,
- 2}]))),
-?line <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[{parts,
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<=foo)bar|cat)",[]))),
+ <<"foo">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[trim]))),
+ <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[{parts,
+ 2}]))),
+ <<"foo:">> = iolist_to_binary(join(re:split("foobar","(?(?<!foo)cat|bar)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[]))),
+ <<"f">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[trim]))),
+ <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("cat","(?(?<!foo)cat|bar)",[]))),
-?line <<"f">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[trim]))),
-?line <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[{parts,
+ <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[]))),
+ <<"fo">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[trim]))),
+ <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[{parts,
2}]))),
-?line <<"f:">> = iolist_to_binary(join(re:split("fcat","(?(?<!foo)cat|bar)",[]))),
-?line <<"fo">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[trim]))),
-?line <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[{parts,
+ <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[]))),
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[trim]))),
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[{parts,
2}]))),
-?line <<"fo:">> = iolist_to_binary(join(re:split("focat","(?(?<!foo)cat|bar)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?<!foo)cat|bar)",[]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[trim]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[{parts,
- 2}]))),
-?line <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- {parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
-?line <<":(">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- trim]))),
-?line <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- {parts,
- 2}]))),
-?line <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
-?line <<":::(">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- trim]))),
-?line <<"::(abcd) fox">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- {parts,
- 2}]))),
-?line <<":::(:::">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
-?line <<"(">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- trim]))),
-?line <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
- {parts,
- 2}]))),
-?line <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<"foocat">> = iolist_to_binary(join(re:split("foocat","(?(?<!foo)cat|bar)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
-?line <<":(">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
+ <<":(">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
trim]))),
-?line <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
{parts,
2}]))),
-?line <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
-?line <<":::(">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
+ <<":::(">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
trim]))),
-?line <<"::(abcd) fox">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<"::(abcd) fox">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
{parts,
2}]))),
-?line <<":::(:::">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
-?line <<"(">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<":::(:::">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
+ <<"(">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
trim]))),
-?line <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended,
{parts,
2}]))),
-?line <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
-?line <<":1:2">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[trim]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[{parts,
+ <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) |) ",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ {parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
+ <<":(">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ trim]))),
+ <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ {parts,
+ 2}]))),
+ <<":(:">> = iolist_to_binary(join(re:split("(abcd)","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
+ <<":::(">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ trim]))),
+ <<"::(abcd) fox">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ {parts,
+ 2}]))),
+ <<":::(:::">> = iolist_to_binary(join(re:split("the quick (abcd) fox","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
+ <<"(">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ trim]))),
+ <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended,
+ {parts,
+ 2}]))),
+ <<"(::">> = iolist_to_binary(join(re:split("(abcd","( \\( )? [^()]+ (?(1) \\) ) ",[extended]))),
+ <<":1:2">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[trim]))),
+ <<":1:2:">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[{parts,
+ 2}]))),
+ <<":1:2:">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[]))),
+ <<":1:2">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[trim]))),
+ <<":1:2:">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[{parts,
2}]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12","^(?(2)a|(1)(2))+$",[]))),
-?line <<":1:2">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[trim]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[{parts,
+ <<":1:2:">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[]))),
+ <<":1:2">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[trim]))),
+ <<":1:2:">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[{parts,
2}]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12a","^(?(2)a|(1)(2))+$",[]))),
-?line <<":1:2">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[trim]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[{parts,
- 2}]))),
-?line <<":1:2:">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[]))),
-?line <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[trim]))),
-?line <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[{parts,
- 2}]))),
-?line <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[]))),
-?line <<":blah">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[trim]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[]))),
-?line <<":BLAH">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[trim]))),
-?line <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[]))),
-?line <<":Blah">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[trim]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[]))),
-?line <<":blaH">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[trim]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[]))),
-?line <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[trim]))),
-?line <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[]))),
-?line <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[trim]))),
-?line <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[]))),
-?line <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[trim]))),
-?line <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[{parts,
- 2}]))),
-?line <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[]))),
-?line <<":blah">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":BLAH">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":Blah">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":blaH">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":blah">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":blah:">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":Blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":Blah:">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<":blaH">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[{parts,
- 2}]))),
-?line <<":blaH:">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","(?>a*)*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[{parts,
+ <<":1:2:">> = iolist_to_binary(join(re:split("12aa","^(?(2)a|(1)(2))+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?(2)a|(1)(2))+$",[]))),
+ <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[trim]))),
+ <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[{parts,
+ 2}]))),
+ <<"1234">> = iolist_to_binary(join(re:split("1234","^(?(2)a|(1)(2))+$",[]))),
+ <<":blah">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[trim]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+\\1",[]))),
+ <<":BLAH">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[trim]))),
+ <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+\\1",[]))),
+ <<":Blah">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[trim]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+\\1",[]))),
+ <<":blaH">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[trim]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+\\1",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)blah)\\s+\\1",[]))),
+ <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[trim]))),
+ <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<"blah BLAH">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+\\1",[]))),
+ <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[trim]))),
+ <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<"Blah blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+\\1",[]))),
+ <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[trim]))),
+ <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[{parts,
+ 2}]))),
+ <<"blaH blah">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+\\1",[]))),
+ <<":blah">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah blah","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":BLAH">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":BLAH:">> = iolist_to_binary(join(re:split("BLAH BLAH","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":Blah">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah Blah","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":blaH">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blaH","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":blah">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":blah:">> = iolist_to_binary(join(re:split("blah BLAH","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":Blah">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":Blah:">> = iolist_to_binary(join(re:split("Blah blah","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<":blaH">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[trim]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[{parts,
+ 2}]))),
+ <<":blaH:">> = iolist_to_binary(join(re:split("blaH blah","((?i)blah)\\s+(?i:\\1)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(?>a*)*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","(abc|)+",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abc","(abc|)+",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aa","(?>a*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("abc","(abc|)+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[]))),
+ <<"x::y::z">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[trim]))),
+ <<"x::yz">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[{parts,
+ 2}]))),
+ <<"x::y::z::">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","([a]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([a]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([a]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","(?>a*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","(abc|)+",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abc","(abc|)+",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abc","(abc|)+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","([ab]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([ab]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([ab]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","([ab]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","([ab]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","([ab]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcabc","(abc|)+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcabcabc","(abc|)+",[]))),
-?line <<"x::y::z">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[trim]))),
-?line <<"x::yz">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[{parts,
- 2}]))),
-?line <<"x::y::z::">> = iolist_to_binary(join(re:split("xyz","(abc|)+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","([a]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([a]*)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[]))),
+ <<"::c::d::e">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[trim]))),
+ <<"::cde">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[{parts,
+ 2}]))),
+ <<"::c::d::e::">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","([^a]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","([^a]*)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([a]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("b","([^a]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[]))),
+ <<"a::a::a">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[trim]))),
+ <<"a::aa">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[{parts,
+ 2}]))),
+ <<"a::a::a::">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[]))),
+ <<"a::b::a::b">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[trim]))),
+ <<"a::bab">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaa","([a]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","([ab]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([ab]*)*",[{parts,
+ <<"a::b::a::b::">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","([a]*?)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([a]*?)*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([a]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[trim]))),
+ <<"::aaa">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[{parts,
+ 2}]))),
+ <<"::::::::">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([ab]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","([ab]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([ab]*)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([ab]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ababab","([ab]*)*",[]))),
-?line <<"::c::d::e">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[trim]))),
-?line <<"::cde">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[{parts,
- 2}]))),
-?line <<"::c::d::e::">> = iolist_to_binary(join(re:split("aaaabcde","([ab]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[trim]))),
+ <<"::bab">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bbbb","([ab]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","([^a]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([^a]*)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([^a]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[{parts,
+ <<"::::::::">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[trim]))),
+ <<"::aba">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("bbbb","([^a]*)*",[]))),
-?line <<"a::a::a">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[trim]))),
-?line <<"a::aa">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[{parts,
- 2}]))),
-?line <<"a::a::a::">> = iolist_to_binary(join(re:split("aaa","([^a]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("cccc","([^ab]*)*",[]))),
-?line <<"a::b::a::b">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[trim]))),
-?line <<"a::bab">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[{parts,
- 2}]))),
-?line <<"a::b::a::b::">> = iolist_to_binary(join(re:split("abab","([^ab]*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","([a]*?)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([a]*?)*",[{parts,
+ <<"::::::::">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([a]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[trim]))),
-?line <<"::aaa">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[trim]))),
+ <<"::bbb">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[{parts,
2}]))),
-?line <<"::::::::">> = iolist_to_binary(join(re:split("aaaa","([a]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","([ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[{parts,
+ <<"::::::::">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[]))),
+ <<"a::a::a">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[trim]))),
+ <<"a::aa">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[{parts,
+ 2}]))),
+ <<"a::a::a::">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[trim]))),
-?line <<"::bab">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[trim]))),
+ <<"::ccc">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[{parts,
2}]))),
-?line <<"::::::::">> = iolist_to_binary(join(re:split("abab","([ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[trim]))),
-?line <<"::aba">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[{parts,
+ <<"::::::::">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[]))),
+ <<"b::a::b::a">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[trim]))),
+ <<"b::aba">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[{parts,
2}]))),
-?line <<"::::::::">> = iolist_to_binary(join(re:split("baba","([ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("b","([^a]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[trim]))),
-?line <<"::bbb">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[{parts,
+ <<"b::a::b::a::">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(?>a*)*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[]))),
+ <<":b:c:d:e">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[trim]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[{parts,
2}]))),
-?line <<"::::::::">> = iolist_to_binary(join(re:split("bbbb","([^a]*?)*",[]))),
-?line <<"a::a::a">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[trim]))),
-?line <<"a::aa">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[{parts,
- 2}]))),
-?line <<"a::a::a::">> = iolist_to_binary(join(re:split("aaa","([^a]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("c","([^ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[trim]))),
-?line <<"::ccc">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[{parts,
- 2}]))),
-?line <<"::::::::">> = iolist_to_binary(join(re:split("cccc","([^ab]*?)*",[]))),
-?line <<"b::a::b::a">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[trim]))),
-?line <<"b::aba">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[{parts,
- 2}]))),
-?line <<"b::a::b::a::">> = iolist_to_binary(join(re:split("baba","([^ab]*?)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","(?>a*)*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?>a*)*",[]))),
-?line <<":b:c:d:e">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[trim]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[{parts,
+ <<":b:c:d:e:">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[]))),
+ <<"::b::b">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[trim]))),
+ <<"::bbaa">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[{parts,
2}]))),
-?line <<":b:c:d:e:">> = iolist_to_binary(join(re:split("aaabcde","(?>a*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[{parts,
+ <<"::b::b::">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[]))),
+ ok.
+run14() ->
+ <<"a::a::a::a::a">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[trim]))),
+ <<"a::aaaa">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*))*",[]))),
-?line <<"::b::b">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[trim]))),
-?line <<"::bbaa">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[{parts,
- 2}]))),
-?line <<"::b::b::">> = iolist_to_binary(join(re:split("aabbaa","((?>a*))*",[]))),
-?line <<"a::a::a::a::a">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[trim]))),
-?line <<"a::aaaa">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[{parts,
+ <<"a::a::a::a::a::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[]))),
+ <<"a::a::b::b::a::a">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[trim]))),
+ <<"a::abbaa">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[{parts,
2}]))),
-?line <<"a::a::a::a::a::">> = iolist_to_binary(join(re:split("aaaaa","((?>a*?))*",[]))),
-?line <<"a::a::b::b::a::a">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[trim]))),
-?line <<"a::abbaa">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[{parts,
- 2}]))),
-?line <<"a::a::b::b::a::a::">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ <<"a::a::b::b::a::a::">> = iolist_to_binary(join(re:split("aabbaa","((?>a*?))*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ <<":">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
-?line <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- trim]))),
-?line <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
- {parts,
- 2}]))),
-?line <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
-?line <<"foo:foo">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[trim]))),
-?line <<"foo:foo:">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[{parts,
- 2}]))),
-?line <<"foo:foo:">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[]))),
-?line <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[trim]))),
-?line <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[{parts,
- 2}]))),
-?line <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[]))),
-?line <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[trim]))),
-?line <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[{parts,
- 2}]))),
-?line <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[trim]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[{parts,
- 2}]))),
-?line <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[]))),
-?line <<":aBC">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[trim]))),
-?line <<":aBC:">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[{parts,
- 2}]))),
-?line <<":aBC:">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[]))),
-?line <<":bb">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[trim]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("12-sep-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("12-09-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
+ <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ trim]))),
+ <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended,
+ {parts,
+ 2}]))),
+ <<"sep-12-98">> = iolist_to_binary(join(re:split("sep-12-98","(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) ",[extended]))),
+ <<"foo:foo">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[trim]))),
+ <<"foo:foo:">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[{parts,
+ 2}]))),
+ <<"foo:foo:">> = iolist_to_binary(join(re:split("foobarfoo","(?<=(foo))bar\\1",[]))),
+ <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[trim]))),
+ <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[{parts,
+ 2}]))),
+ <<"foo:foo:tling">> = iolist_to_binary(join(re:split("foobarfootling","(?<=(foo))bar\\1",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(foo))bar\\1",[]))),
+ <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[trim]))),
+ <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[{parts,
+ 2}]))),
+ <<"foobar">> = iolist_to_binary(join(re:split("foobar","(?<=(foo))bar\\1",[]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[trim]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[{parts,
+ 2}]))),
+ <<"barfoo">> = iolist_to_binary(join(re:split("barfoo","(?<=(foo))bar\\1",[]))),
+ <<"">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("saturday","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("sunday","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("Saturday","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("Sunday","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("SATURDAY","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("SUNDAY","(?i:saturday|sunday)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("SunDay","(?i:saturday|sunday)",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[{parts,
2}]))),
-?line <<":bb:">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[]))),
-?line <<":BB">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[trim]))),
-?line <<":BB:">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abcx","(a(?i)bc|BB)x",[]))),
+ <<":aBC">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[trim]))),
+ <<":aBC:">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[{parts,
2}]))),
-?line <<":BB:">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[]))),
-?line <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[trim]))),
-?line <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[{parts,
- 2}]))),
-?line <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[]))),
-?line <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[trim]))),
-?line <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[{parts,
- 2}]))),
-?line <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[]))),
-?line <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[trim]))),
-?line <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[{parts,
+ <<":aBC:">> = iolist_to_binary(join(re:split("aBCx","(a(?i)bc|BB)x",[]))),
+ <<":bb">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[trim]))),
+ <<":bb:">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[{parts,
+ 2}]))),
+ <<":bb:">> = iolist_to_binary(join(re:split("bbx","(a(?i)bc|BB)x",[]))),
+ <<":BB">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[trim]))),
+ <<":BB:">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[{parts,
+ 2}]))),
+ <<":BB:">> = iolist_to_binary(join(re:split("BBx","(a(?i)bc|BB)x",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(a(?i)bc|BB)x",[]))),
+ <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[trim]))),
+ <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[{parts,
2}]))),
-?line <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[]))),
-?line <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[trim]))),
-?line <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[{parts,
+ <<"abcX">> = iolist_to_binary(join(re:split("abcX","(a(?i)bc|BB)x",[]))),
+ <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[trim]))),
+ <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[{parts,
2}]))),
-?line <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[]))),
-?line <<":ac">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":ac:">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":ac:">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":aC">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":aC:">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":aC:">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":bD">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":bD:">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":bD:">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[]))),
-?line <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[trim]))),
-?line <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[{parts,
- 2}]))),
-?line <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[]))),
-?line <<":ab">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<":aBd">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":aBd:">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<":aBd:">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<":xy">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":xy:">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<":xy:">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<":xY">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":xY:">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ <<"aBCX">> = iolist_to_binary(join(re:split("aBCX","(a(?i)bc|BB)x",[]))),
+ <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[trim]))),
+ <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[{parts,
+ 2}]))),
+ <<"bbX">> = iolist_to_binary(join(re:split("bbX","(a(?i)bc|BB)x",[]))),
+ <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[trim]))),
+ <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[{parts,
+ 2}]))),
+ <<"BBX">> = iolist_to_binary(join(re:split("BBX","(a(?i)bc|BB)x",[]))),
+ <<":ac">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":ac:">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":ac:">> = iolist_to_binary(join(re:split("ac","^([ab](?i)[cd]|[ef])",[]))),
+ <<":aC">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":aC:">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":aC:">> = iolist_to_binary(join(re:split("aC","^([ab](?i)[cd]|[ef])",[]))),
+ <<":bD">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":bD:">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":bD:">> = iolist_to_binary(join(re:split("bD","^([ab](?i)[cd]|[ef])",[]))),
+ <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":e:lephant">> = iolist_to_binary(join(re:split("elephant","^([ab](?i)[cd]|[ef])",[]))),
+ <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":E:urope">> = iolist_to_binary(join(re:split("Europe","^([ab](?i)[cd]|[ef])",[]))),
+ <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":f:rog">> = iolist_to_binary(join(re:split("frog","^([ab](?i)[cd]|[ef])",[]))),
+ <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<":F:rance">> = iolist_to_binary(join(re:split("France","^([ab](?i)[cd]|[ef])",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^([ab](?i)[cd]|[ef])",[]))),
+ <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[trim]))),
+ <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[{parts,
+ 2}]))),
+ <<"Africa">> = iolist_to_binary(join(re:split("Africa","^([ab](?i)[cd]|[ef])",[]))),
+ <<":ab">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("ab","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<":aBd">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":aBd:">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
2}]))),
-?line <<":xY:">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
- 2}]))),
-?line <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
-?line <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ <<":aBd:">> = iolist_to_binary(join(re:split("aBd","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<":xy">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":xy:">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<":xy:">> = iolist_to_binary(join(re:split("xy","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<":xY">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":xY:">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<":xY:">> = iolist_to_binary(join(re:split("xY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<":z:ebra">> = iolist_to_binary(join(re:split("zebra","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<":Z:ambesi">> = iolist_to_binary(join(re:split("Zambesi","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
2}]))),
-?line <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
-?line <<"foo
+ <<"aCD">> = iolist_to_binary(join(re:split("aCD","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[trim]))),
+ <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[{parts,
+ 2}]))),
+ <<"XY">> = iolist_to_binary(join(re:split("XY","^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)",[]))),
+ <<"foo
">> = iolist_to_binary(join(re:split("foo
bar","(?<=foo\\n)^bar",[multiline,trim]))),
-?line <<"foo
+ <<"foo
:">> = iolist_to_binary(join(re:split("foo
bar","(?<=foo\\n)^bar",[multiline,{parts,2}]))),
-?line <<"foo
+ <<"foo
:">> = iolist_to_binary(join(re:split("foo
bar","(?<=foo\\n)^bar",[multiline]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline,
- trim]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline,
- {parts,
- 2}]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline]))),
-?line <<"baz
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=foo\\n)^bar",[multiline]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline,
+ trim]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline,
+ {parts,
+ 2}]))),
+ <<"bar">> = iolist_to_binary(join(re:split("bar","(?<=foo\\n)^bar",[multiline]))),
+ <<"baz
bar">> = iolist_to_binary(join(re:split("baz
bar","(?<=foo\\n)^bar",[multiline,trim]))),
-?line <<"baz
+ <<"baz
bar">> = iolist_to_binary(join(re:split("baz
bar","(?<=foo\\n)^bar",[multiline,{parts,2}]))),
-?line <<"baz
+ <<"baz
bar">> = iolist_to_binary(join(re:split("baz
bar","(?<=foo\\n)^bar",[multiline]))),
-?line <<"bar">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"bar:">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"bar:">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[]))),
-?line <<"barbar">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"barbar:">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"barbar:">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[]))),
-?line <<"koobar">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"koobar:">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"koobar:">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[]))),
-?line <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[]))),
-?line <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[trim]))),
-?line <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[{parts,
- 2}]))),
-?line <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[{parts,
+ <<"bar">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"bar:">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"bar:">> = iolist_to_binary(join(re:split("barbaz","(?<=(?<!foo)bar)baz",[]))),
+ <<"barbar">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"barbar:">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"barbar:">> = iolist_to_binary(join(re:split("barbarbaz","(?<=(?<!foo)bar)baz",[]))),
+ <<"koobar">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"koobar:">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"koobar:">> = iolist_to_binary(join(re:split("koobarbaz","(?<=(?<!foo)bar)baz",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?<!foo)bar)baz",[]))),
+ <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"baz">> = iolist_to_binary(join(re:split("baz","(?<=(?<!foo)bar)baz",[]))),
+ <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[trim]))),
+ <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[{parts,
+ 2}]))),
+ <<"foobarbaz">> = iolist_to_binary(join(re:split("foobarbaz","(?<=(?<!foo)bar)baz",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[trim]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?){4}$",[]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[trim]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[{parts,
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?){4}$",[]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?){4}$",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?){4}$",[{parts,
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?){4}$",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?){4}$",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?){4}$",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<":a:a:a:a">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<":a:a:a:a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<":a:a:a:a">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<":a:a:a:a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<":a:a:a:a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<":a:aa:a:a">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<":a:aa:a:a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<":a:a:a:a:">> = iolist_to_binary(join(re:split("aaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<":a:aa:a:a">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<":a:aa:a:a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<":a:aa:a:a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<":a:aa:a:aa">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<":a:aa:a:aa:">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<":a:aa:a:a:">> = iolist_to_binary(join(re:split("aaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<":a:aa:a:aa">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<":a:aa:a:aa:">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<":a:aa:a:aa:">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<":a:aa:aaa:a">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<":a:aa:aaa:a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<":a:aa:a:aa:">> = iolist_to_binary(join(re:split("aaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<":a:aa:aaa:a">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<":a:aa:aaa:a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<":a:aa:aaa:a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<":a:aa:aaa:a:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<":a:aa:aaa:aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<":a:aa:aaa:aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<":a:aa:aaa:aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<":a:aa:aaa:aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<":a:aa:aaa:aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<":a:aa:aaa:aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
+ <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
2}]))),
-?line <<"aaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[trim]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","abc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","abc",[]))),
-?line <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[trim]))),
-?line <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[{parts,
- 2}]))),
-?line <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ababc","abc",[trim]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("ababc","abc",[{parts,
- 2}]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("ababc","abc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[]))),
-?line <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[trim]))),
-?line <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[{parts,
- 2}]))),
-?line <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[]))),
-?line <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[trim]))),
-?line <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[{parts,
- 2}]))),
-?line <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[]))),
-?line <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[trim]))),
-?line <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[{parts,
+ <<"aaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaa","^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","abc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","abc",[]))),
+ <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[trim]))),
+ <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[{parts,
+ 2}]))),
+ <<"x:y">> = iolist_to_binary(join(re:split("xabcy","abc",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ababc","abc",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("ababc","abc",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("ababc","abc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[]))),
+ <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[trim]))),
+ <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[{parts,
+ 2}]))),
+ <<"xbc">> = iolist_to_binary(join(re:split("xbc","abc",[]))),
+ <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[trim]))),
+ <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[{parts,
+ 2}]))),
+ <<"axc">> = iolist_to_binary(join(re:split("axc","abc",[]))),
+ <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[trim]))),
+ <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[{parts,
+ 2}]))),
+ <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab*c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab*c",[{parts,
2}]))),
-?line <<"abx">> = iolist_to_binary(join(re:split("abx","abc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab*c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab*c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc","ab*c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab*bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab*bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab*c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab*bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab*bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc","ab*bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbc","ab*bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab*bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab*bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbc","ab*bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab*bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab*bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[trim]))),
+ <<":bbbbc">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab*bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[{parts,
+ <<"::::::">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[]))),
+ <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[trim]))),
+ <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab*bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[trim]))),
-?line <<":bbbbc">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[{parts,
+ <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbc","ab+bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab+bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab+bc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[]))),
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[trim]))),
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[{parts,
+ 2}]))),
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[{parts,
2}]))),
-?line <<"::::::">> = iolist_to_binary(join(re:split("abbbbc",".{1}",[]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[trim]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[{parts,
- 2}]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("abbbbc",".{3,4}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[]))),
+ ok.
+run15() ->
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{0,}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbc","ab+bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab+bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab+bc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","ab+bc",[]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[trim]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[{parts,
- 2}]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab+bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[]))),
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[trim]))),
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab+bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[{parts,
+ <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[]))),
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[trim]))),
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{1,3}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbbbc","ab{3,4}bc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}bc",[]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[trim]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[{parts,
- 2}]))),
-?line <<"abq">> = iolist_to_binary(join(re:split("abq","ab{4,5}bc",[]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[trim]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[{parts,
- 2}]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abbc","ab?bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab?bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abbc","ab?bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab?bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab?bc",[{parts,
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","ab{4,5}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abbc","ab?bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab?bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab?bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab?c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab?c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abbc","ab?bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab?bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab?bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab?c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc","ab?bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[trim]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[{parts,
- 2}]))),
-?line <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[]))),
-?line <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[trim]))),
-?line <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[{parts,
- 2}]))),
-?line <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[trim]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[{parts,
- 2}]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("aabc","abc$",[trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[{parts,
- 2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}bc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab?c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab?c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab?c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","ab{0,1}c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^abc$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^abc$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("aabc","abc$",[trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[]))),
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[trim]))),
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[{parts,
+ 2}]))),
+ <<"abbbbc">> = iolist_to_binary(join(re:split("abbbbc","^abc$",[]))),
+ <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[trim]))),
+ <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[{parts,
2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[]))),
-?line <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[trim]))),
-?line <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[{parts,
- 2}]))),
-?line <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","$",[trim]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","$",[{parts,
- 2}]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","a.c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","a.c",[{parts,
+ <<"abcc">> = iolist_to_binary(join(re:split("abcc","^abc$",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[trim]))),
+ <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[{parts,
+ 2}]))),
+ <<":c">> = iolist_to_binary(join(re:split("abcc","^abc",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aabc","abc$",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc$",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aabc","abc$",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aabc","abc$",[]))),
+ <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[trim]))),
+ <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[{parts,
+ 2}]))),
+ <<"aabcd">> = iolist_to_binary(join(re:split("aabcd","abc$",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","$",[trim]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","$",[{parts,
+ 2}]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","a.c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","a.c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","a.c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("axc","a.c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("axc","a.c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("axc","a.c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("axyzc","a.*c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("axyzc","a.*c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("axyzc","a.*c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","a[bc]d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","a[bc]d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","a[bc]d",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[]))),
+ <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[trim]))),
+ <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[{parts,
+ 2}]))),
+ <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aac","a[b-d]",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aac","a[b-d]",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aac","a[b-d]",[]))),
+ ok.
+run16() ->
+ <<"">> = iolist_to_binary(join(re:split("a-","a[-b]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-","a[-b]",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","a.c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("axc","a.c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("axc","a.c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a-","a[-b]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-","a[b-]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-","a[b-]",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("axc","a.c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("axyzc","a.*c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("axyzc","a.*c",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a-","a[b-]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a]","a]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a]","a]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a]","a]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a]b","a[]]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a]b","a[]]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a]b","a[]]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[trim]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[{parts,
+ 2}]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[trim]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("axyzc","a.*c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abd","a[bc]d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abd","a[bc]d",[{parts,
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abd","a[bc]d",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bc]d",[]))),
-?line <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[trim]))),
-?line <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[{parts,
- 2}]))),
-?line <<"axyzd">> = iolist_to_binary(join(re:split("axyzd","a[bc]d",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","a[bc]d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ace","a[b-d]e",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("aac","a[b-d]",[trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aac","a[b-d]",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[]))),
+ <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[trim]))),
+ <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[{parts,
2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("aac","a[b-d]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-","a[-b]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-","a[-b]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-","a[-b]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-","a[b-]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-","a[b-]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-","a[b-]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a]","a]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]","a]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]","a]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a]b","a[]]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]b","a[]]b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]b","a[]]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[{parts,
+ <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[]))),
+ <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[trim]))),
+ <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[{parts,
+ 2}]))),
+ <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[]))),
+ <<"-">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[trim]))),
+ <<"-:">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[{parts,
+ 2}]))),
+ <<"-:">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[]))),
+ <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[trim]))),
+ <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aed","a[^bc]d",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[{parts,
+ <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^bc]d",[]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[trim]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[{parts,
- 2}]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[trim]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[{parts,
- 2}]))),
-?line <<"abd">> = iolist_to_binary(join(re:split("abd","a[^bc]d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("adc","a[^-b]c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[]))),
+ <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[trim]))),
+ <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[{parts,
+ 2}]))),
+ <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[]))),
+ <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[trim]))),
+ <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[{parts,
+ 2}]))),
+ <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[trim]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("adc","a[^]b]c",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[{parts,
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[trim]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^]b]c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-c","a[^]b]c",[]))),
-?line <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[trim]))),
-?line <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[{parts,
- 2}]))),
-?line <<"a]c">> = iolist_to_binary(join(re:split("a]c","a[^]b]c",[]))),
-?line <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[trim]))),
-?line <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[{parts,
- 2}]))),
-?line <<":-">> = iolist_to_binary(join(re:split("a-","\\ba\\b",[]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[trim]))),
-?line <<"-:">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[{parts,
- 2}]))),
-?line <<"-:">> = iolist_to_binary(join(re:split("-a","\\ba\\b",[]))),
-?line <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[trim]))),
-?line <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[{parts,
- 2}]))),
-?line <<"-:-">> = iolist_to_binary(join(re:split("-a-","\\ba\\b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\by\\b",[]))),
-?line <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[trim]))),
-?line <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[{parts,
- 2}]))),
-?line <<"xy">> = iolist_to_binary(join(re:split("xy","\\by\\b",[]))),
-?line <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[trim]))),
-?line <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[{parts,
- 2}]))),
-?line <<"yz">> = iolist_to_binary(join(re:split("yz","\\by\\b",[]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[trim]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[{parts,
- 2}]))),
-?line <<"xyz">> = iolist_to_binary(join(re:split("xyz","\\by\\b",[]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[trim]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[{parts,
- 2}]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[trim]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[{parts,
- 2}]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[trim]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[{parts,
- 2}]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[]))),
-?line <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[trim]))),
-?line <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[{parts,
- 2}]))),
-?line <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[]))),
-?line <<"x">> = iolist_to_binary(join(re:split("xy","\\By\\b",[trim]))),
-?line <<"x:">> = iolist_to_binary(join(re:split("xy","\\By\\b",[{parts,
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","\\Ba\\B",[]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[trim]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[{parts,
+ 2}]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","\\Ba\\B",[]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[trim]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[{parts,
+ 2}]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","\\Ba\\B",[]))),
+ <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[trim]))),
+ <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[{parts,
2}]))),
-?line <<"x:">> = iolist_to_binary(join(re:split("xy","\\By\\b",[]))),
-?line <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[trim]))),
-?line <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[{parts,
+ <<"-a-">> = iolist_to_binary(join(re:split("-a-","\\Ba\\B",[]))),
+ <<"x">> = iolist_to_binary(join(re:split("xy","\\By\\b",[trim]))),
+ <<"x:">> = iolist_to_binary(join(re:split("xy","\\By\\b",[{parts,
+ 2}]))),
+ <<"x:">> = iolist_to_binary(join(re:split("xy","\\By\\b",[]))),
+ <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[trim]))),
+ <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[{parts,
+ 2}]))),
+ <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[]))),
+ <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[trim]))),
+ <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[{parts,
2}]))),
-?line <<":z">> = iolist_to_binary(join(re:split("yz","\\by\\B",[]))),
-?line <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[trim]))),
-?line <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[{parts,
- 2}]))),
-?line <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","\\W",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\W",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\W",[]))),
-?line <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[{parts,
- 2}]))),
-?line <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","\\W",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\W",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\W",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","\\W",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","\\W",[{parts,
- 2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","\\W",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a b","a\\sb",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b","a\\sb",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b","a\\sb",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[trim]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[{parts,
- 2}]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1","\\d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","\\d",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","\\D",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\D",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\D",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("*** Failers","\\D",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\D",[{parts,
- 2}]))),
-?line <<":::::::::::">> = iolist_to_binary(join(re:split("*** Failers","\\D",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","\\D",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\D",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","\\D",[]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","\\D",[trim]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","\\D",[{parts,
- 2}]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","\\D",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","[\\w]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[\\w]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[\\w]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","[\\W]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[]))),
-?line <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[{parts,
- 2}]))),
-?line <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","[\\W]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[{parts,
- 2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[trim]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[{parts,
- 2}]))),
-?line <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("1","[\\d]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","[\\d]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("1","[\\d]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","[\\D]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[trim]))),
-?line <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[{parts,
- 2}]))),
-?line <<":::::::::::">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","[\\D]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[trim]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[{parts,
- 2}]))),
-?line <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[trim]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[{parts,
+ <<"x:z">> = iolist_to_binary(join(re:split("xyz","\\By\\B",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","\\W",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\W",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\W",[]))),
+ <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[{parts,
+ 2}]))),
+ <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","\\W",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","\\W",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\W",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\W",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","\\W",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","\\W",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","\\W",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a b","a\\sb",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a b","a\\sb",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a b","a\\sb",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Sb",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a\\Sb",[]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[trim]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[{parts,
+ 2}]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a\\Sb",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1","\\d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1","\\d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1","\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","\\D",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\D",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("*** Failers","\\D",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\D",[{parts,
+ 2}]))),
+ <<":::::::::::">> = iolist_to_binary(join(re:split("*** Failers","\\D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","\\D",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\D",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","\\D",[]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","\\D",[trim]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","\\D",[{parts,
+ 2}]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","\\D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","[\\w]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","[\\w]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","[\\w]",[]))),
+ ok.
+run17() ->
+ <<"">> = iolist_to_binary(join(re:split("-","[\\W]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[]))),
+ <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[{parts,
+ 2}]))),
+ <<"::::Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\W]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","[\\W]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\W]",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","[\\W]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a b","a[\\s]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[\\S]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a-b","a[\\S]b",[]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[trim]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[{parts,
+ 2}]))),
+ <<"a b">> = iolist_to_binary(join(re:split("a b","a[\\S]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1","[\\d]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1","[\\d]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1","[\\d]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","[\\D]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[trim]))),
+ <<":** Failers">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[{parts,
+ 2}]))),
+ <<":::::::::::">> = iolist_to_binary(join(re:split("*** Failers","[\\D]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","[\\D]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[\\D]",[]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[trim]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[{parts,
+ 2}]))),
+ <<"1">> = iolist_to_binary(join(re:split("1","[\\D]",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[trim]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[{parts,
+ 2}]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","ab|cd",[trim]))),
+ <<":cd">> = iolist_to_binary(join(re:split("abcd","ab|cd",[{parts,
2}]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abc","ab|cd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","ab|cd",[trim]))),
-?line <<":cd">> = iolist_to_binary(join(re:split("abcd","ab|cd",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcd","ab|cd",[]))),
-?line <<"d">> = iolist_to_binary(join(re:split("def","()ef",[trim]))),
-?line <<"d::">> = iolist_to_binary(join(re:split("def","()ef",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("abcd","ab|cd",[]))),
+ <<"d">> = iolist_to_binary(join(re:split("def","()ef",[trim]))),
+ <<"d::">> = iolist_to_binary(join(re:split("def","()ef",[{parts,
+ 2}]))),
+ <<"d::">> = iolist_to_binary(join(re:split("def","()ef",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a(b","a\\(b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a(b","a\\(b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a(b","a\\(b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","a\\(*b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a\\(*b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","a\\(*b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[]))),
+ <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[trim]))),
+ <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[{parts,
2}]))),
-?line <<"d::">> = iolist_to_binary(join(re:split("def","()ef",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a(b","a\\(b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a(b","a\\(b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a(b","a\\(b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","a\\(*b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a\\(*b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","a\\(*b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a((b","a\\(*b",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[{parts,
+ <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[]))),
+ <<":a:c">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[trim]))),
+ <<":a:c:">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[{parts,
2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","a\\\\b",[]))),
-?line <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[trim]))),
-?line <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[{parts,
- 2}]))),
-?line <<":a:a:bc">> = iolist_to_binary(join(re:split("abc","((a))",[]))),
-?line <<":a:c">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[trim]))),
-?line <<":a:c:">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[{parts,
+ <<":a:c:">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[]))),
+ <<"aabb">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[trim]))),
+ <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[{parts,
+ 2}]))),
+ <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[]))),
+ <<"aabb">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[trim]))),
+ <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[{parts,
+ 2}]))),
+ <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[{parts,
2}]))),
-?line <<":a:c:">> = iolist_to_binary(join(re:split("abc","(a)b(c)",[]))),
-?line <<"aabb">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[trim]))),
-?line <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[{parts,
- 2}]))),
-?line <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a+b+c",[]))),
-?line <<"aabb">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[trim]))),
-?line <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[{parts,
- 2}]))),
-?line <<"aabb:">> = iolist_to_binary(join(re:split("aabbabc","a{1,}b{1,}c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[trim]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abcabc","a.+?c",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)*",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[trim]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[{parts,
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,}",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b)+",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[]))),
+ ok.
+run18() ->
+ <<":a::b">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[{parts,
+ 2}]))),
+ <<":a::b:">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[]))),
+ <<":a::b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[{parts,
2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("ab","(a+|b){1,}",[]))),
-?line <<":a::b">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[{parts,
- 2}]))),
-?line <<":a::b:">> = iolist_to_binary(join(re:split("ab","(a+|b)?",[]))),
-?line <<":a::b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[{parts,
+ <<":a::b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cde","[^ab]*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("cde","[^ab]*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("cde","[^ab]*",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[{parts,
2}]))),
-?line <<":a::b:">> = iolist_to_binary(join(re:split("ab","(a+|b){0,1}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("cde","[^ab]*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("cde","[^ab]*",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("cde","[^ab]*",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","abc",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","abc",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","abc",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[trim]))),
+ <<":c:">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","abc",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","abc",[{parts,
- 2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","abc",[]))),
-?line <<":c">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[trim]))),
-?line <<":c:">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[{parts,
- 2}]))),
-?line <<":c:">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[{parts,
+ <<":c:">> = iolist_to_binary(join(re:split("abbbcd","([abc])*d",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[]))),
-?line <<"x:y:z">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[trim]))),
-?line <<"x:yabbbz">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[{parts,
- 2}]))),
-?line <<"x:y:z">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[]))),
-?line <<"x:y:z">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[trim]))),
-?line <<"x:yabbbz">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[{parts,
- 2}]))),
-?line <<"x:y:z">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[]))),
-?line <<"ab:cd">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[trim]))),
-?line <<"ab:cd:">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("abcd","([abc])*bcd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("e","a|b|c|d|e",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[{parts,
2}]))),
-?line <<"ab:cd:">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[]))),
-?line <<"abcd">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[trim]))),
-?line <<"abcd::">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[{parts,
+ <<":e:">> = iolist_to_binary(join(re:split("ef","(a|b|c|d|e)f",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[{parts,
2}]))),
-?line <<"abcd::">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[]))),
-?line <<"a:b">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[trim]))),
-?line <<"a:b:">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("abcdefg","abcd*efg",[]))),
+ <<"x:y:z">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[trim]))),
+ <<"x:yabbbz">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[{parts,
+ 2}]))),
+ <<"x:y:z">> = iolist_to_binary(join(re:split("xabyabbbz","ab*",[]))),
+ <<"x:y:z">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[trim]))),
+ <<"x:yabbbz">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[{parts,
+ 2}]))),
+ <<"x:y:z">> = iolist_to_binary(join(re:split("xayabbbz","ab*",[]))),
+ <<"ab:cd">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[trim]))),
+ <<"ab:cd:">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[{parts,
2}]))),
-?line <<"a:b:">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[trim]))),
-?line <<":bc:">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[{parts,
+ <<"ab:cd:">> = iolist_to_binary(join(re:split("abcde","(ab|cd)e",[]))),
+ <<"">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("hij","[abhgefdc]ij",[]))),
+ <<"abcd">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[trim]))),
+ <<"abcd::">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[{parts,
2}]))),
-?line <<":bc:">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[]))),
-?line <<":bc:d">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[trim]))),
-?line <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[{parts,
- 2}]))),
-?line <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[]))),
-?line <<":bc:d">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[trim]))),
-?line <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[{parts,
- 2}]))),
-?line <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[]))),
-?line <<":b:cd">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[trim]))),
-?line <<":b:cd:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[{parts,
- 2}]))),
-?line <<":b:cd:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[trim]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[{parts,
- 2}]))),
-?line <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[]))),
-?line <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[trim]))),
-?line <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[{parts,
- 2}]))),
-?line <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[]))),
-?line <<":ab">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[trim]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[{parts,
+ <<"abcd::">> = iolist_to_binary(join(re:split("abcdef","(abc|)ef",[]))),
+ <<"a:b">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[trim]))),
+ <<"a:b:">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[{parts,
+ 2}]))),
+ <<"a:b:">> = iolist_to_binary(join(re:split("abcd","(a|b)c*d",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abc","(ab|ab*)bc",[]))),
+ <<":bc">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[trim]))),
+ <<":bc:">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[{parts,
2}]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[]))),
-?line <<":abc:a:b:d">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[trim]))),
-?line <<":abc:a:b:d:">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[{parts,
+ <<":bc:">> = iolist_to_binary(join(re:split("abc","a([bc]*)c*",[]))),
+ <<":bc:d">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[trim]))),
+ <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[{parts,
2}]))),
-?line <<":abc:a:b:d:">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[trim]))),
-?line <<"a::">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[{parts,
- 2}]))),
-?line <<"a::">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[]))),
-?line <<":effgz">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<":effgz::">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[{parts,
- 2}]))),
-?line <<":effgz::">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<":ij:j">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<":ij:j:">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[{parts,
- 2}]))),
-?line <<":ij:j:">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<"r:effgz">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<"r:effgz::">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[{parts,
- 2}]))),
-?line <<"r:effgz::">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[{parts,
- 2}]))),
-?line <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
-?line <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[{parts,
+ <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c*d)",[]))),
+ <<":bc:d">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[trim]))),
+ <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[{parts,
+ 2}]))),
+ <<":bc:d:">> = iolist_to_binary(join(re:split("abcd","a([bc]+)(c*d)",[]))),
+ ok.
+run19() ->
+ <<":b:cd">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[trim]))),
+ <<":b:cd:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[{parts,
+ 2}]))),
+ <<":b:cd:">> = iolist_to_binary(join(re:split("abcd","a([bc]*)(c+d)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]*dcdcde",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[bcd]+dcdcde",[]))),
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[trim]))),
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[{parts,
+ 2}]))),
+ <<"abcde">> = iolist_to_binary(join(re:split("abcde","a[bcd]+dcdcde",[]))),
+ <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[trim]))),
+ <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[{parts,
+ 2}]))),
+ <<"adcdcde">> = iolist_to_binary(join(re:split("adcdcde","a[bcd]+dcdcde",[]))),
+ <<":ab">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[{parts,
+ 2}]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(ab|a)b*c",[]))),
+ <<":abc:a:b:d">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[trim]))),
+ <<":abc:a:b:d:">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[{parts,
+ 2}]))),
+ <<":abc:a:b:d:">> = iolist_to_binary(join(re:split("abcd","((a)(b)c)(d)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("alpha","[a-zA-Z_][a-zA-Z0-9_]*",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[trim]))),
+ <<"a::">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[{parts,
+ 2}]))),
+ <<"a::">> = iolist_to_binary(join(re:split("abh","^a(bc+|b[eh])g|.h$",[]))),
+ <<":effgz">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<":effgz::">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[{parts,
2}]))),
-?line <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[]))),
-?line <<":a:a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[trim]))),
-?line <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[{parts,
- 2}]))),
-?line <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[]))),
-?line <<":a:a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[trim]))),
-?line <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[{parts,
+ <<":effgz::">> = iolist_to_binary(join(re:split("effgz","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<":ij:j">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<":ij:j:">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[{parts,
+ 2}]))),
+ <<":ij:j:">> = iolist_to_binary(join(re:split("ij","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<"r:effgz">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<"r:effgz::">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[{parts,
2}]))),
-?line <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[]))),
-?line <<":a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[trim]))),
-?line <<":a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[{parts,
- 2}]))),
-?line <<":a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[trim]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[{parts,
- 2}]))),
-?line <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[]))),
-?line <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[trim]))),
-?line <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[{parts,
- 2}]))),
-?line <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[]))),
-?line <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[trim]))),
-?line <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[{parts,
- 2}]))),
-?line <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[]))),
-?line <<":ab:de">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[trim]))),
-?line <<":ab:de:">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[{parts,
- 2}]))),
-?line <<":ab:de:">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[trim]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[{parts,
+ <<"r:effgz::">> = iolist_to_binary(join(re:split("reffgz","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[{parts,
+ 2}]))),
+ <<"effg">> = iolist_to_binary(join(re:split("effg","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[trim]))),
+ <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[{parts,
+ 2}]))),
+ <<"bcdd">> = iolist_to_binary(join(re:split("bcdd","(bc+d$|ef*g.|h?i(j|k))",[]))),
+ <<":a:a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[trim]))),
+ <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[{parts,
+ 2}]))),
+ <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","((((((((((a))))))))))",[]))),
+ <<":a:a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[trim]))),
+ <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[{parts,
+ 2}]))),
+ <<":a:a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("aa","((((((((((a))))))))))\\10",[]))),
+ <<":a:a:a:a:a:a:a:a:a">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[trim]))),
+ <<":a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[{parts,
+ 2}]))),
+ <<":a:a:a:a:a:a:a:a:a:">> = iolist_to_binary(join(re:split("a","(((((((((a)))))))))",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[trim]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[{parts,
2}]))),
-?line <<":a:b:">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","abcd",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","abcd",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcd","abcd",[]))),
-?line <<":bc">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[trim]))),
-?line <<":bc:">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[{parts,
- 2}]))),
-?line <<":bc:">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ac","a[-]?c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ac","a[-]?c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ac","a[-]?c",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[{parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[{parts,
+ <<"aa">> = iolist_to_binary(join(re:split("aa","multiple words of text",[]))),
+ <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[trim]))),
+ <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[{parts,
+ 2}]))),
+ <<"uh-uh">> = iolist_to_binary(join(re:split("uh-uh","multiple words of text",[]))),
+ <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[trim]))),
+ <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[{parts,
+ 2}]))),
+ <<":, yeah">> = iolist_to_binary(join(re:split("multiple words, yeah","multiple words",[]))),
+ <<":ab:de">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[trim]))),
+ <<":ab:de:">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[{parts,
+ 2}]))),
+ <<":ab:de:">> = iolist_to_binary(join(re:split("abcde","(.*)c(.*)",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[trim]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[{parts,
+ 2}]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("(a, b)","\\((.*), (.*)\\)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","abcd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","abcd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","abcd",[]))),
+ <<":bc">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[trim]))),
+ <<":bc:">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[{parts,
+ 2}]))),
+ <<":bc:">> = iolist_to_binary(join(re:split("abcd","a(bc)d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","a[-]?c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","a[-]?c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","a[-]?c",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(abc)\\1",[]))),
+ ok.
+run20() ->
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("a","(a)|\\1",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(a)|\\1",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(a)|\\1",[]))),
+ <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[trim]))),
+ <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[{parts,
2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abcabc","([a-c]*)\\1",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("a","(a)|\\1",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("a","(a)|\\1",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("a","(a)|\\1",[]))),
-?line <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[trim]))),
-?line <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[{parts,
- 2}]))),
-?line <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[trim]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[{parts,
- 2}]))),
-?line <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[]))),
-?line <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[trim]))),
-?line <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[{parts,
- 2}]))),
-?line <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[]))),
-?line <<":bb:b:b:cbc:c">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[trim]))),
-?line <<":bb:b:bcbc">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[{parts,
- 2}]))),
-?line <<":bb:b:b:cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[]))),
-?line <<":cbc:c">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[trim]))),
-?line <<":cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[{parts,
- 2}]))),
-?line <<":cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[]))),
-?line <<"aaaxabaxbaax:bbax:b:a">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[trim]))),
-?line <<"aaaxabaxbaax:bbax:b:a:">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[{parts,
- 2}]))),
-?line <<"aaaxabaxbaax:bbax:b:a:">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[]))),
-?line <<"bbaababbabaaaaa:bba:b:a">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[trim]))),
-?line <<"bbaababbabaaaaa:bba:b:a:">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[{parts,
- 2}]))),
-?line <<"bbaababbabaaaaa:bba:b:a:">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","abc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","abc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","abc",[caseless]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless,
- trim]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless,
- {parts,
+ <<"*** F:a:ilers">> = iolist_to_binary(join(re:split("*** Failers","(a)|\\1",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[{parts,
2}]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless,
- trim]))),
-?line <<"AB:">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless,
- {parts,
- 2}]))),
-?line <<"AB:">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless,
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(a)|\\1",[]))),
+ <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[trim]))),
+ <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[{parts,
+ 2}]))),
+ <<"x">> = iolist_to_binary(join(re:split("x","(a)|\\1",[]))),
+ <<":bb:b:b:cbc:c">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[trim]))),
+ <<":bb:b:bcbc">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[{parts,
+ 2}]))),
+ <<":bb:b:b:cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2)*",[]))),
+ <<":cbc:c">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[trim]))),
+ <<":cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[{parts,
+ 2}]))),
+ <<":cbc:c:">> = iolist_to_binary(join(re:split("ababbbcbc","(([a-c])b*?\\2){3}",[]))),
+ <<"aaaxabaxbaax:bbax:b:a">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[trim]))),
+ <<"aaaxabaxbaax:bbax:b:a:">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[{parts,
+ 2}]))),
+ <<"aaaxabaxbaax:bbax:b:a:">> = iolist_to_binary(join(re:split("aaaxabaxbaaxbbax","((\\3|b)\\2(a)x)+",[]))),
+ <<"bbaababbabaaaaa:bba:b:a">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[trim]))),
+ <<"bbaababbabaaaaa:bba:b:a:">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[{parts,
+ 2}]))),
+ <<"bbaababbabaaaaa:bba:b:a:">> = iolist_to_binary(join(re:split("bbaababbabaaaaabbaaaabba","((\\3|b)\\2(a)){2,}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","abc",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","abc",[caseless]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless,
+ trim]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XABCY","abc",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless,
+ trim]))),
+ <<"AB:">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB:">> = iolist_to_binary(join(re:split("ABABC","abc",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless]))),
+ <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless,
trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless,
+ <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless,
{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","abc",[caseless]))),
-?line <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless,
- trim]))),
-?line <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless,
- {parts,
- 2}]))),
-?line <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless]))),
-?line <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless,
- trim]))),
-?line <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless,
- {parts,
- 2}]))),
-?line <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless]))),
-?line <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless,
- trim]))),
-?line <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless,
- {parts,
- 2}]))),
-?line <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless]))),
-?line <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless,
+ <<"aaxabxbaxbbx">> = iolist_to_binary(join(re:split("aaxabxbaxbbx","abc",[caseless]))),
+ <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless,
+ trim]))),
+ <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"XBC">> = iolist_to_binary(join(re:split("XBC","abc",[caseless]))),
+ <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless,
+ trim]))),
+ <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"AXC">> = iolist_to_binary(join(re:split("AXC","abc",[caseless]))),
+ <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless,
+ trim]))),
+ <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless,
trim]))),
-?line <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless,
{parts,
2}]))),
-?line <<"ABX">> = iolist_to_binary(join(re:split("ABX","abc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab*c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab*bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab*bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab*?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{0,}?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless,
+ trim]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless,
+ trim]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab+?bc",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab+bc",[caseless]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless,
- trim]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless,
- {parts,
- 2}]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","ab+bc",[caseless]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless,
- trim]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless,
- {parts,
- 2}]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab+bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab+bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,}?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless,
- trim]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless,
- trim]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{1,3}?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABBBBC","ab{3,4}?bc",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","ab{4,5}?bc",[caseless]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless,
+ trim]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABQ">> = iolist_to_binary(join(re:split("ABQ","ab{4,5}?bc",[caseless]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless,
+ trim]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","ab{4,5}?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABBC","ab??bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab??bc",[caseless]))),
+ ok.
+run21() ->
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?bc",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab??c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","ab{0,1}?c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless,
+ trim]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless]))),
+ <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless,
+ <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","^abc$",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^abc$",[caseless]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless,
- trim]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless,
- {parts,
- 2}]))),
-?line <<"ABBBBC">> = iolist_to_binary(join(re:split("ABBBBC","^abc$",[caseless]))),
-?line <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless,
- trim]))),
-?line <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless,
- {parts,
- 2}]))),
-?line <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless,
+ <<"ABCC">> = iolist_to_binary(join(re:split("ABCC","^abc$",[caseless]))),
+ <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless,
+ trim]))),
+ <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless,
+ {parts,
+ 2}]))),
+ <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless,
+ trim]))),
+ <<"A:">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless,
+ {parts,
+ 2}]))),
+ <<"A:">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless,
+ trim]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","$",[caseless,
+ trim]))),
+ <<"ABC:">> = iolist_to_binary(join(re:split("ABC","$",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABC:">> = iolist_to_binary(join(re:split("ABC","$",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless]))),
+ <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless,
trim]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless,
+ <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless,
{parts,
2}]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABCC","^abc",[caseless]))),
-?line <<"A">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless,
- trim]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless,
- {parts,
- 2}]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("AABC","abc$",[caseless]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless,
- trim]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless,
- {parts,
- 2}]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","^",[caseless]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","$",[caseless,
- trim]))),
-?line <<"ABC:">> = iolist_to_binary(join(re:split("ABC","$",[caseless,
- {parts,
- 2}]))),
-?line <<"ABC:">> = iolist_to_binary(join(re:split("ABC","$",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABC","a.c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AXC","a.c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AXYZC","a.*?c",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a.*c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless,
+ <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AABC","a.*c",[caseless]))),
-?line <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless,
trim]))),
-?line <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless,
{parts,
2}]))),
-?line <<"AXYZD">> = iolist_to_binary(join(re:split("AXYZD","a.*c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless,
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABD","a[bc]d",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ACE","a[b-d]e",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[b-d]e",[caseless]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless,
- trim]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless,
- {parts,
- 2}]))),
-?line <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless,
- trim]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless,
- {parts,
- 2}]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless]))),
-?line <<"A">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless,
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","a[b-d]e",[caseless]))),
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless,
trim]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless,
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless,
{parts,
2}]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless,
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[b-d]e",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless,
+ trim]))),
+ <<"A:">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless,
+ {parts,
+ 2}]))),
+ <<"A:">> = iolist_to_binary(join(re:split("AAC","a[b-d]",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A]","a]",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("A]","a]",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("A]","a]",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A-","a[-b]",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless]))),
+ ok.
+run22() ->
+ <<"">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless]))),
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless,
+ trim]))),
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless,
+ {parts,
+ 2}]))),
+ <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless]))),
+ <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless,
+ trim]))),
+ <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless,
+ {parts,
+ 2}]))),
+ <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless]))),
+ <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless,
+ <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A-","a[b-]",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A]","a]",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A]","a]",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A]","a]",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless,
+ <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless,
+ <<":CD">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A]B","a[]]b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AED","a[^bc]d",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADC","a[^-b]c",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a[^-b]c",[caseless]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless,
- trim]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless,
- {parts,
- 2}]))),
-?line <<"ABD">> = iolist_to_binary(join(re:split("ABD","a[^-b]c",[caseless]))),
-?line <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless,
+ <<"::">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless]))),
+ <<"D">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless,
+ trim]))),
+ <<"D::">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless,
+ {parts,
+ 2}]))),
+ <<"D::">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless]))),
+ <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless,
+ trim]))),
+ <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless,
+ {parts,
+ 2}]))),
+ <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless]))),
+ <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless,
+ trim]))),
+ <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless,
+ {parts,
+ 2}]))),
+ <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
+ notbol,
+ trim]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
+ notbol,
+ {parts,
+ 2}]))),
+ <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
+ notbol]))),
+ <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless,
+ trim]))),
+ <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless]))),
+ <<":A:C">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless,
+ trim]))),
+ <<":A:C:">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:C:">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless]))),
+ <<"AABB">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless,
+ trim]))),
+ <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless,
+ {parts,
+ 2}]))),
+ <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless]))),
+ <<"AABB">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless,
+ trim]))),
+ <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless,
+ {parts,
+ 2}]))),
+ <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless,
trim]))),
-?line <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless,
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless,
{parts,
2}]))),
-?line <<"A-C">> = iolist_to_binary(join(re:split("A-C","a[^-b]c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless,
+ <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless,
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADC","a[^]b]c",[caseless]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless,
- trim]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless,
- {parts,
- 2}]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABC","ab|cd",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless,
- trim]))),
-?line <<":CD">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless,
- {parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ABCD","ab|cd",[caseless]))),
-?line <<"D">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless,
- trim]))),
-?line <<"D::">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless,
- {parts,
- 2}]))),
-?line <<"D::">> = iolist_to_binary(join(re:split("DEF","()ef",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless,
+ <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless,
trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless,
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless,
{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","$b",[caseless]))),
-?line <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless,
- trim]))),
-?line <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless,
- {parts,
- 2}]))),
-?line <<"A]C">> = iolist_to_binary(join(re:split("A]C","$b",[caseless]))),
-?line <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless,
- trim]))),
-?line <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless,
- {parts,
- 2}]))),
-?line <<"B">> = iolist_to_binary(join(re:split("B","$b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A(B","a\\(b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AB","a\\(*b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("A((B","a\\(*b",[caseless]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
- notbol,
- trim]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
- notbol,
- {parts,
- 2}]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A","a\\\\b",[caseless,
- notbol]))),
-?line <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless,
+ <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless]))),
+ <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless,
trim]))),
-?line <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless,
{parts,
2}]))),
-?line <<":A:A:BC">> = iolist_to_binary(join(re:split("ABC","((a))",[caseless]))),
-?line <<":A:C">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless,
- trim]))),
-?line <<":A:C:">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless,
- {parts,
- 2}]))),
-?line <<":A:C:">> = iolist_to_binary(join(re:split("ABC","(a)b(c)",[caseless]))),
-?line <<"AABB">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless,
- trim]))),
-?line <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless,
- {parts,
- 2}]))),
-?line <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a+b+c",[caseless]))),
-?line <<"AABB">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless,
- trim]))),
-?line <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless,
- {parts,
- 2}]))),
-?line <<"AABB:">> = iolist_to_binary(join(re:split("AABBABC","a{1,}b{1,}c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless]))),
+ <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless,
trim]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless,
{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.+?c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless]))),
+ <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless,
+ trim]))),
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless,
+ {parts,
+ 2}]))),
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless]))),
+ <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless,
trim]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless,
{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.*?c",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless,
- trim]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless,
- {parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("ABCABC","a.{0,5}?c",[caseless]))),
-?line <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless,
- trim]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless,
- {parts,
- 2}]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)*",[caseless]))),
-?line <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless,
- trim]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless,
- {parts,
- 2}]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,}",[caseless]))),
-?line <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless,
- trim]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless,
- {parts,
- 2}]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b)+",[caseless]))),
-?line <<":B">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless,
+ <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless]))),
+ ok.
+run23() ->
+ <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless,
+ trim]))),
+ <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless,
+ {parts,
+ 2}]))),
+ <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless]))),
+ <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless,
trim]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless,
+ <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless,
{parts,
2}]))),
-?line <<":B:">> = iolist_to_binary(join(re:split("AB","(a+|b){1,}",[caseless]))),
-?line <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless,
- trim]))),
-?line <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless,
- {parts,
- 2}]))),
-?line <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b)?",[caseless]))),
-?line <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless,
+ <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless]))),
+ <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless,
trim]))),
-?line <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless,
+ <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless,
{parts,
2}]))),
-?line <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}",[caseless]))),
-?line <<":A::B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless,
+ <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless]))),
+ <<":C">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless,
trim]))),
-?line <<":A:B">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless,
+ <<":C:">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless,
{parts,
2}]))),
-?line <<":A::B:">> = iolist_to_binary(join(re:split("AB","(a+|b){0,1}?",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("CDE","[^ab]*",[caseless]))),
-?line <<":C">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless,
- trim]))),
-?line <<":C:">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless,
- {parts,
- 2}]))),
-?line <<":C:">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless]))),
-?line <<":A">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless,
- trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless,
- {parts,
- 2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless]))),
-?line <<":E">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless,
+ <<":C:">> = iolist_to_binary(join(re:split("ABBBCD","([abc])*d",[caseless]))),
+ <<":A">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless,
trim]))),
-?line <<":E:">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless,
+ <<":A:">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless,
{parts,
2}]))),
-?line <<":E:">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless]))),
-?line <<"X:Y:Z">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless,
- trim]))),
-?line <<"X:YABBBZ">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless,
- {parts,
- 2}]))),
-?line <<"X:Y:Z">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless]))),
-?line <<"X:Y:Z">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless,
- trim]))),
-?line <<"X:YABBBZ">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless,
- {parts,
- 2}]))),
-?line <<"X:Y:Z">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless]))),
-?line <<"AB:CD">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless,
+ <<":A:">> = iolist_to_binary(join(re:split("ABCD","([abc])*bcd",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("E","a|b|c|d|e",[caseless]))),
+ <<":E">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless,
trim]))),
-?line <<"AB:CD:">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless,
+ <<":E:">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless,
{parts,
2}]))),
-?line <<"AB:CD:">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless]))),
-?line <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless,
+ <<":E:">> = iolist_to_binary(join(re:split("EF","(a|b|c|d|e)f",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless,
trim]))),
-?line <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless,
{parts,
2}]))),
-?line <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless]))),
-?line <<"ABCD">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless,
- trim]))),
-?line <<"ABCD::">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless,
- {parts,
- 2}]))),
-?line <<"ABCD::">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ABCDEFG","abcd*efg",[caseless]))),
+ <<"X:Y:Z">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless,
+ trim]))),
+ <<"X:YABBBZ">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless,
+ {parts,
+ 2}]))),
+ <<"X:Y:Z">> = iolist_to_binary(join(re:split("XABYABBBZ","ab*",[caseless]))),
+ <<"X:Y:Z">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless,
+ trim]))),
+ <<"X:YABBBZ">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless,
+ {parts,
+ 2}]))),
+ <<"X:Y:Z">> = iolist_to_binary(join(re:split("XAYABBBZ","ab*",[caseless]))),
+ <<"AB:CD">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless,
trim]))),
-?line <<"A:B:">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless,
+ <<"AB:CD:">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless,
{parts,
2}]))),
-?line <<"A:B:">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless]))),
-?line <<":A">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless,
+ <<"AB:CD:">> = iolist_to_binary(join(re:split("ABCDE","(ab|cd)e",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("HIJ","[abhgefdc]ij",[caseless]))),
+ <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless,
trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless,
+ <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless,
{parts,
2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless]))),
-?line <<":BC">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless,
+ <<"ABCDE">> = iolist_to_binary(join(re:split("ABCDE","^(ab|cd)e",[caseless]))),
+ <<"ABCD">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless,
trim]))),
-?line <<":BC:">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless,
+ <<"ABCD::">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless,
{parts,
2}]))),
-?line <<":BC:">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless]))),
-?line <<":BC:D">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless,
- trim]))),
-?line <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless,
- {parts,
- 2}]))),
-?line <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless]))),
-?line <<":BC:D">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless,
- trim]))),
-?line <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless,
- {parts,
- 2}]))),
-?line <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless]))),
-?line <<":B:CD">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless,
- trim]))),
-?line <<":B:CD:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless,
- {parts,
- 2}]))),
-?line <<":B:CD:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless]))),
-?line <<":AB">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless,
+ <<"ABCD::">> = iolist_to_binary(join(re:split("ABCDEF","(abc|)ef",[caseless]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless,
+ trim]))),
+ <<"A:B:">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless,
+ {parts,
+ 2}]))),
+ <<"A:B:">> = iolist_to_binary(join(re:split("ABCD","(a|b)c*d",[caseless]))),
+ <<":A">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless,
trim]))),
-?line <<":AB:">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless,
+ <<":A:">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless,
{parts,
2}]))),
-?line <<":AB:">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless]))),
-?line <<":ABC:A:B:D">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless,
+ <<":A:">> = iolist_to_binary(join(re:split("ABC","(ab|ab*)bc",[caseless]))),
+ <<":BC">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless,
+ trim]))),
+ <<":BC:">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless,
+ {parts,
+ 2}]))),
+ <<":BC:">> = iolist_to_binary(join(re:split("ABC","a([bc]*)c*",[caseless]))),
+ <<":BC:D">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless,
trim]))),
-?line <<":ABC:A:B:D:">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless,
+ <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless,
{parts,
2}]))),
-?line <<":ABC:A:B:D:">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless]))),
-?line <<"A">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless,
- trim]))),
-?line <<"A::">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless,
- {parts,
- 2}]))),
-?line <<"A::">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless]))),
-?line <<":EFFGZ">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c*d)",[caseless]))),
+ ok.
+run24() ->
+ <<":BC:D">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless,
+ trim]))),
+ <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless,
+ {parts,
+ 2}]))),
+ <<":BC:D:">> = iolist_to_binary(join(re:split("ABCD","a([bc]+)(c*d)",[caseless]))),
+ <<":B:CD">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless,
+ trim]))),
+ <<":B:CD:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless,
+ {parts,
+ 2}]))),
+ <<":B:CD:">> = iolist_to_binary(join(re:split("ABCD","a([bc]*)(c+d)",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ADCDCDE","a[bcd]*dcdcde",[caseless]))),
+ <<":AB">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless,
+ trim]))),
+ <<":AB:">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless,
+ {parts,
+ 2}]))),
+ <<":AB:">> = iolist_to_binary(join(re:split("ABC","(ab|a)b*c",[caseless]))),
+ <<":ABC:A:B:D">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless,
+ trim]))),
+ <<":ABC:A:B:D:">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless,
+ {parts,
+ 2}]))),
+ <<":ABC:A:B:D:">> = iolist_to_binary(join(re:split("ABCD","((a)(b)c)(d)",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ALPHA","[a-zA-Z_][a-zA-Z0-9_]*",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless,
+ trim]))),
+ <<"A::">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless,
+ {parts,
+ 2}]))),
+ <<"A::">> = iolist_to_binary(join(re:split("ABH","^a(bc+|b[eh])g|.h$",[caseless]))),
+ <<":EFFGZ">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ trim]))),
+ <<":EFFGZ::">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ {parts,
+ 2}]))),
+ <<":EFFGZ::">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<":IJ:J">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ trim]))),
+ <<":IJ:J:">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ {parts,
+ 2}]))),
+ <<":IJ:J:">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<"R:EFFGZ">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
trim]))),
-?line <<":EFFGZ::">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<"R:EFFGZ::">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
{parts,
2}]))),
-?line <<":EFFGZ::">> = iolist_to_binary(join(re:split("EFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<":IJ:J">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- trim]))),
-?line <<":IJ:J:">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- {parts,
- 2}]))),
-?line <<":IJ:J:">> = iolist_to_binary(join(re:split("IJ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<"R:EFFGZ">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<"R:EFFGZ::">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless,
trim]))),
-?line <<"R:EFFGZ::">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless,
{parts,
2}]))),
-?line <<"R:EFFGZ::">> = iolist_to_binary(join(re:split("REFFGZ","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- trim]))),
-?line <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- {parts,
- 2}]))),
-?line <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- trim]))),
-?line <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless,
- {parts,
- 2}]))),
-?line <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<"ADCDCDE">> = iolist_to_binary(join(re:split("ADCDCDE","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ trim]))),
+ <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ {parts,
+ 2}]))),
+ <<"EFFG">> = iolist_to_binary(join(re:split("EFFG","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ trim]))),
+ <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ {parts,
+ 2}]))),
+ <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
+ <<":A:A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless,
+ trim]))),
+ <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless]))),
+ <<":A:A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless,
trim]))),
-?line <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless,
+ <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless,
{parts,
2}]))),
-?line <<"BCDD">> = iolist_to_binary(join(re:split("BCDD","(bc+d$|ef*g.|h?i(j|k))",[caseless]))),
-?line <<":A:A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless,
- trim]))),
-?line <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless,
- {parts,
- 2}]))),
-?line <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","((((((((((a))))))))))",[caseless]))),
-?line <<":A:A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless,
- trim]))),
-?line <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless,
- {parts,
- 2}]))),
-?line <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless]))),
-?line <<":A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless,
- trim]))),
-?line <<":A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless,
- {parts,
- 2}]))),
-?line <<":A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless]))),
-?line <<":A">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless,
- trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless,
- {parts,
- 2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless]))),
-?line <<":C">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless,
- trim]))),
-?line <<":C:">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless,
- {parts,
- 2}]))),
-?line <<":C:">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless]))),
-?line <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless,
- trim]))),
-?line <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless,
- {parts,
- 2}]))),
-?line <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless]))),
-?line <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless,
- trim]))),
-?line <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless,
- {parts,
- 2}]))),
-?line <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless]))),
-?line <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless,
- trim]))),
-?line <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless,
- {parts,
- 2}]))),
-?line <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless]))),
-?line <<":AB:DE">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless,
- trim]))),
-?line <<":AB:DE:">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless,
- {parts,
- 2}]))),
-?line <<":AB:DE:">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless]))),
-?line <<":A:B">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless,
+ <<":A:A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("AA","((((((((((a))))))))))\\10",[caseless]))),
+ <<":A:A:A:A:A:A:A:A:A">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless,
+ trim]))),
+ <<":A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:A:A:A:A:A:A:A:A:">> = iolist_to_binary(join(re:split("A","(((((((((a)))))))))",[caseless]))),
+ <<":A">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless,
+ trim]))),
+ <<":A:">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:">> = iolist_to_binary(join(re:split("A","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))",[caseless]))),
+ <<":C">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless,
+ trim]))),
+ <<":C:">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless,
+ {parts,
+ 2}]))),
+ <<":C:">> = iolist_to_binary(join(re:split("C","(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","multiple words of text",[caseless]))),
+ <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless,
trim]))),
-?line <<":A:B:">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless,
+ <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless,
{parts,
2}]))),
-?line <<":A:B:">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless]))),
-?line <<":BC">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless,
- trim]))),
-?line <<":BC:">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless,
- {parts,
- 2}]))),
-?line <<":BC:">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless,
- trim]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless,
- {parts,
+ <<"AA">> = iolist_to_binary(join(re:split("AA","multiple words of text",[caseless]))),
+ <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless,
+ trim]))),
+ <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless,
+ {parts,
+ 2}]))),
+ <<"UH-UH">> = iolist_to_binary(join(re:split("UH-UH","multiple words of text",[caseless]))),
+ <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless,
+ trim]))),
+ <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless,
+ {parts,
+ 2}]))),
+ <<":, YEAH">> = iolist_to_binary(join(re:split("MULTIPLE WORDS, YEAH","multiple words",[caseless]))),
+ <<":AB:DE">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless,
+ trim]))),
+ <<":AB:DE:">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless,
+ {parts,
+ 2}]))),
+ <<":AB:DE:">> = iolist_to_binary(join(re:split("ABCDE","(.*)c(.*)",[caseless]))),
+ <<":A:B">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless,
+ trim]))),
+ <<":A:B:">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:B:">> = iolist_to_binary(join(re:split("(A, B)","\\((.*), (.*)\\)",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ABCD","abcd",[caseless]))),
+ ok.
+run25() ->
+ <<":BC">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless,
+ trim]))),
+ <<":BC:">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless,
+ {parts,
+ 2}]))),
+ <<":BC:">> = iolist_to_binary(join(re:split("ABCD","a(bc)d",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("AC","a[-]?c",[caseless]))),
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless,
+ trim]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless]))),
+ <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless,
+ trim]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abad","a(?!b).",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?!b).",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?!b).",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abad","a(?=d).",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=d).",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=d).",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[{parts,
2}]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","(abc)\\1",[caseless]))),
-?line <<":ABC">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless,
- trim]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":ABC:">> = iolist_to_binary(join(re:split("ABCABC","([a-c]*)\\1",[caseless]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("abad","a(?!b).",[trim]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?!b).",[{parts,
- 2}]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?!b).",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("abad","a(?=d).",[trim]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=d).",[{parts,
- 2}]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=d).",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[trim]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[{parts,
- 2}]))),
-?line <<"ab:">> = iolist_to_binary(join(re:split("abad","a(?=c|d).",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[{parts,
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[{parts,
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)*(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[{parts,
- 2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[]))),
-?line <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[trim]))),
-?line <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[{parts,
- 2}]))),
-?line <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[{parts,
+ <<":e:">> = iolist_to_binary(join(re:split("ace","a(?:b|c|d)+?(.)",[]))),
+ <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[trim]))),
+ <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[]))),
-?line <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[trim]))),
-?line <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[{parts,
- 2}]))),
-?line <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[trim]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[{parts,
+ <<":d:bcdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+?(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[{parts,
+ 2}]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d)+(.)",[]))),
+ <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[trim]))),
+ <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[{parts,
+ 2}]))),
+ <<":b:cdbe">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){2}(.)",[]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[trim]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[{parts,
+ 2}]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[]))),
+ <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[trim]))),
+ <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[{parts,
2}]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}(.)",[]))),
-?line <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[trim]))),
-?line <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[{parts,
- 2}]))),
-?line <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[]))),
-?line <<":bar:foo:bar">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[trim]))),
-?line <<":bar:foo:bar:">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[{parts,
- 2}]))),
-?line <<":bar:foo:bar:">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[{parts,
+ <<":d:be">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){4,5}?(.)",[]))),
+ <<":bar:foo:bar">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[trim]))),
+ <<":bar:foo:bar:">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[{parts,
+ 2}]))),
+ <<":bar:foo:bar:">> = iolist_to_binary(join(re:split("foobar","((foo)|(bar))*",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[{parts,
+ 2}]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[{parts,
- 2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[{parts,
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){6,7}?(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[{parts,
+ 2}]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[trim]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}(.)",[]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[trim]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[{parts,
- 2}]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[]))),
-?line <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[trim]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[{parts,
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,6}?(.)",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[{parts,
+ 2}]))),
+ <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[]))),
+ ok.
+run26() ->
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[trim]))),
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[{parts,
2}]))),
-?line <<":e:">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}(.)",[]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[trim]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[{parts,
+ <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[]))),
+ <<":c:e">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[trim]))),
+ <<":c:e:">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[{parts,
2}]))),
-?line <<":b:e">> = iolist_to_binary(join(re:split("acdbcdbe","a(?:b|c|d){5,7}?(.)",[]))),
-?line <<":c:e">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[trim]))),
-?line <<":c:e:">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[{parts,
- 2}]))),
-?line <<":c:e:">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[]))),
-?line <<":A">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[{parts,
- 2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[]))),
-?line <<":.">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[trim]))),
-?line <<":.::">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[{parts,
- 2}]))),
-?line <<":.::">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[]))),
-?line <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[trim]))),
-?line <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[{parts,
- 2}]))),
-?line <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[]))),
-?line <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[{parts,
+ <<":c:e:">> = iolist_to_binary(join(re:split("ace","a(?:b|(c|e){1,2}?|d)+?(.)",[]))),
+ <<":A">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[trim]))),
+ <<":A:">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[{parts,
+ 2}]))),
+ <<":A:">> = iolist_to_binary(join(re:split("AB","^(.+)?B",[]))),
+ <<":.">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[trim]))),
+ <<":.::">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[{parts,
+ 2}]))),
+ <<":.::">> = iolist_to_binary(join(re:split(".","^([^a-z])|(\\^)$",[]))),
+ <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[trim]))),
+ <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[{parts,
+ 2}]))),
+ <<":OUT">> = iolist_to_binary(join(re:split("<&OUT","^[<>]&",[]))),
+ <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[]))),
-?line <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
- 2}]))),
-?line <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a\\1?){4}$",[]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[trim]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a\\1?){4}$",[]))),
+ <<":aaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
2}]))),
-?line <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
+ <<":aaaa:">> = iolist_to_binary(join(re:split("aaaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a(?(1)\\1)){4}$",[]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
+ 2}]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[trim]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
+ <<":f:o:o:b:a:r">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[trim]))),
+ <<":f:o:o:b:a:r:">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[{parts,
2}]))),
-?line <<"aaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaa","^(a(?(1)\\1)){4}$",[]))),
-?line <<":f:o:o:b:a:r">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[trim]))),
-?line <<":f:o:o:b:a:r:">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[{parts,
- 2}]))),
-?line <<":f:o:o:b:a:r:">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[{parts,
- 2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[trim]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[{parts,
- 2}]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[{parts,
+ <<":f:o:o:b:a:r:">> = iolist_to_binary(join(re:split("foobar","(?:(f)(o)(o)|(b)(a)(r))*",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[{parts,
2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[trim]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[{parts,
- 2}]))),
-?line <<"a:">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","(?<!c)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[{parts,
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?<=a)b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=a)b",[]))),
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[trim]))),
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","(?<!c)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[{parts,
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?<=a)b",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","(?<=a)b",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[]))),
-?line <<":b">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[trim]))),
-?line <<":ba">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[{parts,
- 2}]))),
-?line <<":b:">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[]))),
-?line <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[trim]))),
-?line <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[{parts,
- 2}]))),
-?line <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[{parts,
- 2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[{parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[]))),
-?line <<":a:a">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[trim]))),
-?line <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[{parts,
- 2}]))),
-?line <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[]))),
-?line <<":a:a">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[trim]))),
-?line <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[{parts,
- 2}]))),
-?line <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[]))),
-?line <<"c">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[trim]))),
-?line <<"c::">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[{parts,
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?<!c)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","(?<!c)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","(?<!c)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("b","(?<!c)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aba","(?:..)*a",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[trim]))),
+ <<":ba">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[{parts,
2}]))),
-?line <<"c::">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[]))),
-?line <<"c">> = iolist_to_binary(join(re:split("cab","(a)*ab",[trim]))),
-?line <<"c::">> = iolist_to_binary(join(re:split("cab","(a)*ab",[{parts,
- 2}]))),
-?line <<"c::">> = iolist_to_binary(join(re:split("cab","(a)*ab",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[{parts,
+ <<":b:">> = iolist_to_binary(join(re:split("aba","(?:..)*?a",[]))),
+ <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[trim]))),
+ <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[{parts,
+ 2}]))),
+ <<":b:c">> = iolist_to_binary(join(re:split("abc","^(?:b|a(?=(.)))*\\1",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[]))),
-?line <<":A">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[{parts,
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(){3,5}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[{parts,
2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[trim]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[{parts,
- 2}]))),
-?line <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[trim]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[{parts,
- 2}]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("aax","^(a+)*ax",[]))),
+ <<":a:a">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[trim]))),
+ <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[{parts,
+ 2}]))),
+ <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|b)+)*ax",[]))),
+ <<":a:a">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[trim]))),
+ <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[{parts,
+ 2}]))),
+ <<":a:a:">> = iolist_to_binary(join(re:split("aax","^((a|bc)+)*ax",[]))),
+ <<"c">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[trim]))),
+ <<"c::">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[{parts,
+ 2}]))),
+ <<"c::">> = iolist_to_binary(join(re:split("cab","(a|x)*ab",[]))),
+ <<"c">> = iolist_to_binary(join(re:split("cab","(a)*ab",[trim]))),
+ <<"c::">> = iolist_to_binary(join(re:split("cab","(a)*ab",[{parts,
+ 2}]))),
+ <<"c::">> = iolist_to_binary(join(re:split("cab","(a)*ab",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("ab","(?:(?i)a)b",[]))),
+ ok.
+run27() ->
+ <<":a">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[]))),
-?line <<":A">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[trim]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?i)a)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[{parts,
2}]))),
-?line <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[trim]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("Ab","(?:(?i)a)b",[]))),
+ <<":A">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[trim]))),
+ <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[{parts,
2}]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[trim]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[{parts,
- 2}]))),
-?line <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless,
- trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
- trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
- trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless,
- trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless,
+ <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i)a)b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?i)a)b",[]))),
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[trim]))),
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[{parts,
+ 2}]))),
+ <<"cb">> = iolist_to_binary(join(re:split("cb","(?:(?i)a)b",[]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[{parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?:(?i)a)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?i:a)b",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?i:a))b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("Ab","(?i:a)b",[]))),
+ <<":A">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[trim]))),
+ <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[{parts,
+ 2}]))),
+ <<":A:">> = iolist_to_binary(join(re:split("Ab","((?i:a))b",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i:a)b",[]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[{parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[{parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:a)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless,
trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("ab","(?:(?-i)a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless,
trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i)a)b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
- trim]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
trim]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
- trim]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
- {parts,
- 2}]))),
-?line <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?:(?-i)a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless,
{parts,
2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless,
- trim]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless,
- {parts,
- 2}]))),
-?line <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless]))),
-?line <<"a
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i)a)b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?:(?-i)a)b",[caseless]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?:(?-i)a)b",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless,
+ trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?:(?-i)a)b",[caseless]))),
+ ok.
+run28() ->
+ <<"">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?-i:a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless,
+ trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless,
+ {parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ab","((?-i:a))b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ {parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
+ trim]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aB","(?-i:a)b",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless,
+ {parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aB","((?-i:a))b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?-i:a)b",[caseless]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
+ trim]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"Ab">> = iolist_to_binary(join(re:split("Ab","(?-i:a)b",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","(?-i:a)b",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?-i:a.))b",[caseless]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless,
+ trim]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless,
+ {parts,
+ 2}]))),
+ <<"AB">> = iolist_to_binary(join(re:split("AB","((?-i:a.))b",[caseless]))),
+ <<"a
B">> = iolist_to_binary(join(re:split("a
B","((?-i:a.))b",[caseless,trim]))),
-?line <<"a
+ <<"a
B">> = iolist_to_binary(join(re:split("a
B","((?-i:a.))b",[caseless,{parts,2}]))),
-?line <<"a
+ <<"a
B">> = iolist_to_binary(join(re:split("a
B","((?-i:a.))b",[caseless]))),
-?line <<":a
+ <<":a
">> = iolist_to_binary(join(re:split("a
B","((?s-i:a.))b",[caseless,trim]))),
-?line <<":a
+ <<":a
:">> = iolist_to_binary(join(re:split("a
B","((?s-i:a.))b",[caseless,{parts,2}]))),
-?line <<":a
+ <<":a
:">> = iolist_to_binary(join(re:split("a
B","((?s-i:a.))b",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[]))),
-?line <<":Ab">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless,
- trim]))),
-?line <<":Ab:">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":Ab:">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless]))),
-?line <<":ab">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless,
- trim]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless,
- {parts,
- 2}]))),
-?line <<":ab:">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[]))),
-?line <<":~~">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[trim]))),
-?line <<":~~:">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("cabbbb","(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))",[]))),
+ <<"">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))",[]))),
+ <<":Ab">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless,
+ trim]))),
+ <<":Ab:">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":Ab:">> = iolist_to_binary(join(re:split("Ab4ab","(ab)\\d\\1",[caseless]))),
+ <<":ab">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless,
+ trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("ab4Ab","(ab)\\d\\1",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("foobar1234baz","foo\\w*\\d{4}baz",[]))),
+ <<":~~">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[trim]))),
+ <<":~~:">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[{parts,
+ 2}]))),
+ <<":~~:">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended]))),
+ ok.
+run29() ->
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[{parts,
2}]))),
-?line <<":~~:">> = iolist_to_binary(join(re:split("x~~","x(~~)*(?:(?:F)?)?",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaac","^a(?#xxx){3}c",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaac","^a (?#xxx) (?#yyy) {3}c",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[]))),
-?line <<"B
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<![cd])b",[]))),
+ <<"B
B">> = iolist_to_binary(join(re:split("B
B","(?<![cd])b",[trim]))),
-?line <<"B
+ <<"B
B">> = iolist_to_binary(join(re:split("B
B","(?<![cd])b",[{parts,2}]))),
-?line <<"B
+ <<"B
B">> = iolist_to_binary(join(re:split("B
B","(?<![cd])b",[]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[trim]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[{parts,
- 2}]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[]))),
-?line <<"db::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[trim]))),
-?line <<"db:acb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[{parts,
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[trim]))),
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[{parts,
+ 2}]))),
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","(?<![cd])b",[]))),
+ <<"db::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[trim]))),
+ <<"db:acb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[{parts,
+ 2}]))),
+ <<"db::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[]))),
+ <<"db::::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[trim]))),
+ <<"db::acb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[{parts,
2}]))),
-?line <<"db::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<![cd])[ab]",[]))),
-?line <<"db::::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[trim]))),
-?line <<"db::acb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[{parts,
- 2}]))),
-?line <<"db::::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[]))),
-?line <<"cdacc">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[trim]))),
-?line <<"cdacc:">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[{parts,
- 2}]))),
-?line <<"cdacc:">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[trim]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[{parts,
+ <<"db::::cb">> = iolist_to_binary(join(re:split("dbaacb","(?<!(c|d))[ab]",[]))),
+ <<"cdacc">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[trim]))),
+ <<"cdacc:">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[{parts,
+ 2}]))),
+ <<"cdacc:">> = iolist_to_binary(join(re:split("cdaccb","(?<!cd)[ab]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[trim]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[{parts,
+ 2}]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[{parts,
2}]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?:a?b?)*$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^(?:a?b?)*$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab","^(?:a?b?)*$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[]))),
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[trim]))),
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaa","^(?:a?b?)*$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:a?b?)*$",[]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[trim]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[{parts,
- 2}]))),
-?line <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[]))),
-?line <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[trim]))),
-?line <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[{parts,
+ <<"dbcb">> = iolist_to_binary(join(re:split("dbcb","^(?:a?b?)*$",[]))),
+ <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[trim]))),
+ <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[{parts,
+ 2}]))),
+ <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[]))),
+ <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[trim]))),
+ <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[{parts,
2}]))),
-?line <<"a--">> = iolist_to_binary(join(re:split("a--","^(?:a?b?)*$",[]))),
-?line <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[trim]))),
-?line <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[{parts,
- 2}]))),
-?line <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[]))),
-?line <<":a
+ <<"aa--">> = iolist_to_binary(join(re:split("aa--","^(?:a?b?)*$",[]))),
+ <<":a
:
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?s)^a(.))((?m)^b$)",[trim]))),
-?line <<":a
+ <<":a
:
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?s)^a(.))((?m)^b$)",[{parts,2}]))),
-?line <<":a
+ <<":a
:
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?s)^a(.))((?m)^b$)",[]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b$)",[trim]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b$)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b$)",[]))),
-?line <<"a
+ <<"a
">> = iolist_to_binary(join(re:split("a
b","(?m)^b",[trim]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","(?m)^b",[{parts,2}]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","(?m)^b",[]))),
-?line <<"a
+ <<"a
:b">> = iolist_to_binary(join(re:split("a
b","(?m)^(b)",[trim]))),
-?line <<"a
+ <<"a
:b:">> = iolist_to_binary(join(re:split("a
b","(?m)^(b)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b:">> = iolist_to_binary(join(re:split("a
b","(?m)^(b)",[]))),
-?line <<"a
+ <<"a
:b">> = iolist_to_binary(join(re:split("a
b","((?m)^b)",[trim]))),
-?line <<"a
+ <<"a
:b:">> = iolist_to_binary(join(re:split("a
b","((?m)^b)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b:">> = iolist_to_binary(join(re:split("a
b","((?m)^b)",[]))),
-?line <<"a:b">> = iolist_to_binary(join(re:split("a
+ <<"a:b">> = iolist_to_binary(join(re:split("a
b","\\n((?m)^b)",[trim]))),
-?line <<"a:b:">> = iolist_to_binary(join(re:split("a
+ <<"a:b:">> = iolist_to_binary(join(re:split("a
b","\\n((?m)^b)",[{parts,2}]))),
-?line <<"a:b:">> = iolist_to_binary(join(re:split("a
+ <<"a:b:">> = iolist_to_binary(join(re:split("a
b","\\n((?m)^b)",[]))),
-?line <<"a
+ <<"a
b:
">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[trim]))),
-?line <<"a
+ <<"a
b:
:">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[{parts,2}]))),
-?line <<"a
+ <<"a
b:
:">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[]))),
-?line <<"a
+ <<"a
b:
">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[trim]))),
-?line <<"a
+ <<"a
b:
:">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[{parts,2}]))),
-?line <<"a
+ <<"a
b:
:">> = iolist_to_binary(join(re:split("a
b
c","((?s).)c(?!.)",[]))),
-?line <<"a
+ <<"a
:b
">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[trim]))),
-?line <<"a
+ <<"a
:b
:">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b
:">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[]))),
-?line <<"a
+ <<"a
:b
">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[trim]))),
-?line <<"a
+ <<"a
:b
:">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b
:">> = iolist_to_binary(join(re:split("a
b
c","((?s)b.)c(?!.)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[]))),
-?line <<"a
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","()^b",[]))),
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[trim]))),
-?line <<"a
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[{parts,2}]))),
-?line <<"a
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[]))),
-?line <<"a
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[trim]))),
-?line <<"a
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[{parts,2}]))),
-?line <<"a
+ <<"a
b
c">> = iolist_to_binary(join(re:split("a
b
c","()^b",[]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b)",[trim]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b)",[{parts,2}]))),
-?line <<"a
+ <<"a
:b:
c">> = iolist_to_binary(join(re:split("a
b
c","((?m)^b)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[{parts,
- 2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[{parts,
- 2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(x)?(?(1)a|b)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[{parts,
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[{parts,
2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[]))),
-?line <<":(:)">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[{parts,
+ <<"a">> = iolist_to_binary(join(re:split("a","(x)?(?(1)a|b)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","(x)?(?(1)b|a)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)b|a)",[]))),
+ ok.
+run30() ->
+ <<"">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","()?(?(1)a|b)",[]))),
+ <<":(:)">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[trim]))),
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[{parts,
+ 2}]))),
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[]))),
+ <<":(:)">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
+ <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[{parts,
2}]))),
-?line <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[{parts,
+ <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[{parts,
2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("blah","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[{parts,
+ <<":::">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[{parts,
- 2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[{parts,
- 2}]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[trim]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[]))),
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[{parts,
2}]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\()?blah(?(1)(\\)))$",[]))),
-?line <<":(:)">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
-?line <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[{parts,
- 2}]))),
-?line <<":(:):">> = iolist_to_binary(join(re:split("(blah)","^(\\(+)?blah(?(1)(\\)))$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[{parts,
+ <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[]))),
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[{parts,
2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("blah","^(\\(+)?blah(?(1)(\\)))$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\(+)?blah(?(1)(\\)))$",[]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[{parts,
+ <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[]))),
+ <<"a:a:aab">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[trim]))),
+ <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[{parts,
+ 2}]))),
+ <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[]))),
+ <<":one:">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[trim]))),
+ <<":one::">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[{parts,
+ 2}]))),
+ <<":one::">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[]))),
+ <<"a:a">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[trim]))),
+ <<"a:a:">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[{parts,
+ 2}]))),
+ <<"a:a:">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[]))),
+ <<"a:a:aab">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[trim]))),
+ <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[{parts,
+ 2}]))),
+ <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[trim]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[{parts,
+ 2}]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[trim]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[{parts,
+ 2}]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[]))),
+ <<"::abcd">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[{parts,
+ 2}]))),
+ <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[]))),
+ <<":xy:z::::abcd">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[{parts,
2}]))),
-?line <<"blah)">> = iolist_to_binary(join(re:split("blah)","^(\\(+)?blah(?(1)(\\)))$",[]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[trim]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[{parts,
+ <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[trim]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[{parts,
+ 2}]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[]))),
+ <<"c:aa">> = iolist_to_binary(join(re:split("caab","(a*)b+",[trim]))),
+ <<"c:aa:">> = iolist_to_binary(join(re:split("caab","(a*)b+",[{parts,
+ 2}]))),
+ <<"c:aa:">> = iolist_to_binary(join(re:split("caab","(a*)b+",[]))),
+ <<"::abcd">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[{parts,
+ 2}]))),
+ <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[]))),
+ <<":xy:z::::abcd">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[{parts,
2}]))),
-?line <<"(blah">> = iolist_to_binary(join(re:split("(blah","^(\\(+)?blah(?(1)(\\)))$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[{parts,
+ <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[]))),
+ <<"*** ::Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<"*** ::Failers:">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[{parts,
+ 2}]))),
+ <<"*** ::Failers:">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[{parts,
+ 2}]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[trim]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[{parts,
+ 2}]))),
+ <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[trim]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[{parts,
+ 2}]))),
+ <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[]))),
+ ok.
+run31() ->
+ <<"">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[]))),
+ <<"a::[:b]::">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[trim]))),
+ <<"a::[:b]:">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?(?!a)b|a)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?(?=a)b|a)",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[{parts,
+ <<"a::[:b]:::">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[]))),
+ <<"a:=[:b]:=">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[trim]))),
+ <<"a:=[:b]=">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[{parts,
2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[trim]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[{parts,
+ <<"a:=[:b]:=:">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[]))),
+ <<"a:.[:b]:.">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[trim]))),
+ <<"a:.[:b].">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[{parts,
2}]))),
-?line <<"a">> = iolist_to_binary(join(re:split("a","(?(?=a)b|a)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[{parts,
+ <<"a:.[:b]:.:">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[]))),
+ <<":aaab">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[trim]))),
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","(?(?=a)a|b)",[]))),
-?line <<"a:a:aab">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[trim]))),
-?line <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[{parts,
- 2}]))),
-?line <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[]))),
-?line <<":one:">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[trim]))),
-?line <<":one::">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[{parts,
- 2}]))),
-?line <<":one::">> = iolist_to_binary(join(re:split("one:","(\\w+:)+",[]))),
-?line <<"a:a">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[trim]))),
-?line <<"a:a:">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[{parts,
- 2}]))),
-?line <<"a:a:">> = iolist_to_binary(join(re:split("a","$(?<=^(a))",[]))),
-?line <<"a:a:aab">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[trim]))),
-?line <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[{parts,
- 2}]))),
-?line <<"a:a:aab:">> = iolist_to_binary(join(re:split("aaab","(?=(a+?))(\\1ab)",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?=(a+?))\\1ab",[]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[trim]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[{parts,
- 2}]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[trim]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[{parts,
- 2}]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","^(?=(a+?))\\1ab",[]))),
-?line <<"::abcd">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[]))),
-?line <<":xy:z::::abcd">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[trim]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[{parts,
- 2}]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[]))),
-?line <<"c:aa">> = iolist_to_binary(join(re:split("caab","(a*)b+",[trim]))),
-?line <<"c:aa:">> = iolist_to_binary(join(re:split("caab","(a*)b+",[{parts,
- 2}]))),
-?line <<"c:aa:">> = iolist_to_binary(join(re:split("caab","(a*)b+",[]))),
-?line <<"::abcd">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<"::abcd:">> = iolist_to_binary(join(re:split("abcd","([\\w:]+::)?(\\w+)$",[]))),
-?line <<":xy:z::::abcd">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<":xy:z::::abcd:">> = iolist_to_binary(join(re:split("xy:z:::abcd","([\\w:]+::)?(\\w+)$",[]))),
-?line <<"*** ::Failers">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<"*** ::Failers:">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<"*** ::Failers:">> = iolist_to_binary(join(re:split("*** Failers","([\\w:]+::)?(\\w+)$",[]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[trim]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[{parts,
- 2}]))),
-?line <<"abcd:">> = iolist_to_binary(join(re:split("abcd:","([\\w:]+::)?(\\w+)$",[]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[trim]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[{parts,
- 2}]))),
-?line <<":c:d">> = iolist_to_binary(join(re:split("aexycd","^[^bcd]*(c+)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaab","(?>a+)b",[]))),
-?line <<"a::[:b]::">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[trim]))),
-?line <<"a::[:b]:">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[{parts,
- 2}]))),
-?line <<"a::[:b]:::">> = iolist_to_binary(join(re:split("a:[b]:","([[:]+)",[]))),
-?line <<"a:=[:b]:=">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[trim]))),
-?line <<"a:=[:b]=">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[{parts,
- 2}]))),
-?line <<"a:=[:b]:=:">> = iolist_to_binary(join(re:split("a=[b]=","([[=]+)",[]))),
-?line <<"a:.[:b]:.">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[trim]))),
-?line <<"a:.[:b].">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[{parts,
- 2}]))),
-?line <<"a:.[:b]:.:">> = iolist_to_binary(join(re:split("a.[b].","([[.]+)",[]))),
-?line <<":aaab">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[trim]))),
-?line <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[{parts,
- 2}]))),
-?line <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[]))),
-?line <<":aaa">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[trim]))),
-?line <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[{parts,
- 2}]))),
-?line <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[]))),
-?line <<"((:x">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[trim]))),
-?line <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[{parts,
- 2}]))),
-?line <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[trim]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[{parts,
- 2}]))),
-?line <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[]))),
-?line <<"a
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","((?>a+)b)",[]))),
+ <<":aaa">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[trim]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[{parts,
+ 2}]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(?>(a+))b",[]))),
+ <<"((:x">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[trim]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[{parts,
+ 2}]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","((?>[^()]+)|\\([^()]*\\))+",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a\\Z",[]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[trim]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[{parts,
+ 2}]))),
+ <<"aaab">> = iolist_to_binary(join(re:split("aaab","a\\Z",[]))),
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a\\Z",[trim]))),
-?line <<"a
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a\\Z",[{parts,2}]))),
-?line <<"a
+ <<"a
b">> = iolist_to_binary(join(re:split("a
b","a\\Z",[]))),
-?line <<"a
+ <<"a
">> = iolist_to_binary(join(re:split("a
b","b\\Z",[trim]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\Z",[{parts,2}]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\Z",[]))),
-?line <<"a
+ <<"a
">> = iolist_to_binary(join(re:split("a
b","b\\Z",[trim]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\Z",[{parts,2}]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\Z",[]))),
-?line <<"a
+ <<"a
">> = iolist_to_binary(join(re:split("a
b","b\\z",[trim]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\z",[{parts,2}]))),
-?line <<"a
+ <<"a
:">> = iolist_to_binary(join(re:split("a
b","b\\z",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","b\\z",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
2}]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
2}]))),
-?line <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("abc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
2}]))),
-?line <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("a-b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
2}]))),
-?line <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("0-9","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
2}]))),
-?line <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
-?line <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
- 2}]))),
-?line <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
-?line <<":abcd">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[trim]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[{parts,
- 2}]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[]))),
-?line <<":wxyz">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[trim]))),
-?line <<":wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[{parts,
- 2}]))),
-?line <<":wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[{parts,
+ <<"::">> = iolist_to_binary(join(re:split("a.b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("5.6.7","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("the.quick.brown.fox","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a100.b200.300c","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("12-ab.1245","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"">> = iolist_to_binary(join(re:split("","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<".a">> = iolist_to_binary(join(re:split(".a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"-a">> = iolist_to_binary(join(re:split("-a","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"a-">> = iolist_to_binary(join(re:split("a-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"a.">> = iolist_to_binary(join(re:split("a.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"a_b">> = iolist_to_binary(join(re:split("a_b","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"a.-">> = iolist_to_binary(join(re:split("a.-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"a..">> = iolist_to_binary(join(re:split("a..","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"ab..bc">> = iolist_to_binary(join(re:split("ab..bc","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"the.quick.brown.fox-">> = iolist_to_binary(join(re:split("the.quick.brown.fox-","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"the.quick.brown.fox.">> = iolist_to_binary(join(re:split("the.quick.brown.fox.","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"the.quick.brown.fox_">> = iolist_to_binary(join(re:split("the.quick.brown.fox_","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[trim]))),
+ <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[{parts,
+ 2}]))),
+ <<"the.quick.brown.fox+">> = iolist_to_binary(join(re:split("the.quick.brown.fox+","^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$",[]))),
+ <<":abcd">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[trim]))),
+ <<":abcd:">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[]))),
-?line <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[trim]))),
-?line <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[{parts,
- 2}]))),
-?line <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[trim]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[{parts,
- 2}]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[trim]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[{parts,
- 2}]))),
-?line <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[]))),
-?line <<"999">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[trim]))),
-?line <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[{parts,
- 2}]))),
-?line <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[]))),
-?line <<"123999">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[trim]))),
-?line <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[{parts,
- 2}]))),
-?line <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[{parts,
+ <<":abcd:">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd|wxyz))",[]))),
+ <<":wxyz">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[trim]))),
+ <<":wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[{parts,
+ 2}]))),
+ <<":wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd|wxyz))",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?>.*)(?<=(abcd|wxyz))",[]))),
+ <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[trim]))),
+ <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[{parts,
+ 2}]))),
+ <<"a rather long string that doesn't end with one of them">> = iolist_to_binary(join(re:split("a rather long string that doesn't end with one of them","(?>.*)(?<=(abcd|wxyz))",[]))),
+ <<"">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark otherword","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[trim]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[{parts,
+ 2}]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark","word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword",[]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[trim]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[{parts,
+ 2}]))),
+ <<"word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope">> = iolist_to_binary(join(re:split("word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope","word (?>[a-zA-Z0-9]+ ){0,30}otherword",[]))),
+ <<"999">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[trim]))),
+ <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[{parts,
+ 2}]))),
+ <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=\\d{3}(?!999))foo",[]))),
+ <<"123999">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[trim]))),
+ <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[{parts,
+ 2}]))),
+ <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999))foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[trim]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[{parts,
+ 2}]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[]))),
+ <<"999">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[trim]))),
+ <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[{parts,
+ 2}]))),
+ <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[]))),
+ <<"123999">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[trim]))),
+ <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999))foo",[]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[trim]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[{parts,
- 2}]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999))foo",[]))),
-?line <<"999">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[trim]))),
-?line <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[{parts,
- 2}]))),
-?line <<"999:">> = iolist_to_binary(join(re:split("999foo","(?<=(?!...999)\\d{3})foo",[]))),
-?line <<"123999">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[trim]))),
-?line <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[{parts,
- 2}]))),
-?line <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[trim]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[{parts,
- 2}]))),
-?line <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[]))),
-?line <<"123abc">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[trim]))),
-?line <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ <<"123999:">> = iolist_to_binary(join(re:split("123999foo","(?<=(?!...999)\\d{3})foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=(?!...999)\\d{3})foo",[]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[trim]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[{parts,
+ 2}]))),
+ <<"123abcfoo">> = iolist_to_binary(join(re:split("123abcfoo","(?<=(?!...999)\\d{3})foo",[]))),
+ <<"123abc">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[trim]))),
+ <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ 2}]))),
+ <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[]))),
+ <<"123456">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[trim]))),
+ <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ 2}]))),
+ <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[]))),
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[trim]))),
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ 2}]))),
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[]))),
+ <<"123abc">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
+ <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[{parts,
2}]))),
-?line <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}(?!999)...)foo",[]))),
-?line <<"123456">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[trim]))),
-?line <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[]))),
+ <<"123456">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
+ <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[{parts,
2}]))),
-?line <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}(?!999)...)foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[{parts,
+ <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[{parts,
2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}(?!999)...)foo",[]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[trim]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[{parts,
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[]))),
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[{parts,
2}]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}(?!999)...)foo",[]))),
-?line <<"123abc">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
-?line <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[{parts,
- 2}]))),
-?line <<"123abc:">> = iolist_to_binary(join(re:split("123abcfoo","(?<=\\d{3}...)(?<!999)foo",[]))),
-?line <<"123456">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
-?line <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[{parts,
- 2}]))),
-?line <<"123456:">> = iolist_to_binary(join(re:split("123456foo","(?<=\\d{3}...)(?<!999)foo",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?<=\\d{3}...)(?<!999)foo",[]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[trim]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[{parts,
- 2}]))),
-?line <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<"123999foo">> = iolist_to_binary(join(re:split("123999foo","(?<=\\d{3}...)(?<!999)foo",[]))),
+ ok.
+run32() ->
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -27999,20 +28106,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28020,20 +28127,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28041,20 +28148,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href='abcd xyz pqr' cats","<a[\\s]+href[\\s]*=[\\s]* # find <a href=
([\\\"\\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\\s]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28062,20 +28169,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28083,20 +28190,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28104,20 +28211,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href\\s*=\\s* # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28125,20 +28232,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":::abcd: xyz">> = iolist_to_binary(join(re:split("<a href=abcd xyz","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28146,20 +28253,20 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":\":abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href=\"abcd xyz pqr\" cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended,
trim]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
@@ -28167,321 +28274,323 @@ b","b\\z",[]))),
extended,
{parts,
2}]))),
-?line <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
+ <<":':abcd xyz pqr:: cats">> = iolist_to_binary(join(re:split("<a href = 'abcd xyz pqr' cats","<a\\s+href(?>\\s*)=(?>\\s*) # find <a href=
([\"'])? # find single or double quote
(?(1) (.*?)\\1 | (\\S+)) # if quote found, match up to next matching
# quote, otherwise match up to next space",[caseless,
dotall,
extended]))),
-?line <<":A:Z:B:::C:::D:::E:::F:::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[trim]))),
-?line <<":A:Z:BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[{parts,
- 2}]))),
-?line <<":A:Z:B:::C:::D:::E:::F:::G:::">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[]))),
-?line <<":A::B:::C:::D:::E:::F:::G">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[trim]))),
-?line <<":A::BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[{parts,
+ <<":A:Z:B:::C:::D:::E:::F:::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[trim]))),
+ <<":A:Z:BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[{parts,
2}]))),
-?line <<":A::B:::C:::D:::E:::F:::G:::">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[]))),
-?line <<":A:::B::::C::::D::::E::::F::::G">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[trim]))),
-?line <<":A:::BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[{parts,
- 2}]))),
-?line <<":A:::B::::C::::D::::E::::F::::G::::">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[]))),
-?line <<":A:B::C::D::E::F::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[trim]))),
-?line <<":A:BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[{parts,
- 2}]))),
-?line <<":A:B::C::D::E::F::G::">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[]))),
-?line <<"Z::::B::C::D::E::F::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[trim]))),
-?line <<"Z::ABCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[{parts,
+ <<":A:Z:B:::C:::D:::E:::F:::G:::">> = iolist_to_binary(join(re:split("ZABCDEFG","((Z)+|A)*",[]))),
+ <<":A::B:::C:::D:::E:::F:::G">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[trim]))),
+ <<":A::BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[{parts,
+ 2}]))),
+ <<":A::B:::C:::D:::E:::F:::G:::">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z()|A)*",[]))),
+ <<":A:::B::::C::::D::::E::::F::::G">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[trim]))),
+ <<":A:::BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[{parts,
+ 2}]))),
+ <<":A:::B::::C::::D::::E::::F::::G::::">> = iolist_to_binary(join(re:split("ZABCDEFG","(Z(())|A)*",[]))),
+ <<":A:B::C::D::E::F::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[trim]))),
+ <<":A:BCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[{parts,
2}]))),
-?line <<"Z::::B::C::D::E::F::G::">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[]))),
-?line <<":b:b:b">> = iolist_to_binary(join(re:split("abbab","a*",[trim]))),
-?line <<":bbab">> = iolist_to_binary(join(re:split("abbab","a*",[{parts,
- 2}]))),
-?line <<":b:b:b:">> = iolist_to_binary(join(re:split("abbab","a*",[]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[trim]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[{parts,
- 2}]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[trim]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[{parts,
- 2}]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[trim]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[{parts,
+ <<":A:B::C::D::E::F::G::">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>Z)+|A)*",[]))),
+ <<"Z::::B::C::D::E::F::G">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[trim]))),
+ <<"Z::ABCDEFG">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[{parts,
+ 2}]))),
+ <<"Z::::B::C::D::E::F::G::">> = iolist_to_binary(join(re:split("ZABCDEFG","((?>)+|A)*",[]))),
+ <<":b:b:b">> = iolist_to_binary(join(re:split("abbab","a*",[trim]))),
+ <<":bbab">> = iolist_to_binary(join(re:split("abbab","a*",[{parts,
+ 2}]))),
+ <<":b:b:b:">> = iolist_to_binary(join(re:split("abbab","a*",[]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[trim]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[{parts,
+ 2}]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[a-\\d]",[]))),
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[trim]))),
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[{parts,
2}]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[trim]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[{parts,
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[a-\\d]",[]))),
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[trim]))),
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[{parts,
2}]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[trim]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[{parts,
- 2}]))),
-?line <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[trim]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[{parts,
- 2}]))),
-?line <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[trim]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[{parts,
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[a-\\d]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[a-\\d]",[]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[trim]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[{parts,
+ 2}]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[a-\\d]",[]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[trim]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[{parts,
+ 2}]))),
+ <<":bcde">> = iolist_to_binary(join(re:split("abcde","^[\\d-a]",[]))),
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[trim]))),
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[{parts,
2}]))),
-?line <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[trim]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[{parts,
+ <<":things">> = iolist_to_binary(join(re:split("-things","^[\\d-a]",[]))),
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[trim]))),
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[{parts,
2}]))),
-?line <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[]))),
-?line <<">:<">> = iolist_to_binary(join(re:split(">
+ <<":digit">> = iolist_to_binary(join(re:split("0digit","^[\\d-a]",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^[\\d-a]",[]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[trim]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[{parts,
+ 2}]))),
+ <<"bcdef">> = iolist_to_binary(join(re:split("bcdef","^[\\d-a]",[]))),
+ <<">:<">> = iolist_to_binary(join(re:split(">
<","[[:space:]]+",[trim]))),
-?line <<">:<">> = iolist_to_binary(join(re:split(">
+ <<">:<">> = iolist_to_binary(join(re:split(">
<","[[:space:]]+",[{parts,2}]))),
-?line <<">:<">> = iolist_to_binary(join(re:split(">
+ <<">:<">> = iolist_to_binary(join(re:split(">
<","[[:space:]]+",[]))),
-?line <<">:
+ <<">:
<">> = iolist_to_binary(join(re:split(">
<","[[:blank:]]+",[trim]))),
-?line <<">:
+ <<">:
<">> = iolist_to_binary(join(re:split(">
<","[[:blank:]]+",[{parts,2}]))),
-?line <<">:
+ <<">:
<">> = iolist_to_binary(join(re:split(">
<","[[:blank:]]+",[]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","[\\s]+",[trim]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","[\\s]+",[{parts,2}]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","[\\s]+",[]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","\\s+",[trim]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","\\s+",[{parts,2}]))),
-?line <<">: <">> = iolist_to_binary(join(re:split(">
+ <<">: <">> = iolist_to_binary(join(re:split(">
<","\\s+",[]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended,
- trim]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended,
- {parts,
- 2}]))),
-?line <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended]))),
-?line <<"a
+ <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended,
+ trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended,
+ {parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","a b",[extended]))),
+ <<"a
:b">> = iolist_to_binary(join(re:split("a
xb","(?!\\A)x",[multiline,trim]))),
-?line <<"a
+ <<"a
:b">> = iolist_to_binary(join(re:split("a
xb","(?!\\A)x",[multiline,{parts,2}]))),
-?line <<"a
+ <<"a
:b">> = iolist_to_binary(join(re:split("a
xb","(?!\\A)x",[multiline]))),
-?line <<"a
+ <<"a
xb">> = iolist_to_binary(join(re:split("a
xb","(?!^)x",[multiline,trim]))),
-?line <<"a
+ <<"a
xb">> = iolist_to_binary(join(re:split("a
xb","(?!^)x",[multiline,{parts,2}]))),
-?line <<"a
+ <<"a
xb">> = iolist_to_binary(join(re:split("a
xb","(?!^)x",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended,
- trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended,
- {parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended]))),
-?line <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended,
+ <<"">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcabcabc","abc\\Qabc\\Eabc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc(*+|abc","abc\\Q(*+|\\Eabc",[]))),
+ ok.
+run33() ->
+ <<"">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended,
trim]))),
-?line <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended,
+ <<":">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended,
{parts,
2}]))),
-?line <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc abcabc"," abc\\Q abc\\Eabc",[extended]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers"," abc\\Q abc\\Eabc",[extended]))),
+ <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended,
+ trim]))),
+ <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended,
+ {parts,
+ 2}]))),
+ <<"abcabcabc">> = iolist_to_binary(join(re:split("abcabcabc"," abc\\Q abc\\Eabc",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc#not comment
+ <<"">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc#not comment
+ <<"">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment
",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment
",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment
",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc#not comment
+ <<"">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc#not comment
+ <<":">> = iolist_to_binary(join(re:split("abc#not comment
literal","abc#comment
\\Q#not comment
literal\\E #more comment",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[]))),
-?line <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[trim]))),
-?line <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[{parts,
- 2}]))),
-?line <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[]))),
-?line <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[trim]))),
-?line <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[{parts,
- 2}]))),
-?line <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[]))),
-?line <<"::xyz">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[trim]))),
-?line <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[{parts,
- 2}]))),
-?line <<"::xyz:">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[trim]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc\\$xyz","\\Qabc\\$xyz\\E",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc$xyz","\\Qabc\\E\\$\\Qxyz\\E",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","\\Aabc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","\\Aabc",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\Aabc",[]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[trim]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[{parts,
+ 2}]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","\\Aabc",[]))),
+ <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[trim]))),
+ <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[{parts,
+ 2}]))),
+ <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","\\Aabc.",[]))),
+ <<"::xyz">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[trim]))),
+ <<":abc2xyzabc3">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[{parts,
2}]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[]))),
-?line <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[trim]))),
-?line <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[{parts,
- 2}]))),
-?line <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[]))),
-?line <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[trim]))),
-?line <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[{parts,
- 2}]))),
-?line <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[]))),
-?line <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[trim]))),
-?line <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[{parts,
- 2}]))),
-?line <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[trim]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[{parts,
- 2}]))),
-?line <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[]))),
-?line <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[trim]))),
-?line <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[{parts,
+ <<"::xyz:">> = iolist_to_binary(join(re:split("abc1abc2xyzabc3","abc.",[]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[trim]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[{parts,
2}]))),
-?line <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[]))),
-?line <<":abC">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<":abC:">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<":abC:">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[]))),
-?line <<":D">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<":D:">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<":D:">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[]))),
-?line <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[]))),
-?line <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[]))),
-?line <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[]))),
-?line <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[trim]))),
-?line <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[{parts,
- 2}]))),
-?line <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[{parts,
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabcdY","a(?x: b c )d",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","a(?x: b c )d",[]))),
+ <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[trim]))),
+ <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[{parts,
2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[]))),
-?line <<"a:bc">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[trim]))),
-?line <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[{parts,
+ <<"Xa b c d Y">> = iolist_to_binary(join(re:split("Xa b c d Y","a(?x: b c )d",[]))),
+ <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[trim]))),
+ <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[{parts,
+ 2}]))),
+ <<"X:abc:Y">> = iolist_to_binary(join(re:split("XabcY","((?x)x y z | a b c)",[]))),
+ <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[trim]))),
+ <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[{parts,
+ 2}]))),
+ <<"A:xyz:B">> = iolist_to_binary(join(re:split("AxyzB","((?x)x y z | a b c)",[]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[trim]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[{parts,
+ 2}]))),
+ <<"X:Y">> = iolist_to_binary(join(re:split("XabCY","(?i)AB(?-i)C",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(?i)AB(?-i)C",[]))),
+ <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[trim]))),
+ <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[{parts,
+ 2}]))),
+ <<"XabcY">> = iolist_to_binary(join(re:split("XabcY","(?i)AB(?-i)C",[]))),
+ <<":abC">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[trim]))),
+ <<":abC:">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[{parts,
2}]))),
-?line <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[]))),
-?line <<":abc">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall,
- trim]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall,
- {parts,
- 2}]))),
-?line <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall]))),
-?line <<"a:bc">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall,
+ <<":abC:">> = iolist_to_binary(join(re:split("abCE","((?i)AB(?-i)C|D)E",[]))),
+ <<":D">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[trim]))),
+ <<":D:">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<":D:">> = iolist_to_binary(join(re:split("DE","((?i)AB(?-i)C|D)E",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((?i)AB(?-i)C|D)E",[]))),
+ <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[trim]))),
+ <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<"abcE">> = iolist_to_binary(join(re:split("abcE","((?i)AB(?-i)C|D)E",[]))),
+ <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[trim]))),
+ <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<"abCe">> = iolist_to_binary(join(re:split("abCe","((?i)AB(?-i)C|D)E",[]))),
+ <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[trim]))),
+ <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<"dE">> = iolist_to_binary(join(re:split("dE","((?i)AB(?-i)C|D)E",[]))),
+ <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[trim]))),
+ <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[{parts,
+ 2}]))),
+ <<"De">> = iolist_to_binary(join(re:split("De","((?i)AB(?-i)C|D)E",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[]))),
+ <<"a:bc">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[trim]))),
+ <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[{parts,
+ 2}]))),
+ <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall,
trim]))),
-?line <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall,
+ <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall,
{parts,
2}]))),
-?line <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall]))),
-?line <<":abc:abc">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[trim]))),
-?line <<":abc:abc:">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[{parts,
- 2}]))),
-?line <<":abc:abc:">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[]))),
-?line <<"a:bc:bc">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[trim]))),
-?line <<"a:bc:bc:">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[{parts,
+ <<":abc:">> = iolist_to_binary(join(re:split("abc123abc","(.*)\\d+\\1",[dotall]))),
+ <<"a:bc">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall,
+ trim]))),
+ <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall,
+ {parts,
+ 2}]))),
+ <<"a:bc:">> = iolist_to_binary(join(re:split("abc123bc","(.*)\\d+\\1",[dotall]))),
+ <<":abc:abc">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[trim]))),
+ <<":abc:abc:">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[{parts,
2}]))),
-?line <<"a:bc:bc:">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
+ <<":abc:abc:">> = iolist_to_binary(join(re:split("abc123abc","((.*))\\d+\\1",[]))),
+ <<"a:bc:bc">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[trim]))),
+ <<"a:bc:bc:">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[{parts,
+ 2}]))),
+ <<"a:bc:bc:">> = iolist_to_binary(join(re:split("abc123bc","((.*))\\d+\\1",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28490,7 +28599,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28499,7 +28608,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123::a123","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28508,7 +28617,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
+ <<"">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28517,7 +28626,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28526,7 +28635,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:b342::abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28535,7 +28644,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28544,7 +28653,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28553,7 +28662,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28562,7 +28671,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28571,7 +28680,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28580,7 +28689,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28589,7 +28698,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28598,7 +28707,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28607,7 +28716,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28616,7 +28725,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28625,7 +28734,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28634,7 +28743,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"::">> = iolist_to_binary(join(re:split("a123:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28643,7 +28752,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28652,7 +28761,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28661,7 +28770,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28670,7 +28779,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28679,7 +28788,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28688,7 +28797,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"1:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("1:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28697,7 +28806,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28706,7 +28815,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28715,7 +28824,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123:bce:ddde:9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123:bce:ddde:9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28724,7 +28833,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28733,7 +28842,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28742,7 +28851,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
+ <<"a123::9999:b342::324e:dcba:abcd">> = iolist_to_binary(join(re:split("a123::9999:b342::324e:dcba:abcd","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28751,7 +28860,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28760,7 +28869,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28769,7 +28878,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
+ <<"abcde:2:3:4:5:6:7:8">> = iolist_to_binary(join(re:split("abcde:2:3:4:5:6:7:8","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28778,7 +28887,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
+ <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28787,7 +28896,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
+ <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28796,7 +28905,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
+ <<"::1">> = iolist_to_binary(join(re:split("::1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28805,7 +28914,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
+ <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28814,7 +28923,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
+ <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28823,7 +28932,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
+ <<"abcd:fee0:123::">> = iolist_to_binary(join(re:split("abcd:fee0:123::","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28832,7 +28941,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
+ <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28841,7 +28950,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
+ <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28850,7 +28959,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
+ <<":1">> = iolist_to_binary(join(re:split(":1","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28859,7 +28968,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
+ <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28868,7 +28977,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,trim]))),
-?line <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
+ <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28877,7 +28986,7 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless,{parts,2}]))),
-?line <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
+ <<"1:">> = iolist_to_binary(join(re:split("1:","^(?!:) # colon disallowed at start
(?: # start of item
(?: [0-9a-f]{1,4} | # 1-4 hex digits or
(?(1)0 | () ) ) # if null previously matched, fail; else null
@@ -28886,535 +28995,2980 @@ xb","(?!^)x",[multiline]))),
[0-9a-f]{1,4} $ # final hex number at end of string
(?(1)|.) # check that there was an empty component
",[extended,caseless]))),
-?line <<"">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[trim]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[trim]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[{parts,
- 2}]))),
-?line <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("M","\\M",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("M","\\M",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("M","\\M",[]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[trim]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("REGular","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("REGular","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("REGular","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("regulaer","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("regulaer","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("regulaer","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Regex","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Regex","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Regex","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("regulär","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("regulär","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("regulär","(?i)reg(?:ul(?:[aä]|ae)r|ex)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Åæåäà","Åæåä[à-ÿÀ-ß]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäà","Åæåä[à-ÿÀ-ß]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäà","Åæåä[à-ÿÀ-ß]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Åæåäÿ","Åæåä[à-ÿÀ-ß]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäÿ","Åæåä[à-ÿÀ-ß]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäÿ","Åæåä[à-ÿÀ-ß]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ÅæåäÀ","Åæåä[à-ÿÀ-ß]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ÅæåäÀ","Åæåä[à-ÿÀ-ß]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ÅæåäÀ","Åæåä[à-ÿÀ-ß]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("Åæåäß","Åæåä[à-ÿÀ-ß]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäß","Åæåä[à-ÿÀ-ß]+",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("Åæåäß","Åæåä[à-ÿÀ-ß]+",[]))),
-?line <<"„XAZ">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[trim]))),
-?line <<"„XAZ:">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[{parts,
+ <<"">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[{parts,
2}]))),
-?line <<"„XAZ:">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[]))),
-?line <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[trim]))),
-?line <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[{parts,
- 2}]))),
-?line <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[]))),
-?line <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[trim]))),
-?line <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[{parts,
- 2}]))),
-?line <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[]))),
-?line <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[trim]))),
-?line <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[{parts,
- 2}]))),
-?line <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[]))),
-?line <<"off">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[trim]))),
-?line <<"off:">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("z","[z\\Qa-d]\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[{parts,
2}]))),
-?line <<"off:">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[]))),
-?line <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[trim]))),
-?line <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a","[z\\Qa-d]\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[{parts,
2}]))),
-?line <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[]))),
-?line <<"ony">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[trim]))),
-?line <<"ony:">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("-","[z\\Qa-d]\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[{parts,
2}]))),
-?line <<"ony:">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[]))),
-?line <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[trim]))),
-?line <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("d","[z\\Qa-d]\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[{parts,
2}]))),
-?line <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[]))),
-?line <<"a
+ <<":">> = iolist_to_binary(join(re:split("]","[z\\Qa-d]\\E]",[]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[trim]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[{parts,
+ 2}]))),
+ <<"*** F:ilers">> = iolist_to_binary(join(re:split("*** Failers","[z\\Qa-d]\\E]",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[trim]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[{parts,
+ 2}]))),
+ <<"b">> = iolist_to_binary(join(re:split("b","[z\\Qa-d]\\E]",[]))),
+ ok.
+run34() ->
+ <<"">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("z","[\\z\\C]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("C","[\\z\\C]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("M","\\M",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("M","\\M",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("M","\\M",[]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[trim]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a+)*b",[]))),
+ <<"„XAZ">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[trim]))),
+ <<"„XAZ:">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[{parts,
+ 2}]))),
+ <<"„XAZ:">> = iolist_to_binary(join(re:split("„XAZXB","(?<=Z)X.",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab cd defg","ab cd (?x) de fg",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab cddefg","ab cd(?x) de fg",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","ab cd(?x) de fg",[]))),
+ <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[trim]))),
+ <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[{parts,
+ 2}]))),
+ <<"abcddefg">> = iolist_to_binary(join(re:split("abcddefg","ab cd(?x) de fg",[]))),
+ <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[trim]))),
+ <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[{parts,
+ 2}]))),
+ <<"foo:bar:X">> = iolist_to_binary(join(re:split("foobarX","(?<![^f]oo)(bar)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f]oo)(bar)",[]))),
+ <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[trim]))),
+ <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[{parts,
+ 2}]))),
+ <<"boobarX">> = iolist_to_binary(join(re:split("boobarX","(?<![^f]oo)(bar)",[]))),
+ <<"off">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[trim]))),
+ <<"off:">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[{parts,
+ 2}]))),
+ <<"off:">> = iolist_to_binary(join(re:split("offX","(?<![^f])X",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<![^f])X",[]))),
+ <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[trim]))),
+ <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[{parts,
+ 2}]))),
+ <<"onyX">> = iolist_to_binary(join(re:split("onyX","(?<![^f])X",[]))),
+ <<"ony">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[trim]))),
+ <<"ony:">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[{parts,
+ 2}]))),
+ <<"ony:">> = iolist_to_binary(join(re:split("onyX","(?<=[^f])X",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^f])X",[]))),
+ <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[trim]))),
+ <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[{parts,
+ 2}]))),
+ <<"offX">> = iolist_to_binary(join(re:split("offX","(?<=[^f])X",[]))),
+ <<"a
:b
:c">> = iolist_to_binary(join(re:split("a
b
c","^",[multiline,trim]))),
-?line <<"a
+ <<"a
:b
c">> = iolist_to_binary(join(re:split("a
b
c","^",[multiline,{parts,2}]))),
-?line <<"a
+ <<"a
:b
:c">> = iolist_to_binary(join(re:split("a
b
c","^",[multiline]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^",[multiline,
- trim]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^",[multiline,
- {parts,
- 2}]))),
-?line <<"">> = iolist_to_binary(join(re:split("","^",[multiline]))),
-?line <<"A
+ <<"">> = iolist_to_binary(join(re:split("","^",[multiline,
+ trim]))),
+ <<"">> = iolist_to_binary(join(re:split("","^",[multiline,
+ {parts,
+ 2}]))),
+ <<"">> = iolist_to_binary(join(re:split("","^",[multiline]))),
+ <<"A
C
:C">> = iolist_to_binary(join(re:split("A
C
C","(?<=C\\n)^",[multiline,trim]))),
-?line <<"A
+ <<"A
C
:C">> = iolist_to_binary(join(re:split("A
C
C","(?<=C\\n)^",[multiline,{parts,2}]))),
-?line <<"A
+ <<"A
C
:C">> = iolist_to_binary(join(re:split("A
C
C","(?<=C\\n)^",[multiline]))),
-?line <<":X">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[trim]))),
-?line <<":X:">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[{parts,
+ <<":X">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[trim]))),
+ <<":X:">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[{parts,
+ 2}]))),
+ <<":X:">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[]))),
+ <<":Y">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[trim]))),
+ <<":Y:">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[{parts,
+ 2}]))),
+ <<":Y:">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[]))),
+ <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[trim]))),
+ <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[{parts,
+ 2}]))),
+ <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[]))),
+ <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[trim]))),
+ <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[{parts,
+ 2}]))),
+ <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended,
+ trim]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended,
+ {parts,
+ 2}]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[trim]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[{parts,
+ 2}]))),
+ <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[]))),
+ <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[trim]))),
+ <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[{parts,
2}]))),
-?line <<":X:">> = iolist_to_binary(join(re:split("bXaX","(?:(?(1)a|b)(X))+",[]))),
-?line <<":Y">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[trim]))),
-?line <<":Y:">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[{parts,
- 2}]))),
-?line <<":Y:">> = iolist_to_binary(join(re:split("bXXaYYaY","(?:(?(1)\\1a|b)(X|Y))+",[]))),
-?line <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[trim]))),
-?line <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[{parts,
- 2}]))),
-?line <<":X:YaXXaX">> = iolist_to_binary(join(re:split("bXYaXXaX","(?:(?(1)\\1a|b)(X|Y))+",[]))),
-?line <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[trim]))),
-?line <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[{parts,
- 2}]))),
-?line <<"::::::::::X:XaYYaY">> = iolist_to_binary(join(re:split("bXXaYYaY","()()()()()()()()()(?:(?(10)\\10a|b)(X|Y))+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc]","[[,abc,]+]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a,b]","[[,abc,]+]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("[a,b,c]","[[,abc,]+]",[]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended,
- trim]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended,
- {parts,
- 2}]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A B","(?-x: )",[extended]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[trim]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[{parts,
- 2}]))),
-?line <<"A:B">> = iolist_to_binary(join(re:split("A # B","(?x)(?-x: \\s*#\\s*)",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x)(?-x: \\s*#\\s*)",[]))),
-?line <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[trim]))),
-?line <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[{parts,
- 2}]))),
-?line <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[]))),
-?line <<"A">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
- 2}]))),
-?line <<"A:">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
- 2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
-?line <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
-?line <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
+ <<"#">> = iolist_to_binary(join(re:split("#","(?x)(?-x: \\s*#\\s*)",[]))),
+ <<"A">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
+ <<"A:">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
2}]))),
-?line <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
-?line <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
-?line <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
- 2}]))),
-?line <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b*\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[trim]))),
-?line <<":bb">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b?\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b?\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b?\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[{parts,
+ <<"A:">> = iolist_to_binary(join(re:split("A #include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
+ <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
+ <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
+ 2}]))),
+ <<"A#include">> = iolist_to_binary(join(re:split("A#include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
+ <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[trim]))),
+ <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[{parts,
+ 2}]))),
+ <<"A #Include">> = iolist_to_binary(join(re:split("A #Include","(?x-is)(?:(?-ixs) \\s*#\\s*) include",[]))),
+ ok.
+run35() ->
+ <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b*\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[trim]))),
+ <<":bb">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaabbbb","a*b?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b?\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b?\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b?\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,4}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,4}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("a","a*b{0,4}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaabbbb","a*b{0,}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","a*b{0,}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b{0,}\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended,
- {parts,
+ <<":">> = iolist_to_binary(join(re:split("0a","a*\\d*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a*b#comment
+ <<":">> = iolist_to_binary(join(re:split("a","a*\\d*\\w",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a*b *\\w",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("a","a*b#comment
*\\w",[extended,trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b#comment
+ <<":">> = iolist_to_binary(join(re:split("a","a*b#comment
*\\w",[extended,{parts,2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a*b#comment
+ <<":">> = iolist_to_binary(join(re:split("a","a*b#comment
*\\w",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended,
- trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended,
- {parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended]))),
-?line <<"::
+ <<"">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","a* b *\\w",[extended]))),
+ <<"::
pqr">> = iolist_to_binary(join(re:split("abc=xyz\\
pqr","^\\w+=.*(\\\\\\n.*)*",[trim]))),
-?line <<"::
+ <<"::
pqr">> = iolist_to_binary(join(re:split("abc=xyz\\
pqr","^\\w+=.*(\\\\\\n.*)*",[{parts,2}]))),
-?line <<"::
+ <<"::
pqr">> = iolist_to_binary(join(re:split("abc=xyz\\
pqr","^\\w+=.*(\\\\\\n.*)*",[]))),
-?line <<":abcd">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[trim]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[{parts,
+ <<":abcd">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[trim]))),
+ <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[{parts,
+ 2}]))),
+ <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[]))),
+ <<":abcd">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[trim]))),
+ <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[{parts,
2}]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","(?=(\\w+))\\1:",[]))),
-?line <<":abcd">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[trim]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[{parts,
- 2}]))),
-?line <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[{parts,
+ <<":abcd:">> = iolist_to_binary(join(re:split("abcd:","^(?=(\\w+))\\1:",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^\\Eabc",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[\\Eabc]",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[trim]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[{parts,
+ 2}]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[trim]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[{parts,
+ 2}]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[trim]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[{parts,
+ 2}]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[trim]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[{parts,
+ 2}]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[trim]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[{parts,
+ 2}]))),
+ <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
+ 2}]))),
+ <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[trim]))),
+ <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[{parts,
+ 2}]))),
+ <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[]))),
+ ok.
+run36() ->
+ <<":a">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[trim]))),
+ <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[{parts,
+ 2}]))),
+ <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[trim]))),
+ <<":a::">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[{parts,
+ 2}]))),
+ <<":a::">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[trim]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[trim]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[trim]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[{parts,
+ 2}]))),
+ <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","\\Z",[trim]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\Z",[{parts,
+ 2}]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\Z",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[trim]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[{parts,
+ 2}]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[trim]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[{parts,
+ 2}]))),
+ <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[]))),
+ <<"a:::b:::c:::d">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended,
+ trim]))),
+ <<"a:::bcd">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended,
+ {parts,
+ 2}]))),
+ <<"a:::b:::c:::d:::">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended]))),
+ <<"a:::b:::c:::d">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended,
+ trim]))),
+ <<"a:::bcd">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended,
+ {parts,
+ 2}]))),
+ <<"a:::b:::c:::d:::">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended]))),
+ <<"a::b::c::d">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended,
+ trim]))),
+ <<"a::bcd">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended,
+ {parts,
2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\Eabc]",[]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[trim]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[{parts,
+ <<"a::b::c::d::">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[]))),
+ <<"">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[]))),
+ <<"">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[]))),
+ <<"">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[]))),
+ <<"fooabcfoo">> = iolist_to_binary(join(re:split("fooabcfoo",".*[op][xyz]",[trim]))),
+ <<"fooabcfoo">> = iolist_to_binary(join(re:split("fooabcfoo",".*[op][xyz]",[{parts,
+ 2}]))),
+ <<"fooabcfoo">> = iolist_to_binary(join(re:split("fooabcfoo",".*[op][xyz]",[]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)",[trim]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)",[{parts,
+ 2}]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)",[]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)",[trim]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)",[{parts,
+ 2}]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)",[]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=^.*b)b|^)",[trim]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=^.*b)b|^)",[{parts,
+ 2}]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=^.*b)b|^)",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?(?=^.*b)b|^)",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?(?=^.*b)b|^)",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(?(?=^.*b)b|^)",[]))),
+ <<"a:d:c">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)*",[trim]))),
+ <<"a:dc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)*",[{parts,
+ 2}]))),
+ <<"a:d:c:">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)*",[]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)*",[trim]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)*",[{parts,
+ 2}]))),
+ <<"a:c:">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)*",[]))),
+ ok.
+run37() ->
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)+",[trim]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)+",[{parts,
+ 2}]))),
+ <<"adc">> = iolist_to_binary(join(re:split("adc","(?(?=.*b)b|^)+",[]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)+",[trim]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)+",[{parts,
+ 2}]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b)b|^)+",[]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=b).*b|^d)",[trim]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=b).*b|^d)",[{parts,
+ 2}]))),
+ <<"a:c">> = iolist_to_binary(join(re:split("abc","(?(?=b).*b|^d)",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b).*b|^d)",[trim]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b).*b|^d)",[{parts,
+ 2}]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","(?(?=.*b).*b|^d)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("%ab%","^%((?(?=[a])[^%])|b)*%$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("%ab%","^%((?(?=[a])[^%])|b)*%$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("%ab%","^%((?(?=[a])[^%])|b)*%$",[]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XabX","(?i)a(?-i)b|c",[trim]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XabX","(?i)a(?-i)b|c",[{parts,
+ 2}]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XabX","(?i)a(?-i)b|c",[]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XAbX","(?i)a(?-i)b|c",[trim]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XAbX","(?i)a(?-i)b|c",[{parts,
+ 2}]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XAbX","(?i)a(?-i)b|c",[]))),
+ <<"C:C">> = iolist_to_binary(join(re:split("CcC","(?i)a(?-i)b|c",[trim]))),
+ <<"C:C">> = iolist_to_binary(join(re:split("CcC","(?i)a(?-i)b|c",[{parts,
+ 2}]))),
+ <<"C:C">> = iolist_to_binary(join(re:split("CcC","(?i)a(?-i)b|c",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?i)a(?-i)b|c",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?i)a(?-i)b|c",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?i)a(?-i)b|c",[]))),
+ <<"XABX">> = iolist_to_binary(join(re:split("XABX","(?i)a(?-i)b|c",[trim]))),
+ <<"XABX">> = iolist_to_binary(join(re:split("XABX","(?i)a(?-i)b|c",[{parts,
+ 2}]))),
+ <<"XABX">> = iolist_to_binary(join(re:split("XABX","(?i)a(?-i)b|c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("
+ ","[\\x00-\\xff\\s]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("
+ ","[\\x00-\\xff\\s]+",[{parts,2}]))),
+ <<":">> = iolist_to_binary(join(re:split("
+ ","[\\x00-\\xff\\s]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split("?","^\\c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("?","^\\c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("?","^\\c",[]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[caseless,
+ trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[caseless,
+ {parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[caseless]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[trim]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[{parts,
+ 2}]))),
+ <<"abc">> = iolist_to_binary(join(re:split("abc","(abc)\\1",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("12abc","[^a]*",[caseless,
+ trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split("12abc","[^a]*",[caseless,
+ {parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("12abc","[^a]*",[caseless]))),
+ <<":A">> = iolist_to_binary(join(re:split("12ABC","[^a]*",[caseless,
+ trim]))),
+ <<":ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]*",[caseless,
+ {parts,
+ 2}]))),
+ <<":A:">> = iolist_to_binary(join(re:split("12ABC","[^a]*",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("12abc","[^a]*+",[caseless,
+ trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split("12abc","[^a]*+",[caseless,
+ {parts,
2}]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[\\Eabc]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[{parts,
+ <<":a:">> = iolist_to_binary(join(re:split("12abc","[^a]*+",[caseless]))),
+ <<":A">> = iolist_to_binary(join(re:split("12ABC","[^a]*+",[caseless,
+ trim]))),
+ <<":ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]*+",[caseless,
+ {parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[a-\\Ec]",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[{parts,
+ <<":A:">> = iolist_to_binary(join(re:split("12ABC","[^a]*+",[caseless]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]*?X",[caseless,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]*?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]*?X",[caseless]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]*?X",[caseless,
+ trim]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]*?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]*?X",[caseless]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]*?X",[caseless,
+ trim]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]*?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]*?X",[caseless]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]+?X",[caseless,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]+?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","[^a]+?X",[caseless]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]+?X",[caseless,
+ trim]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]+?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12abc">> = iolist_to_binary(join(re:split("12abc","[^a]+?X",[caseless]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]+?X",[caseless,
+ trim]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]+?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12ABC">> = iolist_to_binary(join(re:split("12ABC","[^a]+?X",[caseless]))),
+ <<"12a:b">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?X",[caseless,
+ trim]))),
+ <<"12a:bcX">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12a:b:">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?X",[caseless]))),
+ <<"12A:B">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?X",[caseless,
+ trim]))),
+ <<"12A:BCX">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12A:B:">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?X",[caseless]))),
+ <<"B">> = iolist_to_binary(join(re:split("BCX","[^a]?X",[caseless,
+ trim]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]?X",[caseless,
+ {parts,
+ 2}]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]?X",[caseless]))),
+ <<"12a:b">> = iolist_to_binary(join(re:split("12aXbcX","[^a]??X",[caseless,
+ trim]))),
+ <<"12a:bcX">> = iolist_to_binary(join(re:split("12aXbcX","[^a]??X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12a:b:">> = iolist_to_binary(join(re:split("12aXbcX","[^a]??X",[caseless]))),
+ <<"12A:B">> = iolist_to_binary(join(re:split("12AXBCX","[^a]??X",[caseless,
+ trim]))),
+ <<"12A:BCX">> = iolist_to_binary(join(re:split("12AXBCX","[^a]??X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12A:B:">> = iolist_to_binary(join(re:split("12AXBCX","[^a]??X",[caseless]))),
+ <<"B">> = iolist_to_binary(join(re:split("BCX","[^a]??X",[caseless,
+ trim]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]??X",[caseless,
+ {parts,
+ 2}]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]??X",[caseless]))),
+ <<"12aXb">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?+X",[caseless,
+ trim]))),
+ <<"12aXb:">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?+X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12aXb:">> = iolist_to_binary(join(re:split("12aXbcX","[^a]?+X",[caseless]))),
+ <<"12AXB">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?+X",[caseless,
+ trim]))),
+ <<"12AXB:">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?+X",[caseless,
+ {parts,
+ 2}]))),
+ <<"12AXB:">> = iolist_to_binary(join(re:split("12AXBCX","[^a]?+X",[caseless]))),
+ <<"B">> = iolist_to_binary(join(re:split("BCX","[^a]?+X",[caseless,
+ trim]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]?+X",[caseless,
+ {parts,
+ 2}]))),
+ <<"B:">> = iolist_to_binary(join(re:split("BCX","[^a]?+X",[caseless]))),
+ <<"a">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}",[caseless,
+ trim]))),
+ <<"a:ef">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}",[caseless,
+ {parts,
+ 2}]))),
+ <<"a::">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}",[caseless,
+ trim]))),
+ <<"A:EF">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}",[caseless,
+ {parts,
+ 2}]))),
+ <<"A::">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}",[caseless]))),
+ <<"a::f">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}?",[caseless,
+ trim]))),
+ <<"a:def">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}?",[caseless,
+ {parts,
+ 2}]))),
+ <<"a::f">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}?",[caseless]))),
+ <<"A::F">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}?",[caseless,
+ trim]))),
+ <<"A:DEF">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}?",[caseless,
+ {parts,
+ 2}]))),
+ <<"A::F">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}?",[caseless]))),
+ <<"a">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}+",[caseless,
+ trim]))),
+ <<"a:ef">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}+",[caseless,
+ {parts,
+ 2}]))),
+ <<"a::">> = iolist_to_binary(join(re:split("abcdef","[^a]{2,3}+",[caseless]))),
+ <<"A">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}+",[caseless,
+ trim]))),
+ <<"A:EF">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}+",[caseless,
+ {parts,
+ 2}]))),
+ <<"A::">> = iolist_to_binary(join(re:split("ABCDEF","[^a]{2,3}+",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("Z","((a|)+)+Z",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("Z","((a|)+)+Z",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("Z","((a|)+)+Z",[]))),
+ ok.
+run38() ->
+ <<"::a">> = iolist_to_binary(join(re:split("ac","(a)b|(a)c",[trim]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(a)b|(a)c",[{parts,
+ 2}]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(a)b|(a)c",[]))),
+ <<"::a">> = iolist_to_binary(join(re:split("ac","(?>(a))b|(a)c",[trim]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?>(a))b|(a)c",[{parts,
+ 2}]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?>(a))b|(a)c",[]))),
+ <<"::a">> = iolist_to_binary(join(re:split("ac","(?=(a))ab|(a)c",[trim]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?=(a))ab|(a)c",[{parts,
+ 2}]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?=(a))ab|(a)c",[]))),
+ <<":ac::a">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)",[trim]))),
+ <<":ac::a:">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)",[{parts,
+ 2}]))),
+ <<":ac::a:">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)",[]))),
+ <<":ac::a">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)++",[trim]))),
+ <<":ac::a:">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)++",[{parts,
+ 2}]))),
+ <<":ac::a:">> = iolist_to_binary(join(re:split("ac","((?>(a))b|(a)c)++",[]))),
+ <<"::a">> = iolist_to_binary(join(re:split("ac","(?:(?>(a))b|(a)c)++",[trim]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?:(?>(a))b|(a)c)++",[{parts,
+ 2}]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?:(?>(a))b|(a)c)++",[]))),
+ <<"::a:ac">> = iolist_to_binary(join(re:split("ac","(?=(?>(a))b|(a)c)(..)",[trim]))),
+ <<"::a:ac:">> = iolist_to_binary(join(re:split("ac","(?=(?>(a))b|(a)c)(..)",[{parts,
+ 2}]))),
+ <<"::a:ac:">> = iolist_to_binary(join(re:split("ac","(?=(?>(a))b|(a)c)(..)",[]))),
+ <<"::a">> = iolist_to_binary(join(re:split("ac","(?>(?>(a))b|(a)c)",[trim]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?>(?>(a))b|(a)c)",[{parts,
+ 2}]))),
+ <<"::a:">> = iolist_to_binary(join(re:split("ac","(?>(?>(a))b|(a)c)",[]))),
+ <<":aaaabaaabaabab:aaa:aabab">> = iolist_to_binary(join(re:split("aaaabaaabaabab","((?>(a+)b)+(aabab))",[trim]))),
+ <<":aaaabaaabaabab:aaa:aabab:">> = iolist_to_binary(join(re:split("aaaabaaabaabab","((?>(a+)b)+(aabab))",[{parts,
+ 2}]))),
+ <<":aaaabaaabaabab:aaa:aabab:">> = iolist_to_binary(join(re:split("aaaabaaabaabab","((?>(a+)b)+(aabab))",[]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+?c",[trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+?c",[{parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+?c",[]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+c",[trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+c",[{parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","(?>a+|ab)+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","(?:a+|ab)+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","(?:a+|ab)+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","(?:a+|ab)+c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("a","(?(?=(a))a)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(?(?=(a))a)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(?(?=(a))a)",[]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(?(?=(a))a)(b)",[trim]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("ab","(?(?=(a))a)(b)",[{parts,
+ 2}]))),
+ <<":a:b:">> = iolist_to_binary(join(re:split("ab","(?(?=(a))a)(b)",[]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)++c",[trim]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)++c",[{parts,
+ 2}]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)++c",[]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?>a|ab)++c",[trim]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?>a|ab)++c",[{parts,
+ 2}]))),
+ <<"aaaabc">> = iolist_to_binary(join(re:split("aaaabc","^(?>a|ab)++c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaabc","^(?:a|ab)+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("xyz","(?=abc){0}xyz",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("xyz","(?=abc){0}xyz",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("xyz","(?=abc){0}xyz",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?=abc){1}xyz",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?=abc){1}xyz",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?=abc){1}xyz",[]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","(?=abc){1}xyz",[trim]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","(?=abc){1}xyz",[{parts,
+ 2}]))),
+ <<"xyz">> = iolist_to_binary(join(re:split("xyz","(?=abc){1}xyz",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("ab","(?=(a))?.",[trim]))),
+ <<":a:b">> = iolist_to_binary(join(re:split("ab","(?=(a))?.",[{parts,
+ 2}]))),
+ <<":a:::">> = iolist_to_binary(join(re:split("ab","(?=(a))?.",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bc","(?=(a))?.",[trim]))),
+ <<"::c">> = iolist_to_binary(join(re:split("bc","(?=(a))?.",[{parts,
+ 2}]))),
+ <<"::::">> = iolist_to_binary(join(re:split("bc","(?=(a))?.",[]))),
+ ok.
+run39() ->
+ <<"">> = iolist_to_binary(join(re:split("ab","(?=(a))??.",[trim]))),
+ <<"::b">> = iolist_to_binary(join(re:split("ab","(?=(a))??.",[{parts,
+ 2}]))),
+ <<"::::">> = iolist_to_binary(join(re:split("ab","(?=(a))??.",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bc","(?=(a))??.",[trim]))),
+ <<"::c">> = iolist_to_binary(join(re:split("bc","(?=(a))??.",[{parts,
+ 2}]))),
+ <<"::::">> = iolist_to_binary(join(re:split("bc","(?=(a))??.",[]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","^(?=(a)){0}b(?1)",[trim]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","^(?=(a)){0}b(?1)",[{parts,
+ 2}]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","^(?=(a)){0}b(?1)",[]))),
+ <<":b">> = iolist_to_binary(join(re:split("abd","^(?=(?1))?[az]([abc])d",[trim]))),
+ <<":b:">> = iolist_to_binary(join(re:split("abd","^(?=(?1))?[az]([abc])d",[{parts,
+ 2}]))),
+ <<":b:">> = iolist_to_binary(join(re:split("abd","^(?=(?1))?[az]([abc])d",[]))),
+ <<":c:xx">> = iolist_to_binary(join(re:split("zcdxx","^(?=(?1))?[az]([abc])d",[trim]))),
+ <<":c:xx">> = iolist_to_binary(join(re:split("zcdxx","^(?=(?1))?[az]([abc])d",[{parts,
+ 2}]))),
+ <<":c:xx">> = iolist_to_binary(join(re:split("zcdxx","^(?=(?1))?[az]([abc])d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaa","^(?!a){0}\\w+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaa","^(?!a){0}\\w+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaa","^(?!a){0}\\w+",[]))),
+ <<"abc:abc">> = iolist_to_binary(join(re:split("abcxyz","(?<=(abc))?xyz",[trim]))),
+ <<"abc:abc:">> = iolist_to_binary(join(re:split("abcxyz","(?<=(abc))?xyz",[{parts,
+ 2}]))),
+ <<"abc:abc:">> = iolist_to_binary(join(re:split("abcxyz","(?<=(abc))?xyz",[]))),
+ <<"pqr">> = iolist_to_binary(join(re:split("pqrxyz","(?<=(abc))?xyz",[trim]))),
+ <<"pqr::">> = iolist_to_binary(join(re:split("pqrxyz","(?<=(abc))?xyz",[{parts,
+ 2}]))),
+ <<"pqr::">> = iolist_to_binary(join(re:split("pqrxyz","(?<=(abc))?xyz",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ggg<<<aaa>>>","^[\\g<a>]+",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ggg<<<aaa>>>","^[\\g<a>]+",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ggg<<<aaa>>>","^[\\g<a>]+",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\g<a>]+",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\g<a>]+",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\g<a>]+",[]))),
+ <<"\\ga">> = iolist_to_binary(join(re:split("\\ga","^[\\g<a>]+",[trim]))),
+ <<"\\ga">> = iolist_to_binary(join(re:split("\\ga","^[\\g<a>]+",[{parts,
+ 2}]))),
+ <<"\\ga">> = iolist_to_binary(join(re:split("\\ga","^[\\g<a>]+",[]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("gggagagaxyz","^[\\ga]+",[trim]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("gggagagaxyz","^[\\ga]+",[{parts,
+ 2}]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("gggagagaxyz","^[\\ga]+",[]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::Z","^[:a[:digit:]]+",[trim]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::Z","^[:a[:digit:]]+",[{parts,
+ 2}]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::Z","^[:a[:digit:]]+",[]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::bbbZ","^[:a[:digit:]:b]+",[trim]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::bbbZ","^[:a[:digit:]:b]+",[{parts,
+ 2}]))),
+ <<":Z">> = iolist_to_binary(join(re:split("aaaa444:::bbbZ","^[:a[:digit:]:b]+",[]))),
+ <<"">> = iolist_to_binary(join(re:split(":xxx:","[:a]xxx[b:]",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split(":xxx:","[:a]xxx[b:]",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split(":xxx:","[:a]xxx[b:]",[]))),
+ <<"xaa:c">> = iolist_to_binary(join(re:split("xaabc","(?<=a{2})b",[caseless,
+ trim]))),
+ <<"xaa:c">> = iolist_to_binary(join(re:split("xaabc","(?<=a{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"xaa:c">> = iolist_to_binary(join(re:split("xaabc","(?<=a{2})b",[caseless]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=a{2})b",[caseless,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=a{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=a{2})b",[caseless]))),
+ <<"xabc">> = iolist_to_binary(join(re:split("xabc","(?<=a{2})b",[caseless,
+ trim]))),
+ <<"xabc">> = iolist_to_binary(join(re:split("xabc","(?<=a{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"xabc">> = iolist_to_binary(join(re:split("xabc","(?<=a{2})b",[caseless]))),
+ <<"xa:c">> = iolist_to_binary(join(re:split("xabc","(?<!a{2})b",[caseless,
+ trim]))),
+ <<"xa:c">> = iolist_to_binary(join(re:split("xabc","(?<!a{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"xa:c">> = iolist_to_binary(join(re:split("xabc","(?<!a{2})b",[caseless]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<!a{2})b",[caseless,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<!a{2})b",[caseless,
+ {parts,
2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a-\\Ec]",[]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[trim]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[{parts,
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<!a{2})b",[caseless]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<!a{2})b",[caseless,
+ trim]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<!a{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<!a{2})b",[caseless]))),
+ <<"xa ">> = iolist_to_binary(join(re:split("xa c","(?<=a\\h)c",[trim]))),
+ <<"xa :">> = iolist_to_binary(join(re:split("xa c","(?<=a\\h)c",[{parts,
+ 2}]))),
+ <<"xa :">> = iolist_to_binary(join(re:split("xa c","(?<=a\\h)c",[]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[trim]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[{parts,
+ 2}]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[]))),
+ <<"aAA:c">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[trim]))),
+ <<"aAA:c">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[{parts,
+ 2}]))),
+ <<"aAA:c">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[trim]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[{parts,
+ 2}]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[caseless,
+ trim]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"axx:c">> = iolist_to_binary(join(re:split("axxbc","(?<=[^a]{2})b",[caseless]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[caseless,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=[^a]{2})b",[caseless]))),
+ <<"aAAbc">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[caseless,
+ trim]))),
+ <<"aAAbc">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"aAAbc">> = iolist_to_binary(join(re:split("aAAbc","(?<=[^a]{2})b",[caseless]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[caseless,
+ trim]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[caseless,
+ {parts,
+ 2}]))),
+ <<"xaabc">> = iolist_to_binary(join(re:split("xaabc","(?<=[^a]{2})b",[caseless]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abc","(?<=a\\H)c",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","(?<=a\\H)c",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","(?<=a\\H)c",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abc","(?<=a\\V)c",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","(?<=a\\V)c",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abc","(?<=a\\V)c",[]))),
+ <<"a
+">> = iolist_to_binary(join(re:split("a
+c","(?<=a\\v)c",[trim]))),
+ <<"a
+:">> = iolist_to_binary(join(re:split("a
+c","(?<=a\\v)c",[{parts,2}]))),
+ <<"a
+:">> = iolist_to_binary(join(re:split("a
+c","(?<=a\\v)c",[]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)++Y",[trim]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)++Y",[{parts,
+ 2}]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)++Y",[]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)*+Y",[trim]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)*+Y",[{parts,
+ 2}]))),
+ <<"X:X">> = iolist_to_binary(join(re:split("XcccddYX","(?(?=c)c|d)*+Y",[]))),
+ ok.
+run40() ->
+ <<":aaa">> = iolist_to_binary(join(re:split("aaaaaaa","^(a{2,3}){2,}+a",[trim]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a{2,3}){2,}+a",[{parts,
+ 2}]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaaaaaa","^(a{2,3}){2,}+a",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3}){2,}+a",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3}){2,}+a",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3}){2,}+a",[]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3}){2,}+a",[trim]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3}){2,}+a",[{parts,
+ 2}]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3}){2,}+a",[]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a{2,3}){2,}+a",[trim]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a{2,3}){2,}+a",[{parts,
+ 2}]))),
+ <<"aaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaa","^(a{2,3}){2,}+a",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})++a",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})++a",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})++a",[]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})++a",[trim]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})++a",[{parts,
+ 2}]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})++a",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})*+a",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})*+a",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a{2,3})*+a",[]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})*+a",[trim]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})*+a",[{parts,
+ 2}]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(a{2,3})*+a",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abXde","ab\\Cde",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abXde","ab\\Cde",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abXde","ab\\Cde",[]))),
+ <<"abZde">> = iolist_to_binary(join(re:split("abZdeX","(?<=ab\\Cde)X",[trim]))),
+ <<"abZde:">> = iolist_to_binary(join(re:split("abZdeX","(?<=ab\\Cde)X",[{parts,
+ 2}]))),
+ <<"abZde:">> = iolist_to_binary(join(re:split("abZdeX","(?<=ab\\Cde)X",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aCb","a[\\CD]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aCb","a[\\CD]b",[{parts,
2}]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a-\\Ec]",[]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[trim]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aCb","a[\\CD]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aDb","a[\\CD]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aDb","a[\\CD]b",[{parts,
2}]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a-\\Ec]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("aDb","a[\\CD]b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aJb","a[\\C-X]b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aJb","a[\\C-X]b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aJb","a[\\C-X]b",[]))),
+ <<"X X">> = iolist_to_binary(join(re:split("X X","\\H\\h\\V\\v",[trim]))),
+ <<"X X">> = iolist_to_binary(join(re:split("X X","\\H\\h\\V\\v",[{parts,
+ 2}]))),
+ <<"X X">> = iolist_to_binary(join(re:split("X X","\\H\\h\\V\\v",[]))),
+ <<"">> = iolist_to_binary(join(re:split("X X ","\\H\\h\\V\\v",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("X X ","\\H\\h\\V\\v",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("X X ","\\H\\h\\V\\v",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H\\h\\V\\v",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H\\h\\V\\v",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H\\h\\V\\v",[]))),
+ <<"  X">> = iolist_to_binary(join(re:split("  X","\\H\\h\\V\\v",[trim]))),
+ <<"  X">> = iolist_to_binary(join(re:split("  X","\\H\\h\\V\\v",[{parts,
+ 2}]))),
+ <<"  X">> = iolist_to_binary(join(re:split("  X","\\H\\h\\V\\v",[]))),
+ <<"">> = iolist_to_binary(join(re:split("  X
+ ","\\H*\\h+\\V?\\v{3,4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("  X
+ ","\\H*\\h+\\V?\\v{3,4}",[{parts,2}]))),
+ <<":">> = iolist_to_binary(join(re:split("  X
+ ","\\H*\\h+\\V?\\v{3,4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[{parts,2}]))),
+ <<":">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[{parts,2}]))),
+ <<":">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H*\\h+\\V?\\v{3,4}",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H*\\h+\\V?\\v{3,4}",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\H*\\h+\\V?\\v{3,4}",[]))),
+ <<"  
+ ">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[trim]))),
+ <<"  
+ ">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[{parts,2}]))),
+ <<"  
+ ">> = iolist_to_binary(join(re:split("  
+ ","\\H*\\h+\\V?\\v{3,4}",[]))),
+ <<"XY :E">> = iolist_to_binary(join(re:split("XY ABCDE","\\H{3,4}",[trim]))),
+ <<"XY :E">> = iolist_to_binary(join(re:split("XY ABCDE","\\H{3,4}",[{parts,
+ 2}]))),
+ <<"XY :E">> = iolist_to_binary(join(re:split("XY ABCDE","\\H{3,4}",[]))),
+ <<"XY : ST">> = iolist_to_binary(join(re:split("XY PQR ST","\\H{3,4}",[trim]))),
+ <<"XY : ST">> = iolist_to_binary(join(re:split("XY PQR ST","\\H{3,4}",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[a\\E\\E-\\Ec]",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[{parts,
+ <<"XY : ST">> = iolist_to_binary(join(re:split("XY PQR ST","\\H{3,4}",[]))),
+ <<"XY A:QRS">> = iolist_to_binary(join(re:split("XY AB PQRS",".\\h{3,4}.",[trim]))),
+ <<"XY A:QRS">> = iolist_to_binary(join(re:split("XY AB PQRS",".\\h{3,4}.",[{parts,
+ 2}]))),
+ <<"XY A:QRS">> = iolist_to_binary(join(re:split("XY AB PQRS",".\\h{3,4}.",[]))),
+ <<">">> = iolist_to_binary(join(re:split(">XNNNYZ","\\h*X\\h?\\H+Y\\H?Z",[trim]))),
+ <<">:">> = iolist_to_binary(join(re:split(">XNNNYZ","\\h*X\\h?\\H+Y\\H?Z",[{parts,
+ 2}]))),
+ <<">:">> = iolist_to_binary(join(re:split(">XNNNYZ","\\h*X\\h?\\H+Y\\H?Z",[]))),
+ <<">">> = iolist_to_binary(join(re:split("> X NYQZ","\\h*X\\h?\\H+Y\\H?Z",[trim]))),
+ <<">:">> = iolist_to_binary(join(re:split("> X NYQZ","\\h*X\\h?\\H+Y\\H?Z",[{parts,
+ 2}]))),
+ <<">:">> = iolist_to_binary(join(re:split("> X NYQZ","\\h*X\\h?\\H+Y\\H?Z",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\h*X\\h?\\H+Y\\H?Z",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\h*X\\h?\\H+Y\\H?Z",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\h*X\\h?\\H+Y\\H?Z",[]))),
+ <<">XYZ">> = iolist_to_binary(join(re:split(">XYZ","\\h*X\\h?\\H+Y\\H?Z",[trim]))),
+ <<">XYZ">> = iolist_to_binary(join(re:split(">XYZ","\\h*X\\h?\\H+Y\\H?Z",[{parts,
+ 2}]))),
+ <<">XYZ">> = iolist_to_binary(join(re:split(">XYZ","\\h*X\\h?\\H+Y\\H?Z",[]))),
+ <<"> X NY Z">> = iolist_to_binary(join(re:split("> X NY Z","\\h*X\\h?\\H+Y\\H?Z",[trim]))),
+ <<"> X NY Z">> = iolist_to_binary(join(re:split("> X NY Z","\\h*X\\h?\\H+Y\\H?Z",[{parts,
+ 2}]))),
+ <<"> X NY Z">> = iolist_to_binary(join(re:split("> X NY Z","\\h*X\\h?\\H+Y\\H?Z",[]))),
+ <<">">> = iolist_to_binary(join(re:split(">XY
+Z
+A NN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[trim]))),
+ <<">:">> = iolist_to_binary(join(re:split(">XY
+Z
+A NN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[{parts,
+ 2}]))),
+ <<">:">> = iolist_to_binary(join(re:split(">XY
+Z
+A NN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[]))),
+ <<">">> = iolist_to_binary(join(re:split(">
+ X
+Y
+ ZZZ
+AAA NNN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[trim]))),
+ <<">:">> = iolist_to_binary(join(re:split(">
+ X
+Y
+ ZZZ
+AAA NNN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[{parts,
+ 2}]))),
+ <<">:">> = iolist_to_binary(join(re:split(">
+ X
+Y
+ ZZZ
+AAA NNN ","\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c",[]))),
+ <<"foo:foo">> = iolist_to_binary(join(re:split("foobar","(foo)\\Kbar",[trim]))),
+ <<"foo:foo:">> = iolist_to_binary(join(re:split("foobar","(foo)\\Kbar",[{parts,
+ 2}]))),
+ <<"foo:foo:">> = iolist_to_binary(join(re:split("foobar","(foo)\\Kbar",[]))),
+ <<"foo:foo:bar">> = iolist_to_binary(join(re:split("foobar","(foo)(\\Kbar|baz)",[trim]))),
+ <<"foo:foo:bar:">> = iolist_to_binary(join(re:split("foobar","(foo)(\\Kbar|baz)",[{parts,
+ 2}]))),
+ <<"foo:foo:bar:">> = iolist_to_binary(join(re:split("foobar","(foo)(\\Kbar|baz)",[]))),
+ <<":foo:baz">> = iolist_to_binary(join(re:split("foobaz","(foo)(\\Kbar|baz)",[trim]))),
+ <<":foo:baz:">> = iolist_to_binary(join(re:split("foobaz","(foo)(\\Kbar|baz)",[{parts,
+ 2}]))),
+ <<":foo:baz:">> = iolist_to_binary(join(re:split("foobaz","(foo)(\\Kbar|baz)",[]))),
+ <<"foo:foobar">> = iolist_to_binary(join(re:split("foobarbaz","(foo\\Kbar)baz",[trim]))),
+ <<"foo:foobar:">> = iolist_to_binary(join(re:split("foobarbaz","(foo\\Kbar)baz",[{parts,
+ 2}]))),
+ <<"foo:foobar:">> = iolist_to_binary(join(re:split("foobarbaz","(foo\\Kbar)baz",[]))),
+ <<":ab:b:XXXX">> = iolist_to_binary(join(re:split("ababababbbabZXXXX","^(a(b))\\1\\g1\\g{1}\\g-1\\g{-1}\\g{-02}Z",[trim]))),
+ <<":ab:b:XXXX">> = iolist_to_binary(join(re:split("ababababbbabZXXXX","^(a(b))\\1\\g1\\g{1}\\g-1\\g{-1}\\g{-02}Z",[{parts,
+ 2}]))),
+ <<":ab:b:XXXX">> = iolist_to_binary(join(re:split("ababababbbabZXXXX","^(a(b))\\1\\g1\\g{1}\\g-1\\g{-1}\\g{-02}Z",[]))),
+ <<":tom">> = iolist_to_binary(join(re:split("tom-tom","(?<A>tom|bon)-\\g{A}",[trim]))),
+ <<":tom:">> = iolist_to_binary(join(re:split("tom-tom","(?<A>tom|bon)-\\g{A}",[{parts,
2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[a\\E\\E-\\Ec]",[]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[trim]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[{parts,
- 2}]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[a\\E\\E-\\Ec]",[]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[trim]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[{parts,
+ <<":tom:">> = iolist_to_binary(join(re:split("tom-tom","(?<A>tom|bon)-\\g{A}",[]))),
+ <<":bon">> = iolist_to_binary(join(re:split("bon-bon","(?<A>tom|bon)-\\g{A}",[trim]))),
+ <<":bon:">> = iolist_to_binary(join(re:split("bon-bon","(?<A>tom|bon)-\\g{A}",[{parts,
+ 2}]))),
+ <<":bon:">> = iolist_to_binary(join(re:split("bon-bon","(?<A>tom|bon)-\\g{A}",[]))),
+ <<"bacxxx">> = iolist_to_binary(join(re:split("bacxxx","(^(a|b\\g{-1}))",[trim]))),
+ <<"bacxxx">> = iolist_to_binary(join(re:split("bacxxx","(^(a|b\\g{-1}))",[{parts,
+ 2}]))),
+ <<"bacxxx">> = iolist_to_binary(join(re:split("bacxxx","(^(a|b\\g{-1}))",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))\\1",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))\\1",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))\\1",[]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))\\1",[trim]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))\\1",[{parts,
+ 2}]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))\\1",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))\\1",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))\\1",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))\\1",[]))),
+ <<"abcxyz">> = iolist_to_binary(join(re:split("abcxyz","(?|(abc)|(xyz))\\1",[trim]))),
+ <<"abcxyz">> = iolist_to_binary(join(re:split("abcxyz","(?|(abc)|(xyz))\\1",[{parts,
+ 2}]))),
+ <<"abcxyz">> = iolist_to_binary(join(re:split("abcxyz","(?|(abc)|(xyz))\\1",[]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))\\1",[trim]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))\\1",[{parts,
+ 2}]))),
+ <<"xyzabc">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))\\1",[]))),
+ ok.
+run41() ->
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))(?1)",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))(?1)",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","(?|(abc)|(xyz))(?1)",[]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))(?1)",[trim]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))(?1)",[{parts,
+ 2}]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("xyzabc","(?|(abc)|(xyz))(?1)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))(?1)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))(?1)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?|(abc)|(xyz))(?1)",[]))),
+ <<"xyzxyz">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))(?1)",[trim]))),
+ <<"xyzxyz">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))(?1)",[{parts,
+ 2}]))),
+ <<"xyzxyz">> = iolist_to_binary(join(re:split("xyzxyz","(?|(abc)|(xyz))(?1)",[]))),
+ <<":a:b:c:d:Y">> = iolist_to_binary(join(re:split("XYabcdY","^X(?5)(a)(?|(b)|(q))(c)(d)(Y)",[trim]))),
+ <<":a:b:c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?5)(a)(?|(b)|(q))(c)(d)(Y)",[{parts,
+ 2}]))),
+ <<":a:b:c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?5)(a)(?|(b)|(q))(c)(d)(Y)",[]))),
+ <<":a:b:::c:d:Y">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)",[trim]))),
+ <<":a:b:::c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)",[{parts,
+ 2}]))),
+ <<":a:b:::c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)",[]))),
+ <<":a:b:::c:d:Y">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)",[trim]))),
+ <<":a:b:::c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)",[{parts,
+ 2}]))),
+ <<":a:b:::c:d:Y:">> = iolist_to_binary(join(re:split("XYabcdY","^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)",[]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\k<abc>{2}",[trim]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\k<abc>{2}",[{parts,
+ 2}]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\k<abc>{2}",[]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\k<abc>{2}",[trim]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\k<abc>{2}",[{parts,
+ 2}]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\k<abc>{2}",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\k<abc>{2}",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\k<abc>{2}",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\k<abc>{2}",[]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\k<abc>{2}",[trim]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\k<abc>{2}",[{parts,
+ 2}]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\k<abc>{2}",[]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\k<abc>{2}",[trim]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\k<abc>{2}",[{parts,
+ 2}]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\k<abc>{2}",[]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\g{abc}{2}",[trim]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\g{abc}{2}",[{parts,
+ 2}]))),
+ <<":a:xyz">> = iolist_to_binary(join(re:split("a:aaxyz","(?'abc'\\w+):\\g{abc}{2}",[]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\g{abc}{2}",[trim]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\g{abc}{2}",[{parts,
+ 2}]))),
+ <<":ab:xyz">> = iolist_to_binary(join(re:split("ab:ababxyz","(?'abc'\\w+):\\g{abc}{2}",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\g{abc}{2}",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\g{abc}{2}",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?'abc'\\w+):\\g{abc}{2}",[]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\g{abc}{2}",[trim]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\g{abc}{2}",[{parts,
+ 2}]))),
+ <<"a:axyz">> = iolist_to_binary(join(re:split("a:axyz","(?'abc'\\w+):\\g{abc}{2}",[]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\g{abc}{2}",[trim]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\g{abc}{2}",[{parts,
+ 2}]))),
+ <<"ab:abxyz">> = iolist_to_binary(join(re:split("ab:abxyz","(?'abc'\\w+):\\g{abc}{2}",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("abd","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended,
+ trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abd","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended,
+ {parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abd","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("ce","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended,
+ trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("ce","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended,
+ {parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("ce","^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)",[extended]))),
+ <<":aX">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g-1Z",[trim]))),
+ <<":aX:">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g-1Z",[{parts,
+ 2}]))),
+ <<":aX:">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g-1Z",[]))),
+ <<":aX">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g{-1}Z",[trim]))),
+ <<":aX:">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g{-1}Z",[{parts,
2}]))),
-?line <<"E">> = iolist_to_binary(join(re:split("E","^[a\\E\\E-\\Ec]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
+ <<":aX:">> = iolist_to_binary(join(re:split("aXaXZ","^(a.)\\g{-1}Z",[]))),
+ <<":::cd">> = iolist_to_binary(join(re:split("abcd","^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ",[extended,
+ trim]))),
+ <<":::cd">> = iolist_to_binary(join(re:split("abcd","^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ",[extended,
+ {parts,
+ 2}]))),
+ <<":::cd">> = iolist_to_binary(join(re:split("abcd","^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) ",[extended]))),
+ <<":metcalfe:33">> = iolist_to_binary(join(re:split("metcalfe 33","(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\\d+)
+ )",[extended,trim]))),
+ <<":metcalfe:33:::">> = iolist_to_binary(join(re:split("metcalfe 33","(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\\d+)
+ )",[extended,{parts,2}]))),
+ <<":metcalfe:33:::">> = iolist_to_binary(join(re:split("metcalfe 33","(?<NAME>(?&NAME_PAT))\\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\\d+)
+ )",[extended]))),
+ <<"::.4">> = iolist_to_binary(join(re:split("1.2.3.4","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"::.4:">> = iolist_to_binary(join(re:split("1.2.3.4","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"::.4:">> = iolist_to_binary(join(re:split("1.2.3.4","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<"::.206">> = iolist_to_binary(join(re:split("131.111.10.206","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"::.206:">> = iolist_to_binary(join(re:split("131.111.10.206","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"::.206:">> = iolist_to_binary(join(re:split("131.111.10.206","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<"::.0">> = iolist_to_binary(join(re:split("10.0.0.0","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"::.0:">> = iolist_to_binary(join(re:split("10.0.0.0","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"::.0:">> = iolist_to_binary(join(re:split("10.0.0.0","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[trim]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[{parts,
+ 2}]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))\\b(?&byte)(\\.(?&byte)){3}",[]))),
+ <<":.4">> = iolist_to_binary(join(re:split("1.2.3.4","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<":.4::">> = iolist_to_binary(join(re:split("1.2.3.4","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<":.4::">> = iolist_to_binary(join(re:split("1.2.3.4","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<":.206">> = iolist_to_binary(join(re:split("131.111.10.206","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<":.206::">> = iolist_to_binary(join(re:split("131.111.10.206","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<":.206::">> = iolist_to_binary(join(re:split("131.111.10.206","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<":.0">> = iolist_to_binary(join(re:split("10.0.0.0","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<":.0::">> = iolist_to_binary(join(re:split("10.0.0.0","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<":.0::">> = iolist_to_binary(join(re:split("10.0.0.0","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<"10.6">> = iolist_to_binary(join(re:split("10.6","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[trim]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[{parts,
+ 2}]))),
+ <<"455.3.4.5">> = iolist_to_binary(join(re:split("455.3.4.5","\\b(?&byte)(\\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\\d|25[0-5]|1\\d\\d|[1-9]?\\d))",[]))),
+ <<":party">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^(\\w++|\\s++)*$",[trim]))),
+ <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^(\\w++|\\s++)*$",[{parts,
+ 2}]))),
+ <<":party:">> = iolist_to_binary(join(re:split("now is the time for all good men to come to the aid of the party","^(\\w++|\\s++)*$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\w++|\\s++)*$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\w++|\\s++)*$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\w++|\\s++)*$",[]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^(\\w++|\\s++)*$",[trim]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^(\\w++|\\s++)*$",[{parts,
+ 2}]))),
+ <<"this is not a line with only words and spaces!">> = iolist_to_binary(join(re:split("this is not a line with only words and spaces!","^(\\w++|\\s++)*$",[]))),
+ <<":12345:a">> = iolist_to_binary(join(re:split("12345a","(\\d++)(\\w)",[trim]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d++)(\\w)",[{parts,
+ 2}]))),
+ <<":12345:a:">> = iolist_to_binary(join(re:split("12345a","(\\d++)(\\w)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\d++)(\\w)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\d++)(\\w)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","(\\d++)(\\w)",[]))),
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","(\\d++)(\\w)",[trim]))),
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","(\\d++)(\\w)",[{parts,
+ 2}]))),
+ <<"12345+">> = iolist_to_binary(join(re:split("12345+","(\\d++)(\\w)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaab","a++b",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","a++b",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaab","a++b",[]))),
+ <<":aaab">> = iolist_to_binary(join(re:split("aaab","(a++b)",[trim]))),
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","(a++b)",[{parts,
+ 2}]))),
+ <<":aaab:">> = iolist_to_binary(join(re:split("aaab","(a++b)",[]))),
+ <<":aaa">> = iolist_to_binary(join(re:split("aaab","(a++)b",[trim]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(a++)b",[{parts,
+ 2}]))),
+ <<":aaa:">> = iolist_to_binary(join(re:split("aaab","(a++)b",[]))),
+ <<"((:x">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","([^()]++|\\([^()]*\\))+",[trim]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","([^()]++|\\([^()]*\\))+",[{parts,
+ 2}]))),
+ <<"((:x:">> = iolist_to_binary(join(re:split("((abc(ade)ufh()()x","([^()]++|\\([^()]*\\))+",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("(abc)","\\(([^()]++|\\([^()]+\\))+\\)",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(([^()]++|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("(abc)","\\(([^()]++|\\([^()]+\\))+\\)",[]))),
+ <<":xyz">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(([^()]++|\\([^()]+\\))+\\)",[trim]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(([^()]++|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<":xyz:">> = iolist_to_binary(join(re:split("(abc(def)xyz)","\\(([^()]++|\\([^()]+\\))+\\)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(([^()]++|\\([^()]+\\))+\\)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(([^()]++|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","\\(([^()]++|\\([^()]+\\))+\\)",[]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(([^()]++|\\([^()]+\\))+\\)",[trim]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(([^()]++|\\([^()]+\\))+\\)",[{parts,
+ 2}]))),
+ <<"((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","\\(([^()]++|\\([^()]+\\))+\\)",[]))),
+ ok.
+run42() ->
+ <<":c">> = iolist_to_binary(join(re:split("abc","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<":c:">> = iolist_to_binary(join(re:split("abc","^([^()]|\\((?1)*\\))*$",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("b","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
+ <<":c:">> = iolist_to_binary(join(re:split("abc","^([^()]|\\((?1)*\\))*$",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<":c:">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[{parts,
+ 2}]))),
+ <<":c:">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[]))),
+ <<":d">> = iolist_to_binary(join(re:split("a(b(c))d","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<":d:">> = iolist_to_binary(join(re:split("a(b(c))d","^([^()]|\\((?1)*\\))*$",[{parts,
+ 2}]))),
+ <<":d:">> = iolist_to_binary(join(re:split("a(b(c))d","^([^()]|\\((?1)*\\))*$",[]))),
+ <<"*** Failers)">> = iolist_to_binary(join(re:split("*** Failers)","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<"*** Failers)">> = iolist_to_binary(join(re:split("*** Failers)","^([^()]|\\((?1)*\\))*$",[{parts,
2}]))),
-?line <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[trim]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[{parts,
- 2}]))),
-?line <<"-">> = iolist_to_binary(join(re:split("-","^[\\E\\Qa\\E-\\Qz\\E]+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[{parts,
+ <<"*** Failers)">> = iolist_to_binary(join(re:split("*** Failers)","^([^()]|\\((?1)*\\))*$",[]))),
+ <<"a(b(c)d">> = iolist_to_binary(join(re:split("a(b(c)d","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<"a(b(c)d">> = iolist_to_binary(join(re:split("a(b(c)d","^([^()]|\\((?1)*\\))*$",[{parts,
+ 2}]))),
+ <<"a(b(c)d">> = iolist_to_binary(join(re:split("a(b(c)d","^([^()]|\\((?1)*\\))*$",[]))),
+ <<":3">> = iolist_to_binary(join(re:split(">abc>123<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[trim]))),
+ <<":3:">> = iolist_to_binary(join(re:split(">abc>123<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[{parts,
+ 2}]))),
+ <<":3:">> = iolist_to_binary(join(re:split(">abc>123<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[]))),
+ <<":3">> = iolist_to_binary(join(re:split(">abc>1(2)3<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[trim]))),
+ <<":3:">> = iolist_to_binary(join(re:split(">abc>1(2)3<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[{parts,
+ 2}]))),
+ <<":3:">> = iolist_to_binary(join(re:split(">abc>1(2)3<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[]))),
+ <<":(1(2)3)">> = iolist_to_binary(join(re:split(">abc>(1(2)3)<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[trim]))),
+ <<":(1(2)3):">> = iolist_to_binary(join(re:split(">abc>(1(2)3)<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[{parts,
+ 2}]))),
+ <<":(1(2)3):">> = iolist_to_binary(join(re:split(">abc>(1(2)3)<xyz<","^>abc>([^()]|\\((?1)*\\))*<xyz<$",[]))),
+ <<":1221:1">> = iolist_to_binary(join(re:split("1221","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<":1221:1:::">> = iolist_to_binary(join(re:split("1221","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<":1221:1:::">> = iolist_to_binary(join(re:split("1221","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<":::Satanoscillatemymetallicsonatas:S">> = iolist_to_binary(join(re:split("Satanoscillatemymetallicsonatas","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<":::Satanoscillatemymetallicsonatas:S:">> = iolist_to_binary(join(re:split("Satanoscillatemymetallicsonatas","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::Satanoscillatemymetallicsonatas:S:">> = iolist_to_binary(join(re:split("Satanoscillatemymetallicsonatas","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<":::AmanaplanacanalPanama:A">> = iolist_to_binary(join(re:split("AmanaplanacanalPanama","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<":::AmanaplanacanalPanama:A:">> = iolist_to_binary(join(re:split("AmanaplanacanalPanama","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::AmanaplanacanalPanama:A:">> = iolist_to_binary(join(re:split("AmanaplanacanalPanama","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<":::AblewasIereIsawElba:A">> = iolist_to_binary(join(re:split("AblewasIereIsawElba","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<":::AblewasIereIsawElba:A:">> = iolist_to_binary(join(re:split("AblewasIereIsawElba","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::AblewasIereIsawElba:A:">> = iolist_to_binary(join(re:split("AblewasIereIsawElba","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<"Thequickbrownfox">> = iolist_to_binary(join(re:split("Thequickbrownfox","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ trim]))),
+ <<"Thequickbrownfox">> = iolist_to_binary(join(re:split("Thequickbrownfox","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless,
+ {parts,
+ 2}]))),
+ <<"Thequickbrownfox">> = iolist_to_binary(join(re:split("Thequickbrownfox","^(?:((.)(?1)\\2|)|((.)(?3)\\4|.))$",[caseless]))),
+ <<":12">> = iolist_to_binary(join(re:split("12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[trim]))),
+ <<":12::">> = iolist_to_binary(join(re:split("12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[{parts,
+ 2}]))),
+ <<":12::">> = iolist_to_binary(join(re:split("12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[]))),
+ <<":(((2+2)*-3)-7):-">> = iolist_to_binary(join(re:split("(((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[trim]))),
+ <<":(((2+2)*-3)-7):-:">> = iolist_to_binary(join(re:split("(((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[{parts,
+ 2}]))),
+ <<":(((2+2)*-3)-7):-:">> = iolist_to_binary(join(re:split("(((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[]))),
+ <<":-12">> = iolist_to_binary(join(re:split("-12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[trim]))),
+ <<":-12::">> = iolist_to_binary(join(re:split("-12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[{parts,
+ 2}]))),
+ <<":-12::">> = iolist_to_binary(join(re:split("-12","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[]))),
+ <<"((2+2)*-3)-7)">> = iolist_to_binary(join(re:split("((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[trim]))),
+ <<"((2+2)*-3)-7)">> = iolist_to_binary(join(re:split("((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[{parts,
+ 2}]))),
+ <<"((2+2)*-3)-7)">> = iolist_to_binary(join(re:split("((2+2)*-3)-7)","^(\\d+|\\((?1)([+*-])(?1)\\)|-(?1))$",[]))),
+ <<":xyz:y">> = iolist_to_binary(join(re:split("xyz","^(x(y|(?1){2})z)",[trim]))),
+ <<":xyz:y:">> = iolist_to_binary(join(re:split("xyz","^(x(y|(?1){2})z)",[{parts,
+ 2}]))),
+ <<":xyz:y:">> = iolist_to_binary(join(re:split("xyz","^(x(y|(?1){2})z)",[]))),
+ <<":xxyzxyzz:xyzxyz">> = iolist_to_binary(join(re:split("xxyzxyzz","^(x(y|(?1){2})z)",[trim]))),
+ <<":xxyzxyzz:xyzxyz:">> = iolist_to_binary(join(re:split("xxyzxyzz","^(x(y|(?1){2})z)",[{parts,
+ 2}]))),
+ <<":xxyzxyzz:xyzxyz:">> = iolist_to_binary(join(re:split("xxyzxyzz","^(x(y|(?1){2})z)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(x(y|(?1){2})z)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(x(y|(?1){2})z)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(x(y|(?1){2})z)",[]))),
+ <<"xxyzz">> = iolist_to_binary(join(re:split("xxyzz","^(x(y|(?1){2})z)",[trim]))),
+ <<"xxyzz">> = iolist_to_binary(join(re:split("xxyzz","^(x(y|(?1){2})z)",[{parts,
+ 2}]))),
+ <<"xxyzz">> = iolist_to_binary(join(re:split("xxyzz","^(x(y|(?1){2})z)",[]))),
+ <<"xxyzxyzxyzz">> = iolist_to_binary(join(re:split("xxyzxyzxyzz","^(x(y|(?1){2})z)",[trim]))),
+ <<"xxyzxyzxyzz">> = iolist_to_binary(join(re:split("xxyzxyzxyzz","^(x(y|(?1){2})z)",[{parts,
+ 2}]))),
+ <<"xxyzxyzxyzz">> = iolist_to_binary(join(re:split("xxyzxyzxyzz","^(x(y|(?1){2})z)",[]))),
+ <<":<>:<>">> = iolist_to_binary(join(re:split("<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<":<>:<>:">> = iolist_to_binary(join(re:split("<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<":<>:<>:">> = iolist_to_binary(join(re:split("<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<":<abcd>:<abcd>">> = iolist_to_binary(join(re:split("<abcd>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<":<abcd>:<abcd>:">> = iolist_to_binary(join(re:split("<abcd>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<":<abcd>:<abcd>:">> = iolist_to_binary(join(re:split("<abcd>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<":<abc <123> hij>:<abc <123> hij>">> = iolist_to_binary(join(re:split("<abc <123> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<":<abc <123> hij>:<abc <123> hij>:">> = iolist_to_binary(join(re:split("<abc <123> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<":<abc <123> hij>:<abc <123> hij>:">> = iolist_to_binary(join(re:split("<abc <123> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<"<abc :<def>:<def>: hij>">> = iolist_to_binary(join(re:split("<abc <def> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<"<abc :<def>:<def>: hij>">> = iolist_to_binary(join(re:split("<abc <def> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<"<abc :<def>:<def>: hij>">> = iolist_to_binary(join(re:split("<abc <def> hij>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<":<abc<>def>:<abc<>def>">> = iolist_to_binary(join(re:split("<abc<>def>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<":<abc<>def>:<abc<>def>:">> = iolist_to_binary(join(re:split("<abc<>def>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<":<abc<>def>:<abc<>def>:">> = iolist_to_binary(join(re:split("<abc<>def>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<"<abc:<>:<>">> = iolist_to_binary(join(re:split("<abc<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<"<abc:<>:<>:">> = iolist_to_binary(join(re:split("<abc<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<"<abc:<>:<>:">> = iolist_to_binary(join(re:split("<abc<>","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<"<abc">> = iolist_to_binary(join(re:split("<abc","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ trim]))),
+ <<"<abc">> = iolist_to_binary(join(re:split("<abc","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended,
+ {parts,
+ 2}]))),
+ <<"<abc">> = iolist_to_binary(join(re:split("<abc","((< (?: (?(R) \\d++ | [^<>]*+) | (?2)) * >))",[extended]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^a+(*FAIL)",[trim]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^a+(*FAIL)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[a\\Q]bc\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[{parts,
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^a+(*FAIL)",[]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?c+(*FAIL)",[trim]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?c+(*FAIL)",[{parts,
+ 2}]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?c+(*FAIL)",[]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*PRUNE)c+(*FAIL)",[trim]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*PRUNE)c+(*FAIL)",[{parts,
+ 2}]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*PRUNE)c+(*FAIL)",[]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*COMMIT)c+(*FAIL)",[trim]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*COMMIT)c+(*FAIL)",[{parts,
+ 2}]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*COMMIT)c+(*FAIL)",[]))),
+ <<"aaabcccaaabccc">> = iolist_to_binary(join(re:split("aaabcccaaabccc","a+b?(*SKIP)c+(*FAIL)",[trim]))),
+ <<"aaabcccaaabccc">> = iolist_to_binary(join(re:split("aaabcccaaabccc","a+b?(*SKIP)c+(*FAIL)",[{parts,
+ 2}]))),
+ <<"aaabcccaaabccc">> = iolist_to_binary(join(re:split("aaabcccaaabccc","a+b?(*SKIP)c+(*FAIL)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bbbxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("bbbxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("bbbxxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<"">> = iolist_to_binary(join(re:split("cccxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("cccxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("cccxxxx","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":++++">> = iolist_to_binary(join(re:split("ccc++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":++++">> = iolist_to_binary(join(re:split("ccc++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":++++">> = iolist_to_binary(join(re:split("ccc++++","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":aaaxxxxxx">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":aaaxxxxxx:">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":aaaxxxxxx:">> = iolist_to_binary(join(re:split("aaaxxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":aaa:++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":aaa:++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":aaa:++++++">> = iolist_to_binary(join(re:split("aaa++++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":bbbxxxxx">> = iolist_to_binary(join(re:split("bbbxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":bbbxxxxx:">> = iolist_to_binary(join(re:split("bbbxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":bbbxxxxx:">> = iolist_to_binary(join(re:split("bbbxxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":bbb:+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":bbb:+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":bbb:+++++">> = iolist_to_binary(join(re:split("bbb+++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":cccxxxx">> = iolist_to_binary(join(re:split("cccxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":cccxxxx:">> = iolist_to_binary(join(re:split("cccxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":cccxxxx:">> = iolist_to_binary(join(re:split("cccxxxx","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":ccc:++++">> = iolist_to_binary(join(re:split("ccc++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":ccc:++++">> = iolist_to_binary(join(re:split("ccc++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":ccc:++++">> = iolist_to_binary(join(re:split("ccc++++","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<":ddd:ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[trim]))),
+ <<":ddd:ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[{parts,
+ 2}]))),
+ <<":ddd:ddddd">> = iolist_to_binary(join(re:split("dddddddd","^(aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})",[]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*THEN)c+(*FAIL)",[trim]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*THEN)c+(*FAIL)",[{parts,
+ 2}]))),
+ <<"aaabccc">> = iolist_to_binary(join(re:split("aaabccc","a+b?(*THEN)c+(*FAIL)",[]))),
+ <<":AB:B">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<":AB:B::">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<":AB:B::">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<":AB:B::X">> = iolist_to_binary(join(re:split("ABX","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<":AB:B::X">> = iolist_to_binary(join(re:split("ABX","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<":AB:B::X">> = iolist_to_binary(join(re:split("ABX","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<":AAD:A:E">> = iolist_to_binary(join(re:split("AADE","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<":AAD:A:E:">> = iolist_to_binary(join(re:split("AADE","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<":AAD:A:E:">> = iolist_to_binary(join(re:split("AADE","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<":ACD:C:E">> = iolist_to_binary(join(re:split("ACDE","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<":ACD:C:E:">> = iolist_to_binary(join(re:split("ACDE","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<":ACD:C:E:">> = iolist_to_binary(join(re:split("ACDE","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<"AD">> = iolist_to_binary(join(re:split("AD","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<"AD">> = iolist_to_binary(join(re:split("AD","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<"AD">> = iolist_to_binary(join(re:split("AD","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<":1221:1">> = iolist_to_binary(join(re:split("1221","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<":1221:1:::">> = iolist_to_binary(join(re:split("1221","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":1221:1:::">> = iolist_to_binary(join(re:split("1221","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<":::Satan, oscillate my metallic sonatas:S">> = iolist_to_binary(join(re:split("Satan, oscillate my metallic sonatas!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<":::Satan, oscillate my metallic sonatas:S:">> = iolist_to_binary(join(re:split("Satan, oscillate my metallic sonatas!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::Satan, oscillate my metallic sonatas:S:">> = iolist_to_binary(join(re:split("Satan, oscillate my metallic sonatas!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<":::A man, a plan, a canal: Panama:A">> = iolist_to_binary(join(re:split("A man, a plan, a canal: Panama!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<":::A man, a plan, a canal: Panama:A:">> = iolist_to_binary(join(re:split("A man, a plan, a canal: Panama!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::A man, a plan, a canal: Panama:A:">> = iolist_to_binary(join(re:split("A man, a plan, a canal: Panama!","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<":::Able was I ere I saw Elba:A">> = iolist_to_binary(join(re:split("Able was I ere I saw Elba.","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<":::Able was I ere I saw Elba:A:">> = iolist_to_binary(join(re:split("Able was I ere I saw Elba.","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<":::Able was I ere I saw Elba:A:">> = iolist_to_binary(join(re:split("Able was I ere I saw Elba.","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ trim]))),
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless,
+ {parts,
+ 2}]))),
+ <<"The quick brown fox">> = iolist_to_binary(join(re:split("The quick brown fox","^\\W*+(?:((.)\\W*+(?1)\\W*+\\2|)|((.)\\W*+(?3)\\W*+\\4|\\W*+.\\W*+))\\W*+$",[caseless]))),
+ <<":a">> = iolist_to_binary(join(re:split("a","^((.)(?1)\\2|.)$",[trim]))),
+ <<":a::">> = iolist_to_binary(join(re:split("a","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":a::">> = iolist_to_binary(join(re:split("a","^((.)(?1)\\2|.)$",[]))),
+ <<":aba:a">> = iolist_to_binary(join(re:split("aba","^((.)(?1)\\2|.)$",[trim]))),
+ <<":aba:a:">> = iolist_to_binary(join(re:split("aba","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":aba:a:">> = iolist_to_binary(join(re:split("aba","^((.)(?1)\\2|.)$",[]))),
+ <<":aabaa:a">> = iolist_to_binary(join(re:split("aabaa","^((.)(?1)\\2|.)$",[trim]))),
+ <<":aabaa:a:">> = iolist_to_binary(join(re:split("aabaa","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":aabaa:a:">> = iolist_to_binary(join(re:split("aabaa","^((.)(?1)\\2|.)$",[]))),
+ <<":abcdcba:a">> = iolist_to_binary(join(re:split("abcdcba","^((.)(?1)\\2|.)$",[trim]))),
+ <<":abcdcba:a:">> = iolist_to_binary(join(re:split("abcdcba","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":abcdcba:a:">> = iolist_to_binary(join(re:split("abcdcba","^((.)(?1)\\2|.)$",[]))),
+ <<":pqaabaaqp:p">> = iolist_to_binary(join(re:split("pqaabaaqp","^((.)(?1)\\2|.)$",[trim]))),
+ <<":pqaabaaqp:p:">> = iolist_to_binary(join(re:split("pqaabaaqp","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":pqaabaaqp:p:">> = iolist_to_binary(join(re:split("pqaabaaqp","^((.)(?1)\\2|.)$",[]))),
+ <<":ablewasiereisawelba:a">> = iolist_to_binary(join(re:split("ablewasiereisawelba","^((.)(?1)\\2|.)$",[trim]))),
+ <<":ablewasiereisawelba:a:">> = iolist_to_binary(join(re:split("ablewasiereisawelba","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<":ablewasiereisawelba:a:">> = iolist_to_binary(join(re:split("ablewasiereisawelba","^((.)(?1)\\2|.)$",[]))),
+ <<"rhubarb">> = iolist_to_binary(join(re:split("rhubarb","^((.)(?1)\\2|.)$",[trim]))),
+ <<"rhubarb">> = iolist_to_binary(join(re:split("rhubarb","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<"rhubarb">> = iolist_to_binary(join(re:split("rhubarb","^((.)(?1)\\2|.)$",[]))),
+ <<"the quick brown fox">> = iolist_to_binary(join(re:split("the quick brown fox","^((.)(?1)\\2|.)$",[trim]))),
+ <<"the quick brown fox">> = iolist_to_binary(join(re:split("the quick brown fox","^((.)(?1)\\2|.)$",[{parts,
+ 2}]))),
+ <<"the quick brown fox">> = iolist_to_binary(join(re:split("the quick brown fox","^((.)(?1)\\2|.)$",[]))),
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(a)(?<=b(?1))",[trim]))),
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(a)(?<=b(?1))",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","^[a\\Q]bc\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[{parts,
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(a)(?<=b(?1))",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)(?<=b(?1))",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)(?<=b(?1))",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)(?<=b(?1))",[]))),
+ <<"caz">> = iolist_to_binary(join(re:split("caz","(a)(?<=b(?1))",[trim]))),
+ <<"caz">> = iolist_to_binary(join(re:split("caz","(a)(?<=b(?1))",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("c","^[a\\Q]bc\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","^[a-\\Q\\E]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("-","^[a-\\Q\\E]",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[trim]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[{parts,
- 2}]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()*)*",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))*)*",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[trim]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[{parts,
- 2}]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("aaaa","^(a()+)+",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[{parts,
+ <<"caz">> = iolist_to_binary(join(re:split("caz","(a)(?<=b(?1))",[]))),
+ <<"zba:a:z">> = iolist_to_binary(join(re:split("zbaaz","(?<=b(?1))(a)",[trim]))),
+ <<"zba:a:z">> = iolist_to_binary(join(re:split("zbaaz","(?<=b(?1))(a)",[{parts,
+ 2}]))),
+ <<"zba:a:z">> = iolist_to_binary(join(re:split("zbaaz","(?<=b(?1))(a)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=b(?1))(a)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=b(?1))(a)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=b(?1))(a)",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","(?<=b(?1))(a)",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","(?<=b(?1))(a)",[{parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","(?<=b(?1))(a)",[]))),
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(?<X>a)(?<=b(?&X))",[trim]))),
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(?<X>a)(?<=b(?&X))",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaa","^(?:a(?:(?:))+)+",[]))),
-?line <<":a">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[trim]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[{parts,
- 2}]))),
-?line <<":a::">> = iolist_to_binary(join(re:split("abbD","(a){0,3}(?(1)b|(c|))*D",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[{parts,
- 2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("ccccD","(a){0,3}(?(1)b|(c|))*D",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[{parts,
+ <<"b:a:z">> = iolist_to_binary(join(re:split("baz","(?<X>a)(?<=b(?&X))",[]))),
+ ok.
+run43() ->
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))\\1",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))\\1",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))\\1",[]))),
+ <<":def">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))\\1",[trim]))),
+ <<":def:">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))\\1",[{parts,
+ 2}]))),
+ <<":def:">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))\\1",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))\\1",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))\\1",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))\\1",[]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))\\1",[trim]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))\\1",[{parts,
+ 2}]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))\\1",[]))),
+ <<"defabc">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))\\1",[trim]))),
+ <<"defabc">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))\\1",[{parts,
+ 2}]))),
+ <<"defabc">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))\\1",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))(?1)",[trim]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))(?1)",[{parts,
+ 2}]))),
+ <<":abc:">> = iolist_to_binary(join(re:split("abcabc","^(?|(abc)|(def))(?1)",[]))),
+ <<":def">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))(?1)",[trim]))),
+ <<":def:">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))(?1)",[{parts,
+ 2}]))),
+ <<":def:">> = iolist_to_binary(join(re:split("defabc","^(?|(abc)|(def))(?1)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))(?1)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))(?1)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?|(abc)|(def))(?1)",[]))),
+ <<"defdef">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))(?1)",[trim]))),
+ <<"defdef">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))(?1)",[{parts,
+ 2}]))),
+ <<"defdef">> = iolist_to_binary(join(re:split("defdef","^(?|(abc)|(def))(?1)",[]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))(?1)",[trim]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))(?1)",[{parts,
+ 2}]))),
+ <<"abcdef">> = iolist_to_binary(join(re:split("abcdef","^(?|(abc)|(def))(?1)",[]))),
+ <<"A:C:D">> = iolist_to_binary(join(re:split("ABCD","(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"A:C:D">> = iolist_to_binary(join(re:split("ABCD","(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"A:C:D">> = iolist_to_binary(join(re:split("ABCD","(?:(?1)|B)(A(*F)|C)",[]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","(?:(?1)|B)(A(*F)|C)",[]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","^(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("CCD","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("BCD","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("BCD","^(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<":C:D">> = iolist_to_binary(join(re:split("BCD","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"ABCD">> = iolist_to_binary(join(re:split("ABCD","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"ABCD">> = iolist_to_binary(join(re:split("ABCD","^(?:(?1)|B)(A(*F)|C)",[{parts,
2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("D","(a){0,3}(?(1)b|(c|))*D",[]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[trim]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(a|)*\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[trim]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[{parts,
- 2}]))),
-?line <<"::">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(a|)*\\d",[]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[trim]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?>a|)*\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?>a|)*\\d",[]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[trim]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[{parts,
- 2}]))),
-?line <<"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","(?:a|)*\\d",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4","(?:a|)*\\d",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","\\Z",[trim]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\Z",[{parts,
- 2}]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\Z",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("abc","^(?s)(?>.*)(?<!\\n)",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[{parts,
+ <<"ABCD">> = iolist_to_binary(join(re:split("ABCD","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","^(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"CAD">> = iolist_to_binary(join(re:split("CAD","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<"BAD">> = iolist_to_binary(join(re:split("BAD","^(?:(?1)|B)(A(*F)|C)",[trim]))),
+ <<"BAD">> = iolist_to_binary(join(re:split("BAD","^(?:(?1)|B)(A(*F)|C)",[{parts,
+ 2}]))),
+ <<"BAD">> = iolist_to_binary(join(re:split("BAD","^(?:(?1)|B)(A(*F)|C)",[]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("AAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("AAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("AAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<":C">> = iolist_to_binary(join(re:split("ACD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<":C:">> = iolist_to_binary(join(re:split("ACD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<":C:">> = iolist_to_binary(join(re:split("ACD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("BAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("BAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<":A:D">> = iolist_to_binary(join(re:split("BAD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<":C">> = iolist_to_binary(join(re:split("BCD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<":C:">> = iolist_to_binary(join(re:split("BCD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<":C:">> = iolist_to_binary(join(re:split("BCD","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<":A:X">> = iolist_to_binary(join(re:split("BAX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<":A:X">> = iolist_to_binary(join(re:split("BAX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<":A:X">> = iolist_to_binary(join(re:split("BAX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<"ACX">> = iolist_to_binary(join(re:split("ACX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<"ACX">> = iolist_to_binary(join(re:split("ACX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<"ACX">> = iolist_to_binary(join(re:split("ACX","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[trim]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[{parts,
+ 2}]))),
+ <<"ABC">> = iolist_to_binary(join(re:split("ABC","(?:(?1)|B)(A(*ACCEPT)XX|C)D",[]))),
+ <<"">> = iolist_to_binary(join(re:split("BAC","(?(DEFINE)(A))B(?1)C",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("BAC","(?(DEFINE)(A))B(?1)C",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("BAC","(?(DEFINE)(A))B(?1)C",[]))),
+ <<"">> = iolist_to_binary(join(re:split("BAAC","(?(DEFINE)((A)\\2))B(?1)C",[trim]))),
+ <<":::">> = iolist_to_binary(join(re:split("BAAC","(?(DEFINE)((A)\\2))B(?1)C",[{parts,
+ 2}]))),
+ <<":::">> = iolist_to_binary(join(re:split("BAAC","(?(DEFINE)((A)\\2))B(?1)C",[]))),
+ <<":(ab(cd)ef):ef">> = iolist_to_binary(join(re:split("(ab(cd)ef)","(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )",[extended,
+ trim]))),
+ <<":(ab(cd)ef):ef:">> = iolist_to_binary(join(re:split("(ab(cd)ef)","(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )",[extended,
+ {parts,
+ 2}]))),
+ <<":(ab(cd)ef):ef:">> = iolist_to_binary(join(re:split("(ab(cd)ef)","(?<pn> \\( ( [^()]++ | (?&pn) )* \\) )",[extended]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*SKIP)b|ac)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*SKIP)b|ac)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*SKIP)b|ac)",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*SKIP)b|ac)",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*SKIP)b|ac)",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*SKIP)b|ac)",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(?=a(*PRUNE)b)",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(?=a(*PRUNE)b)",[{parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","^(?=a(*PRUNE)b)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*PRUNE)b)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*PRUNE)b)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?=a(*PRUNE)b)",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*PRUNE)b)",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*PRUNE)b)",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*PRUNE)b)",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*ACCEPT)b)",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*ACCEPT)b)",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?=a(*ACCEPT)b)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("ab","(?>a\\Kb)",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?>a\\Kb)",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?>a\\Kb)",[]))),
+ <<"a:ab">> = iolist_to_binary(join(re:split("ab","((?>a\\Kb))",[trim]))),
+ <<"a:ab:">> = iolist_to_binary(join(re:split("ab","((?>a\\Kb))",[{parts,
+ 2}]))),
+ <<"a:ab:">> = iolist_to_binary(join(re:split("ab","((?>a\\Kb))",[]))),
+ <<"a:ab">> = iolist_to_binary(join(re:split("ab","(a\\Kb)",[trim]))),
+ <<"a:ab:">> = iolist_to_binary(join(re:split("ab","(a\\Kb)",[{parts,
+ 2}]))),
+ <<"a:ab:">> = iolist_to_binary(join(re:split("ab","(a\\Kb)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","^a\\Kcz|ac",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","^a\\Kcz|ac",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","^a\\Kcz|ac",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","(?>a\\Kbz|ab)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?>a\\Kbz|ab)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ab","(?>a\\Kbz|ab)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("ab","^(?&t)(?(DEFINE)(?<t>a\\Kb))$",[trim]))),
+ <<"a::">> = iolist_to_binary(join(re:split("ab","^(?&t)(?(DEFINE)(?<t>a\\Kb))$",[{parts,
+ 2}]))),
+ <<"a::">> = iolist_to_binary(join(re:split("ab","^(?&t)(?(DEFINE)(?<t>a\\Kb))$",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<":c:">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[{parts,
+ 2}]))),
+ <<":c:">> = iolist_to_binary(join(re:split("a(b)c","^([^()]|\\((?1)*\\))*$",[]))),
+ <<":e">> = iolist_to_binary(join(re:split("a(b(c)d)e","^([^()]|\\((?1)*\\))*$",[trim]))),
+ <<":e:">> = iolist_to_binary(join(re:split("a(b(c)d)e","^([^()]|\\((?1)*\\))*$",[{parts,
+ 2}]))),
+ <<":e:">> = iolist_to_binary(join(re:split("a(b(c)d)e","^([^()]|\\((?1)*\\))*$",[]))),
+ <<":0">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[trim]))),
+ <<":0::">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[{parts,
+ 2}]))),
+ <<":0::">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[]))),
+ <<":00:0">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[trim]))),
+ <<":00:0:">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[{parts,
+ 2}]))),
+ <<":00:0:">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[]))),
+ <<":0000:0">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[trim]))),
+ <<":0000:0:">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[{parts,
+ 2}]))),
+ <<":0000:0:">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))",[]))),
+ ok.
+run44() ->
+ <<":0:0">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[trim]))),
+ <<":0:0:">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[{parts,
+ 2}]))),
+ <<":0:0:">> = iolist_to_binary(join(re:split("0","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[]))),
+ <<":0:0::0:0">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[trim]))),
+ <<":0:0:0">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[{parts,
+ 2}]))),
+ <<":0:0::0:0:">> = iolist_to_binary(join(re:split("00","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[]))),
+ <<":0:0::0:0::0:0::0:0">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[trim]))),
+ <<":0:0:000">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[{parts,
+ 2}]))),
+ <<":0:0::0:0::0:0::0:0:">> = iolist_to_binary(join(re:split("0000","(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))",[]))),
+ <<"ACABX">> = iolist_to_binary(join(re:split("ACABX","A(*COMMIT)(B|D)",[trim]))),
+ <<"ACABX">> = iolist_to_binary(join(re:split("ACABX","A(*COMMIT)(B|D)",[{parts,
+ 2}]))),
+ <<"ACABX">> = iolist_to_binary(join(re:split("ACABX","A(*COMMIT)(B|D)",[]))),
+ <<":A:B:C:DEFG">> = iolist_to_binary(join(re:split("ABCDEFG","(*COMMIT)(A|P)(B|P)(C|P)",[trim]))),
+ <<":A:B:C:DEFG">> = iolist_to_binary(join(re:split("ABCDEFG","(*COMMIT)(A|P)(B|P)(C|P)",[{parts,
+ 2}]))),
+ <<":A:B:C:DEFG">> = iolist_to_binary(join(re:split("ABCDEFG","(*COMMIT)(A|P)(B|P)(C|P)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(*COMMIT)(A|P)(B|P)(C|P)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(*COMMIT)(A|P)(B|P)(C|P)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(*COMMIT)(A|P)(B|P)(C|P)",[]))),
+ <<"DEFGABC">> = iolist_to_binary(join(re:split("DEFGABC","(*COMMIT)(A|P)(B|P)(C|P)",[trim]))),
+ <<"DEFGABC">> = iolist_to_binary(join(re:split("DEFGABC","(*COMMIT)(A|P)(B|P)(C|P)",[{parts,
+ 2}]))),
+ <<"DEFGABC">> = iolist_to_binary(join(re:split("DEFGABC","(*COMMIT)(A|P)(B|P)(C|P)",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("abbb","(\\w+)(?>b(*COMMIT))\\w{2}",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abbb","(\\w+)(?>b(*COMMIT))\\w{2}",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("abbb","(\\w+)(?>b(*COMMIT))\\w{2}",[]))),
+ <<"abbb">> = iolist_to_binary(join(re:split("abbb","(\\w+)b(*COMMIT)\\w{2}",[trim]))),
+ <<"abbb">> = iolist_to_binary(join(re:split("abbb","(\\w+)b(*COMMIT)\\w{2}",[{parts,
+ 2}]))),
+ <<"abbb">> = iolist_to_binary(join(re:split("abbb","(\\w+)b(*COMMIT)\\w{2}",[]))),
+ <<"b::c">> = iolist_to_binary(join(re:split("bac","(?&t)(?#()(?(DEFINE)(?<t>a))",[trim]))),
+ <<"b::c">> = iolist_to_binary(join(re:split("bac","(?&t)(?#()(?(DEFINE)(?<t>a))",[{parts,
+ 2}]))),
+ <<"b::c">> = iolist_to_binary(join(re:split("bac","(?&t)(?#()(?(DEFINE)(?<t>a))",[]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?",[trim]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?",[{parts,
+ 2}]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?",[]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(yes|no)(*THEN)(*F))?",[trim]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(yes|no)(*THEN)(*F))?",[{parts,
+ 2}]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","(?>(*COMMIT)(yes|no)(*THEN)(*F))?",[]))),
+ ok.
+run45() ->
+ <<"">> = iolist_to_binary(join(re:split("bc","b?(*SKIP)c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("bc","b?(*SKIP)c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("bc","b?(*SKIP)c",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("abc","b?(*SKIP)c",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("abc","b?(*SKIP)c",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("abc","b?(*SKIP)c",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)bc",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)bc",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)bc",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)b",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)b",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","(*SKIP)b",[]))),
+ <<"x::x::x">> = iolist_to_binary(join(re:split("xxx","(?P<abn>(?P=abn)xxx|)+",[trim]))),
+ <<"x::xx">> = iolist_to_binary(join(re:split("xxx","(?P<abn>(?P=abn)xxx|)+",[{parts,
+ 2}]))),
+ <<"x::x::x::">> = iolist_to_binary(join(re:split("xxx","(?P<abn>(?P=abn)xxx|)+",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aa","(?i:([^b]))(?1)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aa","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aa","(?i:([^b]))(?1)",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aA","(?i:([^b]))(?1)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aA","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aA","(?i:([^b]))(?1)",[]))),
+ <<":*:: ::a::l::r">> = iolist_to_binary(join(re:split("** Failers","(?i:([^b]))(?1)",[trim]))),
+ <<":*: Failers">> = iolist_to_binary(join(re:split("** Failers","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<":*:: ::a::l::r:">> = iolist_to_binary(join(re:split("** Failers","(?i:([^b]))(?1)",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(?i:([^b]))(?1)",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(?i:([^b]))(?1)",[]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:([^b]))(?1)",[trim]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<"aB">> = iolist_to_binary(join(re:split("aB","(?i:([^b]))(?1)",[]))),
+ <<"Ba">> = iolist_to_binary(join(re:split("Ba","(?i:([^b]))(?1)",[trim]))),
+ <<"Ba">> = iolist_to_binary(join(re:split("Ba","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<"Ba">> = iolist_to_binary(join(re:split("Ba","(?i:([^b]))(?1)",[]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","(?i:([^b]))(?1)",[trim]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","(?i:([^b]))(?1)",[{parts,
+ 2}]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","(?i:([^b]))(?1)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[trim]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[{parts,
+ 2}]))),
+ <<"aaaaaa">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*+(?(DEFINE)(?<t>a))\\w$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaaX","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aaaaaa","^(?&t)*(?(DEFINE)(?<t>a))\\w$",[]))),
+ <<":a:X">> = iolist_to_binary(join(re:split("aaaaX","^(a)*+(\\w)",[trim]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a)*+(\\w)",[{parts,
+ 2}]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a)*+(\\w)",[]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)*+(\\w)",[trim]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)*+(\\w)",[{parts,
+ 2}]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)*+(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)*+(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)*+(\\w)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)*+(\\w)",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)*+(\\w)",[trim]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)*+(\\w)",[{parts,
+ 2}]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)*+(\\w)",[]))),
+ <<":X">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)*+(\\w)",[trim]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)*+(\\w)",[{parts,
+ 2}]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)*+(\\w)",[]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)*+(\\w)",[trim]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)*+(\\w)",[{parts,
+ 2}]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)*+(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)*+(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)*+(\\w)",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[trim]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[{parts,
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)*+(\\w)",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)*+(\\w)",[trim]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)*+(\\w)",[{parts,
+ 2}]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)*+(\\w)",[]))),
+ <<":a:X">> = iolist_to_binary(join(re:split("aaaaX","^(a)++(\\w)",[trim]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a)++(\\w)",[{parts,
+ 2}]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a)++(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)++(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)++(\\w)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a)++(\\w)",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)++(\\w)",[trim]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)++(\\w)",[{parts,
+ 2}]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(a)++(\\w)",[]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a)++(\\w)",[trim]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a)++(\\w)",[{parts,
+ 2}]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a)++(\\w)",[]))),
+ <<":X">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)++(\\w)",[trim]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)++(\\w)",[{parts,
+ 2}]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)++(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)++(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)++(\\w)",[{parts,
2}]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","^(?![^\\n]*\\n\\z)",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[trim]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[{parts,
- 2}]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[]))),
-?line <<"abc">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[trim]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[{parts,
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a)++(\\w)",[]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)++(\\w)",[trim]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)++(\\w)",[{parts,
+ 2}]))),
+ <<"aaaa">> = iolist_to_binary(join(re:split("aaaa","^(?:a)++(\\w)",[]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a)++(\\w)",[trim]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a)++(\\w)",[{parts,
+ 2}]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a)++(\\w)",[]))),
+ <<":a:a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(a)?+(\\w)",[trim]))),
+ <<":a:a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(a)?+(\\w)",[{parts,
+ 2}]))),
+ <<":a:a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(a)?+(\\w)",[]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)?+(\\w)",[trim]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)?+(\\w)",[{parts,
+ 2}]))),
+ <<"::Y:Z">> = iolist_to_binary(join(re:split("YZ","^(a)?+(\\w)",[]))),
+ <<":a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)?+(\\w)",[trim]))),
+ <<":a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)?+(\\w)",[{parts,
+ 2}]))),
+ <<":a:aaX">> = iolist_to_binary(join(re:split("aaaaX","^(?:a)?+(\\w)",[]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)?+(\\w)",[trim]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)?+(\\w)",[{parts,
+ 2}]))),
+ <<":Y:Z">> = iolist_to_binary(join(re:split("YZ","^(?:a)?+(\\w)",[]))),
+ <<":a:X">> = iolist_to_binary(join(re:split("aaaaX","^(a){2,}+(\\w)",[trim]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<":a:X:">> = iolist_to_binary(join(re:split("aaaaX","^(a){2,}+(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a){2,}+(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(a){2,}+(\\w)",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a){2,}+(\\w)",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(a){2,}+(\\w)",[]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a){2,}+(\\w)",[trim]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(a){2,}+(\\w)",[]))),
+ <<":X">> = iolist_to_binary(join(re:split("aaaaX","^(?:a){2,}+(\\w)",[trim]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<":X:">> = iolist_to_binary(join(re:split("aaaaX","^(?:a){2,}+(\\w)",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a){2,}+(\\w)",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","^(?:a){2,}+(\\w)",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(?:a){2,}+(\\w)",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(?:a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^(?:a){2,}+(\\w)",[]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a){2,}+(\\w)",[trim]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a){2,}+(\\w)",[{parts,
+ 2}]))),
+ <<"YZ">> = iolist_to_binary(join(re:split("YZ","^(?:a){2,}+(\\w)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","(a|)*(?1)b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","(a|)*(?1)b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","(a|)*(?1)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ab","(a|)*(?1)b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("ab","(a|)*(?1)b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("ab","(a|)*(?1)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aab","(a|)*(?1)b",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aab","(a|)*(?1)b",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aab","(a|)*(?1)b",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)++(?1)b",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)++(?1)b",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)++(?1)b",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)++(?1)b",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)++(?1)b",[{parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)++(?1)b",[]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)++(?1)b",[trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)++(?1)b",[{parts,
+ 2}]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)++(?1)b",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)*+(?1)b",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)*+(?1)b",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(a)*+(?1)b",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)*+(?1)b",[trim]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)*+(?1)b",[{parts,
+ 2}]))),
+ <<"ab">> = iolist_to_binary(join(re:split("ab","(a)*+(?1)b",[]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)*+(?1)b",[trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)*+(?1)b",[{parts,
+ 2}]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(a)*+(?1)b",[]))),
+ <<"">> = iolist_to_binary(join(re:split("b","(?1)(?:(b)){0}",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","(?1)(?:(b)){0}",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("b","(?1)(?:(b)){0}",[]))),
+ <<":foo(bar(baz)+baz(bop)):(bar(baz)+baz(bop)):bar(baz)+baz(bop)">> = iolist_to_binary(join(re:split("foo(bar(baz)+baz(bop))","(foo ( \\( ((?:(?> [^()]+ )|(?2))*) \\) ) )",[extended,
+ trim]))),
+ <<":foo(bar(baz)+baz(bop)):(bar(baz)+baz(bop)):bar(baz)+baz(bop):">> = iolist_to_binary(join(re:split("foo(bar(baz)+baz(bop))","(foo ( \\( ((?:(?> [^()]+ )|(?2))*) \\) ) )",[extended,
+ {parts,
+ 2}]))),
+ <<":foo(bar(baz)+baz(bop)):(bar(baz)+baz(bop)):bar(baz)+baz(bop):">> = iolist_to_binary(join(re:split("foo(bar(baz)+baz(bop))","(foo ( \\( ((?:(?> [^()]+ )|(?2))*) \\) ) )",[extended]))),
+ ok.
+run46() ->
+ <<":AB:B">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ trim]))),
+ <<":AB:B::">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended,
+ {parts,
+ 2}]))),
+ <<":AB:B::">> = iolist_to_binary(join(re:split("AB","(A (A|B(*ACCEPT)|C) D)(E)",[extended]))),
+ <<":a">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)++",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)++",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)++",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)++",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)++",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba","\\A.*?(a|bc)++",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc|d)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc|d)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc|d)",[]))),
+ <<":b:eetle">> = iolist_to_binary(join(re:split("beetle","(?:(b))++",[trim]))),
+ <<":b:eetle">> = iolist_to_binary(join(re:split("beetle","(?:(b))++",[{parts,
+ 2}]))),
+ <<":b:eetle">> = iolist_to_binary(join(re:split("beetle","(?:(b))++",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("a","(?(?=(a(*ACCEPT)z))a)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(?(?=(a(*ACCEPT)z))a)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("a","(?(?=(a(*ACCEPT)z))a)",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)+ab",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)+ab",[{parts,
2}]))),
-?line <<"abc:">> = iolist_to_binary(join(re:split("abc","\\z(?<!\\n)",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[trim]))),
-?line <<":::">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[{parts,
- 2}]))),
-?line <<":::">> = iolist_to_binary(join(re:split("abcd","(.*(.)?)*",[]))),
-?line <<"a:::b:::c:::d">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended,
+ <<":a:">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)+ab",[]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)++ab",[trim]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)++ab",[{parts,
+ 2}]))),
+ <<"aaaab">> = iolist_to_binary(join(re:split("aaaab","^(a)(?1)++ab",[]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","(?(DEFINE)(a))?b(?1)",[trim]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","(?(DEFINE)(a))?b(?1)",[{parts,
+ 2}]))),
+ <<"::ckgammon">> = iolist_to_binary(join(re:split("backgammon","(?(DEFINE)(a))?b(?1)",[]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N+",[trim]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N+",[{parts,2}]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N+",[]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N{1,}",[trim]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N{1,}",[{parts,2}]))),
+ <<":
+def">> = iolist_to_binary(join(re:split("abc
+def","^\\N{1,}",[]))),
+ <<":cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|(?R)b)",[trim]))),
+ <<":cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|(?R)b)",[{parts,
+ 2}]))),
+ <<":cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|(?R)b)",[]))),
+ <<":aaaa:cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|((?R))b)",[trim]))),
+ <<":aaaa:cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|((?R))b)",[{parts,
+ 2}]))),
+ <<":aaaa:cde">> = iolist_to_binary(join(re:split("aaaabcde","(?(R)a+|((?R))b)",[]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R)a+|(?1)b))",[trim]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R)a+|(?1)b))",[{parts,
+ 2}]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R)a+|(?1)b))",[]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R1)a+|(?1)b))",[trim]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R1)a+|(?1)b))",[{parts,
+ 2}]))),
+ <<":aaaab:cde">> = iolist_to_binary(join(re:split("aaaabcde","((?(R1)a+|(?1)b))",[]))),
+ <<"">> = iolist_to_binary(join(re:split("a","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("a","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[]))),
+ <<"b">> = iolist_to_binary(join(re:split("ba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[trim]))),
+ <<"b::">> = iolist_to_binary(join(re:split("ba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[{parts,
+ 2}]))),
+ <<"b::">> = iolist_to_binary(join(re:split("ba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[]))),
+ <<"bb">> = iolist_to_binary(join(re:split("bba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[trim]))),
+ <<"bb::">> = iolist_to_binary(join(re:split("bba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[{parts,
+ 2}]))),
+ <<"bb::">> = iolist_to_binary(join(re:split("bba","(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))",[]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b) c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b) c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b) c",[extended]))),
+ ok.
+run47() ->
+ <<":ab">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F)) c",[extended,
trim]))),
-?line <<"a:::bcd">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended,
+ <<":ab:">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F)) c",[extended,
{parts,
2}]))),
-?line <<"a:::b:::c:::d:::">> = iolist_to_binary(join(re:split("abcd","( (A | (?(1)0|) )* )",[extended]))),
-?line <<"a:::b:::c:::d">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended,
+ <<":ab:">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F)) c",[extended]))),
+ <<":ab:ab">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) | (*F) ) c",[extended,
+ trim]))),
+ <<":ab:ab:">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) | (*F) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<":ab:ab:">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) | (*F) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) ) c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b) c",[extended,
trim]))),
-?line <<"a:::bcd">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended,
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b) c",[extended,
{parts,
2}]))),
-?line <<"a:::b:::c:::d:::">> = iolist_to_binary(join(re:split("abcd","( ( (?(1)0|) )* )",[extended]))),
-?line <<"a::b::c::d">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended,
- trim]))),
-?line <<"a::bcd">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended,
- {parts,
- 2}]))),
-?line <<"a::b::c::d::">> = iolist_to_binary(join(re:split("abcd","( (?(1)0|)* )",[extended]))),
-?line <<"">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a]","[[:abcd:xyz]]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[{parts,
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b) c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F)) c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F)) c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F)) c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) | (*F) ) c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) | (*F) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) | (*F) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) ) c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b) c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b) c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b) c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b|(*F)) c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b|(*F)) c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?>a(*THEN)b|(*F)) c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) | (*F) ) c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) | (*F) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) | (*F) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) ) c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) ) c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?> (?>a(*THEN)b) ) c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b)++ c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b)++ c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b)++ c",[extended]))),
+ <<":ab">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F))++ c",[extended,
+ trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F))++ c",[extended,
+ {parts,
+ 2}]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("aabc","^.*? (a(*THEN)b|(*F))++ c",[extended]))),
+ <<":ab:ab">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ | (*F) )++ c",[extended,
+ trim]))),
+ <<":ab:ab:">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ | (*F) )++ c",[extended,
+ {parts,
+ 2}]))),
+ <<":ab:ab:">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ | (*F) )++ c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ )++ c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ )++ c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? ( (a(*THEN)b)++ )++ c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b)++ c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b)++ c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b)++ c",[extended]))),
+ ok.
+run48() ->
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F))++ c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F))++ c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?:a(*THEN)b|(*F))++ c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c",[extended,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c",[extended,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c",[extended]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ )++ c",[extended,
+ trim]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ )++ c",[extended,
+ {parts,
+ 2}]))),
+ <<"aabc">> = iolist_to_binary(join(re:split("aabc","^.*? (?: (?:a(*THEN)b)++ )++ c",[extended]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","^(?(?=a(*THEN)b)ab|ac)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","^(?(?=a(*THEN)b)ab|ac)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","^(?(?=a(*THEN)b)ab|ac)",[]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","^.*?(?(?=a)a|b(*THEN)c)",[trim]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","^.*?(?(?=a)a|b(*THEN)c)",[{parts,
+ 2}]))),
+ <<"ba">> = iolist_to_binary(join(re:split("ba","^.*?(?(?=a)a|b(*THEN)c)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ba","^.*?(?:(?(?=a)a|b(*THEN)c)|d)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","^.*?(?:(?(?=a)a|b(*THEN)c)|d)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","^.*?(?:(?(?=a)a|b(*THEN)c)|d)",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^.*?(?(?=a)a(*THEN)b|c)",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^.*?(?(?=a)a(*THEN)b|c)",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^.*?(?(?=a)a(*THEN)b|c)",[]))),
+ <<":abc">> = iolist_to_binary(join(re:split("aabc","^.*(?=a(*THEN)b)",[trim]))),
+ <<":abc">> = iolist_to_binary(join(re:split("aabc","^.*(?=a(*THEN)b)",[{parts,
+ 2}]))),
+ <<":abc">> = iolist_to_binary(join(re:split("aabc","^.*(?=a(*THEN)b)",[]))),
+ <<"xa:d">> = iolist_to_binary(join(re:split("xacd","(?<=a(*ACCEPT)b)c",[trim]))),
+ <<"xa:d">> = iolist_to_binary(join(re:split("xacd","(?<=a(*ACCEPT)b)c",[{parts,
+ 2}]))),
+ <<"xa:d">> = iolist_to_binary(join(re:split("xacd","(?<=a(*ACCEPT)b)c",[]))),
+ <<"xa:a:d">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*ACCEPT)b))c",[trim]))),
+ <<"xa:a:d">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*ACCEPT)b))c",[{parts,
+ 2}]))),
+ <<"xa:a:d">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*ACCEPT)b))c",[]))),
+ <<"xab:ab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=(a(*COMMIT)b))c",[trim]))),
+ <<"xab:ab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=(a(*COMMIT)b))c",[{parts,
+ 2}]))),
+ <<"xab:ab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=(a(*COMMIT)b))c",[]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=(a(*COMMIT)b))c",[trim]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=(a(*COMMIT)b))c",[{parts,
+ 2}]))),
+ <<"** Failers">> = iolist_to_binary(join(re:split("** Failers","(?<=(a(*COMMIT)b))c",[]))),
+ <<"xacd">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*COMMIT)b))c",[trim]))),
+ <<"xacd">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*COMMIT)b))c",[{parts,
+ 2}]))),
+ <<"xacd">> = iolist_to_binary(join(re:split("xacd","(?<=(a(*COMMIT)b))c",[]))),
+ <<"x:d">> = iolist_to_binary(join(re:split("xcd","(?<!a(*FAIL)b)c",[trim]))),
+ <<"x:d">> = iolist_to_binary(join(re:split("xcd","(?<!a(*FAIL)b)c",[{parts,
+ 2}]))),
+ <<"x:d">> = iolist_to_binary(join(re:split("xcd","(?<!a(*FAIL)b)c",[]))),
+ <<"a:d">> = iolist_to_binary(join(re:split("acd","(?<!a(*FAIL)b)c",[trim]))),
+ <<"a:d">> = iolist_to_binary(join(re:split("acd","(?<!a(*FAIL)b)c",[{parts,
+ 2}]))),
+ <<"a:d">> = iolist_to_binary(join(re:split("acd","(?<!a(*FAIL)b)c",[]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*PRUNE)b)c",[trim]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*PRUNE)b)c",[{parts,
+ 2}]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*PRUNE)b)c",[]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*SKIP)b)c",[trim]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*SKIP)b)c",[{parts,
+ 2}]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*SKIP)b)c",[]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*THEN)b)c",[trim]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*THEN)b)c",[{parts,
+ 2}]))),
+ <<"xab:d">> = iolist_to_binary(join(re:split("xabcd","(?<=a(*THEN)b)c",[]))),
+ <<":a:d">> = iolist_to_binary(join(re:split("abcd","(a)(?2){2}(.)",[trim]))),
+ <<":a:d:">> = iolist_to_binary(join(re:split("abcd","(a)(?2){2}(.)",[{parts,
+ 2}]))),
+ <<":a:d:">> = iolist_to_binary(join(re:split("abcd","(a)(?2){2}(.)",[]))),
+ ok.
+run49() ->
+ <<"hello world ">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1?)test",[trim]))),
+ <<"hello world :::">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1?)test",[{parts,
+ 2}]))),
+ <<"hello world :::">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1?)test",[]))),
+ <<"hello world test">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1+)test",[trim]))),
+ <<"hello world test">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1+)test",[{parts,
+ 2}]))),
+ <<"hello world test">> = iolist_to_binary(join(re:split("hello world test","(another)?(\\1+)test",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aac","(a(*COMMIT)b){0}a(?1)|aac",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","(a(*COMMIT)b){0}a(?1)|aac",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","(a(*COMMIT)b){0}a(?1)|aac",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aac","((?:a?)*)*c",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","((?:a?)*)*c",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","((?:a?)*)*c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aac","((?>a?)*)*c",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","((?>a?)*)*c",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("aac","((?>a?)*)*c",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aba","(?>.*?a)(?<=ba)",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aba","(?>.*?a)(?<=ba)",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aba","(?>.*?a)(?<=ba)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aba","(?:.*?a)(?<=ba)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aba","(?:.*?a)(?<=ba)",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aba","(?:.*?a)(?<=ba)",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split(":]","[[:abcd:xyz]]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("a","[abc[:x\\]pqr]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[{parts,
- 2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("[","[abc[:x\\]pqr]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[{parts,
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[dotall,
+ trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[dotall,
+ {parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split(":","[abc[:x\\]pqr]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[{parts,
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*PRUNE)b",[dotall]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^a(*PRUNE)b",[dotall,
+ trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^a(*PRUNE)b",[dotall,
+ {parts,
+ 2}]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","^a(*PRUNE)b",[dotall]))),
+ <<"a">> = iolist_to_binary(join(re:split("aab",".*?a(*SKIP)b",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*SKIP)b",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab",".*?a(*SKIP)b",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[dotall,
+ trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[dotall,
+ {parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[dotall]))),
+ <<"a">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("aab","(?>.*?a)b",[]))),
+ ok.
+run50() ->
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(?>^a)b",[dotall,
+ trim]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(?>^a)b",[dotall,
+ {parts,
+ 2}]))),
+ <<"aab">> = iolist_to_binary(join(re:split("aab","(?>^a)b",[dotall]))),
+ <<"alphabetabcd:abcd">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*?)(?<=(abcd)|(wxyz))",[trim]))),
+ <<"alphabetabcd:abcd::">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*?)(?<=(abcd)|(wxyz))",[{parts,
+ 2}]))),
+ <<"alphabetabcd:abcd::">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*?)(?<=(abcd)|(wxyz))",[]))),
+ <<"endingwxyz::wxyz">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*?)(?<=(abcd)|(wxyz))",[trim]))),
+ <<"endingwxyz::wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*?)(?<=(abcd)|(wxyz))",[{parts,
+ 2}]))),
+ <<"endingwxyz::wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*?)(?<=(abcd)|(wxyz))",[]))),
+ <<":abcd">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd)|(wxyz))",[trim]))),
+ <<":abcd::">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd)|(wxyz))",[{parts,
+ 2}]))),
+ <<":abcd::">> = iolist_to_binary(join(re:split("alphabetabcd","(?>.*)(?<=(abcd)|(wxyz))",[]))),
+ <<"::wxyz">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd)|(wxyz))",[trim]))),
+ <<"::wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd)|(wxyz))",[{parts,
+ 2}]))),
+ <<"::wxyz:">> = iolist_to_binary(join(re:split("endingwxyz","(?>.*)(?<=(abcd)|(wxyz))",[]))),
+ <<"abcdfooxyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*)foo",[trim]))),
+ <<"abcdfooxyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*)foo",[{parts,
+ 2}]))),
+ <<"abcdfooxyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*)foo",[]))),
+ <<"abcd:xyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*?)foo",[trim]))),
+ <<"abcd:xyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*?)foo",[{parts,
+ 2}]))),
+ <<"abcd:xyz">> = iolist_to_binary(join(re:split("abcdfooxyz","(?>.*?)foo",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","(?:(a(*PRUNE)b)){0}(?:(?1)|ac)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("ac","(?:(a(*PRUNE)b)){0}(?:(?1)|ac)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("ac","(?:(a(*PRUNE)b)){0}(?:(?1)|ac)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","(?:(a(*SKIP)b)){0}(?:(?1)|ac)",[trim]))),
+ <<"::">> = iolist_to_binary(join(re:split("ac","(?:(a(*SKIP)b)){0}(?:(?1)|ac)",[{parts,
+ 2}]))),
+ <<"::">> = iolist_to_binary(join(re:split("ac","(?:(a(*SKIP)b)){0}(?:(?1)|ac)",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","(?<=(*SKIP)ac)a",[trim]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","(?<=(*SKIP)ac)a",[{parts,
+ 2}]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aa","(?<=(*SKIP)ac)a",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)b|a+c",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*PRUNE)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*PRUNE)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*PRUNE)b|a+c",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP:N)(*PRUNE)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP:N)(*PRUNE)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP:N)(*PRUNE)b|a+c",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaac","aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*PRUNE)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*PRUNE)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*PRUNE)b|a+c",[]))),
+ ok.
+run51() ->
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)b|a+c",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)b|a+c",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)b|a+c",[]))),
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*SKIP)b|a+c",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*SKIP)b|a+c",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*SKIP)b|a+c",[]))),
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*SKIP)b|a+c",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*SKIP)b|a+c",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)(*SKIP)b|a+c",[]))),
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*SKIP)b|a+c",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*SKIP)b|a+c",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*SKIP)b|a+c",[]))),
+ <<"aaaaaac">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)b|a+c",[trim]))),
+ <<"aaaaaac">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)b|a+c",[{parts,
+ 2}]))),
+ <<"aaaaaac">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)b|a+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)b|a+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)b|a+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*THEN)b|a+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*THEN)b|a+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*THEN)b|a+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*SKIP)(*THEN)b|a+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*THEN)b|a+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*THEN)b|a+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*PRUNE)(*THEN)b|a+c",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*THEN)b|a+c",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*THEN)b|a+c",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaaaac","aaaaa(*COMMIT)(*THEN)b|a+c",[]))),
+ ok.
+run52() ->
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+",[]))),
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+",[]))),
+ <<"aaaaa">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[trim]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[{parts,
+ 2}]))),
+ <<"aaaaa:">> = iolist_to_binary(join(re:split("aaaaaa","aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c",[trim]))),
+ <<"aaa:">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c",[{parts,
+ 2}]))),
+ <<"aaa:">> = iolist_to_binary(join(re:split("aaaac","a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c",[]))),
+ <<"aa">> = iolist_to_binary(join(re:split("aaaac","aaa(*PRUNE:A)a(*SKIP:A)b|a+c",[trim]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaac","aaa(*PRUNE:A)a(*SKIP:A)b|a+c",[{parts,
+ 2}]))),
+ <<"aa:">> = iolist_to_binary(join(re:split("aaaac","aaa(*PRUNE:A)a(*SKIP:A)b|a+c",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaaac","aaa(*MARK:A)a(*SKIP:A)b|a+c",[trim]))),
+ <<"aaa:">> = iolist_to_binary(join(re:split("aaaac","aaa(*MARK:A)a(*SKIP:A)b|a+c",[{parts,
+ 2}]))),
+ <<"aaa:">> = iolist_to_binary(join(re:split("aaaac","aaa(*MARK:A)a(*SKIP:A)b|a+c",[]))),
+ <<":a">> = iolist_to_binary(join(re:split("ba",".?(a|b(*THEN)c)",[trim]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba",".?(a|b(*THEN)c)",[{parts,
+ 2}]))),
+ <<":a:">> = iolist_to_binary(join(re:split("ba",".?(a|b(*THEN)c)",[]))),
+ <<":ab">> = iolist_to_binary(join(re:split("abc","(a(*COMMIT)b)c|abd",[trim]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(*COMMIT)b)c|abd",[{parts,
+ 2}]))),
+ <<":ab:">> = iolist_to_binary(join(re:split("abc","(a(*COMMIT)b)c|abd",[]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(a(*COMMIT)b)c|abd",[trim]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(a(*COMMIT)b)c|abd",[{parts,
+ 2}]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(a(*COMMIT)b)c|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","(?=a(*COMMIT)b)abc|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=a(*COMMIT)b)abc|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?=a(*COMMIT)b)abc|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","(?=a(*COMMIT)b)abc|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?=a(*COMMIT)b)abc|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?=a(*COMMIT)b)abc|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abc","(?>a(*COMMIT)b)c|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?>a(*COMMIT)b)c|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abc","(?>a(*COMMIT)b)c|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a(?=b(*COMMIT)c)[^d]|abd",[trim]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a(?=b(*COMMIT)c)[^d]|abd",[{parts,
+ 2}]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","a(?=b(*COMMIT)c)[^d]|abd",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=b(*COMMIT)c)[^d]|abd",[trim]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=b(*COMMIT)c)[^d]|abd",[{parts,
+ 2}]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=b(*COMMIT)c)[^d]|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","a(?=bc).|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","a(?=bc).|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","a(?=bc).|abd",[]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=bc).|abd",[trim]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=bc).|abd",[{parts,
+ 2}]))),
+ <<":c">> = iolist_to_binary(join(re:split("abc","a(?=bc).|abd",[]))),
+ <<"abceabd">> = iolist_to_binary(join(re:split("abceabd","a(?>b(*COMMIT)c)d|abd",[trim]))),
+ <<"abceabd">> = iolist_to_binary(join(re:split("abceabd","a(?>b(*COMMIT)c)d|abd",[{parts,
+ 2}]))),
+ <<"abceabd">> = iolist_to_binary(join(re:split("abceabd","a(?>b(*COMMIT)c)d|abd",[]))),
+ <<"abce">> = iolist_to_binary(join(re:split("abceabd","a(?>bc)d|abd",[trim]))),
+ <<"abce:">> = iolist_to_binary(join(re:split("abceabd","a(?>bc)d|abd",[{parts,
+ 2}]))),
+ <<"abce:">> = iolist_to_binary(join(re:split("abceabd","a(?>bc)d|abd",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)b)c|abd",[]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)c)d|abd",[trim]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)c)d|abd",[{parts,
+ 2}]))),
+ <<"abd">> = iolist_to_binary(join(re:split("abd","(?>a(*COMMIT)c)d|abd",[]))),
+ <<"::c">> = iolist_to_binary(join(re:split("ac","((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))",[trim]))),
+ <<"::c:">> = iolist_to_binary(join(re:split("ac","((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))",[{parts,
+ 2}]))),
+ <<"::c:">> = iolist_to_binary(join(re:split("ac","((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))",[]))),
+ ok.
+run53() ->
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^(a)?(?(1)a|b)+$",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a)?(?(1)a|b)+$",[trim]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a)?(?(1)a|b)+$",[{parts,
+ 2}]))),
+ <<"a">> = iolist_to_binary(join(re:split("a","^(a)?(?(1)a|b)+$",[]))),
+ <<"a">> = iolist_to_binary(join(re:split("ab","(?=a\\Kb)ab",[trim]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?=a\\Kb)ab",[{parts,
+ 2}]))),
+ <<"a:">> = iolist_to_binary(join(re:split("ab","(?=a\\Kb)ab",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ac","(?!a\\Kb)ac",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","(?!a\\Kb)ac",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("ac","(?!a\\Kb)ac",[]))),
+ <<"ab">> = iolist_to_binary(join(re:split("abcd","^abc(?<=b\\Kc)d",[trim]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abcd","^abc(?<=b\\Kc)d",[{parts,
+ 2}]))),
+ <<"ab:">> = iolist_to_binary(join(re:split("abcd","^abc(?<=b\\Kc)d",[]))),
+ <<"">> = iolist_to_binary(join(re:split("abcd","^abc(?<!b\\Kq)d",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","^abc(?<!b\\Kq)d",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("abcd","^abc(?<!b\\Kq)d",[]))),
+ <<":abcd">> = iolist_to_binary(join(re:split("abcd","^((abc|abcx)(*THEN)y|abcd)",[trim]))),
+ <<":abcd::">> = iolist_to_binary(join(re:split("abcd","^((abc|abcx)(*THEN)y|abcd)",[{parts,
+ 2}]))),
+ <<":abcd::">> = iolist_to_binary(join(re:split("abcd","^((abc|abcx)(*THEN)y|abcd)",[]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((abc|abcx)(*THEN)y|abcd)",[trim]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((abc|abcx)(*THEN)y|abcd)",[{parts,
+ 2}]))),
+ <<"*** Failers">> = iolist_to_binary(join(re:split("*** Failers","^((abc|abcx)(*THEN)y|abcd)",[]))),
+ <<"abcxy">> = iolist_to_binary(join(re:split("abcxy","^((abc|abcx)(*THEN)y|abcd)",[trim]))),
+ <<"abcxy">> = iolist_to_binary(join(re:split("abcxy","^((abc|abcx)(*THEN)y|abcd)",[{parts,
+ 2}]))),
+ <<"abcxy">> = iolist_to_binary(join(re:split("abcxy","^((abc|abcx)(*THEN)y|abcd)",[]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","^((yes|no)(*THEN)(*F))?",[trim]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","^((yes|no)(*THEN)(*F))?",[{parts,
+ 2}]))),
+ <<"yes">> = iolist_to_binary(join(re:split("yes","^((yes|no)(*THEN)(*F))?",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|ac)ac|ac",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|ac)ac|ac",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|ac)ac|ac",[]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|(ac)) ac | (a)c",[extended,
+ trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|(ac)) ac | (a)c",[extended,
+ {parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","(?=a(*COMMIT)b|(ac)) ac | (a)c",[extended]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*THEN)a)bn|bnn)",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*THEN)a)bn|bnn)",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*THEN)a)bn|bnn)",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*SKIP)a)bn|bnn",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*SKIP)a)bn|bnn",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*SKIP)a)bn|bnn",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*SKIP)a)bn|bnn)",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*SKIP)a)bn|bnn)",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*SKIP)a)bn|bnn)",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*PRUNE)a)bn|bnn",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*PRUNE)a)bn|bnn",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*PRUNE)a)bn|bnn",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*PRUNE)a)bn|bnn)",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*PRUNE)a)bn|bnn)",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*PRUNE)a)bn|bnn)",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*COMMIT)a)bn|bnn",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*COMMIT)a)bn|bnn",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?!b(*COMMIT)a)bn|bnn",[]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*COMMIT)a)bn|bnn)",[trim]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*COMMIT)a)bn|bnn)",[{parts,
+ 2}]))),
+ <<":n">> = iolist_to_binary(join(re:split("bnn","(?(?!b(*COMMIT)a)bn|bnn)",[]))),
+ <<"bnn">> = iolist_to_binary(join(re:split("bnn","(?=b(*SKIP)a)bn|bnn",[trim]))),
+ <<"bnn">> = iolist_to_binary(join(re:split("bnn","(?=b(*SKIP)a)bn|bnn",[{parts,
+ 2}]))),
+ <<"bnn">> = iolist_to_binary(join(re:split("bnn","(?=b(*SKIP)a)bn|bnn",[]))),
+ <<"">> = iolist_to_binary(join(re:split("bnn","(?=b(*THEN)a)bn|bnn",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("bnn","(?=b(*THEN)a)bn|bnn",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("bnn","(?=b(*THEN)a)bn|bnn",[]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*SKIP)b)..",[trim]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*SKIP)b)..",[{parts,
+ 2}]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*SKIP)b)..",[]))),
+ ok.
+run54() ->
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?(?!a(*SKIP)b))",[trim]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?(?!a(*SKIP)b))",[{parts,
+ 2}]))),
+ <<"ac">> = iolist_to_binary(join(re:split("ac","^(?(?!a(*SKIP)b))",[]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","^(?!a(*PRUNE)b)..",[trim]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","^(?!a(*PRUNE)b)..",[{parts,
+ 2}]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","^(?!a(*PRUNE)b)..",[]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*PRUNE)b)..",[trim]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*PRUNE)b)..",[{parts,
+ 2}]))),
+ <<":d">> = iolist_to_binary(join(re:split("acd","(?!a(*PRUNE)b)..",[]))),
+ <<"">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("]","[abc[:x\\]pqr]",[]))),
-?line <<"">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[trim]))),
-?line <<":">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[{parts,
+ <<":">> = iolist_to_binary(join(re:split("ba","\\A.*?(?:a|bc)",[]))),
+ <<":CD">> = iolist_to_binary(join(re:split("CD","^(A(*THEN)B|C(*THEN)D)",[trim]))),
+ <<":CD:">> = iolist_to_binary(join(re:split("CD","^(A(*THEN)B|C(*THEN)D)",[{parts,
+ 2}]))),
+ <<":CD:">> = iolist_to_binary(join(re:split("CD","^(A(*THEN)B|C(*THEN)D)",[]))),
+ <<"">> = iolist_to_binary(join(re:split("1234","^\\d*\\w{4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^\\d*\\w{4}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("1234","^\\d*\\w{4}",[]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^\\d*\\w{4}",[trim]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^\\d*\\w{4}",[{parts,
+ 2}]))),
+ <<"123">> = iolist_to_binary(join(re:split("123","^\\d*\\w{4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[{parts,
2}]))),
-?line <<":">> = iolist_to_binary(join(re:split("p","[abc[:x\\]pqr]",[]))),
-ok.
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[{parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^[^b]*\\w{4}",[caseless]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[caseless,
+ trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[caseless,
+ {parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^[^b]*\\w{4}",[caseless]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[{parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[{parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[]))),
+ <<"">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[caseless,
+ trim]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[caseless,
+ {parts,
+ 2}]))),
+ <<":">> = iolist_to_binary(join(re:split("aaaa","^a*\\w{4}",[caseless]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[caseless,
+ trim]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[caseless,
+ {parts,
+ 2}]))),
+ <<"aaa">> = iolist_to_binary(join(re:split("aaa","^a*\\w{4}",[caseless]))),
+ ok.
diff --git a/lib/stdlib/test/run_pcre_tests.erl b/lib/stdlib/test/run_pcre_tests.erl
index 78b4803fc8..c4a8afc092 100644
--- a/lib/stdlib/test/run_pcre_tests.erl
+++ b/lib/stdlib/test/run_pcre_tests.erl
@@ -468,25 +468,26 @@ stru([{Line,<<Ch,Re0/binary>>}|T0]) ->
{NewRe,<< Ch, Options/binary >>} = end_of_re(Ch,Re),
case interpret_options_x(backstrip(frontstrip(Options)),NewRe) of
{Olist,<<>>} ->
+ U = lists:member(unicode,Olist),
case T of
[{_,<<$-,_/binary>>}|Con] ->
%Debug output, we skip those
%io:format("Skipping debug (~w)~n",[Line]),
TmpT = skip_debug(Con),
- {NewT,Matches} = stru2(TmpT),
+ {NewT,Matches} = stru2(TmpT,U),
[{NewRe,Line,Olist,Matches}|stru(NewT)];
[{_,<<$C,$a,$p,$t,$u,$r,$i,$n,$g,_/binary>>}|_] ->
NewT0 = skip_extra_info(T),
- {NewT,Matches} = stru2(NewT0),
+ {NewT,Matches} = stru2(NewT0,U),
[{NewRe,Line,Olist,Matches}|stru(NewT)];
[{_,<<Bla,_/binary>>}|_] when Bla =/= $ ->
%io:format("Skipping blabla (~w)~n",[Line]),
NewT = skip_until_empty(T),
stru(NewT);
_ ->
- {NewT,Matches} = stru2(T),
+ {NewT,Matches} = stru2(T,U),
%erlang:display({NewRe,Line,Olist,Matches}),
- Matches1 = case lists:member(unicode,Olist) of
+ Matches1 = case U of
true ->
Matches ++
[ {unicode:characters_to_list(E1,unicode),E2,E3,E4} ||
@@ -498,14 +499,7 @@ stru([{Line,<<Ch,Re0/binary>>}|T0]) ->
[{NewRe,Line,Olist,Matches1}|stru(NewT)]
end;
{_,Rest} ->
-%% case T of
-%% [{_,<<Bla,_/binary>>}|_] when Bla =/= $ ->
-%% io:format("Skipping blabla (~w)~n",[Line]);
-%% _ ->
-%% ok
-%% end,
NewT = skip_until_empty(T),
- %{NewT,_Matches} = stru2(T),
info("Skipping options ~s for now (~w)~n",[binary_to_list(Rest),Line]),
case NewT of
[{Li,_}|_] ->
@@ -568,10 +562,16 @@ tr_option($g) ->
tr_option(_) ->
false.
+
interpret_options(<<$<,Rest0/binary>>) ->
{Option,Rest} = pinch_cr(Rest0),
- {Olist,NRest} = interpret_options(Rest),
- {[Option | Olist], NRest};
+ case Option of
+ {not_supported,{newline,_Offender}} ->
+ {[],<<$<,Rest0/binary>>};
+ _ ->
+ {Olist,NRest} = interpret_options(Rest),
+ {[Option | Olist], NRest}
+ end;
interpret_options(<<$L,$f,$r,$_,$F,$R,Rest/binary>>) ->
info("Accepting (and ignoring) french locale~n",[]),
{Olist,NRest} = interpret_options(Rest),
@@ -603,13 +603,11 @@ backslash_end(<<_>>) ->
backslash_end(<<_,R/binary>>) ->
backslash_end(R).
-%stru2([<<$ ,$ ,$ ,$ , $*,$*,$*,$ ,_/binary>> | T]) ->
-% stru2(T);
-stru2([{Line,<<$ ,Rest/binary>>} | T]) ->
+stru2([{Line,<<$ ,Rest/binary>>} | T],U) ->
% A challenge
- case (catch responses(T)) of
+ case (catch responses(T,U)) of
{NewT,Rlist} ->
- {NewNewT,StrList} = stru2(NewT),
+ {NewNewT,StrList} = stru2(NewT,U),
%% Hack...
FS = case backstrip(frontstrip(Rest)) of
<<"\\">> ->
@@ -624,7 +622,7 @@ stru2([{Line,<<$ ,Rest/binary>>} | T]) ->
OFS
end
end,
- {ExecOpts,NFS} = escape(FS),
+ {ExecOpts,NFS} = escape(FS,U),
case find_unsupported(ExecOpts) of
[] ->
{NewNewT,[{NFS,Line,ExecOpts,
@@ -641,30 +639,29 @@ stru2([{Line,<<$ ,Rest/binary>>} | T]) ->
{NewT,[]}
end;
-stru2(X) ->
+stru2(X,_) ->
{X,[]}.
-%responses([<< $ ,$ ,$ ,$ ,$*,$*,$*,$ ,_/binary>>|T]) ->
-% responses(T);
-responses([{_Line,<< X:2/binary,$:,$ ,Resp/binary>>}|T]) ->
- {NT,R2} = responses(T),
+
+responses([{_Line,<< X:2/binary,$:,$ ,Resp/binary>>}|T],U) ->
+ {NT,R2} = responses(T,U),
NX=list_to_integer(binary_to_list(frontstrip(X))),
- {NT,[{NX,escape2(Resp)} | R2]};
-responses([{_Line,<< X:3/binary,$:,$ ,Resp/binary>>}|T]) ->
- {NT,R2} = responses(T),
+ {NT,[{NX,escape2(Resp,U)} | R2]};
+responses([{_Line,<< X:3/binary,$:,$ ,Resp/binary>>}|T],U) ->
+ {NT,R2} = responses(T,U),
NX=list_to_integer(binary_to_list(frontstrip(X))),
- {NT,[{NX,escape2(Resp)} | R2]};
-responses([{_Line,<<$N,$o,$ ,$m,$a,$t,$c,$h,_/binary>>}|T]) ->
+ {NT,[{NX,escape2(Resp,U)} | R2]};
+responses([{_Line,<<$N,$o,$ ,$m,$a,$t,$c,$h,_/binary>>}|T],_) ->
{T,nomatch};
-responses([{Line,<<$ ,No,Ch,_/binary>>}|T]) when No >= $0, No =< $9, Ch >= $A, Ch =< $Z ->
+responses([{Line,<<$ ,No,Ch,_/binary>>}|T],U) when No >= $0, No =< $9, Ch >= $A, Ch =< $Z ->
info("Skipping strange debug response at line ~p~n",[Line]),
- responses(T);
-responses([{Line,<<$ ,$ ,Ch,_/binary>>}|T]) when Ch =:= $G; Ch =:= $C ->
+ responses(T,U);
+responses([{Line,<<$ ,$ ,Ch,_/binary>>}|T],U) when Ch =:= $G; Ch =:= $C ->
info("Skipping stranger debug response at line ~p~n",[Line]),
- responses(T);
-responses([{Line,<<C,_/binary>>=X}|_]) when C =/= $ ->
+ responses(T,U);
+responses([{Line,<<C,_/binary>>=X}|_],_) when C =/= $ ->
info("Offending response line(~w)! ~p~n",[Line,X]),
throw(fail);
-responses(X) ->
+responses(X,_) ->
{X,[]}.
@@ -753,24 +750,38 @@ splitby(Ch,<<Ch,Rest/binary>>,Acc) ->
{Acc,Rest};
splitby(Ch,<<OCh,Rest/binary>>,Acc) ->
splitby(Ch,Rest,<<Acc/binary,OCh>>).
+
+pick_number(N,<<Ch:8,Rest/binary>>) when Ch >= $0, Ch =< $9 ->
+ pick_number(N*10+(Ch - $0),Rest);
+pick_number(N,Rest) ->
+ {N,Rest}.
+
+pick_offset(Rest) ->
+ {Int,NRest} = pick_number(0,Rest),
+ {{offset,Int},NRest}.
-escape(<<>>) ->
+escape(<<>>,_) ->
{[],<<>>};
-escape(<<$\\, Ch, Rest/binary>>) when Ch >= $A, Ch =< $Z; Ch =:= $? ->
+escape(<<$\\, Ch, Rest/binary>>,U) when Ch >= $A, Ch =< $Z; Ch =:= $? ->
%Options in the string...
NewOpts = eopt(Ch),
- {MoreOpts,Tail} = escape(Rest),
+ {MoreOpts,Tail} = escape(Rest,U),
{NewOpts ++ MoreOpts,Tail};
-escape(<<$\\, $<, Rest/binary>>) ->
+escape(<<$\\, $>, Rest/binary>>,U) ->
+ %Offset Options in the string...
+ {NewOpt,NewRest} = pick_offset(Rest),
+ {MoreOpts,Tail} = escape(NewRest,U),
+ {[NewOpt|MoreOpts],Tail};
+escape(<<$\\, $<, Rest/binary>>,U) ->
%CR Options in the string...
{NewOpt,NewRest} = pinch_cr(Rest),
- {MoreOpts,Tail} = escape(NewRest),
+ {MoreOpts,Tail} = escape(NewRest,U),
{[NewOpt|MoreOpts],Tail};
-escape(<<$\\, Ch, Rest/binary>>) ->
+escape(<<$\\, Ch, Rest/binary>>,U) ->
{C,NR} = case single_esc(Ch) of
no ->
- case multi_esc(<<Ch,Rest/binary>>) of
+ case multi_esc(<<Ch,Rest/binary>>,U) of
{CharBin,NewRest} ->
{CharBin,NewRest};
no ->
@@ -780,30 +791,28 @@ escape(<<$\\, Ch, Rest/binary>>) ->
%erlang:display({escape,CCC}),
{<<CCC>>,Rest}
end,
- {MoreOpts,Tail} = escape(NR),
+ {MoreOpts,Tail} = escape(NR,U),
{MoreOpts,<<C/binary,Tail/binary>>};
-%escape(<<$\\,Rest/binary>>) ->
-% escape(<<Rest/binary>>);
-escape(<<Ch,Rest/binary>>) ->
- {X,RR} = escape(<<Rest/binary>>),
+escape(<<Ch,Rest/binary>>,U) ->
+ {X,RR} = escape(<<Rest/binary>>,U),
{X,<<Ch,RR/binary>>};
-escape(Any) ->
+escape(Any,_) ->
{[],Any}.
-escape2(<<>>) ->
+escape2(<<>>,_) ->
<<>>;
-escape2(<<$\\, Ch, Rest/binary>>) ->
- {C,NR} = case multi_esc(<<Ch,Rest/binary>>) of
+escape2(<<$\\, Ch, Rest/binary>>,U) ->
+ {C,NR} = case multi_esc(<<Ch,Rest/binary>>,U) of
{CharBin,NewRest} ->
{CharBin,NewRest};
no ->
{<<$\\>>,<<Ch,Rest/binary>>}
end,
- Tail = escape2(NR),
+ Tail = escape2(NR,U),
<<C/binary,Tail/binary>>;
-escape2(<<Ch,Rest/binary>>) ->
- RR = escape2(<<Rest/binary>>),
+escape2(<<Ch,Rest/binary>>,U) ->
+ RR = escape2(<<Rest/binary>>,U),
<<Ch,RR/binary>>;
-escape2(Any) ->
+escape2(Any,_) ->
Any.
@@ -848,28 +857,34 @@ list_to_utf8(L) when is_list(L); is_binary(L) ->
list_to_utf8({Tag,_,_}) when Tag =:= incomplete ; Tag =:= error ->
throw(skip).
-multi_esc(<<M,N,O,Rest/binary>>)
+multi_esc(<<M,N,O,Rest/binary>>,_)
when M >= $0, M =< $7, N >= $0, N =< $7, O >= $0, O =< $7 ->
Cha = ((M - $0) bsl 6) bor ((N - $0) bsl 3) bor (O - $0),
{<<Cha>>,Rest};
-multi_esc(<<N,O,Rest/binary>>)
+multi_esc(<<N,O,Rest/binary>>,_)
when N >= $0, N =< $7, O >= $0, O =< $7 ->
Cha = ((N - $0) bsl 3) bor (O - $0),
{<<Cha>>,Rest};
-multi_esc(<<O,Rest/binary>>)
+multi_esc(<<O,Rest/binary>>,_)
when O >= $0, O =< $7 ->
Cha = (O - $0),
{<<Cha>>,Rest};
-multi_esc(<<$x,${,N,O,$},Rest/binary>>)
+multi_esc(<<$x,${,N,O,$},Rest/binary>>,Unicode)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
((O >= $a) and (O =< $f)))) ->
+ %io:format("~p(~p)~n",[<<$x,${,N,O,$}>>,get(unicode)]),
Cha = (trx(N) bsl 4) bor trx(O),
- {int_to_utf8(Cha),Rest};
-multi_esc(<<$x,${,N,O,P,$},Rest/binary>>)
+ case Unicode of
+ false ->
+ {<<Cha:8>>,Rest};
+ _ ->
+ {int_to_utf8(Cha),Rest}
+ end;
+multi_esc(<<$x,${,N,O,P,$},Rest/binary>>,_)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
@@ -878,7 +893,7 @@ multi_esc(<<$x,${,N,O,P,$},Rest/binary>>)
((P >= $a) and (P =< $f)))) ->
Cha = (trx(N) bsl 8) bor (trx(O) bsl 4) bor trx(P),
{int_to_utf8(Cha),Rest};
-multi_esc(<<$x,${,N,O,P,Q,$},Rest/binary>>)
+multi_esc(<<$x,${,N,O,P,Q,$},Rest/binary>>,_)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
@@ -889,7 +904,7 @@ multi_esc(<<$x,${,N,O,P,Q,$},Rest/binary>>)
((Q >= $a) and (Q =< $f)))) ->
Cha = (trx(N) bsl 12) bor (trx(O) bsl 8) bor (trx(P) bsl 4) bor trx(Q),
{int_to_utf8(Cha),Rest};
-multi_esc(<<$x,${,N,O,P,Q,R,$},Rest/binary>>)
+multi_esc(<<$x,${,N,O,P,Q,R,$},Rest/binary>>,_)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
@@ -902,7 +917,7 @@ multi_esc(<<$x,${,N,O,P,Q,R,$},Rest/binary>>)
((R >= $a) and (R =< $f)))) ->
Cha = (trx(N) bsl 16) bor (trx(O) bsl 12) bor (trx(P) bsl 8) bor (trx(Q) bsl 4) bor trx(R),
{int_to_utf8(Cha),Rest};
-multi_esc(<<$x,${,N,O,P,Q,R,S,$},Rest/binary>>)
+multi_esc(<<$x,${,N,O,P,Q,R,S,$},Rest/binary>>,_)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
@@ -917,19 +932,19 @@ multi_esc(<<$x,${,N,O,P,Q,R,S,$},Rest/binary>>)
((S >= $a) and (S =< $f)))) ->
Cha = (trx(N) bsl 20) bor (trx(O) bsl 16) bor (trx(P) bsl 12) bor (trx(Q) bsl 8) bor (trx(R) bsl 4) bor trx(S),
{int_to_utf8(Cha),Rest};
-multi_esc(<<$x,N,O,Rest/binary>>)
+multi_esc(<<$x,N,O,Rest/binary>>,_)
when ((((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) and
(((O >= $0) and (O =< $9)) or ((O >= $A) and (O =< $F)) or
((O >= $a) and (O =< $f)))) ->
Cha = (trx(N) bsl 4) bor trx(O),
{<<Cha>>,Rest};
-multi_esc(<<$x,N,Rest/binary>>)
+multi_esc(<<$x,N,Rest/binary>>,_)
when (((N >= $0) and (N =< $9)) or ((N >= $A) and (N =< $F)) or
((N >= $a) and (N =< $f))) ->
Cha = trx(N),
{<<Cha>>,Rest};
-multi_esc(_) ->
+multi_esc(_,_) ->
no.
single_esc($") ->
@@ -980,15 +995,14 @@ gen_split_test(OneFile) ->
Lines = splitfile(0,Bin,1),
Structured = stru(Lines),
PerlShellScript = OneFile++"_split_test_gen.sh",
- dumpsplit(Structured,PerlShellScript),
- PerlShellScript,
+ FunList = dumpsplit(Structured,PerlShellScript),
ErlModule = "re_"++filename:basename(OneFile)++"_split_test",
ErlFileName = ErlModule++".erl",
{ok,F}= file:open(ErlFileName,[write]),
io:format(F,"-module(~s).~n",[ErlModule]),
io:format(F,"-compile(export_all).~n",[]),
io:format(F,"-compile(no_native).~n",[]),
- io:format(F,"-include(\"test_server.hrl\").~n",[]),
+ %io:format(F,"-include(\"test_server.hrl\").~n",[]),
%io:format(F,"-define(line,erlang:display(?LINE),).~n",[]),
io:format(F,"%% This file is generated by running ~w:gen_split_test(~p)~n",
[?MODULE,OneFile]),
@@ -996,62 +1010,72 @@ gen_split_test(OneFile) ->
io:format(F,"join([A]) -> [A];~n",[]),
io:format(F,"join([H|T]) -> [H,<<\":\">>|join(T)].~n",[]),
io:format(F,"run() ->~n",[]),
+ [ io:format(F," ~s(),~n",[FunName]) || FunName <- FunList ],
file:close(F),
os:cmd("sh "++ PerlShellScript++" 2>/dev/null >> "++ErlFileName),
- {ok,F2}= file:open(ErlFileName,[append]),
- io:format(F2,"ok.~n",[]),
- file:close(F2),
io:format("~s~n",[os:cmd("wc -l "++ErlFileName)]),
ok.
dumpsplit(S,Fname) ->
{ok,F}= file:open(Fname,[write]),
- dodumpsplit(F,S),
- file:close(F).
-
-dodumpsplit(_,[]) ->
- ok;
-dodumpsplit(F,[H|T]) ->
+ Res = dodumpsplit(F,S,0,[],0),
+ file:close(F),
+ Res.
+
+dodumpsplit(F,[],_,Acc,_) ->
+ io:format(F,"echo \" ok.\"~n",[]),
+ lists:reverse(Acc);
+dodumpsplit(F,L,0,Acc,FunNum) ->
+ NewFun = "run"++integer_to_list(FunNum),
+ io:format(F,"echo \" ok.\"~n",[]),
+ io:format(F,"echo \"~s() ->\"~n",[NewFun]),
+ dodumpsplit(F,L,20,[NewFun|Acc],FunNum+1);
+dodumpsplit(F,[H|T],N,Acc,FunNum) ->
dumponesplit(F,H),
- dodumpsplit(F,T).
+ dodumpsplit(F,T,N-1,Acc,FunNum).
-dumponesplit(F,{RE,_,O,TS}) ->
+dumponesplit(F,{RE,Line,O,TS}) ->
[begin
{NO,_} = pick_exec_options(O++Op),
SSS = opt_to_string(NO),
- io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\")); "
- "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
- "print \"?line <<\\\"$x\\\">> = "
- "iolist_to_binary(join(re:split(\\\"~s\\\","
- "\\\"~s\\\",~p))), \\n\";'~n",
- [zsafe(safe(RE)),
- SSS,
- ysafe(safe(Str)),
- dsafe(safe(Str)),
- dsafe2(safe(RE)),
- NO++[trim]]),
- io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\",2)); "
- "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
- "print \"?line <<\\\"$x\\\">> = "
- "iolist_to_binary(join(re:split(\\\"~s\\\","
- "\\\"~s\\\",~p))), \\n\";'~n",
- [zsafe(safe(RE)),
- SSS,
- ysafe(safe(Str)),
- dsafe(safe(Str)),
- dsafe2(safe(RE)),
- NO++[{parts,2}]]),
- io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\",-1)); "
- "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
- "print \"?line <<\\\"$x\\\">> = "
- "iolist_to_binary(join(re:split(\\\"~s\\\","
- "\\\"~s\\\",~p))), \\n\";'~n",
- [zsafe(safe(RE)),
- SSS,
- ysafe(safe(Str)),
- dsafe(safe(Str)),
- dsafe2(safe(RE)),
- NO])
+ LLL = unicode:characters_to_list(RE),
+ case (catch iolist_to_binary(LLL)) of
+ X when is_binary(X) ->
+ io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\")); "
+ "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
+ "print \" <<\\\"$x\\\">> = "
+ "iolist_to_binary(join(re:split(\\\"~s\\\","
+ "\\\"~s\\\",~p))), \\n\";'~n",
+ [zsafe(safe(RE)),
+ SSS,
+ ysafe(safe(Str)),
+ dsafe(safe(Str)),
+ dsafe2(safe(RE)),
+ NO++[trim]]),
+ io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\",2)); "
+ "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
+ "print \" <<\\\"$x\\\">> = "
+ "iolist_to_binary(join(re:split(\\\"~s\\\","
+ "\\\"~s\\\",~p))), \\n\";'~n",
+ [zsafe(safe(RE)),
+ SSS,
+ ysafe(safe(Str)),
+ dsafe(safe(Str)),
+ dsafe2(safe(RE)),
+ NO++[{parts,2}]]),
+ io:format(F,"perl -e '$x = join(\":\",split(/~s/~s,\"~s\",-1)); "
+ "$x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; "
+ "print \" <<\\\"$x\\\">> = "
+ "iolist_to_binary(join(re:split(\\\"~s\\\","
+ "\\\"~s\\\",~p))), \\n\";'~n",
+ [zsafe(safe(RE)),
+ SSS,
+ ysafe(safe(Str)),
+ dsafe(safe(Str)),
+ dsafe2(safe(RE)),
+ NO]);
+ _ -> io:format("Found fishy character at line ~w~n",[Line])
+ end
end ||
{Str,_,Op,_} <- TS].
@@ -1063,42 +1087,51 @@ gen_repl_test(OneFile) ->
Lines = splitfile(0,Bin,1),
Structured = stru(Lines),
PerlShellScript = OneFile++"_replacement_test_gen.sh",
- dump(Structured,PerlShellScript),
+ FunList = dump(Structured,PerlShellScript),
ErlModule = "re_"++filename:basename(OneFile)++"_replacement_test",
ErlFileName = ErlModule++".erl",
{ok,F}= file:open(ErlFileName,[write]),
io:format(F,"-module(~s).~n",[ErlModule]),
io:format(F,"-compile(export_all).~n",[]),
io:format(F,"-compile(no_native).~n",[]),
- io:format(F,"-include(\"test_server.hrl\").~n",[]),
+ %io:format(F,"-include(\"test_server.hrl\").~n",[]),
io:format(F,"%% This file is generated by running ~w:gen_repl_test(~p)~n",
[?MODULE,OneFile]),
io:format(F,"run() ->~n",[]),
+ [ io:format(F," ~s(),~n",[FunName]) || FunName <- FunList ],
file:close(F),
os:cmd("sh "++ PerlShellScript++" 2>/dev/null >> "++ErlFileName),
- {ok,F2}= file:open(ErlFileName,[append]),
- io:format(F2,"ok.~n",[]),
- file:close(F2),
io:format("~s~n",[os:cmd("wc -l "++ErlFileName)]),
ok.
dump(S,Fname) ->
{ok,F}= file:open(Fname,[write]),
- dodump(F,S),
- file:close(F).
+ Res = dodump(F,S,0,[],0),
+ file:close(F),
+ Res.
-dodump(_,[]) ->
- ok;
-dodump(F,[H|T]) ->
+dodump(F,[],_,Acc,_) ->
+ io:format(F,"echo \" ok.\"~n",[]),
+ lists:reverse(Acc);
+dodump(F,L,0,Acc,FunNum) ->
+ NewFun = "run"++integer_to_list(FunNum),
+ io:format(F,"echo \" ok.\"~n",[]),
+ io:format(F,"echo \"~s() ->\"~n",[NewFun]),
+ dodump(F,L,20,[NewFun|Acc],FunNum+1);
+dodump(F,[H|T],N,Acc,FunNum) ->
dumpone(F,H),
- dodump(F,T).
+ dodump(F,T,N-1,Acc,FunNum).
-dumpone(F,{RE,_,O,TS}) ->
+dumpone(F,{RE,Line,O,TS}) ->
[begin
{NO,_} = pick_exec_options(O++Op),
SSS = opt_to_string(NO),
RS = ranstring(),
- io:format(F,"perl -e '$x = \"~s\"; $x =~~ s/~s/~s/~s; $x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; print \"?line <<\\\"$x\\\">> = iolist_to_binary(re:replace(\\\"~s\\\",\\\"~s\\\",\\\"~s\\\",~p)), \\n\";'~n",[ysafe(safe(Str)),zsafe(safe(RE)),perlify(binary_to_list(RS)),SSS,dsafe(safe(Str)),dsafe(safe(RE)),xsafe(RS),NO]),
- io:format(F,"perl -e '$x = \"~s\"; $x =~~ s/~s/~s/g~s; $x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; print \"?line <<\\\"$x\\\">> = iolist_to_binary(re:replace(\\\"~s\\\",\\\"~s\\\",\\\"~s\\\",~p)), \\n\";'~n",[ysafe(safe(Str)),zsafe(safe(RE)),perlify(binary_to_list(RS)),SSS,dsafe(safe(Str)),dsafe(safe(RE)),xsafe(RS),NO++[global]])
+ LLL = unicode:characters_to_list(RE),
+ case (catch iolist_to_binary(LLL)) of
+ X when is_binary(X) -> io:format(F,"perl -e '$x = \"~s\"; $x =~~ s/~s/~s/~s; $x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; print \" <<\\\"$x\\\">> = iolist_to_binary(re:replace(\\\"~s\\\",\\\"~s\\\",\\\"~s\\\",~p)), \\n\";'~n",[ysafe(safe(Str)),zsafe(safe(RE)),perlify(binary_to_list(RS)),SSS,dsafe(safe(Str)),dsafe(safe(RE)),xsafe(RS),NO]),
+ io:format(F,"perl -e '$x = \"~s\"; $x =~~ s/~s/~s/g~s; $x =~~ s/\\\\/\\\\\\\\/g; $x =~~ s/\\\"/\\\\\"/g; print \" <<\\\"$x\\\">> = iolist_to_binary(re:replace(\\\"~s\\\",\\\"~s\\\",\\\"~s\\\",~p)), \\n\";'~n",[ysafe(safe(Str)),zsafe(safe(RE)),perlify(binary_to_list(RS)),SSS,dsafe(safe(Str)),dsafe(safe(RE)),xsafe(RS),NO++[global]]);
+ _ -> io:format("Found fishy character at line ~w~n",[Line])
+ end
end ||
{Str,_,Op,_} <- TS].
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index 3c49aaa103..f841e2c4a6 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -55,7 +54,7 @@ config(priv_dir,_) ->
-include_lib("test_server/include/test_server.hrl").
-export([init_per_testcase/2, end_per_testcase/2]).
% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(2)).
+-define(default_timeout, ?t:minutes(10)).
init_per_testcase(_Case, Config) ->
?line Dog = ?t:timetrap(?default_timeout),
?line OrigPath = code:get_path(),
@@ -147,7 +146,7 @@ start_restricted_from_shell(Config) when is_list(Config) ->
"test_restricted) end.">>),
?line {ok, test_restricted} =
application:get_env(stdlib, restricted_shell),
- ?line "Module" ++ _ = t(<<"begin m() end.">>),
+ ?line "Module" ++ _ = t({<<"begin m() end.">>, utf8}),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err(<<"begin c(foo) end.">>),
?line "exception exit: restricted shell does not allow init:stop()" =
@@ -226,7 +225,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
?line {ok,Node2} = start_node(shell_suite_helper_2,
"-pa "++?config(priv_dir,Config)++
" -stdlib restricted_shell test_restricted2"),
- ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>}),
+ ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>, utf8}),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err({Node2,<<"begin c(foo) end.">>}),
?line "exception exit: restricted shell does not allow init:stop()" =
@@ -2533,6 +2532,11 @@ otp_6554(Config) when is_list(Config) ->
"\n end.\nok.\n" =
t(<<"begin F = fun() -> foo end, 1 end. B = F(). C = 17. b().">>),
+ ?line "3: command not found" = comm_err(<<"#{v(3) => v}.">>),
+ ?line "3: command not found" = comm_err(<<"#{k => v(3)}.">>),
+ ?line "3: command not found" = comm_err(<<"#{v(3) := v}.">>),
+ ?line "3: command not found" = comm_err(<<"#{k := v(3)}.">>),
+ ?line "3: command not found" = comm_err(<<"(v(3))#{}.">>),
%% Tests I'd like to do: (you should try them manually)
%% "catch spawn_link(fun() -> timer:sleep(1000), exit(foo) end)."
%% "** exception error: foo" should be output after 1 second
@@ -2601,9 +2605,9 @@ otp_7232(doc) ->
"OTP-7232. qlc:info() bug.";
otp_7232(suite) -> [];
otp_7232(Config) when is_list(Config) ->
- Info = <<"qlc:info(qlc:sort(qlc:q([X || X <- [1000,2000]]), "
+ Info = <<"qlc:info(qlc:sort(qlc:q([X || X <- [55296,56296]]), "
"{order, fun(A,B)-> A>B end})).">>,
- "qlc:sort([1000,2000],\n"
+ "qlc:sort([55296,56296],\n"
" [{order,\n"
" fun(A, B) ->\n"
" A > B\n"
@@ -2928,14 +2932,14 @@ t1(Parent, {Bin,Enc}, F) ->
server_loop(S)
catch exit:R -> Parent ! {self(), R};
throw:{?MODULE,LoopReply,latin1} ->
- L0 = binary_to_list(list_to_binary(LoopReply)),
- [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
- Parent ! {self(), dotify(L1)};
+ L0 = binary_to_list(list_to_binary(LoopReply)),
+ [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
+ Parent ! {self(), dotify(L1)};
throw:{?MODULE,LoopReply,_Uni} ->
- Tmp = unicode:characters_to_binary(LoopReply),
- L0 = unicode:characters_to_list(Tmp),
- [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
- Parent ! {self(), dotify(L1)}
+ Tmp = unicode:characters_to_binary(LoopReply),
+ L0 = unicode:characters_to_list(Tmp),
+ [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
+ Parent ! {self(), dotify(L1)}
after group_leader(S#state.leader, self())
end.
diff --git a/lib/stdlib/test/stdlib_SUITE.erl b/lib/stdlib/test/stdlib_SUITE.erl
index 8a2cb5ea6b..3d09bd27ff 100644
--- a/lib/stdlib/test/stdlib_SUITE.erl
+++ b/lib/stdlib/test/stdlib_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,10 +23,6 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
--define(application, stdlib).
-
% 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]).
@@ -60,11 +56,8 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
%
@@ -78,56 +71,92 @@ app_test(Config) when is_list(Config) ->
?t:app_test(stdlib),
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(stdlib),
- {_,_,Vsn} = lists:keyfind(stdlib,1,application:loaded_applications()),
- AppupFile = filename:join([code:lib_dir(stdlib),ebin,"stdlib.appup"]),
+ appup_tests(stdlib,create_test_vsns(stdlib)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns0,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
{ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
ct:log("~p~n",[AppupScript]),
- {OkVsns,NokVsns} = create_test_vsns(Vsn),
+ OkVsns =
+ case OkVsns0 -- [Vsn] of
+ OkVsns0 ->
+ OkVsns0;
+ Ok ->
+ ct:log("Current version, ~p, is same as in previous release.~n"
+ "Removing this from the list of ok versions.",
+ [Vsn]),
+ Ok
+ end,
+ ct:log("Testing that appup allows upgrade from these versions: ~p~n",
+ [OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing that appup does not allow upgrade from these versions: ~p~n",
+ [NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
diff --git a/lib/stdlib/test/string_SUITE.erl b/lib/stdlib/test/string_SUITE.erl
index 96e653985f..fccd1bef95 100644
--- a/lib/stdlib/test/string_SUITE.erl
+++ b/lib/stdlib/test/string_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index ac5a34c3bc..836ea7c030 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -60,7 +60,7 @@
simple_one_for_one_extra/1, simple_one_for_one_shutdown/1]).
%% Misc tests
--export([child_unlink/1, tree/1, count_children_memory/1,
+-export([child_unlink/1, tree/1, count_children/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,
@@ -82,7 +82,7 @@ all() ->
{group, normal_termination},
{group, shutdown_termination},
{group, abnormal_termination}, child_unlink, tree,
- count_children_memory, do_not_save_start_parameters_for_temporary_children,
+ count_children, 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,
simple_global_supervisor, hanging_restart_loop, hanging_restart_loop_simple].
@@ -129,23 +129,10 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-init_per_testcase(count_children_memory, Config) ->
- try erlang:memory() of
- _ ->
- erts_debug:set_internal_state(available_internal_state, true),
- Dog = ?t:timetrap(?TIMEOUT),
- [{watchdog,Dog}|Config]
- catch error:notsup ->
- {skip, "+Meamin used during test; erlang:memory/1 not available"}
- end;
init_per_testcase(_Case, Config) ->
Dog = ?t:timetrap(?TIMEOUT),
[{watchdog,Dog}|Config].
-end_per_testcase(count_children_memory, Config) ->
- catch erts_debug:set_internal_state(available_internal_state, false),
- ?t:timetrap_cancel(?config(watchdog,Config)),
- ok;
end_per_testcase(_Case, Config) ->
?t:timetrap_cancel(?config(watchdog,Config)),
ok.
@@ -1249,34 +1236,24 @@ tree(Config) when is_list(Config) ->
[0,0,0,0] = get_child_counts(NewSup2).
%%-------------------------------------------------------------------------
-%% Test that count_children does not eat memory.
-count_children_memory(Config) when is_list(Config) ->
+%% Test count_children
+count_children(Config) when is_list(Config) ->
process_flag(trap_exit, true),
Child = {child, {supervisor_1, start_child, []}, temporary, 1000,
worker, []},
{ok, SupPid} = start_link({ok, {{simple_one_for_one, 2, 3600}, [Child]}}),
[supervisor:start_child(sup_test, []) || _Ignore <- lists:seq(1,1000)],
- garbage_collect(),
- _Size1 = proc_memory(),
Children = supervisor:which_children(sup_test),
- _Size2 = proc_memory(),
ChildCount = get_child_counts(sup_test),
- _Size3 = proc_memory(),
[supervisor:start_child(sup_test, []) || _Ignore2 <- lists:seq(1,1000)],
- garbage_collect(),
- Children2 = supervisor:which_children(sup_test),
- Size4 = proc_memory(),
ChildCount2 = get_child_counts(sup_test),
- Size5 = proc_memory(),
+ Children2 = supervisor:which_children(sup_test),
- garbage_collect(),
- Children3 = supervisor:which_children(sup_test),
- Size6 = proc_memory(),
ChildCount3 = get_child_counts(sup_test),
- Size7 = proc_memory(),
+ Children3 = supervisor:which_children(sup_test),
1000 = length(Children),
[1,1000,0,1000] = ChildCount,
@@ -1285,27 +1262,9 @@ count_children_memory(Config) when is_list(Config) ->
Children3 = Children2,
ChildCount3 = ChildCount2,
- %% count_children consumes memory using an accumulator function,
- %% but the space can be reclaimed incrementally,
- %% which_children may generate garbage that will be reclaimed later.
- case (Size5 =< Size4) of
- true -> ok;
- false ->
- test_server:fail({count_children, used_more_memory,Size4,Size5})
- end,
- case Size7 =< Size6 of
- true -> ok;
- false ->
- test_server:fail({count_children, used_more_memory,Size6,Size7})
- end,
-
[terminate(SupPid, Pid, child, kill) || {undefined, Pid, worker, _Modules} <- Children3],
[1,0,0,0] = get_child_counts(sup_test).
-proc_memory() ->
- erts_debug:set_internal_state(wait, deallocations),
- erlang:memory(processes_used).
-
%%-------------------------------------------------------------------------
%% Temporary children shall not be restarted so they should not save
%% start parameters, as it potentially can take up a huge amount of
@@ -1483,7 +1442,7 @@ simple_one_for_one_scale_many_temporary_children(_Config) ->
if T1 > 0 ->
Scaling = T2 div T1,
- if Scaling > 20 ->
+ if Scaling > 50 ->
%% The scaling shoul be linear (i.e.10, really), but we
%% give some extra here to avoid failing the test
%% unecessarily.
diff --git a/lib/stdlib/test/sys_SUITE.erl b/lib/stdlib/test/sys_SUITE.erl
index c06ba545e7..f38bc87ae5 100644
--- a/lib/stdlib/test/sys_SUITE.erl
+++ b/lib/stdlib/test/sys_SUITE.erl
@@ -19,7 +19,7 @@
-module(sys_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,log/1,log_to_file/1,
- stats/1,trace/1,suspend/1,install/1]).
+ stats/1,trace/1,suspend/1,install/1,special_process/1]).
-export([handle_call/3,terminate/2,init/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,14 +27,12 @@
%% Doesn't look into change_code at all
-%% Doesn't address writing your own process that understands
-%% system messages at all.
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [log, log_to_file, stats, trace, suspend, install].
+ [log, log_to_file, stats, trace, suspend, install, special_process].
groups() ->
[].
@@ -157,6 +155,84 @@ install(Config) when is_list(Config) ->
?line stop(),
ok.
+special_process(suite) -> [];
+special_process(Config) when is_list(Config) ->
+ ok = spec_proc(sys_sp1),
+ ok = spec_proc(sys_sp2).
+
+spec_proc(Mod) ->
+ {ok,_} = Mod:start_link(100),
+ ok = sys:statistics(Mod,true),
+ ok = sys:trace(Mod,true),
+ 1 = Ch = Mod:alloc(),
+ Free = lists:seq(2,100),
+ Replace = case sys:get_state(Mod) of
+ {[Ch],Free} ->
+ fun({A,F}) ->
+ Free = F,
+ {A,[2,3,4]}
+ end;
+ {state,[Ch],Free} ->
+ fun({state,A,F}) ->
+ Free = F,
+ {state,A,[2,3,4]}
+ end
+ end,
+ case sys:replace_state(Mod, Replace) of
+ {[Ch],[2,3,4]} -> ok;
+ {state,[Ch],[2,3,4]} -> ok
+ end,
+ ok = Mod:free(Ch),
+ case sys:get_state(Mod) of
+ {[],[1,2,3,4]} -> ok;
+ {state,[],[1,2,3,4]} -> ok
+ end,
+ {ok,[{start_time,_},
+ {current_time,_},
+ {reductions,_},
+ {messages_in,2},
+ {messages_out,1}]} = sys:statistics(Mod,get),
+ ok = sys:statistics(Mod,false),
+ [] = sys:replace_state(Mod, fun(_) -> [] end),
+ process_flag(trap_exit,true),
+ ok = case catch sys:get_state(Mod) of
+ [] ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_get_state},{throw,fail}},_}} ->
+ ok
+ end,
+ Mod:stop(),
+ WaitForUnregister = fun W() ->
+ case whereis(Mod) of
+ undefined -> ok;
+ _ -> timer:sleep(10), W()
+ end
+ end,
+ WaitForUnregister(),
+ {ok,_} = Mod:start_link(4),
+ ok = case catch sys:replace_state(Mod, fun(_) -> {} end) of
+ {} ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_replace_state},{throw,fail}},_}} ->
+ ok
+ end,
+ Mod:stop(),
+ WaitForUnregister(),
+ {ok,_} = Mod:start_link(4),
+ StateFun = fun(_) -> error(fail) end,
+ ok = case catch sys:replace_state(Mod, StateFun) of
+ {} ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_replace_state},{error,fail}},_}} ->
+ ok;
+ {'EXIT',{{callback_failed,StateFun,{error,fail}},_}} ->
+ ok
+ end,
+ Mod:stop().
+
%%%%%%%%%%%%%%%%%%%%
%% Dummy server
diff --git a/lib/stdlib/test/sys_sp1.erl b/lib/stdlib/test/sys_sp1.erl
new file mode 100644
index 0000000000..e84ffcfa12
--- /dev/null
+++ b/lib/stdlib/test/sys_sp1.erl
@@ -0,0 +1,114 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(sys_sp1).
+-export([start_link/1, stop/0]).
+-export([alloc/0, free/1]).
+-export([init/1]).
+-export([system_continue/3, system_terminate/4,
+ write_debug/3,
+ system_get_state/1, system_replace_state/2]).
+
+%% Implements the ch4 example from the Design Principles doc. Same as
+%% sys_sp2 except this module exports system_get_state/1 and
+%% system_replace_state/2
+
+start_link(NumCh) ->
+ proc_lib:start_link(?MODULE, init, [[self(),NumCh]]).
+
+stop() ->
+ ?MODULE ! stop,
+ ok.
+
+alloc() ->
+ ?MODULE ! {self(), alloc},
+ receive
+ {?MODULE, Res} ->
+ Res
+ end.
+
+free(Ch) ->
+ ?MODULE ! {free, Ch},
+ ok.
+
+init([Parent,NumCh]) ->
+ register(?MODULE, self()),
+ Chs = channels(NumCh),
+ Deb = sys:debug_options([]),
+ proc_lib:init_ack(Parent, {ok, self()}),
+ loop(Chs, Parent, Deb).
+
+loop(Chs, Parent, Deb) ->
+ receive
+ {From, alloc} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, alloc, From}),
+ {Ch, Chs2} = alloc(Chs),
+ From ! {?MODULE, Ch},
+ Deb3 = sys:handle_debug(Deb2, fun write_debug/3,
+ ?MODULE, {out, {?MODULE, Ch}, From}),
+ loop(Chs2, Parent, Deb3);
+ {free, Ch} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, {free, Ch}}),
+ Chs2 = free(Ch, Chs),
+ loop(Chs2, Parent, Deb2);
+ {system, From, Request} ->
+ sys:handle_system_msg(Request, From, Parent,
+ ?MODULE, Deb, Chs);
+ stop ->
+ sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, stop}),
+ ok
+ end.
+
+system_continue(Parent, Deb, Chs) ->
+ loop(Chs, Parent, Deb).
+
+system_terminate(Reason, _Parent, _Deb, _Chs) ->
+ exit(Reason).
+
+system_get_state([]) ->
+ throw(fail);
+system_get_state(Chs) ->
+ {ok, Chs}.
+
+system_replace_state(_StateFun, {}) ->
+ throw(fail);
+system_replace_state(StateFun, Chs) ->
+ NChs = StateFun(Chs),
+ {ok, NChs, NChs}.
+
+write_debug(Dev, Event, Name) ->
+ io:format(Dev, "~p event = ~p~n", [Name, Event]).
+
+channels(NumCh) ->
+ {_Allocated=[], _Free=lists:seq(1,NumCh)}.
+
+alloc({_, []}) ->
+ {error, "no channels available"};
+alloc({Allocated, [H|T]}) ->
+ {H, {[H|Allocated], T}}.
+
+free(Ch, {Alloc, Free}=Channels) ->
+ case lists:member(Ch, Alloc) of
+ true ->
+ {lists:delete(Ch, Alloc), [Ch|Free]};
+ false ->
+ Channels
+ end.
diff --git a/lib/stdlib/test/sys_sp2.erl b/lib/stdlib/test/sys_sp2.erl
new file mode 100644
index 0000000000..56a5e4d071
--- /dev/null
+++ b/lib/stdlib/test/sys_sp2.erl
@@ -0,0 +1,107 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(sys_sp2).
+-export([start_link/1, stop/0]).
+-export([alloc/0, free/1]).
+-export([init/1]).
+-export([system_continue/3, system_terminate/4,
+ write_debug/3]).
+
+%% Implements the ch4 example from the Design Principles doc. Same as
+%% sys_sp1 except this module does not export system_get_state/1 or
+%% system_replace_state/2
+
+start_link(NumCh) ->
+ proc_lib:start_link(?MODULE, init, [[self(),NumCh]]).
+
+stop() ->
+ ?MODULE ! stop,
+ ok.
+
+alloc() ->
+ ?MODULE ! {self(), alloc},
+ receive
+ {?MODULE, Res} ->
+ Res
+ end.
+
+free(Ch) ->
+ ?MODULE ! {free, Ch},
+ ok.
+
+%% can't use 2-tuple for state here as we do in sys_sp1, since the 2-tuple
+%% is not compatible with the backward compatibility handling for
+%% sys:get_state in sys.erl
+-record(state, {alloc,free}).
+
+init([Parent,NumCh]) ->
+ register(?MODULE, self()),
+ Chs = channels(NumCh),
+ Deb = sys:debug_options([]),
+ proc_lib:init_ack(Parent, {ok, self()}),
+ loop(Chs, Parent, Deb).
+
+loop(Chs, Parent, Deb) ->
+ receive
+ {From, alloc} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, alloc, From}),
+ {Ch, Chs2} = alloc(Chs),
+ From ! {?MODULE, Ch},
+ Deb3 = sys:handle_debug(Deb2, fun write_debug/3,
+ ?MODULE, {out, {?MODULE, Ch}, From}),
+ loop(Chs2, Parent, Deb3);
+ {free, Ch} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, {free, Ch}}),
+ Chs2 = free(Ch, Chs),
+ loop(Chs2, Parent, Deb2);
+ {system, From, Request} ->
+ sys:handle_system_msg(Request, From, Parent,
+ ?MODULE, Deb, Chs);
+ stop ->
+ sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, stop}),
+ ok
+ end.
+
+system_continue(Parent, Deb, Chs) ->
+ loop(Chs, Parent, Deb).
+
+system_terminate(Reason, _Parent, _Deb, _Chs) ->
+ exit(Reason).
+
+write_debug(Dev, Event, Name) ->
+ io:format(Dev, "~p event = ~p~n", [Name, Event]).
+
+channels(NumCh) ->
+ #state{alloc=[], free=lists:seq(1,NumCh)}.
+
+alloc(#state{free=[]}=Channels) ->
+ {{error, "no channels available"}, Channels};
+alloc(#state{alloc=Allocated, free=[H|T]}) ->
+ {H, #state{alloc=[H|Allocated], free=T}}.
+
+free(Ch, #state{alloc=Alloc, free=Free}=Channels) ->
+ case lists:member(Ch, Alloc) of
+ true ->
+ #state{alloc=lists:delete(Ch, Alloc), free=[Ch|Free]};
+ false ->
+ Channels
+ end.
diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl
index 5bc34e35af..9b6d65011e 100644
--- a/lib/stdlib/test/tar_SUITE.erl
+++ b/lib/stdlib/test/tar_SUITE.erl
@@ -23,7 +23,7 @@
create_long_names/1, bad_tar/1, errors/1, extract_from_binary/1,
extract_from_binary_compressed/1,
extract_from_open_file/1, symlinks/1, open_add_close/1, cooked_compressed/1,
- memory/1]).
+ memory/1,unicode/1]).
-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
@@ -34,7 +34,7 @@ all() ->
[borderline, atomic, long_names, create_long_names,
bad_tar, errors, extract_from_binary,
extract_from_binary_compressed, extract_from_open_file,
- symlinks, open_add_close, cooked_compressed, memory].
+ symlinks, open_add_close, cooked_compressed, memory, unicode].
groups() ->
[].
@@ -73,6 +73,7 @@ borderline(Config) when is_list(Config) ->
?line lists:foreach(fun(Size) -> borderline_test(Size, TempDir) end,
[0, 1, 10, 13, 127, 333, Record-1, Record, Record+1,
+ Block-2*Record-1, Block-2*Record, Block-2*Record+1,
Block-Record-1, Block-Record, Block-Record+1,
Block-1, Block, Block+1,
Block+Record-1, Block+Record, Block+Record+1]),
@@ -653,6 +654,7 @@ open_add_close(Config) when is_list(Config) ->
?line ok = erl_tar:add(AD, FileOne, []),
?line ok = erl_tar:add(AD, FileTwo, "second file", []),
?line ok = erl_tar:add(AD, FileThree, [verbose]),
+ ?line ok = erl_tar:add(AD, FileThree, "chunked", [{chunks,11411},verbose]),
?line ok = erl_tar:add(AD, ADir, [verbose]),
?line ok = erl_tar:add(AD, AnotherDir, [verbose]),
?line ok = erl_tar:close(AD),
@@ -660,7 +662,7 @@ open_add_close(Config) when is_list(Config) ->
?line ok = erl_tar:t(TarOne),
?line ok = erl_tar:tt(TarOne),
- ?line {ok,[FileOne,"second file",FileThree,ADir,SomeContent]} = erl_tar:table(TarOne),
+ ?line {ok,[FileOne,"second file",FileThree,"chunked",ADir,SomeContent]} = erl_tar:table(TarOne),
?line delete_files(["oac_file","oac_small","oac_big",Dir,AnotherDir,ADir]),
@@ -726,6 +728,56 @@ memory(Config) when is_list(Config) ->
?line ok = delete_files([Name1,Name2]),
ok.
+%% Test filenames with characters outside the US ASCII range.
+unicode(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ do_unicode(PrivDir),
+ case has_transparent_naming() of
+ true ->
+ Pa = filename:dirname(code:which(?MODULE)),
+ Node = start_node(unicode, "+fnl -pa "++Pa),
+ ok = rpc:call(Node, erlang, apply,
+ [fun() -> do_unicode(PrivDir) end,[]]),
+ true = test_server:stop_node(Node),
+ ok;
+ false ->
+ ok
+ end.
+
+has_transparent_naming() ->
+ case os:type() of
+ {unix,darwin} -> false;
+ {unix,_} -> true;
+ _ -> false
+ end.
+
+do_unicode(PrivDir) ->
+ ok = file:set_cwd(PrivDir),
+ ok = file:make_dir("unicöde"),
+
+ Names = unicode_create_files(),
+ Tar = "unicöde.tar",
+ ok = erl_tar:create(Tar, ["unicöde"], []),
+ {ok,Names} = erl_tar:table(Tar, []),
+ _ = [ok = file:delete(Name) || Name <- Names],
+ ok = erl_tar:extract(Tar),
+ _ = [{ok,_} = file:read_file(Name) || Name <- Names],
+ _ = [ok = file:delete(Name) || Name <- Names],
+ ok = file:del_dir("unicöde"),
+ ok.
+
+unicode_create_files() ->
+ FileA = "unicöde/smörgåsbord",
+ ok = file:write_file(FileA, "yum!\n"),
+ [FileA|case file:native_name_encoding() of
+ utf8 ->
+ FileB = "unicöde/Хороший файл!",
+ ok = file:write_file(FileB, "But almost empty.\n"),
+ [FileB];
+ latin1 ->
+ []
+ end].
+
%% Delete the given list of files.
delete_files([]) -> ok;
delete_files([Item|Rest]) ->
@@ -791,3 +843,14 @@ make_temp_dir(Base, I) ->
ok -> Name;
{error,eexist} -> make_temp_dir(Base, I+1)
end.
+
+start_node(Name, Args) ->
+ [_,Host] = string:tokens(atom_to_list(node()), "@"),
+ ct:log("Trying to start ~w@~s~n", [Name,Host]),
+ case test_server:start_node(Name, peer, [{args,Args}]) of
+ {error,Reason} ->
+ test_server:fail(Reason);
+ {ok,Node} ->
+ ct:log("Node ~p started~n", [Node]),
+ Node
+ end.
diff --git a/lib/stdlib/test/unicode_SUITE.erl b/lib/stdlib/test/unicode_SUITE.erl
index e2d789bbe6..10b29d0d28 100644
--- a/lib/stdlib/test/unicode_SUITE.erl
+++ b/lib/stdlib/test/unicode_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -98,7 +98,7 @@ ex_binaries_errors_utf8(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,20) ],
+ end || N <- lists:seq(1,21,4) ],
ok.
ex_binaries_errors_utf16_little(Config) when is_list(Config) ->
@@ -124,7 +124,7 @@ ex_binaries_errors_utf16_little(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf16,little}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf16_big(Config) when is_list(Config) ->
BrokenPart = << <<X:16/big>> || X <- lists:seq(16#DC00,16#DFFF) >>,
@@ -149,7 +149,7 @@ ex_binaries_errors_utf16_big(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf16,big}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf32_big(Config) when is_list(Config) ->
@@ -175,7 +175,7 @@ ex_binaries_errors_utf32_big(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf32,big}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf32_little(Config) when is_list(Config) ->
@@ -201,7 +201,7 @@ ex_binaries_errors_utf32_little(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf32,little}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk
index 90d3e69b0e..f57f31c8de 100644
--- a/lib/stdlib/vsn.mk
+++ b/lib/stdlib/vsn.mk
@@ -1 +1 @@
-STDLIB_VSN = 1.19.4
+STDLIB_VSN = 2.4
diff --git a/lib/syntax_tools/doc/src/book.xml b/lib/syntax_tools/doc/src/book.xml
index 793b219ffb..6a8a3a3ca6 100644
--- a/lib/syntax_tools/doc/src/book.xml
+++ b/lib/syntax_tools/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/syntax_tools/doc/src/fascicules.xml b/lib/syntax_tools/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/syntax_tools/doc/src/fascicules.xml
+++ b/lib/syntax_tools/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/syntax_tools/doc/src/notes.xml b/lib/syntax_tools/doc/src/notes.xml
index b6614774e3..408f6d5bac 100644
--- a/lib/syntax_tools/doc/src/notes.xml
+++ b/lib/syntax_tools/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,131 @@
<p>This document describes the changes made to the Syntax_Tools
application.</p>
+<section><title>Syntax_Tools 1.6.18</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix bad format of error in epp_dodger:parse_file/3</p>
+ <p>
+ Own Id: OTP-12406</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Syntax_Tools 1.6.17</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Teach Maps to erl_syntax</p>
+ <p>
+ Affected functions: <list>
+ <item>erl_syntax:abstract/1</item>
+ <item>erl_syntax:concrete/1</item>
+ <item>erl_syntax:is_leaf/1</item>
+ <item>erl_syntax:is_literal/1</item> </list></p>
+ <p>
+ Own Id: OTP-12265</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Syntax_Tools 1.6.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> The default encoding for Erlang source files is now
+ UTF-8. As a temporary measure to ease the transition from
+ the old default of Latin-1, if EDoc encounters byte
+ sequences that are not valid UTF-8 sequences, EDoc will
+ re-try in Latin-1 mode. This workaround will be removed
+ in a future release. </p>
+ <p>
+ Own Id: OTP-12008</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Syntax_Tools 1.6.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix reverting map in syntax_tools</p>
+ <p>
+ There was a bug in erl_syntax when running e.g.
+ erl_syntax:revert_forms, affecting maps. Instead of
+ getting Key/Value you got Key/Key in the resulting
+ abstract form.</p>
+ <p>
+ Own Id: OTP-11930</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Syntax_Tools 1.6.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add implementation of having erl_tidy print to screen
+ instead of writing to the file provided. (Thanks to Aaron
+ France)</p>
+ <p>
+ Own Id: OTP-11632</p>
+ </item>
+ <item>
+ <p>
+ Support Maps syntax in syntax_tools (Thanks to Anthony
+ Ramine).</p>
+ <p>
+ Own Id: OTP-11663</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Syntax_Tools 1.6.13</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/syntax_tools/doc/src/part.xml b/lib/syntax_tools/doc/src/part.xml
index 4a3bae29eb..ee8e796561 100644
--- a/lib/syntax_tools/doc/src/part.xml
+++ b/lib/syntax_tools/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/syntax_tools/doc/src/part_notes.xml b/lib/syntax_tools/doc/src/part_notes.xml
index 3656b3ddb6..6962145618 100644
--- a/lib/syntax_tools/doc/src/part_notes.xml
+++ b/lib/syntax_tools/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2007</year><year>2009</year>
+ <year>2007</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/syntax_tools/doc/src/ref_man.xml b/lib/syntax_tools/doc/src/ref_man.xml
index 9249b42184..598f656011 100644
--- a/lib/syntax_tools/doc/src/ref_man.xml
+++ b/lib/syntax_tools/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/syntax_tools/src/epp_dodger.erl b/lib/syntax_tools/src/epp_dodger.erl
index 131be4e8e4..3ca7a8197e 100644
--- a/lib/syntax_tools/src/epp_dodger.erl
+++ b/lib/syntax_tools/src/epp_dodger.erl
@@ -88,7 +88,7 @@
%% This is a so-called Erlang I/O ErrorInfo structure; see the {@link
%% //stdlib/io} module for details.
--type errorinfo() :: term(). % {integer(), atom(), term()}.
+-type errorinfo() :: {integer(), atom(), term()}.
-type option() :: atom() | {atom(), term()}.
@@ -184,16 +184,42 @@ quick_parse_file(File, Options) ->
parse_file(File, fun quick_parse/3, Options ++ [no_fail]).
parse_file(File, Parser, Options) ->
+ case do_parse_file(utf8, File, Parser, Options) of
+ {ok, Forms}=Ret ->
+ case find_invalid_unicode(Forms) of
+ none ->
+ Ret;
+ invalid_unicode ->
+ case epp:read_encoding(File) of
+ utf8 ->
+ Ret;
+ _ ->
+ do_parse_file(latin1, File, Parser, Options)
+ end
+ end;
+ Else ->
+ Else
+ end.
+
+do_parse_file(DefEncoding, File, Parser, Options) ->
case file:open(File, [read]) of
{ok, Dev} ->
- _ = epp:set_encoding(Dev),
+ _ = epp:set_encoding(Dev, DefEncoding),
try Parser(Dev, 1, Options)
after ok = file:close(Dev)
end;
- {error, _} = Error ->
- Error
+ {error, Error} ->
+ {error, {0, file, Error}} % defer to file:format_error/1
end.
+find_invalid_unicode([H|T]) ->
+ case H of
+ {error, {_Line, file_io_server, invalid_unicode}} ->
+ invalid_unicode;
+ _Other ->
+ find_invalid_unicode(T)
+ end;
+find_invalid_unicode([]) -> none.
%% =====================================================================
%% @spec parse(IODevice) -> {ok, Forms} | {error, errorinfo()}
diff --git a/lib/syntax_tools/src/erl_comment_scan.erl b/lib/syntax_tools/src/erl_comment_scan.erl
index dae7530ce7..03429d4d42 100644
--- a/lib/syntax_tools/src/erl_comment_scan.erl
+++ b/lib/syntax_tools/src/erl_comment_scan.erl
@@ -72,13 +72,24 @@ file(Name) ->
{ok, V} ->
case V of
{ok, B} ->
- Enc = case epp:read_encoding(Name) of
+ Encoding = epp:read_encoding_from_binary(B),
+ Enc = case Encoding of
none -> epp:default_encoding();
Enc0 -> Enc0
end,
case catch unicode:characters_to_list(B, Enc) of
String when is_list(String) ->
string(String);
+ R when Encoding =:= none ->
+ case
+ catch unicode:characters_to_list(B, latin1)
+ of
+ String when is_list(String) ->
+ string(String);
+ _ ->
+ error_read_file(Name1),
+ exit(R)
+ end;
R ->
error_read_file(Name1),
exit(R)
diff --git a/lib/syntax_tools/src/erl_prettypr.erl b/lib/syntax_tools/src/erl_prettypr.erl
index 1ffcf31134..877675772f 100644
--- a/lib/syntax_tools/src/erl_prettypr.erl
+++ b/lib/syntax_tools/src/erl_prettypr.erl
@@ -637,6 +637,14 @@ lay_2(Node, Ctxt) ->
sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent),
text("end")]);
+ named_fun_expr ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:named_fun_expr_name(Node), Ctxt1),
+ D = lay_clauses(erl_syntax:named_fun_expr_clauses(Node),
+ {function,D1}, Ctxt1),
+ sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent),
+ text("end")]);
+
module_qualifier ->
{PrecL, _Prec, PrecR} = inop_prec(':'),
D1 = lay(erl_syntax:module_qualifier_argument(Node),
@@ -892,6 +900,32 @@ lay_2(Node, Ctxt) ->
beside(floating(text(".")), D2)),
maybe_parentheses(D3, Prec, Ctxt);
+ map_expr ->
+ {PrecL, Prec, _} = inop_prec('#'),
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = par(seq(erl_syntax:map_expr_fields(Node),
+ floating(text(",")), Ctxt1, fun lay/2)),
+ D2 = beside(text("#{"), beside(D1, floating(text("}")))),
+ D3 = case erl_syntax:map_expr_argument(Node) of
+ none ->
+ D2;
+ A ->
+ beside(lay(A, set_prec(Ctxt, PrecL)), D2)
+ end,
+ maybe_parentheses(D3, Prec, Ctxt);
+
+ map_field_assoc ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:map_field_assoc_name(Node), Ctxt1),
+ D2 = lay(erl_syntax:map_field_assoc_value(Node), Ctxt1),
+ par([D1, floating(text("=>")), D2], Ctxt1#ctxt.break_indent);
+
+ map_field_exact ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:map_field_exact_name(Node), Ctxt1),
+ D2 = lay(erl_syntax:map_field_exact_value(Node), Ctxt1),
+ par([D1, floating(text(":=")), D2], Ctxt1#ctxt.break_indent);
+
rule ->
%% Comments on the name will be repeated; cf.
%% `function'.
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 775b2cc109..40372a2106 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -220,12 +220,26 @@
macro/2,
macro_arguments/1,
macro_name/1,
+ map_expr/1,
+ map_expr/2,
+ map_expr_argument/1,
+ map_expr_fields/1,
+ map_field_assoc/2,
+ map_field_assoc_name/1,
+ map_field_assoc_value/1,
+ map_field_exact/2,
+ map_field_exact_name/1,
+ map_field_exact_value/1,
match_expr/2,
match_expr_body/1,
match_expr_pattern/1,
module_qualifier/2,
module_qualifier_argument/1,
module_qualifier_body/1,
+ named_fun_expr/2,
+ named_fun_expr_arity/1,
+ named_fun_expr_clauses/1,
+ named_fun_expr_name/1,
nil/0,
operator/1,
operator_literal/1,
@@ -439,8 +453,13 @@
%% </tr><tr>
%% <td>list_comp</td>
%% <td>macro</td>
+%% <td>map_expr</td>
+%% <td>map_field_assoc</td>
+%% </tr><tr>
+%% <td>map_field_exact</td>
%% <td>match_expr</td>
%% <td>module_qualifier</td>
+%% <td>named_fun_expr</td>
%% </tr><tr>
%% <td>nil</td>
%% <td>operator</td>
@@ -449,21 +468,23 @@
%% </tr><tr>
%% <td>receive_expr</td>
%% <td>record_access</td>
-%% </tr><tr>
%% <td>record_expr</td>
%% <td>record_field</td>
+%% </tr><tr>
%% <td>record_index_expr</td>
%% <td>rule</td>
-%% </tr><tr>
%% <td>size_qualifier</td>
%% <td>string</td>
+%% </tr><tr>
%% <td>text</td>
%% <td>try_expr</td>
-%% </tr><tr>
%% <td>tuple</td>
%% <td>underscore</td>
+%% </tr><tr>
%% <td>variable</td>
%% <td>warning_marker</td>
+%% <td></td>
+%% <td></td>
%% </tr>
%% </table></center>
%%
@@ -504,8 +525,12 @@
%% @see list/2
%% @see list_comp/2
%% @see macro/2
+%% @see map_expr/2
+%% @see map_field_assoc/2
+%% @see map_field_exact/2
%% @see match_expr/2
%% @see module_qualifier/2
+%% @see named_fun_expr/2
%% @see nil/0
%% @see operator/1
%% @see parentheses/1
@@ -554,6 +579,7 @@ type(Node) ->
{'catch', _, _} -> catch_expr;
{'cond', _, _} -> cond_expr;
{'fun', _, {clauses, _}} -> fun_expr;
+ {named_fun, _, _, _} -> named_fun_expr;
{'fun', _, {function, _, _}} -> implicit_fun;
{'fun', _, {function, _, _, _}} -> implicit_fun;
{'if', _, _} -> if_expr;
@@ -572,6 +598,10 @@ type(Node) ->
{lc, _, _, _} -> list_comp;
{bc, _, _, _} -> binary_comp;
{match, _, _, _} -> match_expr;
+ {map, _, _, _} -> map_expr;
+ {map, _, _} -> map_expr;
+ {map_field_assoc, _, _, _} -> map_field_assoc;
+ {map_field_exact, _, _, _} -> map_field_exact;
{op, _, _, _, _} -> infix_expr;
{op, _, _, _} -> prefix_expr;
{record, _, _, _, _} -> record_expr;
@@ -639,6 +669,9 @@ is_leaf(Node) ->
operator -> true; % nonstandard type
string -> true;
text -> true; % nonstandard type
+ map_expr ->
+ map_expr_fields(Node) =:= [] andalso
+ map_expr_argument(Node) =:= none;
tuple -> tuple_elements(Node) =:= [];
underscore -> true;
variable -> true;
@@ -1902,6 +1935,208 @@ atom_literal(Node) ->
%% =====================================================================
+%% @equiv map_expr(none, Fields)
+
+-spec map_expr([syntaxTree()]) -> syntaxTree().
+
+map_expr(Fields) ->
+ map_expr(none, Fields).
+
+
+%% =====================================================================
+%% @doc Creates an abstract map expression. If `Fields' is
+%% `[F1, ..., Fn]', then if `Argument' is `none', the result represents
+%% "<code>#{<em>F1</em>, ..., <em>Fn</em>}</code>",
+%% otherwise it represents
+%% "<code><em>Argument</em>#{<em>F1</em>, ..., <em>Fn</em>}</code>".
+%%
+%% @see map_expr/1
+%% @see map_expr_argument/1
+%% @see map_expr_fields/1
+%% @see map_field_assoc/2
+%% @see map_field_exact/2
+
+-record(map_expr, {argument :: 'none' | syntaxTree(),
+ fields :: [syntaxTree()]}).
+
+%% `erl_parse' representation:
+%%
+%% {map, Pos, Fields}
+%% {map, Pos, Argument, Fields}
+
+-spec map_expr('none' | syntaxTree(), [syntaxTree()]) -> syntaxTree().
+
+map_expr(Argument, Fields) ->
+ tree(map_expr, #map_expr{argument = Argument, fields = Fields}).
+
+revert_map_expr(Node) ->
+ Pos = get_pos(Node),
+ Argument = map_expr_argument(Node),
+ Fields = map_expr_fields(Node),
+ case Argument of
+ none ->
+ {map, Pos, Fields};
+ _ ->
+ {map, Pos, Argument, Fields}
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the argument subtree of a `map_expr' node, if any. If `Node'
+%% represents "<code>#{...}</code>", `none' is returned.
+%% Otherwise, if `Node' represents "<code><em>Argument</em>#{...}</code>",
+%% `Argument' is returned.
+%%
+%% @see map_expr/2
+
+-spec map_expr_argument(syntaxTree()) -> 'none' | syntaxTree().
+
+map_expr_argument(Node) ->
+ case unwrap(Node) of
+ {map, _, _} ->
+ none;
+ {map, _, Argument, _} ->
+ Argument;
+ Node1 ->
+ (data(Node1))#map_expr.argument
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the list of field subtrees of a `map_expr' node.
+%%
+%% @see map_expr/2
+
+-spec map_expr_fields(syntaxTree()) -> [syntaxTree()].
+
+map_expr_fields(Node) ->
+ case unwrap(Node) of
+ {map, _, Fields} ->
+ Fields;
+ {map, _, _, Fields} ->
+ Fields;
+ Node1 ->
+ (data(Node1))#map_expr.fields
+ end.
+
+
+%% =====================================================================
+%% @doc Creates an abstract map assoc field. The result represents
+%% "<code><em>Name</em> => <em>Value</em></code>".
+%%
+%% @see map_field_assoc_name/1
+%% @see map_field_assoc_value/1
+%% @see map_expr/2
+
+-record(map_field_assoc, {name :: syntaxTree(), value :: syntaxTree()}).
+
+%% `erl_parse' representation:
+%%
+%% {map_field_assoc, Pos, Name, Value}
+
+-spec map_field_assoc(syntaxTree(), syntaxTree()) -> syntaxTree().
+
+map_field_assoc(Name, Value) ->
+ tree(map_field_assoc, #map_field_assoc{name = Name, value = Value}).
+
+revert_map_field_assoc(Node) ->
+ Pos = get_pos(Node),
+ Name = map_field_assoc_name(Node),
+ Value = map_field_assoc_value(Node),
+ {map_field_assoc, Pos, Name, Value}.
+
+
+%% =====================================================================
+%% @doc Returns the name subtree of a `map_field_assoc' node.
+%%
+%% @see map_field_assoc/2
+
+-spec map_field_assoc_name(syntaxTree()) -> syntaxTree().
+
+map_field_assoc_name(Node) ->
+ case Node of
+ {map_field_assoc, _, Name, _} ->
+ Name;
+ _ ->
+ (data(Node))#map_field_assoc.name
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the value subtree of a `map_field_assoc' node.
+%%
+%% @see map_field_assoc/2
+
+-spec map_field_assoc_value(syntaxTree()) -> syntaxTree().
+
+map_field_assoc_value(Node) ->
+ case Node of
+ {map_field_assoc, _, _, Value} ->
+ Value;
+ _ ->
+ (data(Node))#map_field_assoc.value
+ end.
+
+
+%% =====================================================================
+%% @doc Creates an abstract map exact field. The result represents
+%% "<code><em>Name</em> := <em>Value</em></code>".
+%%
+%% @see map_field_exact_name/1
+%% @see map_field_exact_value/1
+%% @see map_expr/2
+
+-record(map_field_exact, {name :: syntaxTree(), value :: syntaxTree()}).
+
+%% `erl_parse' representation:
+%%
+%% {map_field_exact, Pos, Name, Value}
+
+-spec map_field_exact(syntaxTree(), syntaxTree()) -> syntaxTree().
+
+map_field_exact(Name, Value) ->
+ tree(map_field_exact, #map_field_exact{name = Name, value = Value}).
+
+revert_map_field_exact(Node) ->
+ Pos = get_pos(Node),
+ Name = map_field_exact_name(Node),
+ Value = map_field_exact_value(Node),
+ {map_field_exact, Pos, Name, Value}.
+
+
+%% =====================================================================
+%% @doc Returns the name subtree of a `map_field_exact' node.
+%%
+%% @see map_field_exact/2
+
+-spec map_field_exact_name(syntaxTree()) -> syntaxTree().
+
+map_field_exact_name(Node) ->
+ case Node of
+ {map_field_exact, _, Name, _} ->
+ Name;
+ _ ->
+ (data(Node))#map_field_exact.name
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the value subtree of a `map_field_exact' node.
+%%
+%% @see map_field_exact/2
+
+-spec map_field_exact_value(syntaxTree()) -> syntaxTree().
+
+map_field_exact_value(Node) ->
+ case Node of
+ {map_field_exact, _, _, Value} ->
+ Value;
+ _ ->
+ (data(Node))#map_field_exact.value
+ end.
+
+
+%% =====================================================================
%% @doc Creates an abstract tuple. If `Elements' is
%% `[X1, ..., Xn]', the result represents
%% "<code>{<em>X1</em>, ..., <em>Xn</em>}</code>".
@@ -5622,6 +5857,110 @@ fun_expr_arity(Node) ->
%% =====================================================================
+%% @doc Creates an abstract named fun-expression. If `Clauses' is
+%% `[C1, ..., Cn]', the result represents "<code>fun
+%% <em>Name</em> <em>C1</em>; ...; <em>Name</em> <em>Cn</em> end</code>".
+%% More exactly, if each `Ci' represents
+%% "<code>(<em>Pi1</em>, ..., <em>Pim</em>) <em>Gi</em> -> <em>Bi</em></code>",
+%% then the result represents
+%% "<code>fun <em>Name</em>(<em>P11</em>, ..., <em>P1m</em>) <em>G1</em> ->
+%% <em>B1</em>; ...; <em>Name</em>(<em>Pn1</em>, ..., <em>Pnm</em>)
+%% <em>Gn</em> -> <em>Bn</em> end</code>".
+%%
+%% @see named_fun_expr_name/1
+%% @see named_fun_expr_clauses/1
+%% @see named_fun_expr_arity/1
+
+-record(named_fun_expr, {name :: syntaxTree(), clauses :: [syntaxTree()]}).
+
+%% type(Node) = named_fun_expr
+%% data(Node) = #named_fun_expr{name :: Name, clauses :: Clauses}
+%%
+%% Name = syntaxTree()
+%% Clauses = [syntaxTree()]
+%%
+%% (See `function' for notes; e.g. why the arity is not stored.)
+%%
+%% `erl_parse' representation:
+%%
+%% {named_fun, Pos, Name, Clauses}
+%%
+%% Clauses = [Clause] \ []
+%% Clause = {clause, ...}
+%%
+%% See `clause' for documentation on `erl_parse' clauses.
+
+-spec named_fun_expr(syntaxTree(), [syntaxTree()]) -> syntaxTree().
+
+named_fun_expr(Name, Clauses) ->
+ tree(named_fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
+
+revert_named_fun_expr(Node) ->
+ Pos = get_pos(Node),
+ Name = named_fun_expr_name(Node),
+ Clauses = [revert_clause(C) || C <- named_fun_expr_clauses(Node)],
+ case type(Name) of
+ variable ->
+ {named_fun, Pos, variable_name(Name), Clauses};
+ _ ->
+ Node
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the name subtree of a `named_fun_expr' node.
+%%
+%% @see named_fun_expr/2
+
+-spec named_fun_expr_name(syntaxTree()) -> syntaxTree().
+
+named_fun_expr_name(Node) ->
+ case unwrap(Node) of
+ {named_fun, Pos, Name, _} ->
+ set_pos(variable(Name), Pos);
+ Node1 ->
+ (data(Node1))#named_fun_expr.name
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the list of clause subtrees of a `named_fun_expr' node.
+%%
+%% @see named_fun_expr/2
+
+-spec named_fun_expr_clauses(syntaxTree()) -> [syntaxTree()].
+
+named_fun_expr_clauses(Node) ->
+ case unwrap(Node) of
+ {named_fun, _, _, Clauses} ->
+ Clauses;
+ Node1 ->
+ (data(Node1))#named_fun_expr.clauses
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the arity of a `named_fun_expr' node. The result is
+%% the number of parameter patterns in the first clause of the
+%% named fun-expression; subsequent clauses are ignored.
+%%
+%% An exception is thrown if `named_fun_expr_clauses(Node)'
+%% returns an empty list, or if the first element of that list is not a
+%% syntax tree `C' of type `clause' such that
+%% `clause_patterns(C)' is a nonempty list.
+%%
+%% @see named_fun_expr/2
+%% @see named_fun_expr_clauses/1
+%% @see clause/3
+%% @see clause_patterns/1
+
+-spec named_fun_expr_arity(syntaxTree()) -> arity().
+
+named_fun_expr_arity(Node) ->
+ length(clause_patterns(hd(named_fun_expr_clauses(Node)))).
+
+
+%% =====================================================================
%% @doc Creates an abstract parenthesised expression. The result
%% represents "<code>(<em>Body</em>)</code>", independently of the
%% context.
@@ -5757,6 +6096,9 @@ abstract([]) ->
nil();
abstract(T) when is_tuple(T) ->
tuple(abstract_list(tuple_to_list(T)));
+abstract(T) when is_map(T) ->
+ map_expr([map_field_assoc(abstract(Key),abstract(Value))
+ || {Key,Value} <- maps:to_list(T)]);
abstract(T) when is_binary(T) ->
binary([binary_field(integer(B)) || B <- binary_to_list(T)]);
abstract(T) ->
@@ -5818,6 +6160,14 @@ concrete(Node) ->
| concrete(list_tail(Node))];
tuple ->
list_to_tuple(concrete_list(tuple_elements(Node)));
+ map_expr ->
+ As = [tuple([map_field_assoc_name(F),
+ map_field_assoc_value(F)]) || F <- map_expr_fields(Node)],
+ M0 = maps:from_list(concrete_list(As)),
+ case map_expr_argument(Node) of
+ none -> M0;
+ Node0 -> maps:merge(concrete(Node0),M0)
+ end;
binary ->
Fs = [revert_binary_field(
binary_field(binary_field_body(F),
@@ -5873,10 +6223,31 @@ is_literal(T) ->
is_literal(list_head(T)) andalso is_literal(list_tail(T));
tuple ->
lists:all(fun is_literal/1, tuple_elements(T));
+ map_expr ->
+ case map_expr_argument(T) of
+ none -> true;
+ Arg -> is_literal(Arg)
+ end andalso lists:all(fun is_literal_map_field/1, map_expr_fields(T));
+ binary ->
+ lists:all(fun is_literal_binary_field/1, binary_fields(T));
_ ->
false
end.
+is_literal_binary_field(F) ->
+ case binary_field_types(F) of
+ [] -> is_literal(binary_field_body(F));
+ _ -> false
+ end.
+
+is_literal_map_field(F) ->
+ case type(F) of
+ map_field_assoc ->
+ is_literal(map_field_assoc_name(F)) andalso
+ is_literal(map_field_assoc_value(F));
+ map_field_exact ->
+ false
+ end.
%% =====================================================================
%% @doc Returns an `erl_parse'-compatible representation of a
@@ -5980,10 +6351,18 @@ revert_root(Node) ->
revert_list(Node);
list_comp ->
revert_list_comp(Node);
+ map_expr ->
+ revert_map_expr(Node);
+ map_field_assoc ->
+ revert_map_field_assoc(Node);
+ map_field_exact ->
+ revert_map_field_exact(Node);
match_expr ->
revert_match_expr(Node);
module_qualifier ->
revert_module_qualifier(Node);
+ named_fun_expr ->
+ revert_named_fun_expr(Node);
nil ->
revert_nil(Node);
parentheses ->
@@ -6219,12 +6598,28 @@ subtrees(T) ->
As ->
[[macro_name(T)], As]
end;
+ map_expr ->
+ case map_expr_argument(T) of
+ none ->
+ [map_expr_fields(T)];
+ V ->
+ [[V], map_expr_fields(T)]
+ end;
+ map_field_assoc ->
+ [[map_field_assoc_name(T)],
+ [map_field_assoc_value(T)]];
+ map_field_exact ->
+ [[map_field_exact_name(T)],
+ [map_field_exact_value(T)]];
match_expr ->
[[match_expr_pattern(T)],
[match_expr_body(T)]];
module_qualifier ->
[[module_qualifier_argument(T)],
[module_qualifier_body(T)]];
+ named_fun_expr ->
+ [[named_fun_expr_name(T)],
+ named_fun_expr_clauses(T)];
parentheses ->
[[parentheses_body(T)]];
prefix_expr ->
@@ -6354,7 +6749,12 @@ make_tree(list, [P, [S]]) -> list(P, S);
make_tree(list_comp, [[T], B]) -> list_comp(T, B);
make_tree(macro, [[N]]) -> macro(N);
make_tree(macro, [[N], A]) -> macro(N, A);
+make_tree(map_expr, [Fs]) -> map_expr(Fs);
+make_tree(map_expr, [[E], Fs]) -> map_expr(E, Fs);
+make_tree(map_field_assoc, [[K], [V]]) -> map_field_assoc(K, V);
+make_tree(map_field_exact, [[K], [V]]) -> map_field_exact(K, V);
make_tree(match_expr, [[P], [E]]) -> match_expr(P, E);
+make_tree(named_fun_expr, [[N], C]) -> named_fun_expr(N, C);
make_tree(module_qualifier, [[M], [N]]) -> module_qualifier(M, N);
make_tree(parentheses, [[E]]) -> parentheses(E);
make_tree(prefix_expr, [[F], [A]]) -> prefix_expr(F, A);
diff --git a/lib/syntax_tools/src/erl_syntax_lib.erl b/lib/syntax_tools/src/erl_syntax_lib.erl
index e4665b99fc..2f0488abec 100644
--- a/lib/syntax_tools/src/erl_syntax_lib.erl
+++ b/lib/syntax_tools/src/erl_syntax_lib.erl
@@ -288,7 +288,7 @@ mapfoldl(_, S, []) ->
%%
%% @see //stdlib/sets
--spec variables(erl_syntax:syntaxTree()) -> set().
+-spec variables(erl_syntax:syntaxTree()) -> sets:set(atom()).
variables(Tree) ->
variables(Tree, sets:new()).
@@ -343,7 +343,7 @@ default_variable_name(N) ->
%%
%% @see new_variable_name/2
--spec new_variable_name(set()) -> atom().
+-spec new_variable_name(sets:set(atom())) -> atom().
new_variable_name(S) ->
new_variable_name(fun default_variable_name/1, S).
@@ -369,7 +369,7 @@ new_variable_name(S) ->
%% @see //stdlib/sets
%% @see //stdlib/random
--spec new_variable_name(fun((integer()) -> atom()), set()) -> atom().
+-spec new_variable_name(fun((integer()) -> atom()), sets:set(atom())) -> atom().
new_variable_name(F, S) ->
R = start_range(S),
@@ -416,7 +416,7 @@ generate(_Key, Range) ->
%%
%% @see new_variable_name/1
--spec new_variable_names(integer(), set()) -> [atom()].
+-spec new_variable_names(integer(), sets:set(atom())) -> [atom()].
new_variable_names(N, S) ->
new_variable_names(N, fun default_variable_name/1, S).
@@ -432,7 +432,7 @@ new_variable_names(N, S) ->
%%
%% @see new_variable_name/2
--spec new_variable_names(integer(), fun((integer()) -> atom()), set()) ->
+-spec new_variable_names(integer(), fun((integer()) -> atom()), sets:set(atom())) ->
[atom()].
new_variable_names(N, F, S) when is_integer(N) ->
diff --git a/lib/syntax_tools/src/erl_tidy.erl b/lib/syntax_tools/src/erl_tidy.erl
index 0c149634f6..38e0c2099b 100644
--- a/lib/syntax_tools/src/erl_tidy.erl
+++ b/lib/syntax_tools/src/erl_tidy.erl
@@ -14,7 +14,7 @@
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
%% USA
%%
-%% @copyright 1999-2006 Richard Carlsson
+%% @copyright 1999-2014 Richard Carlsson
%% @author Richard Carlsson <[email protected]>
%% @end
%% =====================================================================
@@ -269,6 +269,13 @@ file(Name) ->
%% is typically most useful if the `verbose' flag is enabled, to
%% generate reports about the program files without affecting
%% them. The default value is `false'.</dd>
+%%
+%% <dt>{stdout, boolean()}</dt>
+%%
+%% <dd>If the value is `true', instead of the file being written
+%% to disk it will be printed to stdout. The default value is
+%% `false'.</dd>
+%%
%% </dl>
%%
%% See the function `module/2' for further options.
@@ -309,9 +316,15 @@ file_2(Name, Opts) ->
true ->
ok;
false ->
- write_module(Tree, Name, Opts1),
- ok
- end.
+ case proplists:get_bool(stdout, Opts1) of
+ true ->
+ print_module(Tree, Opts1),
+ ok;
+ false ->
+ write_module(Tree, Name, Opts1),
+ ok
+ end
+ end.
read_module(Name, Opts) ->
verbose("reading module `~ts'.", [filename(Name)], Opts),
@@ -399,6 +412,10 @@ write_module(Tree, Name, Opts) ->
throw(R)
end.
+print_module(Tree, Opts) ->
+ Printer = proplists:get_value(printer, Opts),
+ io:format(Printer(Tree, Opts)).
+
output(FD, Printer, Tree, Opts) ->
io:put_chars(FD, Printer(Tree, Opts)),
io:nl(FD).
@@ -941,7 +958,7 @@ hidden_uses_2(Tree, Used) ->
-record(env, {file :: file:filename(),
module :: atom(),
current :: fa(),
- imports = dict:new() :: dict(),
+ imports = dict:new() :: dict:dict(atom(), atom()),
context = normal :: context(),
verbosity = 1 :: 0 | 1 | 2,
quiet = false :: boolean(),
@@ -953,12 +970,12 @@ hidden_uses_2(Tree, Used) ->
old_guard_tests = false :: boolean()}).
-record(st, {varc :: non_neg_integer(),
- used = sets:new() :: set(),
- imported :: set(),
- vars :: set(),
- functions :: set(),
+ used = sets:new() :: sets:set({atom(), arity()}),
+ imported :: sets:set({atom(), arity()}),
+ vars :: sets:set(atom()),
+ functions :: sets:set({atom(), arity()}),
new_forms = [] :: [erl_syntax:syntaxTree()],
- rename :: dict()}).
+ rename :: dict:dict(mfa(), {atom(), atom()})}).
visit_used(Names, Defs, Roots, Imports, Module, Opts) ->
File = proplists:get_value(file, Opts, ""),
diff --git a/lib/syntax_tools/src/igor.erl b/lib/syntax_tools/src/igor.erl
index 19b1cd592f..0420508f2a 100644
--- a/lib/syntax_tools/src/igor.erl
+++ b/lib/syntax_tools/src/igor.erl
@@ -14,7 +14,7 @@
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
%% USA
%%
-%% @copyright 1998-2006 Richard Carlsson
+%% @copyright 1998-2014 Richard Carlsson
%% @author Richard Carlsson <[email protected]>
%% @end
%% =====================================================================
@@ -695,7 +695,7 @@ merge_files1(Files, Opts) ->
preserved :: boolean(),
no_headers :: boolean(),
notes :: notes(),
- redirect :: dict(), % = dict(atom(), atom())
+ redirect :: dict:dict(atom(), atom()),
no_imports :: ordsets:ordset(atom()),
options :: [option()]
}).
@@ -727,7 +727,7 @@ merge_sources(Name, Sources, Opts) ->
%% Data structure for keeping state during transformation.
--record(state, {export :: set()}).
+-record(state, {export :: sets:set({atom(), arity()})}).
state__add_export(Name, Arity, S) ->
S#state{export = sets:add_element({Name, Arity},
@@ -1039,7 +1039,7 @@ make_stub(M, Map, Env) ->
-type atts() :: 'delete' | 'kill'.
-type file_atts() :: 'delete' | 'keep' | 'kill'.
--record(filter, {records :: set(),
+-record(filter, {records :: sets:set(atom()),
file_attributes :: file_atts(),
attributes :: atts()}).
@@ -1588,17 +1588,17 @@ alias_expansions_2(Modules, Table) ->
-record(code, {module :: atom(),
target :: atom(),
- sources :: set(), % set(atom()),
- static :: set(), % set(atom()),
- safe :: set(), % set(atom()),
+ sources :: sets:set(atom()),
+ static :: sets:set(atom()),
+ safe :: sets:set(atom()),
preserved :: boolean(),
no_headers :: boolean(),
notes :: notes(),
map :: map_fun(),
renaming :: fun((atom()) -> map_fun()),
- expand :: dict(), % = dict({atom(), integer()},
- % {atom(), {atom(), integer()}})
- redirect :: dict() % = dict(atom(), atom())
+ expand :: dict:dict({atom(), integer()},
+ {atom(), {atom(), integer()}}),
+ redirect :: dict:dict(atom(), atom())
}).
%% `Trees' must be a list of syntax trees of type `form_list'. The
diff --git a/lib/syntax_tools/src/syntax_tools.app.src b/lib/syntax_tools/src/syntax_tools.app.src
index dc0b9edd62..83dcb5fe23 100644
--- a/lib/syntax_tools/src/syntax_tools.app.src
+++ b/lib/syntax_tools/src/syntax_tools.app.src
@@ -14,4 +14,5 @@
prettypr]},
{registered,[]},
{applications, [stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/syntax_tools/src/syntax_tools.appup.src b/lib/syntax_tools/src/syntax_tools.appup.src
index 54a63833e6..89c25d14d7 100644
--- a/lib/syntax_tools/src/syntax_tools.appup.src
+++ b/lib/syntax_tools/src/syntax_tools.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, syntax_tools}]}],
+ [{<<".*">>,[{restart_application, syntax_tools}]}]
+}.
diff --git a/lib/syntax_tools/test/Makefile b/lib/syntax_tools/test/Makefile
index d4733b9a42..f67e3f8984 100644
--- a/lib/syntax_tools/test/Makefile
+++ b/lib/syntax_tools/test/Makefile
@@ -61,5 +61,6 @@ release_tests_spec: make_emakefile
$(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
$(INSTALL_DATA) syntax_tools.spec syntax_tools.cover "$(RELSYSDIR)"
chmod -R u+w "$(RELSYSDIR)"
+ @tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
release_docs_spec:
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE.erl b/lib/syntax_tools/test/syntax_tools_SUITE.erl
index 9eef56bddb..3c6b33f459 100644
--- a/lib/syntax_tools/test/syntax_tools_SUITE.erl
+++ b/lib/syntax_tools/test/syntax_tools_SUITE.erl
@@ -24,12 +24,16 @@
init_per_group/2,end_per_group/2]).
%% Test cases
--export([smoke_test/1,revert/1]).
+-export([app_test/1,appup_test/1,smoke_test/1,revert/1,revert_map/1,
+ t_abstract_type/1,t_erl_parse_type/1,t_epp_dodger/1,
+ t_comment_scan/1,t_igor/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [smoke_test,revert].
+ [app_test,appup_test,smoke_test,revert,revert_map,
+ t_abstract_type,t_erl_parse_type,t_epp_dodger,
+ t_comment_scan,t_igor].
groups() ->
[].
@@ -46,18 +50,23 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+app_test(Config) when is_list(Config) ->
+ ok = ?t:app_test(syntax_tools).
+
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(syntax_tools).
%% Read and parse all source in the OTP release.
smoke_test(Config) when is_list(Config) ->
- ?line Dog = ?t:timetrap(?t:minutes(12)),
- ?line Wc = filename:join([code:lib_dir(),"*","src","*.erl"]),
- ?line Fs = filelib:wildcard(Wc),
- ?line io:format("~p files\n", [length(Fs)]),
- ?line case p_run(fun smoke_test_file/1, Fs) of
- 0 -> ok;
- N -> ?line ?t:fail({N,errors})
- end,
- ?line ?t:timetrap_cancel(Dog).
+ Dog = ?t:timetrap(?t:minutes(12)),
+ Wc = filename:join([code:lib_dir(),"*","src","*.erl"]),
+ Fs = filelib:wildcard(Wc),
+ io:format("~p files\n", [length(Fs)]),
+ case p_run(fun smoke_test_file/1, Fs) of
+ 0 -> ok;
+ N -> ?t:fail({N,errors})
+ end,
+ ?t:timetrap_cancel(Dog).
smoke_test_file(File) ->
case epp_dodger:parse_file(File) of
@@ -73,7 +82,7 @@ print_error_markers(F, File) ->
case erl_syntax:type(F) of
error_marker ->
{L,M,Info} = erl_syntax:error_marker_info(F),
- io:format("~s:~p: ~s", [File,L,M:format_error(Info)]);
+ io:format("~ts:~p: ~s", [File,L,M:format_error(Info)]);
_ ->
ok
end.
@@ -89,9 +98,9 @@ revert(Config) when is_list(Config) ->
io:format("~p files\n", [length(Fs)]),
case p_run(fun (File) -> revert_file(File, Path) end, Fs) of
0 -> ok;
- N -> ?line ?t:fail({N,errors})
+ N -> ?t:fail({N,errors})
end,
- ?line ?t:timetrap_cancel(Dog).
+ ?t:timetrap_cancel(Dog).
revert_file(File, Path) ->
case epp:parse_file(File, Path, []) of
@@ -104,6 +113,300 @@ revert_file(File, Path) ->
ok
end.
+%% Testing bug fix for reverting map_field_assoc
+revert_map(Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?t:minutes(1)),
+ [{map_field_assoc,16,{atom,17,name},{var,18,'Value'}}] =
+ erl_syntax:revert_forms([{tree,map_field_assoc,
+ {attr,16,[],none},
+ {map_field_assoc,{atom,17,name},{var,18,'Value'}}}]),
+ ?t:timetrap_cancel(Dog).
+
+
+
+%% api tests
+
+t_abstract_type(Config) when is_list(Config) ->
+ F = fun validate_abstract_type/1,
+ ok = validate(F,[{hi,atom},
+ {1,integer},
+ {1.0,float},
+ {$a,integer},
+ {[],nil},
+ {[<<1,2>>,a,b],list},
+ {[2,3,<<1,2>>,a,b],list},
+ {[$a,$b,$c],string},
+ {"hello world",string},
+ {<<1,2,3>>,binary},
+ {#{a=>1,"b"=>2},map_expr},
+ {#{#{i=>1}=>1,"b"=>#{v=>2}},map_expr},
+ {{a,b,c},tuple}]),
+ ok.
+
+t_erl_parse_type(Config) when is_list(Config) ->
+ F = fun validate_erl_parse_type/1,
+ %% leaf types
+ ok = validate(F,[{"1",integer,true},
+ {"123456789",integer,true},
+ {"$h", char,true},
+ {"3.1415", float,true},
+ {"1.33e36", float,true},
+ {"\"1.33e36: hello\"", string,true},
+ {"Var1", variable,true},
+ {"_", underscore,true},
+ {"[]", nil,true},
+ {"{}", tuple,true},
+ {"#{}",map_expr,true},
+ {"'some atom'", atom, true}]),
+ %% composite types
+ ok = validate(F,[{"case X of t -> t; f -> f end", case_expr,false},
+ {"try X of t -> t catch C:R -> error end", try_expr,false},
+ {"receive X -> X end", receive_expr,false},
+ {"receive M -> X1 after T -> X2 end", receive_expr,false},
+ {"catch (X)", catch_expr,false},
+ {"fun(X) -> X end", fun_expr,false},
+ {"fun Foo(X) -> X end", named_fun_expr,false},
+ {"fun foo/2", implicit_fun,false},
+ {"fun bar:foo/2", implicit_fun,false},
+ {"if X -> t; true -> f end", if_expr,false},
+ {"<<1,2,3,4>>", binary,false},
+ {"<<1,2,3,4:5>>", binary,false},
+ {"<<V1:63,V2:22/binary, V3/bits>>", binary,false},
+ {"begin X end", block_expr,false},
+ {"foo(X1,X2)", application,false},
+ {"bar:foo(X1,X2)", application,false},
+ {"[1,2,3,4]", list,false},
+ {"[1|4]", list, false},
+ {"[<<1>>,<<2>>,-2,<<>>,[more,list]]", list,false},
+ {"[1|[2|[3|[4|[]]]]]", list,false},
+ {"#{ a=>1, b=>2 }", map_expr,false},
+ {"#{3=>3}#{ a=>1, b=>2 }", map_expr,false},
+ {"#{ a:=1, b:=2 }", map_expr,false},
+ {"M#{ a=>1, b=>2 }", map_expr,false},
+ {"[V||V <- Vs]", list_comp,false},
+ {"<< <<B>> || <<B>> <= Bs>>", binary_comp,false},
+ {"#state{ a = A, b = B}", record_expr,false},
+ {"#state{}", record_expr,false},
+ {"#s{ a = #def{ a=A }, b = B}", record_expr,false},
+ {"State#state{ a = A, b = B}", record_expr,false},
+ {"State#state.a", record_access,false},
+ {"#state.a", record_index_expr,false},
+ {"-X", prefix_expr,false},
+ {"X1 + X2", infix_expr,false},
+ {"(X1 + X2) * X3", infix_expr,false},
+ {"X1 = X2", match_expr,false},
+ {"{a,b,c}", tuple,false}]),
+ ok.
+
+%% the macro ?MODULE seems faulty
+t_epp_dodger(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ Filenames = ["syntax_tools_SUITE_test_module.erl",
+ "syntax_tools_test.erl"],
+ ok = test_epp_dodger(Filenames,DataDir,PrivDir),
+ ok.
+
+t_comment_scan(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Filenames = ["syntax_tools_SUITE_test_module.erl",
+ "syntax_tools_test.erl"],
+ ok = test_comment_scan(Filenames,DataDir),
+ ok.
+
+t_igor(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileM1 = filename:join(DataDir,"m1.erl"),
+ FileM2 = filename:join(DataDir,"m2.erl"),
+ ["m.erl",_]=R = igor:merge(m,[FileM1,FileM2],[{outdir,PrivDir}]),
+ io:format("igor:merge/3 = ~p~n", [R]),
+ ok.
+
+test_comment_scan([],_) -> ok;
+test_comment_scan([File|Files],DataDir) ->
+ Filename = filename:join(DataDir,File),
+ {ok, Fs0} = epp:parse_file(Filename, [], []),
+ Comments = erl_comment_scan:file(Filename),
+ Fun = fun(Node) ->
+ case erl_syntax:is_form(Node) of
+ true ->
+ C1 = erl_syntax:comment(2,[" This is a form."]),
+ Node1 = erl_syntax:add_precomments([C1],Node),
+ Node1;
+ false ->
+ Node
+ end
+ end,
+ Fs1 = erl_recomment:recomment_forms(Fs0, Comments),
+ Fs2 = erl_syntax_lib:map(Fun, Fs1),
+ io:format("File: ~s~n", [Filename]),
+ io:put_chars(erl_prettypr:format(Fs2, [{paper, 120},
+ {ribbon, 110}])),
+ test_comment_scan(Files,DataDir).
+
+
+test_epp_dodger([], _, _) -> ok;
+test_epp_dodger([Filename|Files],DataDir,PrivDir) ->
+ io:format("Parsing ~p~n", [Filename]),
+ InFile = filename:join(DataDir, Filename),
+ Parsers = [{fun epp_dodger:parse_file/1,parse_file},
+ {fun epp_dodger:quick_parse_file/1,quick_parse_file},
+ {fun (File) ->
+ {ok,Dev} = file:open(File,[read]),
+ Res = epp_dodger:parse(Dev),
+ file:close(File),
+ Res
+ end, parse},
+ {fun (File) ->
+ {ok,Dev} = file:open(File,[read]),
+ Res = epp_dodger:quick_parse(Dev),
+ file:close(File),
+ Res
+ end, quick_parse}],
+ FsForms = parse_with(Parsers, InFile),
+ ok = pretty_print_parse_forms(FsForms,PrivDir,Filename),
+ test_epp_dodger(Files,DataDir,PrivDir).
+
+parse_with([],_) -> [];
+parse_with([{Fun,ParserType}|Funs],File) ->
+ {ok, Fs} = Fun(File),
+ [{Fs,ParserType}|parse_with(Funs,File)].
+
+pretty_print_parse_forms([],_,_) -> ok;
+pretty_print_parse_forms([{Fs0,Type}|FsForms],PrivDir,Filename) ->
+ Parser = atom_to_list(Type),
+ OutFile = filename:join(PrivDir, Parser ++"_" ++ Filename),
+ io:format("Pretty print ~p (~w) to ~p~n", [Filename,Type,OutFile]),
+ Comment = fun (Node,{CntCase,CntTry}=Cnt) ->
+ case erl_syntax:type(Node) of
+ case_expr ->
+ C1 = erl_syntax:comment(2,["Before a case expression"]),
+ Node1 = erl_syntax:add_precomments([C1],Node),
+ C2 = erl_syntax:comment(2,["After a case expression"]),
+ Node2 = erl_syntax:add_postcomments([C2],Node1),
+ {Node2,{CntCase+1,CntTry}};
+ try_expr ->
+ C1 = erl_syntax:comment(2,["Before a try expression"]),
+ Node1 = erl_syntax:set_precomments(Node,
+ erl_syntax:get_precomments(Node) ++ [C1]),
+ C2 = erl_syntax:comment(2,["After a try expression"]),
+ Node2 = erl_syntax:set_postcomments(Node1,
+ erl_syntax:get_postcomments(Node1) ++ [C2]),
+ {Node2,{CntCase,CntTry+1}};
+ _ ->
+ {Node,Cnt}
+ end
+ end,
+ Fs1 = erl_syntax:form_list(Fs0),
+ {Fs2,{CC,CT}} = erl_syntax_lib:mapfold(Comment,{0,0}, Fs1),
+ io:format("Commented on ~w cases and ~w tries~n", [CC,CT]),
+ PP = erl_prettypr:format(Fs2),
+ ok = file:write_file(OutFile,iolist_to_binary(PP)),
+ pretty_print_parse_forms(FsForms,PrivDir,Filename).
+
+
+validate(_,[]) -> ok;
+validate(F,[V|Vs]) ->
+ ok = F(V),
+ validate(F,Vs).
+
+
+validate_abstract_type({Lit,Type}) ->
+ Tree = erl_syntax:abstract(Lit),
+ ok = validate_special_type(Type,Tree),
+ Type = erl_syntax:type(Tree),
+ true = erl_syntax:is_literal(Tree),
+ ErlT = erl_syntax:revert(Tree),
+ Type = erl_syntax:type(ErlT),
+ ok = validate_special_type(Type,ErlT),
+ Conc = erl_syntax:concrete(Tree),
+ Lit = Conc,
+ ok.
+
+validate_erl_parse_type({String,Type,Leaf}) ->
+ ErlT = string_to_expr(String),
+ ok = validate_special_type(Type,ErlT),
+ Type = erl_syntax:type(ErlT),
+ Leaf = erl_syntax:is_leaf(ErlT),
+ Tree = erl_syntax_lib:map(fun(Node) -> Node end, ErlT),
+ Type = erl_syntax:type(Tree),
+ _ = erl_syntax:meta(Tree),
+ ok = validate_special_type(Type,Tree),
+ RevT = erl_syntax:revert(Tree),
+ ok = validate_special_type(Type,RevT),
+ Type = erl_syntax:type(RevT),
+ ok.
+
+validate_special_type(string,Node) ->
+ Val = erl_syntax:string_value(Node),
+ true = erl_syntax:is_string(Node,Val),
+ _ = erl_syntax:string_literal(Node),
+ ok;
+validate_special_type(variable,Node) ->
+ _ = erl_syntax:variable_literal(Node),
+ ok;
+validate_special_type(fun_expr,Node) ->
+ A = erl_syntax:fun_expr_arity(Node),
+ true = is_integer(A),
+ ok;
+validate_special_type(named_fun_expr,Node) ->
+ A = erl_syntax:named_fun_expr_arity(Node),
+ true = is_integer(A),
+ ok;
+validate_special_type(tuple,Node) ->
+ Size = erl_syntax:tuple_size(Node),
+ true = is_integer(Size),
+ ok;
+validate_special_type(float,Node) ->
+ Str = erl_syntax:float_literal(Node),
+ Val = list_to_float(Str),
+ Val = erl_syntax:float_value(Node),
+ false = erl_syntax:is_proper_list(Node),
+ false = erl_syntax:is_list_skeleton(Node),
+ ok;
+validate_special_type(integer,Node) ->
+ Str = erl_syntax:integer_literal(Node),
+ Val = list_to_integer(Str),
+ true = erl_syntax:is_integer(Node,Val),
+ Val = erl_syntax:integer_value(Node),
+ false = erl_syntax:is_proper_list(Node),
+ ok;
+validate_special_type(nil,Node) ->
+ true = erl_syntax:is_proper_list(Node),
+ ok;
+validate_special_type(list,Node) ->
+ true = erl_syntax:is_list_skeleton(Node),
+ _ = erl_syntax:list_tail(Node),
+ ErrV = erl_syntax:list_head(Node),
+ false = erl_syntax:is_string(Node,ErrV),
+ Norm = erl_syntax:normalize_list(Node),
+ list = erl_syntax:type(Norm),
+ case erl_syntax:is_proper_list(Node) of
+ true ->
+ true = erl_syntax:is_list_skeleton(Node),
+ Compact = erl_syntax:compact_list(Node),
+ list = erl_syntax:type(Compact),
+ [_|_] = erl_syntax:list_elements(Node),
+ _ = erl_syntax:list_elements(Node),
+ N = erl_syntax:list_length(Node),
+ true = N > 0,
+ ok;
+ false ->
+ ok
+ end;
+validate_special_type(_,_) ->
+ ok.
+
+%%% scan_and_parse
+
+string_to_expr(String) ->
+ io:format("Str: ~p~n", [String]),
+ {ok, Ts, _} = erl_scan:string(String++"."),
+ {ok,[Expr]} = erl_parse:parse_exprs(Ts),
+ Expr.
+
+
p_run(Test, List) ->
N = erlang:system_info(schedulers),
p_run_loop(Test, List, N, [], 0).
@@ -123,4 +426,3 @@ p_run_loop(Test, List, N, Refs0, Errors0) ->
Refs = Refs0 -- [Ref],
p_run_loop(Test, List, N, Refs, Errors)
end.
-
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/m1.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/m1.erl
new file mode 100644
index 0000000000..d0d1911199
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/m1.erl
@@ -0,0 +1,22 @@
+%%
+%% File: m1.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-10-24
+%%
+
+-module(m1).
+
+-export([foo/0,bar/1,baz/2]).
+
+foo() ->
+ [m2:foo(),
+ m2:bar()].
+
+bar(A) ->
+ [m2:foo(A),
+ m2:bar(A),
+ m2:record_update(3,m2:record())].
+
+baz(A,B) ->
+ [m2:foo(A,B),
+ m2:bar(A,B)].
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/m2.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/m2.erl
new file mode 100644
index 0000000000..781139317d
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/m2.erl
@@ -0,0 +1,26 @@
+%%
+%% File: m2.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-10-24
+%%
+
+-module(m2).
+
+
+-export([foo/0,foo/1,foo/2,
+ bar/0,bar/1,bar/2,
+ record_update/2, record/0]).
+
+foo() -> ok.
+foo(A) -> [item,A].
+foo(A,B) -> A + B.
+
+bar() -> true.
+bar(A) -> {element,A}.
+bar(A,B) -> A*B.
+
+-record(rec, {a,b}).
+
+record() -> #rec{a=3,b=0}.
+record_update(V,#rec{a=V0}=R) ->
+ R#rec{a=V0+V,b=V0}.
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_SUITE_test_module.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_SUITE_test_module.erl
new file mode 100644
index 0000000000..07c419b4b7
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_SUITE_test_module.erl
@@ -0,0 +1,540 @@
+-module(syntax_tools_SUITE_test_module).
+
+-export([foo1/1,foo2/3,start_child/2]).
+
+-export([len/1,equal/2,concat/2,chr/2,rchr/2,str/2,rstr/2,
+ span/2,cspan/2,substr/2,substr/3,tokens/2,chars/2,chars/3]).
+-export([copies/2,words/1,words/2,strip/1,strip/2,strip/3,
+ sub_word/2,sub_word/3,left/2,left/3,right/2,right/3,
+ sub_string/2,sub_string/3,centre/2,centre/3, join/2]).
+-export([to_upper/1, to_lower/1]).
+
+-import(lists,[reverse/1,member/2]).
+
+
+%% @type some_type() = map()
+%% @type some_other_type() = {a, #{ list() => term()}}
+
+-type some_type() :: map().
+-type some_other_type() :: {'a', #{ list() => term()} }.
+
+-spec foo1(Map :: #{ 'a' => integer(), 'b' => term()}) -> term().
+
+%% @doc Gets value from map.
+
+foo1(#{ a:= 1, b := V}) -> V.
+
+%% @spec foo2(some_type(), Type2 :: some_other_type(), map()) -> Value
+%% @doc Gets value from map.
+
+-spec foo2(
+ Type1 :: some_type(),
+ Type2 :: some_other_type(),
+ Map :: #{ get => 'value', 'value' => binary()}) -> binary().
+
+foo2(Type1, {a,#{ "a" := _}}, #{get := value, value := B}) when is_map(Type1) -> B.
+
+%% from supervisor 18.0
+
+-type child() :: 'undefined' | pid().
+-type child_id() :: term().
+-type mfargs() :: {M :: module(), F :: atom(), A :: [term()] | undefined}.
+-type modules() :: [module()] | 'dynamic'.
+-type restart() :: 'permanent' | 'transient' | 'temporary'.
+-type shutdown() :: 'brutal_kill' | timeout().
+-type worker() :: 'worker' | 'supervisor'.
+-type sup_ref() :: (Name :: atom())
+ | {Name :: atom(), Node :: node()}
+ | {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}
+ | pid().
+-type child_spec() :: #{name => child_id(), % mandatory
+ start => mfargs(), % mandatory
+ restart => restart(), % optional
+ shutdown => shutdown(), % optional
+ type => worker(), % optional
+ modules => modules()} % optional
+ | {Id :: child_id(),
+ StartFunc :: mfargs(),
+ Restart :: restart(),
+ Shutdown :: shutdown(),
+ Type :: worker(),
+ Modules :: modules()}.
+
+-type startchild_err() :: 'already_present'
+ | {'already_started', Child :: child()} | term().
+-type startchild_ret() :: {'ok', Child :: child()}
+ | {'ok', Child :: child(), Info :: term()}
+ | {'error', startchild_err()}.
+
+
+-spec start_child(SupRef, ChildSpec) -> startchild_ret() when
+ SupRef :: sup_ref(),
+ ChildSpec :: child_spec() | (List :: [term()]).
+start_child(Supervisor, ChildSpec) ->
+ {Supervisor,ChildSpec}.
+
+
+%% From string.erl
+%% Robert's bit
+
+%% len(String)
+%% Return the length of a string.
+
+-spec len(String) -> Length when
+ String :: string(),
+ Length :: non_neg_integer().
+
+len(S) -> length(S).
+
+%% equal(String1, String2)
+%% Test if 2 strings are equal.
+
+-spec equal(String1, String2) -> boolean() when
+ String1 :: string(),
+ String2 :: string().
+
+equal(S, S) -> true;
+equal(_, _) -> false.
+
+%% concat(String1, String2)
+%% Concatenate 2 strings.
+
+-spec concat(String1, String2) -> String3 when
+ String1 :: string(),
+ String2 :: string(),
+ String3 :: string().
+
+concat(S1, S2) -> S1 ++ S2.
+
+%% chr(String, Char)
+%% rchr(String, Char)
+%% Return the first/last index of the character in a string.
+
+-spec chr(String, Character) -> Index when
+ String :: string(),
+ Character :: char(),
+ Index :: non_neg_integer().
+
+chr(S, C) when is_integer(C) -> chr(S, C, 1).
+
+chr([C|_Cs], C, I) -> I;
+chr([_|Cs], C, I) -> chr(Cs, C, I+1);
+chr([], _C, _I) -> 0.
+
+-spec rchr(String, Character) -> Index when
+ String :: string(),
+ Character :: char(),
+ Index :: non_neg_integer().
+
+rchr(S, C) when is_integer(C) -> rchr(S, C, 1, 0).
+
+rchr([C|Cs], C, I, _L) -> %Found one, now find next!
+ rchr(Cs, C, I+1, I);
+rchr([_|Cs], C, I, L) ->
+ rchr(Cs, C, I+1, L);
+rchr([], _C, _I, L) -> L.
+
+%% str(String, SubString)
+%% rstr(String, SubString)
+%% index(String, SubString)
+%% Return the first/last index of the sub-string in a string.
+%% index/2 is kept for backwards compatibility.
+
+-spec str(String, SubString) -> Index when
+ String :: string(),
+ SubString :: string(),
+ Index :: non_neg_integer().
+
+str(S, Sub) when is_list(Sub) -> str(S, Sub, 1).
+
+str([C|S], [C|Sub], I) ->
+ case prefix(Sub, S) of
+ true -> I;
+ false -> str(S, [C|Sub], I+1)
+ end;
+str([_|S], Sub, I) -> str(S, Sub, I+1);
+str([], _Sub, _I) -> 0.
+
+-spec rstr(String, SubString) -> Index when
+ String :: string(),
+ SubString :: string(),
+ Index :: non_neg_integer().
+
+rstr(S, Sub) when is_list(Sub) -> rstr(S, Sub, 1, 0).
+
+rstr([C|S], [C|Sub], I, L) ->
+ case prefix(Sub, S) of
+ true -> rstr(S, [C|Sub], I+1, I);
+ false -> rstr(S, [C|Sub], I+1, L)
+ end;
+rstr([_|S], Sub, I, L) -> rstr(S, Sub, I+1, L);
+rstr([], _Sub, _I, L) -> L.
+
+prefix([C|Pre], [C|String]) -> prefix(Pre, String);
+prefix([], String) when is_list(String) -> true;
+prefix(Pre, String) when is_list(Pre), is_list(String) -> false.
+
+%% span(String, Chars) -> Length.
+%% cspan(String, Chars) -> Length.
+
+-spec span(String, Chars) -> Length when
+ String :: string(),
+ Chars :: string(),
+ Length :: non_neg_integer().
+
+span(S, Cs) when is_list(Cs) -> span(S, Cs, 0).
+
+span([C|S], Cs, I) ->
+ case member(C, Cs) of
+ true -> span(S, Cs, I+1);
+ false -> I
+ end;
+span([], _Cs, I) -> I.
+
+-spec cspan(String, Chars) -> Length when
+ String :: string(),
+ Chars :: string(),
+ Length :: non_neg_integer().
+
+cspan(S, Cs) when is_list(Cs) -> cspan(S, Cs, 0).
+
+cspan([C|S], Cs, I) ->
+ case member(C, Cs) of
+ true -> I;
+ false -> cspan(S, Cs, I+1)
+ end;
+cspan([], _Cs, I) -> I.
+
+%% substr(String, Start)
+%% substr(String, Start, Length)
+%% Extract a sub-string from String.
+
+-spec substr(String, Start) -> SubString when
+ String :: string(),
+ SubString :: string(),
+ Start :: pos_integer().
+
+substr(String, 1) when is_list(String) ->
+ String;
+substr(String, S) when is_integer(S), S > 1 ->
+ substr2(String, S).
+
+-spec substr(String, Start, Length) -> SubString when
+ String :: string(),
+ SubString :: string(),
+ Start :: pos_integer(),
+ Length :: non_neg_integer().
+
+substr(String, S, L) when is_integer(S), S >= 1, is_integer(L), L >= 0 ->
+ substr1(substr2(String, S), L).
+
+substr1([C|String], L) when L > 0 -> [C|substr1(String, L-1)];
+substr1(String, _L) when is_list(String) -> []. %Be nice!
+
+substr2(String, 1) when is_list(String) -> String;
+substr2([_|String], S) -> substr2(String, S-1).
+
+%% tokens(String, Seperators).
+%% Return a list of tokens seperated by characters in Seperators.
+
+-spec tokens(String, SeparatorList) -> Tokens when
+ String :: string(),
+ SeparatorList :: string(),
+ Tokens :: [Token :: nonempty_string()].
+
+tokens(S, Seps) ->
+ tokens1(S, Seps, []).
+
+tokens1([C|S], Seps, Toks) ->
+ case member(C, Seps) of
+ true -> tokens1(S, Seps, Toks);
+ false -> tokens2(S, Seps, Toks, [C])
+ end;
+tokens1([], _Seps, Toks) ->
+ reverse(Toks).
+
+tokens2([C|S], Seps, Toks, Cs) ->
+ case member(C, Seps) of
+ true -> tokens1(S, Seps, [reverse(Cs)|Toks]);
+ false -> tokens2(S, Seps, Toks, [C|Cs])
+ end;
+tokens2([], _Seps, Toks, Cs) ->
+ reverse([reverse(Cs)|Toks]).
+
+-spec chars(Character, Number) -> String when
+ Character :: char(),
+ Number :: non_neg_integer(),
+ String :: string().
+
+chars(C, N) -> chars(C, N, []).
+
+-spec chars(Character, Number, Tail) -> String when
+ Character :: char(),
+ Number :: non_neg_integer(),
+ Tail :: string(),
+ String :: string().
+
+chars(C, N, Tail) when N > 0 ->
+ chars(C, N-1, [C|Tail]);
+chars(C, 0, Tail) when is_integer(C) ->
+ Tail.
+
+%% Torbjörn's bit.
+
+%%% COPIES %%%
+
+-spec copies(String, Number) -> Copies when
+ String :: string(),
+ Copies :: string(),
+ Number :: non_neg_integer().
+
+copies(CharList, Num) when is_list(CharList), is_integer(Num), Num >= 0 ->
+ copies(CharList, Num, []).
+
+copies(_CharList, 0, R) ->
+ R;
+copies(CharList, Num, R) ->
+ copies(CharList, Num-1, CharList++R).
+
+%%% WORDS %%%
+
+-spec words(String) -> Count when
+ String :: string(),
+ Count :: pos_integer().
+
+words(String) -> words(String, $\s).
+
+-spec words(String, Character) -> Count when
+ String :: string(),
+ Character :: char(),
+ Count :: pos_integer().
+
+words(String, Char) when is_integer(Char) ->
+ w_count(strip(String, both, Char), Char, 0).
+
+w_count([], _, Num) -> Num+1;
+w_count([H|T], H, Num) -> w_count(strip(T, left, H), H, Num+1);
+w_count([_H|T], Char, Num) -> w_count(T, Char, Num).
+
+%%% SUB_WORDS %%%
+
+-spec sub_word(String, Number) -> Word when
+ String :: string(),
+ Word :: string(),
+ Number :: integer().
+
+sub_word(String, Index) -> sub_word(String, Index, $\s).
+
+-spec sub_word(String, Number, Character) -> Word when
+ String :: string(),
+ Word :: string(),
+ Number :: integer(),
+ Character :: char().
+
+sub_word(String, Index, Char) when is_integer(Index), is_integer(Char) ->
+ case words(String, Char) of
+ Num when Num < Index ->
+ [];
+ _Num ->
+ s_word(strip(String, left, Char), Index, Char, 1, [])
+ end.
+
+s_word([], _, _, _,Res) -> reverse(Res);
+s_word([Char|_],Index,Char,Index,Res) -> reverse(Res);
+s_word([H|T],Index,Char,Index,Res) -> s_word(T,Index,Char,Index,[H|Res]);
+s_word([Char|T],Stop,Char,Index,Res) when Index < Stop ->
+ s_word(strip(T,left,Char),Stop,Char,Index+1,Res);
+s_word([_|T],Stop,Char,Index,Res) when Index < Stop ->
+ s_word(T,Stop,Char,Index,Res).
+
+%%% STRIP %%%
+
+-spec strip(string()) -> string().
+
+strip(String) -> strip(String, both).
+
+-spec strip(String, Direction) -> Stripped when
+ String :: string(),
+ Stripped :: string(),
+ Direction :: left | right | both.
+
+strip(String, left) -> strip_left(String, $\s);
+strip(String, right) -> strip_right(String, $\s);
+strip(String, both) ->
+ strip_right(strip_left(String, $\s), $\s).
+
+-spec strip(String, Direction, Character) -> Stripped when
+ String :: string(),
+ Stripped :: string(),
+ Direction :: left | right | both,
+ Character :: char().
+
+strip(String, right, Char) -> strip_right(String, Char);
+strip(String, left, Char) -> strip_left(String, Char);
+strip(String, both, Char) ->
+ strip_right(strip_left(String, Char), Char).
+
+strip_left([Sc|S], Sc) ->
+ strip_left(S, Sc);
+strip_left([_|_]=S, Sc) when is_integer(Sc) -> S;
+strip_left([], Sc) when is_integer(Sc) -> [].
+
+strip_right([Sc|S], Sc) ->
+ case strip_right(S, Sc) of
+ [] -> [];
+ T -> [Sc|T]
+ end;
+strip_right([C|S], Sc) ->
+ [C|strip_right(S, Sc)];
+strip_right([], Sc) when is_integer(Sc) ->
+ [].
+
+%%% LEFT %%%
+
+-spec left(String, Number) -> Left when
+ String :: string(),
+ Left :: string(),
+ Number :: non_neg_integer().
+
+left(String, Len) when is_integer(Len) -> left(String, Len, $\s).
+
+-spec left(String, Number, Character) -> Left when
+ String :: string(),
+ Left :: string(),
+ Number :: non_neg_integer(),
+ Character :: char().
+
+left(String, Len, Char) when is_integer(Char) ->
+ Slen = length(String),
+ if
+ Slen > Len -> substr(String, 1, Len);
+ Slen < Len -> l_pad(String, Len-Slen, Char);
+ Slen =:= Len -> String
+ end.
+
+l_pad(String, Num, Char) -> String ++ chars(Char, Num).
+
+%%% RIGHT %%%
+
+-spec right(String, Number) -> Right when
+ String :: string(),
+ Right :: string(),
+ Number :: non_neg_integer().
+
+right(String, Len) when is_integer(Len) -> right(String, Len, $\s).
+
+-spec right(String, Number, Character) -> Right when
+ String :: string(),
+ Right :: string(),
+ Number :: non_neg_integer(),
+ Character :: char().
+
+right(String, Len, Char) when is_integer(Char) ->
+ Slen = length(String),
+ if
+ Slen > Len -> substr(String, Slen-Len+1);
+ Slen < Len -> r_pad(String, Len-Slen, Char);
+ Slen =:= Len -> String
+ end.
+
+r_pad(String, Num, Char) -> chars(Char, Num, String).
+
+%%% CENTRE %%%
+
+-spec centre(String, Number) -> Centered when
+ String :: string(),
+ Centered :: string(),
+ Number :: non_neg_integer().
+
+centre(String, Len) when is_integer(Len) -> centre(String, Len, $\s).
+
+-spec centre(String, Number, Character) -> Centered when
+ String :: string(),
+ Centered :: string(),
+ Number :: non_neg_integer(),
+ Character :: char().
+
+centre(String, 0, Char) when is_list(String), is_integer(Char) ->
+ []; % Strange cases to centre string
+centre(String, Len, Char) when is_integer(Char) ->
+ Slen = length(String),
+ if
+ Slen > Len -> substr(String, (Slen-Len) div 2 + 1, Len);
+ Slen < Len ->
+ N = (Len-Slen) div 2,
+ r_pad(l_pad(String, Len-(Slen+N), Char), N, Char);
+ Slen =:= Len -> String
+ end.
+
+%%% SUB_STRING %%%
+
+-spec sub_string(String, Start) -> SubString when
+ String :: string(),
+ SubString :: string(),
+ Start :: pos_integer().
+
+sub_string(String, Start) -> substr(String, Start).
+
+-spec sub_string(String, Start, Stop) -> SubString when
+ String :: string(),
+ SubString :: string(),
+ Start :: pos_integer(),
+ Stop :: pos_integer().
+
+sub_string(String, Start, Stop) -> substr(String, Start, Stop - Start + 1).
+
+%% ISO/IEC 8859-1 (latin1) letters are converted, others are ignored
+%%
+
+to_lower_char(C) when is_integer(C), $A =< C, C =< $Z ->
+ C + 32;
+to_lower_char(C) when is_integer(C), 16#C0 =< C, C =< 16#D6 ->
+ C + 32;
+to_lower_char(C) when is_integer(C), 16#D8 =< C, C =< 16#DE ->
+ C + 32;
+to_lower_char(C) ->
+ C.
+
+to_upper_char(C) when is_integer(C), $a =< C, C =< $z ->
+ C - 32;
+to_upper_char(C) when is_integer(C), 16#E0 =< C, C =< 16#F6 ->
+ C - 32;
+to_upper_char(C) when is_integer(C), 16#F8 =< C, C =< 16#FE ->
+ C - 32;
+to_upper_char(C) ->
+ C.
+
+-spec to_lower(String) -> Result when
+ String :: io_lib:latin1_string(),
+ Result :: io_lib:latin1_string()
+ ; (Char) -> CharResult when
+ Char :: char(),
+ CharResult :: char().
+
+to_lower(S) when is_list(S) ->
+ [to_lower_char(C) || C <- S];
+to_lower(C) when is_integer(C) ->
+ to_lower_char(C).
+
+-spec to_upper(String) -> Result when
+ String :: io_lib:latin1_string(),
+ Result :: io_lib:latin1_string()
+ ; (Char) -> CharResult when
+ Char :: char(),
+ CharResult :: char().
+
+to_upper(S) when is_list(S) ->
+ [to_upper_char(C) || C <- S];
+to_upper(C) when is_integer(C) ->
+ to_upper_char(C).
+
+-spec join(StringList, Separator) -> String when
+ StringList :: [string()],
+ Separator :: string(),
+ String :: string().
+
+join([], Sep) when is_list(Sep) ->
+ [];
+join([H|T], Sep) ->
+ H ++ lists:append([Sep ++ X || X <- T]).
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_test.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_test.erl
new file mode 100644
index 0000000000..dd3f88d7a8
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/syntax_tools_test.erl
@@ -0,0 +1,115 @@
+%%
+%% File: syntax_tools_test.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-10-23
+%%
+
+-module(syntax_tools_test).
+
+-export([foo1/0,foo2/2,foo3/0,foo4/3,foo5/1]).
+
+-include_lib("kernel/include/file.hrl").
+-record(state, { a, b, c, d}).
+-attribute([foo/0]).
+
+-define(attrib, some_attrib).
+
+-?attrib([foo2/2]).
+
+-define(macro_simple1, ok).
+-define(MACRO_SIMPLE2, (other)).
+-define(macro_simple3, ?MODULE).
+-define(macro_simple4, [?macro_simple3,?MODULE,?MACRO_SIMPLE2]).
+-define(macro_simple5, (process_info)).
+-define(macro_string, "hello world").
+-define(macro_argument1(X), (X + 3)).
+-define(macro_argument2(X,Y), (X + 3 * Y)).
+-define(macro_block(X), begin X end).
+-define(macro_if(X1,X2), if X1 -> X2; true -> none end).
+
+
+-ifdef(macro_def1).
+-define(macro_cond1, yep).
+-else.
+-define(macro_cond1, nope).
+-endif.
+-ifndef(macro_def2).
+-define(macro_cond2, nope).
+-else.
+-define(macro_cond2, yep).
+-endif.
+-undef(macro_def1).
+-undef(macro_def2).
+
+%% basic test
+foo1() ->
+ ok.
+
+%% macro test
+foo2(A,B) ->
+ % string combining ?
+ [?macro_string, ?macro_string
+ ?macro_string,
+ "hello world "
+ "more hello",
+ [?macro_simple1,
+ ?MACRO_SIMPLE2,
+ ?macro_simple3,
+ ?macro_simple4,
+ ?macro_simple5,
+ ?macro_string,
+ ?macro_cond1,
+ ?macro_cond2,
+ ?macro_block(A),
+ ?macro_if(A,B),
+ ?macro_argument1(A),
+ ?macro_argument1(begin A end),
+ ?macro_block(<<"hello">>),
+ ?macro_block("hello"),
+ ?macro_block([$h,$e,$l,$l,$0]),
+ ?macro_argument1(id(<<"hello">>)),
+ ?macro_argument1(if A -> B; true -> 3.14 end),
+ ?macro_argument1(case A of ok -> B; C -> C end),
+ ?macro_argument1(receive M -> M after 100 -> 3 end),
+ ?macro_argument1(try foo5(A) catch C:?macro_simple5 -> {C,B} end),
+ ?macro_argument2(A,B)],
+ A,B,ok].
+
+id(I) -> I.
+%% basic terms
+
+foo3() ->
+ [atom,
+ 'some other atom',
+ {tuple,1,2,3},
+ 1,2,3,3333,
+ 3,3333,2,1,
+ [$a,$b,$c],
+ "hello world",
+ <<"hello world">>,
+ <<1,2,3,4,5:6>>,
+ 3.1415,
+ 1.03e33].
+
+%% application and records
+
+foo4(A,B,#state{c = C}=S) ->
+ Ls = foo3(),
+ S1 = #state{ a = 1, b = 2 },
+ [foo2(A,Ls),B,C,
+ B(3,C),
+ erlang:process_info(self()),
+ erlang:?macro_simple5(self()),
+ A:?MACRO_SIMPLE2(),
+ A:?macro_simple1(),
+ A:process_info(self()),
+ A:B(3),
+ S#state{ a = 2, b = B, d = S1 }].
+
+foo5(A) ->
+ try foo2(A,A) of
+ R -> R
+ catch
+ error:?macro_simple5 ->
+ nope
+ end.
diff --git a/lib/syntax_tools/vsn.mk b/lib/syntax_tools/vsn.mk
index 26153a55f1..1c42ef0ddb 100644
--- a/lib/syntax_tools/vsn.mk
+++ b/lib/syntax_tools/vsn.mk
@@ -1 +1 @@
-SYNTAX_TOOLS_VSN = 1.6.13
+SYNTAX_TOOLS_VSN = 1.6.18
diff --git a/lib/test_server/doc/src/basics_chapter.xml b/lib/test_server/doc/src/basics_chapter.xml
index 2e60d412e9..eba24615cb 100644
--- a/lib/test_server/doc/src/basics_chapter.xml
+++ b/lib/test_server/doc/src/basics_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/test_server/doc/src/book.xml b/lib/test_server/doc/src/book.xml
index 960ce48cf7..006a2f167d 100644
--- a/lib/test_server/doc/src/book.xml
+++ b/lib/test_server/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/example_chapter.xml b/lib/test_server/doc/src/example_chapter.xml
index 8a06526528..0ebc85da09 100644
--- a/lib/test_server/doc/src/example_chapter.xml
+++ b/lib/test_server/doc/src/example_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/fascicules.xml b/lib/test_server/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/test_server/doc/src/fascicules.xml
+++ b/lib/test_server/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/test_server/doc/src/notes.xml b/lib/test_server/doc/src/notes.xml
index d68943089e..e996d2b4a3 100644
--- a/lib/test_server/doc/src/notes.xml
+++ b/lib/test_server/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -32,6 +32,195 @@
<file>notes.xml</file>
</header>
+<section><title>Test_Server 3.8.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ If the last expression in a test case causes a timetrap
+ timeout, the stack trace is ignored and not printed to
+ the test case log file. This happens because the
+ {Suite,TestCase,Line} info is not available in the stack
+ trace in this scenario, due to tail call elimination.
+ Common Test has been modified to handle this situation by
+ inserting a {Suite,TestCase,last_expr} tuple in the
+ correct place and printing the stack trace as expected.</p>
+ <p>
+ Own Id: OTP-12697 Aux Id: seq12848 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Test_Server 3.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When installing test suites in a cross compilation
+ environment, ts_install was not able to read the values
+ of the environment variables specified in the
+ configuration file. This has been fixed.</p>
+ <p>
+ Own Id: OTP-11441</p>
+ </item>
+ <item>
+ <p>
+ Printouts by means of ct:log/2/3 or ct:pal/2/3 from the
+ hook functions on_tc_fail/2 and on_tc_skip/2 would (quite
+ unexpectedly) end up in the "unexpected i/o" log file
+ instead of in the test case log file. This behaviour has
+ been changed so that now, all printouts (including stdio
+ printouts) from these hook functions will be routed to
+ the test case log file.</p>
+ <p>
+ Own Id: OTP-12468</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The format of the information printed on top of the test
+ case (and configuration function) log file has been
+ slightly modified, mainly in order to make the start
+ configuration data easier to read and interpret.</p>
+ <p>
+ Own Id: OTP-12518 Aux Id: seq12808 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Test_Server 3.7.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The source code to html code generator in Test Server
+ (and Common Test) would fail to generate anchors in the
+ html code for functions with non-expandable macros,
+ resulting in bad html links to such functions. This
+ correction lets the code generator ignore macros that
+ can't be expanded (i.e. not pre-process them), so that
+ correct anchors will always be produced.</p>
+ <p>
+ Own Id: OTP-11766 Aux Id: seq12556 </p>
+ </item>
+ <item>
+ <p>
+ Make sure to install .hrl files when needed</p>
+ <p>
+ Own Id: OTP-12197</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Test_Server 3.7.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The mechanism for running code cover analysis with
+ common_test has been improved. Earlier, if a test run
+ consisted of multiple tests, cover would be started and
+ stopped for each test. This would give "intermediate"
+ cover logs available from the "Coverage log" link on the
+ test suite result pages. To accumulate cover data over
+ all tests, the 'export' option had to be used in the
+ cover spec file. This was not well documented, and the
+ functionality was quite confusing.</p>
+ <p>
+ Using the 'nodes' option in the cover spec file would
+ fail when the test run consisted of multiple tests, since
+ the specified nodes would only be included in the cover
+ analysis of the first test.</p>
+ <p>
+ The repeated compilation and analysis of the same modules
+ was also very time consuming.</p>
+ <p>
+ To overcome these problems, ct will now only cover
+ compile and analyze modules once per test run, i.e. once
+ for each cover spec file. The log file is available via a
+ new button on the top level index page. The old "Coverage
+ log" links on the test suite result pages still exist,
+ but they all point to the same log containing the
+ accumulated result.</p>
+ <p>
+ Own Id: OTP-11971</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Test_Server 3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Test_Server 3.6.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/test_server/doc/src/notes_history.xml b/lib/test_server/doc/src/notes_history.xml
index 0392bd74a2..898717cbf0 100644
--- a/lib/test_server/doc/src/notes_history.xml
+++ b/lib/test_server/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/part.xml b/lib/test_server/doc/src/part.xml
index a20835e035..43693ff9cb 100644
--- a/lib/test_server/doc/src/part.xml
+++ b/lib/test_server/doc/src/part.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/test_server/doc/src/part_notes.xml b/lib/test_server/doc/src/part_notes.xml
index abf949dfda..e0656942cd 100644
--- a/lib/test_server/doc/src/part_notes.xml
+++ b/lib/test_server/doc/src/part_notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/test_server/doc/src/part_notes_history.xml b/lib/test_server/doc/src/part_notes_history.xml
index 4746f583b9..d3ff49830f 100644
--- a/lib/test_server/doc/src/part_notes_history.xml
+++ b/lib/test_server/doc/src/part_notes_history.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
diff --git a/lib/test_server/doc/src/ref_man.xml b/lib/test_server/doc/src/ref_man.xml
index ca0b38e0c8..cc0e7eaf5c 100644
--- a/lib/test_server/doc/src/ref_man.xml
+++ b/lib/test_server/doc/src/ref_man.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/lib/test_server/doc/src/run_test_chapter.xml b/lib/test_server/doc/src/run_test_chapter.xml
index 36bd41da1f..35344255d4 100644
--- a/lib/test_server/doc/src/run_test_chapter.xml
+++ b/lib/test_server/doc/src/run_test_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/test_server.xml b/lib/test_server/doc/src/test_server.xml
index 5ef43dd628..ed5569e1fe 100644
--- a/lib/test_server/doc/src/test_server.xml
+++ b/lib/test_server/doc/src/test_server.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -625,6 +625,31 @@ Only valid for peer nodes. Note that slave nodes always
</desc>
</func>
<func>
+ <name>appup_test(App) -> ok | test_server:fail()</name>
+ <fsummary>Checks an applications .appup file for obvious errors</fsummary>
+ <type>
+ <v>App = term()</v>
+ <d>The name of the application to test</d>
+ </type>
+ <desc>
+ <p>Checks an applications .appup file for obvious errors.
+ The following is checked:
+ </p>
+ <list type="bulleted">
+ <item>syntax
+ </item>
+ <item>that .app file version and .appup file version match
+ </item>
+ <item>for non-library applications: validity of high-level upgrade
+ instructions, specifying no instructions is explicitly allowed
+ (in this case the application is not upgradeable)</item>
+ <item>for library applications: that there is exactly one wildcard
+ regexp clause restarting the application when upgrading or
+ downgrading from any version</item>
+ </list>
+ </desc>
+ </func>
+ <func>
<name>comment(Comment) -> ok</name>
<fsummary>Print a comment on the HTML result page</fsummary>
<type>
diff --git a/lib/test_server/doc/src/test_server_app.xml b/lib/test_server/doc/src/test_server_app.xml
index ea4b5ffecf..e5481495a2 100644
--- a/lib/test_server/doc/src/test_server_app.xml
+++ b/lib/test_server/doc/src/test_server_app.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
diff --git a/lib/test_server/doc/src/test_server_ctrl.xml b/lib/test_server/doc/src/test_server_ctrl.xml
index 9252cdce4f..0cda531716 100644
--- a/lib/test_server/doc/src/test_server_ctrl.xml
+++ b/lib/test_server/doc/src/test_server_ctrl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -773,11 +773,14 @@ test_server_ctrl:cross_cover_analyse(Level,[{s1,S1LogDir},{s2,S2LogDir}])
<p><c>What = tests_start, Data = {Name,NumCases}</c><br></br>
<c>What = loginfo, Data = [{topdir,TestRootDir},{rundir,CurrLogDir}]</c><br></br>
<c>What = tests_done, Data = {Ok,Failed,{UserSkipped,AutoSkipped}}</c><br></br>
- <c>What = tc_start, Data = {{Mod,Func},TCLogFile}</c><br></br>
- <c>What = tc_done, Data = {Mod,Func,Result}</c><br></br>
- <c>What = tc_user_skip, Data = {Mod,Func,Comment}</c><br></br>
- <c>What = tc_auto_skip, Data = {Mod,Func,Comment}</c><br></br>
+ <c>What = tc_start, Data = {{Mod,{Func,GroupName}},TCLogFile}</c><br></br>
+ <c>What = tc_done, Data = {Mod,{Func,GroupName},Result}</c><br></br>
+ <c>What = tc_user_skip, Data = {Mod,{Func,GroupName},Comment}</c><br></br>
+ <c>What = tc_auto_skip, Data = {Mod,{Func,GroupName},Comment}</c><br></br>
<c>What = framework_error, Data = {{FWMod,FWFunc},Error}</c></p>
+ <p>Note that for a test case function that doesn't belong to a group,
+ <c>GroupName</c> has value <c>undefined</c>, otherwise the name of the test
+ case group.</p>
</desc>
</func>
<func>
diff --git a/lib/test_server/doc/src/test_spec_chapter.xml b/lib/test_server/doc/src/test_spec_chapter.xml
index c197e03bed..342f772f0b 100644
--- a/lib/test_server/doc/src/test_spec_chapter.xml
+++ b/lib/test_server/doc/src/test_spec_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/test_server/doc/src/ts.xml b/lib/test_server/doc/src/ts.xml
index 82ba3a5017..bd5a3cbaa3 100644
--- a/lib/test_server/doc/src/ts.xml
+++ b/lib/test_server/doc/src/ts.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2007</year>
- <year>2012</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/why_test_chapter.xml b/lib/test_server/doc/src/why_test_chapter.xml
index 745d4218f1..9b0ffc6f12 100644
--- a/lib/test_server/doc/src/why_test_chapter.xml
+++ b/lib/test_server/doc/src/why_test_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/test_server/doc/src/write_framework_chapter.xml b/lib/test_server/doc/src/write_framework_chapter.xml
index 5c1c657d9e..3a6fda9610 100644
--- a/lib/test_server/doc/src/write_framework_chapter.xml
+++ b/lib/test_server/doc/src/write_framework_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/test_server/doc/src/write_test_chapter.xml b/lib/test_server/doc/src/write_test_chapter.xml
index 086ed2a18d..ce7f76549d 100644
--- a/lib/test_server/doc/src/write_test_chapter.xml
+++ b/lib/test_server/doc/src/write_test_chapter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
index ab4dd4d95d..35bbad3c22 100644
--- a/lib/test_server/src/Makefile
+++ b/lib/test_server/src/Makefile
@@ -124,7 +124,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/test_server/src/config.guess b/lib/test_server/src/config.guess
deleted file mode 100755
index f475ceb413..0000000000
--- a/lib/test_server/src/config.guess
+++ /dev/null
@@ -1,1534 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-#
-# Please send patches with a ChangeLog entry to [email protected].
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# ([email protected] 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # [email protected] (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <[email protected]>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <[email protected]> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/lib/test_server/src/config.sub b/lib/test_server/src/config.sub
deleted file mode 100755
index bb6edbdb47..0000000000
--- a/lib/test_server/src/config.sub
+++ /dev/null
@@ -1,1789 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches with a ChangeLog entry to [email protected].
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
- ;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- xscaleeb)
- basic_machine=armeb-unknown
- ;;
-
- xscaleel)
- basic_machine=armel-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i386-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- hexagon-*)
- os=-elf
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
-
diff --git a/lib/test_server/src/configure.in b/lib/test_server/src/configure.in
index 3815027721..8398825d95 100644
--- a/lib/test_server/src/configure.in
+++ b/lib/test_server/src/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script for Erlang.
dnl
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 1997-2013. All Rights Reserved.
+dnl Copyright Ericsson AB 1997-2014. All Rights Reserved.
dnl
dnl The contents of this file are subject to the Erlang Public License,
dnl Version 1.1, (the "License"); you may not use this file except in
@@ -38,6 +38,35 @@ AC_ARG_ENABLE(debug-mode,
*) CFLAGS=$DEBUG_FLAGS ;;
esac ], )
+AC_ARG_ENABLE(m64-build,
+AS_HELP_STRING([--enable-m64-build],
+ [build 64-bit binaries using the -m64 flag to (g)cc]),
+[ case "$enableval" in
+ no) enable_m64_build=no ;;
+ *) enable_m64_build=yes ;;
+ esac
+],enable_m64_build=no)
+
+AC_ARG_ENABLE(m32-build,
+AS_HELP_STRING([--enable-m32-build],
+ [build 32-bit binaries using the -m32 flag to (g)cc]),
+[ case "$enableval" in
+ no) enable_m32_build=no ;;
+ *) enable_m32_build=yes ;;
+ esac
+],enable_m32_build=no)
+
+no_mXX_LDFLAGS="$LDFLAGS"
+
+if test X${enable_m64_build} = Xyes; then
+ CFLAGS="-m64 $CFLAGS"
+ LDFLAGS="-m64 $LDFLAGS"
+fi
+if test X${enable_m32_build} = Xyes; then
+ CFLAGS="-m32 $CFLAGS"
+ LDFLAGS="-m32 $LDFLAGS"
+fi
+
AC_CHECK_LIB(m, sin)
#--------------------------------------------------------------------
@@ -132,21 +161,56 @@ case $system in
AC_CHECK_HEADER(dld.h, [
SHLIB_LD="ld"
SHLIB_LDFLAGS="-shared"])
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
fi
SHLIB_EXTRACT_ALL=""
;;
- *-netbsd*|*-freebsd*|*-openbsd*|*-dragonfly*)
+ *-openbsd*)
+ # Not available on all versions: check for include file.
+ AC_CHECK_HEADER(dlfcn.h, [
+ SHLIB_CFLAGS="-fpic"
+ SHLIB_LD="${CC}"
+ SHLIB_LDFLAGS="$LDFLAGS -shared"
+ SHLIB_SUFFIX=".so"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
+ ], [
+ # No dynamic loading.
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld"
+ SHLIB_LDFLAGS=""
+ SHLIB_SUFFIX=""
+ AC_MSG_ERROR(don't know how to compile and link dynamic drivers)
+ ])
+ SHLIB_EXTRACT_ALL=""
+ ;;
+ *-netbsd*|*-freebsd*|*-dragonfly*)
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
SHLIB_CFLAGS="-fpic"
SHLIB_LD="ld"
SHLIB_LDFLAGS="$LDFLAGS -Bshareable -x"
SHLIB_SUFFIX=".so"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
], [
# No dynamic loading.
SHLIB_CFLAGS=""
SHLIB_LD="ld"
- SHLIB_LDFLAGS="$LDFLAGS"
+ SHLIB_LDFLAGS=""
SHLIB_SUFFIX=""
AC_MSG_ERROR(don't know how to compile and link dynamic drivers)
])
@@ -155,7 +219,13 @@ case $system in
*-solaris2*|*-sysv4*)
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld"
- SHLIB_LDFLAGS="$LDFLAGS -G -z text"
+ SHLIB_LDFLAGS="$no_mXX_LDFLAGS -G -z text"
+ if test X${enable_m64_build} = Xyes; then
+ SHLIB_LDFLAGS="-64 $SHLIB_LDFLAGS"
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
SHLIB_SUFFIX=".so"
SHLIB_EXTRACT_ALL="-z allextract"
;;
@@ -170,6 +240,12 @@ case $system in
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld"
SHLIB_LDFLAGS="$LDFLAGS -shared"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
SHLIB_SUFFIX=".so"
SHLIB_EXTRACT_ALL=""
;;
@@ -281,7 +357,23 @@ AC_CHECK_FUNCS(usleep)
# First check if the library is available, then if we can choose between
# two versions of gethostbyname
AC_HAVE_LIBRARY(resolv)
-AC_CHECK_LIB(resolv, res_gethostbyname,[DEFS="$DEFS -DHAVE_RES_GETHOSTBYNAME=1"])
+AC_CHECK_LIB(resolv, res_gethostbyname,[AC_DEFINE(HAVE_RES_GETHOSTBYNAME,1)])
+
+#--------------------------------------------------------------------
+# Check for isfinite
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING([for isfinite])
+AC_TRY_LINK([#include <math.h>],
+ [isfinite(0);], have_isfinite=yes, have_isfinite=no)
+
+if test $have_isfinite = yes; then
+ AC_DEFINE(HAVE_ISFINITE,1)
+ AC_MSG_RESULT(yes)
+else
+ AC_DEFINE(HAVE_FINITE,1)
+ AC_MSG_RESULT(no)
+fi
#--------------------------------------------------------------------
# Emulator compatible flags (for drivers)
diff --git a/lib/test_server/src/erl2html2.erl b/lib/test_server/src/erl2html2.erl
index d0f40c47a7..50dbbb82ee 100644
--- a/lib/test_server/src/erl2html2.erl
+++ b/lib/test_server/src/erl2html2.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -23,11 +22,11 @@
%%%------------------------------------------------------------------
-module(erl2html2).
--export([convert/2, convert/3]).
+-export([convert/3, convert/4]).
-convert([], _Dest) -> % Fake clause.
+convert([], _Dest, _InclPath) -> % Fake clause.
ok;
-convert(File, Dest) ->
+convert(File, Dest, InclPath) ->
%% The generated code uses the BGCOLOR attribute in the
%% BODY tag, which wasn't valid until HTML 3.2. Also,
%% good HTML should either override all colour attributes
@@ -49,12 +48,12 @@ convert(File, Dest) ->
"</head>\n\n"
"<body bgcolor=\"white\" text=\"black\""
" link=\"blue\" vlink=\"purple\" alink=\"red\">\n"],
- convert(File, Dest, Header).
+ convert(File, Dest, InclPath, Header).
-convert(File, Dest, Header) ->
+convert(File, Dest, InclPath, Header) ->
%% statistics(runtime),
- case parse_file(File) of
+ case parse_file(File, InclPath) of
{ok,Functions} ->
%% {_, Time1} = statistics(runtime),
%% io:format("Parsed file in ~.2f Seconds.~n",[Time1/1000]),
@@ -89,55 +88,124 @@ convert(File, Dest, Header) ->
%%%
%%% All function clauses are also marked in order to allow
%%% possibly_enhance/2 to write these in bold.
-parse_file(File) ->
- case epp:open(File, [], []) of
+%%%
+%%% Use expanded preprocessor directives if possible (epp). Only if
+%%% this fails, fall back on using non-expanded code (epp_dodger).
+
+parse_file(File, InclPath) ->
+ case epp:open(File, InclPath, []) of
{ok,Epp} ->
- Forms = parse_file(Epp,File,false),
- epp:close(Epp),
- {ok,Forms};
- {error,E} ->
- {error,E}
+ try parse_preprocessed_file(Epp,File,false) of
+ Forms ->
+ epp:close(Epp),
+ {ok,Forms}
+ catch
+ _:{error,_Reason,true} ->
+ parse_non_preprocessed_file(File);
+ _:{error,_Reason,false} ->
+ {ok,[]}
+ end;
+ Error = {error,_} ->
+ Error
end.
-
-parse_file(Epp,File,InCorrectFile) ->
+parse_preprocessed_file(Epp,File,InCorrectFile) ->
case epp:parse_erl_form(Epp) of
{ok,Form} ->
case Form of
{attribute,_,file,{File,_}} ->
- parse_file(Epp,File,true);
+ parse_preprocessed_file(Epp,File,true);
{attribute,_,file,{_OtherFile,_}} ->
- parse_file(Epp,File,false);
- {function,L,F,A,[_|C]} when InCorrectFile ->
- Clauses = [{clause,CL} || {clause,CL,_,_,_} <- C],
- [{atom_to_list(F),A,L} | Clauses] ++
- parse_file(Epp,File,true);
+ parse_preprocessed_file(Epp,File,false);
+ {function,L,F,A,Cs} when InCorrectFile ->
+ {CLs,LastCL} = find_clause_lines(Cs, []),
+ %% tl(CLs) cause we know the start line already
+ [{atom_to_list(F),A,L,LastCL} | tl(CLs)] ++
+ parse_preprocessed_file(Epp,File,true);
_ ->
- parse_file(Epp,File,InCorrectFile)
+ parse_preprocessed_file(Epp,File,InCorrectFile)
end;
- {error,_E} ->
- parse_file(Epp,File,InCorrectFile);
+ {error,Reason={_L,epp,{undefined,_Macro,none}}} ->
+ throw({error,Reason,InCorrectFile});
+ {error,_Reason} ->
+ parse_preprocessed_file(Epp,File,InCorrectFile);
{eof,_Location} ->
[]
end.
+parse_non_preprocessed_file(File) ->
+ case file:open(File, []) of
+ {ok,Epp} ->
+ Forms = parse_non_preprocessed_file(Epp, File, 1),
+ file:close(Epp),
+ {ok,Forms};
+ Error = {error,_E} ->
+ Error
+ end.
+
+parse_non_preprocessed_file(Epp, File, Location) ->
+ case epp_dodger:parse_form(Epp, Location) of
+ {ok,Tree,Location1} ->
+ try erl_syntax:revert(Tree) of
+ {function,L,F,A,Cs} ->
+ {CLs,LastCL} = find_clause_lines(Cs, []),
+ %% tl(CLs) cause we know the start line already
+ [{atom_to_list(F),A,L,LastCL} | tl(CLs)] ++
+ parse_non_preprocessed_file(Epp, File, Location1);
+ _ ->
+ parse_non_preprocessed_file(Epp, File, Location1)
+ catch
+ _:_ -> parse_non_preprocessed_file(Epp, File, Location1)
+ end;
+ {error,_E,Location1} ->
+ parse_non_preprocessed_file(Epp, File, Location1);
+ {eof,_Location} ->
+ []
+ end.
+
+%%%-----------------------------------------------------------------
+%%% Find the line number of the last expression in the function
+find_clause_lines([{clause,CL,_Params,_Op,Exprs}], CLs) -> % last clause
+ try tuple_to_list(lists:last(Exprs)) of
+ [_Type,ExprLine | _] ->
+ {lists:reverse([{clause,CL}|CLs]), ExprLine};
+ _ ->
+ {lists:reverse([{clause,CL}|CLs]), CL}
+ catch
+ _:_ ->
+ {lists:reverse([{clause,CL}|CLs]), CL}
+ end;
+
+find_clause_lines([{clause,CL,_Params,_Op,_Exprs} | Cs], CLs) ->
+ find_clause_lines(Cs, [{clause,CL}|CLs]).
+
%%%-----------------------------------------------------------------
%%% Add a link target for each line and one for each function definition.
-build_html(SFd,DFd,Encoding,Functions) ->
- build_html(SFd,DFd,Encoding,file:read_line(SFd),1,Functions,false).
+build_html(SFd,DFd,Encoding,FuncsAndCs) ->
+ build_html(SFd,DFd,Encoding,file:read_line(SFd),1,FuncsAndCs,
+ false,undefined).
-build_html(SFd,DFd,Encoding,{ok,Str},L,[{F,A,L}|Functions],_IsFuncDef) ->
+%% function start line found
+build_html(SFd,DFd,Enc,{ok,Str},L0,[{F,A,L0,LastL}|FuncsAndCs],
+ _IsFuncDef,_FAndLastL) ->
FALink = test_server_ctrl:uri_encode(F++"-"++integer_to_list(A),utf8),
- file:write(DFd,["<a name=\"",to_raw_list(FALink,Encoding),"\"/>"]),
- build_html(SFd,DFd,Encoding,{ok,Str},L,Functions,true);
-build_html(SFd,DFd,Encoding,{ok,Str},L,[{clause,L}|Functions],_IsFuncDef) ->
- build_html(SFd,DFd,Encoding,{ok,Str},L,Functions,true);
-build_html(SFd,DFd,Encoding,{ok,Str},L,Functions,IsFuncDef) ->
+ file:write(DFd,["<a name=\"",to_raw_list(FALink,Enc),"\"/>"]),
+ build_html(SFd,DFd,Enc,{ok,Str},L0,FuncsAndCs,true,{F,LastL});
+%% line of last expression in function found
+build_html(SFd,DFd,Enc,{ok,Str},LastL,FuncsAndCs,_IsFuncDef,{F,LastL}) ->
+ LastLineLink = test_server_ctrl:uri_encode(F++"-last_expr",utf8),
+ file:write(DFd,["<a name=\"",
+ to_raw_list(LastLineLink,Enc),"\"/>"]),
+ build_html(SFd,DFd,Enc,{ok,Str},LastL,FuncsAndCs,true,undefined);
+build_html(SFd,DFd,Enc,{ok,Str},L,[{clause,L}|FuncsAndCs],
+ _IsFuncDef,FAndLastL) ->
+ build_html(SFd,DFd,Enc,{ok,Str},L,FuncsAndCs,true,FAndLastL);
+build_html(SFd,DFd,Enc,{ok,Str},L,FuncsAndCs,IsFuncDef,FAndLastL) ->
LStr = line_number(L),
Str1 = line(Str,IsFuncDef),
file:write(DFd,[LStr,Str1]),
- build_html(SFd,DFd,Encoding,file:read_line(SFd),L+1,Functions,false);
-build_html(_SFd,_DFd,_Encoding,eof,L,_Functions,_IsFuncDef) ->
+ build_html(SFd,DFd,Enc,file:read_line(SFd),L+1,FuncsAndCs,false,FAndLastL);
+build_html(_SFd,_DFd,_Enc,eof,L,_FuncsAndCs,_IsFuncDef,_FAndLastL) ->
L.
line_number(L) ->
diff --git a/lib/test_server/src/install-sh b/lib/test_server/src/install-sh
deleted file mode 100755
index a5897de6ea..0000000000
--- a/lib/test_server/src/install-sh
+++ /dev/null
@@ -1,519 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2006-12-25.00
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/lib/test_server/src/test_server.app.src b/lib/test_server/src/test_server.app.src
index 42e78ed279..173f7075db 100644
--- a/lib/test_server/src/test_server.app.src
+++ b/lib/test_server/src/test_server.app.src
@@ -31,5 +31,8 @@
test_server,
test_server_break_process]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","runtime_tools-1.8.14",
+ "observer-2.0","kernel-3.0","inets-5.10",
+ "syntax_tools-1.6.16","erts-6.0"]}]}.
diff --git a/lib/test_server/src/test_server.appup.src b/lib/test_server/src/test_server.appup.src
index 0fbe5f23f7..42c6fe2e46 100644
--- a/lib/test_server/src/test_server.appup.src
+++ b/lib/test_server/src/test_server.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}. \ No newline at end of file
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, test_server}]}],
+ [{<<".*">>,[{restart_application, test_server}]}]
+}.
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 54be6d4c72..1c3352550b 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
%%% TEST_SERVER_CTRL INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-export([run_test_case_apply/1,init_target_info/0,init_purify/0]).
--export([cover_compile/1,cover_analyse/3]).
+-export([cover_compile/1,cover_analyse/2]).
%%% TEST_SERVER_SUP INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-export([get_loc/1,set_tc_state/1]).
@@ -40,7 +40,7 @@
-export([call_crash/3,call_crash/4,call_crash/5]).
-export([temp_name/1]).
-export([start_node/3, stop_node/1, wait_for_node/1, is_release_available/1]).
--export([app_test/1, app_test/2]).
+-export([app_test/1, app_test/2, appup_test/1]).
-export([is_native/1]).
-export([comment/1, make_priv_dir/0]).
-export([os_type/0]).
@@ -80,8 +80,8 @@ init_purify() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% cover_compile({App,Include,Exclude,Cross}) ->
-%% {ok,AnalyseModules} | {error,Reason}
+%% cover_compile(#cover{app=App,incl=Include,excl=Exclude,cross=Cross}) ->
+%% {ok,#cover{mods=AnalyseModules}} | {error,Reason}
%%
%% App = atom() , name of application to be compiled
%% Exclude = [atom()], list of modules to exclude
@@ -90,33 +90,35 @@ init_purify() ->
%% Cross = [atoms()], list of modules outside of App shat should be included
%% in the cover compilation, but that shall not be part of
%% the cover analysis for this application.
+%% AnalyseModules = [atom()], list of successfully compiled modules
%%
-%% Cover compile the given application. Return {ok,AnalyseMods} if application
-%% is found, else {error,application_not_found}.
+%% Cover compile the given application. Return {ok,CoverInfo} if
+%% compilation succeeds, else (if application is not found and there
+%% are no modules to compile) {error,application_not_found}.
-cover_compile({none,_Exclude,Include,Cross}) ->
+cover_compile(CoverInfo=#cover{app=none,incl=Include,cross=Cross}) ->
CrossMods = lists:flatmap(fun({_,M}) -> M end,Cross),
CompileMods = Include++CrossMods,
case length(CompileMods) of
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
cover:start(), % start cover server anyway
- {ok,[]};
+ {ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling ~w modules - "
"this may take some time... ",[N]),
do_cover_compile(CompileMods),
io:fwrite("done\n\n",[]),
- {ok,Include}
+ {ok,CoverInfo#cover{mods=Include}}
end;
-cover_compile({App,all,Include,Cross}) ->
+cover_compile(CoverInfo=#cover{app=App,excl=all,incl=Include,cross=Cross}) ->
CrossMods = lists:flatmap(fun({_,M}) -> M end,Cross),
CompileMods = Include++CrossMods,
case length(CompileMods) of
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
cover:start(), % start cover server anyway
- {ok,[]};
+ {ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling '~w' (~w files) - "
"this may take some time... ",[App,N]),
@@ -126,9 +128,10 @@ cover_compile({App,all,Include,Cross}) ->
"~tp\n", [App,CompileMods]),
do_cover_compile(CompileMods),
io:fwrite("done\n\n",[]),
- {ok,Include}
+ {ok,CoverInfo#cover{mods=Include}}
end;
-cover_compile({App,Exclude,Include,Cross}) ->
+cover_compile(CoverInfo=#cover{app=App,excl=Exclude,
+ incl=Include,cross=Cross}) ->
CrossMods = lists:flatmap(fun({_,M}) -> M end,Cross),
case code:lib_dir(App) of
{error,bad_name} ->
@@ -146,7 +149,7 @@ cover_compile({App,Exclude,Include,Cross}) ->
"~tp\n", [App,Include]),
do_cover_compile(CompileMods),
io:fwrite("done\n\n",[]),
- {ok,Include}
+ {ok,CoverInfo#cover{mods=Include}}
end;
LibDir ->
EbinDir = filename:join([LibDir,"ebin"]),
@@ -158,13 +161,13 @@ cover_compile({App,Exclude,Include,Cross}) ->
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
cover:start(), % start cover server anyway
- {ok,[]};
+ {ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling '~w' (~w files) - "
"this may take some time... ",[App,N]),
do_cover_compile(CompileMods),
io:fwrite("done\n\n",[]),
- {ok,AnalyseMods}
+ {ok,CoverInfo#cover{mods=AnalyseMods}}
end
end.
@@ -174,11 +177,11 @@ module_names(Beams) ->
do_cover_compile(Modules) ->
- do_cover_compile1(lists:usort(Modules)). % remove duplicates
+ cover:start(),
+ pmap1(fun(M) -> do_cover_compile1(M) end,lists:usort(Modules)),
+ ok.
-do_cover_compile1([Dont|Rest]) when Dont=:=cover ->
- do_cover_compile1(Rest);
-do_cover_compile1([M|Rest]) ->
+do_cover_compile1(M) ->
case {code:is_sticky(M),code:is_loaded(M)} of
{true,_} ->
code:unstick_mod(M),
@@ -189,15 +192,13 @@ do_cover_compile1([M|Rest]) ->
io:fwrite("\nWARNING: Could not cover compile ~w: ~p\n",
[M,Error])
end,
- code:stick_mod(M),
- do_cover_compile1(Rest);
+ code:stick_mod(M);
{false,false} ->
case code:load_file(M) of
{module,_} ->
- do_cover_compile1([M|Rest]);
+ do_cover_compile1(M);
Error ->
- io:fwrite("\nWARNING: Could not load ~w: ~p\n",[M,Error]),
- do_cover_compile1(Rest)
+ io:fwrite("\nWARNING: Could not load ~w: ~p\n",[M,Error])
end;
{false,_} ->
case cover:compile_beam(M) of
@@ -206,23 +207,52 @@ do_cover_compile1([M|Rest]) ->
Error ->
io:fwrite("\nWARNING: Could not cover compile ~w: ~p\n",
[M,Error])
- end,
- do_cover_compile1(Rest)
- end;
-do_cover_compile1([]) ->
- ok.
+ end
+ end.
+
+pmap1(Fun,List) ->
+ NTot = length(List),
+ NProcs = erlang:system_info(schedulers) * 2,
+ NPerProc = (NTot div NProcs) + 1,
+
+ {[],Pids} =
+ lists:foldr(
+ fun(_,{L,Ps}) ->
+ {L1,L2} = if length(L)>=NPerProc -> lists:split(NPerProc,L);
+ true -> {L,[]} % last chunk
+ end,
+ {P,_Ref} =
+ spawn_monitor(fun() ->
+ exit(lists:map(Fun,L1))
+ end),
+ {L2,[P|Ps]}
+ end,
+ {List,[]},
+ lists:seq(1,NProcs)),
+ collect(Pids,[]).
+
+collect([],Acc) ->
+ lists:append(Acc);
+collect([Pid|Pids],Acc) ->
+ receive
+ {'DOWN', _Ref, process, Pid, Result} ->
+ %% collect(lists:delete(Pid,Pids),[Result|Acc])
+ collect(Pids,[Result|Acc])
+ end.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% cover_analyse(Analyse,Modules,Stop) -> [{M,{Cov,NotCov,Details}}]
+%% cover_analyse(Dir,#cover{level=Analyse,mods=Modules,stop=Stop) ->
+%% [{M,{Cov,NotCov,Details}}]
%%
-%% Analyse = {details,Dir} | details | {overview,void()} | overview
+%% Dir = string()
+%% Analyse = details | overview
%% Modules = [atom()], the modules to analyse
%%
-%% Cover analysis. If Analyse=={details,Dir} analyse_to_file is used.
+%% Cover analysis. If Analyse==details analyse_to_file is used.
%%
-%% If Analyse=={overview,Dir} analyse_to_file is not used, only an
-%% overview containing the number of covered/not covered lines in each
-%% module.
+%% If Analyse==overview analyse_to_file is not used, only an overview
+%% containing the number of covered/not covered lines in each module.
%%
%% Also, cover data will be exported to a file called all.coverdata in
%% the given directory.
@@ -237,11 +267,11 @@ do_cover_compile1([]) ->
%% which means that the modules will stay cover compiled. Note that
%% this is only recommended if the erlang node is being terminated
%% after the test is completed.
-cover_analyse(Analyse,Modules,Stop) ->
- print(stdout, "Cover analysing...\n", []),
+cover_analyse(Dir,#cover{level=Analyse,mods=Modules,stop=Stop}) ->
+ io:fwrite(user, "Cover analysing... ", []),
DetailsFun =
case Analyse of
- {details,Dir} ->
+ details ->
case cover:export(filename:join(Dir,"all.coverdata")) of
ok ->
fun(M) ->
@@ -258,7 +288,7 @@ cover_analyse(Analyse,Modules,Stop) ->
Error ->
fun(_) -> Error end
end;
- {overview,Dir} ->
+ overview ->
case cover:export(filename:join(Dir,"all.coverdata")) of
ok ->
fun(_) -> undefined end;
@@ -266,17 +296,19 @@ cover_analyse(Analyse,Modules,Stop) ->
fun(_) -> Error end
end
end,
- R = pmap(
+ R = pmap2(
fun(M) ->
case cover:analyse(M,module) of
{ok,{M,{Cov,NotCov}}} ->
{M,{Cov,NotCov,DetailsFun(M)}};
Err ->
- io:fwrite("WARNING: Analysis failed for ~w. Reason: ~p\n",
+ io:fwrite(user,
+ "\nWARNING: Analysis failed for ~w. Reason: ~p\n",
[M,Err]),
{M,Err}
end
end, Modules),
+ io:fwrite(user, "done\n\n", []),
case Stop of
true ->
@@ -288,12 +320,12 @@ cover_analyse(Analyse,Modules,Stop) ->
end,
R.
-pmap(Fun,List) ->
+pmap2(Fun,List) ->
Collector = self(),
Pids = lists:map(fun(E) ->
spawn(fun() ->
- Collector ! {res,self(),Fun(E)}
- end)
+ Collector ! {res,self(),Fun(E)}
+ end)
end, List),
lists:map(fun(Pid) ->
receive
@@ -302,7 +334,6 @@ pmap(Fun,List) ->
end
end, Pids).
-
do_cover_for_node(Node,CoverFunc) ->
do_cover_for_node(Node,CoverFunc,true).
do_cover_for_node(Node,CoverFunc,StickUnstick) ->
@@ -405,6 +436,7 @@ run_test_case_apply({CaseNum,Mod,Func,Args,Name,
ref :: reference(),
pid :: pid(),
mf :: {atom(),atom()},
+ last_known_loc :: term(),
status :: tc_status() | 'undefined',
ret_val :: term(),
comment :: list(char()),
@@ -414,15 +446,6 @@ run_test_case_apply({CaseNum,Mod,Func,Args,Name,
}).
run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) ->
- {ok,Cwd} = file:get_cwd(),
- Args2Print = case Args of
- [Args1] when is_list(Args1) ->
- lists:keydelete(tc_group_result, 1, Args1);
- _ ->
- Args
- end,
- print(minor, "Test case started with:\n~w:~w(~tp)\n", [Mod,Func,Args2Print]),
- print(minor, "Current directory is ~tp\n", [Cwd]),
print_timestamp(minor,"Started at "),
print(minor, "", [], internal_raw),
TCCallback = get(test_server_testcase_callback),
@@ -436,15 +459,16 @@ run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) ->
LogOpts, TCCallback)
end),
put(test_server_detected_fail, []),
- St = #st{ref=Ref,pid=Pid,mf={Mod,Func},status=starting,ret_val=[],
- comment="",timeout=infinity,config=hd(Args)},
+ St = #st{ref=Ref,pid=Pid,mf={Mod,Func},last_known_loc=unknown,
+ status=starting,ret_val=[],comment="",timeout=infinity,
+ config=hd(Args)},
run_test_case_msgloop(St).
%% Ugly bug (pre R5A):
%% If this process (group leader of the test case) terminates before
%% all messages have been replied back to the io server, the io server
%% hangs. Fixed by the 20 milli timeout check here, and by using monitor in
-%% io.erl (livrem OCH hangslen mao :)
+%% io.erl.
%%
%% A test case is known to have failed if it returns {'EXIT', _} tuple,
%% or sends a message {failed, File, Line} to it's group_leader
@@ -537,7 +561,22 @@ run_test_case_msgloop(#st{ref=Ref,pid=Pid,end_conf_pid=EndConfPid0}=St0) ->
St = setup_termination(RetVal, St0#st{config=undefined}),
run_test_case_msgloop(St);
{'EXIT',Pid,Reason} ->
- St = handle_tc_exit(Reason, St0),
+ %% This exit typically happens when an unknown external process
+ %% has caused a test case process to terminate (e.g. if a linked
+ %% process has crashed).
+ St =
+ case Reason of
+ {What,[Loc0={_M,_F,A,[{file,_}|_]}|_]} when
+ is_integer(A) ->
+ Loc = rewrite_loc_item(Loc0),
+ handle_tc_exit(What, St0#st{last_known_loc=[Loc]});
+ {What,[Details,Loc0={_M,_F,A,[{file,_}|_]}|_]} when
+ is_integer(A) ->
+ Loc = rewrite_loc_item(Loc0),
+ handle_tc_exit({What,Details}, St0#st{last_known_loc=[Loc]});
+ _ ->
+ handle_tc_exit(Reason, St0)
+ end,
run_test_case_msgloop(St);
{EndConfPid0,{call_end_conf,Data,_Result}} ->
#st{mf={Mod,Func},config=CurrConf} = St0,
@@ -658,7 +697,7 @@ handle_tc_exit({testcase_aborted,{user_timetrap_error,_}=Msg,_}, St) ->
spawn_fw_call(Mod, Func, Config, Pid, Msg, unknown, self()),
St;
handle_tc_exit(Reason, #st{status={framework,FwMod,FwFunc},
- config=Config,pid=Pid}=St) ->
+ config=Config,pid=Pid}=St) ->
R = case Reason of
{timetrap_timeout,TVal,_} ->
{timetrap,TVal};
@@ -681,7 +720,7 @@ handle_tc_exit(Reason, #st{status=tc,config=Config0,mf={Mod,Func},pid=Pid}=St)
Msg = {E,AbortReason},
{Msg,Loc0,Msg};
Other ->
- {Other,unknown,Other}
+ {{'EXIT',Other},unknown,Other}
end,
Timeout = end_conf_timeout(Reason, St),
Config = [{tc_status,{failed,F}}|Config0],
@@ -695,7 +734,7 @@ handle_tc_exit(Reason, #st{config=Config,mf={Mod,Func0},pid=Pid,
{testcase_aborted=E,AbortReason,Loc0} ->
{{E,AbortReason},Loc0};
Other ->
- {Other,unknown}
+ {{'EXIT',Other},St#st.last_known_loc}
end,
Func = case Status of
init_per_testcase=F -> {F,Func0};
@@ -732,16 +771,16 @@ do_call_end_conf(Starter,Mod,Func,Data,Conf,TVal) ->
EndConfApply =
fun() ->
timetrap(TVal),
- case catch apply(Mod,end_per_testcase,[Func,Conf]) of
- {'EXIT',Why} ->
+ try apply(Mod,end_per_testcase,[Func,Conf]) of
+ _ -> ok
+ catch
+ _:Why ->
timer:sleep(1),
group_leader() ! {printout,12,
"WARNING! "
"~w:end_per_testcase(~w, ~p)"
" crashed!\n\tReason: ~p\n",
- [Mod,Func,Conf,Why]};
- _ ->
- ok
+ [Mod,Func,Conf,Why]}
end,
Supervisor ! {self(),end_conf}
end,
@@ -770,11 +809,11 @@ spawn_fw_call(Mod,{init_per_testcase,Func},CurrConf,Pid,
Skip = {skip,{failed,{Mod,init_per_testcase,Why}}},
%% if init_per_testcase fails, the test case
%% should be skipped
- case catch do_end_tc_call(Mod,Func, {Pid,Skip,[CurrConf]}, Why) of
- {'EXIT',FwEndTCErr} ->
- exit({fw_notify_done,end_tc,FwEndTCErr});
- _ ->
- ok
+ try do_end_tc_call(Mod,Func, {Pid,Skip,[CurrConf]}, Why) of
+ _ -> ok
+ catch
+ _:FwEndTCErr ->
+ exit({fw_notify_done,end_tc,FwEndTCErr})
end,
%% finished, report back
SendTo ! {self(),fw_notify_done,
@@ -802,12 +841,12 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid,
" failed!\n\tReason: timetrap timeout"
" after ~w ms!\n", [Mod,Func,EndConf,TVal]},
FailLoc = proplists:get_value(tc_fail_loc, EndConf),
- case catch do_end_tc_call(Mod,Func,
+ try do_end_tc_call(Mod,Func,
{Pid,Report,[EndConf]}, Why) of
- {'EXIT',FwEndTCErr} ->
- exit({fw_notify_done,end_tc,FwEndTCErr});
- _ ->
- ok
+ _ -> ok
+ catch
+ _:FwEndTCErr ->
+ exit({fw_notify_done,end_tc,FwEndTCErr})
end,
Warn = "<font color=\"red\">"
"WARNING: end_per_testcase timed out!</font>",
@@ -837,23 +876,27 @@ spawn_fw_call(FwMod,FwFunc,_,_Pid,{framework_error,FwError},_,SendTo) ->
spawn_link(FwCall);
spawn_fw_call(Mod,Func,CurrConf,Pid,Error,Loc,SendTo) ->
+ Func1 = case Func of
+ {_InitOrEndPerTC,F} -> F;
+ F -> F
+ end,
FwCall =
fun() ->
- case catch fw_error_notify(Mod,Func,[],
- Error,Loc) of
- {'EXIT',FwErrorNotifyErr} ->
+ try fw_error_notify(Mod,Func1,[],
+ Error,Loc) of
+ _ -> ok
+ catch
+ _:FwErrorNotifyErr ->
exit({fw_notify_done,error_notification,
- FwErrorNotifyErr});
- _ ->
- ok
+ FwErrorNotifyErr})
end,
- Conf = [{tc_status,{failed,timetrap_timeout}}|CurrConf],
- case catch do_end_tc_call(Mod,Func,
- {Pid,Error,[Conf]},Error) of
- {'EXIT',FwEndTCErr} ->
- exit({fw_notify_done,end_tc,FwEndTCErr});
- _ ->
- ok
+ Conf = [{tc_status,{failed,Error}}|CurrConf],
+ try do_end_tc_call(Mod,Func1,
+ {Pid,Error,[Conf]},Error) of
+ _ -> ok
+ catch
+ _:FwEndTCErr ->
+ exit({fw_notify_done,end_tc,FwEndTCErr})
end,
%% finished, report back
SendTo ! {self(),fw_notify_done,{died,Error,Loc,[],undefined}}
@@ -933,12 +976,15 @@ run_test_case_eval(Mod, Func, Args0, Name, Ref, RunInit,
NewResult = do_end_tc_call(Mod,Func, {{error,Reason},[Conf]},
{fail,Reason}),
{{0,NewResult},Where,[]};
- Skip = {skip,_Reason} ->
- NewResult = do_end_tc_call(Mod,Func, {Skip,Args0}, Skip),
+ Skip = {SkipType,_Reason} when SkipType == skip;
+ SkipType == skipped ->
+ NewResult = do_end_tc_call(Mod,Func,
+ {Skip,Args0}, Skip),
{{0,NewResult},Where,[]};
AutoSkip = {auto_skip,_Reason} ->
%% special case where a conf case "pretends" to be skipped
- NewResult = do_end_tc_call(Mod,Func, {AutoSkip,Args0}, AutoSkip),
+ NewResult =
+ do_end_tc_call(Mod,Func, {AutoSkip,Args0}, AutoSkip),
{{0,NewResult},Where,[]}
end,
exit({Ref,Time,Value,Loc,Opts}).
@@ -949,10 +995,12 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) ->
set_tc_state(init_per_testcase, hd(Args)),
ensure_timetrap(Args),
case init_per_testcase(Mod, Func, Args) of
- Skip = {skip,Reason} ->
+ Skip = {SkipType,Reason} when SkipType == skip;
+ SkipType == skipped ->
Line = get_loc(),
Conf = [{tc_status,{skipped,Reason}}|hd(Args)],
- NewRes = do_end_tc_call(Mod,Func, {Skip,[Conf]}, Skip),
+ NewRes = do_end_tc_call(Mod,Func,
+ {Skip,[Conf]}, Skip),
{{0,NewRes},Line,[]};
{skip_and_save,Reason,SaveCfg} ->
Line = get_loc(),
@@ -970,11 +1018,12 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) ->
{{0,NewRes},[{Mod,Func}],[]};
{ok,NewConf} ->
%% call user callback function if defined
- NewConf1 = user_callback(TCCallback, Mod, Func, init, NewConf),
+ NewConf1 =
+ user_callback(TCCallback, Mod, Func, init, NewConf),
%% save current state in controller loop
set_tc_state(tc, NewConf1),
%% execute the test case
- {{T,Return},Loc} = {ts_tc(Mod, Func, [NewConf1]),get_loc()},
+ {{T,Return},Loc} = {ts_tc(Mod,Func,[NewConf1]), get_loc()},
{EndConf,TSReturn,FWReturn} =
case Return of
{E,TCError} when E=='EXIT' ; E==failed ->
@@ -990,30 +1039,39 @@ run_test_case_eval1(Mod, Func, Args, Name, RunInit, TCCallback) ->
{[{tc_status,{skipped,Why}},
{save_config,SaveCfg}|NewConf1],
Skip,Skip};
- {skip,Why} ->
- {[{tc_status,{skipped,Why}}|NewConf1],Return,Return};
+ {SkipType,Why} when SkipType == skip;
+ SkipType == skipped ->
+ {[{tc_status,{skipped,Why}}|NewConf1],Return,
+ Return};
_ ->
{[{tc_status,ok}|NewConf1],Return,ok}
end,
%% call user callback function if defined
- EndConf1 = user_callback(TCCallback, Mod, Func, 'end', EndConf),
+ EndConf1 =
+ user_callback(TCCallback, Mod, Func, 'end', EndConf),
%% update current state in controller loop
{FWReturn1,TSReturn1,EndConf2} =
case end_per_testcase(Mod, Func, EndConf1) of
SaveCfg1={save_config,_} ->
- {FWReturn,TSReturn,[SaveCfg1|lists:keydelete(save_config,1,
- EndConf1)]};
+ {FWReturn,TSReturn,
+ [SaveCfg1|lists:keydelete(save_config,1,
+ EndConf1)]};
{fail,ReasonToFail} ->
%% user has failed the testcase
- fw_error_notify(Mod, Func, EndConf1, ReasonToFail),
- {{error,ReasonToFail},{failed,ReasonToFail},EndConf1};
- {failed,{_,end_per_testcase,_}} = Failure when FWReturn == ok ->
+ fw_error_notify(Mod, Func, EndConf1,
+ ReasonToFail),
+ {{error,ReasonToFail},
+ {failed,ReasonToFail},
+ EndConf1};
+ {failed,{_,end_per_testcase,_}} = Failure when
+ FWReturn == ok ->
%% unexpected termination in end_per_testcase
%% report this as the result to the framework
{Failure,TSReturn,EndConf1};
_ ->
- %% test case result should be reported to framework
- %% no matter the status of end_per_testcase
+ %% test case result should be reported to
+ %% framework no matter the status of
+ %% end_per_testcase
{FWReturn,TSReturn,EndConf1}
end,
%% clear current state in controller loop
@@ -1080,7 +1138,8 @@ process_return_val([Return], M,F,A, Loc, Final) when is_list(Return) ->
ReturnTags = [skip,skip_and_save,save_config,comment,return_group_result],
%% check if all elements in the list are valid end conf return value tuples
case lists:all(fun(Val) when is_tuple(Val) ->
- lists:any(fun(T) -> T == element(1, Val) end, ReturnTags);
+ lists:any(fun(T) -> T == element(1, Val) end,
+ ReturnTags);
(ok) ->
true;
(_) ->
@@ -1114,14 +1173,19 @@ process_return_val1([Failed={E,TCError}|_], M,F,A=[Args], Loc, _, SaveOpts)
NewReturn ->
{NewReturn,SaveOpts}
end;
-process_return_val1([SaveCfg={save_config,_}|Opts], M,F,[Args], Loc, Final, SaveOpts) ->
+process_return_val1([SaveCfg={save_config,_}|Opts], M,F,[Args],
+ Loc, Final, SaveOpts) ->
process_return_val1(Opts, M,F,[[SaveCfg|Args]], Loc, Final, SaveOpts);
-process_return_val1([{skip_and_save,Why,SaveCfg}|Opts], M,F,[Args], Loc, _, SaveOpts) ->
- process_return_val1(Opts, M,F,[[{save_config,SaveCfg}|Args]], Loc, {skip,Why}, SaveOpts);
-process_return_val1([GR={return_group_result,_}|Opts], M,F,A, Loc, Final, SaveOpts) ->
+process_return_val1([{skip_and_save,Why,SaveCfg}|Opts], M,F,[Args],
+ Loc, _, SaveOpts) ->
+ process_return_val1(Opts, M,F,[[{save_config,SaveCfg}|Args]],
+ Loc, {skip,Why}, SaveOpts);
+process_return_val1([GR={return_group_result,_}|Opts], M,F,A,
+ Loc, Final, SaveOpts) ->
process_return_val1(Opts, M,F,A, Loc, Final, [GR|SaveOpts]);
-process_return_val1([RetVal={Tag,_}|Opts], M,F,A, Loc, _, SaveOpts) when Tag==skip;
- Tag==comment ->
+process_return_val1([RetVal={Tag,_}|Opts], M,F,A,
+ Loc, _, SaveOpts) when Tag==skip;
+ Tag==comment ->
process_return_val1(Opts, M,F,A, Loc, RetVal, SaveOpts);
process_return_val1([_|Opts], M,F,A, Loc, Final, SaveOpts) ->
process_return_val1(Opts, M,F,A, Loc, Final, SaveOpts);
@@ -1135,7 +1199,8 @@ process_return_val1([], M,F,A, _Loc, Final, SaveOpts) ->
user_callback(undefined, _, _, _, Args) ->
Args;
-user_callback({CBMod,CBFunc}, Mod, Func, InitOrEnd, [Args]) when is_list(Args) ->
+user_callback({CBMod,CBFunc}, Mod, Func, InitOrEnd,
+ [Args]) when is_list(Args) ->
case catch apply(CBMod, CBFunc, [InitOrEnd,Mod,Func,Args]) of
Args1 when is_list(Args1) ->
[Args1];
@@ -1189,6 +1254,10 @@ do_init_per_testcase(Mod, Args) ->
"a Config list.\n",[]},
{skip,{failed,{Mod,init_per_testcase,bad_return}}}
catch
+ throw:{Skip,Reason} when Skip =:= skip; Skip =:= skipped ->
+ {skip,Reason};
+ exit:{Skip,Reason} when Skip =:= skip; Skip =:= skipped ->
+ {skip,Reason};
throw:Other ->
set_loc(erlang:get_stacktrace()),
Line = get_loc(),
@@ -1286,12 +1355,30 @@ get_loc(Pid) ->
Stk = [rewrite_loc_item(Loc) || Loc <- Stk0],
case get(test_server_loc) of
[{Suite,Case}] ->
- %% location info unknown, check if {Suite,Case,Line}
- %% is available in stacktrace. and if so, use stacktrace
- %% instead of current test_server_loc
+ %% Location info unknown, check if {Suite,Case,Line}
+ %% is available in stacktrace and if so, use stacktrace
+ %% instead of current test_server_loc.
+ %% If location is the last expression in a test case
+ %% function, the info is not available due to tail call
+ %% elimination. We need to check if the test case has been
+ %% called by ts_tc/3 and, if so, insert the test case info
+ %% at that position.
case [match || {S,C,_L} <- Stk, S == Suite, C == Case] of
- [match|_] -> put(test_server_loc, Stk);
- _ -> ok
+ [match|_] ->
+ put(test_server_loc, Stk);
+ _ ->
+ {PreTC,PostTC} =
+ lists:splitwith(fun({test_server,ts_tc,_}) ->
+ false;
+ (_) ->
+ true
+ end, Stk),
+ if PostTC == [] ->
+ ok;
+ true ->
+ put(test_server_loc,
+ PreTC++[{Suite,Case,last_expr} | PostTC])
+ end
end;
_ ->
put(test_server_loc, Stk)
@@ -1318,8 +1405,8 @@ fw_error_notify(Mod, Func, Args, Error, Loc) ->
%% Just like io:format, except that depending on the Detail value, the output
%% is directed to console, major and/or minor log files.
-print(Detail,Format,Args) ->
- test_server_ctrl:print(Detail, Format, Args).
+%% print(Detail,Format,Args) ->
+%% test_server_ctrl:print(Detail, Format, Args).
print(Detail,Format,Args,Printer) ->
test_server_ctrl:print(Detail, Format, Args, Printer).
@@ -1353,12 +1440,19 @@ lookup_config(Key,Config) ->
undefined
end.
-%% timer:tc/3
+%%
+%% IMPORTANT: get_loc/1 uses the name of this function when analysing
+%% stack traces. If the name changes, get_loc/1 must be updated!
+%%
ts_tc(M, F, A) ->
Before = erlang:now(),
Result = try
apply(M, F, A)
catch
+ throw:{skip, Reason} -> {skip, Reason};
+ throw:{skipped, Reason} -> {skip, Reason};
+ exit:{skip, Reason} -> {skip, Reason};
+ exit:{skipped, Reason} -> {skip, Reason};
Type:Reason ->
Stk = erlang:get_stacktrace(),
set_loc(Stk),
@@ -1719,7 +1813,8 @@ timetrap(Timeout0, TimeToReport0, TCPid, MultAndScale = {Multiplier,Scale}) ->
put(test_server_timetraps,[{Handle,TCPid,{TimeToReport,Scale}}]);
List ->
List1 = lists:delete({infinity,TCPid,{infinity,false}}, List),
- put(test_server_timetraps,[{Handle,TCPid,{TimeToReport,Scale}}|List1])
+ put(test_server_timetraps,[{Handle,TCPid,
+ {TimeToReport,Scale}}|List1])
end,
Handle.
@@ -1778,7 +1873,9 @@ time_ms(Ms, _, _) when is_integer(Ms) -> Ms;
time_ms(infinity, _, _) -> infinity;
time_ms(Fun, TCPid, MultAndScale) when is_function(Fun) ->
time_ms_apply(Fun, TCPid, MultAndScale);
-time_ms({M,F,A}=MFA, TCPid, MultAndScale) when is_atom(M), is_atom(F), is_list(A) ->
+time_ms({M,F,A}=MFA, TCPid, MultAndScale) when is_atom(M),
+ is_atom(F),
+ is_list(A) ->
time_ms_apply(MFA, TCPid, MultAndScale);
time_ms(Other, _, _) -> exit({invalid_time_format,Other}).
@@ -2429,8 +2526,11 @@ app_test(App) ->
app_test(App, Mode) ->
test_server_sup:app_test(App, Mode).
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% appup_test/1
+%%
+appup_test(App) ->
+ test_server_sup:appup_test(App).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% is_native(Mod) -> true | false
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index 352e58f91c..68b03a5987 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -52,7 +52,9 @@
-export([reject_io_reqs/1, get_levels/0, set_levels/3]).
-export([multiply_timetraps/1, scale_timetraps/1, get_timetrap_parameters/0]).
-export([create_priv_dir/1]).
--export([cover/2, cover/3, cover/8, cross_cover_analyse/2, trc/1, stop_trace/0]).
+-export([cover/1, cover/2, cover/3,
+ cover_compile/7, cover_analyse/2, cross_cover_analyse/2,
+ trc/1, stop_trace/0]).
-export([testcase_callback/1]).
-export([set_random_seed/1]).
-export([kill_slavenodes/0]).
@@ -409,11 +411,26 @@ cover(App, Analyse) when is_atom(App) ->
cover(CoverFile, Analyse) ->
cover(none, CoverFile, Analyse).
cover(App, CoverFile, Analyse) ->
- controller_call({cover,{App,CoverFile},Analyse,true}).
-cover(App, CoverFile, Exclude, Include, Cross, Export, Analyse, Stop) ->
- controller_call({cover,
- {App,{CoverFile,Exclude,Include,Cross,Export}},
- Analyse,Stop}).
+ {Excl,Incl,Cross} = read_cover_file(CoverFile),
+ CoverInfo = #cover{app=App,
+ file=CoverFile,
+ excl=Excl,
+ incl=Incl,
+ cross=Cross,
+ level=Analyse},
+ controller_call({cover,CoverInfo}).
+
+cover(CoverInfo) ->
+ controller_call({cover,CoverInfo}).
+
+cover_compile(App,File,Excl,Incl,Cross,Analyse,Stop) ->
+ cover_compile(#cover{app=App,
+ file=File,
+ excl=Excl,
+ incl=Incl,
+ cross=Cross,
+ level=Analyse,
+ stop=Stop}).
testcase_callback(ModFunc) ->
controller_call({testcase_callback,ModFunc}).
@@ -487,6 +504,7 @@ init([]) ->
ok
end,
test_server_sup:cleanup_crash_dumps(),
+ test_server_sup:util_start(),
State = #state{jobs=[],finish=false},
TI0 = test_server:init_target_info(),
TargetHost = test_server_sup:hoststr(),
@@ -562,7 +580,7 @@ handle_call({add_job,Dir,Name,TopCase,Skip}, _From, State) ->
ExtraTools =
case State#state.cover of
false -> [];
- {App,Analyse,Stop} -> [{cover,App,Analyse,Stop}]
+ CoverInfo -> [{cover,CoverInfo}]
end,
ExtraTools1 =
case State#state.random_seed of
@@ -815,13 +833,13 @@ handle_call(stop_trace, _From, State) ->
{reply,R,State#state{trc=false}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% handle_call({cover,App,Analyse,Stop}, _, State) -> ok | {error,Reason}
+%% handle_call({cover,CoverInfo}, _, State) -> ok | {error,Reason}
%%
-%% All modules inn application App are cover compiled
-%% Analyse indicates on which level the coverage should be analysed
+%% Set specification of cover analysis to be used when running tests
+%% (see start_extra_tools/1 and stop_extra_tools/1)
-handle_call({cover,App,Analyse,Stop}, _From, State) ->
- {reply,ok,State#state{cover={App,Analyse,Stop}}};
+handle_call({cover,CoverInfo}, _From, State) ->
+ {reply,ok,State#state{cover=CoverInfo}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% handle_call({create_priv_dir,Value}, _, State) -> ok | {error,Reason}
@@ -1055,6 +1073,7 @@ handle_info(_, State) ->
%% test suites (if any) and any possible remainting slave node
terminate(_Reason, State) ->
+ test_server_sup:util_stop(),
case State#state.trc of
false -> ok;
Sock -> test_server_node:stop_tracer_node(Sock)
@@ -1201,11 +1220,10 @@ elapsed_time(Before, After) ->
start_extra_tools(ExtraTools) ->
start_extra_tools(ExtraTools, []).
-start_extra_tools([{cover,App,Analyse,Stop} | ExtraTools], Started) ->
- case cover_compile(App) of
- {ok,AnalyseMods} ->
- start_extra_tools(ExtraTools,
- [{cover,App,Analyse,AnalyseMods,Stop}|Started]);
+start_extra_tools([{cover,CoverInfo} | ExtraTools], Started) ->
+ case start_cover(CoverInfo) of
+ {ok,NewCoverInfo} ->
+ start_extra_tools(ExtraTools,[{cover,NewCoverInfo}|Started]);
{error,_} ->
start_extra_tools(ExtraTools, Started)
end;
@@ -1224,8 +1242,8 @@ stop_extra_tools(ExtraTools) ->
end,
stop_extra_tools(ExtraTools, TestDir).
-stop_extra_tools([{cover,App,Analyse,AnalyseMods,Stop}|ExtraTools], TestDir) ->
- cover_analyse(App, Analyse, AnalyseMods, Stop, TestDir),
+stop_extra_tools([{cover,CoverInfo}|ExtraTools], TestDir) ->
+ stop_cover(CoverInfo,TestDir),
stop_extra_tools(ExtraTools, TestDir);
%%stop_extra_tools([_ | ExtraTools], TestDir) ->
%% stop_extra_tools(ExtraTools, TestDir);
@@ -1405,7 +1423,7 @@ remove_conf([{conf, _Ref, Props, _MF}|Cases], NoConf, Repeats) ->
end;
remove_conf([{make,_Ref,_MF}|Cases], NoConf, Repeats) ->
remove_conf(Cases, NoConf, Repeats);
-remove_conf([{skip_case,{{_M,all},_Cmt}}|Cases], NoConf, Repeats) ->
+remove_conf([{skip_case,{{_M,all},_Cmt},_Mode}|Cases], NoConf, Repeats) ->
remove_conf(Cases, NoConf, Repeats);
remove_conf([{skip_case,{Type,_Ref,_MF,_Cmt}}|Cases],
NoConf, Repeats) when Type==conf;
@@ -1429,7 +1447,7 @@ remove_conf([], NoConf, true) ->
remove_conf([], NoConf, false) ->
lists:reverse(NoConf).
-get_suites([{skip_case,{{Mod,_Func},_Cmt}}|Tests], Mods) when is_atom(Mod) ->
+get_suites([{skip_case,{{Mod,_F},_Cmt},_Mode}|Tests], Mods) when is_atom(Mod) ->
case add_mod(Mod, Mods) of
true -> get_suites(Tests, [Mod|Mods]);
false -> get_suites(Tests, Mods)
@@ -1567,16 +1585,24 @@ do_test_cases(TopCases, SkipCases,
ok
end
end,
-
+ CoverLog =
+ case get(test_server_cover_log_dir) of
+ undefined ->
+ ?coverlog_name;
+ AbsLogDir ->
+ AbsLog = filename:join(AbsLogDir,?coverlog_name),
+ make_relative(AbsLog, TestDir)
+ end,
print(html,
"<p><ul>\n"
"<li><a href=\"~ts\">Full textual log</a></li>\n"
"<li><a href=\"~ts\">Coverage log</a></li>\n"
"<li><a href=\"~ts\">Unexpected I/O log</a></li>\n</ul></p>\n",
- [?suitelog_name,?coverlog_name,?unexpected_io_log]),
+ [?suitelog_name,CoverLog,?unexpected_io_log]),
print(html,
"<p>~ts</p>\n" ++
- xhtml("<table bgcolor=\"white\" border=\"3\" cellpadding=\"5\">",
+ xhtml(["<table bgcolor=\"white\" border=\"3\" cellpadding=\"5\">\n",
+ "<thead>\n"],
["<table id=\"",?sortable_table_name,"\">\n",
"<thead>\n"]) ++
"<tr><th>Num</th><th>Module</th><th>Group</th>" ++
@@ -1725,30 +1751,33 @@ make_html_link(LinkName, Target, Explanation) ->
ok = write_html_file(LinkName, H).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start_minor_log_file(Mod, Func) -> AbsName
+%% start_minor_log_file(Mod, Func, ParallelTC) -> AbsName
%% Mod = atom()
%% Func = atom()
+%% ParallelTC = bool()
%% AbsName = string()
%%
%% Create a minor log file for the test case Mod,Func,Args. The log file
-%% will be stored in the log directory under the name <Mod>.<Func>.log.
-%% Some header info will also be inserted into the log file.
+%% will be stored in the log directory under the name <Mod>.<Func>.html.
+%% Some header info will also be inserted into the log file. If the test
+%% case runs in a parallel group, then to avoid clashing file names if the
+%% case is executed more than once, the name <Mod>.<Func>.<Timestamp>.html
+%% is used.
-start_minor_log_file(Mod, Func) ->
+start_minor_log_file(Mod, Func, ParallelTC) ->
MFA = {Mod,Func,1},
LogDir = get(test_server_log_dir_base),
Name0 = lists:flatten(io_lib:format("~w.~w~ts", [Mod,Func,?html_ext])),
Name = downcase(Name0),
AbsName = filename:join(LogDir, Name),
- case file:read_file_info(AbsName) of
- {error,_} -> %% normal case, unique name
+ case (ParallelTC orelse (element(1,file:read_file_info(AbsName))==ok)) of
+ false -> %% normal case, unique name
start_minor_log_file1(Mod, Func, LogDir, AbsName, MFA);
- {ok,_} -> %% special case, duplicate names
- {_,S,Us} = now(),
+ true -> %% special case, duplicate names
+ Tag = test_server_sup:unique_name(),
Name1_0 =
- lists:flatten(io_lib:format("~w.~w.~w.~w~ts", [Mod,Func,S,
- trunc(Us/1000),
- ?html_ext])),
+ lists:flatten(io_lib:format("~w.~w.~ts~ts", [Mod,Func,Tag,
+ ?html_ext])),
Name1 = downcase(Name1_0),
AbsName1 = filename:join(LogDir, Name1),
start_minor_log_file1(Mod, Func, LogDir, AbsName1, MFA)
@@ -1779,20 +1808,32 @@ start_minor_log_file1(Mod, Func, LogDir, AbsName, MFA) ->
put(test_server_minor_footer, Footer),
io:put_chars(Fd, Header),
+ io:put_chars(Fd, "<a name=\"top\"></a>"),
+ io:put_chars(Fd, "<pre>\n"),
+
SrcListing = downcase(atom_to_list(Mod)) ++ ?src_listing_ext,
+
+ {Info,Arity} =
+ if Func == init_per_suite; Func == end_per_suite ->
+ {"Config function: ", 1};
+ Func == init_per_group; Func == end_per_group ->
+ {"Config function: ", 2};
+ true ->
+ {"Test case: ", 1}
+ end,
+
case {filelib:is_file(filename:join(LogDir, SrcListing)),
lists:member(no_src, get(test_server_logopts))} of
{true,false} ->
- print(Lev, "<a href=\"~ts#~ts\">source code for ~w:~w/1</a>\n",
+ print(Lev, Info ++ "<a href=\"~ts#~ts\">~w:~w/~w</a> "
+ "(click for source code)\n",
[uri_encode(SrcListing),
uri_encode(atom_to_list(Func)++"-1",utf8),
- Mod,Func]);
+ Mod,Func,Arity]);
_ ->
- ok
+ print(Lev, Info ++ "~w:~w/~w\n", [Mod,Func,Arity])
end,
- io:put_chars(Fd, "<pre>\n"),
-
AbsName.
stop_minor_log_file() ->
@@ -1828,7 +1869,7 @@ html_isolate_modules(List, FwMod) ->
html_isolate_modules(List, sets:new(), FwMod).
html_isolate_modules([], Set, _) -> sets:to_list(Set);
-html_isolate_modules([{skip_case,_}|Cases], Set, FwMod) ->
+html_isolate_modules([{skip_case,{_Case,_Cmt},_Mode}|Cases], Set, FwMod) ->
html_isolate_modules(Cases, Set, FwMod);
html_isolate_modules([{conf,_Ref,Props,{FwMod,_Func}}|Cases], Set, FwMod) ->
Set1 = case proplists:get_value(suite, Props) of
@@ -1898,15 +1939,20 @@ html_possibly_convert(Src, SrcInfo, Dest) ->
{ok,DestInfo} when DestInfo#file_info.mtime >= SrcInfo#file_info.mtime ->
ok; % dest file up to date
_ ->
+ InclPath = case application:get_env(test_server, include) of
+ {ok,Incls} -> Incls;
+ _ -> []
+ end,
+
OutDir = get(test_server_log_dir_base),
case test_server_sup:framework_call(get_html_wrapper,
["Module "++Src,false,
OutDir,undefined,
encoding(Src)], "") of
Empty when (Empty == "") ; (element(2,Empty) == "") ->
- erl2html2:convert(Src, Dest);
+ erl2html2:convert(Src, Dest, InclPath);
{_,Header,_} ->
- erl2html2:convert(Src, Dest, Header)
+ erl2html2:convert(Src, Dest, InclPath, Header)
end
end.
@@ -1932,26 +1978,30 @@ copy_html_file(Src, DestDir) ->
add_init_and_end_per_suite([{make,_,_}=Case|Cases], LastMod, LastRef, FwMod) ->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{{Mod,all},_}}=Case|Cases], LastMod,
+add_init_and_end_per_suite([{skip_case,{{Mod,all},_},_}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_end_per_suite_and_skip(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{{Mod,_},_}}=Case|Cases], LastMod,
- LastRef, FwMod) when Mod =/= LastMod ->
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
+add_init_and_end_per_suite([{skip_case,{{Mod,_},_Cmt},_Mode}=Case|Cases],
+ LastMod, LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_},_}=Case|Cases], LastMod,
- LastRef, FwMod) when Mod =/= LastMod ->
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
+add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_},_}=Case|Cases],
+ LastMod, LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{conf,Ref,Props,{FwMod,Func}}=Case|Cases], LastMod,
LastRef, FwMod) ->
%% if Mod == FwMod, this conf test is (probably) a test case group where
@@ -1972,7 +2022,8 @@ add_init_and_end_per_suite([{conf,_,_,{Mod,_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([SkipCase|Cases], LastMod, LastRef, FwMod)
when element(1,SkipCase) == skip_case ->
[SkipCase|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
@@ -1982,12 +2033,14 @@ add_init_and_end_per_suite([{Mod,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{Mod,_,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([Case|Cases], LastMod, LastRef, FwMod)->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
add_init_and_end_per_suite([], _LastMod, undefined, _FwMod) ->
@@ -2164,7 +2217,7 @@ run_test_cases(TestSpec, Config, TimetrapData) ->
%% comment (which gets printed in the log files) describes why the case
%% was skipped.
%%
-%% {skip_case,{Case,Comment}} A normal test case skipped by the user.
+%% {skip_case,{Case,Comment},Mode} A normal test case skipped by the user.
%% The comment (which gets printed in the log files) describes why the
%% case was skipped.
%%
@@ -2337,7 +2390,7 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases],
ParentRef ->
Reason = {group_result,GrName,failed},
skip_cases_upto(ParentRef, Cases,
- Reason, tc, Mode,
+ Reason, tc, ParentMode,
SkipTag)
end;
false ->
@@ -2396,22 +2449,27 @@ run_test_cases_loop([{auto_skip_case,{Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
{Mod,Func} = skip_case(auto, undefined, get(test_server_case_num)+1,
Case, Comment, is_io_buffered(), SkipMode),
- test_server_sup:framework_call(report, [tc_auto_skip,{Mod,Func,Comment}]),
+ test_server_sup:framework_call(report, [tc_auto_skip,
+ {Mod,{Func,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode,
update_status(skipped, Mod, Func, Status));
-run_test_cases_loop([{skip_case,{{Mod,all}=Case,Comment}}|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, Mode),
+ skip_case(user, undefined, 0, Case, Comment, false, SkipMode),
test_server_sup:framework_call(report, [tc_user_skip,
- {Mod,all,Comment}]),
+ {Mod,{all,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode, Status);
-run_test_cases_loop([{skip_case,{Case,Comment}}|Cases],
+run_test_cases_loop([{skip_case,{Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
{Mod,Func} = skip_case(user, undefined, get(test_server_case_num)+1,
- Case, Comment, is_io_buffered()),
- test_server_sup:framework_call(report, [tc_user_skip,{Mod,Func,Comment}]),
+ Case, Comment, is_io_buffered(), SkipMode),
+ test_server_sup:framework_call(report, [tc_user_skip,
+ {Mod,{Func,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode,
update_status(skipped, Mod, Func, Status));
@@ -2425,8 +2483,9 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0,
{Ref,Ref} ->
case check_props(parallel, tl(Mode0)) of
false ->
- %% this is an end conf for a top level parallel group, collect
- %% results from the test case processes and calc total time
+ %% this is an end conf for a top level parallel group,
+ %% 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))),
After = ?now,
@@ -2950,7 +3009,6 @@ get_tc_results([{_,{OkSkipFail,_}} | _Status]) ->
get_tc_results([]) -> % in case init_per_suite crashed
{[],[],[]}.
-
conf(Ref, Props) ->
{Ref,Props,?now}.
@@ -3030,13 +3088,11 @@ print_conf_time(ConfTime) ->
print(major, "=group_time ~.3fs", [ConfTime]),
print(minor, "~n=== Total execution time of group: ~.3fs~n", [ConfTime]).
-print_props(_, []) ->
+print_props([]) ->
ok;
-print_props(true, Props) ->
+print_props(Props) ->
print(major, "=group_props ~p", [Props]),
- print(minor, "Group properties: ~p~n", [Props]);
-print_props(_, _) ->
- ok.
+ print(minor, "Group properties: ~p~n", [Props]).
%% repeat N times: {repeat,N}
%% repeat N times or until all successful: {repeat_until_all_ok,N}
@@ -3155,10 +3211,6 @@ random_order(N, {Pos,NewSeed}, IxCases, Shuffled) ->
%% SendSync determines if start and finished messages must be sent so
%% that the printouts can be buffered and handled in order with io from
%% parallel processes.
-
-skip_case(Type, Ref, CaseNum, Case, Comment, SendSync) ->
- skip_case(Type, Ref, CaseNum, Case, Comment, SendSync, []).
-
skip_case(Type, Ref, CaseNum, Case, Comment, SendSync, Mode) ->
MF = {Mod,Func} = case Case of
{M,F,_A} -> {M,F};
@@ -3236,7 +3288,7 @@ skip_case1(Type, CaseNum, Mod, Func, Comment, Mode) ->
%% SkipType = skip_case | auto_skip_case
%% Mark all cases tagged with Ref as skipped.
-skip_cases_upto(Ref, Cases, Reason, Origin, Mode, SkipType) ->
+skip_cases_upto(Ref, Cases, Reason, Origin, Mode, SkipType) ->
{_,Modified,Rest} =
modify_cases_upto(Ref, {skip,Reason,Origin,Mode,SkipType}, Cases),
Modified++Rest.
@@ -3321,21 +3373,34 @@ modify_cases_upto1(Ref, {copy,NewRef},
{[C|Orig],[{skip_case,{Type,NewRef,MF,Cmt}}|Alt],T};
%% next is a skip_case, could be one test case or 'all' in suite, we must proceed
-modify_cases_upto1(Ref, ModOp, [{skip_case,{_F,_Cmt}}=MF|T], Orig, Alt) ->
+modify_cases_upto1(Ref, ModOp, [{skip_case,{_F,_Cmt},_Mode}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, ModOp, T, [MF|Orig], [MF|Alt]);
%% next is a normal case (possibly in a sequence), mark as skipped, or copy, and proceed
-modify_cases_upto1(Ref, {skip,Reason,_,_,skip_case}=Op,
+modify_cases_upto1(Ref, {skip,Reason,_,Mode,skip_case}=Op,
[{_M,_F}=MF|T], Orig, Alt) ->
- modify_cases_upto1(Ref, Op, T, Orig, [{skip_case,{MF,Reason}}|Alt]);
+ modify_cases_upto1(Ref, Op, T, Orig, [{skip_case,{MF,Reason},Mode}|Alt]);
modify_cases_upto1(Ref, {skip,Reason,_,Mode,auto_skip_case}=Op,
[{_M,_F}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, Op, T, Orig, [{auto_skip_case,{MF,Reason},Mode}|Alt]);
modify_cases_upto1(Ref, CopyOp, [{_M,_F}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, CopyOp, T, [MF|Orig], [MF|Alt]);
+%% next is a conf case, modify the Mode arg to keep track of sub groups
+modify_cases_upto1(Ref, {skip,Reason,FType,Mode,SkipType},
+ [{conf,OtherRef,Props,_MF}|T], Orig, Alt) ->
+ case hd(Mode) of
+ {OtherRef,_,_} -> % end conf
+ modify_cases_upto1(Ref, {skip,Reason,FType,tl(Mode),SkipType},
+ T, Orig, Alt);
+ _ -> % start conf
+ Mode1 = [conf(OtherRef,Props)|Mode],
+ modify_cases_upto1(Ref, {skip,Reason,FType,Mode1,SkipType},
+ T, Orig, Alt)
+ end;
+
%% next is some other case, ignore or copy
-modify_cases_upto1(Ref, {skip,_,_,_,_}=Op, [_|T], Orig, Alt) ->
+modify_cases_upto1(Ref, {skip,_,_,_,_}=Op, [_Other|T], Orig, Alt) ->
modify_cases_upto1(Ref, Op, T, Orig, Alt);
modify_cases_upto1(Ref, CopyOp, [C|T], Orig, Alt) ->
modify_cases_upto1(Ref, CopyOp, T, [C|Orig], [C|Alt]).
@@ -3631,8 +3696,7 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
TSDir = get(test_server_dir),
print(major, "=case ~w:~w", [Mod, Func]),
- MinorName = start_minor_log_file(Mod, Func),
- print(minor, "<a name=\"top\"></a>", [], internal_raw),
+ MinorName = start_minor_log_file(Mod, Func, self() /= Main),
MinorBase = filename:basename(MinorName),
print(major, "=logfile ~ts", [filename:basename(MinorName)]),
@@ -3660,12 +3724,26 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
update_config(hd(Args), [{priv_dir,PrivDir++"/"},
{tc_logfile,MinorName}])
end,
-
+ GrName = get_name(Mode),
test_server_sup:framework_call(report,
- [tc_start,{{Mod,Func},MinorName}]),
+ [tc_start,{{Mod,{Func,GrName}},
+ MinorName}]),
- print_props((RunInit==skip_init), get_props(Mode)),
- GroupName = case get_name(Mode) of
+ {ok,Cwd} = file:get_cwd(),
+ Args2Print = if is_list(UpdatedArgs) ->
+ lists:keydelete(tc_group_result, 1, UpdatedArgs);
+ true ->
+ UpdatedArgs
+ end,
+ if RunInit == skip_init ->
+ print_props(get_props(Mode));
+ true ->
+ ok
+ end,
+ print(minor, "Config value:\n\n ~tp\n", [Args2Print]),
+ print(minor, "Current directory is ~tp\n", [Cwd]),
+
+ GrNameStr = case GrName of
undefined -> "";
Name -> cast_to_list(Name)
end,
@@ -3678,14 +3756,14 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
"<td>" ++ Col0 ++ "~ts" ++ Col1 ++ "</td>"
"<td><a href=\"~ts\">~w</a></td>"
"<td><a href=\"~ts#top\"><</a> <a href=\"~ts#end\">></a></td>",
- [num2str(Num),fw_name(Mod),GroupName,EncMinorBase,Func,
+ [num2str(Num),fw_name(Mod),GrNameStr,EncMinorBase,Func,
EncMinorBase,EncMinorBase]),
do_unless_parallel(Main, fun erlang:yield/0),
%% run the test case
{Result,DetectedFail,ProcsBefore,ProcsAfter} =
- run_test_case_apply(Num, Mod, Func, [UpdatedArgs], get_name(Mode),
+ run_test_case_apply(Num, Mod, Func, [UpdatedArgs], GrName,
RunInit, TimetrapData),
{Time,RetVal,Loc,Opts,Comment} =
case Result of
@@ -3704,41 +3782,41 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
Status =
case {Time,RetVal} of
{died,{timetrap_timeout,TimetrapTimeout}} ->
- progress(failed, Num, Mod, Func, Loc,
+ progress(failed, Num, Mod, Func, GrName, Loc,
timetrap_timeout, TimetrapTimeout, Comment, Style);
{died,Reason} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',{Skip,Reason}}} when Skip==skip; Skip==skipped;
Skip==auto_skip ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',_Pid,{Skip,Reason}}} when Skip==skip; Skip==skipped ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',_Pid,Reason}} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',Reason}} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{Fail,Reason}} when Fail =:= fail; Fail =:= failed ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,Reason={auto_skip,_Why}} ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{Skip,Reason}} when Skip==skip; Skip==skipped ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{Time,RetVal} ->
case DetectedFail of
[] ->
- progress(ok, Num, Mod, Func, Loc, RetVal,
+ progress(ok, Num, Mod, Func, GrName, Loc, RetVal,
Time, Comment, Style);
Reason ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style)
end
end,
@@ -3843,7 +3921,7 @@ num2str(N) -> integer_to_list(N).
%% Note: Strings that are to be written to the minor log must
%% be prefixed with "=== " here, or the indentation will be wrong.
-progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
+progress(skip, CaseNum, Mod, Func, GrName, Loc, Reason, Time,
Comment, {St0,St1}) ->
{Reason1,{Color,Ret,ReportTag}} =
if_auto_skip(Reason,
@@ -3852,7 +3930,7 @@ progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
print(major, "=result ~w: ~p", [ReportTag,Reason1]),
print(1, "*** SKIPPED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{ReportTag,Reason1}}]),
ReasonStr = reason_to_string(Reason1),
ReasonStr1 = lists:flatten([string:strip(S,left) ||
@@ -3877,13 +3955,13 @@ progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
print(minor, "=== reason = ~ts", [ReasonStr1]),
Ret;
-progress(failed, CaseNum, Mod, Func, Loc, timetrap_timeout, T,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, timetrap_timeout, T,
Comment0, {St0,St1}) ->
print(major, "=result failed: timeout, ~p", [Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
test_server_sup:framework_call(report,
- [tc_done,{Mod,Func,
+ [tc_done,{Mod,{Func,GrName},
{failed,timetrap_timeout}}]),
FormatLastLoc = test_server_sup:format_loc(get_last_loc(Loc)),
ErrorReason = io_lib:format("{timetrap_timeout,~ts}", [FormatLastLoc]),
@@ -3903,13 +3981,13 @@ progress(failed, CaseNum, Mod, Func, Loc, timetrap_timeout, T,
print(minor, "=== reason = timetrap timeout", []),
failed;
-progress(failed, CaseNum, Mod, Func, Loc, {testcase_aborted,Reason}, _T,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, {testcase_aborted,Reason}, _T,
Comment0, {St0,St1}) ->
print(major, "=result failed: testcase_aborted, ~p", [Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
test_server_sup:framework_call(report,
- [tc_done,{Mod,Func,
+ [tc_done,{Mod,{Func,GrName},
{failed,testcase_aborted}}]),
FormatLastLoc = test_server_sup:format_loc(get_last_loc(Loc)),
ErrorReason = io_lib:format("{testcase_aborted,~ts}", [FormatLastLoc]),
@@ -3929,12 +4007,12 @@ progress(failed, CaseNum, Mod, Func, Loc, {testcase_aborted,Reason}, _T,
print(minor, "=== reason = {testcase_aborted,~p}", [Reason]),
failed;
-progress(failed, CaseNum, Mod, Func, unknown, Reason, Time,
+progress(failed, CaseNum, Mod, Func, GrName, unknown, Reason, Time,
Comment0, {St0,St1}) ->
print(major, "=result failed: ~p, ~w", [Reason,unknown]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{failed,Reason}}]),
TimeStr = io_lib:format(if is_float(Time) -> "~.3fs";
true -> "~w"
@@ -3965,12 +4043,12 @@ progress(failed, CaseNum, Mod, Func, unknown, Reason, Time,
print(minor, "=== reason = " ++ FStr, [FormattedReason]),
failed;
-progress(failed, CaseNum, Mod, Func, Loc, Reason, Time,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, Reason, Time,
Comment0, {St0,St1}) ->
print(major, "=result failed: ~p, ~p", [Reason,Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{failed,Reason}}]),
TimeStr = io_lib:format(if is_float(Time) -> "~.3fs";
true -> "~w"
@@ -3992,10 +4070,10 @@ progress(failed, CaseNum, Mod, Func, Loc, Reason, Time,
print(minor, "=== reason = " ++ FStr, [FormattedReason]),
failed;
-progress(ok, _CaseNum, Mod, Func, _Loc, RetVal, Time,
+progress(ok, _CaseNum, Mod, Func, GrName, _Loc, RetVal, Time,
Comment0, {St0,St1}) ->
print(minor, "successfully completed test case", []),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,ok}]),
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},ok}]),
Comment =
case RetVal of
{comment,RetComment} ->
@@ -4484,18 +4562,18 @@ update_config(Config, []) ->
collect_all_cases(Top, Skip) when is_list(Skip) ->
Result =
- case collect_cases(Top, #cc{mod=[],skip=Skip}) of
+ case collect_cases(Top, #cc{mod=[],skip=Skip}, []) of
{ok,Cases,_St} -> Cases;
Other -> Other
end,
Result.
-collect_cases([], St) -> {ok,[],St};
-collect_cases([Case|Cs0], St0) ->
- case collect_cases(Case, St0) of
+collect_cases([], St, _) -> {ok,[],St};
+collect_cases([Case|Cs0], St0, Mode) ->
+ case collect_cases(Case, St0, Mode) of
{ok,FlatCases1,St1} ->
- case collect_cases(Cs0, St1) of
+ case collect_cases(Cs0, St1, Mode) of
{ok,FlatCases2,St} ->
{ok,FlatCases1 ++ FlatCases2,St};
{error,_Reason} = Error -> Error
@@ -4504,39 +4582,41 @@ collect_cases([Case|Cs0], St0) ->
end;
-collect_cases({module,Case}, St) when is_atom(Case), is_atom(St#cc.mod) ->
- collect_case({St#cc.mod,Case}, St);
-collect_cases({module,Mod,Case}, St) ->
- collect_case({Mod,Case}, St);
-collect_cases({module,Mod,Case,Args}, St) ->
- collect_case({Mod,Case,Args}, St);
-
-collect_cases({dir,SubDir}, St) ->
- collect_files(SubDir, "*_SUITE", St);
-collect_cases({dir,SubDir,Pattern}, St) ->
- collect_files(SubDir, Pattern++"*", St);
-
-collect_cases({conf,InitF,CaseList,FinMF}, St) when is_atom(InitF) ->
- collect_cases({conf,[],{St#cc.mod,InitF},CaseList,FinMF}, St);
-collect_cases({conf,InitMF,CaseList,FinF}, St) when is_atom(FinF) ->
- collect_cases({conf,[],InitMF,CaseList,{St#cc.mod,FinF}}, St);
-collect_cases({conf,InitMF,CaseList,FinMF}, St0) ->
- collect_cases({conf,[],InitMF,CaseList,FinMF}, St0);
-collect_cases({conf,Props,InitF,CaseList,FinMF}, St) when is_atom(InitF) ->
+collect_cases({module,Case}, St, Mode) when is_atom(Case), is_atom(St#cc.mod) ->
+ collect_case({St#cc.mod,Case}, St, Mode);
+collect_cases({module,Mod,Case}, St, Mode) ->
+ collect_case({Mod,Case}, St, Mode);
+collect_cases({module,Mod,Case,Args}, St, Mode) ->
+ collect_case({Mod,Case,Args}, St, Mode);
+
+collect_cases({dir,SubDir}, St, Mode) ->
+ collect_files(SubDir, "*_SUITE", St, Mode);
+collect_cases({dir,SubDir,Pattern}, St, Mode) ->
+ collect_files(SubDir, Pattern++"*", St, Mode);
+
+collect_cases({conf,InitF,CaseList,FinMF}, St, Mode) when is_atom(InitF) ->
+ collect_cases({conf,[],{St#cc.mod,InitF},CaseList,FinMF}, St, Mode);
+collect_cases({conf,InitMF,CaseList,FinF}, St, Mode) when is_atom(FinF) ->
+ collect_cases({conf,[],InitMF,CaseList,{St#cc.mod,FinF}}, St, Mode);
+collect_cases({conf,InitMF,CaseList,FinMF}, St0, Mode) ->
+ collect_cases({conf,[],InitMF,CaseList,FinMF}, St0, Mode);
+collect_cases({conf,Props,InitF,CaseList,FinMF}, St, Mode) when is_atom(InitF) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
Props1 ->
- collect_cases({conf,Props1,{St#cc.mod,InitF},CaseList,FinMF}, St)
+ collect_cases({conf,Props1,{St#cc.mod,InitF},CaseList,FinMF},
+ St, Mode)
end;
-collect_cases({conf,Props,InitMF,CaseList,FinF}, St) when is_atom(FinF) ->
+collect_cases({conf,Props,InitMF,CaseList,FinF}, St, Mode) when is_atom(FinF) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
Props1 ->
- collect_cases({conf,Props1,InitMF,CaseList,{St#cc.mod,FinF}}, St)
+ collect_cases({conf,Props1,InitMF,CaseList,{St#cc.mod,FinF}},
+ St, Mode)
end;
-collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
+collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St, Mode) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
@@ -4544,13 +4624,13 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
Ref = make_ref(),
Skips = St#cc.skip,
Props2 = [{suite,St#cc.mod} | lists:delete(suite,Props1)],
- Mode = [{Ref,Props2,undefined}],
+ Mode1 = [{Ref,Props2,undefined} | Mode],
case in_skip_list({St#cc.mod,Conf}, Skips) of
{true,Comment} -> % conf init skipped
- {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode} |
+ {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode1} |
[] ++ [{conf,Ref,[],FinMF}]],St};
{true,Name,Comment} when is_atom(Name) -> % all cases skipped
- case collect_cases(CaseList, St) of
+ case collect_cases(CaseList, St, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4558,15 +4638,15 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
keep_name(Props1),
FinMF}],
Skipped = skip_cases_upto(Ref, Cases2Skip, Comment,
- conf, Mode, skip_case),
- {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode} |
+ conf, Mode1, skip_case),
+ {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode1} |
Skipped],St1};
{error,_Reason} = Error ->
Error
end;
{true,ToSkip,_} when is_list(ToSkip) -> % some cases skipped
case collect_cases(CaseList,
- St#cc{skip=ToSkip++Skips}) of
+ St#cc{skip=ToSkip++Skips}, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4578,7 +4658,7 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
Error
end;
false ->
- case collect_cases(CaseList, St) of
+ case collect_cases(CaseList, St, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4592,8 +4672,8 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
end
end;
-collect_cases({make,InitMFA,CaseList,FinMFA}, St0) ->
- case collect_cases(CaseList, St0) of
+collect_cases({make,InitMFA,CaseList,FinMFA}, St0, Mode) ->
+ case collect_cases(CaseList, St0, Mode) of
{ok,[],_St} = Empty -> Empty;
{ok,FlatCases,St} ->
Ref = make_ref(),
@@ -4602,62 +4682,62 @@ collect_cases({make,InitMFA,CaseList,FinMFA}, St0) ->
{error,_Reason} = Error -> Error
end;
-collect_cases({Module, Cases}, St) when is_list(Cases) ->
- case (catch collect_case(Cases, St#cc{mod=Module}, [])) of
+collect_cases({Module, Cases}, St, Mode) when is_list(Cases) ->
+ case (catch collect_case(Cases, St#cc{mod=Module}, [], Mode)) of
{ok, NewCases, NewSt} ->
{ok, NewCases, NewSt};
Other ->
{error, Other}
end;
-collect_cases({_Mod,_Case}=Spec, St) ->
- collect_case(Spec, St);
+collect_cases({_Mod,_Case}=Spec, St, Mode) ->
+ collect_case(Spec, St, Mode);
-collect_cases({_Mod,_Case,_Args}=Spec, St) ->
- collect_case(Spec, St);
-collect_cases(Case, St) when is_atom(Case), is_atom(St#cc.mod) ->
- collect_case({St#cc.mod,Case}, St);
-collect_cases(Other, St) ->
+collect_cases({_Mod,_Case,_Args}=Spec, St, Mode) ->
+ collect_case(Spec, St, Mode);
+collect_cases(Case, St, Mode) when is_atom(Case), is_atom(St#cc.mod) ->
+ collect_case({St#cc.mod,Case}, St, Mode);
+collect_cases(Other, St, _Mode) ->
{error,{bad_subtest_spec,St#cc.mod,Other}}.
-collect_case({Mod,{conf,_,_,_,_}=Conf}, St) ->
- collect_case_invoke(Mod, Conf, [], St);
+collect_case({Mod,{conf,_,_,_,_}=Conf}, St, Mode) ->
+ collect_case_invoke(Mod, Conf, [], St, Mode);
-collect_case(MFA, St) ->
+collect_case(MFA, St, Mode) ->
case in_skip_list(MFA, St#cc.skip) of
{true,Comment} ->
- {ok,[{skip_case,{MFA,Comment}}],St};
+ {ok,[{skip_case,{MFA,Comment},Mode}],St};
false ->
case MFA of
- {Mod,Case} -> collect_case_invoke(Mod, Case, MFA, St);
+ {Mod,Case} -> collect_case_invoke(Mod, Case, MFA, St, Mode);
{_Mod,_Case,_Args} -> {ok,[MFA],St}
end
end.
-collect_case([], St, Acc) ->
+collect_case([], St, Acc, _Mode) ->
{ok, Acc, St};
-collect_case([Case | Cases], St, Acc) ->
- {ok, FlatCases, NewSt} = collect_case({St#cc.mod, Case}, St),
- collect_case(Cases, NewSt, Acc ++ FlatCases).
+collect_case([Case | Cases], St, Acc, Mode) ->
+ {ok, FlatCases, NewSt} = collect_case({St#cc.mod, Case}, St, Mode),
+ collect_case(Cases, NewSt, Acc ++ FlatCases, Mode).
-collect_case_invoke(Mod, Case, MFA, St) ->
+collect_case_invoke(Mod, Case, MFA, St, Mode) ->
case get_fw_mod(undefined) of
undefined ->
case catch apply(Mod, Case, [suite]) of
{'EXIT',_} ->
{ok,[MFA],St};
Suite ->
- collect_subcases(Mod, Case, MFA, St, Suite)
+ collect_subcases(Mod, Case, MFA, St, Suite, Mode)
end;
_ ->
Suite = test_server_sup:framework_call(get_suite,
[Mod,Case],
[]),
- collect_subcases(Mod, Case, MFA, St, Suite)
+ collect_subcases(Mod, Case, MFA, St, Suite, Mode)
end.
-collect_subcases(Mod, Case, MFA, St, Suite) ->
+collect_subcases(Mod, Case, MFA, St, Suite, Mode) ->
case Suite of
[] when Case == all -> {ok,[],St};
[] when element(1, Case) == conf -> {ok,[],St};
@@ -4665,28 +4745,28 @@ collect_subcases(Mod, Case, MFA, St, Suite) ->
%%%! --- START Kept for backwards compatibility ---
%%%! Requirements are not used
{req,ReqList} ->
- collect_case_deny(Mod, Case, MFA, ReqList, [], St);
+ collect_case_deny(Mod, Case, MFA, ReqList, [], St, Mode);
{req,ReqList,SubCases} ->
- collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St);
+ collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St, Mode);
%%%! --- END Kept for backwards compatibility ---
{Skip,Reason} when Skip==skip; Skip==skipped ->
- {ok,[{skip_case,{MFA,Reason}}],St};
+ {ok,[{skip_case,{MFA,Reason},Mode}],St};
{error,Reason} ->
throw(Reason);
SubCases ->
- collect_case_subcases(Mod, Case, SubCases, St)
+ collect_case_subcases(Mod, Case, SubCases, St, Mode)
end.
-collect_case_subcases(Mod, Case, SubCases, St0) ->
+collect_case_subcases(Mod, Case, SubCases, St0, Mode) ->
OldMod = St0#cc.mod,
- case collect_cases(SubCases, St0#cc{mod=Mod}) of
+ case collect_cases(SubCases, St0#cc{mod=Mod}, Mode) of
{ok,FlatCases,St} ->
{ok,FlatCases,St#cc{mod=OldMod}};
{error,Reason} ->
{error,{{Mod,Case},Reason}}
end.
-collect_files(Dir, Pattern, St) ->
+collect_files(Dir, Pattern, St, Mode) ->
{ok,Cwd} = file:get_cwd(),
Dir1 = filename:join(Cwd, Dir),
Wc = filename:join([Dir1,Pattern++code:objfile_extension()]),
@@ -4696,7 +4776,7 @@ collect_files(Dir, Pattern, St) ->
{error,{collect_fail,Dir,Pattern}};
Mods0 ->
Mods = [{path_to_module(Mod),all} || Mod <- lists:sort(Mods0)],
- collect_cases(Mods, St)
+ collect_cases(Mods, St, Mode)
end.
path_to_module(Path) when is_list(Path) ->
@@ -4706,14 +4786,14 @@ path_to_module(Path) when is_list(Path) ->
%% anyway. It should be removed or renamed!
list_to_atom(filename:rootname(filename:basename(Path))).
-collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St) ->
+collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St, Mode) ->
case {check_deny(ReqList, St#cc.skip),SubCases} of
{{denied,Comment},_SubCases} ->
- {ok,[{skip_case,{MFA,Comment}}],St};
+ {ok,[{skip_case,{MFA,Comment},Mode}],St};
{granted,[]} ->
{ok,[MFA],St};
{granted,SubCases} ->
- collect_case_subcases(Mod, Case, SubCases, St)
+ collect_case_subcases(Mod, Case, SubCases, St, Mode)
end.
check_deny([Req|Reqs], DenyList) ->
@@ -4840,7 +4920,7 @@ start_node(Name, Type, Options) ->
case controller_call({start_node,Name,Type,Options}, T) of
{{ok,Nodename}, Host, Cmd, Info, Warning} ->
format(minor,
- "Successfully started node ~w on ~tp with command: ~tp",
+ "Successfully started node ~w on ~tp with command: ~ts",
[Nodename, Host, Cmd]),
format(major, "=node_start ~w", [Nodename]),
case Info of
@@ -4856,7 +4936,7 @@ start_node(Name, Type, Options) ->
{ok, Nodename};
{fail,{Ret, Host, Cmd}} ->
format(minor,
- "Failed to start node ~tp on ~tp with command: ~tp~n"
+ "Failed to start node ~tp on ~tp with command: ~ts~n"
"Reason: ~p",
[Name, Host, Cmd, Ret]),
{fail,Ret};
@@ -4865,7 +4945,7 @@ start_node(Name, Type, Options) ->
Ret;
{Ret, Host, Cmd} ->
format(minor,
- "Failed to start node ~tp on ~tp with command: ~tp~n"
+ "Failed to start node ~tp on ~tp with command: ~ts~n"
"Reason: ~p",
[Name, Host, Cmd, Ret]),
Ret
@@ -5058,15 +5138,15 @@ pinfo(P) ->
%% Cover compilation
%% The compilation is executed on the target node
-cover_compile({App,{_File,Exclude,Include,Cross,_Export}}) ->
- cover_compile1({App,Exclude,Include,Cross});
+start_cover(#cover{}=CoverInfo) ->
+ cover_compile(CoverInfo);
+start_cover({log,CoverLogDir}=CoverInfo) ->
+ %% Cover is controlled by the framework - here's the log
+ put(test_server_cover_log_dir,CoverLogDir),
+ {ok,CoverInfo}.
-cover_compile({App,CoverFile}) ->
- {Exclude,Include,Cross} = read_cover_file(CoverFile),
- cover_compile1({App,Exclude,Include,Cross}).
-
-cover_compile1(What) ->
- test_server:cover_compile(What).
+cover_compile(CoverInfo) ->
+ test_server:cover_compile(CoverInfo).
%% Read the coverfile for an application and return a list of modules
%% that are members of the application but shall not be compiled
@@ -5134,25 +5214,45 @@ check_cross([]) ->
%%
%% This per application analysis writes the file cover.html in the
%% application's run.<timestamp> directory.
-cover_analyse({App,CoverInfo}, Analyse, AnalyseMods, Stop, TestDir) ->
+stop_cover(#cover{}=CoverInfo, TestDir) ->
+ cover_analyse(CoverInfo, TestDir);
+stop_cover(_CoverInfo, _TestDir) ->
+ %% Cover is probably controlled by the framework
+ ok.
+
+make_relative(AbsDir, VsDir) ->
+ DirTokens = filename:split(AbsDir),
+ VsTokens = filename:split(VsDir),
+ filename:join(make_relative1(DirTokens, VsTokens)).
+
+make_relative1([T | DirTs], [T | VsTs]) ->
+ make_relative1(DirTs, VsTs);
+make_relative1(Last = [_File], []) ->
+ Last;
+make_relative1(Last = [_File], VsTs) ->
+ Ups = ["../" || _ <- VsTs],
+ Ups ++ Last;
+make_relative1(DirTs, []) ->
+ DirTs;
+make_relative1(DirTs, VsTs) ->
+ Ups = ["../" || _ <- VsTs],
+ Ups ++ DirTs.
+
+
+cover_analyse(CoverInfo, TestDir) ->
write_default_cross_coverlog(TestDir),
{ok,CoverLog} = open_html_file(filename:join(TestDir, ?coverlog_name)),
write_coverlog_header(CoverLog),
+ #cover{app=App,
+ file=CoverFile,
+ excl=Excluded,
+ cross=Cross} = CoverInfo,
io:fwrite(CoverLog, "<h1>Coverage for application '~w'</h1>\n", [App]),
io:fwrite(CoverLog,
"<p><a href=\"~ts\">Coverdata collected over all tests</a></p>",
[?cross_coverlog_name]),
- {CoverFile,_Included,Excluded,Cross} =
- case CoverInfo of
- {File,Excl,Incl,Cr,Export} ->
- cover:export(Export),
- {File,Incl,Excl,Cr};
- File ->
- {Excl,Incl,Cr} = read_cover_file(File),
- {File,Incl,Excl,Cr}
- end,
io:fwrite(CoverLog, "<p>CoverFile: <code>~tp</code>\n", [CoverFile]),
write_cross_cover_info(TestDir,Cross),
@@ -5167,7 +5267,7 @@ cover_analyse({App,CoverInfo}, Analyse, AnalyseMods, Stop, TestDir) ->
io:fwrite(CoverLog, "<p>Excluded module(s): <code>~tp</code>\n", [Excluded]),
- Coverage = cover_analyse(Analyse, AnalyseMods, Stop),
+ Coverage = test_server:cover_analyse(TestDir, CoverInfo),
write_binary_file(filename:join(TestDir,?raw_coverlog_name),
term_to_binary(Coverage)),
@@ -5186,11 +5286,6 @@ cover_analyse({App,CoverInfo}, Analyse, AnalyseMods, Stop, TestDir) ->
write_binary_file(filename:join(TestDir, ?cover_total),
term_to_binary(TotPercent)).
-cover_analyse(Analyse, AnalyseMods, Stop) ->
- TestDir = get(test_server_log_dir_base),
- test_server:cover_analyse({Analyse,TestDir}, AnalyseMods, Stop).
-
-
%% Cover analysis - accumulated over multiple tests
%% This can be executed on any node after all tests are finished.
%% Analyse = overview | details
@@ -5471,10 +5566,16 @@ write_html_file(File,Content) ->
%% The 'major' log file, which is a pure text file is also written
%% with utf8 encoding
open_utf8_file(File) ->
- file:open(File,[write,{encoding,utf8}]).
+ case file:open(File,AllOpts=[write,{encoding,utf8}]) of
+ {error,Reason} -> {error,{Reason,{File,AllOpts}}};
+ Result -> Result
+ end.
open_utf8_file(File,Opts) ->
- file:open(File,[{encoding,utf8}|Opts]).
+ case file:open(File,AllOpts=[{encoding,utf8}|Opts]) of
+ {error,Reason} -> {error,{Reason,{File,AllOpts}}};
+ Result -> Result
+ end.
%% Write a file with specified encoding
write_file(File,Content,latin1) ->
diff --git a/lib/test_server/src/test_server_internal.hrl b/lib/test_server/src/test_server_internal.hrl
index 4e734a330b..bafeeaabfe 100644
--- a/lib/test_server/src/test_server_internal.hrl
+++ b/lib/test_server/src/test_server_internal.hrl
@@ -49,3 +49,12 @@
master,
cookie}).
+
+-record(cover, {app, % application; Name | none
+ file, % cover spec file
+ incl, % explicitly include modules
+ excl, % explicitly exclude modules
+ level, % analyse level; details | overview
+ mods, % actually cover compiled modules
+ stop=true, % stop cover after analyse; boolean()
+ cross}).% cross cover analyse info
diff --git a/lib/test_server/src/test_server_node.erl b/lib/test_server/src/test_server_node.erl
index 619fd463de..acd47788db 100644
--- a/lib/test_server/src/test_server_node.erl
+++ b/lib/test_server/src/test_server_node.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -82,7 +82,7 @@ start_tracer_node(TraceFile,TI) ->
Cookie = TI#target_info.cookie,
{ok,LSock} = gen_tcp:listen(0,[binary,{reuseaddr,true},{packet,2}]),
{ok,TracePort} = inet:port(LSock),
- Prog = pick_erl_program(default),
+ Prog = quote_progname(pick_erl_program(default)),
Cmd = lists:concat([Prog, " -sname tracer -hidden -setcookie ", Cookie,
" -s ", ?MODULE, " trc ", TraceFile, " ",
TracePort, " ", TI#target_info.os_family]),
@@ -312,7 +312,7 @@ start_node_peer(SlaveName, OptList, From, TI) ->
FailOnError = start_node_get_option_value(fail_on_error, OptList, true),
Pa = TI#target_info.test_server_dir,
Prog0 = start_node_get_option_value(erl, OptList, default),
- Prog = pick_erl_program(Prog0),
+ Prog = quote_progname(pick_erl_program(Prog0)),
Args =
case string:str(SuppliedArgs,"-setcookie") of
0 -> "-setcookie " ++ TI#target_info.cookie ++ " " ++ SuppliedArgs;
@@ -589,7 +589,32 @@ pick_erl_program(L) ->
{release, S} ->
find_release(S);
this ->
- lib:progname()
+ cast_to_list(lib:progname())
+ end.
+
+%% This is an attempt to distinguish between spaces in the program
+%% path and spaces that separate arguments. The program is quoted to
+%% allow spaces in the path.
+%%
+%% Arguments could exist either if the executable is excplicitly given
+%% ({prog,String}) or if the -program switch to beam is used and
+%% includes arguments (typically done by cerl in OTP test environment
+%% in order to ensure that slave/peer nodes are started with the same
+%% emulator and flags as the test node. The return from lib:progname()
+%% could then typically be '/<full_path_to>/cerl -gcov').
+quote_progname(Progname) ->
+ do_quote_progname(string:tokens(Progname," ")).
+
+do_quote_progname([Prog]) ->
+ "\""++Prog++"\"";
+do_quote_progname([Prog,Arg|Args]) ->
+ case os:find_executable(Prog) of
+ false ->
+ do_quote_progname([Prog++" "++Arg | Args]);
+ _ ->
+ %% this one has an executable - we assume the rest are arguments
+ "\""++Prog++"\""++
+ lists:flatten(lists:map(fun(X) -> [" ",X] end, [Arg|Args]))
end.
random_element(L) ->
@@ -628,7 +653,7 @@ find_rel_linux(Rel) ->
end.
find_rel_suse(Rel, SuseRel) ->
- Root = "/usr/local/otp/releases/otp_beam_linux_sles",
+ Root = "/usr/local/otp/releases/sles",
case SuseRel of
"11" ->
%% Try both SuSE 11, SuSE 10 and SuSe 9 in that order.
@@ -648,10 +673,10 @@ find_rel_suse(Rel, SuseRel) ->
find_rel_suse_1(Rel, RootWc) ->
case erlang:system_info(wordsize) of
4 ->
- find_rel_suse_2(Rel, RootWc++"_i386");
+ find_rel_suse_2(Rel, RootWc++"_32");
8 ->
- find_rel_suse_2(Rel, RootWc++"_x64") ++
- find_rel_suse_2(Rel, RootWc++"_i386")
+ find_rel_suse_2(Rel, RootWc++"_64") ++
+ find_rel_suse_2(Rel, RootWc++"_32")
end.
find_rel_suse_2(Rel, RootWc) ->
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl
index 377aa21018..15a6fdd1de 100644
--- a/lib/test_server/src/test_server_sup.erl
+++ b/lib/test_server/src/test_server_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,10 +29,13 @@
hostatom/0, hostatom/1, hoststr/0, hoststr/1,
framework_call/2,framework_call/3,framework_call/4,
format_loc/1,
- call_trace/1]).
+ util_start/0, util_stop/0, unique_name/0,
+ call_trace/1,
+ appup_test/1]).
-include("test_server_internal.hrl").
-define(crash_dump_tar,"crash_dumps.tar.gz").
-define(src_listing_ext, ".src.html").
+-record(util_state, {starter, latest_name}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% timetrap(Timeout,Scale,Pid) -> Handle
@@ -58,33 +61,37 @@ timetrap(Timeout0, ReportTVal, Scale, Pid) ->
TruncTO = trunc(Timeout),
receive
after TruncTO ->
- case is_process_alive(Pid) of
- true ->
- TimeToReport = if Timeout0 == ReportTVal -> TruncTO;
- true -> ReportTVal end,
- MFLs = test_server:get_loc(Pid),
- Mon = erlang:monitor(process, Pid),
- Trap = {timetrap_timeout,TimeToReport,MFLs},
- exit(Pid, Trap),
- receive
- {'DOWN', Mon, process, Pid, _} ->
- ok
- after 10000 ->
- %% Pid is probably trapping exits, hit it harder...
- catch error_logger:warning_msg(
- "Testcase process ~w not "
- "responding to timetrap "
- "timeout:~n"
- " ~p.~n"
- "Killing testcase...~n",
- [Pid, Trap]),
- exit(Pid, kill)
- end;
- false ->
+ kill_the_process(Pid, Timeout0, TruncTO, ReportTVal)
+ end.
+
+kill_the_process(Pid, Timeout0, TruncTO, ReportTVal) ->
+ case is_process_alive(Pid) of
+ true ->
+ TimeToReport = if Timeout0 == ReportTVal -> TruncTO;
+ true -> ReportTVal end,
+ MFLs = test_server:get_loc(Pid),
+ Mon = erlang:monitor(process, Pid),
+ Trap = {timetrap_timeout,TimeToReport,MFLs},
+ exit(Pid, Trap),
+ receive
+ {'DOWN', Mon, process, Pid, _} ->
ok
- end
+ after 10000 ->
+ %% Pid is probably trapping exits, hit it harder...
+ catch error_logger:warning_msg(
+ "Testcase process ~w not "
+ "responding to timetrap "
+ "timeout:~n"
+ " ~p.~n"
+ "Killing testcase...~n",
+ [Pid, Trap]),
+ exit(Pid, kill)
+ end;
+ false ->
+ ok
end.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% timetrap_cancel(Handle) -> ok
%% Handle = term()
@@ -263,6 +270,249 @@ app_check_export_all([Mod|Mods]) ->
end
end.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% appup_test/1
+%%
+%% Checks one applications .appup file for obvious errors.
+%% Checks..
+%% * .. syntax
+%% * .. that version in app file matches appup file version
+%% * .. validity of appup instructions
+%%
+%% For library application this function checks that the proper
+%% 'restart_application' upgrade and downgrade clauses exist.
+appup_test(Application) ->
+ case is_app(Application) of
+ {ok, AppFile} ->
+ case is_appup(Application, proplists:get_value(vsn, AppFile)) of
+ {ok, Up, Down} ->
+ StartMod = proplists:get_value(mod, AppFile),
+ Modules = proplists:get_value(modules, AppFile),
+ do_appup_tests(StartMod, Application, Up, Down, Modules);
+ Error ->
+ test_server:fail(Error)
+ end;
+ Error ->
+ test_server:fail(Error)
+ end.
+
+is_appup(Application, Version) ->
+ AppupFile = atom_to_list(Application) ++ ".appup",
+ AppupPath = filename:join([code:lib_dir(Application), "ebin", AppupFile]),
+ case file:consult(AppupPath) of
+ {ok, [{Version, Up, Down}]} when is_list(Up), is_list(Down) ->
+ {ok, Up, Down};
+ _ ->
+ test_server:format(
+ minor,
+ "Application upgrade (.appup) file not found, "
+ "or it has very bad syntax.~n"),
+ {error, appup_not_readable}
+ end.
+
+do_appup_tests(undefined, Application, Up, Down, _Modules) ->
+ %% library application
+ case Up of
+ [{<<".*">>, [{restart_application, Application}]}] ->
+ case Down of
+ [{<<".*">>, [{restart_application, Application}]}] ->
+ ok;
+ _ ->
+ test_server:format(
+ minor,
+ "Library application needs restart_application "
+ "downgrade instruction.~n"),
+ {error, library_downgrade_instruction_malformed}
+ end;
+ _ ->
+ test_server:format(
+ minor,
+ "Library application needs restart_application "
+ "upgrade instruction.~n"),
+ {error, library_upgrade_instruction_malformed}
+ end;
+do_appup_tests(_, _Application, Up, Down, Modules) ->
+ %% normal application
+ case check_appup_clauses_plausible(Up, up, Modules) of
+ ok ->
+ case check_appup_clauses_plausible(Down, down, Modules) of
+ ok ->
+ test_server:format(minor, "OK~n");
+ Error ->
+ test_server:format(minor, "ERROR ~p~n", [Error]),
+ test_server:fail(Error)
+ end;
+ Error ->
+ test_server:format(minor, "ERROR ~p~n", [Error]),
+ test_server:fail(Error)
+ end.
+
+check_appup_clauses_plausible([], _Direction, _Modules) ->
+ ok;
+check_appup_clauses_plausible([{Re, Instrs} | Rest], Direction, Modules)
+ when is_binary(Re) ->
+ case re:compile(Re) of
+ {ok, _} ->
+ case check_appup_instructions(Instrs, Direction, Modules) of
+ ok ->
+ check_appup_clauses_plausible(Rest, Direction, Modules);
+ Error ->
+ Error
+ end;
+ {error, Error} ->
+ {error, {version_regex_malformed, Re, Error}}
+ end;
+check_appup_clauses_plausible([{V, Instrs} | Rest], Direction, Modules)
+ when is_list(V) ->
+ case check_appup_instructions(Instrs, Direction, Modules) of
+ ok ->
+ check_appup_clauses_plausible(Rest, Direction, Modules);
+ Error ->
+ Error
+ end;
+check_appup_clauses_plausible(Clause, _Direction, _Modules) ->
+ {error, {clause_malformed, Clause}}.
+
+check_appup_instructions(Instrs, Direction, Modules) ->
+ case check_instructions(Direction, Instrs, Instrs, [], [], Modules) of
+ {_Good, []} ->
+ ok;
+ {_, Bad} ->
+ {error, {bad_instructions, Bad}}
+ end.
+
+check_instructions(_, [], _, Good, Bad, _) ->
+ {lists:reverse(Good), lists:reverse(Bad)};
+check_instructions(UpDown, [Instr | Rest], All, Good, Bad, Modules) ->
+ case catch check_instruction(UpDown, Instr, All, Modules) of
+ ok ->
+ check_instructions(UpDown, Rest, All, [Instr | Good], Bad, Modules);
+ {error, Reason} ->
+ NewBad = [{Instr, Reason} | Bad],
+ check_instructions(UpDown, Rest, All, Good, NewBad, Modules)
+ end.
+
+check_instruction(up, {add_module, Module}, _, Modules) ->
+ %% A new module is added
+ check_module(Module, Modules);
+check_instruction(down, {add_module, Module}, _, Modules) ->
+ %% An old module is re-added
+ case (catch check_module(Module, Modules)) of
+ {error, {unknown_module, Module, Modules}} -> ok;
+ ok -> throw({error, {existing_readded_module, Module}})
+ end;
+check_instruction(_, {load_module, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {load_module, Module, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_depend(DepMods);
+check_instruction(_, {load_module, Module, Pre, Post, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_depend(DepMods),
+ check_purge(Pre),
+ check_purge(Post);
+check_instruction(up, {delete_module, Module}, _, Modules) ->
+ case (catch check_module(Module, Modules)) of
+ {error, {unknown_module, Module, Modules}} ->
+ ok;
+ ok ->
+ throw({error,{existing_module_deleted, Module}})
+ end;
+check_instruction(down, {delete_module, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, supervisor}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, DepMods}, _, Modules)
+ when is_list(DepMods) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, Change}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change);
+check_instruction(_, {update, Module, Change, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change),
+ check_depend(DepMods);
+check_instruction(_, {update, Module, Change, Pre, Post, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_,
+ {update, Module, Timeout, Change, Pre, Post, DepMods},
+ _,
+ Modules) ->
+ check_module(Module, Modules),
+ check_timeout(Timeout),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_,
+ {update, Module, ModType, Timeout, Change, Pre, Post, DepMods},
+ _,
+ Modules) ->
+ check_module(Module, Modules),
+ check_mod_type(ModType),
+ check_timeout(Timeout),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_, {restart_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {remove_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {add_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {add_application, Application, Type}, _, _) ->
+ check_application(Application),
+ check_restart_type(Type);
+check_instruction(_, Instr, _, _) ->
+ throw({error, {low_level_or_invalid_instruction, Instr}}).
+
+check_module(Module, Modules) ->
+ case {is_atom(Module), lists:member(Module, Modules)} of
+ {true, true} -> ok;
+ {true, false} -> throw({error, {unknown_module, Module}});
+ {false, _} -> throw({error, {bad_module, Module}})
+ end.
+
+check_application(App) ->
+ case is_atom(App) of
+ true -> ok;
+ false -> throw({error, {bad_application, App}})
+ end.
+
+check_depend(Dep) when is_list(Dep) -> ok;
+check_depend(Dep) -> throw({error, {bad_depend, Dep}}).
+
+check_restart_type(permanent) -> ok;
+check_restart_type(transient) -> ok;
+check_restart_type(temporary) -> ok;
+check_restart_type(load) -> ok;
+check_restart_type(none) -> ok;
+check_restart_type(Type) -> throw({error, {bad_restart_type, Type}}).
+
+check_timeout(T) when is_integer(T), T > 0 -> ok;
+check_timeout(default) -> ok;
+check_timeout(infinity) -> ok;
+check_timeout(T) -> throw({error, {bad_timeout, T}}).
+
+check_mod_type(static) -> ok;
+check_mod_type(dynamic) -> ok;
+check_mod_type(Type) -> throw({error, {bad_mod_type, Type}}).
+
+check_purge(soft_purge) -> ok;
+check_purge(brutal_purge) -> ok;
+check_purge(Purge) -> throw({error, {bad_purge, Purge}}).
+
+check_change(soft) -> ok;
+check_change({advanced, _}) -> ok;
+check_change(Change) -> throw({error, {bad_change, Change}}).
+
%% Given two sorted lists, L1 and L2, returns {NotInL2, NotInL1},
%% NotInL2 is the elements of L1 which don't occurr in L2,
%% NotInL1 is the elements of L2 which don't ocurr in L1.
@@ -566,10 +816,19 @@ format_loc1({Mod,Func,Line}) ->
case {lists:member(no_src, get(test_server_logopts)),
lists:reverse(ModStr)} of
{false,[$E,$T,$I,$U,$S,$_|_]} ->
- io_lib:format("{~w,~w,<a href=\"~ts~ts#~w\">~w</a>}",
+ Link = if is_integer(Line) ->
+ integer_to_list(Line);
+ Line == last_expr ->
+ list_to_atom(atom_to_list(Func)++"-last_expr");
+ is_atom(Line) ->
+ atom_to_list(Line);
+ true ->
+ Line
+ end,
+ io_lib:format("{~w,~w,<a href=\"~ts~ts#~s\">~w</a>}",
[Mod,Func,
test_server_ctrl:uri_encode(downcase(ModStr)),
- ?src_listing_ext,Line,Line]);
+ ?src_listing_ext,Link,Line]);
_ ->
io_lib:format("{~w,~w,~w}",[Mod,Func,Line])
end.
@@ -583,6 +842,69 @@ downcase([], Result) ->
lists:reverse(Result).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_start() -> ok
+%%
+%% Start local utility process
+util_start() ->
+ Starter = self(),
+ case whereis(?MODULE) of
+ undefined ->
+ spawn_link(fun() ->
+ register(?MODULE, self()),
+ util_loop(#util_state{starter=Starter})
+ end);
+ _Pid ->
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_stop() -> ok
+%%
+%% Stop local utility process
+util_stop() ->
+ try (?MODULE ! {self(),stop}) of
+ _ ->
+ receive {?MODULE,stopped} -> ok
+ after 5000 -> exit(whereis(?MODULE), kill)
+ end
+ catch
+ _:_ ->
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% unique_name() -> string()
+%%
+unique_name() ->
+ ?MODULE ! {self(),unique_name},
+ receive {?MODULE,Name} -> Name
+ after 5000 -> exit({?MODULE,no_util_process})
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_loop(State) -> ok
+%%
+util_loop(State) ->
+ receive
+ {From,unique_name} ->
+ {_,S,Us} = now(),
+ Ms = trunc(Us/1000),
+ Name = lists:flatten(io_lib:format("~w.~w", [S,Ms])),
+ if Name == State#util_state.latest_name ->
+ timer:sleep(1),
+ self() ! {From,unique_name},
+ util_loop(State);
+ true ->
+ From ! {?MODULE,Name},
+ util_loop(State#util_state{latest_name = Name})
+ end;
+ {From,stop} ->
+ catch unlink(State#util_state.starter),
+ From ! {?MODULE,stopped},
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% call_trace(TraceSpecFile) -> ok
%%
%% Read terms on format {m,Mod} | {f,Mod,Func}
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 189a71a8ce..d6d2e865e2 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,7 +24,7 @@
-module(ts).
--export([run/0, run/1, run/2, run/3, run/4,
+-export([run/0, run/1, run/2, run/3, run/4, run/5,
tests/0, tests/1,
install/0, install/1,
bench/0, bench/1, bench/2, benchmarks/0,
@@ -212,6 +212,12 @@ run_all(_Vars) ->
run_some([], _Opts) ->
ok;
+run_some([{Spec,Mod}|Specs], Opts) ->
+ case run(Spec, Mod, Opts) of
+ ok -> ok;
+ Error -> io:format("~p: ~p~n",[{Spec,Mod},Error])
+ end,
+ run_some(Specs, Opts);
run_some([Spec|Specs], Opts) ->
case run(Spec, Opts) of
ok -> ok;
@@ -263,8 +269,17 @@ run(List, Opts) when is_list(List), is_list(Opts) ->
run_some(List, Opts);
%% run/2
-%% Runs one test spec with Options
-run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
+%% Runs one test spec with list of suites or with options
+run(Testspec, ModsOrConfig) when is_atom(Testspec),
+ is_list(ModsOrConfig) ->
+ case is_list_of_suites(ModsOrConfig) of
+ false ->
+ run(Testspec, {config_list,ModsOrConfig});
+ true ->
+ run_some([{Testspec,M} || M <- ModsOrConfig],
+ [batch])
+ end;
+run(Testspec, {config_list,Config}) ->
Options=check_test_get_opts(Testspec, Config),
IsSmoke=proplists:get_value(smoke,Config),
File=atom_to_list(Testspec),
@@ -310,34 +325,95 @@ run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
run_test(File, [{spec,[Spec]}], Options);
%% Runs one module in a spec (interactive)
run(Testspec, Mod) when is_atom(Testspec), is_atom(Mod) ->
- run_test({atom_to_list(Testspec), Mod},
+ run_test({atom_to_list(Testspec),Mod},
[{suite,Mod}],
[interactive]).
%% run/3
%% Run one module in a spec with Config
-run(Testspec,Mod,Config) when is_atom(Testspec), is_atom(Mod), is_list(Config) ->
+run(Testspec, Mod, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
- run_test({atom_to_list(Testspec), Mod},
- [{suite,Mod}],
- Options);
-
-%% Runs one testcase in a module.
-run(Testspec, Mod, Case) when is_atom(Testspec), is_atom(Mod), is_atom(Case) ->
+ run_test({atom_to_list(Testspec),Mod},
+ [{suite,Mod}], Options);
+%% Run multiple modules with Config
+run(Testspec, Mods, Config) when is_atom(Testspec),
+ is_list(Mods),
+ is_list(Config) ->
+ run_some([{Testspec,M} || M <- Mods], Config);
+%% Runs one test case in a module.
+run(Testspec, Mod, Case) when is_atom(Testspec),
+ is_atom(Mod),
+ is_atom(Case) ->
+ Options=check_test_get_opts(Testspec, []),
+ Args = [{suite,Mod},{testcase,Case}],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Runs one or more groups in a module.
+run(Testspec, Mod, Grs={group,_Groups}) when is_atom(Testspec),
+ is_atom(Mod) ->
Options=check_test_get_opts(Testspec, []),
- Args = [{suite,atom_to_list(Mod)},{testcase,atom_to_list(Case)}],
+ Args = [{suite,Mod},Grs],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Runs one or more test cases in a module.
+run(Testspec, Mod, TCs={testcase,_Cases}) when is_atom(Testspec),
+ is_atom(Mod) ->
+ Options=check_test_get_opts(Testspec, []),
+ Args = [{suite,Mod},TCs],
run_test(atom_to_list(Testspec), Args, Options).
%% run/4
-%% Run one testcase in a module with Options.
+%% Run one test case in a module with Options.
run(Testspec, Mod, Case, Config) when is_atom(Testspec),
is_atom(Mod),
is_atom(Case),
is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
- Args = [{suite,atom_to_list(Mod)}, {testcase,atom_to_list(Case)}],
+ Args = [{suite,Mod},{testcase,Case}],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Run one or more test cases in a module with Options.
+run(Testspec, Mod, {testcase,Cases}, Config) when is_atom(Testspec),
+ is_atom(Mod) ->
+ run(Testspec, Mod, Cases, Config);
+run(Testspec, Mod, Cases, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Cases),
+ is_list(Config) ->
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Cases],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Run one or more groups in a module with Options.
+run(Testspec, Mod, Grs={group,_Groups}, Config) when is_atom(Testspec),
+ is_atom(Mod) ->
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Grs],
run_test(atom_to_list(Testspec), Args, Options).
+%% run/5
+%% Run one or more test cases in a group with Options.
+run(Testspec, Mod, Group, Cases, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Config) ->
+ Group1 = if is_tuple(Group) -> Group; true -> {group,Group} end,
+ Cases1 = if is_tuple(Cases) -> Cases; true -> {testcase,Cases} end,
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Group1,Cases1],
+ run_test(atom_to_list(Testspec), Args, Options).
+
+is_list_of_suites(List) ->
+ lists:all(fun(Suite) ->
+ S = if is_atom(Suite) -> atom_to_list(Suite);
+ true -> Suite
+ end,
+ try lists:last(string:tokens(S,"_")) of
+ "SUITE" -> true;
+ "suite" -> true;
+ _ -> false
+ catch
+ _:_ -> false
+ end
+ end, List).
+
%% Create a spec to skip all SUITES, this is used when the application
%% to be tested is not part of the OTP release to be tested.
create_skip_spec(Testspec, SuitesToSkip) ->
@@ -565,16 +641,17 @@ get_last_app_tests([Dir|Dirs],RE,Acc) ->
NewAcc =
case re:run(Dir,RE,[{capture,all,list}]) of
{match,[Dir,AppStr]} ->
+ Dir1 = filename:dirname(Dir), % cover logs in ct_run.<t> dir
App = list_to_atom(AppStr),
case lists:keytake(App,1,Acc) of
{value,{App,LastDir},Rest} ->
- if Dir > LastDir ->
- [{App,Dir}|Rest];
+ if Dir1 > LastDir ->
+ [{App,Dir1}|Rest];
true ->
Acc
end;
false ->
- [{App,Dir} | Acc]
+ [{App,Dir1} | Acc]
end;
_ ->
Acc
diff --git a/lib/test_server/src/ts.unix.config b/lib/test_server/src/ts.unix.config
index 5a2580f464..1ba5d9033e 100644
--- a/lib/test_server/src/ts.unix.config
+++ b/lib/test_server/src/ts.unix.config
@@ -2,3 +2,5 @@
%% Always run a (VNC) X server on host
%% {xserver, "xserver.example.com:66"}.
+
+{unix,[{telnet,"belegost"},{username,"telnet-test"},{password,"tset-tenlet"},{keep_alive,true}]}.
diff --git a/lib/test_server/src/ts_erl_config.erl b/lib/test_server/src/ts_erl_config.erl
index 8cd6a333d8..2d45d39700 100644
--- a/lib/test_server/src/ts_erl_config.erl
+++ b/lib/test_server/src/ts_erl_config.erl
@@ -109,7 +109,10 @@ erts_lib(Vars,OsType) ->
ErtsLibIncludeInternal,
ErtsLibIncludeInternalGenerated,
ErtsLibPath,
- ErtsLibInternalPath}
+ ErtsLibInternalPath,
+ ErtsLibEthreadMake,
+ ErtsLibInternalMake
+ }
= case erl_root(Vars) of
{installed, _Root} ->
Erts = lib_dir(Vars, erts),
@@ -117,12 +120,17 @@ erts_lib(Vars,OsType) ->
ErtsIncludeInternal = filename:join([ErtsInclude, "internal"]),
ErtsLib = filename:join([Erts, "lib"]),
ErtsLibInternal = filename:join([ErtsLib, "internal"]),
+ ErtsEthreadMake = filename:join([ErtsIncludeInternal, "ethread.mk"]),
+ ErtsInternalMake = filename:join([ErtsIncludeInternal, "erts_internal.mk"]),
+
{ErtsInclude,
ErtsInclude,
ErtsIncludeInternal,
ErtsIncludeInternal,
ErtsLib,
- ErtsLibInternal};
+ ErtsLibInternal,
+ ErtsEthreadMake,
+ ErtsInternalMake};
{srctree, Root, Target} ->
Erts = filename:join([Root, "erts"]),
ErtsInclude = filename:join([Erts, "include"]),
@@ -136,12 +144,17 @@ erts_lib(Vars,OsType) ->
"lib",
"internal",
Target]),
+ ErtsEthreadMake = filename:join([ErtsIncludeInternalTarget, "ethread.mk"]),
+ ErtsInternalMake = filename:join([ErtsIncludeInternalTarget, "erts_internal.mk"]),
+
{ErtsInclude,
ErtsIncludeTarget,
ErtsIncludeInternal,
ErtsIncludeInternalTarget,
ErtsLib,
- ErtsLibInternal}
+ ErtsLibInternal,
+ ErtsEthreadMake,
+ ErtsInternalMake}
end,
[{erts_lib_include,
quote(filename:nativename(ErtsLibInclude))},
@@ -154,7 +167,9 @@ erts_lib(Vars,OsType) ->
{erts_lib_path, quote(filename:nativename(ErtsLibPath))},
{erts_lib_internal_path, quote(filename:nativename(ErtsLibInternalPath))},
{erts_lib_multi_threaded, erts_lib_name(multi_threaded, OsType)},
- {erts_lib_single_threaded, erts_lib_name(single_threaded, OsType)}
+ {erts_lib_single_threaded, erts_lib_name(single_threaded, OsType)},
+ {erts_lib_make_ethread, quote(ErtsLibEthreadMake)},
+ {erts_lib_make_internal, quote(ErtsLibInternalMake)}
| Vars].
erl_include(Vars) ->
@@ -190,10 +205,10 @@ erl_interface(Vars,OsType) ->
case erl_root(Vars) of
{installed, _Root} ->
{filename:join(Dir, "lib"),
- filename:join(Dir, "src")};
+ filename:join([Dir, "src", "eidefs.mk"])};
{srctree, _Root, Target} ->
{filename:join([Dir, "obj", Target]),
- filename:join([Dir, "src", Target])}
+ filename:join([Dir, "src", Target, "eidefs.mk"])}
end}
end,
Lib = link_library("erl_interface",OsType),
@@ -234,10 +249,10 @@ erl_interface(Vars,OsType) ->
end,
[{erl_interface_libpath, quote(filename:nativename(LibPath))},
{erl_interface_sock_libs, sock_libraries(OsType)},
- {erl_interface_lib, Lib},
- {erl_interface_eilib, Lib1},
- {erl_interface_lib_drv, LibDrv},
- {erl_interface_eilib_drv, Lib1Drv},
+ {erl_interface_lib, quote(filename:join(LibPath, Lib))},
+ {erl_interface_eilib, quote(filename:join(LibPath, Lib1))},
+ {erl_interface_lib_drv, quote(filename:join(LibPath, LibDrv))},
+ {erl_interface_eilib_drv, quote(filename:join(LibPath, Lib1Drv))},
{erl_interface_threadlib, ThreadLib},
{erl_interface_include, quote(filename:nativename(Incl))},
{erl_interface_mk_include, quote(filename:nativename(MkIncl))}
@@ -260,7 +275,7 @@ ic(Vars, OsType) ->
end,
[{ic_classpath, quote(filename:nativename(ClassPath))},
{ic_libpath, quote(filename:nativename(LibPath))},
- {ic_lib, link_library("ic", OsType)},
+ {ic_lib, quote(filename:join(filename:nativename(LibPath),link_library("ic", OsType)))},
{ic_include_path, quote(filename:nativename(Incl))}|Vars].
jinterface(Vars, _OsType) ->
@@ -370,9 +385,18 @@ separators(Vars, {win32,_}) ->
separators(Vars, _) ->
[{'DS',"/"},{'PS',":"}|Vars].
-quote([$ |R]) ->
- "\\ "++quote(R);
-quote([C|R]) ->
- [C|quote(R)];
-quote([]) ->
- [].
+quote(List) ->
+ case lists:member($ , List) of
+ false -> List;
+ true -> make_quote(List)
+ end.
+
+make_quote(List) ->
+ case os:type() of
+ {win32, _} -> %% nmake"
+ [$"] ++ List ++ [$"];
+ _ -> %% make
+ BackQuote = fun($ , Acc) -> [$\\ , $ |Acc];
+ (Char, Acc) -> [Char|Acc] end,
+ lists:foldr(BackQuote, [], List)
+ end.
diff --git a/lib/test_server/src/ts_install.erl b/lib/test_server/src/ts_install.erl
index e9e559df5d..594e619fbc 100644
--- a/lib/test_server/src/ts_install.erl
+++ b/lib/test_server/src/ts_install.erl
@@ -18,7 +18,6 @@
%%
-module(ts_install).
-
-export([install/2, platform_id/1]).
-include("ts.hrl").
@@ -112,6 +111,12 @@ get_vars([], name, [], Result) ->
get_vars(_, _, _, _) ->
{error, fatal_bad_conf_vars}.
+config_flags() ->
+ case os:getenv("CONFIG_FLAGS") of
+ false -> [];
+ CF -> string:tokens(CF, " \t\n")
+ end.
+
unix_autoconf(XConf) ->
Configure = filename:absname("configure"),
Flags = proplists:get_value(crossflags,XConf,[]),
@@ -122,19 +127,69 @@ unix_autoconf(XConf) ->
erlang:system_info(threads) /= false],
Debug = [" --enable-debug-mode" ||
string:str(erlang:system_info(system_version),"debug") > 0],
- Args = Host ++ Build ++ Threads ++ Debug,
+ MXX_Build = [Y || Y <- config_flags(),
+ Y == "--enable-m64-build"
+ orelse Y == "--enable-m32-build"],
+ Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build,
case filelib:is_file(Configure) of
true ->
OSXEnv = macosx_cflags(),
- io:format("Running ~sEnv: ~p~n",
- [lists:flatten(Configure ++ Args),Env++OSXEnv]),
+ UnQuotedEnv = assign_vars(unquote(Env++OSXEnv)),
+ io:format("Running ~s~nEnv: ~p~n",
+ [lists:flatten(Configure ++ Args),UnQuotedEnv]),
Port = open_port({spawn, lists:flatten(["\"",Configure,"\"",Args])},
- [stream, eof, {env,Env++OSXEnv}]),
+ [stream, eof, {env,UnQuotedEnv}]),
ts_lib:print_data(Port);
false ->
{error, no_configure_script}
end.
+unquote([{Var,Val}|T]) ->
+ [{Var,unquote(Val)}|unquote(T)];
+unquote([]) ->
+ [];
+unquote("\""++Rest) ->
+ lists:reverse(tl(lists:reverse(Rest)));
+unquote(String) ->
+ String.
+
+assign_vars([]) ->
+ [];
+assign_vars([{VAR,FlagsStr} | VARs]) ->
+ [{VAR,assign_vars(FlagsStr)} | assign_vars(VARs)];
+assign_vars(FlagsStr) ->
+ Flags = [assign_all_vars(Str,[]) || Str <- string:tokens(FlagsStr, [$ ])],
+ string:strip(lists:flatten(lists:map(fun(Flag) ->
+ Flag ++ " "
+ end, Flags)), right).
+
+assign_all_vars([$$ | Rest], FlagSoFar) ->
+ {VarName,Rest1} = get_var_name(Rest, []),
+ assign_all_vars(Rest1, FlagSoFar ++ assign_var(VarName));
+assign_all_vars([Char | Rest], FlagSoFar) ->
+ assign_all_vars(Rest, FlagSoFar ++ [Char]);
+assign_all_vars([], Flag) ->
+ Flag.
+
+get_var_name([Ch | Rest] = Str, VarR) ->
+ case valid_char(Ch) of
+ true -> get_var_name(Rest, [Ch | VarR]);
+ false -> {lists:reverse(VarR),Str}
+ end;
+get_var_name([], VarR) ->
+ {lists:reverse(VarR),[]}.
+
+assign_var(VarName) ->
+ case os:getenv(VarName) of
+ false -> "";
+ Val -> Val
+ end.
+
+valid_char(Ch) when Ch >= $a, Ch =< $z -> true;
+valid_char(Ch) when Ch >= $A, Ch =< $Z -> true;
+valid_char(Ch) when Ch >= $0, Ch =< $9 -> true;
+valid_char($_) -> true;
+valid_char(_) -> false.
get_xcomp_flag(Flag, Flags) ->
get_xcomp_flag(Flag, Flag, Flags).
diff --git a/lib/test_server/src/ts_lib.erl b/lib/test_server/src/ts_lib.erl
index 52bb346043..5368960446 100644
--- a/lib/test_server/src/ts_lib.erl
+++ b/lib/test_server/src/ts_lib.erl
@@ -145,16 +145,13 @@ suite_order(sasl) -> 16;
suite_order(tools) -> 18;
suite_order(runtime_tools) -> 19;
suite_order(parsetools) -> 20;
-suite_order(pman) -> 21;
suite_order(debugger) -> 22;
-suite_order(toolbar) -> 23;
suite_order(ic) -> 24;
suite_order(orber) -> 26;
suite_order(inets) -> 28;
suite_order(asn1) -> 30;
suite_order(os_mon) -> 32;
suite_order(snmp) -> 38;
-suite_order(mnesia_session) -> 42;
suite_order(mnesia) -> 44;
suite_order(system) -> 999; %% IMPORTANT: system SHOULD always be last!
suite_order(_) -> 200.
@@ -167,7 +164,7 @@ subst_file(In, Out, Vars) ->
case file:read_file(In) of
{ok, Bin} ->
Subst = subst(b2s(Bin), Vars, []),
- case file:write_file(Out, Subst) of
+ case file:write_file(Out, unicode:characters_to_binary(Subst)) of
ok ->
ok;
{error, Reason} ->
diff --git a/lib/test_server/src/ts_make.erl b/lib/test_server/src/ts_make.erl
index f3266f5836..9cb77ecb12 100644
--- a/lib/test_server/src/ts_make.erl
+++ b/lib/test_server/src/ts_make.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -67,7 +67,17 @@ get_port_data(Port, Last0, Complete0) ->
end.
update_last([C|Rest], Line, true) ->
- io:put_chars(Line),
+ try
+ %% Utf-8 list to utf-8 binary
+ %% (e.g. we assume utf-8 bytes from port)
+ io:put_chars(list_to_binary(Line))
+ catch
+ error:badarg ->
+ %% io:put_chars/1 badarged
+ %% this likely means we had unicode code points
+ %% in our bytes buffer (e.g warning from gcc with åäö)
+ io:put_chars(unicode:characters_to_binary(Line))
+ end,
io:nl(),
update_last([C|Rest], [], false);
update_last([$\r|Rest], Result, Complete) ->
@@ -79,7 +89,7 @@ update_last([C|Rest], Result, Complete) ->
update_last([], Result, Complete) ->
{Result, Complete};
update_last(eof, Result, _) ->
- Result.
+ unicode:characters_to_list(list_to_binary(Result)).
run_make_script({win32, _}, Make, Dir, Makefile) ->
{"run_make.bat",
diff --git a/lib/test_server/src/ts_run.erl b/lib/test_server/src/ts_run.erl
index 60c9a7a4b7..18d021f780 100644
--- a/lib/test_server/src/ts_run.erl
+++ b/lib/test_server/src/ts_run.erl
@@ -224,7 +224,7 @@ make_command(Vars, Spec, State) ->
CrashFile = filename:join(Cwd,State#state.file ++ "_erl_crash.dump"),
case filelib:is_file(CrashFile) of
true ->
- io:format("ts_run: Deleting dump: ~s\n",[CrashFile]),
+ io:format("ts_run: Deleting dump: ~ts\n",[CrashFile]),
file:delete(CrashFile);
false ->
ok
@@ -258,8 +258,8 @@ make_command(Vars, Spec, State) ->
run_batch(Vars, _Spec, State) ->
process_flag(trap_exit, true),
Command = State#state.command ++ " -noinput -s erlang halt",
- ts_lib:progress(Vars, 1, "Command: ~s~n", [Command]),
- io:format(user, "Command: ~s~n",[Command]),
+ ts_lib:progress(Vars, 1, "Command: ~ts~n", [Command]),
+ io:format(user, "Command: ~ts~n",[Command]),
Port = open_port({spawn, Command}, [stream, in, eof]),
Timeout = 30000 * case os:getenv("TS_RUN_VALGRIND") of
false -> 1;
@@ -398,8 +398,9 @@ make_common_test_args(Args0, Options0, _Vars) ->
end,
ConfigFiles = [{config,[filename:join(ConfigPath,File)
|| File <- get_config_files()]}],
- io_lib:format("~100000p",[Args0++Trace++Cover++Logdir++
- ConfigFiles++Options++TimeTrap]).
+ io_lib:format("~100000p",[[{abort_if_missing_suites,true} |
+ Args0++Trace++Cover++Logdir++
+ ConfigFiles++Options++TimeTrap]]).
to_list(X) when is_atom(X) ->
atom_to_list(X);
diff --git a/lib/test_server/test/erl2html2_SUITE.erl b/lib/test_server/test/erl2html2_SUITE.erl
index 37c2b74d8e..908985c879 100644
--- a/lib/test_server/test/erl2html2_SUITE.erl
+++ b/lib/test_server/test/erl2html2_SUITE.erl
@@ -161,7 +161,7 @@ convert_module(Mod,Config) ->
Src = filename:join(DataDir,Mod++".erl"),
Dst = filename:join(PrivDir,Mod++".erl.html"),
io:format("<a href=\"~s\">~s</a>\n",[Src,filename:basename(Src)]),
- ok = erl2html2:convert(Src, Dst, "<html><body>"),
+ ok = erl2html2:convert(Src, Dst, [], "<html><body>"),
io:format("<a href=\"~s\">~s</a>\n",[Dst,filename:basename(Dst)]),
{Src,Dst}.
diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl
index c4faac036b..d1772ac411 100644
--- a/lib/test_server/test/test_server_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl b/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
index f38f768f3b..9658191289 100644
--- a/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
@@ -191,7 +191,7 @@ conf1_end(Config) ->
%% check 2s & 3s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -204,7 +204,7 @@ conf2_end(Config) ->
%% check 3s & 2s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -217,7 +217,7 @@ conf3_end(Config) ->
%% check 6s & 6s & (2s & 3s) & 1s = ~6s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 6500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 7000000 -> exit({bad_parallel_exec,Ms});
Ms < 6000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -230,7 +230,7 @@ conf4_end(Config) ->
%% check 2s & 3s >= 5s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 5500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 6000000 -> exit({bad_parallel_exec,Ms});
Ms < 5000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -243,7 +243,7 @@ conf5_end(Config) ->
%% check 1s & 1s & (3s & 2s) & 1s = ~6s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 7000000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 7500000 -> exit({bad_parallel_exec,Ms});
Ms < 6000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -257,7 +257,7 @@ conf6_end(Config) ->
%% check 3s & 2s < 5s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4500000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -277,7 +277,7 @@ conf7_end(Config) ->
%% check 1s & 1s & (2s & 2s) & 1s = ~3s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -291,7 +291,7 @@ conf8_end(Config) ->
%% check 2s & 2s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 2500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 3000000 -> exit({bad_parallel_exec,Ms});
Ms < 2000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
diff --git a/lib/test_server/test/test_server_SUITE_data/test_server_unicode_SUITE.erl b/lib/test_server/test/test_server_SUITE_data/test_server_unicode_SUITE.erl
index 284b51babe..03f371fc8c 100644
--- a/lib/test_server/test/test_server_SUITE_data/test_server_unicode_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE_data/test_server_unicode_SUITE.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/test_server/vsn.mk b/lib/test_server/vsn.mk
index 6871b5bd14..2a2ed2b3b0 100644
--- a/lib/test_server/vsn.mk
+++ b/lib/test_server/vsn.mk
@@ -1 +1 @@
-TEST_SERVER_VSN = 3.6.4
+TEST_SERVER_VSN = 3.8.1
diff --git a/lib/toolbar/AUTHORS b/lib/toolbar/AUTHORS
deleted file mode 100644
index c5a649d938..0000000000
--- a/lib/toolbar/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-Original Authors and Contributors:
-
-Gunilla Arendt \ No newline at end of file
diff --git a/lib/toolbar/doc/src/bar.gif b/lib/toolbar/doc/src/bar.gif
deleted file mode 100644
index c249d891dd..0000000000
--- a/lib/toolbar/doc/src/bar.gif
+++ /dev/null
Binary files differ
diff --git a/lib/toolbar/doc/src/bar.ps b/lib/toolbar/doc/src/bar.ps
deleted file mode 100644
index 850ebdbee5..0000000000
--- a/lib/toolbar/doc/src/bar.ps
+++ /dev/null
@@ -1,846 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: /home/kent/otp/toolbar/doc/bar.ps
-%%Creator: XV Version 3.10a Rev: 12/29/94 - by John Bradley
-%%BoundingBox: 165 346 447 446
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% define string to hold a scanline's worth of data
-/pix 282 string def
-
-% define space for color conversions
-/grays 282 string def % space for gray scale line
-/npixls 0 def
-/rgbindx 0 def
-
-% lower left corner
-165 346 translate
-
-% size of image (on paper, in 1/72inch coords)
-282.02400 100.00800 scale
-
-282 100 8 % dimensions of data
-[282 0 0 -100 0 100] % mapping matrix
-{currentfile pix readhexstring pop}
-image
-
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c000
-c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-14141414141414141414141414141414141414141414141414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-14141414141414141414141414141414141414141414141414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffffffffffffffffffffffffffffff00ffffffffffffffffffffff
-ffffffff001414ffffffffffffffffffffffffffffff001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c0c0c0c0c0c0c0c0c0
-c0c0c073001414ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141457575757571414141414141457141414141414ffffffffffff1414
-14141414ffff1414141414141414141414141414141414141414141414141414ffffffff
-ffffffff1414141414141414141414141414ffff14141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c00000000000000000
-00c0c073001414ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414575757575714141414145714141414141414ffff141414141414
-14141414ffff1414141414141414141414141414141414141414141414141414141414ff
-ff1414141414141414141414141414141414ffff14141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c00000000000000000
-00c0c073001414ffc0c0c00000c0c0c0c00000c0c073001414c0c0c07300
-c0ffc0c0c01414141414145757575757141414571414141414141414ffff1414141414ff
-ff14ffffffff1414ffffffff1414ffff14ffff141414ffff14ffff1414141414141414ff
-ff14141414ffffffff141414ffffffff1414ffff1414ffffffff14141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c0c00000c0c00000c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141457575757571457141414141414141414ffff1414141414ff
-ffffffffffff14ffff1414ffff14ffffff14ffff14ffff14ffffff1414141414141414ff
-ff141414ffff1414ffff14ffff1414ffff14ffff14ffff1414ffff141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c0c0c000000000c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414575757145714141414141414141414ffffffffffff14ff
-ffff1414ffff1414141414ffff14ffff1414ffff14ffff1414ffff1414141414141414ff
-ff141414ffff1414ffff14ffff1414ffff14ffff14ffffff141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c0c0c0c00000c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414145714575757141414141414141414ffff1414141414ff
-ff141414ffff1414ffffffffff14ffff1414ffff14ffff1414ffff1414141414141414ff
-ff141414ffff1414ffff14ffff1414ffff14ffff141414ffffff14141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c0c0c000000000c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414571457575757571414141414141414ffff1414141414ff
-ff141414ffff14ffff1414ffff14ffff1414ffff14ffff1414ffff1414141414141414ff
-ff141414ffff1414ffff14ffff1414ffff14ffff14141414ffffff141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c0c00000c0c00000c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141457141414575757575714141414141414ffff1414141414ff
-ff141414ffff14ffff1414ffff14ffff1414ffff14ffff14ffffff1414141414141414ff
-ff141414ffff1414ffff14ffff1414ffff14ffff14ffff1414ffff141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0000000000000c0c0c0c07300ffc0c000c0c0c0c0c0c0c0
-00c0c073001414ffc0c0c00000c0c0c0c00000c0c073001414c0c0c07300
-c0ffc0c0c01414141414145714141414145757575757141414141414ffffffffffff14ff
-ff141414ffff1414ffffff14ffffffff1414ffff1414ffff14ffff1414141414141414ff
-ff14141414ffffffff141414ffffffff1414ffff1414ffffffff14141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0000000000000c0c0c0c07300ffc0c00000000000000000
-00c0c073001414ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c014141414145714141414141414575757575714141414141414141414141414
-14141414141414141414141414141414141414141414141414ffff141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ffc0c0c0c0c0c0c0c0c0c0c0c0c07300ffc0c0c0c0c0c0c0c0c0c0
-c0c0c073001414ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414ffff1414ffff141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414ff737373737373737373737373737300ff73737373737373737373
-73737373001414ff7373737373737373737373737373001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-14141414141414141414141414141414141414141414ffffffff14141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414000000000000000000000000000000000000000000000000000000
-00000000001414000000000000000000000000000000001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-14141414141414141414141414141414141414141414141414c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffc0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff82c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d90000000000d9d9d9d9d900d9d9d9d9000000d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9000000d9d9d9d9d9d900d9d9d9d90000
-00d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9000000d9d9d9d9000000d9d9d9d9d9d9
-00d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-000000d9d9d9d9d9d900d9d9d900d90000d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d900d9d9
-d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-00d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900
-d9d9d900d9d9d9d9d900d9d9d90000d9d900d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900000000d9d9d9d9d9d900d9d9d9d9d9d900d9d9d900d9d9
-d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-00d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d900
-d9d9d900d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d9000000
-0000d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-00d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900
-00000000d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d900d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900
-d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d900d9d9
-d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-00d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900
-d9d9d900d9d9d9d9d900d9d9d90000d9d900d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d9d90000
-00d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9000000d9d9d9d9000000d9d9d9d9d9d9
-00d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-000000d9d9d9d9d9d900d9d9d900d90000d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffff8282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282c0c0c07300
-c0ffc0c0c0ff828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffff57c0c0c07300
-c0ffc0c0c0ffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d957c0c0c07300
-c0ffc0c0c0ffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d957c0c0c07300
-c0ffc0c0c0ffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9dbbdd0dbd9d9d9d9d9d9d9dec7a9ded9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d7d7d7474747474747474727272747474747474747474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d95757bebebebe
-bebebebebebebebebebebebebebebebebebebebebe5757d957c0c0c07300
-c0ffc0c0c0ffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9dcd0a9dadad9dbdbd9d9dcd0a9d0dcd9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d7d747474747472727272727272727272747474747474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9575757bebebe
-bebebebebebebebebebebebebebebebebebebebe575757d957c0c0c07300
-c0ffc0c0c0ffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9dad0c3bdb3dadcd4d5dbdbc7b3d0e1d5d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebe000000000000000000bebebebebebebebebebed9ffff
-d9d9bebebebebed7d7d7bebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d74747474727272727272727272777777727274747474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9be575757bebe
-bebebebebebebebebebebebebebebebebebebe57575757d957c0c0c07300
-c0ffc0c0c0ffd9d9bebebe000000000000000000000000000000000000007dbebebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9dcc79ce1bda9bd6f60a9bdbddbe5a9a9d0dad5d4d4d4d9
-ffffd9d9bebebebebebebebebebe007f7f7f7f7f7f7f00bebebebebebebebebebed9ffff
-d9d9bebebebed7d7d7d7d7bebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d747474727272727272727277779e769e777772727474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9bebe575757be
-bebebebebebebebebebebebebebebebebebe57575757bed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9dbd083bde5bd8f536f9cc3dedea96fa9bddcd5d4d4d4d9
-ffffd9d9bebebebebebebebebebe007f7f7f7f7f7f7f00bebebebebebebebebebed9ffff
-d9d9bebebed7d7d7d7d7d7d7bebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebe000000000000000000000000000000000000000000bebebebed9ffffd9d97d7d
-7d747472727272727272727777779e9e7695897777727274747474d9ffffd9d9bebebebe
-000000000000bebebebebebebebebe000000000000bebebebed9ffffd9d9bebebe575757
-bebebebebe00000000000000bebebebebe57575757bebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00000000000000000000000000000000007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9e1b379ded6831f6083d0e58379deded9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebe000000000000000000bebebebebebebebebebed9ffff
-d9d9bebebed7d7d7d7d7d7d7bebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7d7472727272727272727777779e9e7697a6829e77777272747474d9ffffd9d9bebebebe
-002727272700bebebebebebebebebe005757575700bebebebed9ffffd9d9bebebebe5757
-57bebebe0000ffffffffff000000bebe57575757bebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9dcd03cc3d948531f3cdcda60c3ded9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebe00bebebebebebebebebebebebebebed9ffff
-d9d9bebebed7d7d7d7d7d7d7bebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7474727272727272727777777789899d00008d899e777272727474d9ffffd9d9bebebebe
-002727272700bebebebebebebebebe005757575700bebebebed9ffffd9d9bebebebebe57
-5757be0000ffffffffffffffff00be57575757bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d0027ffff2727ff2727ffff2727ffff27007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9d9ea79a99c489c3c11a99c83e5d9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebe00bebebebebebebebebebebebebebed9ffff
-d9d9bebebebed7d7d7d7d7bebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7472727272727272777777897f8d7f7f40007f9782827772727274d9ffffd9d9bebebebe
-002727272700bebebebebebebebebe005757575700bebebebed9ffffd9d9bebebebebebe
-57575700ffffffffffffffffffff57575757bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9d9e1a9606f1f532a116f48bdded9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebe00000000000000000000000000000000bebebebebebebed9ffff
-d9d9bebebebebed7d7d7bebebebebebebebebebebebed7d7d7bebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7272727272727277779e9e897f005600000000007f959e72727274d9ffffd9d9bebebebe
-002727272700bebebebebebebebebe005757575700bebebebed9ffffd9d9bebebebebebe
-be575757ffff00ffffffff00ff57575700bebebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d0027ffff2727ff2727ffff2727ffff27007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9d9d9ea9c3648362a1148d0ded9d9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebe00bebebebebebebebebebebebebebe00bebebebebebebed9ffff
-d9d9bebebebebebebe00bebebebebebebebebebebed7d7d7d7d7bebebebebed9ffffd9d9
-bebebebe000000000000000000000000000000000000000000bebebebed9ffffd9d97d74
-727272727272779e9e9e8976970000000000000000009e77727272d9ffffd9d9bebebebe
-000000000000bebebebe0000000000000000000000bebebebed9ffffd9d9bebebebebebe
-0000575757ffff00ffff00ff575757000000bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9dae5a9534883363c1f1fb3dedcd9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebe00bebebebebebebebebebebebebebe00bebebebebebebed9ffff
-d9d9bebebebebebebe00bebebebebebebebebebed7d7d7d7d7d7d7bebebebed9ffffd9d9
-bebebebe00515151510051ffff510051000051005151515100bebebebed9ffffd9d97d72
-727272779e8982828282827d000000000000000000008977727272d9ffffd9d9bebebebe
-007f7f7f7f00bebebebe0027272727007f7f7f7f00bebebebed9ffffd9d9bebebebebebe
-000000575757ffffffffff57575700000000bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d0027ffff2727ff2727ffff2727ffff27007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9e59c36606083603c2a1f5379dbdbd9d9d9d5d4d4d4d9
-ffffd9d9bebe000000000000000000bebebebebebe000000000000000000bebebed9ffff
-d9d9bebebebebebebebe00bebebebebebebebebed7d7d7d7d7d7d7bebebebed9ffffd9d9
-bebebebe005151515100ffffffff0000000000005151515100bebebebed9ffffd9d97d72
-727777779e893197958d8d89000000000000000000008977727272d9ffffd9d9bebebebe
-007f7f7f7f00bebebebe0027272727007f7f7f7f00bebebebed9ffffd9d9bebebebebebe
-00ff0000575757000000575757000000ff00bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9d9e1a953bd79608f8348302ab34879dedad9d9d5d4d4d4d9
-ffffd9d9bebe005757575757575700bebebebebebe007f7f7f7f7f7f7f00bebebed9ffff
-d9d9bebebebebebebebe00bebebebebebebebebed7d7d7d7d7d7d7bebebebed9ffffd9d9
-bebebebe005151515100ffffffff0000000000005151515100bebebebed9ffffd9d97d72
-7777779e9e823800006e7f00000000000000000000008977727272d9ffffd9d9bebebebe
-007f7f7f7f00bebebebe0027272727007f7f7f7f00bebebebed9ffffd9d9bebebebebe00
-ffff00000057575700575757000000ffffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d0027ffff2727ff2727ffff2727ffff27007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9dbdb53b3ea6f798f7930301fd4a92ad0dcd9d9d5d4d4d4d9
-ffffd9d9bebe005757575757575700bebebebebebe007f7f7f7f7f7f7f00bebebed9ffff
-d9d9bebebebebebebebebe00bebebebebebebebebed7d7d7d7d7bebebebebed9ffffd9d9
-bebebebe00515151510051ffff510051000051005151515100bebebebed9ffffd9d97d77
-77778989567f000000000000000000000000000000009e77727272d9ffffd9d9bebebebe
-007f7f7f7f00bebebebe0027272727007f7f7f7f00bebebebed9ffffd9d9bebebebebe00
-ffffff000000575757575700000000ffffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4d9e1a99cdee58f6f9c6f303c1fb3e560bde1d9d9d5d4d4d4d9
-ffffd9d9bebe000000000000000000bebebebebebe000000000000000000bebebed9ffff
-d9d9bebebebebebebebebe00bebebebebebebebebe00d7d7d7bebebebebebed9ffffd9d9
-bebebebe000000000000000000000000000000000000000000bebebebed9ffffd9d97d9e
-8282768d9500000000000000000000000000000000899e77777272d9ffffd9d9bebebebe
-000000000000000000000000000000000000000000bebebebed9ffffd9d9bebebebebe00
-ffffffff00000057575700000000ffffffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00272727272727272727272727272727007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d4dbd06fd4e19c48608f532a3630bdeaa953d0ded9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebe00bebebebebebebed9ffff
-d9d9bebebebebebebebebebe00bebebebebebebe00bebebebebebebebebebed9ffffd9d9
-bebebebe005151515100510000510051ffff51005151515100bebebebed9ffffd9d97d9e
-8282768d9500000000000000000000000000000000899e77777272d9ffffd9d9bebebebe
-005757575700d7d7d7d7005757575700ffffffff00bebebebed9ffffd9d9bebebebebe00
-ffffffffff0057575757570000ffffffffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d00000000000000000000000000000000007d007dbebebebe
-bed9ffffd9d9d4d4d4d4d5de6f79ea9c112a606f6f3c11116fc7ea606fdad9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebe00bebebebebebebed9ffff
-d9d9bebebebebebebebebebe00bebebebebebe00bebebebebebebebebebebed9ffffd9d9
-bebebebe0051515151000000000000ffffffff005151515100bebebebed9ffffd9d97d77
-77778989567f000000000000000000000000000000009e77727272d9ffffd9d9bebebebe
-005757575700d7d7d7d7005757575700ffffffff00bebebebed9ffffd9d9bebebebebe00
-ffff00ffffff575700575757ffffff00ffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebe007d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d007dbebebebe
-bed9ffffd9d9d4d4d4d4d6d053c7c71f1f3c484848361f034860a9d57983d9d6d4d4d4d9
-ffffd9d9bebebebebebebebebe00000000000000000000000000bebebebebebebed9ffff
-d9d9bebebebebebebebebebebe00bebebebebe00bebebebebebebebebebebed9ffffd9d9
-bebebebe0051515151000000000000ffffffff005151515100bebebebed9ffffd9d97d72
-7777779e9e823800006e7f00000000000000000000008977727272d9ffffd9d9bebebebe
-005757575700d7d7d7d7005757575700ffffffff00bebebebed9ffffd9d9bebebebebe00
-ffff00ffff570057ffff575757ffff00ffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9bebebe000000000000000000000000000000000000007d7d7dbebebe
-bed9ffffd9d9d4d4d4d4d6d0a9da601130363648111f111160303cc7d09cd4d6d4d4d4d9
-ffffd9d9bebebebebebebebebe00bebebebebebebebebebebe00bebebebebebebed9ffff
-d9d9bebebebebebebebebebebe00be7f7f7f00bebebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100510000510051ffff51005151515100bebebebed9ffffd9d97d72
-727777779e893197958d8d89000000000000000000008977727272d9ffffd9d9bebebebe
-005757575700d7d7d7d7005757575700ffffffff00bebebebed9ffffd9d9bebebebebe00
-ffff000057005700ffff005757570000ffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be00000000000000000000000000000000000000000000007dbebebe
-bed9ffffd9d9d4d4d4d4d4d9e5bd111f489c1f2a11030330bd79366fe5dedad5d4d4d4d9
-ffffd9d9bebebebebe000000000000000000bebebe000000000000000000bebebed9ffff
-d9d9bebebebebebebebebebebebe7f7f7f7f7fbebebebebebebebebebebebed9ffffd9d9
-bebebebe000000000000000000000000000000000000000000bebebebed9ffffd9d97d72
-727272779e8982828282827d000000000000000000008977727272d9ffffd9d9bebebebe
-000000000000000000000000000000000000000000bebebebed9ffffd9d9bebebebebebe
-00ffff570057ff0000000000575757ffffff00bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d007dbebe
-bed9ffffd9d9d4d4d4d4d4d9e58f0379d6d653111f11116fead41f83e5dad9d5d4d4d4d9
-ffffd9d9bebebebebe007f7f7f7f7f7f7f00bebebe005757575757575700bebebed9ffff
-d9d9bebebebebebebebebebebe7f7f7f7f7f7f7fbebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d74
-727272727272779e9e9e8976970000000000000000009e77727272d9ffffd9d9bebebebe
-00d7d7d7d700ffffffff007f7f7f7f002727272700bebebebed9ffffd9d9bebebebebebe
-00ff5757570000000000000000575757ff00bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d7d007d007d007d007d007d007d007d007d007d7d007d7dbebe
-bed9ffffd9d9d4d4d4d4d4d9e57903c7e5e5831103032ac3ea8f48d0dcd9d9d5d4d4d4d9
-ffffd9d9bebebebebe007f7f7f7f7f7f7f00bebebe005757575757575700bebebed9ffff
-d9d9bebebebebebebebebebebe7f7f7f7f7f7f7fbebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7272727272727277779e9e897f005600000000007f959e72727274d9ffffd9d9bebebebe
-00d7d7d7d700ffffffff007f7f7f7f002727272700bebebebed9ffffd9d9bebebebebebe
-be57575700000000000000000000575757bebebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d00be00be00be00be00be00be00be00be00be007d007d7dbebe
-bed9ffffd9d9d4d4d4d4d4d9debd2a60dee1d060112a9ceac3368fe5d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebe000000000000000000bebebe000000000000000000bebebed9ffff
-d9d9bebebebebebebebebebebe7f7f7f7f7f7f7fbebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7472727272727272777777897f8d7f7f40007f9782827772727274d9ffffd9d9bebebebe
-00d7d7d7d700ffffffff007f7f7f7f002727272700bebebebed9ffffd9d9bebebebebebe
-57575700ff0000ff0000ff0000ffff575757bebebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d7d007d007d007d007d007d007d007d007d007d7d00007dbebe
-bed9ffffd9d9d4d4d4d4d4d9d9e1c34860d9e5d6a9c3e5c7481fd0ded9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebe7f7f7f7f7fbebebebebebebebebebebebed9ffffd9d9
-bebebebe005151515100515151510051515151005151515100bebebebed9ffffd9d97d7d
-7474727272727272727777777789899d00008d899e777272727474d9ffffd9d9bebebebe
-00d7d7d7d700ffffffff007f7f7f7f002727272700bebebebed9ffffd9d9bebebebebe57
-5757be0000ffffffffffffffffff00be575757bebebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d0000bebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9e1d65360d4e1deded453308fe1d9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebe7f7f7fbebebebebebebebebebebebebed9ffffd9d9
-bebebebe000000000000000000000000000000000000000000bebebebed9ffffd9d97d7d
-7d7472727272727272727777779e9e7697a6829e77777272747474d9ffffd9d9bebebebe
-000000000000000000000000000000000000000000bebebebed9ffffd9d9bebebebe5757
-57bebebe00ffffffffffffff0000bebebe575757bebebed957c0c0c07300
-c0ffc0c0c0ffd9d9be007d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d0000bebe
-bed9ffffd9d9d4d4d4d4d4d9d9d9d9dee13c60d9dbdebd7960d0dcd9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d747472727272727272727777779e9e7695897777727274747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9bebebe575757
-bebebebebe00000000000000bebebebebebe575757bebed957c0c0c07300
-c0ffc0c0c0ffd9d9be0000000000000000000000000000000000000000000000007dbebe
-bed9ffffd9d9d4d4d4d4d4d9d9dadee19c2a8fc7dcd9dcde83bde1d9d9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d747474727272727272727277779e769e777772727474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9bebe575757be
-bebebebebebebebebebebebebebebebebebebe575757bed957c0c0c07300
-c0ffc0c0c0ffd9d9bebebe7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7dbebe
-bed9ffffd9d9d4d4d4d4d4d9dad0bd9c9cb3dedbd9d9d9dbd083c3dcd9d9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d74747474727272727272727272777777727274747474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9be575757bebe
-bebebebebebebebebebebebebebebebebebebebe575757d957c0c0c07300
-c0ffc0c0c0ffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebe
-bed9ffffd9d9d4d4d4d4d4d9dbd09ca9e5e1dad9d9d9d9d9debda9d6dad9d9d5d4d4d4d9
-ffffd9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffff
-d9d9bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9
-bebebebebebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d97d7d
-7d7d7d747474747472727272727272727272747474747474747474d9ffffd9d9bebebebe
-bebebebebebebebebebebebebebebebebebebebebebebebebed9ffffd9d9575757bebebe
-bebebebebebebebebebebebebebebebebebebebebe5757d957c0c0c07300
-c0ffc0c0c0ffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d957c0c0c07300
-c0ffc0c0c057575757575757575757575757575757575757575757575757575757575757
-5757ff575757575757575757575757575757575757575757575757575757575757575757
-ff575757575757575757575757575757575757575757575757575757575757575757ff57
-5757575757575757575757575757575757575757575757575757575757575757ff575757
-575757575757575757575757575757575757575757575757575757575757ff5757575757
-57575757575757575757575757575757575757575757575757575757ff57575757575757
-5757575757575757575757575757575757575757575757575757ff575757575757575757
-57575757575757575757575757575757575757575757575757c0c0c07300
-c0ffc0c0c0bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbf
-bfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfc0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0bfd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c07300
-c07373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737300
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
diff --git a/lib/toolbar/doc/src/book.xml b/lib/toolbar/doc/src/book.xml
deleted file mode 100644
index ec264782f9..0000000000
--- a/lib/toolbar/doc/src/book.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE book SYSTEM "book.dtd">
-
-<book xmlns:xi="http://www.w3.org/2001/XInclude">>
- <header titlestyle="normal">
- <copyright>
- <year>1997</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar</title>
- <prepared>Joakim Greben&ouml;</prepared>
- <docno></docno>
- <date>1997-05-02</date>
- <rev>1.0.2</rev>
- <file>book.sgml</file>
- </header>
- <insidecover>
- </insidecover>
- <pagetext>Toolbar</pagetext>
- <preamble>
- <contents level="2"></contents>
- </preamble>
- <parts lift="no">
- <xi:include href="part.xml"/>
- </parts>
- <applications>
- <xi:include href="ref_man.xml"/>
- </applications>
- <releasenotes>
- <xi:include href="notes.xml"/>
- </releasenotes>
- <listofterms></listofterms>
- <index></index>
-</book>
-
diff --git a/lib/toolbar/doc/src/create_tool.gif b/lib/toolbar/doc/src/create_tool.gif
deleted file mode 100644
index b55bb809d3..0000000000
--- a/lib/toolbar/doc/src/create_tool.gif
+++ /dev/null
Binary files differ
diff --git a/lib/toolbar/doc/src/create_tool.ps b/lib/toolbar/doc/src/create_tool.ps
deleted file mode 100644
index 8d6961bb9f..0000000000
--- a/lib/toolbar/doc/src/create_tool.ps
+++ /dev/null
@@ -1,5050 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: /home/kent/otp/toolbar/doc/create_tool.ps
-%%Creator: XV Version 3.10a Rev: 12/29/94 - by John Bradley
-%%BoundingBox: 165 29 575 446
-%%Pages: 1
-%%DocumentFonts:
-%%EndComments
-%%EndProlog
-
-%%Page: 1 1
-
-% remember original state
-/origstate save def
-
-% build a temporary dictionary
-20 dict begin
-
-% define string to hold a scanline's worth of data
-/pix 410 string def
-
-% define space for color conversions
-/grays 410 string def % space for gray scale line
-/npixls 0 def
-/rgbindx 0 def
-
-% lower left corner
-165 29 translate
-
-% size of image (on paper, in 1/72inch coords)
-409.96800 417.02400 scale
-
-410 417 8 % dimensions of data
-[410 0 0 -417 0 417] % mapping matrix
-{currentfile pix readhexstring pop}
-image
-
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c000
-c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffff7300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffffffffffffff
-ffffffffffffffff00ffffffffffffffffffffffffffffff001414ffffffffffffffffff
-ffffffffffff001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414ffc0c0c0c0c0c0c0c0
-c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c014141414575757575714141414141414571414141414141414ffffffff1414
-14141414141414141414141414141414141414ffff14141414141414141414141414ffff
-ffffffffffff1414141414141414141414141414ffff141414141414ffffffffffffffff
-14ffff141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c0000000000000000000c0c073001414ffc0c0c0c0c0c0c0c0
-c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c0141414141457575757571414141414571414141414141414ffff1414ffff14
-14141414141414141414141414141414141414ffff141414141414141414141414141414
-14ffff1414141414141414141414141414141414ffff141414141414ffff141414141414
-14ffff141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c0000000000000000000c0c073001414ffc0c0c00000c0c0c0
-c00000c0c073001414c0c0c07300
-c0ffc0c0c01414141414145757575757141414571414141414141414ffff1414141414ff
-ff14ffff14ffffffff141414ffffffff1414ffffffff1414ffffffff1414141414141414
-14ffff14141414ffffffff141414ffffffff1414ffff141414141414ffff14141414ffff
-14ffff1414ffffffff141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c0c00000c0c0
-0000c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141457575757571457141414141414141414ffff1414141414ff
-ffffffffffff1414ffff14ffff1414ffff1414ffff1414ffff1414ffff14141414141414
-14ffff141414ffff1414ffff14ffff1414ffff14ffff141414141414ffff14141414ffff
-14ffff14ffff1414ffff1414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c0c0c0000000
-00c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414575757145714141414141414141414ffff1414141414ff
-ffff1414ffff1414ffff1414141414ffff1414ffff1414ffff1414ffff14141414141414
-14ffff141414ffff1414ffff14ffff1414ffff14ffff141414141414ffffffffff14ffff
-14ffff14ffff1414ffff1414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c0c0c0c00000
-c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414145714575757141414141414141414ffff1414141414ff
-ff141414ffffffffffff1414ffffffffff1414ffff1414ffffffffffff14141414141414
-14ffff141414ffff1414ffff14ffff1414ffff14ffff141414141414ffff14141414ffff
-14ffff14ffffffffffff1414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c0c0c0000000
-00c0c0c0c073001414c0c0c07300
-c0ffc0c0c01414141414141414571457575757571414141414141414ffff1414141414ff
-ff141414ffff1414141414ffff1414ffff1414ffff1414ffff1414141414141414141414
-14ffff141414ffff1414ffff14ffff1414ffff14ffff141414141414ffff14141414ffff
-14ffff14ffff141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c0c00000c0c0
-0000c0c0c073001414c0c0c07300
-c0ffc0c0c0141414141414145714141457575757571414141414141414ffff1414ffffff
-ff141414ffff1414ffff14ffff1414ffff1414ffff14ffffff1414ffff14141414141414
-14ffff141414ffff1414ffff14ffff1414ffff14ffff141414141414ffff14141414ffff
-14ffff14ffff1414ffff1414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0000000
-000000c0c0c0c07300ffc0c000c0c0c0c0c0c0c000c0c073001414ffc0c0c00000c0c0c0
-c00000c0c073001414c0c0c07300
-c0ffc0c0c014141414141457141414141457575757571414141414141414ffffffff14ff
-ff14141414ffffffff141414ffffff14ffff1414ffff1414ffffffff1414141414141414
-14ffff14141414ffffffff141414ffffffff1414ffff141414141414ffff14141414ffff
-14ffff1414ffffffff141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0000000
-000000c0c0c0c07300ffc0c0000000000000000000c0c073001414ffc0c0c0c0c0c0c0c0
-c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c014141414145714141414141414575757575714141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ffc0c0c0c0c0c0
-c0c0c0c0c0c0c07300ffc0c0c0c0c0c0c0c0c0c0c0c0c073001414ffc0c0c0c0c0c0c0c0
-c0c0c0c0c073001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-1414141414141414141414141414141414141414141414141414141414ff737373737373
-737373737373737300ff7373737373737373737373737373001414ff7373737373737373
-737373737373001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141400000000000000
-000000000000000000000000000000000000000000000000001414000000000000000000
-000000000000001414c0c0c07300
-c0ffc0c0c014141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414141414141414141414141414141414141414141414141414141414
-141414141414141414c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff82c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282828282828282828282828282828282828282828282828282828282d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282ffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9
-d9d900d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-000000d9d9d9d9d9d900d9d9d9d9000000d9d9d9d9d9d9d9d9d9d900d90000d9d9d9d900
-0000d9d9d90000d900d9d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d9d9000000d9d9d900d90000d9d9d9
-d9000000d9d9d9d9d9d900d9d9d90000d900d9d9d900d9d9d900d9d90000000000d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d90000000000d9d9d900
-0000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d9d9d9d9d90000d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d900d9d9d9d900d9d9d900d9d90000d9d900d9d9
-00d9d9d900d9d9d9d900d9d9d9d900d900d900d9d900d9d9d900d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900000000d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d900d9d9d9d900d9d9d9d9d9d900d9d9d9d9d9d9
-00d9d9d9d9d9d9d9d900d9d9d9d900d900d900d9d9d900d9d900d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d90000000000d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-000000d9d900d900d900d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d900d9d9d9d9d9d9000000d9d9d900d9d9d9d9d9d9
-00d9d9d9d9d9d9d900d9d9d9d9d900d900d900d9d9d900d9d900d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d900d9d9d9d9d9d9d9d9d900d9d900d9d9d9d9d9d9
-00d9d9d9d9d9d9d900d9d9d9d9d900d900d900d9d9d9d900d900d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d900d9d9d9d9d9d900d9d9d900d9d900d9d9d9d9d9d9
-00d9d9d900d9d900d9d9d9d9d9d900d900d900d9d9d9d90000d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d90000d9d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d900d9d9d9d9000000d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-000000d9d900d900d900d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d900d9d9d9d9d9d9d9000000d9d9d900d9d9d9d9d9d9
-d9000000d9d9d900d9d9d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d90000d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d90000d9d9d9d9d9d90000d9d9d900
-0000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffff8282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ff828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff82c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282828282828282828282828282828282828282828282828282828282d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282ffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d90000d9d9d9d900
-0000d9d9d90000d900d9d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d90000d9d90000d9d900d9d9d900d9d9d9d9d9d9d9d9d9
-d9000000d9d9d900d9d9d900d9d900d90000d9d9d9d9d9d9d9d9d9d90000000000d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d90000d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d90000d9d90000d9d900d9d9d900d9d9d9d9d9d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d90000d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d90000d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9
-00d9d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-000000d9d900d900d900d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d90000d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9
-00d9d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d900d900d9d9d9d9d9d9d9d9d9
-00d9d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d900d9
-d9d900d9d900d900d900d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9
-00d9d9d900d9d900d900d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-000000d9d900d900d900d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9000000d9d9d9d900d900d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d90000d9d9d9
-000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282d9d9
-d9d982828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282ffd9d9
-d9d982828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282ffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d90000000000d9d9d900
-0000d9d9d900d90000d9d9d90000000000d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9000000d9d9d900d90000d9d9d90000000000d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d90000d900d9d9d900d9d9d900d9d90000000000d9d9d9000000d9d9d9d900
-0000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d900d9d9d9d900d9
-d9d900d9d90000d9d900d9d9d9d900d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d90000d9d900d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d900d9d9d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000d9d9d9d9d900d9d9d9d9d9d9
-d9d900d9d900d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d900d9d9d900d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d9d900d9d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d9d9d900
-000000d9d900d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d900d9d9d900d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d9d900d9d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d900d9d9d900d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d9d9d900d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d900d9
-d9d900d9d900d9d9d9d9d9d9d9d900d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d900d9d9d900d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d9d9d90000d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d90000d9d9d900
-000000d9d900d9d9d9d9d9d9d9d9d90000d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d90000d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d900d900d900d9d9d9d9d900d9d9d9d9d9d90000d9d9d9000000d9d9d9d900
-0000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9
-d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9d9
-d9d98282ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9d9
-d9d982ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffd9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828200
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282ff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000d9d9d9d9
-d900d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-000000d9d9d9d9000000d9d9d900d90000d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d900
-0000d9d9d9d9d9d900d9d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d90000828200000000d900d9d9d900d9d9d900d9d90000000000d9d9
-d9000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d90000d900d9d9d9
-000000d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d90000d9d900d9d9d9d9d9d9d9d9d90000000000d9d9d9d9
-d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d900d9d9d900d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d90000d9d9d9
-d9d900d9d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d9d900d9d900d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d900d9d9d9d9d9d900d9d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d9d900d9d900d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d900d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d9d9d900d900d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d900
-d9d9d900d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d900d9d9d9d9d9d900d9d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d9d9d90000d9d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d90000d9d9d900d9d90000d9d9d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9
-000000d9d9d9d9000000d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9
-d900d9d9d9d9d9d900d9d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282000000d900d900d9d9d9d9d900d9d9d9d9d9d90000d9d9
-d9000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d90000d9d9d9d90000d900d9d9d9
-d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082820000d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900008282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000082ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-00d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282828282828282828282828282828282828282828282828282828282d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282ffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d90000d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d90000d9d90000d9d9d9000000d9d9d9d9000000d9d9d9d9000000d9d9d9d900
-0000d9d9d9d90000d900d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d90000d9d90000d9d900d9d9d900d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9000000d9d9d900d90000d9d9d9d9000000d9d9d90000000000d9d9d9
-d9d9d9d9d9d90000000000d9d9d9000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d90000d9d90000d9d900d9d9d900d9d900d9d9d900d9d900d9d9d900d9d900d9
-d9d900d9d900d9d90000d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d90000d9d90000d9d900d9d9d900d9d9d9d9d9d9d9d9d9
-0000000000d9d9d9d9d900d9d9d90000d9d900d9d900d9d9d900d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d90000d900d9d900d9d9d900d9d900d9d9d9d9d9d900d9d9d9d9d9d9d9d9
-d9d900d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d90000d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d900d9d9d9d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d90000d900d9d90000000000d9d9d9000000d9d9d9d9000000d9d9d9d900
-000000d9d900d9d9d900d9d90000000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d90000d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9000000d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d9d900d9d900d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d900d9
-d9d900d9d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d900d900d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d9d900d9d900d9d9d900d9d900d9d9d900d9d900d9d9d900d9d900d9
-d9d900d9d900d9d90000d9d900d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d90000d9d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d9d900d9d9d9000000d9d9d9d9000000d9d9d9d9000000d9d9d9d900
-000000d9d9d90000d900d9d9d9000000d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d900d9d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9d900d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9000000d9d9d9d9d9d90000d9d9d9
-d9d9d9d9d9d9d9d9d90000d9d9d9000000d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9d9
-00d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282828282828282828282828282828282828282828282828282828282d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282828282828282828282828282828282828282ffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d90000
-000000d900d9d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9
-d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d900d9d9d9d9d9d9d9
-d900d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d900d9d9d9d9d900d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9
-d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d900d9d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9
-d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9
-d900d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9
-d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d90000d9d90000d9d900d9d9d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9
-d90000d900d9d9d9000000d9d9d9d9000000d9d9d9d9d9d900d9d9d900d90000d9d9d900
-00000000d9d90000d900d9d9d9d9d9d900d9d9d9d9d9d900d9d9d9d9000000d9d9d900d9
-0000d9d9d9d90000d900d9d9d9000000d9d9d900d9d9d900d9d9d9d9d9d9d9d9d900d900
-00d9d9d90000000000d9d90000d900d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d90000d9d90000d9d900d9d9d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-00d9d90000d9d900d9d9d900d9d900d9d9d900d9d9d9d900d9d9d9d90000d9d900d9d9d9
-d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d900d9d9d9d9d9d9d900d9d9d90000
-d9d900d9d900d9d90000d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9d9d9d9d90000d9
-d900d9d9d9d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d90000000000d9d9d9d9
-00d9d9d900d90000d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d900d9d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d9d9
-d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d900d9d9d9d9d9d9d900d9d9d900d9
-d9d900d9d900d9d9d900d9d900d9d9d900d9d9d900d900d9d9d9d9d9d9d9d9d9d900d9d9
-d900d9d9d9d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d900d90000d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d900d9d9d9d9d9d9d900d9d9d9d9d900d9d9d900d9d9d9
-d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d900d9d9d9d9d9d9d9d900d9d9d900d9
-d9d900d9d900d9d9d900d9d90000000000d9d9d9d900d9d9d9d9d9d9d9d9d9d9d900d9d9
-d900d9d9d9d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d900d9d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9
-00d9d9d900d9d900d9d9d900d9d900d9d9d9d9d9d9d900d9d9d9d9d900d9d9d900d9d9d9
-d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d900d9d9d9d9d9d9d9d900d9d9d900d9
-d9d900d9d900d9d9d900d9d900d9d9d9d9d9d9d900d900d9d9d9d9d9d9d9d9d9d900d9d9
-d900d9d9d9d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d900d9d9d9d900d9d900d9d9d9d9d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d90000d9d9d9d9d90000d9d9d900d9d9d9d9d9d9
-00d9d90000d9d900d9d9d900d9d900d9d9d900d9d900d9d9d9d9d9d900d9d9d900d9d9d9
-d900d9d9d9d900d900d900d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9
-d9d900d9d900d9d90000d9d900d9d9d900d9d900d9d9d900d9d9d9d90000d9d9d900d9d9
-d900d9d9d9d900d9d9d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9
-00d9d9d900d9d9d9d900d9d90000000000d9d9d9d90000d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d90000d9d9d9d9d90000d9d9d900d9d9d9d9d9d9
-d90000d900d9d9d9000000d9d9d9d9000000d9d9d900d9d9d9d9d9d900d9d9d900d9d9d9
-d9d90000d9d900d900d900d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9
-d9d900d9d9d90000d900d9d9d9000000d9d9d900d9d9d900d9d9d9d90000d9d9d900d9d9
-d900d9d9d9d9d90000d9d900d900d900d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d98282ffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d982ffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffff8282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ff828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff82c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffd9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffff82d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffff82d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffff82d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9000000d9d9d9d9000000d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9000000d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9000000d9d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d900d9d9d9d9d900d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d900d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d900d9d9d9d9d900d9d9d9d9000000d9
-d9d9d9000000d9d9d900d90000d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9000000d9d9d900d9d9d900d9d9d900
-0000d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d900d9d9d9d9d9d90000000000d9d9d9000000d9d9d900d90000d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-d9d900d9d9d900d9d90000d9d900d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d900d9d9d9d9d900d9d9d900d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d900d9d9d9d9d9d9d900d9d9d9d900d9d9d900d9d90000d9d900d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d900d9d9d900
-d9d9d9d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d90000d9d9d9d9d9d9d900d9d900d9d9d900d9d900d9
-d9d900d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d90000d9d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d9d9d9d9d9d9d900d9d9d90000000000
-d9d9d900000000d9d900d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d900000000d9d9d900d900d9d9d90000
-000000d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d900d9d9d9d9d900d9d9d900d9d9d9d9
-d9d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d900d9d9d900d9d900d9d9d900d9d9d900d900d9d9d900d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d900d9d9d900d9d9d9d9d900d9d9d900d9d9d900
-d9d900d9d9d900d9d900d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d900d9d9d900d9d900d9d9d900d9d9d9d900d9d9d9d900d9
-d9d900d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d900d9d9d900d9d9d9d900d9d9d9d900d9d9d900d9d90000d9d900d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9000000d9d9d9d9d9d900d9d9d9d9000000d9
-d9d9d900000000d9d900d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9000000d9d9d9d900000000d9d9d9d900d9d9d9d9d900
-0000d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9000000d9d9d9d9d9d90000d9d9d9000000d9d9d900d90000d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d900d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffffd9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d98282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ffff828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ffff8282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ffff82828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9ff82828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9ff828282828282828282828282828282828282828282828282828282828282828282
-82828282828282828282828282828282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9ff8282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-8282828282828282d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffff8282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ff828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffc0c0c07300
-c0ffc0c0c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffff82c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffffd9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9
-d9d9d9d9d9d9d98282c0c0c07300
-c0ffc0c0c0ffff8282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0ff828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282828282828282828282828282828282828282828282828282828282
-828282828282828282c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c0ffc0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
-c0c0c0c0c0c0c0c0c0c0c0c07300
-c07373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-737373737373737373737373737373737373737373737373737373737373737373737373
-7373737373737373737373737300
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000
-0000000000000000000000000000
-
-showpage
-
-% stop using temporary dictionary
-end
-
-% restore original state
-origstate restore
-
-%%Trailer
diff --git a/lib/toolbar/doc/src/fascicules.xml b/lib/toolbar/doc/src/fascicules.xml
deleted file mode 100644
index 0678195e07..0000000000
--- a/lib/toolbar/doc/src/fascicules.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
-
-<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
- Release Notes
- </fascicule>
- <fascicule file="" href="../../../../doc/print.html" entry="no">
- Off-Print
- </fascicule>
-</fascicules>
-
diff --git a/lib/toolbar/doc/src/note.gif b/lib/toolbar/doc/src/note.gif
deleted file mode 100644
index 6fffe30419..0000000000
--- a/lib/toolbar/doc/src/note.gif
+++ /dev/null
Binary files differ
diff --git a/lib/toolbar/doc/src/notes.xml b/lib/toolbar/doc/src/notes.xml
deleted file mode 100644
index 0ae8e261d6..0000000000
--- a/lib/toolbar/doc/src/notes.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2004</year><year>2013</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar Release Notes</title>
- <prepared>otp_appnotes</prepared>
- <docno>nil</docno>
- <date>nil</date>
- <rev>nil</rev>
- <file>notes.xml</file>
- </header>
- <p>This document describes the changes made to the Toolbar
- application.</p>
-
-<section><title>Toolbar 1.4.2.3</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Misc build updates</p>
- <p>
- Own Id: OTP-10784</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Toolbar 1.4.2.2</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The GS applications is now deprecated and will be
- removed in the R16 release. The following GS-based
- applications have been superseded by the Observer
- application and will removed in R16: Appmon, Pman,
- Tv.</p>
- <p>
- *** POTENTIAL INCOMPATIBILITY ***</p>
- <p>
- Own Id: OTP-9907</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Toolbar 1.4.2.1</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Miscellaneous documentation build updates</p>
- <p>
- Own Id: OTP-9813</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Toolbar 1.4.2</title>
-
- <section><title>Fixed Bugs and Malfunctions</title>
- <list>
- <item>
- <p>
- Improve spelling throughout documentation, code comments
- and error messages</p>
- <p>
- Own Id: OTP-9555</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Toolbar 1.4.1</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- The documentation is now built with open source tools
- (xsltproc and fop) that exists on most platforms. One
- visible change is that the frames are removed.</p>
- <p>
- Own Id: OTP-8201</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>Toolbar 1.4</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The copyright notices have been updated.</p>
- <p>
- Own Id: OTP-7851</p>
- </item>
- </list>
- </section>
-
-</section>
-
- <section>
- <title>Toolbar 1.3.0.1</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Minor Makefile changes.</p>
- <p>Own Id: OTP-6689</p>
- </item>
- <item>
- <p>Obsolete guard tests (such as list()) have been replaced
- with the modern guard tests (such as is_list()).</p>
- <p>Own Id: OTP-6725</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Toolbar 1.3</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Notification windows are now centered over a parent
- window.</p>
- <p>Own Id: OTP-6013 Aux Id: OTP-5987 </p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>Toolbar 1.2.1</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>The graphic applications now search for HTML
- documentation in the correct place.</p>
- <p>Own Id: OTP-5381</p>
- </item>
- </list>
- </section>
- </section>
-</chapter>
-
diff --git a/lib/toolbar/doc/src/part.xml b/lib/toolbar/doc/src/part.xml
deleted file mode 100644
index 0590ed8566..0000000000
--- a/lib/toolbar/doc/src/part.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">>
- <header>
- <copyright>
- <year>1996</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar User's Guide</title>
- <prepared>Gunilla Hugosson</prepared>
- <docno></docno>
- <date>1997-04-19</date>
- <rev>1.0.2</rev>
- <file>part.sgml</file>
- </header>
- <description>
- <p>The <em>Toolbar</em> application simplifies access to
- the Erlang/OTP tools. It consists of a number of power buttons, one
- for each available tool.</p>
- </description>
- <xi:include href="toolbar_chapter.xml"/>
-</part>
-
diff --git a/lib/toolbar/doc/src/part_notes.xml b/lib/toolbar/doc/src/part_notes.xml
deleted file mode 100644
index 28e1932505..0000000000
--- a/lib/toolbar/doc/src/part_notes.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">>
- <header>
- <copyright>
- <year>2004</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar Release Notes</title>
- <prepared></prepared>
- <docno></docno>
- <date>2004-09-07</date>
- <rev>1.0</rev>
- <file>part_notes.sgml</file>
- </header>
- <description>
- <p>The <em>Toolbar</em> application simplifies access to
- the Erlang/OTP tools. It consists of a number of power buttons,
- one for each available tool.</p>
- </description>
- <xi:include href="notes.xml"/>
-</part>
-
diff --git a/lib/toolbar/doc/src/ref_man.xml b/lib/toolbar/doc/src/ref_man.xml
deleted file mode 100644
index a11e1a553a..0000000000
--- a/lib/toolbar/doc/src/ref_man.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE application SYSTEM "application.dtd">
-
-<application xmlns:xi="http://www.w3.org/2001/XInclude">>
- <header>
- <copyright>
- <year>1996</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar Reference Manual</title>
- <prepared>Gunilla Hugosson</prepared>
- <docno></docno>
- <date>1997-04-15</date>
- <rev>1.0.2</rev>
- <file>application.sgml</file>
- </header>
- <description>
- <p>The <em>Toolbar</em> application simplifies access to
- the Erlang/OTP tools. It consists of a number of power buttons, one
- for each available tool.</p>
- </description>
- <xi:include href="toolbar.xml"/>
-</application>
-
diff --git a/lib/toolbar/doc/src/toolbar.xml b/lib/toolbar/doc/src/toolbar.xml
deleted file mode 100644
index 2580de2242..0000000000
--- a/lib/toolbar/doc/src/toolbar.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE erlref SYSTEM "erlref.dtd">
-
-<erlref>
- <header>
- <copyright>
- <year>1996</year>
- <year>2012</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>toolbar</title>
- <prepared>Gunilla Hugosson</prepared>
- <docno></docno>
- <date>1997-04-21</date>
- <rev>A</rev>
- <file>toolbar.sgml</file>
- </header>
- <module>toolbar</module>
- <modulesummary>GUI for Starting Tools and User Contributions</modulesummary>
- <description>
- <warning>
- <p>
- The Toolbar application is deprecated and will be removed in R16.
- </p>
- </warning>
- <p>Toolbar makes it easier to use
- the different Erlang tools - and the user contributions - which are provided.
- It has a graphical user interface with an icon for each tool.
- Clicking the icon activates the corresponding tool.
- </p>
- <p>All tools to be included on Toolbar must
- have a configuration file containing information about the tool,
- for example its start function and help information location.
- Configuration files must have the <c>.tool</c> suffix.
- </p>
- <p>When started, Toolbar automatically checks for <c>*.tool</c>
- files in the current path and adds the corresponding tools. For
- each <c>ebin</c> directory found in the path, it will also look
- in a <c>priv</c> directory next to it. This is a feature of the Erlang
- file structure.</p>
- </description>
- <funcs>
- <func>
- <name>start() -> ok | already_started</name>
- <fsummary>Start Toolbar</fsummary>
- <desc>
- <p>Creates a window containing tool icons.</p>
- </desc>
- </func>
- <func>
- <name>version() -> string()</name>
- <fsummary>Return current version number</fsummary>
- <desc>
- <p>Returns the current version number of Toolbar.</p>
- </desc>
- </func>
- <func>
- <name>update() -> ok | {error,not_started}</name>
- <fsummary>Update Toolbar</fsummary>
- <desc>
- <p>Makes a search for new tool files in the current path and
- adds the corresponding tools to Toolbar window.</p>
- </desc>
- </func>
- <func>
- <name>quit() -> ok | {error,not_started}</name>
- <fsummary>Quit Toolbar.</fsummary>
- </func>
- <func>
- <name>create_tool_file() -> ok | {error,not_started}</name>
- <fsummary>Create tool files</fsummary>
- <desc>
- <p>Starts the GUI used for creating and editing tool files.</p>
- </desc>
- </func>
- <func>
- <name>add_gs_contribs() -> ok | {error,not_started}</name>
- <fsummary>Add GS contributions</fsummary>
- <desc>
- <p>Adds the path to the directory where the GS contributions are
- situated and add the tools found there, if any.</p>
- </desc>
- </func>
- </funcs>
-</erlref>
-
diff --git a/lib/toolbar/doc/src/toolbar_chapter.xml b/lib/toolbar/doc/src/toolbar_chapter.xml
deleted file mode 100644
index ebd47ef2fe..0000000000
--- a/lib/toolbar/doc/src/toolbar_chapter.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1996</year><year>2012</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Toolbar</title>
- <prepared>Gunilla Hugosson, Kenneth Lundin</prepared>
- <docno></docno>
- <date>1997-04-21</date>
- <rev>A</rev>
- <file>toolbar_chapter.xml</file>
- </header>
- <warning>
- <p>
- The Toolbar application is deprecated and will be removed in R16.
- </p>
- </warning>
- <p>Toolbar provides an interface to the various Erlang tools which are available. Toolbar can also provide access to user supplied tools which are included with the Erlang software release. These tools are called GS Contributions.</p>
- <p>All tools included in Toolbar must have a configuration file which contains information about the tool, such as its start function and the location of help information. The name of a configuration file must include the suffix <c>.tool</c>.
- </p>
- <p>Start the Toolbar application with one of the following commands:
- </p>
- <list type="bulleted">
- <item>enter the command <c>toolbar:start().</c> from the command line after Erlang has been started.</item>
- <item>start Erlang with the command <c>erl -s toolbar</c>.</item>
- </list>
- <p>When started, Toolbar automatically checks for <c>*.tool</c> files in the current path and adds the corresponding tools. For each <c>ebin</c> directory found in the path, it will also look in a <c>priv</c> directory next to it. This is a function of the Erlang file structure.
- </p>
- <p>You can update Toolbar with menu commands on Toolbar window. Refer to the File Menu and Tools Menu sections below for details.
- </p>
-
- <section>
- <title>Toolbar Window</title>
- <p>The following illustration shows <seealso marker="#fig_1">The Toolbar Window</seealso>.
- </p>
- <marker id="fig_1"></marker>
- <image file="bar.gif">
- <icaption>The Toolbar Window</icaption>
- </image>
- <p>Each icon on Toolbar represents a separate tool, which is started by clicking on the icon. You can also display place the mouse pointer over an icon to display the name of the tool at the bottom of Toolbar window.
- </p>
- <p>The Toolbar window also has a menu which includes the following menu items:
- </p>
- <list type="bulleted">
- <item>File menu</item>
- <item>Tools menu</item>
- <item>Help menu</item>
- </list>
- <p>These menu are described in the following sections.
- </p>
-
- <section>
- <marker id="file_menu"></marker>
- <title>The File menu</title>
- <p>The File menu has the following two menu items:
- </p>
- <taglist>
- <tag>Update Toolbar</tag>
- <item>Select this menu item to search for new tool files in the current path and add the corresponding tools to the Toolbar window. This action is performed automatically every the Toolbar application is started.</item>
- <tag>Quit</tag>
- <item>Select this menu item to exit the oolbar application.</item>
- </taglist>
- </section>
-
- <section>
- <marker id="tools_menu"></marker>
- <title>The Tools menu</title>
- <p>The Tool menu has the following menu items:
- </p>
- <taglist>
- <tag>Create Tool File</tag>
- <item>Choose this menu item to display the Create Tools File Window, where you create a new tools file, or edit an existing tools file. This window is described in detail below.</item>
- <tag>Add GS Contributions</tag>
- <item>Choose this menu item to add GS contributions by entering the path to the directory where these tools are situated. GS contributions are user supplied tools which are included with the Erlang software release. These tools are not supported by Erlang/OTP.</item>
- </taglist>
-
- <section>
- <title>The Create Tool File Window</title>
- <p>This window is displayed when you select <em>Create Tool File</em> from the <em>Tools</em> menu. The following illustration shows <seealso marker="#fig_2">The Create Tool File Window</seealso>.
- </p>
- <marker id="fig_2"></marker>
- <image file="create_tool.gif">
- <icaption>The Create Tool File Window</icaption>
- </image>
- <p>Follow these steps to create a new tool file, or to edit an existing tool file:</p>
- <list type="bulleted">
- <item>To edit an existing tools file, enter the file name of the tools file into the field <em>File name</em> and press <em>Enter</em>. The contents of the tool file are displayed in the information fields. Edit the information in the following fields as required.</item>
- <item>To create a new tools file, enter information into the following fields.</item>
- <item>When finished, select <em>Update Toolbar</em> from the <em>File</em> menu.</item>
- </list>
- <list type="ordered">
- <item><em>File name</em>. Enter the name of the tools file. The application will add the <c>.tool</c> suffix if omitted.</item>
- <item><em>Tool name</em>. Enter the name of the tool. This field defaults to the name entered into the File name field. For example, if you enter <c>mytool.tool</c> as a file name, this field defaults to <c>mytool</c>.</item>
- <item><em>Start function</em>. Enter a module name and a function name into the fields titled module and function respectively. The function must exist and take zero arguments.</item>
- <item><em>Icon file</em>. Enter the file name of the icon to be displayed in the Toolbar. The file must be a bitmap file or a GIF image with the file extension <c>.xbm</c> or <c>.gif</c> respectively. If no path name is entered, the system assumes that the file is located in the same directory as the tools file. This field is optional.</item>
- <item><em>Message</em>. Enter a descriptive string of maximum 30 characters for the tool. This field is optional. The information entered here is displayed at the bottom of the Toolbar window when the mouse pointer is placed on the Toolbar icon.</item>
- <item><em>HTML</em>. Enter an URL, a HTML file name, or a plain text file name, which points to the help text file for the tool. An URL should be given in the form <c>http://...</c>. If no path is given, the system assumes that the file is located in the same directory as the tool file. For an HTML file name ending with <c>.html</c>, it is possible to add an index which points to a specific location in the file. This is written as <c>.html#index</c>. This field is optional.</item>
- </list>
- <p>The window has the following command buttons:
- </p>
- <list type="bulleted">
- <item><em>Clear</em>. Click on this button to clear the information fields.</item>
- <item><em>Save</em>. Click on this button to save the information. A new tool file can be saved only when mandatory information such as file name, tool name and start function has been entered.</item>
- <item><em>Stop</em>. Click on this button to quit the Create Tool File window.</item>
- </list>
- <note>
- <p>No error check is performed on the information entered.</p>
- <p>You must select <em>Update Toolbar</em> from the <em>File</em> menu to update the configuration and make the tool visible on the Toolbar.</p>
- </note>
- </section>
- </section>
-
- <section>
- <marker id="help_menu"></marker>
- <title>The Help menu</title>
- <p>The Help Menu has the following two menu items, plus additional help menu items for those tools which have a help system.
- </p>
- <taglist>
- <tag>About</tag>
- <item>This menu item displays a short message about accessing the help information.</item>
- <tag>Toolbar</tag>
- <item>This menu item provides access to the Toolbar documentation.</item>
- </taglist>
- </section>
- </section>
-</chapter>
-
diff --git a/lib/toolbar/doc/src/warning.gif b/lib/toolbar/doc/src/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/lib/toolbar/doc/src/warning.gif
+++ /dev/null
Binary files differ
diff --git a/lib/toolbar/ebin/.gitignore b/lib/toolbar/ebin/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
--- a/lib/toolbar/ebin/.gitignore
+++ /dev/null
diff --git a/lib/toolbar/info b/lib/toolbar/info
deleted file mode 100644
index 706cbdfdf2..0000000000
--- a/lib/toolbar/info
+++ /dev/null
@@ -1,2 +0,0 @@
-group: tools
-short: A tool bar simplifying access to the Erlang tools
diff --git a/lib/toolbar/src/canvasbutton.erl b/lib/toolbar/src/canvasbutton.erl
deleted file mode 100644
index 81e0ed43bb..0000000000
--- a/lib/toolbar/src/canvasbutton.erl
+++ /dev/null
@@ -1,239 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(canvasbutton).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Extension to GS used to imitate buttons but instead using images drawn
-% on a canvas. Enables usage of .gif files as button images and not only
-% .xbm (bitmap) files.
-%
-%%% Constants %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--define(gray,{87,87,87}).
-%
-%%% Internal data structures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% canvasbutton()
--record(canvasbutton,{image,rect,ul,ll}).
-%
-% cboptions()
--record(cboptions,
- {imagefile=nofile, % nofile |
- % string() Name of image file
- x=0, % integer() X coordinate relative the canvas
- y=0, % integer() Y coordinate relative the canvas
- width=10, % integer() Button width
- height=10, % integer() Button heigth
- fg=black, % atom() Foreground color
- data=[]}). % term() Data associated with button events
-%
-%%% Exports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--export([create/1,create/2,read/2,press/1,release/1]).
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% Exported functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% create(Canvas) => create(Canvas,[])
-% create(Canvas,OptionList) => canvasbutton()
-% Canvas - GS canvas object
-% OptionList - [{Option,Value}]
-% Option, Value - see below
-% Create a canvasbutton with the given image on Canvas
-%
-% Option Value Default Comment
-% ----------------------------------------------------------------
-% image nofile | nofile Name of image file. Must be a bitmap
-% string() file (.xbm) or a GIF file (.gif).
-% x integer() 0 X coordinate relative to Canvas
-% y integer() 0 Y coordinate relative to Canvas
-% width integer() 10 Button width
-% height integer() 10 Button height
-% fg atom() black Foreground color, bitmaps only
-% data term() [] Data associated with button events
-%
-% The process calling this function will receive the following events:
-% {gs,GsObj,enter,{canvasbutton,Canvasbutton,Data},Args}
-% {gs,GsObj,leave,{canvasbutton,Canvasbutton,Data},Args}
-% {gs,GsObj,buttonpress,{canvasbutton,Canvasbutton,Data},Args}
-% {gs,GsObj,buttonrelease,{canvasbutton,Canvasbutton,Data},Args}
-% where GsObj and Args are a GS object and its Args field, respectively.
-%
-% Note that press/1 and release/1 has to be called explicitly to create
-% the illusion of the button being pressed or released.
-%----------------------------------------
-create(Canvas) ->
- create(Canvas,[]).
-create(Canvas,OptionList) ->
- Options = sort_out_options(OptionList),
- X = Options#cboptions.x,
- Y = Options#cboptions.y,
- W = Options#cboptions.width,
- H = Options#cboptions.height,
-
- %% Buttons should have the same background color as the canvas
- Bg = gs:read(Canvas,bc),
-
- %% Draw image
- Image = create_image(Options#cboptions.imagefile,Canvas,Bg,
- Options#cboptions.fg,X,Y,W,H),
-
- %% Draw upper left corner line
- Ul = gs:create(line,Canvas,[{coords,[{X,Y+H},{X,Y},{X+W,Y}]},
- {fg,white},{width,2}]),
-
- %% Draw lower right corner line
- Ll = gs:create(line,Canvas,[{coords,[{X,Y+H},{X+W,Y+H},{X+W,Y}]},
- {fg,?gray},{width,2}]),
-
-
- %% Draw a rectangle around all (for event catching when width and
- %% height of button is larger than image)
- Rect = gs:create(rectangle,Canvas,[{coords,[{X,Y},{X+W,Y+H}]},
- {fill,Bg},
- {buttonpress,true},
- {buttonrelease,true},
- {enter,true},{leave,true}]),
-
- %% Now the canvas button is created
- Canvasbutton = #canvasbutton{image=Image,rect=Rect,ul=Ul,ll=Ll},
-
- Data = Options#cboptions.data,
- gs:config(Rect,{data,{canvasbutton,Canvasbutton,Data}}),
- gs:config(Image,{data,{canvasbutton,Canvasbutton,Data}}),
- gs:config(Rect,lower),
- gs:config(Image,raise),
-
- Canvasbutton.
-
-%----------------------------------------
-% read(Canvasbutton,coords) => [{L,T},{R,B}]
-% Canvasbutton - canvasbutton()
-% Read a Canvasbutton's coordinates
-%----------------------------------------
-read(Canvasbutton,coords) ->
- gs:read(Canvasbutton#canvasbutton.rect,coords).
-
-%----------------------------------------
-% press(Canvasbutton)
-% Canvasbutton - canvasbutton()
-% Create the illusion that Canvasbutton is pressed
-%----------------------------------------
-press(Canvasbutton) ->
- gs:config(Canvasbutton#canvasbutton.ul,{fg,?gray}),
- gs:config(Canvasbutton#canvasbutton.ll,{fg,white}),
- case Canvasbutton#canvasbutton.image of
- noimage ->
- ignore;
- Image ->
- gs:config(Image,{move,{-1,-1}})
- end.
-
-%----------------------------------------
-% release(Canvasbutton)
-% Canvasbutton - canvasbutton()
-% Create the illusion that Canvasbutton is released
-%----------------------------------------
-release(Canvasbutton) ->
- gs:config(Canvasbutton#canvasbutton.ul,{fg,white}),
- gs:config(Canvasbutton#canvasbutton.ll,{fg,?gray}),
- case Canvasbutton#canvasbutton.image of
- noimage ->
- ignore;
- Image ->
- gs:config(Image,{move,{1,1}})
- end.
-
-
-%%% Internal functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% create_image(ImageFile,Canvas,Bg,Fg,X,Y,W,H) => Image
-% ImageFile - string() Image file, must exist and be a bitmap file ending
-% with .xbm or a GIF file ending with .gif.
-% Canvas - GS canvas object
-% Bg - atom() Background color (bitmaps only)
-% Fg - atom() Foreground color (bitmaps only)
-% X, Y - int() X and Y coordinates for Image relative to Canvas
-% W, H - int() Width and height of Image
-% Image - GS canvas image object
-%----------------------------------------
-create_image(nofile,_,_,_,_,_,_,_) ->
- noimage;
-create_image(ImageFile,Canvas,Bg,Fg,X,Y,W,H) ->
- case lists:last(string:tokens(ImageFile,".")) of
- "xbm" ->
- gs:create(image,Canvas,
- [{bitmap,ImageFile},
- {bg,Bg},{fg,Fg},
- {anchor,c},
- {coords,[{X+1+W/2,Y+1+H/2}]},
- {buttonpress,true},
- {buttonrelease,true},
- {enter,true},{leave,true}]);
- "gif" ->
- gs:create(image,Canvas,
- [{load_gif,ImageFile},
- {anchor,c},
- {coords,[{X+W/2,Y+H/2}]},
- {buttonpress,true},
- {buttonrelease,true},
- {enter,true},{leave,true}])
- end.
-
-%----------------------------------------
-% sort_out_options(OptionList) => cboptions()
-% OptionList - see create/2
-% Insert members of option list into a cboptions record.
-%----------------------------------------
-sort_out_options(OptionList) ->
- sort_out_options(OptionList,#cboptions{}).
-
-%----------------------------------------
-% sort_out_options(OptionList,Options) => cboptions()
-% OptionList - see create/2
-% Options - cboptions()
-% Called by sort_out_options/1.
-%----------------------------------------
-sort_out_options([{image,Image}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{imagefile=Image});
-sort_out_options([{x,X}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{x=X});
-sort_out_options([{y,Y}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{y=Y});
-sort_out_options([{width,Width}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{width=Width});
-sort_out_options([{height,Height}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{height=Height});
-sort_out_options([{fg,Fg}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{fg=Fg});
-sort_out_options([{data,Data}|Rest],Options) ->
- sort_out_options(Rest,Options#cboptions{data=Data});
-sort_out_options([],Options) ->
- Options.
diff --git a/lib/toolbar/src/toolbar.erl b/lib/toolbar/src/toolbar.erl
deleted file mode 100644
index b37c323008..0000000000
--- a/lib/toolbar/src/toolbar.erl
+++ /dev/null
@@ -1,579 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(toolbar).
--compile([{nowarn_deprecated_function,{gs,start,1}}]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Main module
-%
-%%% Includes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--include("toolbar.hrl").
-%
-%%% Exports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--export([start/0,version/0]).
--export([update/0,quit/0]).
--export([create_tool_file/0,add_gs_contribs/0]).
-
-%
--define (STARTUP_TIMEOUT, 20000).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% Exported functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% start() => ok | already_started
-%----------------------------------------
-start() ->
- case whereis(toolbar) of
- undefined ->
- Self = self(),
- PidInit = spawn(fun() -> init(Self) end),
- init_ok (PidInit);
-
- _Pid ->
- already_started
- end.
-
-
-
-%%% init_ok /1
-%%%
-%%% init_ok returns the pid from this process given from
-%%% init/1 after its initialization, or else it timeouts.
-%%%
-
-init_ok (PidInit) ->
- %% Wait for a initialization completion message from
- %% the spawned process before returning its Pid.
- %%
-
- receive
- {initialization_complete, PidInit} ->
- PidInit
-
- %% (Conditional) Failure to start within the time limit will
- %% result in termination
-
- after
- ?STARTUP_TIMEOUT ->
- exit(PidInit, kill),
- exit({startup_timeout, ?MODULE})
- end.
-
-
-
-%----------------------------------------
-% version() -> string()
-% Returns the version number.
-%----------------------------------------
-version() ->
- "1.1".
-
-%----------------------------------------
-% update() => ok | {error,not_started}
-% Make a search for new tools (*.tool files) in the current path.
-%----------------------------------------
-update() ->
- call(update_toolbar).
-
-%----------------------------------------
-% quit() => ok | {error,not_started}
-% Quit the Toolbar.
-%----------------------------------------
-quit() ->
- call(quit).
-
-%----------------------------------------
-% create_tool_file() => ok | {error,not_started}
-% Start the GUI for creating .tool files.
-%----------------------------------------
-create_tool_file() ->
- call(create_tool_file).
-
-%----------------------------------------
-% add_gs_contribs() => ok | {error,not_started}
-% Add GS contributions.
-%----------------------------------------
-add_gs_contribs() ->
- call(add_gs_contribs).
-
-
-%%% Internal functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%=============================================================================
-% Main loop
-%=============================================================================
-
-%----------------------------------------
-% init()
-%----------------------------------------
-init(PidCaller) ->
- register (toolbar, self ()),
-
- %% Start GS
- S = gs:start([{kernel,true}]),
-
- %% Draw main window
- Window = toolbar_graphics:draw_window(S),
-
- %% Add system defined Tool icons to main window
- toolbar_graphics:cursor(Window,busy),
- NewWindow = add_tools(Window,code:get_path()),
- toolbar_graphics:cursor(Window,arrow),
-
- %% Listen to configure events from the window
- toolbar_graphics:listen_configure(NewWindow),
-
- %% Notify caller that the process appears
- %% to have been started.
- PidCaller ! {initialization_complete, self()},
-
- loop(S,NewWindow,null,undefined).
-
-%----------------------------------------
-% loop(S,Window,LoopData,TimerRef)
-% S - pid() GS
-% Window - tbwindow record (see toolbar_graphics.erl)
-% LoopData - term()
-% TimerRef - undefined | timer_ref()
-%----------------------------------------
-loop(S,Window,LoopData,TimerRef) ->
- receive
- %% test events
- {ping, Pid} ->
- Pid ! {toolbar, alive},
- loop (S, Window, LoopData, TimerRef);
-
- {stop, Pid} ->
- Pid ! {toolbar, stopped},
- finished;
-
- %% ----- GS events ----- %%
-
- {gs,_Object,Event,Data,Args} ->
- case toolbar_graphics:event(LoopData,Event,Data,Args) of
-
- noevent ->
- loop(S,Window,LoopData,TimerRef);
-
- %% Display short information message
- {display,Msg} ->
-
- {ok,Ref} = timer:apply_after(500,toolbar_graphics,
- display_show,[Window,Msg]),
- loop(S,Window,LoopData,Ref);
-
- %% Clear display area
- display_clear ->
- timer:cancel(TimerRef),
- toolbar_graphics:display_clear(Window),
- loop(S,Window,LoopData,undefined);
-
- %% New LoopData
- {newData,NewLoopData} ->
- loop(S,Window,NewLoopData,TimerRef);
-
- %% Icon button clicked, start corresponding tool/uc
- {start,Start} ->
- WinObj = toolbar_graphics:get_window(Window),
- start_tool(Start,WinObj),
- loop(S,Window,LoopData,TimerRef);
-
- %% Update Toolbar
- update_toolbar ->
- toolbar_graphics:cursor(Window,busy),
- NewWindow = add_tools(Window,code:get_path()),
- toolbar_graphics:cursor(Window,arrow),
- loop(S,NewWindow,LoopData,TimerRef);
-
- %% Start Tool Configuration tool
- create_tool_file ->
- toolbar_toolconfig:start(),
- loop(S,Window,LoopData,TimerRef);
-
- %% Add GS contributions
- add_gs_contribs ->
- toolbar_graphics:cursor(Window,busy),
- GsDir = toolbar_lib:gs_contribs_dir(),
- code:add_path(GsDir),
- NewWindow = add_tools(Window,[GsDir]),
- toolbar_graphics:cursor(Window,arrow),
- loop(S,NewWindow,LoopData,TimerRef);
-
- %% Help
- {help,Html} ->
- toolbar_graphics:cursor(Window,busy),
- WinObj = toolbar_graphics:get_window(Window),
- tool_utils:open_help(WinObj, Html),
- toolbar_graphics:cursor(Window,arrow),
- loop(S,Window,LoopData,TimerRef);
-
- %% About help
- about_help ->
- WinObj = toolbar_graphics:get_window(Window),
- Text = ["Help text is on HTML format",
- "Requires Netscape to be up and running"],
- tool_utils:notify(WinObj, Text),
- loop(S,Window,LoopData,TimerRef);
-
- %% Window has been resized, redraw it
- {redraw,Size} ->
- NewWindow = toolbar_graphics:redraw_window(Window,Size),
- loop(S,NewWindow,LoopData,TimerRef);
-
- %% Quit
- quit ->
- finished
- end;
-
- %% ----- Events from user ----- %%
-
- %% Update Toolbar
- update_toolbar ->
- toolbar_graphics:cursor(Window,busy),
- NewWindow = add_tools(Window,code:get_path()),
- toolbar_graphics:cursor(Window,arrow),
- loop(S,NewWindow,LoopData,TimerRef);
-
- %% Quit
- quit ->
- finished;
-
- %% Start Tool Configuration tool
- create_tool_file ->
- toolbar_toolconfig:start(),
- loop(S,Window,LoopData,TimerRef);
-
- %% Add GS contributions
- add_gs_contribs ->
- toolbar_graphics:cursor(Window,busy),
- GsDir = toolbar_lib:gs_contribs_dir(),
- code:add_path(GsDir),
- NewWindow = add_tools(Window,[GsDir]),
- toolbar_graphics:cursor(Window,arrow),
- loop(S,NewWindow,LoopData,TimerRef);
-
- Other ->
- io:format("toolbar: unexp msg ~p~n",[Other]),
- loop(S,Window,LoopData,TimerRef)
- end.
-
-%----------------------------------------
-% call(Msg) => ok | {error,not_started}
-% Msg - term()
-% Send message to toolbar if it is started, otherwise return an error
-%----------------------------------------
-call(Msg) ->
- case whereis(toolbar) of
- undefined ->
- {error,not_started};
- _ ->
- toolbar ! Msg,
- ok
- end.
-
-
-%=============================================================================
-% Addition of new tools
-%=============================================================================
-%----------------------------------------
-% add_tools(Window,Dirs) => NewWindow
-% Window, NewWindow - tbwindow record (see toolbar_graphics.erl)
-% Dirs - [string()] Directory names
-% Calls add_tools2/2 recursively for a number of directories
-%----------------------------------------
-add_tools(Window,[Dir|Rest]) when is_list(Dir) ->
-
- %% Add all tools in the directory Dir
- NewWindow = add_tools2(Window,tool_files(Dir)),
-
- case filename:basename(Dir) of
- %% Dir is an 'ebin' directory, check in '../priv' as well
- "ebin" ->
- NewerWindow =
- add_tools2(NewWindow,
- tool_files(filename:join(filename:dirname(Dir),
- "priv"))),
- add_tools(NewerWindow,Rest);
- _ ->
- add_tools(NewWindow,Rest)
- end;
-add_tools(Window,[]) ->
- Window.
-
-%----------------------------------------
-% add_tools2(Window,ToolFiles) => NewWindow
-% Window, NewWindow - tbwindow record (see toolbar_graphics.erl)
-% ToolFiles - [string()] *.tool file names
-% Calls add_tool/2 recursively for a number of .tool files in a directory
-%----------------------------------------
-add_tools2(Window,[ToolFile|Rest]) ->
- case add_tool(Window,ToolFile) of
- {ok,NewWindow} ->
- add_tools2(NewWindow,Rest);
- {error,_Reason} ->
- add_tools2(Window,Rest)
- end;
-add_tools2(Window,[]) ->
- Window.
-
-%----------------------------------------
-% add_tool(Window,ToolFile) => {ok,NewWindow} | {error,Reason}
-% Window, NewWindow - tbwindow record (see toolbar_graphics.erl)
-% ToolFile - string() A .tool file
-% Reason - noname | nostart | version | format | read | open
-% Reads tool information from a .tool file and adds it to the toolbar
-% Returns the new window information
-%----------------------------------------
-add_tool(Window,ToolFile) ->
- case tool_info(ToolFile) of
- {ok,ToolInfo} ->
- case toolbar_graphics:already_added(Window,ToolInfo) of
- true ->
- {ok,Window};
- false ->
- NewWindow = toolbar_graphics:add_icon(Window,ToolInfo),
- {ok,NewWindow}
- end;
- {error,Reason} ->
- %% Log
- {error,Reason}
- end.
-
-
-%=============================================================================
-% Functions for getting *.tool configuration files
-%=============================================================================
-
-%----------------------------------------
-% tool_files(Dir) => ToolFiles
-% Dir - string() Directory name
-% ToolFiles - [string()]
-% Return the list of all files in Dir ending with .tool (appended to Dir)
-%----------------------------------------
-tool_files(Dir) ->
- case file:list_dir(Dir) of
- {ok,Files} ->
- filter_tool_files(Dir,Files);
- {error,_Reason} ->
- []
- end.
-
-%----------------------------------------
-% filter_tool_files(Dir,Files) => ToolFiles
-% Dir - string() Directory name
-% Files, ToolFiles - [string()] File names
-% Filters out the files in Files ending with .tool and append them to Dir
-%----------------------------------------
-filter_tool_files(_Dir,[]) ->
- [];
-filter_tool_files(Dir,[File|Rest]) ->
- case filename:extension(File) of
- ".tool" ->
- [filename:join(Dir,File)|filter_tool_files(Dir,Rest)];
- _ ->
- filter_tool_files(Dir,Rest)
- end.
-
-
-%=============================================================================
-% Functions for retrieving tool information from *.tool files
-%=============================================================================
-
-%----------------------------------------
-% tool_info(ToolFile) => {ok,ToolInfo} | {error,Reason}
-% ToolFile - string() .tool file
-% ToolInfo - toolinfo record
-% Reason - nofile | format | noname | nostart
-% Retreives tool information from ToolFile
-%----------------------------------------
-tool_info(ToolFile) ->
- case file:consult(ToolFile) of
- {error,open} ->
- {error,nofile};
- {error,read} ->
- {error,format};
- {ok,[{version,Vsn},InfoTuple]} when is_tuple(InfoTuple)->
- case toolbar_lib:tool_info_syntax(Vsn,InfoTuple) of
-
- %% Syntax check ok, start additional checks
- {ok,InfoList} ->
-
- tool_info2(filename:dirname(ToolFile),
- InfoList,#toolinfo{});
-
- %% Syntax error
- Error ->
- Error
- end;
- {ok,[{version,Vsn},ToolInfo]} when is_list(ToolInfo)->
- case toolbar_lib:tool_info_syntax(Vsn,ToolInfo) of
-
- %% Syntax check ok, start additional checks
- {ok,InfoList} ->
- tool_info2(filename:dirname(ToolFile),
- InfoList,#toolinfo{});
-
- %% Syntax error
- Error ->
- Error
- end;
- {ok,_Other} ->
- {error,format}
- end.
-
-%----------------------------------------
-% tool_info2(Dir,Info,ToolInfo) => {ok,ToolInfo}
-% Dir - string() Directory where this .tool file is situated
-% Info - [{Key,Val}] List of tuples in the .tool file
-% ToolInfo - toolinfo record being filled in
-% Used by tool_info2/1
-%----------------------------------------
-%%% Tool name
-tool_info2(Dir,[{tool,Name}|Rest],TI) ->
- tool_info2(Dir,Rest,TI#toolinfo{tool=Name});
-
-%%% Start function
-tool_info2(Dir,[{start,{M,F,A}}|Rest],TI) ->
- tool_info2(Dir,Rest,TI#toolinfo{start={M,F,A}});
-
-%%% Icon file
-%%% It must exist since the icon is drawn immediately after this .tool
-%%% file has been successfully read
-%%% It must also end with a .gif or .xbm suffix
-%%% Otherwise the icon is ignored!
-%%% Uses absolute path: If a relative path is given, it is assumed to be
-%%% relative to the directory of the .tool file
-tool_info2(Dir,[{icon,Icon}|Rest],TI) ->
-
- %% Check that the image file ends with .xbm or .gif
- case image_suffix(Icon) of
- true ->
-
- %% Add absolute path (if necessary)
- File = absolute_path(Dir,Icon),
-
- case toolbar_lib:legal_file(File) of
- ok ->
- tool_info2(Dir,Rest,TI#toolinfo{icon=File});
- _Error ->
- %% LOG File does not exist or cannot be read
- tool_info2(Dir,Rest,TI)
- end;
-
- false ->
- %% LOG Illegal icon file name
- tool_info2(Dir,Rest,TI)
- end;
-
-%%% Message string
-tool_info2(Dir,[{message,Msg}|Rest],TI) ->
- tool_info2(Dir,Rest,TI#toolinfo{message=Msg});
-
-%%% Html file is found
-%%% Check if file exists at "view-time", not now!
-%%% Uses absolute path: If a relative path is given, it is assumed to be
-%%% relative to the directory of the .tool file
-tool_info2(Dir,[{html,Html}|Rest],TI) ->
-
- %% Check if the HTML file is a remote URL or a local file
- case Html of
-
- %% http://... Remote URL, save as is
- [$h,$t,$t,$p,$:,$/,$/|_] ->
- tool_info2(Dir,Rest,TI#toolinfo{html=Html});
-
- %% file:... Local file, save file with absolute path
- [$f,$i,$l,$e,$:|File] ->
- tool_info2(Dir,Rest,TI#toolinfo{html=absolute_path(Dir,File)});
-
- %% Everything else is assumed to be a file name
- %% Save file with absolute path
- _ ->
- tool_info2(Dir,Rest,TI#toolinfo{html=absolute_path(Dir,Html)})
- end;
-
-%%% Info has been traversed
-tool_info2(_Dir,[],ToolInfo) ->
- {ok,ToolInfo}.
-
-%----------------------------------------
-% image_suffix(File) => true | false
-% File - string() File name
-% Returns true if File end with an image suffix: gif or xbm
-%----------------------------------------
-image_suffix(File) ->
- case filename:extension(File) of
- ".gif" ->
- true;
- ".xbm" ->
- true;
- _ ->
- false
- end.
-
-%----------------------------------------
-% absolute_path(Dir,File) => string()
-% Dir, File - string()
-% Given a directory and a file name, return the appended result if the file
-% name does not already contain an absolute path.
-% Dir is supposed to be an absolute path, if it is '.', it is replaced
-% with the current working directory.
-%----------------------------------------
-absolute_path(".",File) ->
- {ok,Cwd} = file:get_cwd(),
- absolute_path(Cwd,File);
-absolute_path(Dir,File) ->
- filename:join(Dir,File).
-
-
-%=============================================================================
-% Start of a tool
-%=============================================================================
-
-%----------------------------------------
-% start_tool({Module,Function,Arguments}, GSobj)
-% Module - atom() Module name
-% Function - atom() Function name
-% Argument - [term()] Function arguments
-% GSobj - gs_obj()
-% Applies the given function in order to start a tool.
-%----------------------------------------
-start_tool({M,F,A}, GSobj) ->
- spawn(fun() -> start_tool(M, F, A, GSobj) end).
-
-start_tool(M,F,A,GSobj) ->
- case catch apply(M,F,A) of
- {'EXIT',Reason} ->
- String1 = io_lib:format("Failed to call apply(~p,~p,~p)",
- [M,F,A]),
- String2 = io_lib:format("Reason: ~p",[Reason]),
- tool_utils:notify(GSobj,[String1,String2]),
- false;
- _ ->
- true
- end.
diff --git a/lib/toolbar/src/toolbar.hrl b/lib/toolbar/src/toolbar.hrl
deleted file mode 100644
index 1793cd1833..0000000000
--- a/lib/toolbar/src/toolbar.hrl
+++ /dev/null
@@ -1,34 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Common data structures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Tool configuration information
--record(toolinfo,
- {tool,
- start,
- icon=nofile,
- message="",
- html=nofile}).
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/toolbar/src/toolbar_graphics.erl b/lib/toolbar/src/toolbar_graphics.erl
deleted file mode 100644
index c4c4273c63..0000000000
--- a/lib/toolbar/src/toolbar_graphics.erl
+++ /dev/null
@@ -1,404 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(toolbar_graphics).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Toolbar graphics.
-% The Toolbar window looks something like this:
-%
-% |-----------------------------|
-% | File Tools Help |
-% |-----------------------------|
-% | |-----| |-----| |-----| |
-% | | | | | | | |
-% | |Icon1| |Icon2|...|IconN| |
-% | |-----| |-----| |-----| |
-% |-----------------------------|
-% | Help text area |
-% |-----------------------------|
-%
-%%% Includes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--include("toolbar.hrl").
-%
-%%% Internal data structures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Toolbar window record
--record(tbwindow,
- {window,menubar,canvas,labelframe,
- label,helpmenu,
- no_of_buttons,
- min_height,min_width,cur_height,icons}).
-%
-%%% Constants %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Window width
--define(width,215).
-%
-% Icon width and height
--define(icon,34).
-%
-% Margin around icons
--define(pad,0).
-%
-% Default label width and height
--define(wlabel,50).
--define(hlabel,15).
-%
-% Default button width and height
--define(wbutton,50).
--define(hbutton,30).
-%
-%%% Exports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--export([event/4]).
--export([draw_window/1,redraw_window/2,already_added/2,add_icon/2]).
--export([get_window/1]).
--export([cursor/2]).
--export([listen_configure/1]).
--export([display_show/2,display_clear/1]).
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% Exported functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% event(Data,GsEvent,Data,Args) => Event
-% Data - term()
-% GsEvent - GS event
-% Data, Args - Data and Arg fields associated with the GS event
-% Event - {display,String} | display_clear | noevent | {start,{M,F,A}} |
-% update_toolbar | create_tool_file | add_gs_contribs |
-% {help,Html} | about_help | {redraw,{Width,Height}} | quit |
-% {newData,NewData}
-% String - string()
-% M, F - atom() Module and function name
-% A - [term()] Function argument
-% Html - string() HTML file | nofile
-% Width, Height - integer()
-% NewData - term()
-% Tries to convert a GS event to an internal toolbar event. The separation
-% is intented to keep the implementation details of the graphics hidden
-% for toolbar.erl. Pure graphical events triggered by the GS event will
-% be executed by this function.
-% The Data field is used for saving information between different events
-% (without having to use put/get or ets). Right now it is only used to save
-% the coordinates of the last canvasbutton pressed, making it possible to
-% check if the canvasbutton is released with the mouse moved outside the
-% button (= no action) or with the mouse still inside the button (= action).
-%----------------------------------------
-%%% Mouse enters a icon, display short help message
-event(_LoopData,enter,{canvasbutton,_Cbtn,{_Start,{message,String}}},_Args) ->
- {display,String};
-
-%% Mouse leaves a icon, clear display area
-event(_LoopData,leave,{canvasbutton,_Cbtn,_Data},_Args) ->
- display_clear;
-
-%% An icon is pressed, create graphical illusion of this
-event(_LoopData,buttonpress,{canvasbutton,Canvasbutton,_},_Args) ->
- canvasbutton:press(Canvasbutton),
- {newData,canvasbutton:read(Canvasbutton,coords)};
-
-%% An icon is released, create graphical illusion of this
-event(LoopData,buttonrelease,{canvasbutton,Cbtn,{{start,Start},_Msg}},
- [_,X,Y|_]) ->
- canvasbutton:release(Cbtn),
- case within(X,Y,LoopData) of
- true ->
- {start,Start};
- false ->
- noevent
- end;
-
-%%% Update Toolbar button pressed
-event(_LoopData,click,_Data,["Update Toolbar"|_]) ->
- update_toolbar;
-
-%%% Tool configuration button pressed
-event(_LoopData,click,_Data,["Create Tool File..."|_]) ->
- create_tool_file;
-
-%%% Add GS contribution button pressed
-event(_LoopData,click,_Data,["Add GS Contributions"|_]) ->
- add_gs_contribs;
-
-%%% Help menu button selected
-event(_LoopData,click,{help,Html},_Args) ->
- {help,Html};
-
-%%% About Help menu button selected
-event(_LoopData,click,about_help,_Args) ->
- about_help;
-
-%% Window resized, redraw it
-event(_LoopData,configure,_Data,[Width,Height|_]) ->
- {redraw,{Width,Height}};
-
-%%% Quit button pressed
-event(_LoopData,click,_Data,["Quit"|_]) ->
- quit;
-
-%%% Window closed
-event(_LoopData,destroy,_Data,_Args) ->
- quit;
-
-event(_LoopData,_GsEvent,_Data,_Args) ->
- noevent.
-
-%=============================================================================
-% Main window functions
-%=============================================================================
-
-%----------------------------------------
-% draw_window(S) => Window
-% S - pid() GS
-% Window - tbwindow record
-% This functions create the main window, initially without any tool icons
-%----------------------------------------
-draw_window(S) ->
-
- Norm = ?icon + 2*?pad,
-
- %% Main window
- Win = gs:create(window,S,[{title,"Erlang Tools"},{width,?width}]),
-
- %% Menu bar with menu buttons
- Menubar = gs:create(menubar,Win,[]),
-
- %% File menu
- File = gs:create(menubutton,Menubar,[{label,{text,"File"}},{side,left}]),
- FileM = gs:create(menu,File,[]),
- gs:create(menuitem,FileM,[{label,{text,"Update Toolbar"}}]),
- gs:create(menuitem,FileM,[{label,{text,"Quit"}}]),
-
- %% Tools menu
- Tool = gs:create(menubutton,Menubar,[{label,{text,"Tools"}},{side,left}]),
- ToolM = gs:create(menu,Tool,[]),
- gs:create(menuitem,ToolM,[{label,{text,"Create Tool File..."}}]),
- gs:create(menuitem,ToolM,[{label,{text,"Add GS Contributions"}}]),
-
- %% Help menu
- Help = gs:create(menubutton,Menubar,[{label,{text,"Help"}},{side,right}]),
- HelpM = gs:create(menu,Help,[]),
- gs:create(menuitem,HelpM,[{label,{text,"About..."}},
- {data,about_help}]),
- gs:create(menuitem,HelpM,[{label,{text,"Toolbar"}},
- {data,{help,toolbar_lib:help_file()}}]),
- gs:create(menuitem,HelpM,[{label,{text,"OTP"}},
- {data,{help,toolbar_lib:otp_file()}}]),
- gs:create(menuitem,HelpM,[{itemtype,separator}]),
-
- %% Check height of menu bar
- H = gs:read(Menubar,height),
-
- %% Now the height of the window can be computed
- Height = H+Norm+?hlabel+2*?pad,
- gs:config(Win,{height,Height}),
-
- %% Canvas, here will the Tool canvasbuttons be inserted
- Canvas = gs:create(canvas,Win,[{width,?width},{height,Norm},{x,0},{y,H}]),
-
- %% Label for displaying help messages and the frame containing it
- LabelF = gs:create(frame,Win,[{bg,green},{bw,1},
- {width,?width},{height,?hlabel+2*?pad},
- {x,0},{y,H+Norm}]),
- Label = gs:create(label,LabelF,[{align,w},{height,?hlabel},
- {width,?width},{x,?pad},{y,?pad},
- {label,{text,string:copies(" ",30)}}]),
-
- gs:config(Win,{map,true}),
-
- #tbwindow{window=Win,
- menubar=Menubar,canvas=Canvas,labelframe=LabelF,
- label=Label,helpmenu=HelpM,
- no_of_buttons=0,
- min_height=Height,min_width=?width,cur_height=Height,
- icons=[]}.
-
-%----------------------------------------
-% redraw_window(Window,{NewWidth,NewHeight}) => NewWindow
-% Window, NewWindow - tbwindow record
-% NewWidth, NewHeight - integer()
-% Redraw main window contents according to a new size
-%----------------------------------------
-redraw_window(Window,{NewWidth,NewHeight}) ->
-
- MinWidth = Window#tbwindow.min_width,
- if
- NewWidth=<MinWidth ->
- true;
- true ->
- gs:config(Window#tbwindow.canvas,{width,NewWidth}),
- gs:config(Window#tbwindow.labelframe,{width,NewWidth}),
- gs:config(Window#tbwindow.label,{width,NewWidth-2*?pad})
- end,
-
- MinHeight = Window#tbwindow.min_height,
- if
- NewHeight=<MinHeight ->
- Window;
- true ->
-
- %% Compute size difference
- Diff = NewHeight - Window#tbwindow.cur_height,
-
- %% Resize button frame
- Canvas = Window#tbwindow.canvas,
- gs:config(Canvas,{height,gs:read(Canvas,height)+Diff}),
-
- %% Move label frame accordingly
- LabelF = Window#tbwindow.labelframe,
- gs:config(LabelF,{y,gs:read(LabelF,y)+Diff}),
-
- %% Return updated tbwindow record
- Window#tbwindow{cur_height=NewHeight}
- end.
-
-%----------------------------------------
-% already_added(Window,ToolInfo) => true | false
-% Window - tbwindow record
-% ToolInfo - toolinfo record
-% Returns true if ToolInfo contains information about a tool that
-% is already included in Window
-%----------------------------------------
-already_added(Window,ToolInfo) ->
- already_added2(Window#tbwindow.icons,ToolInfo#toolinfo.tool).
-
-%----------------------------------------
-% already_added2(ToolInfos,Tool) => true | false
-% ToolInfos - [toolinfo record]
-% Tool - atom() Tool name
-%----------------------------------------
-already_added2([#toolinfo{tool=Tool}|_Rest],Tool) ->
- true;
-already_added2([_|Rest],Tool) ->
- already_added2(Rest,Tool);
-already_added2([],_ToolInfo) ->
- false.
-
-%----------------------------------------
-% add_icon(Window,ToolInfo) => NewWindow
-% Window, NewWindow - tbwindow record
-% ToolInfo - toolinfo record
-% Add an icon to the main window
-%----------------------------------------
-add_icon(Window,ToolInfo) ->
- Norm = ?icon + 2*?pad,
-
- %% Extend window if necessary
- N = Window#tbwindow.no_of_buttons,
- ReqWidth = N*Norm+Norm,
- CurWidth = gs:read(Window#tbwindow.window,width),
- if
- ReqWidth>CurWidth ->
- gs:config(Window#tbwindow.window,{width,ReqWidth}),
- gs:config(Window#tbwindow.canvas,{width,ReqWidth}),
- gs:config(Window#tbwindow.labelframe,{width,ReqWidth}),
- gs:config(Window#tbwindow.label,{width,ReqWidth-2*?pad});
- true ->
- true
- end,
-
- %% Insert icon into button frame
- canvasbutton:create(Window#tbwindow.canvas,
- [{image,ToolInfo#toolinfo.icon},
- {x,N*Norm+?pad},{y,?pad},
- {width,?icon},{height,?icon},
- {data,{{start,ToolInfo#toolinfo.start},
- {message,ToolInfo#toolinfo.message}}}]),
-
- %% Insert tool name into help menu (if there is any help available)
- case ToolInfo#toolinfo.html of
- nofile ->
- true;
- Html ->
- gs:create(menuitem,Window#tbwindow.helpmenu,
- [{label,{text,ToolInfo#toolinfo.tool}},
- {data,{help,Html}}])
- end,
-
- MinWidth = gs:read(Window#tbwindow.window,width),
- Window#tbwindow{no_of_buttons=N+1,min_width=MinWidth,
- icons=[ToolInfo|Window#tbwindow.icons]}.
-
-%----------------------------------------
-% get_window(Window) -> gs_obj()
-% Window - tbwindow record
-%----------------------------------------
-get_window(Window) ->
- Window#tbwindow.window.
-
-%----------------------------------------
-% cursor(Window,Cursor)
-% Window - tbwindow record
-% Cursor - arrow | busy
-%----------------------------------------
-cursor(Window,Cursor) ->
- gs:config(Window#tbwindow.window,{cursor,Cursor}).
-
-%----------------------------------------
-% listen_configure(Window)
-% Window - tbwindow record
-% Configure Window to listen for configure events
-%----------------------------------------
-listen_configure(Window) ->
- gs:config(Window#tbwindow.window,{configure,true}).
-
-%----------------------------------------
-% display_show(Window,Text)
-% Window - tbwindow record
-% Text - string()
-% Display text in the help text area
-%----------------------------------------
-display_show(Window,Text) ->
- gs:config(Window#tbwindow.label,{label,{text,Text}}).
-
-%----------------------------------------
-% display_clear(Window)
-% Window - tbwindow record
-% Clear the help text area
-%----------------------------------------
-display_clear(Window) ->
- display_show(Window,"").
-
-%%% Internal functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% within(X,Y,[{Left,Top},{Right,Bot}]) => true | false
-% Return true if {X,Y} is within the given rectangle.
-%----------------------------------------
-within(X,Y,[{L,T},{R,B}]) ->
- if
- X>=L,
- X=<R,
- Y>=T,
- Y=<B ->
- true;
- true ->
- false
- end.
diff --git a/lib/toolbar/src/toolbar_lib.erl b/lib/toolbar/src/toolbar_lib.erl
deleted file mode 100644
index 9d3b9fdeb5..0000000000
--- a/lib/toolbar/src/toolbar_lib.erl
+++ /dev/null
@@ -1,223 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(toolbar_lib).
--include_lib("kernel/include/file.hrl").
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Library functions
-%
-%%% Exports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--export([gs_contribs_dir/0,help_file/0,otp_file/0]).
--export([error_string/1]).
--export([legal_file/1]).
--export([insert_newlines/1]).
--export([tool_info_syntax/2]).
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% Exported functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% gs_contribs_dir() => string()
-% Return the directory of the GS contributions
-%----------------------------------------
-gs_contribs_dir() ->
- filename:join(code:lib_dir(gs),"contribs/ebin/").
-
-%----------------------------------------
-% help_file() => string()
-% Returns the address to the toolbar help file
-%----------------------------------------
-help_file() ->
- filename:join([code:lib_dir(toolbar),"doc", "html", "index.html"]).
-
-%----------------------------------------
-% otp_file() => string()
-% Returns the address to the OTP documentation
-%----------------------------------------
-otp_file() ->
- filename:join([code:root_dir(),"doc", "index.html"]).
-
-%----------------------------------------
-% error_string(Reason) => string()
-% Reason - nofile | format | noname | nostart | illegal | raccess | waccess
-% Given Reason, returns a short "explanation string"
-%----------------------------------------
-error_string(nofile) -> "File does not exist";
-error_string(format) -> "File on wrong format";
-
-error_string(noname) -> "No tool name is specified";
-error_string(nostart) -> "No start function is specified";
-
-error_string(illegal) -> "Illegal file name";
-
-error_string(raccess) -> "File is not readable";
-error_string(waccess) -> "File is not writeable".
-
-%----------------------------------------
-% legal_file(File) => ok | directory | {error,nofile} | {error,raccess}
-% File - string() File name
-% Checks if File is an existing and readable file.
-%----------------------------------------
-legal_file(File) ->
- case file:read_file_info(File) of
-
- %% File exists...
- {ok,#file_info{type=regular,access=Access}} ->
- if
-
- %% ...but is read protected
- Access/=read,
- Access/=read_write ->
- {error,raccess};
-
- %% ...and is possible to read
- true ->
- ok
- end;
-
- {ok,#file_info{type=directory}} ->
- directory;
-
- %% File does not exist
- _Error ->
- {error,nofile}
- end.
-
-%----------------------------------------
-% insert_newlines(Strings) => string()
-% Strings - string() | [string()]
-% If Strings is a list of strings, return a string where all these strings
-% are concatenated with newlines in between, otherwise return Strings.
-%----------------------------------------
-insert_newlines([String|Rest]) when is_list(String), Rest/=[]->
- String ++ "\n" ++ insert_newlines(Rest);
-insert_newlines([Last]) ->
- [Last];
-insert_newlines(Other) ->
- Other.
-
-%----------------------------------------
-% tool_info_syntax(Version,ToolInfo) => {ok,CorrToolInfo} | {error,Reason}
-% Version - string()
-% ToolInfo - tuple()
-% CorrToolInfo - list()
-% Reason - version | format | noname | nostart
-% Return a corrected (blanks removed etc) version of ToolInfo
-% if the syntax of ToolInfo is correct (ie contains all
-% mandatory elements and all values are of the specified type).
-%
-% Currently accepted versions:
-% "0.1" (which should be "1.0")
-% "1.1" (same as "0.1")
-%----------------------------------------
-tool_info_syntax("1.1",ToolInfo) ->
- tool_info_syntax("0.1",ToolInfo);
-tool_info_syntax("0.1",ToolInfo) when is_tuple(ToolInfo) ->
- syntax01(tuple_to_list(ToolInfo),false,false,[]);
-tool_info_syntax("0.1",_) ->
- {error,format};
-tool_info_syntax("1.2",ToolInfo) when is_list(ToolInfo)->
- syntax01(ToolInfo,false,false,[]);
-tool_info_syntax(_Vsn,_) ->
- {error,version}.
-
-
-%%% Internal functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% syntax01(List,NameF,StartF,Res) => {ok,Res} | {error,Reason}
-% List - [tuple()]
-% NameF, StartF - boolean()
-% Res - [tuple()]
-% Reason - format | noname | nostart
-% Version 0.1 syntax check of .tool file.
-%----------------------------------------
-syntax01([{tool,Str}|Rest],false,StartF,Res) when is_list(Str) ->
- case string:strip(Str) of
- [] ->
- {error,format};
- Tool ->
- syntax01(Rest,true,StartF,[{tool,Tool}|Res])
- end;
-syntax01([{start,{M,F,A}}|Rest],NameF,false,Res) when is_atom(M),
- is_atom(F),
- is_list(A) ->
- syntax01(Rest,NameF,true,[{start,{M,F,A}}|Res]);
-syntax01([{icon,Str}|Rest],NameF,StartF,Res) when is_list(Str) ->
- case string:strip(Str) of
- [] ->
- syntax01(Rest,NameF,StartF,Res);
- Icon ->
- syntax01(Rest,NameF,StartF,[{icon,Icon}|Res])
- end;
-syntax01([{message,Str}|Rest],NameF,StartF,Res) when is_list(Str) ->
- case string:strip(Str) of
- [] ->
- syntax01(Rest,NameF,StartF,Res);
- Message ->
- syntax01(Rest,NameF,StartF,
- [{message,lists:sublist(Message,1,30)}|Res])
- end;
-syntax01([{html,Str}|Rest],NameF,StartF,Res) when is_list(Str) ->
- case string:strip(Str) of
- [] ->
- syntax01(Rest,NameF,StartF,Res);
- Html ->
- syntax01(Rest,NameF,StartF,[{html,Html}|Res])
- end;
-%%The fields used by webtool must be removed
-syntax01([_|Rest],NameF,StartF,Res) ->
- syntax01(Rest,NameF,StartF,Res);
-
-syntax01([],true,true,Res) ->
- {ok,Res};
-syntax01([],false,_,_) ->
- {error,noname};
-syntax01([],_,false,_) ->
- {error,nostart};
-syntax01(_,_,_,_) ->
- {error,format}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/toolbar/src/toolbar_toolconfig.erl b/lib/toolbar/src/toolbar_toolconfig.erl
deleted file mode 100644
index 479033fa22..0000000000
--- a/lib/toolbar/src/toolbar_toolconfig.erl
+++ /dev/null
@@ -1,549 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(toolbar_toolconfig).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}}]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Erlang Toolbar
-%
-%%% Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Tool configuration tool, edit and creates .tool files
-% This tool works separately from the toolbar.
-%
-%%% External data types %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% toolinfo() -- Tool configuration information
--include("toolbar.hrl").
-%
-%%% Internal data types %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% tfwindow() -- Toolfile configuration window
--record(tfwindow,
- {window,
- fileentry,
- toolentry,moduleentry,functionentry,
- iconentry,messageentry,htmlentry,
- label}).
-%
-%%% Exports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
--export([start/0]).
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--export([init/0]). % spawn
-
-
-%%% Exported functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%----------------------------------------
-% start() => pid()
-%----------------------------------------
-start() ->
- spawn(toolbar_toolconfig,init,[]).
-
-
-%%% Internal functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%=============================================================================
-% Main loop
-%=============================================================================
-
-%----------------------------------------
-% init()
-%----------------------------------------
-init() ->
-
- %% Start GS (or get the pid if it is already running)
- S = gs:start(),
-
- %% Draw the window
- Window = draw_window(S),
-
- loop(S,Window).
-
-%----------------------------------------
-% loop(S,Window)
-% S - pid() GS
-% Window - tfwindow()
-%----------------------------------------
-loop(S,Window) ->
- receive
-
- %% 'Return' pressed in the 'File' entry
- {gs,_Obj,keypress,file,['Return'|_]} ->
-
- %% Check if a file name is specified
- case string:strip(gs:read(Window#tfwindow.fileentry,text)) of
-
- %% No file name specified, move focus to next entry
- "" ->
- move_focus(Window,file);
-
- %% A name is specified
- String ->
-
- %% Add a .tool suffix to the file name if necessary
- FileName = tool_file(String),
-
- %% Write the complete file name to the file entry
- gs:config(Window#tfwindow.fileentry,{text,FileName}),
-
- %% Try to open the file
- case file:consult(FileName) of
-
- %% File exists and seems ok
- {ok,[{version,Vsn},T]} ->
-
- %% Check the syntax of the file contents
- %% (All mandatory information specified,
- %% correct types, etc)
- case toolbar_lib:tool_info_syntax(Vsn,T) of
-
- %% Ok -- Show the file contents in the window
- %% and move focus to the next entry
- {ok,Info} ->
- display(Window,"File: "++FileName++
- " opened"),
- clear_info(Window),
- show_info(Window,Info),
- move_focus(Window,file);
-
- %% Erroneous version number -- Notify user
- {error,version} ->
- Win = Window#tfwindow.window,
- tool_utils:notify(Win,[FileName,
- "File has wrong version number"]);
-
- %% Other error -- Notify user
- _Error ->
- Win = Window#tfwindow.window,
- tool_utils:notify(Win,[FileName,
- "File is in erroneous format"])
- end;
-
- %% The file can not be read, show default values
- %% according to the file name in the window and
- %% move focus to the next entry
- _ ->
- display(Window,"File: "++FileName ++
- " could not be read, new file"),
- Tool = filename:basename(FileName,".tool"),
- clear_info(Window),
- show_info(Window,[{tool,Tool},
- {start,{list_to_atom(Tool),
- start,[]}},
- {icon,Tool++".gif"},
- {html,Tool++".html"}]),
- move_focus(Window,file)
- end
- end,
- loop(S,Window);
-
- %% 'Return' pressed in another entry, move focus to next entry
- {gs,_Obj,keypress,Focus,['Return'|_]} ->
- move_focus(Window,Focus),
- loop(S,Window);
-
- %% Any oher keypress, clear the display
- {gs,_Obj,keypress,_Data,_Args} ->
- display_clear(Window),
- loop(S,Window);
-
- %% 'Clear' button pressed, clear the window
- {gs,_Obj,click,_Data,["Clear"|_]} ->
- clear_info(Window),
- loop(S,Window);
-
- %% 'Save' button pressed, save the given information to file
- {gs,_Obj,click,_Data,["Save"|_]} ->
-
- %% Check if a file name is specified
- case string:strip(gs:read(Window#tfwindow.fileentry,text)) of
-
- %% No file name specified, notify user
- "" ->
- Win = Window#tfwindow.window,
- tool_utils:notify(Win,
- "A file name must be specified");
-
- %% A name is specified
- String ->
-
- %% Add a .tool suffix to the file name if necessary
- FileName = tool_file(String),
-
- %% Write the complete file name to the file entry
- gs:config(Window#tfwindow.fileentry,{text,FileName}),
-
- %% Check the other information given
- case check_info(Window) of
-
- %% If given info is correct, try to save
- %% it to the file
- {ok,ToolInfo} ->
- Win = Window#tfwindow.window,
- case save_info(Win,FileName,ToolInfo) of
-
- %% Ok, display confirmation
- ok ->
- display(Window,
- "Tool information saved to "++
- FileName);
-
- %% Cancel, do nothing
- cancel ->
- ignore;
-
- %% Error, display error message
- {error,Reason} ->
- display(Window,
- toolbar_lib:error_string(Reason)++
- FileName)
- end;
-
- %% Given info incorrect, notify user
- {error,Reason} ->
- Win = Window#tfwindow.window,
- Str = toolbar_lib:error_string(Reason),
- tool_utils:notify(Win,Str)
- end
- end,
- loop(S,Window);
-
- %% 'Stop' button, close window and exit
- {gs,_Obj,click,_Data,["Stop"|_]} ->
- gs:destroy(Window#tfwindow.window),
- finished;
-
- %% Window closed, exit
- {gs,_Obj,destroy,_Data,_Args} ->
- finished;
-
- Other ->
- io:format("toolbar_toolconfig: unexp msg: ~p~n",[Other]),
- loop(S,Window)
- end.
-
-
-%=============================================================================
-% Graphics
-%=============================================================================
-
-%----------------------------------------
-% draw_window(S)
-% S - pid() GS
-% Draw the main window.
-%----------------------------------------
-draw_window(S) ->
-
- %% ----- Open a new window -----
- Win = gs:create(window,S,[{width,400},{height,390},
- {title,"Create Tool File"}]),
-
- %% ----- Top frame containing a 'File name' label and entry -----
- Top = gs:create(frame,Win,[{x,0},{y,0},{width,400},{height,60},{bw,2},
- {keypress,true}]),
-
- %% File name
- gs:create(label,Top,[{x,10},{y,10},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"File name:"}}]),
- File = gs:create(entry,Top,[{x,110},{y,10},{width,280},{height,30},
- {keypress,true},{data,file}]),
-
- %% ----- Middle frame containing other labels and entries -----
- Mid = gs:create(frame,Win,[{x,0},{y,60},{width,400},{height,250},{bw,2},
- {keypress,true}]),
-
- %% Tool name
- gs:create(label,Mid,[{x,10},{y,10},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"Tool name:"}}]),
- Tool = gs:create(entry,Mid,[{x,110},{y,10},{width,280},{height,30},
- {keypress,true},{data,tool}]),
-
- %% Start function
- gs:create(label,Mid,[{x,10},{y,60},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"Start:"}}]),
- Mod = gs:create(entry,Mid,[{x,110},{y,60},{width,135},{height,30},
- {keypress,true},{data,module}]),
- Fun = gs:create(entry,Mid,[{x,245},{y,60},{width,135},{height,30},
- {keypress,true},{data,function}]),
-
- %% Icon file
- gs:create(label,Mid,[{x,10},{y,110},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"Icon file:"}}]),
- Icon = gs:create(entry,Mid,[{x,110},{y,110},{width,280},{height,30},
- {keypress,true},{data,icon}]),
-
- %% Message
- gs:create(label,Mid,[{x,10},{y,160},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"Message:"}}]),
- Msg = gs:create(entry,Mid,[{x,110},{y,160},{width,280},{height,30},
- {keypress,true},{data,message}]),
-
- %% HTML file
- gs:create(label,Mid,[{x,10},{y,210},{width,80},{height,30},{align,e},
- {keypress,true},
- {label,{text,"HTML:"}}]),
- Html = gs:create(entry,Mid,[{x,110},{y,210},{width,280},{height,30},
- {keypress,true},{data,html}]),
-
- %% ----- Bottom frame containing the buttons -----
- Bot = gs:create(frame,Win,[{x,0},{y,310},{width,400},{height,50},
- {bw,2},{keypress,true}]),
-
- gs:create(button,Bot,[{x,75},{y,10},{width,50},{height,30},
- {keypress,true},
- {label,{text,"Clear"}}]),
- gs:create(button,Bot,[{x,175},{y,10},{width,50},{height,30},
- {keypress,true},
- {label,{text,"Save"}}]),
- gs:create(button,Bot,[{x,275},{y,10},{width,50},{height,30},
- {keypress,true},
- {label,{text,"Stop"}}]),
-
- %% ----- Label for displaying help messages -----
- Lbl = gs:create(label,Win,[{x,0},{y,360},{width,400},{height,30},{bw,2},
- {relief,raised},
- {keypress,true},
- {align,c},{label,{text,""}}]),
-
- gs:config(Win,{map,true}),
- gs:config(File,{setfocus,true}),
-
- #tfwindow{window=Win,
- fileentry=File,
- toolentry=Tool,
- moduleentry=Mod,
- functionentry=Fun,
- iconentry=Icon,
- messageentry=Msg,
- htmlentry=Html,
- label=Lbl}.
-
-%----------------------------------------
-% move_focus(Window,Focus)
-% Window - tfwindow()
-% Focus - file | tool | module | function | icon | message | html | none
-% Move the input focus to the entry following Focus
-%----------------------------------------
-move_focus(Window,file) ->
- gs:config(Window#tfwindow.toolentry,{setfocus,true});
-move_focus(Window,tool) ->
- gs:config(Window#tfwindow.moduleentry,{setfocus,true});
-move_focus(Window,module) ->
- gs:config(Window#tfwindow.functionentry,{setfocus,true});
-move_focus(Window,function) ->
- gs:config(Window#tfwindow.iconentry,{setfocus,true});
-move_focus(Window,icon) ->
- gs:config(Window#tfwindow.messageentry,{setfocus,true});
-move_focus(Window,message) ->
- gs:config(Window#tfwindow.htmlentry,{setfocus,true});
-move_focus(Window,html) ->
- gs:config(Window#tfwindow.htmlentry,{setfocus,false});
-move_focus(_Window,none) ->
- true.
-
-%----------------------------------------
-% display(Window,Text)
-% Window - tfwindow()
-% Text - string()
-% Display a help message in the window
-%----------------------------------------
-display(Window,Text) ->
- gs:config(Window#tfwindow.label,{label,{text,Text}}).
-
-%----------------------------------------
-% display_clear(Window)
-% Window - tfwindow()
-% Clear the help message display
-%----------------------------------------
-display_clear(Window) ->
- display(Window,"").
-
-%----------------------------------------
-% clear_info(Window)
-% Window - tfwindow()
-% Clear the entries of Window (except the file entry)
-%----------------------------------------
-clear_info(Window) ->
- gs:config(Window#tfwindow.toolentry,{text,""}),
- gs:config(Window#tfwindow.moduleentry,{text,""}),
- gs:config(Window#tfwindow.functionentry,{text,""}),
- gs:config(Window#tfwindow.iconentry,{text,""}),
- gs:config(Window#tfwindow.messageentry,{text,""}),
- gs:config(Window#tfwindow.htmlentry,{text,""}).
-
-%----------------------------------------
-% show_info(Window,List)
-% Window - tfwindow()
-% List - [{Key,Val}]
-% Key - tool, Val - string()
-% Key - start, Val - {atom(),atom(),_}
-% Key - icon, Val - string()
-% Key - message, Val - string()
-% Key - html, Val - string()
-% Display the different Val's in the appropriate entries of Window
-%----------------------------------------
-show_info(_Window,[]) ->
- ok;
-show_info(Window,[{tool,Tool}|Rest]) ->
- gs:config(Window#tfwindow.toolentry,{text,Tool}),
- show_info(Window,Rest);
-show_info(Window,[{start,{M,F,_}}|Rest]) ->
- gs:config(Window#tfwindow.moduleentry,{text,M}),
- gs:config(Window#tfwindow.functionentry,{text,F}),
- show_info(Window,Rest);
-show_info(Window,[{icon,Icon}|Rest]) ->
- gs:config(Window#tfwindow.iconentry,{text,Icon}),
- show_info(Window,Rest);
-show_info(Window,[{message,Message}|Rest]) ->
- gs:config(Window#tfwindow.messageentry,{text,Message}),
- show_info(Window,Rest);
-show_info(Window,[{html,Html}|Rest]) ->
- gs:config(Window#tfwindow.htmlentry,{text,Html}),
- show_info(Window,Rest).
-
-
-%=============================================================================
-% Retrieve user specified information
-%=============================================================================
-
-%----------------------------------------
-% check_info(Window) => {ok,ToolInfo} | {error,Reason}
-% Window - tfwindow()
-% ToolInfo - toolinfo()
-% Reason - noname | nostart
-% Check the information given in the entries and insert it into ToolInfo
-% if all mandatory information is given.
-%----------------------------------------
-check_info(Window) ->
-
- %% First check mandatory elements: name and start function
- Tool = gs:read(Window#tfwindow.toolentry,text),
- M = gs:read(Window#tfwindow.moduleentry,text),
- F = gs:read(Window#tfwindow.functionentry,text),
-
- if
- Tool/="",M/="",F/="" ->
- ToolInfo =
- #toolinfo{tool=Tool,
- start={list_to_atom(M),list_to_atom(F),[]},
- icon=gs:read(Window#tfwindow.iconentry,text),
- message=gs:read(Window#tfwindow.messageentry,text),
- html=gs:read(Window#tfwindow.htmlentry,text)},
- {ok,ToolInfo};
-
- Tool=="" ->
- {error,noname};
-
- true ->
- {error,nostart}
- end.
-
-
-%=============================================================================
-% Save information to file
-%=============================================================================
-
-%----------------------------------------
-% save_info(Win,File,ToolInfo) => ok | cancel | {error,waccess}
-% Win - GS object
-% File - string()
-% ToolInfo - toolinfo()
-% Saves the information in ToolInfo to File on a predefined format.
-%----------------------------------------
-save_info(Win,File,ToolInfo) ->
-
- %% First check if file already exists
- case file:read_file_info(File) of
- {ok,_FileInfo} ->
-
- %% Request the user to confirm that the file should
- %% be overwritten
- case tool_utils:confirm(Win,[File,
- "exists, will be overwritten"]) of
- ok ->
- save_info2(File,ToolInfo);
- cancel ->
- cancel
- end;
-
- {error,_Reason} -> % _Reason = "No such file or directory"
- save_info2(File,ToolInfo)
- end.
-
-%----------------------------------------
-% save_info2(File,ToolInfo) => ok | {error,waccess}
-% File - string() File name
-% ToolInfo - toolinfo record
-% Called by save_info/3
-%----------------------------------------
-save_info2(File,ToolInfo) ->
- case file:open(File, [write]) of
- {ok,Fd} ->
- io:format(Fd,"{version,\"~s\"}.~n",[toolbar:version()]),
- io:format(Fd,"{{tool,\"~s\"},~n",[ToolInfo#toolinfo.tool]),
- io:format(Fd," {start,~w}",[ToolInfo#toolinfo.start]),
- case ToolInfo#toolinfo.icon of
- "" -> ignore;
- Icon -> io:format(Fd,",~n {icon,\"~s\"}",[Icon])
- end,
- case ToolInfo#toolinfo.message of
- "" -> ignore;
- Message -> io:format(Fd,",~n {message,\"~s\"}",[Message])
- end,
- case ToolInfo#toolinfo.html of
- "" -> ignore;
- Html -> io:format(Fd,",~n {html,\"~s\"}",[Html])
- end,
- io:format(Fd,"}.~n",[]),
- file:close(Fd),
- ok;
- _Error ->
- {error,waccess}
- end.
-
-
-%=============================================================================
-% Auxiliary functions
-%=============================================================================
-
-%----------------------------------------
-% tool_file(File) => string()
-% File - string()
-% Return a file name consisting of File with the suffix .tool added,
-% if File does not already have this suffix.
-%----------------------------------------
-tool_file(File) ->
- case filename:extension(File) of
- ".tool" -> File;
- _ -> File ++ ".tool"
- end.
diff --git a/lib/toolbar/vsn.mk b/lib/toolbar/vsn.mk
deleted file mode 100644
index e84fb4e37b..0000000000
--- a/lib/toolbar/vsn.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-TOOLBAR_VSN = 1.4.2.3
-
-
-
-
-
-
-
-
-
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
index aea5686ae9..b1eb69f9dc 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
@@ -96,8 +96,11 @@ DRIVERS=
ifneq ($(strip $(ETHR_LIB_NAME)),)
# Need ethread package for emem
+ifneq ($(findstring ose,$(TARGET)),ose)
+# Do not build on OSE
PROGS += $(BIN_DIR)/emem$(TYPEMARKER)@EXEEXT@
endif
+endif
EMEM_OBJ_DIR=$(OBJ_DIR)/emem
CREATE_DIRS += $(EMEM_OBJ_DIR)
@@ -148,7 +151,12 @@ ERTS_LIB = $(ERL_TOP/erts/lib_src/obj/$(TARGET)/$(TYPE)/MADE
_create_dirs := $(shell mkdir -p $(CREATE_DIRS))
+ifneq ($(findstring ose,$(TARGET)),ose)
all: $(PROGS) $(DRIVERS)
+else
+# Do not build dynamic files on OSE
+all:
+endif
$(ERTS_LIB):
$(make_verbose)cd $(ERL_TOP)/erts/lib_src && $(MAKE) $(TYPE)
diff --git a/lib/tools/doc/src/book.xml b/lib/tools/doc/src/book.xml
index 96f6c426c3..6260bcdf3a 100644
--- a/lib/tools/doc/src/book.xml
+++ b/lib/tools/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/cover.xml b/lib/tools/doc/src/cover.xml
index beefd4ee8d..07ffa65e3d 100644
--- a/lib/tools/doc/src/cover.xml
+++ b/lib/tools/doc/src/cover.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/tools/doc/src/cover_chapter.xml b/lib/tools/doc/src/cover_chapter.xml
index 5083b01f1d..f29f59bee0 100644
--- a/lib/tools/doc/src/cover_chapter.xml
+++ b/lib/tools/doc/src/cover_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/cprof.xml b/lib/tools/doc/src/cprof.xml
index 2dc419d29c..553597837e 100644
--- a/lib/tools/doc/src/cprof.xml
+++ b/lib/tools/doc/src/cprof.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/cprof_chapter.xml b/lib/tools/doc/src/cprof_chapter.xml
index cf6a6f843a..6536d43e0f 100644
--- a/lib/tools/doc/src/cprof_chapter.xml
+++ b/lib/tools/doc/src/cprof_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/eprof.xml b/lib/tools/doc/src/eprof.xml
index 8b4986297a..73fd563fbd 100644
--- a/lib/tools/doc/src/eprof.xml
+++ b/lib/tools/doc/src/eprof.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
@@ -35,7 +35,7 @@
used. The profiling is done using the Erlang trace BIFs. Tracing of
local function calls for a specified set of processes is enabled when
profiling is begun, and disabled when profiling is stopped.</p>
- <p>When using Eprof expect a slowdown in program execution.</p>
+ <p>When using Eprof, expect a slowdown in program execution.</p>
</description>
<funcs>
<func>
diff --git a/lib/tools/doc/src/erlang_mode.xml b/lib/tools/doc/src/erlang_mode.xml
index 794224d601..747c41d554 100644
--- a/lib/tools/doc/src/erlang_mode.xml
+++ b/lib/tools/doc/src/erlang_mode.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/erlang_mode_chapter.xml b/lib/tools/doc/src/erlang_mode_chapter.xml
index 4ffa224ea5..3be1d53ca2 100644
--- a/lib/tools/doc/src/erlang_mode_chapter.xml
+++ b/lib/tools/doc/src/erlang_mode_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/fascicules.xml b/lib/tools/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/tools/doc/src/fascicules.xml
+++ b/lib/tools/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/tools/doc/src/fprof.xml b/lib/tools/doc/src/fprof.xml
index 8babf50033..f83c049fcd 100644
--- a/lib/tools/doc/src/fprof.xml
+++ b/lib/tools/doc/src/fprof.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -789,7 +789,7 @@ create_file_slow(FD, M, N) ->
function was first unsuspended and then garbage
collected. Otherwise the printout would show
<c>garbage_collect</c> being called from <c>suspend</c> but not
- not which function that might have caused the garbage
+ which function that might have caused the garbage
collection.
</p>
<p>Let us now get back to the test code:</p>
diff --git a/lib/tools/doc/src/fprof_chapter.xml b/lib/tools/doc/src/fprof_chapter.xml
index 3f40d93f40..462b3f9579 100644
--- a/lib/tools/doc/src/fprof_chapter.xml
+++ b/lib/tools/doc/src/fprof_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/instrument.xml b/lib/tools/doc/src/instrument.xml
index b7e48ea306..3f278b63cd 100644
--- a/lib/tools/doc/src/instrument.xml
+++ b/lib/tools/doc/src/instrument.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>1998</year><year>2011</year>
+ <year>1998</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/lcnt.xml b/lib/tools/doc/src/lcnt.xml
index 3c55e4e422..9754b107fe 100644
--- a/lib/tools/doc/src/lcnt.xml
+++ b/lib/tools/doc/src/lcnt.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2009</year>
- <year>2010</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/lcnt_chapter.xml b/lib/tools/doc/src/lcnt_chapter.xml
index 8f44b23f59..1b8595749d 100644
--- a/lib/tools/doc/src/lcnt_chapter.xml
+++ b/lib/tools/doc/src/lcnt_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2009</year><year>2010</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/make.xml b/lib/tools/doc/src/make.xml
index 1c8df67abf..f4d64fa9e2 100644
--- a/lib/tools/doc/src/make.xml
+++ b/lib/tools/doc/src/make.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1996</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml
index 2e4c354fbd..38b57b73a9 100644
--- a/lib/tools/doc/src/notes.xml
+++ b/lib/tools/doc/src/notes.xml
@@ -30,6 +30,176 @@
</header>
<p>This document describes the changes made to the Tools application.</p>
+<section><title>Tools 2.7.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix lcnt sorting and printout of histograms.</p>
+ <p>
+ Own Id: OTP-12364</p>
+ </item>
+ <item>
+ <p> Fix a Unicode bug in the <c>tags</c> module. </p>
+ <p>
+ Own Id: OTP-12567</p>
+ </item>
+ <item>
+ <p>
+ Fix tags completion in erlang.el for GNU Emacs 23+</p>
+ <p>
+ Own Id: OTP-12583</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Tools 2.7.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a typo in erlang-mode comment.</p>
+ <p>
+ Own Id: OTP-12214</p>
+ </item>
+ <item>
+ <p>
+ Add a skeleton for -spec in Erlang mode for Emacs</p>
+ <p>
+ Own Id: OTP-12283</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Cover no longer crashes when compiling <c>receive</c> and
+ the like with just an <c>after</c> clause. Thanks to
+ José Valim for providing a fix.</p>
+ <p>
+ Own Id: OTP-12328</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Tools 2.7</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add log2 histogram to lcnt for lock wait time</p>
+ <p>
+ Own Id: OTP-12059</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Tools 2.6.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Removed <c>erlang:bitstr_to_list/1</c> and
+ <c>erlang:list_to_bitstr/1</c>. They were added by
+ mistake, and have always raised an <c>undefined</c>
+ exception when called.</p>
+ <p>
+ Own Id: OTP-11942</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Tools 2.6.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Removed the support for the query keyword from emacs mode
+ (Thanks to Paul Oliver)</p>
+ <p>
+ Own Id: OTP-11568</p>
+ </item>
+ <item>
+ <p>
+ Emacs mode improvements (Thanks to Steve Vinoski)</p>
+ <p>
+ Own Id: OTP-11601</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ The emacs erlang mode now match erlang keywords more
+ carefully (Thanks to Steve Vinoski)</p>
+ <p>
+ Own Id: OTP-11786</p>
+ </item>
+ <item>
+ <p>
+ The emacs erlang-mode now auto loads for more file types
+ (Thanks to Phil Hagelberg)</p>
+ <p>
+ Own Id: OTP-11788</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ <c>cover</c> can run on itself. Also, support for reading
+ BEAM files produced by ancient OTP versions before R9C
+ has been removed.</p>
+ <p>
+ Own Id: OTP-11692</p>
+ </item>
+ <item>
+ <p>
+ Support maps in cover</p>
+ <p>
+ Own Id: OTP-11764</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Tools 2.6.13</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/tools/doc/src/notes_history.xml b/lib/tools/doc/src/notes_history.xml
index 3791d5270a..2058dd8fde 100644
--- a/lib/tools/doc/src/notes_history.xml
+++ b/lib/tools/doc/src/notes_history.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2006</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/part.xml b/lib/tools/doc/src/part.xml
index bf9e1ebbec..5b03e1db55 100644
--- a/lib/tools/doc/src/part.xml
+++ b/lib/tools/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/part_notes.xml b/lib/tools/doc/src/part_notes.xml
index b8b67889c2..3527d5e3d9 100644
--- a/lib/tools/doc/src/part_notes.xml
+++ b/lib/tools/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/part_notes_history.xml b/lib/tools/doc/src/part_notes_history.xml
index da637f380a..43c0abd05a 100644
--- a/lib/tools/doc/src/part_notes_history.xml
+++ b/lib/tools/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/ref_man.xml b/lib/tools/doc/src/ref_man.xml
index d4861af9f3..7b68e18a75 100644
--- a/lib/tools/doc/src/ref_man.xml
+++ b/lib/tools/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/tags.xml b/lib/tools/doc/src/tags.xml
index 54b5a4914c..0aa0ca8e35 100644
--- a/lib/tools/doc/src/tags.xml
+++ b/lib/tools/doc/src/tags.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1998</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/doc/src/xref.xml b/lib/tools/doc/src/xref.xml
index 891a81639a..da16efa005 100644
--- a/lib/tools/doc/src/xref.xml
+++ b/lib/tools/doc/src/xref.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
diff --git a/lib/tools/doc/src/xref_chapter.xml b/lib/tools/doc/src/xref_chapter.xml
index 566776eab0..db9f774186 100644
--- a/lib/tools/doc/src/xref_chapter.xml
+++ b/lib/tools/doc/src/xref_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2012</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el
index 527e812444..78929ac510 100644
--- a/lib/tools/emacs/erlang-skels.el
+++ b/lib/tools/emacs/erlang-skels.el
@@ -31,6 +31,7 @@
("Module" "module" erlang-skel-module)
("Author" "author" erlang-skel-author)
("Function" "function" erlang-skel-function)
+ ("Spec" "spec" erlang-skel-spec)
()
("Small Header" "small-header"
erlang-skel-small-header erlang-skel-header)
@@ -54,6 +55,8 @@
erlang-skel-gen-event erlang-skel-header)
("gen_fsm" "gen-fsm"
erlang-skel-gen-fsm erlang-skel-header)
+ ("wx_object" "wx-object"
+ erlang-skel-wx-object erlang-skel-header)
("Library module" "gen-lib"
erlang-skel-lib erlang-skel-header)
("Corba callback" "gen-corba-cb"
@@ -109,32 +112,32 @@ include separators of the form %%--...")
;; Expression templates:
(defvar erlang-skel-case
'((erlang-skel-skip-blank) o >
- "case " p " of" n> p "_ ->" n> p "ok" n> "end" p)
+ "case " p " of" n> p "_ ->" n> p "ok" n "end" > p)
"*The skeleton of a `case' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-if
'((erlang-skel-skip-blank) o >
- "if" n> p " ->" n> p "ok" n> "end" p)
+ "if" n> p " ->" n> p "ok" n "end" > p)
"The skeleton of an `if' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive
'((erlang-skel-skip-blank) o >
- "receive" n> p "_ ->" n> p "ok" n> "end" p)
+ "receive" n> p "_ ->" n> p "ok" n "end" > p)
"*The skeleton of a `receive' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive-after
'((erlang-skel-skip-blank) o >
- "receive" n> p "_ ->" n> p "ok" n> "after " p "T ->" n>
- p "ok" n> "end" p)
+ "receive" n> p "_ ->" n> p "ok" n "after " > p "T ->" n>
+ p "ok" n "end" > p)
"*The skeleton of a `receive' expression with an `after' clause.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive-loop
'(& o "loop(" p ") ->" n> "receive" n> p "_ ->" n>
- "loop(" p ")" n> "end.")
+ "loop(" p ")" n "end." >)
"*The skeleton of a simple `receive' loop.
Please see the function `tempo-define-template'.")
@@ -147,6 +150,10 @@ Please see the function `tempo-define-template'.")
"*The template of a function skeleton.
Please see the function `tempo-define-template'.")
+(defvar erlang-skel-spec
+ '("-spec " (erlang-skel-get-function-name) "(" (erlang-skel-get-function-args) ") -> undefined.")
+ "*The template of a -spec for the function following point.
+Please see the function `tempo-define-template'.")
;; Attribute templates
@@ -256,8 +263,8 @@ Please see the function `tempo-define-template'.")
"loop(From) ->" n>
"receive" n>
p "_ ->" n>
- "loop(From)" n>
- "end." n
+ "loop(From)" n
+ "end." > n
)
"*Template of a small server.
Please see the function `tempo-define-template'.")
@@ -291,8 +298,8 @@ Please see the function `tempo-define-template'.")
"{ok, Pid} ->" n>
"{ok, Pid};" n>
"Error ->" n>
- "Error" n>
- "end." n
+ "Error" n
+ "end." > n
n
(erlang-skel-separator-start 2)
"%% @private" n
@@ -421,8 +428,8 @@ Please see the function `tempo-define-template'.")
"{ok, Pid} ->" n>
"{ok, Pid, #state{}};" n>
"Error ->" n>
- "Error" n>
- "end." n
+ "Error" n
+ "end." > n
n
(erlang-skel-separator-start 2)
"%% @private" n
@@ -577,7 +584,7 @@ Please see the function `tempo-define-template'.")
"-record(state, {})." n n
(erlang-skel-double-separator-start 3)
- "%%% gen_event callbacks" n
+ "%%% API" n
(erlang-skel-double-separator-end 3) n
(erlang-skel-separator-start 2)
"%% @doc" n
@@ -851,6 +858,137 @@ Please see the function `tempo-define-template'.")
"*The template of a gen_fsm.
Please see the function `tempo-define-template'.")
+(defvar erlang-skel-wx-object
+ '((erlang-skel-include erlang-skel-large-header)
+ "-behaviour(wx_object)." n n
+
+ "-include_lib(\"wx/include/wx.hrl\")." n n
+
+ "%% API" n
+ "-export([start_link/0])." n n
+
+ "%% wx_object callbacks" n
+ "-export([init/1, handle_call/3, handle_cast/2, "
+ "handle_info/2," n>
+ "handle_event/2, terminate/2, code_change/3])." n n
+
+ "-record(state, {})." n n
+
+ (erlang-skel-double-separator-start 3)
+ "%%% API" n
+ (erlang-skel-double-separator-end 3) n
+ (erlang-skel-separator-start 2)
+ "%% @doc" n
+ "%% Starts the server" n
+ "%%" n
+ "%% @spec start_link() -> wxWindow()" n
+ (erlang-skel-separator-end 2)
+ "start_link() ->" n>
+ "wx_object:start_link(?MODULE, [], [])." n
+ n
+ (erlang-skel-double-separator-start 3)
+ "%%% wx_object callbacks" n
+ (erlang-skel-double-separator-end 3)
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Initializes the server" n
+ "%%" n
+ "%% @spec init(Args) -> {wxWindow(), State} |" n
+ "%% {wxWindow(), State, Timeout} |" n
+ "%% ignore |" n
+ "%% {stop, Reason}" n
+ (erlang-skel-separator-end 2)
+ "init([]) ->" n>
+ "wx:new()," n>
+ "Frame = wxFrame:new()," n>
+ "{Frame, #state{}}." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Handling events" n
+ "%%" n
+ "%% @spec handle_event(wx{}, State) ->" n
+ "%% {noreply, State} |" n
+ "%% {noreply, State, Timeout} |" n
+ "%% {stop, Reason, State}" n
+ (erlang-skel-separator-end 2)
+ "handle_event(#wx{}, State) ->" n>
+ "{noreply, State}." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Handling call messages" n
+ "%%" n
+ "%% @spec handle_call(Request, From, State) ->" n
+ "%% {reply, Reply, State} |" n
+ "%% {reply, Reply, State, Timeout} |" n
+ "%% {noreply, State} |" n
+ "%% {noreply, State, Timeout} |" n
+ "%% {stop, Reason, Reply, State} |" n
+ "%% {stop, Reason, State}" n
+ (erlang-skel-separator-end 2)
+ "handle_call(_Request, _From, State) ->" n>
+ "Reply = ok," n>
+ "{reply, Reply, State}." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Handling cast messages" n
+ "%%" n
+ "%% @spec handle_cast(Msg, State) -> {noreply, State} |" n
+ "%% {noreply, State, Timeout} |" n
+ "%% {stop, Reason, State}" n
+ (erlang-skel-separator-end 2)
+ "handle_cast(_Msg, State) ->" n>
+ "{noreply, State}." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Handling all non call/cast messages" n
+ "%%" n
+ "%% @spec handle_info(Info, State) -> {noreply, State} |" n
+ "%% {noreply, State, Timeout} |" n
+ "%% {stop, Reason, State}" n
+ (erlang-skel-separator-end 2)
+ "handle_info(_Info, State) ->" n>
+ "{noreply, State}." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% This function is called by a wx_object when it is about to" n
+ "%% terminate. It should be the opposite of Module:init/1 and do any" n
+ "%% necessary cleaning up. When it returns, the wx_object terminates" n
+ "%% with Reason. The return value is ignored." n
+ "%%" n
+ "%% @spec terminate(Reason, State) -> void()" n
+ (erlang-skel-separator-end 2)
+ "terminate(_Reason, _State) ->" n>
+ "ok." n
+ n
+ (erlang-skel-separator-start 2)
+ "%% @private" n
+ "%% @doc" n
+ "%% Convert process state when code is changed" n
+ "%%" n
+ "%% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}" n
+ (erlang-skel-separator-end 2)
+ "code_change(_OldVsn, State, _Extra) ->" n>
+ "{ok, State}." n
+ n
+ (erlang-skel-double-separator-start 3)
+ "%%% Internal functions" n
+ (erlang-skel-double-separator-end 3)
+ )
+ "*The template of a generic server.
+Please see the function `tempo-define-template'.")
+
(defvar erlang-skel-lib
'((erlang-skel-include erlang-skel-large-header)
@@ -1546,6 +1684,16 @@ The first character of DD is space if the value is less than 10."
(substring date 4 7)
(substring date -4))))
+(defun erlang-skel-get-function-name ()
+ (save-excursion
+ (erlang-beginning-of-function -1)
+ (erlang-get-function-name)))
+
+(defun erlang-skel-get-function-args ()
+ (save-excursion
+ (erlang-beginning-of-function -1)
+ (erlang-get-function-arguments)))
+
;; Local variables:
;; coding: iso-8859-1
;; End:
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index c395d22356..0c003bab39 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -7,7 +7,7 @@
;; %CopyrightBegin%
;;
-;; Copyright Ericsson AB 1996-2013. All Rights Reserved.
+;; Copyright Ericsson AB 1996-2014. All Rights Reserved.
;;
;; The contents of this file are subject to the Erlang Public License,
;; Version 1.1, (the "License"); you may not use this file except in
@@ -73,6 +73,8 @@
;; M-x set-variable RET debug-on-error RET t RET
;;; Code:
+(eval-when-compile (require 'cl))
+
;; Variables:
(defconst erlang-version "2.7"
@@ -620,7 +622,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"if"
"let"
"of"
- "query"
"receive"
"try"
"when")
@@ -663,6 +664,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"is_function"
"is_integer"
"is_list"
+ "is_map"
"is_number"
"is_pid"
"is_port"
@@ -714,7 +716,8 @@ resulting regexp is surrounded by \\_< and \\_>."
"pos_integer"
"string"
"term"
- "timeout")
+ "timeout"
+ "map")
"Erlang type specs types"))
(eval-and-compile
@@ -771,6 +774,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"is_function"
"is_integer"
"is_list"
+ "is_map"
"is_number"
"is_pid"
"is_port"
@@ -790,6 +794,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"list_to_tuple"
"load_module"
"make_ref"
+ "map_size"
"max"
"min"
"module_loaded"
@@ -848,7 +853,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"append_element"
"await_proc_exit"
"await_sched_wall_time_modifications"
- "bitstr_to_list"
"bump_reductions"
"call_on_load_function"
"cancel_timer"
@@ -882,6 +886,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"flush_monitor_message"
"format_cpu_topology"
"fun_info"
+ "fun_info_mfa"
"fun_to_list"
"function_exported"
"garbage_collect_message_area"
@@ -894,7 +899,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"hibernate"
"insert_element"
"is_builtin"
- "list_to_bitstr"
"load_nif"
"loaded"
"localtime"
@@ -1415,6 +1419,10 @@ Other commands:
(if (boundp 'after-change-major-mode-hook)
(run-hooks 'after-change-major-mode-hook)))
+;;;###autoload
+(dolist (r '("\\.erl$" "\\.app\\.src$" "\\.escript"
+ "\\.hrl$" "\\.xrl$" "\\.yrl" "/ebin/.+\\.app"))
+ (add-to-list 'auto-mode-alist (cons r 'erlang-mode)))
(defun erlang-syntax-table-init ()
(if (null erlang-mode-syntax-table)
@@ -2565,9 +2573,9 @@ Value is list (stack token-start token-type in-what)."
(erlang-pop stack))
(if (and stack (memq (car (car stack)) '(icr begin fun try)))
(erlang-pop stack))))
- ((looking-at "catch.*of")
+ ((looking-at "catch\\b.*of")
t)
- ((looking-at "catch\\s *\\($\\|%\\|.*->\\)")
+ ((looking-at "catch\\b\\s *\\($\\|%\\|.*->\\)")
;; Must pop top icr layer, `catch' in try/catch
;;will push a new layer next.
(progn
@@ -2600,18 +2608,24 @@ Value is list (stack token-start token-type in-what)."
(if (save-excursion
(goto-char (match-end 1))
(erlang-skip-blank to)
+ ;; Use erlang-variable-regexp here to look for an
+ ;; optional variable name to match EEP37 named funs.
+ (if (looking-at erlang-variable-regexp)
+ (progn
+ (goto-char (match-end 0))
+ (erlang-skip-blank to)))
(eq (following-char) ?\())
(erlang-push (list 'fun token (current-column)) stack)))
- ((looking-at "\\(begin\\|query\\)[^_a-zA-Z0-9]")
+ ((looking-at "\\(begin\\)[^_a-zA-Z0-9]")
(erlang-push (list 'begin token (current-column)) stack))
;; Normal when case
;;((looking-at "when\\s ")
;;((looking-at "when\\s *\\($\\|%\\)")
((looking-at "when[^_a-zA-Z0-9]")
(erlang-push (list 'when token (current-column)) stack))
- ((looking-at "catch.*of")
+ ((looking-at "catch\\b.*of")
t)
- ((looking-at "catch\\s *\\($\\|%\\|.*->\\)")
+ ((looking-at "catch\\b\\s *\\($\\|%\\|.*->\\)")
(erlang-push (list 'icr token (current-column)) stack))
;;(erlang-push (list '-> token (current-column)) stack))
;;((looking-at "^of$")
@@ -2902,7 +2916,7 @@ Return nil if inside string, t if in a comment."
(if stack
(erlang-caddr (car stack))
0))
- ((looking-at "catch\\($\\|[^_a-zA-Z0-9]\\)")
+ ((looking-at "catch\\b\\($\\|[^_a-zA-Z0-9]\\)")
;; Are we in a try
(let ((start (if (eq (car stack-top) '->)
(car (cdr stack))
@@ -3038,7 +3052,7 @@ This assumes that the preceding expression is either simple
\(i.e. an atom) or parenthesized."
(save-excursion
(or arg (setq arg 1))
- (forward-sexp (- arg))
+ (ignore-errors (forward-sexp (- arg)))
(let ((col (current-column)))
(skip-chars-backward " \t")
;; Special hack to handle: (note line break)
@@ -3112,13 +3126,13 @@ This assumes that the preceding expression is either simple
(defun erlang-at-keyword ()
"Are we looking at an Erlang keyword which will increase indentation?"
- (looking-at (concat "\\(when\\|if\\|fun\\|case\\|begin\\|query\\|"
- "of\\|receive\\|after\\|catch\\|try\\)[^_a-zA-Z0-9]")))
+ (looking-at (concat "\\(when\\|if\\|fun\\|case\\|begin\\|"
+ "of\\|receive\\|after\\|catch\\|try\\)\\b")))
(defun erlang-at-operator ()
"Are we looking at an Erlang operator?"
(looking-at
- "\\(bnot\\|div\\|mod\\|band\\|bor\\|bxor\\|bsl\\|bsr\\)[^_a-zA-Z0-9]"))
+ "\\(bnot\\|div\\|mod\\|band\\|bor\\|bxor\\|bsl\\|bsr\\)\\b"))
(defun erlang-comment-indent ()
"Compute Erlang comment indentation.
@@ -3645,6 +3659,10 @@ Normally used in conjunction with `erlang-beginning-of-clause', e.g.:
(setq cont nil))
((looking-at "\\s *\\($\\|%\\)")
(forward-line 1))
+ ((looking-at "\\s *<<[^>]*?>>")
+ (when (zerop res)
+ (setq res (+ 1 res)))
+ (goto-char (match-end 0)))
((looking-at "\\s *,")
(setq res (+ 1 res))
(goto-char (match-end 0)))
@@ -3926,7 +3944,7 @@ non-whitespace characters following the point on the current line."
(self-insert-command arg)
;; Was this the second char in bit-syntax open (`<<')?
- (unless (< (point) 2)
+ (unless (<= (point) 2)
(save-excursion
(backward-char 2)
(when (and (eq (char-after (point)) ?<)
@@ -3947,7 +3965,7 @@ non-whitespace characters following the point on the current line."
(defun erlang-after-bitsyntax-close ()
"Return t if point is immediately after a bit-syntax close parenthesis (`>>')."
- (and (>= (point) 2)
+ (and (>= (point) 3)
(save-excursion
(backward-char 2)
(and (eq (char-after (point)) ?>)
@@ -4725,6 +4743,23 @@ for a tag on the form `module:tag'."
;;; `module:tag'.
+(when (and (fboundp 'etags-tags-completion-table)
+ (fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+
+ (if (fboundp 'advice-add)
+ ;; Emacs 24.4+
+ (advice-add 'etags-tags-completion-table :around
+ (lambda (oldfun)
+ (if (eq find-tag-default-function 'erlang-find-tag-for-completion)
+ (erlang-etags-tags-completion-table)
+ (funcall oldfun)))
+ (list :name 'erlang-replace-tags-table))
+ ;; Emacs 23.1-24.3
+ (defadvice etags-tags-completion-table (around erlang-replace-tags-table activate)
+ (if (eq find-tag-default-function 'erlang-find-tag-for-completion)
+ (setq ad-return-value (erlang-etags-tags-completion-table))
+ ad-do-it))))
+
+
(defun erlang-complete-tag ()
"Perform tags completion on the text around point.
Completes to the set of names listed in the current tags table.
@@ -4736,7 +4771,17 @@ about Erlang modules."
(require 'etags)
(error nil))
(cond ((and erlang-tags-installed
- (fboundp 'complete-tag)) ; Emacs 19
+ (fboundp 'etags-tags-completion-table)
+ (fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+
+ ;; This depends on the advice called erlang-replace-tags-table
+ ;; above. It is not enough to let-bind
+ ;; tags-completion-table-function since that will not override
+ ;; the buffer-local value in the TAGS buffer.
+ (let ((find-tag-default-function 'erlang-find-tag-for-completion))
+ (complete-tag)))
+ ((and erlang-tags-installed
+ (fboundp 'complete-tag)
+ (fboundp 'tags-complete-tag)) ; Emacs 19
(let ((orig-tags-complete-tag (symbol-function 'tags-complete-tag)))
(fset 'tags-complete-tag
(symbol-function 'erlang-tags-complete-tag))
@@ -4751,6 +4796,15 @@ about Erlang modules."
(error "This version of Emacs can't complete tags"))))
+(defun erlang-find-tag-for-completion ()
+ (let ((start (save-excursion
+ (skip-chars-backward "[:word:][:digit:]_:'")
+ (point))))
+ (unless (eq start (point))
+ (buffer-substring-no-properties start (point)))))
+
+
+
;; Based on `tags-complete-tag', but this one uses
;; `erlang-tags-completion-table' instead of `tags-completion-table'.
;;
@@ -4798,7 +4852,12 @@ about Erlang modules."
;; the only format supported by Emacs, so far.)
(defun erlang-etags-tags-completion-table ()
(let ((table (make-vector 511 0))
- (file nil))
+ (file nil)
+ (progress-reporter
+ (when (fboundp 'make-progress-reporter)
+ (make-progress-reporter
+ (format "Making erlang tags completion table for %s..." buffer-file-name)
+ (point-min) (point-max)))))
(save-excursion
(goto-char (point-min))
;; This monster regexp matches an etags tag line.
@@ -4810,31 +4869,33 @@ about Erlang modules."
;; \6 is the line to start searching at;
;; \7 is the char to start searching at.
(while (progn
- (while (and
- (eq (following-char) ?\f)
- (looking-at "\f\n\\([^,\n]*\\),.*\n"))
- (setq file (buffer-substring
- (match-beginning 1) (match-end 1)))
- (goto-char (match-end 0)))
- (re-search-forward
- "\
+ (while (and
+ (eq (following-char) ?\f)
+ (looking-at "\f\n\\([^,\n]*\\),.*\n"))
+ (setq file (buffer-substring
+ (match-beginning 1) (match-end 1)))
+ (goto-char (match-end 0)))
+ (re-search-forward
+ "\
^\\(\\([^\177]+[^-a-zA-Z0-9_$\177]+\\)?\\([-a-zA-Z0-9_$?:]+\\)\
\[^-a-zA-Z0-9_$?:\177]*\\)\177\\(\\([^\n\001]+\\)\001\\)?\
\\([0-9]+\\)?,\\([0-9]+\\)?\n"
- nil t))
- (let ((tag (if (match-beginning 5)
- ;; There is an explicit tag name.
- (buffer-substring (match-beginning 5) (match-end 5))
- ;; No explicit tag name. Best guess.
- (buffer-substring (match-beginning 3) (match-end 3))))
- (module (and file
- (erlang-get-module-from-file-name file))))
- (intern tag table)
- (if (stringp module)
- (progn
- (intern (concat module ":" tag) table)
- ;; Only the first one will be stored in the table.
- (intern (concat module ":") table))))))
+ nil t))
+ (let ((tag (if (match-beginning 5)
+ ;; There is an explicit tag name.
+ (buffer-substring (match-beginning 5) (match-end 5))
+ ;; No explicit tag name. Best guess.
+ (buffer-substring (match-beginning 3) (match-end 3))))
+ (module (and file
+ (erlang-get-module-from-file-name file))))
+ (intern tag table)
+ (when (stringp module)
+ (intern (concat module ":" tag) table)
+ ;; Only the first ones will be stored in the table.
+ (intern (concat module ":") table)
+ (intern (concat module ":module_info") table))
+ (when progress-reporter
+ (progress-reporter-update progress-reporter (point))))))
table))
;;;
diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented
index 7e61bcc45b..1c1086ca58 100644
--- a/lib/tools/emacs/test.erl.indented
+++ b/lib/tools/emacs/test.erl.indented
@@ -483,6 +483,19 @@ indent_fun() ->
Y = true andalso
kalle
end),
+ %% check EEP37 named funs
+ Fn1 = fun Fact(N) when N > 0 ->
+ F = Fact(N-1),
+ N * F;
+ Fact(0) ->
+ 1
+ end,
+ %% check anonymous funs too
+ Fn2 = fun(0) ->
+ 1;
+ (N) ->
+ N
+ end,
ok.
indent_try_catch() ->
@@ -731,3 +744,19 @@ commas_first() ->
] }
]
}.
+
+
+%% this used to result in a scan-sexp error
+[{
+ }].
+
+%% this used to result in 2x the correct indentation within the function
+%% body, due to the function name being mistaken for a keyword
+catcher(N) ->
+ try generate_exception(N) of
+ Val -> {N, normal, Val}
+ catch
+ throw:X -> {N, caught, thrown, X};
+ exit:X -> {N, caught, exited, X};
+ error:X -> {N, caught, error, X}
+ end.
diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig
index 932758997d..a9d09000d2 100644
--- a/lib/tools/emacs/test.erl.orig
+++ b/lib/tools/emacs/test.erl.orig
@@ -483,6 +483,19 @@ Var = spawn(fun(X)
Y = true andalso
kalle
end),
+%% check EEP37 named funs
+Fn1 = fun Fact(N) when N > 0 ->
+ F = Fact(N-1),
+ N * F;
+Fact(0) ->
+ 1
+ end,
+%% check anonymous funs too
+ Fn2 = fun(0) ->
+1;
+ (N) ->
+ N
+ end,
ok.
indent_try_catch() ->
@@ -731,3 +744,19 @@ commas_first() ->
] }
]
}.
+
+
+%% this used to result in a scan-sexp error
+[{
+}].
+
+%% this used to result in 2x the correct indentation within the function
+%% body, due to the function name being mistaken for a keyword
+catcher(N) ->
+try generate_exception(N) of
+Val -> {N, normal, Val}
+catch
+throw:X -> {N, caught, thrown, X};
+exit:X -> {N, caught, exited, X};
+error:X -> {N, caught, error, X}
+end.
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index 13d9aefb0c..31754015f7 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -89,8 +89,9 @@
flush/1,
stop/0, stop/1]).
-export([remote_start/1,get_main_node/0]).
-%-export([bump/5]).
--export([transform/4]). % for test purposes
+
+%% Used internally to ensure we upgrade the code to the latest version.
+-export([main_process_loop/1,remote_process_loop/1]).
-record(main_state, {compiled=[], % [{Module,File}]
imported=[], % [{Module,File,ImportFile}]
@@ -110,7 +111,6 @@
-define(BUMP_REC_NAME,bump).
-record(vars, {module, % atom() Module name
- vsn, % atom()
init_info=[], % [{M,F,A,C,L}]
@@ -230,25 +230,9 @@ compile_directory(Dir) when is_list(Dir) ->
compile_directory(Dir, Options) when is_list(Dir), is_list(Options) ->
case file:list_dir(Dir) of
{ok, Files} ->
-
- %% Filter out all erl files (except cover.erl)
- ErlFileNames =
- lists:filter(fun("cover.erl") ->
- false;
- (File) ->
- case filename:extension(File) of
- ".erl" -> true;
- _ -> false
- end
- end,
- Files),
-
- %% Create a list of .erl file names (incl path) and call
- %% compile_modules/2 with the list of file names.
- ErlFiles = lists:map(fun(ErlFileName) ->
- filename:join(Dir, ErlFileName)
- end,
- ErlFileNames),
+ ErlFiles = [filename:join(Dir, File) ||
+ File <- Files,
+ filename:extension(File) =:= ".erl"],
compile_modules(ErlFiles, Options);
Error ->
Error
@@ -262,7 +246,7 @@ compile_modules([File|Files], Options, Result) ->
R = call({compile, File, Options}),
compile_modules(Files,Options,[R|Result]);
compile_modules([],_Opts,Result) ->
- reverse(Result).
+ lists:reverse(Result).
filter_options(Options) ->
lists:filter(fun(Option) ->
@@ -320,25 +304,9 @@ compile_beam_directory() ->
compile_beam_directory(Dir) when is_list(Dir) ->
case file:list_dir(Dir) of
{ok, Files} ->
-
- %% Filter out all beam files (except cover.beam)
- BeamFileNames =
- lists:filter(fun("cover.beam") ->
- false;
- (File) ->
- case filename:extension(File) of
- ".beam" -> true;
- _ -> false
- end
- end,
- Files),
-
- %% Create a list of .beam file names (incl path) and call
- %% compile_beam/1 for each such file name
- BeamFiles = lists:map(fun(BeamFileName) ->
- filename:join(Dir, BeamFileName)
- end,
- BeamFileNames),
+ BeamFiles = [filename:join(Dir, File) ||
+ File <- Files,
+ filename:extension(File) =:= ".beam"],
compile_beams(BeamFiles);
Error ->
Error
@@ -350,7 +318,7 @@ compile_beams([File|Files],Result) ->
R = compile_beam(File),
compile_beams(Files,[R|Result]);
compile_beams([],Result) ->
- reverse(Result).
+ lists:reverse(Result).
%% analyse(Module) ->
@@ -613,8 +581,11 @@ main_process_loop(State) ->
Compiled = add_compiled(Module, File,
State#main_state.compiled),
Imported = remove_imported(Module,State#main_state.imported),
- main_process_loop(State#main_state{compiled = Compiled,
- imported = Imported});
+ NewState = State#main_state{compiled = Compiled,
+ imported = Imported},
+ %% This module (cover) could have been reloaded. Make
+ %% sure we run the new code.
+ ?MODULE:main_process_loop(NewState);
error ->
reply(From, {error, File}),
main_process_loop(State)
@@ -639,8 +610,11 @@ main_process_loop(State) ->
end,
reply(From,Reply),
Imported = remove_imported(Module,State#main_state.imported),
- main_process_loop(State#main_state{compiled = Compiled,
- imported = Imported});
+ NewState = State#main_state{compiled = Compiled,
+ imported = Imported},
+ %% This module (cover) could have been reloaded. Make
+ %% sure we run the new code.
+ ?MODULE:main_process_loop(NewState);
{error,no_beam} ->
%% The module has first been compiled from .erl, and now
%% someone tries to compile it from .beam
@@ -857,7 +831,7 @@ remote_process_loop(State) ->
{remote,load_compiled,Compiled} ->
Compiled1 = load_compiled(Compiled,State#remote_state.compiled),
remote_reply(State#remote_state.main_node, ok),
- remote_process_loop(State#remote_state{compiled=Compiled1});
+ ?MODULE:remote_process_loop(State#remote_state{compiled=Compiled1});
{remote,unload,UnloadedModules} ->
unload(UnloadedModules),
@@ -1257,12 +1231,12 @@ add_imported(M, F1, ImportFile, [{M,_F2,ImportFiles}|Imported], Acc) ->
dont_import;
false ->
NewEntry = {M, F1, [ImportFile | ImportFiles]},
- {ok, reverse([NewEntry | Acc]) ++ Imported}
+ {ok, lists:reverse([NewEntry | Acc]) ++ Imported}
end;
add_imported(M, F, ImportFile, [H|Imported], Acc) ->
add_imported(M, F, ImportFile, Imported, [H|Acc]);
add_imported(M, F, ImportFile, [], Acc) ->
- {ok, reverse([{M, F, [ImportFile]} | Acc])}.
+ {ok, lists:reverse([{M, F, [ImportFile]} | Acc])}.
%% Removes a module from the list of imported modules and writes a warning
%% This is done when a module is compiled.
@@ -1383,9 +1357,9 @@ do_compile_beam(Module,Beam,UserOptions) ->
{error,E};
encrypted_abstract_code=E ->
{error,E};
- {Vsn,Code} ->
+ {raw_abstract_v1,Code} ->
Forms0 = epp:interpret_file_attribute(Code),
- {Forms,Vars} = transform(Vsn, Forms0, Module, Beam),
+ {Forms,Vars} = transform(Forms0, Module),
%% We need to recover the source from the compilation
%% info otherwise the newly compiled module will have
@@ -1400,7 +1374,7 @@ do_compile_beam(Module,Beam,UserOptions) ->
{module, Module} ->
%% Store info about all function clauses in database
- InitInfo = reverse(Vars#vars.init_info),
+ InitInfo = lists:reverse(Vars#vars.init_info),
ets:insert(?COVER_CLAUSE_TABLE, {Module, InitInfo}),
%% Store binary code so it can be loaded on remote nodes
@@ -1411,7 +1385,11 @@ do_compile_beam(Module,Beam,UserOptions) ->
_Error ->
do_clear(Module),
error
- end
+ end;
+ {_VSN,_Code} ->
+ %% Wrong version of abstract code. Just report that there
+ %% is no abstract code.
+ {error,no_abstract_code}
end.
get_abstract_code(Module, Beam) ->
@@ -1445,28 +1423,9 @@ get_compile_info(Module, Beam) ->
[]
end.
-transform(Vsn, Code, Module, Beam) when Vsn=:=abstract_v1; Vsn=:=abstract_v2 ->
- Vars0 = #vars{module=Module, vsn=Vsn},
- MainFile=find_main_filename(Code),
- {ok, MungedForms,Vars} = transform_2(Code,[],Vars0,MainFile,on),
-
- %% Add module and export information to the munged forms
- %% Information about module_info must be removed as this function
- %% is added at compilation
- {ok, {Module, [{exports,Exports1}]}} = beam_lib:chunks(Beam, [exports]),
- Exports2 = lists:filter(fun(Export) ->
- case Export of
- {module_info,_} -> false;
- _ -> true
- end
- end,
- Exports1),
- Forms = [{attribute,1,module,Module},
- {attribute,2,export,Exports2}]++ MungedForms,
- {Forms,Vars};
-transform(Vsn=raw_abstract_v1, Code, Module, _Beam) ->
+transform(Code, Module) ->
MainFile=find_main_filename(Code),
- Vars0 = #vars{module=Module, vsn=Vsn},
+ Vars0 = #vars{module=Module},
{ok,MungedForms,Vars} = transform_2(Code,[],Vars0,MainFile,on),
{MungedForms,Vars}.
@@ -1486,7 +1445,7 @@ transform_2([Form0|Forms],MungedForms,Vars,MainFile,Switch) ->
transform_2(Forms,[MungedForm|MungedForms],Vars2,MainFile,NewSwitch)
end;
transform_2([],MungedForms,Vars,_,_) ->
- {ok, reverse(MungedForms), Vars}.
+ {ok, lists:reverse(MungedForms), Vars}.
%% Expand short-circuit Boolean expressions.
expand(Expr) ->
@@ -1553,14 +1512,9 @@ aux_var(Vars, N) ->
end.
%% This code traverses the abstract code, stored as the abstract_code
-%% chunk in the BEAM file, as described in absform(3) for Erlang/OTP R8B
-%% (Vsn=abstract_v2).
-%% The abstract format after preprocessing differs slightly from the abstract
-%% format given eg using epp:parse_form, this has been noted in comments.
-%% The switch is turned off when we encounter other files then the main file.
+%% chunk in the BEAM file, as described in absform(3).
+%% The switch is turned off when we encounter other files than the main file.
%% This way we will be able to exclude functions defined in include files.
-munge({function,0,module_info,_Arity,_Clauses},_Vars,_MainFile,_Switch) ->
- ignore; % module_info will be added again when the forms are recompiled
munge({function,Line,Function,Arity,Clauses},Vars,_MainFile,on) ->
Vars2 = Vars#vars{function=Function,
arity=Arity,
@@ -1618,7 +1572,7 @@ munge_clauses([Clause|Clauses], Vars, Lines, MClauses) ->
MClauses])
end;
munge_clauses([], Vars, Lines, MungedClauses) ->
- {reverse(MungedClauses), Vars#vars{lines = Lines}}.
+ {lists:reverse(MungedClauses), Vars#vars{lines = Lines}}.
munge_body(Expr, Vars) ->
munge_body(Expr, Vars, [], []).
@@ -1662,7 +1616,7 @@ munge_body([Expr|Body], Vars, MungedBody, LastExprBumpLines) ->
munge_body(Body, Vars3, MungedExprs1, NewBumps)
end;
munge_body([], Vars, MungedBody, _LastExprBumpLines) ->
- {reverse(MungedBody), Vars}.
+ {lists:reverse(MungedBody), Vars}.
%%% Fix last expression (OTP-8188). A typical example:
%%%
@@ -1742,6 +1696,8 @@ fix_expr(T, Line, Bump) when is_tuple(T) ->
fix_expr(E, _Line, _Bump) ->
E.
+fix_clauses([], _Line, _Bump) ->
+ [];
fix_clauses(Cs, Line, Bump) ->
case bumps_line(lists:last(Cs), Line) of
true ->
@@ -1800,16 +1756,35 @@ munge_expr({match,Line,ExprL,ExprR}, Vars) ->
munge_expr({tuple,Line,Exprs}, Vars) ->
{MungedExprs, Vars2} = munge_exprs(Exprs, Vars, []),
{{tuple,Line,MungedExprs}, Vars2};
-munge_expr({record,Line,Expr,Exprs}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
- {MungedExprName, Vars2} = munge_expr(Expr, Vars),
+munge_expr({record,Line,Name,Exprs}, Vars) ->
+ {MungedExprFields, Vars2} = munge_exprs(Exprs, Vars, []),
+ {{record,Line,Name,MungedExprFields}, Vars2};
+munge_expr({record,Line,Arg,Name,Exprs}, Vars) ->
+ {MungedArg, Vars2} = munge_expr(Arg, Vars),
{MungedExprFields, Vars3} = munge_exprs(Exprs, Vars2, []),
- {{record,Line,MungedExprName,MungedExprFields}, Vars3};
+ {{record,Line,MungedArg,Name,MungedExprFields}, Vars3};
munge_expr({record_field,Line,ExprL,ExprR}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
- {MungedExprL, Vars2} = munge_expr(ExprL, Vars),
- {MungedExprR, Vars3} = munge_expr(ExprR, Vars2),
- {{record_field,Line,MungedExprL,MungedExprR}, Vars3};
+ {MungedExprR, Vars2} = munge_expr(ExprR, Vars),
+ {{record_field,Line,ExprL,MungedExprR}, Vars2};
+munge_expr({map,Line,Fields}, Vars) ->
+ %% EEP 43
+ {MungedFields, Vars2} = munge_exprs(Fields, Vars, []),
+ {{map,Line,MungedFields}, Vars2};
+munge_expr({map,Line,Arg,Fields}, Vars) ->
+ %% EEP 43
+ {MungedArg, Vars2} = munge_expr(Arg, Vars),
+ {MungedFields, Vars3} = munge_exprs(Fields, Vars2, []),
+ {{map,Line,MungedArg,MungedFields}, Vars3};
+munge_expr({map_field_assoc,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_assoc,Line,MungedName,MungedValue}, Vars3};
+munge_expr({map_field_exact,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_exact,Line,MungedName,MungedValue}, Vars3};
munge_expr({cons,Line,ExprH,ExprT}, Vars) ->
{MungedExprH, Vars2} = munge_expr(ExprH, Vars),
{MungedExprT, Vars3} = munge_expr(ExprT, Vars2),
@@ -1871,18 +1846,12 @@ munge_expr({'try',Line,Body,Clauses,CatchClauses,After}, Vars) ->
{MungedAfter, Vars4} = munge_body(After, Vars3),
{{'try',Line,MungedBody,MungedClauses,MungedCatchClauses,MungedAfter},
Vars4};
-%% Difference in abstract format after preprocessing: Funs get an extra
-%% element Extra.
-%% NOT NECESSARY FOR Vsn=raw_abstract_v1
-munge_expr({'fun',Line,{function,Name,Arity},_Extra}, Vars) ->
- {{'fun',Line,{function,Name,Arity}}, Vars};
-munge_expr({'fun',Line,{clauses,Clauses},_Extra}, Vars) ->
- {MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
- {{'fun',Line,{clauses,MungedClauses}}, Vars2};
munge_expr({'fun',Line,{clauses,Clauses}}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
{MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
{{'fun',Line,{clauses,MungedClauses}}, Vars2};
+munge_expr({named_fun,Line,Name,Clauses}, Vars) ->
+ {MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
+ {{named_fun,Line,Name,MungedClauses}, Vars2};
munge_expr({bin,Line,BinElements}, Vars) ->
{MungedBinElements,Vars2} = munge_exprs(BinElements, Vars, []),
{{bin,Line,MungedBinElements}, Vars2};
@@ -1901,7 +1870,7 @@ munge_exprs([Expr|Exprs], Vars, MungedExprs) ->
{MungedExpr, Vars2} = munge_expr(Expr, Vars),
munge_exprs(Exprs, Vars2, [MungedExpr|MungedExprs]);
munge_exprs([], Vars, MungedExprs) ->
- {reverse(MungedExprs), Vars}.
+ {lists:reverse(MungedExprs), Vars}.
%% Every qualifier is decorated with a counter.
munge_qualifiers(Qualifiers, Vars) ->
@@ -1920,7 +1889,7 @@ munge_qs([Expr|Qs], Vars, MQs) ->
{MungedExpr, Vars2} = munge_expr(Expr, Vars),
munge_qs1(Qs, L, MungedExpr, Vars, Vars2, MQs);
munge_qs([], Vars, MQs) ->
- {reverse(MQs), Vars}.
+ {lists:reverse(MQs), Vars}.
munge_qs1(Qs, Line, NQ, Vars, Vars2, MQs) ->
case new_bumps(Vars2, Vars) of
@@ -2113,7 +2082,7 @@ merge_clauses([{{M,F,A,_C1},R1},{{M,F,A,C2},R2}|Clauses], MFun, Result) ->
merge_clauses([{{M,F,A,_C},R}|Clauses], MFun, Result) ->
merge_clauses(Clauses, MFun, [{{M,F,A},R}|Result]);
merge_clauses([], _Fun, Result) ->
- reverse(Result).
+ lists:reverse(Result).
merge_functions([{_MFA,R}|Functions], MFun) ->
merge_functions(Functions, MFun, R);
@@ -2434,14 +2403,6 @@ not_loaded(_Module,_Else, State) ->
%%%--Div-----------------------------------------------------------------
-reverse(List) ->
- reverse(List,[]).
-reverse([H|T],Acc) ->
- reverse(T,[H|Acc]);
-reverse([],Acc) ->
- Acc.
-
-
escape_lt_and_gt(Rawline,HTML) when HTML =/= true ->
Rawline;
escape_lt_and_gt(Rawline,_HTML) ->
diff --git a/lib/tools/src/lcnt.erl b/lib/tools/src/lcnt.erl
index f13a297ecf..d5ba8aa52f 100644
--- a/lib/tools/src/lcnt.erl
+++ b/lib/tools/src/lcnt.erl
@@ -1,4 +1,3 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
@@ -62,6 +61,8 @@
locations/1,
inspect/1,
inspect/2,
+ histogram/1,
+ histogram/2,
information/0,
swap_pid_keys/0,
% set options
@@ -90,14 +91,14 @@
duration = 0
}).
-
-record(stats, {
- file,
- line,
- tries,
- colls,
- time, % us
- nt % #timings collected
+ file :: atom(),
+ line :: non_neg_integer(),
+ tries :: non_neg_integer(),
+ colls :: non_neg_integer(),
+ time :: non_neg_integer(), % us
+ nt :: non_neg_integer(), % #timings collected
+ hist :: tuple() % histogram
}).
-record(lock, {
@@ -116,7 +117,9 @@
colls,
cr, % collision ratio
time,
- dtr % time duration ratio
+ dtr, % time duration ratio
+ %% new
+ hist % log2 histogram of lock wait_time
}).
@@ -128,7 +131,7 @@
%% -------------------------------------------------------------------- %%
start() -> gen_server:start({local, ?MODULE}, ?MODULE, [], []).
-stop() -> gen_server:cast(?MODULE, stop).
+stop() -> gen_server:call(?MODULE, stop, infinity).
init([]) -> {ok, #state{ locks = [], duration = 0 } }.
%% -------------------------------------------------------------------- %%
@@ -172,6 +175,8 @@ conflicts() -> call({conflicts, []}).
conflicts(Opts) -> call({conflicts, Opts}).
inspect(Lock) -> call({inspect, Lock, []}).
inspect(Lock, Opts) -> call({inspect, Lock, Opts}).
+histogram(Lock) -> call({histogram, Lock, []}).
+histogram(Lock, Opts)-> call({histogram, Lock, Opts}).
information() -> call(information).
swap_pid_keys() -> call(swap_pid_keys).
raw() -> call(raw).
@@ -284,14 +289,14 @@ handle_call({locations, InOpts}, _From, #state{ locks = Locks } = State) when is
{reply, ok, State};
-handle_call({inspect, Lockname, InOpts}, _From, #state{ duration = Duration, locks = Locks } = State) when is_list(InOpts) ->
+handle_call({inspect, Lockname, InOpts}, _From, #state{ duration=Duration, locks=Locks } = State) when is_list(InOpts) ->
Default = [
{sort, time},
{reverse, false},
- {print, [name,id,tries,colls,ratio,time,duration]},
+ {print, [name,id,tries,colls,ratio,time,duration,histogram]},
{max_locks, 20},
{combine, false},
- {thresholds, [] },
+ {thresholds, []},
{locations, false}],
Opts = options(InOpts, Default),
@@ -300,7 +305,7 @@ handle_call({inspect, Lockname, InOpts}, _From, #state{ duration = Duration, loc
{true, true} -> locks_ids(Filtered);
_ -> []
end,
- Combos = combine_classes(Filtered, proplists:get_value(combine, Opts)),
+ Combos = combine_classes(Filtered, proplists:get_value(combine, Opts)),
case proplists:get_value(locations, Opts) of
true ->
lists:foreach(fun
@@ -314,25 +319,48 @@ handle_call({inspect, Lockname, InOpts}, _From, #state{ duration = Duration, loc
[] ->
ok;
_ ->
- %io:format("Combined ~p~n", [Combined]),
print("lock: " ++ term2string(Name)),
print("id: " ++ IdString),
print("type: " ++ term2string(Type)),
Ps = stats2print(Combined, Duration),
- Opts1 = options([{print, [entry, tries,colls,ratio,time,duration]},
+ Opts1 = options([{print, [entry, tries,colls,ratio,time,duration,histogram]},
{thresholds, [{tries, -1}, {colls, -1}, {time, -1}]}], Opts),
print_lock_information(filter_print(Ps, Opts1), proplists:get_value(print, Opts1))
end
- % (#lock{ name = Name, id = Id}) ->
- % io:format("Empty lock ~p ~p~n", [Name, Id])
end, Combos);
_ ->
- Print1 = locks2print(Combos, Duration),
- Print2 = filter_print(Print1, Opts),
- print_lock_information(Print2, proplists:get_value(print, Opts))
+ Print = filter_print(locks2print(Combos, Duration), Opts),
+ print_lock_information(Print, proplists:get_value(print, Opts))
end,
{reply, ok, State};
+%% histogram
+
+handle_call({histogram, Lockname, InOpts}, _From, #state{ duration=Duration, locks=Locks} = State)->
+ Default = [
+ {sort, time},
+ {reverse, false},
+ {print, [name,id,tries,colls,ratio,time,duration,histogram]},
+ {max_locks, 20},
+ {combine, true},
+ {thresholds, []},
+ {locations, false}],
+
+ Opts = options(InOpts, Default),
+ Filtered = filter_locks(Locks, Lockname),
+ Combos = combine_classes(Filtered, proplists:get_value(combine, Opts)),
+ lists:foreach(fun
+ (#lock{ stats = Stats }=L) ->
+ SumStats = summate_stats(Stats),
+ Opts1 = options([{print, [name,id,tries,colls,ratio,time,duration]},
+ {thresholds, [{tries, -1}, {colls, -1}, {time, -1}]}], Opts),
+ Prints = locks2print([L], Duration),
+ print_lock_information(Prints, proplists:get_value(print, Opts1)),
+ print_full_histogram(SumStats#stats.hist)
+ end, Combos),
+
+ {reply, ok, State};
+
handle_call(raw, _From, #state{ locks = Locks} = State)->
{reply, Locks, State};
@@ -348,7 +376,6 @@ handle_call(swap_pid_keys, _From, #state{ locks = Locks } = State)->
(L) ->
L
end, Locks),
-
{reply, ok, State#state{ locks = SwappedLocks}};
% settings
@@ -381,6 +408,8 @@ handle_call({save, Filename}, _From, State) ->
{reply, {error, Error}, State}
end;
+handle_call(stop, _From, State) ->
+ {stop, normal, ok, State};
handle_call(Command, _From, State) ->
{reply, {error, {undefined, Command}}, State}.
@@ -391,8 +420,6 @@ handle_call(Command, _From, State) ->
%%
%% -------------------------------------------------------------------- %%
-handle_cast(stop, State) ->
- {stop, normal, State};
handle_cast(_, State) ->
{noreply, State}.
@@ -433,15 +460,32 @@ code_change(_OldVsn, State, _Extra) ->
summate_locks(Locks) -> summate_locks(Locks, #stats{ tries = 0, colls = 0, time = 0, nt = 0}).
summate_locks([], Stats) -> Stats;
-summate_locks([L|Ls], #stats{ tries = Tries, colls = Colls, time = Time, nt = Nt}) ->
+summate_locks([L|Ls], #stats{ tries = Tries, colls = Colls, time = Time, nt = Nt, hist = Hist}) ->
S = summate_stats(L#lock.stats),
- summate_locks(Ls, #stats{ tries = Tries + S#stats.tries, colls = Colls + S#stats.colls, time = Time + S#stats.time, nt = Nt + S#stats.nt}).
+ summate_locks(Ls, #stats{
+ tries = Tries + S#stats.tries,
+ colls = Colls + S#stats.colls,
+ time = Time + S#stats.time,
+ nt = Nt + S#stats.nt,
+ hist = summate_histogram(Hist, S#stats.hist)
+ }).
summate_stats(Stats) -> summate_stats(Stats, #stats{ tries = 0, colls = 0, time = 0, nt = 0}).
summate_stats([], Stats) -> Stats;
-summate_stats([S|Ss], #stats{ tries = Tries, colls = Colls, time = Time, nt = Nt}) ->
- summate_stats(Ss, #stats{ tries = Tries + S#stats.tries, colls = Colls + S#stats.colls, time = Time + S#stats.time, nt = Nt + S#stats.nt}).
-
+summate_stats([S|Ss], #stats{ tries = Tries, colls = Colls, time = Time, nt = Nt, hist = Hist}) ->
+ summate_stats(Ss, #stats{
+ tries = Tries + S#stats.tries,
+ colls = Colls + S#stats.colls,
+ time = Time + S#stats.time,
+ nt = Nt + S#stats.nt,
+ hist = summate_histogram(Hist, S#stats.hist)
+ }).
+
+%% first call is undefined
+summate_histogram(Tup,undefined) when is_tuple(Tup) -> Tup;
+summate_histogram(undefined,Tup) when is_tuple(Tup) -> Tup;
+summate_histogram(Hs1,Hs2) ->
+ list_to_tuple([ A + B || {A,B} <- lists:zip(tuple_to_list(Hs1),tuple_to_list(Hs2))]).
%% manipulators
filter_locks_type(Locks, undefined) -> Locks;
@@ -463,20 +507,22 @@ filter_locks(Locks, Lockname) ->
% 4. max length of locks
filter_print(PLs, Opts) ->
- TLs = threshold_locks(PLs, proplists:get_value(thresholds, Opts, [])),
- SLs = sort_locks(TLs, proplists:get_value(sort, Opts, time)),
- CLs = cut_locks(SLs, proplists:get_value(max_locks, Opts, none)),
- reverse_locks(CLs, proplists:get_value(reverse, Opts, false)).
-
-sort_locks(Locks, Type) -> lists:reverse(sort_locks0(Locks, Type)).
-sort_locks0(Locks, name) -> lists:keysort(#print.name, Locks);
-sort_locks0(Locks, id) -> lists:keysort(#print.id, Locks);
-sort_locks0(Locks, type) -> lists:keysort(#print.type, Locks);
-sort_locks0(Locks, tries) -> lists:keysort(#print.tries, Locks);
-sort_locks0(Locks, colls) -> lists:keysort(#print.colls, Locks);
-sort_locks0(Locks, ratio) -> lists:keysort(#print.cr, Locks);
-sort_locks0(Locks, time) -> lists:keysort(#print.time, Locks);
-sort_locks0(Locks, _) -> sort_locks0(Locks, time).
+ TLs = threshold_locks(PLs, proplists:get_value(thresholds, Opts, [])),
+ SLs = sort_locks(TLs, proplists:get_value(sort, Opts, time)),
+ CLs = cut_locks(SLs, proplists:get_value(max_locks, Opts, none)),
+ reverse_locks(CLs, proplists:get_value(reverse, Opts, false)).
+
+sort_locks(Locks, name) -> reverse_sort_locks(#print.name, Locks);
+sort_locks(Locks, id) -> reverse_sort_locks(#print.id, Locks);
+sort_locks(Locks, type) -> reverse_sort_locks(#print.type, Locks);
+sort_locks(Locks, tries) -> reverse_sort_locks(#print.tries, Locks);
+sort_locks(Locks, colls) -> reverse_sort_locks(#print.colls, Locks);
+sort_locks(Locks, ratio) -> reverse_sort_locks(#print.cr, Locks);
+sort_locks(Locks, time) -> reverse_sort_locks(#print.time, Locks);
+sort_locks(Locks, _) -> sort_locks(Locks, time).
+
+reverse_sort_locks(Ix, Locks) ->
+ lists:reverse(lists:keysort(Ix, Locks)).
% cut locks not above certain thresholds
threshold_locks(Locks, Thresholds) ->
@@ -557,45 +603,65 @@ locks_ids(Locks) -> locks_ids(Locks, []).
locks_ids([], Out) -> Out;
locks_ids([#lock{ name = Key } = L|Ls], Out) ->
case proplists:get_value(Key, Out) of
- undefined ->
- locks_ids(Ls, [{Key, [L#lock.id] } | Out]);
- Ids ->
- locks_ids(Ls, [{Key, [L#lock.id | Ids] } | proplists:delete(Key,Out)])
+ undefined -> locks_ids(Ls, [{Key, [L#lock.id]}|Out]);
+ Ids -> locks_ids(Ls, [{Key, [L#lock.id|Ids]}|proplists:delete(Key,Out)])
end.
stats2print(Stats, Duration) ->
lists:map(fun
(S) ->
- #print{
- entry = term2string("~tp:~p", [S#stats.file, S#stats.line]),
- colls = S#stats.colls,
- tries = S#stats.tries,
- cr = percent(S#stats.colls, S#stats.tries),
- time = S#stats.time,
- dtr = percent(S#stats.time, Duration)
- }
+ #print{entry = term2string("~tp:~p", [S#stats.file, S#stats.line]),
+ colls = S#stats.colls,
+ tries = S#stats.tries,
+ cr = percent(S#stats.colls, S#stats.tries),
+ time = S#stats.time,
+ dtr = percent(S#stats.time, Duration),
+ hist = format_histogram(S#stats.hist)}
end, Stats).
locks2print(Locks, Duration) ->
lists:map( fun
(L) ->
- Tries = lists:sum([T || #stats{ tries = T} <- L#lock.stats]),
- Colls = lists:sum([C || #stats{ colls = C} <- L#lock.stats]),
- Time = lists:sum([T || #stats{ time = T} <- L#lock.stats]),
- Cr = percent(Colls, Tries),
- Dtr = percent(Time, Duration),
- #print{
- name = L#lock.name,
- id = L#lock.id,
- type = L#lock.type,
- tries = Tries,
- colls = Colls,
- cr = Cr,
- time = Time,
- dtr = Dtr
- }
+ #stats{tries = Tries,
+ colls = Colls,
+ time = Time,
+ hist = Hist} = summate_stats(L#lock.stats),
+ Cr = percent(Colls, Tries),
+ Dtr = percent(Time, Duration),
+ #print{name = L#lock.name,
+ id = L#lock.id,
+ type = L#lock.type,
+ tries = Tries,
+ colls = Colls,
+ hist = format_histogram(Hist),
+ cr = Cr,
+ time = Time,
+ dtr = Dtr}
end, Locks).
+
+format_histogram(Tup) when is_tuple(Tup) ->
+ Vs = tuple_to_list(Tup),
+ Max = lists:max(Vs),
+ case Max of
+ 0 -> string_histogram(Vs);
+ _ -> string_histogram([case V of 0 -> 0; _ -> V/Max end || V <- Vs])
+ end.
+
+string_histogram(Vs) ->
+ [$||histogram_values_to_string(Vs,$|)].
+
+histogram_values_to_string([0|Vs],End) ->
+ [$\s|histogram_values_to_string(Vs,End)];
+histogram_values_to_string([V|Vs],End) when V > 0.66 ->
+ [$X|histogram_values_to_string(Vs,End)];
+histogram_values_to_string([V|Vs],End) when V > 0.33 ->
+ [$x|histogram_values_to_string(Vs,End)];
+histogram_values_to_string([_|Vs],End) ->
+ [$.|histogram_values_to_string(Vs,End)];
+histogram_values_to_string([],End) ->
+ [End].
+
%% state making
data2state(Data, State) ->
@@ -607,22 +673,32 @@ data2state(Data, State) ->
locks = Locks
}.
-locks2records(Locks) -> locks2records(Locks, []).
-locks2records([], Out) -> Out;
-locks2records([{Name, Id, Type, Stats}|Locks], Out) ->
- Lock = #lock{
- name = Name,
- id = clean_id_creation(Id),
- type = Type,
- stats = [ #stats{
- file = File,
- line = Line,
- tries = Tries,
- colls = Colls,
- time = time2us({S, Ns}),
- nt = N
- } || {{File, Line}, {Tries, Colls, {S, Ns, N}}} <- Stats] },
- locks2records(Locks, [Lock|Out]).
+locks2records([{Name, Id, Type, Stats}|Locks]) ->
+ [#lock{name = Name,
+ id = clean_id_creation(Id),
+ type = Type,
+ stats = stats2record(Stats)}|locks2records(Locks)];
+locks2records([]) -> [].
+
+%% new stats with histogram
+stats2record([{{File,Line},{Tries,Colls,{S,Ns,N}},Hist}|Stats]) ->
+ [#stats{file = File,
+ line = Line,
+ hist = Hist,
+ tries = Tries,
+ colls = Colls,
+ time = time2us({S, Ns}),
+ nt = N} | stats2record(Stats)];
+%% old stats without histogram
+stats2record([{{File,Line},{Tries,Colls,{S,Ns,N}}}|Stats]) ->
+ [#stats{file = File,
+ line = Line,
+ hist = {},
+ tries = Tries,
+ colls = Colls,
+ time = time2us({S, Ns}),
+ nt = N} | stats2record(Stats)];
+stats2record([]) -> [].
clean_id_creation(Id) when is_pid(Id) ->
Bin = term_to_binary(Id),
@@ -648,22 +724,45 @@ state2list(State) ->
(X, Y) -> {X,Y}
end, record_info(fields, state), Values).
-list2state(List) -> list2state(record_info(fields, state), List, [state]).
-list2state([], _, Out) -> list_to_tuple(lists:reverse(Out));
-list2state([locks|Fs], List, Out) ->
- Locks = [ list2lock(Lock) || Lock <- proplists:get_value(locks, List, [])],
- list2state(Fs, List, [Locks|Out]);
-list2state([F|Fs], List, Out) -> list2state(Fs, List, [proplists:get_value(F, List, state_default(F))|Out]).
-
lock_default(Field) -> proplists:get_value(Field, lock2list(#lock{})).
lock2list(Lock) ->
[_|Values] = tuple_to_list(Lock),
lists:zip(record_info(fields, lock), Values).
-list2lock(List) -> list2lock(record_info(fields, lock), List, [lock]).
-list2lock([], _, Out) -> list_to_tuple(lists:reverse(Out));
-list2lock([F|Fs], List, Out) -> list2lock(Fs, List, [proplists:get_value(F, List, lock_default(F))|Out]).
+
+list2state(List) ->
+ list_to_tuple([state|list2state(record_info(fields, state), List)]).
+list2state([], _) -> [];
+list2state([locks|Fs], List) ->
+ Locks = [list2lock(Lock) || Lock <- proplists:get_value(locks, List, [])],
+ [Locks|list2state(Fs,List)];
+list2state([F|Fs], List) ->
+ [proplists:get_value(F, List, state_default(F))|list2state(Fs, List)].
+
+list2lock(Ls) ->
+ list_to_tuple([lock|list2lock(record_info(fields, lock), Ls)]).
+
+list2lock([],_) -> [];
+list2lock([stats=F|Fs], Ls) ->
+ Stats = stats2stats(proplists:get_value(F, Ls, lock_default(F))),
+ [Stats|list2lock(Fs, Ls)];
+list2lock([F|Fs], Ls) ->
+ [proplists:get_value(F, Ls, lock_default(F))|list2lock(Fs, Ls)].
+
+%% process old stats (hack)
+%% old stats had no histograms
+%% in future versions stats should be serialized as a list, not a record
+
+stats2stats([]) -> [];
+stats2stats([Stat|Stats]) ->
+ Sz = tuple_size(#stats{}),
+ [stat2stat(Stat,Sz)|stats2stats(Stats)].
+
+stat2stat(Stat,Sz) when tuple_size(Stat) =:= Sz -> Stat;
+stat2stat(Stat,_) ->
+ %% assume no histogram at the end
+ list_to_tuple(tuple_to_list(Stat) ++ [{0}]).
%% printing
@@ -684,7 +783,7 @@ auto_print_width(Locks, Print) ->
({print,print}, Out) -> [print|Out];
({Str, Len}, Out) -> [erlang:min(erlang:max(length(s(Str))+1,Len),80)|Out]
end, [], lists:zip(tuple_to_list(L), tuple_to_list(Max)))))
- end, #print{ id = 4, type = 5, entry = 5, name = 6, tries = 8, colls = 13, cr = 16, time = 11, dtr = 14 },
+ end, #print{ id=4, type=5, entry=5, name=6, tries=8, colls=13, cr=16, time=11, dtr=14, hist=20 },
Locks),
% Setup the offsets for later pruning
Offsets = [
@@ -696,7 +795,9 @@ auto_print_width(Locks, Print) ->
{colls, R#print.colls},
{ratio, R#print.cr},
{time, R#print.time},
- {duration, R#print.dtr}],
+ {duration, R#print.dtr},
+ {histogram, R#print.hist}
+ ],
% Prune offsets to only allow specified print options
lists:foldr(fun
({Type, W}, Out) -> [{Type, W}|Out];
@@ -706,9 +807,7 @@ auto_print_width(Locks, Print) ->
print_lock_information(Locks, Print) ->
% remake Print to autosize entries
AutoPrint = auto_print_width(Locks, Print),
-
print_header(AutoPrint),
-
lists:foreach(fun
(L) ->
print_lock(L, AutoPrint)
@@ -725,7 +824,8 @@ print_header(Opts) ->
colls = "#collisions",
cr = "collisions [%]",
time = "time [us]",
- dtr = "duration [%]"
+ dtr = "duration [%]",
+ hist = "histogram [log2(us)]"
},
Divider = #print{
name = lists:duplicate(1 + length(Header#print.name), 45),
@@ -736,39 +836,44 @@ print_header(Opts) ->
colls = lists:duplicate(1 + length(Header#print.colls), 45),
cr = lists:duplicate(1 + length(Header#print.cr), 45),
time = lists:duplicate(1 + length(Header#print.time), 45),
- dtr = lists:duplicate(1 + length(Header#print.dtr), 45)
+ dtr = lists:duplicate(1 + length(Header#print.dtr), 45),
+ hist = lists:duplicate(1 + length(Header#print.hist), 45)
},
print_lock(Header, Opts),
print_lock(Divider, Opts),
ok.
-print_lock(L, Opts) -> print_lock(L, Opts, []).
-print_lock(_, [], Formats) -> print(strings(lists:reverse(Formats)));
-print_lock(L, [Opt|Opts], Formats) ->
+print_lock(L, Opts) ->
+ print(strings(format_lock(L, Opts))).
+
+format_lock(_, []) -> [];
+format_lock(L, [Opt|Opts]) ->
case Opt of
- id -> print_lock(L, Opts, [{space, 25, s(L#print.id) } | Formats]);
- {id, W} -> print_lock(L, Opts, [{space, W, s(L#print.id) } | Formats]);
- type -> print_lock(L, Opts, [{space, 18, s(L#print.type) } | Formats]);
- {type, W} -> print_lock(L, Opts, [{space, W, s(L#print.type) } | Formats]);
- entry -> print_lock(L, Opts, [{space, 30, s(L#print.entry)} | Formats]);
- {entry, W} -> print_lock(L, Opts, [{space, W, s(L#print.entry)} | Formats]);
- name -> print_lock(L, Opts, [{space, 22, s(L#print.name) } | Formats]);
- {name, W} -> print_lock(L, Opts, [{space, W, s(L#print.name) } | Formats]);
- tries -> print_lock(L, Opts, [{space, 12, s(L#print.tries)} | Formats]);
- {tries, W} -> print_lock(L, Opts, [{space, W, s(L#print.tries)} | Formats]);
- colls -> print_lock(L, Opts, [{space, 14, s(L#print.colls)} | Formats]);
- {colls, W} -> print_lock(L, Opts, [{space, W, s(L#print.colls)} | Formats]);
- ratio -> print_lock(L, Opts, [{space, 20, s(L#print.cr) } | Formats]);
- {ratio, W} -> print_lock(L, Opts, [{space, W, s(L#print.cr) } | Formats]);
- time -> print_lock(L, Opts, [{space, 15, s(L#print.time) } | Formats]);
- {time, W} -> print_lock(L, Opts, [{space, W, s(L#print.time) } | Formats]);
- duration -> print_lock(L, Opts, [{space, 20, s(L#print.dtr) } | Formats]);
- {duration, W} -> print_lock(L, Opts, [{space, W, s(L#print.dtr) } | Formats]);
- _ -> print_lock(L, Opts, Formats)
+ id -> [{space, 25, s(L#print.id) } | format_lock(L, Opts)];
+ {id, W} -> [{space, W, s(L#print.id) } | format_lock(L, Opts)];
+ type -> [{space, 18, s(L#print.type) } | format_lock(L, Opts)];
+ {type, W} -> [{space, W, s(L#print.type) } | format_lock(L, Opts)];
+ entry -> [{space, 30, s(L#print.entry)} | format_lock(L, Opts)];
+ {entry, W} -> [{space, W, s(L#print.entry)} | format_lock(L, Opts)];
+ name -> [{space, 22, s(L#print.name) } | format_lock(L, Opts)];
+ {name, W} -> [{space, W, s(L#print.name) } | format_lock(L, Opts)];
+ tries -> [{space, 12, s(L#print.tries)} | format_lock(L, Opts)];
+ {tries, W} -> [{space, W, s(L#print.tries)} | format_lock(L, Opts)];
+ colls -> [{space, 14, s(L#print.colls)} | format_lock(L, Opts)];
+ {colls, W} -> [{space, W, s(L#print.colls)} | format_lock(L, Opts)];
+ ratio -> [{space, 20, s(L#print.cr) } | format_lock(L, Opts)];
+ {ratio, W} -> [{space, W, s(L#print.cr) } | format_lock(L, Opts)];
+ time -> [{space, 15, s(L#print.time) } | format_lock(L, Opts)];
+ {time, W} -> [{space, W, s(L#print.time) } | format_lock(L, Opts)];
+ duration -> [{space, 20, s(L#print.dtr) } | format_lock(L, Opts)];
+ {duration, W} -> [{space, W, s(L#print.dtr) } | format_lock(L, Opts)];
+ histogram -> [{space, 20, s(L#print.hist) } | format_lock(L, Opts)];
+ {histogram, W} -> [{left, W - length(s(L#print.hist)) - 1, s(L#print.hist)} | format_lock(L, Opts)];
+ _ -> format_lock(L, Opts)
end.
-print_state_information(#state{ locks = Locks} = State) ->
+print_state_information(#state{locks = Locks} = State) ->
Stats = summate_locks(Locks),
print("information:"),
print(kv("#locks", s(length(Locks)))),
@@ -780,9 +885,25 @@ print_state_information(#state{ locks = Locks} = State) ->
print(kv("percent of duration", s(Stats#stats.time/State#state.duration*100) ++ " %")),
ok.
+
+print_full_histogram(T) when is_tuple(T) ->
+ Vs = tuple_to_list(T),
+ Max = lists:max(Vs),
+ W = 60,
+ print_full_histogram(0,Vs,Max,W).
+
+print_full_histogram(_,[],_,_) -> ok;
+print_full_histogram(Ix,[V|Vs],0,W) ->
+ io:format("~2w = log2 : ~8w |~n", [Ix,V]),
+ print_full_histogram(Ix+1,Vs,0,W);
+print_full_histogram(Ix,[V|Vs],Max,W) ->
+ io:format("~2w = log2 : ~8w | ~s~n", [Ix,V,lists:duplicate(trunc(W*(V/Max)), $#)]),
+ print_full_histogram(Ix+1,Vs,Max,W).
+
+
%% AUX
-time2us({S, Ns}) -> round(S*1000000 + Ns/1000).
+time2us({S, Ns}) -> S*1000000 + (Ns div 1000).
percent(_,0) -> 0.0;
percent(T,N) -> T/N*100.
@@ -809,7 +930,8 @@ s(T) -> term2string(T).
strings(Strings) -> strings(Strings, []).
strings([], Out) -> Out;
-strings([{space, N, S} | Ss], Out) -> strings(Ss, Out ++ term2string(term2string("~~~ps", [N]), [S]));
+strings([{space, N, S} | Ss], Out) -> strings(Ss, Out ++ term2string(term2string("~~~ws", [N]), [S]));
+strings([{left, N, S} | Ss], Out) -> strings(Ss, Out ++ term2string(term2string(" ~~s~~~ws", [N]), [S,""]));
strings([{format, Format, S} | Ss], Out) -> strings(Ss, Out ++ term2string(Format, [S]));
strings([S|Ss], Out) -> strings(Ss, Out ++ term2string("~ts", [S])).
@@ -826,7 +948,7 @@ term2string(Term) when is_pid(Term) ->
term2string(Term) -> term2string("~w", [Term]).
term2string(Format, Terms) -> lists:flatten(io_lib:format(Format, Terms)).
-%%% AUD id binary
+%%% AUX id binary
bytes16(Value) ->
B0 = Value band 255,
diff --git a/lib/tools/src/tags.erl b/lib/tools/src/tags.erl
index e3cc51cdb2..e25db2eb1b 100644
--- a/lib/tools/src/tags.erl
+++ b/lib/tools/src/tags.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -297,15 +297,16 @@ word_char(_) -> false.
%% Check the options `outfile' and `outdir'.
open_out(Options) ->
+ Opts = [write, {encoding, unicode}],
case lists:keysearch(outfile, 1, Options) of
{value, {outfile, File}} ->
- file:open(File, [write]);
+ file:open(File, Opts);
_ ->
case lists:keysearch(outdir, 1, Options) of
{value, {outdir, Dir}} ->
- file:open(filename:join(Dir, "TAGS"), [write]);
+ file:open(filename:join(Dir, "TAGS"), Opts);
_ ->
- file:open("TAGS", [write])
+ file:open("TAGS", Opts)
end
end.
diff --git a/lib/tools/src/tools.app.src b/lib/tools/src/tools.app.src
index 553c5eb96b..ec5b6f3a82 100644
--- a/lib/tools/src/tools.app.src
+++ b/lib/tools/src/tools.app.src
@@ -39,23 +39,9 @@
{applications, [kernel, stdlib]},
{env, [{file_util_search_methods,[{"", ""}, {"ebin", "esrc"}, {"ebin", "src"}]}
]
- }
+ },
+ {runtime_dependencies, ["webtool-0.8.10","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","erts-6.0",
+ "compiler-5.0"]}
]
}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tools/src/tools.appup.src b/lib/tools/src/tools.appup.src
index 8de1ec76c9..9a27456a81 100644
--- a/lib/tools/src/tools.appup.src
+++ b/lib/tools/src/tools.appup.src
@@ -1,19 +1,21 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2009. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, tools}]}],
+ [{<<".*">>,[{restart_application, tools}]}]
+}.
diff --git a/lib/tools/src/xref_compiler.erl b/lib/tools/src/xref_compiler.erl
index f0fed502a5..c4b5c04c12 100644
--- a/lib/tools/src/xref_compiler.erl
+++ b/lib/tools/src/xref_compiler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -885,7 +885,7 @@ evaluate([pop | P], T, [_ | S]) ->
evaluate([], T, [R]) ->
{T, R}.
-%% (PossibleGraph, 1 | -1, dict()) -> dict()
+%% (PossibleGraph, 1 | -1, dict:dict()) -> dict:dict()
%% Use the same table for everything... Here: Reference counters for digraphs.
update_graph_counter(Value, Inc, T) ->
case catch digraph:info(Value) of
diff --git a/lib/tools/src/xref_reader.erl b/lib/tools/src/xref_reader.erl
index d3601c6ea0..142d28ebe6 100644
--- a/lib/tools/src/xref_reader.erl
+++ b/lib/tools/src/xref_reader.erl
@@ -171,6 +171,11 @@ expr({'fun', Line, {function, Name, Arity}, _Extra}, S) ->
handle_call(local, S#xrefr.module, Name, Arity, Line, S);
expr({'fun', _Line, {clauses, Cs}, _Extra}, S) ->
clauses(Cs, S);
+expr({named_fun, _Line, '_', Cs, _Extra}, S) ->
+ clauses(Cs, S);
+expr({named_fun, _Line, Name, Cs, _Extra}, S) ->
+ S1 = S#xrefr{funvars = [Name | S#xrefr.funvars]},
+ clauses(Cs, S1);
expr({call, Line, {atom, _, Name}, As}, S) ->
S1 = handle_call(local, S#xrefr.module, Name, length(As), Line, S),
expr(As, S1);
@@ -186,6 +191,9 @@ expr({match, _Line, {var,_,Var}, {'fun', _, {clauses, Cs}, _Extra}}, S) ->
%% that are passed around by the "expansion" of list comprehension.
S1 = S#xrefr{funvars = [Var | S#xrefr.funvars]},
clauses(Cs, S1);
+expr({match, _Line, {var,_,Var}, {named_fun, _, _, _, _} = Fun}, S) ->
+ S1 = S#xrefr{funvars = [Var | S#xrefr.funvars]},
+ expr(Fun, S1);
expr({match, _Line, {var,_,Var}, E}, S) ->
%% Used for resolving code like
%% Args = [A,B], apply(m, f, Args)
@@ -288,6 +296,8 @@ funarg({'fun', _, _Clauses, _Extra}, _S) -> true;
funarg({'fun', _, {function,_,_,_}}, _S) ->
%% New abstract format for fun M:F/A in R15.
true;
+funarg({named_fun, _, _, _, _}, _S) ->
+ true;
funarg({var, _, Var}, S) -> member(Var, S#xrefr.funvars);
funarg(_, _S) -> false.
diff --git a/lib/tools/src/xref_utils.erl b/lib/tools/src/xref_utils.erl
index 7b72165e6f..49c397a140 100644
--- a/lib/tools/src/xref_utils.erl
+++ b/lib/tools/src/xref_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -437,7 +437,7 @@ regexpr({ModExpr, FunExpr, ArityExpr}, Var) ->
V2
end.
-%% -> digraph()
+%% -> digraph:graph()
relation_to_graph(S) ->
G = digraph:new(),
Fun = fun({From, To}) ->
diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl
index 29b26c7a76..80807b1d38 100644
--- a/lib/tools/test/cover_SUITE.erl
+++ b/lib/tools/test/cover_SUITE.erl
@@ -22,13 +22,16 @@
suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([start/1, compile/1, analyse/1, misc/1, stop/1,
+-export([coverage/1, coverage_analysis/1,
+ start/1, compile/1, analyse/1, misc/1, stop/1,
distribution/1, reconnect/1, die_and_reconnect/1,
dont_reconnect_after_stop/1, stop_node_after_disconnect/1,
export_import/1,
otp_5031/1, eif/1, otp_5305/1, otp_5418/1, otp_6115/1, otp_7095/1,
otp_8188/1, otp_8270/1, otp_8273/1, otp_8340/1,
- otp_10979_hanging_node/1, compile_beam_opts/1]).
+ otp_10979_hanging_node/1, compile_beam_opts/1, eep37/1]).
+
+-export([do_coverage/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -46,25 +49,25 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
+ NoStartStop = [eif,otp_5305,otp_5418,otp_7095,otp_8273,
+ otp_8340,otp_8188,compile_beam_opts,eep37],
+ StartStop = [start, compile, analyse, misc, stop,
+ distribution, reconnect, die_and_reconnect,
+ dont_reconnect_after_stop, stop_node_after_disconnect,
+ export_import, otp_5031, otp_6115,
+ otp_8270, otp_10979_hanging_node],
case whereis(cover_server) of
undefined ->
- [start, compile, analyse, misc, stop,
- distribution, reconnect, die_and_reconnect,
- dont_reconnect_after_stop, stop_node_after_disconnect,
- export_import, otp_5031, eif, otp_5305, otp_5418,
- otp_6115, otp_7095, otp_8188, otp_8270, otp_8273,
- otp_8340, otp_10979_hanging_node, compile_beam_opts];
+ [coverage,StartStop ++ NoStartStop];
_pid ->
- {skip,
- "It looks like the test server is running "
- "cover. Can't run cover test."}
+ [coverage|NoStartStop++[coverage_analysis]]
end.
groups() ->
[].
init_per_suite(Config) ->
- Config.
+ [{ct_is_running_cover,whereis(cover_server) =/= undefined}|Config].
end_per_suite(_Config) ->
ok.
@@ -90,13 +93,64 @@ init_per_testcase(TC, Config) when TC =:= misc;
init_per_testcase(_TestCase, Config) ->
Config.
-end_per_testcase(TestCase, _Config) ->
- case lists:member(TestCase,[start,compile,analyse,misc]) of
+end_per_testcase(TestCase, Config) ->
+ NoStop = [start,compile,analyse,misc],
+ DontStop = proplists:get_bool(ct_is_running_cover, Config) orelse
+ lists:member(TestCase, NoStop),
+ case DontStop of
true -> ok;
false -> cover:stop()
end,
ok.
+coverage(Config) when is_list(Config) ->
+ {ok,?MODULE} = cover:compile_beam(?MODULE),
+ ?MODULE:do_coverage(Config).
+
+do_coverage(Config) ->
+ Outdir = ?config(priv_dir, Config),
+ ExportFile = filename:join(Outdir, "export"),
+ ok = cover:export(ExportFile, ?MODULE),
+ {error,{already_started,_}} = cover:start(),
+ {error,_} = cover:compile_beam(non_existing_module),
+ _ = cover:which_nodes(),
+ _ = cover:modules(),
+ _ = cover:imported(),
+ {error,{not_cover_compiled,lists}} = cover:analyze(lists),
+
+ %% Cover escaping of '&' in HTML files.
+
+ case proplists:get_bool(ct_is_running_cover, Config) of
+ false ->
+ %% Cover server was implicitly started when this module
+ %% was cover-compiled. We must stop the cover server, but
+ %% we must ensure that this module is not on the call
+ %% stack when it is unloaded. Therefore, the call that
+ %% follows MUST be tail-recursive.
+ cover:stop();
+ true ->
+ %% Cover server was started by common_test; don't stop it.
+ ok
+ end.
+
+%% This test case will only be run when common_test is running cover.
+coverage_analysis(Config) when is_list(Config) ->
+ {ok,Analysis1} = cover:analyze(?MODULE),
+ io:format("~p\n", [Analysis1]),
+ {ok,Analysis2} = cover:analyze(?MODULE, calls),
+ io:format("~p\n", [Analysis2]),
+ {ok,_Analysis3} = cover:analyze(?MODULE, calls, line),
+
+ Outdir = ?config(priv_dir, Config),
+ Outfile = filename:join(Outdir, ?MODULE),
+
+ {ok,Outfile} = cover:analyze_to_file(?MODULE, Outfile),
+ {ok,Contents} = file:read_file(Outfile),
+ ok = file:delete(Outfile),
+ ok = io:put_chars(Contents),
+ {ok,Outfile} = cover:analyze_to_file(?MODULE, Outfile, [html]),
+ ok.
+
start(suite) -> [];
start(Config) when is_list(Config) ->
?line ok = file:set_cwd(?config(data_dir, Config)),
@@ -462,13 +516,11 @@ reconnect(Config) ->
cover:flush(N1),
rpc:call(N1,f,f1,[]),
- %% This will cause a call to f:f2() when nodes()==[] on N1
+ %% This will cause first casue the N1 node to initiate a
+ %% disconnect and then call f:f2() when nodes() =:= [] on N1.
rpc:cast(N1,f,call_f2_when_isolated,[]),
-
- %% Disconnect and check that node is removed from main cover node
- net_kernel:disconnect(N1),
timer:sleep(500), % allow some to detect disconnect and for f:f2() call
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
%% Do some add one module (b) and remove one module (a)
code:purge(a),
@@ -476,7 +528,7 @@ reconnect(Config) ->
{ok,b} = cover:compile(b),
cover_compiled = code:which(b),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0), % only the first call - before the flush
%% Reconnect the node and check that b and f are cover compiled but not a
@@ -519,7 +571,7 @@ die_and_reconnect(Config) ->
%% Kill the node
rpc:call(N1,erlang,halt,[]),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0), % only the first call - before the flush
@@ -560,7 +612,7 @@ dont_reconnect_after_stop(Config) ->
%% Stop cover on the node, then terminate the node
cover:stop(N1),
rpc:call(N1,erlang,halt,[]),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0),
@@ -568,7 +620,7 @@ dont_reconnect_after_stop(Config) ->
{ok,N1} = ?t:start_node(NodeName,peer,
[{args," -pa " ++ DataDir},{start_cover,false}]),
timer:sleep(300),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
Beam = rpc:call(N1,code,which,[f]),
false = (Beam==cover_compiled),
@@ -613,7 +665,7 @@ stop_node_after_disconnect(Config) ->
{ok,N1} = ?t:start_node(NodeName,peer,
[{args," -pa " ++ DataDir},{start_cover,false}]),
timer:sleep(300),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
Beam = rpc:call(N1,code,which,[f]),
false = (Beam==cover_compiled),
@@ -759,7 +811,6 @@ eif(Config) when is_list(Config) ->
%% in cover_inc.beam - not the ones from the included file.
?line cover_inc:func(),
?line {ok, [_, _]} = cover:analyse(cover_inc, line),
- ?line cover:stop(),
ok.
otp_5305(suite) -> [];
@@ -775,7 +826,6 @@ otp_5305(Config) when is_list(Config) ->
">>,
?line ok = file:write_file(File, Test),
?line {ok, t} = cover:compile(File),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -790,7 +840,6 @@ otp_5418(Config) when is_list(Config) ->
?line ok = file:write_file(File, Test),
?line {ok, t} = cover:compile(File),
?line {ok,{t,{0,0}}} = cover:analyse(t, module),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -952,7 +1001,6 @@ otp_7095(Config) when is_list(Config) ->
{{t,67},1},{{t,69},1},{{t,71},1},{{t,74},1},
{{t,76},0},{{t,78},1},
{{t,82},2}]} = cover:analyse(t, calls, line),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -1028,7 +1076,6 @@ otp_8273(Config) when is_list(Config) ->
">>,
?line File = cc_mod(t, Test, Config),
?line ok = t:t(),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -1066,7 +1113,6 @@ otp_8188(Config) when is_list(Config) ->
?line File = cc_mod(t, Test, Config),
?line false = t:test(nok),
?line {ok,[{{t,11},1},{{t,12},1}]} = cover:analyse(t, calls, line),
- ?line cover:stop(),
?line ok = file:delete(File),
%% Bit string comprehensions are now traversed;
@@ -1382,6 +1428,20 @@ comprehension_8188(Cf) ->
ok.
+eep37(Config) when is_list(Config) ->
+ [{{t,1},1},{{t,2},1},{{t,4},6},{{t,6},1},{{t,8},1}] =
+ analyse_expr(<<"begin\n" % 1
+ " F =\n" % 1
+ " fun Fact(N) when N > 0 ->\n"
+ " N * Fact(N - 1);\n" % 6
+ " Fact(0) ->\n"
+ " 1\n" % 1
+ " end,\n"
+ " F(6)\n" % 1
+ "end\n">>,
+ Config),
+ ok.
+
otp_10979_hanging_node(_Config) ->
P1 = processes(),
@@ -1419,6 +1479,8 @@ compile_beam_opts(Config) when is_list(Config) ->
export_all,
debug_info,
return_errors]),
+ code:purge(t),
+ code:delete(t),
Exports =
[{func1,0},
{macro, 0},
@@ -1429,7 +1491,6 @@ compile_beam_opts(Config) when is_list(Config) ->
Exports = t:module_info(exports),
{ok, t} = cover:compile_beam("t"),
Exports = t:module_info(exports),
- cover:stop(),
ok = file:delete("t.beam"),
ok = file:set_cwd(Cwd),
ok.
@@ -1512,3 +1573,21 @@ is_unloaded(What) ->
check_f_calls(F1,F2) ->
{ok,[{{f,f1,0},F1},{{f,f2,0},F2}|_]} = cover:analyse(f,calls,function).
+
+cover_which_nodes(Expected) ->
+ case cover:which_nodes() of
+ Expected ->
+ ok;
+ Other ->
+ {Time,ok} = timer:tc(fun Retry() ->
+ case cover:which_nodes() of
+ Expected -> ok;
+ _ ->
+ ?t:sleep(100),
+ Retry()
+ end
+ end),
+ io:format("~p ms before cover:which_nodes() returned ~p",
+ [Time,Expected]),
+ Expected = Other
+ end.
diff --git a/lib/tools/test/cover_SUITE_data/b.erl b/lib/tools/test/cover_SUITE_data/b.erl
index 13f39b8cb9..0a418a58d8 100644
--- a/lib/tools/test/cover_SUITE_data/b.erl
+++ b/lib/tools/test/cover_SUITE_data/b.erl
@@ -1,5 +1,5 @@
-module(b).
--export([start/0, loop/0]).
+-export([start/0, loop/0, wait/0]).
start() ->
spawn(?MODULE, loop, []).
@@ -12,3 +12,9 @@ loop() ->
stop ->
done
end.
+
+%% This checks for a bug in expressions which have no
+%% "main" clauses (only after and friends) followed by
+%% a return value in the same line.
+wait() ->
+ receive after 1000 -> done end, ok.
diff --git a/lib/tools/test/cover_SUITE_data/f.erl b/lib/tools/test/cover_SUITE_data/f.erl
index ce2963014a..a29a67b388 100644
--- a/lib/tools/test/cover_SUITE_data/f.erl
+++ b/lib/tools/test/cover_SUITE_data/f.erl
@@ -10,10 +10,15 @@ f2() ->
f2_line2.
call_f2_when_isolated() ->
+ [Other] = nodes(),
+ net_kernel:disconnect(Other),
+ do_call_f2_when_isolated().
+
+do_call_f2_when_isolated() ->
case nodes() of
[] ->
f2();
_ ->
timer:sleep(100),
- call_f2_when_isolated()
+ do_call_f2_when_isolated()
end.
diff --git a/lib/tools/test/eprof_SUITE.erl b/lib/tools/test/eprof_SUITE.erl
index 26685a6a84..04b522de4a 100644
--- a/lib/tools/test/eprof_SUITE.erl
+++ b/lib/tools/test/eprof_SUITE.erl
@@ -104,7 +104,7 @@ basic(Config) when is_list(Config) ->
profiling = eprof:profile([A]),
true = exit(A, kill_it),
profiling_stopped = eprof:stop_profiling(),
- {error,_} = eprof:profile(fun() -> a = b end),
+ {error,_} = eprof:profile(fun() -> a = id(b) end),
%% with mfa
@@ -127,6 +127,14 @@ basic(Config) when is_list(Config) ->
ok.
basic_option(Config) when is_list(Config) ->
+ %% Eprof is not supported on native-compile code.
+ case lists:module_info(native_addresses) of
+ [] -> basic_option_1(Config);
+ [_|_] -> {skip,"lists is native-compiled"}
+ end.
+
+basic_option_1(Config) ->
+
%% load eprof_test and change directory
{ok, OldCurDir} = file:get_cwd(),
@@ -141,8 +149,7 @@ basic_option(Config) when is_list(Config) ->
% vanilla
{ok, _} = eprof:profile(fun() -> eprof_test:do(10) end, [{set_on_spawn, true}]),
- [{_, MfasDo1},{_, MfasLists1}] = eprof:dump(),
- Mfas1 = MfasDo1 ++ MfasLists1,
+ Mfas1 = lists:foldl(fun({_,Mfas},Out) -> Mfas ++ Out end, [], eprof:dump()),
{value, {_, {11, _}}} = lists:keysearch({eprof_test,dec,1}, 1, Mfas1),
{value, {_, { 1, _}}} = lists:keysearch({eprof_test, go,1}, 1, Mfas1),
@@ -151,8 +158,7 @@ basic_option(Config) when is_list(Config) ->
{ok, _} = eprof:profile(fun() -> eprof_test:do(10) end, [set_on_spawn]),
- [{_, MfasDo2},{_, MfasLists2}] = eprof:dump(),
- Mfas2 = MfasDo2 ++ MfasLists2,
+ Mfas2 = lists:foldl(fun({_,Mfas},Out) -> Mfas ++ Out end, [], eprof:dump()),
{value, {_, {11, _}}} = lists:keysearch({eprof_test,dec,1}, 1, Mfas2),
{value, {_, { 1, _}}} = lists:keysearch({eprof_test, go,1}, 1, Mfas2),
{value, {_, { 9, _}}} = lists:keysearch({lists, split_2,5}, 1, Mfas2),
@@ -247,3 +253,5 @@ ensure_eprof_stopped() ->
Pid ->
stopped=eprof:stop()
end.
+
+id(I) -> I.
diff --git a/lib/tools/test/lcnt_SUITE.erl b/lib/tools/test/lcnt_SUITE.erl
index 1bee6021ab..010dffe138 100644
--- a/lib/tools/test/lcnt_SUITE.erl
+++ b/lib/tools/test/lcnt_SUITE.erl
@@ -27,11 +27,11 @@
%% Test cases
-export([
- load_v1/1,
- conflicts/1,
- locations/1,
- swap_keys/1
- ]).
+ t_load/1,
+ t_conflicts/1,
+ t_locations/1,
+ t_swap_keys/1
+ ]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(4)).
@@ -54,48 +54,52 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
- [load_v1, conflicts, locations, swap_keys].
+all() -> [t_load, t_conflicts, t_locations, t_swap_keys].
-groups() ->
- [].
+groups() -> [].
-init_per_group(_GroupName, Config) ->
- Config.
+init_per_group(_GroupName, Config) -> Config.
-end_per_group(_GroupName, Config) ->
- Config.
+end_per_group(_GroupName, Config) -> Config.
%%----------------------------------------------------------------------
%% Tests
%%----------------------------------------------------------------------
-load_v1(suite) ->
- [];
-load_v1(doc) ->
- ["Load data from file."];
-load_v1(Config) when is_list(Config) ->
- ?line {ok, _} = lcnt:start(),
- ?line Path = ?config(data_dir, Config),
- ?line File = filename:join([Path,"big_bang_40.lcnt"]),
- ?line ok = lcnt:load(File),
- ?line ok = lcnt:stop(),
+t_load(suite) -> [];
+t_load(doc) -> ["Load data from file."];
+t_load(Config) when is_list(Config) ->
+ Path = ?config(data_dir, Config),
+ Files = [filename:join([Path,"big_bang_40.lcnt"]),
+ filename:join([Path,"ehb_3_3_hist.lcnt"])],
+ ok = t_load_file(Files),
ok.
-conflicts(suite) ->
- [];
-conflicts(doc) ->
- ["API: conflicts"];
-conflicts(Config) when is_list(Config) ->
- ?line {ok, _} = lcnt:start(),
- ?line Path = ?config(data_dir, Config),
- ?line File = filename:join([Path,"big_bang_40.lcnt"]),
- ?line ok = lcnt:load(File),
- ?line ok = lcnt:conflicts(),
- THs = [-1, 0, 100, 1000],
- Print = [name , id , type , entry , tries , colls , ratio , time , duration],
- Opts = [
+t_load_file([]) -> ok;
+t_load_file([File|Files]) ->
+ {ok, _} = lcnt:start(),
+ ok = lcnt:load(File),
+ ok = lcnt:stop(),
+ t_load_file(Files).
+
+t_conflicts(suite) -> [];
+t_conflicts(doc) -> ["API: conflicts"];
+t_conflicts(Config) when is_list(Config) ->
+ Path = ?config(data_dir, Config),
+ Files = [filename:join([Path,"big_bang_40.lcnt"]),
+ filename:join([Path,"ehb_3_3_hist.lcnt"])],
+ ok = t_conflicts_file(Files),
+ ok.
+
+t_conflicts_file([]) -> ok;
+t_conflicts_file([File|Files]) ->
+ {ok, _} = lcnt:start(),
+ ok = lcnt:load(File),
+ ok = lcnt:conflicts(),
+ THs = [-1, 0, 100, 1000],
+ Print = [name , id , type , entry , tries , colls , ratio , time , duration],
+ Opts = [
[{sort, Sort}, {reverse, Rev}, {max_locks, ML}, {combine, Combine}, {thresholds, [TH]}, {print, [Print]}] ||
Sort <- [name , id , type , tries , colls , ratio , time , entry],
ML <- [none, 1 , 32, 4096],
@@ -103,28 +107,33 @@ conflicts(Config) when is_list(Config) ->
TH <- [{tries, Tries} || Tries <- THs] ++ [{colls, Colls} || Colls <- THs] ++ [{time, Time} || Time <- THs],
Rev <- [true, false]
],
- ?line ok = test_conflicts_opts(Opts),
- ?line ok = lcnt:stop(),
- ok.
+ ok = test_conflicts_opts(Opts),
+ ok = lcnt:stop(),
+ t_conflicts_file(Files).
+
test_conflicts_opts([]) -> ok;
test_conflicts_opts([Opt|Opts]) ->
- ?line ok = lcnt:conflicts(Opt),
+ ok = lcnt:conflicts(Opt),
test_conflicts_opts(Opts).
-locations(suite) ->
- [];
-locations(doc) ->
- ["API: locations"];
-locations(Config) when is_list(Config) ->
- ?line {ok, _} = lcnt:start(),
- ?line Path = ?config(data_dir, Config),
- ?line File = filename:join([Path,"big_bang_40.lcnt"]),
- ?line ok = lcnt:load(File),
- ?line ok = lcnt:locations(),
- THs = [-1, 0, 100, 1000],
- Print = [name , id , type , entry , tries , colls , ratio , time , duration],
- Opts = [
+t_locations(suite) -> [];
+t_locations(doc) -> ["API: locations"];
+t_locations(Config) when is_list(Config) ->
+ Path = ?config(data_dir, Config),
+ Files = [filename:join([Path,"big_bang_40.lcnt"]),
+ filename:join([Path,"ehb_3_3_hist.lcnt"])],
+ ok = t_locations_file(Files),
+ ok.
+
+t_locations_file([]) -> ok;
+t_locations_file([File|Files]) ->
+ {ok, _} = lcnt:start(),
+ ok = lcnt:load(File),
+ ok = lcnt:locations(),
+ THs = [-1, 0, 100, 1000],
+ Print = [name , id , type , entry , tries , colls , ratio , time , duration],
+ Opts = [
[{full_id, Id}, {sort, Sort}, {max_locks, ML}, {combine, Combine}, {thresholds, [TH]}, {print, Print}] ||
Sort <- [name , id , type , tries , colls , ratio , time , entry],
ML <- [none, 1 , 64],
@@ -132,30 +141,34 @@ locations(Config) when is_list(Config) ->
TH <- [{tries, Tries} || Tries <- THs] ++ [{colls, Colls} || Colls <- THs] ++ [{time, Time} || Time <- THs],
Id <- [true, false]
],
- ?line ok = test_locations_opts(Opts),
- ?line ok = lcnt:stop(),
- ok.
+ ok = test_locations_opts(Opts),
+ ok = lcnt:stop(),
+ t_locations_file(Files).
test_locations_opts([]) -> ok;
test_locations_opts([Opt|Opts]) ->
- ?line ok = lcnt:locations(Opt),
+ ok = lcnt:locations(Opt),
test_locations_opts(Opts).
-swap_keys(suite) ->
- [];
-swap_keys(doc) ->
- ["Test interchanging port/process id with class"];
-swap_keys(Config) when is_list(Config) ->
- ?line {ok, _} = lcnt:start(),
- ?line Path = ?config(data_dir, Config),
- ?line File = filename:join([Path,"big_bang_40.lcnt"]),
- ?line ok = lcnt:load(File),
- ?line ok = lcnt:conflicts(),
- ?line ok = lcnt:swap_pid_keys(),
- ?line ok = lcnt:conflicts(),
- ?line ok = lcnt:stop(),
+t_swap_keys(suite) -> [];
+t_swap_keys(doc) -> ["Test interchanging port/process id with class"];
+t_swap_keys(Config) when is_list(Config) ->
+ Path = ?config(data_dir, Config),
+ Files = [filename:join([Path,"big_bang_40.lcnt"]),
+ filename:join([Path,"ehb_3_3_hist.lcnt"])],
+ ok = t_swap_keys_file(Files),
ok.
+t_swap_keys_file([]) -> ok;
+t_swap_keys_file([File|Files]) ->
+ {ok, _} = lcnt:start(),
+ ok = lcnt:load(File),
+ ok = lcnt:conflicts(),
+ ok = lcnt:swap_pid_keys(),
+ ok = lcnt:conflicts(),
+ ok = lcnt:stop(),
+ t_swap_keys_file(Files).
+
%%----------------------------------------------------------------------
%% Auxiliary tests
diff --git a/lib/tools/test/lcnt_SUITE_data/ehb_3_3_hist.lcnt b/lib/tools/test/lcnt_SUITE_data/ehb_3_3_hist.lcnt
new file mode 100644
index 0000000000..ff5bdcbdaa
--- /dev/null
+++ b/lib/tools/test/lcnt_SUITE_data/ehb_3_3_hist.lcnt
Binary files differ
diff --git a/lib/tools/test/tools_SUITE.erl b/lib/tools/test/tools_SUITE.erl
index ea3f59dbe1..e3582b995b 100644
--- a/lib/tools/test/tools_SUITE.erl
+++ b/lib/tools/test/tools_SUITE.erl
@@ -30,12 +30,12 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases must be exported.
--export([app_test/1]).
+-export([app_test/1, appup_test/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app_test].
+ [app_test, appup_test].
groups() ->
[].
@@ -71,3 +71,7 @@ app_test(suite) ->
[];
app_test(Config) when is_list(Config) ->
?line ?t:app_test(tools, tolerant).
+
+%% Test that the .appup file does not contain any `basic' errors
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(tools).
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index dc06678b8e..6870aefe5c 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1048,7 +1047,7 @@ read_expected(Version) ->
POS1 = 28, POS2 = POS1+10, POS3 = POS2+6, POS4 = POS3+6, POS5 = POS4+10,
POS6 = POS5+5, POS7 = POS6+6, POS8 = POS7+6, POS9 = POS8+8,
POS10 = POS9+10, POS11 = POS10+7, POS12 = POS11+8, POS13 = POS12+10,
- POS14 = POS13+18, % POS15 = POS14+23,
+ POS14 = POS13+18, POS15 = POS14+23,
FF = {read,funfuns,0},
U = [{POS1+5,{FF,{dist,'$F_EXPR',0}}},
@@ -1197,11 +1196,6 @@ read_expected(Version) ->
{0,{FF,{modul,'$F_EXPR',179}}}]
++ O1;
_ ->
-% [{POS15+2,{{read,bi,0},{foo,t,0}}},
-% {POS15+3,{{read,bi,0},{bar,t,0}}},
-% {POS15+6,{{read,bi,0},{read,local,0}}},
-% {POS15+8,{{read,bi,0},{foo,t,0}}},
-% {POS15+10,{{read,bi,0},{bar,t,0}}}] ++
[{16,{FF,{read,'$F_EXPR',178}}},
{17,{FF,{modul,'$F_EXPR',179}}}]
++
@@ -1212,7 +1206,7 @@ read_expected(Version) ->
OKB1 = [{POS13+1,{FF,{erts_debug,apply,4}}},
{POS13+2,{FF,{erts_debug,apply,4}}},
{POS13+3,{FF,{erts_debug,apply,4}}},
- {POS1+3, {FF,{erlang,binary_to_term,1}}},
+ {POS1+3, {FF,{erlang,binary_to_term,1}}},
{POS3+1, {FF,{erlang,spawn,3}}},
{POS3+2, {FF,{erlang,spawn,3}}},
{POS3+3, {FF,{erlang,spawn_link,3}}},
@@ -1228,7 +1222,11 @@ read_expected(Version) ->
_ ->
[{POS13+16, {{read,bi,0},{erlang,'!',2}}},
{POS13+16, {{read,bi,0},{erlang,'-',1}}},
- {POS13+16, {{read,bi,0},{erlang,self,0}}}]
+ {POS13+16, {{read,bi,0},{erlang,self,0}}},
+ {POS15+1, {{read,bi,0},{erlang,'>',2}}},
+ {POS15+2, {{read,bi,0},{erlang,'-',2}}},
+ {POS15+2, {{read,bi,0},{erlang,'*',2}}},
+ {POS15+8, {{read,bi,0},{erlang,'/',2}}}]
end
++ [{POS14+19, {{read,bi,0},{erlang,'+',2}}},
{POS14+21, {{read,bi,0},{erlang,'+',2}}},
diff --git a/lib/tools/test/xref_SUITE_data/read/read.erl b/lib/tools/test/xref_SUITE_data/read/read.erl
index 19694c9e25..5f388194b0 100644
--- a/lib/tools/test/xref_SUITE_data/read/read.erl
+++ b/lib/tools/test/xref_SUITE_data/read/read.erl
@@ -156,20 +156,19 @@ bi() ->
<<D:16, E, F/binary>> = Bin3,
X = 9, <<(X+1):8>>,
_Fyy = <<X:4/little-signed-integer-unit:8>>,
- D + E + F.
-%bi() ->
-% %% POS15=POS14+13
-% try
-% foo:t(),
-% bar:t()
-% of
-% {v,1} ->
-% local();
-% {v,2} ->
-% foo:t()
-% catch
-% {'EXIT',_} -> bar:t()
-% end.
+ D + E + F;
+bi() ->
+ %% EEP37. POS15=POS14+23
+ F = fun Fact(N) when N > 0 ->
+ N * Fact(N - 1);
+ Fact(0) ->
+ 1
+ end,
+ F(6),
+ G = fun _(foo) -> bar;
+ _(X) -> X / 3
+ end,
+ G(foo).
local() ->
true.
diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk
index 0cead00554..3b3202d38b 100644
--- a/lib/tools/vsn.mk
+++ b/lib/tools/vsn.mk
@@ -1 +1 @@
-TOOLS_VSN = 2.6.13
+TOOLS_VSN = 2.7.2
diff --git a/lib/tv/AUTHORS b/lib/tv/AUTHORS
deleted file mode 100644
index 7736a75b2f..0000000000
--- a/lib/tv/AUTHORS
+++ /dev/null
@@ -1,5 +0,0 @@
-Original Authors and Contributors:
-
-Fredrik Gustafson
-
-
diff --git a/lib/tv/doc/html/.gitignore b/lib/tv/doc/html/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
--- a/lib/tv/doc/html/.gitignore
+++ /dev/null
diff --git a/lib/tv/doc/man3/.gitignore b/lib/tv/doc/man3/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
--- a/lib/tv/doc/man3/.gitignore
+++ /dev/null
diff --git a/lib/tv/doc/pdf/.gitignore b/lib/tv/doc/pdf/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
--- a/lib/tv/doc/pdf/.gitignore
+++ /dev/null
diff --git a/lib/tv/doc/src/Makefile b/lib/tv/doc/src/Makefile
deleted file mode 100644
index 413eb8f634..0000000000
--- a/lib/tv/doc/src/Makefile
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../../vsn.mk
-VSN=$(TV_VSN)
-APPLICATION=tv
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = tv.xml
-
-XML_PART_FILES = \
- part.xml \
- part_notes.xml
-
-XML_CHAPTER_FILES = \
- table_visualizer_chapter.xml \
- notes.xml
-
-BOOK_FILES = book.xml
-
-XML_FILES = \
- $(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-
-GIF_FILES = tv_start.gif \
- tv_start_mnesia.gif \
- tv_start_system.gif \
- tv_start_system_unreadable.gif \
- tv_start_pid_sorted.gif \
- tv_start_other_node.gif \
- tv_table_browser.gif \
- tv_table_browser_updated.gif \
- set_poll_int.gif \
- tv_record_editor_mnesia.gif \
- tv_search_window.gif \
- tv_search_result.gif \
- tv_row_marked.gif \
- tv_row_marked_popup.gif \
- info_window.gif \
- tv_create_table.gif
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
diff --git a/lib/tv/doc/src/fascicules.xml b/lib/tv/doc/src/fascicules.xml
deleted file mode 100644
index 101e745722..0000000000
--- a/lib/tv/doc/src/fascicules.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
-
-<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
- Release Notes
- </fascicule>
- <fascicule file="" href="../../../../doc/print.html" entry="no">
- Off-Print
- </fascicule>
-</fascicules>
-
-
diff --git a/lib/tv/doc/src/info_window.gif b/lib/tv/doc/src/info_window.gif
deleted file mode 100644
index 7913fc4230..0000000000
--- a/lib/tv/doc/src/info_window.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/info_window.ps b/lib/tv/doc/src/info_window.ps
deleted file mode 100644
index b459523d0f..0000000000
--- a/lib/tv/doc/src/info_window.ps
+++ /dev/null
@@ -1,814 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./info_window.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:12:33 2001)
-%%BoundingBox: 0 60 377 354
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 60 377 354
-userdict begin
-%%BeginData:
-DisplayImage
-0 60
-377.000000 294.000000
-12
-590 460
-1
-0
-0
-8
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-828282
-000a01ff01ff0137000b0208040001ff01ff013700000208040000000208040002ff02ff
-0237000002080400000002080400020000ff00ff00340400020000000208040000000202
-04060200000004ff04ff0434020000000405020204000000020204000209000d02ff02ff
-022b00000202040000000202040002080000020d040002ea010102060101021d01020229
-010102e700000202040000000202040002080000020d040002d801070209010102060101
-020e0101020b0101022601000203010102e700000202040000000202040002080000020d
-040002db0101020c010102060101020e0101020b01010225010102ed0000020204000000
-0202040002080000020204060203040002db010102040103020301010200010102030101
-020201030207010102020101020001010202010402010103020201010200010102010101
-020001010201010102030103020101040201010102020103020301010200010102d70000
-02020400000004030208000002020400030400000203040002db01010203010102010101
-020201020200010102020101020101010201010102060101020201020200010102020101
-020201010201010102010101020001010201010202000102020001010201010102010101
-02010101020301010201010102010101020201020200010102d6000004030101020b0000
-02030400030200000204040002db01010207010102020101020101010202010102010101
-020101010206010102020101020101010202010102020101020101010201010202030101
-020101010201010102050101020101010203010102010101020101010202010102010101
-02d90103020b000002030400030200000204040002db0101020401040202010102010101
-020201010201010502060101020201010201010102020101020201010201010102010101
-020401010201010102010101020201040201010102030101020101010201010102020101
-0201010102d90103020b000002040400030000000205040002db01010203010102010101
-02020101020101010202010102010101020a010102020101020101010202010102020101
-020101010201010102040101020101010201010102010101020101010201010102030101
-0201010102010101020201010201010102d90103020b0000020404000300000002050400
-02db01010203010102010101020201010201010102020101020101010202010002060101
-020201010201010102020101020201010201010102010101020401010201010102010101
-020101010201010102010101020301010201010102010101020201010201010102d90103
-020b0000020500000206040002db01010204010202000101020101040203010102020103
-020701010202010102010101020201010203010302020101020401010201010102010101
-0202010202000101020101020201010102020103020301010201010102d90103020b0000
-020d040002ff02ff022d0103020b0000020d040002ff02ff022d0103020b0000020d0400
-02ff02ff022d0103020c040d02ff02ff022e010302ff02ff0249010302ff02ff02490103
-020200ff00ff00420400020201030202000004ff04ff04420202010302ff02ff02490103
-020200ff00ff004302020103020200ff00ff00420700020201030202000105ff05ff053f
-0701020201030202000105ff05ff053f0701020201030202000105ff05ff053f07010202
-01030202000105ff05ff053f0701020201030202000105ff05ff053f0701020201030202
-0001050b0604050406000503060205ff05ff052107010202010302020001050b0600050f
-060005ff05ff052107010202010302020001050b060005060602050506000503060205ff
-05ff051a07010202010302020001050b06000508060005050600050206000502060005ff
-05ff051907010202010302020001050b06030505060005050600050206000502060005ff
-05ff051907010202010302020001050b060005080600050506000502060405ff05ff0519
-07010202010302020001050b060005080600050506000502060005ff05ff051d07010202
-010302020001050b06000508060005050600050206000502060005ff05ff051907010202
-010302020001050b060005080600050506000503060205ff05ff051a0701020201030202
-000105ff05ff053f07010202010302020001050a060605ff05ff052d0701020201030202
-0001050a060605ff05ff052d0701020201030202000105ff05ff053f0701020201030202
-000105ff05ff053f0701020201030202000105ff05ff053f0701020201030202000107ff
-07ff0741020201030202000007ff07ff074202020103020205ff05ff0543020201030202
-05ff05ff054302020103020205ff05ff054302020103020205ff05ff0543020201030202
-05ff05ff054302020103020205ff05ff054302020103020205ff05ff0543020201030202
-05ff05ff054302020103020205ff05ff054302020103020205ff05ff0543020201030202
-05ff05ff0543020201030202050400770501007705010077050100770558020201030202
-050400760700050100760700050100760700050100760700055802020103020205040001
-057307010501000105730701050100010573070105010001057307010558020201030202
-050400010573070105010001057307010501000105730701050100010573070105580202
-010302020504000105730701050100010573070105010001057307010501000105730701
-055802020103020205040001057307010501000105730701050100010573070105010001
-057307010558020201030202050400010573070105010001057307010501000105730701
-050100010573070105580202010302020504000105730701050100010573070105010001
-057307010501000105730701055802020103020205040001057307010501000105730701
-050100010573070105010001057307010558020201030202050400010573070105010001
-057307010501000105730701050100010573070105580202010302020504000105730701
-050100010573070105010001057307010501000105730701055802020103020205040001
-057307010501000105730701050100010573070105010001057307010558020201030202
-05040001051d010405080100050601020510010405050100051f07010501000105080102
-0514010005110102050b010005050100050601000520070105010001052c010205050100
-053c070105010001052101020504010005480701055802020103020205040001051f0100
-050a0100050801000512010005070100051f070105010001050801000501010005250100
-05020100050a0100050501000528070105010001052b0100050201000542070105010001
-05200100050201000503010005480701055802020103020205040001051f010005040102
-05020100050001010505010005030102050b01000504010105000100051f070105010001
-050801000501010005030102050301020503010205030102050901000506010205020104
-05010104050201020502010005000101050301010500010005020102050b070105010001
-052b0100050601020502010405020102052e070105010001052001000505010405020102
-050201000500010105030102050301010500010005020102052407010558020201030202
-05040001051f010005030100050201000501010105010100050401000502010005020100
-050a01000503010005010101051f07010501000105080100050101000502010005020100
-050101000502010005040100050201000502010005090100050401000502010005030100
-0505010005060100050201010501010005010100050101010501010005020100050a0701
-05010001052c010005070100050601000501010005020100052d07010501000105210100
-050601000503010005020100050101010501010005010100050201000501010005010101
-050101000502010005230701055802020103020205040001051f01000507010005010100
-05020100050401000502010005020100050a01000503010005020100051f070105010001
-0508010305060100050101000508010005020100050e0101050201000502010005030100
-05050100050601000502010005020100050101000502010005010100050e070105010001
-052d010105050100050501000502010005020100052d0701050100010522010105040100
-050301000502010005010100050901000501010005020100050101000502010005230701
-055802020103020205040001051f01000504010305010100050201000504010005020104
-050a01000503010005020100051f07010501000105080100050201000502010305020102
-050501000502010005100100050101040503010005050100050601000502010005020100
-050101000502010005020102050b070105010001052f0100050401000504010005030104
-052d07010501000105240100050301000503010005020100050101000506010305010100
-050201000501010405230701055802020103020205040001051f01000503010005020100
-05010100050201000504010005020100050e01000503010005020100051f070105010001
-05080100050201000501010005020100050501000504010005020100050c010005020100
-050101000507010005050100050601000502010005020100050101000502010005050100
-050a070105010001052b0100050201000504010005030100050401000531070105010001
-052001000502010005030100050301000502010005010100050501000502010005010100
-050201000501010005270701055802020103020205040001051f01000503010005020100
-0501010105010100050401000502010005020100050a01000503010005010101051f0701
-050100010508010005020100050101000502010005010100050201000504010005020100
-050201000508010005020100050101000502010005030100050501000506010005020100
-0502010005010100050101010501010005020100050a070105010001052b010005020100
-05040100050201000505010005020100052d070105010001052001000502010005030100
-050301000502010005010100050501000502010005010100050101010501010005020100
-05230701055802020103020205040001051f010005040103050101000500010105050100
-05030102050901040502010105000100051f070105010001050801030503010305020102
-0505010005030102050a0102050301020505010105040101050401000502010005020100
-050201010500010005020102050b070105010001052c0102050501000502010405020102
-052e07010501000105210102050501010502010205020100050601030502010105000100
-050201020524070105580202010302020504000105730701050100010560010005110701
-05010001057307010501000105470100052a070105580202010302020504000105730701
-05010001055c010005020100051107010501000105730701050100010543010005020100
-052a07010558020201030202050400010573070105010001055d01020512070105010001
-057307010501000105440102052b07010558020201030202050400010573070105010001
-057307010501000105730701050100010573070105580202010302020504000105730701
-050100010573070105010001057307010501000105730701055802020103020205040001
-057307010501000105730701050100010573070105010001057307010558020201030202
-050400010573070105010001057307010501000105730701050100010573070105580202
-010302020504000105730701050100010573070105010001057307010501000105730701
-055802020103020205040001057307010501000105730701050100010573070105010001
-05730701055802020103020205040001057400ff00c20504020201030202050400010574
-00ff00c1070005040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105d101ff0158050a0701
-05040202010302020504000105d1010000ff00560100050a070105040202010302020504
-000105d1010000ff00560100050a070105040202010302020504000105d1010000ff0056
-0100050a070105040202010302020504000105d1010000ff00560100050a070105040202
-010302020504000105d1010000ff00560100050a070105040202010302020504000105d1
-010000ff00560100050a0701050402020103020205040001050a01040508010005060102
-05100104059701000010010000ff00440100050a0701050402020103020205040001050c
-0100050a01000508010005120100059901000010010000ff00440100050a070105040202
-0103020205040001050c01000504010205020100050001010505010005030102050b0100
-050301000502010005010100050001010503010205040101057c01000008010200020104
-0002010200ff003c0100050a0701050402020103020205040001050c0100050301000502
-01000501010105010100050401000502010005020100050a010005030100050201000501
-010105010100050101000502010005030101057c01000007010000020100000301000003
-01000002010000ff003b0100050a0701050402020103020205040001050c010005070100
-0501010005020100050401000502010005020100050a0100050401000501010005010100
-050201000501010005020100058201000007010000020100000301000003010000ff003f
-0100050a0701050402020103020205040001050c01000504010305010100050201000504
-010005020104050a01000504010005010100050101000502010005010104058201000007
-0104000301000004010200ff003c0100050a0701050402020103020205040001050c0100
-050301000502010005010100050201000504010005020100050e01000505010005000100
-0501010005020100050101000586010000070100000701000007010000ff003b0100050a
-0701050402020103020205040001050c0100050301000502010005010101050101000504
-01000502010005020100050a010005050101050201010501010005010100050201000503
-0101057c0100000701000002010000030100000301000002010000ff003b0100050a0701
-050402020103020205040001050c01000504010305010100050001010505010005030102
-050b01000506010005020100050001010503010205040101057c01000008010200050101
-0002010200ff003c0100050a0701050402020103020205040001053e010005020100058d
-010000ff00560100050a0701050402020103020205040001053b01000500010005030100
-058d010000ff00560100050a0701050402020103020205040001053c010005040100058d
-010000ff00560100050a070105040202010302020504000105d1010000ff00560100050a
-070105040202010302020504000105d1010000ff00560100050a07010504020201030202
-0504000105d1010000ff00560100050a070105040202010302020504000105d1010000ff
-00560100050a070105040202010302020504000105d101ff0158050a0701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105d101ff0158050a070105040202010302020504000105d10100
-00ff00560100050a070105040202010302020504000105d1010000ff00560100050a0701
-05040202010302020504000105d1010000ff00560100050a070105040202010302020504
-000105d1010000ff00560100050a070105040202010302020504000105d10100000a0101
-00a2010100a40100050a070105040202010302020504000105d101000009010000700100
-002a01000008010000a30100050a0701050402020103020205040001050a010405080100
-050601020510010405050100059001000009010000040102001901000006010000190100
-000a0100000601020013010000040101000a010200040100000c01010002010000070100
-00a30100050a0701050402020103020205040001050c0100050a01000508010005120100
-050701000590010000090100000601000019010000210100000a01000008010000120100
-0004010000010100000801000002010000020101000b0100000101000002010000060100
-00a30100050a0701050402020103020205040001050c0100050401020502010005000101
-0505010005030102050b0100050401010500010005030101058a01000009010000060100
-000301020003010200030102000201040002010200030102000201000000010100090104
-0002010200020100000001010005010000030102000a01000005010000010100000c0100
-0001010000000100000b010000010100000301000005010000a30100050a070105040202
-0103020205040001050c0100050301000502010005010101050101000504010005020100
-05020100050a0100050301000501010105030101058a0100000901000006010000020100
-000201000001010000020100000101000002010000030100000601000002010000020100
-0001010100010100000a0100000301000002010000010101000101000004010000020100
-00020100000801000006010000010100000c010000030100000b01000001010000040100
-0004010000a30100050a0701050402020103020205040001050c01000507010005010100
-05020100050401000502010005020100050a010005030100050201000590010000070101
-000701000002010000020100000101000009010000030100000601000002010000020100
-0001010000020100000a0100000701000001010000020100000401000002010000020100
-000701000007010000010100000a010100040100000b0100000101000005010000040101
-00a10100050a0701050402020103020205040001050c0100050401030501010005020100
-0504010005020104050a0100050301000502010005900100000901000006010000020100
-000201000001010000060103000301000006010000020100000201000001010000020100
-000a01000004010300010100000201000004010000020104000801000006010000010100
-000c010000030100000b010000010100000401000004010000a30100050a070105040202
-0103020205040001050c0100050301000502010005010100050201000504010005020100
-050e01000503010005020100059001000009010000060100000201000002010000010100
-0005010000020100000301000006010000020100000201000001010000020100000a0100
-000301000002010000010100000201000004010000020100000d01000005010000010100
-000c010000030100000b010000010100000301000005010000a30100050a070105040202
-0103020205040001050c0100050301000502010005010101050101000504010005020100
-05020100050a0100050301000501010105030101058a0100000901000006010000020100
-000201000001010000020100000101000002010000030100000601000002010000020100
-0001010000020100000a0100000301000002010000010101000101000004010000020100
-000201000003010100040100000401000001010000030101000201000002010000030100
-000501010003010000010100000201000006010000a30100050a07010504020201030202
-05040001050c010005040103050101000500010105050100050301020509010405020101
-0500010005030101058a0100000901000006010000030102000301020003010300040101
-00040100000301020002010000020100000b010100020103000101000000010100050100
-000301020004010100050100000401010004010100030102000201040003010100040101
-000201000007010000a30100050a070105040202010302020504000105d1010000090100
-003a01050027010000060100002a01000008010000a30100050a07010504020201030202
-0504000105d10100000a010100640101003b010100a40100050a07010504020201030202
-0504000105d1010000ff00560100050a070105040202010302020504000105d1010000ff
-00560100050a070105040202010302020504000105d1010000ff00560100050a07010504
-0202010302020504000105d1010000ff00560100050a0701050402020103020205040001
-05d1010000ff00560100050a070105040202010302020504000105d101ff0158050a0701
-05040202010302020504000105ff05ff0535070105040202010302020504000105ff05ff
-0535070105040202010302020504000105ff05ff05350701050402020103020205040001
-05ff05ff0535070105040202010302020504000105ff05ff053507010504020201030202
-0504000105ff05ff0535070105040202010302020504000105ff05ff0535070105040202
-010302020504000105ff05ff0535070105040202010302020504000105ff05ff05350701
-05040202010302020504000105ff05ff0535070105040202010302020504000105ff05ff
-0535070105040202010302020504000105ff05ff05350701050402020103020205040001
-05ff05ff0535070105040202010302020504000105ff05ff053507010504020201030202
-0504000105ff05ff0535070105040202010302020504000105ff05ff0535070105040202
-010302020504000105ff05ff0535070105040202010302020504000105ff05ff05350701
-05040202010302020504000105ff05ff0535070105040202010302020504000105ff05ff
-0535070105040202010302020504000105d101ff0158050a070105040202010302020504
-000105d1010000ff00560100050a070105040202010302020504000105d1010000ff0056
-0100050a070105040202010302020504000105d1010000ff00560100050a070105040202
-010302020504000105d1010000ff00560100050a070105040202010302020504000105d1
-010000ff00560100050a070105040202010302020504000105d1010000ff00560100050a
-0701050402020103020205040001050a0104050801000506010205100100050201000597
-010000080102001901000006010000190100000a01000006010200f60100050a07010504
-02020103020205040001050c0100050a010005080100051001010501010005970100000a
-01000019010000210100000a01000008010000f60100050a070105040202010302020504
-0001050c0100050401020502010005000101050501000503010205090101050101000502
-010205020101050001000503010205040101057c0100000a010000030102000301020003
-010200020104000201020003010200020100000001010009010400020102000201000000
-0101000501000003010200ef0100050a0701050402020103020205040001050c01000503
-010005020100050101010501010005040100050201000502010005080100050001000500
-01000501010005020100050101000500010005000100050101000502010005030101057c
-0100000a0100000201000002010000010100000201000001010000020100000301000006
-010000020100000201000001010100010100000a01000003010000020100000101010001
-010000040100000201000002010000ee0100050a0701050402020103020205040001050c
-010005070100050101000502010005040100050201000502010005080100050001000500
-010005050100050101000500010005000100050101000502010005820100000a01000002
-010000020100000101000009010000030100000601000002010000020100000101000002
-0100000a010000070100000101000002010000040100000201000002010000ee0100050a
-0701050402020103020205040001050c0100050401030501010005020100050401000502
-01040508010005010101050201030501010005000100050001000501010405820100000a
-010000020100000201000001010000060103000301000006010000020100000201000001
-010000020100000a0100000401030001010000020100000401000002010400ee0100050a
-0701050402020103020205040001050c0100050301000502010005010100050201000504
-010005020100050c01000501010105010100050201000501010005000100050001000501
-010005860100000a01000002010000020100000101000005010000020100000301000006
-010000020100000201000001010000020100000a01000003010000020100000101000002
-0100000401000002010000f20100050a0701050402020103020205040001050c01000503
-010005020100050101010501010005040100050201000502010005080100050201000501
-010005020100050101000500010005000100050101000502010005030101057c0100000a
-010000020100000201000001010000020100000101000002010000030100000601000002
-0100000201000001010000020100000a0100000301000002010000010101000101000004
-0100000201000002010000ee0100050a0701050402020103020205040001050c01000504
-010305010100050001010505010005030102050901000502010005020103050101000500
-0100050001000502010205040101057c0100000a01000003010200030102000301030004
-010100040100000301020002010000020100000b01010002010300010100000001010005
-01000003010200ef0100050a070105040202010302020504000105d10100003e010500ff
-00110100050a070105040202010302020504000105d1010000ff00560100050a07010504
-0202010302020504000105d1010000ff00560100050a0701050402020103020205040001
-05d1010000ff00560100050a070105040202010302020504000105d1010000ff00560100
-050a070105040202010302020504000105d1010000ff00560100050a0701050402020103
-02020504000105d1010000ff00560100050a070105040202010302020504000105d101ff
-0158050a070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105d101ff0158050a070105040202
-010302020504000105d1010000ff00560100050a070105040202010302020504000105d1
-010000ff00560100050a070105040202010302020504000105d1010000ff00560100050a
-070105040202010302020504000105d1010000ff00560100050a07010504020201030202
-0504000105d1010000ff00560100050a070105040202010302020504000105d1010000ff
-00560100050a0701050402020103020205040001050a0104050801000506010205100100
-05020100051d010305130100050b0100051c0100053501000009010000ff004b0100050a
-0701050402020103020205040001050c0100050a0100050801000510010105010100051d
-010005020100051f0100051c0100053501000009010000ff004b0100050a070105040202
-0103020205040001050c0100050401020502010005000101050501000503010205090101
-050101000502010205020101050001000503010205090100050201000502010205030101
-050001000502010205030102050201040502010205020100050001010503010205030101
-0500010005030101052f0100000701040001010000000101000201000002010000020102
-00ff00350100050a0701050402020103020205040001050c010005030100050201000501
-010105010100050401000502010005020100050801000500010005000100050101000502
-010005010100050001000500010005010100050201000508010005020100050101000502
-010005010100050101010504010005020100050201000503010005030100050201000501
-0101050101000501010005020100050101000501010105030101052f0100000901000003
-0101000101000001010000020100000101000002010000ff00340100050a070105040202
-0103020205040001050c0100050701000501010005020100050401000502010005020100
-050801000500010005000100050501000501010005000100050001000501010005020100
-050801030502010005020100050101000502010005040100050201000507010005030100
-050201000501010005050100050201000501010005020100053501000009010000030100
-0005010000020100000101000002010000ff00340100050a070105040202010302020504
-0001050c0100050401030501010005020100050401000502010405080100050101010502
-010305010100050001000500010005010104050801000501010005020104050101000502
-010005040100050301020504010005030104050101000505010405010100050201000535
-0100000901000003010000050100000201000001010400ff00340100050a070105040202
-0103020205040001050c0100050301000502010005010100050201000504010005020100
-050c010005010101050101000502010005010100050001000500010005010100050c0100
-050201000501010005050100050201000504010005060100050301000503010005050100
-050501000505010005020100053501000009010000030100000501000002010000010100
-00ff00380100050a0701050402020103020205040001050c010005030100050201000501
-010105010100050401000502010005020100050801000502010005010100050201000501
-010005000100050001000501010005020100050801000502010005010100050201000501
-010005010101050401000502010005020100050301000503010005020100050101000505
-010005020100050101000501010105030101052f01000009010000030100000501000001
-0101000101000002010000ff00340100050a0701050402020103020205040001050c0100
-050401030501010005000101050501000503010205090100050201000502010305010100
-050001000500010005020102050901000502010005020102050301010500010005040100
-0503010205050101050201020502010005060102050301010500010005030101052f0100
-000a01010001010000060101000001000002010200ff00350100050a0701050402020103
-020205040001056901000566010000ff00560100050a0701050402020103020205040001
-05650100050201000566010000ff00560100050a07010504020201030202050400010566
-01020567010000ff00560100050a070105040202010302020504000105d1010000ff0056
-0100050a070105040202010302020504000105d1010000ff00560100050a070105040202
-010302020504000105d1010000ff00560100050a070105040202010302020504000105d1
-010000ff00560100050a070105040202010302020504000105d101ff0158050a07010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105d101ff0158050a0701050402020103020205040001
-05d1010000ff00560100050a070105040202010302020504000105d1010000ff00560100
-050a070105040202010302020504000105d1010000ff00560100050a0701050402020103
-02020504000105d1010000ff00560100050a070105040202010302020504000105d10100
-00ff00560100050a070105040202010302020504000105d10100000b0100002a010000ff
-001d0100050a0701050402020103020205040001050a0103053401020513010005190100
-0503010005130104050801000506010205280100000a010000040101000a010200040100
-000c01010002010000ff001c0100050a0701050402020103020205040001050a01000502
-01000532010005020100052d01000503010005150100050a010005080100052801000009
-01000004010000010100000801000002010000020101000b0100000101000002010000ff
-001b0100050a0701050402020103020205040001050a0100050201000501010005000101
-050301020503010205030102050301020503010205090100050201000501010005020100
-050101000500010105030102050201000500010105030101050001000508010405010100
-0500010105030102050b0100050401020502010005000101050501000503010205040101
-051a0100000801000005010000010100000c01000001010000000100000b010000010100
-0003010000ff001a0100050a0701050402020103020205040001050a0100050201000501
-010105010100050101000502010005010100050201000501010005020100050101000502
-010005010100050201000508010005020100050101000502010005010101050101000504
-010005020101050101000501010005010101050a01000503010105010100050101000502
-0100050a0100050301000502010005010101050101000504010005020100050201000503
-0101051a0100000701000006010000010100000c010000030100000b0100000101000004
-010000ff00190100050a0701050402020103020205040001050a01030502010005050100
-050201000501010005050100050201000501010005050100050c01000502010005010100
-050001000500010005010100050201000504010005020100050201000501010005020100
-050a010005030100050201000501010005020100050a0100050701000501010005020100
-05040100050201000502010005200100000601000007010000010100000a010100040100
-000b0100000101000005010000ff00180100050a0701050402020103020205040001050a
-010005050100050501000502010005010100050501040502010205030102050901000502
-010005010100050001000500010005010100050201000504010005020100050201000501
-010005020100050a0100050301000502010005010104050a010005040103050101000502
-0100050401000502010405200100000701000006010000010100000c010000030100000b
-0100000101000004010000ff00190100050a0701050402020103020205040001050a0100
-050501000505010005020100050101000505010005090100050501000508010005020100
-050101000500010005000100050101000502010005040100050201000502010005010100
-05020100050a0100050301000502010005010100050e0100050301000502010005010100
-05020100050401000502010005240100000801000005010000010100000c010000030100
-000b0100000101000003010000ff001a0100050a0701050402020103020205040001050a
-010005050100050501000502010005010100050201000501010005020100050101000502
-010005010100050201000508010005020100050101000500010005000100050101000502
-01000504010005020100050201000501010005010101050a010005030100050201000501
-010005020100050a01000503010005020100050101010501010005040100050201000502
-010005030101051a01000009010000040100000101000003010100020100000201000003
-01000005010100030100000101000002010000ff001b0100050a07010504020201030202
-05040001050a0100050501000506010205030102050301020503010205030102050a0102
-050301000500010005020100050201000504010005020100050201000502010105000100
-050b0101050101000502010005020102050b010005040103050101000500010105050100
-0503010205040101051a0100000a01000004010100040101000301020002010400030101
-000401010002010000ff001c0100050a0701050402020103020205040001056901000566
-0100000b0100002a010000ff001d0100050a070105040202010302020504000105650100
-050201000566010000ff00560100050a0701050402020103020205040001056601020567
-010000ff00560100050a070105040202010302020504000105d1010000ff00560100050a
-070105040202010302020504000105d1010000ff00560100050a07010504020201030202
-0504000105d1010000ff00560100050a070105040202010302020504000105d1010000ff
-00560100050a070105040202010302020504000105d101ff0158050a0701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105d101ff0158050a070105040202010302020504000105d10100
-00ff00560100050a070105040202010302020504000105d1010000ff00560100050a0701
-05040202010302020504000105d1010000ff00560100050a070105040202010302020504
-000105d1010000ff00560100050a070105040202010302020504000105d1010000ff0056
-0100050a070105040202010302020504000105d1010000ff00560100050a070105040202
-0103020205040001050a0100050201000527010105090102051301000517010305590100
-00ff00560100050a0701050402020103020205040001050a01010501010005260100050a
-010005020100052b0100050201000558010000ff00560100050a07010504020201030202
-05040001050a01010501010005020102050201010500010005030102050a010205040100
-050a01000502010005010100050201000501010005000101050301020502010005000101
-050301010500010005080100050201000501010005000101050301020503010205030102
-0503010205030102050401010528010000ff00560100050a070105040202010302020504
-0001050a0100050001000500010005010100050201000501010005000100050001000501
-010005020100050801000502010005010104050801000502010005010100050201000501
-010105010100050401000502010105010100050101000501010105080100050201000501
-010105010100050101000502010005010100050201000501010005020100050101000502
-01000501010005020100050301010528010000ff00560100050a07010504020201030202
-05040001050a010005000100050001000505010005010100050001000500010005010100
-05020100050801000502010005030100050a010005020100050101000500010005000100
-050101000502010005040100050201000502010005010100050201000508010305020100
-050501000502010005010100050501000502010005010100050501000532010000ff0056
-0100050a0701050402020103020205040001050a01000501010105020103050101000500
-01000500010005010104050801000502010005030100050a010005020100050101000500
-010005000100050101000502010005040100050201000502010005010100050201000508
-010005050100050501000502010005010100050501040502010205030102052f010000ff
-00560100050a0701050402020103020205040001050a0100050101010501010005020100
-05010100050001000500010005010100050c01000502010005030100050a010005020100
-050101000500010005000100050101000502010005040100050201000502010005010100
-050201000508010005050100050501000502010005010100050501000509010005050100
-052e010000ff00560100050a0701050402020103020205040001050a0100050201000501
-010005020100050101000500010005000100050101000502010005080100050201000503
-0100050a0100050201000501010005000100050001000501010005020100050401000502
-010005020100050101000501010105080100050501000505010005020100050101000502
-0100050101000502010005010100050201000501010005020100050301010528010000ff
-00560100050a0701050402020103020205040001050a0100050201000502010305010100
-050001000500010005020102050a010205040100050b0102050301000500010005020100
-050201000504010005020100050201000502010105000100050801000505010005060102
-05030102050301020503010205030102050401010528010000ff00560100050a07010504
-02020103020205040001056901000566010000ff00560100050a07010504020201030202
-0504000105650100050201000566010000ff00560100050a070105040202010302020504
-0001056601020567010000ff00560100050a070105040202010302020504000105d10100
-00ff00560100050a070105040202010302020504000105d1010000ff00560100050a0701
-05040202010302020504000105d1010000ff00560100050a070105040202010302020504
-000105d1010000ff00560100050a070105040202010302020504000105d101ff0158050a
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000105ff05ff0535070105040202010302020504000105ff
-05ff0535070105040202010302020504000105ff05ff0535070105040202010302020504
-000105ff05ff0535070105040202010302020504000105ff05ff05350701050402020103
-02020504000105ff05ff0535070105040202010302020504000105ff05ff053507010504
-0202010302020504000105ff05ff0535070105040202010302020504000105ff05ff0535
-070105040202010302020504000107ff07ff073705040202010100040504000007ff07ff
-0738050400050202040005ff05ff054300000202040000000202040005ff05ff05430000
-0202040000000202040005ff05ff054300000202040000000202040005ff05ff05430000
-0202040000000202040005ff05ff0543000002020400000002020400000502ff02ff0237
-00060202040000000208040002ff02ff023700000208040000000208040002ff02ff0237
-00000208040000000208040001ff01ff01370000020804000000040901ff01ff01370000
-0409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 60 377 354
-%%EOF
diff --git a/lib/tv/doc/src/note.gif b/lib/tv/doc/src/note.gif
deleted file mode 100644
index 6fffe30419..0000000000
--- a/lib/tv/doc/src/note.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/notes.xml b/lib/tv/doc/src/notes.xml
deleted file mode 100644
index c95171568f..0000000000
--- a/lib/tv/doc/src/notes.xml
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2004</year><year>2013</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>TV Release Notes</title>
- <prepared>otp_appnotes</prepared>
- <docno>nil</docno>
- <date>nil</date>
- <rev>nil</rev>
- <file>notes.xml</file>
- </header>
- <p>This document describes the changes made to the TV application.</p>
-
-<section><title>TV 2.1.4.10</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Misc build updates</p>
- <p>
- Own Id: OTP-10784</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.9</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>The GS applications is now deprecated and will be
- removed in the R16 release. The following GS-based
- applications have been superseded by the Observer
- application and will removed in R16: Appmon, Pman,
- Tv.</p>
- <p>
- *** POTENTIAL INCOMPATIBILITY ***</p>
- <p>
- Own Id: OTP-9907</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.8</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Eliminate use of deprecated regexp module</p>
- <p>
- Own Id: OTP-9810</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.7</title>
-
- <section><title>Fixed Bugs and Malfunctions</title>
- <list>
- <item>
- <p>
- tv: Allow table viewer to display refs, ports and small
- binaries</p>
- <p>
- Table viewer displayed #Port, #Ref, or #Bin as place
- holders for their respective object types in ets and
- mnesia tables. This can make table viewer difficult to
- use when viewing tables containing those data types. It
- doesn't make sense to render large binaries so #Bin will
- still be used for binaries that exceed 100 bytes. (Thanks
- to Blaine whittle)</p>
- <p>
- Own Id: OTP-9153</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.6</title>
-
- <section><title>Fixed Bugs and Malfunctions</title>
- <list>
- <item>
- <p>
- With some window managers (e.g. stumpwm), <c>tv</c> would
- constantly restart while trying to open a table. (Thanks
- to Dmitriy Budashny.)</p>
- <p>
- Own Id: OTP-8751</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.5</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Warnings due to new autoimported BIFs removed</p>
- <p>
- Own Id: OTP-8674 Aux Id: OTP-8579 </p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.4</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- The documentation is now built with open source tools
- (xsltproc and fop) that exists on most platforms. One
- visible change is that the frames are removed.</p>
- <p>
- Own Id: OTP-8201</p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.3</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Updated the application with new tags for automatic updates
- of copyright notices.
- </p>
- <p>
- Own Id: OTP-7851
- </p>
- </item>
- </list>
- </section>
-
-</section>
-
-<section><title>TV 2.1.4.2</title>
-
- <section><title>Improvements and New Features</title>
- <list>
- <item>
- <p>
- Minor updates.</p>
- <p>
- Own Id: OTP-7261</p>
- </item>
- </list>
- </section>
-
-</section>
-
- <section>
- <title>TV 2.1.4.1</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Minor Makefile changes.</p>
- <p>Own Id: OTP-6689</p>
- </item>
- <item>
- <p>Obsolete guard tests (such as list()) have been replaced
- with the modern guard tests (such as is_list()).</p>
- <p>Own Id: OTP-6728</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>TV 2.1.4</title>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Removed some dead code from
- <c>tv_pg_gridfcns:mark_cell_and_notify/4</c>
- and <c>tv_nodewin:handle_error/1</c>.</p>
- <p>Own Id: OTP-6455</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>TV 2.1.3</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>A compiler warning has been fixed.</p>
- <p>Own Id: OTP-6016</p>
- </item>
- </list>
- </section>
-
- <section>
- <title>Improvements and New Features</title>
- <list type="bulleted">
- <item>
- <p>Notification windows are now centered over a parent
- window.</p>
- <p>Own Id: OTP-6014 Aux Id: OTP-5987</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>TV 2.1.2</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>Some dead code reported by Dialyzer was eliminated. </p>
- <p>A
- bug in 'dbg' when tracing to wrap trace files has been
- corrected. It failed to delete any already existing wrap
- trace files with the same names when starting a new wrap
- trace.</p>
- <p>Own Id: OTP-5329</p>
- </item>
- <item>
- <p>The graphic applications now search for HTML
- documentation in the correct place.</p>
- <p>Own Id: OTP-5381</p>
- </item>
- </list>
- </section>
- </section>
-
- <section>
- <title>TV 2.1.1</title>
-
- <section>
- <title>Fixed Bugs and Malfunctions</title>
- <list type="bulleted">
- <item>
- <p>TV no longer crashes on Mac OS X. (Thanks to Sean Hinde.)</p>
- <p>Own Id: OTP-5219</p>
- </item>
- </list>
- </section>
- </section>
-</chapter>
-
-
diff --git a/lib/tv/doc/src/part.xml b/lib/tv/doc/src/part.xml
deleted file mode 100644
index e6c94fa0b8..0000000000
--- a/lib/tv/doc/src/part.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>1997</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>TV User's Guide</title>
- <prepared>Fredrik Gustafson</prepared>
- <docno></docno>
- <date>1997-06-04</date>
- <rev>1.0.1</rev>
- <file>part.xml</file>
- </header>
- <description>
- <p>The Table Visualizer application, <em>TV</em>, enables the user
- to examine ETS and Mnesia tables. Once a certain table has been
- opened in the tool, the content may be viewed in various levels
- of detail.</p>
- </description>
- <xi:include href="table_visualizer_chapter.xml"/>
-</part>
-
-
diff --git a/lib/tv/doc/src/part_notes.xml b/lib/tv/doc/src/part_notes.xml
deleted file mode 100644
index 7a5b359592..0000000000
--- a/lib/tv/doc/src/part_notes.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>2004</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>TV Release Notes</title>
- <prepared></prepared>
- <docno></docno>
- <date>2004-09-07</date>
- <rev>1.0</rev>
- <file>part_notes.sgml</file>
- </header>
- <description>
- <p>The Table Visualizer application, <em>TV</em>, enables the user
- to examine ETS and Mnesia tables. Once a certain table has been
- opened in the tool, the content may be viewed in various levels
- of detail.</p>
- </description>
- <xi:include href="notes.xml"/>
-</part>
-
-
diff --git a/lib/tv/doc/src/set_poll_int.gif b/lib/tv/doc/src/set_poll_int.gif
deleted file mode 100644
index c09c84322f..0000000000
--- a/lib/tv/doc/src/set_poll_int.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/set_poll_int.ps b/lib/tv/doc/src/set_poll_int.ps
deleted file mode 100644
index cceb30486f..0000000000
--- a/lib/tv/doc/src/set_poll_int.ps
+++ /dev/null
@@ -1,483 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./set_poll_int.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:08:39 2001)
-%%BoundingBox: 0 17 200 154
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 17 200 154
-userdict begin
-%%BeginData:
-DisplayImage
-0 17
-200.000000 137.000000
-12
-315 215
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-828282
-aa2455
-c3c3c3
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff0124000b0208040001ff012400000208040000000208040002ff022400000208
-0400000002080400020000ff0021040002000000020804000000020204060200000004ff
-0421020000000405020204000000020204000209000d02ff021800000202040000000202
-040002080000020d04000281010102020101023701010254000002020400000002020400
-02080000020d040002580103020b010002070104020a01010202010102060101020b0100
-02210101025400000202040000000202040002080000020d040002570101020101010209
-01010207010102010101020901010202010102060101020a010102210101025400000202
-040000000202040002080000020204060203040002570101020601030201010402050101
-020101010201010302030101020201010206010102020101020001010201010402010103
-020201010200010102000101020101010202010302030101025400000202040000000403
-020800000202040003040000020304000257010202040101020101010201010102070101
-020101010200010102010101020201010202010102060101020201020200010102010101
-020201010201010102010101020001010200010102010101020101010201010102020101
-0254000004030101020b0000020304000302000002040400025801030202010102010101
-020101010207010102010100020101010201010102020101020201010206010102020101
-020101010201010102020101020101010201010202020101020101010205010102020101
-02570103020b0000020304000302000002040400025a0102020101050201010102070103
-020201010201010102020101020201010206010102020101020101010201010102020105
-020101010204010102000100020301040202010102570103020b00000204040003000000
-02050400025b010102010101020501010207010102040101020101010202010102020101
-020601010202010102010101020101010202010102050101020401010200010002020101
-020101010202010102570103020b00000204040003000000020504000257010102010101
-020101010202010002010101020701010204010102010101020201010202010102060101
-020201010201010102010101020201010202010002010101020501010203010102010101
-0202010102570103020b0000020500000206040002580103020301030203010202050101
-020501030203010102020101020601010202010102010101020201020201010302020101
-0205010102040102020001010201010102570103020b0000020d040002ff021a0103020b
-0000020d040002ff021a0103020b0000020d040002ff021a0103020c040d02ff021b0103
-02ff0236010302ff02360103020200ff002f0400020201030202000004ff042f02020103
-02ff02360103020205ff053002020103020205ff053002020103020205ff053002020103
-020205ff053002020103020205ff053002020103020205ff053002020103020205ff0530
-02020103020205ff053002020103020205ff053002020103020205ff0530020201030202
-05e5003b050e02020103020205e5003a0600050e02020103020205e5000105370601050e
-02020103020205e5000105370601050e02020103020205e5000105370601050e02020103
-020205e5000105370601050e02020103020205e5000105370601050e02020103020205e5
-000105370601050e02020103020205e5000105370601050e020201030202051b000105c7
-000105150102050201000502010005160601050e020201030202051a0003050b01000503
-0100051e010205090103050a010205030102050501000568000105140100050201000501
-01000501010005170601050e02020103020205190005050a010005030100052001000509
-010005020100050b010005050100056f0001051401000502010005010100050001000518
-0601050e0202010302020518000205010002050901010501010105020102050201000500
-010105020100050201000502010205050100050901000502010005020102050501000505
-010005030102050201000500010105030101050001000559000105140100050201000501
-010105190601050e02020103020205170002050300020508010105010101050101000502
-010005010101050101000501010005020100050101000502010005040100050901000502
-010005010100050201000504010005050100050501000502010105010100050101000501
-0101055900010514010005020100050101000500010005180601050e0202010302020516
-000205050002050701000500010105000100050501000501010005020100050101000502
-010005050100050401000509010305020100050201000504010005050100050501000502
-010005020100050101000502010005590001051401000502010005010100050101000517
-0601050e0202010302020515060205070602050601000500010105000100050201030501
-010005020100050101000502010005020103050401000509010005050100050201000504
-010005050100050501000502010005020100050101000502010005590001051401000502
-0100050101000501010005170601050e0202010302020516060205050602050701000503
-010005010100050201000501010005020100050101000502010005010100050201000504
-010005090100050501000502010005040100050501000505010005020100050201000501
-010005020100055900010514010005020100050101000502010005160601050e02020103
-020205170602050306020508010005030100050101000502010005010100050201000501
-010005010101050101000502010005040100050901000505010005020100050401000505
-010005050100050201000502010005010100050101010559000105150102050201000502
-010005160601050e02020103020205180602050106020509010005030100050201030501
-010005020100050201010500010005020103050401000509010005060102050501000505
-010005050100050201000502010005020101050001000559000105370601050e02020103
-020205190605056a01000559000105370601050e020201030202051a0603056701000502
-01000559000105370601050e020201030202051b060105690102055a000105370601050e
-02020103020205e5000105370601050e02020103020205e5000105370601050e02020103
-020205e5000105370601050e02020103020205e5000105370601050e02020103020205e5
-000105370601050e02020103020205e5000105370601050e02020103020205e500010639
-050e02020103020205e50000063a050e02020103020205ff053002020103020205ff0530
-02020103020205ff053002020103020205ff053002020103020205ff0530020201030202
-05ff053002020103020205ff053002020103020205ff053002020103020205ff05300202
-0103020205ff053002020103020205ff053002020103020205ff053002020103020205ff
-053002020103020205ff053002020103020205ff053002020103020205ff053002020103
-020205ff053002020103020205ff053002020103020205ff053002020103020205ff0530
-02020103020205e5003b050e02020103020205e5003a0600050e02020103020205e50001
-05370601050e02020103020205e5000105370601050e02020103020205e5000105370601
-050e02020103020205e5000105370601050e02020103020205e5000105370601050e0202
-0103020205e5000105370601050e02020103020205e5000105370601050e020201030202
-051a060105c8000105070102051f010205090601050e02020103020205190603050e0100
-050c0100051a01000506010005100103050a010205030102050501000554000105060100
-050201000520010005090601050e02020103020205180605050d0100050c0100051a0100
-0518010005020100050b010005050100055b000105060100050201000502010205020100
-0500010105030102050301020505010005090601050e0202010302020517060207010602
-050b01000500010005020100050201000501010405020102050201010500010005030102
-050201040502010205030102050901000502010005020102050501000505010005030102
-050201000500010105030101050001000545000105060100050501000502010005010101
-05010100050101000502010005010100050201000504010005090601050e020201030202
-0516060207030602050a0100050001000502010005020100050301000503010005020100
-050101000500010005000100050101000502010005030100050601000502010005020100
-050801000502010005010100050201000504010005050100050501000502010105010100
-050101000501010105450001050601000509010005010100050201000501010005050100
-050201000504010005090601050e02020103020205150602070506020509010005000100
-050201000502010005030100050301000502010005010100050001000500010005050100
-050301000506010005020100050c01030502010005020100050401000505010005050100
-050201000502010005010100050201000545000105060100050601030501010005020100
-05010100050501040504010005090601050e020201030202051400020707000205070100
-050201000501010005020100050301000503010005020100050101000500010005000100
-05020103050301000506010005020100050c010005050100050201000504010005050100
-050501000502010005020100050101000502010005450001050601000502010005010100
-05020100050101000502010005010100050501000508010005090601050e020201030202
-051500020705000205080104050101000502010005030100050301000502010005010100
-05000100050001000501010005020100050301000506010005020100050c010005050100
-050201000504010005050100050501000502010005020100050101000502010005450001
-050601000502010005010100050201000501010005020100050101000502010005010100
-050201000504010005090601050e02020103020205160002070300020509010005020100
-050101000501010105030100050301000502010005010100050001000500010005010100
-050201000503010005060100050201000502010005080100050501000502010005040100
-050501000505010005020100050201000501010005010101054500010507010205030103
-050101000502010005020102050301020505010005090601050e02020103020205170002
-07010002050a010005020100050201010500010005040101050201020502010005000100
-050001000502010305040101050401000503010205090100050601020505010005050100
-05050100050201000502010005020101050001000545000105370601050e020201030202
-05180005057f01000545000105370601050e02020103020205190003057c010005020100
-0545000105370601050e020201030202051a0001057e01020546000105370601050e0202
-0103020205e5000105370601050e02020103020205e5000105370601050e020201030202
-05e5000105370601050e02020103020205e5000105370601050e02020103020205e50001
-05370601050e02020103020205e5000105370601050e02020103020205e500010639050e
-02020103020205e50000063a050e02020103020205ff053002020103020205ff05300202
-0103020205ff053002020103020205ff053002020103020205ff053002020103020205ff
-053002020103020205ff053002020103020205ff053002020103020205ff053002020103
-020205ff053002020103020205ff053002020103020205ff053002020103020205ff0530
-02020103020205ff053002020103020205ff053002020103020205ff0530020201030202
-05ff053002020103020205ff053002020103020205ff0530020201030202057601000534
-0100058202020103020205110103050a01020503010205090104050a010005200102050b
-0100052a0100050a010005810202010302020511010005020100050b010005050100050b
-0100050c010005220100050b0100052a0100050a01000581020201030202051101000502
-0100050201020505010005050100050b0100050301000500010105020104050201020502
-01000500010105020100050201000502010205050100050a010005050102050301020503
-010205030102050201000500010105030101050001000502010205050100050401010579
-020201030202051101000502010005010100050201000504010005050100050b01000503
-010105010100050301000503010005020100050101010501010005010100050201000501
-01000502010005040100050a010005040100050201000501010005020100050101000502
-010005010100050201000501010105010100050101000501010105010100050201000504
-01000504010105790202010302020511010305020100050201000504010005050100050b
-010005030100050201000503010005030100050201000501010005050100050201000505
-010005040100050a01000504010005050100050201000501010005050100050201000501
-010005020100050101000502010005010100050801000580020201030202051101000505
-0100050201000504010005050100050b0100050301000502010005030100050301040501
-010005060100050001000503010305040100050a01000505010205020104050101000505
-010005020100050101000502010005010100050201000502010205050100058002020103
-02020511010005050100050201000504010005050100050b010005030100050201000503
-010005030100050501000506010005000100050201000502010005040100050a01000508
-010005010100050501000505010005020100050101000502010005010100050201000505
-01000504010005800202010302020511010005050100050201000504010005050100050b
-010005030100050201000503010005030100050201000501010005070100050301000502
-010005040100050b01000503010005020100050101000502010005010100050201000501
-010005020100050101000502010005010100050101010501010005020100050301000505
-010105790202010302020511010005060102050501000505010005090104050101000502
-0100050401010502010205020100050701000504010305040100050b0100050401020503
-010205030102050301020502010005020100050201010500010005020102050401000505
-010105790202010302020576010005340100058202020103020205ff0530020201030202
-05ff053002020103020205ff053002020103020205ff053002020103020205ff05300202
-0103020205ff053002020103020205ff053002020103020205ff053002020103020205ff
-053002020103020205ff053002020103020205ff053002020103020205ff053002020103
-020205ff053002020103020205ff053002020103020205ff053002020103020205ff0530
-02020103020205ff053002020103020205ff0530020201030202056f0100050401020504
-010105b0020201030202056e01010503010005020100050201000501010005af02020103
-0202056d01000500010005070100050201000501010005af020201030202056f01000507
-0100050201000501010005af020201030202056f010005060100050301000501010005af
-020201030202056f010005050100050401000501010005af020201030202056f01000504
-0100050501000501010005af020201030202056f010005030100050601000501010005af
-020201030202056d0104050101040503010105b002020103020205ff0530020201030202
-05ff053002020103020205ff053002020103020205ff053002020103020205ff05300202
-01030202050d06ff0614050d020201030202050d06ff06130000050d020201030202050d
-06010856001d089b0001050d020201030202050d06010856001c0600089b0001050d0202
-01030202050d060108560001050b06000000050b0601089b0001050d020201030202050d
-060108560001050b06000000050b0601089b0001050d020201030202050d060108560001
-050b06000000050b0601089b0001050d020201030202050d060108560001050b06000000
-050b0601089b0001050d020201030202050d060108560001050b06000000050b0601089b
-0001050d020201030202050d060108560001050b06000000050b0601089b0001050d0202
-01030202050d060108560001050b06000000050b0601089b0001050d020201030202050d
-060108560001050b06000000050b0601089b0001050d020201030202050d060108560001
-050b06000000050b0601089b0001050d020201030202050d060108560001050b06000000
-050b0601089b0001050d020201030202050d060108560001050b06000000050b0601089b
-0001050d020201030202050d060108560001060c0000060d089b0001050d020201030202
-050d060108560000061c089b0001050d020201030202050d060100ff0012050d02020103
-0202050d060000ff0013050d02020103020205ff053002020103020205ff053002020103
-020205ff053002020103020205ff053002020103020205ff053002020103020205ff0530
-02020103020205ff053002020103020205ff053002020101000405ff0530000502020400
-05ff053000000202040000000202040005ff053000000202040000000202040005ff0530
-00000202040000000202040005ff053000000202040000000202040005ff053000000202
-0400000002020400000502ff022400060202040000000208040002ff0224000002080400
-00000208040002ff022400000208040000000208040001ff012400000208040000000409
-01ff012400000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 17 200 154
-%%EOF
diff --git a/lib/tv/doc/src/table_visualizer_chapter.xml b/lib/tv/doc/src/table_visualizer_chapter.xml
deleted file mode 100644
index 8b757f82f3..0000000000
--- a/lib/tv/doc/src/table_visualizer_chapter.xml
+++ /dev/null
@@ -1,658 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>1997</year><year>2012</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>The Table Visualizer</title>
- <prepared>EPK/TK Fredrik Gustafson</prepared>
- <responsible></responsible>
- <docno></docno>
- <approved>EPK/TK (Fredrik Gustafson)</approved>
- <checked></checked>
- <date>1998-01-19</date>
- <rev>C</rev>
- <file>table_visualizer.xml</file>
- </header>
- <warning>
- <p>
- The TV application has been superseded by the Observer application.
- TV will be removed in R16.
- </p>
- </warning>
- <p>The TV, TV, is a tool that enables the user to examine
- ETS and Mnesia tables on any (connected) node in the currently running Erlang
- system. Once a certain table has been opened in the tool, the content may be
- viewed in various levels of detail. The content may also be edited, as well as
- sorted, using any element as key. It is also possible to search for a specified object or
- element. The table may be polled anytime, either regularly, at specified
- intervals, or manually. New and deleted objects, as well as those altered, are
- marked with characteristic colours.</p>
- <p>Information about the table itself (permissions, storage type, and so on) may
- also be obtained.
- </p>
-
- <section>
- <title>Terminology and Background</title>
- <p>To avoid confusion, we have to distinguish between the <em>actual table</em>, i.e.,
- the data stored in ETS or Mnesia, and the <em>image of the table</em>, i.e., the
- data shown in the TV. The <em>image of the table</em> is simply a copy
- of the <em>actual table</em>, and can be manipulated in a number of ways, for example
- sorted. It follows that these manipulations in no way affects the <em>actual table</em>!</p>
- <p>The expression <em>poll the table</em> is used for the operation of scanning through the
- content of the actual table (in order to keep the image of the table consistent with the
- actual table).</p>
- <p>The ETS and Mnesia modules provides the user with the ability to store vast quantities
- of data in, the data organized as dynamic, unordered tables. The ETS
- facility stores <em>tuples</em>, while Mnesia stores <em>records</em>.
- Each tuple consists of one or more <em>elements</em>; each record consists of one or
- more <em>fields</em>. It should be noted that, since records are implemented as tuples,
- with the record name as the first element, the first field of a record becomes the second
- element in the corresponding tuple!
- <br></br>
-
- In the following, all table objects are mainly referred to as tuples, regardless of the
- table type.</p>
- <p>For further information about ETS and Mnesia, please see the manual pages and Mnesia User's Guide.</p>
- </section>
-
- <section>
- <title>Starting the TV</title>
- <p>The TV tool is started by giving the command</p>
- <pre>
- tv:start().
- </pre>
- <p>The window that appears, is hereafter referred to as <em>the TV main window</em>. It consists of:</p>
- <list type="bulleted">
- <item>
- <p>a <em>menubar</em>.</p>
- </item>
- <item>
- <p>a <em>grid</em>, i.e., a multicolumnar array, where tables existing on
- the current node is shown. Each square in the grid is called a <em>cell</em>.</p>
- </item>
- </list>
- <image file="tv_start.gif">
- <icaption>The TV Main Window at startup.</icaption>
- </image>
- <p>For each table, the following information is shown, in order:
- </p>
- <list type="bulleted">
- <item>
- <p>the <em>table name</em>. If the table is accessible through this name, as is the
- case with Mnesia tables and named ETS tables, the table name is shown in
- black, otherwise in medium grey.</p>
- </item>
- <item>
- <p>the <em>table identifier</em>, if there is one; since Mnesia tables are accessed
- solely through the table name, this cell will in those cases be blank.</p>
- </item>
- <item>
- <p>the <em>process identifier (PID) of the process owning the table</em>.</p>
- </item>
- <item>
- <p>the <em>name of the process owning the table</em>, provided the process
- is registered.</p>
- </item>
- <item>
- <p>the <em>table size</em>, i.e., the number of objects currently stored in
- the table.</p>
- </item>
- </list>
- </section>
-
- <section>
- <title>Changing View</title>
- <p>The TV will by default show currently existing ETS tables,
- but the user may easily switch to a Mnesia table view, by choosing the
- <em>Mnesia Tables</em> option in the <em>View</em> menu:
- </p>
- <image file="tv_start_mnesia.gif">
- <icaption>The TV Main Window, showing Mnesia tables.</icaption>
- </image>
- <p>Normally, system tables (i.e., tables used by system applications) and unreadable
- tables are not shown. The menu option <em>System Tables</em>, in the <em>Options</em>
- menu, makes the system tables visible:
- </p>
- <image file="tv_start_system.gif">
- <icaption>The TV Main Window, showing readable user and system tables.</icaption>
- </image>
- <p>Still unreadable tables are hidden, but the menu option <em>Unreadable Tables</em>,
- also in the <em>Options</em> menu, makes even those tables visible. It shall be noted
- that rows containing unreadable tables are shaded, using a grey colour:
- </p>
- <image file="tv_start_system_unreadable.gif">
- <icaption>The TV Main Window, showing both readable and unreadable user and system tables.</icaption>
- </image>
- <p>Once a table view has been opened, the user may choose how to view it: it may be sorted
- by the table names, by the table identifiers, by the process identifiers of the owner
- processes, or by the names of the owning processes. These sorting options are found in the
- <em>Options</em> menu.
- </p>
- <image file="tv_start_pid_sorted.gif">
- <icaption>The TV Main Window, tables sorted by owner PID.</icaption>
- </image>
- </section>
-
- <section>
- <title>Changing the Current Node</title>
- <p>By default, the Table Vizualizer will show tables residing on the node
- it was started from. However, the user may easily view tables on other nodes.
- By choosing the <em>Nodes</em> option, in the <em>File</em> menu, a window showing
- all connected nodes will appear. Clicking on any of the nodes in the list will cause
- the main window to immediately show the tables residing on the specified node:
- </p>
- <image file="tv_start_other_node.gif">
- <icaption>The Connected Nodes window, and the TV Main Window, showing tables on the selected node.</icaption>
- </image>
- </section>
-
- <section>
- <title>Opening a Table in the Table Browser</title>
- <p>Whenever a table shall be opened, the first step is to choose the corresponding
- <em>Table Name</em> or <em>Table ID</em> cell. Secondly, the <em>Open Table</em>
- menu item, in the <em>File</em> menu, has to be chosen. (Or, one may directly
- double-click on a <em>Table Name</em> or <em>Table Id</em> cell.)</p>
- <p>If the table selected table is readable, a window will appear after a short delay. This new
- window is hereafter denoted the <em>Table Browser</em> window. Should the table be
- unreadable, the Table Information window will appear instead (see further description
- below).
- </p>
-
- <section>
- <title>The Table Browser Window</title>
- <p>The Table Browser window consists of:</p>
- <list type="bulleted">
- <item>
- <p>a <em>menubar</em>.</p>
- </item>
- <item>
- <p>a <em>toolbar</em> with buttons providing shortcuts to the menubar options. If the
- cursor rests on any button, a so-called toolbar tip, explaining the button,
- will appear. <br></br>
-
- (In the picture below, the cursor has lingered on the <em>Open Table</em>
- button for a while.)</p>
- </item>
- <item>
- <p>a <em>content and edit field</em>, showing the content of a specified row or cell.
- Through this field the row, or cell, may also be edited (see below for a detailed
- description).</p>
- </item>
- <item>
- <p>a <em>grid</em>, i.e., a multicolumnar array, where the content of the
- opened table will be shown. (As above, each square in the grid is called a cell.</p>
- </item>
- </list>
- <image file="tv_table_browser.gif">
- <icaption>The Table Browser Window.</icaption>
- </image>
- <p>The successful appearance of the Table Browser window means that an image of
- the selected table has been created in the TV. It is this image
- that is shown in the Table Browser.
- </p>
-
- <section>
- <title>How Table Data Is Presented</title>
- <p>Each object in the table is presented on a row of its own in the grid.
- Each element in the object is presented in a cell of its own. <br></br>
-
- The colours on the <em>vertical</em> buttons to the left of the grid show the status
- of the object on that very row: a bright red colour indicates that the object just
- has been inserted (when the table is opened, all objects are regarded as being
- just inserted), while a bright green colour indicates that the object has been
- changed. The colour fades away, shade by shade, every time the actual table is polled,
- until the normal background colour is encountered. <br></br>
-
- When an object has been deleted, the colour of the corresponding
- <em>vertical button</em> turns to black. The next time the table is polled, the
- object will be removed from the grid.</p>
- <image file="tv_table_browser_updated.gif">
- <icaption>The Table Browser Window, with new, changed, and deleted objects.</icaption>
- </image>
- <p>Normally, new objects are placed at the end of the grid, while all other objects
- maintain their positions between successive polls. However, when sorting mode has
- been ordered, all objects, even new ones, are placed at the correct position
- according to the sorting ordered (see also below).</p>
- <p>Immediately above the <em>horizontal buttons</em>, one or more <em>keys</em> may
- appear. These keys indicates which elements that are used as indices in the
- ETS/Mnesia table, i.e., which fields that are used by ETS/Mnesia as search keys when
- looking up data.</p>
- <p>The grid columns may be resized, by clicking and dragging on the small black <em>resize areas</em> between any two horizontal buttons.</p>
- <p>The rows are enumerated, as a help when navigating through the table. Note: it shall
- not be assumed that these numbers correspond to the placement of the objects in the
- <em>actual table</em>! The row numbers, as presented in the TV, are
- only temporary, and only valid within the TV!
- <br></br>
-
- The number on the <em>vertical scrollbar</em> corresponds to the number the
- uppermost row has (or will have).</p>
- <p>The number shown on the horizontal scrollbar relates to the leftmost column shown.</p>
- </section>
-
- <section>
- <title>How to Poll the Table</title>
- <p>The table is polled whenever the <em>Poll Table</em> option in the <em>Options</em>
- menu is chosen (or the <em>Poll Table</em> toolbar button is pressed). <br></br>
-
- The user may also choose to let the TV poll the table at regular
- intervals. This is done via the <em>Set Poll Interval...</em> option in the
- <em>Options</em> menu, which causes the <em>Set Poll Interval window</em> to appear. </p>
- <p>In the Set Poll Interval window the user selects whether manual or automatic
- polling shall be used, and, in the automatic polling case, the poll interval.</p>
- <image file="set_poll_int.gif">
- <icaption>The Set Poll Interval Window.</icaption>
- </image>
- <p>It shall be noted that, in the case of a large table (or a slow computer/operating
- system), a short poll interval may cause the TV to be flooded, i.e., the
- data resulting from one poll has not been fully treated and presented when the data from
- the next poll arrives. The user is therefore kindly requested to use the automatic
- polling facility with care!</p>
- </section>
-
- <section>
- <title>How to Edit Objects in the Table</title>
- <p>Provided that the table is writable for other processes than the owning process,
- the user may insert, change and delete objects.</p>
- <p>To <em>delete</em> an object, the corresponding row, or a single cell in the
- corresponding row, has to be chosen, by clicking either on the vertical button
- to the left of the row, or on a cell. Thereafter the <em>Delete Object</em>
- option in the <em>Edit Menu</em>
- is chosen. (Should the user regret the delete operation, the row may once again
- be selected, whereupon the <em>Return</em> button simply is pressed.)</p>
- <p>To <em>insert</em> an object, the user may use the <em>Record Editor</em>, or simply
- enter the object in the content and edit field, and then press the <em>Return</em>
- button. <br></br>
-
- The <em>Record Editor</em> is started via the <em>Edit Object</em> option in the
- <em>Edit</em> menu, or via the <em>Edit Object</em> toolbar button. The editor that
- appears looks different depending on the kind of table: for Mnesia tables,
- a writable field is shown for each record entry, as well as the name of the entry.
- For ETS tables, only a writable field is shown; this is due to the fact that the
- size of the tuples inserted in ETS tables may vary, whereas the size of the records
- inserted in a Mnesia table (more or less) is fixed.
- One may select the next field in the record editor by pressing
- the 'Tab' (or 'Arrow Down') button, and select the previous field by pressing
- 'Shift'+'Tab' (or 'Arrow Up'). <br></br>
-
- When the editing is finished, the <em>OK</em> button may be clicked, or
- 'Return' pressed. The TV will then try to insert the new object.
- </p>
- <image file="tv_record_editor_mnesia.gif">
- <icaption>The Record Editor (shown for a Mnesia table).</icaption>
- </image>
- <p>To <em>change</em> an already existing object, the corresponding row, or a single cell
- in the corresponding row, has to be selected first (see below). Then one may edit the
- whole object (or the selected field in the object), either using the record editor
- or the content and edit field, whereupon 'Return' may be pressed (or the 'OK' button
- clicked).
- </p>
- <p>It shall be noted that it is hard to edit objects containing
- <em>process identifiers</em>, <em>references</em>, <em>binaries</em> and <em>ports</em>,
- since it is only a textual representation of these terms that is shown on the screen.
- It is in the general case impossible for the TV to correctly
- convert this textual representation back to the original term. As a courtesy to
- the user, an attempt to do this will nevertheless be done if the edited field
- consists of a single process identifier; however, this conversion will only be
- correct provided
- that the process identifier originates from the current Erlang session. (On
- the other hand, why on earth should any user want to store old process identifiers?)
- </p>
- <p>It shall also be noted that it may be more or less confusing to edit the table,
- depending on whether the table type is <em>set</em>, <em>bag</em>, or
- <em>duplicate_bag</em>, i.e., depending on whether or not objects having the
- same key (or even duplicate objects) are allowed. Please study the ETS or Mnesia
- manual pages, should confusion arise!
- </p>
- </section>
-
- <section>
- <title>How to Search For Objects</title>
- <p>One may search for an object, by choosing the <em>Search Object</em>
- option in the <em>Options</em> menu (or by pressing the <em>Search Object</em>
- toolbar button). In the <em>Search Object window</em> that appears, any valid
- Erlang term or regular expression may be entered, whereupon all objects
- containing (or consisting of) this term, or matching the regular expression,
- will be shown.</p>
- <image file="tv_search_window.gif">
- <icaption>The Search Object Window.</icaption>
- </image>
- <p>In the search result list, by clicking on any object, the Table Browser will
- immediately scroll to the corresponding row in the table shown. This enables
- the user to in a very powerful way quickly find the objects he's interested in.</p>
- <image file="tv_search_result.gif">
- <icaption>The Search Object Window interworking with the Table Browser.</icaption>
- </image>
- </section>
-
- <section>
- <title>How to Mark Table Data</title>
- <p>One may mark a row or a column by clicking on the buttons to the left and above
- the grid, respectively. A single cell is marked by clicking on it. Even empty
- rows and columns may be marked; an empty cell cannot be marked - on the contrary,
- by clicking on an empty cell, all marks are removed.</p>
- <p>Marks are indicated by a cyan blue colour.</p>
- <image file="tv_row_marked.gif">
- <icaption>The TV Main Window: a row has been marked.</icaption>
- </image>
- <p>When a row or a cell has been marked, the content will be shown in the content field,
- together with an indication of the row (and column when applicable) the marked area
- corresponds to. Should the object be very big, only a fraction of it may be shown in
- this field. By clicking on the down-arrow button to the right of the content and
- edit field, a pop-up content field will be shown, where the whole marked object
- may be viewed. The content of this pop-up field may be marked and copied to
- other windows; however, this field cannot be edited.</p>
- <image file="tv_row_marked_popup.gif">
- <icaption>The Table Browser: the pop-up content field.</icaption>
- </image>
- <p>It shall be noted that the user may choose whether lists shall be shown as
- strings or lists; this is done via the <em>View</em> menu.
- </p>
- <p>A marked column may be subject to sorting, see below. When sorting is ordered,
- marks are removed at each polling of the table (because of the difficulties to
- keep track of a certain object, or element, in this case).</p>
- </section>
-
- <section>
- <title>How to Sort Table Data</title>
- <p>The image of the table may be sorted in rising or falling order, using any element as
- sorting key. The element desired is chosen by marking the corresponding column, and
- then choose (either via the <em>Options</em> menu, or via the toolbar buttons) any
- of the sorting options available, i.e., sorting in ascending or descending order.
- The colour of the column button will then change to gold, to indicate that this
- column is the basis for the sorting currently chosen.</p>
- <p>Should no column have been marked, when sorting is ordered, the first element in each
- object (i.e, tuple) will be used as sorting key if the table is an ETS table; the
- second element (i.e., the first field in the record) will be used if the table is a
- Mnesia table.</p>
- <p>Even columns with no elements in them may be subject to sorting. In this case the
- whole object is used as the sorting key.</p>
- <p>When sorting is ordered, new elements will be inserted according to the current
- sorting mode. When the sorting is interrupted (via the <em>No Sorting</em> option),
- the current image of the table keep the current order, but new elements will from
- now on once again be inserted at the end of the image of the table.</p>
- </section>
-
- <section>
- <title>How to Obtain Table Information</title>
- <p>Information about the actual table is obtained via the <em>File</em> menu (or via the
- <em>Table Info</em> toolbar button). The information is printed in a separate window,
- with similar pieces of information grouped together on "flap cards" of their own.
- By clicking on a flap, the information on the corresponding card is made visible.</p>
- <image file="info_window.gif">
- <icaption>The Table Information Window, showing information about a Mnesia table.</icaption>
- </image>
- <p>The Table Information window may also be opened from the TV Main
- Window, by selecting a table and then choose the <em>Table Info</em> option
- in the <em>File</em> menu (or by double-clicking on the <em>Table Size</em>
- field.</p>
- <p>Note: The Table Information window will automatically be opened if the user tries
- to open an unreadable table, since this is the only information available in this
- case.</p>
- </section>
- </section>
-
- <section>
- <title>The Table Browser Menus</title>
- <p>The Table Browser offers the following menus:</p>
- <p></p>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Table Info</em></tag>
- <item>
- <p>Opens the Table Information window, which shows the available information
- about the current table. </p>
- </item>
- <tag><em>Close</em></tag>
- <item>
- <p>Closes the Table Browser window.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The Edit Menu</title>
- <taglist>
- <tag><em>Edit Object...</em></tag>
- <item>
- <p>Opens the Record Editor. If an object is marked, it will be shown in
- the Record Editor.</p>
- </item>
- <tag><em>Delete Object</em></tag>
- <item>
- <p>Deletes a marked object.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The View Menu</title>
- <taglist>
- <tag><em>Lists As Lists</em></tag>
- <item>
- <p>Causes lists in the table to be shown as lists.</p>
- </item>
- <tag><em>Lists As Strings</em></tag>
- <item>
- <p>Causes lists in the table to be shown as strings.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The Options Menu</title>
- <taglist>
- <tag><em>Poll Table</em></tag>
- <item>
- <p>An explicit order to poll the table, i.e., to scan the content.</p>
- </item>
- <tag><em>Poll Interval...</em></tag>
- <item>
- <p>Choose between manual and automatic polling. In the case of automatic
- polling, the user gets the opportunity to choose the polling interval.</p>
- </item>
- <tag><em>Search Object</em></tag>
- <item>
- <p>Enables search for objects containing (or consisting of) a specified
- Erlang term, or matching a regular pattern. The search result may be used
- for quick navigation in the table.</p>
- </item>
- <tag><em>Sort Ascending Order</em></tag>
- <item>
- <p>Shows the table content sorted in ascending (i.e., rising) order.
- New objects will be shown with correct placement as long the as the sorting
- is going on. <br></br>
-
- Please note that it is only the image of the table that is affected,
- <em>not</em> the table itself!</p>
- </item>
- <tag><em>Sort Descending Order</em></tag>
- <item>
- <p>Shows the table content sorted in descending (i.e., falling) order.
- New objects will be shown with correct placement as long the as the
- sorting is going on.</p>
- </item>
- <tag><em>No Sorting</em></tag>
- <item>
- <p>Sorting mode is left. New objects will be shown last in the
- table. However, older objects will remain in the position they had when
- the sorting mode was left, i.e., their placement will not reflect their
- actual placement in the ETS/Mnesia table.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The Help Menu</title>
- <taglist>
- <tag><em>Help</em></tag>
- <item>
- <p>Shows the help (about TV usage) that is available.
- (The help will be shown in the Netscape Internet browser, if available.)</p>
- </item>
- <tag><em>OTP Documentation</em></tag>
- <item>
- <p>Shows the Documentation about all OTP components that is available
- in the local installation of OTP.</p>
- </item>
- </taglist>
- </section>
- </section>
- </section>
-
- <section>
- <title>Tracing the Owner Process</title>
- <p>The process owning the table may easily be traced, by selecting either
- the <em>Owner Pid</em> or the <em>Owner Name</em> field, and then choosing
- the <em>Trace Process</em> option in the <em>File</em> menu. <br></br>
-
- (It is also possible to double-click on any of these fields.)</p>
- </section>
-
- <section>
- <title>Creating a New Table</title>
- <p>A new table may easily be created using the <em>New Table window</em>.
- Currently only ETS tables may be created. Since ETS tables
- dies together with the parent process, a special process, registered
- as <em>tv_table_owner</em>, will be the owner of tables created this way.
- This process will not be affected by any termination of the TV,
- i.e., the ETS tables created will live on until they are explicitly killed.
- </p>
- <image file="tv_create_table.gif">
- <icaption>The New Table Window, enabling easy creation of ETS tables.</icaption>
- </image>
- <p>Note: the <em>tv_table_owner</em> is local to each node, meaning
- that the creation of a table on a new node also will start such a process
- on that node. This way only the tables on a specific node dies, should that
- specific node crash.</p>
- </section>
-
- <section>
- <title>The TV Main Window Menus</title>
- <p>The Main Window offers the following menus:</p>
- <p></p>
-
- <section>
- <title>The File Menu</title>
- <taglist>
- <tag><em>Open Table</em></tag>
- <item>
- <p>Open a selected table in a new Table Browser.</p>
- </item>
- <tag><em>New Table</em></tag>
- <item>
- <p>Open the New Table window, enabling easy creation of ETS tables.</p>
- </item>
- <tag><em>Table Info</em></tag>
- <item>
- <p>Opens the Table Information window, showing the available
- information about a selected table. </p>
- </item>
- <tag><em>Nodes...</em></tag>
- <item>
- <p>Open the Connected Nodes window, enabling the user to view
- tables residing on remote nodes.</p>
- </item>
- <tag><em>Trace Process</em></tag>
- <item>Opens a trace window, where the process owning a selected table can
- be traced.</item>
- <tag><em>Exit</em></tag>
- <item>
- <p>Terminates the TV.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The View Menu</title>
- <taglist>
- <tag><em>ETS Tables</em></tag>
- <item>
- <p>Shows ETS tables on the current node.</p>
- </item>
- <tag><em>Mnesia tables</em></tag>
- <item>
- <p>Shows Mnesia tables on the current node.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The Options Menu</title>
- <taglist>
- <tag><em>Refresh</em></tag>
- <item>
- <p>An explicit order to once again check the current node for existing
- tables, and list them.</p>
- </item>
- <tag><em>Unreadable Tables</em></tag>
- <item>
- <p>Option to choose whether or not unreadable tables shall be shown.</p>
- </item>
- <tag><em>System Tables</em></tag>
- <item>
- <p>Option to choose whether or not system tables shall be shown.</p>
- </item>
- <tag><em>Sort by Name</em></tag>
- <item>
- <p>Shows the tables sorted by their names.</p>
- </item>
- <tag><em>Sort by Id</em></tag>
- <item>
- <p>Shows the tables sorted by their table identifiers.</p>
- </item>
- <tag><em>Sort by Owner PID</em></tag>
- <item>
- <p>Shows the tables sorted by the process identifiers of the owning
- processes.</p>
- </item>
- <tag><em>Sort by Owner Name</em></tag>
- <item>
- <p>Shows the tables sorted by the registered names of the owning processes.</p>
- </item>
- <tag><em>Error Messages in Haiku</em></tag>
- <item>
- <p>Option to choose whether or not error messages shall be shown
- in the Japanes poetry style called <em>Haiku</em>.</p>
- </item>
- </taglist>
- </section>
-
- <section>
- <title>The Help Menu</title>
- <taglist>
- <tag><em>Help</em></tag>
- <item>
- <p>Shows the help (about TV usage) that is available.
- (The help will be shown in the Netscape Internet browser, if available.)</p>
- </item>
- <tag><em>OTP Documentation</em></tag>
- <item>
- <p>Shows the Documentation about all OTP components that is available
- in the local installation of OTP.</p>
- </item>
- </taglist>
- </section>
- </section>
-</chapter>
-
-
diff --git a/lib/tv/doc/src/tv.gif b/lib/tv/doc/src/tv.gif
deleted file mode 100644
index d78cf7d8ed..0000000000
--- a/lib/tv/doc/src/tv.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv.xml b/lib/tv/doc/src/tv.xml
deleted file mode 100644
index 05dd60b34a..0000000000
--- a/lib/tv/doc/src/tv.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE erlref SYSTEM "erlref.dtd">
-
-<erlref>
- <header>
- <copyright>
- <year>1997</year>
- <year>2012</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>tv</title>
- <prepared>Fredrik Gustafson</prepared>
- <responsible></responsible>
- <docno></docno>
- <approved></approved>
- <checked></checked>
- <date>1997-11-17</date>
- <rev>1.0</rev>
- <file>table_visualizer.sgml</file>
- </header>
- <module>tv</module>
- <modulesummary>TV graphically examines ETS and Mnesia tables. </modulesummary>
- <description>
- <warning>
- <p>
- The TV application has been superseded by the Observer application.
- TV will be removed in R16.
- </p>
- </warning>
- <p>TV enables the user to examine ETS and Mnesia tables. Once
- a certain table has been opened in the tool, the content may be viewed at
- various levels of detail. The content viewed may also be sorted, using any
- element as key. The table may be polled anytime; either regularly at
- specified intervals, or manually. New and deleted objects, as well as those
- altered, are marked with characteristic colors. </p>
- </description>
- <funcs>
- <func>
- <name>start() -> Pid</name>
- <fsummary>Start TV.</fsummary>
- <type>
- <v>Pid = pid() </v>
- </type>
- <desc>
- <p><c>start/0</c> starts the TV. </p>
- </desc>
- </func>
- </funcs>
-
- <section>
- <title>See Also</title>
- <p>For a complete description of the TV, please
- see the TV User's Guide. </p>
- </section>
-</erlref>
-
-
diff --git a/lib/tv/doc/src/tv_create_table.gif b/lib/tv/doc/src/tv_create_table.gif
deleted file mode 100644
index 7fae7f30cf..0000000000
--- a/lib/tv/doc/src/tv_create_table.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_create_table.ps b/lib/tv/doc/src/tv_create_table.ps
deleted file mode 100644
index 0a3b24bcf5..0000000000
--- a/lib/tv/doc/src/tv_create_table.ps
+++ /dev/null
@@ -1,1120 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_create_table.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:14:11 2001)
-%%BoundingBox: 0 114 250 471
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 114 250 471
-userdict begin
-%%BeginData:
-DisplayImage
-0 114
-250.000000 357.000000
-12
-410 585
-1
-0
-0
-8
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-aa2455
-999999
-000a01ff0183000b0208040001ff018300000208040000000208040002ff028300000208
-0400000002080400020000ff0080040002000000020804000000020204060200000004ff
-0480020000000405020204000000020204000209000d02ff027700000202040000000202
-040002080000020d0400025e010302110103028d01010206010102640000020204000000
-0202040002080000020d0400025e01010202010702000101020301010201010102100103
-02180100020f010202020100021901050200010702010103020601070209010102060101
-026400000202040000000202040002080000020d0400025e010102050101020301010203
-010102010101020f01010201010102160101020f01020202010002190101020701010203
-01010201010102080101020c010102060101026400000202040000000202040002080000
-0202040602030400025e010102050101020301010203010102010101020e010102050101
-020001010201010302030103020101040201010302070100020001010201010002020103
-0202010102050101020501010207010102030101020c0101020401030203010102000101
-0203010102020103025d0000020204000000040302080000020204000304000002030400
-025e010102050101020401010202010002020101020e0101020501010200010102000101
-020101010201010102010101020101010202010102010101020601000200010102010100
-0201010102010101020101010201010102010101020501010207010102030102020b0101
-02030101020101010202010202000101020201010201010102010101025c000004030101
-020b0000020304000302000002040400025e010102050101020401010201010102020101
-020e01010205010202020101020101010205010102010101020201010201010102060100
-020001020200010002010101020101010202010102000101020001010206010402040101
-0204010302090101020701010202010102010101020201010201010102010101025f0103
-020b0000020304000302000002040400025e010102050101020501010200010002030101
-020e01010205010102030105020201040201010102020105020601000201010102000100
-020101050202010102000101020001010206010102070101020601020208010102040104
-02020101020101010202010102010105025f0103020b0000020404000300000002050400
-025e0101020501010205010302030101020e010102050101020301010205010102010101
-0201010102020101020a0100020201020201010102060107020601010207010102070101
-0208010102030101020101010202010102010101020201010201010102630103020b0000
-020404000300000002050400025e0101020501010206010102040101020f010102020100
-020001010203010102020100020101010201010102010101020201010202010002060100
-020201020201010102020100020301010201010102070101020701010203010102010101
-0208010102030101020101010202010102010101020201010201010102020100025f0103
-020b00000205000002060400025e01010205010102060101020401010210010302010101
-020401030203010202000101020101020201010302070100020301010202010302040101
-020101010207010502030101020401030209010102040102020001010201010402030101
-0202010302600103020b0000020d0400025e01030211010302ff02000103020b0000020d
-040002ff02790103020b0000020d040002ff02790103020c040d02ff027a010302ff0295
-010302ff02950103020200ff008e0400020201030202000004ff048e0202010302ff0295
-010302020500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000020201030202000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c0100050002020103020205000000056f07ff070e050d
-01000202010302020000057007ff070d0000050c0100050002020103020205000000056f
-070100ff000c050d010002020103020200000570070100ff000c050c0100050002020103
-020205000000056f070100ff000c050d010002020103020200000570070100ff000c050c
-0100050002020103020205000000056f070100ff000c050d010002020103020200000570
-070100040100002001000030010000b2050c0100050002020103020205000000050a0100
-05020100050c0100055107010004010000130100000a0100000001000018010200130100
-00b2050d01000202010302020000050b010105010100050c01000551070100030100001f
-010000020100001901000012010000b3050c0100050002020103020205000000050a0101
-050101000502010205030101050001000502010205040101054407010002010000040101
-000001000003010200030102000201000000010100020100000001020001010100000100
-000301020002010000000101000501000003010200020100000201000002010000b4050d
-01000202010302020000050b010005000100050001000501010005020100050101000501
-010105010100050201000503010105440701000801000000010000000100000101000002
-010000040100000201010001010000010100000001000000010000010100000001000000
-010000010100000201000001010100010100000401000002010000020100000101000002
-010000b8050c0100050002020103020205000000050a0100050001000500010005010100
-0502010005010100050201000501010005020100054a0701000801000000010000000100
-000501000004010000020100000201000001010000000100000001000001010000000100
-000001000005010000010100000801000002010000020100000201000001010000b8050d
-01000202010302020000050b010005010101050101000502010005010100050201000501
-0104054a0701000801000000010000000100000201030004010000020100000201000001
-010000000102000101000000010000000100000201030001010000080100000201040002
-01000001010000b8050c0100050002020103020205000000050a01000501010105010100
-05020100050101000502010005010100054e070100080100000001000000010000010100
-000201000004010000020100000201000001010000050100000001000000010000010100
-00020100000101000008010000020100000701000000010000b8050d0100020201030202
-0000050b0100050201000501010005020100050101000501010105010100050201000503
-010105440701000801000000010000000100000101000002010000040100000201000002
-010000020100000101000001010000000100000001000001010000020100000101000008
-010000020100000201000003010100b9050c0100050002020103020205000000050a0100
-050201000502010205030101050001000502010205040101054407010008010000000100
-000001000002010300040100000201000002010000030101000201000000010000000100
-000201030001010000080100000301020005010000b9050d010002020103020200000570
-07010051010000b9050c0100050002020103020205000000056f0701004e010000000100
-00ba050d0100020201030202000005700701004f010000bb050c01000500020201030202
-05000000056f070100ff000c050d010002020103020200000570070100ff000c050c0100
-050002020103020205000000056f070100ff000c050d0100020201030202000005700701
-00ff000c050c0100050002020103020205000000056f070100ff000c050d010002020103
-020200000570070000ff000d050c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-056d01ff0112050b01000202010302020000056e01ff0112050a01000500020201030202
-05000000056d010107ff070e0101050b01000202010302020000056e010107ff070d0000
-0101050a0100050002020103020205000000056d0101070100ff000c0101050b01000202
-010302020000056e0101070100ff000c0101050a0100050002020103020205000000056d
-0101070100ff000c0101050b01000202010302020000056e010107010000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-00d20101050a0100050002020103020205000000056d010107010337010100d20101050b
-01000202010302020000056e0101070100000336010100d20101050a0100050002020103
-020205000000050a0104050801000506010205490101070103180100030a010003060102
-0307010100d20101050b01000202010302020000050d0100050a01000508010005490101
-0701000003170100030a0100030801000307010100d20101050a01000500020201030202
-05000000050c010005040102050201000500010105050100050301020509010005000101
-050301020502010105000100050301020504010105180101070103010101030001000302
-0100030201000308010403020102030201000300010103050100030301020300010100d2
-0101050b01000202010302020000050d0100050301000502010005010101050101000504
-010005020100050201000508010105010100050101000502010005010100050001000500
-010005010100050201000503010105180101070100000300010003000100030001000301
-010003020100030a01000303010003020100030101010301010003040100030201000302
-010200d20101050a0100050002020103020205000000050c010005070100050101000502
-010005040100050201000502010005080100050201000505010005010100050001000500
-01000501010005020100051e010107010301010003000100030001000302010003010100
-030a010003070100030101000302010003040100030201000302010200d20101050b0100
-0202010302020000050d0100050401030501010005020100050401000502010405080100
-050201000502010305010100050001000500010005010104051e01010701000003000100
-03000100030001000302010003010100030a010003040103030101000302010003040100
-0302010600d20101050a0100050002020103020205000000050c01000503010005020100
-05010100050201000504010005020100050c010005020100050101000502010005010100
-050001000500010005010100052201010701030101000300010003000100030301000300
-0100030a01000303010003020100030101000302010003040100030201000303010100d2
-0101050b01000202010302020000050d0100050301000502010005010101050101000504
-010005020100050201000508010005020100050101000502010005010100050001000500
-010005010100050201000503010105180101070100000300010003000100030001000303
-0101030b01000303010003020100030101010301010003040100030201000302010200d2
-0101050a0100050002020103020205000000050c01000504010305010100050001010505
-010005030102050901000502010005020103050101000500010005000100050201020504
-010105180101070103010100030001000300010003040100030c01010302010303010100
-0300010103050100030301020300010100d20101050b01000202010302020000056e0101
-07010000030a0100030101050322010100d20101050a0100050002020103020205000000
-056d010107010308010003000100032b010100d20101050b01000202010302020000056e
-01010701000003080100032c010100d20101050a0100050002020103020205000000056d
-010107010300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-03000100030001000300010000d20101050b01000202010302020000056e0101070100ff
-000c0101050a0100050002020103020205000000056d0101070100ff000c0101050b0100
-0202010302020000056e0101070100ff000c0101050a0100050002020103020205000000
-056d0101070100ff000c0101050b01000202010302020000056e0101070000ff000d0101
-050a0100050002020103020205000000056d01ff0112050b01000202010302020000056e
-01ff0112050a010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c01000500020201030202050000000570000005000000050000000500000005000000
-0508010005020100051a0100050a0100050a01000506010205c601000202010302020000
-0570000005000000050000000500000005000000050001000507010105010100051a0100
-050a0100050a01000508010005c501000500020201030202050000000570000005060100
-050801010501010005020102050201010500010005030102050301010500010005080104
-050201020502010005000101050501000503010205bf0100020201030202000005700000
-050801000507010005000100050001000501010005020100050101000500010005000100
-05010100050201000501010005010101050a010005030100050201000501010105010100
-05040100050201000502010005bd01000500020201030202050000000570000005060100
-050801000500010005000100050501000501010005000100050001000501010005020100
-0501010005020100050a0100050701000501010005020100050401000502010005020100
-05be01000202010302020000057000000508010005070100050101010502010305010100
-0500010005000100050101040501010005020100050a0100050401030501010005020100
-050401000502010405bd0100050002020103020205000000057000000506010005080100
-050101010501010005020100050101000500010005000100050101000505010005020100
-050a010005030100050201000501010005020100050401000502010005c2010002020103
-020200000570000005080100050701000502010005010100050201000501010005000100
-0500010005010100050201000501010005010101050a0100050301000502010005010101
-0501010005040100050201000502010005bd010005000202010302020500000005700000
-050601000508010005020100050201030501010005000100050001000502010205030101
-05000100050b0101050201030501010005000101050501000503010205bf010002020103
-0202000005700000050001000500010005000100050001000500010005ff051001000500
-02020103020205000000057001000500010005000100050001000500010005ff05120100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100020201030202000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050002020103
-020205000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000202010302020000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-0000050000000500000005000000050000000500000005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c0100050002020103020205000000050a010405ff
-057c01000202010302020000050d010005ff057d0100050002020103020205000000050c
-010005030100050201000501010005000101050301020504010105ff0561010002020103
-02020000050d010005030100050201000501010105010100050101000502010005030101
-05ff05600100050002020103020205000000050c01000504010005010100050101000502
-0100050101000502010005ff056701000202010302020000050d01000504010005010100
-05010100050201000501010405ff05660100050002020103020205000000050c01000505
-01000500010005010100050201000501010005ff056b01000202010302020000050d0100
-05050101050201010501010005010100050201000503010105ff05600100050002020103
-020205000000050c0100050601000502010005000101050301020504010105ff05610100
-0202010302020000051501000502010005ff057101000500020201030202050000000511
-0100050001000503010005ff057201000202010302020000051301000504010005ff0571
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005440100
-0567000005670000057401000500020201030202050000000542010005000100051d0100
-0546000005000000050d0100055600000500000005110100051001020505010005120100
-05110100051f01000202010302020000054201000500010005000100051c010005450000
-0500000005000000050c0100055500000500000005000000051001000512010005190100
-05110100051e01000500020201030202050000000540010005000100060105000100050c
-01020503010205020104054200000500000005020000050b010005000101050301020503
-010105000100054200000500000005020000050c01010500010005010100050201000501
-010005000101050501000503010205030102050301020502010405020102050901000500
-0101050301020503010105000100050d0100020201030202000005400100050001000603
-05000100050a010005020100050101000502010005030100054300000500000005040000
-050a01010501010005010100050201000501010005010101054100000500000005040000
-050a01000501010105010100050201000501010105010100050401000505010005020100
-050201000501010005020100050301000503010005020100050801010501010005010100
-050201000501010005010101050c0100050002020103020205000000053e010005000100
-060505000100050901000505010005020100050301000542000005000000050600000509
-010005020100050501000501010005020100054000000500000005060000050901000502
-010005010100050201000501010005020100050401000505010005020100050901000503
-010005030100050201000508010005020100050501000501010005020100050d01000202
-010302020000053e00000500000006070500000005090102050201040503010005410100
-05000100050801000508010005020100050201030501010005020100053f010005000100
-050801000508010005020100050101000502010005010100050201000504010005050100
-050201000506010305030100050301040508010005020100050201030501010005020100
-050c0100050002020103020205000000053e000005000000060505000000050d01000501
-010005070100054201000500010005060100050901000502010005010100050201000501
-010005020100054001000500010005060100050901000502010005010100050201000501
-01000502010005040100050501000502010005050100050201000503010005030100050c
-01000502010005010100050201000501010005020100050d010002020103020200000540
-000005000000060305000000050a01000502010005010100050201000503010005430100
-0500010005040100050a0101050101000501010005020100050101000501010105410100
-0500010005040100050a0100050101010501010005010101050101010501010005040100
-050501000502010005020100050101000502010005030100050301000502010005080101
-0501010005010100050201000501010005010101050c0100050002020103020205000000
-0540000005000000060105000000050c0102050301020505010105420100050001000502
-0100050b010005000101050301030502010105000100054201000500010005020100050c
-010105000100050201010500010005010100050001010505010005050100050301020503
-010305040101050201020509010005000101050301030502010105000100050d01000202
-010302020000054200000500000005000000056301000500010005000100051e01000543
-01000500010005000100051a0100052e010505130100050c010005000202010302020500
-000005420000050000000565010005000100051b0100050201000544010005000100051b
-01000544010005020100050d010002020103020200000544000005670100051d01020546
-0100051c010005450102050d010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-0000050a010305120100051301000506010005ff054c01000202010302020000050b0100
-05020100051101000513010005ff05530100050002020103020205000000050a01000502
-010005010100050001010503010205020104050201020503010205020104050201020503
-010205020100050001010504010105ff053701000202010302020000050b010005020100
-050101010501010005010100050201000503010005030100050201000501010005020100
-0503010005060100050201000502010005010101050101000503010105ff053601000500
-02020103020205000000050a010305020100050501000502010005030100050301000502
-01000501010005070100050601000502010005020100050101000502010005ff053d0100
-0202010302020000050b0100050501000505010005020100050301000503010405010100
-05070100050601000502010005020100050101000502010005ff053c0100050002020103
-020205000000050a01000505010005050100050201000503010005030100050501000507
-0100050601000502010005020100050101000502010005ff053d01000202010302020000
-050b01000505010005050100050201000503010005030100050201000501010005020100
-0503010005060100050201000502010005010100050201000503010105ff053601000500
-02020103020205000000050a010005050100050601020505010105020102050301020505
-0101050401000503010205020100050201000503010105ff053701000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005440100
-0567000005670000057401000500020201030202050000000542010005000100051b0100
-050601020505010005370000050000000524010005130100050e0100051a000005000000
-051e010005120100054001000202010302020000054201000500010005000100051a0100
-05080100053d000005000000050000000523010005130100050e01000519000005000000
-0500000005310100053f0100050002020103020205000000054001000500010006010500
-0100050b0100050001010502010005020100050101000500010105050100050301020503
-0102052e00000500000005020000050b0100050001010502010005000101050301020502
-010405020102050301020502010405020102050301010500010005180000050000000502
-0000050b0100050001010502010005000101050301020502010005020100050201020502
-0104050201020538010002020103020200000540010005000100060305000100050a0101
-050101000501010005020100050101010501010005040100050501000502010005020100
-052c00000500000005040000050a01010501010005010101050101000501010005020100
-050301000503010005020100050101000502010005030100050301000502010005010100
-05010101051700000500000005040000050a010105010100050101010501010005040100
-050201000502010005010100050201000503010005030100050201000536010005000202
-0103020205000000053e0100050001000605050001000509010005020100050101000502
-01000501010005020100050401000505010005020100052f000005000000050600000509
-010005020100050101000505010005020100050301000503010005020100050101000507
-010005030100050201000501010005020100051600000500000005060000050901000502
-010005010100050801000502010005020100050501000503010005030100050201000537
-01000202010302020000053e000005000000060705000000050801000502010005010100
-050201000501010005020100050401000505010005020100052e01000500010005080100
-050801000502010005010100050501000502010005030100050301040501010005070100
-050301040501010005020100051501000500010005080100050801000502010005010100
-050801000503010005000100050301030503010005030104053601000500020201030202
-05000000053e000005000000060505000000050901000502010005010100050201000501
-010005020100050401000505010005020100052f01000500010005060100050901000502
-010005010100050501000502010005030100050301000505010005070100050301000505
-010005020100051601000500010005060100050901000502010005010100050801000503
-01000500010005020100050201000503010005030100053b010002020103020200000540
-000005000000060305000000050a01010501010005010100050101010501010105010100
-05040100050501000502010005020100052c01000500010005040100050a010105010100
-050101000505010005020100050301000503010005020100050101000502010005030100
-05030100050201000501010005010101051701000500010005040100050a010105010100
-050101000508010005040100050301000502010005030100050301000502010005360100
-0500020201030202050000000540000005000000060105000000050b0100050001010503
-0101050001000501010005000101050501000505010005030102052e0100050001000502
-0100050b0100050001010502010005060102050501010502010205030102050501010502
-01020503010105000100051801000500010005020100050b010005000101050201000508
-010005040100050401030504010105020102053801000202010302020000054200000500
-000005000000050c0100055501000500010005000100050c010005550100050001000500
-0100050c0100056401000500020201030202050000000542000005000000050d01000556
-010005000100050d01000556010005000100050d01000565010002020103020200000544
-0000050e010005570100050e010005570100050e01000564010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-02020103020205000000056f072d05ee010002020103020200000570072c000005ed0100
-050002020103020205000000056f0701002b05ee0100020201030202000005700701002b
-05ed0100050002020103020205000000056f0701002b05ee010002020103020200000570
-0701002b05ed0100050002020103020205000000056f0701002b05ee0100020201030202
-000005700701002b05ed0100050002020103020205000000050a010005020100052e0100
-05040100050601000521070100030100002605ee01000202010302020000050b01000501
-0100053501000529070100020101002605ed0100050002020103020205000000050a0100
-050001000504010205020100050201000508010005000101050301020503010205030102
-050201040502010205030102050201000500010105040101050c07010001010000000100
-002605ee01000202010302020000050b0101050401000502010005010100050201000508
-010105010100050101000502010005010100050201000504010005040100050601000502
-010005020100050101010501010005030101050c070100030100002605ed010005000202
-0103020205000000050a0100050001000503010005020100050201000501010005080100
-050201000501010005020100050101000508010005040100050601000502010005020100
-05010100050201000512070100030100002605ee01000202010302020000050b01000501
-010005020104050201000501010005080100050201000501010005020100050201020505
-010005040100050601000502010005020100050101000502010005120701000301000026
-05ed0100050002020103020205000000050a010005010100050201000507010005000100
-050801000502010005010100050201000505010005040100050401000506010005020100
-0502010005010100050201000512070100030100002605ee01000202010302020000050b
-010005020100050101000502010005030101050901010501010005010100050201000501
-010005020100050401000504010005060100050201000502010005010100050201000503
-0101050c070100030100002605ed0100050002020103020205000000050a010005020100
-050201020505010005090100050001010503010205030102050501000505010105040100
-05030102050201000502010005030101050c070100010104002405ee0100020201030202
-0000051c01000509010005470701002b05ed010005000202010302020500000005180100
-05000100050a010005470701002b05ee01000202010302020000051a0100050b01000547
-0701002b05ed0100050002020103020205000000056f0701002b05ee0100020201030202
-000005700701002b05ed0100050002020103020205000000056f0701002b05ee01000202
-01030202000005700701002b05ed0100050002020103020205000000056f0701002b05ee
-0100020201030202000005700700002c05ed010005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-050002020103020205000000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000202010302020000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500020201030202
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000002020103020200000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000202010302020500000005ff058c
-0100020201030202000005ff058c010005000202010302020500000005ff058c01000202
-01030202000005ff058c010005000202010302020500000005ff058c0100020201030202
-000005ff058c010005000202010302020500000005ff058c0100020201030202000005ff
-058c010005000202010302020500000005ff058c0100020201030202000005ff058c0100
-05000202010302020500000005ff058c0100020201030202000005ff058c010005000202
-010302020500000005ff058c0100020201030202000005ff058c01000500020201030202
-0500000005ff058c0100020201030202000005ff058c0100050002020103020205000000
-05ff058c0100020201030202000005ff058c010005000202010302020500000005ff058c
-0100020201030202000005ff058c01000500020201030202050000000557010005000100
-05000100050001000500010005090102051e010005fe0100020201030202000005570100
-05000100050001000500010005000100050000000507010005020100051d010005fd0100
-050002020103020205000000055701000606000005080100050201000501010005000101
-050301020502010005000101050901000500010105020100050001010503010205020100
-050201000502010205030102050201000500010105d10100020201030202000005570100
-050006060500000005070100050201000501010105010100050101000502010005010101
-050101000508010105010100050101010501010005010100050201000501010005020100
-05010100050201000501010005020100050101010501010005cf01000500020201030202
-050000000557010006060000050801000502010005010100050201000501010005020100
-050101000502010005080100050201000501010005050100050201000501010005000100
-050001000501010005050100050201000501010005d40100020201030202000005570100
-050006060500000005070100050201000501010005020100050101040501010005020100
-050801000502010005010100050501000502010005010100050001000500010005020102
-050201040501010005d30100050002020103020205000000055701000606000005080100
-050201000501010005020100050101000505010005020100050801000502010005010100
-050501000502010005010100050001000500010005050100050101000505010005d40100
-020201030202000005570100050006060500000005070100050201000501010105010100
-050101000502010005010100050201000508010105010100050101000505010005020100
-050101000500010005000100050101000502010005010100050201000501010005d30100
-050002020103020205000000055701000606000005090102050201000500010105030102
-050201000502010005080100050001010502010005060102050301000500010005030102
-050301020502010005d40100020201030202000005570100050000000500000005000000
-0500000005000000050e010005ff05190100050002020103020205000000055700000500
-0000050000000500000005000000050f010005ff051a0100020201030202000005710100
-05ff0519010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-020200000556000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000052800000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005460100050002020103020205000000055400000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005280000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000548010002020103
-020200000556000005600100052800000560010005460100050002020103020205000000
-055400000560010005280000056001000548010002020103020200000556000005600100
-052800000560010005460100050002020103020205000000055400000560010005280000
-056001000548010002020103020200000556000005600100052800000560010005460100
-050002020103020205000000055400000560010005280000056001000548010002020103
-020200000556000005600100052800000560010005460100050002020103020205000000
-05540000052a01020502010005020100052a010005280000051c0102051f0102051d0100
-0548010002020103020200000556000005280100050201000501010005010100052c0100
-05280000051a01000502010005200100051e010005460100050002020103020205000000
-0554000005290100050201000501010005000100052c010005280000051b010005020100
-050201020502010005000101050301020503010205050100051d01000548010002020103
-0202000005560000052801000502010005010101052e010005280000051a010005050100
-0502010005010101050101000501010005020100050101000502010005040100051e0100
-054601000500020201030202050000000554000005290100050201000501010005000100
-052c010005280000051b0100050901000501010005020100050101000505010005020100
-05040100051d010005480100020201030202000005560000052801000502010005010100
-05010100052c010005280000051a01000506010305010100050201000501010005050104
-05040100051e010005460100050002020103020205000000055400000529010005020100
-0501010005010100052b010005280000051b010005020100050101000502010005010100
-05020100050101000505010005080100051d010005480100020201030202000005560000
-05280100050201000501010005020100052b010005280000051a01000502010005010100
-0502010005010100050201000501010005020100050101000502010005040100051e0100
-0546010005000202010302020500000005540000052a01020502010005020100052a0100
-05280000051c0102050301030501010005020100050201020503010205050100051d0100
-054801000202010302020000055600000560010005280000056001000546010005000202
-010302020500000005540000056001000528000005600100054801000202010302020000
-055600000560010005280000056001000546010005000202010302020500000005540000
-056001000528000005600100054801000202010302020000055600000560010005280000
-056001000546010005000202010302020500000005540000056001000528000005600100
-054801000202010302020000055600000560010005280000056001000546010005000202
-010302020500000005540000056001000528000005600100054801000202010302020000
-055600000560010005280000056001000546010005000202010302020500000005540000
-056001000528000005600100054801000202010302020000055600000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005280000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000546010005000202
-010302020500000005540000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000528000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001000500010005480100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c0100020201030202000005ff058c010005000202010302020500000005ff
-058c0100020201030202000005ff058c010005000202010302020500000005ff058c0100
-020201030202000005ff058c010005000202010302020500000005ff058c010002020103
-0202000005ff058c010005000202010302020500000005ff058c01000202010302020000
-05ff058c010005000202010302020500000005ff058c0100020201030202000005ff058c
-010005000202010302020500000005ff058c0100020201030202000005ff058c01000500
-0202010302020500000005ff058c0100020201030202000005ff058c0100050002020103
-02020500000005ff058c0100020201030202000005ff058c010005000202010302020500
-000005ff058c010002020101000505ff058c010005000005020204000500000005ff058c
-0100000002020400000002020400000005ff058c01000500000002020400000002020400
-0500000005ff058c01000000020204000000020204000000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500000002020400
-000002020400050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100000002020400000002020400000502ff028300060202
-040000000208040002ff028300000208040000000208040002ff02830000020804000000
-0208040001ff01830000020804000000040901ff018300000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 114 250 471
-%%EOF
diff --git a/lib/tv/doc/src/tv_record_editor_mnesia.gif b/lib/tv/doc/src/tv_record_editor_mnesia.gif
deleted file mode 100644
index fbbdcab515..0000000000
--- a/lib/tv/doc/src/tv_record_editor_mnesia.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_record_editor_mnesia.ps b/lib/tv/doc/src/tv_record_editor_mnesia.ps
deleted file mode 100644
index b4d19f963f..0000000000
--- a/lib/tv/doc/src/tv_record_editor_mnesia.ps
+++ /dev/null
@@ -1,897 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_record_editor_mnesia.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:09:57 2001)
-%%BoundingBox: 0 41 300 330
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 41 300 330
-userdict begin
-%%BeginData:
-DisplayImage
-0 41
-300.000000 289.000000
-12
-385 371
-1
-0
-0
-8
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-999999
-000a01ff016a000b0208040001ff016a00000208040000000208040002ff026a00000208
-0400000002080400020000ff0067040002000000020804000000020204060200000004ff
-0467020000000405020204000000020204000209000d02ff025e00000202040000000202
-040002080000020d04000242010302110103023701010211010102020101022301010231
-01010206010102090101023e00000202040000000202040002080000020d040002420101
-02020107020001010203010102010101020e010402230101020601050204010102020101
-02020100021f01010201010002130100020c0100020b01010206010102090101023e0000
-0202040000000202040002080000020d0400024201010205010102030101020301010201
-0101020e0101020101010222010102060101020801010206010102200100020001010212
-0101020b0101020b010102060101020a0100023e00000202040000000202040002080000
-02020406020304000242010102050101020301010203010102010101020e010102010101
-020201030203010302020103020201010200010102010104020601010205010402020101
-0200010402010103020201010200010102000101020c0100020001040201010302030104
-0200010402080104020101030203010102000101020301010202010302020100023f0000
-020204000000040302080000020204000304000002030400024201010205010102040101
-0202010002020101020e0101020101000202010102010101020101010201010102000101
-020101010201010102000101020001010201010102060101020401010201010102020101
-020101010202010102010101020101010200010102000101020f01010202010102010101
-0201010102050101020b0101020201010201010102020102020001010202010102010101
-020101010242000004030101020b00000203040003020000020404000242010102050101
-020401010201010102020101020e01030203010102010101020101010204010102010101
-020101020202010102010101020601040201010102010101020201010201010102020101
-02010101020101020214010102020101020101010201010202040101020b010102060101
-020201010201010102020101020101010201010102450103020b00000203040003020000
-020404000242010102050101020501010200010002030101020e01010200010102020105
-020101010204010102010101020101010203010102010101020601010204010102010101
-020201010201010102020101020101010201010102150101020201050202010302020101
-020b0101020301040202010102010101020201010201010502450103020b000002040400
-030000000205040002420101020501010205010302030101020e01010200010102020101
-020501010204010102010101020101010203010102010101020601010204010102010101
-020201010201010102020101020101010201010102150101020201010208010202010101
-020b010102020101020101010202010102010101020201010201010102490103020b0000
-02040400030000000205040002420101020501010206010102040101020e010102010101
-020101010202010002010101020201000200010102010101020101010203010102000102
-020601010204010102000102020201010201010102020101020101010201010102030101
-020f010102020101020201000205010102010101020b0101020201010201010102020101
-0201010102020101020101010202010002450103020b0000020500000206040002420101
-020501010206010102040101020e01010201010202010103020301030202010302020101
-020401010200010102060105020101010200010102020101020201020201010302020101
-0203010102100102020101030202010402030102020a0102020101020200010102010104
-020301010202010302460103020b0000020d040002420103021101030293010602680103
-020b0000020d040002ff02600103020b0000020d040002ff02600103020c040d02ff0261
-010302ff027c010302ff027c0103020200ff00750400020201030202000004ff04750202
-010302ff027c010302020500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000202010302020000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050001000202010302020500000005ff057201000500020201030202000005ff05740100
-0202010302020500000005ff057201000500020201030202000005ff0574010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff057401000202010302020500000005ff0572010005000202
-01030202000005ff057401000202010302020500000005ff057201000500020201030202
-000005ff057401000202010302020500000005ff057201000500020201030202000005ff
-057401000202010302020500000005ff057201000500020201030202000005ff05740100
-02020103020205000000054e01ff0116050c010005000202010302020000054f01ff0116
-050d010002020103020205000000054e010107ff07120101050c01000500020201030202
-0000054f010107ff071100000101050d010002020103020205000000054e0101070100ff
-00100101050c010005000202010302020000054f0101070100ff00100101050d01000202
-0103020205000000054e0101070100ff00100101050c010005000202010302020000054f
-010107010000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-00000300000003000000030000000300000003000000030000d00101050d010002020103
-020205000000054e01010701034000cf0101050c010005000202010302020000054f0101
-07010000033e010000cf0101050d010002020103020205000000054e0101070103130100
-030b01010304010003140100030100cf0101050c010005000202010302020000054f0101
-0701000003120100030a0100031c01000300010000cf0101050d01000202010302020500
-0000050f0100050001010503010205020101050001000503010205250101070103010100
-030201000301010003000101030301010300010003020102030401000304010203020100
-03000101030301020303010103000100030100cf0101050c010005000202010302020000
-051001010501010005010100050201000501010005000100050001000501010005020100
-052401010701000003000100030201000301010103010100030101000301010103010100
-030201000301010403040100030201010301010003010100030201000301010003010101
-0300010000cf0101050d010002020103020205000000050f010005020100050501000501
-010005000100050001000501010005020100052401010701030101000302010003010100
-030201000301010003020100030101000302010003030100030601000302010003020100
-03010100030201000301010003020100030100cf0101050c010005000202010302020000
-051001000502010005020103050101000500010005000100050101040524010107010000
-030001000302010003010100030201000301010003020100030101040303010003060100
-03020100030201000301010403010100030201000300010000cf0101050d010002020103
-020205000000050f01000502010005010100050201000501010005000100050001000501
-010005280101070103010100030201000301010003020100030101000302010003010100
-03070100030601000302010003020100030101000305010003020100030100cf0101050c
-010005000202010302020000051001000502010005010100050201000501010005000100
-050001000501010005020100052401010701000003000100030101010301010003020100
-030101000301010103010100030201000303010003060100030201000302010003010100
-0302010003010100030101010300010000cf0101050d010002020103020205000000050f
-010005020100050201030501010005000100050001000502010205250101070103020101
-030001000301010003020100030201010300010003020102030401000306010003020100
-03020100030201020303010103000100030100cf0101050c010005000202010302020000
-054f010107010000033e010000cf0101050d010002020103020205000000054e01010701
-034000cf0101050c010005000202010302020000054f010107010000033e010000cf0101
-050d010002020103020205000000054e0101070103000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-03000100030000cf0101050c010005000202010302020000054f0101070100ff00100101
-050d010002020103020205000000054e0101070100ff00100101050c0100050002020103
-02020000054f0101070100ff00100101050d010002020103020205000000054e01010701
-00ff00100101050c010005000202010302020000054f0101070000ff00110101050d0100
-02020103020205000000054e01ff0116050c010005000202010302020000054f01ff0116
-050d01000202010302020500000005ff057201000500020201030202000005ff05740100
-0202010302020500000005ff057201000500020201030202000005ff0574010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff0574010002020103020205000000055007ff0712050e0100
-05000202010302020000055107ff07110000050f01000202010302020500000005500701
-00ff0010050e0100050002020103020200000551070100ff0010050f0100020201030202
-050000000550070100ff0010050e0100050002020103020200000551070100ff0010050f
-0100020201030202050000000550070100ff0010050e0100050002020103020200000551
-070100ff0010050f010002020103020205000000051a010005050100052d070100130100
-000b0101000401000014010000d1050e010005000202010302020000051b010005050100
-052d070100130100000a0100001c010000d1050f01000202010302020500000005100102
-050301010500010005020101050001000501010005000101050301020503010205030102
-051207010001010000020100000101000000010100030101000001000002010200040100
-00040102000201000000010100030102000301010000010000d1050e0100050002020103
-020200000510010005020100050101000501010105010100050101010501010105010100
-050101000502010005010100050201000501010005020100051107010001010000020100
-000101010001010000010100000101010001010000020100000101040004010000020101
-000101000001010000020100000101000001010100d1050f010002020103020205000000
-051301000501010005020100050101000502010005010100050501000502010005010100
-050501000515070100010100000201000001010000020100000101000002010000010100
-000201000003010000060100000201000002010000010100000201000001010000020100
-00d1050e0100050002020103020200000511010305010100050201000501010005020100
-050101000505010405020102050301020512070100010100000201000001010000020100
-000101000002010000010104000301000006010000020100000201000001010400010100
-0002010000d1050f010002020103020205000000050f0100050201000501010005020100
-050101000502010005010100050501000509010005050100051107010001010000020100
-000101000002010000010100000201000001010000070100000601000002010000020100
-00010100000501000002010000d1050e0100050002020103020200000510010005020100
-050101000501010105010100050101010501010005050100050201000501010005020100
-050101000502010005110701000101000001010100010100000201000001010000010101
-000101000002010000030100000601000002010000020100000101000002010000010100
-0001010100d1050f01000202010302020500000005100103050201010500010005020101
-050001000501010005060102050301020503010205120701000201010000010000010100
-000201000002010100000100000201020004010000060100000201000002010000020102
-000301010000010000d1050e0100050002020103020200000551070100ff0010050f0100
-020201030202050000000550070100ff0010050e01000500020201030202000005510701
-00ff0010050f0100020201030202050000000550070100ff0010050e0100050002020103
-020200000551070100ff0010050f0100020201030202050000000550070100ff0010050e
-0100050002020103020200000551070100ff0010050f0100020201030202050000000550
-070100ff0010050e0100050002020103020200000551070000ff0011050f010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff057401000202010302020500000005ff0572010005000202
-01030202000005ff057401000202010302020500000005ff057201000500020201030202
-000005ff057401000202010302020500000005ff057201000500020201030202000005ff
-0574010002020103020205000000055007ff0712050e0100050002020103020200000551
-07ff07110000050f0100020201030202050000000550070100ff0010050e010005000202
-0103020200000551070100ff0010050f0100020201030202050000000550070100ff0010
-050e0100050002020103020200000551070100ff0010050f010002020103020205000000
-0550070100ff0010050e0100050002020103020200000551070100ff0010050f01000202
-010302020500000005190100052201000511070100130100000b01010004010000140100
-00d1050e010005000202010302020000053e01000511070100130100000a0100001c0100
-00d1050f010002020103020205000000050f0104050201020502010005000101050a0102
-05030102050301010500010005020102050b070100010100000201000001010000000101
-000301010000010000020102000401000004010200020100000001010003010200030101
-0000010000d1050e01000500020201030202000005140100050401000502010105010100
-0508010005020100050101000502010005010100050101010501010005020100050a0701
-000101000002010000010101000101000001010000010101000101000002010000010104
-0004010000020101000101000001010000020100000101000001010100d1050f01000202
-010302020500000005120100050501000502010005020100050801000505010005020100
-05010100050201000501010005020100050a070100010100000201000001010000020100
-000101000002010000010100000201000003010000060100000201000002010000010100
-00020100000101000002010000d1050e0100050002020103020200000512010005060100
-0502010005020100050801000505010005020100050101000502010005010104050a0701
-000101000002010000010100000201000001010000020100000101040003010000060100
-000201000002010000010104000101000002010000d1050f010002020103020205000000
-051001000507010005020100050201000508010005050100050201000501010005020100
-05010100050e070100010100000201000001010000020100000101000002010000010100
-0007010000060100000201000002010000010100000501000002010000d1050e01000500
-020201030202000005100100050801000502010105010100050801000502010005010100
-0502010005010100050101010501010005020100050a0701000101000001010100010100
-000201000001010000010101000101000002010000030100000601000002010000020100
-0001010000020100000101000001010100d1050f010002020103020205000000050f0104
-050401000502010005000101050a010205030102050301010500010005020102050b0701
-000201010000010000010100000201000002010100000100000201020004010000060100
-000201000002010000020102000301010000010000d1050e010005000202010302020000
-051e0100050401050526070100ff0010050f010002020103020205000000051d01000531
-070100ff0010050e010005000202010302020000051e01000531070100ff0010050f0100
-020201030202050000000550070100ff0010050e01000500020201030202000005510701
-00ff0010050f0100020201030202050000000550070100ff0010050e0100050002020103
-020200000551070100ff0010050f0100020201030202050000000550070100ff0010050e
-0100050002020103020200000551070000ff0011050f01000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff057401000202010302020500000005ff0572010005000202
-01030202000005ff057401000202010302020500000005ff057201000500020201030202
-000005ff057401000202010302020500000005ff057201000500020201030202000005ff
-057401000202010302020500000005ff057201000500020201030202000005ff05740100
-0202010302020500000005ff057201000500020201030202000005ff0574010002020103
-020205000000055007ff0712050e010005000202010302020000055107ff07110000050f
-0100020201030202050000000550070100ff0010050e0100050002020103020200000551
-070100ff0010050f0100020201030202050000000550070100ff0010050e010005000202
-0103020200000551070100ff0010050f0100020201030202050000000550070100ff0010
-050e0100050002020103020200000551070100ff0010050f010002020103020205000000
-05180100050c01000528070100130100000b0101000401000014010000d1050e01000500
-020201030202000005190100050c01000528070100130100000a0100001c010000d1050f
-010002020103020205000000051001020502010405020102050201040502010205200701
-000101000002010000010100000001010003010100000100000201020004010000040102
-000201000000010100030102000301010000010000d1050e010005000202010302020000
-0510010005020100050301000503010005020100050301000503010005020100051f0701
-000101000002010000010101000101000001010000010101000101000002010000010104
-0004010000020101000101000001010000020100000101000001010100d1050f01000202
-0103020205000000050f01000507010005070100050301000503010005020100051f0701
-000101000002010000010100000201000001010000020100000101000002010000030100
-0006010000020100000201000001010000020100000101000002010000d1050e01000500
-02020103020200000511010205040100050401030503010005030104051f070100010100
-000201000001010000020100000101000002010000010104000301000006010000020100
-0002010000010104000101000002010000d1050f01000202010302020500000005130100
-050301000503010005020100050301000503010005230701000101000002010000010100
-000201000001010000020100000101000007010000060100000201000002010000010100
-000501000002010000d1050e010005000202010302020000051001000502010005030100
-0503010005020100050301000503010005020100051f0701000101000001010100010100
-000201000001010000010101000101000002010000030100000601000002010000020100
-0001010000020100000101000001010100d1050f01000202010302020500000005100102
-050501010502010305040101050201020520070100020101000001000001010000020100
-000201010000010000020102000401000006010000020100000201000002010200030101
-0000010000d1050e0100050002020103020200000551070100ff0010050f010002020103
-0202050000000550070100ff0010050e0100050002020103020200000551070100ff0010
-050f0100020201030202050000000550070100ff0010050e010005000202010302020000
-0551070100ff0010050f0100020201030202050000000550070100ff0010050e01000500
-02020103020200000551070100ff0010050f0100020201030202050000000550070100ff
-0010050e0100050002020103020200000551070000ff0011050f01000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff057401000202010302020500000005ff0572010005000202
-01030202000005ff057401000202010302020500000005ff057201000500020201030202
-000005ff057401000202010302020500000005ff057201000500020201030202000005ff
-057401000202010302020500000005ff057201000500020201030202000005ff05740100
-02020103020205000000055007ff0712050e010005000202010302020000055107ff0711
-0000050f0100020201030202050000000550070100ff0010050e01000500020201030202
-00000551070100ff0010050f0100020201030202050000000550070100ff0010050e0100
-050002020103020200000551070100ff0010050f01000202010302020500000005500701
-00ff0010050e0100050002020103020200000551070100ff0010050f0100020201030202
-05000000052d01000521070100130100000b0101000401000014010000d1050e01000500
-0202010302020000052e01000521070100130100000a0100001c010000d1050f01000202
-010302020500000005100102050301020502010005020100050101000500010105020104
-050101000500010105020100050201000511070100010100000201000001010000000101
-000301010000010000020102000401000004010200020100000001010003010200030101
-0000010000d1050e01000500020201030202000005100100050201000501010005020100
-050101000502010005010101050101000503010005030101050101000501010005020100
-051107010001010000020100000101010001010000010100000101010001010000020100
-000101040004010000020101000101000001010000020100000101000001010100d1050f
-010002020103020205000000050f01000505010005020100050101000502010005010100
-050201000503010005030100050601000501010005110701000101000002010000010100
-000201000001010000020100000101000002010000030100000601000002010000020100
-0001010000020100000101000002010000d1050e01000500020201030202000005100100
-050501000502010005010100050201000501010005020100050301000503010005060100
-050101000511070100010100000201000001010000020100000101000002010000010104
-0003010000060100000201000002010000010104000101000002010000d1050f01000202
-0103020205000000050f0100050501000502010005010100050201000501010005020100
-050301000503010005070100050001000511070100010100000201000001010000020100
-000101000002010000010100000701000006010000020100000201000001010000050100
-0002010000d1050e01000500020201030202000005100100050201000501010005020100
-050101000501010105010100050201000503010005030100050701010512070100010100
-000101010001010000020100000101000001010100010100000201000003010000060100
-00020100000201000001010000020100000101000001010100d1050f0100020201030202
-050000000510010205030102050301010500010005010100050201000504010105010100
-050801000512070100020101000001000001010000020100000201010000010000020102
-0004010000060100000201000002010000020102000301010000010000d1050e01000500
-0202010302020000053d01000512070100ff0010050f0100020201030202050000000539
-0100050001000513070100ff0010050e010005000202010302020000053b010005140701
-00ff0010050f0100020201030202050000000550070100ff0010050e0100050002020103
-020200000551070100ff0010050f0100020201030202050000000550070100ff0010050e
-0100050002020103020200000551070100ff0010050f0100020201030202050000000550
-070100ff0010050e0100050002020103020200000551070000ff0011050f010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005ff057401000202010302020500000005ff05720100
-0500020201030202000005ff057401000202010302020500000005ff0572010005000202
-01030202000005ff057401000202010302020500000005ff057201000500020201030202
-000005ff057401000202010302020500000005ff057201000500020201030202000005ff
-057401000202010302020500000005ff057201000500020201030202000005ff05740100
-0202010302020500000005ff057201000500020201030202000005ff0574010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff052f000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050b01000500020201030202000005ff052f00000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000500000005000100050b0100
-0202010302020500000005ff052f000005340100050b01000500020201030202000005ff
-052f000005360100050b01000202010302020500000005ff052f0000052a060005080100
-050b01000500020201030202000005ff052f0000050906000502060005110600050a0600
-05080100050b01000202010302020500000005ff052f0000050806010501060005110600
-050b060005060100050b01000500020201030202000005ff052f00000509060105010600
-05020602050206000502060005010604050a060005060100050b01000202010302020500
-000005ff052f000005080600050006000500060005010600050206000501060005020600
-05030600050d060005040100050b01000500020201030202000005ff052f000005090600
-05000600050006000501060005020600050206000500060005040600050e060005040100
-050b01000202010302020500000005ff052f000005080600050106010501060405030600
-05050600050d060005040100050b01000500020201030202000005ff052f000005090600
-0501060105010600050606000500060005040600050c060005060100050b010002020103
-02020500000005ff052f0000050806000502060005010600050206000501060005020600
-05030600050b060005060100050b01000500020201030202000005ff052f000005090600
-05020600050206020502060005020600050406010508060005080100050b010002020103
-02020500000005ff052f0000052a060005080100050b01000500020201030202000005ff
-052f000005360100050b01000202010302020500000005ff052f000005340100050b0100
-0500020201030202000005ff052f000005360100050b01000202010302020500000005ff
-052f000005340100050b01000500020201030202000005ff052f000005360100050b0100
-0202010302020500000005ff052f00000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001000500010005000100050b01000500020201030202000005ff052f0000
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050b01000202010302020500000005ff057201000500020201030202000005ff
-057401000202010302020500000005ff057201000500020201030202000005ff05740100
-0202010302020500000005ff057201000500020201030202000005ff0574010002020103
-02020500000005ff057201000500020201030202000005ff057401000202010302020500
-000005ff057201000500020201030202000005ff057401000202010302020500000005ff
-057201000500020201030202000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100020201030202050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500020201030202050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500020201030202000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-0000050001000202010302020500000005ff057201000500020201030202000005ff0574
-01000202010302020500000005ff057201000500020201030202000005ff057401000202
-010302020500000005ff057201000500020201030202000005ff05740100020201030202
-0500000005ff057201000500020201030202000005ff0574010002020103020205000000
-05ff057201000500020201030202000005ff057401000202010302020500000005ff0572
-01000500020201030202000005ff057401000202010302020500000005ff057201000500
-020201030202000005ff057401000202010302020500000005ff05720100050002020103
-0202000005ff057401000202010302020500000005ff0572010005000202010302020000
-05ff057401000202010302020500000005ff057201000500020201030202000005ff0574
-01000202010302020500000005ff057201000500020201030202000005ff057401000202
-010302020500000005ff0572010005000202010302020000052e00000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000517000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005170000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0528010002020103020205000000052c0000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000051700000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000517000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005280100050002020103
-02020000052e0000054c010005170000054c010005170000054c01000528010002020103
-020205000000052c0000054c010005170000054c010005170000054c0100052801000500
-0202010302020000052e0000054c010005170000054c010005170000054c010005280100
-02020103020205000000052c0000054c010005170000054c010005170000054c01000528
-010005000202010302020000052e0000054c010005170000054c010005170000054c0100
-0528010002020103020205000000052c0000054c010005170000054c010005170000054c
-01000528010005000202010302020000052e0000054c010005170000054c010005170000
-054c01000528010002020103020205000000052c000005110104051f0100051401000517
-000005120102051f01020513010005170000051401030519010005180100052801000500
-0202010302020000052e0000051201000521010005150100051700000510010005020100
-052001000514010005170000051301000502010005180100051901000528010002020103
-020205000000052c00000513010005030100050001010503010205030102050201000500
-010105020104051201000517000005110100050201000502010205020100050001010503
-010205030102050501000513010005170000051401000502010005020102050301020503
-010205020104051601000528010005000202010302020000052e00000512010005030101
-050101000501010005020100050101000502010005010101050101000503010005150100
-051700000510010005050100050201000501010105010100050101000502010005010100
-050201000504010005140100051700000513010005020100050101000502010005010100
-05020100050101000502010005030100051901000528010002020103020205000000052c
-000005130100050301000502010005010100050501000502010005010100050701000514
-010005170000051101000509010005010100050201000501010005050100050201000504
-010005130100051700000514010305020100050201000501010005050100050201000503
-0100051801000528010005000202010302020000052e0000051201000503010005020100
-050201020502010405010100050701000515010005170000051001000506010305010100
-050201000501010005050104050401000514010005170000051301000501010005020104
-050201020502010405030100051901000528010002020103020205000000052c00000513
-010005030100050201000505010005010100050501000507010005140100051700000511
-010005020100050101000502010005010100050201000501010005050100050801000513
-010005170000051401000502010005010100050901000501010005070100051801000528
-010005000202010302020000052e00000512010005030100050201000501010005020100
-050101000502010005010100050701000515010005170000051001000502010005010100
-050201000501010005020100050101000502010005010100050201000504010005140100
-051700000513010005020100050101000502010005010100050201000501010005020100
-05030100051901000528010002020103020205000000052c000005110104050101000502
-010005020102050301020502010005080101051201000517000005120102050301030501
-010005020100050201020503010205050100051301000517000005140100050201000502
-0102050301020503010205050101051601000528010005000202010302020000052e0000
-054c010005170000054c010005170000054c01000528010002020103020205000000052c
-0000054c010005170000054c010005170000054c01000528010005000202010302020000
-052e0000054c010005170000054c010005170000054c0100052801000202010302020500
-0000052c0000054c010005170000054c010005170000054c010005280100050002020103
-02020000052e0000054c010005170000054c010005170000054c01000528010002020103
-020205000000052c0000054c010005170000054c010005170000054c0100052801000500
-0202010302020000052e0000054c010005170000054c010005170000054c010005280100
-02020103020205000000052c0000054c010005170000054c010005170000054c01000528
-010005000202010302020000052e0000054c010005170000054c010005170000054c0100
-0528010002020103020205000000052c0000054c010005170000054c010005170000054c
-01000528010005000202010302020000052e000005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005170000
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100051700000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000528010002020103
-020205000000052c00000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000517000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005170000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100052801000500020201030202000005ff0574
-01000202010302020500000005ff057201000500020201030202000005ff057401000202
-010302020500000005ff057201000500020201030202000005ff05740100020201030202
-0500000005ff057201000500020201030202000005ff0574010002020103020205000000
-05ff057201000500020201030202000005ff057401000202010302020500000005ff0572
-01000500020201030202000005ff057401000202010302020500000005ff057201000500
-020201030202000005ff057401000202010302020500000005ff05720100050002020103
-0202000005ff057401000202010100040500000005ff0572010005000005020204000000
-05ff057401000000020204000000020204000500000005ff057201000500000002020400
-000002020400000005ff0574010000000202040000000202040005000000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050000000202040000000202040000000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010000000202040000000202
-0400000502ff026a00060202040000000208040002ff026a000002080400000002080400
-02ff026a00000208040000000208040001ff016a0000020804000000040901ff016a0000
-0409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 41 300 330
-%%EOF
diff --git a/lib/tv/doc/src/tv_row_marked.gif b/lib/tv/doc/src/tv_row_marked.gif
deleted file mode 100644
index bc80eb34f1..0000000000
--- a/lib/tv/doc/src/tv_row_marked.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_row_marked.ps b/lib/tv/doc/src/tv_row_marked.ps
deleted file mode 100644
index 99631c5046..0000000000
--- a/lib/tv/doc/src/tv_row_marked.ps
+++ /dev/null
@@ -1,1611 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_row_marked.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:11:48 2001)
-%%BoundingBox: 0 61 377 359
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 61 377 359
-userdict begin
-%%BeginData:
-DisplayImage
-0 61
-377.000000 298.000000
-12
-719 569
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-00ff00
-ff0000
-990000
-7f7f7f
-999999
-ff7f7f
-c8ffff
-009900
-7fff7f
-000a01ff01ff01b8000b0208040001ff01ff01b800000208040000000208040002ff02ff
-02b8000002080400000002080400020000ff00ff00b50400020000000208040000000202
-04060200000004ff04ff04b5020000000405020204000000020204000209000d02ff02ff
-02ac00000202040000000202040002080000020d04000274010302110103023201020258
-0102020c010102010101021e010102290101020601010208010102310101022a01010230
-0101028200000202040000000202040002080000020d0400027401010202010702000101
-0203010102010101020e01050200010702010103020d0101020401010204010302030103
-020e010302060103020301030203010302060103020b0101020a01010202010102190100
-02030101021c0100020b01010206010102090101021b010202020100020d0101022a0101
-020c0104021e0101028200000202040000000202040002080000020d0400027401010205
-0101020301010203010102010101020e0101020701010203010102010101020c01010202
-010302030101020101010201010102010101020801010201010102010101020401010201
-01010201010102010101020101010201010102040101020101010201010102060101020a
-0101020201010218010102210101020b01010206010102090101021b010202020100020d
-01010238010102020101021d010102820000020204000000020204000208000002020406
-020304000274010102050101020301010203010102010101020e01010207010102030101
-020501010209010102030101020701010201010102010101020601020202010102010101
-020801010201010102010101020101010201010102040101020101010202010202030101
-020a01010203010102020103020301030202010302010104020101010202010302030101
-02000101020a0104020101030203010102000101020301010202010302030101021a0100
-020001010201010002020103020301040202010302020101020901010200010102010101
-020301030203010102020101020001010202010102010103020201010200010102010101
-020301030202010102000101020101010202010302020101020201010271000002020400
-000004030208000002020400030400000203040002740101020501010204010102020100
-02020101020e0101020701010203010202040101020a0100020301010207010102010101
-020101010205010102040101020101010208010102010101020101010201010102010101
-02040101020101010204010102020100020b010102030101020101010201010102010101
-020101010200010102010101020101010203010102010101020101010202010202000101
-020a01010202010102010101020201020200010102020101020101010201010102020101
-021a01000200010102010100020101010201010102010101020101010201010102010101
-020101010209010202000102020001010201010102010101020201010202010202000101
-020101010200010102000101020201020200010202000101020101010201010102010101
-0200010102010101020101010201010102010101020201010271000004030101020b0000
-0203040003020000020404000274010102050101020401010201010102020101020e0104
-0204010102040103020d0101020401010205010202020101020101010204010102050101
-020101010207010102020101020101010202010402040101020101010205010102020101
-020901010203010102010101020101010201010102080101020101010203010102010101
-020101010202010102010101020a01010206010102020101020101010202010102010101
-0201010102020101021a0100020001020200010002010101020101010201010102010101
-0201010102010101020d0101020101010201010102050101020201010202010102010101
-020101010200010102000101020201010201010102010101020501010201010202030101
-0201010102010101020101010202010002750103020b0000020304000302000002040400
-0274010102050101020501010200010002030101020e01010207010102060102020e0100
-020301010207010102010101020101010205010102040101020101010206010102030101
-020101010205010102040101020101010204010102020100020b01010203010102010101
-020101010201010102050104020101010203010102010101020101010202010102010101
-020a0101020301040202010102010101020201010201010502020101021a010002010101
-020001000201010102010101020101010201010102010105020d01010201010102010101
-020201040202010102020101020101010201010102000101020001010202010102010101
-0201010102020104020101010204010102010105020201010200010102750103020b0000
-02040400030000000205040002740101020501010205010302030101020e010102070101
-02070101020d010102030101020701010201010102010101020601020202010102010101
-0205010102040101020101010205010102040101020101010202010202030101020a0101
-020301010201010102010101020101010204010102010101020101010203010102010101
-020101010202010102010101020a01010202010102010101020201010201010102020101
-0201010102060101021a0100020201020201010102010101020101010201010102010101
-021101010201010102010101020101010201010102020101020201010201010102010101
-020101010200010102010101020101010201010102010101020101010201010102040101
-02010101020601010200010002760103020b000002040400030000000205040002740101
-020501010206010102040101020e01010207010102030101020101010201010102080101
-020401010203010102010101020101010201010102010101020401010201010102010101
-020101010200010502010101020101010201010102010101020101010200010102010101
-0201010102060101020a0101020201010201010102010101020101010202010002000101
-02010101020101010203010102010101020101010202010102010101020a010102020101
-02010101020201010201010102020101020101010202010002010101021b010002020102
-020101010201010102010101020001020201010102020100020101010209010102010101
-020101010201010102010101020201010202010102010101020201010207010102010101
-020101010201010102010101020101010204010102010101020201000203010202760103
-020b0000020500000206040002740101020501010206010102040101020e010502030101
-020401030202010102080101020401010204010302030103020201010209010302020101
-0200010502020103020301030202010102010103020b0101020a01010202010102020103
-0203010302020102020001010201010202010101020201030203010102010101020b0102
-020101020200010102010104020301010202010302020101021b01000203010102020103
-020301010200010102020103020201010209010102010101020101010202010202000101
-020101010202010102010101020301050202010102010101020101010202010202000101
-0200010102040101020201030204010102770103020b0000020d04000274010302110103
-0232010202190100023d0102020c01010237010602230101029e010102780103020b0000
-020d040002dd010002ff0254010102780103020b0000020d040002ff02ff02ae0103020c
-040d02ff02ff02af010302ff02ff02ca010302ff02ff02ca0103020200ff00ff00c30400
-020201030202000004ff04ff04c30202010302ff02ff02ca010302020500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500020201030202000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500010002020103020205000000
-05ff05ff05c001000500020201030202000005ff05ff05c2010002020103020205000000
-05ff05ff05c001000500020201030202000005ff05ff05c2010002020103020205000000
-05ff05ff05c0010005000202010302020000050c06040504060005030602051f06040505
-0600050406000504060005190600050206000504060005270602050b06000506060005ff
-05df060005020600050906020514010002020103020205000000050b0600050f0600051f
-060005090600050a06000519060005020600052c060005020600050a060005ff05e70600
-05020600050b06000513010005000202010302020000050c060005060602050506000503
-060205180600050606010500060005020602050206040517060005020600050206020503
-060205020600050206000517060005020600050106000500060105020604050206020503
-060205020600050006010503060205ff05ca060005020600050206020505060005020600
-05000601050d010002020103020205000000050b06000508060005050600050206000502
-06000517060005050600050106010504060005040600051a060005000600050506000502
-060005020600050106000502060005170600050206000501060105010600050306000506
-060005020600050206000501060105010600050106000502060005ff05c9060005020600
-0501060005020600050406000502060105010600050b010005000202010302020000050c
-060305050600050506000502060005020600051706030502060005020600050406000504
-0600051a0600050006000505060005020600050206000501060005000600050006000517
-060005020600050106000502060005030600050606000502060005020600050106000502
-06000501060005ff05cd06040501060005020600050406000502060005020600050c0100
-02020103020205000000050b060005080600050506000502060405170600050506000502
-06000504060005040600051a060005000600050506000502060405010600050006000500
-060005170600050206000501060005020600050306000506060005020600050206000501
-0600050206000502060205ff05ca06000502060005010604050406000502060005020600
-050b010005000202010302020000050c0600050806000505060005020600051b06000505
-0600050206000504060005040600051b0600050606000502060005050600050006000500
-060005170600050206000501060005020600050306000506060005020600050206000501
-0600050206000505060005ff05c906000502060005010600050806000502060005020600
-050c010002020103020205000000050b0600050806000505060005020600050206000517
-060005050600050106010504060005040600051b06000506060005020600050206000501
-060005000600050006000517060005020600050106010501060005030600050606000502
-0600050206000501060005020600050106000502060005ff05c906000502060005010600
-05020600050406000502060105010600050b010005000202010302020000050c06000508
-060005050600050306020518060405020601050006000504060005050601051906000506
-060005030602050306000500060005190602050206000500060105050601050406000503
-060205020600050206000502060205ff05ca060005020600050206020505060005020600
-05000601050d01000202010302020500000005a8060005ff05ff05050600050f01000500
-0202010302020000050b0606052a0606052a0606052a06060500060005ff05ef0606050e
-06000510010002020103020205000000050a0606052a0606052a0606052a060605000600
-05ff05ef0606050e0600050f01000500020201030202000005ff05ff05c2010002020103
-02020500000005ff05ff05c001000500020201030202000005ff05ff05c2010002020103
-020205000000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000202010302020000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-02020103020205ff05ff05c402020103020205ff05ff05c402020103020205ff05ff05c4
-02020103020205ff05ff05c402020103020205ff05ff05c402020103020205ff05ff05c4
-02020103020205ff05ff05c402020103020205ff05ff05c4020201030202053600000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000051a00000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050100000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050100000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000051a00000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000051a00000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000051a00000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-00000500000005ff057c0202010302020535000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500010005180000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000100000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500010000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050001000518000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500010005180000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000100
-051800000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500010005ff057b0202010302020536000005140100051a
-00000514010005010000051401000501000005140100051a000005140100051a00000514
-0100051a00000514010005ff057c02020103020205350000051601000518000005160100
-000005160100000005160100051800000516010005180000051601000518000005160100
-05ff057b0202010302020536000005140100051a00000514010005010000051401000501
-000005140100051a000005140100051a000005140100051a00000514010005ff057c0202
-010302020535000005050602050306020506010005180000051601000000051601000000
-0516010005180000051601000518000005160100051800000516010005ff057b02020103
-020205360000050406020503060205050100051a00000514010005010000051401000501
-000005140100051a00000506060405080100051a00000508060105090100051a00000508
-06030507010005ff057c0202010302020535000005040604050106040505010005180000
-051006000504010000000510060005040100000005040600051001000518000005050608
-0507010005180000050806030509010005180000050706070506010005ff057b02020103
-0202053600000503060005010601050106000501060105040100051a0000050f06000503
-010005010000050f0600050301000501000005030600050f0100051a00000503060a0505
-0100051a00000507060305080100051a000005050603050106030504010005ff057c0202
-01030202053500000503060d0504010005180000050d0600050106000504010000000504
-0600050a06000504010000000504060005010600050d0100051800000504060305020603
-050601000518000005090601050a01000518000005060602050306020505010005ff057b
-020201030202053600000501060005000603050006020500060405020100051a0000050c
-060005010600050301000501000005030600050a06000503010005010000050306000501
-0600050c0100051a0000050206030504060305040100051a000005140100051a00000505
-0602050306020504010005ff057c02020103020205350000050206000500060305000602
-050006040503010005180000050a06000501060005010600050401000000050406000504
-060005040600050401000000050406000501060005010600050a01000518000005030602
-050306070503010005180000050706040509010005180000050706010502060205060100
-05ff057b020201030202053600000501060005000603050006020500060405020100051a
-000005090600050106000501060005030100050100000503060005040600050406000503
-01000501000005030600050106000501060005090100051a000005020602050406050503
-0100051a00000507060305080100051a0000050a06020506010005ff057c020201030202
-053500000502060005000603050006020500060405030100051800000507060005010600
-050106000501060005040100000005040600050406000501060005010600050401000000
-050406000501060005010600050106000507010005180000050306020505060305050100
-05180000050906020509010005180000050a06020508010005ff057b0202010302020536
-000005010600050006070500060405020100051a00000506060005010600050106000501
-060005030100050100000503060005040600050106000501060005030100050100000503
-060005010600050106000501060005060100051a0000050206030505060105050100051a
-00000508060205080100051a0000050806020508010005ff057c02020103020205350000
-050206000500060405010600050006040503010005180000050406000501060005010600
-050106000501060005040100000005040600050106000501060005010600050106000504
-010000000504060005010600050106000501060005010600050401000518000005040603
-050d010005180000050906020509010005180000050906020509010005ff057b02020103
-020205360000050106060501060605020100051a00000503060005010600050106000501
-060005010600050301000501000005030600050106000501060005010600050106000503
-010005010000050306000501060005010600050106000501060005030100051a00000503
-060905060100051a00000508060205080100051a00000514010005ff057c020201030202
-053500000502060005000602050506000500060205030100051800000504060005010600
-050106000501060005010600050401000000050406000501060005010600050106000501
-060005040100000005040600050106000501060005010600050106000504010005180000
-050506070508010005180000050806040508010005180000050906020509010005ff057b
-020201030202053600000501060005000602050506000500060205020100051a00000503
-060005010600050106000501060005010600050301000501000005030600050106000501
-060005010600050106000503010005010000050306000501060005010600050106000501
-060005030100051a00000506060405080100051a00000506060605060100051a00000508
-06020508010005ff057c0202010302020535000005020604050506040503010005180000
-051601000000051601000000051601000518000005160100051800000516010005180000
-0516010005ff057b0202010302020536000005140100051a000005140100050100000514
-01000501000005140100051a000005140100051a000005140100051a00000514010005ff
-057c02020103020205350000051601000518000005160100000005160100000005160100
-05180000051601000518000005160100051800000516010005ff057b0202010302020536
-000005140100051a00000514010005010000051401000501000005140100051a00000514
-0100051a000005140100051a00000514010005ff057c0202010302020535000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005180000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010000000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000518000005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005180000
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100051800000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000500010005ff057b02020103
-020205360100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100051a0100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005010100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005010100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100051a0100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100051a0100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100051a0100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005ff057c02020103020205ff05ff05c4020201030202
-05ff05ff05c402020103020205ff05ff05c402020103020205ff05ff05c4020201030202
-05ff05ff05c402020103020205ff05ff05c402020103020205ff05ff05c4020201030202
-05ff05ff05c402020103020205ff05ff05c402020103020205ff05ff05c4020201030202
-05ff05ff05c4020201030202050301ff01ff01bc0503020201030202050301ff01ff01a8
-050000000500000005000000050000000500000005000000050000000500000005000000
-050001000503020201030202050301ff01ff01a800000500000005000000050000000500
-000005000000050000000500000005000000050001010503020201030202050301020bff
-0bff0ba2010205000000050e0100050001000503020201030202050301020bff0bff0ba1
-000001020000051001010503020201030202050301020b0100ff00ff00a0010205000000
-050e0100050001000503020201030202050301020b0100040101007101010002010100ff
-00ff002001020000051001010503020201030202050301020b0100030100007501000001
-010100ff00ff0020010205000000050e0100050001000503020201030202050301020b01
-000301000003010000160100001001000006010200100100000c0100001c010000010101
-00ff00ff002001020000051001010503020201030202050301020b010003010000030100
-002801000008010000100100000c0100001c01000001010100ff00ff0020010205000000
-050e0100050001000503020201030202050301020b010003010000030100000101000003
-010200020100000001010003010200020100000001010009010000000101000501000003
-010200030102000201000001010000030102000201000000010100030102000201000000
-01010003010100000100000301000001010100ff00ff0020010200000502010a05020101
-0503020201030202050301020b0100030100000301000000010000030100000201000001
-010100010100000401000002010100010100000801010001010000040100000201000002
-010000010100000201000001010000000100000301000002010000010101000101000001
-01000002010000010101000101000001010000010101000301000001010100ff00ff0020
-0102050000000502010805020100050001000503020201030202050301020b0100010101
-000401010008010000010100000801000002010000020100000801000002010000040100
-000601000001010000050101000401000002010000010100000201000001010000020100
-0001010000050100000201000004010300ff00ff00200102000005040106050401010503
-020201030202050301020b01000301000003010100050103000101000008010000020100
-000201000008010000020100000401000003010300010100000501010004010400010100
-0002010000010104000101000005010000020100000301000001010100ff00ff00200102
-050000000504010405040100050001000503020201030202050301020b01000301000003
-010000000100000301000002010000010100000801000002010000020100000801000002
-010000040100000201000002010000010100000501000000010000030100000501000002
-010000010100000501000005010000020100000301000001010100ff00ff002001020000
-05060102050601010503020201030202050301020b010003010000030100000101000002
-010000020100000101000008010000020100000201000003010100020101000101000004
-010000020100000201000001010000020100000101000001010000020100000201000001
-0101000101000001010000020100000101000005010000010101000301000001010100ff
-00ff00200102050000000506010005060100050001000503020201030202050301020b01
-000301000003010000020100000201030001010000080100000201000002010000030101
-000201000000010100050100000301030002010200020100000201000002010200020100
-0000010100030102000201000006010100000100000301000001010100ff00ff00200102
-0000051001010503020201030202050301020b0100030100002901000045010000030100
-0001010100ff00ff0020010205000000050e010005000100050302020103020205030102
-0b0100040101002501010042010000020100000101010002010100ff00ff002001020000
-051001010503020201030202050301020b01007201020007010100ff00ff002001020500
-0000050e0100050001000503020201030202050301020b0100ff00ff00a0010200000510
-01010503020201030202050301020b0100ff00ff00a0010205000000050e010005000100
-0503020201030202050301020b0000ff00ff00a101020000051001010503020201030202
-050301ff01ff01a805000000050001000500010005000100050001000500010005000100
-0500010005000100050001000503020201030202050301ff01ff01a80000050001000500
-010005000100050001000500010005000100050001000500010005000101050302020103
-0202050301ff01ff01bc05030202010302020503010005ff05ff05a80100050001000500
-010005000100050001000500010005000100050001000500010005000100050302020103
-02020503010005ff05ff05a7010005000100050001000500010005000100050001000500
-0100050001000500010005000000010005030202010302020503010005010bff0bff0ba3
-0502010003060100030600000500010005030202010302020503010005010bff0bff0ba2
-000005010100050003050000050003060500000001000503020201030202050301000501
-0b0100ff00ff00a105020100030505000100050003050000050001000503020201030202
-0503010005010b0100ff00ff00a105010100050003040500000005000100030505000000
-010005030202010302020503010005010b0100ff00ff00a1050201000304000005020100
-030400000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-03030000050201000500030405000000010005030202010302020503010005010b0100ff
-00ff00a10502010003030500000005020100050003030000050001000503020201030202
-0503010005010b0100ff00ff00a105010100050003020500000005040100030305000000
-010005030202010302020503010005010b0100ff00ff00a1050201000302000005060100
-030200000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-03010000050601000500030205000000010005030202010302020503010005010b0100ff
-00ff00a10502010003010500000005060100050003010000050001000503020201030202
-0503010005010b0100ff00ff00a105010100050003000500000005080100030105000000
-010005030202010302020503010005010b0100ff00ff00a10502010003000000050a0100
-030000000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-000005000100050001000500010005000100050001000500010005000300050000000100
-05030202010302020503010005010b0100ff00ff00a10502010005000100050001000500
-010005000100050001000500010005000100050000000500010005030202010302020503
-010005010b0100ff00ff00a1050101000500030e05000000010005030202010302020503
-010005010b01000301010071010100ff00ff002705020100050000000500000005000000
-050000000500000005000000050000000500000005000100050302020103020205030100
-05010b01000201000075010000ff00ff0026050101000500000005000000050000000500
-000005000000050000000500000005000100050000000100050302020103020205030100
-05010b01000201000003010000160100001001000006010200100100000c0100001c0100
-00ff00ff00260502010005000000050a0100050000000500010005030202010302020503
-010005010b010002010000030100002801000008010000100100000c0100001c010000ff
-00ff00260501010005000000050c01000500000001000503020201030202050301000501
-0b0100020100000301000001010000030102000201000000010100030102000201000000
-010100090100000001010005010000030102000301020002010000010100000301020002
-01000000010100030102000201000000010100030101000001000003010000ff00ff0026
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-000201000003010000000100000301000002010000010101000101000004010000020101
-000101000008010100010100000401000002010000020100000101000002010000010100
-000001000003010000020100000101010001010000010100000201000001010100010100
-00010100000101010003010000ff00ff00260501010005000000050c0100050000000100
-05030202010302020503010005010b010000010100040101000801000001010000080100
-000201000002010000080100000201000004010000060100000101000005010100040100
-000201000001010000020100000101000002010000010100000501000002010000040101
-00ff00ff00240502010005000000050a0100050000000500010005030202010302020503
-010005010b01000201000003010100050103000101000008010000020100000201000008
-010000020100000401000003010300010100000501010004010400010100000201000001
-01040001010000050100000201000003010000ff00ff00260501010005000000050c0100
-05000000010005030202010302020503010005010b010002010000030100000001000003
-010000020100000101000008010000020100000201000008010000020100000401000002
-010000020100000101000005010000000100000301000005010000020100000101000005
-010000050100000201000003010000ff00ff00260502010005000000050a010005000000
-0500010005030202010302020503010005010b0100020100000301000001010000020100
-000201000001010000080100000201000002010000030101000201010001010000040100
-000201000002010000010100000201000001010000010100000201000002010000010101
-0001010000010100000201000001010000050100000101010003010000ff00ff00260501
-010005000000050c010005000000010005030202010302020503010005010b0100020100
-000301000002010000020103000101000008010000020100000201000003010100020100
-000001010005010000030103000201020002010000020100000201020002010000000101
-000301020002010000060101000001000003010000ff00ff00260502010005000000050a
-0100050000000500010005030202010302020503010005010b0100020100002901000045
-01000003010000ff00ff00260501010005000000050c0100050000000100050302020103
-02020503010005010b01000301010025010100420100000201000001010100ff00ff0027
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-0071010200ff00ff002c0501010005000000050c01000500000001000503020201030202
-0503010005010b0100ff00ff00a10502010005000000050a010005000000050001000503
-0202010302020503010005010b0100ff00ff00a10501010005000000050c010005000000
-010005030202010302020503010005010b0100ff00ff00a10502010005000000050a0100
-050000000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-0000050c010005000000010005030202010302020503010005010b0100ff00ff00a10502
-010005000000050a0100050000000500010005030202010302020503010005010b0100ff
-00ff00a10501010005000000050c01000500000001000503020201030202050301000501
-0b0100ff00ff00a10502010005000000050a010005000000050001000503020201030202
-0503010005010b0100ff00ff00a10501010005000000050c010005000000010005030202
-010302020503010005010b0100ff00ff00a10502010005000000050a0100050000000500
-010005030202010302020503010005010b0100ff00ff00a10501010005000000050c0100
-05000000010005030202010302020503010005010b0100ff00ff00a10502010005000000
-050a0100050000000500010005030202010302020503010005010b0100ff00ff00a10501
-010005000000050c010005000000010005030202010302020503010005010b0100ff00ff
-00a10502010005000000050a010005000000050001000503020201030202050301000501
-0b0100ff00ff00a10501010005000000050c010005000000010005030202010302020503
-010005010b0100ff00ff00a10502010005000000050a0100050000000500010005030202
-010302020503010005010b0100ff00ff00a10501010005000000050c0100050000000100
-05030202010302020503010005010b0100ff00ff00a10502010005000000050a01000500
-00000500010005030202010302020503010005010b0100ff00ff00a10501010005000000
-050c010005000000010005030202010302020503010005010b0100ff00ff00a105020100
-05000000050a0100050000000500010005030202010302020503010005010b0100ff00ff
-00a10501010005000000050c010005000000010005030202010302020503010005010b01
-00ff00ff00a10502010005000000050a0100050000000500010005030202010302020503
-010005010b0100ff00ff00a10501010005000000050c0100050000000100050302020103
-02020503010005010b0100ff00ff00a10502010005000000050a01000500000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000000050c01000500
-0000010005030202010302020503010005010b0100ff00ff00a10502010005000000050a
-0100050000000500010005030202010302020503010005010b0100ff00ff00a105010100
-05000000050c010005000000010005030202010302020503010005010b0100ff00ff00a1
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-00ff00ff00a10501010005000000050c0100050000000100050302020103020205030100
-05010b0100ff00ff00a10502010005000000050a01000500000005000100050302020103
-02020503010005010b0100ff00ff00a10501010005000000050c01000500000001000503
-0202010302020503010005010b0100ff00ff00a10502010005000000050a010005000000
-0500010005030202010302020503010005010b0100ff00ff00a10501010005000000050c
-010005000000010005030202010302020503010005010b0100ff00ff00a1050201000500
-0000050a0100050000000500010005030202010302020503010005010b0100ff00ff00a1
-0501010005000000050c010005000000010005030202010302020503010005010b0100ff
-00ff00a10502010005000000050a01000500000005000100050302020103020205030100
-05010b0100ff00ff00a10501010005000000050c01000500000001000503020201030202
-0503010005010b0100ff00ff00a10502010005000000050a010005000000050001000503
-0202010302020503010005010b0100ff00ff00a10501010005000000050c010005000000
-010005030202010302020503010005010b0100ff00ff00a10502010005000000050a0100
-050000000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-0000050c010005000000010005030202010302020503010005010b0100ff00ff00a10502
-010005000000050a0100050000000500010005030202010302020503010005010b0100ff
-00ff00a10501010005000000050c01000500000001000503020201030202050301000501
-0b0100ff00ff00a10502010005000000050a010005000000050001000503020201030202
-0503010005010b0100ff00ff00a10501010005000000050c010005000000010005030202
-010302020503010005010b0100ff00ff00a10502010005000000050a0100050000000500
-010005030202010302020503010005010b0100ff00ff00a10501010005000000050c0100
-05000000010005030202010302020503010005010b0100ff00ff00a10502010005000000
-050a0100050000000500010005030202010302020503010005010b0100ff00ff00a10501
-010005000000050c010005000000010005030202010302020503010005010b0100ff00ff
-00a10502010005000000050a010005000000050001000503020201030202050301000501
-0b0100ff00ff00a10501010005000000050c010005000000010005030202010302020503
-010005010b0100ff00ff00a10502010005000000050a0100050000000500010005030202
-010302020503010005010b0100ff00ff00a10501010005000000050c0100050000000100
-05030202010302020503010005010b0100ff00ff00a10502010005000000050a01000500
-00000500010005030202010302020503010005010b0100ff00ff00a10501010005000000
-050c010005000000010005030202010302020503010005010b0100ff00ff00a105020100
-05000000050a0100050000000500010005030202010302020503010005010b0100ff00ff
-00a10501010005000000050c010005000000010005030202010302020503010005010b01
-00ff00ff00a10502010005000000050a0100050000000500010005030202010302020503
-010005010b0100ff00ff00a10501010005000000050c0100050000000100050302020103
-02020503010005010b0100ff00ff00a10502010005000000050a01000500000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000000050c01000500
-0000010005030202010302020503010005010b0100ff00ff00a10502010005000000050a
-0100050000000500010005030202010302020503010005010b0100ff00ff00a105010100
-05000000050c010005000000010005030202010302020503010005010b0100ff00ff00a1
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-00ff00ff00a10501010005000000050c0100050000000100050302020103020205030100
-05010b0100ff00ff00a10502010005000000050a01000500000005000100050302020103
-02020503010005010b0100ff00ff00a10501010005000000050c01000500000001000503
-0202010302020503010005010b0100ff00ff00a10502010005000000050a010005000000
-0500010005030202010302020503010005010b0100ff00ff00a10501010005000000050c
-010005000000010005030202010302020503010005010b0100ff00ff00a1050201000500
-0000050a0100050000000500010005030202010302020503010005010b0100ff00ff00a1
-0501010005000000050c010005000000010005030202010302020503010005010b0100ff
-00ff00a10502010005000000050a01000500000005000100050302020103020205030100
-05010b0100ff00ff00a10501010005000000050c01000500000001000503020201030202
-0503010005010b0100ff00ff00a10502010005000000050a010005000000050001000503
-0202010302020503010005010b0100ff00ff00a10501010005000000050c010005000000
-010005030202010302020503010005010b0100ff00ff00a10502010005000000050a0100
-050000000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-0000050c010005000000010005030202010302020503010005010b0100ff00ff00a10502
-010005000000050a0100050000000500010005030202010302020503010005010b0100ff
-00ff00a10501010005000000050c01000500000001000503020201030202050301000501
-0b0100ff00ff00a10502010005000000050a010005000000050001000503020201030202
-0503010005010b0100ff00ff00a10501010005000000050c010005000000010005030202
-010302020503010005010b0100ff00ff00a10502010005000000050a0100050000000500
-010005030202010302020503010005010b0100ff00ff00a10501010005000000050c0100
-05000000010005030202010302020503010005010b0100ff00ff00a10502010005000000
-050a0100050000000500010005030202010302020503010005010b0100ff00ff00a10501
-010005000000050c010005000000010005030202010302020503010005010b0100ff00ff
-00a10502010005000000050a010005000000050001000503020201030202050301000501
-0b0100ff00ff00a10501010005000000050c010005000000010005030202010302020503
-010005010b0100ff00ff00a10502010005000000050a0100050000000500010005030202
-010302020503010005010b0100ff00ff00a10501010005000000050c0100050000000100
-05030202010302020503010005010b0100ff00ff00a10502010005000000050a01000500
-00000500010005030202010302020503010005010b0100ff00ff00a10501010005000000
-050c010005000000010005030202010302020503010005010b0100ff00ff00a105020100
-05000000050a0100050000000500010005030202010302020503010005010b0100ff00ff
-00a10501010005000000050c010005000000010005030202010302020503010005010b01
-00ff00ff00a10502010005000000050a0100050000000500010005030202010302020503
-010005010b0100ff00ff00a10501010005000000050c0100050000000100050302020103
-02020503010005010b0100ff00ff00a10502010005000000050a01000500000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000000050c01000500
-0000010005030202010302020503010005010b0100ff00ff00a10502010005000000050a
-0100050000000500010005030202010302020503010005010b0100ff00ff00a105010100
-05000000050c010005000000010005030202010302020503010005010b0100ff00ff00a1
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-00ff00ff00a10501010005000000050c0100050000000100050302020103020205030100
-05010b0100ff00ff00a10502010005000000050a01000500000005000100050302020103
-02020503010005010b0100ff00ff00a10501010005000000050c01000500000001000503
-0202010302020503010005010b0100ff00ff00a10502010005000000050a010005000000
-0500010005030202010302020503010005010b0100ff00ff00a10501010005000000050c
-010005000000010005030202010302020503010005010b0100ff00ff00a1050201000500
-0000050a0100050000000500010005030202010302020503010005010b0100ff00ff00a1
-0501010005000000050c010005000000010005030202010302020503010005010b0100ff
-00ff00a10502010005000000050a01000500000005000100050302020103020205030100
-05010b0100ff00ff00a10501010005000000050c01000500000001000503020201030202
-0503010005010b0100ff00ff00a10502010005000000050a010005000000050001000503
-0202010302020503010005010b0100ff00ff00a10501010005000000050c010005000000
-010005030202010302020503010005010b0100ff00ff00a10502010005000000050a0100
-050000000500010005030202010302020503010005010b0100ff00ff00a1050101000500
-0000050c010005000000010005030202010302020503010005010b0100ff00ff00a10502
-010005000000050a0100050000000500010005030202010302020503010005010b0100ff
-00ff00a10501010005000000050c01000500000001000503020201030202050301000501
-0b0100ff00ff00a10502010005000000050a010005000000050001000503020201030202
-0503010005010b0100ff00ff00a10501010005000000050c010005000000010005030202
-010302020503010005010b0100ff00ff00a10502010005000000050a0100050000000500
-010005030202010302020503010005010b0100ff00ff00a10501010005000000050c0100
-05000000010005030202010302020503010005010b0100ff00ff00a10502010005000000
-050a0100050000000500010005030202010302020503010005010b0100ff00ff00a10501
-010005000000050c010005000000010005030202010302020503010005010b0100ff00ff
-00a10502010005000000050a010005000000050001000503020201030202050301000501
-0b0100ff00ff00a10501010005000000050c010005000000010005030202010302020503
-010005010b0100ff00ff00a10502010005000000050a0100050000000500010005030202
-010302020503010005010b0100ff00ff00a10501010005000000050c0100050000000100
-05030202010302020503010005010b0100ff00ff00a10502010005000000050a01000500
-00000500010005030202010302020503010005010b0100ff00ff00a10501010005000000
-050c010005000000010005030202010302020503010005010b0100ff00ff00a105020100
-05000000050a0100050000000500010005030202010302020503010005010b0100ff00ff
-00a10501010005000000050c010005000000010005030202010302020503010005010b01
-00ff00ff00a10502010005000000050a0100050000000500010005030202010302020503
-010005010b0100ff00ff00a10501010005000000050c0100050000000100050302020103
-02020503010005010b0100ff00ff00a10502010005000000050a01000500000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000000050c01000500
-0000010005030202010302020503010005010b0100ff00ff00a10502010005000000050a
-0100050000000500010005030202010302020503010005010b0100ff00ff00a105010100
-05000000050c010005000000010005030202010302020503010005010b0100ff00ff00a1
-0502010005000000050a0100050000000500010005030202010302020503010005010b01
-00ff00ff00a10501010005000000050c0100050000000100050302020103020205030100
-05010b0100ff00ff00a10502010005000000050a01000500000005000100050302020103
-02020503010005010b0100ff00ff00a10501010005000000050c01000500000001000503
-0202010302020503010005010b0100ff00ff00a10502010005000000050a010005000000
-0500010005030202010302020503010005010b0100ff00ff00a10501010005000000050c
-010005000000010005030202010302020503010005010b0100ff00ff00a1050201000500
-0000050a0100050000000500010005030202010302020503010005010b0100ff00ff00a1
-0501010005000000050c010005000000010005030202010302020503010005010b0100ff
-00ff00a10502010005000000050a01000500000005000100050302020103020205030100
-05010b0100ff00ff00a10501010005000000050c01000500000001000503020201030202
-0503010005010b0100ff00ff00a10502010005000000050a010005000000050001000503
-0202010302020503010005010b0100ff00ff00a10501010005000000050c010005000000
-010005030202010302020503010005010b0100ff00ff00a1050201000500000005000100
-050001000500010005000100050001000500010005000000050001000503020201030202
-0503010005010b0100ff00ff00a105010100050000000500010005000100050001000500
-010005000100050001000500010005000000010005030202010302020503010005010b01
-00ff00ff00a105020100030e00000500010005030202010302020503010005010b0100ff
-00ff00a10501010005000000050000000500000005000000050000000500000005000000
-0500000005000000010005030202010302020503010005010b0100ff00ff00a105020100
-030000000500000005000000050000000500000005000000050000000500000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000300050000000508
-01000500030005000000010005030202010302020503010005010b0100ff00ff00a10502
-010003010500000005080100030000000500010005030202010302020503010005010b01
-00ff00ff00a1050101000500030100000508010003010500000001000503020201030202
-0503010005010b0100ff00ff00a105020100030200000506010005000301000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000302050000000504
-01000500030205000000010005030202010302020503010005010b0100ff00ff00a10502
-010003030500000005040100030200000500010005030202010302020503010005010b01
-00ff00ff00a1050101000500030300000504010003030500000001000503020201030202
-0503010005010b0100ff00ff00a105020100030400000502010005000303000005000100
-05030202010302020503010005010b0100ff00ff00a10501010005000304050000000500
-01000500030405000000010005030202010302020503010005010b0100ff00ff00a10502
-010003050500010005000100030400000500010005030202010302020503010005010b01
-00ff00ff00a1050101000500030500000500010003050500000001000503020201030202
-0503010005010b0100ff00ff00a105020100030601000500030500000500010005030202
-010302020503010005010b0000ff00ff00a2050101000500030605000306050000000100
-05030202010302020503010005ff05ff05a8010005000000050000000500000005000000
-050000000500000005000000050000000500010005030202010302020503010005ff05ff
-05a701000500000005000000050000000500000005000000050000000500000005000000
-0500000001000503020201030202050301ff01ff01bc0503020201030202050301000f01
-0717010007190e01000a0100000201000002010000050100000101000007010000060100
-000201000002010000010100002901000008010000000100000201000002010000050100
-000101000002010000050100000301000003010000020100000101000002010000250100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-01030202050301000f010717010007190e01000a01000002010000020100000101000002
-010000010100000201000003010000060100000201000002010000010100000201000025
-010000090100000301000002010000010100000201000001010000020100000101000002
-010000030100000301000002010000010100000201000025010000630100006301000063
-0100003e010005140100030e0000052401000503020201030202050301000f0107320e01
-000a01000003010200030102000301020004010000060100000201000002010000020102
-002601000009010000040103000201020003010300020102000501010002010300010100
-0002010000250100006301000063010000630100003e0100051301000500030e05000000
-052301000503020201030202050301000f0107320e01000a010000570100006301000063
-01000063010000630100003e010005140100030e00000524010005030202010302020503
-01000f0107320e0100070100000101000057010000630100006301000063010000630100
-003e0100051301000500030e05000000052301000503020201030202050301000f010732
-0e01000801010058010000630100006301000063010000630100003e010005140100030e
-0000052401000503020201030202050301000f0107320e01006301000063010000630100
-0063010000630100003e0100051301000500030e05000000052301000503020201030202
-050301000f0107320e010063010000630100006301000063010000630100003e01000514
-0100030e0000052401000503020201030202050301000f010e3400630100006301000063
-01000063010000630100003e0100051301000500030e0500000005230100050302020103
-0202050301000f000e3501ff01ff013805140100030e0000052401000503020201030202
-050301000c360d6301000d6301000d6301000d6301000d6301000d3e0100051301000500
-030e05000000052301000503020201030202050301000c3509000d6301000d6301000d63
-01000d6301000d6301000d3e010005140100030e00000524010005030202010302020503
-01000c01083209010d6301000d6301000d6301000d6301000d6301000d3e010005130100
-0500030e05000000052301000503020201030202050301000c01083209010d6301000d63
-01000d6301000d6301000d6301000d3e010005140100030e000005240100050302020103
-0202050301000c0108160102081809010d6301000d6301000d6301000d6301000d630100
-0d3e0100051301000500030e05000000052301000503020201030202050301000c010815
-010008020100081709010d0701000d1601000d4201000d0701000d0601020d1001000d0c
-01000d3001000d6301000d6301000d6301000d3e010005140100030e0000052401000503
-020201030202050301000c010815010008020100081709010d0701000d5a01000d070100
-0d0801000d1001000d0c01000d3001000d6301000d6301000d6301000d3e010005130100
-0500030e05000000052301000503020201030202050301000c0108150100080201000817
-09010d0701000d0101000d0301020d0201000d0001010d0301020d0201000d0001010d3b
-01000d0701000d0001010d0501000d0301020d0301020d0201000d0101000d0301020d02
-01000d0001010d0301020d0201000d0001010d0301010d0001000d1701000d6301000d63
-01000d6301000d3e010005140100030e0000052401000503020201030202050301000c01
-08160102081809010d0701000d0001000d0301000d0201000d0101010d0101000d040100
-0d0201010d0101000d3a01000d0701010d0101000d0401000d0201000d0201000d010100
-0d0201000d0101000d0001000d0301000d0201000d0101010d0101000d0101000d020100
-0d0101010d0101000d0101000d0101010d1701000d6301000d6301000d6301000d3e0100
-051301000500030e05000000052301000503020201030202050301000c01081501000802
-0100081709010d0701010d0801000d0101000d0801000d0201000d0201000d3a01000d07
-01000d0201000d0401000d0601000d0101000d0501010d0401000d0201000d0101000d02
-01000d0101000d0201000d0101000d0501000d0201000d1701000d6301000d6301000d63
-01000d3e010005140100030e0000052401000503020201030202050301000c0108150100
-08020100081709010d0701010d0501030d0101000d0801000d0201000d0201000d3a0100
-0d0701000d0201000d0401000d0301030d0101000d0501010d0401040d0101000d020100
-0d0101040d0101000d0501000d0201000d1701000d6301000d6301000d6301000d3e0100
-051301000500030e05000000052301000503020201030202050301000c01081501000802
-0100081709010d0701000d0001000d0301000d0201000d0101000d0801000d0201000d02
-01000d3a01000d0701000d0201000d0401000d0201000d0201000d0101000d0501000d00
-01000d0301000d0501000d0201000d0101000d0501000d0501000d0201000d1701000d63
-01000d6301000d6301000d3e010005140100030e00000524010005030202010302020503
-01000c0108160102081809010d0701000d0101000d0201000d0201000d0101000d080100
-0d0201000d0201000d3a01000d0701010d0101000d0401000d0201000d0201000d010100
-0d0201000d0101000d0101000d0201000d0201000d0101010d0101000d0101000d020100
-0d0101000d0501000d0101010d1701000d6301000d6301000d6301000d3e010005130100
-0500030e05000000052301000503020201030202050301000c01083209010d0701000d02
-01000d0201030d0101000d0801000d0201000d0201000d3a01000d0701000d0001010d05
-01000d0301030d0201020d0201000d0201000d0201020d0201000d0001010d0301020d02
-01000d0601010d0001000d1701000d6301000d6301000d6301000d3e010005140100030e
-0000052401000503020201030202050301000c01083209010d6301000d4a01000d170100
-0d6301000d6301000d6301000d3e0100051301000500030e050000000523010005030202
-01030202050301000c01083209010d6301000d4601000d0201000d1701000d6301000d63
-01000d6301000d3e010005140100030e0000052401000503020201030202050301000c01
-083209010d6301000d4701020d1801000d6301000d6301000d6301000d3e010005130100
-0500030e05000000052301000503020201030202050301000c01083209010d6301000d63
-01000d6301000d6301000d6301000d3e010005140100030e000005240100050302020103
-0202050301000c01083209010d6301000d6301000d6301000d6301000d6301000d3e0100
-051301000500030e05000000052301000503020201030202050301000c0109340d630100
-0d6301000d6301000d6301000d6301000d3e010005140100030e00000524010005030202
-01030202050301000c00093501ff01ff0138051301000500030e05000000052301000503
-020201030202050301000a360063010000630100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000a3501000063010000630100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-01030202050301000a0101340063010000630100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000a0101340063010000630100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-01030202050301000a0101160002011a0063010000630100006301000063010000630100
-003e010005140100030e0000052401000503020201030202050301000a01011500000102
-0000011900070100000e01000014010000340100002b0102003401000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0a010115000001020000011900070100000e0100004a0100002d01000034010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0a0101150000010200000119000701000001010000030102000201040002010200020100
-000001010003010200020100000001010003010200260100000701000002010000010100
-00000101000201000000010100030102000301020005010000030102002d010000630100
-0063010000630100003e0100051301000500030e05000000052301000503020201030202
-050301000a01011500000102000001190007010000000100000301000002010000030100
-000301000002010000010101000101000004010000020101000101000001010000020100
-002501000007010000020100000101010001010000010101000101000001010000020100
-0001010000020100000401000002010000020100002c0100006301000063010000630100
-003e010005140100030e0000052401000503020201030202050301000a01011600030119
-000701010008010000030100000701000001010000080100000201000002010000050100
-002501000007010000020100000101000002010000010100000201000001010000090100
-0004010000060100002c0100006301000063010000630100003e0100051301000500030e
-05000000052301000503020201030202050301000a010119000001190007010100050103
-000301000004010300010100000801000002010000020100000201030025010000070100
-000201000001010000020100000101000002010000020102000301030004010000030103
-002c0100006301000063010000630100003e010005140100030e00000524010005030202
-01030202050301000a0101180000011a0007010000000100000301000002010000030100
-000301000002010000010100000801000002010000020100000101000002010000250100
-000701000002010000010100000201000001010000020100000501000001010000020100
-000401000002010000020100002c0100006301000063010000630100003e010005130100
-0500030e05000000052301000503020201030202050301000a0101150002011b00070100
-000101000002010000020100000301000003010000020100000101000008010000020100
-000201000001010000020100002501000007010000010101000101010001010000010101
-0001010000010100000201000001010000020100000401000002010000020100002c0100
-006301000063010000630100003e010005140100030e0000052401000503020201030202
-050301000a01013400070100000201000002010300040101000201030001010000080100
-000201000002010000020103002501000008010100000100000101000000010100020100
-0000010100030102000301030004010000030103002c0100006301000063010000630100
-003e0100051301000500030e05000000052301000503020201030202050301000a010134
-00630100000e010000050100004c0100006301000063010000630100003e010005140100
-030e0000052401000503020201030202050301000a01013400630100000e010000050100
-004c0100006301000063010000630100003e0100051301000500030e0500000005230100
-0503020201030202050301000a01013400630100000e010000050100004c010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0a0101340063010000630100006301000063010000630100003e0100051301000500030e
-05000000052301000503020201030202050301000a010134006301000063010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0a0101340063010000630100006301000063010000630100003e0100051301000500030e
-05000000052301000503020201030202050301000a0001ff01ff016e05140100030e0000
-052401000503020201030202050301000c36006301000063010000630100006301000063
-0100003e0100051301000500030e05000000052301000503020201030202050301000c35
-09000063010000630100006301000063010000630100003e010005140100030e00000524
-01000503020201030202050301000c010832090100630100006301000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0c01083209010063010000630100006301000063010000630100003e010005140100030e
-0000052401000503020201030202050301000c0108130100080401020815090100630100
-00630100006301000063010000630100003e0100051301000500030e0500000005230100
-0503020201030202050301000c0108110102080301000802010008140901006301000032
-0102002d0100006301000063010000630100003e010005140100030e0000052401000503
-020201030202050301000c01081301000803010008020100081409010063010000340100
-002d0100006301000063010000630100003e0100051301000500030e0500000005230100
-0503020201030202050301000c0108130100080301000802010008140901000701010000
-010000030102000301010000010000010100000001010002010000020100000201020034
-010000070100000001010003010200020100000001010002010000000101000201010000
-01000003010200050100000201010000010000260100006301000063010000630100003e
-010005140100030e0000052401000503020201030202050301000c010813010008030100
-080201000814090100070100000001000000010000010100000201000001010000010101
-000101010001010000010100000201000001010000020100003301000007010100010100
-000101000002010000010101000101000001010100010100000101000000010000000100
-000101000002010000040100000201000000010000000100002501000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0c0108130100080301000802010008140901000701000000010000000100000501000001
-010000020100000101000002010000010100000201000001010000370100000701000002
-010000010100000201000001010000050100000501000000010000000100000501000004
-010000020100000001000000010000250100006301000063010000630100003e01000514
-0100030e0000052401000503020201030202050301000c01081301000803010008020100
-081409010007010000000100000001000002010300010100000201000001010000020100
-000101000002010000020102003401000007010000020100000101000002010000010100
-000501000005010000000100000001000002010300040100000201000000010000000100
-00250100006301000063010000630100003e0100051301000500030e0500000005230100
-0503020201030202050301000c0108130100080301000802010008140901000701000000
-010000000100000101000002010000010100000201000001010000020100000101000002
-010000050100003301000007010000020100000101000002010000010100000501000005
-010000000100000001000001010000020100000401000002010000000100000001000025
-0100006301000063010000630100003e010005140100030e000005240100050302020103
-0202050301000c0108110104080201020815090100070100000001000000010000010100
-000201000001010000010101000101000002010000010100000101010001010000020100
-003301000007010000020100000101000002010000010100000501000005010000000100
-000001000001010000020100000401000002010000000100000001000025010000630100
-0063010000630100003e0100051301000500030e05000000052301000503020201030202
-050301000c01083209010007010000000100000001000002010300020101000001000001
-010000020100000201010000010000020102003401000007010000020100000201020002
-010000050100000501000000010000000100000201030004010000020100000001000000
-010000250100006301000063010000630100003e010005140100030e0000052401000503
-020201030202050301000c01083209010019010000480100006301000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0c010832090100150100000201000048010000630100006301000063010000630100003e
-010005140100030e0000052401000503020201030202050301000c010832090100160102
-0049010000630100006301000063010000630100003e0100051301000500030e05000000
-052301000503020201030202050301000c01083209010063010000630100006301000063
-010000630100003e010005140100030e0000052401000503020201030202050301000c01
-083209010063010000630100006301000063010000630100003e0100051301000500030e
-05000000052301000503020201030202050301000c010934006301000063010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0c00093501ff01ff0138051301000500030e050000000523010005030202010302020503
-01000c360063010000630100006301000063010000630100003e010005140100030e0000
-052401000503020201030202050301000c35090000630100006301000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0c01083209010063010000630100006301000063010000630100003e010005140100030e
-0000052401000503020201030202050301000c0108320901006301000063010000630100
-0063010000630100003e0100051301000500030e05000000052301000503020201030202
-050301000c01081301000805010008160901006301000063010000630100006301000063
-0100003e010005140100030e0000052401000503020201030202050301000c0108110102
-0803010208160901001601020005010000420100002b0102003401000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-0c010813010008050100081609010018010000490100002d010000340100006301000063
-010000630100003e010005140100030e0000052401000503020201030202050301000c01
-081301000805010008160901000701010000010000030102000501000003010200020100
-00000101003b010000070100000201000001010000000101000201000000010100030102
-000301020005010000030102002d0100006301000063010000630100003e010005130100
-0500030e05000000052301000503020201030202050301000c0108130100080501000816
-090100070100000001000000010000010100000201000004010000050100000201010001
-0100003a0100000701000002010000010101000101000001010100010100000101000002
-01000001010000020100000401000002010000020100002c010000630100006301000063
-0100003e010005140100030e0000052401000503020201030202050301000c0108130100
-080501000816090100070100000001000000010000050100000401000005010000020100
-00020100003a010000070100000201000001010000020100000101000002010000010100
-000901000004010000060100002c0100006301000063010000630100003e010005130100
-0500030e05000000052301000503020201030202050301000c0108130100080501000816
-09010007010000000100000001000002010300040100000501000002010000020100003a
-010000070100000201000001010000020100000101000002010000020102000301030004
-010000030103002c0100006301000063010000630100003e010005140100030e00000524
-01000503020201030202050301000c010813010008050100081609010007010000000100
-00000100000101000002010000040100000501000002010000020100003a010000070100
-000201000001010000020100000101000002010000050100000101000002010000040100
-0002010000020100002c0100006301000063010000630100003e0100051301000500030e
-05000000052301000503020201030202050301000c010811010408010104081409010007
-01000000010000000100000101000002010000040100000501000002010000020100003a
-010000070100000101010001010100010100000101010001010000010100000201000001
-010000020100000401000002010000020100002c0100006301000063010000630100003e
-010005140100030e0000052401000503020201030202050301000c010832090100070100
-00000100000001000002010300040100000501000002010000020100003a010000080101
-000001000001010000000101000201000000010100030102000301030004010000030103
-002c0100006301000063010000630100003e0100051301000500030e0500000005230100
-0503020201030202050301000c010832090100630100000e010000050100004c01000063
-01000063010000630100003e010005140100030e00000524010005030202010302020503
-01000c010832090100630100000e010000050100004c0100006301000063010000630100
-003e0100051301000500030e05000000052301000503020201030202050301000c010832
-090100630100000e010000050100004c0100006301000063010000630100003e01000514
-0100030e0000052401000503020201030202050301000c01083209010063010000630100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-01030202050301000c01083209010063010000630100006301000063010000630100003e
-010005140100030e0000052401000503020201030202050301000c010934006301000063
-0100006301000063010000630100003e0100051301000500030e05000000052301000503
-020201030202050301000c00093501ff01ff013805140100030e00000524010005030202
-010302020503010005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000063010000630100006301000063010000630100003e01000513
-01000500030e050000000523010005030202010302020503010000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050001000063010000630100
-006301000063010000630100003e010005140100030e0000052401000503020201030202
-05030100050000000532010005000063010000630100006301000063010000630100003e
-0100051301000500030e0500000005230100050302020103020205030100000005340100
-0063010000630100006301000063010000630100003e010005140100030e000005240100
-050302020103020205030100050000000513010005040102051501000500006301000063
-0100006301000063010000630100003e0100051301000500030e05000000052301000503
-02020103020205030100000005120102050301000502010005150100001f010000420100
-001201000017010200340100006301000063010000630100003e010005140100030e0000
-052401000503020201030202050301000500000005130100050301000502010005140100
-050000630100001201000019010000340100006301000063010000630100003e01000513
-01000500030e050000000523010005030202010302020503010000000514010005030100
-050201000515010000070101000001000003010200020100000001010003010200030102
-003b01000008010200030101000001000002010200020100000001010002010000000101
-0005010000030102000201000000010100260100006301000063010000630100003e0100
-05140100030e000005240100050302020103020205030100050000000513010005060100
-051501000500000701000000010000000100000101000002010000010101000101000004
-01000002010000020100003a010000070100000201000001010000010101000101000002
-010000010101000101000001010100010100000401000002010000020100000101010001
-010000250100006301000063010000630100003e0100051301000500030e050000000523
-010005030202010302020503010000000514010005050100051701000007010000000100
-0000010000050100000101000008010000060100003a0100000701000002010000010100
-000201000001010000020100000101000002010000010100000201000004010000060100
-000101000002010000250100006301000063010000630100003e010005140100030e0000
-052401000503020201030202050301000500000005130100050401000517010005000007
-0100000001000000010000020103000101000008010000030103003a0100000701000002
-010000010100000201000001010400010100000201000001010000020100000401000003
-0103000101000002010000250100006301000063010000630100003e0100051301000500
-030e05000000052301000503020201030202050301000000051401000503010005020100
-051501000007010000000100000001000001010000020100000101000008010000020100
-00020100003a010000070100000201000001010000020100000101000005010000020100
-000101000002010000040100000201000002010000010100000201000025010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-050000000511010405010104051401000500000701000000010000000100000101000002
-010000010100000801000002010000020100003a01000007010000020100000101000001
-010100010100000201000001010000020100000101010001010000040100000201000002
-0100000101000002010000250100006301000063010000630100003e0100051301000500
-030e05000000052301000503020201030202050301000000053401000007010000000100
-0000010000020103000101000008010000030103003a0100000801020003010100000100
-000201020002010000020100000101000000010100050100000301030001010000020100
-00250100006301000063010000630100003e010005140100030e00000524010005030202
-0103020205030100050000000532010005000063010000230100003e0100006301000063
-010000630100003e0100051301000500030e050000000523010005030202010302020503
-01000000053401000063010000230100003e0100006301000063010000630100003e0100
-05140100030e000005240100050302020103020205030100050000000532010005000063
-010000230100003e0100006301000063010000630100003e0100051301000500030e0500
-000005230100050302020103020205030100000005340100006301000063010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-050000000532010005000063010000630100006301000063010000630100003e01000513
-01000500030e050000000523010005030202010302020503010000000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000063010000630100
-006301000063010000630100003e010005140100030e0000052401000503020201030202
-050301000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001ff01ff0138051301000500030e05000000052301000503020201030202
-050301000c360063010000630100006301000063010000630100003e010005140100030e
-0000052401000503020201030202050301000c3509000063010000630100006301000063
-010000630100003e0100051301000500030e050000000523010005030202010302020503
-01000c01083209010063010000630100006301000063010000630100003e010005140100
-030e0000052401000503020201030202050301000c010832090100630100006301000063
-01000063010000630100003e0100051301000500030e0500000005230100050302020103
-0202050301000c0108130100080401020815090100630100006301000063010000630100
-00630100003e010005140100030e0000052401000503020201030202050301000c010811
-010208030100080201000814090100170100004a01000007010000300102002601000063
-01000063010000630100003e0100051301000500030e0500000005230100050302020103
-0202050301000c0108130100080701000814090100170100004a01000007010000320100
-00260100006301000063010000630100003e010005140100030e00000524010005030202
-01030202050301000c010813010008070100081409010007010100000100000301020002
-010400020102004201000007010000000101000201000000010100030102000201010000
-010000020101000001000003010200020100000001010005010000030102000201000000
-010100180100006301000063010000630100003e0100051301000500030e050000000523
-01000503020201030202050301000c010813010008050101081509010007010000000100
-000001000001010000020100000301000003010000020100004101000007010100010100
-000101010001010000010100000201000001010000000100000001000001010000000100
-000001000001010000020100000101010001010000040100000201000002010000010101
-0001010000170100006301000063010000630100003e010005140100030e000005240100
-0503020201030202050301000c0108130100080701000814090100070100000001000000
-010000050100000301000003010000450100000701000002010000010100000501000002
-010000010100000001000000010000010100000001000000010000050100000101000002
-01000004010000060100000101000002010000170100006301000063010000630100003e
-0100051301000500030e05000000052301000503020201030202050301000c0108130100
-080701000814090100070100000001000000010000020103000301000004010200420100
-000701000002010000010100000501000002010000010100000001000000010000010100
-000001000000010000020103000101000002010000040100000301030001010000020100
-00170100006301000063010000630100003e010005140100030e00000524010005030202
-01030202050301000c010813010008030100080201000814090100070100000001000000
-010000010100000201000003010000070100004101000007010000020100000101000005
-010000020100000101000000010000000100000101000000010000000100000101000002
-010000010100000201000004010000020100000201000001010000020100001701000063
-01000063010000630100003e0100051301000500030e0500000005230100050302020103
-0202050301000c0108110104080201020815090100070100000001000000010000010100
-000201000003010000030100000201000041010000070101000101000001010000050100
-000201000001010000000100000001000001010000000100000001000001010000020100
-000101010001010000040100000201000002010000010100000201000017010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0c0108320901000701000000010000000100000201030004010100020102004201000007
-010000000101000201000006010200020100000001000000010000010100000001000000
-010000020103000101000000010100050100000301030001010000020100001701000063
-01000063010000630100003e0100051301000500030e0500000005230100050302020103
-0202050301000c0108320901006301000031010000300100006301000063010000630100
-003e010005140100030e0000052401000503020201030202050301000c01083209010063
-01000031010000300100006301000063010000630100003e0100051301000500030e0500
-0000052301000503020201030202050301000c0108320901006301000031010000300100
-006301000063010000630100003e010005140100030e0000052401000503020201030202
-050301000c01083209010063010000630100006301000063010000630100003e01000513
-01000500030e05000000052301000503020201030202050301000c010832090100630100
-00630100006301000063010000630100003e010005140100030e00000524010005030202
-01030202050301000c0109340063010000630100006301000063010000630100003e0100
-051301000500030e05000000052301000503020201030202050301000c00093501ff01ff
-013805140100030e0000052401000503020201030202050301000c360063010000630100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-01030202050301000c3509000063010000630100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000c0108320901006301000063
-0100006301000063010000630100003e0100051301000500030e05000000052301000503
-020201030202050301000c01083209010063010000630100006301000063010000630100
-003e010005140100030e0000052401000503020201030202050301000c01081301000806
-0100081509010063010000630100006301000063010000630100003e0100051301000500
-030e05000000052301000503020201030202050301000c01081101020805010108150901
-0011010000500100001e01000018010000290100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000c0108130100080401000800
-01000815090100630100001e01000018010000290100006301000063010000630100003e
-0100051301000500030e05000000052301000503020201030202050301000c0108130100
-080401000800010008150901000701000000010100030102000201000000010100030102
-004201000008010100000100000101000002010000020102000201040002010200020100
-000201000002010200020100000001010003010200020100000001010003010100000100
-00100100006301000063010000630100003e010005140100030e00000524010005030202
-01030202050301000c010813010008030100080101000815090100070101000101000004
-010000020101000101000001010000020100004101000007010000010101000101000002
-010000010100000201000003010000030100000201000001010000020100000101000002
-010000010101000101000001010000020100000101010001010000010100000101010010
-0100006301000063010000630100003e0100051301000500030e05000000052301000503
-020201030202050301000c01081301000802010008020100081509010007010000020100
-000401000002010000020100000501000041010000070100000201000001010000020100
-000101000007010000070100000101000002010000010100000501000002010000010100
-0002010000010100000501000002010000100100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000c0108130100080201050814
-090100070100000201000004010000020100000201000002010300410100000701000002
-010000010100000201000002010200040100000401030002010000000100000301020002
-010000020100000101040001010000050100000201000010010000630100006301000063
-0100003e0100051301000500030e05000000052301000503020201030202050301000c01
-081301000806010008150901000701000002010000040100000201000002010000010100
-000201000041010000070100000201000001010000020100000501000003010000030100
-000201000002010000000100000601000001010000020100000101000005010000050100
-0002010000100100006301000063010000630100003e010005140100030e000005240100
-0503020201030202050301000c0108110104080301020814090100070100000201000004
-010000020100000201000001010000020100004101000007010000010101000101000001
-010100010100000201000003010000030100000201000003010000030100000201000001
-010100010100000101000002010000010100000501000001010100100100006301000063
-010000630100003e0100051301000500030e050000000523010005030202010302020503
-01000c010832090100070100000201000004010000020100000201000002010300410100
-000801010000010000020101000001000002010200050101000201030003010000040102
-000201000000010100030102000201000006010100000100001001000063010000630100
-00630100003e010005140100030e0000052401000503020201030202050301000c010832
-090100630100000b01000044010000100100006301000063010000630100003e01000513
-01000500030e05000000052301000503020201030202050301000c010832090100630100
-0007010000020100004001000002010000100100006301000063010000630100003e0100
-05140100030e0000052401000503020201030202050301000c0108320901006301000008
-01020042010200110100006301000063010000630100003e0100051301000500030e0500
-0000052301000503020201030202050301000c0108320901006301000063010000630100
-0063010000630100003e010005140100030e000005240100050302020103020205030100
-0c01083209010063010000630100006301000063010000630100003e0100051301000500
-030e05000000052301000503020201030202050301000c01093400630100006301000063
-01000063010000630100003e010005140100030e00000524010005030202010302020503
-01000c00093501ff01ff0138051301000500030e05000000052301000503020201030202
-050301000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000063010000630100006301000063010000630100003e010005140100030e
-000005240100050302020103020205030100000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500010000630100006301000063010000630100
-00630100003e0100051301000500030e0500000005230100050302020103020205030100
-050000000532010005000063010000630100006301000063010000630100003e01000514
-0100030e0000052401000503020201030202050301000000053401000063010000630100
-006301000063010000630100003e0100051301000500030e050000000523010005030202
-010302020503010005000000051301000503010405140100050000630100006301000063
-01000063010000630100003e010005140100030e00000524010005030202010302020503
-01000000051201020503010005190100000f010200030102004901000007010000230100
-000b010200030102001f0100006301000063010000630100003e0100051301000500030e
-050000000523010005030202010302020503010005000000051301000503010005180100
-05000011010000050100004901000007010000230100000d010000050100001f01000063
-01000063010000630100003e010005140100030e00000524010005030202010302020503
-010000000514010005030100051901000008010200050100000501000003010200420100
-000701000000010100030102000201000000010100020100000001010003010200020104
-00010100000201000004010000050100001f0100006301000063010000630100003e0100
-051301000500000005000000050000000500000005000000050000000500000005000000
-05000000052301000503020201030202050301ff01ff0170051400000500000005000000
-050000000500000005000000050000000500000005000000052401000503020201030202
-0503010005ff05ff05ba010005030202010302020503010005ff05ff05ba010005030202
-010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba0100
-05030202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff
-05ba010005030202010302020503010005ff05ff05ba0100050302020103020205030100
-05ff05ff05ba01000503020201030202050301000549010005ff05ff056f010005030202
-01030202050301000548010105ff05ff056f010005030202010302020503010005470100
-0500010005ff05ff056f01000503020201030202050301000549010005ff05ff056f0100
-0503020201030202050301000549010005ff05ff056f0100050302020103020205030100
-0549010005ff05ff056f01000503020201030202050301000549010005ff05ff056f0100
-0503020201030202050301000549010005ff05ff056f0100050302020103020205030100
-0547010405ff05ff056d010005030202010302020503010005ff05ff05ba010005030202
-010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba0100
-05030202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff
-05ba01000503020201030202050301000538010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-054a01000503020201030202050301000537010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-054b01000503020201030202050301000538010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000003ff03ff031505000000054a01000503020201030202050301000537
-010005000000050000000500000005000000050000000500000005000000050000000500
-0000050000000500000005000000050000000500000005000000050003ff03ff03150000
-054b01000503020201030202050301000538010005000000050c0000050c010003ff03ff
-031505000000054a01000503020201030202050301000537010005000000050c0100050c
-0100050003ff03ff03150000054b01000503020201030202050301000538010005000000
-050c0000050c010003ff03ff031505000000054a01000503020201030202050301000537
-010005000000050c0100050c0100050003ff03ff03150000054b01000503020201030202
-050301000538010005000000050c0000050c010003ff03ff031505000000054a01000503
-020201030202050301000537010005000000050c0100050c0100050003ff03ff03150000
-054b01000503020201030202050301000538010005000000050c0000050c010003ff03ff
-031505000000054a01000503020201030202050301000537010005000000050c0100050c
-0100050003ff03ff03150000054b01000503020201030202050301000538010005000000
-050c0000050c010003ff03ff031505000000054a01000503020201030202050301000537
-010005000000050c0100050c0100050003ff03ff03150000054b01000503020201030202
-050301000538010005000000050c0000050c010003ff03ff031505000000054a01000503
-020201030202050301000537010005000000050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050003ff03ff03150000054b01000503020201030202050301000538010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010003ff03ff031505000000054a01000503
-020201030202050301000537010005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000054b01000503
-020201030202050301000538000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000054a01000503
-0202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba
-010005030202010302020503010005ff05ff05ba010005030202010302020503010005ff
-05ff05ba010005030202010302020503010005ff05ff05ba010005030202010302020503
-010005ff05ff05ba010005030202010302020503010005ff05ff05ba0100050302020103
-02020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba01000503
-0202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba
-010005030202010302020503010005ff05ff05ba010005030202010302020503010005ff
-05ff05ba010005030202010302020503010005ff05ff05ba010005030202010302020503
-010005ff05ff05ba010005030202010302020503010005ff05ff05ba0100050302020103
-02020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba01000503
-0202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba
-010005030202010302020503010005ff05ff05ba010005030202010302020503010005ff
-05ff05ba010005030202010302020503010005ff05ff05ba010005030202010302020503
-010005ff05ff05ba010005030202010302020503010005ff05ff05ba0100050302020103
-02020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba01000503
-0202010302020503010005ff05ff05ba010005030202010302020503010005ff05ff05ba
-010005030202010302020503010005ff05ff05ba010005030202010302020503010005ff
-05ff05ba010005030202010302020503010005ff05ff05ba010005030202010302020503
-010005ff05ff05ba010005030202010100040503010005ff05ff05ba0100050300050202
-0400050301ff01ff01bc050300000202040000000202040005ff05ff05c4000002020400
-00000202040005ff05ff05c400000202040000000202040005ff05ff05c4000002020400
-00000202040005ff05ff05c4000002020400000002020400000502ff02ff02b800060202
-040000000208040002ff02ff02b800000208040000000208040002ff02ff02b800000208
-040000000208040001ff01ff01b80000020804000000040901ff01ff01b800000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 61 377 359
-%%EOF
diff --git a/lib/tv/doc/src/tv_row_marked_popup.gif b/lib/tv/doc/src/tv_row_marked_popup.gif
deleted file mode 100644
index 9b3bc87959..0000000000
--- a/lib/tv/doc/src/tv_row_marked_popup.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_row_marked_popup.ps b/lib/tv/doc/src/tv_row_marked_popup.ps
deleted file mode 100644
index 7a909110d9..0000000000
--- a/lib/tv/doc/src/tv_row_marked_popup.ps
+++ /dev/null
@@ -1,1324 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_row_marked_popup.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:12:10 2001)
-%%BoundingBox: 0 64 377 377
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 64 377 377
-userdict begin
-%%BeginData:
-DisplayImage
-0 64
-377.000000 313.000000
-12
-760 630
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-ff0000
-d9d9d9
-b22222
-828282
-00ff00
-009100
-90ee90
-c3c3c3
-999999
-757575
-c8ffff
-000a01ff01ff01e1000b0208040001ff01ff01e100000208040000000208040002ff02ff
-02e1000002080400000002080400020000ff00ff00de0400020000000208040000000202
-04060200000004ff04ff04de020000000405020204000000020204000209000d02ff02ff
-02d500000202040000000202040002080000020d040002a501010206010102150101021e
-0101022901010206010102430101022a010102260101023201010233010102ae00000202
-040000000202040002080000020d04000277010502000107020101030206010702090101
-02060101021501010219010002030101021c0100020b010102060101022e010202020100
-020d0101022a0101020c0104021401010232010102160100021b010102ae000002020400
-00000202040002080000020d04000277010102070101020301010201010102080101020c
-010102060101021501010218010102210101020b010102060101022e010202020100020d
-01010238010102020101024801010215010102cc00000202040000000202040002080000
-0202040602030400027701010207010102030101020c0101020401030203010102000101
-020301010202010302020101020901010202010302030103020201030201010402010101
-020201030203010102000101020a01040201010302030101020001010203010102020103
-022701000200010102010100020201030203010402020103020201010209010102000101
-020101010203010302030101020201010200010102020101020101030202010402020101
-020101010202010102020101020001010203010102000101020301030203010402020104
-020501040202010102010101020501030201010402000101020101010204010302020101
-020001010201010102020103020201040202010402020103020301010200010102060104
-020201030274000002020400000004030208000002020400030400000203040002770101
-0207010102030102020b0101020301010201010102020102020001010202010102010101
-020101010201010102090101020101010201010102010101020101010200010102010101
-020101010203010102010101020101010202010202000101020a01010202010102010101
-020201020200010102020101020101010201010102260100020001010201010002010101
-020101010201010102010101020101010201010102010101020901020200010202000101
-020101010201010102020101020201020200010102010101020001010200010102010101
-020101010202010102010101020201010202010202000101020201020200010102010101
-020101010201010102050101020801010201010102020101020101010204010102010101
-020101010202010102010101020301010201010102010101020001010201010102010101
-020101010200010102050101020501010201010102020102020001010204010102050101
-020101010273000004030101020b00000203040003020000020404000277010402040101
-0204010302090101020701010202010102010101020201010201010102010101020d0101
-020101010201010102010101020801010201010102030101020101010201010102020101
-02010101020a010102060101020201010201010102020101020101010201010102260100
-0200010202000100020101010201010102010101020101010201010102010101020d0101
-020101010201010102050101020201010202010102010101020101010200010102000101
-020101010201010102020101020101010202010102020101020101010202010102010101
-020101010201010102010102020401020207010102010101020201010201010102040101
-020101010201010102030101020001000204010102010101020101020203010102010101
-020401020204010202040101020101010202010102010101020401020204010102010101
-02760103020b000002030400030200000204040002770101020701010206010202080101
-0204010402020101020101010202010102010105020d0101020101010201010102010101
-02050104020101010203010102010101020101010202010102010101020a010102030104
-020201010201010102020101020101050226010002010101020001000201010102010101
-020101010201010102010105020d01010201010102010101020201040202010102020101
-020101010201010102000101020001010201010102010101020201010201010102020101
-020201010201010102020101020101010201010502020103020301030205010102010101
-020201010201010102040105020101010204010102050105020101010204010102010101
-020501030203010302020101020101010202010102010101020501030202010502760103
-020b00000204040003000000020504000277010102070101020701010208010102030101
-020101010202010102010101020201010201010102110101020101010201010102010101
-0204010102010101020101010203010102010101020101010202010102010101020a0101
-020201010201010102020101020101010202010102010101022a01000202010202010101
-020101010201010102010101020101010211010102010101020101010201010102010101
-020201010202010102010101020101010201010102000101020001010200010202020101
-020101010202010102020101020101010202010102010101020101010208010202040102
-020401010201010102020101020101010204010102050101020301000200010102040101
-020501010204010102010101020701020204010202010101020101010202010102010101
-0207010202010101027a0103020b00000204040003000000020504000277010102070101
-020301010201010102080101020301010201010102020101020101010202010102010101
-020201000201010102090101020101010201010102010101020201000200010102010101
-020101010203010102010101020101010202010102010101020a01010202010102010101
-020201010201010102020101020101010202010002260100020201020201010102010101
-020101010200010202010101020201000201010102090101020101010201010102010101
-020101010202010102020101020101010202010102070101020001010202010102000102
-020201010202010102010101020201010201010102010101020201000205010102050101
-020101010200010102000102020201010200010202010101020001010202010002010101
-020201010201010102000101020001010202010002010101020401010201010102020100
-020401010205010102010101020101010202010102010101020101010204010102010101
-0202010002760103020b0000020500000206040002770105020301010204010302090101
-020401020200010102010104020301010202010302020101020901010202010302030103
-02020102020001010201010202010101020201030203010102010101020b010202010102
-020001010201010402030101020201030227010002030101020201030203010102000101
-020201030202010102090101020101010201010102020102020001010201010102020101
-020101010203010502050101020301010200010102020101020201010201010102020101
-020101010202010302020104020201040202010102010101020001010203010102000101
-020101010201010302030102020001010201010102000101020101030202010102040101
-020201030201010402020104020301030203010102010101020101010200010402030103
-02770103020b0000020d040002fc010602a201010201010102ff022a0103020b0000020d
-040002ff02a7010302ff022b0103020b0000020d040002ff02ff02d70103020c040d02ff
-02ff02d8010302ff02ff02f3010302ff02ff02f30103020200ff00ff00ec040002020103
-0202000004ff04ff04ec0202010302ff02ff02f30103020200ff00ff00ed020201030202
-00ff00ff00ec0800020201030202000106ff06ff06e90801020201030202000106ff06ff
-06e90801020201030202000106ff06ff06e90801020201030202000106ff06ff06e90801
-020201030202000106ff06ff06e908010202010302020001060b07040604070006030702
-061f07040610070206200702060b070006060700062d0700060207000604070006ff06fa
-07000602070006090702061308010202010302020001060b0700060f0700062107000614
-0700061f070006020700060a0700063507000602070006ff06ff0600070006020700060b
-0700061308010202010302020001060b0700060607020605070006030702061a07000604
-070206030702060507000603070206180700060207000601070006000701060207040602
-070206030702060207000600070106030702061807000602070006020702060307020602
-07000602070006ff06eb07000602070006020702060507000602070006000701060c0801
-0202010302020001060b0700060807000605070006020700060207000619070006030700
-060207000601070006020700060407000602070006020700061707000602070006010701
-060107000603070006060700060207000602070006010701060107000601070006020700
-0618070006000700060507000602070006020700060107000602070006ff06eb07000602
-07000601070006020700060407000602070106010700060b08010202010302020001060b
-070306050700060507000602070006020700061907000603070006020700060107000602
-07000604070006020700061b070006020700060107000602070006030700060607000602
-070006020700060107000602070006010700061c07000600070006050700060207000602
-070006010700060007000600070006ff06eb070406010700060207000604070006020700
-06020700060b08010202010302020001060b070006080700060507000602070406190700
-060307000602070006010700060207000604070006030702061807000602070006010700
-060207000603070006060700060207000602070006010700060207000602070206190700
-06000700060507000602070406010700060007000600070006ff06eb0700060207000601
-0704060407000602070006020700060b08010202010302020001060b0700060807000605
-070006020700061d07000603070006020700060107000602070006040700060607000617
-070006020700060107000602070006030700060607000602070006020700060107000602
-07000605070006190700060607000602070006050700060007000600070006ff06eb0700
-0602070006010700060807000602070006020700060b08010202010302020001060b0700
-060807000605070006020700060207000619070006030700060207000601070006020700
-060407000602070006020700061707000602070006010701060107000603070006060700
-060207000602070006010700060207000601070006020700061907000606070006020700
-0602070006010700060007000600070006ff06eb07000602070006010700060207000604
-07000602070106010700060b08010202010302020001060b070006080700060507000603
-0702061a0700060407020603070206050700060307020619070206020700060007010605
-07010604070006030702060207000602070006020702061a070006060700060307020603
-07000600070006ff06ec07000602070006020702060507000602070006000701060c0801
-0202010302020001067d070006ff06ff06590700060f08010202010302020001060a0706
-062a07060631070606000700063d070606ff06fe0706060e0700060f0801020201030202
-0001060a0706062a07060631070606000700063d070606ff06fe0706060e0700060f0801
-020201030202000106ff06ff06e90801020201030202000106ff06ff06e9080102020103
-0202000106ff06ff06e90801020201030202000108ff08ff08eb020201030202000008ff
-08ff08ec02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202010302020603
-0016061600160616004406160016061600160616001606ff06be02020103020206030015
-080006160015080006160015080000150800001508000616001508000616001508000616
-0015080006ff06be02020103020206030001061208010616000106120801061600010612
-080100010612080100010612080106160001061208010616000106120801061600010612
-080106ff06be020201030202060300010612080106160001061208010616000106120801
-000106120801000106120801061600010612080106160001061208010616000106120801
-06ff06be0202010302020603000106120801061600010603070206030702060408010616
-000106120801000106120801000106120801061600010612080106160001061208010616
-00010612080106ff06be0202010302020603000106080702060608010616000106030702
-060307020604080106160001061208010001061208010001061208010616000106050704
-0607080106160001060707010608080106160001060707030606080106ff06be02020103
-020206030001060b0701060408010616000106020704060107040603080106160001060e
-0700060208010001060e070006020801000106020700060e080106160001060307080605
-080106160001060607030607080106160001060507070604080106ff06be020201030202
-06030001060d070006000700060108010616000106020700060107010601070006010701
-0603080106160001060e0700060208010001060e070006020801000106020700060e0801
-061600010602070a06040801061600010606070306070801061600010604070306010703
-0603080106ff06be02020103020206030001060207020608070106010801061600010601
-070d0602080106160001060b07000601070006020801000106020700060a070006020801
-00010602070006010700060b080106160001060207030602070306040801061600010607
-0701060808010616000106040702060307020603080106ff06be02020103020206030001
-060107080602070206010801061600010600070006000703060007020600070406010801
-06160001060b07000601070006020801000106020700060a070006020801000106020700
-06010700060b080106160001060107030604070306030801061600010612080106160001
-06040702060307020603080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106080700060107000601
-070006020801000106020700060407000604070006020801000106020700060107000601
-070006080801061600010601070206030707060108010616000106050704060708010616
-000106050701060207020604080106ff06be020201030202060300010601070906060801
-061600010600070006000703060007020600070406010801061600010608070006010700
-060107000602080100010602070006040700060407000602080100010602070006010700
-060107000608080106160001060107020604070506020801061600010606070306070801
-06160001060907020605080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106050700060107000601
-070006010700060208010001060207000604070006010700060107000602080100010602
-070006010700060107000601070006050801061600010601070206050703060308010616
-0001060707020607080106160001060807020606080106ff06be02020103020206030001
-0601070d0602080106160001060007000600070706000704060108010616000106050700
-060107000601070006010700060208010001060207000604070006010700060107000602
-080100010602070006010700060107000601070006050801061600010601070306050701
-0604080106160001060707020607080106160001060707020607080106ff06be02020103
-020206030001060107030607070006030801061600010600070006000704060107000600
-070406010801061600010602070006010700060107000601070006010700060208010001
-060207000601070006010700060107000601070006020801000106020700060107000601
-07000601070006010700060208010616000106020703060b080106160001060707020607
-080106160001060707020607080106ff06be020201030202060300010601070206070700
-060408010616000106000706060107060601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106020709
-06050801061600010607070206070801061600010612080106ff06be0202010302020603
-000106010701060707000605080106160001060007000600070206050700060007020601
-080106160001060207000601070006010700060107000601070006020801000106020700
-060107000601070006010700060107000602080100010602070006010700060107000601
-070006010700060208010616000106030707060608010616000106060704060608010616
-0001060707020607080106ff06be02020103020206030001060107090606080106160001
-060007000600070206050700060007020601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106050704
-0607080106160001060507060605080106160001060707020607080106ff06be02020103
-020206030001061208010616000106000704060507040601080106160001061208010001
-0612080100010612080106160001061208010616000106120801061600010612080106ff
-06be02020103020206030001061208010616000106120801061600010612080100010612
-080100010612080106160001061208010616000106120801061600010612080106ff06be
-020201030202060300010612080106160001061208010616000106120801000106120801
-00010612080106160001061208010616000106120801061600010612080106ff06be0202
-010302020603000108140616000108140616000108140001081400010814061600010814
-06160001081406160001081406ff06be0202010302020603000008150616000008150616
-00000815000008150000081506160000081506160000081506160000081506ff06be0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed020201030202060301ff01ff01e5
-06030202010302020603010000ff00ff00cf010000120100060302020103020206030100
-00ff00ff00cf010000110800010006030202010302020603010000ff00ff00cf01000001
-060e0801010006030202010302020603010000ff00ff00cf01000001060e080101000603
-0202010302020603010000ff00ff00cf01000001060e0801010006030202010302020603
-0100003401010071010100ff00ff002401000001060e0801010006030202010302020603
-0100003301000075010000ff00ff002301000001060e0801010006030202010302020603
-010000070103000401000005010100190100000301000016010000100100000601020010
-0100000c0100001c010000ff00ff002301000001060e0801010006030202010302020603
-010000070100000201000002010100040100000101000018010000030100002801000008
-010000100100000c0100001c010000ff00ff002301000001060e08010100060302020103
-020206030100000701000002010000010100000001000004010000010100000301010012
-010000030100000101000003010200020100000001010003010200020100000001010009
-010000000101000501000003010200030102000201000001010000030102000201000000
-010100030102000201000000010100030101000001000003010000ff00ff002301000001
-0601010a0601080101000603020201030202060301000007010000020100000301000004
-010000010100000301010012010000030100000001000003010000020100000101010001
-010000040100000201010001010000080101000101000004010000020100000201000001
-010000020100000101000000010000030100000201000001010100010100000101000002
-0100000101010001010000010100000101010003010000ff00ff00230100000106020108
-060208010100060302020103020206030100000701030004010000040100000101000016
-010100040101000801000001010000080100000201000002010000080100000201000004
-010000060100000101000005010100040100000201000001010000020100000101000002
-01000001010000050100000201000004010100ff00ff0021010000010603010606030801
-010006030202010302020603010000070100000101000004010000040100000101000018
-010000030101000501030001010000080100000201000002010000080100000201000004
-010000030103000101000005010100040104000101000002010000010104000101000005
-0100000201000003010000ff00ff00230100000106040104060408010100060302020103
-020206030100000701000002010000030100000401000001010000180100000301000000
-010000030100000201000001010000080100000201000002010000080100000201000004
-010000020100000201000001010000050100000001000003010000050100000201000001
-01000005010000050100000201000003010000ff00ff0023010000010605010206050801
-010006030202010302020603010000070100000201000003010000040100000101000003
-010100120100000301000001010000020100000201000001010000080100000201000002
-010000030101000201010001010000040100000201000002010000010100000201000001
-010000010100000201000002010000010101000101000001010000020100000101000005
-0100000101010003010000ff00ff00230100000106060100060608010100060302020103
-020206030100000701000002010000010104000301010004010100120100000301000002
-010000020103000101000008010000020100000201000003010100020100000001010005
-010000030103000201020002010000020100000201020002010000000101000301020002
-010000060101000001000003010000ff00ff002301000001060e08010100060302020103
-0202060301000033010000290100004501000003010000ff00ff002301000001060e0801
-0100060302020103020206030100003401010025010100420100000201000001010100ff
-00ff002401000001060e0801010006030202010302020603010000a2010200ff00ff0029
-01000001060e0801010006030202010302020603010000ff00ff00cf01000001060e0801
-010006030202010302020603010000ff00ff00cf01000001060e08010100060302020103
-02020603010000ff00ff00cf01000001060e0801010006030202010302020603010000ff
-00ff00cf010000010810010006030202010302020603010000ff00ff00cf010000000811
-01000603020201030202060301ff01ff01e50603020201030202060301ff01ff01d10617
-0202010302020603010006ff06ff06bc0812010006170202010302020603010006ff06ff
-06bc08110000010006170202010302020603010006010dff0dff0db8060108010c060800
-0c060001010006170202010302020603010006010dff0dff0db70000060108010c050000
-08000c060001010006170202010302020603010006010d0100ff00ff00b6060108010c05
-000008010c050001010006170202010302020603010006010d0100ff00ff00b606010801
-0c04000108010c050001010006170202010302020603010006010d0100ff00ff00b60601
-08010c040001060008010c040001010006170202010302020603010006010d0100ff00ff
-00b6060108010c030001060108010c040001011406030202010302020603010006010d01
-00ff00ff00b6060108010c030001060208010c0300010100061201000603020201030202
-0603010006010d0100ff00ff00b6060108010c020001060308010c030001010006120100
-06030202010302020603010006010d0100ff00ff00b6060108010c020001060408010c02
-000101000612010006030202010302020603010006010d0100ff00ff00b6060108010c01
-0001060508010c02000101000612010006030202010302020603010006010d0100ff00ff
-00b6060108010c010001060608010c010001010006120100060302020103020206030100
-06010d0100ff00ff00b6060108010c000001060708010c01000101000612010006030202
-010302020603010006010d0100ff00ff00b6060108010c000001060808010c0000010100
-0612010006030202010302020603010006010d0100ff00ff00b6060108010001080b0c00
-000101000612010006030202010302020603010006010d0100ff00ff00b6060108010000
-080d000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0c0e000101000612010006030202010302020603010006010d01000301010071010100ff
-00ff003c06010801001001000612010006030202010302020603010006010d0100000c01
-01000c7501000c010e0000ff00ff003806010801000d0800000101000612010006030202
-010302020603010006010d0100000c0101000c0301000c1601000c1001000c0601020c10
-01000c0c01000c1c01000c010e0000ff00ff0038060108010001060a0801000101000612
-010006030202010302020603010006010d0100000c0101000c0301000c2801000c080100
-0c1001000c0c01000c1c01000c010e0000ff00ff0038060108010001060a080100010100
-0612010006030202010302020603010006010d0100000c0101000c0301000c0101000c03
-01020c0201000c0001010c0301020c0201000c0001010c0901000c0001010c0501000c03
-01020c0301020c0201000c0101000c0301020c0201000c0001010c0301020c0201000c00
-01010c0301010c0001000c0301000c010e0000ff00ff0038060108010001060a08010001
-01000612010006030202010302020603010006010d0100000c0101000c0301000c000100
-0c0301000c0201000c0101010c0101000c0401000c0201010c0101000c0801010c010100
-0c0401000c0201000c0201000c0101000c0201000c0101000c0001000c0301000c020100
-0c0101010c0101000c0101000c0201000c0101010c0101000c0101000c0101010c030100
-0c010e0000ff00ff0038060108010001060a080100010100061201000603020201030202
-0603010006010d01000001010c0401010c0801000c0101000c0801000c0201000c020100
-0c0801000c0201000c0401000c0601000c0101000c0501010c0401000c0201000c010100
-0c0201000c0101000c0201000c0101000c0501000c0201000c0401010e0000ff00ff0038
-060108010001060a0801000101000612010006030202010302020603010006010d010000
-0c0101000c0301010c0501030c0101000c0801000c0201000c0201000c0801000c020100
-0c0401000c0301030c0101000c0501010c0401040c0101000c0201000c0101040c010100
-0c0501000c0201000c0301000c010e0000ff00ff0038060108010001060a080100010100
-0612010006030202010302020603010006010d0100000c0101000c0301000c0001000c03
-01000c0201000c0101000c0801000c0201000c0201000c0801000c0201000c0401000c02
-01000c0201000c0101000c0501000c0001000c0301000c0501000c0201000c0101000c05
-01000c0501000c0201000c0301000c010e0000ff00ff0038060108010001060a08010001
-01000612010006030202010302020603010006010d0100000c0101000c0301000c010100
-0c0201000c0201000c0101000c0801000c0201000c0201000c0301010c0201010c010100
-0c0401000c0201000c0201000c0101000c0201000c0101000c0101000c0201000c020100
-0c0101010c0101000c0101000c0201000c0101000c0501000c0101010c0301000c010e00
-00ff00ff0038060108010001060a08010001010006120100060302020103020206030100
-06010d0100000c0101000c0301000c0201000c0201030c0101000c0801000c0201000c02
-01000c0301010c0201000c0001010c0501000c0301030c0201020c0201000c0201000c02
-01020c0201000c0001010c0301020c0201000c0601010c0001000c0301000c010e0000ff
-00ff0038060108010001060a080100010100061201000603020201030202060301000601
-0d0100000c0101000c2901000c4501000c0301000c010e0000ff00ff0038060108010001
-060a0801000101000612010006030202010302020603010006010d0100000c0201010c25
-01010c4201000c0201000c0101010c020e0000ff00ff0038060108010001060a08010001
-01000612010006030202010302020603010006010d0100000e7001020e0800ff00ff0038
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001060a08010001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010001060a080100010100061201000603
-0202010302020603010006010d0100ff00ff00b6060108010001060a0801000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010001060a08010001
-01000612010006030202010302020603010006010d0100ff00ff00b6060108010001060a
-0801000101000612010006030202010302020603010006010d0100ff00ff00b606010801
-0001060a0801000101000612010006030202010302020603010006010d0100ff00ff00b6
-060108010001060a0801000101000612010006030202010302020603010006010d0100ff
-00ff00b6060108010001060a080100010100061201000603020201030202060301000601
-0d0100ff00ff00b6060108010001060a0801000101000612010006030202010302020603
-010006010d0100ff00ff00b6060108010001080c00010100061201000603020201030202
-0603010006010d0100ff00ff00b6060108010000080d0001010006120100060302020103
-02020603010006010d0100ff00ff00b6060108010c0e0001010006120100060302020103
-02020603010006010d0100ff00ff00b60601080100100100061201000603020201030202
-0603010006010d0100ff00ff00b6060108010c00000c0800000101000612010006030202
-010302020603010006010d0100ff00ff00b6060108010c000001060808010c0000010100
-0612010006030202010302020603010006010d0100ff00ff00b6060108010c0100010607
-08010c00000101000612010006030202010302020603010006010d0100ff00ff00b60601
-08010c010001060608010c01000101000612010006030202010302020603010006010d01
-00ff00ff00b6060108010c020001060508010c0100010100061201000603020201030202
-0603010006010d0100ff00ff00b6060108010c020001060408010c020001010006120100
-06030202010302020603010006010d0100ff00ff00b6060108010c030001060308010c02
-000101000612010006030202010302020603010006010d0100ff00ff00b6060108010c03
-0001060208010c03000101000612010006030202010302020603010006010d0100ff00ff
-00b6060108010c040001060108010c030001010006120100060302020103020206030100
-06010d0100ff00ff00b6060108010c040001060008010c04000101000612010006030202
-010302020603010006010d0100ff00ff00b6060108010c05000008020c04000101000612
-010006030202010302020603010006010d0100ff00ff00b6060108010c05000008010c05
-000101000612010006030202010302020603010006010d0100ff00ff00b6060108010c06
-08010c05000101000612010006030202010302020603010006010d0000ff00ff00b70601
-08010c0608000c06000101000612010006030202010302020603010006ff06ff06bc0801
-001001000612010006030202010302020603010006ff06ff06bc08000011010006120100
-0603020201030202060301ff01ff01d1061201000603020201030202060301000b010932
-0a0100630100006301000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000b010916010209180a010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000b01091501000902010009170a010063010000170100002001020026
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000b01091501000902010009170a01006301000017010000220100
-002601000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000b01091501000902010009170a01000e0100000001010003
-0102000201000000010100420100000f0102000201040001010000020100000101000000
-010100030102000201000000010100050100000301020002010000000101001801000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000b010916010209180a01000e010100010100000101000002010000010101
-0001010000410100000e0100000201000003010000030100000201000001010100010100
-000101000002010000010101000101000004010000020100000201000001010100010100
-001701000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000b01091501000902010009170a01000e0100000201000001
-0100000201000001010000450100000e0100000701000003010000020100000101000005
-010000020100000101000002010000040100000601000001010000020100001701000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000b01091501000902010009170a01000e0100000201000001010400010100
-00450100000f010200040100000301000002010000010100000501040001010000020100
-000401000003010300010100000201000017010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000b01091501000902
-010009170a01000e01000002010000010100000501000045010000120100000301000003
-010000020100000101000005010000050100000201000004010000020100000201000001
-010000020100001701000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000b010916010209180a01000e010100010100
-00010100000201000001010000450100000e010000020100000301000003010000010101
-000101000005010000020100000101010001010000040100000201000002010000010100
-00020100001701000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000b0109320a01000e010000000101000301020002
-010000450100000f01020005010100020101000001000001010000060102000201000000
-010100050100000301030001010000020100001701000063010000630100006301000063
-010000020100061308010c0e0001062301000603020201030202060301000b0109320a01
-000e01000053010000310100003001000063010000630100006301000063010000020100
-061308010c0e0001062301000603020201030202060301000b0109320a01000e01000053
-010000310100003001000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000b0109320a01000e01000053010000310100
-003001000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000b0109320a01006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000b01
-09320a010063010000630100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000b010a34006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000b000a3501ff01ff0161061308010c0e00010623010006030202010302020603
-0100009a0100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100003508000063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061601020618080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106150100060201000617080100260100003b01000019010000170102002d01000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000001061501000602010006170801006301000019010000190100002d0100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000001061501000602010006170801000e010100000100000301020002
-010000000101000301020003010200340100000f01020003010100000100000201020002
-010000000101000201000000010100050100000301020002010000000101001f01000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000001061501000602010006170801000e0100000001000000010000010100
-00020100000101010001010000040100000201000002010000330100000e010000020100
-000101000001010100010100000201000001010100010100000101010001010000040100
-00020100000201000001010100010100001e010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061601030617
-0801000e010000000100000001000005010000010100000801000006010000330100000e
-010000020100000101000002010000010100000201000001010000020100000101000002
-010000040100000601000001010000020100001e01000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106190100
-06170801000e010000000100000001000002010300010100000801000003010300330100
-000e01000002010000010100000201000001010400010100000201000001010000020100
-00040100000301030001010000020100001e010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061801000618
-0801000e0100000001000000010000010100000201000001010000080100000201000002
-010000330100000e01000002010000010100000201000001010000050100000201000001
-0100000201000004010000020100000201000001010000020100001e0100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010615010206190801000e01000000010000000100000101000002010000010100
-00080100000201000002010000330100000e010000020100000101000001010100010100
-000201000001010000020100000101010001010000040100000201000002010000010100
-00020100001e01000063010000630100006301000063010000020100061308010c0e0001
-06230100060302020103020206030100000106320801000e010000000100000001000002
-010300010100000801000003010300330100000f01020003010100000100000201020002
-010000020100000101000000010100050100000301030001010000020100001e01000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-02020603010000010632080100630100002a010000370100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100002a01000037010000630100006301000063010000630100000201000613
-08010c0e00010623010006030202010302020603010000010632080100630100002a0100
-003701000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010834006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000000083501ff01ff0161061308010c0e00010623010006030202010302020603
-010005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000f6301000f6301000f6301000f6301000f6301000f6301000f02010006130801
-0c0e00010623010006030202010302020603010000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050001000f6301000f6301000f6301000f63
-01000f6301000f6301000f020100061308010c0e00010623010006030202010302020603
-0100050000000532010005000f6301000f6301000f6301000f6301000f6301000f630100
-0f020100061308010c0e0001062301000603020201030202060301000000053401000f63
-01000f6301000f6301000f6301000f6301000f6301000f020100061308010c0e00010623
-01000603020201030202060301000500000005130100050401020515010005000f630100
-0f6301000f6301000f6301000f6301000f6301000f020100061308010c0e000106230100
-0603020201030202060301000000051201020503010005020100051501000f0e01000f16
-01000f3b01000f0e01000f0601020f1001000f0c01000f2901000f6301000f6301000f63
-01000f6301000f020100061308010c0e0001062301000603020201030202060301000500
-00000513010005030100050201000514010005000f0e01000f5301000f0e01000f080100
-0f1001000f0c01000f2901000f6301000f6301000f6301000f6301000f02010006130801
-0c0e00010623010006030202010302020603010000000514010005030100050201000515
-01000f0e01000f0101000f0301020f0201000f0001010f0301020f0201000f0001010f34
-01000f0e01000f0001010f0501000f0301020f0301020f0201000f0101000f0301020f02
-01000f0001010f0301020f0201000f0001010f0301010f0001000f1001000f6301000f63
-01000f6301000f6301000f020100061308010c0e00010623010006030202010302020603
-0100050000000513010005030100050201000514010005000f0e01000f0001000f030100
-0f0201000f0101010f0101000f0401000f0201010f0101000f3301000f0e01010f010100
-0f0401000f0201000f0201000f0101000f0201000f0101000f0001000f0301000f020100
-0f0101010f0101000f0101000f0201000f0101010f0101000f0101000f0101010f100100
-0f6301000f6301000f6301000f6301000f020100061308010c0e00010623010006030202
-01030202060301000000051401000503010005020100051501000f0e01010f0801000f01
-01000f0801000f0201000f0201000f3301000f0e01000f0201000f0401000f0601000f01
-01000f0501010f0401000f0201000f0101000f0201000f0101000f0201000f0101000f05
-01000f0201000f1001000f6301000f6301000f6301000f6301000f020100061308010c0e
-000106230100060302020103020206030100050000000513010005030100050201000514
-010005000f0e01010f0501030f0101000f0801000f0201000f0201000f3301000f0e0100
-0f0201000f0401000f0301030f0101000f0501010f0401040f0101000f0201000f010104
-0f0101000f0501000f0201000f1001000f6301000f6301000f6301000f6301000f020100
-061308010c0e000106230100060302020103020206030100000005140100050301000502
-0100051501000f0e01000f0001000f0301000f0201000f0101000f0801000f0201000f02
-01000f3301000f0e01000f0201000f0401000f0201000f0201000f0101000f0501000f00
-01000f0301000f0501000f0201000f0101000f0501000f0501000f0201000f1001000f63
-01000f6301000f6301000f6301000f020100061308010c0e000106230100060302020103
-0202060301000500000005110104050201020515010005000f0e01000f0101000f020100
-0f0201000f0101000f0801000f0201000f0201000f3301000f0e01010f0101000f040100
-0f0201000f0201000f0101000f0201000f0101000f0101000f0201000f0201000f010101
-0f0101000f0101000f0201000f0101000f0501000f0101010f1001000f6301000f630100
-0f6301000f6301000f020100061308010c0e000106230100060302020103020206030100
-0000053401000f0e01000f0201000f0201030f0101000f0801000f0201000f0201000f33
-01000f0e01000f0001010f0501000f0301030f0201020f0201000f0201000f0201020f02
-01000f0001010f0301020f0201000f0601010f0001000f1001000f6301000f6301000f63
-01000f6301000f020100061308010c0e0001062301000603020201030202060301000500
-00000532010005000f6301000f5101000f1001000f6301000f6301000f6301000f630100
-0f020100061308010c0e0001062301000603020201030202060301000000053401000f63
-01000f4d01000f0201000f1001000f6301000f6301000f6301000f6301000f0201000613
-08010c0e000106230100060302020103020206030100050000000532010005000f630100
-0f4e01020f1101000f6301000f6301000f6301000f6301000f020100061308010c0e0001
-062301000603020201030202060301000000053401000f6301000f6301000f6301000f63
-01000f6301000f6301000f020100061308010c0e00010623010006030202010302020603
-0100050000000532010005000f6301000f6301000f6301000f6301000f6301000f630100
-0f020100061308010c0e0001062301000603020201030202060301000000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100050001000f6301000f63
-01000f6301000f6301000f6301000f6301000f020100061308010c0e0001062301000603
-020201030202060301000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050001ff01ff0161061308010c0e000106230100060302020103
-020206030100050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500010000630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000000534
-010000630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100050000000513010005050100051601000500
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000000051201020503010205170100001e01000043
-0100000e01000006010200100100000c0100002901000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100050000000513
-010005050100051601000500001e010000430100000e01000008010000100100000c0100
-002901000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000000051401000505010005170100000e0101000001000003
-01020002010400020102003b0100000e0100000001010005010000030102000301020002
-010000010100000301020002010000000101000301020002010000000101000301010000
-0100001001000063010000630100006301000063010000020100061308010c0e00010623
-0100060302020103020206030100050000000513010005050100051601000500000e0100
-00000100000001000001010000020100000301000003010000020100003a0100000e0101
-000101000004010000020100000201000001010000020100000101000000010000030100
-000201000001010100010100000101000002010000010101000101000001010000010101
-001001000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000000051401000505010005170100000e0100000001000000
-0100000501000003010000030100003e0100000e01000002010000040100000601000001
-010000050101000401000002010000010100000201000001010000020100000101000005
-010000020100001001000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100050000000513010005050100051601000500
-000e01000000010000000100000201030003010000040102003b0100000e010000020100
-000401000003010300010100000501010004010400010100000201000001010400010100
-000501000002010000100100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000000051401000505010005170100000e
-0100000001000000010000010100000201000003010000070100003a0100000e01000002
-010000040100000201000002010000010100000501000000010000030100000501000002
-010000010100000501000005010000020100001001000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100050000000511
-010405010104051401000500000e01000000010000000100000101000002010000030100
-0003010000020100003a0100000e01010001010000040100000201000002010000010100
-000201000001010000010100000201000002010000010101000101000001010000020100
-000101000005010000010101001001000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000005340100000e01000000
-010000000100000201030004010100020102003b0100000e010000000101000501000003
-010300020102000201000002010000020102000201000000010100030102000201000006
-010100000100001001000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100050000000532010005000063010000510100
-001001000063010000630100006301000063010000020100061308010c0e000106230100
-06030202010302020603010000000534010000630100004d010000020100001001000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000500000005320100050000630100004e0102001101000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000005340100006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000500000005320100050000630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010000630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001ff01ff
-0161061308010c0e000106230100060302020103020206030100009a0100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100003508000063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000604010206150801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061101020603
-010006020100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006030100
-060201000614080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060301000602
-010006140801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000606010006150801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000605010006160801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061301000604010006170801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000603010006020100061408010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010611010406010104061408010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010834006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000000083501ff01ff0161061308010c0e00010623010006030202010302020603
-0100009a0100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100003508000063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061301000604010206150801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061101020603010006020100061408010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006070100061408010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010613
-010006070100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006050101
-061508010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010613010006070100061408010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006070100061408010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010613010006030100060201000614080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106110104060201020615080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106320801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000108340063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000000083501ff01ff0161061308010c0e000106230100060302020103
-020206030100009a01000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000035080000630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006060100061508010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010611010206050101061508010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006040100060001000615080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106130100060401000600010006150801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000603010006010100061508010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010613
-010006020100060201000615080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106130100
-060201050614080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060601000615
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106110104060301020614080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000108340063010000630100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000000083501ff01ff0161061308010c0e
-000106230100060302020103020206030100009a01000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000035
-080000630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006030104
-061408010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010611010206030100061808010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006030100061808010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010613010006030100061808010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006030103061508010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010613
-010006070100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006070100
-061408010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010613010006020100060301000614
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106110104060101030615080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000108340063010000630100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000000083501ff01ff0161061308010c0e
-000106230100060302020103020206030100009a01000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000035
-080000630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006050102
-061408010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010611010206040100061708010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006030100061808010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010613010006030100061808010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006030103061508010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010613
-010006030100060201000614080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106130100
-060301000602010006140801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000603
-010006020100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010611010406020102
-061508010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106320801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010834006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000000083501ff01ff
-0161061308010c0e000106230100060302020103020206030100009a0100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100003508000063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000603010406140801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061101020603
-010006020100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006060100
-061508010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010613010006060100061508010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006060100061508010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010613010006060100061508010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006050100061608010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010613
-010006050100061608010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010611010406030100
-061608010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106320801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010834006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000000083501ff01ff
-0161061308010c0e000106230100060302020103020206030100009a0100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100003508000063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000604010206150801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061101020603
-010006020100061408010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006030100
-060201000614080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060301000602
-010006140801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000604010206150801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000603010006020100061408010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006030100060201000614080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106130100060301000602010006140801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061101040602010206150801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001083400630100
-006301000063010000630100006301000063010000020100061308010010062301000603
-020201030202060301ff01ff019906130800001106230100060302020103020206030100
-06ff06ff06e3010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-06030202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff
-06e301000603020201030202060301000649010006ff06ff069801000603020201030202
-060301000648010106ff06ff069801000603020201030202060301000647010006000100
-06ff06ff069801000603020201030202060301000649010006ff06ff0698010006030202
-01030202060301000649010006ff06ff0698010006030202010302020603010006490100
-06ff06ff069801000603020201030202060301000649010006ff06ff0698010006030202
-01030202060301000649010006ff06ff0698010006030202010302020603010006470104
-06ff06ff0696010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-060302020103020206030100063708ff08ff0860064a0100060302020103020206030100
-063708ff08ff085f0000064a010006030202010302020603010006370801001d0cff0cff
-0c3e0001064a010006030202010302020603010006370801001c08000cff0cff0c3e0001
-064a0100060302020103020206030100063708010001060b08000000060b08010cff0cff
-0c3e0001064a0100060302020103020206030100063708010001060b08000000060b0801
-0cff0cff0c3e0001064a0100060302020103020206030100063708010001060b08000000
-060b08010cff0cff0c3e0001064a0100060302020103020206030100063708010001060b
-08000000060b08010cff0cff0c3e0001064a010006030202010302020603010006370801
-0001060b08000000060b08010cff0cff0c3e0001064a0100060302020103020206030100
-063708010001060b08000000060b08010cff0cff0c3e0001064a01000603020201030202
-06030100063708010001060b08000000060b08010cff0cff0c3e0001064a010006030202
-0103020206030100063708010001060b08000000060b08010cff0cff0c3e0001064a0100
-060302020103020206030100063708010001060b08000000060b08010cff0cff0c3e0001
-064a0100060302020103020206030100063708010001060b08000000060b08010cff0cff
-0c3e0001064a0100060302020103020206030100063708010001060b08000000060b0801
-0cff0cff0c3e0001064a0100060302020103020206030100063708010001080c0000080d
-0cff0cff0c3e0001064a0100060302020103020206030100063708010000081c0cff0cff
-0c3e0001064a01000603020201030202060301000637080100ff00ff005e064a01000603
-020201030202060301000637080000ff00ff005f064a0100060302020103020206030100
-06ff06ff06e3010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-06030202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff
-06e3010006030202010302020603010006ff06ff06e30100060302020103020206030100
-06ff06ff06e3010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-06030202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff
-06e3010006030202010302020603010006ff06ff06e30100060302020103020206030100
-06ff06ff06e3010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-06030202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff
-06e3010006030202010302020603010006ff06ff06e30100060302020103020206030100
-06ff06ff06e3010006030202010302020603010006ff06ff06e301000603020201030202
-0603010006ff06ff06e3010006030202010302020603010006ff06ff06e3010006030202
-010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e30100
-06030202010100040603010006ff06ff06e301000603000502020400060301ff01ff01e5
-060300000202040000000202040006ff06ff06ed00000202040000000202040006ff06ff
-06ed00000202040000000202040006ff06ff06ed00000202040000000202040006ff06ff
-06ed000002020400000002020400000502ff02ff02e100060202040000000208040002ff
-02ff02e100000208040000000208040002ff02ff02e100000208040000000208040001ff
-01ff01e10000020804000000040901ff01ff01e100000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 64 377 377
-%%EOF
diff --git a/lib/tv/doc/src/tv_search_result.gif b/lib/tv/doc/src/tv_search_result.gif
deleted file mode 100644
index 3e615b4875..0000000000
--- a/lib/tv/doc/src/tv_search_result.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_search_result.ps b/lib/tv/doc/src/tv_search_result.ps
deleted file mode 100644
index 14d0331a8f..0000000000
--- a/lib/tv/doc/src/tv_search_result.ps
+++ /dev/null
@@ -1,2739 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_search_result.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:10:46 2001)
-%%BoundingBox: 0 34 400 249
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 34 400 249
-userdict begin
-%%BeginData:
-DisplayImage
-0 34
-400.000000 215.000000
-12
-1051 565
-1
-0
-0
-32
-ffffff
-000000
-d8d8d8
-4ac1df
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-00ff00
-ff0000
-aa2455
-990000
-7f7f7f
-999999
-ff7f7f
-009900
-7fff7f
-ffd700
-998100
-ffff7f
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-03ba01010000010100000100000001000000010000000100000001000000010000000100
-000101000002010103ff03ff03ff03ff0300010200000100000001000000010000000100
-000001000000010000000100000101000002010103f5000a01ff01ff0137000a03be0101
-000101000000010000000100000001000000010000000100000101000002010103f60000
-0208050001ff01ff013700000208050003bf010100010100000001000000010000000100
-00000100000101000002010103f700000208050002ff02ff023700000208050003c00101
-00010100000001000000010000000100000101000002010103f800000208050002ff02ff
-023700000208050003c10101000101000000010000000100000101000002010103f90000
-0202050602ff02ff0237000005050202050003c201010001010000000100000101000002
-010103fa0000020205000209000d02ff02ff022b00000202050003c30101000101000001
-01000002010103fb00000202050002080000020d05000234010302110103023201020258
-0102020c010102010101021e010102290101020601010208010102310101022a01010230
-0101024100000202050003c40101000201000002010103fc00000202050002080000020d
-05000234010102020107020001010203010102010101020e01050200010702010103020d
-0101020401010204010302030103020e010302060103020301030203010302060103020b
-0101020a0101020201010219010002030101021c0100020b01010206010102090101021b
-010202020100020d0101022a0101020c0104021e0101024100000202050003c501010000
-01000002010103fd00000202050002080000020d05000234010102050101020301010203
-010102010101020e0101020701010203010102010101020c010102020103020301010201
-010102010101020101010208010102010101020101010204010102010101020101010201
-0101020101010201010102040101020101010201010102060101020a0101020201010218
-010102210101020b01010206010102090101021b010202020100020d0101023801010202
-0101021d0101024100000202050003c601010002010103fe000002020500020800000202
-0506020305000234010102050101020301010203010102010101020e0101020701010203
-010102050101020901010203010102070101020101010201010102060102020201010201
-010102080101020101010201010102010101020101010204010102010101020201020203
-0101020a0101020301010202010302030103020201030201010402010101020201030203
-010102000101020a0104020101030203010102000101020301010202010302030101021a
-010002000101020101000202010302030104020201030202010102090101020001010201
-010102030103020301010202010102000101020201010201010302020101020001010201
-010102030103020201010200010102010101020201030202010102020101023000000202
-050003c701000001010103ff000005030208000002020500040400000203050002340101
-02050101020401010202010002020101020e0101020701010203010202040101020a0100
-020301010207010102010101020101010205010102040101020101010208010102010101
-02010101020101010201010102040101020101010204010102020100020b010102030101
-020101010201010102010101020101010200010102010101020101010203010102010101
-020101010202010202000101020a01010202010102010101020201020200010102020101
-020101010201010102020101021a01000200010102010100020101010201010102010101
-020101010201010102010101020101010209010202000102020001010201010102010101
-020201010202010202000101020101010200010102000101020201020200010202000101
-020101010201010102010101020001010201010102010101020101010201010102020101
-02300000050303c7010303ff03000101020b000002030500040200000204050002340101
-02050101020401010201010102020101020e01040204010102040103020d010102040101
-020501020202010102010101020401010205010102010101020701010202010102010101
-020201040204010102010101020501010202010102090101020301010201010102010101
-0201010102080101020101010203010102010101020101010202010102010101020a0101
-02060101020201010201010102020101020101010201010102020101021a010002000102
-02000100020101010201010102010101020101010201010102010101020d010102010101
-020101010205010102020101020201010201010102010101020001010200010102020101
-020101010201010102050101020101020203010102010101020101010201010102020100
-0234010103c8010103ff03010101020b0000020305000402000002040500023401010205
-0101020501010200010002030101020e01010207010102060102020e0100020301010207
-010102010101020101010205010102040101020101010206010102030101020101010205
-010102040101020101010204010102020100020b01010203010102010101020101010201
-010102050104020101010203010102010101020101010202010102010101020a01010203
-01040202010102010101020201010201010502020101021a010002010101020001000201
-010102010101020101010201010102010105020d01010201010102010101020201040202
-010102020101020101010201010102000101020001010202010102010101020101010202
-010402010101020401010201010502020101020001010234010103ff03cc0101020b0000
-02040500040000000205050002340101020501010205010302030101020e010102070101
-02070101020d010102030101020701010201010102010101020601020202010102010101
-0205010102040101020101010205010102040101020101010202010202030101020a0101
-020301010201010102010101020101010204010102010101020101010203010102010101
-020101010202010102010101020a01010202010102010101020201010201010102020101
-0201010102060101021a0100020201020201010102010101020101010201010102010101
-021101010201010102010101020101010201010102020101020201010201010102010101
-020101010200010102010101020101010201010102010101020101010201010102040101
-0201010102060101020001000235010103ff03cc0101020b000002040500040000000205
-050002340101020501010206010102040101020e01010207010102030101020101010201
-010102080101020401010203010102010101020101010201010102010101020401010201
-010102010101020101010200010502010101020101010201010102010101020101010200
-0101020101010201010102060101020a0101020201010201010102010101020101010202
-01000200010102010101020101010203010102010101020101010202010102010101020a
-01010202010102010101020201010201010102020101020101010202010002010101021b
-010002020102020101010201010102010101020001020201010102020100020101010209
-010102010101020101010201010102010101020201010202010102010101020201010207
-010102010101020101010201010102010101020101010204010102010101020201000203
-01020235010103ff03cc0101020b00000205000002060500023401010205010102060101
-02040101020e010502030101020401030202010102080101020401010204010302030103
-0202010102090103020201010200010502020103020301030202010102010103020b0101
-020a01010202010102020103020301030202010202000101020101020201010102020103
-0203010102010101020b0102020101020200010102010104020301010202010302020101
-021b01000203010102020103020301010200010102020103020201010209010102010101
-020101010202010202000101020101010202010102010101020301050202010102010101
-020101010202010202000101020001010204010102020103020401010236010103ff03cc
-0101020b0000020d050002340103021101030232010202190100023d0102020c01010237
-010602230101029e01010237010103ff03cc0101020b0000020d0500029d010002ff0254
-01010237010103ae0100030801000305010103ff030a0101020b0000020d050002ff02ff
-022d010103ae0100030801000306010003ff030a0101020c050d02ff02ff022e010103ae
-0100030801000306010003ff030a010102ff02ff0249010103ac01040301010303000103
-0303010003030102030201030307010203010100030001010307010003e2010102ff02ff
-0249010103ae010003020100030201000300010003020100030201000302010003020100
-03000100030a01000302010003000101030101000306010003e2010102ff02ff02490101
-03ae01000302010003020100030001000302010003020100030201040301010203070100
-0302010003000100030201000306010003e2010102ff02ff0249010103ae010003020100
-030101010300010003020100030201000302010003080100030601000302010003000100
-030201000306010003e2010102ff02ff0249010103af0101030101010300010003000103
-0302010203020102030101030308010203010100030201000306010003e2010102020600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-0000060000000202010103ff03cc01010202000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000600000006000000060000000600000006000202010103ff03cc0101
-02020600000006ff06ff064001000202010103ff03cc01010202000006ff06ff06400100
-06000202010103ff03cc010102020600000006ff06ff064001000202010103ff03cc0101
-0202000006ff06ff0640010006000202010103ff03cc010102020600000006ff06ff0640
-01000202010103ff03cc010102020000060c07040604070006030702061f070406050700
-060407000604070006190700060207000604070006270702060b07000606070006ff065e
-070006020700060907020613010006000202010103ff03cc0101020206000000060b0700
-060f0700061f070006090700060a07000619070006020700062c070006020700060a0700
-06ff0666070006020700060b0700061401000202010103ff03cc010102020000060c0700
-060607020605070006030702061807000606070106000700060207020602070406170700
-060207000602070206030702060207000602070006170700060207000601070006000701
-06020704060207020603070206020700060007010603070206ff06490700060207000602
-0702060507000602070006000701060c010006000202010103ff03cc0101020206000000
-060b07000608070006050700060207000602070006170700060507000601070106040700
-06040700061a070006000700060507000602070006020700060107000602070006170700
-060207000601070106010700060307000606070006020700060207000601070106010700
-060107000602070006ff0648070006020700060107000602070006040700060207010601
-0700060c01000202010103ff03cc010102020000060c0703060507000605070006020700
-060207000617070306020700060207000604070006040700061a07000600070006050700
-060207000602070006010700060007000600070006170700060207000601070006020700
-0603070006060700060207000602070006010700060207000601070006ff064c07040601
-070006020700060407000602070006020700060b010006000202010103ff03cc01010202
-06000000060b070006080700060507000602070406170700060507000602070006040700
-06040700061a070006000700060507000602070406010700060007000600070006170700
-060207000601070006020700060307000606070006020700060207000601070006020700
-0602070206ff064907000602070006010704060407000602070006020700060c01000202
-010103ff03cc010102020000060c0700060807000605070006020700061b070006050700
-060207000604070006040700061b07000606070006020700060507000600070006000700
-061707000602070006010700060207000603070006060700060207000602070006010700
-060207000605070006ff064807000602070006010700060807000602070006020700060b
-010006000202010103ff03cc0101020206000000060b0700060807000605070006020700
-060207000617070006050700060107010604070006040700061b07000606070006020700
-060207000601070006000700060007000617070006020700060107010601070006030700
-0606070006020700060207000601070006020700060107000602070006ff064807000602
-07000601070006020700060407000602070106010700060c01000202010103ff03cc0101
-02020000060c070006080700060507000603070206180704060207010600070006040700
-060507010619070006060700060307020603070006000700061907020602070006000701
-06050701060407000603070206020700060207000602070206ff06490700060207000602
-0702060507000602070006000701060c010006000202010103ff03cc0101020206000000
-06a8070006ff06840700061001000202010103ff03cc010102020000060b0706062a0706
-062a0706062a07060600070006ff066e0706060e0700060f010006000202010103ff03cc
-0101020206000000060a0706062a0706062a0706062a07060600070006ff066e0706060e
-0700061001000202010103ff03cc01010202000006ff06ff0640010006000202010103ff
-03cc010102020600000006ff06ff064001000202010103ff03cc01010202000006ff06ff
-0640010006000202010103ff03cc01010202060000000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-01000600010006000100060001000600010006000100060001000202010103ff03cc0101
-020200000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000202010103ff03cc0101020206ff06ff06430202010103ff03cc
-0101020206ff06ff06430202010103ff03cc0101020206ff06ff06430202010103ff03cc
-0101020206ff06ff06430202010103ff03cc0101020206ff06ff06430202010103ff03cc
-0101020206ff06ff06430202010103ff03cc0101020206ff06ff06430202010103ff03cc
-0101020206ff06ff06430202010103ff03cc010102020636000006000000060000000600
-00000600000006000000060000000600000006000000060000000600000006000000061a
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000601000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000601000006000000060000000600
-00000600000006000000060000000600000006000000060000000600000006000000061a
-000006000000060000000600000006000000060000000600000006000000060000000600
-00000600000006000000061a000006000000060000000600000006000000060000000600
-00000600000006000000060000000600000006000000061a000006000000060000000600
-0000060000000600000006000000060000000600000006000000060000000600000006fb
-0202010103ff03cc01010202063500000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060001000618000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600010000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060001000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000100
-061800000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060001000618000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600010006180000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000600010006fa0202010103ff03cc010102020636000006140100061a
-00000614010006010000061401000601000006140100061a000006140100061a00000614
-0100061a00000614010006fb0202010103ff03cc01010202063500000616010006180000
-061601000000061601000000061601000618000006160100061800000616010006180000
-0616010006fa0202010103ff03cc010102020636000006140100061a0000061401000601
-0000061401000601000006140100061a000006140100061a000006140100061a00000614
-010006fb0202010103ff03cc010102020635000006050702060307020606010006180000
-061601000000061601000000061601000618000006160100061800000616010006180000
-0616010006fa0202010103ff03cc0101020206360000060407020603070206050100061a
-00000614010006010000061401000601000006140100061a00000606070406080100061a
-00000608070106090100061a0000060807030607010006fb0202010103ff03cc01010202
-063500000604070406010704060501000618000006100700060401000000061007000604
-010000000604070006100100061800000605070806070100061800000608070306090100
-06180000060707070606010006fa0202010103ff03cc0101020206360000060307000601
-0701060107000601070106040100061a0000060f07000603010006010000060f07000603
-01000601000006030700060f0100061a00000603070a06050100061a0000060707030608
-0100061a000006050703060107030604010006fb0202010103ff03cc0101020206350000
-0603070d0604010006180000060d07000601070006040100000006040700060a07000604
-010000000604070006010700060d01000618000006040703060207030606010006180000
-06090701060a01000618000006060702060307020605010006fa0202010103ff03cc0101
-0202063600000601070006000703060007020600070406020100061a0000060c07000601
-0700060301000601000006030700060a070006030100060100000603070006010700060c
-0100061a0000060207030604070306040100061a000006140100061a0000060507020603
-07020604010006fb0202010103ff03cc0101020206350000060207000600070306000702
-060007040603010006180000060a07000601070006010700060401000000060407000604
-070006040700060401000000060407000601070006010700060a01000618000006030702
-060307070603010006180000060707040609010006180000060707010602070206060100
-06fa0202010103ff03cc0101020206360000060107000600070306000702060007040602
-0100061a0000060907000601070006010700060301000601000006030700060407000604
-0700060301000601000006030700060107000601070006090100061a0000060207020604
-070506030100061a00000607070306080100061a0000060a07020606010006fb02020101
-03ff03cc0101020206350000060207000600070306000702060007040603010006180000
-060707000601070006010700060107000604010000000604070006040700060107000601
-070006040100000006040700060107000601070006010700060701000618000006030702
-060507030605010006180000060907020609010006180000060a07020608010006fa0202
-010103ff03cc010102020636000006010700060007070600070406020100061a00000606
-070006010700060107000601070006030100060100000603070006040700060107000601
-070006030100060100000603070006010700060107000601070006060100061a00000602
-07030605070106050100061a00000608070206080100061a0000060807020608010006fb
-0202010103ff03cc01010202063500000602070006000704060107000600070406030100
-061800000604070006010700060107000601070006010700060401000000060407000601
-070006010700060107000601070006040100000006040700060107000601070006010700
-06010700060401000618000006040703060d010006180000060907020609010006180000
-060907020609010006fa0202010103ff03cc010102020636000006010706060107060602
-0100061a0000060307000601070006010700060107000601070006030100060100000603
-070006010700060107000601070006010700060301000601000006030700060107000601
-0700060107000601070006030100061a00000603070906060100061a0000060807020608
-0100061a00000614010006fb0202010103ff03cc01010202063500000602070006000702
-060507000600070206030100061800000604070006010700060107000601070006010700
-060401000000060407000601070006010700060107000601070006040100000006040700
-060107000601070006010700060107000604010006180000060507070608010006180000
-060807040608010006180000060907020609010006fa0202010103ff03cc010102020636
-00000601070006000702060507000600070206020100061a000006030700060107000601
-070006010700060107000603010006010000060307000601070006010700060107000601
-07000603010006010000060307000601070006010700060107000601070006030100061a
-00000606070406080100061a00000606070606060100061a0000060807020608010006fb
-0202010103ff03cc01010202063500000602070406050704060301000618000006160100
-000006160100000006160100061800000616010006180000061601000618000006160100
-06fa0202010103ff03cc010102020636000006140100061a000006140100060100000614
-01000601000006140100061a000006140100061a000006140100061a00000614010006fb
-0202010103ff03cc01010202063500000616010006180000061601000000061601000000
-0616010006180000061601000618000006160100061800000616010006fa0202010103ff
-03cc010102020636000006140100061a0000061401000601000006140100060100000614
-0100061a000006140100061a000006140100061a00000614010006fb0202010103ff03cc
-010102020635000006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006180000060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-000006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010000000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000618000006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006180000060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100061800000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-0600010006fa0202010103ff03cc01010202063601000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100061a01000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060101000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060101000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100061a01000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100061a01000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100061a01000600010006000100060001000600
-01000600010006000100060001000600010006000100060001000600010006fb02020101
-03ff03cc0101020206ff06ff06430202010103ff03cc0101020206ff06ff064302020101
-0303000a01ff01b0000a03010101020206ff06ff064302020101030300000208050001ff
-01b000000208050003010101020206ff06ff064302020101030300000208050002ff02b0
-00000208050003010101020206ff06ff064302020101030300000208050002ff02b00000
-0208050003010101020206ff06ff064302020101030300000202050602ff02b000000505
-0202050003010101020206ff06ff06430202010103030000020205000209000d02ff02a4
-00000202050003010101020206ff06ff064302020101030300000202050002080000020d
-0500029001030211010302330101021501010206010102a1000002020500030101010202
-06ff06ff064302020101030300000202050002080000020d050002900101020201070200
-01010203010102010101020e010302200101020c0103020401010206010102110100028e
-00000202050003010101020206ff06ff064302020101030300000202050002080000020d
-05000290010102050101020301010203010102010101020d010102010101021f0101020b
-0101020101010203010102190101028e00000202050003010101020206ff06ff06430202
-010103030000020205000208000002020506020305000290010102050101020301010203
-010102010101020d01010206010302030103020201010200010102010103020201010200
-01010207010102030101020201010200010102030101020201030203010302000104028c
-000002020500030101010202060301ff01ff013b06030202010103030000050302080000
-0202050004040000020305000290010102050101020401010202010002020101020d0102
-020401010201010102010101020101010201010102000101020001010201010102010102
-020001010206010102030101020201020200010102020101020101010201010102010101
-0201010102000101028e000005030301010102020603010006ff06ff0625010006000000
-060000000600000006000000060000000600000006000000060000000600000006000100
-06030202010103030101020b000002030500040200000204050002900101020501010204
-01010201010102020101020e010302020101020101010205010102010102020201010205
-010102010101020601010203010102020101020101010202010102010101020101010201
-010102040101029101010301010102020603010006ff06ff062501000000060000000600
-000006000000060000000600000006000000060000000600000006000101060302020101
-03030101020b000002030500040200000204050002900101020501010205010102000100
-020301010210010202010105020201040201010102030101020501010201010102060101
-020301010202010102010101020201010201010502010101020401010291010103010101
-02020603010006010dff0dff0d210601010006000000060e010006000100060302020101
-03030101020b000002040500040000000205050002900101020501010205010302030101
-021101010201010102050101020101010201010102030101020501010201010102060101
-020301010202010102010101020201010201010102050101020401010291010103010101
-02020603010006010dff0dff0d2000000601010000000610010106030202010103030101
-020b000002040500040000000205050002900101020501010206010102040101020d0101
-020101010201010102020100020101010201010102010101020301010202010002010101
-020101010207010102010101020301010201010102020101020101010202010002010101
-0202010002000101029101010301010102020603010006010d0100ff00ff001f06010100
-06000000060e01000600010006030202010103030101020b000002050000020605000290
-0101020501010206010102040101020e0103020301030203010202000101020001010204
-01030202010102010101020801030204010402030101020201030203010302020102028f
-01010301010102020603010006010d0100ff00ff001f0601010000000610010106030202
-010103030101020b0000020d050002900103021101030254010102a40101030101010202
-0603010006010d0100ff00ff001f0601010006000000060e010006000100060302020101
-03030101020b0000020d050002fd010202a501010301010102020603010006010d0100ff
-00ff001f0601010000000610010106030202010103030101020b0000020d050002ff02a6
-01010301010102020603010006010d0100ff00ff001f0601010006000000060e01000600
-010006030202010103030101020c050d02ff02a701010301010102020603010006010d01
-00ff00ff001f0601010000000602010a060201010603020201010303010102ff02c20101
-0301010102020603010006010d0100ff00ff001f06010100060000000602010806020100
-060001000603020201010303010102ff02c201010301010102020603010006010d0100ff
-00ff001f06010100000006040106060401010603020201010303010102ff02c201010301
-010102020603010006010d0100ff00ff001f060101000600000006040104060401000600
-01000603020201010303010102ff02c201010301010102020603010006010d0100ff00ff
-001f06010100000006060102060601010603020201010303010102ff02c2010103010101
-02020603010006010d0100ff00ff001f0601010006000000060601000606010006000100
-06030202010103030101020206ff06bc020201010301010102020603010006010d0100ff
-00ff001f0601010000000610010106030202010103030101020206ff06bc020201010301
-010102020603010006010d0100ff00ff001f0601010006000000060e0100060001000603
-0202010103030101020206ff06bc020201010301010102020603010006010d0100ff00ff
-001f0601010000000610010106030202010103030101020206ff06bc0202010103010101
-02020603010006010d0100ff00ff001f0601010006000000060e01000600010006030202
-010103030101020206ff06bc020201010301010102020603010006010d0100ff00ff001f
-0601010000000610010106030202010103030101020206ff06bc02020101030101010202
-0603010006010d0100ff00ff001f0601010006000000060e010006000100060302020101
-03030101020206ff06bc020201010301010102020603010006010d0000ff00ff00200601
-010000000610010106030202010103030101020206ff06bc020201010301010102020603
-010006ff06ff062501000600000006000100060001000600010006000100060001000600
-010006000100060001000600010006030202010103030101020206ff06bc020201010301
-010102020603010006ff06ff062501000000060001000600010006000100060001000600
-01000600010006000100060001000600010106030202010103030101020206ff06bc0202
-0101030101010202060301ff01ff013b0603020201010303010102020608000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006080202010103010101020206ff06ff
-064302020101030301010202060700000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600010006070202010103010101020206ff06ff064302020101030301010202
-0608000006ff06a8010006080202010103010101020206ff06ff06430202010103030101
-02020607000006ff06aa010006070202010103010101020206ff06ff0643020201010303
-010102020608000006ff06a8010006080202010103010101020206ff06ff064302020101
-0303010102020607000006ff06aa010006070202010103010101020206ff06ff06430202
-01010303010102020608000006ff06a8010006080202010103010101020206ff06ff0643
-020201010303010102020607000006ff06aa010006070202010103010101020206ff06ff
-0643020201010303010102020608000006ff06a8010006080202010103010101020206ff
-06ff0643020201010303010102020607000006ff06aa0100060702020101030101010202
-06ff06ff0643020201010303010102020608000006ff06a8010006080202010103010101
-020206ff06ff0643020201010303010102020607000006ff06aa01000607020201010301
-0101020206ff06ff0643020201010303010102020608000006ff06a80100060802020101
-03010101020206ff06ff0643020201010303010102020607000006ff0649000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000611010006070202010103010101020206ff06ff0643020201010303
-010102020608000006ff0647000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006110100060802020101
-03010101020206ff06ff0643020201010303010102020607000006ff06490000064c0100
-0611010006070202010103010101020206ff06ff06430202010103030101020206080000
-06ff06470000064c01000611010006080202010103010101020206ff06ff064302020101
-03030101020206070000060d0102061e0100060f010106ff06060000064c010006110100
-06070202010103010101020206ff06ff06430202010103030101020206080000060b0100
-06020100061d0100060e010006ff06070000064c01000611010006080202010103010101
-020206ff06ff06430202010103030101020206070000060c010006060102060301020602
-010006000101060301020602010006000101060b01000604010206020100060001010604
-010106f20000064c01000611010006070202010103010101020206ff06ff064302020101
-03030101020206080000060c010006040100060201000601010006020100060101010601
-010006010100060201000601010106010100060801040601010006020100060101010601
-01000603010106f10000064c010006110100060802020101030101010202060301ff01ff
-013b06030202010103030101020206070000060e01010602010006020100060501000601
-0100060501000605010006020100060a010006030100060201000601010006fc0000064c
-0100061101000607020201010301010102020603010006ff06ed0100064a010006030202
-010103030101020206080000060f01000601010406020103060101000605010006050100
-06020100060a010006030100060201000601010006fb000006120102061e010006160100
-06110100060802020101030101010202060301000663010506ff06830100064a01000603
-0202010103030101020206070000060c0100060201000601010006050100060201000601
-0100060501000605010006020100060a010006030100060201000601010006fc00000610
-010006020100061d01000617010006110100060702020101030101010202060301000662
-010706ff06820100064a010006030202010103030101020206080000060b010006020100
-060101000602010006010100060201000601010006050100060201000601010006020100
-060a01000603010006020100060101000607010106f10000061101000606010206030102
-060201000600010106030102060201000600010106130100061101000608020201010301
-0101020206030100066101020603010206ff06810100064a010006030202010103030101
-020206070000060d0102060301020603010306010100060601020602010006020100060a
-010006040102060201000607010106f20000061101000604010006020100060101000602
-010006010101060101000601010006020100060101010601010006130100061101000607
-0202010103010101020206030100066101010605010106ff06810100064a010006030202
-01010303010102020608000006ff06470000061301010602010006020100060501000601
-010006050100060501000602010006120100061101000608020201010301010102020603
-0100066101020603010206ff06810100064a010006030202010103030101020206070000
-06ff06490000061401000601010406020103060101000605010006050100060201000613
-010006110100060702020101030101010202060301000662010706ff06820100064a0100
-0603020201010303010102020608000006ff064700000611010006020100060101000605
-010006020100060101000605010006050100060201000612010006110100060802020101
-030101010202060301000663010506ff06830100064a0100060302020101030301010202
-0607000006ff064900000610010006020100060101000602010006010100060201000601
-010006050100060201000601010006020100061301000611010006070202010103010101
-0202060301000665010106ff06850100064a010006030202010103030101020206080000
-06ff06470000061201020603010206030103060101000606010206020100060201000612
-010006110100060802020101030101010202060301000665010106ff06850100064a0100
-0603020201010303010102020607000006ff06490000064c010006110100060702020101
-030101010202060301000665010106ff06850100064a0100060302020101030301010202
-0608000006ff06470000064c010006110100060802020101030101010202060301000665
-010106ff06850100064a01000603020201010303010102020607000006ff06490000064c
-010006110100060702020101030101010202060301000665010106ff06850100064a0100
-0603020201010303010102020608000006ff06470000064c010006110100060802020101
-030101010202060301000665010106ff06850100064a0100060302020101030301010202
-06070000060b0dff0d2806140000064c0100061101000607020201010301010102020603
-0100066101010600010206ff06850100064a010006030202010103030101020206080000
-060a0dff0d27000006130000064c01000611010006080202010103010101020206030100
-066101010600010206ff06850100064a010006030202010103030101020206070000060b
-0d0100ff002606140000064c010006110100060702020101030101010202060301000661
-010506ff06850100064a010006030202010103030101020206080000060a0d0100ff0026
-06130000064c010006110100060802020101030101010202060301000661010506ff0685
-0100064a010006030202010103030101020206070000060b0d0100ff002606140000064c
-01000611010006070202010103010101020206030100066101020600010106ff06850100
-064a010006030202010103030101020206080000060a0d0100ff002606130000064c0100
-061101000608020201010301010102020603010006ff06ed0100064a0100060302020101
-03030101020206070000060b0d0100ff0026061400000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000611
-0100060702020101030101010202060301ff01ef064a0100060302020101030301010202
-06080000060a0d0100ff0026061300000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000611010006080202
-010103010101020206030100063513610c04060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-0000060000000600000006000000060000000600000006000000060000000c0406000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000c040600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000c04060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000001000614010006000100060001000600
-010006000100060001000600010006000100060001000624010006030202010103030101
-020206070000060b0d01001f010000ff0005067501000607020201010301010102020603
-01000635136012000c030100000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-0000060000000600000006000000060000000600000006000c0301000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000c03010000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-00000600000006000000060000000600000006000c030100000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060001000613010006000100060001000600
-010006000100060001000600010006000100060001000600000006230100060302020101
-03030101020206080000060a0d01001d0100000001000000010000ff0003067401000608
-020201010301010102020603010006351301115d12010c01010206000000065c01000c01
-010206000000065c01000c01010206000000065c01000c01010206000000061f01000614
-0100040e00000624010006030202010103030101020206070000060b0d01000101000002
-01000002010200030102000301020003010200ff00040675010006070202010103010101
-02020603010006351301112c0100112f12010c0101020000062b0102062d010006000c01
-01020000062b0102062d010006000c0101020000062d0100062d010006000c0101020000
-06200100061301000600040e060000000623010006030202010103030101020206080000
-060a0d010001010000020100000101000002010000010100000201000001010000020100
-0002010200ff0004067401000608020201010301010102020603010006351301112a0102
-112f12010c010102060000000629010006020100062d01000c0101020600000006290100
-06020100062d01000c01010206000000062b0101062e01000c01010206000000061f0100
-06140100040e00000624010006030202010103030101020206070000060b0d0100010100
-0002010000050100000101000009010000010100000001000000010000ff000306750100
-0607020201010301010102020603010006351301112c0100112f12010c0101020000062a
-010006020100062c010006000c0101020000062e0100062c010006000c0101020000062b
-010006000100062d010006000c010102000006200100061301000600040e060000000623
-010006030202010103030101020206080000060a0d010002010000000100000301030002
-0102000301030003010000ff000506740100060802020101030101010202060301000635
-1301112c0100112f12010c010102060000000629010006020100062d01000c0101020600
-0000062d0100062d01000c01010206000000062a010006000100062e01000c0101020600
-0000061f010006140100040e00000624010006030202010103030101020206070000060b
-0d010002010000000100000201000002010000050100000101000002010000ff000a0675
-01000607020201010301010102020603010006351301112c0100112f12010c0101020000
-062d0100062d010006000c0101020000062c0101062d010006000c0101020000062a0100
-06010100062d010006000c010102000006200100061301000600040e0600000006230100
-06030202010103030101020206080000060a0d0100030100000301000002010000010100
-00020100000101000002010000ff000a0674010006080202010103010101020206030100
-06351301112c0100112f12010c01010206000000062b0100062f01000c01010206000000
-062d0100062d01000c010102060000000628010006020100062e01000c01010206000000
-061f010006140100040e00000624010006030202010103030101020206070000060b0d01
-0003010000040103000201020003010300ff000a06750100060702020101030101010202
-0603010006351301112c0100112f12010c0101020000062b0100062f010006000c010102
-0000062e0100062c010006000c010102000006290105062c010006000c01010200000620
-0100061301000600040e060000000623010006030202010103030101020206080000060a
-0d0100ff0026067401000608020201010301010102020603010006351301112c0100112f
-12010c010102060000000629010006020100062d01000c01010206000000062901000602
-0100062d01000c01010206000000062c0100062e01000c01010206000000061f01000614
-0100040e00000624010006030202010103030101020206070000060b0d0100ff00260614
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006110100060702020101030101010202060301000635
-1301112a0104112d12010c0101020000062a0104062c010006000c0101020000062b0102
-062d010006000c0101020000062c0102062c010006000c01010200000620010006130100
-0600040e060000000623010006030202010103030101020206080000060a0d0100ff0026
-061300000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000611010006080202010103010101020206030100
-06351301115d12010c01010206000000065c01000c01010206000000065c01000c010102
-06000000065c01000c01010206000000061f010006140100040e00000624010006030202
-010103030101020206070000060b0d0100ff002606140000064c01000611010006070202
-01010301010102020603010006351301115d12010c0101020000065c010006000c010102
-0000065c010006000c0101020000065c010006000c010102000006200100061301000600
-040e060000000623010006030202010103030101020206080000060a0d0100ff00260613
-0000064c0100061101000608020201010301010102020603010006351301115d12010c01
-010206000000065c01000c01010206000000065c01000c01010206000000065c01000c01
-010206000000061f010006140100040e0000062401000603020201010303010102020607
-0000060b0d0100ff002606140000064c0100061101000607020201010301010102020603
-010006351301115d12010c0101020000065c010006000c0101020000065c010006000c01
-01020000065c010006000c010102000006200100061301000600040e0600000006230100
-06030202010103030101020206080000060a0d0100ff002606130000064c010006110100
-0608020201010301010102020603010006351301115d12010c01010206000000065c0100
-0c01010206000000065c01000c01010206000000065c01000c01010206000000061f0100
-06140100040e00000624010006030202010103030101020206070000060b0d0100ff0026
-06140000064c0100061101000607020201010301010102020603010006351301115d1201
-0c0101020000065c010006000c0101020000065c010006000c0101020000065c01000600
-0c010102000006200100061301000600040e060000000623010006030202010103030101
-020206080000060a0d0000ff002706130000064c01000611010006080202010103010101
-02020603010006351301125f0c0101020600000006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000c01010206000000
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-06000100060001000c010102060000000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-0600010006000100060001000600010006000100060001000c0101020600000006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-06000100060001000600010006000100060001000600010106140100040e000006240100
-0603020201010303010102020607000006ff06490000064c010006110100060702020101
-030101010202060301000635130012600c00010300000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-01000600010006000100060001000600010006000100060001000600010006000c000103
-000006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0100060001000600010006000c0001030000060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000c00010300000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100061301000600
-040e06000000062301000603020201010303010102020608000006ff0647000006120102
-061f01020613010006110100060802020101030101010202060301001036006301000063
-010000630100006301000022010006140100040e00000624010006030202010103030101
-02020607000006ff06490000061001000602010006200100061401000611010006070202
-01010301010102020603010010350f000063010000630100006301000063010000220100
-061301000600040e06000000062301000603020201010303010102020608000006ff0647
-000006110100060201000602010206020100060001010603010206030102060501000613
-01000611010006080202010103010101020206030100100108320f010063010000630100
-00630100006301000022010006140100040e000006240100060302020101030301010202
-0607000006ff064900000610010006050100060201000601010106010100060101000602
-010006010100060201000604010006140100061101000607020201010301010102020603
-0100100108320f010063010000630100006301000063010000220100061301000600040e
-06000000062301000603020201010303010102020608000006ff06470000061101000609
-010006010100060201000601010006050100060201000604010006130100061101000608
-020201010301010102020603010010010815010408170f01006301000063010000630100
-006301000022010006140100040e00000624010006030202010103030101020206070000
-06ff06490000061001000606010306010100060201000601010006050104060401000614
-010006110100060702020101030101010202060301001001081501000802010008170f01
-000a0100001a01010004010000340100002c010000350100006301000063010000220100
-061301000600040e06000000062301000603020201010303010102020608000006ff0647
-000006110100060201000601010006020100060101000602010006010100060501000608
-010006130100061101000608020201010301010102020603010010010818010008180f01
-00250100003c0100002c01000035010000630100006301000022010006140100040e0000
-062401000603020201010303010102020607000006ff0649000006100100060201000601
-010006020100060101000602010006010100060201000601010006020100060401000614
-0100061101000607020201010301010102020603010010010818010008180f0100080102
-000301020003010200030102000401000004010200020100000001010003010200260100
-000701000002010000020102000301020003010200030102000201040002010200020100
-0000010100260100006301000063010000220100061301000600040e0600000006230100
-0603020201010303010102020608000006ff064700000612010206030103060101000602
-010006020102060301020605010006130100061101000608020201010301010102020603
-010010010818010008180f01000a01000002010000020100000101000002010000010100
-000201000001010400040100000201010001010000010100000201000025010000070100
-000201000001010000020100000101000002010000010100000201000001010000020100
-000301000003010000020100000101010001010000250100006301000063010000220100
-06140100040e0000062401000603020201010303010102020607000006ff06490000064c
-0100061101000607020201010301010102020603010010010818010008180f01000a0100
-000201000002010000010100000501000002010000030100000601000002010000020100
-000101000002010000250100000701000002010000050100000101000009010000010100
-000701000007010000010100000201000025010000630100006301000022010006130100
-0600040e06000000062301000603020201010303010102020608000006ff06470000064c
-0100061101000608020201010301010102020603010010010817010008190f01000a0100
-000201000002010000020102000201040003010000060100000201000002010000010104
-002501000008010000000100000301030002010200030103000201020004010000040103
-00010100000201000025010000630100006301000022010006140100040e000006240100
-0603020201010303010102020607000006ff06490000064c010006110100060702020101
-0301010102020603010010010817010008190f01000a0100000201000002010000050100
-000101000007010000060100000201000002010000010100002901000008010000000100
-000201000002010000050100000101000002010000050100000301000003010000020100
-000101000002010000250100006301000063010000220100061301000600040e06000000
-062301000603020201010303010102020608000006ff06470000064c0100061101000608
-020201010301010102020603010010010817010008190f01000a01000002010000020100
-000101000002010000010100000201000003010000060100000201000002010000010100
-000201000025010000090100000301000002010000010100000201000001010000020100
-000101000002010000030100000301000002010000010100000201000025010000630100
-006301000022010006140100040e00000624010006030202010103030101020206070000
-06ff06490000064c01000611010006070202010103010101020206030100100108320f01
-000a01000003010200030102000301020004010000060100000201000002010000020102
-002601000009010000040103000201020003010300020102000501010002010300010100
-0002010000250100006301000063010000220100061301000600040e0600000006230100
-0603020201010303010102020608000006ff06470000064c010006110100060802020101
-03010101020206030100100108320f01000a010000570100006301000063010000630100
-0022010006140100040e0000062401000603020201010303010102020607000006ff0649
-0000064c01000611010006070202010103010101020206030100100108320f0100070100
-000101000057010000630100006301000063010000220100061301000600040e06000000
-062301000603020201010303010102020608000006ff06470000064c0100061101000608
-0202010103010101020206030100100108320f0100080101005801000063010000630100
-006301000022010006140100040e00000624010006030202010103030101020206070000
-062200000663010006c00000064c01000611010006070202010103010101020206030100
-100108320f010063010000630100006301000063010000220100061301000600040e0600
-00000623010006030202010103030101020206080000062000000600000006230100063c
-010006000100063e0102064b0100062f0000064c01000611010006080202010103010101
-020206030100100108320f01006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070000062000000600000006000000
-06220100063b01000600010006000100063f0100067d0000060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-061101000607020201010301010102020603010010010f34006301000063010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06080000061e00000602000006000000060b010206030102060901040602010206020100
-0600010106020101060001000624010006000a01010006000100060b0102060301020609
-010006000101060301020603010106000100060101000602010006040100060301020602
-010006000101060a01020602010006020100060101000600010106020100060001010603
-010206030102060301020603010206030102060201000600010106210000060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100061101000608020201010301010102020603010010000f3501ff01b70614
-0100040e00000624010006030202010103030101020206070000061e0000060400000600
-000006090100060201000601010006020100060a01000603010006020100060101010601
-01000601010006000100060001000622010006000a030100060001000609010006020100
-060101000602010006080101060101000601010006020100060101000601010106010100
-060201000604010006020100060201000601010106010100060801000602010006010100
-060201000601010106010100060101010601010006010100060201000601010006020100
-060101000602010006040100060201000602010006010101060101000682010006070202
-0101030101010202060301000e3600630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206080000061c00000606
-000006000000060c010006010100060e0100060301000602010006010100060501000600
-0100060001000621010006000a05010006000100060c010006010100060c010006050100
-0602010006010100060201000601010006020100060401000606010006010100060c0100
-060201000602010006000100060201000602010006010100060501000602010006010100
-060501000608010006020100060201000601010006020100068101000608020201010301
-01010202060301000e350b00006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070000061c01000608010006000100
-0608010306020102060b0100060301040601010006050100060001000600010006200000
-06000a070000060000000608010306020102060901000605010406010100060201000601
-010006020100060401000603010306010100060c01040603010006030100060201000601
-010006050104060201020603010206050100060201000602010006010100060201000682
-0100060702020101030101010202060301000e0109320b01006301000063010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06080000061c01000606010006000100060801000602010006050100060a010006030100
-060501000605010006000100060001000621000006000a05000006000000060801000602
-010006050100060801000605010006050100060201000601010006020100060401000602
-01000602010006010100060c010006060100060001000602010006020100060101000605
-010006090100060501000604010006020100060201000601010006020100068101000608
-02020101030101010202060301000e0109320b0100630100006301000063010000630100
-0022010006140100040e00000624010006030202010103030101020206070000061e0100
-060401000600010006090100060201000601010006020100060a01000603010006020100
-060101000605010006000100060001000622000006000a03000006000000060901000602
-010006010100060201000608010006050100060201000601010006010101060101000601
-010106040100060201000602010006010100060c01000602010006010100060201000601
-010106010100060101000605010006020100060101000602010006010100060201000604
-010006020100060201000601010006020100068201000607020201010301010102020603
-01000e010916010209180b01006301000063010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206080000061e010006020100
-06000100060b010306020102060c01010602010206020100060501000600010006000100
-0623000006000a01000006000000060b0103060201020609010006060102060301010600
-01000602010106000100060401000603010306010100060d010206020100060201000601
-010006000101060201000606010206030102060301020605010006030102060201000602
-010006810100060802020101030101010202060301000e01091501000902010009170b01
-000701000016010000420100000701000006010200100100000c01000030010000630100
-006301000022010006140100040e00000624010006030202010103030101020206070000
-062001000600010006000100065f00000600000006000000063201000632010006b70100
-060702020101030101010202060301000e01091501000902010009170b0100070100005a
-0100000701000008010000100100000c0100003001000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206080000062001000600
-01000661000006000000062f0100060201000632010006b6010006080202010103010101
-0202060301000e01091501000902010009170b0100070100000101000003010200020100
-00000101000301020002010000000101003b010000070100000001010005010000030102
-000301020002010000010100000301020002010000000101000301020002010000000101
-00030101000001000017010000630100006301000022010006140100040e000006240100
-060302020101030301010202060700000622010006630000063101020633010006b70100
-060702020101030101010202060301000e010916010209180b0100070100000001000003
-0100000201000001010100010100000401000002010100010100003a0100000701010001
-010000040100000201000002010000010100000201000001010000000100000301000002
-010000010101000101000001010000020100000101010001010000010100000101010017
-0100006301000063010000220100061301000600040e0600000006230100060302020101
-0303010102020608000006ff06a80100060802020101030101010202060301000e010915
-01000902010009170b01000701010008010000010100000801000002010000020100003a
-010000070100000201000004010000060100000101000005010100040100000201000001
-010000020100000101000002010000010100000501000002010000170100006301000063
-01000022010006140100040e0000062401000603020201010303010102020607000006ff
-06aa0100060702020101030101010202060301000e01091501000902010009170b010007
-01010005010300010100000801000002010000020100003a010000070100000201000004
-010000030103000101000005010100040104000101000002010000010104000101000005
-01000002010000170100006301000063010000220100061301000600040e060000000623
-01000603020201010303010102020608000006ff06a80100060802020101030101010202
-060301000e01091501000902010009170b01000701000000010000030100000201000001
-0100000801000002010000020100003a0100000701000002010000040100000201000002
-010000010100000501000000010000030100000501000002010000010100000501000005
-0100000201000017010000630100006301000022010006140100040e0000062401000603
-020201010303010102020607000006ff06aa010006070202010103010101020206030100
-0e010916010209180b010007010000010100000201000002010000010100000801000002
-010000020100003a01000007010100010100000401000002010000020100000101000002
-010000010100000101000002010000020100000101010001010000010100000201000001
-0100000501000001010100170100006301000063010000220100061301000600040e0600
-0000062301000603020201010303010102020608000006ff06a801000608020201010301
-01010202060301000e0109320b0100070100000201000002010300010100000801000002
-010000020100003a01000007010000000101000501000003010300020102000201000002
-010000020102000201000000010100030102000201000006010100000100001701000063
-0100006301000022010006140100040e0000062401000603020201010303010102020607
-000006ff06aa0100060702020101030101010202060301000e0109320b0100630100004a
-010000170100006301000063010000220100061301000600040e06000000062301000603
-020201010303010102020608000006ff06a8010006080202010103010101020206030100
-0e0109320b01006301000046010000020100001701000063010000630100002201000614
-0100040e0000062401000603020201010303010102020607000006ff06aa010006070202
-0101030101010202060301000e0109320b01006301000047010200180100006301000063
-010000220100061301000600040e06000000062301000603020201010303010102020608
-000006ff06a80100060802020101030101010202060301000e0109320b01006301000063
-010000630100006301000022010006140100040e00000624010006030202010103030101
-02020607000006ff06aa0100060702020101030101010202060301000e0109320b010063
-010000630100006301000063010000220100061301000600040e06000000062301000603
-020201010303010102020608000006ff06a8010006080202010103010101020206030100
-0e010b34006301000063010000630100006301000022010006140100040e000006240100
-060302020101030301010202060700000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-0600010006000100060702020101030101010202060301000e000b3501ff01b706130100
-0600040e0600000006230100060302020101030301010202060801000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-06000100060001000600010006000100060802020101030101010202060301000c360063
-01000063010000630100006301000022010006140100040e000006240100060302020101
-03030101020206ff06bc02020101030101010202060301000c3501000063010000630100
-006301000063010000220100061301000600040e06000000062301000603020201010303
-0101020206ff06bc02020101030101010202060301000c01013400630100006301000063
-0100006301000022010006140100040e00000624010006030202010103030101020206ff
-06bc02020101030101010202060301000c01013400630100006301000063010000630100
-00220100061301000600040e060000000623010006030202010103030101020206ff06bc
-02020101030101010202060301000c0101160002011a0063010000630100006301000063
-01000022010006140100040e00000624010006030202010103030101020206ff06bc0202
-0101030101010202060301000c010115000001020000011900070100000e010000140100
-00340100002b010200340100006301000063010000220100061301000600040e06000000
-0623010006030202010103030101020206ff06bc02020101030101010202060301000c01
-0115000001020000011900070100000e0100004a0100002d010000340100006301000063
-01000022010006140100040e00000624010006030202010103030101020206ff06bc0202
-0101030101010202060301000c0101150000010200000119000701000001010000030102
-000201040002010200020100000001010003010200020100000001010003010200260100
-000701000002010000010100000001010002010000000101000301020003010200050100
-00030102002d0100006301000063010000220100061301000600040e0600000006230100
-06030202010103030101020206ff06bc02020101030101010202060301000c0101150000
-010200000119000701000000010000030100000201000003010000030100000201000001
-010100010100000401000002010100010100000101000002010000250100000701000002
-010000010101000101000001010100010100000101000002010000010100000201000004
-01000002010000020100002c010000630100006301000022010006140100040e00000624
-010006030202010103030101020206ff06bc02020101030101010202060301000c010116
-000301190007010100080100000301000007010000010100000801000002010000020100
-000501000025010000070100000201000001010000020100000101000002010000010100
-000901000004010000060100002c0100006301000063010000220100061301000600040e
-060000000623010006030202010103030101020206ff06bc020201010301010102020603
-01000c010119000001190007010100050103000301000004010300010100000801000002
-010000020100000201030025010000070100000201000001010000020100000101000002
-010000020102000301030004010000030103002c01000063010000630100002201000614
-0100040e00000624010006030202010103030101020206ff06a101000600010006000100
-060001000600010006000100060001000600010006000100060902020101030101010202
-060301000c0101180000011a000701000000010000030100000201000003010000030100
-000201000001010000080100000201000002010000010100000201000025010000070100
-000201000001010000020100000101000002010000050100000101000002010000040100
-0002010000020100002c0100006301000063010000220100061301000600040e06000000
-0623010006030202010103030101020206ff06a001000600010006000100060001000600
-010006000100060001000600010006000100060000000608020201010301010102020603
-01000c0101150002011b0007010000010100000201000002010000030100000301000002
-010000010100000801000002010000020100000101000002010000250100000701000001
-010100010101000101000001010100010100000101000002010000010100000201000004
-01000002010000020100002c010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070dff0d9606020100060601000606000006090202
-0101030101010202060301000c0101340007010000020100000201030004010100020103
-000101000008010000020100000201000002010300250100000801010000010000010100
-00000101000201000000010100030102000301030004010000030103002c010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06070dff0d95000006010100060600000608000006080202010103010101020206030100
-0c01013400630100000e010000050100004c010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070d0100ff00940602010006060100
-06060000060902020101030101010202060301000c01013400630100000e010000050100
-004c0100006301000063010000220100061301000600040e060000000623010006030202
-010103030101020206070d0100580101006a010100cc0601010006060000060001000606
-0000060802020101030101010202060301000c01013400630100000e010000050100004c
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d0100570100006e010000cb0602010006040000060201000604000006090202
-0101030101010202060301000c0101340063010000630100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d01000f0103
-00180102002701000020010200050100002e01000013010000cb06010100060400000602
-010006060000060802020101030101010202060301000c01013400630100006301000063
-0100006301000022010006140100040e0000062401000603020201010303010102020607
-0d01000f01000002010000160100000201000026010000220100003501000013010000cb
-06020100060400000602010006040000060902020101030101010202060301000c010134
-0063010000630100006301000063010000220100061301000600040e0600000006230100
-06030202010103030101020206070d01000f010000020100000201020002010000020100
-000c01000003010100200100000401020002010000000101000201000000010100030102
-000501000003010200090100000201000002010200030102000301020003010200020104
-0002010200020100000001010004010000cb060101000604000006040100060400000608
-02020101030101010202060301000c0001ff01ed06140100040e00000624010006030202
-010103030101020206070d01000f01000002010000010100000201000001010000020100
-000c01000003010100200100000301000002010000010101000101000001010100010100
-000101000002010000040100000501000009010000020100000101000002010000010100
-000201000001010000020100000101000002010000030100000301000002010000010101
-000101000003010000cb0602010006020000060601000602000006090202010103010101
-0202060301000e360063010000630100006301000063010000220100061301000600040e
-060000000623010006030202010103030101020206070d01000f01030002010000020100
-000101000000010000000100000b01000025010100080100000101000002010000010100
-000201000001010000020100000401000005010000090100000201000005010000010100
-0009010000010100000701000007010000010100000201000004010100c9060101000602
-00000606010006040000060802020101030101010202060301000e350b00006301000063
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d01000f0100000101000002010000020100000101000000010000000100000a
-010000280100000401030001010000020100000101000002010000010104000401000005
-0100000a0100000001000003010300020102000301030002010200040100000401030001
-0100000201000003010000cb060201000602000006060100060200000609020201010301
-01010202060301000e0109320b0100630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206070d01000f01000002
-010000010100000201000001010000000100000001000009010000290100000301000002
-010000010100000201000001010000020100000101000008010000050100000a01000000
-010000020100000201000005010000010100000201000005010000030100000301000002
-010000010100000201000003010000cb0601010006020000060801000602000006080202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-010006140100040e00000624010006030202010103030101020206070d01000f01000002
-010000010100000201000001010000000100000001000008010000070101002001000003
-010000020100000101000002010000010100000201000001010000020100000401000005
-010000040101000401000003010000020100000101000002010000010100000201000001
-01000002010000030100000301000002010000010100000201000003010000cb06020100
-06000000060a010006000000060902020101030101010202060301000e01091301000904
-010209150b010063010000630100006301000063010000220100061301000600040e0600
-00000623010006030202010103030101020206070d01000f010000020100000201020003
-010000000100000901040003010100200100000401030001010000020100000101000002
-010000020102000501000005010000040101000401000004010300020102000301030002
-0102000501010002010300010100000201000003010000cb060101000600000006000100
-060001000600010006000100060001000600010006020000060802020101030101010202
-060301000e0109110102090301000902010009140b010063010000320102002d01000063
-0100006301000022010006140100040e0000062401000603020201010303010102020607
-0d010057010000300100003c010000cb0602010006000100060001000600010006000100
-06000100060001000600010006000000060902020101030101010202060301000e010913
-0100090301000902010009140b010063010000340100002d010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206070d010058
-0101002c0101003b010100cc060101000610000006080202010103010101020206030100
-0e0109130100090301000902010009140b01000701010000010000030102000301010000
-010000010100000001010002010000020100000201020034010000070100000001010003
-010200020100000001010002010000000101000201010000010000030102000501000002
-0101000001000026010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206070d0100ff0094060201000600000006000000060000000600
-000006000000060000000600000006000000060902020101030101010202060301000e01
-09130100090301000902010009140b010007010000000100000001000001010000020100
-000101000001010100010101000101000001010000020100000101000002010000330100
-000701010001010000010100000201000001010100010100000101010001010000010100
-000001000000010000010100000201000004010000020100000001000000010000250100
-006301000063010000220100061301000600000006000000060000000600000006000000
-060000000600000006000000060000000623010006030202010103030101020206070d01
-00ff00940601010006000000060000000600000006000000060000000600000006000000
-0600010006000000060802020101030101010202060301000e0109130100090301000902
-010009140b01000701000000010000000100000501000001010000020100000101000002
-010000010100000201000001010000370100000701000002010000010100000201000001
-010000050100000501000000010000000100000501000004010000020100000001000000
-010000250100006301000063010000220100061401000600000006000000060000000600
-000006000000060000000600000006000000062401000603020201010303010102020607
-0d0100ff00940602010006000000060a0100060000000609020201010301010102020603
-01000e0109130100090301000902010009140b0100070100000001000000010000020103
-000101000002010000010100000201000001010000020100000201020034010000070100
-000201000001010000020100000101000005010000050100000001000000010000020103
-000401000002010000000100000001000025010000630100006301000022010006130100
-06000000060c0100060000000623010006030202010103030101020206070d0100ff0094
-0601010006000000060c010006000000060802020101030101010202060301000e010913
-0100090301000902010009140b0100070100000001000000010000010100000201000001
-010000020100000101000002010000010100000201000005010000330100000701000002
-010000010100000201000001010000050100000501000000010000000100000101000002
-010000040100000201000000010000000100002501000063010000630100002201000614
-010006000000060a0100060000000624010006030202010103030101020206070d010058
-01010063010100d30602010006000000060a010006000000060902020101030101010202
-060301000e01091101040902010209150b01000701000000010000000100000101000002
-010000010100000101010001010000020100000101000001010100010100000201000033
-010000070100000201000001010000020100000101000005010000050100000001000000
-010000010100000201000004010000020100000001000000010000250100006301000063
-0100002201000613010006000000060c0100060000000623010006030202010103030101
-020206070d01005701000067010000d20601010006000000060c01000600000006080202
-0101030101010202060301000e0109320b01000701000000010000000100000201030002
-010100000100000101000002010000020101000001000002010200340100000701000002
-010000020102000201000005010000050100000001000000010000020103000401000002
-01000000010000000100002501000063010000630100002201000614010006000000060a
-0100060000000624010006030202010103030101020206070d01000f0103001801020027
-0100000d010000130100002e01000013010000d20602010006000000060a010006000000
-060902020101030101010202060301000e0109320b010019010000480100006301000063
-010000630100002201000613010006000000060c01000600000006230100060302020101
-03030101020206070d01000f010000020100001601000002010000260100005201000013
-010000d20601010006000000060c01000600000006080202010103010101020206030100
-0e0109320b01001501000002010000480100006301000063010000630100002201000614
-010006000000060a0100060000000624010006030202010103030101020206070d01000f
-010000020100000201020002010000020100000c01000003010100200100000401020003
-010200030102000301020003010200090100000201000002010200030102000301020003
-0102000201040002010200020100000001010004010000d20602010006000000060a0100
-06000000060902020101030101010202060301000e0109320b0100160102004901000063
-01000063010000630100002201000613010006000000060c010006000000062301000603
-0202010103030101020206070d01000f0100000201000001010000020100000101000002
-0100000c0100000301010020010000030100000201000004010000020100000201000001
-010000020100000401000009010000020100000101000002010000010100000201000001
-010000020100000101000002010000030100000301000002010000010101000101000003
-010000d20601010006000000060c01000600000006080202010103010101020206030100
-0e0109320b0100630100006301000063010000630100002201000614010006000000060a
-0100060000000624010006030202010103030101020206070d01000f0103000201000002
-0100000101000000010000000100000a0101002501010004010000080100000201000005
-010000080100000901000002010000050100000101000009010000010100000701000007
-010000010100000201000004010100d00602010006000000060a01000600000006090202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-01000613010006000000060c010006000000062301000603020201010303010102020607
-0d01000f0100000101000002010000020100000101000000010000000100000c01000026
-01000003010000080100000201000005010000080100000a010000000100000301030002
-01020003010300020102000401000004010300010100000201000003010000d206010100
-06000000060c010006000000060802020101030101010202060301000e010b3400630100
-006301000063010000630100002201000614010006000000060a01000600000006240100
-06030202010103030101020206070d01000f010000020100000101000002010000010100
-0000010000000100000c0100002601000003010000080100000201000005010000080100
-000a01000000010000020100000201000005010000010100000201000005010000030100
-000301000002010000010100000201000003010000d20602010006000000060a01000600
-0000060902020101030101010202060301000e000b3501ff01b7060c0104060101000600
-0000060c0100060000000623010006030202010103030101020206070d01000f01000002
-010000010100000201000001010000000100000001000008010000020100000301010020
-010000030100000201000004010000020100000201000001010000020100000401000004
-010100040100000301000002010000010100000201000001010000020100000101000002
-010000030100000301000002010000010100000201000003010000d20601010006000000
-060c010006000000060802020101030101010202060301000e3600630100006301000063
-01000063010000220100060c0100060201000602010006000000060a0100060000000624
-010006030202010103030101020206070d01000f01000002010000020102000301000000
-0100000a0102000401010020010000040102000501000003010200030102000501000004
-010100040100000401030002010200030103000201020005010100020103000101000002
-01000003010000d20602010006000000060a010006000000060902020101030101010202
-060301000e350b0000630100006301000063010000630100002201000610010006010100
-060000000600010006000100060001000600010006000100060001000600010006000000
-0623010006030202010103030101020206070d010057010000290100003c010000d20601
-010006000000060c010006000000060802020101030101010202060301000e0109320b01
-0063010000630100006301000063010000220100060f0100060301000600000006000000
-060000000600000006000000060000000600000006000000062401000603020201010303
-0101020206070d010058010100250101003b010100d30602010006000000060a01000600
-0000060902020101030101010202060301000e0109320b01006301000063010000630100
-0063010000220100060f01000602010006000000060c0100060000000623010006030202
-010103030101020206070d0100ff00940601010006000000060c01000600000006080202
-0101030101010202060301000e01091301000905010009160b0100630100006301000063
-01000063010000220100060f01000603010006000000060a010006000000062401000603
-0202010103030101020206070d0100ff00940602010006000000060a0100060000000609
-02020101030101010202060301000e01091101020903010209160b010016010200050100
-00420100002b010200340100006301000063010000220100060e01000603010006000000
-060c0100060000000623010006030202010103030101020206070d0100ff009406010100
-06000000060c010006000000060802020101030101010202060301000e01091301000905
-010009160b010018010000490100002d010000340100006301000063010000220100060e
-01000604010006000000060a010006000000062401000603020201010303010102020607
-0d0100ff00940602010006000000060a0100060000000609020201010301010102020603
-01000e01091301000905010009160b010007010100000100000301020005010000030102
-0002010000000101003b0100000701000002010000010100000001010002010000000101
-00030102000301020005010000030102002d0100006301000063010000220100060e0100
-0603010006000000060c0100060000000623010006030202010103030101020206070d01
-005801010055010100e10601010006000000060c01000600000006080202010103010101
-0202060301000e01091301000905010009160b0100070100000001000000010000010100
-0002010000040100000501000002010100010100003a0100000701000002010000010101
-000101000001010100010100000101000002010000010100000201000004010000020100
-00020100002c01000063010000630100002201000614010006000000060a010006000000
-0624010006030202010103030101020206070d01005701000059010000e0060201000600
-0000060a010006000000060902020101030101010202060301000e010913010009050100
-09160b010007010000000100000001000005010000040100000501000002010000020100
-003a01000007010000020100000101000002010000010100000201000001010000090100
-0004010000060100002c01000063010000630100002201000613010006000000060c0100
-060000000623010006030202010103030101020206070d01000f0103001b010000260100
-004401000013010000e00601010006000000060c01000600000006080202010103010101
-0202060301000e01091301000905010009160b0100070100000001000000010000020103
-00040100000501000002010000020100003a010000070100000201000001010000020100
-000101000002010000020102000301030004010000030103002c01000063010000630100
-002201000614010006000000060a01000600000006240100060302020101030301010202
-06070d01000f0100000201000019010100260100004401000013010000e0060201000600
-0000060a010006000000060902020101030101010202060301000e010913010009050100
-09160b010007010000000100000001000001010000020100000401000005010000020100
-00020100003a010000070100000201000001010000020100000101000002010000050100
-0001010000020100000401000002010000020100002c0100006301000063010000220100
-0613010006000000060c0100060000000623010006030202010103030101020206070d01
-000f010000020100000201020002010000020100000a0100000001000003010100200100
-000401020002010000020100000201020009010000020100000201020003010200030102
-00030102000201040002010200020100000001010004010000e00601010006000000060c
-010006000000060802020101030101010202060301000e01091101040901010409140b01
-000701000000010000000100000101000002010000040100000501000002010000020100
-003a01000007010000010101000101010001010000010101000101000001010000020100
-0001010000020100000401000002010000020100002c0100006301000063010000220100
-0614010006000000060a0100060000000624010006030202010103030101020206070d01
-000f01000002010000010100000201000001010000020100000901000001010000030101
-002001000003010000020100000101000002010000010100000201000008010000020100
-000101000002010000010100000201000001010000020100000101000002010000030100
-000301000002010000010101000101000003010000e00602010006000000060a01000600
-0000060902020101030101010202060301000e0109320b01000701000000010000000100
-0002010300040100000501000002010000020100003a0100000801010000010000010100
-00000101000201000000010100030102000301030004010000030103002c010000630100
-00630100002201000613010006000000060c010006000000062301000603020201010303
-0101020206070d01000f0103000201000002010000010100000001000000010000080100
-000201000024010100040100000201000001010000020100000501000008010000020100
-000501000001010000090100000101000007010000070100000101000002010000040101
-00de0601010006000000060c010006000000060802020101030101010202060301000e01
-09320b0100630100000e010000050100004c010000630100006301000022010006140100
-06000000060a0100060000000624010006030202010103030101020206070d01000f0100
-000101000002010000020100000101000000010000000100000801000002010000260100
-000301040002010000000100000301030009010000000100000301030002010200030103
-00020102000401000004010300010100000201000003010000e00602010006000000060a
-010006000000060902020101030101010202060301000e0109320b0100630100000e0100
-00050100004c010000630100006301000022010006130100060000000600010006000100
-060001000600010006000100060001000600010006000000062301000603020201010303
-0101020206070d01000f0100000201000001010000020100000101000000010000000100
-000801050025010000030100000601000000010000020100000201000009010000000100
-000201000002010000050100000101000002010000050100000301000003010000020100
-00010100000201000003010000e00601010006000000060c010006000000060802020101
-030101010202060301000e0109320b0100630100000e010000050100004c010000630100
-006301000022010006140100060001000600010006000100060001000600010006000100
-06000100060000000624010006030202010103030101020206070d01000f010000020100
-0001010000020100000101000000010000000100000c0100000301010020010000030100
-000201000003010000030100000201000003010100040100000301000002010000010100
-000201000001010000020100000101000002010000030100000301000002010000010100
-000201000003010000e00602010006000000060a01000600000006090202010103010101
-0202060301000e0109320b01006301000063010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206070d01000f010000020100
-000201020003010000000100000d01000003010100200100000401020004010000040103
-000301010004010000040103000201020003010300020102000501010002010300010100
-000201000003010000e00601010006000000060c01000600000006080202010103010101
-0202060301000e0109320b01006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070d0100570100001b0100003c0100
-00e00602010006000000060a010006000000060902020101030101010202060301000e01
-0b340063010000630100006301000063010000220100061301000600040e060000000623
-010006030202010103030101020206070d010058010100170101003b010100e106010100
-06000000060c010006000000060802020101030101010202060301000e000b3501ff01b7
-06140100040e00000624010006030202010103030101020206070d0100ff009406020100
-06000000060a010006000000060902020101030101010202060301000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600006301000063
-0100006301000063010000220100061301000600040e0600000006230100060302020101
-03030101020206070d0100ff00940601010006000000060c010006000000060802020101
-030101010202060301000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000100006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070d0100ff00940602010006000000
-060a01000600000006090202010103010101020206030100060000000632010006000063
-010000630100006301000063010000220100061301000600040e06000000062301000603
-0202010103030101020206070d0100000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000020601010006000000
-060c01000600000006080202010103010101020206030100000006340100006301000063
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d01045801010478010104bc00010602010006000000060a0100060000000609
-020201010301010102020603010006000000061301000604010206150100060000630100
-00630100006301000063010000220100061301000600040e060000000623010006030202
-010103030101020206070d01000004560100047c010004ba010000010601010006000000
-060c01000600000006080202010103010101020206030100000006120102060301000602
-010006150100001f01000042010000120100001701020034010000630100006301000022
-010006140100040e00000624010006030202010103030101020206070d01040f01030417
-01040426010004060100041a010104040100043c01000413010004bb0001060201000600
-0000060a0100060000000609020201010301010102020603010006000000061301000603
-010006020100061401000600006301000012010000190100003401000063010000630100
-00220100061301000600040e060000000623010006030202010103030101020206070d01
-0000040e01000402010004160100040201000426010004210100044401000413010004ba
-010000010601010006000000060c01000600000006080202010103010101020206030100
-000006140100060301000602010006150100000701010000010000030102000201000000
-01010003010200030102003b010000080102000301010000010000020102000201000000
-010100020100000001010005010000030102000201000000010100260100006301000063
-01000022010006140100040e00000624010006030202010103030101020206070d01040f
-010004020100040201020402010004020100040c01000403010104200100040401020403
-010204030102040301020404010004040102040201000400010104030102040901000402
-010004020102040301020403010204030102040201040402010204020100040001010404
-010004bb00010602010006000000060a0100060000000609020201010301010102020603
-010006000000061301000606010006150100060000070100000001000000010000010100
-000201000001010100010100000401000002010000020100003a01000007010000020100
-000101000001010100010100000201000001010100010100000101010001010000040100
-000201000002010000010101000101000025010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206070d010000040e01000402
-010004010100040201000401010004020100040b01000404010104200100040601000402
-010004020100040101000402010004010100040201000401010404040100040201010401
-010004010100040201000408010004020100040101000402010004010100040201000401
-010004020100040101000402010004030100040301000402010004010101040101000403
-010004ba010000010601010006000000060c010006000000060802020101030101010202
-060301000000061401000605010006170100000701000000010000000100000501000001
-01000008010000060100003a010000070100000201000001010000020100000101000002
-010000010100000201000001010000020100000401000006010000010100000201000025
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d01040f01030402010004020100040101000400010004000100040b01000425
-010104070100040201000402010004010100040501000402010004030100040601000402
-010004020100040101000402010004080100040201000405010004010100040901000401
-0100040701000407010004010100040201000404010104b900010602010006000000060a
-010006000000060902020101030101010202060301000600000006130100060401000617
-0100060000070100000001000000010000020103000101000008010000030103003a0100
-000701000002010000010100000201000001010400010100000201000001010000020100
-000401000003010300010100000201000025010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206070d010000040e01000401
-01000402010004020100040101000400010004000100040b010004270100040601000402
-010004020100040201020402010404030100040601000402010004020100040101040409
-010004000100040301030402010204030103040201020404010004040103040101000402
-01000403010004ba010000010601010006000000060c0100060000000608020201010301
-010102020603010000000614010006030100060201000615010000070100000001000000
-0100000101000002010000010100000801000002010000020100003a0100000701000002
-010000010100000201000001010000050100000201000001010000020100000401000002
-01000002010000010100000201000025010000630100006301000022010006140100040e
-00000624010006030202010103030101020206070d01040f010004020100040101000402
-0100040101000400010004000100040a0100042801000406010004020100040201000405
-0100040101000407010004060100040201000402010004010100040d0100040001000402
-010004020100040501000401010004020100040501000403010004030100040201000401
-0100040201000403010004bb00010602010006000000060a010006000000060902020101
-030101010202060301000600000006110104060101040614010006000007010000000100
-00000100000101000002010000010100000801000002010000020100003a010000070100
-000201000001010000010101000101000002010000010100000201000001010100010100
-000401000002010000020100000101000002010000250100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d010000040e
-0100040201000401010004020100040101000400010004000100040a0100040501010420
-010004060100040201000402010004010100040201000401010004020100040301000406
-010004020100040201000401010004020100040301010404010004030100040201000401
-010004020100040101000402010004010100040201000403010004030100040201000401
-0100040201000403010004ba010000010601010006000000060c01000600000006080202
-010103010101020206030100000006340100000701000000010000000100000201030001
-01000008010000030103003a010000080102000301010000010000020102000201000002
-010000010100000001010005010000030103000101000002010000250100006301000063
-01000022010006140100040e00000624010006030202010103030101020206070d01040f
-010004020100040201020403010004000100040b01000405010104200100040601000403
-010204030102040301020404010004060100040201000402010004020102040401010404
-010004040103040201020403010304020102040501010402010304010100040201000403
-010004bb00010602010006000000060a0100060000000609020201010301010102020603
-0100060000000632010006000063010000230100003e0100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100000456
-01000406010004360100043c010004ba010000010601010006000000060c010006000000
-060802020101030101010202060301000000063401000063010000230100003e01000063
-0100006301000022010006140100040e0000062401000603020201010303010102020607
-0d0104580101040101000401010004340101043b010104bc00010602010006000000060a
-010006000000060902020101030101010202060301000600000006320100060000630100
-00230100003e0100006301000063010000220100061301000600040e0600000006230100
-06030202010103030101020206070d010000045c010104ff043101000001060101000600
-0000060c0100060000000608020201010301010102020603010000000634010000630100
-0063010000630100006301000022010006140100040e0000062401000603020201010303
-0101020206070d0104ff049200010602010006000000060a010006000000060902020101
-030101010202060301000600000006320100060000630100006301000063010000630100
-00220100061301000600040e060000000623010006030202010103030101020206070d01
-000004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010000010601010006000000060c01000600000006080202
-010103010101020206030100000006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010000630100006301000063010000630100002201000614
-0100040e00000624010006030202010103030101020206070d0100ff0094060201000600
-0000060a0100060000000609020201010301010102020603010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0100060001000600010006000100060001000600010006000100060001ff01b706130100
-0600040e060000000623010006030202010103030101020206070d010058010100710101
-00c50601010006000000060c010006000000060802020101030101010202060301000e36
-006301000063010000630100006301000022010006140100040e00000624010006030202
-010103030101020206070d01005701000075010000c40602010006000000060a01000600
-0000060902020101030101010202060301000e350b000063010000630100006301000063
-010000220100061301000600040e06000000062301000603020201010303010102020607
-0d01000f0103001901000004010200200100000d01000009010000170100002d01000013
-010000c40601010006000000060c01000600000006080202010103010101020206030100
-0e0109320b01006301000063010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d01000f01000002010000170101000301000002
-0100001f01000018010000170100002d01000013010000c40602010006000000060a0100
-06000000060902020101030101010202060301000e0109320b0100630100006301000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-020206070d01000f01000002010000020102000201000002010000080100000001000003
-010000020100000301010019010000030100000001010003010200030102000201000000
-010100030102000201000000010100030101000001000008010000020100000201020003
-01020003010200030102000201040002010200020100000001010004010000c406010100
-06000000060c010006000000060802020101030101010202060301000e01091301000904
-010209150b01006301000063010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d01000f01000002010000010100000201000001
-010000020100000a01000003010000020100000301010019010000030101000101000004
-010000020100000201000001010100010100000101000002010000010101000101000001
-010000010101000801000002010000010100000201000001010000020100000101000002
-0100000101000002010000030100000301000002010000010101000101000003010000c4
-0602010006000000060a010006000000060902020101030101010202060301000e010911
-0102090301000902010009140b0100170100004a01000007010000300102002601000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-020206070d01000f01030002010000020100000101000000010000000100000a01000004
-0102001e0101000401000008010000020100000501000002010000050100000101000005
-010000020100000801000002010000050100000101000009010000010100000701000007
-010000010100000201000004010100c20601010006000000060c01000600000006080202
-0101030101010202060301000e01091301000907010009140b0100170100004a01000007
-0100003201000026010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206070d01000f0100000101000002010000020100000101000000
-010000000100000a01000003010000020100001f01000003010000080100000201000005
-010000020100000201030001010000050100000201000009010000000100000301030002
-01020003010300020102000401000004010300010100000201000003010000c406020100
-06000000060a010006000000060902020101030101010202060301000e01091301000907
-010009140b01000701010000010000030102000201040002010200420100000701000000
-010100020100000001010003010200020101000001000002010100000100000301020002
-010000000101000501000003010200020100000001010018010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206070d01000f
-0100000201000001010000020100000101000000010000000100000a0100000301000002
-0100001f0100000301000008010000020100000501000002010000010100000201000001
-010000050100000201000009010000000100000201000002010000050100000101000002
-01000005010000030100000301000002010000010100000201000003010000c406010100
-06000000060c010006000000060802020101030101010202060301000e01091301000905
-010109150b01000701000000010000000100000101000002010000030100000301000002
-010000410100000701010001010000010101000101000001010000020100000101000000
-010000000100000101000000010000000100000101000002010000010101000101000004
-010000020100000201000001010100010100001701000063010000630100002201000614
-0100040e00000624010006030202010103030101020206070d01000f0100000201000001
-010000020100000101000000010000000100000a01000003010000020100000301010019
-010000030100000801000002010000020100000101000002010000010100000201000001
-010000050100000101010003010100040100000301000002010000010100000201000001
-010000020100000101000002010000030100000301000002010000010100000201000003
-010000c40602010006000000060a01000600000006090202010103010101020206030100
-0e01091301000907010009140b0100070100000001000000010000050100000301000003
-010000450100000701000002010000010100000501000002010000010100000001000000
-010000010100000001000000010000050100000101000002010000040100000601000001
-01000002010000170100006301000063010000220100061301000600040e060000000623
-010006030202010103030101020206070d01000f01000002010000020102000301000000
-010000090104000201020004010100190100000301000008010000030102000201000002
-010000020103000101000006010100000100000301010004010000040103000201020003
-010300020102000501010002010300010100000201000003010000c40601010006000000
-060c010006000000060802020101030101010202060301000e0109130100090701000914
-0b0100070100000001000000010000020103000301000004010200420100000701000002
-010000010100000501000002010000010100000001000000010000010100000001000000
-010000020103000101000002010000040100000301030001010000020100001701000063
-0100006301000022010006140100040e0000062401000603020201010303010102020607
-0d010057010000370100003c010000c40602010006000000060a01000600000006090202
-0101030101010202060301000e0109130100090301000902010009140b01000701000000
-010000000100000101000002010000030100000701000041010000070100000201000001
-010000050100000201000001010000000100000001000001010000000100000001000001
-010000020100000101000002010000040100000201000002010000010100000201000017
-0100006301000063010000220100061301000600040e0600000006230100060302020101
-03030101020206070d010058010100330101003b010100c50601010006000000060c0100
-06000000060802020101030101010202060301000e01091101040902010209150b010007
-010000000100000001000001010000020100000301000003010000020100004101000007
-010100010100000101000005010000020100000101000000010000000100000101000000
-010000000100000101000002010000010101000101000004010000020100000201000001
-0100000201000017010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206070d0100ff00940602010006000000060a0100060000000609
-02020101030101010202060301000e0109320b0100070100000001000000010000020103
-000401010002010200420100000701000000010100020100000601020002010000000100
-000001000001010000000100000001000002010300010100000001010005010000030103
-000101000002010000170100006301000063010000220100061301000600040e06000000
-0623010006030202010103030101020206070d0100ff00940601010006000000060c0100
-06000000060802020101030101010202060301000e0109320b0100630100003101000030
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d0100ff00940602010006000000060a01000600000006090202010103010101
-0202060301000e0109320b01006301000031010000300100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-0601010006000000060c010006000000060802020101030101010202060301000e010932
-0b0100630100003101000030010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d01005801010071010100c50602010006000000
-060a010006000000060902020101030101010202060301000e0109320b01006301000063
-0100006301000063010000220100061301000600040e0600000006230100060302020101
-03030101020206070d01005701000075010000c40601010006000000060c010006000000
-060802020101030101010202060301000e0109320b010063010000630100006301000063
-01000022010006140100040e00000624010006030202010103030101020206070d01000f
-0103001801020004010100200100006001000013010000c40602010006000000060a0100
-06000000060902020101030101010202060301000e010b34006301000063010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06070d01000f01000002010000160100000201000002010000010100001f010000600100
-0013010000c40601010006000000060c0100060000000608020201010301010102020603
-01000e000b3501ff01b706140100040e0000062401000603020201010303010102020607
-0d01000f010000020100000201020002010000020100000c010000020100000101000003
-010100190100000401020002010000020100000201020003010200020100000001010002
-010000000101000301020009010000020100000201020003010200030102000301020002
-01040002010200020100000001010004010000c40602010006000000060a010006000000
-060902020101030101010202060301000e36006301000063010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206070d01000f
-01000002010000010100000201000001010000020100000c010000020100000101000003
-010100190100000301000002010000010100000201000001010000020100000101000002
-010000010101000101000001010100010100000101000002010000080100000201000001
-010000020100000101000002010000010100000201000001010000020100000301000003
-01000002010000010101000101000003010000c40601010006000000060c010006000000
-060802020101030101010202060301000e350b0000630100006301000063010000630100
-0022010006140100040e00000624010006030202010103030101020206070d01000f0103
-0002010000020100000101000000010000000100000b01000003010000010100001d0101
-000401000005010000020100000101000009010000010100000201000001010000020100
-000101000002010000080100000201000005010000010100000901000001010000070100
-0007010000010100000201000004010100c20602010006000000060a0100060000000609
-02020101030101010202060301000e0109320b0100630100006301000063010000630100
-00220100061301000600040e060000000623010006030202010103030101020206070d01
-000f0100000101000002010000020100000101000000010000000100000a010000040100
-00010100001f010000040102000201000002010000020102000301030001010000020100
-000101000002010000010104000901000000010000030103000201020003010300020102
-000401000004010300010100000201000003010000c40601010006000000060c01000600
-0000060802020101030101010202060301000e0109320b01006301000063010000630100
-006301000022010006140100040e00000624010006030202010103030101020206070d01
-000f01000002010000010100000201000001010000000100000001000009010000050100
-00010100001f010000070100000101000002010000050100000101000002010000010100
-00020100000101000002010000010100000d010000000100000201000002010000050100
-000101000002010000050100000301000003010000020100000101000002010000030100
-00c40602010006000000060a010006000000060902020101030101010202060301000e01
-091301000906010009150b01006301000063010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206070d01000f010000020100
-000101000002010000010100000001000000010000080100000601000001010000030101
-001901000003010000020100000101000001010100010100000201000001010000020100
-000101000002010000010100000201000001010000020100000301010004010000030100
-000201000001010000020100000101000002010000010100000201000003010000030100
-0002010000010100000201000003010000c40601010006000000060c0100060000000608
-02020101030101010202060301000e01091101020905010109150b010011010000500100
-001e0100001801000029010000630100006301000022010006140100040e000006240100
-06030202010103030101020206070d01000f010000020100000201020003010000000100
-000901040003010100040101001901000004010200030101000001000002010200030103
-000101000002010000010100000201000002010200040101000401000004010300020102
-0003010300020102000501010002010300010100000201000003010000c4060201000600
-0000060a010006000000060902020101030101010202060301000e010913010009040100
-0900010009150b0100630100001e01000018010000290100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100570100
-00370100003c010000c40601010006000000060c01000600000006080202010103010101
-0202060301000e0109130100090401000900010009150b01000701000000010100030102
-000201000000010100030102004201000008010100000100000101000002010000020102
-000201040002010200020100000201000002010200020100000001010003010200020100
-0000010100030101000001000010010000630100006301000022010006140100040e0000
-0624010006030202010103030101020206070d010058010100330101003b010100c50602
-010006000000060a010006000000060902020101030101010202060301000e0109130100
-090301000901010009150b01000701010001010000040100000201010001010000010100
-000201000041010000070100000101010001010000020100000101000002010000030100
-000301000002010000010100000201000001010000020100000101010001010000010100
-000201000001010100010100000101000001010100100100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-0601010006000000060c010006000000060802020101030101010202060301000e010913
-0100090201000902010009150b0100070100000201000004010000020100000201000005
-010000410100000701000002010000010100000201000001010000070100000701000001
-010000020100000101000005010000020100000101000002010000010100000501000002
-01000010010000630100006301000022010006140100040e000006240100060302020101
-03030101020206070d0100ff00940602010006000000060a010006000000060902020101
-030101010202060301000e01091301000902010509140b01000701000002010000040100
-000201000002010000020103004101000007010000020100000101000002010000020102
-000401000004010300020100000001000003010200020100000201000001010400010100
-000501000002010000100100006301000063010000220100061301000600040e06000000
-0623010006030202010103030101020206070d0100ff00940601010006000000060c0100
-06000000060802020101030101010202060301000e01091301000906010009150b010007
-010000020100000401000002010000020100000101000002010000410100000701000002
-010000010100000201000005010000030100000301000002010000020100000001000006
-010000010100000201000001010000050100000501000002010000100100006301000063
-01000022010006140100040e00000624010006030202010103030101020206070d0100ff
-00940602010006000000060a010006000000060902020101030101010202060301000e01
-091101040903010209140b01000701000002010000040100000201000002010000010100
-000201000041010000070100000101010001010000010101000101000002010000030100
-000301000002010000030100000301000002010000010101000101000001010000020100
-00010100000501000001010100100100006301000063010000220100061301000600040e
-060000000623010006030202010103030101020206070d0100ff00940601010006000000
-060c010006000000060802020101030101010202060301000e0109320b01000701000002
-010000040100000201000002010000020103004101000008010100000100000201010000
-010000020102000501010002010300030100000401020002010000000101000301020002
-010000060101000001000010010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d0100ff00940602010006000000060a01000600
-0000060902020101030101010202060301000e0109320b0100630100000b010000440100
-00100100006301000063010000220100061301000600040e060000000623010006030202
-010103030101020206070d0100ff00940601010006000000060c01000600000006080202
-0101030101010202060301000e0109320b01006301000007010000020100004001000002
-01000010010000630100006301000022010006140100040e000006240100060302020101
-03030101020206070d0100ff00940602010006000000060a010006000000060902020101
-030101010202060301000e0109320b010063010000080102004201020011010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06070d0100ff00940601010006000000060c010006000000060802020101030101010202
-060301000e0109320b01006301000063010000630100006301000022010006140100040e
-00000624010006030202010103030101020206070d0100ff00940602010006000000060a
-010006000000060902020101030101010202060301000e0109320b010063010000630100
-006301000063010000220100061301000600040e06000000062301000603020201010303
-0101020206070d0100ff00940601010006000000060c0100060000000608020201010301
-01010202060301000e010b34006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206070d0100ff00940602010006000000
-060a010006000000060902020101030101010202060301000e000b3501ff01b706130100
-0600040e060000000623010006030202010103030101020206070d0100ff009406010100
-06000000060c010006000000060802020101030101010202060301000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600006301000063
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206070d0100ff00940602010006000000060a01000600000006090202010103010101
-020206030100000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060001000063010000630100006301000063010000220100061301000600040e
-060000000623010006030202010103030101020206070d0100ff00940601010006000000
-060c01000600000006080202010103010101020206030100060000000632010006000063
-01000063010000630100006301000022010006140100040e000006240100060302020101
-03030101020206070d0100ff00940602010006000000060a010006000000060902020101
-030101010202060301000000063401000063010000630100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-0601010006000000060c0100060000000608020201010301010102020603010006000000
-061301000603010406140100060000630100006301000063010000630100002201000614
-0100040e00000624010006030202010103030101020206070d0100ff0094060201000600
-0000060a0100060000000609020201010301010102020603010000000612010206030100
-06190100000f010200030102004901000007010000230100000b010200030102001f0100
-006301000063010000220100061301000600040e06000000062301000603020201010303
-0101020206070d0100ff00940601010006000000060c0100060000000608020201010301
-010102020603010006000000061301000603010006180100060000110100000501000049
-01000007010000230100000d010000050100001f01000063010000630100002201000614
-0100040e00000624010006030202010103030101020206070d0100ff0094060201000600
-0000060a0100060000000609020201010301010102020603010000000614010006030100
-061901000008010200050100000501000003010200420100000701000000010100030102
-000201000000010100020100000001010003010200020104000101000002010000040100
-00050100001f0100006301000063010000220100061301000600040e0600000006230100
-06030202010103030101020206070d0100ff009406010100060000000600010006000100
-060001000600010006000100060001000600010006000000060802020101030101010202
-060301000600000006130100060301030615010006000007010000020100000401000005
-010000020100000201000041010000070101000101000001010000020100000101010001
-010000010101000101000001010000020100000301000003010000020100000401000005
-0100001f010000630100006301000022010006140100040e000006240100060302020101
-03030101020206070d0100ff009406020100060001000600010006000100060001000600
-010006000100060001000600000006090202010103010101020206030100000006140100
-060701000615010000070100000201000004010000050100000201000002010000410100
-000701000002010000010100000201000001010000050100000201000001010000070100
-00030100000201000004010000050100001f010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206070d0100ff009406010100
-061000000608020201010301010102020603010006000000061301000607010006140100
-060000070100000201000004010000050100000201040041010000070100000201000001
-010000020100000101000005010000020100000201020004010000030100000201000004
-010000050100001f010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206070d0100ff0094060201000600000006000000060000000600
-000006000000060000000600000006000000060902020101030101010202060301000000
-061401000602010006030100061501000007010000020100000401000005010000020100
-004501000007010000020100000101000002010000010100000501000002010000050100
-0003010000030100000201000004010000050100001f0100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-060101000602000006000000060000000600000006000000060000000600010006000000
-060802020101030101010202060301000600000006110104060101030615010006000007
-010000020100000401000005010000020100000201000041010000070100000201000001
-010000020100000101000005010000020100000101000002010000030100000301000001
-01010004010000050100001f010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d0100ff00940602010006000000060a01000600
-000006090202010103010101020206030100000006340100000801020005010000050100
-000301020042010000070100000201000002010200020100000501000002010000020102
-0005010100020101000001000004010000050100001f0100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-060101000602000006080100060200000608020201010301010102020603010006000000
-063201000600006301000063010000630100006301000022010006140100040e00000624
-010006030202010103030101020206070d0100ff00940602010006020000060601000602
-000006090202010103010101020206030100000006340100006301000063010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06070d0100ff009406010100060400000606010006020000060802020101030101010202
-060301000600000006320100060000630100006301000063010000630100002201000614
-0100040e00000624010006030202010103030101020206070d0100ff0094060201000602
-000006060100060200000609020201010301010102020603010000000634010000630100
-00630100006301000063010000220100061301000600040e060000000623010006030202
-010103030101020206070d0100ff00940601010006040000060401000604000006080202
-010103010101020206030100060000000632010006000063010000630100006301000063
-01000022010006140100040e00000624010006030202010103030101020206070d0100ff
-009406020100060400000602010006040000060902020101030101010202060301000000
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-0063010000630100006301000063010000220100061301000600040e0600000006230100
-06030202010103030101020206070d0100ff009406010100060600000602010006040000
-060802020101030101010202060301000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-06000100060001000600010006000100060001ff01b706140100040e0000062401000603
-0202010103030101020206070d0100ff0094060201000604000006020100060400000609
-02020101030101010202060301000e360063010000630100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206070d0100ff0094
-06010100060600000600010006060000060802020101030101010202060301000e350b00
-006301000063010000630100006301000022010006140100040e00000624010006030202
-010103030101020206070d0100ff00940602010006060100060600000609020201010301
-01010202060301000e0109320b0100630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206070d0100ff00940601
-01000608010006060000060802020101030101010202060301000e0109320b0100630100
-0063010000630100006301000022010006140100040e0000062401000603020201010303
-0101020206070d0000ff0095060201000606010006060000060902020101030101010202
-060301000e01091301000905010209140b01006301000063010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206ff06a00100
-060000000600000006000000060000000600000006000000060000000600000006000000
-060802020101030101010202060301000e01091101020904010009170b0100170100000d
-010000020100003701000008010200050100000301020005010000090100000d01020026
-010000630100006301000022010006140100040e00000624010006030202010103030101
-020206ff06a1000006000000060000000600000006000000060000000600000006000000
-06000000060902020101030101010202060301000e01091301000903010009180b010017
-01000011010000370100000a0100000c010000100100000f010000260100006301000063
-010000220100061301000600040e06000000062301000603020201010303010102020606
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000618
-02020101030101010202060301000e01091301000903010009180b010007010000000101
-0003010200020104000101000000010100030102000201000001010000340100000a0100
-000301020005010000030102000301020002010000000101000301020005010000020101
-000001000003010200020100000001010011010000630100006301000022010006140100
-040e00000624010006030202010103030101020206050100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000000061702020101030101010202
-060301000e01091301000903010309150b01000701010001010000010100000201000003
-0100000301010001010000040100000201000000010000350100000a0100000501000005
-010000050100000201000002010000010101000101000001010000020100000401000002
-010000000100000001000001010000020100000101010001010000100100006301000063
-010000220100061301000600040e06000000062301000603020201010303010102020606
-010006100000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006020000060c0000061802020101030101010202060301000e010913010009030100
-0902010009140b0100070100000201000005010000030100000301000008010000020101
-00360100000a010000050100000501000005010000020100000201000001010000020100
-000101000002010000040100000201000000010000000100000101000002010000010100
-000201000010010000630100006301000022010006140100040e00000624010006030202
-010103030101020206050100060c00000600010006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-0600000006000000060000000600000006000000060001000600000006000000060c0000
-061702020101030101010202060301000e0109130100090301000902010009140b010007
-010000020100000201030003010000030100000801000002010100360100000a01000005
-010000050100000501000002010400010100000201000001010000020100000401000002
-010000000100000001000001010400010100000201000010010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206060100060a
-0000060001000602000006ff067601000602000006000000060000000608000006180202
-0101030101010202060301000e0109130100090301000902010009140b01000701000002
-01000001010000020100000301000003010000080100000201000000010000350100000a
-010000050100000501000005010000020100000501000002010000010100000201000004
-010000020100000001000000010000010100000501000002010000100100006301000063
-01000022010006140100040e000006240100060302020101030301010202060501000608
-000006000000060201000600000006ff0678010006000000060200000600000006080000
-061702020101030101010202060301000e01091101040902010209150b01000701010001
-01000001010000020100000301000003010000080100000201000001010000340100000a
-010000050100000501000005010000020100000201000001010000020100000101000002
-010000040100000201000000010000000100000101000002010000010100000201000010
-0100006301000063010000220100061301000600040e0600000006230100060302020101
-030301010202060601000606000006000000060201000602000006ff0676010006020000
-060400000600000006040000061802020101030101010202060301000e0109320b010007
-01000000010100030103000401010001010000080100000201000002010000330100000a
-010000050100000501000005010000030102000201000002010000020102000501000002
-010000000100000001000002010200020100000201000010010000630100006301000022
-010006140100040e00000624010006030202010103030101020206050100060400000600
-0000060601000600000006ff067801000600000006060000060000000604000006170202
-0101030101010202060301000e0109320b0100070100005a0100001f0100004201000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-0202060601000602000006000000060601000602000006ff067601000602000006080000
-0600000006000000061802020101030101010202060301000e0109320b0100070100005a
-0100001c0100000101000042010000630100006301000022010006140100040e00000624
-0100060302020101030301010202060501000600010006000100060a01000600000006ff
-0678010006000000060a0100060001000600000006170202010103010101020206030100
-0e0109320b0100070100005a0100001d0101004301000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206060100060201000600
-0100060601000602000006ff067601000602000006080100060001000600000006180202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-010006140100040e00000624010006030202010103030101020206050100060401000600
-0100060601000600000006ff067801000600000006060100060001000604000006170202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-0100061301000600040e0600000006230100060302020101030301010202060601000606
-010006000100060201000602000006ff0676010006020000060401000600010006040000
-061802020101030101010202060301000e010b3400630100006301000063010000630100
-0022010006140100040e0000062401000603020201010303010102020605010006080100
-06000100060201000600000006ff06780100060000000602010006000100060800000617
-02020101030101010202060301000e000b3501ff01b7061301000600040e060000000623
-010006030202010103030101020206060100060a0100060001000602000006ff06760100
-060200000600010006000100060800000618020201010301010102020603010010360063
-01000063010000630100006301000022010006140100040e000006240100060302020101
-03030101020206050100060c010006000100060000000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600000006000100060c00000617
-020201010301010102020603010010350f00006301000063010000630100006301000022
-0100061301000600040e0600000006230100060302020101030301010202060601000610
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000602
-0100060c000006180202010103010101020206030100100108320f010063010000630100
-00630100006301000022010006140100040e000006240100060302020101030301010202
-060501000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-0600000006170202010103010101020206030100100108320f0100630100006301000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-020206060000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-0000061802020101030101010202060301001001081301000803010408140f0100630100
-0063010000630100006301000022010006140100040e0000062401000603020201010303
-0101020206ff06bc02020101030101010202060301001001081101020803010008020100
-08140f01006301000010010000200102002d010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206ff06bc0202010103010101
-0202060301001001081301000806010008150f01006301000010010000220100002d0100
-00630100006301000022010006140100040e000006240100060302020101030301010202
-06ff06bc02020101030101010202060301001001081301000806010008150f0100070100
-000001010003010200020100000001010049010000080102000201040001010000020100
-000101000000010100030102000201000000010100050100000301020002010000000101
-001f0100006301000063010000220100061301000600040e060000000623010006030202
-010103030101020206ff06bc020201010301010102020603010010010813010008060100
-08150f010007010100010100000101000002010000010101000101000048010000070100
-000201000003010000030100000201000001010100010100000101000002010000010101
-000101000004010000020100000201000001010100010100001e01000063010000630100
-0022010006140100040e00000624010006030202010103030101020206ff06bc02020101
-030101010202060301001001081301000806010008150f01000701000002010000010100
-0002010000010100004c0100000701000007010000030100000201000001010000050100
-00020100000101000002010000040100000601000001010000020100001e010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06ff06bc02020101030101010202060301001001081301000805010008160f0100070100
-000201000001010400010100004c01000008010200040100000301000002010000010100
-00050104000101000002010000040100000301030001010000020100001e010000630100
-006301000022010006140100040e00000624010006030202010103030101020206ff06bc
-02020101030101010202060301001001081301000805010008160f010007010000020100
-0001010000050100004c0100000b01000003010000030100000201000001010000050100
-00050100000201000004010000020100000201000001010000020100001e010000630100
-0063010000220100061301000600040e0600000006230100060302020101030301010202
-06ff06bc02020101030101010202060301001001081101040803010008160f0100070101
-00010100000101000002010000010100004c010000070100000201000003010000030100
-000101010001010000050100000201000001010100010100000401000002010000020100
-0001010000020100001e010000630100006301000022010006140100040e000006240100
-06030202010103030101020206ff06bc0202010103010101020206030100100108320f01
-00070100000001010003010200020100004c010000080102000501010002010100000100
-0001010000060102000201000000010100050100000301030001010000020100001e0100
-006301000063010000220100061301000600040e06000000062301000603020201010303
-0101020206ff06bc0202010103010101020206030100100108320f0100070100005a0100
-002a01000037010000630100006301000022010006140100040e00000624010006030202
-010103030101020206ff06bc0202010103010101020206030100100108320f0100070100
-005a0100002a010000370100006301000063010000220100061301000600040e06000000
-0623010006030202010103030101020206ff06bc02020101030101010202060301001001
-08320f0100070100005a0100002a01000037010000630100006301000022010006140100
-040e00000624010006030202010103030101020206ff06bc020201010301010102020603
-0100100108320f010063010000630100006301000063010000220100061301000600040e
-060000000623010006030202010103030101020206ff06bc020201010301010102020603
-0100100108320f01006301000063010000630100006301000022010006140100040e0000
-0624010006030202010103030101020206ff06bc02020101030101010202060301001001
-0f340063010000630100006301000063010000220100061301000600040e060000000623
-010006030202010103030101020206ff06bc020201010301010102020603010010000f35
-01ff01b706140100040e00000624010006030202010103030101020206ff06bc02020101
-030101010202060301000e36006301000063010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206ff06bc0202010103010101
-0202060301000e350b00006301000063010000630100006301000022010006140100040e
-00000624010006030202010103030101020206ff06bc0202010103010101020206030100
-0e0109320b010063010000630100006301000063010000220100061301000600040e0600
-00000623010006030202010103030101020206410100060a010006ff066d020201010301
-01010202060301000e0109320b0100630100006301000063010000630100002201000614
-0100040e0000062401000603020201010303010102020607010206100100060801000612
-010006050100060c0100060d0101061a010006ff06400202010103010101020206030100
-0e01091301000904010209150b0100630100006301000063010000630100002201000613
-01000600040e06000000062301000603020201010303010102020606010006020100060f
-0100061c010006050100060c0100060c0100061c010006ff064002020101030101010202
-060301000e0109110102090301000902010009140b01001101000009010000170100002c
-0100002c01000035010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206060100060d0102060201000600010106030102060301020603
-010206020104060201000605010206050100060b01000604010206020100060201000601
-010006000101060301010600010006ff064002020101030101010202060301000e010913
-0100090301000902010009140b01001c010000170100002c0100002c0100003501000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-020206060100060c01000602010006010101060101000604010006020100060201000601
-010006020100060301000604010006040100060201000604010006090104060101000602
-010006010100060201000601010106010100060101000601010106ff0640020201010301
-01010202060301000e0109130100090301000902010009140b0100070100000001010003
-01020003010200020100000001010003010200020100000001010003010100000100002c
-010000070100000201000002010200030102000301020003010200020104000201020002
-0100000001010026010000630100006301000022010006140100040e0000062401000603
-020201010303010102020606010306090100060201000601010006020100060401000602
-0100060201000601010006070100060401000604010006080100060b0100060301000602
-010006010100060201000601010006020100060101000602010006ff0640020201010301
-01010202060301000e01091301000904010209150b010007010100010100000401000002
-010000020100000101010001010000010100000201000001010100010100000101000001
-0101002c0100000701000002010000010100000201000001010000020100000101000002
-010000010100000201000003010000030100000201000001010100010100002501000063
-01000063010000220100061301000600040e060000000623010006030202010103030101
-020206060100060201000608010006020100060101000602010006040100060201040601
-010006070100060401000605010206050100060b01000603010006020100060101000602
-01000601010006020100060101000602010006ff06400202010103010101020206030100
-0e0109130100090301000902010009140b01000701000008010000020100000501000002
-010000050100000101000005010000020100002c01000007010000020100000501000001
-010000090100000101000007010000070100000101000002010000250100006301000063
-01000022010006140100040e000006240100060302020101030301010202060601000602
-010006080100060201000601010006020100060401000602010006050100060701000604
-01000608010006040100060b010006030100060201000601010006020100060101000602
-0100060101000602010006ff064002020101030101010202060301000e01091301000903
-01000902010009140b010007010000080100000201000005010000020100000201030001
-01000005010000020100002c010000080100000001000003010300020102000301030002
-010200040100000401030001010000020100002501000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206060100060201000608
-010006020100060101010601010006040100060201000602010006010100060201000603
-010006050100060301000602010006030100060c01000603010006020100060101000601
-01010601010006020100060101000601010106ff06400202010103010101020206030100
-0e0109130100090301000902010009140b01000701000008010000020100000501000002
-01000001010000020100000101000005010000020100002c010000080100000001000002
-010000020100000501000001010000020100000501000003010000030100000201000001
-0100000201000025010000630100006301000022010006140100040e0000062401000603
-0202010103030101020206070102060a0102060201000600010106050100060301020603
-010206050101060301000604010206040100060c01000604010206030101060001000601
-010006020100060201010600010006ff064002020101030101010202060301000e010911
-01040902010209150b010007010000080100000201000002010000010100000201000001
-010000020100000101000005010000010101002c01000009010000030100000201000001
-010000020100000101000002010000010100000201000003010000030100000201000001
-01000002010000250100006301000063010000220100061301000600040e060000000623
-010006030202010103030101020206250100061a0100060a010006ff066d020201010301
-01010202060301000e0109320b0100070100000801000003010200020100000201000002
-0103000101000006010100000100002c0100000901000004010300020102000301030002
-010200050101000201030001010000020100002501000063010000630100002201000614
-0100040e000006240100060302020101030301010202062201000601010006ff06950202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-0100061301000600040e06000000062301000603020201010303010102020623010106ff
-069602020101030101010202060301000e0109320b010063010000630100006301000063
-01000022010006140100040e00000624010006030202010103030101020206ff06bc0202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-0100061301000600040e060000000623010006030202010103030101020206ff06bc0202
-0101030101010202060301000e0109320b01006301000063010000630100006301000022
-010006140100040e00000624010006030202010103030101020206ff06bc020201010301
-01010202060301000e0109320b0100630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103030101020206ff06bc020201010301
-01010202060301000e010b34006301000063010000630100006301000022010006140100
-040e00000624010006030202010103030101020206ff06bc020201010301010102020603
-01000e000b3501ff01b7061301000600040e060000000623010006030202010103030101
-020206ff06bc020201010301010102020603010010360063010000630100006301000063
-01000022010006140100040e00000624010006030202010103030101020206ff06bc0202
-01010301010102020603010010350f000063010000630100006301000063010000220100
-061301000600040e060000000623010006030202010103030101020206ff06bc02020101
-03010101020206030100100108320f010063010000630100006301000063010000220100
-06140100040e00000624010006030202010103030101020206ff06bc0202010103010101
-020206030100100108320f01006301000063010000630100006301000022010006130100
-0600040e060000000623010006030202010103030101020206ff06bc0202010103010101
-0202060301001001081301000804010208150f0100630100006301000063010000630100
-0022010006140100040e0000062401000603020201010303000406ff06bc000403010101
-020206030100100108110102080301000802010008140f01001001000006010000490100
-000e0100001c0100000b010200030102001f010000630100006301000022010006130100
-0600040e0600000006230100060302020101030300000202050006ff06bc000002020500
-03010101020206030100100108130100080301000802010008140f010010010000510100
-000e0100001c0100000d010000050100001f010000630100006301000022010006140100
-040e000006240100060302020101030300000202050006ff06bc00000202050003010101
-020206030100100108130100080301000802010008140f01000801020002010400020102
-000201000000010100030102003b01000008010200020100000101000003010200020100
-00000101000301020002010400010100000201000004010000050100001f010000630100
-0063010000220100061301000600040e0600000006230100060302020101030300000202
-050006ff06bc000002020500030101010202060301001001081301000803010008020100
-08140f010007010000020100000301000006010000020101000101000001010000020100
-003a01000007010000020100000101000000010000030100000201000001010100010100
-00010100000201000003010000030100000201000004010000050100001f010000630100
-006301000022010006140100040e000006240100060302020101030300000202050006ff
-06bc000002020500030101010202060301001001081301000804010308140f0100070100
-0007010000060100000201000002010000050100003a0100000701000005010100080100
-0001010000020100000101000007010000030100000201000004010000050100001f0100
-006301000063010000220100061301000600040e06000000062301000603020201010303
-00000202050006ff06bc0000020205000301010102020603010010010813010008070100
-08140f01000801020004010000060100000201000002010000020103003a010000080102
-000201010005010300010100000201000002010200040100000301000002010000040100
-00050100001f010000630100006301000022010006140100040e00000624010006030202
-01010303000002020500000502ff02b00006020205000301010102020603010010010813
-01000806010008150f01000b010000030100000601000002010000020100000101000002
-0100003a0100000b01000001010000000100000301000002010000010100000201000005
-01000003010000030100000201000004010000050100001f010000630100006301000022
-0100061301000600040e0600000006230100060302020101030300000208050002ff02b0
-000002080500030101010202060301001001081101040801010208160f01000701000002
-0100000301000006010000020100000201000001010000020100003a0100000701000002
-010000010100000101000002010000020100000101000002010000010100000201000003
-010000030100000101010004010000050100001f01000063010000630100002201000614
-0100040e000006240100060302020101030300000208050002ff02b00000020805000301
-0101020206030100100108320f0100080102000501010004010000020100000201000002
-0103003a0100000801020002010000020100000201030001010000020100000201020005
-010100020101000001000004010000050100001f01000063010000630100002201000613
-01000600040e0600000006230100060302020101030300000208050001ff01b000000208
-050003010101020206030100100108320f01006301000063010000630100006301000022
-010006140100040e00000624010006030202010103030000050901ff01b0000005090301
-0101020206030100100108320f0100630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103ff03cc010102020603010010010832
-0f01006301000063010000630100006301000022010006140100040e0000062401000603
-0202010103ff03cc0101020206030100100108320f010063010000630100006301000063
-010000220100061301000600040e060000000623010006030202010103ff03cc01010202
-06030100100108320f01006301000063010000630100006301000022010006140100040e
-00000624010006030202010103ff03cc010102020603010010010f340063010000630100
-006301000063010000220100061301000600040e060000000623010006030202010103ff
-03cc010102020603010010000f3501ff01b706140100040e000006240100060302020101
-03ff03cc01010202060301000e3600630100006301000063010000630100002201000613
-01000600040e060000000623010006030202010103ff03cc01010202060301000e350b00
-006301000063010000630100006301000022010006140100040e00000624010006030202
-010103ff03cc01010202060301000e0109320b0100630100006301000063010000630100
-00220100061301000600040e060000000623010006030202010103ff03cc010102020603
-01000e0109320b01006301000063010000630100006301000022010006140100040e0000
-0624010006030202010103ff03cc01010202060301000e01091201020903010209150b01
-0063010000630100006301000063010000220100061301000600040e0600000006230100
-06030202010103ff03cc01010202060301000e0109110100090201000901010009020100
-09140b0100630100002c01000035010000630100006301000022010006140100040e0000
-0624010006030202010103ff03cc01010202060301000e01091101000902010009010100
-0902010009140b0100630100002c01000035010000630100006301000022010006130100
-0600040e060000000623010006030202010103ff03cc01010202060301000e0109110100
-09020100090101000902010009140b010008010200020100000201000002010200030102
-0002010000000101000201000000010100030102002d0100000701000002010000020102
-000301020003010200030102000201040002010200020100000001010026010000630100
-006301000022010006140100040e00000624010006030202010103ff03cc010102020603
-01000e0109140100090201000902010009140b0100070100000201000001010000020100
-000101000002010000010100000201000001010100010100000101010001010000010100
-00020100002c010000070100000201000001010000020100000101000002010000010100
-000201000001010000020100000301000003010000020100000101010001010000250100
-006301000063010000220100061301000600040e060000000623010006030202010103ff
-03cc01010202060301000e0109130100090301000902010009140b010007010000050100
-000201000001010000090100000101000002010000010100000201000001010000020100
-002c01000007010000020100000501000001010000090100000101000007010000070100
-00010100000201000025010000630100006301000022010006140100040e000006240100
-06030202010103ff03cc01010202060301000e0109120100090401000902010009140b01
-000801020002010000020100000201020003010300010100000201000001010000020100
-00010104002c010000080100000001000003010300020102000301030002010200040100
-00040103000101000002010000250100006301000063010000220100061301000600040e
-060000000623010006030202010103ff03cc01010202060301000e010911010009020100
-090101000902010009140b01000b01000001010000020100000501000001010000020100
-000101000002010000010100000201000001010000300100000801000000010000020100
-000201000005010000010100000201000005010000030100000301000002010000010100
-000201000025010000630100006301000022010006140100040e00000624010006030202
-010103ff03cc01010202060301000e01091101040902010209150b010007010000020100
-000101000001010100010100000201000001010000020100000101000002010000010100
-000201000001010000020100002c01000009010000030100000201000001010000020100
-000101000002010000010100000201000003010000030100000201000001010000020100
-00250100006301000063010000220100061301000600040e060000000623010006030202
-010103ff03cc01010202060301000e0109320b0100080102000301010000010000020102
-000301030001010000020100000101000002010000020102002d01000009010000040103
-000201020003010300020102000501010002010300010100000201000025010000630100
-006301000022010006140100040e00000624010006030202010103ff03cc010102020603
-01000e0109320b010063010000630100006301000063010000220100061301000600040e
-060000000623010006030202010103ff03cc01010202060301000e0109320b0100630100
-0063010000630100006301000022010006140100040e00000624010006030202010103ff
-03cc01010202060301000e0109320b010063010000630100006301000063010000220100
-061301000600040e060000000623010006030202010103ff03cc01010202060301000e01
-09320b01006301000063010000630100006301000022010006140100040e000006240100
-06030202010103ff03cc01010202060301000e0109320b01006301000063010000630100
-0063010000220100061301000600040e060000000623010006030202010103ff03cc0101
-0202060301000e010b34006301000063010000630100006301000022010006140100040e
-00000624010006030202010103ff03cc01010202060301000e000b3501ff01b706130100
-0600040e060000000623010006030202010103ff03cc0101020206030100060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000630100
-006301000063010000630100002201000614010006000000060000000600000006000000
-060000000600000006000000060000000624010006030202010103ff03cc010102020603
-01ff01ef0613010006000000060000000600000006000000060000000600000006000000
-06000000060000000623010006030202010103ff03cc010102020603010006ff06ff0639
-010006030202010103ff03cc010102020603010006ff06ff0639010006030202010103ff
-03cc010102020603010006ff06ff0639010006030202010103ff03cc0101020206030100
-06ff06ff0639010006030202010103ff03cc010102020603010006ff06ff063901000603
-0202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc0101
-02020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff
-0639010006030202010103ff03cc01010202060301000649010006ff06ee010006030202
-010103ff03cc01010202060301000648010106ff06ee010006030202010103ff03cc0101
-020206030100064701000600010006ff06ee010006030202010103ff03cc010102020603
-01000649010006ff06ee010006030202010103ff03cc01010202060301000649010006ff
-06ee010006030202010103ff03cc01010202060301000649010006ff06ee010006030202
-010103ff03cc01010202060301000649010006ff06ee010006030202010103ff03cc0101
-0202060301000649010006ff06ee010006030202010103ff03cc01010202060301000647
-010406ff06ec010006030202010103ff03cc010102020603010006ff06ff063901000603
-0202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc0101
-02020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff
-0639010006030202010103ff03cc010102020603010006ff06ff06390100060302020101
-03ff03cc0101020206030100063801000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100064b010006030202010103ff
-03cc01010202060301000637010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0100060001000600010006000100060001000600010006000000064a0100060302020101
-03ff03cc0101020206030100063801000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-0600000004ff04940000064b010006030202010103ff03cc010102020603010006370100
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060004ff049406000000064a
-010006030202010103ff03cc01010202060301000638010006000000060c0000060c0100
-04ff04940000064b010006030202010103ff03cc01010202060301000637010006000000
-060c0100060c0100060004ff049406000000064a010006030202010103ff03cc01010202
-060301000638010006000000060c0000060c010004ff04940000064b0100060302020101
-03ff03cc01010202060301000637010006000000060c0100060c0100060004ff04940600
-0000064a010006030202010103ff03cc01010202060301000638010006000000060c0000
-060c010004ff04940000064b010006030202010103ff03cc010102020603010006370100
-06000000060c0100060c0100060004ff049406000000064a010006030202010103ff03cc
-01010202060301000638010006000000060c0000060c010004ff04940000064b01000603
-0202010103ff03cc01010202060301000637010006000000060c0100060c0100060004ff
-049406000000064a010006030202010103ff03cc01010202060301000638010006000000
-060c0000060c010004ff04940000064b010006030202010103ff03cc0101020206030100
-0637010006000000060c0100060c0100060004ff049406000000064a0100060302020101
-03ff03cc01010202060301000638010006000000060c0000060c010004ff04940000064b
-010006030202010103ff03cc010102020603010006370100060000000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060004ff049406000000064a010006030202010103ff03cc
-010102020603010006380100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-04ff04940000064b010006030202010103ff03cc01010202060301000637010006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-0600000006000000064a010006030202010103ff03cc0101020206030100063800000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000064b010006030202010103ff03cc010102020603010006ff06ff06390100
-06030202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc
-010102020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff
-06ff0639010006030202010103ff03cc010102020603010006ff06ff0639010006030202
-010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc01010202
-0603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff0639
-010006030202010103ff03cc010102020603010006ff06ff0639010006030202010103ff
-03cc010102020603010006ff06ff0639010006030202010103ff03cc0101020206030100
-06ff06ff0639010006030202010103ff03cc010102020603010006ff06ff063901000603
-0202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc0101
-02020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff
-0639010006030202010103ff03cc010102020603010006ff06ff06390100060302020101
-03ff03cc010102020603010006ff06ff0639010006030202010103ff03cc010102020603
-010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff06390100
-06030202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc
-010102020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff
-06ff0639010006030202010103ff03cc010102020603010006ff06ff0639010006030202
-010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc01010202
-0603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff0639
-010006030202010103ff03cc010102020603010006ff06ff0639010006030202010103ff
-03cc010102020603010006ff06ff0639010006030202010103ff03cc0101020206030100
-06ff06ff0639010006030202010103ff03cc010102020603010006ff06ff063901000603
-0202010103ff03cc010102020603010006ff06ff0639010006030202010103ff03cc0101
-02020603010006ff06ff0639010006030202010103ff03cc010102020603010006ff06ff
-0639010006030202010103ff03cc00040603010006ff06ff063901000603000403ff03cc
-000002020500060301ff01ff013b060300000202050003ff03cc00000202050006ff06ff
-064300000202050003ff03cc00000202050006ff06ff064300000202050003ff03cc0000
-0202050006ff06ff064300000202050003ff03cc00000202050006ff06ff064300000202
-050003ff03cc000002020500000502ff02ff023700060202050003ff03cc000002080500
-02ff02ff023700000208050003ff03cc00000208050002ff02ff023700000208050003ff
-03cc00000208050001ff01ff013700000208050003ff03cc0000050901ff01ff01370000
-050903ff03ff03ff03ff03ff03ff03ff03ff0337
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 34 400 249
-%%EOF
diff --git a/lib/tv/doc/src/tv_search_window.gif b/lib/tv/doc/src/tv_search_window.gif
deleted file mode 100644
index d6e72dda2f..0000000000
--- a/lib/tv/doc/src/tv_search_window.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_search_window.ps b/lib/tv/doc/src/tv_search_window.ps
deleted file mode 100644
index a6dd2ef9fc..0000000000
--- a/lib/tv/doc/src/tv_search_window.ps
+++ /dev/null
@@ -1,975 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_search_window.eps)
-%%CreationDate: (Mon Mar 19 17:15:21 2001)
-%%BoundingBox: 0 0 228 183
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 228 183
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-228.000000 183.000000
-12
-455 365
-1
-0
-0
-8
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-aa2455
-999999
-000a01ff01b0000b0208040001ff01b000000208040000000208040002ff02b000000208
-0400000002080400020000ff00ad040002000000020804000000020204060200000004ff
-04ad020000000405020204000000020204000209000d02ff02a400000202040000000202
-040002080000020d0400029001030211010302330101021501010206010102a100000202
-040000000202040002080000020d04000290010102020107020001010203010102010101
-020e010302200101020c0103020401010206010102110100028e00000202040000000202
-040002080000020d04000290010102050101020301010203010102010101020d01010201
-0101021f0101020b0101020101010203010102190101028e000002020400000002020400
-0208000002020406020304000290010102050101020301010203010102010101020d0101
-020601030203010302020101020001010201010302020101020001010207010102030101
-020201010200010102030101020201030203010302000104028c00000202040000000403
-020800000202040003040000020304000290010102050101020401010202010002020101
-020d01020204010102010101020101010201010102010101020001010200010102010101
-020101020200010102060101020301010202010202000101020201010201010102010101
-020101010201010102000101028e000004030101020b0000020304000302000002040400
-0290010102050101020401010201010102020101020e0103020201010201010102050101
-020101020202010102050101020101010206010102030101020201010201010102020101
-0201010102010101020101010204010102910103020b0000020304000302000002040400
-029001010205010102050101020001000203010102100102020101050202010402010101
-020301010205010102010101020601010203010102020101020101010202010102010105
-020101010204010102910103020b00000204040003000000020504000290010102050101
-020501030203010102110101020101010205010102010101020101010203010102050101
-020101010206010102030101020201010201010102020101020101010205010102040101
-02910103020b000002040400030000000205040002900101020501010206010102040101
-020d01010201010102010101020201000201010102010101020101010203010102020100
-020101010201010102070101020101010203010102010101020201010201010102020100
-02010101020201000200010102910103020b000002050000020604000290010102050101
-0206010102040101020e0103020301030203010202000101020001010204010302020101
-02010101020801030204010402030101020201030203010302020102028f0103020b0000
-020d040002900103021101030254010102a40103020b0000020d040002fd010202a50103
-020b0000020d040002ff02a60103020c040d02ff02a7010302ff02c2010302ff02c20103
-020200ff00bb0400020201030202000004ff04bb0202010302ff02c20103020205ff05bc
-02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc020201030202
-05ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc0202
-0103020205ff05bc02020103020205ff05bc020201030202050800000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000508020201030202050700000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500010005070202010302020508000005ff05a8
-010005080202010302020507000005ff05aa010005070202010302020508000005ff05a8
-010005080202010302020507000005ff05aa010005070202010302020508000005ff05a8
-010005080202010302020507000005ff05aa010005070202010302020508000005ff05a8
-010005080202010302020507000005ff05aa010005070202010302020508000005ff05a8
-010005080202010302020507000005ff05aa010005070202010302020508000005ff05a8
-010005080202010302020507000005ff0549000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005110100
-05070202010302020508000005ff05470000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000051101000508
-0202010302020507000005ff05490000054c010005110100050702020103020205080000
-05ff05470000054c010005110100050802020103020205070000050d0102051e0100050f
-010105ff05060000054c010005110100050702020103020205080000050b010005020100
-051d0100050e010005ff05070000054c010005110100050802020103020205070000050c
-010005060102050301020502010005000101050301020502010005000101050b01000504
-010205020100050001010504010105f20000054c01000511010005070202010302020508
-0000050c0100050401000502010005010100050201000501010105010100050101000502
-0100050101010501010005080104050101000502010005010101050101000503010105f1
-0000054c010005110100050802020103020205070000050e010105020100050201000505
-010005010100050501000505010005020100050a010005030100050201000501010005fc
-0000054c010005110100050702020103020205080000050f010005010104050201030501
-0100050501000505010005020100050a010005030100050201000501010005fb00000512
-0102051e01000516010005110100050802020103020205070000050c0100050201000501
-0100050501000502010005010100050501000505010005020100050a0100050301000502
-01000501010005fc00000510010005020100051d01000517010005110100050702020103
-020205080000050b01000502010005010100050201000501010005020100050101000505
-0100050201000501010005020100050a01000503010005020100050101000507010105f1
-000005110100050601020503010205020100050001010503010205020100050001010513
-010005110100050802020103020205070000050d01020503010205030103050101000506
-01020502010005020100050a010005040102050201000507010105f20000051101000504
-010005020100050101000502010005010101050101000501010005020100050101010501
-0100051301000511010005070202010302020508000005ff054700000513010105020100
-050201000505010005010100050501000505010005020100051201000511010005080202
-010302020507000005ff0549000005140100050101040502010305010100050501000505
-010005020100051301000511010005070202010302020508000005ff0547000005110100
-050201000501010005050100050201000501010005050100050501000502010005120100
-0511010005080202010302020507000005ff054900000510010005020100050101000502
-010005010100050201000501010005050100050201000501010005020100051301000511
-010005070202010302020508000005ff0547000005120102050301020503010305010100
-050601020502010005020100051201000511010005080202010302020507000005ff0549
-0000054c01000511010005070202010302020508000005ff05470000054c010005110100
-050802020103020205070000050901ff012c05120000054c010005110100050702020103
-020205080000050801ff012c05110000054c010005110100050802020103020205070000
-0509010107ff0728010105120000054c0100051101000507020201030202050800000508
-010107ff07270000010105110000054c0100051101000508020201030202050700000509
-0101070100ff0026010105120000054c0100051101000507020201030202050800000508
-0101070100ff0026010105110000054c0100051101000508020201030202050700000509
-0101070100ff0026010105120000054c0100051101000507020201030202050800000508
-010107010000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000000300000003000000030000000300
-000003000000030000000300000003000000030000a0010105110000054c010005110100
-05080202010302020507000005090101070103840101009f010105120000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100051101000507020201030202050800000508010107010000030401000377
-010003040101009f01010511000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005110100050802020103
-0202050700000509010107010304010003030102031e0100034001000310010003030101
-009f01010573010005070202010302020508000005080101070100000302010003030100
-03020100031d01000353010003020101009f010105720100050802020103020205070000
-050901010701030201000304010003060102030301020302010003000101030301020302
-010003000101030a01020302010003020100030101000300010103020100030001010303
-01020303010203030102030301020303010203020100030001010304010003010101009f
-010105730100050702020103020205080000050801010701000003000100030601000304
-010003020100030101000302010003010101030101000301010003020100030101010301
-010003080100030201000301010003020100030101010301010003010101030101000301
-010003020100030101000302010003010100030201000304010003020100030201000301
-0101030101000304010003000101009f0101057201000508020201030202050700000509
-010107010300010003080101030201000302010003050100030101000305010003050100
-030201000308010003020100030201000300010003020100030201000301010003050100
-030201000301010003050100030801000302010003020100030101000302010003050102
-009f01010573010005070202010302020508000005080101070100000300010003090100
-030101040302010303010100030501000305010003020100030801040303010003030100
-030201000301010003050104030201020303010203050100030201000302010003010100
-030201000304010003000101009f01010572010005080202010302020507000005090101
-070103020100030401000302010003010100030501000302010003010100030501000305
-010003020100030801000306010003000100030201000302010003010100030501000309
-01000305010003040100030201000302010003010100030201000303010003010101009f
-010105730100050702020103020205080000050801010701000003020100030301000302
-010003010100030201000301010003020100030101000305010003020100030101000302
-010003080100030201000301010003020100030101010301010003010100030501000302
-010003010100030201000301010003020100030401000302010003020100030101000302
-01000302010003020101009f010105720100050802020103020205070000050901010701
-030401000303010203030102030301030301010003060102030201000302010003090102
-030201000302010003010100030001010302010003060102030301020303010203050100
-0303010203020100030201000301010003030101009f0101057301000507020201030202
-05080000050801010701000003040100034001000335010003040101009f010105720100
-05080202010302020507000005090101070103470100033b0101009f0101051200000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000511010005070202010302020508000005080101070100000346
-0100033b0101009f01010511000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005110100050802020103
-020205070000050901010701030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300010003000100
-030001000300010003000100030001000300010003000100030001000300009f01010512
-0000054c01000511010005070202010302020508000005080101070100ff002601010511
-0000054c01000511010005080202010302020507000005090101070100ff002601010512
-0000054c01000511010005070202010302020508000005080101070100ff002601010511
-0000054c01000511010005080202010302020507000005090101070100ff002601010512
-0000054c01000511010005070202010302020508000005080101070000ff002701010511
-0000054c010005110100050802020103020205070000050901ff012c05120000054c0100
-05110100050702020103020205080000050801ff012c0511000005120102051f01020513
-01000511010005080202010302020507000005ff05490000051001000502010005200100
-051401000511010005070202010302020508000005ff0547000005110100050201000502
-010205020100050001010503010205030102050501000513010005110100050802020103
-02020507000005ff05490000051001000505010005020100050101010501010005010100
-050201000501010005020100050401000514010005110100050702020103020205080000
-05ff05470000051101000509010005010100050201000501010005050100050201000504
-0100051301000511010005080202010302020507000005ff054900000510010005060103
-050101000502010005010100050501040504010005140100051101000507020201030202
-0508000005ff054700000511010005020100050101000502010005010100050201000501
-01000505010005080100051301000511010005080202010302020507000005ff05490000
-051001000502010005010100050201000501010005020100050101000502010005010100
-0502010005040100051401000511010005070202010302020508000005ff054700000512
-010205030103050101000502010005020102050301020505010005130100051101000508
-0202010302020507000005ff05490000054c010005110100050702020103020205080000
-05ff05470000054c01000511010005080202010302020507000005ff05490000054c0100
-0511010005070202010302020508000005ff05470000054c010005110100050802020103
-02020507000005ff05490000054c01000511010005070202010302020508000005ff0547
-0000054c01000511010005080202010302020507000005ff05490000054c010005110100
-05070202010302020508000005ff05470000054c01000511010005080202010302020507
-0000052201000563000005c00000054c0100051101000507020201030202050800000520
-01000500010005230100053c000005000000053e0102054b0100052f0000054c01000511
-010005080202010302020507000005200100050001000500010005220100053b00000500
-000005000000053f0100057d000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005110100050702020103
-020205080000051e010005000601010005000100050b0102050301020509010405020102
-05020100050001010502010105000100052400000502000005000000050b010205030102
-050901000500010105030102050301010500010005010100050201000504010005030102
-0502010005000101050a0102050201000502010005010100050001010502010005000101
-050301020503010205030102050301020503010205020100050001010521000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005110100050802020103020205070000051e01000500060301000500
-010005090100050201000501010005020100050a01000503010005020100050101010501
-010005010100050001000500010005220000050400000500000005090100050201000501
-010005020100050801010501010005010100050201000501010005010101050101000502
-010005040100050201000502010005010101050101000508010005020100050101000502
-010005010101050101000501010105010100050101000502010005010100050201000501
-010005020100050401000502010005020100050101010501010005820100050702020103
-020205080000051c010005000605010005000100050c010005010100050e010005030100
-0502010005010100050501000500010005000100052100000506000005000000050c0100
-05010100050c010005050100050201000501010005020100050101000502010005040100
-0506010005010100050c0100050201000502010005000100050201000502010005010100
-050501000502010005010100050501000508010005020100050201000501010005020100
-05810100050802020103020205070000051c000005000607000005000000050801030502
-0102050b0100050301040501010005050100050001000500010005200100050801000500
-010005080103050201020509010005050104050101000502010005010100050201000504
-01000503010305010100050c010405030100050301000502010005010100050501040502
-010205030102050501000502010005020100050101000502010005820100050702020103
-020205080000051c000005000605000005000000050801000502010005050100050a0100
-050301000505010005050100050001000500010005210100050601000500010005080100
-050201000505010005080100050501000505010005020100050101000502010005040100
-050201000502010005010100050c01000506010005000100050201000502010005010100
-050501000509010005050100050401000502010005020100050101000502010005810100
-050802020103020205070000051e00000500060300000500000005090100050201000501
-010005020100050a01000503010005020100050101000505010005000100050001000522
-010005040100050001000509010005020100050101000502010005080100050501000502
-01000501010005010101050101000501010105040100050201000502010005010100050c
-010005020100050101000502010005010101050101000501010005050100050201000501
-010005020100050101000502010005040100050201000502010005010100050201000582
-0100050702020103020205080000051e000005000601000005000000050b010305020102
-050c01010502010205020100050501000500010005000100052301000502010005000100
-050b01030502010205090100050601020503010105000100050201010500010005040100
-0503010305010100050d0102050201000502010005010100050001010502010005060102
-050301020503010205050100050301020502010005020100058101000508020201030202
-05070000052000000500000005000000055f010005000100050001000532010005320100
-05b7010005070202010302020508000005200000050000000561010005000100052f0100
-050201000532010005b60100050802020103020205070000052200000563010005310102
-0533010005b7010005070202010302020508000005ff05a8010005080202010302020507
-000005ff05aa010005070202010302020508000005ff05a8010005080202010302020507
-000005ff05aa010005070202010302020508000005ff05a8010005080202010302020507
-000005ff05aa010005070202010302020508000005ff05a8010005080202010302020507
-000005ff05aa010005070202010302020508000005ff05a8010005080202010302020507
-000005ff05aa010005070202010302020508000005ff05a8010005080202010302020507
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050702020103
-020205080100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050802020103
-020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc
-02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc020201030202
-05ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05a10100
-050001000500010005000100050001000500010005000100050001000500010005090202
-0103020205ff05a001000500010005000100050001000500010005000100050001000500
-010005000100050000000508020201030202050707ff0796050201000506010005060000
-0509020201030202050707ff079500000501010005060000050800000508020201030202
-0507070100ff009405020100050601000506000005090202010302020507070100ff0094
-0501010005060000050001000506000005080202010302020507070100ff009405020100
-05040000050201000504000005090202010302020507070100ff00940501010005040000
-050201000506000005080202010302020507070100ff0094050201000504000005020100
-0504000005090202010302020507070100ff009405010100050400000504010005040000
-05080202010302020507070100ff00940502010005020000050601000502000005090202
-010302020507070100ff0094050101000502000005060100050400000508020201030202
-0507070100ff009405020100050200000506010005020000050902020103020205070701
-00ff00940501010005020000050801000502000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-050000000500010005000100050001000500010005000100050001000502000005080202
-010302020507070100ff0094050201000500010005000100050001000500010005000100
-05000100050001000500000005090202010302020507070100ff00940501010005100000
-05080202010302020507070100ff00940502010005000000050000000500000005000000
-0500000005000000050000000500000005090202010302020507070100ff009405010100
-050000000500000005000000050000000500000005000000050000000500010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-0501010005000000050c01000500000005080202010302020507070100ff009405020100
-05000000050a01000500000005090202010302020507070100ff00940501010005000000
-050c01000500000005080202010302020507070100ff00940502010005000000050a0100
-0500000005090202010302020507070100ff00940501010005000000050c010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-0501010005000000050c01000500000005080202010302020507070100ff009405020100
-05000000050a01000500000005090202010302020507070100ff00940501010005000000
-050c01000500000005080202010302020507070100ff00940502010005000000050a0100
-0500000005090202010302020507070100ff00940501010005000000050c010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-0501010005000000050c01000500000005080202010302020507070100ff009405020100
-05000000050a01000500000005090202010302020507070100ff00940501010005000000
-050c01000500000005080202010302020507070100ff00940502010005000000050a0100
-0500000005090202010302020507070100ff00940501010005000000050c010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-0501010005000000050c01000500000005080202010302020507070100ff009405020100
-05000000050a01000500000005090202010302020507070100ff00940501010005000000
-050c01000500000005080202010302020507070100ff00940502010005000000050a0100
-0500000005090202010302020507070100ff00940501010005000000050c010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-0501010005000000050c01000500000005080202010302020507070100ff009405020100
-05000000050a01000500000005090202010302020507070100ff00940501010005000000
-050c01000500000005080202010302020507070100ff00940502010005000000050a0100
-0500000005090202010302020507070100ff00940501010005000000050c010005000000
-05080202010302020507070100ff00940502010005000000050a01000500000005090202
-010302020507070100ff00940501010005000000050c0100050000000508020201030202
-0507070100ff00940502010005000000050a010005000000050902020103020205070701
-00ff00940501010005000000050c01000500000005080202010302020507070100ff0094
-0502010005000000050a01000500000005090202010302020507070100ff009405010100
-05000000050c01000500000005080202010302020507070100ff00940502010005000000
-050a01000500000005090202010302020507070100ff00940501010005000000050c0100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005000000050c01000500000005080202
-010302020507070100ff00940502010005000000050a0100050000000509020201030202
-0507070100ff00940501010005000000050c010005000000050802020103020205070701
-00ff00940502010005000000050a01000500000005090202010302020507070100ff0094
-050101000500000005000100050001000500010005000100050001000500010005000100
-0500000005080202010302020507070100ff009405020100050001000500010005000100
-050001000500010005000100050001000500000005090202010302020507070100ff0094
-050101000510000005080202010302020507070100ff0094050201000500000005000000
-050000000500000005000000050000000500000005000000050902020103020205070701
-00ff00940501010005020000050000000500000005000000050000000500000005000100
-0500000005080202010302020507070100ff00940502010005000000050a010005000000
-05090202010302020507070100ff00940501010005020000050801000502000005080202
-010302020507070100ff0094050201000502000005060100050200000509020201030202
-0507070100ff009405010100050400000506010005020000050802020103020205070701
-00ff00940502010005020000050601000502000005090202010302020507070100ff0094
-0501010005040000050401000504000005080202010302020507070100ff009405020100
-05040000050201000504000005090202010302020507070100ff00940501010005060000
-050201000504000005080202010302020507070100ff0094050201000504000005020100
-0504000005090202010302020507070100ff009405010100050600000500010005060000
-05080202010302020507070100ff00940502010005060100050600000509020201030202
-0507070100ff009405010100050801000506000005080202010302020507070000ff0095
-050201000506010005060000050902020103020205ff05a0010005000000050000000500
-0000050000000500000005000000050000000500000005000000050802020103020205ff
-05a100000500000005000000050000000500000005000000050000000500000005000000
-050902020103020205060100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005180202010302020505010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500000005170202010302020506010005100000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005020000
-050c0000051802020103020205050100050c000005000100050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050001000500000005000000
-050c0000051702020103020205060100050a0000050001000502000005ff057601000502
-000005000000050000000508000005180202010302020505010005080000050000000502
-01000500000005ff05780100050000000502000005000000050800000517020201030202
-050601000506000005000000050201000502000005ff0576010005020000050400000500
-0000050400000518020201030202050501000504000005000000050601000500000005ff
-057801000500000005060000050000000504000005170202010302020506010005020000
-05000000050601000502000005ff05760100050200000508000005000000050000000518
-020201030202050501000500010005000100050a01000500000005ff0578010005000000
-050a01000500010005000000051702020103020205060100050201000500010005060100
-0502000005ff057601000502000005080100050001000500000005180202010302020505
-01000504010005000100050601000500000005ff05780100050000000506010005000100
-050400000517020201030202050601000506010005000100050201000502000005ff0576
-010005020000050401000500010005040000051802020103020205050100050801000500
-0100050201000500000005ff057801000500000005020100050001000508000005170202
-0103020205060100050a0100050001000502000005ff0576010005020000050001000500
-010005080000051802020103020205050100050c01000500010005000000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050000000500
-0100050c0000051702020103020205060100051001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050001000500010005020100050c000005180202010302020505
-010005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005170202010302020506000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-00000500000005000000051802020103020205ff05bc02020103020205ff05bc02020103
-020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc
-02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc020201030202
-05ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc0202
-0103020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff
-05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103
-020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc
-02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc020201030202
-05ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc0202
-0103020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff
-05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103
-020205ff05bc02020103020205ff05bc02020103020205ff05bc02020103020205ff05bc
-02020101000405ff05bc00050202040005ff05bc00000202040000000202040005ff05bc
-00000202040000000202040005ff05bc00000202040000000202040005ff05bc00000202
-040000000202040005ff05bc000002020400000002020400000502ff02b0000602020400
-00000208040002ff02b000000208040000000208040002ff02b000000208040000000208
-040001ff01b00000020804000000040901ff01b000000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 228 183
-%%EOF
diff --git a/lib/tv/doc/src/tv_start.gif b/lib/tv/doc/src/tv_start.gif
deleted file mode 100644
index 7a8a0cf6ce..0000000000
--- a/lib/tv/doc/src/tv_start.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start.ps b/lib/tv/doc/src/tv_start.ps
deleted file mode 100644
index 7dae8e4a5a..0000000000
--- a/lib/tv/doc/src/tv_start.ps
+++ /dev/null
@@ -1,828 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_start.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:02:24 2001)
-%%BoundingBox: 0 42 377 247
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 42 377 247
-userdict begin
-%%BeginData:
-DisplayImage
-0 42
-377.000000 205.000000
-12
-755 410
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-828282
-aab6aa
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff01ff01dc000b0208040001ff01ff01dc00000208040000000208040002ff02ff
-02dc000002080400000002080400020000ff00ff00d90400020000000208040000000202
-04060200000004ff04ff04d9020000000405020204000000020204000209000d02ff02ff
-02d000000202040000000202040002080000020d040002f6010302110103023801010206
-0101024001010230010102ff020400000202040000000202040002080000020d040002f6
-010102020107020001010203010102010101020e0105020001070201010302070100020b
-01010206010102400101020c0104021e010102ff02040000020204000000020204000208
-0000020d040002f6010102050101020301010203010102010101020e0101020701010203
-01010201010102050101020b010102060101024e010102020101021d010102ff02040000
-0202040000000202040002080000020204060203040002f6010102050101020301010203
-010102010101020e01010207010102030101020801040201010302030101020001010203
-010102020103020301040206010302030101020001010207010102000101020101010203
-010302030101020201010200010102020101020101030202010102000101020101010203
-010302020101020001010201010102020103020201010202010102f30000020204000000
-04030208000002020400030400000203040002f601010205010102040101020201000202
-0101020e0101020701010203010202080101020201010201010102020102020001010202
-010102010101020101010201010102090101020101010202010202000101020601020200
-010202000101020101010201010102020101020201020200010102010101020001010200
-010102020102020001020200010102010101020101010201010102000101020101010201
-010102010101020101010202010102f3000004030101020b000002030400030200000204
-040002f6010102050101020401010201010102020101020e010402040101020401030206
-010102060101020201010201010102020101020101010201010102010102020801010201
-010102020101020101010206010102010101020101010205010102020101020201010201
-010102010101020001010200010102020101020101010201010102050101020101020203
-01010201010102010101020101010202010002f70103020b000002030400030200000204
-040002f6010102050101020501010200010002030101020e010102070101020601020205
-010102030104020201010201010102020101020101050202010302060101020101010202
-010102010101020601010201010102010101020201040202010102020101020101010201
-010102000101020001010202010102010101020101010202010402010101020401010201
-0105020201010200010102f70103020b000002040400030000000205040002f601010205
-01010205010302030101020e010102070101020701010205010102020101020101010202
-010102010101020201010201010102080102020501010201010102020101020101010206
-010102010101020101010201010102010101020201010202010102010101020101010201
-010102000101020101010201010102010101020101010201010102010101020401010201
-0101020601010200010002f80103020b000002040400030000000205040002f601010205
-01010206010102040101020e010102070101020301010201010102050101020201010201
-010102020101020101010202010102010101020201000205010102050101020101010202
-010102010101020601010201010102010101020101010201010102020101020201010201
-010102020101020701010201010102010101020101010201010102010101020401010201
-0101020201000203010202f80103020b0000020500000206040002f60101020501010206
-010102040101020e01050203010102040103020701020201010202000101020101040203
-010102020103020201040207010302030101020101010206010102010101020101010202
-010202000101020101010202010102010101020301050202010102010101020101010202
-0102020001010200010102040101020201030204010102f90103020b0000020d040002f6
-01030211010302c4010102fa0103020b0000020d040002ff02d5010102fa0103020b0000
-020d040002ff02ff02d20103020c040d02ff02ff02d3010302ff02ff02ee010302ff02ff
-02ee0103020200ff00ff00e70400020201030202000004ff04ff04e70202010302ff02ff
-02ee0103020200ff00ff00e802020103020200ff00ff00e70700020201030202000105ff
-05ff05e40701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e407010202
-010302020001050b06040504060005030602051f0600050206000504060005270602050b
-06000506060005ff05ff053506000502060005090602051307010202010302020001050b
-0600050f0600051f060005020600052c060005020600050a060005ff05ff053d06000502
-0600050b0600051307010202010302020001050b06000506060205050600050306020518
-060005020600050206020503060205020600050206000517060005020600050106000500
-060105020604050206020503060205020600050006010503060205ff05ff052006000502
-060005020602050506000502060005000601050c07010202010302020001050b06000508
-060005050600050206000502060005180600050006000505060005020600050206000501
-060005020600051706000502060005010601050106000503060005060600050206000502
-06000501060105010600050106000502060005ff05ff051f060005020600050106000502
-0600050406000502060105010600050b07010202010302020001050b0603050506000505
-060005020600050206000518060005000600050506000502060005020600050106000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000501060005ff05ff052306040501060005020600050406000502
-060005020600050b07010202010302020001050b06000508060005050600050206040518
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05ff052006000502060005010604050406000502060005020600050b0701020201030202
-0001050b0600050806000505060005020600051d06000506060005020600050506000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000505060005ff05ff051f06000502060005010600050806000502
-060005020600050b07010202010302020001050b06000508060005050600050206000502
-060005190600050606000502060005020600050106000500060005000600051706000502
-060005010601050106000503060005060600050206000502060005010600050206000501
-06000502060005ff05ff051f060005020600050106000502060005040600050206010501
-0600050b07010202010302020001050b0600050806000505060005030602051a06000506
-060005030602050306000500060005190602050206000500060105050601050406000503
-060205020600050206000502060205ff05ff052006000502060005020602050506000502
-060005000601050c070102020103020200010576060005ff05ff055b0600050f07010202
-010302020001050a0606052a0606052a06060500060005ff05ff05450606050e0600050f
-07010202010302020001050a0606052a0606052a06060500060005ff05ff05450606050e
-0600050f0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000107ff07ff07e602020103
-0202000007ff07ff07e702020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e8020201030202051c010205040103
-05c1010205040103051a0102057f01010505010205f001020504010305190101052f0202
-01030202050e01060508010005060101050f010205010102059b01060508010005060101
-0510010505040101054d010205240104050d0101051e0102052401020501010205930106
-0508010005060101051101030535020201030202050e0100050101010500010005070101
-050601000511010105010100059d01000501010105000100050701010506010005130101
-05060100054d0101050001010524010105000101050c0100051e01010500010105240101
-050101000595010005010101050001000507010105060100051101010501010105340202
-010302020510010105030103050201030503010105030103050801020500010105010103
-05000101050001000500010005020103058b010105030103050201030503010105030103
-050a010105030104054c0101050101050500010305000102050201030501010105000102
-05070101050101010500010305030104051d010105010105050001030500010205020103
-050101010500010205070102050001010501010305000101050001000500010005020103
-058301010503010305020103050301010503010305090101050101000500010305020105
-050101030521020201030202051001010506010105000101050101010502010105020101
-0501010105070100050001000500010005050101050001050500010105010101058a0101
-050601010500010105010101050201010502010105010101050901010502010105010101
-054c01000502010105000101050201000500010205000101050001010501010105010102
-050001000507010105010101050201010502010105010101051d01000502010105000101
-050201000500010205000101050001010501010105010102050001000507010005000100
-050001000505010105000105050001010501010105820101050601010500010105010101
-050201010502010105010101050801020504010105020101050001010501010105010101
-052002020103020205100100050401040500010105010101050201010501010605070100
-0500010205020104050001010500010005000107058a0100050401040500010105010101
-0502010105010106050901010501010105020101054b0101050201000501010105000100
-05000100050001010501010805010101050a0103050401010501010105020101051c0101
-05020100050101010500010005000100050001010501010805010101050a010005000102
-050201040500010105000100050001070582010005040104050001010501010105020101
-05010106050901020503010105040101050101060520020201030202050f010105020101
-0501010105000101050201010501010105020101050b0101050001010501010105010101
-05010100050001000500010005000101058e010105020101050101010500010105020101
-0501010105020101050d01010502010105010101054c0101050101010501010205000100
-05010100050201000500010105050101050a0101050601010502010105010101051d0101
-05010101050101020500010005010100050201000500010105050101050a010105000101
-050101010501010105010100050001000500010005000101058601010502010105010101
-05000101050201010501010105020101050b010105010101050201010503010105030101
-0525020201030202050f0101050201010501010105000101050101010502010105020101
-050101010507010005010101050101010501010105000101050001000500010005000101
-05010101058a010105020101050101010500010105010101050201010502010105010101
-050901010502010105010101054c01010500010105020103050101010501010105000101
-0501010105010101050a0101050601010502010105010101051d01010500010105020103
-0501010105010101050001010501010105010101050a0100050101010501010105010101
-050001010500010005000100050001010501010105820101050201010501010105000101
-050101010502010105020101050101010507010105010101050201010502010205000101
-05000101050101010521020201030202050e01030502010a050101050501010305070102
-0500010105020107050001000500010105000103058a01030502010a0501010505010103
-0508010505010105054c0102050301010500010005000103050001020500010305010104
-050701030503010505010105051d01020503010105000100050001030500010205000103
-05010104050701020500010105020107050001000500010105000103058201030502010a
-050101050501010305090103050101050500010505010103052202020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e8020201030202050201ff01ff01e205020202010302020503080000cb080001000081
-01010059010100c30101005801000711000005020202010302020503080000cb08000100
-000b0101004e0101002201010059010100c3010100580100070103060700030600010502
-0202010302020503080000cb08000100000a0100001c0100002a01000008010000210101
-000c0100002a0100001f010100c301010058010007010305000007000306000105020202
-0103020205030800001f0800000a080000060802009408000100000a0100000401020003
-0102000c010000040101000a010200030102000b0101000201000007010000210101000b
-010000040101000a010200030102000b010100020100001e010100c30101000a0101004b
-0100070103050000070103050001050202020103020205030800001f0800000a08000008
-0800009408000100000a010000030100000201000001010000020100000a010000040100
-000101000008010000020100000101000002010000090100000101000002010000060100
-00210101000a010000040100000101000008010000020100000101000002010000090100
-0001010000020100001d010100c301010009010000010100004a01000701030400010701
-030500010502020201030202050308000008080100000800000208000002080000080804
-0002080200020800000008010005080000030802008d08000100000a0100000701000005
-0100000901000005010000010100000c0100000501000009010000010100000301000005
-010000210101000901000005010000010100000c01000005010000090100000101000003
-0100001c010100c301010009010000010100004a01000701030400010500070103040001
-0502020201030202050308000008080000000800000008000001080000020800000a0800
-00030800000208000001080100010800000408000002080000020800008c08000100000a
-01000007010000050100000801000006010000010100000c010000050100000901000001
-0100000401000004010000210101000801000006010000010100000c0100000501000009
-01000001010000040100001b010100c301010009010000010100004a0100070103030001
-050107010304000105020202010302020503080000080800000008000000080000020800
-00010800000a0800000708000001080000020800000408000002080000020800008c0800
-0100000801010007010000050100000801000007010000010100000a010100040101000a
-0100000101000005010000040101001f0101000701000007010000010100000a01010004
-0101000a01000001010000050100001a010100c301010009010000010100004a01000701
-030300010502070103030001050202020103020205030800000808000000080000000800
-0002080000010800000a08000004080300010800000208000004080000020804008c0800
-0100000a01000005010000050100000a01000006010000010100000c0100000501000009
-010000010100000401000004010000210101000801000006010000010100000c01000005
-0100000901000001010000040100001b010100c301010009010000010100004a01000701
-030200010503070103030001050202020103020205030800000808000000080000000800
-0003080000000800000a0800000308000002080000010800000208000004080000020800
-009008000100000a01000004010000050100000c01000005010000010100000c01000005
-01000009010000010100000301000005010000210101000901000005010000010100000c
-010000050100000901000001010000030100001c010100c301010009010000010100004a
-010007010302000105040701030200010502020201030202050308000008080000000800
-0000080000030801000b0800000308000002080000010801000108000004080000020800
-00020800008c08000100000a010000030100000501000007010100040100000401000001
-010000030101000201000002010000010100000201000003010100030100000101000002
-01000006010000210101000a010000040100000101000003010100020100000201000001
-01000002010000030101000301000001010000020100001d010100c30101000901000001
-0100004a0100070103010001050507010302000105020202010302020503080000080800
-000008000000080000040800000c08010002080300010800000008010005080000030802
-008d08000100000a01000003010400010104000301010005010000040101000401010003
-0102000301020004010100040101000201000007010000210101000b0100000401010004
-01010003010200030102000401010004010100020100001e010100c30101000a0101004b
-010007010301000105060701030100010502020201030202050308000012080000010805
-00af08000100000a01000014010000060100002a01000008010000210101000c0100002a
-0100001f010100c301010058010007010300000105070701030100010502020201030202
-05030800000f08000000080000b808000100000b010100100101003b0101002201010059
-010100c30101005801000701030000010508070103000001050202020103020205030800
-0010080000b908000100008101010059010100c301010058010007010001070b03000001
-05020202010302020503080000cb08000100008101010059010100c30101005801000701
-0000070d000105020202010302020503080000cb08000100008101010059010100c30101
-005801000701030e000105020202010302020503080000cb080001000081010100590101
-00c30101005801000701001005020202010302020503080000cb08000100008101010059
-010100c30101005801000701000d070000010502020201030202050308cd01ff01ff0100
-07010001050a070100010502020201030202050301ff01ff01ce07010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a070100010502020201030202050301ff01ff01ce07010001050a0701000105020202
-01030202050301ff01ff01ce07010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-050301ff01ff01ce07010001050a070100010502020201030202050301ff01ff01ce0701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a070100010502020201030202050301ff01ff01ce07010001050a
-070100010502020201030202050301ff01ff01ce07010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-0502020201030202050301ff01ff01ce07010001050a0701000105020202010302020503
-01ff01ff01ce07010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a070100010502020201030202050301ff01ff
-01ce07010001050a070100010502020201030202050301ff01ff01ce07010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a070100010502020201030202050301ff01ff01ce07010001050a070100010502
-020201030202050301ff01ff01ce07010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-0202050301ff01ff01ce07010001050a070100010502020201030202050301ff01ff01ce
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a070100010502020201030202050301ff01ff01ce07010001
-050a070100010502020201030202050301ff01ff01ce07010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-00010502020201030202050301ff01ff01ce07010001050a070100010502020201030202
-050301ff01ff01ce07010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a070100010502020201030202050301ff
-01ff01ce07010001050a070100010502020201030202050301ff01ff01ce07010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001070c
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0000070d00010502020201030202050301ff01ff01ce0701030e00010502020201030202
-050301ff01ff01ce0701030e000105020202010302020503010000cb0101008101010059
-010100c30101005801000701030e000105020202010302020503010000cb010100810101
-0059010100c30101005801000701030e000105020202010302020503010000cb01010081
-01010059010100c30101005801000701030e000105020202010302020503010000cb0101
-008101010059010100c30101005801000701030e000105020202010302020503010000cb
-0101008101010059010100c30101005801000701030e0001050202020103020205030100
-00cb0101008101010059010100c30101005801000701030e000105020202010302020503
-010000cb0101008101010059010100c30101005801000701030e00010502020201030202
-0503010000cb0101008101010059010100c30101005801000701030e0001050202020103
-02020503010000cb0101008101010059010100c30101005801000701030e000105020202
-010302020503010000cb0101008101010059010100c30101005801000701030e00010502
-0202010302020503010000cb0101008101010059010100c30101005801000701030e0001
-05020202010302020503010000cb0101008101010059010100c30101005801000701030e
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-030e000105020202010302020503010000cb0101008101010059010100c3010100580100
-0701030e000105020202010302020503010000cb0101008101010059010100c301010058
-01000701030e000105020202010302020503010000cb0101008101010059010100c30101
-005801000701030e000105020202010302020503010000cb0101008101010059010100c3
-0101005801000701030e000105020202010302020503010000cb01010081010100590101
-00c30101005801000701030e000105020202010302020503010000cb0101008101010059
-010100c30101005801000701030e00010502020201030202050301ff01ff01ce0701030e
-00010502020201030202050301ff01ff01ce0701001005020202010302020503010000cb
-0101008101010059010100c301010058010007010300000c070000010502020201030202
-0503010000cb0101008101010059010100c3010100580100070103000001050807010300
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-03010001050707010300000105020202010302020503010000cb01010081010100590101
-00c3010100580100070103010001050607010301000105020202010302020503010000cb
-0101008101010059010100c3010100580100070103020001050507010301000105020202
-010302020503010000cb0101008101010059010100c30101005801000701030200010504
-07010302000105020202010302020503010000cb0101008101010059010100c301010058
-0100070103030001050307010302000105020202010302020503010000cb010100810101
-0059010100c3010100580100070103030001050207010303000105020202010302020503
-010000cb0101008101010059010100c30101005801000701030400010501070103030001
-05020202010302020503010000cb0101008101010059010100c301010058010007010304
-0001050007010304000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010305000007020304000105020202010302020503010000cb01010081
-01010059010100c301010058010007010305000007010305000105020202010302020503
-010000cb0101008101010059010100c30101005801000701030607010305000105020202
-010302020503010000cb0101008101010059010100c30101005801000701030607000306
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-001005020202010302020503010000cb0101008101010059010100c30101005801000700
-00110502020201030202050207ff07ff07d30511020201030202050207ff07ff07d20000
-051102020103020205020701030d0000030000ff00ff00af03000001030c000105110202
-0103020205020701030b00010700030000ff00ff00ae070003000003030a000105110202
-01030202050207010309000207010300000105ff05ff05ab070103000005030800010511
-0202010302020502070103070003050007010300000105ff05ff05ab0701030000010501
-00030306000105110202010302020502070103050003050207010300000105ff05ff05ab
-070103000001050300030304000105110202010302020502070103030003050407010300
-000105ff05ff05ab07010300000105050003030200010511020201030202050207010301
-0003050607010300000105ff05ff05ab0701030000010507000303000001051102020103
-020205020705050807010300000105ff05ff05ab07010300000105080703000105110202
-010302020502070103010703050607010300000105ff05ff05ab07010300000105070703
-0300000105110202010302020502070103030703050407010300000105ff05ff05ab0701
-030000010505070303020001051102020103020205020701030507030502070103000001
-05ff05ff05ab070103000001050307030304000105110202010302020502070103070703
-050007010300000105ff05ff05ab07010300000105010703030600010511020201030202
-05020701030907040300000105ff05ff05ab070103000001070303080001051102020103
-020205020701030b07020300000107ff07ff07ad030000010701030a0001051102020101
-000405020701030d07000300000007ff07ff07ae030000000700030c0001051100050202
-04000502070100ff00ff00d105110000020204000000020204000502070000ff00ff00d2
-051100000202040000000202040005ff05ff05e800000202040000000202040005ff05ff
-05e800000202040000000202040005ff05ff05e8000002020400000002020400000502ff
-02ff02dc00060202040000000208040002ff02ff02dc00000208040000000208040002ff
-02ff02dc00000208040000000208040001ff01ff01dc0000020804000000040901ff01ff
-01dc00000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 42 377 247
-%%EOF
diff --git a/lib/tv/doc/src/tv_start_mnesia.gif b/lib/tv/doc/src/tv_start_mnesia.gif
deleted file mode 100644
index 0ad04331cd..0000000000
--- a/lib/tv/doc/src/tv_start_mnesia.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start_mnesia.ps b/lib/tv/doc/src/tv_start_mnesia.ps
deleted file mode 100644
index a90185089d..0000000000
--- a/lib/tv/doc/src/tv_start_mnesia.ps
+++ /dev/null
@@ -1,835 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_start_mnesia.eps)
-%%CreationDate: (Mon Mar 19 17:15:23 2001)
-%%BoundingBox: 0 0 377 205
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 377 205
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-377.000000 205.000000
-12
-755 410
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-828282
-a3a3a3
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff01ff01dc000b0208040001ff01ff01dc00000208040000000208040002ff02ff
-02dc000002080400000002080400020000ff00ff00d90400020000000208040000000202
-04060200000004ff04ff04d9020000000405020204000000020204000209000d02ff02ff
-02d000000202040000000202040002080000020d040002ea01030211010302330101021b
-010102060101024001010230010102f700000202040000000202040002080000020d0400
-02ea010102020107020001010203010102010101020e010202020102021b0101020e0100
-020b01010206010102400101020c0104021e010102f70000020204000000020204000208
-0000020d040002ea010102050101020301010203010102010101020e010202020102022b
-0101020b010102060101024e010102020101021d010102f7000002020400000002020400
-02080000020204060203040002ea010102050101020301010203010102010101020e0102
-020201020202010102000101020301030203010402020101020201030205010402010103
-020301010200010102030101020201030203010402060103020301010200010102070101
-020001010201010102030103020301010202010102000101020201010201010302020101
-020001010201010102030103020201010200010102010101020201030202010102020101
-02e6000002020400000004030208000002020400030400000203040002ea010102050101
-020401010202010002020101020e01000200010102000100020001010202010202000101
-020101010201010102010101020601010201010102010101020501010202010102010101
-020201020200010102020101020101010201010102010101020901010201010102020102
-020001010206010202000102020001010201010102010101020201010202010202000101
-020101010200010102000101020201020200010202000101020101010201010102010101
-02000101020101010201010102010101020101010202010102e6000004030101020b0000
-02030400030200000204040002ea010102050101020401010201010102020101020e0100
-020001010200010002000101020201010201010102010101020101010201010202050101
-020501010205010102060101020201010201010102020101020101010201010102010102
-020801010201010102020101020101010206010102010101020101010205010102020101
-020201010201010102010101020001010200010102020101020101010201010102050101
-02010102020301010201010102010101020101010202010002ea0103020b000002030400
-030200000204040002ea010102050101020501010200010002030101020e010002000101
-020001000200010102020101020101010201010502020103020301010202010402050101
-020301040202010102010101020201010201010502020103020601010201010102020101
-020101010206010102010101020101010202010402020101020201010201010102010101
-020001010200010102020101020101010201010102020104020101010204010102010105
-020201010200010102ea0103020b000002040400030000000205040002ea010102050101
-0205010302030101020e0100020101010201010102020101020101010201010102080102
-020201010201010102010101020501010202010102010101020201010201010102020101
-020101010208010202050101020101010202010102010101020601010201010102010101
-020101010201010102020101020201010201010102010101020101010200010102010101
-020101010201010102010101020101010201010102040101020101010206010102000100
-02eb0103020b000002040400030000000205040002ea0101020501010206010102040101
-020e01000201010102010101020201010201010102010101020201000205010102020101
-020101010201010102050101020201010201010102020101020101010202010102010101
-020201000205010102050101020101010202010102010101020601010201010102010101
-020101010201010102020101020201010201010102020101020701010201010102010101
-0201010102010101020101010204010102010101020201000203010202eb0103020b0000
-020500000206040002ea0101020501010206010102040101020e01000205010102020101
-020101010202010302020104020301010202010202000101020501020201010202000101
-020101040203010102020103020201040207010302030101020101010206010102010101
-020101010202010202000101020101010202010102010101020301050202010102010101
-0201010102020102020001010200010102040101020201030204010102ec0103020b0000
-020d040002ea01030211010302dd010102ed0103020b0000020d040002ff02e2010102ed
-0103020b0000020d040002ff02ff02d20103020c040d02ff02ff02d3010302ff02ff02ee
-010302ff02ff02ee0103020200ff00ff00e70400020201030202000004ff04ff04e70202
-010302ff02ff02ee0103020200ff00ff00e802020103020200ff00ff00e7070002020103
-0202000105ff05ff05e40701020201030202000105ff05ff05e407010202010302020001
-05ff05ff05e40701020201030202000105ff05ff05e40701020201030202000105ff05ff
-05e407010202010302020001050b06040504060005030602051f06000502060005040600
-05270602050b06000506060005ff05ff0535060005020600050906020513070102020103
-02020001050b0600050f0600051f060005020600052c060005020600050a060005ff05ff
-053d060005020600050b0600051307010202010302020001050b06000506060205050600
-050306020518060005020600050206020503060205020600050206000517060005020600
-050106000500060105020604050206020503060205020600050006010503060205ff05ff
-052006000502060005020602050506000502060005000601050c07010202010302020001
-050b06000508060005050600050206000502060005180600050006000505060005020600
-050206000501060005020600051706000502060005010601050106000503060005060600
-05020600050206000501060105010600050106000502060005ff05ff051f060005020600
-0501060005020600050406000502060105010600050b07010202010302020001050b0603
-050506000505060005020600050206000518060005000600050506000502060005020600
-050106000500060005000600051706000502060005010600050206000503060005060600
-050206000502060005010600050206000501060005ff05ff052306040501060005020600
-050406000502060005020600050b07010202010302020001050b06000508060005050600
-050206040518060005000600050506000502060405010600050006000500060005170600
-050206000501060005020600050306000506060005020600050206000501060005020600
-0502060205ff05ff052006000502060005010604050406000502060005020600050b0701
-0202010302020001050b0600050806000505060005020600051d06000506060005020600
-050506000500060005000600051706000502060005010600050206000503060005060600
-050206000502060005010600050206000505060005ff05ff051f06000502060005010600
-050806000502060005020600050b07010202010302020001050b06000508060005050600
-050206000502060005190600050606000502060005020600050106000500060005000600
-051706000502060005010601050106000503060005060600050206000502060005010600
-05020600050106000502060005ff05ff051f060005020600050106000502060005040600
-0502060105010600050b07010202010302020001050b0600050806000505060005030602
-051a06000506060005030602050306000500060005190602050206000500060105050601
-050406000503060205020600050206000502060205ff05ff052006000502060005020602
-050506000502060005000601050c070102020103020200010576060005ff05ff055b0600
-050f07010202010302020001050a0606052a0606052a06060500060005ff05ff05450606
-050e0600050f07010202010302020001050a0606052a0606052a06060500060005ff05ff
-05450606050e0600050f0701020201030202000105ff05ff05e407010202010302020001
-05ff05ff05e40701020201030202000105ff05ff05e40701020201030202000107ff07ff
-07e6020201030202000007ff07ff07e702020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e8020201030202051c
-01020504010305c1080205040803051a0802057f01010505010205f00102050401030519
-0101052f020201030202050e01060508010005060101050f010205010102059b08060508
-0800050608010510080505040801054d010205240104050d0101051e0102052401020501
-0102059301060508010005060101051101030535020201030202050e0100050101010500
-010005070101050601000511010105010100059d08000501080105000800050708010506
-08000513080105060800054d0101050001010524010105000101050c0100051e01010500
-010105240101050101000595010005010101050001000507010105060100051101010501
-010105340202010302020510010105030103050201030503010105030103050801020500
-01010501010305000101050001000500010005020103058b080105030803050208030503
-080105030803050a080105030804054c0101050101050500010305000102050201030501
-01010500010205070101050101010500010305030104051d010105010105050001030500
-010205020103050101010500010205070102050001010501010305000101050001000500
-010005020103058301010503010305020103050301010503010305090101050101000500
-010305020105050101030521020201030202051001010506010105000101050101010502
-010105020101050101010507010005000100050001000505010105000105050001010501
-0101058a0801050608010500080105010801050208010502080105010801050908010502
-080105010801054c01000502010105000101050201000500010205000101050001010501
-010105010102050001000507010105010101050201010502010105010101051d01000502
-010105000101050201000500010205000101050001010501010105010102050001000507
-010005000100050001000505010105000105050001010501010105820101050601010500
-010105010101050201010502010105010101050801020504010105020101050001010501
-010105010101052002020103020205100100050401040500010105010101050201010501
-0106050701000500010205020104050001010500010005000107058a0800050408040500
-0801050108010502080105010806050908010501080105020801054b0101050201000501
-01010500010005000100050001010501010805010101050a010305040101050101010502
-0101051c010105020100050101010500010005000100050001010501010805010101050a
-010005000102050201040500010105000100050001070582010005040104050001010501
-01010502010105010106050901020503010105040101050101060520020201030202050f
-0101050201010501010105000101050201010501010105020101050b0101050001010501
-01010501010105010100050001000500010005000101058e080105020801050108010500
-0801050208010501080105020801050d08010502080105010801054c0101050101010501
-01020500010005010100050201000500010105050101050a010105060101050201010501
-0101051d010105010101050101020500010005010100050201000500010105050101050a
-010105000101050101010501010105010100050001000500010005000101058601010502
-01010501010105000101050201010501010105020101050b010105010101050201010503
-0101050301010525020201030202050f0101050201010501010105000101050101010502
-010105020101050101010507010005010101050101010501010105000101050001000500
-01000500010105010101058a080105020801050108010500080105010801050208010502
-080105010801050908010502080105010801054c01010500010105020103050101010501
-0101050001010501010105010101050a0101050601010502010105010101051d01010500
-0101050201030501010105010101050001010501010105010101050a0100050101010501
-010105010101050001010500010005000100050001010501010105820101050201010501
-010105000101050101010502010105020101050101010507010105010101050201010502
-01020500010105000101050101010521020201030202050e01030502010a050101050501
-0103050701020500010105020107050001000500010105000103058a08030502080a0501
-0805050108030508080505010805054c0102050301010500010005000103050001020500
-010305010104050701030503010505010105051d01020503010105000100050001030500
-010205000103050101040507010205000101050201070500010005000101050001030582
-01030502010a050101050501010305090103050101050500010505010103052202020103
-020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103
-020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103
-020205ff05ff05e8020201030202050201ff01ff01e205020202010302020503010000cb
-0101008101010059010100c30101005801000711000005020202010302020503010000cb
-0101008101010059010100c3010100580100070103060700030600010502020201030202
-0503010000cb010100810101000c0100002a0100001f010100c301010058010007010305
-0000070003060001050202020103020205030100000a010000130100000c0100000a0100
-000601020086010100810101000b0100000401010009010400010104000a010100020100
-001e0101002701000028010000040100006a0101000a0101004b01000701030500000701
-03050001050202020103020205030100000a010000130100000c0100000a010000080100
-0086010100810101000a01000004010000010100000801000002010000010100000d0100
-0001010000020100001d010100570100006a01010009010000010100004a010007010304
-000107010305000105020202010302020503010000080104000201020003010200020104
-000801040002010200020100000001010005010000030102007f01010081010100090100
-0005010000010100000c010000010100000d01000001010000030100001c010100080101
-000001000002010000000101000301020003010200030102000301020009010100000100
-0003010200020100000001010003010200020104000201020002010000000101005b0101
-0009010000010100004a0100070103040001050007010304000105020202010302020503
-0100000a01000003010000020100000101000002010000030100000c0100000301000002
-01000001010100010100000401000002010000020100007e010100810101000801000006
-010000010100000b010000020103000a01000001010000040100001b0101000801000000
-010000000100000101010001010000010100000201000001010000020100000401000002
-010000020100000801000000010000000100000101000002010000010101000101000004
-01000004010000030100000201000001010100010100005a01010009010000010100004a
-01000701030300010501070103040001050202020103020205030100000a010000030100
-000201000001010000070100000c01000007010000010100000201000004010000020100
-00020100007e010100810101000701000007010000010100000b01000006010000090100
-0001010000050100001a0101000801000000010000000100000101000002010000010100
-000201000001010000080100000601000008010000000100000001000001010000020100
-00010100000201000004010000040100000301000002010000010100005e010100090100
-00010100004a01000701030300010502070103030001050202020103020205030100000a
-0100000301040002010200040100000c0100000401030001010000020100000401000002
-0104007e010100810101000801000006010000010100000b010000060100000901000001
-010000040100001b01010008010000000100000001000001010000020100000101040002
-010200050100000301030008010000000100000001000001010000020100000101000002
-01000004010000040100000301000002010000010100005e01010009010000010100004a
-01000701030200010503070103030001050202020103020205030100000a010000030100
-0009010000030100000c0100000301000002010000010100000201000004010000020100
-0082010100810101000901000005010000010100000a0100000301000002010000090100
-0001010000030100001c0101000801000000010000000100000101000002010000010100
-000901000004010000020100000201000008010000000100000001000001010000020100
-00010100000201000004010000040100000301000002010000010100005e010100090100
-00010100004a01000701030200010504070103020001050202020103020205030100000a
-01000003010000020100000101000002010000030100000c010000030100000201000001
-010100010100000401000002010000020100007e010100810101000a0100000401000001
-01000003010100040100000301000002010000030101000301000001010000020100001d
-010100080100000001000000010000010100000201000001010000020100000101000002
-010000040100000201000002010000080100000001000000010000010100000201000001
-0100000201000004010000040100000301000002010000010100005e0101000901000001
-0100004a01000701030100010505070103020001050202020103020205030100000b0101
-000201020003010200050101000b01010002010300010100000001010005010000030102
-007f010100810101000b0100000401010004010100040100000401020004010100040101
-00020100001e010100080100000001000000010000010100000201000002010200030102
-000501000003010300080100000001000000010000020102000201000002010000040100
-000501010002010200020100005e0101000a0101004b0100070103010001050607010301
-00010502020201030202050301000023010500a1010100810101000c0100002a0100001f
-010100310105008b01010058010007010300000105070701030100010502020201030202
-0503010000cb0101008101010059010100c3010100580100070103000001050807010300
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001070b0300000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010000070d000105020202010302020503010000cb01010081010100590101
-00c30101005801000701030e000105020202010302020503010000cb0101008101010059
-010100c30101005801000701001005020202010302020503010000cb0101008101010059
-010100c30101005801000701000d070000010502020201030202050301ff01ff01ce0701
-0001050a070100010502020201030202050301ff01ff01ce07010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-070100010502020201030202050301ff01ff01ce07010001050a07010001050202020103
-0202050301ff01ff01ce07010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-01ff01ff01ce07010001050a070100010502020201030202050301ff01ff01ce07010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a070100010502020201030202050301ff01ff01ce07010001050a0701
-00010502020201030202050301ff01ff01ce07010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-020201030202050301ff01ff01ce07010001050a070100010502020201030202050301ff
-01ff01ce07010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a070100010502020201030202050301ff01ff01ce
-07010001050a070100010502020201030202050301ff01ff01ce07010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a070100010502020201030202050301ff01ff01ce07010001050a0701000105020202
-01030202050301ff01ff01ce07010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-050301ff01ff01ce07010001050a070100010502020201030202050301ff01ff01ce0701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a070100010502020201030202050301ff01ff01ce07010001050a
-070100010502020201030202050301ff01ff01ce07010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-0502020201030202050301ff01ff01ce07010001050a0701000105020202010302020503
-01ff01ff01ce07010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a070100010502020201030202050301ff01ff
-01ce07010001050a070100010502020201030202050301ff01ff01ce07010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001070c0001
-05020202010302020503010000cb0101008101010059010100c301010058010007010000
-070d00010502020201030202050301ff01ff01ce0701030e000105020202010302020503
-01ff01ff01ce0701030e000105020202010302020503010000cb01010081010100590101
-00c30101005801000701030e000105020202010302020503010000cb0101008101010059
-010100c30101005801000701030e000105020202010302020503010000cb010100810101
-0059010100c30101005801000701030e000105020202010302020503010000cb01010081
-01010059010100c30101005801000701030e000105020202010302020503010000cb0101
-008101010059010100c30101005801000701030e000105020202010302020503010000cb
-0101008101010059010100c30101005801000701030e0001050202020103020205030100
-00cb0101008101010059010100c30101005801000701030e000105020202010302020503
-010000cb0101008101010059010100c30101005801000701030e00010502020201030202
-0503010000cb0101008101010059010100c30101005801000701030e0001050202020103
-02020503010000cb0101008101010059010100c30101005801000701030e000105020202
-010302020503010000cb0101008101010059010100c30101005801000701030e00010502
-0202010302020503010000cb0101008101010059010100c30101005801000701030e0001
-05020202010302020503010000cb0101008101010059010100c30101005801000701030e
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-030e000105020202010302020503010000cb0101008101010059010100c3010100580100
-0701030e000105020202010302020503010000cb0101008101010059010100c301010058
-01000701030e000105020202010302020503010000cb0101008101010059010100c30101
-005801000701030e000105020202010302020503010000cb0101008101010059010100c3
-0101005801000701030e000105020202010302020503010000cb01010081010100590101
-00c30101005801000701030e00010502020201030202050301ff01ff01ce0701030e0001
-0502020201030202050301ff01ff01ce0701001005020202010302020503010000cb0101
-008101010059010100c301010058010007010300000c0700000105020202010302020503
-010000cb0101008101010059010100c30101005801000701030000010508070103000001
-05020202010302020503010000cb0101008101010059010100c301010058010007010301
-0001050707010300000105020202010302020503010000cb0101008101010059010100c3
-010100580100070103010001050607010301000105020202010302020503010000cb0101
-008101010059010100c30101005801000701030200010505070103010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010302000105040701
-0302000105020202010302020503010000cb0101008101010059010100c3010100580100
-070103030001050307010302000105020202010302020503010000cb0101008101010059
-010100c30101005801000701030300010502070103030001050202020103020205030100
-00cb0101008101010059010100c301010058010007010304000105010701030300010502
-0202010302020503010000cb0101008101010059010100c3010100580100070103040001
-050007010304000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010305000007020304000105020202010302020503010000cb010100810101
-0059010100c3010100580100070103050000070103050001050202020103020205030100
-00cb0101008101010059010100c301010058010007010306070103050001050202020103
-02020503010000cb0101008101010059010100c301010058010007010306070003060001
-05020202010302020503010000cb0101008101010059010100c301010058010007010010
-05020202010302020503010000cb0101008101010059010100c301010058010007000011
-0502020201030202050207ff07ff07d30511020201030202050207ff07ff07d200000511
-02020103020205020701030d0000030000ff00ff00af03000001030c0001051102020103
-020205020701030b00010700030000ff00ff00ae070003000003030a0001051102020103
-0202050207010309000207010300000105ff05ff05ab0701030000050308000105110202
-010302020502070103070003050007010300000105ff05ff05ab07010300000105010003
-0306000105110202010302020502070103050003050207010300000105ff05ff05ab0701
-030000010503000303040001051102020103020205020701030300030504070103000001
-05ff05ff05ab070103000001050500030302000105110202010302020502070103010003
-050607010300000105ff05ff05ab07010300000105070003030000010511020201030202
-05020705050807010300000105ff05ff05ab070103000001050807030001051102020103
-02020502070103010703050607010300000105ff05ff05ab070103000001050707030300
-000105110202010302020502070103030703050407010300000105ff05ff05ab07010300
-0001050507030302000105110202010302020502070103050703050207010300000105ff
-05ff05ab0701030000010503070303040001051102020103020205020701030707030500
-07010300000105ff05ff05ab070103000001050107030306000105110202010302020502
-0701030907040300000105ff05ff05ab0701030000010703030800010511020201030202
-05020701030b07020300000107ff07ff07ad030000010701030a00010511020201010004
-05020701030d07000300000007ff07ff07ae030000000700030c00010511000502020400
-0502070100ff00ff00d105110000020204000000020204000502070000ff00ff00d20511
-00000202040000000202040005ff05ff05e800000202040000000202040005ff05ff05e8
-00000202040000000202040005ff05ff05e8000002020400000002020400000502ff02ff
-02dc00060202040000000208040002ff02ff02dc00000208040000000208040002ff02ff
-02dc00000208040000000208040001ff01ff01dc0000020804000000040901ff01ff01dc
-00000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 377 205
-%%EOF
diff --git a/lib/tv/doc/src/tv_start_other_node.gif b/lib/tv/doc/src/tv_start_other_node.gif
deleted file mode 100644
index 897686e5ef..0000000000
--- a/lib/tv/doc/src/tv_start_other_node.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start_other_node.ps b/lib/tv/doc/src/tv_start_other_node.ps
deleted file mode 100644
index 34477bed6c..0000000000
--- a/lib/tv/doc/src/tv_start_other_node.ps
+++ /dev/null
@@ -1,2316 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (./tv_start_other_node.tmp.eps)
-%%CreationDate: (Tue Jun 12 16:05:42 2001)
-%%BoundingBox: 0 21 400 186
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 21 400 186
-userdict begin
-%%BeginData:
-DisplayImage
-0 21
-400.000000 165.000000
-12
-1001 414
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-4ac1df
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-aab6aa
-e7e7e7
-000000
-000000
-000000
-000000
-000000
-000000
-03ff03ff03ff03ff03ff03ff03ff03ff03c5000a01ff01ff01dc000a03f5000002080500
-01ff01ff01dc00000208050003f500000208050002ff02ff02dc00000208050003f50000
-0208050002ff02ff02dc00000208050003f500000202050602ff02ff02dc000005050202
-050003f50000020205000209000d02ff02ff02d000000202050003f50000020205000208
-0000020d050002e101030211010302380101020601010238010102310101022f010102ee
-00000202050003f500000202050002080000020d050002e1010102020107020001010203
-010102010101020e0105020001070201010302070100020b010102060101023301000203
-010102310101020b0104021e010102ee00000202050003f500000202050002080000020d
-050002e1010102050101020301010203010102010101020e010102070101020301010201
-010102050101020b010102060101023201010203010102310101020a010102020101021d
-010102ee00000202050003f500000202050002080000020205060203050002e101010205
-0101020301010203010102010101020e0101020701010203010102080104020101030203
-010102000101020301010202010302030104020601030203010102000101020701030201
-01040201010102000101020301030202010102000101020a010102000101020301030203
-010402020103020201010201010302020101020001010201010102030103020201010200
-01010201010102020103020201010202010102dd00000202050003f50000050302080000
-02020500040400000203050002e1010102050101020401010202010002020101020e0101
-020701010203010202080101020201010201010102020102020001010202010102010101
-020101010201010102090101020101010202010202000101020501010201010102010101
-020301020200010102010101020101010201010102000101020a01020200010102010101
-020101010201010102010101020101010201010102010101020001010200010102020102
-020001020200010102010101020101010201010102000101020101010201010102010101
-020101010202010102dd0000050303f50101020b000002030500040200000204050002e1
-010102050101020401010201010102020101020e01040204010102040103020601010206
-010102020101020101010202010102010101020101010201010202080101020101010202
-010102010101020501010201010102010101020301010201010102010101020101010201
-0102020c0101020101010201010102010101020101010201010102010101020101010201
-010102000101020001010202010102010101020101010205010102010102020301010201
-010102010101020101010202010002e1010103f50101020b000002030500040200000204
-050002e1010102050101020501010200010002030101020e010102070101020601020205
-010102030104020201010201010102020101020101050202010302060101020101010202
-01010201010102050101020101010201010102030101020101010201010502010101020d
-010102010101020101010201010102010101020101010201010502010101020001010200
-010102020101020101010201010102020104020101010204010102010105020201010200
-010102e1010103f50101020b000002040500040000000205050002e10101020501010205
-010302030101020e01010207010102070101020501010202010102010101020201010201
-010102020101020101010208010202050101020101010202010102010101020501010201
-01010201010102030101020101010201010102050101020d010102010101020101010201
-010102010101020101010201010102050101020101010200010102010101020101010201
-01010201010102010101020101010204010102010101020601010200010002e2010103f5
-0101020b000002040500040000000205050002e10101020501010206010102040101020e
-010102070101020301010201010102050101020201010201010102020101020101010202
-010102010101020201000205010102050101020101010202010102010101020501010201
-0101020101010203010102010101020101010202010002010101020d0101020101010201
-010102010101020101010200010202010101020201000202010102070101020101010201
-01010201010102010101020101010204010102010101020201000203010202e2010103f5
-0101020b0000020500000206050002e10101020501010206010102040101020e01050203
-010102040103020701020201010202000101020101040203010102020103020201040207
-01030203010102010101020601030203010202010101020101010202010302020101020d
-010102010101020201030203010102000101020201030204010502020101020101010201
-010102020102020001010200010102040101020201030204010102e3010103f50101020b
-0000020d050002e1010302110103029201060255010102e4010103f50101020b0000020d
-050002ff02eb010102e4010103f50101020b0000020d050002ff02ff02d2010103f50101
-020c050d02ff02ff02d3010103f5010102ff02ff02ee010103f5010102ff02ff02ee0101
-03f5010102ff02ff02ee010103f5010102ff02ff02ee010103f5010102ff02ff02ee0101
-03f501010202060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-00000600000006000000060000000600000006000202010103f501010202000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060001000202010103f5010102020600000006ff06ff06e40100060002020101
-03f501010202000006ff06ff06e601000202010103f5010102020600000006ff06ff06e4
-010006000202010103f501010202000006ff06ff06e601000202010103f5010102020600
-000006ff06ff06e4010006000202010103f5010102020000060c07040604070006030702
-061f0700060207000604070006270702060b07000606070006ff06ff0635070006020700
-06090702061401000202010103f50101020206000000060b0700060f0700061f07000602
-0700062c070006020700060a070006ff06ff063d070006020700060b0700061301000600
-0202010103f5010102020000060c07000606070206050700060307020618070006020700
-060207020603070206020700060207000617070006020700060107000600070106020704
-060207020603070206020700060007010603070206ff06ff062007000602070006020702
-060507000602070006000701060d01000202010103f50101020206000000060b07000608
-070006050700060207000602070006180700060007000605070006020700060207000601
-070006020700061707000602070006010701060107000603070006060700060207000602
-07000601070106010700060107000602070006ff06ff061f070006020700060107000602
-0700060407000602070106010700060b010006000202010103f5010102020000060c0703
-060507000605070006020700060207000618070006000700060507000602070006020700
-060107000600070006000700061707000602070006010700060207000603070006060700
-060207000602070006010700060207000601070006ff06ff062307040601070006020700
-060407000602070006020700060c01000202010103f50101020206000000060b07000608
-070006050700060207040618070006000700060507000602070406010700060007000600
-070006170700060207000601070006020700060307000606070006020700060207000601
-0700060207000602070206ff06ff06200700060207000601070406040700060207000602
-0700060b010006000202010103f5010102020000060c0700060807000605070006020700
-061d07000606070006020700060507000600070006000700061707000602070006010700
-060207000603070006060700060207000602070006010700060207000605070006ff06ff
-061f07000602070006010700060807000602070006020700060c01000202010103f50101
-020206000000060b07000608070006050700060207000602070006190700060607000602
-070006020700060107000600070006000700061707000602070006010701060107000603
-07000606070006020700060207000601070006020700060107000602070006ff06ff061f
-0700060207000601070006020700060407000602070106010700060b0100060002020101
-03f5010102020000060c0700060807000605070006030702061a07000606070006030702
-060307000600070006190702060207000600070106050701060407000603070206020700
-060207000602070206ff06ff062007000602070006020702060507000602070006000701
-060d01000202010103f501010202060000000676070006ff06ff065b0700060f01000600
-0202010103f5010102020000060b0706062a0706062a07060600070006ff06ff06450706
-060e0700061001000202010103f50101020206000000060a0706062a0706062a07060600
-070006ff06ff06450706060e0700060f010006000202010103f501010202000006ff06ff
-06e601000202010103f5010102020600000006ff06ff06e4010006000202010103f50101
-0202000006ff06ff06e601000202010103f5010102020600000006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0202010103f5010102020000060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-0600010006000100060001000600010006000100060001000202010103f50101020206ff
-06ff06e80202010103f50101020206ff06ff06e80202010103f50101020206ff06ff06e8
-0202010103f50101020206ff06ff06e80202010103f50101020206ff06ff06e802020101
-0303000a01d9000a03010101020206ff06ff06e802020101030300000208050001d90000
-0208050003010101020206ff06ff06e802020101030300000208050002d9000002080500
-03010101020206ff06ff06e802020101030300000208050002d900000208050003010101
-020206ff06ff06e802020101030300000202050602d90000050502020500030101010202
-06ff06ff06e80202010103030000020205000209000d02cd000002020500030101010202
-06ff06ff06e802020101030300000202050002080000020d0500021a0103021101030250
-0101021a0101022700000202050003010101020206ff06ff06e802020101030300000202
-050002080000020d0500021a01010202010702000101020301010201010102100103022b
-0100020e0101021a0101022700000202050003010101020206ff06ff06e8020201010303
-00000202050002080000020d0500021a010102050101020301010203010102010101020f
-01010201010102290101020e0101021a0101022700000202050003010101020206ff06ff
-06e8020201010303000002020500020800000202050602030500021a0101020501010203
-01010203010102010101020e010102060103020301010200010102030101020001010203
-010302030103020001040201010302030104020601010200010102030103020301040202
-010302030104021700000202050003010101020206ff06ff06e802020101030300000503
-02080000020205000404000002030500021a010102050101020401010202010002020101
-020e01010205010102010101020201020200010102020102020001010201010102010101
-020101010201010102000101020201010201010102010101020101010206010202000101
-02010101020101010201010102010101020101010201010102010101021b000005030301
-0101020206ff06ff06e80202010103030101020b0000020305000402000002040500021a
-010102050101020401010201010102020101020e01010205010102010101020201010201
-010102020101020101010201010102010101020101010204010102020101020101010201
-010102010101020601010201010102010101020101010201010102010101020101010201
-010102010102021d010103010101020206ff06ff06e80202010103030101020b00000203
-05000402000002040500021a010102050101020501010200010002030101020e01010205
-010102010101020201010201010102020101020101010201010502010101020401010202
-010502010101020101010206010102010101020101010201010102010101020101010201
-010502020103021b010103010101020206ff06ff06e80202010103030101020b00000204
-05000400000002050500021a0101020501010205010302030101020e0101020501010201
-010102020101020101010202010102010101020101010205010102040101020201010205
-010102010101020601010201010102010101020101010201010102010101020101010208
-0102021a010103010101020206ff06ff06e80202010103030101020b0000020405000400
-000002050500021a0101020501010206010102040101020f010102020100020001010201
-010102020101020101010202010102010101020101010202010002010101020201000200
-010102020101020201000201010102000102020601010201010102010101020101010201
-010102000102020101010202010002050101021a010103010101020206ff06ff06e80202
-010103030101020b00000205000002060500021a01010205010102060101020401010210
-010302020103020301010201010102020101020101010202010302030103020201020201
-010302030101020001010206010102010101020201030203010102000101020201030202
-0104021b010103010101020206ff06ff06e80202010103030101020b0000020d0500021a
-010302110103029a010103010101020206ff06ff06e80202010103030101020b0000020d
-050002cf010103010101020206ff06ff06e80202010103030101020b0000020d050002cf
-010103010101020206ff06ff06e80202010103030101020c050d02d00101030101010202
-06ff06ff06e8020201010303010102eb010103010101020206ff06ff06e8020201010303
-010102eb010103010101020206ff06ff06e8020201010303010102eb0101030101010202
-06ff06ff06e8020201010303010102eb0101030101010202061c01020604010306c10102
-06040103061a0102067f01010605010206f001020604010306190101062f020201010303
-010102eb0101030101010202060e01060608010006060101060f010206010102069b0106
-06080100060601010610010506040101064d010206240104060d0101061e010206240102
-060101020693010606080100060601010611010306350202010103030101020206000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000600000006000000060000000600000002020101030101010202060e
-0100060101010600010006070101060601000611010106010100069d0100060101010600
-010006070101060601000613010106060100064d0101060001010624010106000101060c
-0100061e0101060001010624010106010100069501000601010106000100060701010606
-010006110101060101010634020201010303010102020000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060002020101030101010202061001010603010306020103
-060301010603010306080102060001010601010306000101060001000600010006020103
-068b010106030103060201030603010106030103060a010106030104064c010106010105
-060001030600010206020103060101010600010206070101060101010600010306030104
-061d01010601010506000103060001020602010306010101060001020607010206000101
-060101030600010106000100060001000602010306830101060301030602010306030101
-060301030609010106010100060001030602010506010103062102020101030301010202
-0600000006e2010002020101030101010202061001010606010106000101060101010602
-010106020101060101010607010006000100060001000605010106000105060001010601
-0101068a0101060601010600010106010101060201010602010106010101060901010602
-010106010101064c01000602010106000101060201000600010206000101060001010601
-010106010102060001000607010106010101060201010602010106010101061d01000602
-010106000101060201000600010206000101060001010601010106010102060001000607
-010006000100060001000605010106000105060001010601010106820101060601010600
-010106010101060201010602010106010101060801020604010106020101060001010601
-010106010101062002020101030301010202000006e20100060002020101030101010202
-061001000604010406000101060101010602010106010106060701000600010206020104
-060001010600010006000107068a01000604010406000101060101010602010106010106
-060901010601010106020101064b01010602010006010101060001000600010006000101
-0601010806010101060a0103060401010601010106020101061c01010602010006010101
-0600010006000100060001010601010806010101060a0100060001020602010406000101
-060001000600010706820100060401040600010106010101060201010601010606090102
-0603010106040101060101060620020201010303010102020600000006e2010002020101
-030101010202060f0101060201010601010106000101060201010601010106020101060b
-010106000101060101010601010106010100060001000600010006000101068e01010602
-01010601010106000101060201010601010106020101060d01010602010106010101064c
-010106010101060101020600010006010100060201000600010106050101060a01010606
-01010602010106010101061d010106010101060101020600010006010100060201000600
-010106050101060a01010600010106010101060101010601010006000100060001000600
-010106860101060201010601010106000101060201010601010106020101060b01010601
-0101060201010603010106030101062502020101030301010202000006e2010006000202
-0101030101010202060f0101060201010601010106000101060101010602010106020101
-060101010607010006010101060101010601010106000101060001000600010006000101
-06010101068a010106020101060101010600010106010101060201010602010106010101
-060901010602010106010101064c01010600010106020103060101010601010106000101
-0601010106010101060a0101060601010602010106010101061d01010600010106020103
-0601010106010101060001010601010106010101060a0100060101010601010106010101
-060001010600010006000100060001010601010106820101060201010601010106000101
-060101010602010106020101060101010607010106010101060201010602010206000101
-06000101060101010621020201010303010102020600000006e201000202010103010101
-0202060e01030602010a0601010506010103060701020600010106020107060001000600
-010106000103068a01030602010a06010105060101030608010506010105064c01020603
-01010600010006000103060001020600010306010104060701030603010506010105061d
-010206030101060001000600010306000102060001030601010406070102060001010602
-0107060001000600010106000103068201030602010a0601010506010103060901030601
-010506000105060101030622020201010303010102020000060c07040604070006030702
-06c3010006000202010103010101020206ff06ff06e80202010103030101020206000000
-060b0700060f070006c401000202010103010101020206ff06ff06e80202010103030101
-02020000060c070006060702060507000603070206bc0100060002020101030101010202
-06ff06ff06e80202010103030101020206000000060b0700060807000605070006020700
-0602070006bc01000202010103010101020206ff06ff06e8020201010303010102020000
-060c07030605070006050700060207000602070006bb0100060002020101030101010202
-06ff06ff06e80202010103030101020206000000060b0700060807000605070006020704
-06bc01000202010103010101020206ff06ff06e8020201010303010102020000060c0700
-06080700060507000602070006bf010006000202010103010101020206ff06ff06e80202
-010103030101020206000000060b07000608070006050700060207000602070006bc0100
-02020101030101010202060201ff01ff01e20602020201010303010102020000060c0700
-06080700060507000603070206bc01000600020201010301010102020603010000cb0101
-008101010059010100c30101005801010600010006000100060001000600010006000100
-060001000600010006000100060000000602020201010303010102020600000006e20100
-020201010301010102020603010000cb0101008101010059010100c30101005801000600
-010004060100040600000603020201010303010102020000060b070606cf010006000202
-01010301010102020603010000cb010100810101000c0100002a0100001f010100c30101
-00580101060004050000060004060600000006020202010103030101020206000000060a
-070606d001000202010103010101020206030100001f0100000a0100009e010100810101
-000b0100000301020003010200090104000a010100020100001e0101001e010200050100
-0012010000060100002e010000120102000301020031010100080104004a010006000100
-040506000100060004050000060302020101030301010202000006e20100060002020101
-03010101020206030100001f0100000a0100009e010100810101000a0100000301000002
-0100000101000002010000080100000d01000001010000020100001d0101002001000019
-0100003601000014010000050100003101010008010000020100004a0101060004040600
-0000060001000405060000000602020201010303010102020600000006e2010002020101
-03010101020206030100000901020003010200090104000201020002010000000101009b
-010100810101000901000008010000010100000c0100000d01000001010000030100001c
-010100090102000201000000010100020100000001010005010000030102000301020003
-01020002010400020102000301020002010000000101000a010200030102000201000000
-010100020104000101000000010100030102000501000005010000030102000201000000
-010100230101000c0100004a010006000100040400000602010004040000060302020101
-030301010202000006e20100060002020101030101010202060301000008010000020100
-0001010000020100000a010000030100000201000001010100010100009a010100810101
-000801000009010000010100000c0103000a01000001010000040100001b010100080100
-000201000001010100010100000101010001010000040100000501000002010000020100
-000101000002010000030100000601000002010000020100000101010001010000080100
-000201000001010000020100000101010001010000030100000301010001010000010100
-0002010000040100000501000002010000020100000101010001010000220101000b0100
-004b01010600040300000602010006000404060000000602020201010303010102020600
-000006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010002020101030101010202
-06030100000c010000010100000e0100000701000001010000020100009a010100810101
-000701000009010000020103000d0100000901000001010000050100001a0101000c0100
-000101000002010000010100000201000004010000050100000201000009010000030100
-000601000002010000020100000101000002010000080100000501000002010000010100
-000201000003010000030100000501000002010000040100000501000002010000020100
-0001010000260101000b0100004b01000600010004030600000006020100060004030000
-060302020101030301010202000006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0100060002020101030101010202060301000009010300010100000e0100000401030001
-010000020100009a01010081010100080100000701000003010000020100000c01000009
-01000001010000040100001b010100090103000101000002010000010100000201000004
-010000050100000201000006010300030100000601000002010000020100000101000002
-010000080100000501000002010000010100000201000003010000030100000501000002
-01000004010000050100000201040001010000260101000b0100004b0101060004020600
-00000604010004030600000006020202010103030101020206e502020101030101010202
-06030100000801000002010000010100000e010000030100000201000001010000020100
-009a01010081010100090100000501000004010000020100000801000002010000090100
-0001010000030100001c0101000801000002010000010100000201000001010000020100
-000401000005010000020100000501000002010000030100000601000002010000020100
-000101000002010000080100000501000002010000010100000201000003010000030100
-00050100000201000004010000050100000201000005010000260101000a0100004c0100
-0600010004020000060601000402000006030202010103030101020206e5020201010301
-010102020603010000080100000201000001010000020100000a01000003010000020100
-0001010100010100009a010100810101000a010000030100000501000002010000030101
-000201000002010000030101000301000001010000020100001d01010008010000020100
-000101010001010000010101000101000004010000050100000201000002010000010100
-000201000003010000060100000201000002010000010100000201000008010000020100
-000101000002010000010100000201000003010000030100000501000002010000040100
-0005010000020100000201000001010000260101000a0100004c01010600040100000606
-0100060004020600000006020202010103030101020206e5020201010301010102020603
-01000009010300020102000c0101000201030001010000000101009b010100810101000b
-010000020104000201020004010100030102000401010004010100020100001e01010009
-010300010100000001010002010000000101000501000005010000030102000301030004
-010100040100000301020002010000020100000901020003010200020100000201000004
-010100010100000601020005010000050100000301020002010000260101000a0100004c
-0100060001000401060000000606010006000401000006030202010103030101020206e5
-02020101030101010202060301000015010500af010100810101000c0100002a0100001f
-0101000f010000050100003c010500680101005801010600040006000000060801000401
-0600000006020202010103030101020206e5020201010301010102020603010000cb0101
-0081010100590101000f01000005010000ab0101005801000600010004000000060a0100
-0400000006030202010103030101020206e5020201010301010102020603010000cb0101
-0081010100590101000f01000005010000ab010100580101060000000600010006000100
-060001000600010006000100060001000600040006000000060202020101030301010202
-06e5020201010301010102020603010000cb0101008101010059010100c3010100580100
-060001000600010006000100060001000600010006000100060001000600010006000000
-06030202010103030101020206e5020201010301010102020603010000cb010100810101
-0059010100c30101005801010600040e0600000006020202010103030101020206e50202
-01010301010102020603010000cb0101008101010059010100c301010058010006000100
-060000000600000006000000060000000600000006000000060000000600000006030202
-010103030101020206e5020201010301010102020603010000cb01010081010100590101
-00c301010058010106000000060000000600000006000000060000000600000006000000
-060001000600000006020202010103030101020206e502020101030101010202060301ff
-01ff01ce0600010006000000060a01000600000006030202010103030101020206e50202
-0101030101010202060308cd01ff01ff010106000000060c010006000000060202020101
-03030101020206e5020201010301010102020603080009cb080001000981010109590101
-09c30101095801000600010006000000060a010006000000060302020101030301010202
-06e5020201010301010102020603080009cb08000100090b010109550101091b01010959
-010109c301010958010106000000060c01000600000006020202010103030101020206e5
-020201010301010102020603080009cb08000100090a0100091c01000931010009080100
-091a0101090c0100093101000918010109c30101095801000600010006000000060a0100
-0600000006030202010103030101020206e50202010103010101020206030800091a0800
-09af08000100090a01000905010009050101090c01000903010209030102090a01020902
-0104090a01010902010009070100091a0101090b01000903010209030102090a01020902
-0104090a01010902010009170101091a010009a70101090901020904010109030102093d
-010106000000060c01000600000006020202010103030101020206cf0100060001000600
-010006000100060001000600010006000100060001000600010006040202010103010101
-020206030800091a080009af08000100090a0100090401010904010009010100090a0100
-090301000902010009010100090201000908010009020100090101000902010009090100
-090101000902010009060100091a0101090a010009030100090201000901010009020100
-0908010009020100090101000902010009090100090101000902010009160101091a0100
-09a70101090801000902010009020100090101000901010009020100093c010006000100
-06000000060a01000600000006030202010103030101020206ce01000600010006000100
-060001000600010006000100060001000600010006000100060000000603020201010301
-0101020206030800090908020903080209030801090008000902080209a908000100090a
-010009030100090001000904010009010100090901000908010009010100091001000905
-010009090100090101000903010009050100091a01010909010009080100090101000910
-010009050100090901000901010009030100091501010909010209030102090301010900
-010009020102090a01020903010209020100090001010902010009020100090201020902
-01000900010109700101090c01000902010009010100090101000940010106000000060c
-010006000000060202020101030301010202060500000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000602010004060100040600000604
-020201010301010102020603080009080800090208000901080009020800090108000901
-0801090108000902080009a808000100090a010009050100090401000901010009080100
-09090100090101000910010009040100090a0100090101000904010009040100091a0101
-0908010009090100090101000910010009040100090a0100090101000904010009140101
-090801000902010009010100090201000901010009010101090101000902010009080100
-090201000901010009020100090101010901010009010100090201000901010009020100
-0901010109010100096f0101090c01000902010009010100090101000940010006000100
-06000000060a010006000000060302020101030301010202060501000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000001000000010000000100
-000001000000010000000100000001000000010000000100000106010100060004050000
-060004060600000006030202010103010101020206030800090808000905080009020800
-0901080009020800090108000902080009a8080001000908010109060100090401000901
-0100090701000909010009020103090c010009050100090a010009010100090501000904
-010109180101090701000909010009020103090c010009050100090a0100090101000905
-010009130101090801000905010009020100090101000902010009010100090201000908
-010009050100090201000901010009050100090201000901010009020100090101000973
-0101090b0100090301000901010009010103093d010106000000060c0100060000000602
-0202010103030101020206050000010000c4060201000405060001000600040500000604
-020201010301010102020603080009080800090508000902080009010800090208000901
-080409a808000100090a0100090501000904010009010100090801000907010009030100
-09020100090a010009060100090a0100090101000904010009040100091a010109080100
-090701000903010009020100090a010009060100090a0100090101000904010009140101
-090801000905010009020100090101000902010009010104090901020902010409010100
-0906010009000100090201040901010009730101090a0100090401000901010009010100
-09020100093c01000600010006000000060a010006000000060302020101030301010202
-0605010000c5060101000600040406000000060001000405060000000603020201010301
-010102020603080009080800090508000902080009010800090208000901080009ac0800
-0100090a0100090501000904010009010100090901000905010009040100090201000909
-010009060100090b0100090101000903010009050100091a010109090100090501000904
-0100090201000909010009060100090b0100090101000903010009150101090801000905
-010009020100090101000902010009010100091001000901010009050100090601000900
-01000902010009050100097301010909010009050100090101000901010009020100093c
-010106000000060c01000600000006020202010103030101020206050000010000260100
-009c06020100040400000602010004040000060402020101030101010202060308000908
-08000902080009010800090208000901080009010801090108000902080009a808000100
-090a01000905010009040100090101000903010109040100090301000905010009020100
-0903010109020100090701000905010109030100090101000902010009060100091a0101
-090a01000903010009050100090201000903010109020100090701000905010109030100
-090101000902010009160101090801000902010009010100090201000901010009010101
-090101000902010009080100090201000901010009020100090101000907010009030100
-0902010009010100097301010908010009060100090101000901010009020100093c0100
-0600010006000000060a01000600000006030202010103030101020206050100001a0100
-000a01000000010000180102007f06010100060004030000060201000600040406000000
-060302020101030101010202060308000909080209030802090308010900080009020802
-09a908000100090a01000903010409030101090401010905010009020104090201020904
-0101090201040903010009050101090401010902010009070100091a0101090b01000902
-010409020102090401010902010409030100090501010904010109020100091701010909
-010209030102090301010900010009020102090a01020903010209020100090701000904
-01020902010009730101090801040903010109030102093d010106000000060c01000600
-0000060202020101030301010202060500000100002401000002010000190100007f0602
-0100040306000000060201000600040300000604020201010301010102020603080009cb
-08000100090a010009140100090601000931010009080100091a0101090c010009310100
-091801010923010509990101095801000600010006000000060a01000600000006030202
-010103030101020206050100000901010000010000030102000301020002010000000101
-000201000000010200010101000001000003010200020100000001010005010000030102
-000201000002010000700601010006000402060000000604010004030600000006030202
-01010301010102020603080009cb08000100090b01010910010109420101091b01010959
-010109c301010958010106000000060c0100060000000602020201010303010102020605
-000001000008010000000100000001000001010000020100000401000002010100010100
-000101000000010000000100000101000000010000000100000101000002010000010101
-000101000004010000020100000201000001010000020100007006020100040200000606
-0100040200000604020201010301010102020603080009cb080001000981010109590101
-09c30101095801000600010006000000060a010006000000060302020101030301010202
-060501000009010000000100000001000005010000040100000201000002010000010100
-000001000000010000010100000001000000010000050100000101000008010000020100
-000201000002010000010100007006010100060004010000060601000600040206000000
-0603020201010301010102020603080009cb08000100098101010959010109c301010958
-010106000000060c01000600000006020202010103030101020206050000010000080100
-000001000000010000020103000401000002010000020100000101000000010200010100
-000001000000010000020103000101000008010000020104000201000001010000700602
-0100040106000000060601000600040100000604020201010301010102020603080009cb
-08000100098101010959010109c30101095801000600010006000000060a010006000000
-060302020101030301010202060501000009010000000100000001000001010000020100
-000401000002010000020100000101000005010000000100000001000001010000020100
-000101000008010000020100000701000000010000700601010006000400060000000608
-01000401060000000603020201010301010102020603080009cb08000100098101010959
-010109c301010958010106000000060c0100060000000602020201010303010102020605
-000001000008010000000100000001000001010000020100000401000002010000020100
-000201000001010000010100000001000000010000010100000201000001010000080100
-00020100000201000003010100710602010004000000060a010004000000060402020101
-0301010102020603080009cb08000100098101010959010109c301010958010006000100
-06000000060a010006000000060302020101030301010202060501000009010000000100
-000001000002010300040100000201000002010000030101000201000000010000000100
-000201030001010000080100000301020005010000710601010006000000060001000600
-010006000100060001000600010006000100060004000600000006030202010103010101
-0202060308cd01ff01ff010106000000060c010006000000060202020101030301010202
-060500000100005101000071060201000600010006000100060001000600010006000100
-060001000600010006000000060402020101030101010202060308cd01ff01ff01000600
-010006000000060a01000600000006030202010103030101020206050100004f01000000
-01000072060101000600040e060000000603020201010301010102020603080009cb0800
-0100098101010959010109c301010958010106000000060c010006000000060202020101
-030301010202060500000100004f01000073060201000600000006000000060000000600
-0000060000000600000006000000060000000604020201010301010102020603080009cb
-08000100090b010109550101091b01010959010109c30101095801000600010006000000
-060a0100060000000603020201010303010102020605010000c506010100060000000600
-000006000000060000000600000006000000060000000600010006000000060302020101
-0301010102020603080009cb08000100090a0100091c01000931010009080100091a0101
-090c0100093101000918010109c301010958010106000000060c01000600000006020202
-010103030101020206050000010000c40602010006000000060a01000600000006040202
-010103010101020206030800091a080009af08000100090a01000905010009050100090d
-01000903010209030102090a010209020104090a01010902010009070100091a0101090b
-01000903010209030102090a010209020104090a01010902010009170101091a010009a7
-01010909010209030102094401000600010006000000060a010006000000060302020101
-030301010202060501000001040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000000400000004000000040000000400000004000000040000000400000004000000
-040000020601010006000000060c01000600000006030202010103010101020206030800
-091a080009af08000100090a01000904010109040101090c010009030100090201000901
-010009020100090801000902010009010100090201000909010009010100090201000906
-0100091a0101090a01000903010009020100090101000902010009080100090201000901
-01000902010009090100090101000902010009160101091a010009a70101090801000902
-010009010100090201000943010106000000060c01000600000006020202010103030101
-020206050000010004c200010602010006000000060a0100060000000604020201010301
-010102020603080009090802090308020903080109000800090208020909080009000801
-0903080209020801090008000903080209030802097f08000100090a0100090301000900
-01000903010009000100090b010009080100090101000910010009050100090901000901
-01000903010009050100091a010109090100090801000901010009100100090501000909
-01000901010009030100091501010909010209030102090301010900010009020102090a
-010209030102090201000900010109020100090201000902010209020100090001010970
-0101090c010009050100094301000600010006000000060a010006000000060302020101
-030301010202060501000001044f0100046f010000010601010006000000060c01000600
-000006030202010103010101020206030800090808000902080009010800090208000901
-080009010801090108000902080009080801090108000901080009020800090108000900
-08000900080009010800090208000901080009020800097e08000100090a010009050100
-09050100090a010009090100090101000910010009040100090a01000901010009040100
-09040100091a01010908010009090100090101000910010009040100090a010009010100
-090401000914010109080100090201000901010009020100090101000901010109010100
-090201000908010009020100090101000902010009010101090101000901010009020100
-09010100090201000901010109010100096f0101090c0100090501000943010106000000
-060c0100060000000602020201010303010102020605000001000411010004030100042c
-0100040901000400010004180102045300010602010006000000060a0100060000000604
-020201010301010102020603080009080800090508000902080009010800090208000901
-080009020800090808000902080009050800090108000900080009000800090108000902
-080009010800098208000100090801010906010009050100090901000909010009020103
-090c010009050100090a0100090101000905010009040101091801010907010009090100
-09020103090c010009050100090a01000901010009050100091301010908010009050100
-090201000901010009020100090101000902010009080100090501000902010009010100
-090501000902010009010100090201000901010009730101090a01010904010109440100
-0600010006000000060a0100060000000603020201010303010102020605010000010410
-010004030100042c01000408010004020100041901000452010000010601010006000000
-060c01000600000006030202010103010101020206030800090808000905080009020800
-090108000902080009010804090808000902080009020803090108000900080009000800
-0901080409020802097f08000100090a01000905010009050100090a0100090701000903
-010009020100090a010009060100090a0100090101000904010009040100091a01010908
-0100090701000903010009020100090a010009060100090a010009010100090401000914
-010109080100090501000902010009010100090201000901010409090102090201040901
-01000906010009000100090201040901010009730101090c010009050100094301010600
-0000060c0100060000000602020201010303010102020605000001000409010204020104
-040101000400010104030102040201000400010104090100040001010403010204030101
-040001000402010204020100040001020401010104000100040301020402010004000101
-04050100040301020402010004020100044400010602010006000000060a010006000000
-060402020101030101010202060308000908080009050800090208000901080009020800
-09010800090c080009020800090108000902080009010800090008000900080009010800
-09090800097e08000100090a01000905010009050100090b010009050100090401000902
-01000909010009060100090b0100090101000903010009050100091a0101090901000905
-010009040100090201000909010009060100090b01000901010009030100091501010908
-010009050100090201000901010009020100090101000910010009010100090501000906
-010009000100090201000905010009730101090c01000905010009430100060001000600
-0000060a0100060000000603020201010303010102020605010000010407010004020100
-040301000403010104010100040101000402010004010101040101000408010104010100
-040101000402010004010100040101010401010004020100040101000400010004000100
-040101000400010004000100040101000402010004010101040101000404010004020100
-0402010004010100040201000443010000010601010006000000060c0100060000000603
-020201010301010102020603080009080800090208000901080009020800090108000901
-080109010800090208000908080009020800090108000902080009010800090008000900
-080009010800090208000901080009020800097e08000100090a01000905010009050100
-090501010904010009030100090501000902010009030101090201000907010009050101
-09030100090101000902010009060100091a0101090a0100090301000905010009020100
-090301010902010009070100090501010903010009010100090201000916010109080100
-090201000901010009020100090101000901010109010100090201000908010009020100
-090101000902010009010100090701000903010009020100090101000973010109080100
-0902010009010100090201000943010106000000060c0100060000000602020201010303
-010102020605000001000408010004020100040301000403010004020100040101000402
-010004010100040c01000402010004010100040201000401010004020100040101000402
-010004010100040001000400010004010100040001000400010004050100040101000408
-010004020100040201000402010004010100044400010602010006000000060a01000600
-000006040202010103010101020206030800090908020903080209030801090008000902
-08020909080009020800090208030901080009000800090008000902080209030802097f
-08000100090a010009030104090101040903010109050100090201040902010209040101
-090201040903010009050101090401010902010009070100091a0101090b010009020104
-090201020904010109020104090301000905010109040101090201000917010109090102
-09030102090301010900010009020102090a010209030102090201000907010009040102
-09020100097301010909010209030102094401000600010006000000060a010006000000
-060302020101030301010202060501000001040701000402010004030100040301000402
-01000401010404010100040c010004020100040101000402010004010100040201000401
-010404010100040001020401010004000100040001000402010304010100040801000402
-010404020100040101000443010000010601010006000000060c01000600000006030202
-0101030101010202060308000923080509a108000100090a010009140100090601000931
-010009080100091a0101090c010009310100091801010923010509990101095801010600
-0000060c0100060000000602020201010303010102020605000001000408010004020100
-0403010004030100040201000401010004050100040c0100040201000401010004020100
-040101000402010004010100040501000405010004000100040001000401010004020100
-0401010004080100040201000407010004000100044400010602010006000000060a0100
-060000000604020201010301010102020603080009cb08000100090b0101091001010942
-0101091b01010959010109c30101095801000600010006000000060a0100060000000603
-020201010303010102020605010000010407010004020100040301000403010004020100
-040101000402010004010100040c01000402010004010100040201000401010004010101
-040101000402010004020100040101000401010004000100040001000401010004020100
-04010100040801000402010004020100040301010444010000010601010006000000060c
-0100060000000603020201010301010102020603080009cb080001000981010109590101
-09c301010958010106000000060c01000600000006020202010103030101020206050000
-0100040901020405010104010100040201000402010204020100040c0100040201000402
-010204030101040001000402010204040101040201000400010004000100040201030401
-0100040801000403010204050100044500010602010006000000060a0100060000000604
-020201010301010102020603080009cb08000100098101010959010109c3010109580100
-0600010006000000060a0100060000000603020201010303010102020605010000010429
-0105044a01000444010000010601010006000000060c0100060000000603020201010301
-010102020603080009cb08000100098101010959010109c301010958010106000000060c
-010006000000060202020101030301010202060500000100047801000400010004460001
-0602010006000000060a0100060000000604020201010301010102020603080009cb0800
-0100098101010959010109c30101095801000600010006000000060a0100060000000603
-02020101030301010202060501000001047801000446010000010601010006000000060c
-0100060000000603020201010301010102020603080009cb080001000981010109590101
-09c301010958010106000000060c01000600000006020202010103030101020206050000
-010004c200010602010006000000060a0100060000000604020201010301010102020603
-08cd01ff01ff01000600010006000000060a010006000000060302020101030301010202
-060501000001040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000400
-010004000100040001000400010004000100040001000400010004000100040001000001
-0601010006000000060c010006000000060302020101030101010202060308cd01ff01ff
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a0100060000000604020201010301010102020603080009cb08000100
-098101010959010109c30101095801000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-0301010102020603080009cb08000100090b0101094e0101092201010959010109c30101
-0958010106000000060c01000600000006020202010103030101020206050000010000c4
-0602010006000000060a0100060000000604020201010301010102020603080009cb0800
-0100090a010009150100093101000908010009210101090c0100093101000918010109c3
-0101095801000600010006000000060a0100060000000603020201010303010102020605
-010000c50601010006000000060c01000600000006030202010103010101020206030800
-091d08000908080009a208000100090a010009040102090c01000903010209030102090b
-010009030104090a0101090201000907010009210101090b01000903010209030102090b
-010009030104090a0101090201000917010109180100090a010009220102097701010909
-0102094b010106000000060c010006000000060202020101030301010202060500000100
-00c40602010006000000060a01000600000006040202010103010101020206030800091d
-080009ac08000100090a01000903010009020100090a0100090301000902010009010100
-090201000909010109030100090201000909010009010100090201000906010009210101
-090a01000903010009020100090101000902010009090101090301000902010009090100
-09010100090201000916010109180100090a010009240100097701010908010009020100
-094a01000600010006000000060a01000600000006030202010103030101020206050100
-00c50601010006000000060c010006000000060302020101030101010202060308000909
-080209030802090308020902080009010800090308020903080209030802099408000100
-090a01000903010009020100090901000908010009010100090c01000900010009070100
-0909010009010100090301000905010009210101090901000908010009010100090c0100
-090001000907010009090100090101000903010009150101090801000900010109030102
-090201040908010009010100090301020902010009000101090201000900010109030102
-0905010009770101090c0100094a010106000000060c0100060000000602020201010303
-0101020206050000010000c40602010006000000060a0100060000000604020201010301
-010102020603080009080800090208000901080009020800090108000902080009010800
-090008000906080009020800090208000901080009020800099308000100090a01000903
-010009020100090801000909010009010100090e010009060100090a0100090101000904
-01000904010009210101090801000909010009010100090e010009060100090a01000901
-010009040100091401010908010109010100090101000902010009030100090a01000900
-010009030100090201000901010109010100090101010901010009010100090201000904
-010009770101090c0100094a01000600010006000000060a010006000000060302020101
-0303010102020605010000c50601010006000000060c0100060000000603020201010301
-010102020603080009080800090508000902080009010800090208000901080109070800
-090208000902080009010800099708000100090801010905010209080100090901000902
-0103090b010009060100090a0100090101000905010009040101091f0101090701000909
-010009020103090b010009060100090a0100090101000905010009130101090801000902
-0100090101000902010009030100090a0101090401000902010009010100090501000902
-010009010100090201000904010009770101090b0100094b010106000000060c01000600
-000006020202010103030101020206050000010000c40602010006000000060a01000600
-000006040202010103010101020206030800090808000905080009020800090108000902
-080009010801090708000902080409020802099408000100090a01000903010009020100
-09080100090701000903010009020100090a010009060100090a01000901010009040100
-090401000921010109080100090701000903010009020100090a010009060100090a0100
-09010100090401000914010109080100090201000901010409030100090a010109040104
-090101000905010009020100090101040904010009770101090a0100094c010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c0100060000000603020201010301010102020603080009080800090508000902
-080009010800090208000901080009000800090608000902080009090800099308000100
-090a0100090301000902010009090100090501000904010009020100090a010009050100
-090b01000901010009030100090501000921010109090100090501000904010009020100
-090a010009050100090b0100090101000903010009150101090801000902010009010100
-09070100090a010009000100090301000905010009050100090201000901010009080100
-0977010109090100094d010106000000060c010006000000060202020101030301010202
-06050000010000c40602010006000000060a010006000000060402020101030101010202
-060308000908080009020800090108000902080009010800090208000901080009010800
-0905080009020800090208000901080009020800099308000100090a0100090301000902
-010009030101090401000903010009050100090201000903010109040100090501000905
-01010903010009010100090201000906010009210101090a010009030100090501000902
-010009030101090401000905010009050101090301000901010009020100091601010908
-010009020100090101000902010009030100090a01000901010009020100090201000901
-010009050100090201000901010009020100090401000977010109080100094e01000600
-010006000000060a0100060000000603020201010303010102020605010000c506010100
-06000000060c010006000000060302020101030101010202060308000909080209030802
-090308020902080009020800090408000903080209030802099408000100090a01000904
-010209040101090501000902010409020102090401010902010409030100090501010904
-0101090201000907010009210101090b0100090201040902010209040101090201040903
-010009050101090401010902010009170101090801000902010009020102090501010908
-010009020100090201020902010009050100090201000902010209050100097701010908
-0104094a010106000000060c010006000000060202020101030301010202060500000100
-00c40602010006000000060a0100060000000604020201010301010102020603080009cb
-08000100090a0100090d010009060100093101000908010009210101090c010009310100
-09180101091c010509a00101095801000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-0301010102020603080009cb08000100090b010109090101094201010922010109590101
-09c301010958010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060a01000600000006040202010103010101020206030800
-09cb08000100098101010959010109c30101095801000600010006000000060a01000600
-00000603020201010303010102020605010000c50601010006000000060c010006000000
-0603020201010301010102020603080009cb08000100098101010959010109c301010958
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a0100060000000604020201010301010102020603080009cb08000100
-098101010959010109c30101095801000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-0301010102020603080009cb08000100098101010959010109c301010958010106000000
-060c01000600000006020202010103030101020206050000010000c40602010006000000
-060a0100060000000604020201010301010102020603080009cb08000100098101010959
-010109c30101095801000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-060308cd01ff01ff010106000000060c0100060000000602020201010303010102020605
-0000010000c40602010006000000060a0100060000000604020201010301010102020603
-01ff01ff01ce0600010006000000060a0100060000000603020201010303010102020605
-010000c50601010006000000060c01000600000006030202010103010101020206030100
-00cb0101008101010059010100c301010058010106000000060c01000600000006020202
-010103030101020206050000010000c40602010006000000060a01000600000006040202
-01010301010102020603010000cb0101008101010059010100c301010058010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c0100060000000603020201010301010102020603010000cb010100810101000c
-0100003101000018010100c301010058010106000000060c010006000000060202020101
-03030101020206050000010000c40602010006000000060a010006000000060402020101
-030101010202060301000010010200090100000d0102000a010200100100007b01010081
-0101000b01000003010200030102000b010000050100000c010100020100001701010010
-010200090100000d010200930101000a0101004b01000600010006000000060a01000600
-00000603020201010303010102020605010000c50601010006000000060c010006000000
-060302020101030101010202060301000012010000090100000f0100000c010000100100
-007b010100810101000a0100000301000002010000010100000201000009010100040101
-000b01000001010000020100001601010012010000090100000f01000093010100090100
-00010100004a010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060a01000600000006040202010103010101020206030100
-0009010100000100000401000003010200020100000001010003010200050100000c0100
-000301020003010200020100000101000003010200710101008101010009010000080100
-00010100000c0100000001000003010000000100000b0100000101000003010000150101
-000901010000010000040100000301020002010000000101000301020005010000090100
-0000010100030102000201010000010000030102000a0102000301020002010000000101
-0002010000020100000201020002010000000101003f01010009010000010100004a0100
-0600010006000000060a0100060000000603020201010303010102020605010000c50601
-010006000000060c01000600000006030202010103010101020206030100000801000001
-01010004010000020100000201000001010100010100000101000002010000040100000c
-010000020100000201000001010000020100000101000000010000030100000201000070
-010100810101000801000009010000010100000e010000050100000b0100000101000004
-010000140101000801000001010100040100000201000002010000010101000101000001
-010000020100000401000009010100010100000101000002010000010100000001000000
-010000010100000201000008010000020100000101000002010000010101000101000001
-01000002010000010100000201000001010100010100003e01010009010000010100004a
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a01000600000006040202010103010101020206030100000801000002
-010000040100000201000002010000010100000201000005010000040100000c01000002
-010000020100000101000005010100040100007401010081010100070100000901000002
-0103000b010000050100000b010000010100000501000013010100080100000201000004
-010000020100000201000001010000020100000501000004010000090100000201000005
-010000010100000001000000010000010100000201000008010000050100000201000001
-01000005010000020100000101000002010000010100004201010009010000010100004a
-01000600010006000000060a0100060000000603020201010303010102020605010000c5
-0601010006000000060c0100060000000603020201010301010102020603010000080100
-0002010000040100000201000002010000010100000201000002010300040100000c0100
-000201000002010000010100000501010005010200710101008101010008010000070100
-0003010000020100000a010000050100000b010000010100000401000014010100080100
-000201000004010000020100000201000001010000020100000201030004010000090100
-000201000002010300010100000001000000010000010104000901020002010400010100
-00060100000001000002010400010100004201010009010000010100004a010106000000
-060c01000600000006020202010103030101020206050000010000c40602010006000000
-060a01000600000006040202010103010101020206030100000801000002010000040100
-00020100000201000001010000020100000101000002010000040100000c010000020100
-000201000001010000050100000001000007010000700101008101010009010000050100
-0004010000020100000a010000050100000b010000010100000301000015010100080100
-000201000004010000020100000201000001010000020100000101000002010000040100
-000901000002010000010100000201000001010000000100000001000001010000100100
-000101000005010000060100000001000002010000050100004201010009010000010100
-004a01000600010006000000060a01000600000006030202010103030101020206050100
-00c50601010006000000060c010006000000060302020101030101010202060301000008
-010000010101000401000002010000020100000101010001010000010100000201000004
-0100000c0100000201000002010000010100000201000001010000010100000201000002
-01000070010100810101000a010000030100000501000002010000030101000401000005
-010000050101000301000001010000020100001601010008010000010101000401000002
-010000020100000101010001010000010100000201000004010000090100000201000001
-010000020100000101000000010000000100000101000002010000080100000201000001
-010000020100000101000007010000030100000201000001010000420101000901000001
-0100004a010106000000060c010006000000060202020101030301010202060500000100
-00c40602010006000000060a010006000000060402020101030101010202060301000009
-010100000100000401000003010200020100000001010003010300040100000c01000003
-0102000301020002010000020100000201020071010100810101000b0100000201040002
-010200040101000201040001010400030101000401010002010000170101000901010000
-010000040100000301020002010000000101000301030004010000090100000201000002
-010300010100000001000000010000020102000a01020003010200020100000701000004
-01020002010000420101000a0101004b01000600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000000060c01000600000006030202
-010103010101020206030100000c0100002301050093010100810101000c010000310100
-00180101000c010000230105001c0105006801010058010106000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-06040202010103010101020206030100000801000002010000bd01010081010100590101
-000801000002010000b50101005801000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-030101010202060301000009010200be010100810101005901010009010200b601010058
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a0100060000000604020201010301010102020603010000cb01010081
-01010059010100c30101005801000600010006000000060a010006000000060302020101
-0303010102020605010000c50601010006000000060c0100060000000603020201010301
-010102020603010000cb0101008101010059010100c301010058010106000000060c0100
-0600000006020202010103030101020206050000010000c40602010006000000060a0100
-060000000604020201010301010102020603010000cb0101008101010059010100c30101
-005801000600010006000000060a01000600000006030202010103030101020206050100
-00c50601010006000000060c0100060000000603020201010301010102020603010000cb
-0101008101010059010100c301010058010106000000060c010006000000060202020101
-03030101020206050000010000c40602010006000000060a010006000000060402020101
-030101010202060301ff01ff01ce0600010006000000060a010006000000060302020101
-0303010102020605010000c50601010006000000060c0100060000000603020201010301
-01010202060301ff01ff01cf06000000060c010006000000060202020101030301010202
-06050000010000c40602010006000000060a010006000000060402020101030101010202
-0603010000cb0101008101010059010100c30101005801000600010006000000060a0100
-060000000603020201010303010102020605010000c50601010006000000060c01000600
-00000603020201010301010102020603010000cb0101008101010059010100c301010058
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a0100060000000604020201010301010102020603010000cb01010081
-0101000c0100003101000018010100c30101005801000600010006000000060a01000600
-00000603020201010303010102020605010000c50601010006000000060c010006000000
-060302020101030101010202060301000010010200090100000d0102009b010100810101
-000b01000003010200030102000b010000050100000c0101000201000017010100100102
-00090100000d010200930101000a0101004b010106000000060c01000600000006020202
-010103030101020206050000010000c40602010006000000060a01000600000006040202
-0101030101010202060301000012010000090100000f0100009b010100810101000a0100
-000301000002010000010100000201000009010100040101000b01000001010000020100
-001601010012010000090100000f0100009301010009010000010100004a010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c0100060000000603020201010301010102020603010000090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-01010000010000030102000301020071010100810101000901000008010000010100000c
-0100000001000003010000000100000b0100000101000003010000150101000901010000
-010000040100000301020002010000000101000301020005010000090100000001010003
-0102000201010000010000030102000a0102000301020002010000000101000201000002
-0100000201020002010000000101003f01010009010000010100004a010106000000060c
-01000600000006020202010103030101020206050000010000c40602010006000000060a
-010006000000060402020101030101010202060301000008010000010101000401000002
-010000020100000101010001010000010100000201000004010000090101000101000001
-010000020100000101000000010000000100000101000002010000010100000201000070
-010100810101000801000009010000010100000e010000050100000b0100000101000004
-010000140101000801000001010100040100000201000002010000010101000101000001
-010000020100000401000009010100010100000101000002010000010100000001000000
-010000010100000201000008010000020100000101000002010000010101000101000001
-01000002010000010100000201000001010100010100003e01010009010000010100004a
-01000600010006000000060a0100060000000603020201010303010102020605010000c5
-0601010006000000060c0100060000000603020201010301010102020603010000080100
-000201000004010000020100000201000001010000020100000501000004010000090100
-000201000005010000010100000001000000010000010100000201000001010000740101
-00810101000701000009010000020103000b010000050100000b01000001010000050100
-001301010008010000020100000401000002010000020100000101000002010000050100
-000401000009010000020100000501000001010000000100000001000001010000020100
-000801000005010000020100000101000005010000020100000101000002010000010100
-004201010009010000010100004a010106000000060c0100060000000602020201010303
-0101020206050000010000c40602010006000000060a0100060000000604020201010301
-010102020603010000080100000201000004010000020100000201000001010000020100
-000201030004010000090100000201000002010300010100000001000000010000010104
-00020102007101010081010100080100000701000003010000020100000a010000050100
-000b01000001010000040100001401010008010000020100000401000002010000020100
-000101000002010000020103000401000009010000020100000201030001010000000100
-000001000001010400090102000201040001010000060100000001000002010400010100
-004201010009010000010100004a01000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-030101010202060301000008010000020100000401000002010000020100000101000002
-010000010100000201000004010000090100000201000001010000020100000101000000
-010000000100000101000009010000700101008101010009010000050100000401000002
-0100000a010000050100000b010000010100000301000015010100080100000201000004
-010000020100000201000001010000020100000101000002010000040100000901000002
-010000010100000201000001010000000100000001000001010000100100000101000005
-010000060100000001000002010000050100004201010009010000010100004a01010600
-0000060c01000600000006020202010103030101020206050000010000c4060201000600
-0000060a0100060000000604020201010301010102020603010000080100000101010004
-010000020100000201000001010100010100000101000002010000040100000901000002
-010000010100000201000001010000000100000001000001010000020100000101000002
-01000070010100810101000a010000030100000501000002010000030101000401000005
-010000050101000301000001010000020100001601010008010000010101000401000002
-010000020100000101010001010000010100000201000004010000090100000201000001
-010000020100000101000000010000000100000101000002010000080100000201000001
-010000020100000101000007010000030100000201000001010000420101000901000001
-0100004a01000600010006000000060a0100060000000603020201010303010102020605
-010000c50601010006000000060c01000600000006030202010103010101020206030100
-000901010000010000040100000301020002010000000101000301030004010000090100
-000201000002010300010100000001000000010000020102000301020071010100810101
-000b01000002010400020102000401010002010400010104000301010004010100020100
-001701010009010100000100000401000003010200020100000001010003010300040100
-00090100000201000002010300010100000001000000010000020102000a010200030102
-0002010000070100000401020002010000420101000a0101004b010106000000060c0100
-0600000006020202010103030101020206050000010000c40602010006000000060a0100
-0600000006040202010103010101020206030100000c0100002301050093010100810101
-000c01000031010000180101000c010000230105001c0105006801010058010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c01000600000006030202010103010101020206030100000801000002010000bd
-01010081010100590101000801000002010000b501010058010106000000060c01000600
-000006020202010103030101020206050000010000c40602010006000000060a01000600
-0000060402020101030101010202060301000009010200be010100810101005901010009
-010200b60101005801000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-0603010000cb0101008101010059010100c301010058010106000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-0604020201010301010102020603010000cb0101008101010059010100c3010100580100
-0600010006000000060a0100060000000603020201010303010102020605010000c50601
-010006000000060c0100060000000603020201010301010102020603010000cb01010081
-01010059010100c301010058010106000000060c01000600000006020202010103030101
-020206050000010000c40602010006000000060a01000600000006040202010103010101
-02020603010000cb0101008101010059010100c30101005801000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-06000000060302020101030101010202060301ff01ff01cf06000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-060402020101030101010202060301ff01ff01ce0600010006000000060a010006000000
-0603020201010303010102020605010000c50601010006000000060c0100060000000603
-020201010301010102020603010000cb0101008101010059010100c30101005801010600
-0000060c01000600000006020202010103030101020206050000010000c4060201000600
-0000060a0100060000000604020201010301010102020603010000cb0101008101010059
-010100c30101005801000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-0603010000cb010100810101000c0100003101000018010100c301010058010106000000
-060c01000600000006020202010103030101020206050000010000c40602010006000000
-060a010006000000060402020101030101010202060301000010010200090100000d0102
-004301000056010100810101000b01000003010200030102000b010000050100000c0101
-00020100001701010010010200090100000d010200930101000a0101004b010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c010006000000060302020101030101010202060301000012010000090100000f
-0100004301000056010100810101000a0100000301000002010000010100000201000009
-010100040101000b01000001010000020100001601010012010000090100000f01000093
-01010009010000010100004a010106000000060c01000600000006020202010103030101
-020206050000010000c40602010006000000060a01000600000006040202010103010101
-020206030100000901010000010000040100000301020002010000000101000301020005
-010000090100000001010003010200020101000001000003010200030102000a01020002
-010000020100000101040054010100810101000901000008010000010100000c01000000
-01000003010000000100000b010000010100000301000015010100090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-01010000010000030102000a010200030102000201000000010100020100000201000002
-01020002010000000101003f01010009010000010100004a01000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-060000000603020201010301010102020603010000080100000101010004010000020100
-000201000001010100010100000101000002010000040100000901010001010000010100
-000201000001010000000100000001000001010000020100000101000002010000080100
-000201000001010000020100000301000056010100810101000801000009010000010100
-000e010000050100000b0100000101000004010000140101000801000001010100040100
-000201000002010000010101000101000001010000020100000401000009010100010100
-000101000002010000010100000001000000010000010100000201000008010000020100
-000101000002010000010101000101000001010000020100000101000002010000010101
-00010100003e01010009010000010100004a010106000000060c01000600000006020202
-010103030101020206050000010000c40602010006000000060a01000600000006040202
-010103010101020206030100000801000002010000040100000201000002010000010100
-000201000005010000040100000901000002010000050100000101000000010000000100
-000101000002010000010100000c01000002010000020100000001000004010000560101
-00810101000701000009010000020103000b010000050100000b01000001010000050100
-001301010008010000020100000401000002010000020100000101000002010000050100
-000401000009010000020100000501000001010000000100000001000001010000020100
-000801000005010000020100000101000005010000020100000101000002010000010100
-004201010009010000010100004a01000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-030101010202060301000008010000020100000401000002010000020100000101000002
-010000020103000401000009010000020100000201030001010000000100000001000001
-010400020102000901040003010000050100005601010081010100080100000701000003
-010000020100000a010000050100000b0100000101000004010000140101000801000002
-010000040100000201000002010000010100000201000002010300040100000901000002
-010000020103000101000000010000000100000101040009010200020104000101000006
-0100000001000002010400010100004201010009010000010100004a010106000000060c
-01000600000006020202010103030101020206050000010000c40602010006000000060a
-010006000000060402020101030101010202060301000008010000020100000401000002
-010000020100000101000002010000010100000201000004010000090100000201000001
-010000020100000101000000010000000100000101000009010000080100000601000000
-010000040100005601010081010100090100000501000004010000020100000a01000005
-0100000b0100000101000003010000150101000801000002010000040100000201000002
-010000010100000201000001010000020100000401000009010000020100000101000002
-010000010100000001000000010000010100001001000001010000050100000601000000
-01000002010000050100004201010009010000010100004a01000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-060000000603020201010301010102020603010000080100000101010004010000020100
-000201000001010100010100000101000002010000040100000901000002010000010100
-000201000001010000000100000001000001010000020100000101000002010000080100
-000201000001010000020100000301000056010100810101000a01000003010000050100
-000201000003010100040100000501000005010100030100000101000002010000160101
-000801000001010100040100000201000002010000010101000101000001010000020100
-000401000009010000020100000101000002010000010100000001000000010000010100
-000201000008010000020100000101000002010000010100000701000003010000020100
-00010100004201010009010000010100004a010106000000060c01000600000006020202
-010103030101020206050000010000c40602010006000000060a01000600000006040202
-010103010101020206030100000901010000010000040100000301020002010000000101
-000301030004010000090100000201000002010300010100000001000000010000020102
-00030102000a01020002010000020100000401010054010100810101000b010000020104
-000201020004010100020104000101040003010100040101000201000017010100090101
-000001000004010000030102000201000000010100030103000401000009010000020100
-0002010300010100000001000000010000020102000a0102000301020002010000070100
-000401020002010000420101000a0101004b01000600010006000000060a010006000000
-0603020201010303010102020605010000c50601010006000000060c0100060000000603
-0202010103010101020206030100000c010000230105002301050069010100810101000c
-01000031010000180101000c010000230105001c0105006801010058010106000000060c
-01000600000006020202010103030101020206050000010000c40602010006000000060a
-01000600000006040202010103010101020206030100000801000002010000bd01010081
-010100590101000801000002010000b50101005801000600010006000000060a01000600
-00000603020201010303010102020605010000c50601010006000000060c010006000000
-060302020101030101010202060301000009010200be0101008101010059010100090102
-00b601010058010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060a01000600000006040202010103010101020206030100
-00cb0101008101010059010100c30101005801000600010006000000060a010006000000
-0603020201010303010102020605010000c50601010006000000060c0100060000000603
-020201010301010102020603010000cb0101008101010059010100c30101005801010600
-0000060c01000600000006020202010103030101020206050000010000c4060201000600
-0000060a0100060000000604020201010301010102020603010000cb0101008101010059
-010100c30101005801000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-0603010000cb0101008101010059010100c301010058010106000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-060402020101030101010202060301ff01ff01ce0600010006000000060a010006000000
-0603020201010303010102020605010000c50601010006000000060c0100060000000603
-02020101030101010202060301ff01ff01cf06000000060c010006000000060202020101
-03030101020206050000010000c40602010006000000060a010006000000060402020101
-0301010102020603010000cb0101008101010059010100c3010100580100060001000600
-0000060a0100060000000603020201010303010102020605010000c50601010006000000
-060c0100060000000603020201010301010102020603010000cb01010081010100590101
-00c301010058010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060a01000600000006040202010103010101020206030100
-00cb010100810101000c0100003101000018010100c30101005801000600010006000000
-060a0100060000000603020201010303010102020605010000c50601010006000000060c
-01000600000006030202010103010101020206030100000b010000120100001f01000089
-010100810101000b01000003010200030102000b010000040102000b0101000201000017
-0101000b010000120100000e010000010100008f0101000a0101004b010106000000060c
-01000600000006020202010103030101020206050000010000c40602010006000000060a
-01000600000006040202010103010101020206030100001f0100001f0100008901010081
-0101000a0100000301000002010000010100000201000009010100030100000201000009
-0100000101000002010000160101001f0100000e010000010100008f0101000901000001
-0100004a01000600010006000000060a0100060000000603020201010303010102020605
-010000c50601010006000000060c01000600000006030202010103010101020206030100
-000901020002010000000101000301020002010400090102000301020003010200020100
-0000010100030102007f010100810101000901000008010000010100000c010000000100
-000701000009010000010100000301000015010100090102000201000000010100030102
-0002010400090101000001000001010000000101008c01010009010000010100004a0101
-06000000060c01000600000006020202010103030101020206050000010000c406020100
-06000000060a01000600000006040202010103010101020206030100000b010000020101
-00010100000101000002010000030100000a010000020100000101000002010000010100
-0002010000010101000101000001010000020100007e0101008101010008010000090100
-00010100000e01000007010000090100000101000004010000140101000b010000020101
-00010100000101000002010000030100000a0100000101010001010100010100008b0101
-0009010000010100004a01000600010006000000060a0100060000000603020201010303
-010102020605010000c50601010006000000060c01000600000006030202010103010101
-020206030100000b01000002010000020100000101000002010000030100000a01000009
-01000001010000050100000201000001010000020100007e010100810101000701000009
-010000020103000b010000060100000a0100000101000005010000130101000b01000002
-010000020100000101000002010000030100000a0100000201000001010000020100008b
-01010009010000010100004a010106000000060c01000600000006020202010103030101
-020206050000010000c40602010006000000060a01000600000006040202010103010101
-020206030100000b010000020100000201000001010400030100000a0100000601030001
-0100000501000002010000010104007e0101008101010008010000070100000301000002
-0100000a010000050100000b0100000101000004010000140101000b0100000201000002
-01000001010400030100000a0100000201000001010000020100008b0101000901000001
-0100004a01000600010006000000060a0100060000000603020201010303010102020605
-010000c50601010006000000060c01000600000006030202010103010101020206030100
-000b010000020100000201000001010000070100000a0100000501000002010000010100
-000501000002010000010100008201010081010100090100000501000004010000020100
-000a010000040100000c0100000101000003010000150101000b01000002010000020100
-0001010000070100000a0100000201000001010000020100008b01010009010000010100
-004a010106000000060c01000600000006020202010103030101020206050000010000c4
-0602010006000000060a01000600000006040202010103010101020206030100000b0100
-0002010000020100000101000002010000030100000a0100000201000001010000020100
-000101000002010000010100000201000001010000020100007e010100810101000a0100
-000301000005010000020100000301010004010000030100000701010003010000010100
-0002010000160101000b01000002010000020100000101000002010000030100000a0100
-000101010001010100010100008b01010009010000010100004a01000600010006000000
-060a0100060000000603020201010303010102020605010000c50601010006000000060c
-01000600000006030202010103010101020206030100000b010000020100000201000002
-010200050101000901020003010300020102000201000002010000020102007f01010081
-0101000b0100000201040002010200040101000201040001010400030101000401010002
-010000170101000b01000002010000020100000201020005010100090101000001000001
-010000000101008c0101000a0101004b010106000000060c010006000000060202020101
-03030101020206050000010000c40602010006000000060a010006000000060402020101
-030101010202060301000023010500a1010100810101000c010000310100001801010023
-010500990101005801000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-0603010000cb0101008101010059010100c301010058010106000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-0604020201010301010102020603010000cb0101008101010059010100c3010100580100
-0600010006000000060a0100060000000603020201010303010102020605010000c50601
-010006000000060c0100060000000603020201010301010102020603010000cb01010081
-01010059010100c301010058010106000000060c01000600000006020202010103030101
-020206050000010000c40602010006000000060a01000600000006040202010103010101
-02020603010000cb0101008101010059010100c30101005801000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-060000000603020201010301010102020603010000cb0101008101010059010100c30101
-0058010106000000060c01000600000006020202010103030101020206050000010000c4
-0602010006000000060a0100060000000604020201010301010102020603010000cb0101
-008101010059010100c30101005801000600010006000000060a01000600000006030202
-01010303010102020605010000c50601010006000000060c010006000000060302020101
-030101010202060301ff01ff01cf06000000060c01000600000006020202010103030101
-020206050000010000c40602010006000000060a01000600000006040202010103010101
-0202060301ff01ff01ce0600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-0603010000cb0101008101010059010100c301010058010106000000060c010006000000
-06020202010103030101020206050000010000c40602010006000000060a010006000000
-0604020201010301010102020603010000cb0101008101010059010100c3010100580100
-0600010006000000060a0100060000000603020201010303010102020605010000c50601
-010006000000060c0100060000000603020201010301010102020603010000cb01010081
-0101000c0100003101000018010100c301010058010106000000060c0100060000000602
-0202010103030101020206050000010000c40602010006000000060a0100060000000604
-0202010103010101020206030100000b010000120100000e010000010100009701010081
-0101000b01000003010200030102000b010000040102000b01010002010000170101000b
-010000120100000e010000010100008f0101000a01000004010200440100060001000600
-0000060a0100060000000603020201010303010102020605010000c50601010006000000
-060c01000600000006030202010103010101020206030100001f0100000e010000010100
-0097010100810101000a0100000301000002010000010100000201000009010100030100
-0002010000090100000101000002010000160101001f0100000e010000010100008f0101
-0009010100030100000201000043010106000000060c0100060000000602020201010303
-0101020206050000010000c40602010006000000060a0100060000000604020201010301
-010102020603010000090102000201000000010100030102000201040009010100000100
-00010100000001010094010100810101000901000008010000010100000c010000000100
-000701000009010000010100000301000015010100090102000201000000010100030102
-0002010400090101000001000001010000000101008c0101000801000000010000030100
-00020100004301000600010006000000060a010006000000060302020101030301010202
-0605010000c50601010006000000060c0100060000000603020201010301010102020603
-0100000b01000002010100010100000101000002010000030100000a0100000101010001
-0101000101000093010100810101000801000009010000010100000e0100000701000009
-0100000101000004010000140101000b0100000201010001010000010100000201000003
-0100000a0100000101010001010100010100008b0101000a010000030100000201000043
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a01000600000006040202010103010101020206030100000b01000002
-010000020100000101000002010000030100000a01000002010000010100000201000093
-010100810101000701000009010000020103000b010000060100000a0100000101000005
-010000130101000b01000002010000020100000101000002010000030100000a01000002
-01000001010000020100008b0101000a010000040103004301000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-0600000006030202010103010101020206030100000b0100000201000002010000010104
-00030100000a010000020100000101000002010000930101008101010008010000070100
-0003010000020100000a010000050100000b0100000101000004010000140101000b0100
-00020100000201000001010400030100000a0100000201000001010000020100008b0101
-000a0100000701000043010106000000060c010006000000060202020101030301010202
-06050000010000c40602010006000000060a010006000000060402020101030101010202
-06030100000b010000020100000201000001010000070100000a01000002010000010100
-00020100009301010081010100090100000501000004010000020100000a010000040100
-000c0100000101000003010000150101000b010000020100000201000001010000070100
-000a0100000201000001010000020100008b0101000a0100000701000043010006000100
-06000000060a0100060000000603020201010303010102020605010000c5060101000600
-0000060c01000600000006030202010103010101020206030100000b0100000201000002
-0100000101000002010000030100000a0100000101010001010100010100009301010081
-0101000a0100000301000005010000020100000301010004010000030100000701010003
-0100000101000002010000160101000b0100000201000002010000010100000201000003
-0100000a0100000101010001010100010100008b0101000a010000030100000201000043
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a01000600000006040202010103010101020206030100000b01000002
-010000020100000201020005010100090101000001000001010000000101009401010081
-0101000b0100000201040002010200040101000201040001010400030101000401010002
-010000170101000b01000002010000020100000201020005010100090101000001000001
-010000000101008c01010008010400020102004401000600010006000000060a01000600
-00000603020201010303010102020605010000c50601010006000000060c010006000000
-060302020101030101010202060301000023010500a1010100810101000c010000310100
-0018010100230105009901010058010106000000060c0100060000000602020201010303
-0101020206050000010000c40602010006000000060a0100060000000604020201010301
-010102020603010000cb0101008101010059010100c30101005801000600010006000000
-060a0100060000000603020201010303010102020605010000c50601010006000000060c
-0100060000000603020201010301010102020603010000cb0101008101010059010100c3
-01010058010106000000060c010006000000060202020101030301010202060500000100
-00c40602010006000000060a0100060000000604020201010301010102020603010000cb
-0101008101010059010100c30101005801000600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000000060c01000600000006030202
-01010301010102020603010000cb0101008101010059010100c301010058010106000000
-060c01000600000006020202010103030101020206050000010000c40602010006000000
-060a0100060000000604020201010301010102020603010000cb01010081010100590101
-00c30101005801000600010006000000060a010006000000060302020101030301010202
-0605010000c50601010006000000060c0100060000000603020201010301010102020603
-010000cb0101008101010059010100c301010058010106000000060c0100060000000602
-0202010103030101020206050000010000c40602010006000000060a0100060000000604
-02020101030101010202060301ff01ff01ce0600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000000060c01000600000006030202
-0101030101010202060301ff01ff01cf06000000060c0100060000000602020201010303
-0101020206050000010000c40602010006000000060a0100060000000604020201010301
-010102020603010000cb0101008101010059010100c30101005801000600010006000000
-060a0100060000000603020201010303010102020605010000c50601010006000000060c
-0100060000000603020201010301010102020603010000cb0101008101010059010100c3
-01010058010106000000060c010006000000060202020101030301010202060500000100
-00c40602010006000000060a0100060000000604020201010301010102020603010000cb
-010100810101000c0100003101000018010100c30101005801000600010006000000060a
-0100060000000603020201010303010102020605010000c50601010006000000060c0100
-0600000006030202010103010101020206030100000b010000120100000a010000150100
-0087010100810101000b01000003010200030102000b010000040102000b010100020100
-00170101000b010000120100000e010000010100008f0101000c0100004a010106000000
-060c01000600000006020202010103030101020206050000010000c40602010006000000
-060a01000600000006040202010103010101020206030100001f0100000a010000150100
-0087010100810101000a0100000301000002010000010100000201000009010100030100
-0002010000090100000101000002010000160101001f0100000e010000010100008f0101
-000b0101004a01000600010006000000060a010006000000060302020101030301010202
-0605010000c50601010006000000060c0100060000000603020201010301010102020603
-010000090102000201000000010100030102000201040008010000000101000301020003
-01020002010400020102007f010100810101000901000008010000010100000c01000000
-010000070100000901000001010000030100001501010009010200020100000001010003
-01020002010400090101000001000001010000000101008c0101000a010000000100004a
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a01000600000006040202010103010101020206030100000b01000002
-010100010100000101000002010000030100000a01010001010000010100000201000001
-010000020100000301000003010000020100007e01010081010100080100000901000001
-0100000e01000007010000090100000101000004010000140101000b0100000201010001
-0100000101000002010000030100000a0100000101010001010100010100008b01010009
-010000010100004a01000600010006000000060a01000600000006030202010103030101
-02020605010000c50601010006000000060c010006000000060302020101030101010202
-06030100000b01000002010000020100000101000002010000030100000a010000020100
-000101000002010000010100000701000003010000820101008101010007010000090100
-00020103000b010000060100000a0100000101000005010000130101000b010000020100
-00020100000101000002010000030100000a0100000201000001010000020100008b0101
-0008010000020100004a010106000000060c010006000000060202020101030301010202
-06050000010000c40602010006000000060a010006000000060402020101030101010202
-06030100000b010000020100000201000001010400030100000a01000002010000010100
-00020100000201020004010000040102007f010100810101000801000007010000030100
-00020100000a010000050100000b0100000101000004010000140101000b010000020100
-000201000001010400030100000a0100000201000001010000020100008b010100080100
-00020100004a01000600010006000000060a010006000000060302020101030301010202
-0605010000c50601010006000000060c0100060000000603020201010301010102020603
-0100000b010000020100000201000001010000070100000a010000020100000101000002
-0100000501000003010000070100007e0101008101010009010000050100000401000002
-0100000a010000040100000c0100000101000003010000150101000b0100000201000002
-01000001010000070100000a0100000201000001010000020100008b0101000801050049
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000000060a01000600000006040202010103010101020206030100000b01000002
-010000020100000101000002010000030100000a01000002010000010100000201000001
-010000020100000301000003010000020100007e010100810101000a0100000301000005
-010000020100000301010004010000030100000701010003010000010100000201000016
-0101000b01000002010000020100000101000002010000030100000a0100000101010001
-010100010100008b0101000c0100004a01000600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000000060c01000600000006030202
-010103010101020206030100000b01000002010000020100000201020005010100080100
-0002010000020102000301020005010100020102007f010100810101000b010000020104
-0002010200040101000201040001010400030101000401010002010000170101000b0100
-0002010000020100000201020005010100090101000001000001010000000101008c0101
-000c0100004a010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060a01000600000006040202010103010101020206030100
-0023010500a1010100810101000c01000031010000180101002301050099010100580100
-0600010006000000060a0100060000000603020201010303010102020605010000c50601
-010006000000060001000600010006000100060001000600010006000100060001000600
-00000603020201010301010102020603010000cb0101008101010059010100c301010058
-010106000000060c01000600000006020202010103030101020206050000010000c40602
-010006000100060001000600010006000100060001000600010006000100060000000604
-020201010301010102020603010000cb0101008101010059010100c30101005801000600
-010006000000060a0100060000000603020201010303010102020605010000c506010100
-0600040e060000000603020201010301010102020603010000cb01010081010100590101
-00c301010058010106000000060c01000600000006020202010103030101020206050000
-010000c40602010006000000060000000600000006000000060000000600000006000000
-060000000604020201010301010102020603010000cb0101008101010059010100c30101
-005801000600010006000000060a01000600000006030202010103030101020206050100
-00c506010100060004000600000006000000060000000600000006000000060000000600
-0100060000000603020201010301010102020603010000cb0101008101010059010100c3
-01010058010106000000060c010006000000060202020101030301010202060500000100
-00c40602010004000000060a0100040000000604020201010301010102020603010000cb
-0101008101010059010100c30101005801000600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000401000006080100060004000600
-0000060302020101030101010202060301ff01ff01cf06000000060c0100060000000602
-0202010103030101020206050000010000c4060201000401060000000606010006000401
-0000060402020101030101010202060301ff01ff01ce0600010006000000060a01000600
-00000603020201010303010102020605010000c506010100060004020600000006060100
-0401060000000603020201010301010102020603010000cb0101008101010059010100c3
-01010058010106000000060c010006000000060202020101030301010202060500000100
-00c4060201000402000006060100040200000604020201010301010102020603010000cb
-0101008101010059010100c30101005801000600010006000000060a0100060000000603
-020201010303010102020605010000c50601010006000403000006040100060004020600
-00000603020201010301010102020603010000cb010100810101000c0100003101000018
-010100c301010058010106000000060c0100060000000602020201010303010102020605
-0000010000c4060201000403060000000602010006000403000006040202010103010101
-0202060301000028010000040100000b0100008e010100810101000b0100000301020003
-0102000b010000030104000a0101000201000017010100180100000a0100002201020077
-0101000a0100004c01000600010006000000060a01000600000006030202010103030101
-02020605010000c506010100060004040600000006020100040306000000060302020101
-030101010202060301000028010000110100008e010100810101000a0100000301000002
-010000010100000201000009010100030100000201000009010000010100000201000016
-010100180100000a0100002401000077010100090101004c010106000000060c01000600
-000006020202010103030101020206050000010000c40602010004040000060201000404
-00000604020201010301010102020603010000090102000201000002010000020102000a
-010100000100000201020003010200020104008c01010081010100090100000801000001
-0100000c0100000001000007010000090100000101000003010000150101000801000000
-010100030102000201040008010000010100000301020002010000000101000201000000
-01010003010200050100007701010008010000000100004c01000600010006000000060a
-0100060000000603020201010303010102020605010000c5060101000600040500000600
-010006000404060000000603020201010301010102020603010000080100000201000001
-010000020100000101000002010000080100000101010004010000020100000201000003
-0100008e010100810101000801000009010000010100000e010000060100000a01000001
-010000040100001401010008010100010100000101000002010000030100000a01000000
-010000030100000201000001010100010100000101010001010000010100000201000004
-010000770101000a0100004c010106000000060c01000600000006020202010103030101
-020206050000010000c40602010004050600010006000405000006040202010103010101
-02020603010000080100000601000001010000010100000c010000020100000401000002
-010000070100008e010100810101000701000009010000020103000b010000060100000a
-01000001010000050100001301010008010000020100000101000002010000030100000a
-010100040100000201000001010000050100000201000001010000020100000401000077
-0101000a0100004c01000600010006000000060a01000600000006030202010103030101
-02020605010000c506010100060004060600010004050600000006030202010103010101
-020206030100000901020003010000010100000201020009010000020100000401000003
-010200040100008e01010081010100080100000701000003010000020100000a01000006
-0100000a010000010100000401000014010100080100000201000001010400030100000a
-010100040104000101000005010000020100000101040004010000770101000a0100004c
-010106000000060c010006000000060202020101030301010202060500c6060201000406
-01000406000006040202010103010101020206030100000c010000030100000001000005
-01000008010000020100000401000006010000030100008e010100810101000901000005
-01000004010000020100000a010000050100000b01000001010000030100001501010008
-0100000201000001010000070100000a0100000001000003010000050100000501000002
-0100000101000008010000770101000a0100004c01000600010006000000060a01000600
-000006030202010103030101020206ce0100060000000600000006000000060000000600
-000006000000060000000600000006000000060302020101030101010202060301000008
-010000020100000301010002010000020100000801000001010100040100000201000002
-010000030100008e010100810101000a0100000301000005010000020100000301010004
-010000050100000501010003010000010100000201000016010100080100000201000001
-01000002010000030100000a010000010100000201000002010000010100000501000002
-010000010100000201000004010000770101000a0100004c010106000000060c01000600
-000006020202010103030101020206cf0000060000000600000006000000060000000600
-000006000000060000000600000006040202010103010101020206030100000901020005
-010000030102000a010100000100000401000003010200050101008c010100810101000b
-010000020104000201020004010100020104000301000005010100040101000201000017
-010100080100000201000002010200050101000801000002010000020102000201000005
-01000002010000020102000501000077010100080104004a01000600010006000000060a
-010006000000060302020101030301010202060401000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000613
-0202010103010101020206030100001201000008010500a8010100810101000c01000031
-010000180101001c010500a001010058010106000000060c010006000000060202020101
-030301010202060301000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600000006120202010103010101
-020206030100000f01000000010000b80101008101010059010100c30101005801000600
-010006000000060a01000600000006030202010103030101020206040100040d06000400
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600040006000000040c00000613020201010301
-01010202060301000010010000b90101008101010059010100c301010058010106000000
-060c010006000000060202020101030301010202060301000600040b0000060001000400
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-00000600000006000000060000000600010004000000060000000600040a060000000612
-020201010301010102020603010000cb0101008101010059010100c30101005801000600
-010006000000060a01000600000006030202010103030101020206040100040906000000
-06000100060004000600000006a601000600040006000000060000000600000004080000
-0613020201010301010102020603010000cb0101008101010059010100c3010100580101
-06000000060c010006000000060202020101030301010202060301000600040700000600
-0000060201000400000006a8010004000000060200000600000006000406060000000612
-020201010301010102020603010000cb0101008101010059010100c30101005801000600
-010006000000060a01000600000006030202010103030101020206040100040506000000
-0600000006020100060004000600000006a6010006000400060000000604000006000000
-040400000613020201010301010102020603010000cb0101008101010059010100c30101
-0058010106000000060c0100060000000602020201010303010102020603010006000403
-000006000000060601000400000006a80100040000000606000006000000060004020600
-0000061202020101030101010202060301ff01ff01ce0600010006000000060a01000600
-000006030202010103030101020206040100040106000000060000000606010006000400
-0600000006a6010006000400060000000608000006000000040000000613020201010301
-01010202060301ff01ff01cf06000000060c010006000000060202020101030301010202
-060301000600010006000100060a01000400000006a8010004000000060a010006000100
-060000000612020201010301010102020603010000cb0101008101010059010100c30101
-005801000600010006000000060a01000600000006030202010103030101020206040100
-0401060001000600010006060100060004000600000006a6010006000400060000000608
-010006000100040000000613020201010301010102020603010000cb0101008101010059
-010100c301010058010106000000060c0100060000000602020201010303010102020603
-010006000403010006000100060601000400000006a80100040000000606010006000100
-06000402060000000612020201010301010102020603010000cb01010081010100590101
-00c30101005801000600010006000000060a010006000000060302020101030301010202
-060401000405060001000600010006020100060004000600000006a60100060004000600
-00000604010006000100040400000613020201010301010102020603010000cb01010081
-01010059010100c301010058010106000000060c01000600000006020202010103030101
-02020603010006000407010006000100060201000400000006a801000400000006020100
-0600010006000406060000000612020201010301010102020603010000cb010100810101
-0059010100c30101005801000600010006000000060a0100060000000603020201010303
-010102020604010004090600010006000100060004000600000006a60100060004000600
-00000600010006000100040800000613020201010301010102020603010000cb01010081
-01010059010100c301010058010106000000060c01000600000006020202010103030101
-0202060301000600040b0100060001000400000006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-04000000060001000600040a060000000612020201010301010102020603010000cb0101
-008101010059010100c30101005801000600010006000000060a01000600000006030202
-010103030101020206040100040d06000400060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-040006000100040c00000613020201010301010102020603010000cb0101008101010059
-010100c301010058010106000000060c0100060000000602020201010303000406030100
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-06000000060000000600000006000000061200040301010102020603010000cb01010081
-01010059010100c30101005801000600010006000000060a010006000000060302020101
-030300000202050006040000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000061300000202050003010101
-02020603010000cb0101008101010059010100c301010058010106000000060c01000600
-0000060202020101030300000202050006e50000020205000301010102020603010000cb
-0101008101010059010100c30101005801000600010006000000060a0100060000000603
-02020101030300000202050006e50000020205000301010102020603010000cb01010081
-01010059010100c301010058010106000000060c01000600000006020202010103030000
-0202050006e50000020205000301010102020603010000cb0101008101010059010100c3
-0101005801000600010006000000060a0100060000000603020201010303000002020500
-06e50000020205000301010102020603010000cb0101008101010059010100c301010058
-010106000000060c0100060000000602020201010303000002020500000502d900060202
-05000301010102020603010000cb0101008101010059010100c301010058010006000100
-06000000060a010006000000060302020101030300000208050002d90000020805000301
-010102020603010000cb0101008101010059010100c301010058010106000000060c0100
-06000000060202020101030300000208050002d900000208050003010101020206030100
-00cb0101008101010059010100c30101005801000600010006000000060a010006000000
-060302020101030300000208050001d90000020805000301010102020603010000cb0101
-008101010059010100c30101005801010600000006000100060001000600010006000100
-0600010006000100060001000600000006020202010103030000050901d9000005090301
-010102020603010000cb0101008101010059010100c30101005801000600010006000100
-0600010006000100060001000600010006000100060001000600000006030202010103f5
-01010202060301ff01ff01cf0600040e0600000006020202010103f501010202060301ff
-01ff01ce06000100040e000006030202010103f5010102020603010000cb010100810101
-0059010100c30101005801010600040e0600000006020202010103f50101020206030100
-00cb0101008101010059010100c301010058010006000100040e000006030202010103f5
-010102020603010000cb0101008101010059010100c30101005801010600040e06000000
-06020202010103f5010102020603010000cb0101008101010059010100c3010100580100
-06000100040e000006030202010103f5010102020603010000cb01010081010100590101
-00c30101005801010600040e0600000006020202010103f5010102020603010000cb0101
-008101010059010100c301010058010006000100040e000006030202010103f501010202
-0603010000cb0101008101010059010100c30101005801010600040e0600000006020202
-010103f5010102020603010000cb0101008101010059010100c301010058010006000100
-040e000006030202010103f5010102020603010000cb0101008101010059010100c30101
-005801010600040e0600000006020202010103f5010102020603010000cb010100810101
-0059010100c301010058010006000100040e000006030202010103f50101020206030100
-00cb0101008101010059010100c30101005801010600040e0600000006020202010103f5
-010102020603010000cb0101008101010059010100c301010058010006000100040e0000
-06030202010103f5010102020603010000cb0101008101010059010100c3010100580101
-0600040e0600000006020202010103f5010102020603010000cb01010081010100590101
-00c301010058010006000100040e000006030202010103f5010102020603010000cb0101
-008101010059010100c30101005801010600040e0600000006020202010103f501010202
-0603010000cb0101008101010059010100c301010058010006000100040e000006030202
-010103f5010102020603010000cb0101008101010059010100c30101005801010600040e
-0600000006020202010103f5010102020603010000cb0101008101010059010100c30101
-0058010006000100040e000006030202010103f5010102020603010000cb010100810101
-0059010100c30101005801010600040e0600000006020202010103f501010202060301ff
-01ff01ce06000100040e000006030202010103f501010202060301ff01ff01cf06000000
-060000000600000006000000060000000600000006000000060000000600000006020202
-010103f5010102020603010000cb0101008101010059010100c301010058010006000100
-040000000600000006000000060000000600000006000000060000000600000006030202
-010103f5010102020603010000cb0101008101010059010100c301010058010106000400
-0600000006080100060004000600000006020202010103f5010102020603010000cb0101
-008101010059010100c30101005801000600010004010600000006080100040000000603
-0202010103f5010102020603010000cb0101008101010059010100c30101005801010600
-040100000608010004010600000006020202010103f5010102020603010000cb01010081
-01010059010100c301010058010006000100040200000606010006000401000006030202
-010103f5010102020603010000cb0101008101010059010100c301010058010106000402
-0600000006040100060004020600000006020202010103f5010102020603010000cb0101
-008101010059010100c30101005801000600010004030600000006040100040200000603
-0202010103f5010102020603010000cb0101008101010059010100c30101005801010600
-040300000604010004030600000006020202010103f5010102020603010000cb01010081
-01010059010100c301010058010006000100040400000602010006000403000006030202
-010103f5010102020603010000cb0101008101010059010100c301010058010106000404
-0600000006000100060004040600000006020202010103f5010102020603010000cb0101
-008101010059010100c30101005801000600010004050600010006000100040400000603
-0202010103f5010102020603010000cb0101008101010059010100c30101005801010600
-040500000600010004050600000006020202010103f5010102020603010000cb01010081
-01010059010100c3010100580100060001000406010006000405000006030202010103f5
-010102020603010000cb0101008101010059010100c30101005801010600040606000406
-0600000006020202010103f5010102020603010000cb0101008101010059010100c30101
-005801000600010006000000060000000600000006000000060000000600000006000000
-0600000006030202010103f5010102020603010000cb0101008101010059010100c30101
-005801010600000006000000060000000600000006000000060000000600000006000000
-0600000006020202010103f5010102020603010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-06000100060001000600010006000100060001000600010006110202010103f501010202
-060201000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006000100060001000600010006000100060001000600010006000100
-060001000600010006120202010103f50101020206030100040d06000400060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-0000040000000600040c0600000006110202010103f501010202060201000600040b0000
-060001000400000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060000000600000006000000060000000600000006000000
-060000000600000006000000060004000600000006000000040a000006120202010103f5
-010102020603010004090600000006000100060004000600000006ff06ff06ac01000400
-00000600000006000000060004080600000006110202010103f501010202060201000600
-0407000006000000060201000400000006ff06ff06ac0100060004000600000006020000
-060000000406000006120202010103f50101020206030100040506000000060000000602
-0100060004000600000006ff06ff06ac0100040000000604000006000000060004040600
-000006110202010103f50101020206020100060004030000060000000606010004000000
-06ff06ff06ac0100060004000600000006060000060000000402000006120202010103f5
-01010202060301000401060000000600000006060100060004000600000006ff06ff06ac
-0100040000000608000006000000060004000600000006110202010103f5010102020602
-01000600010006000100060a01000400000006ff06ff06ac010006000400060000000608
-0100060001000600000006120202010103f5010102020603010004010600010006000100
-06060100060004000600000006ff06ff06ac010004000000060801000600010006000400
-0600000006110202010103f5010102020602010006000403010006000100060601000400
-000006ff06ff06ac01000600040006000000060601000600010004020000061202020101
-03f501010202060301000405060001000600010006020100060004000600000006ff06ff
-06ac0100040000000604010006000100060004040600000006110202010103f501010202
-0602010006000407010006000100060201000400000006ff06ff06ac0100060004000600
-000006020100060001000406000006120202010103f50101020206030100040906000100
-06000100060004000600000006ff06ff06ac010004000000060001000600010006000408
-0600000006110202010103f501010202060201000600040b010006000100040000000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-0100060004000600000006000100040a000006120202010103f5000406030100040d0600
-040006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-010006000100060001000600010006000100060001000600010006000100060001000600
-01000600010006000100040000000600040c060000000611000403f50000020205000602
-010006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000061200000202050003f50000020205000603000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000060000000600
-000006000000060000000600000006000000060000000600000006000000061100000202
-050003f500000202050006ff06ff06e800000202050003f500000202050006ff06ff06e8
-00000202050003f500000202050006ff06ff06e800000202050003f50000020205000005
-02ff02ff02dc00060202050003f500000208050002ff02ff02dc00000208050003f50000
-0208050002ff02ff02dc00000208050003f500000208050001ff01ff01dc000002080500
-03f50000050901ff01ff01dc0000050903ff03ff03ff03ff03ff03ff03ff03d3
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 21 400 186
-%%EOF
diff --git a/lib/tv/doc/src/tv_start_pid_sorted.gif b/lib/tv/doc/src/tv_start_pid_sorted.gif
deleted file mode 100644
index 390f98541f..0000000000
--- a/lib/tv/doc/src/tv_start_pid_sorted.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start_pid_sorted.ps b/lib/tv/doc/src/tv_start_pid_sorted.ps
deleted file mode 100644
index 13ef2ed027..0000000000
--- a/lib/tv/doc/src/tv_start_pid_sorted.ps
+++ /dev/null
@@ -1,1853 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_start_pid_sorted.eps)
-%%CreationDate: (Mon Mar 19 17:15:26 2001)
-%%BoundingBox: 0 0 377 205
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 377 205
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-377.000000 205.000000
-12
-755 410
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-aab6aa
-e7e7e7
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff01ff01dc000b0208040001ff01ff01dc00000208040000000208040002ff02ff
-02dc000002080400000002080400020000ff00ff00d90400020000000208040000000202
-04060200000004ff04ff04d9020000000405020204000000020204000209000d02ff02ff
-02d000000202040000000202040002080000020d040002f6010302110103023801010206
-0101024001010230010102ff020400000202040000000202040002080000020d040002f6
-010102020107020001010203010102010101020e0105020001070201010302070100020b
-01010206010102400101020c0104021e010102ff02040000020204000000020204000208
-0000020d040002f6010102050101020301010203010102010101020e0101020701010203
-01010201010102050101020b010102060101024e010102020101021d010102ff02040000
-0202040000000202040002080000020204060203040002f6010102050101020301010203
-010102010101020e01010207010102030101020801040201010302030101020001010203
-010102020103020301040206010302030101020001010207010102000101020101010203
-010302030101020201010200010102020101020101030202010102000101020101010203
-010302020101020001010201010102020103020201010202010102f30000020204000000
-04030208000002020400030400000203040002f601010205010102040101020201000202
-0101020e0101020701010203010202080101020201010201010102020102020001010202
-010102010101020101010201010102090101020101010202010202000101020601020200
-010202000101020101010201010102020101020201020200010102010101020001010200
-010102020102020001020200010102010101020101010201010102000101020101010201
-010102010101020101010202010102f3000004030101020b000002030400030200000204
-040002f6010102050101020401010201010102020101020e010402040101020401030206
-010102060101020201010201010102020101020101010201010102010102020801010201
-010102020101020101010206010102010101020101010205010102020101020201010201
-010102010101020001010200010102020101020101010201010102050101020101020203
-01010201010102010101020101010202010002f70103020b000002030400030200000204
-040002f6010102050101020501010200010002030101020e010102070101020601020205
-010102030104020201010201010102020101020101050202010302060101020101010202
-010102010101020601010201010102010101020201040202010102020101020101010201
-010102000101020001010202010102010101020101010202010402010101020401010201
-0105020201010200010102f70103020b000002040400030000000205040002f601010205
-01010205010302030101020e010102070101020701010205010102020101020101010202
-010102010101020201010201010102080102020501010201010102020101020101010206
-010102010101020101010201010102010101020201010202010102010101020101010201
-010102000101020101010201010102010101020101010201010102010101020401010201
-0101020601010200010002f80103020b000002040400030000000205040002f601010205
-01010206010102040101020e010102070101020301010201010102050101020201010201
-010102020101020101010202010102010101020201000205010102050101020101010202
-010102010101020601010201010102010101020101010201010102020101020201010201
-010102020101020701010201010102010101020101010201010102010101020401010201
-0101020201000203010202f80103020b0000020500000206040002f60101020501010206
-010102040101020e01050203010102040103020701020201010202000101020101040203
-010102020103020201040207010302030101020101010206010102010101020101010202
-010202000101020101010202010102010101020301050202010102010101020101010202
-0102020001010200010102040101020201030204010102f90103020b0000020d040002f6
-01030211010302c4010102fa0103020b0000020d040002ff02d5010102fa0103020b0000
-020d040002ff02ff02d20103020c040d02ff02ff02d3010302ff02ff02ee010302ff02ff
-02ee0103020200ff00ff00e70400020201030202000004ff04ff04e70202010302ff02ff
-02ee01030202050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050002020103020200000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050001000202010302020500000005ff05ff05e401000500020201030202000005ff05ff
-05e601000202010302020500000005ff05ff05e401000500020201030202000005ff05ff
-05e601000202010302020500000005ff05ff05e4010005000202010302020000050c0604
-0504060005030602051f0600050206000504060005270602050b06000506060005ff05ff
-0535060005020600050906020514010002020103020205000000050b0600050f0600051f
-060005020600052c060005020600050a060005ff05ff053d060005020600050b06000513
-010005000202010302020000050c06000506060205050600050306020518060005020600
-050206020503060205020600050206000517060005020600050106000500060105020604
-050206020503060205020600050006010503060205ff05ff052006000502060005020602
-050506000502060005000601050d010002020103020205000000050b0600050806000505
-060005020600050206000518060005000600050506000502060005020600050106000502
-060005170600050206000501060105010600050306000506060005020600050206000501
-060105010600050106000502060005ff05ff051f06000502060005010600050206000504
-06000502060105010600050b010005000202010302020000050c06030505060005050600
-050206000502060005180600050006000505060005020600050206000501060005000600
-050006000517060005020600050106000502060005030600050606000502060005020600
-05010600050206000501060005ff05ff0523060405010600050206000504060005020600
-05020600050c010002020103020205000000050b06000508060005050600050206040518
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05ff052006000502060005010604050406000502060005020600050b0100050002020103
-02020000050c0600050806000505060005020600051d0600050606000502060005050600
-050006000500060005170600050206000501060005020600050306000506060005020600
-0502060005010600050206000505060005ff05ff051f0600050206000501060005080600
-0502060005020600050c010002020103020205000000050b060005080600050506000502
-060005020600051906000506060005020600050206000501060005000600050006000517
-060005020600050106010501060005030600050606000502060005020600050106000502
-0600050106000502060005ff05ff051f0600050206000501060005020600050406000502
-060105010600050b010005000202010302020000050c0600050806000505060005030602
-051a06000506060005030602050306000500060005190602050206000500060105050601
-050406000503060205020600050206000502060205ff05ff052006000502060005020602
-050506000502060005000601050d0100020201030202050000000576060005ff05ff055b
-0600050f010005000202010302020000050b0606052a0606052a06060500060005ff05ff
-05450606050e06000510010002020103020205000000050a0606052a0606052a06060500
-060005ff05ff05450606050e0600050f01000500020201030202000005ff05ff05e60100
-0202010302020500000005ff05ff05e401000500020201030202000005ff05ff05e60100
-020201030202050000000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050002020103020200000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010002020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff
-05ff05e802020103020205ff05ff05e8020201030202051c01020504010305c101020504
-0103051a0102057f01010505010205f001020504010305190101052f020201030202050e
-01060508010005060101050f010205010102059b01060508010005060101051001050504
-0101054d010205240104050d0101051e0102052401020501010205930106050801000506
-0101051101030535020201030202050e0100050101010500010005070101050601000511
-010105010100059d0100050101010500010005070101050601000513010105060100054d
-0101050001010524010105000101050c0100051e01010500010105240101050101000595
-010005010101050001000507010105060100051101010501010105340202010302020510
-010105030103050201030503010105030103050801020500010105010103050001010500
-01000500010005020103058b010105030103050201030503010105030103050a01010503
-0104054c0101050101050500010305000102050201030501010105000102050701010501
-01010500010305030104051d010105010105050001030500010205020103050101010500
-010205070102050001010501010305000101050001000500010005020103058301010503
-010305020103050301010503010305090101050101000500010305020105050101030521
-020201030202051001010506010105000101050101010502010105020101050101010507
-0100050001000500010005050101050001050500010105010101058a0101050601010500
-010105010101050201010502010105010101050901010502010105010101054c01000502
-010105000101050201000500010205000101050001010501010105010102050001000507
-010105010101050201010502010105010101051d01000502010105000101050201000500
-010205000101050001010501010105010102050001000507010005000100050001000505
-010105000105050001010501010105820101050601010500010105010101050201010502
-010105010101050801020504010105020101050001010501010105010101052002020103
-020205100100050401040500010105010101050201010501010605070100050001020502
-0104050001010500010005000107058a0100050401040500010105010101050201010501
-0106050901010501010105020101054b0101050201000501010105000100050001000500
-01010501010805010101050a0103050401010501010105020101051c0101050201000501
-01010500010005000100050001010501010805010101050a010005000102050201040500
-010105000100050001070582010005040104050001010501010105020101050101060509
-01020503010105040101050101060520020201030202050f010105020101050101010500
-0101050201010501010105020101050b0101050001010501010105010101050101000500
-01000500010005000101058e010105020101050101010500010105020101050101010502
-0101050d01010502010105010101054c0101050101010501010205000100050101000502
-01000500010105050101050a0101050601010502010105010101051d0101050101010501
-01020500010005010100050201000500010105050101050a010105000101050101010501
-010105010100050001000500010005000101058601010502010105010101050001010502
-01010501010105020101050b010105010101050201010503010105030101052502020103
-0202050f0101050201010501010105000101050101010502010105020101050101010507
-01000501010105010101050101010500010105000100050001000500010105010101058a
-010105020101050101010500010105010101050201010502010105010101050901010502
-010105010101054c01010500010105020103050101010501010105000101050101010501
-0101050a0101050601010502010105010101051d01010500010105020103050101010501
-0101050001010501010105010101050a0100050101010501010105010101050001010500
-010005000100050001010501010105820101050201010501010105000101050101010502
-010105020101050101010507010105010101050201010502010205000101050001010501
-01010521020201030202050e01030502010a050101050501010305070102050001010502
-0107050001000500010105000103058a01030502010a0501010505010103050801050501
-0105054c0102050301010500010005000103050001020500010305010104050701030503
-010505010105051d01020503010105000100050001030500010205000103050101040507
-01020500010105020107050001000500010105000103058201030502010a050101050501
-010305090103050101050500010505010103052202020103020205ff05ff05e802020103
-020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103
-020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e802020103
-0202050201ff01ff01e205020202010302020503010000cb0101008101010059010100c3
-010100580101050001000500010005000100050001000500010005000100050001000500
-01000500000005020202010302020503010000cb0101008101010059010100c301010058
-010005000100030601000306000005030202010302020503010000cb010100810101000c
-0100002301000026010100c3010100580101050003050000050003060500000005020202
-0103020205030100001f0100000a0100009e010100810101000b01000004010100090104
-000a01010002010000250101001e0102000501000012010000060100002e010000120102
-0003010200310101000a0100000501010044010005000100030505000100050003050000
-050302020103020205030100001f0100000a0100009e010100810101000a010000040100
-0001010000080100000d0100000101000002010000240101002001000019010000360100
-001401000005010000310101000901010004010000010100004301010500030405000000
-050001000305050000000502020201030202050301000009010200030102000901040002
-01020002010000000101009b01010081010100090100000501000001010000080100000d
-010000010100000301000023010100090102000201000000010100020100000001010005
-01000003010200030102000301020002010400020102000301020002010000000101000a
-010200030102000201000000010100020104000101000000010100030102000501000005
-010000030102000201000000010100230101000801000000010000040100000101000043
-010005000100030400000502010003040000050302020103020205030100000801000002
-01000001010000020100000a010000030100000201000001010100010100009a01010081
-010100080100000601000001010000080103000a01000001010000040100002201010008
-010000020100000101010001010000010101000101000004010000050100000201000002
-010000010100000201000003010000060100000201000002010000010101000101000008
-010000020100000101000002010000010101000101000003010000030101000101000001
-01000002010000040100000501000002010000020100000101010001010000220101000a
-010000040100000101000043010105000303000005020100050003040500000005020202
-0103020205030100000c010000010100000e0100000701000001010000020100009a0101
-00810101000701000007010000010100000c010000090100000101000005010000210101
-000c01000001010000020100000101000002010000040100000501000002010000090100
-000301000006010000020100000201000001010000020100000801000005010000020100
-000101000002010000030100000301000005010000020100000401000005010000020100
-000201000001010000260101000a01000004010000010100004301000500010003030500
-0000050201000500030300000503020201030202050301000009010300010100000e0100
-000401030001010000020100009a010100810101000801000006010000010100000c0100
-000901000001010000040100002201010009010300010100000201000001010000020100
-000401000005010000020100000601030003010000060100000201000002010000010100
-000201000008010000050100000201000001010000020100000301000003010000050100
-000201000004010000050100000201040001010000260101000a01000004010000010100
-004301010500030205000000050401000303050000000502020201030202050301000008
-01000002010000010100000e010000030100000201000001010000020100009a01010081
-010100090100000501000001010000080100000201000009010000010100000301000023
-010100080100000201000001010000020100000101000002010000040100000501000002
-010000050100000201000003010000060100000201000002010000010100000201000008
-010000050100000201000001010000020100000301000003010000050100000201000004
-010000050100000201000005010000260101000a01000004010000010100004301000500
-010003020000050601000302000005030202010302020503010000080100000201000001
-010000020100000a010000030100000201000001010100010100009a010100810101000a
-010000040100000101000003010100020100000201000003010100030100000101000002
-010000240101000801000002010000010101000101000001010100010100000401000005
-010000020100000201000001010000020100000301000006010000020100000201000001
-010000020100000801000002010000010100000201000001010000020100000301000003
-01000005010000020100000401000005010000020100000201000001010000260101000a
-010000040100000101000043010105000301000005060100050003020500000005020202
-01030202050301000009010300020102000c0101000201030001010000000101009b0101
-00810101000b010000040101000401010003010200040101000401010002010000250101
-000901030001010000000101000201000000010100050100000501000003010200030103
-000401010004010000030102000201000002010000090102000301020002010000020100
-000401010001010000060102000501000005010000030102000201000026010100080104
-000301010044010005000100030105000000050601000500030100000503020201030202
-050301000015010500af010100810101000c01000023010000260101000f010000050100
-003c01050068010100580101050003000500000005080100030105000000050202020103
-02020503010000cb01010081010100590101000f01000005010000ab0101005801000500
-010003000000050a01000300000005030202010302020503010000cb0101008101010059
-0101000f01000005010000ab010100580101050000000500010005000100050001000500
-01000500010005000100050003000500000005020202010302020503010000cb01010081
-01010059010100c301010058010005000100050001000500010005000100050001000500
-010005000100050001000500000005030202010302020503010000cb0101008101010059
-010100c30101005801010500030e0500000005020202010302020503010000cb01010081
-01010059010100c301010058010005000100050000000500000005000000050000000500
-000005000000050000000500000005030202010302020503010000cb0101008101010059
-010100c30101005801010500000005000000050000000500000005000000050000000500
-000005000100050000000502020201030202050301ff01ff01ce0500010005000000050a
-0100050000000503020201030202050301ff01ff01cf05000000050c0100050000000502
-0202010302020503010000cb0101008101010059010100c3010100580100050001000500
-0000050a01000500000005030202010302020503010000cb0101008101010059010100c3
-01010058010105000000050c01000500000005020202010302020503010000cb01010081
-0101000c0100002a0100001f010100c30101005801000500010005000000050a01000500
-00000503020201030202050301000010010200090100000d0102000a010200100100007b
-010100810101000b010000040101000b010000050100000c010100020100001e01010010
-010200090100000d010200930101000a0101004b010105000000050c0100050000000502
-020201030202050301000012010000090100000f0100000c010000100100007b01010081
-0101000a010000040100000101000009010100040101000b01000001010000020100001d
-01010012010000090100000f0100009301010009010000010100004a0100050001000500
-0000050a0100050000000503020201030202050301000009010100000100000401000003
-010200020100000001010003010200050100000c01000003010200030102000201000001
-010000030102007101010081010100090100000501000001010000080100000001000003
-010000000100000b01000001010000030100001c01010009010100000100000401000003
-010200020100000001010003010200050100000901000000010100030102000201010000
-010000030102000a01020003010200020100000001010002010000020100000201020002
-010000000101003f01010009010000010100004a010105000000050c0100050000000502
-020201030202050301000008010000010101000401000002010000020100000101010001
-0100000101000002010000040100000c0100000201000002010000010100000201000001
-01000000010000030100000201000070010100810101000801000006010000010100000a
-010000050100000b01000001010000040100001b01010008010000010101000401000002
-010000020100000101010001010000010100000201000004010000090101000101000001
-010000020100000101000000010000000100000101000002010000080100000201000001
-010000020100000101010001010000010100000201000001010000020100000101010001
-0100003e01010009010000010100004a01000500010005000000050a0100050000000503
-020201030202050301000008010000020100000401000002010000020100000101000002
-01000005010000040100000c010000020100000201000001010000050101000401000074
-010100810101000701000007010000010100000a010000050100000b0100000101000005
-0100001a0101000801000002010000040100000201000002010000010100000201000005
-010000040100000901000002010000050100000101000000010000000100000101000002
-010000080100000501000002010000010100000501000002010000010100000201000001
-0100004201010009010000010100004a010105000000050c010005000000050202020103
-020205030100000801000002010000040100000201000002010000010100000201000002
-010300040100000c01000002010000020100000101000005010100050102007101010081
-0101000801000006010000010100000a010000050100000b01000001010000040100001b
-010100080100000201000004010000020100000201000001010000020100000201030004
-010000090100000201000002010300010100000001000000010000010104000901020002
-01040001010000060100000001000002010400010100004201010009010000010100004a
-01000500010005000000050a010005000000050302020103020205030100000801000002
-01000004010000020100000201000001010000020100000101000002010000040100000c
-010000020100000201000001010000050100000001000007010000700101008101010009
-01000005010000010100000a010000050100000b01000001010000030100001c01010008
-010000020100000401000002010000020100000101000002010000010100000201000004
-010000090100000201000001010000020100000101000000010000000100000101000010
-010000010100000501000006010000000100000201000005010000420101000901000001
-0100004a010105000000050c010005000000050202020103020205030100000801000001
-01010004010000020100000201000001010100010100000101000002010000040100000c
-010000020100000201000001010000020100000101000001010000020100000201000070
-010100810101000a01000004010000010100000301010004010000050100000501010003
-01000001010000020100001d010100080100000101010004010000020100000201000001
-010100010100000101000002010000040100000901000002010000010100000201000001
-010000000100000001000001010000020100000801000002010000010100000201000001
-010000070100000301000002010000010100004201010009010000010100004a01000500
-010005000000050a01000500000005030202010302020503010000090101000001000004
-01000003010200020100000001010003010300040100000c010000030102000301020002
-010000020100000201020071010100810101000b01000004010100040101000201040001
-0104000301010004010100020100001e0101000901010000010000040100000301020002
-010000000101000301030004010000090100000201000002010300010100000001000000
-010000020102000a0102000301020002010000070100000401020002010000420101000a
-0101004b010105000000050c010005000000050202020103020205030100000c01000023
-01050093010100810101000c0100002a0100001f0101000c010000230105001c01050068
-0101005801000500010005000000050a0100050000000503020201030202050301000008
-01000002010000bd01010081010100590101000801000002010000b50101005801010500
-0000050c0100050000000502020201030202050301000009010200be0101008101010059
-01010009010200b60101005801000500010005000000050a010005000000050302020103
-02020503010000cb0101008101010059010100c301010058010105000000050c01000500
-000005020202010302020503010000cb0101008101010059010100c30101005801000500
-010005000000050a01000500000005030202010302020503010000cb0101008101010059
-010100c301010058010105000000050c01000500000005020202010302020503010000cb
-0101008101010059010100c30101005801000500010005000000050a0100050000000503
-020201030202050301ff01ff01cf05000000050c01000500000005020202010302020503
-01ff01ff01ce0500010005000000050a01000500000005030202010302020503010000cb
-0101008101010059010100c301010058010105000000050c010005000000050202020103
-02020503010000cb0101008101010059010100c30101005801000500010005000000050a
-01000500000005030202010302020503010000cb010100810101000c0100002a0100001f
-010100c301010058010105000000050c0100050000000502020201030202050301000010
-010200090100000d0102009b010100810101000b010000040101000b010000050100000c
-010100020100001e01010010010200090100000d010200930101000a0101004b01000500
-010005000000050a0100050000000503020201030202050301000012010000090100000f
-0100009b010100810101000a010000040100000101000009010100040101000b01000001
-010000020100001d01010012010000090100000f0100009301010009010000010100004a
-010105000000050c01000500000005020202010302020503010000090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-010100000100000301020003010200710101008101010009010000050100000101000008
-0100000001000003010000000100000b01000001010000030100001c0101000901010000
-010000040100000301020002010000000101000301020005010000090100000001010003
-0102000201010000010000030102000a0102000301020002010000000101000201000002
-0100000201020002010000000101003f01010009010000010100004a0100050001000500
-0000050a0100050000000503020201030202050301000008010000010101000401000002
-010000020100000101010001010000010100000201000004010000090101000101000001
-010000020100000101000000010000000100000101000002010000010100000201000070
-010100810101000801000006010000010100000a010000050100000b0100000101000004
-0100001b0101000801000001010100040100000201000002010000010101000101000001
-010000020100000401000009010100010100000101000002010000010100000001000000
-010000010100000201000008010000020100000101000002010000010101000101000001
-01000002010000010100000201000001010100010100003e01010009010000010100004a
-010105000000050c01000500000005020202010302020503010000080100000201000004
-010000020100000201000001010000020100000501000004010000090100000201000005
-010000010100000001000000010000010100000201000001010000740101008101010007
-01000007010000010100000a010000050100000b01000001010000050100001a01010008
-010000020100000401000002010000020100000101000002010000050100000401000009
-010000020100000501000001010000000100000001000001010000020100000801000005
-010000020100000101000005010000020100000101000002010000010100004201010009
-010000010100004a01000500010005000000050a01000500000005030202010302020503
-010000080100000201000004010000020100000201000001010000020100000201030004
-010000090100000201000002010300010100000001000000010000010104000201020071
-010100810101000801000006010000010100000a010000050100000b0100000101000004
-0100001b0101000801000002010000040100000201000002010000010100000201000002
-010300040100000901000002010000020103000101000000010000000100000101040009
-010200020104000101000006010000000100000201040001010000420101000901000001
-0100004a010105000000050c010005000000050202020103020205030100000801000002
-010000040100000201000002010000010100000201000001010000020100000401000009
-010000020100000101000002010000010100000001000000010000010100000901000070
-010100810101000901000005010000010100000a010000050100000b0100000101000003
-0100001c0101000801000002010000040100000201000002010000010100000201000001
-010000020100000401000009010000020100000101000002010000010100000001000000
-010000010100001001000001010000050100000601000000010000020100000501000042
-01010009010000010100004a01000500010005000000050a010005000000050302020103
-020205030100000801000001010100040100000201000002010000010101000101000001
-010000020100000401000009010000020100000101000002010000010100000001000000
-0100000101000002010000010100000201000070010100810101000a0100000401000001
-010000030101000401000005010000050101000301000001010000020100001d01010008
-010000010101000401000002010000020100000101010001010000010100000201000004
-010000090100000201000001010000020100000101000000010000000100000101000002
-010000080100000201000001010000020100000101000007010000030100000201000001
-0100004201010009010000010100004a010105000000050c010005000000050202020103
-020205030100000901010000010000040100000301020002010000000101000301030004
-010000090100000201000002010300010100000001000000010000020102000301020071
-010100810101000b01000004010100040101000201040001010400030101000401010002
-0100001e0101000901010000010000040100000301020002010000000101000301030004
-010000090100000201000002010300010100000001000000010000020102000a01020003
-01020002010000070100000401020002010000420101000a0101004b0100050001000500
-0000050a010005000000050302020103020205030100000c010000230105009301010081
-0101000c0100002a0100001f0101000c010000230105001c010500680101005801010500
-0000050c010005000000050202020103020205030100000801000002010000bd01010081
-010100590101000801000002010000b50101005801000500010005000000050a01000500
-00000503020201030202050301000009010200be010100810101005901010009010200b6
-01010058010105000000050c01000500000005020202010302020503010000cb01010081
-01010059010100c30101005801000500010005000000050a010005000000050302020103
-02020503010000cb0101008101010059010100c301010058010105000000050c01000500
-000005020202010302020503010000cb0101008101010059010100c30101005801000500
-010005000000050a01000500000005030202010302020503010000cb0101008101010059
-010100c301010058010105000000050c0100050000000502020201030202050301ff01ff
-01ce0500010005000000050a0100050000000503020201030202050301ff01ff01cf0500
-0000050c01000500000005020202010302020503010000cb0101008101010059010100c3
-0101005801000500010005000000050a01000500000005030202010302020503010000cb
-0101008101010059010100c301010058010105000000050c010005000000050202020103
-02020503010000cb010100810101000c0100002a0100001f010100c30101005801000500
-010005000000050a0100050000000503020201030202050301000010010200090100000d
-0102004301000056010100810101000b010000040101000b010000050100000c01010002
-0100001e01010010010200090100000d010200930101000a0101004b010105000000050c
-0100050000000502020201030202050301000012010000090100000f0100004301000056
-010100810101000a010000040100000101000009010100040101000b0100000101000002
-0100001d01010012010000090100000f0100009301010009010000010100004a01000500
-010005000000050a01000500000005030202010302020503010000090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-0101000001000003010200030102000a0102000201000002010000010104005401010081
-010100090100000501000001010000080100000001000003010000000100000b01000001
-010000030100001c01010009010100000100000401000003010200020100000001010003
-010200050100000901000000010100030102000201010000010000030102000a01020003
-010200020100000001010002010000020100000201020002010000000101003f01010009
-010000010100004a010105000000050c0100050000000502020201030202050301000008
-010000010101000401000002010000020100000101010001010000010100000201000004
-010000090101000101000001010000020100000101000000010000000100000101000002
-010000010100000201000008010000020100000101000002010000030100005601010081
-0101000801000006010000010100000a010000050100000b01000001010000040100001b
-010100080100000101010004010000020100000201000001010100010100000101000002
-010000040100000901010001010000010100000201000001010000000100000001000001
-010000020100000801000002010000010100000201000001010100010100000101000002
-010000010100000201000001010100010100003e01010009010000010100004a01000500
-010005000000050a01000500000005030202010302020503010000080100000201000004
-010000020100000201000001010000020100000501000004010000090100000201000005
-0100000101000000010000000100000101000002010000010100000c0100000201000002
-010000000100000401000056010100810101000701000007010000010100000a01000005
-0100000b01000001010000050100001a0101000801000002010000040100000201000002
-010000010100000201000005010000040100000901000002010000050100000101000000
-010000000100000101000002010000080100000501000002010000010100000501000002
-0100000101000002010000010100004201010009010000010100004a010105000000050c
-010005000000050202020103020205030100000801000002010000040100000201000002
-010000010100000201000002010300040100000901000002010000020103000101000000
-010000000100000101040002010200090104000301000005010000560101008101010008
-01000006010000010100000a010000050100000b01000001010000040100001b01010008
-010000020100000401000002010000020100000101000002010000020103000401000009
-010000020100000201030001010000000100000001000001010400090102000201040001
-010000060100000001000002010400010100004201010009010000010100004a01000500
-010005000000050a01000500000005030202010302020503010000080100000201000004
-010000020100000201000001010000020100000101000002010000040100000901000002
-010000010100000201000001010000000100000001000001010000090100000801000006
-010000000100000401000056010100810101000901000005010000010100000a01000005
-0100000b01000001010000030100001c0101000801000002010000040100000201000002
-010000010100000201000001010000020100000401000009010000020100000101000002
-010000010100000001000000010000010100001001000001010000050100000601000000
-01000002010000050100004201010009010000010100004a010105000000050c01000500
-000005020202010302020503010000080100000101010004010000020100000201000001
-010100010100000101000002010000040100000901000002010000010100000201000001
-010000000100000001000001010000020100000101000002010000080100000201000001
-010000020100000301000056010100810101000a01000004010000010100000301010004
-01000005010000050101000301000001010000020100001d010100080100000101010004
-010000020100000201000001010100010100000101000002010000040100000901000002
-010000010100000201000001010000000100000001000001010000020100000801000002
-010000010100000201000001010000070100000301000002010000010100004201010009
-010000010100004a01000500010005000000050a01000500000005030202010302020503
-010000090101000001000004010000030102000201000000010100030103000401000009
-010000020100000201030001010000000100000001000002010200030102000a01020002
-010000020100000401010054010100810101000b01000004010100040101000201040001
-0104000301010004010100020100001e0101000901010000010000040100000301020002
-010000000101000301030004010000090100000201000002010300010100000001000000
-010000020102000a0102000301020002010000070100000401020002010000420101000a
-0101004b010105000000050c010005000000050202020103020205030100000c01000023
-0105002301050069010100810101000c0100002a0100001f0101000c010000230105001c
-010500680101005801000500010005000000050a01000500000005030202010302020503
-0100000801000002010000bd01010081010100590101000801000002010000b501010058
-010105000000050c0100050000000502020201030202050301000009010200be01010081
-0101005901010009010200b60101005801000500010005000000050a0100050000000503
-0202010302020503010000cb0101008101010059010100c301010058010105000000050c
-01000500000005020202010302020503010000cb0101008101010059010100c301010058
-01000500010005000000050a01000500000005030202010302020503010000cb01010081
-01010059010100c301010058010105000000050c01000500000005020202010302020503
-010000cb0101008101010059010100c30101005801000500010005000000050a01000500
-00000503020201030202050301ff01ff01cf05000000050c010005000000050202020103
-0202050301ff01ff01ce0500010005000000050a01000500000005030202010302020503
-010000cb0101008101010059010100c301010058010105000000050c0100050000000502
-0202010302020503010000cb0101008101010059010100c3010100580100050001000500
-0000050a01000500000005030202010302020503010000cb010100810101000c0100002a
-0100001f010100c301010058010105000000050c01000500000005020202010302020503
-0100000b010000120100001f01000089010100810101000b010000040101000b01000004
-0102000b010100020100001e0101000b010000120100000e010000010100008f0101000a
-0101004b01000500010005000000050a010005000000050302020103020205030100001f
-0100001f01000089010100810101000a0100000401000001010000090101000301000002
-0100000901000001010000020100001d0101001f0100000e010000010100008f01010009
-010000010100004a010105000000050c0100050000000502020201030202050301000009
-010200020100000001010003010200020104000901020003010200030102000201000000
-010100030102007f01010081010100090100000501000001010000080100000001000007
-0100000901000001010000030100001c0101000901020002010000000101000301020002
-010400090101000001000001010000000101008c01010009010000010100004a01000500
-010005000000050a010005000000050302020103020205030100000b0100000201010001
-0100000101000002010000030100000a0100000201000001010000020100000101000002
-010000010101000101000001010000020100007e01010081010100080100000601000001
-0100000a010000070100000901000001010000040100001b0101000b0100000201010001
-0100000101000002010000030100000a0100000101010001010100010100008b01010009
-010000010100004a010105000000050c010005000000050202020103020205030100000b
-01000002010000020100000101000002010000030100000a010000090100000101000005
-0100000201000001010000020100007e010100810101000701000007010000010100000a
-010000060100000a01000001010000050100001a0101000b010000020100000201000001
-01000002010000030100000a0100000201000001010000020100008b0101000901000001
-0100004a01000500010005000000050a010005000000050302020103020205030100000b
-010000020100000201000001010400030100000a01000006010300010100000501000002
-010000010104007e010100810101000801000006010000010100000a010000050100000b
-01000001010000040100001b0101000b010000020100000201000001010400030100000a
-0100000201000001010000020100008b01010009010000010100004a010105000000050c
-010005000000050202020103020205030100000b01000002010000020100000101000007
-0100000a0100000501000002010000010100000501000002010000010100008201010081
-0101000901000005010000010100000a010000040100000c01000001010000030100001c
-0101000b010000020100000201000001010000070100000a010000020100000101000002
-0100008b01010009010000010100004a01000500010005000000050a0100050000000503
-02020103020205030100000b01000002010000020100000101000002010000030100000a
-010000020100000101000002010000010100000201000001010000020100000101000002
-0100007e010100810101000a010000040100000101000003010100040100000301000007
-0101000301000001010000020100001d0101000b01000002010000020100000101000002
-010000030100000a0100000101010001010100010100008b01010009010000010100004a
-010105000000050c010005000000050202020103020205030100000b0100000201000002
-01000002010200050101000901020003010300020102000201000002010000020102007f
-010100810101000b01000004010100040101000201040001010400030101000401010002
-0100001e0101000b01000002010000020100000201020005010100090101000001000001
-010000000101008c0101000a0101004b01000500010005000000050a0100050000000503
-020201030202050301000023010500a1010100810101000c0100002a0100001f01010023
-0105009901010058010105000000050c01000500000005020202010302020503010000cb
-0101008101010059010100c30101005801000500010005000000050a0100050000000503
-0202010302020503010000cb0101008101010059010100c301010058010105000000050c
-01000500000005020202010302020503010000cb0101008101010059010100c301010058
-01000500010005000000050a01000500000005030202010302020503010000cb01010081
-01010059010100c301010058010105000000050c01000500000005020202010302020503
-010000cb0101008101010059010100c30101005801000500010005000000050a01000500
-000005030202010302020503010000cb0101008101010059010100c30101005801010500
-0000050c0100050000000502020201030202050301ff01ff01ce0500010005000000050a
-0100050000000503020201030202050301ff01ff01cf05000000050c0100050000000502
-0202010302020503010000cb0101008101010059010100c3010100580100050001000500
-0000050a01000500000005030202010302020503010000cb0101008101010059010100c3
-01010058010105000000050c01000500000005020202010302020503010000cb01010081
-0101000c0100002a0100001f010100c30101005801000500010005000000050a01000500
-0000050302020103020205030100000b010000120100000e010000010100009701010081
-0101000b010000040101000b010000040102000b010100020100001e0101000b01000012
-0100000e010000010100008f0101000a0100000401020044010105000000050c01000500
-0000050202020103020205030100001f0100000e0100000101000097010100810101000a
-01000004010000010100000901010003010000020100000901000001010000020100001d
-0101001f0100000e010000010100008f0101000901010003010000020100004301000500
-010005000000050a01000500000005030202010302020503010000090102000201000000
-010100030102000201040009010100000100000101000000010100940101008101010009
-01000005010000010100000801000000010000070100000901000001010000030100001c
-010100090102000201000000010100030102000201040009010100000100000101000000
-0101008c0101000801000000010000030100000201000043010105000000050c01000500
-0000050202020103020205030100000b0100000201010001010000010100000201000003
-0100000a0100000101010001010100010100009301010081010100080100000601000001
-0100000a010000070100000901000001010000040100001b0101000b0100000201010001
-0100000101000002010000030100000a0100000101010001010100010100008b0101000a
-01000003010000020100004301000500010005000000050a010005000000050302020103
-020205030100000b01000002010000020100000101000002010000030100000a01000002
-010000010100000201000093010100810101000701000007010000010100000a01000006
-0100000a01000001010000050100001a0101000b01000002010000020100000101000002
-010000030100000a0100000201000001010000020100008b0101000a0100000401030043
-010105000000050c010005000000050202020103020205030100000b0100000201000002
-01000001010400030100000a010000020100000101000002010000930101008101010008
-01000006010000010100000a010000050100000b01000001010000040100001b0101000b
-010000020100000201000001010400030100000a0100000201000001010000020100008b
-0101000a010000070100004301000500010005000000050a010005000000050302020103
-020205030100000b010000020100000201000001010000070100000a0100000201000001
-0100000201000093010100810101000901000005010000010100000a010000040100000c
-01000001010000030100001c0101000b010000020100000201000001010000070100000a
-0100000201000001010000020100008b0101000a0100000701000043010105000000050c
-010005000000050202020103020205030100000b01000002010000020100000101000002
-010000030100000a01000001010100010101000101000093010100810101000a01000004
-01000001010000030101000401000003010000070101000301000001010000020100001d
-0101000b01000002010000020100000101000002010000030100000a0100000101010001
-010100010100008b0101000a01000003010000020100004301000500010005000000050a
-010005000000050302020103020205030100000b01000002010000020100000201020005
-0101000901010000010000010100000001010094010100810101000b0100000401010004
-01010002010400010104000301010004010100020100001e0101000b0100000201000002
-0100000201020005010100090101000001000001010000000101008c0101000801040002
-01020044010105000000050c0100050000000502020201030202050301000023010500a1
-010100810101000c0100002a0100001f0101002301050099010100580100050001000500
-0000050a01000500000005030202010302020503010000cb0101008101010059010100c3
-01010058010105000000050c01000500000005020202010302020503010000cb01010081
-01010059010100c30101005801000500010005000000050a010005000000050302020103
-02020503010000cb0101008101010059010100c301010058010105000000050c01000500
-000005020202010302020503010000cb0101008101010059010100c30101005801000500
-010005000000050a01000500000005030202010302020503010000cb0101008101010059
-010100c301010058010105000000050c01000500000005020202010302020503010000cb
-0101008101010059010100c30101005801000500010005000000050a0100050000000503
-020201030202050301ff01ff01cf05000000050c01000500000005020202010302020503
-01ff01ff01ce0500010005000000050a01000500000005030202010302020503010000cb
-0101008101010059010100c301010058010105000000050c010005000000050202020103
-02020503010000cb0101008101010059010100c30101005801000500010005000000050a
-01000500000005030202010302020503010000cb010100810101000c0100002a0100001f
-010100c301010058010105000000050c010005000000050202020103020205030100000b
-010000120100000a0100001501000087010100810101000b010000040101000b01000004
-0102000b010100020100001e0101000b010000120100000e010000010100008f0101000c
-0100004a01000500010005000000050a010005000000050302020103020205030100001f
-0100000a0100001501000087010100810101000a01000004010000010100000901010003
-010000020100000901000001010000020100001d0101001f0100000e010000010100008f
-0101000b0101004a010105000000050c0100050000000502020201030202050301000009
-010200020100000001010003010200020104000801000000010100030102000301020002
-010400020102007f01010081010100090100000501000001010000080100000001000007
-0100000901000001010000030100001c0101000901020002010000000101000301020002
-010400090101000001000001010000000101008c0101000a010000000100004a01000500
-010005000000050001000500010005000100050001000500010005000100050000000503
-02020103020205030100000b01000002010100010100000101000002010000030100000a
-01010001010000010100000201000001010000020100000301000003010000020100007e
-010100810101000801000006010000010100000a01000007010000090100000101000004
-0100001b0101000b01000002010100010100000101000002010000030100000a01000001
-01010001010100010100008b01010009010000010100004a010105000000050001000500
-010005000100050001000500010005000100050001000500000005020202010302020503
-0100000b01000002010000020100000101000002010000030100000a0100000201000001
-010000020100000101000007010000030100008201010081010100070100000701000001
-0100000a010000060100000a01000001010000050100001a0101000b0100000201000002
-0100000101000002010000030100000a0100000201000001010000020100008b01010008
-010000020100004a010005000100030e0000050302020103020205030100000b01000002
-0100000201000001010400030100000a0100000201000001010000020100000201020004
-010000040102007f010100810101000801000006010000010100000a010000050100000b
-01000001010000040100001b0101000b010000020100000201000001010400030100000a
-0100000201000001010000020100008b01010008010000020100004a01010500030e0500
-0000050202020103020205030100000b010000020100000201000001010000070100000a
-0100000201000001010000020100000501000003010000070100007e0101008101010009
-01000005010000010100000a010000040100000c01000001010000030100001c0101000b
-010000020100000201000001010000070100000a0100000201000001010000020100008b
-0101000801050049010005000100030e0000050302020103020205030100000b01000002
-010000020100000101000002010000030100000a01000002010000010100000201000001
-010000020100000301000003010000020100007e010100810101000a0100000401000001
-010000030101000401000003010000070101000301000001010000020100001d0101000b
-01000002010000020100000101000002010000030100000a010000010101000101010001
-0100008b0101000c0100004a01010500030e05000000050202020103020205030100000b
-010000020100000201000002010200050101000801000002010000020102000301020005
-010100020102007f010100810101000b0100000401010004010100020104000101040003
-01010004010100020100001e0101000b0100000201000002010000020102000501010009
-0101000001000001010000000101008c0101000c0100004a010005000100030e00000503
-020201030202050301000023010500a1010100810101000c0100002a0100001f01010023
-010500990101005801010500030e0500000005020202010302020503010000cb01010081
-01010059010100c301010058010005000100030e000005030202010302020503010000cb
-0101008101010059010100c30101005801010500030e0500000005020202010302020503
-010000cb0101008101010059010100c301010058010005000100030e0000050302020103
-02020503010000cb0101008101010059010100c30101005801010500030e050000000502
-0202010302020503010000cb0101008101010059010100c301010058010005000100030e
-000005030202010302020503010000cb0101008101010059010100c30101005801010500
-030e050000000502020201030202050301ff01ff01ce05000100030e0000050302020103
-0202050307cd01ff01ff01010500030e0500000005020202010302020503070008cb0700
-0100088101010859010108c301010858010005000100030e000005030202010302020503
-070008cb07000100080b010108470101082901010859010108c30101085801010500030e
-0500000005020202010302020503070008cb07000100080a010008150100082a01000808
-010008280101080c0100082a0100081f010108c301010858010005000100030e00000503
-02020103020205030700081d07000808070008a207000100080a010008040102080c0100
-08040101080b010008030104080a0101080201000807010008280101080b010008040101
-080b010008030104080a010108020100081e010108180100080a01000822010208770101
-080a0100084c01010500030e05000000050202020103020205030700081d070008ac0700
-0100080a01000803010008020100080a0100080401000801010008090101080301000802
-01000809010008010100080201000806010008280101080a010008040100080101000809
-01010803010008020100080901000801010008020100081d010108180100080a01000824
-01000877010108090101084c010005000100030e00000503020201030202050307000809
-070208030702080307020802070008010700080307020803070208030702089407000100
-080a01000803010008020100080901000805010008010100080801000800010008070100
-080901000801010008030100080501000828010108090100080501000801010008080100
-0800010008070100080901000801010008030100081c0101080801000800010108030102
-080201040808010008010100080301020802010008000101080201000800010108030102
-08050100087701010808010008000100084c01010500030e050000000502020201030202
-050307000808070008020700080107000802070008010700080207000801070008000700
-0806070008020700080207000801070008020700089307000100080a0100080301000802
-0100080801000806010008010100080a010008060100080a010008010100080401000804
-010008280101080801000806010008010100080a010008060100080a0100080101000804
-0100081b01010808010108010100080101000802010008030100080a0100080001000803
-010008020100080101010801010008010101080101000801010008020100080401000877
-0101080a0100084c010005000100030e0000050302020103020205030700080807000805
-070008020700080107000802070008010701080707000802070008020700080107000897
-070001000808010108050102080801000807010008010100080a010008060100080a0100
-08010100080501000804010108260101080701000807010008010100080a010008060100
-080a01000801010008050100081a01010808010008020100080101000802010008030100
-080a01010804010008020100080101000805010008020100080101000802010008040100
-08770101080a0100084c01010500030e0500000005020202010302020503070008080700
-080507000802070008010700080207000801070108070700080207040802070208940700
-0100080a01000803010008020100080801000806010008010100080a010008060100080a
-010008010100080401000804010008280101080801000806010008010100080a01000806
-0100080a01000801010008040100081b010108080100080201000801010408030100080a
-010108040104080101000805010008020100080101040804010008770101080a0100084c
-010005000100030e00000503020201030202050307000808070008050700080207000801
-0700080207000801070008000700080607000802070008090700089307000100080a0100
-0803010008020100080901000805010008010100080a010008050100080b010008010100
-080301000805010008280101080901000805010008010100080a010008050100080b0100
-0801010008030100081c010108080100080201000801010008070100080a010008000100
-08030100080501000805010008020100080101000808010008770101080a0100084c0101
-0500030e0500000005020202010302020503070008080700080207000801070008020700
-080107000802070008010700080107000805070008020700080207000801070008020700
-089307000100080a01000803010008020100080301010804010008040100080101000803
-01010804010008050100080501010803010008010100080201000806010008280101080a
-010008040100080101000803010108040100080501000805010108030100080101000802
-0100081d01010808010008020100080101000802010008030100080a0100080101000802
-01000802010008010100080501000802010008010100080201000804010008770101080a
-0100084c010005000100030e000005030202010302020503070008090702080307020803
-07020802070008020700080407000803070208030702089407000100080a010008040102
-080401010805010008040101080401010802010408030100080501010804010108020100
-0807010008280101080b0100080401010804010108020104080301000805010108040101
-08020100081e010108080100080201000802010208050101080801000802010008020102
-08020100080501000802010008020102080501000877010108080104084a01010500030e
-0500000005020202010302020503070008cb07000100080a0100080d010008060100082a
-01000808010008280101080c0100082a0100081f0101081c010508a00101085801000500
-0100030e000005030202010302020503070008cb07000100080b010108090101083b0101
-082901010859010108c30101085801010500030e05000000050202020103020205030700
-08cb07000100088101010859010108c301010858010005000100030e0000050302020103
-02020503070008cb07000100088101010859010108c30101085801010500030e05000000
-05020202010302020503070008cb07000100088101010859010108c30101085801000500
-0100030e000005030202010302020503070008cb07000100088101010859010108c30101
-085801010500030e0500000005020202010302020503070008cb07000100088101010859
-010108c301010858010005000100030e00000503020201030202050307cd01ff01ff0101
-0500030e050000000502020201030202050301ff01ff01ce05000100030e000005030202
-010302020503010000cb0101008101010059010100c30101005801010500030e05000000
-05020202010302020503010000cb0101008101010059010100c301010058010005000100
-030e000005030202010302020503010000cb010100810101000c0100002a0100001f0101
-00c30101005801010500030e050000000502020201030202050301000028010000040100
-000b0100008e010100810101000b010000040101000b010000030104000a010100020100
-001e010100180100000a01000022010200770101000a0101004b010005000100030e0000
-0503020201030202050301000028010000110100008e010100810101000a010000040100
-00010100000901010003010000020100000901000001010000020100001d010100180100
-000a010000240100007701010009010000010100004a01010500030e0500000005020202
-010302020503010000090102000201000002010000020102000a01010000010000020102
-0003010200020104008c0101008101010009010000050100000101000008010000000100
-00070100000901000001010000030100001c010100080100000001010003010200020104
-000801000001010000030102000201000000010100020100000001010003010200050100
-007701010009010000010100004a010005000100030e0000050302020103020205030100
-000801000002010000010100000201000001010000020100000801000001010100040100
-000201000002010000030100008e010100810101000801000006010000010100000a0100
-00060100000a01000001010000040100001b010100080101000101000001010000020100
-00030100000a010000000100000301000002010000010101000101000001010100010100
-000101000002010000040100007701010009010000010100004a01010500030e05000000
-05020202010302020503010000080100000601000001010000010100000c010000020100
-000401000002010000070100008e010100810101000701000007010000010100000a0100
-00060100000a01000001010000050100001a010100080100000201000001010000020100
-00030100000a010100040100000201000001010000050100000201000001010000020100
-00040100007701010009010000010100004a010005000100030e00000503020201030202
-050301000009010200030100000101000002010200090100000201000004010000030102
-00040100008e010100810101000801000006010000010100000a010000060100000a0100
-0001010000040100001b010100080100000201000001010400030100000a010100040104
-0001010000050100000201000001010400040100007701010009010000010100004a0101
-0500030e05000000050202020103020205030100000c0100000301000000010000050100
-0008010000020100000401000006010000030100008e0101008101010009010000050100
-00010100000a010000050100000b01000001010000030100001c01010008010000020100
-0001010000070100000a0100000001000003010000050100000501000002010000010100
-00080100007701010009010000010100004a010005000100030e00000503020201030202
-050301000008010000020100000301010002010000020100000801000001010100040100
-000201000002010000030100008e010100810101000a0100000401000001010000030101
-000401000005010000050101000301000001010000020100001d01010008010000020100
-000101000002010000030100000a01000001010000020100000201000001010000050100
-00020100000101000002010000040100007701010009010000010100004a01010500030e
-05000000050202020103020205030100000901020005010000030102000a010100000100
-000401000003010200050101008c010100810101000b0100000401010004010100020104
-00030100000501010004010100020100001e010100080100000201000002010200050101
-000801000002010000020102000201000005010000020100000201020005010000770101
-000a0101004b010005000100030e00000503020201030202050301000012010000080105
-00a8010100810101000c0100002a0100001f0101001c010500a00101005801010500030e
-05000000050202020103020205030100000f01000000010000b801010081010100590101
-00c301010058010005000100030e00000503020201030202050301000010010000b90101
-008101010059010100c30101005801010500030e05000000050202020103020205030100
-00cb0101008101010059010100c301010058010005000100030e00000503020201030202
-0503010000cb0101008101010059010100c30101005801010500030e0500000005020202
-010302020503010000cb0101008101010059010100c301010058010005000100030e0000
-05030202010302020503010000cb0101008101010059010100c30101005801010500030e
-050000000502020201030202050301ff01ff01ce05000100030e00000503020201030202
-050307cd01ff01ff01010500030e0500000005020202010302020503070008cb07000100
-088101010859010108c301010858010005000100030e0000050302020103020205030700
-08cb07000100080b0101084e0101082201010859010108c30101085801010500030e0500
-000005020202010302020503070008cb07000100080a0100081c0100082a010008080100
-08210101080c0100082a0100081f010108c301010858010005000100030e000005030202
-0103020205030700081a070008af07000100080a01000805010008050101080c01000804
-0101080a010208020104080a0101080201000807010008210101080b010008040101080a
-010208020104080a010108020100081e0101081a010008a7010108090102080201040802
-0102083d01010500030e05000000050202020103020205030700081a070008af07000100
-080a0100080401010804010008010100080a010008040100080101000808010008020100
-08010100080201000809010008010100080201000806010008210101080a010008040100
-0801010008080100080201000801010008020100080901000801010008020100081d0101
-081a010008a701010808010008020100080101000805010008020100083c010005000100
-030e00000503020201030202050307000809070208030702080307010800070008020702
-08a907000100080a01000803010008000100080401000801010008090100080501000801
-0100080c0100080501000809010008010100080301000805010008210101080901000805
-010008010100080c010008050100080901000801010008030100081c0101080901020803
-0102080301010800010008020102080a0102080301020802010008000101080201000802
-010008020102080201000800010108700101080c01000801010008090100083c01010500
-030e05000000050202020103020205030700080807000802070008010700080207000801
-070008010701080107000802070008a807000100080a0100080501000804010008010100
-080801000806010008010100080c010008040100080a0100080101000804010008040100
-08210101080801000806010008010100080c010008040100080a01000801010008040100
-081b01010808010008020100080101000802010008010100080101010801010008020100
-080801000802010008010100080201000801010108010100080101000802010008010100
-080201000801010108010100086f0101080c01000801010308060100083c010005000100
-030e00000503020201030202050307000808070008050700080207000801070008020700
-080107000802070008a80700010008080101080601000804010008010100080701000807
-010008010100080b010008050100080a0100080101000805010008040101081f01010807
-01000807010008010100080b010008050100080a01000801010008050100081a01010808
-010008050100080201000801010008020100080101000802010008080100080501000802
-010008010100080501000802010008010100080201000801010008730101080b01000806
-010008040100083d01010500030e05000000050202020103020205030700080807000805
-07000802070008010700080207000801070408a807000100080a01000805010008040100
-08010100080801000806010008010100080a010008060100080a01000801010008040100
-0804010008210101080801000806010008010100080a010008060100080a010008010100
-08040100081b010108080100080501000802010008010100080201000801010408090102
-08020104080101000806010008000100080201040801010008730101080a010008070100
-08030100083e010005000100030e00000503020201030202050307000808070008050700
-0802070008010700080207000801070008ac07000100080a010008050100080401000801
-01000809010008050100080101000809010008060100080b010008010100080301000805
-0100082101010809010008050100080101000809010008060100080b0100080101000803
-0100081c0101080801000805010008020100080101000802010008010100081001000801
-010008050100080601000800010008020100080501000873010108090100080401000802
-010008020100083f01010500030e05000000050202020103020205030700080807000802
-070008010700080207000801070008010701080107000802070008a807000100080a0100
-080501000804010008010100080301010804010008040100080101000803010108020100
-08070100080501010803010008010100080201000806010008210101080a010008040100
-0801010008030101080201000807010008050101080301000801010008020100081d0101
-080801000802010008010100080201000801010008010101080101000802010008080100
-080201000801010008020100080101000807010008030100080201000801010008730101
-080801000805010008020100080101000840010005000100030e00000503020201030202
-05030700080907020803070208030701080007000802070208a907000100080a01000803
-010408030101080401010805010008040101080401010802010408030100080501010804
-0101080201000807010008210101080b0100080401010804010108020104080301000805
-01010804010108020100081e01010809010208030102080301010800010008020102080a
-010208030102080201000807010008040102080201000873010108080104080201020802
-0104083c01010500030e0500000005020202010302020503070008cb07000100080a0100
-0814010008060100082a01000808010008210101080c0100082a0100081f010108230105
-089901010858010005000100030e000005030202010302020503070008cb07000100080b
-010108100101083b0101082201010859010108c30101085801010500030e050000000502
-0202010302020503070008cb07000100088101010859010108c301010858010005000100
-030e000005030202010302020503070008cb07000100088101010859010108c301010858
-01010500030e0500000005020202010302020503070008cb070001000881010108590101
-08c301010858010005000100030e000005030202010302020503070008cb070001000881
-01010859010108c30101085801010500030e0500000005020202010302020503070008cb
-07000100088101010859010108c301010858010005000100030e00000503020201030202
-050307cd01ff01ff01010500030e050000000502020201030202050307cd01ff01ff0100
-05000100030e000005030202010302020503070008cb07000100088101010859010108c3
-0101085801010500030e0500000005020202010302020503070008cb07000100080b0101
-084e0101082201010859010108c301010858010005000100030e00000503020201030202
-0503070008cb07000100080a0100081c0100082a01000808010008210101080c0100082a
-0100081f010108c30101085801010500030e05000000050202020103020205030700081a
-070008af07000100080a01000805010008050100080d010008040101080a010208020104
-080a0101080201000807010008210101080b010008040101080a010208020104080a0101
-08020100081e0101081a010008a7010108090102080301020844010005000100030e0000
-050302020103020205030700081a070008af07000100080a01000804010108040101080c
-010008040100080101000808010008020100080101000802010008090100080101000802
-01000806010008210101080a010008040100080101000808010008020100080101000802
-0100080901000801010008020100081d0101081a010008a7010108080100080201000801
-010008020100084301010500030e05000000050202020103020205030700080907020803
-070208030701080007000802070208090700080007010803070208020701080007000803
-070208030702087f07000100080a010008030100080001000803010008000100080b0100
-0805010008010100080c0100080501000809010008010100080301000805010008210101
-080901000805010008010100080c010008050100080901000801010008030100081c0101
-0809010208030102080301010800010008020102080a0102080301020802010008000101
-080201000802010008020102080201000800010108700101080c01000805010008430100
-05000100030e000005030202010302020503070008080700080207000801070008020700
-080107000801070108010700080207000808070108010700080107000802070008010700
-080007000800070008010700080207000801070008020700087e07000100080a01000805
-010008050100080a01000806010008010100080c010008040100080a0100080101000804
-01000804010008210101080801000806010008010100080c010008040100080a01000801
-010008040100081b01010808010008020100080101000802010008010100080101010801
-010008020100080801000802010008010100080201000801010108010100080101000802
-010008010100080201000801010108010100086f0101080c010008050100084301010500
-030e05000000050202020103020205030700080807000805070008020700080107000802
-070008010700080207000808070008020700080507000801070008000700080007000801
-070008020700080107000882070001000808010108060100080501000809010008070100
-08010100080b010008050100080a0100080101000805010008040101081f010108070100
-0807010008010100080b010008050100080a01000801010008050100081a010108080100
-080501000802010008010100080201000801010008020100080801000805010008020100
-08010100080501000802010008010100080201000801010008730101080a010108040101
-0844010005000100030e0000050302020103020205030700080807000805070008020700
-080107000802070008010704080807000802070008020703080107000800070008000700
-0801070408020702087f07000100080a01000805010008050100080a0100080601000801
-0100080a010008060100080a010008010100080401000804010008210101080801000806
-010008010100080a010008060100080a01000801010008040100081b0101080801000805
-010008020100080101000802010008010104080901020802010408010100080601000800
-0100080201040801010008730101080c010008050100084301010500030e050000000502
-02020103020205030700080807000805070008020700080107000802070008010700080c
-07000802070008010700080207000801070008000700080007000801070008090700087e
-07000100080a01000805010008050100080b010008050100080101000809010008060100
-080b01000801010008030100080501000821010108090100080501000801010008090100
-08060100080b01000801010008030100081c010108080100080501000802010008010100
-080201000801010008100100080101000805010008060100080001000802010008050100
-08730101080c0100080501000843010005000100030e0000050302020103020205030700
-080807000802070008010700080207000801070008010701080107000802070008080700
-080207000801070008020700080107000800070008000700080107000802070008010700
-08020700087e07000100080a010008050100080501000805010108040100080401000801
-010008030101080201000807010008050101080301000801010008020100080601000821
-0101080a0100080401000801010008030101080201000807010008050101080301000801
-010008020100081d01010808010008020100080101000802010008010100080101010801
-010008020100080801000802010008010100080201000801010008070100080301000802
-0100080101000873010108080100080201000801010008020100084301010500030e0500
-000005020202010302020503070008090702080307020803070108000700080207020809
-070008020700080207030801070008000700080007000802070208030702087f07000100
-080a01000803010408010104080301010805010008040101080401010802010408030100
-0805010108040101080201000807010008210101080b0100080401010804010108020104
-08030100080501010804010108020100081e010108090102080301020803010108000100
-08020102080a010208030102080201000807010008040102080201000873010108090102
-080301020844010005000100030e00000503020201030202050307000823070508a10700
-0100080a01000814010008060100082a01000808010008210101080c0100082a0100081f
-01010823010508990101085801010500030e0500000005020202010302020503070008cb
-07000100080b010108100101083b0101082201010859010108c301010858010005000100
-030e000005030202010302020503070008cb07000100088101010859010108c301010858
-01010500030e0500000005020202010302020503070008cb070001000881010108590101
-08c301010858010005000100030e000005030202010302020503070008cb070001000881
-01010859010108c30101085801010500030e0500000005020202010302020503070008cb
-07000100088101010859010108c301010858010005000100030e00000503020201030202
-0503070008cb07000100088101010859010108c30101085801010500030e050000000502
-020201030202050307cd01ff01ff010005000100030e00000503020201030202050301ff
-01ff01cf0500030e0500000005020202010302020503010000cb01010081010100590101
-00c301010058010005000100030e000005030202010302020503010000cb010100810101
-0059010100c30101005801010500030e0500000005020202010302020503010000cb0101
-00810101000c0100002a0100001f010100c301010058010005000100030e000005030202
-0103020205030100003d0100000a0100000a010000060102006a010100810101000b0100
-00040101000a010200030102000b010100020100001e010100c30101000a0101004b0101
-0500030e05000000050202020103020205030100003d0100000a0100000a010000080100
-006a010100810101000a0100000401000001010000080100000201000001010000020100
-000901000001010000020100001d010100c301010009010000010100004a010005000100
-030e00000503020201030202050301000008010100000100000201000002010000080100
-000001010003010200020101000001000003010200030101000001000008010400020102
-000201000000010100050100000301020063010100810101000901000005010000010100
-000c010000050100000901000001010000030100001c010100c301010009010000010100
-004a01010500030e05000000050202020103020205030100000801000000010000000100
-000101000002010000080101000101000001010000020100000101000000010000000100
-00010100000201000001010000010101000a010000030100000201000001010100010100
-0004010000020100000201000062010100810101000801000006010000010100000c0100
-00050100000901000001010000040100001b010100c301010009010000010100004a0100
-05000100030e000005030202010302020503010000080100000001000000010000020100
-000101000008010000020100000501000001010000000100000001000001010000020100
-0001010000020100000a0100000701000001010000020100000401000002010000020100
-0062010100810101000701000007010000010100000a010100040101000a010000010100
-00050100001a010100c301010009010000010100004a01010500030e0500000005020202
-010302020503010000080100000001000000010000020100000101000008010000020100
-00020103000101000000010000000100000101040001010000020100000a010000040103
-000101000002010000040100000201040062010100810101000801000006010000010100
-000c010000050100000901000001010000040100001b010100c301010009010000010100
-004a010005000100030e0000050302020103020205030100000801000000010000000100
-000301000000010000080100000201000001010000020100000101000000010000000100
-000101000005010000020100000a01000003010000020100000101000002010000040100
-000201000066010100810101000901000005010000010100000c01000005010000090100
-0001010000030100001c010100c301010009010000010100004a01010500030e05000000
-050202020103020205030100000801000000010000000100000301010009010000020100
-000101000002010000010100000001000000010000010100000201000001010000010101
-000a01000003010000020100000101010001010000040100000201000002010000620101
-00810101000a010000040100000101000003010100020100000201000001010000020100
-00030101000301000001010000020100001d010100c301010009010000010100004a0100
-05000100030e000005030202010302020503010000080100000001000000010000040100
-000901000002010000020103000101000000010000000100000201020003010100000100
-000b010100020103000101000000010100050100000301020063010100810101000b0100
-00040101000401010003010200030102000401010004010100020100001e010100c30101
-000a0101004b01010500030e050000000502020201030202050301000012010000010105
-002301050085010100810101000c0100002a0100001f010100c301010058010005000100
-030e0000050302020103020205030100000f01000000010000b801010081010100590101
-00c30101005801010500030e050000000502020201030202050301000010010000b90101
-008101010059010100c301010058010005000100030e0000050302020103020205030100
-00cb0101008101010059010100c30101005801010500030e050000000502020201030202
-0503010000cb0101008101010059010100c301010058010005000100030e000005030202
-010302020503010000cb0101008101010059010100c30101005801010500030e05000000
-05020202010302020503010000cb0101008101010059010100c301010058010005000100
-030e00000503020201030202050301ff01ff01cf0500030e050000000502020201030202
-050307cd01ff01ff010005000100030e000005030202010302020503070000cb07000100
-008101010059010100c30101005801010500030e05000000050202020103020205030700
-00cb07000100000b0101004e0101002201010059010100c301010058010005000100030e
-000005030202010302020503070000cb07000100000a0100001c0100002a010000080100
-00210101000c0100002a0100001f010100c30101005801010500030e0500000005020202
-0103020205030700001f0700000a070000060702009407000100000a0100000401020003
-0102000c010000040101000a010200030102000b0101000201000007010000210101000b
-010000040101000a010200030102000b010100020100001e010100c30101000a0101004b
-010005000100030e0000050302020103020205030700001f0700000a0700000807000094
-07000100000a010000030100000201000001010000020100000a01000004010000010100
-000801000002010000010100000201000009010000010100000201000006010000210101
-000a01000004010000010100000801000002010000010100000201000009010000010100
-00020100001d010100c301010009010000010100004a01010500030e0500000005020202
-010302020503070000080701000007000002070000020700000807040002070200020700
-000007010005070000030702008d07000100000a01000007010000050100000901000005
-010000010100000c01000005010000090100000101000003010000050100002101010009
-01000005010000010100000c010000050100000901000001010000030100001c010100c3
-01010009010000010100004a010005000100030e00000503020201030202050307000008
-070000000700000007000001070000020700000a07000003070000020700000107010001
-0700000407000002070000020700008c07000100000a0100000701000005010000080100
-0006010000010100000c0100000501000009010000010100000401000004010000210101
-000801000006010000010100000c010000050100000901000001010000040100001b0101
-00c301010009010000010100004a01010500030e05000000050202020103020205030700
-0008070000000700000007000002070000010700000a0700000707000001070000020700
-000407000002070000020700008c07000100000801010007010000050100000801000007
-010000010100000a010100040101000a0100000101000005010000040101001f01010007
-01000007010000010100000a010100040101000a01000001010000050100001a010100c3
-01010009010000010100004a010005000100030e00000503020201030202050307000008
-070000000700000007000002070000010700000a07000004070300010700000207000004
-070000020704008c07000100000a01000005010000050100000a01000006010000010100
-000c01000005010000090100000101000004010000040100002101010008010000060100
-00010100000c010000050100000901000001010000040100001b010100c3010100090100
-00010100004a01010500030e050000000502020201030202050307000008070000000700
-000007000003070000000700000a07000003070000020700000107000002070000040700
-00020700009007000100000a01000004010000050100000c01000005010000010100000c
-010000050100000901000001010000030100000501000021010100090100000501000001
-0100000c010000050100000901000001010000030100001c010100c30101000901000001
-0100004a010005000100030e000005030202010302020503070000080700000007000000
-070000030701000b07000003070000020700000107010001070000040700000207000002
-0700008c07000100000a0100000301000005010000070101000401000004010000010100
-000301010002010000020100000101000002010000030101000301000001010000020100
-0006010000210101000a0100000401000001010000030101000201000002010000010100
-0002010000030101000301000001010000020100001d010100c301010009010000010100
-004a01010500030e05000000050202020103020205030700000807000000070000000700
-00040700000c07010002070300010700000007010005070000030702008d07000100000a
-010000030104000101040003010100050100000401010004010100030102000301020004
-010100040101000201000007010000210101000b01000004010100040101000301020003
-0102000401010004010100020100001e010100c30101000a0101004b010005000100030e
-0000050302020103020205030700001207000001070500af07000100000a010000140100
-00060100002a01000008010000210101000c0100002a0100001f010100c3010100580101
-0500030e05000000050202020103020205030700000f07000000070000b807000100000b
-010100100101003b0101002201010059010100c301010058010005000100030e00000503
-020201030202050307000010070000b907000100008101010059010100c3010100580101
-0500030e0500000005020202010302020503070000cb07000100008101010059010100c3
-01010058010005000100030e000005030202010302020503070000cb0700010000810101
-0059010100c30101005801010500030e0500000005020202010302020503070000cb0700
-0100008101010059010100c301010058010005000100030e000005030202010302020503
-070000cb07000100008101010059010100c30101005801010500030e0500000005020202
-01030202050307cd01ff01ff010005000100030e00000503020201030202050307cd01ff
-01ff01010500000005000000050000000500000005000000050000000500000005000000
-0500000005020202010302020503070000cb07000100008101010059010100c301010058
-010005000100030000000500000005000000050000000500000005000000050000000500
-000005030202010302020503070000cb07000100000b0101004e01010022010100590101
-00c301010058010105000300050000000508010005000300050000000502020201030202
-0503070000cb07000100000a0100001c0100002a01000008010000210101000c0100002a
-0100001f010100c301010058010005000100030105000000050801000300000005030202
-010302020503070000cb07000100000a01000005010000040102000c010000040101000d
-010000020102000b0101000201000007010000210101000b010000040101000d01000002
-0102000b010100020100001e0101002001010018010000150100006f0101000a01000005
-010100040101003d01010500030100000508010003010500000005020202010302020503
-070000cb07000100000a0100000401010003010000020100000a01000004010000010100
-000b010100010100000201000009010000010100000201000006010000210101000a0100
-0004010000010100000b01010001010000020100000901000001010000020100001d0101
-001f0100001a010000150100006f01010009010100040100000101000002010000010100
-003c01000500010003020000050601000500030100000503020201030202050307000009
-070100000700000207020009070000000701000307020002070100000700000307020003
-0702008d07000100000a0100000301000000010000070100000901000005010000010100
-000a01000000010000050100000901000001010000030100000501000021010100090100
-0005010000010100000a01000000010000050100000901000001010000030100001c0101
-000901010000010000020102000b01000003010000000101000301020002010000000101
-000201040002010200020100000001010003010100000100006f01010008010000000100
-00040100000101000002010000010100003c010105000302050000000504010005000302
-050000000502020201030202050307000008070000010701000107000002070000080701
-000107000001070000020700000107000000070000000700000107000002070000010700
-00020700008c07000100000a010000050100000701000008010000060100000101000009
-010000010100000501000009010000010100000401000004010000210101000801000006
-010000010100000901000001010000050100000901000001010000040100001b01010008
-010000010101000101000002010000080104000101010001010000010100000201000001
-01010001010000030100000301000002010000010101000101000001010000010101006f
-0101000a010000040100000101000002010000010100003c010005000100030305000000
-0504010003020000050302020103020205030700000807000002070000010700000c0700
-000207000005070000010700000007000000070000010700000207000001070000900700
-010000080101000601000006010000080100000701000001010000080100000201000003
-0101000a0100000101000005010000040101001f01010007010000070100000101000008
-01000002010000030101000a01000001010000050100001a010100080100000201000001
-0100000e0100000301000005010000020100000101000002010000030100000301000002
-010000010100000201000001010000020100006f0101000a010000040100000101000002
-010000010100003c01010500030300000504010003030500000005020202010302020503
-070000080700000207000002070200090700000207000002070300010700000007000000
-07000001070400020702008d07000100000a01000005010000050100000a010000060100
-000101000008010000020100000501000009010000010100000401000004010000210101
-000801000006010000010100000801000002010000050100000901000001010000040100
-001b0101000801000002010000020102000b010000030100000501000002010000010100
-00020100000301000003010400010100000201000001010000020100006f0101000a0100
-00040100000101000002010000010100003c010005000100030400000502010005000303
-000005030202010302020503070000080700000207000005070000080700000207000001
-0700000207000001070000000700000007000001070000090700008c07000100000a0100
-0005010000040100000c0100000501000001010000080105000401000009010000010100
-000301000005010000210101000901000005010000010100000801050004010000090100
-0001010000030100001c0101000801000002010000050100000a01000003010000050100
-000201000001010000020100000301000003010000050100000201000001010000020100
-006f0101000a010000040100000101000002010000010100003c01010500030405000000
-050001000500030405000000050202020103020205030700000807000001070100010700
-000207000008070000020700000107000002070000010700000007000000070000010700
-000207000001070000020700008c07000100000a01000005010000030100000701010004
-010000040100000101000003010100060100000101000002010000030101000301000001
-0100000201000006010000210101000a0100000401000001010000030101000601000001
-01000002010000030101000301000001010000020100001d010100080100000101010001
-010000020100000a01000003010000050100000201000001010000020100000301000003
-01000002010000010100000201000001010000010101006f0101000a0100000401000001
-01000002010000010100003c010005000100030505000100050001000304000005030202
-010302020503070000090701000007000002070200090700000207000002070300010700
-00000700000007000002070200030702008d07000100000a010000030104000101040003
-010100050100000401010004010100060100000201020004010100040101000201000007
-010000210101000b01000004010100040101000601000002010200040101000401010002
-0100001e0101000901010000010000020102000b01000003010000060102000201000002
-0100000401010002010200020100000201000002010100000100006f0101000801040003
-010100040101003d01010500030500000500010003050500000005020202010302020503
-0700000c07000007070500af07000100000a01000014010000060100002a010000080100
-00210101000c0100002a0100001f0101000c01000007010500a701010058010005000100
-03060100050003050000050302020103020205030700000807000002070000bd07000100
-000b010100100101003b01010022010100590101000801000002010000b5010100580101
-0500030605000306050000000502020201030202050307000009070200be070001000081
-0101005901010009010200b6010100580100050001000500000005000000050000000500
-00000500000005000000050000000500000005030202010302020503070000cb07000100
-008101010059010100c30101005801010500000005000000050000000500000005000000
-050000000500000005000000050000000502020201030202050301000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005110202
-010302020502010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100051202020103020205030100030d05000300050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-0000030000000500030c050000000511020201030202050201000500030b000005000100
-030000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050003000500000005000000030a0000051202020103020205030100
-03090500000005000100050003000500000005ff05ff05ac010003000000050000000500
-000005000308050000000511020201030202050201000500030700000500000005020100
-0300000005ff05ff05ac0100050003000500000005020000050000000306000005120202
-01030202050301000305050000000500000005020100050003000500000005ff05ff05ac
-010003000000050400000500000005000304050000000511020201030202050201000500
-0303000005000000050601000300000005ff05ff05ac0100050003000500000005060000
-050000000302000005120202010302020503010003010500000005000000050601000500
-03000500000005ff05ff05ac010003000000050800000500000005000300050000000511
-020201030202050201000500010005000100050a01000300000005ff05ff05ac01000500
-030005000000050801000500010005000000051202020103020205030100030105000100
-0500010005060100050003000500000005ff05ff05ac0100030000000508010005000100
-050003000500000005110202010302020502010005000303010005000100050601000300
-000005ff05ff05ac01000500030005000000050601000500010003020000051202020103
-0202050301000305050001000500010005020100050003000500000005ff05ff05ac0100
-030000000504010005000100050003040500000005110202010302020502010005000307
-010005000100050201000300000005ff05ff05ac01000500030005000000050201000500
-010003060000051202020103020205030100030905000100050001000500030005000000
-05ff05ff05ac010003000000050001000500010005000308050000000511020201030202
-050201000500030b01000500010003000000050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050001000500010005000100050003000500000005000100030a
-0000051202020101000405030100030d0500030005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001000500010005000100050001000500010005000100030000000500030c
-050000000511000502020400050201000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005120000020204000000020204000503
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000051100000202040000000202040005ff05ff05e800000202040000000202
-040005ff05ff05e800000202040000000202040005ff05ff05e800000202040000000202
-0400000502ff02ff02dc00060202040000000208040002ff02ff02dc0000020804000000
-0208040002ff02ff02dc00000208040000000208040001ff01ff01dc0000020804000000
-040901ff01ff01dc00000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 377 205
-%%EOF
diff --git a/lib/tv/doc/src/tv_start_system.gif b/lib/tv/doc/src/tv_start_system.gif
deleted file mode 100644
index 3d9502b00c..0000000000
--- a/lib/tv/doc/src/tv_start_system.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start_system.ps b/lib/tv/doc/src/tv_start_system.ps
deleted file mode 100644
index 5c115328c5..0000000000
--- a/lib/tv/doc/src/tv_start_system.ps
+++ /dev/null
@@ -1,1330 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_start_system.eps)
-%%CreationDate: (Mon Mar 19 17:15:27 2001)
-%%BoundingBox: 0 0 377 205
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 377 205
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-377.000000 205.000000
-12
-755 410
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-828282
-aab6aa
-000000
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff01ff01dc000b0208040001ff01ff01dc00000208040000000208040002ff02ff
-02dc000002080400000002080400020000ff00ff00d90400020000000208040000000202
-04060200000004ff04ff04d9020000000405020204000000020204000209000d02ff02ff
-02d000000202040000000202040002080000020d040002f6010302110103023801010206
-0101024001010230010102ff020400000202040000000202040002080000020d040002f6
-010102020107020001010203010102010101020e0105020001070201010302070100020b
-01010206010102400101020c0104021e010102ff02040000020204000000020204000208
-0000020d040002f6010102050101020301010203010102010101020e0101020701010203
-01010201010102050101020b010102060101024e010102020101021d010102ff02040000
-0202040000000202040002080000020204060203040002f6010102050101020301010203
-010102010101020e01010207010102030101020801040201010302030101020001010203
-010102020103020301040206010302030101020001010207010102000101020101010203
-010302030101020201010200010102020101020101030202010102000101020101010203
-010302020101020001010201010102020103020201010202010102f30000020204000000
-04030208000002020400030400000203040002f601010205010102040101020201000202
-0101020e0101020701010203010202080101020201010201010102020102020001010202
-010102010101020101010201010102090101020101010202010202000101020601020200
-010202000101020101010201010102020101020201020200010102010101020001010200
-010102020102020001020200010102010101020101010201010102000101020101010201
-010102010101020101010202010102f3000004030101020b000002030400030200000204
-040002f6010102050101020401010201010102020101020e010402040101020401030206
-010102060101020201010201010102020101020101010201010102010102020801010201
-010102020101020101010206010102010101020101010205010102020101020201010201
-010102010101020001010200010102020101020101010201010102050101020101020203
-01010201010102010101020101010202010002f70103020b000002030400030200000204
-040002f6010102050101020501010200010002030101020e010102070101020601020205
-010102030104020201010201010102020101020101050202010302060101020101010202
-010102010101020601010201010102010101020201040202010102020101020101010201
-010102000101020001010202010102010101020101010202010402010101020401010201
-0105020201010200010102f70103020b000002040400030000000205040002f601010205
-01010205010302030101020e010102070101020701010205010102020101020101010202
-010102010101020201010201010102080102020501010201010102020101020101010206
-010102010101020101010201010102010101020201010202010102010101020101010201
-010102000101020101010201010102010101020101010201010102010101020401010201
-0101020601010200010002f80103020b000002040400030000000205040002f601010205
-01010206010102040101020e010102070101020301010201010102050101020201010201
-010102020101020101010202010102010101020201000205010102050101020101010202
-010102010101020601010201010102010101020101010201010102020101020201010201
-010102020101020701010201010102010101020101010201010102010101020401010201
-0101020201000203010202f80103020b0000020500000206040002f60101020501010206
-010102040101020e01050203010102040103020701020201010202000101020101040203
-010102020103020201040207010302030101020101010206010102010101020101010202
-010202000101020101010202010102010101020301050202010102010101020101010202
-0102020001010200010102040101020201030204010102f90103020b0000020d040002f6
-01030211010302c4010102fa0103020b0000020d040002ff02d5010102fa0103020b0000
-020d040002ff02ff02d20103020c040d02ff02ff02d3010302ff02ff02ee010302ff02ff
-02ee0103020200ff00ff00e70400020201030202000004ff04ff04e70202010302ff02ff
-02ee0103020200ff00ff00e802020103020200ff00ff00e70700020201030202000105ff
-05ff05e40701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e407010202
-010302020001050b06040504060005030602051f0600050206000504060005270602050b
-06000506060005ff05ff053506000502060005090602051307010202010302020001050b
-0600050f0600051f060005020600052c060005020600050a060005ff05ff053d06000502
-0600050b0600051307010202010302020001050b06000506060205050600050306020518
-060005020600050206020503060205020600050206000517060005020600050106000500
-060105020604050206020503060205020600050006010503060205ff05ff052006000502
-060005020602050506000502060005000601050c07010202010302020001050b06000508
-060005050600050206000502060005180600050006000505060005020600050206000501
-060005020600051706000502060005010601050106000503060005060600050206000502
-06000501060105010600050106000502060005ff05ff051f060005020600050106000502
-0600050406000502060105010600050b07010202010302020001050b0603050506000505
-060005020600050206000518060005000600050506000502060005020600050106000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000501060005ff05ff052306040501060005020600050406000502
-060005020600050b07010202010302020001050b06000508060005050600050206040518
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05ff052006000502060005010604050406000502060005020600050b0701020201030202
-0001050b0600050806000505060005020600051d06000506060005020600050506000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000505060005ff05ff051f06000502060005010600050806000502
-060005020600050b07010202010302020001050b06000508060005050600050206000502
-060005190600050606000502060005020600050106000500060005000600051706000502
-060005010601050106000503060005060600050206000502060005010600050206000501
-06000502060005ff05ff051f060005020600050106000502060005040600050206010501
-0600050b07010202010302020001050b0600050806000505060005030602051a06000506
-060005030602050306000500060005190602050206000500060105050601050406000503
-060205020600050206000502060205ff05ff052006000502060005020602050506000502
-060005000601050c070102020103020200010576060005ff05ff055b0600050f07010202
-010302020001050a0606052a0606052a06060500060005ff05ff05450606050e0600050f
-07010202010302020001050a0606052a0606052a06060500060005ff05ff05450606050e
-0600050f0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000107ff07ff07e602020103
-0202000007ff07ff07e702020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e8020201030202051c010205040103
-05c1010205040103051a0102057f01010505010205f001020504010305190101052f0202
-01030202050e01060508010005060101050f010205010102059b01060508010005060101
-0510010505040101054d010205240104050d0101051e0102052401020501010205930106
-0508010005060101051101030535020201030202050e0100050101010500010005070101
-050601000511010105010100059d01000501010105000100050701010506010005130101
-05060100054d0101050001010524010105000101050c0100051e01010500010105240101
-050101000595010005010101050001000507010105060100051101010501010105340202
-010302020510010105030103050201030503010105030103050801020500010105010103
-05000101050001000500010005020103058b010105030103050201030503010105030103
-050a010105030104054c0101050101050500010305000102050201030501010105000102
-05070101050101010500010305030104051d010105010105050001030500010205020103
-050101010500010205070102050001010501010305000101050001000500010005020103
-058301010503010305020103050301010503010305090101050101000500010305020105
-050101030521020201030202051001010506010105000101050101010502010105020101
-0501010105070100050001000500010005050101050001050500010105010101058a0101
-050601010500010105010101050201010502010105010101050901010502010105010101
-054c01000502010105000101050201000500010205000101050001010501010105010102
-050001000507010105010101050201010502010105010101051d01000502010105000101
-050201000500010205000101050001010501010105010102050001000507010005000100
-050001000505010105000105050001010501010105820101050601010500010105010101
-050201010502010105010101050801020504010105020101050001010501010105010101
-052002020103020205100100050401040500010105010101050201010501010605070100
-0500010205020104050001010500010005000107058a0100050401040500010105010101
-0502010105010106050901010501010105020101054b0101050201000501010105000100
-05000100050001010501010805010101050a0103050401010501010105020101051c0101
-05020100050101010500010005000100050001010501010805010101050a010005000102
-050201040500010105000100050001070582010005040104050001010501010105020101
-05010106050901020503010105040101050101060520020201030202050f010105020101
-0501010105000101050201010501010105020101050b0101050001010501010105010101
-05010100050001000500010005000101058e010105020101050101010500010105020101
-0501010105020101050d01010502010105010101054c0101050101010501010205000100
-05010100050201000500010105050101050a0101050601010502010105010101051d0101
-05010101050101020500010005010100050201000500010105050101050a010105000101
-050101010501010105010100050001000500010005000101058601010502010105010101
-05000101050201010501010105020101050b010105010101050201010503010105030101
-0525020201030202050f0101050201010501010105000101050101010502010105020101
-050101010507010005010101050101010501010105000101050001000500010005000101
-05010101058a010105020101050101010500010105010101050201010502010105010101
-050901010502010105010101054c01010500010105020103050101010501010105000101
-0501010105010101050a0101050601010502010105010101051d01010500010105020103
-0501010105010101050001010501010105010101050a0100050101010501010105010101
-050001010500010005000100050001010501010105820101050201010501010105000101
-050101010502010105020101050101010507010105010101050201010502010205000101
-05000101050101010521020201030202050e01030502010a050101050501010305070102
-0500010105020107050001000500010105000103058a01030502010a0501010505010103
-0508010505010105054c0102050301010500010005000103050001020500010305010104
-050701030503010505010105051d01020503010105000100050001030500010205000103
-05010104050701020500010105020107050001000500010105000103058201030502010a
-050101050501010305090103050101050500010505010103052202020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e8020201030202050201ff01ff01e205020202010302020503010000cb010100810101
-0059010100c30101005801000711000005020202010302020503010000cb010100810101
-0059010100c30101005801000701030607000306000105020202010302020503010000cb
-010100810101000c0100002301000026010100c301010058010007010305000007000306
-0001050202020103020205030100001f0100000a0100009e010100810101000b01000004
-010100090104000a01010002010000250101001e0102000501000012010000060100002e
-010000120102000301020031010100080104004a01000701030500000701030500010502
-02020103020205030100001f0100000a0100009e010100810101000a0100000401000001
-010000080100000d01000001010000020100002401010020010000190100003601000014
-010000050100003101010008010000020100004a01000701030400010701030500010502
-02020103020205030100000901020003010200090104000201020002010000000101009b
-01010081010100090100000501000001010000080100000d010000010100000301000023
-010100090102000201000000010100020100000001010005010000030102000301020003
-01020002010400020102000301020002010000000101000a010200030102000201000000
-010100020104000101000000010100030102000501000005010000030102000201000000
-010100230101000c0100004a010007010304000105000701030400010502020201030202
-0503010000080100000201000001010000020100000a0100000301000002010000010101
-00010100009a01010081010100080100000601000001010000080103000a010000010100
-000401000022010100080100000201000001010100010100000101010001010000040100
-000501000002010000020100000101000002010000030100000601000002010000020100
-000101010001010000080100000201000001010000020100000101010001010000030100
-000301010001010000010100000201000004010000050100000201000002010000010101
-0001010000220101000b0100004b01000701030300010501070103040001050202020103
-020205030100000c010000010100000e0100000701000001010000020100009a01010081
-0101000701000007010000010100000c010000090100000101000005010000210101000c
-010000010100000201000001010000020100000401000005010000020100000901000003
-010000060100000201000002010000010100000201000008010000050100000201000001
-010000020100000301000003010000050100000201000004010000050100000201000002
-01000001010000260101000b0100004b0100070103030001050207010303000105020202
-01030202050301000009010300010100000e0100000401030001010000020100009a0101
-00810101000801000006010000010100000c010000090100000101000004010000220101
-000901030001010000020100000101000002010000040100000501000002010000060103
-000301000006010000020100000201000001010000020100000801000005010000020100
-000101000002010000030100000301000005010000020100000401000005010000020104
-0001010000260101000b0100004b01000701030200010503070103030001050202020103
-020205030100000801000002010000010100000e01000003010000020100000101000002
-0100009a0101008101010009010000050100000101000008010000020100000901000001
-010000030100002301010008010000020100000101000002010000010100000201000004
-010000050100000201000005010000020100000301000006010000020100000201000001
-010000020100000801000005010000020100000101000002010000030100000301000005
-0100000201000004010000050100000201000005010000260101000a0100004c01000701
-030200010504070103020001050202020103020205030100000801000002010000010100
-00020100000a010000030100000201000001010100010100009a010100810101000a0100
-000401000001010000030101000201000002010000030101000301000001010000020100
-002401010008010000020100000101010001010000010101000101000004010000050100
-000201000002010000010100000201000003010000060100000201000002010000010100
-000201000008010000020100000101000002010000010100000201000003010000030100
-0005010000020100000401000005010000020100000201000001010000260101000a0100
-004c01000701030100010505070103020001050202020103020205030100000901030002
-0102000c0101000201030001010000000101009b010100810101000b0100000401010004
-010100030102000401010004010100020100002501010009010300010100000001010002
-010000000101000501000005010000030102000301030004010100040100000301020002
-010000020100000901020003010200020100000201000004010100010100000601020005
-010000050100000301020002010000260101000a0100004c010007010301000105060701
-030100010502020201030202050301000015010500af010100810101000c010000230100
-00260101000f010000050100003c01050068010100580100070103000001050707010301
-000105020202010302020503010000cb01010081010100590101000f01000005010000ab
-010100580100070103000001050807010300000105020202010302020503010000cb0101
-0081010100590101000f01000005010000ab01010058010007010001070b030000010502
-0202010302020503010000cb0101008101010059010100c301010058010007010000070d
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-030e000105020202010302020503010000cb0101008101010059010100c3010100580100
-0701001005020202010302020503010000cb0101008101010059010100c3010100580100
-0701000d070000010502020201030202050301ff01ff01ce07010001050a070100010502
-020201030202050301ff01ff01ce07010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb010100810101000c0100002a0100001f010100c30101
-0058010007010001050a070100010502020201030202050301000010010200090100000d
-0102000a010200100100007b010100810101000b010000040101000b010000050100000c
-010100020100001e01010010010200090100000d010200930101000a0101004b01000701
-0001050a070100010502020201030202050301000012010000090100000f0100000c0100
-00100100007b010100810101000a010000040100000101000009010100040101000b0100
-0001010000020100001d01010012010000090100000f0100009301010009010000010100
-004a010007010001050a0701000105020202010302020503010000090101000001000004
-01000003010200020100000001010003010200050100000c010000030102000301020002
-010000010100000301020071010100810101000901000005010000010100000801000000
-01000003010000000100000b01000001010000030100001c010100090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-01010000010000030102000a010200030102000201000000010100020100000201000002
-01020002010000000101003f01010009010000010100004a010007010001050a07010001
-050202020103020205030100000801000001010100040100000201000002010000010101
-00010100000101000002010000040100000c010000020100000201000001010000020100
-000101000000010000030100000201000070010100810101000801000006010000010100
-000a010000050100000b01000001010000040100001b0101000801000001010100040100
-000201000002010000010101000101000001010000020100000401000009010100010100
-000101000002010000010100000001000000010000010100000201000008010000020100
-000101000002010000010101000101000001010000020100000101000002010000010101
-00010100003e01010009010000010100004a010007010001050a07010001050202020103
-020205030100000801000002010000040100000201000002010000010100000201000005
-010000040100000c01000002010000020100000101000005010100040100007401010081
-0101000701000007010000010100000a010000050100000b01000001010000050100001a
-010100080100000201000004010000020100000201000001010000020100000501000004
-010000090100000201000005010000010100000001000000010000010100000201000008
-010000050100000201000001010000050100000201000001010000020100000101000042
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000801000002010000040100000201000002010000010100000201000002010300040100
-000c01000002010000020100000101000005010100050102007101010081010100080100
-0006010000010100000a010000050100000b01000001010000040100001b010100080100
-000201000004010000020100000201000001010000020100000201030004010000090100
-000201000002010300010100000001000000010000010104000901020002010400010100
-00060100000001000002010400010100004201010009010000010100004a010007010001
-050a07010001050202020103020205030100000801000002010000040100000201000002
-01000001010000020100000101000002010000040100000c010000020100000201000001
-01000005010000000100000701000070010100810101000901000005010000010100000a
-010000050100000b01000001010000030100001c01010008010000020100000401000002
-010000020100000101000002010000010100000201000004010000090100000201000001
-010000020100000101000000010000000100000101000010010000010100000501000006
-0100000001000002010000050100004201010009010000010100004a010007010001050a
-070100010502020201030202050301000008010000010101000401000002010000020100
-0001010100010100000101000002010000040100000c0100000201000002010000010100
-00020100000101000001010000020100000201000070010100810101000a010000040100
-0001010000030101000401000005010000050101000301000001010000020100001d0101
-000801000001010100040100000201000002010000010101000101000001010000020100
-000401000009010000020100000101000002010000010100000001000000010000010100
-000201000008010000020100000101000002010000010100000701000003010000020100
-00010100004201010009010000010100004a010007010001050a07010001050202020103
-020205030100000901010000010000040100000301020002010000000101000301030004
-0100000c010000030102000301020002010000020100000201020071010100810101000b
-010000040101000401010002010400010104000301010004010100020100001e01010009
-010100000100000401000003010200020100000001010003010300040100000901000002
-01000002010300010100000001000000010000020102000a010200030102000201000007
-0100000401020002010000420101000a0101004b010007010001050a0701000105020202
-0103020205030100000c0100002301050093010100810101000c0100002a0100001f0101
-000c010000230105001c0105006801010058010007010001050a07010001050202020103
-020205030100000801000002010000bd01010081010100590101000801000002010000b5
-01010058010007010001050a070100010502020201030202050301000009010200be0101
-00810101005901010009010200b601010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a070100010502020201030202050301ff01ff01ce0701
-0001050a070100010502020201030202050301ff01ff01ce07010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb010100810101000c0100002a
-0100001f010100c301010058010007010001050a07010001050202020103020205030100
-0010010200090100000d0102009b010100810101000b010000040101000b010000050100
-000c010100020100001e01010010010200090100000d010200930101000a0101004b0100
-07010001050a070100010502020201030202050301000012010000090100000f0100009b
-010100810101000a010000040100000101000009010100040101000b0100000101000002
-0100001d01010012010000090100000f0100009301010009010000010100004a01000701
-0001050a0701000105020202010302020503010000090101000001000004010000030102
-000201000000010100030102000501000009010000000101000301020002010100000100
-000301020003010200710101008101010009010000050100000101000008010000000100
-0003010000000100000b01000001010000030100001c0101000901010000010000040100
-000301020002010000000101000301020005010000090100000001010003010200020101
-0000010000030102000a0102000301020002010000000101000201000002010000020102
-0002010000000101003f01010009010000010100004a010007010001050a070100010502
-020201030202050301000008010000010101000401000002010000020100000101010001
-010000010100000201000004010000090101000101000001010000020100000101000000
-010000000100000101000002010000010100000201000070010100810101000801000006
-010000010100000a010000050100000b01000001010000040100001b0101000801000001
-010100040100000201000002010000010101000101000001010000020100000401000009
-010100010100000101000002010000010100000001000000010000010100000201000008
-010000020100000101000002010000010101000101000001010000020100000101000002
-01000001010100010100003e01010009010000010100004a010007010001050a07010001
-050202020103020205030100000801000002010000040100000201000002010000010100
-000201000005010000040100000901000002010000050100000101000000010000000100
-0001010000020100000101000074010100810101000701000007010000010100000a0100
-00050100000b01000001010000050100001a010100080100000201000004010000020100
-000201000001010000020100000501000004010000090100000201000005010000010100
-000001000000010000010100000201000008010000050100000201000001010000050100
-00020100000101000002010000010100004201010009010000010100004a010007010001
-050a07010001050202020103020205030100000801000002010000040100000201000002
-010000010100000201000002010300040100000901000002010000020103000101000000
-01000000010000010104000201020071010100810101000801000006010000010100000a
-010000050100000b01000001010000040100001b01010008010000020100000401000002
-010000020100000101000002010000020103000401000009010000020100000201030001
-010000000100000001000001010400090102000201040001010000060100000001000002
-010400010100004201010009010000010100004a010007010001050a0701000105020202
-010302020503010000080100000201000004010000020100000201000001010000020100
-000101000002010000040100000901000002010000010100000201000001010000000100
-0000010000010100000901000070010100810101000901000005010000010100000a0100
-00050100000b01000001010000030100001c010100080100000201000004010000020100
-000201000001010000020100000101000002010000040100000901000002010000010100
-000201000001010000000100000001000001010000100100000101000005010000060100
-000001000002010000050100004201010009010000010100004a010007010001050a0701
-000105020202010302020503010000080100000101010004010000020100000201000001
-010100010100000101000002010000040100000901000002010000010100000201000001
-01000000010000000100000101000002010000010100000201000070010100810101000a
-010000040100000101000003010100040100000501000005010100030100000101000002
-0100001d0101000801000001010100040100000201000002010000010101000101000001
-010000020100000401000009010000020100000101000002010000010100000001000000
-010000010100000201000008010000020100000101000002010000010100000701000003
-01000002010000010100004201010009010000010100004a010007010001050a07010001
-050202020103020205030100000901010000010000040100000301020002010000000101
-000301030004010000090100000201000002010300010100000001000000010000020102
-000301020071010100810101000b01000004010100040101000201040001010400030101
-0004010100020100001e0101000901010000010000040100000301020002010000000101
-000301030004010000090100000201000002010300010100000001000000010000020102
-000a0102000301020002010000070100000401020002010000420101000a0101004b0100
-07010001050a07010001050202020103020205030100000c010000230105009301010081
-0101000c0100002a0100001f0101000c010000230105001c010500680101005801000701
-0001050a07010001050202020103020205030100000801000002010000bd010100810101
-00590101000801000002010000b501010058010007010001050a07010001050202020103
-0202050301000009010200be010100810101005901010009010200b60101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb0101008101010059010100c301010058010007010001050a0701000105020202
-01030202050301ff01ff01ce07010001050a070100010502020201030202050301ff01ff
-01ce07010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb010100810101000c0100002a0100001f010100c301010058010007010001050a0701
-00010502020201030202050301000010010200090100000d010200430100005601010081
-0101000b010000040101000b010000050100000c010100020100001e0101001001020009
-0100000d010200930101000a0101004b010007010001050a070100010502020201030202
-050301000012010000090100000f0100004301000056010100810101000a010000040100
-000101000009010100040101000b01000001010000020100001d01010012010000090100
-000f0100009301010009010000010100004a010007010001050a07010001050202020103
-020205030100000901010000010000040100000301020002010000000101000301020005
-010000090100000001010003010200020101000001000003010200030102000a01020002
-010000020100000101040054010100810101000901000005010000010100000801000000
-01000003010000000100000b01000001010000030100001c010100090101000001000004
-010000030102000201000000010100030102000501000009010000000101000301020002
-01010000010000030102000a010200030102000201000000010100020100000201000002
-01020002010000000101003f01010009010000010100004a010007010001050a07010001
-050202020103020205030100000801000001010100040100000201000002010000010101
-000101000001010000020100000401000009010100010100000101000002010000010100
-000001000000010000010100000201000001010000020100000801000002010000010100
-00020100000301000056010100810101000801000006010000010100000a010000050100
-000b01000001010000040100001b01010008010000010101000401000002010000020100
-000101010001010000010100000201000004010000090101000101000001010000020100
-000101000000010000000100000101000002010000080100000201000001010000020100
-0001010100010100000101000002010000010100000201000001010100010100003e0101
-0009010000010100004a010007010001050a070100010502020201030202050301000008
-010000020100000401000002010000020100000101000002010000050100000401000009
-01000002010000050100000101000000010000000100000101000002010000010100000c
-010000020100000201000000010000040100005601010081010100070100000701000001
-0100000a010000050100000b01000001010000050100001a010100080100000201000004
-010000020100000201000001010000020100000501000004010000090100000201000005
-010000010100000001000000010000010100000201000008010000050100000201000001
-01000005010000020100000101000002010000010100004201010009010000010100004a
-010007010001050a07010001050202020103020205030100000801000002010000040100
-000201000002010000010100000201000002010300040100000901000002010000020103
-000101000000010000000100000101040002010200090104000301000005010000560101
-00810101000801000006010000010100000a010000050100000b01000001010000040100
-001b01010008010000020100000401000002010000020100000101000002010000020103
-000401000009010000020100000201030001010000000100000001000001010400090102
-000201040001010000060100000001000002010400010100004201010009010000010100
-004a010007010001050a0701000105020202010302020503010000080100000201000004
-010000020100000201000001010000020100000101000002010000040100000901000002
-010000010100000201000001010000000100000001000001010000090100000801000006
-010000000100000401000056010100810101000901000005010000010100000a01000005
-0100000b01000001010000030100001c0101000801000002010000040100000201000002
-010000010100000201000001010000020100000401000009010000020100000101000002
-010000010100000001000000010000010100001001000001010000050100000601000000
-01000002010000050100004201010009010000010100004a010007010001050a07010001
-050202020103020205030100000801000001010100040100000201000002010000010101
-000101000001010000020100000401000009010000020100000101000002010000010100
-000001000000010000010100000201000001010000020100000801000002010000010100
-00020100000301000056010100810101000a010000040100000101000003010100040100
-0005010000050101000301000001010000020100001d0101000801000001010100040100
-000201000002010000010101000101000001010000020100000401000009010000020100
-000101000002010000010100000001000000010000010100000201000008010000020100
-000101000002010000010100000701000003010000020100000101000042010100090100
-00010100004a010007010001050a07010001050202020103020205030100000901010000
-010000040100000301020002010000000101000301030004010000090100000201000002
-01030001010000000100000001000002010200030102000a010200020100000201000004
-01010054010100810101000b010000040101000401010002010400010104000301010004
-010100020100001e01010009010100000100000401000003010200020100000001010003
-01030004010000090100000201000002010300010100000001000000010000020102000a
-0102000301020002010000070100000401020002010000420101000a0101004b01000701
-0001050a07010001050202020103020205030100000c0100002301050023010500690101
-00810101000c0100002a0100001f0101000c010000230105001c01050068010100580100
-07010001050a07010001050202020103020205030100000801000002010000bd01010081
-010100590101000801000002010000b501010058010007010001050a0701000105020202
-01030202050301000009010200be010100810101005901010009010200b6010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-020201030202050301ff01ff01ce07010001050a070100010502020201030202050308cd
-01ff01ff010007010001050a0701000105020202010302020503080000cb080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100000b0101004e0101002201010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100000a0100001c0100002a01000008
-010000210101000c0100002a0100001f010100c301010058010007010001050a07010001
-05020202010302020503080000cb08000100000a01000005010000040102000c01000004
-0101000d010000020102000b0101000201000007010000210101000b010000040101000d
-010000020102000b010100020100001e0101002001010018010000150100006f01010008
-0104000301010044010007010001050a0701000105020202010302020503080000cb0800
-0100000a0100000401010003010000020100000a01000004010000010100000b01010001
-0100000201000009010000010100000201000006010000210101000a0100000401000001
-0100000b01010001010000020100000901000001010000020100001d0101001f0100001a
-010000150100006f0101000801000002010000020100000101000043010007010001050a
-070100010502020201030202050308000009080100000800000208020009080000000801
-0003080200020801000008000003080200030802008d08000100000a0100000301000000
-010000070100000901000005010000010100000a01000000010000050100000901000001
-0100000301000005010000210101000901000005010000010100000a0100000001000005
-0100000901000001010000030100001c0101000901010000010000020102000b01000003
-010000000101000301020002010000000101000201040002010200020100000001010003
-010100000100006f0101000c010000020100000101000043010007010001050a07010001
-050202020103020205030800000808000001080100010800000208000008080100010800
-000108000002080000010800000008000000080000010800000208000001080000020800
-008c08000100000a01000005010000070100000801000006010000010100000901000001
-010000050100000901000001010000040100000401000021010100080100000601000001
-0100000901000001010000050100000901000001010000040100001b0101000801000001
-010100010100000201000008010400010101000101000001010000020100000101010001
-010000030100000301000002010000010101000101000001010000010101006f0101000b
-010000030100000101000043010007010001050a07010001050202020103020205030800
-000808000002080000010800000c08000002080000050800000108000000080000000800
-000108000002080000010800009008000100000801010006010000060100000801000007
-010000010100000801000002010000030101000a0100000101000005010000040101001f
-0101000701000007010000010100000801000002010000030101000a0100000101000005
-0100001a0101000801000002010000010100000e01000003010000050100000201000001
-01000002010000030100000301000002010000010100000201000001010000020100006f
-0101000b010000030100000101000043010007010001050a070100010502020201030202
-050308000008080000020800000208020009080000020800000208030001080000000800
-000008000001080400020802008d08000100000a01000005010000050100000a01000006
-010000010100000801000002010000050100000901000001010000040100000401000021
-010100080100000601000001010000080100000201000005010000090100000101000004
-0100001b0101000801000002010000020102000b01000003010000050100000201000001
-010000020100000301000003010400010100000201000001010000020100006f0101000b
-010000030100000101000043010007010001050a07010001050202020103020205030800
-000808000002080000050800000808000002080000010800000208000001080000000800
-000008000001080000090800008c08000100000a01000005010000040100000c01000005
-010000010100000801050004010000090100000101000003010000050100002101010009
-010000050100000101000008010500040100000901000001010000030100001c01010008
-01000002010000050100000a010000030100000501000002010000010100000201000003
-01000003010000050100000201000001010000020100006f0101000a0100000401000001
-01000043010007010001050a070100010502020201030202050308000008080000010801
-000108000002080000080800000208000001080000020800000108000000080000000800
-00010800000208000001080000020800008c08000100000a010000050100000301000007
-010100040100000401000001010000030101000601000001010000020100000301010003
-010000010100000201000006010000210101000a01000004010000010100000301010006
-0100000101000002010000030101000301000001010000020100001d0101000801000001
-01010001010000020100000a010000030100000501000002010000010100000201000003
-0100000301000002010000010100000201000001010000010101006f0101000a01000004
-0100000101000043010007010001050a0701000105020202010302020503080000090801
-000008000002080200090800000208000002080300010800000008000000080000020802
-00030802008d08000100000a010000030104000101040003010100050100000401010004
-010100060100000201020004010100040101000201000007010000210101000b01000004
-0101000401010006010000020102000401010004010100020100001e0101000901010000
-010000020102000b01000003010000060102000201000002010000040101000201020002
-0100000201000002010100000100006f0101000a0100000501010044010007010001050a
-07010001050202020103020205030800000c08000007080500af08000100000a01000014
-010000060100002a01000008010000210101000c0100002a0100001f0101000c01000007
-010500a701010058010007010001050a0701000105020202010302020503080000080800
-0002080000bd08000100000b010100100101003b01010022010100590101000801000002
-010000b501010058010007010001050a0701000105020202010302020503080000090802
-00be0800010000810101005901010009010200b601010058010007010001050a07010001
-05020202010302020503080000cb08000100008101010059010100c30101005801000701
-0001050a0701000105020202010302020503080000cb08000100008101010059010100c3
-01010058010007010001050a0701000105020202010302020503080000cb080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-01030202050308cd01ff01ff010007010001050a070100010502020201030202050308cd
-01ff01ff010007010001050a0701000105020202010302020503080000cb080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100000b0101004e0101002201010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100000a0100001c0100002a01000008
-010000210101000c0100002a0100001f010100c301010058010007010001050a07010001
-05020202010302020503080000110800000308000010080000010800009e08000100000a
-01000005010000040102000c010000040101000d010000050100000a0101000201000007
-010000210101000b010000040101000d010000050100000a010100020100001e010100c3
-0101000a0100000401020044010007010001050a07010001050202020103020205030800
-00110800000308000010080000010800009e08000100000a010000040101000301000002
-0100000a01000004010000010100000b0101000401010009010000010100000201000006
-010000210101000a01000004010000010100000b01010004010100090100000101000002
-0100001d010100c301010009010100030100000201000043010007010001050a07010001
-0502020201030202050308000009080100000800000108040001080000010800000a0801
-000008000001080000000801009b08000100000a01000003010000000100000701000009
-01000005010000010100000a010000000100000301000000010000090100000101000003
-01000005010000210101000901000005010000010100000a010000000100000301000000
-0100000901000001010000030100001c010100c301010008010000000100000301000002
-01000043010007010001050a070100010502020201030202050308000008080000010801
-000308000003080000000800000a0800000108010001080100010800009a08000100000a
-010000050100000701000008010000060100000101000009010000010100000201000001
-010000090100000101000004010000040100002101010008010000060100000101000009
-0100000101000002010000010100000901000001010000040100001b010100c30101000a
-010000030100000201000043010007010001050a07010001050202020103020205030800
-00080800000208000003080000030801000b0800000208000001080000020800009a0800
-010000080101000601000005010100080100000701000001010000080100000201000001
-01000002010000090100000101000005010000040101001f010100070100000701000001
-010000080100000201000001010000020100000901000001010000050100001a010100c3
-0101000a0100000401030043010007010001050a07010001050202020103020205030800
-00080800000208000003080000030801000b0800000208000001080000020800009a0800
-0100000a0100000501000007010000080100000601000001010000080100000201000001
-010000020100000901000001010000040100000401000021010100080100000601000001
-010000080100000201000001010000020100000901000001010000040100001b010100c3
-0101000a0100000701000043010007010001050a07010001050202020103020205030800
-0008080000020800000308000003080000000800000a0800000208000001080000020800
-009a08000100000a01000005010000070100000901000005010000010100000801050000
-010500080100000101000003010000050100002101010009010000050100000101000008
-010500000105000801000001010000030100001c010100c30101000a0100000701000043
-010007010001050a07010001050202020103020205030800000808000001080100030800
-000308000001080000090800000108010001080100010800009a08000100000a01000005
-010000030100000201000003010100040100000401000001010000030101000601000005
-0100000301010003010000010100000201000006010000210101000a0100000401000001
-010000030101000601000005010000030101000301000001010000020100001d010100c3
-0101000a010000030100000201000043010007010001050a070100010502020201030202
-050308000009080100000800000408010001080000020800000908010000080000010800
-00000801009b08000100000a010000030104000201020004010100050100000401010004
-010100060100000501000003010100040101000201000007010000210101000b01000004
-0101000401010006010000050100000301010004010100020100001e010100c301010008
-0104000201020044010007010001050a07010001050202020103020205030800000c0800
-000e080500a808000100000a01000014010000060100002a01000008010000210101000c
-0100002a0100001f010100c301010058010007010001050a070100010502020201030202
-05030800000808000002080000bd08000100000b010100100101003b0101002201010059
-010100c301010058010007010001050a0701000105020202010302020503080000090802
-00be08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100008101010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a0701000105020202010302020503080000cb0800
-0100008101010059010100c301010058010007010001050a070100010502020201030202
-050308cd01ff01ff010007010001050a070100010502020201030202050308cd01ff01ff
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a0701000105020202010302020503080000cb0800
-0100000b0101004e0101002201010059010100c301010058010007010001050a07010001
-05020202010302020503080000cb08000100000a0100001c0100002a0100000801000021
-0101000c0100002a0100001f010100c301010058010007010001050a0701000105020202
-010302020503080000110800000308000010080000010800009e08000100000a01000005
-010000070100000b010000040101000d010000050100000a010100020100000701000021
-0101000b010000040101000d010000050100000a010100020100001e010100c30101000c
-0100000201020044010007010001050a0701000105020202010302020503080000110800
-000308000010080000010800009e08000100000a01000004010100060101000a01000004
-010000010100000b0101000401010009010000010100000201000006010000210101000a
-01000004010000010100000b010100040101000901000001010000020100001d010100c3
-0101000b010100010100000201000043010007010001050a070100010502020201030202
-050308000009080100000800000108040001080000010800000a08010000080000010800
-00000801009b08000100000a010000030100000001000005010000000100000901000005
-010000010100000a01000000010000030100000001000009010000010100000301000005
-010000210101000901000005010000010100000a01000000010000030100000001000009
-01000001010000030100001c010100c30101000a01000000010000050100004301000701
-0001050a0701000105020202010302020503080000080800000108010003080000030800
-00000800000a0800000108010001080100010800009a08000100000a0100000501000004
-010000010100000801000006010000010100000901000001010000020100000101000009
-010000010100000401000004010000210101000801000006010000010100000901000001
-01000002010000010100000901000001010000040100001b010100c30101000901000001
-0100000501000043010007010001050a0701000105020202010302020503080000080800
-000208000003080000030801000b0800000208000001080000020800009a080001000008
-010100060100000301000002010000070100000701000001010000080100000201000001
-01000002010000090100000101000005010000040101001f010100070100000701000001
-010000080100000201000001010000020100000901000001010000050100001a010100c3
-01010008010000020100000301010044010007010001050a070100010502020201030202
-0503080000080800000208000003080000030801000b0800000208000001080000020800
-009a08000100000a01000005010000030100000201000008010000060100000101000008
-010000020100000101000002010000090100000101000004010000040100002101010008
-010000060100000101000008010000020100000101000002010000090100000101000004
-0100001b010100c301010008010000020100000501000043010007010001050a07010001
-0502020201030202050308000008080000020800000308000003080000000800000a0800
-000208000001080000020800009a08000100000a01000005010000030105000801000005
-010000010100000801050000010500080100000101000003010000050100002101010009
-010000050100000101000008010500000105000801000001010000030100001c010100c3
-010100080105000401000043010007010001050a07010001050202020103020205030800
-000808000001080100030800000308000001080000090800000108010001080100010800
-009a08000100000a01000005010000070100000301010004010000040100000101000003
-01010006010000050100000301010003010000010100000201000006010000210101000a
-010000040100000101000003010100060100000501000003010100030100000101000002
-0100001d010100c30101000c010000010100000201000043010007010001050a07010001
-050202020103020205030800000908010000080000040801000108000002080000090801
-000008000001080000000801009b08000100000a01000003010400050100000301010005
-010000040101000401010006010000050100000301010004010100020100000701000021
-0101000b010000040101000401010006010000050100000301010004010100020100001e
-010100c30101000c0100000201020044010007010001050a070100010502020201030202
-05030800000c0800000e080500a808000100000a01000014010000060100002a01000008
-010000210101000c0100002a0100001f010100c301010058010007010001050a07010001
-050202020103020205030800000808000002080000bd08000100000b010100100101003b
-0101002201010059010100c301010058010007010001050a070100010502020201030202
-050308000009080200be08000100008101010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a0701000105020202010302020503080000cb0800
-0100008101010059010100c301010058010007010001050a070100010502020201030202
-0503080000cb08000100008101010059010100c301010058010007010001050a07010001
-0502020201030202050308cd01ff01ff010007010001050a070100010502020201030202
-050308cd01ff01ff010007010001050a0701000105020202010302020503080000cb0800
-0100008101010059010100c301010058010007010001050a070100010502020201030202
-0503080000cb08000100000b0101004e0101002201010059010100c30101005801000701
-0001050a0701000105020202010302020503080000cb08000100000a0100001c0100002a
-01000008010000210101000c0100002a0100001f010100c301010058010007010001050a
-0701000105020202010302020503080000110800000308000010080000010800009e0800
-0100000a01000005010000030104000b010000040101000d010000050100000a01010002
-01000007010000210101000b010000040101000d010000050100000a010100020100001e
-010100c3010100090102000301020044010007010001050a070100010502020201030202
-0503080000110800000308000010080000010800009e08000100000a0100000401010003
-0100000e01000004010000010100000b0101000401010009010000010100000201000006
-010000210101000a01000004010000010100000b01010004010100090100000101000002
-0100001d010100c30101000801000002010000010100000201000043010007010001050a
-070100010502020201030202050308000009080100000800000108040001080000010800
-000a0801000008000001080000000801009b08000100000a010000030100000001000003
-0100000d01000005010000010100000a0100000001000003010000000100000901000001
-0100000301000005010000210101000901000005010000010100000a0100000001000003
-010000000100000901000001010000030100001c010100c30101000c0100000501000043
-010007010001050a07010001050202020103020205030800000808000001080100030800
-0003080000000800000a0800000108010001080100010800009a08000100000a01000005
-010000030103000901000006010000010100000901000001010000020100000101000009
-010000010100000401000004010000210101000801000006010000010100000901000001
-01000002010000010100000901000001010000040100001b010100c30101000c01000005
-01000043010007010001050a070100010502020201030202050308000008080000020800
-0003080000030801000b0800000208000001080000020800009a08000100000801010006
-010000070100000701000007010000010100000801000002010000010100000201000009
-0100000101000005010000040101001f0101000701000007010000010100000801000002
-01000001010000020100000901000001010000050100001a010100c30101000a01010004
-01010044010007010001050a070100010502020201030202050308000008080000020800
-0003080000030801000b0800000208000001080000020800009a08000100000a01000005
-010000070100000801000006010000010100000801000002010000010100000201000009
-010000010100000401000004010000210101000801000006010000010100000801000002
-01000001010000020100000901000001010000040100001b010100c30101000c01000005
-01000043010007010001050a070100010502020201030202050308000008080000020800
-000308000003080000000800000a0800000208000001080000020800009a08000100000a
-010000050100000301000002010000090100000501000001010000080105000001050008
-010000010100000301000005010000210101000901000005010000010100000801050000
-0105000801000001010000030100001c010100c30101000c010000050100004301000701
-0001050a0701000105020202010302020503080000080800000108010003080000030800
-0001080000090800000108010001080100010800009a08000100000a0100000501000003
-010000020100000301010004010000040100000101000003010100060100000501000003
-01010003010000010100000201000006010000210101000a010000040100000101000003
-0101000601000005010000030101000301000001010000020100001d010100c301010008
-01000002010000010100000201000043010007010001050a070100010502020201030202
-050308000009080100000800000408010001080000020800000908010000080000010800
-00000801009b08000100000a010000030104000201020004010100050100000401010004
-010100060100000501000003010100040101000201000007010000210101000b01000004
-0101000401010006010000050100000301010004010100020100001e010100c301010009
-0102000301020044010007010001050a07010001050202020103020205030800000c0800
-000e080500a808000100000a01000014010000060100002a01000008010000210101000c
-0100002a0100001f010100c301010058010007010001050a070100010502020201030202
-05030800000808000002080000bd08000100000b010100100101003b0101002201010059
-010100c301010058010007010001050a0701000105020202010302020503080000090802
-00be08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100008101010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a0701000105020202010302020503080000cb0800
-0100008101010059010100c301010058010007010001050a070100010502020201030202
-050308cd01ff01ff010007010001050a070100010502020201030202050308cd01ff01ff
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a0701000105020202010302020503080000cb0800
-0100000b0101004e0101002201010059010100c301010058010007010001050a07010001
-05020202010302020503080000cb08000100000a0100001c0100002a0100000801000021
-0101000c0100002a0100001f010100c301010058010007010001050a0701000105020202
-010302020503080000110800000308000010080000010800009e08000100000a01000005
-010000040102000c010000040101000d010000050100000a010100020100000701000021
-0101000b010000040101000d010000050100000a010100020100001e010100c30101000a
-0101004b010007010001050a070100010502020201030202050308000011080000030800
-0010080000010800009e08000100000a0100000401010003010000020100000a01000004
-010000010100000b0101000401010009010000010100000201000006010000210101000a
-01000004010000010100000b010100040101000901000001010000020100001d010100c3
-01010009010000010100004a010007010001050a07010001050202020103020205030800
-0009080100000800000108040001080000010800000a0801000008000001080000000801
-009b08000100000a0100000301000000010000030100000d01000005010000010100000a
-010000000100000301000000010000090100000101000003010000050100002101010009
-01000005010000010100000a010000000100000301000000010000090100000101000003
-0100001c010100c301010009010000010100004a010007010001050a0701000105020202
-01030202050308000008080000010801000308000003080000000800000a080000010801
-0001080100010800009a08000100000a01000005010000030100000c0100000601000001
-010000090100000101000002010000010100000901000001010000040100000401000021
-010100080100000601000001010000090100000101000002010000010100000901000001
-010000040100001b010100c301010009010000010100004a010007010001050a07010001
-05020202010302020503080000080800000208000003080000030801000b080000020800
-0001080000020800009a0800010000080101000601000003010300080100000701000001
-01000008010000020100000101000002010000090100000101000005010000040101001f
-010100070100000701000001010000080100000201000001010000020100000901000001
-010000050100001a010100c301010009010000010100004a010007010001050a07010001
-05020202010302020503080000080800000208000003080000030801000b080000020800
-0001080000020800009a08000100000a0100000501000003010000020100000801000006
-010000010100000801000002010000010100000201000009010000010100000401000004
-010000210101000801000006010000010100000801000002010000010100000201000009
-01000001010000040100001b010100c301010009010000010100004a010007010001050a
-070100010502020201030202050308000008080000020800000308000003080000000800
-000a0800000208000001080000020800009a08000100000a010000050100000301000002
-010000090100000501000001010000080105000001050008010000010100000301000005
-010000210101000901000005010000010100000801050000010500080100000101000003
-0100001c010100c301010009010000010100004a010007010001050a0701000105020202
-010302020503080000080800000108010003080000030800000108000009080000010801
-0001080100010800009a08000100000a0100000501000003010000020100000301010004
-010000040100000101000003010100060100000501000003010100030100000101000002
-01000006010000210101000a010000040100000101000003010100060100000501000003
-0101000301000001010000020100001d010100c301010009010000010100004a01000701
-0001050a0701000105020202010302020503080000090801000008000004080100010800
-0002080000090801000008000001080000000801009b08000100000a0100000301040002
-010200040101000501000004010100040101000601000005010000030101000401010002
-01000007010000210101000b010000040101000401010006010000050100000301010004
-010100020100001e010100c30101000a0101004b010007010001050a0701000105020202
-0103020205030800000c0800000e080500a808000100000a01000014010000060100002a
-01000008010000210101000c0100002a0100001f010100c301010058010007010001050a
-07010001050202020103020205030800000808000002080000bd08000100000b01010010
-0101003b0101002201010059010100c301010058010007010001050a0701000105020202
-01030202050308000009080200be08000100008101010059010100c30101005801000701
-0001050a0701000105020202010302020503080000cb08000100008101010059010100c3
-01010058010007010001050a0701000105020202010302020503080000cb080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100008101010059010100c301010058010007010001050a
-070100010502020201030202050308cd01ff01ff010007010001050a0701000105020202
-01030202050308cd01ff01ff010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100000b0101004e0101002201010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100000a0100001c
-0100002a01000008010000210101000c0100002a0100001f010100c30101005801000701
-0001050a0701000105020202010302020503080000110800000308000010080000010800
-009e08000100000a01000005010000030104000b010000040101000d010000050100000a
-0101000201000007010000210101000b010000040101000d010000050100000a01010002
-0100001e010100c3010100090102000401010044010007010001050a0701000105020202
-010302020503080000110800000308000010080000010800009e08000100000a01000004
-01010003010000020100000a01000004010000010100000b010100040101000901000001
-0100000201000006010000210101000a01000004010000010100000b0101000401010009
-01000001010000020100001d010100c30101000801000002010000020100000101000043
-010007010001050a07010001050202020103020205030800000908010000080000010804
-0001080000010800000a0801000008000001080000000801009b08000100000a01000003
-01000000010000070100000901000005010000010100000a010000000100000301000000
-01000009010000010100000301000005010000210101000901000005010000010100000a
-0100000001000003010000000100000901000001010000030100001c010100c301010008
-01000002010000020100000101000043010007010001050a070100010502020201030202
-050308000008080000010801000308000003080000000800000a08000001080100010801
-00010800009a08000100000a010000050100000601000009010000060100000101000009
-010000010100000201000001010000090100000101000004010000040100002101010008
-010000060100000101000009010000010100000201000001010000090100000101000004
-0100001b010100c30101000801000002010000020100000101000043010007010001050a
-0701000105020202010302020503080000080800000208000003080000030801000b0800
-000208000001080000020800009a08000100000801010006010000060100000801000007
-010000010100000801000002010000010100000201000009010000010100000501000004
-0101001f0101000701000007010000010100000801000002010000010100000201000009
-01000001010000050100001a010100c30101000901030002010000010100004301000701
-0001050a0701000105020202010302020503080000080800000208000003080000030801
-000b0800000208000001080000020800009a08000100000a010000050100000601000009
-010000060100000101000008010000020100000101000002010000090100000101000004
-010000040100002101010008010000060100000101000008010000020100000101000002
-0100000901000001010000040100001b010100c30101000c010000020100000101000043
-010007010001050a07010001050202020103020205030800000808000002080000030800
-0003080000000800000a0800000208000001080000020800009a08000100000a01000005
-010000050100000b01000005010000010100000801050000010500080100000101000003
-010000050100002101010009010000050100000101000008010500000105000801000001
-010000030100001c010100c30101000c010000020100000101000043010007010001050a
-070100010502020201030202050308000008080000010801000308000003080000010800
-00090800000108010001080100010800009a08000100000a010000050100000501000005
-010100040100000401000001010000030101000601000005010000030101000301000001
-0100000201000006010000210101000a0100000401000001010000030101000601000005
-010000030101000301000001010000020100001d010100c3010100080100000201000002
-0100000101000043010007010001050a0701000105020202010302020503080000090801
-0000080000040801000108000002080000090801000008000001080000000801009b0800
-0100000a0100000301040003010000050101000501000004010100040101000601000005
-01000003010100040101000201000007010000210101000b010000040101000401010006
-010000050100000301010004010100020100001e010100c3010100090102000401010044
-010007010001050a07010001050202020103020205030800000c0800000e080500a80800
-0100000a01000014010000060100002a01000008010000210101000c0100002a0100001f
-010100c301010058010007010001050a0701000105020202010302020503080000080800
-0002080000bd08000100000b010100100101003b0101002201010059010100c301010058
-010007010001050a070100010502020201030202050308000009080200be080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100008101010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a070100010502020201030202050308cd01ff01ff
-010007010001050a070100010502020201030202050308cd01ff01ff010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100000b0101004e
-0101002201010059010100c301010058010007010001050a070100010502020201030202
-0503080000cb08000100000a0100001c0100002a01000008010000210101000c0100002a
-0100001f010100c301010058010007010001050a07010001050202020103020205030800
-00110800000308000010080000010800009e08000100000a01000005010000040102000c
-010000040101000d010000050100000a0101000201000007010000210101000b01000004
-0101000d010000050100000a010100020100001e010100c3010100090102000301020044
-010007010001050a07010001050202020103020205030800001108000003080000100800
-00010800009e08000100000a0100000401010003010000020100000a0100000401000001
-0100000b0101000401010009010000010100000201000006010000210101000a01000004
-010000010100000b010100040101000901000001010000020100001d010100c301010008
-01000002010000010100000201000043010007010001050a070100010502020201030202
-050308000009080100000800000108040001080000010800000a08010000080000010800
-00000801009b08000100000a010000030100000001000003010000020100000901000005
-010000010100000a01000000010000030100000001000009010000010100000301000005
-010000210101000901000005010000010100000a01000000010000030100000001000009
-01000001010000030100001c010100c3010100080100000901000043010007010001050a
-070100010502020201030202050308000008080000010801000308000003080000000800
-000a0800000108010001080100010800009a08000100000a010000050100000301000002
-010000080100000601000001010000090100000101000002010000010100000901000001
-010000040100000401000021010100080100000601000001010000090100000101000002
-010000010100000901000001010000040100001b010100c3010100080100000901000043
-010007010001050a07010001050202020103020205030800000808000002080000030800
-00030801000b0800000208000001080000020800009a0800010000080101000601000004
-010200080100000701000001010000080100000201000001010000020100000901000001
-01000005010000040101001f010100070100000701000001010000080100000201000001
-010000020100000901000001010000050100001a010100c3010100080103000501000044
-010007010001050a07010001050202020103020205030800000808000002080000030800
-00030801000b0800000208000001080000020800009a08000100000a0100000501000003
-010000020100000801000006010000010100000801000002010000010100000201000009
-010000010100000401000004010000210101000801000006010000010100000801000002
-01000001010000020100000901000001010000040100001b010100c30101000801000002
-0100000301000045010007010001050a0701000105020202010302020503080000080800
-00020800000308000003080000000800000a0800000208000001080000020800009a0800
-0100000a0100000501000003010000020100000901000005010000010100000801050000
-010500080100000101000003010000050100002101010009010000050100000101000008
-010500000105000801000001010000030100001c010100c3010100080100000201000002
-01000046010007010001050a070100010502020201030202050308000008080000010801
-00030800000308000001080000090800000108010001080100010800009a08000100000a
-010000050100000301000002010000030101000401000004010000010100000301010006
-010000050100000301010003010000010100000201000006010000210101000a01000004
-01000001010000030101000601000005010000030101000301000001010000020100001d
-010100c301010008010000020100000101000047010007010001050a0701000105020202
-010302020503080000090801000008000004080100010800000208000009080100000800
-0001080000000801009b08000100000a0100000301040002010200040101000501000004
-01010004010100060100000501000003010100040101000201000007010000210101000b
-010000040101000401010006010000050100000301010004010100020100001e010100c3
-010100090102000201040043010007010001050a07010001050202020103020205030800
-000c0800000e080500a808000100000a01000014010000060100002a0100000801000021
-0101000c0100002a0100001f010100c301010058010007010001050a0701000105020202
-0103020205030800000808000002080000bd08000100000b010100100101003b01010022
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-0009080200be08000100008101010059010100c301010058010007010001050a07010001
-05020202010302020503080000cb08000100008101010059010100c30101005801000701
-0001050a0701000105020202010302020503080000cb08000100008101010059010100c3
-01010058010007010001050a0701000105020202010302020503080000cb080001000081
-01010059010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-01030202050308cd01ff01ff010007010001050a070100010502020201030202050301ff
-01ff01ce07010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001050a0701000105020202010302020503
-010000cb010100810101000c0100002a0100001f010100c301010058010007010001050a
-07010001050202020103020205030100000b010000120100001f01000089010100810101
-000b010000040101000b010000040102000b010100020100001e0101000b010000120100
-000e010000010100008f0101000a0101004b010007010001050a07010001050202020103
-020205030100001f0100001f01000089010100810101000a010000040100000101000009
-01010003010000020100000901000001010000020100001d0101001f0100000e01000001
-0100008f01010009010000010100004a010007010001050a070100010502020201030202
-050301000009010200020100000001010003010200020104000901020003010200030102
-000201000000010100030102007f01010081010100090100000501000001010000080100
-0000010000070100000901000001010000030100001c0101000901020002010000000101
-000301020002010400090101000001000001010000000101008c01010009010000010100
-004a010007010001050a07010001050202020103020205030100000b0100000201010001
-0100000101000002010000030100000a0100000201000001010000020100000101000002
-010000010101000101000001010000020100007e01010081010100080100000601000001
-0100000a010000070100000901000001010000040100001b0101000b0100000201010001
-0100000101000002010000030100000a0100000101010001010100010100008b01010009
-010000010100004a010007010001050a07010001050202020103020205030100000b0100
-0002010000020100000101000002010000030100000a0100000901000001010000050100
-000201000001010000020100007e010100810101000701000007010000010100000a0100
-00060100000a01000001010000050100001a0101000b0100000201000002010000010100
-0002010000030100000a0100000201000001010000020100008b01010009010000010100
-004a010007010001050a07010001050202020103020205030100000b0100000201000002
-01000001010400030100000a01000006010300010100000501000002010000010104007e
-010100810101000801000006010000010100000a010000050100000b0100000101000004
-0100001b0101000b010000020100000201000001010400030100000a0100000201000001
-010000020100008b01010009010000010100004a010007010001050a0701000105020202
-0103020205030100000b010000020100000201000001010000070100000a010000050100
-000201000001010000050100000201000001010000820101008101010009010000050100
-00010100000a010000040100000c01000001010000030100001c0101000b010000020100
-000201000001010000070100000a0100000201000001010000020100008b010100090100
-00010100004a010007010001050a07010001050202020103020205030100000b01000002
-010000020100000101000002010000030100000a01000002010000010100000201000001
-01000002010000010100000201000001010000020100007e010100810101000a01000004
-01000001010000030101000401000003010000070101000301000001010000020100001d
-0101000b01000002010000020100000101000002010000030100000a0100000101010001
-010100010100008b01010009010000010100004a010007010001050a0701000105020202
-0103020205030100000b0100000201000002010000020102000501010009010200030103
-00020102000201000002010000020102007f010100810101000b01000004010100040101
-0002010400010104000301010004010100020100001e0101000b01000002010000020100
-000201020005010100090101000001000001010000000101008c0101000a0101004b0100
-07010001050a070100010502020201030202050301000023010500a1010100810101000c
-0100002a0100001f010100230105009901010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a0701000105020202010302020503010000cb0101
-008101010059010100c301010058010007010001070c0001050202020103020205030100
-00cb0101008101010059010100c301010058010007010000070d00010502020201030202
-050301ff01ff01ce0701030e00010502020201030202050301ff01ff01ce0701030e0001
-05020202010302020503010000cb0101008101010059010100c30101005801000701030e
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-030e000105020202010302020503010000cb010100810101000c0100002a0100001f0101
-00c30101005801000701030e0001050202020103020205030100000b010000120100000e
-0100000101000097010100810101000b010000040101000b010000040102000b01010002
-0100001e0101000b010000120100000e010000010100008f0101000a0100000401020044
-01000701030e0001050202020103020205030100001f0100000e01000001010000970101
-00810101000a010000040100000101000009010100030100000201000009010000010100
-00020100001d0101001f0100000e010000010100008f0101000901010003010000020100
-004301000701030e00010502020201030202050301000009010200020100000001010003
-010200020104000901010000010000010100000001010094010100810101000901000005
-010000010100000801000000010000070100000901000001010000030100001c01010009
-01020002010000000101000301020002010400090101000001000001010000000101008c
-010100080100000001000003010000020100004301000701030e00010502020201030202
-05030100000b01000002010100010100000101000002010000030100000a010000010101
-00010101000101000093010100810101000801000006010000010100000a010000070100
-000901000001010000040100001b0101000b010000020101000101000001010000020100
-00030100000a0100000101010001010100010100008b0101000a01000003010000020100
-004301000701030e0001050202020103020205030100000b010000020100000201000001
-01000002010000030100000a010000020100000101000002010000930101008101010007
-01000007010000010100000a010000060100000a01000001010000050100001a0101000b
-01000002010000020100000101000002010000030100000a010000020100000101000002
-0100008b0101000a010000040103004301000701030e0001050202020103020205030100
-000b010000020100000201000001010400030100000a0100000201000001010000020100
-0093010100810101000801000006010000010100000a010000050100000b010000010100
-00040100001b0101000b010000020100000201000001010400030100000a010000020100
-0001010000020100008b0101000a010000070100004301000701030e0001050202020103
-020205030100000b010000020100000201000001010000070100000a0100000201000001
-0100000201000093010100810101000901000005010000010100000a010000040100000c
-01000001010000030100001c0101000b010000020100000201000001010000070100000a
-0100000201000001010000020100008b0101000a010000070100004301000701030e0001
-050202020103020205030100000b01000002010000020100000101000002010000030100
-000a01000001010100010101000101000093010100810101000a01000004010000010100
-00030101000401000003010000070101000301000001010000020100001d0101000b0100
-0002010000020100000101000002010000030100000a0100000101010001010100010100
-008b0101000a01000003010000020100004301000701030e000105020202010302020503
-0100000b0100000201000002010000020102000501010009010100000100000101000000
-01010094010100810101000b010000040101000401010002010400010104000301010004
-010100020100001e0101000b010000020100000201000002010200050101000901010000
-01000001010000000101008c01010008010400020102004401000701030e000105020202
-01030202050301000023010500a1010100810101000c0100002a0100001f010100230105
-00990101005801000701030e000105020202010302020503010000cb0101008101010059
-010100c30101005801000701030e000105020202010302020503010000cb010100810101
-0059010100c30101005801000701030e000105020202010302020503010000cb01010081
-01010059010100c30101005801000701030e000105020202010302020503010000cb0101
-008101010059010100c30101005801000701030e000105020202010302020503010000cb
-0101008101010059010100c30101005801000701030e0001050202020103020205030100
-00cb0101008101010059010100c30101005801000701030e000105020202010302020503
-01ff01ff01ce0701030e00010502020201030202050301ff01ff01ce0701001005020202
-010302020503010000cb0101008101010059010100c301010058010007010300000c0700
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-03000001050807010300000105020202010302020503010000cb010100810101000c0100
-002a0100001f010100c30101005801000701030100010507070103000001050202020103
-020205030100000b010000120100000a0100001501000087010100810101000b01000004
-0101000b010000040102000b010100020100001e0101000b010000120100000e01000001
-0100008f0101000c0100004a010007010301000105060701030100010502020201030202
-05030100001f0100000a0100001501000087010100810101000a01000004010000010100
-000901010003010000020100000901000001010000020100001d0101001f0100000e0100
-00010100008f0101000b0101004a01000701030200010505070103010001050202020103
-020205030100000901020002010000000101000301020002010400080100000001010003
-0102000301020002010400020102007f0101008101010009010000050100000101000008
-01000000010000070100000901000001010000030100001c010100090102000201000000
-0101000301020002010400090101000001000001010000000101008c0101000a01000000
-0100004a01000701030200010504070103020001050202020103020205030100000b0100
-0002010100010100000101000002010000030100000a0101000101000001010000020100
-0001010000020100000301000003010000020100007e0101008101010008010000060100
-00010100000a010000070100000901000001010000040100001b0101000b010000020101
-00010100000101000002010000030100000a0100000101010001010100010100008b0101
-0009010000010100004a0100070103030001050307010302000105020202010302020503
-0100000b01000002010000020100000101000002010000030100000a0100000201000001
-010000020100000101000007010000030100008201010081010100070100000701000001
-0100000a010000060100000a01000001010000050100001a0101000b0100000201000002
-0100000101000002010000030100000a0100000201000001010000020100008b01010008
-010000020100004a01000701030300010502070103030001050202020103020205030100
-000b010000020100000201000001010400030100000a0100000201000001010000020100
-000201020004010000040102007f010100810101000801000006010000010100000a0100
-00050100000b01000001010000040100001b0101000b0100000201000002010000010104
-00030100000a0100000201000001010000020100008b01010008010000020100004a0100
-0701030400010501070103030001050202020103020205030100000b0100000201000002
-01000001010000070100000a010000020100000101000002010000050100000301000007
-0100007e010100810101000901000005010000010100000a010000040100000c01000001
-010000030100001c0101000b010000020100000201000001010000070100000a01000002
-01000001010000020100008b010100080105004901000701030400010500070103040001
-050202020103020205030100000b01000002010000020100000101000002010000030100
-000a01000002010000010100000201000001010000020100000301000003010000020100
-007e010100810101000a0100000401000001010000030101000401000003010000070101
-000301000001010000020100001d0101000b010000020100000201000001010000020100
-00030100000a0100000101010001010100010100008b0101000c0100004a010007010305
-0000070203040001050202020103020205030100000b0100000201000002010000020102
-00050101000801000002010000020102000301020005010100020102007f010100810101
-000b010000040101000401010002010400010104000301010004010100020100001e0101
-000b01000002010000020100000201020005010100090101000001000001010000000101
-008c0101000c0100004a0100070103050000070103050001050202020103020205030100
-0023010500a1010100810101000c0100002a0100001f0101002301050099010100580100
-0701030607010305000105020202010302020503010000cb0101008101010059010100c3
-0101005801000701030607000306000105020202010302020503010000cb010100810101
-0059010100c30101005801000701001005020202010302020503010000cb010100810101
-0059010100c3010100580100070000110502020201030202050207ff07ff07d305110202
-01030202050207ff07ff07d20000051102020103020205020701030d0000030000ff00ff
-00af03000001030c0001051102020103020205020701030b00010700030000ff00ff00ae
-070003000003030a00010511020201030202050207010309000207010300000105ff05ff
-05ab07010300000503080001051102020103020205020701030700030500070103000001
-05ff05ff05ab070103000001050100030306000105110202010302020502070103050003
-050207010300000105ff05ff05ab07010300000105030003030400010511020201030202
-0502070103030003050407010300000105ff05ff05ab0701030000010505000303020001
-05110202010302020502070103010003050607010300000105ff05ff05ab070103000001
-0507000303000001051102020103020205020705050807010300000105ff05ff05ab0701
-0300000105080703000105110202010302020502070103010703050607010300000105ff
-05ff05ab0701030000010507070303000001051102020103020205020701030307030504
-07010300000105ff05ff05ab070103000001050507030302000105110202010302020502
-070103050703050207010300000105ff05ff05ab07010300000105030703030400010511
-0202010302020502070103070703050007010300000105ff05ff05ab0701030000010501
-070303060001051102020103020205020701030907040300000105ff05ff05ab07010300
-0001070303080001051102020103020205020701030b07020300000107ff07ff07ad0300
-00010701030a0001051102020101000405020701030d07000300000007ff07ff07ae0300
-00000700030c000105110005020204000502070100ff00ff00d105110000020204000000
-020204000502070000ff00ff00d2051100000202040000000202040005ff05ff05e80000
-0202040000000202040005ff05ff05e800000202040000000202040005ff05ff05e80000
-02020400000002020400000502ff02ff02dc00060202040000000208040002ff02ff02dc
-00000208040000000208040002ff02ff02dc00000208040000000208040001ff01ff01dc
-0000020804000000040901ff01ff01dc00000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 377 205
-%%EOF
diff --git a/lib/tv/doc/src/tv_start_system_unreadable.gif b/lib/tv/doc/src/tv_start_system_unreadable.gif
deleted file mode 100644
index 38b69deb8e..0000000000
--- a/lib/tv/doc/src/tv_start_system_unreadable.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_start_system_unreadable.ps b/lib/tv/doc/src/tv_start_system_unreadable.ps
deleted file mode 100644
index 4486557837..0000000000
--- a/lib/tv/doc/src/tv_start_system_unreadable.ps
+++ /dev/null
@@ -1,1377 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_start_system_unreadable.eps)
-%%CreationDate: (Mon Mar 19 17:15:29 2001)
-%%BoundingBox: 0 0 377 205
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 377 205
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-377.000000 205.000000
-12
-755 410
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-828282
-aab6aa
-e7e7e7
-000000
-000000
-000000
-000000
-000000
-000000
-000a01ff01ff01dc000b0208040001ff01ff01dc00000208040000000208040002ff02ff
-02dc000002080400000002080400020000ff00ff00d90400020000000208040000000202
-04060200000004ff04ff04d9020000000405020204000000020204000209000d02ff02ff
-02d000000202040000000202040002080000020d040002f6010302110103023801010206
-0101024001010230010102ff020400000202040000000202040002080000020d040002f6
-010102020107020001010203010102010101020e0105020001070201010302070100020b
-01010206010102400101020c0104021e010102ff02040000020204000000020204000208
-0000020d040002f6010102050101020301010203010102010101020e0101020701010203
-01010201010102050101020b010102060101024e010102020101021d010102ff02040000
-0202040000000202040002080000020204060203040002f6010102050101020301010203
-010102010101020e01010207010102030101020801040201010302030101020001010203
-010102020103020301040206010302030101020001010207010102000101020101010203
-010302030101020201010200010102020101020101030202010102000101020101010203
-010302020101020001010201010102020103020201010202010102f30000020204000000
-04030208000002020400030400000203040002f601010205010102040101020201000202
-0101020e0101020701010203010202080101020201010201010102020102020001010202
-010102010101020101010201010102090101020101010202010202000101020601020200
-010202000101020101010201010102020101020201020200010102010101020001010200
-010102020102020001020200010102010101020101010201010102000101020101010201
-010102010101020101010202010102f3000004030101020b000002030400030200000204
-040002f6010102050101020401010201010102020101020e010402040101020401030206
-010102060101020201010201010102020101020101010201010102010102020801010201
-010102020101020101010206010102010101020101010205010102020101020201010201
-010102010101020001010200010102020101020101010201010102050101020101020203
-01010201010102010101020101010202010002f70103020b000002030400030200000204
-040002f6010102050101020501010200010002030101020e010102070101020601020205
-010102030104020201010201010102020101020101050202010302060101020101010202
-010102010101020601010201010102010101020201040202010102020101020101010201
-010102000101020001010202010102010101020101010202010402010101020401010201
-0105020201010200010102f70103020b000002040400030000000205040002f601010205
-01010205010302030101020e010102070101020701010205010102020101020101010202
-010102010101020201010201010102080102020501010201010102020101020101010206
-010102010101020101010201010102010101020201010202010102010101020101010201
-010102000101020101010201010102010101020101010201010102010101020401010201
-0101020601010200010002f80103020b000002040400030000000205040002f601010205
-01010206010102040101020e010102070101020301010201010102050101020201010201
-010102020101020101010202010102010101020201000205010102050101020101010202
-010102010101020601010201010102010101020101010201010102020101020201010201
-010102020101020701010201010102010101020101010201010102010101020401010201
-0101020201000203010202f80103020b0000020500000206040002f60101020501010206
-010102040101020e01050203010102040103020701020201010202000101020101040203
-010102020103020201040207010302030101020101010206010102010101020101010202
-010202000101020101010202010102010101020301050202010102010101020101010202
-0102020001010200010102040101020201030204010102f90103020b0000020d040002f6
-01030211010302c4010102fa0103020b0000020d040002ff02d5010102fa0103020b0000
-020d040002ff02ff02d20103020c040d02ff02ff02d3010302ff02ff02ee010302ff02ff
-02ee0103020200ff00ff00e70400020201030202000004ff04ff04e70202010302ff02ff
-02ee0103020200ff00ff00e802020103020200ff00ff00e70700020201030202000105ff
-05ff05e40701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e407010202
-010302020001050b06040504060005030602051f0600050206000504060005270602050b
-06000506060005ff05ff053506000502060005090602051307010202010302020001050b
-0600050f0600051f060005020600052c060005020600050a060005ff05ff053d06000502
-0600050b0600051307010202010302020001050b06000506060205050600050306020518
-060005020600050206020503060205020600050206000517060005020600050106000500
-060105020604050206020503060205020600050006010503060205ff05ff052006000502
-060005020602050506000502060005000601050c07010202010302020001050b06000508
-060005050600050206000502060005180600050006000505060005020600050206000501
-060005020600051706000502060005010601050106000503060005060600050206000502
-06000501060105010600050106000502060005ff05ff051f060005020600050106000502
-0600050406000502060105010600050b07010202010302020001050b0603050506000505
-060005020600050206000518060005000600050506000502060005020600050106000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000501060005ff05ff052306040501060005020600050406000502
-060005020600050b07010202010302020001050b06000508060005050600050206040518
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05ff052006000502060005010604050406000502060005020600050b0701020201030202
-0001050b0600050806000505060005020600051d06000506060005020600050506000500
-060005000600051706000502060005010600050206000503060005060600050206000502
-060005010600050206000505060005ff05ff051f06000502060005010600050806000502
-060005020600050b07010202010302020001050b06000508060005050600050206000502
-060005190600050606000502060005020600050106000500060005000600051706000502
-060005010601050106000503060005060600050206000502060005010600050206000501
-06000502060005ff05ff051f060005020600050106000502060005040600050206010501
-0600050b07010202010302020001050b0600050806000505060005030602051a06000506
-060005030602050306000500060005190602050206000500060105050601050406000503
-060205020600050206000502060205ff05ff052006000502060005020602050506000502
-060005000601050c070102020103020200010576060005ff05ff055b0600050f07010202
-010302020001050a0606052a0606052a06060500060005ff05ff05450606050e0600050f
-07010202010302020001050a0606052a0606052a06060500060005ff05ff05450606050e
-0600050f0701020201030202000105ff05ff05e40701020201030202000105ff05ff05e4
-0701020201030202000105ff05ff05e40701020201030202000107ff07ff07e602020103
-0202000007ff07ff07e702020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff05e80202
-0103020205ff05ff05e802020103020205ff05ff05e8020201030202051c010205040103
-05c1010205040103051a0102057f01010505010205f001020504010305190101052f0202
-01030202050e01060508010005060101050f010205010102059b01060508010005060101
-0510010505040101054d010205240104050d0101051e0102052401020501010205930106
-0508010005060101051101030535020201030202050e0100050101010500010005070101
-050601000511010105010100059d01000501010105000100050701010506010005130101
-05060100054d0101050001010524010105000101050c0100051e01010500010105240101
-050101000595010005010101050001000507010105060100051101010501010105340202
-010302020510010105030103050201030503010105030103050801020500010105010103
-05000101050001000500010005020103058b010105030103050201030503010105030103
-050a010105030104054c0101050101050500010305000102050201030501010105000102
-05070101050101010500010305030104051d010105010105050001030500010205020103
-050101010500010205070102050001010501010305000101050001000500010005020103
-058301010503010305020103050301010503010305090101050101000500010305020105
-050101030521020201030202051001010506010105000101050101010502010105020101
-0501010105070100050001000500010005050101050001050500010105010101058a0101
-050601010500010105010101050201010502010105010101050901010502010105010101
-054c01000502010105000101050201000500010205000101050001010501010105010102
-050001000507010105010101050201010502010105010101051d01000502010105000101
-050201000500010205000101050001010501010105010102050001000507010005000100
-050001000505010105000105050001010501010105820101050601010500010105010101
-050201010502010105010101050801020504010105020101050001010501010105010101
-052002020103020205100100050401040500010105010101050201010501010605070100
-0500010205020104050001010500010005000107058a0100050401040500010105010101
-0502010105010106050901010501010105020101054b0101050201000501010105000100
-05000100050001010501010805010101050a0103050401010501010105020101051c0101
-05020100050101010500010005000100050001010501010805010101050a010005000102
-050201040500010105000100050001070582010005040104050001010501010105020101
-05010106050901020503010105040101050101060520020201030202050f010105020101
-0501010105000101050201010501010105020101050b0101050001010501010105010101
-05010100050001000500010005000101058e010105020101050101010500010105020101
-0501010105020101050d01010502010105010101054c0101050101010501010205000100
-05010100050201000500010105050101050a0101050601010502010105010101051d0101
-05010101050101020500010005010100050201000500010105050101050a010105000101
-050101010501010105010100050001000500010005000101058601010502010105010101
-05000101050201010501010105020101050b010105010101050201010503010105030101
-0525020201030202050f0101050201010501010105000101050101010502010105020101
-050101010507010005010101050101010501010105000101050001000500010005000101
-05010101058a010105020101050101010500010105010101050201010502010105010101
-050901010502010105010101054c01010500010105020103050101010501010105000101
-0501010105010101050a0101050601010502010105010101051d01010500010105020103
-0501010105010101050001010501010105010101050a0100050101010501010105010101
-050001010500010005000100050001010501010105820101050201010501010105000101
-050101010502010105020101050101010507010105010101050201010502010205000101
-05000101050101010521020201030202050e01030502010a050101050501010305070102
-0500010105020107050001000500010105000103058a01030502010a0501010505010103
-0508010505010105054c0102050301010500010005000103050001020500010305010104
-050701030503010505010105051d01020503010105000100050001030500010205000103
-05010104050701020500010105020107050001000500010105000103058201030502010a
-050101050501010305090103050101050500010505010103052202020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e802020103020205ff05ff05e802020103020205ff05ff05e802020103020205ff05ff
-05e8020201030202050201ff01ff01e205020202010302020503010000cb010100810101
-0059010100c30101005801000711000005020202010302020503010000cb010100810101
-0059010100c30101005801000701030607000306000105020202010302020503010000cb
-010100810101000c0100002301000026010100c301010058010007010305000007000306
-0001050202020103020205030100001f0100000a0100009e010100810101000b01000004
-010100090104000a01010002010000250101001e0102000501000012010000060100002e
-010000120102000301020031010100080104004a01000701030500000701030500010502
-02020103020205030100001f0100000a0100009e010100810101000a0100000401000001
-010000080100000d01000001010000020100002401010020010000190100003601000014
-010000050100003101010008010000020100004a01000701030400010701030500010502
-02020103020205030100000901020003010200090104000201020002010000000101009b
-01010081010100090100000501000001010000080100000d010000010100000301000023
-010100090102000201000000010100020100000001010005010000030102000301020003
-01020002010400020102000301020002010000000101000a010200030102000201000000
-010100020104000101000000010100030102000501000005010000030102000201000000
-010100230101000c0100004a010007010304000105000701030400010502020201030202
-0503010000080100000201000001010000020100000a0100000301000002010000010101
-00010100009a01010081010100080100000601000001010000080103000a010000010100
-000401000022010100080100000201000001010100010100000101010001010000040100
-000501000002010000020100000101000002010000030100000601000002010000020100
-000101010001010000080100000201000001010000020100000101010001010000030100
-000301010001010000010100000201000004010000050100000201000002010000010101
-0001010000220101000b0100004b01000701030300010501070103040001050202020103
-020205030100000c010000010100000e0100000701000001010000020100009a01010081
-0101000701000007010000010100000c010000090100000101000005010000210101000c
-010000010100000201000001010000020100000401000005010000020100000901000003
-010000060100000201000002010000010100000201000008010000050100000201000001
-010000020100000301000003010000050100000201000004010000050100000201000002
-01000001010000260101000b0100004b0100070103030001050207010303000105020202
-01030202050301000009010300010100000e0100000401030001010000020100009a0101
-00810101000801000006010000010100000c010000090100000101000004010000220101
-000901030001010000020100000101000002010000040100000501000002010000060103
-000301000006010000020100000201000001010000020100000801000005010000020100
-000101000002010000030100000301000005010000020100000401000005010000020104
-0001010000260101000b0100004b01000701030200010503070103030001050202020103
-020205030100000801000002010000010100000e01000003010000020100000101000002
-0100009a0101008101010009010000050100000101000008010000020100000901000001
-010000030100002301010008010000020100000101000002010000010100000201000004
-010000050100000201000005010000020100000301000006010000020100000201000001
-010000020100000801000005010000020100000101000002010000030100000301000005
-0100000201000004010000050100000201000005010000260101000a0100004c01000701
-030200010504070103020001050202020103020205030100000801000002010000010100
-00020100000a010000030100000201000001010100010100009a010100810101000a0100
-000401000001010000030101000201000002010000030101000301000001010000020100
-002401010008010000020100000101010001010000010101000101000004010000050100
-000201000002010000010100000201000003010000060100000201000002010000010100
-000201000008010000020100000101000002010000010100000201000003010000030100
-0005010000020100000401000005010000020100000201000001010000260101000a0100
-004c01000701030100010505070103020001050202020103020205030100000901030002
-0102000c0101000201030001010000000101009b010100810101000b0100000401010004
-010100030102000401010004010100020100002501010009010300010100000001010002
-010000000101000501000005010000030102000301030004010100040100000301020002
-010000020100000901020003010200020100000201000004010100010100000601020005
-010000050100000301020002010000260101000a0100004c010007010301000105060701
-030100010502020201030202050301000015010500af010100810101000c010000230100
-00260101000f010000050100003c01050068010100580100070103000001050707010301
-000105020202010302020503010000cb01010081010100590101000f01000005010000ab
-010100580100070103000001050807010300000105020202010302020503010000cb0101
-0081010100590101000f01000005010000ab01010058010007010001070b030000010502
-0202010302020503010000cb0101008101010059010100c301010058010007010000070d
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-030e000105020202010302020503010000cb0101008101010059010100c3010100580100
-0701001005020202010302020503010000cb0101008101010059010100c3010100580100
-0701000d070000010502020201030202050301ff01ff01ce07010001050a070100010502
-020201030202050308cd01ff01ff010007010001050a0701000105020202010302020503
-080009cb08000100098101010959010109c301010958010007010001050a070100010502
-0202010302020503080009cb08000100090b0101094e0101092201010959010109c30101
-0958010007010001050a0701000105020202010302020503080009cb08000100090a0100
-091c0100092a01000908010009210101090c0100092a0100091f010109c3010109580100
-07010001050a07010001050202020103020205030800091a080009af08000100090a0100
-0905010009050101090c010009040101090a010209020104090a01010902010009070100
-09210101090b010009040101090a010209020104090a010109020100091e0101091a0100
-09a70101090901020903010209020104093c010007010001050a07010001050202020103
-020205030800091a080009af08000100090a0100090401010904010009010100090a0100
-090401000901010009080100090201000901010009020100090901000901010009020100
-0906010009210101090a0100090401000901010009080100090201000901010009020100
-090901000901010009020100091d0101091a010009a70101090801000902010009010100
-090201000901010009020100093c010007010001050a0701000105020202010302020503
-0800090908020903080209030801090008000902080209a908000100090a010009030100
-090001000904010009010100090901000905010009010100090c01000905010009090100
-09010100090301000905010009210101090901000905010009010100090c010009050100
-090901000901010009030100091c01010909010209030102090301010900010009020102
-090a01020903010209020100090001010902010009020100090201020902010009000101
-09700101090c01000905010009050100093c010007010001050a07010001050202020103
-020205030800090808000902080009010800090208000901080009010801090108000902
-080009a808000100090a0100090501000904010009010100090801000906010009010100
-090c010009040100090a0100090101000904010009040100092101010908010009060100
-09010100090c010009040100090a01000901010009040100091b01010908010009020100
-090101000902010009010100090101010901010009020100090801000902010009010100
-090201000901010109010100090101000902010009010100090201000901010109010100
-096f0101090c01000905010009040100093d010007010001050a07010001050202020103
-0202050308000908080009050800090208000901080009020800090108000902080009a8
-0800010009080101090601000904010009010100090701000907010009010100090b0100
-09050100090a0100090101000905010009040101091f0101090701000907010009010100
-090b010009050100090a01000901010009050100091a0101090801000905010009020100
-090101000902010009010100090201000908010009050100090201000901010009050100
-0902010009010100090201000901010009730101090b01000905010009050100093d0100
-07010001050a070100010502020201030202050308000908080009050800090208000901
-0800090208000901080409a808000100090a010009050100090401000901010009080100
-0906010009010100090a010009060100090a010009010100090401000904010009210101
-090801000906010009010100090a010009060100090a01000901010009040100091b0101
-090801000905010009020100090101000902010009010104090901020902010409010100
-0906010009000100090201040901010009730101090a01000905010009060100093d0100
-07010001050a070100010502020201030202050308000908080009050800090208000901
-0800090208000901080009ac08000100090a010009050100090401000901010009090100
-09050100090101000909010009060100090b010009010100090301000905010009210101
-0909010009050100090101000909010009060100090b01000901010009030100091c0101
-090801000905010009020100090101000902010009010100091001000901010009050100
-0906010009000100090201000905010009730101090901000905010009060100093e0100
-07010001050a070100010502020201030202050308000908080009020800090108000902
-08000901080009010801090108000902080009a808000100090a01000905010009040100
-090101000903010109040100090401000901010009030101090201000907010009050101
-0903010009010100090201000906010009210101090a0100090401000901010009030101
-090201000907010009050101090301000901010009020100091d01010908010009020100
-090101000902010009010100090101010901010009020100090801000902010009010100
-090201000901010009070100090301000902010009010100097301010908010009050100
-09070100093e010007010001050a07010001050202020103020205030800090908020903
-080209030801090008000902080209a908000100090a0100090301040903010109040101
-090501000904010109040101090201040903010009050101090401010902010009070100
-09210101090b010009040101090401010902010409030100090501010904010109020100
-091e01010909010209030102090301010900010009020102090a01020903010209020100
-09070100090401020902010009730101090801040901010409030100093e010007010001
-050a0701000105020202010302020503080009cb08000100090a01000914010009060100
-092a01000908010009210101090c0100092a0100091f0101092301050999010109580100
-07010001050a0701000105020202010302020503080009cb08000100090b010109100101
-093b0101092201010959010109c301010958010007010001050a07010001050202020103
-02020503080009cb08000100098101010959010109c301010958010007010001050a0701
-000105020202010302020503080009cb08000100098101010959010109c3010109580100
-07010001050a0701000105020202010302020503080009cb080001000981010109590101
-09c301010958010007010001050a0701000105020202010302020503080009cb08000100
-098101010959010109c301010958010007010001050a0701000105020202010302020503
-080009cb08000100098101010959010109c301010958010007010001050a070100010502
-020201030202050308cd01ff01ff010007010001050a0701000105020202010302020503
-08cd01ff01ff010007010001050a0701000105020202010302020503080009cb08000100
-098101010959010109c301010958010007010001050a0701000105020202010302020503
-080009cb08000100090b0101094e0101092201010959010109c301010958010007010001
-050a0701000105020202010302020503080009cb08000100090a0100091c0100092a0100
-0908010009210101090c0100092a0100091f010109c301010958010007010001050a0701
-0001050202020103020205030800091a080009af08000100090a01000905010009050100
-090d010009040101090a010209020104090a0101090201000907010009210101090b0100
-09040101090a010209020104090a010109020100091e0101091a010009a7010109090102
-090301020944010007010001050a07010001050202020103020205030800091a080009af
-08000100090a01000904010109040101090c010009040100090101000908010009020100
-09010100090201000909010009010100090201000906010009210101090a010009040100
-0901010009080100090201000901010009020100090901000901010009020100091d0101
-091a010009a70101090801000902010009010100090201000943010007010001050a0701
-000105020202010302020503080009090802090308020903080109000800090208020909
-0800090008010903080209020801090008000903080209030802097f08000100090a0100
-09030100090001000903010009000100090b01000905010009010100090c010009050100
-0909010009010100090301000905010009210101090901000905010009010100090c0100
-09050100090901000901010009030100091c010109090102090301020903010109000100
-09020102090a010209030102090201000900010109020100090201000902010209020100
-0900010109700101090c0100090501000943010007010001050a07010001050202020103
-020205030800090808000902080009010800090208000901080009010801090108000902
-080009080801090108000901080009020800090108000900080009000800090108000902
-08000901080009020800097e08000100090a01000905010009050100090a010009060100
-09010100090c010009040100090a01000901010009040100090401000921010109080100
-0906010009010100090c010009040100090a01000901010009040100091b010109080100
-090201000901010009020100090101000901010109010100090201000908010009020100
-090101000902010009010101090101000901010009020100090101000902010009010101
-09010100096f0101090c0100090501000943010007010001050a07010001050202020103
-020205030800090808000905080009020800090108000902080009010800090208000908
-080009020800090508000901080009000800090008000901080009020800090108000982
-08000100090801010906010009050100090901000907010009010100090b010009050100
-090a0100090101000905010009040101091f0101090701000907010009010100090b0100
-09050100090a01000901010009050100091a010109080100090501000902010009010100
-090201000901010009020100090801000905010009020100090101000905010009020100
-09010100090201000901010009730101090a0101090401010944010007010001050a0701
-000105020202010302020503080009080800090508000902080009010800090208000901
-08040908080009020800090208030901080009000800090008000901080409020802097f
-08000100090a01000905010009050100090a01000906010009010100090a010009060100
-090a010009010100090401000904010009210101090801000906010009010100090a0100
-09060100090a01000901010009040100091b010109080100090501000902010009010100
-090201000901010409090102090201040901010009060100090001000902010409010100
-09730101090c0100090501000943010007010001050a0701000105020202010302020503
-0800090808000905080009020800090108000902080009010800090c0800090208000901
-0800090208000901080009000800090008000901080009090800097e08000100090a0100
-0905010009050100090b010009050100090101000909010009060100090b010009010100
-0903010009050100092101010909010009050100090101000909010009060100090b0100
-0901010009030100091c0101090801000905010009020100090101000902010009010100
-0910010009010100090501000906010009000100090201000905010009730101090c0100
-090501000943010007010001050a07010001050202020103020205030800090808000902
-080009010800090208000901080009010801090108000902080009080800090208000901
-08000902080009010800090008000900080009010800090208000901080009020800097e
-08000100090a010009050100090501000905010109040100090401000901010009030101
-0902010009070100090501010903010009010100090201000906010009210101090a0100
-090401000901010009030101090201000907010009050101090301000901010009020100
-091d01010908010009020100090101000902010009010100090101010901010009020100
-090801000902010009010100090201000901010009070100090301000902010009010100
-09730101090801000902010009010100090201000943010007010001050a070100010502
-020201030202050308000909080209030802090308010900080009020802090908000902
-0800090208030901080009000800090008000902080209030802097f08000100090a0100
-090301040901010409030101090501000904010109040101090201040903010009050101
-09040101090201000907010009210101090b010009040101090401010902010409030100
-090501010904010109020100091e01010909010209030102090301010900010009020102
-090a01020903010209020100090701000904010209020100097301010909010209030102
-0944010007010001050a070100010502020201030202050308000923080509a108000100
-090a01000914010009060100092a01000908010009210101090c0100092a0100091f0101
-09230105099901010958010007010001050a0701000105020202010302020503080009cb
-08000100090b010109100101093b0101092201010959010109c301010958010007010001
-050a0701000105020202010302020503080009cb08000100098101010959010109c30101
-0958010007010001050a0701000105020202010302020503080009cb0800010009810101
-0959010109c301010958010007010001050a0701000105020202010302020503080009cb
-08000100098101010959010109c301010958010007010001050a07010001050202020103
-02020503080009cb08000100098101010959010109c301010958010007010001050a0701
-000105020202010302020503080009cb08000100098101010959010109c3010109580100
-07010001050a070100010502020201030202050308cd01ff01ff010007010001050a0701
-00010502020201030202050308cd01ff01ff010007010001050a07010001050202020103
-02020503080009cb08000100098101010959010109c301010958010007010001050a0701
-000105020202010302020503080009cb08000100090b0101094701010929010109590101
-09c301010958010007010001050a0701000105020202010302020503080009cb08000100
-090a010009150100092a01000908010009280101090c0100092a0100091f010109c30101
-0958010007010001050a07010001050202020103020205030800091d08000908080009a2
-08000100090a010009040102090c010009040101090b010009030104090a010109020100
-0907010009280101090b010009040101090b010009030104090a010109020100091e0101
-09180100090a01000922010209770101090a0100094c010007010001050a070100010502
-02020103020205030800091d080009ac08000100090a01000903010009020100090a0100
-090401000901010009090101090301000902010009090100090101000902010009060100
-09280101090a010009040100090101000909010109030100090201000909010009010100
-09020100091d010109180100090a0100092401000977010109090101094c010007010001
-050a07010001050202020103020205030800090908020903080209030802090208000901
-0800090308020903080209030802099408000100090a0100090301000902010009090100
-090501000901010009080100090001000907010009090100090101000903010009050100
-092801010909010009050100090101000908010009000100090701000909010009010100
-09030100091c010109080100090001010903010209020104090801000901010009030102
-090201000900010109020100090001010903010209050100097701010908010009000100
-094c010007010001050a0701000105020202010302020503080009080800090208000901
-080009020800090108000902080009010800090008000906080009020800090208000901
-080009020800099308000100090a01000903010009020100090801000906010009010100
-090a010009060100090a0100090101000904010009040100092801010908010009060100
-09010100090a010009060100090a01000901010009040100091b01010908010109010100
-090101000902010009030100090a01000900010009030100090201000901010109010100
-090101010901010009010100090201000904010009770101090a0100094c010007010001
-050a07010001050202020103020205030800090808000905080009020800090108000902
-080009010801090708000902080009020800090108000997080001000908010109050102
-090801000907010009010100090a010009060100090a0100090101000905010009040101
-09260101090701000907010009010100090a010009060100090a01000901010009050100
-091a01010908010009020100090101000902010009030100090a01010904010009020100
-09010100090501000902010009010100090201000904010009770101090a0100094c0100
-07010001050a070100010502020201030202050308000908080009050800090208000901
-08000902080009010801090708000902080409020802099408000100090a010009030100
-09020100090801000906010009010100090a010009060100090a01000901010009040100
-0904010009280101090801000906010009010100090a010009060100090a010009010100
-09040100091b010109080100090201000901010409030100090a01010904010409010100
-0905010009020100090101040904010009770101090a0100094c010007010001050a0701
-000105020202010302020503080009080800090508000902080009010800090208000901
-080009000800090608000902080009090800099308000100090a01000903010009020100
-090901000905010009010100090a010009050100090b0100090101000903010009050100
-09280101090901000905010009010100090a010009050100090b01000901010009030100
-091c010109080100090201000901010009070100090a0100090001000903010009050100
-0905010009020100090101000908010009770101090a0100094c010007010001050a0701
-000105020202010302020503080009080800090208000901080009020800090108000902
-080009010800090108000905080009020800090208000901080009020800099308000100
-090a01000903010009020100090301010904010009040100090101000903010109040100
-09050100090501010903010009010100090201000906010009280101090a010009040100
-0901010009030101090401000905010009050101090301000901010009020100091d0101
-0908010009020100090101000902010009030100090a0100090101000902010009020100
-09010100090501000902010009010100090201000904010009770101090a0100094c0100
-07010001050a070100010502020201030202050308000909080209030802090308020902
-080009020800090408000903080209030802099408000100090a01000904010209040101
-090501000904010109040101090201040903010009050101090401010902010009070100
-09280101090b010009040101090401010902010409030100090501010904010109020100
-091e01010908010009020100090201020905010109080100090201000902010209020100
-090501000902010009020102090501000977010109080104094a010007010001050a0701
-000105020202010302020503080009cb08000100090a0100090d010009060100092a0100
-0908010009280101090c0100092a0100091f0101091c010509a001010958010007010001
-050a0701000105020202010302020503080009cb08000100090b010109090101093b0101
-092901010959010109c301010958010007010001050a0701000105020202010302020503
-080009cb08000100098101010959010109c301010958010007010001050a070100010502
-0202010302020503080009cb08000100098101010959010109c301010958010007010001
-050a0701000105020202010302020503080009cb08000100098101010959010109c30101
-0958010007010001050a0701000105020202010302020503080009cb0800010009810101
-0959010109c301010958010007010001050a0701000105020202010302020503080009cb
-08000100098101010959010109c301010958010007010001050a07010001050202020103
-0202050308cd01ff01ff010007010001050a070100010502020201030202050301ff01ff
-01ce07010001050a0701000105020202010302020503010000cb01010081010100590101
-00c301010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb010100810101000c0100002a0100001f010100c301010058010007010001050a0701
-00010502020201030202050301000010010200090100000d0102000a010200100100007b
-010100810101000b010000040101000b010000050100000c010100020100001e01010010
-010200090100000d010200930101000a0101004b010007010001050a0701000105020202
-01030202050301000012010000090100000f0100000c010000100100007b010100810101
-000a010000040100000101000009010100040101000b01000001010000020100001d0101
-0012010000090100000f0100009301010009010000010100004a010007010001050a0701
-000105020202010302020503010000090101000001000004010000030102000201000000
-01010003010200050100000c010000030102000301020002010000010100000301020071
-01010081010100090100000501000001010000080100000001000003010000000100000b
-01000001010000030100001c010100090101000001000004010000030102000201000000
-01010003010200050100000901000000010100030102000201010000010000030102000a
-01020003010200020100000001010002010000020100000201020002010000000101003f
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000801000001010100040100000201000002010000010101000101000001010000020100
-00040100000c010000020100000201000001010000020100000101000000010000030100
-000201000070010100810101000801000006010000010100000a010000050100000b0100
-0001010000040100001b0101000801000001010100040100000201000002010000010101
-000101000001010000020100000401000009010100010100000101000002010000010100
-000001000000010000010100000201000008010000020100000101000002010000010101
-00010100000101000002010000010100000201000001010100010100003e010100090100
-00010100004a010007010001050a07010001050202020103020205030100000801000002
-010000040100000201000002010000010100000201000005010000040100000c01000002
-010000020100000101000005010100040100007401010081010100070100000701000001
-0100000a010000050100000b01000001010000050100001a010100080100000201000004
-010000020100000201000001010000020100000501000004010000090100000201000005
-010000010100000001000000010000010100000201000008010000050100000201000001
-01000005010000020100000101000002010000010100004201010009010000010100004a
-010007010001050a07010001050202020103020205030100000801000002010000040100
-000201000002010000010100000201000002010300040100000c01000002010000020100
-0001010000050101000501020071010100810101000801000006010000010100000a0100
-00050100000b01000001010000040100001b010100080100000201000004010000020100
-000201000001010000020100000201030004010000090100000201000002010300010100
-000001000000010000010104000901020002010400010100000601000000010000020104
-00010100004201010009010000010100004a010007010001050a07010001050202020103
-020205030100000801000002010000040100000201000002010000010100000201000001
-01000002010000040100000c010000020100000201000001010000050100000001000007
-01000070010100810101000901000005010000010100000a010000050100000b01000001
-010000030100001c01010008010000020100000401000002010000020100000101000002
-010000010100000201000004010000090100000201000001010000020100000101000000
-010000000100000101000010010000010100000501000006010000000100000201000005
-0100004201010009010000010100004a010007010001050a070100010502020201030202
-050301000008010000010101000401000002010000020100000101010001010000010100
-0002010000040100000c0100000201000002010000010100000201000001010000010100
-00020100000201000070010100810101000a010000040100000101000003010100040100
-0005010000050101000301000001010000020100001d0101000801000001010100040100
-000201000002010000010101000101000001010000020100000401000009010000020100
-000101000002010000010100000001000000010000010100000201000008010000020100
-000101000002010000010100000701000003010000020100000101000042010100090100
-00010100004a010007010001050a07010001050202020103020205030100000901010000
-0100000401000003010200020100000001010003010300040100000c0100000301020003
-01020002010000020100000201020071010100810101000b010000040101000401010002
-010400010104000301010004010100020100001e01010009010100000100000401000003
-010200020100000001010003010300040100000901000002010000020103000101000000
-01000000010000020102000a010200030102000201000007010000040102000201000042
-0101000a0101004b010007010001050a07010001050202020103020205030100000c0100
-002301050093010100810101000c0100002a0100001f0101000c010000230105001c0105
-006801010058010007010001050a07010001050202020103020205030100000801000002
-010000bd01010081010100590101000801000002010000b501010058010007010001050a
-070100010502020201030202050301000009010200be0101008101010059010100090102
-00b601010058010007010001050a0701000105020202010302020503010000cb01010081
-01010059010100c301010058010007010001050a07010001050202020103020205030100
-00cb0101008101010059010100c301010058010007010001050a07010001050202020103
-02020503010000cb0101008101010059010100c301010058010007010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a070100010502020201030202050301ff01ff01ce07010001050a0701000105020202
-01030202050301ff01ff01ce07010001050a0701000105020202010302020503010000cb
-0101008101010059010100c301010058010007010001050a070100010502020201030202
-0503010000cb0101008101010059010100c301010058010007010001050a070100010502
-0202010302020503010000cb010100810101000c0100002a0100001f010100c301010058
-010007010001050a070100010502020201030202050301000010010200090100000d0102
-009b010100810101000b010000040101000b010000050100000c010100020100001e0101
-0010010200090100000d010200930101000a0101004b010007010001050a070100010502
-020201030202050301000012010000090100000f0100009b010100810101000a01000004
-0100000101000009010100040101000b01000001010000020100001d0101001201000009
-0100000f0100009301010009010000010100004a010007010001050a0701000105020202
-010302020503010000090101000001000004010000030102000201000000010100030102
-000501000009010000000101000301020002010100000100000301020003010200710101
-0081010100090100000501000001010000080100000001000003010000000100000b0100
-0001010000030100001c0101000901010000010000040100000301020002010000000101
-0003010200050100000901000000010100030102000201010000010000030102000a0102
-0003010200020100000001010002010000020100000201020002010000000101003f0101
-0009010000010100004a010007010001050a070100010502020201030202050301000008
-010000010101000401000002010000020100000101010001010000010100000201000004
-010000090101000101000001010000020100000101000000010000000100000101000002
-010000010100000201000070010100810101000801000006010000010100000a01000005
-0100000b01000001010000040100001b0101000801000001010100040100000201000002
-010000010101000101000001010000020100000401000009010100010100000101000002
-010000010100000001000000010000010100000201000008010000020100000101000002
-01000001010100010100000101000002010000010100000201000001010100010100003e
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000801000002010000040100000201000002010000010100000201000005010000040100
-000901000002010000050100000101000000010000000100000101000002010000010100
-0074010100810101000701000007010000010100000a010000050100000b010000010100
-00050100001a010100080100000201000004010000020100000201000001010000020100
-000501000004010000090100000201000005010000010100000001000000010000010100
-000201000008010000050100000201000001010000050100000201000001010000020100
-00010100004201010009010000010100004a010007010001050a07010001050202020103
-020205030100000801000002010000040100000201000002010000010100000201000002
-010300040100000901000002010000020103000101000000010000000100000101040002
-01020071010100810101000801000006010000010100000a010000050100000b01000001
-010000040100001b01010008010000020100000401000002010000020100000101000002
-010000020103000401000009010000020100000201030001010000000100000001000001
-010400090102000201040001010000060100000001000002010400010100004201010009
-010000010100004a010007010001050a0701000105020202010302020503010000080100
-000201000004010000020100000201000001010000020100000101000002010000040100
-000901000002010000010100000201000001010000000100000001000001010000090100
-0070010100810101000901000005010000010100000a010000050100000b010000010100
-00030100001c010100080100000201000004010000020100000201000001010000020100
-000101000002010000040100000901000002010000010100000201000001010000000100
-000001000001010000100100000101000005010000060100000001000002010000050100
-004201010009010000010100004a010007010001050a0701000105020202010302020503
-010000080100000101010004010000020100000201000001010100010100000101000002
-010000040100000901000002010000010100000201000001010000000100000001000001
-01000002010000010100000201000070010100810101000a010000040100000101000003
-0101000401000005010000050101000301000001010000020100001d0101000801000001
-010100040100000201000002010000010101000101000001010000020100000401000009
-010000020100000101000002010000010100000001000000010000010100000201000008
-010000020100000101000002010000010100000701000003010000020100000101000042
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000901010000010000040100000301020002010000000101000301030004010000090100
-000201000002010300010100000001000000010000020102000301020071010100810101
-000b010000040101000401010002010400010104000301010004010100020100001e0101
-000901010000010000040100000301020002010000000101000301030004010000090100
-000201000002010300010100000001000000010000020102000a01020003010200020100
-00070100000401020002010000420101000a0101004b010007010001050a070100010502
-02020103020205030100000c0100002301050093010100810101000c0100002a0100001f
-0101000c010000230105001c0105006801010058010007010001050a0701000105020202
-0103020205030100000801000002010000bd010100810101005901010008010000020100
-00b501010058010007010001050a070100010502020201030202050301000009010200be
-010100810101005901010009010200b601010058010007010001050a0701000105020202
-010302020503010000cb0101008101010059010100c301010058010007010001050a0701
-000105020202010302020503010000cb0101008101010059010100c30101005801000701
-0001050a0701000105020202010302020503010000cb0101008101010059010100c30101
-0058010007010001050a0701000105020202010302020503010000cb0101008101010059
-010100c301010058010007010001050a070100010502020201030202050301ff01ff01ce
-07010001050a070100010502020201030202050301ff01ff01ce07010001050a07010001
-05020202010302020503010000cb0101008101010059010100c301010058010007010001
-050a0701000105020202010302020503010000cb0101008101010059010100c301010058
-010007010001050a0701000105020202010302020503010000cb010100810101000c0100
-002a0100001f010100c301010058010007010001050a0701000105020202010302020503
-01000010010200090100000d0102004301000056010100810101000b010000040101000b
-010000050100000c010100020100001e01010010010200090100000d010200930101000a
-0101004b010007010001050a070100010502020201030202050301000012010000090100
-000f0100004301000056010100810101000a010000040100000101000009010100040101
-000b01000001010000020100001d01010012010000090100000f01000093010100090100
-00010100004a010007010001050a07010001050202020103020205030100000901010000
-010000040100000301020002010000000101000301020005010000090100000001010003
-010200020101000001000003010200030102000a01020002010000020100000101040054
-01010081010100090100000501000001010000080100000001000003010000000100000b
-01000001010000030100001c010100090101000001000004010000030102000201000000
-01010003010200050100000901000000010100030102000201010000010000030102000a
-01020003010200020100000001010002010000020100000201020002010000000101003f
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000801000001010100040100000201000002010000010101000101000001010000020100
-000401000009010100010100000101000002010000010100000001000000010000010100
-000201000001010000020100000801000002010000010100000201000003010000560101
-00810101000801000006010000010100000a010000050100000b01000001010000040100
-001b01010008010000010101000401000002010000020100000101010001010000010100
-000201000004010000090101000101000001010000020100000101000000010000000100
-000101000002010000080100000201000001010000020100000101010001010000010100
-0002010000010100000201000001010100010100003e01010009010000010100004a0100
-07010001050a070100010502020201030202050301000008010000020100000401000002
-010000020100000101000002010000050100000401000009010000020100000501000001
-01000000010000000100000101000002010000010100000c010000020100000201000000
-0100000401000056010100810101000701000007010000010100000a010000050100000b
-01000001010000050100001a010100080100000201000004010000020100000201000001
-010000020100000501000004010000090100000201000005010000010100000001000000
-010000010100000201000008010000050100000201000001010000050100000201000001
-01000002010000010100004201010009010000010100004a010007010001050a07010001
-050202020103020205030100000801000002010000040100000201000002010000010100
-000201000002010300040100000901000002010000020103000101000000010000000100
-000101040002010200090104000301000005010000560101008101010008010000060100
-00010100000a010000050100000b01000001010000040100001b01010008010000020100
-000401000002010000020100000101000002010000020103000401000009010000020100
-000201030001010000000100000001000001010400090102000201040001010000060100
-000001000002010400010100004201010009010000010100004a010007010001050a0701
-000105020202010302020503010000080100000201000004010000020100000201000001
-010000020100000101000002010000040100000901000002010000010100000201000001
-010000000100000001000001010000090100000801000006010000000100000401000056
-010100810101000901000005010000010100000a010000050100000b0100000101000003
-0100001c0101000801000002010000040100000201000002010000010100000201000001
-010000020100000401000009010000020100000101000002010000010100000001000000
-010000010100001001000001010000050100000601000000010000020100000501000042
-01010009010000010100004a010007010001050a07010001050202020103020205030100
-000801000001010100040100000201000002010000010101000101000001010000020100
-000401000009010000020100000101000002010000010100000001000000010000010100
-000201000001010000020100000801000002010000010100000201000003010000560101
-00810101000a010000040100000101000003010100040100000501000005010100030100
-0001010000020100001d0101000801000001010100040100000201000002010000010101
-000101000001010000020100000401000009010000020100000101000002010000010100
-000001000000010000010100000201000008010000020100000101000002010000010100
-00070100000301000002010000010100004201010009010000010100004a010007010001
-050a07010001050202020103020205030100000901010000010000040100000301020002
-010000000101000301030004010000090100000201000002010300010100000001000000
-01000002010200030102000a01020002010000020100000401010054010100810101000b
-010000040101000401010002010400010104000301010004010100020100001e01010009
-010100000100000401000003010200020100000001010003010300040100000901000002
-01000002010300010100000001000000010000020102000a010200030102000201000007
-0100000401020002010000420101000a0101004b010007010001050a0701000105020202
-0103020205030100000c010000230105002301050069010100810101000c0100002a0100
-001f0101000c010000230105001c0105006801010058010007010001050a070100010502
-02020103020205030100000801000002010000bd01010081010100590101000801000002
-010000b501010058010007010001050a0701000105020202010302020503010000090102
-00be010100810101005901010009010200b601010058010007010001050a070100010502
-0202010302020503010000cb0101008101010059010100c301010058010007010001050a
-0701000105020202010302020503010000cb0101008101010059010100c3010100580100
-07010001050a0701000105020202010302020503010000cb0101008101010059010100c3
-01010058010007010001050a0701000105020202010302020503010000cb010100810101
-0059010100c301010058010007010001050a070100010502020201030202050301ff01ff
-01ce07010001050a070100010502020201030202050308cd01ff01ff010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100000b0101004e
-0101002201010059010100c301010058010007010001050a070100010502020201030202
-0503080000cb08000100000a0100001c0100002a01000008010000210101000c0100002a
-0100001f010100c301010058010007010001050a07010001050202020103020205030800
-00cb08000100000a01000005010000040102000c010000040101000d010000020102000b
-0101000201000007010000210101000b010000040101000d010000020102000b01010002
-0100001e0101002001010018010000150100006f01010009010200020104004301000701
-0001050a0701000105020202010302020503080000cb08000100000a0100000401010003
-010000020100000a01000004010000010100000b01010001010000020100000901000001
-0100000201000006010000210101000a01000004010000010100000b0101000101000002
-0100000901000001010000020100001d0101001f0100001a010000150100006f01010008
-010000020100000101000047010007010001050a07010001050202020103020205030800
-000908010000080000020802000908000000080100030802000208010000080000030802
-00030802008d08000100000a010000030100000001000007010000090100000501000001
-0100000a0100000001000005010000090100000101000003010000050100002101010009
-01000005010000010100000a01000000010000050100000901000001010000030100001c
-0101000901010000010000020102000b0100000301000000010100030102000201000000
-0101000201040002010200020100000001010003010100000100006f0101000801000002
-0100000101000047010007010001050a0701000105020202010302020503080000080800
-000108010001080000020800000808010001080000010800000208000001080000000800
-0000080000010800000208000001080000020800008c08000100000a0100000501000007
-010000080100000601000001010000090100000101000005010000090100000101000004
-010000040100002101010008010000060100000101000009010000010100000501000009
-01000001010000040100001b010100080100000101010001010000020100000801040001
-010100010100000101000002010000010101000101000003010000030100000201000001
-0101000101000001010000010101006f0101000801000002010000010103004401000701
-0001050a07010001050202020103020205030800000808000002080000010800000c0800
-000208000005080000010800000008000000080000010800000208000001080000900800
-010000080101000601000006010000080100000701000001010000080100000201000003
-0101000a0100000101000005010000040101001f01010007010000070100000101000008
-01000002010000030101000a01000001010000050100001a010100080100000201000001
-0100000e0100000301000005010000020100000101000002010000030100000301000002
-010000010100000201000001010000020100006f01010009010200060100004301000701
-0001050a0701000105020202010302020503080000080800000208000002080200090800
-00020800000208030001080000000800000008000001080400020802008d08000100000a
-01000005010000050100000a010000060100000101000008010000020100000501000009
-010000010100000401000004010000210101000801000006010000010100000801000002
-010000050100000901000001010000040100001b0101000801000002010000020102000b
-010000030100000501000002010000010100000201000003010000030104000101000002
-01000001010000020100006f01010008010000020100000501000043010007010001050a
-070100010502020201030202050308000008080000020800000508000008080000020800
-00010800000208000001080000000800000008000001080000090800008c08000100000a
-01000005010000040100000c010000050100000101000008010500040100000901000001
-010000030100000501000021010100090100000501000001010000080105000401000009
-01000001010000030100001c0101000801000002010000050100000a0100000301000005
-010000020100000101000002010000030100000301000005010000020100000101000002
-0100006f0101000801000002010000010100000201000043010007010001050a07010001
-050202020103020205030800000808000001080100010800000208000008080000020800
-000108000002080000010800000008000000080000010800000208000001080000020800
-008c08000100000a01000005010000030100000701010004010000040100000101000003
-010100060100000101000002010000030101000301000001010000020100000601000021
-0101000a0100000401000001010000030101000601000001010000020100000301010003
-01000001010000020100001d010100080100000101010001010000020100000a01000003
-010000050100000201000001010000020100000301000003010000020100000101000002
-01000001010000010101006f010100080100000201000001010000020100004301000701
-0001050a0701000105020202010302020503080000090801000008000002080200090800
-00020800000208030001080000000800000008000002080200030802008d08000100000a
-010000030104000101040003010100050100000401010004010100060100000201020004
-010100040101000201000007010000210101000b01000004010100040101000601000002
-0102000401010004010100020100001e0101000901010000010000020102000b01000003
-010000060102000201000002010000040101000201020002010000020100000201010000
-0100006f010100090102000301020044010007010001050a070100010502020201030202
-05030800000c08000007080500af08000100000a01000014010000060100002a01000008
-010000210101000c0100002a0100001f0101000c01000007010500a70101005801000701
-0001050a07010001050202020103020205030800000808000002080000bd08000100000b
-010100100101003b01010022010100590101000801000002010000b50101005801000701
-0001050a070100010502020201030202050308000009080200be08000100008101010059
-01010009010200b601010058010007010001050a07010001050202020103020205030800
-00cb08000100008101010059010100c301010058010007010001050a0701000105020202
-010302020503080000cb08000100008101010059010100c301010058010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100008101010059
-010100c301010058010007010001050a070100010502020201030202050308cd01ff01ff
-010007010001050a070100010502020201030202050308cd01ff01ff010007010001050a
-0701000105020202010302020503080000cb08000100008101010059010100c301010058
-010007010001050a0701000105020202010302020503080000cb08000100000b0101004e
-0101002201010059010100c301010058010007010001050a070100010502020201030202
-0503080000cb08000100000a0100001c0100002a01000008010000210101000c0100002a
-0100001f010100c301010058010007010001050a07010001050202020103020205030800
-00110800000308000010080000010800009e08000100000a01000005010000040102000c
-010000040101000d010000050100000a0101000201000007010000210101000b01000004
-0101000d010000050100000a010100020100001e010100c30101000a0100000401020044
-010007010001050a07010001050202020103020205030800001108000003080000100800
-00010800009e08000100000a0100000401010003010000020100000a0100000401000001
-0100000b0101000401010009010000010100000201000006010000210101000a01000004
-010000010100000b010100040101000901000001010000020100001d010100c301010009
-010100030100000201000043010007010001050a07010001050202020103020205030800
-0009080100000800000108040001080000010800000a0801000008000001080000000801
-009b08000100000a0100000301000000010000070100000901000005010000010100000a
-010000000100000301000000010000090100000101000003010000050100002101010009
-01000005010000010100000a010000000100000301000000010000090100000101000003
-0100001c010100c30101000801000000010000030100000201000043010007010001050a
-070100010502020201030202050308000008080000010801000308000003080000000800
-000a0800000108010001080100010800009a08000100000a010000050100000701000008
-010000060100000101000009010000010100000201000001010000090100000101000004
-010000040100002101010008010000060100000101000009010000010100000201000001
-0100000901000001010000040100001b010100c30101000a010000030100000201000043
-010007010001050a07010001050202020103020205030800000808000002080000030800
-00030801000b0800000208000001080000020800009a0800010000080101000601000005
-010100080100000701000001010000080100000201000001010000020100000901000001
-01000005010000040101001f010100070100000701000001010000080100000201000001
-010000020100000901000001010000050100001a010100c30101000a0100000401030043
-010007010001050a07010001050202020103020205030800000808000002080000030800
-00030801000b0800000208000001080000020800009a08000100000a0100000501000007
-010000080100000601000001010000080100000201000001010000020100000901000001
-010000040100000401000021010100080100000601000001010000080100000201000001
-010000020100000901000001010000040100001b010100c30101000a0100000701000043
-010007010001050a07010001050202020103020205030800000808000002080000030800
-0003080000000800000a0800000208000001080000020800009a08000100000a01000005
-010000070100000901000005010000010100000801050000010500080100000101000003
-010000050100002101010009010000050100000101000008010500000105000801000001
-010000030100001c010100c30101000a0100000701000043010007010001050a07010001
-050202020103020205030800000808000001080100030800000308000001080000090800
-000108010001080100010800009a08000100000a01000005010000030100000201000003
-010100040100000401000001010000030101000601000005010000030101000301000001
-0100000201000006010000210101000a0100000401000001010000030101000601000005
-010000030101000301000001010000020100001d010100c30101000a0100000301000002
-01000043010007010001050a070100010502020201030202050308000009080100000800
-00040801000108000002080000090801000008000001080000000801009b08000100000a
-010000030104000201020004010100050100000401010004010100060100000501000003
-010100040101000201000007010000210101000b01000004010100040101000601000005
-0100000301010004010100020100001e010100c301010008010400020102004401000701
-0001050a07010001050202020103020205030800000c0800000e080500a808000100000a
-01000014010000060100002a01000008010000210101000c0100002a0100001f010100c3
-01010058010007010001050a070100010502020201030202050308000008080000020800
-00bd08000100000b010100100101003b0101002201010059010100c30101005801000701
-0001050a070100010502020201030202050308000009080200be08000100008101010059
-010100c301010058010007010001070c000105020202010302020503080000cb08000100
-008101010059010100c301010058010007010000070d0001050202020103020205030800
-00cb08000100008101010059010100c30101005801000701030e00010502020201030202
-0503080000cb08000100008101010059010100c30101005801000701030e000105020202
-010302020503080000cb08000100008101010059010100c30101005801000701030e0001
-0502020201030202050308cd01ff01ff01000701030e00010502020201030202050308cd
-01ff01ff01000701030e000105020202010302020503080000cb08000100008101010059
-010100c30101005801000701030e000105020202010302020503080000cb08000100000b
-0101004e0101002201010059010100c30101005801000701030e00010502020201030202
-0503080000cb08000100000a0100001c0100002a01000008010000210101000c0100002a
-0100001f010100c30101005801000701030e000105020202010302020503080000110800
-000308000010080000010800009e08000100000a01000005010000070100000b01000004
-0101000d010000050100000a0101000201000007010000210101000b010000040101000d
-010000050100000a010100020100001e010100c301010008010400020102004401000701
-030e000105020202010302020503080000110800000308000010080000010800009e0800
-0100000a01000004010100060101000a01000004010000010100000b0101000401010009
-010000010100000201000006010000210101000a01000004010000010100000b01010004
-0101000901000001010000020100001d010100c301010008010000050100000201000043
-01000701030e000105020202010302020503080000090801000008000001080400010800
-00010800000a0801000008000001080000000801009b08000100000a0100000301000000
-01000005010000000100000901000005010000010100000a010000000100000301000000
-01000009010000010100000301000005010000210101000901000005010000010100000a
-0100000001000003010000000100000901000001010000030100001c010100c301010008
-01000005010000020100004301000701030e000105020202010302020503080000080800
-00010801000308000003080000000800000a0800000108010001080100010800009a0800
-0100000a0100000501000004010000010100000801000006010000010100000901000001
-010000020100000101000009010000010100000401000004010000210101000801000006
-01000001010000090100000101000002010000010100000901000001010000040100001b
-010100c30101000801030002010000020100004301000701030e00010502020201030202
-0503080000080800000208000003080000030801000b0800000208000001080000020800
-009a08000100000801010006010000030100000201000007010000070100000101000008
-010000020100000101000002010000090100000101000005010000040101001f01010007
-010000070100000101000008010000020100000101000002010000090100000101000005
-0100001a010100c30101000c010000020102004401000701030e00010502020201030202
-0503080000080800000208000003080000030801000b0800000208000001080000020800
-009a08000100000a01000005010000030100000201000008010000060100000101000008
-010000020100000101000002010000090100000101000004010000040100002101010008
-010000060100000101000008010000020100000101000002010000090100000101000004
-0100001b010100c30101000c01000001010000020100004301000701030e000105020202
-01030202050308000008080000020800000308000003080000000800000a080000020800
-0001080000020800009a08000100000a0100000501000003010500080100000501000001
-010000080105000001050008010000010100000301000005010000210101000901000005
-0100000101000008010500000105000801000001010000030100001c010100c301010008
-0100000201000001010000020100004301000701030e0001050202020103020205030800
-000808000001080100030800000308000001080000090800000108010001080100010800
-009a08000100000a01000005010000070100000301010004010000040100000101000003
-01010006010000050100000301010003010000010100000201000006010000210101000a
-010000040100000101000003010100060100000501000003010100030100000101000002
-0100001d010100c3010100080100000201000001010000020100004301000701030e0001
-050202020103020205030800000908010000080000040801000108000002080000090801
-000008000001080000000801009b08000100000a01000003010400050100000301010005
-010000040101000401010006010000050100000301010004010100020100000701000021
-0101000b010000040101000401010006010000050100000301010004010100020100001e
-010100c301010009010200030102004401000701030e0001050202020103020205030800
-000c0800000e080500a808000100000a01000014010000060100002a0100000801000021
-0101000c0100002a0100001f010100c30101005801000701030e00010502020201030202
-05030800000808000002080000bd08000100000b010100100101003b0101002201010059
-010100c30101005801000701030e00010502020201030202050308000009080200be0800
-0100008101010059010100c30101005801000701030e0001050202020103020205030800
-00cb08000100008101010059010100c30101005801000701030e00010502020201030202
-0503080000cb08000100008101010059010100c30101005801000701030e000105020202
-010302020503080000cb08000100008101010059010100c30101005801000701030e0001
-05020202010302020503080000cb08000100008101010059010100c30101005801000701
-030e00010502020201030202050308cd01ff01ff01000701030e00010502020201030202
-050308cd01ff01ff01000701030e000105020202010302020503080000cb080001000081
-01010059010100c30101005801000701030e000105020202010302020503080000cb0800
-0100000b0101004e0101002201010059010100c30101005801000701030e000105020202
-010302020503080000cb08000100000a0100001c0100002a01000008010000210101000c
-0100002a0100001f010100c30101005801000701030e0001050202020103020205030800
-00110800000308000010080000010800009e08000100000a01000005010000030104000b
-010000040101000d010000050100000a0101000201000007010000210101000b01000004
-0101000d010000050100000a010100020100001e010100c3010100090102000301020044
-01000701030e000105020202010302020503080000110800000308000010080000010800
-009e08000100000a01000004010100030100000e01000004010000010100000b01010004
-01010009010000010100000201000006010000210101000a01000004010000010100000b
-010100040101000901000001010000020100001d010100c3010100080100000201000001
-010000020100004301000701030e00010502020201030202050308000009080100000800
-000108040001080000010800000a0801000008000001080000000801009b08000100000a
-0100000301000000010000030100000d01000005010000010100000a0100000001000003
-010000000100000901000001010000030100000501000021010100090100000501000001
-0100000a0100000001000003010000000100000901000001010000030100001c010100c3
-0101000c010000050100004301000701030e000105020202010302020503080000080800
-00010801000308000003080000000800000a0800000108010001080100010800009a0800
-0100000a0100000501000003010300090100000601000001010000090100000101000002
-010000010100000901000001010000040100000401000021010100080100000601000001
-010000090100000101000002010000010100000901000001010000040100001b010100c3
-0101000c010000050100004301000701030e000105020202010302020503080000080800
-000208000003080000030801000b0800000208000001080000020800009a080001000008
-010100060100000701000007010000070100000101000008010000020100000101000002
-010000090100000101000005010000040101001f01010007010000070100000101000008
-0100000201000001010000020100000901000001010000050100001a010100c30101000a
-010100040101004401000701030e00010502020201030202050308000008080000020800
-0003080000030801000b0800000208000001080000020800009a08000100000a01000005
-010000070100000801000006010000010100000801000002010000010100000201000009
-010000010100000401000004010000210101000801000006010000010100000801000002
-01000001010000020100000901000001010000040100001b010100c30101000c01000005
-0100004301000701030e0001050202020103020205030800000808000002080000030800
-0003080000000800000a0800000208000001080000020800009a08000100000a01000005
-010000030100000201000009010000050100000101000008010500000105000801000001
-010000030100000501000021010100090100000501000001010000080105000001050008
-01000001010000030100001c010100c30101000c010000050100004301000701030e0001
-050202020103020205030800000808000001080100030800000308000001080000090800
-000108010001080100010800009a08000100000a01000005010000030100000201000003
-010100040100000401000001010000030101000601000005010000030101000301000001
-0100000201000006010000210101000a0100000401000001010000030101000601000005
-010000030101000301000001010000020100001d010100c3010100080100000201000001
-010000020100004301000701030e00010502020201030202050308000009080100000800
-00040801000108000002080000090801000008000001080000000801009b08000100000a
-010000030104000201020004010100050100000401010004010100060100000501000003
-010100040101000201000007010000210101000b01000004010100040101000601000005
-0100000301010004010100020100001e010100c301010009010200030102004401000701
-030e0001050202020103020205030800000c0800000e080500a808000100000a01000014
-010000060100002a01000008010000210101000c0100002a0100001f010100c301010058
-01000701030e0001050202020103020205030800000808000002080000bd08000100000b
-010100100101003b0101002201010059010100c30101005801000701030e000105020202
-01030202050308000009080200be08000100008101010059010100c30101005801000701
-030e000105020202010302020503080000cb08000100008101010059010100c301010058
-01000701030e000105020202010302020503080000cb08000100008101010059010100c3
-0101005801000701030e000105020202010302020503080000cb08000100008101010059
-010100c30101005801000701030e000105020202010302020503080000cb080001000081
-01010059010100c30101005801000701030e00010502020201030202050308cd01ff01ff
-01000701030e00010502020201030202050308cd01ff01ff01000701030e000105020202
-010302020503080000cb08000100008101010059010100c30101005801000701030e0001
-05020202010302020503080000cb08000100000b0101004e0101002201010059010100c3
-0101005801000701030e000105020202010302020503080000cb08000100000a0100001c
-0100002a01000008010000210101000c0100002a0100001f010100c30101005801000701
-030e000105020202010302020503080000110800000308000010080000010800009e0800
-0100000a01000005010000040102000c010000040101000d010000050100000a01010002
-01000007010000210101000b010000040101000d010000050100000a010100020100001e
-010100c30101000a0101004b01000701030e000105020202010302020503080000110800
-000308000010080000010800009e08000100000a0100000401010003010000020100000a
-01000004010000010100000b010100040101000901000001010000020100000601000021
-0101000a01000004010000010100000b010100040101000901000001010000020100001d
-010100c301010009010000010100004a01000701030e0001050202020103020205030800
-0009080100000800000108040001080000010800000a0801000008000001080000000801
-009b08000100000a0100000301000000010000030100000d01000005010000010100000a
-010000000100000301000000010000090100000101000003010000050100002101010009
-01000005010000010100000a010000000100000301000000010000090100000101000003
-0100001c010100c301010009010000010100004a01000701030e00010502020201030202
-050308000008080000010801000308000003080000000800000a08000001080100010801
-00010800009a08000100000a01000005010000030100000c010000060100000101000009
-010000010100000201000001010000090100000101000004010000040100002101010008
-010000060100000101000009010000010100000201000001010000090100000101000004
-0100001b010100c301010009010000010100004a01000701030e00010502020201030202
-0503080000080800000208000003080000030801000b0800000208000001080000020800
-009a08000100000801010006010000030103000801000007010000010100000801000002
-0100000101000002010000090100000101000005010000040101001f0101000701000007
-01000001010000080100000201000001010000020100000901000001010000050100001a
-010100c301010009010000010100004a01000701030e0001050202020103020205030800
-00080800000208000003080000030801000b0800000208000001080000020800009a0800
-0100000a0100000501000003010000020100000801000006010000010100000801000002
-010000010100000201000009010000010100000401000004010000210101000801000006
-01000001010000080100000201000001010000020100000901000001010000040100001b
-010100c301010009010000010100004a01000701030e0001050202020103020205030800
-0008080000020800000308000003080000000800000a0800000208000001080000020800
-009a08000100000a01000005010000030100000201000009010000050100000101000008
-010500000105000801000001010000030100000501000021010100090100000501000001
-01000008010500000105000801000001010000030100001c010100c30101000901000001
-0100004a01000701030e0001050202020103020205030800000808000001080100030800
-000308000001080000090800000108010001080100010800009a08000100000a01000005
-010000030100000201000003010100040100000401000001010000030101000601000005
-0100000301010003010000010100000201000006010000210101000a0100000401000001
-010000030101000601000005010000030101000301000001010000020100001d010100c3
-01010009010000010100004a01000701030e000105020202010302020503080000090801
-0000080000040801000108000002080000090801000008000001080000000801009b0800
-0100000a0100000301040002010200040101000501000004010100040101000601000005
-01000003010100040101000201000007010000210101000b010000040101000401010006
-010000050100000301010004010100020100001e010100c30101000a0101004b01000701
-030e0001050202020103020205030800000c0800000e080500a808000100000a01000014
-010000060100002a01000008010000210101000c0100002a0100001f010100c301010058
-01000701030e0001050202020103020205030800000808000002080000bd08000100000b
-010100100101003b0101002201010059010100c30101005801000701030e000105020202
-01030202050308000009080200be08000100008101010059010100c30101005801000701
-030e000105020202010302020503080000cb08000100008101010059010100c301010058
-01000701030e000105020202010302020503080000cb08000100008101010059010100c3
-0101005801000701030e000105020202010302020503080000cb08000100008101010059
-010100c30101005801000701030e000105020202010302020503080000cb080001000081
-01010059010100c30101005801000701030e00010502020201030202050308cd01ff01ff
-01000701030e00010502020201030202050308cd01ff01ff01000701030e000105020202
-010302020503080000cb08000100008101010059010100c30101005801000701030e0001
-05020202010302020503080000cb08000100000b0101004e0101002201010059010100c3
-0101005801000701030e000105020202010302020503080000cb08000100000a0100001c
-0100002a01000008010000210101000c0100002a0100001f010100c30101005801000701
-030e000105020202010302020503080000110800000308000010080000010800009e0800
-0100000a01000005010000030104000b010000040101000d010000050100000a01010002
-01000007010000210101000b010000040101000d010000050100000a010100020100001e
-010100c30101000a01000003010400030101003d01000701030e00010502020201030202
-0503080000110800000308000010080000010800009e08000100000a0100000401010003
-010000020100000a01000004010000010100000b01010004010100090100000101000002
-01000006010000210101000a01000004010000010100000b010100040101000901000001
-010000020100001d010100c3010100090101000301000006010000010100003c01000701
-030e00010502020201030202050308000009080100000800000108040001080000010800
-000a0801000008000001080000000801009b08000100000a010000030100000001000007
-0100000901000005010000010100000a0100000001000003010000000100000901000001
-0100000301000005010000210101000901000005010000010100000a0100000001000003
-010000000100000901000001010000030100001c010100c3010100080100000001000003
-01000006010000010100003c01000701030e000105020202010302020503080000080800
-00010801000308000003080000000800000a0800000108010001080100010800009a0800
-0100000a0100000501000006010000090100000601000001010000090100000101000002
-010000010100000901000001010000040100000401000021010100080100000601000001
-010000090100000101000002010000010100000901000001010000040100001b010100c3
-0101000a0100000301030003010000010100003c01000701030e00010502020201030202
-0503080000080800000208000003080000030801000b0800000208000001080000020800
-009a08000100000801010006010000060100000801000007010000010100000801000002
-0100000101000002010000090100000101000005010000040101001f0101000701000007
-01000001010000080100000201000001010000020100000901000001010000050100001a
-010100c30101000a0100000701000002010000010100003c01000701030e000105020202
-010302020503080000080800000208000003080000030801000b08000002080000010800
-00020800009a08000100000a010000050100000601000009010000060100000101000008
-010000020100000101000002010000090100000101000004010000040100002101010008
-010000060100000101000008010000020100000101000002010000090100000101000004
-0100001b010100c30101000a0100000701000002010000010100003c01000701030e0001
-0502020201030202050308000008080000020800000308000003080000000800000a0800
-000208000001080000020800009a08000100000a01000005010000050100000b01000005
-010000010100000801050000010500080100000101000003010000050100002101010009
-010000050100000101000008010500000105000801000001010000030100001c010100c3
-0101000a010000030100000201000002010000010100003c01000701030e000105020202
-010302020503080000080800000108010003080000030800000108000009080000010801
-0001080100010800009a08000100000a0100000501000005010000050101000401000004
-010000010100000301010006010000050100000301010003010000010100000201000006
-010000210101000a01000004010000010100000301010006010000050100000301010003
-01000001010000020100001d010100c30101000a01000003010000020100000201000001
-0100003c01000701030e0001050202020103020205030800000908010000080000040801
-000108000002080000090801000008000001080000000801009b08000100000a01000003
-010400030100000501010005010000040101000401010006010000050100000301010004
-0101000201000007010000210101000b0100000401010004010100060100000501000003
-01010004010100020100001e010100c30101000801040002010200040101003d01000701
-030e0001050202020103020205030800000c0800000e080500a808000100000a01000014
-010000060100002a01000008010000210101000c0100002a0100001f010100c301010058
-01000701030e0001050202020103020205030800000808000002080000bd08000100000b
-010100100101003b0101002201010059010100c30101005801000701030e000105020202
-01030202050308000009080200be08000100008101010059010100c30101005801000701
-030e000105020202010302020503080000cb08000100008101010059010100c301010058
-01000701030e000105020202010302020503080000cb08000100008101010059010100c3
-0101005801000701030e000105020202010302020503080000cb08000100008101010059
-010100c30101005801000701030e000105020202010302020503080000cb080001000081
-01010059010100c30101005801000701030e00010502020201030202050308cd01ff01ff
-01000701030e00010502020201030202050308cd01ff01ff010007010010050202020103
-02020503080000cb08000100008101010059010100c301010058010007010300000c0700
-000105020202010302020503080000cb08000100000b0101004e01010022010100590101
-00c3010100580100070103000001050807010300000105020202010302020503080000cb
-08000100000a0100001c0100002a01000008010000210101000c0100002a0100001f0101
-00c301010058010007010301000105070701030000010502020201030202050308000011
-0800000308000010080000010800009e08000100000a01000005010000040102000c0100
-00040101000d010000050100000a0101000201000007010000210101000b010000040101
-000d010000050100000a010100020100001e010100c30101000801040001010400430100
-070103010001050607010301000105020202010302020503080000110800000308000010
-080000010800009e08000100000a0100000401010003010000020100000a010000040100
-00010100000b0101000401010009010000010100000201000006010000210101000a0100
-0004010000010100000b010100040101000901000001010000020100001d010100c30101
-000801000002010000010100000201000043010007010302000105050701030100010502
-020201030202050308000009080100000800000108040001080000010800000a08010000
-08000001080000000801009b08000100000a010000030100000001000003010000020100
-000901000005010000010100000a01000000010000030100000001000009010000010100
-000301000005010000210101000901000005010000010100000a01000000010000030100
-00000100000901000001010000030100001c010100c30101000c01000005010000430100
-070103020001050407010302000105020202010302020503080000080800000108010003
-08000003080000000800000a0800000108010001080100010800009a08000100000a0100
-000501000003010000020100000801000006010000010100000901000001010000020100
-000101000009010000010100000401000004010000210101000801000006010000010100
-00090100000101000002010000010100000901000001010000040100001b010100c30101
-000b01000005010000440100070103030001050307010302000105020202010302020503
-080000080800000208000003080000030801000b0800000208000001080000020800009a
-080001000008010100060100000401020008010000070100000101000008010000020100
-000101000002010000090100000101000005010000040101001f01010007010000070100
-0001010000080100000201000001010000020100000901000001010000050100001a0101
-00c30101000b010000050100004401000701030300010502070103030001050202020103
-02020503080000080800000208000003080000030801000b080000020800000108000002
-0800009a08000100000a0100000501000003010000020100000801000006010000010100
-000801000002010000010100000201000009010000010100000401000004010000210101
-000801000006010000010100000801000002010000010100000201000009010000010100
-00040100001b010100c30101000b01000005010000440100070103040001050107010303
-00010502020201030202050308000008080000020800000308000003080000000800000a
-0800000208000001080000020800009a08000100000a0100000501000003010000020100
-000901000005010000010100000801050000010500080100000101000003010000050100
-002101010009010000050100000101000008010500000105000801000001010000030100
-001c010100c30101000a0100000501000045010007010304000105000701030400010502
-020201030202050308000008080000010801000308000003080000010800000908000001
-08010001080100010800009a08000100000a010000050100000301000002010000030101
-000401000004010000010100000301010006010000050100000301010003010000010100
-000201000006010000210101000a01000004010000010100000301010006010000050100
-00030101000301000001010000020100001d010100c30101000a01000005010000450100
-070103050000070203040001050202020103020205030800000908010000080000040801
-000108000002080000090801000008000001080000000801009b08000100000a01000003
-010400020102000401010005010000040101000401010006010000050100000301010004
-0101000201000007010000210101000b0100000401010004010100060100000501000003
-01010004010100020100001e010100c30101000a01000005010000450100070103050000
-070103050001050202020103020205030800000c0800000e080500a808000100000a0100
-0014010000060100002a01000008010000210101000c0100002a0100001f010100c30101
-0058010007010306070103050001050202020103020205030800000808000002080000bd
-08000100000b010100100101003b0101002201010059010100c301010058010007010306
-0700030600010502020201030202050308000009080200be080001000081010100590101
-00c30101005801000701001005020202010302020503080000cb08000100008101010059
-010100c3010100580100070000110502020201030202050207ff07ff07d3051102020103
-0202050207ff07ff07d20000051102020103020205020701030d0000030000ff00ff00af
-03000001030c0001051102020103020205020701030b00010700030000ff00ff00ae0700
-03000003030a00010511020201030202050207010309000207010300000105ff05ff05ab
-0701030000050308000105110202010302020502070103070003050007010300000105ff
-05ff05ab0701030000010501000303060001051102020103020205020701030500030502
-07010300000105ff05ff05ab070103000001050300030304000105110202010302020502
-070103030003050407010300000105ff05ff05ab07010300000105050003030200010511
-0202010302020502070103010003050607010300000105ff05ff05ab0701030000010507
-000303000001051102020103020205020705050807010300000105ff05ff05ab07010300
-000105080703000105110202010302020502070103010703050607010300000105ff05ff
-05ab07010300000105070703030000010511020201030202050207010303070305040701
-0300000105ff05ff05ab0701030000010505070303020001051102020103020205020701
-03050703050207010300000105ff05ff05ab070103000001050307030304000105110202
-010302020502070103070703050007010300000105ff05ff05ab07010300000105010703
-03060001051102020103020205020701030907040300000105ff05ff05ab070103000001
-070303080001051102020103020205020701030b07020300000107ff07ff07ad03000001
-0701030a0001051102020101000405020701030d07000300000007ff07ff07ae03000000
-0700030c000105110005020204000502070100ff00ff00d1051100000202040000000202
-04000502070000ff00ff00d2051100000202040000000202040005ff05ff05e800000202
-040000000202040005ff05ff05e800000202040000000202040005ff05ff05e800000202
-0400000002020400000502ff02ff02dc00060202040000000208040002ff02ff02dc0000
-0208040000000208040002ff02ff02dc00000208040000000208040001ff01ff01dc0000
-020804000000040901ff01ff01dc00000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 377 205
-%%EOF
diff --git a/lib/tv/doc/src/tv_table_browser.gif b/lib/tv/doc/src/tv_table_browser.gif
deleted file mode 100644
index 9c7cb042ff..0000000000
--- a/lib/tv/doc/src/tv_table_browser.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_table_browser.ps b/lib/tv/doc/src/tv_table_browser.ps
deleted file mode 100644
index e2b195a2e5..0000000000
--- a/lib/tv/doc/src/tv_table_browser.ps
+++ /dev/null
@@ -1,2024 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_table_browser.eps)
-%%CreationDate: (Mon Mar 19 17:15:30 2001)
-%%BoundingBox: 0 0 380 315
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 380 315
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-380.000000 315.000000
-12
-760 630
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-ff0000
-990000
-7f7f7f
-999999
-ff7f7f
-000000
-000000
-000000
-000000
-000a01ff01ff01e1000b0208040001ff01ff01e100000208040000000208040002ff02ff
-02e1000002080400000002080400020000ff00ff00de0400020000000208040000000202
-04060200000004ff04ff04de020000000405020204000000020204000209000d02ff02ff
-02d500000202040000000202040002080000020d04000289010302110103023201020258
-0102020c010102010101021e010102290101020601010208010102310101022a01010230
-0101029600000202040000000202040002080000020d0400028901010202010702000101
-0203010102010101020e01050200010702010103020d0101020401010204010302030103
-020e010302060103020301030203010302060103020b0101020a01010202010102190100
-02030101021c0100020b01010206010102090101021b010202020100020d0101022a0101
-020c0104021e0101029600000202040000000202040002080000020d0400028901010205
-0101020301010203010102010101020e0101020701010203010102010101020c01010202
-010302030101020101010201010102010101020801010201010102010101020401010201
-01010201010102010101020101010201010102040101020101010201010102060101020a
-0101020201010218010102210101020b01010206010102090101021b010202020100020d
-01010238010102020101021d010102960000020204000000020204000208000002020406
-020304000289010102050101020301010203010102010101020e01010207010102030101
-020501010209010102030101020701010201010102010101020601020202010102010101
-020801010201010102010101020101010201010102040101020101010202010202030101
-020a01010203010102020103020301030202010302010104020101010202010302030101
-02000101020a0104020101030203010102000101020301010202010302030101021a0100
-020001010201010002020103020301040202010302020101020901010200010102010101
-020301030203010102020101020001010202010102010103020201010200010102010101
-020301030202010102000101020101010202010302020101020201010285000002020400
-000004030208000002020400030400000203040002890101020501010204010102020100
-02020101020e0101020701010203010202040101020a0100020301010207010102010101
-020101010205010102040101020101010208010102010101020101010201010102010101
-02040101020101010204010102020100020b010102030101020101010201010102010101
-020101010200010102010101020101010203010102010101020101010202010202000101
-020a01010202010102010101020201020200010102020101020101010201010102020101
-021a01000200010102010100020101010201010102010101020101010201010102010101
-020101010209010202000102020001010201010102010101020201010202010202000101
-020101010200010102000101020201020200010202000101020101010201010102010101
-0200010102010101020101010201010102010101020201010285000004030101020b0000
-0203040003020000020404000289010102050101020401010201010102020101020e0104
-0204010102040103020d0101020401010205010202020101020101010204010102050101
-020101010207010102020101020101010202010402040101020101010205010102020101
-020901010203010102010101020101010201010102080101020101010203010102010101
-020101010202010102010101020a01010206010102020101020101010202010102010101
-0201010102020101021a0100020001020200010002010101020101010201010102010101
-0201010102010101020d0101020101010201010102050101020201010202010102010101
-020101010200010102000101020201010201010102010101020501010201010202030101
-0201010102010101020101010202010002890103020b0000020304000302000002040400
-0289010102050101020501010200010002030101020e01010207010102060102020e0100
-020301010207010102010101020101010205010102040101020101010206010102030101
-020101010205010102040101020101010204010102020100020b01010203010102010101
-020101010201010102050104020101010203010102010101020101010202010102010101
-020a0101020301040202010102010101020201010201010502020101021a010002010101
-020001000201010102010101020101010201010102010105020d01010201010102010101
-020201040202010102020101020101010201010102000101020001010202010102010101
-0201010102020104020101010204010102010105020201010200010102890103020b0000
-02040400030000000205040002890101020501010205010302030101020e010102070101
-02070101020d010102030101020701010201010102010101020601020202010102010101
-0205010102040101020101010205010102040101020101010202010202030101020a0101
-020301010201010102010101020101010204010102010101020101010203010102010101
-020101010202010102010101020a01010202010102010101020201010201010102020101
-0201010102060101021a0100020201020201010102010101020101010201010102010101
-021101010201010102010101020101010201010102020101020201010201010102010101
-020101010200010102010101020101010201010102010101020101010201010102040101
-020101010206010102000100028a0103020b000002040400030000000205040002890101
-020501010206010102040101020e01010207010102030101020101010201010102080101
-020401010203010102010101020101010201010102010101020401010201010102010101
-020101010200010502010101020101010201010102010101020101010200010102010101
-0201010102060101020a0101020201010201010102010101020101010202010002000101
-02010101020101010203010102010101020101010202010102010101020a010102020101
-02010101020201010201010102020101020101010202010002010101021b010002020102
-020101010201010102010101020001020201010102020100020101010209010102010101
-020101010201010102010101020201010202010102010101020201010207010102010101
-0201010102010101020101010201010102040101020101010202010002030102028a0103
-020b0000020500000206040002890101020501010206010102040101020e010502030101
-020401030202010102080101020401010204010302030103020201010209010302020101
-0200010502020103020301030202010102010103020b0101020a01010202010102020103
-0203010302020102020001010201010202010101020201030203010102010101020b0102
-020101020200010102010104020301010202010302020101021b01000203010102020103
-020301010200010102020103020201010209010102010101020101010202010202000101
-020101010202010102010101020301050202010102010101020101010202010202000101
-02000101020401010202010302040101028b0103020b0000020d04000289010302110103
-0232010202190100023d0102020c01010237010602230101029e0101028c0103020b0000
-020d040002f2010002ff02540101028c0103020b0000020d040002ff02ff02d70103020c
-040d02ff02ff02d8010302ff02ff02f3010302ff02ff02f30103020200ff00ff00ec0400
-020201030202000004ff04ff04ec0202010302ff02ff02f3010302020500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000202010302020000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000202010302020500000005ff05ff05ea01000202010302020000
-05ff05ff05ea010005000202010302020500000005ff05ff05ea01000202010302020000
-05ff05ff05ea010005000202010302020500000005ff05ff05ea01000202010302020000
-050c06040504060005030602051f06040505060005040600050406000519060005020600
-0504060005270602050b06000506060005ff05ff05080600050206000509060205130100
-050002020103020205000000050b0600050f0600051f060005090600050a060005190600
-05020600052c060005020600050a060005ff05ff0510060005020600050b060005140100
-0202010302020000050c0600050606020505060005030602051806000506060105000600
-050206020502060405170600050206000502060205030602050206000502060005170600
-050206000501060005000601050206040502060205030602050206000500060105030602
-05ff05f306000502060005020602050506000502060005000601050c0100050002020103
-020205000000050b06000508060005050600050206000502060005170600050506000501
-06010504060005040600051a060005000600050506000502060005020600050106000502
-060005170600050206000501060105010600050306000506060005020600050206000501
-060105010600050106000502060005ff05f2060005020600050106000502060005040600
-0502060105010600050c01000202010302020000050c0603050506000505060005020600
-050206000517060305020600050206000504060005040600051a06000500060005050600
-050206000502060005010600050006000500060005170600050206000501060005020600
-0503060005060600050206000502060005010600050206000501060005ff05f606040501
-060005020600050406000502060005020600050b0100050002020103020205000000050b
-06000508060005050600050206040517060005050600050206000504060005040600051a
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05f306000502060005010604050406000502060005020600050c01000202010302020000
-050c0600050806000505060005020600051b060005050600050206000504060005040600
-051b06000506060005020600050506000500060005000600051706000502060005010600
-050206000503060005060600050206000502060005010600050206000505060005ff05f2
-06000502060005010600050806000502060005020600050b010005000202010302020500
-0000050b0600050806000505060005020600050206000517060005050600050106010504
-060005040600051b06000506060005020600050206000501060005000600050006000517
-060005020600050106010501060005030600050606000502060005020600050106000502
-0600050106000502060005ff05f206000502060005010600050206000504060005020601
-05010600050c01000202010302020000050c060005080600050506000503060205180604
-050206010500060005040600050506010519060005060600050306020503060005000600
-051906020502060005000601050506010504060005030602050206000502060005020602
-05ff05f306000502060005020602050506000502060005000601050c0100050002020103
-02020500000005a8060005ff05ff052e0600051001000202010302020000050b0606052a
-0606052a0606052a06060500060005ff05ff05180606050e0600050f0100050002020103
-020205000000050a0606052a0606052a0606052a06060500060005ff05ff05180606050e
-060005100100020201030202000005ff05ff05ea010005000202010302020500000005ff
-05ff05ea0100020201030202000005ff05ff05ea01000500020201030202050000000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100020201030202000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050002020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-020201030202053600000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000051a00000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050100000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050100000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000051a00000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000051a00000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000051a00000500000005000000050000000500000005000000050000000500
-00000500000005000000050000000500000005ff05a50202010302020535000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500010005180000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000100000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050001000518000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500010005180000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000100051800000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000500010005ff05a402020103
-02020536000005140100051a00000514010005010000051401000501000005140100051a
-000005140100051a000005140100051a00000514010005ff05a502020103020205350000
-051601000518000005160100000005160100000005160100051800000516010005180000
-05160100051800000516010005ff05a40202010302020536000005140100051a00000514
-010005010000051401000501000005140100051a000005140100051a000005140100051a
-00000514010005ff05a50202010302020535000005050602050306020506010005180000
-051601000000051601000000051601000518000005160100051800000516010005180000
-0516010005ff05a402020103020205360000050406020503060205050100051a00000514
-010005010000051401000501000005140100051a00000506060405080100051a00000508
-060105090100051a0000050806030507010005ff05a50202010302020535000005040604
-050106040505010005180000051006000504010000000510060005040100000005040600
-051001000518000005050608050701000518000005080603050901000518000005070607
-0506010005ff05a402020103020205360000050306000501060105010600050106010504
-0100051a0000050f06000503010005010000050f0600050301000501000005030600050f
-0100051a00000503060a05050100051a00000507060305080100051a0000050506030501
-06030504010005ff05a5020201030202053500000503060d0504010005180000050d0600
-0501060005040100000005040600050a06000504010000000504060005010600050d0100
-051800000504060305020603050601000518000005090601050a01000518000005060602
-050306020505010005ff05a4020201030202053600000501060005000603050006020500
-060405020100051a0000050c060005010600050301000501000005030600050a06000503
-0100050100000503060005010600050c0100051a0000050206030504060305040100051a
-000005140100051a000005050602050306020504010005ff05a502020103020205350000
-050206000500060305000602050006040503010005180000050a06000501060005010600
-050401000000050406000504060005040600050401000000050406000501060005010600
-050a01000518000005030602050306070503010005180000050706040509010005180000
-05070601050206020506010005ff05a40202010302020536000005010600050006030500
-06020500060405020100051a000005090600050106000501060005030100050100000503
-06000504060005040600050301000501000005030600050106000501060005090100051a
-0000050206020504060505030100051a00000507060305080100051a0000050a06020506
-010005ff05a5020201030202053500000502060005000603050006020500060405030100
-051800000507060005010600050106000501060005040100000005040600050406000501
-060005010600050401000000050406000501060005010600050106000507010005180000
-05030602050506030505010005180000050906020509010005180000050a060205080100
-05ff05a40202010302020536000005010600050006070500060405020100051a00000506
-060005010600050106000501060005030100050100000503060005040600050106000501
-060005030100050100000503060005010600050106000501060005060100051a00000502
-06030505060105050100051a00000508060205080100051a0000050806020508010005ff
-05a502020103020205350000050206000500060405010600050006040503010005180000
-050406000501060005010600050106000501060005040100000005040600050106000501
-060005010600050106000504010000000504060005010600050106000501060005010600
-050401000518000005040603050d01000518000005090602050901000518000005090602
-0509010005ff05a402020103020205360000050106060501060605020100051a00000503
-060005010600050106000501060005010600050301000501000005030600050106000501
-060005010600050106000503010005010000050306000501060005010600050106000501
-060005030100051a00000503060905060100051a00000508060205080100051a00000514
-010005ff05a5020201030202053500000502060005000602050506000500060205030100
-051800000504060005010600050106000501060005010600050401000000050406000501
-060005010600050106000501060005040100000005040600050106000501060005010600
-050106000504010005180000050506070508010005180000050806040508010005180000
-050906020509010005ff05a4020201030202053600000501060005000602050506000500
-060205020100051a00000503060005010600050106000501060005010600050301000501
-000005030600050106000501060005010600050106000503010005010000050306000501
-060005010600050106000501060005030100051a00000506060405080100051a00000506
-060605060100051a0000050806020508010005ff05a50202010302020535000005020604
-050506040503010005180000051601000000051601000000051601000518000005160100
-0518000005160100051800000516010005ff05a40202010302020536000005140100051a
-00000514010005010000051401000501000005140100051a000005140100051a00000514
-0100051a00000514010005ff05a502020103020205350000051601000518000005160100
-000005160100000005160100051800000516010005180000051601000518000005160100
-05ff05a40202010302020536000005140100051a00000514010005010000051401000501
-000005140100051a000005140100051a000005140100051a00000514010005ff05a50202
-010302020535000005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005180000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000518000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005180000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100051800000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005ff05a402020103020205360100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100051a0100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005010100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005010100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100051a0100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100051a0100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100051a0100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005ff05a5020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed020201030202050301ff01ff01e505030202
-01030202050301ff01ff01d1050000000500000005000000050000000500000005000000
-050000000500000005000000050001000503020201030202050301ff01ff01d100000500
-000005000000050000000500000005000000050000000500000005000000050001010503
-020201030202050301020aff0aff0acb010205000000050e010005000100050302020103
-0202050301020aff0aff0aca000001020000051001010503020201030202050301020a01
-00ff00ff00c9010205000000050e0100050001000503020201030202050301020a0100ff
-00ff00c901020000051001010503020201030202050301020a0100ff00ff00c901020500
-0000050e0100050001000503020201030202050301020a0100ff00ff00c9010200000510
-01010503020201030202050301020a0100ff00ff00c9010205000000050e010005000100
-0503020201030202050301020a0100ff00ff00c9010200000502010a0502010105030202
-01030202050301020a0100ff00ff00c90102050000000502010805020100050001000503
-020201030202050301020a0100ff00ff00c9010200000504010605040101050302020103
-0202050301020a0100ff00ff00c901020500000005040104050401000500010005030202
-01030202050301020a0100ff00ff00c90102000005060102050601010503020201030202
-050301020a0100ff00ff00c9010205000000050601000506010005000100050302020103
-0202050301020a0100ff00ff00c901020000051001010503020201030202050301020a01
-00ff00ff00c9010205000000050e0100050001000503020201030202050301020a0100ff
-00ff00c901020000051001010503020201030202050301020a0100ff00ff00c901020500
-0000050e0100050001000503020201030202050301020a0100ff00ff00c9010200000510
-01010503020201030202050301020a0100ff00ff00c9010205000000050e010005000100
-0503020201030202050301020a0000ff00ff00ca01020000051001010503020201030202
-050301ff01ff01d105000000050001000500010005000100050001000500010005000100
-0500010005000100050001000503020201030202050301ff01ff01d10000050001000500
-010005000100050001000500010005000100050001000500010005000101050302020103
-0202050301ff01ff01e5050302020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-020201030202050301ff01ff01e505030202010302020503010005ff05ff05970100054a
-01000503020201030202050301000563010505ff05ff052d0100054a0100050302020103
-0202050301000562010705ff05ff052c0100054a01000503020201030202050301000561
-01020503010205ff05ff052b0100054a0100050302020103020205030100056101010505
-010105ff05ff052b0100054a0100050302020103020205030100056101020503010205ff
-05ff052b0100054a01000503020201030202050301000562010705ff05ff052c0100054a
-01000503020201030202050301000563010505ff05ff052d0100054a0100050302020103
-0202050301000565010105ff05ff052f0100054a01000503020201030202050301000565
-010105ff05ff052f0100054a01000503020201030202050301000565010105ff05ff052f
-0100054a01000503020201030202050301000565010105ff05ff052f0100054a01000503
-020201030202050301000565010105ff05ff052f0100054a010005030202010302020503
-01000565010105ff05ff052f0100054a0100050302020103020205030100056101010500
-010205ff05ff052f0100054a0100050302020103020205030100056101010500010205ff
-05ff052f0100054a01000503020201030202050301000561010505ff05ff052f0100054a
-01000503020201030202050301000561010505ff05ff052f0100054a0100050302020103
-020205030100056101020500010105ff05ff052f0100054a010005030202010302020503
-010005ff05ff05970100054a01000503020201030202050301ff01ff0199054a01000503
-020201030202050301000536000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000009040500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000904050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000090405000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000009040500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000904050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000904050000000100050c0100
-050001000500010005000100050001000500010005000100050001000500010005000100
-052a01000503020201030202050301000535000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000903
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050009030100000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500090301000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000903010000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050009030100000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-05000000050009030100000005000100050d010005000100050001000500010005000100
-05000100050001000500010005000100052b010005030202010302020503010005360000
-055e01000901010205000000055c01000901010205000000055c01000901010205000000
-055c01000901010205000000055c01000901010205000000055c01000901010205000000
-0100050c0100050000000500000005000000050000000500000005000000050000000500
-000005000000052a010005030202010302020503010005350000052d0100052f01000500
-090101020000052b0102052d01000500090101020000052b0102052d0100050009010102
-0000052d0100052d01000500090101020000052a0104052c01000500090101020000052c
-0102052c0100050009010102000005000100050d01000500000005000000050000000500
-000005000000050000000500000005000000052b01000503020201030202050301000536
-0000052a01020530010009010102050000000529010005020100052d0100090101020500
-00000529010005020100052d01000901010205000000052b0101052e0100090101020500
-000005290100053101000901010205000000052a01000530010009010102050000000100
-050c010005000000050c010005000000052a010005030202010302020503010005350000
-052d0100052f01000500090101020000052a010005020100052c01000500090101020000
-052e0100052c01000500090101020000052b010005000100052d01000500090101020000
-052a0100053001000500090101020000052a010005300100050009010102000005000100
-050d010005000000050a010005000000052b010005030202010302020503010005360000
-052c01000530010009010102050000000529010005020100052d01000901010205000000
-052d0100052d01000901010205000000052a010005000100052e01000901010205000000
-05290100053101000901010205000000052901000531010009010102050000000100050c
-010005000000050c010005000000052a010005030202010302020503010005350000052d
-0100052f01000500090101020000052d0100052d01000500090101020000052c0101052d
-01000500090101020000052a010005010100052d01000500090101020000052a0103052d
-01000500090101020000052a0103052d0100050009010102000005000100050d01000500
-0000050a010005000000052b010005030202010302020503010005360000052c01000530
-01000901010205000000052b0100052f01000901010205000000052d0100052d01000901
-0102050000000528010005020100052e01000901010205000000052d0100052d01000901
-0102050000000529010005020100052d010009010102050000000100050c010005000000
-050c010005000000052a010005030202010302020503010005350000052d0100052f0100
-0500090101020000052b0100052f01000500090101020000052e0100052c010005000901
-0102000005290105052c01000500090101020000052e0100052c01000500090101020000
-052a010005020100052c0100050009010102000005000100050d010005000000050a0100
-05000000052b010005030202010302020503010005360000052c01000530010009010102
-050000000529010005020100052d010009010102050000000529010005020100052d0100
-0901010205000000052c0100052e010009010102050000000528010005030100052d0100
-09010102050000000529010005020100052d010009010102050000000100050c01000500
-0000050c010005000000052a010005030202010302020503010005350000052b0104052d
-01000500090101020000052a0104052c01000500090101020000052b0102052d01000500
-090101020000052c0102052c01000500090101020000052a0103052d0100050009010102
-0000052b0102052d0100050009010102000005000100050d010005000000050a01000500
-0000052b010005030202010302020503010005360000055e01000901010205000000055c
-01000901010205000000055c01000901010205000000055c01000901010205000000055c
-01000901010205000000055c010009010102050000000100050c010005000000050c0100
-05000000052a010005030202010302020503010005350000055e01000500090101020000
-055c01000500090101020000055c01000500090101020000055c01000500090101020000
-055c01000500090101020000055c0100050009010102000005000100050d010005000000
-050a010005000000052b010005030202010302020503010005360000055e010009010102
-05000000055c01000901010205000000055c01000901010205000000055c010009010102
-05000000055c01000901010205000000055c010009010102050000000100050701000503
-010005000000050c010005000000052a010005030202010302020503010005350000055e
-01000500090101020000055c01000500090101020000055c01000500090101020000055c
-01000500090101020000055c01000500090101020000055c010005000901010200000500
-0100050601010504010005000000050a010005000000052b010005030202010302020503
-010005360000055e01000901010205000000055c01000901010205000000055c01000901
-010205000000055c01000901010205000000055c01000901010205000000055c01000901
-010205000000010005050100050001000503010005000000050001000500010005000100
-0500010005000100050001000500010005000000052a0100050302020103020205030100
-05350000055e01000500090101020000055c01000500090101020000055c010005000901
-01020000055c01000500090101020000055c01000500090101020000055c010005000901
-010200000500010005070100050401000500000005000000050000000500000005000000
-050000000500000005000000052b01000503020201030202050301000536000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010009010102050000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100090101020500000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000901010205000000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010009010102050000000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-090101020500000005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000901010205000000010005070100050301000500
-0000050c010005000000052a010005030202010302020503010005350000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050009000103000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500090001030000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000900010300000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050009000103000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-090001030000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000900010300000500010005070100050401000500
-0000050a010005000000052b01000503020201030202050301000b360063010000630100
-0063010000630100006301000063010000020100050701000503010005000000050c0100
-05000000052a01000503020201030202050301000b350800006301000063010000630100
-00630100006301000063010000020100050701000504010005000000050a010005000000
-052b01000503020201030202050301000b01073208010063010000630100006301000063
-0100006301000063010000020100050501040501010005000000050c010005000000052a
-01000503020201030202050301000b010732080100630100006301000063010000630100
-006301000063010000020100050d010005000000050a010005000000052b010005030202
-01030202050301000b010717010007190801006301000063010000630100006301000063
-01000063010000020100050c010005000000050c010005000000052a0100050302020103
-0202050301000b010715010207190801000f010200030102004901000007010000230100
-000b010200030102001f01000063010000630100006301000063010000020100050d0100
-05000000050a010005000000052b01000503020201030202050301000b01071701000719
-08010011010000050100004901000007010000230100000d010000050100001f01000063
-010000630100006301000063010000020100050c010005000000050c010005000000052a
-01000503020201030202050301000b010717010007190801000801020005010000050100
-000301020042010000070100000001010003010200020100000001010002010000000101
-000301020002010400010100000201000004010000050100001f01000063010000630100
-006301000063010000020100050d010005000000050a010005000000052b010005030202
-01030202050301000b010717010007190801000701000002010000040100000501000002
-010000020100004101000007010100010100000101000002010000010101000101000001
-01010001010000010100000201000003010000030100000201000004010000050100001f
-01000063010000630100006301000063010000020100050c010005000000050c01000500
-0000052a01000503020201030202050301000b0107170100071908010007010000020100
-000401000005010000020100000201000041010000070100000201000001010000020100
-000101000005010000020100000101000007010000030100000201000004010000050100
-001f01000063010000630100006301000063010000020100050d010005000000050a0100
-05000000052b01000503020201030202050301000b010717010007190801000701000002
-010000040100000501000002010400410100000701000002010000010100000201000001
-01000005010000020100000201020004010000030100000201000004010000050100001f
-01000063010000630100006301000063010000020100050c010005000000050001000500
-0100050001000500010005000100050001000500010005000000052a0100050302020103
-0202050301000b0107170100071908010007010000020100000401000005010000020100
-004501000007010000020100000101000002010000010100000501000002010000050100
-0003010000030100000201000004010000050100001f0100006301000063010000630100
-0063010000020100050d0100050001000500010005000100050001000500010005000100
-0500010005000000052b01000503020201030202050301000b0107150104071708010007
-010000020100000401000005010000020100000201000041010000070100000201000001
-010000020100000101000005010000020100000101000002010000030100000301000001
-01010004010000050100001f01000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010732080100080102
-000501000005010000030102004201000007010000020100000201020002010000050100
-00020100000201020005010100020101000001000004010000050100001f010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-00630100006301000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b01073208010063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-0202050301000b0107320801006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01073208010063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0108340063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-01000b00083501ff01ff0161050c01000500030e05000000052a01000503020201030202
-050301000b3600630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000b35080000630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01073208010063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010732
-080100630100006301000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b01071601020718080100630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b01071501000702010007170801001f0100000301020003
-010200340100000f0102005001000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010715010007020100
-071708010026010000050100003401000011010000500100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010715
-010007020100071708010008010100000100000101000002010000010100000001010003
-0102000501000005010000030102002d0100000801020005010000020100000201000002
-010200030102000301020002010000000101002d01000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-071801000718080100070100000101010001010000020100000101010001010000040100
-00050100000501000002010000020100002c010000070100000201000004010000020100
-000201000001010000020100000101000002010000010100000201000001010100010100
-002c01000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107170100071908010007010000020100000101000002
-0100000101000002010000040100000501000005010000060100002c0100000701000008
-01000002010000020100000101000005010000050100000201000001010000020100002c
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b0107160100071a0801000701000002010000010100
-00020100000101000002010000040100000501000005010000030103002c010000080102
-0005010000020100000201000002010200030102000201040001010000020100002c0100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010715010007020100071708010007010000020100000101000002
-010000010100000201000004010000050100000501000002010000020100002c0100000b
-01000004010000020100000201000005010000050100000101000005010000020100002c
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010715010407170801000701000001010100010100
-0001010100010100000201000004010000050100000501000002010000020100002c0100
-000701000002010000040100000201000001010100010100000201000001010000020100
-00010100000201000001010000020100002c010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01073208010008
-010100000100000201010000010000010100000201000004010000050100000501000003
-0103002c0100000801020005010000030101000001000002010200030102000301020002
-010000020100002c01000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b0107320801000b010000560100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107320801000701000002010000560100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01073208010008010200570100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010732080100630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0108340063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-0b00083501ff01ff0161050d0100030e0000052b01000503020201030202050301000b36
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a01000503020201030202050301000b350800006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-00630100006301000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b01071601020718080100630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b010715010007020100071708010063010000070100005a0100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b0107190100071708010063010000070100005a0100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-0202050301000b0107190100071708010008010200020100000001010002010000000101
-000301020042010000070100000001010002010000000101000301020002010100000100
-000201010000010000030102003401000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107170101071808010007
-010000020100000101010001010000010101000101000001010000020100004101000007
-010100010100000101010001010000010100000201000001010000000100000001000001
-010000000100000001000001010000020100003301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-0719010007170801000b0100000101000002010000010100000201000005010000410100
-000701000002010000010100000501000002010000010100000001000000010000010100
-000001000000010000050100003301000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107190100071708010008
-010300010100000201000001010000020100000201030041010000070100000201000001
-010000050100000201000001010000000100000001000001010000000100000001000002
-0103003301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107150100070201000717080100070100
-000201000001010000020100000101000002010000010100000201000041010000070100
-000201000001010000050100000201000001010000000100000001000001010000000100
-000001000001010000020100003301000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107160102071808010007
-010000020100000101000002010000010100000201000001010000020100004101000007
-010100010100000101000005010000020100000101000000010000000100000101000000
-010000000100000101000002010000330100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-000801030001010000020100000101000002010000020103004101000007010000000101
-000201000006010200020100000001000000010000010100000001000000010000020103
-003301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107320801006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b010732080100630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107320801006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010732080100630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010834006301000063
-01000063010000630100006301000063010000020100050d0100030e0000052b01000503
-020201030202050301000b00083501ff01ff0161050c01000500030e05000000052a0100
-0503020201030202050301000b3600630100006301000063010000630100006301000063
-010000020100050d0100030e0000052b01000503020201030202050301000b3508000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107320801006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107180100
-0718080100630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b010717010107180801001001000006
-010000490100000e0100001c0100000b010200030102001f010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b010716010007000100071808010010010000510100000e0100001c0100000d0100
-00050100001f01000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b01071601000700010007180801000801020002
-010400020102000201000000010100030102003b01000008010200020100000101000003
-01020002010000000101000301020002010400010100000201000004010000050100001f
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010715010007010100071808010007010000020100
-000301000006010000020101000101000001010000020100003a01000007010000020100
-000101000000010000030100000201000001010100010100000101000002010000030100
-00030100000201000004010000050100001f010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01071401000702
-010007180801000701000007010000060100000201000002010000050100003a01000007
-010000050101000801000001010000020100000101000007010000030100000201000004
-010000050100001f01000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b01071401050717080100080102
-0004010000060100000201000002010000020103003a0100000801020002010100050103
-0001010000020100000201020004010000030100000201000004010000050100001f0100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010718010007180801000b01000003010000060100000201000002
-01000001010000020100003a0100000b0100000101000000010000030100000201000001
-010000020100000501000003010000030100000201000004010000050100001f01000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01071701020717080100070100000201000003010000060100
-00020100000201000001010000020100003a010000070100000201000001010000010100
-000201000002010000010100000201000001010000020100000301000003010000010101
-0004010000050100001f01000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b010732080100080102000501010004
-0100000201000002010000020103003a0100000801020002010000020100000201030001
-010000020100000201020005010100020101000001000004010000050100001f01000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01073208010063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010732
-080100630100006301000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b01073208010063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010732080100630100006301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-0732080100630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b010834006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-01030202050301000b00083501ff01ff0161050d0100030e0000052b0100050302020103
-0202050301000b3600630100006301000063010000630100006301000063010000020100
-050c01000500030e05000000052a01000503020201030202050301000b35080000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107320801006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b010732080100630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107150104071708010063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107150100071b080100070100000e0100
-0014010000340100002b0102003401000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107150100071b08010007
-0100000e0100004a0100002d010000340100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107150100
-071b08010007010000010100000301020002010400020102000201000000010100030102
-000201000000010100030102002601000007010000020100000101000000010100020100
-0000010100030102000301020005010000030102002d0100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010715
-010307180801000701000000010000030100000201000003010000030100000201000001
-010100010100000401000002010100010100000101000002010000250100000701000002
-010000010101000101000001010100010100000101000002010000010100000201000004
-01000002010000020100002c01000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010719010007170801
-000701010008010000030100000701000001010000080100000201000002010000050100
-002501000007010000020100000101000002010000010100000201000001010000090100
-0004010000060100002c01000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b010719010007170801000701010005
-010300030100000401030001010000080100000201000002010000020103002501000007
-010000020100000101000002010000010100000201000002010200030103000401000003
-0103002c01000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107140100070301000717080100070100
-000001000003010000020100000301000003010000020100000101000008010000020100
-000201000001010000020100002501000007010000020100000101000002010000010100
-00020100000501000001010000020100000401000002010000020100002c010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01071501030718080100070100000101000002010000020100000301000003
-010000020100000101000008010000020100000201000001010000020100002501000007
-010000010101000101010001010000010101000101000001010000020100000101000002
-0100000401000002010000020100002c0100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-000701000002010000020103000401010002010300010100000801000002010000020100
-000201030025010000080101000001000001010000000101000201000000010100030102
-000301030004010000030103002c01000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b010732080100630100000e
-010000050100004c01000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b010732080100630100000e0100
-00050100004c01000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b010732080100630100000e010000050100004c
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010732080100630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010834006301000063
-01000063010000630100006301000063010000020100050d0100030e0000052b01000503
-020201030202050301000b00083501ff01ff0161050c01000500030e05000000052a0100
-0503020201030202050301000b3600630100006301000063010000630100006301000063
-010000020100050d0100030e0000052b01000503020201030202050301000b3508000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107320801006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107170102
-0717080100630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b0107160100071a0801000a0100001a
-01010004010000340100000f0102000c010000020100003e010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b0107150100071b080100250100003c01000011010000100100003e010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b0107150100071b080100080102000301020003010200030102000401000004
-010200020100000001010003010200260100000801020005010000020100000201000002
-01020002010000010100003b01000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010715010307180801
-000a01000002010000020100000101000002010000010100000201000001010400040100
-000201010001010000010100000201000025010000070100000201000004010000020100
-00020100000401000002010000000100003c010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01071501000702
-010007170801000a01000002010000020100000101000005010000020100000301000006
-01000002010000020100000101000002010000250100000b010000040100000201000002
-01000004010000020101003d01000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010715010007020100
-07170801000a010000020100000201000002010200020104000301000006010000020100
-000201000001010400250100000801030004010000030100000001000005010000020101
-003d01000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b01071501000702010007170801000a0100000201000002
-010000050100000101000007010000060100000201000002010000010100002901000007
-010000020100000401000003010000000100000501000002010000000100003c01000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b010716010207180801000a0100000201000002010000010100
-000201000001010000020100000301000006010000020100000201000001010000020100
-0025010000070100000201000004010000040100000601000002010000010100003b0100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b0107320801000a0100000301020003010200030102000401000006
-010000020100000201000002010200260100000801030004010000040100000601000002
-010000020100003a01000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b0107320801000a010000570100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107320801000701000001010000570100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01073208010008010100580100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010732080100630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0108340063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-0b00083501ff01ff0161050d0100030e0000052b01000503020201030202050301000b36
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a01000503020201030202050301000b350800006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-00630100006301000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b01071501040717080100630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01071501000702010007170801000a010100130100000b0100
-000201000030010000250100000b01020003010200260100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010718
-0100071808010009010000150100000f01000030010000250100000d0100000501000026
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010718010007180801000901000003010000000101
-0003010200030101000001000001010000000101000301020002010000010100002d0100
-000701000000010100030102000201000000010100020100000001010002010400010100
-000201000004010000050100002601000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107180100071808010007
-010400010101000101000001010000020100000101000001010100010101000101000004
-01000002010000000100002e010000070101000101000001010000020100000101010001
-010000010101000101000003010000030100000201000004010000050100002601000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01071801000718080100090100000301000005010000020100
-0001010000020100000101000008010000020101002f0100000701000002010000010100
-000201000001010000050100000701000003010000020100000401000005010000260100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010717010007190801000901000003010000050104000101000002
-0100000101000008010000020101002f0100000701000002010000010100000201000001
-010000050100000701000003010000020100000401000005010000260100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-0202050301000b0107170100071908010009010000030100000501000005010000020100
-00010100000801000002010000000100002e010000070100000201000001010000020100
-000101000005010000070100000301000002010000040100000501000026010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01071701000719080100090100000301000005010000020100000101000001
-010100010100000801000002010000010100002d01000007010000020100000101000002
-010000010100000501000007010000030100000101010004010000050100002601000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01073208010009010000030100000601020003010100000100
-00010100000801000002010000020100002c010000070100000201000002010200020100
-000501000008010100020101000001000004010000050100002601000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010732080100630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107320801006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b010732080100630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107320801006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010834006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000b00
-083501ff01ff0161050c01000500030e05000000052a0100050302020103020205030100
-0b3600630100006301000063010000630100006301000063010000020100050d0100030e
-0000052b01000503020201030202050301000b3508000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-0202050301000b0107320801006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01073208010063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107160102071808010063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010715010007020100071708010063010000070100000f0100000b
-01000006010000100100002201000063010000630100006301000063010000020100050c
-01000500030e05000000052a01000503020201030202050301000b010715010007020100
-071708010063010000070100001c01000018010000220100006301000063010000630100
-0063010000020100050d0100030e0000052b01000503020201030202050301000b010715
-010007020100071708010007010000000101000301020002010000000101004901000007
-010000010100000201000000010100030102000301020002010400020102000201000000
-010100030102000201000000010100030102000201000000010100030101000001000009
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010716010207180801000701010001010000010100
-000201000001010100010100004801000007010000000100000301010001010000040100
-000201000002010000030100000601000002010100010100000101000002010000010101
-000101000001010000020100000101010001010000010100000101010009010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01071501000702010007170801000701000002010000010100000201000001
-0100004c0100000701010004010000080100000201000007010000060100000201000002
-010000010100000201000001010000020100000101000002010000010100000501000002
-0100000901000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107150100070201000717080100070100
-000201000001010400010100004c01000007010100040100000801000003010200040100
-000601000002010000020100000101040001010000020100000101040001010000050100
-00020100000901000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000b01071501000702010007170801000701000002
-01000001010000050100004c010000070100000001000003010000080100000601000003
-010000060100000201000002010000010100000501000002010000010100000501000005
-010000020100000901000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000b01071601020718080100070101
-00010100000101000002010000010100004c010000070100000101000002010000080100
-000201000002010000030100000601000002010000020100000101000002010000010101
-000101000001010000020100000101000005010000010101000901000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b010732080100070100000001010003010200020100004c010000070100000201000001
-010000080100000301020005010100040100000201000002010000020102000201000000
-010100030102000201000006010100000100000901000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-0732080100070100005a0100005801000009010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01073208010007
-0100005a0100005401000002010000090100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-00070100005a010000550102000a01000063010000630100006301000063010000020100
-050d0100030e0000052b01000503020201030202050301000b0107320801006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b010732080100630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b01083400630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a01000503020201030202050301000b00083501ff01ff0161050d
-0100030e0000052b01000503020201030202050301000b36006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-01030202050301000b350800006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000b01073208010063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a01000503020201030202050301000b0107320801006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01071601020718080100630100006301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-071501000702010007170801001f01000042010000120100001701020034010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01071501000702010007170801006301000012010000190100003401000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01071501000702010007170801000701010000010000030102
-00020100000001010003010200030102003b010000080102000301010000010000020102
-000201000000010100020100000001010005010000030102000201000000010100260100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-01030202050301000b010715010007020100071708010007010000000100000001000001
-0100000201000001010100010100000401000002010000020100003a0100000701000002
-010000010100000101010001010000020100000101010001010000010101000101000004
-010000020100000201000001010100010100002501000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-071601030717080100070100000001000000010000050100000101000008010000060100
-003a01000007010000020100000101000002010000010100000201000001010000020100
-000101000002010000040100000601000001010000020100002501000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-0b0107190100071708010007010000000100000001000002010300010100000801000003
-0103003a0100000701000002010000010100000201000001010400010100000201000001
-010000020100000401000003010300010100000201000025010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-01000b010718010007180801000701000000010000000100000101000002010000010100
-000801000002010000020100003a01000007010000020100000101000002010000010100
-000501000002010000010100000201000004010000020100000201000001010000020100
-002501000063010000630100006301000063010000020100050d0100030e0000052b0100
-0503020201030202050301000b0107150102071908010007010000000100000001000001
-01000002010000010100000801000002010000020100003a010000070100000201000001
-010000010101000101000002010000010100000201000001010100010100000401000002
-010000020100000101000002010000250100006301000063010000630100006301000002
-0100050c01000500030e05000000052a01000503020201030202050301000b0107320801
-00070100000001000000010000020103000101000008010000030103003a010000080102
-000301010000010000020102000201000002010000010100000001010005010000030103
-0001010000020100002501000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b01073208010063010000230100003e
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-01000503020201030202050301000b01073208010063010000230100003e010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000b01073208010063010000230100003e01000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000b01
-0732080100630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b01000503020201030202050301000b010732080100630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000b01083400630100006301000063010000630100006301000063
-010000020100050d0100030e0000052b01000503020201030202050301000b00083501ff
-01ff0161050c01000500030e05000000052a010005030202010302020503010005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050001000063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-050000000532010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050c01000500030e05000000
-052a01000503020201030202050301000500000005130100050401020515010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000512010205030100050201000515010000630100
-006301000063010000630100006301000063010000020100050c01000500030e05000000
-052a01000503020201030202050301000500000005130100050301000502010005140100
-050000630100006301000063010000630100006301000063010000020100050d0100030e
-0000052b0100050302020103020205030100000005140100050301000502010005150100
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a010005030202010302020503010005000000051301000503010005020100
-05140100050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000051401000503010005020100
-0515010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000513010005030100
-050201000514010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000514010005030100
-050201000515010000630100006301000063010000630100006301000063010000020100
-050c01000500030e05000000052a01000503020201030202050301000500000005110104
-050201020515010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050c01000500030e05000000
-052a01000503020201030202050301000500000005320100050000630100006301000063
-010000630100006301000063010000020100050d0100030e0000052b0100050302020103
-020205030100000005340100006301000063010000630100006301000063010000630100
-00020100050c01000500030e05000000052a010005030202010302020503010005000000
-05320100050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000053401000063010000630100
-0063010000630100006301000063010000020100050c01000500030e05000000052a0100
-050302020103020205030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001ff01ff0161050d0100
-030e0000052b010005030202010302020503010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500010000630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a0100050302020103020205030100000005340100006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000500000005130100050501000516010005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005120102050301020517010000630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-050000000513010005050100051601000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000514010005050100051701000063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b010005030202010302020503010005000000
-051301000505010005160100050000630100006301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000000
-051401000505010005170100006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000500000005130100
-050501000516010005000063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a0100050302020103020205030100000005140100
-050501000517010000630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b0100050302020103020205030100050000000511010405010104
-05140100050000630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005340100006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000000053401000063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010000630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b010005030202010302020503010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001ff01ff0161050c01000500030e
-05000000052a010005030202010302020503010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000534010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005130100050401020515010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000512010205030100050201000515010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005130100050301000502010005140100050000630100006301000063
-010000630100006301000063010000020100050d0100030e0000052b0100050302020103
-020205030100000005140100050301000502010005150100006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-010302020503010005000000051301000506010005150100050000630100006301000063
-010000630100006301000063010000020100050d0100030e0000052b0100050302020103
-020205030100000005140100050501000517010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005130100050401000517010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000514010005030100050201000515010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005110104050101040514010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000534010000630100006301000063010000630100006301000063010000020100
-050c01000500030e05000000052a01000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100050d0100030e
-0000052b0100050302020103020205030100000005340100006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-0534010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001ff01ff0161050d0100030e0000052b010005030202010302020503010005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a0100050302020103020205030100000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500010000630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-050000000532010005000063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a0100050302020103020205030100000005340100
-00630100006301000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000500000005130100050401020515010005000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a0100050302020103020205030100000005120102050301000502010005150100
-00630100006301000063010000630100006301000063010000020100050d0100030e0000
-052b01000503020201030202050301000500000005130100050701000514010005000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a0100050302020103020205030100000005140100050701000515010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000513010005050101051501000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000514010005070100051501000063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-010302020503010005000000051301000507010005140100050000630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000000051401000503010005020100051501000063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-010302020503010005000000051101040502010205150100050000630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000000053401000063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b010005030202010302020503010005000000
-05320100050000630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005340100006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001ff01ff0161050c01000500030e05000000052a01000503020201030202
-050301000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-05000000050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000100006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-0534010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000513010005060100
-05150100050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000051201020505010105160100
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a010005030202010302020503010005000000051301000504010005000100
-05150100050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000051401000504010005000100
-0516010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000513010005030100
-050101000515010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000514010005020100
-050201000516010000630100006301000063010000630100006301000063010000020100
-050c01000500030e05000000052a01000503020201030202050301000500000005130100
-050201050514010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000514010005060100
-0516010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000511010405030102
-05140100050000630100006301000063010000630100006301000063010000020100050d
-0100030e0000052b01000503020201030202050301000000053401000063010000630100
-0063010000630100006301000063010000020100050c01000500030e05000000052a0100
-050302020103020205030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000534010000630100006301000063010000630100006301000063010000020100
-050c01000500030e05000000052a01000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100050d0100030e
-0000052b0100050302020103020205030100000005340100006301000063010000630100
-00630100006301000063010000020100050c01000500030e05000000052a010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a010005030202010302020503010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001ff01ff0161050d0100030e0000
-052b01000503020201030202050301000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500010000630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b010005030202010302020503010005000000053201000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000534010000630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-050000000513010005030104051401000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000512010205030100051901000063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b010005030202010302020503010005000000
-051301000503010005180100050000630100006301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000000
-051401000503010005190100006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000500000005130100
-050301030515010005000063010000630100006301000063010000630100006301000002
-0100050c01000500030e05000000052a0100050302020103020205030100000005140100
-050701000515010000630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b0100050302020103020205030100050000000513010005070100
-05140100050000630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a010005030202010302020503010000000514010005020100
-050301000515010000630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b0100050302020103020205030100050000000511010405010103
-05150100050000630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005340100006301000063010000630100006301000063010000630100
-00020100050d0100030e0000052b01000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100050c01000500
-030e05000000052a01000503020201030202050301000000053401000063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010000630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b010005030202010302020503010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001ff01ff0161050c01000500030e
-05000000052a010005030202010302020503010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000534010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005130100050501020514010005000063010000630100006301000063
-0100006301000063010000020100050d0100030e0000052b010005030202010302020503
-010000000512010205040100051801000063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-050000000513010005030100051801000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-051401000503010005190100006301000063010000630100006301000063010000630100
-00020100050c01000500030e05000000052a010005030202010302020503010005000000
-051301000503010305150100050000630100006301000063010000630100006301000063
-010000020100050d0100030e0000052b0100050302020103020205030100000005140100
-050301000502010005150100006301000063010000630100006301000063010000630100
-00020100050c01000500030e05000000052a010005030202010302020503010005000000
-051301000503010005020100051401000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-051401000503010005020100051501000063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-050000000511010405020102051501000500006301000063010000630100006301000063
-01000063010000020100050d0100030e0000052b01000503020201030202050301000000
-0534010000630100006301000063010000630100006301000063010000020100050c0100
-0500030e05000000052a0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000534010000630100006301000063010000630100
-006301000063010000020100050c01000500030e05000000052a01000503020201030202
-050301000500000005320100050000630100006301000063010000630100006301000063
-010000020100050d0100030e0000052b0100050302020103020205030100000005340100
-00630100006301000063010000630100006301000063010000020100050c01000500030e
-05000000052a010005030202010302020503010005000000053201000500006301000063
-01000063010000630100006301000063010000020100050d0100030e0000052b01000503
-020201030202050301000000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100006301000063010000630100006301000063010000630100
-00020100050c01000500030e05000000052a010005030202010302020503010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000500010005000100050001ff
-01ff0161050d0100030e0000052b01000503020201030202050301000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050001000063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b010005030202010302020503010005000000
-05320100050000630100006301000063010000630100006301000063010000020100050c
-01000500030e05000000052a010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000513010005030104051401000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000512010205030100050201000515010000630100
-006301000063010000630100006301000063010000020100050d0100030e0000052b0100
-050302020103020205030100050000000513010005060100051501000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000514010005060100051601000063010000630100
-0063010000630100006301000063010000020100050d0100030e0000052b010005030202
-010302020503010005000000051301000506010005150100050000630100006301000063
-010000630100006301000063010000020100050c01000500030e05000000052a01000503
-020201030202050301000000051401000506010005160100006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000500000005130100050501000516010005000063010000630100006301000063
-0100006301000063010000020100050c01000500030e05000000052a0100050302020103
-020205030100000005140100050501000517010000630100006301000063010000630100
-006301000063010000020100050d0100030e0000052b0100050302020103020205030100
-050000000511010405030100051601000500006301000063010000630100006301000063
-01000063010000020100050c01000500030e05000000052a010005030202010302020503
-010000000534010000630100006301000063010000630100006301000063010000020100
-050d0100030e0000052b0100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100050c01000500030e0500
-0000052a0100050302020103020205030100000005340100006301000063010000630100
-00630100006301000063010000020100050d0100030e0000052b01000503020201030202
-050301000500000005320100050000630100006301000063010000630100006301000063
-010000020100050c01000500030e05000000052a01000503020201030202050301000000
-0534010000630100006301000063010000630100006301000063010000020100050d0100
-030e0000052b010005030202010302020503010005000000053201000500006301000063
-01000063010000630100006301000063010000020100050c01000500030e05000000052a
-010005030202010302020503010000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000063010000630100006301000063010000630100
-0063010000020100050d0100030e0000052b010005030202010302020503010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000500010005000100050001ff
-01ff0161050c01000500030e05000000052a010005030202010302020503010005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050001000063010000630100006301000063010000630100
-0063010000020100050c01000500030e05000000052a0100050302020103020205030100
-050000000532010005000063010000630100006301000063010000630100006301000002
-0100050d0100030e0000052b010005030202010302020503010000000534010000630100
-006301000063010000630100006301000063010000020100050c01000500030e05000000
-052a01000503020201030202050301000500000005130100050401020515010005000063
-0100006301000063010000630100006301000063010000020100050d0100030e0000052b
-010005030202010302020503010000000512010205030100050201000515010000630100
-006301000063010000630100006301000063010000020100050c01000500000005000000
-05000000050000000500000005000000050000000500000005000000052a010005030202
-01030202050301ff01ff0199050d00000500000005000000050000000500000005000000
-050000000500000005000000052b010005030202010302020503010005ff05ff05e30100
-05030202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff
-05e3010005030202010302020503010005ff05ff05e30100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-0503010005ff05ff05e3010005030202010302020503010005ff05ff05e3010005030202
-01030202050301000549010005ff05ff0598010005030202010302020503010005480101
-05ff05ff05980100050302020103020205030100054701000500010005ff05ff05980100
-0503020201030202050301000549010005ff05ff05980100050302020103020205030100
-0549010005ff05ff059801000503020201030202050301000549010005ff05ff05980100
-0503020201030202050301000549010005ff05ff05980100050302020103020205030100
-0549010005ff05ff059801000503020201030202050301000547010405ff05ff05960100
-05030202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff
-05e3010005030202010302020503010005ff05ff05e30100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-050301000538010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000500010005000100054b0100
-050302020103020205030100053701000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000000054a0100050302020103020205030100053801000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000003ff03ff033e0000054b01000503020201030202
-050301000537010005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000500000005000000050003ff
-03ff033e05000000054a01000503020201030202050301000538010005000000050c0000
-050c010003ff03ff033e0000054b01000503020201030202050301000537010005000000
-050c0100050c0100050003ff03ff033e05000000054a0100050302020103020205030100
-0538010005000000050c0000050c010003ff03ff033e0000054b01000503020201030202
-050301000537010005000000050c0100050c0100050003ff03ff033e05000000054a0100
-0503020201030202050301000538010005000000050c0000050c010003ff03ff033e0000
-054b01000503020201030202050301000537010005000000050c0100050c0100050003ff
-03ff033e05000000054a01000503020201030202050301000538010005000000050c0000
-050c010003ff03ff033e0000054b01000503020201030202050301000537010005000000
-050c0100050c0100050003ff03ff033e05000000054a0100050302020103020205030100
-0538010005000000050c0000050c010003ff03ff033e0000054b01000503020201030202
-050301000537010005000000050c0100050c0100050003ff03ff033e05000000054a0100
-0503020201030202050301000538010005000000050c0000050c010003ff03ff033e0000
-054b01000503020201030202050301000537010005000000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050003ff03ff033e05000000054a0100050302020103020205030100
-053801000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000500010003ff03ff033e0000
-054b01000503020201030202050301000537010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000054a01000503020201030202050301000538000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000054b0100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-0503010005ff05ff05e3010005030202010302020503010005ff05ff05e3010005030202
-010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e30100
-05030202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff
-05e3010005030202010302020503010005ff05ff05e30100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-0503010005ff05ff05e3010005030202010302020503010005ff05ff05e3010005030202
-010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e30100
-05030202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff
-05e3010005030202010302020503010005ff05ff05e30100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-0503010005ff05ff05e3010005030202010302020503010005ff05ff05e3010005030202
-010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e30100
-05030202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff
-05e3010005030202010302020503010005ff05ff05e30100050302020103020205030100
-05ff05ff05e3010005030202010302020503010005ff05ff05e301000503020201030202
-0503010005ff05ff05e3010005030202010302020503010005ff05ff05e3010005030202
-010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e30100
-05030202010100040503010005ff05ff05e301000503000502020400050301ff01ff01e5
-050300000202040000000202040005ff05ff05ed00000202040000000202040005ff05ff
-05ed00000202040000000202040005ff05ff05ed00000202040000000202040005ff05ff
-05ed000002020400000002020400000502ff02ff02e100060202040000000208040002ff
-02ff02e100000208040000000208040002ff02ff02e100000208040000000208040001ff
-01ff01e10000020804000000040901ff01ff01e100000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 380 315
-%%EOF
diff --git a/lib/tv/doc/src/tv_table_browser_updated.gif b/lib/tv/doc/src/tv_table_browser_updated.gif
deleted file mode 100644
index 547497487d..0000000000
--- a/lib/tv/doc/src/tv_table_browser_updated.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_table_browser_updated.ps b/lib/tv/doc/src/tv_table_browser_updated.ps
deleted file mode 100644
index 0a944565e8..0000000000
--- a/lib/tv/doc/src/tv_table_browser_updated.ps
+++ /dev/null
@@ -1,2124 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_table_browser_updated.eps)
-%%CreationDate: (Mon Mar 19 17:15:32 2001)
-%%BoundingBox: 0 0 380 315
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 380 315
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-380.000000 315.000000
-12
-760 630
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-d9d9d9
-b22222
-00ff00
-ff0000
-990000
-7f7f7f
-999999
-ff7f7f
-009900
-7fff7f
-000000
-000a01ff01ff01e1000b0208040001ff01ff01e100000208040000000208040002ff02ff
-02e1000002080400000002080400020000ff00ff00de0400020000000208040000000202
-04060200000004ff04ff04de020000000405020204000000020204000209000d02ff02ff
-02d500000202040000000202040002080000020d04000289010302110103023201020258
-0102020c010102010101021e010102290101020601010208010102310101022a01010230
-0101029600000202040000000202040002080000020d0400028901010202010702000101
-0203010102010101020e01050200010702010103020d0101020401010204010302030103
-020e010302060103020301030203010302060103020b0101020a01010202010102190100
-02030101021c0100020b01010206010102090101021b010202020100020d0101022a0101
-020c0104021e0101029600000202040000000202040002080000020d0400028901010205
-0101020301010203010102010101020e0101020701010203010102010101020c01010202
-010302030101020101010201010102010101020801010201010102010101020401010201
-01010201010102010101020101010201010102040101020101010201010102060101020a
-0101020201010218010102210101020b01010206010102090101021b010202020100020d
-01010238010102020101021d010102960000020204000000020204000208000002020406
-020304000289010102050101020301010203010102010101020e01010207010102030101
-020501010209010102030101020701010201010102010101020601020202010102010101
-020801010201010102010101020101010201010102040101020101010202010202030101
-020a01010203010102020103020301030202010302010104020101010202010302030101
-02000101020a0104020101030203010102000101020301010202010302030101021a0100
-020001010201010002020103020301040202010302020101020901010200010102010101
-020301030203010102020101020001010202010102010103020201010200010102010101
-020301030202010102000101020101010202010302020101020201010285000002020400
-000004030208000002020400030400000203040002890101020501010204010102020100
-02020101020e0101020701010203010202040101020a0100020301010207010102010101
-020101010205010102040101020101010208010102010101020101010201010102010101
-02040101020101010204010102020100020b010102030101020101010201010102010101
-020101010200010102010101020101010203010102010101020101010202010202000101
-020a01010202010102010101020201020200010102020101020101010201010102020101
-021a01000200010102010100020101010201010102010101020101010201010102010101
-020101010209010202000102020001010201010102010101020201010202010202000101
-020101010200010102000101020201020200010202000101020101010201010102010101
-0200010102010101020101010201010102010101020201010285000004030101020b0000
-0203040003020000020404000289010102050101020401010201010102020101020e0104
-0204010102040103020d0101020401010205010202020101020101010204010102050101
-020101010207010102020101020101010202010402040101020101010205010102020101
-020901010203010102010101020101010201010102080101020101010203010102010101
-020101010202010102010101020a01010206010102020101020101010202010102010101
-0201010102020101021a0100020001020200010002010101020101010201010102010101
-0201010102010101020d0101020101010201010102050101020201010202010102010101
-020101010200010102000101020201010201010102010101020501010201010202030101
-0201010102010101020101010202010002890103020b0000020304000302000002040400
-0289010102050101020501010200010002030101020e01010207010102060102020e0100
-020301010207010102010101020101010205010102040101020101010206010102030101
-020101010205010102040101020101010204010102020100020b01010203010102010101
-020101010201010102050104020101010203010102010101020101010202010102010101
-020a0101020301040202010102010101020201010201010502020101021a010002010101
-020001000201010102010101020101010201010102010105020d01010201010102010101
-020201040202010102020101020101010201010102000101020001010202010102010101
-0201010102020104020101010204010102010105020201010200010102890103020b0000
-02040400030000000205040002890101020501010205010302030101020e010102070101
-02070101020d010102030101020701010201010102010101020601020202010102010101
-0205010102040101020101010205010102040101020101010202010202030101020a0101
-020301010201010102010101020101010204010102010101020101010203010102010101
-020101010202010102010101020a01010202010102010101020201010201010102020101
-0201010102060101021a0100020201020201010102010101020101010201010102010101
-021101010201010102010101020101010201010102020101020201010201010102010101
-020101010200010102010101020101010201010102010101020101010201010102040101
-020101010206010102000100028a0103020b000002040400030000000205040002890101
-020501010206010102040101020e01010207010102030101020101010201010102080101
-020401010203010102010101020101010201010102010101020401010201010102010101
-020101010200010502010101020101010201010102010101020101010200010102010101
-0201010102060101020a0101020201010201010102010101020101010202010002000101
-02010101020101010203010102010101020101010202010102010101020a010102020101
-02010101020201010201010102020101020101010202010002010101021b010002020102
-020101010201010102010101020001020201010102020100020101010209010102010101
-020101010201010102010101020201010202010102010101020201010207010102010101
-0201010102010101020101010201010102040101020101010202010002030102028a0103
-020b0000020500000206040002890101020501010206010102040101020e010502030101
-020401030202010102080101020401010204010302030103020201010209010302020101
-0200010502020103020301030202010102010103020b0101020a01010202010102020103
-0203010302020102020001010201010202010101020201030203010102010101020b0102
-020101020200010102010104020301010202010302020101021b01000203010102020103
-020301010200010102020103020201010209010102010101020101010202010202000101
-020101010202010102010101020301050202010102010101020101010202010202000101
-02000101020401010202010302040101028b0103020b0000020d04000289010302110103
-0232010202190100023d0102020c01010237010602230101029e0101028c0103020b0000
-020d040002f2010002ff02540101028c0103020b0000020d040002ff02ff02d70103020c
-040d02ff02ff02d8010302ff02ff02f3010302ff02ff02f30103020200ff00ff00ec0400
-020201030202000004ff04ff04ec0202010302ff02ff02f3010302020500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000202010302020000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000202010302020500000005ff05ff05ea01000202010302020000
-05ff05ff05ea010005000202010302020500000005ff05ff05ea01000202010302020000
-05ff05ff05ea010005000202010302020500000005ff05ff05ea01000202010302020000
-050c06040504060005030602051f06040505060005040600050406000519060005020600
-0504060005270602050b06000506060005ff05ff05080600050206000509060205130100
-050002020103020205000000050b0600050f0600051f060005090600050a060005190600
-05020600052c060005020600050a060005ff05ff0510060005020600050b060005140100
-0202010302020000050c0600050606020505060005030602051806000506060105000600
-050206020502060405170600050206000502060205030602050206000502060005170600
-050206000501060005000601050206040502060205030602050206000500060105030602
-05ff05f306000502060005020602050506000502060005000601050c0100050002020103
-020205000000050b06000508060005050600050206000502060005170600050506000501
-06010504060005040600051a060005000600050506000502060005020600050106000502
-060005170600050206000501060105010600050306000506060005020600050206000501
-060105010600050106000502060005ff05f2060005020600050106000502060005040600
-0502060105010600050c01000202010302020000050c0603050506000505060005020600
-050206000517060305020600050206000504060005040600051a06000500060005050600
-050206000502060005010600050006000500060005170600050206000501060005020600
-0503060005060600050206000502060005010600050206000501060005ff05f606040501
-060005020600050406000502060005020600050b0100050002020103020205000000050b
-06000508060005050600050206040517060005050600050206000504060005040600051a
-060005000600050506000502060405010600050006000500060005170600050206000501
-0600050206000503060005060600050206000502060005010600050206000502060205ff
-05f306000502060005010604050406000502060005020600050c01000202010302020000
-050c0600050806000505060005020600051b060005050600050206000504060005040600
-051b06000506060005020600050506000500060005000600051706000502060005010600
-050206000503060005060600050206000502060005010600050206000505060005ff05f2
-06000502060005010600050806000502060005020600050b010005000202010302020500
-0000050b0600050806000505060005020600050206000517060005050600050106010504
-060005040600051b06000506060005020600050206000501060005000600050006000517
-060005020600050106010501060005030600050606000502060005020600050106000502
-0600050106000502060005ff05f206000502060005010600050206000504060005020601
-05010600050c01000202010302020000050c060005080600050506000503060205180604
-050206010500060005040600050506010519060005060600050306020503060005000600
-051906020502060005000601050506010504060005030602050206000502060005020602
-05ff05f306000502060005020602050506000502060005000601050c0100050002020103
-02020500000005a8060005ff05ff052e0600051001000202010302020000050b0606052a
-0606052a0606052a06060500060005ff05ff05180606050e0600050f0100050002020103
-020205000000050a0606052a0606052a0606052a06060500060005ff05ff05180606050e
-060005100100020201030202000005ff05ff05ea010005000202010302020500000005ff
-05ff05ea0100020201030202000005ff05ff05ea01000500020201030202050000000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100020201030202000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050002020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-020201030202053600000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000051a00000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050100000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050100000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000051a00000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000051a00000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000051a00000500000005000000050000000500000005000000050000000500
-00000500000005000000050000000500000005ff05a50202010302020535000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500010005180000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000100000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-010000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050001000518000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500010005180000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000100051800000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000500010005ff05a402020103
-02020536000005140100051a00000514010005010000051401000501000005140100051a
-000005140100051a000005140100051a00000514010005ff05a502020103020205350000
-051601000518000005160100000005160100000005160100051800000516010005180000
-05160100051800000516010005ff05a40202010302020536000005140100051a00000514
-010005010000051401000501000005140100051a000005140100051a000005140100051a
-00000514010005ff05a50202010302020535000005050602050306020506010005180000
-051601000000051601000000051601000518000005160100051800000516010005180000
-0516010005ff05a402020103020205360000050406020503060205050100051a00000514
-010005010000051401000501000005140100051a00000506060405080100051a00000508
-060105090100051a0000050806030507010005ff05a50202010302020535000005040604
-050106040505010005180000051006000504010000000510060005040100000005040600
-051001000518000005050608050701000518000005080603050901000518000005070607
-0506010005ff05a402020103020205360000050306000501060105010600050106010504
-0100051a0000050f06000503010005010000050f0600050301000501000005030600050f
-0100051a00000503060a05050100051a00000507060305080100051a0000050506030501
-06030504010005ff05a5020201030202053500000503060d0504010005180000050d0600
-0501060005040100000005040600050a06000504010000000504060005010600050d0100
-051800000504060305020603050601000518000005090601050a01000518000005060602
-050306020505010005ff05a4020201030202053600000501060005000603050006020500
-060405020100051a0000050c060005010600050301000501000005030600050a06000503
-0100050100000503060005010600050c0100051a0000050206030504060305040100051a
-000005140100051a000005050602050306020504010005ff05a502020103020205350000
-050206000500060305000602050006040503010005180000050a06000501060005010600
-050401000000050406000504060005040600050401000000050406000501060005010600
-050a01000518000005030602050306070503010005180000050706040509010005180000
-05070601050206020506010005ff05a40202010302020536000005010600050006030500
-06020500060405020100051a000005090600050106000501060005030100050100000503
-06000504060005040600050301000501000005030600050106000501060005090100051a
-0000050206020504060505030100051a00000507060305080100051a0000050a06020506
-010005ff05a5020201030202053500000502060005000603050006020500060405030100
-051800000507060005010600050106000501060005040100000005040600050406000501
-060005010600050401000000050406000501060005010600050106000507010005180000
-05030602050506030505010005180000050906020509010005180000050a060205080100
-05ff05a40202010302020536000005010600050006070500060405020100051a00000506
-060005010600050106000501060005030100050100000503060005040600050106000501
-060005030100050100000503060005010600050106000501060005060100051a00000502
-06030505060105050100051a00000508060205080100051a0000050806020508010005ff
-05a502020103020205350000050206000500060405010600050006040503010005180000
-050406000501060005010600050106000501060005040100000005040600050106000501
-060005010600050106000504010000000504060005010600050106000501060005010600
-050401000518000005040603050d01000518000005090602050901000518000005090602
-0509010005ff05a402020103020205360000050106060501060605020100051a00000503
-060005010600050106000501060005010600050301000501000005030600050106000501
-060005010600050106000503010005010000050306000501060005010600050106000501
-060005030100051a00000503060905060100051a00000508060205080100051a00000514
-010005ff05a5020201030202053500000502060005000602050506000500060205030100
-051800000504060005010600050106000501060005010600050401000000050406000501
-060005010600050106000501060005040100000005040600050106000501060005010600
-050106000504010005180000050506070508010005180000050806040508010005180000
-050906020509010005ff05a4020201030202053600000501060005000602050506000500
-060205020100051a00000503060005010600050106000501060005010600050301000501
-000005030600050106000501060005010600050106000503010005010000050306000501
-060005010600050106000501060005030100051a00000506060405080100051a00000506
-060605060100051a0000050806020508010005ff05a50202010302020535000005020604
-050506040503010005180000051601000000051601000000051601000518000005160100
-0518000005160100051800000516010005ff05a40202010302020536000005140100051a
-00000514010005010000051401000501000005140100051a000005140100051a00000514
-0100051a00000514010005ff05a502020103020205350000051601000518000005160100
-000005160100000005160100051800000516010005180000051601000518000005160100
-05ff05a40202010302020536000005140100051a00000514010005010000051401000501
-000005140100051a000005140100051a000005140100051a00000514010005ff05a50202
-010302020535000005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005180000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000518000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005180000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100051800000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005ff05a402020103020205360100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100051a0100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005010100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005010100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100051a0100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100051a0100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100051a0100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005ff05a5020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed020201030202
-05ff05ff05ed02020103020205ff05ff05ed020201030202050301ff01ff01e505030202
-01030202050301ff01ff01d1050000000500000005000000050000000500000005000000
-050000000500000005000000050001000503020201030202050301ff01ff01d100000500
-000005000000050000000500000005000000050000000500000005000000050001010503
-020201030202050301020bff0bff0bcb010205000000050e010005000100050302020103
-0202050301020bff0bff0bca000001020000051001010503020201030202050301020b01
-00ff00ff00c9010205000000050e0100050001000503020201030202050301020b0100ff
-00ff00c901020000051001010503020201030202050301020b0100ff00ff00c901020500
-0000050e0100050001000503020201030202050301020b0100ff00ff00c9010200000510
-01010503020201030202050301020b0100ff00ff00c9010205000000050e010005000100
-0503020201030202050301020b0100ff00ff00c9010200000502010a0502010105030202
-01030202050301020b0100ff00ff00c90102050000000502010805020100050001000503
-020201030202050301020b0100ff00ff00c9010200000504010605040101050302020103
-0202050301020b0100ff00ff00c901020500000005040104050401000500010005030202
-01030202050301020b0100ff00ff00c90102000005060102050601010503020201030202
-050301020b0100ff00ff00c9010205000000050601000506010005000100050302020103
-0202050301020b0100ff00ff00c901020000051001010503020201030202050301020b01
-00ff00ff00c9010205000000050e0100050001000503020201030202050301020b0100ff
-00ff00c901020000051001010503020201030202050301020b0100ff00ff00c901020500
-0000050e0100050001000503020201030202050301020b0100ff00ff00c9010200000510
-01010503020201030202050301020b0100ff00ff00c9010205000000050e010005000100
-0503020201030202050301020b0000ff00ff00ca01020000051001010503020201030202
-050301ff01ff01d105000000050001000500010005000100050001000500010005000100
-0500010005000100050001000503020201030202050301ff01ff01d10000050001000500
-010005000100050001000500010005000100050001000500010005000101050302020103
-0202050301ff01ff01e5050302020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-02020103020205ff05ff05ed02020103020205ff05ff05ed02020103020205ff05ff05ed
-020201030202050301ff01ff01e505030202010302020503010005ff05ff05970100054a
-01000503020201030202050301000563010505ff05ff052d0100054a0100050302020103
-0202050301000562010705ff05ff052c0100054a01000503020201030202050301000561
-01020503010205ff05ff052b0100054a0100050302020103020205030100056101010505
-010105ff05ff052b0100054a0100050302020103020205030100056101020503010205ff
-05ff052b0100054a01000503020201030202050301000562010705ff05ff052c0100054a
-01000503020201030202050301000563010505ff05ff052d0100054a0100050302020103
-0202050301000565010105ff05ff052f0100054a01000503020201030202050301000565
-010105ff05ff052f0100054a01000503020201030202050301000565010105ff05ff052f
-0100054a01000503020201030202050301000565010105ff05ff052f0100054a01000503
-020201030202050301000565010105ff05ff052f0100054a010005030202010302020503
-01000565010105ff05ff052f0100054a0100050302020103020205030100056101010500
-010205ff05ff052f0100054a0100050302020103020205030100056101010500010205ff
-05ff052f0100054a01000503020201030202050301000561010505ff05ff052f0100054a
-01000503020201030202050301000561010505ff05ff052f0100054a0100050302020103
-020205030100056101020500010105ff05ff052f0100054a010005030202010302020503
-010005ff05ff05970100054a01000503020201030202050301ff01ff0199054a01000503
-020201030202050301000536000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-00000500000005000000050000000500000005000000050000000a040500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000a04050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-0000050000000500000005000000050000000a0405000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-05000000050000000500000005000000050000000500000005000000050000000a040500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000a04050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000a0405000000010005140100
-050001000500010005000100050001000500010005000100050001000500010005240100
-050302020103020205030100053500000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000000050000000500000005000000050000000500000005000a0301000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000a03010000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-05000000050000000500000005000000050000000500000005000a030100000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-0500000005000a0301000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000a03010000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-05000a030100000005000100051301000500010005000100050001000500010005000100
-050001000500010005000100050000000523010005030202010302020503010005360000
-055e01000a01010205000000055c01000a01010205000000055c01000a01010205000000
-055c01000a01010205000000055c01000a01010205000000055c01000a01010205000000
-010005140100050000000500000005000000050000000500000005000000050000000500
-00000524010005030202010302020503010005350000052d0100052f010005000a010102
-0000052b0102052d010005000a0101020000052b0102052d010005000a0101020000052d
-0100052d010005000a0101020000052a0104052c010005000a0101020000052c0102052c
-010005000a01010200000500010005130100050000000500000005000000050000000500
-000005000000050000000500010005000000052301000503020201030202050301000536
-0000052a0102053001000a010102050000000529010005020100052d01000a0101020500
-00000529010005020100052d01000a01010205000000052b0101052e01000a0101020500
-000005290100053101000a01010205000000052a0100053001000a010102050000000100
-0514010005000000050a0100050000000524010005030202010302020503010005350000
-052d0100052f010005000a0101020000052a010005020100052c010005000a0101020000
-052e0100052c010005000a0101020000052b010005000100052d010005000a0101020000
-052a01000530010005000a0101020000052a01000530010005000a010102000005000100
-0513010005000000050c0100050000000523010005030202010302020503010005360000
-052c0100053001000a010102050000000529010005020100052d01000a01010205000000
-052d0100052d01000a01010205000000052a010005000100052e01000a01010205000000
-05290100053101000a0101020500000005290100053101000a0101020500000001000514
-010005000000050a0100050000000524010005030202010302020503010005350000052d
-0100052f010005000a0101020000052d0100052d010005000a0101020000052c0101052d
-010005000a0101020000052a010005010100052d010005000a0101020000052a0103052d
-010005000a0101020000052a0103052d010005000a010102000005000100051301000500
-0000050c0100050000000523010005030202010302020503010005360000052c01000530
-01000a01010205000000052b0100052f01000a01010205000000052d0100052d01000a01
-0102050000000528010005020100052e01000a01010205000000052d0100052d01000a01
-0102050000000529010005020100052d01000a0101020500000001000514010005000000
-050a0100050000000524010005030202010302020503010005350000052d0100052f0100
-05000a0101020000052b0100052f010005000a0101020000052e0100052c010005000a01
-0102000005290105052c010005000a0101020000052e0100052c010005000a0101020000
-052a010005020100052c010005000a0101020000050001000513010005000000050c0100
-050000000523010005030202010302020503010005360000052c0100053001000a010102
-050000000529010005020100052d01000a010102050000000529010005020100052d0100
-0a01010205000000052c0100052e01000a010102050000000528010005030100052d0100
-0a010102050000000529010005020100052d01000a010102050000000100051401000500
-0000050a0100050000000524010005030202010302020503010005350000052b0104052d
-010005000a0101020000052a0104052c010005000a0101020000052b0102052d01000500
-0a0101020000052c0102052c010005000a0101020000052a0103052d010005000a010102
-0000052b0102052d010005000a0101020000050001000513010005000000050c01000500
-00000523010005030202010302020503010005360000055e01000a01010205000000055c
-01000a01010205000000055c01000a01010205000000055c01000a01010205000000055c
-01000a01010205000000055c01000a0101020500000001000514010005000000050a0100
-050000000524010005030202010302020503010005350000055e010005000a0101020000
-055c010005000a0101020000055c010005000a0101020000055c010005000a0101020000
-055c010005000a0101020000055c010005000a0101020000050001000513010005000000
-050c0100050000000523010005030202010302020503010005360000055e01000a010102
-05000000055c01000a01010205000000055c01000a01010205000000055c01000a010102
-05000000055c01000a01010205000000055c01000a010102050000000100050e01000504
-010005000000050a0100050000000524010005030202010302020503010005350000055e
-010005000a0101020000055c010005000a0101020000055c010005000a0101020000055c
-010005000a0101020000055c010005000a0101020000055c010005000a01010200000500
-0100050d01010503010005000000050c0100050000000523010005030202010302020503
-010005360000055e01000a01010205000000055c01000a01010205000000055c01000a01
-010205000000055c01000a01010205000000055c01000a01010205000000055c01000a01
-0102050000000100050c0100050001000504010005000000050001000500010005000100
-050001000500010005000100050000000524010005030202010302020503010005350000
-055e010005000a0101020000055c010005000a0101020000055c010005000a0101020000
-055c010005000a0101020000055c010005000a0101020000055c010005000a0101020000
-05000100050e010005030100050000000500000005000000050000000500000005000000
-050000000500010005000000052301000503020201030202050301000536000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001000a010102050000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001000a0101020500000005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000a01010205000000050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001000500010005000100050001000a010102050000000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0a0101020500000005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000a010102050000000100050e0100050401000500
-0000050a0100050000000524010005030202010302020503010005350000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000a000103000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000a0001030000050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000a00010300000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050001000500010005000a000103000005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0a0001030000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000a000103000005000100050e0100050301000500
-0000050c0100050000000523010005030202010302020503010005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000063010000630100
-0063010000630100006301000063010000020100050e01000504010005000000050a0100
-050000000524010005030202010302020503010000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050001000063010000630100006301000063
-0100006301000063010000020100050e01000503010005000000050c0100050000000523
-010005030202010302020503010005000000053201000500006301000063010000630100
-00630100006301000063010000020100050c01040502010005000000050a010005000000
-052401000503020201030202050301000000053401000063010000630100006301000063
-01000063010000630100000201000513010005000000050c010005000000052301000503
-020201030202050301000500000005170100051901000500006301000063010000630100
-006301000063010000630100000201000514010005000000050a01000500000005240100
-050302020103020205030100000005160102051a0100000f010200030102004901000007
-010000230100000b010200030102001f0100006301000063010000630100006301000002
-01000513010005000000050c010005000000052301000503020201030202050301000500
-0000051701000519010005000011010000050100004901000007010000230100000d0100
-00050100001f010000630100006301000063010000630100000201000514010005000000
-050a01000500000005240100050302020103020205030100000005180100051a01000008
-010200050100000501000003010200420100000701000000010100030102000201000000
-01010002010000000101000301020002010400010100000201000004010000050100001f
-010000630100006301000063010000630100000201000513010005000000050c01000500
-000005230100050302020103020205030100050000000517010005190100050000070100
-000201000004010000050100000201000002010000410100000701010001010000010100
-000201000001010100010100000101010001010000010100000201000003010000030100
-000201000004010000050100001f01000063010000630100006301000063010000020100
-0514010005000000050a0100050000000524010005030202010302020503010000000518
-0100051a0100000701000002010000040100000501000002010000020100004101000007
-010000020100000101000002010000010100000501000002010000010100000701000003
-0100000201000004010000050100001f0100006301000063010000630100006301000002
-01000513010005000000050c010005000000052301000503020201030202050301000500
-000005170100051901000500000701000002010000040100000501000002010400410100
-000701000002010000010100000201000001010000050100000201000002010200040100
-00030100000201000004010000050100001f010000630100006301000063010000630100
-000201000514010005000000050001000500010005000100050001000500010005000100
-0500000005240100050302020103020205030100000005180100051a0100000701000002
-010000040100000501000002010000450100000701000002010000010100000201000001
-01000005010000020100000501000003010000030100000201000004010000050100001f
-010000630100006301000063010000630100000201000513010005000000050001000500
-010005000100050001000500010005000100050001000500000005230100050302020103
-020205030100050000000515010405170100050000070100000201000004010000050100
-000201000002010000410100000701000002010000010100000201000001010000050100
-0002010000010100000201000003010000030100000101010004010000050100001f0100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000534010000080102000501000005010000030102004201000007
-010000020100000201020002010000050100000201000002010200050101000201010000
-01000004010000050100001f010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000053201000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000053401000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000534
-010000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005320100050000630100
-00630100006301000063010000630100006301000002010005140100030e000005240100
-050302020103020205030100000005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01ff01ff016105140100030e000005240100050302020103020205030100050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000630100
-006301000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000100006301000063010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000500
-000005320100050000630100006301000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000000053401000063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010005000000051601020518010005000063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-0503020201030202050301000000051601000502010005180100001f0100000301020003
-010200340100000f01020050010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005150100050201000517
-010005000026010000050100003401000011010000500100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005160100050201000518010000080101000001000001010000020100000101000000
-010100030102000501000005010000030102002d01000008010200050100000201000002
-01000002010200030102000301020002010000000101002d010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000500
-000005180100051801000500000701000001010100010100000201000001010100010100
-0004010000050100000501000002010000020100002c0100000701000002010000040100
-000201000002010000010100000201000001010000020100000101000002010000010101
-00010100002c01000063010000630100006301000063010000020100051301000500030e
-0500000005230100050302020103020205030100000005180100051a0100000701000002
-01000001010000020100000101000002010000040100000501000005010000060100002c
-010000070100000801000002010000020100000101000005010000050100000201000001
-010000020100002c0100006301000063010000630100006301000002010005140100030e
-0000052401000503020201030202050301000500000005160100051a0100050000070100
-000201000001010000020100000101000002010000040100000501000005010000030103
-002c01000008010200050100000201000002010000020102000301020002010400010100
-00020100002c01000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000516010005020100051801000007
-010000020100000101000002010000010100000201000004010000050100000501000002
-010000020100002c0100000b010000040100000201000002010000050100000501000001
-01000005010000020100002c010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005150104051701000500
-000701000001010100010100000101010001010000020100000401000005010000050100
-0002010000020100002c0100000701000002010000040100000201000001010100010100
-00020100000101000002010000010100000201000001010000020100002c010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000534010000080101000001000002010100000100000101000002
-010000040100000501000005010000030103002c01000008010200050100000301010000
-01000002010200030102000301020002010000020100002c010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000500
-0000053201000500000b0100005601000063010000630100006301000063010000630100
-00020100051301000500030e050000000523010005030202010302020503010000000534
-010000070100000201000056010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000053201000500
-000801020057010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005340100006301000063
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005320100050000630100006301000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000500010005000100050001000500010005000100050001ff01ff0161051301000500
-030e05000000052301000503020201030202050301000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000100006301000063010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000053201000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000053401000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000516010205180100050000630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-00000516010005020100051801000063010000070100005a010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000000051901000517010005000063010000070100005a01000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0000051a0100051801000008010200020100000001010002010000000101000301020042
-010000070100000001010002010000000101000301020002010100000100000201010000
-010000030102003401000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005170101051801000500
-000701000002010000010101000101000001010100010100000101000002010000410100
-000701010001010000010101000101000001010000020100000101000000010000000100
-000101000000010000000100000101000002010000330100006301000063010000630100
-006301000002010005140100030e0000052401000503020201030202050301000000051a
-010005180100000b01000001010000020100000101000002010000050100004101000007
-010000020100000101000005010000020100000101000000010000000100000101000000
-010000000100000501000033010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000051901000517
-010005000008010300010100000201000001010000020100000201030041010000070100
-000201000001010000050100000201000001010000000100000001000001010000000100
-000001000002010300330100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000516010005020100051801000007
-010000020100000101000002010000010100000201000001010000020100004101000007
-010000020100000101000005010000020100000101000000010000000100000101000000
-010000000100000101000002010000330100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000516
-010205180100050000070100000201000001010000020100000101000002010000010100
-000201000041010000070101000101000001010000050100000201000001010000000100
-000001000001010000000100000001000001010000020100003301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005340100000801030001010000020100000101000002010000020103004101000007
-010000000101000201000006010200020100000001000000010000010100000001000000
-010000020103003301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005320100050000630100
-00630100006301000063010000630100006301000002010005140100030e000005240100
-050302020103020205030100000005340100006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000000053201000500006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000053401000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000532010005000063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000063010000630100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001ff01ff
-016105140100030e00000524010005030202010302020503010005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-050302020103020205030100000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500010000630100006301000063010000630100006301000063
-01000002010005140100030e000005240100050302020103020205030100050000000532
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005340100006301000063
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005180100051801000500006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000518010105190100001001000006010000490100000e0100001c
-0100000b010200030102001f010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005160100050001000518
-010005000010010000510100000e0100001c0100000d010000050100001f010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000517010005000100051901000008010200020104000201020002
-01000000010100030102003b010000080102000201000001010000030102000201000000
-0101000301020002010400010100000201000004010000050100001f0100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-010005000000051501000501010005180100050000070100000201000003010000060100
-00020101000101000001010000020100003a010000070100000201000001010000000100
-000301000002010000010101000101000001010000020100000301000003010000020100
-0004010000050100001f0100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005150100050201000519
-0100000701000007010000060100000201000002010000050100003a0100000701000005
-010100080100000101000002010000010100000701000003010000020100000401000005
-0100001f0100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010005000000051401050517010005000008010200040100
-00060100000201000002010000020103003a010000080102000201010005010300010100
-00020100000201020004010000030100000201000004010000050100001f010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000519010005190100000b01000003010000060100000201000002
-01000001010000020100003a0100000b0100000101000000010000030100000201000001
-010000020100000501000003010000030100000201000004010000050100001f01000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000517010205170100050000070100000201000003010000060100
-00020100000201000001010000020100003a010000070100000201000001010000010100
-000201000002010000010100000201000001010000020100000301000003010000010101
-0004010000050100001f0100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005340100000801020005
-010100040100000201000002010000020103003a01000008010200020100000201000002
-01030001010000020100000201020005010100020101000001000004010000050100001f
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005320100050000630100006301000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000000053401000063010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000053201000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000534010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001ff01ff0161051301000500030e0500
-0000052301000503020201030202050301000a3600630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0a3501000063010000630100006301000063010000630100006301000002010005130100
-0500030e05000000052301000503020201030202050301000a0101340063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000a010134006301000063010000630100006301000063010000630100
-00020100051301000500030e05000000052301000503020201030202050301000a010115
-000401190063010000630100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000a0101150000011d00070100000e0100
-0014010000340100002b0102003401000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000a0101150000011d
-00070100000e0100004a0100002d01000034010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000a0101150000011d
-000701000001010000030102000201040002010200020100000001010003010200020100
-000001010003010200260100000701000002010000010100000001010002010000000101
-00030102000301020005010000030102002d010000630100006301000063010000630100
-00020100051301000500030e05000000052301000503020201030202050301000a010115
-0003011a0007010000000100000301000002010000030100000301000002010000010101
-000101000004010000020101000101000001010000020100002501000007010000020100
-000101010001010000010101000101000001010000020100000101000002010000040100
-0002010000020100002c0100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000a010119000001190007010100080100
-000301000007010000010100000801000002010000020100000501000025010000070100
-000201000001010000020100000101000002010000010100000901000004010000060100
-002c01000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000a01011900000119000701010005010300030100
-000401030001010000080100000201000002010000020103002501000007010000020100
-0001010000020100000101000002010000020102000301030004010000030103002c0100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000a010114000001030000011900070100000001000003010000020100
-000301000003010000020100000101000008010000020100000201000001010000020100
-002501000007010000020100000101000002010000010100000201000005010000010100
-00020100000401000002010000020100002c010000630100006301000063010000630100
-00020100051301000500030e05000000052301000503020201030202050301000a010115
-0003011a0007010000010100000201000002010000030100000301000002010000010100
-000801000002010000020100000101000002010000250100000701000001010100010101
-000101000001010100010100000101000002010000010100000201000004010000020100
-00020100002c0100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000a01013400070100000201000002010300040101
-000201030001010000080100000201000002010000020103002501000008010100000100
-0001010000000101000201000000010100030102000301030004010000030103002c0100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-0503020201030202050301000a01013400630100000e010000050100004c010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000a01013400630100000e010000050100004c0100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-0a01013400630100000e010000050100004c010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000a01013400630100
-006301000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000a01013400630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0a0101340063010000630100006301000063010000630100006301000002010005130100
-0500030e05000000052301000503020201030202050301000a0001ff01ff019705140100
-030e00000524010005030202010302020503010005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500010000630100006301000063010000630100006301000063010000020100
-05140100030e000005240100050302020103020205030100050000000532010005000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100000005340100006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000500000005170102051701000500006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-0100000005170100051b0100000a0100001a01010004010000340100000f0102000c0100
-00020100003e0100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000500000005150100051b0100050000250100003c
-01000011010000100100003e010000630100006301000063010000630100000201000513
-01000500030e0500000005230100050302020103020205030100000005160100051c0100
-000801020003010200030102000301020004010000040102000201000000010100030102
-0026010000080102000501000002010000020100000201020002010000010100003b0100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000500000005150103051801000500000a010000020100000201000001
-010000020100000101000002010000010104000401000002010100010100000101000002
-010000250100000701000002010000040100000201000002010000040100000201000000
-0100003c01000063010000630100006301000063010000020100051301000500030e0500
-0000052301000503020201030202050301000000051601000502010005180100000a0100
-000201000002010000010100000501000002010000030100000601000002010000020100
-000101000002010000250100000b01000004010000020100000201000004010000020101
-003d0100006301000063010000630100006301000002010005140100030e000005240100
-050302020103020205030100050000000515010005020100051701000500000a01000002
-010000020100000201020002010400030100000601000002010000020100000101040025
-0100000801030004010000030100000001000005010000020101003d0100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-0202050301000000051601000502010005180100000a0100000201000002010000050100
-000101000007010000060100000201000002010000010100002901000007010000020100
-000401000003010000000100000501000002010000000100003c01000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0500000005160102051801000500000a0100000201000002010000010100000201000001
-010000020100000301000006010000020100000201000001010000020100002501000007
-0100000201000004010000040100000601000002010000010100003b0100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100000005340100000a01000003010200030102000301020004010000060100
-000201000002010000020102002601000008010300040100000401000006010000020100
-00020100003a0100006301000063010000630100006301000002010005140100030e0000
-0524010005030202010302020503010005000000053201000500000a0100005701000063
-01000063010000630100006301000063010000020100051301000500030e050000000523
-010005030202010302020503010000000534010000070100000101000057010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010005000000053201000500000801010058010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100000005340100006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000500000005320100
-050000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000000050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-05000100050001ff01ff0161051301000500030e05000000052301000503020201030202
-050301000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000100006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000000
-053401000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100050000000515010405170100
-05000063010000630100006301000063010000630100006301000002010005140100030e
-0000052401000503020201030202050301000000051601000502010005180100000a0101
-00130100000b0100000201000030010000250100000b0102000301020026010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010005000000051801000518010005000009010000150100000f01000030
-010000250100000d01000005010000260100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010000000519010005190100
-000901000003010000000101000301020003010100000100000101000000010100030102
-0002010000010100002d0100000701000000010100030102000201000000010100020100
-000001010002010400010100000201000004010000050100002601000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000500000005180100051801000500000701040001010100010100000101000002
-010000010100000101010001010100010100000401000002010000000100002e01000007
-010100010100000101000002010000010101000101000001010100010100000301000003
-010000020100000401000005010000260100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010000000519010005190100
-000901000003010000050100000201000001010000020100000101000008010000020101
-002f01000007010000020100000101000002010000010100000501000007010000030100
-000201000004010000050100002601000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000500000005170100
-051901000500000901000003010000050104000101000002010000010100000801000002
-0101002f0100000701000002010000010100000201000001010000050100000701000003
-010000020100000401000005010000260100006301000063010000630100006301000002
-010005140100030e000005240100050302020103020205030100000005180100051a0100
-000901000003010000050100000501000002010000010100000801000002010000000100
-002e01000007010000020100000101000002010000010100000501000007010000030100
-000201000004010000050100002601000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000500000005170100
-051901000500000901000003010000050100000201000001010000010101000101000008
-01000002010000010100002d010000070100000201000001010000020100000101000005
-010000070100000301000001010100040100000501000026010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000000
-053401000009010000030100000601020003010100000100000101000008010000020100
-00020100002c010000070100000201000002010200020100000501000008010100020101
-000001000004010000050100002601000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000500000005320100
-05000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100000005340100006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010005000000053201000500006301000063010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000000
-053401000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100050000000532010005000063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010000000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001ff01ff016105140100030e0000052401000503020201030202050301000e360063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-0000052301000503020201030202050301000e350d000063010000630100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-01000e0107320d0100630100006301000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000e0107320d010063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-01000503020201030202050301000e010716010207180d01006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-01030202050301000e01071501000702010007170d01006301000010010000200102002d
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000e01071501000702010007170d01006301000010010000220100
-002d01000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000e01071501000702010007170d01000701000000
-010100030102000201000000010100490100000801020002010400010100000201000001
-01000000010100030102000201000000010100050100000301020002010000000101001f
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000e010716010207180d0100070101000101000001010000020100
-000101010001010000480100000701000002010000030100000301000002010000010101
-000101000001010000020100000101010001010000040100000201000002010000010101
-00010100001e01000063010000630100006301000063010000020100051301000500030e
-05000000052301000503020201030202050301000e01071501000702010007170d010007
-010000020100000101000002010000010100004c01000007010000070100000301000002
-010000010100000501000002010000010100000201000004010000060100000101000002
-0100001e0100006301000063010000630100006301000002010005140100030e00000524
-01000503020201030202050301000e01071501000702010007170d010007010000020100
-0001010400010100004c0100000801020004010000030100000201000001010000050104
-000101000002010000040100000301030001010000020100001e01000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000e01071501000702010007170d0100070100000201000001010000050100004c
-0100000b0100000301000003010000020100000101000005010000050100000201000004
-010000020100000201000001010000020100001e01000063010000630100006301000063
-01000002010005140100030e0000052401000503020201030202050301000e0107160102
-07180d010007010100010100000101000002010000010100004c01000007010000020100
-000301000003010000010101000101000005010000020100000101010001010000040100
-00020100000201000001010000020100001e010000630100006301000063010000630100
-00020100051301000500030e05000000052301000503020201030202050301000e010732
-0d0100070100000001010003010200020100004c01000008010200050101000201010000
-01000001010000060102000201000000010100050100000301030001010000020100001e
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000e0107320d0100070100005a0100002a01000037010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-01030202050301000e0107320d0100070100005a0100002a010000370100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-01000e0107320d0100070100005a0100002a010000370100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-0e0107320d01006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000e0107320d010063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-0503020201030202050301000e010d340063010000630100006301000063010000630100
-006301000002010005140100030e0000052401000503020201030202050301000e000d35
-01ff01ff0161051301000500030e05000000052301000503020201030202050301000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000100006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000000053201000500006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000053401000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000516010205180100050000630100
-00630100006301000063010000630100006301000002010005140100030e000005240100
-0503020201030202050301000000051601000502010005180100001f0100004201000012
-010000170102003401000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005150100050201000517
-010005000063010000120100001901000034010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000051601000502
-01000518010000070101000001000003010200020100000001010003010200030102003b
-010000080102000301010000010000020102000201000000010100020100000001010005
-010000030102000201000000010100260100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000515
-010005020100051701000500000701000000010000000100000101000002010000010101
-00010100000401000002010000020100003a010000070100000201000001010000010101
-000101000002010000010101000101000001010100010100000401000002010000020100
-000101010001010000250100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000517010305180100000701000000
-01000000010000050100000101000008010000060100003a010000070100000201000001
-010000020100000101000002010000010100000201000001010000020100000401000006
-010000010100000201000025010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000051901000517
-0100050000070100000001000000010000020103000101000008010000030103003a0100
-000701000002010000010100000201000001010400010100000201000001010000020100
-000401000003010300010100000201000025010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000051901000519
-010000070100000001000000010000010100000201000001010000080100000201000002
-0100003a0100000701000002010000010100000201000001010000050100000201000001
-010000020100000401000002010000020100000101000002010000250100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000515010205190100050000070100000001000000010000010100
-0002010000010100000801000002010000020100003a0100000701000002010000010100
-000101010001010000020100000101000002010000010101000101000004010000020100
-000201000001010000020100002501000063010000630100006301000063010000020100
-05140100030e000005240100050302020103020205030100000005340100000701000000
-01000000010000020103000101000008010000030103003a010000080102000301010000
-010000020102000201000002010000010100000001010005010000030103000101000002
-0100002501000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000532010005000063010000230100
-003e0100006301000063010000630100006301000002010005140100030e000005240100
-0503020201030202050301000000053401000063010000230100003e0100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000532010005000063010000230100003e01000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005340100006301000063010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000053201000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001ff01ff016105140100030e0000052401000503020201030202050301000c36
-00630100006301000063010000630100006301000063010000020100051301000500030e
-05000000052301000503020201030202050301000c350900006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000c01083209010063010000630100006301000063010000630100006301000002
-0100051301000500030e05000000052301000503020201030202050301000c0108320901
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000c01081301000804010208150901006301000063
-01000063010000630100006301000063010000020100051301000500030e050000000523
-01000503020201030202050301000c010811010208030100080201000814090100070100
-0016010000420100000701000006010200100100000c0100003001000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0c010813010008030100080201000814090100070100005a010000070100000801000010
-0100000c0100003001000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000c01081301000803010008020100
-081409010007010000010100000301020002010000000101000301020002010000000101
-003b01000007010000000101000501000003010200030102000201000001010000030102
-000201000000010100030102000201000000010100030101000001000017010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000c01081301000803010008020100081409010007010000000100000301000002
-01000001010100010100000401000002010100010100003a010000070101000101000004
-010000020100000201000001010000020100000101000000010000030100000201000001
-010100010100000101000002010000010101000101000001010000010101001701000063
-010000630100006301000063010000020100051301000500030e05000000052301000503
-020201030202050301000c01081301000803010008020100081409010007010100080100
-00010100000801000002010000020100003a010000070100000201000004010000060100
-000101000005010100040100000201000001010000020100000101000002010000010100
-000501000002010000170100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000c010813010008030100080201000814
-0901000701010005010300010100000801000002010000020100003a0100000701000002
-010000040100000301030001010000050101000401040001010000020100000101040001
-010000050100000201000017010000630100006301000063010000630100000201000513
-01000500030e05000000052301000503020201030202050301000c010813010008030100
-080201000814090100070100000001000003010000020100000101000008010000020100
-00020100003a010000070100000201000004010000020100000201000001010000050100
-000001000003010000050100000201000001010000050100000501000002010000170100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000c010811010408020102081509010007010000010100000201000002
-010000010100000801000002010000020100003a01000007010100010100000401000002
-010000020100000101000002010000010100000101000002010000020100000101010001
-010000010100000201000001010000050100000101010017010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-01000c010832090100070100000201000002010300010100000801000002010000020100
-003a01000007010000000101000501000003010300020102000201000002010000020102
-000201000000010100030102000201000006010100000100001701000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-0c010832090100630100004a010000170100006301000063010000630100006301000002
-0100051301000500030e05000000052301000503020201030202050301000c0108320901
-006301000046010000020100001701000063010000630100006301000063010000020100
-05140100030e0000052401000503020201030202050301000c0108320901006301000047
-0102001801000063010000630100006301000063010000020100051301000500030e0500
-0000052301000503020201030202050301000c0108320901006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000c01083209010063010000630100006301000063010000630100006301000002
-0100051301000500030e05000000052301000503020201030202050301000c0109340063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-01000503020201030202050301000c00093501ff01ff0161051301000500030e05000000
-052301000503020201030202050301000c36006301000063010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000c35
-090000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000c01083209010063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000c010832090100630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000c01
-081301000805010008160901006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000c01081101020803
-01020816090100170100004a010000070100003001020026010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-01000c0108130100080501000816090100170100004a0100000701000032010000260100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-01030202050301000c010813010008050100081609010007010100000100000301020002
-010400020102004201000007010000000101000201000000010100030102000201010000
-010000020101000001000003010200020100000001010005010000030102000201000000
-0101001801000063010000630100006301000063010000020100051301000500030e0500
-0000052301000503020201030202050301000c0108130100080501000816090100070100
-000001000000010000010100000201000003010000030100000201000041010000070101
-000101000001010100010100000101000002010000010100000001000000010000010100
-000001000000010000010100000201000001010100010100000401000002010000020100
-000101010001010000170100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000c010813010008050100081609010007
-010000000100000001000005010000030100000301000045010000070100000201000001
-010000050100000201000001010000000100000001000001010000000100000001000005
-010000010100000201000004010000060100000101000002010000170100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-0202050301000c0108130100080501000816090100070100000001000000010000020103
-000301000004010200420100000701000002010000010100000501000002010000010100
-000001000000010000010100000001000000010000020103000101000002010000040100
-000301030001010000020100001701000063010000630100006301000063010000020100
-05140100030e0000052401000503020201030202050301000c0108130100080501000816
-090100070100000001000000010000010100000201000003010000070100004101000007
-010000020100000101000005010000020100000101000000010000000100000101000000
-010000000100000101000002010000010100000201000004010000020100000201000001
-010000020100001701000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000c01081101040801010408140901
-000701000000010000000100000101000002010000030100000301000002010000410100
-000701010001010000010100000501000002010000010100000001000000010000010100
-000001000000010000010100000201000001010100010100000401000002010000020100
-000101000002010000170100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000c010832090100070100000001000000
-010000020103000401010002010200420100000701000000010100020100000601020002
-010000000100000001000001010000000100000001000002010300010100000001010005
-010000030103000101000002010000170100006301000063010000630100006301000002
-0100051301000500030e05000000052301000503020201030202050301000c0108320901
-006301000031010000300100006301000063010000630100006301000002010005140100
-030e0000052401000503020201030202050301000c010832090100630100003101000030
-01000063010000630100006301000063010000020100051301000500030e050000000523
-01000503020201030202050301000c010832090100630100003101000030010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000c01083209010063010000630100006301000063010000630100006301000002
-0100051301000500030e05000000052301000503020201030202050301000c0108320901
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000c01093400630100006301000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000c00093501ff01ff016105140100030e00000524010005030202010302020503
-010005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005340100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005130100050401020515
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005120102050301000502
-010005150100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005130100050301000502
-010005140100050000630100006301000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000000051401000503
-010005020100051501000063010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000051301000506
-010005150100050000630100006301000063010000630100006301000063010000020100
-051301000500030e05000000052301000503020201030202050301000000051401000505
-010005170100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005130100050401000517
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005140100050301000502
-010005150100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005110104050101040514
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005340100006301000063
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005320100050000630100006301000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000000053401000063010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000053201000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000534010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-01000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001ff01ff0161051301000500030e0500
-000005230100050302020103020205030100050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-010000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005320100050000630100
-00630100006301000063010000630100006301000002010005140100030e000005240100
-050302020103020205030100000005340100006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000000051301000504010205150100050000630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005120102050301000502010005150100006301000063010000630100006301000063
-01000063010000020100051301000500030e050000000523010005030202010302020503
-010005000000051301000507010005140100050000630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005140100050701000515010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-000005130100050501010515010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000514
-010005070100051501000063010000630100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000513
-010005070100051401000500006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000051401000503
-010005020100051501000063010000630100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000511
-010405020102051501000500006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000053401000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000532010005000063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000534010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-000005320100050000630100006301000063010000630100006301000063010000020100
-05140100030e000005240100050302020103020205030100000005340100006301000063
-01000063010000630100006301000063010000020100051301000500030e050000000523
-010005030202010302020503010005000000053201000500006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000000050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100006301000063010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100050001000500010005000100050001ff01ff01610514
-0100030e0000052401000503020201030202050301000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050001000063010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000053201000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000534010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000513010005060100051501000500006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000512010205050101051601000063010000630100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-010005000000051301000504010005000100051501000500006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000514010005040100050001000516010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000513010005030100050101000515010005000063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-050302020103020205030100000005140100050201000502010005160100006301000063
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005130100050201050514010005000063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-050302020103020205030100000005140100050601000516010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000511010405030102051401000500006301000063010000630100
-00630100006301000063010000020100051301000500030e050000000523010005030202
-010302020503010000000534010000630100006301000063010000630100006301000063
-01000002010005140100030e000005240100050302020103020205030100050000000532
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005340100006301000063
-0100006301000063010000630100006301000002010005140100030e0000052401000503
-020201030202050301000500000005320100050000630100006301000063010000630100
-006301000063010000020100051301000500030e05000000052301000503020201030202
-050301000000053401000063010000630100006301000063010000630100006301000002
-010005140100030e00000524010005030202010302020503010005000000053201000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000063010000630100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001ff01ff0161051301000500030e050000000523010005030202010302020503
-010005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000063010000630100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050001000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000534
-010000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005130100050301040514
-010005000063010000630100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000512010205030100051901000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000513010005030100051801000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000051401000503010005190100006301000063
-01000063010000630100006301000063010000020100051301000500030e050000000523
-010005030202010302020503010005000000051301000503010305150100050000630100
-00630100006301000063010000630100006301000002010005140100030e000005240100
-050302020103020205030100000005140100050701000515010000630100006301000063
-010000630100006301000063010000020100051301000500030e05000000052301000503
-020201030202050301000500000005130100050701000514010005000063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000514010005020100050301000515010000630100006301000063
-010000630100006301000063010000020100051301000500030e05000000052301000503
-020201030202050301000500000005110104050101030515010005000063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000534010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-000005320100050000630100006301000063010000630100006301000063010000020100
-05140100030e000005240100050302020103020205030100000005340100006301000063
-01000063010000630100006301000063010000020100051301000500030e050000000523
-010005030202010302020503010005000000053201000500006301000063010000630100
-0063010000630100006301000002010005140100030e0000052401000503020201030202
-050301000000053401000063010000630100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000532
-010005000063010000630100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001ff01ff016105140100030e00000524010005030202010302020503
-010005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005340100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005130100050501020514
-010005000063010000630100006301000063010000630100006301000002010005130100
-0500030e0500000005230100050302020103020205030100000005120102050401000518
-01000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100050000000513010005030100051801000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000514010005030100051901000063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010005000000051301000503010305150100050000630100
-006301000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000000051401000503010005020100051501000063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010005000000051301000503010005020100051401000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000514010005030100050201000515
-01000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100050000000511010405020102051501000500
-00630100006301000063010000630100006301000063010000020100051301000500030e
-050000000523010005030202010302020503010000000534010000630100006301000063
-01000063010000630100006301000002010005140100030e000005240100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005340100006301000063010000630100006301000063010000630100000201000514
-0100030e0000052401000503020201030202050301000500000005320100050000630100
-006301000063010000630100006301000063010000020100051301000500030e05000000
-052301000503020201030202050301000000053401000063010000630100006301000063
-010000630100006301000002010005140100030e00000524010005030202010302020503
-010005000000053201000500006301000063010000630100006301000063010000630100
-00020100051301000500030e050000000523010005030202010302020503010000000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000063
-010000630100006301000063010000630100006301000002010005140100030e00000524
-010005030202010302020503010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-0100050001000500010005000100050001ff01ff0161051301000500030e050000000523
-010005030202010302020503010005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050001000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050000000532010005000063010000630100
-006301000063010000630100006301000002010005140100030e00000524010005030202
-010302020503010000000534010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-000005130100050301040514010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000512
-010205030100050201000515010000630100006301000063010000630100006301000063
-010000020100051301000500030e05000000052301000503020201030202050301000500
-000005130100050601000515010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000514
-010005060100051601000063010000630100006301000063010000630100006301000002
-0100051301000500030e0500000005230100050302020103020205030100050000000513
-010005060100051501000500006301000063010000630100006301000063010000630100
-0002010005140100030e0000052401000503020201030202050301000000051401000506
-010005160100006301000063010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000051301000505
-010005160100050000630100006301000063010000630100006301000063010000020100
-05140100030e000005240100050302020103020205030100000005140100050501000517
-010000630100006301000063010000630100006301000063010000020100051301000500
-030e05000000052301000503020201030202050301000500000005110104050301000516
-010005000063010000630100006301000063010000630100006301000002010005140100
-030e00000524010005030202010302020503010000000534010000630100006301000063
-010000630100006301000063010000020100051301000500030e05000000052301000503
-020201030202050301000500000005320100050000630100006301000063010000630100
-00630100006301000002010005140100030e000005240100050302020103020205030100
-000005340100006301000063010000630100006301000063010000630100000201000513
-01000500030e050000000523010005030202010302020503010005000000053201000500
-0063010000630100006301000063010000630100006301000002010005140100030e0000
-052401000503020201030202050301000000053401000063010000630100006301000063
-0100006301000063010000020100051301000500030e0500000005230100050302020103
-020205030100050000000532010005000063010000630100006301000063010000630100
-006301000002010005140100030e00000524010005030202010302020503010000000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000063
-0100006301000063010000630100006301000063010000020100051301000500030e0500
-000005230100050302020103020205030100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001ff01ff016105140100030e00000524
-010005030202010302020503010005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-01000063010000630100006301000063010000630100006301000002010005140100030e
-000005240100050302020103020205030100050000000532010005000063010000630100
-0063010000630100006301000063010000020100051301000500030e0500000005230100
-050302020103020205030100000005340100006301000063010000630100006301000063
-0100006301000002010005140100030e0000052401000503020201030202050301000500
-000005130100050401020515010005000063010000630100006301000063010000630100
-0063010000020100051301000500030e0500000005230100050302020103020205030100
-000005120102050301000502010005150100006301000063010000630100006301000063
-010000630100000201000514010005000000050000000500000005000000050000000500
-00000500000005000000052401000503020201030202050301ff01ff0199051301000500
-000005000000050000000500000005000000050000000500000005000000050000000523
-010005030202010302020503010005ff05ff05e3010005030202010302020503010005ff
-05ff05e3010005030202010302020503010005ff05ff05e3010005030202010302020503
-010005ff05ff05e3010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005ff05ff05e301000503
-0202010302020503010005ff05ff05e301000503020201030202050301000549010005ff
-05ff059801000503020201030202050301000548010105ff05ff05980100050302020103
-020205030100054701000500010005ff05ff059801000503020201030202050301000549
-010005ff05ff059801000503020201030202050301000549010005ff05ff059801000503
-020201030202050301000549010005ff05ff059801000503020201030202050301000549
-010005ff05ff059801000503020201030202050301000549010005ff05ff059801000503
-020201030202050301000547010405ff05ff0596010005030202010302020503010005ff
-05ff05e3010005030202010302020503010005ff05ff05e3010005030202010302020503
-010005ff05ff05e3010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005380100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100054b01000503020201030202050301000537
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000000054a01000503
-020201030202050301000538010005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000003ff03ff033e0000054b010005030202010302020503010005370100050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050003ff03ff033e05000000054a01000503
-020201030202050301000538010005000000050c0000050c010003ff03ff033e0000054b
-01000503020201030202050301000537010005000000050c0100050c0100050003ff03ff
-033e05000000054a01000503020201030202050301000538010005000000050c0000050c
-010003ff03ff033e0000054b01000503020201030202050301000537010005000000050c
-0100050c0100050003ff03ff033e05000000054a01000503020201030202050301000538
-010005000000050c0000050c010003ff03ff033e0000054b010005030202010302020503
-01000537010005000000050c0100050c0100050003ff03ff033e05000000054a01000503
-020201030202050301000538010005000000050c0000050c010003ff03ff033e0000054b
-01000503020201030202050301000537010005000000050c0100050c0100050003ff03ff
-033e05000000054a01000503020201030202050301000538010005000000050c0000050c
-010003ff03ff033e0000054b01000503020201030202050301000537010005000000050c
-0100050c0100050003ff03ff033e05000000054a01000503020201030202050301000538
-010005000000050c0000050c010003ff03ff033e0000054b010005030202010302020503
-010005370100050000000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050003ff03ff
-033e05000000054a01000503020201030202050301000538010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010003ff03ff033e0000054b010005030202010302020503
-010005370100050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-00000500000005000000050000000500000005000000050000000500000005000000054a
-010005030202010302020503010005380000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000054b010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005ff05ff05e301000503
-0202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e3
-010005030202010302020503010005ff05ff05e3010005030202010302020503010005ff
-05ff05e3010005030202010302020503010005ff05ff05e3010005030202010302020503
-010005ff05ff05e3010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005ff05ff05e301000503
-0202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e3
-010005030202010302020503010005ff05ff05e3010005030202010302020503010005ff
-05ff05e3010005030202010302020503010005ff05ff05e3010005030202010302020503
-010005ff05ff05e3010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005ff05ff05e301000503
-0202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e3
-010005030202010302020503010005ff05ff05e3010005030202010302020503010005ff
-05ff05e3010005030202010302020503010005ff05ff05e3010005030202010302020503
-010005ff05ff05e3010005030202010302020503010005ff05ff05e30100050302020103
-02020503010005ff05ff05e3010005030202010302020503010005ff05ff05e301000503
-0202010302020503010005ff05ff05e3010005030202010302020503010005ff05ff05e3
-010005030202010302020503010005ff05ff05e3010005030202010100040503010005ff
-05ff05e301000503000502020400050301ff01ff01e50503000002020400000002020400
-05ff05ff05ed00000202040000000202040005ff05ff05ed000002020400000002020400
-05ff05ff05ed00000202040000000202040005ff05ff05ed000002020400000002020400
-000502ff02ff02e100060202040000000208040002ff02ff02e100000208040000000208
-040002ff02ff02e100000208040000000208040001ff01ff01e100000208040000000409
-01ff01ff01e100000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 380 315
-%%EOF
diff --git a/lib/tv/doc/src/tv_table_loaded.gif b/lib/tv/doc/src/tv_table_loaded.gif
deleted file mode 100644
index 1786426f4d..0000000000
--- a/lib/tv/doc/src/tv_table_loaded.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_table_loaded.ps b/lib/tv/doc/src/tv_table_loaded.ps
deleted file mode 100644
index 3f0cf9d707..0000000000
--- a/lib/tv/doc/src/tv_table_loaded.ps
+++ /dev/null
@@ -1,1430 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_table_loaded.eps)
-%%CreationDate: (Mon Mar 19 17:15:33 2001)
-%%BoundingBox: 0 0 532 441
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 532 441
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-532.000000 441.000000
-12
-760 630
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-ff0000
-d9d9d9
-b22222
-828282
-ff9155
-c3c3c3
-7f7f7f
-990000
-000000
-000000
-000000
-000a01ff01ff01e1000b0208040001ff01ff01e100000208040000000208040002ff02ff
-02e1000002080400000002080400020000ff00ff00de0400020000000208040000000202
-04060200000004ff04ff04de020000000405020204000000020204000209000d02ff02ff
-02d500000202040000000202040002080000020d040002a501010206010102150101021e
-0101022901010206010102430101022a010102260101023201010233010102ae00000202
-040000000202040002080000020d04000277010502000107020101030206010702090101
-02060101021501010219010002030101021c0100020b010102060101022e010202020100
-020d0101022a0101020c0104021401010232010102160100021b010102ae000002020400
-00000202040002080000020d04000277010102070101020301010201010102080101020c
-010102060101021501010218010102210101020b010102060101022e010202020100020d
-01010238010102020101024801010215010102cc00000202040000000202040002080000
-0202040602030400027701010207010102030101020c0101020401030203010102000101
-020301010202010302020101020901010202010302030103020201030201010402010101
-020201030203010102000101020a01040201010302030101020001010203010102020103
-022701000200010102010100020201030203010402020103020201010209010102000101
-020101010203010302030101020201010200010102020101020101030202010402020101
-020101010202010102020101020001010203010102000101020301030203010402020104
-020501040202010102010101020501030201010402000101020101010204010302020101
-020001010201010102020103020201040202010402020103020301010200010102060104
-020201030274000002020400000004030208000002020400030400000203040002770101
-0207010102030102020b0101020301010201010102020102020001010202010102010101
-020101010201010102090101020101010201010102010101020101010200010102010101
-020101010203010102010101020101010202010202000101020a01010202010102010101
-020201020200010102020101020101010201010102260100020001010201010002010101
-020101010201010102010101020101010201010102010101020901020200010202000101
-020101010201010102020101020201020200010102010101020001010200010102010101
-020101010202010102010101020201010202010202000101020201020200010102010101
-020101010201010102050101020801010201010102020101020101010204010102010101
-020101010202010102010101020301010201010102010101020001010201010102010101
-020101010200010102050101020501010201010102020102020001010204010102050101
-020101010273000004030101020b00000203040003020000020404000277010402040101
-0204010302090101020701010202010102010101020201010201010102010101020d0101
-020101010201010102010101020801010201010102030101020101010201010102020101
-02010101020a010102060101020201010201010102020101020101010201010102260100
-0200010202000100020101010201010102010101020101010201010102010101020d0101
-020101010201010102050101020201010202010102010101020101010200010102000101
-020101010201010102020101020101010202010102020101020101010202010102010101
-020101010201010102010102020401020207010102010101020201010201010102040101
-020101010201010102030101020001000204010102010101020101020203010102010101
-020401020204010202040101020101010202010102010101020401020204010102010101
-02760103020b000002030400030200000204040002770101020701010206010202080101
-0204010402020101020101010202010102010105020d0101020101010201010102010101
-02050104020101010203010102010101020101010202010102010101020a010102030104
-020201010201010102020101020101050226010002010101020001000201010102010101
-020101010201010102010105020d01010201010102010101020201040202010102020101
-020101010201010102000101020001010201010102010101020201010201010102020101
-020201010201010102020101020101010201010502020103020301030205010102010101
-020201010201010102040105020101010204010102050105020101010204010102010101
-020501030203010302020101020101010202010102010101020501030202010502760103
-020b00000204040003000000020504000277010102070101020701010208010102030101
-020101010202010102010101020201010201010102110101020101010201010102010101
-0204010102010101020101010203010102010101020101010202010102010101020a0101
-020201010201010102020101020101010202010102010101022a01000202010202010101
-020101010201010102010101020101010211010102010101020101010201010102010101
-020201010202010102010101020101010201010102000101020001010200010202020101
-020101010202010102020101020101010202010102010101020101010208010202040102
-020401010201010102020101020101010204010102050101020301000200010102040101
-020501010204010102010101020701020204010202010101020101010202010102010101
-0207010202010101027a0103020b00000204040003000000020504000277010102070101
-020301010201010102080101020301010201010102020101020101010202010102010101
-020201000201010102090101020101010201010102010101020201000200010102010101
-020101010203010102010101020101010202010102010101020a01010202010102010101
-020201010201010102020101020101010202010002260100020201020201010102010101
-020101010200010202010101020201000201010102090101020101010201010102010101
-020101010202010102020101020101010202010102070101020001010202010102000102
-020201010202010102010101020201010201010102010101020201000205010102050101
-020101010200010102000102020201010200010202010101020001010202010002010101
-020201010201010102000101020001010202010002010101020401010201010102020100
-020401010205010102010101020101010202010102010101020101010204010102010101
-0202010002760103020b0000020500000206040002770105020301010204010302090101
-020401020200010102010104020301010202010302020101020901010202010302030103
-02020102020001010201010202010101020201030203010102010101020b010202010102
-020001010201010402030101020201030227010002030101020201030203010102000101
-020201030202010102090101020101010201010102020102020001010201010102020101
-020101010203010502050101020301010200010102020101020201010201010102020101
-020101010202010302020104020201040202010102010101020001010203010102000101
-020101010201010302030102020001010201010102000101020101030202010102040101
-020201030201010402020104020301030203010102010101020101010200010402030103
-02770103020b0000020d040002fc010602a201010201010102ff022a0103020b0000020d
-040002ff02a7010302ff022b0103020b0000020d040002ff02ff02d70103020c040d02ff
-02ff02d8010302ff02ff02f3010302ff02ff02f30103020200ff00ff00ec040002020103
-0202000004ff04ff04ec0202010302ff02ff02f30103020200ff00ff00ed020201030202
-00ff00ff00ec0800020201030202000106ff06ff06e90801020201030202000106ff06ff
-06e90801020201030202000106ff06ff06e90801020201030202000106ff06ff06e90801
-020201030202000106ff06ff06e908010202010302020001060b07040604070006030702
-061f07040610070206200702060b070006060700062d0700060207000604070006ff06fa
-07000602070006090702061308010202010302020001060b0700060f0700062107000614
-0700061f070006020700060a0700063507000602070006ff06ff0600070006020700060b
-0700061308010202010302020001060b0700060607020605070006030702061a07000604
-070206030702060507000603070206180700060207000601070006000701060207040602
-070206030702060207000600070106030702061807000602070006020702060307020602
-07000602070006ff06eb07000602070006020702060507000602070006000701060c0801
-0202010302020001060b0700060807000605070006020700060207000619070006030700
-060207000601070006020700060407000602070006020700061707000602070006010701
-060107000603070006060700060207000602070006010701060107000601070006020700
-0618070006000700060507000602070006020700060107000602070006ff06eb07000602
-07000601070006020700060407000602070106010700060b08010202010302020001060b
-070306050700060507000602070006020700061907000603070006020700060107000602
-07000604070006020700061b070006020700060107000602070006030700060607000602
-070006020700060107000602070006010700061c07000600070006050700060207000602
-070006010700060007000600070006ff06eb070406010700060207000604070006020700
-06020700060b08010202010302020001060b070006080700060507000602070406190700
-060307000602070006010700060207000604070006030702061807000602070006010700
-060207000603070006060700060207000602070006010700060207000602070206190700
-06000700060507000602070406010700060007000600070006ff06eb0700060207000601
-0704060407000602070006020700060b08010202010302020001060b0700060807000605
-070006020700061d07000603070006020700060107000602070006040700060607000617
-070006020700060107000602070006030700060607000602070006020700060107000602
-07000605070006190700060607000602070006050700060007000600070006ff06eb0700
-0602070006010700060807000602070006020700060b08010202010302020001060b0700
-060807000605070006020700060207000619070006030700060207000601070006020700
-060407000602070006020700061707000602070006010701060107000603070006060700
-060207000602070006010700060207000601070006020700061907000606070006020700
-0602070006010700060007000600070006ff06eb07000602070006010700060207000604
-07000602070106010700060b08010202010302020001060b070006080700060507000603
-0702061a0700060407020603070206050700060307020619070206020700060007010605
-07010604070006030702060207000602070006020702061a070006060700060307020603
-07000600070006ff06ec07000602070006020702060507000602070006000701060c0801
-0202010302020001067d070006ff06ff06590700060f08010202010302020001060a0706
-062a07060631070606000700063d070606ff06fe0706060e0700060f0801020201030202
-0001060a0706062a07060631070606000700063d070606ff06fe0706060e0700060f0801
-020201030202000106ff06ff06e90801020201030202000106ff06ff06e9080102020103
-0202000106ff06ff06e90801020201030202000108ff08ff08eb020201030202000008ff
-08ff08ec02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202010302020603
-0016061600160616004406160016061600160616001606ff06be02020103020206030015
-080006160015080006160015080000150800001508000616001508000616001508000616
-0015080006ff06be02020103020206030001061208010616000106120801061600010612
-080100010612080100010612080106160001061208010616000106120801061600010612
-080106ff06be020201030202060300010612080106160001061208010616000106120801
-000106120801000106120801061600010612080106160001061208010616000106120801
-06ff06be0202010302020603000106120801061600010603070206030702060408010616
-000106120801000106120801000106120801061600010612080106160001061208010616
-00010612080106ff06be0202010302020603000106080702060608010616000106030702
-060307020604080106160001061208010001061208010001061208010616000106050704
-0607080106160001060707010608080106160001060707030606080106ff06be02020103
-020206030001060b0701060408010616000106020704060107040603080106160001060e
-0700060208010001060e070006020801000106020700060e080106160001060307080605
-080106160001060607030607080106160001060507070604080106ff06be020201030202
-06030001060d070006000700060108010616000106020700060107010601070006010701
-0603080106160001060e0700060208010001060e070006020801000106020700060e0801
-061600010602070a06040801061600010606070306070801061600010604070306010703
-0603080106ff06be02020103020206030001060207020608070106010801061600010601
-070d0602080106160001060b07000601070006020801000106020700060a070006020801
-00010602070006010700060b080106160001060207030602070306040801061600010607
-0701060808010616000106040702060307020603080106ff06be02020103020206030001
-060107080602070206010801061600010600070006000703060007020600070406010801
-06160001060b07000601070006020801000106020700060a070006020801000106020700
-06010700060b080106160001060107030604070306030801061600010612080106160001
-06040702060307020603080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106080700060107000601
-070006020801000106020700060407000604070006020801000106020700060107000601
-070006080801061600010601070206030707060108010616000106050704060708010616
-000106050701060207020604080106ff06be020201030202060300010601070906060801
-061600010600070006000703060007020600070406010801061600010608070006010700
-060107000602080100010602070006040700060407000602080100010602070006010700
-060107000608080106160001060107020604070506020801061600010606070306070801
-06160001060907020605080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106050700060107000601
-070006010700060208010001060207000604070006010700060107000602080100010602
-070006010700060107000601070006050801061600010601070206050703060308010616
-0001060707020607080106160001060807020606080106ff06be02020103020206030001
-0601070d0602080106160001060007000600070706000704060108010616000106050700
-060107000601070006010700060208010001060207000604070006010700060107000602
-080100010602070006010700060107000601070006050801061600010601070306050701
-0604080106160001060707020607080106160001060707020607080106ff06be02020103
-020206030001060107030607070006030801061600010600070006000704060107000600
-070406010801061600010602070006010700060107000601070006010700060208010001
-060207000601070006010700060107000601070006020801000106020700060107000601
-07000601070006010700060208010616000106020703060b080106160001060707020607
-080106160001060707020607080106ff06be020201030202060300010601070206070700
-060408010616000106000706060107060601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106020709
-06050801061600010607070206070801061600010612080106ff06be0202010302020603
-000106010701060707000605080106160001060007000600070206050700060007020601
-080106160001060207000601070006010700060107000601070006020801000106020700
-060107000601070006010700060107000602080100010602070006010700060107000601
-070006010700060208010616000106030707060608010616000106060704060608010616
-0001060707020607080106ff06be02020103020206030001060107090606080106160001
-060007000600070206050700060007020601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106050704
-0607080106160001060507060605080106160001060707020607080106ff06be02020103
-020206030001061208010616000106000704060507040601080106160001061208010001
-0612080100010612080106160001061208010616000106120801061600010612080106ff
-06be02020103020206030001061208010616000106120801061600010612080100010612
-080100010612080106160001061208010616000106120801061600010612080106ff06be
-020201030202060300010612080106160001061208010616000106120801000106120801
-00010612080106160001061208010616000106120801061600010612080106ff06be0202
-010302020603000108140616000108140616000108140001081400010814061600010814
-06160001081406160001081406ff06be0202010302020603000008150616000008150616
-00000815000008150000081506160000081506160000081506160000081506ff06be0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed020201030202060301ff01ff01e5
-06030202010302020603010000ff00ff00cf010000120100060302020103020206030100
-00ff00ff00cf010000110800010006030202010302020603010000ff00ff00cf01000001
-060e0801010006030202010302020603010000ff00ff00cf01000001060e080101000603
-0202010302020603010000ff00ff00cf01000001060e0801010006030202010302020603
-010000ff00ff00cf01000001060e0801010006030202010302020603010000ff00ff00cf
-01000001060e0801010006030202010302020603010000ff00ff00cf01000001060e0801
-010006030202010302020603010000ff00ff00cf01000001060e08010100060302020103
-02020603010000ff00ff00cf010000010601010a06010801010006030202010302020603
-010000ff00ff00cf010000010602010806020801010006030202010302020603010000ff
-00ff00cf010000010603010606030801010006030202010302020603010000ff00ff00cf
-010000010604010406040801010006030202010302020603010000ff00ff00cf01000001
-0605010206050801010006030202010302020603010000ff00ff00cf0100000106060100
-06060801010006030202010302020603010000ff00ff00cf01000001060e080101000603
-0202010302020603010000ff00ff00cf01000001060e0801010006030202010302020603
-010000ff00ff00cf01000001060e0801010006030202010302020603010000ff00ff00cf
-01000001060e0801010006030202010302020603010000ff00ff00cf01000001060e0801
-010006030202010302020603010000ff00ff00cf01000001060e08010100060302020103
-02020603010000ff00ff00cf01000001060e0801010006030202010302020603010000ff
-00ff00cf010000010810010006030202010302020603010000ff00ff00cf010000000811
-01000603020201030202060301ff01ff01e5060302020103020206ff06ff06ed02020103
-020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103
-020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103
-020206ff06ff06ed020201030202060301ff01ff01e506030202010302020603010006ff
-06ff06970100064a01000603020201030202060301000663010506ff06ff062d0100064a
-01000603020201030202060301000662010706ff06ff062c0100064a0100060302020103
-020206030100066101020603010206ff06ff062b0100064a010006030202010302020603
-0100066101010605010106ff06ff062b0100064a01000603020201030202060301000661
-01020603010206ff06ff062b0100064a01000603020201030202060301000662010706ff
-06ff062c0100064a01000603020201030202060301000663010506ff06ff062d0100064a
-01000603020201030202060301000665010106ff06ff062f0100064a0100060302020103
-0202060301000665010106ff06ff062f0100064a01000603020201030202060301000665
-010106ff06ff062f0100064a01000603020201030202060301000665010106ff06ff062f
-0100064a01000603020201030202060301000665010106ff06ff062f0100064a01000603
-020201030202060301000665010106ff06ff062f0100064a010006030202010302020603
-0100066101010600010206ff06ff062f0100064a01000603020201030202060301000661
-01010600010206ff06ff062f0100064a01000603020201030202060301000661010506ff
-06ff062f0100064a01000603020201030202060301000661010506ff06ff062f0100064a
-0100060302020103020206030100066101020600010106ff06ff062f0100064a01000603
-0202010302020603010006ff06ff06970100064a01000603020201030202060301ff01ff
-0199064a0100060302020103020206030100063500610b04005f0b04005f0b04005f0b04
-005f0b04005f0b0400010100060c0812062a010006030202010302020603010006350060
-08000b030100005e08000b030100005e08000b030100005e08000b030100005e08000b03
-0100005e08000b03010000010100060c08110000062a0100060302020103020206030100
-06350001065d08010b0101020001065b08010b0101020001065b08010b0101020001065b
-08010b0101020001065b08010b0101020001065b08010b01010200010100060c08010010
-062a010006030202010302020603010006350001062c0100062f08010b0101020001062a
-0102062d08010b0101020001062a0102062d08010b0101020001062c0100062d08010b01
-0102000106290104062c08010b0101020001062b0102062c08010b01010200010100060c
-0801000d08000001062a010006030202010302020603010006350001062a0102062f0801
-0b01010200010629010006020100062c08010b01010200010629010006020100062c0801
-0b0101020001062b0101062d08010b010102000106290100063008010b0101020001062a
-0100062f08010b01010200010100060c08010001060a08010001062a0100060302020103
-02020603010006350001062c0100062f08010b01010200010629010006020100062c0801
-0b0101020001062d0100062c08010b0101020001062a010006000100062d08010b010102
-000106290100063008010b010102000106290100063008010b01010200010100060c0801
-0001060a08010001062a010006030202010302020603010006350001062c0100062f0801
-0b01010200010629010006020100062c08010b0101020001062d0100062c08010b010102
-0001062a010006000100062d08010b010102000106290100063008010b01010200010629
-0100063008010b01010200010100060c08010001060a08010001062a0100060302020103
-02020603010006350001062c0100062f08010b0101020001062c0100062d08010b010102
-0001062b0101062d08010b01010200010629010006010100062d08010b01010200010629
-0103062d08010b010102000106290103062d08010b01010200010100060c08010001060a
-08010001062a010006030202010302020603010006350001062c0100062f08010b010102
-0001062b0100062e08010b0101020001062d0100062c08010b0101020001062801000602
-0100062d08010b0101020001062d0100062c08010b01010200010629010006020100062c
-08010b01010200010100060c08010001060a08010001062a010006030202010302020603
-010006350001062c0100062f08010b0101020001062a0100062f08010b0101020001062d
-0100062c08010b010102000106280105062c08010b0101020001062d0100062c08010b01
-010200010629010006020100062c08010b01010200010100060c08010001060a08010001
-062a010006030202010302020603010006350001062c0100062f08010b01010200010629
-010006020100062c08010b01010200010629010006020100062c08010b0101020001062c
-0100062d08010b01010200010628010006030100062c08010b0101020001062901000602
-0100062c08010b01010200010100060c08010001060a08010001062a0100060302020103
-02020603010006350001062a0104062d08010b010102000106290104062c08010b010102
-0001062a0102062d08010b0101020001062b0102062c08010b010102000106290103062d
-08010b0101020001062a0102062d08010b01010200010100060c08010001060a08010001
-062a010006030202010302020603010006350001065d08010b0101020001065b08010b01
-01020001065b08010b0101020001065b08010b0101020001065b08010b0101020001065b
-08010b01010200010100060c08010001060a08010001062a010006030202010302020603
-010006350001065d08010b0101020001065b08010b0101020001065b08010b0101020001
-065b08010b0101020001065b08010b0101020001065b08010b01010200010100060c0801
-0001060a08010001062a010006030202010302020603010006350001065d08010b010102
-0001065b08010b0101020001065b08010b0101020001065b08010b0101020001065b0801
-0b0101020001065b08010b0101020001010006070100060308010001060a08010001062a
-010006030202010302020603010006350001065d08010b0101020001065b08010b010102
-0001065b08010b0101020001065b08010b0101020001065b08010b0101020001065b0801
-0b0101020001010006060101060308010001060a08010001062a01000603020201030202
-0603010006350001065d08010b0101020001065b08010b0101020001065b08010b010102
-0001065b08010b0101020001065b08010b0101020001065b08010b010102000101000605
-010006000100060308010001080c0001062a010006030202010302020603010006350001
-065d08010b0101020001065b08010b0101020001065b08010b0101020001065b08010b01
-01020001065b08010b0101020001065b08010b010102000101000607010006030801000d
-08000001062a010006030202010302020603010006350001085f0b0101020001085d0b01
-01020001085d0b0101020001085d0b0101020001085d0b0101020001085d0b0101020001
-010006070100060308010001060a08010001062a01000603020201030202060301000635
-000008600b0001030000085e0b0001030000085e0b0001030000085e0b0001030000085e
-0b0001030000085e0b00010300000800010006070100060308010001060a08010001062a
-010006030202010302020603010009360063010000630100006301000063010000630100
-006301000002010006070100060308010001060a08010001062a01000603020201030202
-0603010009350c0000630100006301000063010000630100006301000063010000020100
-06070100060308010001060a08010001062a010006030202010302020603010009010532
-0c0100630100006301000063010000630100006301000063010000020100060501040601
-08010001060a08010001062a0100060302020103020206030100090105320c0100630100
-006301000063010000630100006301000063010000020100060c08010001060a08010001
-062a010006030202010302020603010009010517010005190c0100630100006301000063
-010000630100006301000063010000020100060c08010001060a08010001062a01000603
-0202010302020603010009010515010205190c01001601020003010200420100000e0100
-00230100000b010200030102001801000063010000630100006301000063010000020100
-060c08010001060a08010001062a01000603020201030202060301000901051701000519
-0c01001801000005010000420100000e010000230100000d010000050100001801000063
-010000630100006301000063010000020100060c08010001060a08010001062a01000603
-0202010302020603010009010517010005190c01000f0102000501000005010000030102
-003b0100000e010000000101000301020002010000000101000201000000010100030102
-000201040001010000020100000401000005010000180100006301000063010000630100
-0063010000020100060c08010001060a08010001062a0100060302020103020206030100
-09010517010005190c01000e01000002010000040100000501000002010000020100003a
-0100000e0101000101000001010000020100000101010001010000010101000101000001
-010000020100000301000003010000020100000401000005010000180100006301000063
-0100006301000063010000020100060c08010001060a08010001062a0100060302020103
-02020603010009010517010005190c01000e010000020100000401000005010000020100
-00020100003a0100000e0100000201000001010000020100000101000005010000020100
-000101000007010000030100000201000004010000050100001801000063010000630100
-006301000063010000020100060c08010001060a08010001062a01000603020201030202
-0603010009010517010005190c01000e010000020100000401000005010000020104003a
-0100000e0100000201000001010000020100000101000005010000020100000201020004
-010000030100000201000004010000050100001801000063010000630100006301000063
-010000020100060c08010001080c0001062a010006030202010302020603010009010517
-010005190c01000e010000020100000401000005010000020100003e0100000e01000002
-010000010100000201000001010000050100000201000005010000030100000301000002
-01000004010000050100001801000063010000630100006301000063010000020100060c
-08010000080d0001062a010006030202010302020603010009010515010405170c01000e
-01000002010000040100000501000002010000020100003a0100000e0100000201000001
-010000020100000101000005010000020100000101000002010000030100000301000001
-01010004010000050100001801000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c01000f010200050100
-0005010000030102003b0100000e01000002010000020102000201000005010000020100
-000201020005010100020101000001000004010000050100001801000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-090105320c0100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-0103020206030100090105320c0100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a0100060302020103020206030100090105320c010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010009010c3400630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a010006030202010302020603010009000c3501ff01ff0161060c0801
-0a0e0001062a010006030202010302020603010009360063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010009350c0000630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-0103020206030100090105320c0100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105160102
-05180c0100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a01000603020201030202060301000901051501000502010005170c010026
-01000003010200030102002d010000160102004901000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105150100
-0502010005170c01002d010000050100002d010000180100004901000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-0901051501000502010005170c01000f0101000001000001010000020100000101000000
-01010003010200050100000501000003010200260100000f010200050100000201000002
-010000020102000301020003010200020100000001010026010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-0518010005180c01000e0100000101010001010000020100000101010001010000040100
-0005010000050100000201000002010000250100000e0100000201000004010000020100
-000201000001010000020100000101000002010000010100000201000001010100010100
-002501000063010000630100006301000063010000020100060c08010a0e0001062a0100
-06030202010302020603010009010517010005190c01000e010000020100000101000002
-010000010100000201000004010000050100000501000006010000250100000e01000008
-010000020100000201000001010000050100000501000002010000010100000201000025
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-02020103020206030100090105160100051a0c01000e0100000201000001010000020100
-00010100000201000004010000050100000501000003010300250100000f010200050100
-000201000002010000020102000301020002010400010100000201000025010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000901051501000502010005170c01000e01000002010000010100000201000001
-010000020100000401000005010000050100000201000002010000250100001201000004
-010000020100000201000005010000050100000101000005010000020100002501000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-02020603010009010515010405170c01000e010000010101000101000001010100010100
-00020100000401000005010000050100000201000002010000250100000e010000020100
-000401000002010000010101000101000002010000010100000201000001010000020100
-0001010000020100002501000063010000630100006301000063010000020100060c0801
-0a0e0001062a0100060302020103020206030100090105320c01000f0101000001000002
-01010000010000010100000201000004010000050100000501000003010300250100000f
-010200050100000301010000010000020102000301020003010200020100000201000025
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-02020103020206030100090105320c0100120100004f0100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-090105320c01000e010000020100004f0100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-000f010200500100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a0100060302020103020206030100090105320c0100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100090105320c01006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a010006030202010302020603010009010c3400630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-06030202010302020603010009000c3501ff01ff0161060c08010a0e0001062a01000603
-020201030202060301000936006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a010006030202010302020603010009350c0000630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105320c01006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-05320c0100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010009010516010205180c01006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-020201030202060301000901051501000502010005170c0100630100000e010000530100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010009010519010005170c0100630100000e010000530100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010009010519010005170c01000f01020002010000000101000201000000010100030102
-003b0100000e010000000101000201000000010100030102000201010000010000020101
-0000010000030102002d01000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010009010517010105180c01000e01000002
-0100000101010001010000010101000101000001010000020100003a0100000e01010001
-010000010101000101000001010000020100000101000000010000000100000101000000
-0100000001000001010000020100002c0100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010519010005170c01
-001201000001010000020100000101000002010000050100003a0100000e010000020100
-000101000005010000020100000101000000010000000100000101000000010000000100
-00050100002c01000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010519010005170c01000f0103000101000002
-0100000101000002010000020103003a0100000e01000002010000010100000501000002
-010000010100000001000000010000010100000001000000010000020103002c01000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-0202060301000901051501000502010005170c01000e0100000201000001010000020100
-00010100000201000001010000020100003a0100000e0100000201000001010000050100
-000201000001010000000100000001000001010000000100000001000001010000020100
-002c01000063010000630100006301000063010000020100060c08010a0e0001062a0100
-06030202010302020603010009010516010205180c01000e010000020100000101000002
-010000010100000201000001010000020100003a0100000e010100010100000101000005
-010000020100000101000000010000000100000101000000010000000100000101000002
-0100002c01000063010000630100006301000063010000020100060c08010a0e0001062a
-0100060302020103020206030100090105320c01000f0103000101000002010000010100
-0002010000020103003a0100000e01000000010100020100000601020002010000000100
-0000010000010100000001000000010000020103002c0100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010532
-0c0100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105320c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105320c010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a0100060302020103020206030100090105320c0100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105320c01006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-0c3400630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a010006030202010302020603010009000c3501ff01ff0161060c08010a0e0001
-062a01000603020201030202060301000936006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000935
-0c0000630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105320c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105320c010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010518010005180c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010517010105180c0100170100000601000042
-010000150100001c0100000b010200030102001801000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105160100
-0500010005180c0100170100004a010000150100001c0100000d01000005010000180100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-01030202060301000901051601000500010005180c01000f010200020104000201020002
-0100000001010003010200340100000f0102000201000001010000030102000201000000
-010100030102000201040001010000020100000401000005010000180100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-01000901051501000501010005180c01000e010000020100000301000006010000020101
-00010100000101000002010000330100000e010000020100000101000000010000030100
-000201000001010100010100000101000002010000030100000301000002010000040100
-00050100001801000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000901051401000502010005180c01000e01000007
-01000006010000020100000201000005010000330100000e010000050101000801000001
-010000020100000101000007010000030100000201000004010000050100001801000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-02020603010009010514010505170c01000f010200040100000601000002010000020100
-0002010300330100000f0102000201010005010300010100000201000002010200040100
-000301000002010000040100000501000018010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000901051801000518
-0c0100120100000301000006010000020100000201000001010000020100003301000012
-010000010100000001000003010000020100000101000002010000050100000301000003
-010000020100000401000005010000180100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010517010205170c01
-000e01000002010000030100000601000002010000020100000101000002010000330100
-000e01000002010000010100000101000002010000020100000101000002010000010100
-000201000003010000030100000101010004010000050100001801000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-090105320c01000f0102000501010004010000020100000201000002010300330100000f
-010200020100000201000002010300010100000201000002010200050101000201010000
-01000004010000050100001801000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-0103020206030100090105320c0100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a0100060302020103020206030100090105320c010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-0100090105320c0100630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a010006030202010302020603010009010c340063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010009000c3501ff01ff0161060c08010a0e0001062a0100060302020103
-020206030100093600630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a010006030202010302020603010009350c000063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-0103020206030100090105320c0100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010515010405170c0100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100090105150100051b0c01000e0100000e010000140100002d010000320102
-002d01000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105150100051b0c01000e0100000e0100004301000034
-0100002d01000063010000630100006301000063010000020100060c08010a0e0001062a
-0100060302020103020206030100090105150100051b0c01000e01000001010000030102
-0002010400020102000201000000010100030102000201000000010100030102001f0100
-000e01000002010000010100000001010002010000000101000301020003010200050100
-00030102002601000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010515010305180c01000e0100000001000003
-010000020100000301000003010000020100000101010001010000040100000201010001
-01000001010000020100001e0100000e0100000201000001010100010100000101010001
-010000010100000201000001010000020100000401000002010000020100002501000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-02020603010009010519010005170c01000e010100080100000301000007010000010100
-00080100000201000002010000050100001e0100000e0100000201000001010000020100
-000101000002010000010100000901000004010000060100002501000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-09010519010005170c01000e010100050103000301000004010300010100000801000002
-01000002010000020103001e0100000e0100000201000001010000020100000101000002
-010000020102000301030004010000030103002501000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105140100
-0503010005170c01000e0100000001000003010000020100000301000003010000020100
-000101000008010000020100000201000001010000020100001e0100000e010000020100
-000101000002010000010100000201000005010000010100000201000004010000020100
-00020100002501000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010515010305180c01000e0100000101000002
-010000020100000301000003010000020100000101000008010000020100000201000001
-010000020100001e0100000e010000010101000101010001010000010101000101000001
-010000020100000101000002010000040100000201000002010000250100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-0100090105320c01000e0100000201000002010300040101000201030001010000080100
-000201000002010000020103001e0100000f010100000100000101000000010100020100
-000001010003010200030103000401000003010300250100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010532
-0c0100630100001501000005010000450100006301000063010000630100006301000002
-0100060c08010a0e0001062a0100060302020103020206030100090105320c0100630100
-0015010000050100004501000063010000630100006301000063010000020100060c0801
-0a0e0001062a0100060302020103020206030100090105320c0100630100001501000005
-0100004501000063010000630100006301000063010000020100060c08010a0e0001062a
-0100060302020103020206030100090105320c0100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-090105320c0100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a010006030202010302020603010009010c3400630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-02020603010009000c3501ff01ff0161060c08010a0e0001062a01000603020201030202
-06030100093600630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a010006030202010302020603010009350c0000630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100090105320c01006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a0100060302020103020206030100090105320c010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010009010517010205170c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105160100051a0c0100110100001a010100040100002d010000160102000c
-010000020100003701000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105150100051b0c01002c010000350100
-0018010000100100003701000063010000630100006301000063010000020100060c0801
-0a0e0001062a0100060302020103020206030100090105150100051b0c01000f01020003
-010200030102000301020004010000040102000201000000010100030102001f0100000f
-010200050100000201000002010000020102000201000001010000340100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010009010515010305180c01001101000002010000020100000101000002010000010100
-00020100000101040004010000020101000101000001010000020100001e0100000e0100
-000201000004010000020100000201000004010000020100000001000035010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000901051501000502010005170c01001101000002010000020100000101000005
-010000020100000301000006010000020100000201000001010000020100001e01000012
-010000040100000201000002010000040100000201010036010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-051501000502010005170c01001101000002010000020100000201020002010400030100
-00060100000201000002010000010104001e0100000f0103000401000003010000000100
-0005010000020101003601000063010000630100006301000063010000020100060c0801
-0a0e0001062a01000603020201030202060301000901051501000502010005170c010011
-010000020100000201000005010000010100000701000006010000020100000201000001
-010000220100000e01000002010000040100000301000000010000050100000201000000
-0100003501000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010009010516010205180c01001101000002010000020100
-000101000002010000010100000201000003010000060100000201000002010000010100
-00020100001e0100000e0100000201000004010000040100000601000002010000010100
-003401000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105320c01001101000003010200030102000301020004
-010000060100000201000002010000020102001f0100000f010300040100000401000006
-01000002010000020100003301000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c010011010000500100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105320c01000e01000001010000500100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100090105320c01000f01010051010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010532
-0c0100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105320c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-0603010009010c3400630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a010006030202010302020603010009000c3501ff01ff0161060c
-08010a0e0001062a01000603020201030202060301000936006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-0603010009350c0000630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100090105320c01006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-02020103020206030100090105320c010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010515
-010405170c0100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000901051501000502010005170c01
-0011010100130100000b01000002010000290100002c0100000b010200030102001f0100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010009010518010005180c010010010000150100000f010000290100002c
-0100000d010000050100001f01000063010000630100006301000063010000020100060c
-08010a0e0001062a010006030202010302020603010009010518010005180c0100100100
-000301000000010100030102000301010000010000010100000001010003010200020100
-0001010000260100000e0100000001010003010200020100000001010002010000000101
-0002010400010100000201000004010000050100001f0100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010518
-010005180c01000e01040001010100010100000101000002010000010100000101010001
-01010001010000040100000201000000010000270100000e010100010100000101000002
-010000010101000101000001010100010100000301000003010000020100000401000005
-0100001f01000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010009010518010005180c01001001000003010000050100
-00020100000101000002010000010100000801000002010100280100000e010000020100
-000101000002010000010100000501000007010000030100000201000004010000050100
-001f01000063010000630100006301000063010000020100060c08010a0e0001062a0100
-06030202010302020603010009010517010005190c010010010000030100000501040001
-01000002010000010100000801000002010100280100000e010000020100000101000002
-010000010100000501000007010000030100000201000004010000050100001f01000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-02020603010009010517010005190c010010010000030100000501000005010000020100
-0001010000080100000201000000010000270100000e0100000201000001010000020100
-00010100000501000007010000030100000201000004010000050100001f010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-0603010009010517010005190c0100100100000301000005010000020100000101000001
-01010001010000080100000201000001010000260100000e010000020100000101000002
-010000010100000501000007010000030100000101010004010000050100001f01000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100090105320c01001001000003010000060102000301010000010000010100
-00080100000201000002010000250100000e010000020100000201020002010000050100
-0008010100020101000001000004010000050100001f0100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010532
-0c0100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105320c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105320c010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a0100060302020103020206030100090105320c0100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100090105320c01006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-0c3400630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a010006030202010302020603010009000c3501ff01ff0161060c08010a0e0001
-062a01000603020201030202060301000936006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000935
-0c0000630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100090105320c01006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105320c010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010516010205180c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000901051501000502010005170c0100630100000e
-0100000f0100000b01000006010000100100001b01000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105150100
-0502010005170c0100630100000e0100001c010000180100001b01000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-0901051501000502010005170c01000e0100000001010003010200020100000001010042
-0100000e0100000101000002010000000101000301020003010200020104000201020002
-010000000101000301020002010000000101000301020002010000000101000301010000
-0100000201000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010009010516010205180c01000e01010001010000010100
-00020100000101010001010000410100000e010000000100000301010001010000040100
-000201000002010000030100000601000002010100010100000101000002010000010101
-000101000001010000020100000101010001010000010100000101010002010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000901051501000502010005170c01000e01000002010000010100000201000001
-010000450100000e01010004010000080100000201000007010000060100000201000002
-010000010100000201000001010000020100000101000002010000010100000501000002
-0100000201000063010000630100006301000063010000020100060c08010a0e0001062a
-01000603020201030202060301000901051501000502010005170c01000e010000020100
-000101040001010000450100000e01010004010000080100000301020004010000060100
-000201000002010000010104000101000002010000010104000101000005010000020100
-000201000063010000630100006301000063010000020100060c08010a0e0001062a0100
-0603020201030202060301000901051501000502010005170c01000e0100000201000001
-01000005010000450100000e010000000100000301000008010000060100000301000006
-010000020100000201000001010000050100000201000001010000050100000501000002
-0100000201000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010009010516010205180c01000e01010001010000010100
-000201000001010000450100000e01000001010000020100000801000002010000020100
-000301000006010000020100000201000001010000020100000101010001010000010100
-000201000001010000050100000101010002010000630100006301000063010000630100
-00020100060c08010a0e0001062a0100060302020103020206030100090105320c01000e
-010000000101000301020002010000450100000e01000002010000010100000801000003
-010200050101000401000002010000020100000201020002010000000101000301020002
-01000006010100000100000201000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c01000e010000530100
-005f0100000201000063010000630100006301000063010000020100060c08010a0e0001
-062a0100060302020103020206030100090105320c01000e010000530100005b01000002
-0100000201000063010000630100006301000063010000020100060c08010a0e0001062a
-0100060302020103020206030100090105320c01000e010000530100005c010200030100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-0103020206030100090105320c0100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009010c3400630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-09000c3501ff01ff0161060c08010a0e0001062a01000603020201030202060301000936
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a010006030202010302020603010009350c0000630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-090105320c0100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a0100060302020103020206030100090105320c010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010009010516010205180c01006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000901
-051501000502010005170c0100260100003b01000019010000170102002d010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000901051501000502010005170c01006301000019010000190100002d01000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-0202060301000901051501000502010005170c01000e0101000001000003010200020100
-00000101000301020003010200340100000f010200030101000001000002010200020100
-00000101000201000000010100050100000301020002010000000101001f010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000901051501000502010005170c01000e01000000010000000100000101000002
-0100000101010001010000040100000201000002010000330100000e0100000201000001
-010000010101000101000002010000010101000101000001010100010100000401000002
-0100000201000001010100010100001e0100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010516010305170c01
-000e010000000100000001000005010000010100000801000006010000330100000e0100
-000201000001010000020100000101000002010000010100000201000001010000020100
-00040100000601000001010000020100001e010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000901051901000517
-0c01000e010000000100000001000002010300010100000801000003010300330100000e
-010000020100000101000002010000010104000101000002010000010100000201000004
-0100000301030001010000020100001e0100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010009010518010005180c01
-000e01000000010000000100000101000002010000010100000801000002010000020100
-00330100000e010000020100000101000002010000010100000501000002010000010100
-000201000004010000020100000201000001010000020100001e01000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-09010515010205190c01000e010000000100000001000001010000020100000101000008
-0100000201000002010000330100000e0100000201000001010000010101000101000002
-010000010100000201000001010100010100000401000002010000020100000101000002
-0100001e01000063010000630100006301000063010000020100060c08010a0e0001062a
-0100060302020103020206030100090105320c01000e0100000001000000010000020103
-00010100000801000003010300330100000f010200030101000001000002010200020100
-00020100000101000000010100050100000301030001010000020100001e010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-06030100090105320c0100630100002a0100003701000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100090105320c01
-00630100002a0100003701000063010000630100006301000063010000020100060c0801
-0a0e0001062a0100060302020103020206030100090105320c0100630100002a01000037
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-02020103020206030100090105320c010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010009010532
-0c0100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a010006030202010302020603010009010c340063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010009000c3501ff01ff0161060c08010a0e0001062a0100060302020103020206030100
-009a0100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000035080000630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006040102061508010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010611010206030100060201000614080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-000106130100060301000602010006140801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-061301000603010006020100061408010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006030100060201000614080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106130100
-060301000602010006140801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001061301000603
-010006020100061408010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006030100
-060201000614080100630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100000106110104060201020615
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-0632080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000108340063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a01000603020201030202060301000000083501ff01ff0161
-060c08010a0e0001062a0100060302020103020206030100009a01000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000035080000630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006050100061608010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010611010206030102
-0616080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006050100061608010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010613010006050100061608010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006050100061608010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010613010006050100061608010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006050100061608010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006050100
-0616080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010611010406010104061408010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-01000001083400630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000000083501ff01ff0161060c0801
-0a0e0001062a0100060302020103020206030100009a0100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-0035080000630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001061301000604
-01020615080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001061101020603010006020100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006030100060201000614
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000106130100060301000602010006140801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001061301000606010006150801006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-020201030202060301000001061301000605010006160801006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000001061301000604010006170801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-061301000603010006020100061408010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010611
-010406010104061408010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-0632080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010834006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000000
-083501ff01ff0161060c08010a0e0001062a0100060302020103020206030100009a0100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100003508000063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000001061301000604010206150801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-061101020603010006020100061408010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006070100061408010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006070100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006050101061508010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010613010006070100061408010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006070100061408010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010613010006030100060201000614080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-000106110104060201020615080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000108340063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-01000000083501ff01ff0161060c08010a0e0001062a0100060302020103020206030100
-009a0100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000035080000630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006060100061508010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010611010206050101061508010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006040100060001000615080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106130100
-060401000600010006150801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001061301000603
-010006010100061508010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006020100
-060201000615080100630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100000106130100060201050614
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000106130100060601000615080100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106110104060301020614080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000108340063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-01000603020201030202060301000000083501ff01ff0161060c08010a0e0001062a0100
-060302020103020206030100009a01000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000035080000630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-0632080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006030104061408010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010611010206030100061808010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006030100061808010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010613010006030100061808010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006030103061508010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006070100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006070100061408010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010613010006020100060301000614080100630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106110104060101030615080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000108340063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-01000603020201030202060301000000083501ff01ff0161060c08010a0e0001062a0100
-060302020103020206030100009a01000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000035080000630100
-006301000063010000630100006301000063010000020100060c08010a0e0001062a0100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-0632080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006050102061408010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010611010206040100061708010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006030100061808010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010613010006030100061808010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006030103061508010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006030100
-060201000614080100630100006301000063010000630100006301000063010000020100
-060c08010a0e0001062a0100060302020103020206030100000106130100060301000602
-01000614080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001061301000603010006020100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010611010406020102061508010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-01000001083400630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000000083501ff01ff0161060c0801
-0a0e0001062a0100060302020103020206030100009a0100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-0035080000630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001061301000603
-01040614080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001061101020603010006020100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006060100061508010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010613010006060100061508010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006060100061508010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-010000010613010006060100061508010063010000630100006301000063010000630100
-0063010000020100060c08010a0e0001062a010006030202010302020603010000010613
-010006050100061608010063010000630100006301000063010000630100006301000002
-0100060c08010a0e0001062a010006030202010302020603010000010613010006050100
-0616080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010611010406030100061608010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100060c08010a0e0001062a0100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100060c08010a0e0001062a010006030202010302020603
-01000001083400630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000000083501ff01ff0161060c0801
-0a0e0001062a0100060302020103020206030100009a0100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-0035080000630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001061301000604
-01020615080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001061101020603010006020100
-0614080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010613010006030100060201000614
-080100630100006301000063010000630100006301000063010000020100060c08010a0e
-0001062a0100060302020103020206030100000106130100060301000602010006140801
-00630100006301000063010000630100006301000063010000020100060c08010a0e0001
-062a01000603020201030202060301000001061301000604010206150801006301000063
-01000063010000630100006301000063010000020100060c08010a0e0001062a01000603
-020201030202060301000001061301000603010006020100061408010063010000630100
-0063010000630100006301000063010000020100060c08010a0e0001062a010006030202
-010302020603010000010613010006030100060201000614080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106130100060301000602010006140801006301000063010000630100
-00630100006301000063010000020100060c08010a0e0001062a01000603020201030202
-060301000001061101040602010206150801006301000063010000630100006301000063
-01000063010000020100060c08010a0e0001062a01000603020201030202060301000001
-0632080100630100006301000063010000630100006301000063010000020100060c0801
-0a0e0001062a010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100060c08010a0e0001062a0100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100060c08010a0e0001062a01000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100060c08010a0e0001062a
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100060c08010a0e0001062a0100060302020103020206030100
-00010632080100630100006301000063010000630100006301000063010000020100060c
-08010a0e0001062a01000603020201030202060301000001083400630100006301000063
-010000630100006301000063010000020100060c08010010062a01000603020201030202
-060301ff01ff0199060c08000011062a010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-020201030202060301000649010006ff06ff069801000603020201030202060301000648
-010106ff06ff06980100060302020103020206030100064701000600010006ff06ff0698
-01000603020201030202060301000649010006ff06ff0698010006030202010302020603
-01000649010006ff06ff069801000603020201030202060301000649010006ff06ff0698
-01000603020201030202060301000649010006ff06ff0698010006030202010302020603
-01000649010006ff06ff069801000603020201030202060301000647010406ff06ff0696
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-020206030100063708ff08ff0860064a0100060302020103020206030100063708ff08ff
-085f0000064a010006030202010302020603010006370801001d0aff0aff0a3e0001064a
-010006030202010302020603010006370801001c08000aff0aff0a3e0001064a01000603
-02020103020206030100063708010001060b08000000060b08010aff0aff0a3e0001064a
-0100060302020103020206030100063708010001060b08000000060b08010aff0aff0a3e
-0001064a0100060302020103020206030100063708010001060b08000000060b08010aff
-0aff0a3e0001064a0100060302020103020206030100063708010001060b08000000060b
-08010aff0aff0a3e0001064a0100060302020103020206030100063708010001060b0800
-0000060b08010aff0aff0a3e0001064a0100060302020103020206030100063708010001
-060b08000000060b08010aff0aff0a3e0001064a01000603020201030202060301000637
-08010001060b08000000060b08010aff0aff0a3e0001064a010006030202010302020603
-0100063708010001060b08000000060b08010aff0aff0a3e0001064a0100060302020103
-020206030100063708010001060b08000000060b08010aff0aff0a3e0001064a01000603
-02020103020206030100063708010001060b08000000060b08010aff0aff0a3e0001064a
-0100060302020103020206030100063708010001060b08000000060b08010aff0aff0a3e
-0001064a0100060302020103020206030100063708010001080c0000080d0aff0aff0a3e
-0001064a0100060302020103020206030100063708010000081c0aff0aff0a3e0001064a
-01000603020201030202060301000637080100ff00ff005e064a01000603020201030202
-060301000637080000ff00ff005f064a010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020101
-00040603010006ff06ff06e301000603000502020400060301ff01ff01e5060300000202
-040000000202040006ff06ff06ed00000202040000000202040006ff06ff06ed00000202
-040000000202040006ff06ff06ed00000202040000000202040006ff06ff06ed00000202
-0400000002020400000502ff02ff02e100060202040000000208040002ff02ff02e10000
-0208040000000208040002ff02ff02e100000208040000000208040001ff01ff01e10000
-020804000000040901ff01ff01e100000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 532 441
-%%EOF
diff --git a/lib/tv/doc/src/tv_table_sorted.gif b/lib/tv/doc/src/tv_table_sorted.gif
deleted file mode 100644
index fd69e3cc58..0000000000
--- a/lib/tv/doc/src/tv_table_sorted.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/doc/src/tv_table_sorted.ps b/lib/tv/doc/src/tv_table_sorted.ps
deleted file mode 100644
index 681b2f4d19..0000000000
--- a/lib/tv/doc/src/tv_table_sorted.ps
+++ /dev/null
@@ -1,1502 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: (ImageMagick)
-%%Title: (/clearcase/otp/erts/lib/tv/doc/src/tv_table_sorted.eps)
-%%CreationDate: (Mon Mar 19 17:15:35 2001)
-%%BoundingBox: 0 0 532 441
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 1
-%%Pages: 0
-%%EndComments
-
-%%BeginDefaults
-%%PageOrientation: Portrait
-%%EndDefaults
-
-%%BeginProlog
-%
-% Display a color image. The image is displayed in color on
-% Postscript viewers or printers that support color, otherwise
-% it is displayed as grayscale.
-%
-/buffer 512 string def
-/byte 1 string def
-/color_packet 3 string def
-/pixels 768 string def
-
-/DirectClassPacket
-{
- %
- % Get a DirectClass packet.
- %
- % Parameters:
- % red.
- % green.
- % blue.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/DirectClassImage
-{
- %
- % Display a DirectClass image.
- %
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { DirectClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayDirectClassPacket } image
- } ifelse
-} bind def
-
-/GrayDirectClassPacket
-{
- %
- % Get a DirectClass packet; convert to grayscale.
- %
- % Parameters:
- % red
- % green
- % blue
- % length: number of pixels minus one of this color (optional).
- %
- currentfile color_packet readhexstring pop pop
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/GrayPseudoClassPacket
-{
- %
- % Get a PseudoClass packet; convert to grayscale.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- color_packet 0 get 0.299 mul
- color_packet 1 get 0.587 mul add
- color_packet 2 get 0.114 mul add
- cvi
- /gray_packet exch def
- compression 0 gt
- {
- /number_pixels 1 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add def
- } ifelse
- 0 1 number_pixels 1 sub
- {
- pixels exch gray_packet put
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassPacket
-{
- %
- % Get a PseudoClass packet.
- %
- % Parameters:
- % index: index into the colormap.
- % length: number of pixels minus one of this color (optional).
- %
- currentfile byte readhexstring pop 0 get
- /offset exch 3 mul def
- /color_packet colormap offset 3 getinterval def
- compression 0 gt
- {
- /number_pixels 3 def
- }
- {
- currentfile byte readhexstring pop 0 get
- /number_pixels exch 1 add 3 mul def
- } ifelse
- 0 3 number_pixels 1 sub
- {
- pixels exch color_packet putinterval
- } for
- pixels 0 number_pixels getinterval
-} bind def
-
-/PseudoClassImage
-{
- %
- % Display a PseudoClass image.
- %
- % Parameters:
- % class: 0-PseudoClass or 1-Grayscale.
- %
- currentfile buffer readline pop
- token pop /class exch def pop
- class 0 gt
- {
- currentfile buffer readline pop
- token pop /depth exch def pop
- /grays columns 8 add depth sub depth mul 8 idiv string def
- columns rows depth
- [
- columns 0 0
- rows neg 0 rows
- ]
- { currentfile grays readhexstring pop } image
- }
- {
- %
- % Parameters:
- % colors: number of colors in the colormap.
- % colormap: red, green, blue color packets.
- %
- currentfile buffer readline pop
- token pop /colors exch def pop
- /colors colors 3 mul def
- /colormap colors string def
- currentfile colormap readhexstring pop pop
- systemdict /colorimage known
- {
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { PseudoClassPacket } false 3 colorimage
- }
- {
- %
- % No colorimage operator; convert to grayscale.
- %
- columns rows 8
- [
- columns 0 0
- rows neg 0 rows
- ]
- { GrayPseudoClassPacket } image
- } ifelse
- } ifelse
-} bind def
-
-/DisplayImage
-{
- %
- % Display a DirectClass or PseudoClass image.
- %
- % Parameters:
- % x & y translation.
- % x & y scale.
- % label pointsize.
- % image label.
- % image columns & rows.
- % class: 0-DirectClass or 1-PseudoClass.
- % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
- % hex color packets.
- %
- gsave
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- x y translate
- currentfile buffer readline pop
- token pop /x exch def
- token pop /y exch def pop
- currentfile buffer readline pop
- token pop /pointsize exch def pop
- /Helvetica findfont pointsize scalefont setfont
- x y scale
- currentfile buffer readline pop
- token pop /columns exch def
- token pop /rows exch def pop
- currentfile buffer readline pop
- token pop /class exch def pop
- currentfile buffer readline pop
- token pop /compression exch def pop
- class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
- grestore
-} bind def
-%%EndProlog
-%%Page: 1 1
-%%PageBoundingBox: 0 0 532 441
-userdict begin
-%%BeginData:
-DisplayImage
-0 0
-532.000000 441.000000
-12
-760 630
-1
-0
-0
-16
-ffffff
-000000
-d8d8d8
-c2c2c2
-6b6b6b
-ff0000
-d9d9d9
-b22222
-828282
-00ff00
-ffda00
-ffff80
-c3c3c3
-7f7f7f
-998300
-000000
-000a01ff01ff01e1000b0208040001ff01ff01e100000208040000000208040002ff02ff
-02e1000002080400000002080400020000ff00ff00de0400020000000208040000000202
-04060200000004ff04ff04de020000000405020204000000020204000209000d02ff02ff
-02d500000202040000000202040002080000020d040002a501010206010102150101021e
-0101022901010206010102430101022a010102260101023201010233010102ae00000202
-040000000202040002080000020d04000277010502000107020101030206010702090101
-02060101021501010219010002030101021c0100020b010102060101022e010202020100
-020d0101022a0101020c0104021401010232010102160100021b010102ae000002020400
-00000202040002080000020d04000277010102070101020301010201010102080101020c
-010102060101021501010218010102210101020b010102060101022e010202020100020d
-01010238010102020101024801010215010102cc00000202040000000202040002080000
-0202040602030400027701010207010102030101020c0101020401030203010102000101
-020301010202010302020101020901010202010302030103020201030201010402010101
-020201030203010102000101020a01040201010302030101020001010203010102020103
-022701000200010102010100020201030203010402020103020201010209010102000101
-020101010203010302030101020201010200010102020101020101030202010402020101
-020101010202010102020101020001010203010102000101020301030203010402020104
-020501040202010102010101020501030201010402000101020101010204010302020101
-020001010201010102020103020201040202010402020103020301010200010102060104
-020201030274000002020400000004030208000002020400030400000203040002770101
-0207010102030102020b0101020301010201010102020102020001010202010102010101
-020101010201010102090101020101010201010102010101020101010200010102010101
-020101010203010102010101020101010202010202000101020a01010202010102010101
-020201020200010102020101020101010201010102260100020001010201010002010101
-020101010201010102010101020101010201010102010101020901020200010202000101
-020101010201010102020101020201020200010102010101020001010200010102010101
-020101010202010102010101020201010202010202000101020201020200010102010101
-020101010201010102050101020801010201010102020101020101010204010102010101
-020101010202010102010101020301010201010102010101020001010201010102010101
-020101010200010102050101020501010201010102020102020001010204010102050101
-020101010273000004030101020b00000203040003020000020404000277010402040101
-0204010302090101020701010202010102010101020201010201010102010101020d0101
-020101010201010102010101020801010201010102030101020101010201010102020101
-02010101020a010102060101020201010201010102020101020101010201010102260100
-0200010202000100020101010201010102010101020101010201010102010101020d0101
-020101010201010102050101020201010202010102010101020101010200010102000101
-020101010201010102020101020101010202010102020101020101010202010102010101
-020101010201010102010102020401020207010102010101020201010201010102040101
-020101010201010102030101020001000204010102010101020101020203010102010101
-020401020204010202040101020101010202010102010101020401020204010102010101
-02760103020b000002030400030200000204040002770101020701010206010202080101
-0204010402020101020101010202010102010105020d0101020101010201010102010101
-02050104020101010203010102010101020101010202010102010101020a010102030104
-020201010201010102020101020101050226010002010101020001000201010102010101
-020101010201010102010105020d01010201010102010101020201040202010102020101
-020101010201010102000101020001010201010102010101020201010201010102020101
-020201010201010102020101020101010201010502020103020301030205010102010101
-020201010201010102040105020101010204010102050105020101010204010102010101
-020501030203010302020101020101010202010102010101020501030202010502760103
-020b00000204040003000000020504000277010102070101020701010208010102030101
-020101010202010102010101020201010201010102110101020101010201010102010101
-0204010102010101020101010203010102010101020101010202010102010101020a0101
-020201010201010102020101020101010202010102010101022a01000202010202010101
-020101010201010102010101020101010211010102010101020101010201010102010101
-020201010202010102010101020101010201010102000101020001010200010202020101
-020101010202010102020101020101010202010102010101020101010208010202040102
-020401010201010102020101020101010204010102050101020301000200010102040101
-020501010204010102010101020701020204010202010101020101010202010102010101
-0207010202010101027a0103020b00000204040003000000020504000277010102070101
-020301010201010102080101020301010201010102020101020101010202010102010101
-020201000201010102090101020101010201010102010101020201000200010102010101
-020101010203010102010101020101010202010102010101020a01010202010102010101
-020201010201010102020101020101010202010002260100020201020201010102010101
-020101010200010202010101020201000201010102090101020101010201010102010101
-020101010202010102020101020101010202010102070101020001010202010102000102
-020201010202010102010101020201010201010102010101020201000205010102050101
-020101010200010102000102020201010200010202010101020001010202010002010101
-020201010201010102000101020001010202010002010101020401010201010102020100
-020401010205010102010101020101010202010102010101020101010204010102010101
-0202010002760103020b0000020500000206040002770105020301010204010302090101
-020401020200010102010104020301010202010302020101020901010202010302030103
-02020102020001010201010202010101020201030203010102010101020b010202010102
-020001010201010402030101020201030227010002030101020201030203010102000101
-020201030202010102090101020101010201010102020102020001010201010102020101
-020101010203010502050101020301010200010102020101020201010201010102020101
-020101010202010302020104020201040202010102010101020001010203010102000101
-020101010201010302030102020001010201010102000101020101030202010102040101
-020201030201010402020104020301030203010102010101020101010200010402030103
-02770103020b0000020d040002fc010602a201010201010102ff022a0103020b0000020d
-040002ff02a7010302ff022b0103020b0000020d040002ff02ff02d70103020c040d02ff
-02ff02d8010302ff02ff02f3010302ff02ff02f30103020200ff00ff00ec040002020103
-0202000004ff04ff04ec0202010302ff02ff02f30103020200ff00ff00ed020201030202
-00ff00ff00ec0800020201030202000106ff06ff06e90801020201030202000106ff06ff
-06e90801020201030202000106ff06ff06e90801020201030202000106ff06ff06e90801
-020201030202000106ff06ff06e908010202010302020001060b07040604070006030702
-061f07040610070206200702060b070006060700062d0700060207000604070006ff06fa
-07000602070006090702061308010202010302020001060b0700060f0700062107000614
-0700061f070006020700060a0700063507000602070006ff06ff0600070006020700060b
-0700061308010202010302020001060b0700060607020605070006030702061a07000604
-070206030702060507000603070206180700060207000601070006000701060207040602
-070206030702060207000600070106030702061807000602070006020702060307020602
-07000602070006ff06eb07000602070006020702060507000602070006000701060c0801
-0202010302020001060b0700060807000605070006020700060207000619070006030700
-060207000601070006020700060407000602070006020700061707000602070006010701
-060107000603070006060700060207000602070006010701060107000601070006020700
-0618070006000700060507000602070006020700060107000602070006ff06eb07000602
-07000601070006020700060407000602070106010700060b08010202010302020001060b
-070306050700060507000602070006020700061907000603070006020700060107000602
-07000604070006020700061b070006020700060107000602070006030700060607000602
-070006020700060107000602070006010700061c07000600070006050700060207000602
-070006010700060007000600070006ff06eb070406010700060207000604070006020700
-06020700060b08010202010302020001060b070006080700060507000602070406190700
-060307000602070006010700060207000604070006030702061807000602070006010700
-060207000603070006060700060207000602070006010700060207000602070206190700
-06000700060507000602070406010700060007000600070006ff06eb0700060207000601
-0704060407000602070006020700060b08010202010302020001060b0700060807000605
-070006020700061d07000603070006020700060107000602070006040700060607000617
-070006020700060107000602070006030700060607000602070006020700060107000602
-07000605070006190700060607000602070006050700060007000600070006ff06eb0700
-0602070006010700060807000602070006020700060b08010202010302020001060b0700
-060807000605070006020700060207000619070006030700060207000601070006020700
-060407000602070006020700061707000602070006010701060107000603070006060700
-060207000602070006010700060207000601070006020700061907000606070006020700
-0602070006010700060007000600070006ff06eb07000602070006010700060207000604
-07000602070106010700060b08010202010302020001060b070006080700060507000603
-0702061a0700060407020603070206050700060307020619070206020700060007010605
-07010604070006030702060207000602070006020702061a070006060700060307020603
-07000600070006ff06ec07000602070006020702060507000602070006000701060c0801
-0202010302020001067d070006ff06ff06590700060f08010202010302020001060a0706
-062a07060631070606000700063d070606ff06fe0706060e0700060f0801020201030202
-0001060a0706062a07060631070606000700063d070606ff06fe0706060e0700060f0801
-020201030202000106ff06ff06e90801020201030202000106ff06ff06e9080102020103
-0202000106ff06ff06e90801020201030202000108ff08ff08eb020201030202000008ff
-08ff08ec02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff
-06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202010302020603
-0016061600160616004406160016061600160616001606ff06be02020103020206030015
-080006160015080006160015080000150800001508000616001508000616001508000616
-0015080006ff06be02020103020206030001061208010616000106120801061600010612
-080100010612080100010612080106160001061208010616000106120801061600010612
-080106ff06be020201030202060300010612080106160001061208010616000106120801
-000106120801000106120801061600010612080106160001061208010616000106120801
-06ff06be0202010302020603000106120801061600010603070206030702060408010616
-000106120801000106120801000106120801061600010612080106160001061208010616
-00010612080106ff06be0202010302020603000106080702060608010616000106030702
-060307020604080106160001061208010001061208010001061208010616000106050704
-0607080106160001060707010608080106160001060707030606080106ff06be02020103
-020206030001060b0701060408010616000106020704060107040603080106160001060e
-0700060208010001060e070006020801000106020700060e080106160001060307080605
-080106160001060607030607080106160001060507070604080106ff06be020201030202
-06030001060d070006000700060108010616000106020700060107010601070006010701
-0603080106160001060e0700060208010001060e070006020801000106020700060e0801
-061600010602070a06040801061600010606070306070801061600010604070306010703
-0603080106ff06be02020103020206030001060207020608070106010801061600010601
-070d0602080106160001060b07000601070006020801000106020700060a070006020801
-00010602070006010700060b080106160001060207030602070306040801061600010607
-0701060808010616000106040702060307020603080106ff06be02020103020206030001
-060107080602070206010801061600010600070006000703060007020600070406010801
-06160001060b07000601070006020801000106020700060a070006020801000106020700
-06010700060b080106160001060107030604070306030801061600010612080106160001
-06040702060307020603080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106080700060107000601
-070006020801000106020700060407000604070006020801000106020700060107000601
-070006080801061600010601070206030707060108010616000106050704060708010616
-000106050701060207020604080106ff06be020201030202060300010601070906060801
-061600010600070006000703060007020600070406010801061600010608070006010700
-060107000602080100010602070006040700060407000602080100010602070006010700
-060107000608080106160001060107020604070506020801061600010606070306070801
-06160001060907020605080106ff06be0202010302020603000106010709060608010616
-000106000700060007030600070206000704060108010616000106050700060107000601
-070006010700060208010001060207000604070006010700060107000602080100010602
-070006010700060107000601070006050801061600010601070206050703060308010616
-0001060707020607080106160001060807020606080106ff06be02020103020206030001
-0601070d0602080106160001060007000600070706000704060108010616000106050700
-060107000601070006010700060208010001060207000604070006010700060107000602
-080100010602070006010700060107000601070006050801061600010601070306050701
-0604080106160001060707020607080106160001060707020607080106ff06be02020103
-020206030001060107030607070006030801061600010600070006000704060107000600
-070406010801061600010602070006010700060107000601070006010700060208010001
-060207000601070006010700060107000601070006020801000106020700060107000601
-07000601070006010700060208010616000106020703060b080106160001060707020607
-080106160001060707020607080106ff06be020201030202060300010601070206070700
-060408010616000106000706060107060601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106020709
-06050801061600010607070206070801061600010612080106ff06be0202010302020603
-000106010701060707000605080106160001060007000600070206050700060007020601
-080106160001060207000601070006010700060107000601070006020801000106020700
-060107000601070006010700060107000602080100010602070006010700060107000601
-070006010700060208010616000106030707060608010616000106060704060608010616
-0001060707020607080106ff06be02020103020206030001060107090606080106160001
-060007000600070206050700060007020601080106160001060207000601070006010700
-060107000601070006020801000106020700060107000601070006010700060107000602
-080100010602070006010700060107000601070006010700060208010616000106050704
-0607080106160001060507060605080106160001060707020607080106ff06be02020103
-020206030001061208010616000106000704060507040601080106160001061208010001
-0612080100010612080106160001061208010616000106120801061600010612080106ff
-06be02020103020206030001061208010616000106120801061600010612080100010612
-080100010612080106160001061208010616000106120801061600010612080106ff06be
-020201030202060300010612080106160001061208010616000106120801000106120801
-00010612080106160001061208010616000106120801061600010612080106ff06be0202
-010302020603000108140616000108140616000108140001081400010814061600010814
-06160001081406160001081406ff06be0202010302020603000008150616000008150616
-00000815000008150000081506160000081506160000081506160000081506ff06be0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed0202
-0103020206ff06ff06ed02020103020206ff06ff06ed020201030202060301ff01ff01e5
-06030202010302020603010000ff00ff00cf010000120100060302020103020206030100
-00ff00ff00cf010000110800010006030202010302020603010000ff00ff00cf01000001
-060e0801010006030202010302020603010000ff00ff00cf01000001060e080101000603
-0202010302020603010000ff00ff00cf01000001060e0801010006030202010302020603
-010000ff00ff00cf01000001060e0801010006030202010302020603010000ff00ff00cf
-01000001060e0801010006030202010302020603010000ff00ff00cf01000001060e0801
-010006030202010302020603010000ff00ff00cf01000001060e08010100060302020103
-02020603010000ff00ff00cf010000010601010a06010801010006030202010302020603
-010000ff00ff00cf010000010602010806020801010006030202010302020603010000ff
-00ff00cf010000010603010606030801010006030202010302020603010000ff00ff00cf
-010000010604010406040801010006030202010302020603010000ff00ff00cf01000001
-0605010206050801010006030202010302020603010000ff00ff00cf0100000106060100
-06060801010006030202010302020603010000ff00ff00cf01000001060e080101000603
-0202010302020603010000ff00ff00cf01000001060e0801010006030202010302020603
-010000ff00ff00cf01000001060e0801010006030202010302020603010000ff00ff00cf
-01000001060e0801010006030202010302020603010000ff00ff00cf01000001060e0801
-010006030202010302020603010000ff00ff00cf01000001060e08010100060302020103
-02020603010000ff00ff00cf01000001060e0801010006030202010302020603010000ff
-00ff00cf010000010810010006030202010302020603010000ff00ff00cf010000000811
-01000603020201030202060301ff01ff01e5060302020103020206ff06ff06ed02020103
-020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103
-020206ff06ff06ed02020103020206ff06ff06ed02020103020206ff06ff06ed02020103
-020206ff06ff06ed020201030202060301ff01ff01e506030202010302020603010006ff
-06ff06970100064a01000603020201030202060301000663010506ff06ff062d0100064a
-01000603020201030202060301000662010706ff06ff062c0100064a0100060302020103
-020206030100066101020603010206ff06ff062b0100064a010006030202010302020603
-0100066101010605010106ff06ff062b0100064a01000603020201030202060301000661
-01020603010206ff06ff062b0100064a01000603020201030202060301000662010706ff
-06ff062c0100064a01000603020201030202060301000663010506ff06ff062d0100064a
-01000603020201030202060301000665010106ff06ff062f0100064a0100060302020103
-0202060301000665010106ff06ff062f0100064a01000603020201030202060301000665
-010106ff06ff062f0100064a01000603020201030202060301000665010106ff06ff062f
-0100064a01000603020201030202060301000665010106ff06ff062f0100064a01000603
-020201030202060301000665010106ff06ff062f0100064a010006030202010302020603
-0100066101010600010206ff06ff062f0100064a01000603020201030202060301000661
-01010600010206ff06ff062f0100064a01000603020201030202060301000661010506ff
-06ff062f0100064a01000603020201030202060301000661010506ff06ff062f0100064a
-0100060302020103020206030100066101020600010106ff06ff062f0100064a01000603
-0202010302020603010006ff06ff06970100064a01000603020201030202060301ff01ff
-0199064a010006030202010302020603010006350b610d04005f0d04005f0d04005f0d04
-005f0d04005f0d0400010100061308120623010006030202010302020603010006350b60
-0e000d030100005e08000d030100005e08000d030100005e08000d030100005e08000d03
-0100005e08000d0301000001010006130811000006230100060302020103020206030100
-06350b010a5d0e010d0101020001065b08010d0101020001065b08010d0101020001065b
-08010d0101020001065b08010d0101020001065b08010d01010200010100061308010010
-0623010006030202010302020603010006350b010a2c01000a2f0e010d0101020001062a
-0102062d08010d0101020001062a0102062d08010d0101020001062c0100062d08010d01
-0102000106290104062c08010d0101020001062b0102062c08010d010102000101000613
-0801000d080000010623010006030202010302020603010006350b010a2a01020a2f0e01
-0d01010200010629010006020100062c08010d01010200010629010006020100062c0801
-0d0101020001062b0101062d08010d010102000106290100063008010d0101020001062a
-0100062f08010d01010200010100061308010001060a0801000106230100060302020103
-02020603010006350b010a2c01000a2f0e010d01010200010629010006020100062c0801
-0d0101020001062d0100062c08010d0101020001062a010006000100062d08010d010102
-000106290100063008010d010102000106290100063008010d0101020001010006130801
-0001060a080100010623010006030202010302020603010006350b010a2c01000a2f0e01
-0d01010200010629010006020100062c08010d0101020001062d0100062c08010d010102
-0001062a010006000100062d08010d010102000106290100063008010d01010200010629
-0100063008010d01010200010100061308010001060a0801000106230100060302020103
-02020603010006350b010a2c01000a2f0e010d0101020001062c0100062d08010d010102
-0001062b0101062d08010d01010200010629010006010100062d08010d01010200010629
-0103062d08010d010102000106290103062d08010d01010200010100061308010001060a
-080100010623010006030202010302020603010006350b010a2c01000a2f0e010d010102
-0001062b0100062e08010d0101020001062d0100062c08010d0101020001062801000602
-0100062d08010d0101020001062d0100062c08010d01010200010629010006020100062c
-08010d01010200010100061308010001060a080100010623010006030202010302020603
-010006350b010a2c01000a2f0e010d0101020001062a0100062f08010d0101020001062d
-0100062c08010d010102000106280105062c08010d0101020001062d0100062c08010d01
-010200010629010006020100062c08010d01010200010100061308010001060a08010001
-0623010006030202010302020603010006350b010a2c01000a2f0e010d01010200010629
-010006020100062c08010d01010200010629010006020100062c08010d0101020001062c
-0100062d08010d01010200010628010006030100062c08010d0101020001062901000602
-0100062c08010d01010200010100061308010001060a0801000106230100060302020103
-02020603010006350b010a2a01040a2d0e010d010102000106290104062c08010d010102
-0001062a0102062d08010d0101020001062b0102062c08010d010102000106290103062d
-08010d0101020001062a0102062d08010d01010200010100061308010001060a08010001
-0623010006030202010302020603010006350b010a5d0e010d0101020001065b08010d01
-01020001065b08010d0101020001065b08010d0101020001065b08010d0101020001065b
-08010d01010200010100061308010001060a080100010623010006030202010302020603
-010006350b010a5d0e010d0101020001065b08010d0101020001065b08010d0101020001
-065b08010d0101020001065b08010d0101020001065b08010d0101020001010006130801
-0001060a080100010623010006030202010302020603010006350b010a5d0e010d010102
-0001065b08010d0101020001065b08010d0101020001065b08010d0101020001065b0801
-0d0101020001065b08010d01010200010100060e0100060308010001060a080100010623
-010006030202010302020603010006350b010a5d0e010d0101020001065b08010d010102
-0001065b08010d0101020001065b08010d0101020001065b08010d0101020001065b0801
-0d01010200010100060d0101060308010001060a08010001062301000603020201030202
-0603010006350b010a5d0e010d0101020001065b08010d0101020001065b08010d010102
-0001065b08010d0101020001065b08010d0101020001065b08010d01010200010100060c
-010006000100060308010001080c00010623010006030202010302020603010006350b01
-0a5d0e010d0101020001065b08010d0101020001065b08010d0101020001065b08010d01
-01020001065b08010d0101020001065b08010d01010200010100060e010006030801000d
-080000010623010006030202010302020603010006350b010e5f0d0101020001085d0d01
-01020001085d0d0101020001085d0d0101020001085d0d0101020001085d0d0101020001
-0100060e0100060308010001060a08010001062301000603020201030202060301000635
-0b000e600d0001030000085e0d0001030000085e0d0001030000085e0d0001030000085e
-0d0001030000085e0d000103000008000100060e0100060308010001060a080100010623
-0100060302020103020206030100009a0100006301000063010000630100006301000063
-010000020100060e0100060308010001060a080100010623010006030202010302020603
-01000035080000630100006301000063010000630100006301000063010000020100060e
-0100060308010001060a0801000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100060c010406010801
-0001060a0801000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010001060a080100010623
-010006030202010302020603010000010617010006190801006301000063010000630100
-00630100006301000063010000020100061308010001060a080100010623010006030202
-01030202060301000001061501020619080100630100000e010000530100006301000063
-0100006301000063010000020100061308010001060a0801000106230100060302020103
-0202060301000001061701000619080100630100000e0100005301000063010000630100
-006301000063010000020100061308010001060a08010001062301000603020201030202
-0603010000010617010006190801000f0102000201000000010100020100000001010003
-0102003b0100000e01000000010100020100000001010003010200020101000001000002
-01010000010000030102002d010000630100006301000063010000630100000201000613
-08010001060a080100010623010006030202010302020603010000010617010006190801
-000e010000020100000101010001010000010101000101000001010000020100003a0100
-000e01010001010000010101000101000001010000020100000101000000010000000100
-0001010000000100000001000001010000020100002c0100006301000063010000630100
-0063010000020100061308010001060a0801000106230100060302020103020206030100
-00010617010006190801001201000001010000020100000101000002010000050100003a
-0100000e0100000201000001010000050100000201000001010000000100000001000001
-0100000001000000010000050100002c0100006301000063010000630100006301000002
-0100061308010001060a0801000106230100060302020103020206030100000106170100
-06190801000f01030001010000020100000101000002010000020103003a0100000e0100
-000201000001010000050100000201000001010000000100000001000001010000000100
-0000010000020103002c0100006301000063010000630100006301000002010006130801
-0001080c00010623010006030202010302020603010000010617010006190801000e0100
-00020100000101000002010000010100000201000001010000020100003a0100000e0100
-000201000001010000050100000201000001010000000100000001000001010000000100
-000001000001010000020100002c01000063010000630100006301000063010000020100
-061308010000080d00010623010006030202010302020603010000010615010406170801
-000e010000020100000101000002010000010100000201000001010000020100003a0100
-000e01010001010000010100000501000002010000010100000001000000010000010100
-00000100000001000001010000020100002c010000630100006301000063010000630100
-00020100061308010c0e000106230100060302020103020206030100000106320801000f
-01030001010000020100000101000002010000020103003a0100000e0100000001010002
-01000006010200020100000001000000010000010100000001000000010000020103002c
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000108340063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000000835
-01ff01ff0161061308010c0e000106230100060302020103020206030100009a01000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000035080000630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010616010206180801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061501000602
-0100061708010011010100130100000b01000002010000290100002c0100000b01020003
-0102001f01000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010615010006020100061708010010010000150100
-000f010000290100002c0100000d010000050100001f0100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010615
-010006020100061708010010010000030100000001010003010200030101000001000001
-01000000010100030102000201000001010000260100000e010000000101000301020002
-01000000010100020100000001010002010400010100000201000004010000050100001f
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-0202010302020603010000010618010006180801000e0104000101010001010000010100
-000201000001010000010101000101010001010000040100000201000000010000270100
-000e01010001010000010100000201000001010100010100000101010001010000030100
-00030100000201000004010000050100001f010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061701000619
-080100100100000301000005010000020100000101000002010000010100000801000002
-010100280100000e01000002010000010100000201000001010000050100000701000003
-0100000201000004010000050100001f0100006301000063010000630100006301000002
-0100061308010c0e000106230100060302020103020206030100000106160100061a0801
-001001000003010000050104000101000002010000010100000801000002010100280100
-000e01000002010000010100000201000001010000050100000701000003010000020100
-0004010000050100001f0100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010615010006020100061708010010
-010000030100000501000005010000020100000101000008010000020100000001000027
-0100000e0100000201000001010000020100000101000005010000070100000301000002
-01000004010000050100001f010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061501040617080100100100
-000301000005010000020100000101000001010100010100000801000002010000010100
-00260100000e010000020100000101000002010000010100000501000007010000030100
-000101010004010000050100001f01000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801001001000003
-01000006010200030101000001000001010000080100000201000002010000250100000e
-010000020100000201020002010000050100000801010002010100000100000401000005
-0100001f01000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106320801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001083400630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0000083501ff01ff0161061308010c0e000106230100060302020103020206030100009a
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000350800006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106160102061808010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010615
-01000602010006170801002601000003010200030102002d010000160102004901000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-02020603010000010619010006170801002d010000050100002d01000018010000490100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010619010006170801000f01010000010000010100000201000001
-0100000001010003010200050100000501000003010200260100000f0102000501000002
-010000020100000201020003010200030102000201000000010100260100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010617010106180801000e01000001010100010100000201000001010100010100
-000401000005010000050100000201000002010000250100000e01000002010000040100
-000201000002010000010100000201000001010000020100000101000002010000010101
-00010100002501000063010000630100006301000063010000020100061308010c0e0001
-0623010006030202010302020603010000010619010006170801000e0100000201000001
-01000002010000010100000201000004010000050100000501000006010000250100000e
-010000080100000201000002010000010100000501000005010000020100000101000002
-0100002501000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010619010006170801000e01000002010000010100
-0002010000010100000201000004010000050100000501000003010300250100000f0102
-000501000002010000020100000201020003010200020104000101000002010000250100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000001061501000602010006170801000e010000020100000101000002
-010000010100000201000004010000050100000501000002010000020100002501000012
-010000040100000201000002010000050100000501000001010000050100000201000025
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-0202010302020603010000010616010206180801000e0100000101010001010000010101
-0001010000020100000401000005010000050100000201000002010000250100000e0100
-000201000004010000020100000101010001010000020100000101000002010000010100
-000201000001010000020100002501000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801000f01010000
-010000020101000001000001010000020100000401000005010000050100000301030025
-0100000f0102000501000003010100000100000201020003010200030102000201000002
-0100002501000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100120100004f01000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-06030100000106320801000e010000020100004f01000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-06320801000f010200500100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010834
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000000083501ff01ff0161061308010c0e00010623
-0100060302020103020206030100009a0100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100003508000063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106320801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061801000618080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000001061701010618080100110100001a010100040100002d
-010000160102000c01000002010000370100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010616010006000100
-06180801002c010000350100001801000010010000370100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010616
-01000600010006180801000f010200030102000301020003010200040100000401020002
-01000000010100030102001f0100000f0102000501000002010000020100000201020002
-010000010100003401000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106150100060101000618080100110100
-000201000002010000010100000201000001010000020100000101040004010000020101
-000101000001010000020100001e0100000e010000020100000401000002010000020100
-000401000002010000000100003501000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106140100060201000618
-080100110100000201000002010000010100000501000002010000030100000601000002
-0100000201000001010000020100001e0100001201000004010000020100000201000004
-010000020101003601000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106140105061708010011010000020100
-0002010000020102000201040003010000060100000201000002010000010104001e0100
-000f01030004010000030100000001000005010000020101003601000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106180100061808010011010000020100000201000005010000010100000701000006
-010000020100000201000001010000220100000e01000002010000040100000301000000
-010000050100000201000000010000350100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010617010206170801
-001101000002010000020100000101000002010000010100000201000003010000060100
-00020100000201000001010000020100001e0100000e0100000201000004010000040100
-000601000002010000010100003401000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801001101000003
-010200030102000301020004010000060100000201000002010000020102001f0100000f
-010300040100000401000006010000020100000201000033010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010011010000500100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801000e01000001
-010000500100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801000f01010051010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001083400630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0000083501ff01ff0161061308010c0e0001062301000603020201030202060301000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000000050000000500000005000000050000000500
-000005000000050000000500000005000100006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000500
-000005320100050000630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000005340100006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000500000005150104051701000500006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-06030100000005160100051c0100000e010000160100003b0100000e0100000601020010
-0100000c0100002901000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000500000005150100051b01000500000e0100
-00530100000e01000008010000100100000c010000290100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000000516
-0100051c0100000e01000001010000030102000201000000010100030102000201000000
-010100340100000e01000000010100050100000301020003010200020100000101000003
-010200020100000001010003010200020100000001010003010100000100001001000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000500000005150103051801000500000e0100000001000003010000020100
-000101010001010000040100000201010001010000330100000e01010001010000040100
-000201000002010000010100000201000001010000000100000301000002010000010101
-000101000001010000020100000101010001010000010100000101010010010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000000051a010005180100000e0101000801000001010000080100000201000002
-010000330100000e01000002010000040100000601000001010000050101000401000002
-010000010100000201000001010000020100000101000005010000020100001001000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000500000005190100051701000500000e0101000501030001010000080100
-000201000002010000330100000e01000002010000040100000301030001010000050101
-000401040001010000020100000101040001010000050100000201000010010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000000051501000503010005180100000e01000000010000030100000201000001
-010000080100000201000002010000330100000e01000002010000040100000201000002
-010000010100000501000000010000030100000501000002010000010100000501000005
-010000020100001001000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000500000005150103051801000500000e0100
-0001010000020100000201000001010000080100000201000002010000330100000e0101
-000101000004010000020100000201000001010000020100000101000001010000020100
-000201000001010100010100000101000002010000010100000501000001010100100100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-0103020206030100000005340100000e0100000201000002010300010100000801000002
-01000002010000330100000e010000000101000501000003010300020102000201000002
-010000020102000201000000010100030102000201000006010100000100001001000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100050000000532010005000063010000510100001001000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-00000534010000630100004d010000020100001001000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100050000000532
-0100050000630100004e0102001101000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000005340100006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000500000005320100050000630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010000630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001000500010005000100050001000500
-010005000100050001000500010005000100050001ff01ff0161061308010c0e00010623
-01000603020201030202060301000d360063010000630100006301000063010000630100
-0063010000020100061308010c0e0001062301000603020201030202060301000d350100
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000d01013400630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0d0101340063010000630100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000d010117000201190063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000d0101160000011c000e0100000e010000140100002d010000320102
-002d01000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000d0101150000011d000e0100000e01000043010000340100
-002d01000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000d0101150000011d000e0100000101000003010200020104
-00020102000201000000010100030102000201000000010100030102001f0100000e0100
-000201000001010000000101000201000000010100030102000301020005010000030102
-002601000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000d0101150003011a000e0100000001000003010000020100
-000301000003010000020100000101010001010000040100000201010001010000010100
-00020100001e0100000e0100000201000001010100010100000101010001010000010100
-000201000001010000020100000401000002010000020100002501000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0d0101150000010200000119000e01010008010000030100000701000001010000080100
-000201000002010000050100001e0100000e010000020100000101000002010000010100
-000201000001010000090100000401000006010000250100006301000063010000630100
-0063010000020100061308010c0e0001062301000603020201030202060301000d010115
-0000010200000119000e0101000501030003010000040103000101000008010000020100
-0002010000020103001e0100000e01000002010000010100000201000001010000020100
-000201020003010300040100000301030025010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000d01011500000102
-00000119000e010000000100000301000002010000030100000301000002010000010100
-0008010000020100000201000001010000020100001e0100000e01000002010000010100
-000201000001010000020100000501000001010000020100000401000002010000020100
-002501000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000d0101160002011a000e0100000101000002010000020100
-000301000003010000020100000101000008010000020100000201000001010000020100
-001e0100000e010000010101000101010001010000010101000101000001010000020100
-000101000002010000040100000201000002010000250100006301000063010000630100
-0063010000020100061308010c0e0001062301000603020201030202060301000d010134
-000e01000002010000020103000401010002010300010100000801000002010000020100
-00020103001e0100000f0101000001000001010000000101000201000000010100030102
-000301030004010000030103002501000063010000630100006301000063010000020100
-061308010c0e0001062301000603020201030202060301000d0101340063010000150100
-00050100004501000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000d01013400630100001501000005010000450100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-01030202060301000d010134006301000015010000050100004501000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0d0101340063010000630100006301000063010000630100006301000002010006130801
-0c0e0001062301000603020201030202060301000d010134006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000d01013400630100006301000063010000630100006301000063010000020100
-061308010c0e0001062301000603020201030202060301000d0001ff01ff019706130801
-0c0e000106230100060302020103020206030100009a0100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-003508000063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061501040617
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106150100060201000617080100260100
-003b01000019010000170102002d01000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106180100061808010063
-01000019010000190100002d010000630100006301000063010000630100000201000613
-08010c0e00010623010006030202010302020603010000010618010006180801000e0101
-00000100000301020002010000000101000301020003010200340100000f010200030101
-000001000002010200020100000001010002010000000101000501000003010200020100
-00000101001f01000063010000630100006301000063010000020100061308010c0e0001
-0623010006030202010302020603010000010618010006180801000e0100000001000000
-01000001010000020100000101010001010000040100000201000002010000330100000e
-010000020100000101000001010100010100000201000001010100010100000101010001
-01000004010000020100000201000001010100010100001e010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-0618010006180801000e0100000001000000010000050100000101000008010000060100
-00330100000e010000020100000101000002010000010100000201000001010000020100
-000101000002010000040100000601000001010000020100001e01000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-00010617010006190801000e010000000100000001000002010300010100000801000003
-010300330100000e01000002010000010100000201000001010400010100000201000001
-01000002010000040100000301030001010000020100001e010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-0617010006190801000e0100000001000000010000010100000201000001010000080100
-000201000002010000330100000e01000002010000010100000201000001010000050100
-0002010000010100000201000004010000020100000201000001010000020100001e0100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010617010006190801000e01000000010000000100000101000002
-01000001010000080100000201000002010000330100000e010000020100000101000001
-010100010100000201000001010000020100000101010001010000040100000201000002
-01000001010000020100001e010000630100006301000063010000630100000201000613
-08010c0e000106230100060302020103020206030100000106320801000e010000000100
-000001000002010300010100000801000003010300330100000f01020003010100000100
-000201020002010000020100000101000000010100050100000301030001010000020100
-001e01000063010000630100006301000063010000020100061308010c0e000106230100
-06030202010302020603010000010632080100630100002a010000370100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100002a01000037010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100002a0100003701000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010834006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000000083501ff01ff0161061308010c0e00010623010006030202
-010302020603010005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050000000500000005000000
-050000000500000005000000050000000500000005000000050001000063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010005000000053201000500006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000000
-053401000063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010005000000051601020518010005000063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-01000603020201030202060301000000051601000502010005180100001e010000430100
-000e01000006010200100100000c01000029010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000500000005150100
-05020100051701000500001e010000430100000e01000008010000100100000c01000029
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000000051601000502010005180100000e01010000010000030102
-0002010400020102003b0100000e01000000010100050100000301020003010200020100
-000101000003010200020100000001010003010200020100000001010003010100000100
-001001000063010000630100006301000063010000020100061308010c0e000106230100
-0603020201030202060301000500000005160102051801000500000e0100000001000000
-01000001010000020100000301000003010000020100003a0100000e0101000101000004
-010000020100000201000001010000020100000101000000010000030100000201000001
-010100010100000101000002010000010101000101000001010000010101001001000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000000051601000502010005180100000e0100000001000000010000050100
-0003010000030100003e0100000e01000002010000040100000601000001010000050101
-000401000002010000010100000201000001010000020100000101000005010000020100
-001001000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100050000000515010005020100051701000500000e01000000
-010000000100000201030003010000040102003b0100000e010000020100000401000003
-010300010100000501010004010400010100000201000001010400010100000501000002
-0100001001000063010000630100006301000063010000020100061308010c0e00010623
-01000603020201030202060301000000051601000502010005180100000e010000000100
-0000010000010100000201000003010000070100003a0100000e01000002010000040100
-000201000002010000010100000501000000010000030100000501000002010000010100
-000501000005010000020100001001000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100050000000516010205180100
-0500000e010000000100000001000001010000020100000301000003010000020100003a
-0100000e0101000101000004010000020100000201000001010000020100000101000001
-010000020100000201000001010100010100000101000002010000010100000501000001
-0101001001000063010000630100006301000063010000020100061308010c0e00010623
-0100060302020103020206030100000005340100000e0100000001000000010000020103
-0004010100020102003b0100000e01000000010100050100000301030002010200020100
-000201000002010200020100000001010003010200020100000601010000010000100100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010005000000053201000500006301000051010000100100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000000534010000630100004d01000002010000100100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010005000000
-05320100050000630100004e010200110100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000000534010000630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100050000000532010005000063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-050001000500010005000100050001000500010005000100050001000500010005000100
-0500010005000100050001000500010005000100050001ff01ff0161061308010c0e0001
-06230100060302020103020206030100009a010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000350800
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106160102061808010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010615010006020100061708010016010200030102
-00420100000e010000230100000b01020003010200180100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010615
-01000602010006170801001801000005010000420100000e010000230100000d01000005
-0100001801000063010000630100006301000063010000020100061308010c0e00010623
-01000603020201030202060301000001061501000602010006170801000f010200050100
-0005010000030102003b0100000e01000000010100030102000201000000010100020100
-000001010003010200020104000101000002010000040100000501000018010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061501000602010006170801000e01000002010000040100000501000002
-010000020100003a0100000e010100010100000101000002010000010101000101000001
-010100010100000101000002010000030100000301000002010000040100000501000018
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-0202010302020603010000010616010306170801000e0100000201000004010000050100
-0002010000020100003a0100000e01000002010000010100000201000001010000050100
-000201000001010000070100000301000002010000040100000501000018010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-0603010000010619010006170801000e010000020100000401000005010000020104003a
-0100000e0100000201000001010000020100000101000005010000020100000201020004
-010000030100000201000004010000050100001801000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106180100
-06180801000e010000020100000401000005010000020100003e0100000e010000020100
-000101000002010000010100000501000002010000050100000301000003010000020100
-000401000005010000180100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010615010206190801000e01000002
-010000040100000501000002010000020100003a0100000e010000020100000101000002
-010000010100000501000002010000010100000201000003010000030100000101010004
-010000050100001801000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801000f01020005010000050100
-00030102003b0100000e0100000201000002010200020100000501000002010000020102
-000501010002010100000100000401000005010000180100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-083400630100006301000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000000083501ff01ff0161061308010c0e0001
-062301000603020201030202060301000900000009000000090000000900000009000000
-090000000900000009000000090000000900000009000000090000000900000009000000
-090000000900000009000000090000000900000009000000090000000900000009000000
-090000000900000009000000090000000900006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000000
-090000000900000009000000090000000900000009000000090000000900000009000000
-090000000900000009000000090000000900000009000000090000000900000009000000
-090000000900000009000000090000000900000009000000090000000900000009000100
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000900000009320100090000630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000009340100006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000900000009130100
-090401020915010009000063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000000912010209030100
-090201000915010000630100001701000020010200260100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010009000000
-091301000903010009020100091401000900006301000017010000220100002601000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000009140100090301000902010009150100000e01000000010100030102
-000201000000010100420100000f01020002010400010100000201000001010000000101
-000301020002010000000101000501000003010200020100000001010018010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-0603010009000000091301000903010009020100091401000900000e0101000101000001
-010000020100000101010001010000410100000e01000002010000030100000301000002
-010000010101000101000001010000020100000101010001010000040100000201000002
-010000010101000101000017010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000000091401000903010009020100
-09150100000e01000002010000010100000201000001010000450100000e010000070100
-000301000002010000010100000501000002010000010100000201000004010000060100
-000101000002010000170100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010009000000091301000903010009020100
-091401000900000e010000020100000101040001010000450100000f0102000401000003
-010000020100000101000005010400010100000201000004010000030103000101000002
-0100001701000063010000630100006301000063010000020100061308010c0e00010623
-0100060302020103020206030100000009140100090301000902010009150100000e0100
-000201000001010000050100004501000012010000030100000301000002010000010100
-000501000005010000020100000401000002010000020100000101000002010000170100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-0103020206030100090000000911010409020102091501000900000e0101000101000001
-0100000201000001010000450100000e0100000201000003010000030100000101010001
-010000050100000201000001010100010100000401000002010000020100000101000002
-0100001701000063010000630100006301000063010000020100061308010c0e00010623
-0100060302020103020206030100000009340100000e0100000001010003010200020100
-00450100000f010200050101000201010000010000010100000601020002010000000101
-000501000003010300010100000201000017010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000900000009320100
-0900000e0100005301000031010000300100006301000063010000630100006301000002
-0100061308010c0e000106230100060302020103020206030100000009340100000e0100
-005301000031010000300100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010009000000093201000900000e01000053
-010000310100003001000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000009340100006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000900000009320100090000630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000009000100
-090001000900010009000100090001000900010009000100090001000900010009000100
-090001000900010009000100090001000900010009000100090001000900010009000100
-090001000900010009000100090001000900010009000100090001000900010000630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100090001000900010009000100090001000900010009000100
-090001000900010009000100090001000900010009000100090001000900010009000100
-090001000900010009000100090001000900010009000100090001000900010009000100
-090001000900010009000100090001ff01ff0161061308010c0e00010623010006030202
-0103020206030100009a0100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100003508000063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000605010006160801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061101020603010206160801001701000006010000420100
-00150100001c0100000b0102000301020018010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000605
-01000616080100170100004a010000150100001c0100000d010000050100001801000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-0202060301000001061301000605010006160801000f0102000201040002010200020100
-000001010003010200340100000f01020002010000010100000301020002010000000101
-000301020002010400010100000201000004010000050100001801000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-0001061301000605010006160801000e0100000201000003010000060100000201010001
-0100000101000002010000330100000e0100000201000001010000000100000301000002
-010000010101000101000001010000020100000301000003010000020100000401000005
-0100001801000063010000630100006301000063010000020100061308010c0e00010623
-01000603020201030202060301000001061301000605010006160801000e010000070100
-0006010000020100000201000005010000330100000e0100000501010008010000010100
-000201000001010000070100000301000002010000040100000501000018010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000605010006160801000f01020004010000060100000201000002
-01000002010300330100000f010200020101000501030001010000020100000201020004
-010000030100000201000004010000050100001801000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106130100
-060501000616080100120100000301000006010000020100000201000001010000020100
-003301000012010000010100000001000003010000020100000101000002010000050100
-000301000003010000020100000401000005010000180100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010611
-01040601010406140801000e010000020100000301000006010000020100000201000001
-01000002010000330100000e010000020100000101000001010000020100000201000001
-010000020100000101000002010000030100000301000001010100040100000501000018
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-02020103020206030100000106320801000f010200050101000401000002010000020100
-0002010300330100000f0102000201000002010000020103000101000002010000020102
-000501010002010100000100000401000005010000180100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-083400630100006301000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000000083501ff01ff0161061308010c0e0001
-06230100060302020103020206030100009a010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000350800
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060401020615
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106110102060301000602010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000603010006020100061408010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006030100060201000614080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106130100060601000615080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106130100060501000616080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106130100060401000617080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106130100
-060301000602010006140801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061101040601
-010406140801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001063208010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001083400630100006301000063010000630100006301000063
-010000020100061308010c0e0001062301000603020201030202060301000000083501ff
-01ff0161061308010c0e000106230100060302020103020206030100009a010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000350800006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010632080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106130100060401020615080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106110102
-060301000602010006140801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000607
-010006140801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000607010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000605010106150801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061301000607010006140801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000607010006140801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000603010006020100061408010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010611
-010406020102061508010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-063208010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010632080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106320801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001063208010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010834006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000000
-083501ff01ff0161061308010c0e000106230100060302020103020206030100009a0100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100003508000063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000606010006150801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061101020605010106150801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000604
-010006000100061508010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010613010006040100
-060001000615080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060301000601
-010006150801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000602010006020100
-061508010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010613010006020105061408010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006060100061508010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010611010406030102061408010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010834006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000000083501ff01ff0161061308010c0e00010623010006030202
-0103020206030100009a0100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100003508000063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000603010406140801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061101020603010006180801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000603010006180801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000603010006180801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000603
-010306150801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000607010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000607010006140801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061301000602010006030100061408010063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010611010406010103061508010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010834006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000000083501ff01ff0161061308010c0e00010623010006030202
-0103020206030100009a0100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100003508000063010000630100
-0063010000630100006301000063010000020100061308010c0e00010623010006030202
-010302020603010000010632080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000605010206140801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061101020604010006170801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000603010006180801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000603010006180801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000603
-010306150801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000603010006020100
-061408010063010000630100006301000063010000630100006301000002010006130801
-0c0e00010623010006030202010302020603010000010613010006030100060201000614
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106130100060301000602010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061101040602010206150801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-083400630100006301000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000000083501ff01ff0161061308010c0e0001
-06230100060302020103020206030100009a010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000350800
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060301040614
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106110102060301000602010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000606010006150801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001061301000606010006150801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000606010006150801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-061301000606010006150801006301000063010000630100006301000063010000630100
-00020100061308010c0e0001062301000603020201030202060301000001061301000605
-010006160801006301000063010000630100006301000063010000630100000201000613
-08010c0e0001062301000603020201030202060301000001061301000605010006160801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061101040603010006160801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106320801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001063208010063010000630100006301000063010000630100006301000002
-0100061308010c0e00010623010006030202010302020603010000010632080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106320801006301000063010000630100006301000063
-01000063010000020100061308010c0e0001062301000603020201030202060301000001
-083400630100006301000063010000630100006301000063010000020100061308010c0e
-0001062301000603020201030202060301000000083501ff01ff0161061308010c0e0001
-06230100060302020103020206030100009a010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000350800
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106130100060401020615
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000106110102060301000602010006140801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001061301000603010006020100061408010063
-0100006301000063010000630100006301000063010000020100061308010c0e00010623
-010006030202010302020603010000010613010006030100060201000614080100630100
-006301000063010000630100006301000063010000020100061308010c0e000106230100
-060302020103020206030100000106130100060401020615080100630100006301000063
-010000630100006301000063010000020100061308010c0e000106230100060302020103
-020206030100000106130100060301000602010006140801006301000063010000630100
-00630100006301000063010000020100061308010c0e0001062301000603020201030202
-060301000001061301000603010006020100061408010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010613010006030100060201000614080100630100006301000063010000630100
-006301000063010000020100061308010c0e000106230100060302020103020206030100
-000106110104060201020615080100630100006301000063010000630100006301000063
-010000020100061308010c0e000106230100060302020103020206030100000106320801
-00630100006301000063010000630100006301000063010000020100061308010c0e0001
-062301000603020201030202060301000001063208010063010000630100006301000063
-0100006301000063010000020100061308010c0e00010623010006030202010302020603
-010000010632080100630100006301000063010000630100006301000063010000020100
-061308010c0e000106230100060302020103020206030100000106320801006301000063
-01000063010000630100006301000063010000020100061308010c0e0001062301000603
-020201030202060301000001063208010063010000630100006301000063010000630100
-0063010000020100061308010c0e00010623010006030202010302020603010000010632
-080100630100006301000063010000630100006301000063010000020100061308010c0e
-000106230100060302020103020206030100000108340063010000630100006301000063
-0100006301000063010000020100061308010010062301000603020201030202060301ff
-01ff01990613080000110623010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-0202060301000649010006ff06ff069801000603020201030202060301000648010106ff
-06ff06980100060302020103020206030100064701000600010006ff06ff069801000603
-020201030202060301000649010006ff06ff069801000603020201030202060301000649
-010006ff06ff069801000603020201030202060301000649010006ff06ff069801000603
-020201030202060301000649010006ff06ff069801000603020201030202060301000649
-010006ff06ff069801000603020201030202060301000647010406ff06ff069601000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-0100063708ff08ff0860064a0100060302020103020206030100063708ff08ff085f0000
-064a010006030202010302020603010006370801001d0cff0cff0c3e0001064a01000603
-0202010302020603010006370801001c08000cff0cff0c3e0001064a0100060302020103
-020206030100063708010001060b08000000060b08010cff0cff0c3e0001064a01000603
-02020103020206030100063708010001060b08000000060b08010cff0cff0c3e0001064a
-0100060302020103020206030100063708010001060b08000000060b08010cff0cff0c3e
-0001064a0100060302020103020206030100063708010001060b08000000060b08010cff
-0cff0c3e0001064a0100060302020103020206030100063708010001060b08000000060b
-08010cff0cff0c3e0001064a0100060302020103020206030100063708010001060b0800
-0000060b08010cff0cff0c3e0001064a0100060302020103020206030100063708010001
-060b08000000060b08010cff0cff0c3e0001064a01000603020201030202060301000637
-08010001060b08000000060b08010cff0cff0c3e0001064a010006030202010302020603
-0100063708010001060b08000000060b08010cff0cff0c3e0001064a0100060302020103
-020206030100063708010001060b08000000060b08010cff0cff0c3e0001064a01000603
-02020103020206030100063708010001060b08000000060b08010cff0cff0c3e0001064a
-0100060302020103020206030100063708010001080c0000080d0cff0cff0c3e0001064a
-0100060302020103020206030100063708010000081c0cff0cff0c3e0001064a01000603
-020201030202060301000637080100ff00ff005e064a0100060302020103020206030100
-0637080000ff00ff005f064a010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010302020603
-010006ff06ff06e3010006030202010302020603010006ff06ff06e30100060302020103
-02020603010006ff06ff06e3010006030202010302020603010006ff06ff06e301000603
-0202010302020603010006ff06ff06e3010006030202010302020603010006ff06ff06e3
-010006030202010302020603010006ff06ff06e3010006030202010302020603010006ff
-06ff06e3010006030202010302020603010006ff06ff06e3010006030202010100040603
-010006ff06ff06e301000603000502020400060301ff01ff01e506030000020204000000
-0202040006ff06ff06ed00000202040000000202040006ff06ff06ed0000020204000000
-0202040006ff06ff06ed00000202040000000202040006ff06ff06ed0000020204000000
-02020400000502ff02ff02e100060202040000000208040002ff02ff02e1000002080400
-00000208040002ff02ff02e100000208040000000208040001ff01ff01e1000002080400
-0000040901ff01ff01e100000409
-%%EndData
-end
-%%PageTrailer
-%%Trailer
-%%BoundingBox: 0 0 532 441
-%%EOF
diff --git a/lib/tv/doc/src/warning.gif b/lib/tv/doc/src/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/lib/tv/doc/src/warning.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/ebin/.gitignore b/lib/tv/ebin/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
--- a/lib/tv/ebin/.gitignore
+++ /dev/null
diff --git a/lib/tv/info b/lib/tv/info
deleted file mode 100644
index 63e88b04b5..0000000000
--- a/lib/tv/info
+++ /dev/null
@@ -1,2 +0,0 @@
-group: tools
-short: An ETS and MNESIA graphical table visualizer
diff --git a/lib/tv/priv/Makefile b/lib/tv/priv/Makefile
deleted file mode 100644
index 679a76fe88..0000000000
--- a/lib/tv/priv/Makefile
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-include ../vsn.mk
-VSN = $(TV_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/tv-$(VSN)
-
-#
-# Macros
-#
-TOOLBAR_FILES = \
- arrow_left.xbm \
- arrow_right.xbm \
- edit1.xbm \
- erlang.gif \
- help.xbm \
- info.xbm \
- key.xbm \
- more.xbm \
- no_sort.xbm \
- open.xbm \
- poll.xbm \
- search.xbm \
- sort.xbm \
- sort_reverse.xbm \
- tv.gif \
- tv.tool
-
-#
-# Rules
-#
-
-debug opt:
-
-docs:
-
-clean:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/priv"
- $(INSTALL_DATA) $(TOOLBAR_FILES) "$(RELSYSDIR)/priv"
-
-release_docs_spec:
-
-FORCE:
diff --git a/lib/tv/priv/arrow_left.xbm b/lib/tv/priv/arrow_left.xbm
deleted file mode 100644
index 58db123a00..0000000000
--- a/lib/tv/priv/arrow_left.xbm
+++ /dev/null
@@ -1,5 +0,0 @@
-#define arrow_left_width 16
-#define arrow_left_height 8
-static unsigned char arrow_left_bits[] = {
- 0x70, 0x00, 0x38, 0x00, 0x1c, 0x00, 0xfe, 0xff, 0xfe, 0xff, 0x1c, 0x00,
- 0x38, 0x00, 0x70, 0x00};
diff --git a/lib/tv/priv/arrow_right.xbm b/lib/tv/priv/arrow_right.xbm
deleted file mode 100644
index 7eca80303d..0000000000
--- a/lib/tv/priv/arrow_right.xbm
+++ /dev/null
@@ -1,5 +0,0 @@
-#define arrow_right_width 16
-#define arrow_right_height 8
-static unsigned char arrow_right_bits[] = {
- 0x00, 0x1c, 0x00, 0x38, 0x00, 0x70, 0xfc, 0xff, 0xfc, 0xff, 0x00, 0x70,
- 0x00, 0x38, 0x00, 0x1c};
diff --git a/lib/tv/priv/edit1.xbm b/lib/tv/priv/edit1.xbm
deleted file mode 100644
index dc13f274c0..0000000000
--- a/lib/tv/priv/edit1.xbm
+++ /dev/null
@@ -1,12 +0,0 @@
-#define edit1_width 25
-#define edit1_height 25
-static unsigned char edit1_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00,
- 0x00, 0x01, 0x14, 0x00, 0x70, 0xf9, 0x27, 0x00, 0xf8, 0x01, 0x3c, 0x00,
- 0xf8, 0xf9, 0x27, 0x00, 0xf0, 0x03, 0x20, 0x00, 0xe0, 0xff, 0x27, 0x00,
- 0xc0, 0x07, 0x20, 0x00, 0x80, 0xff, 0x27, 0x00, 0x00, 0x1f, 0x20, 0x00,
- 0x00, 0xfd, 0x27, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0xf9, 0x27, 0x00,
- 0x00, 0x21, 0x21, 0x00, 0x00, 0xf9, 0x27, 0x00, 0x00, 0x01, 0x20, 0x00,
- 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/erlang.gif b/lib/tv/priv/erlang.gif
deleted file mode 100644
index 8d06e98065..0000000000
--- a/lib/tv/priv/erlang.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/priv/help.xbm b/lib/tv/priv/help.xbm
deleted file mode 100644
index b2cbc541e4..0000000000
--- a/lib/tv/priv/help.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define help_width 20
-#define help_height 20
-static unsigned char help_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xff, 0x00, 0x80, 0xe7, 0x01,
- 0x80, 0xc3, 0x01, 0x80, 0xc3, 0x01, 0x00, 0xe3, 0x00, 0x00, 0x70, 0x00,
- 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/info.xbm b/lib/tv/priv/info.xbm
deleted file mode 100644
index d5157661c2..0000000000
--- a/lib/tv/priv/info.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define info_width 20
-#define info_height 20
-static unsigned char info_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00,
- 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x1e, 0x00,
- 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00,
- 0x00, 0x3e, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/key.xbm b/lib/tv/priv/key.xbm
deleted file mode 100644
index 222be32219..0000000000
--- a/lib/tv/priv/key.xbm
+++ /dev/null
@@ -1,6 +0,0 @@
-#define key_width 10
-#define key_height 18
-static char key_bits[] = {
- 0xfc,0x00,0xfe,0x01,0x87,0x03,0x03,0x03,0x87,0x03,0xfe,0x01,0xfc,0x00,0x30,
- 0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x3b,0x00,0x3b,0x00,
- 0x3f,0x00,0x3f,0x00,0x37,0x00};
diff --git a/lib/tv/priv/more.xbm b/lib/tv/priv/more.xbm
deleted file mode 100644
index 38ef738768..0000000000
--- a/lib/tv/priv/more.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define more_width 16
-#define more_height 26
-static unsigned char more_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f,
- 0xe0, 0x3f, 0xc0, 0x1f, 0x80, 0x0f, 0x00, 0x07, 0x00, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/no_sort.xbm b/lib/tv/priv/no_sort.xbm
deleted file mode 100644
index 90568dd828..0000000000
--- a/lib/tv/priv/no_sort.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define no_sort_width 20
-#define no_sort_height 20
-static unsigned char no_sort_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,
- 0x20, 0x00, 0x02, 0x20, 0x00, 0x02, 0x20, 0x08, 0x02, 0x20, 0x08, 0x02,
- 0x20, 0x48, 0x02, 0x20, 0x48, 0x02, 0x20, 0x49, 0x02, 0x20, 0x49, 0x02,
- 0x20, 0x49, 0x02, 0x20, 0x49, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/open.xbm b/lib/tv/priv/open.xbm
deleted file mode 100644
index fe77d2c38b..0000000000
--- a/lib/tv/priv/open.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define open_width 20
-#define open_height 20
-static unsigned char open_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x05,
- 0xe0, 0x00, 0x06, 0xf0, 0x1f, 0x07, 0xf0, 0x3f, 0x00, 0xf0, 0x3f, 0x00,
- 0xf0, 0x3f, 0x00, 0xf0, 0xff, 0x03, 0xf0, 0x00, 0x01, 0x70, 0x80, 0x00,
- 0x30, 0x40, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/poll.xbm b/lib/tv/priv/poll.xbm
deleted file mode 100644
index 6ec1dbeaf2..0000000000
--- a/lib/tv/priv/poll.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define poll2_width 20
-#define poll2_height 20
-static unsigned char poll2_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xc0, 0x7f, 0x00, 0xe0, 0xff, 0x00,
- 0xe0, 0xf1, 0x00, 0xf0, 0xe0, 0x01, 0x70, 0xf8, 0x07, 0x70, 0xf0, 0x03,
- 0x70, 0xe0, 0x01, 0xf0, 0xc0, 0x00, 0xe0, 0x01, 0x00, 0xe0, 0x7f, 0x00,
- 0xc0, 0x3f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/search.xbm b/lib/tv/priv/search.xbm
deleted file mode 100644
index 3498e66b0d..0000000000
--- a/lib/tv/priv/search.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define search2_width 20
-#define search2_height 20
-static unsigned char search2_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0xe1, 0x00, 0xc0, 0xe1, 0x00, 0xe0, 0xf3, 0x01, 0x20, 0x93, 0x01,
- 0xf0, 0xff, 0x03, 0xe8, 0xdd, 0x07, 0xe8, 0xdd, 0x07, 0xe8, 0xdd, 0x07,
- 0xe8, 0xdd, 0x07, 0xe8, 0xdf, 0x07, 0xe8, 0xd3, 0x07, 0xf8, 0xf3, 0x07,
- 0xe8, 0x40, 0x07, 0xe8, 0x40, 0x07, 0xf8, 0xc0, 0x07, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/sort.xbm b/lib/tv/priv/sort.xbm
deleted file mode 100644
index 576564b817..0000000000
--- a/lib/tv/priv/sort.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define sort_width 20
-#define sort_height 20
-static unsigned char sort_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,
- 0x00, 0x40, 0x02, 0x00, 0x40, 0x02, 0x00, 0x48, 0x02, 0x00, 0x48, 0x02,
- 0x00, 0x49, 0x02, 0x00, 0x49, 0x02, 0x20, 0x49, 0x02, 0x20, 0x49, 0x02,
- 0x20, 0x49, 0x02, 0x20, 0x49, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/sort_reverse.xbm b/lib/tv/priv/sort_reverse.xbm
deleted file mode 100644
index b58e6308f5..0000000000
--- a/lib/tv/priv/sort_reverse.xbm
+++ /dev/null
@@ -1,8 +0,0 @@
-#define sort_reverse_width 20
-#define sort_reverse_height 20
-static unsigned char sort_reverse_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x20, 0x01, 0x00, 0x20, 0x01, 0x00, 0x20, 0x09, 0x00, 0x20, 0x09, 0x00,
- 0x20, 0x49, 0x00, 0x20, 0x49, 0x00, 0x20, 0x49, 0x02, 0x20, 0x49, 0x02,
- 0x20, 0x49, 0x02, 0x20, 0x49, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/lib/tv/priv/tv.gif b/lib/tv/priv/tv.gif
deleted file mode 100644
index 44daac2912..0000000000
--- a/lib/tv/priv/tv.gif
+++ /dev/null
Binary files differ
diff --git a/lib/tv/priv/tv.tool b/lib/tv/priv/tv.tool
deleted file mode 100644
index 770424d283..0000000000
--- a/lib/tv/priv/tv.tool
+++ /dev/null
@@ -1,23 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-{version,"0.1"}.
-{{tool,"Table Visualizer"},
- {start,{tv,start,[]}},
- {icon,"tv.gif"},
- {message,"The Table Visualizer"},
- {html,"../doc/html/index.html"}}.
diff --git a/lib/tv/src/tv.app.src b/lib/tv/src/tv.app.src
deleted file mode 100644
index e76c587868..0000000000
--- a/lib/tv/src/tv.app.src
+++ /dev/null
@@ -1,56 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-{application, tv,
- [{description, "tv Table Visualizer"},
- {vsn, "%VSN%"},
- {modules, [tv,
- tv_comm_func,
- tv_db,
- tv_db_search,
- tv_db_sort,
- tv_ets_rpc,
- tv_etsread,
- tv_info,
- tv_io_lib,
- tv_io_lib_format,
- tv_io_lib_pretty,
- tv_ip,
- tv_main,
- tv_mnesia_rpc,
- tv_new_table,
- tv_nodewin,
- tv_pb,
- tv_pb_funcs,
- tv_pc,
- tv_pc_graph_ctrl,
- tv_pc_menu_handling,
- tv_pd,
- tv_pd_display,
- tv_pd_frames,
- tv_pd_scale,
- tv_pg,
- tv_pg_gridfcns,
- tv_poll_dialog,
- tv_pw,
- tv_pw_window,
- tv_rec_edit,
- tv_table_owner,
- tv_utils
- ]},
- {registered,[tv_table_owner]},
- {applications, [kernel, stdlib, gs]}]}.
diff --git a/lib/tv/src/tv.erl b/lib/tv/src/tv.erl
deleted file mode 100644
index 70bc945c63..0000000000
--- a/lib/tv/src/tv.erl
+++ /dev/null
@@ -1,38 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv).
-
--export([start/0,
- start_browser/6]).
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-start() ->
- tv_main:start().
-
-
-start_browser(Node, LocalNode, TableId, KindOfTable, TableName, ErrMsgMode) ->
- spawn_link(tv_pc, pc, [self(), Node, LocalNode, TableId, KindOfTable, TableName, ErrMsgMode]).
-
-
-
-
-
diff --git a/lib/tv/src/tv_comm_func.erl b/lib/tv/src/tv_comm_func.erl
deleted file mode 100644
index d57960e303..0000000000
--- a/lib/tv/src/tv_comm_func.erl
+++ /dev/null
@@ -1,77 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_comm_func).
-
-
-
-
--export([max/2,
- min/2
- ]).
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-max(X, Y) when X > Y ->
- X;
-max(_X, Y) ->
- Y.
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-min(X, Y) when X < Y ->
- X;
-min(_X, Y) ->
- Y.
-
-
-
diff --git a/lib/tv/src/tv_db.erl b/lib/tv/src/tv_db.erl
deleted file mode 100644
index 75537418b3..0000000000
--- a/lib/tv/src/tv_db.erl
+++ /dev/null
@@ -1,1271 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Module handling the internal database in the table tool.
-%%%
-%%%*********************************************************************
-
--module(tv_db).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([dbs/2]).
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_db_int_def.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-dbs(Master, ErrMsgMode) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrMsgMode),
- ProcVars = #process_variables{master_pid = Master},
- blocked(ProcVars).
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-blocked(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- #dbs_deblock{} ->
- deblock(Msg, ProcVars, false);
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- blocked(ProcVars);
-
- {'EXIT', Pid, Reason} ->
- MasterPid = ProcVars#process_variables.master_pid,
- exit_signals({Pid, Reason}, MasterPid),
- blocked(ProcVars);
-
- _Other ->
- blocked(ProcVars)
- end
- end.
-
-
-
-
-
-
-
-deblock(Msg, ProcVars, SearchWinCreated) ->
- #dbs_deblock{sender = Sender,
- etsread_pid = EtsreadPid,
- type = Type,
- keypos = KeyPos,
- sublist_length = SublistLength} = Msg,
-
- NewDbData = #db_data{subset_size = SublistLength,
- subset_pos = 1,
- key_no = KeyPos,
- ets_type = Type
- },
- NewProcVars = ProcVars#process_variables{db_data = NewDbData,
- etsread_pid = EtsreadPid},
- Sender ! #dbs_deblock_cfm{sender = self()},
- deblocked_loop(NewProcVars, SearchWinCreated, [], undefined).
-
-
-
-
-
-
-
-
-deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp) ->
- receive
- Msg ->
- case Msg of
-
- {gs,entry,keypress,_Data,['Return' | _T]} ->
- NewSearchData = search_object(ProcVars, RegExp),
- deblocked_loop(ProcVars, SearchWinCreated, NewSearchData, RegExp);
-
- {gs,entry,keypress,_Data,['Tab' | _T]} ->
- gs:config(entry, [{select, {0,1000}}]),
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp);
-
- {gs,entry,keypress,_Data,_Args} ->
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp);
-
- {gs,expr_term,click,_Data,_Args} ->
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, false);
-
- {gs,expr_regexp,click,_Data,_Args} ->
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, true);
-
- {gs,search,click,_Data,_Args} ->
- NewSearchData = search_object(ProcVars, RegExp),
- deblocked_loop(ProcVars, SearchWinCreated, NewSearchData, RegExp);
-
- {gs,cancel,click,cancel,_Args} ->
- tv_db_search:destroy_window(SearchWinCreated),
- deblocked_loop(ProcVars, false, [], RegExp);
-
- {gs,listbox,click,_LbData,[Idx | _T]} when SearchData =/= [] ->
- tv_db_search:mark_busy(SearchWinCreated),
- {Row,_Obj} = lists:nth(Idx+1, SearchData),
- DbData = ProcVars#process_variables.db_data,
- %% Never allow 'subset_pos' to have zero as value!
- %% No list can begin with the 0:th element!!!
- %% Has to be at least 1!
- NewDbData = DbData#db_data{subset_pos=?COMM_FUNC_FILE:max(1,
- Row),
- subset_size=?ITEMS_TO_DISPLAY},
- NewProcVars = ProcVars#process_variables{db_data=NewDbData},
- send_subset(NewProcVars, undefined, undefined),
- tv_db_search:mark_nonbusy(SearchWinCreated),
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- {gs,win,configure,_Data,_Args} ->
- tv_db_search:resize_window(SearchWinCreated),
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp);
-
- {gs,win,destroy,_Data,_Args} ->
- deblocked_loop(ProcVars, false, [], RegExp);
-
-
- #dbs_new_data{data = NewData, keys = ListOfKeys,
- time_to_read_table = ElapsedTimeEtsread} ->
- tv_db_search:reset_window(SearchWinCreated),
- T1 = time(),
- NewProcVars = update_db(NewData, ListOfKeys, ProcVars),
- T2 = time(),
- ElapsedTimeDbs = compute_elapsed_seconds(T1, T2),
- send_subset(NewProcVars, ElapsedTimeEtsread, ElapsedTimeDbs),
- deblocked_loop(NewProcVars, SearchWinCreated, [], RegExp);
-
- #dbs_subset_req{subset_pos = Pos,subset_length = Length} ->
- DbData = ProcVars#process_variables.db_data,
- %% Never allow 'subset_pos' to have zero as value!
- %% No list can begin with the 0:th element!!!
- %% Has to be at least 1!
- NewDbData = DbData#db_data{subset_pos=?COMM_FUNC_FILE:max(1,
- Pos),
- subset_size=Length},
- NewProcVars = ProcVars#process_variables{db_data = NewDbData},
- send_subset(NewProcVars, undefined, undefined),
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- #dbs_marked_row{row_no = RowNo} ->
- DbData = ProcVars#process_variables.db_data,
- NewDbData = DbData#db_data{requested_row = RowNo},
- NewProcVars = ProcVars#process_variables{db_data = NewDbData},
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- #dbs_search_req{} ->
- tv_db_search:create_window(SearchWinCreated),
- deblocked_loop(ProcVars, true, SearchData, false);
-
- #dbs_sorting_mode{} ->
- {NewProcVars, NewSearchData} =
- update_sorting_mode(Msg, ProcVars,
- SearchWinCreated, SearchData, RegExp),
- deblocked_loop(NewProcVars, SearchWinCreated, NewSearchData, RegExp);
-
- #dbs_deblock{} ->
- tv_db_search:reset_window(SearchWinCreated),
- deblock(Msg, ProcVars, SearchWinCreated);
-
- #dbs_updated_object{object=Obj,old_object=OldObj,old_color=Color,obj_no=ObjNo} ->
- {Success, NewProcVars} = update_object(Obj, OldObj, Color, ObjNo, ProcVars),
- case Success of
- true ->
- tv_db_search:reset_window(SearchWinCreated),
- send_subset(NewProcVars, undefined, undefined);
- false ->
- done
- end,
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- #dbs_new_object{object=Obj} ->
- {Success, NewProcVars} = new_object(Obj, ProcVars),
- case Success of
- true ->
- tv_db_search:reset_window(SearchWinCreated),
- send_subset(NewProcVars, undefined, undefined);
- false ->
- done
- end,
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- #dbs_delete_object{object=Obj, color=Color, obj_no=ObjNo} ->
- {Success, NewProcVars} = delete_object(Obj, Color, ObjNo, ProcVars),
- case Success of
- true ->
- tv_db_search:reset_window(SearchWinCreated),
- send_subset(NewProcVars, undefined, undefined);
- false ->
- done
- end,
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- #pc_list_info{lists_as_strings=ListAsStr} ->
- NewProcVars = ProcVars#process_variables{lists_as_strings=ListAsStr},
- deblocked_loop(NewProcVars, SearchWinCreated, SearchData, RegExp);
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp);
-
- {'EXIT', Pid, Reason} ->
- MasterPid = ProcVars#process_variables.master_pid,
- exit_signals({Pid, Reason}, MasterPid),
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp);
-
- _Other ->
- %% io:format("Received message: ~w ~n", [_Other]),
- deblocked_loop(ProcVars, SearchWinCreated, SearchData, RegExp)
- end
- end.
-
-
-
-
-
-
-
-search_object(ProcVars, RegExp) ->
- DbData = ProcVars#process_variables.db_data,
- DbList = dblist2list(DbData#db_data.db),
- ListAsStr = ProcVars#process_variables.lists_as_strings,
- case catch tv_db_search:get_input_and_search(DbList, RegExp, ListAsStr) of
- {'EXIT', _Reason} ->
- tv_db_search:reset_window(true),
- [];
- List ->
- List
- end.
-
-
-
-
-
-
-update_sorting_mode(Msg, ProcVars, SearchWinCreated, OldSearchData, RegExp) ->
- #dbs_sorting_mode{sorting = Sorting,
- reverse = Reverse,
- sort_key_no = SortKeyNo} = Msg,
-
- DbData = ProcVars#process_variables.db_data,
-
- #db_data{db = DbList,
- sorting = OldSorting,
- rev_sorting = OldReverse,
- sort_key_no = OldSortKeyNo} = DbData,
-
-
- NewDbList = sort_db_list(DbList, Sorting, OldSorting, Reverse, OldReverse,
- SortKeyNo, OldSortKeyNo),
-
- NewDbData = DbData#db_data{db = NewDbList,
- sorting = Sorting,
- rev_sorting = Reverse,
- sort_key_no = SortKeyNo
- },
-
- NewProcVars = ProcVars#process_variables{db_data = NewDbData},
- send_subset(NewProcVars, undefined, undefined),
-
- SearchData =
- case Sorting of
- false ->
- OldSearchData;
- OldSorting when Reverse =:= OldReverse,
- SortKeyNo =:= OldSortKeyNo ->
- [];
- OldSorting when Reverse =:= OldReverse,
- OldSortKeyNo =:= undefined->
- [];
- _Other ->
- ListAsStr = ProcVars#process_variables.lists_as_strings,
- case catch tv_db_search:update_search(SearchWinCreated,
- NewDbList, RegExp,
- ListAsStr) of
- {'EXIT', _Reason} ->
- tv_db_search:reset_window(true),
- [];
- List ->
- List
- end
- end,
-
- {NewProcVars, SearchData}.
-
-
-
-
-
-
-
-
-sort_db_list(DbList, Sort, Sort, Rev, Rev, KeyNo, KeyNo) ->
- % Already sorted!
- DbList;
-sort_db_list(DbList, false, _OldSort, _Rev, _OldRev, _KeyNo, _OldKeyNo) ->
- % No sorting, i.e., the old list order suffices!
- DbList;
-sort_db_list(DbList, _Sort, _OldSort, Rev, _OldRev, KeyNo, _OldKeyNo) ->
- tv_db_sort:mergesort(KeyNo, DbList, Rev).
-
-
-
-
-
-
-
-send_subset(ProcVars, EtsreadTime, DbsTime) ->
- #process_variables{master_pid = MasterPid,
- db_data = DbData,
- list_of_keys = ListOfKeys} = ProcVars,
-
- #db_data{subset_size = SubsetSize,
- subset_pos = SubsetPos,
- requested_row = RowNo,
- db_size = DbSize,
- db = DbList,
- max_elem_size = MaxElemSize} = DbData,
-
-
- RowData = get_requested_row_data(RowNo, DbList),
-
- if
- DbSize > 0 ->
- Pos = ?COMM_FUNC_FILE:min(SubsetPos, DbSize),
- % Requested_data may be shorter than requested, but that's OK,
- % pd handles that correctly!
- Subset = lists:sublist(DbList, Pos, SubsetSize),
- MasterPid ! #dbs_subset{sender = self(),
- data = Subset,
- subset_pos = Pos,
- db_length = DbSize,
- list_of_keys = ListOfKeys,
- max_elem_size = MaxElemSize,
- requested_row = RowData,
- required_time_etsread = EtsreadTime,
- required_time_dbs = DbsTime
- };
- true ->
- MasterPid ! #dbs_subset{sender = self(),
- data = [],
- subset_pos = 1,
- db_length = 0,
- list_of_keys = ListOfKeys,
- max_elem_size = MaxElemSize,
- requested_row = RowData,
- required_time_etsread = EtsreadTime,
- required_time_dbs = DbsTime
- }
- end.
-
-
-
-
-
-get_requested_row_data(undefined, _DbList) ->
- [];
-get_requested_row_data(_RowNo, []) ->
- [];
-get_requested_row_data(RowNo, DbList) ->
- case catch lists:nth(RowNo, DbList) of
- {'EXIT', _Reason} ->
- [];
- RowData ->
- [RowData]
- end.
-
-
-
-
-exit_signals(ExitInfo, MasterPid) ->
- case ExitInfo of
- {MasterPid, _Reason} ->
- % When from master, just quit!
- exit(normal);
- _Other ->
- done
- end.
-
-
-
-
-update_db(NewList, ListOfKeys, ProcVars) ->
- DbData = ProcVars#process_variables.db_data,
- #db_data{db = OldDbList,
- max_elem_size = MaxElemSize,
- deleted = DelList,
- ets_type = EtsType,
- sorting = Sorting,
- rev_sorting = RevSorting,
- sort_key_no = SortKeyNo,
- key_no = KeyNo} = DbData,
-
- DbList = update_colors(OldDbList -- DelList),
- OldList = dblist2list(DbList),
- InsOrUpd = (NewList -- OldList),
- DelOrUpd = (OldList -- NewList),
-
- {Inserted, Deleted, Updated} = group_difflists(basetype(EtsType), KeyNo,
- InsOrUpd,
- DelOrUpd),
- DelMarked = mark_deleted(KeyNo, Deleted, DbList),
- Replaced = replace_elements(KeyNo, Updated, DelMarked),
- NewDbList = add_elements(KeyNo, Inserted, Replaced, Sorting, RevSorting,
- SortKeyNo),
-
- NewMaxSize = ?COMM_FUNC_FILE:max(MaxElemSize,
- ?COMM_FUNC_FILE:max(max_size(Replaced),
- max_size(Inserted))),
-
- NewDbData = DbData#db_data{db = NewDbList,
- db_size = length(NewDbList),
- max_elem_size = NewMaxSize,
- deleted = list2dblist(Deleted, ?BLACK)
- },
-
- ProcVars#process_variables{db_data = NewDbData,
- list_of_keys = ListOfKeys
- }.
-
-
-
-
-
-
-update_object(Obj, OldObj, OldColor, ObjNo, ProcVars) ->
- #process_variables{db_data = DbData,
- etsread_pid = EtsreadPid} = ProcVars,
-
- #db_data{key_no = KeyNo} = DbData,
-
- %% Don't update if there are no changes!
- case OldObj of
- Obj when OldColor =/= ?BLACK -> %% Allow deleted objects to be inserted!
- gs:window(dbwin, gs:start(), []),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(dbwin, "TV Notification", ["The object is unchanged!"]);
- haiku ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Stay the patient course,",
- "Of little worth is your ire:",
- "The object's unchanged." ])
- end,
- gs:destroy(dbwin),
- {false, ProcVars};
- _Other ->
- %% Before we try to update the internal database, we have to check to see
- %% whether the ETS/Mnesia update is allowed!
- Result =
- case OldColor of
- ?BLACK ->
- EtsreadPid ! #etsread_new_object{sender = self(),
- object = Obj},
- receive
- #etsread_new_object_cfm{success = Success} ->
- Success
- after
- 60000 ->
- exit(etsread_not_responding)
- end;
- _OtherColor ->
- EtsreadPid ! #etsread_update_object{sender = self(),
- key_no = KeyNo,
- object = Obj,
- old_object = OldObj},
- receive
- #etsread_update_object_cfm{success = Success} ->
- Success
- after
- 60000 ->
- exit(etsread_not_responding)
- end
- end,
- case Result of
- false ->
- gs:window(dbwin, gs:start(), [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Couldn't update table!"]);
- haiku ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Three things are certain:",
- "Death, taxes, and lost updates.",
- "Guess which has occurred."])
- end,
- gs:destroy(dbwin),
- {false, ProcVars};
- true ->
- {true, update_object2(Obj, OldObj, OldColor, ObjNo, ProcVars)}
- end
- end.
-
-
-
-
-
-update_object2(Obj, OldObj, OldColor, ObjNo, ProcVars) ->
- #process_variables{db_data = DbData} = ProcVars,
-
- #db_data{db = DbList,
- ets_type = EtsType, %% 'bag', 'set', 'ordered_set' or
- %% 'duplicate_bag'
- max_elem_size = MaxElemSize,
- sorting = Sorting,
- rev_sorting = RevSorting,
- sort_key_no = SortKeyNo,
- key_no = KeyNo} = DbData,
-
- %% Replace the old element...
- Key = element(KeyNo, Obj),
- OldKey = element(KeyNo, OldObj),
- %% If Key == OldKey, the old object shall only be replaced!
- %% Otherwise the updated object shall be treated as a new
- %% object when inserting it in the list!
- %% In that latter case, we also have to check for duplicates!
-
- Fun =
- case basetype(EtsType) of
- set ->
- case Key of
- OldKey ->
- fun({Data,Color}, {Replaced,AccDb}) when element(KeyNo,Data) =/= Key ->
- {Replaced, [{Data,Color} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,?GREEN1} | AccDb]};
- ({_Data,_Color}, {Replaced,AccDb}) ->
- {Replaced, AccDb}
- end;
- _NewKey ->
- fun({Data,Color}, {Replaced,AccDb}) ->
- ElemKey = element(KeyNo,Data),
- case ElemKey of
- OldKey when not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- OldKey when not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,?GREEN1} | AccDb]};
- OldKey ->
- {Replaced, AccDb};
- Key ->
- {Replaced, AccDb};
- _OtherKey ->
- {Replaced, [{Data,Color} | AccDb]}
- end
- end
- end;
-
- bag ->
- case Key of
- OldKey ->
- fun({Data,_Color}, {Replaced,AccDb}) when Data =:= Obj ->
- {Replaced, AccDb};
- ({Data,Color}, {Replaced,AccDb}) when Data =/= OldObj ->
- {Replaced, [{Data,Color} | AccDb]};
- %% Clauses when Data =:= OldObj.
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,Color} | AccDb]};
- ({_Data,_Color}, {Replaced,AccDb}) ->
- {Replaced, AccDb}
- end;
- _NewKey ->
- fun({Data,Color}, {Replaced,AccDb}) when Data =:= OldObj,
- not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when Data =:= OldObj,
- not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,?GREEN1} | AccDb]};
- ({Data,_Color}, {Replaced,AccDb}) when Data =:= OldObj ->
- {Replaced, AccDb};
- ({Data,_Color}, {Replaced,AccDb}) when Data =:= Obj ->
- {Replaced, AccDb};
- ({Data,Color}, {Replaced,AccDb}) ->
- {Replaced, [{Data,Color} | AccDb]}
- end
- end;
-
- duplicate_bag ->
- %% Multiple identical objects allowed, meaning that we shall not
- %% remove anything, just replace one element.
- case Key of
- OldKey ->
- fun({Data,Color}, {Replaced,AccDb}) when Data =:= Obj ->
- {Replaced, [{Data,Color} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when Data =/= OldObj ->
- {Replaced, [{Data,Color} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,Color} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) ->
- {Replaced, [{Data,Color} | AccDb]}
- end;
- _NewKey ->
- fun({Data,Color}, {Replaced,AccDb}) when Data =:= OldObj,
- not Replaced,
- OldColor =:= ?BLACK,
- Color =:= ?BLACK ->
- {true, [{Obj,?RED1} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when Data =:= OldObj,
- not Replaced,
- OldColor =/= ?BLACK,
- Color =/= ?BLACK ->
- {true, [{Obj,?GREEN1} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when Data =:= OldObj ->
- {Replaced, [{Data,Color} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when Data =:= Obj ->
- {Replaced, [{Data,Color} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) ->
- {Replaced, [{Data,Color} | AccDb]}
- end
- end
- end,
-
- FilterFun = fun(Acc0, L) ->
- lists:foldl(Fun, Acc0, L)
- end,
-
-
- {Repl, TmpList} =
- case split(ObjNo, DbList) of
- {L1, [{OldObj,OldColor} | T]} when OldColor =/= ?BLACK ->
- {true,
- lists:reverse(element(2, FilterFun({true,[]}, L1))) ++
- [{Obj,?GREEN1} | lists:reverse(element(2, FilterFun({true,[]},T)))]};
- {L1, [{OldObj,OldColor} | T]} ->
- {true,
- lists:reverse(element(2, FilterFun({true,[]}, L1))) ++
- [{Obj,?RED1} | lists:reverse(element(2, FilterFun({true,[]}, T)))]};
- {L1, L2} ->
- {R1, NewL1} = FilterFun({false,[]}, L1),
- {R2, NewL2} = FilterFun({false,[]}, L2),
- {R1 or R2, lists:reverse(NewL1) ++ lists:reverse(NewL2)}
- end,
-
- NewDbList =
- case Repl of
- true when not Sorting ->
- TmpList;
- true ->
- tv_db_sort:mergesort(SortKeyNo, TmpList, RevSorting);
- false ->
- TmpList2 =
- case Key of
- OldKey ->
- lists:reverse(element(2, FilterFun({false,[]}, TmpList)));
- _OtherKey ->
- lists:reverse(element(2, FilterFun({true,[]}, TmpList))) ++
- [{Obj,?RED1}]
- end,
- case Sorting of
- false ->
- TmpList2;
- true ->
- tv_db_sort:mergesort(SortKeyNo, TmpList2, RevSorting)
- end
- end,
- NewMaxSize = ?COMM_FUNC_FILE:max(MaxElemSize, max_size([Obj])),
- NewDbData = DbData#db_data{db = NewDbList,
- db_size = length(NewDbList),
- max_elem_size = NewMaxSize
- },
- ProcVars#process_variables{db_data = NewDbData}.
-
-
-
-
-
-delete_object(_Obj, ?BLACK, _ObjNo, ProcVars) ->
- %% Don't delete already deleted objects!!!
- {false, ProcVars};
-delete_object(undefined, undefined, _ObjNo, ProcVars) ->
- {false, ProcVars};
-delete_object(Obj, _ObjColor, ObjNo, ProcVars) ->
- #process_variables{db_data = DbData,
- etsread_pid = EtsreadPid} = ProcVars,
-
- #db_data{db = DbList,
- deleted = OldDeleted} = DbData,
-
- %% Before we try to update the internal database, we have to check to see
- %% whether the ETS/Mnesia update is allowed!
- EtsreadPid ! #etsread_delete_object{sender = self(),
- object = Obj},
- Result =
- receive
- #etsread_delete_object_cfm{success = Success} ->
- Success
- after
- 60000 ->
- exit(etsread_not_responding)
- end,
-
- case Result of
- false ->
- gs:window(dbwin, gs:start(), [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Couldn't update table!"]);
- haiku ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Three things are certain:",
- "Death, taxes, and lost updates.",
- "Guess which has occurred."])
- end,
- gs:destroy(dbwin),
- {false, ProcVars};
- true ->
- %% Replace the old element...
- %% Have to beware of duplicate_bag tables,
- %% i.e., the same object may occur more than
- %% once, but we only want to remove it once!
- {Repl, TmpList} =
- case split(ObjNo, DbList) of
- {L1, [{Obj,_Color} | T]} ->
- {true, L1 ++ [{Obj,?BLACK} | T]};
- {L1, L2} ->
- {false, L1 ++ L2}
- end,
- NewDbList =
- case Repl of
- true ->
- TmpList;
- false ->
- Fun = fun({Data,TmpColor},
- {Removed,AccDb}) when Data =/= Obj ->
- {Removed, [{Data,TmpColor} | AccDb]};
- ({_Data,TmpColor},
- {Removed,AccDb}) when not Removed, TmpColor =/= ?BLACK ->
- {true, [{Obj,?BLACK} | AccDb]};
- ({Data,TmpColor},
- {Removed,AccDb}) ->
- {Removed, [{Data,TmpColor} | AccDb]}
- end,
- lists:reverse(element(2, lists:foldl(Fun, {false,[]}, DbList)))
- end,
- NewDbData = DbData#db_data{db = NewDbList,
- db_size = length(NewDbList),
- deleted = [{Obj,?BLACK} | OldDeleted]},
- {true, ProcVars#process_variables{db_data = NewDbData}}
- end.
-
-
-
-
-
-new_object(Obj, ProcVars) ->
- #process_variables{db_data = DbData,
- etsread_pid = EtsreadPid} = ProcVars,
-
- #db_data{db = DbList,
- max_elem_size = MaxElemSize,
- ets_type = EtsType, %% 'bag', 'set' or 'duplicate_bag'
- sorting = Sorting,
- rev_sorting = RevSorting,
- sort_key_no = SortKeyNo,
- key_no = KeyNo} = DbData,
-
- %% Before we try to update the internal database, we have to check to see
- %% whether the ETS/Mnesia update is allowed!
- EtsreadPid ! #etsread_new_object{sender = self(),
- object = Obj},
- Result =
- receive
- #etsread_new_object_cfm{success = Success} ->
- Success
- after
- 60000 ->
- exit(etsread_not_responding)
- end,
-
- case Result of
- false ->
- gs:window(dbwin, gs:start(), [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Couldn't update table!"]);
- haiku ->
- tv_utils:notify(dbwin, "TV Notification",
- ["Three things are certain:",
- "Death, taxes, and lost updates.",
- "Guess which has occurred."])
- end,
- gs:destroy(dbwin),
- {false, ProcVars};
- true ->
- Key = element(KeyNo, Obj),
- NewDbList = insert_new_object(EtsType, Key, KeyNo, Obj, DbList, Sorting,
- RevSorting, SortKeyNo),
- NewMaxSize = ?COMM_FUNC_FILE:max(MaxElemSize, max_size([Obj])),
- NewDbData = DbData#db_data{db = NewDbList,
- db_size = length(NewDbList),
- max_elem_size = NewMaxSize
- },
- {true, ProcVars#process_variables{db_data = NewDbData}}
- end.
-
-
-
-
-
-insert_new_object(EtsType,Key,KeyNo,Obj,DbList,Sorting,RevSorting,SortKeyNo) ->
- %% Remove elements from the list that ought not to be there,
- %% according to the table type!
-
- Fun =
- case basetype(EtsType) of
- set ->
- fun({Data,Color}, {Replaced,AccDb}) when element(KeyNo,Data) =/= Key ->
- {Replaced, [{Data,Color} | AccDb]};
- ({Data,Color}, {Replaced,AccDb}) when not Replaced,
- Color =/= ?BLACK,
- Data =/= Obj->
- {true, [{Obj,?GREEN1} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- Color =/= ?BLACK ->
- {true, [{Obj,Color} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- Color =:= ?BLACK ->
- {true, [{Obj, ?RED1} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when Replaced,
- Color =:= ?BLACK ->
- {false, AccDb};
- ({_Data,_Color}, {Replaced,AccDb}) ->
- {Replaced, AccDb}
- end;
- bag ->
- fun({Data,Color}, {Replaced,AccDb}) when Data =/= Obj ->
- {Replaced, [{Data,Color} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- Color =/= ?BLACK ->
- {true, [{Obj,Color} | AccDb]};
- ({_Data,Color}, {Replaced,AccDb}) when Replaced,
- Color =/= ?BLACK ->
- {true, AccDb};
- ({_Data,Color}, {Replaced,AccDb}) when Replaced,
- Color =:= ?BLACK ->
- {true, AccDb};
- ({_Data,Color}, {Replaced,AccDb}) when not Replaced,
- Color =:= ?BLACK ->
- {true, [{Obj, ?RED1} | AccDb]};
- ({_Data,_Color}, {Replaced,AccDb}) ->
- {Replaced, AccDb}
- end;
- duplicate_bag ->
- %% The fun is never called if the type is duplicate_bag,
- %% because all we have to do with new elements is to insert
- %% them (multiple identical objects allowed).
- not_used
- end,
-
- FilterFun = fun(Acc0, L) ->
- lists:foldl(Fun, Acc0, L)
- end,
-
- {_Replaced, TmpDbList} =
- case EtsType of
- duplicate_bag ->
- {false, DbList};
- _OtherType ->
- {R,L} = FilterFun({false,[]}, DbList),
- {R, lists:reverse(L)}
- end,
-
- case Sorting of
- false ->
- TmpDbList ++ [{Obj,?RED1}];
- true ->
- %% The original list is already sorted!
- %% Just merge the two lists together!
- tv_db_sort:merge(SortKeyNo, TmpDbList, [{Obj,?RED1}], RevSorting)
- end.
-
-
-
-
-
-
-max_size([]) ->
- 0;
-max_size(L) ->
- max_size(L, 0).
-
-
-
-max_size([], CurrMax) ->
- CurrMax;
-max_size([H | T], CurrMax) when is_tuple(H) ->
- Size = size(H),
- if
- Size >= CurrMax ->
- max_size(T, Size);
- true ->
- max_size(T, CurrMax)
- end;
-max_size([_H | T], CurrMax) ->
- Size = 1,
- if
- Size >= CurrMax ->
- max_size(T, Size);
- true ->
- max_size(T, CurrMax)
- end.
-
-
-
-
-
-add_elements(_KeyNo, Inserted, List, false, _RevSorting, _SortKeyNo) ->
- % Remember that the order of the original list has to be preserved!
- List ++ list2dblist(Inserted, ?RED1);
-add_elements(_KeyNo, Inserted, List, _Sorting, RevSorting, SortKeyNo) ->
- % The original list is already sorted - sort the new elements, and
- % just merge the two lists together!
- SortedInsertedList = tv_db_sort:mergesort(SortKeyNo,
- list2dblist(Inserted, ?RED1),
- RevSorting),
- tv_db_sort:merge(SortKeyNo, List, SortedInsertedList, RevSorting).
-
-
-
-
-
- %% We assume the list already has been sorted, i.e., since the order won't
- %% be changed by marking an element deleted, we DON'T have to sort the list
- %% once again!
-
-mark_deleted(_KeyNo, [], List) ->
- List;
-mark_deleted(KeyNo, [Data | T], List) ->
- KeyValue = tv_db_sort:get_compare_value(KeyNo, Data),
- NewList = mark_one_element_deleted(KeyNo, KeyValue, Data, List, []),
- mark_deleted(KeyNo, T, NewList).
-
-
-
-
-
-
-
-
-mark_one_element_deleted(_KeyNo, _KeyValue, _Data, [], Acc) ->
- Acc;
-mark_one_element_deleted(KeyNo, {tuple, KeyValue},
- Data, [{DataTuple, Color} | Tail], Acc) ->
- OldKeyValue = tv_db_sort:get_compare_value(KeyNo, DataTuple),
- % Remember that the order of the original list has to be preserved!
- if
- OldKeyValue =:= {tuple, KeyValue} ->
- Acc ++ [{Data, ?BLACK}] ++ Tail;
- true ->
- mark_one_element_deleted(KeyNo, {tuple, KeyValue}, Data, Tail,
- Acc ++ [{DataTuple, Color}])
- end;
-mark_one_element_deleted(KeyNo, _KeyValue, Data, [{DataTuple, Color} | Tail], Acc) ->
- if
- Data =:= DataTuple ->
- Acc ++ [{Data, ?BLACK}] ++ Tail;
- true ->
- mark_one_element_deleted(KeyNo, _KeyValue, Data, Tail,
- Acc ++ [{DataTuple, Color}])
- end.
-
-
-
-
-
-
-
- %% We assume the list already has been sorted, i.e., since the order won't
- %% be changed by marking an element updated, we DON'T have to sort the list
- %% once again!
-
-replace_elements(_KeyNo, [], List) ->
- List;
-replace_elements(KeyNo, [Data | T], List) ->
- KeyValue = tv_db_sort:get_compare_value(KeyNo, Data),
- NewList = replace_one_element(KeyNo, KeyValue, Data, List, []),
- replace_elements(KeyNo, T, NewList).
-
-
-
-
-
-
-
-replace_one_element(_KeyNo, _Key, _Data, [], Acc) ->
- Acc;
-replace_one_element(KeyNo, {tuple, Key1}, Data, [{DataTuple, Color} | Tail], Acc) ->
- Key2 = tv_db_sort:get_compare_value(KeyNo, DataTuple),
- % Remember that the order of the original list has to be preserved!
- if
- Key2 =:= {tuple, Key1} ->
- Acc ++ [{Data, ?GREEN1}] ++ Tail;
- true ->
- replace_one_element(KeyNo, {tuple, Key1}, Data, Tail,
- Acc ++ [{DataTuple, Color}])
- end;
-replace_one_element(_KeyNo, _KeyValue, _Data, [{DataTuple, Color} | Tail], Acc) ->
- % Can't replace an element with no key!
- Acc ++ [{DataTuple, Color} | Tail].
-
-
-
-
-
-
-
-
-group_difflists(bag, _KeyNo, Inserted, Deleted) ->
- %% Since the ETS table is of bag type, no element can be updated, i.e.,
- %% it can only be deleted and re-inserted, otherwise a new element will be added.
- {Inserted, Deleted, []};
-group_difflists(duplicate_bag, _KeyNo, Inserted, Deleted) ->
- %% Since the ETS table is of duplicate_bag type, no element can be updated, i.e.,
- %% it can only be deleted and re-inserted, otherwise a new element will be added.
- {Inserted, Deleted, []};
-group_difflists(set, _KeyNo, [], Deleted) ->
- %% Updated elements have to be present in both lists, i.e., if one list is empty,
- %% the other contains no updated elements - they are either inserted or deleted!
- {[], Deleted, []};
-group_difflists(set, _KeyNo, Inserted, []) ->
- {Inserted, [], []};
-group_difflists(set, KeyNo, InsOrUpd, DelOrUpd) ->
- match_difflists(KeyNo, InsOrUpd, DelOrUpd, [], []).
-
-
-
-
-
-
-match_difflists(_KeyNo, [], Deleted, Inserted, Updated) ->
- {Inserted, Deleted, Updated};
-match_difflists(KeyNo, [Data | T], DelOrUpd, InsAcc, UpdAcc) ->
- % This function is only called in case of a 'set' ETS table.
- % 'Set' type of ETS table means there are unique keys. If two elements in
- % InsOrUpd and DelOrUpd have the same key, that element has been updated,
- % and is added to the Updated list, and removed from the original two lists.
- % After the two lists have been traversed in this way, the remaining elements
- % in DelOrUpd forms the new Deleted list (analogous for InsOrUpd).
- % If we want to improve the performance, we could check which list is the
- % shortest, since the traversing time depends on this.
- Key = element(KeyNo, Data),
- case searchdelete(Key, KeyNo, DelOrUpd) of
- {true, NewDelOrUpd} ->
- match_difflists(KeyNo, T, NewDelOrUpd, InsAcc, [Data | UpdAcc]);
- {false, SameDelOrUpd} ->
- match_difflists(KeyNo, T, SameDelOrUpd, [Data | InsAcc], UpdAcc)
- end.
-
-
-
-
-searchdelete(_Key, _ElemNo, []) ->
- {false, []};
-searchdelete(Key, ElemNo, List) ->
- searchdelete(Key, ElemNo, List, []).
-
-
-
-
-
-searchdelete(_Key, _ElemNo, [], Acc) ->
- {false, Acc};
-searchdelete(Key, ElemNo, [Tuple | Tail], Acc) ->
- % We don't use standard libraries, 'cause we want to make an 'atomic'
- % operation, i.e., we will not search the list two times...
- case (element(ElemNo, Tuple) =:= Key) of
- true ->
- {true, Acc ++ Tail}; % Return the list without the matching element
- _Other ->
- searchdelete(Key, ElemNo, Tail, [Tuple | Acc])
- end.
-
-
-
-
-
-
-
-dblist2list([]) ->
- [];
-dblist2list([{Data, _Color} | T]) ->
- [Data | dblist2list(T)].
-
-
-
-
-
-
-
-list2dblist([], _Color) ->
- [];
-list2dblist([Data | T], Color) ->
- [{Data, Color} | list2dblist(T, Color)].
-
-
-
-
-
-
-
-
-update_colors([]) ->
- [];
-update_colors([{Data, Color} | T]) ->
- [{Data, new_color(Color)} | update_colors(T)].
-
-
-
-
-
-
-
-
-new_color(?GREEN1) ->
- ?GREEN2;
-new_color(?GREEN2) ->
- ?GREEN3;
-new_color(?GREEN3) ->
- ?GREEN4;
-new_color(?GREEN4) ->
- ?GREEN5;
-new_color(?GREEN5) ->
- ?DEFAULT_BTN_COLOR;
-new_color(?RED1) ->
- ?RED2;
-new_color(?RED2) ->
- ?RED3;
-new_color(?RED3) ->
- ?RED4;
-new_color(?RED4) ->
- ?RED5;
-new_color(?RED5) ->
- ?DEFAULT_BTN_COLOR;
-new_color(_Other) ->
- ?DEFAULT_BTN_COLOR. % Default shall be gray.
-
-
-
-
-
-
-
-
-compute_elapsed_seconds({H1, M1, S1}, {H2, M2, S2}) ->
- ElapsedHours = get_time_diff(hours, H1, H2),
- ElapsedMinutes = get_time_diff(minutes, M1, M2),
- ElapsedSeconds = get_time_diff(seconds, S1, S2),
- (ElapsedHours * 3600) + (ElapsedMinutes * 60) + ElapsedSeconds + 1.
-
-
-
-
-
-
-
-get_time_diff(_Type, T1, T2) when T1 =< T2 ->
- T2 - T1;
-get_time_diff(hours, T1, T2) ->
- T2 + 24 - T1;
-get_time_diff(minutes, T1, T2) ->
- T2 + 60 - T1;
-get_time_diff(seconds, T1, T2) ->
- T2 + 60 - T1.
-
-
-
-
-split(_N, []) ->
- {[], []};
-split(0, List) ->
- {[], List};
-split(N, List) ->
- split2(0, N - 1, [], List).
-
-
-
-split2(Ctr, N, Acc, [H | T]) when Ctr < N ->
- split2(Ctr + 1, N, [H | Acc], T);
-split2(_Ctr, _N, Acc, []) ->
- {lists:reverse(Acc), []};
-split2(_Ctr, _N, Acc, List) ->
- {lists:reverse(Acc), List}.
-
-basetype(ordered_set) ->
- set;
-basetype(Any) ->
- Any.
diff --git a/lib/tv/src/tv_db_int_def.hrl b/lib/tv/src/tv_db_int_def.hrl
deleted file mode 100644
index d2cb8adee5..0000000000
--- a/lib/tv/src/tv_db_int_def.hrl
+++ /dev/null
@@ -1,80 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Internal definitions for the database part of the table
-%%% tool.
-%%%
-%%%*********************************************************************
-
--define(WHITE, {255, 255, 255}).
--define(MEDIUM_GRAY, {170, 170, 170}).
-
-
--define(LIGHT_GREEN, { 0, 255, 0}).
--define(GREEN, { 50, 215, 50}).
--define(DARK_GREEN, { 50, 170, 50}).
--define(FOREST_GREEN, { 34, 139, 34}).
--define(DARK_FOREST_GREEN, { 15, 100, 15}).
-
-
-
--define(RED, {255, 0, 0}).
--define(PINK, {255, 130, 170}).
--define(LIGHT_VIOLET, {220, 150, 225}).
--define(VIOLET, {160, 70, 180}).
--define(DARK_VIOLET, {100, 10, 130}).
-
-
-
-
-
-
--record(db_data, {db = [], % List containing all elements
- db_size = 0, % Number of elements in 'db'
- max_elem_size = 0, % Size of largest element in db.
- hidden = [], % Elements (i.e., keys) not to be shown
- deleted = [], % Elements just deleted
- subset_size, % Size of the subset to be extracted and
- % shown
- subset_pos, % Position in list where subset starts
- sorting = false, % Tells whether sorting is used ('true'
- % or 'false')
- requested_row = 0,
- rev_sorting = false, % Tells whether the sorting (if any) is
- % in reversed order or not ('true' or
- % 'false')
- sort_key_no, % Element in each tuple to use as sorting
- % element
- key_no, % Element in each tuple to use as key
- % (this element is used when updating the
- % dblist, i.e., inserting, deleting a.s.o)
- ets_type % 'bag' or 'set'
- }).
-
-
--record(process_variables, {master_pid,
- etsread_pid,
- db_data = #db_data{},
- list_of_keys = [],
- lists_as_strings = true
- }).
-
-
-
-
diff --git a/lib/tv/src/tv_db_search.erl b/lib/tv/src/tv_db_search.erl
deleted file mode 100644
index edfa57df04..0000000000
--- a/lib/tv/src/tv_db_search.erl
+++ /dev/null
@@ -1,475 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Code for the search window.
-%%%
-%%%*********************************************************************
--module(tv_db_search).
--compile([{nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,label,3}},
- {nowarn_deprecated_function,{gs,listbox,3}},
- {nowarn_deprecated_function,{gs,radiobutton,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([create_window/1,
- resize_window/1,
- reset_window/1,
- destroy_window/1,
- mark_busy/1,
- mark_nonbusy/1,
- get_input_and_search/3,
- update_search/4,
- string_to_term/1
- ]).
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_db_int_def.hrl").
-
-
-
-
--define(WIN_WIDTH, 445).
--define(SMALL_WIN_HEIGHT, 117).
--define(BIG_WIN_HEIGHT, 335).
--define(FRAME_WIDTH, 429). % 334
--define(OLD_FRAME_WIDTH, 334).
--define(FRAME_HEIGHT, 105).
--define(FRAME_XPOS, (10-2)).
--define(FRAME_YPOS, 10).
--define(ENTRY_XPOS, 9).
--define(ENTRY_YPOS, 31).
--define(ENTRY_WIDTH, (?OLD_FRAME_WIDTH-10-2*?ENTRY_XPOS-5)).
--define(LISTBOX_WIDTH, ?WIN_WIDTH-2*?FRAME_XPOS+1).
--define(LISTBOX_HEIGHT, 162).
--define(LISTBOX_XPOS, ?FRAME_XPOS-2).
--define(LISTBOX_YPOS, ?SMALL_WIN_HEIGHT+8).
--define(BTN_WIDTH, 80).
--define(BTN_HEIGHT, 30).
--define(BTN_XPOS, ?OLD_FRAME_WIDTH-6).
--define(BG_COLOUR, {217,217,217}).
-
-
-
-
-
-
-create_window(true) ->
- gs:config(win, [raise]);
-create_window(false) ->
- gs:window(win, gs:start(), [{width,?WIN_WIDTH},
- {height,?SMALL_WIN_HEIGHT},
- {data,small},
- {bg,?BG_COLOUR},
- {title,"[TV] Search Object"},
- {destroy,true},
- {configure,true},
- {cursor,arrow}
- ]),
-
- F = gs:frame(win, [{width,?FRAME_WIDTH},
- {height,?FRAME_HEIGHT},
- {x,?FRAME_XPOS},
- {y,?FRAME_YPOS},
- {bw,2},
- {bg,?BG_COLOUR}
- ]),
-
- gs:label(F, [{width,80},
- {height,25},
- {x,?ENTRY_XPOS+2},
- {y,8},
- {align,w},
- {bg,?BG_COLOUR},
- {fg, {0,0,0}},
- {label, {text,"Search for:"}}
- ]),
-
- gs:entry(entry, F, [{width,?ENTRY_WIDTH},
- {height,30},
- {x,?ENTRY_XPOS},
- {y,?ENTRY_YPOS},
- {insert, {0,"<Search expression>"}},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {cursor,text},
- {justify,left},
- {keypress,true},
- {setfocus,true}
- ]),
-
- Group = list_to_atom("expr" ++ pid_to_list(self())),
- RadioWidth = round(?ENTRY_WIDTH / 2),
- gs:radiobutton(expr_term, F, [{width,RadioWidth - 45},
- {height,25},
- {x,?ENTRY_XPOS},
- {y,?ENTRY_YPOS+40},
- {group,Group},
- {align, c},
- {label,{text,"as term"}},
- {select,true}
- ]),
- gs:radiobutton(expr_regexp, F, [{width,RadioWidth + 45},
- {height,25},
- {x,?ENTRY_XPOS+RadioWidth-20-26},
- {y,?ENTRY_YPOS+40},
- {group,Group},
- {align,c},
- {label,{text,"as regular expression"}}
- ]),
-
- gs:button(search, F, [{width,?BTN_WIDTH},
- {height,?BTN_HEIGHT},
- {x,?BTN_XPOS},
- {y,11},
- {label, {text,"Search"}},
- {bg,?BG_COLOUR},
- {fg, {0,0,0}}
- ]),
- gs:button(cancel, F, [{width,?BTN_WIDTH},
- {height,?BTN_HEIGHT},
- {x,?BTN_XPOS},
- {y,?BTN_HEIGHT+11+10},
- {label, {text,"Cancel"}},
- {data,cancel},
- {bg,?BG_COLOUR},
- {fg, {0,0,0}}
- ]),
- expand_window(),
- gs:config(entry, [{select, {0,1000}}]),
- gs:config(win, [{map,true}]).
-
-
-
-
-resize_window(false) ->
- done;
-resize_window(true) ->
- gs:config(win, [{width,?WIN_WIDTH},
- {height,?BIG_WIN_HEIGHT}
- ]).
-
-
-
-
-reset_window(false) ->
- done;
-reset_window(true) ->
- gs:config(listbox, [clear]),
- gs:config(objects_found, [{label, {text,""}}]).
-
-
-
-
-destroy_window(false) ->
- done;
-destroy_window(true) ->
- gs:destroy(win).
-
-
-
-mark_busy(false) ->
- done;
-mark_busy(true) ->
- gs:config(win, [{cursor,busy}]),
- gs:config(entry, [{cursor,busy}]).
-
-
-
-
-mark_nonbusy(false) ->
- done;
-mark_nonbusy(true) ->
- gs:config(win, [{cursor,arrow}]),
- gs:config(entry, [{cursor,text}]).
-
-
-
-
-get_input_and_search(DbList, IsRegExp, ListAsStr) ->
- get_input_and_search(DbList, IsRegExp, true, ListAsStr).
-
-
-
-
-get_input_and_search(DbList, IsRegExp, Notify, ListAsStr) ->
- Str = get_entry_text(),
- StrConvRes = case IsRegExp of
- true ->
- string_to_regexp(Str);
- false ->
- string_to_term(Str)
- end,
-
- case StrConvRes of
- {ok, TermOrRE} ->
- search(IsRegExp, TermOrRE, DbList, ListAsStr);
- {error, {_Reason, Msg}} when Notify ->
- gs:config(win, [beep]),
- tv_utils:notify(win, "TV Notification", Msg);
- {error, {_Reason, _Msg}} ->
- done
- end.
-
-
-
-update_search(false, _DbList, _IsRegExp, _ListAsStr) ->
- done;
-update_search(true, DbList, true, ListAsStr) ->
- get_input_and_search(DbList, false, false, ListAsStr);
-update_search(true, DbList, false, ListAsStr) ->
- get_input_and_search(DbList, true, false, ListAsStr).
-
-
-
-get_entry_text() ->
- gs:read(entry,text).
-
-
-
-string_to_regexp(Str) ->
- case re:compile(Str) of
- {ok, RegExp} ->
- {ok, RegExp};
- {error, _Error} ->
- case get(error_msg_mode) of
- normal ->
- {error, {not_a_regexp, "Please enter a regular expression!"}};
- haiku ->
- {error, {not_a_regexp, ["Being incorrect",
- "The regular expression",
- "Must now be retyped."]}}
- end
- end.
-
-
-
-string_to_term(Str) ->
- case catch erl_scan:string(Str ++ ". ") of
- {ok, ScannedStr, _No} ->
- case erl_parse:parse_term(ScannedStr) of
- {ok, Term} ->
- {ok, Term};
- _Other ->
- %% May be a PID, have to check this, since erl_scan
- %% currently cannot handle this case... :-(
- case catch list_to_pid(Str) of
- Pid when is_pid(Pid) ->
- {ok, Pid};
- _Error ->
- case get(error_msg_mode) of
- normal ->
- {error, {not_a_term, "Please enter a valid term!"}};
- haiku ->
- {error, {not_a_term, ["Aborted effort.",
- "Reflect, repent and retype:",
- "Enter valid term."]}}
- end
- end
- end;
- _Error ->
- case get(error_msg_mode) of
- normal ->
- {error, {not_a_term, "Please enter a valid term!"}};
- haiku ->
- {error, {not_a_term, ["Aborted effort.",
- "Reflect, repent and retype:",
- "Enter valid term."]}}
- end
- end.
-
-
-
-search(IsRegExp, SearchValue, DbList, ListAsStr) ->
- gs:config(cancel, [{label, {text,"Stop"}}]),
- mark_busy(true),
- reset_window(true),
- SearchRes = traverse(SearchValue, DbList, 1, length(DbList), [], IsRegExp, ListAsStr),
- gs:config(cancel, [{label, {text,"Cancel"}}]),
- mark_nonbusy(true),
- SearchRes.
-
-
-
-
-
-expand_window() ->
- gs:listbox(listbox, win, [{width,?LISTBOX_WIDTH},
- {height,?LISTBOX_HEIGHT},
- {x,?LISTBOX_XPOS},
- {y,?LISTBOX_YPOS},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {scrollbg,?BG_COLOUR},
- {scrollfg,?BG_COLOUR},
- {hscroll,bottom},
- {vscroll,right},
- {click,true},
- {doubleclick,false},
- {selectmode,single}
- ]),
- gs:label(objects_found, win, [{width,?LISTBOX_WIDTH},
- {height,25},
- {x,?LISTBOX_XPOS},
- {y,?LISTBOX_YPOS+?LISTBOX_HEIGHT+13},
- {align,w},
- {bg,?BG_COLOUR},
- {fg, {0,0,0}}
- ]),
- gs:config(win, [{width,?WIN_WIDTH},
- {height,?BIG_WIN_HEIGHT}
- ]).
-
-
-
-
-
-
-
-traverse(Pattern, [Object | T], Row, Length, Acc, IsRegExp, ListAsStr) ->
- SearchRes =
- case IsRegExp of
- true ->
- search_for_regexp(Pattern, Object, ListAsStr);
- false ->
- compare_terms(Pattern, Object)
- end,
-
- NewAcc
- = case SearchRes of
- found ->
- RowStr = integer_to_list(Row),
- LengthStr = integer_to_list(Length),
- ObjectStr = case ListAsStr of
- true ->
- lists:flatten(tv_io_lib:format("~p", [Object]));
- false ->
- lists:flatten(tv_io_lib:write(Object))
- end,
-
- gs:config(listbox,
- [{add,
- " Row " ++ RowStr ++ ":" ++
- lists:duplicate(length(LengthStr)-length(RowStr), " ") ++
- " " ++ ObjectStr}
- ]),
- gs:config(objects_found,
- [{label,
- {text,integer_to_list(length(Acc)+1) ++
- " object(s) found"}}
- ]),
- [{Row,Object} | Acc];
- not_found ->
- Acc
- end,
- receive
- {gs,cancel,click,_Data,_Args} ->
- gs:config(objects_found,
- [{label,
- {text,integer_to_list(gs:read(listbox,size)) ++
- " object(s) found"}}
- ]),
- lists:reverse(NewAcc)
- after
- 0 ->
- traverse(Pattern, T, Row+1, Length, NewAcc, IsRegExp, ListAsStr)
- end;
-traverse(_Pattern, [], _N, _Length, Acc, _IsRegExp, _ListAsStr) ->
- gs:config(objects_found,
- [{label,
- {text,integer_to_list(gs:read(listbox,size)) ++
- " object(s) found"}}
- ]),
- lists:reverse(Acc).
-
-
-
-
-search_for_regexp(Pattern, Elem, ListAsStr) ->
- ListToSearch =
- case ListAsStr of
- true ->
- lists:flatten(tv_io_lib:format("~p", [Elem]));
- false ->
- lists:flatten(tv_io_lib:write(Elem))
- end,
-
- case re:run(ListToSearch, Pattern, [{capture,none}]) of
- match ->
- found;
- nomatch ->
- not_found
- end.
-
-
-
-
-
-compare_terms(Term, Elem) when not is_tuple(Elem), not is_list(Elem), Term =/= Elem ->
- not_found;
-compare_terms(Term, Term) ->
- %% Even the case Term = "{}" or "[]"!!!
- found;
-compare_terms(Term, Elem) when is_list(Elem) ->
- traverse_list(Term, Elem);
-compare_terms(Term, Elem) when is_tuple(Elem) ->
- traverse_tuple(Term, Elem, 1, size(Elem)).
-
-
-
-
-
-traverse_tuple(Pattern, Tuple, N, Stop) when N =< Stop ->
- Elem = element(N,Tuple),
- case compare_terms(Pattern, Elem) of
- found ->
- found;
- not_found ->
- traverse_tuple(Pattern, Tuple, N+1, Stop)
- end;
-traverse_tuple(_Pattern, _Tuple, N, Stop) when N > Stop ->
- not_found.
-
-
-
-
-
-
-traverse_list(Pattern, [H | T]) ->
- case compare_terms(Pattern, H) of
- found ->
- found;
- not_found ->
- traverse_list(Pattern, T)
- end;
-traverse_list(_Pattern, []) ->
- not_found.
-
diff --git a/lib/tv/src/tv_db_sort.erl b/lib/tv/src/tv_db_sort.erl
deleted file mode 100644
index 3675c7b413..0000000000
--- a/lib/tv/src/tv_db_sort.erl
+++ /dev/null
@@ -1,141 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_db_sort).
-
-
-
--export([mergesort/3, merge/4, get_compare_value/2]).
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-
-mergesort(_KeyNo, [X], _ReverseOrder) ->
- [X];
-mergesort(_KeyNo, [], _ReverseOrder) ->
- [];
-mergesort(KeyNo, X, ReverseOrder) ->
- split(KeyNo, X, [], [], ReverseOrder).
-
-
-
-
-
-
-
-
- %% If we want reverse order when just merging two lists,
- %% each of them has to be in reverse order first!
-
-merge(KeyNo, [{E1, C1} | T1], [{E2, C2} | T2], Reverse) when not Reverse ->
- K1 = get_compare_value(KeyNo, E1),
- K2 = get_compare_value(KeyNo, E2),
- case get_correct_order(K1, E1, K2, E2) of
- {1, 2} ->
- [{E1, C1} | merge(KeyNo, T1, [{E2, C2} | T2], Reverse)];
- {2, 1} ->
- [{E2, C2} | merge(KeyNo, [{E1, C1} | T1], T2, Reverse)]
- end;
-merge(KeyNo, [{E1, C1} | T1], [{E2, C2} | T2], Reverse) ->
- K1 = get_compare_value(KeyNo, E1),
- K2 = get_compare_value(KeyNo, E2),
- case get_correct_order(K1, E1, K2, E2) of
- {1, 2} ->
- [{E2, C2} | merge(KeyNo, [{E1, C1} | T1], T2, Reverse)];
- {2, 1} ->
- [{E1, C1} | merge(KeyNo, T1, [{E2, C2} | T2], Reverse)]
- end;
-merge(_KeyNo, [], L2, _Reverse) -> % L2 may be the empty list also!
- L2;
-merge(_KeyNo, L1, [], _Reverse) -> % L1 may be the empty list also!
- L1.
-
-
-
-
-
-
-get_compare_value(KeyNo, E) when is_tuple(E) ->
- case catch element(KeyNo, E) of
- {'EXIT', {badarg, {?MODULE, get_compare_value, [KeyNo, E]}}} ->
- short_tuple;
- V ->
- {tuple, V}
- end;
-get_compare_value(_KeyNo, _E) ->
- no_tuple.
-
-
-
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-split(KeyNo, [A,B|T], X, Y, Reverse) ->
- split(KeyNo, T, [A|X], [B|Y], Reverse);
-split(KeyNo, [H], X, Y, Reverse) ->
- split(KeyNo, [], [H|X], Y, Reverse);
-split(KeyNo, [], X, Y, Reverse) ->
- merge(KeyNo,
- mergesort(KeyNo, X, Reverse),
- mergesort(KeyNo, Y, Reverse),
- Reverse).
-
-
-
-
-
-
-get_correct_order({tuple, V1}, _E1, {tuple, V2}, _E2) when V1 < V2 ->
- {1, 2};
-get_correct_order({tuple, _V1}, _E1, {tuple, _V2}, _E2) ->
- {2, 1};
-get_correct_order(short_tuple, _E1, {tuple, _V2}, _E2) ->
- {1, 2};
-get_correct_order({tuple, _V1}, _E1, short_tuple, _E2) ->
- {2, 1};
-get_correct_order(short_tuple, E1, short_tuple, E2) when E1 < E2 ->
- {1, 2};
-get_correct_order(short_tuple, _E1, short_tuple, _E2) ->
- {2, 1};
-get_correct_order(no_tuple, E1, no_tuple, E2) when E1 < E2 ->
- {1, 2};
-get_correct_order(no_tuple, _E1, no_tuple, _E2) ->
- {2, 1};
-get_correct_order(_Anything, _E1, no_tuple, _E2) -> % Tuples first, then other
- {1, 2}; % terms in correct order!
-get_correct_order(no_tuple, _E1, _Anything, _E2) ->
- {2, 1}.
diff --git a/lib/tv/src/tv_ets_rpc.erl b/lib/tv/src/tv_ets_rpc.erl
deleted file mode 100644
index ec2fde30ac..0000000000
--- a/lib/tv/src/tv_ets_rpc.erl
+++ /dev/null
@@ -1,140 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_ets_rpc).
-
-
-
--export([all/2,
- info/4,
- new/4,
- tab2list/3,
- insert/4,
- lookup/4,
- delete/4
- ]).
-
-
-
-
-all(_Node, true) ->
- chk(catch ets:all());
-all(Node, false) ->
- chk(catch rpc:block_call(Node, ets, all, [])).
-
-
-
-
-info(_Node, true, TabId, What) ->
- chk(catch ets:info(TabId, What));
-info(Node, false, TabId, What) ->
- chk(catch rpc:block_call(Node, ets, info, [TabId, What])).
-
-
-
-
-new(_Node, true, TabName, Options) ->
- case catch ets:new(TabName, Options) of
- {TabName, Pid} when is_pid(Pid) ->
- {TabName,Pid};
- {TabNo, Pid} when is_pid(Pid) ->
- {TabNo,Pid};
- OtherResult ->
- chk(OtherResult)
- end;
-new(Node, false, TabName, Options) ->
- case catch rpc:block_call(Node, ets, new, [TabName, Options]) of
- {TabName, Pid} when is_pid(Pid) ->
- {TabName,Pid};
- {TabNo, Pid} when is_pid(Pid) ->
- {TabNo, Pid};
- OtherResult ->
- chk(OtherResult)
- end.
-
-
-
-
-tab2list(_Node, true, TabId) ->
- chk(catch ets:tab2list(TabId));
-tab2list(Node, false, TabId) ->
- chk(catch rpc:call(Node, ets, tab2list, [TabId])).
-
-
-
-
-insert(_Node, true, TabId, Object) ->
- chk(catch ets:insert(TabId, Object));
-insert(Node, false, TabId, Object) ->
- chk(catch rpc:call(Node, ets, insert, [TabId, Object])).
-
-
-
-
-lookup(_Node, true, TabId, Key) ->
- chk(catch ets:lookup(TabId, Key));
-lookup(Node, false, TabId, Key) ->
- chk(catch rpc:call(Node, ets, lookup, [TabId, Key])).
-
-
-
-
-delete(_Node, true, TabId, Key) ->
- chk(catch ets:delete(TabId, Key));
-delete(Node, false, TabId, Key) ->
- chk(catch rpc:call(Node, ets, delete, [TabId, Key])).
-
-
-
-
-chk(Result) ->
- case Result of
- undefined ->
- throw(no_table);
- _Anything when is_list(Result) ->
- Result;
- _Anything when is_atom(Result) ->
- Result;
- _Anything when is_integer(Result) ->
- Result;
- _Anything when is_pid(Result) ->
- Result;
-
- %% Messages received when node is down.
- {badrpc, nodedown} ->
- throw(nodedown);
- {'EXIT', nodedown} ->
- throw(nodedown);
- {'EXIT', {{badarg, {gen, set_monitor_node, _Args}}, _Reason}} ->
- throw(nodedown);
-
- %% Messages received when table doesn't exist.
- {'EXIT', {badarg, {ets,local_info,_Args}}} ->
- %% Due to inconsistencies in R2D and earlier versions:
- %% ets:info/1 returned 'undefined' when table didn't
- %% exist, while ets:info/2 returned the exit-signal
- %% above. This was corrected in R3A - now both functions
- %% return 'undefined' :-)
- throw(no_table);
- {badrpc, {'EXIT', {badarg,_Reason}}} ->
- throw(no_table);
- {'EXIT', {badarg,_Reason}} ->
- throw(no_table);
- Error when is_tuple(Error) ->
- throw({unexpected_error,Error})
- end.
-
diff --git a/lib/tv/src/tv_etsread.erl b/lib/tv/src/tv_etsread.erl
deleted file mode 100644
index 32f111c9a1..0000000000
--- a/lib/tv/src/tv_etsread.erl
+++ /dev/null
@@ -1,770 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Module containing the interface towards ETS tables,
-%%% i.e., handling the polling and thereafter sending the
-%%% result to the database part of the table tool.
-%%%
-%%%*********************************************************************
-
-
--module(tv_etsread).
--compile([{nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([etsread/2]).
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-etsread(MasterPid, ErrorMsgMode) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrorMsgMode),
- blocked(MasterPid).
-
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-blocked(MasterPid) ->
- receive
- Msg ->
- case Msg of
-
- #etsread_deblock{} ->
- deblock(Msg, MasterPid);
-
- {'EXIT', Pid, Reason} ->
- exit_signals({Pid, Reason}, MasterPid),
- blocked(MasterPid);
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- blocked(MasterPid);
-
- _Other ->
- %% io:format("Received signal ~p~n", [_Other]),
- blocked(MasterPid)
- end
- end.
-
-
-
-
-
-
-
-deblock(Msg, MasterPid) ->
- #etsread_deblock{dbs_pid = DbsPid,
- table_type = KindOfTable,
- node = Node,
- local_node = LocalNode,
- table_id = TableId,
- poll_interval = PollInt} = Msg,
- PollInterval = case PollInt of
- infinity ->
- PollInt;
- _Other ->
- PollInt * 1000
- end,
- %% Get table info!
- case catch get_table_info(Node, LocalNode, TableId, KindOfTable) of
- nodedown ->
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- no_table ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- mnesia_not_started ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- {unexpected_error,_Reason} ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- {Type, Pos, Protection} ->
- MasterPid ! #etsread_deblock_cfm{sender = self(),
- type = Type,
- keypos = Pos,
- protection = Protection
- },
-
- timer:sleep(500),
- case catch read_table(Node, LocalNode, TableId, KindOfTable, DbsPid) of
- nodedown ->
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- no_table ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- mnesia_not_started ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- {unexpected_error,_Reason} ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false},
- blocked(MasterPid);
- _ElapsedTime ->
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId,
- KindOfTable, PollInterval)
- end
- end.
-
-
-
-
-
-
-get_table_info(Node, LocalNode, TableId, KindOfTable) ->
- case KindOfTable of
- ets ->
- % Check whether table is 'bag' or 'set' type.
- Type = tv_ets_rpc:info(Node, LocalNode, TableId, type),
- % Get position for the key.
- Pos = tv_ets_rpc:info(Node, LocalNode, TableId, keypos),
- Protection = tv_ets_rpc:info(Node, LocalNode, TableId, protection),
- {Type, Pos, Protection};
- mnesia ->
- Type = tv_mnesia_rpc:table_info(Node, LocalNode, TableId, type),
- Pos = 2,
- %% All Mnesia tables are regarded as being public!
- {Type, Pos, public}
- end.
-
-
-
-
-
-
-deblocked_loop(MasterPid,DbsPid,Node,LocalNode,TableId,KindOfTable,PollInterval) ->
- receive
- Msg ->
-
- case Msg of
-
- #etsread_poll_table{} ->
- case catch read_table(Node, LocalNode, TableId, KindOfTable, DbsPid) of
- %% No automatic polling here!
- nodedown ->
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = false};
- no_table ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false};
- mnesia_not_started ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false};
- {unexpected_error,_Reason} ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = false};
- _ElapsedTime ->
- done
- end,
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode,
- TableId, KindOfTable, PollInterval);
-
-
- #etsread_set_poll_interval{interval = PollInt} ->
- NewPollInterval = case PollInt of
- infinity ->
- PollInt;
- _Other ->
- PollInt * 1000
- end,
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode,
- TableId, KindOfTable, NewPollInterval);
-
-
- #etsread_deblock{} ->
- deblock(Msg, MasterPid);
-
-
- #etsread_update_object{key_no=KeyNo, object=Obj, old_object=OldObj} ->
- update_object(KindOfTable, Node, LocalNode, TableId, DbsPid,
- KeyNo, Obj, OldObj, MasterPid, PollInterval),
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId, KindOfTable,
- PollInterval);
-
-
- #etsread_new_object{object=Obj} ->
- new_object(KindOfTable, Node, LocalNode, TableId, DbsPid,
- Obj, MasterPid, PollInterval),
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId, KindOfTable,
- PollInterval);
-
-
- #etsread_delete_object{object=Obj} ->
- delete_object(KindOfTable, Node, LocalNode, TableId, DbsPid,
- Obj, MasterPid, PollInterval),
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId, KindOfTable,
- PollInterval);
-
-
- #ip_dead_table{} ->
- AutoPoll = case PollInterval of
- infinity ->
- false;
- _Other ->
- true
- end,
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll},
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId,
- KindOfTable, infinity);
-
-
- #etsread_nodedown{} ->
- AutoPoll = case PollInterval of
- infinity ->
- false;
- _Other ->
- true
- end,
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = AutoPoll},
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId,
- KindOfTable, infinity);
-
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode, TableId, KindOfTable,
- PollInterval);
-
-
- {'EXIT', Pid, Reason} ->
- exit_signals({Pid, Reason}, MasterPid),
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode,
- TableId, KindOfTable, PollInterval)
- end
-
- after PollInterval ->
- %% Automatic polling must be on, otherwise these
- %% lines would never be executed!
- NewPollInterval =
- case catch read_table(Node,LocalNode,TableId,KindOfTable,DbsPid) of
- nodedown ->
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = true},
- infinity;
- no_table ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = true},
- infinity;
- mnesia_not_started ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = true},
- infinity;
- {unexpected_error,_Reason} ->
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = true},
- infinity;
- ElapsedMilliseconds ->
- if
- (ElapsedMilliseconds * 1000) >= PollInterval ->
- infinity;
- true ->
- PollInterval
- end
- end,
- deblocked_loop(MasterPid, DbsPid, Node, LocalNode,
- TableId, KindOfTable, NewPollInterval)
- end.
-
-
-
-
-
-exit_signals(ExitInfo, MasterPid) ->
- case ExitInfo of
- {MasterPid, _Reason} ->
- exit(normal);
- _Other ->
- done
- end.
-
-
-
-
-update_object(KindOfTable, Node, LocalNode, TableId, DbsPid, KeyNo, Obj, OldObj, MasterPid, PollInterval) ->
- AutoPoll =
- case PollInterval of
- infinity ->
- false;
- _Other ->
- true
- end,
- case check_record_format(KindOfTable, Node, LocalNode, TableId, Obj) of
- bad_format ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = false};
- ok ->
- %% Check that we are allowed to edit the table!
- case catch update_object2(KindOfTable, Node, LocalNode, TableId, DbsPid, KeyNo,
- Obj, OldObj) of
-
- nodedown ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = AutoPoll};
-
- no_table ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- mnesia_not_started ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
-
- {unexpected_error,_Reason} ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- ok ->
- DbsPid ! #etsread_update_object_cfm{sender = self(),
- success = true}
- end
- end.
-
-
-
-
-
-update_object2(ets, Node, LocalNode, Tab, _DbsPid, KeyNo, Obj, OldObj) ->
- %% We shall update a specific object! If the table is a 'set' table,
- %% it is just to insert the altered object. However, if the table
- %% is a 'bag', or a 'duplicate_bag', we first have to remove the
- %% old object, and then insert the altered one.
- %% But, we aren't finished with that... we also want to preserve
- %% the time order, meaning we have to delete *ALL* objects having the
- %% very same key, and then insert them again! (Actually we would have
- %% to do this anyhow, due to limitations in the interface functions,
- %% but this remark has to be noted!)
- OldKey = element(KeyNo, OldObj),
- InsertList =
- case tv_ets_rpc:info(Node, LocalNode, Tab, type) of
- set ->
- %% Have to remove old object, because the key may be what's changed.
- tv_ets_rpc:delete(Node, LocalNode, Tab, OldKey),
- [Obj];
- ordered_set ->
- %% Have to remove old object, because the key may be what's changed.
- tv_ets_rpc:delete(Node, LocalNode, Tab, OldKey),
- [Obj];
- _Other -> %% 'bag' or 'duplicate_bag'
- OldList = tv_ets_rpc:lookup(Node, LocalNode, Tab, OldKey),
- tv_ets_rpc:delete(Node, LocalNode, Tab, OldKey),
- %% Have to beware of duplicate_bag tables,
- %% i.e., the same object may occur more than
- %% once, but we only want to replace it once!
- {_Replaced, TmpList} =
- lists:foldl(
- fun(Data, {Replaced,Acc}) when Data =/= OldObj ->
- {Replaced, [Data | Acc]};
- (_Data, {Replaced,Acc}) when not Replaced ->
- {true, [Obj | Acc]};
- (Data, {Replaced,Acc}) ->
- {Replaced, [Data | Acc]}
- end,
- {false, []},
- OldList),
- lists:reverse(TmpList)
- end,
- lists:foreach(fun(H) ->
- tv_ets_rpc:insert(Node, LocalNode, Tab, H)
- end,
- InsertList),
- ok;
-update_object2(mnesia, Node, LocalNode, Tab, _DbsPid, KeyNo, Obj, OldObj) ->
- OldKey = element(KeyNo, OldObj),
- InsertList =
- case tv_mnesia_rpc:table_info(Node, LocalNode, Tab, type) of
- set ->
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- mnesia:delete(Tab,OldKey,write)
- end),
- [Obj];
- ordered_set ->
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- mnesia:delete(Tab,OldKey,write)
- end),
- [Obj];
- _Other -> %% 'bag' or 'duplicate_bag'
- {atomic, OldList} =
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- mnesia:read(Tab,OldKey,read)
- end),
- %% We can't use mnesia:delete_object here, because
- %% time order wouldn't be preserved then!!!
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- mnesia:delete(Tab,OldKey,write)
- end),
- ChangeFun =
- fun(H) when H =:= OldObj ->
- Obj;
- (H) ->
- H
- end,
- [ChangeFun(X) || X <- OldList]
- end,
- lists:foreach(fun(H) ->
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- %% This mnesia call shall not be distributed,
- %% since the transaction sees to that it is
- %% executed on the right node!!!
- mnesia:write(Tab,H,write)
- end)
- end,
- InsertList),
- ok.
-
-
-
-
-
-
-delete_object(KindOfTable, Node, LocalNode, TableId, DbsPid, Obj, MasterPid, PollInterval) ->
- AutoPoll =
- case PollInterval of
- infinity ->
- false;
- _Other ->
- true
- end,
- case catch delete_object2(KindOfTable, Node, LocalNode, TableId, DbsPid, Obj) of
-
- nodedown ->
- DbsPid ! #etsread_delete_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = AutoPoll};
-
- no_table ->
- DbsPid ! #etsread_delete_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- mnesia_not_started ->
- DbsPid ! #etsread_delete_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- {unexpected_error,_Reason} ->
- DbsPid ! #etsread_delete_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- ok ->
- DbsPid ! #etsread_delete_object_cfm{sender = self(),
- success = true}
- end.
-
-
-
-
-delete_object2(ets, Node, LocalNode, Tab, _DbsPid, Obj) ->
- KeyNo = tv_ets_rpc:info(Node, LocalNode, Tab, keypos),
- Key = element(KeyNo, Obj),
- InsertList =
- case tv_ets_rpc:info(Node, LocalNode, Tab, type) of
- set ->
- %% Have to remove old object, because the key may be what's changed.
- tv_ets_rpc:delete(Node, LocalNode, Tab, Key),
- [];
- ordered_set ->
- %% Have to remove old object, because the key may be what's changed.
- tv_ets_rpc:delete(Node, LocalNode, Tab, Key),
- [];
- _Other -> %% 'bag' or 'duplicate_bag'
- OldList = tv_ets_rpc:lookup(Node, LocalNode, Tab, Key),
- tv_ets_rpc:delete(Node, LocalNode, Tab, Key),
- OldList -- [Obj]
- end,
-
- lists:foreach(fun(H) ->
- tv_ets_rpc:insert(Node, LocalNode, Tab, H)
- end,
- InsertList),
- ok;
-delete_object2(mnesia, Node, LocalNode, Tab, _DbsPid, Obj) ->
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- %% This mnesia call shall not be distributed,
- %% since the transaction sees to that it is
- %% executed on the right node!!!
- mnesia:delete_object(Tab,Obj,write)
- end),
- ok.
-
-
-
-
-
-new_object(KindOfTable, Node, LocalNode, TableId, DbsPid, Obj, MasterPid, PollInterval) ->
- AutoPoll =
- case PollInterval of
- infinity ->
- false;
- _Other ->
- true
- end,
- case check_record_format(KindOfTable, Node, LocalNode, TableId, Obj) of
- bad_format ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = false};
- ok ->
- %% Check that we are allowed to edit the table!
- case catch new_object2(KindOfTable, Node, LocalNode, TableId, DbsPid, Obj) of
-
- nodedown ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_nodedown{sender = self(),
- automatic_polling = AutoPoll};
-
- no_table ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- mnesia_not_started ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- {unexpected_error,_Reason} ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = false},
- MasterPid ! #pc_dead_table{sender = self(),
- automatic_polling = AutoPoll};
-
- ok ->
- DbsPid ! #etsread_new_object_cfm{sender = self(),
- success = true}
- end
- end.
-
-
-
-
-
-new_object2(ets, Node, LocalNode, Tab, _DbsPid, Obj) ->
- tv_ets_rpc:insert(Node, LocalNode, Tab, Obj),
- ok;
-new_object2(mnesia, Node, LocalNode, Tab, _DbsPid, Obj) ->
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- %% This mnesia call shall not be distributed,
- %% since the transaction sees to that it is
- %% executed on the right node!!!
- mnesia:write(Tab,Obj,write)
- end),
- ok.
-
-
-
-
-
-check_record_format(mnesia, Node, LocalNode, Tab, Obj) ->
- Arity = tv_mnesia_rpc:table_info(Node, LocalNode, Tab, arity),
- case size(Obj) of
- Arity ->
- ok;
- _Other ->
- gs:window(etsreadwin, gs:start(), []),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(etsreadwin, "TV Notification",
- ["The record is not complete,",
- "too few fields are specified!"]);
- haiku ->
- tv_utils:notify(etsreadwin, "TV Notification",
- ["The attempt to change",
- "The specified record size",
- "Is simply ignored."])
- end,
- gs:destroy(etsreadwin),
- bad_format
- end;
-check_record_format(ets, _Node, _LocalNode, _Tab, _Obj) ->
- ok.
-
-
-
-
-
-
-
-read_table(Node, LocalNode, Tab, KindOfTable, DbsPid) ->
- T1 = time(),
-
- {TableContent, ListOfKeys} =
- case KindOfTable of
- ets ->
- {tv_ets_rpc:tab2list(Node, LocalNode, Tab),
- [tv_ets_rpc:info(Node, LocalNode, Tab, keypos)]
- };
- mnesia ->
- %% It may be tempting to use Mnesia event subscription,
- %% but will this really save the day? The main drawback
- %% is that we will then have to update the table copy we
- %% store internally in two different ways: one for the
- %% Mnesia tables, and one for the ETS tables. Also, if
- %% the Mnesia tables are frequently updated, this will
- %% cause TV to work all the time too (either updating the
- %% table copy for each inserted/deleted object, or storing
- %% these objects until polling is ordered). To make this
- %% work smoothly requires a bit of work...
- %% The second drawback is that it doesn't seem clear in all
- %% circumstances how the subscription actually works - i.e.,
- %% if we only use subscriptions, can we actually be sure that
- %% the *real* state of the table is the same as the one kept
- %% in TV? For example, imagine the scenario that Mnesia is
- %% stopped, all Mnesia directories are removed (from the UNIX
- %% shell), and then Mnesia once again is started. The first
- %% problem is that we have to check for start/stop of Mnesia,
- %% the second is that we then have to rescan the actual table.
- %% The logic for this may require som effort to write!
- %% Also, what will happen if the table is killed/dies?
- %% Will we get messages for each element in the table?
- %% (I havent't checked this last issue, this is just som thoughts.)
- %% And generally, there is always a risk that a message is lost,
- %% which will result in TV showing an erroneous table content.
- %%
- %% All in all, using Mnesia subscriptions *may* be a sub-optimization.
- %% The current solution works fine, is also easy to control, and is
- %% mainly the same for both ETS and Mnesia tables.
- %% My suggestion is that it is used until someone actually complains
- %% about the polling time being too long for huge tables! :-)
- %% (However, it shall be emphasized that it is this module that
- %% actually polls the Mnesia/ETS tables, meaning that it is
- %% mainly this module that has to be modified, should the usage of
- %% subscriptions be desired. The other module that has to be modified
- %% is the one maintaining the internal copy of the table.)
- WildPattern = tv_mnesia_rpc:table_info(Node,LocalNode,Tab,wild_pattern),
- {atomic, Content} =
- tv_mnesia_rpc:transaction(
- Node,
- LocalNode,
- fun() ->
- %% This mnesia call shall not be distributed,
- %% since the transaction sees to that it is
- %% executed on the right node!!!
- mnesia:match_object(Tab, WildPattern, read)
- end),
- {Content, [2 | tv_mnesia_rpc:table_info(Node, LocalNode,Tab, index)]}
- end,
-
- T2 = time(),
-
- ElapsedTime = compute_elapsed_seconds(T1, T2),
-
- DbsPid ! #dbs_new_data{sender = self(),
- data = TableContent,
- keys = ListOfKeys,
- time_to_read_table = ElapsedTime
- },
-
- ElapsedTime.
-
-
-
-
-
-
-
-compute_elapsed_seconds({H1, M1, S1}, {H2, M2, S2}) ->
- ElapsedHours = get_time_diff(hours, H1, H2),
- ElapsedMinutes = get_time_diff(minutes, M1, M2),
- ElapsedSeconds = get_time_diff(seconds, S1, S2),
- (ElapsedHours * 3600) + (ElapsedMinutes * 60) + ElapsedSeconds + 1.
-
-
-
-
-
-get_time_diff(_Type, T1, T2) when T1 =< T2 ->
- T2 - T1;
-get_time_diff(hours, T1, T2) ->
- T2 + 24 - T1;
-get_time_diff(minutes, T1, T2) ->
- T2 + 60 - T1;
-get_time_diff(seconds, T1, T2) ->
- T2 + 60 - T1.
diff --git a/lib/tv/src/tv_info.erl b/lib/tv/src/tv_info.erl
deleted file mode 100644
index c744888c38..0000000000
--- a/lib/tv/src/tv_info.erl
+++ /dev/null
@@ -1,884 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_info).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,listbox,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([info/6
- ]).
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
-
-
-
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
-
-
--record(card_field_ids, {parent_pid,
- window_id,
- window_frame,
- table_id,
- table_type,
- table_name,
- named_table,
- owner_pid,
- owner_name,
- bag_or_set,
- arity,
- attributes,
- wild_pattern,
- keypos,
- index,
- snmp,
- protection,
- size,
- memory,
- storage_type,
- disc_copies,
- where_to_read,
- ram_copies,
- disc_only_copies,
- where_to_write,
- checkpoints,
- node
- }).
-
-
-
--define(WINDOW_WIDTH, 580).
--define(WINDOW_HEIGHT, 430).
-
-
-
--define(MNESIA_INFO_ITEMS, [type,
- arity,
- attributes,
- index,
- size,
- memory,
- storage_type,
- where_to_read,
- disc_copies,
- disc_only_copies,
- ram_copies,
- where_to_write,
- checkpoints
- ]).
-
-
-
-
-info(Master, Node, LocalNode, TabId, TabType, ErrMsgMode) ->
- process_flag(trap_exit,true),
- WinId = create_window(),
- {CardIds, MaskLabel} = init(Master, Node, LocalNode, TabId, TabType, WinId),
- put(error_msg_mode, ErrMsgMode),
- gs:config(WinId, [{map, true}]),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType).
-
-
-
-
-
-
-create_window() ->
- WinWidth = ?WINDOW_WIDTH,
- WinHeight = ?WINDOW_HEIGHT,
- Win = gs:window(win, gs:start(), [{width, WinWidth},
- {height, WinHeight},
- {bg, ?DEFAULT_BG_COLOR},
- {destroy, true},
- {configure, true},
- {keypress, true}
- ]),
-
- MenubarId = gs:create(menubar, Win, [{bg, ?DEFAULT_BG_COLOR}
- ]),
- Mbutt = gs:create(menubutton, MenubarId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}, % firebrick
- {label, {text, " File "}},
- {underline, 1}
- ]),
- Obutt = gs:create(menubutton, MenubarId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}, % firebrick
- {label, {text, " Options "}},
- {underline, 1}
- ]),
-
- % Create the actual menu!
- FMenu = gs:create(menu, Mbutt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}]),
- OMenu = gs:create(menu, Obutt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}]),
- gs:create(menuitem, FMenu, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}},
- {label, {text, " Close Ctrl-C "}},
- {data, close_menu},
- {underline, 1}
- ]),
- gs:create(menuitem, OMenu, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}},
- {label, {text, " Refresh Ctrl-R "}},
- {data, update},
- {underline, 1}
- ]),
- Win.
-
-
-
-
-
-
-
-
-init(Master, Node, LocalNode, TabId, TabType, WinId) ->
- WinWidth = ?WINDOW_WIDTH,
- WinHeight = ?WINDOW_HEIGHT,
-
- WinFrame = gs:frame(WinId, [{width, WinWidth},
- {height, WinHeight},
- {x, 0},
- {y, 30},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, 0}
- ]),
-
- TableIdFlap = create_flap(1, "Table Id", WinFrame),
- BasicSettingsFlap = create_flap(2, "Basic Settings", WinFrame),
- SizeFlap = create_flap(3, "Size", WinFrame),
- StorageFlap = create_flap(4, "Storage", WinFrame),
-
- TableIdCard = create_card(WinFrame, TableIdFlap),
- BasicSettingsCard = create_card(WinFrame, BasicSettingsFlap),
- SizeCard = create_card(WinFrame, SizeFlap),
- StorageCard = create_card(WinFrame, StorageFlap),
-
-
- set_flap_label(TableIdFlap, "Table Id"),
- set_flap_label(BasicSettingsFlap, "Basic Settings"),
- set_flap_label(SizeFlap, "Size"),
- set_flap_label(StorageFlap, "Storage"),
-
-
- gs:config(TableIdCard, [raise]),
-
- CardIds = print_cards(TabType, TableIdCard, BasicSettingsCard, SizeCard, StorageCard),
-
- {_CardId, FirstMaskXpos} = gs:read(TableIdFlap, data),
- Mask = gs:label(WinFrame, [{width, gs:read(TableIdFlap, width) - 2 * gs:read(TableIdFlap, bw) + 1},
- {height, gs:read(TableIdCard, bw)},
- {x, FirstMaskXpos},
- {y, gs:read(TableIdCard, y)},
- {bg, ?DEFAULT_BG_COLOR}
- ]),
-
- update_info_flaps(TabType, Node, LocalNode, TabId, CardIds, Master),
- {CardIds#card_field_ids{parent_pid = Master,
- window_id = WinId,
- window_frame = WinFrame}, Mask}.
-
-
-
-
-
-check_node(OldNode, LocalNode) ->
- HomeNode = node(),
- case net_adm:ping(OldNode) of
- pong ->
- OldNode;
- pang when LocalNode ->
- %% The system has gone either distributed or undistributed.
- %% No matter which, HomeNode tells the current correct node.
- HomeNode;
- pang ->
- OldNode
- end.
-
-
-
-
-
-
-update_data_field(notext, {label, Id}) ->
- gs:config(Id, [{label, {text, "" }}]);
-update_data_field(notext, {listbox, Id}) ->
- gs:config(Id, [{items, []}]);
-update_data_field({Data}, {label, Id}) ->
- gs:config(Id, [{label, {text, " " ++ lists:flatten(io_lib:write(Data))}}]);
-update_data_field({Data}, {listbox, Id}) ->
- gs:config(Id, [{items, lists:map(fun(E) -> " " ++ lists:flatten(io_lib:write(E))
- end, Data)}]).
-
-
-
-
-print_info(mnesia, Node, LocalNode, TabId, CardIds) ->
- update_data_field({mnesia},
- CardIds#card_field_ids.table_type),
- update_data_field({TabId},
- CardIds#card_field_ids.table_name),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, type)},
- CardIds#card_field_ids.bag_or_set),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, arity) - 1},
- CardIds#card_field_ids.arity),
-
- AttributesList = tv_mnesia_rpc:table_info(Node, LocalNode, TabId, attributes),
- update_data_field({AttributesList},
- CardIds#card_field_ids.attributes),
- update_data_field({lists:map(fun(N) ->
- lists:nth(N - 1, AttributesList)
- end,
- [2] ++ tv_mnesia_rpc:table_info(Node,
- LocalNode,
- TabId,
- index)
- )
- },
- CardIds#card_field_ids.index),
-
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, size)},
- CardIds#card_field_ids.size),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, memory)},
- CardIds#card_field_ids.memory),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, storage_type)},
- CardIds#card_field_ids.storage_type),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, where_to_read)},
- CardIds#card_field_ids.where_to_read),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, disc_copies)},
- CardIds#card_field_ids.disc_copies),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, disc_only_copies)},
- CardIds#card_field_ids.disc_only_copies),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, ram_copies)},
- CardIds#card_field_ids.ram_copies),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, where_to_write)},
- CardIds#card_field_ids.where_to_write),
- update_data_field({tv_mnesia_rpc:table_info(Node, LocalNode, TabId, checkpoints)},
- CardIds#card_field_ids.checkpoints),
- {ok, TabId};
-print_info(ets, Node, LocalNode, TabId, CardIds) ->
- update_data_field({ets},
- CardIds#card_field_ids.table_type),
- update_data_field({TabId},
- CardIds#card_field_ids.table_id),
- TabName = tv_ets_rpc:info(Node, LocalNode, TabId, name),
- update_data_field({TabName},
- CardIds#card_field_ids.table_name),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, named_table)},
- CardIds#card_field_ids.named_table),
-
- OwnerPid = tv_ets_rpc:info(Node, LocalNode, TabId, owner),
- OwnerNameSearchResult = lists:keysearch(registered_name,
- 1,
- rpc:block_call(Node,
- erlang,
- process_info,
- [OwnerPid])),
- OwnerName = case OwnerNameSearchResult of
- false ->
- notext;
- {value, {registered_name, WantedName}} ->
- {WantedName}
- end,
- update_data_field({OwnerPid},
- CardIds#card_field_ids.owner_pid),
- update_data_field(OwnerName,
- CardIds#card_field_ids.owner_name),
-
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, keypos)},
- CardIds#card_field_ids.keypos),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, type)},
- CardIds#card_field_ids.bag_or_set),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, protection)},
- CardIds#card_field_ids.protection),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, size)},
- CardIds#card_field_ids.size),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, memory)},
- CardIds#card_field_ids.memory),
- update_data_field({tv_ets_rpc:info(Node, LocalNode, TabId, node)},
- CardIds#card_field_ids.node),
- {ok, TabName}.
-
-
-
-
-
-
-print_cards(mnesia, Card1, Card2, Card3, Card4) ->
- create_card_text(1, "Table Type:", Card1),
- create_card_text(2, "Table Name:", Card1),
-
- create_card_text(1, "Table Type:", Card2),
- create_card_text(2, "Number of Attributes:", Card2),
-% create_card_text(3, "Attribute Names:", Card2),
-% create_card_text(4, "Index Positions:", Card2),
-
- create_card_text(1, "Number of Elements Stored:", Card3),
- create_card_text(2, "Number of Words Allocated:", Card3),
-
- create_card_text(1, "Local Storage Type:", Card4),
- create_card_text(2, "Table Readable at Node:", Card4),
-% create_card_text(3, "Disc Copy Nodes:", Card4),
-% create_card_text(4, "Disc Copy Only Nodes:", Card4),
-% create_card_text(5, "RAM Copy Nodes:", Card4),
-% create_card_text(6, "Active Table Replica Nodes:", Card4),
-% create_card_text(7, "Active Checkpoints:", Card4),
-
- {AttributesId, IndexId} = create_special_fields(mnesia, size_card, Card2),
-
-
- {DiscCopiesId, DiscOnlyCopiesId, RamCopiesId, WhereToWriteId, CheckpointsId} =
- create_special_fields(mnesia, storage_card, Card4),
-
- #card_field_ids{table_name = {label, create_card_data_field(2, Card1)},
- table_type = {label, create_card_data_field(1, Card1)},
- bag_or_set = {label, create_card_data_field(1, Card2)},
- arity = {label, create_card_data_field(2, Card2)},
- attributes = AttributesId,
- index = IndexId,
- size = {label, create_card_data_field(1, Card3)},
- memory = {label, create_card_data_field(2, Card3)},
- storage_type = {label, create_card_data_field(1, Card4)},
- where_to_read = {label, create_card_data_field(2, Card4)},
- disc_copies = DiscCopiesId,
- disc_only_copies = DiscOnlyCopiesId,
- ram_copies = RamCopiesId,
- where_to_write = WhereToWriteId,
- checkpoints = CheckpointsId
- };
-print_cards(ets, Card1, Card2, Card3, Card4) ->
- create_card_text(1, "Table Type:", Card1),
- create_card_text(2, "Table Id:", Card1),
- create_card_text(3, "Table Name:", Card1),
- create_card_text(4, "Table Name Registered:", Card1),
- create_card_text(5, "Process Owning the Table:", Card1),
- create_card_text(6, "Name of Owning Process:", Card1),
-
- create_card_text(1, "Index Position:", Card2),
- create_card_text(2, "Table Type:", Card2),
- create_card_text(3, "Protection Mode:", Card2),
-
- create_card_text(1, "Number of Elements Stored:", Card3),
- create_card_text(2, "Number of Words Allocated:", Card3),
-
- create_card_text(1, "Table Stored at Node:", Card4),
-
- #card_field_ids{table_id = {label, create_card_data_field(2, Card1)},
- table_type = {label, create_card_data_field(1, Card1)},
- table_name = {label, create_card_data_field(3, Card1)},
- named_table = {label, create_card_data_field(4, Card1)},
- owner_pid = {label, create_card_data_field(5, Card1)},
- owner_name = {label, create_card_data_field(6, Card1)},
-
- keypos = {label, create_card_data_field(1, Card2)},
- bag_or_set = {label, create_card_data_field(2, Card2)},
- protection = {label, create_card_data_field(3, Card2)},
-
- size = {label, create_card_data_field(1, Card3)},
- memory = {label, create_card_data_field(2, Card3)},
-
- node = {label, create_card_data_field(1, Card4)}
- }.
-
-
-
-
-
-
-create_special_fields(mnesia, size_card, CardId) ->
- LabelWidth = 195,
- LabelHeight = 24,
- ListboxWidth = 210,
- ListboxHeight = 160,
- VerticalSpacing = 20,
- LXpos = 30,
- RXpos = 330,
- Ypos = 40 + (LabelHeight + VerticalSpacing) * 2 + 25,
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, LXpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Attribute Names:"}}
- ]),
-
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, RXpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Attributes Used as Indices:"}}
- ]),
-
- AttributesId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, LXpos},
- {y, Ypos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- IndexId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, RXpos},
- {y, Ypos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- {{listbox, AttributesId},
- {listbox, IndexId}
- };
-create_special_fields(mnesia, storage_card, CardId) ->
- LabelWidth = 155,
- LabelHeight = 24,
- ListboxHeight = 80,
- ListboxWidth = 170,
- VerticalSpacing = 20,
- LXpos = 10,
- MXpos = 197,
- RXpos = 385,
- % Y-positions for upper and lower row.
- UYpos = 40 + (LabelHeight + VerticalSpacing) * 2,
- LYpos = UYpos + ListboxHeight + 37,
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, LXpos},
- {y, UYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Disc Copy Nodes:"}}
- ]),
-
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, MXpos},
- {y, UYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Disc Only Copy Nodes:"}}
- ]),
-
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, RXpos},
- {y, UYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "RAM Copy Nodes:"}}
- ]),
-
-
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, LXpos},
- {y, LYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Table Replica Nodes:"}}
- ]),
-
- gs:label(CardId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, MXpos},
- {y, LYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {label, {text, "Active Checkpoints:"}}
- ]),
-
-
- DiscCopiesId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, LXpos},
- {y, UYpos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- DiscCopiesOnlyId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, MXpos},
- {y, UYpos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- RamCopiesId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, RXpos},
- {y, UYpos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
-
-
- WhereToWriteId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, LXpos},
- {y, LYpos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- CheckpointsId = gs:listbox(CardId, [{width, ListboxWidth},
- {height, ListboxHeight},
- {x, MXpos},
- {y, LYpos + LabelHeight - 3},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {hscroll, bottom},
- {vscroll, right},
- {selectmode, single},
- {click, true},
- {doubleclick, true},
- {data, listbox}
- ]),
-
- {{listbox, DiscCopiesId},
- {listbox, DiscCopiesOnlyId},
- {listbox, RamCopiesId},
- {listbox, WhereToWriteId},
- {listbox, CheckpointsId}
- }.
-
-
-
-
-
-
-
-create_card_data_field(N, ParentId) ->
- Width = 345,
- Height = 24,
- VerticalSpacing = 20,
- Xpos = 210,
- Ypos = 40 + (Height + VerticalSpacing) * (N - 1),
-
- BgFrame = gs:frame(ParentId, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- {bg, {0, 0, 0}},
- {bw, 0}
- ]),
- gs:label(BgFrame, [{width, Width - 2},
- {height, Height - 2},
- {x, 1},
- {y, 1},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {align, w}
- ]).
-
-
-
-
-
-
-create_card_text(N, Text, ParentId) ->
- LabelWidth = 205,
- LabelHeight = 24,
- VerticalSpacing = 20,
- Xpos = 10,
- Ypos = 40 + (LabelHeight + VerticalSpacing) * (N - 1),
- gs:label(ParentId, [{width, LabelWidth},
- {height, LabelHeight},
- {x, Xpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, w},
- {label, {text, Text}}
- ]).
-
-
-
-
-create_card(ParentId, FlapId) ->
- CardId = gs:frame(ParentId, [{width, 570},
- {height, 360},
- {x, 5},
- {y, 35},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, 2}
- ]),
- FlapXpos = gs:read(FlapId, data),
- gs:config(FlapId, [{data, {CardId, FlapXpos}}
- ]),
- CardId.
-
-
-
-
-
-set_flap_label(ParentId, Text) ->
- Bw = gs:read(ParentId, bw), % It is assumed that the parent is a frame! :-)
- Width = gs:read(ParentId, width) - 2 * Bw - 2,
- Height = gs:read(ParentId, height) - 2 * Bw - 6,
- Xpos = 0,
- Ypos = 0,
- Data = gs:read(ParentId, data),
-
- gs:label(ParentId, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- % {fg, {178, 34, 34}},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {label, {text, Text}},
- {align, center},
- {buttonpress, true},
- {data, Data}
- ]).
-
-
-
-create_flap(N, _Text, ParentId) ->
- Width = 120,
- Height = 40,
- Spacing = 2,
- FirstXpos = 5,
- Xpos = FirstXpos + ((Width + Spacing) * (N - 1)),
- Ypos = 5,
- BorderWidth = 2,
-
- gs:frame(ParentId, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, BorderWidth},
- {cursor, hand},
- {buttonpress, true},
- {data, Xpos + BorderWidth}
- ]).
-
-
-
-update_info_flaps(TabType, Node, LocalNode, TabId, CardIds, MasterPid) ->
- case catch print_info(TabType, Node, LocalNode, TabId, CardIds) of
- {ok, TabName} ->
- WinTitle = tv_pc_menu_handling:get_window_title(TabType,Node,TabId,TabName),
- gs:config(win, [{title, "[TV] " ++ WinTitle}]),
- done;
- nodedown ->
- nodedown;
- no_table ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- Msg = ["The table " ++ lists:flatten(io_lib:write(TabId)) ++ " on node",
- lists:flatten(io_lib:write(Node)) ++ " no longer exists!"],
- tv_utils:notify(win, "TV Notification", Msg);
- haiku ->
- Msg = ["Three things are certain:",
- "Death, taxes, and lost tables.",
- "Guess which has occurred."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- MasterPid ! #ip_dead_table{sender = self()};
- mnesia_not_started ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- Msg = ["The table " ++ lists:flatten(io_lib:write(TabId)) ++ " on node",
- lists:flatten(io_lib:write(Node)) ++ " no longer exists!"],
- tv_utils:notify(win, "TV Notification", Msg);
- haiku ->
- Msg = ["A table that big?",
- "It might be very useful.",
- "But now it is gone."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- MasterPid ! #ip_dead_table{sender = self()};
- {unexpected_error,Reason} ->
- io:format("Unexpected error: ~p~n", [Reason]);
- _Other ->
- io:format("Unexpected return value: ~p~n", [_Other]),
- done
- end.
-
-
-
-
-loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType) ->
- receive
- #info_update_table_info{sender = Sender} ->
- NewNode = check_node(Node, LocalNode),
- update_info_flaps(TabType, NewNode, LocalNode, TabId, CardIds, Sender),
- loop(CardIds, MaskLabel, NewNode, LocalNode, TabId, TabType);
-
-
- #info_raise_window{sender = Sender} ->
- gs:config(CardIds#card_field_ids.window_id, [raise]),
- NewNode = check_node(Node, LocalNode),
- chk(update_info_flaps(TabType, NewNode, LocalNode, TabId, CardIds, Sender)),
- loop(CardIds, MaskLabel, NewNode, LocalNode, TabId, TabType);
-
-
- #info_quit{} ->
- exit(normal);
-
- {gs, _FlapId, buttonpress, {CardId, Xpos}, [1 | _]} ->
- gs:config(CardId, [raise
- ]),
- gs:config(MaskLabel, [raise,
- {x, Xpos}
- ]),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, _Id, buttonpress, {_CardId, _Xpos}, _Args} ->
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, _LblId, enter, _Data, _Args} ->
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, WinId, configure, _Data, _Args} ->
- gs:config(WinId, [{width, ?WINDOW_WIDTH},
- {height, ?WINDOW_HEIGHT}
- ]),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, ListboxId, click, listbox, _Args} ->
- gs:config(ListboxId, [{selection, clear}]),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, ListboxId, doubleclick, listbox, _Args} ->
- gs:config(ListboxId, [{selection, clear}]),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- {gs, _Id, click, update, _Args} ->
- NewNode = check_node(Node, LocalNode),
- chk(update_info_flaps(TabType,NewNode,LocalNode,TabId,CardIds,
- CardIds#card_field_ids.parent_pid)),
- loop(CardIds, MaskLabel, NewNode, LocalNode, TabId, TabType);
-
- {gs, _Id, keypress, _, [r, _, 0, 1 | _]} ->
- NewNode = check_node(Node, LocalNode),
- chk(update_info_flaps(TabType,NewNode,LocalNode,TabId,CardIds,
- CardIds#card_field_ids.parent_pid)),
- loop(CardIds, MaskLabel, NewNode, LocalNode, TabId, TabType);
-
- {gs, _Id, keypress, _, ['R', _, 1, 1 | _]} ->
- NewNode = check_node(Node, LocalNode),
- chk(update_info_flaps(TabType,NewNode,LocalNode,TabId,CardIds,
- CardIds#card_field_ids.parent_pid)),
- loop(CardIds, MaskLabel, NewNode, LocalNode, TabId, TabType);
-
- {gs, _Id, click, close_menu, _Args} ->
- exit(normal);
-
- {gs, _Id, keypress, _, [c, _, 0, 1 | _]} ->
- exit(normal);
-
- {gs, _Id, keypress, _, ['C', _, 1, 1 | _]} ->
- exit(normal);
-
- {gs, _Id, destroy, _Data, _Args} ->
- exit(normal);
-
- {'EXIT', _Pid, _Reason} ->
- exit(normal);
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType);
-
- _Other ->
- loop(CardIds, MaskLabel, Node, LocalNode, TabId, TabType)
- end.
-
-
-
-
-
-
-chk(nodedown) ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(win, "TV Notification",
- ["The node is down, and the",
- "table cannot be reached."]);
- haiku ->
- ErrMsg1 = ["With searching comes loss",
- "And the presence of absence:",
- "Node is down."],
- tv_utils:notify(win, "TV Notification", ErrMsg1)
- end;
-chk(_Other) ->
- done.
-
diff --git a/lib/tv/src/tv_int_def.hrl b/lib/tv/src/tv_int_def.hrl
deleted file mode 100644
index 6d4263c51b..0000000000
--- a/lib/tv/src/tv_int_def.hrl
+++ /dev/null
@@ -1,56 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Internal definitions for the table tool as a whole.
-%%%
-%%%*********************************************************************
-
--define(COMM_FUNC_FILE, tv_comm_func).
-
--define(ITEMS_TO_DISPLAY, 35).
-
-
--define(DEFAULT_BACKGROUND_COLOR, {255, 255, 255}). % white
-
-
-% Colors used for marking updates.
-
--define(BLACK, { 0, 0, 0}).
-
--define(RED1, {255, 0, 0}).
--define(RED2, {255, 100, 100}).
--define(RED3, {255, 150, 150}).
--define(RED4, {255, 200, 200}).
--define(RED5, {235, 217, 217}).
-
-
--define(GREEN1, { 0, 255, 0}).
--define(GREEN2, {115, 255, 135}).
--define(GREEN3, {125, 225, 150}).
--define(GREEN4, {170, 225, 185}).
--define(GREEN5, {195, 219, 202}).
-
--define(DEFAULT_BTN_COLOR, {217, 217, 217}).
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_int_msg.hrl b/lib/tv/src/tv_int_msg.hrl
deleted file mode 100644
index 75ce8eca3b..0000000000
--- a/lib/tv/src/tv_int_msg.hrl
+++ /dev/null
@@ -1,504 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: File containing all messages used internally
-%%% between the various table tool components.
-%%%
-%%%*********************************************************************
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY PC
-%%%*********************************************************************
-
-
-
--record(pc_raise_window, {sender}).
-
-
-
--record(pc_menu_msg, {sender,
- data}).
-
-
-
--record(pc_win_conf, {sender,
- width,
- height}).
-
-
-
--record(pc_show_table_info, {sender}).
-
-
-
--record(pc_poll_table, {sender}).
-
-
-
--record(pc_select, {sender}).
-
-
-
--record(pc_help, {sender}).
-
-
-
--record(pc_set_sorting_mode, {sender,
- sorting, % 'true' or 'false'
- reverse, % 'true' or 'false',
- sort_key_no = 1
- }).
-
-
-
--record(pc_set_sorting_mode_cfm, {sender,
- sort_key_no
- }).
-
-
-
--record(pc_marked_row, {sender,
- row_no,
- object,
- color
- }).
-
-
-
--record(pc_data_req, {sender,
- element,
- nof_elements
- }).
-
-
-
--record(pc_resend_data, {sender}).
-
-
-
-
--record(pc_data, {sender,
- scale_pos, % vertical scale
- scale_range, % vertical scale
- max_elem_size,
- list_range,
- elementlist,
- marked_row,
- list_of_keys,
- color}).
-
-
-
-
--record(pc_list_info, {sender,
- lists_as_strings}).
-
-
-
--record(pc_dead_table, {sender,
- automatic_polling}).
-
-
-
--record(pc_nodedown, {sender,
- automatic_polling}).
-
-
-
--record(pc_search_req, {sender
- }).
-
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY PD
-%%%*********************************************************************
-
-
-
--record(pd_win_conf, {sender,
- width,
- height}).
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data: sender: Pid of the sender of the message.
-%% win: Id of window to create canvas and scale in.
-%% win_width: width of the window to create the canvas in.
-%% win_height: height of the window to create the canvas in.
-%% scale: whether a scale shall be shown or not.
-%% Possible values: true -- scale is shown.
-%% false -- scale is not shown.
-%%======================================================================
-
--record(pd_deblock, {sender,
- win,
- win_width,
- win_height,
- scale = false,
- range}).
-
-
-
-
--record(pd_deblock_cfm, {sender}).
-
-
-
--record(pd_new_table, {sender,
- table_type,
- table_name,
- record_name, %% Only valid for Mnesia tables.
- writable
- }).
-
-
-
--record(pd_get_sort_settings, {sender,
- sorting,
- reverse
- }).
-
-
-
--record(pd_no_sorting, {sender
- }).
-
-
-
-
--record(pd_ignore, {sender
- }).
-
-
-
-
--record(pd_updated_object, {sender,
- object,
- old_object,
- old_color, %% Tells status of the object, if deleted or present.
- obj_no
- }).
-
-
-
--record(pd_new_object, {sender, %% Used when no row is marked.
- object %% Note: may still be an updated object!
- }).
-
-
-
--record(pd_delete_object, {sender,
- object,
- color
- }).
-
-
-
--record(pd_rec_edit, {sender,
- attributes
- }).
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY PW
-%%%*********************************************************************
-
-
-
-
--record(pw_deblock, {sender,
- win_title,
- win_width,
- win_height,
- min_win_width,
- min_win_height}).
-
-
-
--record(pw_set_window_title, {sender,
- win_title}).
-
-
-
--record(pw_deblock_cfm, {sender,
- win_id}).
-
-
-
-
-%%======================================================================
-%% Message: pw_create_menu.
-%%
-%% Function: Order to pw to create a menu according to the content of the message.
-%%
-%% Data: menutitle: string containing the name of the menu, e.g., "File".
-%% menulist: list of tuples having the following format:
-%% {Text, Data}, where Text is the string that shall be
-%% written in each menulist item, and Data is optional data,
-%% presumably the name of a function that is to be called
-%% when the corresponding menulist message is received.
-%%======================================================================
-
--record(pw_create_menu, {sender,
- menutitle,
- title_acc_pos,
- menulist}).
-
-
-
--record(pw_create_menu_cfm, {sender}).
-
-
-
--record(pw_select_menu, {sender,
- menu,
- old_menus}).
-
-
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY DBS
-%%%*********************************************************************
-
-
-
--record(dbs_deblock, {sender,
- etsread_pid,
- type,
- keypos,
- sublist_length}).
-
-
-
--record(dbs_deblock_cfm, {sender}).
-
-
-
-
--record(dbs_new_data, {sender,
- data,
- keys,
- time_to_read_table
- }).
-
-
-
--record(dbs_new_mnesia_data, {sender,
- new_or_changed,
- deleted,
- keys
- }).
-
-
-
--record(dbs_subset, {sender,
- data,
- requested_row,
- subset_pos,
- db_length,
- max_elem_size,
- list_of_keys,
- required_time_etsread,
- required_time_dbs}).
-
-
-
-
-
--record(dbs_subset_req, {sender,
- subset_pos,
- subset_length
- }).
-
-
-
-
--record(dbs_sorting_mode, {sender,
- sorting, % 'true' or 'false'
- reverse, % 'true' or 'false'
- sort_key_no
- }).
-
-
-
--record(dbs_marked_row, {sender,
- row_no
- }).
-
-
-
-
--record(dbs_search_req, {sender
- }).
-
-
-
--record(dbs_updated_object, {sender,
- object,
- old_object,
- old_color,
- obj_no
- }).
-
-
--record(dbs_new_object, {sender,
- object
- }).
-
-
--record(dbs_delete_object, {sender,
- object,
- color,
- obj_no
- }).
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY ETSREAD
-%%%*********************************************************************
-
-
-
--record(etsread_update_object, {sender,
- object,
- old_object,
- key_no
- }).
-
--record(etsread_update_object_cfm, {sender,
- success
- }).
-
-
-
--record(etsread_new_object, {sender,
- object
- }).
-
-
--record(etsread_new_object_cfm, {sender,
- success
- }).
-
-
-
--record(etsread_delete_object, {sender,
- object,
- key_no
- }).
-
-
--record(etsread_delete_object_cfm, {sender,
- success
- }).
-
-
-
--record(etsread_deblock, {sender,
- dbs_pid,
- node,
- local_node,
- table_id,
- table_type, % One of 'ets' or 'mnesia'
- poll_interval
- }).
-
-
-
--record(etsread_deblock_cfm, {sender,
- type,
- keypos,
- protection
- }).
-
-
-
--record(etsread_set_poll_interval, {sender,
- interval}).
-
-
-
--record(etsread_poll_table, {sender}).
-
-
-
--record(etsread_nodedown, {sender}).
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY IP
-%%%*********************************************************************
-
-
-
-
--record(ip_dead_table, {sender}).
-
-
--record(ip_register_parent, {sender}).
-
-
-
--record(ip_update, {sender,
- nof_elements_to_mark,
- text}).
-
-
-
--record(ip_quit, {sender}).
-
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY INFO
-%%%*********************************************************************
-
-
--record(info_update_table_info, {sender}).
-
-
-
--record(info_raise_window, {sender}).
-
-
-
--record(info_restart, {sender,
- node,
- table_id,
- table_type}).
-
-
-
--record(info_quit, {sender}).
-
-
diff --git a/lib/tv/src/tv_io_lib.erl b/lib/tv/src/tv_io_lib.erl
deleted file mode 100644
index 5457575b7d..0000000000
--- a/lib/tv/src/tv_io_lib.erl
+++ /dev/null
@@ -1,223 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: This file contains io functions adapted to the
-%%% TV requirements.
-%%%
-%%%*********************************************************************
-
--module(tv_io_lib).
-
-
--export([format/2]).
-
--export([write/1,write/2]).
--export([write_atom/1,write_string/2]).
-
--export([char_list/1,deep_char_list/1,printable_list/1]).
-
-
-
-%% Interface calls to sub-modules.
-
-format(Format, Args) ->
- tv_io_lib_format:fwrite(Format, Args).
-
-
-%% write(Term)
-%% write(Term, Depth)
-%% write(Term, Depth, Pretty)
-%% Return a (non-flattened) list of characters giving a printed
-%% representation of the term.
-
-write(Term) -> write(Term, -1).
-
-write(_Term, 0) -> "...";
-write(Term, _D) when is_integer(Term) -> integer_to_list(Term);
-write(Term, _D) when is_float(Term) -> tv_io_lib_format:fwrite_g(Term);
-write(Atom, _D) when is_atom(Atom) -> write_atom(Atom);
-write(Term, _D) when is_port(Term) -> lists:flatten(io_lib:write(Term));
-write(Term, _D) when is_pid(Term) -> pid_to_list(Term);
-write(Term, _D) when is_reference(Term) -> io_lib:write(Term);
-write(Term, _D) when is_binary(Term), byte_size(Term) > 100 -> "#Bin";
-write(Term, _D) when is_binary(Term) -> "<<\"" ++ binary_to_list(Term) ++ "\">>";
-write(Term, _D) when is_bitstring(Term) -> "#Bitstr";
-write([], _D) -> "[]";
-write({}, _D) -> "{}";
-write([H|T], D) ->
- if
- D =:= 1 -> "[...]";
- true ->
- [$[,[write(H, D-1)|write_tail(T, D-1)],$]]
- end;
-write(F, _D) when is_function(F) ->
- {module,M} = erlang:fun_info(F, module),
- ["#Fun<",atom_to_list(M),">"];
-write(T, D) when is_tuple(T) ->
- if
- D =:= 1 -> "{...}";
- true ->
- [${,
- [write(element(1, T), D-1)|write_tail(tl(tuple_to_list(T)), D-1)],
- $}]
- end.
-
-%% write_tail(List, Depth)
-%% Test the terminating case first as this looks better with depth.
-
-write_tail([], _D) -> "";
-write_tail(_List, 1) -> "|...";
-write_tail([H|T], D) ->
- [$,,write(H, D-1)|write_tail(T, D-1)];
-write_tail(Other, D) ->
- [$|,write(Other, D-1)].
-
-%% write_atom(Atom) -> [Char]
-%% Generate the list of characters needed to print an atom.
-
-write_atom(Atom) ->
- Chars = atom_to_list(Atom),
- case quote_atom(Atom, Chars) of
- true ->
- write_string(Chars, $');
- false ->
- Chars
- end.
-
-
-write_string(S, Q) ->
- [Q|write_string1(S, Q)].
-
-write_string1([], Q) ->
- [Q];
-write_string1([C|Cs], Q) ->
- write_char(C, Q, write_string1(Cs, Q)).
-
-
-write_char(Q, Q, Tail) -> %Must check this first
- [$\\,Q|Tail];
-write_char($\\, _, Tail) -> %In printable character range
- [$\\,$\\|Tail];
-write_char(C, _, Tail) when C >= $ , C =< $~ ->
- [C|Tail];
-write_char(C, _, Tail) when C >= 128+$ , C =< 255 ->
- [C|Tail];
-write_char($\n, _Q, Tail) -> %\n = LF
- [$\\,$n|Tail];
-write_char($\r, _, Tail) -> %\r = CR
- [$\\,$r|Tail];
-write_char($\t, _, Tail) -> %\t = TAB
- [$\\,$t|Tail];
-write_char($\v, _, Tail) -> %\v = VT
- [$\\,$v|Tail];
-write_char($\b, _, Tail) -> %\b = BS
- [$\\,$b|Tail];
-write_char($\f, _, Tail) -> %\f = FF
- [$\\,$f|Tail];
-write_char($\e, _, Tail) -> %\e = ESC
- [$\\,$e|Tail];
-write_char($\d, _, Tail) -> %\d = DEL
- [$\\,$d|Tail];
-write_char(C, _, Tail) when C < $ ->
- C1 = (C bsr 3) + $0,
- C2 = (C band 7) + $0,
- [$\\,$0,C1,C2|Tail];
-write_char(C, _, Tail) when C > $~ ->
- C1 = (C bsr 6) + $0,
- C2 = ((C bsr 3) band 7) + $0,
- C3 = (C band 7) + $0,
- [$\\,C1,C2,C3|Tail].
-
-%% quote_atom(Atom, CharList)
-%% Return 'true' if atom with chars in CharList needs to be quoted, else
-%% return 'false'.
-
-quote_atom(Atom, Cs0) ->
- case erl_scan:reserved_word(Atom) of
- true -> true;
- false ->
- case Cs0 of
- [C|Cs] when C >= $a, C =< $z ->
- quote_atom(Cs);
- _ -> true
- end
- end.
-
-quote_atom([C|Cs]) when C >= $a, C =< $z ->
- quote_atom(Cs);
-quote_atom([C|Cs]) when C >= $A, C =< $Z ->
- quote_atom(Cs);
-quote_atom([C|Cs]) when C >= $0, C =< $9 ->
- quote_atom(Cs);
-quote_atom([$_|Cs]) ->
- quote_atom(Cs);
-quote_atom([$@|Cs]) ->
- quote_atom(Cs);
-quote_atom([_|_]) ->
- true;
-quote_atom([]) ->
- false.
-
-%% char_list(CharList)
-%% deep_char_list(CharList)
-%% Return true if CharList is a (possibly deep) list of characters, else
-%% false.
-
-char_list([C|Cs]) when is_integer(C), C >= 0, C =< 255 ->
- char_list(Cs);
-char_list([]) -> true;
-char_list(_Other) -> false. %Everything else is false
-
-deep_char_list(Cs) ->
- deep_char_list(Cs, []).
-
-deep_char_list([C|Cs], More) when is_list(C) ->
- deep_char_list(C, [Cs|More]);
-deep_char_list([C|Cs], More) when is_integer(C), C >= 0, C =< 255 ->
- deep_char_list(Cs, More);
-deep_char_list([], [Cs|More]) ->
- deep_char_list(Cs, More);
-deep_char_list([], []) -> true;
-deep_char_list(_Other, _More) -> %Everything else is false
- false.
-
-%% printable_list([Char]) -> bool()
-%% Return true if CharList is a list of printable characters, else
-%% false.
-
-printable_list([C|Cs]) when is_integer(C), C >= $ , C =< 255 ->
- printable_list(Cs);
-printable_list([$\n|Cs]) ->
- printable_list(Cs);
-printable_list([$\r|Cs]) ->
- printable_list(Cs);
-printable_list([$\t|Cs]) ->
- printable_list(Cs);
-printable_list([$\v|Cs]) ->
- printable_list(Cs);
-printable_list([$\b|Cs]) ->
- printable_list(Cs);
-printable_list([$\f|Cs]) ->
- printable_list(Cs);
-printable_list([$\e|Cs]) ->
- printable_list(Cs);
-printable_list([]) -> true;
-printable_list(_Other) -> false. %Everything else is false
-
-
diff --git a/lib/tv/src/tv_io_lib_format.erl b/lib/tv/src/tv_io_lib_format.erl
deleted file mode 100644
index e043d9296e..0000000000
--- a/lib/tv/src/tv_io_lib_format.erl
+++ /dev/null
@@ -1,386 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_io_lib_format).
-
-
--export([fwrite/2,fwrite_g/1,indentation/2]).
-
-
-%% fwrite(Format, ArgList) -> [Char].
-%% Format the arguments in ArgList after string Format. Just generate
-%% an error if there is an error in the arguments.
-%%
-%% To do the printing command correctly we need to calculate the
-%% current indentation for everything before it. This may be very
-%% expensive, especially when it is not needed, so we first determine
-%% if, and for how long, we need to calculate the indentations. We do
-%% this by first collecting all the control sequences and
-%% corresponding arguments, then counting the print sequences and
-%% then building the output. This method has some drawbacks, it does
-%% two passes over the format string and creates more temporary data,
-%% and it also splits the handling of the control characters into two
-%% parts.
-
-fwrite(Format, Args) when is_atom(Format) ->
- fwrite(atom_to_list(Format), Args);
-fwrite(Format, Args) ->
- Cs = collect(Format, Args),
- Pc = pcount(Cs),
- build(Cs, Pc, 0).
-
-collect([$~|Fmt0], Args0) ->
- {C,Fmt1,Args1} = collect_cseq(Fmt0, Args0),
- [C|collect(Fmt1, Args1)];
-collect([C|Fmt], Args) ->
- [C|collect(Fmt, Args)];
-collect([], []) -> [].
-
-collect_cseq(Fmt0, Args0) ->
- {F,Ad,Fmt1,Args1} = field_width(Fmt0, Args0),
- {P,Fmt2,Args2} = precision(Fmt1, Args1),
- {Pad,Fmt3,Args3} = pad_char(Fmt2, Args2),
- {C,As,Fmt4,Args4} = collect_cc(Fmt3, Args3),
- {{C,As,F,Ad,P,Pad},Fmt4,Args4}.
-
-field_width([$-|Fmt0], Args0) ->
- {F,Fmt,Args} = field_value(Fmt0, Args0),
- field_width(-F, Fmt, Args);
-field_width(Fmt0, Args0) ->
- {F,Fmt,Args} = field_value(Fmt0, Args0),
- field_width(F, Fmt, Args).
-
-field_width(F, Fmt, Args) when F < 0 ->
- {-F,left,Fmt,Args};
-field_width(F, Fmt, Args) when F >= 0 ->
- {F,right,Fmt,Args}.
-
-precision([$.|Fmt], Args) ->
- field_value(Fmt, Args);
-precision(Fmt, Args) ->
- {none,Fmt,Args}.
-
-field_value([$*|Fmt], [A|Args]) when is_integer(A) ->
- {A,Fmt,Args};
-field_value([C|Fmt], Args) when C >= $0, C =< $9 ->
- field_value([C|Fmt], Args, 0);
-field_value(Fmt, Args) ->
- {none,Fmt,Args}.
-
-field_value([C|Fmt], Args, F) when C >= $0, C =< $9 ->
- field_value(Fmt, Args, 10*F + (C - $0));
-field_value(Fmt, Args, F) -> %Default case
- {F,Fmt,Args}.
-
-pad_char([$.,$*|Fmt], [Pad|Args]) -> {Pad,Fmt,Args};
-pad_char([$.,Pad|Fmt], Args) -> {Pad,Fmt,Args};
-pad_char(Fmt, Args) -> {$ ,Fmt,Args}.
-
-%% collect_cc([FormatChar], [Argument]) ->
-%% {Control,[ControlArg],[FormatChar],[Arg]}.
-%% Here we collect the argments for each control character.
-%% Be explicit to cause failure early.
-
-collect_cc([$w|Fmt], [A|Args]) -> {$w,[A],Fmt,Args};
-collect_cc([$p|Fmt], [A|Args]) -> {$p,[A],Fmt,Args};
-collect_cc([$W|Fmt], [A,Depth|Args]) -> {$W,[A,Depth],Fmt,Args};
-collect_cc([$P|Fmt], [A,Depth|Args]) -> {$P,[A,Depth],Fmt,Args};
-collect_cc([$s|Fmt], [A|Args]) -> {$s,[A],Fmt,Args};
-collect_cc([$e|Fmt], [A|Args]) -> {$e,[A],Fmt,Args};
-collect_cc([$f|Fmt], [A|Args]) -> {$f,[A],Fmt,Args};
-collect_cc([$g|Fmt], [A|Args]) -> {$g,[A],Fmt,Args};
-collect_cc([$c|Fmt], [A|Args]) -> {$c,[A],Fmt,Args};
-collect_cc([$~|Fmt], Args) -> {$~,[],Fmt,Args};
-collect_cc([$n|Fmt], Args) -> {$n,[],Fmt,Args};
-collect_cc([$i|Fmt], [A|Args]) -> {$i,[A],Fmt,Args}.
-
-%% pcount([ControlC]) -> Count.
-%% Count the number of print requests.
-
-pcount(Cs) -> pcount(Cs, 0).
-
-pcount([{$p,_As,_F,_Ad,_P,_Pad}|Cs], Acc) -> pcount(Cs, Acc+1);
-pcount([{$P,_As,_F,_Ad,_P,_Pad}|Cs], Acc) -> pcount(Cs, Acc+1);
-pcount([_|Cs], Acc) -> pcount(Cs, Acc);
-pcount([], Acc) -> Acc.
-
-%% build([Control], Pc, Indentation) -> [Char].
-%% Interpret the control structures. Count the number of print
-%% remaining and only calculate indentation when necessary. Must also
-%% be smart when calculating indentation for characters in format.
-
-build([{C,As,F,Ad,P,Pad}|Cs], Pc0, I) ->
- S = control(C, As, F, Ad, P, Pad, I),
- Pc1 = decr_pc(C, Pc0),
- if
- Pc1 > 0 -> [S|build(Cs, Pc1, indentation(S, I))];
- true -> [S|build(Cs, Pc1, I)]
- end;
-build([$\n|Cs], Pc, _I) -> [$\n|build(Cs, Pc, 0)];
-build([$\t|Cs], Pc, I) -> [$\t|build(Cs, Pc, ((I + 8) div 8) * 8)];
-build([C|Cs], Pc, I) -> [C|build(Cs, Pc, I+1)];
-build([], _, _) -> [].
-
-decr_pc($p, Pc) -> Pc - 1;
-decr_pc($P, Pc) -> Pc - 1;
-decr_pc(_C, Pc) -> Pc.
-
-%% control(FormatChar, [Argument], FieldWidth, Adjust, Precision, PadChar,
-
-%% Indentation) ->
-%% [Char]
-%% This is the main dispatch function for the various formatting commands.
-%% Field widths and precisions have already been calculated.
-
-control($w, [A], F, Adj, P, Pad, _I) ->
- term(tv_io_lib:write(A, -1), F, Adj, P, Pad);
-control($p, [A], F, Adj, P, Pad, I) ->
- print(A, -1, F, Adj, P, Pad, I);
-control($W, [A,Depth], F, Adj, P, Pad, _I) when is_integer(Depth) ->
- term(tv_io_lib:write(A, Depth), F, Adj, P, Pad);
-control($P, [A,Depth], F, Adj, P, Pad, I) when is_integer(Depth) ->
- print(A, Depth, F, Adj, P, Pad, I);
-control($s, [A], F, Adj, P, Pad, _I) when is_atom(A) ->
- string(atom_to_list(A), F, Adj, P, Pad);
-control($s, [L], F, Adj, P, Pad, _I) ->
- true = tv_io_lib:deep_char_list(L), %Check if L a character list
- string(L, F, Adj, P, Pad);
-control($e, [A], F, Adj, P, Pad, _I) when is_float(A) ->
- fwrite_e(A, F, Adj, P, Pad);
-control($f, [A], F, Adj, P, Pad, _I) when is_float(A) ->
- fwrite_f(A, F, Adj, P, Pad);
-control($g, [A], F, Adj, P, Pad, _I) when is_float(A) ->
- fwrite_g(A, F, Adj, P, Pad);
-control($c, [A], F, Adj, P, Pad, _I) when is_integer(A) ->
- char(A band 255, F, Adj, P, Pad);
-control($~, [], F, Adj, P, Pad, _I) -> char($~, F, Adj, P, Pad);
-control($n, [], F, Adj, P, Pad, _I) -> newline(F, Adj, P, Pad);
-control($i, [_A], _F, _Adj, _P, _Pad, _I) -> [].
-
-%% indentation([Char], Indentation) -> Indentation.
-%% Calculate the indentation of the end of a string given its start
-%% indentation. We assume tabs at 8 cols.
-
-indentation([$\n|Cs], _I) -> indentation(Cs, 0);
-indentation([$\t|Cs], I) -> indentation(Cs, ((I + 8) div 8) * 8);
-indentation([C|Cs], I) when is_integer(C) ->
- indentation(Cs, I+1);
-indentation([C|Cs], I) ->
- indentation(Cs, indentation(C, I));
-indentation([], I) -> I.
-
-%% term(TermList, Field, Adjust, Precision, PadChar)
-%% Output the characters in a term.
-
-term(T, none, _Adj, none, _Pad) -> T;
-term(T, none, Adj, P, Pad) -> term(T, P, Adj, P, Pad);
-term(T, F, Adj, none, Pad) -> term(T, F, Adj, erlang:min(flat_length(T), F), Pad);
-term(T, F, Adj, P, Pad) when F >= P ->
- adjust_error(T, F, Adj, P, Pad).
-
-%% print(Term, Depth, Field, Adjust, Precision, PadChar, Indentation)
-%% Print a term.
-
-print(T, D, none, Adj, P, Pad, I) -> print(T, D, 80, Adj, P, Pad, I);
-print(T, D, F, Adj, none, Pad, I) -> print(T, D, F, Adj, I+1, Pad, I);
-print(T, D, F, right, P, _Pad, _I) ->
- tv_io_lib_pretty:pretty_print(T, P, F, D).
-
-%% fwrite_e(Float, Field, Adjust, Precision, PadChar)
-
-fwrite_e(Fl, none, Adj, none, Pad) -> %Default values
- fwrite_e(Fl, none, Adj, 6, Pad);
-fwrite_e(Fl, none, _Adj, P, _Pad) when P >= 2 ->
- float_e(Fl, float_data(Fl), P);
-fwrite_e(Fl, F, Adj, none, Pad) ->
- fwrite_e(Fl, F, Adj, 6, Pad);
-fwrite_e(Fl, F, Adj, P, Pad) when P >= 2 ->
- adjust_error(float_e(Fl, float_data(Fl), P), F, Adj, F, Pad).
-
-float_e(Fl, Fd, P) when Fl < 0.0 -> %Negative numbers
- [$-|float_e(-Fl, Fd, P)];
-float_e(_Fl, {Ds,E}, P) ->
- case float_man(Ds, 1, P-1) of
- {[$0|Fs],true} -> [[$1|Fs]|float_exp(E)];
- {Fs,false} -> [Fs|float_exp(E-1)]
- end.
-
-%% float_man([Digit], Icount, Dcount) -> {[Chars],CarryFlag}.
-%% Generate the characters in the mantissa from the digits with Icount
-%% characters before the '.' and Dcount decimals. Handle carry and let
-%% caller decide what to do at top.
-
-float_man(Ds, 0, Dc) ->
- {Cs,C} = float_man(Ds, Dc),
- {[$.|Cs],C};
-float_man([D|Ds], I, Dc) ->
- case float_man(Ds, I-1, Dc) of
- {Cs,true} when D =:= $9 -> {[$0|Cs],true};
- {Cs,true} -> {[D+1|Cs],false};
- {Cs,false} -> {[D|Cs],false}
- end;
-float_man([], I, Dc) -> %Pad with 0's
- {string:chars($0, I, [$.|string:chars($0, Dc)]),false}.
-
-float_man([D|_Ds], 0) when D >= $5 -> {[],true};
-float_man([_|_], 0) -> {[],false};
-float_man([D|Ds], Dc) ->
- case float_man(Ds, Dc-1) of
- {Cs,true} when D =:= $9 -> {[$0|Cs],true};
- {Cs,true} -> {[D+1|Cs],false};
- {Cs,false} -> {[D|Cs],false}
- end;
-float_man([], Dc) -> {string:chars($0, Dc),false}. %Pad with 0's
-
-%% float_exp(Exponent) -> [Char].
-%% Generate the exponent of a floating point number. Alwayd include sign.
-
-float_exp(E) when E >= 0 ->
- [$e,$+|integer_to_list(E)];
-float_exp(E) ->
- [$e|integer_to_list(E)].
-
-%% fwrite_f(FloatData, Field, Adjust, Precision, PadChar)
-
-fwrite_f(Fl, none, Adj, none, Pad) -> %Default values
- fwrite_f(Fl, none, Adj, 6, Pad);
-fwrite_f(Fl, none, _Adj, P, _Pad) when P >= 1 ->
- float_f(Fl, float_data(Fl), P);
-fwrite_f(Fl, F, Adj, none, Pad) ->
- fwrite_f(Fl, F, Adj, 6, Pad);
-fwrite_f(Fl, F, Adj, P, Pad) when P >= 1 ->
- adjust_error(float_f(Fl, float_data(Fl), P), F, Adj, F, Pad).
-
-float_f(Fl, Fd, P) when Fl < 0.0 ->
- [$-|float_f(-Fl, Fd, P)];
-float_f(Fl, {Ds,E}, P) when E =< 0 ->
- float_f(Fl, {string:chars($0, -E+1, Ds),1}, P); %Prepend enough 0's
-float_f(_Fl, {Ds,E}, P) ->
- case float_man(Ds, E, P) of
- {Fs,true} -> "1" ++ Fs; %Handle carry
- {Fs,false} -> Fs
- end.
-
-%% float_data([FloatChar]) -> {[Digit],Exponent}
-
-float_data(Fl) ->
- float_data(float_to_list(Fl), []).
-
-float_data([$e|E], Ds) ->
- {reverse(Ds),list_to_integer(E)+1};
-float_data([D|Cs], Ds) when D >= $0, D =< $9 ->
- float_data(Cs, [D|Ds]);
-float_data([_D|Cs], Ds) ->
- float_data(Cs, Ds).
-
-
-%% fwrite_g(Float, Field, Adjust, Precision, PadChar)
-%% Use the f form if Float is > 0.1 and < 10^4, else the e form.
-%% Precision always means the # of significant digits.
-
-fwrite_g(Fl) ->
- fwrite_g(Fl, none, right, none, $\s).
-
-fwrite_g(Fl, F, Adj, none, Pad) ->
- fwrite_g(Fl, F, Adj, 6, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 0.1 ->
- fwrite_e(Fl, F, Adj, P, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 1.0 ->
- fwrite_f(Fl, F, Adj, P, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 10.0 ->
- fwrite_f(Fl, F, Adj, P-1, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 100.0 ->
- fwrite_f(Fl, F, Adj, P-2, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 1000.0 ->
- fwrite_f(Fl, F, Adj, P-3, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) when abs(Fl) < 10000.0 ->
- fwrite_f(Fl, F, Adj, P-4, Pad);
-fwrite_g(Fl, F, Adj, P, Pad) ->
- fwrite_e(Fl, F, Adj, P, Pad).
-
-%% string(String, Field, Adjust, Precision, PadChar)
-
-string(S, none, _Adj, none, _Pad) -> S;
-string(S, F, Adj, none, Pad) ->
- string(S, F, Adj, erlang:min(flat_length(S), F), Pad);
-string(S, none, _Adj, P, Pad) ->
- string:left(flatten(S), P, Pad);
-string(S, F, Adj, P, Pad) when F >= P ->
- adjust(string:left(flatten(S), P, Pad), string:chars(Pad, F - P), Adj).
-
-%% char(Char, Field, Adjust, Precision, PadChar) -> [Char].
-
-char(C, none, _Adj, none, _Pad) -> [C];
-char(C, F, _Adj, none, _Pad) -> string:chars(C, F);
-char(C, none, _Adj, P, _Pad) -> string:chars(C, P);
-char(C, F, Adj, P, Pad) when F >= P ->
- adjust(string:chars(C, P), string:chars(Pad, F - P), Adj).
-
-%% newline(Field, Adjust, Precision, PadChar) -> [Char].
-
-newline(none, _Adj, _P, _Pad) -> "\n";
-newline(F, right, _P, _Pad) -> string:chars($\n, F).
-
-%% adjust_error([Char], Field, Adjust, Max, PadChar) -> [Char].
-%% Adjust the characters within the field if length less than Max padding
-%% with PadChar.
-
-adjust_error(Cs, F, Adj, M, Pad) ->
- L = flat_length(Cs),
- if
- L > M ->
- adjust(string:chars($*, M), string:chars(Pad, F - M), Adj);
- true ->
- adjust(Cs, string:chars(Pad, F - L), Adj)
- end.
-
-adjust(Data, Pad, left) -> [Data,Pad];
-adjust(Data, Pad, right) -> [Pad,Data].
-
-%%
-%% Utilities
-%%
-
-reverse(List) ->
- reverse(List, []).
-
-reverse([H|T], Stack) ->
- reverse(T, [H|Stack]);
-reverse([], Stack) -> Stack.
-
-%% flatten(List)
-%% Flatten a list.
-
-flatten(List) -> flatten(List, []).
-
-flatten([H|T], Cont) when is_list(H) ->
- flatten(H, [T|Cont]);
-flatten([H|T], Cont) ->
- [H|flatten(T, Cont)];
-flatten([], [H|Cont]) -> flatten(H, Cont);
-flatten([], []) -> [].
-
-%% flat_length(List)
-%% Calculate the length of a list of lists.
-
-flat_length(List) -> flat_length(List, 0).
-
-flat_length([H|T], L) when is_list(H) ->
- flat_length(H, flat_length(T, L));
-flat_length([_|T], L) ->
- flat_length(T, L + 1);
-flat_length([], L) -> L.
diff --git a/lib/tv/src/tv_io_lib_pretty.erl b/lib/tv/src/tv_io_lib_pretty.erl
deleted file mode 100644
index c19277d006..0000000000
--- a/lib/tv/src/tv_io_lib_pretty.erl
+++ /dev/null
@@ -1,171 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_io_lib_pretty).
-
-
-
--export([pretty_print/4]).
-
-%% pretty_print(Term, Column, LineLength, Depth) -> [Chars]
-%% Depth = -1 gives unlimited print depth. Use tv_io_lib:write for atomic terms.
-
-pretty_print(_, _, _, 0) -> "...";
-pretty_print([], _, _, _) -> "[]";
-pretty_print({}, _, _, _) -> "{}";
-pretty_print(List, Col, Ll, D) when is_list(List) ->
- case tv_io_lib:printable_list(List) of
- true ->
- tv_io_lib:write_string(List, $");
- false ->
- Len = write_length(List, D, 0, Ll - Col),
- if
- D =:= 1 -> "[...]";
- Len + Col < Ll ->
- write(List, D);
- true ->
- [$[,
- [pretty_print(hd(List), Col + 1, Ll, D - 1)|
- pretty_print_tail(tl(List), Col + 1, Ll, D - 1)],
- $]]
- end
- end;
-pretty_print(Fun, _Col, _Ll, _D) when is_function(Fun) ->
- tv_io_lib:write(Fun);
-pretty_print(Tuple, Col, Ll, D) when is_tuple(Tuple) ->
- Len = write_length(Tuple, D, 0, Ll - Col),
- if
- D =:= 1 -> "{...}";
- Len + Col < Ll ->
- write(Tuple, D);
- is_atom(element(1, Tuple)), size(Tuple) > 1 ->
- print_tag_tuple(Tuple, Col, Ll, D);
- true ->
- [${,
- [pretty_print(element(1, Tuple), Col + 1, Ll, D - 1)|
- pretty_print_tail(tl(tuple_to_list(Tuple)), Col + 1, Ll, D - 1)],
- $}]
- end;
-pretty_print(Term, _Col, _Ll, D) -> tv_io_lib:write(Term, D).
-
-%% print_tag_tuple(Tuple, Column, LineLength, Depth) -> [Char]
-%% Print a tagged tuple by indenting the rest of the elements differently
-%% to the tag. Start beside the tag if start column not too far to
-%% the right. Tuple has size >= 2.
-
-print_tag_tuple(Tuple, Col, Ll, D) ->
- Tag = tv_io_lib:write_atom(element(1, Tuple)),
- Tlen = length(Tag),
- Tcol = Col + Tlen + 2,
- if
- Tcol >= Ll div 2, Tlen > 2 ->
- [${,Tag,
- pretty_print_tail(tl(tuple_to_list(Tuple)), Col + 4, Ll, D - 2),
- $}];
- true ->
- [${,Tag,$,,
- [pretty_print(element(2, Tuple), Col + Tlen + 2, Ll, D - 2)|
- pretty_print_tail(tl(tl(tuple_to_list(Tuple))), Tcol, Ll, D - 3)],
- $}]
- end.
-
-%% pretty_print_tail([Element], Column, LineLength, D) -> [Char]
-%% Pretty print the elements of a list or tuple.
-
-pretty_print_tail([], _Col, _Ll, _D) -> "";
-pretty_print_tail(_Es, _Col, _Ll, 1) -> "|...";
-pretty_print_tail([E|Es], Col, Ll, D) ->
- [$,,nl_indent(Col-1),
- pretty_print(E, Col, Ll, D-1)|
- pretty_print_tail(Es, Col, Ll, D-1)];
-pretty_print_tail(E, Col, Ll, D) ->
- [$|,nl_indent(Col-1),pretty_print(E, Col, Ll, D-1)].
-
-%% write(Term, Depth) -> [Char]
-%% Write a term down to Depth on one line. Use tv_io_lib:write/2 for
-%% atomic terms.
-
-write(_, 0) -> "...";
-write([], _) -> "[]";
-write({}, _) -> "{}";
-write(List, D) when is_list(List) ->
- case tv_io_lib:printable_list(List) of
- true ->
- tv_io_lib:write_string(List, $");
- false ->
- if
- D =:= 1 -> "[...]";
- true ->
- [$[,
- [write(hd(List), D-1)|write_tail(tl(List), D-1)],
- $]]
- end
- end;
-write(Fun, _D) when is_function(Fun) -> tv_io_lib:write(Fun); %Must catch this first
-write(T, D) when is_tuple(T) ->
- if
- D =:= 1 -> "{...}";
- true ->
- [${,
- [write(element(1, T), D-1)|write_tail(tl(tuple_to_list(T)), D-1)],
- $}]
- end;
-write(Term, D) -> tv_io_lib:write(Term, D).
-
-write_tail([], _D) -> "";
-write_tail(_Es, 1) -> "|...";
-write_tail([E|Es], D) ->
- [$,,write(E, D - 1)|write_tail(Es, D - 1)];
-write_tail(E, D) ->
- [$|,write(E, D - 1)].
-
-%% write_length(Term, Depth, Accumulator, MaxLength) -> integer()
-%% Calculate the print length of a term, but exit when length becomes
-%% greater than MaxLength.
-
-write_length(_T, _D, Acc, Max) when Acc > Max -> Acc;
-write_length(_T, 0, Acc, _Max) -> Acc + 3;
-write_length([], _, Acc, _) -> Acc + 2;
-write_length({}, _, Acc, _) -> Acc + 2;
-write_length(List, D, Acc, Max) when is_list(List) ->
- case tv_io_lib:printable_list(List) of
- true ->
- Acc + length(tv_io_lib:write_string(List, $"));
- false ->
- write_length_list(List, D, Acc, Max)
- end;
-write_length(Fun, _D, Acc, _Max) when is_function(Fun) ->
- Acc + length(tv_io_lib:write(Fun));
-write_length(Tuple, D, Acc, Max) when is_tuple(Tuple) ->
- write_length_list(tuple_to_list(Tuple), D, Acc, Max);
-write_length(Term, _D, Acc, _Max) ->
- Acc + length(tv_io_lib:write(Term)).
-
-write_length_list(_, _, Acc, Max) when Acc > Max -> Acc;
-write_length_list([], _, Acc, _) -> Acc + 1; %]
-write_length_list(_Es, 1, Acc, _) -> Acc + 5; %|...]
-write_length_list([E|Es], D, Acc, Max) ->
- write_length_list(Es,
- D - 1,
- write_length(E, D - 1, Acc + 1, Max),
- Max);
-write_length_list(E, D, Acc, Max) ->
- write_length(E, D - 1, Acc + 2, Max). %| ]
-
-
-
-nl_indent(_) -> "".
diff --git a/lib/tv/src/tv_ip.erl b/lib/tv/src/tv_ip.erl
deleted file mode 100644
index 9f66917362..0000000000
--- a/lib/tv/src/tv_ip.erl
+++ /dev/null
@@ -1,242 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_ip).
--compile([{nowarn_deprecated_function,{gs,canvas,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([ip/1]).
-
-
-
--include("tv_int_msg.hrl").
-
-
--define(NOF_LABELS, 25).
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-ip(_Master) ->
- W = gs:window(win, gs:start(), [{width, 302},
- {height, 38},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "Launching..."}
- ]),
- C = gs:canvas(W, [{width, 40},
- {height, 35},
- {x, 0},
- {bg, {255, 255, 255}}
- ]),
- gs:create(image, C, [{load_gif, code:priv_dir(tv) ++ "/erlang.gif"}]),
- gs:label(W, [{width, 252},
- {height, 12},
- {x, 47},
- {y, 23},
- {bg, {0, 0, 0}},
- {cursor, arrow}
- ]),
-
- LabelList = create_labels(?NOF_LABELS, W, 48),
-
- L = gs:label(W, [{width, 250},
- {height, 18},
- {x, 47},
- {y, 0},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, w}
- ]),
- gs:config(win, [{map, true}]),
- loop(1, LabelList, L).
-
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_labels(0, _WinId, _Xpos) ->
- [];
-create_labels(N, WinId, Xpos) ->
- Width = 10,
- Xdiff = Width,
- LabelId = gs:label(WinId, [{width, Width},
- {height, 10},
- {x, Xpos},
- {y, 24},
- {bg, {235, 235, 235}},
- {cursor, arrow}
- ]),
-
- [LabelId | create_labels(N - 1, WinId, Xpos + Xdiff)].
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-loop(N, LabelList, L) ->
- receive
- Msg ->
- case Msg of
-
- #ip_update{nof_elements_to_mark = X, text = Text} ->
- update_window(LabelList, N, N + X, L, Text),
- loop(N + X, LabelList, L);
-
- #ip_quit{} ->
- update_labels(LabelList, N, ?NOF_LABELS),
- receive
- after 1000 ->
- done
- end,
- done;
-
- _Other ->
- loop(N, LabelList, L)
- end
- end.
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_window(LabelList, N, Hi, LblId, Text) ->
- gs:config(win, [raise]),
- gs:config(LblId, [{label, {text, Text}}]),
- update_labels(LabelList, N, Hi).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_labels(_LabelList, N, _Hi) when N > ?NOF_LABELS ->
- done;
-update_labels(_LabelList, N, Hi) when N >= Hi ->
- done;
-update_labels(LabelList, N, Hi) ->
- LabelId = lists:nth(N, LabelList),
- gs:config(LabelId, [{bg, {0, 0, 255}}]),
- update_labels(LabelList, N + 1, Hi).
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_main.erl b/lib/tv/src/tv_main.erl
deleted file mode 100644
index b6ffbd7c49..0000000000
--- a/lib/tv/src/tv_main.erl
+++ /dev/null
@@ -1,1821 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_main).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,frame,3}},
- {nowarn_deprecated_function,{gs,grid,3}},
- {nowarn_deprecated_function,{gs,gridline,2}},
- {nowarn_deprecated_function,{gs,label,3}},
- {nowarn_deprecated_function,{gs,menu,2}},
- {nowarn_deprecated_function,{gs,menubar,3}},
- {nowarn_deprecated_function,{gs,menubutton,2}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,menuitem,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([start/0,
- init/0
- ]).
-
-
--export([get_ets_tables/1,
- get_mnesia_tables/1
- ]).
-
-
-
--include("tv_main.hrl").
--include("tv_int_msg.hrl").
--include("tv_pd_int_msg.hrl").
--include("tv_pd_int_def.hrl").
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-start() ->
- spawn(?MODULE, init, []).
-
-
-
-init() ->
- process_flag(trap_exit,true),
- %% OK, so it's *BAD* to use the process dictionary...
- %% So why have I used it? Because it is simple to remove the haiku-functionality,
- %% if that is desired. Otherwise a lot of functions (the parameters) would have
- %% to be changed.
- put(error_msg_mode, ?ERROR_MSG_MODE),
- KindOfTable = ets,
- SysTabHidden = true,
- UnreadHidden = true,
- SortKey = ?NAME_COL,
- CurrNode = node(),
- Children = start_tv_nodewin(CurrNode),
- {MarkedCell, TempGridLines, WinSize, ShortcutList} = create_window([]),
- Tables = get_tables(CurrNode, KindOfTable, UnreadHidden, SysTabHidden,SortKey),
- gs:config(grid, [{rows, {1, get_nof_rows(length(Tables),
- gs:read(grid, height))}}]),
- GridLines = update_gridlines(Tables, TempGridLines, 1),
- gs:config(win, [{map, true}, {cursor,arrow}]),
- %% To avoid unpleasant error/exit messages, we surround the loop with a catch.
- catch loop(KindOfTable, CurrNode, MarkedCell, GridLines, WinSize, Tables, ShortcutList,
- UnreadHidden, SysTabHidden, SortKey, Children).
-
-
-
-start_tv_nodewin(CurrNode) ->
- NodewinPid = tv_nodewin:start(CurrNode, get(error_msg_mode)),
- [{NodewinPid, tv_nodewin, CurrNode}].
-
-
-
-
-
-get_ets_tables(SysTabHidden) ->
- Tables = ets:all(),
- get_ets_table_info(Tables,
- hidden_tables(ets, SysTabHidden) ++
- current_mnesia_tables(SysTabHidden),
- owners_to_hide(ets, SysTabHidden),
- []).
-
-
-
-get_mnesia_tables(SysTabHidden) ->
- Tables = mnesia:system_info(tables),
- get_mnesia_table_info(Tables -- hidden_tables(mnesia, SysTabHidden),
- owners_to_hide(mnesia, SysTabHidden),
- []).
-
-
-
-
-
-owners_to_hide(ets, true) ->
- ?SYSTEM_OWNERS;
-owners_to_hide(ets, false) ->
- [];
-owners_to_hide(mnesia, true) ->
- [];
-owners_to_hide(mnesia, false) ->
- [].
-
-
-
-
-get_mnesia_table_info([], _OwnersToHide, Acc) ->
- lists:keysort(?NAME_ELEM, Acc);
-get_mnesia_table_info([TabId | Tail], OwnersToHide, Acc) ->
- case catch get_mnesia_owner_size(TabId) of
- {'EXIT', _Reason} ->
- %% Ignore tables ceasing to exist.
- %% Nodedown errors caught above!
- get_mnesia_table_info(Tail, OwnersToHide, Acc);
- {OwnerPid, OwnerName, Size} ->
- case lists:member(OwnerName, OwnersToHide) of
- true ->
- get_mnesia_table_info(Tail, OwnersToHide, Acc);
- false ->
- Readable = not(lists:member(TabId, ?UNREADABLE_MNESIA_TABLES)),
- get_mnesia_table_info(Tail,
- OwnersToHide,
- [{TabId, {notext}, {notext}, Readable,
- OwnerPid, OwnerName, Size} | Acc])
- end
- end.
-
-
-
-
-get_mnesia_owner_size(TabId) ->
- {OwnerPid, OwnerName} =
- case catch mnesia:table_info(TabId, owner) of
- Pid when is_pid(Pid) ->
- case lists:keysearch(registered_name, 1, process_info(Pid)) of
- false ->
- {Pid, {notext}};
- {value, {registered_name, ProcName}} ->
- {Pid, ProcName}
- end;
- _Other ->
- {{notext}, {notext}}
- end,
- Size = mnesia:table_info(TabId, size),
- {OwnerPid, OwnerName, Size}.
-
-
-
-
-
-
-
-hidden_tables(_Any, true) ->
- ?SYSTEM_TABLES ++ ?MNESIA_TABLES;
-hidden_tables(ets, _SysTabHidden) ->
- ?MNESIA_TABLES;
-hidden_tables(mnesia, _SysTabHidden) ->
- [].
-
-
-
-
-get_tables(Node, KindOfTable, UnreadHidden, SysTabHidden,SortKey) ->
- LocalNode = (Node =:= node()),
- Tables =
- case catch get_table_list(Node,LocalNode,KindOfTable,SysTabHidden) of
- Result when is_list(Result) ->
- case UnreadHidden of
- true ->
- lists:filter(fun(H) ->
- element(?READABLE_ELEM, H)
- end,
- Result);
- _Other ->
- Result
- end;
- Error ->
- analyze_error(Error, Node, undefined),
- []
- end,
- case SortKey of
- ?PROCNAME_ELEM ->
- lists:keysort(SortKey,
- lists:keysort(?PID_ELEM, Tables));
- _OtherCol ->
- lists:keysort(SortKey,
- lists:keysort(?NAME_ELEM, Tables))
- end.
-
-
-
-
-
-get_ets_table_info([], _TablesToHide, _OwnersToHide, Acc) ->
- lists:keysort(?ID_ELEM, Acc);
-get_ets_table_info([TabId | Tail], TablesToHide, OwnersToHide, Acc) ->
- case catch get_ets_name_owner_protection(TabId) of
- {'EXIT', _Reason} ->
- %% Ignore tables ceasing to exist.
- %% Nodedown errors caught above!
- get_ets_table_info(Tail, TablesToHide, OwnersToHide, Acc);
- {Name, NamedTable, Id, Readable, OwnerPid, OwnerName, Size} ->
- case lists:member(Name, TablesToHide) of
- true ->
- get_ets_table_info(Tail, TablesToHide, OwnersToHide, Acc);
- false ->
- case lists:member(OwnerName, OwnersToHide) of
- true ->
- get_ets_table_info(Tail, TablesToHide, OwnersToHide, Acc);
- false ->
- get_ets_table_info(Tail, TablesToHide, OwnersToHide,
- [{Name,NamedTable,Id,Readable,
- OwnerPid,OwnerName,Size} | Acc])
- end
- end
- end.
-
-
-
-get_ets_name_owner_protection(TabId) ->
- Name = ets:info(TabId, name),
- OwnerPid = ets:info(TabId, owner),
- Readable = case ets:info(TabId, protection) of
- private ->
- false;
- _Other ->
- true
- end,
- Size = ets:info(TabId, size),
- {NamedTable,Id} = case ets:info(TabId, named_table) of
- true ->
- {true,{notext}};
- false ->
- {false, TabId}
- end,
- PName = case lists:keysearch(registered_name, 1, process_info(OwnerPid)) of
- false ->
- {notext};
- {value, {registered_name, ProcName}} ->
- ProcName
- end,
- {Name, NamedTable, Id, Readable, OwnerPid, PName, Size}.
-
-
-
-
-
-
-current_mnesia_tables(SysTabHidden) ->
- case catch get_table_list(node(), true, mnesia, SysTabHidden) of
- Result when is_list(Result) ->
- lists:map(fun(H) ->
- element(?NAME_ELEM, H)
- end,
- Result);
- nodedown ->
- handle_error(nodedown, node(), undefined),
- [];
- _Other ->
- []
- end.
-
-
-
-
-get_table_list(_Node, true, ets, SysTabHidden) ->
- get_ets_tables(SysTabHidden);
-get_table_list(Node, false, ets, SysTabHidden) ->
- case rpc:block_call(Node, ?MODULE, get_ets_tables, [SysTabHidden]) of
- {badrpc, Reason} ->
- throw({badrpc,Reason});
- Result ->
- Result
- end;
-get_table_list(_Node, true, mnesia, SysTabHidden) ->
- get_mnesia_tables(SysTabHidden);
-get_table_list(Node, false, mnesia, SysTabHidden) ->
- case rpc:block_call(Node, ?MODULE, get_mnesia_tables, [SysTabHidden]) of
- {badrpc,Reason} ->
- throw({badrpc,Reason});
- Result ->
- Result
- end.
-
-
-
-
-analyze_error(Cause, Node, Table) ->
- case Cause of
- {badrpc, {'EXIT', {badarg,_Reason}}} ->
- done; %% Table has ceased to exist.
- {'EXIT', {badarg, {ets,local_info,_Args}}} ->
- done;
-
- {badrpc, nodedown} ->
- handle_error(nodedown, Node, Table);
- {'EXIT', nodedown} ->
- handle_error(nodedown, Node, Table);
-
- {'EXIT', {aborted, {node_not_running,_ErrNode}}} ->
- handle_error(mnesia_not_started, Node, Table);
- {'EXIT', {'EXIT', {aborted, {node_not_running,_ErrNode}}}} ->
- handle_error(mnesia_not_started, Node, Table);
- {badrpc, {'EXIT', {aborted, {node_not_running,_ErrNode}}}} ->
- handle_error(mnesia_not_started, Node, Table);
- {'EXIT', {undef, {mnesia,_Fcn,_Args,_}}} ->
- handle_error(mnesia_not_started, Node, Table);
-
- {'EXIT', Reason} ->
- handle_error({unexpected_error,Reason}, Node, Table);
- Error when is_tuple(Error) ->
- handle_error({unexpected_error,Error}, Node, Table)
- end.
-
-
-
-handle_error(mnesia_not_started, _Node, _Table) ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(win, "TV Notification", ["Mnesia not started!"]);
- haiku ->
- tv_utils:notify(win, "TV Notification", ["Mnesia is stopped.",
- "We wish to reach all data",
- "But we never will."])
- end;
-handle_error(nodedown, _Node, _Table) ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(win, "TV Notification", ["The selected node is down!"]);
- haiku ->
- Msg = ["With searching comes loss",
- "And the presence of absence:",
- "Node is down."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- self() ! nodedown;
-handle_error({unexpected_error,Cause}, _Node, _Table) ->
- io:format("Unexpected error: ~p~n", [Cause]),
- gs:config(win, [beep]).
-
-
-
-
-loop(KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- receive
-
- {gs, Gridline, click, {grid,Readable}, [Col,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, Col, Row}, MarkedCell, Readable),
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Gridline, click, {grid,_Readable}, [_Col,_Row,"" | _]} ->
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, Gridline, doubleclick, {grid,Data}, [?NAME_COL,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, ?NAME_COL, Row}, undefined, Data),
- {Table, Name, Readable} = get_table_id(KindOfTable, Row, Tables),
- case start_tv_browser(Table,CurrNode,Name,KindOfTable,Readable,Children) of
- Children ->
- {FinalMarkedCell, NewTables, NewGridLines} =
- refresh_window(NewMarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,FinalMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {gs, Gridline, doubleclick, {grid,Data}, [?ID_COL,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, ?ID_COL, Row}, undefined, Data),
- {Table, Name, Readable} = get_table_id(KindOfTable, Row, Tables),
- case start_tv_browser(Table,CurrNode,Name,KindOfTable,Readable,Children) of
- Children ->
- {FinalMarkedCell, NewTables, NewGridLines} =
- refresh_window(NewMarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,FinalMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {gs, Gridline, doubleclick, {grid,Data}, [?INFO_COL,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, ?INFO_COL, Row}, undefined, Data),
- {Table, _Name, _Readable} = get_table_id(KindOfTable, Row, Tables),
- case start_tv_info(Table, CurrNode, CurrNode =:= node(), KindOfTable, Children) of
- Children ->
- {FinalMarkedCell, NewTables, NewGridLines} =
- refresh_window(NewMarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,FinalMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {gs, Gridline, doubleclick, {grid,Data}, [?PID_COL,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, ?PID_COL, Row}, undefined, Data),
- OwnerPid = element(?PID_ELEM, lists:nth(Row, Tables)),
- NewChildren = start_pman(OwnerPid, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey, NewChildren);
-
-
- {gs, Gridline, doubleclick, {grid,Data}, [?PROCNAME_COL,Row,Text | _]} when Text =/= "" ->
- unmark_cell(MarkedCell, Tables),
- NewMarkedCell = mark_cell({Gridline, ?PROCNAME_COL, Row}, undefined, Data),
- OwnerPid = element(?PID_ELEM, lists:nth(Row, Tables)),
- NewChildren = start_pman(OwnerPid, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey, NewChildren);
-
-
-%% {gs, win, configure, _Data, [Width, Height | _]} when {Width,Height} /= WinSize ->
- Msg0 = {gs, win, configure, _Data, [Width0, Height0 | _]}
- when {Width0,Height0} =/= WinSize ->
- {gs, win, configure, _, [Width,Height|_]} = flush_msgs(Msg0),
-
- NewSize = resize_window(Width, Height, length(Tables)),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,NewSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, update, _Args} ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,SortKey),
- update_tv_info(Children),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, open_table, _Args} ->
- {Table, Name, Readable} = get_table_id(KindOfTable, element(3, MarkedCell),
- Tables),
- case start_tv_browser(Table,CurrNode,Name,KindOfTable,Readable,Children) of
- Children ->
- {NewMarkedCell, NewTables, NewGridLines} =
- refresh_window(MarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {gs, _Id, click, new_table, _Args} ->
- NewChildren = start_tv_new_table(CurrNode, Children),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren);
-
-
- {gs, _Id, click, select_node, _Args} ->
- show_tv_nodewin(Children),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, show_mnesia, _Args} when KindOfTable =:= ets ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- gs:config(label2, [{fg, ?DISABLED_COLOR}]),
- gs:config(sort_table_id, [{enable, false}]),
- NewSortKey =
- case SortKey of
- ?ID_ELEM ->
- gs:config(sort_table_name, [{select,true}]),
- ?NAME_ELEM;
- _Other ->
- SortKey
- end,
- {NewTables, NewGridLines} =
- update_grid(mnesia, CurrNode, GridLines, UnreadHidden, SysTabHidden, NewSortKey),
- gs:config(win, [{cursor,arrow}]),
- loop(mnesia,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,NewSortKey,Children);
-
-
- {gs, _Id, click, show_ets, _Args} when KindOfTable =:= mnesia ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- gs:config(label2, [{fg, ?NORMAL_FG_COLOR}]),
- gs:config(label3, [{fg, ?NORMAL_FG_COLOR}]),
- gs:config(label4, [{fg, ?NORMAL_FG_COLOR}]),
- {NewTables, NewGridLines} =
- update_grid(ets, CurrNode, GridLines, UnreadHidden, SysTabHidden,SortKey),
- %% gs:config(show_unreadable, [{enable, true},
- %% {select, not(UnreadHidden)}]),
- gs:config(sort_table_id, [{enable, true}]),
- gs:config(win, [{cursor,arrow}]),
- loop(ets,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, show_system, _Args} when SysTabHidden ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines}
- = update_grid(KindOfTable, CurrNode, GridLines, UnreadHidden, false, SortKey),
- gs:config(show_system, [{data, hide_system}]),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,false,SortKey,Children);
-
-
- {gs, _Id, click, hide_system, _Args} when not SysTabHidden ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable, CurrNode, GridLines, UnreadHidden, true, SortKey),
- gs:config(show_system, [{label, {text, " System Tables "}},
- {data, show_system}]),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,true,SortKey,Children);
-
-
- {gs, _Id, click, show_unreadable, _Args} when UnreadHidden ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines}
- = update_grid(KindOfTable, CurrNode, GridLines, false, SysTabHidden, SortKey),
- gs:config(show_unreadable, [{data, hide_unreadable}]),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- false,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, hide_unreadable, _Args} when not UnreadHidden ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable, CurrNode, GridLines, true, SysTabHidden, SortKey),
- gs:config(show_unreadable, [{label, {text, " Unreadable Tables "}},
- {data, show_unreadable}]),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- true,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, show_info, _Args} ->
- {Table, _Name, _Readable} = get_table_id(KindOfTable, element(3,MarkedCell),
- Tables),
- case start_tv_info(Table, CurrNode, CurrNode =:= node(), KindOfTable, Children) of
- Children ->
- {NewMarkedCell, NewTables, NewGridLines} =
- refresh_window(MarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {gs, _Id, click, sort_table_name, _Args} when SortKey =/= ?NAME_ELEM ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,?NAME_ELEM),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,?NAME_ELEM,Children);
-
-
- {gs, _Id, click, sort_table_id, _Args} when SortKey =/= ?ID_ELEM ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,?ID_ELEM),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,?ID_ELEM,Children);
-
-
- {gs, _Id, click, sort_owner_name, _Args} when SortKey =/= ?PROCNAME_ELEM ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,
- ?PROCNAME_ELEM),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,?PROCNAME_ELEM,Children);
-
-
- {gs, _Id, click, sort_owner_pid, _Args} when SortKey =/= ?PID_ELEM ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,?PID_ELEM),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,?PID_ELEM,Children);
-
-
- {gs, _Id, click, trace_process, _Args} ->
- OwnerPid = element(?PID_ELEM, lists:nth(element(3,MarkedCell), Tables)),
- NewChildren = start_pman(OwnerPid, Children),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren);
-
-
- {gs, _Id, click, help_button, _Args} ->
- HelpFile = filename:join([code:lib_dir(tv), "doc", "html", "index.html"]),
- tool_utils:open_help(win, HelpFile),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, otp_help_button, _Args} ->
- IndexFile = filename:join([code:root_dir(), "doc", "index.html"]),
- tool_utils:open_help(win, IndexFile),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, win, configure, _Data, _Args} ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, exit_button, _Args} ->
- lists:foreach(
- fun({Pid,pman,_OP}) ->
- exit(Pid,kill);
- (_) ->
- done
- end,
- Children),
- exit(normal);
-
-
- {gs, _Id, click, show_haiku, _Args} ->
- gs:config(win, [{cursor,busy}]),
- gs:config(show_haiku, [{data, hide_haiku}]),
- lists:foreach(
- fun({Pid,tv_info,_Data}) ->
- Pid ! {error_msg_mode,haiku};
- ({Pid,tv_browser,_Data}) ->
- Pid ! {error_msg_mode,haiku};
- ({Pid,tv_nodewin,_Data}) ->
- Pid ! {error_msg_mode,haiku};
- ({Pid,tv_new_table,_Data}) ->
- Pid ! {error_msg_mode,haiku};
- (_Other) ->
- done
- end,
- Children),
- put(error_msg_mode, haiku),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable, CurrNode, MarkedCell, GridLines, WinSize, Tables, Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, _Id, click, hide_haiku, _Args} ->
- gs:config(win, [{cursor,busy}]),
- gs:config(show_haiku, [{data, show_haiku}]),
- lists:foreach(
- fun({Pid,tv_info,_Data}) ->
- Pid ! {error_msg_mode,normal};
- ({Pid,tv_browser,_Data}) ->
- Pid ! {error_msg_mode,normal};
- ({Pid,tv_nodewin,_Data}) ->
- Pid ! {error_msg_mode,normal};
- ({Pid,tv_new_table,_Data}) ->
- Pid ! {error_msg_mode,normal};
- (_Other) ->
- done
- end,
- Children),
- put(error_msg_mode, normal),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable, CurrNode, MarkedCell, GridLines, WinSize, Tables, Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {gs, win, destroy, _Data, _Args} ->
- lists:foreach(
- fun({Pid,pman,_OP}) ->
- exit(Pid,kill);
- (_) ->
- done
- end,
- Children),
- exit(normal);
-
-
- {gs, win, keypress, _Data, [Key, _, _, 1 | _]} ->
- case lists:keysearch(Key, 1, Shortcuts) of
- {value, {Key, Value}} ->
- handle_keypress(Value,KindOfTable,CurrNode,MarkedCell,
- GridLines,WinSize,Tables, Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
- false ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children)
- end;
-
-
- {gs, win, keypress, _Data, _Args} ->
- loop(KindOfTable, CurrNode, MarkedCell, GridLines, WinSize, Tables, Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {tv_new_node, _Sender, NewCurrNode} ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,NewCurrNode,GridLines,UnreadHidden,SysTabHidden,SortKey),
- update_tv_info(Children),
- update_tv_browser(Children),
- NewChildren =
- case replace_node_name(NewCurrNode, CurrNode) of
- false ->
- Children;
- true ->
- update_node_name(Children)
- end,
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,NewCurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren);
-
-
- {tv_start_infowin, Table, Node, LocalNode, TableType} ->
- case start_tv_info(Table, Node, LocalNode, TableType, Children) of
- Children ->
- {NewMarkedCell, NewTables, NewGridLines} =
- refresh_window(MarkedCell,Tables,KindOfTable,CurrNode,GridLines,
- UnreadHidden,SysTabHidden,SortKey, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- {tv_update_infowin, Table, Node, _Type} ->
- case get_tv_info_pid(Table, Node, Children) of
- undefined ->
- done;
- Pid ->
- Pid ! #info_update_table_info{sender=self()}
- end,
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,
- Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
-
-
- {tv_new_table, NewTabWinPid, Node, Name, Options, KindOfTableToCreate, _Readable, false} ->
- case create_table(KindOfTableToCreate, Node, Node =:= node(), Name, Options,
- NewTabWinPid) of
- error ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,
- Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- _TabId ->
- case KindOfTable of
- mnesia ->
- done;
- ets ->
- self() ! {gs, tv_main, click, update, []}
- end,
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children)
- end;
-
-
-
- {tv_new_table, NewTabWinPid, Node, Name, Options, KindOfTableToCreate, Readable, true} ->
- case create_table(KindOfTableToCreate, Node, Node =:= node(), Name, Options,
- NewTabWinPid) of
- error ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,
- Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- TabId ->
- case start_tv_browser(TabId,Node,Name,KindOfTableToCreate,Readable,Children) of
- Children ->
- {FinalMarkedCell, NewTables, NewGridLines} =
- case KindOfTable of
- mnesia ->
- {MarkedCell, Tables, GridLines};
- ets ->
- refresh_window(MarkedCell,Tables,KindOfTable,
- CurrNode,GridLines,UnreadHidden,
- SysTabHidden,SortKey, Children)
- end,
- loop(KindOfTable,CurrNode,FinalMarkedCell,NewGridLines,WinSize,
- NewTables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- NewChildren ->
- case KindOfTable of
- mnesia ->
- done;
- ets ->
- self() ! {gs, tv_main, click, update, []}
- end,
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end
- end;
-
-
-
- {'EXIT', Pid, _Reason} ->
- case lists:keysearch(Pid, 1, Children) of
- false ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,
- Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- {value, {Pid,Prog,_Data}} ->
- NewChildren =
- case Prog of
- tv_nodewin ->
- lists:keydelete(Pid, 1, Children) ++ start_tv_nodewin(CurrNode);
- _Other ->
- lists:keydelete(Pid, 1, Children)
- end,
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,
- Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
- _Other ->
- loop(KindOfTable, CurrNode, MarkedCell, GridLines, WinSize, Tables, Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children)
- end.
-
-
-flush_msgs(Msg0 = {gs, Win, Op, _, _}) ->
- receive Msg = {gs, Win,Op,_,_} ->
- flush_msgs(Msg)
- after 100 ->
- Msg0
- end.
-
-handle_keypress(open_table,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- NewChildren =
- case MarkedCell of
- {undefined,_,_} ->
- case get(error_msg_mode) of
- normal ->
- gs:config(win, [beep]),
- tv_utils:notify(win, "TV Notification", "No table selected!");
- haiku ->
- Msg = ["Rather than a beep",
- "Or a rude error message",
- "These words: make a choice."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- Children;
- _OtherCell ->
- {Table, Name, Readable} = get_table_id(KindOfTable, element(3, MarkedCell),
- Tables),
- start_tv_browser(Table, CurrNode, Name, KindOfTable, Readable, Children)
- end,
- case NewChildren of
- Children ->
- {NewMarkedCell, NewTables, NewGridLines} =
- refresh_window(MarkedCell,Tables,KindOfTable,CurrNode,GridLines,UnreadHidden,
- SysTabHidden, SortKey, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- _Other ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
-handle_keypress(update,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTabs, NewGrLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,SortKey),
- update_tv_info(Children),
- gs:config(win, [{cursor,arrow}]),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGrLines,WinSize,NewTabs,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
-handle_keypress(show_mnesia,ets,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- gs:config(label2, [{fg, ?DISABLED_COLOR}]),
- gs:config(label3, [{fg, ?DISABLED_COLOR}]),
- gs:config(label4, [{fg, ?DISABLED_COLOR}]),
- gs:config(show_unreadable, [{label, {text, " Unreadable Tables "}},
- {data, show_unreadable}]),
- %% gs:config(show_unreadable, [{enable, false},
- %% {select, false}]),
- gs:config(sort_table_id, [{enable, false}]),
- NewSortKey =
- case SortKey of
- ?ID_ELEM ->
- gs:config(sort_table_name, [{select,true}]),
- ?NAME_ELEM;
- _Other ->
- SortKey
- end,
- {NewTables, NewGridLines} =
- update_grid(mnesia,CurrNode,GridLines,UnreadHidden,SysTabHidden,NewSortKey),
- gs:config(win, [{cursor,arrow}]),
- loop(mnesia,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,NewSortKey,Children);
-
-
-
-handle_keypress(show_ets,mnesia,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- gs:config(label2, [{fg, ?NORMAL_FG_COLOR}]),
- gs:config(label3, [{fg, ?NORMAL_FG_COLOR}]),
- gs:config(label4, [{fg, ?NORMAL_FG_COLOR}]),
- {NewTables, NewGridLines} =
- update_grid(ets,CurrNode,GridLines,UnreadHidden,SysTabHidden,SortKey),
- %% gs:config(show_unreadable, [{enable, true},
- %% {select, not(UnreadHidden)}]),
- gs:config(sort_table_id, [{enable, true}]),
- gs:config(win, [{cursor,arrow}]),
- loop(ets,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
-handle_keypress(trace_process,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- NewChildren =
- case MarkedCell of
- {_Id, ?PID_COL, Row} ->
- OwnerPid = element(?PID_ELEM, lists:nth(Row, Tables)),
- start_pman(OwnerPid, Children);
- {_Id, ?PROCNAME_COL, Row} ->
- OwnerPid = element(?PID_ELEM, lists:nth(Row, Tables)),
- start_pman(OwnerPid, Children);
- _Other ->
- Children
- end,
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey, NewChildren);
-
-
-handle_keypress(select_node,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- show_tv_nodewin(Children),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-
-handle_keypress(show_info,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- NewChildren =
- case MarkedCell of
- {_Id, ?NAME_COL, Row} ->
- {Table, _Name, _Readable} = get_table_id(KindOfTable, Row, Tables),
- start_tv_info(Table, CurrNode, CurrNode =:= node(), KindOfTable, Children);
- {_Id, ?ID_COL, Row} ->
- {Table, _Name, _Readable} = get_table_id(KindOfTable, Row, Tables),
- start_tv_info(Table, CurrNode, CurrNode =:= node(), KindOfTable, Children);
- {_Id, ?INFO_COL, Row} ->
- {Table, _Name, _Readable} = get_table_id(KindOfTable, Row, Tables),
- start_tv_info(Table, CurrNode, CurrNode =:= node(), KindOfTable, Children);
- _OtherCell ->
- Children
- end,
- case NewChildren of
- Children ->
- {NewMarkedCell, NewTables, NewGridLines} =
- refresh_window(MarkedCell,Tables,KindOfTable,CurrNode,GridLines,UnreadHidden,
- SysTabHidden, SortKey, Children),
- loop(KindOfTable,CurrNode,NewMarkedCell,NewGridLines,WinSize,NewTables,
- Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children);
- _Other ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,NewChildren)
- end;
-
-
-handle_keypress(help_button,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- HelpFile = filename:join([code:lib_dir(tv), "doc", "html", "index.html"]),
- tool_utils:open_help(win, HelpFile),
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children);
-
-handle_keypress(exit_button,_KindOfTable,_CurrNode,_MarkedCell,_GridLines,
- _WinSize,_Tables,_Shortcuts,_UnreadHidden,_SysTabHidden,_SortKey,Children) ->
- lists:foreach(
- fun({Pid,pman,_OP}) ->
- exit(Pid,kill);
- (_) ->
- done
- end,
- Children),
- exit(normal);
-
-
-handle_keypress(_Any,KindOfTable,CurrNode,MarkedCell,GridLines,
- WinSize,Tables,Shortcuts,UnreadHidden,SysTabHidden,SortKey,Children) ->
- loop(KindOfTable,CurrNode,MarkedCell,GridLines,WinSize,Tables,Shortcuts,
- UnreadHidden,SysTabHidden,SortKey,Children).
-
-
-
-
-refresh_window(MarkedCell,Tables,KindOfTable,
- CurrNode,GridLines,UnreadHidden,SysTabHidden, SortKey, Children) ->
- gs:config(win, [{cursor,busy}]),
- NewMarkedCell = unmark_cell(MarkedCell, Tables),
- {NewTables, NewGridLines} =
- update_grid(KindOfTable,CurrNode,GridLines,UnreadHidden,SysTabHidden,
- SortKey),
- update_tv_info(Children),
- gs:config(win, [{cursor,arrow}]),
- {NewMarkedCell, NewTables, NewGridLines}.
-
-
-
-
-
-get_table_id(mnesia, Row, Tables) ->
- TabTuple = lists:nth(Row, Tables),
- Readable = element(?READABLE_ELEM, TabTuple),
- Id = element(?NAME_ELEM, TabTuple),
- {Id, Id, Readable};
-get_table_id(ets, Row, Tables) ->
- TabTuple = lists:nth(Row, Tables),
- Readable = element(?READABLE_ELEM, TabTuple),
- Name = element(?NAME_ELEM, TabTuple),
- case element(?NAMED_TABLE_ELEM, TabTuple) of
- false ->
- {element(?ID_ELEM, TabTuple), Name, Readable};
- _Other ->
- {Name, Name, Readable}
- end.
-
-
-
-replace_node_name('nonode@nohost', 'nonode@nohost') ->
- %% Still undistributed...
- false;
-replace_node_name(_Node, _OldNode) when node() =:= 'nonode@nohost' ->
- %% No longer distributed, but previously was!
- true;
-replace_node_name(_Node, 'nonode@nohost') ->
- %% The system has been distributed!
- true;
-replace_node_name(_Node, _OldNode) ->
- false.
-
-
-
-update_node_name(Children) when node() =:= 'nonode@nohost' ->
- %% We have been distributed, but no longer are!
- %% We change all node names stored to 'nonode@nohost'!
- %% This works because we *will* receive exit signals
- %% for those processes that have died on other nodes,
- %% whereupon these processes will be removed from the
- %% 'Children' list.
- lists:map(fun({Pid, Prog, {Table,_Node}}) ->
- {Pid, Prog, {Table,'nonode@nohost'}};
- (H) ->
- H
- end,
- Children);
-update_node_name(Children) ->
- %% We have become distributed!
- %% Change all occurrences of 'nonode@nohost'
- %% to the new current node name!
- HomeNode = node(),
- lists:map(fun({Pid, Prog, {Table,'nonode@nohost'}}) ->
- {Pid, Prog, {Table,HomeNode}};
- (H) ->
- H
- end,
- Children).
-
-
-
-
-show_tv_nodewin(Children) ->
- {value, {Pid,tv_nodewin,_Node}} = lists:keysearch(tv_nodewin, 2, Children),
- Pid ! show_window.
-
-
-
-update_tv_info(Children) ->
- Sender = self(),
- lists:foreach(fun({Pid,tv_info,{_Table,_Node}}) ->
- Pid ! #info_update_table_info{sender=Sender};
- (_) ->
- done
- end,
- Children).
-
-
-
-update_tv_browser(Children) ->
- lists:foreach(fun({Pid,tv_browser,{_Table,_Node}}) ->
- Pid ! check_node;
- (_) ->
- done
- end,
- Children).
-
-
-
-get_tv_info_pid(TabId,Node,Children) ->
- TvInfoChildren = [X || X <- Children, element(2,X) =:= tv_info],
- case lists:keysearch({TabId,Node}, 3, TvInfoChildren) of
- {value, {Pid, tv_info, {_Table,Node}}} ->
- Pid;
- _Other ->
- undefined
- end.
-
-
-
-start_tv_browser(Tab,Node,_Name,KindOfTable,false,Children) ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(win, "TV Notification",
- ["The selected table is unreadable!",
- "Only table information may be viewed!"]);
- haiku ->
- Msg = ["Table protected.",
- "The answers that you're seeking",
- "will remain unknown."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- start_tv_info(Tab, Node, Node =:= node(), KindOfTable, Children);
-start_tv_browser(Table,Node,Name,KindOfTable,_Readable,Children) ->
- TvBrowserChildren = [X || X <- Children, element(2,X) =:= tv_browser],
- case lists:keysearch({Table,Node}, 3, TvBrowserChildren) of
- {value, {BPid,tv_browser,{Table,Node}}} ->
- BPid ! raise,
- Children;
- _Other ->
- %% Check that table still exists!
- case table_still_there(KindOfTable, Node, Node =:= node(), Table, Name) of
- true ->
- LocalNode = (Node =:= node()),
- NewBPid = tv:start_browser(Node, LocalNode, Table, KindOfTable, Name,
- get(error_msg_mode)),
- [{NewBPid, tv_browser, {Table,Node}} | Children];
- _TableDead ->
- gs:config(win, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(win, "TV Notification",
- ["The table no longer exists!"]);
- haiku ->
- Msg = ["A table that big?",
- "It might be very useful.",
- "But now it is gone."],
- tv_utils:notify(win, "TV Notification", Msg)
- end,
- Children
- end
- end.
-
-
-
-
-
-table_still_there(ets, Node, LocalNode, Table, Name) ->
- case catch tv_ets_rpc:all(Node, LocalNode) of
- Tables when is_list(Tables) ->
- case lists:member(Table, Tables) of
- true ->
- true;
- false -> %% May be a named table...
- lists:keymember(Name, 1, Tables)
- end;
- Error ->
- analyze_error(Error, Node, Table),
- false
- end;
-table_still_there(mnesia, Node, LocalNode, Table, Name) ->
- case catch tv_mnesia_rpc:system_info(Node, LocalNode, tables) of
- Tables when is_list(Tables) ->
- lists:member(Name, Tables);
- Error ->
- analyze_error(Error, Node, Table),
- false
- end.
-
-
-
-
-
-
-start_tv_info(Table, Node, LocalNode, KindOfTable, Children) ->
- TvInfoChildren = [X || X <- Children, element(2,X) =:= tv_info],
- case lists:keysearch({Table,Node}, 3, TvInfoChildren) of
- {value, {Pid,tv_info,{Table,Node}}} ->
- Pid ! #info_raise_window{sender = self()},
- Children;
- _Other ->
- %% May have started a browser but no info window!
- %% Info window may have been started from that browser, but
- %% don't bother with checking *that*.
- Pid = spawn_link(tv_info, info, [self(), Node, LocalNode, Table, KindOfTable,
- get(error_msg_mode)]),
- [{Pid, tv_info, {Table,Node}} | Children]
- end.
-
-
-
-
-
-start_tv_new_table(CurrNode, Children) ->
- TvNewTableChild = [X || X <- Children, element(2,X) =:= tv_new_table],
- case TvNewTableChild of
- [{Pid,tv_new_table,undefined}] ->
- Pid ! raise,
- Children;
- [] ->
- Pid = tv_new_table:start(CurrNode, get(error_msg_mode)),
- [{Pid, tv_new_table, undefined} | Children]
- end.
-
-
-
-
-create_table(mnesia, _Node, _LocalNode, _TabName, _Options, _NewTabWinPid) ->
- error;
-create_table(ets, Node, LocalNode, TabName, Options, NewTabWinPid) ->
- case tv_table_owner:create(ets, Node, LocalNode, TabName, Options) of
- {ok, TabId} ->
- NewTabWinPid ! ok,
- TabId;
- error ->
- NewTabWinPid ! error,
- error
- end.
-
-
-
-
-start_pman(OwnerPid, Children) ->
- Pid = pman_shell:start(OwnerPid),
- [{Pid,pman,OwnerPid} | Children].
-
-
-
-
-update_grid(TableType, CurrNode, GridLines, UnreadHidden, SysTabHidden,SortKey) ->
- NewTables = get_tables(CurrNode, TableType, UnreadHidden, SysTabHidden,SortKey),
- TabStr = case TableType of
- mnesia ->
- "Mnesia ";
- ets ->
- "ETS "
- end,
- NodeStr = atom_to_list(CurrNode),
- gs:config(win, [{title, "[TV] " ++ TabStr ++ "tables on " ++ NodeStr}]),
- gs:config(grid, [{rows, {1, get_nof_rows(length(NewTables), gs:read(grid,height))}}]),
- NewGridLines = update_gridlines(NewTables, GridLines, 1),
- {NewTables, NewGridLines}.
-
-
-
-unmark_cell({undefined, AnyCol, AnyRow}, _Tables) ->
- {undefined, AnyCol, AnyRow};
-unmark_cell({Id, Col, Row}, Tables) ->
- disable_menus(),
- TabTuple = lists:nth(Row, Tables),
- ReadableTable = element(?READABLE_ELEM, TabTuple),
- NamedTable = element(?NAMED_TABLE_ELEM, TabTuple),
- BgColor =
- case ReadableTable of
- false ->
- ?UNREADABLE_BG_COLOR;
- _Other1 ->
- ?READABLE_BG_COLOR
- end,
-
- FgColor =
- case NamedTable of
- false when Col =:= ?NAME_COL ->
- ?UNNAMED_FG_COLOR;
- _Other2 ->
- ?NORMAL_FG_COLOR
- end,
-
- gs:config(Id, [{bg, {Col, BgColor}},
- {fg, {Col, FgColor}}]),
- {undefined, undefined, undefined}.
-
-
-
-
-mark_cell({Id,Col,Row}, {Id,Col,Row}, _Readable) ->
- {undefined, undefined, undefined};
-mark_cell({Id,Col,Row}, _Any, Readable) ->
- case lists:member(Col, ?POSSIBLE_MARK_COLS) of
- true ->
- enable_menus(Col, Readable),
- gs:config(Id, [{bg, {Col, ?GRID_MARK_COLOR}},
- {fg, {Col, ?NORMAL_FG_COLOR}}]),
- {Id, Col,Row};
- false ->
- {undefined, undefined, undefined}
- end.
-
-
-disable_menus() ->
- disable_open_menu(),
- disable_trace_menu(),
- disable_info_menu().
-
-
-enable_menus(?ID_COL, true) ->
- enable_open_menu(),
- enable_info_menu();
-enable_menus(?ID_COL, {notext}) ->
- enable_open_menu(),
- enable_info_menu();
-enable_menus(?ID_COL, false) ->
- enable_info_menu();
-enable_menus(?NAME_COL, true) ->
- enable_open_menu(),
- enable_info_menu();
-enable_menus(?NAME_COL, {notext}) ->
- enable_open_menu(),
- enable_info_menu();
-enable_menus(?NAME_COL, false) ->
- enable_info_menu();
-enable_menus(?PID_COL, _Any) ->
- enable_trace_menu();
-enable_menus(?PROCNAME_COL, _Any) ->
- enable_trace_menu();
-enable_menus(?INFO_COL, _Any) ->
- enable_info_menu();
-enable_menus(_Col, _Any) ->
- done.
-
-
-
-resize_window(Width, Height, NofElems) ->
- WinWidth = lists:max([Width, ?MIN_WIN_WIDTH]),
- WinHeight = lists:max([Height, ?MIN_WIN_HEIGHT]),
- gs:config(win, [{width, WinWidth},
- {height, WinHeight}
- ]),
- {BgWidth, BgHeight, FgWidth, FgHeight} = get_frame_coords(WinWidth, WinHeight),
- {GridWidth, GridHeight} = get_grid_coords(FgWidth, FgHeight),
- ColWidths = get_col_widths(?COL_WIDTHS, GridWidth),
- resize_header_labels(ColWidths,
- [label1,label2,label3,label4,label5],
- ?GRID_XPOS),
- gs:config(bgframe, [{width, BgWidth},
- {height, BgHeight}
- ]),
- gs:config(fgframe, [{width, FgWidth},
- {height, FgHeight}
- ]),
- gs:config(grid, [{width, GridWidth},
- {height, GridHeight},
- {columnwidths, ColWidths},
- {rows, {1, get_nof_rows(NofElems, GridHeight)}}
- ]),
- {WinWidth, WinHeight}.
-
-
-
-
-create_window(Tables) ->
- gs:window(win, gs:start(), [{width, ?WIN_WIDTH},
- {height, ?WIN_HEIGHT},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "[TV] ETS tables on " ++
- atom_to_list(node())},
- {destroy, true},
- {configure, true},
- {keypress, true}
- ]),
-
- ShortcutList = create_menus(),
-
- disable_menus(),
-
- {BgFrameWidth, BgFrameHeight, FgFrameWidth, FgFrameHeight} =
- get_frame_coords(?WIN_WIDTH, ?WIN_HEIGHT),
-
- {GridWidth, GridHeight} = get_grid_coords(FgFrameWidth, FgFrameHeight),
-
- ColWidths = get_col_widths(?COL_WIDTHS, GridWidth),
-
- gs:frame(bgframe, win, [{width, BgFrameWidth},
- {height, BgFrameHeight},
- {x, ?GRID_XPOS},
- {y, ?GRID_YPOS},
- {bg, {0,0,0}}
- ]),
- gs:frame(fgframe, bgframe, [{width, FgFrameWidth},
- {height, FgFrameHeight},
- {x, 0},
- {y, 1},
- {bg, ?DEFAULT_BG_COLOR}
- ]),
-
-
- create_header_labels(ColWidths, ?HEADER_LABELS),
- gs:grid(grid, fgframe, [{width, GridWidth},
- {height, GridHeight},
- {x, 0},
- {y, -1},
- {hscroll,bottom},
- {vscroll,right},
- {rows, {1, get_nof_rows(length(Tables), GridHeight)}},
- {columnwidths, ColWidths},
- {fg, ?NORMAL_FG_COLOR},
- {bg, {255,255,255}},
- {font, ?FONT}
- ]),
- GridLines = update_gridlines(Tables, [], 1),
- {{undefined,undefined,undefined}, GridLines, {?WIN_WIDTH,?WIN_HEIGHT}, ShortcutList}.
-
-
-
-
-get_frame_coords(WinWidth, WinHeight) ->
- BgWidth = WinWidth - 2 * ?GRID_XPOS,
- BgHeight = WinHeight - ?GRID_YPOS - ?GRID_XPOS,
- FgWidth = BgWidth,
- FgHeight = BgHeight - 1,
- {BgWidth, BgHeight, FgWidth, FgHeight}.
-
-
-
-
-get_grid_coords(ParentWidth, ParentHeight) ->
- {ParentWidth, ParentHeight + 1}.
-
-
-
-get_col_widths(Cols, GridWidth) ->
- SbWidth = 25, %% OK, OK, don't bother about it, this constant makes it work... :-/
- FixColWidthSum = lists:sum(lists:map(fun(H) ->
- lists:nth(H, Cols)
- end,
- ?FIX_WIDTH_COLS)),
- AvailableWidth = GridWidth - FixColWidthSum - SbWidth,
- OriginalWidth = ?WIN_WIDTH - 2 * ?GRID_XPOS - FixColWidthSum - SbWidth,
- get_col_widths(1, Cols, AvailableWidth, OriginalWidth).
-
-
-
-get_col_widths(N, [H | T], AvailWidth, OrigWidth) ->
- NewColWidth =
- case lists:member(N, ?FIX_WIDTH_COLS) of
- true ->
- H;
- _Other ->
- round(H * (AvailWidth / OrigWidth) + 0.1)
- end,
- [NewColWidth | get_col_widths(N + 1, T, AvailWidth, OrigWidth)];
-get_col_widths(_N, [], _AvailWidth, _OrigWidth) ->
- [].
-
-
-
-create_header_labels(ColWidths, Text) ->
- create_header_labels(ColWidths, Text, 1, ?GRID_XPOS).
-
-
-
-create_header_labels([W | T], [{Name, Text} | TextT], N, Xpos) ->
- Ypos = ?GRID_YPOS - 20,
- gs:label(Name, win, [{width, W + 1 - 3},
- {height, 20},
- {x, Xpos + 1 + 3},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, ?NORMAL_FG_COLOR},
- {font, ?HEADER_FONT},
- {align, w},
- {label, {text, Text}}
- ]),
- create_header_labels(T, TextT, N + 1, Xpos + 1 + W);
-create_header_labels([], [], _N, _Xpos) ->
- done.
-
-
-
-resize_header_labels([W | T], [Name | NT], Xpos) ->
- gs:config(Name, [{width, W + 1 - 3},
- {x, Xpos + 1 + 3}
- ]),
- resize_header_labels(T, NT, Xpos + 1 + W);
-resize_header_labels([], [], _Xpos) ->
- done.
-
-
-
-disable_open_menu() ->
- gs:config(open_table, [{enable,false}]).
-
-
-disable_info_menu() ->
- gs:config(show_info, [{enable,false}]).
-
-disable_trace_menu() ->
- gs:config(trace_process, [{enable,false}]).
-
-
-enable_open_menu() ->
- gs:config(open_table, [{enable,true}]).
-
-
-enable_info_menu() ->
- gs:config(show_info, [{enable,true}]).
-
-
-enable_trace_menu() ->
- gs:config(trace_process, [{enable,true}]).
-
-
-create_menus() ->
- gs:menubar(menubar, win, [{bg, ?DEFAULT_BG_COLOR}]),
-
- HelpButt = gs:menubutton(menubar, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK}, % firebrick
- {label, {text, " Help "}},
- {underline, 1},
- {side, right}
- ]),
- FileButt = gs:menubutton(menubar, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK}, % firebrick
- {label, {text, " File "}},
- {underline, 1},
- {side, left}
- ]),
- ViewButt = gs:menubutton(menubar, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK}, % firebrick
- {label, {text, " View "}},
- {underline, 1},
- {side, left}
- ]),
- OptionsButt = gs:menubutton(menubar, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK}, % firebrick
- {label, {text, " Options "}},
- {underline, 1},
- {side, left}
- ]),
-
- HelpMenu = gs:menu(HelpButt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK},
- {disabledfg,?DISABLED_COLOR}
- ]),
- FileMenu = gs:menu(FileButt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK},
- {disabledfg,?DISABLED_COLOR}
- ]),
-
- OptionsMenu = gs:menu(OptionsButt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK},
- {disabledfg,?DISABLED_COLOR}
- ]),
-
- ViewMenu = gs:menu(ViewButt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK},
- {disabledfg,?DISABLED_COLOR}
- ]),
-
- ShortCutList =
- create_menulist([{" Help ",normal,help_button,1,h},
- separator,
- {" OTP Documentation ",normal,otp_help_button,1,no_char}], HelpMenu) ++
- create_menulist([{" Open Table ",normal,open_table,1,o},
- {" New Table... ",normal,new_table,1,no_char},
- {" Table Info ",normal,show_info,7,i},
- separator,
- {" Nodes... ",normal,select_node,1,n},
- separator,
- {" Trace Process ",normal,trace_process,1,t},
- separator,
- {" Exit ",normal, exit_button,2,x}], FileMenu) ++
- [{c,exit_button}, {'C',exit_button}] ++
- create_menulist([{" Refresh ",normal,update,1,r},
- separator,
- {" Unreadable Tables ",check,show_unreadable,1,no_char},
- separator,
- {" System Tables ",check,show_system,1,no_char},
- separator,
- {" Sort by Name ",radio,sort_table_name,9,no_char},
- {" Sort by Id ",radio,sort_table_id,9,no_char},
- {" Sort by Owner PID ",radio,sort_owner_pid,15,no_char},
- {" Sort by Owner Name ",radio,sort_owner_name,9,no_char},
- separator,
- {" Error Messages in Haiku ",check,show_haiku,1,no_char}
- ],
- OptionsMenu) ++
- create_menulist([{" ETS Tables ",radio,show_ets,1,e},
- {" Mnesia Tables ",radio,show_mnesia,1,m}], ViewMenu),
- gs:config(show_unreadable, [{select,false}]),
- gs:config(show_system, [{select,false}]),
- gs:config(show_haiku, [{select,false}]),
- %% Due to a bug (or some other reason), only one of the radiobuttons belonging
- %% to a specified group can be selected, even if different processes have created
- %% the radiobuttons! This means that, if we have started more than one tv_main
- %% process, selecting one radiobutton will affect the radiobuttons in the other
- %% tv_main process(es)!!! Since this is a highly undesirable bahaviour, we have to
- %% create unique group names (i.e., atoms).
- %% (We need to group the radiobuttons, since otherwise all created by one process
- %% belongs to the same group, which also is undesirable...)
- SelfStr = pid_to_list(self()),
- SortGroup = list_to_atom("sorting" ++ SelfStr),
- TypeGroup = list_to_atom("table_type" ++ SelfStr),
- gs:config(sort_table_name, [{group,SortGroup},{select,true}]),
- gs:config(sort_table_id, [{group,SortGroup}]),
- gs:config(sort_owner_pid, [{group,SortGroup}]),
- gs:config(sort_owner_name, [{group,SortGroup}]),
- gs:config(show_ets, [{group,TypeGroup}, {select,true}]),
- gs:config(show_mnesia, [{group,TypeGroup}]),
- ShortCutList.
-
-
-
-
-
-create_menulist(List, Menu) ->
- MaxLength = get_length_of_longest_menu_text(List, 0),
- create_menulist(List, Menu, MaxLength).
-
-
-
-
-create_menulist([], _Menu, _MaxLength) ->
- [];
-create_menulist([{Text, Type, Data, AccCharPos, ShortcutChar} | Rest], Menu, MaxLength) ->
- ShortcutCapitalChar =
- if
- ShortcutChar =:= no_char ->
- no_char;
- true ->
- CharAsciiValue = lists:nth(1, atom_to_list(ShortcutChar)),
- CapitalCharValue = CharAsciiValue - ($a - $A),
- list_to_atom([CapitalCharValue])
- end,
-
- FinalText = if
- ShortcutChar =:= no_char ->
- Text;
- true ->
- Text ++ lists:duplicate(MaxLength - length(Text), " ") ++
- " Ctrl+" ++ atom_to_list(ShortcutCapitalChar) ++ " "
- end,
- gs:menuitem(Data, Menu, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?FIREBRICK},
- {itemtype, Type},
- {label, {text, FinalText}},
- {underline, AccCharPos},
- {data, Data}
- ]),
- [{ShortcutChar, Data}, {ShortcutCapitalChar, Data} | create_menulist(Rest, Menu, MaxLength)];
-create_menulist([separator | Rest], Menu, MaxLength) ->
- gs:menuitem(Menu, [{itemtype, separator}]),
- create_menulist(Rest, Menu, MaxLength).
-
-
-
-
-
-
-
-get_length_of_longest_menu_text([], MaxLength) ->
- MaxLength;
-get_length_of_longest_menu_text([{Text, _Type, _Data, _APos, _SChar} | Rest], CurrMax) ->
- L = length(Text),
- if
- L > CurrMax ->
- get_length_of_longest_menu_text(Rest, L);
- true ->
- get_length_of_longest_menu_text(Rest, CurrMax)
- end;
-get_length_of_longest_menu_text([separator | Rest], CurrMax) ->
- get_length_of_longest_menu_text(Rest, CurrMax).
-
-
-
-
-
-
-get_nof_rows(NofElems, GridHeight) ->
- lists:max([NofElems, round((GridHeight - 20) / 21) + 1]).
-
-
-
-config_gridline(LineId, TabTuple) ->
- Readable = element(?READABLE_ELEM, TabTuple),
- NamedTable = element(?NAMED_TABLE_ELEM, TabTuple),
- {FgColor, BgColor} =
- case Readable of
- true ->
- {?NORMAL_FG_COLOR, ?READABLE_BG_COLOR};
- false ->
- {?UNREADABLE_FG_COLOR, ?UNREADABLE_BG_COLOR};
- {notext} ->
- {?NORMAL_FG_COLOR, ?READABLE_BG_COLOR}
- end,
-
- NameFgColor =
- case NamedTable of
- false ->
- ?UNNAMED_FG_COLOR;
- _Other ->
- ?NORMAL_FG_COLOR
- end,
-
- gs:config(LineId, [{bg, BgColor},
- {fg, FgColor},
- {fg, {?NAME_COL, NameFgColor}},
- {click, true},
- {doubleclick, true},
- {data, {grid,Readable}} |
-
- lists:map(
- fun({Elem,Col}) ->
- case element(Elem, TabTuple) of
- {notext} ->
- {text, {Col, ""}};
- Other when Elem =:= ?NAME_ELEM ->
- case NamedTable of
- false ->
- {text, {Col, " " ++
- lists:flatten(
- io_lib:write(
- Other)) ++ " "}};
- _AnyOther ->
- {text, {Col, " " ++ lists:flatten(
- io_lib:write(
- Other))}}
- end;
- Other ->
- {text, {Col, " " ++ lists:flatten(
- io_lib:write(
- Other))}}
- end
- end,
- [{?NAME_ELEM, ?NAME_COL},
- {?ID_ELEM, ?ID_COL},
- {?PID_ELEM, ?PID_COL},
- {?PROCNAME_ELEM, ?PROCNAME_COL},
- {?INFO_ELEM, ?INFO_COL}]
- )
- ]).
-
-
-
-
-
-update_gridlines([TabTuple | TT], [LineId | GT], CurrRow) ->
- config_gridline(LineId, TabTuple),
- [LineId | update_gridlines(TT, GT, CurrRow + 1)];
-update_gridlines([TabTuple | TT], [], CurrRow) ->
- LineId = gs:gridline(grid, [{row, CurrRow}]),
- config_gridline(LineId, TabTuple),
- [LineId | update_gridlines(TT, [], CurrRow + 1)];
-update_gridlines([], [LineId | GT], _CurrRow) ->
- gs:destroy(LineId),
- update_gridlines([], GT, _CurrRow);
-update_gridlines([], [], _CurrRow) ->
- [].
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_main.hrl b/lib/tv/src/tv_main.hrl
deleted file mode 100644
index c9db1d9484..0000000000
--- a/lib/tv/src/tv_main.hrl
+++ /dev/null
@@ -1,285 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-
--define(ERROR_MSG_MODE, normal).
-
--define(WIN_WIDTH, 745). % 779
--define(WIN_HEIGHT, 380).
--define(MIN_WIN_WIDTH, 524).
--define(MIN_WIN_HEIGHT, 150).
-
--define(FONT, {screen, 12}).
--define(HEADER_FONT, {screen, [bold,italic], 12}).
-
--define(GRID_XPOS, 3).
--define(GRID_YPOS, 68).
-
-
-%% Unreadable tables are indicated by the background color.
-%% Unnamed tables are indicated by the foreground color.
-
--define(NORMAL_FG_COLOR, {0,0,0}).
--define(READABLE_BG_COLOR, {255,255,255}).
--define(UNREADABLE_FG_COLOR, ?NORMAL_FG_COLOR).
--define(UNREADABLE_BG_COLOR, {240,240,240}).
-%-define(UNREADABLE_BG_COLOR, {255,250,230}).
-%-define(UNREADABLE_BG_COLOR, {242,242,242}).
--define(UNNAMED_FG_COLOR, {175,175,175}).
-%-define(UNNAMED_FG_COLOR, {140,35,35}).
-
-
--define(DISABLED_COLOR, {160,160,160}).
-
--define(NAME_ELEM, 1).
--define(NAMED_TABLE_ELEM, 2).
--define(ID_ELEM, 3).
--define(READABLE_ELEM, 4).
--define(PID_ELEM, 5).
--define(PROCNAME_ELEM, 6).
--define(INFO_ELEM, 7).
-
--define(NAME_COL, 1).
--define(ID_COL, 2).
--define(PID_COL, 3).
--define(PROCNAME_COL, 4).
--define(INFO_COL, 5).
-
--define(POSSIBLE_MARK_COLS, [?NAME_COL, ?ID_COL, ?PID_COL, ?PROCNAME_COL, ?INFO_COL]).
--define(COL_WIDTHS, [205,131,91,197,90]). % [140,95,125,75,85,140,90]).
--define(FIX_WIDTH_COLS, [2,3,5]).
-
-
--define(HEADER_LABELS, [{label1, " Table Name"},
- % {label2, " Named Table"},
- {label2, " Table Id"},
- % {label4, " Readable"},
- {label3, " Owner Pid"},
- {label4, " Owner Name"},
- {label5, " Table Size"}
- ]).
-
-
-
-%% TABLES_TO_HIDE shall contain both Mnesia and ETS tables that we want to hide. :-)
-
--define(SYSTEM_TABLES, [ac_tab,
- asn1,
- cdv_dump_index_table,
- cdv_menu_table,
- cdv_decode_heap_table,
- cell_id,
- cell_pos,
- clist,
- cover_internal_data_table,
- cover_collected_remote_data_table,
- cover_binary_code_table,
- code,
- code_names,
- cookies,
- corba_policy,
- corba_policy_associations,
- dets,
- dets_owners,
- dets_registry,
- disk_log_names,
- disk_log_pids,
- eprof,
- erl_atom_cache,
- erl_epmd_nodes,
- etop_accum_tab,
- etop_tr,
- ets_coverage_data,
- file_io_servers,
- global,
- global_locks,
- global_names,
- global_names_ext,
- gs_mapping,
- gs_names,
- gstk_db,
- gstk_grid_cellid,
- gstk_grid_cellpos,
- gstk_grid_id,
- gvar,
- httpd,
- id,
- ig,
- ign_req_index,
- ign_requests,
- index,
- inet_cache,
- inet_db,
- inet_hosts,
- 'InitialReferences',
- int_db,
- interpreter_includedirs_macros,
- ir_WstringDef,
- lmcounter,
- locks,
- pg2_table,
- queue,
- snmp_agent_table,
- snmp_local_db2,
- snmp_mib_data,
- snmp_note_store,
- snmp_symbolic_ets,
- sticky,
- sys_dist,
- tid_locks,
- tkFun,
- tkLink,
- tkPriv,
- ttb,
- ttb_history_table,
- udp_fds,
- udp_pids
- ]).
-
-
--define(MNESIA_TABLES, [alarm,
- alarmTable,
- evaLogDiscriminatorTable,
- eva_snmp_map,
- eventTable,
- group,
- imprec,
- ir_AliasDef,
- ir_ArrayDef,
- ir_AttributeDef,
- ir_ConstantDef,
- ir_Contained,
- ir_Container,
- ir_EnumDef,
- ir_ExceptionDef,
- ir_IDLType,
- ir_IRObject,
- ir_InterfaceDef,
- ir_ModuleDef,
- ir_ORB,
- ir_OperationDef,
- ir_PrimitiveDef,
- ir_Repository,
- ir_SequenceDef,
- ir_StringDef,
- ir_StructDef,
- ir_TypedefDef,
- ir_UnionDef,
- logTable,
- logTransferTable,
- mesh_meas,
- mesh_type,
- mnesia_clist,
- mnesia_decision,
- mnesia_transient_decision,
- orber_CosNaming,
- orber_objkeys,
- schema,
- user
- ]).
-
-
--define(UNREADABLE_MNESIA_TABLES, [schema]).
-
-
--define(SYSTEM_OWNERS, [alarm_handler,
- application_controller,
- auth,
- coast_server,
- code_server,
- cover_server_001,
- dbg,
- dets,
- dets_sup,
- disk_log_server,
- disk_log_sup,
- erl_epmd,
- erl_prim_loader,
- error_logger,
- eva_log_sup,
- eva_server,
- eva_sup,
- file_server,
- file_server_2,
- global_group,
- global_group_check,
- global_name_server,
- gs_frontend,
- heart,
- help_main,
- inet_db,
- inet_gethost_native,
- init,
- int_db,
- interpret,
- jive_server,
- kernel_safe_sup,
- kernel_sup,
- log_server,
- mandel_server,
- mesh_sup,
- mesh_server,
- mnesia_checkpoint_sup,
- mnesia_dumper,
- mnesia_event,
- mnesia_fallback,
- mnesia_init,
- mnesia_kernel_sup,
- mnesia_late_loader,
- mnesia_locker,
- mnesia_monitor,
- mnesia_recover,
- mnesia_snmp_sup,
- mnesia_subscr,
- mnesia_sup,
- mnesia_tm,
- net_kernel,
- net_sup,
- overload,
- perfmon_sampler,
- pxw_server,
- release_handler,
- %% rex, %% Otherwise we won't see tables we've created on other nodes!
- rsh_starter,
- sasl_safe_sup,
- sasl_sup,
- snmp_agent_sup,
- snmp_local_db,
- snmp_master_agent,
- snmp_misc_sup,
- snmp_note_store,
- snmp_supervisor,
- snmp_symbolic_store,
- socket,
- sounder,
- ssl_socket,
- take_over_monitor,
- timer_server,
- tk,
- udp_server,
- user,
- winshell_controller,
- xerl_copy,
- xerl_monitor
- ]).
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_mnesia_rpc.erl b/lib/tv/src/tv_mnesia_rpc.erl
deleted file mode 100644
index b2434fcdd3..0000000000
--- a/lib/tv/src/tv_mnesia_rpc.erl
+++ /dev/null
@@ -1,106 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_mnesia_rpc).
-
-
-
--export([system_info/3,
- table_info/4,
- transaction/3
- ]).
-
-
-
-
-
-
-system_info(_Node, true, Key) ->
- chk(catch mnesia:system_info(Key));
-system_info(Node, false, Key) ->
- chk(catch rpc:block_call(Node, mnesia, system_info, [Key])).
-
-
-
-
-table_info(_Node, true, Tab, Item) ->
- chk(catch mnesia:table_info(Tab, Item));
-table_info(Node, false, Tab, Item) ->
- chk(catch rpc:block_call(Node, mnesia, table_info, [Tab, Item])).
-
-
-
-
-transaction(_Node, true, Fun) ->
- chk(catch mnesia:transaction(Fun));
-transaction(Node, false, Fun) ->
- chk(catch rpc:block_call(Node, mnesia, transaction, [Fun])).
-
-
-
-
-chk(Result) ->
- case Result of
- _Anything when is_list(Result) ->
- Result;
- _Anything when is_atom(Result) ->
- Result;
- _Anything when is_integer(Result) ->
- Result;
- _Anything when is_pid(Result) ->
- Result;
-
- {aborted, {bad_type, _Rec}} ->
- throw(bad_format);
-
- {badrpc,nodedown} ->
- throw(nodedown);
- {'EXIT', nodedown} ->
- throw(nodedown);
-
- {'EXIT', {aborted, {no_exists, _Table, _Arg}}} ->
- throw(no_table);
-
- {'EXIT', {aborted, {node_not_running, _Node}}} ->
- throw(mnesia_not_started);
- {'EXIT', {{badarg, {gen, set_monitor_mode, _Data}}, _Info}} ->
- throw(mnesia_not_started);
- {'EXIT', {'EXIT', {aborted, {node_not_running,_Node}}}} ->
- throw(mnesia_not_started);
- {badrpc, {'EXIT', {aborted, {node_not_running,_Node}}}} ->
- throw(mnesia_not_started);
- {badrpc, {'EXIT', {aborted, {no_exists,_Table,_Args}}}} ->
- throw(mnesia_not_started);
- {badrpc, _Reason} ->
- throw(mnesia_not_started);
- {'EXIT', {undef, {mnesia,_Fcn,_Args,_}}} ->
- throw(mnesia_not_started);
- {'EXIT', {undef, {mnesia,_Fcn,_Args}}} ->
- throw(mnesia_not_started);
-
- {'EXIT', Reason} ->
- throw({unexpected_error, Reason});
-
- Other when is_tuple(Other) ->
- %% For example wild_pattern requests return a tuple!
- Other;
-
- Other ->
- io:format("Unexpected return value: ~p~n", [Other])
- end.
-
-
diff --git a/lib/tv/src/tv_new_table.erl b/lib/tv/src/tv_new_table.erl
deleted file mode 100644
index 779835d78a..0000000000
--- a/lib/tv/src/tv_new_table.erl
+++ /dev/null
@@ -1,666 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%k
--module(tv_new_table).
--compile([{nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,checkbutton,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,frame,3}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,radiobutton,3}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([start/2,
- init/3
- ]).
-
-
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
--define(FONT, {screen, 12}).
-
--define(WIN_WIDTH, 400).
--define(WIN_HEIGHT, 555). %% 510
-
--define(FRAME_WIDTH, 400).
--define(FRAME1_HEIGHT, 170).
--define(FRAME2_HEIGHT, 260).
--define(FRAME3_HEIGHT, 125). %% 80
--define(BW, 2).
-
--define(FRAME_X, 0).
--define(FRAME1_Y, 0).
--define(FRAME2_Y, 170).
--define(FRAME3_Y, 430).
-
-
--define(LBL_HEIGHT, 30).
--define(NODE_LBL_WIDTH, 45).
--define(NAME_LBL_WIDTH, 85).
--define(TYPE_LBL_WIDTH, 45).
--define(PROT_LBL_WIDTH, 85).
--define(KEYPOS_LBL_WIDTH, 95).
-
--define(LBL_X, 10).
--define(NODE_LBL_Y, 20).
--define(NAME_LBL_Y, 80).
--define(TYPE_LBL_Y, 10).
--define(PROT_LBL_Y, 100).
--define(KEYPOS_LBL_Y, 200).
-
-
--define(ENTRY_HEIGHT, 30).
--define(NODE_ENTRY_WIDTH, 275).
--define(NAME_ENTRY_WIDTH, 275).
--define(KEYPOS_ENTRY_WIDTH, 50).
-
--define(ENTRY_X1, 110).
--define(ENTRY_X2, 110).
--define(NODE_ENTRY_Y, 20).
--define(NAME_ENTRY_Y, 80).
--define(KEYPOS_ENTRY_Y, 200).
-
--define(RBTN_HEIGHT, 30).
--define(RBTN_WIDTH1, 105).
--define(RBTN_WIDTH2, 115).
-
--define(RBTN_X1, 60).
--define(RBTN_X2, 165).
--define(RBTN_X3, 270).
--define(RBTN_Y1, 40).
--define(RBTN_Y1PLUS, 70).
--define(RBTN_Y2, 130).
-
-
--define(CBTN_HEIGHT, 30).
--define(NAMED_TABLE_CBTN_WIDTH, 100).
--define(OPEN_BROWSER_CBTN_WIDTH, 105).
-
--define(NAMED_TABLE_CBTN_X, 110).
--define(NAMED_TABLE_CBTN_Y, 120).
-
--define(OPEN_BROWSER_CBTN_X, 85). %% 215
--define(OPEN_BROWSER_CBTN_Y, 10). %% 200
-
-
--define(BTN_WIDTH, 100).
--define(BTN_HEIGHT, 30).
-
--define(BTN_X1, 85).
--define(BTN_X2, 225).
--define(BTN_Y, 65). %% 30
-
-
--define(VLINE_LBL_WIDTH, (380 - 2 * ?BW)).
--define(VLINE_LBL_HEIGHT, 1).
--define(HLINE_LBL_WIDTH, 1).
--define(HLINE_LBL_HEIGHT, 70).
-
--define(VLINE_LBL_X, (10 - ?BW)).
--define(VLINE_LBL_Y1, 85).
--define(VLINE_LBL_Y2, 180).
--define(HLINE_LBL_X, 188).
--define(HLINE_LBL_Y, 180).
-
-
--define(DEFAULT_NAME, my_table).
--define(DEFAULT_TYPE, set).
--define(DEFAULT_PROT, public).
--define(DEFAULT_KEYPOS, 1).
-
-
-
-
-start(Node, ErrMsgMode) ->
- spawn_link(?MODULE, init, [Node, ErrMsgMode, self()]).
-
-
-
-
-
-init(Node, ErrMsgMode, MPid) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrMsgMode),
- create_window(Node),
- loop(false, ?DEFAULT_TYPE, ?DEFAULT_PROT, true, MPid).
-
-
-
-
-
-loop(NamedTab, Type, Prot, OpenBrowser, MPid) ->
- receive
-
- {gs, ok, click, _Data, _Args} ->
- gs:config(win, [{cursor, busy}]),
- case create_table(NamedTab, Type, Prot, OpenBrowser, MPid) of
- ok ->
- exit(normal);
- error ->
- gs:config(win, [{cursor, arrow}]),
- loop(NamedTab, Type, Prot, OpenBrowser, MPid)
- end;
-
-
- {gs, cancel, click, _Data, _Args} ->
- exit(normal);
-
-
- {gs, set, click, _Data, _Args} ->
- loop(NamedTab, set, Prot, OpenBrowser, MPid);
-
-
- {gs, ordered_set, click, _Data, _Args} ->
- loop(NamedTab, ordered_set, Prot, OpenBrowser, MPid);
-
-
- {gs, bag, click, _Data, _Args} ->
- loop(NamedTab, bag, Prot, OpenBrowser, MPid);
-
-
- {gs, duplicate_bag, click, _Data, _Args} ->
- loop(NamedTab, duplicate_bag, Prot, OpenBrowser, MPid);
-
-
- {gs, public, click, _Data, _Args} ->
- gs:config(open_browser, [{enable, true}, {select, OpenBrowser}]),
- loop(NamedTab, Type, public, OpenBrowser, MPid);
-
-
- {gs, protected, click, _Data, _Args} ->
- gs:config(open_browser, [{enable, true}, {select, OpenBrowser}]),
- loop(NamedTab, Type, protected, OpenBrowser, MPid);
-
-
- {gs, private, click, _Data, _Args} ->
- gs:config(open_browser, [{select, false}, {enable, false}]),
- loop(NamedTab, Type, private, OpenBrowser, MPid);
-
-
- {gs, named_table, click, Data, _Args} ->
- gs:config(named_table, [{data, not(Data)}]),
- loop(Data, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, open_browser, click, Data, _Args} ->
- gs:config(open_browser, [{data, not(Data)}]),
- loop(Data, Type, Prot, Data, MPid);
-
-
- {gs, EntryId, keypress, _Data, ['Tab', _No, 0 | _T]} ->
- case get_entry_term(EntryId) of
- {ok, _Term} ->
- gs:config(next_entry(EntryId, forward), [{setfocus, true},
- {select, {0, 100000000}}]);
- error ->
- done
- end,
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, EntryId, keypress, _Data, ['Tab', _No, 1 | _T]} ->
- case get_entry_term(EntryId) of
- {ok, _Term} ->
- gs:config(next_entry(EntryId, backward), [{setfocus, true},
- {select, {0, 100000000}}]);
- error ->
- done
- end,
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, EntryId, keypress, _Data, ['Down' | _T]} ->
- case get_entry_term(EntryId) of
- {ok, _Term} ->
- gs:config(next_entry(EntryId, forward), [{setfocus, true},
- {select, {0, 100000000}}]);
- error ->
- done
- end,
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, EntryId, keypress, _Data, ['Up' | _T]} ->
- case get_entry_term(EntryId) of
- {ok, _Term} ->
- gs:config(next_entry(EntryId, backward), [{setfocus, true},
- {select, {0, 100000000}}]);
- error ->
- done
- end,
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, _EntryId, keypress, _Data, ['Return' | _T]} ->
- gs:config(win, [{cursor, busy}]),
- case create_table(NamedTab, Type, Prot, OpenBrowser, MPid) of
- ok ->
- exit(normal);
- error ->
- gs:config(win, [{cursor, arrow}]),
- loop(NamedTab, Type, Prot, OpenBrowser, MPid)
- end;
-
-
- {gs, win, configure, _Data, _Args} ->
- gs:config(win, [{width, ?WIN_WIDTH},
- {height, ?WIN_HEIGHT}]),
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {gs, win, destroy, _Data, _Args} ->
- exit(normal);
-
-
- raise ->
- gs:config(win, [raise]),
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {error_msg_mode, ErrMsgMode} ->
- put(error_msg_mode, ErrMsgMode),
- loop(NamedTab, Type, Prot, OpenBrowser, MPid);
-
-
- {'EXIT', _Pid, _Reason} ->
- exit(normal);
-
-
- _Other ->
- loop(NamedTab, Type, Prot, OpenBrowser, MPid)
-
- end.
-
-
-
-
-create_table(NamedTab, Type, Prot, OpenBrowser, MPid) ->
- case get_entry_term(node_entry) of
- error ->
- error;
- {ok, Node} ->
- case get_entry_term(name_entry) of
- error ->
- error;
- {ok, TabName} ->
- case get_entry_term(keypos_entry) of
- error ->
- error;
- {ok, KeyPos} ->
- Options =
- [Type, Prot, {keypos, KeyPos}] ++
- case NamedTab of
- true ->
- [named_table];
- false ->
- []
- end,
- {Readable, NewOpenBrowser} =
- case Prot of
- private ->
- {false, false};
- _Other ->
- {true, OpenBrowser}
- end,
- MPid ! {tv_new_table, self(), Node, TabName, Options, ets,
- Readable, NewOpenBrowser},
- receive
- ok ->
- ok;
- error ->
- show_error_msg(),
- error
- after
- 5000 ->
- show_error_msg(),
- error
- end
- end
- end
- end.
-
-
-
-
-
-show_error_msg() ->
- Msg =
- case get(error_msg_mode) of
- normal ->
- ["Couldn't create a table using",
- "the specified settings!"];
- haiku ->
- ["The table you want",
- "Could maybe be created.",
- "But I don't know how."]
- end,
- tv_utils:notify(win, "TV Notification", Msg).
-
-
-
-
-
-
-
-get_entry_term(Id) ->
- EditedStr = gs:read(Id, text),
- case tv_db_search:string_to_term(EditedStr) of
- {ok, NewTerm} when Id =:= node_entry, is_atom(NewTerm) ->
- {ok,NewTerm};
- {ok, NewTerm} when Id =:= name_entry, is_atom(NewTerm) ->
- {ok,NewTerm};
- {ok, NewTerm} when Id =:= keypos_entry, is_integer(NewTerm), NewTerm > 0 ->
- {ok,NewTerm};
- _Other ->
- NewMsg =
- case get(error_msg_mode) of
- normal ->
- case Id of
- node_entry ->
- ["Please enter a valid node name!"];
- name_entry ->
- ["Please enter a valid table name!"];
- keypos_entry ->
- ["Please enter a valid key position!"]
- end;
- haiku ->
- E1 = "Aborted effort",
- L =
- case Id of
- node_entry ->
- ["Reflect, repent and retype:",
- "Enter valid node."];
- name_entry ->
- ["Reflect, repent and retype:",
- "Enter valid name."];
- keypos_entry ->
- ["Reflect, repent and retype",
- "Key position, please."]
- end,
- [E1 | L]
- end,
- gs:config(Id, [beep, {select, {0, 100000000}}, {setfocus, true}]),
- tv_utils:notify(win, "TV Notification", NewMsg),
- error
- end.
-
-
-
-
-
-next_entry(node_entry, forward) ->
- name_entry;
-next_entry(node_entry, backward) ->
- keypos_entry;
-next_entry(name_entry, forward) ->
- keypos_entry;
-next_entry(name_entry, backward) ->
- node_entry;
-next_entry(keypos_entry, forward) ->
- node_entry;
-next_entry(keypos_entry, backward) ->
- name_entry.
-
-
-
-
-create_window(Node) ->
- gs:window(win, gs:start(), [{width, ?WIN_WIDTH},
- {height, ?WIN_HEIGHT},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "[TV] Create New ETS Table"},
- {configure, true},
- {destroy, true},
- {cursor, arrow}
- ]),
-
- gs:frame(frame1, win, [{width, ?FRAME_WIDTH},
- {height, ?FRAME1_HEIGHT},
- {x, ?FRAME_X},
- {y, ?FRAME1_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, ?BW}]),
- gs:frame(frame2, win, [{width, ?FRAME_WIDTH},
- {height, ?FRAME2_HEIGHT},
- {x, ?FRAME_X},
- {y, ?FRAME2_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, ?BW}]),
- gs:frame(frame3, win, [{width, ?FRAME_WIDTH},
- {height, ?FRAME3_HEIGHT},
- {x, ?FRAME_X},
- {y, ?FRAME3_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {bw, ?BW}]),
-
- gs:label(frame1, [{width, ?NODE_LBL_WIDTH},
- {height, ?LBL_HEIGHT},
- {x, ?LBL_X},
- {y, ?NODE_LBL_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align, w},
- {font, ?FONT},
- {label, {text, "Node:"}}
- ]),
- gs:label(frame1, [{width, ?NAME_LBL_WIDTH},
- {height, ?LBL_HEIGHT},
- {x, ?LBL_X},
- {y, ?NAME_LBL_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align, w},
- {font, ?FONT},
- {label, {text, "Table name:"}}
- ]),
- gs:label(frame2, [{width, ?TYPE_LBL_WIDTH},
- {height, ?LBL_HEIGHT},
- {x, ?LBL_X},
- {y, ?TYPE_LBL_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align, w},
- {font, ?FONT},
- {label, {text, "Type:"}}
- ]),
- gs:label(frame2, [{width, ?PROT_LBL_WIDTH},
- {height, ?LBL_HEIGHT},
- {x, ?LBL_X},
- {y, ?PROT_LBL_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align, w},
- {font, ?FONT},
- {label, {text, "Protection:"}}
- ]),
- gs:label(frame2, [{width, ?KEYPOS_LBL_WIDTH},
- {height, ?LBL_HEIGHT},
- {x, ?LBL_X},
- {y, ?KEYPOS_LBL_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align, w},
- {font, ?FONT},
- {label, {text, "Key position:"}}
- ]),
-
- gs:entry(node_entry, frame1, [{width, ?NODE_ENTRY_WIDTH},
- {height, ?ENTRY_HEIGHT},
- {x, ?ENTRY_X1},
- {y, ?NODE_ENTRY_Y},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {font, ?FONT},
- {enable, true},
- {text, "'" ++ atom_to_list(Node) ++ "'"},
- {keypress, true}
- ]),
- gs:entry(name_entry, frame1, [{width, ?NAME_ENTRY_WIDTH},
- {height, ?ENTRY_HEIGHT},
- {x, ?ENTRY_X1},
- {y, ?NAME_ENTRY_Y},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {font, ?FONT},
- {enable, true},
- {text, atom_to_list(?DEFAULT_NAME)},
- {keypress, true},
- {setfocus, true},
- {select, {0,100000000}}
- ]),
- gs:entry(keypos_entry, frame2, [{width, ?KEYPOS_ENTRY_WIDTH},
- {height, ?ENTRY_HEIGHT},
- {x, ?ENTRY_X2},
- {y, ?KEYPOS_ENTRY_Y},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {font, ?FONT},
- {enable, true},
- {keypress, true},
- {text, integer_to_list(?DEFAULT_KEYPOS)}
- ]),
-
- gs:radiobutton(set, frame2, [{width, ?RBTN_WIDTH1},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X1},
- {y, ?RBTN_Y1},
- {align, w},
- {label, {text, "set"}},
- {group, type}
- ]),
- gs:radiobutton(ordered_set, frame2, [{width, ?RBTN_WIDTH1},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X2},
- {y, ?RBTN_Y1},
- {align, w},
- {label, {text, "ordered_set"}},
- {group, type}
- ]),
- gs:radiobutton(bag, frame2, [{width, ?RBTN_WIDTH1},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X1},
- {y, ?RBTN_Y1PLUS},
- {align, w},
- {label, {text, "bag"}},
- {group, type}
- ]),
- gs:radiobutton(duplicate_bag, frame2, [{width, ?RBTN_WIDTH2},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X2},
- {y, ?RBTN_Y1PLUS},
- {align, w},
- {label, {text, "duplicate_bag"}},
- {group, type}
- ]),
-
- gs:radiobutton(public, frame2, [{width, ?RBTN_WIDTH1},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X1},
- {y, ?RBTN_Y2},
- {align, w},
- {label, {text, "public"}},
- {group, protection}
- ]),
- gs:radiobutton(protected, frame2, [{width, ?RBTN_WIDTH1},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X2},
- {y, ?RBTN_Y2},
- {align, w},
- {label, {text, "protected"}},
- {group, protection}
- ]),
- gs:radiobutton(private, frame2, [{width, ?RBTN_WIDTH2},
- {height, ?RBTN_HEIGHT},
- {x, ?RBTN_X3},
- {y, ?RBTN_Y2},
- {align, w},
- {label, {text, "private"}},
- {group, protection}
- ]),
-
- gs:checkbutton(named_table, frame1, [{width, ?NAMED_TABLE_CBTN_WIDTH},
- {height, ?CBTN_HEIGHT},
- {x, ?NAMED_TABLE_CBTN_X},
- {y, ?NAMED_TABLE_CBTN_Y},
- {align, w},
- {label, {text, "Named table"}},
- {select, false},
- {data, true}
- ]),
-
- gs:checkbutton(open_browser, frame3, [{width, ?OPEN_BROWSER_CBTN_WIDTH},
- {height, ?CBTN_HEIGHT},
- {x, ?OPEN_BROWSER_CBTN_X},
- {y, ?OPEN_BROWSER_CBTN_Y},
- {align, w},
- {label, {text, "Open browser"}},
- {select, true},
- {data, false}
- ]),
-
-%% gs:label(frame2, [{width, ?VLINE_LBL_WIDTH},
-%% {height, ?VLINE_LBL_HEIGHT},
-%% {x, ?VLINE_LBL_X},
-%% {y, ?VLINE_LBL_Y1},
-%% {bg, {0,0,0}}
-%% ]),
-%% gs:label(frame2, [{width, ?VLINE_LBL_WIDTH},
-%% {height, ?VLINE_LBL_HEIGHT},
-%% {x, ?VLINE_LBL_X},
-%% {y, ?VLINE_LBL_Y2},
-%% {bg, {0,0,0}}
-%% ]),
-%% gs:label(frame2, [{width, ?HLINE_LBL_WIDTH},
-%% {height, ?HLINE_LBL_HEIGHT},
-%% {x, ?HLINE_LBL_X},
-%% {y, ?HLINE_LBL_Y},
-%% {bg, {0,0,0}}
-%% ]),
-%%
- gs:button(ok, frame3, [{width, ?BTN_WIDTH},
- {height, ?BTN_HEIGHT},
- {x, ?BTN_X1},
- {y, ?BTN_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {label, {text, "OK"}}
- ]),
- gs:button(cancel, frame3, [{width, ?BTN_WIDTH},
- {height, ?BTN_HEIGHT},
- {x, ?BTN_X2},
- {y, ?BTN_Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {label, {text, "Cancel"}}
- ]),
-
- gs:config(?DEFAULT_TYPE, [{select, true}]),
- gs:config(?DEFAULT_PROT, [{select, true}]),
-
- gs:config(win, [{map, true}]).
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_nodewin.erl b/lib/tv/src/tv_nodewin.erl
deleted file mode 100644
index 8376c4a7aa..0000000000
--- a/lib/tv/src/tv_nodewin.erl
+++ /dev/null
@@ -1,412 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_nodewin).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,listbox,3}},
- {nowarn_deprecated_function,{gs,menu,3}},
- {nowarn_deprecated_function,{gs,menubar,3}},
- {nowarn_deprecated_function,{gs,menubutton,3}},
- {nowarn_deprecated_function,{gs,menuitem,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([start/2, init/3]).
-
-
--include("tv_int_msg.hrl").
-
-
-
--define(WINDOW_WIDTH, 230).
--define(WINDOW_HEIGHT, 260).
--define(DEFAULT_BG_COLOR, {217,217,217}).
--define(POLL_INTERVAL, 5000).
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-start(CurrNode, ErrMsgMode) ->
- spawn_link(?MODULE, init, [self(), CurrNode, ErrMsgMode]).
-
-
-
-
-
-init(Pid, CurrNode, ErrMsgMode) ->
- process_flag(trap_exit, true),
- net_kernel:monitor_nodes(true),
- put(error_msg_mode, ErrMsgMode),
- gs:start(),
- NewCurrNode = update_node_listbox(CurrNode, false),
- tell_master(NewCurrNode, CurrNode, Pid),
- loop(Pid, NewCurrNode, node(), false).
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-init_window(CurrNode, Pid) ->
- create_window(),
- NewCurrNode = update_node_listbox(CurrNode, true),
- tell_master(NewCurrNode, CurrNode, Pid),
- gs:config(win, [{map,true}]),
- NewCurrNode.
-
-
-
-
-handle_error(nodedown) ->
- gs:window(errorwin, gs:start(), []),
- gs:config(errorwin, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(errorwin, "TV Notification", ["The selected node is down!"]);
- haiku ->
- Msg = ["With searching comes loss",
- "And the presence of absence:",
- "Node is down."],
- tv_utils:notify(errorwin, "TV Notification", Msg)
- end,
- gs:destroy(errorwin);
-handle_error(distributed) ->
- gs:window(errorwin, gs:start(), []),
- gs:config(errorwin, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(errorwin, "TV Notification",
- ["The system has become distributed!"]);
- haiku ->
- Msg = [],
- tv_utils:notify(errorwin, "TV Notification", Msg)
- end,
- gs:destroy(errorwin);
-handle_error(undistributed) ->
- gs:window(errorwin, gs:start(), []),
- gs:config(errorwin, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(errorwin, "TV Notification",
- ["The system is no longer distributed!"]);
- haiku ->
- Msg = ["The system you see",
- "Is not a distributed",
- "system anymore."],
- tv_utils:notify(errorwin, "TV Notification", Msg)
- end,
- gs:destroy(errorwin).
-
-get_node_lists(CurrNode) ->
- NodeDataList = lists:sort([node() | nodes()]),
- NodeTextList = lists:map(fun(Item) ->
- " " ++ atom_to_list(Item)
- end,
- NodeDataList),
-
- %% It *may* be possible that CurrNode has disappeared!
- %% If this is the case, use the node where TV resides
- %% as new current node.
- %% This also covers the case when our own node (or some
- %% other node) suddenly goes distributed.
-
- NewCurrNode = case lists:member(CurrNode, NodeDataList) of
- true ->
- CurrNode;
- false ->
- node()
- end,
-
- %% Now get the index that shall be marked in the node listbox.
- %% Remember that the first item has number 0 (zero)!
- NodeMarkIndex = get_node_mark_index(NewCurrNode, NodeDataList, 0),
-
- {NewCurrNode, NodeDataList, NodeTextList, NodeMarkIndex}.
-
-
-
-
-%% We know that CurrNode is *somewhere* in the list, since we have checked.
-%% If the original CurrNode wasn't there, then we are using node() instead,
-%% which definitely is in the list. (node() may have gone distributed in the
-%% meantime, but it *IS* in the list!) :-)
-
-get_node_mark_index(CurrNode, [H | T], Acc) when CurrNode =/= H ->
- get_node_mark_index(CurrNode, T, Acc + 1);
-get_node_mark_index(CurrNode, [CurrNode | _], Acc) ->
- Acc. %% Acc tells the index of the current head. :-)
-
-
-
-
-
-check_selected_node('nonode@nohost', _OldNode, _WinCreated) when node() =:= 'nonode@nohost' ->
- %% Not distributed, OK!
- 'nonode@nohost';
-check_selected_node(_Node, _OldNode, WinCreated) when node() =:= 'nonode@nohost' ->
- %% No longer distributed, but previously was!
- handle_error(undistributed),
- update_node_listbox('nonode@nohost', WinCreated);
-check_selected_node(Node, _OldNode, _WinCreated) when Node =:= node() ->
- %% We are distributed, but on
- %% our own node! Since we
- % still are running, the node
- %% is up.
- Node;
-check_selected_node(Node, 'nonode@nohost', WinCreated) ->
- %% The system has been distributed!
- net_kernel:monitor_nodes(true),
- handle_error(distributed),
- update_node_listbox(Node, WinCreated);
-check_selected_node(Node, _OldNode, WinCreated) ->
- %% We are distributed, and a new node has been chosen!
- %% We better check this node!
- case net_adm:ping(Node) of
- pong ->
- Node;
- _Other ->
- handle_error(nodedown),
- update_node_listbox(Node, WinCreated)
- end.
-
-
-
-available_nodes() ->
- lists:sort([node() | nodes()]).
-
-
-
-loop(Pid, CurrNode, HomeNode, WinCreated) ->
- receive
-
- {nodedown, _Node} ->
- flush_nodedown_messages(),
- flush_nodeup_messages(),
- case lists:member(CurrNode, available_nodes()) of
- true ->
- done;
- false when node() =:= 'nonode@nohost', CurrNode =/= 'nonode@nohost' ->
- handle_error(undistributed);
- false ->
- handle_error(nodedown)
- end,
- NewCurrNode = update_node_listbox(CurrNode, WinCreated),
- tell_master(NewCurrNode, CurrNode, Pid),
- loop(Pid, NewCurrNode, node(), WinCreated);
-
-
- {nodeup, _Node} ->
- flush_nodeup_messages(),
- flush_nodedown_messages(),
- case lists:member(CurrNode, available_nodes()) of
- true ->
- done;
- false when node() =:= 'nonode@nohost', CurrNode =/= 'nonode@nohost' ->
- handle_error(undistributed);
- false when CurrNode =:= 'nonode@nohost' ->
- net_kernel:monitor_nodes(true),
- handle_error(distributed);
- false ->
- handle_error(nodedown)
- end,
- NewCurrNode = update_node_listbox(CurrNode, WinCreated),
- tell_master(NewCurrNode, CurrNode, Pid),
- loop(Pid, NewCurrNode, node(), WinCreated);
-
-
- {gs, node_listbox, click, Data, [Idx, _Txt | _]} ->
- NewCurrNode = check_selected_node(lists:nth(Idx + 1, Data), CurrNode, WinCreated),
- tell_master(NewCurrNode, CurrNode, Pid),
- loop(Pid, NewCurrNode, node(), WinCreated);
-
-
- {gs, win, configure, _, _} ->
- gs:config(win, [{width, ?WINDOW_WIDTH}, {height, ?WINDOW_HEIGHT}]),
- loop(Pid, CurrNode, HomeNode, WinCreated);
-
-
- show_window when WinCreated->
- gs:config(win, [raise]),
- loop(Pid, CurrNode, HomeNode, WinCreated);
-
- show_window when not WinCreated ->
- init_window(CurrNode, Pid),
- loop(Pid, CurrNode, HomeNode, true);
-
- {gs, _Id, click, close_menu, _Args} ->
- gs:destroy(win),
- loop(Pid, CurrNode, HomeNode, false);
-
-
- {gs, _Id, keypress, _Data, [c, _, 0, 1 | _]} ->
- gs:destroy(win),
- loop(Pid, CurrNode, HomeNode, false);
-
-
- {gs, _Id, keypress, _Data, ['C', _, 1, 1 | _]} ->
- gs:destroy(win),
- loop(Pid, CurrNode, HomeNode, false);
-
-
- {gs, _Id, keypress, _Data, _Args} ->
- loop(Pid, CurrNode, HomeNode, WinCreated);
-
-
- {gs, _, destroy, _, _} ->
- loop(Pid, CurrNode, HomeNode, false);
-
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- loop(Pid, CurrNode, HomeNode, WinCreated);
-
- {'EXIT', Pid, _Reason} ->
- net_kernel:monitor_nodes(false),
- exit(normal);
-
-
- {'EXIT', _OtherPid, _Reason} ->
- loop(Pid, CurrNode, HomeNode, WinCreated);
-
-
- _Other ->
- io:format("Node window received message ~p ~n", [_Other]),
- loop(Pid, CurrNode, HomeNode, WinCreated)
-
- after
- 1000 ->
- NewHomeNode = case node() of
- HomeNode ->
- HomeNode;
- Other ->
- self() ! {nodeup, Other}
- end,
- loop(Pid, CurrNode, NewHomeNode, WinCreated)
- end.
-
-
-
-
-tell_master(NewNode, NewNode, _Pid) ->
- done;
-tell_master(NewNode, _OldNode, Pid) ->
- Pid ! {tv_new_node, self(), NewNode}.
-
-
-
-
-flush_nodedown_messages() ->
- receive
- {nodedown,_Node} ->
- flush_nodedown_messages()
- after
- 0 ->
- done
- end.
-
-
-
-
-flush_nodeup_messages() ->
- receive
- {nodeup,_Node} ->
- flush_nodeup_messages()
- after
- 0 ->
- done
- end.
-
-
-
-
-update_node_listbox(Node, WinCreated) ->
- {NewNode, NodeDataList, NodeTextList, MarkIndex} = get_node_lists(Node),
- case WinCreated of
- false ->
- done;
- true ->
- catch gs:config(node_listbox, [{data, NodeDataList},
- {items, NodeTextList},
- {selection, MarkIndex}
- ])
- end,
- NewNode.
-
-
-
-
-
-create_window() ->
- gs:window(win, gs:start(), [{width, ?WINDOW_WIDTH},
- {height, ?WINDOW_HEIGHT},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "[TV] Connected nodes"},
- {configure, true},
- {destroy, true},
- {cursor, arrow},
- {keypress, true}
- ]),
- gs:menubar(menubar, win, [{bg, ?DEFAULT_BG_COLOR}
- ]),
- gs:menubutton(mbutt, menubar, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}, % firebrick
- {label, {text, " File "}},
- {underline, 1}
- ]),
-
- % Create the actual menu!
- gs:menu(menu, mbutt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}]),
- gs:menuitem(menu, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}},
- {label, {text, " Close Ctrl-C "}},
- {data, close_menu},
- {underline, 1}
- ]),
-
- Xpos = 4,
- Ypos = 40,
- gs:listbox(node_listbox, win, [{x, Xpos},
- {y, Ypos},
- {width, ?WINDOW_WIDTH - 2 * Xpos},
- {height, ?WINDOW_HEIGHT - Ypos - Xpos},
- {bg, {255,255,255}},
- {vscroll, right},
- {hscroll, true},
- {click, true}
- ]).
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_pb.erl b/lib/tv/src/tv_pb.erl
deleted file mode 100644
index 81e7e7e2d1..0000000000
--- a/lib/tv/src/tv_pb.erl
+++ /dev/null
@@ -1,663 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pb).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,frame,2}}]).
-
-
-
--export([pb/1]).
-
-
--include("tv_int_def.hrl").
--include("tv_pd_int_msg.hrl").
--include("tv_pb_int_def.hrl").
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function: pb.
-%%
-%% Return Value: None.
-%%
-%% Description: Process controlling the grid buttons on the display.
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-pb(ParentPid) ->
- process_flag(trap_exit, true),
- ProcVars = #process_variables{parent_pid = ParentPid},
- loop(ProcVars).
-
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-%%======================================================================
-%% Function: loop.
-%%
-%% Return Value: None.
-%%
-%% Description: Eternal (well, almost) loop, receiving messages and
-%% handling them.
-%%
-%% Parameters:
-%%======================================================================
-
-
-loop(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- #pb_update_vbtns{} ->
- NewProcVars = update_vbtns(Msg, ProcVars),
- loop(NewProcVars);
-
- #pb_key_info{} ->
- NewProcVars = update_keys(Msg, ProcVars),
- loop(NewProcVars);
-
- #pb_update_hbtns{} ->
- NewProcVars = update_hbtns(Msg, ProcVars),
- loop(NewProcVars);
-
- #pb_set_sort_col{} ->
- NewProcVars = set_sort_col(Msg, ProcVars),
- loop(NewProcVars);
-
- #pb_remove_marks{} ->
- NewProcVars = remove_marks(ProcVars),
- loop(NewProcVars);
-
- #pb_init_btns{} ->
- NewProcVars = init_btns(Msg, ProcVars),
- loop(NewProcVars);
-
- {gs, Id, Event, Data, Args} ->
- NewProcVars = gs_messages({Id, Event, Data, Args}, ProcVars),
- loop(NewProcVars);
-
-
- {'EXIT', Pid, Reason} ->
- ParentPid = ProcVars#process_variables.parent_pid,
- exit_signals({Pid, Reason}, ParentPid, ProcVars),
- loop(ProcVars);
-
- _Other ->
- loop(ProcVars)
- end
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-exit_signals(ExitInfo, ParentPid, _ProcVars) ->
- case ExitInfo of
- {ParentPid, _Reason} ->
- exit(normal);
- _Other ->
- done
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-gs_messages(Msg, ProcVars) ->
-
- case Msg of
-
- {Id, click, {hbtn, RealCol, VirtualCol}, _Args} ->
- handle_col_marking(Id, RealCol, VirtualCol, ProcVars);
-
- {Id, buttonpress, {resbtn, RealCol, VirtualCol, Xpos}, [1 | _Tail]} ->
- handle_col_resizing(Id, RealCol, VirtualCol, Xpos, ProcVars),
- ProcVars;
-
- {_Id, click, {vbtn, RealRow, VirtualRow}, _Args} ->
- handle_row_marking(RealRow, VirtualRow, ProcVars);
-
- _OtherMessage ->
- ProcVars
-
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-remove_marks(ProcVars) ->
- #process_variables{col_mark_params = ColMarkP,
- row_mark_params = RowMarkP} = ProcVars,
-
- #col_mark_params{col_btn_id = BtnId,
- virtual_col_marked = VirtualCol,
- virtual_sort_col = SortCol} = ColMarkP,
-
- case BtnId of
- undefined ->
- done;
- _AnyId ->
- case VirtualCol of
- SortCol ->
- gs:config(BtnId, [{bg, ?SORT_MARK_COLOR},
- {fg, {0, 0, 0}}
- ]);
- _Other ->
- gs:config(BtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ])
- end
- end,
-
- NewRowMarkP = RowMarkP#row_mark_params{virtual_row_marked = undefined,
- real_row_marked = undefined
- },
- NewColMarkP = ColMarkP#col_mark_params{col_btn_id = undefined,
- virtual_col_marked = undefined
- },
- ProcVars#process_variables{col_mark_params = NewColMarkP,
- row_mark_params = NewRowMarkP
- }.
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-handle_col_marking(BtnId, RealCol, VirtualCol, ProcVars) ->
- #process_variables{parent_pid = PdPid,
- col_mark_params = ColMarkP,
- row_mark_params = RowMarkP} = ProcVars,
-
- #col_mark_params{col_btn_id = OldBtnId,
- virtual_col_marked = OldVirtualCol,
- virtual_sort_col = SortCol} = ColMarkP,
-
- {ColMarked, NewColMarkP} = mark_col_btn(BtnId, OldBtnId, VirtualCol,
- OldVirtualCol, RealCol, SortCol,
- ColMarkP),
-
- PdPid ! #pb_col_marked{sender = self(),
- col_marked = ColMarked,
- real_col = RealCol,
- virtual_col = VirtualCol
- },
-
- NewRowMarkP = RowMarkP#row_mark_params{virtual_row_marked = undefined,
- real_row_marked = undefined
- },
- ProcVars#process_variables{col_mark_params = NewColMarkP,
- row_mark_params = NewRowMarkP
- }.
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-handle_row_marking(RealRow, VirtualRow, ProcVars) ->
- #process_variables{parent_pid = PdPid,
- col_mark_params = ColMarkP,
- row_mark_params = RowMarkP} = ProcVars,
-
- #col_mark_params{col_btn_id = OldBtnId,
- virtual_col_marked = OldVirtualCol,
- virtual_sort_col = SortCol} = ColMarkP,
-
- {_ColMarked, NewColMarkP} = mark_col_btn(OldBtnId, OldBtnId, OldVirtualCol,
- OldVirtualCol, undefined, SortCol,
- ColMarkP),
-
- #row_mark_params{virtual_row_marked = OldVirtualRow} = RowMarkP,
-
- % Check if row shall be marked or unmarked!
- {RowMarked, NewRowMarkP} = check_marked_row(VirtualRow, OldVirtualRow, RealRow,
- RowMarkP),
-
- PdPid ! #pb_row_marked{sender = self(),
- row_marked = RowMarked,
- real_row = RealRow,
- virtual_row = VirtualRow
- },
-
- ProcVars#process_variables{row_mark_params = NewRowMarkP,
- col_mark_params = NewColMarkP}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-%% Three cases: no button previously clicked, or same button clicked,
-%% or some other button clicked.
-
-check_marked_row(NewVirtRow, undefined, RealRow, RowMarkP) ->
- % No btn already pressed!
- {true, RowMarkP#row_mark_params{virtual_row_marked = NewVirtRow,
- real_row_marked = RealRow}};
-check_marked_row(NewVirtRow, OldVirtRow, _RealRow, RowMarkP) when NewVirtRow =:= OldVirtRow ->
- % The button previously pressed has been pressed again!
- {false, RowMarkP#row_mark_params{virtual_row_marked = undefined,
- real_row_marked = undefined}};
-check_marked_row(NewVirtRow, _OldVirtRow, RealRow, RowMarkP) ->
- % A new btn has been pressed!
- {true, RowMarkP#row_mark_params{virtual_row_marked = NewVirtRow,
- real_row_marked = RealRow}}.
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_sort_col(Msg, ProcVars) ->
- #pb_set_sort_col{virtual_col = SortCol} = Msg,
- tv_pb_funcs:set_new_sort_col(SortCol, ProcVars).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-%% Three cases: no button previously clicked, or same button clicked,
-%% or some other button clicked.
-
-mark_col_btn(NewId, undefined, NewVirtCol, _OldVirtCol, _RealCol, _SortCol, ColMarkP) ->
- % No btn already pressed!
- gs:config(NewId, [{bg, ?COL_MARK_COLOR},
- {fg, {255, 255, 255}}
- ]),
- {true, ColMarkP#col_mark_params{col_btn_id = NewId,
- virtual_col_marked = NewVirtCol}};
-mark_col_btn(NewId, _OldId, NewVirtCol, OldVirtCol, _RealCol, SortCol, ColMarkP) when NewVirtCol =:= OldVirtCol, NewVirtCol =:= SortCol ->
- % The button previously pressed has been pressed again!
- gs:config(NewId, [{bg, ?SORT_MARK_COLOR},
- {fg, {0, 0, 0}}
- ]),
- {false, ColMarkP#col_mark_params{col_btn_id = undefined,
- virtual_col_marked = undefined}};
-mark_col_btn(NewId, _OldId, NewVirtCol, OldVirtCol, _RealCol, _SortCol, ColMarkP) when NewVirtCol =:= OldVirtCol ->
- % The button previously pressed has been pressed again!
- gs:config(NewId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ]),
- {false, ColMarkP#col_mark_params{col_btn_id = undefined,
- virtual_col_marked = undefined}};
-mark_col_btn(NewId, OldId, NewVirtCol, _OldVirtCol, _RealCol, _SortCol, ColMarkP) ->
- % A new btn has been pressed!
- gs:config(OldId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ]),
- gs:config(NewId, [{bg, ?COL_MARK_COLOR},
- {fg, {255, 255, 255}}
- ]),
- {true, ColMarkP#col_mark_params{col_btn_id = NewId,
- virtual_col_marked = NewVirtCol}}.
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-handle_col_resizing(RbtnId, RealCol, VirtualCol, Xpos, ProcVars) ->
- gs:config(RbtnId, [{motion, true}]),
- #process_variables{parent_pid = ParentPid,
- grid_frame_id = GrFrId,
- grid_frame_height = Height,
- hbtn_height = HbtnH,
- resbtn_width = RbtnW,
- cols_shown = ColsShown} = ProcVars,
-
- LineId = gs:frame(GrFrId, [{width, 1},
- {height, Height - HbtnH},
- {x, Xpos},
- {y, HbtnH - 1},
- {bg, ?DEFAULT_BG_COLOR}
- ]),
- MinColWidth = RbtnW,
-
- OldColWidth = lists:nth(RealCol, ColsShown),
- Xdiff = get_xdiff(RbtnId, 1, 0, LineId, Xpos, MinColWidth - OldColWidth),
-
- ParentPid ! #pb_new_colwidth{sender = self(),
- real_col = RealCol,
- virtual_col = VirtualCol,
- xdiff = Xdiff},
-
- gs:config(RbtnId, [{motion, false}]),
- gs:destroy(LineId).
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_xdiff(Id, Btn, LastXdiff, LineId, LineXpos, MinAllowedXdiff) ->
- receive
- {gs, Id, motion, {resbtn, _RealCol, _VirtCol, _OldXpos}, [NewXdiff | _T]} ->
- UsedXdiff = erlang:max(MinAllowedXdiff, NewXdiff),
- gs:config(LineId, [{x, LineXpos + UsedXdiff}]),
- get_xdiff(Id, Btn, UsedXdiff, LineId, LineXpos, MinAllowedXdiff);
- {gs, Id, buttonrelease, _Data, [Btn | _T]} ->
- LastXdiff;
- {gs, Id, buttonrelease, _Data, _Args} ->
- get_xdiff(Id, Btn, LastXdiff, LineId, LineXpos, MinAllowedXdiff);
- {gs, Id, buttonpress, _Data, _Args} ->
- get_xdiff(Id, Btn, LastXdiff, LineId, LineXpos, MinAllowedXdiff)
- end.
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init_btns(Msg, ProcVars) ->
- #pb_init_btns{parent_id = ParentId,
- parent_width = Width,
- parent_height = Height,
- ypos = Ypos,
- hbtn_height = HbtnH,
- resbtn_width = RbtnW,
- vbtn_width = VbtnW,
- nof_rows = NofRows,
- row_height = RowHeight,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown} = Msg,
-
- NewProcVars = tv_pb_funcs:init_btns(ParentId, Ypos, HbtnH, VbtnW, RbtnW,
- FirstColShown, ColsShown, NofRows,
- RowHeight, ProcVars),
-
- gs:frame(ParentId, [{bg, {0, 0, 0}},
- {bw, 0},
- {width, 1300},
- {height, 1},
- {x, 0},
- {y, Ypos - 1}
- ]),
- NewProcVars#process_variables{grid_frame_width = Width,
- grid_frame_height = Height
- }.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_hbtns(Msg, ProcVars) ->
- #pb_update_hbtns{parent_width = Width,
- parent_height = Height,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown} = Msg,
-
- NewProcVars = tv_pb_funcs:update_hbtns(FirstColShown, ColsShown, ProcVars),
-
- NewProcVars#process_variables{grid_frame_width = Width,
- grid_frame_height = Height
- }.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_vbtns(Msg, ProcVars) ->
- #pb_update_vbtns{color_list = Colors,
- first_row_shown = FirstRowShown,
- nof_rows_shown = NofRowsShown,
- blinking_enabled = BlinkEnabled} = Msg,
-
- tv_pb_funcs:update_vbtns(NofRowsShown, FirstRowShown, Colors, BlinkEnabled,
- ProcVars).
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_keys(Msg, ProcVars) ->
- #pb_key_info{list_of_keys = KeyList} = Msg,
- tv_pb_funcs:update_keys(KeyList, ProcVars).
diff --git a/lib/tv/src/tv_pb_funcs.erl b/lib/tv/src/tv_pb_funcs.erl
deleted file mode 100644
index 24d1120597..0000000000
--- a/lib/tv/src/tv_pb_funcs.erl
+++ /dev/null
@@ -1,1056 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pb_funcs).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,canvas,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-
-
--export([init_btns/10,
- update_hbtns/3,
- update_vbtns/5,
- update_keys/2,
- set_new_sort_col/2]).
-
-
--include("tv_int_def.hrl").
--include("tv_pb_int_def.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-
-init_btns(ParentId, Ypos, HbtnH,
- VbtnW, ResbtnW, FirstColShown, ColsShown, NofRows, RowH, ProcVars) ->
-
- #process_variables{key_numbers = KeyNos,
- key_ids = KeyIds} = ProcVars,
-
-% C = gs:canvas(ParentId, [{width, VbtnW - 1},
-% {height, HbtnH},
-% {x, 0},
-% {y, HbtnH + 1},
-% {bg, white}
-% ]),
-% gs:create(image, C, [{load_gif, "erlang.gif"}]),
-
- {HbtnsShown, ResBtnsShown} = update_hbtns(ColsShown, [], [],
- FirstColShown, ParentId, Ypos,
- HbtnH, ResbtnW, VbtnW),
-
- NewKeyIds = update_keys(KeyNos, KeyIds, FirstColShown,
- FirstColShown + length(ColsShown) - 1, HbtnsShown,
- ParentId, []),
-
- VbtnsShown = create_vbtns(ParentId, Ypos, NofRows, RowH, VbtnW, HbtnH),
- ProcVars#process_variables{grid_frame_id = ParentId,
- ypos = Ypos,
- hbtn_height = HbtnH,
- vbtn_width = VbtnW,
- resbtn_width = ResbtnW,
- first_col_shown = FirstColShown,
- hbtns_shown = HbtnsShown,
- resbtns_shown = ResBtnsShown,
- vbtns_shown = VbtnsShown,
- cols_shown = ColsShown,
- key_ids = NewKeyIds
- }.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_hbtns(FirstColShown, ColsShown, ProcVars) ->
- #process_variables{grid_frame_id = ParentId,
- first_col_shown = OldFirstColShown,
- cols_shown = OldColsShown,
- ypos = Ypos,
- hbtn_height = HbtnH,
- vbtn_width = VbtnW,
- resbtn_width = ResbtnW,
- hbtns_shown = HbtnsShown,
- resbtns_shown = ResbtnsShown,
- key_numbers = KeyNos,
- key_ids = KeyIds,
- col_mark_params = ColMarkP} = ProcVars,
-
- % Only if the grid has been scrolled horizontally need we move the
- % col mark!
- case FirstColShown of
- OldFirstColShown ->
- done;
- _NewValue ->
- #col_mark_params{col_btn_id = MarkedBtnId,
- virtual_col_marked = ColMarked,
- sort_btn_id = SortBtnId,
- virtual_sort_col = SortCol} = ColMarkP,
- unmark_marked_col(MarkedBtnId, ColMarked, SortCol),
- unmark_sort_col(SortBtnId, ColMarked, SortCol)
- end,
-
- {NewHbtns, NewResbtns, NewKeys} =
- case {FirstColShown, ColsShown} of
- {OldFirstColShown, OldColsShown} ->
- {HbtnsShown, ResbtnsShown, KeyIds};
- _Other ->
- {NewHbtnsShown, NewResbtnsShown} = update_hbtns(ColsShown,
- HbtnsShown,
- ResbtnsShown,
- FirstColShown,
- ParentId,
- Ypos,
- HbtnH,
- ResbtnW,
- VbtnW),
- NewKeyIds = update_keys(KeyNos, KeyIds, FirstColShown,
- FirstColShown + length(ColsShown) - 1,
- NewHbtnsShown, ParentId, []),
- {NewHbtnsShown, NewResbtnsShown, NewKeyIds}
- end,
-
- % Now mark the marked column again!
- NewColMarkP = mark_marked_col(NewHbtns, FirstColShown, ColMarkP),
-
- ProcVars#process_variables{first_col_shown = FirstColShown,
- hbtns_shown = NewHbtns,
- resbtns_shown = NewResbtns,
- cols_shown = ColsShown,
- key_ids = NewKeys,
- col_mark_params = NewColMarkP
- }.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_vbtns(NofRowsShown, FirstRowShown, Colors, BlinkEnabled, ProcVars) ->
- #process_variables{vbtns_shown = Vbtns,
- blink_color_list = BlinkList} = ProcVars,
-
- update_vbtns(1, NofRowsShown, FirstRowShown, Vbtns, Colors, BlinkEnabled, BlinkList),
- NewProcVars = update_sort_btn_mark(ProcVars),
- NewProcVars.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_new_sort_col(SortCol, ProcVars) ->
- #process_variables{hbtns_shown = HbtnsShown,
- col_mark_params = ColMarkP} = ProcVars,
-
- #col_mark_params{col_btn_id = MarkedColBtnId,
- sort_btn_id = OldSortBtnId} = ColMarkP,
-
- % Set the new color of the sort btn, and remove the mark, if it is the same
- % column!
-
- case MarkedColBtnId of
- undefined ->
- done;
- _AnyId ->
- gs:config(MarkedColBtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ])
- end,
-
- SortBtnId = get_btn_id(SortCol, HbtnsShown),
- case SortBtnId of
- undefined ->
- % The btn isn't visible, or no sorting shall be performed!
- gs:config(OldSortBtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ]);
- _Other ->
- % Unmark the old sort btn id!
- gs:config(OldSortBtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ]),
- gs:config(SortBtnId, [{bg, ?SORT_MARK_COLOR},
- {fg, {0, 0, 0}}
- ])
- end,
-
- NewColMarkP = ColMarkP#col_mark_params{col_btn_id = undefined,
- virtual_col_marked = undefined,
- sort_btn_id = SortBtnId,
- virtual_sort_col = SortCol
- },
- ProcVars#process_variables{col_mark_params = NewColMarkP}.
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_keys(KeyList, ProcVars) ->
- #process_variables{key_numbers = OldKeyList,
- key_ids = KeyIds,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- hbtns_shown = HbtnsShown,
- grid_frame_id = ParentId} = ProcVars,
-
- NewKeyIds = case KeyList of
- OldKeyList ->
- KeyIds;
- NewKeyList ->
- update_keys(NewKeyList, KeyIds, FirstColShown,
- FirstColShown + length(ColsShown) - 1,
- HbtnsShown, ParentId, [])
- end,
-
- ProcVars#process_variables{key_numbers = KeyList,
- key_ids = NewKeyIds
- }.
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-unmark_sort_col(undefined, _ColMarked, _SortCol) ->
- done;
-unmark_sort_col(SortBtnId, _ColMarked, _SortCol) ->
- gs:config(SortBtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}}
- ]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_marked_col(HbtnsShown, _FirstColShown, ColMarkP) ->
- #col_mark_params{virtual_col_marked = VirtualCol,
- virtual_sort_col = SortCol} = ColMarkP,
-
- {NewMarkBtnId, NewSortBtnId} =
- case VirtualCol of
- SortCol ->
- % Same btn!
- BtnId = get_btn_id(VirtualCol,
- HbtnsShown),
- gs:config(BtnId, [{bg, ?SORT_MARK_COLOR},
- {fg, {0, 0, 0}}
- ]),
- {BtnId, BtnId};
- _OtherCol ->
- MarkBtnId = get_btn_id(VirtualCol, HbtnsShown),
- case MarkBtnId of
- undefined ->
- done;
- _Else ->
- gs:config(MarkBtnId, [{bg, ?COL_MARK_COLOR},
- {fg, {255, 255, 255}}
- ])
- end,
-
- SortBtnId = get_btn_id(SortCol, HbtnsShown),
- case SortBtnId of
- undefined ->
- done;
- _OtherId ->
- gs:config(SortBtnId, [{bg, ?SORT_MARK_COLOR},
- {fg, {0, 0, 0}}
- ])
- end,
-
- {MarkBtnId, SortBtnId}
- end,
-
- ColMarkP#col_mark_params{col_btn_id = NewMarkBtnId,
- sort_btn_id = NewSortBtnId}.
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-unmark_marked_col(undefined, _ColMarked, _SortCol) ->
- done;
-unmark_marked_col(BtnId, _ColMarked, _SortCol) ->
- gs:config(BtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}}
- ]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_sort_btn_mark(ProcVars) ->
- #process_variables{hbtns_shown = HbtnsShown,
- col_mark_params = ColMarkP} = ProcVars,
-
- #col_mark_params{col_btn_id = MarkedColBtnId,
- virtual_col_marked = ColMarked,
- sort_btn_id = OldSortBtnId,
- virtual_sort_col = SortCol} = ColMarkP,
-
- {NewMarkedColBtnId, NewColMarked} = case ColMarked of
- SortCol ->
- {undefined, undefined};
- _Other ->
- {MarkedColBtnId, ColMarked}
- end,
-
- NewSortBtnId = set_sort_btn_color(OldSortBtnId, SortCol, HbtnsShown),
-
- NewColMarkP = ColMarkP#col_mark_params{col_btn_id = NewMarkedColBtnId,
- virtual_col_marked = NewColMarked,
- sort_btn_id = NewSortBtnId},
-
- ProcVars#process_variables{col_mark_params = NewColMarkP}.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_btn_id(VirtualCol, HbtnsShown) ->
- case lists:keysearch(VirtualCol, #hbtn.virtual_col, HbtnsShown) of
- false ->
- undefined;
- {value, HbtnRec} ->
- HbtnRec#hbtn.id
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_sort_btn_color(undefined, SortCol, HbtnsShown) ->
- case lists:keysearch(SortCol, #hbtn.virtual_col, HbtnsShown) of
- false ->
- undefined;
- {value, HbtnRec} ->
- BtnId = HbtnRec#hbtn.id,
- gs:config(BtnId, [{bg, ?SORT_MARK_COLOR}]),
- BtnId
- end;
-set_sort_btn_color(BtnId, undefined, _HbtnsShown) ->
- gs:config(BtnId, [{bg, ?DEFAULT_BG_COLOR}]);
-set_sort_btn_color(OldSortBtnId, SortCol, HbtnsShown) ->
- case gs:read(OldSortBtnId, bg) of
- SortCol ->
- % Btn is already marked!
- OldSortBtnId;
- _OtherColor ->
- % Unmark old btn, mark new btn, if visible.
- gs:config(OldSortBtnId, [{bg, ?DEFAULT_BG_COLOR}]),
- case lists:keysearch(SortCol, #hbtn.virtual_col, HbtnsShown) of
- false ->
- undefined;
- {value, HbtnRec} ->
- BtnId = HbtnRec#hbtn.id,
- gs:config(BtnId, [{bg, ?SORT_MARK_COLOR}]),
- BtnId
- end
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_vbtns(N, NofRowsShown, _VirtualRowNo,
- _Vbtns, _Colors, _BlinkEnabled, _BlinkList) when N > NofRowsShown ->
- done;
-update_vbtns(_N, _NofRowsShown, _VirtualRowNo, [], [], _BlinkEnabled, _BlinkList) ->
- done;
-update_vbtns(_N, _NofRowsShown, _VirtualRowNo, [], _Colors, _BlinkEnabled, _BlinkList) ->
- % Right now we don't bother with dynamically creating row buttons:
- % we ought too know in advance the maximum number of rows that can
- % be visible.
- io:format("Configuration error: too few rows in grid.~n"),
- done;
-update_vbtns(N, NofRowsShown,
- VirtualRowNo, [VbtnRec | VT], [], BlinkEnabled, BlinkList) ->
- VbtnId = VbtnRec#vbtn.id,
- gs:config(VbtnId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, ?BLACK},
- {label, {text, integer_to_list(VirtualRowNo)}},
- {data, {vbtn, N, VirtualRowNo}} % Real row + virtual row
- ]),
- update_vbtns(N + 1, NofRowsShown, VirtualRowNo + 1,VT, [], BlinkEnabled,
- BlinkList);
-update_vbtns(N, NofRowsShown,
- VirtualRowNo, [VbtnRec | VT], [Color | CT], true, BlinkList) ->
- VbtnId = VbtnRec#vbtn.id,
- {Text, TextColor} = get_vbtn_text_and_textcolor(Color, VirtualRowNo),
- case lists:member(Color, BlinkList) of
- true ->
- gs:config(VbtnId, [{bg, Color},
- {fg, TextColor},
- {label, {text, Text}},
- {data, {vbtn, N, VirtualRowNo}}, % Real + virtual row
- flash
- ]);
- false ->
- gs:config(VbtnId, [{bg, Color},
- {fg, TextColor},
- {label, {text, Text}},
- {data, {vbtn, N, VirtualRowNo}} % Real + virtual row
- ])
- end,
- update_vbtns(N + 1, NofRowsShown, VirtualRowNo + 1, VT, CT, true, BlinkList);
-update_vbtns(N, NofRowsShown,
- VirtualRowNo, [VbtnRec | VT], [Color | CT], false, BlinkList) ->
- VbtnId = VbtnRec#vbtn.id,
- {Text, TextColor} = get_vbtn_text_and_textcolor(Color, VirtualRowNo),
- gs:config(VbtnId, [{bg, Color},
- {fg, TextColor},
- {label, {text, Text}},
- {data, {vbtn, N, VirtualRowNo}} % Real row + virtual row
- ]),
- update_vbtns(N + 1, NofRowsShown, VirtualRowNo + 1, VT, CT, false, BlinkList).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_vbtn_text_and_textcolor(?BLACK, N) ->
- {integer_to_list(N), ?WHITE};
-get_vbtn_text_and_textcolor(?RED1, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?RED2, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?RED3, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?RED4, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?RED5, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?GREEN1, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?GREEN2, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?GREEN3, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?GREEN4, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(?GREEN5, N) ->
- {integer_to_list(N), ?BLACK};
-get_vbtn_text_and_textcolor(_AnyOtherColor, N) ->
- {integer_to_list(N), ?BLACK}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_vbtns(ParentId, Ypos, NofRows, RowHeight, VbtnW, HbtnH) ->
- create_vbtns(1, NofRows, RowHeight, ParentId, VbtnW, Ypos + HbtnH, []).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_vbtns(N, NofRows, _RowHeight, _ParId, _VbtnW, _Ypos, VAcc) when N > NofRows ->
- lists:reverse(VAcc);
-create_vbtns(N, NofRows, RowHeight, ParId, VbtnW, Ypos, VAcc) ->
- VHeight = RowHeight + 1,
- VInfo = create_one_vbtn(ParId, VHeight, VbtnW, Ypos, N),
- create_vbtns(N + 1, NofRows, RowHeight, ParId, VbtnW, Ypos + VHeight,
- [VInfo | VAcc]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_one_vbtn(ParentId, Height, VbtnW, Ypos, N) ->
- Id = gs:button(ParentId, [{width, VbtnW},
- {height, Height},
- {x, 0},
- {y, Ypos},
- {font, ?BTN_FONT},
- {bg, ?DEFAULT_BG_COLOR},
- {align, center},
- {label, {text,integer_to_list(N)}},
- {data, {vbtn, N, N}} % Real row + virtual row
- ]),
- #vbtn{virtual_row = N,
- real_row = N,
- id = Id,
- height = Height,
- ypos = Ypos}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_hbtns([], _HBtnsShown,
- _ResBtns, _VirtualColNo, _FrId, _Ypos, _HbtnH, _ResBtnW, _VbtnW) ->
- {[], []};
-update_hbtns(ColsShown, HBtns,
- ResBtns, VirtualColNo, FrId, Ypos, HbtnH, ResBtnW, VbtnW) ->
- update_hbtns(1, ColsShown, HBtns, ResBtns, HbtnH, ResBtnW, VbtnW,
- VirtualColNo, FrId, 0, Ypos, [], []).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_hbtns(_N, [],
- [], [], _HbtnH, _ResBtnW, _VbtnW, _ColNo, _FrId, _Xpos, _Ypos, HAcc, RAcc) ->
- {lists:reverse(HAcc), lists:reverse(RAcc)};
-
-update_hbtns(N, [], [HInfo | HT], [RInfo | RT],
- HbtnH, ResBtnW, VbtnW, ColNo, FrId, Xpos, Ypos, HAcc, RAcc) ->
- % If too many buttons, i.e., if the ColsShown list
- % has become empty.
- gs:destroy(HInfo#hbtn.id),
- gs:destroy(RInfo#resbtn.id),
- update_hbtns(N, [], HT, RT, HbtnH, ResBtnW, VbtnW, ColNo, FrId,
- Xpos, Ypos, HAcc, RAcc);
-
-update_hbtns(1, [ColW | T], [], [],
- HbtnH, ResBtnW, VbtnW, ColNo, FrId, _Xpos, Ypos, HAcc, RAcc) ->
- % The first button has to be bigger than the others.
- {HInfo, RInfo} = create_one_hbtn_and_resbtn(FrId, ColW - 2,
- HbtnH, VbtnW - 1,
- Ypos, ResBtnW, 1, ColNo),
- update_hbtns(2, T, [], [], HbtnH, ResBtnW, VbtnW, ColNo + 1,
- FrId, VbtnW - 1 + ColW - 2 + ResBtnW, Ypos, [HInfo | HAcc],
- [RInfo | RAcc]);
-
-update_hbtns(N, [ColW | T], [], [],
- HbtnH, ResBtnW, VbtnW, ColNo, FrId, Xpos, Ypos, HAcc, RAcc) ->
- {HInfo, RInfo} = create_one_hbtn_and_resbtn(FrId, ColW - 4,
- HbtnH, Xpos,
- Ypos, ResBtnW, N, ColNo),
- update_hbtns(N + 1, T, [], [], HbtnH, ResBtnW, VbtnW, ColNo + 1,
- FrId, Xpos + ColW - 4 + ResBtnW, Ypos, [HInfo | HAcc],
- [RInfo | RAcc]);
-
-update_hbtns(1, [ColW | T], [HInfo | HT], [RInfo | RT],
- HbtnH, ResBtnW, VbtnW, ColNo, FrId, _Xpos, Ypos, HAcc, RAcc) ->
- {NewHInfo, NewRInfo} = config_one_hbtn_and_resbtn(HInfo, RInfo,
- ColW - 2,
- VbtnW - 1,
- 1, ColNo),
- update_hbtns(2, T, HT, RT, HbtnH, ResBtnW, VbtnW, ColNo + 1,
- FrId, VbtnW - 1 + ColW - 2 + ResBtnW, Ypos,
- [NewHInfo | HAcc], [NewRInfo | RAcc]);
-
-update_hbtns(N, [ColW | T], [HInfo | HT], [RInfo | RT],
- HbtnH, ResBtnW, VbtnW, ColNo, FrId, Xpos, Ypos, HAcc, RAcc) ->
- {NewHInfo, NewRInfo} = config_one_hbtn_and_resbtn(HInfo, RInfo,
- ColW - 4,
- Xpos, N,
- ColNo),
- update_hbtns(N + 1, T, HT, RT, HbtnH, ResBtnW, VbtnW, ColNo + 1,
- FrId, Xpos + ColW - 4 + ResBtnW, Ypos, [NewHInfo | HAcc],
- [NewRInfo | RAcc]).
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_one_hbtn_and_resbtn(ParId, HWidth, HHeight, HXpos, Ypos, RWidth, N, ColNo) ->
- HId = gs:button(ParId, [{width, HWidth},
- {height, HHeight},
- {x, HXpos},
- {y, Ypos},
- {font, ?BTN_FONT},
- {bg, ?DEFAULT_BG_COLOR},
- {data, {hbtn, N, ColNo}},
- {label, {text, integer_to_list(ColNo)}}
- ]),
- RId = gs:button(ParId, [{width, RWidth},
- {height, HHeight},
- {x, HXpos + HWidth},
- {y, Ypos},
- {cursor, resize},
- {buttonpress, true},
- {buttonrelease, true},
- {data, {resbtn, N, ColNo, (HXpos + HWidth + RWidth div 2)}},
- {bg, ?BLACK}
- ]),
- HInfo = #hbtn{virtual_col = ColNo,
- real_col = N,
- id = HId,
- width = HWidth,
- xpos = HXpos},
- RInfo = #resbtn{virtual_col = ColNo,
- real_col = N,
- id = RId,
- width = RWidth,
- xpos = HXpos + HWidth},
- {HInfo, RInfo}.
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-config_one_hbtn_and_resbtn(HInfo, RInfo, HWidth, HXpos, N, ColNo) ->
- gs:config(HInfo#hbtn.id, [{width, HWidth},
- {x, HXpos},
- {data, {hbtn, N, ColNo}},
- {label, {text, integer_to_list(ColNo)}}
- ]),
- gs:config(RInfo#resbtn.id, [{x, HXpos + HWidth},
- {data, {resbtn, N, ColNo,
- (HXpos + HWidth + RInfo#resbtn.width div 2)}}
- ]),
- NewHInfo = HInfo#hbtn{virtual_col = ColNo,
- width = HWidth,
- xpos = HXpos},
- NewRInfo = RInfo#resbtn{virtual_col = ColNo,
- xpos = HXpos + HWidth},
- {NewHInfo, NewRInfo}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_keys([], [], _FirstCol, _LastCol, _HBtns, _ParentId, KeyIdsAcc) ->
- lists:reverse(KeyIdsAcc);
-
-update_keys([], [KeyId | IdT], FirstCol, LastCol, HBtns, ParentId, KeyIdsAcc) ->
- gs:config(KeyId, [{x, 1200}]),
- update_keys([], IdT, FirstCol, LastCol, HBtns, ParentId,
- [KeyId | KeyIdsAcc]);
-
-update_keys([KeyNo | KT], [], FirstCol, LastCol,
- HBtns,ParentId, KeyIdsAcc) when KeyNo >= FirstCol, KeyNo =< LastCol ->
- {_Width, Xpos} = get_keywidth_and_pos(KeyNo, FirstCol, HBtns),
- NewKeyId = create_key(ParentId, Xpos, 1),
- update_keys(KT, [], FirstCol, LastCol, HBtns, ParentId,
- [NewKeyId | KeyIdsAcc]);
-
-update_keys([_KeyNo | KT], [], FirstCol, LastCol, HBtns, ParentId, KeyIdsAcc) ->
- update_keys(KT, [], FirstCol, LastCol, HBtns, ParentId,
- KeyIdsAcc);
-
-update_keys([KeyNo | KT], [KeyId | IdT], FirstCol, LastCol,
- HBtns, ParentId, KeyIdsAcc) when KeyNo >= FirstCol, KeyNo =< LastCol ->
- {Width, Xpos} = get_keywidth_and_pos(KeyNo, FirstCol, HBtns),
- gs:config(KeyId, [{width, Width},
- {x, Xpos}
- ]),
- update_keys(KT, IdT, FirstCol, LastCol, HBtns, ParentId,
- [KeyId | KeyIdsAcc]);
-
-update_keys([_KeyNo | KT],
- [KeyId | IdT], FirstCol, LastCol, HBtns, ParentId, KeyIdsAcc) ->
- update_keys(KT, [KeyId | IdT], FirstCol, LastCol, HBtns, ParentId,
- KeyIdsAcc).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_keywidth_and_pos(VirtualCol, FirstCol, HBtns) ->
- RealColNo = VirtualCol - FirstCol + 1,
- HBtnR = lists:nth(RealColNo, HBtns),
- #hbtn{width = Width,
- xpos = Xpos} = HBtnR,
- KeyWidth = 10,
- % Compute the x position for the key!
- KeyXpos = (Xpos + (Width div 2) - (KeyWidth div 2)),
- {KeyWidth, KeyXpos}.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_key(ParentId, Xpos, Ypos) ->
- PicDir = code:priv_dir(tv),
- C = gs:canvas(ParentId, [{width, 10},
- {height, 18},
- {x, Xpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR}
- ]),
- gs:create(image, C, [{bitmap, PicDir ++ "/key.xbm"}]),
- C.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_pb_int_def.hrl b/lib/tv/src/tv_pb_int_def.hrl
deleted file mode 100644
index 0fe9df193a..0000000000
--- a/lib/tv/src/tv_pb_int_def.hrl
+++ /dev/null
@@ -1,99 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-
--define(WHITE, {255,255,255}).
-
--define(DEFAULT_BG_COLOR, {217,217,217}).
-
--define(COL_MARK_COLOR, {0, 0, 0}).
--define(SORT_MARK_COLOR, {255,215,0}).
-
--define(BLINK_COLOR1, {255,0,0}).
--define(BLINK_COLOR2, {0,255,0}).
--define(BLINK_COLOR3, {0,0,0}).
--define(BTN_FONT, {courier,12}).
-
-
-
-
--record(col_mark_params, {col_btn_id,
- virtual_col_marked,
- sort_btn_id,
- virtual_sort_col
- }).
-
-
-
--record(row_mark_params, {virtual_row_marked,
- real_row_marked
- }).
-
-
-
-
--record(process_variables, {parent_pid,
- grid_frame_id,
- grid_frame_width,
- grid_frame_height,
- ypos,
- hbtn_height,
- vbtn_width,
- resbtn_width,
- first_col_shown,
- hbtns_shown = [],
- vbtns_shown = [],
- resbtns_shown = [],
- cols_shown = [],
- key_numbers = [],
- key_ids = [],
- blink_color_list = [?BLINK_COLOR1,
- ?BLINK_COLOR2,
- ?BLINK_COLOR3],
- col_mark_params = #col_mark_params{},
- row_mark_params = #row_mark_params{}
- }).
-
-
-
--record(hbtn, {virtual_col,
- real_col,
- id,
- width,
- xpos
- }).
-
-
-
--record(resbtn, {virtual_col,
- real_col,
- id,
- width,
- xpos
- }).
-
-
-
--record(vbtn, {virtual_row,
- real_row,
- id,
- height,
- ypos
- }).
-
-
-
diff --git a/lib/tv/src/tv_pc.erl b/lib/tv/src/tv_pc.erl
deleted file mode 100644
index e0612e13eb..0000000000
--- a/lib/tv/src/tv_pc.erl
+++ /dev/null
@@ -1,795 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: pc part of the table tool, i.e., the process
-%%% controlling all other processes, and managing
-%%% the actions to take.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pc).
--compile([{nowarn_deprecated_function,{gs,config,2}}]).
-
-
-
--export([pc/7,
- send_data/2
- ]).
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pc_int_def.hrl").
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Function: pc.
-%%
-%% Return Value: None.
-%%
-%% Description: Process controlling the processes 'pd', 'pw', 'dbs' and 'etsread'.
-%% After necessary initialisations, an eternal loop is
-%% entered, where window created messages are received and
-%% handled, as well as user input.
-%%
-%% Parameters:
-%%======================================================================
-
-
-pc(Master, Node, LocalNode, TableId, KindOfTable, TableName, ErrMsgMode) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrMsgMode),
- ProcVars = prepare_and_open_table(Node, LocalNode, TableId, KindOfTable, TableName,
- false, #process_variables{parent_pid=Master}),
- loop(ProcVars).
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-prepare_and_open_table(Node, LocalNode, TabId, TabType, TabName, Raise, ProcVars) ->
- IpPid = spawn(tv_ip, ip, [self()]),
- show_progress(IpPid, 5, "Initializing graphics..."),
-
- TmpProcVars = start_procs(IpPid, ProcVars),
-
- show_progress(IpPid, 5, "Loading table..."),
- NewProcVars = ?MENU_FUNC_FILE:open_table(Node, LocalNode, TabId, TabType, TabName,
- Raise, TmpProcVars),
-
- IpPid ! #ip_quit{sender = self()},
- % Now make window visible!
- WinP = NewProcVars#process_variables.window_params,
- gs:config(WinP#window_params.window_id, [{map, true}]),
- NewProcVars.
-
-
-
-
-
-start_procs(IpPid, ProcVars) ->
- ErrorMsgMode = get(error_msg_mode),
- PwPid = spawn_link(tv_pw, pw, [self()]),
- PdPid = spawn_link(tv_pd, pd, [self(), ErrorMsgMode]),
- DbsPid = spawn_link(tv_db, dbs, [self(), ErrorMsgMode]),
- EtsreadPid = spawn_link(tv_etsread, etsread, [self(), ErrorMsgMode]),
-
- show_progress(IpPid, 5, "Initializing graphics..."),
- NewWinP = init_pw(PwPid, ProcVars),
-
- show_progress(IpPid, 5, "Initializing graphics..."),
- init_pd(PdPid, NewWinP),
- ProcVars#process_variables{pw_pid = PwPid,
- pd_pid = PdPid,
- dbs_pid = DbsPid,
- etsread_pid = EtsreadPid,
- current_node = node(), %% Will be replaced, when table opened.
- local_node = true,
- window_params = NewWinP
- }.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-show_progress(IpPid, NofElements, Text) ->
- IpPid ! #ip_update{sender = self(),
- nof_elements_to_mark = NofElements,
- text = Text
- }.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: loop.
-%%
-%% Return Value: None.
-%%
-%% Description: Eternal (well, almost) loop, receiving messages and
-%% handling them.
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-loop(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- % Normal messages!
- #dbs_subset{} ->
- NewProcVars1 = send_data(Msg, ProcVars),
- NewProcVars2 = check_time_to_poll_table(Msg, NewProcVars1),
- loop(NewProcVars2);
-
- #pc_poll_table{} ->
- TmpProcVars = check_node(ProcVars),
- NewProcVars = ?MENU_FUNC_FILE:poll_table(TmpProcVars),
- loop(NewProcVars);
-
- #pc_search_req{} ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_search_req{sender=self()},
- loop(ProcVars);
-
- #pc_set_sorting_mode{} ->
- set_sorting_mode(Msg, ProcVars),
- loop(ProcVars);
-
-
- #pc_data_req{element = Pos, nof_elements = Length} ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_subset_req{sender = self(),
- subset_pos = Pos,
- subset_length = Length
- },
- loop(ProcVars);
-
-
- #pc_marked_row{row_no=RowNo, object=Obj, color=Color} ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_marked_row{sender = self(),
- row_no = RowNo
- },
- NewProcVars = ProcVars#process_variables{marked_row = RowNo,
- marked_object = Obj,
- marked_color = Color},
- loop(NewProcVars);
-
-
- #pc_menu_msg{} ->
- Fcn = Msg#pc_menu_msg.data,
- NewProcVars = ?MENU_FUNC_FILE:Fcn(ProcVars),
- loop(NewProcVars);
-
-
- #pd_updated_object{object=Obj,old_object=OldObj,old_color=Color,obj_no=ObjNo} ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_updated_object{sender = self(),
- object = Obj,
- old_object = OldObj,
- old_color = Color,
- obj_no = ObjNo},
- loop(ProcVars);
-
-
- #pd_new_object{object=Obj} ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_new_object{sender = self(),
- object = Obj},
- loop(ProcVars);
-
-
- #pc_show_table_info{} ->
- NewProcVars = ?MENU_FUNC_FILE:table_info(ProcVars),
- loop(NewProcVars);
-
- #pc_win_conf{} ->
- NewProcVars = ?GRAPH_FUNC_FILE:win_conf(Msg, ProcVars),
- loop(NewProcVars);
-
- #pc_help{} ->
- NewProcVars = ?MENU_FUNC_FILE:help_button(ProcVars),
- loop(NewProcVars);
-
- #pc_dead_table{automatic_polling = AutoPoll} ->
- WinP = ProcVars#process_variables.window_params,
- WinId = WinP#window_params.window_id,
- gs:config(WinId, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(WinId, "TV Notification",
- ["The table no longer exists!"]);
- haiku ->
- ErrMsg1 = ["A table that big?",
- "It might be very useful.",
- "But now it is gone."],
- tv_utils:notify(WinId, "TV Notification", ErrMsg1)
- end,
- NewProcVars =
- case AutoPoll of
- true ->
- gs:config(WinId, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(WinId, "TV Notification",
- ["The automatic polling is turned off!"]);
- haiku ->
- ErrMsg2 = ["Previously on",
- "The polling is now idled.",
- "That's the way it is."],
- tv_utils:notify(WinId, "TV Notification", ErrMsg2)
- end,
- ProcVars#process_variables{poll_interval = infinity};
- false ->
- ProcVars
- end,
- loop(NewProcVars);
-
- #pc_nodedown{automatic_polling = AutoPoll} ->
- WinP = ProcVars#process_variables.window_params,
- WinId = WinP#window_params.window_id,
- gs:config(WinId, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(WinId, "TV Notification",
- ["The node is down, and the",
- "table cannot be reached."]);
- haiku ->
- ErrMsg1 = ["With searching comes loss",
- "And the presence of absence:",
- "Node is down."],
- tv_utils:notify(WinId, "TV Notification", ErrMsg1)
- end,
- NewProcVars =
- case AutoPoll of
- true ->
- gs:config(WinId, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(WinId, "TV Notification",
- ["The automatic polling is turned off!"]);
- haiku ->
- ErrMsg = ["Previously on,",
- "The polling is now idled.",
- "That's the way it is."],
- tv_utils:notify(WinId, "TV Notification", ErrMsg)
- end,
- ProcVars#process_variables{poll_interval = infinity};
- false ->
- ProcVars
- end,
- loop(NewProcVars);
-
-
- {pc_edit_object, _Sender} ->
- NewProcVars = ?MENU_FUNC_FILE:insert_object(ProcVars),
- loop(NewProcVars);
-
-
- check_node ->
- NewProcVars = check_node(ProcVars),
- loop(NewProcVars);
-
-
- raise ->
- WinP = ProcVars#process_variables.window_params,
- gs:config(WinP#window_params.window_id, [raise]),
- loop(ProcVars);
-
-
- {error_msg_mode, Mode} ->
- ProcVars#process_variables.dbs_pid ! {error_msg_mode, Mode},
- ProcVars#process_variables.etsread_pid ! {error_msg_mode, Mode},
- ProcVars#process_variables.pd_pid ! {error_msg_mode, Mode},
- put(error_msg_mode, Mode),
- loop(ProcVars);
-
- % Exit messages!
- {'EXIT', Sender, Reason} ->
- exit_signals({Sender, Reason}, ProcVars);
-
-
- _Other ->
- loop(ProcVars)
-
- end
- end.
-
-
-
-
-
-
-check_node(ProcVars) ->
- #process_variables{pw_pid = PwPid,
- current_node = OldCurrNode,
- local_node = LocalNode,
- table_id = TableId,
- table_type = TableType,
- table_name = TableName} = ProcVars,
-
- HomeNode = node(),
- case net_adm:ping(OldCurrNode) of
- pong ->
- ProcVars;
- pang when not LocalNode ->
- ProcVars;
- pang when LocalNode ->
- %% XXX [siri] Will this ever happen? I thought local_node
- %% indicated if current_node was the node where tv was
- %% started. If so, we are pinging ourselves here, and
- %% a pang can never happen??
- WinTitle = ?MENU_FUNC_FILE:get_window_title(TableType,HomeNode,TableId,TableName),
- PwPid ! #pw_set_window_title{sender = self(),
- win_title = WinTitle},
- ProcVars#process_variables{current_node = HomeNode}
- end.
-
-
-
-
-
-
-
-send_data(Msg, ProcVars) ->
- #process_variables{pd_pid = PdPid,
- parent_pid = ParentPid,
- table_id = Table,
- table_type = Type,
- current_node = Node} = ProcVars,
-
- ParentPid ! {tv_update_infowin, Table, Node, Type},
-
- #dbs_subset{data = DbData,
- subset_pos = ScalePos,
- db_length = DbLength,
- list_of_keys = ListOfKeys,
- max_elem_size = MaxElemSize,
- requested_row = ReqRowData} = Msg,
-
- Range = case ScalePos of
- 0 ->
- {0, 0};
- _Other ->
- {1, DbLength}
- end,
-
- PdPid ! #pc_data{sender = self(),
- scale_pos = ScalePos,
- scale_range = Range,
- elementlist = DbData,
- list_of_keys = ListOfKeys,
- max_elem_size = MaxElemSize,
- marked_row = ReqRowData
- },
-
- {MarkedObject, MarkedColor} =
- case ReqRowData of
- [] ->
- {undefined, undefined};
- [Data] ->
- Data
- end,
- ProcVars#process_variables{marked_object = MarkedObject,
- marked_color = MarkedColor}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_sorting_mode(Msg, ProcVars) ->
- #pc_set_sorting_mode{sorting = Sorting,
- reverse = Reverse,
- sort_key_no = SortKeyNo} = Msg,
-
- DbsPid = ProcVars#process_variables.dbs_pid,
- PdPid = ProcVars#process_variables.pd_pid,
- PwPid = ProcVars#process_variables.pw_pid,
- TableType = ProcVars#process_variables.table_type,
-
- NewSortKeyNo =
- case SortKeyNo of
- undefined ->
- if
- TableType =:= mnesia ->
- 2;
- true ->
- 1
- end;
- _Other ->
- SortKeyNo
- end,
-
- Menu =
- case Sorting of
- true ->
- case Reverse of
- true ->
- sort_falling_order;
- false ->
- sort_rising_order
- end;
- false ->
- no_sorting
- end,
-
- PwPid ! #pw_select_menu{sender = self(),
- menu = Menu},
-
- DbsPid ! #dbs_sorting_mode{sender = self(),
- sorting = Sorting,
- reverse = Reverse,
- sort_key_no = NewSortKeyNo
- },
-
- PdPid ! #pc_set_sorting_mode_cfm{sender = self(),
- sort_key_no = NewSortKeyNo
- }.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: init_pw.
-%%
-%% Return Value: Tuple containing the Pid of the pw process, and the id of
-%% the window created by the pw process.
-%%
-%% Description: Starts the pw process, and orders it to create a window.
-%% (The size of the window may be given as option.)
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-
-init_pw(PwPid, ProcVars) ->
- #process_variables{window_params = WinP} = ProcVars,
-
- % Now deblock pw, and order it to create a window!
- PwPid ! #pw_deblock{sender = self(),
- win_title = ?APPLICATION_NAME,
- win_width = ?DEFAULT_WINDOW_WIDTH,
- win_height = ?DEFAULT_WINDOW_HEIGHT,
- min_win_width = ?DEFAULT_MIN_WINDOW_WIDTH,
- min_win_height = ?DEFAULT_MIN_WINDOW_HEIGHT
- },
-
-
- receive
- #pw_deblock_cfm{win_id = WindowId} ->
- ?MENU_FUNC_FILE:create_menus(PwPid),
-
- % Store the window id as well as the size of it.
- WinP#window_params{window_id = WindowId,
- window_width = ?DEFAULT_WINDOW_WIDTH,
- window_height = ?DEFAULT_WINDOW_HEIGHT
- }
-
-
- after 180000 -> % A timeout of 1000 ms is too short, at least the first
- % time the system is started!
- exit(error)
- end.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init_pd(PdPid, WinP) ->
- #window_params{window_id = WindowId,
- window_width = WindowWidth,
- window_height = WindowHeight} = WinP,
-
- % Now deblock pd, and order it to create a canvas and a scale!
- PdPid ! #pd_deblock{sender = self(),
- win = WindowId,
- win_width = WindowWidth,
- win_height = WindowHeight,
- scale = true
- },
-
- receive
- #pd_deblock_cfm{} ->
- done
- after 180000 ->
- exit(error)
- end.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: exit_signals.
-%%
-%% Return Value: None.
-%%
-%% Description: Decides, given an error message, action to take, i.e., whether
-%% operation shall procede, any process shall be restarted, or
-%% the table tool terminated.
-%%
-%% Parameters: Exit_info: tuple containing sender of the error message, and the
-%% reason.
-%%======================================================================
-
-
-exit_signals(ExitInfo, ProcVars) ->
- #process_variables{parent_pid = ParentPid,
- pd_pid = PdPid,
- pw_pid = PwPid,
- dbs_pid = DbsPid,
- etsread_pid = EtsreadPid,
- table_id = TabId,
- table_type = TabType,
- table_name = TabName,
- current_node = Node,
- local_node = LocalNode
- } = ProcVars,
-
- case ExitInfo of
- {ParentPid, Reason} ->
- exit(Reason);
-
- {PwPid, normal} ->
- exit(normal);
-
- {PwPid, error} ->
- io:format("Internal error... restarting. ~n"),
- kill_procs(normal, [PdPid, EtsreadPid, DbsPid]),
- NewProcVars = pc(ParentPid, Node, LocalNode, TabId, TabType, TabName,
- get(error_msg_mode)),
- loop(NewProcVars);
-
- {PdPid, _Reason} ->
- io:format("Internal error... restarting. ~n"),
- kill_procs(normal, [PwPid, EtsreadPid, DbsPid]),
- NewProcVars = pc(ParentPid, Node, LocalNode, TabId, TabType, TabName,
- get(error_msg_mode)),
- loop(NewProcVars);
-
- {DbsPid, _Reason} ->
- io:format("Internal error... restarting. ~n"),
- kill_procs(normal, [PdPid, PwPid, EtsreadPid]),
- NewProcVars = pc(ParentPid, Node, LocalNode, TabId, TabType, TabName,
- get(error_msg_mode)),
- loop(NewProcVars);
-
- {EtsreadPid, _Reason} ->
- io:format("Internal error... restarting. ~n"),
- kill_procs(normal, [PdPid, PwPid, DbsPid]),
- NewProcVars = pc(ParentPid, Node, LocalNode, TabId, TabType, TabName,
- get(error_msg_mode)),
- loop(NewProcVars);
-
- {_Sender, _OtherReason} ->
- loop(ProcVars)
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-kill_procs(_Status, []) ->
- done;
-kill_procs(Status, [Pid | Tail]) ->
- exit(Pid, Status),
- kill_procs(Status, Tail).
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-check_time_to_poll_table(Msg, ProcVars) ->
- #dbs_subset{required_time_etsread = EtsreadTime,
- required_time_dbs = DbsTime} = Msg,
-
- UserSetPollInterval = ProcVars#process_variables.poll_interval,
- WinP = ProcVars#process_variables.window_params,
- WinId = WinP#window_params.window_id,
-
- case too_short_pollinterval_chosen(UserSetPollInterval, EtsreadTime, DbsTime) of
- true ->
- EtsreadPid = ProcVars#process_variables.etsread_pid,
- EtsreadPid ! #etsread_set_poll_interval{sender = self(),
- interval = infinity},
-
- TimeRequired = trunc(max_time_required(EtsreadTime, DbsTime) / 10 + 0.5) * 10 + 20,
-
- gs:config(WinId, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(WinId, "TV Notification",
- ["The current poll interval is too short!"]),
- Str = "to " ++ lists:flatten(io_lib:write(TimeRequired)) ++ " seconds!",
- tv_utils:notify(WinId, "TV Notification", ["Setting the poll interval", Str]);
- haiku ->
- ErrMsg = ["Being way too short",
- "The interval of polling",
- "Is simply increased."],
- tv_utils:notify(WinId, "TV Notification", ErrMsg)
- end,
- clear_message_buffer(),
- EtsreadPid ! #etsread_set_poll_interval{sender = self(),
- interval = TimeRequired},
-
- ProcVars#process_variables{poll_interval = TimeRequired};
- false ->
- ProcVars
- end.
-
-
-
-
-
-
-clear_message_buffer() ->
- receive
- #dbs_subset{} ->
- clear_message_buffer()
- after 100 ->
- done
- end.
-
-
-
-
-
-max_time_required(T1, T2) when is_number(T1), is_number(T2) ->
- if
- T1 > T2 ->
- T1;
- true ->
- T2
- end;
-max_time_required(T1, _T2) when is_number(T1) ->
- T1;
-max_time_required(_T1, T2) ->
- T2.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-too_short_pollinterval_chosen(infinity, _EtsreadTime, _DbsTime) ->
- false;
-too_short_pollinterval_chosen(undefined, _EtsreadTime, _DbsTime) ->
- false;
-too_short_pollinterval_chosen(PollInt, EtsreadTime, _DbsTime) when EtsreadTime >= PollInt, is_number(EtsreadTime) ->
- true;
-too_short_pollinterval_chosen(PollInt, _EtsreadTime, DbsTime) when DbsTime >= PollInt, is_number(DbsTime) ->
- true;
-too_short_pollinterval_chosen(_PollInt, _EtsreadTime, _DbsTime) ->
- false.
diff --git a/lib/tv/src/tv_pc_graph_ctrl.erl b/lib/tv/src/tv_pc_graph_ctrl.erl
deleted file mode 100644
index 3fc3ded565..0000000000
--- a/lib/tv/src/tv_pc_graph_ctrl.erl
+++ /dev/null
@@ -1,120 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pc_graph_ctrl).
-
-
-
--export([create_menu/4, win_conf/2]).
-
-
--include("tv_int_msg.hrl").
--include("tv_pc_int_def.hrl").
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_menu(PwPid, MenuTitle, TitleAccPos, MenuList) ->
- PwPid ! #pw_create_menu{sender = self(),
- menutitle = MenuTitle,
- title_acc_pos = TitleAccPos,
- menulist = MenuList
- },
- receive
- #pw_create_menu_cfm{} ->
- done
- after 10000 ->
- exit(error)
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: win_conf.
-%%
-%% Return Value: None.
-%%
-%% Description: Configures all objects in the window according to new coordinates.
-%%
-%% Parameters:
-%%======================================================================
-
-
-win_conf(Msg, ProcVars) ->
- #pc_win_conf{width = NewWidth,
- height = NewHeight} = Msg,
-
- #process_variables{pd_pid = PdPid,
- window_params = WinP} = ProcVars,
-
- #window_params{window_width = OldWindowWidth,
- window_height = OldWindowHeight} = WinP,
-
-
- case {NewWidth, NewHeight} of
- {OldWindowWidth, OldWindowHeight} ->
- ProcVars;
- _Other ->
- PdPid ! #pd_win_conf{sender = self(),
- width = NewWidth,
- height = NewHeight
- },
- NewWinP = WinP#window_params{window_width = NewWidth,
- window_height = NewHeight},
-
- ProcVars#process_variables{window_params = NewWinP}
- end.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_pc_int_def.hrl b/lib/tv/src/tv_pc_int_def.hrl
deleted file mode 100644
index 22f8dcd5d8..0000000000
--- a/lib/tv/src/tv_pc_int_def.hrl
+++ /dev/null
@@ -1,62 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Include file for the pc parts of the table tool.
-%%%
-%%%*********************************************************************
-
-
--define(HEAD_FILE, pc).
--define(GRAPH_FUNC_FILE, tv_pc_graph_ctrl).
--define(MENU_FUNC_FILE, tv_pc_menu_handling).
-
-
-
--define(APPLICATION_NAME, "Table Visualizer").
--define(DEFAULT_WINDOW_WIDTH, 750).
--define(DEFAULT_WINDOW_HEIGHT, 600).
--define(DEFAULT_MIN_WINDOW_WIDTH, 300).
--define(DEFAULT_MIN_WINDOW_HEIGHT, 250).
-
-
--record(window_params, {window_id,
- window_width,
- window_height
- }).
-
-
-
--record(process_variables, {parent_pid,
- pw_pid,
- pd_pid,
- dbs_pid,
- etsread_pid,
- current_node,
- local_node,
- table_id = undefined,
- table_type = ets,
- table_name,
- table_protection,
- marked_row,
- marked_object,
- marked_color,
- lists_as_strings = true,
- poll_interval = infinity, % seconds or 'infinity'
- window_params = #window_params{}
- }).
diff --git a/lib/tv/src/tv_pc_menu_handling.erl b/lib/tv/src/tv_pc_menu_handling.erl
deleted file mode 100644
index 64a06743b7..0000000000
--- a/lib/tv/src/tv_pc_menu_handling.erl
+++ /dev/null
@@ -1,489 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Part of pc handling the creation of menus, as well as
-%%% treating the signals these menus results in,
-%%% when chosen.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pc_menu_handling).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([create_menus/1,
- exit_button/1,
- insert_object/1,
- delete_object/1,
- search_object/1,
- open_table/7,
- set_poll_interval/1,
- poll_table/1,
- sort_rising_order/1,
- sort_falling_order/1,
- no_sorting/1,
- lists_as_strings/1,
- lists_as_lists/1,
- table_info/1,
- help_button/1,
- otp_help_button/1,
- get_window_title/4]).
-
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pc_int_def.hrl").
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-%% Shortcuts currently used, in alphabetical order:
-%%
-%% c -> "Exit"
-%% d -> "Delete Object"
-%% f -> "Sort Falling Order"
-%% h -> "Help"
-%% i -> "Table Info"
-%% n -> "No Sorting"
-%% o -> "Edit Object"
-%% p -> "Poll Table"
-%% r -> "Sort Rising Order"
-%% s -> "Search Object"
-%% v -> "Set Poll Interval"
-%% x -> "Exit"
-
-
-create_menus(PwPid) ->
- %% Due to a bug (or some other reason), only one of the radiobuttons belonging
- %% to a specified group can be selected, even if different processes have created
- %% the radiobuttons! This means that, if we have started more than one tv_main
- %% process, selecting one radiobutton will affect the radiobuttons in the other
- %% tv_main process(es)!!! Since this is a highly undesirable bahaviour, we have to
- %% create unique group names (i.e., atoms).
- %% (We need to group the radiobuttons, since otherwise all created by one process
- %% belongs to the same group, which also is undesirable...)
- SelfStr = pid_to_list(self()),
- SortGroup = list_to_atom("sorting" ++ SelfStr),
- ListGroup = list_to_atom("lists" ++ SelfStr),
-
- % Order pw to create the 'File' menu.
- ?GRAPH_FUNC_FILE:create_menu(PwPid,
- " File ",
- 1,
- [{" Table Info ", normal, table_info, 7, i},
- separator,
- {" Close ", normal, exit_button, 1, c}
- ]),
- ?GRAPH_FUNC_FILE:create_menu(PwPid,
- " Edit ",
- 1,
- [{" Edit Object... ", normal, insert_object, 1, o},
- {" Delete Object ", normal, delete_object, 1, d}
- ]),
- ?GRAPH_FUNC_FILE:create_menu(PwPid,
- " View ",
- 1,
- [{" Lists as Lists ",{radio,false,ListGroup},lists_as_lists,10,no_char},
- {" Lists as Strings ",{radio,true,ListGroup},lists_as_strings,10,no_char}
- ]),
- % Order pw to create the 'Options' menu.
- ?GRAPH_FUNC_FILE:create_menu(PwPid,
- " Options ",
- 1,
- [{" Poll Table ", normal, poll_table, 1, p},
- {" Poll Interval... ",normal,set_poll_interval,6,no_char},
- separator,
- {" Search Object ", normal, search_object, 1, s},
- separator,
- {" Sort Ascending Order ",{radio,false,SortGroup},sort_rising_order,6,no_char},
- {" Sort Descending Order ",{radio,false,SortGroup},sort_falling_order,6,no_char},
- {" No Sorting ",{radio,true,SortGroup},no_sorting,1,no_char}
- ]).
-
-
-
-
-
-exit_button(_ProcVars) ->
- exit(normal).
-
-
-
-help_button(ProcVars) ->
- WinP = ProcVars#process_variables.window_params,
- HelpFile = filename:join([code:lib_dir(tv), "doc", "html", "index.html"]),
- tool_utils:open_help(WinP#window_params.window_id, HelpFile),
- ProcVars.
-
-
-
-
-otp_help_button(ProcVars) ->
- WinP = ProcVars#process_variables.window_params,
- IndexFile = filename:join([code:root_dir(), "doc", "index.html"]),
-
- tool_utils:open_help(WinP#window_params.window_id, IndexFile),
- ProcVars.
-
-
-
-
-table_info(ProcVars) ->
- #process_variables{table_id = TableId,
- current_node = Node,
- local_node = LocalNode,
- table_type = Type,
- parent_pid = ParentPid} = ProcVars,
-
- case TableId of
- undefined ->
- done;
- _OtherValue ->
- ParentPid ! {tv_start_infowin, TableId, Node, LocalNode, Type}
- end,
- ProcVars.
-
-
-
-sort_rising_order(ProcVars) ->
- request_sort_settings(ProcVars#process_variables.pd_pid, true, false),
- ProcVars.
-
-
-sort_falling_order(ProcVars) ->
- request_sort_settings(ProcVars#process_variables.pd_pid, true, true),
- ProcVars.
-
-
-no_sorting(ProcVars) ->
- request_sort_settings(ProcVars#process_variables.pd_pid, false, false),
- ProcVars.
-
-
-set_poll_interval(ProcVars) ->
- #process_variables{etsread_pid = EtsreadPid,
- poll_interval = PollInterval} = ProcVars,
-
- case tv_poll_dialog:start(PollInterval) of
- cancel ->
- ProcVars;
- NewPollInterval ->
- EtsreadPid ! #etsread_set_poll_interval{sender = self(),
- interval = NewPollInterval},
- ProcVars#process_variables{poll_interval = NewPollInterval}
- end.
-
-
-
-poll_table(ProcVars) ->
- EtsreadPid = ProcVars#process_variables.etsread_pid,
- EtsreadPid ! #etsread_poll_table{sender = self()},
- ProcVars.
-
-
-search_object(ProcVars) ->
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #dbs_search_req{sender=self()},
- ProcVars.
-
-
-
-lists_as_strings(ProcVars) ->
- PdPid = ProcVars#process_variables.pd_pid,
- PdPid ! #pc_list_info{sender=self(), lists_as_strings=true},
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #pc_list_info{sender=self(), lists_as_strings=true},
- ProcVars#process_variables{lists_as_strings=true}.
-
-
-
-
-lists_as_lists(ProcVars) ->
- PdPid = ProcVars#process_variables.pd_pid,
- PdPid ! #pc_list_info{sender=self(), lists_as_strings=false},
- DbsPid = ProcVars#process_variables.dbs_pid,
- DbsPid ! #pc_list_info{sender=self(), lists_as_strings=false},
- ProcVars#process_variables{lists_as_strings=false}.
-
-
-
-
-
-
-insert_object(ProcVars) ->
- #process_variables{pd_pid = PdPid,
- current_node = Node,
- local_node = LocalNode,
- table_type = TabType,
- table_name = TabName,
- table_protection = Protection,
- window_params = WinP} = ProcVars,
-
- case Protection of
- public ->
- case TabType of
- mnesia ->
- case catch tv_mnesia_rpc:table_info(Node, LocalNode, TabName, attributes) of
- nodedown ->
- handle_error(nodedown);
- no_table ->
- handle_error(nodedown);
- mnesia_not_started ->
- handle_error(mnesia_not_started);
- {unexpected_error,Reason} ->
- handle_error({unexpected_error,Reason});
- AttrList ->
- PdPid ! #pd_rec_edit{sender = self(),
- attributes = AttrList
- }
- end;
- ets ->
- PdPid ! #pd_rec_edit{sender = self(),
- attributes = [tuple]
- }
- end;
- _OtherProtection ->
- WinId = WinP#window_params.window_id,
- gs:config(WinId, [beep]),
- ErrMsg =
- case get(error_msg_mode) of
- normal ->
- ["The table is protected and",
- " cannot be edited."];
- haiku ->
- ["The table you see",
- "Is cunningly protected:",
- "You can only watch."]
- end,
- tv_utils:notify(WinId, "TV Notification", ErrMsg)
- end,
- ProcVars.
-
-
-
-
-
-
-delete_object(ProcVars) ->
- #process_variables{dbs_pid = DbsPid,
- table_protection = Protection,
- marked_row = MarkedRow,
- marked_object = MarkedObject,
- marked_color = MarkedColor,
- window_params = WinP} = ProcVars,
-
- case MarkedRow of
- undefined ->
- done;
- _AnyRow ->
- case Protection of
- public ->
- DbsPid ! #dbs_delete_object{sender = self(),
- object = MarkedObject,
- color = MarkedColor,
- obj_no = MarkedRow};
- _OtherProtection ->
- WinId = WinP#window_params.window_id,
- gs:config(WinId, [beep]),
- ErrMsg =
- case get(error_msg_mode) of
- normal ->
- ["The table is protected and",
- " cannot be edited."];
- haiku ->
- ["The table you see",
- "Is cunningly protected:",
- "You can only watch."]
- end,
- tv_utils:notify(WinId, "TV Notification", ErrMsg)
- end
- end,
- ProcVars.
-
-
-
-
-
-
-open_table(CurrNode, LocalNode, TableId, TableType, TableName, Raise, ProcVars) ->
- #process_variables{dbs_pid = DbsPid,
- etsread_pid = EtsreadPid,
- pw_pid = PwPid,
- pd_pid = PdPid,
- poll_interval = PollInterval,
- window_params = WinP} = ProcVars,
-
- case Raise of
- true ->
- gs:config(WinP#window_params.window_id, [raise]);
- false ->
- done
- end,
-
- {Type, KeyPos, Protection} = init_etsread(EtsreadPid, DbsPid, CurrNode, LocalNode, TableId,
- TableType, PollInterval),
- WinTitle = get_window_title(TableType, CurrNode, TableId, TableName),
- PwPid ! #pw_set_window_title{sender = self(),
- win_title = WinTitle},
- Writable =
- case Protection of
- public ->
- true;
- _Other ->
- false
- end,
- RecordName =
- case TableType of
- mnesia ->
- tv_mnesia_rpc:table_info(CurrNode, LocalNode, TableId, record_name);
- ets ->
- undefined
- end,
- PdPid ! #pd_new_table{sender = self(),
- table_type = TableType,
- table_name = TableName,
- record_name = RecordName,
- writable = Writable},
- init_dbs(DbsPid, Type, KeyPos, EtsreadPid),
- ProcVars#process_variables{current_node = CurrNode,
- local_node = LocalNode,
- table_id = TableId,
- table_type = TableType,
- table_name = TableName,
- table_protection = Protection}.
-
-
-
-
-
-
-get_window_title(ets, Node, TableId, TableName) ->
- NameStr = lists:flatten(io_lib:write(TableName)),
- TableStr = case TableId of
- {TableName, _Pid} ->
- NameStr;
- TableName ->
- NameStr;
- _Other ->
- lists:flatten(io_lib:write(TableId)) ++ " (" ++ NameStr ++ ")"
- end,
-
- WinTitleSuffix = " Node: " ++ atom_to_list(Node),
- "ETS: " ++ TableStr ++ WinTitleSuffix;
-get_window_title(mnesia, Node, _TableId, TableName) ->
- TableNameStr = lists:flatten(io_lib:write(TableName)),
- WinTitleSuffix = " Node: " ++ atom_to_list(Node),
- "Mnesia: " ++ TableNameStr ++ WinTitleSuffix.
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-init_etsread(EtsreadPid, DbsPid, Node, LocalNode, TableId, TableType, PollInterval) ->
- EtsreadPid ! #etsread_deblock{sender = self(),
- dbs_pid = DbsPid,
- node = Node,
- local_node = LocalNode,
- table_id = TableId,
- table_type = TableType,
- poll_interval = PollInterval
- },
- receive
- #etsread_deblock_cfm{type=Type, keypos=KeyPos, protection=Protection} ->
- {Type, KeyPos, Protection}
- after 10000 ->
- exit(error)
- end.
-
-
-
-
-init_dbs(DbsPid, Type, KeyPos, EtsreadPid) ->
- DbsPid ! #dbs_deblock{sender = self(),
- etsread_pid = EtsreadPid,
- type = Type,
- keypos = KeyPos,
- sublist_length = ?ITEMS_TO_DISPLAY
- },
- receive
- #dbs_deblock_cfm{} ->
- done
- after 10000 ->
- exit(error)
- end.
-
-
-
-
-
-
-request_sort_settings(PdPid, Sorting, Reverse) ->
- PdPid ! #pd_get_sort_settings{sender = self(),
- sorting = Sorting,
- reverse = Reverse
- }.
-
-
-
-
-
-
-handle_error(mnesia_not_started) ->
- gs:window(errorwin, gs:start(), []),
- gs:config(errorwin, [beep]),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(errorwin, "TV Notification", ["Mnesia not started!"]);
- haiku ->
- tv_utils:notify(errorwin, "TV Notification", ["Mnesia is stopped.",
- "We wish to reach all data",
- "But we never will."])
- end,
- gs:destroy(errorwin);
-handle_error(nodedown) ->
- done; %% Main process handles this!
-handle_error({unexpected_error,Cause}) ->
- gs:window(errorwin, gs:start(), []),
- io:format("Unexpected error: ~p~n", [Cause]),
- gs:config(errorwin, [beep]),
- gs:destroy(errorwin).
-
-
diff --git a/lib/tv/src/tv_pd.erl b/lib/tv/src/tv_pd.erl
deleted file mode 100644
index 6c38148fdd..0000000000
--- a/lib/tv/src/tv_pd.erl
+++ /dev/null
@@ -1,1127 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Code for pd, i.e., the data displaying part of the table
-%%% tool.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pd).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,destroy,1}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([pd/2]).
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pd_int_def.hrl").
--include("tv_pd_int_msg.hrl").
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function: pd.
-%%
-%% Return Value: None.
-%%
-%% Description: Process controlling the display part of the window,
-%% i.e., showing diagrams and handling the scale used for scrolling.
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-pd(Master, ErrMsgMode) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrMsgMode),
- PgPid = spawn_link(tv_pg, pg, [self()]),
- PbPid = spawn_link(tv_pb, pb, [self()]),
-
- ProcVars = #process_variables{master_pid = Master,
- pg_pid = PgPid,
- pb_pid = PbPid},
- blocked(ProcVars).
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-%%======================================================================
-%% Function: blocked.
-%%
-%% Return Value: None.
-%%
-%% Description: When started or explicitly blocked, pd enters this state,
-%% where nothing is performed until the module explicitly is
-%% deblocked.
-%%
-%% Parameters:
-%%======================================================================
-
-
-blocked(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- #pd_deblock{} ->
- deblock(Msg, ProcVars);
-
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- blocked(ProcVars);
-
-
- _Other ->
- blocked(ProcVars)
- end
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: deblock.
-%%
-%% Return Value: None.
-%%
-%% Description: When deblocked, a canvas and scale shall be created according to
-%% specification received in pd_deblock message.
-%%
-%% Parameters: Rec: received pd_deblock message.
-%%======================================================================
-
-
-
-deblock(Msg, ProcVars) ->
- #pd_deblock{win = WindowId,
- win_width = WindowWidth,
- win_height = WindowHeight} = Msg,
-
- NewProcVars = ?DISP_FUNC_FILE:init_display(WindowId, WindowWidth, WindowHeight,
- ProcVars),
- receive
-
- #pg_ready{} ->
- Sender = Msg#pd_deblock.sender,
- Sender ! #pd_deblock_cfm{sender = self()},
- deblocked_loop(NewProcVars)
-
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: deblocked_loop.
-%%
-%% Return Value: None.
-%%
-%% Description: Eternal (well, almost) loop, receiving messages and
-%% handling them.
-%%
-%% Parameters: Master: Pid to the 'pc' process.
-%% Win: Id of the window created.
-%%======================================================================
-
-
-
-deblocked_loop(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- {gs, Id, Event, Data, Args} ->
- NewProcVars = gs_messages({Id, Event, Data, Args}, ProcVars),
- deblocked_loop(NewProcVars);
-
- _Other ->
- NewProcVars = tv_messages(Msg, ProcVars),
- deblocked_loop(NewProcVars)
- end
- end.
-
-
-
-
-
-tv_messages(Msg, ProcVars) ->
- WinId = ProcVars#process_variables.window_id,
-
- case Msg of
- #pg_cell_marked{} ->
- mark_busy(WinId),
- NewProcVars = handle_cell_marked(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pc_data{} ->
- mark_busy(WinId),
- NewProcVars = show_data(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pc_list_info{} ->
- handle_list_info(Msg, ProcVars);
-
- #pb_col_marked{} ->
- mark_busy(WinId),
- NewProcVars = handle_col_marked(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pb_row_marked{} ->
- mark_busy(WinId),
- NewProcVars = handle_row_marked(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pb_new_colwidth{} ->
- mark_busy(WinId),
- NewProcVars = resize_column(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pd_get_sort_settings{sorting = Sorting, reverse = Reverse} ->
- mark_busy(WinId),
- NewProcVars =
- case send_sort_info_signal(Sorting, Reverse, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(Sorting, TempNewProcVars)
- end,
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pd_new_table{table_type=TabType,table_name=TabName,
- record_name=RecName,writable=Writable} ->
- mark_busy(WinId),
- ToolP = ProcVars#process_variables.toolbar_params,
- ?DISP_FUNC_FILE:update_toolbar_label(notext, ToolP, undefined, undefined, Writable),
- mark_nonbusy(WinId),
- ProcVars#process_variables{table_type = TabType,
- table_name = TabName,
- record_name = RecName,
- writable = Writable};
-
- #pd_win_conf{} ->
- mark_busy(WinId),
- NewProcVars = resize_window(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
- #pd_rec_edit{} ->
- mark_busy(WinId),
- NewProcVars = open_rec_edit(Msg, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {updated_object, UpdObj} ->
- get_updated_elem2(true, UpdObj, ProcVars),
- ProcVars;
-
- {new_object, NewObj} ->
- get_updated_elem2(true, NewObj, ProcVars),
- ProcVars;
-
- {error_msg_mode, Mode} ->
- put(error_msg_mode, Mode),
- ProcVars;
-
- {'EXIT', Pid, Reason} ->
- exit_signals({Pid, Reason}, ProcVars);
-
- _Other ->
- ProcVars
- end.
-
-
-
-
-
-
-exit_signals(ExitInfo, ProcVars) ->
- #process_variables{master_pid = MasterPid,
- pg_pid = PgPid,
- pb_pid = PbPid,
- rec_pid = RecPid} = ProcVars,
-
- case ExitInfo of
- {MasterPid, _Reason} ->
- exit(normal);
- {PgPid, _Reason} ->
- exit(normal);
- {PbPid, _Reason} ->
- exit(normal);
- {RecPid, _Reason} ->
- ProcVars#process_variables{rec_pid = undefined};
- _Other ->
- ProcVars
- end.
-
-
-
-
-open_rec_edit(Msg, ProcVars) ->
- #pd_rec_edit{attributes = AttrList} = Msg,
-
- #process_variables{rec_pid = RecPid,
- table_type = TabType,
- table_name = TabName,
- record_name = RecordName,
- lists_as_strings = ListsAsStr,
- mark_params = MarkP} = ProcVars,
-
- #mark_params{marked_object = MarkedObject} = MarkP,
-
- TabOrRecName =
- case TabType of
- mnesia ->
- RecordName;
- ets ->
- TabName
- end,
-
- case RecPid of
- undefined ->
- NewRecPid =
- case MarkedObject of
- undefined ->
- tv_rec_edit:start(TabType, TabOrRecName, AttrList, ListsAsStr,
- get(error_msg_mode));
- _Other ->
- AttrVals =
- case TabType of
- mnesia ->
- tl(tuple_to_list(MarkedObject));
- ets ->
- [MarkedObject]
- end,
- tv_rec_edit:start(TabType, TabOrRecName, AttrList, AttrVals, ListsAsStr,
- get(error_msg_mode))
- end,
- ProcVars#process_variables{rec_pid = NewRecPid};
- _AnyPid ->
- RecPid ! raise,
- ProcVars
- end.
-
-
-
-
-
-
-
-gs_messages(Msg, ProcVars) ->
-
- case Msg of
-
- {editentry, keypress, _Data, ['Tab' | _T]} ->
- gs:config(editentry, [{select, {0,100000000}}]),
- ProcVars;
-
- {editentry, keypress, _Data, ['Return' | _T]} ->
- get_updated_elem(ProcVars),
- ProcVars;
-
- {Id, enter, {toolbar, Btn, Str}, _} ->
- gs:config(Id, [{motion, true}]),
- NewProcVars = handle_toolbar_buttons(Id, Btn, Str, false, 0, 0,
- ProcVars),
- NewProcVars;
-
-
- {_Id, buttonpress, _Data, [3 | _Rest]} ->
- ProcVars;
-
-
- {_Id, buttonpress, vscale, [MouseBtn | _Tail]} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = ?DISP_FUNC_FILE:scroll_vertically(MouseBtn, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- % The order of messages from gs ought to be
- % 1. 'buttonpress'
- % 2. 'click' and
- % 3. 'buttonrelease'
- % However, quite often the 'click' message comes last, meaning we have
- % to check for this. :-(
-
- {_Id, click, vscale, [NewScalePos | _Tail]} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = ?DISP_FUNC_FILE:perform_vertical_scroll(NewScalePos,
- ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {_Id, buttonpress, hscale, [MouseBtn | _Tail]} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = ?DISP_FUNC_FILE:scroll_horizontally(MouseBtn, ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {_Id, click, hscale, [NewScalePos | _Tail]} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = ?DISP_FUNC_FILE:perform_horizontal_scroll(NewScalePos,
- ProcVars),
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {_Id, click, {toolbar, poll_table, _Str}, _Arg} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_poll_table{sender = self()},
- mark_nonbusy(WinId),
- ProcVars;
-
-
- {_Id, click, {toolbar, select_browser, _Str}, _Arg} ->
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_select{sender = self()},
- ProcVars;
-
-
- {_Id, click, {toolbar, help_button, _Str}, _Arg} ->
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_help{sender = self()},
- ProcVars;
-
-
-
- {_Id, click, {toolbar, insert_object, _Str}, _Arg} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! {pc_edit_object, self()},
- mark_nonbusy(WinId),
- ProcVars;
-
-
- {_Id, click, {toolbar, search_object, _Str}, _Arg} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_search_req{sender = self()},
- mark_nonbusy(WinId),
- ProcVars;
-
-
- {_Id, click, {toolbar, sort_rising_order, _Str}, _Arg} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = case send_sort_info_signal(true, false, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(true, TempNewProcVars)
- end,
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {_Id, click, {toolbar, sort_falling_order, _Str}, _Arg} ->
- WinId = ProcVars#process_variables.window_id,
- mark_busy(WinId),
- NewProcVars = case send_sort_info_signal(true, true, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(true, TempNewProcVars)
- end,
- mark_nonbusy(WinId),
- NewProcVars;
-
-
- {_Id, click, {toolbar, no_sorting, _Str}, _Arg} ->
- NewProcVars = case send_sort_info_signal(false, false, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(false, TempNewProcVars)
- end,
- NewProcVars;
-
-
- {Id, click, {toolbar, table_info, _Str}, _Arg} ->
- ToolP = ProcVars#process_variables.toolbar_params,
- F = ToolP#toolbar_params.pop_up_frame_id,
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_show_table_info{sender = self()},
- ProcVars;
-
-
- {Id, click, {labelbtn, pop_up}, _Arg} ->
- gs:config(Id, [{data, {labelbtn, pop_down}}]),
- NewProcVars = ?DISP_FUNC_FILE:show_toolbar_editor(ProcVars),
- NewProcVars;
-
-
- {Id, click, {labelbtn, pop_down}, _Arg} ->
- gs:config(Id, [{data, {labelbtn, pop_up}}]),
- NewProcVars = ?DISP_FUNC_FILE:hide_toolbar_editor(ProcVars),
- NewProcVars;
-
-
- _OtherMessage ->
- ProcVars
-
- end.
-
-
-
-
-
-get_updated_elem(ProcVars) ->
- EditedStr = gs:read(editentry, text),
- case tv_db_search:string_to_term(EditedStr) of
- {error, {_Reason, Msg}} ->
- gs:config(editentry, [beep]),
- gs:window(pdwin, gs:start(), []),
- tv_utils:notify(pdwin, "TV Notification", Msg),
- gs:destroy(pdwin),
- ProcVars;
- {ok, NewTerm} ->
- get_updated_elem2(false, NewTerm, ProcVars)
- end.
-
-
-
-
-
-get_updated_elem2(FromRecEdit, NewTerm, ProcVars) ->
- #process_variables{table_type = TableType,
- record_name = RecordName,
- mark_params = MarkP,
- master_pid = PcPid} = ProcVars,
-
- #mark_params{marked_object = ObjToUpdate,
- marked_color = ObjColor,
- virtual_row_no = VirtualRow,
- cell_col_no = VirtualCol} = MarkP,
-
- case ObjToUpdate of
- undefined ->
- case new_object_ok(TableType, RecordName, NewTerm) of
- true ->
- PcPid ! #pd_new_object{sender = self(),
- object = NewTerm},
- ProcVars;
- {false, Msg} ->
- gs:window(pdwin, gs:start(), []),
- tv_utils:notify(pdwin, "TV Notification", Msg),
- gs:destroy(pdwin),
- ProcVars
- end;
- _AnyObj ->
- %% We need to know if the object has been deleted!
- NewObj =
- case VirtualCol of
- undefined ->
- NewTerm;
- _AnyCol when FromRecEdit ->
- NewTerm;
- _AnyCol ->
- if
- is_tuple(ObjToUpdate) ->
- erlang:setelement(VirtualCol, ObjToUpdate, NewTerm);
- true ->
- NewTerm
- end
- end,
- %% Is the update OK?
- case update_ok(TableType, ObjToUpdate, NewObj) of
- true ->
- PcPid ! #pd_updated_object{sender = self(),
- object = NewObj,
- old_object = ObjToUpdate,
- old_color = ObjColor,
- obj_no = VirtualRow},
- ProcVars;
- false ->
- gs:window(pdwin, gs:start(), []),
- case get(error_msg_mode) of
- normal ->
- tv_utils:notify(pdwin, "TV Notification",
- ["The record name cannot be changed!"]);
- haiku ->
- tv_utils:notify(pdwin, "TV Notification",
- ["The attempt to change",
- "The permanent record name",
- "Is simply ignored."])
- end,
- gs:destroy(pdwin),
- ProcVars
- end
- end.
-
-
-
-
-new_object_ok(ets, _RecordName, NewTerm) when is_tuple(NewTerm) ->
- true;
-new_object_ok(ets, _RecordName, _NewTerm) ->
- Msg = case get(error_msg_mode) of
- normal ->
- ["Object is not a tuple!"];
- haiku ->
- ["Yes, it is a term.",
- "It is pretty, but it's not",
- "A proper tuple."]
- end,
- {false, Msg};
-new_object_ok(mnesia, RecordName, NewTerm) when is_tuple(NewTerm) ->
- NewRecName = element(1, NewTerm),
- case NewRecName of
- RecordName ->
- true;
- _OtherName ->
- Msg = case get(error_msg_mode) of
- normal ->
- ["Erroneous record name!"];
- haiku ->
- ["The attempt to use",
- "An invalid record name",
- "Is simply ignored."]
- end,
- {false, Msg}
- end;
-new_object_ok(mnesia, _RecordName, _NewTerm) ->
- Msg = case get(error_msg_mode) of
- normal ->
- ["Object is not a record!"];
- haiku ->
- ["Yes, it is a term.",
- "It is pretty, but it's not",
- "The proper record."]
- end,
- {false, Msg}.
-
-
-
-
-update_ok(ets, _ObjectToUpdate, _NewObject) ->
- true;
-update_ok(mnesia, ObjectToUpdate, NewObject) ->
- OldRecName = element(1, ObjectToUpdate),
- NewRecName = element(1, NewObject),
- case NewRecName of
- OldRecName ->
- true;
- _Other ->
- false
- end.
-
-
-
-
-handle_toolbar_buttons(Id, Btn, Str, LabelShown, X, Y, ProcVars) ->
- WinId = ProcVars#process_variables.window_id,
- ToolP = ProcVars#process_variables.toolbar_params,
- F = ToolP#toolbar_params.pop_up_frame_id,
-
- receive
-
- {gs, Id, motion, _Data, [NewX, NewY | _]} ->
- handle_toolbar_buttons(Id, Btn, Str, LabelShown, NewX, NewY,
- ProcVars);
-
- {gs, editentry, keypress, _Data, ['Tab' | _T]} ->
- gs:config(editentry, [{select, {0,100000000}}]),
- handle_toolbar_buttons(Id, Btn, Str, LabelShown, X, Y, ProcVars);
-
- {gs, editentry, keypress, _Data, ['Return' | _T]} ->
- get_updated_elem(ProcVars),
- handle_toolbar_buttons(Id, Btn, Str, LabelShown, X, Y, ProcVars);
-
- {gs, Id, leave, {toolbar, Btn, Str}, _Arg} ->
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- ProcVars;
-
- {gs, Id, click, {toolbar, poll_table, _Str}, _Arg} ->
- mark_busy(WinId),
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_poll_table{sender = self()},
- mark_nonbusy(WinId),
- ProcVars;
-
- {gs, Id, click, {toolbar, select_browser, _Str}, _Arg} ->
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_select{sender = self()},
- ProcVars;
-
- {gs, Id, click, {toolbar, help_button, _Str}, _Arg} ->
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_help{sender = self()},
- ProcVars;
-
- {gs, Id, click, {toolbar, insert_object, _Str}, _Arg} ->
- mark_busy(WinId),
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! {pc_edit_object, self()},
- mark_nonbusy(WinId),
- ProcVars;
-
-
- {gs, Id, click, {toolbar, search_object, _Str}, _Arg} ->
- mark_busy(WinId),
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_search_req{sender = self()},
- mark_nonbusy(WinId),
- ProcVars;
-
- {gs, Id, click, {toolbar, sort_rising_order, _Str}, _Arg} ->
- mark_busy(WinId),
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- NewProcVars =
- case send_sort_info_signal(true, false, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(true, TempNewProcVars)
- end,
- mark_nonbusy(WinId),
- NewProcVars;
-
- {gs, Id, click, {toolbar, sort_falling_order, _Str}, _Arg} ->
- mark_busy(WinId),
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- NewProcVars =
- case send_sort_info_signal(true, true, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(true, TempNewProcVars)
- end,
- mark_nonbusy(WinId),
- NewProcVars;
-
- {gs, Id, click, {toolbar, no_sorting, _Str}, _Arg} ->
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- NewProcVars =
- case send_sort_info_signal(false, false, ProcVars) of
- ignore ->
- ProcVars;
- TempNewProcVars ->
- set_sort_col(false, TempNewProcVars)
- end,
- NewProcVars;
-
- {gs, Id, click, {toolbar, table_info, _Str}, _Arg} ->
- gs:config(F, [{y, -30}]),
- gs:config(Id, [{motion, false}]),
- PcPid = ProcVars#process_variables.master_pid,
- PcPid ! #pc_show_table_info{sender = self()},
- ProcVars;
-
- {'EXIT', Pid, Reason} ->
- exit_signals({Pid, Reason}, ProcVars),
- handle_toolbar_buttons(Id, Btn, Str, LabelShown, X, Y, ProcVars);
-
- OtherMsg ->
- NewProcVars = tv_messages(OtherMsg, ProcVars),
- handle_toolbar_buttons(Id, Btn, Str, LabelShown, X, Y, NewProcVars)
-
- after 600 ->
- case LabelShown of
- false ->
- FrameP = ProcVars#process_variables.frame_params,
- L = ToolP#toolbar_params.pop_up_label_id,
-
- #frame_params{toolbar_frame_width = TWidth,
- toolbar_frame_height = THeight} = FrameP,
-
- BtnHeight = gs:read(Id, height),
- BtnXpos = gs:read(Id, x),
- BtnYpos = gs:read(Id, y),
- FrameHeight = gs:read(F, height),
- FontUsed = gs:read(L, font),
- {StringWidth, _H} = gs:read(L, {font_wh, {FontUsed, Str}}),
-
- Width = StringWidth + 6,
- Xpos = BtnXpos + X,
- LblXpos = if
- Xpos + Width > TWidth ->
- Xpos - Width;
- true ->
- Xpos
- end,
- % Ypos = BtnYpos + Y + 15,
- Ypos = BtnYpos + BtnHeight + 6,
- LblYpos = if
- Ypos + FrameHeight > THeight ->
- Ypos - FrameHeight - 25;
- true ->
- Ypos
- end,
- gs:config(L, [{width, Width - 2},
- {label, {text, Str}}]),
- gs:config(F, [{width, Width},
- {x, LblXpos},
- {y, LblYpos}
- ]);
- true ->
- done
- end,
- handle_toolbar_buttons(Id, Btn, Str, true, X, Y, ProcVars)
- end.
-
-
-
-
-
-
-set_sort_col(SortingOn, ProcVars) ->
- #process_variables{pb_pid = PbPid,
- mark_params = MarkP} = ProcVars,
-
- SortCol = case SortingOn of
- true ->
- MarkP#mark_params.col_no;
- false ->
- undefined
- end,
- PbPid ! #pb_set_sort_col{sender = self(),
- virtual_col = SortCol
- },
- remove_all_marks(SortCol, ProcVars).
-
-
-
-
-
-send_sort_info_signal(Sorting, Reverse, ProcVars) ->
- #process_variables{master_pid = PcPid,
- mark_params = MarkP} = ProcVars,
-
- SortColNo = MarkP#mark_params.col_no,
-
- PcPid ! #pc_set_sorting_mode{sender = self(),
- sorting = Sorting,
- reverse = Reverse,
- sort_key_no = SortColNo
- },
- receive
- #pc_set_sorting_mode_cfm{sort_key_no = FinalSortColNo} ->
- NewMarkP = MarkP#mark_params{col_no = FinalSortColNo},
- ProcVars#process_variables{mark_params = NewMarkP};
-
- #pd_ignore{} ->
- ignore
-
- end.
-
-
-
-
-
-show_data(Msg, ProcVars) ->
- #pc_data{scale_pos = Pos,
- scale_range = Range,
- list_range = MaxValue,
- elementlist = List,
- list_of_keys = KeyList,
- max_elem_size = MaxElemSize,
- marked_row = MarkedRowData} = Msg,
-
- ?DISP_FUNC_FILE:display_data(Pos, Range, MaxValue, List, KeyList, MaxElemSize,
- MarkedRowData, ProcVars).
-
-
-
-
-
-
-handle_list_info(Msg, ProcVars) ->
- ListAsStr = Msg#pc_list_info.lists_as_strings,
- PgPid = ProcVars#process_variables.pg_pid,
- PgPid ! #pg_list_info{sender = self(),
- lists_as_strings = ListAsStr},
- ProcVars#process_variables{lists_as_strings = ListAsStr}.
-
-
-
-
-
-handle_col_marked(Msg, ProcVars) ->
- #pb_col_marked{col_marked = ColMarked,
- virtual_col = VirtualCol} = Msg,
-
- #process_variables{master_pid = MasterPid,
- pg_pid = PgPid,
- rec_pid = RecPid,
- writable = Writable,
- toolbar_params = ToolP,
- mark_params = MarkP} = ProcVars,
- SortCol = MarkP#mark_params.sort_col_no,
-
- PgPid ! #pg_remove_marks{sender = self()},
-
- case ColMarked of
- true ->
- PgPid ! #pg_col_marked{sender = self(),
- virtual_col = VirtualCol};
- false ->
- done
- end,
-
- MasterPid ! #pc_marked_row{sender = self(),
- row_no = undefined,
- object = undefined,
- color = undefined
- },
-
- ?DISP_FUNC_FILE:update_toolbar_label(notext, ToolP, undefined, undefined, Writable),
- send_to_rec_edit(RecPid, insert_mode),
-
- NewMarkP =
- if
- ColMarked ->
- MarkP#mark_params{col_no = VirtualCol};
- true ->
- if
- SortCol =:= undefined ->
- MarkP;
- true ->
- MarkP#mark_params{col_no = SortCol}
- end
- end,
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-
-remove_all_marks(SortCol, ProcVars) ->
- #process_variables{master_pid = MasterPid,
- pb_pid = PbPid,
- pg_pid = PgPid,
- toolbar_params = ToolP} = ProcVars,
-
- PgPid ! #pg_remove_marks{sender = self()},
- PbPid ! #pb_remove_marks{sender = self()},
- MasterPid ! #pc_marked_row{sender = self(),
- row_no = undefined,
- object = undefined,
- color = undefined
- },
-%% ?DISP_FUNC_FILE:update_toolbar_label(notext, ToolP, undefined, undefined, Writable),
- ?DISP_FUNC_FILE:update_toolbar_editor(ToolP#toolbar_params.editor_id, notext),
-%% send_to_rec_edit(RecPid, insert_mode),
- ProcVars#process_variables{mark_params = #mark_params{sort_col_no = SortCol,
- cell_col_no = undefined,
- row_no = undefined,
- virtual_row_no = undefined,
- marked_object = undefined,
- marked_color = undefined}
- }.
-
-
-
-
-
-
-handle_row_marked(Msg, ProcVars) ->
- #pb_row_marked{row_marked = RowMarked,
- virtual_row = VirtualRow,
- real_row = RealRow} = Msg,
-
- #process_variables{master_pid = MasterPid,
- rec_pid = RecPid,
- pg_pid = PgPid,
- data_list = DataList,
- color_list = ColorList,
- writable = Writable,
- toolbar_params = ToolP,
- mark_params = MarkP} = ProcVars,
-
- PgPid ! #pg_remove_marks{sender = self()},
-
- case RowMarked of
- true ->
- PgPid ! #pg_row_marked{sender = self(),
- virtual_row = VirtualRow};
- false ->
- done
- end,
-
- {DataElement, NewMarkP} =
- if
- RowMarked ->
- {MarkedRowOrCol, RowObj} =
- ?DISP_FUNC_FILE:get_data_element(row, DataList, RealRow, undefined),
-
- MarkedRowColor =
- case MarkedRowOrCol of
- notext ->
- undefined;
- _OtherObject ->
- lists:nth(RealRow, ColorList)
- end,
- MasterPid ! #pc_marked_row{sender = self(),
- row_no = VirtualRow,
- object = RowObj,
- color = MarkedRowColor
- },
- send_to_rec_edit(RecPid, {update_mode,RowObj}),
- {MarkedRowOrCol, MarkP#mark_params{virtual_row_no = VirtualRow,
- row_no = RealRow,
- cell_col_no = undefined,
- col_no = undefined,
- marked_object = RowObj,
- marked_color = MarkedRowColor}};
- true ->
- MasterPid ! #pc_marked_row{sender = self(),
- row_no = undefined,
- object = undefined,
- color = undefined
- },
- send_to_rec_edit(RecPid, insert_mode),
- {notext, MarkP#mark_params{virtual_row_no = undefined,
- row_no = undefined,
- cell_col_no = undefined,
- col_no = undefined,
- marked_object = undefined,
- marked_color = undefined}}
- end,
-
- ?DISP_FUNC_FILE:update_toolbar_label(DataElement, ToolP, VirtualRow,
- undefined, Writable),
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-handle_cell_marked(Msg, ProcVars) ->
- #pg_cell_marked{cell_marked = CellMarked,
- virtual_col = VirtualCol,
- real_row = RealRow,
- virtual_row = VirtualRow} = Msg,
-
- % We are interested in the real row number, since we only have a sublist
- % stored in pd.
- ?DISP_FUNC_FILE:marked_cell(CellMarked, VirtualCol, RealRow, VirtualRow,
- ProcVars).
-
-
-
-
-resize_window(Msg, ProcVars) ->
- #pd_win_conf{width = NewWindowWidth,
- height = NewWindowHeight} = Msg,
-
- ?DISP_FUNC_FILE:resize_display(NewWindowWidth, NewWindowHeight, ProcVars).
-
-
-
-
-resize_column(Msg, ProcVars) ->
- #pb_new_colwidth{real_col = RealCol,
- virtual_col = VirtualCol,
- xdiff = Xdiff} = Msg,
-
- ?DISP_FUNC_FILE:resize_column(RealCol, VirtualCol, Xdiff, ProcVars).
-
-
-
-
-mark_busy(Id) ->
- gs:config(Id, [{cursor, busy}]).
-
-
-
-
-mark_nonbusy(Id) ->
- gs:config(Id, [{cursor, arrow}]).
-
-
-
-
-send_to_rec_edit(undefined, _Msg) ->
- done;
-send_to_rec_edit(RecPid, Msg) ->
- RecPid ! Msg.
-
diff --git a/lib/tv/src/tv_pd_display.erl b/lib/tv/src/tv_pd_display.erl
deleted file mode 100644
index 804180da16..0000000000
--- a/lib/tv/src/tv_pd_display.erl
+++ /dev/null
@@ -1,1066 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Part of pd controlling the graphics.
-%%%
-%%%*********************************************************************
-
--module(tv_pd_display).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,editor,2}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-
-
-
--export([init_display/4,
- display_data/8,
- resize_display/3,
- resize_column/4,
- scroll_horizontally/2,
- scroll_vertically/2,
- perform_horizontal_scroll/2,
- perform_vertical_scroll/2,
- marked_cell/5,
- update_toolbar_label/5,
- update_toolbar_editor/2,
- get_data_element/4,
- hide_toolbar_editor/1,
- show_toolbar_editor/1]).
-
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pd_int_def.hrl").
--include("tv_pd_int_msg.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Function: init_display.
-%%
-%% Return Value: Id of the display (here:canvas) created.
-%%
-%% Description: Creates the canvas and the scale.
-%%
-%% Parameters: Id of the window the display shall be created in.
-%%======================================================================
-
-
-init_display(WindowId, WindowWidth, WindowHeight, ProcVars) ->
- % Get all necessary window parameters!
- #process_variables{pg_pid = PgPid,
- pb_pid = PbPid,
- frame_params = FrameP,
- scale_params = ScaleP,
- toolbar_params = ToolP} = ProcVars,
-
- NewFrameP = tv_pd_frames:create_display_frames(WindowId, WindowWidth,
- WindowHeight, FrameP),
-
- #frame_params{grid_frame_id = GridParentId,
- grid_frame_width = GridParentWidth,
- grid_frame_height = GridParentHeight} = NewFrameP,
-
- PgPid ! #pg_init_grid{sender = self(),
- parent_id = GridParentId,
- width = GridParentWidth,
- height = GridParentHeight,
- xpos = ?VBTN_WIDTH - 1,
- ypos = ?KEY_MARK_AREA_HEIGHT + ?HBTN_HEIGHT - 1,
- nof_rows = ?NOF_GRIDROWS,
- row_height = ?ROW_HEIGHT
- },
-
-
- receive
- #pg_col_info{first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown} ->
-
- PbPid ! #pb_init_btns{sender = self(),
- parent_id = GridParentId,
- parent_width = GridParentWidth,
- parent_height = GridParentHeight,
- ypos = ?KEY_MARK_AREA_HEIGHT,
- hbtn_height = ?HBTN_HEIGHT,
- resbtn_width = ?RESBTN_WIDTH,
- vbtn_width = ?VBTN_WIDTH,
- nof_rows = ?NOF_GRIDROWS,
- row_height = ?ROW_HEIGHT,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown
- },
-
- NewScaleP = tv_pd_scale:init_scale(NewFrameP, ScaleP),
-
- NewToolP = init_toolbar(NewFrameP, ToolP),
-
- ProcVars#process_variables{window_id = WindowId,
- window_width = WindowWidth,
- window_height = WindowHeight,
- first_col_shown = FirstColShown,
- nof_rows_shown = NofRowsShown,
- cols_shown = ColsShown,
- frame_params = NewFrameP,
- scale_params = NewScaleP,
- toolbar_params = NewToolP
- }
- end.
-
-
-
-
-
-resize_display(NewWinW, NewWinH, ProcVars) ->
- #process_variables{pg_pid = PgPid,
- pb_pid = PbPid,
- color_list = ColorList,
- first_row_shown = FirstRowShown,
- frame_params = FrameP,
- scale_params = ScaleP,
- toolbar_params = ToolP} = ProcVars,
-
- NewFrameP = tv_pd_frames:resize_display_frames(NewWinW, NewWinH, FrameP),
-
- #frame_params{grid_frame_width = GridParentWidth,
- grid_frame_height = GridParentHeight} = NewFrameP,
-
- PgPid ! #pg_resize_grid{sender = self(),
- width = GridParentWidth,
- height = GridParentHeight
- },
-
- receive
- #pg_col_info{first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown} ->
-
- PbPid ! #pb_update_hbtns{sender = self(),
- parent_width = GridParentWidth,
- parent_height = GridParentHeight,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown
- },
-
- PbPid ! #pb_update_vbtns{sender = self(),
- color_list = ColorList,
- first_row_shown = FirstRowShown,
- nof_rows_shown = NofRowsShown,
- blinking_enabled = false
- },
-
- NewScaleP = tv_pd_scale:resize_scale(NewFrameP, ScaleP),
-
- NewToolP = resize_toolbar(NewFrameP, ToolP),
-
- ProcVars#process_variables{window_width = NewWinW,
- window_height = NewWinH,
- first_col_shown = FirstColShown,
- nof_rows_shown = NofRowsShown,
- cols_shown = ColsShown,
- frame_params = NewFrameP,
- scale_params = NewScaleP,
- toolbar_params = NewToolP
- }
- end.
-
-
-
-
-
-
-
-resize_column(RealCol, VirtualCol, Xdiff, ProcVars) ->
- #process_variables{pg_pid = PgPid,
- pb_pid = PbPid,
- frame_params = FrameP} = ProcVars,
-
- PgPid ! #pg_resize_grid_col{sender = self(),
- real_col_no = RealCol,
- virtual_col_no = VirtualCol,
- xdiff = Xdiff
- },
-
- #frame_params{grid_frame_width = GridFrameWidth,
- grid_frame_height = GridFrameHeight} = FrameP,
- receive
- #pg_col_info{first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown} ->
-
- PbPid ! #pb_update_hbtns{parent_width = GridFrameWidth,
- parent_height = GridFrameHeight,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown
- },
-
- ProcVars#process_variables{first_col_shown = FirstColShown,
- nof_rows_shown = NofRowsShown,
- cols_shown = ColsShown
- }
- end.
-
-
-
-
-
-
-
-
-display_data(Pos, Range, _MaxValue, List, KeyList, MaxElemSize, MarkedRowData,ProcVars) ->
- #process_variables{master_pid = PcPid,
- rec_pid = RecPid,
- pg_pid = PgPid,
- pb_pid = PbPid,
- writable = Writable,
- sorting_on = SortingOn,
- nof_rows_shown = NofRowsShown,
- scale_params = ScaleP,
- toolbar_params = ToolP,
- mark_params = MarkP} = ProcVars,
-
- {DataList, ColorList} = split_dblist(List, [], []),
-
- NewMarkP = update_marks(SortingOn, DataList, ColorList, MarkedRowData, Pos, NofRowsShown,
- Writable, Range, PcPid, PgPid, RecPid, ToolP, MarkP),
-
- PgPid ! #pg_data{sender = self(),
- data = DataList,
- first_row_shown = Pos
- },
-
- PbPid ! #pb_update_vbtns{sender = self(),
- color_list = ColorList,
- first_row_shown = Pos,
- nof_rows_shown = NofRowsShown,
- blinking_enabled = false
- },
-
- PbPid ! #pb_key_info{sender = self(),
- list_of_keys = KeyList
- },
-
- % May be new number of elements in the total list!
- ?SCALE_FUNC_FILE:set_scale_range(vscale, Range, ScaleP),
- % May be new vertical scale position required!
- NewScaleP = ?SCALE_FUNC_FILE:set_scale_pos(vscale, Pos, ScaleP),
- % May be new maximum size of elements!
- ?SCALE_FUNC_FILE:set_scale_range(hscale, {1, MaxElemSize}, NewScaleP),
-
- ProcVars#process_variables{data_list = DataList,
- color_list = ColorList,
- first_row_shown = Pos,
- initialising = false,
- scale_params = NewScaleP,
- mark_params = NewMarkP
- }.
-
-
-
-
-
-
-
-scroll_vertically(MouseBtn, ProcVars) ->
- #process_variables{scale_params = ScaleP} = ProcVars,
-
- OldScalePos = ScaleP#scale_params.vscale_pos,
- NewScalePos = get_new_scalepos(MouseBtn, OldScalePos),
-
- case NewScalePos of
- OldScalePos ->
- ProcVars;
- NewValue ->
- perform_vertical_scroll(NewValue, ProcVars)
- end.
-
-
-
-
-
-
-
-scroll_horizontally(MouseBtn, ProcVars) ->
- #process_variables{scale_params = ScaleP} = ProcVars,
-
- OldScalePos = ScaleP#scale_params.hscale_pos,
- NewScalePos = get_new_scalepos(MouseBtn, OldScalePos),
-
- case NewScalePos of
- OldScalePos ->
- ProcVars;
- NewValue ->
- perform_horizontal_scroll(NewValue, ProcVars)
- end.
-
-
-
-
-
-
-
-
-perform_vertical_scroll(NewScalePos, ProcVars) ->
- #process_variables{master_pid = MasterPid,
- initialising = Init,
- scale_params = ScaleP} = ProcVars,
-
- %% To avoid erroneous scrollbar signals during creation of the display.
- case Init of
- true ->
- done;
- false ->
- MasterPid ! #pc_data_req{sender = self(),
- element = NewScalePos,
- nof_elements = ?NOF_GRIDROWS}
- end,
-
- % Since the order of click/buttonrelease messages isn't
- % precise, set the scale to the returned pos (may otherwise
- % differ one unit).
- NewScaleP = ?SCALE_FUNC_FILE:set_scale_pos(vscale,
- NewScalePos,
- ScaleP),
-
- ProcVars#process_variables{scale_params = NewScaleP}.
-
-
-
-
-
-
-
-perform_horizontal_scroll(NewScalePos, ProcVars) ->
- #process_variables{pg_pid = PgPid,
- pb_pid = PbPid,
- frame_params = FrameP,
- scale_params = ScaleP} = ProcVars,
-
- % Since the order of click/buttonrelease messages isn't
- % precise, set the scale to the returned pos (may otherwise
- % differ one unit).
- NewScaleP = ?SCALE_FUNC_FILE:set_scale_pos(hscale,
- NewScalePos,
- ScaleP),
-
- PgPid ! #pg_horizontal_scroll{sender = self(),
- leftmost_virtual_col = NewScalePos
- },
-
- #frame_params{grid_frame_width = GridFrameWidth,
- grid_frame_height = GridFrameHeight} = FrameP,
- receive
- #pg_col_info{first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown} ->
-
- PbPid ! #pb_update_hbtns{parent_width = GridFrameWidth,
- parent_height = GridFrameHeight,
- first_col_shown = FirstColShown,
- cols_shown = ColsShown
- },
-
- ProcVars#process_variables{first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown,
- scale_params = NewScaleP
- }
- end.
-
-
-
-
-
-
-
-
-marked_cell(true, VirtualCol, RealRow, VirtualRow, ProcVars) ->
- #process_variables{master_pid = MasterPid,
- rec_pid = RecPid,
- data_list = DataList,
- color_list = ColorList,
- writable = Writable,
- mark_params = MarkP,
- toolbar_params = ToolP} = ProcVars,
-
- {DataElement, MarkedRowObject} = get_data_element(cell, DataList, RealRow, VirtualCol),
- update_toolbar_label(DataElement, ToolP, VirtualRow, VirtualCol, Writable),
- send_to_rec_edit(RecPid, {update_mode,MarkedRowObject}),
-
- MarkedRowColor = lists:nth(RealRow, ColorList),
-
- MasterPid ! #pc_marked_row{sender = self(),
- row_no = VirtualRow,
- object = MarkedRowObject,
- color = MarkedRowColor
- },
- NewMarkP = MarkP#mark_params{cell_col_no = VirtualCol,
- row_no = RealRow,
- virtual_row_no = VirtualRow,
- marked_object = MarkedRowObject,
- marked_color = MarkedRowColor
- },
- ProcVars#process_variables{mark_params = NewMarkP
- };
-marked_cell(false, VirtualCol, _RealRow, VirtualRow, ProcVars) ->
- #process_variables{master_pid = MasterPid,
- rec_pid = RecPid,
- pb_pid = PbPid,
- writable = Writable,
- mark_params = MarkP} = ProcVars,
-
- PbPid ! #pb_remove_marks{sender = self()},
-
- case VirtualRow of
- undefined ->
- done;
- _AnyRow ->
- update_toolbar_label(notext, ProcVars#process_variables.toolbar_params,
- VirtualRow, VirtualCol, Writable),
- send_to_rec_edit(RecPid, insert_mode)
- end,
- MasterPid ! #pc_marked_row{sender = self(),
- %% row_no = VirtualRow
- row_no = undefined,
- object = undefined,
- color = undefined
- },
- NewMarkP = MarkP#mark_params{cell_col_no = undefined,
- row_no = undefined,
- virtual_row_no = undefined,
- marked_object = undefined,
- marked_color = undefined
- },
- ProcVars#process_variables{mark_params = NewMarkP
- }.
-
-
-
-
-
-
-
-
-update_toolbar_label(notext, ToolP, _VirtualRowNo, _VirtualColNo, Writable) ->
- #toolbar_params{row_col_label_id = RowColLblId,
- fg_label_id = FgLblId,
- editor_id = EdId} = ToolP,
- gs:config(RowColLblId, [{label, {text,""}}]),
- gs:config(FgLblId, [{enable,true}]),
- gs:config(FgLblId, [{delete, {0,1000000000}}]),
- gs:config(FgLblId, [{insert, {0, ""}}]),
- case Writable of
- true ->
- gs:config(FgLblId, [{cursor, text},
- {setfocus, true}]);
- false ->
- gs:config(FgLblId, [{enable, false},
- {cursor, arrow},
- {setfocus, false}])
- end,
- update_toolbar_editor(EdId, notext);
-update_toolbar_label({DataToShow}, ToolP, VirtualRowNo, VirtualColNo, Writable) ->
- #toolbar_params{row_col_label_id = RowColLblId,
- fg_label_id = FgLblId,
- editor_id = EdId} = ToolP,
-
- case VirtualRowNo of
- undefined ->
- %% No row - nothing can possibly be marked!
- case Writable of
- true ->
- gs:config(FgLblId, [{setfocus,true},
- {cursor, text}]);
- false ->
- gs:config(FgLblId, [{enable,false},
- {setfocus, false},
- {cursor, arrow}])
- end;
- _AnyRow ->
- RowStr = "R" ++ integer_to_list(VirtualRowNo),
- ColStr = case VirtualColNo of
- undefined ->
- "";
- _AnyCol ->
- " x C" ++ integer_to_list(VirtualColNo)
- end,
- DataStr = lists:flatten(tv_io_lib:format("~p", [DataToShow])),
- gs:config(RowColLblId, [{label, {text,RowStr++ColStr}}]),
- gs:config(FgLblId, [{enable,true}]),
- gs:config(FgLblId, [{delete, {0,10000000}}]),
- gs:config(FgLblId, [{insert, {0,DataStr}}]),
- case Writable of
- true ->
- gs:config(FgLblId, [{setfocus,true},
- {cursor, text}]);
- false ->
- gs:config(FgLblId, [{enable,false},
- {setfocus, false},
- {cursor, arrow}])
- end,
- update_toolbar_editor(EdId, {DataToShow})
- end.
-
-
-
-
-
-
-
-
-get_data_element(row, DataList, RowNo, _VirtualCol) ->
- if
- length(DataList) < RowNo ->
- {notext, undefined};
- true ->
- RowObj = lists:nth(RowNo, DataList),
- {{RowObj}, RowObj}
- end;
-get_data_element(cell, DataList, RowNo, ColNo) ->
- %% It's the responsibility of pg to ensure that there is a data item
- %% for the cell marked, meaning we don't *have* to check the length of
- %% the data items. However, since we in the future may want to edit
- %% even empty cells, we check it!
- if
- length(DataList) < RowNo ->
- {notext, undefined};
- true ->
- DataItem = lists:nth(RowNo, DataList),
- if
- is_tuple(DataItem) ->
- if size(DataItem) < ColNo ->
- {notext, DataItem};
- true ->
- {{element(ColNo, DataItem)}, DataItem}
- end;
- true ->
- {{DataItem}, DataItem}
- end
- end.
-
-
-
-
-
-
-
-
-show_toolbar_editor(ProcVars) ->
- #process_variables{frame_params = FrameP,
- toolbar_params = ToolP} = ProcVars,
-
- #frame_params{toolbar_frame_height = THeight} = FrameP,
-
- #toolbar_params{editor_frame_id = EdFrameId} = ToolP,
-
- Xpos = 0,
- Ypos = THeight - 8 - ?ROW_COL_LBL_HEIGHT + 1,
- gs:config(EdFrameId, [{x, Xpos},
- {y, Ypos}
- ]),
- ProcVars.
-
-
-
-
-
-
-
-
-hide_toolbar_editor(ProcVars) ->
- #process_variables{toolbar_params = ToolP} = ProcVars,
-
- #toolbar_params{editor_frame_id = EdFrameId} = ToolP,
-
- Xpos = 0,
- Ypos = (-1) * gs:read(EdFrameId, height) - 50,
- gs:config(EdFrameId, [{x, Xpos},
- {y, Ypos}
- ]),
- ProcVars.
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-update_toolbar_editor(EdId, notext) ->
- gs:config(EdId, [{enable, true}]),
- gs:config(EdId, [clear]),
- gs:config(EdId, [{enable, false}]);
-update_toolbar_editor(EdId, {DataToShow}) ->
- Str = io_lib:format("~n~p~n", [DataToShow]),
- gs:config(EdId, [{enable, true}]),
- gs:config(EdId, [clear]),
- gs:config(EdId, [{overwrite, {insert, Str}}]),
- gs:config(EdId, [{enable, false}]).
-
-
-
-
-
-
-update_marks(true, _DataList, _ColorList, _MarkedRowData,
- _Pos, _NofRowsShown, _Writable, _Range, PcPid, PgPid, RecPid, ToolP, MarkP) ->
- PgPid ! #pg_remove_marks{sender = self()},
- %% Too much trouble trying to find the marked object again!
- %% On the other hand, is the mark based on the row number
- %% or the row content? Probably different strategies now, depending
- %% on where in the code we are... :-(
- %% update_toolbar_label(notext, ToolP, undefined, undefined, Writable),
- update_toolbar_editor(ToolP#toolbar_params.editor_id, notext),
- send_to_rec_edit(RecPid, insert_mode),
- PcPid ! #pc_marked_row{sender = self(),
- row_no = undefined,
- object = undefined,
- color = undefined
- },
- MarkP#mark_params{cell_col_no = undefined,
- row_no = undefined,
- virtual_row_no = undefined,
- marked_object = undefined,
- marked_color = undefined
- };
-update_marks(false, DataList, ColorList, MarkedRowData,
- Pos, NofRowsShown, Writable, Range, PcPid, PgPid, RecPid, ToolP, MarkP) ->
- #mark_params{cell_col_no = CellColNo,
- virtual_row_no = VirtualRowNo} = MarkP,
-
- % Marked row data contains the color also!
- {RowData, RowColors} = split_dblist(MarkedRowData, [], []),
-
- case VirtualRowNo of
- undefined ->
- MarkP;
- _AnyRow ->
- if
- VirtualRowNo > element(2, Range) ->
- %% Mark outside the existing list! Uh-uh, remove the mark immediately! 8-0
- update_marks(true, DataList, ColorList, MarkedRowData, Pos, NofRowsShown,
- Writable, Range, PcPid, PgPid, RecPid, ToolP, MarkP);
- true ->
- {DataElement, RowObj} = choose_data_to_show(VirtualRowNo, CellColNo, RowData,
- DataList, Pos),
- {_, RowObjColor} = choose_data_to_show(VirtualRowNo, CellColNo, RowColors,
- ColorList, Pos),
- case DataElement of
- notext ->
- %% send_to_rec_edit(RecPid, insert_mode);
- done;
- _OtherElement ->
- %% send_to_rec_edit(RecPid, {update_mode, RowObj})
- send_to_rec_edit(RecPid, {reset_info, RowObj})
- end,
-
- %% case RowObj of
- %% OldMarkedObj ->
- %% done;
- %% _NewObj ->
- %% update_toolbar_label(DataElement, ToolP, VirtualRowNo,
- %% CellColNo, Writable)
- %% end,
-
- %% update_toolbar_label(DataElement,ToolP,VirtualRowNo,CellColNo,Writable),
-
- update_toolbar_editor(ToolP#toolbar_params.editor_id, DataElement),
- MarkP#mark_params{marked_object = RowObj,
- marked_color = RowObjColor}
- end
- end.
-
-
-
-
-
-choose_data_to_show(VirtualRowNo, undefined, _RowData, DataList, Pos) when VirtualRowNo >= Pos, VirtualRowNo =< (Pos + length(DataList) - 1) ->
- get_data_element(row, DataList, VirtualRowNo - Pos + 1, undefined);
-choose_data_to_show(_VirtualRowNo, undefined, RowData, _DataList, _Pos) ->
- get_data_element(row, RowData, 1, undefined);
-choose_data_to_show(VirtualRowNo, CellColNo, _RowData, DataList, Pos)
- when VirtualRowNo >= Pos, VirtualRowNo =< (Pos + length(DataList) - 1) ->
- get_data_element(cell, DataList, VirtualRowNo - Pos + 1, CellColNo);
-choose_data_to_show(_VirtualRowNo, CellColNo, RowData, _DataList, _Pos) ->
- get_data_element(cell, RowData, 1, CellColNo).
-
-
-
-
-
-
-get_new_scalepos(Btn, LastScalePos) ->
- receive
- {gs, _Id, click, _Data, [NewScalePos | _T]} ->
- get_new_scalepos(Btn, NewScalePos);
-
- {gs, _Id, buttonrelease, _Data, [Btn | _T]} ->
- LastScalePos;
-
- {gs, _Id, buttonrelease, _Data, _Args} ->
- get_new_scalepos(Btn, LastScalePos);
-
- {gs, _Id, buttonpress, _Data, _Args} ->
- get_new_scalepos(Btn, LastScalePos)
-
- end.
-
-
-
-
-
-
-
-split_dblist([], DataAcc, ColorAcc) ->
- {lists:reverse(DataAcc), lists:reverse(ColorAcc)};
-split_dblist([{Data, Color} | Tail], DataAcc, ColorAcc) ->
- split_dblist(Tail, [Data | DataAcc], [Color | ColorAcc]).
-
-
-
-
-
-
-
-
-init_toolbar(FrameP, ToolP) ->
- #frame_params{display_id = DispId,
- toolbar_frame_id = TId,
- toolbar_frame_width = TWidth,
- toolbar_frame_height = THeight,
- grid_frame_width = GWidth} = FrameP,
-
- NewToolP = init_toolbar_btns(TId, ToolP),
- {RowColLblId, BgLabelId, FgLabelId, BtnId} =
- init_toolbar_label(TId, TWidth, THeight, GWidth),
-
- PopUpFrame = gs:frame(TId, [{width, 80},
- {height, 20},
- {x, 0},
- {y, -30},
- {bg, {0, 0, 0}}
- ]),
-
- PopUpLabel = gs:label(PopUpFrame, [{width, 78},
- {height, 18},
- {bg, {255,255,190}},
- {x,1},
- {y,1},
- {align, center},
- {label, {text,""}},
- {font,{screen,12}}]),
-
- {EditorFrameId, EditorId} = init_toolbar_editor(DispId, TWidth, THeight),
-
- NewToolP#toolbar_params{parent_id = TId,
- row_col_label_id = RowColLblId,
- bg_label_id = BgLabelId,
- fg_label_id = FgLabelId,
- label_btn_id = BtnId,
- pop_up_frame_id = PopUpFrame,
- pop_up_label_id = PopUpLabel,
- editor_frame_id = EditorFrameId,
- editor_id = EditorId
- }.
-
-
-
-
-
-
-init_toolbar_btns(TId, ToolP) ->
- PicDir = code:priv_dir(tv),
-% PicDir = "../priv",
- % Toolbar btns are 25x25, the bitmaps are 20x20.
- create_one_toolbar_btn(TId, 1, PicDir ++ "/edit1.xbm",
- {toolbar, insert_object, "Edit Object"}),
- create_one_toolbar_btn(TId, 3, PicDir ++ "/search.xbm",
- {toolbar, search_object, "Search Object"}),
- create_one_toolbar_btn(TId, 5, PicDir ++ "/sort.xbm",
- {toolbar, sort_rising_order, "Sort Ascending"}),
- create_one_toolbar_btn(TId, 6, PicDir ++ "/no_sort.xbm",
- {toolbar, no_sorting,"No Sorting"}),
- create_one_toolbar_btn(TId, 7, PicDir ++ "/sort_reverse.xbm",
- {toolbar, sort_falling_order,"Sort Descending"}),
- create_one_toolbar_btn(TId, 9, PicDir ++ "/poll.xbm",
- {toolbar, poll_table,"Poll Table"}),
- create_one_toolbar_btn(TId, 11, PicDir ++ "/info.xbm",
- {toolbar, table_info,"Table Info"}),
- create_one_toolbar_btn(TId, 13, PicDir ++ "/help.xbm",
- {toolbar, help_button, "Help"}),
- ToolP.
-
-
-
-
-
-
-
-
-create_one_toolbar_btn(ParentId, N, Image, Data) ->
- BtnWidth = 25,
- BtnHeight = 25,
- StartXpos = 0,
- BtnXpos = StartXpos + ((N - 1) * BtnWidth),
- BtnYpos = 2,
- BgColor = ?DEFAULT_BG_COLOR,
- FgColor = {178,34,34}, % Firebrick
-
- gs:button(ParentId, [{width, BtnWidth},
- {height, BtnHeight},
- {x, BtnXpos},
- {y, BtnYpos},
- {enter, true},
- {leave, true},
- {label, {image, Image}},
- {data, Data},
- {fg, FgColor},
- {bg, BgColor}
- ]).
-
-
-
-
-
-resize_toolbar(FrameP, ToolP) ->
- #frame_params{toolbar_frame_width = TWidth,
- toolbar_frame_height = THeight,
- grid_frame_width = GWidth} = FrameP,
-
- #toolbar_params{bg_label_id = BgId,
- fg_label_id = FgId,
- row_col_label_id = RowColId,
- label_btn_id = BtnId,
- editor_frame_id = FrId,
- editor_id = EdId} = ToolP,
-
- resize_toolbar_label(BgId, FgId, RowColId, BtnId, TWidth, THeight, GWidth),
- resize_toolbar_editor(FrId, EdId, TWidth, THeight),
- ToolP.
-
-
-
-
-
-
-
-
-init_toolbar_label(ParentId, ParentWidth, ParentHeight, GWidth) ->
- {BgWidth, BgHeight, BgXpos, BgYpos, FgWidth, FgHeight, FgXpos, FgYpos, BtnWidth,
- BtnHeight, BtnXpos, BtnYpos} =
- get_toolbar_label_coords(ParentWidth, ParentHeight),
-
- BgId = gs:label(ParentId, [{width, BgWidth},
- {height, BgHeight},
- {x, BgXpos},
- {y, BgYpos},
- {bg, {0, 0, 0}},
- {fg, {0, 0, 0}}
- ]),
-
-
- RowColLblHeight = ?ROW_COL_LBL_HEIGHT,
- RowColLblWidth = GWidth - ?VBTN_WIDTH,
- RowColLblYpos = BgYpos + RowColLblHeight + 18,
-
- RowColLblId = gs:label(ParentId, [{width, RowColLblWidth},
- {height, RowColLblHeight},
- {x, ?VBTN_WIDTH},
- {y, RowColLblYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {178,34,34}},
- {align,center},
- {font,{screen,12}},
- {label, {text,""}}
- ]),
-
- FgId = gs:entry(editentry, ParentId, [{width, FgWidth},
- {height, FgHeight},
- {x, FgXpos},
- {y, FgYpos},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {bw, 1},
- {font,{screen,12}},
- {justify, left},
- {cursor, arrow},
- {setfocus, false},
- {enable, false},
- {keypress,true}
- ]),
-
- PicDir = code:priv_dir(tv),
- BtnId = gs:button(ParentId, [{width, BtnWidth},
- {height, BtnHeight},
- {x, BtnXpos},
- {y, BtnYpos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {label, {image, PicDir ++ "/more.xbm"}},
- {data, {labelbtn, pop_up}}
- ]),
-
- {RowColLblId, BgId, FgId, BtnId}.
-
-
-
-
-
-
-
-init_toolbar_editor(DispId, TWidth, THeight) ->
- {BgWidth, BgHeight, BgXpos, BgYpos, Width, Height, Xpos, Ypos} =
- get_toolbar_editor_coords(TWidth, THeight),
-
- EditorFrame = gs:frame(DispId, [{width, BgWidth},
- {height, BgHeight},
- {x, BgXpos},
- {y, BgYpos},
- {bg, {0, 0, 0}}
- ]),
-
- Editor = gs:editor(EditorFrame, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- {vscroll, right},
- {wrap, word},
- {bg, {255, 255, 255}},
- {fg, {0, 0, 0}},
- {enable, false}
- ]),
-
- {EditorFrame, Editor}.
-
-
-
-
-
-
-
-get_toolbar_editor_coords(TWidth, _THeight) ->
- BgWidth = TWidth,
- BgHeight = 200,
- BgXpos = 0,
- BgYpos = (-1) * BgHeight - 50,
- FgWidth = BgWidth - 2,
- FgHeight = BgHeight - 2,
- FgXpos = 1,
- FgYpos = 1,
-
- {BgWidth, BgHeight, BgXpos, BgYpos, FgWidth, FgHeight, FgXpos, FgYpos}.
-
-
-
-
-
-
-resize_toolbar_editor(FrId, EdId, TWidth, THeight) ->
- {BgWidth, BgHeight, _BgXpos, _BgYpos, FgWidth, FgHeight, _FgXpos, _FgYpos} =
- get_toolbar_editor_coords(TWidth, THeight),
- gs:config(FrId, [{width, BgWidth},
- {height, BgHeight}
- ]),
-
- gs:config(EdId, [{width, FgWidth},
- {height, FgHeight}
- ]).
-
-
-
-
-
-
-resize_toolbar_label(BgId, FgId, RowColId, BtnId, ParentWidth, ParentHeight, GWidth) ->
- {BgWidth, BgHeight, _BgXpos, _BgYpos, FgWidth, FgHeight, _FgXpos, _FgYpos, _BtnWidth,
- _BtnHeight, BtnXpos, BtnYpos} =
- get_toolbar_label_coords(ParentWidth, ParentHeight),
-
- gs:config(RowColId, [{width, GWidth - ?VBTN_WIDTH}]),
-
- gs:config(BgId, [{width, BgWidth},
- {height, BgHeight}
- ]),
-
- gs:config(BtnId, [{x, BtnXpos},
- {y, BtnYpos}
- ]),
-
- gs:config(FgId, [{width, FgWidth},
- {height, FgHeight}
- ]).
-
-
-
-
-
-get_toolbar_label_coords(ParentWidth, ParentHeight) ->
- BtnWidth = 19,
- BgWidth = ParentWidth,
- BgHeight = 26,
- BgXpos = 0,
- BgYpos = ParentHeight - BgHeight - 8 - ?ROW_COL_LBL_HEIGHT + 2,
- FgHeight = BgHeight - 2,
- FgWidth = BgWidth - BtnWidth - 3,
- FgXpos = BgXpos + 1,
- FgYpos = BgYpos + 1,
- BtnHeight = BgHeight - 2,
- BtnXpos = FgWidth + 2,
- BtnYpos = BgYpos + 1,
-
- {BgWidth, BgHeight, BgXpos, BgYpos, FgWidth, FgHeight, FgXpos, FgYpos, BtnWidth,
- BtnHeight, BtnXpos, BtnYpos}.
-
-
-
-
-
-
-send_to_rec_edit(undefined, _Msg) ->
- done;
-send_to_rec_edit(RecPid, Msg) ->
- RecPid ! Msg.
-
-
-
-
diff --git a/lib/tv/src/tv_pd_frames.erl b/lib/tv/src/tv_pd_frames.erl
deleted file mode 100644
index aab40e2bba..0000000000
--- a/lib/tv/src/tv_pd_frames.erl
+++ /dev/null
@@ -1,482 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pd_frames).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,frame,2}}]).
-
-
-
--export([create_display_frames/4, resize_display_frames/3]).
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_pd_int_def.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_display_frames(WindowId, WindowWidth, WindowHeight, FrameP) ->
- {DisplayId, DisplayWidth, DisplayHeight} =
- create_frame(WindowId,
- get_display_coords(WindowWidth, WindowHeight),
- ?DEFAULT_BG_COLOR,
- 0),
-
- {ToolbarId, ToolbarWidth, ToolbarHeight} = create_toolbar_frame(DisplayId,
- DisplayWidth),
-
- {SheetFrameId, SheetBgFrameId, SheetFrameWidth, SheetFrameHeight} =
- create_sheet_frames(DisplayId,
- DisplayWidth,
- DisplayHeight),
-
- {GridFrameId, GridBgFrameId, GridFrameWidth, GridFrameHeight} =
- create_grid_frames(SheetFrameId,
- SheetFrameWidth,
- SheetFrameHeight),
-
-
- FrameP#frame_params{display_id = DisplayId,
- toolbar_frame_id = ToolbarId,
- toolbar_frame_width = ToolbarWidth,
- toolbar_frame_height = ToolbarHeight,
- sheet_frame_id = SheetFrameId,
- sheet_frame_width = SheetFrameWidth,
- sheet_frame_height = SheetFrameHeight,
- sheet_bgframe_id = SheetBgFrameId,
- grid_frame_id = GridFrameId,
- grid_frame_width = GridFrameWidth,
- grid_frame_height = GridFrameHeight,
- grid_bgframe_id = GridBgFrameId
- }.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_display_frames(NewW, NewH, FrameP) ->
- #frame_params{display_id = DispId,
- toolbar_frame_id = ToolbarId,
- sheet_frame_id = SheetFgId,
- sheet_bgframe_id = SheetBgId,
- grid_frame_id = GridFgId,
- grid_bgframe_id = GridBgId} = FrameP,
-
- {NewDispW, NewDispH} = config_frame(DispId, get_display_coords(NewW, NewH)),
- {NewToolW, NewToolH} = resize_toolbar(ToolbarId, NewDispW),
- {NewSheetFgW, NewSheetFgH} = resize_sheet_frames(SheetFgId, SheetBgId, NewDispW,
- NewDispH),
-
- {NewGridFgW, NewGridFgH} = resize_grid_frames(GridFgId, GridBgId, NewSheetFgW,
- NewSheetFgH),
-
- FrameP#frame_params{toolbar_frame_width = NewToolW,
- toolbar_frame_height = NewToolH,
- sheet_frame_width = NewSheetFgW,
- sheet_frame_height = NewSheetFgH,
- grid_frame_width = NewGridFgW,
- grid_frame_height = NewGridFgH
- }.
-
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-config_frame(Id, {Width, Height, Xpos, Ypos}) ->
- gs:config(Id, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos}
- ]),
- {Width, Height}.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_frame(ParentId, {Width, Height, Xpos, Ypos}, Color, BorderWidth) ->
- Id = gs:frame(ParentId, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- {bw, BorderWidth},
- {bg, Color}
- ]),
- {Id, Width, Height}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_grid_frames(SheetFrameId, SheetFrameWidth, SheetFrameHeight) ->
- {BgId, _W, _H} =
- create_frame(SheetFrameId,
- get_grid_frame_coords(bg, SheetFrameWidth, SheetFrameHeight),
- ?BLACK,
- 0),
- {FgId, FgWidth, FgHeight} =
- create_frame(SheetFrameId,
- get_grid_frame_coords(fg, SheetFrameWidth, SheetFrameHeight),
- ?DEFAULT_BG_COLOR,
- 0),
- {FgId, BgId, FgWidth, FgHeight}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_sheet_frames(DispId, DispWidth, DispHeight) ->
- {BgId, _W, _H} = create_frame(DispId,
- get_sheet_frame_coords(bg, DispWidth, DispHeight),
- ?BLACK,
- 0),
- {FgId, FgWidth, FgHeight} =
- create_frame(DispId,
- get_sheet_frame_coords(fg, DispWidth, DispHeight),
- ?DEFAULT_BG_COLOR,
- 0),
- {FgId, BgId, FgWidth, FgHeight}.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_toolbar_frame(DispId, DispWidth) ->
- create_frame(DispId, get_toolbar_coords(DispWidth), ?DEFAULT_BG_COLOR, 0).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_display_coords(WindowWidth, WindowHeight) ->
- Xpos = 4,
- {WindowWidth - 2 * Xpos, WindowHeight - ?MENUBAR_HEIGHT - Xpos, Xpos, ?MENUBAR_HEIGHT}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_grid_frame_coords(bg, FrameWidth, FrameHeight) ->
- get_grid_frame_coords2(FrameWidth, FrameHeight, 0);
-get_grid_frame_coords(fg, FrameWidth, FrameHeight) ->
- get_grid_frame_coords2(FrameWidth, FrameHeight, 1).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_grid_frame_coords2(FrameWidth, FrameHeight, BorderWidth) ->
- Xpos = 0,
- Ypos = 0,
- Width = FrameWidth - ?VSCALE_WIDTH - Xpos - BorderWidth,
- Height = FrameHeight - ?HSCALE_HEIGHT - Ypos - BorderWidth,
- {Width, Height, Xpos, Ypos}.
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_sheet_frame_coords(bg, FrameWidth, FrameHeight) ->
- get_sheet_frame_coords2(FrameWidth, FrameHeight, 0);
-get_sheet_frame_coords(fg, FrameWidth, FrameHeight) ->
- get_sheet_frame_coords2(FrameWidth, FrameHeight, 1).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_sheet_frame_coords2(FrameWidth, FrameHeight, BorderWidth) ->
- Xpos = BorderWidth,
- Ypos = ?TOOLBAR_HEIGHT + BorderWidth,
- Width = FrameWidth - 2 * BorderWidth,
- Height = FrameHeight - Ypos - ?MISC_AREA_HEIGHT - BorderWidth,
- {Width, Height, Xpos, Ypos}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_toolbar_coords(DispWidth) ->
- Xpos = 0,
- {DispWidth - 2 * Xpos, ?TOOLBAR_HEIGHT, Xpos, 0}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_grid_frames(FgId, BgId, ParentWidth, ParentHeight) ->
- config_frame(BgId, get_grid_frame_coords(bg, ParentWidth, ParentHeight)),
- config_frame(FgId, get_grid_frame_coords(fg, ParentWidth, ParentHeight)).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_sheet_frames(FgId, BgId, ParentWidth, ParentHeight) ->
- config_frame(BgId, get_sheet_frame_coords(bg, ParentWidth, ParentHeight)),
- config_frame(FgId, get_sheet_frame_coords(fg, ParentWidth, ParentHeight)).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_toolbar(Id, DispWidth) ->
- config_frame(Id, get_toolbar_coords(DispWidth)).
-
-
-
diff --git a/lib/tv/src/tv_pd_int_def.hrl b/lib/tv/src/tv_pd_int_def.hrl
deleted file mode 100644
index 2c76bef892..0000000000
--- a/lib/tv/src/tv_pd_int_def.hrl
+++ /dev/null
@@ -1,139 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Internal definitions for the pd part of the table tool.
-%%%
-%%%*********************************************************************
-
--define(SCALE_FUNC_FILE, tv_pd_scale).
--define(DISP_FUNC_FILE, tv_pd_display).
-
-
--define(SCALE_WIDTH, 75).
--define(VSCALE_WIDTH, 75).
--define(HSCALE_HEIGHT, 75).
--define(MENUBAR_HEIGHT, 30).
--define(TOOLBAR_HEIGHT, 84). %% 97
--define(DISPLAY_HEIGHT, 849).
--define(MISC_AREA_HEIGHT, 0).
--define(GRID_HEIGHT, 849).
--define(NOF_GRIDROWS, 35). %% 29
--define(NOF_GRIDCOLS, 10).
--define(DEFAULT_COLWIDTH, 100).
--define(ROW_HEIGHT, 20). %% 24
--define(VBTN_WIDTH, 55). %% 18
--define(HBTN_HEIGHT, 20).
--define(RESBTN_WIDTH, 5).
--define(DEFAULT_GRID_BGCOLOR, {255,255,255}).
--define(DEFAULT_GRID_FGCOLOR, {0,0,0}).
--define(GRID_MARK_COLOR, {0,255,255}).
--define(GRID_FONT, {courier,12}).
-
--define(ROW_COL_LBL_WIDTH, 140).
--define(ROW_COL_LBL_HEIGHT, 14).
-
-
-
--define(KEY_MARK_AREA_HEIGHT, 21).
-
-
--define(DEFAULT_BG_COLOR, {217,217,217}).
--define(DEFAULT_ROW_COLOR, {178,34,34}). % Firebrick!
--define(DEFAULT_GRID_COLOR, {0,0,0}).
--define(LIGHT_GRAY, {226,226,226}).
--define(DARK_VIOLET, {148,0,211}).
--define(FIREBRICK, {178,34,34}).
--define(ANTIQUE_WHITE, {255,255,235}).
-
-
--record(frame_params, {display_id,
- toolbar_frame_id,
- toolbar_frame_width,
- toolbar_frame_height,
- sheet_frame_id,
- sheet_frame_width,
- sheet_frame_height,
- sheet_bgframe_id,
- grid_frame_id,
- grid_frame_width,
- grid_frame_height,
- grid_bgframe_id
- }).
-
-
-
-
--record(scale_params, {vscale_id,
- vscale_pos = 0,
- hscale_id,
- hscale_pos = 0
- }).
-
-
-
-
--record(mark_params, {cell_id,
- cell_col_no, % Virtual number!
- row_no, % Real number!
- virtual_row_no,
- col_no, % Virtual number!
- sort_col_no,
- marked_object,
- marked_color
- }).
-
-
-
--record(toolbar_params, {parent_id,
- row_col_label_id,
- bg_label_id,
- fg_label_id,
- label_btn_id,
- pop_up_frame_id,
- pop_up_label_id,
- editor_frame_id,
- editor_id
- }).
-
-
--record(process_variables, {master_pid,
- pg_pid,
- pb_pid,
- rec_pid,
- window_id,
- window_width,
- window_height,
- initialising = true,
- table_type,
- table_name,
- record_name,
- writable = false,
- lists_as_strings = true,
- sorting_on = false,
- first_col_shown = 1,
- first_row_shown = 1,
- nof_rows_shown,
- cols_shown = [],
- data_list = [],
- color_list = [],
- frame_params = #frame_params{},
- scale_params = #scale_params{},
- mark_params = #mark_params{},
- toolbar_params = #toolbar_params{}
- }).
diff --git a/lib/tv/src/tv_pd_int_msg.hrl b/lib/tv/src/tv_pd_int_msg.hrl
deleted file mode 100644
index faf23a9376..0000000000
--- a/lib/tv/src/tv_pd_int_msg.hrl
+++ /dev/null
@@ -1,433 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY PG
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_init_grid, {sender,
- parent_id,
- width,
- height,
- xpos,
- ypos,
- nof_rows,
- row_height
- }).
-
-
-
--record(pg_list_info, {sender,
- lists_as_strings}).
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_col_info, {sender,
- first_col_shown,
- width_of_cols_shown,
- nof_rows_shown
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_col_marked, {sender,
- virtual_col
- }).
-
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_row_marked, {sender,
- virtual_row
- }).
-
-
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pg_data, {sender,
- data,
- first_row_shown
- }).
-
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pg_cell_marked, {sender,
- cell_marked, % true or false
- real_col,
- real_row,
- virtual_col,
- virtual_row,
- cell_text
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pg_resize_grid, {sender,
- width,
- height
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pg_resize_grid_col, {sender,
- real_col_no,
- virtual_col_no,
- xdiff
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pg_horizontal_scroll, {sender,
- leftmost_virtual_col
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_ready, {sender}).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_remove_marks, {sender}).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_mark_col, {sender,
- virtual_col,
- real_col
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pg_mark_row, {sender,
- virtual_row,
- real_row
- }).
-
-
-
-
-
-
-%%%*********************************************************************
-%%% MESSAGES OWNED BY PB
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
--record(pb_init_btns, {sender,
- parent_id,
- parent_width,
- parent_height,
- ypos,
- hbtn_height,
- resbtn_width,
- vbtn_width,
- nof_rows,
- row_height,
- first_col_shown,
- cols_shown
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_remove_marks, {sender}).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_update_hbtns, {sender,
- parent_width,
- parent_height,
- first_col_shown,
- cols_shown
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_update_vbtns, {sender,
- color_list,
- first_row_shown,
- nof_rows_shown,
- blinking_enabled
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_key_info, {sender,
- list_of_keys
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_new_colwidth, {sender,
- real_col,
- virtual_col,
- xdiff
- }).
-
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_col_marked, {sender,
- col_marked, % 'true' or 'false'
- real_col,
- virtual_col
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_row_marked, {sender,
- row_marked, % 'true' or 'false'
- real_row,
- virtual_row
- }).
-
-
-
-
-%%======================================================================
-%% Message:
-%%
-%% Function:
-%%
-%% Data:
-%%======================================================================
-
-
--record(pb_set_sort_col, {sender,
- virtual_col
- }).
-
-
-
-
diff --git a/lib/tv/src/tv_pd_scale.erl b/lib/tv/src/tv_pd_scale.erl
deleted file mode 100644
index 04af2bb981..0000000000
--- a/lib/tv/src/tv_pd_scale.erl
+++ /dev/null
@@ -1,305 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Part of pd controlling the scale, i.e., the scrollbar
-%%% imitation.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pd_scale).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,scale,2}}]).
-
-
-
--export([init_scale/2,
- resize_scale/2,
- set_scale_range/3,
- set_scale_pos/3]).
-
-
-
--include("tv_int_def.hrl").
--include("tv_pd_int_def.hrl").
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init_scale(FrameP, ScaleP) ->
- #frame_params{sheet_frame_id = SheetFrameId,
- sheet_frame_width = SheetFrameWidth,
- sheet_frame_height = SheetFrameHeight,
- grid_frame_width = GridFrameWidth,
- grid_frame_height = GridFrameHeight} = FrameP,
-
- VScaleId = create_scale(vscale, SheetFrameId, SheetFrameWidth, GridFrameHeight),
- HScaleId = create_scale(hscale, SheetFrameId, GridFrameWidth, SheetFrameHeight),
-
- ScaleP#scale_params{vscale_id = VScaleId,
- vscale_pos = 0,
- hscale_id = HScaleId,
- hscale_pos = 0
- }.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_scale(FrameP, ScaleP) ->
- #frame_params{sheet_frame_width = SheetFrameWidth,
- sheet_frame_height = SheetFrameHeight,
- grid_frame_width = GridFrameWidth,
- grid_frame_height = GridFrameHeight} = FrameP,
-
- #scale_params{vscale_id = VScaleId,
- hscale_id = HScaleId} = ScaleP,
-
- config_scale(vscale, VScaleId, SheetFrameWidth, GridFrameHeight),
- config_scale(hscale, HScaleId, GridFrameWidth, SheetFrameHeight),
- ScaleP.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_scale_range(vscale, Range, ScaleP) ->
- {Lo, Hi} = Range,
- NewRange = if
- Lo > Hi ->
- {Hi, Hi};
- true ->
- Range
- end,
- VScaleId = ScaleP#scale_params.vscale_id,
- gs:config(VScaleId, [{range, NewRange}]);
-set_scale_range(hscale, Range, ScaleP) ->
- {Lo, Hi} = Range,
- NewRange = if
- Lo > Hi ->
- {Hi, Hi};
- true ->
- Range
- end,
- HScaleId = ScaleP#scale_params.hscale_id,
- gs:config(HScaleId, [{range, NewRange}]).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_scale_pos(_ScaleName, undefined, ScaleP) ->
- ScaleP;
-set_scale_pos(vscale, NewPos, ScaleP) ->
- ScaleId = ScaleP#scale_params.vscale_id,
- gs:config(ScaleId, [{pos, NewPos}]),
- ScaleP#scale_params{vscale_pos = NewPos};
-set_scale_pos(hscale, NewPos, ScaleP) ->
- ScaleId = ScaleP#scale_params.hscale_id,
- gs:config(ScaleId, [{pos, NewPos}]),
- ScaleP#scale_params{hscale_pos = NewPos}.
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-config_scale(ScaleName, ScaleId, FrameWidth, FrameHeight) ->
- {Width, Height, Xpos, Ypos} = get_scale_coords(ScaleName,
- FrameWidth,
- FrameHeight),
- gs:config(ScaleId, [{height, Height},
- {width, Width},
- {x, Xpos},
- {y, Ypos}
- ]).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_scale(ScaleName, FrameId, FrameWidth, FrameHeight) ->
- {Width, Height, Xpos, Ypos} = get_scale_coords(ScaleName,
- FrameWidth,
- FrameHeight),
- {Orientation, Range} = case ScaleName of
- vscale ->
- {vertical, {1, 1}};
- hscale ->
- {horizontal, {1, 1}}
- end,
- gs:scale(FrameId, [{data, ScaleName},
- {orient, Orientation},
- {buttonpress, true},
- {buttonrelease, true},
- {height, Height},
- {width, Width},
- {x, Xpos},
- {y, Ypos},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {range, Range}
- ]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_scale_coords(hscale, FrameWidth, FrameHeight) ->
- Height = ?HSCALE_HEIGHT,
- Xpos = ?VBTN_WIDTH - 3, % Subtracting 3 makes it look better!
- Ypos = FrameHeight - Height,
- Width = FrameWidth - Xpos + 5, % Adding 5 for better look!
- {Width, Height, Xpos, Ypos};
-get_scale_coords(vscale, FrameWidth, FrameHeight) ->
- Width = ?VSCALE_WIDTH,
- Xpos = (FrameWidth - Width),
- Ypos = ?HBTN_HEIGHT - 3, % Subtracting 3 makes it look better!
- Height = FrameHeight - Ypos + 5, % Adding 5 for better look!
- {Width, Height, Xpos, Ypos}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_pg.erl b/lib/tv/src/tv_pg.erl
deleted file mode 100644
index 7194cfb756..0000000000
--- a/lib/tv/src/tv_pg.erl
+++ /dev/null
@@ -1,430 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pg).
--compile([{nowarn_deprecated_function,{gs,config,2}}]).
-
-
-
--export([pg/1]).
-
-
--include("tv_int_def.hrl").
--include("tv_pg_int_def.hrl").
--include("tv_pd_int_msg.hrl").
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function: pg.
-%%
-%% Return Value: None.
-%%
-%% Description: Process controlling the grid part of the display.
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-pg(ParentPid) ->
- process_flag(trap_exit, true),
- ProcVars = #process_variables{parent_pid = ParentPid},
- loop(ProcVars).
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-%%======================================================================
-%% Function: loop.
-%%
-%% Return Value: None.
-%%
-%% Description: Eternal (well, almost) loop, receiving messages and
-%% handling them.
-%%
-%% Parameters:
-%%======================================================================
-
-
-
-loop(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
-
- #pg_data{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = update_grid_data(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_list_info{lists_as_strings=ListAsStr} ->
- NewProcVars = tv_pg_gridfcns:handle_list_info(ListAsStr, ProcVars),
- loop(NewProcVars);
-
- #pg_horizontal_scroll{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = scroll_grid_horizontally(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_remove_marks{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = tv_pg_gridfcns:remove_marks(ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_col_marked{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = mark_grid_col(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_row_marked{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = mark_grid_row(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_resize_grid_col{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = resize_grid_column(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_resize_grid{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = resize_grid(Msg, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
- #pg_init_grid{} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = init_grid(Msg, ProcVars),
- mark_nonbusy(GridId),
- PdPid = ProcVars#process_variables.parent_pid,
- PdPid ! #pg_ready{sender = self()},
- loop(NewProcVars);
-
- {gs, Id, Event, Data, Args} ->
- GridId = mark_busy(ProcVars),
- NewProcVars = gs_messages({Id, Event, Data, Args}, ProcVars),
- mark_nonbusy(GridId),
- loop(NewProcVars);
-
-
- {'EXIT', Pid, Reason} ->
- ParentPid = ProcVars#process_variables.parent_pid,
- exit_signals({Pid, Reason}, ParentPid, ProcVars),
- loop(ProcVars);
-
- _Other ->
- loop(ProcVars)
- end
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-exit_signals(ExitInfo, ParentPid, _ProcVars) ->
- case ExitInfo of
- {ParentPid, _Reason} ->
- exit(normal);
- _Other ->
- done
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-gs_messages(Msg, ProcVars) ->
-
- case Msg of
-
- {Id, buttonpress, {gridcell, RealCol, RealRow, _FrameId}, [1 | _]} ->
- NewProcVars = tv_pg_gridfcns:mark_cell_and_notify(Id, RealCol,
- RealRow, ProcVars),
- NewProcVars;
-
-
- _OtherMessage ->
- ProcVars
-
- end.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init_grid(Msg, ProcVars) ->
- #pg_init_grid{parent_id = ParentId,
- width = Width,
- height = Height,
- xpos = Xpos,
- ypos = Ypos,
- nof_rows = NofRows,
- row_height = RowHeight} = Msg,
- tv_pg_gridfcns:init_grid(ParentId, Width, Height, Xpos, Ypos, NofRows,
- RowHeight, ProcVars).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_grid(Msg, ProcVars) ->
- #pg_resize_grid{width = Width,
- height = Height} = Msg,
- tv_pg_gridfcns:resize_grid(Width, Height, ProcVars).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_grid_column(Msg, ProcVars) ->
- #pg_resize_grid_col{real_col_no = RealCol,
- virtual_col_no = VirtualCol,
- xdiff = Xdiff} = Msg,
- tv_pg_gridfcns:resize_grid_column(RealCol, VirtualCol, Xdiff, ProcVars).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-scroll_grid_horizontally(Msg, ProcVars) ->
- FirstColShown = ?COMM_FUNC_FILE:max(1, Msg#pg_horizontal_scroll.leftmost_virtual_col),
- tv_pg_gridfcns:scroll_grid_horizontally(FirstColShown, ProcVars).
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_grid_data(Msg, ProcVars) ->
- #pg_data{data = Data,
- first_row_shown = FirstRowShown} = Msg,
- tv_pg_gridfcns:update_grid_data(Data, FirstRowShown, ProcVars).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_grid_col(Msg, ProcVars) ->
- #pg_col_marked{virtual_col = VirtualCol} = Msg,
- tv_pg_gridfcns:mark_col(VirtualCol, ProcVars).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_grid_row(Msg, ProcVars) ->
- #pg_row_marked{virtual_row = VirtualRow} = Msg,
- tv_pg_gridfcns:mark_row(VirtualRow, ProcVars).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_busy(ProcVars) ->
- GridP = ProcVars#process_variables.grid_params,
- GridId = GridP#grid_params.fg_frame,
- gs:config(GridId, [{cursor, busy}]),
- GridId.
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_nonbusy(GridId) ->
- gs:config(GridId, [{cursor, arrow}]).
-
diff --git a/lib/tv/src/tv_pg_gridfcns.erl b/lib/tv/src/tv_pg_gridfcns.erl
deleted file mode 100644
index d037b42294..0000000000
--- a/lib/tv/src/tv_pg_gridfcns.erl
+++ /dev/null
@@ -1,1918 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_pg_gridfcns).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,read,2}}]).
-
-
-
-
--export([init_grid/8,
- resize_grid/3,
- resize_grid_column/4,
- update_grid_data/3,
- scroll_grid_horizontally/2,
- mark_cell_and_notify/4,
- remove_marks/1,
- mark_col/2,
- mark_row/2,
- handle_list_info/2
- ]).
-
-
-
-
-
--include("tv_pd_int_msg.hrl").
--include("tv_pg_int_def.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init_grid(GridParentId, GridWidth,
- GridHeight, GridXpos, GridYpos, NofRows, RowHeight, ProcVars) ->
-
- % Get the size and ID of the grid-parent frame, i.e., the
- % grid-frame! Do not confuse the base-frames below with
- % the grid-frame!
-
- #process_variables{parent_pid = ParentPid,
- grid_params = GridP} = ProcVars,
-
- #grid_params{fg_color = GridFgColor,
- nof_cols = NofCols,
- col_width = DefaultColWidth,
- first_col_shown = FirstColShown,
- col_widths = ColWidths} = GridP,
-
- % Create the two frames the column frames are placed on!
- % These two frames defines the size of the grid.
- BgFrame = create_base_frame(GridParentId, GridWidth, GridHeight,
- GridXpos, GridYpos, GridFgColor),
- FgFrame = create_base_frame(BgFrame, GridWidth - 1, GridHeight - 1,
- 0, 0, GridFgColor),
-
- % Compute the the colwidths necessary to cover the grid.
- ColsShown = compute_cols_shown(FirstColShown, ColWidths, GridWidth, NofCols,
- DefaultColWidth),
- NofRowsShown = compute_rows_shown(GridHeight, RowHeight),
-
- % Tell parent about the width of columns shown!
- ParentPid ! #pg_col_info{sender = self(),
- first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown
- },
-
- NewNofCols = erlang:max(length(ColsShown), NofCols),
-
- % The GridColWidths list shall contain the current width of each frame.
- NewColWidths = update_col_widths(ColsShown, ColWidths, FirstColShown,
- DefaultColWidth),
-
- % Create column frames, one for each column, and rows (labels) on each frame.
- {FrameIdList, ColLabelList} = create_col_frames(NewNofCols, NofRows, RowHeight,
- FgFrame, GridP, [], []),
-
- % Get lists of label-ID's for each row. (When we created the column frames,
- % we got the id's of labels placed on each column, i.e., vertically.
- % However, most often we want the id's for one row, i.e., label id's
- % horisontally.)
- RowIdList = get_row_ids(NofRows, ColLabelList, []),
-
- % Update the grid_params record with the new values!
- NewGridP = GridP#grid_params{bg_frame = BgFrame,
- fg_frame = FgFrame,
- grid_width = GridWidth,
- grid_height = GridHeight,
- grid_xpos = GridXpos,
- grid_ypos = GridYpos,
- nof_cols = NewNofCols,
- col_widths = NewColWidths,
- cols_shown = ColsShown,
- nof_rows = NofRows,
- row_height = RowHeight,
- nof_rows_shown = NofRowsShown,
- col_frame_ids = FrameIdList,
- col_ids = ColLabelList,
- row_ids = RowIdList,
- row_data_list = lists:duplicate(NofRows, notext)
- },
-
- ProcVars#process_variables{grid_parent_id = GridParentId,
- grid_params = NewGridP}.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_grid(NewWidth, NewHeight, ProcVars) ->
- #process_variables{parent_pid = ParentPid,
- grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{bg_frame = BgFrame,
- fg_frame = FgFrame,
- nof_cols = NofCols,
- nof_rows = NofRows,
- col_width = DefaultColWidth,
- first_col_shown = FirstColShown,
- col_widths = ColWidths,
- row_height = RowHeight,
- col_frame_ids = ColFrameIds,
- col_ids = ColIds,
- row_ids = RowIds,
- bg_color = BgColor,
- fg_color = FgColor,
- row_data_list = RowDataList,
- lists_as_strings = ListAsStr} = GridP,
-
- gs:config(BgFrame, [{width, NewWidth},
- {height, NewHeight}
- ]),
- gs:config(FgFrame, [{width, NewWidth - 1},
- {height, NewHeight - 1}
- ]),
-
- ColsShown = compute_cols_shown(FirstColShown, ColWidths, NewWidth, NofCols,
- DefaultColWidth),
-
- NofRowsShown = compute_rows_shown(NewHeight, RowHeight),
-
-
- % Tell parent about the width of columns shown!
- ParentPid ! #pg_col_info{sender = self(),
- first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown
- },
-
- NewColWidths = update_col_widths(ColsShown, ColWidths, FirstColShown,
- DefaultColWidth),
-
- NofColsShown = length(ColsShown),
- {NewNofCols, NewColFrameIds, NewColIds, NewRowIds} =
- check_nof_cols(ColsShown, (NofColsShown - NofCols), ColFrameIds, ColIds,
- RowIds, NofRows, RowHeight, FgColor, BgColor ),
-
- clear_fields(safe_nthtail(NofColsShown, NewColIds),
- safe_nthtail(NofRowsShown, NewRowIds)),
-
- RowsToUpdate = lists:sublist(NewRowIds, NofRowsShown),
-
- refresh_visible_rows(RowsToUpdate, FirstColShown, NofColsShown, RowDataList, ListAsStr),
-
- NewGridP = GridP#grid_params{grid_width = NewWidth,
- grid_height = NewHeight,
- nof_cols = NewNofCols,
- nof_rows_shown = NofRowsShown,
- cols_shown = ColsShown,
- col_widths = NewColWidths,
- col_frame_ids = NewColFrameIds,
- col_ids = NewColIds,
- row_ids = NewRowIds
- },
-
- refresh_marks(NewGridP, MarkP),
-
- ProcVars#process_variables{grid_params = NewGridP}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_grid_column(RealCol, VirtualCol, Xdiff, ProcVars) ->
- #process_variables{parent_pid = ParentPid,
- grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{grid_width = GridWidth,
- first_col_shown = FirstColShown,
- nof_cols = NofCols,
- col_widths = ColWidths,
- col_frame_ids = ColFrameIds,
- col_ids = ColIds,
- col_width = DefaultColWidth,
- row_ids = RowIds,
- max_col_width = MaxColWidth,
- min_col_width = MinColWidth,
- nof_rows = NofRows,
- nof_rows_shown = NofRowsShown,
- row_height = RowHeight,
- bg_color = BgColor,
- fg_color = FgColor,
- row_data_list = RowDataList,
- lists_as_strings = ListAsStr} = GridP,
-
- % Get new width!
- Width = erlang:min(MaxColWidth, erlang:max((lists:nth(VirtualCol, ColWidths) + Xdiff),
- MinColWidth)),
-
- % Resize the column.
- NewWidthOfCol = resize_one_column(RealCol, Width, ColFrameIds, MaxColWidth,
- MinColWidth),
-
- % Update the ColWidths list.
- TempColWidths = lists:sublist(ColWidths, VirtualCol - 1) ++
- [NewWidthOfCol | safe_nthtail(VirtualCol, ColWidths)],
-
- % Check the other columns, whether a new column has to be created.
- ColsShown = compute_cols_shown(FirstColShown, TempColWidths, GridWidth,
- NofCols, DefaultColWidth),
-
- % Get the final ColWidths list, after all updates!
- NewColWidths = update_col_widths(ColsShown, TempColWidths, FirstColShown,
- DefaultColWidth),
-
- % Tell parent about the width of columns shown!
- ParentPid ! #pg_col_info{sender = self(),
- first_col_shown = FirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown
- },
-
- % Get the new number of columns (may have changed).
- NofColsShown = length(ColsShown),
- {NewNofCols, NewColFrameIds, NewColIds, NewRowIds} =
- check_nof_cols(ColsShown, (NofColsShown - NofCols), ColFrameIds, ColIds,
- RowIds, NofRows, RowHeight, FgColor, BgColor ),
-
- RowsToUpdate = lists:sublist(NewRowIds, NofRowsShown),
- refresh_visible_rows(RowsToUpdate, FirstColShown, NofColsShown, RowDataList, ListAsStr),
-
- NewGridP = GridP#grid_params{nof_cols = NewNofCols,
- cols_shown = ColsShown,
- col_widths = NewColWidths,
- col_frame_ids = NewColFrameIds,
- col_ids = NewColIds,
- row_ids = NewRowIds
- },
-
- refresh_marks(NewGridP, MarkP),
-
- ProcVars#process_variables{grid_params = NewGridP}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-handle_list_info(ListAsStr, ProcVars) ->
- #process_variables{grid_params = GridP} = ProcVars,
-
- #grid_params{first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown,
- row_data_list = RowDataList,
- row_ids = RowIds,
- lists_as_strings = OldListAsStr} = GridP,
-
- case ListAsStr of
- OldListAsStr ->
- ProcVars;
- _NewValue ->
- NofColsShown = length(ColsShown),
- RowsToUpdate = lists:sublist(RowIds, NofRowsShown),
- refresh_visible_rows(RowsToUpdate, FirstColShown, NofColsShown,
- RowDataList, ListAsStr),
- NewGridP = GridP#grid_params{lists_as_strings = ListAsStr},
- ProcVars#process_variables{grid_params = NewGridP}
- end.
-
-
-
-
-update_grid_data(Data, FirstRowShown, ProcVars) ->
- #process_variables{grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- nof_rows = NofRows,
- nof_rows_shown = NofRowsShown,
- row_ids = RowIds,
- lists_as_strings = ListAsStr} = GridP,
-
- NofColsShown = length(ColsShown),
- RowsToUpdate = lists:sublist(RowIds, NofRowsShown),
-
- NewMarkP = move_marks(FirstColShown, FirstRowShown, GridP, MarkP),
-
- update_visible_rows(RowsToUpdate, FirstColShown, NofColsShown, Data, ListAsStr),
- NewRowDataList = make_row_data_list(1, NofRows, Data),
-
- NewGridP = GridP#grid_params{first_row_shown = FirstRowShown,
- row_data_list = NewRowDataList},
-
- ProcVars#process_variables{grid_params = NewGridP,
- mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-scroll_grid_horizontally(NewFirstColShown, ProcVars) ->
- #process_variables{parent_pid = ParentPid,
- grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{grid_width = Width,
- nof_cols = NofCols,
- nof_rows = NofRows,
- nof_rows_shown = NofRowsShown,
- first_row_shown = FirstRowShown,
- col_width = DefaultColWidth,
- max_col_width = MaxColWidth,
- min_col_width = MinColWidth,
- col_widths = ColWidths,
- row_height = RowHeight,
- col_frame_ids = ColFrameIds,
- col_ids = ColIds,
- row_ids = RowIds,
- bg_color = BgColor,
- fg_color = FgColor,
- row_data_list = RowDataList,
- lists_as_strings = ListAsStr} = GridP,
-
- % Probably it is unnecessary to check whether any new columns shall be
- % created or not, but what the heck, we don't want to crash...
- ColsShown = compute_cols_shown(NewFirstColShown, ColWidths, Width, NofCols,
- DefaultColWidth),
- NofColsShown = length(ColsShown),
-
- ParentPid ! #pg_col_info{sender = self(),
- first_col_shown = NewFirstColShown,
- width_of_cols_shown = ColsShown,
- nof_rows_shown = NofRowsShown
- },
-
- NewMarkP = move_marks(NewFirstColShown, FirstRowShown, GridP, MarkP),
-
- NewColWidths = update_col_widths(ColsShown, ColWidths, NewFirstColShown,
- DefaultColWidth),
-
- {NewNofCols, NewColFrameIds, NewColIds, NewRowIds} =
- check_nof_cols(ColsShown, (NofColsShown - NofCols), ColFrameIds, ColIds,
- RowIds, NofRows, RowHeight, FgColor, BgColor ),
-
-
- RowsToUpdate = lists:sublist(NewRowIds, NofRowsShown),
- resize_all_grid_columns(1, ColsShown, NewColFrameIds, MaxColWidth, MinColWidth),
-
- refresh_visible_rows(RowsToUpdate, NewFirstColShown, NofColsShown, RowDataList, ListAsStr),
-
- % Clear fields currently not visible.
- clear_fields(safe_nthtail(NofColsShown, NewColIds),
- safe_nthtail(NofRowsShown, NewRowIds)),
-
-
- NewGridP = GridP#grid_params{nof_cols = NewNofCols,
- cols_shown = ColsShown,
- col_widths = NewColWidths,
- col_frame_ids = NewColFrameIds,
- col_ids = NewColIds,
- row_ids = NewRowIds,
- first_col_shown = NewFirstColShown
- },
-
- ProcVars#process_variables{grid_params = NewGridP,
- mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_row(VirtualRow, ProcVars) ->
- #process_variables{grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{first_row_shown = FirstRowShown,
- nof_rows_shown = NofRowsShown,
- row_ids = RowIds} = GridP,
-
- mark_row(VirtualRow, FirstRowShown, FirstRowShown + NofRowsShown - 1, RowIds,
- ?GRID_MARK_COLOR),
-
- NewMarkP = MarkP#mark_params{cell_id = undefined,
- virtual_col = undefined,
- virtual_row = VirtualRow
- },
-
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_col(VirtualCol, ProcVars) ->
- #process_variables{grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- col_ids = ColIds} = GridP,
-
- NofColsShown = length(ColsShown),
- mark_col(VirtualCol, FirstColShown, FirstColShown + NofColsShown - 1, ColIds,
- ?GRID_MARK_COLOR),
-
- NewMarkP = MarkP#mark_params{cell_id = undefined,
- virtual_col = VirtualCol,
- virtual_row = undefined
- },
-
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_cell_and_notify(CellId, RealCol, RealRow, ProcVars) ->
- #process_variables{parent_pid = ParentPid,
- grid_params = GridP,
- mark_params = MarkP} = ProcVars,
-
- #grid_params{first_col_shown = FirstColShown,
- first_row_shown = FirstRowShown} = GridP,
-
- OldCellId = MarkP#mark_params.cell_id,
-
- VirtualCol = FirstColShown + RealCol - 1,
- VirtualRow = FirstRowShown + RealRow - 1,
-
- %% Right now, when the table tool only is passive, i.e., we cannot edit
- %% the table content, we don't want to be able to mark empty cells.
-
- {text, CellText} = gs:read(CellId, label),
-
- CellMarked = case CellText of
- "" -> false;
- _AnyText when CellId=:=OldCellId -> false;
- _AnyText -> true
- end,
-
- remove_marks(ProcVars),
- update_marked_cells(CellId, OldCellId, CellMarked),
-
- notify_about_cell_marked(ParentPid, CellMarked, RealCol, RealRow,
- VirtualCol, VirtualRow, CellText),
-
- NewMarkP = case CellMarked of
- true ->
- MarkP#mark_params{cell_id = CellId,
- virtual_col = VirtualCol,
- virtual_row = VirtualRow
- };
- false ->
- MarkP#mark_params{cell_id = undefined,
- virtual_col = 0,
- virtual_row = undefined
- }
- end,
-
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-remove_marks(ProcVars) ->
- #process_variables{mark_params = MarkP,
- grid_params = GridP} = ProcVars,
-
- #grid_params{first_col_shown = FirstColShown,
- cols_shown = ColsShown,
- col_ids = ColIds,
- first_row_shown = FirstRowShown,
- nof_rows_shown = NofRowsShown,
- row_ids = RowIds} = GridP,
-
-
- #mark_params{cell_id = CellId,
- virtual_col = VirtualCol,
- virtual_row = VirtualRow} = MarkP,
-
- case {VirtualCol, VirtualRow} of
- {undefined, undefined} ->
- update_marked_cells(CellId, CellId, false);
- {_AnyCol, undefined} ->
- NofColsShown = length(ColsShown),
- unmark_col(VirtualCol, FirstColShown, FirstColShown + NofColsShown - 1,
- ColIds);
- {undefined, _AnyRow} ->
- unmark_row(VirtualRow, FirstRowShown, FirstRowShown + NofRowsShown - 1,
- RowIds);
- _Other ->
- update_marked_cells(CellId, CellId, false)
- end,
-
- NewMarkP = MarkP#mark_params{cell_id = undefined,
- virtual_col = 0,
- virtual_row = undefined
- },
- ProcVars#process_variables{mark_params = NewMarkP}.
-
-
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-move_marks(FirstCol, FirstRow, GridP, MarkP) ->
- #grid_params{first_col_shown = OldFirstCol,
- cols_shown = ColsShown,
- first_row_shown = OldFirstRow,
- nof_rows_shown = NofRowsShown,
- col_ids = ColIds,
- row_ids = RowIds} = GridP,
-
- #mark_params{virtual_col = VirtualCol,
- virtual_row = VirtualRow} = MarkP,
-
-
- case {VirtualCol, VirtualRow} of
- {undefined, undefined} ->
- NofColsShown = length(ColsShown),
- move_marked_cell(FirstCol, FirstRow, NofColsShown,
- NofRowsShown, RowIds, MarkP);
- {_AnyCol, undefined} ->
- NofColsShown = length(ColsShown),
- OldLastCol = OldFirstCol + NofColsShown - 1,
- LastCol = FirstCol + NofColsShown - 1,
- move_marked_col(VirtualCol, OldFirstCol, OldLastCol,
- FirstCol, LastCol, ColIds, MarkP);
- {undefined, _AnyRow} ->
- OldLastRow = OldFirstRow + NofRowsShown - 1,
- LastRow = FirstRow + NofRowsShown - 1,
- move_marked_row(VirtualRow, OldFirstRow, OldLastRow,
- FirstRow, LastRow, RowIds, MarkP);
- {_CellCol, _CellRow} ->
- NofColsShown = length(ColsShown),
- move_marked_cell(FirstCol, FirstRow, NofColsShown,
- NofRowsShown, RowIds, MarkP)
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-refresh_marks(GridP, MarkP) ->
- #grid_params{first_col_shown = FirstCol,
- cols_shown = ColsShown,
- first_row_shown = FirstRow,
- nof_rows_shown = NofRowsShown,
- col_ids = ColIds,
- row_ids = RowIds} = GridP,
-
- #mark_params{virtual_col = VirtualCol,
- virtual_row = VirtualRow} = MarkP,
-
-
- case {VirtualCol, VirtualRow} of
- {undefined, undefined} ->
- NofColsShown = length(ColsShown),
- move_marked_cell(FirstCol, FirstRow, NofColsShown, NofRowsShown,
- RowIds, MarkP);
- {_AnyCol, undefined} ->
- NofColsShown = length(ColsShown),
- LastCol = FirstCol + NofColsShown - 1,
- mark_col(VirtualCol, FirstCol, LastCol, ColIds, ?GRID_MARK_COLOR);
- {undefined, _AnyRow} ->
- LastRow = FirstRow + NofRowsShown - 1,
- mark_row(VirtualRow, FirstRow, LastRow, RowIds, ?GRID_MARK_COLOR);
- {_CellCol, _CellRow} ->
- NofColsShown = length(ColsShown),
- move_marked_cell(FirstCol, FirstRow, NofColsShown, NofRowsShown,
- RowIds, MarkP)
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-move_marked_col(VirtualCol,
- OldFirstCol, OldLastCol, FirstCol, LastCol, ColIds, MarkP) ->
- unmark_col(VirtualCol, OldFirstCol, OldLastCol, ColIds),
- mark_col(VirtualCol, FirstCol, LastCol, ColIds, ?GRID_MARK_COLOR),
- MarkP#mark_params{cell_id = undefined}.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_col(VirtualCol, FirstCol, _LastCol, _ColIds, _Color) when VirtualCol < FirstCol ->
- done;
-mark_col(VirtualCol, _FirstCol, LastCol, _ColIds, _Color) when VirtualCol > LastCol ->
- done;
-mark_col(VirtualCol, FirstCol, _LastCol, ColIds, Color) ->
- RealCol = VirtualCol - FirstCol + 1,
- MarkedColIds = lists:nth(RealCol, ColIds),
- mark_all_cells(MarkedColIds, Color).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-unmark_col(VirtualCol, FirstCol, LastCol, ColIds) ->
- mark_col(VirtualCol, FirstCol, LastCol, ColIds, ?DEFAULT_GRID_BGCOLOR).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_all_cells([], _Color) ->
- done;
-mark_all_cells([CellId | T], Color) ->
- gs:config(CellId, [{bg, Color}]),
- mark_all_cells(T, Color).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-mark_row(VirtualRow, FirstRow, _LastRow, _RowIds, _Color) when VirtualRow < FirstRow ->
- done;
-mark_row(VirtualRow, _FirstRow, LastRow, _RowIds, _Color) when VirtualRow > LastRow ->
- done;
-mark_row(VirtualRow, FirstRow, _LastRow, RowIds, Color) ->
- RealRow = VirtualRow - FirstRow + 1,
- MarkedRowIds = lists:nth(RealRow, RowIds),
- mark_all_cells(MarkedRowIds, Color).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-unmark_row(VirtualRow, FirstRow, LastRow, RowIds) ->
- mark_row(VirtualRow, FirstRow, LastRow, RowIds, ?DEFAULT_GRID_BGCOLOR).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-move_marked_row(VirtualRow,
- OldFirstRow, OldLastRow, FirstRow, LastRow, RowIds, MarkP) ->
- unmark_row(VirtualRow, OldFirstRow, OldLastRow, RowIds),
- mark_row(VirtualRow, FirstRow, LastRow, RowIds, ?GRID_MARK_COLOR),
- MarkP#mark_params{cell_id = undefined}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-move_marked_cell(FirstColShown,
- FirstRowShown, NofColsShown, NofRowsShown, RowIds, MarkP) ->
- #mark_params{cell_id = OldCellId,
- virtual_col = VirtualCol,
- virtual_row = VirtualRow} = MarkP,
-
- case OldCellId of
- undefined ->
- MarkP;
- _OtherId ->
- NewRealCol = VirtualCol - FirstColShown + 1,
- NewRealRow = VirtualRow - FirstRowShown + 1,
- update_marked_cells(undefined, OldCellId, false),
- case check_if_new_mark_visible(NewRealCol, NewRealRow,
- NofColsShown, NofRowsShown) of
- false ->
- MarkP;
- true ->
- NewCellId = lists:nth(NewRealCol,
- lists:nth(NewRealRow, RowIds)),
- update_marked_cells(NewCellId, undefined, true),
- MarkP#mark_params{cell_id = NewCellId}
- end
- end.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-check_if_new_mark_visible(Col, _Row, NofCols, _NofRows) when Col > NofCols ->
- false;
-check_if_new_mark_visible(Col, _Row, _NofCols, _NofRows) when Col =< 0 ->
- false;
-check_if_new_mark_visible(_Col, Row, _NofCols, NofRows) when Row > NofRows ->
- false;
-check_if_new_mark_visible(_Col, Row, _NofCols, _NofRows) when Row =< 0 ->
- false;
-check_if_new_mark_visible(_Col, _Row, _NofCols, _NofRows) ->
- true.
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_marked_cells(CellId, OldCellId, _MarkedCell) when CellId =:= OldCellId ->
- gs:config(CellId, [{bg, ?DEFAULT_GRID_BGCOLOR}]);
-update_marked_cells(_CellId, undefined, false) ->
- done;
-update_marked_cells(CellId, undefined, true) ->
- gs:config(CellId, [{bg, ?GRID_MARK_COLOR}]);
-update_marked_cells(CellId, OldCellId, true) ->
- gs:config(OldCellId, [{bg, ?DEFAULT_GRID_BGCOLOR}]),
- gs:config(CellId, [{bg, ?GRID_MARK_COLOR}]);
-update_marked_cells(_CellId, OldCellId, false) ->
- gs:config(OldCellId, [{bg, ?DEFAULT_GRID_BGCOLOR}]).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-notify_about_cell_marked(Pid, Marked, RealCol, RealRow, VirtCol, VirtRow, Text) ->
- Pid ! #pg_cell_marked{sender = self(),
- cell_marked = Marked,
- real_col = RealCol,
- real_row = RealRow,
- virtual_col = VirtCol,
- virtual_row = VirtRow,
- cell_text = Text
- }.
-
-
-
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% START of functions used to print data in the grid fields.
-%%%---------------------------------------------------------------------
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-refresh_visible_rows([], _FirstColShown, _NofColsShown, _DataList, _ListAsStr) ->
- done;
-refresh_visible_rows(RowIds, _FirstColShown, _NofColsShown, [], _ListAsStr) ->
- clear_cols_or_rows(RowIds);
-refresh_visible_rows([OneRowIds | RemRowIds], FirstColShown, NofColsShown,
- [DataItemList | RemDataItemLists], ListAsStr) ->
- NewDataItemList = get_data_sublist(DataItemList, FirstColShown, NofColsShown),
- update_one_row(lists:sublist(OneRowIds, NofColsShown), NewDataItemList, ListAsStr),
- refresh_visible_rows(RemRowIds, FirstColShown, NofColsShown, RemDataItemLists, ListAsStr).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_visible_rows([], _FirstColShown, _NofColsShown, _DataList, _ListAsStr) ->
- done;
-update_visible_rows(RowIds, _FirstColShown, _NofColsShown, [], _ListAsStr) ->
- clear_cols_or_rows(RowIds);
-update_visible_rows([OneRowIds | RemRowIds], FirstColShown, NofColsShown,
- [DataItem | RemData], ListAsStr) ->
- % We convert the received item to a list! This way we know that
- % '[notext]' shall be printed as 'notext', while 'notext' shall
- % be printed as ''.
- TempDataItemList = item_to_list(DataItem),
- DataItemList = get_data_sublist(TempDataItemList, FirstColShown,
- NofColsShown),
- update_one_row(lists:sublist(OneRowIds, NofColsShown), DataItemList, ListAsStr),
- update_visible_rows(RemRowIds, FirstColShown, NofColsShown, RemData, ListAsStr).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_one_row(OneRowIds, [], _ListAsStr) ->
- clear_one_col_or_row(OneRowIds);
-update_one_row([], _DataItemList, _ListAsStr) ->
- done;
-update_one_row([LabelId | RemLabelIds], [notext | T], ListAsStr) ->
- gs:config(LabelId, [{label, {text, ""}}
- ]),
- update_one_row(RemLabelIds, T, ListAsStr);
-update_one_row([LabelId | RemLabelIds], [DataElem | T], ListAsStr) ->
- Str = case ListAsStr of
- true ->
- tv_io_lib:format(" ~p", [DataElem]);
- false ->
- " " ++ lists:flatten(tv_io_lib:write(DataElem))
- end,
- gs:config(LabelId, [{label, {text, Str}}
- ]),
- update_one_row(RemLabelIds, T, ListAsStr).
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-make_row_data_list(N, NofRows, []) when N > NofRows ->
- [];
-make_row_data_list(N, NofRows, []) ->
- % If NofRows == N, we get the empty list here!
- lists:duplicate(NofRows- N, notext);
-make_row_data_list(N, NofRows, [_DataItem | _RemData]) when N > NofRows ->
- [];
-make_row_data_list(N, NofRows, [DataItem | RemData]) ->
- % We convert the received item to a list! This way we know that
- % '[notext]' shall be printed as 'notext', while 'notext' shall
- % be printed as ''.
- [item_to_list(DataItem) | make_row_data_list(N + 1, NofRows, RemData)].
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-item_to_list(Item) when is_tuple(Item) ->
- tuple_to_list(Item);
-item_to_list(Item) ->
- [Item].
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_data_sublist(DataList, StartPos, Length) ->
- case catch lists:sublist(DataList, StartPos, Length) of
- {'EXIT', _Reason} ->
- [];
- Sublist ->
- Sublist
- end.
-
-
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% END of functions used to print data in the grid fields.
-%%%---------------------------------------------------------------------
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% START of functions used to resize the grid columns.
-%%%---------------------------------------------------------------------
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_all_grid_columns(_RealCol, [], _ColFrameIds, _MaxColWidth, _MinColWidth) ->
- done;
-resize_all_grid_columns(RealCol, [ColWidth | Tail], ColFrameIds, MaxColWidth, MinColWidth) ->
-
- resize_one_column(RealCol, ColWidth, ColFrameIds, MaxColWidth, MinColWidth),
- resize_all_grid_columns(RealCol + 1, Tail, ColFrameIds, MaxColWidth,
- MinColWidth).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-resize_one_column(RealCol, Width, ColFrameIds, MaxW, MinW) ->
- NewWidthOfCol = erlang:min(MaxW, erlang:max(Width, MinW)),
- case length(ColFrameIds) of
- RealCol ->
- done;
- _Other ->
- FrameId = lists:nth(RealCol + 1, ColFrameIds),
- gs:config(FrameId, [{x, NewWidthOfCol + 1}])
- end,
- NewWidthOfCol.
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% END of functions used to resize the grid columns.
-%%%---------------------------------------------------------------------
-
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% START of functions used to update the grid.
-%%%---------------------------------------------------------------------
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-clear_fields(ColIds, RowIds) ->
- clear_cols_or_rows(ColIds),
- clear_cols_or_rows(RowIds).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-clear_cols_or_rows([]) ->
- done;
-clear_cols_or_rows([IdList | RemIdLists]) ->
- clear_one_col_or_row(IdList),
- clear_cols_or_rows(RemIdLists).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-clear_one_col_or_row([]) ->
- done;
-clear_one_col_or_row([LabelId | RemLabelIds]) ->
- gs:config(LabelId, [{label, {text, ""}}
- ]),
- clear_one_col_or_row(RemLabelIds).
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% END of functions used to update the grid.
-%%%---------------------------------------------------------------------
-
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% START of functions used to compute the part of the grid that has to
-%%% be updated, as well as deciding whether a new column has to be added.
-%%% Old columns (i.e., columns not visible) are not removed, but they
-%%% shall not be updated until they once again becomes visible.
-%%%---------------------------------------------------------------------
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-check_nof_cols(_ColsShown, NofNewCols, ColFrameIds, ColIds, RowIds,
- _NofRows, _RowHeight, _FgColor, _BgColor) when NofNewCols =< 0 ->
- {length(ColFrameIds), ColFrameIds, ColIds, RowIds};
-check_nof_cols(ColsShown, NofNewCols, ColFrameIds, ColIds,
- RowIds, NofRows, RowHeight, FgColor, BgColor) ->
- NewColNo = length(ColFrameIds) + 1,
- % We don't care about the pathological case where no columns have been
- % created. If the gridwidth, or the columnwidth, was set to =< 0 during
- % initialisation, then no columns will have been created. The program
- % will probably also have crashed. If any smart jackass has set invalid
- % values on these important parameters, then he can only blame himself.
- ParentId = lists:nth((NewColNo - 1), ColFrameIds),
- ParentColWidth = lists:nth((NewColNo - 1), ColsShown),
- Xpos = ParentColWidth + 1,
-
- {ColFrameId, LabelIds} = add_one_col_frame(ParentId, NewColNo, Xpos, FgColor,
- BgColor, NofRows, RowHeight),
-
- NewColFrameIds = ColFrameIds ++ [ColFrameId],
- NewColIds = ColIds ++ [LabelIds],
- NewRowIds = update_row_ids(RowIds, LabelIds),
-
- check_nof_cols(ColsShown, NofNewCols - 1, NewColFrameIds, NewColIds, NewRowIds,
- NofRows, RowHeight, FgColor, BgColor).
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_row_ids([], _LabelIds) ->
- [];
-update_row_ids([OneRowIds | RemainingRows], [NewElemId | RemainingElemIds]) ->
- [OneRowIds ++ [NewElemId] | update_row_ids(RemainingRows, RemainingElemIds)].
-
-
-
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-update_col_widths(ColsShown, ColWidths, FirstColShown, DefaultColWidth) ->
- % What we do here is that we first (if necessary) add default
- % column widths to the ColWidth list until it reaches to where
- % ColsShown starts (vitually seen).
- % In the second step we take the appropriate elements from the
- % ColsShown list and add them to the ColWidths list, until it is
- % of sufficient length.
- % Of course this may seem unnecessary - it would suffice to just
- % add default widths to the ColWidths list until it is long enough,
- % since the compute_cols_shown function right now just adds default
- % width columns to the ColsShown list, when the ColWidths list is empty.
- % However, this could change (maybe we some other time want the last
- % column to carry all remaining width, instead of adding new columns).
- % Besides, we don't like hidden dependencies between functions!!!
-
- NofColsShown = length(ColsShown),
- NewColWidths = set_necessary_col_widths_length(FirstColShown, ColWidths,
- DefaultColWidth),
- % Now NofVirtualCols will always be equal to, or greater
- % than, FirstColShown - 1.
-
- NofVirtualCols = length(NewColWidths),
- NecessaryNofVirtualCols = FirstColShown + (NofColsShown - 1),
- if
- NecessaryNofVirtualCols > NofVirtualCols ->
- TailNo = NofVirtualCols - FirstColShown + 1, % Always >= 0 !!!
- NewColWidths ++ safe_nthtail(TailNo, ColsShown);
- true ->
- NewColWidths
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-set_necessary_col_widths_length(FirstColShown, ColWidths, DefaultColWidth) ->
- % First check that (length(ColWidths) - FirstColShown) >= -1.
- % If not, add elements so the relation holds true!
- MissingDefaultWidthElems = FirstColShown - length(ColWidths),
- if
- MissingDefaultWidthElems > 1 ->
- ColWidths ++ lists:duplicate(MissingDefaultWidthElems - 1,
- DefaultColWidth);
- true ->
- ColWidths
- end.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-compute_rows_shown(GridHeight, RowHeight) ->
- (GridHeight div RowHeight) + 1.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-compute_cols_shown(FirstColShown, ColWidths, GridWidth, _NofCols, DefaultColWidth) ->
- ColWidthsLength = length(ColWidths),
- % Normally ColWidths shall be long enough, but just to make sure...
- % (We could have chosen to update ColWidths here to, but right now
- % we do it instead explicitly when resizeing the grid, changing the
- % column size(s), and scrolling horizontally.)
- UsedColWidths = if
- ColWidthsLength < FirstColShown ->
- [];
- true ->
- safe_nthtail(FirstColShown - 1, ColWidths)
- end,
- compute_cols_shown(UsedColWidths, GridWidth, DefaultColWidth).
-
-
-
-
-
-
-compute_cols_shown(_ColWidths, RemainingWidth, _DefColW) when RemainingWidth =< 0 ->
- [];
-compute_cols_shown([], RemainingWidth, DefaultColWidth) ->
- [DefaultColWidth | compute_cols_shown([], RemainingWidth - DefaultColWidth,
- DefaultColWidth)];
-compute_cols_shown([VirtualColWidth | T], RemainingWidth, DefaultColWidth) ->
- [VirtualColWidth | compute_cols_shown(T, RemainingWidth - VirtualColWidth,
- DefaultColWidth)].
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% END of functions used to compute the part of the grid that has to
-%%% be updated, as well as deciding whether a new column has to be added.
-%%%---------------------------------------------------------------------
-
-
-
-
-
-
-
-%%%---------------------------------------------------------------------
-%%% START of functions used to create the grid (baseframes, columns
-%%% and rows), as well as sorting the ID's appropriately.
-%%%---------------------------------------------------------------------
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_base_frame(ParentId, Width, Height, Xpos, Ypos, BgColor) ->
- gs:frame(ParentId, [{width, Width},
- {height, Height},
- {x, Xpos},
- {y, Ypos},
- {bg, BgColor}
- ]).
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_col_frames(0, _NofRows, _RowHeight, _ParentId, _GridP, ColFrameAcc, LabelAcc) ->
- {lists:reverse(ColFrameAcc), lists:reverse(LabelAcc)};
-create_col_frames(N, NofRows, RowHeight, ParentId, GridP, ColFrameAcc, LabelAcc) ->
- % Yes, it *IS* inefficient to copy GridP for each loop.
- % However, it is only done once, and for a limited number of times,
- % and we avoid having a lot of parameters!
- #grid_params{bg_color = BgColor,
- fg_color = FgColor,
- nof_cols = NofCols,
- col_width = ColWidth} = GridP,
- Xpos = if
- N =:= NofCols ->
- 0;
- true ->
- ColWidth + 1
- end,
-
- ColNo = NofCols - N + 1,
- {ColFrameId, LabelIds} = add_one_col_frame(ParentId, ColNo, Xpos, FgColor,
- BgColor, NofRows, RowHeight),
- create_col_frames(N - 1, NofRows, RowHeight, ColFrameId, GridP,
- [ColFrameId | ColFrameAcc], [LabelIds | LabelAcc]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-add_one_col_frame(ParentId, ColNo, Xpos, FgColor, BgColor, NofRows, RowHeight) ->
- ColFrameId = create_one_col_frame(ParentId, Xpos, FgColor),
- FirstRowYpos = 1,
- FirstRowNo = 1,
- LabelIds = create_rows_on_frame(ColFrameId, FirstRowNo, NofRows, RowHeight,
- FirstRowYpos, FgColor, BgColor, ColNo, []),
- {ColFrameId, LabelIds}.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_one_col_frame(ParentId, Xpos, BgColor) ->
- ColFrameWidth = 1200,
- ColFrameHeight = 900,
- Ypos = 0,
- gs:frame(ParentId, [{width, ColFrameWidth},
- {height, ColFrameHeight},
- {x, Xpos},
- {y, Ypos},
- {bg, BgColor}
- ]).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-create_rows_on_frame(_FrameId, RowNo, NofRows, _H, _Y, _Fg, _Bg, _ColNo, Acc) when RowNo > NofRows ->
- lists:reverse(Acc);
-create_rows_on_frame(FrameId, RowNo, NofRows, H, Y, Fg, Bg, ColNo, RAcc) ->
- Width = 1200,
- R = gs:label(FrameId, [{width, Width},
- {height, H},
- {x, 1},
- {y, Y},
- {bg, Bg},
- {fg, Fg},
- {align, w},
- {buttonpress, true},
- {data, {gridcell, ColNo, RowNo, FrameId}}
- ]),
- NextRowNo = RowNo + 1,
- NextY = Y + H +1,
- create_rows_on_frame(FrameId, NextRowNo, NofRows, H, NextY, Fg, Bg, ColNo,
- [R | RAcc]).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-get_row_ids(0, _Cols, RowAcc) ->
- RowAcc;
-get_row_ids(RowNo, Cols, RowAcc) ->
- Row = extract_ids_for_one_row(RowNo, Cols),
- get_row_ids(RowNo - 1, Cols, [Row | RowAcc]).
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-extract_ids_for_one_row(_N, []) ->
- [];
-extract_ids_for_one_row(N, [ColIds | Tail]) ->
- [lists:nth(N, ColIds) | extract_ids_for_one_row(N, Tail)].
-
-
-
-%%%---------------------------------------------------------------------
-%%% END of functions used to create the grid.
-%%%---------------------------------------------------------------------
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-safe_nthtail(_, []) -> [];
-safe_nthtail(1, [_|T]) -> T;
-safe_nthtail(N, [_|T]) when N > 1 ->
- safe_nthtail(N - 1, T);
-safe_nthtail(0, L) when is_list(L) -> L.
diff --git a/lib/tv/src/tv_pg_int_def.hrl b/lib/tv/src/tv_pg_int_def.hrl
deleted file mode 100644
index 6f88053d47..0000000000
--- a/lib/tv/src/tv_pg_int_def.hrl
+++ /dev/null
@@ -1,92 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Internal definitions for the pd part of the table tool.
-%%%
-%%%*********************************************************************
-
-
--define(GRIDFUNCS, tv_pg_gridfcns).
-
-
-
--define(DEFAULT_COLFRAME_HEIGHT, 870).
--define(DEFAULT_COLWIDTH, 100).
--define(DEFAULT_GRID_BGCOLOR, {255, 255, 255}). % white
--define(DEFAULT_GRID_FGCOLOR, {0, 0, 0}). % black
--define(GRID_MARK_COLOR, {200, 255, 255}).
--define(GRID_FONT, {courier, 12}).
-
-
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
--define(DEFAULT_ROW_COLOR, {178, 34, 34}). % Firebrick!
--define(DEFAULT_GRID_COLOR, {0, 0, 0}).
--define(LIGHT_GRAY, {226, 226, 226}).
--define(DARK_VIOLET, {148, 0, 211}).
--define(FIREBRICK, {178, 34, 34}).
--define(ANTIQUE_WHITE, {255, 255, 235}).
-
-
-
-
--record(grid_params, {bg_frame,
- fg_frame,
- grid_width,
- grid_height = ?DEFAULT_COLFRAME_HEIGHT, % Actual height,
- % not the height
- % shown!
- grid_xpos,
- grid_ypos,
- bg_color = ?DEFAULT_GRID_BGCOLOR,
- fg_color = ?DEFAULT_GRID_FGCOLOR,
- nof_cols = 10,
- nof_rows,
- nof_rows_shown,
- row_height,
- col_width = ?DEFAULT_COLWIDTH,
- first_col_shown = 1,
- first_row_shown = 1,
- max_col_width = 1200,
- min_col_width = 5,
- col_widths = [],
- cols_shown = [],
- col_frame_ids = [],
- col_ids = [],
- row_ids = [],
- row_data_list = [],
- current_max_value,
- lists_as_strings = true
- }).
-
-
-
--record(mark_params, {cell_id,
- virtual_col,
- virtual_row
- }).
-
-
-
-
--record(process_variables, {parent_pid,
- grid_parent_id,
- grid_params = #grid_params{},
- mark_params = #mark_params{}
- }).
diff --git a/lib/tv/src/tv_poll_dialog.erl b/lib/tv/src/tv_poll_dialog.erl
deleted file mode 100644
index e33d398898..0000000000
--- a/lib/tv/src/tv_poll_dialog.erl
+++ /dev/null
@@ -1,363 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Code for the "set poll interval" dialog with the user.
-%%%
-%%%*********************************************************************
-
--module(tv_poll_dialog).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,radiobutton,2}},
- {nowarn_deprecated_function,{gs,scale,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,2}}]).
-
-
--export([start/1, init/2]).
-
-
-
--include("tv_int_msg.hrl").
-
-
-
--define(WINDOW_WIDTH, 305).
--define(WINDOW_HEIGHT, 185).
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-start(Pos) ->
- Pid = self(),
- ProcPid = spawn_link(?MODULE, init, [Pid, Pos]),
- receive_answer(ProcPid).
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-init(Pid, Pos) ->
- process_flag(trap_exit, true),
- {ScalePos, ScaleRange, Poll, Color} = case Pos of
- infinity ->
- {0, {20, 20}, false, {255, 255, 255}};
- _Other ->
- {Pos, {20, 300}, true, {0, 0, 0}}
- end,
- S = gs:start(),
- Win = gs:window(S, [{width, ?WINDOW_WIDTH},
- {height, ?WINDOW_HEIGHT},
- {bg, ?DEFAULT_BG_COLOR},
- {title, "[TV] Set Poll Interval"},
- {configure, true},
- {destroy, true}
- ]),
-
- NoPollBtn = gs:radiobutton(Win, [{height, 30},
- {width, 143},
- {x, 10},
- {y, 10},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {value, no_poll},
- {label, {text, "Manual Polling"}},
- {select, not(Poll)}
- ]),
-
- PollBtn = gs:radiobutton(Win, [{height, 30},
- {width, 163},
- {x, 10},
- {y, 60},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {value, poll},
- {label, {text, "Automatic Polling"}},
- {select, Poll}
- ]),
-
- Lbl = gs:label(Win, [{label, {text, "Poll Interval (seconds):"}},
- {align, center},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, Color},
- {width, 183},
- {height, 30},
- {x, 10},
- {y, 100}
- ]),
-
- Scale = gs:scale(Win, [{bg, ?DEFAULT_BG_COLOR},
- {fg, Color},
- {orient, horizontal},
- {range, ScaleRange},
- {pos, ScalePos},
- {width, 285},
- {height, 50},
- {x, 10},
- {y, 130}
- ]),
-
- OkBtn = gs:button(Win, [{label, {text, "OK"}},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {width, 60},
- {height, 30},
- {x, 230},
- {y, 10}
- ]),
-
- CancelBtn = gs:button(Win, [{label, {text, "Cancel"}},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0, 0, 0}},
- {align, center},
- {width, 60},
- {height, 30},
- {x, 230},
- {y, 60}
- ]),
-
- gs:config(Win, {map, true}),
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn, CancelBtn, Poll, Pos).
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-receive_answer(ProcPid) ->
- receive_answer(ProcPid, undefined, undefined, undefined, undefined).
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-receive_answer(ProcPid, DataReqMsg, WinConfMsg, MarkedRowMsg, SubsetMsg) ->
- receive Msg ->
- case Msg of
-
- {browser, ProcPid, cancel} ->
- PcPid = self(),
- PcPid ! DataReqMsg,
- PcPid ! WinConfMsg,
- PcPid ! MarkedRowMsg,
- PcPid ! SubsetMsg,
- cancel;
-
- {browser, ProcPid, {true, PollInterval}} ->
- PcPid = self(),
- PcPid ! DataReqMsg,
- PcPid ! WinConfMsg,
- PcPid ! MarkedRowMsg,
- PcPid ! SubsetMsg,
- PollInterval;
-
- {browser, ProcPid, {false, _Pollinterval}} ->
- PcPid = self(),
- PcPid ! DataReqMsg,
- PcPid ! WinConfMsg,
- PcPid ! MarkedRowMsg,
- PcPid ! SubsetMsg,
- infinity;
-
- #pc_data_req{} ->
- receive_answer(ProcPid, Msg, WinConfMsg, MarkedRowMsg, SubsetMsg);
-
- #pc_win_conf{} ->
- receive_answer(ProcPid, DataReqMsg, Msg, MarkedRowMsg, SubsetMsg);
-
- #pc_marked_row{} ->
- receive_answer(ProcPid, DataReqMsg, WinConfMsg, Msg, SubsetMsg);
-
- #dbs_subset{} ->
- receive_answer(ProcPid, DataReqMsg, WinConfMsg, MarkedRowMsg, Msg);
-
- #pc_menu_msg{data = exit_button} ->
- self() ! Msg,
- cancel;
-
- #pc_set_sorting_mode{sender = Sender} ->
- Sender ! #pd_ignore{sender = self()},
- ProcPid ! raise_and_beep,
- receive_answer(ProcPid, DataReqMsg, WinConfMsg, MarkedRowMsg, SubsetMsg);
-
- {'EXIT', _Sender, _Reason} ->
- self() ! Msg,
- cancel;
-
- _Other ->
- ProcPid ! raise_and_beep,
- receive_answer(ProcPid, DataReqMsg, WinConfMsg, MarkedRowMsg, SubsetMsg)
- end
- end.
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn, CancelBtn, Poll, Pos) ->
- receive
- {gs, Scale, click, _, [NewPos | _]} ->
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, Poll, NewPos);
-
- {gs, NoPollBtn, click, _, _} ->
- gs:config(Lbl, [{fg, {255, 255, 255}}]),
- gs:config(Scale, [{fg, {255, 255, 255}}, {pos, 0}, {range, {20, 20}}]),
- receive
- {gs, Scale, click, _, _} ->
- done
- after 500 ->
- done
- end,
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, false, Pos);
-
- {gs, PollBtn, click, _, _} ->
- gs:config(Lbl, [{fg, {0, 0, 0}}]),
- gs:config(Scale, [{fg, {0, 0, 0}}, {pos, Pos}, {range, {20, 300}}]),
- receive
- {gs, Scale, click, _, _} ->
- done
- after 500 ->
- done
- end,
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, true, Pos);
-
- {gs, OkBtn, click, _, _} ->
- Pid ! {browser, self(), {Poll, Pos}};
-
- {gs, CancelBtn, click, _, _} ->
- Pid ! {browser, self(), cancel};
-
- {gs, _, destroy, _, _} ->
- Pid ! {browser, self(), cancel};
-
-
- {gs, Win, configure, _, _} ->
- gs:config(Win, [{width, ?WINDOW_WIDTH},
- {height, ?WINDOW_HEIGHT}
- ]),
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, Poll, Pos);
-
-
- raise_and_beep ->
- gs:config(Win, [raise,
- beep]),
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, Poll, Pos);
-
-
- {'EXIT', _Sender, _Reason} ->
- Pid ! {browser, self(), cancel};
-
-
- _Other ->
- io:format("Poll dialog received message ~w ~n", [_Other]),
- browser_loop(Pid, Win, NoPollBtn, PollBtn, Lbl, Scale, OkBtn,
- CancelBtn, Poll, Pos)
-
- end.
-
diff --git a/lib/tv/src/tv_pw.erl b/lib/tv/src/tv_pw.erl
deleted file mode 100644
index 5f88c9f1fd..0000000000
--- a/lib/tv/src/tv_pw.erl
+++ /dev/null
@@ -1,328 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Code for pw, the window controlling part of the table tool.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pw).
--compile([{nowarn_deprecated_function,{gs,config,2}}]).
-
-
-
--export([pw/1]).
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pw_int_def.hrl").
-
-
-
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function: pw.
-%%
-%% Return Value: None.
-%%
-%% Description: Process controlling the graphical window, as well as the
-%% menubuttons.
-%%
-%% Parameters: None.
-%%======================================================================
-
-
-
-pw(Master) ->
- process_flag(trap_exit, true),
- ProcVars = #process_variables{master_pid = Master},
- blocked(ProcVars).
-
-
-
-
-
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-
-
-%%======================================================================
-%% Function: blocked.
-%%
-%% Return Value: None.
-%%
-%% Description: When started or explicitly blocked, pw enters this state,
-%% where nothing is performed until the module explicitly is
-%% deblocked.
-%%
-%% Parameters:
-%%======================================================================
-
-
-blocked(ProcVars) ->
- receive
- Msg ->
- case Msg of
- #pw_deblock{} ->
- deblock(Msg, ProcVars);
- _Other ->
- blocked(ProcVars)
- end
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function: deblocked.
-%%
-%% Return Value: None.
-%%
-%% Description: When deblocked, a window shall be created according to
-%% specification received in pw_deblock message.
-%%
-%% Parameters: Rec: received pw_deblock message.
-%%======================================================================
-
-
-
-deblock(Msg, ProcVars) ->
- #process_variables{window_params = WinP,
- menu_params = MenuP} = ProcVars,
-
- NewWinP = ?WIN_FUNC_FILE:create_window(Msg, WinP),
- NewMenuP = ?WIN_FUNC_FILE:create_menubar(NewWinP, MenuP),
-
- Sender = Msg#pw_deblock.sender,
- Sender ! #pw_deblock_cfm{sender = self(),
- win_id = NewWinP#window_params.window_id
- },
-
- NewProcVars = ProcVars#process_variables{window_params = NewWinP,
- menu_params = NewMenuP
- },
- deblocked_loop(NewProcVars).
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-deblocked_loop(ProcVars) ->
- receive
- Msg ->
- case Msg of
-
- {gs, Id, Event, Data, Args} ->
- NewProcVars = gs_messages({Id, Event, Data, Args}, ProcVars),
- deblocked_loop(NewProcVars);
-
- % Messages from pc!
- #pw_select_menu{menu=Menu} ->
- gs:config(Menu, [{select,true}]),
- deblocked_loop(ProcVars);
-
- #pw_create_menu{} ->
- NewProcVars = ?WIN_FUNC_FILE:create_menu(Msg, ProcVars),
- % Send confirmation...
- Sender = Msg#pw_create_menu.sender,
- Sender ! #pw_create_menu_cfm{sender = self()},
- deblocked_loop(NewProcVars);
-
- #pw_set_window_title{win_title = WinTitle} ->
- WinP = ProcVars#process_variables.window_params,
- gs:config(WinP#window_params.window_id, [{title, "[TV] " ++ WinTitle}]),
- NewWinP = WinP#window_params{window_title = WinTitle},
- NewProcVars = ProcVars#process_variables{window_params = NewWinP},
- deblocked_loop(NewProcVars);
-
- #pw_deblock{} ->
- deblock(Msg, ProcVars);
-
- % Exit signals!
- {'EXIT', Pid, Reason} ->
- MasterPid = ProcVars#process_variables.master_pid,
- exit_signals({Pid, Reason}, MasterPid),
- deblocked_loop(ProcVars);
-
- _Other ->
- deblocked_loop(ProcVars)
-
- end
- end.
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-exit_signals(Exit_info, MasterPid) ->
- case Exit_info of
- {MasterPid, _Reason} -> % When from master, just quit!
- exit(normal);
- _Other ->
- done
- end.
-
-
-
-
-
-
-
-
-
-
-%%======================================================================
-%% Function:
-%%
-%% Return Value:
-%%
-%% Description:
-%%
-%% Parameters:
-%%======================================================================
-
-
-gs_messages(Msg, ProcVars) ->
- MasterPid = ProcVars#process_variables.master_pid,
- case Msg of
-
- {_Id, click, Data, _Args} ->
- MasterPid ! #pc_menu_msg{sender = self(),
- data = Data},
- ProcVars;
-
- {_Win, keypress, _Data, [Key, _ , _, 1 | _T]} ->
- MenuP = ProcVars#process_variables.menu_params,
- ShortcutList = MenuP#menu_params.shortcuts,
- send_shortcut_data(Key, ShortcutList, MasterPid),
- ProcVars;
-
- Msg0 = {Win, configure, _, _} ->
- {Win, configure, _, [W, H | _T]} = flush_msgs(Msg0),
- WinP = ProcVars#process_variables.window_params,
- #window_params{window_id = WindowId,
- min_window_width = MinAllowedWidth,
- min_window_height = MinAllowedHeight} = WinP,
- FinalWidth = ?COMM_FUNC_FILE:max(W, MinAllowedWidth),
- FinalHeight = ?COMM_FUNC_FILE:max(H, MinAllowedHeight),
- ?WIN_FUNC_FILE:resize_window(WindowId, FinalWidth, FinalHeight),
- MasterPid ! #pc_win_conf{sender = self(),
- width = FinalWidth,
- height = FinalHeight},
- NewWinP = WinP#window_params{window_width = FinalWidth,
- window_height = FinalHeight
- },
- ProcVars#process_variables{window_params = NewWinP};
-
- {_Win, destroy, _Data, _Args} ->
- exit(normal);
-
- _Other ->
- ProcVars
- end.
-
-flush_msgs(Msg0 = {Win, Op, _, _}) ->
- receive {gs, Win,Op,D,P} ->
- flush_msgs({Win,Op,D,P})
- after 200 ->
- Msg0
- end.
-
-send_shortcut_data(_Key, [], _MasterPid) ->
- done;
-send_shortcut_data(Key, ShortcutList, MasterPid) ->
- case lists:keysearch(Key, 1, ShortcutList) of
- {value, {Key, Data}} ->
- MasterPid ! #pc_menu_msg{sender = self(),
- data = Data};
- false ->
- done
- end.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_pw_int_def.hrl b/lib/tv/src/tv_pw_int_def.hrl
deleted file mode 100644
index fabfbc2762..0000000000
--- a/lib/tv/src/tv_pw_int_def.hrl
+++ /dev/null
@@ -1,55 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Internal definitions for the pw part of the table tool.
-%%%
-%%%*********************************************************************
-
--define(WIN_FUNC_FILE, tv_pw_window).
-
-
-
--define(DEFAULT_WINDOW_WIDTH, 1000).
--define(DEFAULT_WINDOW_HEIGHT, 800).
--define(DEFAULT_MIN_WINDOW_WIDTH, 50).
--define(DEFAULT_MIN_WINDOW_HEIGHT, 50).
-
-
-
--record(window_params, {window_id,
- window_title,
- window_width,
- window_height,
- min_window_width,
- min_window_height
- }).
-
-
--record(menu_params, {menubar_id,
- shortcuts
- }).
-
-
-
-
-
--record(process_variables, {master_pid,
- window_params = #window_params{},
- menu_params = #menu_params{}
- }).
diff --git a/lib/tv/src/tv_pw_window.erl b/lib/tv/src/tv_pw_window.erl
deleted file mode 100644
index 81f29dc41c..0000000000
--- a/lib/tv/src/tv_pw_window.erl
+++ /dev/null
@@ -1,277 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%%*********************************************************************
-%%%
-%%% Description: Part of the pw component controlling the graphics.
-%%%
-%%%*********************************************************************
-
-
--module(tv_pw_window).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,menuitem,3}},
- {nowarn_deprecated_function,{gs,start,0}}]).
-
-
-
--export([create_window/2,
- resize_window/3,
- create_menubar/2,
- create_menu/2]).
-
-
-
-
--include("tv_int_def.hrl").
--include("tv_int_msg.hrl").
--include("tv_pw_int_def.hrl").
-
-
-
--define(DEFAULT_BG_COLOR, {217, 217, 217}).
-
-
-
-
-%%%*********************************************************************
-%%% EXTERNAL FUNCTIONS
-%%%*********************************************************************
-
-
-
-
-%%======================================================================
-%% Function: create_menu.
-%%
-%% Return Value: Identifier to the menu created.
-%%
-%% Description: Creates a menu in the window.
-%%
-%% Parameters: Win: ID of parent window.
-%%======================================================================
-
-
-create_menu(Msg, ProcVars) ->
- MenuP = ProcVars#process_variables.menu_params,
- MenubarId = MenuP#menu_params.menubar_id,
- ShortcutList = MenuP#menu_params.shortcuts,
-
- #pw_create_menu{menutitle = MenuTitle,
- title_acc_pos = TitleAccPos,
- menulist = MenuList} = Msg,
-
- % Create the menubutton!
- Label = def_or_param(MenuTitle, "NoName"),
- Mbutt = gs:create(menubutton, MenubarId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}, % firebrick
- % {font, {helvetica, bold, 14}},
- {label, {text, Label}},
- {underline, TitleAccPos}
- ]),
-
- % Create the actual menu!
- Menu = gs:create(menu, Mbutt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}
- ]),
-
- NewMenuP = MenuP#menu_params{shortcuts = ShortcutList ++ create_menulist(MenuList, Menu)},
-
- ProcVars#process_variables{menu_params = NewMenuP}.
-
-
-
-
-
-
-
-create_menubar(WinP, MenuP) ->
- WindowId = WinP#window_params.window_id,
- MenubarId = gs:create(menubar, WindowId, [{bg, ?DEFAULT_BG_COLOR}
- ]),
- Mbutt = gs:create(menubutton, MenubarId, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}, % firebrick
- % {font, {helvetica, bold, 14}},
- {label, {text, " Help "}},
- {underline, 1},
- {side, right}
- ]),
-
- % Create the actual menu!
- Menu = gs:create(menu, Mbutt, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}}
- ]),
- MenuP#menu_params{menubar_id = MenubarId,
- shortcuts = create_menulist([{" Help ", normal, help_button, 1, h},
- separator,
- {" OTP Documentation ",normal,otp_help_button,1,no_char}],
- Menu) ++ [{x,exit_button}, {'X',exit_button}]
- }.
-
-
-
-
-
-create_window(Msg, WinP) ->
- #pw_deblock{win_title = Title,
- win_width = Width,
- win_height = Height,
- min_win_width = MinWidth} = Msg,
-
-
- S = gs:start(),
- WindowTitle = def_or_param(Title, "NoName"),
- WindowMinWidth = def_or_param(MinWidth, ?DEFAULT_MIN_WINDOW_WIDTH),
- WindowMinHeight = def_or_param(MinWidth, ?DEFAULT_MIN_WINDOW_HEIGHT),
- WindowWidth = ?COMM_FUNC_FILE:max(def_or_param(Width,
- ?DEFAULT_WINDOW_WIDTH),
- WindowMinWidth),
- WindowHeight = ?COMM_FUNC_FILE:max(def_or_param(Height,
- ?DEFAULT_WINDOW_HEIGHT),
- WindowMinHeight),
-
-
- WindowId = gs:create(window, S, [{title, WindowTitle},
- {width, WindowWidth},
- {height, WindowHeight},
- {bg, ?DEFAULT_BG_COLOR},
- {configure, true},
- {destroy, true},
- {keypress, true},
- {cursor, arrow}
- ]),
-
- WinP#window_params{window_id = WindowId,
- window_title = WindowTitle,
- window_width = WindowWidth,
- window_height = WindowHeight,
- min_window_width = WindowMinWidth,
- min_window_height = WindowMinHeight
- }.
-
-
-
-
-
-
-
-resize_window(WindowId, NewWidth, NewHeight) ->
- gs:config(WindowId, [{width, NewWidth},
- {height, NewHeight}
- ]).
-
-
-
-
-%%%********************************************************************
-%%% INTERNAL FUNCTIONS
-%%%********************************************************************
-
-
-
-create_menulist([], _Menu) ->
- [];
-create_menulist(List, Menu) ->
- MaxLength = get_length_of_longest_menu_text(List, 0),
- create_menulist(List, Menu, MaxLength).
-
-
-
-
-create_menulist([], _Menu, _MaxLength) ->
- [];
-create_menulist([{Text, Type, Data, AccCharPos, ShortcutChar} | Rest], Menu, MaxLength) ->
- ShortcutCapitalChar =
- if
- ShortcutChar =:= no_char ->
- no_char;
- true ->
- CharAsciiValue = lists:nth(1, atom_to_list(ShortcutChar)),
- CapitalCharValue = CharAsciiValue - ($a - $A),
- list_to_atom([CapitalCharValue])
- end,
-
- FinalText = if
- ShortcutChar =:= no_char ->
- Text;
- true ->
- Text ++ lists:duplicate(MaxLength - length(Text), " ") ++
- " Ctrl+" ++ atom_to_list(ShortcutCapitalChar) ++ " "
- end,
- TypeAndSel =
- case Type of
- normal ->
- [{itemtype, normal}];
- {radio, Selected, Group} ->
- [{itemtype, radio},
- {select, Selected},
- {group, Group}];
- {check, Selected} ->
- [{itemtype, check},
- {select, Selected}]
- end,
- gs:menuitem(Data, Menu, [{bg, ?DEFAULT_BG_COLOR},
- {fg, {178, 34, 34}},
- {label, {text, FinalText}},
- {underline, AccCharPos},
- {data, Data} |
- TypeAndSel
- ]),
- [{ShortcutChar, Data}, {ShortcutCapitalChar, Data} | create_menulist(Rest, Menu, MaxLength)];
-create_menulist([separator | Rest], Menu, MaxLength) ->
- gs:create(menuitem, Menu, [{itemtype, separator}
- ]),
- create_menulist(Rest, Menu, MaxLength).
-
-
-
-
-
-
-
-get_length_of_longest_menu_text([], MaxLength) ->
- MaxLength;
-get_length_of_longest_menu_text([{Text, _Type, _Data, _APos, _SChar} | Rest], CurrMax) ->
- L = length(Text),
- if
- L > CurrMax ->
- get_length_of_longest_menu_text(Rest, L);
- true ->
- get_length_of_longest_menu_text(Rest, CurrMax)
- end;
-get_length_of_longest_menu_text([separator | Rest], CurrMax) ->
- get_length_of_longest_menu_text(Rest, CurrMax).
-
-
-
-
-
-def_or_param(undefined, DefaultValue) ->
- DefaultValue;
-def_or_param(Param, _Default) ->
- Param.
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tv/src/tv_rec_edit.erl b/lib/tv/src/tv_rec_edit.erl
deleted file mode 100644
index 3f9ea8b5f5..0000000000
--- a/lib/tv/src/tv_rec_edit.erl
+++ /dev/null
@@ -1,754 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_rec_edit).
--compile([{nowarn_deprecated_function,{gs,button,2}},
- {nowarn_deprecated_function,{gs,button,3}},
- {nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,entry,3}},
- {nowarn_deprecated_function,{gs,frame,2}},
- {nowarn_deprecated_function,{gs,frame,3}},
- {nowarn_deprecated_function,{gs,label,2}},
- {nowarn_deprecated_function,{gs,read,2}},
- {nowarn_deprecated_function,{gs,start,0}},
- {nowarn_deprecated_function,{gs,window,3}}]).
-
-
-
--export([start/5,
- start/6,
- init/8
- ]).
-
-
--include("tv_int_def.hrl").
-
-
-
--define(DEFAULT_BG_COLOR, {217,217,217}).
-
--define(WIN_WIDTH, 375).
--define(WIN_HEIGHT, 341).
--define(ETS_WIN_HEIGHT, 154).
-
--define(FRAME_WIDTH, 375).
--define(FRAME_HEIGHT, 265).
--define(ETS_FRAME_HEIGHT, 74).
-
--define(MAX_LABEL_WIDTH, 165).
--define(X0, 15).
--define(Y0, 20).
--define(LABEL_HEIGHT, 30).
--define(ENTRY_HEIGHT, 30).
--define(FONT, {screen,12}).
--define(NEXT_BTN_WIDTH, 57).
--define(NEXT_BTN_HEIGHT, 22).
--define(NEXT_BTN_FG, {178,34,34}).
--define(INSERT_BTN_WIDTH, 80).
--define(INSERT_BTN_HEIGHT, 30).
--define(INSERT_BTN_DIST_BETWEEN, 23).
--define(INSERT_BTN_DIST_FROM_BOTTOM, 23).
-
-
-
-
-
-start(TableType, TableName, AttributeList, ListsAsStr, ErrMsgMode) ->
- AttributeValues = lists:duplicate(length(AttributeList), undefined),
- spawn_link(?MODULE, init, [TableType, TableName, AttributeList,
- AttributeValues, ListsAsStr, ErrMsgMode, self(), true]).
-
-
-
-start(TableType, TableName, AttributeList, AttributeValues, ListsAsStr, ErrMsgMode) ->
- spawn_link(?MODULE, init, [TableType, TableName, AttributeList,
- AttributeValues, ListsAsStr, ErrMsgMode, self(), false]).
-
-
-
-
-init(TableType,TableName,AttributeList,AttributeValues,ListsAsStr,ErrMsgMode,MasterPid,Insert) ->
- process_flag(trap_exit, true),
- put(error_msg_mode, ErrMsgMode),
- Frames = create_window(TableType, TableName, AttributeList, AttributeValues,
- ListsAsStr, Insert),
- loop(TableType, TableName, Frames, AttributeList, AttributeValues, MasterPid, ListsAsStr).
-
-
-
-
-
-loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr) ->
- receive
-
- {gs, insert, click, Insert, _Args} ->
- gs:config(win, [{cursor, busy}]),
- case get_record(TabType, TabName, AttrList, AttrList, Frames) of
- {ok, NewRec} ->
- case Insert of
- insert ->
- MPid ! {new_object, NewRec};
- change ->
- MPid ! {updated_object, NewRec}
- end;
- error ->
- done
- end,
- gs:config(win, [{cursor, arrow}]),
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, cancel, click, _Data, _Args} ->
- exit(normal);
-
-
- {gs, reset, click, _Data, _Args} ->
- gs:config(win, [{cursor, busy}]),
- set_entry_values(TabType, AttrList, AttrVals, ListsAsStr),
- gs:config(win, [{cursor, arrow}]),
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
-
- {gs, EntryId, keypress, _Data, ['Tab', _No, 0 | _T]} ->
- {_Term, {NextEntry, NextFrame}} =
- check_entry_content(EntryId, AttrList, Frames, forward),
- case NextEntry of
- EntryId ->
- gs:config(NextEntry, [{setfocus, true}]);
- _OtherId ->
- gs:config(NextFrame, [raise]),
- gs:config(NextEntry, [{setfocus, true},
- {select, {0,100000000}}])
- end,
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, EntryId, keypress, _Data, ['Down' | _T]} ->
- {_Term, {NextEntry, NextFrame}} =
- check_entry_content(EntryId, AttrList, Frames, forward),
- case NextEntry of
- EntryId ->
- gs:config(NextEntry, [{setfocus, true}]);
- _OtherId ->
- gs:config(NextFrame, [raise]),
- gs:config(NextEntry, [{setfocus, true},
- {select, {0,100000000}}])
- end,
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, EntryId, keypress, _Data, ['Tab', _No, 1 | _T]} ->
- {_Term, {NextEntry, NextFrame}} =
- check_entry_content(EntryId, AttrList, Frames, backward),
- gs:config(NextFrame, [raise]),
- case NextEntry of
- EntryId ->
- gs:config(NextEntry, [{setfocus, true}]);
- _OtherId ->
- gs:config(NextFrame, [raise]),
- gs:config(NextEntry, [{setfocus, true},
- {select, {0,100000000}}])
- end,
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, EntryId, keypress, _Data, ['Up' | _T]} ->
- {_Term, {NextEntry, NextFrame}} =
- check_entry_content(EntryId, AttrList, Frames, backward),
- gs:config(NextFrame, [raise]),
- case NextEntry of
- EntryId ->
- gs:config(NextEntry, [{setfocus, true}]);
- _OtherId ->
- gs:config(NextFrame, [raise]),
- gs:config(NextEntry, [{setfocus, true},
- {select, {0,100000000}}])
- end,
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, Id, keypress, _Data, ['Return' | _T]} ->
- OldCursor = gs:read(Id, cursor),
- gs:config(Id, [{cursor, busy}]),
- gs:config(win, [{cursor, busy}]),
- Insert = gs:read(insert, data),
- case get_record(TabType, TabName, AttrList, AttrList, Frames) of
- {ok, NewRec} ->
- case Insert of
- insert ->
- MPid ! {new_object, NewRec};
- change ->
- MPid ! {updated_object, NewRec}
- end;
- error ->
- done
- end,
- gs:config(win, [{cursor, arrow}]),
- gs:config(Id, [{cursor, OldCursor}]),
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
-
- {gs, _Id, click, FrameNo, _Args} ->
- gs:config(lists:nth(FrameNo, Frames), [raise]),
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, win, configure, _Data, [Width | _T]} ->
- resize_window(TabType, lists:max([Width, ?WIN_WIDTH]), Frames, AttrList),
- loop(TabType, TabName, Frames, AttrList, AttrVals, MPid, ListsAsStr);
-
-
- {gs, win, destroy, _Data, _Args} ->
- exit(normal);
-
-
- insert_mode ->
- NewAttrVals = lists:duplicate(length(AttrList), undefined),
- set_entry_values(TabType, AttrList, NewAttrVals, ListsAsStr),
- loop(TabType, TabName, Frames, AttrList, NewAttrVals, MPid, ListsAsStr);
-
-
- {update_mode, Obj} ->
- NewAttrVals =
- case TabType of
- mnesia ->
- case Obj of
- undefined ->
- lists:duplicate(length(AttrList), undefined);
- _AnyRec ->
- tl(tuple_to_list(Obj))
- end;
- ets ->
- [Obj]
- end,
- set_entry_values(TabType, AttrList, NewAttrVals, ListsAsStr),
- loop(TabType, TabName, Frames, AttrList, NewAttrVals, MPid, ListsAsStr);
-
-
- {reset_info, Obj} ->
- %% Info to use, instead of old info, when reset button is pressed.
- NewAttrVals =
- case TabType of
- mnesia ->
- case Obj of
- undefined ->
- lists:duplicate(length(AttrList), undefined);
- _AnyRec ->
- tl(tuple_to_list(Obj))
- end;
- ets ->
- [Obj]
- end,
- loop(TabType, TabName, Frames, AttrList, NewAttrVals, MPid, ListsAsStr);
-
-
- raise ->
- gs:config(win, [raise]),
- loop(TabType, TabName, Frames, AttrList,AttrVals, MPid, ListsAsStr);
-
-
- {'EXIT', _Pid, _Reason} ->
- exit(normal);
-
-
- _Other ->
- loop(TabType, TabName, Frames, AttrList,AttrVals, MPid, ListsAsStr)
- end.
-
-
-
-
-resize_window(TabType, WinWidth, Frames, AttrList) ->
- WinHeight =
- case TabType of
- mnesia ->
- get_window_height(length(AttrList));
- ets ->
- ?ETS_WIN_HEIGHT
- end,
- gs:config(win, [{width, WinWidth},
- {height, WinHeight}
- ]),
- FrameWidth = WinWidth,
- LblL = lists:map(fun(H) ->
- gs:config(H, [{width, FrameWidth}]),
- {LblW, BId, NId} = gs:read(H, data),
- XNext = get_next_btn_xpos(FrameWidth),
- XBack = XNext - ?NEXT_BTN_WIDTH,
- gs:config(BId, [{x, XBack}]),
- gs:config(NId, [{x, XNext}]),
- LblW
- end,
- Frames),
- LblW = hd(LblL),
- EntryW = get_entry_width(TabType, FrameWidth, LblW),
- lists:foreach(fun(H) ->
- gs:config(H, [{width, EntryW}])
- end,
- AttrList),
- gs:config(btnframe, [{width, FrameWidth}]),
- {XInsert, XCancel, XReset} = get_insert_btn_coords(WinWidth),
- gs:config(insert, [{x, XInsert}]),
- gs:config(cancel, [{x, XCancel}]),
- gs:config(reset, [{x, XReset}]).
-
-
-
-
-check_entry_content(EntryId, AttributeList, Frames, Direction) ->
- EditedStr = gs:read(EntryId, text),
- case tv_db_search:string_to_term(EditedStr) of
- {error, {_Reason, Msg}} ->
- gs:config(EntryId, [beep]),
- tv_utils:notify(gs:start(), "TV Notification", Msg),
- {error, {EntryId, no_matter}};
- {ok, NewTerm} ->
- {{ok,NewTerm}, get_next_entry_id(EntryId, AttributeList, Frames, Direction)}
- end.
-
-
-
-
-get_next_entry_id(EntryId, AttributeList, Frames, Direction) ->
- OldPos = get_pos(EntryId, AttributeList),
- MaxPos = length(AttributeList),
- NewPos = case Direction of
- forward when OldPos < MaxPos ->
- OldPos + 1;
- forward ->
- 1;
- backward when OldPos > 1 ->
- OldPos - 1;
- backward ->
- MaxPos;
- stationary ->
- OldPos
- end,
- FramePos = get_next_frame_id(NewPos),
- {lists:nth(NewPos, AttributeList), lists:nth(FramePos, Frames)}.
-
-
-
-
-get_next_frame_id(Pos) ->
- case Pos rem 5 of
- 0 ->
- Pos div 5;
- _Other ->
- (Pos div 5) + 1
- end.
-
-
-
-
-get_record(TabType, TabName, AttrList, AttrList, Frames) ->
- case get_record(AttrList, AttrList, Frames, []) of
- {ok, RecList} ->
- case TabType of
- mnesia ->
- NewRecList = [TabName | RecList],
- {ok, list_to_tuple(NewRecList)};
- ets ->
- {ok, hd(RecList)} %% Only one element, a tuple!
- end;
- error ->
- error
- end.
-
-
-
-
-get_record([H | T], AttrList, Frames, Acc) ->
- case check_entry_content(H, AttrList, Frames, forward) of
- {{ok, NewTerm}, _PosTuple} ->
- get_record(T, AttrList, Frames, [NewTerm | Acc]);
- {error, _PosTuple} ->
- {EntryId, FrameId} = get_next_entry_id(H, AttrList, Frames, stationary),
- gs:config(FrameId, [raise]),
- gs:config(EntryId, [{setfocus, true}]),
- error
- end;
-get_record([], _AttrList, _Frames, Acc) ->
- {ok, lists:reverse(Acc)}.
-
-
-
-
-
-
-get_pos(Elem, L) ->
- get_pos(Elem, L, 1).
-
-
-get_pos(Elem, [Elem | _T], N) ->
- N;
-get_pos(Elem, [_H | T], N) ->
- get_pos(Elem, T, N + 1).
-
-
-
-
-create_window(mnesia, TableName, AttrList, AttrValues, ListsAsStr, Insert) ->
- NofAttr = length(AttrList),
- NofFrames =
- case NofAttr rem 5 of
- 0 ->
- NofAttr div 5;
- _Rem ->
- (NofAttr div 5) + 1
- end,
-
- WinHeight = get_window_height(NofAttr),
- FrameHeight = get_frame_height(NofAttr),
-
- Attr = get_longest_attribute_name(AttrList),
- LabelWidth = lists:min([?MAX_LABEL_WIDTH,
- element(1, gs:read(gs:start(),
- {font_wh, {?FONT, atom_to_list(Attr)}}))]),
-
- gs:window(win, gs:start(), [{width, ?WIN_WIDTH},
- {height, WinHeight},
- {title, "[TV] Record Editor: '" ++
- atom_to_list(TableName) ++ "'"},
- {bg, ?DEFAULT_BG_COLOR},
- {configure, true},
- {destroy, true},
- {cursor, arrow}
- ]),
-
- create_insert_and_cancel_btns(Insert, WinHeight, FrameHeight),
- FrameList = create_frames(NofFrames, LabelWidth, AttrList, AttrValues, NofFrames,
- ListsAsStr, FrameHeight),
- gs:config(hd(FrameList), [raise]),
- gs:config(hd(AttrList), [{setfocus, true},
- {select, {0,100000000}}]),
- gs:config(win, [{map,true}]),
- FrameList;
-create_window(ets, TableName, [Attr], [AttrVal], ListsAsStr, Insert) ->
- gs:window(win, gs:start(), [{width, ?WIN_WIDTH},
- {height, ?ETS_WIN_HEIGHT},
- {title, "[TV] Tuple Editor, table '" ++
- atom_to_list(TableName) ++ "'"},
- {bg, ?DEFAULT_BG_COLOR},
- {configure, true},
- {destroy, true},
- {cursor, arrow}
- ]),
-
- F = gs:frame(win, [{width, ?FRAME_WIDTH},
- {height, ?ETS_FRAME_HEIGHT},
- {x, 0},
- {y, 0},
- {bg, ?DEFAULT_BG_COLOR},
- {bw,2},
- {data, {0, undefined, undefined}}
- ]),
-
- create_insert_and_cancel_btns(Insert, ?ETS_WIN_HEIGHT, ?ETS_FRAME_HEIGHT),
-
- EntryW = get_entry_width(ets, ?FRAME_WIDTH, 0),
- EntryX = ?X0 - 2,
-
- EntryText =
- case AttrVal of
- undefined ->
- "";
- _OtherVal ->
- case ListsAsStr of
- true ->
- tv_io_lib:format("~p", [AttrVal]);
- false ->
- lists:flatten(io_lib:write(AttrVal))
- end
- end,
- gs:entry(Attr, F, [{width, EntryW},
- {height, ?LABEL_HEIGHT},
- {x, EntryX},
- {y, ?Y0},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {bw, 1},
- {font, ?FONT},
- {justify, left},
- {text, EntryText},
- {cursor, text},
- {setfocus, true},
- {enable, true},
- {keypress,true},
- {select, {0,100000000}}
- ]),
- gs:config(win, [{map,true}]),
- [F].
-
-
-
-
-get_insert_btn_coords(WinWidth) ->
- Middle = round(WinWidth / 2),
- XInsert = Middle - round(1.5 * ?INSERT_BTN_WIDTH) - ?INSERT_BTN_DIST_BETWEEN,
- XCancel = Middle - round(0.5 * ?INSERT_BTN_WIDTH),
- XReset = Middle + round(0.5 * ?INSERT_BTN_WIDTH) + ?INSERT_BTN_DIST_BETWEEN,
- {XInsert, XCancel, XReset}.
-
-
-
-
-create_insert_and_cancel_btns(Insert, WinHeight, FrameHeight) ->
- LowerFrameHeight = WinHeight - FrameHeight,
- Y = ?INSERT_BTN_DIST_FROM_BOTTOM,
- {XInsert, XCancel, XReset} = get_insert_btn_coords(?WIN_WIDTH),
-
- {InsertBtnText, InsertBtnData} =
- case Insert of
- true ->
- {"Insert", insert};
- false ->
- {"Change", change}
- end,
-
- gs:frame(btnframe, win, [{width, ?FRAME_WIDTH},
- {height, LowerFrameHeight},
- {x, 0},
- {y, FrameHeight},
- {bg, ?DEFAULT_BG_COLOR},
- {bw,2}
- ]),
- gs:button(insert, btnframe, [{width, ?INSERT_BTN_WIDTH},
- {height, ?INSERT_BTN_HEIGHT},
- {x, XInsert},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {font, ?FONT},
- {label, {text, InsertBtnText}},
- {align, center},
- {data, InsertBtnData}
- ]),
- gs:button(cancel, btnframe, [{width, ?INSERT_BTN_WIDTH},
- {height, ?INSERT_BTN_HEIGHT},
- {x, XCancel},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {font, ?FONT},
- {label, {text, "Cancel"}},
- {align, center}
- ]),
- gs:button(reset, btnframe, [{width, ?INSERT_BTN_WIDTH},
- {height, ?INSERT_BTN_HEIGHT},
- {x, XReset},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {font, ?FONT},
- {label, {text, "Reset"}},
- {align, center}
- ]).
-
-
-
-
-
-create_frames(0, _LblW, _AttrList, _AttrValues, _NofFrames, _ListsAsStr, _FrameHeight) ->
- [];
-create_frames(N, LblW, AttrList, AttrValues, NofFrames, ListsAsStr, FrameHeight) ->
- F = gs:frame(win, [{width, ?FRAME_WIDTH},
- {height, FrameHeight},
- {x, 0},
- {y, 0},
- {bg, ?DEFAULT_BG_COLOR},
- {bw,2}
- ]),
- {BId, NId} = create_back_and_next_btns(F, 5, N, NofFrames),
- gs:config(F, [{data, {LblW, BId, NId}}]),
- {RemAttrList, RemAttrValues} =
- create_labels_and_entries(5, AttrList, AttrValues, LblW, F, ListsAsStr),
- [F | create_frames(N - 1,LblW,RemAttrList,RemAttrValues,NofFrames,ListsAsStr,FrameHeight)].
-
-
-
-
-
-
-create_back_and_next_btns(FrameId, NofEntries, FrameNo, NofFrames) ->
- Y = ?Y0 + NofEntries * (?LABEL_HEIGHT + 10) + 8,
- XNext = get_next_btn_xpos(?FRAME_WIDTH),
- XBack = XNext - ?NEXT_BTN_WIDTH,
- DataNext = (NofFrames - FrameNo + 1) + 1,
- DataBack = (NofFrames - FrameNo + 1) - 1,
- BId =
- if
- DataBack =< 0 ->
- undefined;
- true ->
- gs:button(FrameId, [{width, ?NEXT_BTN_WIDTH},
- {height, ?NEXT_BTN_HEIGHT},
- {x, XBack},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, ?NEXT_BTN_FG},
- {font, ?FONT},
- {align, center},
- {label, {text, "< Back"}},
- %% {underline, 2},
- {data, DataBack}
- ])
- end,
- NId =
- if
- DataNext > NofFrames ->
- undefined;
- true ->
- gs:button(FrameId, [{width, ?NEXT_BTN_WIDTH},
- {height, ?NEXT_BTN_HEIGHT},
- {x, XNext},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, ?NEXT_BTN_FG},
- {font, ?FONT},
- {align, center},
- {label, {text, " Next >"}},
- %% {underline, 1},
- {data, DataNext}
- ])
- end,
- {BId, NId}.
-
-
-
-
-get_next_btn_xpos(FrameWidth) ->
- FrameWidth - ?X0 - ?NEXT_BTN_WIDTH.
-
-
-
-get_entry_width(TableType, FrameWidth, LblWidth) ->
- HorizontalSpacing =
- case TableType of
- mnesia ->
- 10;
- ets ->
- 0
- end,
- FrameWidth - LblWidth - 2 * ?X0 - HorizontalSpacing.
-
-
-
-create_labels_and_entries(N, [H | T], [VH | VT], LblW, F, ListsAsStr) when N > 0 ->
- Y = ?Y0 + (5 - N) * (?LABEL_HEIGHT + 10),
- EntryW = get_entry_width(mnesia, ?FRAME_WIDTH, LblW),
- EntryX = ?FRAME_WIDTH - EntryW - ?X0 - 2,
-
- EntryText =
- case ListsAsStr of
- true ->
- tv_io_lib:format("~p", [VH]);
- false ->
- lists:flatten(io_lib:write(VH))
- end,
- gs:label(F, [{width, LblW},
- {height, ?LABEL_HEIGHT},
- {x, ?X0},
- {y, Y},
- {bg, ?DEFAULT_BG_COLOR},
- {fg, {0,0,0}},
- {align,w},
- {font, ?FONT},
- {label, {text, atom_to_list(H)}}
- ]),
- gs:entry(H, F, [{width, EntryW},
- {height, ?LABEL_HEIGHT},
- {x, EntryX},
- {y, Y},
- {bg, {255,255,255}},
- {fg, {0,0,0}},
- {bw, 1},
- {font, ?FONT},
- {justify, left},
- {text, EntryText},
- {cursor, text},
- {setfocus, false},
- {enable, true},
- {keypress,true}
- ]),
- create_labels_and_entries(N - 1, T, VT, LblW, F, ListsAsStr);
-create_labels_and_entries(0, RemAttrList, RemAttrValues, _LblW, _F, _ListsAsStr) ->
- {RemAttrList, RemAttrValues};
-create_labels_and_entries(_N, [], [], _LblW, _F, _ListsAsStr) ->
- {[], []}.
-
-
-
-
-get_longest_attribute_name(AttrList) ->
- get_longest_attribute_name(AttrList, 0, undefined).
-
-
-get_longest_attribute_name([H | T], Max, Attr) ->
- CurrLength = length(atom_to_list(H)),
- if
- CurrLength >= Max ->
- get_longest_attribute_name(T, CurrLength, H);
- true ->
- get_longest_attribute_name(T, Max, Attr)
- end;
-get_longest_attribute_name([], _Max, Attr) ->
- Attr.
-
-
-
-
-get_window_height(N) ->
- if
- N >= 5 ->
- ?WIN_HEIGHT;
- true ->
- ?WIN_HEIGHT - ((5 - N) * (?LABEL_HEIGHT + 10) + ?NEXT_BTN_HEIGHT + 8)
- end.
-
-
-
-get_frame_height(N) ->
- if
- N >= 5 ->
- ?FRAME_HEIGHT;
- true ->
- ?FRAME_HEIGHT - ((5 - N) * (?LABEL_HEIGHT + 10) + ?NEXT_BTN_HEIGHT + 8)
- end.
-
-
-
-
-set_entry_values(TabType, [H | T], [VH | VT], ListsAsStr) ->
- EntryText =
- case VH of
- undefined when TabType =:= ets ->
- "";
- _AnyValue ->
- case ListsAsStr of
- true ->
- tv_io_lib:format("~p", [VH]);
- false ->
- lists:flatten(io_lib:write(VH))
- end
- end,
- gs:config(H, [{text, EntryText}]),
- set_entry_values(TabType, T, VT, ListsAsStr);
-set_entry_values(_TabType, [], [], _ListsAsStr) ->
- done.
diff --git a/lib/tv/src/tv_table_owner.erl b/lib/tv/src/tv_table_owner.erl
deleted file mode 100644
index bccac6c236..0000000000
--- a/lib/tv/src/tv_table_owner.erl
+++ /dev/null
@@ -1,122 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_table_owner).
-
-
-
--export([create/5
- ]).
-
-
--export([internal_create/3,
- start/0,
- init/0
- ]).
-
-
-
--define(REGISTERED_NAME, tv_table_owner).
-
-
-
-create(mnesia, _Node, _LocalNode, _TableName, _Options) ->
- error;
-create(ets, _Node, true, TabName, Options) ->
- case catch internal_create(ets, TabName, Options) of
- {TabName, Pid} when is_pid(Pid) ->
- {ok, {TabName,Pid}};
- {TabNo, Pid} when is_pid(Pid) ->
- {ok, {TabNo,Pid}};
- _OtherResult ->
- error
- end;
-create(ets, Node, false, TabName, Options) ->
- case catch rpc:block_call(Node, ?MODULE, internal_create, [ets, TabName, Options]) of
- {TabName, Pid} when is_pid(Pid) ->
- {ok, {TabName,Pid}};
- {TabNo, Pid} when is_pid(Pid) ->
- {ok, {TabNo,Pid}};
- _OtherResult ->
- error
- end.
-
-
-
-
-
-internal_create(ets, TabName, Options) ->
- ?MODULE:start(),
- ?REGISTERED_NAME ! {create, self(), ets, TabName, Options},
- receive
- {?REGISTERED_NAME, Result} ->
- Result
- after
- 5000 ->
- error
- end.
-
-
-
-
-
-
-start() ->
- case whereis(?REGISTERED_NAME) of
- undefined ->
- ServerPid = spawn(?MODULE, init, []),
- case catch register(?REGISTERED_NAME, ServerPid) of
- true ->
- ok;
- {'EXIT', _Reason} ->
- exit(ServerPid, kill),
- timer:sleep(500),
- start()
- end;
- Pid when is_pid(Pid) ->
- ok
- end.
-
-
-
-
-
-
-
-
-init() ->
- %% Currently no initialisations!
- loop().
-
-
-
-
-
-
-loop() ->
- receive
-
- {create, Sender, ets, TabName, Options} ->
- Sender ! {?REGISTERED_NAME, (catch ets:new(TabName, Options))},
- loop();
-
-
- _Other ->
- loop()
-
- end.
-
diff --git a/lib/tv/src/tv_utils.erl b/lib/tv/src/tv_utils.erl
deleted file mode 100644
index 799e3994cb..0000000000
--- a/lib/tv/src/tv_utils.erl
+++ /dev/null
@@ -1,179 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
--module(tv_utils).
--compile([{nowarn_deprecated_function,{gs,config,2}},
- {nowarn_deprecated_function,{gs,create,3}},
- {nowarn_deprecated_function,{gs,destroy,1}}]).
-
-
-
--export([notify/3]).
-
-
-
- %% Minimum size of help windows
--define(wwin, 300).
--define(hwin, 180).
-
- %% Button sizes
--define(wbut, 60).
--define(hbut, 30).
-
--define(pad, 10).
-
-
-%----------------------------------------
-% notify(S,Strings) -> ok
-% S = pid() GS
-% Strings = string() | [string()]
-% A notification window contains a message to the user.
-% Will lock the GUI until the user confirms the message by
-% pressing the 'Ok' button.
-%----------------------------------------
-notify(S,Title,Strings) ->
- W = required_width(Strings, ?wwin),
- Htop = round(2 * ?hwin / 3),
- Hbot = ?hwin - Htop,
-
- %% Open a new window
- Win = gs:create(window,S,[{width, W},
- {height, ?hwin},
- {title, Title},
- {data, notifywin}
- ]),
-
- %% Top frame containing a label
- Top = gs:create(frame,Win,[{width, W},
- {height, Htop},
- {x, 0},
- {y, 0},
- {data, notifywin},
- {keypress, true}
- ]),
-
- Lbl = gs:create(label,Top,[{width,W},
- {height, Htop - 2 * ?pad},
- {x, 0},
- {y, ?pad},
- {align, c},
- {justify, center},
- {data, notifywin},
- {keypress, true}
- ]),
-
- gs:config(Lbl, {label, {text, insert_newlines(Strings)}}),
-
- %% Bottom frame containing an 'Ok' button
- Bot = gs:create(frame,Win,[{width, W},
- {height, Hbot},
- {x, 0},
- {y, Htop}
- ]),
- gs:create(button,Bot,[{width, ?wbut},
- {height, ?hbut},
- {x, W / 2 - ?wbut/2},
- {y, Hbot / 2 - ?hbut / 2},
- {label, {text, "OK"}},
- {data, notifywin},
- {keypress, true}]),
-
- gs:config(Win, [{map,true}]),
-
- event_loop(Win,null).
-
-
-
-
-insert_newlines([String|Rest]) when is_list(String), Rest=/=[]->
- String ++ "\n" ++ insert_newlines(Rest);
-insert_newlines([Last]) ->
- [Last];
-insert_newlines(Other) ->
- Other.
-
-
-
-
-event_loop(Win,Entry) ->
- receive
-
- %%
- %% Notify window
- %%
-
- %% 'Ok' pressed in notify window
- {gs,_Obj,_Event,notifywin,["OK"|_]} ->
- gs:destroy(Win),
- ok;
-
- %% 'Window manager destroy' received in notify window
- {gs,_Obj,destroy,notifywin,_} ->
- gs:destroy(Win),
- ok;
-
- %% 'Return' pressed in notify or confirm window
- {gs,_Obj,_Event,helpwin,['Return'|_]} ->
- gs:destroy(Win),
- ok;
-
-
- %%
- %% Common or partly common events
- %%
-
- %% 'Window manager destroy' received in notify,
- %% confirm,confirm_exit or request window
- {gs,_Obj,destroy,_,_} ->
- gs:destroy(Win),
- cancel;
-
- %% Flush any other GS events
- {gs,_Obj,_Event,_Data,_Arg} ->
- event_loop(Win,Entry)
- end.
-
-
-
-
-%----------------------------------------
-% required_width(Strings,Min) -> Req
-% Strings = string() | [string()]
-% Min = Req = integer()
-% Returns the minimum required width in pixels for a help window,
-% which is the maximum of Min and the required width for Strings.
-% NOTE: Font dependant really!
-%----------------------------------------
-required_width([First|Rest],Min) when is_list(First) ->
- Req = 7*length(First), % 7 pixels per character
- if
- Req>Min ->
- required_width(Rest,Req);
- true ->
- required_width(Rest,Min)
- end;
-required_width([],Min) ->
- Min;
-required_width(String,Min) ->
- Req = 7*length(String),
- if
- Req>Min ->
- Req;
- true ->
- Min
- end.
-
diff --git a/lib/tv/vsn.mk b/lib/tv/vsn.mk
deleted file mode 100644
index 59d124a3b7..0000000000
--- a/lib/tv/vsn.mk
+++ /dev/null
@@ -1 +0,0 @@
-TV_VSN = 2.1.4.10
diff --git a/lib/typer/Makefile b/lib/typer/Makefile
index 40a82e9bba..d4396abc9d 100644
--- a/lib/typer/Makefile
+++ b/lib/typer/Makefile
@@ -29,7 +29,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Macros
#
-SUB_DIRECTORIES = src
+SUB_DIRECTORIES = src doc/src
include vsn.mk
VSN = $(TYPER_VSN)
diff --git a/lib/pman/Makefile b/lib/typer/doc/Makefile
index 3600504d07..4ea0137202 100644
--- a/lib/pman/Makefile
+++ b/lib/typer/doc/Makefile
@@ -1,34 +1,39 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2006-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
+SHELL=/bin/sh
+
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
+clean:
+ -rm -f *.html edoc-info stylesheet.css erlang.png
+
+distclean: clean
+realclean: clean
+
# ----------------------------------------------------
-# Common Macros
+# Special Build Targets
# ----------------------------------------------------
-SUB_DIRECTORIES = src priv doc/src
-SPECIAL_TARGETS =
# ----------------------------------------------------
-# Default Subdir Targets
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_subdir.mk
-
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
diff --git a/lib/toolbar/doc/man3/.gitignore b/lib/typer/doc/html/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/toolbar/doc/man3/.gitignore
+++ b/lib/typer/doc/html/.gitignore
diff --git a/lib/toolbar/doc/pdf/.gitignore b/lib/typer/doc/pdf/.gitignore
index e69de29bb2..e69de29bb2 100644
--- a/lib/toolbar/doc/pdf/.gitignore
+++ b/lib/typer/doc/pdf/.gitignore
diff --git a/lib/pman/doc/src/Makefile b/lib/typer/doc/src/Makefile
index d9e0317f05..2683c08679 100644
--- a/lib/pman/doc/src/Makefile
+++ b/lib/typer/doc/src/Makefile
@@ -1,21 +1,20 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2012. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2006-2012. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
-# %CopyrightEnd%
#
+# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -24,8 +23,8 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Application version
# ----------------------------------------------------
include ../../vsn.mk
-VSN=$(PMAN_VSN)
-APPLICATION=pman
+VSN=$(TYPER_VSN)
+APPLICATION=typer
# ----------------------------------------------------
# Release directory specification
@@ -35,11 +34,11 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = pman.xml
+XML_APPLICATION_FILES = ref_man.xml
+XML_REF3_FILES =
-XML_PART_FILES = part.xml part_notes.xml
-XML_CHAPTER_FILES = pman_chapter.xml notes.xml
+XML_PART_FILES = part_notes.xml
+XML_CHAPTER_FILES = notes.xml
BOOK_FILES = book.xml
@@ -47,10 +46,7 @@ XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-GIF_FILES = \
- main_window.gif \
- trace.gif \
- options.gif
+GIF_FILES =
# ----------------------------------------------------
@@ -58,6 +54,11 @@ HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
$(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
INFO_FILE = ../../info
+EXTRA_FILES = \
+ $(DEFAULT_GIF_FILES) \
+ $(DEFAULT_HTML_FILES) \
+ $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
@@ -65,7 +66,6 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
@@ -83,7 +83,7 @@ $(TOP_PDF_FILE): $(XML_FILES)
pdf: $(TOP_PDF_FILE)
-html: gifs $(HTML_REF_MAN_FILE)
+html: gifs $(HTML_REF_MAN_FILE)
man: $(MAN3_FILES)
@@ -95,7 +95,10 @@ clean clean_docs:
rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
+ rm -f errs core *~
+
+distclean: clean
+realclean: clean
# ----------------------------------------------------
# Release Target
@@ -109,8 +112,6 @@ release_docs_spec: docs
$(INSTALL_DATA) $(HTMLDIR)/* \
"$(RELSYSDIR)/doc/html"
$(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
release_spec:
diff --git a/lib/pman/doc/src/book.xml b/lib/typer/doc/src/book.xml
index 5d1d277fb7..5cc85a3022 100644
--- a/lib/pman/doc/src/book.xml
+++ b/lib/typer/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,26 +13,24 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
- <title>Pman</title>
+ <title>TypEr</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
</header>
- <pagetext>Pman</pagetext>
+ <pagetext></pagetext>
<preamble>
</preamble>
- <parts lift="no">
- <xi:include href="part.xml"/>
- </parts>
+ <pagetext>TypEr</pagetext>
<applications>
<xi:include href="ref_man.xml"/>
</applications>
diff --git a/lib/appmon/doc/src/fascicules.xml b/lib/typer/doc/src/fascicules.xml
index 0678195e07..b15610fa8b 100644
--- a/lib/appmon/doc/src/fascicules.xml
+++ b/lib/typer/doc/src/fascicules.xml
@@ -1,14 +1,8 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
+ <fascicule file="part_notes" href="part_notes_frame.html" entry="yes">
Release Notes
</fascicule>
<fascicule file="" href="../../../../doc/print.html" entry="no">
diff --git a/lib/typer/doc/src/notes.xml b/lib/typer/doc/src/notes.xml
new file mode 100644
index 0000000000..23e22759d6
--- /dev/null
+++ b/lib/typer/doc/src/notes.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>TypEr Release Notes</title>
+ <prepared>otp_appnotes</prepared>
+ <docno>nil</docno>
+ <date>nil</date>
+ <rev>nil</rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to TypEr.</p>
+
+<section><title>TypEr 0.9.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> The name of a compiler option has been fixed in the
+ Makefile. </p>
+ <p>
+ Own Id: OTP-11996</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>TypEr 0.9.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Added initial documentation framework for TypEr.</p>
+ <p>
+ Own Id: OTP-11860</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+
+
+</chapter>
+
diff --git a/lib/pman/doc/src/part.xml b/lib/typer/doc/src/part_notes.xml
index 29b88e0785..b4ccd3ed77 100644
--- a/lib/pman/doc/src/part.xml
+++ b/lib/typer/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>2006</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -21,17 +21,15 @@
</legalnotice>
- <title>Pman User's Guide</title>
+ <title>TypEr Release Notes</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
</header>
<description>
- <p>The process manager <em>Pman</em> is a graphical tool used to
- inspect the Erlang processes executing either locally or on remote
- nodes. It is also possible to trace events in the individual processes.</p>
+ <p><em>TypEr</em></p>
</description>
- <xi:include href="pman_chapter.xml"/>
+ <xi:include href="notes.xml"/>
</part>
diff --git a/lib/pman/doc/src/ref_man.xml b/lib/typer/doc/src/ref_man.xml
index 4deb1d9b3d..b54a5f5947 100644
--- a/lib/pman/doc/src/ref_man.xml
+++ b/lib/typer/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -21,17 +21,15 @@
</legalnotice>
- <title>Pman Reference Manual</title>
+ <title>TypEr</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
+ <file>ref_man.xml</file>
</header>
<description>
- <p>The process manager <em>Pman</em> is a graphical tool used to
- inspect the Erlang processes executing either locally or on remote
- nodes. It is also possible to trace events in the individual processes.</p>
</description>
- <xi:include href="pman.xml"/>
+ <xi:include href="typer_app.xml"/>
</application>
diff --git a/lib/appmon/doc/src/ref_man.xml b/lib/typer/doc/src/typer_app.xml
index ab9c3d5fdc..469a9be108 100644
--- a/lib/appmon/doc/src/ref_man.xml
+++ b/lib/typer/doc/src/typer_app.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE application SYSTEM "application.dtd">
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
-<application xmlns:xi="http://www.w3.org/2001/XInclude">
+<appref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,25 +13,31 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
- <title>Appmon Reference Manual</title>
+ <title>TypEr</title>
<prepared></prepared>
+ <responsible></responsible>
<docno></docno>
+ <approved></approved>
+ <checked></checked>
<date></date>
<rev></rev>
+ <file>typer.xml</file>
</header>
+ <app>TypEr</app>
+ <appsummary>The TypEr Application</appsummary>
<description>
- <p>The Application Monitor, <em>Appmon</em>, is a graphical utility used
- to supervise applications executing either locally or on remote nodes.
- The process tree of an application can furthermore be monitored.</p>
- </description>
- <xi:include href="appmon.xml"/>
-</application>
+ <p>An Erlang/OTP application that shows type information
+ for Erlang modules to the user. Additionally, it can
+ annotate the code of files with such type information.</p>
+ </description>
+
+</appref>
diff --git a/lib/typer/info b/lib/typer/info
new file mode 100644
index 0000000000..5145fbcfff
--- /dev/null
+++ b/lib/typer/info
@@ -0,0 +1,2 @@
+group: tools
+short: TypEr
diff --git a/lib/typer/src/Makefile b/lib/typer/src/Makefile
index 13af466755..a7059de971 100644
--- a/lib/typer/src/Makefile
+++ b/lib/typer/src/Makefile
@@ -63,7 +63,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_untyped_record +warn_missing_spec
+ERL_COMPILE_FLAGS += +warn_export_vars +warn_untyped_record +warn_missing_spec
# ----------------------------------------------------
# Targets
diff --git a/lib/typer/src/typer.app.src b/lib/typer/src/typer.app.src
index 850829e1dc..974091b44c 100644
--- a/lib/typer/src/typer.app.src
+++ b/lib/typer/src/typer.app.src
@@ -6,4 +6,6 @@
{modules, [typer]},
{registered, []},
{applications, [compiler, dialyzer, hipe, kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","hipe-3.10.3","erts-6.0",
+ "dialyzer-2.7","compiler-5.0"]}]}.
diff --git a/lib/typer/src/typer.appup.src b/lib/typer/src/typer.appup.src
index 54a63833e6..bebe7a159c 100644
--- a/lib/typer/src/typer.appup.src
+++ b/lib/typer/src/typer.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, typer}]}],
+ [{<<".*">>,[{restart_application, typer}]}]
+}.
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl
index 0ace1d5fb8..572bf24ca4 100644
--- a/lib/typer/src/typer.erl
+++ b/lib/typer/src/typer.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -63,10 +63,10 @@
%% Files in 'fms' are compilable with option 'to_pp'; we keep them
%% as {FileName, ModuleName} in case the ModuleName is different
fms = [] :: [{file:filename(), module()}],
- ex_func = map__new() :: map(),
- record = map__new() :: map(),
- func = map__new() :: map(),
- inc_func = map__new() :: map(),
+ ex_func = map__new() :: map_dict(),
+ record = map__new() :: map_dict(),
+ func = map__new() :: map_dict(),
+ inc_func = map__new() :: map_dict(),
trust_plt = dialyzer_plt:new() :: plt()}).
-type analysis() :: #analysis{}.
@@ -220,11 +220,11 @@ get_external(Exts, Plt) ->
-type fa() :: {atom(), arity()}.
-type func_info() :: {line(), atom(), arity()}.
--record(info, {records = map__new() :: map(),
+-record(info, {records = map__new() :: map_dict(),
functions = [] :: [func_info()],
- types = map__new() :: map(),
+ types = map__new() :: map_dict(),
edoc = false :: boolean()}).
--record(inc, {map = map__new() :: map(), filter = [] :: files()}).
+-record(inc, {map = map__new() :: map_dict(), filter = [] :: files()}).
-type inc() :: #inc{}.
-spec show_or_annotate(analysis()) -> 'ok'.
@@ -1094,29 +1094,29 @@ rcv_ext_types(Self, ExtTypes) ->
%% specialized for the uses in this module
%%--------------------------------------------------------------------
--type map() :: dict().
+-type map_dict() :: dict:dict().
--spec map__new() -> map().
+-spec map__new() -> map_dict().
map__new() ->
dict:new().
--spec map__insert({term(), term()}, map()) -> map().
+-spec map__insert({term(), term()}, map_dict()) -> map_dict().
map__insert(Object, Map) ->
{Key, Value} = Object,
dict:store(Key, Value, Map).
--spec map__lookup(term(), map()) -> term().
+-spec map__lookup(term(), map_dict()) -> term().
map__lookup(Key, Map) ->
try dict:fetch(Key, Map) catch error:_ -> none end.
--spec map__from_list([{fa(), term()}]) -> map().
+-spec map__from_list([{fa(), term()}]) -> map_dict().
map__from_list(List) ->
dict:from_list(List).
--spec map__remove(term(), map()) -> map().
+-spec map__remove(term(), map_dict()) -> map_dict().
map__remove(Key, Dict) ->
dict:erase(Key, Dict).
--spec map__fold(fun((term(), term(), term()) -> map()), map(), map()) -> map().
+-spec map__fold(fun((term(), term(), term()) -> map_dict()), map_dict(), map_dict()) -> map_dict().
map__fold(Fun, Acc0, Dict) ->
dict:fold(Fun, Acc0, Dict).
diff --git a/lib/typer/test/Makefile b/lib/typer/test/Makefile
new file mode 100644
index 0000000000..d6dd22b6cf
--- /dev/null
+++ b/lib/typer/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ typer_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/typer_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) typer.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/typer/test/typer.spec b/lib/typer/test/typer.spec
new file mode 100644
index 0000000000..79f51b6781
--- /dev/null
+++ b/lib/typer/test/typer.spec
@@ -0,0 +1 @@
+{suites,"../typer_test",all}.
diff --git a/lib/typer/test/typer_SUITE.erl b/lib/typer/test/typer_SUITE.erl
new file mode 100644
index 0000000000..99c4facbad
--- /dev/null
+++ b/lib/typer/test/typer_SUITE.erl
@@ -0,0 +1,56 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(typer_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ case application:ensure_all_started(typer) of
+ {ok, Apps} ->
+ [application:stop(App) || App <- lists:reverse(Apps)],
+ [app, appup];
+ _ ->
+ [appup]
+ end.
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the typer app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(typer).
+
+appup() ->
+ [{doc, "Test that the typer appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(typer).
diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk
index 5ac145d9ff..ce658e257b 100644
--- a/lib/typer/vsn.mk
+++ b/lib/typer/vsn.mk
@@ -1 +1 @@
-TYPER_VSN = 0.9.5
+TYPER_VSN = 0.9.8
diff --git a/lib/webtool/doc/src/book.xml b/lib/webtool/doc/src/book.xml
index ace70b5726..913d635b76 100644
--- a/lib/webtool/doc/src/book.xml
+++ b/lib/webtool/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/fascicules.xml b/lib/webtool/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/webtool/doc/src/fascicules.xml
+++ b/lib/webtool/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/webtool/doc/src/notes.xml b/lib/webtool/doc/src/notes.xml
index 76b73daa59..e571668c91 100644
--- a/lib/webtool/doc/src/notes.xml
+++ b/lib/webtool/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,35 @@
<p>This document describes the changes made to the Webtool
application.</p>
+<section><title>WebTool 0.8.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>WebTool 0.8.9.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/webtool/doc/src/notes_history.xml b/lib/webtool/doc/src/notes_history.xml
index a72a85412d..d491063565 100644
--- a/lib/webtool/doc/src/notes_history.xml
+++ b/lib/webtool/doc/src/notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/part.xml b/lib/webtool/doc/src/part.xml
index 9306ea020e..32275a02d2 100644
--- a/lib/webtool/doc/src/part.xml
+++ b/lib/webtool/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/part_notes.xml b/lib/webtool/doc/src/part_notes.xml
index 7d5592d3aa..75446ee687 100644
--- a/lib/webtool/doc/src/part_notes.xml
+++ b/lib/webtool/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/part_notes_history.xml b/lib/webtool/doc/src/part_notes_history.xml
index 76db9b7d9a..6a4a93d399 100644
--- a/lib/webtool/doc/src/part_notes_history.xml
+++ b/lib/webtool/doc/src/part_notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/ref_man.xml b/lib/webtool/doc/src/ref_man.xml
index 537e8697c9..3fbf289d66 100644
--- a/lib/webtool/doc/src/ref_man.xml
+++ b/lib/webtool/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/start_webtool.xml b/lib/webtool/doc/src/start_webtool.xml
index b525b38845..d02ddb996c 100644
--- a/lib/webtool/doc/src/start_webtool.xml
+++ b/lib/webtool/doc/src/start_webtool.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<copyright>
- <year>2003</year><year>2010</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/webtool.xml b/lib/webtool/doc/src/webtool.xml
index bbb25d29bd..375607e001 100644
--- a/lib/webtool/doc/src/webtool.xml
+++ b/lib/webtool/doc/src/webtool.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2001</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/doc/src/webtool_chapter.xml b/lib/webtool/doc/src/webtool_chapter.xml
index 77fcaebb4b..a233cd6662 100644
--- a/lib/webtool/doc/src/webtool_chapter.xml
+++ b/lib/webtool/doc/src/webtool_chapter.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile
index f28c777240..af565c8895 100644
--- a/lib/webtool/src/Makefile
+++ b/lib/webtool/src/Makefile
@@ -66,7 +66,7 @@ ERL_COMPILE_FLAGS += +warn_obsolete_guard
debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
clean:
- rm -f $(TARGET_FILES) $(APP_TARGET) $(APP_TARGET)
+ rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
rm -f core
docs:
diff --git a/lib/webtool/src/webtool.app.src b/lib/webtool/src/webtool.app.src
index 8c6774c533..3d8d11ea60 100644
--- a/lib/webtool/src/webtool.app.src
+++ b/lib/webtool/src/webtool.app.src
@@ -21,5 +21,7 @@
{vsn,"%VSN%"},
{modules,[webtool,webtool_sup]},
{registered,[web_tool,websup]},
- {applications,[kernel,stdlib]}]}.
+ {applications,[kernel,stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","observer-2.0","kernel-3.0",
+ "inets-5.10","erts-6.0"]}]}.
diff --git a/lib/webtool/src/webtool.appup.src b/lib/webtool/src/webtool.appup.src
index 7a435e9b22..9e6f4b9b5b 100644
--- a/lib/webtool/src/webtool.appup.src
+++ b/lib/webtool/src/webtool.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, webtool}]}],
+ [{<<".*">>,[{restart_application, webtool}]}]
+}.
diff --git a/lib/webtool/test/Makefile b/lib/webtool/test/Makefile
new file mode 100644
index 0000000000..93aa1c09eb
--- /dev/null
+++ b/lib/webtool/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ webtool_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/webtool_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) webtool.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/webtool/test/webtool.spec b/lib/webtool/test/webtool.spec
new file mode 100644
index 0000000000..134e6ed40c
--- /dev/null
+++ b/lib/webtool/test/webtool.spec
@@ -0,0 +1 @@
+{suites,"../webtool_test",all}.
diff --git a/lib/webtool/test/webtool_SUITE.erl b/lib/webtool/test/webtool_SUITE.erl
new file mode 100644
index 0000000000..64ff221a1b
--- /dev/null
+++ b/lib/webtool/test/webtool_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved via the world wide web at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(webtool_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the webtool app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(webtool).
+
+appup() ->
+ [{doc, "Test that the webtool appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(webtool).
diff --git a/lib/webtool/vsn.mk b/lib/webtool/vsn.mk
index d356a8954d..a79c273d9f 100644
--- a/lib/webtool/vsn.mk
+++ b/lib/webtool/vsn.mk
@@ -1 +1 @@
-WEBTOOL_VSN=0.8.9.2
+WEBTOOL_VSN=0.8.10
diff --git a/lib/wx/aclocal.m4 b/lib/wx/aclocal.m4
deleted file mode 100644
index 46b30a16b3..0000000000
--- a/lib/wx/aclocal.m4
+++ /dev/null
@@ -1,1914 +0,0 @@
-dnl
-dnl %CopyrightBegin%
-dnl
-dnl Copyright Ericsson AB 1998-2013. All Rights Reserved.
-dnl
-dnl The contents of this file are subject to the Erlang Public License,
-dnl Version 1.1, (the "License"); you may not use this file except in
-dnl compliance with the License. You should have received a copy of the
-dnl Erlang Public License along with this software. If not, it can be
-dnl retrieved online at http://www.erlang.org/.
-dnl
-dnl Software distributed under the License is distributed on an "AS IS"
-dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-dnl the License for the specific language governing rights and limitations
-dnl under the License.
-dnl
-dnl %CopyrightEnd%
-dnl
-
-dnl
-dnl aclocal.m4
-dnl
-dnl Local macros used in configure.in. The Local Macros which
-dnl could/should be part of autoconf are prefixed LM_, macros specific
-dnl to the Erlang system are prefixed ERL_.
-dnl
-
-AC_DEFUN(LM_PRECIOUS_VARS,
-[
-
-dnl ERL_TOP
-AC_ARG_VAR(ERL_TOP, [Erlang/OTP top source directory])
-
-dnl Tools
-AC_ARG_VAR(CC, [C compiler])
-AC_ARG_VAR(CFLAGS, [C compiler flags])
-AC_ARG_VAR(STATIC_CFLAGS, [C compiler static flags])
-AC_ARG_VAR(CFLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag passed via C compiler])
-AC_ARG_VAR(CPP, [C/C++ preprocessor])
-AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
-AC_ARG_VAR(CXX, [C++ compiler])
-AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
-AC_ARG_VAR(LD, [linker (is often overridden by configure)])
-AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
-AC_ARG_VAR(LIBS, [libraries])
-AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(DED_LD_FLAG_RUNTIME_LIBRARY_PATH, [runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
-AC_ARG_VAR(LFS_CFLAGS, [large file support C compiler flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LDFLAGS, [large file support linker flags (set all LFS_* variables or none)])
-AC_ARG_VAR(LFS_LIBS, [large file support libraries (set all LFS_* variables or none)])
-AC_ARG_VAR(RANLIB, [ranlib])
-AC_ARG_VAR(AR, [ar])
-AC_ARG_VAR(GETCONF, [getconf])
-
-dnl Cross system root
-AC_ARG_VAR(erl_xcomp_sysroot, [Absolute cross system root path (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_isysroot, [Absolute cross system root include path (only used when cross compiling)])
-
-dnl Cross compilation variables
-AC_ARG_VAR(erl_xcomp_bigendian, [big endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_double_middle_endian, [double-middle-endian system: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_clock_gettime_correction, [clock_gettime() can be used for time correction: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_nptl, [have Native POSIX Thread Library: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigusrx, [SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_linux_usable_sigaltstack, [have working sigaltstack(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_poll, [have working poll(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_kqueue, [have working kqueue(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_putenv_copy, [putenv() stores key-value copy: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_reliable_fpe, [have reliable floating point exceptions: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_getaddrinfo, [have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_gethrvtime_procfs_ioctl, [have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
-
-])
-
-AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
-[
-erl_xcomp_without_sysroot=no
-if test "$cross_compiling" = "yes"; then
- test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
- test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
-else
- erl_xcomp_sysroot=
- erl_xcomp_isysroot=
-fi
-])
-
-AC_DEFUN(LM_CHECK_GETCONF,
-[
-if test "$cross_compiling" != "yes"; then
- AC_CHECK_PROG([GETCONF], [getconf], [getconf], [false])
-else
- dnl First check if we got a `<HOST>-getconf' in $PATH
- host_getconf="$host_alias-getconf"
- AC_CHECK_PROG([GETCONF], [$host_getconf], [$host_getconf], [false])
- if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
- dnl We should perhaps give up if we have'nt found it by now, but at
- dnl least in one Tilera MDE `getconf' under sysroot is a bourne
- dnl shell script which we can use. We try to find `<HOST>-getconf'
- dnl or `getconf' under sysconf, but only under sysconf since
- dnl `getconf' in $PATH is almost guaranteed to be for the build
- dnl machine.
- GETCONF=
- prfx="$erl_xcomp_sysroot"
- AC_PATH_TOOL([GETCONF], [getconf], [false],
- ["$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"])
- fi
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_WINDOWS_ENVIRONMENT
-dnl
-dnl
-dnl Tries to determine thw windows build environment, i.e.
-dnl MIXED_CYGWIN_VC or MIXED_MSYS_VC
-dnl
-
-AC_DEFUN(LM_WINDOWS_ENVIRONMENT,
-[
-MIXED_CYGWIN=no
-MIXED_MSYS=no
-
-AC_MSG_CHECKING(for mixed cygwin or msys and native VC++ environment)
-if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([Cygwin and VC])
- MIXED_CYGWIN_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC"
- elif test -x /usr/bin/msysinfo; then
- CFLAGS="-O2"
- MIXED_MSYS=yes
- AC_MSG_RESULT([MSYS and VC])
- MIXED_MSYS_VC=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MSYS_VC"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
-else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_VC=no
- MIXED_MSYS_VC=no
-fi
-AC_SUBST(MIXED_CYGWIN_VC)
-AC_SUBST(MIXED_MSYS_VC)
-
-MIXED_VC=no
-if test "x$MIXED_MSYS_VC" = "xyes" -o "x$MIXED_CYGWIN_VC" = "xyes" ; then
- MIXED_VC=yes
-fi
-
-AC_SUBST(MIXED_VC)
-
-if test "x$MIXED_MSYS" != "xyes"; then
- AC_MSG_CHECKING(for mixed cygwin and native MinGW environment)
- if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then
- if test -x /usr/bin/cygpath; then
- CFLAGS="-O2"
- MIXED_CYGWIN=yes
- AC_MSG_RESULT([yes])
- MIXED_CYGWIN_MINGW=yes
- CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW"
- else
- AC_MSG_RESULT([undeterminable])
- AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!)
- fi
- else
- AC_MSG_RESULT([no])
- MIXED_CYGWIN_MINGW=no
- fi
-else
- MIXED_CYGWIN_MINGW=no
-fi
-AC_SUBST(MIXED_CYGWIN_MINGW)
-
-AC_MSG_CHECKING(if we mix cygwin with any native compiler)
-if test "X$MIXED_CYGWIN" = "Xyes"; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_CYGWIN)
-
-AC_MSG_CHECKING(if we mix msys with another native compiler)
-if test "X$MIXED_MSYS" = "Xyes" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST(MIXED_MSYS)
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_FIND_EMU_CC
-dnl
-dnl
-dnl Tries fairly hard to find a C compiler that can handle jump tables.
-dnl Defines the @EMU_CC@ variable for the makefiles and
-dnl inserts NO_JUMP_TABLE in the header if one cannot be found...
-dnl
-
-AC_DEFUN(LM_FIND_EMU_CC,
- [AC_CACHE_CHECK(for a compiler that handles jumptables,
- ac_cv_prog_emu_cc,
- [
-AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
-lbl1:
- return 1;
-lbl2:
- return 2;
-],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
-
-if test $ac_cv_prog_emu_cc = no; then
- for ac_progname in emu_cc.sh gcc-4.2 gcc; do
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_progname; then
- ac_cv_prog_emu_cc=$ac_dir/$ac_progname
- break
- fi
- done
- IFS="$ac_save_ifs"
- if test $ac_cv_prog_emu_cc != no; then
- break
- fi
- done
-fi
-
-if test $ac_cv_prog_emu_cc != no; then
- save_CC=$CC
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CC=$ac_cv_prog_emu_cc
- CFLAGS=""
- CPPFLAGS=""
- AC_TRY_COMPILE([],[
-#if defined(__clang_major__) && __clang_major__ >= 3
- /* clang 3.x or later is fine */
-#elif defined(__llvm__)
-#error "this version of llvm is unable to correctly compile beam_emu.c"
-#endif
- __label__ lbl1;
- __label__ lbl2;
- int x = magic();
- static void *jtab[2];
-
- jtab[0] = &&lbl1;
- jtab[1] = &&lbl2;
- goto *jtab[x];
- lbl1:
- return 1;
- lbl2:
- return 2;
- ],ac_cv_prog_emu_cc=$CC,ac_cv_prog_emu_cc=no)
- CC=$save_CC
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-])
-if test $ac_cv_prog_emu_cc = no; then
- AC_DEFINE(NO_JUMP_TABLE,[],[Defined if no found C compiler can handle jump tables])
- EMU_CC=$CC
-else
- EMU_CC=$ac_cv_prog_emu_cc
-fi
-AC_SUBST(EMU_CC)
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_INSTALL_DIR
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl Figure out how to create directories with parents.
-dnl (In my opinion INSTALL_DIR is a bad name, MKSUBDIRS or something is better)
-dnl
-dnl We prefer 'install -d', but use 'mkdir -p' if it exists.
-dnl If none of these methods works, we give up.
-dnl
-
-
-AC_DEFUN(LM_PROG_INSTALL_DIR,
-[AC_CACHE_CHECK(how to create a directory including parents,
-ac_cv_prog_mkdir_p,
-[
-temp_name_base=config.$$
-temp_name=$temp_name_base/x/y/z
-$INSTALL -d $temp_name >/dev/null 2>&1
-ac_cv_prog_mkdir_p=none
-if test -d $temp_name; then
- ac_cv_prog_mkdir_p="$INSTALL -d"
-else
- mkdir -p $temp_name >/dev/null 2>&1
- if test -d $temp_name; then
- ac_cv_prog_mkdir_p="mkdir -p"
- fi
-fi
-rm -fr $temp_name_base
-])
-
-case "${ac_cv_prog_mkdir_p}" in
- none) AC_MSG_ERROR(don't know how create directories with parents) ;;
- *) INSTALL_DIR="$ac_cv_prog_mkdir_p" AC_SUBST(INSTALL_DIR) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_PROG_PERL5
-dnl
-dnl Try to find perl version 5. If found set PERL to the absolute path
-dnl of the program, if not found set PERL to false.
-dnl
-dnl On some systems /usr/bin/perl is perl 4 and e.g.
-dnl /usr/local/bin/perl is perl 5. We try to handle this case by
-dnl putting a couple of
-dnl Tries to handle the case that there are two programs called perl
-dnl in the path and one of them is perl 5 and the other isn't.
-dnl
-AC_DEFUN(LM_PROG_PERL5,
-[AC_PATH_PROGS(PERL, perl5 perl, false,
- /usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH})
-changequote(, )dnl
-dnl[ That bracket is needed to balance the right bracket below
-if test "$PERL" = "false" || $PERL -e 'exit ($] >= 5)'; then
-changequote([, ])dnl
- ac_cv_path_PERL=false
- PERL=false
-dnl AC_MSG_WARN(perl version 5 not found)
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SO_BSDCOMPAT
-dnl
-dnl Check if the system has the SO_BSDCOMPAT flag on sockets (linux)
-dnl
-AC_DEFUN(LM_DECL_SO_BSDCOMPAT,
-[AC_CACHE_CHECK([for SO_BSDCOMPAT declaration], ac_cv_decl_so_bsdcompat,
-AC_TRY_COMPILE([#include <sys/socket.h>], [int i = SO_BSDCOMPAT;],
- ac_cv_decl_so_bsdcompat=yes,
- ac_cv_decl_so_bsdcompat=no))
-
-case "${ac_cv_decl_so_bsdcompat}" in
- "yes" ) AC_DEFINE(HAVE_SO_BSDCOMPAT,[],
- [Define if you have SO_BSDCOMPAT flag on sockets]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_INADDR_LOOPBACK
-dnl
-dnl Try to find declaration of INADDR_LOOPBACK, if nowhere provide a default
-dnl
-
-AC_DEFUN(LM_DECL_INADDR_LOOPBACK,
-[AC_CACHE_CHECK([for INADDR_LOOPBACK in netinet/in.h],
- ac_cv_decl_inaddr_loopback,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <netinet/in.h>], [int i = INADDR_LOOPBACK;],
-ac_cv_decl_inaddr_loopback=yes, ac_cv_decl_inaddr_loopback=no)
-])
-
-if test ${ac_cv_decl_inaddr_loopback} = no; then
- AC_CACHE_CHECK([for INADDR_LOOPBACK in rpc/types.h],
- ac_cv_decl_inaddr_loopback_rpc,
- AC_TRY_COMPILE([#include <rpc/types.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_rpc=yes,
- ac_cv_decl_inaddr_loopback_rpc=no))
-
- case "${ac_cv_decl_inaddr_loopback_rpc}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H,[],
- [Define if you need to include rpc/types.h to get INADDR_LOOPBACK defined]) ;;
- * )
- AC_CACHE_CHECK([for INADDR_LOOPBACK in winsock2.h],
- ac_cv_decl_inaddr_loopback_winsock2,
- AC_TRY_COMPILE([#define WIN32_LEAN_AND_MEAN
- #include <winsock2.h>],
- [int i = INADDR_LOOPBACK;],
- ac_cv_decl_inaddr_loopback_winsock2=yes,
- ac_cv_decl_inaddr_loopback_winsock2=no))
- case "${ac_cv_decl_inaddr_loopback_winsock2}" in
- "yes" )
- AC_DEFINE(DEF_INADDR_LOOPBACK_IN_WINSOCK2_H,[],
- [Define if you need to include winsock2.h to get INADDR_LOOPBACK defined]) ;;
- * )
- # couldn't find it anywhere
- AC_DEFINE(HAVE_NO_INADDR_LOOPBACK,[],
- [Define if you don't have a definition of INADDR_LOOPBACK]) ;;
- esac;;
- esac
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_SOCKADDR_SA_LEN
-dnl
-dnl Check if the sockaddr structure has the field sa_len
-dnl
-
-AC_DEFUN(LM_STRUCT_SOCKADDR_SA_LEN,
-[AC_CACHE_CHECK([whether struct sockaddr has sa_len field],
- ac_cv_struct_sockaddr_sa_len,
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>], [struct sockaddr s; s.sa_len = 10;],
- ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no))
-
-dnl FIXME convbreak
-case ${ac_cv_struct_sockaddr_sa_len} in
- "no" ) AC_DEFINE(NO_SA_LEN,[1],[Define if you dont have salen]) ;;
- *) ;;
-esac
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_STRUCT_EXCEPTION
-dnl
-dnl Check to see whether the system supports the matherr function
-dnl and its associated type "struct exception".
-dnl
-
-AC_DEFUN(LM_STRUCT_EXCEPTION,
-[AC_CACHE_CHECK([for struct exception (and matherr function)],
- ac_cv_struct_exception,
-AC_TRY_COMPILE([#include <math.h>],
- [struct exception x; x.type = DOMAIN; x.type = SING;],
- ac_cv_struct_exception=yes, ac_cv_struct_exception=no))
-
-case "${ac_cv_struct_exception}" in
- "yes" ) AC_DEFINE(USE_MATHERR,[1],[Define if you have matherr() function and struct exception type]) ;;
- * ) ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_IPV6
-dnl
-dnl Check for ipv6 support and what the in6_addr structure is called.
-dnl (early linux used in_addr6 insted of in6_addr)
-dnl
-
-AC_DEFUN(LM_SYS_IPV6,
-[AC_MSG_CHECKING(for IP version 6 support)
-AC_CACHE_VAL(ac_cv_sys_ipv6_support,
-[ok_so_far=yes
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in6_addr a6; struct sockaddr_in6 s6;], ok_so_far=yes, ok_so_far=no)
-
-if test $ok_so_far = yes; then
- ac_cv_sys_ipv6_support=yes
-else
- AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef __WIN32__
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <netinet/in.h>
-#endif],
- [struct in_addr6 a6; struct sockaddr_in6 s6;],
- ac_cv_sys_ipv6_support=in_addr6, ac_cv_sys_ipv6_support=no)
-fi
-])dnl
-
-dnl
-dnl Have to use old style AC_DEFINE due to BC with old autoconf.
-dnl
-
-case ${ac_cv_sys_ipv6_support} in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- ;;
- in_addr6)
- AC_MSG_RESULT([yes (but I am redefining in_addr6 to in6_addr)])
- AC_DEFINE(HAVE_IN6,[1],[Define if ipv6 is present])
- AC_DEFINE(HAVE_IN_ADDR6_STRUCT,[],[Early linux used in_addr6 instead of in6_addr, define if you have this])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
-esac
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_SYS_MULTICAST
-dnl
-dnl Check for multicast support. Only checks for multicast options in
-dnl setsockopt(), no check is performed that multicasting actually works.
-dnl If options are found defines HAVE_MULTICAST_SUPPORT
-dnl
-
-AC_DEFUN(LM_SYS_MULTICAST,
-[AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support,
-[AC_EGREP_CPP(yes,
-[#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP)
-yes
-#endif
-], ac_cv_sys_multicast_support=yes, ac_cv_sys_multicast_support=no)])
-if test $ac_cv_sys_multicast_support = yes; then
- AC_DEFINE(HAVE_MULTICAST_SUPPORT,[1],
- [Define if setsockopt() accepts multicast options])
-fi
-])dnl
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_DECL_SYS_ERRLIST
-dnl
-dnl Define SYS_ERRLIST_DECLARED if the variable sys_errlist is declared
-dnl in a system header file, stdio.h or errno.h.
-dnl
-
-AC_DEFUN(LM_DECL_SYS_ERRLIST,
-[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h or errno.h],
- ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#include <errno.h>], [char *msg = *(sys_errlist + 1);],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-if test $ac_cv_decl_sys_errlist = yes; then
- AC_DEFINE(SYS_ERRLIST_DECLARED,[],
- [define if the variable sys_errlist is declared in a system header file])
-fi
-])
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_FUNC_DECL( funname, declaration [, extra includes
-dnl [, action-if-found [, action-if-not-found]]] )
-dnl
-dnl Checks if the declaration "declaration" of "funname" conflicts
-dnl with the header files idea of how the function should be
-dnl declared. It is useful on systems which lack prototypes and you
-dnl need to provide your own (e.g. when you want to take the address
-dnl of a function). The 4'th argument is expanded if conflicting,
-dnl the 5'th argument otherwise
-dnl
-dnl
-
-AC_DEFUN(LM_CHECK_FUNC_DECL,
-[AC_MSG_CHECKING([for conflicting declaration of $1])
-AC_CACHE_VAL(ac_cv_func_decl_$1,
-[AC_TRY_COMPILE([#include <stdio.h>
-$3],[$2
-char *c = (char *)$1;
-], eval "ac_cv_func_decl_$1=no", eval "ac_cv_func_decl_$1=yes")])
-if eval "test \"`echo '$ac_cv_func_decl_'$1`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$4], , :, [$4])
-else
- AC_MSG_RESULT(no)
-ifelse([$5], , , [$5
-])dnl
-fi
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl AC_DOUBLE_MIDDLE_ENDIAN
-dnl
-dnl Checks whether doubles are represented in "middle-endian" format.
-dnl Sets ac_cv_double_middle_endian={no,yes,unknown} accordingly,
-dnl as well as DOUBLE_MIDDLE_ENDIAN.
-dnl
-dnl
-
-AC_DEFUN([AC_C_DOUBLE_MIDDLE_ENDIAN],
-[AC_CACHE_CHECK(whether double word ordering is middle-endian, ac_cv_c_double_middle_endian,
-[# It does not; compile a test program.
-AC_RUN_IFELSE(
-[AC_LANG_SOURCE([[#include <stdlib.h>
-
-int
-main(void)
-{
- int i = 0;
- int zero = 0;
- int bigendian;
- int zero_index = 0;
-
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
-
- /* we'll use the one with 32-bit words */
- union
- {
- double d;
- unsigned int c[2];
- } vint;
-
- union
- {
- double d;
- unsigned long c[2];
- } vlong;
-
- union
- {
- double d;
- unsigned short c[2];
- } vshort;
-
-
- /* Are we little or big endian? From Harbison&Steele. */
- u.l = 1;
- bigendian = (u.c[sizeof (long int) - 1] == 1);
-
- zero_index = bigendian ? 1 : 0;
-
- vint.d = 1.0;
- vlong.d = 1.0;
- vshort.d = 1.0;
-
- if (sizeof(unsigned int) == 4)
- {
- if (vint.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned long) == 4)
- {
- if (vlong.c[zero_index] != 0)
- zero = 1;
- }
- else if (sizeof(unsigned short) == 4)
- {
- if (vshort.c[zero_index] != 0)
- zero = 1;
- }
-
- exit (zero);
-}
-]])],
- [ac_cv_c_double_middle_endian=no],
- [ac_cv_c_double_middle_endian=yes],
- [ac_cv_c_double_middle=unknown])])
-case $ac_cv_c_double_middle_endian in
- yes)
- m4_default([$1],
- [AC_DEFINE([DOUBLE_MIDDLE_ENDIAN], 1,
- [Define to 1 if your processor stores the words in a double in
- middle-endian format (like some ARMs).])]) ;;
- no)
- $2 ;;
- *)
- m4_default([$3],
- [AC_MSG_WARN([unknown double endianness
-presetting ac_cv_c_double_middle_endian=no (or yes) will help])]) ;;
-esac
-])# AC_C_DOUBLE_MIDDLE_ENDIAN
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_CHECK_THR_LIB
-dnl
-dnl This macro may be used by any OTP application.
-dnl
-dnl LM_CHECK_THR_LIB sets THR_LIBS, THR_DEFS, and THR_LIB_NAME. It also
-dnl checks for some pthread headers which will appear in DEFS or config.h.
-dnl
-
-AC_DEFUN(LM_CHECK_THR_LIB,
-[
-
-NEED_NPTL_PTHREAD_H=no
-
-dnl win32?
-AC_MSG_CHECKING([for native win32 threads])
-if test "X$host_os" = "Xwin32"; then
- AC_MSG_RESULT(yes)
- THR_DEFS="-DWIN32_THREADS"
- THR_LIBS=
- THR_LIB_NAME=win32_threads
- THR_LIB_TYPE=win32_threads
-else
- AC_MSG_RESULT(no)
- THR_DEFS=
- THR_LIBS=
- THR_LIB_NAME=
- THR_LIB_TYPE=posix_unknown
-
-dnl Try to find POSIX threads
-
-dnl The usual pthread lib...
- AC_CHECK_LIB(pthread, pthread_create, THR_LIBS="-lpthread")
-
-dnl Very old versions of FreeBSD have pthreads in special c library, c_r...
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_LIB(c_r, pthread_create, THR_LIBS="-lc_r")
- fi
-
-dnl QNX has pthreads in standard C library
- if test "x$THR_LIBS" = "x"; then
- AC_CHECK_FUNC(pthread_create, THR_LIBS="none_needed")
- fi
-
-dnl On ofs1 the '-pthread' switch should be used
- if test "x$THR_LIBS" = "x"; then
- AC_MSG_CHECKING([if the '-pthread' switch can be used])
- saved_cflags=$CFLAGS
- CFLAGS="$CFLAGS -pthread"
- AC_TRY_LINK([#include <pthread.h>],
- pthread_create((void*)0,(void*)0,(void*)0,(void*)0);,
- [THR_DEFS="-pthread"
- THR_LIBS="-pthread"])
- CFLAGS=$saved_cflags
- if test "x$THR_LIBS" != "x"; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- fi
-
- if test "x$THR_LIBS" != "x"; then
- THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
- THR_LIB_NAME=pthread
- if test "x$THR_LIBS" = "xnone_needed"; then
- THR_LIBS=
- fi
- case $host_os in
- solaris*)
- THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
- linux*)
- THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
-
- LM_CHECK_GETCONF
- AC_MSG_CHECKING(for Native POSIX Thread Library)
- libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
- if test $? -eq 0; then
- case "$libpthr_vsn" in
- *nptl*|*NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
- elif test "$cross_compiling" = "yes"; then
- case "$erl_xcomp_linux_nptl" in
- "") nptl=cross;;
- yes|no) nptl=$erl_xcomp_linux_nptl;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl]);;
- esac
- else
- nptl=no
- fi
- AC_MSG_RESULT($nptl)
- if test $nptl = cross; then
- nptl=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $nptl = yes; then
- THR_LIB_TYPE=posix_nptl
- need_nptl_incldir=no
- AC_CHECK_HEADER(nptl/pthread.h,
- [need_nptl_incldir=yes
- NEED_NPTL_PTHREAD_H=yes])
- if test $need_nptl_incldir = yes; then
- # Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH"
- if test X$cross_compiling != Xyes; then
- nptl_path="$nptl_path:/usr/local/include:/usr/include"
- else
- IROOT="$erl_xcomp_isysroot"
- test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
- test "$IROOT" != "" || AC_MSG_ERROR([Don't know where to search for includes! Please set erl_xcomp_isysroot])
- nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
- fi
- nptl_ws_path=
- save_ifs="$IFS"; IFS=":"
- for dir in $nptl_path; do
- if test "x$dir" != "x"; then
- nptl_ws_path="$nptl_ws_path $dir"
- fi
- done
- IFS=$save_ifs
- nptl_incldir=
- for dir in $nptl_ws_path; do
- AC_CHECK_HEADER($dir/nptl/pthread.h,
- nptl_incldir=$dir/nptl)
- if test "x$nptl_incldir" != "x"; then
- THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
- break
- fi
- done
- if test "x$nptl_incldir" = "x"; then
- AC_MSG_ERROR(Failed to locate nptl system include directory)
- fi
- fi
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need THR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $THR_DEFS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h,
- AC_DEFINE(HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- fi
-fi
-
-])
-
-AC_DEFUN(ERL_INTERNAL_LIBS,
-[
-
-ERTS_INTERNAL_X_LIBS=
-
-AC_CHECK_LIB(kstat, kstat_open,
-[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat])
-ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"])
-
-AC_SUBST(ERTS_INTERNAL_X_LIBS)
-
-])
-
-AC_DEFUN(ETHR_CHK_SYNC_OP,
-[
- AC_MSG_CHECKING([for $3-bit $1()])
- case "$2" in
- "1") sync_call="$1(&var);";;
- "2") sync_call="$1(&var, ($4) 0);";;
- "3") sync_call="$1(&var, ($4) 0, ($4) 0);";;
- esac
- have_sync_op=no
- AC_TRY_LINK([],
- [
- $4 res;
- volatile $4 var;
- res = $sync_call
- ],
- [have_sync_op=yes])
- test $have_sync_op = yes && $5
- AC_MSG_RESULT([$have_sync_op])
-])
-
-AC_DEFUN(ETHR_CHK_INTERLOCKED,
-[
- ilckd="$1"
- AC_MSG_CHECKING([for ${ilckd}()])
- case "$2" in
- "1") ilckd_call="${ilckd}(var);";;
- "2") ilckd_call="${ilckd}(var, ($3) 0);";;
- "3") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0);";;
- "4") ilckd_call="${ilckd}(var, ($3) 0, ($3) 0, arr);";;
- esac
- have_interlocked_op=no
- AC_TRY_LINK(
- [
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <intrin.h>
- ],
- [
- volatile $3 *var;
- volatile $3 arr[2];
-
- $ilckd_call
- return 0;
- ],
- [have_interlocked_op=yes])
- test $have_interlocked_op = yes && $4
- AC_MSG_RESULT([$have_interlocked_op])
-])
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_FIND_ETHR_LIB
-dnl
-dnl NOTE! This macro may be changed at any time! Should *only* be used by
-dnl ERTS!
-dnl
-dnl Find a thread library to use. Sets ETHR_LIBS to libraries to link
-dnl with, ETHR_X_LIBS to extra libraries to link with (same as ETHR_LIBS
-dnl except that the ethread lib itself is not included), ETHR_DEFS to
-dnl defines to compile with, ETHR_THR_LIB_BASE to the name of the
-dnl thread library which the ethread library is based on, and ETHR_LIB_NAME
-dnl to the name of the library where the ethread implementation is located.
-dnl ERL_FIND_ETHR_LIB currently searches for 'pthreads', and
-dnl 'win32_threads'. If no thread library was found ETHR_LIBS, ETHR_X_LIBS,
-dnl ETHR_DEFS, ETHR_THR_LIB_BASE, and ETHR_LIB_NAME are all set to the
-dnl empty string.
-dnl
-
-AC_DEFUN(ERL_FIND_ETHR_LIB,
-[
-
-AC_ARG_ENABLE(native-ethr-impls,
- AS_HELP_STRING([--disable-native-ethr-impls],
- [disable native ethread implementations]),
-[ case "$enableval" in
- no) disable_native_ethr_impls=yes ;;
- *) disable_native_ethr_impls=no ;;
- esac ], disable_native_ethr_impls=no)
-
-test "X$disable_native_ethr_impls" = "Xyes" &&
- AC_DEFINE(ETHR_DISABLE_NATIVE_IMPLS, 1, [Define if you want to disable native ethread implementations])
-
-AC_ARG_ENABLE(x86-out-of-order,
- AS_HELP_STRING([--enable-x86-out-of-order],
- [enable x86/x84_64 out of order support (default disabled)]))
-
-AC_ARG_ENABLE(prefer-gcc-native-ethr-impls,
- AS_HELP_STRING([--enable-prefer-gcc-native-ethr-impls],
- [prefer gcc native ethread implementations]),
-[ case "$enableval" in
- yes) enable_prefer_gcc_native_ethr_impls=yes ;;
- *) enable_prefer_gcc_native_ethr_impls=no ;;
- esac ], enable_prefer_gcc_native_ethr_impls=no)
-
-test $enable_prefer_gcc_native_ethr_impls = yes &&
- AC_DEFINE(ETHR_PREFER_GCC_NATIVE_IMPLS, 1, [Define if you prefer gcc native ethread implementations])
-
-AC_ARG_WITH(libatomic_ops,
- AS_HELP_STRING([--with-libatomic_ops=PATH],
- [specify and prefer usage of libatomic_ops in the ethread library]))
-
-AC_ARG_WITH(with_sparc_memory_order,
- AS_HELP_STRING([--with-sparc-memory-order=TSO|PSO|RMO],
- [specify sparc memory order (defaults to RMO)]))
-
-LM_CHECK_THR_LIB
-ERL_INTERNAL_LIBS
-
-ethr_have_native_atomics=no
-ethr_have_native_spinlock=no
-ETHR_THR_LIB_BASE="$THR_LIB_NAME"
-ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
-ETHR_DEFS="$THR_DEFS"
-ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
-ETHR_LIBS=
-ETHR_LIB_NAME=
-
-ethr_modified_default_stack_size=
-
-dnl Name of lib where ethread implementation is located
-ethr_lib_name=ethread
-
-case "$THR_LIB_NAME" in
-
- win32_threads)
- ETHR_THR_LIB_BASE_DIR=win
- # * _WIN32_WINNT >= 0x0400 is needed for
- # TryEnterCriticalSection
- # * _WIN32_WINNT >= 0x0403 is needed for
- # InitializeCriticalSectionAndSpinCount
- # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
- #
- # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
- # and save it in ETHR_DEFS.
- found_win32_winnt=no
- for cppflag in $CPPFLAGS; do
- case $cppflag in
- -DWINVER*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- ;;
- -D_WIN32_WINNT*)
- ETHR_DEFS="$ETHR_DEFS $cppflag"
- found_win32_winnt=yes
- ;;
- *)
- ;;
- esac
- done
- if test $found_win32_winnt = no; then
- AC_MSG_ERROR([-D_WIN32_WINNT missing in CPPFLAGS])
- fi
-
- AC_DEFINE(ETHR_WIN32_THREADS, 1, [Define if you have win32 threads])
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- have_interlocked_op=no
- ethr_have_native_atomics=no
- else
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT, 1, [Define if you have _InterlockedDecrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement_rel], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT_REL, 1, [Define if you have _InterlockedDecrement_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT, 1, [Define if you have _InterlockedIncrement()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement_acq], [1], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ, 1, [Define if you have _InterlockedIncrement_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD, 1, [Define if you have _InterlockedExchangeAdd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd_acq], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ, 1, [Define if you have _InterlockedExchangeAdd_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND, 1, [Define if you have _InterlockedAnd()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR, 1, [Define if you have _InterlockedOr()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange], [2], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE, 1, [Define if you have _InterlockedExchange()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE, 1, [Define if you have _InterlockedCompareExchange()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_acq], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ, 1, [Define if you have _InterlockedCompareExchange_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange_rel], [3], [long], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL, 1, [Define if you have _InterlockedCompareExchange_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64, 1, [Define if you have _InterlockedDecrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedDecrement64_rel], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDDECREMENT64_REL, 1, [Define if you have _InterlockedDecrement64_rel()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64, 1, [Define if you have _InterlockedIncrement64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedIncrement64_acq], [1], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ, 1, [Define if you have _InterlockedIncrement64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64, 1, [Define if you have _InterlockedExchangeAdd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchangeAdd64_acq], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ, 1, [Define if you have _InterlockedExchangeAdd64_acq()]))
- ETHR_CHK_INTERLOCKED([_InterlockedAnd64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDAND64, 1, [Define if you have _InterlockedAnd64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedOr64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDOR64, 1, [Define if you have _InterlockedOr64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedExchange64], [2], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDEXCHANGE64, 1, [Define if you have _InterlockedExchange64()]))
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64, 1, [Define if you have _InterlockedCompareExchange64()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_acq], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ, 1, [Define if you have _InterlockedCompareExchange64_acq()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange64_rel], [3], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL, 1, [Define if you have _InterlockedCompareExchange64_rel()]))
- test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes
-
- ETHR_CHK_INTERLOCKED([_InterlockedCompareExchange128], [4], [__int64], AC_DEFINE_UNQUOTED(ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128, 1, [Define if you have _InterlockedCompareExchange128()]))
- fi
- test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
- ;;
-
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
- case $host_os in
- openbsd*)
- # The default stack size is insufficient for our needs
- # on OpenBSD. We increase it to 256 kilo words.
- ethr_modified_default_stack_size=256;;
- linux*)
- ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
-
- if test X$cross_compiling = Xyes; then
- case X$erl_xcomp_linux_usable_sigusrx in
- X) usable_sigusrx=cross;;
- Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx]);;
- esac
- case X$erl_xcomp_linux_usable_sigaltstack in
- X) usable_sigaltstack=cross;;
- Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
- *) AC_MSG_ERROR([Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack]);;
- esac
- else
- # FIXME: Test for actual problems instead of kernel versions
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- usable_sigusrx=no
- usable_sigaltstack=no;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- usable_sigaltstack=no;;
- *)
- usable_sigusrx=yes
- usable_sigaltstack=yes;;
- esac
- fi
-
- AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
- AC_MSG_RESULT($usable_sigusrx)
- if test $usable_sigusrx = cross; then
- usable_sigusrx=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigusrx = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
- fi
-
- AC_MSG_CHECKING(if sigaltstack can be used)
- AC_MSG_RESULT($usable_sigaltstack)
- if test $usable_sigaltstack = cross; then
- usable_sigaltstack=yes
- AC_MSG_WARN([result yes guessed because of cross compilation])
- fi
- if test $usable_sigaltstack = no; then
- ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
- fi
- ;;
- *) ;;
- esac
-
- dnl We sometimes need ETHR_DEFS in order to find certain headers
- dnl (at least for pthread.h on osf1).
- saved_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
-
- dnl We need the thread library in order to find some functions
- saved_libs="$LIBS"
- LIBS="$LIBS $ETHR_X_LIBS"
-
- dnl
- dnl Check for headers
- dnl
-
- AC_CHECK_HEADER(pthread.h, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
-[Define if you have the <pthread.h> header file.]))
-
- dnl Some Linuxes have <pthread/mit/pthread.h> instead of <pthread.h>
- AC_CHECK_HEADER(pthread/mit/pthread.h, \
- AC_DEFINE(ETHR_HAVE_MIT_PTHREAD_H, 1, \
-[Define if the pthread.h header file is in pthread/mit directory.]))
-
- if test $NEED_NPTL_PTHREAD_H = yes; then
- AC_DEFINE(ETHR_NEED_NPTL_PTHREAD_H, 1, \
-[Define if you need the <nptl/pthread.h> header file.])
- fi
-
- AC_CHECK_HEADER(sched.h, \
- AC_DEFINE(ETHR_HAVE_SCHED_H, 1, \
-[Define if you have the <sched.h> header file.]))
-
- AC_CHECK_HEADER(sys/time.h, \
- AC_DEFINE(ETHR_HAVE_SYS_TIME_H, 1, \
-[Define if you have the <sys/time.h> header file.]))
-
- AC_TRY_COMPILE([#include <time.h>
- #include <sys/time.h>],
- [struct timeval *tv; return 0;],
- AC_DEFINE(ETHR_TIME_WITH_SYS_TIME, 1, \
-[Define if you can safely include both <sys/time.h> and <time.h>.]))
-
-
- dnl
- dnl Check for functions
- dnl
-
- AC_CHECK_FUNC(pthread_spin_lock, \
- [ethr_have_native_spinlock=yes \
- AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
-[Define if you have the pthread_spin_lock function.])])
-
- have_sched_yield=no
- have_librt_sched_yield=no
- AC_CHECK_FUNC(sched_yield, [have_sched_yield=yes])
- if test $have_sched_yield = no; then
- AC_CHECK_LIB(rt, sched_yield,
- [have_librt_sched_yield=yes
- ETHR_X_LIBS="$ETHR_X_LIBS -lrt"])
- fi
- if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
- AC_DEFINE(ETHR_HAVE_SCHED_YIELD, 1, [Define if you have the sched_yield() function.])
- AC_MSG_CHECKING([whether sched_yield() returns an int])
- sched_yield_ret_int=no
- AC_TRY_COMPILE([
- #ifdef ETHR_HAVE_SCHED_H
- #include <sched.h>
- #endif
- ],
- [int sched_yield();],
- [sched_yield_ret_int=yes])
- AC_MSG_RESULT([$sched_yield_ret_int])
- if test $sched_yield_ret_int = yes; then
- AC_DEFINE(ETHR_SCHED_YIELD_RET_INT, 1, [Define if sched_yield() returns an int.])
- fi
- fi
-
- have_pthread_yield=no
- AC_CHECK_FUNC(pthread_yield, [have_pthread_yield=yes])
- if test $have_pthread_yield = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_YIELD, 1, [Define if you have the pthread_yield() function.])
- AC_MSG_CHECKING([whether pthread_yield() returns an int])
- pthread_yield_ret_int=no
- AC_TRY_COMPILE([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [int pthread_yield();],
- [pthread_yield_ret_int=yes])
- AC_MSG_RESULT([$pthread_yield_ret_int])
- if test $pthread_yield_ret_int = yes; then
- AC_DEFINE(ETHR_PTHREAD_YIELD_RET_INT, 1, [Define if pthread_yield() returns an int.])
- fi
- fi
-
- have_pthread_rwlock_init=no
- AC_CHECK_FUNC(pthread_rwlock_init, [have_pthread_rwlock_init=yes])
- if test $have_pthread_rwlock_init = yes; then
-
- ethr_have_pthread_rwlockattr_setkind_np=no
- AC_CHECK_FUNC(pthread_rwlockattr_setkind_np,
- [ethr_have_pthread_rwlockattr_setkind_np=yes])
-
- if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP, 1, \
-[Define if you have the pthread_rwlockattr_setkind_np() function.])
-
- AC_MSG_CHECKING([for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP])
- ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
- AC_TRY_LINK([
- #if defined(ETHR_NEED_NPTL_PTHREAD_H)
- #include <nptl/pthread.h>
- #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
- #include <pthread/mit/pthread.h>
- #elif defined(ETHR_HAVE_PTHREAD_H)
- #include <pthread.h>
- #endif
- ],
- [
- pthread_rwlockattr_t *attr;
- return pthread_rwlockattr_setkind_np(attr,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- ],
- [ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes])
- AC_MSG_RESULT([$ethr_pthread_rwlock_writer_nonrecursive_initializer_np])
- if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
- AC_DEFINE(ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 1, \
-[Define if you have the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP rwlock attribute.])
- fi
- fi
- fi
-
- if test "$force_pthread_rwlocks" = "yes"; then
-
- AC_DEFINE(ETHR_FORCE_PTHREAD_RWLOCK, 1, \
-[Define if you want to force usage of pthread rwlocks])
-
- if test $have_pthread_rwlock_init = yes; then
- AC_MSG_WARN([Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues.])
- else
- AC_MSG_ERROR([User forced usage of pthread rwlock, but no such implementation was found])
- fi
- fi
-
- AC_CHECK_FUNC(pthread_attr_setguardsize, \
- AC_DEFINE(ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE, 1, \
-[Define if you have the pthread_attr_setguardsize function.]))
-
- linux_futex=no
- AC_MSG_CHECKING([for Linux futexes])
- AC_TRY_LINK([
- #include <sys/syscall.h>
- #include <unistd.h>
- #include <linux/futex.h>
- #include <sys/time.h>
- ],
- [
- int i = 1;
- syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
- (void*)0,(void*)0, 0);
- syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
- (void*)0,(void*)0, 0);
- return 0;
- ],
- linux_futex=yes)
- AC_MSG_RESULT([$linux_futex])
- test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
-
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int128_t)
-
- if test "$ac_cv_sizeof_int" = "4"; then
- int32="int"
- elif test "$ac_cv_sizeof_long" = "4"; then
- int32="long"
- elif test "$ac_cv_sizeof_long_long" = "4"; then
- int32="long long"
- else
- AC_MSG_ERROR([No 32-bit type found])
- fi
-
- if test "$ac_cv_sizeof_int" = "8"; then
- int64="int"
- elif test "$ac_cv_sizeof_long" = "8"; then
- int64="long"
- elif test "$ac_cv_sizeof_long_long" = "8"; then
- int64="long long"
- else
- AC_MSG_ERROR([No 64-bit type found])
- fi
-
- int128=no
- if test "$ac_cv_sizeof___int128_t" = "16"; then
- int128="__int128_t"
- fi
-
- if test "X$disable_native_ethr_impls" = "Xyes"; then
- ethr_have_native_atomics=no
- else
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP32, 1, [Define if you have __sync_val_compare_and_swap() for 32-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH32, 1, [Define if you have __sync_add_and_fetch() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND32, 1, [Define if you have __sync_fetch_and_and() for 32-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [32], [$int32], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR32, 1, [Define if you have __sync_fetch_and_or() for 32-bit integers]))
-
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP64, 1, [Define if you have __sync_val_compare_and_swap() for 64-bit integers]))
- test "$have_sync_op" = "yes" && ethr_have_native_atomics=yes
- ETHR_CHK_SYNC_OP([__sync_add_and_fetch], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_ADD_AND_FETCH64, 1, [Define if you have __sync_add_and_fetch() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_and], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_AND64, 1, [Define if you have __sync_fetch_and_and() for 64-bit integers]))
- ETHR_CHK_SYNC_OP([__sync_fetch_and_or], [2], [64], [$int64], AC_DEFINE(ETHR_HAVE___SYNC_FETCH_AND_OR64, 1, [Define if you have __sync_fetch_and_or() for 64-bit integers]))
-
- if test $int128 != no; then
- ETHR_CHK_SYNC_OP([__sync_val_compare_and_swap], [3], [128], [$int128], AC_DEFINE(ETHR_HAVE___SYNC_VAL_COMPARE_AND_SWAP128, 1, [Define if you have __sync_val_compare_and_swap() for 128-bit integers]))
- fi
-
- AC_MSG_CHECKING([for a usable libatomic_ops implementation])
- case "x$with_libatomic_ops" in
- xno | xyes | x)
- libatomic_ops_include=
- ;;
- *)
- if test -d "${with_libatomic_ops}/include"; then
- libatomic_ops_include="-I$with_libatomic_ops/include"
- CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
- else
- AC_MSG_ERROR([libatomic_ops include directory $with_libatomic_ops/include not found])
- fi;;
- esac
- ethr_have_libatomic_ops=no
- AC_TRY_LINK([#include "atomic_ops.h"],
- [
- volatile AO_t x;
- AO_t y;
- int z;
-
- AO_nop_full();
- AO_store(&x, (AO_t) 0);
- z = AO_load(&x);
- z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1);
- ],
- [ethr_have_native_atomics=yes
- ethr_have_libatomic_ops=yes])
- AC_MSG_RESULT([$ethr_have_libatomic_ops])
- if test $ethr_have_libatomic_ops = yes; then
- AC_CHECK_SIZEOF(AO_t, ,
- [
- #include <stdio.h>
- #include "atomic_ops.h"
- ])
- AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used])
-
- AC_DEFINE(ETHR_HAVE_LIBATOMIC_OPS, 1, [Define if you have libatomic_ops atomic operations])
- if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_DEFINE(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS, 1, [Define if you prefer libatomic_ops native ethread implementations])
- fi
- ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
- elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
- AC_MSG_ERROR([No usable libatomic_ops implementation found])
- fi
-
- case "$host_cpu" in
- sparc | sun4u | sparc64 | sun4v)
- case "$with_sparc_memory_order" in
- "TSO")
- AC_DEFINE(ETHR_SPARC_TSO, 1, [Define if only run in Sparc TSO mode]);;
- "PSO")
- AC_DEFINE(ETHR_SPARC_PSO, 1, [Define if only run in Sparc PSO, or TSO mode]);;
- "RMO"|"")
- AC_DEFINE(ETHR_SPARC_RMO, 1, [Define if run in Sparc RMO, PSO, or TSO mode]);;
- *)
- AC_MSG_ERROR([Unsupported Sparc memory order: $with_sparc_memory_order]);;
- esac
- ethr_have_native_atomics=yes;;
- i86pc | i*86 | x86_64 | amd64)
- if test "$enable_x86_out_of_order" = "yes"; then
- AC_DEFINE(ETHR_X86_OUT_OF_ORDER, 1, [Define if x86/x86_64 out of order instructions should be synchronized])
- fi
- ethr_have_native_atomics=yes;;
- macppc | ppc | powerpc | "Power Macintosh")
- ethr_have_native_atomics=yes;;
- tile)
- ethr_have_native_atomics=yes;;
- *)
- ;;
- esac
-
- fi
-
- test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes
-
- dnl Restore LIBS
- LIBS=$saved_libs
- dnl restore CPPFLAGS
- CPPFLAGS=$saved_cppflags
-
- ;;
- *)
- ;;
-esac
-
-AC_MSG_CHECKING([whether default stack size should be modified])
-if test "x$ethr_modified_default_stack_size" != "x"; then
- AC_DEFINE_UNQUOTED(ETHR_MODIFIED_DEFAULT_STACK_SIZE, $ethr_modified_default_stack_size, [Define if you want to modify the default stack size])
- AC_MSG_RESULT([yes; to $ethr_modified_default_stack_size kilo words])
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$ETHR_THR_LIB_BASE" != "x"; then
- ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
- ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
- ETHR_LIB_NAME=$ethr_lib_name
-fi
-
-AC_CHECK_SIZEOF(void *)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
-
-AC_CHECK_SIZEOF(int)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_INT, $ac_cv_sizeof_int, [Define to the size of int])
-AC_CHECK_SIZEOF(long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG, $ac_cv_sizeof_long, [Define to the size of long])
-AC_CHECK_SIZEOF(long long)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long, [Define to the size of long long])
-AC_CHECK_SIZEOF(__int64)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT64, $ac_cv_sizeof___int64, [Define to the size of __int64])
-AC_CHECK_SIZEOF(__int128_t)
-AC_DEFINE_UNQUOTED(ETHR_SIZEOF___INT128_T, $ac_cv_sizeof___int128_t, [Define to the size of __int128_t])
-
-
-case X$erl_xcomp_bigendian in
- X) ;;
- Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian]);;
-esac
-
-AC_C_BIGENDIAN
-
-if test "$ac_cv_c_bigendian" = "yes"; then
- AC_DEFINE(ETHR_BIGENDIAN, 1, [Define if bigendian])
-fi
-
-case X$erl_xcomp_double_middle_endian in
- X) ;;
- Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;;
- *) AC_MSG_ERROR([Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian]);;
-esac
-
-AC_C_DOUBLE_MIDDLE_ENDIAN
-
-ETHR_X86_SSE2_ASM=no
-case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in
- yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64)
- AC_MSG_CHECKING([for gcc sse2 asm support])
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -msse2"
- gcc_sse2_asm=no
- AC_TRY_COMPILE([],
- [
- long long x, *y;
- __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory");
- ],
- [gcc_sse2_asm=yes])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$gcc_sse2_asm])
- if test "$gcc_sse2_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_SSE2_ASM_SUPPORT, 1, [Define if you use a gcc that supports -msse2 and understand sse2 specific asm statements])
- ETHR_X86_SSE2_ASM=yes
- fi
- ;;
- *)
- ;;
-esac
-
-case "$GCC-$host_cpu" in
- yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64)
- gcc_dw_cmpxchg_asm=no
- AC_MSG_CHECKING([for gcc double word cmpxchg asm support])
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
- __asm__ __volatile__(
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "pushl %%ebx\n\t"
- "movl %8, %%ebx\n\t"
-#endif
-#if ETHR_SIZEOF_PTR == 4
- "lock; cmpxchg8b %0\n\t"
-#else
- "lock; cmpxchg16b %0\n\t"
-#endif
- "setz %3\n\t"
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "popl %%ebx\n\t"
-#endif
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]),
-#if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- "r"(new[0])
-#else
- "b"(new[0])
-#endif
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test $gcc_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then
- AC_TRY_COMPILE([],
- [
- char xchgd;
- long new[2], xchg[2], *p;
-#if !defined(__PIC__) || !__PIC__
-# error nope
-#endif
- __asm__ __volatile__(
- "pushl %%ebx\n\t"
- "movl (%7), %%ebx\n\t"
- "movl 4(%7), %%ecx\n\t"
- "lock; cmpxchg8b %0\n\t"
- "setz %3\n\t"
- "popl %%ebx\n\t"
- : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd)
- : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new)
- : "cc", "memory");
-
- ],
- [gcc_dw_cmpxchg_asm=yes])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_CMPXCHG8B_REGISTER_SHORTAGE, 1, [Define if you get a register shortage with cmpxchg8b and position independent code])
- fi
- fi
- AC_MSG_RESULT([$gcc_dw_cmpxchg_asm])
- if test "$gcc_dw_cmpxchg_asm" = "yes"; then
- AC_DEFINE(ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT, 1, [Define if you use a gcc that supports the double word cmpxchg instruction])
- fi;;
- *)
- ;;
-esac
-
-AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \
-[Define if you have all ethread defines])
-
-AC_SUBST(ETHR_X_LIBS)
-AC_SUBST(ETHR_LIBS)
-AC_SUBST(ETHR_LIB_NAME)
-AC_SUBST(ETHR_DEFS)
-AC_SUBST(ETHR_THR_LIB_BASE)
-AC_SUBST(ETHR_THR_LIB_BASE_DIR)
-AC_SUBST(ETHR_X86_SSE2_ASM)
-
-])
-
-
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl ERL_TIME_CORRECTION
-dnl
-dnl In the presence of a high resolution realtime timer Erlang can adapt
-dnl its view of time relative to this timer. On solaris such a timer is
-dnl available with the syscall gethrtime(). On other OS's a fallback
-dnl solution using times() is implemented. (However on e.g. FreeBSD times()
-dnl is implemented using gettimeofday so it doesn't make much sense to
-dnl use it there...) On second thought, it seems to be safer to do it the
-dnl other way around. I.e. only use times() on OS's where we know it will
-dnl work...
-dnl
-
-AC_DEFUN(ERL_TIME_CORRECTION,
-[if test x$ac_cv_func_gethrtime = x; then
- AC_CHECK_FUNC(gethrtime)
-fi
-if test x$clock_gettime_correction = xunknown; then
- AC_TRY_COMPILE([#include <time.h>],
- [struct timespec ts;
- long long result;
- clock_gettime(CLOCK_MONOTONIC,&ts);
- result = ((long long) ts.tv_sec) * 1000000000LL +
- ((long long) ts.tv_nsec);],
- clock_gettime_compiles=yes,
- clock_gettime_compiles=no)
-else
- clock_gettime_compiles=no
-fi
-
-
-AC_CACHE_CHECK([how to correct for time adjustments], erl_cv_time_correction,
-[
-case $clock_gettime_correction in
- yes)
- erl_cv_time_correction=clock_gettime;;
- no|unknown)
- case $ac_cv_func_gethrtime in
- yes)
- erl_cv_time_correction=hrtime ;;
- no)
- case $host_os in
- linux*)
- case $clock_gettime_correction in
- unknown)
- if test x$clock_gettime_compiles = xyes; then
- if test X$cross_compiling != Xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
- else
- case X$erl_xcomp_linux_clock_gettime_correction in
- X)
- erl_cv_time_correction=cross;;
- Xyes|Xno)
- if test $erl_xcomp_linux_clock_gettime_correction = yes; then
- erl_cv_time_correction=clock_gettime
- else
- erl_cv_time_correction=times
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction]);;
- esac
- fi
- else
- erl_cv_time_correction=times
- fi
- ;;
- *)
- erl_cv_time_correction=times ;;
- esac
- ;;
- *)
- erl_cv_time_correction=none ;;
- esac
- ;;
- esac
- ;;
-esac
-])
-
-xrtlib=""
-case $erl_cv_time_correction in
- times)
- AC_DEFINE(CORRECT_USING_TIMES,[],
- [Define if you do not have a high-res. timer & want to use times() instead])
- ;;
- clock_gettime|cross)
- if test $erl_cv_time_correction = cross; then
- erl_cv_time_correction=clock_gettime
- AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
- fi
- xrtlib="-lrt"
- AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
- [Define if you want to use clock_gettime to simulate gethrtime])
- ;;
-esac
-dnl
-dnl Check if gethrvtime is working, and if to use procfs ioctl
-dnl or (yet to be written) write to the procfs ctl file.
-dnl
-
-AC_MSG_CHECKING([if gethrvtime works and how to use it])
-AC_TRY_RUN([
-/* gethrvtime procfs ioctl test */
-/* These need to be undef:ed to not break activation of
- * micro level process accounting on /proc/self
- */
-#ifdef _LARGEFILE_SOURCE
-# undef _LARGEFILE_SOURCE
-#endif
-#ifdef _FILE_OFFSET_BITS
-# undef _FILE_OFFSET_BITS
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/fault.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <fcntl.h>
-
-int main() {
- long msacct = PR_MSACCT;
- int fd;
- long long start, stop;
- int i;
- pid_t pid = getpid();
- char proc_self[30] = "/proc/";
-
- sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid);
- if ( (fd = open(proc_self, O_WRONLY)) == -1)
- exit(1);
- if (ioctl(fd, PIOCSET, &msacct) < 0)
- exit(2);
- if (close(fd) < 0)
- exit(3);
- start = gethrvtime();
- for (i = 0; i < 100; i++)
- stop = gethrvtime();
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
-}
-],
-erl_gethrvtime=procfs_ioctl,
-erl_gethrvtime=false,
-[
-case X$erl_xcomp_gethrvtime_procfs_ioctl in
- X)
- erl_gethrvtime=cross;;
- Xyes|Xno)
- if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
- erl_gethrvtime=procfs_ioctl
- else
- erl_gethrvtime=false
- fi;;
- *)
- AC_MSG_ERROR([Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl]);;
-esac
-])
-
-case $erl_gethrvtime in
- procfs_ioctl)
- AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
- [define if gethrvtime() works and uses ioctl() to /proc/self])
- AC_MSG_RESULT(uses ioctl to procfs)
- ;;
- *)
- if test $erl_gethrvtime = cross; then
- erl_gethrvtime=false
- AC_MSG_RESULT(cross)
- AC_MSG_WARN([result 'not working' guessed because of cross compilation])
- else
- AC_MSG_RESULT(not working)
- fi
-
- dnl
- dnl Check if clock_gettime (linux) is working
- dnl
-
- AC_MSG_CHECKING([if clock_gettime can be used to get process CPU time])
- save_libs=$LIBS
- LIBS="-lrt"
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
- #include <time.h>
- int main() {
- long long start, stop;
- int i;
- struct timespec tp;
-
- if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp) < 0)
- exit(1);
- start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- for (i = 0; i < 100; i++)
- clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
- stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec;
- if (start == 0)
- exit(4);
- if (start == stop)
- exit(5);
- exit(0); return 0;
- }
- ],
- erl_clock_gettime=yes,
- erl_clock_gettime=no,
- [
- case X$erl_xcomp_clock_gettime_cpu_time in
- X) erl_clock_gettime=cross;;
- Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
- *) AC_MSG_ERROR([Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time]);;
- esac
- ])
- LIBS=$save_libs
- case $host_os in
- linux*)
- AC_MSG_RESULT([no; not stable])
- LIBRT=$xrtlib
- ;;
- *)
- AC_MSG_RESULT($erl_clock_gettime)
- case $erl_clock_gettime in
- yes)
- AC_DEFINE(HAVE_CLOCK_GETTIME,[],
- [define if clock_gettime() works for getting process time])
- LIBRT=-lrt
- ;;
- cross)
- erl_clock_gettime=no
- AC_MSG_WARN([result no guessed because of cross compilation])
- LIBRT=$xrtlib
- ;;
- *)
- LIBRT=$xrtlib
- ;;
- esac
- ;;
- esac
- AC_SUBST(LIBRT)
- ;;
-esac
-])dnl
-
-dnl ----------------------------------------------------------------------
-dnl
-dnl LM_TRY_ENABLE_CFLAG
-dnl
-dnl
-dnl Tries a CFLAG and sees if it can be enabled without compiler errors
-dnl $1: textual cflag to add
-dnl $2: variable to store the modified CFLAG in
-dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
-dnl
-dnl
-AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
- saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $$2";
- AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
- CFLAGS=$saved_CFLAGS;
- if test "X$can_enable_flag" = "Xtrue"; then
- AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $$2")
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl ERL_TRY_LINK_JAVA(CLASSES, FUNCTION-BODY
-dnl [ACTION_IF_FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Freely inspired by AC_TRY_LINK. (Maybe better to create a
-dnl AC_LANG_JAVA instead...)
-AC_DEFUN(ERL_TRY_LINK_JAVA,
-[java_link='$JAVAC conftest.java 1>&AC_FD_CC'
-changequote(, )dnl
-cat > conftest.java <<EOF
-$1
-class conftest { public static void main(String[] args) {
- $2
- ; return; }}
-EOF
-changequote([, ])dnl
-if AC_TRY_EVAL(java_link) && test -s conftest.class; then
- ifelse([$3], , :, [rm -rf conftest*
- $3])
-else
- echo "configure: failed program was:" 1>&AC_FD_CC
- cat conftest.java 1>&AC_FD_CC
- echo "configure: PATH was $PATH" 1>&AC_FD_CC
-ifelse([$4], , , [ rm -rf conftest*
- $4
-])dnl
-fi
-rm -f conftest*])
-#define UNSAFE_MASK 0xc0000000 /* Mask for bits that must be constant */
-
-
diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile
index 8adb485ba9..3e41ac7bc5 100644
--- a/lib/wx/api_gen/Makefile
+++ b/lib/wx/api_gen/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2012. All Rights Reserved.
+# Copyright Ericsson AB 2008-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -60,7 +60,7 @@ $(GL): glxml_generated $(GL_COMP_T) glapi.conf
erl -noshell -run gl_gen code && touch gl_code_generated
%.beam: %.erl wx_gen.hrl gl_gen.hrl
- $(ERLC) -W $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) $< -o$(EBIN)
+ $(ERLC) -W $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
# TODO split cleans into separate targets?
complete_clean:
diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl
index 2ba1c6e16f..9b08815bf7 100644
--- a/lib/wx/api_gen/gen_util.erl
+++ b/lib/wx/api_gen/gen_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -222,11 +222,12 @@ halt(Reason) ->
erl_copyright() ->
StartYear = start_year(get(current_class)),
+ {CurrentYear,_,_} = erlang:date(),
w("%%~n",[]),
w("%% %CopyrightBegin%~n",[]),
w("%%~n",[]),
- w("%% Copyright Ericsson AB ~p-2013. All Rights Reserved.~n",
- [StartYear]),
+ w("%% Copyright Ericsson AB ~p-~p. All Rights Reserved.~n",
+ [StartYear, CurrentYear]),
w("%%~n",[]),
w("%% The contents of this file are subject to the Erlang Public License,~n",[]),
w("%% Version 1.1, (the \"License\"); you may not use this file except in~n",[]),
@@ -242,10 +243,11 @@ erl_copyright() ->
w("%% %CopyrightEnd%~n",[]).
c_copyright() ->
+ {CurrentYear,_,_} = erlang:date(),
w("/*~n",[]),
w(" * %CopyrightBegin%~n",[]),
w(" *~n",[]),
- w(" * Copyright Ericsson AB 2008-2013. All Rights Reserved.~n",[]),
+ w(" * Copyright Ericsson AB 2008-~p. All Rights Reserved.~n",[CurrentYear]),
w(" *~n",[]),
w(" * The contents of this file are subject to the Erlang Public License,~n",[]),
w(" * Version 1.1, (the \"License\"); you may not use this file except in~n",[]),
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index 446521098e..7c24128d85 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -91,7 +91,6 @@ types() ->
gl_api(Fs) ->
open_write("../src/gen/gl.erl", [{encoding,utf8}]),
- w("%% -*- coding: utf-8 -*-~n~n", []),
erl_copyright(),
w("~n%% OPENGL API~n~n", []),
w("%% This file is generated DO NOT EDIT~n~n", []),
@@ -150,7 +149,6 @@ gl_api(Fs) ->
glu_api(Fs) ->
open_write("../src/gen/glu.erl", [{encoding,utf8}]),
- w("%% -*- coding: utf-8 -*-~n~n", []),
erl_copyright(),
w("~n%% OPENGL UTILITY API~n~n", []),
w("%% This file is generated DO NOT EDIT~n~n", []),
diff --git a/lib/wx/api_gen/wx_doxygen.conf b/lib/wx/api_gen/wx_doxygen.conf
index 829702cbbf..f4d3c99ec0 100644
--- a/lib/wx/api_gen/wx_doxygen.conf
+++ b/lib/wx/api_gen/wx_doxygen.conf
@@ -57,7 +57,6 @@ GENERATE_DEPRECATEDLIST= NO
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@@ -110,7 +109,6 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
@@ -251,7 +249,9 @@ PREDEFINED = \
wxUSE_DATAOBJ=1 \
wxUSE_SLIDER=1 \
wxUSE_CLIPBOARD=1 \
+ wxUSE_POPUPWIN=1 \
wxUSE_SYSTEM_OPTIONS=1 \
+ wxUSE_INTL=1 \
wxABI_VERSION=20809 \
__WXGTK24__=1 \
__WXGTK20__=1 \
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
index 9c5f46b253..5d20019d8f 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
@@ -1,17 +1,5 @@
-case 98: { // wxeEvtListener::wxeEvtListener
- wxeEvtListener *Result = new wxeEvtListener(Ecmd.port);
- rt.addRef(getRef((void *)Result,memenv), "wxeEvtListener");
- break;
-}
-case 99: { // wxeEvtListener::destroy
- wxObject *This = (wxObject *) getPtr(bp,memenv);
- rt.addAtom("ok");
- delete This;
- break;
-}
-case 100: { // wxEvtHandler::Connect
- wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
+case 100: { // wxEvtHandler::Connect
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
int * lastId = (int *) bp; bp += 4;
@@ -22,20 +10,22 @@ case 100: { // wxEvtHandler::Connect
int * eventTypeLen = (int *) bp; bp += 4;
int * class_nameLen = (int *) bp; bp += 4;
- if(*haveUserData) {
+ if(*haveUserData) {
userData = new wxeErlTerm(Ecmd.bin[0]);
}
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
char *class_name = bp; bp+= *class_nameLen;
if(eventType > 0 ) {
- wxeCallbackData * Evt_cb = new wxeCallbackData(Ecmd.caller,getRef(This, memenv),
- class_name,*fun_cb,
- *skip, userData, Listener);
+ wxeEvtListener * Evt_cb = new wxeEvtListener(Ecmd.caller,getRef(This, memenv),
+ class_name,*fun_cb,
+ *skip, userData, Ecmd.port);
This->Connect((int) *winid,(int) *lastId,eventType,
(wxObjectEventFunction)(wxEventFunction) &wxeEvtListener::forward,
- Evt_cb, Listener);
+ Evt_cb, Evt_cb);
rt.addAtom("ok");
+ rt.addRef(getRef((void *)Evt_cb,memenv), "wxeEvtListener");
+ rt.addTupleCount(2);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
@@ -43,7 +33,7 @@ case 100: { // wxEvtHandler::Connect
}
break;
}
-case 101: { // wxEvtHandler::Disconnect
+case 101: { // wxEvtHandler::Disconnect
wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
@@ -53,14 +43,14 @@ case 101: { // wxEvtHandler::Disconnect
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
if(eventType > 0) {
bool Result = This->Disconnect((int) *winid,(int) *lastId,eventType,
- (wxObjectEventFunction)(wxEventFunction)
- &wxeEvtListener::forward,
- NULL, Listener);
+ (wxObjectEventFunction)(wxEventFunction)
+ &wxeEvtListener::forward,
+ NULL, Listener);
rt.addBool(Result);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
- rt.addTupleCount(2);
+ rt.addTupleCount(2);
}
break;
}
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index c5802af679..c9726fd475 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -27,15 +27,11 @@
-export([connect/2, connect/3, disconnect/1, disconnect/2, disconnect/3]).
%% internal exports
--export([connect_impl/3, disconnect_impl/2, disconnect_impl/3,
- new_evt_listener/0, destroy_evt_listener/1,
- get_callback/1, replace_fun_with_id/2]).
+-export([connect_impl/2, disconnect_impl/2]).
-export_type([wxEvtHandler/0, wx/0, event/0]).
-type wxEvtHandler() :: wx:wx_object().
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
@@ -130,54 +126,34 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
%% @hidden
-connect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType,
- skip=Skip, userdata=Userdata, cb=FunID})
+connect_impl(#wx_ref{type=ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ skip=Skip, userdata=Userdata, cb=FunID})
when is_integer(FunID)->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
ThisTypeBin = list_to_binary([atom_to_list(ThisT)|[0]]),
UD = if Userdata =:= [] -> 0;
- true ->
+ true ->
wxe_util:send_bin(term_to_binary(Userdata)),
1
end,
- wxe_util:call(100, <<EvtList:32/?UI,ThisRef:32/?UI,
+ wxe_util:call(100, <<ThisRef:32/?UI,
Winid:32/?UI,LastId:32/?UI,
(wxe_util:from_bool(Skip)):32/?UI,
UD:32/?UI,
FunID:32/?UI,
(size(EventTypeBin)):32/?UI,
- (size(ThisTypeBin)):32/?UI,
+ (size(ThisTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary,ThisTypeBin/binary>>).
%% @hidden
-disconnect_impl(Listener, Object) ->
- disconnect_impl(Listener, Object, #evh{}).
-%% @hidden
-disconnect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=_ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType}) ->
+disconnect_impl(#wx_ref{type=_ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ handler=#wx_ref{type=wxeEvtListener,ref=EvtList}}) ->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
- wxe_util:call(101, <<EvtList:32/?UI,
+ wxe_util:call(101, <<EvtList:32/?UI,
ThisRef:32/?UI,Winid:32/?UI,LastId:32/?UI,
(size(EventTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary>>).
-
-%% @hidden
-new_evt_listener() ->
- wxe_util:call(98, <<>>).
-
-%% @hidden
-destroy_evt_listener(#wx_ref{type=wxeEvtListener,ref=EvtList}) ->
- wxe_util:call(99, <<EvtList:32/?UI>>).
-
-%% @hidden
-get_callback(#evh{cb=Callback}) ->
- Callback.
-
-%% @hidden
-replace_fun_with_id(Evh, Id) ->
- Evh#evh{cb=Id}.
diff --git a/lib/wx/api_gen/wx_extra/wxListCtrl.c_src b/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
index 8fa31e512e..d6196d11a2 100644
--- a/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
+++ b/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -165,7 +165,7 @@ case ~s: { // wxListCtrl::SortItems taylormade
callbackInfo* cb = new callbackInfo();
cb->port = Ecmd.port;
cb->callbackID = sortCallback;
- bool Result = This->SortItems(wxEListCtrlCompare, (long)cb);
+ bool Result = This->SortItems(wxEListCtrlCompare, (wxeIntPtr)cb);
delete cb;
/* Destroy the callback, see wxEPrintout::clear_cb */
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 3ca8cd7d14..a60a9a93d5 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
-include_lib("xmerl/include/xmerl.hrl").
--import(lists, [foldl/3,foldr/3,reverse/1, keysearch/3, map/2, filter/2]).
+-import(lists, [foldl/3,foldr/3,reverse/1,keysearch/3,map/2,filter/2,droplast/1]).
-import(proplists, [get_value/2,get_value/3]).
-compile(export_all).
@@ -69,7 +69,7 @@ gen_code() ->
gen_xml() ->
%% {ok, Defs} = file:consult("wxapi.conf"),
-%% Rel = reverse(tl(reverse(os:cmd("wx-config --release")))),
+%% Rel = droplast(os:cmd("wx-config --release")),
%% Dir = " /usr/include/wx-" ++ Rel ++ "/wx/",
%% Files0 = [Dir ++ File || {class, File, _, _, _} <- Defs],
%% Files1 = [Dir ++ File || {doxygen, File} <- Defs],
@@ -172,7 +172,7 @@ parse_defs([], Acc) -> reverse(Acc).
meta_info(C=#class{name=CName,methods=Ms0}) ->
Ms = lists:append(Ms0),
HaveConstructor = lists:keymember(constructor, #method.method_type, Ms),
- case lists:keysearch(destructor, #method.method_type, Ms) of
+ case keysearch(destructor, #method.method_type, Ms) of
false when HaveConstructor ->
Dest = #method{name = "destroy", id = next_id(func_id),
method_type = destructor, params = [this(CName)]},
@@ -288,7 +288,7 @@ parse_attr1([{{attr,_}, #xmlElement{content=C, attributes=Attrs}}|R], AttrList0,
parse_attr1([{_Id,_}|R],AttrList,Info, Res) ->
parse_attr1(R,AttrList,Info, Res);
parse_attr1([],Left,_, Res) ->
- {lists:reverse(Res), Left}.
+ {reverse(Res), Left}.
attr_acc(#param{name=N}, List) ->
Name = list_to_atom(N),
@@ -743,7 +743,14 @@ parse_type2([N="wxTreeItemData"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name="wxETreeItemData",base={term,N}});
parse_type2([N="wxClientData"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name="wxeErlTerm",base={term,N}});
-parse_type2([N="wxChar"|R],Info,Opts,T) ->
+parse_type2([N="wxChar",{by_ref,_}|R],Info,Opts,T = #type{mod=[const]}) ->
+ case get(current_class) of
+ "wxLocale" -> %% Special since changed between 2.8 and 3.0
+ parse_type2(R,Info,Opts,T#type{name="wxeLocaleC",base=string});
+ _ ->
+ parse_type2(R,Info,Opts,T#type{name=N,base=int,single=false})
+ end;
+parse_type2([N="wxChar"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name=N,base=int});
parse_type2(["wxUint32"|R],Info,Opts,T=#type{mod=Mod}) ->
parse_type2(R,Info,Opts,T#type{name=int,base=int,mod=[unsigned|Mod]});
@@ -994,7 +1001,7 @@ erl_skip_opt2([F={_,{N,In,_},M=#method{where=Where}}|Ms],Acc1,Acc2,Check) ->
[] ->
erl_skip_opt2(Ms,[F|Acc1],[M#method{where=erl_no_opt}|Acc2],[]);
_ ->
- Skipped = reverse(tl(reverse(In))),
+ Skipped = droplast(In),
T = fun({_,{_,Args,_},_}) -> true =:= types_differ(Skipped,Args) end,
case lists:all(T, Check) of
true ->
@@ -1274,6 +1281,7 @@ parse_enums([File|Files], Parsed) ->
%%io:format("Parse Enums in ~s ~n", [FileName]),
case xmerl_scan:file(FileName, [{space, normalize}]) of
{error, enoent} ->
+ %% io:format("Ignore ~p~n", [FileName]),
parse_enums(Files, gb_sets:add(File,Parsed));
{Doc, _} ->
ES = "./compounddef/sectiondef/memberdef[@kind=\"enum\"]",
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 6eed0668f6..107d064f4a 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -71,7 +71,8 @@ gen_derived_dest_2(C=#class{name=Class, options=Opts}) ->
if Derived andalso (TaylorMade =:= false) ->
case lists:keysearch(ifdef,1,Opts) of
- {value, {ifdef, What}} -> w("#if ~p~n",[What]);
+ {value, {ifdef, What}} when is_list(What)-> w("#if ~s~n",[What]);
+ {value, {ifdef, What}} when is_atom(What) -> w("#if ~p~n",[What]);
_ -> ok
end,
w("class E~s : public ~s {~n",[Class,Class]),
@@ -190,10 +191,15 @@ gen_funcs(Defs) ->
%% w(" case WXE_REMOVE_PORT:~n", []),
%% w(" { destroyMemEnv(Ecmd.port); } break;~n", []),
w(" case DESTROY_OBJECT: {~n"),
- w(" wxObject *This = (wxObject *) getPtr(bp,memenv); "),
- w(" if(This) {"),
- w(" ((WxeApp *) wxTheApp)->clearPtr((void *) This);~n"),
- w(" delete This; }~n } break;~n"),
+ 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(" delayed_delete->Append(Ecmd.Save());~n"),
+ w(" } else {~n"),
+ w(" ((WxeApp *) wxTheApp)->clearPtr(This);~n"),
+ w(" delete_object(This, refd); }~n"),
+ w(" } } break;~n"),
w(" case WXE_REGISTER_OBJECT: {~n"
" registerPid(bp, Ecmd.caller, memenv);~n"
" rt.addAtom(\"ok\");~n"
@@ -231,24 +237,27 @@ gen_funcs(Defs) ->
"wxFileDataObject", "wxTextDataObject", "wxBitmapDataObject"
],
- w("void WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []),
+ w("bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []),
w(" switch(refd->type) {~n", []),
- Case = fun(#class{name=Class, id=Id, abstract=IsAbs, parent=P}) when P /= "static" ->
+ Case = fun(C=#class{name=Class, id=Id, abstract=IsAbs, parent=P}) when P /= "static" ->
UglyWorkaround = lists:member(Class, UglySkipList),
+ HaveVirtual = virtual_dest(C),
case hd(reverse(wx_gen_erl:parents(Class))) of
- root when IsAbs == false, UglyWorkaround == false ->
- w(" case ~p: delete (~s *) ptr; break;~n", [Id, Class]);
root when IsAbs == false, UglyWorkaround == true ->
w(" case ~p: /* delete (~s *) ptr;"
"These objects must be deleted by owner object */ "
"break;~n", [Id, Class]);
+ root when IsAbs == false, HaveVirtual == true ->
+ w(" case ~p: delete (E~s *) ptr; return false;~n", [Id, Class]);
+ root when IsAbs == false, UglyWorkaround == false ->
+ w(" case ~p: delete (~s *) ptr; break;~n", [Id, Class]);
_ -> ok
end;
(_) -> ok
end,
[Case(Class) || Class <- Defs],
- w(" default: delete (wxObject *) ptr;~n", []),
- w("}}~n~n", []),
+ w(" default: delete (wxObject *) ptr; return false;~n", []),
+ w(" }~n return true;~n}~n~n", []),
Res.
gen_class(C=#class{name=Name,methods=Ms,options=Opts}) ->
@@ -263,7 +272,8 @@ gen_class(C=#class{name=Name,methods=Ms,options=Opts}) ->
false ->
case lists:keysearch(ifdef,1,Opts) of
{value, {ifdef, What}} ->
- w("#if ~p~n",[What]),
+ is_atom(What) andalso w("#if ~p~n",[What]),
+ is_list(What) andalso w("#if ~s~n",[What]),
Methods = lists:flatten(Ms),
MsR = [gen_method(Name,M) ||
M <- lists:keysort(#method.id, Methods)],
@@ -397,6 +407,8 @@ declare_type(N,true,Def,#type{base=Base,single=true,name=Type,by_val=false,ref={
w(" ~s *~s=~s;~n", [Type,N,Def]);
declare_type(N,true,Def,#type{single=true,name="wxArtClient"}) ->
w(" wxArtClient ~s= ~s;~n", [N,Def]);
+declare_type(N,true,_Def,#type{name="wxeLocaleC", single=true,base=string}) ->
+ w(" wxString ~s= wxEmptyString;~n", [N]);
declare_type(N,true,Def,#type{single=true,base=string}) ->
w(" wxString ~s= ~s;~n", [N,Def]);
%% declare_type(N,true,_Def,#type{name="wxString"}) ->
@@ -726,9 +738,13 @@ call_wx(_N,{constructor,_},#type{base={class,RClass}},Ps) ->
false -> 0
end;
false ->
- case hd(reverse(wx_gen_erl:parents(RClass))) of
- root -> Id;
- _ -> 1
+ case is_dc(RClass) of
+ true -> 4;
+ false ->
+ case hd(reverse(wx_gen_erl:parents(RClass))) of
+ root -> Id;
+ _ -> 1
+ end
end
end,
case virtual_dest(ClassDef) orelse (CType =/= 0) of
@@ -890,6 +906,10 @@ is_window(Class) ->
is_dialog(Class) ->
lists:member("wxDialog", wx_gen_erl:parents(Class)).
+is_dc(Class) ->
+ Parents = wx_gen_erl:parents(Class),
+ lists:member("wxDC", Parents) orelse lists:member("wxGraphicsContext", Parents).
+
build_return_vals(Type,Ps) ->
HaveType = case Type of void -> 0; _ -> 1 end,
NoOut = lists:sum([1 || #param{in=In} <- Ps, In =/= true]) + HaveType,
@@ -993,6 +1013,8 @@ build_ret(Name,_,#type{base=float,single=true}) ->
w(" rt.addFloat(~s);~n",[Name]);
build_ret(Name,_,#type{base=double,single=true}) ->
w(" rt.addFloat(~s);~n",[Name]);
+build_ret(Name,_,#type{name="wxeLocaleC"}) ->
+ w(" rt.add(wxeLocaleC2String(~s));~n",[Name]);
build_ret(Name,_,#type{base=string,single=true}) ->
w(" rt.add(~s);~n",[Name]);
build_ret(Name,_,#type{name="wxArrayString", single=array}) ->
@@ -1086,6 +1108,7 @@ gen_macros() ->
w("#include <wx/listbook.h>~n"),
w("#include <wx/treebook.h>~n"),
w("#include <wx/taskbar.h>~n"),
+ w("#include <wx/popupwin.h>~n"),
w("#include <wx/html/htmlwin.h>~n"),
w("#include <wx/html/htmlcell.h>~n"),
w("#include <wx/filename.h>~n"),
@@ -1186,15 +1209,6 @@ find_id(OtherClass) ->
encode_events(Evs) ->
?WTC("encode_events"),
- w("void wxeEvtListener::forward(wxEvent& event)~n"
- "{~n"
- "#ifdef DEBUG~n"
- " if(!sendevent(&event, port))~n"
- " fprintf(stderr, \"Couldn't send event!\\r\\n\");~n"
- "#else~n"
- "sendevent(&event, port);~n"
- "#endif~n"
- "}~n~n"),
w("int getRef(void* ptr, wxeMemEnv* memenv)~n"
"{~n"
" WxeApp * app = (WxeApp *) wxTheApp;~n"
@@ -1205,7 +1219,7 @@ encode_events(Evs) ->
" char * evClass = NULL;~n"
" wxMBConvUTF32 UTFconverter;~n"
" wxeEtype *Etype = etmap[event->GetEventType()];~n"
- " wxeCallbackData *cb = (wxeCallbackData *)event->m_callbackUserData;~n"
+ " wxeEvtListener *cb = (wxeEvtListener *)event->m_callbackUserData;~n"
" WxeApp * app = (WxeApp *) wxTheApp;~n"
" wxeMemEnv *memenv = app->getMemEnv(port);~n"
" if(!memenv) return 0;~n~n"
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index c87187edc5..5ac781b40c 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,7 +44,11 @@ gen(Defs) ->
gen_unique_names(Defs),
gen_event_recs(),
gen_enums_ints(),
- [gen_class(Class) || Class <- Defs],
+ Static = gen_static([C || C=#class{parent="static"} <- Defs]),
+ Replace = fun(C=#class{name=Name}, Dfs) ->
+ lists:keyreplace(Name, #class.name, Dfs, C)
+ end,
+ [gen_class(Class) || Class <- lists:foldl(Replace, Defs, Static)],
gen_funcnames().
gen_class(Class) ->
@@ -54,9 +58,8 @@ gen_class(Class) ->
Class
end.
-gen_class1(C=#class{name=Name,parent="static",methods=Ms,options=_Opts}) ->
+gen_static(Files) ->
open_write("../src/gen/wx_misc.erl"),
- put(current_class, Name),
erl_copyright(),
w("", []),
w("%% This file is generated DO NOT EDIT~n~n", []),
@@ -67,17 +70,27 @@ gen_class1(C=#class{name=Name,parent="static",methods=Ms,options=_Opts}) ->
w("-module(wx_misc).~n", []),
w("-include(\"wxe.hrl\").~n",[]),
%% w("-compile(export_all).~n~n", []), %% XXXX remove ???
+ [gen_static_exports(C) || C <- Files],
+ Classes = [gen_static_methods(C) || C <- Files],
+ close(),
+ Classes.
+
+gen_static_exports(C=#class{parent="static",methods=Ms}) ->
Exp = fun(M) -> gen_export(C,M) end,
ExportList = lists:usort(lists:append(lists:map(Exp,reverse(Ms)))),
w("-export([~s]).~n~n", [args(fun({EF,_}) -> EF end, ",", ExportList, 60)]),
+ ok.
+gen_static_methods(C=#class{name=Name, parent="static",methods=Ms}) ->
+ put(current_class, Name),
Gen = fun(M) -> gen_method(Name,M) end,
NewMs = lists:map(Gen,reverse(Ms)),
- close(),
erase(current_class),
- C#class{methods=NewMs};
+ C#class{methods=NewMs}.
+gen_class1(C=#class{parent="static"}) ->
+ C;
gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
case Opts of
["ignore"] -> throw(skipped);
@@ -137,15 +150,27 @@ gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
w("%% inherited exports~n",[]),
Done0 = ["Destroy", "New", "Create", "destroy", "new", "create"],
Done = gb_sets:from_list(Done0 ++ [M|| #method{name=M} <- lists:append(Ms)]),
- {_, InExported} = gen_inherited(Parents, Done, []),
- w("-export([~s]).~n~n", [args(fun(EF) -> EF end, ",",
- lists:usort(["parent_class/1"|InExported]),
+ {_, InExported0} = gen_inherited(Parents, Done, []),
+ InExported = lists:ukeysort(2, [{?MODULE,{"parent_class","1"},false}|InExported0]),
+ w("-export([~s]).~n~n", [args(fun({_M,{F,A},_Dep}) -> F ++ "/" ++ A end, ",",
+ InExported,
60)]),
w("-export_type([~s/0]).~n", [Name]),
case lists:filter(fun({_F,Depr}) -> Depr end, ExportList) of
[] -> ok;
Depr -> w("-deprecated([~s]).~n~n", [args(fun({EF,_}) -> EF end, ",", Depr, 60)])
end,
+ case lists:filter(fun({_,_,Depr}) -> Depr end, InExported) of
+ [] -> ok;
+ NoWDepr -> w("-compile([~s]).~n~n",
+ [args(fun({M,{F,A},_}) ->
+ DStr=io_lib:format("{nowarn_deprecated_function, {~s,~s,~s}}",
+ [M,F,A]),
+ lists:flatten(DStr)
+ end, ",", NoWDepr, 60)])
+ end,
+
+
w("%% @hidden~n", []),
parents_check(Parents),
w("-type ~s() :: wx:wx_object().~n", [Name]),
@@ -375,7 +400,7 @@ gen_inherited([Parent|Ps], Done0, Exported0) ->
{Done,Exported} = gen_inherited_ms(Ms, Class, Done0, gb_sets:empty(), Exported0),
gen_inherited(Ps, gb_sets:union(Done,Done0), Exported).
-gen_inherited_ms([[#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|_]|R],
+gen_inherited_ms([[M=#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|_]|R],
Class,Skip,Done, Exported)
when W =/= merged_c ->
case gb_sets:is_member(Name,Skip) of
@@ -399,8 +424,10 @@ gen_inherited_ms([[#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|
_ when W =:= erl_no_opt -> 0;
_ -> 1
end,
- Export = erl_func_name(Name,A) ++ "/" ++ integer_to_list(length(Args) + OptLen),
- gen_inherited_ms(R,Class,Skip, gb_sets:add(Name,Done), [Export|Exported]);
+ {_, Depr} = deprecated(M,ignore),
+ Export = {Class,{erl_func_name(Name,A),integer_to_list(length(Args) + OptLen)}, Depr},
+ gen_inherited_ms(R,Class,Skip, gb_sets:add(Name,Done),
+ [Export|Exported]);
_ ->
gen_inherited_ms(R,Class, Skip, Done, Exported)
end;
@@ -741,7 +768,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}) ->
+optional_type2(#param{name=Name, def=_Def, type=T}) ->
"{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
doc_link("utils", Func) ->
@@ -1343,4 +1370,3 @@ split_list(F, Keep, [M|Ms], Acc) ->
split_list(_, _, [], []) -> [];
split_list(_, _, [], Acc) -> [lists:reverse(Acc)].
-
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index ff680d0655..2e961cce98 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -31,7 +31,8 @@
%%
wxALWAYS_NATIVE_DOUBLE_BUFFER,
wxGAUGE_EMULATE_INDETERMINATE_MODE,
- wxTR_DEFAULT_STYLE
+ wxTR_DEFAULT_STYLE,
+ wxSL_LABELS
]}.
{gvars,
@@ -877,6 +878,7 @@
{class, wxTextCtrl, wxControl, [],
['wxTextCtrl','~wxTextCtrl','AppendText','CanCopy','CanCut','CanPaste',
'CanRedo','CanUndo','Clear','Copy','Create','Cut','DiscardEdits',
+ 'ChangeValue',
'EmulateKeyPress','GetDefaultStyle','GetInsertionPoint','GetLastPosition',
'GetLineLength','GetLineText','GetNumberOfLines','GetRange','GetSelection',
'GetStringSelection','GetStyle','GetValue',%'HitTest', %no Mac
@@ -1577,9 +1579,14 @@
'wxShutdown', {'wxShell', 1}, 'wxLaunchDefaultBrowser',
{'wxGetEmailAddress',0}, {'wxGetUserId',0}, {'wxGetHomeDir',0},
'wxNewId', 'wxRegisterId', 'wxGetCurrentId',
- 'wxGetOsDescription', 'wxIsPlatformLittleEndian', 'wxIsPlatform64Bit'
+ 'wxGetOsDescription', 'wxIsPlatformLittleEndian', 'wxIsPlatform64Bit'
]}.
+{class, gdicmn, static, [],
+ [ {'wxDisplaySize', [{"width", [out]}, {"height", [out]}]}, 'wxSetCursor'
+ ]}.
+
+
{class, wxPrintout, object, [{alias, [{wxePrintout, wxePrintout}]}],
[{'wxPrintout', [{where, taylormade}]},'~wxPrintout',
'GetDC', %% 'GetPageInfo',Callback
@@ -1883,3 +1890,28 @@
[{event,[wxEVT_TASKBAR_MOVE,wxEVT_TASKBAR_LEFT_DOWN,wxEVT_TASKBAR_LEFT_UP,
wxEVT_TASKBAR_RIGHT_DOWN,wxEVT_TASKBAR_RIGHT_UP,
wxEVT_TASKBAR_LEFT_DCLICK,wxEVT_TASKBAR_RIGHT_DCLICK]}],[]}.
+
+{class, wxInitDialogEvent, wxEvent, [{event,[wxEVT_INIT_DIALOG]}], []}.
+
+{class, wxLocale, root, [{skip, [{'wxLocale', 5}, {'Init', 6}]}],
+ ['wxLocale', '~wxLocale', 'Init',
+ 'AddCatalog','AddCatalogLookupPathPrefix',
+ %%'AddLanguage','FindLanguageInfo', 'GetLanguageInfo',
+ 'GetCanonicalName','GetLanguage',
+ 'GetLanguageName','GetLocale','GetName','GetString',
+ 'GetHeaderValue',
+ 'GetSysName',
+ 'GetSystemEncoding','GetSystemEncodingName',
+ 'GetSystemLanguage',
+ 'IsLoaded','IsOk']}.
+
+{class, wxActivateEvent, wxEvent,
+ [{acc, [{m_active, "GetActive()"}]},
+ {event, [wxEVT_ACTIVATE, wxEVT_ACTIVATE_APP, wxEVT_HIBERNATE]}],
+ ['GetActive']}.
+
+{class, wxPopupWindow, wxWindow, [{ifdef, wxUSE_POPUPWIN}],
+ ['wxPopupWindow', '~wxPopupWindow', 'Create', 'Position']}.
+
+{class, wxPopupTransientWindow, wxPopupWindow, [{ifdef, wxUSE_POPUPWIN}],
+ ['wxPopupTransientWindow', '~wxPopupTransientWindow', 'Popup', 'Dismiss']}.
diff --git a/lib/wx/autoconf/config.guess b/lib/wx/autoconf/config.guess
deleted file mode 100755
index f475ceb413..0000000000
--- a/lib/wx/autoconf/config.guess
+++ /dev/null
@@ -1,1534 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-#
-# Please send patches with a ChangeLog entry to [email protected].
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# ([email protected] 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # [email protected] (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <[email protected]>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <[email protected]> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/lib/wx/autoconf/config.sub b/lib/wx/autoconf/config.sub
deleted file mode 100755
index bb6edbdb47..0000000000
--- a/lib/wx/autoconf/config.sub
+++ /dev/null
@@ -1,1789 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
-
-timestamp='2013-02-12'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches with a ChangeLog entry to [email protected].
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <[email protected]>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2013 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
- ;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
- ;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- xscaleeb)
- basic_machine=armeb-unknown
- ;;
-
- xscaleel)
- basic_machine=armel-unknown
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i386-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- mmix)
- basic_machine=mmix-knuth
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
- -nacl*)
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- hexagon-*)
- os=-elf
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
- *-ibm)
- os=-aix
- ;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -cnk*|-aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
-
diff --git a/lib/wx/autoconf/install-sh b/lib/wx/autoconf/install-sh
deleted file mode 100755
index f694552bc2..0000000000
--- a/lib/wx/autoconf/install-sh
+++ /dev/null
@@ -1,258 +0,0 @@
-#! /bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-srcxtra=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- if [ $# -ne 1 ]; then
- srcxtra="$srcxtra $1"
- fi
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-srcxtra="$src $srcxtra"
-src=""
-dstsave=$dst
-
-if [ x"$dir_arg" != x ]; then
- srcxtra="$srcxtra $dst"
-fi
-
-# Now loop over $srcxtra
-
-for src in $srcxtra ; do
-
-dst=$dstsave
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi
-
-done &&
-
-
-exit 0
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index 5507a74c14..4a7342f714 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2012. All Rights Reserved.
+# Copyright Ericsson AB 2008-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -34,8 +34,9 @@ SO_EXT = @SO_EXT@
OBJC_CC=@OBJC_CC@
OBJC_CFLAGS=@OBJC_CFLAGS@
-GENERAL = wxe_driver wxe_ps_init wxe_impl wxePrintout wxe_return wxe_gl
-GENERAL_H = wxe_driver.h wxe_impl.h wxe_return.h
+GENERAL = wxe_driver wxe_ps_init wxe_main wxe_impl wxe_helpers wxe_callback_impl wxe_return wxe_gl
+GENERAL_H = wxe_callback_impl.h wxe_driver.h wxe_events.h wxe_gl.h \
+ wxe_helpers.h wxe_impl.h wxe_memory.h wxe_return.h
GENERATED_F = wxe_funcs wxe_events wxe_init
GENERATED_H = gen/wxe_macros.h
@@ -79,8 +80,8 @@ TARGET_DIR = ../priv/$(SYS_TYPE)
COMMON_CFLAGS = @DEFS@ $(ERL_INCS)
CC = @CC@
-CPP = @CXX@
-LD = $(CPP)
+CXX = @CXX@
+LD = $(CXX)
LDFLAGS = @LDFLAGS@
RESCOMP = @WX_RESCOMP@
@@ -110,7 +111,7 @@ GL_LIBS = @GL_LIBS@
CC_O = $(V_CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
OBJC_CC_O = $(OBJC_CC) -c $(CFLAGS) $(OBJC_CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
-CPP_O = $(V_CPP) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
+CXX_O = $(V_CXX) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
# Targets
@@ -140,7 +141,7 @@ $(WX_OBJECTS): $(GENERATED_H) $(GENERAL_H)
$(SYS_TYPE)/%.o: %.cpp
$(V_at)mkdir -p $(SYS_TYPE)
- $(CPP_O) $< -o $@
+ $(CXX_O) $< -o $@
$(SYS_TYPE)/%.o: %.c
$(V_at)mkdir -p $(SYS_TYPE)
@@ -152,7 +153,7 @@ $(SYS_TYPE)/wxe_ps_init.o: wxe_ps_init.c
$(SYS_TYPE)/%.o: gen/%.cpp
$(V_at)mkdir -p $(SYS_TYPE)
- $(CPP_O) $< -o $@
+ $(CXX_O) $< -o $@
$(SYS_TYPE)/%.o: gen/%.c
$(V_at)mkdir -p $(SYS_TYPE)
diff --git a/lib/wx/c_src/gen/wxe_derived_dest.h b/lib/wx/c_src/gen/wxe_derived_dest.h
index 7e2d4524cb..0a3765a910 100644
--- a/lib/wx/c_src/gen/wxe_derived_dest.h
+++ b/lib/wx/c_src/gen/wxe_derived_dest.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -764,3 +764,25 @@ class EwxTaskBarIcon : public wxTaskBarIcon {
EwxTaskBarIcon() : wxTaskBarIcon() {};
};
+class EwxLocale : public wxLocale {
+ public: ~EwxLocale() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxLocale(int language,int flags) : wxLocale(language,flags) {};
+ EwxLocale() : wxLocale() {};
+};
+
+#if wxUSE_POPUPWIN
+class EwxPopupWindow : public wxPopupWindow {
+ public: ~EwxPopupWindow() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxPopupWindow(wxWindow * parent,int flags) : wxPopupWindow(parent,flags) {};
+ EwxPopupWindow() : wxPopupWindow() {};
+};
+#endif // wxUSE_POPUPWIN
+
+#if wxUSE_POPUPWIN
+class EwxPopupTransientWindow : public wxPopupTransientWindow {
+ public: ~EwxPopupTransientWindow() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxPopupTransientWindow(wxWindow * parent,int style) : wxPopupTransientWindow(parent,style) {};
+ EwxPopupTransientWindow() : wxPopupTransientWindow() {};
+};
+#endif // wxUSE_POPUPWIN
+
diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp
index fb3a065448..255b36c2fa 100644
--- a/lib/wx/c_src/gen/wxe_events.cpp
+++ b/lib/wx/c_src/gen/wxe_events.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -220,83 +220,87 @@ void initEventTable()
{wxEVT_STC_HOTSPOT_DCLICK, 203, "stc_hotspot_dclick"},
{wxEVT_STC_CALLTIP_CLICK, 203, "stc_calltip_click"},
{wxEVT_STC_AUTOCOMP_SELECTION, 203, "stc_autocomp_selection"},
- {wxEVT_COMMAND_TREE_BEGIN_DRAG, 208, "command_tree_begin_drag"},
- {wxEVT_COMMAND_TREE_BEGIN_RDRAG, 208, "command_tree_begin_rdrag"},
- {wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 208, "command_tree_begin_label_edit"},
- {wxEVT_COMMAND_TREE_END_LABEL_EDIT, 208, "command_tree_end_label_edit"},
- {wxEVT_COMMAND_TREE_DELETE_ITEM, 208, "command_tree_delete_item"},
- {wxEVT_COMMAND_TREE_GET_INFO, 208, "command_tree_get_info"},
- {wxEVT_COMMAND_TREE_SET_INFO, 208, "command_tree_set_info"},
- {wxEVT_COMMAND_TREE_ITEM_EXPANDED, 208, "command_tree_item_expanded"},
- {wxEVT_COMMAND_TREE_ITEM_EXPANDING, 208, "command_tree_item_expanding"},
- {wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 208, "command_tree_item_collapsed"},
- {wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 208, "command_tree_item_collapsing"},
- {wxEVT_COMMAND_TREE_SEL_CHANGED, 208, "command_tree_sel_changed"},
- {wxEVT_COMMAND_TREE_SEL_CHANGING, 208, "command_tree_sel_changing"},
- {wxEVT_COMMAND_TREE_KEY_DOWN, 208, "command_tree_key_down"},
- {wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 208, "command_tree_item_activated"},
- {wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 208, "command_tree_item_right_click"},
- {wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 208, "command_tree_item_middle_click"},
- {wxEVT_COMMAND_TREE_END_DRAG, 208, "command_tree_end_drag"},
- {wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 208, "command_tree_state_image_click"},
- {wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 208, "command_tree_item_gettooltip"},
- {wxEVT_COMMAND_TREE_ITEM_MENU, 208, "command_tree_item_menu"},
- {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 209, "command_notebook_page_changed"},
- {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 209, "command_notebook_page_changing"},
- {wxEVT_COMMAND_TEXT_COPY, 215, "command_text_copy"},
- {wxEVT_COMMAND_TEXT_CUT, 215, "command_text_cut"},
- {wxEVT_COMMAND_TEXT_PASTE, 215, "command_text_paste"},
- {wxEVT_COMMAND_SPINCTRL_UPDATED, 216, "command_spinctrl_updated"},
+ {wxEVT_COMMAND_TREE_BEGIN_DRAG, 209, "command_tree_begin_drag"},
+ {wxEVT_COMMAND_TREE_BEGIN_RDRAG, 209, "command_tree_begin_rdrag"},
+ {wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 209, "command_tree_begin_label_edit"},
+ {wxEVT_COMMAND_TREE_END_LABEL_EDIT, 209, "command_tree_end_label_edit"},
+ {wxEVT_COMMAND_TREE_DELETE_ITEM, 209, "command_tree_delete_item"},
+ {wxEVT_COMMAND_TREE_GET_INFO, 209, "command_tree_get_info"},
+ {wxEVT_COMMAND_TREE_SET_INFO, 209, "command_tree_set_info"},
+ {wxEVT_COMMAND_TREE_ITEM_EXPANDED, 209, "command_tree_item_expanded"},
+ {wxEVT_COMMAND_TREE_ITEM_EXPANDING, 209, "command_tree_item_expanding"},
+ {wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 209, "command_tree_item_collapsed"},
+ {wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 209, "command_tree_item_collapsing"},
+ {wxEVT_COMMAND_TREE_SEL_CHANGED, 209, "command_tree_sel_changed"},
+ {wxEVT_COMMAND_TREE_SEL_CHANGING, 209, "command_tree_sel_changing"},
+ {wxEVT_COMMAND_TREE_KEY_DOWN, 209, "command_tree_key_down"},
+ {wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 209, "command_tree_item_activated"},
+ {wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 209, "command_tree_item_right_click"},
+ {wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 209, "command_tree_item_middle_click"},
+ {wxEVT_COMMAND_TREE_END_DRAG, 209, "command_tree_end_drag"},
+ {wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 209, "command_tree_state_image_click"},
+ {wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 209, "command_tree_item_gettooltip"},
+ {wxEVT_COMMAND_TREE_ITEM_MENU, 209, "command_tree_item_menu"},
+ {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 210, "command_notebook_page_changed"},
+ {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 210, "command_notebook_page_changing"},
+ {wxEVT_COMMAND_TEXT_COPY, 216, "command_text_copy"},
+ {wxEVT_COMMAND_TEXT_CUT, 216, "command_text_cut"},
+ {wxEVT_COMMAND_TEXT_PASTE, 216, "command_text_paste"},
+ {wxEVT_COMMAND_SPINCTRL_UPDATED, 217, "command_spinctrl_updated"},
{wxEVT_SCROLL_LINEUP + wxEVT_USER_FIRST, 165, "spin_up"},
{wxEVT_SCROLL_LINEDOWN + wxEVT_USER_FIRST, 165, "spin_down"},
{wxEVT_SCROLL_THUMBTRACK + wxEVT_USER_FIRST, 165, "spin"},
- {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 218, "command_splitter_sash_pos_changed"},
- {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 218, "command_splitter_sash_pos_changing"},
- {wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 218, "command_splitter_doubleclicked"},
- {wxEVT_COMMAND_SPLITTER_UNSPLIT, 218, "command_splitter_unsplit"},
- {wxEVT_COMMAND_HTML_LINK_CLICKED, 220, "command_html_link_clicked"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 223, "command_auinotebook_page_close"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 223, "command_auinotebook_page_changed"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 223, "command_auinotebook_page_changing"},
- {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 223, "command_auinotebook_button"},
- {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 223, "command_auinotebook_begin_drag"},
- {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 223, "command_auinotebook_end_drag"},
- {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 223, "command_auinotebook_drag_motion"},
- {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 223, "command_auinotebook_allow_dnd"},
+ {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 219, "command_splitter_sash_pos_changed"},
+ {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 219, "command_splitter_sash_pos_changing"},
+ {wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 219, "command_splitter_doubleclicked"},
+ {wxEVT_COMMAND_SPLITTER_UNSPLIT, 219, "command_splitter_unsplit"},
+ {wxEVT_COMMAND_HTML_LINK_CLICKED, 221, "command_html_link_clicked"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 224, "command_auinotebook_page_close"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 224, "command_auinotebook_page_changed"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 224, "command_auinotebook_page_changing"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 224, "command_auinotebook_button"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 224, "command_auinotebook_begin_drag"},
+ {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 224, "command_auinotebook_end_drag"},
+ {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 224, "command_auinotebook_drag_motion"},
+ {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 224, "command_auinotebook_allow_dnd"},
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 223, "command_auinotebook_tab_middle_down"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 224, "command_auinotebook_tab_middle_down"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 223, "command_auinotebook_tab_middle_up"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 224, "command_auinotebook_tab_middle_up"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 223, "command_auinotebook_tab_right_down"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 224, "command_auinotebook_tab_right_down"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 223, "command_auinotebook_tab_right_up"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 224, "command_auinotebook_tab_right_up"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 223, "command_auinotebook_page_closed"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 224, "command_auinotebook_page_closed"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 223, "command_auinotebook_drag_done"},
+ {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 224, "command_auinotebook_drag_done"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 223, "command_auinotebook_bg_dclick"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 224, "command_auinotebook_bg_dclick"},
#endif
- {wxEVT_AUI_PANE_BUTTON, 224, "aui_pane_button"},
- {wxEVT_AUI_PANE_CLOSE, 224, "aui_pane_close"},
- {wxEVT_AUI_PANE_MAXIMIZE, 224, "aui_pane_maximize"},
- {wxEVT_AUI_PANE_RESTORE, 224, "aui_pane_restore"},
- {wxEVT_AUI_RENDER, 224, "aui_render"},
- {wxEVT_AUI_FIND_MANAGER, 224, "aui_find_manager"},
- {wxEVT_TASKBAR_MOVE, 227, "taskbar_move"},
- {wxEVT_TASKBAR_LEFT_DOWN, 227, "taskbar_left_down"},
- {wxEVT_TASKBAR_LEFT_UP, 227, "taskbar_left_up"},
- {wxEVT_TASKBAR_RIGHT_DOWN, 227, "taskbar_right_down"},
- {wxEVT_TASKBAR_RIGHT_UP, 227, "taskbar_right_up"},
- {wxEVT_TASKBAR_LEFT_DCLICK, 227, "taskbar_left_dclick"},
- {wxEVT_TASKBAR_RIGHT_DCLICK, 227, "taskbar_right_dclick"},
+ {wxEVT_AUI_PANE_BUTTON, 225, "aui_pane_button"},
+ {wxEVT_AUI_PANE_CLOSE, 225, "aui_pane_close"},
+ {wxEVT_AUI_PANE_MAXIMIZE, 225, "aui_pane_maximize"},
+ {wxEVT_AUI_PANE_RESTORE, 225, "aui_pane_restore"},
+ {wxEVT_AUI_RENDER, 225, "aui_render"},
+ {wxEVT_AUI_FIND_MANAGER, 225, "aui_find_manager"},
+ {wxEVT_TASKBAR_MOVE, 228, "taskbar_move"},
+ {wxEVT_TASKBAR_LEFT_DOWN, 228, "taskbar_left_down"},
+ {wxEVT_TASKBAR_LEFT_UP, 228, "taskbar_left_up"},
+ {wxEVT_TASKBAR_RIGHT_DOWN, 228, "taskbar_right_down"},
+ {wxEVT_TASKBAR_RIGHT_UP, 228, "taskbar_right_up"},
+ {wxEVT_TASKBAR_LEFT_DCLICK, 228, "taskbar_left_dclick"},
+ {wxEVT_TASKBAR_RIGHT_DCLICK, 228, "taskbar_right_dclick"},
+ {wxEVT_INIT_DIALOG, 229, "init_dialog"},
+ {wxEVT_ACTIVATE, 231, "activate"},
+ {wxEVT_ACTIVATE_APP, 231, "activate_app"},
+ {wxEVT_HIBERNATE, 231, "hibernate"},
{-1, 0, }
};
for(int i=0; event_types[i].ev_type != -1; i++) {
@@ -315,16 +319,6 @@ void initEventTable()
}
}
-void wxeEvtListener::forward(wxEvent& event)
-{
-#ifdef DEBUG
- if(!sendevent(&event, port))
- fprintf(stderr, "Couldn't send event!\r\n");
-#else
-sendevent(&event, port);
-#endif
-}
-
int getRef(void* ptr, wxeMemEnv* memenv)
{
WxeApp * app = (WxeApp *) wxTheApp;
@@ -337,7 +331,7 @@ bool sendevent(wxEvent *event, ErlDrvTermData port)
char * evClass = NULL;
wxMBConvUTF32 UTFconverter;
wxeEtype *Etype = etmap[event->GetEventType()];
- wxeCallbackData *cb = (wxeCallbackData *)event->m_callbackUserData;
+ wxeEvtListener *cb = (wxeEvtListener *)event->m_callbackUserData;
WxeApp * app = (WxeApp *) wxTheApp;
wxeMemEnv *memenv = app->getMemEnv(port);
if(!memenv) return 0;
@@ -728,7 +722,7 @@ case 203: {// wxStyledTextEvent
rt.addTupleCount(22);
break;
}
-case 208: {// wxTreeEvent
+case 209: {// wxTreeEvent
wxTreeEvent * ev = (wxTreeEvent *) event;
evClass = (char*)"wxTreeEvent";
rt.addAtom((char*)"wxTree");
@@ -739,21 +733,21 @@ case 208: {// wxTreeEvent
rt.addTupleCount(5);
break;
}
-case 209: {// wxNotebookEvent
+case 210: {// wxNotebookEvent
evClass = (char*)"wxNotebookEvent";
rt.addAtom((char*)"wxNotebook");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 215: {// wxClipboardTextEvent
+case 216: {// wxClipboardTextEvent
evClass = (char*)"wxClipboardTextEvent";
rt.addAtom((char*)"wxClipboardText");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 216: {// wxSpinEvent
+case 217: {// wxSpinEvent
wxSpinEvent * ev = (wxSpinEvent *) event;
evClass = (char*)"wxSpinEvent";
rt.addAtom((char*)"wxSpin");
@@ -762,14 +756,14 @@ case 216: {// wxSpinEvent
rt.addTupleCount(3);
break;
}
-case 218: {// wxSplitterEvent
+case 219: {// wxSplitterEvent
evClass = (char*)"wxSplitterEvent";
rt.addAtom((char*)"wxSplitter");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 220: {// wxHtmlLinkEvent
+case 221: {// wxHtmlLinkEvent
wxHtmlLinkEvent * ev = (wxHtmlLinkEvent *) event;
evClass = (char*)"wxHtmlLinkEvent";
rt.addAtom((char*)"wxHtmlLink");
@@ -778,7 +772,7 @@ case 220: {// wxHtmlLinkEvent
rt.addTupleCount(3);
break;
}
-case 223: {// wxAuiNotebookEvent
+case 224: {// wxAuiNotebookEvent
wxAuiNotebookEvent * ev = (wxAuiNotebookEvent *) event;
wxAuiNotebook * GetDragSource = ev->GetDragSource();
evClass = (char*)"wxAuiNotebookEvent";
@@ -790,7 +784,7 @@ case 223: {// wxAuiNotebookEvent
rt.addTupleCount(5);
break;
}
-case 224: {// wxAuiManagerEvent
+case 225: {// wxAuiManagerEvent
wxAuiManagerEvent * ev = (wxAuiManagerEvent *) event;
wxAuiManager * GetManager = ev->GetManager();
wxAuiPaneInfo * GetPane = ev->GetPane();
@@ -807,13 +801,29 @@ case 224: {// wxAuiManagerEvent
rt.addTupleCount(8);
break;
}
-case 227: {// wxTaskBarIconEvent
+case 228: {// wxTaskBarIconEvent
evClass = (char*)"wxTaskBarIconEvent";
rt.addAtom((char*)"wxTaskBarIcon");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
+case 229: {// wxInitDialogEvent
+ evClass = (char*)"wxInitDialogEvent";
+ rt.addAtom((char*)"wxInitDialog");
+ rt.addAtom(Etype->eName);
+ rt.addTupleCount(2);
+ break;
+}
+case 231: {// wxActivateEvent
+ wxActivateEvent * ev = (wxActivateEvent *) event;
+ evClass = (char*)"wxActivateEvent";
+ rt.addAtom((char*)"wxActivate");
+ rt.addAtom(Etype->eName);
+ rt.addBool(ev->GetActive());
+ rt.addTupleCount(3);
+ break;
+}
}
rt.addTupleCount(5);
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index 329af36f4d..91ce5d810c 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -45,9 +45,15 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd)
switch (Ecmd.op)
{
case DESTROY_OBJECT: {
- wxObject *This = (wxObject *) getPtr(bp,memenv); if(This) { ((WxeApp *) wxTheApp)->clearPtr((void *) This);
- delete This; }
- } break;
+ void *This = getPtr(bp,memenv);
+ wxeRefData *refd = getRefData(This);
+ if(This && refd) {
+ if(recurse_level > 1 && refd->type != 4) {
+ delayed_delete->Append(Ecmd.Save());
+ } else {
+ ((WxeApp *) wxTheApp)->clearPtr(This);
+ delete_object(This, refd); }
+ } } break;
case WXE_REGISTER_OBJECT: {
registerPid(bp, Ecmd.caller, memenv);
rt.addAtom("ok");
@@ -62,20 +68,8 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd)
case WXE_INIT_OPENGL:
wxe_initOpenGL(rt, bp);
break;
-case 98: { // wxeEvtListener::wxeEvtListener
- wxeEvtListener *Result = new wxeEvtListener(Ecmd.port);
- rt.addRef(getRef((void *)Result,memenv), "wxeEvtListener");
- break;
-}
-case 99: { // wxeEvtListener::destroy
- wxObject *This = (wxObject *) getPtr(bp,memenv);
- rt.addAtom("ok");
- delete This;
- break;
-}
-case 100: { // wxEvtHandler::Connect
- wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
+case 100: { // wxEvtHandler::Connect
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
int * lastId = (int *) bp; bp += 4;
@@ -86,20 +80,22 @@ case 100: { // wxEvtHandler::Connect
int * eventTypeLen = (int *) bp; bp += 4;
int * class_nameLen = (int *) bp; bp += 4;
- if(*haveUserData) {
+ if(*haveUserData) {
userData = new wxeErlTerm(Ecmd.bin[0]);
}
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
char *class_name = bp; bp+= *class_nameLen;
if(eventType > 0 ) {
- wxeCallbackData * Evt_cb = new wxeCallbackData(Ecmd.caller,getRef(This, memenv),
- class_name,*fun_cb,
- *skip, userData, Listener);
+ wxeEvtListener * Evt_cb = new wxeEvtListener(Ecmd.caller,getRef(This, memenv),
+ class_name,*fun_cb,
+ *skip, userData, Ecmd.port);
This->Connect((int) *winid,(int) *lastId,eventType,
(wxObjectEventFunction)(wxEventFunction) &wxeEvtListener::forward,
- Evt_cb, Listener);
+ Evt_cb, Evt_cb);
rt.addAtom("ok");
+ rt.addRef(getRef((void *)Evt_cb,memenv), "wxeEvtListener");
+ rt.addTupleCount(2);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
@@ -107,7 +103,7 @@ case 100: { // wxEvtHandler::Connect
}
break;
}
-case 101: { // wxEvtHandler::Disconnect
+case 101: { // wxEvtHandler::Disconnect
wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
@@ -117,14 +113,14 @@ case 101: { // wxEvtHandler::Disconnect
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
if(eventType > 0) {
bool Result = This->Disconnect((int) *winid,(int) *lastId,eventType,
- (wxObjectEventFunction)(wxEventFunction)
- &wxeEvtListener::forward,
- NULL, Listener);
+ (wxObjectEventFunction)(wxEventFunction)
+ &wxeEvtListener::forward,
+ NULL, Listener);
rt.addBool(Result);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
- rt.addTupleCount(2);
+ rt.addTupleCount(2);
}
break;
}
@@ -5848,26 +5844,26 @@ 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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMirrorDC");
break;
}
case wxScreenDC_new: { // wxScreenDC::wxScreenDC
wxScreenDC * Result = new EwxScreenDC();
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxScreenDC");
break;
}
case wxPostScriptDC_new_0: { // wxPostScriptDC::wxPostScriptDC
wxPostScriptDC * Result = new EwxPostScriptDC();
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, 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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPostScriptDC");
break;
}
@@ -5888,7 +5884,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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxWindowDC");
break;
}
@@ -5896,14 +5892,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, 1, memenv);
+ newPtr((void *) Result, 4, 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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxClientDC");
break;
}
@@ -5911,14 +5907,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, 1, memenv);
+ newPtr((void *) Result, 4, 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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPaintDC");
break;
}
@@ -5926,27 +5922,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, 1, memenv);
+ newPtr((void *) Result, 4, 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, 1, memenv);
+ newPtr((void *) Result, 4, 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, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMemoryDC");
break;
}
case wxMemoryDC_new_0: { // wxMemoryDC::wxMemoryDC
wxMemoryDC * Result = new EwxMemoryDC();
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMemoryDC");
break;
}
@@ -5966,7 +5962,7 @@ case wxMemoryDC_SelectObjectAsSource: { // wxMemoryDC::SelectObjectAsSource
}
case wxBufferedDC_new_0: { // wxBufferedDC::wxBufferedDC
wxBufferedDC * Result = new EwxBufferedDC();
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -5984,7 +5980,7 @@ buffer = (wxBitmap *) getPtr(bp,memenv); bp += 4;
} break;
}};
wxBufferedDC * Result = new EwxBufferedDC(dc,*buffer,style);
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -6001,7 +5997,7 @@ case wxBufferedDC_new_3: { // wxBufferedDC::wxBufferedDC
} break;
}};
wxBufferedDC * Result = new EwxBufferedDC(dc,area,style);
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -6048,7 +6044,7 @@ case wxBufferedPaintDC_new_3: { // wxBufferedPaintDC::wxBufferedPaintDC
} break;
}};
wxBufferedPaintDC * Result = new EwxBufferedPaintDC(window,*buffer,style);
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedPaintDC");
break;
}
@@ -6062,7 +6058,7 @@ case wxBufferedPaintDC_new_2: { // wxBufferedPaintDC::wxBufferedPaintDC
} break;
}};
wxBufferedPaintDC * Result = new EwxBufferedPaintDC(window,style);
- newPtr((void *) Result, 1, memenv);
+ newPtr((void *) Result, 4, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedPaintDC");
break;
}
@@ -15880,7 +15876,7 @@ case wxListCtrl_SortItems: { // wxListCtrl::SortItems taylormade
callbackInfo* cb = new callbackInfo();
cb->port = Ecmd.port;
cb->callbackID = sortCallback;
- bool Result = This->SortItems(wxEListCtrlCompare, (long)cb);
+ bool Result = This->SortItems(wxEListCtrlCompare, (wxeIntPtr)cb);
delete cb;
/* Destroy the callback, see wxEPrintout::clear_cb */
@@ -16779,6 +16775,15 @@ case wxTextCtrl_DiscardEdits: { // wxTextCtrl::DiscardEdits
This->DiscardEdits();
break;
}
+case wxTextCtrl_ChangeValue: { // wxTextCtrl::ChangeValue
+ wxTextCtrl *This = (wxTextCtrl *) getPtr(bp,memenv); bp += 4;
+ int * valueLen = (int *) bp; bp += 4;
+ wxString value = wxString(bp, wxConvUTF8);
+ bp += *valueLen+((8-((0+ *valueLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ This->ChangeValue(value);
+ break;
+}
case wxTextCtrl_EmulateKeyPress: { // wxTextCtrl::EmulateKeyPress
wxTextCtrl *This = (wxTextCtrl *) getPtr(bp,memenv); bp += 4;
wxKeyEvent *event = (wxKeyEvent *) getPtr(bp,memenv); bp += 4;
@@ -26735,6 +26740,20 @@ case utils_wxIsPlatform64Bit: { // utils::wxIsPlatform64Bit
rt.addBool(Result);
break;
}
+case gdicmn_wxDisplaySize: { // gdicmn::wxDisplaySize
+ int width;
+ int height;
+ ::wxDisplaySize(&width,&height);
+ rt.addInt(width);
+ rt.addInt(height);
+ rt.addTupleCount(2);
+ break;
+}
+case gdicmn_wxSetCursor: { // gdicmn::wxSetCursor
+ wxCursor *cursor = (wxCursor *) getPtr(bp,memenv); bp += 4;
+ ::wxSetCursor(*cursor);
+ break;
+}
case wxPrintout_new: { // wxPrintout::wxPrintout taylormade
int onPreparePrinting=0,onBeginPrinting=0,onEndPrinting=0,onBeginDocument=0,
@@ -30447,7 +30466,7 @@ case wxNotebookEvent_SetSelection: { // wxNotebookEvent::SetSelection
}
case wxFileDataObject_new: { // wxFileDataObject::wxFileDataObject
wxFileDataObject * Result = new wxFileDataObject();
- newPtr((void *) Result, 211, memenv);
+ newPtr((void *) Result, 212, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxFileDataObject");
break;
}
@@ -30483,7 +30502,7 @@ case wxTextDataObject_new: { // wxTextDataObject::wxTextDataObject
} break;
}};
wxTextDataObject * Result = new wxTextDataObject(text);
- newPtr((void *) Result, 212, memenv);
+ newPtr((void *) Result, 213, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxTextDataObject");
break;
}
@@ -30519,7 +30538,7 @@ case wxTextDataObject_destroy: { // wxTextDataObject::destroy
case wxBitmapDataObject_new_1_1: { // wxBitmapDataObject::wxBitmapDataObject
wxBitmap *bitmap = (wxBitmap *) getPtr(bp,memenv); bp += 4;
wxBitmapDataObject * Result = new wxBitmapDataObject(*bitmap);
- newPtr((void *) Result, 213, memenv);
+ newPtr((void *) Result, 214, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBitmapDataObject");
break;
}
@@ -30531,7 +30550,7 @@ bitmap = (wxBitmap *) getPtr(bp,memenv); bp += 4;
} break;
}};
wxBitmapDataObject * Result = new wxBitmapDataObject(*bitmap);
- newPtr((void *) Result, 213, memenv);
+ newPtr((void *) Result, 214, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBitmapDataObject");
break;
}
@@ -31364,7 +31383,7 @@ case wxAuiManagerEvent_CanVeto: { // wxAuiManagerEvent::CanVeto
}
case wxLogNull_new: { // wxLogNull::wxLogNull
wxLogNull * Result = new wxLogNull();
- newPtr((void *) Result, 225, memenv);
+ newPtr((void *) Result, 226, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxLogNull");
break;
}
@@ -31411,6 +31430,309 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon
rt.addBool(Result);
break;
}
+case wxLocale_new_0: { // wxLocale::wxLocale
+ wxLocale * Result = new EwxLocale();
+ newPtr((void *) Result, 230, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxLocale");
+ break;
+}
+case wxLocale_new_2: { // wxLocale::wxLocale
+ int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING;
+ int * language = (int *) bp; bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ wxLocale * Result = new EwxLocale(*language,flags);
+ newPtr((void *) Result, 230, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxLocale");
+ break;
+}
+case wxLocale_destruct: { // wxLocale::~wxLocale
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(This) { ((WxeApp *) wxTheApp)->clearPtr((void *) This);
+ delete This;}
+ break;
+}
+case wxLocale_Init: { // wxLocale::Init
+ int language=wxLANGUAGE_DEFAULT;
+ int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ language = (int)*(int *) bp; bp += 4;
+ } break;
+ case 2: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->Init(language,flags);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalog_1: { // wxLocale::AddCatalog
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->AddCatalog(szDomain);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalog_3: { // wxLocale::AddCatalog
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ wxLanguage msgIdLanguage = *(wxLanguage *) bp; bp += 4;;
+ int * msgIdCharsetLen = (int *) bp; bp += 4;
+ wxString msgIdCharset = wxString(bp, wxConvUTF8);
+ bp += *msgIdCharsetLen+((8-((0+ *msgIdCharsetLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->AddCatalog(szDomain,msgIdLanguage,msgIdCharset);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalogLookupPathPrefix: { // wxLocale::AddCatalogLookupPathPrefix
+ int * prefixLen = (int *) bp; bp += 4;
+ wxString prefix = wxString(bp, wxConvUTF8);
+ bp += *prefixLen+((8-((4+ *prefixLen) & 7)) & 7);
+ wxLocale::AddCatalogLookupPathPrefix(prefix);
+ break;
+}
+case wxLocale_GetCanonicalName: { // wxLocale::GetCanonicalName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetCanonicalName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetLanguage: { // wxLocale::GetLanguage
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ int Result = This->GetLanguage();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_GetLanguageName: { // wxLocale::GetLanguageName
+ int * lang = (int *) bp; bp += 4;
+ wxString Result = wxLocale::GetLanguageName(*lang);
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetLocale: { // wxLocale::GetLocale
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetLocale();
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetName: { // wxLocale::GetName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ const wxString * Result = &This->GetName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetString_2: { // wxLocale::GetString
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szOrigStringLen = (int *) bp; bp += 4;
+ wxString szOrigString = wxString(bp, wxConvUTF8);
+ bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7);
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetString(szOrigString,szDomain);
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetString_4: { // wxLocale::GetString
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szOrigStringLen = (int *) bp; bp += 4;
+ wxString szOrigString = wxString(bp, wxConvUTF8);
+ bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7);
+ int * szOrigString2Len = (int *) bp; bp += 4;
+ wxString szOrigString2 = wxString(bp, wxConvUTF8);
+ bp += *szOrigString2Len+((8-((4+ *szOrigString2Len) & 7)) & 7);
+ int * n = (int *) bp; bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetString(szOrigString,szOrigString2,*n,szDomain);
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetHeaderValue: { // wxLocale::GetHeaderValue
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szHeaderLen = (int *) bp; bp += 4;
+ wxString szHeader = wxString(bp, wxConvUTF8);
+ bp += *szHeaderLen+((8-((0+ *szHeaderLen) & 7)) & 7);
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetHeaderValue(szHeader,szDomain);
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSysName: { // wxLocale::GetSysName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetSysName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSystemEncoding: { // wxLocale::GetSystemEncoding
+ int Result = wxLocale::GetSystemEncoding();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_GetSystemEncodingName: { // wxLocale::GetSystemEncodingName
+ wxString Result = wxLocale::GetSystemEncodingName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSystemLanguage: { // wxLocale::GetSystemLanguage
+ int Result = wxLocale::GetSystemLanguage();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_IsLoaded: { // wxLocale::IsLoaded
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->IsLoaded(szDomain);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_IsOk: { // wxLocale::IsOk
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->IsOk();
+ rt.addBool(Result);
+ break;
+}
+case wxActivateEvent_GetActive: { // wxActivateEvent::GetActive
+ wxActivateEvent *This = (wxActivateEvent *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->GetActive();
+ rt.addBool(Result);
+ break;
+}
+#if wxUSE_POPUPWIN
+case wxPopupWindow_new_2: { // wxPopupWindow::wxPopupWindow
+ int flags=wxBORDER_NONE;
+ wxWindow *parent = (wxWindow *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ wxPopupWindow * Result = new EwxPopupWindow(parent,flags);
+ newPtr((void *) Result, 0, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxPopupWindow");
+ break;
+}
+case wxPopupWindow_new_0: { // wxPopupWindow::wxPopupWindow
+ wxPopupWindow * Result = new EwxPopupWindow();
+ newPtr((void *) Result, 0, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxPopupWindow");
+ break;
+}
+case wxPopupWindow_Create: { // wxPopupWindow::Create
+ int flags=wxBORDER_NONE;
+ wxPopupWindow *This = (wxPopupWindow *) getPtr(bp,memenv); bp += 4;
+ wxWindow *parent = (wxWindow *) getPtr(bp,memenv); bp += 4;
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->Create(parent,flags);
+ rt.addBool(Result);
+ break;
+}
+case wxPopupWindow_Position: { // wxPopupWindow::Position
+ wxPopupWindow *This = (wxPopupWindow *) getPtr(bp,memenv); bp += 4;
+ int * ptOriginX = (int *) bp; bp += 4;
+ int * ptOriginY = (int *) bp; bp += 4;
+ wxPoint ptOrigin = wxPoint(*ptOriginX,*ptOriginY);
+ int * sizeW = (int *) bp; bp += 4;
+ int * sizeH = (int *) bp; bp += 4;
+ wxSize size = wxSize(*sizeW,*sizeH);
+ if(!This) throw wxe_badarg(0);
+ This->Position(ptOrigin,size);
+ break;
+}
+#endif // wxUSE_POPUPWIN
+#if wxUSE_POPUPWIN
+case wxPopupTransientWindow_new_0: { // wxPopupTransientWindow::wxPopupTransientWindow
+ wxPopupTransientWindow * Result = new EwxPopupTransientWindow();
+ newPtr((void *) Result, 0, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxPopupTransientWindow");
+ break;
+}
+case wxPopupTransientWindow_new_2: { // wxPopupTransientWindow::wxPopupTransientWindow
+ int style=wxBORDER_NONE;
+ wxWindow *parent = (wxWindow *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ style = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ wxPopupTransientWindow * Result = new EwxPopupTransientWindow(parent,style);
+ newPtr((void *) Result, 0, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxPopupTransientWindow");
+ break;
+}
+case wxPopupTransientWindow_Popup: { // wxPopupTransientWindow::Popup
+ wxWindow * focus=NULL;
+ wxPopupTransientWindow *This = (wxPopupTransientWindow *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+focus = (wxWindow *) getPtr(bp,memenv); bp += 4;
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ This->Popup(focus);
+ break;
+}
+case wxPopupTransientWindow_Dismiss: { // wxPopupTransientWindow::Dismiss
+ wxPopupTransientWindow *This = (wxPopupTransientWindow *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ This->Dismiss();
+ break;
+}
+#endif // wxUSE_POPUPWIN
default: {
wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_");
error.addInt((int) Ecmd.op);
@@ -31432,7 +31754,7 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon
}} /* The End */
-void WxeApp::delete_object(void *ptr, wxeRefData *refd) {
+bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {
switch(refd->type) {
case 24: delete (wxGridCellBoolRenderer *) ptr; break;
case 25: delete (wxGridCellBoolEditor *) ptr; break;
@@ -31451,10 +31773,13 @@ void WxeApp::delete_object(void *ptr, wxeRefData *refd) {
case 101: delete (wxListItemAttr *) ptr; break;
case 103: delete (wxTextAttr *) ptr; break;
case 155: delete (wxAuiPaneInfo *) ptr; break;
- case 211: /* delete (wxFileDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 212: /* delete (wxTextDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 213: /* delete (wxBitmapDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 225: delete (wxLogNull *) ptr; break;
- default: delete (wxObject *) ptr;
-}}
+ case 212: /* delete (wxFileDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 213: /* delete (wxTextDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 214: /* delete (wxBitmapDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 226: delete (wxLogNull *) ptr; break;
+ case 230: delete (EwxLocale *) ptr; return false;
+ default: delete (wxObject *) ptr; return false;
+ }
+ return true;
+}
diff --git a/lib/wx/c_src/gen/wxe_init.cpp b/lib/wx/c_src/gen/wxe_init.cpp
index a75298392b..3a4bced790 100644
--- a/lib/wx/c_src/gen/wxe_init.cpp
+++ b/lib/wx/c_src/gen/wxe_init.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2011. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -36,6 +36,8 @@ void WxeApp::init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller) {
rt.addTupleCount(2);
rt.addAtom("wxGAUGE_EMULATE_INDETERMINATE_MODE"); rt.addInt(wxGAUGE_EMULATE_INDETERMINATE_MODE);
rt.addTupleCount(2);
+ rt.addAtom("wxSL_LABELS"); rt.addInt(wxSL_LABELS);
+ rt.addTupleCount(2);
rt.addAtom("wxTR_DEFAULT_STYLE"); rt.addInt(wxTR_DEFAULT_STYLE);
rt.addTupleCount(2);
rt.addAtom("wxBETA_NUMBER"); rt.addInt(wxBETA_NUMBER);
@@ -136,7 +138,7 @@ void WxeApp::init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller) {
rt.addTupleCount(2);
rt.addAtom("wxWHITE_PEN"); rt.addRef(getRef((void *)wxWHITE_PEN,memenv),"wxPen");
rt.addTupleCount(2);
- rt.endList(56);
+ rt.endList(57);
rt.addTupleCount(2);
rt.send();
}
diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h
index a1da6500d5..c8ca9bfe5b 100644
--- a/lib/wx/c_src/gen/wxe_macros.h
+++ b/lib/wx/c_src/gen/wxe_macros.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -58,6 +58,7 @@
#include <wx/listbook.h>
#include <wx/treebook.h>
#include <wx/taskbar.h>
+#include <wx/popupwin.h>
#include <wx/html/htmlwin.h>
#include <wx/html/htmlcell.h>
#include <wx/filename.h>
@@ -1716,1641 +1717,1676 @@
#define wxTextCtrl_Create 1824
#define wxTextCtrl_Cut 1825
#define wxTextCtrl_DiscardEdits 1826
-#define wxTextCtrl_EmulateKeyPress 1827
-#define wxTextCtrl_GetDefaultStyle 1828
-#define wxTextCtrl_GetInsertionPoint 1829
-#define wxTextCtrl_GetLastPosition 1830
-#define wxTextCtrl_GetLineLength 1831
-#define wxTextCtrl_GetLineText 1832
-#define wxTextCtrl_GetNumberOfLines 1833
-#define wxTextCtrl_GetRange 1834
-#define wxTextCtrl_GetSelection 1835
-#define wxTextCtrl_GetStringSelection 1836
-#define wxTextCtrl_GetStyle 1837
-#define wxTextCtrl_GetValue 1838
-#define wxTextCtrl_IsEditable 1839
-#define wxTextCtrl_IsModified 1840
-#define wxTextCtrl_IsMultiLine 1841
-#define wxTextCtrl_IsSingleLine 1842
-#define wxTextCtrl_LoadFile 1843
-#define wxTextCtrl_MarkDirty 1844
-#define wxTextCtrl_Paste 1845
-#define wxTextCtrl_PositionToXY 1846
-#define wxTextCtrl_Redo 1847
-#define wxTextCtrl_Remove 1848
-#define wxTextCtrl_Replace 1849
-#define wxTextCtrl_SaveFile 1850
-#define wxTextCtrl_SetDefaultStyle 1851
-#define wxTextCtrl_SetEditable 1852
-#define wxTextCtrl_SetInsertionPoint 1853
-#define wxTextCtrl_SetInsertionPointEnd 1854
-#define wxTextCtrl_SetMaxLength 1856
-#define wxTextCtrl_SetSelection 1857
-#define wxTextCtrl_SetStyle 1858
-#define wxTextCtrl_SetValue 1859
-#define wxTextCtrl_ShowPosition 1860
-#define wxTextCtrl_Undo 1861
-#define wxTextCtrl_WriteText 1862
-#define wxTextCtrl_XYToPosition 1863
-#define wxNotebook_new_0 1866
-#define wxNotebook_new_3 1867
-#define wxNotebook_destruct 1868
-#define wxNotebook_AddPage 1869
-#define wxNotebook_AdvanceSelection 1870
-#define wxNotebook_AssignImageList 1871
-#define wxNotebook_Create 1872
-#define wxNotebook_DeleteAllPages 1873
-#define wxNotebook_DeletePage 1874
-#define wxNotebook_RemovePage 1875
-#define wxNotebook_GetCurrentPage 1876
-#define wxNotebook_GetImageList 1877
-#define wxNotebook_GetPage 1879
-#define wxNotebook_GetPageCount 1880
-#define wxNotebook_GetPageImage 1881
-#define wxNotebook_GetPageText 1882
-#define wxNotebook_GetRowCount 1883
-#define wxNotebook_GetSelection 1884
-#define wxNotebook_GetThemeBackgroundColour 1885
-#define wxNotebook_HitTest 1887
-#define wxNotebook_InsertPage 1889
-#define wxNotebook_SetImageList 1890
-#define wxNotebook_SetPadding 1891
-#define wxNotebook_SetPageSize 1892
-#define wxNotebook_SetPageImage 1893
-#define wxNotebook_SetPageText 1894
-#define wxNotebook_SetSelection 1895
-#define wxNotebook_ChangeSelection 1896
-#define wxChoicebook_new_0 1897
-#define wxChoicebook_new_3 1898
-#define wxChoicebook_AddPage 1899
-#define wxChoicebook_AdvanceSelection 1900
-#define wxChoicebook_AssignImageList 1901
-#define wxChoicebook_Create 1902
-#define wxChoicebook_DeleteAllPages 1903
-#define wxChoicebook_DeletePage 1904
-#define wxChoicebook_RemovePage 1905
-#define wxChoicebook_GetCurrentPage 1906
-#define wxChoicebook_GetImageList 1907
-#define wxChoicebook_GetPage 1909
-#define wxChoicebook_GetPageCount 1910
-#define wxChoicebook_GetPageImage 1911
-#define wxChoicebook_GetPageText 1912
-#define wxChoicebook_GetSelection 1913
-#define wxChoicebook_HitTest 1914
-#define wxChoicebook_InsertPage 1915
-#define wxChoicebook_SetImageList 1916
-#define wxChoicebook_SetPageSize 1917
-#define wxChoicebook_SetPageImage 1918
-#define wxChoicebook_SetPageText 1919
-#define wxChoicebook_SetSelection 1920
-#define wxChoicebook_ChangeSelection 1921
-#define wxChoicebook_destroy 1922
-#define wxToolbook_new_0 1923
-#define wxToolbook_new_3 1924
-#define wxToolbook_AddPage 1925
-#define wxToolbook_AdvanceSelection 1926
-#define wxToolbook_AssignImageList 1927
-#define wxToolbook_Create 1928
-#define wxToolbook_DeleteAllPages 1929
-#define wxToolbook_DeletePage 1930
-#define wxToolbook_RemovePage 1931
-#define wxToolbook_GetCurrentPage 1932
-#define wxToolbook_GetImageList 1933
-#define wxToolbook_GetPage 1935
-#define wxToolbook_GetPageCount 1936
-#define wxToolbook_GetPageImage 1937
-#define wxToolbook_GetPageText 1938
-#define wxToolbook_GetSelection 1939
-#define wxToolbook_HitTest 1941
-#define wxToolbook_InsertPage 1942
-#define wxToolbook_SetImageList 1943
-#define wxToolbook_SetPageSize 1944
-#define wxToolbook_SetPageImage 1945
-#define wxToolbook_SetPageText 1946
-#define wxToolbook_SetSelection 1947
-#define wxToolbook_ChangeSelection 1948
-#define wxToolbook_destroy 1949
-#define wxListbook_new_0 1950
-#define wxListbook_new_3 1951
-#define wxListbook_AddPage 1952
-#define wxListbook_AdvanceSelection 1953
-#define wxListbook_AssignImageList 1954
-#define wxListbook_Create 1955
-#define wxListbook_DeleteAllPages 1956
-#define wxListbook_DeletePage 1957
-#define wxListbook_RemovePage 1958
-#define wxListbook_GetCurrentPage 1959
-#define wxListbook_GetImageList 1960
-#define wxListbook_GetPage 1962
-#define wxListbook_GetPageCount 1963
-#define wxListbook_GetPageImage 1964
-#define wxListbook_GetPageText 1965
-#define wxListbook_GetSelection 1966
-#define wxListbook_HitTest 1968
-#define wxListbook_InsertPage 1969
-#define wxListbook_SetImageList 1970
-#define wxListbook_SetPageSize 1971
-#define wxListbook_SetPageImage 1972
-#define wxListbook_SetPageText 1973
-#define wxListbook_SetSelection 1974
-#define wxListbook_ChangeSelection 1975
-#define wxListbook_destroy 1976
-#define wxTreebook_new_0 1977
-#define wxTreebook_new_3 1978
-#define wxTreebook_AddPage 1979
-#define wxTreebook_AdvanceSelection 1980
-#define wxTreebook_AssignImageList 1981
-#define wxTreebook_Create 1982
-#define wxTreebook_DeleteAllPages 1983
-#define wxTreebook_DeletePage 1984
-#define wxTreebook_RemovePage 1985
-#define wxTreebook_GetCurrentPage 1986
-#define wxTreebook_GetImageList 1987
-#define wxTreebook_GetPage 1989
-#define wxTreebook_GetPageCount 1990
-#define wxTreebook_GetPageImage 1991
-#define wxTreebook_GetPageText 1992
-#define wxTreebook_GetSelection 1993
-#define wxTreebook_ExpandNode 1994
-#define wxTreebook_IsNodeExpanded 1995
-#define wxTreebook_HitTest 1997
-#define wxTreebook_InsertPage 1998
-#define wxTreebook_InsertSubPage 1999
-#define wxTreebook_SetImageList 2000
-#define wxTreebook_SetPageSize 2001
-#define wxTreebook_SetPageImage 2002
-#define wxTreebook_SetPageText 2003
-#define wxTreebook_SetSelection 2004
-#define wxTreebook_ChangeSelection 2005
-#define wxTreebook_destroy 2006
-#define wxTreeCtrl_new_2 2009
-#define wxTreeCtrl_new_0 2010
-#define wxTreeCtrl_destruct 2012
-#define wxTreeCtrl_AddRoot 2013
-#define wxTreeCtrl_AppendItem 2014
-#define wxTreeCtrl_AssignImageList 2015
-#define wxTreeCtrl_AssignStateImageList 2016
-#define wxTreeCtrl_Collapse 2017
-#define wxTreeCtrl_CollapseAndReset 2018
-#define wxTreeCtrl_Create 2019
-#define wxTreeCtrl_Delete 2020
-#define wxTreeCtrl_DeleteAllItems 2021
-#define wxTreeCtrl_DeleteChildren 2022
-#define wxTreeCtrl_EditLabel 2023
-#define wxTreeCtrl_EnsureVisible 2024
-#define wxTreeCtrl_Expand 2025
-#define wxTreeCtrl_GetBoundingRect 2026
-#define wxTreeCtrl_GetChildrenCount 2028
-#define wxTreeCtrl_GetCount 2029
-#define wxTreeCtrl_GetEditControl 2030
-#define wxTreeCtrl_GetFirstChild 2031
-#define wxTreeCtrl_GetNextChild 2032
-#define wxTreeCtrl_GetFirstVisibleItem 2033
-#define wxTreeCtrl_GetImageList 2034
-#define wxTreeCtrl_GetIndent 2035
-#define wxTreeCtrl_GetItemBackgroundColour 2036
-#define wxTreeCtrl_GetItemData 2037
-#define wxTreeCtrl_GetItemFont 2038
-#define wxTreeCtrl_GetItemImage_1 2039
-#define wxTreeCtrl_GetItemImage_2 2040
-#define wxTreeCtrl_GetItemText 2041
-#define wxTreeCtrl_GetItemTextColour 2042
-#define wxTreeCtrl_GetLastChild 2043
-#define wxTreeCtrl_GetNextSibling 2044
-#define wxTreeCtrl_GetNextVisible 2045
-#define wxTreeCtrl_GetItemParent 2046
-#define wxTreeCtrl_GetPrevSibling 2047
-#define wxTreeCtrl_GetPrevVisible 2048
-#define wxTreeCtrl_GetRootItem 2049
-#define wxTreeCtrl_GetSelection 2050
-#define wxTreeCtrl_GetSelections 2051
-#define wxTreeCtrl_GetStateImageList 2052
-#define wxTreeCtrl_HitTest 2053
-#define wxTreeCtrl_InsertItem 2055
-#define wxTreeCtrl_IsBold 2056
-#define wxTreeCtrl_IsExpanded 2057
-#define wxTreeCtrl_IsSelected 2058
-#define wxTreeCtrl_IsVisible 2059
-#define wxTreeCtrl_ItemHasChildren 2060
-#define wxTreeCtrl_IsTreeItemIdOk 2061
-#define wxTreeCtrl_PrependItem 2062
-#define wxTreeCtrl_ScrollTo 2063
-#define wxTreeCtrl_SelectItem_1 2064
-#define wxTreeCtrl_SelectItem_2 2065
-#define wxTreeCtrl_SetIndent 2066
-#define wxTreeCtrl_SetImageList 2067
-#define wxTreeCtrl_SetItemBackgroundColour 2068
-#define wxTreeCtrl_SetItemBold 2069
-#define wxTreeCtrl_SetItemData 2070
-#define wxTreeCtrl_SetItemDropHighlight 2071
-#define wxTreeCtrl_SetItemFont 2072
-#define wxTreeCtrl_SetItemHasChildren 2073
-#define wxTreeCtrl_SetItemImage_2 2074
-#define wxTreeCtrl_SetItemImage_3 2075
-#define wxTreeCtrl_SetItemText 2076
-#define wxTreeCtrl_SetItemTextColour 2077
-#define wxTreeCtrl_SetStateImageList 2078
-#define wxTreeCtrl_SetWindowStyle 2079
-#define wxTreeCtrl_SortChildren 2080
-#define wxTreeCtrl_Toggle 2081
-#define wxTreeCtrl_ToggleItemSelection 2082
-#define wxTreeCtrl_Unselect 2083
-#define wxTreeCtrl_UnselectAll 2084
-#define wxTreeCtrl_UnselectItem 2085
-#define wxScrollBar_new_0 2086
-#define wxScrollBar_new_3 2087
-#define wxScrollBar_destruct 2088
-#define wxScrollBar_Create 2089
-#define wxScrollBar_GetRange 2090
-#define wxScrollBar_GetPageSize 2091
-#define wxScrollBar_GetThumbPosition 2092
-#define wxScrollBar_GetThumbSize 2093
-#define wxScrollBar_SetThumbPosition 2094
-#define wxScrollBar_SetScrollbar 2095
-#define wxSpinButton_new_2 2097
-#define wxSpinButton_new_0 2098
-#define wxSpinButton_Create 2099
-#define wxSpinButton_GetMax 2100
-#define wxSpinButton_GetMin 2101
-#define wxSpinButton_GetValue 2102
-#define wxSpinButton_SetRange 2103
-#define wxSpinButton_SetValue 2104
-#define wxSpinButton_destroy 2105
-#define wxSpinCtrl_new_0 2106
-#define wxSpinCtrl_new_2 2107
-#define wxSpinCtrl_Create 2109
-#define wxSpinCtrl_SetValue_1_1 2112
-#define wxSpinCtrl_SetValue_1_0 2113
-#define wxSpinCtrl_GetValue 2115
-#define wxSpinCtrl_SetRange 2117
-#define wxSpinCtrl_SetSelection 2118
-#define wxSpinCtrl_GetMin 2120
-#define wxSpinCtrl_GetMax 2122
-#define wxSpinCtrl_destroy 2123
-#define wxStaticText_new_0 2124
-#define wxStaticText_new_4 2125
-#define wxStaticText_Create 2126
-#define wxStaticText_GetLabel 2127
-#define wxStaticText_SetLabel 2128
-#define wxStaticText_Wrap 2129
-#define wxStaticText_destroy 2130
-#define wxStaticBitmap_new_0 2131
-#define wxStaticBitmap_new_4 2132
-#define wxStaticBitmap_Create 2133
-#define wxStaticBitmap_GetBitmap 2134
-#define wxStaticBitmap_SetBitmap 2135
-#define wxStaticBitmap_destroy 2136
-#define wxRadioBox_new 2137
-#define wxRadioBox_destruct 2139
-#define wxRadioBox_Create 2140
-#define wxRadioBox_Enable_2 2141
-#define wxRadioBox_Enable_1 2142
-#define wxRadioBox_GetSelection 2143
-#define wxRadioBox_GetString 2144
-#define wxRadioBox_SetSelection 2145
-#define wxRadioBox_Show_2 2146
-#define wxRadioBox_Show_1 2147
-#define wxRadioBox_GetColumnCount 2148
-#define wxRadioBox_GetItemHelpText 2149
-#define wxRadioBox_GetItemToolTip 2150
-#define wxRadioBox_GetItemFromPoint 2152
-#define wxRadioBox_GetRowCount 2153
-#define wxRadioBox_IsItemEnabled 2154
-#define wxRadioBox_IsItemShown 2155
-#define wxRadioBox_SetItemHelpText 2156
-#define wxRadioBox_SetItemToolTip 2157
-#define wxRadioButton_new_0 2158
-#define wxRadioButton_new_4 2159
-#define wxRadioButton_Create 2160
-#define wxRadioButton_GetValue 2161
-#define wxRadioButton_SetValue 2162
-#define wxRadioButton_destroy 2163
-#define wxSlider_new_6 2165
-#define wxSlider_new_0 2166
-#define wxSlider_Create 2167
-#define wxSlider_GetLineSize 2168
-#define wxSlider_GetMax 2169
-#define wxSlider_GetMin 2170
-#define wxSlider_GetPageSize 2171
-#define wxSlider_GetThumbLength 2172
-#define wxSlider_GetValue 2173
-#define wxSlider_SetLineSize 2174
-#define wxSlider_SetPageSize 2175
-#define wxSlider_SetRange 2176
-#define wxSlider_SetThumbLength 2177
-#define wxSlider_SetValue 2178
-#define wxSlider_destroy 2179
-#define wxDialog_new_4 2181
-#define wxDialog_new_0 2182
-#define wxDialog_destruct 2184
-#define wxDialog_Create 2185
-#define wxDialog_CreateButtonSizer 2186
-#define wxDialog_CreateStdDialogButtonSizer 2187
-#define wxDialog_EndModal 2188
-#define wxDialog_GetAffirmativeId 2189
-#define wxDialog_GetReturnCode 2190
-#define wxDialog_IsModal 2191
-#define wxDialog_SetAffirmativeId 2192
-#define wxDialog_SetReturnCode 2193
-#define wxDialog_Show 2194
-#define wxDialog_ShowModal 2195
-#define wxColourDialog_new_0 2196
-#define wxColourDialog_new_2 2197
-#define wxColourDialog_destruct 2198
-#define wxColourDialog_Create 2199
-#define wxColourDialog_GetColourData 2200
-#define wxColourData_new_0 2201
-#define wxColourData_new_1 2202
-#define wxColourData_destruct 2203
-#define wxColourData_GetChooseFull 2204
-#define wxColourData_GetColour 2205
-#define wxColourData_GetCustomColour 2207
-#define wxColourData_SetChooseFull 2208
-#define wxColourData_SetColour 2209
-#define wxColourData_SetCustomColour 2210
-#define wxPalette_new_0 2211
-#define wxPalette_new_4 2212
-#define wxPalette_destruct 2214
-#define wxPalette_Create 2215
-#define wxPalette_GetColoursCount 2216
-#define wxPalette_GetPixel 2217
-#define wxPalette_GetRGB 2218
-#define wxPalette_IsOk 2219
-#define wxDirDialog_new 2223
-#define wxDirDialog_destruct 2224
-#define wxDirDialog_GetPath 2225
-#define wxDirDialog_GetMessage 2226
-#define wxDirDialog_SetMessage 2227
-#define wxDirDialog_SetPath 2228
-#define wxFileDialog_new 2232
-#define wxFileDialog_destruct 2233
-#define wxFileDialog_GetDirectory 2234
-#define wxFileDialog_GetFilename 2235
-#define wxFileDialog_GetFilenames 2236
-#define wxFileDialog_GetFilterIndex 2237
-#define wxFileDialog_GetMessage 2238
-#define wxFileDialog_GetPath 2239
-#define wxFileDialog_GetPaths 2240
-#define wxFileDialog_GetWildcard 2241
-#define wxFileDialog_SetDirectory 2242
-#define wxFileDialog_SetFilename 2243
-#define wxFileDialog_SetFilterIndex 2244
-#define wxFileDialog_SetMessage 2245
-#define wxFileDialog_SetPath 2246
-#define wxFileDialog_SetWildcard 2247
-#define wxPickerBase_SetInternalMargin 2248
-#define wxPickerBase_GetInternalMargin 2249
-#define wxPickerBase_SetTextCtrlProportion 2250
-#define wxPickerBase_SetPickerCtrlProportion 2251
-#define wxPickerBase_GetTextCtrlProportion 2252
-#define wxPickerBase_GetPickerCtrlProportion 2253
-#define wxPickerBase_HasTextCtrl 2254
-#define wxPickerBase_GetTextCtrl 2255
-#define wxPickerBase_IsTextCtrlGrowable 2256
-#define wxPickerBase_SetPickerCtrlGrowable 2257
-#define wxPickerBase_SetTextCtrlGrowable 2258
-#define wxPickerBase_IsPickerCtrlGrowable 2259
-#define wxFilePickerCtrl_new_0 2260
-#define wxFilePickerCtrl_new_3 2261
-#define wxFilePickerCtrl_Create 2262
-#define wxFilePickerCtrl_GetPath 2263
-#define wxFilePickerCtrl_SetPath 2264
-#define wxFilePickerCtrl_destroy 2265
-#define wxDirPickerCtrl_new_0 2266
-#define wxDirPickerCtrl_new_3 2267
-#define wxDirPickerCtrl_Create 2268
-#define wxDirPickerCtrl_GetPath 2269
-#define wxDirPickerCtrl_SetPath 2270
-#define wxDirPickerCtrl_destroy 2271
-#define wxColourPickerCtrl_new_0 2272
-#define wxColourPickerCtrl_new_3 2273
-#define wxColourPickerCtrl_Create 2274
-#define wxColourPickerCtrl_GetColour 2275
-#define wxColourPickerCtrl_SetColour_1_1 2276
-#define wxColourPickerCtrl_SetColour_1_0 2277
-#define wxColourPickerCtrl_destroy 2278
-#define wxDatePickerCtrl_new_0 2279
-#define wxDatePickerCtrl_new_3 2280
-#define wxDatePickerCtrl_GetRange 2281
-#define wxDatePickerCtrl_GetValue 2282
-#define wxDatePickerCtrl_SetRange 2283
-#define wxDatePickerCtrl_SetValue 2284
-#define wxDatePickerCtrl_destroy 2285
-#define wxFontPickerCtrl_new_0 2286
-#define wxFontPickerCtrl_new_3 2287
-#define wxFontPickerCtrl_Create 2288
-#define wxFontPickerCtrl_GetSelectedFont 2289
-#define wxFontPickerCtrl_SetSelectedFont 2290
-#define wxFontPickerCtrl_GetMaxPointSize 2291
-#define wxFontPickerCtrl_SetMaxPointSize 2292
-#define wxFontPickerCtrl_destroy 2293
-#define wxFindReplaceDialog_new_0 2296
-#define wxFindReplaceDialog_new_4 2297
-#define wxFindReplaceDialog_destruct 2298
-#define wxFindReplaceDialog_Create 2299
-#define wxFindReplaceDialog_GetData 2300
-#define wxFindReplaceData_new_0 2301
-#define wxFindReplaceData_new_1 2302
-#define wxFindReplaceData_GetFindString 2303
-#define wxFindReplaceData_GetReplaceString 2304
-#define wxFindReplaceData_GetFlags 2305
-#define wxFindReplaceData_SetFlags 2306
-#define wxFindReplaceData_SetFindString 2307
-#define wxFindReplaceData_SetReplaceString 2308
-#define wxFindReplaceData_destroy 2309
-#define wxMultiChoiceDialog_new_0 2310
-#define wxMultiChoiceDialog_new_5 2312
-#define wxMultiChoiceDialog_GetSelections 2313
-#define wxMultiChoiceDialog_SetSelections 2314
-#define wxMultiChoiceDialog_destroy 2315
-#define wxSingleChoiceDialog_new_0 2316
-#define wxSingleChoiceDialog_new_5 2318
-#define wxSingleChoiceDialog_GetSelection 2319
-#define wxSingleChoiceDialog_GetStringSelection 2320
-#define wxSingleChoiceDialog_SetSelection 2321
-#define wxSingleChoiceDialog_destroy 2322
-#define wxTextEntryDialog_new 2323
-#define wxTextEntryDialog_GetValue 2324
-#define wxTextEntryDialog_SetValue 2325
-#define wxTextEntryDialog_destroy 2326
-#define wxPasswordEntryDialog_new 2327
-#define wxPasswordEntryDialog_destroy 2328
-#define wxFontData_new_0 2329
-#define wxFontData_new_1 2330
-#define wxFontData_destruct 2331
-#define wxFontData_EnableEffects 2332
-#define wxFontData_GetAllowSymbols 2333
-#define wxFontData_GetColour 2334
-#define wxFontData_GetChosenFont 2335
-#define wxFontData_GetEnableEffects 2336
-#define wxFontData_GetInitialFont 2337
-#define wxFontData_GetShowHelp 2338
-#define wxFontData_SetAllowSymbols 2339
-#define wxFontData_SetChosenFont 2340
-#define wxFontData_SetColour 2341
-#define wxFontData_SetInitialFont 2342
-#define wxFontData_SetRange 2343
-#define wxFontData_SetShowHelp 2344
-#define wxFontDialog_new_0 2348
-#define wxFontDialog_new_2 2350
-#define wxFontDialog_Create 2352
-#define wxFontDialog_GetFontData 2353
-#define wxFontDialog_destroy 2355
-#define wxProgressDialog_new 2356
-#define wxProgressDialog_destruct 2357
-#define wxProgressDialog_Resume 2358
-#define wxProgressDialog_Update_2 2359
-#define wxProgressDialog_Update_0 2360
-#define wxMessageDialog_new 2361
-#define wxMessageDialog_destruct 2362
-#define wxPageSetupDialog_new 2363
-#define wxPageSetupDialog_destruct 2364
-#define wxPageSetupDialog_GetPageSetupData 2365
-#define wxPageSetupDialog_ShowModal 2366
-#define wxPageSetupDialogData_new_0 2367
-#define wxPageSetupDialogData_new_1_0 2368
-#define wxPageSetupDialogData_new_1_1 2369
-#define wxPageSetupDialogData_destruct 2370
-#define wxPageSetupDialogData_EnableHelp 2371
-#define wxPageSetupDialogData_EnableMargins 2372
-#define wxPageSetupDialogData_EnableOrientation 2373
-#define wxPageSetupDialogData_EnablePaper 2374
-#define wxPageSetupDialogData_EnablePrinter 2375
-#define wxPageSetupDialogData_GetDefaultMinMargins 2376
-#define wxPageSetupDialogData_GetEnableMargins 2377
-#define wxPageSetupDialogData_GetEnableOrientation 2378
-#define wxPageSetupDialogData_GetEnablePaper 2379
-#define wxPageSetupDialogData_GetEnablePrinter 2380
-#define wxPageSetupDialogData_GetEnableHelp 2381
-#define wxPageSetupDialogData_GetDefaultInfo 2382
-#define wxPageSetupDialogData_GetMarginTopLeft 2383
-#define wxPageSetupDialogData_GetMarginBottomRight 2384
-#define wxPageSetupDialogData_GetMinMarginTopLeft 2385
-#define wxPageSetupDialogData_GetMinMarginBottomRight 2386
-#define wxPageSetupDialogData_GetPaperId 2387
-#define wxPageSetupDialogData_GetPaperSize 2388
-#define wxPageSetupDialogData_GetPrintData 2390
-#define wxPageSetupDialogData_IsOk 2391
-#define wxPageSetupDialogData_SetDefaultInfo 2392
-#define wxPageSetupDialogData_SetDefaultMinMargins 2393
-#define wxPageSetupDialogData_SetMarginTopLeft 2394
-#define wxPageSetupDialogData_SetMarginBottomRight 2395
-#define wxPageSetupDialogData_SetMinMarginTopLeft 2396
-#define wxPageSetupDialogData_SetMinMarginBottomRight 2397
-#define wxPageSetupDialogData_SetPaperId 2398
-#define wxPageSetupDialogData_SetPaperSize_1_1 2399
-#define wxPageSetupDialogData_SetPaperSize_1_0 2400
-#define wxPageSetupDialogData_SetPrintData 2401
-#define wxPrintDialog_new_2_0 2402
-#define wxPrintDialog_new_2_1 2403
-#define wxPrintDialog_destruct 2404
-#define wxPrintDialog_GetPrintDialogData 2405
-#define wxPrintDialog_GetPrintDC 2406
-#define wxPrintDialogData_new_0 2407
-#define wxPrintDialogData_new_1_1 2408
-#define wxPrintDialogData_new_1_0 2409
-#define wxPrintDialogData_destruct 2410
-#define wxPrintDialogData_EnableHelp 2411
-#define wxPrintDialogData_EnablePageNumbers 2412
-#define wxPrintDialogData_EnablePrintToFile 2413
-#define wxPrintDialogData_EnableSelection 2414
-#define wxPrintDialogData_GetAllPages 2415
-#define wxPrintDialogData_GetCollate 2416
-#define wxPrintDialogData_GetFromPage 2417
-#define wxPrintDialogData_GetMaxPage 2418
-#define wxPrintDialogData_GetMinPage 2419
-#define wxPrintDialogData_GetNoCopies 2420
-#define wxPrintDialogData_GetPrintData 2421
-#define wxPrintDialogData_GetPrintToFile 2422
-#define wxPrintDialogData_GetSelection 2423
-#define wxPrintDialogData_GetToPage 2424
-#define wxPrintDialogData_IsOk 2425
-#define wxPrintDialogData_SetCollate 2426
-#define wxPrintDialogData_SetFromPage 2427
-#define wxPrintDialogData_SetMaxPage 2428
-#define wxPrintDialogData_SetMinPage 2429
-#define wxPrintDialogData_SetNoCopies 2430
-#define wxPrintDialogData_SetPrintData 2431
-#define wxPrintDialogData_SetPrintToFile 2432
-#define wxPrintDialogData_SetSelection 2433
-#define wxPrintDialogData_SetToPage 2434
-#define wxPrintData_new_0 2435
-#define wxPrintData_new_1 2436
-#define wxPrintData_destruct 2437
-#define wxPrintData_GetCollate 2438
-#define wxPrintData_GetBin 2439
-#define wxPrintData_GetColour 2440
-#define wxPrintData_GetDuplex 2441
-#define wxPrintData_GetNoCopies 2442
-#define wxPrintData_GetOrientation 2443
-#define wxPrintData_GetPaperId 2444
-#define wxPrintData_GetPrinterName 2445
-#define wxPrintData_GetQuality 2446
-#define wxPrintData_IsOk 2447
-#define wxPrintData_SetBin 2448
-#define wxPrintData_SetCollate 2449
-#define wxPrintData_SetColour 2450
-#define wxPrintData_SetDuplex 2451
-#define wxPrintData_SetNoCopies 2452
-#define wxPrintData_SetOrientation 2453
-#define wxPrintData_SetPaperId 2454
-#define wxPrintData_SetPrinterName 2455
-#define wxPrintData_SetQuality 2456
-#define wxPrintPreview_new_2 2459
-#define wxPrintPreview_new_3 2460
-#define wxPrintPreview_destruct 2462
-#define wxPrintPreview_GetCanvas 2463
-#define wxPrintPreview_GetCurrentPage 2464
-#define wxPrintPreview_GetFrame 2465
-#define wxPrintPreview_GetMaxPage 2466
-#define wxPrintPreview_GetMinPage 2467
-#define wxPrintPreview_GetPrintout 2468
-#define wxPrintPreview_GetPrintoutForPrinting 2469
-#define wxPrintPreview_IsOk 2470
-#define wxPrintPreview_PaintPage 2471
-#define wxPrintPreview_Print 2472
-#define wxPrintPreview_RenderPage 2473
-#define wxPrintPreview_SetCanvas 2474
-#define wxPrintPreview_SetCurrentPage 2475
-#define wxPrintPreview_SetFrame 2476
-#define wxPrintPreview_SetPrintout 2477
-#define wxPrintPreview_SetZoom 2478
-#define wxPreviewFrame_new 2479
-#define wxPreviewFrame_destruct 2480
-#define wxPreviewFrame_CreateControlBar 2481
-#define wxPreviewFrame_CreateCanvas 2482
-#define wxPreviewFrame_Initialize 2483
-#define wxPreviewFrame_OnCloseWindow 2484
-#define wxPreviewControlBar_new 2485
-#define wxPreviewControlBar_destruct 2486
-#define wxPreviewControlBar_CreateButtons 2487
-#define wxPreviewControlBar_GetPrintPreview 2488
-#define wxPreviewControlBar_GetZoomControl 2489
-#define wxPreviewControlBar_SetZoomControl 2490
-#define wxPrinter_new 2492
-#define wxPrinter_CreateAbortWindow 2493
-#define wxPrinter_GetAbort 2494
-#define wxPrinter_GetLastError 2495
-#define wxPrinter_GetPrintDialogData 2496
-#define wxPrinter_Print 2497
-#define wxPrinter_PrintDialog 2498
-#define wxPrinter_ReportError 2499
-#define wxPrinter_Setup 2500
-#define wxPrinter_destroy 2501
-#define wxXmlResource_new_1 2502
-#define wxXmlResource_new_2 2503
-#define wxXmlResource_destruct 2504
-#define wxXmlResource_AttachUnknownControl 2505
-#define wxXmlResource_ClearHandlers 2506
-#define wxXmlResource_CompareVersion 2507
-#define wxXmlResource_Get 2508
-#define wxXmlResource_GetFlags 2509
-#define wxXmlResource_GetVersion 2510
-#define wxXmlResource_GetXRCID 2511
-#define wxXmlResource_InitAllHandlers 2512
-#define wxXmlResource_Load 2513
-#define wxXmlResource_LoadBitmap 2514
-#define wxXmlResource_LoadDialog_2 2515
-#define wxXmlResource_LoadDialog_3 2516
-#define wxXmlResource_LoadFrame_2 2517
-#define wxXmlResource_LoadFrame_3 2518
-#define wxXmlResource_LoadIcon 2519
-#define wxXmlResource_LoadMenu 2520
-#define wxXmlResource_LoadMenuBar_2 2521
-#define wxXmlResource_LoadMenuBar_1 2522
-#define wxXmlResource_LoadPanel_2 2523
-#define wxXmlResource_LoadPanel_3 2524
-#define wxXmlResource_LoadToolBar 2525
-#define wxXmlResource_Set 2526
-#define wxXmlResource_SetFlags 2527
-#define wxXmlResource_Unload 2528
-#define wxXmlResource_xrcctrl 2529
-#define wxHtmlEasyPrinting_new 2530
-#define wxHtmlEasyPrinting_destruct 2531
-#define wxHtmlEasyPrinting_GetPrintData 2532
-#define wxHtmlEasyPrinting_GetPageSetupData 2533
-#define wxHtmlEasyPrinting_PreviewFile 2534
-#define wxHtmlEasyPrinting_PreviewText 2535
-#define wxHtmlEasyPrinting_PrintFile 2536
-#define wxHtmlEasyPrinting_PrintText 2537
-#define wxHtmlEasyPrinting_PageSetup 2538
-#define wxHtmlEasyPrinting_SetFonts 2539
-#define wxHtmlEasyPrinting_SetHeader 2540
-#define wxHtmlEasyPrinting_SetFooter 2541
-#define wxGLCanvas_new_2 2543
-#define wxGLCanvas_new_3_1 2544
-#define wxGLCanvas_new_3_0 2545
-#define wxGLCanvas_GetContext 2546
-#define wxGLCanvas_SetCurrent 2548
-#define wxGLCanvas_SwapBuffers 2549
-#define wxGLCanvas_destroy 2550
-#define wxAuiManager_new 2551
-#define wxAuiManager_destruct 2552
-#define wxAuiManager_AddPane_2_1 2553
-#define wxAuiManager_AddPane_3 2554
-#define wxAuiManager_AddPane_2_0 2555
-#define wxAuiManager_DetachPane 2556
-#define wxAuiManager_GetAllPanes 2557
-#define wxAuiManager_GetArtProvider 2558
-#define wxAuiManager_GetDockSizeConstraint 2559
-#define wxAuiManager_GetFlags 2560
-#define wxAuiManager_GetManagedWindow 2561
-#define wxAuiManager_GetManager 2562
-#define wxAuiManager_GetPane_1_1 2563
-#define wxAuiManager_GetPane_1_0 2564
-#define wxAuiManager_HideHint 2565
-#define wxAuiManager_InsertPane 2566
-#define wxAuiManager_LoadPaneInfo 2567
-#define wxAuiManager_LoadPerspective 2568
-#define wxAuiManager_SavePaneInfo 2569
-#define wxAuiManager_SavePerspective 2570
-#define wxAuiManager_SetArtProvider 2571
-#define wxAuiManager_SetDockSizeConstraint 2572
-#define wxAuiManager_SetFlags 2573
-#define wxAuiManager_SetManagedWindow 2574
-#define wxAuiManager_ShowHint 2575
-#define wxAuiManager_UnInit 2576
-#define wxAuiManager_Update 2577
-#define wxAuiPaneInfo_new_0 2578
-#define wxAuiPaneInfo_new_1 2579
-#define wxAuiPaneInfo_destruct 2580
-#define wxAuiPaneInfo_BestSize_1 2581
-#define wxAuiPaneInfo_BestSize_2 2582
-#define wxAuiPaneInfo_Bottom 2583
-#define wxAuiPaneInfo_BottomDockable 2584
-#define wxAuiPaneInfo_Caption 2585
-#define wxAuiPaneInfo_CaptionVisible 2586
-#define wxAuiPaneInfo_Centre 2587
-#define wxAuiPaneInfo_CentrePane 2588
-#define wxAuiPaneInfo_CloseButton 2589
-#define wxAuiPaneInfo_DefaultPane 2590
-#define wxAuiPaneInfo_DestroyOnClose 2591
-#define wxAuiPaneInfo_Direction 2592
-#define wxAuiPaneInfo_Dock 2593
-#define wxAuiPaneInfo_Dockable 2594
-#define wxAuiPaneInfo_Fixed 2595
-#define wxAuiPaneInfo_Float 2596
-#define wxAuiPaneInfo_Floatable 2597
-#define wxAuiPaneInfo_FloatingPosition_1 2598
-#define wxAuiPaneInfo_FloatingPosition_2 2599
-#define wxAuiPaneInfo_FloatingSize_1 2600
-#define wxAuiPaneInfo_FloatingSize_2 2601
-#define wxAuiPaneInfo_Gripper 2602
-#define wxAuiPaneInfo_GripperTop 2603
-#define wxAuiPaneInfo_HasBorder 2604
-#define wxAuiPaneInfo_HasCaption 2605
-#define wxAuiPaneInfo_HasCloseButton 2606
-#define wxAuiPaneInfo_HasFlag 2607
-#define wxAuiPaneInfo_HasGripper 2608
-#define wxAuiPaneInfo_HasGripperTop 2609
-#define wxAuiPaneInfo_HasMaximizeButton 2610
-#define wxAuiPaneInfo_HasMinimizeButton 2611
-#define wxAuiPaneInfo_HasPinButton 2612
-#define wxAuiPaneInfo_Hide 2613
-#define wxAuiPaneInfo_IsBottomDockable 2614
-#define wxAuiPaneInfo_IsDocked 2615
-#define wxAuiPaneInfo_IsFixed 2616
-#define wxAuiPaneInfo_IsFloatable 2617
-#define wxAuiPaneInfo_IsFloating 2618
-#define wxAuiPaneInfo_IsLeftDockable 2619
-#define wxAuiPaneInfo_IsMovable 2620
-#define wxAuiPaneInfo_IsOk 2621
-#define wxAuiPaneInfo_IsResizable 2622
-#define wxAuiPaneInfo_IsRightDockable 2623
-#define wxAuiPaneInfo_IsShown 2624
-#define wxAuiPaneInfo_IsToolbar 2625
-#define wxAuiPaneInfo_IsTopDockable 2626
-#define wxAuiPaneInfo_Layer 2627
-#define wxAuiPaneInfo_Left 2628
-#define wxAuiPaneInfo_LeftDockable 2629
-#define wxAuiPaneInfo_MaxSize_1 2630
-#define wxAuiPaneInfo_MaxSize_2 2631
-#define wxAuiPaneInfo_MaximizeButton 2632
-#define wxAuiPaneInfo_MinSize_1 2633
-#define wxAuiPaneInfo_MinSize_2 2634
-#define wxAuiPaneInfo_MinimizeButton 2635
-#define wxAuiPaneInfo_Movable 2636
-#define wxAuiPaneInfo_Name 2637
-#define wxAuiPaneInfo_PaneBorder 2638
-#define wxAuiPaneInfo_PinButton 2639
-#define wxAuiPaneInfo_Position 2640
-#define wxAuiPaneInfo_Resizable 2641
-#define wxAuiPaneInfo_Right 2642
-#define wxAuiPaneInfo_RightDockable 2643
-#define wxAuiPaneInfo_Row 2644
-#define wxAuiPaneInfo_SafeSet 2645
-#define wxAuiPaneInfo_SetFlag 2646
-#define wxAuiPaneInfo_Show 2647
-#define wxAuiPaneInfo_ToolbarPane 2648
-#define wxAuiPaneInfo_Top 2649
-#define wxAuiPaneInfo_TopDockable 2650
-#define wxAuiPaneInfo_Window 2651
-#define wxAuiNotebook_new_0 2652
-#define wxAuiNotebook_new_2 2653
-#define wxAuiNotebook_AddPage 2654
-#define wxAuiNotebook_Create 2655
-#define wxAuiNotebook_DeletePage 2656
-#define wxAuiNotebook_GetArtProvider 2657
-#define wxAuiNotebook_GetPage 2658
-#define wxAuiNotebook_GetPageBitmap 2659
-#define wxAuiNotebook_GetPageCount 2660
-#define wxAuiNotebook_GetPageIndex 2661
-#define wxAuiNotebook_GetPageText 2662
-#define wxAuiNotebook_GetSelection 2663
-#define wxAuiNotebook_InsertPage 2664
-#define wxAuiNotebook_RemovePage 2665
-#define wxAuiNotebook_SetArtProvider 2666
-#define wxAuiNotebook_SetFont 2667
-#define wxAuiNotebook_SetPageBitmap 2668
-#define wxAuiNotebook_SetPageText 2669
-#define wxAuiNotebook_SetSelection 2670
-#define wxAuiNotebook_SetTabCtrlHeight 2671
-#define wxAuiNotebook_SetUniformBitmapSize 2672
-#define wxAuiNotebook_destroy 2673
-#define wxMDIParentFrame_new_0 2674
-#define wxMDIParentFrame_new_4 2675
-#define wxMDIParentFrame_destruct 2676
-#define wxMDIParentFrame_ActivateNext 2677
-#define wxMDIParentFrame_ActivatePrevious 2678
-#define wxMDIParentFrame_ArrangeIcons 2679
-#define wxMDIParentFrame_Cascade 2680
-#define wxMDIParentFrame_Create 2681
-#define wxMDIParentFrame_GetActiveChild 2682
-#define wxMDIParentFrame_GetClientWindow 2683
-#define wxMDIParentFrame_Tile 2684
-#define wxMDIChildFrame_new_0 2685
-#define wxMDIChildFrame_new_4 2686
-#define wxMDIChildFrame_destruct 2687
-#define wxMDIChildFrame_Activate 2688
-#define wxMDIChildFrame_Create 2689
-#define wxMDIChildFrame_Maximize 2690
-#define wxMDIChildFrame_Restore 2691
-#define wxMDIClientWindow_new_0 2692
-#define wxMDIClientWindow_new_2 2693
-#define wxMDIClientWindow_destruct 2694
-#define wxMDIClientWindow_CreateClient 2695
-#define wxLayoutAlgorithm_new 2696
-#define wxLayoutAlgorithm_LayoutFrame 2697
-#define wxLayoutAlgorithm_LayoutMDIFrame 2698
-#define wxLayoutAlgorithm_LayoutWindow 2699
-#define wxLayoutAlgorithm_destroy 2700
-#define wxEvent_GetId 2701
-#define wxEvent_GetSkipped 2702
-#define wxEvent_GetTimestamp 2703
-#define wxEvent_IsCommandEvent 2704
-#define wxEvent_ResumePropagation 2705
-#define wxEvent_ShouldPropagate 2706
-#define wxEvent_Skip 2707
-#define wxEvent_StopPropagation 2708
-#define wxCommandEvent_getClientData 2709
-#define wxCommandEvent_GetExtraLong 2710
-#define wxCommandEvent_GetInt 2711
-#define wxCommandEvent_GetSelection 2712
-#define wxCommandEvent_GetString 2713
-#define wxCommandEvent_IsChecked 2714
-#define wxCommandEvent_IsSelection 2715
-#define wxCommandEvent_SetInt 2716
-#define wxCommandEvent_SetString 2717
-#define wxScrollEvent_GetOrientation 2718
-#define wxScrollEvent_GetPosition 2719
-#define wxScrollWinEvent_GetOrientation 2720
-#define wxScrollWinEvent_GetPosition 2721
-#define wxMouseEvent_AltDown 2722
-#define wxMouseEvent_Button 2723
-#define wxMouseEvent_ButtonDClick 2724
-#define wxMouseEvent_ButtonDown 2725
-#define wxMouseEvent_ButtonUp 2726
-#define wxMouseEvent_CmdDown 2727
-#define wxMouseEvent_ControlDown 2728
-#define wxMouseEvent_Dragging 2729
-#define wxMouseEvent_Entering 2730
-#define wxMouseEvent_GetButton 2731
-#define wxMouseEvent_GetPosition 2734
-#define wxMouseEvent_GetLogicalPosition 2735
-#define wxMouseEvent_GetLinesPerAction 2736
-#define wxMouseEvent_GetWheelRotation 2737
-#define wxMouseEvent_GetWheelDelta 2738
-#define wxMouseEvent_GetX 2739
-#define wxMouseEvent_GetY 2740
-#define wxMouseEvent_IsButton 2741
-#define wxMouseEvent_IsPageScroll 2742
-#define wxMouseEvent_Leaving 2743
-#define wxMouseEvent_LeftDClick 2744
-#define wxMouseEvent_LeftDown 2745
-#define wxMouseEvent_LeftIsDown 2746
-#define wxMouseEvent_LeftUp 2747
-#define wxMouseEvent_MetaDown 2748
-#define wxMouseEvent_MiddleDClick 2749
-#define wxMouseEvent_MiddleDown 2750
-#define wxMouseEvent_MiddleIsDown 2751
-#define wxMouseEvent_MiddleUp 2752
-#define wxMouseEvent_Moving 2753
-#define wxMouseEvent_RightDClick 2754
-#define wxMouseEvent_RightDown 2755
-#define wxMouseEvent_RightIsDown 2756
-#define wxMouseEvent_RightUp 2757
-#define wxMouseEvent_ShiftDown 2758
-#define wxSetCursorEvent_GetCursor 2759
-#define wxSetCursorEvent_GetX 2760
-#define wxSetCursorEvent_GetY 2761
-#define wxSetCursorEvent_HasCursor 2762
-#define wxSetCursorEvent_SetCursor 2763
-#define wxKeyEvent_AltDown 2764
-#define wxKeyEvent_CmdDown 2765
-#define wxKeyEvent_ControlDown 2766
-#define wxKeyEvent_GetKeyCode 2767
-#define wxKeyEvent_GetModifiers 2768
-#define wxKeyEvent_GetPosition 2771
-#define wxKeyEvent_GetRawKeyCode 2772
-#define wxKeyEvent_GetRawKeyFlags 2773
-#define wxKeyEvent_GetUnicodeKey 2774
-#define wxKeyEvent_GetX 2775
-#define wxKeyEvent_GetY 2776
-#define wxKeyEvent_HasModifiers 2777
-#define wxKeyEvent_MetaDown 2778
-#define wxKeyEvent_ShiftDown 2779
-#define wxSizeEvent_GetSize 2780
-#define wxMoveEvent_GetPosition 2781
-#define wxEraseEvent_GetDC 2782
-#define wxFocusEvent_GetWindow 2783
-#define wxChildFocusEvent_GetWindow 2784
-#define wxMenuEvent_GetMenu 2785
-#define wxMenuEvent_GetMenuId 2786
-#define wxMenuEvent_IsPopup 2787
-#define wxCloseEvent_CanVeto 2788
-#define wxCloseEvent_GetLoggingOff 2789
-#define wxCloseEvent_SetCanVeto 2790
-#define wxCloseEvent_SetLoggingOff 2791
-#define wxCloseEvent_Veto 2792
-#define wxShowEvent_SetShow 2793
-#define wxShowEvent_GetShow 2794
-#define wxIconizeEvent_Iconized 2795
-#define wxJoystickEvent_ButtonDown 2796
-#define wxJoystickEvent_ButtonIsDown 2797
-#define wxJoystickEvent_ButtonUp 2798
-#define wxJoystickEvent_GetButtonChange 2799
-#define wxJoystickEvent_GetButtonState 2800
-#define wxJoystickEvent_GetJoystick 2801
-#define wxJoystickEvent_GetPosition 2802
-#define wxJoystickEvent_GetZPosition 2803
-#define wxJoystickEvent_IsButton 2804
-#define wxJoystickEvent_IsMove 2805
-#define wxJoystickEvent_IsZMove 2806
-#define wxUpdateUIEvent_CanUpdate 2807
-#define wxUpdateUIEvent_Check 2808
-#define wxUpdateUIEvent_Enable 2809
-#define wxUpdateUIEvent_Show 2810
-#define wxUpdateUIEvent_GetChecked 2811
-#define wxUpdateUIEvent_GetEnabled 2812
-#define wxUpdateUIEvent_GetShown 2813
-#define wxUpdateUIEvent_GetSetChecked 2814
-#define wxUpdateUIEvent_GetSetEnabled 2815
-#define wxUpdateUIEvent_GetSetShown 2816
-#define wxUpdateUIEvent_GetSetText 2817
-#define wxUpdateUIEvent_GetText 2818
-#define wxUpdateUIEvent_GetMode 2819
-#define wxUpdateUIEvent_GetUpdateInterval 2820
-#define wxUpdateUIEvent_ResetUpdateTime 2821
-#define wxUpdateUIEvent_SetMode 2822
-#define wxUpdateUIEvent_SetText 2823
-#define wxUpdateUIEvent_SetUpdateInterval 2824
-#define wxMouseCaptureChangedEvent_GetCapturedWindow 2825
-#define wxPaletteChangedEvent_SetChangedWindow 2826
-#define wxPaletteChangedEvent_GetChangedWindow 2827
-#define wxQueryNewPaletteEvent_SetPaletteRealized 2828
-#define wxQueryNewPaletteEvent_GetPaletteRealized 2829
-#define wxNavigationKeyEvent_GetDirection 2830
-#define wxNavigationKeyEvent_SetDirection 2831
-#define wxNavigationKeyEvent_IsWindowChange 2832
-#define wxNavigationKeyEvent_SetWindowChange 2833
-#define wxNavigationKeyEvent_IsFromTab 2834
-#define wxNavigationKeyEvent_SetFromTab 2835
-#define wxNavigationKeyEvent_GetCurrentFocus 2836
-#define wxNavigationKeyEvent_SetCurrentFocus 2837
-#define wxHelpEvent_GetOrigin 2838
-#define wxHelpEvent_GetPosition 2839
-#define wxHelpEvent_SetOrigin 2840
-#define wxHelpEvent_SetPosition 2841
-#define wxContextMenuEvent_GetPosition 2842
-#define wxContextMenuEvent_SetPosition 2843
-#define wxIdleEvent_CanSend 2844
-#define wxIdleEvent_GetMode 2845
-#define wxIdleEvent_RequestMore 2846
-#define wxIdleEvent_MoreRequested 2847
-#define wxIdleEvent_SetMode 2848
-#define wxGridEvent_AltDown 2849
-#define wxGridEvent_ControlDown 2850
-#define wxGridEvent_GetCol 2851
-#define wxGridEvent_GetPosition 2852
-#define wxGridEvent_GetRow 2853
-#define wxGridEvent_MetaDown 2854
-#define wxGridEvent_Selecting 2855
-#define wxGridEvent_ShiftDown 2856
-#define wxNotifyEvent_Allow 2857
-#define wxNotifyEvent_IsAllowed 2858
-#define wxNotifyEvent_Veto 2859
-#define wxSashEvent_GetEdge 2860
-#define wxSashEvent_GetDragRect 2861
-#define wxSashEvent_GetDragStatus 2862
-#define wxListEvent_GetCacheFrom 2863
-#define wxListEvent_GetCacheTo 2864
-#define wxListEvent_GetKeyCode 2865
-#define wxListEvent_GetIndex 2866
-#define wxListEvent_GetColumn 2867
-#define wxListEvent_GetPoint 2868
-#define wxListEvent_GetLabel 2869
-#define wxListEvent_GetText 2870
-#define wxListEvent_GetImage 2871
-#define wxListEvent_GetData 2872
-#define wxListEvent_GetMask 2873
-#define wxListEvent_GetItem 2874
-#define wxListEvent_IsEditCancelled 2875
-#define wxDateEvent_GetDate 2876
-#define wxCalendarEvent_GetWeekDay 2877
-#define wxFileDirPickerEvent_GetPath 2878
-#define wxColourPickerEvent_GetColour 2879
-#define wxFontPickerEvent_GetFont 2880
-#define wxStyledTextEvent_GetPosition 2881
-#define wxStyledTextEvent_GetKey 2882
-#define wxStyledTextEvent_GetModifiers 2883
-#define wxStyledTextEvent_GetModificationType 2884
-#define wxStyledTextEvent_GetText 2885
-#define wxStyledTextEvent_GetLength 2886
-#define wxStyledTextEvent_GetLinesAdded 2887
-#define wxStyledTextEvent_GetLine 2888
-#define wxStyledTextEvent_GetFoldLevelNow 2889
-#define wxStyledTextEvent_GetFoldLevelPrev 2890
-#define wxStyledTextEvent_GetMargin 2891
-#define wxStyledTextEvent_GetMessage 2892
-#define wxStyledTextEvent_GetWParam 2893
-#define wxStyledTextEvent_GetLParam 2894
-#define wxStyledTextEvent_GetListType 2895
-#define wxStyledTextEvent_GetX 2896
-#define wxStyledTextEvent_GetY 2897
-#define wxStyledTextEvent_GetDragText 2898
-#define wxStyledTextEvent_GetDragAllowMove 2899
-#define wxStyledTextEvent_GetDragResult 2900
-#define wxStyledTextEvent_GetShift 2901
-#define wxStyledTextEvent_GetControl 2902
-#define wxStyledTextEvent_GetAlt 2903
-#define utils_wxGetKeyState 2904
-#define utils_wxGetMousePosition 2905
-#define utils_wxGetMouseState 2906
-#define utils_wxSetDetectableAutoRepeat 2907
-#define utils_wxBell 2908
-#define utils_wxFindMenuItemId 2909
-#define utils_wxGenericFindWindowAtPoint 2910
-#define utils_wxFindWindowAtPoint 2911
-#define utils_wxBeginBusyCursor 2912
-#define utils_wxEndBusyCursor 2913
-#define utils_wxIsBusy 2914
-#define utils_wxShutdown 2915
-#define utils_wxShell 2916
-#define utils_wxLaunchDefaultBrowser 2917
-#define utils_wxGetEmailAddress 2918
-#define utils_wxGetUserId 2919
-#define utils_wxGetHomeDir 2920
-#define utils_wxNewId 2921
-#define utils_wxRegisterId 2922
-#define utils_wxGetCurrentId 2923
-#define utils_wxGetOsDescription 2924
-#define utils_wxIsPlatformLittleEndian 2925
-#define utils_wxIsPlatform64Bit 2926
-#define wxPrintout_new 2927
-#define wxPrintout_destruct 2928
-#define wxPrintout_GetDC 2929
-#define wxPrintout_GetPageSizeMM 2930
-#define wxPrintout_GetPageSizePixels 2931
-#define wxPrintout_GetPaperRectPixels 2932
-#define wxPrintout_GetPPIPrinter 2933
-#define wxPrintout_GetPPIScreen 2934
-#define wxPrintout_GetTitle 2935
-#define wxPrintout_IsPreview 2936
-#define wxPrintout_FitThisSizeToPaper 2937
-#define wxPrintout_FitThisSizeToPage 2938
-#define wxPrintout_FitThisSizeToPageMargins 2939
-#define wxPrintout_MapScreenSizeToPaper 2940
-#define wxPrintout_MapScreenSizeToPage 2941
-#define wxPrintout_MapScreenSizeToPageMargins 2942
-#define wxPrintout_MapScreenSizeToDevice 2943
-#define wxPrintout_GetLogicalPaperRect 2944
-#define wxPrintout_GetLogicalPageRect 2945
-#define wxPrintout_GetLogicalPageMarginsRect 2946
-#define wxPrintout_SetLogicalOrigin 2947
-#define wxPrintout_OffsetLogicalOrigin 2948
-#define wxStyledTextCtrl_new_2 2949
-#define wxStyledTextCtrl_new_0 2950
-#define wxStyledTextCtrl_destruct 2951
-#define wxStyledTextCtrl_Create 2952
-#define wxStyledTextCtrl_AddText 2953
-#define wxStyledTextCtrl_AddStyledText 2954
-#define wxStyledTextCtrl_InsertText 2955
-#define wxStyledTextCtrl_ClearAll 2956
-#define wxStyledTextCtrl_ClearDocumentStyle 2957
-#define wxStyledTextCtrl_GetLength 2958
-#define wxStyledTextCtrl_GetCharAt 2959
-#define wxStyledTextCtrl_GetCurrentPos 2960
-#define wxStyledTextCtrl_GetAnchor 2961
-#define wxStyledTextCtrl_GetStyleAt 2962
-#define wxStyledTextCtrl_Redo 2963
-#define wxStyledTextCtrl_SetUndoCollection 2964
-#define wxStyledTextCtrl_SelectAll 2965
-#define wxStyledTextCtrl_SetSavePoint 2966
-#define wxStyledTextCtrl_GetStyledText 2967
-#define wxStyledTextCtrl_CanRedo 2968
-#define wxStyledTextCtrl_MarkerLineFromHandle 2969
-#define wxStyledTextCtrl_MarkerDeleteHandle 2970
-#define wxStyledTextCtrl_GetUndoCollection 2971
-#define wxStyledTextCtrl_GetViewWhiteSpace 2972
-#define wxStyledTextCtrl_SetViewWhiteSpace 2973
-#define wxStyledTextCtrl_PositionFromPoint 2974
-#define wxStyledTextCtrl_PositionFromPointClose 2975
-#define wxStyledTextCtrl_GotoLine 2976
-#define wxStyledTextCtrl_GotoPos 2977
-#define wxStyledTextCtrl_SetAnchor 2978
-#define wxStyledTextCtrl_GetCurLine 2979
-#define wxStyledTextCtrl_GetEndStyled 2980
-#define wxStyledTextCtrl_ConvertEOLs 2981
-#define wxStyledTextCtrl_GetEOLMode 2982
-#define wxStyledTextCtrl_SetEOLMode 2983
-#define wxStyledTextCtrl_StartStyling 2984
-#define wxStyledTextCtrl_SetStyling 2985
-#define wxStyledTextCtrl_GetBufferedDraw 2986
-#define wxStyledTextCtrl_SetBufferedDraw 2987
-#define wxStyledTextCtrl_SetTabWidth 2988
-#define wxStyledTextCtrl_GetTabWidth 2989
-#define wxStyledTextCtrl_SetCodePage 2990
-#define wxStyledTextCtrl_MarkerDefine 2991
-#define wxStyledTextCtrl_MarkerSetForeground 2992
-#define wxStyledTextCtrl_MarkerSetBackground 2993
-#define wxStyledTextCtrl_MarkerAdd 2994
-#define wxStyledTextCtrl_MarkerDelete 2995
-#define wxStyledTextCtrl_MarkerDeleteAll 2996
-#define wxStyledTextCtrl_MarkerGet 2997
-#define wxStyledTextCtrl_MarkerNext 2998
-#define wxStyledTextCtrl_MarkerPrevious 2999
-#define wxStyledTextCtrl_MarkerDefineBitmap 3000
-#define wxStyledTextCtrl_MarkerAddSet 3001
-#define wxStyledTextCtrl_MarkerSetAlpha 3002
-#define wxStyledTextCtrl_SetMarginType 3003
-#define wxStyledTextCtrl_GetMarginType 3004
-#define wxStyledTextCtrl_SetMarginWidth 3005
-#define wxStyledTextCtrl_GetMarginWidth 3006
-#define wxStyledTextCtrl_SetMarginMask 3007
-#define wxStyledTextCtrl_GetMarginMask 3008
-#define wxStyledTextCtrl_SetMarginSensitive 3009
-#define wxStyledTextCtrl_GetMarginSensitive 3010
-#define wxStyledTextCtrl_StyleClearAll 3011
-#define wxStyledTextCtrl_StyleSetForeground 3012
-#define wxStyledTextCtrl_StyleSetBackground 3013
-#define wxStyledTextCtrl_StyleSetBold 3014
-#define wxStyledTextCtrl_StyleSetItalic 3015
-#define wxStyledTextCtrl_StyleSetSize 3016
-#define wxStyledTextCtrl_StyleSetFaceName 3017
-#define wxStyledTextCtrl_StyleSetEOLFilled 3018
-#define wxStyledTextCtrl_StyleResetDefault 3019
-#define wxStyledTextCtrl_StyleSetUnderline 3020
-#define wxStyledTextCtrl_StyleSetCase 3021
-#define wxStyledTextCtrl_StyleSetHotSpot 3022
-#define wxStyledTextCtrl_SetSelForeground 3023
-#define wxStyledTextCtrl_SetSelBackground 3024
-#define wxStyledTextCtrl_GetSelAlpha 3025
-#define wxStyledTextCtrl_SetSelAlpha 3026
-#define wxStyledTextCtrl_SetCaretForeground 3027
-#define wxStyledTextCtrl_CmdKeyAssign 3028
-#define wxStyledTextCtrl_CmdKeyClear 3029
-#define wxStyledTextCtrl_CmdKeyClearAll 3030
-#define wxStyledTextCtrl_SetStyleBytes 3031
-#define wxStyledTextCtrl_StyleSetVisible 3032
-#define wxStyledTextCtrl_GetCaretPeriod 3033
-#define wxStyledTextCtrl_SetCaretPeriod 3034
-#define wxStyledTextCtrl_SetWordChars 3035
-#define wxStyledTextCtrl_BeginUndoAction 3036
-#define wxStyledTextCtrl_EndUndoAction 3037
-#define wxStyledTextCtrl_IndicatorSetStyle 3038
-#define wxStyledTextCtrl_IndicatorGetStyle 3039
-#define wxStyledTextCtrl_IndicatorSetForeground 3040
-#define wxStyledTextCtrl_IndicatorGetForeground 3041
-#define wxStyledTextCtrl_SetWhitespaceForeground 3042
-#define wxStyledTextCtrl_SetWhitespaceBackground 3043
-#define wxStyledTextCtrl_GetStyleBits 3044
-#define wxStyledTextCtrl_SetLineState 3045
-#define wxStyledTextCtrl_GetLineState 3046
-#define wxStyledTextCtrl_GetMaxLineState 3047
-#define wxStyledTextCtrl_GetCaretLineVisible 3048
-#define wxStyledTextCtrl_SetCaretLineVisible 3049
-#define wxStyledTextCtrl_GetCaretLineBackground 3050
-#define wxStyledTextCtrl_SetCaretLineBackground 3051
-#define wxStyledTextCtrl_AutoCompShow 3052
-#define wxStyledTextCtrl_AutoCompCancel 3053
-#define wxStyledTextCtrl_AutoCompActive 3054
-#define wxStyledTextCtrl_AutoCompPosStart 3055
-#define wxStyledTextCtrl_AutoCompComplete 3056
-#define wxStyledTextCtrl_AutoCompStops 3057
-#define wxStyledTextCtrl_AutoCompSetSeparator 3058
-#define wxStyledTextCtrl_AutoCompGetSeparator 3059
-#define wxStyledTextCtrl_AutoCompSelect 3060
-#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3061
-#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3062
-#define wxStyledTextCtrl_AutoCompSetFillUps 3063
-#define wxStyledTextCtrl_AutoCompSetChooseSingle 3064
-#define wxStyledTextCtrl_AutoCompGetChooseSingle 3065
-#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3066
-#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3067
-#define wxStyledTextCtrl_UserListShow 3068
-#define wxStyledTextCtrl_AutoCompSetAutoHide 3069
-#define wxStyledTextCtrl_AutoCompGetAutoHide 3070
-#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3071
-#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3072
-#define wxStyledTextCtrl_RegisterImage 3073
-#define wxStyledTextCtrl_ClearRegisteredImages 3074
-#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3075
-#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3076
-#define wxStyledTextCtrl_AutoCompSetMaxWidth 3077
-#define wxStyledTextCtrl_AutoCompGetMaxWidth 3078
-#define wxStyledTextCtrl_AutoCompSetMaxHeight 3079
-#define wxStyledTextCtrl_AutoCompGetMaxHeight 3080
-#define wxStyledTextCtrl_SetIndent 3081
-#define wxStyledTextCtrl_GetIndent 3082
-#define wxStyledTextCtrl_SetUseTabs 3083
-#define wxStyledTextCtrl_GetUseTabs 3084
-#define wxStyledTextCtrl_SetLineIndentation 3085
-#define wxStyledTextCtrl_GetLineIndentation 3086
-#define wxStyledTextCtrl_GetLineIndentPosition 3087
-#define wxStyledTextCtrl_GetColumn 3088
-#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3089
-#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3090
-#define wxStyledTextCtrl_SetIndentationGuides 3091
-#define wxStyledTextCtrl_GetIndentationGuides 3092
-#define wxStyledTextCtrl_SetHighlightGuide 3093
-#define wxStyledTextCtrl_GetHighlightGuide 3094
-#define wxStyledTextCtrl_GetLineEndPosition 3095
-#define wxStyledTextCtrl_GetCodePage 3096
-#define wxStyledTextCtrl_GetCaretForeground 3097
-#define wxStyledTextCtrl_GetReadOnly 3098
-#define wxStyledTextCtrl_SetCurrentPos 3099
-#define wxStyledTextCtrl_SetSelectionStart 3100
-#define wxStyledTextCtrl_GetSelectionStart 3101
-#define wxStyledTextCtrl_SetSelectionEnd 3102
-#define wxStyledTextCtrl_GetSelectionEnd 3103
-#define wxStyledTextCtrl_SetPrintMagnification 3104
-#define wxStyledTextCtrl_GetPrintMagnification 3105
-#define wxStyledTextCtrl_SetPrintColourMode 3106
-#define wxStyledTextCtrl_GetPrintColourMode 3107
-#define wxStyledTextCtrl_FindText 3108
-#define wxStyledTextCtrl_FormatRange 3109
-#define wxStyledTextCtrl_GetFirstVisibleLine 3110
-#define wxStyledTextCtrl_GetLine 3111
-#define wxStyledTextCtrl_GetLineCount 3112
-#define wxStyledTextCtrl_SetMarginLeft 3113
-#define wxStyledTextCtrl_GetMarginLeft 3114
-#define wxStyledTextCtrl_SetMarginRight 3115
-#define wxStyledTextCtrl_GetMarginRight 3116
-#define wxStyledTextCtrl_GetModify 3117
-#define wxStyledTextCtrl_SetSelection 3118
-#define wxStyledTextCtrl_GetSelectedText 3119
-#define wxStyledTextCtrl_GetTextRange 3120
-#define wxStyledTextCtrl_HideSelection 3121
-#define wxStyledTextCtrl_LineFromPosition 3122
-#define wxStyledTextCtrl_PositionFromLine 3123
-#define wxStyledTextCtrl_LineScroll 3124
-#define wxStyledTextCtrl_EnsureCaretVisible 3125
-#define wxStyledTextCtrl_ReplaceSelection 3126
-#define wxStyledTextCtrl_SetReadOnly 3127
-#define wxStyledTextCtrl_CanPaste 3128
-#define wxStyledTextCtrl_CanUndo 3129
-#define wxStyledTextCtrl_EmptyUndoBuffer 3130
-#define wxStyledTextCtrl_Undo 3131
-#define wxStyledTextCtrl_Cut 3132
-#define wxStyledTextCtrl_Copy 3133
-#define wxStyledTextCtrl_Paste 3134
-#define wxStyledTextCtrl_Clear 3135
-#define wxStyledTextCtrl_SetText 3136
-#define wxStyledTextCtrl_GetText 3137
-#define wxStyledTextCtrl_GetTextLength 3138
-#define wxStyledTextCtrl_GetOvertype 3139
-#define wxStyledTextCtrl_SetCaretWidth 3140
-#define wxStyledTextCtrl_GetCaretWidth 3141
-#define wxStyledTextCtrl_SetTargetStart 3142
-#define wxStyledTextCtrl_GetTargetStart 3143
-#define wxStyledTextCtrl_SetTargetEnd 3144
-#define wxStyledTextCtrl_GetTargetEnd 3145
-#define wxStyledTextCtrl_ReplaceTarget 3146
-#define wxStyledTextCtrl_SearchInTarget 3147
-#define wxStyledTextCtrl_SetSearchFlags 3148
-#define wxStyledTextCtrl_GetSearchFlags 3149
-#define wxStyledTextCtrl_CallTipShow 3150
-#define wxStyledTextCtrl_CallTipCancel 3151
-#define wxStyledTextCtrl_CallTipActive 3152
-#define wxStyledTextCtrl_CallTipPosAtStart 3153
-#define wxStyledTextCtrl_CallTipSetHighlight 3154
-#define wxStyledTextCtrl_CallTipSetBackground 3155
-#define wxStyledTextCtrl_CallTipSetForeground 3156
-#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3157
-#define wxStyledTextCtrl_CallTipUseStyle 3158
-#define wxStyledTextCtrl_VisibleFromDocLine 3159
-#define wxStyledTextCtrl_DocLineFromVisible 3160
-#define wxStyledTextCtrl_WrapCount 3161
-#define wxStyledTextCtrl_SetFoldLevel 3162
-#define wxStyledTextCtrl_GetFoldLevel 3163
-#define wxStyledTextCtrl_GetLastChild 3164
-#define wxStyledTextCtrl_GetFoldParent 3165
-#define wxStyledTextCtrl_ShowLines 3166
-#define wxStyledTextCtrl_HideLines 3167
-#define wxStyledTextCtrl_GetLineVisible 3168
-#define wxStyledTextCtrl_SetFoldExpanded 3169
-#define wxStyledTextCtrl_GetFoldExpanded 3170
-#define wxStyledTextCtrl_ToggleFold 3171
-#define wxStyledTextCtrl_EnsureVisible 3172
-#define wxStyledTextCtrl_SetFoldFlags 3173
-#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3174
-#define wxStyledTextCtrl_SetTabIndents 3175
-#define wxStyledTextCtrl_GetTabIndents 3176
-#define wxStyledTextCtrl_SetBackSpaceUnIndents 3177
-#define wxStyledTextCtrl_GetBackSpaceUnIndents 3178
-#define wxStyledTextCtrl_SetMouseDwellTime 3179
-#define wxStyledTextCtrl_GetMouseDwellTime 3180
-#define wxStyledTextCtrl_WordStartPosition 3181
-#define wxStyledTextCtrl_WordEndPosition 3182
-#define wxStyledTextCtrl_SetWrapMode 3183
-#define wxStyledTextCtrl_GetWrapMode 3184
-#define wxStyledTextCtrl_SetWrapVisualFlags 3185
-#define wxStyledTextCtrl_GetWrapVisualFlags 3186
-#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3187
-#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3188
-#define wxStyledTextCtrl_SetWrapStartIndent 3189
-#define wxStyledTextCtrl_GetWrapStartIndent 3190
-#define wxStyledTextCtrl_SetLayoutCache 3191
-#define wxStyledTextCtrl_GetLayoutCache 3192
-#define wxStyledTextCtrl_SetScrollWidth 3193
-#define wxStyledTextCtrl_GetScrollWidth 3194
-#define wxStyledTextCtrl_TextWidth 3195
-#define wxStyledTextCtrl_GetEndAtLastLine 3196
-#define wxStyledTextCtrl_TextHeight 3197
-#define wxStyledTextCtrl_SetUseVerticalScrollBar 3198
-#define wxStyledTextCtrl_GetUseVerticalScrollBar 3199
-#define wxStyledTextCtrl_AppendText 3200
-#define wxStyledTextCtrl_GetTwoPhaseDraw 3201
-#define wxStyledTextCtrl_SetTwoPhaseDraw 3202
-#define wxStyledTextCtrl_TargetFromSelection 3203
-#define wxStyledTextCtrl_LinesJoin 3204
-#define wxStyledTextCtrl_LinesSplit 3205
-#define wxStyledTextCtrl_SetFoldMarginColour 3206
-#define wxStyledTextCtrl_SetFoldMarginHiColour 3207
-#define wxStyledTextCtrl_LineDown 3208
-#define wxStyledTextCtrl_LineDownExtend 3209
-#define wxStyledTextCtrl_LineUp 3210
-#define wxStyledTextCtrl_LineUpExtend 3211
-#define wxStyledTextCtrl_CharLeft 3212
-#define wxStyledTextCtrl_CharLeftExtend 3213
-#define wxStyledTextCtrl_CharRight 3214
-#define wxStyledTextCtrl_CharRightExtend 3215
-#define wxStyledTextCtrl_WordLeft 3216
-#define wxStyledTextCtrl_WordLeftExtend 3217
-#define wxStyledTextCtrl_WordRight 3218
-#define wxStyledTextCtrl_WordRightExtend 3219
-#define wxStyledTextCtrl_Home 3220
-#define wxStyledTextCtrl_HomeExtend 3221
-#define wxStyledTextCtrl_LineEnd 3222
-#define wxStyledTextCtrl_LineEndExtend 3223
-#define wxStyledTextCtrl_DocumentStart 3224
-#define wxStyledTextCtrl_DocumentStartExtend 3225
-#define wxStyledTextCtrl_DocumentEnd 3226
-#define wxStyledTextCtrl_DocumentEndExtend 3227
-#define wxStyledTextCtrl_PageUp 3228
-#define wxStyledTextCtrl_PageUpExtend 3229
-#define wxStyledTextCtrl_PageDown 3230
-#define wxStyledTextCtrl_PageDownExtend 3231
-#define wxStyledTextCtrl_EditToggleOvertype 3232
-#define wxStyledTextCtrl_Cancel 3233
-#define wxStyledTextCtrl_DeleteBack 3234
-#define wxStyledTextCtrl_Tab 3235
-#define wxStyledTextCtrl_BackTab 3236
-#define wxStyledTextCtrl_NewLine 3237
-#define wxStyledTextCtrl_FormFeed 3238
-#define wxStyledTextCtrl_VCHome 3239
-#define wxStyledTextCtrl_VCHomeExtend 3240
-#define wxStyledTextCtrl_ZoomIn 3241
-#define wxStyledTextCtrl_ZoomOut 3242
-#define wxStyledTextCtrl_DelWordLeft 3243
-#define wxStyledTextCtrl_DelWordRight 3244
-#define wxStyledTextCtrl_LineCut 3245
-#define wxStyledTextCtrl_LineDelete 3246
-#define wxStyledTextCtrl_LineTranspose 3247
-#define wxStyledTextCtrl_LineDuplicate 3248
-#define wxStyledTextCtrl_LowerCase 3249
-#define wxStyledTextCtrl_UpperCase 3250
-#define wxStyledTextCtrl_LineScrollDown 3251
-#define wxStyledTextCtrl_LineScrollUp 3252
-#define wxStyledTextCtrl_DeleteBackNotLine 3253
-#define wxStyledTextCtrl_HomeDisplay 3254
-#define wxStyledTextCtrl_HomeDisplayExtend 3255
-#define wxStyledTextCtrl_LineEndDisplay 3256
-#define wxStyledTextCtrl_LineEndDisplayExtend 3257
-#define wxStyledTextCtrl_HomeWrapExtend 3258
-#define wxStyledTextCtrl_LineEndWrap 3259
-#define wxStyledTextCtrl_LineEndWrapExtend 3260
-#define wxStyledTextCtrl_VCHomeWrap 3261
-#define wxStyledTextCtrl_VCHomeWrapExtend 3262
-#define wxStyledTextCtrl_LineCopy 3263
-#define wxStyledTextCtrl_MoveCaretInsideView 3264
-#define wxStyledTextCtrl_LineLength 3265
-#define wxStyledTextCtrl_BraceHighlight 3266
-#define wxStyledTextCtrl_BraceBadLight 3267
-#define wxStyledTextCtrl_BraceMatch 3268
-#define wxStyledTextCtrl_GetViewEOL 3269
-#define wxStyledTextCtrl_SetViewEOL 3270
-#define wxStyledTextCtrl_SetModEventMask 3271
-#define wxStyledTextCtrl_GetEdgeColumn 3272
-#define wxStyledTextCtrl_SetEdgeColumn 3273
-#define wxStyledTextCtrl_SetEdgeMode 3274
-#define wxStyledTextCtrl_GetEdgeMode 3275
-#define wxStyledTextCtrl_GetEdgeColour 3276
-#define wxStyledTextCtrl_SetEdgeColour 3277
-#define wxStyledTextCtrl_SearchAnchor 3278
-#define wxStyledTextCtrl_SearchNext 3279
-#define wxStyledTextCtrl_SearchPrev 3280
-#define wxStyledTextCtrl_LinesOnScreen 3281
-#define wxStyledTextCtrl_UsePopUp 3282
-#define wxStyledTextCtrl_SelectionIsRectangle 3283
-#define wxStyledTextCtrl_SetZoom 3284
-#define wxStyledTextCtrl_GetZoom 3285
-#define wxStyledTextCtrl_GetModEventMask 3286
-#define wxStyledTextCtrl_SetSTCFocus 3287
-#define wxStyledTextCtrl_GetSTCFocus 3288
-#define wxStyledTextCtrl_SetStatus 3289
-#define wxStyledTextCtrl_GetStatus 3290
-#define wxStyledTextCtrl_SetMouseDownCaptures 3291
-#define wxStyledTextCtrl_GetMouseDownCaptures 3292
-#define wxStyledTextCtrl_SetSTCCursor 3293
-#define wxStyledTextCtrl_GetSTCCursor 3294
-#define wxStyledTextCtrl_SetControlCharSymbol 3295
-#define wxStyledTextCtrl_GetControlCharSymbol 3296
-#define wxStyledTextCtrl_WordPartLeft 3297
-#define wxStyledTextCtrl_WordPartLeftExtend 3298
-#define wxStyledTextCtrl_WordPartRight 3299
-#define wxStyledTextCtrl_WordPartRightExtend 3300
-#define wxStyledTextCtrl_SetVisiblePolicy 3301
-#define wxStyledTextCtrl_DelLineLeft 3302
-#define wxStyledTextCtrl_DelLineRight 3303
-#define wxStyledTextCtrl_GetXOffset 3304
-#define wxStyledTextCtrl_ChooseCaretX 3305
-#define wxStyledTextCtrl_SetXCaretPolicy 3306
-#define wxStyledTextCtrl_SetYCaretPolicy 3307
-#define wxStyledTextCtrl_GetPrintWrapMode 3308
-#define wxStyledTextCtrl_SetHotspotActiveForeground 3309
-#define wxStyledTextCtrl_SetHotspotActiveBackground 3310
-#define wxStyledTextCtrl_SetHotspotActiveUnderline 3311
-#define wxStyledTextCtrl_SetHotspotSingleLine 3312
-#define wxStyledTextCtrl_ParaDownExtend 3313
-#define wxStyledTextCtrl_ParaUp 3314
-#define wxStyledTextCtrl_ParaUpExtend 3315
-#define wxStyledTextCtrl_PositionBefore 3316
-#define wxStyledTextCtrl_PositionAfter 3317
-#define wxStyledTextCtrl_CopyRange 3318
-#define wxStyledTextCtrl_CopyText 3319
-#define wxStyledTextCtrl_SetSelectionMode 3320
-#define wxStyledTextCtrl_GetSelectionMode 3321
-#define wxStyledTextCtrl_LineDownRectExtend 3322
-#define wxStyledTextCtrl_LineUpRectExtend 3323
-#define wxStyledTextCtrl_CharLeftRectExtend 3324
-#define wxStyledTextCtrl_CharRightRectExtend 3325
-#define wxStyledTextCtrl_HomeRectExtend 3326
-#define wxStyledTextCtrl_VCHomeRectExtend 3327
-#define wxStyledTextCtrl_LineEndRectExtend 3328
-#define wxStyledTextCtrl_PageUpRectExtend 3329
-#define wxStyledTextCtrl_PageDownRectExtend 3330
-#define wxStyledTextCtrl_StutteredPageUp 3331
-#define wxStyledTextCtrl_StutteredPageUpExtend 3332
-#define wxStyledTextCtrl_StutteredPageDown 3333
-#define wxStyledTextCtrl_StutteredPageDownExtend 3334
-#define wxStyledTextCtrl_WordLeftEnd 3335
-#define wxStyledTextCtrl_WordLeftEndExtend 3336
-#define wxStyledTextCtrl_WordRightEnd 3337
-#define wxStyledTextCtrl_WordRightEndExtend 3338
-#define wxStyledTextCtrl_SetWhitespaceChars 3339
-#define wxStyledTextCtrl_SetCharsDefault 3340
-#define wxStyledTextCtrl_AutoCompGetCurrent 3341
-#define wxStyledTextCtrl_Allocate 3342
-#define wxStyledTextCtrl_FindColumn 3343
-#define wxStyledTextCtrl_GetCaretSticky 3344
-#define wxStyledTextCtrl_SetCaretSticky 3345
-#define wxStyledTextCtrl_ToggleCaretSticky 3346
-#define wxStyledTextCtrl_SetPasteConvertEndings 3347
-#define wxStyledTextCtrl_GetPasteConvertEndings 3348
-#define wxStyledTextCtrl_SelectionDuplicate 3349
-#define wxStyledTextCtrl_SetCaretLineBackAlpha 3350
-#define wxStyledTextCtrl_GetCaretLineBackAlpha 3351
-#define wxStyledTextCtrl_StartRecord 3352
-#define wxStyledTextCtrl_StopRecord 3353
-#define wxStyledTextCtrl_SetLexer 3354
-#define wxStyledTextCtrl_GetLexer 3355
-#define wxStyledTextCtrl_Colourise 3356
-#define wxStyledTextCtrl_SetProperty 3357
-#define wxStyledTextCtrl_SetKeyWords 3358
-#define wxStyledTextCtrl_SetLexerLanguage 3359
-#define wxStyledTextCtrl_GetProperty 3360
-#define wxStyledTextCtrl_GetStyleBitsNeeded 3361
-#define wxStyledTextCtrl_GetCurrentLine 3362
-#define wxStyledTextCtrl_StyleSetSpec 3363
-#define wxStyledTextCtrl_StyleSetFont 3364
-#define wxStyledTextCtrl_StyleSetFontAttr 3365
-#define wxStyledTextCtrl_StyleSetCharacterSet 3366
-#define wxStyledTextCtrl_StyleSetFontEncoding 3367
-#define wxStyledTextCtrl_CmdKeyExecute 3368
-#define wxStyledTextCtrl_SetMargins 3369
-#define wxStyledTextCtrl_GetSelection 3370
-#define wxStyledTextCtrl_PointFromPosition 3371
-#define wxStyledTextCtrl_ScrollToLine 3372
-#define wxStyledTextCtrl_ScrollToColumn 3373
-#define wxStyledTextCtrl_SetVScrollBar 3374
-#define wxStyledTextCtrl_SetHScrollBar 3375
-#define wxStyledTextCtrl_GetLastKeydownProcessed 3376
-#define wxStyledTextCtrl_SetLastKeydownProcessed 3377
-#define wxStyledTextCtrl_SaveFile 3378
-#define wxStyledTextCtrl_LoadFile 3379
-#define wxStyledTextCtrl_DoDragOver 3380
-#define wxStyledTextCtrl_DoDropText 3381
-#define wxStyledTextCtrl_GetUseAntiAliasing 3382
-#define wxStyledTextCtrl_AddTextRaw 3383
-#define wxStyledTextCtrl_InsertTextRaw 3384
-#define wxStyledTextCtrl_GetCurLineRaw 3385
-#define wxStyledTextCtrl_GetLineRaw 3386
-#define wxStyledTextCtrl_GetSelectedTextRaw 3387
-#define wxStyledTextCtrl_GetTextRangeRaw 3388
-#define wxStyledTextCtrl_SetTextRaw 3389
-#define wxStyledTextCtrl_GetTextRaw 3390
-#define wxStyledTextCtrl_AppendTextRaw 3391
-#define wxArtProvider_GetBitmap 3392
-#define wxArtProvider_GetIcon 3393
-#define wxTreeEvent_GetKeyCode 3394
-#define wxTreeEvent_GetItem 3395
-#define wxTreeEvent_GetKeyEvent 3396
-#define wxTreeEvent_GetLabel 3397
-#define wxTreeEvent_GetOldItem 3398
-#define wxTreeEvent_GetPoint 3399
-#define wxTreeEvent_IsEditCancelled 3400
-#define wxTreeEvent_SetToolTip 3401
-#define wxNotebookEvent_GetOldSelection 3402
-#define wxNotebookEvent_GetSelection 3403
-#define wxNotebookEvent_SetOldSelection 3404
-#define wxNotebookEvent_SetSelection 3405
-#define wxFileDataObject_new 3406
-#define wxFileDataObject_AddFile 3407
-#define wxFileDataObject_GetFilenames 3408
-#define wxFileDataObject_destroy 3409
-#define wxTextDataObject_new 3410
-#define wxTextDataObject_GetTextLength 3411
-#define wxTextDataObject_GetText 3412
-#define wxTextDataObject_SetText 3413
-#define wxTextDataObject_destroy 3414
-#define wxBitmapDataObject_new_1_1 3415
-#define wxBitmapDataObject_new_1_0 3416
-#define wxBitmapDataObject_GetBitmap 3417
-#define wxBitmapDataObject_SetBitmap 3418
-#define wxBitmapDataObject_destroy 3419
-#define wxClipboard_new 3421
-#define wxClipboard_destruct 3422
-#define wxClipboard_AddData 3423
-#define wxClipboard_Clear 3424
-#define wxClipboard_Close 3425
-#define wxClipboard_Flush 3426
-#define wxClipboard_GetData 3427
-#define wxClipboard_IsOpened 3428
-#define wxClipboard_Open 3429
-#define wxClipboard_SetData 3430
-#define wxClipboard_UsePrimarySelection 3432
-#define wxClipboard_IsSupported 3433
-#define wxClipboard_Get 3434
-#define wxSpinEvent_GetPosition 3435
-#define wxSpinEvent_SetPosition 3436
-#define wxSplitterWindow_new_0 3437
-#define wxSplitterWindow_new_2 3438
-#define wxSplitterWindow_destruct 3439
-#define wxSplitterWindow_Create 3440
-#define wxSplitterWindow_GetMinimumPaneSize 3441
-#define wxSplitterWindow_GetSashGravity 3442
-#define wxSplitterWindow_GetSashPosition 3443
-#define wxSplitterWindow_GetSplitMode 3444
-#define wxSplitterWindow_GetWindow1 3445
-#define wxSplitterWindow_GetWindow2 3446
-#define wxSplitterWindow_Initialize 3447
-#define wxSplitterWindow_IsSplit 3448
-#define wxSplitterWindow_ReplaceWindow 3449
-#define wxSplitterWindow_SetSashGravity 3450
-#define wxSplitterWindow_SetSashPosition 3451
-#define wxSplitterWindow_SetSashSize 3452
-#define wxSplitterWindow_SetMinimumPaneSize 3453
-#define wxSplitterWindow_SetSplitMode 3454
-#define wxSplitterWindow_SplitHorizontally 3455
-#define wxSplitterWindow_SplitVertically 3456
-#define wxSplitterWindow_Unsplit 3457
-#define wxSplitterWindow_UpdateSize 3458
-#define wxSplitterEvent_GetSashPosition 3459
-#define wxSplitterEvent_GetX 3460
-#define wxSplitterEvent_GetY 3461
-#define wxSplitterEvent_GetWindowBeingRemoved 3462
-#define wxSplitterEvent_SetSashPosition 3463
-#define wxHtmlWindow_new_0 3464
-#define wxHtmlWindow_new_2 3465
-#define wxHtmlWindow_AppendToPage 3466
-#define wxHtmlWindow_GetOpenedAnchor 3467
-#define wxHtmlWindow_GetOpenedPage 3468
-#define wxHtmlWindow_GetOpenedPageTitle 3469
-#define wxHtmlWindow_GetRelatedFrame 3470
-#define wxHtmlWindow_HistoryBack 3471
-#define wxHtmlWindow_HistoryCanBack 3472
-#define wxHtmlWindow_HistoryCanForward 3473
-#define wxHtmlWindow_HistoryClear 3474
-#define wxHtmlWindow_HistoryForward 3475
-#define wxHtmlWindow_LoadFile 3476
-#define wxHtmlWindow_LoadPage 3477
-#define wxHtmlWindow_SelectAll 3478
-#define wxHtmlWindow_SelectionToText 3479
-#define wxHtmlWindow_SelectLine 3480
-#define wxHtmlWindow_SelectWord 3481
-#define wxHtmlWindow_SetBorders 3482
-#define wxHtmlWindow_SetFonts 3483
-#define wxHtmlWindow_SetPage 3484
-#define wxHtmlWindow_SetRelatedFrame 3485
-#define wxHtmlWindow_SetRelatedStatusBar 3486
-#define wxHtmlWindow_ToText 3487
-#define wxHtmlWindow_destroy 3488
-#define wxHtmlLinkEvent_GetLinkInfo 3489
-#define wxSystemSettings_GetColour 3490
-#define wxSystemSettings_GetFont 3491
-#define wxSystemSettings_GetMetric 3492
-#define wxSystemSettings_GetScreenType 3493
-#define wxSystemOptions_GetOption 3494
-#define wxSystemOptions_GetOptionInt 3495
-#define wxSystemOptions_HasOption 3496
-#define wxSystemOptions_IsFalse 3497
-#define wxSystemOptions_SetOption_2_1 3498
-#define wxSystemOptions_SetOption_2_0 3499
-#define wxAuiNotebookEvent_SetSelection 3500
-#define wxAuiNotebookEvent_GetSelection 3501
-#define wxAuiNotebookEvent_SetOldSelection 3502
-#define wxAuiNotebookEvent_GetOldSelection 3503
-#define wxAuiNotebookEvent_SetDragSource 3504
-#define wxAuiNotebookEvent_GetDragSource 3505
-#define wxAuiManagerEvent_SetManager 3506
-#define wxAuiManagerEvent_GetManager 3507
-#define wxAuiManagerEvent_SetPane 3508
-#define wxAuiManagerEvent_GetPane 3509
-#define wxAuiManagerEvent_SetButton 3510
-#define wxAuiManagerEvent_GetButton 3511
-#define wxAuiManagerEvent_SetDC 3512
-#define wxAuiManagerEvent_GetDC 3513
-#define wxAuiManagerEvent_Veto 3514
-#define wxAuiManagerEvent_GetVeto 3515
-#define wxAuiManagerEvent_SetCanVeto 3516
-#define wxAuiManagerEvent_CanVeto 3517
-#define wxLogNull_new 3518
-#define wxLogNull_destroy 3519
-#define wxTaskBarIcon_new 3520
-#define wxTaskBarIcon_destruct 3521
-#define wxTaskBarIcon_PopupMenu 3522
-#define wxTaskBarIcon_RemoveIcon 3523
-#define wxTaskBarIcon_SetIcon 3524
+#define wxTextCtrl_ChangeValue 1827
+#define wxTextCtrl_EmulateKeyPress 1828
+#define wxTextCtrl_GetDefaultStyle 1829
+#define wxTextCtrl_GetInsertionPoint 1830
+#define wxTextCtrl_GetLastPosition 1831
+#define wxTextCtrl_GetLineLength 1832
+#define wxTextCtrl_GetLineText 1833
+#define wxTextCtrl_GetNumberOfLines 1834
+#define wxTextCtrl_GetRange 1835
+#define wxTextCtrl_GetSelection 1836
+#define wxTextCtrl_GetStringSelection 1837
+#define wxTextCtrl_GetStyle 1838
+#define wxTextCtrl_GetValue 1839
+#define wxTextCtrl_IsEditable 1840
+#define wxTextCtrl_IsModified 1841
+#define wxTextCtrl_IsMultiLine 1842
+#define wxTextCtrl_IsSingleLine 1843
+#define wxTextCtrl_LoadFile 1844
+#define wxTextCtrl_MarkDirty 1845
+#define wxTextCtrl_Paste 1846
+#define wxTextCtrl_PositionToXY 1847
+#define wxTextCtrl_Redo 1848
+#define wxTextCtrl_Remove 1849
+#define wxTextCtrl_Replace 1850
+#define wxTextCtrl_SaveFile 1851
+#define wxTextCtrl_SetDefaultStyle 1852
+#define wxTextCtrl_SetEditable 1853
+#define wxTextCtrl_SetInsertionPoint 1854
+#define wxTextCtrl_SetInsertionPointEnd 1855
+#define wxTextCtrl_SetMaxLength 1857
+#define wxTextCtrl_SetSelection 1858
+#define wxTextCtrl_SetStyle 1859
+#define wxTextCtrl_SetValue 1860
+#define wxTextCtrl_ShowPosition 1861
+#define wxTextCtrl_Undo 1862
+#define wxTextCtrl_WriteText 1863
+#define wxTextCtrl_XYToPosition 1864
+#define wxNotebook_new_0 1867
+#define wxNotebook_new_3 1868
+#define wxNotebook_destruct 1869
+#define wxNotebook_AddPage 1870
+#define wxNotebook_AdvanceSelection 1871
+#define wxNotebook_AssignImageList 1872
+#define wxNotebook_Create 1873
+#define wxNotebook_DeleteAllPages 1874
+#define wxNotebook_DeletePage 1875
+#define wxNotebook_RemovePage 1876
+#define wxNotebook_GetCurrentPage 1877
+#define wxNotebook_GetImageList 1878
+#define wxNotebook_GetPage 1880
+#define wxNotebook_GetPageCount 1881
+#define wxNotebook_GetPageImage 1882
+#define wxNotebook_GetPageText 1883
+#define wxNotebook_GetRowCount 1884
+#define wxNotebook_GetSelection 1885
+#define wxNotebook_GetThemeBackgroundColour 1886
+#define wxNotebook_HitTest 1888
+#define wxNotebook_InsertPage 1890
+#define wxNotebook_SetImageList 1891
+#define wxNotebook_SetPadding 1892
+#define wxNotebook_SetPageSize 1893
+#define wxNotebook_SetPageImage 1894
+#define wxNotebook_SetPageText 1895
+#define wxNotebook_SetSelection 1896
+#define wxNotebook_ChangeSelection 1897
+#define wxChoicebook_new_0 1898
+#define wxChoicebook_new_3 1899
+#define wxChoicebook_AddPage 1900
+#define wxChoicebook_AdvanceSelection 1901
+#define wxChoicebook_AssignImageList 1902
+#define wxChoicebook_Create 1903
+#define wxChoicebook_DeleteAllPages 1904
+#define wxChoicebook_DeletePage 1905
+#define wxChoicebook_RemovePage 1906
+#define wxChoicebook_GetCurrentPage 1907
+#define wxChoicebook_GetImageList 1908
+#define wxChoicebook_GetPage 1910
+#define wxChoicebook_GetPageCount 1911
+#define wxChoicebook_GetPageImage 1912
+#define wxChoicebook_GetPageText 1913
+#define wxChoicebook_GetSelection 1914
+#define wxChoicebook_HitTest 1915
+#define wxChoicebook_InsertPage 1916
+#define wxChoicebook_SetImageList 1917
+#define wxChoicebook_SetPageSize 1918
+#define wxChoicebook_SetPageImage 1919
+#define wxChoicebook_SetPageText 1920
+#define wxChoicebook_SetSelection 1921
+#define wxChoicebook_ChangeSelection 1922
+#define wxChoicebook_destroy 1923
+#define wxToolbook_new_0 1924
+#define wxToolbook_new_3 1925
+#define wxToolbook_AddPage 1926
+#define wxToolbook_AdvanceSelection 1927
+#define wxToolbook_AssignImageList 1928
+#define wxToolbook_Create 1929
+#define wxToolbook_DeleteAllPages 1930
+#define wxToolbook_DeletePage 1931
+#define wxToolbook_RemovePage 1932
+#define wxToolbook_GetCurrentPage 1933
+#define wxToolbook_GetImageList 1934
+#define wxToolbook_GetPage 1936
+#define wxToolbook_GetPageCount 1937
+#define wxToolbook_GetPageImage 1938
+#define wxToolbook_GetPageText 1939
+#define wxToolbook_GetSelection 1940
+#define wxToolbook_HitTest 1942
+#define wxToolbook_InsertPage 1943
+#define wxToolbook_SetImageList 1944
+#define wxToolbook_SetPageSize 1945
+#define wxToolbook_SetPageImage 1946
+#define wxToolbook_SetPageText 1947
+#define wxToolbook_SetSelection 1948
+#define wxToolbook_ChangeSelection 1949
+#define wxToolbook_destroy 1950
+#define wxListbook_new_0 1951
+#define wxListbook_new_3 1952
+#define wxListbook_AddPage 1953
+#define wxListbook_AdvanceSelection 1954
+#define wxListbook_AssignImageList 1955
+#define wxListbook_Create 1956
+#define wxListbook_DeleteAllPages 1957
+#define wxListbook_DeletePage 1958
+#define wxListbook_RemovePage 1959
+#define wxListbook_GetCurrentPage 1960
+#define wxListbook_GetImageList 1961
+#define wxListbook_GetPage 1963
+#define wxListbook_GetPageCount 1964
+#define wxListbook_GetPageImage 1965
+#define wxListbook_GetPageText 1966
+#define wxListbook_GetSelection 1967
+#define wxListbook_HitTest 1969
+#define wxListbook_InsertPage 1970
+#define wxListbook_SetImageList 1971
+#define wxListbook_SetPageSize 1972
+#define wxListbook_SetPageImage 1973
+#define wxListbook_SetPageText 1974
+#define wxListbook_SetSelection 1975
+#define wxListbook_ChangeSelection 1976
+#define wxListbook_destroy 1977
+#define wxTreebook_new_0 1978
+#define wxTreebook_new_3 1979
+#define wxTreebook_AddPage 1980
+#define wxTreebook_AdvanceSelection 1981
+#define wxTreebook_AssignImageList 1982
+#define wxTreebook_Create 1983
+#define wxTreebook_DeleteAllPages 1984
+#define wxTreebook_DeletePage 1985
+#define wxTreebook_RemovePage 1986
+#define wxTreebook_GetCurrentPage 1987
+#define wxTreebook_GetImageList 1988
+#define wxTreebook_GetPage 1990
+#define wxTreebook_GetPageCount 1991
+#define wxTreebook_GetPageImage 1992
+#define wxTreebook_GetPageText 1993
+#define wxTreebook_GetSelection 1994
+#define wxTreebook_ExpandNode 1995
+#define wxTreebook_IsNodeExpanded 1996
+#define wxTreebook_HitTest 1998
+#define wxTreebook_InsertPage 1999
+#define wxTreebook_InsertSubPage 2000
+#define wxTreebook_SetImageList 2001
+#define wxTreebook_SetPageSize 2002
+#define wxTreebook_SetPageImage 2003
+#define wxTreebook_SetPageText 2004
+#define wxTreebook_SetSelection 2005
+#define wxTreebook_ChangeSelection 2006
+#define wxTreebook_destroy 2007
+#define wxTreeCtrl_new_2 2010
+#define wxTreeCtrl_new_0 2011
+#define wxTreeCtrl_destruct 2013
+#define wxTreeCtrl_AddRoot 2014
+#define wxTreeCtrl_AppendItem 2015
+#define wxTreeCtrl_AssignImageList 2016
+#define wxTreeCtrl_AssignStateImageList 2017
+#define wxTreeCtrl_Collapse 2018
+#define wxTreeCtrl_CollapseAndReset 2019
+#define wxTreeCtrl_Create 2020
+#define wxTreeCtrl_Delete 2021
+#define wxTreeCtrl_DeleteAllItems 2022
+#define wxTreeCtrl_DeleteChildren 2023
+#define wxTreeCtrl_EditLabel 2024
+#define wxTreeCtrl_EnsureVisible 2025
+#define wxTreeCtrl_Expand 2026
+#define wxTreeCtrl_GetBoundingRect 2027
+#define wxTreeCtrl_GetChildrenCount 2029
+#define wxTreeCtrl_GetCount 2030
+#define wxTreeCtrl_GetEditControl 2031
+#define wxTreeCtrl_GetFirstChild 2032
+#define wxTreeCtrl_GetNextChild 2033
+#define wxTreeCtrl_GetFirstVisibleItem 2034
+#define wxTreeCtrl_GetImageList 2035
+#define wxTreeCtrl_GetIndent 2036
+#define wxTreeCtrl_GetItemBackgroundColour 2037
+#define wxTreeCtrl_GetItemData 2038
+#define wxTreeCtrl_GetItemFont 2039
+#define wxTreeCtrl_GetItemImage_1 2040
+#define wxTreeCtrl_GetItemImage_2 2041
+#define wxTreeCtrl_GetItemText 2042
+#define wxTreeCtrl_GetItemTextColour 2043
+#define wxTreeCtrl_GetLastChild 2044
+#define wxTreeCtrl_GetNextSibling 2045
+#define wxTreeCtrl_GetNextVisible 2046
+#define wxTreeCtrl_GetItemParent 2047
+#define wxTreeCtrl_GetPrevSibling 2048
+#define wxTreeCtrl_GetPrevVisible 2049
+#define wxTreeCtrl_GetRootItem 2050
+#define wxTreeCtrl_GetSelection 2051
+#define wxTreeCtrl_GetSelections 2052
+#define wxTreeCtrl_GetStateImageList 2053
+#define wxTreeCtrl_HitTest 2054
+#define wxTreeCtrl_InsertItem 2056
+#define wxTreeCtrl_IsBold 2057
+#define wxTreeCtrl_IsExpanded 2058
+#define wxTreeCtrl_IsSelected 2059
+#define wxTreeCtrl_IsVisible 2060
+#define wxTreeCtrl_ItemHasChildren 2061
+#define wxTreeCtrl_IsTreeItemIdOk 2062
+#define wxTreeCtrl_PrependItem 2063
+#define wxTreeCtrl_ScrollTo 2064
+#define wxTreeCtrl_SelectItem_1 2065
+#define wxTreeCtrl_SelectItem_2 2066
+#define wxTreeCtrl_SetIndent 2067
+#define wxTreeCtrl_SetImageList 2068
+#define wxTreeCtrl_SetItemBackgroundColour 2069
+#define wxTreeCtrl_SetItemBold 2070
+#define wxTreeCtrl_SetItemData 2071
+#define wxTreeCtrl_SetItemDropHighlight 2072
+#define wxTreeCtrl_SetItemFont 2073
+#define wxTreeCtrl_SetItemHasChildren 2074
+#define wxTreeCtrl_SetItemImage_2 2075
+#define wxTreeCtrl_SetItemImage_3 2076
+#define wxTreeCtrl_SetItemText 2077
+#define wxTreeCtrl_SetItemTextColour 2078
+#define wxTreeCtrl_SetStateImageList 2079
+#define wxTreeCtrl_SetWindowStyle 2080
+#define wxTreeCtrl_SortChildren 2081
+#define wxTreeCtrl_Toggle 2082
+#define wxTreeCtrl_ToggleItemSelection 2083
+#define wxTreeCtrl_Unselect 2084
+#define wxTreeCtrl_UnselectAll 2085
+#define wxTreeCtrl_UnselectItem 2086
+#define wxScrollBar_new_0 2087
+#define wxScrollBar_new_3 2088
+#define wxScrollBar_destruct 2089
+#define wxScrollBar_Create 2090
+#define wxScrollBar_GetRange 2091
+#define wxScrollBar_GetPageSize 2092
+#define wxScrollBar_GetThumbPosition 2093
+#define wxScrollBar_GetThumbSize 2094
+#define wxScrollBar_SetThumbPosition 2095
+#define wxScrollBar_SetScrollbar 2096
+#define wxSpinButton_new_2 2098
+#define wxSpinButton_new_0 2099
+#define wxSpinButton_Create 2100
+#define wxSpinButton_GetMax 2101
+#define wxSpinButton_GetMin 2102
+#define wxSpinButton_GetValue 2103
+#define wxSpinButton_SetRange 2104
+#define wxSpinButton_SetValue 2105
+#define wxSpinButton_destroy 2106
+#define wxSpinCtrl_new_0 2107
+#define wxSpinCtrl_new_2 2108
+#define wxSpinCtrl_Create 2110
+#define wxSpinCtrl_SetValue_1_1 2113
+#define wxSpinCtrl_SetValue_1_0 2114
+#define wxSpinCtrl_GetValue 2116
+#define wxSpinCtrl_SetRange 2118
+#define wxSpinCtrl_SetSelection 2119
+#define wxSpinCtrl_GetMin 2121
+#define wxSpinCtrl_GetMax 2123
+#define wxSpinCtrl_destroy 2124
+#define wxStaticText_new_0 2125
+#define wxStaticText_new_4 2126
+#define wxStaticText_Create 2127
+#define wxStaticText_GetLabel 2128
+#define wxStaticText_SetLabel 2129
+#define wxStaticText_Wrap 2130
+#define wxStaticText_destroy 2131
+#define wxStaticBitmap_new_0 2132
+#define wxStaticBitmap_new_4 2133
+#define wxStaticBitmap_Create 2134
+#define wxStaticBitmap_GetBitmap 2135
+#define wxStaticBitmap_SetBitmap 2136
+#define wxStaticBitmap_destroy 2137
+#define wxRadioBox_new 2138
+#define wxRadioBox_destruct 2140
+#define wxRadioBox_Create 2141
+#define wxRadioBox_Enable_2 2142
+#define wxRadioBox_Enable_1 2143
+#define wxRadioBox_GetSelection 2144
+#define wxRadioBox_GetString 2145
+#define wxRadioBox_SetSelection 2146
+#define wxRadioBox_Show_2 2147
+#define wxRadioBox_Show_1 2148
+#define wxRadioBox_GetColumnCount 2149
+#define wxRadioBox_GetItemHelpText 2150
+#define wxRadioBox_GetItemToolTip 2151
+#define wxRadioBox_GetItemFromPoint 2153
+#define wxRadioBox_GetRowCount 2154
+#define wxRadioBox_IsItemEnabled 2155
+#define wxRadioBox_IsItemShown 2156
+#define wxRadioBox_SetItemHelpText 2157
+#define wxRadioBox_SetItemToolTip 2158
+#define wxRadioButton_new_0 2159
+#define wxRadioButton_new_4 2160
+#define wxRadioButton_Create 2161
+#define wxRadioButton_GetValue 2162
+#define wxRadioButton_SetValue 2163
+#define wxRadioButton_destroy 2164
+#define wxSlider_new_6 2166
+#define wxSlider_new_0 2167
+#define wxSlider_Create 2168
+#define wxSlider_GetLineSize 2169
+#define wxSlider_GetMax 2170
+#define wxSlider_GetMin 2171
+#define wxSlider_GetPageSize 2172
+#define wxSlider_GetThumbLength 2173
+#define wxSlider_GetValue 2174
+#define wxSlider_SetLineSize 2175
+#define wxSlider_SetPageSize 2176
+#define wxSlider_SetRange 2177
+#define wxSlider_SetThumbLength 2178
+#define wxSlider_SetValue 2179
+#define wxSlider_destroy 2180
+#define wxDialog_new_4 2182
+#define wxDialog_new_0 2183
+#define wxDialog_destruct 2185
+#define wxDialog_Create 2186
+#define wxDialog_CreateButtonSizer 2187
+#define wxDialog_CreateStdDialogButtonSizer 2188
+#define wxDialog_EndModal 2189
+#define wxDialog_GetAffirmativeId 2190
+#define wxDialog_GetReturnCode 2191
+#define wxDialog_IsModal 2192
+#define wxDialog_SetAffirmativeId 2193
+#define wxDialog_SetReturnCode 2194
+#define wxDialog_Show 2195
+#define wxDialog_ShowModal 2196
+#define wxColourDialog_new_0 2197
+#define wxColourDialog_new_2 2198
+#define wxColourDialog_destruct 2199
+#define wxColourDialog_Create 2200
+#define wxColourDialog_GetColourData 2201
+#define wxColourData_new_0 2202
+#define wxColourData_new_1 2203
+#define wxColourData_destruct 2204
+#define wxColourData_GetChooseFull 2205
+#define wxColourData_GetColour 2206
+#define wxColourData_GetCustomColour 2208
+#define wxColourData_SetChooseFull 2209
+#define wxColourData_SetColour 2210
+#define wxColourData_SetCustomColour 2211
+#define wxPalette_new_0 2212
+#define wxPalette_new_4 2213
+#define wxPalette_destruct 2215
+#define wxPalette_Create 2216
+#define wxPalette_GetColoursCount 2217
+#define wxPalette_GetPixel 2218
+#define wxPalette_GetRGB 2219
+#define wxPalette_IsOk 2220
+#define wxDirDialog_new 2224
+#define wxDirDialog_destruct 2225
+#define wxDirDialog_GetPath 2226
+#define wxDirDialog_GetMessage 2227
+#define wxDirDialog_SetMessage 2228
+#define wxDirDialog_SetPath 2229
+#define wxFileDialog_new 2233
+#define wxFileDialog_destruct 2234
+#define wxFileDialog_GetDirectory 2235
+#define wxFileDialog_GetFilename 2236
+#define wxFileDialog_GetFilenames 2237
+#define wxFileDialog_GetFilterIndex 2238
+#define wxFileDialog_GetMessage 2239
+#define wxFileDialog_GetPath 2240
+#define wxFileDialog_GetPaths 2241
+#define wxFileDialog_GetWildcard 2242
+#define wxFileDialog_SetDirectory 2243
+#define wxFileDialog_SetFilename 2244
+#define wxFileDialog_SetFilterIndex 2245
+#define wxFileDialog_SetMessage 2246
+#define wxFileDialog_SetPath 2247
+#define wxFileDialog_SetWildcard 2248
+#define wxPickerBase_SetInternalMargin 2249
+#define wxPickerBase_GetInternalMargin 2250
+#define wxPickerBase_SetTextCtrlProportion 2251
+#define wxPickerBase_SetPickerCtrlProportion 2252
+#define wxPickerBase_GetTextCtrlProportion 2253
+#define wxPickerBase_GetPickerCtrlProportion 2254
+#define wxPickerBase_HasTextCtrl 2255
+#define wxPickerBase_GetTextCtrl 2256
+#define wxPickerBase_IsTextCtrlGrowable 2257
+#define wxPickerBase_SetPickerCtrlGrowable 2258
+#define wxPickerBase_SetTextCtrlGrowable 2259
+#define wxPickerBase_IsPickerCtrlGrowable 2260
+#define wxFilePickerCtrl_new_0 2261
+#define wxFilePickerCtrl_new_3 2262
+#define wxFilePickerCtrl_Create 2263
+#define wxFilePickerCtrl_GetPath 2264
+#define wxFilePickerCtrl_SetPath 2265
+#define wxFilePickerCtrl_destroy 2266
+#define wxDirPickerCtrl_new_0 2267
+#define wxDirPickerCtrl_new_3 2268
+#define wxDirPickerCtrl_Create 2269
+#define wxDirPickerCtrl_GetPath 2270
+#define wxDirPickerCtrl_SetPath 2271
+#define wxDirPickerCtrl_destroy 2272
+#define wxColourPickerCtrl_new_0 2273
+#define wxColourPickerCtrl_new_3 2274
+#define wxColourPickerCtrl_Create 2275
+#define wxColourPickerCtrl_GetColour 2276
+#define wxColourPickerCtrl_SetColour_1_1 2277
+#define wxColourPickerCtrl_SetColour_1_0 2278
+#define wxColourPickerCtrl_destroy 2279
+#define wxDatePickerCtrl_new_0 2280
+#define wxDatePickerCtrl_new_3 2281
+#define wxDatePickerCtrl_GetRange 2282
+#define wxDatePickerCtrl_GetValue 2283
+#define wxDatePickerCtrl_SetRange 2284
+#define wxDatePickerCtrl_SetValue 2285
+#define wxDatePickerCtrl_destroy 2286
+#define wxFontPickerCtrl_new_0 2287
+#define wxFontPickerCtrl_new_3 2288
+#define wxFontPickerCtrl_Create 2289
+#define wxFontPickerCtrl_GetSelectedFont 2290
+#define wxFontPickerCtrl_SetSelectedFont 2291
+#define wxFontPickerCtrl_GetMaxPointSize 2292
+#define wxFontPickerCtrl_SetMaxPointSize 2293
+#define wxFontPickerCtrl_destroy 2294
+#define wxFindReplaceDialog_new_0 2297
+#define wxFindReplaceDialog_new_4 2298
+#define wxFindReplaceDialog_destruct 2299
+#define wxFindReplaceDialog_Create 2300
+#define wxFindReplaceDialog_GetData 2301
+#define wxFindReplaceData_new_0 2302
+#define wxFindReplaceData_new_1 2303
+#define wxFindReplaceData_GetFindString 2304
+#define wxFindReplaceData_GetReplaceString 2305
+#define wxFindReplaceData_GetFlags 2306
+#define wxFindReplaceData_SetFlags 2307
+#define wxFindReplaceData_SetFindString 2308
+#define wxFindReplaceData_SetReplaceString 2309
+#define wxFindReplaceData_destroy 2310
+#define wxMultiChoiceDialog_new_0 2311
+#define wxMultiChoiceDialog_new_5 2313
+#define wxMultiChoiceDialog_GetSelections 2314
+#define wxMultiChoiceDialog_SetSelections 2315
+#define wxMultiChoiceDialog_destroy 2316
+#define wxSingleChoiceDialog_new_0 2317
+#define wxSingleChoiceDialog_new_5 2319
+#define wxSingleChoiceDialog_GetSelection 2320
+#define wxSingleChoiceDialog_GetStringSelection 2321
+#define wxSingleChoiceDialog_SetSelection 2322
+#define wxSingleChoiceDialog_destroy 2323
+#define wxTextEntryDialog_new 2324
+#define wxTextEntryDialog_GetValue 2325
+#define wxTextEntryDialog_SetValue 2326
+#define wxTextEntryDialog_destroy 2327
+#define wxPasswordEntryDialog_new 2328
+#define wxPasswordEntryDialog_destroy 2329
+#define wxFontData_new_0 2330
+#define wxFontData_new_1 2331
+#define wxFontData_destruct 2332
+#define wxFontData_EnableEffects 2333
+#define wxFontData_GetAllowSymbols 2334
+#define wxFontData_GetColour 2335
+#define wxFontData_GetChosenFont 2336
+#define wxFontData_GetEnableEffects 2337
+#define wxFontData_GetInitialFont 2338
+#define wxFontData_GetShowHelp 2339
+#define wxFontData_SetAllowSymbols 2340
+#define wxFontData_SetChosenFont 2341
+#define wxFontData_SetColour 2342
+#define wxFontData_SetInitialFont 2343
+#define wxFontData_SetRange 2344
+#define wxFontData_SetShowHelp 2345
+#define wxFontDialog_new_0 2349
+#define wxFontDialog_new_2 2351
+#define wxFontDialog_Create 2353
+#define wxFontDialog_GetFontData 2354
+#define wxFontDialog_destroy 2356
+#define wxProgressDialog_new 2357
+#define wxProgressDialog_destruct 2358
+#define wxProgressDialog_Resume 2359
+#define wxProgressDialog_Update_2 2360
+#define wxProgressDialog_Update_0 2361
+#define wxMessageDialog_new 2362
+#define wxMessageDialog_destruct 2363
+#define wxPageSetupDialog_new 2364
+#define wxPageSetupDialog_destruct 2365
+#define wxPageSetupDialog_GetPageSetupData 2366
+#define wxPageSetupDialog_ShowModal 2367
+#define wxPageSetupDialogData_new_0 2368
+#define wxPageSetupDialogData_new_1_0 2369
+#define wxPageSetupDialogData_new_1_1 2370
+#define wxPageSetupDialogData_destruct 2371
+#define wxPageSetupDialogData_EnableHelp 2372
+#define wxPageSetupDialogData_EnableMargins 2373
+#define wxPageSetupDialogData_EnableOrientation 2374
+#define wxPageSetupDialogData_EnablePaper 2375
+#define wxPageSetupDialogData_EnablePrinter 2376
+#define wxPageSetupDialogData_GetDefaultMinMargins 2377
+#define wxPageSetupDialogData_GetEnableMargins 2378
+#define wxPageSetupDialogData_GetEnableOrientation 2379
+#define wxPageSetupDialogData_GetEnablePaper 2380
+#define wxPageSetupDialogData_GetEnablePrinter 2381
+#define wxPageSetupDialogData_GetEnableHelp 2382
+#define wxPageSetupDialogData_GetDefaultInfo 2383
+#define wxPageSetupDialogData_GetMarginTopLeft 2384
+#define wxPageSetupDialogData_GetMarginBottomRight 2385
+#define wxPageSetupDialogData_GetMinMarginTopLeft 2386
+#define wxPageSetupDialogData_GetMinMarginBottomRight 2387
+#define wxPageSetupDialogData_GetPaperId 2388
+#define wxPageSetupDialogData_GetPaperSize 2389
+#define wxPageSetupDialogData_GetPrintData 2391
+#define wxPageSetupDialogData_IsOk 2392
+#define wxPageSetupDialogData_SetDefaultInfo 2393
+#define wxPageSetupDialogData_SetDefaultMinMargins 2394
+#define wxPageSetupDialogData_SetMarginTopLeft 2395
+#define wxPageSetupDialogData_SetMarginBottomRight 2396
+#define wxPageSetupDialogData_SetMinMarginTopLeft 2397
+#define wxPageSetupDialogData_SetMinMarginBottomRight 2398
+#define wxPageSetupDialogData_SetPaperId 2399
+#define wxPageSetupDialogData_SetPaperSize_1_1 2400
+#define wxPageSetupDialogData_SetPaperSize_1_0 2401
+#define wxPageSetupDialogData_SetPrintData 2402
+#define wxPrintDialog_new_2_0 2403
+#define wxPrintDialog_new_2_1 2404
+#define wxPrintDialog_destruct 2405
+#define wxPrintDialog_GetPrintDialogData 2406
+#define wxPrintDialog_GetPrintDC 2407
+#define wxPrintDialogData_new_0 2408
+#define wxPrintDialogData_new_1_1 2409
+#define wxPrintDialogData_new_1_0 2410
+#define wxPrintDialogData_destruct 2411
+#define wxPrintDialogData_EnableHelp 2412
+#define wxPrintDialogData_EnablePageNumbers 2413
+#define wxPrintDialogData_EnablePrintToFile 2414
+#define wxPrintDialogData_EnableSelection 2415
+#define wxPrintDialogData_GetAllPages 2416
+#define wxPrintDialogData_GetCollate 2417
+#define wxPrintDialogData_GetFromPage 2418
+#define wxPrintDialogData_GetMaxPage 2419
+#define wxPrintDialogData_GetMinPage 2420
+#define wxPrintDialogData_GetNoCopies 2421
+#define wxPrintDialogData_GetPrintData 2422
+#define wxPrintDialogData_GetPrintToFile 2423
+#define wxPrintDialogData_GetSelection 2424
+#define wxPrintDialogData_GetToPage 2425
+#define wxPrintDialogData_IsOk 2426
+#define wxPrintDialogData_SetCollate 2427
+#define wxPrintDialogData_SetFromPage 2428
+#define wxPrintDialogData_SetMaxPage 2429
+#define wxPrintDialogData_SetMinPage 2430
+#define wxPrintDialogData_SetNoCopies 2431
+#define wxPrintDialogData_SetPrintData 2432
+#define wxPrintDialogData_SetPrintToFile 2433
+#define wxPrintDialogData_SetSelection 2434
+#define wxPrintDialogData_SetToPage 2435
+#define wxPrintData_new_0 2436
+#define wxPrintData_new_1 2437
+#define wxPrintData_destruct 2438
+#define wxPrintData_GetCollate 2439
+#define wxPrintData_GetBin 2440
+#define wxPrintData_GetColour 2441
+#define wxPrintData_GetDuplex 2442
+#define wxPrintData_GetNoCopies 2443
+#define wxPrintData_GetOrientation 2444
+#define wxPrintData_GetPaperId 2445
+#define wxPrintData_GetPrinterName 2446
+#define wxPrintData_GetQuality 2447
+#define wxPrintData_IsOk 2448
+#define wxPrintData_SetBin 2449
+#define wxPrintData_SetCollate 2450
+#define wxPrintData_SetColour 2451
+#define wxPrintData_SetDuplex 2452
+#define wxPrintData_SetNoCopies 2453
+#define wxPrintData_SetOrientation 2454
+#define wxPrintData_SetPaperId 2455
+#define wxPrintData_SetPrinterName 2456
+#define wxPrintData_SetQuality 2457
+#define wxPrintPreview_new_2 2460
+#define wxPrintPreview_new_3 2461
+#define wxPrintPreview_destruct 2463
+#define wxPrintPreview_GetCanvas 2464
+#define wxPrintPreview_GetCurrentPage 2465
+#define wxPrintPreview_GetFrame 2466
+#define wxPrintPreview_GetMaxPage 2467
+#define wxPrintPreview_GetMinPage 2468
+#define wxPrintPreview_GetPrintout 2469
+#define wxPrintPreview_GetPrintoutForPrinting 2470
+#define wxPrintPreview_IsOk 2471
+#define wxPrintPreview_PaintPage 2472
+#define wxPrintPreview_Print 2473
+#define wxPrintPreview_RenderPage 2474
+#define wxPrintPreview_SetCanvas 2475
+#define wxPrintPreview_SetCurrentPage 2476
+#define wxPrintPreview_SetFrame 2477
+#define wxPrintPreview_SetPrintout 2478
+#define wxPrintPreview_SetZoom 2479
+#define wxPreviewFrame_new 2480
+#define wxPreviewFrame_destruct 2481
+#define wxPreviewFrame_CreateControlBar 2482
+#define wxPreviewFrame_CreateCanvas 2483
+#define wxPreviewFrame_Initialize 2484
+#define wxPreviewFrame_OnCloseWindow 2485
+#define wxPreviewControlBar_new 2486
+#define wxPreviewControlBar_destruct 2487
+#define wxPreviewControlBar_CreateButtons 2488
+#define wxPreviewControlBar_GetPrintPreview 2489
+#define wxPreviewControlBar_GetZoomControl 2490
+#define wxPreviewControlBar_SetZoomControl 2491
+#define wxPrinter_new 2493
+#define wxPrinter_CreateAbortWindow 2494
+#define wxPrinter_GetAbort 2495
+#define wxPrinter_GetLastError 2496
+#define wxPrinter_GetPrintDialogData 2497
+#define wxPrinter_Print 2498
+#define wxPrinter_PrintDialog 2499
+#define wxPrinter_ReportError 2500
+#define wxPrinter_Setup 2501
+#define wxPrinter_destroy 2502
+#define wxXmlResource_new_1 2503
+#define wxXmlResource_new_2 2504
+#define wxXmlResource_destruct 2505
+#define wxXmlResource_AttachUnknownControl 2506
+#define wxXmlResource_ClearHandlers 2507
+#define wxXmlResource_CompareVersion 2508
+#define wxXmlResource_Get 2509
+#define wxXmlResource_GetFlags 2510
+#define wxXmlResource_GetVersion 2511
+#define wxXmlResource_GetXRCID 2512
+#define wxXmlResource_InitAllHandlers 2513
+#define wxXmlResource_Load 2514
+#define wxXmlResource_LoadBitmap 2515
+#define wxXmlResource_LoadDialog_2 2516
+#define wxXmlResource_LoadDialog_3 2517
+#define wxXmlResource_LoadFrame_2 2518
+#define wxXmlResource_LoadFrame_3 2519
+#define wxXmlResource_LoadIcon 2520
+#define wxXmlResource_LoadMenu 2521
+#define wxXmlResource_LoadMenuBar_2 2522
+#define wxXmlResource_LoadMenuBar_1 2523
+#define wxXmlResource_LoadPanel_2 2524
+#define wxXmlResource_LoadPanel_3 2525
+#define wxXmlResource_LoadToolBar 2526
+#define wxXmlResource_Set 2527
+#define wxXmlResource_SetFlags 2528
+#define wxXmlResource_Unload 2529
+#define wxXmlResource_xrcctrl 2530
+#define wxHtmlEasyPrinting_new 2531
+#define wxHtmlEasyPrinting_destruct 2532
+#define wxHtmlEasyPrinting_GetPrintData 2533
+#define wxHtmlEasyPrinting_GetPageSetupData 2534
+#define wxHtmlEasyPrinting_PreviewFile 2535
+#define wxHtmlEasyPrinting_PreviewText 2536
+#define wxHtmlEasyPrinting_PrintFile 2537
+#define wxHtmlEasyPrinting_PrintText 2538
+#define wxHtmlEasyPrinting_PageSetup 2539
+#define wxHtmlEasyPrinting_SetFonts 2540
+#define wxHtmlEasyPrinting_SetHeader 2541
+#define wxHtmlEasyPrinting_SetFooter 2542
+#define wxGLCanvas_new_2 2544
+#define wxGLCanvas_new_3_1 2545
+#define wxGLCanvas_new_3_0 2546
+#define wxGLCanvas_GetContext 2547
+#define wxGLCanvas_SetCurrent 2549
+#define wxGLCanvas_SwapBuffers 2550
+#define wxGLCanvas_destroy 2551
+#define wxAuiManager_new 2552
+#define wxAuiManager_destruct 2553
+#define wxAuiManager_AddPane_2_1 2554
+#define wxAuiManager_AddPane_3 2555
+#define wxAuiManager_AddPane_2_0 2556
+#define wxAuiManager_DetachPane 2557
+#define wxAuiManager_GetAllPanes 2558
+#define wxAuiManager_GetArtProvider 2559
+#define wxAuiManager_GetDockSizeConstraint 2560
+#define wxAuiManager_GetFlags 2561
+#define wxAuiManager_GetManagedWindow 2562
+#define wxAuiManager_GetManager 2563
+#define wxAuiManager_GetPane_1_1 2564
+#define wxAuiManager_GetPane_1_0 2565
+#define wxAuiManager_HideHint 2566
+#define wxAuiManager_InsertPane 2567
+#define wxAuiManager_LoadPaneInfo 2568
+#define wxAuiManager_LoadPerspective 2569
+#define wxAuiManager_SavePaneInfo 2570
+#define wxAuiManager_SavePerspective 2571
+#define wxAuiManager_SetArtProvider 2572
+#define wxAuiManager_SetDockSizeConstraint 2573
+#define wxAuiManager_SetFlags 2574
+#define wxAuiManager_SetManagedWindow 2575
+#define wxAuiManager_ShowHint 2576
+#define wxAuiManager_UnInit 2577
+#define wxAuiManager_Update 2578
+#define wxAuiPaneInfo_new_0 2579
+#define wxAuiPaneInfo_new_1 2580
+#define wxAuiPaneInfo_destruct 2581
+#define wxAuiPaneInfo_BestSize_1 2582
+#define wxAuiPaneInfo_BestSize_2 2583
+#define wxAuiPaneInfo_Bottom 2584
+#define wxAuiPaneInfo_BottomDockable 2585
+#define wxAuiPaneInfo_Caption 2586
+#define wxAuiPaneInfo_CaptionVisible 2587
+#define wxAuiPaneInfo_Centre 2588
+#define wxAuiPaneInfo_CentrePane 2589
+#define wxAuiPaneInfo_CloseButton 2590
+#define wxAuiPaneInfo_DefaultPane 2591
+#define wxAuiPaneInfo_DestroyOnClose 2592
+#define wxAuiPaneInfo_Direction 2593
+#define wxAuiPaneInfo_Dock 2594
+#define wxAuiPaneInfo_Dockable 2595
+#define wxAuiPaneInfo_Fixed 2596
+#define wxAuiPaneInfo_Float 2597
+#define wxAuiPaneInfo_Floatable 2598
+#define wxAuiPaneInfo_FloatingPosition_1 2599
+#define wxAuiPaneInfo_FloatingPosition_2 2600
+#define wxAuiPaneInfo_FloatingSize_1 2601
+#define wxAuiPaneInfo_FloatingSize_2 2602
+#define wxAuiPaneInfo_Gripper 2603
+#define wxAuiPaneInfo_GripperTop 2604
+#define wxAuiPaneInfo_HasBorder 2605
+#define wxAuiPaneInfo_HasCaption 2606
+#define wxAuiPaneInfo_HasCloseButton 2607
+#define wxAuiPaneInfo_HasFlag 2608
+#define wxAuiPaneInfo_HasGripper 2609
+#define wxAuiPaneInfo_HasGripperTop 2610
+#define wxAuiPaneInfo_HasMaximizeButton 2611
+#define wxAuiPaneInfo_HasMinimizeButton 2612
+#define wxAuiPaneInfo_HasPinButton 2613
+#define wxAuiPaneInfo_Hide 2614
+#define wxAuiPaneInfo_IsBottomDockable 2615
+#define wxAuiPaneInfo_IsDocked 2616
+#define wxAuiPaneInfo_IsFixed 2617
+#define wxAuiPaneInfo_IsFloatable 2618
+#define wxAuiPaneInfo_IsFloating 2619
+#define wxAuiPaneInfo_IsLeftDockable 2620
+#define wxAuiPaneInfo_IsMovable 2621
+#define wxAuiPaneInfo_IsOk 2622
+#define wxAuiPaneInfo_IsResizable 2623
+#define wxAuiPaneInfo_IsRightDockable 2624
+#define wxAuiPaneInfo_IsShown 2625
+#define wxAuiPaneInfo_IsToolbar 2626
+#define wxAuiPaneInfo_IsTopDockable 2627
+#define wxAuiPaneInfo_Layer 2628
+#define wxAuiPaneInfo_Left 2629
+#define wxAuiPaneInfo_LeftDockable 2630
+#define wxAuiPaneInfo_MaxSize_1 2631
+#define wxAuiPaneInfo_MaxSize_2 2632
+#define wxAuiPaneInfo_MaximizeButton 2633
+#define wxAuiPaneInfo_MinSize_1 2634
+#define wxAuiPaneInfo_MinSize_2 2635
+#define wxAuiPaneInfo_MinimizeButton 2636
+#define wxAuiPaneInfo_Movable 2637
+#define wxAuiPaneInfo_Name 2638
+#define wxAuiPaneInfo_PaneBorder 2639
+#define wxAuiPaneInfo_PinButton 2640
+#define wxAuiPaneInfo_Position 2641
+#define wxAuiPaneInfo_Resizable 2642
+#define wxAuiPaneInfo_Right 2643
+#define wxAuiPaneInfo_RightDockable 2644
+#define wxAuiPaneInfo_Row 2645
+#define wxAuiPaneInfo_SafeSet 2646
+#define wxAuiPaneInfo_SetFlag 2647
+#define wxAuiPaneInfo_Show 2648
+#define wxAuiPaneInfo_ToolbarPane 2649
+#define wxAuiPaneInfo_Top 2650
+#define wxAuiPaneInfo_TopDockable 2651
+#define wxAuiPaneInfo_Window 2652
+#define wxAuiNotebook_new_0 2653
+#define wxAuiNotebook_new_2 2654
+#define wxAuiNotebook_AddPage 2655
+#define wxAuiNotebook_Create 2656
+#define wxAuiNotebook_DeletePage 2657
+#define wxAuiNotebook_GetArtProvider 2658
+#define wxAuiNotebook_GetPage 2659
+#define wxAuiNotebook_GetPageBitmap 2660
+#define wxAuiNotebook_GetPageCount 2661
+#define wxAuiNotebook_GetPageIndex 2662
+#define wxAuiNotebook_GetPageText 2663
+#define wxAuiNotebook_GetSelection 2664
+#define wxAuiNotebook_InsertPage 2665
+#define wxAuiNotebook_RemovePage 2666
+#define wxAuiNotebook_SetArtProvider 2667
+#define wxAuiNotebook_SetFont 2668
+#define wxAuiNotebook_SetPageBitmap 2669
+#define wxAuiNotebook_SetPageText 2670
+#define wxAuiNotebook_SetSelection 2671
+#define wxAuiNotebook_SetTabCtrlHeight 2672
+#define wxAuiNotebook_SetUniformBitmapSize 2673
+#define wxAuiNotebook_destroy 2674
+#define wxMDIParentFrame_new_0 2675
+#define wxMDIParentFrame_new_4 2676
+#define wxMDIParentFrame_destruct 2677
+#define wxMDIParentFrame_ActivateNext 2678
+#define wxMDIParentFrame_ActivatePrevious 2679
+#define wxMDIParentFrame_ArrangeIcons 2680
+#define wxMDIParentFrame_Cascade 2681
+#define wxMDIParentFrame_Create 2682
+#define wxMDIParentFrame_GetActiveChild 2683
+#define wxMDIParentFrame_GetClientWindow 2684
+#define wxMDIParentFrame_Tile 2685
+#define wxMDIChildFrame_new_0 2686
+#define wxMDIChildFrame_new_4 2687
+#define wxMDIChildFrame_destruct 2688
+#define wxMDIChildFrame_Activate 2689
+#define wxMDIChildFrame_Create 2690
+#define wxMDIChildFrame_Maximize 2691
+#define wxMDIChildFrame_Restore 2692
+#define wxMDIClientWindow_new_0 2693
+#define wxMDIClientWindow_new_2 2694
+#define wxMDIClientWindow_destruct 2695
+#define wxMDIClientWindow_CreateClient 2696
+#define wxLayoutAlgorithm_new 2697
+#define wxLayoutAlgorithm_LayoutFrame 2698
+#define wxLayoutAlgorithm_LayoutMDIFrame 2699
+#define wxLayoutAlgorithm_LayoutWindow 2700
+#define wxLayoutAlgorithm_destroy 2701
+#define wxEvent_GetId 2702
+#define wxEvent_GetSkipped 2703
+#define wxEvent_GetTimestamp 2704
+#define wxEvent_IsCommandEvent 2705
+#define wxEvent_ResumePropagation 2706
+#define wxEvent_ShouldPropagate 2707
+#define wxEvent_Skip 2708
+#define wxEvent_StopPropagation 2709
+#define wxCommandEvent_getClientData 2710
+#define wxCommandEvent_GetExtraLong 2711
+#define wxCommandEvent_GetInt 2712
+#define wxCommandEvent_GetSelection 2713
+#define wxCommandEvent_GetString 2714
+#define wxCommandEvent_IsChecked 2715
+#define wxCommandEvent_IsSelection 2716
+#define wxCommandEvent_SetInt 2717
+#define wxCommandEvent_SetString 2718
+#define wxScrollEvent_GetOrientation 2719
+#define wxScrollEvent_GetPosition 2720
+#define wxScrollWinEvent_GetOrientation 2721
+#define wxScrollWinEvent_GetPosition 2722
+#define wxMouseEvent_AltDown 2723
+#define wxMouseEvent_Button 2724
+#define wxMouseEvent_ButtonDClick 2725
+#define wxMouseEvent_ButtonDown 2726
+#define wxMouseEvent_ButtonUp 2727
+#define wxMouseEvent_CmdDown 2728
+#define wxMouseEvent_ControlDown 2729
+#define wxMouseEvent_Dragging 2730
+#define wxMouseEvent_Entering 2731
+#define wxMouseEvent_GetButton 2732
+#define wxMouseEvent_GetPosition 2735
+#define wxMouseEvent_GetLogicalPosition 2736
+#define wxMouseEvent_GetLinesPerAction 2737
+#define wxMouseEvent_GetWheelRotation 2738
+#define wxMouseEvent_GetWheelDelta 2739
+#define wxMouseEvent_GetX 2740
+#define wxMouseEvent_GetY 2741
+#define wxMouseEvent_IsButton 2742
+#define wxMouseEvent_IsPageScroll 2743
+#define wxMouseEvent_Leaving 2744
+#define wxMouseEvent_LeftDClick 2745
+#define wxMouseEvent_LeftDown 2746
+#define wxMouseEvent_LeftIsDown 2747
+#define wxMouseEvent_LeftUp 2748
+#define wxMouseEvent_MetaDown 2749
+#define wxMouseEvent_MiddleDClick 2750
+#define wxMouseEvent_MiddleDown 2751
+#define wxMouseEvent_MiddleIsDown 2752
+#define wxMouseEvent_MiddleUp 2753
+#define wxMouseEvent_Moving 2754
+#define wxMouseEvent_RightDClick 2755
+#define wxMouseEvent_RightDown 2756
+#define wxMouseEvent_RightIsDown 2757
+#define wxMouseEvent_RightUp 2758
+#define wxMouseEvent_ShiftDown 2759
+#define wxSetCursorEvent_GetCursor 2760
+#define wxSetCursorEvent_GetX 2761
+#define wxSetCursorEvent_GetY 2762
+#define wxSetCursorEvent_HasCursor 2763
+#define wxSetCursorEvent_SetCursor 2764
+#define wxKeyEvent_AltDown 2765
+#define wxKeyEvent_CmdDown 2766
+#define wxKeyEvent_ControlDown 2767
+#define wxKeyEvent_GetKeyCode 2768
+#define wxKeyEvent_GetModifiers 2769
+#define wxKeyEvent_GetPosition 2772
+#define wxKeyEvent_GetRawKeyCode 2773
+#define wxKeyEvent_GetRawKeyFlags 2774
+#define wxKeyEvent_GetUnicodeKey 2775
+#define wxKeyEvent_GetX 2776
+#define wxKeyEvent_GetY 2777
+#define wxKeyEvent_HasModifiers 2778
+#define wxKeyEvent_MetaDown 2779
+#define wxKeyEvent_ShiftDown 2780
+#define wxSizeEvent_GetSize 2781
+#define wxMoveEvent_GetPosition 2782
+#define wxEraseEvent_GetDC 2783
+#define wxFocusEvent_GetWindow 2784
+#define wxChildFocusEvent_GetWindow 2785
+#define wxMenuEvent_GetMenu 2786
+#define wxMenuEvent_GetMenuId 2787
+#define wxMenuEvent_IsPopup 2788
+#define wxCloseEvent_CanVeto 2789
+#define wxCloseEvent_GetLoggingOff 2790
+#define wxCloseEvent_SetCanVeto 2791
+#define wxCloseEvent_SetLoggingOff 2792
+#define wxCloseEvent_Veto 2793
+#define wxShowEvent_SetShow 2794
+#define wxShowEvent_GetShow 2795
+#define wxIconizeEvent_Iconized 2796
+#define wxJoystickEvent_ButtonDown 2797
+#define wxJoystickEvent_ButtonIsDown 2798
+#define wxJoystickEvent_ButtonUp 2799
+#define wxJoystickEvent_GetButtonChange 2800
+#define wxJoystickEvent_GetButtonState 2801
+#define wxJoystickEvent_GetJoystick 2802
+#define wxJoystickEvent_GetPosition 2803
+#define wxJoystickEvent_GetZPosition 2804
+#define wxJoystickEvent_IsButton 2805
+#define wxJoystickEvent_IsMove 2806
+#define wxJoystickEvent_IsZMove 2807
+#define wxUpdateUIEvent_CanUpdate 2808
+#define wxUpdateUIEvent_Check 2809
+#define wxUpdateUIEvent_Enable 2810
+#define wxUpdateUIEvent_Show 2811
+#define wxUpdateUIEvent_GetChecked 2812
+#define wxUpdateUIEvent_GetEnabled 2813
+#define wxUpdateUIEvent_GetShown 2814
+#define wxUpdateUIEvent_GetSetChecked 2815
+#define wxUpdateUIEvent_GetSetEnabled 2816
+#define wxUpdateUIEvent_GetSetShown 2817
+#define wxUpdateUIEvent_GetSetText 2818
+#define wxUpdateUIEvent_GetText 2819
+#define wxUpdateUIEvent_GetMode 2820
+#define wxUpdateUIEvent_GetUpdateInterval 2821
+#define wxUpdateUIEvent_ResetUpdateTime 2822
+#define wxUpdateUIEvent_SetMode 2823
+#define wxUpdateUIEvent_SetText 2824
+#define wxUpdateUIEvent_SetUpdateInterval 2825
+#define wxMouseCaptureChangedEvent_GetCapturedWindow 2826
+#define wxPaletteChangedEvent_SetChangedWindow 2827
+#define wxPaletteChangedEvent_GetChangedWindow 2828
+#define wxQueryNewPaletteEvent_SetPaletteRealized 2829
+#define wxQueryNewPaletteEvent_GetPaletteRealized 2830
+#define wxNavigationKeyEvent_GetDirection 2831
+#define wxNavigationKeyEvent_SetDirection 2832
+#define wxNavigationKeyEvent_IsWindowChange 2833
+#define wxNavigationKeyEvent_SetWindowChange 2834
+#define wxNavigationKeyEvent_IsFromTab 2835
+#define wxNavigationKeyEvent_SetFromTab 2836
+#define wxNavigationKeyEvent_GetCurrentFocus 2837
+#define wxNavigationKeyEvent_SetCurrentFocus 2838
+#define wxHelpEvent_GetOrigin 2839
+#define wxHelpEvent_GetPosition 2840
+#define wxHelpEvent_SetOrigin 2841
+#define wxHelpEvent_SetPosition 2842
+#define wxContextMenuEvent_GetPosition 2843
+#define wxContextMenuEvent_SetPosition 2844
+#define wxIdleEvent_CanSend 2845
+#define wxIdleEvent_GetMode 2846
+#define wxIdleEvent_RequestMore 2847
+#define wxIdleEvent_MoreRequested 2848
+#define wxIdleEvent_SetMode 2849
+#define wxGridEvent_AltDown 2850
+#define wxGridEvent_ControlDown 2851
+#define wxGridEvent_GetCol 2852
+#define wxGridEvent_GetPosition 2853
+#define wxGridEvent_GetRow 2854
+#define wxGridEvent_MetaDown 2855
+#define wxGridEvent_Selecting 2856
+#define wxGridEvent_ShiftDown 2857
+#define wxNotifyEvent_Allow 2858
+#define wxNotifyEvent_IsAllowed 2859
+#define wxNotifyEvent_Veto 2860
+#define wxSashEvent_GetEdge 2861
+#define wxSashEvent_GetDragRect 2862
+#define wxSashEvent_GetDragStatus 2863
+#define wxListEvent_GetCacheFrom 2864
+#define wxListEvent_GetCacheTo 2865
+#define wxListEvent_GetKeyCode 2866
+#define wxListEvent_GetIndex 2867
+#define wxListEvent_GetColumn 2868
+#define wxListEvent_GetPoint 2869
+#define wxListEvent_GetLabel 2870
+#define wxListEvent_GetText 2871
+#define wxListEvent_GetImage 2872
+#define wxListEvent_GetData 2873
+#define wxListEvent_GetMask 2874
+#define wxListEvent_GetItem 2875
+#define wxListEvent_IsEditCancelled 2876
+#define wxDateEvent_GetDate 2877
+#define wxCalendarEvent_GetWeekDay 2878
+#define wxFileDirPickerEvent_GetPath 2879
+#define wxColourPickerEvent_GetColour 2880
+#define wxFontPickerEvent_GetFont 2881
+#define wxStyledTextEvent_GetPosition 2882
+#define wxStyledTextEvent_GetKey 2883
+#define wxStyledTextEvent_GetModifiers 2884
+#define wxStyledTextEvent_GetModificationType 2885
+#define wxStyledTextEvent_GetText 2886
+#define wxStyledTextEvent_GetLength 2887
+#define wxStyledTextEvent_GetLinesAdded 2888
+#define wxStyledTextEvent_GetLine 2889
+#define wxStyledTextEvent_GetFoldLevelNow 2890
+#define wxStyledTextEvent_GetFoldLevelPrev 2891
+#define wxStyledTextEvent_GetMargin 2892
+#define wxStyledTextEvent_GetMessage 2893
+#define wxStyledTextEvent_GetWParam 2894
+#define wxStyledTextEvent_GetLParam 2895
+#define wxStyledTextEvent_GetListType 2896
+#define wxStyledTextEvent_GetX 2897
+#define wxStyledTextEvent_GetY 2898
+#define wxStyledTextEvent_GetDragText 2899
+#define wxStyledTextEvent_GetDragAllowMove 2900
+#define wxStyledTextEvent_GetDragResult 2901
+#define wxStyledTextEvent_GetShift 2902
+#define wxStyledTextEvent_GetControl 2903
+#define wxStyledTextEvent_GetAlt 2904
+#define utils_wxGetKeyState 2905
+#define utils_wxGetMousePosition 2906
+#define utils_wxGetMouseState 2907
+#define utils_wxSetDetectableAutoRepeat 2908
+#define utils_wxBell 2909
+#define utils_wxFindMenuItemId 2910
+#define utils_wxGenericFindWindowAtPoint 2911
+#define utils_wxFindWindowAtPoint 2912
+#define utils_wxBeginBusyCursor 2913
+#define utils_wxEndBusyCursor 2914
+#define utils_wxIsBusy 2915
+#define utils_wxShutdown 2916
+#define utils_wxShell 2917
+#define utils_wxLaunchDefaultBrowser 2918
+#define utils_wxGetEmailAddress 2919
+#define utils_wxGetUserId 2920
+#define utils_wxGetHomeDir 2921
+#define utils_wxNewId 2922
+#define utils_wxRegisterId 2923
+#define utils_wxGetCurrentId 2924
+#define utils_wxGetOsDescription 2925
+#define utils_wxIsPlatformLittleEndian 2926
+#define utils_wxIsPlatform64Bit 2927
+#define gdicmn_wxDisplaySize 2928
+#define gdicmn_wxSetCursor 2929
+#define wxPrintout_new 2930
+#define wxPrintout_destruct 2931
+#define wxPrintout_GetDC 2932
+#define wxPrintout_GetPageSizeMM 2933
+#define wxPrintout_GetPageSizePixels 2934
+#define wxPrintout_GetPaperRectPixels 2935
+#define wxPrintout_GetPPIPrinter 2936
+#define wxPrintout_GetPPIScreen 2937
+#define wxPrintout_GetTitle 2938
+#define wxPrintout_IsPreview 2939
+#define wxPrintout_FitThisSizeToPaper 2940
+#define wxPrintout_FitThisSizeToPage 2941
+#define wxPrintout_FitThisSizeToPageMargins 2942
+#define wxPrintout_MapScreenSizeToPaper 2943
+#define wxPrintout_MapScreenSizeToPage 2944
+#define wxPrintout_MapScreenSizeToPageMargins 2945
+#define wxPrintout_MapScreenSizeToDevice 2946
+#define wxPrintout_GetLogicalPaperRect 2947
+#define wxPrintout_GetLogicalPageRect 2948
+#define wxPrintout_GetLogicalPageMarginsRect 2949
+#define wxPrintout_SetLogicalOrigin 2950
+#define wxPrintout_OffsetLogicalOrigin 2951
+#define wxStyledTextCtrl_new_2 2952
+#define wxStyledTextCtrl_new_0 2953
+#define wxStyledTextCtrl_destruct 2954
+#define wxStyledTextCtrl_Create 2955
+#define wxStyledTextCtrl_AddText 2956
+#define wxStyledTextCtrl_AddStyledText 2957
+#define wxStyledTextCtrl_InsertText 2958
+#define wxStyledTextCtrl_ClearAll 2959
+#define wxStyledTextCtrl_ClearDocumentStyle 2960
+#define wxStyledTextCtrl_GetLength 2961
+#define wxStyledTextCtrl_GetCharAt 2962
+#define wxStyledTextCtrl_GetCurrentPos 2963
+#define wxStyledTextCtrl_GetAnchor 2964
+#define wxStyledTextCtrl_GetStyleAt 2965
+#define wxStyledTextCtrl_Redo 2966
+#define wxStyledTextCtrl_SetUndoCollection 2967
+#define wxStyledTextCtrl_SelectAll 2968
+#define wxStyledTextCtrl_SetSavePoint 2969
+#define wxStyledTextCtrl_GetStyledText 2970
+#define wxStyledTextCtrl_CanRedo 2971
+#define wxStyledTextCtrl_MarkerLineFromHandle 2972
+#define wxStyledTextCtrl_MarkerDeleteHandle 2973
+#define wxStyledTextCtrl_GetUndoCollection 2974
+#define wxStyledTextCtrl_GetViewWhiteSpace 2975
+#define wxStyledTextCtrl_SetViewWhiteSpace 2976
+#define wxStyledTextCtrl_PositionFromPoint 2977
+#define wxStyledTextCtrl_PositionFromPointClose 2978
+#define wxStyledTextCtrl_GotoLine 2979
+#define wxStyledTextCtrl_GotoPos 2980
+#define wxStyledTextCtrl_SetAnchor 2981
+#define wxStyledTextCtrl_GetCurLine 2982
+#define wxStyledTextCtrl_GetEndStyled 2983
+#define wxStyledTextCtrl_ConvertEOLs 2984
+#define wxStyledTextCtrl_GetEOLMode 2985
+#define wxStyledTextCtrl_SetEOLMode 2986
+#define wxStyledTextCtrl_StartStyling 2987
+#define wxStyledTextCtrl_SetStyling 2988
+#define wxStyledTextCtrl_GetBufferedDraw 2989
+#define wxStyledTextCtrl_SetBufferedDraw 2990
+#define wxStyledTextCtrl_SetTabWidth 2991
+#define wxStyledTextCtrl_GetTabWidth 2992
+#define wxStyledTextCtrl_SetCodePage 2993
+#define wxStyledTextCtrl_MarkerDefine 2994
+#define wxStyledTextCtrl_MarkerSetForeground 2995
+#define wxStyledTextCtrl_MarkerSetBackground 2996
+#define wxStyledTextCtrl_MarkerAdd 2997
+#define wxStyledTextCtrl_MarkerDelete 2998
+#define wxStyledTextCtrl_MarkerDeleteAll 2999
+#define wxStyledTextCtrl_MarkerGet 3000
+#define wxStyledTextCtrl_MarkerNext 3001
+#define wxStyledTextCtrl_MarkerPrevious 3002
+#define wxStyledTextCtrl_MarkerDefineBitmap 3003
+#define wxStyledTextCtrl_MarkerAddSet 3004
+#define wxStyledTextCtrl_MarkerSetAlpha 3005
+#define wxStyledTextCtrl_SetMarginType 3006
+#define wxStyledTextCtrl_GetMarginType 3007
+#define wxStyledTextCtrl_SetMarginWidth 3008
+#define wxStyledTextCtrl_GetMarginWidth 3009
+#define wxStyledTextCtrl_SetMarginMask 3010
+#define wxStyledTextCtrl_GetMarginMask 3011
+#define wxStyledTextCtrl_SetMarginSensitive 3012
+#define wxStyledTextCtrl_GetMarginSensitive 3013
+#define wxStyledTextCtrl_StyleClearAll 3014
+#define wxStyledTextCtrl_StyleSetForeground 3015
+#define wxStyledTextCtrl_StyleSetBackground 3016
+#define wxStyledTextCtrl_StyleSetBold 3017
+#define wxStyledTextCtrl_StyleSetItalic 3018
+#define wxStyledTextCtrl_StyleSetSize 3019
+#define wxStyledTextCtrl_StyleSetFaceName 3020
+#define wxStyledTextCtrl_StyleSetEOLFilled 3021
+#define wxStyledTextCtrl_StyleResetDefault 3022
+#define wxStyledTextCtrl_StyleSetUnderline 3023
+#define wxStyledTextCtrl_StyleSetCase 3024
+#define wxStyledTextCtrl_StyleSetHotSpot 3025
+#define wxStyledTextCtrl_SetSelForeground 3026
+#define wxStyledTextCtrl_SetSelBackground 3027
+#define wxStyledTextCtrl_GetSelAlpha 3028
+#define wxStyledTextCtrl_SetSelAlpha 3029
+#define wxStyledTextCtrl_SetCaretForeground 3030
+#define wxStyledTextCtrl_CmdKeyAssign 3031
+#define wxStyledTextCtrl_CmdKeyClear 3032
+#define wxStyledTextCtrl_CmdKeyClearAll 3033
+#define wxStyledTextCtrl_SetStyleBytes 3034
+#define wxStyledTextCtrl_StyleSetVisible 3035
+#define wxStyledTextCtrl_GetCaretPeriod 3036
+#define wxStyledTextCtrl_SetCaretPeriod 3037
+#define wxStyledTextCtrl_SetWordChars 3038
+#define wxStyledTextCtrl_BeginUndoAction 3039
+#define wxStyledTextCtrl_EndUndoAction 3040
+#define wxStyledTextCtrl_IndicatorSetStyle 3041
+#define wxStyledTextCtrl_IndicatorGetStyle 3042
+#define wxStyledTextCtrl_IndicatorSetForeground 3043
+#define wxStyledTextCtrl_IndicatorGetForeground 3044
+#define wxStyledTextCtrl_SetWhitespaceForeground 3045
+#define wxStyledTextCtrl_SetWhitespaceBackground 3046
+#define wxStyledTextCtrl_GetStyleBits 3047
+#define wxStyledTextCtrl_SetLineState 3048
+#define wxStyledTextCtrl_GetLineState 3049
+#define wxStyledTextCtrl_GetMaxLineState 3050
+#define wxStyledTextCtrl_GetCaretLineVisible 3051
+#define wxStyledTextCtrl_SetCaretLineVisible 3052
+#define wxStyledTextCtrl_GetCaretLineBackground 3053
+#define wxStyledTextCtrl_SetCaretLineBackground 3054
+#define wxStyledTextCtrl_AutoCompShow 3055
+#define wxStyledTextCtrl_AutoCompCancel 3056
+#define wxStyledTextCtrl_AutoCompActive 3057
+#define wxStyledTextCtrl_AutoCompPosStart 3058
+#define wxStyledTextCtrl_AutoCompComplete 3059
+#define wxStyledTextCtrl_AutoCompStops 3060
+#define wxStyledTextCtrl_AutoCompSetSeparator 3061
+#define wxStyledTextCtrl_AutoCompGetSeparator 3062
+#define wxStyledTextCtrl_AutoCompSelect 3063
+#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3064
+#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3065
+#define wxStyledTextCtrl_AutoCompSetFillUps 3066
+#define wxStyledTextCtrl_AutoCompSetChooseSingle 3067
+#define wxStyledTextCtrl_AutoCompGetChooseSingle 3068
+#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3069
+#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3070
+#define wxStyledTextCtrl_UserListShow 3071
+#define wxStyledTextCtrl_AutoCompSetAutoHide 3072
+#define wxStyledTextCtrl_AutoCompGetAutoHide 3073
+#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3074
+#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3075
+#define wxStyledTextCtrl_RegisterImage 3076
+#define wxStyledTextCtrl_ClearRegisteredImages 3077
+#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3078
+#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3079
+#define wxStyledTextCtrl_AutoCompSetMaxWidth 3080
+#define wxStyledTextCtrl_AutoCompGetMaxWidth 3081
+#define wxStyledTextCtrl_AutoCompSetMaxHeight 3082
+#define wxStyledTextCtrl_AutoCompGetMaxHeight 3083
+#define wxStyledTextCtrl_SetIndent 3084
+#define wxStyledTextCtrl_GetIndent 3085
+#define wxStyledTextCtrl_SetUseTabs 3086
+#define wxStyledTextCtrl_GetUseTabs 3087
+#define wxStyledTextCtrl_SetLineIndentation 3088
+#define wxStyledTextCtrl_GetLineIndentation 3089
+#define wxStyledTextCtrl_GetLineIndentPosition 3090
+#define wxStyledTextCtrl_GetColumn 3091
+#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3092
+#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3093
+#define wxStyledTextCtrl_SetIndentationGuides 3094
+#define wxStyledTextCtrl_GetIndentationGuides 3095
+#define wxStyledTextCtrl_SetHighlightGuide 3096
+#define wxStyledTextCtrl_GetHighlightGuide 3097
+#define wxStyledTextCtrl_GetLineEndPosition 3098
+#define wxStyledTextCtrl_GetCodePage 3099
+#define wxStyledTextCtrl_GetCaretForeground 3100
+#define wxStyledTextCtrl_GetReadOnly 3101
+#define wxStyledTextCtrl_SetCurrentPos 3102
+#define wxStyledTextCtrl_SetSelectionStart 3103
+#define wxStyledTextCtrl_GetSelectionStart 3104
+#define wxStyledTextCtrl_SetSelectionEnd 3105
+#define wxStyledTextCtrl_GetSelectionEnd 3106
+#define wxStyledTextCtrl_SetPrintMagnification 3107
+#define wxStyledTextCtrl_GetPrintMagnification 3108
+#define wxStyledTextCtrl_SetPrintColourMode 3109
+#define wxStyledTextCtrl_GetPrintColourMode 3110
+#define wxStyledTextCtrl_FindText 3111
+#define wxStyledTextCtrl_FormatRange 3112
+#define wxStyledTextCtrl_GetFirstVisibleLine 3113
+#define wxStyledTextCtrl_GetLine 3114
+#define wxStyledTextCtrl_GetLineCount 3115
+#define wxStyledTextCtrl_SetMarginLeft 3116
+#define wxStyledTextCtrl_GetMarginLeft 3117
+#define wxStyledTextCtrl_SetMarginRight 3118
+#define wxStyledTextCtrl_GetMarginRight 3119
+#define wxStyledTextCtrl_GetModify 3120
+#define wxStyledTextCtrl_SetSelection 3121
+#define wxStyledTextCtrl_GetSelectedText 3122
+#define wxStyledTextCtrl_GetTextRange 3123
+#define wxStyledTextCtrl_HideSelection 3124
+#define wxStyledTextCtrl_LineFromPosition 3125
+#define wxStyledTextCtrl_PositionFromLine 3126
+#define wxStyledTextCtrl_LineScroll 3127
+#define wxStyledTextCtrl_EnsureCaretVisible 3128
+#define wxStyledTextCtrl_ReplaceSelection 3129
+#define wxStyledTextCtrl_SetReadOnly 3130
+#define wxStyledTextCtrl_CanPaste 3131
+#define wxStyledTextCtrl_CanUndo 3132
+#define wxStyledTextCtrl_EmptyUndoBuffer 3133
+#define wxStyledTextCtrl_Undo 3134
+#define wxStyledTextCtrl_Cut 3135
+#define wxStyledTextCtrl_Copy 3136
+#define wxStyledTextCtrl_Paste 3137
+#define wxStyledTextCtrl_Clear 3138
+#define wxStyledTextCtrl_SetText 3139
+#define wxStyledTextCtrl_GetText 3140
+#define wxStyledTextCtrl_GetTextLength 3141
+#define wxStyledTextCtrl_GetOvertype 3142
+#define wxStyledTextCtrl_SetCaretWidth 3143
+#define wxStyledTextCtrl_GetCaretWidth 3144
+#define wxStyledTextCtrl_SetTargetStart 3145
+#define wxStyledTextCtrl_GetTargetStart 3146
+#define wxStyledTextCtrl_SetTargetEnd 3147
+#define wxStyledTextCtrl_GetTargetEnd 3148
+#define wxStyledTextCtrl_ReplaceTarget 3149
+#define wxStyledTextCtrl_SearchInTarget 3150
+#define wxStyledTextCtrl_SetSearchFlags 3151
+#define wxStyledTextCtrl_GetSearchFlags 3152
+#define wxStyledTextCtrl_CallTipShow 3153
+#define wxStyledTextCtrl_CallTipCancel 3154
+#define wxStyledTextCtrl_CallTipActive 3155
+#define wxStyledTextCtrl_CallTipPosAtStart 3156
+#define wxStyledTextCtrl_CallTipSetHighlight 3157
+#define wxStyledTextCtrl_CallTipSetBackground 3158
+#define wxStyledTextCtrl_CallTipSetForeground 3159
+#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3160
+#define wxStyledTextCtrl_CallTipUseStyle 3161
+#define wxStyledTextCtrl_VisibleFromDocLine 3162
+#define wxStyledTextCtrl_DocLineFromVisible 3163
+#define wxStyledTextCtrl_WrapCount 3164
+#define wxStyledTextCtrl_SetFoldLevel 3165
+#define wxStyledTextCtrl_GetFoldLevel 3166
+#define wxStyledTextCtrl_GetLastChild 3167
+#define wxStyledTextCtrl_GetFoldParent 3168
+#define wxStyledTextCtrl_ShowLines 3169
+#define wxStyledTextCtrl_HideLines 3170
+#define wxStyledTextCtrl_GetLineVisible 3171
+#define wxStyledTextCtrl_SetFoldExpanded 3172
+#define wxStyledTextCtrl_GetFoldExpanded 3173
+#define wxStyledTextCtrl_ToggleFold 3174
+#define wxStyledTextCtrl_EnsureVisible 3175
+#define wxStyledTextCtrl_SetFoldFlags 3176
+#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3177
+#define wxStyledTextCtrl_SetTabIndents 3178
+#define wxStyledTextCtrl_GetTabIndents 3179
+#define wxStyledTextCtrl_SetBackSpaceUnIndents 3180
+#define wxStyledTextCtrl_GetBackSpaceUnIndents 3181
+#define wxStyledTextCtrl_SetMouseDwellTime 3182
+#define wxStyledTextCtrl_GetMouseDwellTime 3183
+#define wxStyledTextCtrl_WordStartPosition 3184
+#define wxStyledTextCtrl_WordEndPosition 3185
+#define wxStyledTextCtrl_SetWrapMode 3186
+#define wxStyledTextCtrl_GetWrapMode 3187
+#define wxStyledTextCtrl_SetWrapVisualFlags 3188
+#define wxStyledTextCtrl_GetWrapVisualFlags 3189
+#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3190
+#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3191
+#define wxStyledTextCtrl_SetWrapStartIndent 3192
+#define wxStyledTextCtrl_GetWrapStartIndent 3193
+#define wxStyledTextCtrl_SetLayoutCache 3194
+#define wxStyledTextCtrl_GetLayoutCache 3195
+#define wxStyledTextCtrl_SetScrollWidth 3196
+#define wxStyledTextCtrl_GetScrollWidth 3197
+#define wxStyledTextCtrl_TextWidth 3198
+#define wxStyledTextCtrl_GetEndAtLastLine 3199
+#define wxStyledTextCtrl_TextHeight 3200
+#define wxStyledTextCtrl_SetUseVerticalScrollBar 3201
+#define wxStyledTextCtrl_GetUseVerticalScrollBar 3202
+#define wxStyledTextCtrl_AppendText 3203
+#define wxStyledTextCtrl_GetTwoPhaseDraw 3204
+#define wxStyledTextCtrl_SetTwoPhaseDraw 3205
+#define wxStyledTextCtrl_TargetFromSelection 3206
+#define wxStyledTextCtrl_LinesJoin 3207
+#define wxStyledTextCtrl_LinesSplit 3208
+#define wxStyledTextCtrl_SetFoldMarginColour 3209
+#define wxStyledTextCtrl_SetFoldMarginHiColour 3210
+#define wxStyledTextCtrl_LineDown 3211
+#define wxStyledTextCtrl_LineDownExtend 3212
+#define wxStyledTextCtrl_LineUp 3213
+#define wxStyledTextCtrl_LineUpExtend 3214
+#define wxStyledTextCtrl_CharLeft 3215
+#define wxStyledTextCtrl_CharLeftExtend 3216
+#define wxStyledTextCtrl_CharRight 3217
+#define wxStyledTextCtrl_CharRightExtend 3218
+#define wxStyledTextCtrl_WordLeft 3219
+#define wxStyledTextCtrl_WordLeftExtend 3220
+#define wxStyledTextCtrl_WordRight 3221
+#define wxStyledTextCtrl_WordRightExtend 3222
+#define wxStyledTextCtrl_Home 3223
+#define wxStyledTextCtrl_HomeExtend 3224
+#define wxStyledTextCtrl_LineEnd 3225
+#define wxStyledTextCtrl_LineEndExtend 3226
+#define wxStyledTextCtrl_DocumentStart 3227
+#define wxStyledTextCtrl_DocumentStartExtend 3228
+#define wxStyledTextCtrl_DocumentEnd 3229
+#define wxStyledTextCtrl_DocumentEndExtend 3230
+#define wxStyledTextCtrl_PageUp 3231
+#define wxStyledTextCtrl_PageUpExtend 3232
+#define wxStyledTextCtrl_PageDown 3233
+#define wxStyledTextCtrl_PageDownExtend 3234
+#define wxStyledTextCtrl_EditToggleOvertype 3235
+#define wxStyledTextCtrl_Cancel 3236
+#define wxStyledTextCtrl_DeleteBack 3237
+#define wxStyledTextCtrl_Tab 3238
+#define wxStyledTextCtrl_BackTab 3239
+#define wxStyledTextCtrl_NewLine 3240
+#define wxStyledTextCtrl_FormFeed 3241
+#define wxStyledTextCtrl_VCHome 3242
+#define wxStyledTextCtrl_VCHomeExtend 3243
+#define wxStyledTextCtrl_ZoomIn 3244
+#define wxStyledTextCtrl_ZoomOut 3245
+#define wxStyledTextCtrl_DelWordLeft 3246
+#define wxStyledTextCtrl_DelWordRight 3247
+#define wxStyledTextCtrl_LineCut 3248
+#define wxStyledTextCtrl_LineDelete 3249
+#define wxStyledTextCtrl_LineTranspose 3250
+#define wxStyledTextCtrl_LineDuplicate 3251
+#define wxStyledTextCtrl_LowerCase 3252
+#define wxStyledTextCtrl_UpperCase 3253
+#define wxStyledTextCtrl_LineScrollDown 3254
+#define wxStyledTextCtrl_LineScrollUp 3255
+#define wxStyledTextCtrl_DeleteBackNotLine 3256
+#define wxStyledTextCtrl_HomeDisplay 3257
+#define wxStyledTextCtrl_HomeDisplayExtend 3258
+#define wxStyledTextCtrl_LineEndDisplay 3259
+#define wxStyledTextCtrl_LineEndDisplayExtend 3260
+#define wxStyledTextCtrl_HomeWrapExtend 3261
+#define wxStyledTextCtrl_LineEndWrap 3262
+#define wxStyledTextCtrl_LineEndWrapExtend 3263
+#define wxStyledTextCtrl_VCHomeWrap 3264
+#define wxStyledTextCtrl_VCHomeWrapExtend 3265
+#define wxStyledTextCtrl_LineCopy 3266
+#define wxStyledTextCtrl_MoveCaretInsideView 3267
+#define wxStyledTextCtrl_LineLength 3268
+#define wxStyledTextCtrl_BraceHighlight 3269
+#define wxStyledTextCtrl_BraceBadLight 3270
+#define wxStyledTextCtrl_BraceMatch 3271
+#define wxStyledTextCtrl_GetViewEOL 3272
+#define wxStyledTextCtrl_SetViewEOL 3273
+#define wxStyledTextCtrl_SetModEventMask 3274
+#define wxStyledTextCtrl_GetEdgeColumn 3275
+#define wxStyledTextCtrl_SetEdgeColumn 3276
+#define wxStyledTextCtrl_SetEdgeMode 3277
+#define wxStyledTextCtrl_GetEdgeMode 3278
+#define wxStyledTextCtrl_GetEdgeColour 3279
+#define wxStyledTextCtrl_SetEdgeColour 3280
+#define wxStyledTextCtrl_SearchAnchor 3281
+#define wxStyledTextCtrl_SearchNext 3282
+#define wxStyledTextCtrl_SearchPrev 3283
+#define wxStyledTextCtrl_LinesOnScreen 3284
+#define wxStyledTextCtrl_UsePopUp 3285
+#define wxStyledTextCtrl_SelectionIsRectangle 3286
+#define wxStyledTextCtrl_SetZoom 3287
+#define wxStyledTextCtrl_GetZoom 3288
+#define wxStyledTextCtrl_GetModEventMask 3289
+#define wxStyledTextCtrl_SetSTCFocus 3290
+#define wxStyledTextCtrl_GetSTCFocus 3291
+#define wxStyledTextCtrl_SetStatus 3292
+#define wxStyledTextCtrl_GetStatus 3293
+#define wxStyledTextCtrl_SetMouseDownCaptures 3294
+#define wxStyledTextCtrl_GetMouseDownCaptures 3295
+#define wxStyledTextCtrl_SetSTCCursor 3296
+#define wxStyledTextCtrl_GetSTCCursor 3297
+#define wxStyledTextCtrl_SetControlCharSymbol 3298
+#define wxStyledTextCtrl_GetControlCharSymbol 3299
+#define wxStyledTextCtrl_WordPartLeft 3300
+#define wxStyledTextCtrl_WordPartLeftExtend 3301
+#define wxStyledTextCtrl_WordPartRight 3302
+#define wxStyledTextCtrl_WordPartRightExtend 3303
+#define wxStyledTextCtrl_SetVisiblePolicy 3304
+#define wxStyledTextCtrl_DelLineLeft 3305
+#define wxStyledTextCtrl_DelLineRight 3306
+#define wxStyledTextCtrl_GetXOffset 3307
+#define wxStyledTextCtrl_ChooseCaretX 3308
+#define wxStyledTextCtrl_SetXCaretPolicy 3309
+#define wxStyledTextCtrl_SetYCaretPolicy 3310
+#define wxStyledTextCtrl_GetPrintWrapMode 3311
+#define wxStyledTextCtrl_SetHotspotActiveForeground 3312
+#define wxStyledTextCtrl_SetHotspotActiveBackground 3313
+#define wxStyledTextCtrl_SetHotspotActiveUnderline 3314
+#define wxStyledTextCtrl_SetHotspotSingleLine 3315
+#define wxStyledTextCtrl_ParaDownExtend 3316
+#define wxStyledTextCtrl_ParaUp 3317
+#define wxStyledTextCtrl_ParaUpExtend 3318
+#define wxStyledTextCtrl_PositionBefore 3319
+#define wxStyledTextCtrl_PositionAfter 3320
+#define wxStyledTextCtrl_CopyRange 3321
+#define wxStyledTextCtrl_CopyText 3322
+#define wxStyledTextCtrl_SetSelectionMode 3323
+#define wxStyledTextCtrl_GetSelectionMode 3324
+#define wxStyledTextCtrl_LineDownRectExtend 3325
+#define wxStyledTextCtrl_LineUpRectExtend 3326
+#define wxStyledTextCtrl_CharLeftRectExtend 3327
+#define wxStyledTextCtrl_CharRightRectExtend 3328
+#define wxStyledTextCtrl_HomeRectExtend 3329
+#define wxStyledTextCtrl_VCHomeRectExtend 3330
+#define wxStyledTextCtrl_LineEndRectExtend 3331
+#define wxStyledTextCtrl_PageUpRectExtend 3332
+#define wxStyledTextCtrl_PageDownRectExtend 3333
+#define wxStyledTextCtrl_StutteredPageUp 3334
+#define wxStyledTextCtrl_StutteredPageUpExtend 3335
+#define wxStyledTextCtrl_StutteredPageDown 3336
+#define wxStyledTextCtrl_StutteredPageDownExtend 3337
+#define wxStyledTextCtrl_WordLeftEnd 3338
+#define wxStyledTextCtrl_WordLeftEndExtend 3339
+#define wxStyledTextCtrl_WordRightEnd 3340
+#define wxStyledTextCtrl_WordRightEndExtend 3341
+#define wxStyledTextCtrl_SetWhitespaceChars 3342
+#define wxStyledTextCtrl_SetCharsDefault 3343
+#define wxStyledTextCtrl_AutoCompGetCurrent 3344
+#define wxStyledTextCtrl_Allocate 3345
+#define wxStyledTextCtrl_FindColumn 3346
+#define wxStyledTextCtrl_GetCaretSticky 3347
+#define wxStyledTextCtrl_SetCaretSticky 3348
+#define wxStyledTextCtrl_ToggleCaretSticky 3349
+#define wxStyledTextCtrl_SetPasteConvertEndings 3350
+#define wxStyledTextCtrl_GetPasteConvertEndings 3351
+#define wxStyledTextCtrl_SelectionDuplicate 3352
+#define wxStyledTextCtrl_SetCaretLineBackAlpha 3353
+#define wxStyledTextCtrl_GetCaretLineBackAlpha 3354
+#define wxStyledTextCtrl_StartRecord 3355
+#define wxStyledTextCtrl_StopRecord 3356
+#define wxStyledTextCtrl_SetLexer 3357
+#define wxStyledTextCtrl_GetLexer 3358
+#define wxStyledTextCtrl_Colourise 3359
+#define wxStyledTextCtrl_SetProperty 3360
+#define wxStyledTextCtrl_SetKeyWords 3361
+#define wxStyledTextCtrl_SetLexerLanguage 3362
+#define wxStyledTextCtrl_GetProperty 3363
+#define wxStyledTextCtrl_GetStyleBitsNeeded 3364
+#define wxStyledTextCtrl_GetCurrentLine 3365
+#define wxStyledTextCtrl_StyleSetSpec 3366
+#define wxStyledTextCtrl_StyleSetFont 3367
+#define wxStyledTextCtrl_StyleSetFontAttr 3368
+#define wxStyledTextCtrl_StyleSetCharacterSet 3369
+#define wxStyledTextCtrl_StyleSetFontEncoding 3370
+#define wxStyledTextCtrl_CmdKeyExecute 3371
+#define wxStyledTextCtrl_SetMargins 3372
+#define wxStyledTextCtrl_GetSelection 3373
+#define wxStyledTextCtrl_PointFromPosition 3374
+#define wxStyledTextCtrl_ScrollToLine 3375
+#define wxStyledTextCtrl_ScrollToColumn 3376
+#define wxStyledTextCtrl_SetVScrollBar 3377
+#define wxStyledTextCtrl_SetHScrollBar 3378
+#define wxStyledTextCtrl_GetLastKeydownProcessed 3379
+#define wxStyledTextCtrl_SetLastKeydownProcessed 3380
+#define wxStyledTextCtrl_SaveFile 3381
+#define wxStyledTextCtrl_LoadFile 3382
+#define wxStyledTextCtrl_DoDragOver 3383
+#define wxStyledTextCtrl_DoDropText 3384
+#define wxStyledTextCtrl_GetUseAntiAliasing 3385
+#define wxStyledTextCtrl_AddTextRaw 3386
+#define wxStyledTextCtrl_InsertTextRaw 3387
+#define wxStyledTextCtrl_GetCurLineRaw 3388
+#define wxStyledTextCtrl_GetLineRaw 3389
+#define wxStyledTextCtrl_GetSelectedTextRaw 3390
+#define wxStyledTextCtrl_GetTextRangeRaw 3391
+#define wxStyledTextCtrl_SetTextRaw 3392
+#define wxStyledTextCtrl_GetTextRaw 3393
+#define wxStyledTextCtrl_AppendTextRaw 3394
+#define wxArtProvider_GetBitmap 3395
+#define wxArtProvider_GetIcon 3396
+#define wxTreeEvent_GetKeyCode 3397
+#define wxTreeEvent_GetItem 3398
+#define wxTreeEvent_GetKeyEvent 3399
+#define wxTreeEvent_GetLabel 3400
+#define wxTreeEvent_GetOldItem 3401
+#define wxTreeEvent_GetPoint 3402
+#define wxTreeEvent_IsEditCancelled 3403
+#define wxTreeEvent_SetToolTip 3404
+#define wxNotebookEvent_GetOldSelection 3405
+#define wxNotebookEvent_GetSelection 3406
+#define wxNotebookEvent_SetOldSelection 3407
+#define wxNotebookEvent_SetSelection 3408
+#define wxFileDataObject_new 3409
+#define wxFileDataObject_AddFile 3410
+#define wxFileDataObject_GetFilenames 3411
+#define wxFileDataObject_destroy 3412
+#define wxTextDataObject_new 3413
+#define wxTextDataObject_GetTextLength 3414
+#define wxTextDataObject_GetText 3415
+#define wxTextDataObject_SetText 3416
+#define wxTextDataObject_destroy 3417
+#define wxBitmapDataObject_new_1_1 3418
+#define wxBitmapDataObject_new_1_0 3419
+#define wxBitmapDataObject_GetBitmap 3420
+#define wxBitmapDataObject_SetBitmap 3421
+#define wxBitmapDataObject_destroy 3422
+#define wxClipboard_new 3424
+#define wxClipboard_destruct 3425
+#define wxClipboard_AddData 3426
+#define wxClipboard_Clear 3427
+#define wxClipboard_Close 3428
+#define wxClipboard_Flush 3429
+#define wxClipboard_GetData 3430
+#define wxClipboard_IsOpened 3431
+#define wxClipboard_Open 3432
+#define wxClipboard_SetData 3433
+#define wxClipboard_UsePrimarySelection 3435
+#define wxClipboard_IsSupported 3436
+#define wxClipboard_Get 3437
+#define wxSpinEvent_GetPosition 3438
+#define wxSpinEvent_SetPosition 3439
+#define wxSplitterWindow_new_0 3440
+#define wxSplitterWindow_new_2 3441
+#define wxSplitterWindow_destruct 3442
+#define wxSplitterWindow_Create 3443
+#define wxSplitterWindow_GetMinimumPaneSize 3444
+#define wxSplitterWindow_GetSashGravity 3445
+#define wxSplitterWindow_GetSashPosition 3446
+#define wxSplitterWindow_GetSplitMode 3447
+#define wxSplitterWindow_GetWindow1 3448
+#define wxSplitterWindow_GetWindow2 3449
+#define wxSplitterWindow_Initialize 3450
+#define wxSplitterWindow_IsSplit 3451
+#define wxSplitterWindow_ReplaceWindow 3452
+#define wxSplitterWindow_SetSashGravity 3453
+#define wxSplitterWindow_SetSashPosition 3454
+#define wxSplitterWindow_SetSashSize 3455
+#define wxSplitterWindow_SetMinimumPaneSize 3456
+#define wxSplitterWindow_SetSplitMode 3457
+#define wxSplitterWindow_SplitHorizontally 3458
+#define wxSplitterWindow_SplitVertically 3459
+#define wxSplitterWindow_Unsplit 3460
+#define wxSplitterWindow_UpdateSize 3461
+#define wxSplitterEvent_GetSashPosition 3462
+#define wxSplitterEvent_GetX 3463
+#define wxSplitterEvent_GetY 3464
+#define wxSplitterEvent_GetWindowBeingRemoved 3465
+#define wxSplitterEvent_SetSashPosition 3466
+#define wxHtmlWindow_new_0 3467
+#define wxHtmlWindow_new_2 3468
+#define wxHtmlWindow_AppendToPage 3469
+#define wxHtmlWindow_GetOpenedAnchor 3470
+#define wxHtmlWindow_GetOpenedPage 3471
+#define wxHtmlWindow_GetOpenedPageTitle 3472
+#define wxHtmlWindow_GetRelatedFrame 3473
+#define wxHtmlWindow_HistoryBack 3474
+#define wxHtmlWindow_HistoryCanBack 3475
+#define wxHtmlWindow_HistoryCanForward 3476
+#define wxHtmlWindow_HistoryClear 3477
+#define wxHtmlWindow_HistoryForward 3478
+#define wxHtmlWindow_LoadFile 3479
+#define wxHtmlWindow_LoadPage 3480
+#define wxHtmlWindow_SelectAll 3481
+#define wxHtmlWindow_SelectionToText 3482
+#define wxHtmlWindow_SelectLine 3483
+#define wxHtmlWindow_SelectWord 3484
+#define wxHtmlWindow_SetBorders 3485
+#define wxHtmlWindow_SetFonts 3486
+#define wxHtmlWindow_SetPage 3487
+#define wxHtmlWindow_SetRelatedFrame 3488
+#define wxHtmlWindow_SetRelatedStatusBar 3489
+#define wxHtmlWindow_ToText 3490
+#define wxHtmlWindow_destroy 3491
+#define wxHtmlLinkEvent_GetLinkInfo 3492
+#define wxSystemSettings_GetColour 3493
+#define wxSystemSettings_GetFont 3494
+#define wxSystemSettings_GetMetric 3495
+#define wxSystemSettings_GetScreenType 3496
+#define wxSystemOptions_GetOption 3497
+#define wxSystemOptions_GetOptionInt 3498
+#define wxSystemOptions_HasOption 3499
+#define wxSystemOptions_IsFalse 3500
+#define wxSystemOptions_SetOption_2_1 3501
+#define wxSystemOptions_SetOption_2_0 3502
+#define wxAuiNotebookEvent_SetSelection 3503
+#define wxAuiNotebookEvent_GetSelection 3504
+#define wxAuiNotebookEvent_SetOldSelection 3505
+#define wxAuiNotebookEvent_GetOldSelection 3506
+#define wxAuiNotebookEvent_SetDragSource 3507
+#define wxAuiNotebookEvent_GetDragSource 3508
+#define wxAuiManagerEvent_SetManager 3509
+#define wxAuiManagerEvent_GetManager 3510
+#define wxAuiManagerEvent_SetPane 3511
+#define wxAuiManagerEvent_GetPane 3512
+#define wxAuiManagerEvent_SetButton 3513
+#define wxAuiManagerEvent_GetButton 3514
+#define wxAuiManagerEvent_SetDC 3515
+#define wxAuiManagerEvent_GetDC 3516
+#define wxAuiManagerEvent_Veto 3517
+#define wxAuiManagerEvent_GetVeto 3518
+#define wxAuiManagerEvent_SetCanVeto 3519
+#define wxAuiManagerEvent_CanVeto 3520
+#define wxLogNull_new 3521
+#define wxLogNull_destroy 3522
+#define wxTaskBarIcon_new 3523
+#define wxTaskBarIcon_destruct 3524
+#define wxTaskBarIcon_PopupMenu 3525
+#define wxTaskBarIcon_RemoveIcon 3526
+#define wxTaskBarIcon_SetIcon 3527
+#define wxLocale_new_0 3528
+#define wxLocale_new_2 3530
+#define wxLocale_destruct 3531
+#define wxLocale_Init 3533
+#define wxLocale_AddCatalog_1 3534
+#define wxLocale_AddCatalog_3 3535
+#define wxLocale_AddCatalogLookupPathPrefix 3536
+#define wxLocale_GetCanonicalName 3537
+#define wxLocale_GetLanguage 3538
+#define wxLocale_GetLanguageName 3539
+#define wxLocale_GetLocale 3540
+#define wxLocale_GetName 3541
+#define wxLocale_GetString_2 3542
+#define wxLocale_GetString_4 3543
+#define wxLocale_GetHeaderValue 3544
+#define wxLocale_GetSysName 3545
+#define wxLocale_GetSystemEncoding 3546
+#define wxLocale_GetSystemEncodingName 3547
+#define wxLocale_GetSystemLanguage 3548
+#define wxLocale_IsLoaded 3549
+#define wxLocale_IsOk 3550
+#define wxActivateEvent_GetActive 3551
+#define wxPopupWindow_new_2 3553
+#define wxPopupWindow_new_0 3554
+#define wxPopupWindow_destruct 3556
+#define wxPopupWindow_Create 3557
+#define wxPopupWindow_Position 3558
+#define wxPopupTransientWindow_new_0 3559
+#define wxPopupTransientWindow_new_2 3560
+#define wxPopupTransientWindow_destruct 3561
+#define wxPopupTransientWindow_Popup 3562
+#define wxPopupTransientWindow_Dismiss 3563
diff --git a/lib/wx/c_src/wxePrintout.cpp b/lib/wx/c_src/wxe_callback_impl.cpp
index fc8782ba95..3a59004eb0 100644
--- a/lib/wx/c_src/wxePrintout.cpp
+++ b/lib/wx/c_src/wxe_callback_impl.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -20,9 +20,60 @@
#include <wx/wx.h>
#include "wxe_impl.h"
#include "wxe_return.h"
+#include "wxe_events.h"
+#include "wxe_gl.h"
#include "gen/wxe_macros.h"
#include "gen/wxe_derived_dest.h"
+
+/* ****************************************************************************
+ * CallbackData *
+ * ****************************************************************************/
+
+wxeEvtListener::wxeEvtListener(ErlDrvTermData caller, int req, char *req_type,
+ int funcb, int skip_ev, wxeErlTerm * userData,
+ ErlDrvTermData from_port)
+ : wxEvtHandler()
+{
+ port=from_port;
+ listener = caller;
+ obj = req;
+ fun_id = funcb;
+ strcpy(class_name, req_type);
+ skip = skip_ev;
+ user_data = userData;
+}
+
+wxeEvtListener::~wxeEvtListener() {
+ // fprintf(stderr, "CBD Deleteing %p %s\r\n", this, class_name); fflush(stderr);
+ if(user_data) {
+ delete user_data;
+ }
+ ptrMap::iterator it;
+ it = ((WxeApp *)wxTheApp)->ptr2ref.find(this);
+ if(it != ((WxeApp *)wxTheApp)->ptr2ref.end()) {
+ wxeRefData *refd = it->second;
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, refd->memenv->owner, false);
+ rt.addAtom("wx_delete_cb");
+ rt.addInt(fun_id);
+ rt.addRef(refd->ref, "wxeEvtListener");
+ rt.addRef(obj, class_name);
+ rt.addTupleCount(4);
+ rt.send();
+ }
+ ((WxeApp *)wxTheApp)->clearPtr(this);
+}
+
+void wxeEvtListener::forward(wxEvent& event)
+{
+#ifdef DEBUG
+ if(!sendevent(&event, port))
+ fprintf(stderr, "Couldn't send event!\r\n");
+#else
+sendevent(&event, port);
+#endif
+}
+
/* *****************************************************************/
/* Special Class impls */
@@ -228,6 +279,35 @@ EwxListCtrl::~EwxListCtrl() {
clear_cb(port, onGetItemColumnImage);
((WxeApp *)wxTheApp)->clearPtr(this);
}
+
+/* ****************************************************************************
+ * wxListCtrlCompare wrapper
+ * ****************************************************************************/
+
+int wxCALLBACK wxEListCtrlCompare(wxeIntPtr item1, wxeIntPtr item2, wxeIntPtr callbackInfoPtr)
+{
+ callbackInfo * cb = (callbackInfo *)callbackInfoPtr;
+ wxeMemEnv * memenv = ((WxeApp *) wxTheApp)->getMemEnv(cb->port);
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, memenv->owner, false);
+ rt.addInt(cb->callbackID);
+ rt.addInt(item1);
+ rt.addInt(item2);
+ rt.endList(2);
+ rt.addAtom("_wx_invoke_cb_");
+ rt.addTupleCount(3);
+ rt.send();
+ handle_event_callback(WXE_DRV_PORT_HANDLE, memenv->owner);
+
+ if(((WxeApp *) wxTheApp)->cb_buff) {
+ int res = * (int*) ((WxeApp *) wxTheApp)->cb_buff;
+ driver_free(((WxeApp *) wxTheApp)->cb_buff);
+ ((WxeApp *) wxTheApp)->cb_buff = NULL;
+ return res;
+ }
+ return 0;
+}
+
+
// tools
void clear_cb(ErlDrvTermData port, int callback)
diff --git a/lib/wx/c_src/wxe_callback_impl.h b/lib/wx/c_src/wxe_callback_impl.h
new file mode 100644
index 0000000000..ecfcd3db41
--- /dev/null
+++ b/lib/wx/c_src/wxe_callback_impl.h
@@ -0,0 +1,100 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifndef _WXE_CALLBACK_IMPL_H
+#define _WXE_CALLBACK_IMPL_H
+
+void pre_callback();
+void handle_event_callback(ErlDrvPort port, ErlDrvTermData process);
+
+#if wxCHECK_VERSION(2,9,0)
+ #define wxeIntPtr wxIntPtr
+#else
+ // This is bad but how it was in wx-2.8
+ #define wxeIntPtr long
+#endif
+
+/* Fun Callback id */
+class wxeEvtListener : public wxEvtHandler
+{
+public:
+ wxeEvtListener(ErlDrvTermData caller, int req, char *req_type,
+ int funcb, int skip_ev, wxeErlTerm * userData,
+ ErlDrvTermData Thisport);
+ ~wxeEvtListener();
+ void forward(wxEvent& event);
+ ErlDrvTermData port;
+ ErlDrvTermData listener;
+ int fun_id;
+ int obj;
+ char class_name[40];
+ int skip;
+ wxeErlTerm * user_data;
+};
+
+class wxEPrintout : public wxPrintout
+{
+ public:
+ wxEPrintout(wxString Title, int onPrintP, int onPrepareP,
+ int onBeginP, int onEndP,
+ int onBeginD, int onEndD,
+ int hasP, int getPageI, ErlDrvTermData Port) :
+ wxPrintout(Title),
+ onPrintPage(onPrintP), onPreparePrinting(onPrepareP),
+ onBeginPrinting(onBeginP), onEndPrinting(onEndP),
+ onBeginDocument(onBeginD), onEndDocument(onEndD), hasPage(hasP), getPageInfo(getPageI),
+ port(Port)
+ { } ;
+
+ ~wxEPrintout();
+
+ bool OnBeginDocument(int startPage, int endPage);
+ void OnEndDocument();
+ void OnBeginPrinting();
+ void OnEndPrinting();
+
+ void OnPreparePrinting();
+
+ bool HasPage(int page);
+ bool OnPrintPage(int page);
+ void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
+
+ int onPrintPage;
+ int onPreparePrinting;
+ int onBeginPrinting;
+ int onEndPrinting;
+ int onBeginDocument;
+ int onEndDocument;
+ int hasPage;
+ int getPageInfo;
+
+ ErlDrvTermData port;
+};
+
+void clear_cb(ErlDrvTermData port, int callback);
+
+// Implementation of wxListCtrlCompare
+struct callbackInfo {
+ ErlDrvTermData port;
+ int callbackID;
+};
+
+int wxCALLBACK wxEListCtrlCompare(wxeIntPtr item1, wxeIntPtr item2, wxeIntPtr callbackInfoPtr);
+
+#endif
diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c
index 4d3aa577bf..ea52737fa2 100644
--- a/lib/wx/c_src/wxe_driver.c
+++ b/lib/wx/c_src/wxe_driver.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -195,7 +195,7 @@ void wxe_process_died(ErlDrvData handle, ErlDrvMonitor *monitor)
{
/* Callback is active for the dead process */
wxe_data *sd = ((wxe_data *)handle);
- push_command(WXE_CB_RETURN,NULL,0,sd);
+ push_command(WXE_CB_DIED,NULL,0,sd);
/* ErlDrvTermData pid; */
/* pid = driver_get_monitored_process(sd->port_handle, monitor); */
diff --git a/lib/wx/c_src/wxe_driver.h b/lib/wx/c_src/wxe_driver.h
index 0f0143bd4c..e35bbe2118 100644
--- a/lib/wx/c_src/wxe_driver.h
+++ b/lib/wx/c_src/wxe_driver.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -89,6 +89,7 @@ extern char * erl_wx_privdir;
#define WXE_BIN_INCR 11
#define WXE_BIN_DECR 12
#define WXE_INIT_OPENGL 13
+#define WXE_CB_DIED 14
#define OPENGL_START 5000
diff --git a/lib/wx/c_src/wxe_events.h b/lib/wx/c_src/wxe_events.h
index 718e0ad120..93b5551123 100644
--- a/lib/wx/c_src/wxe_events.h
+++ b/lib/wx/c_src/wxe_events.h
@@ -1,20 +1,20 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
- * %CopyrightEnd%
+ *
+ * %CopyrightEnd%
*/
#ifndef __WXE_EVENT_H__
@@ -22,6 +22,8 @@
#include "wxe_driver.h"
+bool sendevent(wxEvent * event, ErlDrvTermData port);
+
class wxeEtype
{
public:
@@ -30,38 +32,7 @@ public:
int cID;
};
-/* One EvtListener per listening erlang process */
-/* If callbacks are used the receiver is wxe_master process */
-/* and a wxeEvtListener pre callback is registered */
-class wxeEvtListener : public wxEvtHandler
-{
- public:
- wxeEvtListener(ErlDrvTermData Thisport) : port(Thisport)
- {}
- // {fprintf(stderr, "Creating %x\r\n", (unsigned int) this); fflush(stderr);}
- ~wxeEvtListener() {}
- void forward(wxEvent& event);
- ErlDrvTermData port;
-};
-
void initEventTable();
int wxeEventTypeFromAtom(char *etype_atom);
-/* Fun Callback id */
-class wxeCallbackData : public wxObject
-{
-public:
- wxeCallbackData(ErlDrvTermData caller, int req, char *req_type,
- int funcb, int skip_ev, wxeErlTerm * userData,
- wxeEvtListener *handler_cb);
- ~wxeCallbackData();
- wxeEvtListener * handler;
- ErlDrvTermData listener;
- int fun_id;
- int obj;
- char class_name[40];
- int skip;
- wxeErlTerm * user_data;
-};
-
#endif
diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp
index 34904397d3..a9feb23831 100644
--- a/lib/wx/c_src/wxe_gl.cpp
+++ b/lib/wx/c_src/wxe_gl.cpp
@@ -1,20 +1,20 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
- * %CopyrightEnd%
+ *
+ * %CopyrightEnd%
*/
#include <stdio.h>
@@ -26,8 +26,9 @@
#endif
#include "wxe_impl.h"
#include "wxe_return.h"
+#include "wxe_gl.h"
-/* ****************************************************************************
+/* ****************************************************************************
* Opengl context management *
* ****************************************************************************/
@@ -138,7 +139,7 @@ void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){
else {
ErlDrvTermData rt[] = // Error msg
{ERL_DRV_ATOM, driver_mk_atom((char *) "_egl_error_"),
- ERL_DRV_INT, op,
+ ERL_DRV_INT, (ErlDrvTermData) op,
ERL_DRV_ATOM, driver_mk_atom((char *) "no_gl_context"),
ERL_DRV_TUPLE,3};
erl_drv_send_term(WXE_DRV_PORT,caller,rt,8);
diff --git a/lib/wx/c_src/wxe_gl.h b/lib/wx/c_src/wxe_gl.h
index 1b556ff4ec..dc117bf610 100644
--- a/lib/wx/c_src/wxe_gl.h
+++ b/lib/wx/c_src/wxe_gl.h
@@ -1,22 +1,35 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
- * %CopyrightEnd%
+ *
+ * %CopyrightEnd%
*/
+#ifndef _WXE_GL_H
+#define _WXE_GL_H
+
#include "egl_impl.h"
+#include "wxe_return.h"
+void activateGL(ErlDrvTermData caller);
+void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas);
+void deleteActiveGL(wxGLCanvas *canvas);
void wxe_initOpenGL(wxeReturn, char*);
+void gl_dispatch(int op, char *bp, ErlDrvTermData caller, WXEBinRef *bins[]);
+
+WX_DECLARE_HASH_MAP(ErlDrvTermData, wxGLCanvas*, wxIntegerHash, wxIntegerEqual, wxeGLC);
+extern wxeGLC glc;
+
+#endif
diff --git a/lib/wx/c_src/wxe_helpers.cpp b/lib/wx/c_src/wxe_helpers.cpp
new file mode 100644
index 0000000000..15d75080d9
--- /dev/null
+++ b/lib/wx/c_src/wxe_helpers.cpp
@@ -0,0 +1,95 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#include <wx/wx.h>
+#include "wxe_impl.h"
+
+/* ****************************************************************************
+ * Erlang Commands
+ * ****************************************************************************/
+
+wxeCommand::wxeCommand(int fc,char * cbuf,int buflen, wxe_data *sd)
+ : wxObject()
+{
+ WXEBinRef *temp, *start, *prev;
+ int n = 0;
+ ref_count = 1;
+ caller = driver_caller(sd->port_handle);
+ port = sd->port;
+ op = fc;
+ len = buflen;
+ bin[0] = NULL;
+ bin[1] = NULL;
+ bin[2] = NULL;
+
+ if(cbuf) {
+ buffer = (char *) driver_alloc(len);
+ memcpy((void *) buffer, (void *) cbuf, len);;
+
+ temp = sd->bin;
+
+ prev = NULL;
+ start = temp;
+
+ while(temp) {
+ if(caller == temp->from) {
+ bin[n++] = temp;
+ if(prev) {
+ prev->next = temp->next;
+ } else {
+ start = temp->next;
+ }
+ temp = temp->next;
+ } else {
+ prev = temp;
+ temp = temp->next;
+ }
+ }
+ sd->bin = start;
+ } else { // No-op only PING currently
+ buffer = NULL;
+ }
+}
+
+wxeCommand::~wxeCommand() {
+ int n = 0;
+ if(buffer) {
+ while(bin[n]) {
+ if(bin[n]->bin)
+ driver_free_binary(bin[n]->bin);
+ driver_free(bin[n++]);
+ }
+ driver_free(buffer);
+ }
+}
+
+/* ****************************************************************************
+ * TreeItemData
+ * ****************************************************************************/
+
+wxETreeItemData::wxETreeItemData(int sz, char * data) {
+ size = sz;
+ bin = (char *) driver_alloc(sz);
+ memcpy(bin, data, sz);
+}
+
+wxETreeItemData::~wxETreeItemData()
+{
+ driver_free(bin);
+}
diff --git a/lib/wx/c_src/wxe_helpers.h b/lib/wx/c_src/wxe_helpers.h
new file mode 100644
index 0000000000..659bc666c6
--- /dev/null
+++ b/lib/wx/c_src/wxe_helpers.h
@@ -0,0 +1,122 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifndef _WXE_HELPER_H
+#define _WXE_HELPER_H
+
+DECLARE_EVENT_TYPE(wxeEVT_META_COMMAND, -1)
+
+class wxeMetaCommand : public wxEvent
+{
+ public:
+ wxeMetaCommand(wxe_data *sd, int EvId)
+ : wxEvent(EvId, wxeEVT_META_COMMAND)
+ { caller = driver_caller(sd->port_handle); port = sd->port; pdl = sd->pdl; } ;
+ wxeMetaCommand(const wxeMetaCommand& event)
+ : wxEvent(event)
+ { caller = event.caller; port = event.port; pdl = event.pdl; };
+ virtual ~wxeMetaCommand() {};
+ virtual wxEvent *Clone() const { return new wxeMetaCommand(*this); }
+
+ ErlDrvTermData caller;
+ ErlDrvTermData port;
+ ErlDrvPDL pdl;
+};
+
+class wxeCommand : public wxObject
+{
+ public:
+ wxeCommand(int fc,char * cbuf,int buflen, wxe_data *);
+ virtual ~wxeCommand(); // Use Delete()
+
+ wxeCommand * Save() {ref_count++; return this; };
+ void Delete() {if(--ref_count < 1) delete this;};
+
+ ErlDrvTermData caller;
+ ErlDrvTermData port;
+ WXEBinRef * bin[3];
+ char * buffer;
+ int len;
+ int op;
+ int ref_count;
+};
+
+class intListElement {
+ public:
+ intListElement(int Element) {car = Element; cdr = NULL;};
+ intListElement(int Element, intListElement *list)
+ {car = Element; cdr = list;};
+ int car;
+ intListElement *cdr;
+};
+
+class intList {
+ public:
+ intList() {list = NULL;};
+ ~intList() {
+ intListElement *head = list;
+ while(head) {
+ intListElement *tail=head->cdr;
+ delete head;
+ head = tail;
+ } };
+ bool IsEmpty() {return list == NULL;};
+ void Append(int Element) { list = new intListElement(Element, list); };
+ int Pop() {
+ intListElement *temp = list;
+ int res = list->car;
+ list = temp->cdr;
+ delete temp;
+ return res;
+ }
+ intListElement *list;
+};
+
+class wxe_badarg
+{
+ public:
+ wxe_badarg(int Ref) : ref(Ref) { } ;
+ int ref;
+};
+
+class wxeErlTerm : public wxClientData
+{
+ public:
+ wxeErlTerm(WXEBinRef * data)
+ {
+ size = data->size;
+ bin = (char *) driver_alloc(size);
+ memcpy(bin, data->base, size);
+ } ;
+ ~wxeErlTerm() { driver_free(bin); };
+ char * bin;
+ int size;
+};
+
+class wxETreeItemData : public wxTreeItemData
+{
+ public:
+ wxETreeItemData(int sz, char * data);
+ ~wxETreeItemData();
+
+ int size;
+ char * bin;
+};
+
+#endif
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index cc9bcc9957..0ee52e3af2 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -23,10 +23,6 @@
#include <wx/wx.h>
-#if defined(_WIN32)
-#include <wx/msw/private.h> // for wxSetInstance
-#endif
-
// Avoid including these in dcbuffer below
#include "wx/dcmemory.h"
#include "wx/dcclient.h"
@@ -34,12 +30,12 @@
// Ok ugly but needed for wxBufferedDC crash workaround
#define private public
#include <wx/dcbuffer.h>
-
#undef private
#include "wxe_impl.h"
#include "wxe_events.h"
#include "wxe_return.h"
+#include "wxe_gl.h"
IMPLEMENT_APP_NO_MAIN(WxeApp)
@@ -47,120 +43,21 @@ DECLARE_APP(WxeApp)
DEFINE_EVENT_TYPE(wxeEVT_META_COMMAND)
-#define WXE_NOT_INITIATED 0
-#define WXE_INITIATED 1
-#define WXE_EXITED 2
-#define WXE_ERROR -1
-
#define WXE_NORMAL 0
#define WXE_CALLBACK 1
#define WXE_STORED 2
-ErlDrvTid wxe_thread;
-
-ErlDrvMutex *wxe_status_m;
-ErlDrvCond *wxe_status_c;
-
-ErlDrvMutex * wxe_batch_locker_m;
-ErlDrvCond * wxe_batch_locker_c;
-
-static int wxe_status = WXE_NOT_INITIATED;
+// Globals initiated in wxe_init.cpp
+extern ErlDrvMutex *wxe_status_m;
+extern ErlDrvCond *wxe_status_c;
+extern ErlDrvMutex * wxe_batch_locker_m;
+extern ErlDrvCond * wxe_batch_locker_c;
+extern ErlDrvTermData init_caller;
+extern int wxe_status;
wxList * wxe_batch = NULL;
wxList * wxe_batch_cb_saved = NULL;
-
-ErlDrvTermData wxe_batch_caller = 0;
-ErlDrvTermData init_caller = 0;
-
-// extern opengl
-void gl_dispatch(int op, char *bp, ErlDrvTermData caller, WXEBinRef *bins[]);
-
-
-// Until fixed in emulator
-#ifndef _WIN32
-extern "C" {
-extern void erts_thread_disable_fpe(void);
-}
-#endif
-
-#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
-#define __DARWIN__ 1
-#endif
-
-#ifdef __DARWIN__
-extern "C" {
- int erl_drv_stolen_main_thread_join(ErlDrvTid tid, void **respp);
- int erl_drv_steal_main_thread(char *name,
- ErlDrvTid *dtid,
- void* (*func)(void*),
- void* arg,
- ErlDrvThreadOpts *opts);
-}
-#endif
-
-void *wxe_main_loop(void * );
-
-/* ************************************************************
- * START AND STOP of driver thread
- * ************************************************************/
-
-int load_native_gui()
-{
- return 1;
-}
-
-int start_native_gui(wxe_data *sd)
-{
- int res;
- wxe_status_m = erl_drv_mutex_create((char *) "wxe_status_m");
- wxe_status_c = erl_drv_cond_create((char *)"wxe_status_c");
-
- wxe_batch_locker_m = erl_drv_mutex_create((char *)"wxe_batch_locker_m");
- wxe_batch_locker_c = erl_drv_cond_create((char *)"wxe_batch_locker_c");
- init_caller = driver_connected(sd->port_handle);
-
-#ifdef __DARWIN__
- res = erl_drv_steal_main_thread((char *)"wxwidgets",
- &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
-#else
- res = erl_drv_thread_create((char *)"wxwidgets",
- &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
-#endif
- if(res == 0) {
- erl_drv_mutex_lock(wxe_status_m);
- for(;wxe_status == WXE_NOT_INITIATED;) {
- erl_drv_cond_wait(wxe_status_c, wxe_status_m);
- }
- erl_drv_mutex_unlock(wxe_status_m);
- return wxe_status;
- } else {
- wxString msg;
- msg.Printf(wxT("Erlang failed to create wxe-thread %d\r\n"), res);
- send_msg("error", &msg);
- return -1;
- }
-}
-
-void stop_native_gui(wxe_data *sd)
-{
- if(wxe_status == WXE_INITIATED) {
- meta_command(WXE_SHUTDOWN, sd);
- }
-#ifdef __DARWIN__
- erl_drv_stolen_main_thread_join(wxe_thread, NULL);
-#else
- erl_drv_thread_join(wxe_thread, NULL);
-#endif
- erl_drv_mutex_destroy(wxe_status_m);
- erl_drv_cond_destroy(wxe_status_c);
- erl_drv_mutex_destroy(wxe_batch_locker_m);
- erl_drv_cond_destroy(wxe_batch_locker_c);
-}
-
-void unload_native_gui()
-{
-
-}
+int wxe_batch_caller = 0; // inside batch if larger than 0
/* ************************************************************
* Commands from erlang
@@ -169,7 +66,8 @@ void unload_native_gui()
void push_command(int op,char * buf,int len, wxe_data *sd)
{
- // fprintf(stderr, "Op %d %d\r\n", op, (int) driver_caller(sd->port_handle)),fflush(stderr);
+ /* fprintf(stderr, "Op %d %d [%ld] %d\r\n", op, (int) driver_caller(sd->port_handle),
+ wxe_batch->size(), wxe_batch_caller),fflush(stderr); */
wxeCommand *Cmd = new wxeCommand(op, buf, len, sd);
erl_drv_mutex_lock(wxe_batch_locker_m);
wxe_batch->Append(Cmd);
@@ -206,60 +104,19 @@ void meta_command(int what, wxe_data *sd) {
}
}
-/* ************************************************************
- * wxWidgets Thread
- * ************************************************************/
-
-void *wxe_main_loop(void *vpdl)
-{
- int result;
- int argc = 1;
- char * temp = (char *) "Erlang";
- char * argv[] = {temp,NULL};
- ErlDrvPDL pdl = (ErlDrvPDL) vpdl;
-
- driver_pdl_inc_refc(pdl);
-
- // Disable floating point execption if they are on.
- // This should be done in emulator but it's not in yet.
-#ifndef _WIN32
- erts_thread_disable_fpe();
-#else
- // Setup that wxWidgets should look for cursors and icons in
- // this dll and not in werl.exe (which is the default)
- HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver"));
- wxSetInstance((HINSTANCE) WXEHandle);
-#endif
-
- wxe_ps_init();
- result = wxEntry(argc, argv);
- // fprintf(stderr, "WXWidgets quits main loop %d \r\n", result);
- if(result >= 0 && wxe_status == WXE_INITIATED) {
- /* We are done try to make a clean exit */
- wxe_status = WXE_EXITED;
- driver_pdl_dec_refc(pdl);
-#ifndef __DARWIN__
- erl_drv_thread_exit(NULL);
-#endif
- return NULL;
- } else {
- erl_drv_mutex_lock(wxe_status_m);
- wxe_status = WXE_ERROR;
- erl_drv_cond_signal(wxe_status_c);
- erl_drv_mutex_unlock(wxe_status_m);
- driver_pdl_dec_refc(pdl);
- return NULL;
- }
-}
-
-void WxeApp::dummy_close(wxEvent& Ev) {
- // fprintf(stderr, "Dummy Close invoked\r\n");
- // wxMac really wants a top level window which command-q quits if there are no
- // windows open, and this will kill the erlang, override default handling
+void send_msg(const char * type, const wxString * msg) {
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, init_caller);
+ rt.addAtom((char *) "wxe_driver");
+ rt.addAtom((char *) type);
+ rt.add(msg);
+ rt.addTupleCount(3);
+ rt.send();
}
+/* ************************************************************
+ * Init WxeApp the application emulator
+ * ************************************************************/
-// Init wx-widgets thread
bool WxeApp::OnInit()
{
@@ -267,6 +124,9 @@ bool WxeApp::OnInit()
wxe_batch = new wxList;
wxe_batch_cb_saved = new wxList;
cb_buff = NULL;
+ recurse_level = 0;
+ delayed_cleanup = new wxList;
+ delayed_delete = new wxList;
wxe_ps_init2();
// wxIdleEvent::SetMode(wxIDLE_PROCESS_SPECIFIED); // Hmm printpreview doesn't work in 2.9 with this
@@ -300,17 +160,27 @@ bool WxeApp::OnInit()
return TRUE;
}
+
+#ifdef _MACOSX
+void WxeApp::MacOpenFile(const wxString &filename) {
+ send_msg("open_file", &filename);
+}
+#endif
+
void WxeApp::shutdown(wxeMetaCommand& Ecmd) {
ExitMainLoop();
}
-void send_msg(const char * type, wxString * msg) {
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, init_caller);
- rt.addAtom((char *) "wxe_driver");
- rt.addAtom((char *) type);
- rt.add(msg);
- rt.addTupleCount(3);
- rt.send();
+void WxeApp::dummy_close(wxEvent& Ev) {
+ // fprintf(stderr, "Dummy Close invoked\r\n");
+ // wxMac really wants a top level window which command-q quits if there are no
+ // windows open, and this will kill the erlang, override default handling
+}
+
+// Called by wx thread
+void WxeApp::idle(wxIdleEvent& event) {
+ event.Skip(true);
+ dispatch_cmds();
}
/* ************************************************************
@@ -327,29 +197,51 @@ void handle_event_callback(ErlDrvPort port, ErlDrvTermData process)
{
WxeApp * app = (WxeApp *) wxTheApp;
ErlDrvMonitor monitor;
- driver_monitor_process(port, process, &monitor);
- // Should we be able to handle commands when recursing? probably
- erl_drv_mutex_lock(wxe_batch_locker_m);
- //fprintf(stderr, "\r\nCB EV Start %lu \r\n", process);fflush(stderr);
- app->dispatch_cb(wxe_batch, wxe_batch_cb_saved, process);
- //fprintf(stderr, "CB EV done %lu \r\n", process);fflush(stderr);
- wxe_batch_caller = 0;
- erl_drv_mutex_unlock(wxe_batch_locker_m);
- driver_demonitor_process(port, &monitor);
-}
-
-// Called by wx thread
-void WxeApp::idle(wxIdleEvent& event) {
- event.Skip(true);
- dispatch_cmds();
+ // Is thread safe if pdl have been incremented
+ if(driver_monitor_process(port, process, &monitor) == 0) {
+ // Should we be able to handle commands when recursing? probably
+ erl_drv_mutex_lock(wxe_batch_locker_m);
+ //fprintf(stderr, "\r\nCB EV Start %lu \r\n", process);fflush(stderr);
+ app->recurse_level++;
+ app->dispatch_cb(wxe_batch, wxe_batch_cb_saved, process);
+ app->recurse_level--;
+ //fprintf(stderr, "CB EV done %lu \r\n", process);fflush(stderr);
+ wxe_batch_caller = 0;
+ erl_drv_mutex_unlock(wxe_batch_locker_m);
+ driver_demonitor_process(port, &monitor);
+ }
}
-void WxeApp::dispatch_cmds() {
+void WxeApp::dispatch_cmds()
+{
erl_drv_mutex_lock(wxe_batch_locker_m);
+ recurse_level++;
int level = dispatch(wxe_batch_cb_saved, 0, WXE_STORED);
dispatch(wxe_batch, level, WXE_NORMAL);
+ recurse_level--;
wxe_batch_caller = 0;
erl_drv_mutex_unlock(wxe_batch_locker_m);
+ // Cleanup old memenv's and deleted objects
+ if(recurse_level == 0) {
+ if(delayed_delete->size() > 0)
+ for( wxList::compatibility_iterator node = delayed_delete->GetFirst();
+ node;
+ node = delayed_delete->GetFirst()) {
+ wxeCommand *event = (wxeCommand *)node->GetData();
+ delayed_delete->Erase(node);
+ wxe_dispatch(*event);
+ event->Delete();
+ }
+ if(delayed_cleanup->size() > 0)
+ for( wxList::compatibility_iterator node = delayed_cleanup->GetFirst();
+ node;
+ node = delayed_cleanup->GetFirst()) {
+ wxeMetaCommand *event = (wxeMetaCommand *)node->GetData();
+ delayed_cleanup->Erase(node);
+ destroyMemEnv(*event);
+ delete event;
+ }
+ }
}
// Should have erl_drv_mutex_lock(wxe_batch_locker_m);
@@ -401,7 +293,7 @@ int WxeApp::dispatch(wxList * batch, int blevel, int list_type)
erl_drv_mutex_lock(wxe_batch_locker_m);
break;
}
- delete event;
+ event->Delete();
}
} else {
if((list_type == WXE_STORED) || (blevel <= 0 && list_type == WXE_NORMAL)) {
@@ -433,6 +325,7 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
// fprintf(stderr, " Ev %d %lu\r\n", event->op, event->caller);
if(event->caller == process || // Callbacks from CB process only
event->op == WXE_CB_START || // Event callback start change process
+ event->op == WXE_CB_DIED || // Event callback process died
// Allow connect_cb during CB i.e. msg from wxe_server.
(memenv && event->caller == memenv->owner))
{
@@ -445,7 +338,8 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
if(event->len > 0) {
cb_buff = (char *) driver_alloc(event->len);
memcpy(cb_buff, event->buffer, event->len);
- }
+ } // continue
+ case WXE_CB_DIED:
callback_returned = 1;
return;
case WXE_CB_START:
@@ -480,7 +374,7 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
return;
break;
}
- delete event;
+ event->Delete();
} else {
// fprintf(stderr, " save %d \r\n", event->op);
temp->Append(event);
@@ -517,12 +411,20 @@ void WxeApp::newMemEnv(wxeMetaCommand& Ecmd) {
erl_drv_send_term(WXE_DRV_PORT,Ecmd.caller,rt,2);
}
-void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
+void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
+{
// Clear incoming cmd queue first
// dispatch_cmds();
wxWindow *parent = NULL;
wxeMemEnv * memenv = refmap[Ecmd.port];
+ if(!memenv) {
+ wxString msg;
+ msg.Printf(wxT("MemEnv already deleted"));
+ send_msg("debug", &msg);
+ return;
+ }
+
if(wxe_debug) {
wxString msg;
msg.Printf(wxT("Destroying all memory "));
@@ -536,26 +438,33 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
ptrMap::iterator it = ptr2ref.find(ptr);
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
- if(refd->alloc_in_erl) {
- if(refd->type == 2) {
- wxDialog *win = (wxDialog *) ptr;
- if(win->IsModal()) {
- win->EndModal(-1);
- }
- parent = win->GetParent();
- if(parent) {
- ptrMap::iterator parentRef = ptr2ref.find(parent);
- if(parentRef == ptr2ref.end()) {
- // The parent is already dead delete the parent ref
- win->SetParent(NULL);
- }
+ if(refd->alloc_in_erl && refd->type == 2) {
+ wxDialog *win = (wxDialog *) ptr;
+ if(win->IsModal()) {
+ win->EndModal(-1);
+ }
+ parent = win->GetParent();
+ if(parent) {
+ ptrMap::iterator parentRef = ptr2ref.find(parent);
+ if(parentRef == ptr2ref.end()) {
+ // The parent is already dead delete the parent ref
+ win->SetParent(NULL);
}
+ }
+ if(recurse_level > 0) {
+ // Delay delete until we are out of dispatch*
+ } else {
delete win;
}
}
}
}
}
+
+ if(recurse_level > 0) {
+ delayed_cleanup->Append(Ecmd.Clone());
+ return;
+ }
// First pass, delete all top parents/windows of all linked objects
// fprintf(stderr, "close port %x\r\n", Ecmd.port);fflush(stderr);
@@ -591,20 +500,20 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
if(refd->alloc_in_erl) {
- int type = refd->type;
- if((refd->type == 1) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
+ if((refd->type == 4) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround
}
wxString msg;
- if((refd->type == 0)) { // Maybe also class 1
+ bool cleanup_ref=true;
+ if(refd->type == 0) { // Maybe also class 1
wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo();
msg.Printf(wxT("Memory leak: {wx_ref, %d, %s}"),
refd->ref, cinfo->GetClassName());
send_msg("error", &msg);
} else {
- delete_object(ptr, refd);
+ cleanup_ref = delete_object(ptr, refd);
}
- if(type == 0 || type > 2) {
+ if(cleanup_ref) {
// Delete refs for leaks and non overridden allocs
delete refd;
ptr2ref.erase(it);
@@ -630,6 +539,17 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
refmap.erase((ErlDrvTermData) Ecmd.port);
}
+
+wxeRefData * WxeApp::getRefData(void *ptr) {
+ ptrMap::iterator it = ptr2ref.find(ptr);
+ if(it != ptr2ref.end()) {
+ wxeRefData *refd = it->second;
+ return refd;
+ }
+ return NULL;
+}
+
+
wxeMemEnv * WxeApp::getMemEnv(ErlDrvTermData port) {
return refmap[port];
}
@@ -712,7 +632,7 @@ void WxeApp::clearPtr(void * ptr) {
if(((int) refd->pid) != -1) {
// Send terminate pid to owner
- wxeReturn rt = wxeReturn(WXE_DRV_PORT,refd->memenv->owner, false);
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT,refd->pid, false);
rt.addAtom("_wxe_destroy_");
rt.add(ERL_DRV_PID, refd->pid);
rt.addTupleCount(2);
@@ -780,161 +700,3 @@ void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
};
throw wxe_badarg(index);
}
-
-
-/* ************************************************************
- * Misc utility classes
- * ************************************************************/
-
-/* ****************************************************************************
- * Memory handling
- * ****************************************************************************/
-
-wxeMemEnv::wxeMemEnv() {
- ref2ptr = (void **) driver_alloc(128*sizeof(void *));
- ref2ptr[0] = NULL;
- next = 1;
- max = 128;
-}
-
-wxeMemEnv::~wxeMemEnv() {
- driver_free(ref2ptr);
-}
-
-/* ****************************************************************************
- * Erlang Commands (don't need to be derived of wxEvent anymore should
- * be re-written to own class struct)
- * ****************************************************************************/
-
-wxeCommand::wxeCommand(int fc,char * cbuf,int buflen, wxe_data *sd)
- : wxObject()
-{
- WXEBinRef *temp, *start, *prev;
- int n = 0;
- caller = driver_caller(sd->port_handle);
- port = sd->port;
- op = fc;
- len = buflen;
- bin[0] = NULL;
- bin[1] = NULL;
- bin[2] = NULL;
-
- if(cbuf) {
- buffer = (char *) driver_alloc(len);
- memcpy((void *) buffer, (void *) cbuf, len);;
-
- temp = sd->bin;
-
- prev = NULL;
- start = temp;
-
- while(temp) {
- if(caller == temp->from) {
- bin[n++] = temp;
- if(prev) {
- prev->next = temp->next;
- } else {
- start = temp->next;
- }
- temp = temp->next;
- } else {
- prev = temp;
- temp = temp->next;
- }
- }
- sd->bin = start;
- } else { // No-op only PING currently
- buffer = NULL;
- }
-}
-
-wxeCommand::~wxeCommand() {
- int n = 0;
- if(buffer) {
- while(bin[n]) {
- if(bin[n]->bin)
- driver_free_binary(bin[n]->bin);
- driver_free(bin[n++]);
- }
- driver_free(buffer);
- }
-}
-
-/* ****************************************************************************
- * TreeItemData
- * ****************************************************************************/
-
-wxETreeItemData::wxETreeItemData(int sz, char * data) {
- size = sz;
- bin = (char *) driver_alloc(sz);
- memcpy(bin, data, sz);
-}
-
-wxETreeItemData::~wxETreeItemData()
-{
- driver_free(bin);
-}
-
-/* ****************************************************************************
- * CallbackData *
- * ****************************************************************************/
-
-wxeCallbackData::wxeCallbackData(ErlDrvTermData caller, int req, char *req_type,
- int funcb, int skip_ev, wxeErlTerm * userData,
- wxeEvtListener *handler_cb)
- : wxObject()
-{
- listener = caller;
- obj = req;
- fun_id = funcb;
- strcpy(class_name, req_type);
- skip = skip_ev;
- user_data = userData;
- handler = handler_cb;
-}
-
-wxeCallbackData::~wxeCallbackData() {
- // fprintf(stderr, "CBD Deleteing %p %s\r\n", this, class_name); fflush(stderr);
- if(user_data) {
- delete user_data;
- }
- ptrMap::iterator it;
- it = ((WxeApp *)wxTheApp)->ptr2ref.find(handler);
- if(it != ((WxeApp *)wxTheApp)->ptr2ref.end()) {
- wxeRefData *refd = it->second;
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, refd->memenv->owner, false);
- rt.addAtom("wx_delete_cb");
- rt.addInt(fun_id);
- rt.addRef(refd->ref, "wxeEvtListener");
- rt.addRef(obj, class_name);
- rt.addTupleCount(4);
- rt.send();
- }
-}
-
-/* ****************************************************************************
- * wxListCtrlCompare wrapper
- * ****************************************************************************/
-
-int wxCALLBACK wxEListCtrlCompare(long item1, long item2, long callbackInfoPtr)
-{
- callbackInfo * cb = (callbackInfo *)callbackInfoPtr;
- wxeMemEnv * memenv = ((WxeApp *) wxTheApp)->getMemEnv(cb->port);
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, memenv->owner, false);
- rt.addInt(cb->callbackID);
- rt.addInt(item1);
- rt.addInt(item2);
- rt.endList(2);
- rt.addAtom("_wx_invoke_cb_");
- rt.addTupleCount(3);
- rt.send();
- handle_event_callback(WXE_DRV_PORT_HANDLE, memenv->owner);
-
- if(((WxeApp *) wxTheApp)->cb_buff) {
- int res = * (int*) ((WxeApp *) wxTheApp)->cb_buff;
- driver_free(((WxeApp *) wxTheApp)->cb_buff);
- ((WxeApp *) wxTheApp)->cb_buff = NULL;
- return res;
- }
- return 0;
-}
diff --git a/lib/wx/c_src/wxe_impl.h b/lib/wx/c_src/wxe_impl.h
index a3c57e2598..57bf2e2dba 100644
--- a/lib/wx/c_src/wxe_impl.h
+++ b/lib/wx/c_src/wxe_impl.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -14,12 +14,17 @@
* the License for the specific language governing rights and limitations
* under the License.
*
- * %CopyrightEnd%
+ * %CopyrightEnd%
*/
#ifndef _WXE_IMPL_H
#define _WXE_IMPL_H
+#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
+#define __DARWIN__ 1
+#endif
+
+
#include <wx/glcanvas.h>
#include <wx/treectrl.h>
#include <wx/print.h>
@@ -27,124 +32,32 @@ extern "C" {
#include "wxe_driver.h"
}
-DECLARE_EVENT_TYPE(wxeEVT_META_COMMAND, -1)
-
-class wxeMetaCommand : public wxEvent
-{
- public:
- wxeMetaCommand(wxe_data *sd, int EvId)
- : wxEvent(EvId, wxeEVT_META_COMMAND)
- { caller = driver_caller(sd->port_handle); port = sd->port; pdl = sd->pdl; } ;
- wxeMetaCommand(const wxeMetaCommand& event)
- : wxEvent(event)
- { caller = event.caller; port = event.port; pdl = event.pdl; };
- virtual ~wxeMetaCommand() {};
- virtual wxEvent *Clone() const { return new wxeMetaCommand(*this); }
-
- ErlDrvTermData caller;
- ErlDrvTermData port;
- ErlDrvPDL pdl;
-};
-
-class wxeCommand : public wxObject
-{
- public:
- wxeCommand(int fc,char * cbuf,int buflen, wxe_data *);
- virtual ~wxeCommand();
-
- ErlDrvTermData caller;
- ErlDrvTermData port;
- WXEBinRef * bin[3];
- char * buffer;
- int len;
- int op;
-};
-
-#define WXE_EVENT_PTR 0
-#define WXE_OBJECT_PTR 1
-
-class intListElement {
-public:
- intListElement(int Element) {car = Element; cdr = NULL;};
- intListElement(int Element, intListElement *list)
- {car = Element; cdr = list;};
- int car;
- intListElement *cdr;
-};
-
-class intList {
-public:
- intList() {list = NULL;};
- bool IsEmpty() {return list == NULL;};
- void Append(int Element) { list = new intListElement(Element, list); };
- int Pop() {
- intListElement *temp = list;
- int res = list->car;
- list = temp->cdr;
- delete temp;
- return res;
- }
- intListElement *list;
-};
-
-class wxe_badarg
-{
-public:
- wxe_badarg(int Ref) : ref(Ref) { } ;
- int ref;
-};
-
-class wxeErlTerm : public wxClientData
-{
- public:
- wxeErlTerm(WXEBinRef * data)
- {
- size = data->size;
- bin = (char *) driver_alloc(size);
- memcpy(bin, data->base, size);
- } ;
- ~wxeErlTerm() { driver_free(bin); };
- char * bin;
- int size;
-};
-
-class wxeMemEnv
-{
-public:
- wxeMemEnv();
- int next;
- int max;
- void ** ref2ptr;
- intList free;
- ~wxeMemEnv();
- ErlDrvTermData owner;
-};
+#include "wxe_helpers.h"
+#include "wxe_callback_impl.h"
+#include "wxe_memory.h"
-class wxeRefData {
- public:
- wxeRefData(unsigned int dref, int ttype, int is_new, wxeMemEnv *menv) :
- ref(dref), type(ttype), alloc_in_erl(is_new), memenv(menv), pid(-1) { } ;
- int ref;
- int type;
- // 0 = wxWindow subclasses, 1 = wxObject subclasses
- // 2 = wxDialog subclasses, 3 = allocated wxObjects but not returned from new
- // > 3 classes which lack virtual destr, or are supposed to be allocated on
- // the stack
- bool alloc_in_erl;
- wxeMemEnv *memenv;
- ErlDrvTermData pid;
-};
+#if !wxCHECK_VERSION(2,9,0)
+#define wxeLocaleC wxChar *
+#define wxeLocaleC2String(Str) wxString(Str)
+#else
+typedef wxString wxeLocaleC;
+#define wxeLocaleC2String(Str) Str
+#endif
-WX_DECLARE_HASH_MAP(ErlDrvTermData, wxGLCanvas*, wxIntegerHash, wxIntegerEqual, wxeGLC);
-WX_DECLARE_HASH_MAP(ErlDrvTermData, wxeMemEnv*, wxIntegerHash, wxIntegerEqual, wxeMemMap);
+#define WXE_NOT_INITIATED 0
+#define WXE_INITIATED 1
+#define WXE_EXITED 2
+#define WXE_ERROR -1
-
-WX_DECLARE_VOIDPTR_HASH_MAP(wxeRefData *, ptrMap);
+void send_msg(const char *, const wxString *); // For debugging and error msgs
class WxeApp : public wxApp
{
public:
- virtual bool OnInit();
+ virtual bool OnInit();
+#ifdef _MACOSX
+ virtual void MacOpenFile(const wxString &filename);
+#endif
void shutdown(wxeMetaCommand& event);
int dispatch(wxList *, int, int);
@@ -158,101 +71,32 @@ public:
void dummy_close(wxEvent& Ev);
bool sendevent(wxEvent *event);
- // MemEnv handling
+ // MemEnv handling
void newMemEnv(wxeMetaCommand& event);
void destroyMemEnv(wxeMetaCommand& event);
wxeMemEnv * getMemEnv(ErlDrvTermData port);
-
+
int newPtr(void * ptr, int type, wxeMemEnv *memenv);
int getRef(void * ptr, wxeMemEnv *memenv);
- void * getPtr(char * bp, wxeMemEnv *memenv);
+ void * getPtr(char * bp, wxeMemEnv *memenv);
void clearPtr(void *ptr);
+ wxeRefData * getRefData(void *ptr);
void registerPid(char *ptr, ErlDrvTermData pid, wxeMemEnv *memenv);
- void init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller);
-
+ void init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller);
+
// Code found in gen/wxe_derived_dest.h
- void delete_object(void *ptr, wxeRefData *refd);
-
+ bool delete_object(void *ptr, wxeRefData *refd);
+
wxeMemMap refmap;
ptrMap ptr2ref;
wxeMemEnv * global_me;
-
+
+ int recurse_level;
+ wxList * delayed_cleanup;
+ wxList * delayed_delete;
// Temp container for callbacks
char *cb_buff;
int cb_len;
};
-class wxETreeItemData : public wxTreeItemData
-{
- public:
- wxETreeItemData(int sz, char * data);
-
- ~wxETreeItemData();
-
- int size;
- char * bin;
-};
-
-bool sendevent(wxEvent * event, ErlDrvTermData port);
-void pre_callback();
-void handle_event_callback(ErlDrvPort port, ErlDrvTermData process);
-
-void activateGL(ErlDrvTermData caller);
-void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas);
-void deleteActiveGL(wxGLCanvas *canvas);
-
-void send_msg(const char *, wxString *); // For debugging and error msgs
-
-extern wxeGLC glc;
-
-class wxEPrintout : public wxPrintout
-{
- public:
- wxEPrintout(wxString Title, int onPrintP, int onPrepareP,
- int onBeginP, int onEndP,
- int onBeginD, int onEndD,
- int hasP, int getPageI, ErlDrvTermData Port) :
- wxPrintout(Title),
- onPrintPage(onPrintP), onPreparePrinting(onPrepareP),
- onBeginPrinting(onBeginP), onEndPrinting(onEndP),
- onBeginDocument(onBeginD), onEndDocument(onEndD), hasPage(hasP), getPageInfo(getPageI),
- port(Port)
- { } ;
-
- ~wxEPrintout();
-
- bool OnBeginDocument(int startPage, int endPage);
- void OnEndDocument();
- void OnBeginPrinting();
- void OnEndPrinting();
-
- void OnPreparePrinting();
-
- bool HasPage(int page);
- bool OnPrintPage(int page);
- void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
-
- int onPrintPage;
- int onPreparePrinting;
- int onBeginPrinting;
- int onEndPrinting;
- int onBeginDocument;
- int onEndDocument;
- int hasPage;
- int getPageInfo;
-
- ErlDrvTermData port;
-};
-
-void clear_cb(ErlDrvTermData port, int callback);
-
-
-// Implementation of wxListCtrlCompare
-struct callbackInfo {
- ErlDrvTermData port;
- int callbackID;
-};
-
-int wxCALLBACK wxEListCtrlCompare(long item1, long item2, long callbackInfoPtr);
-
#endif //_WXE_IMPL_H
diff --git a/lib/wx/c_src/wxe_main.cpp b/lib/wx/c_src/wxe_main.cpp
new file mode 100644
index 0000000000..2bec2422c9
--- /dev/null
+++ b/lib/wx/c_src/wxe_main.cpp
@@ -0,0 +1,163 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#if defined(_WIN32)
+#include <wx/msw/private.h> // for wxSetInstance
+#endif
+
+#include "wxe_impl.h"
+
+// Until fixed in emulator
+#ifndef _WIN32
+extern "C" {
+ extern void erts_thread_disable_fpe(void);
+}
+#endif
+
+ErlDrvTid wxe_thread;
+
+ErlDrvMutex *wxe_status_m;
+ErlDrvCond *wxe_status_c;
+
+int wxe_status = WXE_NOT_INITIATED;
+
+ErlDrvMutex * wxe_batch_locker_m;
+ErlDrvCond * wxe_batch_locker_c;
+ErlDrvTermData init_caller = 0;
+
+#ifdef __DARWIN__
+extern "C" {
+ int erl_drv_stolen_main_thread_join(ErlDrvTid tid, void **respp);
+ int erl_drv_steal_main_thread(char *name,
+ ErlDrvTid *dtid,
+ void* (*func)(void*),
+ void* arg,
+ ErlDrvThreadOpts *opts);
+}
+#endif
+
+void *wxe_main_loop(void * );
+
+/* ************************************************************
+ * START AND STOP of driver thread
+ * ************************************************************/
+
+int load_native_gui()
+{
+ return 1;
+}
+
+int start_native_gui(wxe_data *sd)
+{
+ int res;
+ wxe_status_m = erl_drv_mutex_create((char *) "wxe_status_m");
+ wxe_status_c = erl_drv_cond_create((char *)"wxe_status_c");
+
+ wxe_batch_locker_m = erl_drv_mutex_create((char *)"wxe_batch_locker_m");
+ wxe_batch_locker_c = erl_drv_cond_create((char *)"wxe_batch_locker_c");
+ init_caller = driver_connected(sd->port_handle);
+
+#ifdef __DARWIN__
+ res = erl_drv_steal_main_thread((char *)"wxwidgets",
+ &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
+#else
+ res = erl_drv_thread_create((char *)"wxwidgets",
+ &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
+#endif
+ if(res == 0) {
+ erl_drv_mutex_lock(wxe_status_m);
+ for(;wxe_status == WXE_NOT_INITIATED;) {
+ erl_drv_cond_wait(wxe_status_c, wxe_status_m);
+ }
+ erl_drv_mutex_unlock(wxe_status_m);
+ return wxe_status;
+ } else {
+ wxString msg;
+ msg.Printf(wxT("Erlang failed to create wxe-thread %d\r\n"), res);
+ send_msg("error", &msg);
+ return -1;
+ }
+}
+
+void stop_native_gui(wxe_data *sd)
+{
+ if(wxe_status == WXE_INITIATED) {
+ meta_command(WXE_SHUTDOWN, sd);
+ }
+#ifdef __DARWIN__
+ erl_drv_stolen_main_thread_join(wxe_thread, NULL);
+#else
+ erl_drv_thread_join(wxe_thread, NULL);
+#endif
+ erl_drv_mutex_destroy(wxe_status_m);
+ erl_drv_cond_destroy(wxe_status_c);
+ erl_drv_mutex_destroy(wxe_batch_locker_m);
+ erl_drv_cond_destroy(wxe_batch_locker_c);
+}
+
+void unload_native_gui()
+{
+
+}
+
+/* ************************************************************
+ * wxWidgets Thread
+ * ************************************************************/
+
+void *wxe_main_loop(void *vpdl)
+{
+ int result;
+ int argc = 1;
+ char * temp = (char *) "Erlang";
+ char * argv[] = {temp,NULL};
+ ErlDrvPDL pdl = (ErlDrvPDL) vpdl;
+
+ driver_pdl_inc_refc(pdl);
+
+ // Disable floating point execption if they are on.
+ // This should be done in emulator but it's not in yet.
+#ifndef _WIN32
+ erts_thread_disable_fpe();
+#else
+ // Setup that wxWidgets should look for cursors and icons in
+ // this dll and not in werl.exe (which is the default)
+ HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver"));
+ wxSetInstance((HINSTANCE) WXEHandle);
+#endif
+
+ wxe_ps_init();
+ result = wxEntry(argc, argv);
+ // fprintf(stderr, "WXWidgets quits main loop %d \r\n", result);
+ if(result >= 0 && wxe_status == WXE_INITIATED) {
+ /* We are done try to make a clean exit */
+ wxe_status = WXE_EXITED;
+ driver_pdl_dec_refc(pdl);
+#ifndef __DARWIN__
+ erl_drv_thread_exit(NULL);
+#endif
+ return NULL;
+ } else {
+ erl_drv_mutex_lock(wxe_status_m);
+ wxe_status = WXE_ERROR;
+ erl_drv_cond_signal(wxe_status_c);
+ erl_drv_mutex_unlock(wxe_status_m);
+ driver_pdl_dec_refc(pdl);
+ return NULL;
+ }
+}
diff --git a/lib/wx/c_src/wxe_memory.h b/lib/wx/c_src/wxe_memory.h
new file mode 100644
index 0000000000..8a48c77154
--- /dev/null
+++ b/lib/wx/c_src/wxe_memory.h
@@ -0,0 +1,62 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * compliance with the License. You should have received a copy of the
+ * Erlang Public License along with this software. If not, it can be
+ * retrieved online at http://www.erlang.org/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifndef _WXE_MEMORY_H
+#define _WXE_MEMORY_H
+
+class wxeMemEnv
+{
+public:
+ wxeMemEnv()
+ {
+ ref2ptr = (void **) driver_alloc(128*sizeof(void *));
+ ref2ptr[0] = NULL;
+ next = 1;
+ max = 128;
+ };
+ ~wxeMemEnv()
+ { driver_free(ref2ptr); };
+ int next;
+ int max;
+ void ** ref2ptr;
+ intList free;
+ ErlDrvTermData owner;
+};
+
+class wxeRefData {
+ public:
+ wxeRefData(unsigned int dref, int ttype, int is_new, wxeMemEnv *menv) :
+ ref(dref), type(ttype), alloc_in_erl(is_new), memenv(menv), pid(-1) { } ;
+ int ref;
+ 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
+ // the stack
+ bool alloc_in_erl;
+ wxeMemEnv *memenv;
+ ErlDrvTermData pid;
+};
+
+WX_DECLARE_HASH_MAP(ErlDrvTermData, wxeMemEnv*, wxIntegerHash, wxIntegerEqual, wxeMemMap);
+
+WX_DECLARE_VOIDPTR_HASH_MAP(wxeRefData *, ptrMap);
+
+#endif
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 3756786831..4c4d4f41a8 100755..100644
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -441,12 +441,12 @@ else
else
CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null`
fi
- CWXWIN3=$CWXWIN_PROG/wxWidgets-2.*.*
- CWXWIN4=$CWXWIN_PROG/wxMSW-2.*.*
- CWX_DOCUMENTED="/opt/local/pgm/wxMSW-2.*.* /opt/local/pgm/wxWidgets-2.*.*"
+ CWXWIN3=$CWXWIN_PROG/wxWidgets-?.*.*
+ CWXWIN4=$CWXWIN_PROG/wxMSW-?.*.*
+ CWX_DOCUMENTED="/opt/local/pgm/wxMSW-?.*.* /opt/local/pgm/wxWidgets-?.*.*"
case $ac_cv_sizeof_void_p in
8)
- CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-2.*.* /opt/local64/pgm/wxWidgets-2.*.* $CWX_DOCUMENTED"
+ CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-?.*.* /opt/local64/pgm/wxWidgets-?.*.* $CWX_DOCUMENTED"
;;
*)
true
@@ -464,12 +464,14 @@ else
WX_CFLAGS="-EHsc -D_UNICODE -DUNICODE -I$WXINCLUDE_MSVC -I$WXINCLUDE_PLAIN -I$WXINCLUDE_CONTRIB -D__WXMSW__"
WX_CXXFLAGS="-TP $WX_CFLAGS"
WX_LIBDIR=$dir/lib/vc_lib
+ WX_LIBDIR64=$dir/lib/vc_x64_lib
WX_RESCOMP="rc.sh -I$WXINCLUDE_PLAIN -D __WIN32__"
RC_FILE_TYPE=res
- for lib in $WX_LIBDIR/wxbase*.lib $WX_LIBDIR2/wxbase*.lib; do
- maybe=`echo $lib | egrep 'wxbase[[0-9]]*u\.lib'`
+ for lib in $WX_LIBDIR $WX_LIBDIR64; do
+ maybe=`ls $lib/wxbase*.lib | egrep 'wxbase[[0-9]]*u\.lib'`
if test '!' -z "$maybe"; then
corelib_number=`echo $maybe | sed 's,.*\([[0-9]].\)u\.lib,\1,'`
+ WX_LIBDIR=$lib
break
fi
done
@@ -675,6 +677,27 @@ if test "x$GCC" = xyes; then
LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CXXFLAGS])
fi
+dnl ----------------------------------------------------------------------
+dnl Enable -fsanitize= flags.
+dnl ----------------------------------------------------------------------
+
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(
+ sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]),
+[
+case "$enableval" in
+ no) sanitizers= ;;
+ yes) sanitizers="-fsanitize=DEFAULT_SANITIZERS" ;;
+ *) sanitizers="-fsanitize=$enableval" ;;
+esac
+CFLAGS="$CFLAGS $sanitizers"
+CXXFLAGS="$CXXFLAGS $sanitizers"
+LDFLAGS="$LDFLAGS $sanitizers"
+])
+
#############################################################################
dnl
diff --git a/lib/wx/doc/src/book.xml b/lib/wx/doc/src/book.xml
index d517892776..769b204ed6 100644
--- a/lib/wx/doc/src/book.xml
+++ b/lib/wx/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/wx/doc/src/fascicules.xml b/lib/wx/doc/src/fascicules.xml
index 1b9d6bc94d..154c8a3b6d 100644
--- a/lib/wx/doc/src/fascicules.xml
+++ b/lib/wx/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml
index 6e653cf828..682ab48ca0 100644
--- a/lib/wx/doc/src/notes.xml
+++ b/lib/wx/doc/src/notes.xml
@@ -31,6 +31,150 @@
<p>This document describes the changes made to the wxErlang
application.</p>
+<section><title>Wx 1.3.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix timing related crash during wx application stop.</p>
+ <p>
+ Own Id: OTP-12374</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Wx 1.3.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a minor typo in the graphicsContext example.</p>
+ <p>
+ Own Id: OTP-12259</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Distribute <c>autoconf</c> helpers to applications at
+ build time instead of having multiple identical copies
+ committed in the repository.</p>
+ <p>
+ Own Id: OTP-12348</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Wx 1.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Implement --enable-sanitizers[=sanitizers]. Similar to
+ debugging with Valgrind, it's very useful to enable
+ -fsanitize= switches to catch bugs at runtime.</p>
+ <p>
+ Own Id: OTP-12153</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Wx 1.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Fix delayed destroy for wxPaintDC objects which could
+ cause an eternal loop for modal dialogs.</p> <p>Fix
+ wxSL_LABELS compatibility between wxWidgets-2.8 and
+ wxWidgets-3.0 versions</p>
+ <p>
+ Own Id: OTP-11985</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add missing classes wxPopup[Transient]Window,
+ wxActivateEvent and wxTextCtrl:cahngeValue/2 function.</p>
+ <p>
+ Own Id: OTP-11986</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Wx 1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Refactored C++ code, fixed crashes and a deadlock on
+ linux.</p>
+ <p>
+ Own Id: OTP-11586</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Reworked the internal event handling to avoid crashes in
+ destroy objects. Thanks Tom for the bug report.</p>
+ <p>
+ Own Id: OTP-11699</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Wx 1.1.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/wx/doc/src/part.xml b/lib/wx/doc/src/part.xml
index 168add1a3c..a11473462c 100644
--- a/lib/wx/doc/src/part.xml
+++ b/lib/wx/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/wx/doc/src/part_notes.xml b/lib/wx/doc/src/part_notes.xml
index 539ced5f1d..958a273488 100644
--- a/lib/wx/doc/src/part_notes.xml
+++ b/lib/wx/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/wx/doc/src/ref_man.xml.src b/lib/wx/doc/src/ref_man.xml.src
index 77fd16b050..26706d538b 100644
--- a/lib/wx/doc/src/ref_man.xml.src
+++ b/lib/wx/doc/src/ref_man.xml.src
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2009</year>
+ <year>2009</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/wx/examples/demo/ex_graphicsContext.erl b/lib/wx/examples/demo/ex_graphicsContext.erl
index 59bfe7ff64..9047f1d135 100644
--- a/lib/wx/examples/demo/ex_graphicsContext.erl
+++ b/lib/wx/examples/demo/ex_graphicsContext.erl
@@ -54,7 +54,7 @@ do_init(Config) ->
%% Setup sizers
MainSizer = wxBoxSizer:new(?wxVERTICAL),
Sizer = wxStaticBoxSizer:new(?wxVERTICAL, Panel,
- [{label, "wxGrapicsContext"}]),
+ [{label, "wxGraphicsContext"}]),
Win = wxPanel:new(Panel, []),
Pen = ?wxBLACK_PEN,
diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl
index aa1c81ac0f..348daf64ce 100644
--- a/lib/wx/include/wx.hrl
+++ b/lib/wx/include/wx.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -165,6 +165,11 @@
-type wxHelpEventType() :: help | detailed_help.
-type wxHelp() :: #wxHelp{}. %% Callback event: {@link wxHelpEvent}
+-record(wxActivate,{type :: wxActivateEventType(), %% Callback event: {@link wxActivateEvent}
+ active :: boolean()}).
+-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(),
@@ -273,6 +278,10 @@
-type wxAuiManagerEventType() :: aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | 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(),
@@ -312,8 +321,8 @@
-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}
--type event() :: wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClipboardText() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMove() | wxNavigationKey() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy().
--type wxEventType() :: wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxClipboardTextEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
+-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() | 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() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
%% Hardcoded Records
-record(wxMouseState, {x :: integer(), y :: integer(),
@@ -1976,10 +1985,255 @@
-define(wxIMAGELIST_DRAW_SELECTED, 4).
-define(wxIMAGELIST_DRAW_TRANSPARENT, 2).
-define(wxIMAGELIST_DRAW_NORMAL, 1).
+% From "intl.h": wxLanguage
+-define(wxLANGUAGE_DEFAULT, 0).
+-define(wxLANGUAGE_UNKNOWN, 1).
+-define(wxLANGUAGE_ABKHAZIAN, 2).
+-define(wxLANGUAGE_AFAR, 3).
+-define(wxLANGUAGE_AFRIKAANS, 4).
+-define(wxLANGUAGE_ALBANIAN, 5).
+-define(wxLANGUAGE_AMHARIC, 6).
+-define(wxLANGUAGE_ARABIC, 7).
+-define(wxLANGUAGE_ARABIC_ALGERIA, 8).
+-define(wxLANGUAGE_ARABIC_BAHRAIN, 9).
+-define(wxLANGUAGE_ARABIC_EGYPT, 10).
+-define(wxLANGUAGE_ARABIC_IRAQ, 11).
+-define(wxLANGUAGE_ARABIC_JORDAN, 12).
+-define(wxLANGUAGE_ARABIC_KUWAIT, 13).
+-define(wxLANGUAGE_ARABIC_LEBANON, 14).
+-define(wxLANGUAGE_ARABIC_LIBYA, 15).
+-define(wxLANGUAGE_ARABIC_MOROCCO, 16).
+-define(wxLANGUAGE_ARABIC_OMAN, 17).
+-define(wxLANGUAGE_ARABIC_QATAR, 18).
+-define(wxLANGUAGE_ARABIC_SAUDI_ARABIA, 19).
+-define(wxLANGUAGE_ARABIC_SUDAN, 20).
+-define(wxLANGUAGE_ARABIC_SYRIA, 21).
+-define(wxLANGUAGE_ARABIC_TUNISIA, 22).
+-define(wxLANGUAGE_ARABIC_UAE, 23).
+-define(wxLANGUAGE_ARABIC_YEMEN, 24).
+-define(wxLANGUAGE_ARMENIAN, 25).
+-define(wxLANGUAGE_ASSAMESE, 26).
+-define(wxLANGUAGE_AYMARA, 27).
+-define(wxLANGUAGE_AZERI, 28).
+-define(wxLANGUAGE_AZERI_CYRILLIC, 29).
+-define(wxLANGUAGE_AZERI_LATIN, 30).
+-define(wxLANGUAGE_BASHKIR, 31).
+-define(wxLANGUAGE_BASQUE, 32).
+-define(wxLANGUAGE_BELARUSIAN, 33).
+-define(wxLANGUAGE_BENGALI, 34).
+-define(wxLANGUAGE_BHUTANI, 35).
+-define(wxLANGUAGE_BIHARI, 36).
+-define(wxLANGUAGE_BISLAMA, 37).
+-define(wxLANGUAGE_BRETON, 38).
+-define(wxLANGUAGE_BULGARIAN, 39).
+-define(wxLANGUAGE_BURMESE, 40).
+-define(wxLANGUAGE_CAMBODIAN, 41).
+-define(wxLANGUAGE_CATALAN, 42).
+-define(wxLANGUAGE_CHINESE, 43).
+-define(wxLANGUAGE_CHINESE_SIMPLIFIED, 44).
+-define(wxLANGUAGE_CHINESE_TRADITIONAL, 45).
+-define(wxLANGUAGE_CHINESE_HONGKONG, 46).
+-define(wxLANGUAGE_CHINESE_MACAU, 47).
+-define(wxLANGUAGE_CHINESE_SINGAPORE, 48).
+-define(wxLANGUAGE_CHINESE_TAIWAN, 49).
+-define(wxLANGUAGE_CORSICAN, 50).
+-define(wxLANGUAGE_CROATIAN, 51).
+-define(wxLANGUAGE_CZECH, 52).
+-define(wxLANGUAGE_DANISH, 53).
+-define(wxLANGUAGE_DUTCH, 54).
+-define(wxLANGUAGE_DUTCH_BELGIAN, 55).
+-define(wxLANGUAGE_ENGLISH, 56).
+-define(wxLANGUAGE_ENGLISH_UK, 57).
+-define(wxLANGUAGE_ENGLISH_US, 58).
+-define(wxLANGUAGE_ENGLISH_AUSTRALIA, 59).
+-define(wxLANGUAGE_ENGLISH_BELIZE, 60).
+-define(wxLANGUAGE_ENGLISH_BOTSWANA, 61).
+-define(wxLANGUAGE_ENGLISH_CANADA, 62).
+-define(wxLANGUAGE_ENGLISH_CARIBBEAN, 63).
+-define(wxLANGUAGE_ENGLISH_DENMARK, 64).
+-define(wxLANGUAGE_ENGLISH_EIRE, 65).
+-define(wxLANGUAGE_ENGLISH_JAMAICA, 66).
+-define(wxLANGUAGE_ENGLISH_NEW_ZEALAND, 67).
+-define(wxLANGUAGE_ENGLISH_PHILIPPINES, 68).
+-define(wxLANGUAGE_ENGLISH_SOUTH_AFRICA, 69).
+-define(wxLANGUAGE_ENGLISH_TRINIDAD, 70).
+-define(wxLANGUAGE_ENGLISH_ZIMBABWE, 71).
+-define(wxLANGUAGE_ESPERANTO, 72).
+-define(wxLANGUAGE_ESTONIAN, 73).
+-define(wxLANGUAGE_FAEROESE, 74).
+-define(wxLANGUAGE_FARSI, 75).
+-define(wxLANGUAGE_FIJI, 76).
+-define(wxLANGUAGE_FINNISH, 77).
+-define(wxLANGUAGE_FRENCH, 78).
+-define(wxLANGUAGE_FRENCH_BELGIAN, 79).
+-define(wxLANGUAGE_FRENCH_CANADIAN, 80).
+-define(wxLANGUAGE_FRENCH_LUXEMBOURG, 81).
+-define(wxLANGUAGE_FRENCH_MONACO, 82).
+-define(wxLANGUAGE_FRENCH_SWISS, 83).
+-define(wxLANGUAGE_FRISIAN, 84).
+-define(wxLANGUAGE_GALICIAN, 85).
+-define(wxLANGUAGE_GEORGIAN, 86).
+-define(wxLANGUAGE_GERMAN, 87).
+-define(wxLANGUAGE_GERMAN_AUSTRIAN, 88).
+-define(wxLANGUAGE_GERMAN_BELGIUM, 89).
+-define(wxLANGUAGE_GERMAN_LIECHTENSTEIN, 90).
+-define(wxLANGUAGE_GERMAN_LUXEMBOURG, 91).
+-define(wxLANGUAGE_GERMAN_SWISS, 92).
+-define(wxLANGUAGE_GREEK, 93).
+-define(wxLANGUAGE_GREENLANDIC, 94).
+-define(wxLANGUAGE_GUARANI, 95).
+-define(wxLANGUAGE_GUJARATI, 96).
+-define(wxLANGUAGE_HAUSA, 97).
+-define(wxLANGUAGE_HEBREW, 98).
+-define(wxLANGUAGE_HINDI, 99).
+-define(wxLANGUAGE_HUNGARIAN, 100).
+-define(wxLANGUAGE_ICELANDIC, 101).
+-define(wxLANGUAGE_INDONESIAN, 102).
+-define(wxLANGUAGE_INTERLINGUA, 103).
+-define(wxLANGUAGE_INTERLINGUE, 104).
+-define(wxLANGUAGE_INUKTITUT, 105).
+-define(wxLANGUAGE_INUPIAK, 106).
+-define(wxLANGUAGE_IRISH, 107).
+-define(wxLANGUAGE_ITALIAN, 108).
+-define(wxLANGUAGE_ITALIAN_SWISS, 109).
+-define(wxLANGUAGE_JAPANESE, 110).
+-define(wxLANGUAGE_JAVANESE, 111).
+-define(wxLANGUAGE_KANNADA, 112).
+-define(wxLANGUAGE_KASHMIRI, 113).
+-define(wxLANGUAGE_KASHMIRI_INDIA, 114).
+-define(wxLANGUAGE_KAZAKH, 115).
+-define(wxLANGUAGE_KERNEWEK, 116).
+-define(wxLANGUAGE_KINYARWANDA, 117).
+-define(wxLANGUAGE_KIRGHIZ, 118).
+-define(wxLANGUAGE_KIRUNDI, 119).
+-define(wxLANGUAGE_KONKANI, 120).
+-define(wxLANGUAGE_KOREAN, 121).
+-define(wxLANGUAGE_KURDISH, 122).
+-define(wxLANGUAGE_LAOTHIAN, 123).
+-define(wxLANGUAGE_LATIN, 124).
+-define(wxLANGUAGE_LATVIAN, 125).
+-define(wxLANGUAGE_LINGALA, 126).
+-define(wxLANGUAGE_LITHUANIAN, 127).
+-define(wxLANGUAGE_MACEDONIAN, 128).
+-define(wxLANGUAGE_MALAGASY, 129).
+-define(wxLANGUAGE_MALAY, 130).
+-define(wxLANGUAGE_MALAYALAM, 131).
+-define(wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, 132).
+-define(wxLANGUAGE_MALAY_MALAYSIA, 133).
+-define(wxLANGUAGE_MALTESE, 134).
+-define(wxLANGUAGE_MANIPURI, 135).
+-define(wxLANGUAGE_MAORI, 136).
+-define(wxLANGUAGE_MARATHI, 137).
+-define(wxLANGUAGE_MOLDAVIAN, 138).
+-define(wxLANGUAGE_MONGOLIAN, 139).
+-define(wxLANGUAGE_NAURU, 140).
+-define(wxLANGUAGE_NEPALI, 141).
+-define(wxLANGUAGE_NEPALI_INDIA, 142).
+-define(wxLANGUAGE_NORWEGIAN_BOKMAL, 143).
+-define(wxLANGUAGE_NORWEGIAN_NYNORSK, 144).
+-define(wxLANGUAGE_OCCITAN, 145).
+-define(wxLANGUAGE_ORIYA, 146).
+-define(wxLANGUAGE_OROMO, 147).
+-define(wxLANGUAGE_PASHTO, 148).
+-define(wxLANGUAGE_POLISH, 149).
+-define(wxLANGUAGE_PORTUGUESE, 150).
+-define(wxLANGUAGE_PORTUGUESE_BRAZILIAN, 151).
+-define(wxLANGUAGE_PUNJABI, 152).
+-define(wxLANGUAGE_QUECHUA, 153).
+-define(wxLANGUAGE_RHAETO_ROMANCE, 154).
+-define(wxLANGUAGE_ROMANIAN, 155).
+-define(wxLANGUAGE_RUSSIAN, 156).
+-define(wxLANGUAGE_RUSSIAN_UKRAINE, 157).
+-define(wxLANGUAGE_SAMOAN, 158).
+-define(wxLANGUAGE_SANGHO, 159).
+-define(wxLANGUAGE_SANSKRIT, 160).
+-define(wxLANGUAGE_SCOTS_GAELIC, 161).
+-define(wxLANGUAGE_SERBIAN, 162).
+-define(wxLANGUAGE_SERBIAN_CYRILLIC, 163).
+-define(wxLANGUAGE_SERBIAN_LATIN, 164).
+-define(wxLANGUAGE_SERBO_CROATIAN, 165).
+-define(wxLANGUAGE_SESOTHO, 166).
+-define(wxLANGUAGE_SETSWANA, 167).
+-define(wxLANGUAGE_SHONA, 168).
+-define(wxLANGUAGE_SINDHI, 169).
+-define(wxLANGUAGE_SINHALESE, 170).
+-define(wxLANGUAGE_SISWATI, 171).
+-define(wxLANGUAGE_SLOVAK, 172).
+-define(wxLANGUAGE_SLOVENIAN, 173).
+-define(wxLANGUAGE_SOMALI, 174).
+-define(wxLANGUAGE_SPANISH, 175).
+-define(wxLANGUAGE_SPANISH_ARGENTINA, 176).
+-define(wxLANGUAGE_SPANISH_BOLIVIA, 177).
+-define(wxLANGUAGE_SPANISH_CHILE, 178).
+-define(wxLANGUAGE_SPANISH_COLOMBIA, 179).
+-define(wxLANGUAGE_SPANISH_COSTA_RICA, 180).
+-define(wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, 181).
+-define(wxLANGUAGE_SPANISH_ECUADOR, 182).
+-define(wxLANGUAGE_SPANISH_EL_SALVADOR, 183).
+-define(wxLANGUAGE_SPANISH_GUATEMALA, 184).
+-define(wxLANGUAGE_SPANISH_HONDURAS, 185).
+-define(wxLANGUAGE_SPANISH_MEXICAN, 186).
+-define(wxLANGUAGE_SPANISH_MODERN, 187).
+-define(wxLANGUAGE_SPANISH_NICARAGUA, 188).
+-define(wxLANGUAGE_SPANISH_PANAMA, 189).
+-define(wxLANGUAGE_SPANISH_PARAGUAY, 190).
+-define(wxLANGUAGE_SPANISH_PERU, 191).
+-define(wxLANGUAGE_SPANISH_PUERTO_RICO, 192).
+-define(wxLANGUAGE_SPANISH_URUGUAY, 193).
+-define(wxLANGUAGE_SPANISH_US, 194).
+-define(wxLANGUAGE_SPANISH_VENEZUELA, 195).
+-define(wxLANGUAGE_SUNDANESE, 196).
+-define(wxLANGUAGE_SWAHILI, 197).
+-define(wxLANGUAGE_SWEDISH, 198).
+-define(wxLANGUAGE_SWEDISH_FINLAND, 199).
+-define(wxLANGUAGE_TAGALOG, 200).
+-define(wxLANGUAGE_TAJIK, 201).
+-define(wxLANGUAGE_TAMIL, 202).
+-define(wxLANGUAGE_TATAR, 203).
+-define(wxLANGUAGE_TELUGU, 204).
+-define(wxLANGUAGE_THAI, 205).
+-define(wxLANGUAGE_TIBETAN, 206).
+-define(wxLANGUAGE_TIGRINYA, 207).
+-define(wxLANGUAGE_TONGA, 208).
+-define(wxLANGUAGE_TSONGA, 209).
+-define(wxLANGUAGE_TURKISH, 210).
+-define(wxLANGUAGE_TURKMEN, 211).
+-define(wxLANGUAGE_TWI, 212).
+-define(wxLANGUAGE_UIGHUR, 213).
+-define(wxLANGUAGE_UKRAINIAN, 214).
+-define(wxLANGUAGE_URDU, 215).
+-define(wxLANGUAGE_URDU_INDIA, 216).
+-define(wxLANGUAGE_URDU_PAKISTAN, 217).
+-define(wxLANGUAGE_UZBEK, 218).
+-define(wxLANGUAGE_UZBEK_CYRILLIC, 219).
+-define(wxLANGUAGE_UZBEK_LATIN, 220).
+-define(wxLANGUAGE_VIETNAMESE, 221).
+-define(wxLANGUAGE_VOLAPUK, 222).
+-define(wxLANGUAGE_WELSH, 223).
+-define(wxLANGUAGE_WOLOF, 224).
+-define(wxLANGUAGE_XHOSA, 225).
+-define(wxLANGUAGE_YIDDISH, 226).
+-define(wxLANGUAGE_YORUBA, 227).
+-define(wxLANGUAGE_ZHUANG, 228).
+-define(wxLANGUAGE_ZULU, 229).
+-define(wxLANGUAGE_USER_DEFINED, 230).
+-define(wxLANGUAGE_VALENCIAN, 536870911).
+-define(wxLANGUAGE_SAMI, 536870912).
% From "intl.h": wxLayoutDirection
-define(wxLayout_Default, 0).
-define(wxLayout_LeftToRight, 1).
-define(wxLayout_RightToLeft, 2).
+% From "intl.h": wxLocaleCategory
+-define(wxLOCALE_CAT_NUMBER, 0).
+-define(wxLOCALE_CAT_DATE, 1).
+-define(wxLOCALE_CAT_MONEY, 2).
+-define(wxLOCALE_CAT_MAX, 3).
+% From "intl.h": wxLocaleInfo
+-define(wxLOCALE_THOUSANDS_SEP, 0).
+-define(wxLOCALE_DECIMAL_POINT, 1).
+% From "intl.h": wxLocaleInitFlags
+-define(wxLOCALE_LOAD_DEFAULT, 1).
+-define(wxLOCALE_CONV_ENCODING, 2).
% From "layout.h"
-define(wxLAYOUT_DEFAULT_MARGIN, 0).
% From "layout.h": wxEdge
@@ -2266,7 +2520,7 @@
-define(wxSL_RIGHT, 256).
-define(wxSL_TOP, 128).
-define(wxSL_LEFT, 64).
--define(wxSL_LABELS, 32).
+-define(wxSL_LABELS, wxe_util:get_const(wxSL_LABELS)).
-define(wxSL_AUTOTICKS, ?wxSL_TICKS).
-define(wxSL_TICKS, 16).
-define(wxSL_VERTICAL, ?wxVERTICAL).
diff --git a/lib/wx/priv/erlang-logo128.png b/lib/wx/priv/erlang-logo128.png
new file mode 100644
index 0000000000..33d1475cea
--- /dev/null
+++ b/lib/wx/priv/erlang-logo128.png
Binary files differ
diff --git a/lib/wx/priv/erlang-logo32.png b/lib/wx/priv/erlang-logo32.png
index a4afed8140..efddf5c5f9 100644
--- a/lib/wx/priv/erlang-logo32.png
+++ b/lib/wx/priv/erlang-logo32.png
Binary files differ
diff --git a/lib/wx/priv/erlang-logo64.png b/lib/wx/priv/erlang-logo64.png
index 91dfbbab53..b7d2128cdb 100644
--- a/lib/wx/priv/erlang-logo64.png
+++ b/lib/wx/priv/erlang-logo64.png
Binary files differ
diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl
index 8a8158c35e..a2681732a8 100644
--- a/lib/wx/src/gen/gl.erl
+++ b/lib/wx/src/gen/gl.erl
@@ -1,5 +1,3 @@
-%% -*- coding: utf-8 -*-
-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl
index dc64c3c3a7..5b0c0ed393 100644
--- a/lib/wx/src/gen/glu.erl
+++ b/lib/wx/src/gen/glu.erl
@@ -1,5 +1,3 @@
-%% -*- coding: utf-8 -*-
-
%%
%% %CopyrightBegin%
%%
diff --git a/lib/wx/src/gen/wxActivateEvent.erl b/lib/wx/src/gen/wxActivateEvent.erl
new file mode 100644
index 0000000000..dc03866027
--- /dev/null
+++ b/lib/wx/src/gen/wxActivateEvent.erl
@@ -0,0 +1,72 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxactivateevent.html">wxActivateEvent</a>.
+%% <dl><dt>Use {@link wxEvtHandler:connect/3.} with EventType:</dt>
+%% <dd><em>activate</em>, <em>activate_app</em>, <em>hibernate</em></dd></dl>
+%% See also the message variant {@link wxEvtHandler:wxActivate(). #wxActivate{}} event record type.
+%%
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxEvent}
+%% </p>
+%% @type wxActivateEvent(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxActivateEvent).
+-include("wxe.hrl").
+-export([getActive/1]).
+
+%% inherited exports
+-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
+ resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+
+-export_type([wxActivateEvent/0]).
+%% @hidden
+parent_class(wxEvent) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxActivateEvent() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxactivateevent.html#wxactivateeventgetactive">external documentation</a>.
+-spec getActive(This) -> boolean() when
+ This::wxActivateEvent().
+getActive(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxActivateEvent),
+ wxe_util:call(?wxActivateEvent_GetActive,
+ <<ThisRef:32/?UI>>).
+
+ %% From wxEvent
+%% @hidden
+stopPropagation(This) -> wxEvent:stopPropagation(This).
+%% @hidden
+skip(This, Options) -> wxEvent:skip(This, Options).
+%% @hidden
+skip(This) -> wxEvent:skip(This).
+%% @hidden
+shouldPropagate(This) -> wxEvent:shouldPropagate(This).
+%% @hidden
+resumePropagation(This,PropagationLevel) -> wxEvent:resumePropagation(This,PropagationLevel).
+%% @hidden
+isCommandEvent(This) -> wxEvent:isCommandEvent(This).
+%% @hidden
+getTimestamp(This) -> wxEvent:getTimestamp(This).
+%% @hidden
+getSkipped(This) -> wxEvent:getSkipped(This).
+%% @hidden
+getId(This) -> wxEvent:getId(This).
diff --git a/lib/wx/src/gen/wxBufferedDC.erl b/lib/wx/src/gen/wxBufferedDC.erl
index c69a426d7f..e2504bbaaa 100644
--- a/lib/wx/src/gen/wxBufferedDC.erl
+++ b/lib/wx/src/gen/wxBufferedDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -54,6 +54,8 @@
setUserScale/3,startDoc/2,startPage/1]).
-export_type([wxBufferedDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxMemoryDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxBufferedPaintDC.erl b/lib/wx/src/gen/wxBufferedPaintDC.erl
index 0e11826da0..c3fa80703c 100644
--- a/lib/wx/src/gen/wxBufferedPaintDC.erl
+++ b/lib/wx/src/gen/wxBufferedPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -56,6 +56,8 @@
startPage/1]).
-export_type([wxBufferedPaintDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxBufferedDC) -> true;
parent_class(wxMemoryDC) -> true;
diff --git a/lib/wx/src/gen/wxClientDC.erl b/lib/wx/src/gen/wxClientDC.erl
index 45909859ce..ae16196774 100644
--- a/lib/wx/src/gen/wxClientDC.erl
+++ b/lib/wx/src/gen/wxClientDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -56,6 +56,8 @@
-export_type([wxClientDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxEvtHandler.erl b/lib/wx/src/gen/wxEvtHandler.erl
index 22c203392c..44b7254cfb 100644
--- a/lib/wx/src/gen/wxEvtHandler.erl
+++ b/lib/wx/src/gen/wxEvtHandler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -46,15 +46,11 @@
-export([connect/2, connect/3, disconnect/1, disconnect/2, disconnect/3]).
%% internal exports
--export([connect_impl/3, disconnect_impl/2, disconnect_impl/3,
- new_evt_listener/0, destroy_evt_listener/1,
- get_callback/1, replace_fun_with_id/2]).
+-export([connect_impl/2, disconnect_impl/2]).
-export_type([wxEvtHandler/0, wx/0, event/0]).
-type wxEvtHandler() :: wx:wx_object().
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
@@ -149,55 +145,35 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
%% @hidden
-connect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType,
- skip=Skip, userdata=Userdata, cb=FunID})
+connect_impl(#wx_ref{type=ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ skip=Skip, userdata=Userdata, cb=FunID})
when is_integer(FunID)->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
ThisTypeBin = list_to_binary([atom_to_list(ThisT)|[0]]),
UD = if Userdata =:= [] -> 0;
- true ->
+ true ->
wxe_util:send_bin(term_to_binary(Userdata)),
1
end,
- wxe_util:call(100, <<EvtList:32/?UI,ThisRef:32/?UI,
+ wxe_util:call(100, <<ThisRef:32/?UI,
Winid:32/?UI,LastId:32/?UI,
(wxe_util:from_bool(Skip)):32/?UI,
UD:32/?UI,
FunID:32/?UI,
(size(EventTypeBin)):32/?UI,
- (size(ThisTypeBin)):32/?UI,
+ (size(ThisTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary,ThisTypeBin/binary>>).
%% @hidden
-disconnect_impl(Listener, Object) ->
- disconnect_impl(Listener, Object, #evh{}).
-%% @hidden
-disconnect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=_ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType}) ->
+disconnect_impl(#wx_ref{type=_ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ handler=#wx_ref{type=wxeEvtListener,ref=EvtList}}) ->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
- wxe_util:call(101, <<EvtList:32/?UI,
+ wxe_util:call(101, <<EvtList:32/?UI,
ThisRef:32/?UI,Winid:32/?UI,LastId:32/?UI,
(size(EventTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary>>).
-%% @hidden
-new_evt_listener() ->
- wxe_util:call(98, <<>>).
-
-%% @hidden
-destroy_evt_listener(#wx_ref{type=wxeEvtListener,ref=EvtList}) ->
- wxe_util:call(99, <<EvtList:32/?UI>>).
-
-%% @hidden
-get_callback(#evh{cb=Callback}) ->
- Callback.
-
-%% @hidden
-replace_fun_with_id(Evh, Id) ->
- Evh#evh{cb=Id}.
-
diff --git a/lib/wx/src/gen/wxGridCellBoolEditor.erl b/lib/wx/src/gen/wxGridCellBoolEditor.erl
index bf7e21d11d..c4d6d92618 100644
--- a/lib/wx/src/gen/wxGridCellBoolEditor.erl
+++ b/lib/wx/src/gen/wxGridCellBoolEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellBoolEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellChoiceEditor.erl b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
index 08c5f9e147..a49680ffda 100644
--- a/lib/wx/src/gen/wxGridCellChoiceEditor.erl
+++ b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellChoiceEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellFloatEditor.erl b/lib/wx/src/gen/wxGridCellFloatEditor.erl
index 4b6b3b46e1..5cd0bd6cb5 100644
--- a/lib/wx/src/gen/wxGridCellFloatEditor.erl
+++ b/lib/wx/src/gen/wxGridCellFloatEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellFloatEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellNumberEditor.erl b/lib/wx/src/gen/wxGridCellNumberEditor.erl
index 04214be6b8..7cc682a10e 100644
--- a/lib/wx/src/gen/wxGridCellNumberEditor.erl
+++ b/lib/wx/src/gen/wxGridCellNumberEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -35,6 +35,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellNumberEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellTextEditor) -> true;
parent_class(wxGridCellEditor) -> true;
diff --git a/lib/wx/src/gen/wxGridCellTextEditor.erl b/lib/wx/src/gen/wxGridCellTextEditor.erl
index 5755be8638..a024da56c4 100644
--- a/lib/wx/src/gen/wxGridCellTextEditor.erl
+++ b/lib/wx/src/gen/wxGridCellTextEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellTextEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxInitDialogEvent.erl b/lib/wx/src/gen/wxInitDialogEvent.erl
new file mode 100644
index 0000000000..c8fe6042ac
--- /dev/null
+++ b/lib/wx/src/gen/wxInitDialogEvent.erl
@@ -0,0 +1,64 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxinitdialogevent.html">wxInitDialogEvent</a>.
+%% <dl><dt>Use {@link wxEvtHandler:connect/3.} with EventType:</dt>
+%% <dd><em>init_dialog</em></dd></dl>
+%% See also the message variant {@link wxEvtHandler:wxInitDialog(). #wxInitDialog{}} event record type.
+%%
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxEvent}
+%% </p>
+%% @type wxInitDialogEvent(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxInitDialogEvent).
+-include("wxe.hrl").
+-export([]).
+
+%% inherited exports
+-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
+ resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+
+-export_type([wxInitDialogEvent/0]).
+%% @hidden
+parent_class(wxEvent) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxInitDialogEvent() :: wx:wx_object().
+ %% From wxEvent
+%% @hidden
+stopPropagation(This) -> wxEvent:stopPropagation(This).
+%% @hidden
+skip(This, Options) -> wxEvent:skip(This, Options).
+%% @hidden
+skip(This) -> wxEvent:skip(This).
+%% @hidden
+shouldPropagate(This) -> wxEvent:shouldPropagate(This).
+%% @hidden
+resumePropagation(This,PropagationLevel) -> wxEvent:resumePropagation(This,PropagationLevel).
+%% @hidden
+isCommandEvent(This) -> wxEvent:isCommandEvent(This).
+%% @hidden
+getTimestamp(This) -> wxEvent:getTimestamp(This).
+%% @hidden
+getSkipped(This) -> wxEvent:getSkipped(This).
+%% @hidden
+getId(This) -> wxEvent:getId(This).
diff --git a/lib/wx/src/gen/wxLocale.erl b/lib/wx/src/gen/wxLocale.erl
new file mode 100644
index 0000000000..a1a418bcee
--- /dev/null
+++ b/lib/wx/src/gen/wxLocale.erl
@@ -0,0 +1,278 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html">wxLocale</a>.
+%% @type wxLocale(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxLocale).
+-include("wxe.hrl").
+-export([addCatalog/2,addCatalog/4,addCatalogLookupPathPrefix/1,destroy/1,
+ getCanonicalName/1,getHeaderValue/2,getHeaderValue/3,getLanguage/1,
+ getLanguageName/1,getLocale/1,getName/1,getString/2,getString/3,getString/4,
+ getString/5,getSysName/1,getSystemEncoding/0,getSystemEncodingName/0,
+ getSystemLanguage/0,init/1,init/2,isLoaded/2,isOk/1,new/0,new/1,new/2]).
+
+%% inherited exports
+-export([parent_class/1]).
+
+-export_type([wxLocale/0]).
+%% @hidden
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxLocale() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalewxlocale">external documentation</a>.
+-spec new() -> wxLocale().
+new() ->
+ wxe_util:construct(?wxLocale_new_0,
+ <<>>).
+
+%% @equiv new(Language, [])
+-spec new(Language) -> wxLocale() when
+ Language::integer().
+
+new(Language)
+ when is_integer(Language) ->
+ 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()}.
+new(Language, Options)
+ when is_integer(Language),is_list(Options) ->
+ MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:construct(?wxLocale_new_2,
+ <<Language:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv init(This, [])
+-spec init(This) -> boolean() when
+ This::wxLocale().
+
+init(This)
+ when is_record(This, wx_ref) ->
+ 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()}.
+init(#wx_ref{type=ThisT,ref=ThisRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ MOpts = fun({language, Language}, Acc) -> [<<1:32/?UI,Language:32/?UI>>|Acc];
+ ({flags, Flags}, Acc) -> [<<2:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_Init,
+ <<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcatalog">external documentation</a>.
+-spec addCatalog(This, SzDomain) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata().
+addCatalog(#wx_ref{type=ThisT,ref=ThisRef},SzDomain)
+ when is_list(SzDomain) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ wxe_util:call(?wxLocale_AddCatalog_1,
+ <<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>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcatalog">external documentation</a>.
+%%<br /> MsgIdLanguage = ?wxLANGUAGE_DEFAULT | ?wxLANGUAGE_UNKNOWN | ?wxLANGUAGE_ABKHAZIAN | ?wxLANGUAGE_AFAR | ?wxLANGUAGE_AFRIKAANS | ?wxLANGUAGE_ALBANIAN | ?wxLANGUAGE_AMHARIC | ?wxLANGUAGE_ARABIC | ?wxLANGUAGE_ARABIC_ALGERIA | ?wxLANGUAGE_ARABIC_BAHRAIN | ?wxLANGUAGE_ARABIC_EGYPT | ?wxLANGUAGE_ARABIC_IRAQ | ?wxLANGUAGE_ARABIC_JORDAN | ?wxLANGUAGE_ARABIC_KUWAIT | ?wxLANGUAGE_ARABIC_LEBANON | ?wxLANGUAGE_ARABIC_LIBYA | ?wxLANGUAGE_ARABIC_MOROCCO | ?wxLANGUAGE_ARABIC_OMAN | ?wxLANGUAGE_ARABIC_QATAR | ?wxLANGUAGE_ARABIC_SAUDI_ARABIA | ?wxLANGUAGE_ARABIC_SUDAN | ?wxLANGUAGE_ARABIC_SYRIA | ?wxLANGUAGE_ARABIC_TUNISIA | ?wxLANGUAGE_ARABIC_UAE | ?wxLANGUAGE_ARABIC_YEMEN | ?wxLANGUAGE_ARMENIAN | ?wxLANGUAGE_ASSAMESE | ?wxLANGUAGE_AYMARA | ?wxLANGUAGE_AZERI | ?wxLANGUAGE_AZERI_CYRILLIC | ?wxLANGUAGE_AZERI_LATIN | ?wxLANGUAGE_BASHKIR | ?wxLANGUAGE_BASQUE | ?wxLANGUAGE_BELARUSIAN | ?wxLANGUAGE_BENGALI | ?wxLANGUAGE_BHUTANI | ?wxLANGUAGE_BIHARI | ?wxLANGUAGE_BISLAMA | ?wxLANGUAGE_BRETON | ?wxLANGUAGE_BULGARIAN | ?wxLANGUAGE_BURMESE | ?wxLANGUAGE_CAMBODIAN | ?wxLANGUAGE_CATALAN | ?wxLANGUAGE_CHINESE | ?wxLANGUAGE_CHINESE_SIMPLIFIED | ?wxLANGUAGE_CHINESE_TRADITIONAL | ?wxLANGUAGE_CHINESE_HONGKONG | ?wxLANGUAGE_CHINESE_MACAU | ?wxLANGUAGE_CHINESE_SINGAPORE | ?wxLANGUAGE_CHINESE_TAIWAN | ?wxLANGUAGE_CORSICAN | ?wxLANGUAGE_CROATIAN | ?wxLANGUAGE_CZECH | ?wxLANGUAGE_DANISH | ?wxLANGUAGE_DUTCH | ?wxLANGUAGE_DUTCH_BELGIAN | ?wxLANGUAGE_ENGLISH | ?wxLANGUAGE_ENGLISH_UK | ?wxLANGUAGE_ENGLISH_US | ?wxLANGUAGE_ENGLISH_AUSTRALIA | ?wxLANGUAGE_ENGLISH_BELIZE | ?wxLANGUAGE_ENGLISH_BOTSWANA | ?wxLANGUAGE_ENGLISH_CANADA | ?wxLANGUAGE_ENGLISH_CARIBBEAN | ?wxLANGUAGE_ENGLISH_DENMARK | ?wxLANGUAGE_ENGLISH_EIRE | ?wxLANGUAGE_ENGLISH_JAMAICA | ?wxLANGUAGE_ENGLISH_NEW_ZEALAND | ?wxLANGUAGE_ENGLISH_PHILIPPINES | ?wxLANGUAGE_ENGLISH_SOUTH_AFRICA | ?wxLANGUAGE_ENGLISH_TRINIDAD | ?wxLANGUAGE_ENGLISH_ZIMBABWE | ?wxLANGUAGE_ESPERANTO | ?wxLANGUAGE_ESTONIAN | ?wxLANGUAGE_FAEROESE | ?wxLANGUAGE_FARSI | ?wxLANGUAGE_FIJI | ?wxLANGUAGE_FINNISH | ?wxLANGUAGE_FRENCH | ?wxLANGUAGE_FRENCH_BELGIAN | ?wxLANGUAGE_FRENCH_CANADIAN | ?wxLANGUAGE_FRENCH_LUXEMBOURG | ?wxLANGUAGE_FRENCH_MONACO | ?wxLANGUAGE_FRENCH_SWISS | ?wxLANGUAGE_FRISIAN | ?wxLANGUAGE_GALICIAN | ?wxLANGUAGE_GEORGIAN | ?wxLANGUAGE_GERMAN | ?wxLANGUAGE_GERMAN_AUSTRIAN | ?wxLANGUAGE_GERMAN_BELGIUM | ?wxLANGUAGE_GERMAN_LIECHTENSTEIN | ?wxLANGUAGE_GERMAN_LUXEMBOURG | ?wxLANGUAGE_GERMAN_SWISS | ?wxLANGUAGE_GREEK | ?wxLANGUAGE_GREENLANDIC | ?wxLANGUAGE_GUARANI | ?wxLANGUAGE_GUJARATI | ?wxLANGUAGE_HAUSA | ?wxLANGUAGE_HEBREW | ?wxLANGUAGE_HINDI | ?wxLANGUAGE_HUNGARIAN | ?wxLANGUAGE_ICELANDIC | ?wxLANGUAGE_INDONESIAN | ?wxLANGUAGE_INTERLINGUA | ?wxLANGUAGE_INTERLINGUE | ?wxLANGUAGE_INUKTITUT | ?wxLANGUAGE_INUPIAK | ?wxLANGUAGE_IRISH | ?wxLANGUAGE_ITALIAN | ?wxLANGUAGE_ITALIAN_SWISS | ?wxLANGUAGE_JAPANESE | ?wxLANGUAGE_JAVANESE | ?wxLANGUAGE_KANNADA | ?wxLANGUAGE_KASHMIRI | ?wxLANGUAGE_KASHMIRI_INDIA | ?wxLANGUAGE_KAZAKH | ?wxLANGUAGE_KERNEWEK | ?wxLANGUAGE_KINYARWANDA | ?wxLANGUAGE_KIRGHIZ | ?wxLANGUAGE_KIRUNDI | ?wxLANGUAGE_KONKANI | ?wxLANGUAGE_KOREAN | ?wxLANGUAGE_KURDISH | ?wxLANGUAGE_LAOTHIAN | ?wxLANGUAGE_LATIN | ?wxLANGUAGE_LATVIAN | ?wxLANGUAGE_LINGALA | ?wxLANGUAGE_LITHUANIAN | ?wxLANGUAGE_MACEDONIAN | ?wxLANGUAGE_MALAGASY | ?wxLANGUAGE_MALAY | ?wxLANGUAGE_MALAYALAM | ?wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM | ?wxLANGUAGE_MALAY_MALAYSIA | ?wxLANGUAGE_MALTESE | ?wxLANGUAGE_MANIPURI | ?wxLANGUAGE_MAORI | ?wxLANGUAGE_MARATHI | ?wxLANGUAGE_MOLDAVIAN | ?wxLANGUAGE_MONGOLIAN | ?wxLANGUAGE_NAURU | ?wxLANGUAGE_NEPALI | ?wxLANGUAGE_NEPALI_INDIA | ?wxLANGUAGE_NORWEGIAN_BOKMAL | ?wxLANGUAGE_NORWEGIAN_NYNORSK | ?wxLANGUAGE_OCCITAN | ?wxLANGUAGE_ORIYA | ?wxLANGUAGE_OROMO | ?wxLANGUAGE_PASHTO | ?wxLANGUAGE_POLISH | ?wxLANGUAGE_PORTUGUESE | ?wxLANGUAGE_PORTUGUESE_BRAZILIAN | ?wxLANGUAGE_PUNJABI | ?wxLANGUAGE_QUECHUA | ?wxLANGUAGE_RHAETO_ROMANCE | ?wxLANGUAGE_ROMANIAN | ?wxLANGUAGE_RUSSIAN | ?wxLANGUAGE_RUSSIAN_UKRAINE | ?wxLANGUAGE_SAMOAN | ?wxLANGUAGE_SANGHO | ?wxLANGUAGE_SANSKRIT | ?wxLANGUAGE_SCOTS_GAELIC | ?wxLANGUAGE_SERBIAN | ?wxLANGUAGE_SERBIAN_CYRILLIC | ?wxLANGUAGE_SERBIAN_LATIN | ?wxLANGUAGE_SERBO_CROATIAN | ?wxLANGUAGE_SESOTHO | ?wxLANGUAGE_SETSWANA | ?wxLANGUAGE_SHONA | ?wxLANGUAGE_SINDHI | ?wxLANGUAGE_SINHALESE | ?wxLANGUAGE_SISWATI | ?wxLANGUAGE_SLOVAK | ?wxLANGUAGE_SLOVENIAN | ?wxLANGUAGE_SOMALI | ?wxLANGUAGE_SPANISH | ?wxLANGUAGE_SPANISH_ARGENTINA | ?wxLANGUAGE_SPANISH_BOLIVIA | ?wxLANGUAGE_SPANISH_CHILE | ?wxLANGUAGE_SPANISH_COLOMBIA | ?wxLANGUAGE_SPANISH_COSTA_RICA | ?wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC | ?wxLANGUAGE_SPANISH_ECUADOR | ?wxLANGUAGE_SPANISH_EL_SALVADOR | ?wxLANGUAGE_SPANISH_GUATEMALA | ?wxLANGUAGE_SPANISH_HONDURAS | ?wxLANGUAGE_SPANISH_MEXICAN | ?wxLANGUAGE_SPANISH_MODERN | ?wxLANGUAGE_SPANISH_NICARAGUA | ?wxLANGUAGE_SPANISH_PANAMA | ?wxLANGUAGE_SPANISH_PARAGUAY | ?wxLANGUAGE_SPANISH_PERU | ?wxLANGUAGE_SPANISH_PUERTO_RICO | ?wxLANGUAGE_SPANISH_URUGUAY | ?wxLANGUAGE_SPANISH_US | ?wxLANGUAGE_SPANISH_VENEZUELA | ?wxLANGUAGE_SUNDANESE | ?wxLANGUAGE_SWAHILI | ?wxLANGUAGE_SWEDISH | ?wxLANGUAGE_SWEDISH_FINLAND | ?wxLANGUAGE_TAGALOG | ?wxLANGUAGE_TAJIK | ?wxLANGUAGE_TAMIL | ?wxLANGUAGE_TATAR | ?wxLANGUAGE_TELUGU | ?wxLANGUAGE_THAI | ?wxLANGUAGE_TIBETAN | ?wxLANGUAGE_TIGRINYA | ?wxLANGUAGE_TONGA | ?wxLANGUAGE_TSONGA | ?wxLANGUAGE_TURKISH | ?wxLANGUAGE_TURKMEN | ?wxLANGUAGE_TWI | ?wxLANGUAGE_UIGHUR | ?wxLANGUAGE_UKRAINIAN | ?wxLANGUAGE_URDU | ?wxLANGUAGE_URDU_INDIA | ?wxLANGUAGE_URDU_PAKISTAN | ?wxLANGUAGE_UZBEK | ?wxLANGUAGE_UZBEK_CYRILLIC | ?wxLANGUAGE_UZBEK_LATIN | ?wxLANGUAGE_VIETNAMESE | ?wxLANGUAGE_VOLAPUK | ?wxLANGUAGE_WELSH | ?wxLANGUAGE_WOLOF | ?wxLANGUAGE_XHOSA | ?wxLANGUAGE_YIDDISH | ?wxLANGUAGE_YORUBA | ?wxLANGUAGE_ZHUANG | ?wxLANGUAGE_ZULU | ?wxLANGUAGE_USER_DEFINED | ?wxLANGUAGE_VALENCIAN | ?wxLANGUAGE_SAMI
+-spec addCatalog(This, SzDomain, MsgIdLanguage, MsgIdCharset) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata(), MsgIdLanguage::wx:wx_enum(), MsgIdCharset::unicode:chardata().
+addCatalog(#wx_ref{type=ThisT,ref=ThisRef},SzDomain,MsgIdLanguage,MsgIdCharset)
+ when is_list(SzDomain),is_integer(MsgIdLanguage),is_list(MsgIdCharset) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ MsgIdCharset_UC = unicode:characters_to_binary([MsgIdCharset,0]),
+ wxe_util:call(?wxLocale_AddCatalog_3,
+ <<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
+ Prefix::unicode:chardata().
+addCatalogLookupPathPrefix(Prefix)
+ when is_list(Prefix) ->
+ Prefix_UC = unicode:characters_to_binary([Prefix,0]),
+ wxe_util:cast(?wxLocale_AddCatalogLookupPathPrefix,
+ <<(byte_size(Prefix_UC)):32/?UI,(Prefix_UC)/binary, 0:(((8- ((4+byte_size(Prefix_UC)) band 16#7)) band 16#7))/unit:8>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetcanonicalname">external documentation</a>.
+-spec getCanonicalName(This) -> unicode:charlist() when
+ This::wxLocale().
+getCanonicalName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetCanonicalName,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlanguage">external documentation</a>.
+-spec getLanguage(This) -> integer() when
+ This::wxLocale().
+getLanguage(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetLanguage,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlanguagename">external documentation</a>.
+-spec getLanguageName(Lang) -> unicode:charlist() when
+ Lang::integer().
+getLanguageName(Lang)
+ when is_integer(Lang) ->
+ wxe_util:call(?wxLocale_GetLanguageName,
+ <<Lang:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlocale">external documentation</a>.
+-spec getLocale(This) -> unicode:charlist() when
+ This::wxLocale().
+getLocale(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetLocale,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetname">external documentation</a>.
+-spec getName(This) -> unicode:charlist() when
+ This::wxLocale().
+getName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetName,
+ <<ThisRef:32/?UI>>).
+
+%% @equiv getString(This,SzOrigString, [])
+-spec getString(This, SzOrigString) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata().
+
+getString(This,SzOrigString)
+ when is_record(This, wx_ref),is_list(SzOrigString) ->
+ 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()}.
+getString(#wx_ref{type=ThisT,ref=ThisRef},SzOrigString, Options)
+ when is_list(SzOrigString),is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ SzOrigString_UC = unicode:characters_to_binary([SzOrigString,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1: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>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetString_2,
+ <<ThisRef:32/?UI,(byte_size(SzOrigString_UC)):32/?UI,(SzOrigString_UC)/binary, 0:(((8- ((0+byte_size(SzOrigString_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+
+%% @equiv getString(This,SzOrigString,SzOrigString2,N, [])
+-spec getString(This, SzOrigString, SzOrigString2, N) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata(), SzOrigString2::unicode:chardata(), N::integer().
+
+getString(This,SzOrigString,SzOrigString2,N)
+ when is_record(This, wx_ref),is_list(SzOrigString),is_list(SzOrigString2),is_integer(N) ->
+ 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()}.
+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),
+ SzOrigString_UC = unicode:characters_to_binary([SzOrigString,0]),
+ SzOrigString2_UC = unicode:characters_to_binary([SzOrigString2,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1: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>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetString_4,
+ <<ThisRef:32/?UI,(byte_size(SzOrigString_UC)):32/?UI,(SzOrigString_UC)/binary, 0:(((8- ((0+byte_size(SzOrigString_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(SzOrigString2_UC)):32/?UI,(SzOrigString2_UC)/binary, 0:(((8- ((4+byte_size(SzOrigString2_UC)) band 16#7)) band 16#7))/unit:8,N:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv getHeaderValue(This,SzHeader, [])
+-spec getHeaderValue(This, SzHeader) -> unicode:charlist() when
+ This::wxLocale(), SzHeader::unicode:chardata().
+
+getHeaderValue(This,SzHeader)
+ when is_record(This, wx_ref),is_list(SzHeader) ->
+ 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()}.
+getHeaderValue(#wx_ref{type=ThisT,ref=ThisRef},SzHeader, Options)
+ when is_list(SzHeader),is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ SzHeader_UC = unicode:characters_to_binary([SzHeader,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1: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>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetHeaderValue,
+ <<ThisRef:32/?UI,(byte_size(SzHeader_UC)):32/?UI,(SzHeader_UC)/binary, 0:(((8- ((0+byte_size(SzHeader_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsysname">external documentation</a>.
+-spec getSysName(This) -> unicode:charlist() when
+ This::wxLocale().
+getSysName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetSysName,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemencoding">external documentation</a>.
+%%<br /> Res = ?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 getSystemEncoding() -> wx:wx_enum().
+getSystemEncoding() ->
+ wxe_util:call(?wxLocale_GetSystemEncoding,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemencodingname">external documentation</a>.
+-spec getSystemEncodingName() -> unicode:charlist().
+getSystemEncodingName() ->
+ wxe_util:call(?wxLocale_GetSystemEncodingName,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemlanguage">external documentation</a>.
+-spec getSystemLanguage() -> integer().
+getSystemLanguage() ->
+ wxe_util:call(?wxLocale_GetSystemLanguage,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleisloaded">external documentation</a>.
+-spec isLoaded(This, SzDomain) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata().
+isLoaded(#wx_ref{type=ThisT,ref=ThisRef},SzDomain)
+ when is_list(SzDomain) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ wxe_util:call(?wxLocale_IsLoaded,
+ <<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>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxLocale().
+isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_IsOk,
+ <<ThisRef:32/?UI>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxLocale()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxLocale),
+ wxe_util:destroy(?wxLocale_destruct,Obj),
+ ok.
diff --git a/lib/wx/src/gen/wxMemoryDC.erl b/lib/wx/src/gen/wxMemoryDC.erl
index c123f0e35d..8de412bdc7 100644
--- a/lib/wx/src/gen/wxMemoryDC.erl
+++ b/lib/wx/src/gen/wxMemoryDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxMemoryDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxMirrorDC.erl b/lib/wx/src/gen/wxMirrorDC.erl
index cfae34cb36..9a681bff2e 100644
--- a/lib/wx/src/gen/wxMirrorDC.erl
+++ b/lib/wx/src/gen/wxMirrorDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxMirrorDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxPaintDC.erl b/lib/wx/src/gen/wxPaintDC.erl
index 3c9b321496..0ff27a8c7a 100644
--- a/lib/wx/src/gen/wxPaintDC.erl
+++ b/lib/wx/src/gen/wxPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -56,6 +56,8 @@
-export_type([wxPaintDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxPopupTransientWindow.erl b/lib/wx/src/gen/wxPopupTransientWindow.erl
new file mode 100644
index 0000000000..253d33e5ac
--- /dev/null
+++ b/lib/wx/src/gen/wxPopupTransientWindow.erl
@@ -0,0 +1,506 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopuptransientwindow.html">wxPopupTransientWindow</a>.
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxPopupWindow}
+%% <br />{@link wxWindow}
+%% <br />{@link wxEvtHandler}
+%% </p>
+%% @type wxPopupTransientWindow(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxPopupTransientWindow).
+-include("wxe.hrl").
+-export([destroy/1,dismiss/1,new/0,new/1,new/2,popup/1,popup/2]).
+
+%% inherited exports
+-export([cacheBestSize/2,captureMouse/1,center/1,center/2,centerOnParent/1,
+ centerOnParent/2,centre/1,centre/2,centreOnParent/1,centreOnParent/2,
+ clearBackground/1,clientToScreen/2,clientToScreen/3,close/1,close/2,
+ connect/2,connect/3,convertDialogToPixels/2,convertPixelsToDialog/2,
+ destroyChildren/1,disable/1,disconnect/1,disconnect/2,disconnect/3,
+ enable/1,enable/2,findWindow/2,fit/1,fitInside/1,freeze/1,getAcceleratorTable/1,
+ getBackgroundColour/1,getBackgroundStyle/1,getBestSize/1,getCaret/1,
+ getCharHeight/1,getCharWidth/1,getChildren/1,getClientSize/1,getContainingSizer/1,
+ getCursor/1,getDropTarget/1,getEventHandler/1,getExtraStyle/1,getFont/1,
+ getForegroundColour/1,getGrandParent/1,getHandle/1,getHelpText/1,
+ getId/1,getLabel/1,getMaxSize/1,getMinSize/1,getName/1,getParent/1,
+ getPosition/1,getRect/1,getScreenPosition/1,getScreenRect/1,getScrollPos/2,
+ getScrollRange/2,getScrollThumb/2,getSize/1,getSizer/1,getTextExtent/2,
+ getTextExtent/3,getToolTip/1,getUpdateRegion/1,getVirtualSize/1,getWindowStyleFlag/1,
+ getWindowVariant/1,hasCapture/1,hasScrollbar/2,hasTransparentBackground/1,
+ hide/1,inheritAttributes/1,initDialog/1,invalidateBestSize/1,isEnabled/1,
+ isExposed/2,isExposed/3,isExposed/5,isRetained/1,isShown/1,isTopLevel/1,
+ layout/1,lineDown/1,lineUp/1,lower/1,makeModal/1,makeModal/2,move/2,
+ move/3,move/4,moveAfterInTabOrder/2,moveBeforeInTabOrder/2,navigate/1,
+ navigate/2,pageDown/1,pageUp/1,parent_class/1,popEventHandler/1,popEventHandler/2,
+ popupMenu/2,popupMenu/3,popupMenu/4,position/3,raise/1,refresh/1,refresh/2,
+ refreshRect/2,refreshRect/3,releaseMouse/1,removeChild/2,reparent/2,
+ screenToClient/1,screenToClient/2,scrollLines/2,scrollPages/2,scrollWindow/3,
+ scrollWindow/4,setAcceleratorTable/2,setAutoLayout/2,setBackgroundColour/2,
+ setBackgroundStyle/2,setCaret/2,setClientSize/2,setClientSize/3,setContainingSizer/2,
+ setCursor/2,setDropTarget/2,setExtraStyle/2,setFocus/1,setFocusFromKbd/1,
+ setFont/2,setForegroundColour/2,setHelpText/2,setId/2,setLabel/2,setMaxSize/2,
+ setMinSize/2,setName/2,setOwnBackgroundColour/2,setOwnFont/2,setOwnForegroundColour/2,
+ setPalette/2,setScrollPos/3,setScrollPos/4,setScrollbar/5,setScrollbar/6,
+ setSize/2,setSize/3,setSize/5,setSize/6,setSizeHints/2,setSizeHints/3,
+ setSizeHints/4,setSizer/2,setSizer/3,setSizerAndFit/2,setSizerAndFit/3,
+ setThemeEnabled/2,setToolTip/2,setVirtualSize/2,setVirtualSize/3,
+ setVirtualSizeHints/2,setVirtualSizeHints/3,setVirtualSizeHints/4,
+ setWindowStyle/2,setWindowStyleFlag/2,setWindowVariant/2,shouldInheritColours/1,
+ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
+ update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+
+-export_type([wxPopupTransientWindow/0]).
+%% @hidden
+parent_class(wxPopupWindow) -> true;
+parent_class(wxWindow) -> true;
+parent_class(wxEvtHandler) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxPopupTransientWindow() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopuptransientwindow.html#wxpopuptransientwindowwxpopuptransientwindow">external documentation</a>.
+-spec new() -> wxPopupTransientWindow().
+new() ->
+ wxe_util:construct(?wxPopupTransientWindow_new_0,
+ <<>>).
+
+%% @equiv new(Parent, [])
+-spec new(Parent) -> wxPopupTransientWindow() when
+ Parent::wxWindow:wxWindow().
+
+new(Parent)
+ when is_record(Parent, wx_ref) ->
+ 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()}.
+new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ParentT,wxWindow),
+ MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:construct(?wxPopupTransientWindow_new_2,
+ <<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv popup(This, [])
+-spec popup(This) -> ok when
+ This::wxPopupTransientWindow().
+
+popup(This)
+ when is_record(This, wx_ref) ->
+ 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
+ This::wxPopupTransientWindow(),
+ Option :: {focus, wxWindow:wxWindow()}.
+popup(#wx_ref{type=ThisT,ref=ThisRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ThisT,wxPopupTransientWindow),
+ MOpts = fun({focus, #wx_ref{type=FocusT,ref=FocusRef}}, Acc) -> ?CLASS(FocusT,wxWindow),[<<1:32/?UI,FocusRef:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:cast(?wxPopupTransientWindow_Popup,
+ <<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
+ This::wxPopupTransientWindow().
+dismiss(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxPopupTransientWindow),
+ wxe_util:cast(?wxPopupTransientWindow_Dismiss,
+ <<ThisRef:32/?UI>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxPopupTransientWindow()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxPopupTransientWindow),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
+ %% From wxPopupWindow
+%% @hidden
+position(This,PtOrigin,Size) -> wxPopupWindow:position(This,PtOrigin,Size).
+ %% From wxWindow
+%% @hidden
+warpPointer(This,X,Y) -> wxWindow:warpPointer(This,X,Y).
+%% @hidden
+validate(This) -> wxWindow:validate(This).
+%% @hidden
+updateWindowUI(This, Options) -> wxWindow:updateWindowUI(This, Options).
+%% @hidden
+updateWindowUI(This) -> wxWindow:updateWindowUI(This).
+%% @hidden
+update(This) -> wxWindow:update(This).
+%% @hidden
+transferDataToWindow(This) -> wxWindow:transferDataToWindow(This).
+%% @hidden
+transferDataFromWindow(This) -> wxWindow:transferDataFromWindow(This).
+%% @hidden
+thaw(This) -> wxWindow:thaw(This).
+%% @hidden
+show(This, Options) -> wxWindow:show(This, Options).
+%% @hidden
+show(This) -> wxWindow:show(This).
+%% @hidden
+shouldInheritColours(This) -> wxWindow:shouldInheritColours(This).
+%% @hidden
+setWindowVariant(This,Variant) -> wxWindow:setWindowVariant(This,Variant).
+%% @hidden
+setWindowStyleFlag(This,Style) -> wxWindow:setWindowStyleFlag(This,Style).
+%% @hidden
+setWindowStyle(This,Style) -> wxWindow:setWindowStyle(This,Style).
+%% @hidden
+setVirtualSizeHints(This,MinW,MinH, Options) -> wxWindow:setVirtualSizeHints(This,MinW,MinH, Options).
+%% @hidden
+setVirtualSizeHints(This,MinW,MinH) -> wxWindow:setVirtualSizeHints(This,MinW,MinH).
+%% @hidden
+setVirtualSizeHints(This,MinSize) -> wxWindow:setVirtualSizeHints(This,MinSize).
+%% @hidden
+setVirtualSize(This,X,Y) -> wxWindow:setVirtualSize(This,X,Y).
+%% @hidden
+setVirtualSize(This,Size) -> wxWindow:setVirtualSize(This,Size).
+%% @hidden
+setToolTip(This,Tip) -> wxWindow:setToolTip(This,Tip).
+%% @hidden
+setThemeEnabled(This,EnableTheme) -> wxWindow:setThemeEnabled(This,EnableTheme).
+%% @hidden
+setSizerAndFit(This,Sizer, Options) -> wxWindow:setSizerAndFit(This,Sizer, Options).
+%% @hidden
+setSizerAndFit(This,Sizer) -> wxWindow:setSizerAndFit(This,Sizer).
+%% @hidden
+setSizer(This,Sizer, Options) -> wxWindow:setSizer(This,Sizer, Options).
+%% @hidden
+setSizer(This,Sizer) -> wxWindow:setSizer(This,Sizer).
+%% @hidden
+setSizeHints(This,MinW,MinH, Options) -> wxWindow:setSizeHints(This,MinW,MinH, Options).
+%% @hidden
+setSizeHints(This,MinW,MinH) -> wxWindow:setSizeHints(This,MinW,MinH).
+%% @hidden
+setSizeHints(This,MinSize) -> wxWindow:setSizeHints(This,MinSize).
+%% @hidden
+setSize(This,X,Y,Width,Height, Options) -> wxWindow:setSize(This,X,Y,Width,Height, Options).
+%% @hidden
+setSize(This,X,Y,Width,Height) -> wxWindow:setSize(This,X,Y,Width,Height).
+%% @hidden
+setSize(This,Width,Height) -> wxWindow:setSize(This,Width,Height).
+%% @hidden
+setSize(This,Rect) -> wxWindow:setSize(This,Rect).
+%% @hidden
+setScrollPos(This,Orient,Pos, Options) -> wxWindow:setScrollPos(This,Orient,Pos, Options).
+%% @hidden
+setScrollPos(This,Orient,Pos) -> wxWindow:setScrollPos(This,Orient,Pos).
+%% @hidden
+setScrollbar(This,Orient,Pos,ThumbVisible,Range, Options) -> wxWindow:setScrollbar(This,Orient,Pos,ThumbVisible,Range, Options).
+%% @hidden
+setScrollbar(This,Orient,Pos,ThumbVisible,Range) -> wxWindow:setScrollbar(This,Orient,Pos,ThumbVisible,Range).
+%% @hidden
+setPalette(This,Pal) -> wxWindow:setPalette(This,Pal).
+%% @hidden
+setName(This,Name) -> wxWindow:setName(This,Name).
+%% @hidden
+setLabel(This,Label) -> wxWindow:setLabel(This,Label).
+%% @hidden
+setId(This,Winid) -> wxWindow:setId(This,Winid).
+%% @hidden
+setHelpText(This,Text) -> wxWindow:setHelpText(This,Text).
+%% @hidden
+setForegroundColour(This,Colour) -> wxWindow:setForegroundColour(This,Colour).
+%% @hidden
+setFont(This,Font) -> wxWindow:setFont(This,Font).
+%% @hidden
+setFocusFromKbd(This) -> wxWindow:setFocusFromKbd(This).
+%% @hidden
+setFocus(This) -> wxWindow:setFocus(This).
+%% @hidden
+setExtraStyle(This,ExStyle) -> wxWindow:setExtraStyle(This,ExStyle).
+%% @hidden
+setDropTarget(This,DropTarget) -> wxWindow:setDropTarget(This,DropTarget).
+%% @hidden
+setOwnForegroundColour(This,Colour) -> wxWindow:setOwnForegroundColour(This,Colour).
+%% @hidden
+setOwnFont(This,Font) -> wxWindow:setOwnFont(This,Font).
+%% @hidden
+setOwnBackgroundColour(This,Colour) -> wxWindow:setOwnBackgroundColour(This,Colour).
+%% @hidden
+setMinSize(This,MinSize) -> wxWindow:setMinSize(This,MinSize).
+%% @hidden
+setMaxSize(This,MaxSize) -> wxWindow:setMaxSize(This,MaxSize).
+%% @hidden
+setCursor(This,Cursor) -> wxWindow:setCursor(This,Cursor).
+%% @hidden
+setContainingSizer(This,Sizer) -> wxWindow:setContainingSizer(This,Sizer).
+%% @hidden
+setClientSize(This,Width,Height) -> wxWindow:setClientSize(This,Width,Height).
+%% @hidden
+setClientSize(This,Size) -> wxWindow:setClientSize(This,Size).
+%% @hidden
+setCaret(This,Caret) -> wxWindow:setCaret(This,Caret).
+%% @hidden
+setBackgroundStyle(This,Style) -> wxWindow:setBackgroundStyle(This,Style).
+%% @hidden
+setBackgroundColour(This,Colour) -> wxWindow:setBackgroundColour(This,Colour).
+%% @hidden
+setAutoLayout(This,AutoLayout) -> wxWindow:setAutoLayout(This,AutoLayout).
+%% @hidden
+setAcceleratorTable(This,Accel) -> wxWindow:setAcceleratorTable(This,Accel).
+%% @hidden
+scrollWindow(This,Dx,Dy, Options) -> wxWindow:scrollWindow(This,Dx,Dy, Options).
+%% @hidden
+scrollWindow(This,Dx,Dy) -> wxWindow:scrollWindow(This,Dx,Dy).
+%% @hidden
+scrollPages(This,Pages) -> wxWindow:scrollPages(This,Pages).
+%% @hidden
+scrollLines(This,Lines) -> wxWindow:scrollLines(This,Lines).
+%% @hidden
+screenToClient(This,Pt) -> wxWindow:screenToClient(This,Pt).
+%% @hidden
+screenToClient(This) -> wxWindow:screenToClient(This).
+%% @hidden
+reparent(This,NewParent) -> wxWindow:reparent(This,NewParent).
+%% @hidden
+removeChild(This,Child) -> wxWindow:removeChild(This,Child).
+%% @hidden
+releaseMouse(This) -> wxWindow:releaseMouse(This).
+%% @hidden
+refreshRect(This,Rect, Options) -> wxWindow:refreshRect(This,Rect, Options).
+%% @hidden
+refreshRect(This,Rect) -> wxWindow:refreshRect(This,Rect).
+%% @hidden
+refresh(This, Options) -> wxWindow:refresh(This, Options).
+%% @hidden
+refresh(This) -> wxWindow:refresh(This).
+%% @hidden
+raise(This) -> wxWindow:raise(This).
+%% @hidden
+popupMenu(This,Menu,X,Y) -> wxWindow:popupMenu(This,Menu,X,Y).
+%% @hidden
+popupMenu(This,Menu, Options) -> wxWindow:popupMenu(This,Menu, Options).
+%% @hidden
+popupMenu(This,Menu) -> wxWindow:popupMenu(This,Menu).
+%% @hidden
+popEventHandler(This, Options) -> wxWindow:popEventHandler(This, Options).
+%% @hidden
+popEventHandler(This) -> wxWindow:popEventHandler(This).
+%% @hidden
+pageUp(This) -> wxWindow:pageUp(This).
+%% @hidden
+pageDown(This) -> wxWindow:pageDown(This).
+%% @hidden
+navigate(This, Options) -> wxWindow:navigate(This, Options).
+%% @hidden
+navigate(This) -> wxWindow:navigate(This).
+%% @hidden
+moveBeforeInTabOrder(This,Win) -> wxWindow:moveBeforeInTabOrder(This,Win).
+%% @hidden
+moveAfterInTabOrder(This,Win) -> wxWindow:moveAfterInTabOrder(This,Win).
+%% @hidden
+move(This,X,Y, Options) -> wxWindow:move(This,X,Y, Options).
+%% @hidden
+move(This,X,Y) -> wxWindow:move(This,X,Y).
+%% @hidden
+move(This,Pt) -> wxWindow:move(This,Pt).
+%% @hidden
+makeModal(This, Options) -> wxWindow:makeModal(This, Options).
+%% @hidden
+makeModal(This) -> wxWindow:makeModal(This).
+%% @hidden
+lower(This) -> wxWindow:lower(This).
+%% @hidden
+lineUp(This) -> wxWindow:lineUp(This).
+%% @hidden
+lineDown(This) -> wxWindow:lineDown(This).
+%% @hidden
+layout(This) -> wxWindow:layout(This).
+%% @hidden
+isTopLevel(This) -> wxWindow:isTopLevel(This).
+%% @hidden
+isShown(This) -> wxWindow:isShown(This).
+%% @hidden
+isRetained(This) -> wxWindow:isRetained(This).
+%% @hidden
+isExposed(This,X,Y,W,H) -> wxWindow:isExposed(This,X,Y,W,H).
+%% @hidden
+isExposed(This,X,Y) -> wxWindow:isExposed(This,X,Y).
+%% @hidden
+isExposed(This,Pt) -> wxWindow:isExposed(This,Pt).
+%% @hidden
+isEnabled(This) -> wxWindow:isEnabled(This).
+%% @hidden
+invalidateBestSize(This) -> wxWindow:invalidateBestSize(This).
+%% @hidden
+initDialog(This) -> wxWindow:initDialog(This).
+%% @hidden
+inheritAttributes(This) -> wxWindow:inheritAttributes(This).
+%% @hidden
+hide(This) -> wxWindow:hide(This).
+%% @hidden
+hasTransparentBackground(This) -> wxWindow:hasTransparentBackground(This).
+%% @hidden
+hasScrollbar(This,Orient) -> wxWindow:hasScrollbar(This,Orient).
+%% @hidden
+hasCapture(This) -> wxWindow:hasCapture(This).
+%% @hidden
+getWindowVariant(This) -> wxWindow:getWindowVariant(This).
+%% @hidden
+getWindowStyleFlag(This) -> wxWindow:getWindowStyleFlag(This).
+%% @hidden
+getVirtualSize(This) -> wxWindow:getVirtualSize(This).
+%% @hidden
+getUpdateRegion(This) -> wxWindow:getUpdateRegion(This).
+%% @hidden
+getToolTip(This) -> wxWindow:getToolTip(This).
+%% @hidden
+getTextExtent(This,String, Options) -> wxWindow:getTextExtent(This,String, Options).
+%% @hidden
+getTextExtent(This,String) -> wxWindow:getTextExtent(This,String).
+%% @hidden
+getSizer(This) -> wxWindow:getSizer(This).
+%% @hidden
+getSize(This) -> wxWindow:getSize(This).
+%% @hidden
+getScrollThumb(This,Orient) -> wxWindow:getScrollThumb(This,Orient).
+%% @hidden
+getScrollRange(This,Orient) -> wxWindow:getScrollRange(This,Orient).
+%% @hidden
+getScrollPos(This,Orient) -> wxWindow:getScrollPos(This,Orient).
+%% @hidden
+getScreenRect(This) -> wxWindow:getScreenRect(This).
+%% @hidden
+getScreenPosition(This) -> wxWindow:getScreenPosition(This).
+%% @hidden
+getRect(This) -> wxWindow:getRect(This).
+%% @hidden
+getPosition(This) -> wxWindow:getPosition(This).
+%% @hidden
+getParent(This) -> wxWindow:getParent(This).
+%% @hidden
+getName(This) -> wxWindow:getName(This).
+%% @hidden
+getMinSize(This) -> wxWindow:getMinSize(This).
+%% @hidden
+getMaxSize(This) -> wxWindow:getMaxSize(This).
+%% @hidden
+getLabel(This) -> wxWindow:getLabel(This).
+%% @hidden
+getId(This) -> wxWindow:getId(This).
+%% @hidden
+getHelpText(This) -> wxWindow:getHelpText(This).
+%% @hidden
+getHandle(This) -> wxWindow:getHandle(This).
+%% @hidden
+getGrandParent(This) -> wxWindow:getGrandParent(This).
+%% @hidden
+getForegroundColour(This) -> wxWindow:getForegroundColour(This).
+%% @hidden
+getFont(This) -> wxWindow:getFont(This).
+%% @hidden
+getExtraStyle(This) -> wxWindow:getExtraStyle(This).
+%% @hidden
+getEventHandler(This) -> wxWindow:getEventHandler(This).
+%% @hidden
+getDropTarget(This) -> wxWindow:getDropTarget(This).
+%% @hidden
+getCursor(This) -> wxWindow:getCursor(This).
+%% @hidden
+getContainingSizer(This) -> wxWindow:getContainingSizer(This).
+%% @hidden
+getClientSize(This) -> wxWindow:getClientSize(This).
+%% @hidden
+getChildren(This) -> wxWindow:getChildren(This).
+%% @hidden
+getCharWidth(This) -> wxWindow:getCharWidth(This).
+%% @hidden
+getCharHeight(This) -> wxWindow:getCharHeight(This).
+%% @hidden
+getCaret(This) -> wxWindow:getCaret(This).
+%% @hidden
+getBestSize(This) -> wxWindow:getBestSize(This).
+%% @hidden
+getBackgroundStyle(This) -> wxWindow:getBackgroundStyle(This).
+%% @hidden
+getBackgroundColour(This) -> wxWindow:getBackgroundColour(This).
+%% @hidden
+getAcceleratorTable(This) -> wxWindow:getAcceleratorTable(This).
+%% @hidden
+freeze(This) -> wxWindow:freeze(This).
+%% @hidden
+fitInside(This) -> wxWindow:fitInside(This).
+%% @hidden
+fit(This) -> wxWindow:fit(This).
+%% @hidden
+findWindow(This,Winid) -> wxWindow:findWindow(This,Winid).
+%% @hidden
+enable(This, Options) -> wxWindow:enable(This, Options).
+%% @hidden
+enable(This) -> wxWindow:enable(This).
+%% @hidden
+disable(This) -> wxWindow:disable(This).
+%% @hidden
+destroyChildren(This) -> wxWindow:destroyChildren(This).
+%% @hidden
+convertPixelsToDialog(This,Sz) -> wxWindow:convertPixelsToDialog(This,Sz).
+%% @hidden
+convertDialogToPixels(This,Sz) -> wxWindow:convertDialogToPixels(This,Sz).
+%% @hidden
+close(This, Options) -> wxWindow:close(This, Options).
+%% @hidden
+close(This) -> wxWindow:close(This).
+%% @hidden
+clientToScreen(This,X,Y) -> wxWindow:clientToScreen(This,X,Y).
+%% @hidden
+clientToScreen(This,Pt) -> wxWindow:clientToScreen(This,Pt).
+%% @hidden
+clearBackground(This) -> wxWindow:clearBackground(This).
+%% @hidden
+centreOnParent(This, Options) -> wxWindow:centreOnParent(This, Options).
+%% @hidden
+centreOnParent(This) -> wxWindow:centreOnParent(This).
+%% @hidden
+centre(This, Options) -> wxWindow:centre(This, Options).
+%% @hidden
+centre(This) -> wxWindow:centre(This).
+%% @hidden
+centerOnParent(This, Options) -> wxWindow:centerOnParent(This, Options).
+%% @hidden
+centerOnParent(This) -> wxWindow:centerOnParent(This).
+%% @hidden
+center(This, Options) -> wxWindow:center(This, Options).
+%% @hidden
+center(This) -> wxWindow:center(This).
+%% @hidden
+captureMouse(This) -> wxWindow:captureMouse(This).
+%% @hidden
+cacheBestSize(This,Size) -> wxWindow:cacheBestSize(This,Size).
+ %% From wxEvtHandler
+%% @hidden
+disconnect(This,EventType, Options) -> wxEvtHandler:disconnect(This,EventType, Options).
+%% @hidden
+disconnect(This,EventType) -> wxEvtHandler:disconnect(This,EventType).
+%% @hidden
+disconnect(This) -> wxEvtHandler:disconnect(This).
+%% @hidden
+connect(This,EventType, Options) -> wxEvtHandler:connect(This,EventType, Options).
+%% @hidden
+connect(This,EventType) -> wxEvtHandler:connect(This,EventType).
diff --git a/lib/wx/src/gen/wxPopupWindow.erl b/lib/wx/src/gen/wxPopupWindow.erl
new file mode 100644
index 0000000000..415185d574
--- /dev/null
+++ b/lib/wx/src/gen/wxPopupWindow.erl
@@ -0,0 +1,503 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopupwindow.html">wxPopupWindow</a>.
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxWindow}
+%% <br />{@link wxEvtHandler}
+%% </p>
+%% @type wxPopupWindow(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxPopupWindow).
+-include("wxe.hrl").
+-export([create/2,create/3,destroy/1,new/0,new/1,new/2,position/3]).
+
+%% inherited exports
+-export([cacheBestSize/2,captureMouse/1,center/1,center/2,centerOnParent/1,
+ centerOnParent/2,centre/1,centre/2,centreOnParent/1,centreOnParent/2,
+ clearBackground/1,clientToScreen/2,clientToScreen/3,close/1,close/2,
+ connect/2,connect/3,convertDialogToPixels/2,convertPixelsToDialog/2,
+ destroyChildren/1,disable/1,disconnect/1,disconnect/2,disconnect/3,
+ enable/1,enable/2,findWindow/2,fit/1,fitInside/1,freeze/1,getAcceleratorTable/1,
+ getBackgroundColour/1,getBackgroundStyle/1,getBestSize/1,getCaret/1,
+ getCharHeight/1,getCharWidth/1,getChildren/1,getClientSize/1,getContainingSizer/1,
+ getCursor/1,getDropTarget/1,getEventHandler/1,getExtraStyle/1,getFont/1,
+ getForegroundColour/1,getGrandParent/1,getHandle/1,getHelpText/1,
+ getId/1,getLabel/1,getMaxSize/1,getMinSize/1,getName/1,getParent/1,
+ getPosition/1,getRect/1,getScreenPosition/1,getScreenRect/1,getScrollPos/2,
+ getScrollRange/2,getScrollThumb/2,getSize/1,getSizer/1,getTextExtent/2,
+ getTextExtent/3,getToolTip/1,getUpdateRegion/1,getVirtualSize/1,getWindowStyleFlag/1,
+ getWindowVariant/1,hasCapture/1,hasScrollbar/2,hasTransparentBackground/1,
+ hide/1,inheritAttributes/1,initDialog/1,invalidateBestSize/1,isEnabled/1,
+ isExposed/2,isExposed/3,isExposed/5,isRetained/1,isShown/1,isTopLevel/1,
+ layout/1,lineDown/1,lineUp/1,lower/1,makeModal/1,makeModal/2,move/2,
+ move/3,move/4,moveAfterInTabOrder/2,moveBeforeInTabOrder/2,navigate/1,
+ navigate/2,pageDown/1,pageUp/1,parent_class/1,popEventHandler/1,popEventHandler/2,
+ popupMenu/2,popupMenu/3,popupMenu/4,raise/1,refresh/1,refresh/2,refreshRect/2,
+ refreshRect/3,releaseMouse/1,removeChild/2,reparent/2,screenToClient/1,
+ screenToClient/2,scrollLines/2,scrollPages/2,scrollWindow/3,scrollWindow/4,
+ setAcceleratorTable/2,setAutoLayout/2,setBackgroundColour/2,setBackgroundStyle/2,
+ setCaret/2,setClientSize/2,setClientSize/3,setContainingSizer/2,setCursor/2,
+ setDropTarget/2,setExtraStyle/2,setFocus/1,setFocusFromKbd/1,setFont/2,
+ setForegroundColour/2,setHelpText/2,setId/2,setLabel/2,setMaxSize/2,
+ setMinSize/2,setName/2,setOwnBackgroundColour/2,setOwnFont/2,setOwnForegroundColour/2,
+ setPalette/2,setScrollPos/3,setScrollPos/4,setScrollbar/5,setScrollbar/6,
+ setSize/2,setSize/3,setSize/5,setSize/6,setSizeHints/2,setSizeHints/3,
+ setSizeHints/4,setSizer/2,setSizer/3,setSizerAndFit/2,setSizerAndFit/3,
+ setThemeEnabled/2,setToolTip/2,setVirtualSize/2,setVirtualSize/3,
+ setVirtualSizeHints/2,setVirtualSizeHints/3,setVirtualSizeHints/4,
+ setWindowStyle/2,setWindowStyleFlag/2,setWindowVariant/2,shouldInheritColours/1,
+ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1,
+ update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]).
+
+-export_type([wxPopupWindow/0]).
+%% @hidden
+parent_class(wxWindow) -> true;
+parent_class(wxEvtHandler) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxPopupWindow() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopupwindow.html#wxpopupwindowwxpopupwindow">external documentation</a>.
+-spec new() -> wxPopupWindow().
+new() ->
+ wxe_util:construct(?wxPopupWindow_new_0,
+ <<>>).
+
+%% @equiv new(Parent, [])
+-spec new(Parent) -> wxPopupWindow() when
+ Parent::wxWindow:wxWindow().
+
+new(Parent)
+ when is_record(Parent, wx_ref) ->
+ 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()}.
+new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ParentT,wxWindow),
+ MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:construct(?wxPopupWindow_new_2,
+ <<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv create(This,Parent, [])
+-spec create(This, Parent) -> boolean() when
+ This::wxPopupWindow(), Parent::wxWindow:wxWindow().
+
+create(This,Parent)
+ when is_record(This, wx_ref),is_record(Parent, wx_ref) ->
+ 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()}.
+create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ThisT,wxPopupWindow),
+ ?CLASS(ParentT,wxWindow),
+ MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxPopupWindow_Create,
+ <<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
+ 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) ->
+ ?CLASS(ThisT,wxPopupWindow),
+ wxe_util:cast(?wxPopupWindow_Position,
+ <<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.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxPopupWindow),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
+ %% From wxWindow
+%% @hidden
+warpPointer(This,X,Y) -> wxWindow:warpPointer(This,X,Y).
+%% @hidden
+validate(This) -> wxWindow:validate(This).
+%% @hidden
+updateWindowUI(This, Options) -> wxWindow:updateWindowUI(This, Options).
+%% @hidden
+updateWindowUI(This) -> wxWindow:updateWindowUI(This).
+%% @hidden
+update(This) -> wxWindow:update(This).
+%% @hidden
+transferDataToWindow(This) -> wxWindow:transferDataToWindow(This).
+%% @hidden
+transferDataFromWindow(This) -> wxWindow:transferDataFromWindow(This).
+%% @hidden
+thaw(This) -> wxWindow:thaw(This).
+%% @hidden
+show(This, Options) -> wxWindow:show(This, Options).
+%% @hidden
+show(This) -> wxWindow:show(This).
+%% @hidden
+shouldInheritColours(This) -> wxWindow:shouldInheritColours(This).
+%% @hidden
+setWindowVariant(This,Variant) -> wxWindow:setWindowVariant(This,Variant).
+%% @hidden
+setWindowStyleFlag(This,Style) -> wxWindow:setWindowStyleFlag(This,Style).
+%% @hidden
+setWindowStyle(This,Style) -> wxWindow:setWindowStyle(This,Style).
+%% @hidden
+setVirtualSizeHints(This,MinW,MinH, Options) -> wxWindow:setVirtualSizeHints(This,MinW,MinH, Options).
+%% @hidden
+setVirtualSizeHints(This,MinW,MinH) -> wxWindow:setVirtualSizeHints(This,MinW,MinH).
+%% @hidden
+setVirtualSizeHints(This,MinSize) -> wxWindow:setVirtualSizeHints(This,MinSize).
+%% @hidden
+setVirtualSize(This,X,Y) -> wxWindow:setVirtualSize(This,X,Y).
+%% @hidden
+setVirtualSize(This,Size) -> wxWindow:setVirtualSize(This,Size).
+%% @hidden
+setToolTip(This,Tip) -> wxWindow:setToolTip(This,Tip).
+%% @hidden
+setThemeEnabled(This,EnableTheme) -> wxWindow:setThemeEnabled(This,EnableTheme).
+%% @hidden
+setSizerAndFit(This,Sizer, Options) -> wxWindow:setSizerAndFit(This,Sizer, Options).
+%% @hidden
+setSizerAndFit(This,Sizer) -> wxWindow:setSizerAndFit(This,Sizer).
+%% @hidden
+setSizer(This,Sizer, Options) -> wxWindow:setSizer(This,Sizer, Options).
+%% @hidden
+setSizer(This,Sizer) -> wxWindow:setSizer(This,Sizer).
+%% @hidden
+setSizeHints(This,MinW,MinH, Options) -> wxWindow:setSizeHints(This,MinW,MinH, Options).
+%% @hidden
+setSizeHints(This,MinW,MinH) -> wxWindow:setSizeHints(This,MinW,MinH).
+%% @hidden
+setSizeHints(This,MinSize) -> wxWindow:setSizeHints(This,MinSize).
+%% @hidden
+setSize(This,X,Y,Width,Height, Options) -> wxWindow:setSize(This,X,Y,Width,Height, Options).
+%% @hidden
+setSize(This,X,Y,Width,Height) -> wxWindow:setSize(This,X,Y,Width,Height).
+%% @hidden
+setSize(This,Width,Height) -> wxWindow:setSize(This,Width,Height).
+%% @hidden
+setSize(This,Rect) -> wxWindow:setSize(This,Rect).
+%% @hidden
+setScrollPos(This,Orient,Pos, Options) -> wxWindow:setScrollPos(This,Orient,Pos, Options).
+%% @hidden
+setScrollPos(This,Orient,Pos) -> wxWindow:setScrollPos(This,Orient,Pos).
+%% @hidden
+setScrollbar(This,Orient,Pos,ThumbVisible,Range, Options) -> wxWindow:setScrollbar(This,Orient,Pos,ThumbVisible,Range, Options).
+%% @hidden
+setScrollbar(This,Orient,Pos,ThumbVisible,Range) -> wxWindow:setScrollbar(This,Orient,Pos,ThumbVisible,Range).
+%% @hidden
+setPalette(This,Pal) -> wxWindow:setPalette(This,Pal).
+%% @hidden
+setName(This,Name) -> wxWindow:setName(This,Name).
+%% @hidden
+setLabel(This,Label) -> wxWindow:setLabel(This,Label).
+%% @hidden
+setId(This,Winid) -> wxWindow:setId(This,Winid).
+%% @hidden
+setHelpText(This,Text) -> wxWindow:setHelpText(This,Text).
+%% @hidden
+setForegroundColour(This,Colour) -> wxWindow:setForegroundColour(This,Colour).
+%% @hidden
+setFont(This,Font) -> wxWindow:setFont(This,Font).
+%% @hidden
+setFocusFromKbd(This) -> wxWindow:setFocusFromKbd(This).
+%% @hidden
+setFocus(This) -> wxWindow:setFocus(This).
+%% @hidden
+setExtraStyle(This,ExStyle) -> wxWindow:setExtraStyle(This,ExStyle).
+%% @hidden
+setDropTarget(This,DropTarget) -> wxWindow:setDropTarget(This,DropTarget).
+%% @hidden
+setOwnForegroundColour(This,Colour) -> wxWindow:setOwnForegroundColour(This,Colour).
+%% @hidden
+setOwnFont(This,Font) -> wxWindow:setOwnFont(This,Font).
+%% @hidden
+setOwnBackgroundColour(This,Colour) -> wxWindow:setOwnBackgroundColour(This,Colour).
+%% @hidden
+setMinSize(This,MinSize) -> wxWindow:setMinSize(This,MinSize).
+%% @hidden
+setMaxSize(This,MaxSize) -> wxWindow:setMaxSize(This,MaxSize).
+%% @hidden
+setCursor(This,Cursor) -> wxWindow:setCursor(This,Cursor).
+%% @hidden
+setContainingSizer(This,Sizer) -> wxWindow:setContainingSizer(This,Sizer).
+%% @hidden
+setClientSize(This,Width,Height) -> wxWindow:setClientSize(This,Width,Height).
+%% @hidden
+setClientSize(This,Size) -> wxWindow:setClientSize(This,Size).
+%% @hidden
+setCaret(This,Caret) -> wxWindow:setCaret(This,Caret).
+%% @hidden
+setBackgroundStyle(This,Style) -> wxWindow:setBackgroundStyle(This,Style).
+%% @hidden
+setBackgroundColour(This,Colour) -> wxWindow:setBackgroundColour(This,Colour).
+%% @hidden
+setAutoLayout(This,AutoLayout) -> wxWindow:setAutoLayout(This,AutoLayout).
+%% @hidden
+setAcceleratorTable(This,Accel) -> wxWindow:setAcceleratorTable(This,Accel).
+%% @hidden
+scrollWindow(This,Dx,Dy, Options) -> wxWindow:scrollWindow(This,Dx,Dy, Options).
+%% @hidden
+scrollWindow(This,Dx,Dy) -> wxWindow:scrollWindow(This,Dx,Dy).
+%% @hidden
+scrollPages(This,Pages) -> wxWindow:scrollPages(This,Pages).
+%% @hidden
+scrollLines(This,Lines) -> wxWindow:scrollLines(This,Lines).
+%% @hidden
+screenToClient(This,Pt) -> wxWindow:screenToClient(This,Pt).
+%% @hidden
+screenToClient(This) -> wxWindow:screenToClient(This).
+%% @hidden
+reparent(This,NewParent) -> wxWindow:reparent(This,NewParent).
+%% @hidden
+removeChild(This,Child) -> wxWindow:removeChild(This,Child).
+%% @hidden
+releaseMouse(This) -> wxWindow:releaseMouse(This).
+%% @hidden
+refreshRect(This,Rect, Options) -> wxWindow:refreshRect(This,Rect, Options).
+%% @hidden
+refreshRect(This,Rect) -> wxWindow:refreshRect(This,Rect).
+%% @hidden
+refresh(This, Options) -> wxWindow:refresh(This, Options).
+%% @hidden
+refresh(This) -> wxWindow:refresh(This).
+%% @hidden
+raise(This) -> wxWindow:raise(This).
+%% @hidden
+popupMenu(This,Menu,X,Y) -> wxWindow:popupMenu(This,Menu,X,Y).
+%% @hidden
+popupMenu(This,Menu, Options) -> wxWindow:popupMenu(This,Menu, Options).
+%% @hidden
+popupMenu(This,Menu) -> wxWindow:popupMenu(This,Menu).
+%% @hidden
+popEventHandler(This, Options) -> wxWindow:popEventHandler(This, Options).
+%% @hidden
+popEventHandler(This) -> wxWindow:popEventHandler(This).
+%% @hidden
+pageUp(This) -> wxWindow:pageUp(This).
+%% @hidden
+pageDown(This) -> wxWindow:pageDown(This).
+%% @hidden
+navigate(This, Options) -> wxWindow:navigate(This, Options).
+%% @hidden
+navigate(This) -> wxWindow:navigate(This).
+%% @hidden
+moveBeforeInTabOrder(This,Win) -> wxWindow:moveBeforeInTabOrder(This,Win).
+%% @hidden
+moveAfterInTabOrder(This,Win) -> wxWindow:moveAfterInTabOrder(This,Win).
+%% @hidden
+move(This,X,Y, Options) -> wxWindow:move(This,X,Y, Options).
+%% @hidden
+move(This,X,Y) -> wxWindow:move(This,X,Y).
+%% @hidden
+move(This,Pt) -> wxWindow:move(This,Pt).
+%% @hidden
+makeModal(This, Options) -> wxWindow:makeModal(This, Options).
+%% @hidden
+makeModal(This) -> wxWindow:makeModal(This).
+%% @hidden
+lower(This) -> wxWindow:lower(This).
+%% @hidden
+lineUp(This) -> wxWindow:lineUp(This).
+%% @hidden
+lineDown(This) -> wxWindow:lineDown(This).
+%% @hidden
+layout(This) -> wxWindow:layout(This).
+%% @hidden
+isTopLevel(This) -> wxWindow:isTopLevel(This).
+%% @hidden
+isShown(This) -> wxWindow:isShown(This).
+%% @hidden
+isRetained(This) -> wxWindow:isRetained(This).
+%% @hidden
+isExposed(This,X,Y,W,H) -> wxWindow:isExposed(This,X,Y,W,H).
+%% @hidden
+isExposed(This,X,Y) -> wxWindow:isExposed(This,X,Y).
+%% @hidden
+isExposed(This,Pt) -> wxWindow:isExposed(This,Pt).
+%% @hidden
+isEnabled(This) -> wxWindow:isEnabled(This).
+%% @hidden
+invalidateBestSize(This) -> wxWindow:invalidateBestSize(This).
+%% @hidden
+initDialog(This) -> wxWindow:initDialog(This).
+%% @hidden
+inheritAttributes(This) -> wxWindow:inheritAttributes(This).
+%% @hidden
+hide(This) -> wxWindow:hide(This).
+%% @hidden
+hasTransparentBackground(This) -> wxWindow:hasTransparentBackground(This).
+%% @hidden
+hasScrollbar(This,Orient) -> wxWindow:hasScrollbar(This,Orient).
+%% @hidden
+hasCapture(This) -> wxWindow:hasCapture(This).
+%% @hidden
+getWindowVariant(This) -> wxWindow:getWindowVariant(This).
+%% @hidden
+getWindowStyleFlag(This) -> wxWindow:getWindowStyleFlag(This).
+%% @hidden
+getVirtualSize(This) -> wxWindow:getVirtualSize(This).
+%% @hidden
+getUpdateRegion(This) -> wxWindow:getUpdateRegion(This).
+%% @hidden
+getToolTip(This) -> wxWindow:getToolTip(This).
+%% @hidden
+getTextExtent(This,String, Options) -> wxWindow:getTextExtent(This,String, Options).
+%% @hidden
+getTextExtent(This,String) -> wxWindow:getTextExtent(This,String).
+%% @hidden
+getSizer(This) -> wxWindow:getSizer(This).
+%% @hidden
+getSize(This) -> wxWindow:getSize(This).
+%% @hidden
+getScrollThumb(This,Orient) -> wxWindow:getScrollThumb(This,Orient).
+%% @hidden
+getScrollRange(This,Orient) -> wxWindow:getScrollRange(This,Orient).
+%% @hidden
+getScrollPos(This,Orient) -> wxWindow:getScrollPos(This,Orient).
+%% @hidden
+getScreenRect(This) -> wxWindow:getScreenRect(This).
+%% @hidden
+getScreenPosition(This) -> wxWindow:getScreenPosition(This).
+%% @hidden
+getRect(This) -> wxWindow:getRect(This).
+%% @hidden
+getPosition(This) -> wxWindow:getPosition(This).
+%% @hidden
+getParent(This) -> wxWindow:getParent(This).
+%% @hidden
+getName(This) -> wxWindow:getName(This).
+%% @hidden
+getMinSize(This) -> wxWindow:getMinSize(This).
+%% @hidden
+getMaxSize(This) -> wxWindow:getMaxSize(This).
+%% @hidden
+getLabel(This) -> wxWindow:getLabel(This).
+%% @hidden
+getId(This) -> wxWindow:getId(This).
+%% @hidden
+getHelpText(This) -> wxWindow:getHelpText(This).
+%% @hidden
+getHandle(This) -> wxWindow:getHandle(This).
+%% @hidden
+getGrandParent(This) -> wxWindow:getGrandParent(This).
+%% @hidden
+getForegroundColour(This) -> wxWindow:getForegroundColour(This).
+%% @hidden
+getFont(This) -> wxWindow:getFont(This).
+%% @hidden
+getExtraStyle(This) -> wxWindow:getExtraStyle(This).
+%% @hidden
+getEventHandler(This) -> wxWindow:getEventHandler(This).
+%% @hidden
+getDropTarget(This) -> wxWindow:getDropTarget(This).
+%% @hidden
+getCursor(This) -> wxWindow:getCursor(This).
+%% @hidden
+getContainingSizer(This) -> wxWindow:getContainingSizer(This).
+%% @hidden
+getClientSize(This) -> wxWindow:getClientSize(This).
+%% @hidden
+getChildren(This) -> wxWindow:getChildren(This).
+%% @hidden
+getCharWidth(This) -> wxWindow:getCharWidth(This).
+%% @hidden
+getCharHeight(This) -> wxWindow:getCharHeight(This).
+%% @hidden
+getCaret(This) -> wxWindow:getCaret(This).
+%% @hidden
+getBestSize(This) -> wxWindow:getBestSize(This).
+%% @hidden
+getBackgroundStyle(This) -> wxWindow:getBackgroundStyle(This).
+%% @hidden
+getBackgroundColour(This) -> wxWindow:getBackgroundColour(This).
+%% @hidden
+getAcceleratorTable(This) -> wxWindow:getAcceleratorTable(This).
+%% @hidden
+freeze(This) -> wxWindow:freeze(This).
+%% @hidden
+fitInside(This) -> wxWindow:fitInside(This).
+%% @hidden
+fit(This) -> wxWindow:fit(This).
+%% @hidden
+findWindow(This,Winid) -> wxWindow:findWindow(This,Winid).
+%% @hidden
+enable(This, Options) -> wxWindow:enable(This, Options).
+%% @hidden
+enable(This) -> wxWindow:enable(This).
+%% @hidden
+disable(This) -> wxWindow:disable(This).
+%% @hidden
+destroyChildren(This) -> wxWindow:destroyChildren(This).
+%% @hidden
+convertPixelsToDialog(This,Sz) -> wxWindow:convertPixelsToDialog(This,Sz).
+%% @hidden
+convertDialogToPixels(This,Sz) -> wxWindow:convertDialogToPixels(This,Sz).
+%% @hidden
+close(This, Options) -> wxWindow:close(This, Options).
+%% @hidden
+close(This) -> wxWindow:close(This).
+%% @hidden
+clientToScreen(This,X,Y) -> wxWindow:clientToScreen(This,X,Y).
+%% @hidden
+clientToScreen(This,Pt) -> wxWindow:clientToScreen(This,Pt).
+%% @hidden
+clearBackground(This) -> wxWindow:clearBackground(This).
+%% @hidden
+centreOnParent(This, Options) -> wxWindow:centreOnParent(This, Options).
+%% @hidden
+centreOnParent(This) -> wxWindow:centreOnParent(This).
+%% @hidden
+centre(This, Options) -> wxWindow:centre(This, Options).
+%% @hidden
+centre(This) -> wxWindow:centre(This).
+%% @hidden
+centerOnParent(This, Options) -> wxWindow:centerOnParent(This, Options).
+%% @hidden
+centerOnParent(This) -> wxWindow:centerOnParent(This).
+%% @hidden
+center(This, Options) -> wxWindow:center(This, Options).
+%% @hidden
+center(This) -> wxWindow:center(This).
+%% @hidden
+captureMouse(This) -> wxWindow:captureMouse(This).
+%% @hidden
+cacheBestSize(This,Size) -> wxWindow:cacheBestSize(This,Size).
+ %% From wxEvtHandler
+%% @hidden
+disconnect(This,EventType, Options) -> wxEvtHandler:disconnect(This,EventType, Options).
+%% @hidden
+disconnect(This,EventType) -> wxEvtHandler:disconnect(This,EventType).
+%% @hidden
+disconnect(This) -> wxEvtHandler:disconnect(This).
+%% @hidden
+connect(This,EventType, Options) -> wxEvtHandler:connect(This,EventType, Options).
+%% @hidden
+connect(This,EventType) -> wxEvtHandler:connect(This,EventType).
diff --git a/lib/wx/src/gen/wxPostScriptDC.erl b/lib/wx/src/gen/wxPostScriptDC.erl
index e0b22c87eb..e7e498efa1 100644
--- a/lib/wx/src/gen/wxPostScriptDC.erl
+++ b/lib/wx/src/gen/wxPostScriptDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -55,6 +55,8 @@
-export_type([wxPostScriptDC/0]).
-deprecated([getResolution/0,setResolution/1]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxScreenDC.erl b/lib/wx/src/gen/wxScreenDC.erl
index 54bdc2d351..21ca4bacfc 100644
--- a/lib/wx/src/gen/wxScreenDC.erl
+++ b/lib/wx/src/gen/wxScreenDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxScreenDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxTextCtrl.erl b/lib/wx/src/gen/wxTextCtrl.erl
index cb85652ceb..7e6852b9c8 100644
--- a/lib/wx/src/gen/wxTextCtrl.erl
+++ b/lib/wx/src/gen/wxTextCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,8 +29,8 @@
-module(wxTextCtrl).
-include("wxe.hrl").
--export([appendText/2,canCopy/1,canCut/1,canPaste/1,canRedo/1,canUndo/1,clear/1,
- copy/1,create/3,create/4,cut/1,destroy/1,discardEdits/1,emulateKeyPress/2,
+-export([appendText/2,canCopy/1,canCut/1,canPaste/1,canRedo/1,canUndo/1,changeValue/2,
+ clear/1,copy/1,create/3,create/4,cut/1,destroy/1,discardEdits/1,emulateKeyPress/2,
getDefaultStyle/1,getInsertionPoint/1,getLastPosition/1,getLineLength/2,
getLineText/2,getNumberOfLines/1,getRange/3,getSelection/1,getStringSelection/1,
getStyle/3,getValue/1,isEditable/1,isModified/1,isMultiLine/1,isSingleLine/1,
@@ -232,6 +232,16 @@ discardEdits(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:cast(?wxTextCtrl_DiscardEdits,
<<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
+ This::wxTextCtrl(), Value::unicode:chardata().
+changeValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
+ when is_list(Value) ->
+ ?CLASS(ThisT,wxTextCtrl),
+ Value_UC = unicode:characters_to_binary([Value,0]),
+ wxe_util:cast(?wxTextCtrl_ChangeValue,
+ <<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#wxtextctrlemulatekeypress">external documentation</a>.
-spec emulateKeyPress(This, Event) -> boolean() when
This::wxTextCtrl(), Event::wxKeyEvent:wxKeyEvent().
diff --git a/lib/wx/src/gen/wxWindowDC.erl b/lib/wx/src/gen/wxWindowDC.erl
index f5c482d8ca..6bb303cfe6 100644
--- a/lib/wx/src/gen/wxWindowDC.erl
+++ b/lib/wx/src/gen/wxWindowDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -55,6 +55,8 @@
-export_type([wxWindowDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wx_misc.erl b/lib/wx/src/gen/wx_misc.erl
index 96912ce651..397d48b727 100644
--- a/lib/wx/src/gen/wx_misc.erl
+++ b/lib/wx/src/gen/wx_misc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,6 +30,8 @@
launchDefaultBrowser/2,newId/0,registerId/1,setDetectableAutoRepeat/1,
shell/0,shell/1,shutdown/1]).
+-export([displaySize/0,setCursor/1]).
+
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxgetkeystate">external documentation</a>.
%%<br /> Key = ?WXK_BACK | ?WXK_TAB | ?WXK_RETURN | ?WXK_ESCAPE | ?WXK_SPACE | ?WXK_DELETE | ?WXK_START | ?WXK_LBUTTON | ?WXK_RBUTTON | ?WXK_CANCEL | ?WXK_MBUTTON | ?WXK_CLEAR | ?WXK_SHIFT | ?WXK_ALT | ?WXK_CONTROL | ?WXK_MENU | ?WXK_PAUSE | ?WXK_CAPITAL | ?WXK_END | ?WXK_HOME | ?WXK_LEFT | ?WXK_UP | ?WXK_RIGHT | ?WXK_DOWN | ?WXK_SELECT | ?WXK_PRINT | ?WXK_EXECUTE | ?WXK_SNAPSHOT | ?WXK_INSERT | ?WXK_HELP | ?WXK_NUMPAD0 | ?WXK_NUMPAD1 | ?WXK_NUMPAD2 | ?WXK_NUMPAD3 | ?WXK_NUMPAD4 | ?WXK_NUMPAD5 | ?WXK_NUMPAD6 | ?WXK_NUMPAD7 | ?WXK_NUMPAD8 | ?WXK_NUMPAD9 | ?WXK_MULTIPLY | ?WXK_ADD | ?WXK_SEPARATOR | ?WXK_SUBTRACT | ?WXK_DECIMAL | ?WXK_DIVIDE | ?WXK_F1 | ?WXK_F2 | ?WXK_F3 | ?WXK_F4 | ?WXK_F5 | ?WXK_F6 | ?WXK_F7 | ?WXK_F8 | ?WXK_F9 | ?WXK_F10 | ?WXK_F11 | ?WXK_F12 | ?WXK_F13 | ?WXK_F14 | ?WXK_F15 | ?WXK_F16 | ?WXK_F17 | ?WXK_F18 | ?WXK_F19 | ?WXK_F20 | ?WXK_F21 | ?WXK_F22 | ?WXK_F23 | ?WXK_F24 | ?WXK_NUMLOCK | ?WXK_SCROLL | ?WXK_PAGEUP | ?WXK_PAGEDOWN | ?WXK_NUMPAD_SPACE | ?WXK_NUMPAD_TAB | ?WXK_NUMPAD_ENTER | ?WXK_NUMPAD_F1 | ?WXK_NUMPAD_F2 | ?WXK_NUMPAD_F3 | ?WXK_NUMPAD_F4 | ?WXK_NUMPAD_HOME | ?WXK_NUMPAD_LEFT | ?WXK_NUMPAD_UP | ?WXK_NUMPAD_RIGHT | ?WXK_NUMPAD_DOWN | ?WXK_NUMPAD_PAGEUP | ?WXK_NUMPAD_PAGEDOWN | ?WXK_NUMPAD_END | ?WXK_NUMPAD_BEGIN | ?WXK_NUMPAD_INSERT | ?WXK_NUMPAD_DELETE | ?WXK_NUMPAD_EQUAL | ?WXK_NUMPAD_MULTIPLY | ?WXK_NUMPAD_ADD | ?WXK_NUMPAD_SEPARATOR | ?WXK_NUMPAD_SUBTRACT | ?WXK_NUMPAD_DECIMAL | ?WXK_NUMPAD_DIVIDE | ?WXK_WINDOWS_LEFT | ?WXK_WINDOWS_RIGHT | ?WXK_WINDOWS_MENU | ?WXK_COMMAND | ?WXK_SPECIAL1 | ?WXK_SPECIAL2 | ?WXK_SPECIAL3 | ?WXK_SPECIAL4 | ?WXK_SPECIAL5 | ?WXK_SPECIAL6 | ?WXK_SPECIAL7 | ?WXK_SPECIAL8 | ?WXK_SPECIAL9 | ?WXK_SPECIAL10 | ?WXK_SPECIAL11 | ?WXK_SPECIAL12 | ?WXK_SPECIAL13 | ?WXK_SPECIAL14 | ?WXK_SPECIAL15 | ?WXK_SPECIAL16 | ?WXK_SPECIAL17 | ?WXK_SPECIAL18 | ?WXK_SPECIAL19 | ?WXK_SPECIAL20
-spec getKeyState(Key) -> boolean() when
@@ -224,3 +226,17 @@ isPlatform64Bit() ->
wxe_util:call(?utils_wxIsPlatform64Bit,
<<>>).
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_gdicmn.html#gdicmnwxdisplaysize">external documentation</a>.
+-spec displaySize() -> {Width::integer(), Height::integer()}.
+displaySize() ->
+ wxe_util:call(?gdicmn_wxDisplaySize,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_gdicmn.html#gdicmnwxsetcursor">external documentation</a>.
+-spec setCursor(Cursor) -> ok when
+ Cursor::wxCursor:wxCursor().
+setCursor(#wx_ref{type=CursorT,ref=CursorRef}) ->
+ ?CLASS(CursorT,wxCursor),
+ wxe_util:cast(?gdicmn_wxSetCursor,
+ <<CursorRef:32/?UI>>).
+
diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl
index 1f4f22f704..7d4db9ba97 100644
--- a/lib/wx/src/gen/wxe_debug.hrl
+++ b/lib/wx/src/gen/wxe_debug.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1669,1642 +1669,1677 @@ wxdebug_table() ->
{1824, {wxTextCtrl, create, 3}},
{1825, {wxTextCtrl, cut, 0}},
{1826, {wxTextCtrl, discardEdits, 0}},
- {1827, {wxTextCtrl, emulateKeyPress, 1}},
- {1828, {wxTextCtrl, getDefaultStyle, 0}},
- {1829, {wxTextCtrl, getInsertionPoint, 0}},
- {1830, {wxTextCtrl, getLastPosition, 0}},
- {1831, {wxTextCtrl, getLineLength, 1}},
- {1832, {wxTextCtrl, getLineText, 1}},
- {1833, {wxTextCtrl, getNumberOfLines, 0}},
- {1834, {wxTextCtrl, getRange, 2}},
- {1835, {wxTextCtrl, getSelection, 2}},
- {1836, {wxTextCtrl, getStringSelection, 0}},
- {1837, {wxTextCtrl, getStyle, 2}},
- {1838, {wxTextCtrl, getValue, 0}},
- {1839, {wxTextCtrl, isEditable, 0}},
- {1840, {wxTextCtrl, isModified, 0}},
- {1841, {wxTextCtrl, isMultiLine, 0}},
- {1842, {wxTextCtrl, isSingleLine, 0}},
- {1843, {wxTextCtrl, loadFile, 2}},
- {1844, {wxTextCtrl, markDirty, 0}},
- {1845, {wxTextCtrl, paste, 0}},
- {1846, {wxTextCtrl, positionToXY, 3}},
- {1847, {wxTextCtrl, redo, 0}},
- {1848, {wxTextCtrl, remove, 2}},
- {1849, {wxTextCtrl, replace, 3}},
- {1850, {wxTextCtrl, saveFile, 1}},
- {1851, {wxTextCtrl, setDefaultStyle, 1}},
- {1852, {wxTextCtrl, setEditable, 1}},
- {1853, {wxTextCtrl, setInsertionPoint, 1}},
- {1854, {wxTextCtrl, setInsertionPointEnd, 0}},
- {1856, {wxTextCtrl, setMaxLength, 1}},
- {1857, {wxTextCtrl, setSelection, 2}},
- {1858, {wxTextCtrl, setStyle, 3}},
- {1859, {wxTextCtrl, setValue, 1}},
- {1860, {wxTextCtrl, showPosition, 1}},
- {1861, {wxTextCtrl, undo, 0}},
- {1862, {wxTextCtrl, writeText, 1}},
- {1863, {wxTextCtrl, xYToPosition, 2}},
- {1866, {wxNotebook, new_0, 0}},
- {1867, {wxNotebook, new_3, 3}},
- {1868, {wxNotebook, destruct, 0}},
- {1869, {wxNotebook, addPage, 3}},
- {1870, {wxNotebook, advanceSelection, 1}},
- {1871, {wxNotebook, assignImageList, 1}},
- {1872, {wxNotebook, create, 3}},
- {1873, {wxNotebook, deleteAllPages, 0}},
- {1874, {wxNotebook, deletePage, 1}},
- {1875, {wxNotebook, removePage, 1}},
- {1876, {wxNotebook, getCurrentPage, 0}},
- {1877, {wxNotebook, getImageList, 0}},
- {1879, {wxNotebook, getPage, 1}},
- {1880, {wxNotebook, getPageCount, 0}},
- {1881, {wxNotebook, getPageImage, 1}},
- {1882, {wxNotebook, getPageText, 1}},
- {1883, {wxNotebook, getRowCount, 0}},
- {1884, {wxNotebook, getSelection, 0}},
- {1885, {wxNotebook, getThemeBackgroundColour, 0}},
- {1887, {wxNotebook, hitTest, 2}},
- {1889, {wxNotebook, insertPage, 4}},
- {1890, {wxNotebook, setImageList, 1}},
- {1891, {wxNotebook, setPadding, 1}},
- {1892, {wxNotebook, setPageSize, 1}},
- {1893, {wxNotebook, setPageImage, 2}},
- {1894, {wxNotebook, setPageText, 2}},
- {1895, {wxNotebook, setSelection, 1}},
- {1896, {wxNotebook, changeSelection, 1}},
- {1897, {wxChoicebook, new_0, 0}},
- {1898, {wxChoicebook, new_3, 3}},
- {1899, {wxChoicebook, addPage, 3}},
- {1900, {wxChoicebook, advanceSelection, 1}},
- {1901, {wxChoicebook, assignImageList, 1}},
- {1902, {wxChoicebook, create, 3}},
- {1903, {wxChoicebook, deleteAllPages, 0}},
- {1904, {wxChoicebook, deletePage, 1}},
- {1905, {wxChoicebook, removePage, 1}},
- {1906, {wxChoicebook, getCurrentPage, 0}},
- {1907, {wxChoicebook, getImageList, 0}},
- {1909, {wxChoicebook, getPage, 1}},
- {1910, {wxChoicebook, getPageCount, 0}},
- {1911, {wxChoicebook, getPageImage, 1}},
- {1912, {wxChoicebook, getPageText, 1}},
- {1913, {wxChoicebook, getSelection, 0}},
- {1914, {wxChoicebook, hitTest, 2}},
- {1915, {wxChoicebook, insertPage, 4}},
- {1916, {wxChoicebook, setImageList, 1}},
- {1917, {wxChoicebook, setPageSize, 1}},
- {1918, {wxChoicebook, setPageImage, 2}},
- {1919, {wxChoicebook, setPageText, 2}},
- {1920, {wxChoicebook, setSelection, 1}},
- {1921, {wxChoicebook, changeSelection, 1}},
- {1922, {wxChoicebook, 'Destroy', undefined}},
- {1923, {wxToolbook, new_0, 0}},
- {1924, {wxToolbook, new_3, 3}},
- {1925, {wxToolbook, addPage, 3}},
- {1926, {wxToolbook, advanceSelection, 1}},
- {1927, {wxToolbook, assignImageList, 1}},
- {1928, {wxToolbook, create, 3}},
- {1929, {wxToolbook, deleteAllPages, 0}},
- {1930, {wxToolbook, deletePage, 1}},
- {1931, {wxToolbook, removePage, 1}},
- {1932, {wxToolbook, getCurrentPage, 0}},
- {1933, {wxToolbook, getImageList, 0}},
- {1935, {wxToolbook, getPage, 1}},
- {1936, {wxToolbook, getPageCount, 0}},
- {1937, {wxToolbook, getPageImage, 1}},
- {1938, {wxToolbook, getPageText, 1}},
- {1939, {wxToolbook, getSelection, 0}},
- {1941, {wxToolbook, hitTest, 2}},
- {1942, {wxToolbook, insertPage, 4}},
- {1943, {wxToolbook, setImageList, 1}},
- {1944, {wxToolbook, setPageSize, 1}},
- {1945, {wxToolbook, setPageImage, 2}},
- {1946, {wxToolbook, setPageText, 2}},
- {1947, {wxToolbook, setSelection, 1}},
- {1948, {wxToolbook, changeSelection, 1}},
- {1949, {wxToolbook, 'Destroy', undefined}},
- {1950, {wxListbook, new_0, 0}},
- {1951, {wxListbook, new_3, 3}},
- {1952, {wxListbook, addPage, 3}},
- {1953, {wxListbook, advanceSelection, 1}},
- {1954, {wxListbook, assignImageList, 1}},
- {1955, {wxListbook, create, 3}},
- {1956, {wxListbook, deleteAllPages, 0}},
- {1957, {wxListbook, deletePage, 1}},
- {1958, {wxListbook, removePage, 1}},
- {1959, {wxListbook, getCurrentPage, 0}},
- {1960, {wxListbook, getImageList, 0}},
- {1962, {wxListbook, getPage, 1}},
- {1963, {wxListbook, getPageCount, 0}},
- {1964, {wxListbook, getPageImage, 1}},
- {1965, {wxListbook, getPageText, 1}},
- {1966, {wxListbook, getSelection, 0}},
- {1968, {wxListbook, hitTest, 2}},
- {1969, {wxListbook, insertPage, 4}},
- {1970, {wxListbook, setImageList, 1}},
- {1971, {wxListbook, setPageSize, 1}},
- {1972, {wxListbook, setPageImage, 2}},
- {1973, {wxListbook, setPageText, 2}},
- {1974, {wxListbook, setSelection, 1}},
- {1975, {wxListbook, changeSelection, 1}},
- {1976, {wxListbook, 'Destroy', undefined}},
- {1977, {wxTreebook, new_0, 0}},
- {1978, {wxTreebook, new_3, 3}},
- {1979, {wxTreebook, addPage, 3}},
- {1980, {wxTreebook, advanceSelection, 1}},
- {1981, {wxTreebook, assignImageList, 1}},
- {1982, {wxTreebook, create, 3}},
- {1983, {wxTreebook, deleteAllPages, 0}},
- {1984, {wxTreebook, deletePage, 1}},
- {1985, {wxTreebook, removePage, 1}},
- {1986, {wxTreebook, getCurrentPage, 0}},
- {1987, {wxTreebook, getImageList, 0}},
- {1989, {wxTreebook, getPage, 1}},
- {1990, {wxTreebook, getPageCount, 0}},
- {1991, {wxTreebook, getPageImage, 1}},
- {1992, {wxTreebook, getPageText, 1}},
- {1993, {wxTreebook, getSelection, 0}},
- {1994, {wxTreebook, expandNode, 2}},
- {1995, {wxTreebook, isNodeExpanded, 1}},
- {1997, {wxTreebook, hitTest, 2}},
- {1998, {wxTreebook, insertPage, 4}},
- {1999, {wxTreebook, insertSubPage, 4}},
- {2000, {wxTreebook, setImageList, 1}},
- {2001, {wxTreebook, setPageSize, 1}},
- {2002, {wxTreebook, setPageImage, 2}},
- {2003, {wxTreebook, setPageText, 2}},
- {2004, {wxTreebook, setSelection, 1}},
- {2005, {wxTreebook, changeSelection, 1}},
- {2006, {wxTreebook, 'Destroy', undefined}},
- {2009, {wxTreeCtrl, new_2, 2}},
- {2010, {wxTreeCtrl, new_0, 0}},
- {2012, {wxTreeCtrl, destruct, 0}},
- {2013, {wxTreeCtrl, addRoot, 2}},
- {2014, {wxTreeCtrl, appendItem, 3}},
- {2015, {wxTreeCtrl, assignImageList, 1}},
- {2016, {wxTreeCtrl, assignStateImageList, 1}},
- {2017, {wxTreeCtrl, collapse, 1}},
- {2018, {wxTreeCtrl, collapseAndReset, 1}},
- {2019, {wxTreeCtrl, create, 2}},
- {2020, {wxTreeCtrl, delete, 1}},
- {2021, {wxTreeCtrl, deleteAllItems, 0}},
- {2022, {wxTreeCtrl, deleteChildren, 1}},
- {2023, {wxTreeCtrl, editLabel, 1}},
- {2024, {wxTreeCtrl, ensureVisible, 1}},
- {2025, {wxTreeCtrl, expand, 1}},
- {2026, {wxTreeCtrl, getBoundingRect, 3}},
- {2028, {wxTreeCtrl, getChildrenCount, 2}},
- {2029, {wxTreeCtrl, getCount, 0}},
- {2030, {wxTreeCtrl, getEditControl, 0}},
- {2031, {wxTreeCtrl, getFirstChild, 2}},
- {2032, {wxTreeCtrl, getNextChild, 2}},
- {2033, {wxTreeCtrl, getFirstVisibleItem, 0}},
- {2034, {wxTreeCtrl, getImageList, 0}},
- {2035, {wxTreeCtrl, getIndent, 0}},
- {2036, {wxTreeCtrl, getItemBackgroundColour, 1}},
- {2037, {wxTreeCtrl, getItemData, 1}},
- {2038, {wxTreeCtrl, getItemFont, 1}},
- {2039, {wxTreeCtrl, getItemImage_1, 1}},
- {2040, {wxTreeCtrl, getItemImage_2, 2}},
- {2041, {wxTreeCtrl, getItemText, 1}},
- {2042, {wxTreeCtrl, getItemTextColour, 1}},
- {2043, {wxTreeCtrl, getLastChild, 1}},
- {2044, {wxTreeCtrl, getNextSibling, 1}},
- {2045, {wxTreeCtrl, getNextVisible, 1}},
- {2046, {wxTreeCtrl, getItemParent, 1}},
- {2047, {wxTreeCtrl, getPrevSibling, 1}},
- {2048, {wxTreeCtrl, getPrevVisible, 1}},
- {2049, {wxTreeCtrl, getRootItem, 0}},
- {2050, {wxTreeCtrl, getSelection, 0}},
- {2051, {wxTreeCtrl, getSelections, 1}},
- {2052, {wxTreeCtrl, getStateImageList, 0}},
- {2053, {wxTreeCtrl, hitTest, 2}},
- {2055, {wxTreeCtrl, insertItem, 4}},
- {2056, {wxTreeCtrl, isBold, 1}},
- {2057, {wxTreeCtrl, isExpanded, 1}},
- {2058, {wxTreeCtrl, isSelected, 1}},
- {2059, {wxTreeCtrl, isVisible, 1}},
- {2060, {wxTreeCtrl, itemHasChildren, 1}},
- {2061, {wxTreeCtrl, isTreeItemIdOk, 1}},
- {2062, {wxTreeCtrl, prependItem, 3}},
- {2063, {wxTreeCtrl, scrollTo, 1}},
- {2064, {wxTreeCtrl, selectItem_1, 1}},
- {2065, {wxTreeCtrl, selectItem_2, 2}},
- {2066, {wxTreeCtrl, setIndent, 1}},
- {2067, {wxTreeCtrl, setImageList, 1}},
- {2068, {wxTreeCtrl, setItemBackgroundColour, 2}},
- {2069, {wxTreeCtrl, setItemBold, 2}},
- {2070, {wxTreeCtrl, setItemData, 2}},
- {2071, {wxTreeCtrl, setItemDropHighlight, 2}},
- {2072, {wxTreeCtrl, setItemFont, 2}},
- {2073, {wxTreeCtrl, setItemHasChildren, 2}},
- {2074, {wxTreeCtrl, setItemImage_2, 2}},
- {2075, {wxTreeCtrl, setItemImage_3, 3}},
- {2076, {wxTreeCtrl, setItemText, 2}},
- {2077, {wxTreeCtrl, setItemTextColour, 2}},
- {2078, {wxTreeCtrl, setStateImageList, 1}},
- {2079, {wxTreeCtrl, setWindowStyle, 1}},
- {2080, {wxTreeCtrl, sortChildren, 1}},
- {2081, {wxTreeCtrl, toggle, 1}},
- {2082, {wxTreeCtrl, toggleItemSelection, 1}},
- {2083, {wxTreeCtrl, unselect, 0}},
- {2084, {wxTreeCtrl, unselectAll, 0}},
- {2085, {wxTreeCtrl, unselectItem, 1}},
- {2086, {wxScrollBar, new_0, 0}},
- {2087, {wxScrollBar, new_3, 3}},
- {2088, {wxScrollBar, destruct, 0}},
- {2089, {wxScrollBar, create, 3}},
- {2090, {wxScrollBar, getRange, 0}},
- {2091, {wxScrollBar, getPageSize, 0}},
- {2092, {wxScrollBar, getThumbPosition, 0}},
- {2093, {wxScrollBar, getThumbSize, 0}},
- {2094, {wxScrollBar, setThumbPosition, 1}},
- {2095, {wxScrollBar, setScrollbar, 5}},
- {2097, {wxSpinButton, new_2, 2}},
- {2098, {wxSpinButton, new_0, 0}},
- {2099, {wxSpinButton, create, 2}},
- {2100, {wxSpinButton, getMax, 0}},
- {2101, {wxSpinButton, getMin, 0}},
- {2102, {wxSpinButton, getValue, 0}},
- {2103, {wxSpinButton, setRange, 2}},
- {2104, {wxSpinButton, setValue, 1}},
- {2105, {wxSpinButton, 'Destroy', undefined}},
- {2106, {wxSpinCtrl, new_0, 0}},
- {2107, {wxSpinCtrl, new_2, 2}},
- {2109, {wxSpinCtrl, create, 2}},
- {2112, {wxSpinCtrl, setValue_1_1, 1}},
- {2113, {wxSpinCtrl, setValue_1_0, 1}},
- {2115, {wxSpinCtrl, getValue, 0}},
- {2117, {wxSpinCtrl, setRange, 2}},
- {2118, {wxSpinCtrl, setSelection, 2}},
- {2120, {wxSpinCtrl, getMin, 0}},
- {2122, {wxSpinCtrl, getMax, 0}},
- {2123, {wxSpinCtrl, 'Destroy', undefined}},
- {2124, {wxStaticText, new_0, 0}},
- {2125, {wxStaticText, new_4, 4}},
- {2126, {wxStaticText, create, 4}},
- {2127, {wxStaticText, getLabel, 0}},
- {2128, {wxStaticText, setLabel, 1}},
- {2129, {wxStaticText, wrap, 1}},
- {2130, {wxStaticText, 'Destroy', undefined}},
- {2131, {wxStaticBitmap, new_0, 0}},
- {2132, {wxStaticBitmap, new_4, 4}},
- {2133, {wxStaticBitmap, create, 4}},
- {2134, {wxStaticBitmap, getBitmap, 0}},
- {2135, {wxStaticBitmap, setBitmap, 1}},
- {2136, {wxStaticBitmap, 'Destroy', undefined}},
- {2137, {wxRadioBox, new, 7}},
- {2139, {wxRadioBox, destruct, 0}},
- {2140, {wxRadioBox, create, 7}},
- {2141, {wxRadioBox, enable_2, 2}},
- {2142, {wxRadioBox, enable_1, 1}},
- {2143, {wxRadioBox, getSelection, 0}},
- {2144, {wxRadioBox, getString, 1}},
- {2145, {wxRadioBox, setSelection, 1}},
- {2146, {wxRadioBox, show_2, 2}},
- {2147, {wxRadioBox, show_1, 1}},
- {2148, {wxRadioBox, getColumnCount, 0}},
- {2149, {wxRadioBox, getItemHelpText, 1}},
- {2150, {wxRadioBox, getItemToolTip, 1}},
- {2152, {wxRadioBox, getItemFromPoint, 1}},
- {2153, {wxRadioBox, getRowCount, 0}},
- {2154, {wxRadioBox, isItemEnabled, 1}},
- {2155, {wxRadioBox, isItemShown, 1}},
- {2156, {wxRadioBox, setItemHelpText, 2}},
- {2157, {wxRadioBox, setItemToolTip, 2}},
- {2158, {wxRadioButton, new_0, 0}},
- {2159, {wxRadioButton, new_4, 4}},
- {2160, {wxRadioButton, create, 4}},
- {2161, {wxRadioButton, getValue, 0}},
- {2162, {wxRadioButton, setValue, 1}},
- {2163, {wxRadioButton, 'Destroy', undefined}},
- {2165, {wxSlider, new_6, 6}},
- {2166, {wxSlider, new_0, 0}},
- {2167, {wxSlider, create, 6}},
- {2168, {wxSlider, getLineSize, 0}},
- {2169, {wxSlider, getMax, 0}},
- {2170, {wxSlider, getMin, 0}},
- {2171, {wxSlider, getPageSize, 0}},
- {2172, {wxSlider, getThumbLength, 0}},
- {2173, {wxSlider, getValue, 0}},
- {2174, {wxSlider, setLineSize, 1}},
- {2175, {wxSlider, setPageSize, 1}},
- {2176, {wxSlider, setRange, 2}},
- {2177, {wxSlider, setThumbLength, 1}},
- {2178, {wxSlider, setValue, 1}},
- {2179, {wxSlider, 'Destroy', undefined}},
- {2181, {wxDialog, new_4, 4}},
- {2182, {wxDialog, new_0, 0}},
- {2184, {wxDialog, destruct, 0}},
- {2185, {wxDialog, create, 4}},
- {2186, {wxDialog, createButtonSizer, 1}},
- {2187, {wxDialog, createStdDialogButtonSizer, 1}},
- {2188, {wxDialog, endModal, 1}},
- {2189, {wxDialog, getAffirmativeId, 0}},
- {2190, {wxDialog, getReturnCode, 0}},
- {2191, {wxDialog, isModal, 0}},
- {2192, {wxDialog, setAffirmativeId, 1}},
- {2193, {wxDialog, setReturnCode, 1}},
- {2194, {wxDialog, show, 1}},
- {2195, {wxDialog, showModal, 0}},
- {2196, {wxColourDialog, new_0, 0}},
- {2197, {wxColourDialog, new_2, 2}},
- {2198, {wxColourDialog, destruct, 0}},
- {2199, {wxColourDialog, create, 2}},
- {2200, {wxColourDialog, getColourData, 0}},
- {2201, {wxColourData, new_0, 0}},
- {2202, {wxColourData, new_1, 1}},
- {2203, {wxColourData, destruct, 0}},
- {2204, {wxColourData, getChooseFull, 0}},
- {2205, {wxColourData, getColour, 0}},
- {2207, {wxColourData, getCustomColour, 1}},
- {2208, {wxColourData, setChooseFull, 1}},
- {2209, {wxColourData, setColour, 1}},
- {2210, {wxColourData, setCustomColour, 2}},
- {2211, {wxPalette, new_0, 0}},
- {2212, {wxPalette, new_4, 4}},
- {2214, {wxPalette, destruct, 0}},
- {2215, {wxPalette, create, 4}},
- {2216, {wxPalette, getColoursCount, 0}},
- {2217, {wxPalette, getPixel, 3}},
- {2218, {wxPalette, getRGB, 4}},
- {2219, {wxPalette, isOk, 0}},
- {2223, {wxDirDialog, new, 2}},
- {2224, {wxDirDialog, destruct, 0}},
- {2225, {wxDirDialog, getPath, 0}},
- {2226, {wxDirDialog, getMessage, 0}},
- {2227, {wxDirDialog, setMessage, 1}},
- {2228, {wxDirDialog, setPath, 1}},
- {2232, {wxFileDialog, new, 2}},
- {2233, {wxFileDialog, destruct, 0}},
- {2234, {wxFileDialog, getDirectory, 0}},
- {2235, {wxFileDialog, getFilename, 0}},
- {2236, {wxFileDialog, getFilenames, 1}},
- {2237, {wxFileDialog, getFilterIndex, 0}},
- {2238, {wxFileDialog, getMessage, 0}},
- {2239, {wxFileDialog, getPath, 0}},
- {2240, {wxFileDialog, getPaths, 1}},
- {2241, {wxFileDialog, getWildcard, 0}},
- {2242, {wxFileDialog, setDirectory, 1}},
- {2243, {wxFileDialog, setFilename, 1}},
- {2244, {wxFileDialog, setFilterIndex, 1}},
- {2245, {wxFileDialog, setMessage, 1}},
- {2246, {wxFileDialog, setPath, 1}},
- {2247, {wxFileDialog, setWildcard, 1}},
- {2248, {wxPickerBase, setInternalMargin, 1}},
- {2249, {wxPickerBase, getInternalMargin, 0}},
- {2250, {wxPickerBase, setTextCtrlProportion, 1}},
- {2251, {wxPickerBase, setPickerCtrlProportion, 1}},
- {2252, {wxPickerBase, getTextCtrlProportion, 0}},
- {2253, {wxPickerBase, getPickerCtrlProportion, 0}},
- {2254, {wxPickerBase, hasTextCtrl, 0}},
- {2255, {wxPickerBase, getTextCtrl, 0}},
- {2256, {wxPickerBase, isTextCtrlGrowable, 0}},
- {2257, {wxPickerBase, setPickerCtrlGrowable, 1}},
- {2258, {wxPickerBase, setTextCtrlGrowable, 1}},
- {2259, {wxPickerBase, isPickerCtrlGrowable, 0}},
- {2260, {wxFilePickerCtrl, new_0, 0}},
- {2261, {wxFilePickerCtrl, new_3, 3}},
- {2262, {wxFilePickerCtrl, create, 3}},
- {2263, {wxFilePickerCtrl, getPath, 0}},
- {2264, {wxFilePickerCtrl, setPath, 1}},
- {2265, {wxFilePickerCtrl, 'Destroy', undefined}},
- {2266, {wxDirPickerCtrl, new_0, 0}},
- {2267, {wxDirPickerCtrl, new_3, 3}},
- {2268, {wxDirPickerCtrl, create, 3}},
- {2269, {wxDirPickerCtrl, getPath, 0}},
- {2270, {wxDirPickerCtrl, setPath, 1}},
- {2271, {wxDirPickerCtrl, 'Destroy', undefined}},
- {2272, {wxColourPickerCtrl, new_0, 0}},
- {2273, {wxColourPickerCtrl, new_3, 3}},
- {2274, {wxColourPickerCtrl, create, 3}},
- {2275, {wxColourPickerCtrl, getColour, 0}},
- {2276, {wxColourPickerCtrl, setColour_1_1, 1}},
- {2277, {wxColourPickerCtrl, setColour_1_0, 1}},
- {2278, {wxColourPickerCtrl, 'Destroy', undefined}},
- {2279, {wxDatePickerCtrl, new_0, 0}},
- {2280, {wxDatePickerCtrl, new_3, 3}},
- {2281, {wxDatePickerCtrl, getRange, 2}},
- {2282, {wxDatePickerCtrl, getValue, 0}},
- {2283, {wxDatePickerCtrl, setRange, 2}},
- {2284, {wxDatePickerCtrl, setValue, 1}},
- {2285, {wxDatePickerCtrl, 'Destroy', undefined}},
- {2286, {wxFontPickerCtrl, new_0, 0}},
- {2287, {wxFontPickerCtrl, new_3, 3}},
- {2288, {wxFontPickerCtrl, create, 3}},
- {2289, {wxFontPickerCtrl, getSelectedFont, 0}},
- {2290, {wxFontPickerCtrl, setSelectedFont, 1}},
- {2291, {wxFontPickerCtrl, getMaxPointSize, 0}},
- {2292, {wxFontPickerCtrl, setMaxPointSize, 1}},
- {2293, {wxFontPickerCtrl, 'Destroy', undefined}},
- {2296, {wxFindReplaceDialog, new_0, 0}},
- {2297, {wxFindReplaceDialog, new_4, 4}},
- {2298, {wxFindReplaceDialog, destruct, 0}},
- {2299, {wxFindReplaceDialog, create, 4}},
- {2300, {wxFindReplaceDialog, getData, 0}},
- {2301, {wxFindReplaceData, new_0, 0}},
- {2302, {wxFindReplaceData, new_1, 1}},
- {2303, {wxFindReplaceData, getFindString, 0}},
- {2304, {wxFindReplaceData, getReplaceString, 0}},
- {2305, {wxFindReplaceData, getFlags, 0}},
- {2306, {wxFindReplaceData, setFlags, 1}},
- {2307, {wxFindReplaceData, setFindString, 1}},
- {2308, {wxFindReplaceData, setReplaceString, 1}},
- {2309, {wxFindReplaceData, 'Destroy', undefined}},
- {2310, {wxMultiChoiceDialog, new_0, 0}},
- {2312, {wxMultiChoiceDialog, new_5, 5}},
- {2313, {wxMultiChoiceDialog, getSelections, 0}},
- {2314, {wxMultiChoiceDialog, setSelections, 1}},
- {2315, {wxMultiChoiceDialog, 'Destroy', undefined}},
- {2316, {wxSingleChoiceDialog, new_0, 0}},
- {2318, {wxSingleChoiceDialog, new_5, 5}},
- {2319, {wxSingleChoiceDialog, getSelection, 0}},
- {2320, {wxSingleChoiceDialog, getStringSelection, 0}},
- {2321, {wxSingleChoiceDialog, setSelection, 1}},
- {2322, {wxSingleChoiceDialog, 'Destroy', undefined}},
- {2323, {wxTextEntryDialog, new, 3}},
- {2324, {wxTextEntryDialog, getValue, 0}},
- {2325, {wxTextEntryDialog, setValue, 1}},
- {2326, {wxTextEntryDialog, 'Destroy', undefined}},
- {2327, {wxPasswordEntryDialog, new, 3}},
- {2328, {wxPasswordEntryDialog, 'Destroy', undefined}},
- {2329, {wxFontData, new_0, 0}},
- {2330, {wxFontData, new_1, 1}},
- {2331, {wxFontData, destruct, 0}},
- {2332, {wxFontData, enableEffects, 1}},
- {2333, {wxFontData, getAllowSymbols, 0}},
- {2334, {wxFontData, getColour, 0}},
- {2335, {wxFontData, getChosenFont, 0}},
- {2336, {wxFontData, getEnableEffects, 0}},
- {2337, {wxFontData, getInitialFont, 0}},
- {2338, {wxFontData, getShowHelp, 0}},
- {2339, {wxFontData, setAllowSymbols, 1}},
- {2340, {wxFontData, setChosenFont, 1}},
- {2341, {wxFontData, setColour, 1}},
- {2342, {wxFontData, setInitialFont, 1}},
- {2343, {wxFontData, setRange, 2}},
- {2344, {wxFontData, setShowHelp, 1}},
- {2348, {wxFontDialog, new_0, 0}},
- {2350, {wxFontDialog, new_2, 2}},
- {2352, {wxFontDialog, create, 2}},
- {2353, {wxFontDialog, getFontData, 0}},
- {2355, {wxFontDialog, 'Destroy', undefined}},
- {2356, {wxProgressDialog, new, 3}},
- {2357, {wxProgressDialog, destruct, 0}},
- {2358, {wxProgressDialog, resume, 0}},
- {2359, {wxProgressDialog, update_2, 2}},
- {2360, {wxProgressDialog, update_0, 0}},
- {2361, {wxMessageDialog, new, 3}},
- {2362, {wxMessageDialog, destruct, 0}},
- {2363, {wxPageSetupDialog, new, 2}},
- {2364, {wxPageSetupDialog, destruct, 0}},
- {2365, {wxPageSetupDialog, getPageSetupData, 0}},
- {2366, {wxPageSetupDialog, showModal, 0}},
- {2367, {wxPageSetupDialogData, new_0, 0}},
- {2368, {wxPageSetupDialogData, new_1_0, 1}},
- {2369, {wxPageSetupDialogData, new_1_1, 1}},
- {2370, {wxPageSetupDialogData, destruct, 0}},
- {2371, {wxPageSetupDialogData, enableHelp, 1}},
- {2372, {wxPageSetupDialogData, enableMargins, 1}},
- {2373, {wxPageSetupDialogData, enableOrientation, 1}},
- {2374, {wxPageSetupDialogData, enablePaper, 1}},
- {2375, {wxPageSetupDialogData, enablePrinter, 1}},
- {2376, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
- {2377, {wxPageSetupDialogData, getEnableMargins, 0}},
- {2378, {wxPageSetupDialogData, getEnableOrientation, 0}},
- {2379, {wxPageSetupDialogData, getEnablePaper, 0}},
- {2380, {wxPageSetupDialogData, getEnablePrinter, 0}},
- {2381, {wxPageSetupDialogData, getEnableHelp, 0}},
- {2382, {wxPageSetupDialogData, getDefaultInfo, 0}},
- {2383, {wxPageSetupDialogData, getMarginTopLeft, 0}},
- {2384, {wxPageSetupDialogData, getMarginBottomRight, 0}},
- {2385, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
- {2386, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
- {2387, {wxPageSetupDialogData, getPaperId, 0}},
- {2388, {wxPageSetupDialogData, getPaperSize, 0}},
- {2390, {wxPageSetupDialogData, getPrintData, 0}},
- {2391, {wxPageSetupDialogData, isOk, 0}},
- {2392, {wxPageSetupDialogData, setDefaultInfo, 1}},
- {2393, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
- {2394, {wxPageSetupDialogData, setMarginTopLeft, 1}},
- {2395, {wxPageSetupDialogData, setMarginBottomRight, 1}},
- {2396, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
- {2397, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
- {2398, {wxPageSetupDialogData, setPaperId, 1}},
- {2399, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
- {2400, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
- {2401, {wxPageSetupDialogData, setPrintData, 1}},
- {2402, {wxPrintDialog, new_2_0, 2}},
- {2403, {wxPrintDialog, new_2_1, 2}},
- {2404, {wxPrintDialog, destruct, 0}},
- {2405, {wxPrintDialog, getPrintDialogData, 0}},
- {2406, {wxPrintDialog, getPrintDC, 0}},
- {2407, {wxPrintDialogData, new_0, 0}},
- {2408, {wxPrintDialogData, new_1_1, 1}},
- {2409, {wxPrintDialogData, new_1_0, 1}},
- {2410, {wxPrintDialogData, destruct, 0}},
- {2411, {wxPrintDialogData, enableHelp, 1}},
- {2412, {wxPrintDialogData, enablePageNumbers, 1}},
- {2413, {wxPrintDialogData, enablePrintToFile, 1}},
- {2414, {wxPrintDialogData, enableSelection, 1}},
- {2415, {wxPrintDialogData, getAllPages, 0}},
- {2416, {wxPrintDialogData, getCollate, 0}},
- {2417, {wxPrintDialogData, getFromPage, 0}},
- {2418, {wxPrintDialogData, getMaxPage, 0}},
- {2419, {wxPrintDialogData, getMinPage, 0}},
- {2420, {wxPrintDialogData, getNoCopies, 0}},
- {2421, {wxPrintDialogData, getPrintData, 0}},
- {2422, {wxPrintDialogData, getPrintToFile, 0}},
- {2423, {wxPrintDialogData, getSelection, 0}},
- {2424, {wxPrintDialogData, getToPage, 0}},
- {2425, {wxPrintDialogData, isOk, 0}},
- {2426, {wxPrintDialogData, setCollate, 1}},
- {2427, {wxPrintDialogData, setFromPage, 1}},
- {2428, {wxPrintDialogData, setMaxPage, 1}},
- {2429, {wxPrintDialogData, setMinPage, 1}},
- {2430, {wxPrintDialogData, setNoCopies, 1}},
- {2431, {wxPrintDialogData, setPrintData, 1}},
- {2432, {wxPrintDialogData, setPrintToFile, 1}},
- {2433, {wxPrintDialogData, setSelection, 1}},
- {2434, {wxPrintDialogData, setToPage, 1}},
- {2435, {wxPrintData, new_0, 0}},
- {2436, {wxPrintData, new_1, 1}},
- {2437, {wxPrintData, destruct, 0}},
- {2438, {wxPrintData, getCollate, 0}},
- {2439, {wxPrintData, getBin, 0}},
- {2440, {wxPrintData, getColour, 0}},
- {2441, {wxPrintData, getDuplex, 0}},
- {2442, {wxPrintData, getNoCopies, 0}},
- {2443, {wxPrintData, getOrientation, 0}},
- {2444, {wxPrintData, getPaperId, 0}},
- {2445, {wxPrintData, getPrinterName, 0}},
- {2446, {wxPrintData, getQuality, 0}},
- {2447, {wxPrintData, isOk, 0}},
- {2448, {wxPrintData, setBin, 1}},
- {2449, {wxPrintData, setCollate, 1}},
- {2450, {wxPrintData, setColour, 1}},
- {2451, {wxPrintData, setDuplex, 1}},
- {2452, {wxPrintData, setNoCopies, 1}},
- {2453, {wxPrintData, setOrientation, 1}},
- {2454, {wxPrintData, setPaperId, 1}},
- {2455, {wxPrintData, setPrinterName, 1}},
- {2456, {wxPrintData, setQuality, 1}},
- {2459, {wxPrintPreview, new_2, 2}},
- {2460, {wxPrintPreview, new_3, 3}},
- {2462, {wxPrintPreview, destruct, 0}},
- {2463, {wxPrintPreview, getCanvas, 0}},
- {2464, {wxPrintPreview, getCurrentPage, 0}},
- {2465, {wxPrintPreview, getFrame, 0}},
- {2466, {wxPrintPreview, getMaxPage, 0}},
- {2467, {wxPrintPreview, getMinPage, 0}},
- {2468, {wxPrintPreview, getPrintout, 0}},
- {2469, {wxPrintPreview, getPrintoutForPrinting, 0}},
- {2470, {wxPrintPreview, isOk, 0}},
- {2471, {wxPrintPreview, paintPage, 2}},
- {2472, {wxPrintPreview, print, 1}},
- {2473, {wxPrintPreview, renderPage, 1}},
- {2474, {wxPrintPreview, setCanvas, 1}},
- {2475, {wxPrintPreview, setCurrentPage, 1}},
- {2476, {wxPrintPreview, setFrame, 1}},
- {2477, {wxPrintPreview, setPrintout, 1}},
- {2478, {wxPrintPreview, setZoom, 1}},
- {2479, {wxPreviewFrame, new, 3}},
- {2480, {wxPreviewFrame, destruct, 0}},
- {2481, {wxPreviewFrame, createControlBar, 0}},
- {2482, {wxPreviewFrame, createCanvas, 0}},
- {2483, {wxPreviewFrame, initialize, 0}},
- {2484, {wxPreviewFrame, onCloseWindow, 1}},
- {2485, {wxPreviewControlBar, new, 4}},
- {2486, {wxPreviewControlBar, destruct, 0}},
- {2487, {wxPreviewControlBar, createButtons, 0}},
- {2488, {wxPreviewControlBar, getPrintPreview, 0}},
- {2489, {wxPreviewControlBar, getZoomControl, 0}},
- {2490, {wxPreviewControlBar, setZoomControl, 1}},
- {2492, {wxPrinter, new, 1}},
- {2493, {wxPrinter, createAbortWindow, 2}},
- {2494, {wxPrinter, getAbort, 0}},
- {2495, {wxPrinter, getLastError, 0}},
- {2496, {wxPrinter, getPrintDialogData, 0}},
- {2497, {wxPrinter, print, 3}},
- {2498, {wxPrinter, printDialog, 1}},
- {2499, {wxPrinter, reportError, 3}},
- {2500, {wxPrinter, setup, 1}},
- {2501, {wxPrinter, 'Destroy', undefined}},
- {2502, {wxXmlResource, new_1, 1}},
- {2503, {wxXmlResource, new_2, 2}},
- {2504, {wxXmlResource, destruct, 0}},
- {2505, {wxXmlResource, attachUnknownControl, 3}},
- {2506, {wxXmlResource, clearHandlers, 0}},
- {2507, {wxXmlResource, compareVersion, 4}},
- {2508, {wxXmlResource, get, 0}},
- {2509, {wxXmlResource, getFlags, 0}},
- {2510, {wxXmlResource, getVersion, 0}},
- {2511, {wxXmlResource, getXRCID, 2}},
- {2512, {wxXmlResource, initAllHandlers, 0}},
- {2513, {wxXmlResource, load, 1}},
- {2514, {wxXmlResource, loadBitmap, 1}},
- {2515, {wxXmlResource, loadDialog_2, 2}},
- {2516, {wxXmlResource, loadDialog_3, 3}},
- {2517, {wxXmlResource, loadFrame_2, 2}},
- {2518, {wxXmlResource, loadFrame_3, 3}},
- {2519, {wxXmlResource, loadIcon, 1}},
- {2520, {wxXmlResource, loadMenu, 1}},
- {2521, {wxXmlResource, loadMenuBar_2, 2}},
- {2522, {wxXmlResource, loadMenuBar_1, 1}},
- {2523, {wxXmlResource, loadPanel_2, 2}},
- {2524, {wxXmlResource, loadPanel_3, 3}},
- {2525, {wxXmlResource, loadToolBar, 2}},
- {2526, {wxXmlResource, set, 1}},
- {2527, {wxXmlResource, setFlags, 1}},
- {2528, {wxXmlResource, unload, 1}},
- {2529, {wxXmlResource, xrcctrl, 3}},
- {2530, {wxHtmlEasyPrinting, new, 1}},
- {2531, {wxHtmlEasyPrinting, destruct, 0}},
- {2532, {wxHtmlEasyPrinting, getPrintData, 0}},
- {2533, {wxHtmlEasyPrinting, getPageSetupData, 0}},
- {2534, {wxHtmlEasyPrinting, previewFile, 1}},
- {2535, {wxHtmlEasyPrinting, previewText, 2}},
- {2536, {wxHtmlEasyPrinting, printFile, 1}},
- {2537, {wxHtmlEasyPrinting, printText, 2}},
- {2538, {wxHtmlEasyPrinting, pageSetup, 0}},
- {2539, {wxHtmlEasyPrinting, setFonts, 3}},
- {2540, {wxHtmlEasyPrinting, setHeader, 2}},
- {2541, {wxHtmlEasyPrinting, setFooter, 2}},
- {2543, {wxGLCanvas, new_2, 2}},
- {2544, {wxGLCanvas, new_3_1, 3}},
- {2545, {wxGLCanvas, new_3_0, 3}},
- {2546, {wxGLCanvas, getContext, 0}},
- {2548, {wxGLCanvas, setCurrent, 0}},
- {2549, {wxGLCanvas, swapBuffers, 0}},
- {2550, {wxGLCanvas, 'Destroy', undefined}},
- {2551, {wxAuiManager, new, 1}},
- {2552, {wxAuiManager, destruct, 0}},
- {2553, {wxAuiManager, addPane_2_1, 2}},
- {2554, {wxAuiManager, addPane_3, 3}},
- {2555, {wxAuiManager, addPane_2_0, 2}},
- {2556, {wxAuiManager, detachPane, 1}},
- {2557, {wxAuiManager, getAllPanes, 0}},
- {2558, {wxAuiManager, getArtProvider, 0}},
- {2559, {wxAuiManager, getDockSizeConstraint, 2}},
- {2560, {wxAuiManager, getFlags, 0}},
- {2561, {wxAuiManager, getManagedWindow, 0}},
- {2562, {wxAuiManager, getManager, 1}},
- {2563, {wxAuiManager, getPane_1_1, 1}},
- {2564, {wxAuiManager, getPane_1_0, 1}},
- {2565, {wxAuiManager, hideHint, 0}},
- {2566, {wxAuiManager, insertPane, 3}},
- {2567, {wxAuiManager, loadPaneInfo, 2}},
- {2568, {wxAuiManager, loadPerspective, 2}},
- {2569, {wxAuiManager, savePaneInfo, 1}},
- {2570, {wxAuiManager, savePerspective, 0}},
- {2571, {wxAuiManager, setArtProvider, 1}},
- {2572, {wxAuiManager, setDockSizeConstraint, 2}},
- {2573, {wxAuiManager, setFlags, 1}},
- {2574, {wxAuiManager, setManagedWindow, 1}},
- {2575, {wxAuiManager, showHint, 1}},
- {2576, {wxAuiManager, unInit, 0}},
- {2577, {wxAuiManager, update, 0}},
- {2578, {wxAuiPaneInfo, new_0, 0}},
- {2579, {wxAuiPaneInfo, new_1, 1}},
- {2580, {wxAuiPaneInfo, destruct, 0}},
- {2581, {wxAuiPaneInfo, bestSize_1, 1}},
- {2582, {wxAuiPaneInfo, bestSize_2, 2}},
- {2583, {wxAuiPaneInfo, bottom, 0}},
- {2584, {wxAuiPaneInfo, bottomDockable, 1}},
- {2585, {wxAuiPaneInfo, caption, 1}},
- {2586, {wxAuiPaneInfo, captionVisible, 1}},
- {2587, {wxAuiPaneInfo, centre, 0}},
- {2588, {wxAuiPaneInfo, centrePane, 0}},
- {2589, {wxAuiPaneInfo, closeButton, 1}},
- {2590, {wxAuiPaneInfo, defaultPane, 0}},
- {2591, {wxAuiPaneInfo, destroyOnClose, 1}},
- {2592, {wxAuiPaneInfo, direction, 1}},
- {2593, {wxAuiPaneInfo, dock, 0}},
- {2594, {wxAuiPaneInfo, dockable, 1}},
- {2595, {wxAuiPaneInfo, fixed, 0}},
- {2596, {wxAuiPaneInfo, float, 0}},
- {2597, {wxAuiPaneInfo, floatable, 1}},
- {2598, {wxAuiPaneInfo, floatingPosition_1, 1}},
- {2599, {wxAuiPaneInfo, floatingPosition_2, 2}},
- {2600, {wxAuiPaneInfo, floatingSize_1, 1}},
- {2601, {wxAuiPaneInfo, floatingSize_2, 2}},
- {2602, {wxAuiPaneInfo, gripper, 1}},
- {2603, {wxAuiPaneInfo, gripperTop, 1}},
- {2604, {wxAuiPaneInfo, hasBorder, 0}},
- {2605, {wxAuiPaneInfo, hasCaption, 0}},
- {2606, {wxAuiPaneInfo, hasCloseButton, 0}},
- {2607, {wxAuiPaneInfo, hasFlag, 1}},
- {2608, {wxAuiPaneInfo, hasGripper, 0}},
- {2609, {wxAuiPaneInfo, hasGripperTop, 0}},
- {2610, {wxAuiPaneInfo, hasMaximizeButton, 0}},
- {2611, {wxAuiPaneInfo, hasMinimizeButton, 0}},
- {2612, {wxAuiPaneInfo, hasPinButton, 0}},
- {2613, {wxAuiPaneInfo, hide, 0}},
- {2614, {wxAuiPaneInfo, isBottomDockable, 0}},
- {2615, {wxAuiPaneInfo, isDocked, 0}},
- {2616, {wxAuiPaneInfo, isFixed, 0}},
- {2617, {wxAuiPaneInfo, isFloatable, 0}},
- {2618, {wxAuiPaneInfo, isFloating, 0}},
- {2619, {wxAuiPaneInfo, isLeftDockable, 0}},
- {2620, {wxAuiPaneInfo, isMovable, 0}},
- {2621, {wxAuiPaneInfo, isOk, 0}},
- {2622, {wxAuiPaneInfo, isResizable, 0}},
- {2623, {wxAuiPaneInfo, isRightDockable, 0}},
- {2624, {wxAuiPaneInfo, isShown, 0}},
- {2625, {wxAuiPaneInfo, isToolbar, 0}},
- {2626, {wxAuiPaneInfo, isTopDockable, 0}},
- {2627, {wxAuiPaneInfo, layer, 1}},
- {2628, {wxAuiPaneInfo, left, 0}},
- {2629, {wxAuiPaneInfo, leftDockable, 1}},
- {2630, {wxAuiPaneInfo, maxSize_1, 1}},
- {2631, {wxAuiPaneInfo, maxSize_2, 2}},
- {2632, {wxAuiPaneInfo, maximizeButton, 1}},
- {2633, {wxAuiPaneInfo, minSize_1, 1}},
- {2634, {wxAuiPaneInfo, minSize_2, 2}},
- {2635, {wxAuiPaneInfo, minimizeButton, 1}},
- {2636, {wxAuiPaneInfo, movable, 1}},
- {2637, {wxAuiPaneInfo, name, 1}},
- {2638, {wxAuiPaneInfo, paneBorder, 1}},
- {2639, {wxAuiPaneInfo, pinButton, 1}},
- {2640, {wxAuiPaneInfo, position, 1}},
- {2641, {wxAuiPaneInfo, resizable, 1}},
- {2642, {wxAuiPaneInfo, right, 0}},
- {2643, {wxAuiPaneInfo, rightDockable, 1}},
- {2644, {wxAuiPaneInfo, row, 1}},
- {2645, {wxAuiPaneInfo, safeSet, 1}},
- {2646, {wxAuiPaneInfo, setFlag, 2}},
- {2647, {wxAuiPaneInfo, show, 1}},
- {2648, {wxAuiPaneInfo, toolbarPane, 0}},
- {2649, {wxAuiPaneInfo, top, 0}},
- {2650, {wxAuiPaneInfo, topDockable, 1}},
- {2651, {wxAuiPaneInfo, window, 1}},
- {2652, {wxAuiNotebook, new_0, 0}},
- {2653, {wxAuiNotebook, new_2, 2}},
- {2654, {wxAuiNotebook, addPage, 3}},
- {2655, {wxAuiNotebook, create, 2}},
- {2656, {wxAuiNotebook, deletePage, 1}},
- {2657, {wxAuiNotebook, getArtProvider, 0}},
- {2658, {wxAuiNotebook, getPage, 1}},
- {2659, {wxAuiNotebook, getPageBitmap, 1}},
- {2660, {wxAuiNotebook, getPageCount, 0}},
- {2661, {wxAuiNotebook, getPageIndex, 1}},
- {2662, {wxAuiNotebook, getPageText, 1}},
- {2663, {wxAuiNotebook, getSelection, 0}},
- {2664, {wxAuiNotebook, insertPage, 4}},
- {2665, {wxAuiNotebook, removePage, 1}},
- {2666, {wxAuiNotebook, setArtProvider, 1}},
- {2667, {wxAuiNotebook, setFont, 1}},
- {2668, {wxAuiNotebook, setPageBitmap, 2}},
- {2669, {wxAuiNotebook, setPageText, 2}},
- {2670, {wxAuiNotebook, setSelection, 1}},
- {2671, {wxAuiNotebook, setTabCtrlHeight, 1}},
- {2672, {wxAuiNotebook, setUniformBitmapSize, 1}},
- {2673, {wxAuiNotebook, 'Destroy', undefined}},
- {2674, {wxMDIParentFrame, new_0, 0}},
- {2675, {wxMDIParentFrame, new_4, 4}},
- {2676, {wxMDIParentFrame, destruct, 0}},
- {2677, {wxMDIParentFrame, activateNext, 0}},
- {2678, {wxMDIParentFrame, activatePrevious, 0}},
- {2679, {wxMDIParentFrame, arrangeIcons, 0}},
- {2680, {wxMDIParentFrame, cascade, 0}},
- {2681, {wxMDIParentFrame, create, 4}},
- {2682, {wxMDIParentFrame, getActiveChild, 0}},
- {2683, {wxMDIParentFrame, getClientWindow, 0}},
- {2684, {wxMDIParentFrame, tile, 1}},
- {2685, {wxMDIChildFrame, new_0, 0}},
- {2686, {wxMDIChildFrame, new_4, 4}},
- {2687, {wxMDIChildFrame, destruct, 0}},
- {2688, {wxMDIChildFrame, activate, 0}},
- {2689, {wxMDIChildFrame, create, 4}},
- {2690, {wxMDIChildFrame, maximize, 1}},
- {2691, {wxMDIChildFrame, restore, 0}},
- {2692, {wxMDIClientWindow, new_0, 0}},
- {2693, {wxMDIClientWindow, new_2, 2}},
- {2694, {wxMDIClientWindow, destruct, 0}},
- {2695, {wxMDIClientWindow, createClient, 2}},
- {2696, {wxLayoutAlgorithm, new, 0}},
- {2697, {wxLayoutAlgorithm, layoutFrame, 2}},
- {2698, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
- {2699, {wxLayoutAlgorithm, layoutWindow, 2}},
- {2700, {wxLayoutAlgorithm, 'Destroy', undefined}},
- {2701, {wxEvent, getId, 0}},
- {2702, {wxEvent, getSkipped, 0}},
- {2703, {wxEvent, getTimestamp, 0}},
- {2704, {wxEvent, isCommandEvent, 0}},
- {2705, {wxEvent, resumePropagation, 1}},
- {2706, {wxEvent, shouldPropagate, 0}},
- {2707, {wxEvent, skip, 1}},
- {2708, {wxEvent, stopPropagation, 0}},
- {2709, {wxCommandEvent, getClientData, 0}},
- {2710, {wxCommandEvent, getExtraLong, 0}},
- {2711, {wxCommandEvent, getInt, 0}},
- {2712, {wxCommandEvent, getSelection, 0}},
- {2713, {wxCommandEvent, getString, 0}},
- {2714, {wxCommandEvent, isChecked, 0}},
- {2715, {wxCommandEvent, isSelection, 0}},
- {2716, {wxCommandEvent, setInt, 1}},
- {2717, {wxCommandEvent, setString, 1}},
- {2718, {wxScrollEvent, getOrientation, 0}},
- {2719, {wxScrollEvent, getPosition, 0}},
- {2720, {wxScrollWinEvent, getOrientation, 0}},
- {2721, {wxScrollWinEvent, getPosition, 0}},
- {2722, {wxMouseEvent, altDown, 0}},
- {2723, {wxMouseEvent, button, 1}},
- {2724, {wxMouseEvent, buttonDClick, 1}},
- {2725, {wxMouseEvent, buttonDown, 1}},
- {2726, {wxMouseEvent, buttonUp, 1}},
- {2727, {wxMouseEvent, cmdDown, 0}},
- {2728, {wxMouseEvent, controlDown, 0}},
- {2729, {wxMouseEvent, dragging, 0}},
- {2730, {wxMouseEvent, entering, 0}},
- {2731, {wxMouseEvent, getButton, 0}},
- {2734, {wxMouseEvent, getPosition, 0}},
- {2735, {wxMouseEvent, getLogicalPosition, 1}},
- {2736, {wxMouseEvent, getLinesPerAction, 0}},
- {2737, {wxMouseEvent, getWheelRotation, 0}},
- {2738, {wxMouseEvent, getWheelDelta, 0}},
- {2739, {wxMouseEvent, getX, 0}},
- {2740, {wxMouseEvent, getY, 0}},
- {2741, {wxMouseEvent, isButton, 0}},
- {2742, {wxMouseEvent, isPageScroll, 0}},
- {2743, {wxMouseEvent, leaving, 0}},
- {2744, {wxMouseEvent, leftDClick, 0}},
- {2745, {wxMouseEvent, leftDown, 0}},
- {2746, {wxMouseEvent, leftIsDown, 0}},
- {2747, {wxMouseEvent, leftUp, 0}},
- {2748, {wxMouseEvent, metaDown, 0}},
- {2749, {wxMouseEvent, middleDClick, 0}},
- {2750, {wxMouseEvent, middleDown, 0}},
- {2751, {wxMouseEvent, middleIsDown, 0}},
- {2752, {wxMouseEvent, middleUp, 0}},
- {2753, {wxMouseEvent, moving, 0}},
- {2754, {wxMouseEvent, rightDClick, 0}},
- {2755, {wxMouseEvent, rightDown, 0}},
- {2756, {wxMouseEvent, rightIsDown, 0}},
- {2757, {wxMouseEvent, rightUp, 0}},
- {2758, {wxMouseEvent, shiftDown, 0}},
- {2759, {wxSetCursorEvent, getCursor, 0}},
- {2760, {wxSetCursorEvent, getX, 0}},
- {2761, {wxSetCursorEvent, getY, 0}},
- {2762, {wxSetCursorEvent, hasCursor, 0}},
- {2763, {wxSetCursorEvent, setCursor, 1}},
- {2764, {wxKeyEvent, altDown, 0}},
- {2765, {wxKeyEvent, cmdDown, 0}},
- {2766, {wxKeyEvent, controlDown, 0}},
- {2767, {wxKeyEvent, getKeyCode, 0}},
- {2768, {wxKeyEvent, getModifiers, 0}},
- {2771, {wxKeyEvent, getPosition, 0}},
- {2772, {wxKeyEvent, getRawKeyCode, 0}},
- {2773, {wxKeyEvent, getRawKeyFlags, 0}},
- {2774, {wxKeyEvent, getUnicodeKey, 0}},
- {2775, {wxKeyEvent, getX, 0}},
- {2776, {wxKeyEvent, getY, 0}},
- {2777, {wxKeyEvent, hasModifiers, 0}},
- {2778, {wxKeyEvent, metaDown, 0}},
- {2779, {wxKeyEvent, shiftDown, 0}},
- {2780, {wxSizeEvent, getSize, 0}},
- {2781, {wxMoveEvent, getPosition, 0}},
- {2782, {wxEraseEvent, getDC, 0}},
- {2783, {wxFocusEvent, getWindow, 0}},
- {2784, {wxChildFocusEvent, getWindow, 0}},
- {2785, {wxMenuEvent, getMenu, 0}},
- {2786, {wxMenuEvent, getMenuId, 0}},
- {2787, {wxMenuEvent, isPopup, 0}},
- {2788, {wxCloseEvent, canVeto, 0}},
- {2789, {wxCloseEvent, getLoggingOff, 0}},
- {2790, {wxCloseEvent, setCanVeto, 1}},
- {2791, {wxCloseEvent, setLoggingOff, 1}},
- {2792, {wxCloseEvent, veto, 1}},
- {2793, {wxShowEvent, setShow, 1}},
- {2794, {wxShowEvent, getShow, 0}},
- {2795, {wxIconizeEvent, iconized, 0}},
- {2796, {wxJoystickEvent, buttonDown, 1}},
- {2797, {wxJoystickEvent, buttonIsDown, 1}},
- {2798, {wxJoystickEvent, buttonUp, 1}},
- {2799, {wxJoystickEvent, getButtonChange, 0}},
- {2800, {wxJoystickEvent, getButtonState, 0}},
- {2801, {wxJoystickEvent, getJoystick, 0}},
- {2802, {wxJoystickEvent, getPosition, 0}},
- {2803, {wxJoystickEvent, getZPosition, 0}},
- {2804, {wxJoystickEvent, isButton, 0}},
- {2805, {wxJoystickEvent, isMove, 0}},
- {2806, {wxJoystickEvent, isZMove, 0}},
- {2807, {wxUpdateUIEvent, canUpdate, 1}},
- {2808, {wxUpdateUIEvent, check, 1}},
- {2809, {wxUpdateUIEvent, enable, 1}},
- {2810, {wxUpdateUIEvent, show, 1}},
- {2811, {wxUpdateUIEvent, getChecked, 0}},
- {2812, {wxUpdateUIEvent, getEnabled, 0}},
- {2813, {wxUpdateUIEvent, getShown, 0}},
- {2814, {wxUpdateUIEvent, getSetChecked, 0}},
- {2815, {wxUpdateUIEvent, getSetEnabled, 0}},
- {2816, {wxUpdateUIEvent, getSetShown, 0}},
- {2817, {wxUpdateUIEvent, getSetText, 0}},
- {2818, {wxUpdateUIEvent, getText, 0}},
- {2819, {wxUpdateUIEvent, getMode, 0}},
- {2820, {wxUpdateUIEvent, getUpdateInterval, 0}},
- {2821, {wxUpdateUIEvent, resetUpdateTime, 0}},
- {2822, {wxUpdateUIEvent, setMode, 1}},
- {2823, {wxUpdateUIEvent, setText, 1}},
- {2824, {wxUpdateUIEvent, setUpdateInterval, 1}},
- {2825, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
- {2826, {wxPaletteChangedEvent, setChangedWindow, 1}},
- {2827, {wxPaletteChangedEvent, getChangedWindow, 0}},
- {2828, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
- {2829, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
- {2830, {wxNavigationKeyEvent, getDirection, 0}},
- {2831, {wxNavigationKeyEvent, setDirection, 1}},
- {2832, {wxNavigationKeyEvent, isWindowChange, 0}},
- {2833, {wxNavigationKeyEvent, setWindowChange, 1}},
- {2834, {wxNavigationKeyEvent, isFromTab, 0}},
- {2835, {wxNavigationKeyEvent, setFromTab, 1}},
- {2836, {wxNavigationKeyEvent, getCurrentFocus, 0}},
- {2837, {wxNavigationKeyEvent, setCurrentFocus, 1}},
- {2838, {wxHelpEvent, getOrigin, 0}},
- {2839, {wxHelpEvent, getPosition, 0}},
- {2840, {wxHelpEvent, setOrigin, 1}},
- {2841, {wxHelpEvent, setPosition, 1}},
- {2842, {wxContextMenuEvent, getPosition, 0}},
- {2843, {wxContextMenuEvent, setPosition, 1}},
- {2844, {wxIdleEvent, canSend, 1}},
- {2845, {wxIdleEvent, getMode, 0}},
- {2846, {wxIdleEvent, requestMore, 1}},
- {2847, {wxIdleEvent, moreRequested, 0}},
- {2848, {wxIdleEvent, setMode, 1}},
- {2849, {wxGridEvent, altDown, 0}},
- {2850, {wxGridEvent, controlDown, 0}},
- {2851, {wxGridEvent, getCol, 0}},
- {2852, {wxGridEvent, getPosition, 0}},
- {2853, {wxGridEvent, getRow, 0}},
- {2854, {wxGridEvent, metaDown, 0}},
- {2855, {wxGridEvent, selecting, 0}},
- {2856, {wxGridEvent, shiftDown, 0}},
- {2857, {wxNotifyEvent, allow, 0}},
- {2858, {wxNotifyEvent, isAllowed, 0}},
- {2859, {wxNotifyEvent, veto, 0}},
- {2860, {wxSashEvent, getEdge, 0}},
- {2861, {wxSashEvent, getDragRect, 0}},
- {2862, {wxSashEvent, getDragStatus, 0}},
- {2863, {wxListEvent, getCacheFrom, 0}},
- {2864, {wxListEvent, getCacheTo, 0}},
- {2865, {wxListEvent, getKeyCode, 0}},
- {2866, {wxListEvent, getIndex, 0}},
- {2867, {wxListEvent, getColumn, 0}},
- {2868, {wxListEvent, getPoint, 0}},
- {2869, {wxListEvent, getLabel, 0}},
- {2870, {wxListEvent, getText, 0}},
- {2871, {wxListEvent, getImage, 0}},
- {2872, {wxListEvent, getData, 0}},
- {2873, {wxListEvent, getMask, 0}},
- {2874, {wxListEvent, getItem, 0}},
- {2875, {wxListEvent, isEditCancelled, 0}},
- {2876, {wxDateEvent, getDate, 0}},
- {2877, {wxCalendarEvent, getWeekDay, 0}},
- {2878, {wxFileDirPickerEvent, getPath, 0}},
- {2879, {wxColourPickerEvent, getColour, 0}},
- {2880, {wxFontPickerEvent, getFont, 0}},
- {2881, {wxStyledTextEvent, getPosition, 0}},
- {2882, {wxStyledTextEvent, getKey, 0}},
- {2883, {wxStyledTextEvent, getModifiers, 0}},
- {2884, {wxStyledTextEvent, getModificationType, 0}},
- {2885, {wxStyledTextEvent, getText, 0}},
- {2886, {wxStyledTextEvent, getLength, 0}},
- {2887, {wxStyledTextEvent, getLinesAdded, 0}},
- {2888, {wxStyledTextEvent, getLine, 0}},
- {2889, {wxStyledTextEvent, getFoldLevelNow, 0}},
- {2890, {wxStyledTextEvent, getFoldLevelPrev, 0}},
- {2891, {wxStyledTextEvent, getMargin, 0}},
- {2892, {wxStyledTextEvent, getMessage, 0}},
- {2893, {wxStyledTextEvent, getWParam, 0}},
- {2894, {wxStyledTextEvent, getLParam, 0}},
- {2895, {wxStyledTextEvent, getListType, 0}},
- {2896, {wxStyledTextEvent, getX, 0}},
- {2897, {wxStyledTextEvent, getY, 0}},
- {2898, {wxStyledTextEvent, getDragText, 0}},
- {2899, {wxStyledTextEvent, getDragAllowMove, 0}},
- {2900, {wxStyledTextEvent, getDragResult, 0}},
- {2901, {wxStyledTextEvent, getShift, 0}},
- {2902, {wxStyledTextEvent, getControl, 0}},
- {2903, {wxStyledTextEvent, getAlt, 0}},
- {2904, {utils, getKeyState, 1}},
- {2905, {utils, getMousePosition, 2}},
- {2906, {utils, getMouseState, 0}},
- {2907, {utils, setDetectableAutoRepeat, 1}},
- {2908, {utils, bell, 0}},
- {2909, {utils, findMenuItemId, 3}},
- {2910, {utils, genericFindWindowAtPoint, 1}},
- {2911, {utils, findWindowAtPoint, 1}},
- {2912, {utils, beginBusyCursor, 1}},
- {2913, {utils, endBusyCursor, 0}},
- {2914, {utils, isBusy, 0}},
- {2915, {utils, shutdown, 1}},
- {2916, {utils, shell, 1}},
- {2917, {utils, launchDefaultBrowser, 2}},
- {2918, {utils, getEmailAddress, 0}},
- {2919, {utils, getUserId, 0}},
- {2920, {utils, getHomeDir, 0}},
- {2921, {utils, newId, 0}},
- {2922, {utils, registerId, 1}},
- {2923, {utils, getCurrentId, 0}},
- {2924, {utils, getOsDescription, 0}},
- {2925, {utils, isPlatformLittleEndian, 0}},
- {2926, {utils, isPlatform64Bit, 0}},
- {2927, {wxPrintout, new, 1}},
- {2928, {wxPrintout, destruct, 0}},
- {2929, {wxPrintout, getDC, 0}},
- {2930, {wxPrintout, getPageSizeMM, 2}},
- {2931, {wxPrintout, getPageSizePixels, 2}},
- {2932, {wxPrintout, getPaperRectPixels, 0}},
- {2933, {wxPrintout, getPPIPrinter, 2}},
- {2934, {wxPrintout, getPPIScreen, 2}},
- {2935, {wxPrintout, getTitle, 0}},
- {2936, {wxPrintout, isPreview, 0}},
- {2937, {wxPrintout, fitThisSizeToPaper, 1}},
- {2938, {wxPrintout, fitThisSizeToPage, 1}},
- {2939, {wxPrintout, fitThisSizeToPageMargins, 2}},
- {2940, {wxPrintout, mapScreenSizeToPaper, 0}},
- {2941, {wxPrintout, mapScreenSizeToPage, 0}},
- {2942, {wxPrintout, mapScreenSizeToPageMargins, 1}},
- {2943, {wxPrintout, mapScreenSizeToDevice, 0}},
- {2944, {wxPrintout, getLogicalPaperRect, 0}},
- {2945, {wxPrintout, getLogicalPageRect, 0}},
- {2946, {wxPrintout, getLogicalPageMarginsRect, 1}},
- {2947, {wxPrintout, setLogicalOrigin, 2}},
- {2948, {wxPrintout, offsetLogicalOrigin, 2}},
- {2949, {wxStyledTextCtrl, new_2, 2}},
- {2950, {wxStyledTextCtrl, new_0, 0}},
- {2951, {wxStyledTextCtrl, destruct, 0}},
- {2952, {wxStyledTextCtrl, create, 2}},
- {2953, {wxStyledTextCtrl, addText, 1}},
- {2954, {wxStyledTextCtrl, addStyledText, 1}},
- {2955, {wxStyledTextCtrl, insertText, 2}},
- {2956, {wxStyledTextCtrl, clearAll, 0}},
- {2957, {wxStyledTextCtrl, clearDocumentStyle, 0}},
- {2958, {wxStyledTextCtrl, getLength, 0}},
- {2959, {wxStyledTextCtrl, getCharAt, 1}},
- {2960, {wxStyledTextCtrl, getCurrentPos, 0}},
- {2961, {wxStyledTextCtrl, getAnchor, 0}},
- {2962, {wxStyledTextCtrl, getStyleAt, 1}},
- {2963, {wxStyledTextCtrl, redo, 0}},
- {2964, {wxStyledTextCtrl, setUndoCollection, 1}},
- {2965, {wxStyledTextCtrl, selectAll, 0}},
- {2966, {wxStyledTextCtrl, setSavePoint, 0}},
- {2967, {wxStyledTextCtrl, getStyledText, 2}},
- {2968, {wxStyledTextCtrl, canRedo, 0}},
- {2969, {wxStyledTextCtrl, markerLineFromHandle, 1}},
- {2970, {wxStyledTextCtrl, markerDeleteHandle, 1}},
- {2971, {wxStyledTextCtrl, getUndoCollection, 0}},
- {2972, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
- {2973, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
- {2974, {wxStyledTextCtrl, positionFromPoint, 1}},
- {2975, {wxStyledTextCtrl, positionFromPointClose, 2}},
- {2976, {wxStyledTextCtrl, gotoLine, 1}},
- {2977, {wxStyledTextCtrl, gotoPos, 1}},
- {2978, {wxStyledTextCtrl, setAnchor, 1}},
- {2979, {wxStyledTextCtrl, getCurLine, 1}},
- {2980, {wxStyledTextCtrl, getEndStyled, 0}},
- {2981, {wxStyledTextCtrl, convertEOLs, 1}},
- {2982, {wxStyledTextCtrl, getEOLMode, 0}},
- {2983, {wxStyledTextCtrl, setEOLMode, 1}},
- {2984, {wxStyledTextCtrl, startStyling, 2}},
- {2985, {wxStyledTextCtrl, setStyling, 2}},
- {2986, {wxStyledTextCtrl, getBufferedDraw, 0}},
- {2987, {wxStyledTextCtrl, setBufferedDraw, 1}},
- {2988, {wxStyledTextCtrl, setTabWidth, 1}},
- {2989, {wxStyledTextCtrl, getTabWidth, 0}},
- {2990, {wxStyledTextCtrl, setCodePage, 1}},
- {2991, {wxStyledTextCtrl, markerDefine, 3}},
- {2992, {wxStyledTextCtrl, markerSetForeground, 2}},
- {2993, {wxStyledTextCtrl, markerSetBackground, 2}},
- {2994, {wxStyledTextCtrl, markerAdd, 2}},
- {2995, {wxStyledTextCtrl, markerDelete, 2}},
- {2996, {wxStyledTextCtrl, markerDeleteAll, 1}},
- {2997, {wxStyledTextCtrl, markerGet, 1}},
- {2998, {wxStyledTextCtrl, markerNext, 2}},
- {2999, {wxStyledTextCtrl, markerPrevious, 2}},
- {3000, {wxStyledTextCtrl, markerDefineBitmap, 2}},
- {3001, {wxStyledTextCtrl, markerAddSet, 2}},
- {3002, {wxStyledTextCtrl, markerSetAlpha, 2}},
- {3003, {wxStyledTextCtrl, setMarginType, 2}},
- {3004, {wxStyledTextCtrl, getMarginType, 1}},
- {3005, {wxStyledTextCtrl, setMarginWidth, 2}},
- {3006, {wxStyledTextCtrl, getMarginWidth, 1}},
- {3007, {wxStyledTextCtrl, setMarginMask, 2}},
- {3008, {wxStyledTextCtrl, getMarginMask, 1}},
- {3009, {wxStyledTextCtrl, setMarginSensitive, 2}},
- {3010, {wxStyledTextCtrl, getMarginSensitive, 1}},
- {3011, {wxStyledTextCtrl, styleClearAll, 0}},
- {3012, {wxStyledTextCtrl, styleSetForeground, 2}},
- {3013, {wxStyledTextCtrl, styleSetBackground, 2}},
- {3014, {wxStyledTextCtrl, styleSetBold, 2}},
- {3015, {wxStyledTextCtrl, styleSetItalic, 2}},
- {3016, {wxStyledTextCtrl, styleSetSize, 2}},
- {3017, {wxStyledTextCtrl, styleSetFaceName, 2}},
- {3018, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
- {3019, {wxStyledTextCtrl, styleResetDefault, 0}},
- {3020, {wxStyledTextCtrl, styleSetUnderline, 2}},
- {3021, {wxStyledTextCtrl, styleSetCase, 2}},
- {3022, {wxStyledTextCtrl, styleSetHotSpot, 2}},
- {3023, {wxStyledTextCtrl, setSelForeground, 2}},
- {3024, {wxStyledTextCtrl, setSelBackground, 2}},
- {3025, {wxStyledTextCtrl, getSelAlpha, 0}},
- {3026, {wxStyledTextCtrl, setSelAlpha, 1}},
- {3027, {wxStyledTextCtrl, setCaretForeground, 1}},
- {3028, {wxStyledTextCtrl, cmdKeyAssign, 3}},
- {3029, {wxStyledTextCtrl, cmdKeyClear, 2}},
- {3030, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
- {3031, {wxStyledTextCtrl, setStyleBytes, 2}},
- {3032, {wxStyledTextCtrl, styleSetVisible, 2}},
- {3033, {wxStyledTextCtrl, getCaretPeriod, 0}},
- {3034, {wxStyledTextCtrl, setCaretPeriod, 1}},
- {3035, {wxStyledTextCtrl, setWordChars, 1}},
- {3036, {wxStyledTextCtrl, beginUndoAction, 0}},
- {3037, {wxStyledTextCtrl, endUndoAction, 0}},
- {3038, {wxStyledTextCtrl, indicatorSetStyle, 2}},
- {3039, {wxStyledTextCtrl, indicatorGetStyle, 1}},
- {3040, {wxStyledTextCtrl, indicatorSetForeground, 2}},
- {3041, {wxStyledTextCtrl, indicatorGetForeground, 1}},
- {3042, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
- {3043, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
- {3044, {wxStyledTextCtrl, getStyleBits, 0}},
- {3045, {wxStyledTextCtrl, setLineState, 2}},
- {3046, {wxStyledTextCtrl, getLineState, 1}},
- {3047, {wxStyledTextCtrl, getMaxLineState, 0}},
- {3048, {wxStyledTextCtrl, getCaretLineVisible, 0}},
- {3049, {wxStyledTextCtrl, setCaretLineVisible, 1}},
- {3050, {wxStyledTextCtrl, getCaretLineBackground, 0}},
- {3051, {wxStyledTextCtrl, setCaretLineBackground, 1}},
- {3052, {wxStyledTextCtrl, autoCompShow, 2}},
- {3053, {wxStyledTextCtrl, autoCompCancel, 0}},
- {3054, {wxStyledTextCtrl, autoCompActive, 0}},
- {3055, {wxStyledTextCtrl, autoCompPosStart, 0}},
- {3056, {wxStyledTextCtrl, autoCompComplete, 0}},
- {3057, {wxStyledTextCtrl, autoCompStops, 1}},
- {3058, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
- {3059, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
- {3060, {wxStyledTextCtrl, autoCompSelect, 1}},
- {3061, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
- {3062, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
- {3063, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
- {3064, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
- {3065, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
- {3066, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
- {3067, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
- {3068, {wxStyledTextCtrl, userListShow, 2}},
- {3069, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
- {3070, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
- {3071, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
- {3072, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
- {3073, {wxStyledTextCtrl, registerImage, 2}},
- {3074, {wxStyledTextCtrl, clearRegisteredImages, 0}},
- {3075, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
- {3076, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
- {3077, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
- {3078, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
- {3079, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
- {3080, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
- {3081, {wxStyledTextCtrl, setIndent, 1}},
- {3082, {wxStyledTextCtrl, getIndent, 0}},
- {3083, {wxStyledTextCtrl, setUseTabs, 1}},
- {3084, {wxStyledTextCtrl, getUseTabs, 0}},
- {3085, {wxStyledTextCtrl, setLineIndentation, 2}},
- {3086, {wxStyledTextCtrl, getLineIndentation, 1}},
- {3087, {wxStyledTextCtrl, getLineIndentPosition, 1}},
- {3088, {wxStyledTextCtrl, getColumn, 1}},
- {3089, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
- {3090, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
- {3091, {wxStyledTextCtrl, setIndentationGuides, 1}},
- {3092, {wxStyledTextCtrl, getIndentationGuides, 0}},
- {3093, {wxStyledTextCtrl, setHighlightGuide, 1}},
- {3094, {wxStyledTextCtrl, getHighlightGuide, 0}},
- {3095, {wxStyledTextCtrl, getLineEndPosition, 1}},
- {3096, {wxStyledTextCtrl, getCodePage, 0}},
- {3097, {wxStyledTextCtrl, getCaretForeground, 0}},
- {3098, {wxStyledTextCtrl, getReadOnly, 0}},
- {3099, {wxStyledTextCtrl, setCurrentPos, 1}},
- {3100, {wxStyledTextCtrl, setSelectionStart, 1}},
- {3101, {wxStyledTextCtrl, getSelectionStart, 0}},
- {3102, {wxStyledTextCtrl, setSelectionEnd, 1}},
- {3103, {wxStyledTextCtrl, getSelectionEnd, 0}},
- {3104, {wxStyledTextCtrl, setPrintMagnification, 1}},
- {3105, {wxStyledTextCtrl, getPrintMagnification, 0}},
- {3106, {wxStyledTextCtrl, setPrintColourMode, 1}},
- {3107, {wxStyledTextCtrl, getPrintColourMode, 0}},
- {3108, {wxStyledTextCtrl, findText, 4}},
- {3109, {wxStyledTextCtrl, formatRange, 7}},
- {3110, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
- {3111, {wxStyledTextCtrl, getLine, 1}},
- {3112, {wxStyledTextCtrl, getLineCount, 0}},
- {3113, {wxStyledTextCtrl, setMarginLeft, 1}},
- {3114, {wxStyledTextCtrl, getMarginLeft, 0}},
- {3115, {wxStyledTextCtrl, setMarginRight, 1}},
- {3116, {wxStyledTextCtrl, getMarginRight, 0}},
- {3117, {wxStyledTextCtrl, getModify, 0}},
- {3118, {wxStyledTextCtrl, setSelection, 2}},
- {3119, {wxStyledTextCtrl, getSelectedText, 0}},
- {3120, {wxStyledTextCtrl, getTextRange, 2}},
- {3121, {wxStyledTextCtrl, hideSelection, 1}},
- {3122, {wxStyledTextCtrl, lineFromPosition, 1}},
- {3123, {wxStyledTextCtrl, positionFromLine, 1}},
- {3124, {wxStyledTextCtrl, lineScroll, 2}},
- {3125, {wxStyledTextCtrl, ensureCaretVisible, 0}},
- {3126, {wxStyledTextCtrl, replaceSelection, 1}},
- {3127, {wxStyledTextCtrl, setReadOnly, 1}},
- {3128, {wxStyledTextCtrl, canPaste, 0}},
- {3129, {wxStyledTextCtrl, canUndo, 0}},
- {3130, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
- {3131, {wxStyledTextCtrl, undo, 0}},
- {3132, {wxStyledTextCtrl, cut, 0}},
- {3133, {wxStyledTextCtrl, copy, 0}},
- {3134, {wxStyledTextCtrl, paste, 0}},
- {3135, {wxStyledTextCtrl, clear, 0}},
- {3136, {wxStyledTextCtrl, setText, 1}},
- {3137, {wxStyledTextCtrl, getText, 0}},
- {3138, {wxStyledTextCtrl, getTextLength, 0}},
- {3139, {wxStyledTextCtrl, getOvertype, 0}},
- {3140, {wxStyledTextCtrl, setCaretWidth, 1}},
- {3141, {wxStyledTextCtrl, getCaretWidth, 0}},
- {3142, {wxStyledTextCtrl, setTargetStart, 1}},
- {3143, {wxStyledTextCtrl, getTargetStart, 0}},
- {3144, {wxStyledTextCtrl, setTargetEnd, 1}},
- {3145, {wxStyledTextCtrl, getTargetEnd, 0}},
- {3146, {wxStyledTextCtrl, replaceTarget, 1}},
- {3147, {wxStyledTextCtrl, searchInTarget, 1}},
- {3148, {wxStyledTextCtrl, setSearchFlags, 1}},
- {3149, {wxStyledTextCtrl, getSearchFlags, 0}},
- {3150, {wxStyledTextCtrl, callTipShow, 2}},
- {3151, {wxStyledTextCtrl, callTipCancel, 0}},
- {3152, {wxStyledTextCtrl, callTipActive, 0}},
- {3153, {wxStyledTextCtrl, callTipPosAtStart, 0}},
- {3154, {wxStyledTextCtrl, callTipSetHighlight, 2}},
- {3155, {wxStyledTextCtrl, callTipSetBackground, 1}},
- {3156, {wxStyledTextCtrl, callTipSetForeground, 1}},
- {3157, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
- {3158, {wxStyledTextCtrl, callTipUseStyle, 1}},
- {3159, {wxStyledTextCtrl, visibleFromDocLine, 1}},
- {3160, {wxStyledTextCtrl, docLineFromVisible, 1}},
- {3161, {wxStyledTextCtrl, wrapCount, 1}},
- {3162, {wxStyledTextCtrl, setFoldLevel, 2}},
- {3163, {wxStyledTextCtrl, getFoldLevel, 1}},
- {3164, {wxStyledTextCtrl, getLastChild, 2}},
- {3165, {wxStyledTextCtrl, getFoldParent, 1}},
- {3166, {wxStyledTextCtrl, showLines, 2}},
- {3167, {wxStyledTextCtrl, hideLines, 2}},
- {3168, {wxStyledTextCtrl, getLineVisible, 1}},
- {3169, {wxStyledTextCtrl, setFoldExpanded, 2}},
- {3170, {wxStyledTextCtrl, getFoldExpanded, 1}},
- {3171, {wxStyledTextCtrl, toggleFold, 1}},
- {3172, {wxStyledTextCtrl, ensureVisible, 1}},
- {3173, {wxStyledTextCtrl, setFoldFlags, 1}},
- {3174, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
- {3175, {wxStyledTextCtrl, setTabIndents, 1}},
- {3176, {wxStyledTextCtrl, getTabIndents, 0}},
- {3177, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
- {3178, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
- {3179, {wxStyledTextCtrl, setMouseDwellTime, 1}},
- {3180, {wxStyledTextCtrl, getMouseDwellTime, 0}},
- {3181, {wxStyledTextCtrl, wordStartPosition, 2}},
- {3182, {wxStyledTextCtrl, wordEndPosition, 2}},
- {3183, {wxStyledTextCtrl, setWrapMode, 1}},
- {3184, {wxStyledTextCtrl, getWrapMode, 0}},
- {3185, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
- {3186, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
- {3187, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
- {3188, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
- {3189, {wxStyledTextCtrl, setWrapStartIndent, 1}},
- {3190, {wxStyledTextCtrl, getWrapStartIndent, 0}},
- {3191, {wxStyledTextCtrl, setLayoutCache, 1}},
- {3192, {wxStyledTextCtrl, getLayoutCache, 0}},
- {3193, {wxStyledTextCtrl, setScrollWidth, 1}},
- {3194, {wxStyledTextCtrl, getScrollWidth, 0}},
- {3195, {wxStyledTextCtrl, textWidth, 2}},
- {3196, {wxStyledTextCtrl, getEndAtLastLine, 0}},
- {3197, {wxStyledTextCtrl, textHeight, 1}},
- {3198, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
- {3199, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
- {3200, {wxStyledTextCtrl, appendText, 1}},
- {3201, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
- {3202, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
- {3203, {wxStyledTextCtrl, targetFromSelection, 0}},
- {3204, {wxStyledTextCtrl, linesJoin, 0}},
- {3205, {wxStyledTextCtrl, linesSplit, 1}},
- {3206, {wxStyledTextCtrl, setFoldMarginColour, 2}},
- {3207, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
- {3208, {wxStyledTextCtrl, lineDown, 0}},
- {3209, {wxStyledTextCtrl, lineDownExtend, 0}},
- {3210, {wxStyledTextCtrl, lineUp, 0}},
- {3211, {wxStyledTextCtrl, lineUpExtend, 0}},
- {3212, {wxStyledTextCtrl, charLeft, 0}},
- {3213, {wxStyledTextCtrl, charLeftExtend, 0}},
- {3214, {wxStyledTextCtrl, charRight, 0}},
- {3215, {wxStyledTextCtrl, charRightExtend, 0}},
- {3216, {wxStyledTextCtrl, wordLeft, 0}},
- {3217, {wxStyledTextCtrl, wordLeftExtend, 0}},
- {3218, {wxStyledTextCtrl, wordRight, 0}},
- {3219, {wxStyledTextCtrl, wordRightExtend, 0}},
- {3220, {wxStyledTextCtrl, home, 0}},
- {3221, {wxStyledTextCtrl, homeExtend, 0}},
- {3222, {wxStyledTextCtrl, lineEnd, 0}},
- {3223, {wxStyledTextCtrl, lineEndExtend, 0}},
- {3224, {wxStyledTextCtrl, documentStart, 0}},
- {3225, {wxStyledTextCtrl, documentStartExtend, 0}},
- {3226, {wxStyledTextCtrl, documentEnd, 0}},
- {3227, {wxStyledTextCtrl, documentEndExtend, 0}},
- {3228, {wxStyledTextCtrl, pageUp, 0}},
- {3229, {wxStyledTextCtrl, pageUpExtend, 0}},
- {3230, {wxStyledTextCtrl, pageDown, 0}},
- {3231, {wxStyledTextCtrl, pageDownExtend, 0}},
- {3232, {wxStyledTextCtrl, editToggleOvertype, 0}},
- {3233, {wxStyledTextCtrl, cancel, 0}},
- {3234, {wxStyledTextCtrl, deleteBack, 0}},
- {3235, {wxStyledTextCtrl, tab, 0}},
- {3236, {wxStyledTextCtrl, backTab, 0}},
- {3237, {wxStyledTextCtrl, newLine, 0}},
- {3238, {wxStyledTextCtrl, formFeed, 0}},
- {3239, {wxStyledTextCtrl, vCHome, 0}},
- {3240, {wxStyledTextCtrl, vCHomeExtend, 0}},
- {3241, {wxStyledTextCtrl, zoomIn, 0}},
- {3242, {wxStyledTextCtrl, zoomOut, 0}},
- {3243, {wxStyledTextCtrl, delWordLeft, 0}},
- {3244, {wxStyledTextCtrl, delWordRight, 0}},
- {3245, {wxStyledTextCtrl, lineCut, 0}},
- {3246, {wxStyledTextCtrl, lineDelete, 0}},
- {3247, {wxStyledTextCtrl, lineTranspose, 0}},
- {3248, {wxStyledTextCtrl, lineDuplicate, 0}},
- {3249, {wxStyledTextCtrl, lowerCase, 0}},
- {3250, {wxStyledTextCtrl, upperCase, 0}},
- {3251, {wxStyledTextCtrl, lineScrollDown, 0}},
- {3252, {wxStyledTextCtrl, lineScrollUp, 0}},
- {3253, {wxStyledTextCtrl, deleteBackNotLine, 0}},
- {3254, {wxStyledTextCtrl, homeDisplay, 0}},
- {3255, {wxStyledTextCtrl, homeDisplayExtend, 0}},
- {3256, {wxStyledTextCtrl, lineEndDisplay, 0}},
- {3257, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
- {3258, {wxStyledTextCtrl, homeWrapExtend, 0}},
- {3259, {wxStyledTextCtrl, lineEndWrap, 0}},
- {3260, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
- {3261, {wxStyledTextCtrl, vCHomeWrap, 0}},
- {3262, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
- {3263, {wxStyledTextCtrl, lineCopy, 0}},
- {3264, {wxStyledTextCtrl, moveCaretInsideView, 0}},
- {3265, {wxStyledTextCtrl, lineLength, 1}},
- {3266, {wxStyledTextCtrl, braceHighlight, 2}},
- {3267, {wxStyledTextCtrl, braceBadLight, 1}},
- {3268, {wxStyledTextCtrl, braceMatch, 1}},
- {3269, {wxStyledTextCtrl, getViewEOL, 0}},
- {3270, {wxStyledTextCtrl, setViewEOL, 1}},
- {3271, {wxStyledTextCtrl, setModEventMask, 1}},
- {3272, {wxStyledTextCtrl, getEdgeColumn, 0}},
- {3273, {wxStyledTextCtrl, setEdgeColumn, 1}},
- {3274, {wxStyledTextCtrl, setEdgeMode, 1}},
- {3275, {wxStyledTextCtrl, getEdgeMode, 0}},
- {3276, {wxStyledTextCtrl, getEdgeColour, 0}},
- {3277, {wxStyledTextCtrl, setEdgeColour, 1}},
- {3278, {wxStyledTextCtrl, searchAnchor, 0}},
- {3279, {wxStyledTextCtrl, searchNext, 2}},
- {3280, {wxStyledTextCtrl, searchPrev, 2}},
- {3281, {wxStyledTextCtrl, linesOnScreen, 0}},
- {3282, {wxStyledTextCtrl, usePopUp, 1}},
- {3283, {wxStyledTextCtrl, selectionIsRectangle, 0}},
- {3284, {wxStyledTextCtrl, setZoom, 1}},
- {3285, {wxStyledTextCtrl, getZoom, 0}},
- {3286, {wxStyledTextCtrl, getModEventMask, 0}},
- {3287, {wxStyledTextCtrl, setSTCFocus, 1}},
- {3288, {wxStyledTextCtrl, getSTCFocus, 0}},
- {3289, {wxStyledTextCtrl, setStatus, 1}},
- {3290, {wxStyledTextCtrl, getStatus, 0}},
- {3291, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
- {3292, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
- {3293, {wxStyledTextCtrl, setSTCCursor, 1}},
- {3294, {wxStyledTextCtrl, getSTCCursor, 0}},
- {3295, {wxStyledTextCtrl, setControlCharSymbol, 1}},
- {3296, {wxStyledTextCtrl, getControlCharSymbol, 0}},
- {3297, {wxStyledTextCtrl, wordPartLeft, 0}},
- {3298, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
- {3299, {wxStyledTextCtrl, wordPartRight, 0}},
- {3300, {wxStyledTextCtrl, wordPartRightExtend, 0}},
- {3301, {wxStyledTextCtrl, setVisiblePolicy, 2}},
- {3302, {wxStyledTextCtrl, delLineLeft, 0}},
- {3303, {wxStyledTextCtrl, delLineRight, 0}},
- {3304, {wxStyledTextCtrl, getXOffset, 0}},
- {3305, {wxStyledTextCtrl, chooseCaretX, 0}},
- {3306, {wxStyledTextCtrl, setXCaretPolicy, 2}},
- {3307, {wxStyledTextCtrl, setYCaretPolicy, 2}},
- {3308, {wxStyledTextCtrl, getPrintWrapMode, 0}},
- {3309, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
- {3310, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
- {3311, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
- {3312, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
- {3313, {wxStyledTextCtrl, paraDownExtend, 0}},
- {3314, {wxStyledTextCtrl, paraUp, 0}},
- {3315, {wxStyledTextCtrl, paraUpExtend, 0}},
- {3316, {wxStyledTextCtrl, positionBefore, 1}},
- {3317, {wxStyledTextCtrl, positionAfter, 1}},
- {3318, {wxStyledTextCtrl, copyRange, 2}},
- {3319, {wxStyledTextCtrl, copyText, 2}},
- {3320, {wxStyledTextCtrl, setSelectionMode, 1}},
- {3321, {wxStyledTextCtrl, getSelectionMode, 0}},
- {3322, {wxStyledTextCtrl, lineDownRectExtend, 0}},
- {3323, {wxStyledTextCtrl, lineUpRectExtend, 0}},
- {3324, {wxStyledTextCtrl, charLeftRectExtend, 0}},
- {3325, {wxStyledTextCtrl, charRightRectExtend, 0}},
- {3326, {wxStyledTextCtrl, homeRectExtend, 0}},
- {3327, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
- {3328, {wxStyledTextCtrl, lineEndRectExtend, 0}},
- {3329, {wxStyledTextCtrl, pageUpRectExtend, 0}},
- {3330, {wxStyledTextCtrl, pageDownRectExtend, 0}},
- {3331, {wxStyledTextCtrl, stutteredPageUp, 0}},
- {3332, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
- {3333, {wxStyledTextCtrl, stutteredPageDown, 0}},
- {3334, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
- {3335, {wxStyledTextCtrl, wordLeftEnd, 0}},
- {3336, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
- {3337, {wxStyledTextCtrl, wordRightEnd, 0}},
- {3338, {wxStyledTextCtrl, wordRightEndExtend, 0}},
- {3339, {wxStyledTextCtrl, setWhitespaceChars, 1}},
- {3340, {wxStyledTextCtrl, setCharsDefault, 0}},
- {3341, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
- {3342, {wxStyledTextCtrl, allocate, 1}},
- {3343, {wxStyledTextCtrl, findColumn, 2}},
- {3344, {wxStyledTextCtrl, getCaretSticky, 0}},
- {3345, {wxStyledTextCtrl, setCaretSticky, 1}},
- {3346, {wxStyledTextCtrl, toggleCaretSticky, 0}},
- {3347, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
- {3348, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
- {3349, {wxStyledTextCtrl, selectionDuplicate, 0}},
- {3350, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
- {3351, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
- {3352, {wxStyledTextCtrl, startRecord, 0}},
- {3353, {wxStyledTextCtrl, stopRecord, 0}},
- {3354, {wxStyledTextCtrl, setLexer, 1}},
- {3355, {wxStyledTextCtrl, getLexer, 0}},
- {3356, {wxStyledTextCtrl, colourise, 2}},
- {3357, {wxStyledTextCtrl, setProperty, 2}},
- {3358, {wxStyledTextCtrl, setKeyWords, 2}},
- {3359, {wxStyledTextCtrl, setLexerLanguage, 1}},
- {3360, {wxStyledTextCtrl, getProperty, 1}},
- {3361, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
- {3362, {wxStyledTextCtrl, getCurrentLine, 0}},
- {3363, {wxStyledTextCtrl, styleSetSpec, 2}},
- {3364, {wxStyledTextCtrl, styleSetFont, 2}},
- {3365, {wxStyledTextCtrl, styleSetFontAttr, 7}},
- {3366, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
- {3367, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
- {3368, {wxStyledTextCtrl, cmdKeyExecute, 1}},
- {3369, {wxStyledTextCtrl, setMargins, 2}},
- {3370, {wxStyledTextCtrl, getSelection, 2}},
- {3371, {wxStyledTextCtrl, pointFromPosition, 1}},
- {3372, {wxStyledTextCtrl, scrollToLine, 1}},
- {3373, {wxStyledTextCtrl, scrollToColumn, 1}},
- {3374, {wxStyledTextCtrl, setVScrollBar, 1}},
- {3375, {wxStyledTextCtrl, setHScrollBar, 1}},
- {3376, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
- {3377, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
- {3378, {wxStyledTextCtrl, saveFile, 1}},
- {3379, {wxStyledTextCtrl, loadFile, 1}},
- {3380, {wxStyledTextCtrl, doDragOver, 3}},
- {3381, {wxStyledTextCtrl, doDropText, 3}},
- {3382, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
- {3383, {wxStyledTextCtrl, addTextRaw, 1}},
- {3384, {wxStyledTextCtrl, insertTextRaw, 2}},
- {3385, {wxStyledTextCtrl, getCurLineRaw, 1}},
- {3386, {wxStyledTextCtrl, getLineRaw, 1}},
- {3387, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
- {3388, {wxStyledTextCtrl, getTextRangeRaw, 2}},
- {3389, {wxStyledTextCtrl, setTextRaw, 1}},
- {3390, {wxStyledTextCtrl, getTextRaw, 0}},
- {3391, {wxStyledTextCtrl, appendTextRaw, 1}},
- {3392, {wxArtProvider, getBitmap, 2}},
- {3393, {wxArtProvider, getIcon, 2}},
- {3394, {wxTreeEvent, getKeyCode, 0}},
- {3395, {wxTreeEvent, getItem, 0}},
- {3396, {wxTreeEvent, getKeyEvent, 0}},
- {3397, {wxTreeEvent, getLabel, 0}},
- {3398, {wxTreeEvent, getOldItem, 0}},
- {3399, {wxTreeEvent, getPoint, 0}},
- {3400, {wxTreeEvent, isEditCancelled, 0}},
- {3401, {wxTreeEvent, setToolTip, 1}},
- {3402, {wxNotebookEvent, getOldSelection, 0}},
- {3403, {wxNotebookEvent, getSelection, 0}},
- {3404, {wxNotebookEvent, setOldSelection, 1}},
- {3405, {wxNotebookEvent, setSelection, 1}},
- {3406, {wxFileDataObject, new, 0}},
- {3407, {wxFileDataObject, addFile, 1}},
- {3408, {wxFileDataObject, getFilenames, 0}},
- {3409, {wxFileDataObject, 'Destroy', undefined}},
- {3410, {wxTextDataObject, new, 1}},
- {3411, {wxTextDataObject, getTextLength, 0}},
- {3412, {wxTextDataObject, getText, 0}},
- {3413, {wxTextDataObject, setText, 1}},
- {3414, {wxTextDataObject, 'Destroy', undefined}},
- {3415, {wxBitmapDataObject, new_1_1, 1}},
- {3416, {wxBitmapDataObject, new_1_0, 1}},
- {3417, {wxBitmapDataObject, getBitmap, 0}},
- {3418, {wxBitmapDataObject, setBitmap, 1}},
- {3419, {wxBitmapDataObject, 'Destroy', undefined}},
- {3421, {wxClipboard, new, 0}},
- {3422, {wxClipboard, destruct, 0}},
- {3423, {wxClipboard, addData, 1}},
- {3424, {wxClipboard, clear, 0}},
- {3425, {wxClipboard, close, 0}},
- {3426, {wxClipboard, flush, 0}},
- {3427, {wxClipboard, getData, 1}},
- {3428, {wxClipboard, isOpened, 0}},
- {3429, {wxClipboard, open, 0}},
- {3430, {wxClipboard, setData, 1}},
- {3432, {wxClipboard, usePrimarySelection, 1}},
- {3433, {wxClipboard, isSupported, 1}},
- {3434, {wxClipboard, get, 0}},
- {3435, {wxSpinEvent, getPosition, 0}},
- {3436, {wxSpinEvent, setPosition, 1}},
- {3437, {wxSplitterWindow, new_0, 0}},
- {3438, {wxSplitterWindow, new_2, 2}},
- {3439, {wxSplitterWindow, destruct, 0}},
- {3440, {wxSplitterWindow, create, 2}},
- {3441, {wxSplitterWindow, getMinimumPaneSize, 0}},
- {3442, {wxSplitterWindow, getSashGravity, 0}},
- {3443, {wxSplitterWindow, getSashPosition, 0}},
- {3444, {wxSplitterWindow, getSplitMode, 0}},
- {3445, {wxSplitterWindow, getWindow1, 0}},
- {3446, {wxSplitterWindow, getWindow2, 0}},
- {3447, {wxSplitterWindow, initialize, 1}},
- {3448, {wxSplitterWindow, isSplit, 0}},
- {3449, {wxSplitterWindow, replaceWindow, 2}},
- {3450, {wxSplitterWindow, setSashGravity, 1}},
- {3451, {wxSplitterWindow, setSashPosition, 2}},
- {3452, {wxSplitterWindow, setSashSize, 1}},
- {3453, {wxSplitterWindow, setMinimumPaneSize, 1}},
- {3454, {wxSplitterWindow, setSplitMode, 1}},
- {3455, {wxSplitterWindow, splitHorizontally, 3}},
- {3456, {wxSplitterWindow, splitVertically, 3}},
- {3457, {wxSplitterWindow, unsplit, 1}},
- {3458, {wxSplitterWindow, updateSize, 0}},
- {3459, {wxSplitterEvent, getSashPosition, 0}},
- {3460, {wxSplitterEvent, getX, 0}},
- {3461, {wxSplitterEvent, getY, 0}},
- {3462, {wxSplitterEvent, getWindowBeingRemoved, 0}},
- {3463, {wxSplitterEvent, setSashPosition, 1}},
- {3464, {wxHtmlWindow, new_0, 0}},
- {3465, {wxHtmlWindow, new_2, 2}},
- {3466, {wxHtmlWindow, appendToPage, 1}},
- {3467, {wxHtmlWindow, getOpenedAnchor, 0}},
- {3468, {wxHtmlWindow, getOpenedPage, 0}},
- {3469, {wxHtmlWindow, getOpenedPageTitle, 0}},
- {3470, {wxHtmlWindow, getRelatedFrame, 0}},
- {3471, {wxHtmlWindow, historyBack, 0}},
- {3472, {wxHtmlWindow, historyCanBack, 0}},
- {3473, {wxHtmlWindow, historyCanForward, 0}},
- {3474, {wxHtmlWindow, historyClear, 0}},
- {3475, {wxHtmlWindow, historyForward, 0}},
- {3476, {wxHtmlWindow, loadFile, 1}},
- {3477, {wxHtmlWindow, loadPage, 1}},
- {3478, {wxHtmlWindow, selectAll, 0}},
- {3479, {wxHtmlWindow, selectionToText, 0}},
- {3480, {wxHtmlWindow, selectLine, 1}},
- {3481, {wxHtmlWindow, selectWord, 1}},
- {3482, {wxHtmlWindow, setBorders, 1}},
- {3483, {wxHtmlWindow, setFonts, 3}},
- {3484, {wxHtmlWindow, setPage, 1}},
- {3485, {wxHtmlWindow, setRelatedFrame, 2}},
- {3486, {wxHtmlWindow, setRelatedStatusBar, 1}},
- {3487, {wxHtmlWindow, toText, 0}},
- {3488, {wxHtmlWindow, 'Destroy', undefined}},
- {3489, {wxHtmlLinkEvent, getLinkInfo, 0}},
- {3490, {wxSystemSettings, getColour, 1}},
- {3491, {wxSystemSettings, getFont, 1}},
- {3492, {wxSystemSettings, getMetric, 2}},
- {3493, {wxSystemSettings, getScreenType, 0}},
- {3494, {wxSystemOptions, getOption, 1}},
- {3495, {wxSystemOptions, getOptionInt, 1}},
- {3496, {wxSystemOptions, hasOption, 1}},
- {3497, {wxSystemOptions, isFalse, 1}},
- {3498, {wxSystemOptions, setOption_2_1, 2}},
- {3499, {wxSystemOptions, setOption_2_0, 2}},
- {3500, {wxAuiNotebookEvent, setSelection, 1}},
- {3501, {wxAuiNotebookEvent, getSelection, 0}},
- {3502, {wxAuiNotebookEvent, setOldSelection, 1}},
- {3503, {wxAuiNotebookEvent, getOldSelection, 0}},
- {3504, {wxAuiNotebookEvent, setDragSource, 1}},
- {3505, {wxAuiNotebookEvent, getDragSource, 0}},
- {3506, {wxAuiManagerEvent, setManager, 1}},
- {3507, {wxAuiManagerEvent, getManager, 0}},
- {3508, {wxAuiManagerEvent, setPane, 1}},
- {3509, {wxAuiManagerEvent, getPane, 0}},
- {3510, {wxAuiManagerEvent, setButton, 1}},
- {3511, {wxAuiManagerEvent, getButton, 0}},
- {3512, {wxAuiManagerEvent, setDC, 1}},
- {3513, {wxAuiManagerEvent, getDC, 0}},
- {3514, {wxAuiManagerEvent, veto, 1}},
- {3515, {wxAuiManagerEvent, getVeto, 0}},
- {3516, {wxAuiManagerEvent, setCanVeto, 1}},
- {3517, {wxAuiManagerEvent, canVeto, 0}},
- {3518, {wxLogNull, new, 0}},
- {3519, {wxLogNull, 'Destroy', undefined}},
- {3520, {wxTaskBarIcon, new, 0}},
- {3521, {wxTaskBarIcon, destruct, 0}},
- {3522, {wxTaskBarIcon, popupMenu, 1}},
- {3523, {wxTaskBarIcon, removeIcon, 0}},
- {3524, {wxTaskBarIcon, setIcon, 2}},
+ {1827, {wxTextCtrl, changeValue, 1}},
+ {1828, {wxTextCtrl, emulateKeyPress, 1}},
+ {1829, {wxTextCtrl, getDefaultStyle, 0}},
+ {1830, {wxTextCtrl, getInsertionPoint, 0}},
+ {1831, {wxTextCtrl, getLastPosition, 0}},
+ {1832, {wxTextCtrl, getLineLength, 1}},
+ {1833, {wxTextCtrl, getLineText, 1}},
+ {1834, {wxTextCtrl, getNumberOfLines, 0}},
+ {1835, {wxTextCtrl, getRange, 2}},
+ {1836, {wxTextCtrl, getSelection, 2}},
+ {1837, {wxTextCtrl, getStringSelection, 0}},
+ {1838, {wxTextCtrl, getStyle, 2}},
+ {1839, {wxTextCtrl, getValue, 0}},
+ {1840, {wxTextCtrl, isEditable, 0}},
+ {1841, {wxTextCtrl, isModified, 0}},
+ {1842, {wxTextCtrl, isMultiLine, 0}},
+ {1843, {wxTextCtrl, isSingleLine, 0}},
+ {1844, {wxTextCtrl, loadFile, 2}},
+ {1845, {wxTextCtrl, markDirty, 0}},
+ {1846, {wxTextCtrl, paste, 0}},
+ {1847, {wxTextCtrl, positionToXY, 3}},
+ {1848, {wxTextCtrl, redo, 0}},
+ {1849, {wxTextCtrl, remove, 2}},
+ {1850, {wxTextCtrl, replace, 3}},
+ {1851, {wxTextCtrl, saveFile, 1}},
+ {1852, {wxTextCtrl, setDefaultStyle, 1}},
+ {1853, {wxTextCtrl, setEditable, 1}},
+ {1854, {wxTextCtrl, setInsertionPoint, 1}},
+ {1855, {wxTextCtrl, setInsertionPointEnd, 0}},
+ {1857, {wxTextCtrl, setMaxLength, 1}},
+ {1858, {wxTextCtrl, setSelection, 2}},
+ {1859, {wxTextCtrl, setStyle, 3}},
+ {1860, {wxTextCtrl, setValue, 1}},
+ {1861, {wxTextCtrl, showPosition, 1}},
+ {1862, {wxTextCtrl, undo, 0}},
+ {1863, {wxTextCtrl, writeText, 1}},
+ {1864, {wxTextCtrl, xYToPosition, 2}},
+ {1867, {wxNotebook, new_0, 0}},
+ {1868, {wxNotebook, new_3, 3}},
+ {1869, {wxNotebook, destruct, 0}},
+ {1870, {wxNotebook, addPage, 3}},
+ {1871, {wxNotebook, advanceSelection, 1}},
+ {1872, {wxNotebook, assignImageList, 1}},
+ {1873, {wxNotebook, create, 3}},
+ {1874, {wxNotebook, deleteAllPages, 0}},
+ {1875, {wxNotebook, deletePage, 1}},
+ {1876, {wxNotebook, removePage, 1}},
+ {1877, {wxNotebook, getCurrentPage, 0}},
+ {1878, {wxNotebook, getImageList, 0}},
+ {1880, {wxNotebook, getPage, 1}},
+ {1881, {wxNotebook, getPageCount, 0}},
+ {1882, {wxNotebook, getPageImage, 1}},
+ {1883, {wxNotebook, getPageText, 1}},
+ {1884, {wxNotebook, getRowCount, 0}},
+ {1885, {wxNotebook, getSelection, 0}},
+ {1886, {wxNotebook, getThemeBackgroundColour, 0}},
+ {1888, {wxNotebook, hitTest, 2}},
+ {1890, {wxNotebook, insertPage, 4}},
+ {1891, {wxNotebook, setImageList, 1}},
+ {1892, {wxNotebook, setPadding, 1}},
+ {1893, {wxNotebook, setPageSize, 1}},
+ {1894, {wxNotebook, setPageImage, 2}},
+ {1895, {wxNotebook, setPageText, 2}},
+ {1896, {wxNotebook, setSelection, 1}},
+ {1897, {wxNotebook, changeSelection, 1}},
+ {1898, {wxChoicebook, new_0, 0}},
+ {1899, {wxChoicebook, new_3, 3}},
+ {1900, {wxChoicebook, addPage, 3}},
+ {1901, {wxChoicebook, advanceSelection, 1}},
+ {1902, {wxChoicebook, assignImageList, 1}},
+ {1903, {wxChoicebook, create, 3}},
+ {1904, {wxChoicebook, deleteAllPages, 0}},
+ {1905, {wxChoicebook, deletePage, 1}},
+ {1906, {wxChoicebook, removePage, 1}},
+ {1907, {wxChoicebook, getCurrentPage, 0}},
+ {1908, {wxChoicebook, getImageList, 0}},
+ {1910, {wxChoicebook, getPage, 1}},
+ {1911, {wxChoicebook, getPageCount, 0}},
+ {1912, {wxChoicebook, getPageImage, 1}},
+ {1913, {wxChoicebook, getPageText, 1}},
+ {1914, {wxChoicebook, getSelection, 0}},
+ {1915, {wxChoicebook, hitTest, 2}},
+ {1916, {wxChoicebook, insertPage, 4}},
+ {1917, {wxChoicebook, setImageList, 1}},
+ {1918, {wxChoicebook, setPageSize, 1}},
+ {1919, {wxChoicebook, setPageImage, 2}},
+ {1920, {wxChoicebook, setPageText, 2}},
+ {1921, {wxChoicebook, setSelection, 1}},
+ {1922, {wxChoicebook, changeSelection, 1}},
+ {1923, {wxChoicebook, 'Destroy', undefined}},
+ {1924, {wxToolbook, new_0, 0}},
+ {1925, {wxToolbook, new_3, 3}},
+ {1926, {wxToolbook, addPage, 3}},
+ {1927, {wxToolbook, advanceSelection, 1}},
+ {1928, {wxToolbook, assignImageList, 1}},
+ {1929, {wxToolbook, create, 3}},
+ {1930, {wxToolbook, deleteAllPages, 0}},
+ {1931, {wxToolbook, deletePage, 1}},
+ {1932, {wxToolbook, removePage, 1}},
+ {1933, {wxToolbook, getCurrentPage, 0}},
+ {1934, {wxToolbook, getImageList, 0}},
+ {1936, {wxToolbook, getPage, 1}},
+ {1937, {wxToolbook, getPageCount, 0}},
+ {1938, {wxToolbook, getPageImage, 1}},
+ {1939, {wxToolbook, getPageText, 1}},
+ {1940, {wxToolbook, getSelection, 0}},
+ {1942, {wxToolbook, hitTest, 2}},
+ {1943, {wxToolbook, insertPage, 4}},
+ {1944, {wxToolbook, setImageList, 1}},
+ {1945, {wxToolbook, setPageSize, 1}},
+ {1946, {wxToolbook, setPageImage, 2}},
+ {1947, {wxToolbook, setPageText, 2}},
+ {1948, {wxToolbook, setSelection, 1}},
+ {1949, {wxToolbook, changeSelection, 1}},
+ {1950, {wxToolbook, 'Destroy', undefined}},
+ {1951, {wxListbook, new_0, 0}},
+ {1952, {wxListbook, new_3, 3}},
+ {1953, {wxListbook, addPage, 3}},
+ {1954, {wxListbook, advanceSelection, 1}},
+ {1955, {wxListbook, assignImageList, 1}},
+ {1956, {wxListbook, create, 3}},
+ {1957, {wxListbook, deleteAllPages, 0}},
+ {1958, {wxListbook, deletePage, 1}},
+ {1959, {wxListbook, removePage, 1}},
+ {1960, {wxListbook, getCurrentPage, 0}},
+ {1961, {wxListbook, getImageList, 0}},
+ {1963, {wxListbook, getPage, 1}},
+ {1964, {wxListbook, getPageCount, 0}},
+ {1965, {wxListbook, getPageImage, 1}},
+ {1966, {wxListbook, getPageText, 1}},
+ {1967, {wxListbook, getSelection, 0}},
+ {1969, {wxListbook, hitTest, 2}},
+ {1970, {wxListbook, insertPage, 4}},
+ {1971, {wxListbook, setImageList, 1}},
+ {1972, {wxListbook, setPageSize, 1}},
+ {1973, {wxListbook, setPageImage, 2}},
+ {1974, {wxListbook, setPageText, 2}},
+ {1975, {wxListbook, setSelection, 1}},
+ {1976, {wxListbook, changeSelection, 1}},
+ {1977, {wxListbook, 'Destroy', undefined}},
+ {1978, {wxTreebook, new_0, 0}},
+ {1979, {wxTreebook, new_3, 3}},
+ {1980, {wxTreebook, addPage, 3}},
+ {1981, {wxTreebook, advanceSelection, 1}},
+ {1982, {wxTreebook, assignImageList, 1}},
+ {1983, {wxTreebook, create, 3}},
+ {1984, {wxTreebook, deleteAllPages, 0}},
+ {1985, {wxTreebook, deletePage, 1}},
+ {1986, {wxTreebook, removePage, 1}},
+ {1987, {wxTreebook, getCurrentPage, 0}},
+ {1988, {wxTreebook, getImageList, 0}},
+ {1990, {wxTreebook, getPage, 1}},
+ {1991, {wxTreebook, getPageCount, 0}},
+ {1992, {wxTreebook, getPageImage, 1}},
+ {1993, {wxTreebook, getPageText, 1}},
+ {1994, {wxTreebook, getSelection, 0}},
+ {1995, {wxTreebook, expandNode, 2}},
+ {1996, {wxTreebook, isNodeExpanded, 1}},
+ {1998, {wxTreebook, hitTest, 2}},
+ {1999, {wxTreebook, insertPage, 4}},
+ {2000, {wxTreebook, insertSubPage, 4}},
+ {2001, {wxTreebook, setImageList, 1}},
+ {2002, {wxTreebook, setPageSize, 1}},
+ {2003, {wxTreebook, setPageImage, 2}},
+ {2004, {wxTreebook, setPageText, 2}},
+ {2005, {wxTreebook, setSelection, 1}},
+ {2006, {wxTreebook, changeSelection, 1}},
+ {2007, {wxTreebook, 'Destroy', undefined}},
+ {2010, {wxTreeCtrl, new_2, 2}},
+ {2011, {wxTreeCtrl, new_0, 0}},
+ {2013, {wxTreeCtrl, destruct, 0}},
+ {2014, {wxTreeCtrl, addRoot, 2}},
+ {2015, {wxTreeCtrl, appendItem, 3}},
+ {2016, {wxTreeCtrl, assignImageList, 1}},
+ {2017, {wxTreeCtrl, assignStateImageList, 1}},
+ {2018, {wxTreeCtrl, collapse, 1}},
+ {2019, {wxTreeCtrl, collapseAndReset, 1}},
+ {2020, {wxTreeCtrl, create, 2}},
+ {2021, {wxTreeCtrl, delete, 1}},
+ {2022, {wxTreeCtrl, deleteAllItems, 0}},
+ {2023, {wxTreeCtrl, deleteChildren, 1}},
+ {2024, {wxTreeCtrl, editLabel, 1}},
+ {2025, {wxTreeCtrl, ensureVisible, 1}},
+ {2026, {wxTreeCtrl, expand, 1}},
+ {2027, {wxTreeCtrl, getBoundingRect, 3}},
+ {2029, {wxTreeCtrl, getChildrenCount, 2}},
+ {2030, {wxTreeCtrl, getCount, 0}},
+ {2031, {wxTreeCtrl, getEditControl, 0}},
+ {2032, {wxTreeCtrl, getFirstChild, 2}},
+ {2033, {wxTreeCtrl, getNextChild, 2}},
+ {2034, {wxTreeCtrl, getFirstVisibleItem, 0}},
+ {2035, {wxTreeCtrl, getImageList, 0}},
+ {2036, {wxTreeCtrl, getIndent, 0}},
+ {2037, {wxTreeCtrl, getItemBackgroundColour, 1}},
+ {2038, {wxTreeCtrl, getItemData, 1}},
+ {2039, {wxTreeCtrl, getItemFont, 1}},
+ {2040, {wxTreeCtrl, getItemImage_1, 1}},
+ {2041, {wxTreeCtrl, getItemImage_2, 2}},
+ {2042, {wxTreeCtrl, getItemText, 1}},
+ {2043, {wxTreeCtrl, getItemTextColour, 1}},
+ {2044, {wxTreeCtrl, getLastChild, 1}},
+ {2045, {wxTreeCtrl, getNextSibling, 1}},
+ {2046, {wxTreeCtrl, getNextVisible, 1}},
+ {2047, {wxTreeCtrl, getItemParent, 1}},
+ {2048, {wxTreeCtrl, getPrevSibling, 1}},
+ {2049, {wxTreeCtrl, getPrevVisible, 1}},
+ {2050, {wxTreeCtrl, getRootItem, 0}},
+ {2051, {wxTreeCtrl, getSelection, 0}},
+ {2052, {wxTreeCtrl, getSelections, 1}},
+ {2053, {wxTreeCtrl, getStateImageList, 0}},
+ {2054, {wxTreeCtrl, hitTest, 2}},
+ {2056, {wxTreeCtrl, insertItem, 4}},
+ {2057, {wxTreeCtrl, isBold, 1}},
+ {2058, {wxTreeCtrl, isExpanded, 1}},
+ {2059, {wxTreeCtrl, isSelected, 1}},
+ {2060, {wxTreeCtrl, isVisible, 1}},
+ {2061, {wxTreeCtrl, itemHasChildren, 1}},
+ {2062, {wxTreeCtrl, isTreeItemIdOk, 1}},
+ {2063, {wxTreeCtrl, prependItem, 3}},
+ {2064, {wxTreeCtrl, scrollTo, 1}},
+ {2065, {wxTreeCtrl, selectItem_1, 1}},
+ {2066, {wxTreeCtrl, selectItem_2, 2}},
+ {2067, {wxTreeCtrl, setIndent, 1}},
+ {2068, {wxTreeCtrl, setImageList, 1}},
+ {2069, {wxTreeCtrl, setItemBackgroundColour, 2}},
+ {2070, {wxTreeCtrl, setItemBold, 2}},
+ {2071, {wxTreeCtrl, setItemData, 2}},
+ {2072, {wxTreeCtrl, setItemDropHighlight, 2}},
+ {2073, {wxTreeCtrl, setItemFont, 2}},
+ {2074, {wxTreeCtrl, setItemHasChildren, 2}},
+ {2075, {wxTreeCtrl, setItemImage_2, 2}},
+ {2076, {wxTreeCtrl, setItemImage_3, 3}},
+ {2077, {wxTreeCtrl, setItemText, 2}},
+ {2078, {wxTreeCtrl, setItemTextColour, 2}},
+ {2079, {wxTreeCtrl, setStateImageList, 1}},
+ {2080, {wxTreeCtrl, setWindowStyle, 1}},
+ {2081, {wxTreeCtrl, sortChildren, 1}},
+ {2082, {wxTreeCtrl, toggle, 1}},
+ {2083, {wxTreeCtrl, toggleItemSelection, 1}},
+ {2084, {wxTreeCtrl, unselect, 0}},
+ {2085, {wxTreeCtrl, unselectAll, 0}},
+ {2086, {wxTreeCtrl, unselectItem, 1}},
+ {2087, {wxScrollBar, new_0, 0}},
+ {2088, {wxScrollBar, new_3, 3}},
+ {2089, {wxScrollBar, destruct, 0}},
+ {2090, {wxScrollBar, create, 3}},
+ {2091, {wxScrollBar, getRange, 0}},
+ {2092, {wxScrollBar, getPageSize, 0}},
+ {2093, {wxScrollBar, getThumbPosition, 0}},
+ {2094, {wxScrollBar, getThumbSize, 0}},
+ {2095, {wxScrollBar, setThumbPosition, 1}},
+ {2096, {wxScrollBar, setScrollbar, 5}},
+ {2098, {wxSpinButton, new_2, 2}},
+ {2099, {wxSpinButton, new_0, 0}},
+ {2100, {wxSpinButton, create, 2}},
+ {2101, {wxSpinButton, getMax, 0}},
+ {2102, {wxSpinButton, getMin, 0}},
+ {2103, {wxSpinButton, getValue, 0}},
+ {2104, {wxSpinButton, setRange, 2}},
+ {2105, {wxSpinButton, setValue, 1}},
+ {2106, {wxSpinButton, 'Destroy', undefined}},
+ {2107, {wxSpinCtrl, new_0, 0}},
+ {2108, {wxSpinCtrl, new_2, 2}},
+ {2110, {wxSpinCtrl, create, 2}},
+ {2113, {wxSpinCtrl, setValue_1_1, 1}},
+ {2114, {wxSpinCtrl, setValue_1_0, 1}},
+ {2116, {wxSpinCtrl, getValue, 0}},
+ {2118, {wxSpinCtrl, setRange, 2}},
+ {2119, {wxSpinCtrl, setSelection, 2}},
+ {2121, {wxSpinCtrl, getMin, 0}},
+ {2123, {wxSpinCtrl, getMax, 0}},
+ {2124, {wxSpinCtrl, 'Destroy', undefined}},
+ {2125, {wxStaticText, new_0, 0}},
+ {2126, {wxStaticText, new_4, 4}},
+ {2127, {wxStaticText, create, 4}},
+ {2128, {wxStaticText, getLabel, 0}},
+ {2129, {wxStaticText, setLabel, 1}},
+ {2130, {wxStaticText, wrap, 1}},
+ {2131, {wxStaticText, 'Destroy', undefined}},
+ {2132, {wxStaticBitmap, new_0, 0}},
+ {2133, {wxStaticBitmap, new_4, 4}},
+ {2134, {wxStaticBitmap, create, 4}},
+ {2135, {wxStaticBitmap, getBitmap, 0}},
+ {2136, {wxStaticBitmap, setBitmap, 1}},
+ {2137, {wxStaticBitmap, 'Destroy', undefined}},
+ {2138, {wxRadioBox, new, 7}},
+ {2140, {wxRadioBox, destruct, 0}},
+ {2141, {wxRadioBox, create, 7}},
+ {2142, {wxRadioBox, enable_2, 2}},
+ {2143, {wxRadioBox, enable_1, 1}},
+ {2144, {wxRadioBox, getSelection, 0}},
+ {2145, {wxRadioBox, getString, 1}},
+ {2146, {wxRadioBox, setSelection, 1}},
+ {2147, {wxRadioBox, show_2, 2}},
+ {2148, {wxRadioBox, show_1, 1}},
+ {2149, {wxRadioBox, getColumnCount, 0}},
+ {2150, {wxRadioBox, getItemHelpText, 1}},
+ {2151, {wxRadioBox, getItemToolTip, 1}},
+ {2153, {wxRadioBox, getItemFromPoint, 1}},
+ {2154, {wxRadioBox, getRowCount, 0}},
+ {2155, {wxRadioBox, isItemEnabled, 1}},
+ {2156, {wxRadioBox, isItemShown, 1}},
+ {2157, {wxRadioBox, setItemHelpText, 2}},
+ {2158, {wxRadioBox, setItemToolTip, 2}},
+ {2159, {wxRadioButton, new_0, 0}},
+ {2160, {wxRadioButton, new_4, 4}},
+ {2161, {wxRadioButton, create, 4}},
+ {2162, {wxRadioButton, getValue, 0}},
+ {2163, {wxRadioButton, setValue, 1}},
+ {2164, {wxRadioButton, 'Destroy', undefined}},
+ {2166, {wxSlider, new_6, 6}},
+ {2167, {wxSlider, new_0, 0}},
+ {2168, {wxSlider, create, 6}},
+ {2169, {wxSlider, getLineSize, 0}},
+ {2170, {wxSlider, getMax, 0}},
+ {2171, {wxSlider, getMin, 0}},
+ {2172, {wxSlider, getPageSize, 0}},
+ {2173, {wxSlider, getThumbLength, 0}},
+ {2174, {wxSlider, getValue, 0}},
+ {2175, {wxSlider, setLineSize, 1}},
+ {2176, {wxSlider, setPageSize, 1}},
+ {2177, {wxSlider, setRange, 2}},
+ {2178, {wxSlider, setThumbLength, 1}},
+ {2179, {wxSlider, setValue, 1}},
+ {2180, {wxSlider, 'Destroy', undefined}},
+ {2182, {wxDialog, new_4, 4}},
+ {2183, {wxDialog, new_0, 0}},
+ {2185, {wxDialog, destruct, 0}},
+ {2186, {wxDialog, create, 4}},
+ {2187, {wxDialog, createButtonSizer, 1}},
+ {2188, {wxDialog, createStdDialogButtonSizer, 1}},
+ {2189, {wxDialog, endModal, 1}},
+ {2190, {wxDialog, getAffirmativeId, 0}},
+ {2191, {wxDialog, getReturnCode, 0}},
+ {2192, {wxDialog, isModal, 0}},
+ {2193, {wxDialog, setAffirmativeId, 1}},
+ {2194, {wxDialog, setReturnCode, 1}},
+ {2195, {wxDialog, show, 1}},
+ {2196, {wxDialog, showModal, 0}},
+ {2197, {wxColourDialog, new_0, 0}},
+ {2198, {wxColourDialog, new_2, 2}},
+ {2199, {wxColourDialog, destruct, 0}},
+ {2200, {wxColourDialog, create, 2}},
+ {2201, {wxColourDialog, getColourData, 0}},
+ {2202, {wxColourData, new_0, 0}},
+ {2203, {wxColourData, new_1, 1}},
+ {2204, {wxColourData, destruct, 0}},
+ {2205, {wxColourData, getChooseFull, 0}},
+ {2206, {wxColourData, getColour, 0}},
+ {2208, {wxColourData, getCustomColour, 1}},
+ {2209, {wxColourData, setChooseFull, 1}},
+ {2210, {wxColourData, setColour, 1}},
+ {2211, {wxColourData, setCustomColour, 2}},
+ {2212, {wxPalette, new_0, 0}},
+ {2213, {wxPalette, new_4, 4}},
+ {2215, {wxPalette, destruct, 0}},
+ {2216, {wxPalette, create, 4}},
+ {2217, {wxPalette, getColoursCount, 0}},
+ {2218, {wxPalette, getPixel, 3}},
+ {2219, {wxPalette, getRGB, 4}},
+ {2220, {wxPalette, isOk, 0}},
+ {2224, {wxDirDialog, new, 2}},
+ {2225, {wxDirDialog, destruct, 0}},
+ {2226, {wxDirDialog, getPath, 0}},
+ {2227, {wxDirDialog, getMessage, 0}},
+ {2228, {wxDirDialog, setMessage, 1}},
+ {2229, {wxDirDialog, setPath, 1}},
+ {2233, {wxFileDialog, new, 2}},
+ {2234, {wxFileDialog, destruct, 0}},
+ {2235, {wxFileDialog, getDirectory, 0}},
+ {2236, {wxFileDialog, getFilename, 0}},
+ {2237, {wxFileDialog, getFilenames, 1}},
+ {2238, {wxFileDialog, getFilterIndex, 0}},
+ {2239, {wxFileDialog, getMessage, 0}},
+ {2240, {wxFileDialog, getPath, 0}},
+ {2241, {wxFileDialog, getPaths, 1}},
+ {2242, {wxFileDialog, getWildcard, 0}},
+ {2243, {wxFileDialog, setDirectory, 1}},
+ {2244, {wxFileDialog, setFilename, 1}},
+ {2245, {wxFileDialog, setFilterIndex, 1}},
+ {2246, {wxFileDialog, setMessage, 1}},
+ {2247, {wxFileDialog, setPath, 1}},
+ {2248, {wxFileDialog, setWildcard, 1}},
+ {2249, {wxPickerBase, setInternalMargin, 1}},
+ {2250, {wxPickerBase, getInternalMargin, 0}},
+ {2251, {wxPickerBase, setTextCtrlProportion, 1}},
+ {2252, {wxPickerBase, setPickerCtrlProportion, 1}},
+ {2253, {wxPickerBase, getTextCtrlProportion, 0}},
+ {2254, {wxPickerBase, getPickerCtrlProportion, 0}},
+ {2255, {wxPickerBase, hasTextCtrl, 0}},
+ {2256, {wxPickerBase, getTextCtrl, 0}},
+ {2257, {wxPickerBase, isTextCtrlGrowable, 0}},
+ {2258, {wxPickerBase, setPickerCtrlGrowable, 1}},
+ {2259, {wxPickerBase, setTextCtrlGrowable, 1}},
+ {2260, {wxPickerBase, isPickerCtrlGrowable, 0}},
+ {2261, {wxFilePickerCtrl, new_0, 0}},
+ {2262, {wxFilePickerCtrl, new_3, 3}},
+ {2263, {wxFilePickerCtrl, create, 3}},
+ {2264, {wxFilePickerCtrl, getPath, 0}},
+ {2265, {wxFilePickerCtrl, setPath, 1}},
+ {2266, {wxFilePickerCtrl, 'Destroy', undefined}},
+ {2267, {wxDirPickerCtrl, new_0, 0}},
+ {2268, {wxDirPickerCtrl, new_3, 3}},
+ {2269, {wxDirPickerCtrl, create, 3}},
+ {2270, {wxDirPickerCtrl, getPath, 0}},
+ {2271, {wxDirPickerCtrl, setPath, 1}},
+ {2272, {wxDirPickerCtrl, 'Destroy', undefined}},
+ {2273, {wxColourPickerCtrl, new_0, 0}},
+ {2274, {wxColourPickerCtrl, new_3, 3}},
+ {2275, {wxColourPickerCtrl, create, 3}},
+ {2276, {wxColourPickerCtrl, getColour, 0}},
+ {2277, {wxColourPickerCtrl, setColour_1_1, 1}},
+ {2278, {wxColourPickerCtrl, setColour_1_0, 1}},
+ {2279, {wxColourPickerCtrl, 'Destroy', undefined}},
+ {2280, {wxDatePickerCtrl, new_0, 0}},
+ {2281, {wxDatePickerCtrl, new_3, 3}},
+ {2282, {wxDatePickerCtrl, getRange, 2}},
+ {2283, {wxDatePickerCtrl, getValue, 0}},
+ {2284, {wxDatePickerCtrl, setRange, 2}},
+ {2285, {wxDatePickerCtrl, setValue, 1}},
+ {2286, {wxDatePickerCtrl, 'Destroy', undefined}},
+ {2287, {wxFontPickerCtrl, new_0, 0}},
+ {2288, {wxFontPickerCtrl, new_3, 3}},
+ {2289, {wxFontPickerCtrl, create, 3}},
+ {2290, {wxFontPickerCtrl, getSelectedFont, 0}},
+ {2291, {wxFontPickerCtrl, setSelectedFont, 1}},
+ {2292, {wxFontPickerCtrl, getMaxPointSize, 0}},
+ {2293, {wxFontPickerCtrl, setMaxPointSize, 1}},
+ {2294, {wxFontPickerCtrl, 'Destroy', undefined}},
+ {2297, {wxFindReplaceDialog, new_0, 0}},
+ {2298, {wxFindReplaceDialog, new_4, 4}},
+ {2299, {wxFindReplaceDialog, destruct, 0}},
+ {2300, {wxFindReplaceDialog, create, 4}},
+ {2301, {wxFindReplaceDialog, getData, 0}},
+ {2302, {wxFindReplaceData, new_0, 0}},
+ {2303, {wxFindReplaceData, new_1, 1}},
+ {2304, {wxFindReplaceData, getFindString, 0}},
+ {2305, {wxFindReplaceData, getReplaceString, 0}},
+ {2306, {wxFindReplaceData, getFlags, 0}},
+ {2307, {wxFindReplaceData, setFlags, 1}},
+ {2308, {wxFindReplaceData, setFindString, 1}},
+ {2309, {wxFindReplaceData, setReplaceString, 1}},
+ {2310, {wxFindReplaceData, 'Destroy', undefined}},
+ {2311, {wxMultiChoiceDialog, new_0, 0}},
+ {2313, {wxMultiChoiceDialog, new_5, 5}},
+ {2314, {wxMultiChoiceDialog, getSelections, 0}},
+ {2315, {wxMultiChoiceDialog, setSelections, 1}},
+ {2316, {wxMultiChoiceDialog, 'Destroy', undefined}},
+ {2317, {wxSingleChoiceDialog, new_0, 0}},
+ {2319, {wxSingleChoiceDialog, new_5, 5}},
+ {2320, {wxSingleChoiceDialog, getSelection, 0}},
+ {2321, {wxSingleChoiceDialog, getStringSelection, 0}},
+ {2322, {wxSingleChoiceDialog, setSelection, 1}},
+ {2323, {wxSingleChoiceDialog, 'Destroy', undefined}},
+ {2324, {wxTextEntryDialog, new, 3}},
+ {2325, {wxTextEntryDialog, getValue, 0}},
+ {2326, {wxTextEntryDialog, setValue, 1}},
+ {2327, {wxTextEntryDialog, 'Destroy', undefined}},
+ {2328, {wxPasswordEntryDialog, new, 3}},
+ {2329, {wxPasswordEntryDialog, 'Destroy', undefined}},
+ {2330, {wxFontData, new_0, 0}},
+ {2331, {wxFontData, new_1, 1}},
+ {2332, {wxFontData, destruct, 0}},
+ {2333, {wxFontData, enableEffects, 1}},
+ {2334, {wxFontData, getAllowSymbols, 0}},
+ {2335, {wxFontData, getColour, 0}},
+ {2336, {wxFontData, getChosenFont, 0}},
+ {2337, {wxFontData, getEnableEffects, 0}},
+ {2338, {wxFontData, getInitialFont, 0}},
+ {2339, {wxFontData, getShowHelp, 0}},
+ {2340, {wxFontData, setAllowSymbols, 1}},
+ {2341, {wxFontData, setChosenFont, 1}},
+ {2342, {wxFontData, setColour, 1}},
+ {2343, {wxFontData, setInitialFont, 1}},
+ {2344, {wxFontData, setRange, 2}},
+ {2345, {wxFontData, setShowHelp, 1}},
+ {2349, {wxFontDialog, new_0, 0}},
+ {2351, {wxFontDialog, new_2, 2}},
+ {2353, {wxFontDialog, create, 2}},
+ {2354, {wxFontDialog, getFontData, 0}},
+ {2356, {wxFontDialog, 'Destroy', undefined}},
+ {2357, {wxProgressDialog, new, 3}},
+ {2358, {wxProgressDialog, destruct, 0}},
+ {2359, {wxProgressDialog, resume, 0}},
+ {2360, {wxProgressDialog, update_2, 2}},
+ {2361, {wxProgressDialog, update_0, 0}},
+ {2362, {wxMessageDialog, new, 3}},
+ {2363, {wxMessageDialog, destruct, 0}},
+ {2364, {wxPageSetupDialog, new, 2}},
+ {2365, {wxPageSetupDialog, destruct, 0}},
+ {2366, {wxPageSetupDialog, getPageSetupData, 0}},
+ {2367, {wxPageSetupDialog, showModal, 0}},
+ {2368, {wxPageSetupDialogData, new_0, 0}},
+ {2369, {wxPageSetupDialogData, new_1_0, 1}},
+ {2370, {wxPageSetupDialogData, new_1_1, 1}},
+ {2371, {wxPageSetupDialogData, destruct, 0}},
+ {2372, {wxPageSetupDialogData, enableHelp, 1}},
+ {2373, {wxPageSetupDialogData, enableMargins, 1}},
+ {2374, {wxPageSetupDialogData, enableOrientation, 1}},
+ {2375, {wxPageSetupDialogData, enablePaper, 1}},
+ {2376, {wxPageSetupDialogData, enablePrinter, 1}},
+ {2377, {wxPageSetupDialogData, getDefaultMinMargins, 0}},
+ {2378, {wxPageSetupDialogData, getEnableMargins, 0}},
+ {2379, {wxPageSetupDialogData, getEnableOrientation, 0}},
+ {2380, {wxPageSetupDialogData, getEnablePaper, 0}},
+ {2381, {wxPageSetupDialogData, getEnablePrinter, 0}},
+ {2382, {wxPageSetupDialogData, getEnableHelp, 0}},
+ {2383, {wxPageSetupDialogData, getDefaultInfo, 0}},
+ {2384, {wxPageSetupDialogData, getMarginTopLeft, 0}},
+ {2385, {wxPageSetupDialogData, getMarginBottomRight, 0}},
+ {2386, {wxPageSetupDialogData, getMinMarginTopLeft, 0}},
+ {2387, {wxPageSetupDialogData, getMinMarginBottomRight, 0}},
+ {2388, {wxPageSetupDialogData, getPaperId, 0}},
+ {2389, {wxPageSetupDialogData, getPaperSize, 0}},
+ {2391, {wxPageSetupDialogData, getPrintData, 0}},
+ {2392, {wxPageSetupDialogData, isOk, 0}},
+ {2393, {wxPageSetupDialogData, setDefaultInfo, 1}},
+ {2394, {wxPageSetupDialogData, setDefaultMinMargins, 1}},
+ {2395, {wxPageSetupDialogData, setMarginTopLeft, 1}},
+ {2396, {wxPageSetupDialogData, setMarginBottomRight, 1}},
+ {2397, {wxPageSetupDialogData, setMinMarginTopLeft, 1}},
+ {2398, {wxPageSetupDialogData, setMinMarginBottomRight, 1}},
+ {2399, {wxPageSetupDialogData, setPaperId, 1}},
+ {2400, {wxPageSetupDialogData, setPaperSize_1_1, 1}},
+ {2401, {wxPageSetupDialogData, setPaperSize_1_0, 1}},
+ {2402, {wxPageSetupDialogData, setPrintData, 1}},
+ {2403, {wxPrintDialog, new_2_0, 2}},
+ {2404, {wxPrintDialog, new_2_1, 2}},
+ {2405, {wxPrintDialog, destruct, 0}},
+ {2406, {wxPrintDialog, getPrintDialogData, 0}},
+ {2407, {wxPrintDialog, getPrintDC, 0}},
+ {2408, {wxPrintDialogData, new_0, 0}},
+ {2409, {wxPrintDialogData, new_1_1, 1}},
+ {2410, {wxPrintDialogData, new_1_0, 1}},
+ {2411, {wxPrintDialogData, destruct, 0}},
+ {2412, {wxPrintDialogData, enableHelp, 1}},
+ {2413, {wxPrintDialogData, enablePageNumbers, 1}},
+ {2414, {wxPrintDialogData, enablePrintToFile, 1}},
+ {2415, {wxPrintDialogData, enableSelection, 1}},
+ {2416, {wxPrintDialogData, getAllPages, 0}},
+ {2417, {wxPrintDialogData, getCollate, 0}},
+ {2418, {wxPrintDialogData, getFromPage, 0}},
+ {2419, {wxPrintDialogData, getMaxPage, 0}},
+ {2420, {wxPrintDialogData, getMinPage, 0}},
+ {2421, {wxPrintDialogData, getNoCopies, 0}},
+ {2422, {wxPrintDialogData, getPrintData, 0}},
+ {2423, {wxPrintDialogData, getPrintToFile, 0}},
+ {2424, {wxPrintDialogData, getSelection, 0}},
+ {2425, {wxPrintDialogData, getToPage, 0}},
+ {2426, {wxPrintDialogData, isOk, 0}},
+ {2427, {wxPrintDialogData, setCollate, 1}},
+ {2428, {wxPrintDialogData, setFromPage, 1}},
+ {2429, {wxPrintDialogData, setMaxPage, 1}},
+ {2430, {wxPrintDialogData, setMinPage, 1}},
+ {2431, {wxPrintDialogData, setNoCopies, 1}},
+ {2432, {wxPrintDialogData, setPrintData, 1}},
+ {2433, {wxPrintDialogData, setPrintToFile, 1}},
+ {2434, {wxPrintDialogData, setSelection, 1}},
+ {2435, {wxPrintDialogData, setToPage, 1}},
+ {2436, {wxPrintData, new_0, 0}},
+ {2437, {wxPrintData, new_1, 1}},
+ {2438, {wxPrintData, destruct, 0}},
+ {2439, {wxPrintData, getCollate, 0}},
+ {2440, {wxPrintData, getBin, 0}},
+ {2441, {wxPrintData, getColour, 0}},
+ {2442, {wxPrintData, getDuplex, 0}},
+ {2443, {wxPrintData, getNoCopies, 0}},
+ {2444, {wxPrintData, getOrientation, 0}},
+ {2445, {wxPrintData, getPaperId, 0}},
+ {2446, {wxPrintData, getPrinterName, 0}},
+ {2447, {wxPrintData, getQuality, 0}},
+ {2448, {wxPrintData, isOk, 0}},
+ {2449, {wxPrintData, setBin, 1}},
+ {2450, {wxPrintData, setCollate, 1}},
+ {2451, {wxPrintData, setColour, 1}},
+ {2452, {wxPrintData, setDuplex, 1}},
+ {2453, {wxPrintData, setNoCopies, 1}},
+ {2454, {wxPrintData, setOrientation, 1}},
+ {2455, {wxPrintData, setPaperId, 1}},
+ {2456, {wxPrintData, setPrinterName, 1}},
+ {2457, {wxPrintData, setQuality, 1}},
+ {2460, {wxPrintPreview, new_2, 2}},
+ {2461, {wxPrintPreview, new_3, 3}},
+ {2463, {wxPrintPreview, destruct, 0}},
+ {2464, {wxPrintPreview, getCanvas, 0}},
+ {2465, {wxPrintPreview, getCurrentPage, 0}},
+ {2466, {wxPrintPreview, getFrame, 0}},
+ {2467, {wxPrintPreview, getMaxPage, 0}},
+ {2468, {wxPrintPreview, getMinPage, 0}},
+ {2469, {wxPrintPreview, getPrintout, 0}},
+ {2470, {wxPrintPreview, getPrintoutForPrinting, 0}},
+ {2471, {wxPrintPreview, isOk, 0}},
+ {2472, {wxPrintPreview, paintPage, 2}},
+ {2473, {wxPrintPreview, print, 1}},
+ {2474, {wxPrintPreview, renderPage, 1}},
+ {2475, {wxPrintPreview, setCanvas, 1}},
+ {2476, {wxPrintPreview, setCurrentPage, 1}},
+ {2477, {wxPrintPreview, setFrame, 1}},
+ {2478, {wxPrintPreview, setPrintout, 1}},
+ {2479, {wxPrintPreview, setZoom, 1}},
+ {2480, {wxPreviewFrame, new, 3}},
+ {2481, {wxPreviewFrame, destruct, 0}},
+ {2482, {wxPreviewFrame, createControlBar, 0}},
+ {2483, {wxPreviewFrame, createCanvas, 0}},
+ {2484, {wxPreviewFrame, initialize, 0}},
+ {2485, {wxPreviewFrame, onCloseWindow, 1}},
+ {2486, {wxPreviewControlBar, new, 4}},
+ {2487, {wxPreviewControlBar, destruct, 0}},
+ {2488, {wxPreviewControlBar, createButtons, 0}},
+ {2489, {wxPreviewControlBar, getPrintPreview, 0}},
+ {2490, {wxPreviewControlBar, getZoomControl, 0}},
+ {2491, {wxPreviewControlBar, setZoomControl, 1}},
+ {2493, {wxPrinter, new, 1}},
+ {2494, {wxPrinter, createAbortWindow, 2}},
+ {2495, {wxPrinter, getAbort, 0}},
+ {2496, {wxPrinter, getLastError, 0}},
+ {2497, {wxPrinter, getPrintDialogData, 0}},
+ {2498, {wxPrinter, print, 3}},
+ {2499, {wxPrinter, printDialog, 1}},
+ {2500, {wxPrinter, reportError, 3}},
+ {2501, {wxPrinter, setup, 1}},
+ {2502, {wxPrinter, 'Destroy', undefined}},
+ {2503, {wxXmlResource, new_1, 1}},
+ {2504, {wxXmlResource, new_2, 2}},
+ {2505, {wxXmlResource, destruct, 0}},
+ {2506, {wxXmlResource, attachUnknownControl, 3}},
+ {2507, {wxXmlResource, clearHandlers, 0}},
+ {2508, {wxXmlResource, compareVersion, 4}},
+ {2509, {wxXmlResource, get, 0}},
+ {2510, {wxXmlResource, getFlags, 0}},
+ {2511, {wxXmlResource, getVersion, 0}},
+ {2512, {wxXmlResource, getXRCID, 2}},
+ {2513, {wxXmlResource, initAllHandlers, 0}},
+ {2514, {wxXmlResource, load, 1}},
+ {2515, {wxXmlResource, loadBitmap, 1}},
+ {2516, {wxXmlResource, loadDialog_2, 2}},
+ {2517, {wxXmlResource, loadDialog_3, 3}},
+ {2518, {wxXmlResource, loadFrame_2, 2}},
+ {2519, {wxXmlResource, loadFrame_3, 3}},
+ {2520, {wxXmlResource, loadIcon, 1}},
+ {2521, {wxXmlResource, loadMenu, 1}},
+ {2522, {wxXmlResource, loadMenuBar_2, 2}},
+ {2523, {wxXmlResource, loadMenuBar_1, 1}},
+ {2524, {wxXmlResource, loadPanel_2, 2}},
+ {2525, {wxXmlResource, loadPanel_3, 3}},
+ {2526, {wxXmlResource, loadToolBar, 2}},
+ {2527, {wxXmlResource, set, 1}},
+ {2528, {wxXmlResource, setFlags, 1}},
+ {2529, {wxXmlResource, unload, 1}},
+ {2530, {wxXmlResource, xrcctrl, 3}},
+ {2531, {wxHtmlEasyPrinting, new, 1}},
+ {2532, {wxHtmlEasyPrinting, destruct, 0}},
+ {2533, {wxHtmlEasyPrinting, getPrintData, 0}},
+ {2534, {wxHtmlEasyPrinting, getPageSetupData, 0}},
+ {2535, {wxHtmlEasyPrinting, previewFile, 1}},
+ {2536, {wxHtmlEasyPrinting, previewText, 2}},
+ {2537, {wxHtmlEasyPrinting, printFile, 1}},
+ {2538, {wxHtmlEasyPrinting, printText, 2}},
+ {2539, {wxHtmlEasyPrinting, pageSetup, 0}},
+ {2540, {wxHtmlEasyPrinting, setFonts, 3}},
+ {2541, {wxHtmlEasyPrinting, setHeader, 2}},
+ {2542, {wxHtmlEasyPrinting, setFooter, 2}},
+ {2544, {wxGLCanvas, new_2, 2}},
+ {2545, {wxGLCanvas, new_3_1, 3}},
+ {2546, {wxGLCanvas, new_3_0, 3}},
+ {2547, {wxGLCanvas, getContext, 0}},
+ {2549, {wxGLCanvas, setCurrent, 0}},
+ {2550, {wxGLCanvas, swapBuffers, 0}},
+ {2551, {wxGLCanvas, 'Destroy', undefined}},
+ {2552, {wxAuiManager, new, 1}},
+ {2553, {wxAuiManager, destruct, 0}},
+ {2554, {wxAuiManager, addPane_2_1, 2}},
+ {2555, {wxAuiManager, addPane_3, 3}},
+ {2556, {wxAuiManager, addPane_2_0, 2}},
+ {2557, {wxAuiManager, detachPane, 1}},
+ {2558, {wxAuiManager, getAllPanes, 0}},
+ {2559, {wxAuiManager, getArtProvider, 0}},
+ {2560, {wxAuiManager, getDockSizeConstraint, 2}},
+ {2561, {wxAuiManager, getFlags, 0}},
+ {2562, {wxAuiManager, getManagedWindow, 0}},
+ {2563, {wxAuiManager, getManager, 1}},
+ {2564, {wxAuiManager, getPane_1_1, 1}},
+ {2565, {wxAuiManager, getPane_1_0, 1}},
+ {2566, {wxAuiManager, hideHint, 0}},
+ {2567, {wxAuiManager, insertPane, 3}},
+ {2568, {wxAuiManager, loadPaneInfo, 2}},
+ {2569, {wxAuiManager, loadPerspective, 2}},
+ {2570, {wxAuiManager, savePaneInfo, 1}},
+ {2571, {wxAuiManager, savePerspective, 0}},
+ {2572, {wxAuiManager, setArtProvider, 1}},
+ {2573, {wxAuiManager, setDockSizeConstraint, 2}},
+ {2574, {wxAuiManager, setFlags, 1}},
+ {2575, {wxAuiManager, setManagedWindow, 1}},
+ {2576, {wxAuiManager, showHint, 1}},
+ {2577, {wxAuiManager, unInit, 0}},
+ {2578, {wxAuiManager, update, 0}},
+ {2579, {wxAuiPaneInfo, new_0, 0}},
+ {2580, {wxAuiPaneInfo, new_1, 1}},
+ {2581, {wxAuiPaneInfo, destruct, 0}},
+ {2582, {wxAuiPaneInfo, bestSize_1, 1}},
+ {2583, {wxAuiPaneInfo, bestSize_2, 2}},
+ {2584, {wxAuiPaneInfo, bottom, 0}},
+ {2585, {wxAuiPaneInfo, bottomDockable, 1}},
+ {2586, {wxAuiPaneInfo, caption, 1}},
+ {2587, {wxAuiPaneInfo, captionVisible, 1}},
+ {2588, {wxAuiPaneInfo, centre, 0}},
+ {2589, {wxAuiPaneInfo, centrePane, 0}},
+ {2590, {wxAuiPaneInfo, closeButton, 1}},
+ {2591, {wxAuiPaneInfo, defaultPane, 0}},
+ {2592, {wxAuiPaneInfo, destroyOnClose, 1}},
+ {2593, {wxAuiPaneInfo, direction, 1}},
+ {2594, {wxAuiPaneInfo, dock, 0}},
+ {2595, {wxAuiPaneInfo, dockable, 1}},
+ {2596, {wxAuiPaneInfo, fixed, 0}},
+ {2597, {wxAuiPaneInfo, float, 0}},
+ {2598, {wxAuiPaneInfo, floatable, 1}},
+ {2599, {wxAuiPaneInfo, floatingPosition_1, 1}},
+ {2600, {wxAuiPaneInfo, floatingPosition_2, 2}},
+ {2601, {wxAuiPaneInfo, floatingSize_1, 1}},
+ {2602, {wxAuiPaneInfo, floatingSize_2, 2}},
+ {2603, {wxAuiPaneInfo, gripper, 1}},
+ {2604, {wxAuiPaneInfo, gripperTop, 1}},
+ {2605, {wxAuiPaneInfo, hasBorder, 0}},
+ {2606, {wxAuiPaneInfo, hasCaption, 0}},
+ {2607, {wxAuiPaneInfo, hasCloseButton, 0}},
+ {2608, {wxAuiPaneInfo, hasFlag, 1}},
+ {2609, {wxAuiPaneInfo, hasGripper, 0}},
+ {2610, {wxAuiPaneInfo, hasGripperTop, 0}},
+ {2611, {wxAuiPaneInfo, hasMaximizeButton, 0}},
+ {2612, {wxAuiPaneInfo, hasMinimizeButton, 0}},
+ {2613, {wxAuiPaneInfo, hasPinButton, 0}},
+ {2614, {wxAuiPaneInfo, hide, 0}},
+ {2615, {wxAuiPaneInfo, isBottomDockable, 0}},
+ {2616, {wxAuiPaneInfo, isDocked, 0}},
+ {2617, {wxAuiPaneInfo, isFixed, 0}},
+ {2618, {wxAuiPaneInfo, isFloatable, 0}},
+ {2619, {wxAuiPaneInfo, isFloating, 0}},
+ {2620, {wxAuiPaneInfo, isLeftDockable, 0}},
+ {2621, {wxAuiPaneInfo, isMovable, 0}},
+ {2622, {wxAuiPaneInfo, isOk, 0}},
+ {2623, {wxAuiPaneInfo, isResizable, 0}},
+ {2624, {wxAuiPaneInfo, isRightDockable, 0}},
+ {2625, {wxAuiPaneInfo, isShown, 0}},
+ {2626, {wxAuiPaneInfo, isToolbar, 0}},
+ {2627, {wxAuiPaneInfo, isTopDockable, 0}},
+ {2628, {wxAuiPaneInfo, layer, 1}},
+ {2629, {wxAuiPaneInfo, left, 0}},
+ {2630, {wxAuiPaneInfo, leftDockable, 1}},
+ {2631, {wxAuiPaneInfo, maxSize_1, 1}},
+ {2632, {wxAuiPaneInfo, maxSize_2, 2}},
+ {2633, {wxAuiPaneInfo, maximizeButton, 1}},
+ {2634, {wxAuiPaneInfo, minSize_1, 1}},
+ {2635, {wxAuiPaneInfo, minSize_2, 2}},
+ {2636, {wxAuiPaneInfo, minimizeButton, 1}},
+ {2637, {wxAuiPaneInfo, movable, 1}},
+ {2638, {wxAuiPaneInfo, name, 1}},
+ {2639, {wxAuiPaneInfo, paneBorder, 1}},
+ {2640, {wxAuiPaneInfo, pinButton, 1}},
+ {2641, {wxAuiPaneInfo, position, 1}},
+ {2642, {wxAuiPaneInfo, resizable, 1}},
+ {2643, {wxAuiPaneInfo, right, 0}},
+ {2644, {wxAuiPaneInfo, rightDockable, 1}},
+ {2645, {wxAuiPaneInfo, row, 1}},
+ {2646, {wxAuiPaneInfo, safeSet, 1}},
+ {2647, {wxAuiPaneInfo, setFlag, 2}},
+ {2648, {wxAuiPaneInfo, show, 1}},
+ {2649, {wxAuiPaneInfo, toolbarPane, 0}},
+ {2650, {wxAuiPaneInfo, top, 0}},
+ {2651, {wxAuiPaneInfo, topDockable, 1}},
+ {2652, {wxAuiPaneInfo, window, 1}},
+ {2653, {wxAuiNotebook, new_0, 0}},
+ {2654, {wxAuiNotebook, new_2, 2}},
+ {2655, {wxAuiNotebook, addPage, 3}},
+ {2656, {wxAuiNotebook, create, 2}},
+ {2657, {wxAuiNotebook, deletePage, 1}},
+ {2658, {wxAuiNotebook, getArtProvider, 0}},
+ {2659, {wxAuiNotebook, getPage, 1}},
+ {2660, {wxAuiNotebook, getPageBitmap, 1}},
+ {2661, {wxAuiNotebook, getPageCount, 0}},
+ {2662, {wxAuiNotebook, getPageIndex, 1}},
+ {2663, {wxAuiNotebook, getPageText, 1}},
+ {2664, {wxAuiNotebook, getSelection, 0}},
+ {2665, {wxAuiNotebook, insertPage, 4}},
+ {2666, {wxAuiNotebook, removePage, 1}},
+ {2667, {wxAuiNotebook, setArtProvider, 1}},
+ {2668, {wxAuiNotebook, setFont, 1}},
+ {2669, {wxAuiNotebook, setPageBitmap, 2}},
+ {2670, {wxAuiNotebook, setPageText, 2}},
+ {2671, {wxAuiNotebook, setSelection, 1}},
+ {2672, {wxAuiNotebook, setTabCtrlHeight, 1}},
+ {2673, {wxAuiNotebook, setUniformBitmapSize, 1}},
+ {2674, {wxAuiNotebook, 'Destroy', undefined}},
+ {2675, {wxMDIParentFrame, new_0, 0}},
+ {2676, {wxMDIParentFrame, new_4, 4}},
+ {2677, {wxMDIParentFrame, destruct, 0}},
+ {2678, {wxMDIParentFrame, activateNext, 0}},
+ {2679, {wxMDIParentFrame, activatePrevious, 0}},
+ {2680, {wxMDIParentFrame, arrangeIcons, 0}},
+ {2681, {wxMDIParentFrame, cascade, 0}},
+ {2682, {wxMDIParentFrame, create, 4}},
+ {2683, {wxMDIParentFrame, getActiveChild, 0}},
+ {2684, {wxMDIParentFrame, getClientWindow, 0}},
+ {2685, {wxMDIParentFrame, tile, 1}},
+ {2686, {wxMDIChildFrame, new_0, 0}},
+ {2687, {wxMDIChildFrame, new_4, 4}},
+ {2688, {wxMDIChildFrame, destruct, 0}},
+ {2689, {wxMDIChildFrame, activate, 0}},
+ {2690, {wxMDIChildFrame, create, 4}},
+ {2691, {wxMDIChildFrame, maximize, 1}},
+ {2692, {wxMDIChildFrame, restore, 0}},
+ {2693, {wxMDIClientWindow, new_0, 0}},
+ {2694, {wxMDIClientWindow, new_2, 2}},
+ {2695, {wxMDIClientWindow, destruct, 0}},
+ {2696, {wxMDIClientWindow, createClient, 2}},
+ {2697, {wxLayoutAlgorithm, new, 0}},
+ {2698, {wxLayoutAlgorithm, layoutFrame, 2}},
+ {2699, {wxLayoutAlgorithm, layoutMDIFrame, 2}},
+ {2700, {wxLayoutAlgorithm, layoutWindow, 2}},
+ {2701, {wxLayoutAlgorithm, 'Destroy', undefined}},
+ {2702, {wxEvent, getId, 0}},
+ {2703, {wxEvent, getSkipped, 0}},
+ {2704, {wxEvent, getTimestamp, 0}},
+ {2705, {wxEvent, isCommandEvent, 0}},
+ {2706, {wxEvent, resumePropagation, 1}},
+ {2707, {wxEvent, shouldPropagate, 0}},
+ {2708, {wxEvent, skip, 1}},
+ {2709, {wxEvent, stopPropagation, 0}},
+ {2710, {wxCommandEvent, getClientData, 0}},
+ {2711, {wxCommandEvent, getExtraLong, 0}},
+ {2712, {wxCommandEvent, getInt, 0}},
+ {2713, {wxCommandEvent, getSelection, 0}},
+ {2714, {wxCommandEvent, getString, 0}},
+ {2715, {wxCommandEvent, isChecked, 0}},
+ {2716, {wxCommandEvent, isSelection, 0}},
+ {2717, {wxCommandEvent, setInt, 1}},
+ {2718, {wxCommandEvent, setString, 1}},
+ {2719, {wxScrollEvent, getOrientation, 0}},
+ {2720, {wxScrollEvent, getPosition, 0}},
+ {2721, {wxScrollWinEvent, getOrientation, 0}},
+ {2722, {wxScrollWinEvent, getPosition, 0}},
+ {2723, {wxMouseEvent, altDown, 0}},
+ {2724, {wxMouseEvent, button, 1}},
+ {2725, {wxMouseEvent, buttonDClick, 1}},
+ {2726, {wxMouseEvent, buttonDown, 1}},
+ {2727, {wxMouseEvent, buttonUp, 1}},
+ {2728, {wxMouseEvent, cmdDown, 0}},
+ {2729, {wxMouseEvent, controlDown, 0}},
+ {2730, {wxMouseEvent, dragging, 0}},
+ {2731, {wxMouseEvent, entering, 0}},
+ {2732, {wxMouseEvent, getButton, 0}},
+ {2735, {wxMouseEvent, getPosition, 0}},
+ {2736, {wxMouseEvent, getLogicalPosition, 1}},
+ {2737, {wxMouseEvent, getLinesPerAction, 0}},
+ {2738, {wxMouseEvent, getWheelRotation, 0}},
+ {2739, {wxMouseEvent, getWheelDelta, 0}},
+ {2740, {wxMouseEvent, getX, 0}},
+ {2741, {wxMouseEvent, getY, 0}},
+ {2742, {wxMouseEvent, isButton, 0}},
+ {2743, {wxMouseEvent, isPageScroll, 0}},
+ {2744, {wxMouseEvent, leaving, 0}},
+ {2745, {wxMouseEvent, leftDClick, 0}},
+ {2746, {wxMouseEvent, leftDown, 0}},
+ {2747, {wxMouseEvent, leftIsDown, 0}},
+ {2748, {wxMouseEvent, leftUp, 0}},
+ {2749, {wxMouseEvent, metaDown, 0}},
+ {2750, {wxMouseEvent, middleDClick, 0}},
+ {2751, {wxMouseEvent, middleDown, 0}},
+ {2752, {wxMouseEvent, middleIsDown, 0}},
+ {2753, {wxMouseEvent, middleUp, 0}},
+ {2754, {wxMouseEvent, moving, 0}},
+ {2755, {wxMouseEvent, rightDClick, 0}},
+ {2756, {wxMouseEvent, rightDown, 0}},
+ {2757, {wxMouseEvent, rightIsDown, 0}},
+ {2758, {wxMouseEvent, rightUp, 0}},
+ {2759, {wxMouseEvent, shiftDown, 0}},
+ {2760, {wxSetCursorEvent, getCursor, 0}},
+ {2761, {wxSetCursorEvent, getX, 0}},
+ {2762, {wxSetCursorEvent, getY, 0}},
+ {2763, {wxSetCursorEvent, hasCursor, 0}},
+ {2764, {wxSetCursorEvent, setCursor, 1}},
+ {2765, {wxKeyEvent, altDown, 0}},
+ {2766, {wxKeyEvent, cmdDown, 0}},
+ {2767, {wxKeyEvent, controlDown, 0}},
+ {2768, {wxKeyEvent, getKeyCode, 0}},
+ {2769, {wxKeyEvent, getModifiers, 0}},
+ {2772, {wxKeyEvent, getPosition, 0}},
+ {2773, {wxKeyEvent, getRawKeyCode, 0}},
+ {2774, {wxKeyEvent, getRawKeyFlags, 0}},
+ {2775, {wxKeyEvent, getUnicodeKey, 0}},
+ {2776, {wxKeyEvent, getX, 0}},
+ {2777, {wxKeyEvent, getY, 0}},
+ {2778, {wxKeyEvent, hasModifiers, 0}},
+ {2779, {wxKeyEvent, metaDown, 0}},
+ {2780, {wxKeyEvent, shiftDown, 0}},
+ {2781, {wxSizeEvent, getSize, 0}},
+ {2782, {wxMoveEvent, getPosition, 0}},
+ {2783, {wxEraseEvent, getDC, 0}},
+ {2784, {wxFocusEvent, getWindow, 0}},
+ {2785, {wxChildFocusEvent, getWindow, 0}},
+ {2786, {wxMenuEvent, getMenu, 0}},
+ {2787, {wxMenuEvent, getMenuId, 0}},
+ {2788, {wxMenuEvent, isPopup, 0}},
+ {2789, {wxCloseEvent, canVeto, 0}},
+ {2790, {wxCloseEvent, getLoggingOff, 0}},
+ {2791, {wxCloseEvent, setCanVeto, 1}},
+ {2792, {wxCloseEvent, setLoggingOff, 1}},
+ {2793, {wxCloseEvent, veto, 1}},
+ {2794, {wxShowEvent, setShow, 1}},
+ {2795, {wxShowEvent, getShow, 0}},
+ {2796, {wxIconizeEvent, iconized, 0}},
+ {2797, {wxJoystickEvent, buttonDown, 1}},
+ {2798, {wxJoystickEvent, buttonIsDown, 1}},
+ {2799, {wxJoystickEvent, buttonUp, 1}},
+ {2800, {wxJoystickEvent, getButtonChange, 0}},
+ {2801, {wxJoystickEvent, getButtonState, 0}},
+ {2802, {wxJoystickEvent, getJoystick, 0}},
+ {2803, {wxJoystickEvent, getPosition, 0}},
+ {2804, {wxJoystickEvent, getZPosition, 0}},
+ {2805, {wxJoystickEvent, isButton, 0}},
+ {2806, {wxJoystickEvent, isMove, 0}},
+ {2807, {wxJoystickEvent, isZMove, 0}},
+ {2808, {wxUpdateUIEvent, canUpdate, 1}},
+ {2809, {wxUpdateUIEvent, check, 1}},
+ {2810, {wxUpdateUIEvent, enable, 1}},
+ {2811, {wxUpdateUIEvent, show, 1}},
+ {2812, {wxUpdateUIEvent, getChecked, 0}},
+ {2813, {wxUpdateUIEvent, getEnabled, 0}},
+ {2814, {wxUpdateUIEvent, getShown, 0}},
+ {2815, {wxUpdateUIEvent, getSetChecked, 0}},
+ {2816, {wxUpdateUIEvent, getSetEnabled, 0}},
+ {2817, {wxUpdateUIEvent, getSetShown, 0}},
+ {2818, {wxUpdateUIEvent, getSetText, 0}},
+ {2819, {wxUpdateUIEvent, getText, 0}},
+ {2820, {wxUpdateUIEvent, getMode, 0}},
+ {2821, {wxUpdateUIEvent, getUpdateInterval, 0}},
+ {2822, {wxUpdateUIEvent, resetUpdateTime, 0}},
+ {2823, {wxUpdateUIEvent, setMode, 1}},
+ {2824, {wxUpdateUIEvent, setText, 1}},
+ {2825, {wxUpdateUIEvent, setUpdateInterval, 1}},
+ {2826, {wxMouseCaptureChangedEvent, getCapturedWindow, 0}},
+ {2827, {wxPaletteChangedEvent, setChangedWindow, 1}},
+ {2828, {wxPaletteChangedEvent, getChangedWindow, 0}},
+ {2829, {wxQueryNewPaletteEvent, setPaletteRealized, 1}},
+ {2830, {wxQueryNewPaletteEvent, getPaletteRealized, 0}},
+ {2831, {wxNavigationKeyEvent, getDirection, 0}},
+ {2832, {wxNavigationKeyEvent, setDirection, 1}},
+ {2833, {wxNavigationKeyEvent, isWindowChange, 0}},
+ {2834, {wxNavigationKeyEvent, setWindowChange, 1}},
+ {2835, {wxNavigationKeyEvent, isFromTab, 0}},
+ {2836, {wxNavigationKeyEvent, setFromTab, 1}},
+ {2837, {wxNavigationKeyEvent, getCurrentFocus, 0}},
+ {2838, {wxNavigationKeyEvent, setCurrentFocus, 1}},
+ {2839, {wxHelpEvent, getOrigin, 0}},
+ {2840, {wxHelpEvent, getPosition, 0}},
+ {2841, {wxHelpEvent, setOrigin, 1}},
+ {2842, {wxHelpEvent, setPosition, 1}},
+ {2843, {wxContextMenuEvent, getPosition, 0}},
+ {2844, {wxContextMenuEvent, setPosition, 1}},
+ {2845, {wxIdleEvent, canSend, 1}},
+ {2846, {wxIdleEvent, getMode, 0}},
+ {2847, {wxIdleEvent, requestMore, 1}},
+ {2848, {wxIdleEvent, moreRequested, 0}},
+ {2849, {wxIdleEvent, setMode, 1}},
+ {2850, {wxGridEvent, altDown, 0}},
+ {2851, {wxGridEvent, controlDown, 0}},
+ {2852, {wxGridEvent, getCol, 0}},
+ {2853, {wxGridEvent, getPosition, 0}},
+ {2854, {wxGridEvent, getRow, 0}},
+ {2855, {wxGridEvent, metaDown, 0}},
+ {2856, {wxGridEvent, selecting, 0}},
+ {2857, {wxGridEvent, shiftDown, 0}},
+ {2858, {wxNotifyEvent, allow, 0}},
+ {2859, {wxNotifyEvent, isAllowed, 0}},
+ {2860, {wxNotifyEvent, veto, 0}},
+ {2861, {wxSashEvent, getEdge, 0}},
+ {2862, {wxSashEvent, getDragRect, 0}},
+ {2863, {wxSashEvent, getDragStatus, 0}},
+ {2864, {wxListEvent, getCacheFrom, 0}},
+ {2865, {wxListEvent, getCacheTo, 0}},
+ {2866, {wxListEvent, getKeyCode, 0}},
+ {2867, {wxListEvent, getIndex, 0}},
+ {2868, {wxListEvent, getColumn, 0}},
+ {2869, {wxListEvent, getPoint, 0}},
+ {2870, {wxListEvent, getLabel, 0}},
+ {2871, {wxListEvent, getText, 0}},
+ {2872, {wxListEvent, getImage, 0}},
+ {2873, {wxListEvent, getData, 0}},
+ {2874, {wxListEvent, getMask, 0}},
+ {2875, {wxListEvent, getItem, 0}},
+ {2876, {wxListEvent, isEditCancelled, 0}},
+ {2877, {wxDateEvent, getDate, 0}},
+ {2878, {wxCalendarEvent, getWeekDay, 0}},
+ {2879, {wxFileDirPickerEvent, getPath, 0}},
+ {2880, {wxColourPickerEvent, getColour, 0}},
+ {2881, {wxFontPickerEvent, getFont, 0}},
+ {2882, {wxStyledTextEvent, getPosition, 0}},
+ {2883, {wxStyledTextEvent, getKey, 0}},
+ {2884, {wxStyledTextEvent, getModifiers, 0}},
+ {2885, {wxStyledTextEvent, getModificationType, 0}},
+ {2886, {wxStyledTextEvent, getText, 0}},
+ {2887, {wxStyledTextEvent, getLength, 0}},
+ {2888, {wxStyledTextEvent, getLinesAdded, 0}},
+ {2889, {wxStyledTextEvent, getLine, 0}},
+ {2890, {wxStyledTextEvent, getFoldLevelNow, 0}},
+ {2891, {wxStyledTextEvent, getFoldLevelPrev, 0}},
+ {2892, {wxStyledTextEvent, getMargin, 0}},
+ {2893, {wxStyledTextEvent, getMessage, 0}},
+ {2894, {wxStyledTextEvent, getWParam, 0}},
+ {2895, {wxStyledTextEvent, getLParam, 0}},
+ {2896, {wxStyledTextEvent, getListType, 0}},
+ {2897, {wxStyledTextEvent, getX, 0}},
+ {2898, {wxStyledTextEvent, getY, 0}},
+ {2899, {wxStyledTextEvent, getDragText, 0}},
+ {2900, {wxStyledTextEvent, getDragAllowMove, 0}},
+ {2901, {wxStyledTextEvent, getDragResult, 0}},
+ {2902, {wxStyledTextEvent, getShift, 0}},
+ {2903, {wxStyledTextEvent, getControl, 0}},
+ {2904, {wxStyledTextEvent, getAlt, 0}},
+ {2905, {utils, getKeyState, 1}},
+ {2906, {utils, getMousePosition, 2}},
+ {2907, {utils, getMouseState, 0}},
+ {2908, {utils, setDetectableAutoRepeat, 1}},
+ {2909, {utils, bell, 0}},
+ {2910, {utils, findMenuItemId, 3}},
+ {2911, {utils, genericFindWindowAtPoint, 1}},
+ {2912, {utils, findWindowAtPoint, 1}},
+ {2913, {utils, beginBusyCursor, 1}},
+ {2914, {utils, endBusyCursor, 0}},
+ {2915, {utils, isBusy, 0}},
+ {2916, {utils, shutdown, 1}},
+ {2917, {utils, shell, 1}},
+ {2918, {utils, launchDefaultBrowser, 2}},
+ {2919, {utils, getEmailAddress, 0}},
+ {2920, {utils, getUserId, 0}},
+ {2921, {utils, getHomeDir, 0}},
+ {2922, {utils, newId, 0}},
+ {2923, {utils, registerId, 1}},
+ {2924, {utils, getCurrentId, 0}},
+ {2925, {utils, getOsDescription, 0}},
+ {2926, {utils, isPlatformLittleEndian, 0}},
+ {2927, {utils, isPlatform64Bit, 0}},
+ {2928, {gdicmn, displaySize, 2}},
+ {2929, {gdicmn, setCursor, 1}},
+ {2930, {wxPrintout, new, 1}},
+ {2931, {wxPrintout, destruct, 0}},
+ {2932, {wxPrintout, getDC, 0}},
+ {2933, {wxPrintout, getPageSizeMM, 2}},
+ {2934, {wxPrintout, getPageSizePixels, 2}},
+ {2935, {wxPrintout, getPaperRectPixels, 0}},
+ {2936, {wxPrintout, getPPIPrinter, 2}},
+ {2937, {wxPrintout, getPPIScreen, 2}},
+ {2938, {wxPrintout, getTitle, 0}},
+ {2939, {wxPrintout, isPreview, 0}},
+ {2940, {wxPrintout, fitThisSizeToPaper, 1}},
+ {2941, {wxPrintout, fitThisSizeToPage, 1}},
+ {2942, {wxPrintout, fitThisSizeToPageMargins, 2}},
+ {2943, {wxPrintout, mapScreenSizeToPaper, 0}},
+ {2944, {wxPrintout, mapScreenSizeToPage, 0}},
+ {2945, {wxPrintout, mapScreenSizeToPageMargins, 1}},
+ {2946, {wxPrintout, mapScreenSizeToDevice, 0}},
+ {2947, {wxPrintout, getLogicalPaperRect, 0}},
+ {2948, {wxPrintout, getLogicalPageRect, 0}},
+ {2949, {wxPrintout, getLogicalPageMarginsRect, 1}},
+ {2950, {wxPrintout, setLogicalOrigin, 2}},
+ {2951, {wxPrintout, offsetLogicalOrigin, 2}},
+ {2952, {wxStyledTextCtrl, new_2, 2}},
+ {2953, {wxStyledTextCtrl, new_0, 0}},
+ {2954, {wxStyledTextCtrl, destruct, 0}},
+ {2955, {wxStyledTextCtrl, create, 2}},
+ {2956, {wxStyledTextCtrl, addText, 1}},
+ {2957, {wxStyledTextCtrl, addStyledText, 1}},
+ {2958, {wxStyledTextCtrl, insertText, 2}},
+ {2959, {wxStyledTextCtrl, clearAll, 0}},
+ {2960, {wxStyledTextCtrl, clearDocumentStyle, 0}},
+ {2961, {wxStyledTextCtrl, getLength, 0}},
+ {2962, {wxStyledTextCtrl, getCharAt, 1}},
+ {2963, {wxStyledTextCtrl, getCurrentPos, 0}},
+ {2964, {wxStyledTextCtrl, getAnchor, 0}},
+ {2965, {wxStyledTextCtrl, getStyleAt, 1}},
+ {2966, {wxStyledTextCtrl, redo, 0}},
+ {2967, {wxStyledTextCtrl, setUndoCollection, 1}},
+ {2968, {wxStyledTextCtrl, selectAll, 0}},
+ {2969, {wxStyledTextCtrl, setSavePoint, 0}},
+ {2970, {wxStyledTextCtrl, getStyledText, 2}},
+ {2971, {wxStyledTextCtrl, canRedo, 0}},
+ {2972, {wxStyledTextCtrl, markerLineFromHandle, 1}},
+ {2973, {wxStyledTextCtrl, markerDeleteHandle, 1}},
+ {2974, {wxStyledTextCtrl, getUndoCollection, 0}},
+ {2975, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
+ {2976, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
+ {2977, {wxStyledTextCtrl, positionFromPoint, 1}},
+ {2978, {wxStyledTextCtrl, positionFromPointClose, 2}},
+ {2979, {wxStyledTextCtrl, gotoLine, 1}},
+ {2980, {wxStyledTextCtrl, gotoPos, 1}},
+ {2981, {wxStyledTextCtrl, setAnchor, 1}},
+ {2982, {wxStyledTextCtrl, getCurLine, 1}},
+ {2983, {wxStyledTextCtrl, getEndStyled, 0}},
+ {2984, {wxStyledTextCtrl, convertEOLs, 1}},
+ {2985, {wxStyledTextCtrl, getEOLMode, 0}},
+ {2986, {wxStyledTextCtrl, setEOLMode, 1}},
+ {2987, {wxStyledTextCtrl, startStyling, 2}},
+ {2988, {wxStyledTextCtrl, setStyling, 2}},
+ {2989, {wxStyledTextCtrl, getBufferedDraw, 0}},
+ {2990, {wxStyledTextCtrl, setBufferedDraw, 1}},
+ {2991, {wxStyledTextCtrl, setTabWidth, 1}},
+ {2992, {wxStyledTextCtrl, getTabWidth, 0}},
+ {2993, {wxStyledTextCtrl, setCodePage, 1}},
+ {2994, {wxStyledTextCtrl, markerDefine, 3}},
+ {2995, {wxStyledTextCtrl, markerSetForeground, 2}},
+ {2996, {wxStyledTextCtrl, markerSetBackground, 2}},
+ {2997, {wxStyledTextCtrl, markerAdd, 2}},
+ {2998, {wxStyledTextCtrl, markerDelete, 2}},
+ {2999, {wxStyledTextCtrl, markerDeleteAll, 1}},
+ {3000, {wxStyledTextCtrl, markerGet, 1}},
+ {3001, {wxStyledTextCtrl, markerNext, 2}},
+ {3002, {wxStyledTextCtrl, markerPrevious, 2}},
+ {3003, {wxStyledTextCtrl, markerDefineBitmap, 2}},
+ {3004, {wxStyledTextCtrl, markerAddSet, 2}},
+ {3005, {wxStyledTextCtrl, markerSetAlpha, 2}},
+ {3006, {wxStyledTextCtrl, setMarginType, 2}},
+ {3007, {wxStyledTextCtrl, getMarginType, 1}},
+ {3008, {wxStyledTextCtrl, setMarginWidth, 2}},
+ {3009, {wxStyledTextCtrl, getMarginWidth, 1}},
+ {3010, {wxStyledTextCtrl, setMarginMask, 2}},
+ {3011, {wxStyledTextCtrl, getMarginMask, 1}},
+ {3012, {wxStyledTextCtrl, setMarginSensitive, 2}},
+ {3013, {wxStyledTextCtrl, getMarginSensitive, 1}},
+ {3014, {wxStyledTextCtrl, styleClearAll, 0}},
+ {3015, {wxStyledTextCtrl, styleSetForeground, 2}},
+ {3016, {wxStyledTextCtrl, styleSetBackground, 2}},
+ {3017, {wxStyledTextCtrl, styleSetBold, 2}},
+ {3018, {wxStyledTextCtrl, styleSetItalic, 2}},
+ {3019, {wxStyledTextCtrl, styleSetSize, 2}},
+ {3020, {wxStyledTextCtrl, styleSetFaceName, 2}},
+ {3021, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
+ {3022, {wxStyledTextCtrl, styleResetDefault, 0}},
+ {3023, {wxStyledTextCtrl, styleSetUnderline, 2}},
+ {3024, {wxStyledTextCtrl, styleSetCase, 2}},
+ {3025, {wxStyledTextCtrl, styleSetHotSpot, 2}},
+ {3026, {wxStyledTextCtrl, setSelForeground, 2}},
+ {3027, {wxStyledTextCtrl, setSelBackground, 2}},
+ {3028, {wxStyledTextCtrl, getSelAlpha, 0}},
+ {3029, {wxStyledTextCtrl, setSelAlpha, 1}},
+ {3030, {wxStyledTextCtrl, setCaretForeground, 1}},
+ {3031, {wxStyledTextCtrl, cmdKeyAssign, 3}},
+ {3032, {wxStyledTextCtrl, cmdKeyClear, 2}},
+ {3033, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
+ {3034, {wxStyledTextCtrl, setStyleBytes, 2}},
+ {3035, {wxStyledTextCtrl, styleSetVisible, 2}},
+ {3036, {wxStyledTextCtrl, getCaretPeriod, 0}},
+ {3037, {wxStyledTextCtrl, setCaretPeriod, 1}},
+ {3038, {wxStyledTextCtrl, setWordChars, 1}},
+ {3039, {wxStyledTextCtrl, beginUndoAction, 0}},
+ {3040, {wxStyledTextCtrl, endUndoAction, 0}},
+ {3041, {wxStyledTextCtrl, indicatorSetStyle, 2}},
+ {3042, {wxStyledTextCtrl, indicatorGetStyle, 1}},
+ {3043, {wxStyledTextCtrl, indicatorSetForeground, 2}},
+ {3044, {wxStyledTextCtrl, indicatorGetForeground, 1}},
+ {3045, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
+ {3046, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
+ {3047, {wxStyledTextCtrl, getStyleBits, 0}},
+ {3048, {wxStyledTextCtrl, setLineState, 2}},
+ {3049, {wxStyledTextCtrl, getLineState, 1}},
+ {3050, {wxStyledTextCtrl, getMaxLineState, 0}},
+ {3051, {wxStyledTextCtrl, getCaretLineVisible, 0}},
+ {3052, {wxStyledTextCtrl, setCaretLineVisible, 1}},
+ {3053, {wxStyledTextCtrl, getCaretLineBackground, 0}},
+ {3054, {wxStyledTextCtrl, setCaretLineBackground, 1}},
+ {3055, {wxStyledTextCtrl, autoCompShow, 2}},
+ {3056, {wxStyledTextCtrl, autoCompCancel, 0}},
+ {3057, {wxStyledTextCtrl, autoCompActive, 0}},
+ {3058, {wxStyledTextCtrl, autoCompPosStart, 0}},
+ {3059, {wxStyledTextCtrl, autoCompComplete, 0}},
+ {3060, {wxStyledTextCtrl, autoCompStops, 1}},
+ {3061, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
+ {3062, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
+ {3063, {wxStyledTextCtrl, autoCompSelect, 1}},
+ {3064, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
+ {3065, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
+ {3066, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
+ {3067, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
+ {3068, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
+ {3069, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
+ {3070, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
+ {3071, {wxStyledTextCtrl, userListShow, 2}},
+ {3072, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
+ {3073, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
+ {3074, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
+ {3075, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
+ {3076, {wxStyledTextCtrl, registerImage, 2}},
+ {3077, {wxStyledTextCtrl, clearRegisteredImages, 0}},
+ {3078, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
+ {3079, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
+ {3080, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
+ {3081, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
+ {3082, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
+ {3083, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
+ {3084, {wxStyledTextCtrl, setIndent, 1}},
+ {3085, {wxStyledTextCtrl, getIndent, 0}},
+ {3086, {wxStyledTextCtrl, setUseTabs, 1}},
+ {3087, {wxStyledTextCtrl, getUseTabs, 0}},
+ {3088, {wxStyledTextCtrl, setLineIndentation, 2}},
+ {3089, {wxStyledTextCtrl, getLineIndentation, 1}},
+ {3090, {wxStyledTextCtrl, getLineIndentPosition, 1}},
+ {3091, {wxStyledTextCtrl, getColumn, 1}},
+ {3092, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
+ {3093, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
+ {3094, {wxStyledTextCtrl, setIndentationGuides, 1}},
+ {3095, {wxStyledTextCtrl, getIndentationGuides, 0}},
+ {3096, {wxStyledTextCtrl, setHighlightGuide, 1}},
+ {3097, {wxStyledTextCtrl, getHighlightGuide, 0}},
+ {3098, {wxStyledTextCtrl, getLineEndPosition, 1}},
+ {3099, {wxStyledTextCtrl, getCodePage, 0}},
+ {3100, {wxStyledTextCtrl, getCaretForeground, 0}},
+ {3101, {wxStyledTextCtrl, getReadOnly, 0}},
+ {3102, {wxStyledTextCtrl, setCurrentPos, 1}},
+ {3103, {wxStyledTextCtrl, setSelectionStart, 1}},
+ {3104, {wxStyledTextCtrl, getSelectionStart, 0}},
+ {3105, {wxStyledTextCtrl, setSelectionEnd, 1}},
+ {3106, {wxStyledTextCtrl, getSelectionEnd, 0}},
+ {3107, {wxStyledTextCtrl, setPrintMagnification, 1}},
+ {3108, {wxStyledTextCtrl, getPrintMagnification, 0}},
+ {3109, {wxStyledTextCtrl, setPrintColourMode, 1}},
+ {3110, {wxStyledTextCtrl, getPrintColourMode, 0}},
+ {3111, {wxStyledTextCtrl, findText, 4}},
+ {3112, {wxStyledTextCtrl, formatRange, 7}},
+ {3113, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
+ {3114, {wxStyledTextCtrl, getLine, 1}},
+ {3115, {wxStyledTextCtrl, getLineCount, 0}},
+ {3116, {wxStyledTextCtrl, setMarginLeft, 1}},
+ {3117, {wxStyledTextCtrl, getMarginLeft, 0}},
+ {3118, {wxStyledTextCtrl, setMarginRight, 1}},
+ {3119, {wxStyledTextCtrl, getMarginRight, 0}},
+ {3120, {wxStyledTextCtrl, getModify, 0}},
+ {3121, {wxStyledTextCtrl, setSelection, 2}},
+ {3122, {wxStyledTextCtrl, getSelectedText, 0}},
+ {3123, {wxStyledTextCtrl, getTextRange, 2}},
+ {3124, {wxStyledTextCtrl, hideSelection, 1}},
+ {3125, {wxStyledTextCtrl, lineFromPosition, 1}},
+ {3126, {wxStyledTextCtrl, positionFromLine, 1}},
+ {3127, {wxStyledTextCtrl, lineScroll, 2}},
+ {3128, {wxStyledTextCtrl, ensureCaretVisible, 0}},
+ {3129, {wxStyledTextCtrl, replaceSelection, 1}},
+ {3130, {wxStyledTextCtrl, setReadOnly, 1}},
+ {3131, {wxStyledTextCtrl, canPaste, 0}},
+ {3132, {wxStyledTextCtrl, canUndo, 0}},
+ {3133, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
+ {3134, {wxStyledTextCtrl, undo, 0}},
+ {3135, {wxStyledTextCtrl, cut, 0}},
+ {3136, {wxStyledTextCtrl, copy, 0}},
+ {3137, {wxStyledTextCtrl, paste, 0}},
+ {3138, {wxStyledTextCtrl, clear, 0}},
+ {3139, {wxStyledTextCtrl, setText, 1}},
+ {3140, {wxStyledTextCtrl, getText, 0}},
+ {3141, {wxStyledTextCtrl, getTextLength, 0}},
+ {3142, {wxStyledTextCtrl, getOvertype, 0}},
+ {3143, {wxStyledTextCtrl, setCaretWidth, 1}},
+ {3144, {wxStyledTextCtrl, getCaretWidth, 0}},
+ {3145, {wxStyledTextCtrl, setTargetStart, 1}},
+ {3146, {wxStyledTextCtrl, getTargetStart, 0}},
+ {3147, {wxStyledTextCtrl, setTargetEnd, 1}},
+ {3148, {wxStyledTextCtrl, getTargetEnd, 0}},
+ {3149, {wxStyledTextCtrl, replaceTarget, 1}},
+ {3150, {wxStyledTextCtrl, searchInTarget, 1}},
+ {3151, {wxStyledTextCtrl, setSearchFlags, 1}},
+ {3152, {wxStyledTextCtrl, getSearchFlags, 0}},
+ {3153, {wxStyledTextCtrl, callTipShow, 2}},
+ {3154, {wxStyledTextCtrl, callTipCancel, 0}},
+ {3155, {wxStyledTextCtrl, callTipActive, 0}},
+ {3156, {wxStyledTextCtrl, callTipPosAtStart, 0}},
+ {3157, {wxStyledTextCtrl, callTipSetHighlight, 2}},
+ {3158, {wxStyledTextCtrl, callTipSetBackground, 1}},
+ {3159, {wxStyledTextCtrl, callTipSetForeground, 1}},
+ {3160, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
+ {3161, {wxStyledTextCtrl, callTipUseStyle, 1}},
+ {3162, {wxStyledTextCtrl, visibleFromDocLine, 1}},
+ {3163, {wxStyledTextCtrl, docLineFromVisible, 1}},
+ {3164, {wxStyledTextCtrl, wrapCount, 1}},
+ {3165, {wxStyledTextCtrl, setFoldLevel, 2}},
+ {3166, {wxStyledTextCtrl, getFoldLevel, 1}},
+ {3167, {wxStyledTextCtrl, getLastChild, 2}},
+ {3168, {wxStyledTextCtrl, getFoldParent, 1}},
+ {3169, {wxStyledTextCtrl, showLines, 2}},
+ {3170, {wxStyledTextCtrl, hideLines, 2}},
+ {3171, {wxStyledTextCtrl, getLineVisible, 1}},
+ {3172, {wxStyledTextCtrl, setFoldExpanded, 2}},
+ {3173, {wxStyledTextCtrl, getFoldExpanded, 1}},
+ {3174, {wxStyledTextCtrl, toggleFold, 1}},
+ {3175, {wxStyledTextCtrl, ensureVisible, 1}},
+ {3176, {wxStyledTextCtrl, setFoldFlags, 1}},
+ {3177, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
+ {3178, {wxStyledTextCtrl, setTabIndents, 1}},
+ {3179, {wxStyledTextCtrl, getTabIndents, 0}},
+ {3180, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
+ {3181, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
+ {3182, {wxStyledTextCtrl, setMouseDwellTime, 1}},
+ {3183, {wxStyledTextCtrl, getMouseDwellTime, 0}},
+ {3184, {wxStyledTextCtrl, wordStartPosition, 2}},
+ {3185, {wxStyledTextCtrl, wordEndPosition, 2}},
+ {3186, {wxStyledTextCtrl, setWrapMode, 1}},
+ {3187, {wxStyledTextCtrl, getWrapMode, 0}},
+ {3188, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
+ {3189, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
+ {3190, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
+ {3191, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
+ {3192, {wxStyledTextCtrl, setWrapStartIndent, 1}},
+ {3193, {wxStyledTextCtrl, getWrapStartIndent, 0}},
+ {3194, {wxStyledTextCtrl, setLayoutCache, 1}},
+ {3195, {wxStyledTextCtrl, getLayoutCache, 0}},
+ {3196, {wxStyledTextCtrl, setScrollWidth, 1}},
+ {3197, {wxStyledTextCtrl, getScrollWidth, 0}},
+ {3198, {wxStyledTextCtrl, textWidth, 2}},
+ {3199, {wxStyledTextCtrl, getEndAtLastLine, 0}},
+ {3200, {wxStyledTextCtrl, textHeight, 1}},
+ {3201, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
+ {3202, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
+ {3203, {wxStyledTextCtrl, appendText, 1}},
+ {3204, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
+ {3205, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
+ {3206, {wxStyledTextCtrl, targetFromSelection, 0}},
+ {3207, {wxStyledTextCtrl, linesJoin, 0}},
+ {3208, {wxStyledTextCtrl, linesSplit, 1}},
+ {3209, {wxStyledTextCtrl, setFoldMarginColour, 2}},
+ {3210, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
+ {3211, {wxStyledTextCtrl, lineDown, 0}},
+ {3212, {wxStyledTextCtrl, lineDownExtend, 0}},
+ {3213, {wxStyledTextCtrl, lineUp, 0}},
+ {3214, {wxStyledTextCtrl, lineUpExtend, 0}},
+ {3215, {wxStyledTextCtrl, charLeft, 0}},
+ {3216, {wxStyledTextCtrl, charLeftExtend, 0}},
+ {3217, {wxStyledTextCtrl, charRight, 0}},
+ {3218, {wxStyledTextCtrl, charRightExtend, 0}},
+ {3219, {wxStyledTextCtrl, wordLeft, 0}},
+ {3220, {wxStyledTextCtrl, wordLeftExtend, 0}},
+ {3221, {wxStyledTextCtrl, wordRight, 0}},
+ {3222, {wxStyledTextCtrl, wordRightExtend, 0}},
+ {3223, {wxStyledTextCtrl, home, 0}},
+ {3224, {wxStyledTextCtrl, homeExtend, 0}},
+ {3225, {wxStyledTextCtrl, lineEnd, 0}},
+ {3226, {wxStyledTextCtrl, lineEndExtend, 0}},
+ {3227, {wxStyledTextCtrl, documentStart, 0}},
+ {3228, {wxStyledTextCtrl, documentStartExtend, 0}},
+ {3229, {wxStyledTextCtrl, documentEnd, 0}},
+ {3230, {wxStyledTextCtrl, documentEndExtend, 0}},
+ {3231, {wxStyledTextCtrl, pageUp, 0}},
+ {3232, {wxStyledTextCtrl, pageUpExtend, 0}},
+ {3233, {wxStyledTextCtrl, pageDown, 0}},
+ {3234, {wxStyledTextCtrl, pageDownExtend, 0}},
+ {3235, {wxStyledTextCtrl, editToggleOvertype, 0}},
+ {3236, {wxStyledTextCtrl, cancel, 0}},
+ {3237, {wxStyledTextCtrl, deleteBack, 0}},
+ {3238, {wxStyledTextCtrl, tab, 0}},
+ {3239, {wxStyledTextCtrl, backTab, 0}},
+ {3240, {wxStyledTextCtrl, newLine, 0}},
+ {3241, {wxStyledTextCtrl, formFeed, 0}},
+ {3242, {wxStyledTextCtrl, vCHome, 0}},
+ {3243, {wxStyledTextCtrl, vCHomeExtend, 0}},
+ {3244, {wxStyledTextCtrl, zoomIn, 0}},
+ {3245, {wxStyledTextCtrl, zoomOut, 0}},
+ {3246, {wxStyledTextCtrl, delWordLeft, 0}},
+ {3247, {wxStyledTextCtrl, delWordRight, 0}},
+ {3248, {wxStyledTextCtrl, lineCut, 0}},
+ {3249, {wxStyledTextCtrl, lineDelete, 0}},
+ {3250, {wxStyledTextCtrl, lineTranspose, 0}},
+ {3251, {wxStyledTextCtrl, lineDuplicate, 0}},
+ {3252, {wxStyledTextCtrl, lowerCase, 0}},
+ {3253, {wxStyledTextCtrl, upperCase, 0}},
+ {3254, {wxStyledTextCtrl, lineScrollDown, 0}},
+ {3255, {wxStyledTextCtrl, lineScrollUp, 0}},
+ {3256, {wxStyledTextCtrl, deleteBackNotLine, 0}},
+ {3257, {wxStyledTextCtrl, homeDisplay, 0}},
+ {3258, {wxStyledTextCtrl, homeDisplayExtend, 0}},
+ {3259, {wxStyledTextCtrl, lineEndDisplay, 0}},
+ {3260, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
+ {3261, {wxStyledTextCtrl, homeWrapExtend, 0}},
+ {3262, {wxStyledTextCtrl, lineEndWrap, 0}},
+ {3263, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
+ {3264, {wxStyledTextCtrl, vCHomeWrap, 0}},
+ {3265, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
+ {3266, {wxStyledTextCtrl, lineCopy, 0}},
+ {3267, {wxStyledTextCtrl, moveCaretInsideView, 0}},
+ {3268, {wxStyledTextCtrl, lineLength, 1}},
+ {3269, {wxStyledTextCtrl, braceHighlight, 2}},
+ {3270, {wxStyledTextCtrl, braceBadLight, 1}},
+ {3271, {wxStyledTextCtrl, braceMatch, 1}},
+ {3272, {wxStyledTextCtrl, getViewEOL, 0}},
+ {3273, {wxStyledTextCtrl, setViewEOL, 1}},
+ {3274, {wxStyledTextCtrl, setModEventMask, 1}},
+ {3275, {wxStyledTextCtrl, getEdgeColumn, 0}},
+ {3276, {wxStyledTextCtrl, setEdgeColumn, 1}},
+ {3277, {wxStyledTextCtrl, setEdgeMode, 1}},
+ {3278, {wxStyledTextCtrl, getEdgeMode, 0}},
+ {3279, {wxStyledTextCtrl, getEdgeColour, 0}},
+ {3280, {wxStyledTextCtrl, setEdgeColour, 1}},
+ {3281, {wxStyledTextCtrl, searchAnchor, 0}},
+ {3282, {wxStyledTextCtrl, searchNext, 2}},
+ {3283, {wxStyledTextCtrl, searchPrev, 2}},
+ {3284, {wxStyledTextCtrl, linesOnScreen, 0}},
+ {3285, {wxStyledTextCtrl, usePopUp, 1}},
+ {3286, {wxStyledTextCtrl, selectionIsRectangle, 0}},
+ {3287, {wxStyledTextCtrl, setZoom, 1}},
+ {3288, {wxStyledTextCtrl, getZoom, 0}},
+ {3289, {wxStyledTextCtrl, getModEventMask, 0}},
+ {3290, {wxStyledTextCtrl, setSTCFocus, 1}},
+ {3291, {wxStyledTextCtrl, getSTCFocus, 0}},
+ {3292, {wxStyledTextCtrl, setStatus, 1}},
+ {3293, {wxStyledTextCtrl, getStatus, 0}},
+ {3294, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
+ {3295, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
+ {3296, {wxStyledTextCtrl, setSTCCursor, 1}},
+ {3297, {wxStyledTextCtrl, getSTCCursor, 0}},
+ {3298, {wxStyledTextCtrl, setControlCharSymbol, 1}},
+ {3299, {wxStyledTextCtrl, getControlCharSymbol, 0}},
+ {3300, {wxStyledTextCtrl, wordPartLeft, 0}},
+ {3301, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
+ {3302, {wxStyledTextCtrl, wordPartRight, 0}},
+ {3303, {wxStyledTextCtrl, wordPartRightExtend, 0}},
+ {3304, {wxStyledTextCtrl, setVisiblePolicy, 2}},
+ {3305, {wxStyledTextCtrl, delLineLeft, 0}},
+ {3306, {wxStyledTextCtrl, delLineRight, 0}},
+ {3307, {wxStyledTextCtrl, getXOffset, 0}},
+ {3308, {wxStyledTextCtrl, chooseCaretX, 0}},
+ {3309, {wxStyledTextCtrl, setXCaretPolicy, 2}},
+ {3310, {wxStyledTextCtrl, setYCaretPolicy, 2}},
+ {3311, {wxStyledTextCtrl, getPrintWrapMode, 0}},
+ {3312, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
+ {3313, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
+ {3314, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
+ {3315, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
+ {3316, {wxStyledTextCtrl, paraDownExtend, 0}},
+ {3317, {wxStyledTextCtrl, paraUp, 0}},
+ {3318, {wxStyledTextCtrl, paraUpExtend, 0}},
+ {3319, {wxStyledTextCtrl, positionBefore, 1}},
+ {3320, {wxStyledTextCtrl, positionAfter, 1}},
+ {3321, {wxStyledTextCtrl, copyRange, 2}},
+ {3322, {wxStyledTextCtrl, copyText, 2}},
+ {3323, {wxStyledTextCtrl, setSelectionMode, 1}},
+ {3324, {wxStyledTextCtrl, getSelectionMode, 0}},
+ {3325, {wxStyledTextCtrl, lineDownRectExtend, 0}},
+ {3326, {wxStyledTextCtrl, lineUpRectExtend, 0}},
+ {3327, {wxStyledTextCtrl, charLeftRectExtend, 0}},
+ {3328, {wxStyledTextCtrl, charRightRectExtend, 0}},
+ {3329, {wxStyledTextCtrl, homeRectExtend, 0}},
+ {3330, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
+ {3331, {wxStyledTextCtrl, lineEndRectExtend, 0}},
+ {3332, {wxStyledTextCtrl, pageUpRectExtend, 0}},
+ {3333, {wxStyledTextCtrl, pageDownRectExtend, 0}},
+ {3334, {wxStyledTextCtrl, stutteredPageUp, 0}},
+ {3335, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
+ {3336, {wxStyledTextCtrl, stutteredPageDown, 0}},
+ {3337, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
+ {3338, {wxStyledTextCtrl, wordLeftEnd, 0}},
+ {3339, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
+ {3340, {wxStyledTextCtrl, wordRightEnd, 0}},
+ {3341, {wxStyledTextCtrl, wordRightEndExtend, 0}},
+ {3342, {wxStyledTextCtrl, setWhitespaceChars, 1}},
+ {3343, {wxStyledTextCtrl, setCharsDefault, 0}},
+ {3344, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
+ {3345, {wxStyledTextCtrl, allocate, 1}},
+ {3346, {wxStyledTextCtrl, findColumn, 2}},
+ {3347, {wxStyledTextCtrl, getCaretSticky, 0}},
+ {3348, {wxStyledTextCtrl, setCaretSticky, 1}},
+ {3349, {wxStyledTextCtrl, toggleCaretSticky, 0}},
+ {3350, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
+ {3351, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
+ {3352, {wxStyledTextCtrl, selectionDuplicate, 0}},
+ {3353, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
+ {3354, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
+ {3355, {wxStyledTextCtrl, startRecord, 0}},
+ {3356, {wxStyledTextCtrl, stopRecord, 0}},
+ {3357, {wxStyledTextCtrl, setLexer, 1}},
+ {3358, {wxStyledTextCtrl, getLexer, 0}},
+ {3359, {wxStyledTextCtrl, colourise, 2}},
+ {3360, {wxStyledTextCtrl, setProperty, 2}},
+ {3361, {wxStyledTextCtrl, setKeyWords, 2}},
+ {3362, {wxStyledTextCtrl, setLexerLanguage, 1}},
+ {3363, {wxStyledTextCtrl, getProperty, 1}},
+ {3364, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
+ {3365, {wxStyledTextCtrl, getCurrentLine, 0}},
+ {3366, {wxStyledTextCtrl, styleSetSpec, 2}},
+ {3367, {wxStyledTextCtrl, styleSetFont, 2}},
+ {3368, {wxStyledTextCtrl, styleSetFontAttr, 7}},
+ {3369, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
+ {3370, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
+ {3371, {wxStyledTextCtrl, cmdKeyExecute, 1}},
+ {3372, {wxStyledTextCtrl, setMargins, 2}},
+ {3373, {wxStyledTextCtrl, getSelection, 2}},
+ {3374, {wxStyledTextCtrl, pointFromPosition, 1}},
+ {3375, {wxStyledTextCtrl, scrollToLine, 1}},
+ {3376, {wxStyledTextCtrl, scrollToColumn, 1}},
+ {3377, {wxStyledTextCtrl, setVScrollBar, 1}},
+ {3378, {wxStyledTextCtrl, setHScrollBar, 1}},
+ {3379, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
+ {3380, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
+ {3381, {wxStyledTextCtrl, saveFile, 1}},
+ {3382, {wxStyledTextCtrl, loadFile, 1}},
+ {3383, {wxStyledTextCtrl, doDragOver, 3}},
+ {3384, {wxStyledTextCtrl, doDropText, 3}},
+ {3385, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
+ {3386, {wxStyledTextCtrl, addTextRaw, 1}},
+ {3387, {wxStyledTextCtrl, insertTextRaw, 2}},
+ {3388, {wxStyledTextCtrl, getCurLineRaw, 1}},
+ {3389, {wxStyledTextCtrl, getLineRaw, 1}},
+ {3390, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
+ {3391, {wxStyledTextCtrl, getTextRangeRaw, 2}},
+ {3392, {wxStyledTextCtrl, setTextRaw, 1}},
+ {3393, {wxStyledTextCtrl, getTextRaw, 0}},
+ {3394, {wxStyledTextCtrl, appendTextRaw, 1}},
+ {3395, {wxArtProvider, getBitmap, 2}},
+ {3396, {wxArtProvider, getIcon, 2}},
+ {3397, {wxTreeEvent, getKeyCode, 0}},
+ {3398, {wxTreeEvent, getItem, 0}},
+ {3399, {wxTreeEvent, getKeyEvent, 0}},
+ {3400, {wxTreeEvent, getLabel, 0}},
+ {3401, {wxTreeEvent, getOldItem, 0}},
+ {3402, {wxTreeEvent, getPoint, 0}},
+ {3403, {wxTreeEvent, isEditCancelled, 0}},
+ {3404, {wxTreeEvent, setToolTip, 1}},
+ {3405, {wxNotebookEvent, getOldSelection, 0}},
+ {3406, {wxNotebookEvent, getSelection, 0}},
+ {3407, {wxNotebookEvent, setOldSelection, 1}},
+ {3408, {wxNotebookEvent, setSelection, 1}},
+ {3409, {wxFileDataObject, new, 0}},
+ {3410, {wxFileDataObject, addFile, 1}},
+ {3411, {wxFileDataObject, getFilenames, 0}},
+ {3412, {wxFileDataObject, 'Destroy', undefined}},
+ {3413, {wxTextDataObject, new, 1}},
+ {3414, {wxTextDataObject, getTextLength, 0}},
+ {3415, {wxTextDataObject, getText, 0}},
+ {3416, {wxTextDataObject, setText, 1}},
+ {3417, {wxTextDataObject, 'Destroy', undefined}},
+ {3418, {wxBitmapDataObject, new_1_1, 1}},
+ {3419, {wxBitmapDataObject, new_1_0, 1}},
+ {3420, {wxBitmapDataObject, getBitmap, 0}},
+ {3421, {wxBitmapDataObject, setBitmap, 1}},
+ {3422, {wxBitmapDataObject, 'Destroy', undefined}},
+ {3424, {wxClipboard, new, 0}},
+ {3425, {wxClipboard, destruct, 0}},
+ {3426, {wxClipboard, addData, 1}},
+ {3427, {wxClipboard, clear, 0}},
+ {3428, {wxClipboard, close, 0}},
+ {3429, {wxClipboard, flush, 0}},
+ {3430, {wxClipboard, getData, 1}},
+ {3431, {wxClipboard, isOpened, 0}},
+ {3432, {wxClipboard, open, 0}},
+ {3433, {wxClipboard, setData, 1}},
+ {3435, {wxClipboard, usePrimarySelection, 1}},
+ {3436, {wxClipboard, isSupported, 1}},
+ {3437, {wxClipboard, get, 0}},
+ {3438, {wxSpinEvent, getPosition, 0}},
+ {3439, {wxSpinEvent, setPosition, 1}},
+ {3440, {wxSplitterWindow, new_0, 0}},
+ {3441, {wxSplitterWindow, new_2, 2}},
+ {3442, {wxSplitterWindow, destruct, 0}},
+ {3443, {wxSplitterWindow, create, 2}},
+ {3444, {wxSplitterWindow, getMinimumPaneSize, 0}},
+ {3445, {wxSplitterWindow, getSashGravity, 0}},
+ {3446, {wxSplitterWindow, getSashPosition, 0}},
+ {3447, {wxSplitterWindow, getSplitMode, 0}},
+ {3448, {wxSplitterWindow, getWindow1, 0}},
+ {3449, {wxSplitterWindow, getWindow2, 0}},
+ {3450, {wxSplitterWindow, initialize, 1}},
+ {3451, {wxSplitterWindow, isSplit, 0}},
+ {3452, {wxSplitterWindow, replaceWindow, 2}},
+ {3453, {wxSplitterWindow, setSashGravity, 1}},
+ {3454, {wxSplitterWindow, setSashPosition, 2}},
+ {3455, {wxSplitterWindow, setSashSize, 1}},
+ {3456, {wxSplitterWindow, setMinimumPaneSize, 1}},
+ {3457, {wxSplitterWindow, setSplitMode, 1}},
+ {3458, {wxSplitterWindow, splitHorizontally, 3}},
+ {3459, {wxSplitterWindow, splitVertically, 3}},
+ {3460, {wxSplitterWindow, unsplit, 1}},
+ {3461, {wxSplitterWindow, updateSize, 0}},
+ {3462, {wxSplitterEvent, getSashPosition, 0}},
+ {3463, {wxSplitterEvent, getX, 0}},
+ {3464, {wxSplitterEvent, getY, 0}},
+ {3465, {wxSplitterEvent, getWindowBeingRemoved, 0}},
+ {3466, {wxSplitterEvent, setSashPosition, 1}},
+ {3467, {wxHtmlWindow, new_0, 0}},
+ {3468, {wxHtmlWindow, new_2, 2}},
+ {3469, {wxHtmlWindow, appendToPage, 1}},
+ {3470, {wxHtmlWindow, getOpenedAnchor, 0}},
+ {3471, {wxHtmlWindow, getOpenedPage, 0}},
+ {3472, {wxHtmlWindow, getOpenedPageTitle, 0}},
+ {3473, {wxHtmlWindow, getRelatedFrame, 0}},
+ {3474, {wxHtmlWindow, historyBack, 0}},
+ {3475, {wxHtmlWindow, historyCanBack, 0}},
+ {3476, {wxHtmlWindow, historyCanForward, 0}},
+ {3477, {wxHtmlWindow, historyClear, 0}},
+ {3478, {wxHtmlWindow, historyForward, 0}},
+ {3479, {wxHtmlWindow, loadFile, 1}},
+ {3480, {wxHtmlWindow, loadPage, 1}},
+ {3481, {wxHtmlWindow, selectAll, 0}},
+ {3482, {wxHtmlWindow, selectionToText, 0}},
+ {3483, {wxHtmlWindow, selectLine, 1}},
+ {3484, {wxHtmlWindow, selectWord, 1}},
+ {3485, {wxHtmlWindow, setBorders, 1}},
+ {3486, {wxHtmlWindow, setFonts, 3}},
+ {3487, {wxHtmlWindow, setPage, 1}},
+ {3488, {wxHtmlWindow, setRelatedFrame, 2}},
+ {3489, {wxHtmlWindow, setRelatedStatusBar, 1}},
+ {3490, {wxHtmlWindow, toText, 0}},
+ {3491, {wxHtmlWindow, 'Destroy', undefined}},
+ {3492, {wxHtmlLinkEvent, getLinkInfo, 0}},
+ {3493, {wxSystemSettings, getColour, 1}},
+ {3494, {wxSystemSettings, getFont, 1}},
+ {3495, {wxSystemSettings, getMetric, 2}},
+ {3496, {wxSystemSettings, getScreenType, 0}},
+ {3497, {wxSystemOptions, getOption, 1}},
+ {3498, {wxSystemOptions, getOptionInt, 1}},
+ {3499, {wxSystemOptions, hasOption, 1}},
+ {3500, {wxSystemOptions, isFalse, 1}},
+ {3501, {wxSystemOptions, setOption_2_1, 2}},
+ {3502, {wxSystemOptions, setOption_2_0, 2}},
+ {3503, {wxAuiNotebookEvent, setSelection, 1}},
+ {3504, {wxAuiNotebookEvent, getSelection, 0}},
+ {3505, {wxAuiNotebookEvent, setOldSelection, 1}},
+ {3506, {wxAuiNotebookEvent, getOldSelection, 0}},
+ {3507, {wxAuiNotebookEvent, setDragSource, 1}},
+ {3508, {wxAuiNotebookEvent, getDragSource, 0}},
+ {3509, {wxAuiManagerEvent, setManager, 1}},
+ {3510, {wxAuiManagerEvent, getManager, 0}},
+ {3511, {wxAuiManagerEvent, setPane, 1}},
+ {3512, {wxAuiManagerEvent, getPane, 0}},
+ {3513, {wxAuiManagerEvent, setButton, 1}},
+ {3514, {wxAuiManagerEvent, getButton, 0}},
+ {3515, {wxAuiManagerEvent, setDC, 1}},
+ {3516, {wxAuiManagerEvent, getDC, 0}},
+ {3517, {wxAuiManagerEvent, veto, 1}},
+ {3518, {wxAuiManagerEvent, getVeto, 0}},
+ {3519, {wxAuiManagerEvent, setCanVeto, 1}},
+ {3520, {wxAuiManagerEvent, canVeto, 0}},
+ {3521, {wxLogNull, new, 0}},
+ {3522, {wxLogNull, 'Destroy', undefined}},
+ {3523, {wxTaskBarIcon, new, 0}},
+ {3524, {wxTaskBarIcon, destruct, 0}},
+ {3525, {wxTaskBarIcon, popupMenu, 1}},
+ {3526, {wxTaskBarIcon, removeIcon, 0}},
+ {3527, {wxTaskBarIcon, setIcon, 2}},
+ {3528, {wxLocale, new_0, 0}},
+ {3530, {wxLocale, new_2, 2}},
+ {3531, {wxLocale, destruct, 0}},
+ {3533, {wxLocale, init, 1}},
+ {3534, {wxLocale, addCatalog_1, 1}},
+ {3535, {wxLocale, addCatalog_3, 3}},
+ {3536, {wxLocale, addCatalogLookupPathPrefix, 1}},
+ {3537, {wxLocale, getCanonicalName, 0}},
+ {3538, {wxLocale, getLanguage, 0}},
+ {3539, {wxLocale, getLanguageName, 1}},
+ {3540, {wxLocale, getLocale, 0}},
+ {3541, {wxLocale, getName, 0}},
+ {3542, {wxLocale, getString_2, 2}},
+ {3543, {wxLocale, getString_4, 4}},
+ {3544, {wxLocale, getHeaderValue, 2}},
+ {3545, {wxLocale, getSysName, 0}},
+ {3546, {wxLocale, getSystemEncoding, 0}},
+ {3547, {wxLocale, getSystemEncodingName, 0}},
+ {3548, {wxLocale, getSystemLanguage, 0}},
+ {3549, {wxLocale, isLoaded, 1}},
+ {3550, {wxLocale, isOk, 0}},
+ {3551, {wxActivateEvent, getActive, 0}},
+ {3553, {wxPopupWindow, new_2, 2}},
+ {3554, {wxPopupWindow, new_0, 0}},
+ {3556, {wxPopupWindow, destruct, 0}},
+ {3557, {wxPopupWindow, create, 2}},
+ {3558, {wxPopupWindow, position, 2}},
+ {3559, {wxPopupTransientWindow, new_0, 0}},
+ {3560, {wxPopupTransientWindow, new_2, 2}},
+ {3561, {wxPopupTransientWindow, destruct, 0}},
+ {3562, {wxPopupTransientWindow, popup, 1}},
+ {3563, {wxPopupTransientWindow, dismiss, 0}},
{-1, {mod, func, -1}}
].
diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl
index 109368adb3..82d0d265d7 100644
--- a/lib/wx/src/gen/wxe_funcs.hrl
+++ b/lib/wx/src/gen/wxe_funcs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1666,1639 +1666,1674 @@
-define(wxTextCtrl_Create, 1824).
-define(wxTextCtrl_Cut, 1825).
-define(wxTextCtrl_DiscardEdits, 1826).
--define(wxTextCtrl_EmulateKeyPress, 1827).
--define(wxTextCtrl_GetDefaultStyle, 1828).
--define(wxTextCtrl_GetInsertionPoint, 1829).
--define(wxTextCtrl_GetLastPosition, 1830).
--define(wxTextCtrl_GetLineLength, 1831).
--define(wxTextCtrl_GetLineText, 1832).
--define(wxTextCtrl_GetNumberOfLines, 1833).
--define(wxTextCtrl_GetRange, 1834).
--define(wxTextCtrl_GetSelection, 1835).
--define(wxTextCtrl_GetStringSelection, 1836).
--define(wxTextCtrl_GetStyle, 1837).
--define(wxTextCtrl_GetValue, 1838).
--define(wxTextCtrl_IsEditable, 1839).
--define(wxTextCtrl_IsModified, 1840).
--define(wxTextCtrl_IsMultiLine, 1841).
--define(wxTextCtrl_IsSingleLine, 1842).
--define(wxTextCtrl_LoadFile, 1843).
--define(wxTextCtrl_MarkDirty, 1844).
--define(wxTextCtrl_Paste, 1845).
--define(wxTextCtrl_PositionToXY, 1846).
--define(wxTextCtrl_Redo, 1847).
--define(wxTextCtrl_Remove, 1848).
--define(wxTextCtrl_Replace, 1849).
--define(wxTextCtrl_SaveFile, 1850).
--define(wxTextCtrl_SetDefaultStyle, 1851).
--define(wxTextCtrl_SetEditable, 1852).
--define(wxTextCtrl_SetInsertionPoint, 1853).
--define(wxTextCtrl_SetInsertionPointEnd, 1854).
--define(wxTextCtrl_SetMaxLength, 1856).
--define(wxTextCtrl_SetSelection, 1857).
--define(wxTextCtrl_SetStyle, 1858).
--define(wxTextCtrl_SetValue, 1859).
--define(wxTextCtrl_ShowPosition, 1860).
--define(wxTextCtrl_Undo, 1861).
--define(wxTextCtrl_WriteText, 1862).
--define(wxTextCtrl_XYToPosition, 1863).
--define(wxNotebook_new_0, 1866).
--define(wxNotebook_new_3, 1867).
--define(wxNotebook_destruct, 1868).
--define(wxNotebook_AddPage, 1869).
--define(wxNotebook_AdvanceSelection, 1870).
--define(wxNotebook_AssignImageList, 1871).
--define(wxNotebook_Create, 1872).
--define(wxNotebook_DeleteAllPages, 1873).
--define(wxNotebook_DeletePage, 1874).
--define(wxNotebook_RemovePage, 1875).
--define(wxNotebook_GetCurrentPage, 1876).
--define(wxNotebook_GetImageList, 1877).
--define(wxNotebook_GetPage, 1879).
--define(wxNotebook_GetPageCount, 1880).
--define(wxNotebook_GetPageImage, 1881).
--define(wxNotebook_GetPageText, 1882).
--define(wxNotebook_GetRowCount, 1883).
--define(wxNotebook_GetSelection, 1884).
--define(wxNotebook_GetThemeBackgroundColour, 1885).
--define(wxNotebook_HitTest, 1887).
--define(wxNotebook_InsertPage, 1889).
--define(wxNotebook_SetImageList, 1890).
--define(wxNotebook_SetPadding, 1891).
--define(wxNotebook_SetPageSize, 1892).
--define(wxNotebook_SetPageImage, 1893).
--define(wxNotebook_SetPageText, 1894).
--define(wxNotebook_SetSelection, 1895).
--define(wxNotebook_ChangeSelection, 1896).
--define(wxChoicebook_new_0, 1897).
--define(wxChoicebook_new_3, 1898).
--define(wxChoicebook_AddPage, 1899).
--define(wxChoicebook_AdvanceSelection, 1900).
--define(wxChoicebook_AssignImageList, 1901).
--define(wxChoicebook_Create, 1902).
--define(wxChoicebook_DeleteAllPages, 1903).
--define(wxChoicebook_DeletePage, 1904).
--define(wxChoicebook_RemovePage, 1905).
--define(wxChoicebook_GetCurrentPage, 1906).
--define(wxChoicebook_GetImageList, 1907).
--define(wxChoicebook_GetPage, 1909).
--define(wxChoicebook_GetPageCount, 1910).
--define(wxChoicebook_GetPageImage, 1911).
--define(wxChoicebook_GetPageText, 1912).
--define(wxChoicebook_GetSelection, 1913).
--define(wxChoicebook_HitTest, 1914).
--define(wxChoicebook_InsertPage, 1915).
--define(wxChoicebook_SetImageList, 1916).
--define(wxChoicebook_SetPageSize, 1917).
--define(wxChoicebook_SetPageImage, 1918).
--define(wxChoicebook_SetPageText, 1919).
--define(wxChoicebook_SetSelection, 1920).
--define(wxChoicebook_ChangeSelection, 1921).
--define(wxChoicebook_destroy, 1922).
--define(wxToolbook_new_0, 1923).
--define(wxToolbook_new_3, 1924).
--define(wxToolbook_AddPage, 1925).
--define(wxToolbook_AdvanceSelection, 1926).
--define(wxToolbook_AssignImageList, 1927).
--define(wxToolbook_Create, 1928).
--define(wxToolbook_DeleteAllPages, 1929).
--define(wxToolbook_DeletePage, 1930).
--define(wxToolbook_RemovePage, 1931).
--define(wxToolbook_GetCurrentPage, 1932).
--define(wxToolbook_GetImageList, 1933).
--define(wxToolbook_GetPage, 1935).
--define(wxToolbook_GetPageCount, 1936).
--define(wxToolbook_GetPageImage, 1937).
--define(wxToolbook_GetPageText, 1938).
--define(wxToolbook_GetSelection, 1939).
--define(wxToolbook_HitTest, 1941).
--define(wxToolbook_InsertPage, 1942).
--define(wxToolbook_SetImageList, 1943).
--define(wxToolbook_SetPageSize, 1944).
--define(wxToolbook_SetPageImage, 1945).
--define(wxToolbook_SetPageText, 1946).
--define(wxToolbook_SetSelection, 1947).
--define(wxToolbook_ChangeSelection, 1948).
--define(wxToolbook_destroy, 1949).
--define(wxListbook_new_0, 1950).
--define(wxListbook_new_3, 1951).
--define(wxListbook_AddPage, 1952).
--define(wxListbook_AdvanceSelection, 1953).
--define(wxListbook_AssignImageList, 1954).
--define(wxListbook_Create, 1955).
--define(wxListbook_DeleteAllPages, 1956).
--define(wxListbook_DeletePage, 1957).
--define(wxListbook_RemovePage, 1958).
--define(wxListbook_GetCurrentPage, 1959).
--define(wxListbook_GetImageList, 1960).
--define(wxListbook_GetPage, 1962).
--define(wxListbook_GetPageCount, 1963).
--define(wxListbook_GetPageImage, 1964).
--define(wxListbook_GetPageText, 1965).
--define(wxListbook_GetSelection, 1966).
--define(wxListbook_HitTest, 1968).
--define(wxListbook_InsertPage, 1969).
--define(wxListbook_SetImageList, 1970).
--define(wxListbook_SetPageSize, 1971).
--define(wxListbook_SetPageImage, 1972).
--define(wxListbook_SetPageText, 1973).
--define(wxListbook_SetSelection, 1974).
--define(wxListbook_ChangeSelection, 1975).
--define(wxListbook_destroy, 1976).
--define(wxTreebook_new_0, 1977).
--define(wxTreebook_new_3, 1978).
--define(wxTreebook_AddPage, 1979).
--define(wxTreebook_AdvanceSelection, 1980).
--define(wxTreebook_AssignImageList, 1981).
--define(wxTreebook_Create, 1982).
--define(wxTreebook_DeleteAllPages, 1983).
--define(wxTreebook_DeletePage, 1984).
--define(wxTreebook_RemovePage, 1985).
--define(wxTreebook_GetCurrentPage, 1986).
--define(wxTreebook_GetImageList, 1987).
--define(wxTreebook_GetPage, 1989).
--define(wxTreebook_GetPageCount, 1990).
--define(wxTreebook_GetPageImage, 1991).
--define(wxTreebook_GetPageText, 1992).
--define(wxTreebook_GetSelection, 1993).
--define(wxTreebook_ExpandNode, 1994).
--define(wxTreebook_IsNodeExpanded, 1995).
--define(wxTreebook_HitTest, 1997).
--define(wxTreebook_InsertPage, 1998).
--define(wxTreebook_InsertSubPage, 1999).
--define(wxTreebook_SetImageList, 2000).
--define(wxTreebook_SetPageSize, 2001).
--define(wxTreebook_SetPageImage, 2002).
--define(wxTreebook_SetPageText, 2003).
--define(wxTreebook_SetSelection, 2004).
--define(wxTreebook_ChangeSelection, 2005).
--define(wxTreebook_destroy, 2006).
--define(wxTreeCtrl_new_2, 2009).
--define(wxTreeCtrl_new_0, 2010).
--define(wxTreeCtrl_destruct, 2012).
--define(wxTreeCtrl_AddRoot, 2013).
--define(wxTreeCtrl_AppendItem, 2014).
--define(wxTreeCtrl_AssignImageList, 2015).
--define(wxTreeCtrl_AssignStateImageList, 2016).
--define(wxTreeCtrl_Collapse, 2017).
--define(wxTreeCtrl_CollapseAndReset, 2018).
--define(wxTreeCtrl_Create, 2019).
--define(wxTreeCtrl_Delete, 2020).
--define(wxTreeCtrl_DeleteAllItems, 2021).
--define(wxTreeCtrl_DeleteChildren, 2022).
--define(wxTreeCtrl_EditLabel, 2023).
--define(wxTreeCtrl_EnsureVisible, 2024).
--define(wxTreeCtrl_Expand, 2025).
--define(wxTreeCtrl_GetBoundingRect, 2026).
--define(wxTreeCtrl_GetChildrenCount, 2028).
--define(wxTreeCtrl_GetCount, 2029).
--define(wxTreeCtrl_GetEditControl, 2030).
--define(wxTreeCtrl_GetFirstChild, 2031).
--define(wxTreeCtrl_GetNextChild, 2032).
--define(wxTreeCtrl_GetFirstVisibleItem, 2033).
--define(wxTreeCtrl_GetImageList, 2034).
--define(wxTreeCtrl_GetIndent, 2035).
--define(wxTreeCtrl_GetItemBackgroundColour, 2036).
--define(wxTreeCtrl_GetItemData, 2037).
--define(wxTreeCtrl_GetItemFont, 2038).
--define(wxTreeCtrl_GetItemImage_1, 2039).
--define(wxTreeCtrl_GetItemImage_2, 2040).
--define(wxTreeCtrl_GetItemText, 2041).
--define(wxTreeCtrl_GetItemTextColour, 2042).
--define(wxTreeCtrl_GetLastChild, 2043).
--define(wxTreeCtrl_GetNextSibling, 2044).
--define(wxTreeCtrl_GetNextVisible, 2045).
--define(wxTreeCtrl_GetItemParent, 2046).
--define(wxTreeCtrl_GetPrevSibling, 2047).
--define(wxTreeCtrl_GetPrevVisible, 2048).
--define(wxTreeCtrl_GetRootItem, 2049).
--define(wxTreeCtrl_GetSelection, 2050).
--define(wxTreeCtrl_GetSelections, 2051).
--define(wxTreeCtrl_GetStateImageList, 2052).
--define(wxTreeCtrl_HitTest, 2053).
--define(wxTreeCtrl_InsertItem, 2055).
--define(wxTreeCtrl_IsBold, 2056).
--define(wxTreeCtrl_IsExpanded, 2057).
--define(wxTreeCtrl_IsSelected, 2058).
--define(wxTreeCtrl_IsVisible, 2059).
--define(wxTreeCtrl_ItemHasChildren, 2060).
--define(wxTreeCtrl_IsTreeItemIdOk, 2061).
--define(wxTreeCtrl_PrependItem, 2062).
--define(wxTreeCtrl_ScrollTo, 2063).
--define(wxTreeCtrl_SelectItem_1, 2064).
--define(wxTreeCtrl_SelectItem_2, 2065).
--define(wxTreeCtrl_SetIndent, 2066).
--define(wxTreeCtrl_SetImageList, 2067).
--define(wxTreeCtrl_SetItemBackgroundColour, 2068).
--define(wxTreeCtrl_SetItemBold, 2069).
--define(wxTreeCtrl_SetItemData, 2070).
--define(wxTreeCtrl_SetItemDropHighlight, 2071).
--define(wxTreeCtrl_SetItemFont, 2072).
--define(wxTreeCtrl_SetItemHasChildren, 2073).
--define(wxTreeCtrl_SetItemImage_2, 2074).
--define(wxTreeCtrl_SetItemImage_3, 2075).
--define(wxTreeCtrl_SetItemText, 2076).
--define(wxTreeCtrl_SetItemTextColour, 2077).
--define(wxTreeCtrl_SetStateImageList, 2078).
--define(wxTreeCtrl_SetWindowStyle, 2079).
--define(wxTreeCtrl_SortChildren, 2080).
--define(wxTreeCtrl_Toggle, 2081).
--define(wxTreeCtrl_ToggleItemSelection, 2082).
--define(wxTreeCtrl_Unselect, 2083).
--define(wxTreeCtrl_UnselectAll, 2084).
--define(wxTreeCtrl_UnselectItem, 2085).
--define(wxScrollBar_new_0, 2086).
--define(wxScrollBar_new_3, 2087).
--define(wxScrollBar_destruct, 2088).
--define(wxScrollBar_Create, 2089).
--define(wxScrollBar_GetRange, 2090).
--define(wxScrollBar_GetPageSize, 2091).
--define(wxScrollBar_GetThumbPosition, 2092).
--define(wxScrollBar_GetThumbSize, 2093).
--define(wxScrollBar_SetThumbPosition, 2094).
--define(wxScrollBar_SetScrollbar, 2095).
--define(wxSpinButton_new_2, 2097).
--define(wxSpinButton_new_0, 2098).
--define(wxSpinButton_Create, 2099).
--define(wxSpinButton_GetMax, 2100).
--define(wxSpinButton_GetMin, 2101).
--define(wxSpinButton_GetValue, 2102).
--define(wxSpinButton_SetRange, 2103).
--define(wxSpinButton_SetValue, 2104).
--define(wxSpinButton_destroy, 2105).
--define(wxSpinCtrl_new_0, 2106).
--define(wxSpinCtrl_new_2, 2107).
--define(wxSpinCtrl_Create, 2109).
--define(wxSpinCtrl_SetValue_1_1, 2112).
--define(wxSpinCtrl_SetValue_1_0, 2113).
--define(wxSpinCtrl_GetValue, 2115).
--define(wxSpinCtrl_SetRange, 2117).
--define(wxSpinCtrl_SetSelection, 2118).
--define(wxSpinCtrl_GetMin, 2120).
--define(wxSpinCtrl_GetMax, 2122).
--define(wxSpinCtrl_destroy, 2123).
--define(wxStaticText_new_0, 2124).
--define(wxStaticText_new_4, 2125).
--define(wxStaticText_Create, 2126).
--define(wxStaticText_GetLabel, 2127).
--define(wxStaticText_SetLabel, 2128).
--define(wxStaticText_Wrap, 2129).
--define(wxStaticText_destroy, 2130).
--define(wxStaticBitmap_new_0, 2131).
--define(wxStaticBitmap_new_4, 2132).
--define(wxStaticBitmap_Create, 2133).
--define(wxStaticBitmap_GetBitmap, 2134).
--define(wxStaticBitmap_SetBitmap, 2135).
--define(wxStaticBitmap_destroy, 2136).
--define(wxRadioBox_new, 2137).
--define(wxRadioBox_destruct, 2139).
--define(wxRadioBox_Create, 2140).
--define(wxRadioBox_Enable_2, 2141).
--define(wxRadioBox_Enable_1, 2142).
--define(wxRadioBox_GetSelection, 2143).
--define(wxRadioBox_GetString, 2144).
--define(wxRadioBox_SetSelection, 2145).
--define(wxRadioBox_Show_2, 2146).
--define(wxRadioBox_Show_1, 2147).
--define(wxRadioBox_GetColumnCount, 2148).
--define(wxRadioBox_GetItemHelpText, 2149).
--define(wxRadioBox_GetItemToolTip, 2150).
--define(wxRadioBox_GetItemFromPoint, 2152).
--define(wxRadioBox_GetRowCount, 2153).
--define(wxRadioBox_IsItemEnabled, 2154).
--define(wxRadioBox_IsItemShown, 2155).
--define(wxRadioBox_SetItemHelpText, 2156).
--define(wxRadioBox_SetItemToolTip, 2157).
--define(wxRadioButton_new_0, 2158).
--define(wxRadioButton_new_4, 2159).
--define(wxRadioButton_Create, 2160).
--define(wxRadioButton_GetValue, 2161).
--define(wxRadioButton_SetValue, 2162).
--define(wxRadioButton_destroy, 2163).
--define(wxSlider_new_6, 2165).
--define(wxSlider_new_0, 2166).
--define(wxSlider_Create, 2167).
--define(wxSlider_GetLineSize, 2168).
--define(wxSlider_GetMax, 2169).
--define(wxSlider_GetMin, 2170).
--define(wxSlider_GetPageSize, 2171).
--define(wxSlider_GetThumbLength, 2172).
--define(wxSlider_GetValue, 2173).
--define(wxSlider_SetLineSize, 2174).
--define(wxSlider_SetPageSize, 2175).
--define(wxSlider_SetRange, 2176).
--define(wxSlider_SetThumbLength, 2177).
--define(wxSlider_SetValue, 2178).
--define(wxSlider_destroy, 2179).
--define(wxDialog_new_4, 2181).
--define(wxDialog_new_0, 2182).
--define(wxDialog_destruct, 2184).
--define(wxDialog_Create, 2185).
--define(wxDialog_CreateButtonSizer, 2186).
--define(wxDialog_CreateStdDialogButtonSizer, 2187).
--define(wxDialog_EndModal, 2188).
--define(wxDialog_GetAffirmativeId, 2189).
--define(wxDialog_GetReturnCode, 2190).
--define(wxDialog_IsModal, 2191).
--define(wxDialog_SetAffirmativeId, 2192).
--define(wxDialog_SetReturnCode, 2193).
--define(wxDialog_Show, 2194).
--define(wxDialog_ShowModal, 2195).
--define(wxColourDialog_new_0, 2196).
--define(wxColourDialog_new_2, 2197).
--define(wxColourDialog_destruct, 2198).
--define(wxColourDialog_Create, 2199).
--define(wxColourDialog_GetColourData, 2200).
--define(wxColourData_new_0, 2201).
--define(wxColourData_new_1, 2202).
--define(wxColourData_destruct, 2203).
--define(wxColourData_GetChooseFull, 2204).
--define(wxColourData_GetColour, 2205).
--define(wxColourData_GetCustomColour, 2207).
--define(wxColourData_SetChooseFull, 2208).
--define(wxColourData_SetColour, 2209).
--define(wxColourData_SetCustomColour, 2210).
--define(wxPalette_new_0, 2211).
--define(wxPalette_new_4, 2212).
--define(wxPalette_destruct, 2214).
--define(wxPalette_Create, 2215).
--define(wxPalette_GetColoursCount, 2216).
--define(wxPalette_GetPixel, 2217).
--define(wxPalette_GetRGB, 2218).
--define(wxPalette_IsOk, 2219).
--define(wxDirDialog_new, 2223).
--define(wxDirDialog_destruct, 2224).
--define(wxDirDialog_GetPath, 2225).
--define(wxDirDialog_GetMessage, 2226).
--define(wxDirDialog_SetMessage, 2227).
--define(wxDirDialog_SetPath, 2228).
--define(wxFileDialog_new, 2232).
--define(wxFileDialog_destruct, 2233).
--define(wxFileDialog_GetDirectory, 2234).
--define(wxFileDialog_GetFilename, 2235).
--define(wxFileDialog_GetFilenames, 2236).
--define(wxFileDialog_GetFilterIndex, 2237).
--define(wxFileDialog_GetMessage, 2238).
--define(wxFileDialog_GetPath, 2239).
--define(wxFileDialog_GetPaths, 2240).
--define(wxFileDialog_GetWildcard, 2241).
--define(wxFileDialog_SetDirectory, 2242).
--define(wxFileDialog_SetFilename, 2243).
--define(wxFileDialog_SetFilterIndex, 2244).
--define(wxFileDialog_SetMessage, 2245).
--define(wxFileDialog_SetPath, 2246).
--define(wxFileDialog_SetWildcard, 2247).
--define(wxPickerBase_SetInternalMargin, 2248).
--define(wxPickerBase_GetInternalMargin, 2249).
--define(wxPickerBase_SetTextCtrlProportion, 2250).
--define(wxPickerBase_SetPickerCtrlProportion, 2251).
--define(wxPickerBase_GetTextCtrlProportion, 2252).
--define(wxPickerBase_GetPickerCtrlProportion, 2253).
--define(wxPickerBase_HasTextCtrl, 2254).
--define(wxPickerBase_GetTextCtrl, 2255).
--define(wxPickerBase_IsTextCtrlGrowable, 2256).
--define(wxPickerBase_SetPickerCtrlGrowable, 2257).
--define(wxPickerBase_SetTextCtrlGrowable, 2258).
--define(wxPickerBase_IsPickerCtrlGrowable, 2259).
--define(wxFilePickerCtrl_new_0, 2260).
--define(wxFilePickerCtrl_new_3, 2261).
--define(wxFilePickerCtrl_Create, 2262).
--define(wxFilePickerCtrl_GetPath, 2263).
--define(wxFilePickerCtrl_SetPath, 2264).
--define(wxFilePickerCtrl_destroy, 2265).
--define(wxDirPickerCtrl_new_0, 2266).
--define(wxDirPickerCtrl_new_3, 2267).
--define(wxDirPickerCtrl_Create, 2268).
--define(wxDirPickerCtrl_GetPath, 2269).
--define(wxDirPickerCtrl_SetPath, 2270).
--define(wxDirPickerCtrl_destroy, 2271).
--define(wxColourPickerCtrl_new_0, 2272).
--define(wxColourPickerCtrl_new_3, 2273).
--define(wxColourPickerCtrl_Create, 2274).
--define(wxColourPickerCtrl_GetColour, 2275).
--define(wxColourPickerCtrl_SetColour_1_1, 2276).
--define(wxColourPickerCtrl_SetColour_1_0, 2277).
--define(wxColourPickerCtrl_destroy, 2278).
--define(wxDatePickerCtrl_new_0, 2279).
--define(wxDatePickerCtrl_new_3, 2280).
--define(wxDatePickerCtrl_GetRange, 2281).
--define(wxDatePickerCtrl_GetValue, 2282).
--define(wxDatePickerCtrl_SetRange, 2283).
--define(wxDatePickerCtrl_SetValue, 2284).
--define(wxDatePickerCtrl_destroy, 2285).
--define(wxFontPickerCtrl_new_0, 2286).
--define(wxFontPickerCtrl_new_3, 2287).
--define(wxFontPickerCtrl_Create, 2288).
--define(wxFontPickerCtrl_GetSelectedFont, 2289).
--define(wxFontPickerCtrl_SetSelectedFont, 2290).
--define(wxFontPickerCtrl_GetMaxPointSize, 2291).
--define(wxFontPickerCtrl_SetMaxPointSize, 2292).
--define(wxFontPickerCtrl_destroy, 2293).
--define(wxFindReplaceDialog_new_0, 2296).
--define(wxFindReplaceDialog_new_4, 2297).
--define(wxFindReplaceDialog_destruct, 2298).
--define(wxFindReplaceDialog_Create, 2299).
--define(wxFindReplaceDialog_GetData, 2300).
--define(wxFindReplaceData_new_0, 2301).
--define(wxFindReplaceData_new_1, 2302).
--define(wxFindReplaceData_GetFindString, 2303).
--define(wxFindReplaceData_GetReplaceString, 2304).
--define(wxFindReplaceData_GetFlags, 2305).
--define(wxFindReplaceData_SetFlags, 2306).
--define(wxFindReplaceData_SetFindString, 2307).
--define(wxFindReplaceData_SetReplaceString, 2308).
--define(wxFindReplaceData_destroy, 2309).
--define(wxMultiChoiceDialog_new_0, 2310).
--define(wxMultiChoiceDialog_new_5, 2312).
--define(wxMultiChoiceDialog_GetSelections, 2313).
--define(wxMultiChoiceDialog_SetSelections, 2314).
--define(wxMultiChoiceDialog_destroy, 2315).
--define(wxSingleChoiceDialog_new_0, 2316).
--define(wxSingleChoiceDialog_new_5, 2318).
--define(wxSingleChoiceDialog_GetSelection, 2319).
--define(wxSingleChoiceDialog_GetStringSelection, 2320).
--define(wxSingleChoiceDialog_SetSelection, 2321).
--define(wxSingleChoiceDialog_destroy, 2322).
--define(wxTextEntryDialog_new, 2323).
--define(wxTextEntryDialog_GetValue, 2324).
--define(wxTextEntryDialog_SetValue, 2325).
--define(wxTextEntryDialog_destroy, 2326).
--define(wxPasswordEntryDialog_new, 2327).
--define(wxPasswordEntryDialog_destroy, 2328).
--define(wxFontData_new_0, 2329).
--define(wxFontData_new_1, 2330).
--define(wxFontData_destruct, 2331).
--define(wxFontData_EnableEffects, 2332).
--define(wxFontData_GetAllowSymbols, 2333).
--define(wxFontData_GetColour, 2334).
--define(wxFontData_GetChosenFont, 2335).
--define(wxFontData_GetEnableEffects, 2336).
--define(wxFontData_GetInitialFont, 2337).
--define(wxFontData_GetShowHelp, 2338).
--define(wxFontData_SetAllowSymbols, 2339).
--define(wxFontData_SetChosenFont, 2340).
--define(wxFontData_SetColour, 2341).
--define(wxFontData_SetInitialFont, 2342).
--define(wxFontData_SetRange, 2343).
--define(wxFontData_SetShowHelp, 2344).
--define(wxFontDialog_new_0, 2348).
--define(wxFontDialog_new_2, 2350).
--define(wxFontDialog_Create, 2352).
--define(wxFontDialog_GetFontData, 2353).
--define(wxFontDialog_destroy, 2355).
--define(wxProgressDialog_new, 2356).
--define(wxProgressDialog_destruct, 2357).
--define(wxProgressDialog_Resume, 2358).
--define(wxProgressDialog_Update_2, 2359).
--define(wxProgressDialog_Update_0, 2360).
--define(wxMessageDialog_new, 2361).
--define(wxMessageDialog_destruct, 2362).
--define(wxPageSetupDialog_new, 2363).
--define(wxPageSetupDialog_destruct, 2364).
--define(wxPageSetupDialog_GetPageSetupData, 2365).
--define(wxPageSetupDialog_ShowModal, 2366).
--define(wxPageSetupDialogData_new_0, 2367).
--define(wxPageSetupDialogData_new_1_0, 2368).
--define(wxPageSetupDialogData_new_1_1, 2369).
--define(wxPageSetupDialogData_destruct, 2370).
--define(wxPageSetupDialogData_EnableHelp, 2371).
--define(wxPageSetupDialogData_EnableMargins, 2372).
--define(wxPageSetupDialogData_EnableOrientation, 2373).
--define(wxPageSetupDialogData_EnablePaper, 2374).
--define(wxPageSetupDialogData_EnablePrinter, 2375).
--define(wxPageSetupDialogData_GetDefaultMinMargins, 2376).
--define(wxPageSetupDialogData_GetEnableMargins, 2377).
--define(wxPageSetupDialogData_GetEnableOrientation, 2378).
--define(wxPageSetupDialogData_GetEnablePaper, 2379).
--define(wxPageSetupDialogData_GetEnablePrinter, 2380).
--define(wxPageSetupDialogData_GetEnableHelp, 2381).
--define(wxPageSetupDialogData_GetDefaultInfo, 2382).
--define(wxPageSetupDialogData_GetMarginTopLeft, 2383).
--define(wxPageSetupDialogData_GetMarginBottomRight, 2384).
--define(wxPageSetupDialogData_GetMinMarginTopLeft, 2385).
--define(wxPageSetupDialogData_GetMinMarginBottomRight, 2386).
--define(wxPageSetupDialogData_GetPaperId, 2387).
--define(wxPageSetupDialogData_GetPaperSize, 2388).
--define(wxPageSetupDialogData_GetPrintData, 2390).
--define(wxPageSetupDialogData_IsOk, 2391).
--define(wxPageSetupDialogData_SetDefaultInfo, 2392).
--define(wxPageSetupDialogData_SetDefaultMinMargins, 2393).
--define(wxPageSetupDialogData_SetMarginTopLeft, 2394).
--define(wxPageSetupDialogData_SetMarginBottomRight, 2395).
--define(wxPageSetupDialogData_SetMinMarginTopLeft, 2396).
--define(wxPageSetupDialogData_SetMinMarginBottomRight, 2397).
--define(wxPageSetupDialogData_SetPaperId, 2398).
--define(wxPageSetupDialogData_SetPaperSize_1_1, 2399).
--define(wxPageSetupDialogData_SetPaperSize_1_0, 2400).
--define(wxPageSetupDialogData_SetPrintData, 2401).
--define(wxPrintDialog_new_2_0, 2402).
--define(wxPrintDialog_new_2_1, 2403).
--define(wxPrintDialog_destruct, 2404).
--define(wxPrintDialog_GetPrintDialogData, 2405).
--define(wxPrintDialog_GetPrintDC, 2406).
--define(wxPrintDialogData_new_0, 2407).
--define(wxPrintDialogData_new_1_1, 2408).
--define(wxPrintDialogData_new_1_0, 2409).
--define(wxPrintDialogData_destruct, 2410).
--define(wxPrintDialogData_EnableHelp, 2411).
--define(wxPrintDialogData_EnablePageNumbers, 2412).
--define(wxPrintDialogData_EnablePrintToFile, 2413).
--define(wxPrintDialogData_EnableSelection, 2414).
--define(wxPrintDialogData_GetAllPages, 2415).
--define(wxPrintDialogData_GetCollate, 2416).
--define(wxPrintDialogData_GetFromPage, 2417).
--define(wxPrintDialogData_GetMaxPage, 2418).
--define(wxPrintDialogData_GetMinPage, 2419).
--define(wxPrintDialogData_GetNoCopies, 2420).
--define(wxPrintDialogData_GetPrintData, 2421).
--define(wxPrintDialogData_GetPrintToFile, 2422).
--define(wxPrintDialogData_GetSelection, 2423).
--define(wxPrintDialogData_GetToPage, 2424).
--define(wxPrintDialogData_IsOk, 2425).
--define(wxPrintDialogData_SetCollate, 2426).
--define(wxPrintDialogData_SetFromPage, 2427).
--define(wxPrintDialogData_SetMaxPage, 2428).
--define(wxPrintDialogData_SetMinPage, 2429).
--define(wxPrintDialogData_SetNoCopies, 2430).
--define(wxPrintDialogData_SetPrintData, 2431).
--define(wxPrintDialogData_SetPrintToFile, 2432).
--define(wxPrintDialogData_SetSelection, 2433).
--define(wxPrintDialogData_SetToPage, 2434).
--define(wxPrintData_new_0, 2435).
--define(wxPrintData_new_1, 2436).
--define(wxPrintData_destruct, 2437).
--define(wxPrintData_GetCollate, 2438).
--define(wxPrintData_GetBin, 2439).
--define(wxPrintData_GetColour, 2440).
--define(wxPrintData_GetDuplex, 2441).
--define(wxPrintData_GetNoCopies, 2442).
--define(wxPrintData_GetOrientation, 2443).
--define(wxPrintData_GetPaperId, 2444).
--define(wxPrintData_GetPrinterName, 2445).
--define(wxPrintData_GetQuality, 2446).
--define(wxPrintData_IsOk, 2447).
--define(wxPrintData_SetBin, 2448).
--define(wxPrintData_SetCollate, 2449).
--define(wxPrintData_SetColour, 2450).
--define(wxPrintData_SetDuplex, 2451).
--define(wxPrintData_SetNoCopies, 2452).
--define(wxPrintData_SetOrientation, 2453).
--define(wxPrintData_SetPaperId, 2454).
--define(wxPrintData_SetPrinterName, 2455).
--define(wxPrintData_SetQuality, 2456).
--define(wxPrintPreview_new_2, 2459).
--define(wxPrintPreview_new_3, 2460).
--define(wxPrintPreview_destruct, 2462).
--define(wxPrintPreview_GetCanvas, 2463).
--define(wxPrintPreview_GetCurrentPage, 2464).
--define(wxPrintPreview_GetFrame, 2465).
--define(wxPrintPreview_GetMaxPage, 2466).
--define(wxPrintPreview_GetMinPage, 2467).
--define(wxPrintPreview_GetPrintout, 2468).
--define(wxPrintPreview_GetPrintoutForPrinting, 2469).
--define(wxPrintPreview_IsOk, 2470).
--define(wxPrintPreview_PaintPage, 2471).
--define(wxPrintPreview_Print, 2472).
--define(wxPrintPreview_RenderPage, 2473).
--define(wxPrintPreview_SetCanvas, 2474).
--define(wxPrintPreview_SetCurrentPage, 2475).
--define(wxPrintPreview_SetFrame, 2476).
--define(wxPrintPreview_SetPrintout, 2477).
--define(wxPrintPreview_SetZoom, 2478).
--define(wxPreviewFrame_new, 2479).
--define(wxPreviewFrame_destruct, 2480).
--define(wxPreviewFrame_CreateControlBar, 2481).
--define(wxPreviewFrame_CreateCanvas, 2482).
--define(wxPreviewFrame_Initialize, 2483).
--define(wxPreviewFrame_OnCloseWindow, 2484).
--define(wxPreviewControlBar_new, 2485).
--define(wxPreviewControlBar_destruct, 2486).
--define(wxPreviewControlBar_CreateButtons, 2487).
--define(wxPreviewControlBar_GetPrintPreview, 2488).
--define(wxPreviewControlBar_GetZoomControl, 2489).
--define(wxPreviewControlBar_SetZoomControl, 2490).
--define(wxPrinter_new, 2492).
--define(wxPrinter_CreateAbortWindow, 2493).
--define(wxPrinter_GetAbort, 2494).
--define(wxPrinter_GetLastError, 2495).
--define(wxPrinter_GetPrintDialogData, 2496).
--define(wxPrinter_Print, 2497).
--define(wxPrinter_PrintDialog, 2498).
--define(wxPrinter_ReportError, 2499).
--define(wxPrinter_Setup, 2500).
--define(wxPrinter_destroy, 2501).
--define(wxXmlResource_new_1, 2502).
--define(wxXmlResource_new_2, 2503).
--define(wxXmlResource_destruct, 2504).
--define(wxXmlResource_AttachUnknownControl, 2505).
--define(wxXmlResource_ClearHandlers, 2506).
--define(wxXmlResource_CompareVersion, 2507).
--define(wxXmlResource_Get, 2508).
--define(wxXmlResource_GetFlags, 2509).
--define(wxXmlResource_GetVersion, 2510).
--define(wxXmlResource_GetXRCID, 2511).
--define(wxXmlResource_InitAllHandlers, 2512).
--define(wxXmlResource_Load, 2513).
--define(wxXmlResource_LoadBitmap, 2514).
--define(wxXmlResource_LoadDialog_2, 2515).
--define(wxXmlResource_LoadDialog_3, 2516).
--define(wxXmlResource_LoadFrame_2, 2517).
--define(wxXmlResource_LoadFrame_3, 2518).
--define(wxXmlResource_LoadIcon, 2519).
--define(wxXmlResource_LoadMenu, 2520).
--define(wxXmlResource_LoadMenuBar_2, 2521).
--define(wxXmlResource_LoadMenuBar_1, 2522).
--define(wxXmlResource_LoadPanel_2, 2523).
--define(wxXmlResource_LoadPanel_3, 2524).
--define(wxXmlResource_LoadToolBar, 2525).
--define(wxXmlResource_Set, 2526).
--define(wxXmlResource_SetFlags, 2527).
--define(wxXmlResource_Unload, 2528).
--define(wxXmlResource_xrcctrl, 2529).
--define(wxHtmlEasyPrinting_new, 2530).
--define(wxHtmlEasyPrinting_destruct, 2531).
--define(wxHtmlEasyPrinting_GetPrintData, 2532).
--define(wxHtmlEasyPrinting_GetPageSetupData, 2533).
--define(wxHtmlEasyPrinting_PreviewFile, 2534).
--define(wxHtmlEasyPrinting_PreviewText, 2535).
--define(wxHtmlEasyPrinting_PrintFile, 2536).
--define(wxHtmlEasyPrinting_PrintText, 2537).
--define(wxHtmlEasyPrinting_PageSetup, 2538).
--define(wxHtmlEasyPrinting_SetFonts, 2539).
--define(wxHtmlEasyPrinting_SetHeader, 2540).
--define(wxHtmlEasyPrinting_SetFooter, 2541).
--define(wxGLCanvas_new_2, 2543).
--define(wxGLCanvas_new_3_1, 2544).
--define(wxGLCanvas_new_3_0, 2545).
--define(wxGLCanvas_GetContext, 2546).
--define(wxGLCanvas_SetCurrent, 2548).
--define(wxGLCanvas_SwapBuffers, 2549).
--define(wxGLCanvas_destroy, 2550).
--define(wxAuiManager_new, 2551).
--define(wxAuiManager_destruct, 2552).
--define(wxAuiManager_AddPane_2_1, 2553).
--define(wxAuiManager_AddPane_3, 2554).
--define(wxAuiManager_AddPane_2_0, 2555).
--define(wxAuiManager_DetachPane, 2556).
--define(wxAuiManager_GetAllPanes, 2557).
--define(wxAuiManager_GetArtProvider, 2558).
--define(wxAuiManager_GetDockSizeConstraint, 2559).
--define(wxAuiManager_GetFlags, 2560).
--define(wxAuiManager_GetManagedWindow, 2561).
--define(wxAuiManager_GetManager, 2562).
--define(wxAuiManager_GetPane_1_1, 2563).
--define(wxAuiManager_GetPane_1_0, 2564).
--define(wxAuiManager_HideHint, 2565).
--define(wxAuiManager_InsertPane, 2566).
--define(wxAuiManager_LoadPaneInfo, 2567).
--define(wxAuiManager_LoadPerspective, 2568).
--define(wxAuiManager_SavePaneInfo, 2569).
--define(wxAuiManager_SavePerspective, 2570).
--define(wxAuiManager_SetArtProvider, 2571).
--define(wxAuiManager_SetDockSizeConstraint, 2572).
--define(wxAuiManager_SetFlags, 2573).
--define(wxAuiManager_SetManagedWindow, 2574).
--define(wxAuiManager_ShowHint, 2575).
--define(wxAuiManager_UnInit, 2576).
--define(wxAuiManager_Update, 2577).
--define(wxAuiPaneInfo_new_0, 2578).
--define(wxAuiPaneInfo_new_1, 2579).
--define(wxAuiPaneInfo_destruct, 2580).
--define(wxAuiPaneInfo_BestSize_1, 2581).
--define(wxAuiPaneInfo_BestSize_2, 2582).
--define(wxAuiPaneInfo_Bottom, 2583).
--define(wxAuiPaneInfo_BottomDockable, 2584).
--define(wxAuiPaneInfo_Caption, 2585).
--define(wxAuiPaneInfo_CaptionVisible, 2586).
--define(wxAuiPaneInfo_Centre, 2587).
--define(wxAuiPaneInfo_CentrePane, 2588).
--define(wxAuiPaneInfo_CloseButton, 2589).
--define(wxAuiPaneInfo_DefaultPane, 2590).
--define(wxAuiPaneInfo_DestroyOnClose, 2591).
--define(wxAuiPaneInfo_Direction, 2592).
--define(wxAuiPaneInfo_Dock, 2593).
--define(wxAuiPaneInfo_Dockable, 2594).
--define(wxAuiPaneInfo_Fixed, 2595).
--define(wxAuiPaneInfo_Float, 2596).
--define(wxAuiPaneInfo_Floatable, 2597).
--define(wxAuiPaneInfo_FloatingPosition_1, 2598).
--define(wxAuiPaneInfo_FloatingPosition_2, 2599).
--define(wxAuiPaneInfo_FloatingSize_1, 2600).
--define(wxAuiPaneInfo_FloatingSize_2, 2601).
--define(wxAuiPaneInfo_Gripper, 2602).
--define(wxAuiPaneInfo_GripperTop, 2603).
--define(wxAuiPaneInfo_HasBorder, 2604).
--define(wxAuiPaneInfo_HasCaption, 2605).
--define(wxAuiPaneInfo_HasCloseButton, 2606).
--define(wxAuiPaneInfo_HasFlag, 2607).
--define(wxAuiPaneInfo_HasGripper, 2608).
--define(wxAuiPaneInfo_HasGripperTop, 2609).
--define(wxAuiPaneInfo_HasMaximizeButton, 2610).
--define(wxAuiPaneInfo_HasMinimizeButton, 2611).
--define(wxAuiPaneInfo_HasPinButton, 2612).
--define(wxAuiPaneInfo_Hide, 2613).
--define(wxAuiPaneInfo_IsBottomDockable, 2614).
--define(wxAuiPaneInfo_IsDocked, 2615).
--define(wxAuiPaneInfo_IsFixed, 2616).
--define(wxAuiPaneInfo_IsFloatable, 2617).
--define(wxAuiPaneInfo_IsFloating, 2618).
--define(wxAuiPaneInfo_IsLeftDockable, 2619).
--define(wxAuiPaneInfo_IsMovable, 2620).
--define(wxAuiPaneInfo_IsOk, 2621).
--define(wxAuiPaneInfo_IsResizable, 2622).
--define(wxAuiPaneInfo_IsRightDockable, 2623).
--define(wxAuiPaneInfo_IsShown, 2624).
--define(wxAuiPaneInfo_IsToolbar, 2625).
--define(wxAuiPaneInfo_IsTopDockable, 2626).
--define(wxAuiPaneInfo_Layer, 2627).
--define(wxAuiPaneInfo_Left, 2628).
--define(wxAuiPaneInfo_LeftDockable, 2629).
--define(wxAuiPaneInfo_MaxSize_1, 2630).
--define(wxAuiPaneInfo_MaxSize_2, 2631).
--define(wxAuiPaneInfo_MaximizeButton, 2632).
--define(wxAuiPaneInfo_MinSize_1, 2633).
--define(wxAuiPaneInfo_MinSize_2, 2634).
--define(wxAuiPaneInfo_MinimizeButton, 2635).
--define(wxAuiPaneInfo_Movable, 2636).
--define(wxAuiPaneInfo_Name, 2637).
--define(wxAuiPaneInfo_PaneBorder, 2638).
--define(wxAuiPaneInfo_PinButton, 2639).
--define(wxAuiPaneInfo_Position, 2640).
--define(wxAuiPaneInfo_Resizable, 2641).
--define(wxAuiPaneInfo_Right, 2642).
--define(wxAuiPaneInfo_RightDockable, 2643).
--define(wxAuiPaneInfo_Row, 2644).
--define(wxAuiPaneInfo_SafeSet, 2645).
--define(wxAuiPaneInfo_SetFlag, 2646).
--define(wxAuiPaneInfo_Show, 2647).
--define(wxAuiPaneInfo_ToolbarPane, 2648).
--define(wxAuiPaneInfo_Top, 2649).
--define(wxAuiPaneInfo_TopDockable, 2650).
--define(wxAuiPaneInfo_Window, 2651).
--define(wxAuiNotebook_new_0, 2652).
--define(wxAuiNotebook_new_2, 2653).
--define(wxAuiNotebook_AddPage, 2654).
--define(wxAuiNotebook_Create, 2655).
--define(wxAuiNotebook_DeletePage, 2656).
--define(wxAuiNotebook_GetArtProvider, 2657).
--define(wxAuiNotebook_GetPage, 2658).
--define(wxAuiNotebook_GetPageBitmap, 2659).
--define(wxAuiNotebook_GetPageCount, 2660).
--define(wxAuiNotebook_GetPageIndex, 2661).
--define(wxAuiNotebook_GetPageText, 2662).
--define(wxAuiNotebook_GetSelection, 2663).
--define(wxAuiNotebook_InsertPage, 2664).
--define(wxAuiNotebook_RemovePage, 2665).
--define(wxAuiNotebook_SetArtProvider, 2666).
--define(wxAuiNotebook_SetFont, 2667).
--define(wxAuiNotebook_SetPageBitmap, 2668).
--define(wxAuiNotebook_SetPageText, 2669).
--define(wxAuiNotebook_SetSelection, 2670).
--define(wxAuiNotebook_SetTabCtrlHeight, 2671).
--define(wxAuiNotebook_SetUniformBitmapSize, 2672).
--define(wxAuiNotebook_destroy, 2673).
--define(wxMDIParentFrame_new_0, 2674).
--define(wxMDIParentFrame_new_4, 2675).
--define(wxMDIParentFrame_destruct, 2676).
--define(wxMDIParentFrame_ActivateNext, 2677).
--define(wxMDIParentFrame_ActivatePrevious, 2678).
--define(wxMDIParentFrame_ArrangeIcons, 2679).
--define(wxMDIParentFrame_Cascade, 2680).
--define(wxMDIParentFrame_Create, 2681).
--define(wxMDIParentFrame_GetActiveChild, 2682).
--define(wxMDIParentFrame_GetClientWindow, 2683).
--define(wxMDIParentFrame_Tile, 2684).
--define(wxMDIChildFrame_new_0, 2685).
--define(wxMDIChildFrame_new_4, 2686).
--define(wxMDIChildFrame_destruct, 2687).
--define(wxMDIChildFrame_Activate, 2688).
--define(wxMDIChildFrame_Create, 2689).
--define(wxMDIChildFrame_Maximize, 2690).
--define(wxMDIChildFrame_Restore, 2691).
--define(wxMDIClientWindow_new_0, 2692).
--define(wxMDIClientWindow_new_2, 2693).
--define(wxMDIClientWindow_destruct, 2694).
--define(wxMDIClientWindow_CreateClient, 2695).
--define(wxLayoutAlgorithm_new, 2696).
--define(wxLayoutAlgorithm_LayoutFrame, 2697).
--define(wxLayoutAlgorithm_LayoutMDIFrame, 2698).
--define(wxLayoutAlgorithm_LayoutWindow, 2699).
--define(wxLayoutAlgorithm_destroy, 2700).
--define(wxEvent_GetId, 2701).
--define(wxEvent_GetSkipped, 2702).
--define(wxEvent_GetTimestamp, 2703).
--define(wxEvent_IsCommandEvent, 2704).
--define(wxEvent_ResumePropagation, 2705).
--define(wxEvent_ShouldPropagate, 2706).
--define(wxEvent_Skip, 2707).
--define(wxEvent_StopPropagation, 2708).
--define(wxCommandEvent_getClientData, 2709).
--define(wxCommandEvent_GetExtraLong, 2710).
--define(wxCommandEvent_GetInt, 2711).
--define(wxCommandEvent_GetSelection, 2712).
--define(wxCommandEvent_GetString, 2713).
--define(wxCommandEvent_IsChecked, 2714).
--define(wxCommandEvent_IsSelection, 2715).
--define(wxCommandEvent_SetInt, 2716).
--define(wxCommandEvent_SetString, 2717).
--define(wxScrollEvent_GetOrientation, 2718).
--define(wxScrollEvent_GetPosition, 2719).
--define(wxScrollWinEvent_GetOrientation, 2720).
--define(wxScrollWinEvent_GetPosition, 2721).
--define(wxMouseEvent_AltDown, 2722).
--define(wxMouseEvent_Button, 2723).
--define(wxMouseEvent_ButtonDClick, 2724).
--define(wxMouseEvent_ButtonDown, 2725).
--define(wxMouseEvent_ButtonUp, 2726).
--define(wxMouseEvent_CmdDown, 2727).
--define(wxMouseEvent_ControlDown, 2728).
--define(wxMouseEvent_Dragging, 2729).
--define(wxMouseEvent_Entering, 2730).
--define(wxMouseEvent_GetButton, 2731).
--define(wxMouseEvent_GetPosition, 2734).
--define(wxMouseEvent_GetLogicalPosition, 2735).
--define(wxMouseEvent_GetLinesPerAction, 2736).
--define(wxMouseEvent_GetWheelRotation, 2737).
--define(wxMouseEvent_GetWheelDelta, 2738).
--define(wxMouseEvent_GetX, 2739).
--define(wxMouseEvent_GetY, 2740).
--define(wxMouseEvent_IsButton, 2741).
--define(wxMouseEvent_IsPageScroll, 2742).
--define(wxMouseEvent_Leaving, 2743).
--define(wxMouseEvent_LeftDClick, 2744).
--define(wxMouseEvent_LeftDown, 2745).
--define(wxMouseEvent_LeftIsDown, 2746).
--define(wxMouseEvent_LeftUp, 2747).
--define(wxMouseEvent_MetaDown, 2748).
--define(wxMouseEvent_MiddleDClick, 2749).
--define(wxMouseEvent_MiddleDown, 2750).
--define(wxMouseEvent_MiddleIsDown, 2751).
--define(wxMouseEvent_MiddleUp, 2752).
--define(wxMouseEvent_Moving, 2753).
--define(wxMouseEvent_RightDClick, 2754).
--define(wxMouseEvent_RightDown, 2755).
--define(wxMouseEvent_RightIsDown, 2756).
--define(wxMouseEvent_RightUp, 2757).
--define(wxMouseEvent_ShiftDown, 2758).
--define(wxSetCursorEvent_GetCursor, 2759).
--define(wxSetCursorEvent_GetX, 2760).
--define(wxSetCursorEvent_GetY, 2761).
--define(wxSetCursorEvent_HasCursor, 2762).
--define(wxSetCursorEvent_SetCursor, 2763).
--define(wxKeyEvent_AltDown, 2764).
--define(wxKeyEvent_CmdDown, 2765).
--define(wxKeyEvent_ControlDown, 2766).
--define(wxKeyEvent_GetKeyCode, 2767).
--define(wxKeyEvent_GetModifiers, 2768).
--define(wxKeyEvent_GetPosition, 2771).
--define(wxKeyEvent_GetRawKeyCode, 2772).
--define(wxKeyEvent_GetRawKeyFlags, 2773).
--define(wxKeyEvent_GetUnicodeKey, 2774).
--define(wxKeyEvent_GetX, 2775).
--define(wxKeyEvent_GetY, 2776).
--define(wxKeyEvent_HasModifiers, 2777).
--define(wxKeyEvent_MetaDown, 2778).
--define(wxKeyEvent_ShiftDown, 2779).
--define(wxSizeEvent_GetSize, 2780).
--define(wxMoveEvent_GetPosition, 2781).
--define(wxEraseEvent_GetDC, 2782).
--define(wxFocusEvent_GetWindow, 2783).
--define(wxChildFocusEvent_GetWindow, 2784).
--define(wxMenuEvent_GetMenu, 2785).
--define(wxMenuEvent_GetMenuId, 2786).
--define(wxMenuEvent_IsPopup, 2787).
--define(wxCloseEvent_CanVeto, 2788).
--define(wxCloseEvent_GetLoggingOff, 2789).
--define(wxCloseEvent_SetCanVeto, 2790).
--define(wxCloseEvent_SetLoggingOff, 2791).
--define(wxCloseEvent_Veto, 2792).
--define(wxShowEvent_SetShow, 2793).
--define(wxShowEvent_GetShow, 2794).
--define(wxIconizeEvent_Iconized, 2795).
--define(wxJoystickEvent_ButtonDown, 2796).
--define(wxJoystickEvent_ButtonIsDown, 2797).
--define(wxJoystickEvent_ButtonUp, 2798).
--define(wxJoystickEvent_GetButtonChange, 2799).
--define(wxJoystickEvent_GetButtonState, 2800).
--define(wxJoystickEvent_GetJoystick, 2801).
--define(wxJoystickEvent_GetPosition, 2802).
--define(wxJoystickEvent_GetZPosition, 2803).
--define(wxJoystickEvent_IsButton, 2804).
--define(wxJoystickEvent_IsMove, 2805).
--define(wxJoystickEvent_IsZMove, 2806).
--define(wxUpdateUIEvent_CanUpdate, 2807).
--define(wxUpdateUIEvent_Check, 2808).
--define(wxUpdateUIEvent_Enable, 2809).
--define(wxUpdateUIEvent_Show, 2810).
--define(wxUpdateUIEvent_GetChecked, 2811).
--define(wxUpdateUIEvent_GetEnabled, 2812).
--define(wxUpdateUIEvent_GetShown, 2813).
--define(wxUpdateUIEvent_GetSetChecked, 2814).
--define(wxUpdateUIEvent_GetSetEnabled, 2815).
--define(wxUpdateUIEvent_GetSetShown, 2816).
--define(wxUpdateUIEvent_GetSetText, 2817).
--define(wxUpdateUIEvent_GetText, 2818).
--define(wxUpdateUIEvent_GetMode, 2819).
--define(wxUpdateUIEvent_GetUpdateInterval, 2820).
--define(wxUpdateUIEvent_ResetUpdateTime, 2821).
--define(wxUpdateUIEvent_SetMode, 2822).
--define(wxUpdateUIEvent_SetText, 2823).
--define(wxUpdateUIEvent_SetUpdateInterval, 2824).
--define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2825).
--define(wxPaletteChangedEvent_SetChangedWindow, 2826).
--define(wxPaletteChangedEvent_GetChangedWindow, 2827).
--define(wxQueryNewPaletteEvent_SetPaletteRealized, 2828).
--define(wxQueryNewPaletteEvent_GetPaletteRealized, 2829).
--define(wxNavigationKeyEvent_GetDirection, 2830).
--define(wxNavigationKeyEvent_SetDirection, 2831).
--define(wxNavigationKeyEvent_IsWindowChange, 2832).
--define(wxNavigationKeyEvent_SetWindowChange, 2833).
--define(wxNavigationKeyEvent_IsFromTab, 2834).
--define(wxNavigationKeyEvent_SetFromTab, 2835).
--define(wxNavigationKeyEvent_GetCurrentFocus, 2836).
--define(wxNavigationKeyEvent_SetCurrentFocus, 2837).
--define(wxHelpEvent_GetOrigin, 2838).
--define(wxHelpEvent_GetPosition, 2839).
--define(wxHelpEvent_SetOrigin, 2840).
--define(wxHelpEvent_SetPosition, 2841).
--define(wxContextMenuEvent_GetPosition, 2842).
--define(wxContextMenuEvent_SetPosition, 2843).
--define(wxIdleEvent_CanSend, 2844).
--define(wxIdleEvent_GetMode, 2845).
--define(wxIdleEvent_RequestMore, 2846).
--define(wxIdleEvent_MoreRequested, 2847).
--define(wxIdleEvent_SetMode, 2848).
--define(wxGridEvent_AltDown, 2849).
--define(wxGridEvent_ControlDown, 2850).
--define(wxGridEvent_GetCol, 2851).
--define(wxGridEvent_GetPosition, 2852).
--define(wxGridEvent_GetRow, 2853).
--define(wxGridEvent_MetaDown, 2854).
--define(wxGridEvent_Selecting, 2855).
--define(wxGridEvent_ShiftDown, 2856).
--define(wxNotifyEvent_Allow, 2857).
--define(wxNotifyEvent_IsAllowed, 2858).
--define(wxNotifyEvent_Veto, 2859).
--define(wxSashEvent_GetEdge, 2860).
--define(wxSashEvent_GetDragRect, 2861).
--define(wxSashEvent_GetDragStatus, 2862).
--define(wxListEvent_GetCacheFrom, 2863).
--define(wxListEvent_GetCacheTo, 2864).
--define(wxListEvent_GetKeyCode, 2865).
--define(wxListEvent_GetIndex, 2866).
--define(wxListEvent_GetColumn, 2867).
--define(wxListEvent_GetPoint, 2868).
--define(wxListEvent_GetLabel, 2869).
--define(wxListEvent_GetText, 2870).
--define(wxListEvent_GetImage, 2871).
--define(wxListEvent_GetData, 2872).
--define(wxListEvent_GetMask, 2873).
--define(wxListEvent_GetItem, 2874).
--define(wxListEvent_IsEditCancelled, 2875).
--define(wxDateEvent_GetDate, 2876).
--define(wxCalendarEvent_GetWeekDay, 2877).
--define(wxFileDirPickerEvent_GetPath, 2878).
--define(wxColourPickerEvent_GetColour, 2879).
--define(wxFontPickerEvent_GetFont, 2880).
--define(wxStyledTextEvent_GetPosition, 2881).
--define(wxStyledTextEvent_GetKey, 2882).
--define(wxStyledTextEvent_GetModifiers, 2883).
--define(wxStyledTextEvent_GetModificationType, 2884).
--define(wxStyledTextEvent_GetText, 2885).
--define(wxStyledTextEvent_GetLength, 2886).
--define(wxStyledTextEvent_GetLinesAdded, 2887).
--define(wxStyledTextEvent_GetLine, 2888).
--define(wxStyledTextEvent_GetFoldLevelNow, 2889).
--define(wxStyledTextEvent_GetFoldLevelPrev, 2890).
--define(wxStyledTextEvent_GetMargin, 2891).
--define(wxStyledTextEvent_GetMessage, 2892).
--define(wxStyledTextEvent_GetWParam, 2893).
--define(wxStyledTextEvent_GetLParam, 2894).
--define(wxStyledTextEvent_GetListType, 2895).
--define(wxStyledTextEvent_GetX, 2896).
--define(wxStyledTextEvent_GetY, 2897).
--define(wxStyledTextEvent_GetDragText, 2898).
--define(wxStyledTextEvent_GetDragAllowMove, 2899).
--define(wxStyledTextEvent_GetDragResult, 2900).
--define(wxStyledTextEvent_GetShift, 2901).
--define(wxStyledTextEvent_GetControl, 2902).
--define(wxStyledTextEvent_GetAlt, 2903).
--define(utils_wxGetKeyState, 2904).
--define(utils_wxGetMousePosition, 2905).
--define(utils_wxGetMouseState, 2906).
--define(utils_wxSetDetectableAutoRepeat, 2907).
--define(utils_wxBell, 2908).
--define(utils_wxFindMenuItemId, 2909).
--define(utils_wxGenericFindWindowAtPoint, 2910).
--define(utils_wxFindWindowAtPoint, 2911).
--define(utils_wxBeginBusyCursor, 2912).
--define(utils_wxEndBusyCursor, 2913).
--define(utils_wxIsBusy, 2914).
--define(utils_wxShutdown, 2915).
--define(utils_wxShell, 2916).
--define(utils_wxLaunchDefaultBrowser, 2917).
--define(utils_wxGetEmailAddress, 2918).
--define(utils_wxGetUserId, 2919).
--define(utils_wxGetHomeDir, 2920).
--define(utils_wxNewId, 2921).
--define(utils_wxRegisterId, 2922).
--define(utils_wxGetCurrentId, 2923).
--define(utils_wxGetOsDescription, 2924).
--define(utils_wxIsPlatformLittleEndian, 2925).
--define(utils_wxIsPlatform64Bit, 2926).
--define(wxPrintout_new, 2927).
--define(wxPrintout_destruct, 2928).
--define(wxPrintout_GetDC, 2929).
--define(wxPrintout_GetPageSizeMM, 2930).
--define(wxPrintout_GetPageSizePixels, 2931).
--define(wxPrintout_GetPaperRectPixels, 2932).
--define(wxPrintout_GetPPIPrinter, 2933).
--define(wxPrintout_GetPPIScreen, 2934).
--define(wxPrintout_GetTitle, 2935).
--define(wxPrintout_IsPreview, 2936).
--define(wxPrintout_FitThisSizeToPaper, 2937).
--define(wxPrintout_FitThisSizeToPage, 2938).
--define(wxPrintout_FitThisSizeToPageMargins, 2939).
--define(wxPrintout_MapScreenSizeToPaper, 2940).
--define(wxPrintout_MapScreenSizeToPage, 2941).
--define(wxPrintout_MapScreenSizeToPageMargins, 2942).
--define(wxPrintout_MapScreenSizeToDevice, 2943).
--define(wxPrintout_GetLogicalPaperRect, 2944).
--define(wxPrintout_GetLogicalPageRect, 2945).
--define(wxPrintout_GetLogicalPageMarginsRect, 2946).
--define(wxPrintout_SetLogicalOrigin, 2947).
--define(wxPrintout_OffsetLogicalOrigin, 2948).
--define(wxStyledTextCtrl_new_2, 2949).
--define(wxStyledTextCtrl_new_0, 2950).
--define(wxStyledTextCtrl_destruct, 2951).
--define(wxStyledTextCtrl_Create, 2952).
--define(wxStyledTextCtrl_AddText, 2953).
--define(wxStyledTextCtrl_AddStyledText, 2954).
--define(wxStyledTextCtrl_InsertText, 2955).
--define(wxStyledTextCtrl_ClearAll, 2956).
--define(wxStyledTextCtrl_ClearDocumentStyle, 2957).
--define(wxStyledTextCtrl_GetLength, 2958).
--define(wxStyledTextCtrl_GetCharAt, 2959).
--define(wxStyledTextCtrl_GetCurrentPos, 2960).
--define(wxStyledTextCtrl_GetAnchor, 2961).
--define(wxStyledTextCtrl_GetStyleAt, 2962).
--define(wxStyledTextCtrl_Redo, 2963).
--define(wxStyledTextCtrl_SetUndoCollection, 2964).
--define(wxStyledTextCtrl_SelectAll, 2965).
--define(wxStyledTextCtrl_SetSavePoint, 2966).
--define(wxStyledTextCtrl_GetStyledText, 2967).
--define(wxStyledTextCtrl_CanRedo, 2968).
--define(wxStyledTextCtrl_MarkerLineFromHandle, 2969).
--define(wxStyledTextCtrl_MarkerDeleteHandle, 2970).
--define(wxStyledTextCtrl_GetUndoCollection, 2971).
--define(wxStyledTextCtrl_GetViewWhiteSpace, 2972).
--define(wxStyledTextCtrl_SetViewWhiteSpace, 2973).
--define(wxStyledTextCtrl_PositionFromPoint, 2974).
--define(wxStyledTextCtrl_PositionFromPointClose, 2975).
--define(wxStyledTextCtrl_GotoLine, 2976).
--define(wxStyledTextCtrl_GotoPos, 2977).
--define(wxStyledTextCtrl_SetAnchor, 2978).
--define(wxStyledTextCtrl_GetCurLine, 2979).
--define(wxStyledTextCtrl_GetEndStyled, 2980).
--define(wxStyledTextCtrl_ConvertEOLs, 2981).
--define(wxStyledTextCtrl_GetEOLMode, 2982).
--define(wxStyledTextCtrl_SetEOLMode, 2983).
--define(wxStyledTextCtrl_StartStyling, 2984).
--define(wxStyledTextCtrl_SetStyling, 2985).
--define(wxStyledTextCtrl_GetBufferedDraw, 2986).
--define(wxStyledTextCtrl_SetBufferedDraw, 2987).
--define(wxStyledTextCtrl_SetTabWidth, 2988).
--define(wxStyledTextCtrl_GetTabWidth, 2989).
--define(wxStyledTextCtrl_SetCodePage, 2990).
--define(wxStyledTextCtrl_MarkerDefine, 2991).
--define(wxStyledTextCtrl_MarkerSetForeground, 2992).
--define(wxStyledTextCtrl_MarkerSetBackground, 2993).
--define(wxStyledTextCtrl_MarkerAdd, 2994).
--define(wxStyledTextCtrl_MarkerDelete, 2995).
--define(wxStyledTextCtrl_MarkerDeleteAll, 2996).
--define(wxStyledTextCtrl_MarkerGet, 2997).
--define(wxStyledTextCtrl_MarkerNext, 2998).
--define(wxStyledTextCtrl_MarkerPrevious, 2999).
--define(wxStyledTextCtrl_MarkerDefineBitmap, 3000).
--define(wxStyledTextCtrl_MarkerAddSet, 3001).
--define(wxStyledTextCtrl_MarkerSetAlpha, 3002).
--define(wxStyledTextCtrl_SetMarginType, 3003).
--define(wxStyledTextCtrl_GetMarginType, 3004).
--define(wxStyledTextCtrl_SetMarginWidth, 3005).
--define(wxStyledTextCtrl_GetMarginWidth, 3006).
--define(wxStyledTextCtrl_SetMarginMask, 3007).
--define(wxStyledTextCtrl_GetMarginMask, 3008).
--define(wxStyledTextCtrl_SetMarginSensitive, 3009).
--define(wxStyledTextCtrl_GetMarginSensitive, 3010).
--define(wxStyledTextCtrl_StyleClearAll, 3011).
--define(wxStyledTextCtrl_StyleSetForeground, 3012).
--define(wxStyledTextCtrl_StyleSetBackground, 3013).
--define(wxStyledTextCtrl_StyleSetBold, 3014).
--define(wxStyledTextCtrl_StyleSetItalic, 3015).
--define(wxStyledTextCtrl_StyleSetSize, 3016).
--define(wxStyledTextCtrl_StyleSetFaceName, 3017).
--define(wxStyledTextCtrl_StyleSetEOLFilled, 3018).
--define(wxStyledTextCtrl_StyleResetDefault, 3019).
--define(wxStyledTextCtrl_StyleSetUnderline, 3020).
--define(wxStyledTextCtrl_StyleSetCase, 3021).
--define(wxStyledTextCtrl_StyleSetHotSpot, 3022).
--define(wxStyledTextCtrl_SetSelForeground, 3023).
--define(wxStyledTextCtrl_SetSelBackground, 3024).
--define(wxStyledTextCtrl_GetSelAlpha, 3025).
--define(wxStyledTextCtrl_SetSelAlpha, 3026).
--define(wxStyledTextCtrl_SetCaretForeground, 3027).
--define(wxStyledTextCtrl_CmdKeyAssign, 3028).
--define(wxStyledTextCtrl_CmdKeyClear, 3029).
--define(wxStyledTextCtrl_CmdKeyClearAll, 3030).
--define(wxStyledTextCtrl_SetStyleBytes, 3031).
--define(wxStyledTextCtrl_StyleSetVisible, 3032).
--define(wxStyledTextCtrl_GetCaretPeriod, 3033).
--define(wxStyledTextCtrl_SetCaretPeriod, 3034).
--define(wxStyledTextCtrl_SetWordChars, 3035).
--define(wxStyledTextCtrl_BeginUndoAction, 3036).
--define(wxStyledTextCtrl_EndUndoAction, 3037).
--define(wxStyledTextCtrl_IndicatorSetStyle, 3038).
--define(wxStyledTextCtrl_IndicatorGetStyle, 3039).
--define(wxStyledTextCtrl_IndicatorSetForeground, 3040).
--define(wxStyledTextCtrl_IndicatorGetForeground, 3041).
--define(wxStyledTextCtrl_SetWhitespaceForeground, 3042).
--define(wxStyledTextCtrl_SetWhitespaceBackground, 3043).
--define(wxStyledTextCtrl_GetStyleBits, 3044).
--define(wxStyledTextCtrl_SetLineState, 3045).
--define(wxStyledTextCtrl_GetLineState, 3046).
--define(wxStyledTextCtrl_GetMaxLineState, 3047).
--define(wxStyledTextCtrl_GetCaretLineVisible, 3048).
--define(wxStyledTextCtrl_SetCaretLineVisible, 3049).
--define(wxStyledTextCtrl_GetCaretLineBackground, 3050).
--define(wxStyledTextCtrl_SetCaretLineBackground, 3051).
--define(wxStyledTextCtrl_AutoCompShow, 3052).
--define(wxStyledTextCtrl_AutoCompCancel, 3053).
--define(wxStyledTextCtrl_AutoCompActive, 3054).
--define(wxStyledTextCtrl_AutoCompPosStart, 3055).
--define(wxStyledTextCtrl_AutoCompComplete, 3056).
--define(wxStyledTextCtrl_AutoCompStops, 3057).
--define(wxStyledTextCtrl_AutoCompSetSeparator, 3058).
--define(wxStyledTextCtrl_AutoCompGetSeparator, 3059).
--define(wxStyledTextCtrl_AutoCompSelect, 3060).
--define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3061).
--define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3062).
--define(wxStyledTextCtrl_AutoCompSetFillUps, 3063).
--define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3064).
--define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3065).
--define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3066).
--define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3067).
--define(wxStyledTextCtrl_UserListShow, 3068).
--define(wxStyledTextCtrl_AutoCompSetAutoHide, 3069).
--define(wxStyledTextCtrl_AutoCompGetAutoHide, 3070).
--define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3071).
--define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3072).
--define(wxStyledTextCtrl_RegisterImage, 3073).
--define(wxStyledTextCtrl_ClearRegisteredImages, 3074).
--define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3075).
--define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3076).
--define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3077).
--define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3078).
--define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3079).
--define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3080).
--define(wxStyledTextCtrl_SetIndent, 3081).
--define(wxStyledTextCtrl_GetIndent, 3082).
--define(wxStyledTextCtrl_SetUseTabs, 3083).
--define(wxStyledTextCtrl_GetUseTabs, 3084).
--define(wxStyledTextCtrl_SetLineIndentation, 3085).
--define(wxStyledTextCtrl_GetLineIndentation, 3086).
--define(wxStyledTextCtrl_GetLineIndentPosition, 3087).
--define(wxStyledTextCtrl_GetColumn, 3088).
--define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3089).
--define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3090).
--define(wxStyledTextCtrl_SetIndentationGuides, 3091).
--define(wxStyledTextCtrl_GetIndentationGuides, 3092).
--define(wxStyledTextCtrl_SetHighlightGuide, 3093).
--define(wxStyledTextCtrl_GetHighlightGuide, 3094).
--define(wxStyledTextCtrl_GetLineEndPosition, 3095).
--define(wxStyledTextCtrl_GetCodePage, 3096).
--define(wxStyledTextCtrl_GetCaretForeground, 3097).
--define(wxStyledTextCtrl_GetReadOnly, 3098).
--define(wxStyledTextCtrl_SetCurrentPos, 3099).
--define(wxStyledTextCtrl_SetSelectionStart, 3100).
--define(wxStyledTextCtrl_GetSelectionStart, 3101).
--define(wxStyledTextCtrl_SetSelectionEnd, 3102).
--define(wxStyledTextCtrl_GetSelectionEnd, 3103).
--define(wxStyledTextCtrl_SetPrintMagnification, 3104).
--define(wxStyledTextCtrl_GetPrintMagnification, 3105).
--define(wxStyledTextCtrl_SetPrintColourMode, 3106).
--define(wxStyledTextCtrl_GetPrintColourMode, 3107).
--define(wxStyledTextCtrl_FindText, 3108).
--define(wxStyledTextCtrl_FormatRange, 3109).
--define(wxStyledTextCtrl_GetFirstVisibleLine, 3110).
--define(wxStyledTextCtrl_GetLine, 3111).
--define(wxStyledTextCtrl_GetLineCount, 3112).
--define(wxStyledTextCtrl_SetMarginLeft, 3113).
--define(wxStyledTextCtrl_GetMarginLeft, 3114).
--define(wxStyledTextCtrl_SetMarginRight, 3115).
--define(wxStyledTextCtrl_GetMarginRight, 3116).
--define(wxStyledTextCtrl_GetModify, 3117).
--define(wxStyledTextCtrl_SetSelection, 3118).
--define(wxStyledTextCtrl_GetSelectedText, 3119).
--define(wxStyledTextCtrl_GetTextRange, 3120).
--define(wxStyledTextCtrl_HideSelection, 3121).
--define(wxStyledTextCtrl_LineFromPosition, 3122).
--define(wxStyledTextCtrl_PositionFromLine, 3123).
--define(wxStyledTextCtrl_LineScroll, 3124).
--define(wxStyledTextCtrl_EnsureCaretVisible, 3125).
--define(wxStyledTextCtrl_ReplaceSelection, 3126).
--define(wxStyledTextCtrl_SetReadOnly, 3127).
--define(wxStyledTextCtrl_CanPaste, 3128).
--define(wxStyledTextCtrl_CanUndo, 3129).
--define(wxStyledTextCtrl_EmptyUndoBuffer, 3130).
--define(wxStyledTextCtrl_Undo, 3131).
--define(wxStyledTextCtrl_Cut, 3132).
--define(wxStyledTextCtrl_Copy, 3133).
--define(wxStyledTextCtrl_Paste, 3134).
--define(wxStyledTextCtrl_Clear, 3135).
--define(wxStyledTextCtrl_SetText, 3136).
--define(wxStyledTextCtrl_GetText, 3137).
--define(wxStyledTextCtrl_GetTextLength, 3138).
--define(wxStyledTextCtrl_GetOvertype, 3139).
--define(wxStyledTextCtrl_SetCaretWidth, 3140).
--define(wxStyledTextCtrl_GetCaretWidth, 3141).
--define(wxStyledTextCtrl_SetTargetStart, 3142).
--define(wxStyledTextCtrl_GetTargetStart, 3143).
--define(wxStyledTextCtrl_SetTargetEnd, 3144).
--define(wxStyledTextCtrl_GetTargetEnd, 3145).
--define(wxStyledTextCtrl_ReplaceTarget, 3146).
--define(wxStyledTextCtrl_SearchInTarget, 3147).
--define(wxStyledTextCtrl_SetSearchFlags, 3148).
--define(wxStyledTextCtrl_GetSearchFlags, 3149).
--define(wxStyledTextCtrl_CallTipShow, 3150).
--define(wxStyledTextCtrl_CallTipCancel, 3151).
--define(wxStyledTextCtrl_CallTipActive, 3152).
--define(wxStyledTextCtrl_CallTipPosAtStart, 3153).
--define(wxStyledTextCtrl_CallTipSetHighlight, 3154).
--define(wxStyledTextCtrl_CallTipSetBackground, 3155).
--define(wxStyledTextCtrl_CallTipSetForeground, 3156).
--define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3157).
--define(wxStyledTextCtrl_CallTipUseStyle, 3158).
--define(wxStyledTextCtrl_VisibleFromDocLine, 3159).
--define(wxStyledTextCtrl_DocLineFromVisible, 3160).
--define(wxStyledTextCtrl_WrapCount, 3161).
--define(wxStyledTextCtrl_SetFoldLevel, 3162).
--define(wxStyledTextCtrl_GetFoldLevel, 3163).
--define(wxStyledTextCtrl_GetLastChild, 3164).
--define(wxStyledTextCtrl_GetFoldParent, 3165).
--define(wxStyledTextCtrl_ShowLines, 3166).
--define(wxStyledTextCtrl_HideLines, 3167).
--define(wxStyledTextCtrl_GetLineVisible, 3168).
--define(wxStyledTextCtrl_SetFoldExpanded, 3169).
--define(wxStyledTextCtrl_GetFoldExpanded, 3170).
--define(wxStyledTextCtrl_ToggleFold, 3171).
--define(wxStyledTextCtrl_EnsureVisible, 3172).
--define(wxStyledTextCtrl_SetFoldFlags, 3173).
--define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3174).
--define(wxStyledTextCtrl_SetTabIndents, 3175).
--define(wxStyledTextCtrl_GetTabIndents, 3176).
--define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3177).
--define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3178).
--define(wxStyledTextCtrl_SetMouseDwellTime, 3179).
--define(wxStyledTextCtrl_GetMouseDwellTime, 3180).
--define(wxStyledTextCtrl_WordStartPosition, 3181).
--define(wxStyledTextCtrl_WordEndPosition, 3182).
--define(wxStyledTextCtrl_SetWrapMode, 3183).
--define(wxStyledTextCtrl_GetWrapMode, 3184).
--define(wxStyledTextCtrl_SetWrapVisualFlags, 3185).
--define(wxStyledTextCtrl_GetWrapVisualFlags, 3186).
--define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3187).
--define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3188).
--define(wxStyledTextCtrl_SetWrapStartIndent, 3189).
--define(wxStyledTextCtrl_GetWrapStartIndent, 3190).
--define(wxStyledTextCtrl_SetLayoutCache, 3191).
--define(wxStyledTextCtrl_GetLayoutCache, 3192).
--define(wxStyledTextCtrl_SetScrollWidth, 3193).
--define(wxStyledTextCtrl_GetScrollWidth, 3194).
--define(wxStyledTextCtrl_TextWidth, 3195).
--define(wxStyledTextCtrl_GetEndAtLastLine, 3196).
--define(wxStyledTextCtrl_TextHeight, 3197).
--define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3198).
--define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3199).
--define(wxStyledTextCtrl_AppendText, 3200).
--define(wxStyledTextCtrl_GetTwoPhaseDraw, 3201).
--define(wxStyledTextCtrl_SetTwoPhaseDraw, 3202).
--define(wxStyledTextCtrl_TargetFromSelection, 3203).
--define(wxStyledTextCtrl_LinesJoin, 3204).
--define(wxStyledTextCtrl_LinesSplit, 3205).
--define(wxStyledTextCtrl_SetFoldMarginColour, 3206).
--define(wxStyledTextCtrl_SetFoldMarginHiColour, 3207).
--define(wxStyledTextCtrl_LineDown, 3208).
--define(wxStyledTextCtrl_LineDownExtend, 3209).
--define(wxStyledTextCtrl_LineUp, 3210).
--define(wxStyledTextCtrl_LineUpExtend, 3211).
--define(wxStyledTextCtrl_CharLeft, 3212).
--define(wxStyledTextCtrl_CharLeftExtend, 3213).
--define(wxStyledTextCtrl_CharRight, 3214).
--define(wxStyledTextCtrl_CharRightExtend, 3215).
--define(wxStyledTextCtrl_WordLeft, 3216).
--define(wxStyledTextCtrl_WordLeftExtend, 3217).
--define(wxStyledTextCtrl_WordRight, 3218).
--define(wxStyledTextCtrl_WordRightExtend, 3219).
--define(wxStyledTextCtrl_Home, 3220).
--define(wxStyledTextCtrl_HomeExtend, 3221).
--define(wxStyledTextCtrl_LineEnd, 3222).
--define(wxStyledTextCtrl_LineEndExtend, 3223).
--define(wxStyledTextCtrl_DocumentStart, 3224).
--define(wxStyledTextCtrl_DocumentStartExtend, 3225).
--define(wxStyledTextCtrl_DocumentEnd, 3226).
--define(wxStyledTextCtrl_DocumentEndExtend, 3227).
--define(wxStyledTextCtrl_PageUp, 3228).
--define(wxStyledTextCtrl_PageUpExtend, 3229).
--define(wxStyledTextCtrl_PageDown, 3230).
--define(wxStyledTextCtrl_PageDownExtend, 3231).
--define(wxStyledTextCtrl_EditToggleOvertype, 3232).
--define(wxStyledTextCtrl_Cancel, 3233).
--define(wxStyledTextCtrl_DeleteBack, 3234).
--define(wxStyledTextCtrl_Tab, 3235).
--define(wxStyledTextCtrl_BackTab, 3236).
--define(wxStyledTextCtrl_NewLine, 3237).
--define(wxStyledTextCtrl_FormFeed, 3238).
--define(wxStyledTextCtrl_VCHome, 3239).
--define(wxStyledTextCtrl_VCHomeExtend, 3240).
--define(wxStyledTextCtrl_ZoomIn, 3241).
--define(wxStyledTextCtrl_ZoomOut, 3242).
--define(wxStyledTextCtrl_DelWordLeft, 3243).
--define(wxStyledTextCtrl_DelWordRight, 3244).
--define(wxStyledTextCtrl_LineCut, 3245).
--define(wxStyledTextCtrl_LineDelete, 3246).
--define(wxStyledTextCtrl_LineTranspose, 3247).
--define(wxStyledTextCtrl_LineDuplicate, 3248).
--define(wxStyledTextCtrl_LowerCase, 3249).
--define(wxStyledTextCtrl_UpperCase, 3250).
--define(wxStyledTextCtrl_LineScrollDown, 3251).
--define(wxStyledTextCtrl_LineScrollUp, 3252).
--define(wxStyledTextCtrl_DeleteBackNotLine, 3253).
--define(wxStyledTextCtrl_HomeDisplay, 3254).
--define(wxStyledTextCtrl_HomeDisplayExtend, 3255).
--define(wxStyledTextCtrl_LineEndDisplay, 3256).
--define(wxStyledTextCtrl_LineEndDisplayExtend, 3257).
--define(wxStyledTextCtrl_HomeWrapExtend, 3258).
--define(wxStyledTextCtrl_LineEndWrap, 3259).
--define(wxStyledTextCtrl_LineEndWrapExtend, 3260).
--define(wxStyledTextCtrl_VCHomeWrap, 3261).
--define(wxStyledTextCtrl_VCHomeWrapExtend, 3262).
--define(wxStyledTextCtrl_LineCopy, 3263).
--define(wxStyledTextCtrl_MoveCaretInsideView, 3264).
--define(wxStyledTextCtrl_LineLength, 3265).
--define(wxStyledTextCtrl_BraceHighlight, 3266).
--define(wxStyledTextCtrl_BraceBadLight, 3267).
--define(wxStyledTextCtrl_BraceMatch, 3268).
--define(wxStyledTextCtrl_GetViewEOL, 3269).
--define(wxStyledTextCtrl_SetViewEOL, 3270).
--define(wxStyledTextCtrl_SetModEventMask, 3271).
--define(wxStyledTextCtrl_GetEdgeColumn, 3272).
--define(wxStyledTextCtrl_SetEdgeColumn, 3273).
--define(wxStyledTextCtrl_SetEdgeMode, 3274).
--define(wxStyledTextCtrl_GetEdgeMode, 3275).
--define(wxStyledTextCtrl_GetEdgeColour, 3276).
--define(wxStyledTextCtrl_SetEdgeColour, 3277).
--define(wxStyledTextCtrl_SearchAnchor, 3278).
--define(wxStyledTextCtrl_SearchNext, 3279).
--define(wxStyledTextCtrl_SearchPrev, 3280).
--define(wxStyledTextCtrl_LinesOnScreen, 3281).
--define(wxStyledTextCtrl_UsePopUp, 3282).
--define(wxStyledTextCtrl_SelectionIsRectangle, 3283).
--define(wxStyledTextCtrl_SetZoom, 3284).
--define(wxStyledTextCtrl_GetZoom, 3285).
--define(wxStyledTextCtrl_GetModEventMask, 3286).
--define(wxStyledTextCtrl_SetSTCFocus, 3287).
--define(wxStyledTextCtrl_GetSTCFocus, 3288).
--define(wxStyledTextCtrl_SetStatus, 3289).
--define(wxStyledTextCtrl_GetStatus, 3290).
--define(wxStyledTextCtrl_SetMouseDownCaptures, 3291).
--define(wxStyledTextCtrl_GetMouseDownCaptures, 3292).
--define(wxStyledTextCtrl_SetSTCCursor, 3293).
--define(wxStyledTextCtrl_GetSTCCursor, 3294).
--define(wxStyledTextCtrl_SetControlCharSymbol, 3295).
--define(wxStyledTextCtrl_GetControlCharSymbol, 3296).
--define(wxStyledTextCtrl_WordPartLeft, 3297).
--define(wxStyledTextCtrl_WordPartLeftExtend, 3298).
--define(wxStyledTextCtrl_WordPartRight, 3299).
--define(wxStyledTextCtrl_WordPartRightExtend, 3300).
--define(wxStyledTextCtrl_SetVisiblePolicy, 3301).
--define(wxStyledTextCtrl_DelLineLeft, 3302).
--define(wxStyledTextCtrl_DelLineRight, 3303).
--define(wxStyledTextCtrl_GetXOffset, 3304).
--define(wxStyledTextCtrl_ChooseCaretX, 3305).
--define(wxStyledTextCtrl_SetXCaretPolicy, 3306).
--define(wxStyledTextCtrl_SetYCaretPolicy, 3307).
--define(wxStyledTextCtrl_GetPrintWrapMode, 3308).
--define(wxStyledTextCtrl_SetHotspotActiveForeground, 3309).
--define(wxStyledTextCtrl_SetHotspotActiveBackground, 3310).
--define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3311).
--define(wxStyledTextCtrl_SetHotspotSingleLine, 3312).
--define(wxStyledTextCtrl_ParaDownExtend, 3313).
--define(wxStyledTextCtrl_ParaUp, 3314).
--define(wxStyledTextCtrl_ParaUpExtend, 3315).
--define(wxStyledTextCtrl_PositionBefore, 3316).
--define(wxStyledTextCtrl_PositionAfter, 3317).
--define(wxStyledTextCtrl_CopyRange, 3318).
--define(wxStyledTextCtrl_CopyText, 3319).
--define(wxStyledTextCtrl_SetSelectionMode, 3320).
--define(wxStyledTextCtrl_GetSelectionMode, 3321).
--define(wxStyledTextCtrl_LineDownRectExtend, 3322).
--define(wxStyledTextCtrl_LineUpRectExtend, 3323).
--define(wxStyledTextCtrl_CharLeftRectExtend, 3324).
--define(wxStyledTextCtrl_CharRightRectExtend, 3325).
--define(wxStyledTextCtrl_HomeRectExtend, 3326).
--define(wxStyledTextCtrl_VCHomeRectExtend, 3327).
--define(wxStyledTextCtrl_LineEndRectExtend, 3328).
--define(wxStyledTextCtrl_PageUpRectExtend, 3329).
--define(wxStyledTextCtrl_PageDownRectExtend, 3330).
--define(wxStyledTextCtrl_StutteredPageUp, 3331).
--define(wxStyledTextCtrl_StutteredPageUpExtend, 3332).
--define(wxStyledTextCtrl_StutteredPageDown, 3333).
--define(wxStyledTextCtrl_StutteredPageDownExtend, 3334).
--define(wxStyledTextCtrl_WordLeftEnd, 3335).
--define(wxStyledTextCtrl_WordLeftEndExtend, 3336).
--define(wxStyledTextCtrl_WordRightEnd, 3337).
--define(wxStyledTextCtrl_WordRightEndExtend, 3338).
--define(wxStyledTextCtrl_SetWhitespaceChars, 3339).
--define(wxStyledTextCtrl_SetCharsDefault, 3340).
--define(wxStyledTextCtrl_AutoCompGetCurrent, 3341).
--define(wxStyledTextCtrl_Allocate, 3342).
--define(wxStyledTextCtrl_FindColumn, 3343).
--define(wxStyledTextCtrl_GetCaretSticky, 3344).
--define(wxStyledTextCtrl_SetCaretSticky, 3345).
--define(wxStyledTextCtrl_ToggleCaretSticky, 3346).
--define(wxStyledTextCtrl_SetPasteConvertEndings, 3347).
--define(wxStyledTextCtrl_GetPasteConvertEndings, 3348).
--define(wxStyledTextCtrl_SelectionDuplicate, 3349).
--define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3350).
--define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3351).
--define(wxStyledTextCtrl_StartRecord, 3352).
--define(wxStyledTextCtrl_StopRecord, 3353).
--define(wxStyledTextCtrl_SetLexer, 3354).
--define(wxStyledTextCtrl_GetLexer, 3355).
--define(wxStyledTextCtrl_Colourise, 3356).
--define(wxStyledTextCtrl_SetProperty, 3357).
--define(wxStyledTextCtrl_SetKeyWords, 3358).
--define(wxStyledTextCtrl_SetLexerLanguage, 3359).
--define(wxStyledTextCtrl_GetProperty, 3360).
--define(wxStyledTextCtrl_GetStyleBitsNeeded, 3361).
--define(wxStyledTextCtrl_GetCurrentLine, 3362).
--define(wxStyledTextCtrl_StyleSetSpec, 3363).
--define(wxStyledTextCtrl_StyleSetFont, 3364).
--define(wxStyledTextCtrl_StyleSetFontAttr, 3365).
--define(wxStyledTextCtrl_StyleSetCharacterSet, 3366).
--define(wxStyledTextCtrl_StyleSetFontEncoding, 3367).
--define(wxStyledTextCtrl_CmdKeyExecute, 3368).
--define(wxStyledTextCtrl_SetMargins, 3369).
--define(wxStyledTextCtrl_GetSelection, 3370).
--define(wxStyledTextCtrl_PointFromPosition, 3371).
--define(wxStyledTextCtrl_ScrollToLine, 3372).
--define(wxStyledTextCtrl_ScrollToColumn, 3373).
--define(wxStyledTextCtrl_SetVScrollBar, 3374).
--define(wxStyledTextCtrl_SetHScrollBar, 3375).
--define(wxStyledTextCtrl_GetLastKeydownProcessed, 3376).
--define(wxStyledTextCtrl_SetLastKeydownProcessed, 3377).
--define(wxStyledTextCtrl_SaveFile, 3378).
--define(wxStyledTextCtrl_LoadFile, 3379).
--define(wxStyledTextCtrl_DoDragOver, 3380).
--define(wxStyledTextCtrl_DoDropText, 3381).
--define(wxStyledTextCtrl_GetUseAntiAliasing, 3382).
--define(wxStyledTextCtrl_AddTextRaw, 3383).
--define(wxStyledTextCtrl_InsertTextRaw, 3384).
--define(wxStyledTextCtrl_GetCurLineRaw, 3385).
--define(wxStyledTextCtrl_GetLineRaw, 3386).
--define(wxStyledTextCtrl_GetSelectedTextRaw, 3387).
--define(wxStyledTextCtrl_GetTextRangeRaw, 3388).
--define(wxStyledTextCtrl_SetTextRaw, 3389).
--define(wxStyledTextCtrl_GetTextRaw, 3390).
--define(wxStyledTextCtrl_AppendTextRaw, 3391).
--define(wxArtProvider_GetBitmap, 3392).
--define(wxArtProvider_GetIcon, 3393).
--define(wxTreeEvent_GetKeyCode, 3394).
--define(wxTreeEvent_GetItem, 3395).
--define(wxTreeEvent_GetKeyEvent, 3396).
--define(wxTreeEvent_GetLabel, 3397).
--define(wxTreeEvent_GetOldItem, 3398).
--define(wxTreeEvent_GetPoint, 3399).
--define(wxTreeEvent_IsEditCancelled, 3400).
--define(wxTreeEvent_SetToolTip, 3401).
--define(wxNotebookEvent_GetOldSelection, 3402).
--define(wxNotebookEvent_GetSelection, 3403).
--define(wxNotebookEvent_SetOldSelection, 3404).
--define(wxNotebookEvent_SetSelection, 3405).
--define(wxFileDataObject_new, 3406).
--define(wxFileDataObject_AddFile, 3407).
--define(wxFileDataObject_GetFilenames, 3408).
--define(wxFileDataObject_destroy, 3409).
--define(wxTextDataObject_new, 3410).
--define(wxTextDataObject_GetTextLength, 3411).
--define(wxTextDataObject_GetText, 3412).
--define(wxTextDataObject_SetText, 3413).
--define(wxTextDataObject_destroy, 3414).
--define(wxBitmapDataObject_new_1_1, 3415).
--define(wxBitmapDataObject_new_1_0, 3416).
--define(wxBitmapDataObject_GetBitmap, 3417).
--define(wxBitmapDataObject_SetBitmap, 3418).
--define(wxBitmapDataObject_destroy, 3419).
--define(wxClipboard_new, 3421).
--define(wxClipboard_destruct, 3422).
--define(wxClipboard_AddData, 3423).
--define(wxClipboard_Clear, 3424).
--define(wxClipboard_Close, 3425).
--define(wxClipboard_Flush, 3426).
--define(wxClipboard_GetData, 3427).
--define(wxClipboard_IsOpened, 3428).
--define(wxClipboard_Open, 3429).
--define(wxClipboard_SetData, 3430).
--define(wxClipboard_UsePrimarySelection, 3432).
--define(wxClipboard_IsSupported, 3433).
--define(wxClipboard_Get, 3434).
--define(wxSpinEvent_GetPosition, 3435).
--define(wxSpinEvent_SetPosition, 3436).
--define(wxSplitterWindow_new_0, 3437).
--define(wxSplitterWindow_new_2, 3438).
--define(wxSplitterWindow_destruct, 3439).
--define(wxSplitterWindow_Create, 3440).
--define(wxSplitterWindow_GetMinimumPaneSize, 3441).
--define(wxSplitterWindow_GetSashGravity, 3442).
--define(wxSplitterWindow_GetSashPosition, 3443).
--define(wxSplitterWindow_GetSplitMode, 3444).
--define(wxSplitterWindow_GetWindow1, 3445).
--define(wxSplitterWindow_GetWindow2, 3446).
--define(wxSplitterWindow_Initialize, 3447).
--define(wxSplitterWindow_IsSplit, 3448).
--define(wxSplitterWindow_ReplaceWindow, 3449).
--define(wxSplitterWindow_SetSashGravity, 3450).
--define(wxSplitterWindow_SetSashPosition, 3451).
--define(wxSplitterWindow_SetSashSize, 3452).
--define(wxSplitterWindow_SetMinimumPaneSize, 3453).
--define(wxSplitterWindow_SetSplitMode, 3454).
--define(wxSplitterWindow_SplitHorizontally, 3455).
--define(wxSplitterWindow_SplitVertically, 3456).
--define(wxSplitterWindow_Unsplit, 3457).
--define(wxSplitterWindow_UpdateSize, 3458).
--define(wxSplitterEvent_GetSashPosition, 3459).
--define(wxSplitterEvent_GetX, 3460).
--define(wxSplitterEvent_GetY, 3461).
--define(wxSplitterEvent_GetWindowBeingRemoved, 3462).
--define(wxSplitterEvent_SetSashPosition, 3463).
--define(wxHtmlWindow_new_0, 3464).
--define(wxHtmlWindow_new_2, 3465).
--define(wxHtmlWindow_AppendToPage, 3466).
--define(wxHtmlWindow_GetOpenedAnchor, 3467).
--define(wxHtmlWindow_GetOpenedPage, 3468).
--define(wxHtmlWindow_GetOpenedPageTitle, 3469).
--define(wxHtmlWindow_GetRelatedFrame, 3470).
--define(wxHtmlWindow_HistoryBack, 3471).
--define(wxHtmlWindow_HistoryCanBack, 3472).
--define(wxHtmlWindow_HistoryCanForward, 3473).
--define(wxHtmlWindow_HistoryClear, 3474).
--define(wxHtmlWindow_HistoryForward, 3475).
--define(wxHtmlWindow_LoadFile, 3476).
--define(wxHtmlWindow_LoadPage, 3477).
--define(wxHtmlWindow_SelectAll, 3478).
--define(wxHtmlWindow_SelectionToText, 3479).
--define(wxHtmlWindow_SelectLine, 3480).
--define(wxHtmlWindow_SelectWord, 3481).
--define(wxHtmlWindow_SetBorders, 3482).
--define(wxHtmlWindow_SetFonts, 3483).
--define(wxHtmlWindow_SetPage, 3484).
--define(wxHtmlWindow_SetRelatedFrame, 3485).
--define(wxHtmlWindow_SetRelatedStatusBar, 3486).
--define(wxHtmlWindow_ToText, 3487).
--define(wxHtmlWindow_destroy, 3488).
--define(wxHtmlLinkEvent_GetLinkInfo, 3489).
--define(wxSystemSettings_GetColour, 3490).
--define(wxSystemSettings_GetFont, 3491).
--define(wxSystemSettings_GetMetric, 3492).
--define(wxSystemSettings_GetScreenType, 3493).
--define(wxSystemOptions_GetOption, 3494).
--define(wxSystemOptions_GetOptionInt, 3495).
--define(wxSystemOptions_HasOption, 3496).
--define(wxSystemOptions_IsFalse, 3497).
--define(wxSystemOptions_SetOption_2_1, 3498).
--define(wxSystemOptions_SetOption_2_0, 3499).
--define(wxAuiNotebookEvent_SetSelection, 3500).
--define(wxAuiNotebookEvent_GetSelection, 3501).
--define(wxAuiNotebookEvent_SetOldSelection, 3502).
--define(wxAuiNotebookEvent_GetOldSelection, 3503).
--define(wxAuiNotebookEvent_SetDragSource, 3504).
--define(wxAuiNotebookEvent_GetDragSource, 3505).
--define(wxAuiManagerEvent_SetManager, 3506).
--define(wxAuiManagerEvent_GetManager, 3507).
--define(wxAuiManagerEvent_SetPane, 3508).
--define(wxAuiManagerEvent_GetPane, 3509).
--define(wxAuiManagerEvent_SetButton, 3510).
--define(wxAuiManagerEvent_GetButton, 3511).
--define(wxAuiManagerEvent_SetDC, 3512).
--define(wxAuiManagerEvent_GetDC, 3513).
--define(wxAuiManagerEvent_Veto, 3514).
--define(wxAuiManagerEvent_GetVeto, 3515).
--define(wxAuiManagerEvent_SetCanVeto, 3516).
--define(wxAuiManagerEvent_CanVeto, 3517).
--define(wxLogNull_new, 3518).
--define(wxLogNull_destroy, 3519).
--define(wxTaskBarIcon_new, 3520).
--define(wxTaskBarIcon_destruct, 3521).
--define(wxTaskBarIcon_PopupMenu, 3522).
--define(wxTaskBarIcon_RemoveIcon, 3523).
--define(wxTaskBarIcon_SetIcon, 3524).
+-define(wxTextCtrl_ChangeValue, 1827).
+-define(wxTextCtrl_EmulateKeyPress, 1828).
+-define(wxTextCtrl_GetDefaultStyle, 1829).
+-define(wxTextCtrl_GetInsertionPoint, 1830).
+-define(wxTextCtrl_GetLastPosition, 1831).
+-define(wxTextCtrl_GetLineLength, 1832).
+-define(wxTextCtrl_GetLineText, 1833).
+-define(wxTextCtrl_GetNumberOfLines, 1834).
+-define(wxTextCtrl_GetRange, 1835).
+-define(wxTextCtrl_GetSelection, 1836).
+-define(wxTextCtrl_GetStringSelection, 1837).
+-define(wxTextCtrl_GetStyle, 1838).
+-define(wxTextCtrl_GetValue, 1839).
+-define(wxTextCtrl_IsEditable, 1840).
+-define(wxTextCtrl_IsModified, 1841).
+-define(wxTextCtrl_IsMultiLine, 1842).
+-define(wxTextCtrl_IsSingleLine, 1843).
+-define(wxTextCtrl_LoadFile, 1844).
+-define(wxTextCtrl_MarkDirty, 1845).
+-define(wxTextCtrl_Paste, 1846).
+-define(wxTextCtrl_PositionToXY, 1847).
+-define(wxTextCtrl_Redo, 1848).
+-define(wxTextCtrl_Remove, 1849).
+-define(wxTextCtrl_Replace, 1850).
+-define(wxTextCtrl_SaveFile, 1851).
+-define(wxTextCtrl_SetDefaultStyle, 1852).
+-define(wxTextCtrl_SetEditable, 1853).
+-define(wxTextCtrl_SetInsertionPoint, 1854).
+-define(wxTextCtrl_SetInsertionPointEnd, 1855).
+-define(wxTextCtrl_SetMaxLength, 1857).
+-define(wxTextCtrl_SetSelection, 1858).
+-define(wxTextCtrl_SetStyle, 1859).
+-define(wxTextCtrl_SetValue, 1860).
+-define(wxTextCtrl_ShowPosition, 1861).
+-define(wxTextCtrl_Undo, 1862).
+-define(wxTextCtrl_WriteText, 1863).
+-define(wxTextCtrl_XYToPosition, 1864).
+-define(wxNotebook_new_0, 1867).
+-define(wxNotebook_new_3, 1868).
+-define(wxNotebook_destruct, 1869).
+-define(wxNotebook_AddPage, 1870).
+-define(wxNotebook_AdvanceSelection, 1871).
+-define(wxNotebook_AssignImageList, 1872).
+-define(wxNotebook_Create, 1873).
+-define(wxNotebook_DeleteAllPages, 1874).
+-define(wxNotebook_DeletePage, 1875).
+-define(wxNotebook_RemovePage, 1876).
+-define(wxNotebook_GetCurrentPage, 1877).
+-define(wxNotebook_GetImageList, 1878).
+-define(wxNotebook_GetPage, 1880).
+-define(wxNotebook_GetPageCount, 1881).
+-define(wxNotebook_GetPageImage, 1882).
+-define(wxNotebook_GetPageText, 1883).
+-define(wxNotebook_GetRowCount, 1884).
+-define(wxNotebook_GetSelection, 1885).
+-define(wxNotebook_GetThemeBackgroundColour, 1886).
+-define(wxNotebook_HitTest, 1888).
+-define(wxNotebook_InsertPage, 1890).
+-define(wxNotebook_SetImageList, 1891).
+-define(wxNotebook_SetPadding, 1892).
+-define(wxNotebook_SetPageSize, 1893).
+-define(wxNotebook_SetPageImage, 1894).
+-define(wxNotebook_SetPageText, 1895).
+-define(wxNotebook_SetSelection, 1896).
+-define(wxNotebook_ChangeSelection, 1897).
+-define(wxChoicebook_new_0, 1898).
+-define(wxChoicebook_new_3, 1899).
+-define(wxChoicebook_AddPage, 1900).
+-define(wxChoicebook_AdvanceSelection, 1901).
+-define(wxChoicebook_AssignImageList, 1902).
+-define(wxChoicebook_Create, 1903).
+-define(wxChoicebook_DeleteAllPages, 1904).
+-define(wxChoicebook_DeletePage, 1905).
+-define(wxChoicebook_RemovePage, 1906).
+-define(wxChoicebook_GetCurrentPage, 1907).
+-define(wxChoicebook_GetImageList, 1908).
+-define(wxChoicebook_GetPage, 1910).
+-define(wxChoicebook_GetPageCount, 1911).
+-define(wxChoicebook_GetPageImage, 1912).
+-define(wxChoicebook_GetPageText, 1913).
+-define(wxChoicebook_GetSelection, 1914).
+-define(wxChoicebook_HitTest, 1915).
+-define(wxChoicebook_InsertPage, 1916).
+-define(wxChoicebook_SetImageList, 1917).
+-define(wxChoicebook_SetPageSize, 1918).
+-define(wxChoicebook_SetPageImage, 1919).
+-define(wxChoicebook_SetPageText, 1920).
+-define(wxChoicebook_SetSelection, 1921).
+-define(wxChoicebook_ChangeSelection, 1922).
+-define(wxChoicebook_destroy, 1923).
+-define(wxToolbook_new_0, 1924).
+-define(wxToolbook_new_3, 1925).
+-define(wxToolbook_AddPage, 1926).
+-define(wxToolbook_AdvanceSelection, 1927).
+-define(wxToolbook_AssignImageList, 1928).
+-define(wxToolbook_Create, 1929).
+-define(wxToolbook_DeleteAllPages, 1930).
+-define(wxToolbook_DeletePage, 1931).
+-define(wxToolbook_RemovePage, 1932).
+-define(wxToolbook_GetCurrentPage, 1933).
+-define(wxToolbook_GetImageList, 1934).
+-define(wxToolbook_GetPage, 1936).
+-define(wxToolbook_GetPageCount, 1937).
+-define(wxToolbook_GetPageImage, 1938).
+-define(wxToolbook_GetPageText, 1939).
+-define(wxToolbook_GetSelection, 1940).
+-define(wxToolbook_HitTest, 1942).
+-define(wxToolbook_InsertPage, 1943).
+-define(wxToolbook_SetImageList, 1944).
+-define(wxToolbook_SetPageSize, 1945).
+-define(wxToolbook_SetPageImage, 1946).
+-define(wxToolbook_SetPageText, 1947).
+-define(wxToolbook_SetSelection, 1948).
+-define(wxToolbook_ChangeSelection, 1949).
+-define(wxToolbook_destroy, 1950).
+-define(wxListbook_new_0, 1951).
+-define(wxListbook_new_3, 1952).
+-define(wxListbook_AddPage, 1953).
+-define(wxListbook_AdvanceSelection, 1954).
+-define(wxListbook_AssignImageList, 1955).
+-define(wxListbook_Create, 1956).
+-define(wxListbook_DeleteAllPages, 1957).
+-define(wxListbook_DeletePage, 1958).
+-define(wxListbook_RemovePage, 1959).
+-define(wxListbook_GetCurrentPage, 1960).
+-define(wxListbook_GetImageList, 1961).
+-define(wxListbook_GetPage, 1963).
+-define(wxListbook_GetPageCount, 1964).
+-define(wxListbook_GetPageImage, 1965).
+-define(wxListbook_GetPageText, 1966).
+-define(wxListbook_GetSelection, 1967).
+-define(wxListbook_HitTest, 1969).
+-define(wxListbook_InsertPage, 1970).
+-define(wxListbook_SetImageList, 1971).
+-define(wxListbook_SetPageSize, 1972).
+-define(wxListbook_SetPageImage, 1973).
+-define(wxListbook_SetPageText, 1974).
+-define(wxListbook_SetSelection, 1975).
+-define(wxListbook_ChangeSelection, 1976).
+-define(wxListbook_destroy, 1977).
+-define(wxTreebook_new_0, 1978).
+-define(wxTreebook_new_3, 1979).
+-define(wxTreebook_AddPage, 1980).
+-define(wxTreebook_AdvanceSelection, 1981).
+-define(wxTreebook_AssignImageList, 1982).
+-define(wxTreebook_Create, 1983).
+-define(wxTreebook_DeleteAllPages, 1984).
+-define(wxTreebook_DeletePage, 1985).
+-define(wxTreebook_RemovePage, 1986).
+-define(wxTreebook_GetCurrentPage, 1987).
+-define(wxTreebook_GetImageList, 1988).
+-define(wxTreebook_GetPage, 1990).
+-define(wxTreebook_GetPageCount, 1991).
+-define(wxTreebook_GetPageImage, 1992).
+-define(wxTreebook_GetPageText, 1993).
+-define(wxTreebook_GetSelection, 1994).
+-define(wxTreebook_ExpandNode, 1995).
+-define(wxTreebook_IsNodeExpanded, 1996).
+-define(wxTreebook_HitTest, 1998).
+-define(wxTreebook_InsertPage, 1999).
+-define(wxTreebook_InsertSubPage, 2000).
+-define(wxTreebook_SetImageList, 2001).
+-define(wxTreebook_SetPageSize, 2002).
+-define(wxTreebook_SetPageImage, 2003).
+-define(wxTreebook_SetPageText, 2004).
+-define(wxTreebook_SetSelection, 2005).
+-define(wxTreebook_ChangeSelection, 2006).
+-define(wxTreebook_destroy, 2007).
+-define(wxTreeCtrl_new_2, 2010).
+-define(wxTreeCtrl_new_0, 2011).
+-define(wxTreeCtrl_destruct, 2013).
+-define(wxTreeCtrl_AddRoot, 2014).
+-define(wxTreeCtrl_AppendItem, 2015).
+-define(wxTreeCtrl_AssignImageList, 2016).
+-define(wxTreeCtrl_AssignStateImageList, 2017).
+-define(wxTreeCtrl_Collapse, 2018).
+-define(wxTreeCtrl_CollapseAndReset, 2019).
+-define(wxTreeCtrl_Create, 2020).
+-define(wxTreeCtrl_Delete, 2021).
+-define(wxTreeCtrl_DeleteAllItems, 2022).
+-define(wxTreeCtrl_DeleteChildren, 2023).
+-define(wxTreeCtrl_EditLabel, 2024).
+-define(wxTreeCtrl_EnsureVisible, 2025).
+-define(wxTreeCtrl_Expand, 2026).
+-define(wxTreeCtrl_GetBoundingRect, 2027).
+-define(wxTreeCtrl_GetChildrenCount, 2029).
+-define(wxTreeCtrl_GetCount, 2030).
+-define(wxTreeCtrl_GetEditControl, 2031).
+-define(wxTreeCtrl_GetFirstChild, 2032).
+-define(wxTreeCtrl_GetNextChild, 2033).
+-define(wxTreeCtrl_GetFirstVisibleItem, 2034).
+-define(wxTreeCtrl_GetImageList, 2035).
+-define(wxTreeCtrl_GetIndent, 2036).
+-define(wxTreeCtrl_GetItemBackgroundColour, 2037).
+-define(wxTreeCtrl_GetItemData, 2038).
+-define(wxTreeCtrl_GetItemFont, 2039).
+-define(wxTreeCtrl_GetItemImage_1, 2040).
+-define(wxTreeCtrl_GetItemImage_2, 2041).
+-define(wxTreeCtrl_GetItemText, 2042).
+-define(wxTreeCtrl_GetItemTextColour, 2043).
+-define(wxTreeCtrl_GetLastChild, 2044).
+-define(wxTreeCtrl_GetNextSibling, 2045).
+-define(wxTreeCtrl_GetNextVisible, 2046).
+-define(wxTreeCtrl_GetItemParent, 2047).
+-define(wxTreeCtrl_GetPrevSibling, 2048).
+-define(wxTreeCtrl_GetPrevVisible, 2049).
+-define(wxTreeCtrl_GetRootItem, 2050).
+-define(wxTreeCtrl_GetSelection, 2051).
+-define(wxTreeCtrl_GetSelections, 2052).
+-define(wxTreeCtrl_GetStateImageList, 2053).
+-define(wxTreeCtrl_HitTest, 2054).
+-define(wxTreeCtrl_InsertItem, 2056).
+-define(wxTreeCtrl_IsBold, 2057).
+-define(wxTreeCtrl_IsExpanded, 2058).
+-define(wxTreeCtrl_IsSelected, 2059).
+-define(wxTreeCtrl_IsVisible, 2060).
+-define(wxTreeCtrl_ItemHasChildren, 2061).
+-define(wxTreeCtrl_IsTreeItemIdOk, 2062).
+-define(wxTreeCtrl_PrependItem, 2063).
+-define(wxTreeCtrl_ScrollTo, 2064).
+-define(wxTreeCtrl_SelectItem_1, 2065).
+-define(wxTreeCtrl_SelectItem_2, 2066).
+-define(wxTreeCtrl_SetIndent, 2067).
+-define(wxTreeCtrl_SetImageList, 2068).
+-define(wxTreeCtrl_SetItemBackgroundColour, 2069).
+-define(wxTreeCtrl_SetItemBold, 2070).
+-define(wxTreeCtrl_SetItemData, 2071).
+-define(wxTreeCtrl_SetItemDropHighlight, 2072).
+-define(wxTreeCtrl_SetItemFont, 2073).
+-define(wxTreeCtrl_SetItemHasChildren, 2074).
+-define(wxTreeCtrl_SetItemImage_2, 2075).
+-define(wxTreeCtrl_SetItemImage_3, 2076).
+-define(wxTreeCtrl_SetItemText, 2077).
+-define(wxTreeCtrl_SetItemTextColour, 2078).
+-define(wxTreeCtrl_SetStateImageList, 2079).
+-define(wxTreeCtrl_SetWindowStyle, 2080).
+-define(wxTreeCtrl_SortChildren, 2081).
+-define(wxTreeCtrl_Toggle, 2082).
+-define(wxTreeCtrl_ToggleItemSelection, 2083).
+-define(wxTreeCtrl_Unselect, 2084).
+-define(wxTreeCtrl_UnselectAll, 2085).
+-define(wxTreeCtrl_UnselectItem, 2086).
+-define(wxScrollBar_new_0, 2087).
+-define(wxScrollBar_new_3, 2088).
+-define(wxScrollBar_destruct, 2089).
+-define(wxScrollBar_Create, 2090).
+-define(wxScrollBar_GetRange, 2091).
+-define(wxScrollBar_GetPageSize, 2092).
+-define(wxScrollBar_GetThumbPosition, 2093).
+-define(wxScrollBar_GetThumbSize, 2094).
+-define(wxScrollBar_SetThumbPosition, 2095).
+-define(wxScrollBar_SetScrollbar, 2096).
+-define(wxSpinButton_new_2, 2098).
+-define(wxSpinButton_new_0, 2099).
+-define(wxSpinButton_Create, 2100).
+-define(wxSpinButton_GetMax, 2101).
+-define(wxSpinButton_GetMin, 2102).
+-define(wxSpinButton_GetValue, 2103).
+-define(wxSpinButton_SetRange, 2104).
+-define(wxSpinButton_SetValue, 2105).
+-define(wxSpinButton_destroy, 2106).
+-define(wxSpinCtrl_new_0, 2107).
+-define(wxSpinCtrl_new_2, 2108).
+-define(wxSpinCtrl_Create, 2110).
+-define(wxSpinCtrl_SetValue_1_1, 2113).
+-define(wxSpinCtrl_SetValue_1_0, 2114).
+-define(wxSpinCtrl_GetValue, 2116).
+-define(wxSpinCtrl_SetRange, 2118).
+-define(wxSpinCtrl_SetSelection, 2119).
+-define(wxSpinCtrl_GetMin, 2121).
+-define(wxSpinCtrl_GetMax, 2123).
+-define(wxSpinCtrl_destroy, 2124).
+-define(wxStaticText_new_0, 2125).
+-define(wxStaticText_new_4, 2126).
+-define(wxStaticText_Create, 2127).
+-define(wxStaticText_GetLabel, 2128).
+-define(wxStaticText_SetLabel, 2129).
+-define(wxStaticText_Wrap, 2130).
+-define(wxStaticText_destroy, 2131).
+-define(wxStaticBitmap_new_0, 2132).
+-define(wxStaticBitmap_new_4, 2133).
+-define(wxStaticBitmap_Create, 2134).
+-define(wxStaticBitmap_GetBitmap, 2135).
+-define(wxStaticBitmap_SetBitmap, 2136).
+-define(wxStaticBitmap_destroy, 2137).
+-define(wxRadioBox_new, 2138).
+-define(wxRadioBox_destruct, 2140).
+-define(wxRadioBox_Create, 2141).
+-define(wxRadioBox_Enable_2, 2142).
+-define(wxRadioBox_Enable_1, 2143).
+-define(wxRadioBox_GetSelection, 2144).
+-define(wxRadioBox_GetString, 2145).
+-define(wxRadioBox_SetSelection, 2146).
+-define(wxRadioBox_Show_2, 2147).
+-define(wxRadioBox_Show_1, 2148).
+-define(wxRadioBox_GetColumnCount, 2149).
+-define(wxRadioBox_GetItemHelpText, 2150).
+-define(wxRadioBox_GetItemToolTip, 2151).
+-define(wxRadioBox_GetItemFromPoint, 2153).
+-define(wxRadioBox_GetRowCount, 2154).
+-define(wxRadioBox_IsItemEnabled, 2155).
+-define(wxRadioBox_IsItemShown, 2156).
+-define(wxRadioBox_SetItemHelpText, 2157).
+-define(wxRadioBox_SetItemToolTip, 2158).
+-define(wxRadioButton_new_0, 2159).
+-define(wxRadioButton_new_4, 2160).
+-define(wxRadioButton_Create, 2161).
+-define(wxRadioButton_GetValue, 2162).
+-define(wxRadioButton_SetValue, 2163).
+-define(wxRadioButton_destroy, 2164).
+-define(wxSlider_new_6, 2166).
+-define(wxSlider_new_0, 2167).
+-define(wxSlider_Create, 2168).
+-define(wxSlider_GetLineSize, 2169).
+-define(wxSlider_GetMax, 2170).
+-define(wxSlider_GetMin, 2171).
+-define(wxSlider_GetPageSize, 2172).
+-define(wxSlider_GetThumbLength, 2173).
+-define(wxSlider_GetValue, 2174).
+-define(wxSlider_SetLineSize, 2175).
+-define(wxSlider_SetPageSize, 2176).
+-define(wxSlider_SetRange, 2177).
+-define(wxSlider_SetThumbLength, 2178).
+-define(wxSlider_SetValue, 2179).
+-define(wxSlider_destroy, 2180).
+-define(wxDialog_new_4, 2182).
+-define(wxDialog_new_0, 2183).
+-define(wxDialog_destruct, 2185).
+-define(wxDialog_Create, 2186).
+-define(wxDialog_CreateButtonSizer, 2187).
+-define(wxDialog_CreateStdDialogButtonSizer, 2188).
+-define(wxDialog_EndModal, 2189).
+-define(wxDialog_GetAffirmativeId, 2190).
+-define(wxDialog_GetReturnCode, 2191).
+-define(wxDialog_IsModal, 2192).
+-define(wxDialog_SetAffirmativeId, 2193).
+-define(wxDialog_SetReturnCode, 2194).
+-define(wxDialog_Show, 2195).
+-define(wxDialog_ShowModal, 2196).
+-define(wxColourDialog_new_0, 2197).
+-define(wxColourDialog_new_2, 2198).
+-define(wxColourDialog_destruct, 2199).
+-define(wxColourDialog_Create, 2200).
+-define(wxColourDialog_GetColourData, 2201).
+-define(wxColourData_new_0, 2202).
+-define(wxColourData_new_1, 2203).
+-define(wxColourData_destruct, 2204).
+-define(wxColourData_GetChooseFull, 2205).
+-define(wxColourData_GetColour, 2206).
+-define(wxColourData_GetCustomColour, 2208).
+-define(wxColourData_SetChooseFull, 2209).
+-define(wxColourData_SetColour, 2210).
+-define(wxColourData_SetCustomColour, 2211).
+-define(wxPalette_new_0, 2212).
+-define(wxPalette_new_4, 2213).
+-define(wxPalette_destruct, 2215).
+-define(wxPalette_Create, 2216).
+-define(wxPalette_GetColoursCount, 2217).
+-define(wxPalette_GetPixel, 2218).
+-define(wxPalette_GetRGB, 2219).
+-define(wxPalette_IsOk, 2220).
+-define(wxDirDialog_new, 2224).
+-define(wxDirDialog_destruct, 2225).
+-define(wxDirDialog_GetPath, 2226).
+-define(wxDirDialog_GetMessage, 2227).
+-define(wxDirDialog_SetMessage, 2228).
+-define(wxDirDialog_SetPath, 2229).
+-define(wxFileDialog_new, 2233).
+-define(wxFileDialog_destruct, 2234).
+-define(wxFileDialog_GetDirectory, 2235).
+-define(wxFileDialog_GetFilename, 2236).
+-define(wxFileDialog_GetFilenames, 2237).
+-define(wxFileDialog_GetFilterIndex, 2238).
+-define(wxFileDialog_GetMessage, 2239).
+-define(wxFileDialog_GetPath, 2240).
+-define(wxFileDialog_GetPaths, 2241).
+-define(wxFileDialog_GetWildcard, 2242).
+-define(wxFileDialog_SetDirectory, 2243).
+-define(wxFileDialog_SetFilename, 2244).
+-define(wxFileDialog_SetFilterIndex, 2245).
+-define(wxFileDialog_SetMessage, 2246).
+-define(wxFileDialog_SetPath, 2247).
+-define(wxFileDialog_SetWildcard, 2248).
+-define(wxPickerBase_SetInternalMargin, 2249).
+-define(wxPickerBase_GetInternalMargin, 2250).
+-define(wxPickerBase_SetTextCtrlProportion, 2251).
+-define(wxPickerBase_SetPickerCtrlProportion, 2252).
+-define(wxPickerBase_GetTextCtrlProportion, 2253).
+-define(wxPickerBase_GetPickerCtrlProportion, 2254).
+-define(wxPickerBase_HasTextCtrl, 2255).
+-define(wxPickerBase_GetTextCtrl, 2256).
+-define(wxPickerBase_IsTextCtrlGrowable, 2257).
+-define(wxPickerBase_SetPickerCtrlGrowable, 2258).
+-define(wxPickerBase_SetTextCtrlGrowable, 2259).
+-define(wxPickerBase_IsPickerCtrlGrowable, 2260).
+-define(wxFilePickerCtrl_new_0, 2261).
+-define(wxFilePickerCtrl_new_3, 2262).
+-define(wxFilePickerCtrl_Create, 2263).
+-define(wxFilePickerCtrl_GetPath, 2264).
+-define(wxFilePickerCtrl_SetPath, 2265).
+-define(wxFilePickerCtrl_destroy, 2266).
+-define(wxDirPickerCtrl_new_0, 2267).
+-define(wxDirPickerCtrl_new_3, 2268).
+-define(wxDirPickerCtrl_Create, 2269).
+-define(wxDirPickerCtrl_GetPath, 2270).
+-define(wxDirPickerCtrl_SetPath, 2271).
+-define(wxDirPickerCtrl_destroy, 2272).
+-define(wxColourPickerCtrl_new_0, 2273).
+-define(wxColourPickerCtrl_new_3, 2274).
+-define(wxColourPickerCtrl_Create, 2275).
+-define(wxColourPickerCtrl_GetColour, 2276).
+-define(wxColourPickerCtrl_SetColour_1_1, 2277).
+-define(wxColourPickerCtrl_SetColour_1_0, 2278).
+-define(wxColourPickerCtrl_destroy, 2279).
+-define(wxDatePickerCtrl_new_0, 2280).
+-define(wxDatePickerCtrl_new_3, 2281).
+-define(wxDatePickerCtrl_GetRange, 2282).
+-define(wxDatePickerCtrl_GetValue, 2283).
+-define(wxDatePickerCtrl_SetRange, 2284).
+-define(wxDatePickerCtrl_SetValue, 2285).
+-define(wxDatePickerCtrl_destroy, 2286).
+-define(wxFontPickerCtrl_new_0, 2287).
+-define(wxFontPickerCtrl_new_3, 2288).
+-define(wxFontPickerCtrl_Create, 2289).
+-define(wxFontPickerCtrl_GetSelectedFont, 2290).
+-define(wxFontPickerCtrl_SetSelectedFont, 2291).
+-define(wxFontPickerCtrl_GetMaxPointSize, 2292).
+-define(wxFontPickerCtrl_SetMaxPointSize, 2293).
+-define(wxFontPickerCtrl_destroy, 2294).
+-define(wxFindReplaceDialog_new_0, 2297).
+-define(wxFindReplaceDialog_new_4, 2298).
+-define(wxFindReplaceDialog_destruct, 2299).
+-define(wxFindReplaceDialog_Create, 2300).
+-define(wxFindReplaceDialog_GetData, 2301).
+-define(wxFindReplaceData_new_0, 2302).
+-define(wxFindReplaceData_new_1, 2303).
+-define(wxFindReplaceData_GetFindString, 2304).
+-define(wxFindReplaceData_GetReplaceString, 2305).
+-define(wxFindReplaceData_GetFlags, 2306).
+-define(wxFindReplaceData_SetFlags, 2307).
+-define(wxFindReplaceData_SetFindString, 2308).
+-define(wxFindReplaceData_SetReplaceString, 2309).
+-define(wxFindReplaceData_destroy, 2310).
+-define(wxMultiChoiceDialog_new_0, 2311).
+-define(wxMultiChoiceDialog_new_5, 2313).
+-define(wxMultiChoiceDialog_GetSelections, 2314).
+-define(wxMultiChoiceDialog_SetSelections, 2315).
+-define(wxMultiChoiceDialog_destroy, 2316).
+-define(wxSingleChoiceDialog_new_0, 2317).
+-define(wxSingleChoiceDialog_new_5, 2319).
+-define(wxSingleChoiceDialog_GetSelection, 2320).
+-define(wxSingleChoiceDialog_GetStringSelection, 2321).
+-define(wxSingleChoiceDialog_SetSelection, 2322).
+-define(wxSingleChoiceDialog_destroy, 2323).
+-define(wxTextEntryDialog_new, 2324).
+-define(wxTextEntryDialog_GetValue, 2325).
+-define(wxTextEntryDialog_SetValue, 2326).
+-define(wxTextEntryDialog_destroy, 2327).
+-define(wxPasswordEntryDialog_new, 2328).
+-define(wxPasswordEntryDialog_destroy, 2329).
+-define(wxFontData_new_0, 2330).
+-define(wxFontData_new_1, 2331).
+-define(wxFontData_destruct, 2332).
+-define(wxFontData_EnableEffects, 2333).
+-define(wxFontData_GetAllowSymbols, 2334).
+-define(wxFontData_GetColour, 2335).
+-define(wxFontData_GetChosenFont, 2336).
+-define(wxFontData_GetEnableEffects, 2337).
+-define(wxFontData_GetInitialFont, 2338).
+-define(wxFontData_GetShowHelp, 2339).
+-define(wxFontData_SetAllowSymbols, 2340).
+-define(wxFontData_SetChosenFont, 2341).
+-define(wxFontData_SetColour, 2342).
+-define(wxFontData_SetInitialFont, 2343).
+-define(wxFontData_SetRange, 2344).
+-define(wxFontData_SetShowHelp, 2345).
+-define(wxFontDialog_new_0, 2349).
+-define(wxFontDialog_new_2, 2351).
+-define(wxFontDialog_Create, 2353).
+-define(wxFontDialog_GetFontData, 2354).
+-define(wxFontDialog_destroy, 2356).
+-define(wxProgressDialog_new, 2357).
+-define(wxProgressDialog_destruct, 2358).
+-define(wxProgressDialog_Resume, 2359).
+-define(wxProgressDialog_Update_2, 2360).
+-define(wxProgressDialog_Update_0, 2361).
+-define(wxMessageDialog_new, 2362).
+-define(wxMessageDialog_destruct, 2363).
+-define(wxPageSetupDialog_new, 2364).
+-define(wxPageSetupDialog_destruct, 2365).
+-define(wxPageSetupDialog_GetPageSetupData, 2366).
+-define(wxPageSetupDialog_ShowModal, 2367).
+-define(wxPageSetupDialogData_new_0, 2368).
+-define(wxPageSetupDialogData_new_1_0, 2369).
+-define(wxPageSetupDialogData_new_1_1, 2370).
+-define(wxPageSetupDialogData_destruct, 2371).
+-define(wxPageSetupDialogData_EnableHelp, 2372).
+-define(wxPageSetupDialogData_EnableMargins, 2373).
+-define(wxPageSetupDialogData_EnableOrientation, 2374).
+-define(wxPageSetupDialogData_EnablePaper, 2375).
+-define(wxPageSetupDialogData_EnablePrinter, 2376).
+-define(wxPageSetupDialogData_GetDefaultMinMargins, 2377).
+-define(wxPageSetupDialogData_GetEnableMargins, 2378).
+-define(wxPageSetupDialogData_GetEnableOrientation, 2379).
+-define(wxPageSetupDialogData_GetEnablePaper, 2380).
+-define(wxPageSetupDialogData_GetEnablePrinter, 2381).
+-define(wxPageSetupDialogData_GetEnableHelp, 2382).
+-define(wxPageSetupDialogData_GetDefaultInfo, 2383).
+-define(wxPageSetupDialogData_GetMarginTopLeft, 2384).
+-define(wxPageSetupDialogData_GetMarginBottomRight, 2385).
+-define(wxPageSetupDialogData_GetMinMarginTopLeft, 2386).
+-define(wxPageSetupDialogData_GetMinMarginBottomRight, 2387).
+-define(wxPageSetupDialogData_GetPaperId, 2388).
+-define(wxPageSetupDialogData_GetPaperSize, 2389).
+-define(wxPageSetupDialogData_GetPrintData, 2391).
+-define(wxPageSetupDialogData_IsOk, 2392).
+-define(wxPageSetupDialogData_SetDefaultInfo, 2393).
+-define(wxPageSetupDialogData_SetDefaultMinMargins, 2394).
+-define(wxPageSetupDialogData_SetMarginTopLeft, 2395).
+-define(wxPageSetupDialogData_SetMarginBottomRight, 2396).
+-define(wxPageSetupDialogData_SetMinMarginTopLeft, 2397).
+-define(wxPageSetupDialogData_SetMinMarginBottomRight, 2398).
+-define(wxPageSetupDialogData_SetPaperId, 2399).
+-define(wxPageSetupDialogData_SetPaperSize_1_1, 2400).
+-define(wxPageSetupDialogData_SetPaperSize_1_0, 2401).
+-define(wxPageSetupDialogData_SetPrintData, 2402).
+-define(wxPrintDialog_new_2_0, 2403).
+-define(wxPrintDialog_new_2_1, 2404).
+-define(wxPrintDialog_destruct, 2405).
+-define(wxPrintDialog_GetPrintDialogData, 2406).
+-define(wxPrintDialog_GetPrintDC, 2407).
+-define(wxPrintDialogData_new_0, 2408).
+-define(wxPrintDialogData_new_1_1, 2409).
+-define(wxPrintDialogData_new_1_0, 2410).
+-define(wxPrintDialogData_destruct, 2411).
+-define(wxPrintDialogData_EnableHelp, 2412).
+-define(wxPrintDialogData_EnablePageNumbers, 2413).
+-define(wxPrintDialogData_EnablePrintToFile, 2414).
+-define(wxPrintDialogData_EnableSelection, 2415).
+-define(wxPrintDialogData_GetAllPages, 2416).
+-define(wxPrintDialogData_GetCollate, 2417).
+-define(wxPrintDialogData_GetFromPage, 2418).
+-define(wxPrintDialogData_GetMaxPage, 2419).
+-define(wxPrintDialogData_GetMinPage, 2420).
+-define(wxPrintDialogData_GetNoCopies, 2421).
+-define(wxPrintDialogData_GetPrintData, 2422).
+-define(wxPrintDialogData_GetPrintToFile, 2423).
+-define(wxPrintDialogData_GetSelection, 2424).
+-define(wxPrintDialogData_GetToPage, 2425).
+-define(wxPrintDialogData_IsOk, 2426).
+-define(wxPrintDialogData_SetCollate, 2427).
+-define(wxPrintDialogData_SetFromPage, 2428).
+-define(wxPrintDialogData_SetMaxPage, 2429).
+-define(wxPrintDialogData_SetMinPage, 2430).
+-define(wxPrintDialogData_SetNoCopies, 2431).
+-define(wxPrintDialogData_SetPrintData, 2432).
+-define(wxPrintDialogData_SetPrintToFile, 2433).
+-define(wxPrintDialogData_SetSelection, 2434).
+-define(wxPrintDialogData_SetToPage, 2435).
+-define(wxPrintData_new_0, 2436).
+-define(wxPrintData_new_1, 2437).
+-define(wxPrintData_destruct, 2438).
+-define(wxPrintData_GetCollate, 2439).
+-define(wxPrintData_GetBin, 2440).
+-define(wxPrintData_GetColour, 2441).
+-define(wxPrintData_GetDuplex, 2442).
+-define(wxPrintData_GetNoCopies, 2443).
+-define(wxPrintData_GetOrientation, 2444).
+-define(wxPrintData_GetPaperId, 2445).
+-define(wxPrintData_GetPrinterName, 2446).
+-define(wxPrintData_GetQuality, 2447).
+-define(wxPrintData_IsOk, 2448).
+-define(wxPrintData_SetBin, 2449).
+-define(wxPrintData_SetCollate, 2450).
+-define(wxPrintData_SetColour, 2451).
+-define(wxPrintData_SetDuplex, 2452).
+-define(wxPrintData_SetNoCopies, 2453).
+-define(wxPrintData_SetOrientation, 2454).
+-define(wxPrintData_SetPaperId, 2455).
+-define(wxPrintData_SetPrinterName, 2456).
+-define(wxPrintData_SetQuality, 2457).
+-define(wxPrintPreview_new_2, 2460).
+-define(wxPrintPreview_new_3, 2461).
+-define(wxPrintPreview_destruct, 2463).
+-define(wxPrintPreview_GetCanvas, 2464).
+-define(wxPrintPreview_GetCurrentPage, 2465).
+-define(wxPrintPreview_GetFrame, 2466).
+-define(wxPrintPreview_GetMaxPage, 2467).
+-define(wxPrintPreview_GetMinPage, 2468).
+-define(wxPrintPreview_GetPrintout, 2469).
+-define(wxPrintPreview_GetPrintoutForPrinting, 2470).
+-define(wxPrintPreview_IsOk, 2471).
+-define(wxPrintPreview_PaintPage, 2472).
+-define(wxPrintPreview_Print, 2473).
+-define(wxPrintPreview_RenderPage, 2474).
+-define(wxPrintPreview_SetCanvas, 2475).
+-define(wxPrintPreview_SetCurrentPage, 2476).
+-define(wxPrintPreview_SetFrame, 2477).
+-define(wxPrintPreview_SetPrintout, 2478).
+-define(wxPrintPreview_SetZoom, 2479).
+-define(wxPreviewFrame_new, 2480).
+-define(wxPreviewFrame_destruct, 2481).
+-define(wxPreviewFrame_CreateControlBar, 2482).
+-define(wxPreviewFrame_CreateCanvas, 2483).
+-define(wxPreviewFrame_Initialize, 2484).
+-define(wxPreviewFrame_OnCloseWindow, 2485).
+-define(wxPreviewControlBar_new, 2486).
+-define(wxPreviewControlBar_destruct, 2487).
+-define(wxPreviewControlBar_CreateButtons, 2488).
+-define(wxPreviewControlBar_GetPrintPreview, 2489).
+-define(wxPreviewControlBar_GetZoomControl, 2490).
+-define(wxPreviewControlBar_SetZoomControl, 2491).
+-define(wxPrinter_new, 2493).
+-define(wxPrinter_CreateAbortWindow, 2494).
+-define(wxPrinter_GetAbort, 2495).
+-define(wxPrinter_GetLastError, 2496).
+-define(wxPrinter_GetPrintDialogData, 2497).
+-define(wxPrinter_Print, 2498).
+-define(wxPrinter_PrintDialog, 2499).
+-define(wxPrinter_ReportError, 2500).
+-define(wxPrinter_Setup, 2501).
+-define(wxPrinter_destroy, 2502).
+-define(wxXmlResource_new_1, 2503).
+-define(wxXmlResource_new_2, 2504).
+-define(wxXmlResource_destruct, 2505).
+-define(wxXmlResource_AttachUnknownControl, 2506).
+-define(wxXmlResource_ClearHandlers, 2507).
+-define(wxXmlResource_CompareVersion, 2508).
+-define(wxXmlResource_Get, 2509).
+-define(wxXmlResource_GetFlags, 2510).
+-define(wxXmlResource_GetVersion, 2511).
+-define(wxXmlResource_GetXRCID, 2512).
+-define(wxXmlResource_InitAllHandlers, 2513).
+-define(wxXmlResource_Load, 2514).
+-define(wxXmlResource_LoadBitmap, 2515).
+-define(wxXmlResource_LoadDialog_2, 2516).
+-define(wxXmlResource_LoadDialog_3, 2517).
+-define(wxXmlResource_LoadFrame_2, 2518).
+-define(wxXmlResource_LoadFrame_3, 2519).
+-define(wxXmlResource_LoadIcon, 2520).
+-define(wxXmlResource_LoadMenu, 2521).
+-define(wxXmlResource_LoadMenuBar_2, 2522).
+-define(wxXmlResource_LoadMenuBar_1, 2523).
+-define(wxXmlResource_LoadPanel_2, 2524).
+-define(wxXmlResource_LoadPanel_3, 2525).
+-define(wxXmlResource_LoadToolBar, 2526).
+-define(wxXmlResource_Set, 2527).
+-define(wxXmlResource_SetFlags, 2528).
+-define(wxXmlResource_Unload, 2529).
+-define(wxXmlResource_xrcctrl, 2530).
+-define(wxHtmlEasyPrinting_new, 2531).
+-define(wxHtmlEasyPrinting_destruct, 2532).
+-define(wxHtmlEasyPrinting_GetPrintData, 2533).
+-define(wxHtmlEasyPrinting_GetPageSetupData, 2534).
+-define(wxHtmlEasyPrinting_PreviewFile, 2535).
+-define(wxHtmlEasyPrinting_PreviewText, 2536).
+-define(wxHtmlEasyPrinting_PrintFile, 2537).
+-define(wxHtmlEasyPrinting_PrintText, 2538).
+-define(wxHtmlEasyPrinting_PageSetup, 2539).
+-define(wxHtmlEasyPrinting_SetFonts, 2540).
+-define(wxHtmlEasyPrinting_SetHeader, 2541).
+-define(wxHtmlEasyPrinting_SetFooter, 2542).
+-define(wxGLCanvas_new_2, 2544).
+-define(wxGLCanvas_new_3_1, 2545).
+-define(wxGLCanvas_new_3_0, 2546).
+-define(wxGLCanvas_GetContext, 2547).
+-define(wxGLCanvas_SetCurrent, 2549).
+-define(wxGLCanvas_SwapBuffers, 2550).
+-define(wxGLCanvas_destroy, 2551).
+-define(wxAuiManager_new, 2552).
+-define(wxAuiManager_destruct, 2553).
+-define(wxAuiManager_AddPane_2_1, 2554).
+-define(wxAuiManager_AddPane_3, 2555).
+-define(wxAuiManager_AddPane_2_0, 2556).
+-define(wxAuiManager_DetachPane, 2557).
+-define(wxAuiManager_GetAllPanes, 2558).
+-define(wxAuiManager_GetArtProvider, 2559).
+-define(wxAuiManager_GetDockSizeConstraint, 2560).
+-define(wxAuiManager_GetFlags, 2561).
+-define(wxAuiManager_GetManagedWindow, 2562).
+-define(wxAuiManager_GetManager, 2563).
+-define(wxAuiManager_GetPane_1_1, 2564).
+-define(wxAuiManager_GetPane_1_0, 2565).
+-define(wxAuiManager_HideHint, 2566).
+-define(wxAuiManager_InsertPane, 2567).
+-define(wxAuiManager_LoadPaneInfo, 2568).
+-define(wxAuiManager_LoadPerspective, 2569).
+-define(wxAuiManager_SavePaneInfo, 2570).
+-define(wxAuiManager_SavePerspective, 2571).
+-define(wxAuiManager_SetArtProvider, 2572).
+-define(wxAuiManager_SetDockSizeConstraint, 2573).
+-define(wxAuiManager_SetFlags, 2574).
+-define(wxAuiManager_SetManagedWindow, 2575).
+-define(wxAuiManager_ShowHint, 2576).
+-define(wxAuiManager_UnInit, 2577).
+-define(wxAuiManager_Update, 2578).
+-define(wxAuiPaneInfo_new_0, 2579).
+-define(wxAuiPaneInfo_new_1, 2580).
+-define(wxAuiPaneInfo_destruct, 2581).
+-define(wxAuiPaneInfo_BestSize_1, 2582).
+-define(wxAuiPaneInfo_BestSize_2, 2583).
+-define(wxAuiPaneInfo_Bottom, 2584).
+-define(wxAuiPaneInfo_BottomDockable, 2585).
+-define(wxAuiPaneInfo_Caption, 2586).
+-define(wxAuiPaneInfo_CaptionVisible, 2587).
+-define(wxAuiPaneInfo_Centre, 2588).
+-define(wxAuiPaneInfo_CentrePane, 2589).
+-define(wxAuiPaneInfo_CloseButton, 2590).
+-define(wxAuiPaneInfo_DefaultPane, 2591).
+-define(wxAuiPaneInfo_DestroyOnClose, 2592).
+-define(wxAuiPaneInfo_Direction, 2593).
+-define(wxAuiPaneInfo_Dock, 2594).
+-define(wxAuiPaneInfo_Dockable, 2595).
+-define(wxAuiPaneInfo_Fixed, 2596).
+-define(wxAuiPaneInfo_Float, 2597).
+-define(wxAuiPaneInfo_Floatable, 2598).
+-define(wxAuiPaneInfo_FloatingPosition_1, 2599).
+-define(wxAuiPaneInfo_FloatingPosition_2, 2600).
+-define(wxAuiPaneInfo_FloatingSize_1, 2601).
+-define(wxAuiPaneInfo_FloatingSize_2, 2602).
+-define(wxAuiPaneInfo_Gripper, 2603).
+-define(wxAuiPaneInfo_GripperTop, 2604).
+-define(wxAuiPaneInfo_HasBorder, 2605).
+-define(wxAuiPaneInfo_HasCaption, 2606).
+-define(wxAuiPaneInfo_HasCloseButton, 2607).
+-define(wxAuiPaneInfo_HasFlag, 2608).
+-define(wxAuiPaneInfo_HasGripper, 2609).
+-define(wxAuiPaneInfo_HasGripperTop, 2610).
+-define(wxAuiPaneInfo_HasMaximizeButton, 2611).
+-define(wxAuiPaneInfo_HasMinimizeButton, 2612).
+-define(wxAuiPaneInfo_HasPinButton, 2613).
+-define(wxAuiPaneInfo_Hide, 2614).
+-define(wxAuiPaneInfo_IsBottomDockable, 2615).
+-define(wxAuiPaneInfo_IsDocked, 2616).
+-define(wxAuiPaneInfo_IsFixed, 2617).
+-define(wxAuiPaneInfo_IsFloatable, 2618).
+-define(wxAuiPaneInfo_IsFloating, 2619).
+-define(wxAuiPaneInfo_IsLeftDockable, 2620).
+-define(wxAuiPaneInfo_IsMovable, 2621).
+-define(wxAuiPaneInfo_IsOk, 2622).
+-define(wxAuiPaneInfo_IsResizable, 2623).
+-define(wxAuiPaneInfo_IsRightDockable, 2624).
+-define(wxAuiPaneInfo_IsShown, 2625).
+-define(wxAuiPaneInfo_IsToolbar, 2626).
+-define(wxAuiPaneInfo_IsTopDockable, 2627).
+-define(wxAuiPaneInfo_Layer, 2628).
+-define(wxAuiPaneInfo_Left, 2629).
+-define(wxAuiPaneInfo_LeftDockable, 2630).
+-define(wxAuiPaneInfo_MaxSize_1, 2631).
+-define(wxAuiPaneInfo_MaxSize_2, 2632).
+-define(wxAuiPaneInfo_MaximizeButton, 2633).
+-define(wxAuiPaneInfo_MinSize_1, 2634).
+-define(wxAuiPaneInfo_MinSize_2, 2635).
+-define(wxAuiPaneInfo_MinimizeButton, 2636).
+-define(wxAuiPaneInfo_Movable, 2637).
+-define(wxAuiPaneInfo_Name, 2638).
+-define(wxAuiPaneInfo_PaneBorder, 2639).
+-define(wxAuiPaneInfo_PinButton, 2640).
+-define(wxAuiPaneInfo_Position, 2641).
+-define(wxAuiPaneInfo_Resizable, 2642).
+-define(wxAuiPaneInfo_Right, 2643).
+-define(wxAuiPaneInfo_RightDockable, 2644).
+-define(wxAuiPaneInfo_Row, 2645).
+-define(wxAuiPaneInfo_SafeSet, 2646).
+-define(wxAuiPaneInfo_SetFlag, 2647).
+-define(wxAuiPaneInfo_Show, 2648).
+-define(wxAuiPaneInfo_ToolbarPane, 2649).
+-define(wxAuiPaneInfo_Top, 2650).
+-define(wxAuiPaneInfo_TopDockable, 2651).
+-define(wxAuiPaneInfo_Window, 2652).
+-define(wxAuiNotebook_new_0, 2653).
+-define(wxAuiNotebook_new_2, 2654).
+-define(wxAuiNotebook_AddPage, 2655).
+-define(wxAuiNotebook_Create, 2656).
+-define(wxAuiNotebook_DeletePage, 2657).
+-define(wxAuiNotebook_GetArtProvider, 2658).
+-define(wxAuiNotebook_GetPage, 2659).
+-define(wxAuiNotebook_GetPageBitmap, 2660).
+-define(wxAuiNotebook_GetPageCount, 2661).
+-define(wxAuiNotebook_GetPageIndex, 2662).
+-define(wxAuiNotebook_GetPageText, 2663).
+-define(wxAuiNotebook_GetSelection, 2664).
+-define(wxAuiNotebook_InsertPage, 2665).
+-define(wxAuiNotebook_RemovePage, 2666).
+-define(wxAuiNotebook_SetArtProvider, 2667).
+-define(wxAuiNotebook_SetFont, 2668).
+-define(wxAuiNotebook_SetPageBitmap, 2669).
+-define(wxAuiNotebook_SetPageText, 2670).
+-define(wxAuiNotebook_SetSelection, 2671).
+-define(wxAuiNotebook_SetTabCtrlHeight, 2672).
+-define(wxAuiNotebook_SetUniformBitmapSize, 2673).
+-define(wxAuiNotebook_destroy, 2674).
+-define(wxMDIParentFrame_new_0, 2675).
+-define(wxMDIParentFrame_new_4, 2676).
+-define(wxMDIParentFrame_destruct, 2677).
+-define(wxMDIParentFrame_ActivateNext, 2678).
+-define(wxMDIParentFrame_ActivatePrevious, 2679).
+-define(wxMDIParentFrame_ArrangeIcons, 2680).
+-define(wxMDIParentFrame_Cascade, 2681).
+-define(wxMDIParentFrame_Create, 2682).
+-define(wxMDIParentFrame_GetActiveChild, 2683).
+-define(wxMDIParentFrame_GetClientWindow, 2684).
+-define(wxMDIParentFrame_Tile, 2685).
+-define(wxMDIChildFrame_new_0, 2686).
+-define(wxMDIChildFrame_new_4, 2687).
+-define(wxMDIChildFrame_destruct, 2688).
+-define(wxMDIChildFrame_Activate, 2689).
+-define(wxMDIChildFrame_Create, 2690).
+-define(wxMDIChildFrame_Maximize, 2691).
+-define(wxMDIChildFrame_Restore, 2692).
+-define(wxMDIClientWindow_new_0, 2693).
+-define(wxMDIClientWindow_new_2, 2694).
+-define(wxMDIClientWindow_destruct, 2695).
+-define(wxMDIClientWindow_CreateClient, 2696).
+-define(wxLayoutAlgorithm_new, 2697).
+-define(wxLayoutAlgorithm_LayoutFrame, 2698).
+-define(wxLayoutAlgorithm_LayoutMDIFrame, 2699).
+-define(wxLayoutAlgorithm_LayoutWindow, 2700).
+-define(wxLayoutAlgorithm_destroy, 2701).
+-define(wxEvent_GetId, 2702).
+-define(wxEvent_GetSkipped, 2703).
+-define(wxEvent_GetTimestamp, 2704).
+-define(wxEvent_IsCommandEvent, 2705).
+-define(wxEvent_ResumePropagation, 2706).
+-define(wxEvent_ShouldPropagate, 2707).
+-define(wxEvent_Skip, 2708).
+-define(wxEvent_StopPropagation, 2709).
+-define(wxCommandEvent_getClientData, 2710).
+-define(wxCommandEvent_GetExtraLong, 2711).
+-define(wxCommandEvent_GetInt, 2712).
+-define(wxCommandEvent_GetSelection, 2713).
+-define(wxCommandEvent_GetString, 2714).
+-define(wxCommandEvent_IsChecked, 2715).
+-define(wxCommandEvent_IsSelection, 2716).
+-define(wxCommandEvent_SetInt, 2717).
+-define(wxCommandEvent_SetString, 2718).
+-define(wxScrollEvent_GetOrientation, 2719).
+-define(wxScrollEvent_GetPosition, 2720).
+-define(wxScrollWinEvent_GetOrientation, 2721).
+-define(wxScrollWinEvent_GetPosition, 2722).
+-define(wxMouseEvent_AltDown, 2723).
+-define(wxMouseEvent_Button, 2724).
+-define(wxMouseEvent_ButtonDClick, 2725).
+-define(wxMouseEvent_ButtonDown, 2726).
+-define(wxMouseEvent_ButtonUp, 2727).
+-define(wxMouseEvent_CmdDown, 2728).
+-define(wxMouseEvent_ControlDown, 2729).
+-define(wxMouseEvent_Dragging, 2730).
+-define(wxMouseEvent_Entering, 2731).
+-define(wxMouseEvent_GetButton, 2732).
+-define(wxMouseEvent_GetPosition, 2735).
+-define(wxMouseEvent_GetLogicalPosition, 2736).
+-define(wxMouseEvent_GetLinesPerAction, 2737).
+-define(wxMouseEvent_GetWheelRotation, 2738).
+-define(wxMouseEvent_GetWheelDelta, 2739).
+-define(wxMouseEvent_GetX, 2740).
+-define(wxMouseEvent_GetY, 2741).
+-define(wxMouseEvent_IsButton, 2742).
+-define(wxMouseEvent_IsPageScroll, 2743).
+-define(wxMouseEvent_Leaving, 2744).
+-define(wxMouseEvent_LeftDClick, 2745).
+-define(wxMouseEvent_LeftDown, 2746).
+-define(wxMouseEvent_LeftIsDown, 2747).
+-define(wxMouseEvent_LeftUp, 2748).
+-define(wxMouseEvent_MetaDown, 2749).
+-define(wxMouseEvent_MiddleDClick, 2750).
+-define(wxMouseEvent_MiddleDown, 2751).
+-define(wxMouseEvent_MiddleIsDown, 2752).
+-define(wxMouseEvent_MiddleUp, 2753).
+-define(wxMouseEvent_Moving, 2754).
+-define(wxMouseEvent_RightDClick, 2755).
+-define(wxMouseEvent_RightDown, 2756).
+-define(wxMouseEvent_RightIsDown, 2757).
+-define(wxMouseEvent_RightUp, 2758).
+-define(wxMouseEvent_ShiftDown, 2759).
+-define(wxSetCursorEvent_GetCursor, 2760).
+-define(wxSetCursorEvent_GetX, 2761).
+-define(wxSetCursorEvent_GetY, 2762).
+-define(wxSetCursorEvent_HasCursor, 2763).
+-define(wxSetCursorEvent_SetCursor, 2764).
+-define(wxKeyEvent_AltDown, 2765).
+-define(wxKeyEvent_CmdDown, 2766).
+-define(wxKeyEvent_ControlDown, 2767).
+-define(wxKeyEvent_GetKeyCode, 2768).
+-define(wxKeyEvent_GetModifiers, 2769).
+-define(wxKeyEvent_GetPosition, 2772).
+-define(wxKeyEvent_GetRawKeyCode, 2773).
+-define(wxKeyEvent_GetRawKeyFlags, 2774).
+-define(wxKeyEvent_GetUnicodeKey, 2775).
+-define(wxKeyEvent_GetX, 2776).
+-define(wxKeyEvent_GetY, 2777).
+-define(wxKeyEvent_HasModifiers, 2778).
+-define(wxKeyEvent_MetaDown, 2779).
+-define(wxKeyEvent_ShiftDown, 2780).
+-define(wxSizeEvent_GetSize, 2781).
+-define(wxMoveEvent_GetPosition, 2782).
+-define(wxEraseEvent_GetDC, 2783).
+-define(wxFocusEvent_GetWindow, 2784).
+-define(wxChildFocusEvent_GetWindow, 2785).
+-define(wxMenuEvent_GetMenu, 2786).
+-define(wxMenuEvent_GetMenuId, 2787).
+-define(wxMenuEvent_IsPopup, 2788).
+-define(wxCloseEvent_CanVeto, 2789).
+-define(wxCloseEvent_GetLoggingOff, 2790).
+-define(wxCloseEvent_SetCanVeto, 2791).
+-define(wxCloseEvent_SetLoggingOff, 2792).
+-define(wxCloseEvent_Veto, 2793).
+-define(wxShowEvent_SetShow, 2794).
+-define(wxShowEvent_GetShow, 2795).
+-define(wxIconizeEvent_Iconized, 2796).
+-define(wxJoystickEvent_ButtonDown, 2797).
+-define(wxJoystickEvent_ButtonIsDown, 2798).
+-define(wxJoystickEvent_ButtonUp, 2799).
+-define(wxJoystickEvent_GetButtonChange, 2800).
+-define(wxJoystickEvent_GetButtonState, 2801).
+-define(wxJoystickEvent_GetJoystick, 2802).
+-define(wxJoystickEvent_GetPosition, 2803).
+-define(wxJoystickEvent_GetZPosition, 2804).
+-define(wxJoystickEvent_IsButton, 2805).
+-define(wxJoystickEvent_IsMove, 2806).
+-define(wxJoystickEvent_IsZMove, 2807).
+-define(wxUpdateUIEvent_CanUpdate, 2808).
+-define(wxUpdateUIEvent_Check, 2809).
+-define(wxUpdateUIEvent_Enable, 2810).
+-define(wxUpdateUIEvent_Show, 2811).
+-define(wxUpdateUIEvent_GetChecked, 2812).
+-define(wxUpdateUIEvent_GetEnabled, 2813).
+-define(wxUpdateUIEvent_GetShown, 2814).
+-define(wxUpdateUIEvent_GetSetChecked, 2815).
+-define(wxUpdateUIEvent_GetSetEnabled, 2816).
+-define(wxUpdateUIEvent_GetSetShown, 2817).
+-define(wxUpdateUIEvent_GetSetText, 2818).
+-define(wxUpdateUIEvent_GetText, 2819).
+-define(wxUpdateUIEvent_GetMode, 2820).
+-define(wxUpdateUIEvent_GetUpdateInterval, 2821).
+-define(wxUpdateUIEvent_ResetUpdateTime, 2822).
+-define(wxUpdateUIEvent_SetMode, 2823).
+-define(wxUpdateUIEvent_SetText, 2824).
+-define(wxUpdateUIEvent_SetUpdateInterval, 2825).
+-define(wxMouseCaptureChangedEvent_GetCapturedWindow, 2826).
+-define(wxPaletteChangedEvent_SetChangedWindow, 2827).
+-define(wxPaletteChangedEvent_GetChangedWindow, 2828).
+-define(wxQueryNewPaletteEvent_SetPaletteRealized, 2829).
+-define(wxQueryNewPaletteEvent_GetPaletteRealized, 2830).
+-define(wxNavigationKeyEvent_GetDirection, 2831).
+-define(wxNavigationKeyEvent_SetDirection, 2832).
+-define(wxNavigationKeyEvent_IsWindowChange, 2833).
+-define(wxNavigationKeyEvent_SetWindowChange, 2834).
+-define(wxNavigationKeyEvent_IsFromTab, 2835).
+-define(wxNavigationKeyEvent_SetFromTab, 2836).
+-define(wxNavigationKeyEvent_GetCurrentFocus, 2837).
+-define(wxNavigationKeyEvent_SetCurrentFocus, 2838).
+-define(wxHelpEvent_GetOrigin, 2839).
+-define(wxHelpEvent_GetPosition, 2840).
+-define(wxHelpEvent_SetOrigin, 2841).
+-define(wxHelpEvent_SetPosition, 2842).
+-define(wxContextMenuEvent_GetPosition, 2843).
+-define(wxContextMenuEvent_SetPosition, 2844).
+-define(wxIdleEvent_CanSend, 2845).
+-define(wxIdleEvent_GetMode, 2846).
+-define(wxIdleEvent_RequestMore, 2847).
+-define(wxIdleEvent_MoreRequested, 2848).
+-define(wxIdleEvent_SetMode, 2849).
+-define(wxGridEvent_AltDown, 2850).
+-define(wxGridEvent_ControlDown, 2851).
+-define(wxGridEvent_GetCol, 2852).
+-define(wxGridEvent_GetPosition, 2853).
+-define(wxGridEvent_GetRow, 2854).
+-define(wxGridEvent_MetaDown, 2855).
+-define(wxGridEvent_Selecting, 2856).
+-define(wxGridEvent_ShiftDown, 2857).
+-define(wxNotifyEvent_Allow, 2858).
+-define(wxNotifyEvent_IsAllowed, 2859).
+-define(wxNotifyEvent_Veto, 2860).
+-define(wxSashEvent_GetEdge, 2861).
+-define(wxSashEvent_GetDragRect, 2862).
+-define(wxSashEvent_GetDragStatus, 2863).
+-define(wxListEvent_GetCacheFrom, 2864).
+-define(wxListEvent_GetCacheTo, 2865).
+-define(wxListEvent_GetKeyCode, 2866).
+-define(wxListEvent_GetIndex, 2867).
+-define(wxListEvent_GetColumn, 2868).
+-define(wxListEvent_GetPoint, 2869).
+-define(wxListEvent_GetLabel, 2870).
+-define(wxListEvent_GetText, 2871).
+-define(wxListEvent_GetImage, 2872).
+-define(wxListEvent_GetData, 2873).
+-define(wxListEvent_GetMask, 2874).
+-define(wxListEvent_GetItem, 2875).
+-define(wxListEvent_IsEditCancelled, 2876).
+-define(wxDateEvent_GetDate, 2877).
+-define(wxCalendarEvent_GetWeekDay, 2878).
+-define(wxFileDirPickerEvent_GetPath, 2879).
+-define(wxColourPickerEvent_GetColour, 2880).
+-define(wxFontPickerEvent_GetFont, 2881).
+-define(wxStyledTextEvent_GetPosition, 2882).
+-define(wxStyledTextEvent_GetKey, 2883).
+-define(wxStyledTextEvent_GetModifiers, 2884).
+-define(wxStyledTextEvent_GetModificationType, 2885).
+-define(wxStyledTextEvent_GetText, 2886).
+-define(wxStyledTextEvent_GetLength, 2887).
+-define(wxStyledTextEvent_GetLinesAdded, 2888).
+-define(wxStyledTextEvent_GetLine, 2889).
+-define(wxStyledTextEvent_GetFoldLevelNow, 2890).
+-define(wxStyledTextEvent_GetFoldLevelPrev, 2891).
+-define(wxStyledTextEvent_GetMargin, 2892).
+-define(wxStyledTextEvent_GetMessage, 2893).
+-define(wxStyledTextEvent_GetWParam, 2894).
+-define(wxStyledTextEvent_GetLParam, 2895).
+-define(wxStyledTextEvent_GetListType, 2896).
+-define(wxStyledTextEvent_GetX, 2897).
+-define(wxStyledTextEvent_GetY, 2898).
+-define(wxStyledTextEvent_GetDragText, 2899).
+-define(wxStyledTextEvent_GetDragAllowMove, 2900).
+-define(wxStyledTextEvent_GetDragResult, 2901).
+-define(wxStyledTextEvent_GetShift, 2902).
+-define(wxStyledTextEvent_GetControl, 2903).
+-define(wxStyledTextEvent_GetAlt, 2904).
+-define(utils_wxGetKeyState, 2905).
+-define(utils_wxGetMousePosition, 2906).
+-define(utils_wxGetMouseState, 2907).
+-define(utils_wxSetDetectableAutoRepeat, 2908).
+-define(utils_wxBell, 2909).
+-define(utils_wxFindMenuItemId, 2910).
+-define(utils_wxGenericFindWindowAtPoint, 2911).
+-define(utils_wxFindWindowAtPoint, 2912).
+-define(utils_wxBeginBusyCursor, 2913).
+-define(utils_wxEndBusyCursor, 2914).
+-define(utils_wxIsBusy, 2915).
+-define(utils_wxShutdown, 2916).
+-define(utils_wxShell, 2917).
+-define(utils_wxLaunchDefaultBrowser, 2918).
+-define(utils_wxGetEmailAddress, 2919).
+-define(utils_wxGetUserId, 2920).
+-define(utils_wxGetHomeDir, 2921).
+-define(utils_wxNewId, 2922).
+-define(utils_wxRegisterId, 2923).
+-define(utils_wxGetCurrentId, 2924).
+-define(utils_wxGetOsDescription, 2925).
+-define(utils_wxIsPlatformLittleEndian, 2926).
+-define(utils_wxIsPlatform64Bit, 2927).
+-define(gdicmn_wxDisplaySize, 2928).
+-define(gdicmn_wxSetCursor, 2929).
+-define(wxPrintout_new, 2930).
+-define(wxPrintout_destruct, 2931).
+-define(wxPrintout_GetDC, 2932).
+-define(wxPrintout_GetPageSizeMM, 2933).
+-define(wxPrintout_GetPageSizePixels, 2934).
+-define(wxPrintout_GetPaperRectPixels, 2935).
+-define(wxPrintout_GetPPIPrinter, 2936).
+-define(wxPrintout_GetPPIScreen, 2937).
+-define(wxPrintout_GetTitle, 2938).
+-define(wxPrintout_IsPreview, 2939).
+-define(wxPrintout_FitThisSizeToPaper, 2940).
+-define(wxPrintout_FitThisSizeToPage, 2941).
+-define(wxPrintout_FitThisSizeToPageMargins, 2942).
+-define(wxPrintout_MapScreenSizeToPaper, 2943).
+-define(wxPrintout_MapScreenSizeToPage, 2944).
+-define(wxPrintout_MapScreenSizeToPageMargins, 2945).
+-define(wxPrintout_MapScreenSizeToDevice, 2946).
+-define(wxPrintout_GetLogicalPaperRect, 2947).
+-define(wxPrintout_GetLogicalPageRect, 2948).
+-define(wxPrintout_GetLogicalPageMarginsRect, 2949).
+-define(wxPrintout_SetLogicalOrigin, 2950).
+-define(wxPrintout_OffsetLogicalOrigin, 2951).
+-define(wxStyledTextCtrl_new_2, 2952).
+-define(wxStyledTextCtrl_new_0, 2953).
+-define(wxStyledTextCtrl_destruct, 2954).
+-define(wxStyledTextCtrl_Create, 2955).
+-define(wxStyledTextCtrl_AddText, 2956).
+-define(wxStyledTextCtrl_AddStyledText, 2957).
+-define(wxStyledTextCtrl_InsertText, 2958).
+-define(wxStyledTextCtrl_ClearAll, 2959).
+-define(wxStyledTextCtrl_ClearDocumentStyle, 2960).
+-define(wxStyledTextCtrl_GetLength, 2961).
+-define(wxStyledTextCtrl_GetCharAt, 2962).
+-define(wxStyledTextCtrl_GetCurrentPos, 2963).
+-define(wxStyledTextCtrl_GetAnchor, 2964).
+-define(wxStyledTextCtrl_GetStyleAt, 2965).
+-define(wxStyledTextCtrl_Redo, 2966).
+-define(wxStyledTextCtrl_SetUndoCollection, 2967).
+-define(wxStyledTextCtrl_SelectAll, 2968).
+-define(wxStyledTextCtrl_SetSavePoint, 2969).
+-define(wxStyledTextCtrl_GetStyledText, 2970).
+-define(wxStyledTextCtrl_CanRedo, 2971).
+-define(wxStyledTextCtrl_MarkerLineFromHandle, 2972).
+-define(wxStyledTextCtrl_MarkerDeleteHandle, 2973).
+-define(wxStyledTextCtrl_GetUndoCollection, 2974).
+-define(wxStyledTextCtrl_GetViewWhiteSpace, 2975).
+-define(wxStyledTextCtrl_SetViewWhiteSpace, 2976).
+-define(wxStyledTextCtrl_PositionFromPoint, 2977).
+-define(wxStyledTextCtrl_PositionFromPointClose, 2978).
+-define(wxStyledTextCtrl_GotoLine, 2979).
+-define(wxStyledTextCtrl_GotoPos, 2980).
+-define(wxStyledTextCtrl_SetAnchor, 2981).
+-define(wxStyledTextCtrl_GetCurLine, 2982).
+-define(wxStyledTextCtrl_GetEndStyled, 2983).
+-define(wxStyledTextCtrl_ConvertEOLs, 2984).
+-define(wxStyledTextCtrl_GetEOLMode, 2985).
+-define(wxStyledTextCtrl_SetEOLMode, 2986).
+-define(wxStyledTextCtrl_StartStyling, 2987).
+-define(wxStyledTextCtrl_SetStyling, 2988).
+-define(wxStyledTextCtrl_GetBufferedDraw, 2989).
+-define(wxStyledTextCtrl_SetBufferedDraw, 2990).
+-define(wxStyledTextCtrl_SetTabWidth, 2991).
+-define(wxStyledTextCtrl_GetTabWidth, 2992).
+-define(wxStyledTextCtrl_SetCodePage, 2993).
+-define(wxStyledTextCtrl_MarkerDefine, 2994).
+-define(wxStyledTextCtrl_MarkerSetForeground, 2995).
+-define(wxStyledTextCtrl_MarkerSetBackground, 2996).
+-define(wxStyledTextCtrl_MarkerAdd, 2997).
+-define(wxStyledTextCtrl_MarkerDelete, 2998).
+-define(wxStyledTextCtrl_MarkerDeleteAll, 2999).
+-define(wxStyledTextCtrl_MarkerGet, 3000).
+-define(wxStyledTextCtrl_MarkerNext, 3001).
+-define(wxStyledTextCtrl_MarkerPrevious, 3002).
+-define(wxStyledTextCtrl_MarkerDefineBitmap, 3003).
+-define(wxStyledTextCtrl_MarkerAddSet, 3004).
+-define(wxStyledTextCtrl_MarkerSetAlpha, 3005).
+-define(wxStyledTextCtrl_SetMarginType, 3006).
+-define(wxStyledTextCtrl_GetMarginType, 3007).
+-define(wxStyledTextCtrl_SetMarginWidth, 3008).
+-define(wxStyledTextCtrl_GetMarginWidth, 3009).
+-define(wxStyledTextCtrl_SetMarginMask, 3010).
+-define(wxStyledTextCtrl_GetMarginMask, 3011).
+-define(wxStyledTextCtrl_SetMarginSensitive, 3012).
+-define(wxStyledTextCtrl_GetMarginSensitive, 3013).
+-define(wxStyledTextCtrl_StyleClearAll, 3014).
+-define(wxStyledTextCtrl_StyleSetForeground, 3015).
+-define(wxStyledTextCtrl_StyleSetBackground, 3016).
+-define(wxStyledTextCtrl_StyleSetBold, 3017).
+-define(wxStyledTextCtrl_StyleSetItalic, 3018).
+-define(wxStyledTextCtrl_StyleSetSize, 3019).
+-define(wxStyledTextCtrl_StyleSetFaceName, 3020).
+-define(wxStyledTextCtrl_StyleSetEOLFilled, 3021).
+-define(wxStyledTextCtrl_StyleResetDefault, 3022).
+-define(wxStyledTextCtrl_StyleSetUnderline, 3023).
+-define(wxStyledTextCtrl_StyleSetCase, 3024).
+-define(wxStyledTextCtrl_StyleSetHotSpot, 3025).
+-define(wxStyledTextCtrl_SetSelForeground, 3026).
+-define(wxStyledTextCtrl_SetSelBackground, 3027).
+-define(wxStyledTextCtrl_GetSelAlpha, 3028).
+-define(wxStyledTextCtrl_SetSelAlpha, 3029).
+-define(wxStyledTextCtrl_SetCaretForeground, 3030).
+-define(wxStyledTextCtrl_CmdKeyAssign, 3031).
+-define(wxStyledTextCtrl_CmdKeyClear, 3032).
+-define(wxStyledTextCtrl_CmdKeyClearAll, 3033).
+-define(wxStyledTextCtrl_SetStyleBytes, 3034).
+-define(wxStyledTextCtrl_StyleSetVisible, 3035).
+-define(wxStyledTextCtrl_GetCaretPeriod, 3036).
+-define(wxStyledTextCtrl_SetCaretPeriod, 3037).
+-define(wxStyledTextCtrl_SetWordChars, 3038).
+-define(wxStyledTextCtrl_BeginUndoAction, 3039).
+-define(wxStyledTextCtrl_EndUndoAction, 3040).
+-define(wxStyledTextCtrl_IndicatorSetStyle, 3041).
+-define(wxStyledTextCtrl_IndicatorGetStyle, 3042).
+-define(wxStyledTextCtrl_IndicatorSetForeground, 3043).
+-define(wxStyledTextCtrl_IndicatorGetForeground, 3044).
+-define(wxStyledTextCtrl_SetWhitespaceForeground, 3045).
+-define(wxStyledTextCtrl_SetWhitespaceBackground, 3046).
+-define(wxStyledTextCtrl_GetStyleBits, 3047).
+-define(wxStyledTextCtrl_SetLineState, 3048).
+-define(wxStyledTextCtrl_GetLineState, 3049).
+-define(wxStyledTextCtrl_GetMaxLineState, 3050).
+-define(wxStyledTextCtrl_GetCaretLineVisible, 3051).
+-define(wxStyledTextCtrl_SetCaretLineVisible, 3052).
+-define(wxStyledTextCtrl_GetCaretLineBackground, 3053).
+-define(wxStyledTextCtrl_SetCaretLineBackground, 3054).
+-define(wxStyledTextCtrl_AutoCompShow, 3055).
+-define(wxStyledTextCtrl_AutoCompCancel, 3056).
+-define(wxStyledTextCtrl_AutoCompActive, 3057).
+-define(wxStyledTextCtrl_AutoCompPosStart, 3058).
+-define(wxStyledTextCtrl_AutoCompComplete, 3059).
+-define(wxStyledTextCtrl_AutoCompStops, 3060).
+-define(wxStyledTextCtrl_AutoCompSetSeparator, 3061).
+-define(wxStyledTextCtrl_AutoCompGetSeparator, 3062).
+-define(wxStyledTextCtrl_AutoCompSelect, 3063).
+-define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3064).
+-define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3065).
+-define(wxStyledTextCtrl_AutoCompSetFillUps, 3066).
+-define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3067).
+-define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3068).
+-define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3069).
+-define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3070).
+-define(wxStyledTextCtrl_UserListShow, 3071).
+-define(wxStyledTextCtrl_AutoCompSetAutoHide, 3072).
+-define(wxStyledTextCtrl_AutoCompGetAutoHide, 3073).
+-define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3074).
+-define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3075).
+-define(wxStyledTextCtrl_RegisterImage, 3076).
+-define(wxStyledTextCtrl_ClearRegisteredImages, 3077).
+-define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3078).
+-define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3079).
+-define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3080).
+-define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3081).
+-define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3082).
+-define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3083).
+-define(wxStyledTextCtrl_SetIndent, 3084).
+-define(wxStyledTextCtrl_GetIndent, 3085).
+-define(wxStyledTextCtrl_SetUseTabs, 3086).
+-define(wxStyledTextCtrl_GetUseTabs, 3087).
+-define(wxStyledTextCtrl_SetLineIndentation, 3088).
+-define(wxStyledTextCtrl_GetLineIndentation, 3089).
+-define(wxStyledTextCtrl_GetLineIndentPosition, 3090).
+-define(wxStyledTextCtrl_GetColumn, 3091).
+-define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3092).
+-define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3093).
+-define(wxStyledTextCtrl_SetIndentationGuides, 3094).
+-define(wxStyledTextCtrl_GetIndentationGuides, 3095).
+-define(wxStyledTextCtrl_SetHighlightGuide, 3096).
+-define(wxStyledTextCtrl_GetHighlightGuide, 3097).
+-define(wxStyledTextCtrl_GetLineEndPosition, 3098).
+-define(wxStyledTextCtrl_GetCodePage, 3099).
+-define(wxStyledTextCtrl_GetCaretForeground, 3100).
+-define(wxStyledTextCtrl_GetReadOnly, 3101).
+-define(wxStyledTextCtrl_SetCurrentPos, 3102).
+-define(wxStyledTextCtrl_SetSelectionStart, 3103).
+-define(wxStyledTextCtrl_GetSelectionStart, 3104).
+-define(wxStyledTextCtrl_SetSelectionEnd, 3105).
+-define(wxStyledTextCtrl_GetSelectionEnd, 3106).
+-define(wxStyledTextCtrl_SetPrintMagnification, 3107).
+-define(wxStyledTextCtrl_GetPrintMagnification, 3108).
+-define(wxStyledTextCtrl_SetPrintColourMode, 3109).
+-define(wxStyledTextCtrl_GetPrintColourMode, 3110).
+-define(wxStyledTextCtrl_FindText, 3111).
+-define(wxStyledTextCtrl_FormatRange, 3112).
+-define(wxStyledTextCtrl_GetFirstVisibleLine, 3113).
+-define(wxStyledTextCtrl_GetLine, 3114).
+-define(wxStyledTextCtrl_GetLineCount, 3115).
+-define(wxStyledTextCtrl_SetMarginLeft, 3116).
+-define(wxStyledTextCtrl_GetMarginLeft, 3117).
+-define(wxStyledTextCtrl_SetMarginRight, 3118).
+-define(wxStyledTextCtrl_GetMarginRight, 3119).
+-define(wxStyledTextCtrl_GetModify, 3120).
+-define(wxStyledTextCtrl_SetSelection, 3121).
+-define(wxStyledTextCtrl_GetSelectedText, 3122).
+-define(wxStyledTextCtrl_GetTextRange, 3123).
+-define(wxStyledTextCtrl_HideSelection, 3124).
+-define(wxStyledTextCtrl_LineFromPosition, 3125).
+-define(wxStyledTextCtrl_PositionFromLine, 3126).
+-define(wxStyledTextCtrl_LineScroll, 3127).
+-define(wxStyledTextCtrl_EnsureCaretVisible, 3128).
+-define(wxStyledTextCtrl_ReplaceSelection, 3129).
+-define(wxStyledTextCtrl_SetReadOnly, 3130).
+-define(wxStyledTextCtrl_CanPaste, 3131).
+-define(wxStyledTextCtrl_CanUndo, 3132).
+-define(wxStyledTextCtrl_EmptyUndoBuffer, 3133).
+-define(wxStyledTextCtrl_Undo, 3134).
+-define(wxStyledTextCtrl_Cut, 3135).
+-define(wxStyledTextCtrl_Copy, 3136).
+-define(wxStyledTextCtrl_Paste, 3137).
+-define(wxStyledTextCtrl_Clear, 3138).
+-define(wxStyledTextCtrl_SetText, 3139).
+-define(wxStyledTextCtrl_GetText, 3140).
+-define(wxStyledTextCtrl_GetTextLength, 3141).
+-define(wxStyledTextCtrl_GetOvertype, 3142).
+-define(wxStyledTextCtrl_SetCaretWidth, 3143).
+-define(wxStyledTextCtrl_GetCaretWidth, 3144).
+-define(wxStyledTextCtrl_SetTargetStart, 3145).
+-define(wxStyledTextCtrl_GetTargetStart, 3146).
+-define(wxStyledTextCtrl_SetTargetEnd, 3147).
+-define(wxStyledTextCtrl_GetTargetEnd, 3148).
+-define(wxStyledTextCtrl_ReplaceTarget, 3149).
+-define(wxStyledTextCtrl_SearchInTarget, 3150).
+-define(wxStyledTextCtrl_SetSearchFlags, 3151).
+-define(wxStyledTextCtrl_GetSearchFlags, 3152).
+-define(wxStyledTextCtrl_CallTipShow, 3153).
+-define(wxStyledTextCtrl_CallTipCancel, 3154).
+-define(wxStyledTextCtrl_CallTipActive, 3155).
+-define(wxStyledTextCtrl_CallTipPosAtStart, 3156).
+-define(wxStyledTextCtrl_CallTipSetHighlight, 3157).
+-define(wxStyledTextCtrl_CallTipSetBackground, 3158).
+-define(wxStyledTextCtrl_CallTipSetForeground, 3159).
+-define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3160).
+-define(wxStyledTextCtrl_CallTipUseStyle, 3161).
+-define(wxStyledTextCtrl_VisibleFromDocLine, 3162).
+-define(wxStyledTextCtrl_DocLineFromVisible, 3163).
+-define(wxStyledTextCtrl_WrapCount, 3164).
+-define(wxStyledTextCtrl_SetFoldLevel, 3165).
+-define(wxStyledTextCtrl_GetFoldLevel, 3166).
+-define(wxStyledTextCtrl_GetLastChild, 3167).
+-define(wxStyledTextCtrl_GetFoldParent, 3168).
+-define(wxStyledTextCtrl_ShowLines, 3169).
+-define(wxStyledTextCtrl_HideLines, 3170).
+-define(wxStyledTextCtrl_GetLineVisible, 3171).
+-define(wxStyledTextCtrl_SetFoldExpanded, 3172).
+-define(wxStyledTextCtrl_GetFoldExpanded, 3173).
+-define(wxStyledTextCtrl_ToggleFold, 3174).
+-define(wxStyledTextCtrl_EnsureVisible, 3175).
+-define(wxStyledTextCtrl_SetFoldFlags, 3176).
+-define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3177).
+-define(wxStyledTextCtrl_SetTabIndents, 3178).
+-define(wxStyledTextCtrl_GetTabIndents, 3179).
+-define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3180).
+-define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3181).
+-define(wxStyledTextCtrl_SetMouseDwellTime, 3182).
+-define(wxStyledTextCtrl_GetMouseDwellTime, 3183).
+-define(wxStyledTextCtrl_WordStartPosition, 3184).
+-define(wxStyledTextCtrl_WordEndPosition, 3185).
+-define(wxStyledTextCtrl_SetWrapMode, 3186).
+-define(wxStyledTextCtrl_GetWrapMode, 3187).
+-define(wxStyledTextCtrl_SetWrapVisualFlags, 3188).
+-define(wxStyledTextCtrl_GetWrapVisualFlags, 3189).
+-define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3190).
+-define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3191).
+-define(wxStyledTextCtrl_SetWrapStartIndent, 3192).
+-define(wxStyledTextCtrl_GetWrapStartIndent, 3193).
+-define(wxStyledTextCtrl_SetLayoutCache, 3194).
+-define(wxStyledTextCtrl_GetLayoutCache, 3195).
+-define(wxStyledTextCtrl_SetScrollWidth, 3196).
+-define(wxStyledTextCtrl_GetScrollWidth, 3197).
+-define(wxStyledTextCtrl_TextWidth, 3198).
+-define(wxStyledTextCtrl_GetEndAtLastLine, 3199).
+-define(wxStyledTextCtrl_TextHeight, 3200).
+-define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3201).
+-define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3202).
+-define(wxStyledTextCtrl_AppendText, 3203).
+-define(wxStyledTextCtrl_GetTwoPhaseDraw, 3204).
+-define(wxStyledTextCtrl_SetTwoPhaseDraw, 3205).
+-define(wxStyledTextCtrl_TargetFromSelection, 3206).
+-define(wxStyledTextCtrl_LinesJoin, 3207).
+-define(wxStyledTextCtrl_LinesSplit, 3208).
+-define(wxStyledTextCtrl_SetFoldMarginColour, 3209).
+-define(wxStyledTextCtrl_SetFoldMarginHiColour, 3210).
+-define(wxStyledTextCtrl_LineDown, 3211).
+-define(wxStyledTextCtrl_LineDownExtend, 3212).
+-define(wxStyledTextCtrl_LineUp, 3213).
+-define(wxStyledTextCtrl_LineUpExtend, 3214).
+-define(wxStyledTextCtrl_CharLeft, 3215).
+-define(wxStyledTextCtrl_CharLeftExtend, 3216).
+-define(wxStyledTextCtrl_CharRight, 3217).
+-define(wxStyledTextCtrl_CharRightExtend, 3218).
+-define(wxStyledTextCtrl_WordLeft, 3219).
+-define(wxStyledTextCtrl_WordLeftExtend, 3220).
+-define(wxStyledTextCtrl_WordRight, 3221).
+-define(wxStyledTextCtrl_WordRightExtend, 3222).
+-define(wxStyledTextCtrl_Home, 3223).
+-define(wxStyledTextCtrl_HomeExtend, 3224).
+-define(wxStyledTextCtrl_LineEnd, 3225).
+-define(wxStyledTextCtrl_LineEndExtend, 3226).
+-define(wxStyledTextCtrl_DocumentStart, 3227).
+-define(wxStyledTextCtrl_DocumentStartExtend, 3228).
+-define(wxStyledTextCtrl_DocumentEnd, 3229).
+-define(wxStyledTextCtrl_DocumentEndExtend, 3230).
+-define(wxStyledTextCtrl_PageUp, 3231).
+-define(wxStyledTextCtrl_PageUpExtend, 3232).
+-define(wxStyledTextCtrl_PageDown, 3233).
+-define(wxStyledTextCtrl_PageDownExtend, 3234).
+-define(wxStyledTextCtrl_EditToggleOvertype, 3235).
+-define(wxStyledTextCtrl_Cancel, 3236).
+-define(wxStyledTextCtrl_DeleteBack, 3237).
+-define(wxStyledTextCtrl_Tab, 3238).
+-define(wxStyledTextCtrl_BackTab, 3239).
+-define(wxStyledTextCtrl_NewLine, 3240).
+-define(wxStyledTextCtrl_FormFeed, 3241).
+-define(wxStyledTextCtrl_VCHome, 3242).
+-define(wxStyledTextCtrl_VCHomeExtend, 3243).
+-define(wxStyledTextCtrl_ZoomIn, 3244).
+-define(wxStyledTextCtrl_ZoomOut, 3245).
+-define(wxStyledTextCtrl_DelWordLeft, 3246).
+-define(wxStyledTextCtrl_DelWordRight, 3247).
+-define(wxStyledTextCtrl_LineCut, 3248).
+-define(wxStyledTextCtrl_LineDelete, 3249).
+-define(wxStyledTextCtrl_LineTranspose, 3250).
+-define(wxStyledTextCtrl_LineDuplicate, 3251).
+-define(wxStyledTextCtrl_LowerCase, 3252).
+-define(wxStyledTextCtrl_UpperCase, 3253).
+-define(wxStyledTextCtrl_LineScrollDown, 3254).
+-define(wxStyledTextCtrl_LineScrollUp, 3255).
+-define(wxStyledTextCtrl_DeleteBackNotLine, 3256).
+-define(wxStyledTextCtrl_HomeDisplay, 3257).
+-define(wxStyledTextCtrl_HomeDisplayExtend, 3258).
+-define(wxStyledTextCtrl_LineEndDisplay, 3259).
+-define(wxStyledTextCtrl_LineEndDisplayExtend, 3260).
+-define(wxStyledTextCtrl_HomeWrapExtend, 3261).
+-define(wxStyledTextCtrl_LineEndWrap, 3262).
+-define(wxStyledTextCtrl_LineEndWrapExtend, 3263).
+-define(wxStyledTextCtrl_VCHomeWrap, 3264).
+-define(wxStyledTextCtrl_VCHomeWrapExtend, 3265).
+-define(wxStyledTextCtrl_LineCopy, 3266).
+-define(wxStyledTextCtrl_MoveCaretInsideView, 3267).
+-define(wxStyledTextCtrl_LineLength, 3268).
+-define(wxStyledTextCtrl_BraceHighlight, 3269).
+-define(wxStyledTextCtrl_BraceBadLight, 3270).
+-define(wxStyledTextCtrl_BraceMatch, 3271).
+-define(wxStyledTextCtrl_GetViewEOL, 3272).
+-define(wxStyledTextCtrl_SetViewEOL, 3273).
+-define(wxStyledTextCtrl_SetModEventMask, 3274).
+-define(wxStyledTextCtrl_GetEdgeColumn, 3275).
+-define(wxStyledTextCtrl_SetEdgeColumn, 3276).
+-define(wxStyledTextCtrl_SetEdgeMode, 3277).
+-define(wxStyledTextCtrl_GetEdgeMode, 3278).
+-define(wxStyledTextCtrl_GetEdgeColour, 3279).
+-define(wxStyledTextCtrl_SetEdgeColour, 3280).
+-define(wxStyledTextCtrl_SearchAnchor, 3281).
+-define(wxStyledTextCtrl_SearchNext, 3282).
+-define(wxStyledTextCtrl_SearchPrev, 3283).
+-define(wxStyledTextCtrl_LinesOnScreen, 3284).
+-define(wxStyledTextCtrl_UsePopUp, 3285).
+-define(wxStyledTextCtrl_SelectionIsRectangle, 3286).
+-define(wxStyledTextCtrl_SetZoom, 3287).
+-define(wxStyledTextCtrl_GetZoom, 3288).
+-define(wxStyledTextCtrl_GetModEventMask, 3289).
+-define(wxStyledTextCtrl_SetSTCFocus, 3290).
+-define(wxStyledTextCtrl_GetSTCFocus, 3291).
+-define(wxStyledTextCtrl_SetStatus, 3292).
+-define(wxStyledTextCtrl_GetStatus, 3293).
+-define(wxStyledTextCtrl_SetMouseDownCaptures, 3294).
+-define(wxStyledTextCtrl_GetMouseDownCaptures, 3295).
+-define(wxStyledTextCtrl_SetSTCCursor, 3296).
+-define(wxStyledTextCtrl_GetSTCCursor, 3297).
+-define(wxStyledTextCtrl_SetControlCharSymbol, 3298).
+-define(wxStyledTextCtrl_GetControlCharSymbol, 3299).
+-define(wxStyledTextCtrl_WordPartLeft, 3300).
+-define(wxStyledTextCtrl_WordPartLeftExtend, 3301).
+-define(wxStyledTextCtrl_WordPartRight, 3302).
+-define(wxStyledTextCtrl_WordPartRightExtend, 3303).
+-define(wxStyledTextCtrl_SetVisiblePolicy, 3304).
+-define(wxStyledTextCtrl_DelLineLeft, 3305).
+-define(wxStyledTextCtrl_DelLineRight, 3306).
+-define(wxStyledTextCtrl_GetXOffset, 3307).
+-define(wxStyledTextCtrl_ChooseCaretX, 3308).
+-define(wxStyledTextCtrl_SetXCaretPolicy, 3309).
+-define(wxStyledTextCtrl_SetYCaretPolicy, 3310).
+-define(wxStyledTextCtrl_GetPrintWrapMode, 3311).
+-define(wxStyledTextCtrl_SetHotspotActiveForeground, 3312).
+-define(wxStyledTextCtrl_SetHotspotActiveBackground, 3313).
+-define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3314).
+-define(wxStyledTextCtrl_SetHotspotSingleLine, 3315).
+-define(wxStyledTextCtrl_ParaDownExtend, 3316).
+-define(wxStyledTextCtrl_ParaUp, 3317).
+-define(wxStyledTextCtrl_ParaUpExtend, 3318).
+-define(wxStyledTextCtrl_PositionBefore, 3319).
+-define(wxStyledTextCtrl_PositionAfter, 3320).
+-define(wxStyledTextCtrl_CopyRange, 3321).
+-define(wxStyledTextCtrl_CopyText, 3322).
+-define(wxStyledTextCtrl_SetSelectionMode, 3323).
+-define(wxStyledTextCtrl_GetSelectionMode, 3324).
+-define(wxStyledTextCtrl_LineDownRectExtend, 3325).
+-define(wxStyledTextCtrl_LineUpRectExtend, 3326).
+-define(wxStyledTextCtrl_CharLeftRectExtend, 3327).
+-define(wxStyledTextCtrl_CharRightRectExtend, 3328).
+-define(wxStyledTextCtrl_HomeRectExtend, 3329).
+-define(wxStyledTextCtrl_VCHomeRectExtend, 3330).
+-define(wxStyledTextCtrl_LineEndRectExtend, 3331).
+-define(wxStyledTextCtrl_PageUpRectExtend, 3332).
+-define(wxStyledTextCtrl_PageDownRectExtend, 3333).
+-define(wxStyledTextCtrl_StutteredPageUp, 3334).
+-define(wxStyledTextCtrl_StutteredPageUpExtend, 3335).
+-define(wxStyledTextCtrl_StutteredPageDown, 3336).
+-define(wxStyledTextCtrl_StutteredPageDownExtend, 3337).
+-define(wxStyledTextCtrl_WordLeftEnd, 3338).
+-define(wxStyledTextCtrl_WordLeftEndExtend, 3339).
+-define(wxStyledTextCtrl_WordRightEnd, 3340).
+-define(wxStyledTextCtrl_WordRightEndExtend, 3341).
+-define(wxStyledTextCtrl_SetWhitespaceChars, 3342).
+-define(wxStyledTextCtrl_SetCharsDefault, 3343).
+-define(wxStyledTextCtrl_AutoCompGetCurrent, 3344).
+-define(wxStyledTextCtrl_Allocate, 3345).
+-define(wxStyledTextCtrl_FindColumn, 3346).
+-define(wxStyledTextCtrl_GetCaretSticky, 3347).
+-define(wxStyledTextCtrl_SetCaretSticky, 3348).
+-define(wxStyledTextCtrl_ToggleCaretSticky, 3349).
+-define(wxStyledTextCtrl_SetPasteConvertEndings, 3350).
+-define(wxStyledTextCtrl_GetPasteConvertEndings, 3351).
+-define(wxStyledTextCtrl_SelectionDuplicate, 3352).
+-define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3353).
+-define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3354).
+-define(wxStyledTextCtrl_StartRecord, 3355).
+-define(wxStyledTextCtrl_StopRecord, 3356).
+-define(wxStyledTextCtrl_SetLexer, 3357).
+-define(wxStyledTextCtrl_GetLexer, 3358).
+-define(wxStyledTextCtrl_Colourise, 3359).
+-define(wxStyledTextCtrl_SetProperty, 3360).
+-define(wxStyledTextCtrl_SetKeyWords, 3361).
+-define(wxStyledTextCtrl_SetLexerLanguage, 3362).
+-define(wxStyledTextCtrl_GetProperty, 3363).
+-define(wxStyledTextCtrl_GetStyleBitsNeeded, 3364).
+-define(wxStyledTextCtrl_GetCurrentLine, 3365).
+-define(wxStyledTextCtrl_StyleSetSpec, 3366).
+-define(wxStyledTextCtrl_StyleSetFont, 3367).
+-define(wxStyledTextCtrl_StyleSetFontAttr, 3368).
+-define(wxStyledTextCtrl_StyleSetCharacterSet, 3369).
+-define(wxStyledTextCtrl_StyleSetFontEncoding, 3370).
+-define(wxStyledTextCtrl_CmdKeyExecute, 3371).
+-define(wxStyledTextCtrl_SetMargins, 3372).
+-define(wxStyledTextCtrl_GetSelection, 3373).
+-define(wxStyledTextCtrl_PointFromPosition, 3374).
+-define(wxStyledTextCtrl_ScrollToLine, 3375).
+-define(wxStyledTextCtrl_ScrollToColumn, 3376).
+-define(wxStyledTextCtrl_SetVScrollBar, 3377).
+-define(wxStyledTextCtrl_SetHScrollBar, 3378).
+-define(wxStyledTextCtrl_GetLastKeydownProcessed, 3379).
+-define(wxStyledTextCtrl_SetLastKeydownProcessed, 3380).
+-define(wxStyledTextCtrl_SaveFile, 3381).
+-define(wxStyledTextCtrl_LoadFile, 3382).
+-define(wxStyledTextCtrl_DoDragOver, 3383).
+-define(wxStyledTextCtrl_DoDropText, 3384).
+-define(wxStyledTextCtrl_GetUseAntiAliasing, 3385).
+-define(wxStyledTextCtrl_AddTextRaw, 3386).
+-define(wxStyledTextCtrl_InsertTextRaw, 3387).
+-define(wxStyledTextCtrl_GetCurLineRaw, 3388).
+-define(wxStyledTextCtrl_GetLineRaw, 3389).
+-define(wxStyledTextCtrl_GetSelectedTextRaw, 3390).
+-define(wxStyledTextCtrl_GetTextRangeRaw, 3391).
+-define(wxStyledTextCtrl_SetTextRaw, 3392).
+-define(wxStyledTextCtrl_GetTextRaw, 3393).
+-define(wxStyledTextCtrl_AppendTextRaw, 3394).
+-define(wxArtProvider_GetBitmap, 3395).
+-define(wxArtProvider_GetIcon, 3396).
+-define(wxTreeEvent_GetKeyCode, 3397).
+-define(wxTreeEvent_GetItem, 3398).
+-define(wxTreeEvent_GetKeyEvent, 3399).
+-define(wxTreeEvent_GetLabel, 3400).
+-define(wxTreeEvent_GetOldItem, 3401).
+-define(wxTreeEvent_GetPoint, 3402).
+-define(wxTreeEvent_IsEditCancelled, 3403).
+-define(wxTreeEvent_SetToolTip, 3404).
+-define(wxNotebookEvent_GetOldSelection, 3405).
+-define(wxNotebookEvent_GetSelection, 3406).
+-define(wxNotebookEvent_SetOldSelection, 3407).
+-define(wxNotebookEvent_SetSelection, 3408).
+-define(wxFileDataObject_new, 3409).
+-define(wxFileDataObject_AddFile, 3410).
+-define(wxFileDataObject_GetFilenames, 3411).
+-define(wxFileDataObject_destroy, 3412).
+-define(wxTextDataObject_new, 3413).
+-define(wxTextDataObject_GetTextLength, 3414).
+-define(wxTextDataObject_GetText, 3415).
+-define(wxTextDataObject_SetText, 3416).
+-define(wxTextDataObject_destroy, 3417).
+-define(wxBitmapDataObject_new_1_1, 3418).
+-define(wxBitmapDataObject_new_1_0, 3419).
+-define(wxBitmapDataObject_GetBitmap, 3420).
+-define(wxBitmapDataObject_SetBitmap, 3421).
+-define(wxBitmapDataObject_destroy, 3422).
+-define(wxClipboard_new, 3424).
+-define(wxClipboard_destruct, 3425).
+-define(wxClipboard_AddData, 3426).
+-define(wxClipboard_Clear, 3427).
+-define(wxClipboard_Close, 3428).
+-define(wxClipboard_Flush, 3429).
+-define(wxClipboard_GetData, 3430).
+-define(wxClipboard_IsOpened, 3431).
+-define(wxClipboard_Open, 3432).
+-define(wxClipboard_SetData, 3433).
+-define(wxClipboard_UsePrimarySelection, 3435).
+-define(wxClipboard_IsSupported, 3436).
+-define(wxClipboard_Get, 3437).
+-define(wxSpinEvent_GetPosition, 3438).
+-define(wxSpinEvent_SetPosition, 3439).
+-define(wxSplitterWindow_new_0, 3440).
+-define(wxSplitterWindow_new_2, 3441).
+-define(wxSplitterWindow_destruct, 3442).
+-define(wxSplitterWindow_Create, 3443).
+-define(wxSplitterWindow_GetMinimumPaneSize, 3444).
+-define(wxSplitterWindow_GetSashGravity, 3445).
+-define(wxSplitterWindow_GetSashPosition, 3446).
+-define(wxSplitterWindow_GetSplitMode, 3447).
+-define(wxSplitterWindow_GetWindow1, 3448).
+-define(wxSplitterWindow_GetWindow2, 3449).
+-define(wxSplitterWindow_Initialize, 3450).
+-define(wxSplitterWindow_IsSplit, 3451).
+-define(wxSplitterWindow_ReplaceWindow, 3452).
+-define(wxSplitterWindow_SetSashGravity, 3453).
+-define(wxSplitterWindow_SetSashPosition, 3454).
+-define(wxSplitterWindow_SetSashSize, 3455).
+-define(wxSplitterWindow_SetMinimumPaneSize, 3456).
+-define(wxSplitterWindow_SetSplitMode, 3457).
+-define(wxSplitterWindow_SplitHorizontally, 3458).
+-define(wxSplitterWindow_SplitVertically, 3459).
+-define(wxSplitterWindow_Unsplit, 3460).
+-define(wxSplitterWindow_UpdateSize, 3461).
+-define(wxSplitterEvent_GetSashPosition, 3462).
+-define(wxSplitterEvent_GetX, 3463).
+-define(wxSplitterEvent_GetY, 3464).
+-define(wxSplitterEvent_GetWindowBeingRemoved, 3465).
+-define(wxSplitterEvent_SetSashPosition, 3466).
+-define(wxHtmlWindow_new_0, 3467).
+-define(wxHtmlWindow_new_2, 3468).
+-define(wxHtmlWindow_AppendToPage, 3469).
+-define(wxHtmlWindow_GetOpenedAnchor, 3470).
+-define(wxHtmlWindow_GetOpenedPage, 3471).
+-define(wxHtmlWindow_GetOpenedPageTitle, 3472).
+-define(wxHtmlWindow_GetRelatedFrame, 3473).
+-define(wxHtmlWindow_HistoryBack, 3474).
+-define(wxHtmlWindow_HistoryCanBack, 3475).
+-define(wxHtmlWindow_HistoryCanForward, 3476).
+-define(wxHtmlWindow_HistoryClear, 3477).
+-define(wxHtmlWindow_HistoryForward, 3478).
+-define(wxHtmlWindow_LoadFile, 3479).
+-define(wxHtmlWindow_LoadPage, 3480).
+-define(wxHtmlWindow_SelectAll, 3481).
+-define(wxHtmlWindow_SelectionToText, 3482).
+-define(wxHtmlWindow_SelectLine, 3483).
+-define(wxHtmlWindow_SelectWord, 3484).
+-define(wxHtmlWindow_SetBorders, 3485).
+-define(wxHtmlWindow_SetFonts, 3486).
+-define(wxHtmlWindow_SetPage, 3487).
+-define(wxHtmlWindow_SetRelatedFrame, 3488).
+-define(wxHtmlWindow_SetRelatedStatusBar, 3489).
+-define(wxHtmlWindow_ToText, 3490).
+-define(wxHtmlWindow_destroy, 3491).
+-define(wxHtmlLinkEvent_GetLinkInfo, 3492).
+-define(wxSystemSettings_GetColour, 3493).
+-define(wxSystemSettings_GetFont, 3494).
+-define(wxSystemSettings_GetMetric, 3495).
+-define(wxSystemSettings_GetScreenType, 3496).
+-define(wxSystemOptions_GetOption, 3497).
+-define(wxSystemOptions_GetOptionInt, 3498).
+-define(wxSystemOptions_HasOption, 3499).
+-define(wxSystemOptions_IsFalse, 3500).
+-define(wxSystemOptions_SetOption_2_1, 3501).
+-define(wxSystemOptions_SetOption_2_0, 3502).
+-define(wxAuiNotebookEvent_SetSelection, 3503).
+-define(wxAuiNotebookEvent_GetSelection, 3504).
+-define(wxAuiNotebookEvent_SetOldSelection, 3505).
+-define(wxAuiNotebookEvent_GetOldSelection, 3506).
+-define(wxAuiNotebookEvent_SetDragSource, 3507).
+-define(wxAuiNotebookEvent_GetDragSource, 3508).
+-define(wxAuiManagerEvent_SetManager, 3509).
+-define(wxAuiManagerEvent_GetManager, 3510).
+-define(wxAuiManagerEvent_SetPane, 3511).
+-define(wxAuiManagerEvent_GetPane, 3512).
+-define(wxAuiManagerEvent_SetButton, 3513).
+-define(wxAuiManagerEvent_GetButton, 3514).
+-define(wxAuiManagerEvent_SetDC, 3515).
+-define(wxAuiManagerEvent_GetDC, 3516).
+-define(wxAuiManagerEvent_Veto, 3517).
+-define(wxAuiManagerEvent_GetVeto, 3518).
+-define(wxAuiManagerEvent_SetCanVeto, 3519).
+-define(wxAuiManagerEvent_CanVeto, 3520).
+-define(wxLogNull_new, 3521).
+-define(wxLogNull_destroy, 3522).
+-define(wxTaskBarIcon_new, 3523).
+-define(wxTaskBarIcon_destruct, 3524).
+-define(wxTaskBarIcon_PopupMenu, 3525).
+-define(wxTaskBarIcon_RemoveIcon, 3526).
+-define(wxTaskBarIcon_SetIcon, 3527).
+-define(wxLocale_new_0, 3528).
+-define(wxLocale_new_2, 3530).
+-define(wxLocale_destruct, 3531).
+-define(wxLocale_Init, 3533).
+-define(wxLocale_AddCatalog_1, 3534).
+-define(wxLocale_AddCatalog_3, 3535).
+-define(wxLocale_AddCatalogLookupPathPrefix, 3536).
+-define(wxLocale_GetCanonicalName, 3537).
+-define(wxLocale_GetLanguage, 3538).
+-define(wxLocale_GetLanguageName, 3539).
+-define(wxLocale_GetLocale, 3540).
+-define(wxLocale_GetName, 3541).
+-define(wxLocale_GetString_2, 3542).
+-define(wxLocale_GetString_4, 3543).
+-define(wxLocale_GetHeaderValue, 3544).
+-define(wxLocale_GetSysName, 3545).
+-define(wxLocale_GetSystemEncoding, 3546).
+-define(wxLocale_GetSystemEncodingName, 3547).
+-define(wxLocale_GetSystemLanguage, 3548).
+-define(wxLocale_IsLoaded, 3549).
+-define(wxLocale_IsOk, 3550).
+-define(wxActivateEvent_GetActive, 3551).
+-define(wxPopupWindow_new_2, 3553).
+-define(wxPopupWindow_new_0, 3554).
+-define(wxPopupWindow_destruct, 3556).
+-define(wxPopupWindow_Create, 3557).
+-define(wxPopupWindow_Position, 3558).
+-define(wxPopupTransientWindow_new_0, 3559).
+-define(wxPopupTransientWindow_new_2, 3560).
+-define(wxPopupTransientWindow_destruct, 3561).
+-define(wxPopupTransientWindow_Popup, 3562).
+-define(wxPopupTransientWindow_Dismiss, 3563).
diff --git a/lib/wx/src/wx.app.src b/lib/wx/src/wx.app.src
index e13982b0c1..d5ac478f20 100644
--- a/lib/wx/src/wx.app.src
+++ b/lib/wx/src/wx.app.src
@@ -33,5 +33,6 @@
]},
{registered, []},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/wx/src/wx.appup.src b/lib/wx/src/wx.appup.src
index 1102af612e..311c0c0f52 100644
--- a/lib/wx/src/wx.appup.src
+++ b/lib/wx/src/wx.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -16,8 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ],
- [ ]
+ [{<<".*">>,[{restart_application, wx}]}],
+ [{<<".*">>,[{restart_application, wx}]}]
}.
diff --git a/lib/wx/src/wxe.hrl b/lib/wx/src/wxe.hrl
index bd34b13385..66ec9ac45e 100644
--- a/lib/wx/src/wxe.hrl
+++ b/lib/wx/src/wxe.hrl
@@ -29,6 +29,11 @@
-record(wx_mem, {bin, size}).
+-record(evh, {et=null,id=-1,lastId=-1,cb=0,
+ skip=undefined,userdata=[], % temp
+ handler=undefined % added after connect
+ }).
+
-define(CLASS(Type,Class), ((Type) =:= Class) orelse (Type):parent_class(Class)).
-define(CLASS_T(Type,Class),
diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl
index b98a7c793e..4b8a8f5720 100644
--- a/lib/wx/src/wxe_master.erl
+++ b/lib/wx/src/wxe_master.erl
@@ -28,7 +28,7 @@
-behaviour(gen_server).
%% API
--export([start/1, init_port/1, init_opengl/0]).
+-export([start/1, init_port/1, init_opengl/0, fetch_msgs/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -36,7 +36,9 @@
-record(state, {cb_port, %% Callback port and to erlang messages goes via it.
users, %% List of wx servers, needed ??
- driver}). %% Driver name so wx_server can create it's own port
+ driver, %% Driver name so wx_server can create it's own port
+ msgs=[] %% Early messages (such as openfiles on OSX)
+ }).
-include("wxe.hrl").
-include("gen/wxe_debug.hrl").
@@ -76,12 +78,18 @@ init_port(SilentStart) ->
%%--------------------------------------------------------------------
-%% Initlizes the opengl library
+%% Initalizes the opengl library
%%--------------------------------------------------------------------
init_opengl() ->
GLLib = wxe_util:wxgl_dl(),
wxe_util:call(?WXE_INIT_OPENGL, <<(list_to_binary(GLLib))/binary, 0:8>>).
+%%--------------------------------------------------------------------
+%% Fetch early messages, hack to get start up args on mac
+%%--------------------------------------------------------------------
+fetch_msgs() ->
+ gen_server:call(?MODULE, fetch_msgs, infinity).
+
%%====================================================================
%% gen_server callbacks
%%====================================================================
@@ -152,6 +160,8 @@ init([SilentStart]) ->
%%--------------------------------------------------------------------
handle_call(init_port, From, State=#state{driver=Driver,cb_port=CBPort, users=Users}) ->
{reply, {Driver,CBPort}, State#state{users=gb_sets:add(From,Users)}};
+handle_call(fetch_msgs, _From, State=#state{msgs=Msgs}) ->
+ {reply, lists:reverse(Msgs), State#state{msgs=[]}};
handle_call(_Request, _From, State) ->
%%io:format("Unknown request ~p sent to ~p from ~p ~n",[_Request, ?MODULE, _From]),
Reply = ok,
@@ -182,6 +192,8 @@ handle_info({wxe_driver, internal_error, Msg}, State) ->
handle_info({wxe_driver, debug, Msg}, State) ->
io:format("WX DBG: ~s~n", [Msg]),
{noreply, State};
+handle_info({wxe_driver, open_file, File}, State=#state{msgs=Msgs}) ->
+ {noreply, State#state{msgs=[File|Msgs]}};
handle_info(_Info, State) ->
io:format("Unknown message ~p sent to ~p~n",[_Info, ?MODULE]),
{noreply, State}.
diff --git a/lib/wx/src/wxe_server.erl b/lib/wx/src/wxe_server.erl
index 04e0d0faf4..153e2475ba 100644
--- a/lib/wx/src/wxe_server.erl
+++ b/lib/wx/src/wxe_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -36,8 +36,8 @@
terminate/2, code_change/3]).
-record(state, {port,cb_port,users,cleaners=[],cb,cb_cnt}).
--record(user, {events=[], evt_handler}).
--record(event, {object, callback, cb_handler}).
+-record(user, {events=[]}).
+%%-record(event, {object, callback, cb_handler}).
-define(APPLICATION, wxe).
-define(log(S,A), log(?MODULE,?LINE,S,A)).
@@ -119,7 +119,7 @@ handle_call(stop,{_From,_},State = #state{users=Users0, cleaners=Cs0}) ->
Env = get(?WXE_IDENTIFIER),
Users = gb_trees:to_list(Users0),
Cs = lists:map(fun({_Pid,User}) ->
- spawn_link(fun() -> cleanup(Env,[User], false) end)
+ spawn_link(fun() -> cleanup(Env,[User]) end)
end, Users),
{noreply, State#state{users=gb_trees:empty(), cleaners=Cs ++ Cs0}};
@@ -178,13 +178,13 @@ handle_info({'DOWN',_,process,Pid,_}, State=#state{users=Users0,cleaners=Cs}) ->
Users = gb_trees:delete(Pid,Users0),
Env = wx:get_env(),
case User of
- #user{events=[], evt_handler=undefined} -> %% No need to spawn
+ #user{events=[]} -> %% No need to spawn
case Cs =:= [] andalso gb_trees:is_empty(Users) of
- true -> {stop, normal, State#state{cleaners=Cs}};
- false -> {noreply, State#state{users=Users,cleaners=Cs}}
+ true -> {stop, normal, State#state{users=Users}};
+ false -> {noreply, State#state{users=Users}}
end;
_ ->
- Cleaner = spawn_link(fun() -> cleanup(Env,[User],true) end),
+ Cleaner = spawn_link(fun() -> cleanup(Env,[User]) end),
{noreply, State#state{users=Users,cleaners=[Cleaner|Cs]}}
end
catch _E:_R ->
@@ -192,17 +192,6 @@ handle_info({'DOWN',_,process,Pid,_}, State=#state{users=Users0,cleaners=Cs}) ->
{noreply, State}
end;
-handle_info(Msg = {'_wxe_destroy_', Pid}, State)
- when is_pid(Pid) ->
- case erlang:is_process_alive(Pid) of
- true ->
- Pid ! Msg,
- ok;
- false ->
- ok
- end,
- {noreply, State};
-
handle_info(_Info, State) ->
?log("Unknown message ~p sent to ~p~n",[_Info, ?MODULE]),
{noreply, State}.
@@ -222,35 +211,29 @@ code_change(_OldVsn, State, _Extra) ->
log(Mod,Line,Str,Args) ->
error_logger:format("~p:~p: " ++ Str, [Mod,Line|Args]).
-handle_connect(Object, EvData, From, State0 = #state{users=Users}) ->
- User0 = #user{events=Evs0,evt_handler=Handler0} = gb_trees:get(From, Users),
- Callback = wxEvtHandler:get_callback(EvData),
- case Handler0 of
- #wx_ref{} when Callback =:= 0 ->
- CBHandler = Handler0,
- Handler = Handler0;
- undefined when Callback =:= 0 ->
- Handler = new_evt_listener(State0, From),
- CBHandler = Handler;
- _ ->
- CBHandler = new_evt_listener(State0, From),
- Handler = Handler0
- end,
- Evs = [#event{object=Object,callback=Callback, cb_handler=CBHandler}|Evs0],
- User = User0#user{events=Evs, evt_handler=Handler},
- State1 = State0#state{users=gb_trees:update(From, User, Users)},
- if is_function(Callback) orelse is_pid(Callback) ->
- {FunId, State} = attach_fun(Callback,State1),
- Res = wxEvtHandler:connect_impl(CBHandler,Object,
- wxEvtHandler:replace_fun_with_id(EvData,FunId)),
- case Res of
- ok -> {reply,Res,State};
- _Error -> {reply,Res,State0}
- end;
-
- true ->
- Res = {call_impl, connect_cb, CBHandler},
- {reply, Res, State1}
+handle_connect(Object, #evh{handler=undefined, cb=Callback} = EvData0,
+ From, State0) ->
+ %% Callback let this process listen to the events
+ {FunId, State} = attach_fun(Callback,State0),
+ EvData1 = EvData0#evh{cb=FunId},
+ case wxEvtHandler:connect_impl(Object,EvData1) of
+ {ok, Handler} ->
+ EvData = EvData1#evh{handler=Handler,userdata=undefined},
+ handle_connect(Object, EvData, From, State);
+ Error ->
+ {reply, Error, State0}
+ end;
+handle_connect(Object, EvData=#evh{handler=Handler},
+ From, State0 = #state{users=Users}) ->
+ %% Correct process is already listening just register it
+ put(Handler, From),
+ case gb_trees:lookup(From, Users) of
+ {value, User0 = #user{events=Listeners0}} ->
+ User = User0#user{events=[{Object,EvData}|Listeners0]},
+ State = State0#state{users=gb_trees:update(From, User, Users)},
+ {reply, ok, State};
+ none -> %% We are closing up the shop
+ {reply, {error, terminating}, State0}
end.
invoke_cb({{Ev=#wx{}, Ref=#wx_ref{}}, FunId,_}, _S) ->
@@ -329,20 +312,6 @@ get_wx_object_state(Pid) ->
_ -> ignore
end.
-new_evt_listener(State, Owner) ->
- #wx_env{port=Port} = wx:get_env(),
- _ = erlang:port_control(Port,98,<<>>),
- Listener = get_result(State),
- put(Listener, Owner),
- Listener.
-
-get_result(_State) ->
- receive
- {'_wxe_result_', Res} -> Res;
- {'_wxe_error_', Op, Error} ->
- erlang:error({Error, {wxEvtHandler, {internal_installer, Op}}})
- end.
-
attach_fun(Fun, S = #state{cb=CB,cb_cnt=Next}) ->
case gb_trees:lookup(Fun,CB) of
{value, ID} ->
@@ -367,90 +336,72 @@ delete_fun(FunId, State = #state{cb=CB}) ->
State
end.
-cleanup_evt_listener(U=#user{events=Evs0,evt_handler=Handler}, EvtListener, Object) ->
- {Evs, Del} = lists:foldl(fun(#event{object=Obj,cb_handler=CBH}, {Acc, Delete})
- when CBH =:= EvtListener, Obj =:= Object ->
- {Acc, Delete};
- (Event = #event{cb_handler=CBH}, {Acc, _Delete})
- when CBH =:= EvtListener ->
- {[Event|Acc], false};
- (Event, {Acc, Delete}) ->
- {[Event|Acc], Delete}
- end, {[], true}, Evs0),
- Del andalso wxEvtHandler:destroy_evt_listener(EvtListener),
- case Del andalso Handler =:= EvtListener of
- true ->
- U#user{events=Evs, evt_handler=undefined};
- false ->
- U#user{events=Evs}
- end.
+cleanup_evt_listener(U=#user{events=Evs0}, EvtListener, Object) ->
+ Filter = fun({Obj,#evh{handler=Evl}}) ->
+ not (Object =:= Obj andalso Evl =:= EvtListener)
+ end,
+ U#user{events=lists:filter(Filter, Evs0)}.
-handle_disconnect(Object, Evh, From, State0 = #state{users=Users0}) ->
+handle_disconnect(Object, Evh = #evh{cb=Fun}, From,
+ State0 = #state{users=Users0, cb=Callbacks}) ->
#user{events=Evs0} = gb_trees:get(From, Users0),
- Fun = wxEvtHandler:get_callback(Evh),
- case find_handler(Evs0, Object, Fun) of
- [] -> {reply, false, State0};
+ FunId = gb_trees:lookup(Fun, Callbacks),
+ case find_handler(Evs0, Object, Evh#evh{cb=FunId}) of
+ [] ->
+ {reply, false, State0};
Handlers ->
- case disconnect(Object,Evh, Handlers) of
- #event{} ->
- {reply, true, State0};
- Result ->
- {reply, Result, State0}
+ case disconnect(Object,Handlers) of
+ #evh{} -> {reply, true, State0};
+ Result -> {reply, Result, State0}
end
end.
-disconnect(Object,Evh,[Ev=#event{cb_handler=Handler}|Evs]) ->
- try wxEvtHandler:disconnect_impl(Handler,Object,Evh) of
+disconnect(Object,[Ev|Evs]) ->
+ try wxEvtHandler:disconnect_impl(Object,Ev) of
true -> Ev;
- false -> disconnect(Object, Evh, Evs);
+ false -> disconnect(Object, Evs);
Error -> Error
catch _:_ ->
false
end;
-disconnect(_, _, []) -> false.
-
-find_handler(Evs, Object, Fun) ->
- find_handler(Evs, Object, Fun, []).
-
-find_handler([Ev =#event{object=Object,callback=FunReg}|Evs],Object,Search,Acc) ->
- case FunReg =:= Search of
- true -> find_handler(Evs,Object,Search,[Ev|Acc]);
- false when is_function(FunReg), Search =:= 0 ->
- find_handler(Evs,Object,Search,[Ev|Acc]);
- _ ->
- find_handler(Evs,Object,Search,Acc)
+disconnect(_, []) -> false.
+
+find_handler([{Object,Evh}|Evs], Object, Match) ->
+ case match_handler(Match, Evh) of
+ false -> find_handler(Evs, Object, Match);
+ Res -> [Res|find_handler(Evs,Object,Match)]
end;
-find_handler([_|Evs],Object,Fun,Res) ->
- find_handler(Evs,Object,Fun,Res);
-find_handler([],_Object,_Fun,Res) ->
- Res.
+find_handler([_|Evs], Object, Match) ->
+ find_handler(Evs, Object, Match);
+find_handler([], _, _) -> [].
+
+match_handler(M=#evh{et=MET, cb=MCB},
+ #evh{et=ET, cb=CB, handler=Handler}) ->
+ %% Let wxWidgets handle the id matching
+ Match = match_et(MET, ET)
+ andalso match_cb(MCB, CB),
+ Match andalso M#evh{handler=Handler}.
+match_et(null, _) -> true;
+match_et(Met, Et) -> Met =:= Et.
+
+match_cb(none, _) -> true;
+match_cb({value,MId}, Id) -> MId =:= Id.
%% Cleanup
%% The server handles callbacks from driver so every other wx call must
%% be called from another process, therefore the cleaning must be spawned.
%%
-%% Using Disconnect when we terminate can crash, it is timing releated
-%% but it seems that disconnect on windows that are being deleted are bad.
-%% Since we are terminating the data will be cleaned up anyway.
-cleanup(Env, Data, Disconnect) ->
+cleanup(Env, Data) ->
put(?WXE_IDENTIFIER, Env),
- lists:foreach(fun(User) -> cleanup(User, Disconnect) end, Data),
+ Disconnect = fun({Object, Ev}) ->
+ try wxEvtHandler:disconnect_impl(Object,Ev)
+ catch _:_ -> ok
+ end
+ end,
+
+ lists:foreach(fun(#user{events=Evs}) ->
+ [Disconnect(Ev) || Ev <- Evs]
+ end, Data),
gen_server:cast(Env#wx_env.sv, {cleaned, self()}),
normal.
-
-cleanup(#user{events=Evs, evt_handler=Handler}, Disconnect) ->
- lists:foreach(fun(#event{object=O, callback=CB, cb_handler=CbH}) ->
- Disconnect andalso (catch wxEvtHandler:disconnect_impl(CbH,O)),
- case is_function(CB) of
- true ->
- wxEvtHandler:destroy_evt_listener(CbH);
- false ->
- ignore
- end
- end, Evs),
- case Handler of
- undefined -> ignore;
- _ -> wxEvtHandler:destroy_evt_listener(Handler)
- end,
- ok.
diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl
index a31c3e30b8..02ac4ddfa6 100644
--- a/lib/wx/src/wxe_util.erl
+++ b/lib/wx/src/wxe_util.erl
@@ -74,7 +74,7 @@ call(Op, Args) ->
true ->
debug_call(Dbg band 15, Op, Args, Port)
end.
-
+
rec(Op) ->
receive
{'_wxe_result_', Res} -> Res;
@@ -108,21 +108,26 @@ send_bin(Bin) when is_binary(Bin) ->
get_cbId(Fun) ->
gen_server:call((wx:get_env())#wx_env.sv,{register_cb, Fun}, infinity).
-connect_cb(Object,EvData) ->
- handle_listener(connect_cb, Object, EvData).
-
-disconnect_cb(Object,EvData) ->
- handle_listener(disconnect_cb, Object, EvData).
-
-handle_listener(Op,Object,EvData) ->
- Listener = gen_server:call((wx:get_env())#wx_env.sv, {Op,Object,EvData}, infinity),
- case Listener of
- {call_impl, connect_cb, EvtList} ->
- wxEvtHandler:connect_impl(EvtList,Object,EvData);
- Res ->
- Res
+connect_cb(Object,EvData0 = #evh{cb=Callback}) ->
+ Server = (wx:get_env())#wx_env.sv,
+ case Callback of
+ 0 -> %% Message api connect from this process
+ case wxEvtHandler:connect_impl(Object,EvData0) of
+ {ok, Listener} ->
+ EvData = EvData0#evh{handler=Listener, userdata=undefined},
+ gen_server:call(Server, {connect_cb,Object,EvData}, infinity);
+ Error ->
+ Error
+ end;
+ _ -> %% callback, fun or pid (pid for wx_object:sync_events masked callbacks)
+ %% let the server do the connect
+ gen_server:call(Server, {connect_cb,Object,EvData0}, infinity)
end.
+disconnect_cb(Object,EvData) ->
+ Server = (wx:get_env())#wx_env.sv,
+ gen_server:call(Server, {disconnect_cb,Object,EvData}, infinity).
+
debug_cast(1, Op, _Args, _Port) ->
check_previous(),
case ets:lookup(wx_debug_info,Op) of
diff --git a/lib/wx/test/wx_app_SUITE.erl b/lib/wx/test/wx_app_SUITE.erl
index 162923eaa3..6331180ece 100644
--- a/lib/wx/test/wx_app_SUITE.erl
+++ b/lib/wx/test/wx_app_SUITE.erl
@@ -26,6 +26,7 @@
-compile(export_all).
-include("wx_test_lib.hrl").
+-include_lib("common_test/include/ct.hrl").
t() -> wx_test_lib:t(?MODULE).
@@ -50,7 +51,7 @@ end_per_testcase(Func,Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [fields, modules, exportall, app_depend, undef_funcs].
+ [fields, modules, exportall, app_depend, undef_funcs, appup].
groups() ->
[].
@@ -281,3 +282,9 @@ key1search(Key, L) ->
{value, {Key, Value}} ->
Value
end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that the wx appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(wx).
diff --git a/lib/wx/test/wx_basic_SUITE.erl b/lib/wx/test/wx_basic_SUITE.erl
index c5b0927bf3..e3bbb21a23 100644
--- a/lib/wx/test/wx_basic_SUITE.erl
+++ b/lib/wx/test/wx_basic_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -99,8 +98,23 @@ several_apps(Config) ->
Pids = [spawn_link(fun() -> several_apps(Parent, N, Config) end)
|| N <- lists:seq(1,4)],
process_flag(trap_exit,true),
- ?m_multi_receive([{complete,Pid} || Pid <- Pids]),
+ Wait = fun(Pid,Acc) ->
+ receive {complete, Pid} -> Acc
+ after 20000 -> [Pid|Acc]
+ end
+ end,
+ Res = lists:foldl(Wait, [], Pids),
[Pid ! quit || Pid <- Pids],
+
+ Dbg = fun(Pid) ->
+ io:format("Stack ~p~n",[erlang:process_info(Pid, current_stacktrace)]),
+ io:format("Stack ~p~n",[erlang:process_info(Pid)])
+ end,
+ case Res of
+ [] -> ok;
+ Failed ->
+ [Dbg(Pid)|| Pid <- Failed]
+ end,
case wx_test_lib:user_available(Config) of
true ->
receive {'EXIT',_,foo} -> ok end;
@@ -217,7 +231,7 @@ create_menus(Frame) ->
%% Test the wx_misc.erl api functionality.
wx_misc(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
-wx_misc(Config) ->
+wx_misc(_Config) ->
wx:new([{debug, trace}]),
put(wx_test_verbose, true),
?m(ok, wx_misc:bell()),
@@ -242,21 +256,6 @@ wx_misc(Config) ->
%% wx:shutdown() %% How do you test this?
- case os:type() of
- {win32, _} -> %% These hangs when running automatic tests
- skip; %% through ssh on windows. Works otherwise
- _ ->
- wx_misc:shell([{command,"echo TESTING close the popup shell"}])
- end,
-
- case wx_test_lib:user_available(Config) of
- true ->
- wx_misc:shell();
- false ->
- %% Don't want to spawn a shell if no user
- skip %% is available
- end,
-
?m(false, wx_misc:isBusy()),
?m(ok, wx_misc:beginBusyCursor([])),
?m(true, wx_misc:isBusy()),
@@ -342,22 +341,22 @@ wx_object(Config) ->
Me = self(),
?m({call, foobar, {Me, _}}, wx_object:call(Frame, foobar)),
?m(ok, wx_object:cast(Frame, foobar2)),
- ?m([{cast, foobar2}], flush()),
+ ?m([{cast, foobar2}|_], flush()),
FramePid = wx_object:get_pid(Frame),
io:format("wx_object pid ~p~n",[FramePid]),
FramePid ! foo3,
- ?m([{info, foo3}], flush()),
+ ?m([{info, foo3}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> hehe end)),
- ?m([{cast, hehe}], flush()),
+ ?m([{cast, hehe}|_], flush()),
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> timer:sleep(200), slept end)),
%% The sleep above should not hinder the Paint event below
%% Which it did in my buggy handling of the sync_callback
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
- ?m([{cast, slept}], flush()),
+ timer:sleep(500),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}, {cast, slept}|_], flush()),
Monitor = erlang:monitor(process, FramePid),
case proplists:get_value(user, Config, false) of
@@ -397,7 +396,7 @@ check_events([], Async, Sync) ->
end.
flush() ->
- flush([], 500).
+ flush([], 1500).
flush(Acc, Wait) ->
receive
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 0e151ccc9b..b127e6b71d 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -50,7 +50,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[calendarCtrl, treeCtrl, notebook, staticBoxSizer,
clipboard, helpFrame, htmlWindow, listCtrlSort, listCtrlVirtual,
- radioBox, systemSettings, taskBarIcon, toolbar].
+ radioBox, systemSettings, taskBarIcon, toolbar, popup].
groups() ->
[].
@@ -344,21 +344,21 @@ listCtrlSort(Config) ->
Wx = wx:new(),
Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
- LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT bor ?wxLC_SORT_ASCENDING}]),
+ LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT}]),
%% must be done crashes in wxwidgets otherwise.
wxListCtrl:insertColumn(LC, 0, "Column"),
Add = fun(Int) ->
- wxListCtrl:insertItem(LC, Int, integer_to_list(Int)),
+ wxListCtrl:insertItem(LC, Int, "ABC " ++ integer_to_list(Int)),
%% ItemData Can only be integers currently
- wxListCtrl:setItemData(LC, Int, abs(2500-Int))
+ wxListCtrl:setItemData(LC, Int, abs(50-Int))
end,
- wx:foreach(Add, lists:seq(0,5000)),
+ wx:foreach(Add, lists:seq(0,50)),
wxWindow:show(Frame),
- timer:sleep(200),
+ timer:sleep(2000),
Sort = fun() ->
wxListCtrl:sortItems(LC, fun(A, B) ->
@@ -374,11 +374,12 @@ listCtrlSort(Config) ->
io:format("Sorted ~p ~n",[Time]),
Item = wxListItem:new(),
+ wxListItem:setMask(Item, ?wxLIST_MASK_TEXT),
_List = wx:map(fun(Int) ->
wxListItem:setId(Item, Int),
?m(true, wxListCtrl:getItem(LC, Item)),
- io:format("~s~n",[wxListItem:getText(Item)])
- end, lists:seq(0,100)),
+ io:format("~p: ~s~n",[Int, wxListItem:getText(Item)])
+ end, lists:seq(0,10)),
wxListItem:destroy(Item),
wx_test_lib:wx_destroy(Frame,Config).
@@ -510,3 +511,50 @@ toolbar(Config) ->
wxFrame:connect(Frame, command_menu_selected, [{callback, Add}, {id, 747}]),
wxFrame:show(Frame),
wx_test_lib:wx_destroy(Frame,Config).
+
+
+popup(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+popup(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
+ TB = wxFrame:createToolBar(Frame),
+ wxToolBar:addTool(TB, 747, "PressMe", wxArtProvider:getBitmap("wxART_COPY", [{size, {16,16}}]),
+ [{shortHelp, "Press Me"}]),
+
+ Log = fun(#wx{id=Id, event=Ev}, Obj) ->
+ io:format("Got ~p from ~p~n", [Id, Ev]),
+ wxEvent:skip(Obj)
+ end,
+ CreatePopup = fun() ->
+ Pop = wxPopupTransientWindow:new(Frame),
+ Panel = wxPanel:new(Pop),
+ Sz = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sz, wxButton:new(Panel, 42, [{label, "A button"}])),
+ wxSizer:add(Sz, Txt = wxStaticText:new(Panel, 43, "Some static text")),
+ wxSizer:add(Sz, wxButton:new(Panel, 44, [{label, "B button"}])),
+ wxPanel:setSizerAndFit(Panel, Sz),
+ wxSizer:setSizeHints(Sz, Pop),
+ wxWindow:connect(Pop, command_button_clicked, [{callback, Log}]),
+ wxWindow:connect(Txt, left_up, [{callback, Log}]),
+ wxWindow:connect(Txt, middle_up, [{callback, Log}]),
+ wxWindow:connect(Txt, right_up, [{callback, Log}]),
+ wxWindow:connect(Pop, show, [{callback, Log}]),
+ Pos = wx_misc:getMousePosition(),
+ wxPopupTransientWindow:position(Pop, Pos, {-1, -1}),
+ wxPopupTransientWindow:popup(Pop),
+ Pop
+ end,
+ wxFrame:connect(Frame, command_menu_selected, [{id, 747}]),
+ wxFrame:show(Frame),
+
+ Pop = CreatePopup(),
+ Scale = case wx_test_lib:user_available(Config) of
+ true -> 25;
+ false -> 1
+ end,
+ receive
+ #wx{} -> CreatePopup()
+ after 200*Scale ->
+ wxPopupTransientWindow:dismiss(Pop)
+ end,
+ wx_test_lib:wx_destroy(Frame,Config).
diff --git a/lib/wx/test/wx_event_SUITE.erl b/lib/wx/test/wx_event_SUITE.erl
index bbb5294d08..f9f8788d8f 100644
--- a/lib/wx/test/wx_event_SUITE.erl
+++ b/lib/wx/test/wx_event_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,7 +48,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[connect, disconnect, connect_msg_20, connect_cb_20,
mouse_on_grid, spin_event, connect_in_callback, recursive,
- char_events, callback_clean
+ dialog, char_events, callback_clean
].
groups() ->
@@ -149,7 +149,7 @@ disconnect(Config) ->
timer:sleep(1000),
wx_test_lib:flush(),
- ?m({'EXIT', {{badarg,_},_}}, wxEvtHandler:disconnect(Panel, non_existing_event_type)),
+ ?m(false, wxEvtHandler:disconnect(Panel, non_existing_event_type)),
?m(true, wxEvtHandler:disconnect(Panel, size)),
?m(ok, wxWindow:setSize(Panel, {200,102})),
timer:sleep(1000),
@@ -336,12 +336,14 @@ connect_in_callback(Config) ->
end}]),
wxWindow:show(F1),
receive
- {continue, F1} -> Tester ! {continue, F1}
+ {continue, F1} ->
+ true = wxFrame:disconnect(F1, size),
+ Tester ! {continue, F1}
end
end,
- wxFrame:connect(Frame,size,
+ wxFrame:connect(Frame,show,
[{callback,
- fun(#wx{event=#wxSize{}},_SizeEv) ->
+ fun(#wx{event=#wxShow{}},_SizeEv) ->
io:format("Frame got size~n",[]),
spawn(TestWindow)
end}]),
@@ -402,6 +404,42 @@ recursive(Config) ->
wx_test_lib:wx_destroy(Frame, Config).
+dialog(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+dialog(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Testing"),
+ wxFrame:show(Frame),
+ Env = wx:get_env(),
+ Tester = self(),
+ PD = wxProgressDialog:new("Dialog","Testing",
+ [%%{parent, Frame},
+ {maximum,101},
+ {style, ?wxPD_SMOOTH bor ?wxPD_AUTO_HIDE}]),
+ Forward = fun(#wx{event=#wxInitDialog{}}, Ev) ->
+ ?mt(wxInitDialogEvent, Ev),
+ io:format("Heyhoo~n", []),
+ wxEvent:skip(Ev),
+ Tester ! {progress_dialog,PD}
+ end,
+ wxDialog:connect(PD, init_dialog, [{callback, Forward}]),
+ Recurse = fun(Recurse, N) ->
+ true = wxProgressDialog:update(PD, min(N,100)),
+ timer:sleep(5),
+ Recurse(Recurse,N+1)
+ end,
+ Run = fun() ->
+ wx:set_env(Env),
+ Recurse(Recurse, 0)
+ end,
+ Worker = spawn_link(Run),
+ timer:sleep(500),
+ io:format("Got ~p~n", [wx_test_lib:flush()]),
+ unlink(Worker),
+ wxProgressDialog:destroy(PD),
+ wx_test_lib:wx_destroy(Frame, Config).
+
+
+
char_events(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
char_events(Config) ->
Wx = wx:new(),
@@ -463,14 +501,14 @@ callback_clean(Config) ->
end
end),
timer:sleep(500), %% Give it time to remove it
- ?m({[{Pid,_,_}],[_],[_]}, white_box_check_event_handlers()),
+ ?m({[{Pid,_}],[_],[_]}, white_box_check_event_handlers()),
Pid ! remove,
timer:sleep(500), %% Give it time to remove it
?m({[],[],[]}, white_box_check_event_handlers()),
SetupEventHandlers(),
- ?m({[{_,_,_}],[_],[_]}, white_box_check_event_handlers()),
+ ?m({[{_,_}],[_],[_]}, white_box_check_event_handlers()),
wxDialog:show(Dlg),
wx_test_lib:wx_close(Dlg, Config),
@@ -490,9 +528,9 @@ white_box_check_event_handlers() ->
{status, _, _, [Env, _, _, _, Data]} = sys:get_status(Server),
[_H, _data, {data, [{_, Record}]}] = Data,
{state, _Port1, _Port2, Users, [], CBs, _Next} = Record,
- {[{Pid, Evs, Listener} ||
- {Pid, {user, Evs, Listener}} <- gb_trees:to_list(Users),
- (Evs =/= [] orelse Listener =/= undefined)], %% Ignore empty
+ {[{Pid, Evs} ||
+ {Pid, {user, Evs}} <- gb_trees:to_list(Users),
+ Evs =/= []], %% Ignore empty
gb_trees:to_list(CBs),
[Funs || Funs = {Id, {Fun,_}} <- Env, is_integer(Id), is_function(Fun)]
}.
diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk
index c018b4fb86..942d4c0d6f 100644
--- a/lib/wx/vsn.mk
+++ b/lib/wx/vsn.mk
@@ -1 +1 @@
-WX_VSN = 1.1.2
+WX_VSN = 1.3.3
diff --git a/lib/xmerl/doc/src/book.xml b/lib/xmerl/doc/src/book.xml
index d46d37cf85..128a870628 100644
--- a/lib/xmerl/doc/src/book.xml
+++ b/lib/xmerl/doc/src/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/fascicules.xml b/lib/xmerl/doc/src/fascicules.xml
index 0678195e07..37feca543f 100644
--- a/lib/xmerl/doc/src/fascicules.xml
+++ b/lib/xmerl/doc/src/fascicules.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
<fascicules>
diff --git a/lib/xmerl/doc/src/motorcycles2html.erl b/lib/xmerl/doc/src/motorcycles2html.erl
index dfbd19e359..45c713e1ac 100644
--- a/lib/xmerl/doc/src/motorcycles2html.erl
+++ b/lib/xmerl/doc/src/motorcycles2html.erl
@@ -7,7 +7,7 @@
%%%-------------------------------------------------------------------
-module(motorcycles2html).
--include("xmerl.hrl").
+-include_lib("xmerl/include/xmerl.hrl").
-import(xmerl_xs,
[ xslapply/2, value_of/1, select/2, built_in_rules/2 ]).
@@ -57,12 +57,12 @@ template(E) -> built_in_rules(fun template/1, E).
%% sorts on the bike name element, unwraps the bike information and
%% inserts a line feed and indentation on each bike element.
sort_by_manufacturer(L) ->
- Tuples=[X1||X1={H,T} <- L],
+ Tuples=[X1||X1={_,_} <- L],
SortedTS = lists:keysort(1,Tuples),
InsertRefName_UnWrap=
fun([{[Name],V}|Rest],Name,F)->
[V|F(Rest,Name,F)];
- ([{[Name],V}|Rest],PreviousName,F) ->
+ ([{[Name],V}|Rest],_PreviousName,F) ->
[["<a name=\"",Name,"\"></>"],V|F(Rest,Name,F)];
([],_,_) -> []
end,
@@ -71,7 +71,7 @@ sort_by_manufacturer(L) ->
WS = "\n ",
Fun=fun([H|T],Acc,F)->
F(T,[H,WS|Acc],F);
- ([],Acc,F)->
+ ([],Acc,_F)->
lists:reverse([WS|Acc])
end,
if length(SortedRefed) > 0 ->
@@ -96,13 +96,12 @@ remove_duplicates([A|L],Acc) ->
end.
make_ref([]) -> [];
-make_ref([H]) when atom(H) ->
+make_ref([H]) when is_atom(H) ->
"<ul><a href=\"#"++atom_to_list(H)++"\">"++atom_to_list(H)++"</a></ul>";
-make_ref([H]) when list(H) ->
+make_ref([H]) when is_list(H) ->
"<ul><a href=\"#"++H++"\">\s"++H++"</a></ul>";
-make_ref([H|T]) when atom(H) ->
+make_ref([H|T]) when is_atom(H) ->
["<ul><a href=\"#"++atom_to_list(H)++"\">\s"++atom_to_list(H)++",\n</a></ul>"
|make_ref(T)];
-make_ref([H|T]) when list(H) ->
+make_ref([H|T]) when is_list(H) ->
["<ul><a href=\"#"++H++"\">\s"++H++",\n</a></ul>"|make_ref(T)].
-
diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml
index 60cab9e341..3fa1f01a79 100644
--- a/lib/xmerl/doc/src/notes.xml
+++ b/lib/xmerl/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -31,6 +31,35 @@
<p>This document describes the changes made to the Xmerl application.</p>
+<section><title>Xmerl 1.3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Xmerl 1.3.6</title>
<section><title>Fixed Bugs and Malfunctions</title>
@@ -144,7 +173,7 @@
<item>
<p>
Add missing spaces in xmerl doc (Thanks to Ricardo
- Catalinas Jim�nez)</p>
+ Catalinas Jiménez)</p>
<p>
Own Id: OTP-9873</p>
</item>
diff --git a/lib/xmerl/doc/src/notes_history.xml b/lib/xmerl/doc/src/notes_history.xml
index a8f7d8b3a6..6afd07fa56 100644
--- a/lib/xmerl/doc/src/notes_history.xml
+++ b/lib/xmerl/doc/src/notes_history.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2006</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/part.xml b/lib/xmerl/doc/src/part.xml
index 8a544ad3b0..3567fe4a21 100644
--- a/lib/xmerl/doc/src/part.xml
+++ b/lib/xmerl/doc/src/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/part_notes.xml b/lib/xmerl/doc/src/part_notes.xml
index b3c0597323..ace667deb9 100644
--- a/lib/xmerl/doc/src/part_notes.xml
+++ b/lib/xmerl/doc/src/part_notes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2011</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/ref_man.xml b/lib/xmerl/doc/src/ref_man.xml
index 4b79d75d47..db35552845 100644
--- a/lib/xmerl/doc/src/ref_man.xml
+++ b/lib/xmerl/doc/src/ref_man.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/xmerl_sax_parser.xml b/lib/xmerl/doc/src/xmerl_sax_parser.xml
index eb22711a75..4af55066eb 100644
--- a/lib/xmerl/doc/src/xmerl_sax_parser.xml
+++ b/lib/xmerl/doc/src/xmerl_sax_parser.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>2008</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/doc/src/xmerl_ug.xmlsrc b/lib/xmerl/doc/src/xmerl_ug.xmlsrc
index 10c770c400..aa60c65417 100644
--- a/lib/xmerl/doc/src/xmerl_ug.xmlsrc
+++ b/lib/xmerl/doc/src/xmerl_ug.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2004</year><year>2012</year>
+ <year>2004</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/xmerl/src/xmerl.app.src b/lib/xmerl/src/xmerl.app.src
index b471447bbd..45cfe9d250 100644
--- a/lib/xmerl/src/xmerl.app.src
+++ b/lib/xmerl/src/xmerl.app.src
@@ -39,5 +39,6 @@
{registered, []},
{env, []},
- {applications, [kernel, stdlib]}
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/xmerl/src/xmerl.appup.src b/lib/xmerl/src/xmerl.appup.src
index 0d8aa4eb04..0a84966576 100644
--- a/lib/xmerl/src/xmerl.appup.src
+++ b/lib/xmerl/src/xmerl.appup.src
@@ -1,14 +1,21 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
{"%VSN%",
- [
- {"1.1.11",
- [
- ]
- }
- ],
- [
- {"1.1.11",
- [
- ]
- }
- ]
+ [{<<".*">>,[{restart_application, xmerl}]}],
+ [{<<".*">>,[{restart_application, xmerl}]}]
}.
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl
index 883153628c..8dfbc2b89e 100644
--- a/lib/xmerl/src/xmerl_scan.erl
+++ b/lib/xmerl/src/xmerl_scan.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/xmerl/src/xmerl_xsd.erl b/lib/xmerl/src/xmerl_xsd.erl
index ffe227c671..16d02f571d 100644
--- a/lib/xmerl/src/xmerl_xsd.erl
+++ b/lib/xmerl/src/xmerl_xsd.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/xmerl/test/xmerl_SUITE.erl b/lib/xmerl/test/xmerl_SUITE.erl
index 8432e66a97..692cd64249 100644
--- a/lib/xmerl/test/xmerl_SUITE.erl
+++ b/lib/xmerl/test/xmerl_SUITE.erl
@@ -1,8 +1,7 @@
-%% -*- coding: utf-8 -*-
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
diff --git a/lib/xmerl/test/xmerl_appup_test.erl b/lib/xmerl/test/xmerl_appup_test.erl
index 80c8d8e4fd..ff6b368bcc 100644
--- a/lib/xmerl/test/xmerl_appup_test.erl
+++ b/lib/xmerl/test/xmerl_appup_test.erl
@@ -23,20 +23,7 @@
-module(xmerl_appup_test).
-compile(export_all).
-
-%-include("megaco_test_lib.hrl").
-
-
-%t() -> megaco_test_lib:t(?MODULE).
-%t(Case) -> megaco_test_lib:t({?MODULE, Case}).
-
-
-%% Test server callbacks
-% init_per_testcase(Case, Config) ->
-% megaco_test_lib:init_per_testcase(Case, Config).
-
-% end_per_testcase(Case, Config) ->
-% megaco_test_lib:end_per_testcase(Case, Config).
+-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -58,14 +45,7 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(xmerl, ".app"),
- AppupFile = file_name(xmerl, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
-
-
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
+ Config.
end_per_suite(suite) -> [];
@@ -76,317 +56,6 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+%% perform a simple check of the appup file
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,xmerl,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- io:format("V= ~p, UpFrom= ~p, DownTo= ~p, Modules= ~p~n",
- [V, UpFrom, DownTo, Modules]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up,I={add_application, _App}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [up,I , Modules]),
- ok;
-check_depend(down,I={remove_application, _App}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [down,I , Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- d("check_instructions(~w) -> bad instruction: "
- "~n Reason: ~p", [UpDown,Reason]),
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end.
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- local_error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- local_error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- local_error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- d("check_instruction -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- local_error({error, {unknown_instruction, Instr}}).
-
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("update_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr |Instrs], Modules) ->
- d("update_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- Module = instruction_module(Instr),
- d("update_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]).
-
-instruction_module({add_module, Module}) ->
- Module;
-instruction_module({remove, {Module, _, _}}) ->
- Module;
-instruction_module({load_module, Module, _, _, _}) ->
- Module;
-instruction_module({update, Module, _, _, _, _}) ->
- Module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- local_error({error, {unknown_instruction, Instr}}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- local_error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- local_error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- local_error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- d("check_module_depend -> entry with"
- "~n M: ~p", [M]),
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- d("check_module_depend -> entry with"
- "~n M: ~p"
- "~n Deps: ~p"
- "~n Modules: ~p", [M, Deps, Modules]),
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- local_error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- d("check_module_depend -> entry when bad depend with"
- "~n D: ~p", [D]),
- local_error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- local_error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- local_error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- local_error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- local_error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-local_error(Reason) ->
- throw({error, Reason}).
-
-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.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F, A) ->
- d(false, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
-
+ ok = ?t:appup_test(xmerl).
diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk
index 333466c11e..aab2a37d6c 100644
--- a/lib/xmerl/vsn.mk
+++ b/lib/xmerl/vsn.mk
@@ -1 +1 @@
-XMERL_VSN = 1.3.6
+XMERL_VSN = 1.3.7
diff --git a/make/emd2exml.in b/make/emd2exml.in
index 5bfe89894e..48473349d0 100644
--- a/make/emd2exml.in
+++ b/make/emd2exml.in
@@ -334,6 +334,8 @@ text(Line) ->
text("%ERTS-VSN%" ++ Cs, Acc) ->
text(Cs, ["@ERTS_VSN@"|Acc]);
+text("%OTP-VSN%" ++ Cs, Acc) ->
+ text(Cs, ["@OTP_VSN@"|Acc]);
text("%OTP-REL%" ++ Cs, Acc) ->
text(Cs, ["@OTP_REL@"|Acc]);
@@ -357,6 +359,8 @@ put_text(#state{c = CTag, emphasis = EmTag} = S, Line) ->
put_text(S, "%ERTS-VSN%"++Cs, CTag, EmTag, Acc) ->
put_text(S, Cs, CTag, EmTag, ["@ERTS_VSN@"|Acc]);
+put_text(S, "%OTP-VSN%"++Cs, CTag, EmTag, Acc) ->
+ put_text(S, Cs, CTag, EmTag, ["@OTP_VSN@"|Acc]);
put_text(S, "%OTP-REL%"++Cs, CTag, EmTag, Acc) ->
put_text(S, Cs, CTag, EmTag, ["@OTP_REL@"|Acc]);
@@ -560,6 +564,8 @@ code(Line) ->
code("%ERTS-VSN%" ++ Cs, Acc) ->
code(Cs, ["@ERTS_VSN@"|Acc]);
+code("%OTP-VSN%" ++ Cs, Acc) ->
+ code(Cs, ["@OTP_VSN@"|Acc]);
code("%OTP-REL%" ++ Cs, Acc) ->
code(Cs, ["@OTP_REL@"|Acc]);
diff --git a/make/ose_lm.mk.in b/make/ose_lm.mk.in
new file mode 100644
index 0000000000..5455ad94c6
--- /dev/null
+++ b/make/ose_lm.mk.in
@@ -0,0 +1,75 @@
+#-*-makefile-*- ; force emacs to enter makefile-mode
+# ----------------------------------------------------
+# Template target for generating an OSE5 load module
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2013. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+# Author: Petre Pircalabu
+# ----------------------------------------------------
+
+# ----------------------------------------------------
+# build-ose-load-module
+# Creates an OSE5 load module
+# params:
+# $(1) - The output target
+# $(2) - Objects
+# $(3) - Libraries
+# $(4) - LM configuration file
+# ----------------------------------------------------
+
+ifeq ($(findstring ose,$(TARGET)),ose)
+LDR1FLAGS = @erl_xcomp_ose_ldflags_pass1@
+LDR2FLAGS = @erl_xcomp_ose_ldflags_pass2@
+OSEROOT = @erl_xcomp_ose_OSEROOT@
+LCF = @erl_xcomp_ose_LM_LCF@
+BEAM_LMCONF = @erl_xcomp_ose_BEAM_LM_CONF@
+EPMD_LMCONF = @erl_xcomp_ose_EPMD_LM_CONF@
+RUN_ERL_LMCONF = @erl_xcomp_ose_RUN_ERL_LM_CONF@
+STRIP = @erl_xcomp_ose_STRIP@
+LM_POST_LINK = @erl_xcomp_ose_LM_POST_LINK@
+LM_SET_CONF = @erl_xcomp_ose_LM_SET_CONF@
+LM_ELF_SIZE = @erl_xcomp_ose_LM_ELF_SIZE@
+OSE_CONFD = @erl_xcomp_ose_CONFD@
+CRT0_LM = @erl_xcomp_ose_CRT0_LM@
+endif
+
+define build-ose-load-module
+ @echo " --- Linking $(1)"
+
+ @echo " --- Linking $(1) (pass 1)"
+ $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured_ro -r \
+ $(2) --start-group $(3) --end-group --cref --discard-none -M > $(1)_1.map
+
+ @echo " --- Linking $(1) (pass 2)"
+ $(ld_verbose)$(PURIFY) $(LD) -o $(1)_unconfigured \
+ $(1)_unconfigured_ro -T $(LCF) -n --emit-relocs -e crt0_lm --cref \
+ --discard-none -M > $(1)_2.map
+
+ @echo " --- Inserting configuration"
+ $(ld_verbose) $(LM_SET_CONF) $(1)_unconfigured < $(4)
+
+ @echo " --- Striping $(1)"
+# $(ld_verbose) $(STRIP) $(1)_unconfigured
+
+ @echo " --- Postlinking $(1)"
+ $(ld_verbose) $(LM_POST_LINK) $(1)_unconfigured
+
+ @echo " --- Sizing $(1)"
+ $(ld_verbose) $(LM_ELF_SIZE) $(1)_unconfigured
+ mv $(1)_unconfigured $(1)
+endef
diff --git a/make/otp.mk.in b/make/otp.mk.in
index 785926b997..a89bc37820 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -30,6 +30,13 @@
include $(ERL_TOP)/make/output.mk
# ----------------------------------------------------
+# Version
+# ----------------------------------------------------
+
+OTP_VERSION = @OTP_VERSION@
+SYSTEM_VSN = @SYSTEM_VSN@
+
+# ----------------------------------------------------
# Cross Compiling
# ----------------------------------------------------
CROSS_COMPILING = @CROSS_COMPILING@
diff --git a/make/otp_ded.mk.in b/make/otp_ded.mk.in
index 0c9a8a087f..c534209a25 100644
--- a/make/otp_ded.mk.in
+++ b/make/otp_ded.mk.in
@@ -38,6 +38,7 @@ DED_THR_DEFS = @DED_THR_DEFS@
DED_EMU_THR_DEFS = @DED_EMU_THR_DEFS@
DED_WARN_FLAGS = @WFLAGS@
DED_CFLAGS = @WERRORFLAGS@ @WFLAGS@ @DED_EMU_THR_DEFS@ @DED_CFLAGS@
+DED_STATIC_CFLAGS = @WERRORFLAGS@ @WFLAGS@ @DED_EMU_THR_DEFS@ @DED_STATIC_CFLAGS@
DED_LIBS = @LIBS@
DED_EXT = @DED_EXT@
ERLANG_OSTYPE = @ERLANG_OSTYPE@
diff --git a/lib/appmon/Makefile b/make/otp_default_release_path.mk
index 62033ab92e..932bbb2f6d 100644
--- a/lib/appmon/Makefile
+++ b/make/otp_default_release_path.mk
@@ -1,7 +1,7 @@
-#
+#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
+# Copyright Ericsson AB 2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -15,19 +15,10 @@
# under the License.
#
# %CopyrightEnd%
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Macros
-# ----------------------------------------------------
-
-SUB_DIRECTORIES = src priv doc/src
-
-SPECIAL_TARGETS =
+#
-# ----------------------------------------------------
-# Default Subdir Targets
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_subdir.mk
+#
+# Where to release to by default
+#
+OTP_DEFAULT_RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)"
diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
index b6afcd1c8b..fcac2ff695 100644
--- a/make/otp_release_targets.mk
+++ b/make/otp_release_targets.mk
@@ -17,6 +17,8 @@
# %CopyrightEnd%
#
+include $(ERL_TOP)/make/otp_default_release_path.mk
+
# ----------------------------------------------------
# Targets for the new documentation support
# ----------------------------------------------------
@@ -137,7 +139,7 @@ endif
ifeq ($(TESTROOT),)
release release_docs release_tests release_html:
- $(MAKE) $(MFLAGS) RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)" \
+ $(MAKE) $(MFLAGS) RELEASE_PATH=$(OTP_DEFAULT_RELEASE_PATH) \
$(TARGET_MAKEFILE) $@_spec
else
diff --git a/make/otp_released_app.mk b/make/otp_released_app.mk
new file mode 100644
index 0000000000..fb5205ab23
--- /dev/null
+++ b/make/otp_released_app.mk
@@ -0,0 +1,43 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+include $(APP_PWD)/vsn.mk
+include $(ERL_TOP)/make/otp_default_release_path.mk
+
+RELEASED_APP_VSN=$(APP)-$($(APP_VSN))
+ifeq ($(TESTROOT),)
+REL_DIR=$(OTP_DEFAULT_RELEASE_PATH)/releases/$(SYSTEM_VSN)
+else
+REL_DIR=$(TESTROOT)/releases/$(SYSTEM_VSN)
+endif
+INST_APP_VSNS=$(REL_DIR)/installed_application_versions
+
+.PHONY: update
+
+update:
+ test -d "$(REL_DIR)" || mkdir -p "$(REL_DIR)" ; \
+ if test ! -f "$(INST_APP_VSNS)" ; then \
+ echo "$(RELEASED_APP_VSN)" > "$(INST_APP_VSNS)" || exit 1; \
+ else \
+ if test x = x`grep $(RELEASED_APP_VSN) "$(INST_APP_VSNS)"` ; then \
+ echo $(RELEASED_APP_VSN) >> "$(INST_APP_VSNS)" || exit 1; \
+ fi ; \
+ fi
+
diff --git a/make/otp_subdir.mk b/make/otp_subdir.mk
index 07294c272d..e6a75cce17 100644
--- a/make/otp_subdir.mk
+++ b/make/otp_subdir.mk
@@ -19,12 +19,12 @@
# Make include file for otp
.PHONY: debug opt release docs release_docs tests release_tests \
- clean depend valgrind
+ clean depend valgrind static_lib
#
# Targets that don't affect documentation directories
#
-opt debug release docs release_docs tests release_tests clean depend valgrind:
+opt debug release docs release_docs tests release_tests clean depend valgrind static_lib:
@set -e ; \
app_pwd=`pwd` ; \
if test -f vsn.mk; then \
@@ -44,5 +44,14 @@ opt debug release docs release_docs tests release_tests clean depend valgrind:
fi ; \
done ; \
if test -f vsn.mk; then \
+ if test release = $@ && test ! -f SKIP; then \
+ app=`basename $$app_pwd` ; \
+ app_vsn=`echo $$app | sed "y|abcdefghijklmnopqrstuvwxyz|ABCDEFGHIJKLMNOPQRSTUVWXYZ|"` ; \
+ app_vsn=$${app_vsn}_VSN ; \
+ ( $(MAKE) -f "$(ERL_TOP)/make/otp_released_app.mk" \
+ APP_PWD="$$app_pwd" APP_VSN=$$app_vsn APP=$$app \
+ TESTROOT="$(TESTROOT)" update) \
+ || exit $$? ; \
+ fi ; \
echo "=== Leaving application" `basename $$app_pwd` ; \
fi
diff --git a/make/output.mk.in b/make/output.mk.in
index 51d9401280..f2f738a2ce 100644
--- a/make/output.mk.in
+++ b/make/output.mk.in
@@ -65,9 +65,9 @@ cc_verbose_0 = @echo " CC "$@;
cc_verbose = $(cc_verbose_$(V))
V_CC = $(cc_verbose)$(CC)
-cpp_verbose_0 = @echo " CPP "$@;
-cpp_verbose = $(cpp_verbose_$(V))
-V_CPP = $(cpp_verbose)$(CPP)
+cxx_verbose_0 = @echo " CXX "$@;
+cxx_verbose = $(cxx_verbose_$(V))
+V_CXX = $(cxx_verbose)$(CXX)
# For the diameter compiler.
dia_verbose_0 = @echo " DIA "$@;
diff --git a/make/run_make.mk b/make/run_make.mk
index bb0da6743c..01ab257006 100644
--- a/make/run_make.mk
+++ b/make/run_make.mk
@@ -37,7 +37,7 @@ plain smp frag smp_frag:
$(make_verbose)$(MAKE) -f $(TARGET)/Makefile FLAVOR=$@
clean generate depend docs release release_spec release_docs release_docs_spec \
- tests release_tests release_tests_spec:
+ tests release_tests release_tests_spec static_lib:
$(make_verbose)$(MAKE) -f $(TARGET)/Makefile $@
diff --git a/make/verify_runtime_dependencies b/make/verify_runtime_dependencies
new file mode 100755
index 0000000000..b8eea06b6e
--- /dev/null
+++ b/make/verify_runtime_dependencies
@@ -0,0 +1,313 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%%-------------------------------------------------------------------
+%%% @author Rickard Green <[email protected]>
+%%% @copyright (C) 2014, Rickard Green
+%%% @doc
+%%% Verify runtime dependencies when patching OTP applications.
+%%% @end
+%%% Created : 4 Mar 2014 by Rickard Green <[email protected]>
+%%%-------------------------------------------------------------------
+
+-mode(compile).
+
+-export([main/1]).
+
+main(Args) ->
+ {Force, Release, SourceDir, TargetDir, AppList} = parse_args(Args,
+ false,
+ [],
+ [],
+ [],
+ []),
+ SourceAppInfo = read_source_app_info(AppList, SourceDir),
+ AppVsnsTab0 = current_target_app_vsns(TargetDir, Release),
+ AppVsnsTab1 = add_source_app_vsns(SourceAppInfo, AppVsnsTab0),
+ case verify_runtime_deps(SourceAppInfo, AppVsnsTab1, true) of
+ true ->
+ ok;
+ false ->
+ case Force of
+ true ->
+ warn("Your OTP development system was updated with "
+ "unfulfilled runtime dependencies. The system "
+ "may not be working as expected.", []);
+ false ->
+ err("Unfulfilled runtime dependencies. "
+ "See warnings above.~n", [])
+ end
+ end,
+ halt(0).
+
+parse_args(["-force" | Args], _, Release, SourceDir, TargetDir, Apps) ->
+ parse_args(Args, true, Release, SourceDir, TargetDir, Apps);
+parse_args(["-release", Release | Args], Force, _, SourceDir, TargetDir, Apps) ->
+ parse_args(Args, Force, Release, SourceDir, TargetDir, Apps);
+parse_args(["-source", SourceDir | Args], Force, Release, _, TargetDir, Apps) ->
+ parse_args(Args, Force, Release, SourceDir, TargetDir, Apps);
+parse_args(["-target", TargetDir | Args], Force, Release, SourceDir, _, Apps) ->
+ parse_args(Args, Force, Release, SourceDir, TargetDir, Apps);
+parse_args([App | Args], Force, Release, SourceDir, TargetDir, OldApps) ->
+ parse_args(Args, Force, Release, SourceDir, TargetDir, [App | OldApps]);
+parse_args([], _, [], _, _, _) ->
+ err("Missing release~n", []);
+parse_args([], _, _, [], _, _) ->
+ err("Missing source directory~n", []);
+parse_args([], _, _, _, [], _) ->
+ err("Missing target directory~n", []);
+parse_args([], _, _, _, _, []) ->
+ err("Missing applications~n");
+parse_args([], Force, Release, SourceDir, TargetDir, Apps) ->
+ {Force, Release, SourceDir, TargetDir, Apps}.
+
+
+%warn(Format) ->
+% warn(Format, []).
+
+warn(Format, Args) ->
+ io:format(standard_error, "WARNING: " ++ Format, Args).
+
+err(Format) ->
+ err(Format, []).
+
+err(Format, Args) ->
+ io:format(standard_error, "ERROR: " ++ Format, Args),
+ halt(1).
+
+read_file(FileName) ->
+ case file:read_file(FileName) of
+ {ok, Content} ->
+ binary_to_list(Content);
+ {error, Error} ->
+ err("Failed to read ~s: ~p~n", [FileName, Error])
+ end.
+
+consult_file(FileName) ->
+ case file:consult(FileName) of
+ {ok, Terms} ->
+ Terms;
+ {error, Error} ->
+ err("Failed to consult ~s: ~p~n", [FileName, Error])
+ end.
+
+current_target_app_vsns(TargetDir, Release) ->
+ IAV = read_file(filename:join([TargetDir, "releases", Release,
+ "installed_application_versions"])),
+ DirList = string:tokens(IAV, "\n\r\t "),
+ LibDir = filename:join(TargetDir, "lib"),
+ make_app_vsns_tab(DirList, LibDir, gb_trees:empty()).
+
+make_app_vsns_tab([], _LibDir, GBT) ->
+ GBT;
+make_app_vsns_tab([AppVer | AppVsns], LibDir, GBT0) ->
+ GBT1 = try
+ case file:read_file_info(filename:join(LibDir, AppVer)) of
+ {ok, _FInfo} ->
+ [App, Vsn] = string:tokens(AppVer, "-"),
+ add_app_vsn(App, Vsn, GBT0);
+ _ ->
+ GBT0
+ end
+ catch
+ _:_ ->
+ warn("Unexpected directory: ~p~n",
+ [filename:join(LibDir, AppVer)]),
+ GBT0
+ end,
+ make_app_vsns_tab(AppVsns, LibDir, GBT1).
+
+add_app_vsn(App, VsnList, GBT) when is_atom(App) ->
+ Vsn = parse_vsn(VsnList),
+ case gb_trees:lookup(App, GBT) of
+ none ->
+ gb_trees:insert(App, [Vsn], GBT);
+ {value, Vsns} ->
+ gb_trees:update(App, [Vsn | Vsns], GBT)
+ end;
+add_app_vsn(AppStr, VsnList, GBT) ->
+ add_app_vsn(list_to_atom(AppStr), VsnList, GBT).
+
+add_source_app_vsns([], AppVsnsTab) ->
+ AppVsnsTab;
+add_source_app_vsns([{App, Vsn, _IReqs} | AI], AppVsnsTab) ->
+ add_source_app_vsns(AI, add_app_vsn(App, Vsn, AppVsnsTab)).
+
+read_source_app_info([], _SourceDir) ->
+ [];
+read_source_app_info([App | Apps], SourceDir) ->
+ AppFile = case App of
+ "erts" ->
+ filename:join([SourceDir, "erts", "preloaded", "ebin",
+ "erts.app"]);
+ _ ->
+ filename:join([SourceDir, "lib", App, "ebin",
+ App ++ ".app"])
+ end,
+ AppAtom = list_to_atom(App),
+ case consult_file(AppFile) of
+ [{application, AppAtom, InfoList}] ->
+ Vsn = case lists:keyfind(vsn, 1, InfoList) of
+ {vsn, V} ->
+ V;
+ _ ->
+ err("Missing vsn in ~p~n", AppFile)
+ end,
+ AI = case lists:keyfind(runtime_dependencies, 1, InfoList) of
+ {runtime_dependencies, IReqs} ->
+ case parse_inst_reqs(IReqs) of
+ error ->
+ err("Failed to parse runtime_dependencies in ~p~n",
+ [AppFile]);
+ ParsedIReqs ->
+ {AppAtom, Vsn, ParsedIReqs}
+ end;
+ _ ->
+ {AppAtom, Vsn, []}
+ end,
+ [AI | read_source_app_info(Apps, SourceDir)];
+ _ ->
+ err("Failed to parse ~p~n", [AppFile])
+ end.
+
+parse_vsn(VsnStr) ->
+ list_to_tuple(lists:map(fun (IL) ->
+ list_to_integer(IL)
+ end, string:tokens(VsnStr, "."))).
+
+parse_inst_reqs(InstReqs) ->
+ try
+ parse_inst_reqs_aux(InstReqs)
+ catch
+ _ : _ ->
+ error
+ end.
+
+parse_inst_reqs_aux([]) ->
+ [];
+parse_inst_reqs_aux([IR | IRs]) ->
+ [App, VsnStr] = string:tokens(IR, "-"),
+ [{list_to_atom(App), parse_vsn(VsnStr)} | parse_inst_reqs_aux(IRs)].
+
+make_app_vsn_str({App, VsnTup}) ->
+ make_app_vsn_str(tuple_to_list(VsnTup), [atom_to_list(App), $-]).
+
+make_app_vsn_str([I], Acc) ->
+ lists:flatten([Acc, integer_to_list(I)]);
+make_app_vsn_str([I | Is], Acc) ->
+ make_app_vsn_str(Is, [Acc, integer_to_list(I), $.]).
+
+missing_min_req(App, AppVsn, IReq) ->
+ warn("Unfulfilled runtime dependency for application ~p-~s: ~s~n",
+ [App, AppVsn, make_app_vsn_str(IReq)]).
+
+verify_runtime_deps([], _AppVsnsTab, Res) ->
+ Res;
+verify_runtime_deps([{App, Vsn, IReqs} | SAIs], AppVsnsTab, Res0) ->
+ Res = lists:foldl(
+ fun ({IRApp, IRMinVsn} = InstReq, AccRes) ->
+ case gb_trees:lookup(IRApp, AppVsnsTab) of
+ none ->
+ missing_min_req(App, Vsn, InstReq),
+ false;
+ {value, AppVsns} ->
+ try
+ lists:foreach(
+ fun (AppVsn) ->
+ case meets_min_req(AppVsn, IRMinVsn) of
+ true ->
+ throw(true);
+ false ->
+ false
+ end
+ end,
+ AppVsns),
+ missing_min_req(App, Vsn, InstReq),
+ false
+ catch
+ throw : true ->
+ AccRes
+ end
+ end
+ end,
+ Res0,
+ IReqs),
+ verify_runtime_deps(SAIs, AppVsnsTab, Res).
+
+meets_min_req(Vsn, Vsn) ->
+ true;
+meets_min_req({X}, VsnReq) ->
+ meets_min_req({X, 0, 0}, VsnReq);
+meets_min_req({X, Y}, VsnReq) ->
+ meets_min_req({X, Y, 0}, VsnReq);
+meets_min_req(Vsn, {X}) ->
+ meets_min_req(Vsn, {X, 0, 0});
+meets_min_req(Vsn, {X, Y}) ->
+ meets_min_req(Vsn, {X, Y, 0});
+meets_min_req({X, _Y, _Z}, {XReq, _YReq, _ZReq}) when X > XReq ->
+ true;
+meets_min_req({X, Y, _Z}, {X, YReq, _ZReq}) when Y > YReq ->
+ true;
+meets_min_req({X, Y, Z}, {X, Y, ZReq}) when Z > ZReq ->
+ true;
+meets_min_req({_X, _Y, _Z}, {_XReq, _YReq, _ZReq}) ->
+ false;
+meets_min_req(Vsn, VsnReq) ->
+ gp_meets_min_req(mk_gp_vsn_list(Vsn), mk_gp_vsn_list(VsnReq)).
+
+gp_meets_min_req([X, Y, Z | _Vs], [X, Y, Z]) ->
+ true;
+gp_meets_min_req([X, Y, Z | _Vs], [XReq, YReq, ZReq]) ->
+ meets_min_req({X, Y, Z}, {XReq, YReq, ZReq});
+gp_meets_min_req([X, Y, Z | Vs], [X, Y, Z | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req(_Vsn, _VReq) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+gp_meets_min_req_tail([V | Vs], [V | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req_tail([], []) ->
+ true;
+gp_meets_min_req_tail([_V | _Vs], []) ->
+ true;
+gp_meets_min_req_tail([V | _Vs], [VReq]) when V > VReq ->
+ true;
+gp_meets_min_req_tail(_Vs, _VReqs) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+mk_gp_vsn_list(Vsn) ->
+ [X, Y, Z | Tail] = tuple_to_list(Vsn),
+ [X, Y, Z | remove_trailing_zeroes(Tail)].
+
+remove_trailing_zeroes([]) ->
+ [];
+remove_trailing_zeroes([0 | Vs]) ->
+ case remove_trailing_zeroes(Vs) of
+ [] -> [];
+ NewVs -> [0 | NewVs]
+ end;
+remove_trailing_zeroes([V | Vs]) ->
+ [V | remove_trailing_zeroes(Vs)].
diff --git a/otp_build b/otp_build
index a58477beb1..fca2b6ca13 100755
--- a/otp_build
+++ b/otp_build
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2002-2012. All Rights Reserved.
+# Copyright Ericsson AB 2002-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -170,6 +170,14 @@ determine_version_controller ()
# Special static config flags for certain platforms are set here
set_config_flags ()
{
+ #
+ # NOTE! Do not add special flags here without a *very good*
+ # reason. We normally do not want "./otp_build configure"
+ # and "./configure" to produce different results.
+ # However, in the Windows case this does not matter, since
+ # the only supported way to build on Windows is using
+ # otp_build.
+ #
# * Extra flags to pass to configure are placed in `CONFIG_FLAGS'.
# * The command line is no longer added to `CONFIG_FLAGS' by
# `set_config_flags'. It is instead passed directly to
@@ -180,16 +188,6 @@ set_config_flags ()
# (in the cross compilation case the whole command line as well as
# the cross configuration have been moved here).
- if target_contains linux; then
- XX=`echo $* | grep -v able-fp-exceptions`
- if [ "$*" = "$XX" ]; then
- CONFIG_FLAGS="$CONFIG_FLAGS --disable-fp-exceptions"
- fi
- fi
- if target_contains "univel-sysv4"; then
- CONFIG_FLAGS="$CONFIG_FLAGS --x-libraries=/usr/lib/X11"
- fi
-
if target_contains free_source; then
CONFIG_FLAGS="$CONFIG_FLAGS --host=$TARGET"
fi
@@ -262,62 +260,32 @@ create_lib_configure_in()
}
}
-find_sum()
-{
- candidates="sum cksum md5sum sha1sum"
- SUM_CMD="wc"
- for x in $candidates; do
- if (echo foo | $x > /dev/null 2>&1); then
- SUM_CMD=$x
- break
- fi
- done
-}
-
-chk_eq()
-{
- master=$1
- shift
- slaves="$@"
- master_sum=`$SUM_CMD $master | awk '{print $1}'`
- for x in $slaves; do
- s=`$SUM_CMD $x | awk '{print $1}'`
- if test "$s" != "$master_sum"; then
- echo "Error: $master and $x are not equal, make sure they are!" >&2
- echo "Maybe you would want to:" >&2
- echo "for x in $slaves; do cp $master \$x; done" >&2
- echo "? Or something else is wrong." 2>&1
- exit 2
- fi
- done
-}
-
-check_config_helpers ()
+distribute_config_helpers ()
{
-
- aclocals="./aclocal.m4 ./lib/erl_interface/aclocal.m4 ./lib/odbc/aclocal.m4 ./lib/wx/aclocal.m4 ./lib/megaco/aclocal.m4"
- install_shs="./lib/common_test/priv/auxdir/install-sh ./lib/erl_interface/src/auxdir/install-sh ./lib/test_server/src/install-sh"
- config_guesses="./lib/common_test/priv/auxdir/config.guess ./lib/erl_interface/src/auxdir/config.guess ./lib/test_server/src/config.guess"
- config_subs="./lib/common_test/priv/auxdir/config.sub ./lib/erl_interface/src/auxdir/config.sub ./lib/test_server/src/config.sub"
+ aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco"
+ autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/test_server/src ./lib/wx/autoconf"
aclocal_master="./erts/aclocal.m4"
install_sh_master="./erts/autoconf/install-sh"
config_guess_master="./erts/autoconf/config.guess"
config_sub_master="./erts/autoconf/config.sub"
- find_sum
-
- chk_eq $aclocal_master $aclocals
- chk_eq $install_sh_master $install_shs
- chk_eq $config_guess_master $config_guesses
- chk_eq $config_sub_master $config_subs
+ for dir in $aclocal_dirs; do
+ $install_sh_master -m 644 -t "$dir" "$aclocal_master"
+ done
+ for dir in $autoconf_aux_dirs; do
+ $install_sh_master -d "$dir"
+ $install_sh_master -t "$dir" "$install_sh_master"
+ $install_sh_master -t "$dir" "$config_guess_master"
+ $install_sh_master -t "$dir" "$config_sub_master"
+ done
}
do_autoconf ()
{
create_lib_configure_in
- check_config_helpers
+ distribute_config_helpers
if target_contains win32; then
# Select the correct autoconf on cygwin
@@ -1308,12 +1276,12 @@ cd $ERL_TOP
determine_version_controller
-# Unset ERL_FLAGS and ERL_<Release>_FLAGS during bootstrap to
+# Unset ERL_FLAGS and ERL_OTP<OTP Release>_FLAGS during bootstrap to
# prevent potential problems
-sys_vsn=`awk '/SYSTEM_VSN = / {print $3}' < erts/vsn.mk`
-sys_erl_flags="ERL_${sys_vsn}_FLAGS"
+otp_major_vsn=`cat OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`
+erl_otp_flags="ERL_OTP${otp_major_vsn}_FLAGS"
unset ERL_FLAGS
-#unset ${sys_erl_flags}
+unset ${erl_otp_flags}
# Target first guess, won't necessarily hold, may be changed for
# certain parameters.
diff --git a/otp_patch_apply b/otp_patch_apply
new file mode 100755
index 0000000000..947aa1e6ee
--- /dev/null
+++ b/otp_patch_apply
@@ -0,0 +1,480 @@
+#!/bin/sh
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+
+version="1.0.1"
+
+force=
+lib_path=
+orig_dir=
+sdir=
+idir="/broken/path/here"
+cleanup=no
+install_docs=yes
+
+invalid_src="does not seem to be a valid OTP source tree"
+not_built="Source in has not been built"
+doc_not_built="Documentation has not been built. Either build the
+documentation and re-run 'otp_patch_apply', or re-run 'otp_patch_apply'
+with the '-n' switch."
+
+print_usage()
+{
+ cat <<EOF
+otp_patch_apply -s <Dir> -i <Dir> [-l <Dir>] [-c] [-f] [-h] [-n] [-v] \\
+ <App1> [... <AppN>]
+
+ -s <Dir> -- OTP source directory that contain build results.
+ -i <Dir> -- OTP installation directory to patch.
+ -l <Dir> -- Alternative OTP source library directory path(s) containing
+ build results of OTP applications. Multiple paths should be
+ colon separated.
+ -c -- Cleanup (remove) old versions of applications patched
+ in the installation.
+ -f -- Force patch of application(s) even though dependencies are
+ not fullfilled.
+ -h -- Print this help then exit.
+ -n -- Do not install documentation.
+ -v -- Print version then exit.
+ <AppX> -- Application to patch.
+
+Environment Variable:
+ ERL_LIBS -- Alternative OTP source library directory path(s) containing
+ build results of OTP applications. Multiple paths should be
+ colon separated.
+
+NOTE:
+ * Complete build environment is required while running otp_patch_apply.
+ * Before applying a patch you need to build all of OTP in the source
+ directory.
+ * All source directories identified by -s and -l should contain build
+ results of OTP applications.
+
+Version: $version
+
+EOF
+
+}
+
+error()
+{
+ echo "ERROR:" "$@" 1>&2
+ exit 1
+}
+
+usage_error()
+{
+ echo "ERROR:" "$@" 1>&2
+ echo "" 1>&2
+ print_usage 1>&2
+ exit 1
+}
+
+usage()
+{
+ print_usage
+ exit 0
+}
+
+alt_lib_path()
+{
+ app=$1
+ save_ifs=$IFS
+ IFS=:
+
+ cd "$orig_dir" || error "Cannot change directory to $orig_dir"
+
+ for lib in $lib_path; do
+ # Want absolute path
+ case "$lib" in
+ /*)
+ ;;
+ *)
+ cd "$lib" || error "Cannot change directory to $lib"
+ lib=`pwd`
+ cd "$orig_dir" || error "Cannot change directory to $orig_dir"
+ esac
+ if [ -d "$lib/$app" ]; then
+ echo "$lib/$app"
+ IFS=$save_ifs
+ return 0
+ fi
+ done
+
+ IFS=$save_ifs
+
+ return 1
+}
+
+prog_in_mod_path()
+{
+ chk_path="/bin:$PATH"
+ PROG=$1
+ save_ifs=$IFS
+ IFS=:
+ if [ "X$TARGET" = "Xwin32" ]; then
+ for p in $chk_path; do
+ if [ -f "$p/$PROG.exe" ]; then
+ IFS=$save_ifs
+ echo "$p/$PROG.exe"
+ return 0
+ fi
+ done
+ else
+ for p in $chk_path; do
+ if [ -x "$p/$PROG" ]; then
+ IFS=$save_ifs
+ echo "$p/$PROG"
+ return 0
+ fi
+ done
+ fi
+ IFS=$save_ifs
+ return 1
+}
+
+find_prog()
+{
+ prog_in_mod_path "$1"
+ if [ $? -ne 0 ]; then
+ echo "$1"
+ fi
+ return 0
+}
+
+# Parse arguments
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ "-s")
+ shift
+ if [ ! $# -gt 0 ]; then
+ usage_error "Missing OTP source directory"
+ fi
+ sdir="$1";;
+ "-i")
+ shift
+ if [ ! $# -gt 0 ]; then
+ usage_error "Missing OTP install directory"
+ fi
+ idir="$1";;
+ "-l")
+ shift
+ if [ ! $# -gt 0 ]; then
+ usage_error "Missing OTP library directory"
+ fi
+ if [ "x$lib_path" = "x" ]; then
+ lib_path="$1"
+ else
+ lib_path="$lib_path:$1"
+ fi;;
+ "-f")
+ force="-force";;
+ "-c")
+ cleanup=yes;;
+ "-h")
+ usage;;
+ "-n")
+ install_docs=no;;
+ "-v")
+ echo "otp_patch_apply version $version"
+ exit 0;;
+ *)
+ app="$1"
+ applications="$applications $app";;
+ esac
+ shift
+done
+
+# Check that we got mandatory arguments
+test "x$sdir" != "x" || usage_error "Missing OTP source directory"
+test "x$idir" != "x" || usage_error "Missing OTP install directory"
+test "x$applications" != "x" || usage_error "Missing applications"
+
+orig_dir=`pwd`
+
+# Check that the source directory seems sane
+cd "$sdir" 2>/dev/null || error "Cannot change directory to $sdir"
+
+# Want absolute path
+case "$sdir" in
+ /*) ;;
+ *) sdir=`pwd`;;
+esac
+
+export ERL_TOP="$sdir"
+test -f "$sdir/otp_build" || error "$ERL_TOP" $invalid_src
+test -f "$sdir/OTP_VERSION" || error "$ERL_TOP" $invalid_src
+test -f "$sdir/otp_versions.table" || error "$ERL_TOP" $invalid_src
+test -f "$sdir/erts/autoconf/config.guess" || error "$ERL_TOP" $invalid_src
+test -f "$sdir/make/verify_runtime_dependencies" || error "$ERL_TOP" $invalid_src
+test -x "$sdir/bootstrap/bin/erl" || error $not_built
+test -x "$sdir/bootstrap/bin/erlc" || error $not_built
+test -x "$sdir/bootstrap/bin/escript" || error $not_built
+test -f "$sdir/make/otp_built" || error $not_built
+
+if [ $install_docs = yes ]; then
+ test -f "$sdir/make/otp_doc_built" || usage_error $doc_not_built
+fi
+
+otp_rel=`sed 's|\([0-9]*\).*|\1|' < $ERL_TOP/OTP_VERSION` || \
+ error "Failed to read $ERL_TOP/OTP_VERSION"
+
+case "$otp_rel" in
+ 1[7-9]|[2-9][0-9]) ;; # ok; release 17-99
+ *) error "Invalid OTP release: $otp_rel";;
+esac
+
+export PATH="$ERL_TOP/bootstrap/bin:$PATH"
+erlc="$ERL_TOP/bootstrap/bin/erlc"
+erl="$ERL_TOP/bootstrap/bin/erl"
+
+erl_otp_rel=`$erl -noshell -noinput -eval "io:format(\"~s~n\", [erlang:system_info(otp_release)]), erlang:halt(0)"` || \
+ error "Failed to execute: $erl"
+
+test "$otp_rel" = "$erl_otp_rel" || error "Inconsistent source: $sdir"
+
+app_dirs=
+for app in $applications; do
+ case "$app" in
+ "erts")
+ dir="$ERL_TOP/erts";;
+ *)
+ dir="$ERL_TOP/lib/$app";;
+ esac
+ if [ ! -d "$dir" ]; then
+ dir=`alt_lib_path "$app"`
+ if [ $? -ne 0 ]; then
+ error "Application missing in source: $app"
+ fi
+ fi
+ app_dirs="$app_dirs $dir"
+done
+
+cd "$orig_dir" 2>/dev/null || error "Cannot change directory to $orig_dir"
+
+# Check that the install directory seems sane
+cd "$idir" 2>/dev/null || error "Cannot change directory to $idir"
+
+# Want absolute path
+case "$idir" in
+ /*) ;;
+ *) idir=`pwd`;;
+esac
+
+test -d "$idir/releases/$otp_rel" || \
+ error "No OTP-$otp_rel installation present in $idir"
+
+cd "$ERL_TOP" 2>/dev/null || error "Cannot change directory to $ERL_TOP"
+
+# Some tools we use
+rm=`find_prog rm`
+rmdir=`find_prog rmdir`
+cp=`find_prog cp`
+mv=`find_prog mv`
+mkdir=`find_prog mkdir`
+
+# Setup build stuff
+if [ "x$TARGET" = "x" ]; then
+ TARGET=`$ERL_TOP/erts/autoconf/config.guess`
+fi
+BUILDSYS=$TARGET
+if [ -z "$MAKE" ]; then
+ case $TARGET in
+ win32)
+ MAKE=make;;
+ *)
+ prog_in_mod_path gmake >/dev/null
+ if [ $? -eq 0 ]; then
+ MAKE=gmake
+ else
+ MAKE=make
+ fi;;
+ esac
+fi
+if [ X`$MAKE is_cross_configured` = Xyes ]; then
+ TARGET=`$MAKE target_configured`
+elif [ "x$OVERRIDE_TARGET" != "x" -a "x$OVERRIDE_TARGET" != "xwin32" ]; then
+ TARGET=$OVERRIDE_TARGET
+fi
+
+# Check for cleanup
+inst_app_vers="$idir/releases/$otp_rel/installed_application_versions"
+rm_app_vers=
+if [ $cleanup = yes ]; then
+ $mv "$inst_app_vers" "${inst_app_vers}.save" || \
+ error "Failed to save $inst_app_vers"
+ for app in $applications; do
+ tmp=`grep "$app-*" "${inst_app_vers}.save"`
+ rm_app_vers="$rm_app_vers $tmp"
+ done
+ $cp "${inst_app_vers}.save" "$inst_app_vers"
+ for rm_app_ver in $rm_app_vers; do
+ $cp "$inst_app_vers" "${inst_app_vers}.tmp"
+ grep -v $rm_app_ver "${inst_app_vers}.tmp" > "$inst_app_vers"
+ done
+ $rm -f "${inst_app_vers}.tmp"
+fi
+
+# Verify runtime dependencies
+$ERL_TOP/make/verify_runtime_dependencies -release "$otp_rel" \
+ -source "$ERL_TOP" -target "$idir" $force $applications || {
+ test ! -f "${inst_app_vers}.save" || \
+ $mv "${inst_app_vers}.save" "$inst_app_vers"
+ exit 1
+}
+
+# Update OTP_VERSION in installation
+otp_version=`cat "$idir/releases/$otp_rel/OTP_VERSION"` || {
+ test ! -f "${inst_app_vers}.save" || \
+ $mv "${inst_app_vers}.save" "$inst_app_vers"
+ error "Not able to read $idir/releases/$otp_rel/OTP_VERSION"
+}
+
+{
+ echo "$otp_version" | sed "s|^\([^\*]*\)\**|\1\*\*|g" > \
+ "$idir/releases/$otp_rel/OTP_VERSION"
+} 2>/dev/null || {
+ test ! -f "${inst_app_vers}.save" || \
+ $mv "${inst_app_vers}.save" "$inst_app_vers"
+ error "Not able to update $idir/releases/$otp_rel/OTP_VERSION"
+}
+
+# Do actual cleanup
+if [ "x$rm_app_vers" != "x" ]; then
+ for app_ver in $rm_app_vers; do
+ case x"$app_ver" in
+ x)
+ ;;
+ xerts-*)
+ $rm -rf "$idir/$app_ver" ;;
+ x*)
+ $rm -rf "$idir/lib/$app_ver" ;;
+ esac
+ done
+ $rm -f "${inst_app_vers}.save"
+fi
+
+# Install application from built source
+for app_dir in $app_dirs; do
+ (cd "$app_dir" && \
+ $MAKE MAKE="$MAKE" TARGET=$TARGET RELEASE_ROOT="$idir" \
+ RELEASE_PATH="$idir" TESTROOT="$idir" release) || exit 1
+done
+
+if [ $install_docs = yes ]; then
+# Documentation have been built and should be installed
+
+ for app_dir in $app_dirs; do
+ (cd "$app_dir" && \
+ $MAKE MAKE="$MAKE" RELEASE_ROOT="$idir" RELEASE_PATH="$idir" \
+ TESTROOT="$idir" release_docs) || exit 1
+ done
+
+ (cd "$sdir/system/doc/top" && $MAKE clean)
+
+ (cd "$sdir/system/doc/top" && \
+ $MAKE MAKE="$MAKE" RELEASE_ROOT="$idir" RELEASE_PATH="$idir" \
+ TESTROOT="$idir" release_docs) || exit 1
+
+ echo ""
+ echo "*"
+ echo "* NOTE! In order to update pre-formatted man pages you"
+ echo "* need to run the 'Install' script located in:"
+ echo "* $idir"
+ echo "*"
+fi
+
+# If erts, kernel, stdlib or sasl is included, find versions
+for app in $applications; do
+ case "$app" in
+ erts)
+ erts_vsn=`grep '^VSN' erts/vsn.mk | sed "s|^VSN.*=[^0-9]*\([0-9].*\)$|\1|g"`
+ update_rel=true;;
+ kernel)
+ kernel_vsn=`sed "s|^KERNEL_VSN[^=]*=[^0-9]*\([0-9].*\)$|\1|g" lib/kernel/vsn.mk`
+ update_rel=true;;
+ stdlib)
+ stdlib_vsn=`sed "s|^STDLIB_VSN[^=]*=[^0-9]*\([0-9].*\)$|\1|g" lib/stdlib/vsn.mk`
+ update_rel=true;;
+ sasl)
+ sasl_vsn=`sed "s|^SASL_VSN[^=]*=[^0-9]*\([0-9].*\)$|\1|g" lib/sasl/vsn.mk`
+ update_rel=true;;
+ *)
+ ;;
+ esac
+done
+
+# and find the old versions for those not included
+if [ "X$update_rel" != "X" ]; then
+ if [ "X$erts_vsn" = "X" ]; then
+ erts_vsns=`ls -d "$idir"/erts-* | sed "s|$idir/erts-\([0-9\.].*\)|\1|g"`
+ erts_vsn=`echo "$erts_vsns" | sort -t '.' -g | tail -n 1`
+ fi
+ if [ "X$kernel_vsn" = "X" ]; then
+ kernel_vsns=`ls -d "$idir"/lib/kernel-* | sed "s|$idir/lib/kernel-\([0-9\.].*\)|\1|g"`
+ kernel_vsn=`echo "$kernel_vsns" | sort -t '.' -g | tail -n 1`
+ fi
+ if [ "X$stdlib_vsn" = "X" ]; then
+ stdlib_vsns=`ls -d "$idir"/lib/stdlib-* | sed "s|$idir/lib/stdlib-\([0-9\.].*\)|\1|g"`
+ stdlib_vsn=`echo "$stdlib_vsns" | sort -t '.' -g | tail -n 1`
+ fi
+ if [ "X$sasl_vsn" = "X" ]; then
+ sasl_vsns=`ls -d "$idir"/lib/sasl-* | sed "s|$idir/lib/sasl-\([0-9\.].*\)|\1|g"`
+ sasl_vsn=`echo "$sasl_vsns" | sort -t '.' -g | tail -n 1`
+ fi
+
+ # Generate .rel, .script and .boot - to tmp dir
+ start_clean="{release, {\"Erlang/OTP\",\"$otp_rel\"}, {erts, \"$erts_vsn\"}, [{kernel,\"$kernel_vsn\"}, {stdlib,\"$stdlib_vsn\"}]}."
+ start_sasl="{release, {\"Erlang/OTP\",\"$otp_rel\"}, {erts, \"$erts_vsn\"}, [{kernel,\"$kernel_vsn\"}, {stdlib,\"$stdlib_vsn\"}, {sasl,\"$sasl_vsn\"}]}."
+
+ tmp_dir="$idir/tmp";
+ if [ ! -d "$tmp_dir" ]; then
+ $mkdir "$tmp_dir"
+ fi
+ echo "$start_sasl" > "$tmp_dir/start_sasl.rel"
+ echo "$start_clean" > "$tmp_dir/start_clean.rel"
+ echo "$start_clean" > "$tmp_dir/no_dot_erlang.rel"
+
+ $erlc -I"$idir"/lib/*/ebin -o"$tmp_dir" "$tmp_dir/start_sasl.rel" || exit 1
+ $erlc -I"$idir"/lib/*/ebin -o"$tmp_dir" +no_warn_sasl "$tmp_dir/start_clean.rel" || exit 1
+ $erlc -I"$idir"/lib/*/ebin -o"$tmp_dir" +no_warn_sasl +no_dot_erlang "$tmp_dir/no_dot_erlang.rel" || exit 1
+
+ # Generate RELEASES file
+ "$erl" -noinput +B -eval "release_handler:create_RELEASES(\"%ERL_ROOT%\", \"$tmp_dir\", \"$tmp_dir/start_sasl.rel\", []), halt()" || exit 1
+
+ # If all good so far, move generated files into target area
+ $mv "$tmp_dir/RELEASES" "$idir/releases/RELEASES.src"
+ $mv "$tmp_dir"/* "$idir/releases/$otp_rel"
+ $rmdir "$tmp_dir"
+
+ # Remove old start scripts (forces a new run of Install)
+ $rm -f "$idir"/releases/RELEASES
+ $rm -f "$idir"/bin/*.script
+ $rm -f "$idir"/bin/*.boot
+ $rm -f "$idir"/bin/erl
+
+ echo ""
+ echo "*"
+ echo "* NOTE! In order to get a runnable OTP system again you"
+ echo "* need to run the 'Install' script located in:"
+ echo "* $idir"
+ echo "*"
+fi
+
diff --git a/otp_versions.table b/otp_versions.table
new file mode 100644
index 0000000000..50a77237ff
--- /dev/null
+++ b/otp_versions.table
@@ -0,0 +1,23 @@
+OTP-17.5.6 : inets-5.10.9 ssh-3.2.4 ssl-6.0.1 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9.2 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5.5 : diameter-1.9.2 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 inets-5.10.8 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 ssh-3.2.3 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5.4 : inets-5.10.8 ssh-3.2.3 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9.1 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5.3 : common_test-1.10.1 diameter-1.9.1 erts-6.4.1 snmp-5.1.2 test_server-3.8.1 # asn1-3.0.4 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 inets-5.10.7 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 ssh-3.2.2 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5.2 : inets-5.10.7 ssh-3.2.2 # asn1-3.0.4 common_test-1.10 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.1 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5.1 : ssh-3.2.1 # asn1-3.0.4 common_test-1.10 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 inets-5.10.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.1 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+OTP-17.5 : asn1-3.0.4 common_test-1.10 compiler-5.0.4 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9 eldap-1.1.1 erts-6.4 hipe-3.11.3 inets-5.10.6 kernel-3.2 mnesia-4.12.5 observer-2.0.4 os_mon-2.3.1 public_key-0.23 runtime_tools-1.8.16 ssh-3.2 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8 tools-2.7.2 wx-1.3.3 # cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 edoc-0.7.16 erl_docgen-0.3.7 erl_interface-3.7.20 et-1.5 eunit-2.2.9 gs-1.5.16 ic-4.3.6 jinterface-1.5.12 megaco-3.17.3 odbc-2.10.22 orber-3.7.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 reltool-0.6.6 sasl-2.4.1 snmp-5.1.1 typer-0.9.8 webtool-0.8.10 xmerl-1.3.7 :
+OTP-17.4.1 : erts-6.3.1 inets-5.10.5 # asn1-3.0.3 common_test-1.9 compiler-5.0.3 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4.2 debugger-4.0.2 dialyzer-2.7.3 diameter-1.8 edoc-0.7.16 eldap-1.1 erl_docgen-0.3.7 erl_interface-3.7.20 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.2 ic-4.3.6 jinterface-1.5.12 kernel-3.1 megaco-3.17.3 mnesia-4.12.4 observer-2.0.3 odbc-2.10.22 orber-3.7.1 os_mon-2.3 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.22.1 reltool-0.6.6 runtime_tools-1.8.15 sasl-2.4.1 snmp-5.1.1 ssh-3.1 ssl-5.3.8 stdlib-2.3 syntax_tools-1.6.17 test_server-3.7.2 tools-2.7.1 typer-0.9.8 webtool-0.8.10 wx-1.3.2 xmerl-1.3.7 :
+OTP-17.4 : asn1-3.0.3 common_test-1.9 compiler-5.0.3 crypto-3.4.2 debugger-4.0.2 dialyzer-2.7.3 diameter-1.8 edoc-0.7.16 eldap-1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.3 eunit-2.2.9 hipe-3.11.2 inets-5.10.4 jinterface-1.5.12 kernel-3.1 megaco-3.17.3 mnesia-4.12.4 observer-2.0.3 odbc-2.10.22 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 runtime_tools-1.8.15 snmp-5.1.1 ssh-3.1 ssl-5.3.8 stdlib-2.3 syntax_tools-1.6.17 test_server-3.7.2 tools-2.7.1 wx-1.3.2 # cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 et-1.5 gs-1.5.16 ic-4.3.6 orber-3.7.1 os_mon-2.3 ose-1.0.2 public_key-0.22.1 reltool-0.6.6 sasl-2.4.1 typer-0.9.8 webtool-0.8.10 xmerl-1.3.7 :
+OTP-17.3.4 : erts-6.2.1 # asn1-3.0.2 common_test-1.8.2 compiler-5.0.2 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4.1 debugger-4.0.1 dialyzer-2.7.2 diameter-1.7.1 edoc-0.7.15 eldap-1.0.4 erl_docgen-0.3.6 erl_interface-3.7.19 et-1.5 eunit-2.2.8 gs-1.5.16 hipe-3.11.1 ic-4.3.6 inets-5.10.3 jinterface-1.5.11 kernel-3.0.3 megaco-3.17.2 mnesia-4.12.3 observer-2.0.2 odbc-2.10.21 orber-3.7.1 os_mon-2.3 ose-1.0.2 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22.1 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4.1 snmp-5.1 ssh-3.0.8 ssl-5.3.7 stdlib-2.2 syntax_tools-1.6.16 test_server-3.7.1 tools-2.7 typer-0.9.8 webtool-0.8.10 wx-1.3.1 xmerl-1.3.7 :
+OTP-17.3.3 : ssh-3.0.8 # asn1-3.0.2 common_test-1.8.2 compiler-5.0.2 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4.1 debugger-4.0.1 dialyzer-2.7.2 diameter-1.7.1 edoc-0.7.15 eldap-1.0.4 erl_docgen-0.3.6 erl_interface-3.7.19 erts-6.2 et-1.5 eunit-2.2.8 gs-1.5.16 hipe-3.11.1 ic-4.3.6 inets-5.10.3 jinterface-1.5.11 kernel-3.0.3 megaco-3.17.2 mnesia-4.12.3 observer-2.0.2 odbc-2.10.21 orber-3.7.1 os_mon-2.3 ose-1.0.2 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22.1 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4.1 snmp-5.1 ssl-5.3.7 stdlib-2.2 syntax_tools-1.6.16 test_server-3.7.1 tools-2.7 typer-0.9.8 webtool-0.8.10 wx-1.3.1 xmerl-1.3.7 :
+OTP-17.3.2 : ssh-3.0.7 ssl-5.3.7 # asn1-3.0.2 common_test-1.8.2 compiler-5.0.2 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4.1 debugger-4.0.1 dialyzer-2.7.2 diameter-1.7.1 edoc-0.7.15 eldap-1.0.4 erl_docgen-0.3.6 erl_interface-3.7.19 erts-6.2 et-1.5 eunit-2.2.8 gs-1.5.16 hipe-3.11.1 ic-4.3.6 inets-5.10.3 jinterface-1.5.11 kernel-3.0.3 megaco-3.17.2 mnesia-4.12.3 observer-2.0.2 odbc-2.10.21 orber-3.7.1 os_mon-2.3 ose-1.0.2 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22.1 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4.1 snmp-5.1 stdlib-2.2 syntax_tools-1.6.16 test_server-3.7.1 tools-2.7 typer-0.9.8 webtool-0.8.10 wx-1.3.1 xmerl-1.3.7 :
+OTP-17.3.1 : eldap-1.0.4 erl_interface-3.7.19 jinterface-1.5.11 orber-3.7.1 ose-1.0.2 ssh-3.0.6 # asn1-3.0.2 common_test-1.8.2 compiler-5.0.2 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4.1 debugger-4.0.1 dialyzer-2.7.2 diameter-1.7.1 edoc-0.7.15 erl_docgen-0.3.6 erts-6.2 et-1.5 eunit-2.2.8 gs-1.5.16 hipe-3.11.1 ic-4.3.6 inets-5.10.3 kernel-3.0.3 megaco-3.17.2 mnesia-4.12.3 observer-2.0.2 odbc-2.10.21 os_mon-2.3 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22.1 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4.1 snmp-5.1 ssl-5.3.6 stdlib-2.2 syntax_tools-1.6.16 test_server-3.7.1 tools-2.7 typer-0.9.8 webtool-0.8.10 wx-1.3.1 xmerl-1.3.7 :
+OTP-17.3 : asn1-3.0.2 common_test-1.8.2 compiler-5.0.2 crypto-3.4.1 dialyzer-2.7.2 diameter-1.7.1 edoc-0.7.15 erl_docgen-0.3.6 erl_interface-3.7.18 erts-6.2 eunit-2.2.8 hipe-3.11.1 ic-4.3.6 inets-5.10.3 jinterface-1.5.10 kernel-3.0.3 megaco-3.17.2 mnesia-4.12.3 observer-2.0.2 odbc-2.10.21 os_mon-2.3 ose-1.0.1 public_key-0.22.1 sasl-2.4.1 snmp-5.1 ssh-3.0.5 ssl-5.3.6 stdlib-2.2 tools-2.7 wx-1.3.1 # cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 debugger-4.0.1 eldap-1.0.3 et-1.5 gs-1.5.16 orber-3.7 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 reltool-0.6.6 runtime_tools-1.8.14 syntax_tools-1.6.16 test_server-3.7.1 typer-0.9.8 webtool-0.8.10 xmerl-1.3.7 :
+OTP-17.2.2 : mnesia-4.12.2 # asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 edoc-0.7.14 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.17 erts-6.1.2 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.11 ic-4.3.5 inets-5.10.2 jinterface-1.5.9 kernel-3.0.2 megaco-3.17.1 observer-2.0.1 odbc-2.10.20 orber-3.7 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4 snmp-5.0 ssh-3.0.4 ssl-5.3.5 stdlib-2.1.1 syntax_tools-1.6.16 test_server-3.7.1 tools-2.6.15 typer-0.9.8 webtool-0.8.10 wx-1.3 xmerl-1.3.7 :
+OTP-17.2.1 : ssh-3.0.4 # asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 edoc-0.7.14 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.17 erts-6.1.2 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.11 ic-4.3.5 inets-5.10.2 jinterface-1.5.9 kernel-3.0.2 megaco-3.17.1 mnesia-4.12.1 observer-2.0.1 odbc-2.10.20 orber-3.7 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4 snmp-5.0 ssl-5.3.5 stdlib-2.1.1 syntax_tools-1.6.16 test_server-3.7.1 tools-2.6.15 typer-0.9.8 webtool-0.8.10 wx-1.3 xmerl-1.3.7 :
+OTP-17.2 : orber-3.7 snmp-5.0 # asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 edoc-0.7.14 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.17 erts-6.1.2 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.11 ic-4.3.5 inets-5.10.2 jinterface-1.5.9 kernel-3.0.2 megaco-3.17.1 mnesia-4.12.1 observer-2.0.1 odbc-2.10.20 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4 ssh-3.0.3 ssl-5.3.5 stdlib-2.1.1 syntax_tools-1.6.16 test_server-3.7.1 tools-2.6.15 typer-0.9.8 webtool-0.8.10 wx-1.3 xmerl-1.3.7 :
+OTP-17.1.2 : erts-6.1.2 kernel-3.0.2 stdlib-2.1.1 # asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 edoc-0.7.14 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.17 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.11 ic-4.3.5 inets-5.10.2 jinterface-1.5.9 megaco-3.17.1 mnesia-4.12.1 observer-2.0.1 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 ssh-3.0.3 ssl-5.3.5 syntax_tools-1.6.16 test_server-3.7.1 tools-2.6.15 typer-0.9.8 webtool-0.8.10 wx-1.3 xmerl-1.3.7 :
+OTP-17.1.1 : edoc-0.7.14 erts-6.1.1 syntax_tools-1.6.16 # asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.17 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.11 ic-4.3.5 inets-5.10.2 jinterface-1.5.9 kernel-3.0.1 megaco-3.17.1 mnesia-4.12.1 observer-2.0.1 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.6 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 ssh-3.0.3 ssl-5.3.5 stdlib-2.1 test_server-3.7.1 tools-2.6.15 typer-0.9.8 webtool-0.8.10 wx-1.3 xmerl-1.3.7 :
+OTP-17.1 : asn1-3.0.1 common_test-1.8.1 compiler-5.0.1 crypto-3.4 debugger-4.0.1 dialyzer-2.7.1 diameter-1.7 erl_interface-3.7.17 erts-6.1 hipe-3.11 inets-5.10.2 kernel-3.0.1 mnesia-4.12.1 observer-2.0.1 reltool-0.6.6 ssh-3.0.3 ssl-5.3.5 stdlib-2.1 syntax_tools-1.6.15 test_server-3.7.1 tools-2.6.15 typer-0.9.8 wx-1.3 # cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 edoc-0.7.13 eldap-1.0.3 erl_docgen-0.3.5 et-1.5 eunit-2.2.7 gs-1.5.16 ic-4.3.5 jinterface-1.5.9 megaco-3.17.1 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 webtool-0.8.10 xmerl-1.3.7 :
+OTP-17.0.2 : inets-5.10.1 ssh-3.0.2 # asn1-3.0 common_test-1.8 compiler-5.0 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.3 debugger-4.0 dialyzer-2.7 diameter-1.6 edoc-0.7.13 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.16 erts-6.0.1 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.10.3 ic-4.3.5 jinterface-1.5.9 kernel-3.0 megaco-3.17.1 mnesia-4.12 observer-2.0 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.5 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 ssl-5.3.4 stdlib-2.0 syntax_tools-1.6.14 test_server-3.7 tools-2.6.14 typer-0.9.7 webtool-0.8.10 wx-1.2 xmerl-1.3.7 :
+OTP-17.0.1 : erts-6.0.1 typer-0.9.7 # asn1-3.0 common_test-1.8 compiler-5.0 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.3 debugger-4.0 dialyzer-2.7 diameter-1.6 edoc-0.7.13 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.16 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.10.3 ic-4.3.5 inets-5.10 jinterface-1.5.9 kernel-3.0 megaco-3.17.1 mnesia-4.12 observer-2.0 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.5 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 ssh-3.0.1 ssl-5.3.4 stdlib-2.0 syntax_tools-1.6.14 test_server-3.7 tools-2.6.14 webtool-0.8.10 wx-1.2 xmerl-1.3.7 :
+OTP-17.0 : asn1-3.0 common_test-1.8 compiler-5.0 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.3 debugger-4.0 dialyzer-2.7 diameter-1.6 edoc-0.7.13 eldap-1.0.3 erl_docgen-0.3.5 erl_interface-3.7.16 erts-6.0 et-1.5 eunit-2.2.7 gs-1.5.16 hipe-3.10.3 ic-4.3.5 inets-5.10 jinterface-1.5.9 kernel-3.0 megaco-3.17.1 mnesia-4.12 observer-2.0 odbc-2.10.20 orber-3.6.27 os_mon-2.2.15 ose-1.0 otp_mibs-1.0.9 parsetools-2.0.11 percept-0.8.9 public_key-0.22 reltool-0.6.5 runtime_tools-1.8.14 sasl-2.4 snmp-4.25.1 ssh-3.0.1 ssl-5.3.4 stdlib-2.0 syntax_tools-1.6.14 test_server-3.7 tools-2.6.14 typer-0.9.6 webtool-0.8.10 wx-1.2 xmerl-1.3.7 # :
diff --git a/system/doc/definitions/cite.defs.xml b/system/doc/definitions/cite.defs.xml
index e54251fa24..8fb91e2b44 100644
--- a/system/doc/definitions/cite.defs.xml
+++ b/system/doc/definitions/cite.defs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cites SYSTEM "cites.dtd">
<cites>
diff --git a/system/doc/definitions/term.defs b/system/doc/definitions/term.defs
index f3d6f865d2..6091a46a20 100644
--- a/system/doc/definitions/term.defs
+++ b/system/doc/definitions/term.defs
@@ -1,8 +1,6 @@
[{"agent","agent","An entity that terminates a management protocol in the Network Element.","mbj"},
{"API","API","Application Programming Interface. The interface towards an application. Usually this is a set of functions available, but can also be a set of messages sent to or from an application.","mbj"},
{"application","application","A collection of resources which is required to offer a specific service.","mbj"},
-{"appmon","Application Monitor","A graphical node and application process tree viewer. See also appmon.","mbj"},
-{"Appmon","Appmon","Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer.","mbj"},
{"app callback","application callback module","A module which is called when the application is started, and when it has stopped. Every application has one application callback module.","mbj"},
{"AC","application controller","A process which coordinates all operations on applications.","mbj"},
{"app master","application master","The application master is a process that monitors the application. It is provided by the Erlang run-time system. Every application has an application master process.","mbj"},
@@ -137,7 +135,6 @@ the module Erlang in the application kernel","kenneth"},
{"pattern matching","pattern matching","A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program.","kenneth"},
{"permanent child","permanent child","A supervised process which always is restarted when it dies.","mbj"},
{"Pid","Pid","Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line.","kenneth"},
-{"Pman","Pman","Module and application name for the Process Trace Tool.","olin"},
{"point","point","A unit used to indicate the size of a typeface. Equal to 1/72 inches.","jocke"},
{"pointer","pointer","A pointer tells where data is stored. Memory pointers are not used in Erlang.","kent"},
{"port","port","A data type in Erlang. Ports provide the basic mechanism for communication with the external world.","peterl"},
@@ -196,10 +193,8 @@ the module Erlang in the application kernel","kenneth"},
{"sup_bridge","supervisor bridge"," A behaviour used to connect a process, or subsystem, to a supervisor tree.","mbj"},
{"SASLlong","System Architecture Support Libraries (SASL)","An Erlang/OTP application which contains services for error logging, release handling and report browsing.","mbj"}, {".config","system configuration file","A file which specifies configuration parameters for the applications in the system.","mbj"},
{"table lock","table lock","Table locks are locks which are set on whole tables. They may either be read locks or write locks.","hakan"},
-{"Table Visualizer","Table Visualizer","A tool which enables the user to examine ETS and Mnesia tables.","olin"},
{"temporary child","temporary child","A supervised process which is never restarted when it dies.","mbj"},
{"term","term","The super type of all Erlang types.","kenneth"},
-{"Toolbar","Toolbar","A tool that provides an simplistic interface to the other various Erlang/OTP tools","olin"},
{"tools","tools","An application within Erlang/OTP which contains the tools which are not applications themselves.","olin"},
{"transaction","transaction","Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties.","hakan"},
{"transient child","transient child","A supervised process which is restarted if it dies non-normally.","mbj"},
diff --git a/system/doc/definitions/term.defs.xml b/system/doc/definitions/term.defs.xml
index 28ac0d6eaf..fdcda4eddb 100644
--- a/system/doc/definitions/term.defs.xml
+++ b/system/doc/definitions/term.defs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE terms SYSTEM "terms.dtd">
<terms>
diff --git a/system/doc/design_principles/applications.xml b/system/doc/design_principles/applications.xml
index 121c0179c6..7b030115df 100644
--- a/system/doc/design_principles/applications.xml
+++ b/system/doc/design_principles/applications.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -157,8 +157,9 @@ ch_app:stop([])</code>
all applications have dependencies to at least <c>kernel</c>
and <c>stdlib</c>.</item>
</taglist>
- <p>The syntax and contents of of the application resource file
- are described in detail in <c>app(4)</c>.</p>
+ <note><p>The syntax and contents of of the application resource file
+ are described in detail in the<seealso marker="kernel:app">
+ Application resource file reference</seealso>.</p></note>
</section>
<section>
diff --git a/system/doc/design_principles/appup_cookbook.xml b/system/doc/design_principles/appup_cookbook.xml
index 798b23d847..70c34a5a06 100644
--- a/system/doc/design_principles/appup_cookbook.xml
+++ b/system/doc/design_principles/appup_cookbook.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/book.xml b/system/doc/design_principles/book.xml
index 615722ac12..b583df0bf0 100644
--- a/system/doc/design_principles/book.xml
+++ b/system/doc/design_principles/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/des_princ.xml b/system/doc/design_principles/des_princ.xml
index 977eda49b5..e8f289b905 100644
--- a/system/doc/design_principles/des_princ.xml
+++ b/system/doc/design_principles/des_princ.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/distributed_applications.xml b/system/doc/design_principles/distributed_applications.xml
index 39a24b3598..2886f06b53 100644
--- a/system/doc/design_principles/distributed_applications.xml
+++ b/system/doc/design_principles/distributed_applications.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/events.xml b/system/doc/design_principles/events.xml
index 23a9b8c7bc..529e12c216 100644
--- a/system/doc/design_principles/events.xml
+++ b/system/doc/design_principles/events.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/fsm.xml b/system/doc/design_principles/fsm.xml
index f07950fae7..9dce159dca 100644
--- a/system/doc/design_principles/fsm.xml
+++ b/system/doc/design_principles/fsm.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/system/doc/design_principles/gen_server_concepts.xml b/system/doc/design_principles/gen_server_concepts.xml
index a904390999..d24d87aa03 100644
--- a/system/doc/design_principles/gen_server_concepts.xml
+++ b/system/doc/design_principles/gen_server_concepts.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2011</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/included_applications.xml b/system/doc/design_principles/included_applications.xml
index 3adb27ea08..3aa43fd595 100644
--- a/system/doc/design_principles/included_applications.xml
+++ b/system/doc/design_principles/included_applications.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/part.xml b/system/doc/design_principles/part.xml
index d40b7cb23e..a560147648 100644
--- a/system/doc/design_principles/part.xml
+++ b/system/doc/design_principles/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/release_handling.xml b/system/doc/design_principles/release_handling.xml
index 4378b6599c..9d1e2c8669 100644
--- a/system/doc/design_principles/release_handling.xml
+++ b/system/doc/design_principles/release_handling.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -310,7 +310,7 @@
the following instruction is used:</p>
<code type="none">
{apply, {M, F, A}}</code>
- <p>The release handler will evalute <c>apply(M, F, A)</c>.</p>
+ <p>The release handler will evaluate <c>apply(M, F, A)</c>.</p>
</section>
<section>
@@ -329,15 +329,28 @@
automatically ensured.</p>
<p>When the release handler encounters the instruction, it first
generates a temporary boot file, which starts the new versions
- of the emulator and the core applications. Then it shuts down
+ of the emulator and the core applications, and the old version
+ of all other applications. Then it shuts down
the current emulator by calling <c>init:reboot()</c>, see
<c>init(3)</c>. All processes are terminated gracefully and
the system is rebooted by the heart program, using the
temporary boot file. After the reboot, the rest of the relup
instructions are executed. This is done as a part of the
temporary boot script.</p>
+ <warning>
+ <p>Since this mechanism causes the new versions of the
+ emulator and core applications to run with the old version of
+ other applications during startup, extra care must be taken to
+ avoid incompatibility. Incompatible changes in the core
+ applications may in some situations be necessary. If possible,
+ such changes are preceded by deprecation over two major
+ releases before the actual change. To make sure your
+ application is not crashed by an incompatible change, always
+ remove any call to deprecated functions as soon as
+ possible.</p>
+ </warning>
<p>An info report is written when the upgrade is completed. To
- programatically find out if the upgrade is complete,
+ programmatically find out if the upgrade is complete,
call <c>release_handler:which_releases(current)</c> and check
if it returns the expected (i.e. the new) release.</p>
<p>The new release version must be made permanent when the new
diff --git a/system/doc/design_principles/release_structure.xml b/system/doc/design_principles/release_structure.xml
index 8aea0e1a10..cec33f42e3 100644
--- a/system/doc/design_principles/release_structure.xml
+++ b/system/doc/design_principles/release_structure.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/design_principles/spec_proc.xml b/system/doc/design_principles/spec_proc.xml
index f00de71a4c..e4fb5fdca7 100644
--- a/system/doc/design_principles/spec_proc.xml
+++ b/system/doc/design_principles/spec_proc.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -43,7 +43,7 @@
<p>The module <c>sys</c> contains some functions for simple debugging
of processes implemented using behaviours. We use the
<c>code_lock</c> example from
- the <seealso marker="fsm#ex">gen_event</seealso> chapter to
+ the <seealso marker="fsm#ex">gen_fsm</seealso> chapter to
illustrate this:</p>
<pre>
% <input>erl</input>
@@ -130,7 +130,8 @@ ok
-export([alloc/0, free/1]).
-export([init/1]).
-export([system_continue/3, system_terminate/4,
- write_debug/3]).
+ write_debug/3,
+ system_get_state/1, system_replace_state/2]).
start_link() ->
proc_lib:start_link(ch4, init, [self()]).
@@ -156,15 +157,15 @@ init(Parent) ->
loop(Chs, Parent, Deb) ->
receive
{From, alloc} ->
- Deb2 = sys:handle_debug(Deb, {ch4, write_debug},
+ Deb2 = sys:handle_debug(Deb, fun ch4:write_debug/3,
ch4, {in, alloc, From}),
{Ch, Chs2} = alloc(Chs),
From ! {ch4, Ch},
- Deb3 = sys:handle_debug(Deb2, {ch4, write_debug},
+ Deb3 = sys:handle_debug(Deb2, fun ch4:write_debug/3,
ch4, {out, {ch4, Ch}, From}),
loop(Chs2, Parent, Deb3);
{free, Ch} ->
- Deb2 = sys:handle_debug(Deb, {ch4, write_debug},
+ Deb2 = sys:handle_debug(Deb, fun ch4:write_debug/3,
ch4, {in, {free, Ch}}),
Chs2 = free(Ch, Chs),
loop(Chs2, Parent, Deb2);
@@ -177,9 +178,16 @@ loop(Chs, Parent, Deb) ->
system_continue(Parent, Deb, Chs) ->
loop(Chs, Parent, Deb).
-system_terminate(Reason, Parent, Deb, Chs) ->
+system_terminate(Reason, _Parent, _Deb, _Chs) ->
exit(Reason).
+system_get_state(Chs) ->
+ {ok, Chs}.
+
+system_replace_state(StateFun, Chs) ->
+ NChs = StateFun(Chs),
+ {ok, NChs, NChs}.
+
write_debug(Dev, Event, Name) ->
io:format(Dev, "~p event = ~p~n", [Name, Event]).</pre>
<p>Example on how the simple debugging functions in <c>sys</c> can
@@ -281,10 +289,10 @@ sys:handle_debug(Deb, Func, Info, Event) => Deb1</code>
<p><c>Deb</c> is the debug structure.</p>
</item>
<item>
- <p><c>Func</c> is a tuple <c>{Module, Name}</c> (or a fun) and
- should specify a (user defined) function used to format
+ <p><c>Func</c> is a fun specifying
+ a (user defined) function used to format
trace output. For each system event, the format function is
- called as <c>Module:Name(Dev, Event, Info)</c>, where:</p>
+ called as <c>Func(Dev, Event, Info)</c>, where:</p>
<list type="bulleted">
<item>
<p><c>Dev</c> is the IO device to which the output should
@@ -319,15 +327,15 @@ sys:handle_debug(Deb, Func, Info, Event) => Deb1</code>
loop(Chs, Parent, Deb) ->
receive
{From, alloc} ->
- Deb2 = sys:handle_debug(Deb, {ch4, write_debug},
+ Deb2 = sys:handle_debug(Deb, fun ch4:write_debug/3,
ch4, {in, alloc, From}),
{Ch, Chs2} = alloc(Chs),
From ! {ch4, Ch},
- Deb3 = sys:handle_debug(Deb2, {ch4, write_debug},
+ Deb3 = sys:handle_debug(Deb2, fun ch4:write_debug/3,
ch4, {out, {ch4, Ch}, From}),
loop(Chs2, Parent, Deb3);
{free, Ch} ->
- Deb2 = sys:handle_debug(Deb, {ch4, write_debug},
+ Deb2 = sys:handle_debug(Deb, fun ch4:write_debug/3,
ch4, {in, {free, Ch}}),
Chs2 = free(Ch, Chs),
loop(Chs2, Parent, Deb2);
@@ -366,8 +374,15 @@ Module:system_terminate(Reason, Parent, Deb, State)</code>
<item><c>Module</c> is the name of the module.</item>
<item><c>Deb</c> is the debug structure.</item>
<item><c>State</c> is a term describing the internal state and
- is passed to <c>system_continue</c>/<c>system_terminate</c>.</item>
+ is passed to <c>system_continue</c>/<c>system_terminate</c>/
+ <c>system_get_state</c>/<c>system_replace_state</c>.</item>
</list>
+ <p>If the process should return its state <c>handle_system_msg</c> will call:</p>
+ <code type="none">
+Module:system_get_state(State)</code>
+ <p>or if the process should replace its state using the fun <c>StateFun</c>:</p>
+ <code type="none">
+Module:system_replace_state(StateFun, State)</code>
<p>In the example:</p>
<code type="none">
loop(Chs, Parent, Deb) ->
@@ -383,7 +398,15 @@ system_continue(Parent, Deb, Chs) ->
loop(Chs, Parent, Deb).
system_terminate(Reason, Parent, Deb, Chs) ->
- exit(Reason).</code>
+ exit(Reason).
+
+system_get_state(Chs) ->
+ {ok, Chs, Chs}.
+
+system_replace_state(StateFun, Chs) ->
+ NChs = StateFun(Chs),
+ {ok, NChs, NChs}.
+</code>
<p>If the special process is set to trap exits, note that if
the parent process terminates, the expected behavior is to
terminate with the same reason:</p>
@@ -408,11 +431,11 @@ loop(...) ->
<section>
<title>User-Defined Behaviours</title>
- <p>To implement a user-defined behaviour, write code similar to
+ <p><marker id="behaviours"/>To implement a user-defined behaviour, write code similar to
code for a special process but calling functions in a callback
module for handling specific tasks.</p>
<p>If it is desired that the compiler should warn for missing callback
- functions, as it does for the OTP behaviours, add callback attributes in the
+ functions, as it does for the OTP behaviours, add <c>-callback</c> attributes in the
behaviour module to describe the expected callbacks:</p>
<code type="none">
-callback Name1(Arg1_1, Arg1_2, ..., Arg1_N1) -> Res1.
@@ -422,15 +445,15 @@ loop(...) ->
<p>where <c>NameX</c> are the names of the expected callbacks and
<c>ArgX_Y</c>, <c>ResX</c> are types as they are described in Specifications
for functions in <seealso marker="../reference_manual/typespec">Types and
- Function Specifications</seealso>. The whole syntax of spec attributes is
- supported by callback attributes.</p>
+ Function Specifications</seealso>. The whole syntax of <c>-spec</c> attribute is
+ supported by <c>-callback</c> attribute.</p>
<p>Alternatively you may directly implement and export the function:</p>
<code type="none">
behaviour_info(callbacks) ->
- [{Name1,Arity1},...,{NameN,ArityN}].</code>
- <p>where each <c>{Name,Arity}</c> specifies the name and arity of a callback
+ [{Name1, Arity1},...,{NameN, ArityN}].</code>
+ <p>where each <c>{Name, Arity}</c> specifies the name and arity of a callback
function. This function is otherwise automatically generated by the compiler
- using the callback attributes.</p>
+ using the <c>-callback</c> attributes.</p>
<p>When the compiler encounters the module attribute
<c>-behaviour(Behaviour).</c> in a module <c>Mod</c>, it will call
<c>Behaviour:behaviour_info(callbacks)</c> and compare the result with the
diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml
index 7ad007d3fd..11ef3813d6 100644
--- a/system/doc/design_principles/sup_princ.xml
+++ b/system/doc/design_principles/sup_princ.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2012</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml
index 3bbaf7a0ad..51f1b2612c 100644
--- a/system/doc/efficiency_guide/advanced.xml
+++ b/system/doc/efficiency_guide/advanced.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -183,7 +183,7 @@ On 64-bit architectures: 4 words for a reference from the current local node, an
<tag><em>Open ports</em></tag>
<item>
<marker id="ports"></marker>
- <p>The maximum number of simultaneously oper Erlang ports is
+ <p>The maximum number of simultaneously open Erlang ports is
often by default 16384. This limit can be configured at startup,
for more information see the
<seealso marker="erts:erl#max_ports"><c>+Q</c></seealso>
diff --git a/system/doc/efficiency_guide/appendix.xml b/system/doc/efficiency_guide/appendix.xml
index 6eaaeffbc4..48d40d2493 100644
--- a/system/doc/efficiency_guide/appendix.xml
+++ b/system/doc/efficiency_guide/appendix.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2002</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/binaryhandling.xml b/system/doc/efficiency_guide/binaryhandling.xml
index 425d6308cf..4ba1378059 100644
--- a/system/doc/efficiency_guide/binaryhandling.xml
+++ b/system/doc/efficiency_guide/binaryhandling.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -237,8 +237,9 @@ Bin = <<Bin1,...>> %% Bin1 will be COPIED
<p><c>Bin1</c> will be copied in the third line.</p>
<p>The same thing happens if you insert a binary into an <em>ets</em>
- table or send it to a port using <c>erlang:port_command/2</c>.</p>
-
+ table or send it to a port using <c>erlang:port_command/2</c> or pass it to
+ <seealso marker="erts:erl_nif#enif_inspect_binary">enif_inspect_binary</seealso>
+ in a NIF.</p>
<p>Matching a binary will also cause it to shrink and the next append
operation will copy the binary data:</p>
diff --git a/system/doc/efficiency_guide/book.xml b/system/doc/efficiency_guide/book.xml
index 5df40695bb..f8b4c59e3f 100644
--- a/system/doc/efficiency_guide/book.xml
+++ b/system/doc/efficiency_guide/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/commoncaveats.xml b/system/doc/efficiency_guide/commoncaveats.xml
index ef0dee793d..551b0a03e6 100644
--- a/system/doc/efficiency_guide/commoncaveats.xml
+++ b/system/doc/efficiency_guide/commoncaveats.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/drivers.xml b/system/doc/efficiency_guide/drivers.xml
index 66311a3738..dfc49bdf21 100644
--- a/system/doc/efficiency_guide/drivers.xml
+++ b/system/doc/efficiency_guide/drivers.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/system/doc/efficiency_guide/functions.xml b/system/doc/efficiency_guide/functions.xml
index 42cc81dbae..ec1a45eaa9 100644
--- a/system/doc/efficiency_guide/functions.xml
+++ b/system/doc/efficiency_guide/functions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/introduction.xml b/system/doc/efficiency_guide/introduction.xml
index ba942c75c2..9726d3ad11 100644
--- a/system/doc/efficiency_guide/introduction.xml
+++ b/system/doc/efficiency_guide/introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/listhandling.xml b/system/doc/efficiency_guide/listhandling.xml
index e9d2dfe556..9112738b18 100644
--- a/system/doc/efficiency_guide/listhandling.xml
+++ b/system/doc/efficiency_guide/listhandling.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/myths.xml b/system/doc/efficiency_guide/myths.xml
index 6fdeb5c4f9..b1108dbab2 100644
--- a/system/doc/efficiency_guide/myths.xml
+++ b/system/doc/efficiency_guide/myths.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2007</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/part.xml b/system/doc/efficiency_guide/part.xml
index 2b78f35e2a..3918560812 100644
--- a/system/doc/efficiency_guide/part.xml
+++ b/system/doc/efficiency_guide/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/processes.xml b/system/doc/efficiency_guide/processes.xml
index 440be2b6f8..86951e2dcc 100644
--- a/system/doc/efficiency_guide/processes.xml
+++ b/system/doc/efficiency_guide/processes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -186,7 +186,7 @@ kilo_byte(0, Acc) ->
kilo_byte(N, Acc) ->
kilo_byte(N-1, [Acc|Acc]).</code>
- <p><c>kilo_byte/1</c> creates a deep list. If we call
+ <p><c>kilo_byte/0</c> creates a deep list. If we call
<c>list_to_binary/1</c>, we can convert the deep list to a binary
of 1024 bytes:</p>
diff --git a/system/doc/efficiency_guide/profiling.xml b/system/doc/efficiency_guide/profiling.xml
index cbb53c825e..b93c884270 100644
--- a/system/doc/efficiency_guide/profiling.xml
+++ b/system/doc/efficiency_guide/profiling.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2012</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/efficiency_guide/tablesDatabases.xml b/system/doc/efficiency_guide/tablesDatabases.xml
index 0c32ae2d82..94c921fa1c 100644
--- a/system/doc/efficiency_guide/tablesDatabases.xml
+++ b/system/doc/efficiency_guide/tablesDatabases.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2001</year><year>2011</year>
+ <year>2001</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -136,7 +136,7 @@ print_person(PersonId) ->
io:format("No person with ID = ~p~n", [PersonID])
end.
-%%% Internal functionss
+%%% Internal functions
print_name(PersonID) ->
[Person] = ets:lookup(person, PersonId),
io:format("No person ~p~n", [Person#person.name]).
diff --git a/system/doc/embedded/book.xml b/system/doc/embedded/book.xml
index 7dc43e36bf..3fc00b58ae 100644
--- a/system/doc/embedded/book.xml
+++ b/system/doc/embedded/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/embedded_nt.xml b/system/doc/embedded/embedded_nt.xml
index 8e594b1951..530e3663e4 100644
--- a/system/doc/embedded/embedded_nt.xml
+++ b/system/doc/embedded/embedded_nt.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/embedded_solaris.xml b/system/doc/embedded/embedded_solaris.xml
index d1fb2ddc5f..cab3437725 100644
--- a/system/doc/embedded/embedded_solaris.xml
+++ b/system/doc/embedded/embedded_solaris.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/intro.xml b/system/doc/embedded/intro.xml
index 545500c9c9..85ce74611c 100644
--- a/system/doc/embedded/intro.xml
+++ b/system/doc/embedded/intro.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/part.xml b/system/doc/embedded/part.xml
index 6dd0b73965..e4366bd2c2 100644
--- a/system/doc/embedded/part.xml
+++ b/system/doc/embedded/part.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/system/doc/embedded/starting.xml b/system/doc/embedded/starting.xml
index 228d91f430..527496c420 100644
--- a/system/doc/embedded/starting.xml
+++ b/system/doc/embedded/starting.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/target.xml b/system/doc/embedded/target.xml
index 4408e6ee48..123e26f918 100644
--- a/system/doc/embedded/target.xml
+++ b/system/doc/embedded/target.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/vme_problems.xml b/system/doc/embedded/vme_problems.xml
index 03a70bae3b..e9d164f454 100644
--- a/system/doc/embedded/vme_problems.xml
+++ b/system/doc/embedded/vme_problems.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/embedded/xntp.xml b/system/doc/embedded/xntp.xml
index 270d986cf1..2fab4e4455 100644
--- a/system/doc/embedded/xntp.xml
+++ b/system/doc/embedded/xntp.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1997</year>
- <year>2011</year>
+ <year>2013</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/getting_started/book.xml b/system/doc/getting_started/book.xml
index c256dc1317..fb5e5eec3b 100644
--- a/system/doc/getting_started/book.xml
+++ b/system/doc/getting_started/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/getting_started/conc_prog.xml b/system/doc/getting_started/conc_prog.xml
index 34ae428b2c..2b64826a93 100644
--- a/system/doc/getting_started/conc_prog.xml
+++ b/system/doc/getting_started/conc_prog.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -95,7 +95,7 @@ goodbye</pre>
the second a "goodbye", the first another "hello" and so forth.
But where did the &lt;0.63.0&gt; come from? The return value of a
function is of course the return value of the last "thing" in
- the function. The last thing in the function <c>start</c> is</p>
+ the function. The last thing in the function <c>start</c> is:</p>
<code type="none">
spawn(tut14, say_something, [goodbye, 3]).</code>
<p><c>spawn</c> returns a <em>process identifier</em>, or
@@ -166,11 +166,11 @@ Pong_PID = spawn(tut15, pong, [])</code>
<c>start</c> now creates another process "ping".</p>
<code type="none">
spawn(tut15, ping, [3, Pong_PID]),</code>
- <p>this process executes</p>
+ <p>This process executes:</p>
<code type="none">
tut15:ping(3, Pong_PID)</code>
<p>&lt;0.36.0&gt; is the return value from the <c>start</c> function.</p>
- <p>The process "pong" now does:</p>
+ <p>The process "pong" now does:</p>
<code type="none">
receive
finished ->
@@ -235,7 +235,7 @@ Ping_PID ! pong</code>
Pid ! Message</code>
<p>I.e. <c>Message</c> (any Erlang term) is sent to the process
with identity <c>Pid</c>.</p>
- <p>After sending the message <c>pong</c>, to the process "ping",
+ <p>After sending the message <c>pong</c> to the process "ping",
"pong" calls the <c>pong</c> function again, which causes it to
get back to the <c>receive</c> again and wait for another message.
Now let's look at the process "ping". Recall that it was started
@@ -253,7 +253,7 @@ Pong_PID ! {ping, self()},</code>
<p><c>self()</c> returns the pid of the process which executes
<c>self()</c>, in this case the pid of "ping". (Recall the code
for "pong", this will land up in the variable <c>Ping_PID</c> in
- the <c>receive</c> previously explained).</p>
+ the <c>receive</c> previously explained.)</p>
<p>"Ping" now waits for a reply from "pong":</p>
<code type="none">
receive
@@ -352,8 +352,8 @@ pong ! {ping, self()},</code>
on different computers. Before we do this, there are a few things
we need to set up to get this to work. The distributed Erlang
implementation provides a basic security mechanism to prevent
- unauthorized access to an Erlang system on another computer
- (*manual*). Erlang systems which talk to each other must have
+ unauthorized access to an Erlang system on another computer.
+ Erlang systems which talk to each other must have
the same <em>magic cookie</em>. The easiest way to achieve this
is by having a file called <c>.erlang.cookie</c> in your home
directory on all machines which on which you are going to run
@@ -363,8 +363,8 @@ pong ! {ping, self()},</code>
you can safely ignore this and simply create a file called
<c>.erlang.cookie</c> in the directory you get to after executing
the command <c>cd</c> without any argument).
- The <c>.erlang.cookie</c> file should contain on line with
- the same atom. For example on Linux or Unix in the OS shell:</p>
+ The <c>.erlang.cookie</c> file should contain one line with
+ the same atom. For example, on Linux or Unix in the OS shell:</p>
<pre>
$ <input>cd</input>
$ <input>cat > .erlang.cookie</input>
@@ -373,10 +373,10 @@ $ <input>chmod 400 .erlang.cookie</input></pre>
<p>The <c>chmod</c> above make the <c>.erlang.cookie</c> file
accessible only by the owner of the file. This is a requirement.</p>
<p>When you start an Erlang system which is going to talk to other
- Erlang systems, you must give it a name, eg: </p>
+ Erlang systems, you must give it a name, e.g.: </p>
<pre>
$ <input>erl -sname my_name</input></pre>
- <p>We will see more details of this later (*manual*). If you want to
+ <p>We will see more details of this later. If you want to
experiment with distributed Erlang, but you only have one
computer to work on, you can start two separate Erlang systems on
the same computer but give them different names. Each Erlang
@@ -385,7 +385,7 @@ $ <input>erl -sname my_name</input></pre>
IP domain and we can use only the first component of the IP
address, if we want to use nodes in different domains we use
<c>-name</c> instead, but then all IP address must be given in
- full (*manual*).</p>
+ full.)</p>
<p>Here is the ping pong example modified to run on two separate
nodes:</p>
<code type="none">
@@ -538,9 +538,9 @@ ping finished</pre>
<p>Before we start, let's note the following:</p>
<list type="bulleted">
<item>
- <p>This example will just show the message passing logic no
+ <p>This example will just show the message passing logic - no
attempt at all has been made to provide a nice graphical user
- interface - this can of course also be done in Erlang - but
+ interface. This can, of course, also be done in Erlang - but
that's another tutorial.</p>
</item>
<item>
@@ -550,8 +550,8 @@ ping finished</pre>
tutorial.</p>
</item>
<item>
- <p>The first program we write will contain some inadequacies as
- regards handling of nodes which disappear, we will correct
+ <p>The first program we write will contain some inadequacies
+ regarding the handling of nodes which disappear. We will correct
these in a later version of the program.</p>
</item>
</list>
@@ -571,7 +571,7 @@ ping finished</pre>
%%% already logged in at the same node, login will be rejected
%%% with a suitable error message.
%%% logoff()
-%%% Logs off anybody at at node
+%%% Logs off anybody at that node
%%% message(ToName, Message)
%%% sends Message to ToName. Error messages if the user of this
%%% function is not logged on or if ToName is not logged on at
@@ -734,11 +734,11 @@ await_result() ->
<item>copy the compiled code (<c>messenger.beam</c>) to
the directory on each computer where you start Erlang.</item>
</list>
- <p>In the following example of use of this program, I have started
+ <p>In the following example of use of this program I have started
nodes on four different computers, but if you don't have that
- many machines available on your network, you could start up
+ many machines available on your network you could start up
several nodes on the same machine.</p>
- <p>We start up four Erlang nodes, messenger@super, c1@bilbo,
+ <p>We start up four Erlang nodes: messenger@super, c1@bilbo,
c2@kosken, c3@gollum.</p>
<p>First we start up a the server at messenger@super:</p>
<pre>
@@ -780,19 +780,19 @@ ok
receiver_not_found</pre>
<p>But this fails as Fred has already logged off.</p>
<p>First let's look at some of the new concepts we have introduced.</p>
- <p>There are two versions of the <c>server_transfer</c> function,
+ <p>There are two versions of the <c>server_transfer</c> function:
one with four arguments (<c>server_transfer/4</c>) and one with
five (<c>server_transfer/5</c>). These are regarded by Erlang as
two separate functions.</p>
<p>Note how we write the <c>server</c> function so that it calls
- itself, <c>server(User_List)</c> and thus creates a loop.
+ itself, via <c>server(User_List)</c>, and thus creates a loop.
The Erlang compiler is "clever" and optimizes the code so that
this really is a sort of loop and not a proper function call. But
this only works if there is no code after the call, otherwise
the compiler will expect the call to return and make a proper
function call. This would result in the process getting bigger
and bigger for every loop.</p>
- <p>We use functions in the <c>lists</c> module. This is a very
+ <p>We use functions from the <c>lists</c> module. This is a very
useful module and a study of the manual page is recommended
(<c>erl -man lists</c>).
<c>lists:keymember(Key,Position,Lists)</c> looks through a list
diff --git a/system/doc/getting_started/intro.xml b/system/doc/getting_started/intro.xml
index 7b42080723..e8d568bcaf 100644
--- a/system/doc/getting_started/intro.xml
+++ b/system/doc/getting_started/intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/getting_started/part.xml b/system/doc/getting_started/part.xml
index 4c277419a4..c53743baed 100644
--- a/system/doc/getting_started/part.xml
+++ b/system/doc/getting_started/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/getting_started/records_macros.xml b/system/doc/getting_started/records_macros.xml
index 45617f0183..73c8ce5c8d 100644
--- a/system/doc/getting_started/records_macros.xml
+++ b/system/doc/getting_started/records_macros.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -97,7 +97,7 @@
%%% with a suitable error message.
%%% logoff()
-%%% Logs off anybody at at node
+%%% Logs off anybody at that node
%%% message(ToName, Message)
%%% sends Message to ToName. Error messages if the user of this
@@ -284,7 +284,7 @@ server_transfer(From, Name, To, Message, User_List) ->
the record is referred to. If you leave out a field when creating
a record, it will get the value of the atom undefined. (*manual*)</p>
<p>Pattern matching with records is very similar to creating
- records. For example inside a <c>case</c> or <c>receive</c>:</p>
+ records. For example, inside a <c>case</c> or <c>receive</c>:</p>
<code type="none">
#message_to{to_name=ToName, message=Message} -></code>
<p>is the same as:</p>
diff --git a/system/doc/getting_started/robustness.xml b/system/doc/getting_started/robustness.xml
index c141530fe0..e8fb81d5e8 100644
--- a/system/doc/getting_started/robustness.xml
+++ b/system/doc/getting_started/robustness.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2010</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -30,7 +30,7 @@
</header>
<p>There are several things which are wrong with
the <seealso marker="conc_prog#ex">messenger example</seealso> from
- the previous chapter. For example if a node where a user is logged
+ the previous chapter. For example, if a node where a user is logged
on goes down without doing a log off, the user will remain in
the server's <c>User_List</c> but the client will disappear thus
making it impossible for the user to log on again as the server
@@ -214,9 +214,9 @@ Ping received pong</pre>
signal to be sent to "pong" which will also terminate.</p>
<p>It is possible to modify the default behaviour of a process so
that it does not get killed when it receives abnormal exit
- signals, but all signals will be turned into normal messages on
+ signals, but all signals will be turned into normal messages with
the format <c>{'EXIT',FromPID,Reason}</c> and added to the end of
- the receiving processes message queue. This behaviour is set by:</p>
+ the receiving process' message queue. This behaviour is set by:</p>
<code type="none">
process_flag(trap_exit, true)</code>
<p>There are several other process flags, see
@@ -289,7 +289,7 @@ pong exiting, got {'EXIT',&lt;3820.39.0>,ping}</pre>
%%% already logged in at the same node, login will be rejected
%%% with a suitable error message.
%%% logoff()
-%%% Logs off anybody at at node
+%%% Logs off anybody at that node
%%% message(ToName, Message)
%%% sends Message to ToName. Error messages if the user of this
%%% function is not logged on or if ToName is not logged on at
diff --git a/system/doc/getting_started/seq_prog.xml b/system/doc/getting_started/seq_prog.xml
index 96876ea513..699b9487ed 100644
--- a/system/doc/getting_started/seq_prog.xml
+++ b/system/doc/getting_started/seq_prog.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -31,14 +31,14 @@
<section>
<title>The Erlang Shell</title>
- <p>Most operating systems have a command interpreter or shell, Unix
- and Linux have many, Windows has the Command Prompt. Erlang has
+ <p>Most operating systems have a command interpreter or shell- Unix
+ and Linux have many, while Windows has the Command Prompt. Erlang has
its own shell where you can directly write bits of Erlang code
and evaluate (run) them to see what happens (see
<seealso marker="stdlib:shell">shell(3)</seealso>). Start
the Erlang shell (in Linux or UNIX) by starting a shell or
command interpreter in your operating system and typing
- <c>erl</c>, you will see something like this.</p>
+ <c>erl</c>. You will see something like this.</p>
<pre>
% <input>erl</input>
Erlang R15B (erts-5.9.1) [source] [smp:8:8] [rq:8] [async-threads:0] [hipe] [kernel-poll:false]
@@ -62,7 +62,7 @@ Eshell V5.9.1 (abort with ^G)
(See the chapter <seealso marker="erts:tty">"tty - A command line interface"</seealso> in ERTS User's Guide).</p>
<p>(Note: you will find a lot of line numbers given by the shell
out of sequence in this tutorial as it was written and the code
- tested in several sessions).</p>
+ tested in several sessions.)</p>
<p>Now let's try a more complex calculation.</p>
<pre>
2> <input>(42 + 77) * 66 / 3.</input>
@@ -115,7 +115,7 @@ double(X) ->
entered and there will also be error messages to give you some
idea as to what has gone wrong so you can change what you have
written and try again.</p>
- <p>Now lets run the program.</p>
+ <p>Now let's run the program.</p>
<pre>
4> <input>tut:double(10).</input>
20</pre>
@@ -208,7 +208,7 @@ mult(X, Y) ->
called variables. Variables must start with a capital letter
(see the chapter
<seealso marker="doc/reference_manual:expressions">"Variables"</seealso>
- in the Erlang Reference Manual). Examples of variable could be
+ in the Erlang Reference Manual). Examples of variables could be
<c>Number</c>, <c>ShoeSize</c>, <c>Age</c> etc.</p>
</section>
@@ -271,7 +271,7 @@ convert(N, centimeter) ->
Consider:</p>
<code type="none">
tut2:convert(3, inch).</code>
- <p>Does this mean that 3 is in inches? or that 3 is in centimeters
+ <p>Does this mean that 3 is in inches? Or that 3 is in centimeters
and we want to convert it to inches? So Erlang has a way to group
things together to make things more understandable. We call these
<em>tuples</em>. Tuples are surrounded by "{" and "}".</p>
@@ -309,7 +309,7 @@ convert_length({inch, Y}) ->
<p>We have shown tuples with two parts above, but tuples can have
as many parts as we want and contain any valid Erlang
<em>term</em>. For example, to represent the temperature of
- various cities of the world we could write</p>
+ various cities of the world we could write:</p>
<code type="none">
{moscow, {c, -10}}
{cape_town, {f, 70}}
@@ -325,7 +325,7 @@ convert_length({inch, Y}) ->
<title>Lists</title>
<p>Whereas tuples group things together, we also want to be able to
represent lists of things. Lists in Erlang are surrounded by "["
- and "]". For example a list of the temperatures of various cities
+ and "]". For example, a list of the temperatures of various cities
in the world could be:</p>
<code type="none">
[{moscow, {c, -10}}, {cape_town, {f, 70}}, {stockholm, {c, -4}},
@@ -345,7 +345,7 @@ convert_length({inch, Y}) ->
[2,3,4,5]</pre>
<p>We use | to separate the first elements of the list from
the rest of the list. (<c>First</c> has got value 1 and
- <c>TheRest</c> value [2,3,4,5]).</p>
+ <c>TheRest</c> value [2,3,4,5].)</p>
<p>Another example:</p>
<pre>
20> <input>[E1, E2 | R] = [1,2,3,4,5,6,7].</input>
@@ -403,12 +403,12 @@ list_length([First | Rest]) ->
the remaining elements <c>Rest</c> is 1 + the length of
<c>Rest</c>.</p>
<p>(Advanced readers only: This is not tail recursive, there is a
- better way to write this function).</p>
+ better way to write this function.)</p>
<p>In general we can say we use tuples where we would use "records"
or "structs" in other languages and we use lists when we want to
represent things which have varying sizes, (i.e. where we would
use linked lists in other languages).</p>
- <p>Erlang does not have a string date type, instead strings can be
+ <p>Erlang does not have a string data type, instead strings can be
represented by lists of ASCII characters. So the list
<c>[97,98,99]</c> is equivalent to "abc". The Erlang shell is
"clever" and guesses the what sort of list we mean and outputs it
@@ -419,6 +419,129 @@ list_length([First | Rest]) ->
</section>
<section>
+ <title>Maps</title>
+ <p>Maps are a set of key to value associations. These associations
+ are encapsulated with "#{" and "}". To create an association from
+ "key" to value 42, we write:</p>
+<code type="none">
+> #{ "key" => 42 }.
+#{"key" => 42}</code>
+ <p>We will jump straight into the deep end with an example using some
+ interesting features.</p>
+ <p>The following example shows how we calculate alpha blending using
+ maps to reference color and alpha channels:</p>
+ <code type="none">
+-module(color).
+
+-export([new/4, blend/2]).
+
+-define(is_channel(V), (is_float(V) andalso V &gt;= 0.0 andalso V =&lt; 1.0)).
+
+new(R,G,B,A) when ?is_channel(R), ?is_channel(G),
+ ?is_channel(B), ?is_channel(A) ->
+ #{red =&gt; R, green =&gt; G, blue =&gt; B, alpha =&gt; A}.
+
+blend(Src,Dst) ->
+ blend(Src,Dst,alpha(Src,Dst)).
+
+blend(Src,Dst,Alpha) when Alpha > 0.0 ->
+ Dst#{
+ red := red(Src,Dst) / Alpha,
+ green := green(Src,Dst) / Alpha,
+ blue := blue(Src,Dst) / Alpha,
+ alpha := Alpha
+ };
+blend(_,Dst,_) ->
+ Dst#{
+ red := 0.0,
+ green := 0.0,
+ blue := 0.0,
+ alpha := 0.0
+ }.
+
+alpha(#{alpha := SA}, #{alpha := DA}) ->
+ SA + DA*(1.0 - SA).
+
+red(#{red := SV, alpha := SA}, #{red := DV, alpha := DA}) ->
+ SV*SA + DV*DA*(1.0 - SA).
+green(#{green := SV, alpha := SA}, #{green := DV, alpha := DA}) ->
+ SV*SA + DV*DA*(1.0 - SA).
+blue(#{blue := SV, alpha := SA}, #{blue := DV, alpha := DA}) ->
+ SV*SA + DV*DA*(1.0 - SA).</code>
+ <p>Compile (file <c>color.erl</c>) and test:</p>
+ <pre>
+> <input>c(color).</input>
+{ok,color}
+> <input>C1 = color:new(0.3,0.4,0.5,1.0).</input>
+#{alpha => 1.0,blue => 0.5,green => 0.4,red => 0.3}
+> <input>C2 = color:new(1.0,0.8,0.1,0.3).</input>
+#{alpha => 0.3,blue => 0.1,green => 0.8,red => 1.0}
+> <input>color:blend(C1,C2).</input>
+#{alpha => 1.0,blue => 0.5,green => 0.4,red => 0.3}
+> <input>color:blend(C2,C1).</input>
+#{alpha => 1.0,blue => 0.38,green => 0.52,red => 0.51}
+</pre>
+ <p>This example warrants some explanation:</p>
+ <code type="none">
+-define(is_channel(V), (is_float(V) andalso V &gt;= 0.0 andalso V =&lt; 1.0)).</code>
+ <p>
+ First we define a macro <c>is_channel</c> to help with our guard tests.
+ This is only here for convenience and to reduce syntax cluttering.
+
+ You can read more about <seealso marker="doc/reference_manual:macros">Macros</seealso>
+ in the Erlang Reference Manual.
+ </p>
+ <code type="none">
+new(R,G,B,A) when ?is_channel(R), ?is_channel(G),
+ ?is_channel(B), ?is_channel(A) ->
+ #{red =&gt; R, green =&gt; G, blue =&gt; B, alpha =&gt; A}.</code>
+ <p>
+ The function <c>new/4</c> creates a new map term with and lets the keys
+ <c>red</c>, <c>green</c>, <c>blue</c> and <c>alpha</c> be associated
+ with an initial value. In this case we only allow for float
+ values between and including 0.0 and 1.0 as ensured by the <c>?is_channel/1</c> macro
+ for each argument. Only the <c>=></c> operator is allowed when creating a new map.
+ </p>
+ <p>
+ By calling <c>blend/2</c> on any color term created by <c>new/4</c> we can calculate
+ the resulting color as determined by the two maps terms.
+ </p>
+ <p>
+ The first thing <c>blend/2</c> does is to calculate the resulting alpha channel.
+ </p>
+ <code type="none">
+alpha(#{alpha := SA}, #{alpha := DA}) ->
+ SA + DA*(1.0 - SA).</code>
+ <p>
+ We fetch the value associated with key <c>alpha</c> for both arguments using
+ the <c>:=</c> operator. Any other keys
+ in the map are ignored, only the key <c>alpha</c> is required and checked for.
+ </p>
+ <p>This is also the case for functions <c>red/2</c>, <c>blue/2</c> and <c>green/2</c>.</p>
+ <code type="none">
+red(#{red := SV, alpha := SA}, #{red := DV, alpha := DA}) ->
+ SV*SA + DV*DA*(1.0 - SA).</code>
+ <p>
+ The difference here is that we check for two keys in each map argument. The other keys
+ are ignored.
+ </p>
+ <p>
+ Finally we return the resulting color in <c>blend/3</c>.
+ </p>
+ <code type="none">
+blend(Src,Dst,Alpha) when Alpha > 0.0 ->
+ Dst#{
+ red := red(Src,Dst) / Alpha,
+ green := green(Src,Dst) / Alpha,
+ blue := blue(Src,Dst) / Alpha,
+ alpha := Alpha
+ };</code>
+ <p>
+ We update the <c>Dst</c> map with new channel values. The syntax for updating an existing key with a new value is done with <c>:=</c> operator.
+ </p>
+ </section>
+
+ <section>
<title>Standard Modules and Manual Pages</title>
<p>Erlang has a lot of standard modules to help you do things. For
example, the module <c>io</c> contains a lot of functions to help
@@ -450,10 +573,9 @@ http://www.erlang.org/doc/r9b/doc/index.html</code>
<section>
<title>Writing Output to a Terminal</title>
<p>It's nice to be able to do formatted output in these example, so
- the next example shows a simple way to use to use
- the <c>io:format</c> function. Of course, just like all other
- exported functions, you can test the <c>io:format</c> function in
- the shell:</p>
+ the next example shows a simple way to use the <c>io:format</c>
+ function. Of course, just like all other exported functions, you
+ can test the <c>io:format</c> function in the shell:</p>
<pre>
31> <input>io:format("hello world~n", []).</input>
hello world
@@ -550,7 +672,7 @@ ok</pre>
<p>Now we call <c>format_temps(Rest)</c> with the rest of the list
as an argument. This way of doing things is similar to the loop
constructs in other languages. (Yes, this is recursion, but don't
- let that worry you). So the same <c>format_temps</c> function is
+ let that worry you.) So the same <c>format_temps</c> function is
called again, this time <c>City</c> gets the value
<c>{cape_town,{f,70}}</c> and we repeat the same procedure as
before. We go on doing this until the list becomes empty, i.e. [],
@@ -614,12 +736,12 @@ list_max([Head|Rest], Result_so_far) ->
the next part of the function.</p>
<p>Some useful operators in guards are, &lt; less than, &gt;
greater than, == equal, &gt;= greater or equal, =&lt; less or
- equal, /= not equal. (see the chapter
- <seealso marker="doc/reference_manual:expressions">"Guard Sequences"</seealso> in the Erlang Reference Manual).</p>
+ equal, /= not equal. (See the chapter
+ <seealso marker="doc/reference_manual:expressions">"Guard Sequences"</seealso> in the Erlang Reference Manual.)</p>
<p>To change the above program to one which works out the minimum
value of the element in a list, all we would need to do is to
write &lt; instead of &gt;. (But it would be wise to change
- the name of the function to <c>list_min</c> :-).</p>
+ the name of the function to <c>list_min</c> :-).)</p>
<p>Remember that I mentioned earlier that a variable could only be
given a value once in its scope? In the above we see, for example,
that <c>Result_so_far</c> has been given several values. This is
@@ -723,7 +845,7 @@ reverse([], [3,2,1]) =>
write a list manipulating function it is a good idea to check
that one isn't already written for you. (see
<seealso marker="stdlib:lists">lists(3)</seealso>).</p>
- <p>Now lets get back to the cities and temperatures, but take a more
+ <p>Now let's get back to the cities and temperatures, but take a more
structured approach this time. First let's convert the whole list
to Celsius as follows and test the function:</p>
<code type="none">
@@ -767,7 +889,7 @@ format_temps(List_of_cities) ->
<code type="none">
[City | convert_list_to_c(Rest)];</code>
<p>We go on doing this until we get to the end of the list (i.e.
- the list is empty:</p>
+ the list is empty):</p>
<code type="none">
convert_list_to_c([]) ->
[].</code>
@@ -1029,13 +1151,13 @@ month_length(Year, Month) ->
<section>
<title>Built In Functions (BIFs)</title>
- <p>Built in functions BIFs are functions which for some reason is
+ <p>Built in functions (BIFs) are functions which for some reason are
built in to the Erlang virtual machine. BIFs often implement
- functionality that is impossible to implement in Erlang or is to
+ functionality that is impossible to implement in Erlang or is too
inefficient to implement in Erlang. Some BIFs can be called
- by use of the function name only but they are by default belonging
- to the erlang module so for example the call to the BIF <c>trunc</c>
- below is equivalent with a call to <c>erlang:trunc</c>.</p>
+ by use of the function name only, but they by default belong
+ to the erlang module. So for example, the call to the BIF <c>trunc</c>
+ below is equivalent to a call to <c>erlang:trunc</c>.</p>
<p>As you can see, we first find out if a year is leap or not. If a
year is divisible by 400, it is a leap year. To find this out we
first divide the year by 400 and use the built in function
@@ -1052,23 +1174,23 @@ trunc(5.01) = 5
2000 / 400 = 5.0
trunc(5.0) = 5
5 * 400 = 2000</code>
- <p>so we have a leap year. The next two tests if the year is
- divisible by 100 or 4 are done in the same way. The first
- <c>if</c> returns <c>leap</c> or <c>not_leap</c> which lands up
+ <p>so we have a leap year. The next two tests, which check if the year is
+ divisible by 100 or 4, are done in the same way. The first
+ <c>if</c> returns <c>leap</c> or <c>not_leap</c> which ends up
in the variable <c>Leap</c>. We use this variable in the guard
for <c>feb</c> in the following <c>case</c> which tells us how
long the month is.</p>
- <p>This example showed the use of <c>trunc</c>, an easier way would
- be to use the Erlang operator <c>rem</c> which gives the remainder
+ <p>This example showed the use of <c>trunc</c>. An easier way would
+ be to use the Erlang operator <c>rem</c>, which gives the remainder
after division. For example:</p>
<pre>
74> <input>2004 rem 400.</input>
4</pre>
- <p>so instead of writing</p>
+ <p>so instead of writing:</p>
<code type="none">
trunc(Year / 400) * 400 == Year ->
leap;</code>
- <p>we could write</p>
+ <p>we could write:</p>
<code type="none">
Year rem 400 == 0 ->
leap;</code>
@@ -1078,7 +1200,7 @@ Year rem 400 == 0 ->
(see the chapter
<seealso marker="doc/reference_manual:expressions">"Guard Sequences"</seealso> in the Erlang Reference Manual) (Aside for
advanced readers: This is to ensure that guards don't have side
- effects). Let's play with a few of these functions in the shell:</p>
+ effects.) Let's play with a few of these functions in the shell:</p>
<pre>
75> <input>trunc(5.6).</input>
5
@@ -1145,7 +1267,7 @@ map(Fun, []) ->
#Fun&lt;erl_eval.5.123085357&gt;
89> <input>lists:map(Add_3, [1,2,3]).</input>
[4,5,6]</pre>
- <p>Now lets print out the temperatures in a list of cities (yet
+ <p>Now let's print out the temperatures in a list of cities (yet
again):</p>
<pre>
90> <input>Print_City = fun({City, {X, Temp}}) -> io:format("~-15w ~w ~w~n",</input>
diff --git a/system/doc/installation_guide/Makefile b/system/doc/installation_guide/Makefile
index 6923f52d8a..a4ef6c9d7c 100644
--- a/system/doc/installation_guide/Makefile
+++ b/system/doc/installation_guide/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
+# Copyright Ericsson AB 1996-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -59,7 +59,7 @@ GENERATED_XML_FILES = \
INSTALL.xml \
INSTALL-CROSS.xml \
INSTALL-WIN32.xml \
- MARKDOWN.xml
+ OTP-PATCH-APPLY.xml
# ----------------------------------------------------
@@ -75,7 +75,7 @@ REDIRECT_HTML_FILES = \
$(REDIRECT_HTML_DIR)/INSTALL.html \
$(REDIRECT_HTML_DIR)/INSTALL-CROSS.html \
$(REDIRECT_HTML_DIR)/INSTALL-WIN32.html \
- $(REDIRECT_HTML_DIR)/MARKDOWN.html
+ $(REDIRECT_HTML_DIR)/OTP-PATCH-APPLY.html
# ----------------------------------------------------
# FLAGS
diff --git a/system/doc/installation_guide/book.xml b/system/doc/installation_guide/book.xml
index 7d8001f2b3..9788263a98 100644
--- a/system/doc/installation_guide/book.xml
+++ b/system/doc/installation_guide/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/installation_guide/install-binary.xml b/system/doc/installation_guide/install-binary.xml
index ac4192586d..af7dab6e44 100644
--- a/system/doc/installation_guide/install-binary.xml
+++ b/system/doc/installation_guide/install-binary.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -31,117 +31,40 @@
<rev>C</rev>
<file>install-binary.xml</file>
</header>
-
- <section>
- <title>UNIX</title>
-
- <section>
- <title>Introduction</title>
- <p>The system is delivered as a single compressed tar file.</p>
- <p>To browse the on-line HTML documentation, Netscape or an equivalent
- browser supporting frames is needed.</p>
- </section>
-
- <section>
- <title>Installation Procedure</title>
- <p>When installed, the entire system, except for a small start-up
- script, resides in a single directory tree. The location of this
- directory tree can be chosen arbitrarily by the installer, and it
- does not need to be in the user's <c>$PATH</c>. The only requirements
- are that the file system where it is placed has enough free space,
- and that the users who run Erlang/OTP have read access to it. In the
- example below, the directory tree is assumed to be located at
- <c>/usr/local/erlang</c>, which is here called the <em>top-level directory</em>.</p>
- <p>It is assumed that you have the compressed tar file, the name of
- which is <c><![CDATA[<PREFIX>.tar.gz]]></c>, where <c><![CDATA[<PREFIX>]]></c> is a string
- denoting the particular Erlang/OTP release, e.g.
- <c>otp_LXA_11930_sunos5_R9B</c>.</p>
- <p>Wherever the string <c><![CDATA[<PREFIX>]]></c> is used below, it should
- be replaced by the actual name prefix of the compressed tar file.</p>
- <p>The tape archive file does not have one single directory in which
- all other files are rooted. Therefore the tape archive file must be
- extracted into an empty (newly created) directory.</p>
- <list type="ordered">
- <item>
- <p>If the <em>top-level directory</em> does not already exist,
- create it:</p>
- <pre>
-mkdir /usr/local/erlang</pre>
- </item>
- <item>
- <p>Change the current directory to the <em>top level directory</em>:</p>
- <pre>
-cd /usr/local/erlang</pre>
- </item>
- <item>
- <p>Create the <em>installation directory</em> with an appropriate
- name. For example:</p>
- <pre>
-mkdir otp_r7b</pre>
- </item>
- <item>
- <p>Change to the <em>installation directory</em>, e.g.</p>
- <pre>
-cd otp_r7b</pre>
- </item>
- <item>
- <p>Assuming the compressed tar file resides in the directory
- <c><![CDATA[<SOME-DIR>]]></c>,. extract the compressed tar file into the
- current directory:</p>
- <pre>
-gunzip -c &lt;SOME-DIR&gt;/&lt;PREFIX&gt;.tar.gz | tar xfp -</pre>
- </item>
- <item>
- <p>Read the <c>README</c> file in the installation directory for
- last minute updates, before proceeding.</p>
- </item>
- <item>
- <p>Run the <c>Install</c> script in the installation directory,
- with the absolute path of the installation directory as argument,</p>
- <pre>
-./Install /usr/local/erlang/otp_r7b</pre>
- <p>and supply answers to the prompts.</p>
- <p>In most cases, there is a default answer in square brackets
- (<c>[]</c>). If the default is satisfactory, just press
- <c><![CDATA[<Return>]]></c>. In general you are only prompted for one thing:</p>
- <list type="bulleted">
- <item>
- <p>"Do you want to use a minimal system startup instead of the
- SASL startup?" <br></br>
-
- In a minimal system, only the Kernel and STDLIB applications
- are loaded and started. If the SASL startup is used, the SASL
- application is included as well. Normally, the minimal system
- is enough.</p>
- </item>
- </list>
- </item>
- <item>
- <p>Make Erlang/OTP available for users, either by putting the path
- <c>/usr/local/erlang/otp_r7b/bin</c> in users <c>$PATH</c>
- variable, or link the executable
- <c>/usr/local/erlang/otp_r7b/bin/erl</c> accordingly, e.g.:</p>
- <pre>
-ln -s /usr/local/erlang/otp_r7b/bin/erl /usr/local/bin/erl </pre>
- </item>
- </list>
- </section>
- </section>
-
<section>
<title>Windows</title>
<section>
<title>Introduction</title>
- <p>The system is delivered as a single <c>.exe</c> file.</p>
- <p>To browse the on-line HTML documentation, Netscape or an equivalent
- browser supporting frames is needed.</p>
+ <p>The system is delivered as a Windows Installer executable.
+ Get it from our <url href="http://www.erlang.org/download.html">download page</url>.</p>
</section>
<section>
- <title>Installation Procedure</title>
+ <title>Installation</title>
<p>The installation procedure is is automated. Double-click the
<c>.exe</c> file icon and follow the instructions.</p>
</section>
+ <section>
+ <title>Verification</title>
+ <list type="bulleted">
+ <item>
+ <p>Start Erlang/OTP by double-clicking on the Erlang shortcut icon on the
+ desktop.</p>
+ <p>Expect a command line window to pop up with an output looking something like this:</p>
+ <pre>
+ Erlang/OTP 17 [erts-6.0] [64-bit] [smp:2:2]
+
+ Eshell V6.0 (abort with ^G)
+ 1></pre>
+ </item>
+ <item>
+ <p>Exit by entering the command <c>halt()</c>,</p>
+ <pre>
+ 2> <input>halt().</input></pre>
+ <p>which will close the Erlang/OTP shell. </p>
+ </item>
+ </list>
+ </section>
</section>
</chapter>
diff --git a/system/doc/installation_guide/part.xml b/system/doc/installation_guide/part.xml
index 2cffd30283..ff17cecd59 100644
--- a/system/doc/installation_guide/part.xml
+++ b/system/doc/installation_guide/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2013</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -32,9 +32,8 @@
<p>How to install Erlang/OTP on UNIX or Windows.</p>
</description>
<xi:include href="install-binary.xml"/>
- <xi:include href="verification.xml"/>
<xi:include href="INSTALL.xml"/>
<xi:include href="INSTALL-CROSS.xml"/>
<xi:include href="INSTALL-WIN32.xml"/>
- <xi:include href="MARKDOWN.xml"/>
-</part> \ No newline at end of file
+ <xi:include href="OTP-PATCH-APPLY.xml"/>
+</part>
diff --git a/system/doc/installation_guide/verification.xml b/system/doc/installation_guide/verification.xml
deleted file mode 100644
index 814c252dca..0000000000
--- a/system/doc/installation_guide/verification.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE chapter SYSTEM "chapter.dtd">
-
-<chapter>
- <header>
- <copyright>
- <year>2000</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Installation Verification</title>
- <prepared>Peter H&ouml;gfeldt</prepared>
- <responsible>Peter H&ouml;gfeldt</responsible>
- <docno></docno>
- <approved>(Peter H&ouml;gfeldt</approved>
- <checked></checked>
- <date>1997-05-26</date>
- <rev>C</rev>
- <file>verification.xml</file>
- </header>
- <p>This chapter is about verifying your installation by performing
- a few simple tests to see that your system is properly installed.</p>
-
- <section>
- <title>UNIX</title>
- <list type="bulleted">
- <item>
- <p>Start Erlang/OTP from the command line,</p>
- <pre>
- unix> erl</pre>
- <p>Expect the following output:</p>
- <pre>
- Erlang (BEAM) emulator version 5.0.1 [threads]
-
- Eshell V5.0.1 (abort with ^G)
- 1></pre>
- </item>
- <item>
- <p>Start the GS-based toolbar from the Erlang shell, </p>
- <pre>
- 1> <input>toolbar:start().</input></pre>
- <p>and check that the toolbar window pops up.
- </p>
- <p><em>Note:</em> The trailing full stop (<c>"."</c>) is an end marker
- for all commands in the Erlang shell, and must be entered for a
- command to begin execution.</p>
- </item>
- <item>
- <p>Exit by entering the command <c>halt()</c>,</p>
- <pre>
- 2> <input>halt().</input></pre>
- <p>which should end both the toolbar window and the command line window. </p>
- </item>
- </list>
- </section>
-
- <section>
- <title>Windows</title>
- <list type="bulleted">
- <item>
- <p>Start Erlang/OTP by double-clicking on the Erlang shortcut icon on the
- desktop.</p>
- <p>Expect a command line window to pop up with the following output,</p>
- <pre>
- Erlang (BEAM) emulator version 5.0.1 [threads]
-
- Eshell V5.0.1 (abort with ^G)
- 1></pre>
- </item>
- <item>
- <p>Start the GS-based toolbar from the Erlang shell, </p>
- <pre>
- 1> <input>toolbar:start().</input></pre>
- <p>and check that the toolbar window pops up.
- </p>
- <p><em>Note:</em> The trailing full stop (<c>"."</c>) is an end marker
- for all commands in the Erlang shell, and must be entered for a
- command to begin execution.</p>
- </item>
- <item>
- <p>Exit by entering the command <c>halt()</c>,</p>
- <pre>
- 2> <input>halt().</input></pre>
- <p>which should end both the toolbar window and the command line window. </p>
- </item>
- </list>
- </section>
-</chapter>
-
diff --git a/system/doc/installation_guide/xmlfiles.mk b/system/doc/installation_guide/xmlfiles.mk
index 3995c607af..a18c82bc25 100644
--- a/system/doc/installation_guide/xmlfiles.mk
+++ b/system/doc/installation_guide/xmlfiles.mk
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2013. All Rights Reserved.
+# Copyright Ericsson AB 2009-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -18,8 +18,7 @@
#
INST_GUIDE_CHAPTER_FILES = \
install-binary.xml \
- verification.xml \
INSTALL.xml \
INSTALL-CROSS.xml \
INSTALL-WIN32.xml \
- MARKDOWN.xml
+ OTP-PATCH-APPLY.xml
diff --git a/system/doc/oam/book.xml b/system/doc/oam/book.xml
index a2596b7fbe..5f429fbee2 100644
--- a/system/doc/oam/book.xml
+++ b/system/doc/oam/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/oam/oam_intro.xml b/system/doc/oam/oam_intro.xml
index bd7369b84c..f4f990393e 100644
--- a/system/doc/oam/oam_intro.xml
+++ b/system/doc/oam/oam_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/oam/part.xml b/system/doc/oam/part.xml
index 8e3acb6e0d..9d44d6e0ad 100644
--- a/system/doc/oam/part.xml
+++ b/system/doc/oam/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/bit_syntax.xml b/system/doc/programming_examples/bit_syntax.xml
index 3306365c0e..fb321c1ba9 100644
--- a/system/doc/programming_examples/bit_syntax.xml
+++ b/system/doc/programming_examples/bit_syntax.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/book.xml b/system/doc/programming_examples/book.xml
index 91346ceea4..fd430a02c0 100644
--- a/system/doc/programming_examples/book.xml
+++ b/system/doc/programming_examples/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/fun_test.erl b/system/doc/programming_examples/fun_test.erl
index 8472fd87f8..8a3b0106c0 100644
--- a/system/doc/programming_examples/fun_test.erl
+++ b/system/doc/programming_examples/fun_test.erl
@@ -1,17 +1,11 @@
%1
-module(fun_test).
--export([t1/0, t2/0, t3/0, t4/0, double/1]).
+-export([t1/0, t2/0]).
-import(lists, [map/2]).
t1() -> map(fun(X) -> 2 * X end, [1,2,3,4,5]).
t2() -> map(fun double/1, [1,2,3,4,5]).
-t3() -> map({?MODULE, double}, [1,2,3,4,5]).
-
double(X) -> X * 2.
%1
-
-
-t4() ->
- "hello world".
diff --git a/system/doc/programming_examples/funs.xmlsrc b/system/doc/programming_examples/funs.xmlsrc
index 92f99cf6d3..7bfac9db8c 100644
--- a/system/doc/programming_examples/funs.xmlsrc
+++ b/system/doc/programming_examples/funs.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/list_comprehensions.xml b/system/doc/programming_examples/list_comprehensions.xml
index 825459238b..d6c8a66e13 100644
--- a/system/doc/programming_examples/list_comprehensions.xml
+++ b/system/doc/programming_examples/list_comprehensions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/part.xml b/system/doc/programming_examples/part.xml
index 5b22ddf82f..0bec9b4cf5 100644
--- a/system/doc/programming_examples/part.xml
+++ b/system/doc/programming_examples/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/programming_examples/records.xml b/system/doc/programming_examples/records.xml
index 2f2434f11c..58cf136a0b 100644
--- a/system/doc/programming_examples/records.xml
+++ b/system/doc/programming_examples/records.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/book.xml b/system/doc/reference_manual/book.xml
index eb2e860f80..546fb36a57 100644
--- a/system/doc/reference_manual/book.xml
+++ b/system/doc/reference_manual/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/character_set.xml b/system/doc/reference_manual/character_set.xml
new file mode 100644
index 0000000000..b09b484582
--- /dev/null
+++ b/system/doc/reference_manual/character_set.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Character Set and Source File Encoding</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>character_set.xml</file>
+ </header>
+
+ <section>
+ <title>Character Set</title>
+ <p>In Erlang 4.8/OTP R5A the syntax of Erlang tokens was extended to
+ allow the use of the full ISO-8859-1 (Latin-1) character set. This
+ is noticeable in the following ways:</p>
+ <list type="bulleted">
+ <item>
+ <p>All the Latin-1 printable characters can be used and are
+ shown without the escape backslash convention.</p>
+ </item>
+ <item>
+ <p>Atoms and variables can use all Latin-1 letters.</p>
+ </item>
+ </list>
+ <table>
+ <row>
+ <cell align="left" valign="middle"><em>Octal</em></cell>
+ <cell align="left" valign="middle"><em>Decimal</em></cell>
+ <cell align="left" valign="middle">&nbsp;</cell>
+ <cell align="left" valign="middle"><em>Class</em></cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">200 - 237</cell>
+ <cell align="left" valign="middle">128 - 159</cell>
+ <cell align="left" valign="middle">&nbsp;</cell>
+ <cell align="left" valign="middle">Control characters</cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">240 - 277</cell>
+ <cell align="left" valign="middle">160 - 191</cell>
+ <cell align="right" valign="middle">- &iquest;</cell>
+ <cell align="left" valign="middle">Punctuation characters</cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">300 - 326</cell>
+ <cell align="left" valign="middle">192 - 214</cell>
+ <cell align="center" valign="middle">&Agrave; - &Ouml;</cell>
+ <cell align="left" valign="middle">Uppercase letters</cell>
+ </row>
+ <row>
+ <cell align="center" valign="middle">327</cell>
+ <cell align="center" valign="middle">215</cell>
+ <cell align="center" valign="middle">&times;</cell>
+ <cell align="left" valign="middle">Punctuation character</cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">330 - 336</cell>
+ <cell align="left" valign="middle">216 - 222</cell>
+ <cell align="center" valign="middle">&Oslash; - &THORN;</cell>
+ <cell align="left" valign="middle">Uppercase letters</cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">337 - 366</cell>
+ <cell align="left" valign="middle">223 - 246</cell>
+ <cell align="center" valign="middle">&szlig; - &ouml;</cell>
+ <cell align="left" valign="middle">Lowercase letters</cell>
+ </row>
+ <row>
+ <cell align="center" valign="middle">367</cell>
+ <cell align="center" valign="middle">247</cell>
+ <cell align="center" valign="middle">&divide;</cell>
+ <cell align="left" valign="middle">Punctuation character</cell>
+ </row>
+ <row>
+ <cell align="left" valign="middle">370 - 377</cell>
+ <cell align="left" valign="middle">248 - 255</cell>
+ <cell align="center" valign="middle">&oslash; - &yuml;</cell>
+ <cell align="left" valign="middle">Lowercase letters</cell>
+ </row>
+ <tcaption>Character Classes.</tcaption>
+ </table>
+ <p>In Erlang/OTP R16B the syntax of Erlang tokens was extended to
+ handle Unicode. The support is limited to
+ string literals and comments. Atoms, module names, and
+ function names are restricted to the ISO-Latin-1 range.
+ More about the usage of Unicode in Erlang source files
+ can be found in <seealso
+ marker="stdlib:unicode_usage#unicode_in_erlang">STDLIB's User's
+ Guide</seealso>.</p>
+ </section>
+ <section>
+ <title>Source File Encoding</title>
+ <p>The Erlang source file <marker
+ id="encoding">encoding</marker> is selected by a
+ comment in one of the first two lines of the source file. The
+ first string that matches the regular expression
+ <c>coding\s*[:=]\s*([-a-zA-Z0-9])+</c> selects the encoding. If
+ the matching string is not a valid encoding it is ignored. The
+ valid encodings are <c>Latin-1</c> and <c>UTF-8</c> where the
+ case of the characters can be chosen freely.</p>
+ <p>The following example selects UTF-8 as default encoding:</p>
+ <pre>
+%% coding: utf-8</pre>
+ <p>Two more examples, both selecting Latin-1 as default encoding:</p>
+ <pre>
+%% For this file we have chosen encoding = Latin-1</pre>
+ <pre>
+%% -*- coding: latin-1 -*-</pre>
+ <p>The default encoding for Erlang source files was changed from
+ Latin-1 to UTF-8 in Erlang OTP 17.0.</p>
+ </section>
+</chapter>
diff --git a/system/doc/reference_manual/code_loading.xml b/system/doc/reference_manual/code_loading.xml
index 0d2d7b2c2f..b5b5704df5 100644
--- a/system/doc/reference_manual/code_loading.xml
+++ b/system/doc/reference_manual/code_loading.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -121,10 +121,22 @@ loop() ->
<title>Running a function when a module is loaded</title>
<warning>
- <p>This section describes an experimental feature that was
- introduced in R13B03, and changed in a backwards-incompatible
- way in R13B04. There may be more backward-incompatible changes
- in future releases.</p>
+ <p>The <c>on_load</c> feature should be considered experimental
+ as there are a number of known weak points in current semantics
+ which therefore might also change in future releases:</p>
+ <list>
+ <item><p>Doing external call in on_load to the module itself
+ leads to deadlock.</p></item>
+ <item><p>At module upgrade, other processes calling the module
+ get suspended waiting for on_load to finish. This can be very bad
+ for applications with demands on realtime characteristics.</p></item>
+ <item><p>At module upgrade, no rollback is done if the on_load function fails.
+ The system will be left in a bad limbo state without any working
+ and reachable instance of the module.</p></item>
+ </list>
+ <p>The problems with module upgrade described above could be fixed in future
+ releases by changing the behaviour to not make the module reachable until
+ after the on_load function has successfully returned.</p>
</warning>
<p>The <c>-on_load()</c> directive names a function that should
diff --git a/system/doc/reference_manual/data_types.xml b/system/doc/reference_manual/data_types.xml
index 531d50b2cf..ad92143179 100644
--- a/system/doc/reference_manual/data_types.xml
+++ b/system/doc/reference_manual/data_types.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -44,7 +44,8 @@
<list type="bulleted">
<item><c>$</c><em><c>char</c></em> <br></br>
- ASCII value of the character <em><c>char</c></em>.</item>
+ ASCII value or unicode code-point of the character
+ <em><c>char</c></em>.</item>
<item><em><c>base</c></em><c>#</c><em><c>value</c></em> <br></br>
Integer with the base <em><c>base</c></em>, which must be an
@@ -190,6 +191,38 @@ adam
</section>
<section>
+ <title>Map</title>
+ <p>Compound data type with a variable number of key-value associations:</p>
+ <pre>
+#{Key1=>Value1,...,KeyN=>ValueN}</pre>
+ <p>Each key-value association in the map is called an
+ <em>association pair</em>. The key and value parts of the pair are
+ called <em>elements</em>. The number of association pairs is said to be
+ the <em>size</em> of the map.</p>
+ <p>There exists a number of BIFs to manipulate maps.</p>
+ <p>Examples:</p>
+ <pre>
+1> <input>M1 = #{name=>adam,age=>24,date=>{july,29}}.</input>
+#{age => 24,date => {july,29},name => adam}
+2> <input>maps:get(name,M1).</input>
+adam
+3> <input>maps:get(date,M1).</input>
+{july,29}
+4> <input>M2 = maps:update(age,25,M1).</input>
+#{age => 25,date => {july,29},name => adam}
+5> <input>map_size(M).</input>
+3
+6> <input>map_size(#{}).</input>
+0</pre>
+ <p>A collection of maps processing functions can be found in
+ the STDLIB module <seealso marker="stdlib:maps"><c>maps</c></seealso>.</p>
+ <p>Read more about <seealso marker="expressions#map_expressions">Maps</seealso>.</p>
+ <note>
+ <p>Maps are considered experimental during OTP 17.</p>
+ </note>
+ </section>
+
+ <section>
<title>List</title>
<p>Compound data type with a variable number of terms.</p>
<pre>
diff --git a/system/doc/reference_manual/distributed.xml b/system/doc/reference_manual/distributed.xml
index bc55d14c90..88f98bc106 100644
--- a/system/doc/reference_manual/distributed.xml
+++ b/system/doc/reference_manual/distributed.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -199,7 +199,7 @@ dilbert@uab</pre>
<cell align="left" valign="middle">Depending on <c>Arg</c>, this function can return a list not only of visible nodes, but also hidden nodes and previously known nodes, etc.</cell>
</row>
<row>
- <cell align="left" valign="middle"><c>set_cookie(Node, Cookie)</c></cell>
+ <cell align="left" valign="middle"><c>erlang:set_cookie(Node, Cookie)</c></cell>
<cell align="left" valign="middle">Sets the magic cookie used when connecting to <c>Node</c>. If <c>Node</c> is the current node, <c>Cookie</c> will be used when connecting to all new nodes.</cell>
</row>
<row>
diff --git a/system/doc/reference_manual/errors.xml b/system/doc/reference_manual/errors.xml
index 4e207021d3..dde6e68f4a 100644
--- a/system/doc/reference_manual/errors.xml
+++ b/system/doc/reference_manual/errors.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml
index 357f89f731..62a344ad58 100644
--- a/system/doc/reference_manual/expressions.xml
+++ b/system/doc/reference_manual/expressions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -56,7 +56,7 @@ Expr1 + Expr2</code>
<marker id="term"></marker>
<title>Terms</title>
<p>The simplest form of expression is a term, that is an integer,
- float, atom, string, list or tuple.
+ float, atom, string, list, map or tuple.
The return value is the term itself.</p>
</section>
@@ -283,7 +283,7 @@ fun lists:append/2([1,2], [3,4])
length([]) ->
0;
length([H|T]) ->
- 1 + length(T). %% Calls the local funtion length/1
+ 1 + length(T). %% Calls the local function length/1
f(X) when erlang:length(X) > 3 -> %% Calls erlang:length/1,
%% which is allowed in guards
@@ -301,7 +301,7 @@ f(X) when erlang:length(X) > 3 -> %% Calls erlang:length/1,
-import(mod,[length/1]).
-f(X) when erlang:length(X) > 33 -> %% Calls erlang:lenght/1,
+f(X) when erlang:length(X) > 33 -> %% Calls erlang:length/1,
%% which is allowed in guards
erlang:length(X); %% Explicit call to erlang:length in body
@@ -792,6 +792,245 @@ Expr1 -- Expr2</pre>
</section>
<section>
+ <marker id="map_expressions"></marker>
+ <title>Map Expressions</title>
+ <section>
+ <title>Creating Maps</title>
+ <p>
+ Constructing a new map is done by letting an expression <c>K</c> be associated with
+ another expression <c>V</c>:
+ </p>
+ <code>#{ K => V }</code>
+ <p>
+ New maps may include multiple associations at construction by listing every
+ association:
+ </p>
+ <code>#{ K1 => V1, .., Kn => Vn }</code>
+ <p>
+ An empty map is constructed by not associating any terms with each other:
+ </p>
+ <code>#{}</code>
+ <p>
+ All keys and values in the map are terms. Any expression is first evaluated and
+ then the resulting terms are used as <em>key</em> and <em>value</em> respectively.
+ </p>
+ <p>
+ Keys and values are separated by the <c>=></c> arrow and associations are
+ separated by <c>,</c>.
+ </p>
+
+ <p>
+ Examples:
+ </p>
+ <code>
+M0 = #{}, % empty map
+M1 = #{a => &lt;&lt;"hello"&gt;&gt;}, % single association with literals
+M2 = #{1 => 2, b => b}, % multiple associations with literals
+M3 = #{k => {A,B}}, % single association with variables
+M4 = #{{"w", 1} => f()}. % compound key associated with an evaluated expression</code>
+ <p>
+ where, <c>A</c> and <c>B</c> are any expressions and <c>M0</c> through <c>M4</c>
+ are the resulting map terms.
+ </p>
+ <p>
+ If two matching keys are declared, the latter key will take precedence.
+ </p>
+ <p>
+ Example:
+ </p>
+
+<pre>
+1> <input>#{1 => a, 1 => b}.</input>
+#{1 => b }
+2> <input>#{1.0 => a, 1 => b}.</input>
+#{1 => b, 1.0 => a}
+</pre>
+ <p>
+ The order in which the expressions constructing the keys and their
+ associated values are evaluated is not defined. The syntactic order of
+ the key-value pairs in the construction is of no relevance, except in
+ the above mentioned case of two matching keys.
+ </p>
+ </section>
+
+ <section>
+ <title>Updating Maps</title>
+ <p>
+ Updating a map has similar syntax as constructing it.
+ </p>
+ <p>
+ An expression defining the map to be updated is put in front of the expression
+ defining the keys to be updated and their respective values.
+ </p>
+ <code>M#{ K => V }</code>
+ <p>
+ where <c>M</c> is a term of type map and <c>K</c> and <c>V</c> are any expression.
+ </p>
+ <p>
+ If key <c>K</c> does not match any existing key in the map, a new association
+ will be created from key <c>K</c> to value <c>V</c>. If key <c>K</c> matches
+ an existing key in map <c>M</c> its associated value will be replaced by the
+ new value <c>V</c>. In both cases the evaluated map expression will return a new map.
+ </p>
+ <p>
+ If <c>M</c> is not of type map an exception of type <c>badmap</c> is thrown.
+ </p>
+ <p>
+ To only update an existing value, the following syntax is used,
+ </p>
+ <code>M#{ K := V } </code>
+ <p>
+ where <c>M</c> is an term of type map, <c>V</c> is an expression and <c>K</c>
+ is an expression which evaluates to an existing key in <c>M</c>.
+ </p>
+ <p>
+ If key <c>K</c> does not match any existing keys in map <c>M</c> an exception
+ of type <c>badarg</c> will be triggered at runtime. If a matching key <c>K</c>
+ is present in map <c>M</c> its associated value will be replaced by the new
+ value <c>V</c> and the evaluated map expression returns a new map.
+ </p>
+ <p>
+ If <c>M</c> is not of type map an exception of type <c>badmap</c> is thrown.
+ </p>
+ <p>
+ Examples:
+ </p>
+ <code>
+M0 = #{},
+M1 = M0#{a => 0},
+M2 = M1#{a => 1, b => 2},
+M3 = M2#{"function" => fun() -> f() end},
+M4 = M3#{a := 2, b := 3}. % 'a' and 'b' was added in `M1` and `M2`.</code>
+ <p>
+ where <c>M0</c> is any map. It follows that <c>M1 .. M4</c> are maps as well.
+ </p>
+ <p>
+ More Examples:
+ </p>
+<pre>
+1> <input>M = #{1 => a}.</input>
+#{1 => a }
+2> <input>M#{1.0 => b}.</input>
+#{1 => a, 1.0 => b}.
+3> <input>M#{1 := b}.</input>
+#{1 => b}
+4> <input>M#{1.0 := b}.</input>
+** exception error: bad argument
+</pre>
+ <p>
+ As in construction, the order in which the key and value expressions
+ are evaluated is not defined. The
+ syntactic order of the key-value pairs in the update is of no
+ relevance, except in the case where two keys match, in which
+ case the latter value is used.
+ </p>
+ </section>
+
+ <section>
+ <title>Maps in Patterns</title>
+ <p>
+ Matching of key-value associations from maps is done in the following way:
+ </p>
+
+ <code>#{ K := V } = M</code>
+ <p>
+ where <c>M</c> is any map. The key <c>K</c> has to be an expression with bound
+ variables or a literals, and <c>V</c> can be any pattern with either bound or
+ unbound variables.
+ </p>
+ <p>
+ If the variable <c>V</c> is unbound, it will be bound to the value associated
+ with the key <c>K</c>, which has to exist in the map <c>M</c>. If the variable
+ <c>V</c> is bound, it has to match the value associated with <c>K</c> in <c>M</c>.
+ </p>
+ <p> Example: </p>
+<code>
+1> <input>M = #{"tuple" => {1,2}}.</input>
+#{"tuple" => {1,2}}
+2> <input>#{"tuple" := {1,B}} = M.</input>
+#{"tuple" => {1,2}}
+3> <input>B.</input>
+2.</code>
+ <p>
+ This will bind variable <c>B</c> to integer <c>2</c>.
+ </p>
+ <p>
+ Similarly, multiple values from the map may be matched:
+ </p>
+ <code>#{ K1 := V1, .., Kn := Vn } = M</code>
+ <p>
+ where keys <c>K1 .. Kn</c> are any expressions with literals or bound variables. If all
+ keys exist in map <c>M</c> all variables in <c>V1 .. Vn</c> will be matched to the
+ associated values of their respective keys.
+ </p>
+ <p>
+ If the matching conditions are not met, the match will fail, either with
+ </p>
+ <list>
+ <item>
+ a <c>badmatch</c> exception, if used in the context of the matching operator
+ as in the example,
+ </item>
+ <item>
+ or resulting in the next clause being tested in function heads and
+ case expressions.
+ </item>
+ </list>
+ <p>
+ Matching in maps only allows for <c>:=</c> as delimiters of associations.
+ The order in which keys are declared in matching has no relevance.
+ </p>
+ <p>
+ Duplicate keys are allowed in matching and will match each pattern associated
+ to the keys.
+ </p>
+ <code>#{ K := V1, K := V2 } = M</code>
+ <p>
+ Matching an expression against an empty map literal will match its type but
+ no variables will be bound:
+ </p>
+ <code>#{} = Expr</code>
+ <p>
+ This expression will match if the expression <c>Expr</c> is of type map, otherwise
+ it will fail with an exception <c>badmatch</c>.
+ </p>
+ <section>
+ <title>Matching syntax: Example with literals in function heads</title>
+ <p>
+ Matching of literals as keys are allowed in function heads.
+ </p>
+ <code>
+%% only start if not_started
+handle_call(start, From, #{ state := not_started } = S) ->
+...
+ {reply, ok, S#{ state := start }};
+
+%% only change if started
+handle_call(change, From, #{ state := start } = S) ->
+...
+ {reply, ok, S#{ state := changed }};</code>
+ </section>
+ </section>
+ <section>
+ <title>Maps in Guards</title>
+ <p>
+ Maps are allowed in guards as long as all sub-expressions are valid guard expressions.
+ </p>
+ <p>
+ Two guard BIFs handles maps:
+ </p>
+ <list>
+ <item>
+ <seealso marker="erts:erlang#is_map/1">is_map/1</seealso>
+ </item>
+ <item>
+ <seealso marker="erts:erlang#map_size/1">map_size/1</seealso>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
<marker id="bit_syntax"></marker>
<title>Bit Syntax Expressions</title>
<code type="none"><![CDATA[<<>>
@@ -954,19 +1193,20 @@ Ei = Value |
<title>Fun Expressions</title>
<pre>
fun
- (Pattern11,...,Pattern1N) [when GuardSeq1] ->
- Body1;
+ [Name](Pattern11,...,Pattern1N) [when GuardSeq1] ->
+ Body1;
...;
- (PatternK1,...,PatternKN) [when GuardSeqK] ->
- BodyK
+ [Name](PatternK1,...,PatternKN) [when GuardSeqK] ->
+ BodyK
end</pre>
<p>A fun expression begins with the keyword <c>fun</c> and ends
with the keyword <c>end</c>. Between them should be a function
declaration, similar to a
- <seealso marker="functions#syntax">regular function declaration</seealso>, except that no function name is
- specified.</p>
- <p>Variables in a fun head shadow variables in the
- function clause surrounding the fun expression, and
+ <seealso marker="functions#syntax">regular function declaration</seealso>,
+ except that the function name is optional and should be a variable if
+ any.</p>
+ <p>Variables in a fun head shadow the function name and both shadow
+ variables in the function clause surrounding the fun expression, and
variables bound in a fun body are local to the fun body.</p>
<p>The return value of the expression is the resulting fun.</p>
<p>Examples:</p>
@@ -978,7 +1218,11 @@ end</pre>
3> <input>Fun2 = fun (X) when X>=5 -> gt; (X) -> lt end.</input>
#Fun&lt;erl_eval.6.39074546&gt;
4> <input>Fun2(7).</input>
-gt</pre>
+gt
+5> <input>Fun3 = fun Fact(1) -> 1; Fact(X) when X > 1 -> X * Fact(X - 1) end.</input>
+#Fun&lt;erl_eval.6.39074546&gt;
+6> <input>Fun3(4).</input>
+24</pre>
<p>The following fun expressions are also allowed:</p>
<pre>
fun Name/Arity
@@ -1343,6 +1587,9 @@ end</pre>
<cell align="left" valign="middle"><c>is_list/1</c></cell>
</row>
<row>
+ <cell align="left" valign="middle"><c>is_map/1</c></cell>
+ </row>
+ <row>
<cell align="left" valign="middle"><c>is_number/1</c></cell>
</row>
<row>
@@ -1393,6 +1640,9 @@ end</pre>
<cell align="left" valign="middle"><c>length(List)</c></cell>
</row>
<row>
+ <cell align="left" valign="middle"><c>map_size(Map)</c></cell>
+ </row>
+ <row>
<cell align="left" valign="middle"><c>node()</c></cell>
</row>
<row>
diff --git a/system/doc/reference_manual/functions.xml b/system/doc/reference_manual/functions.xml
index 3746ee6fad..9498ef1402 100644
--- a/system/doc/reference_manual/functions.xml
+++ b/system/doc/reference_manual/functions.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/introduction.xml b/system/doc/reference_manual/introduction.xml
index d143a154b6..36bec17825 100644
--- a/system/doc/reference_manual/introduction.xml
+++ b/system/doc/reference_manual/introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2013</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -79,88 +79,5 @@
when xor</p>
</section>
- <section>
- <title>Character Set</title>
- <p>In Erlang 4.8/OTP R5A the syntax of Erlang tokens was extended to
- allow the use of the full ISO-8859-1 (Latin-1) character set. This
- is noticeable in the following ways:</p>
- <list type="bulleted">
- <item>
- <p>All the Latin-1 printable characters can be used and are
- shown without the escape backslash convention.</p>
- </item>
- <item>
- <p>Atoms and variables can use all Latin-1 letters.</p>
- </item>
- </list>
- <table>
- <row>
- <cell align="left" valign="middle"><em>Octal</em></cell>
- <cell align="left" valign="middle"><em>Decimal</em></cell>
- <cell align="left" valign="middle">&nbsp;</cell>
- <cell align="left" valign="middle"><em>Class</em></cell>
- </row>
- <row>
- <cell align="left" valign="middle">200 - 237</cell>
- <cell align="left" valign="middle">128 - 159</cell>
- <cell align="left" valign="middle">&nbsp;</cell>
- <cell align="left" valign="middle">Control characters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">240 - 277</cell>
- <cell align="left" valign="middle">160 - 191</cell>
- <cell align="right" valign="middle">- &iquest;</cell>
- <cell align="left" valign="middle">Punctuation characters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">300 - 326</cell>
- <cell align="left" valign="middle">192 - 214</cell>
- <cell align="center" valign="middle">&Agrave; - &Ouml;</cell>
- <cell align="left" valign="middle">Uppercase letters</cell>
- </row>
- <row>
- <cell align="center" valign="middle">327</cell>
- <cell align="center" valign="middle">215</cell>
- <cell align="center" valign="middle">&times;</cell>
- <cell align="left" valign="middle">Punctuation character</cell>
- </row>
- <row>
- <cell align="left" valign="middle">330 - 336</cell>
- <cell align="left" valign="middle">216 - 222</cell>
- <cell align="center" valign="middle">&Oslash; - &THORN;</cell>
- <cell align="left" valign="middle">Uppercase letters</cell>
- </row>
- <row>
- <cell align="left" valign="middle">337 - 366</cell>
- <cell align="left" valign="middle">223 - 246</cell>
- <cell align="center" valign="middle">&szlig; - &ouml;</cell>
- <cell align="left" valign="middle">Lowercase letters</cell>
- </row>
- <row>
- <cell align="center" valign="middle">367</cell>
- <cell align="center" valign="middle">247</cell>
- <cell align="center" valign="middle">&divide;</cell>
- <cell align="left" valign="middle">Punctuation character</cell>
- </row>
- <row>
- <cell align="left" valign="middle">370 - 377</cell>
- <cell align="left" valign="middle">248 - 255</cell>
- <cell align="center" valign="middle">&oslash; - &yuml;</cell>
- <cell align="left" valign="middle">Lowercase letters</cell>
- </row>
- <tcaption>Character Classes.</tcaption>
- </table>
- <p>In Erlang/OTP R16 the syntax of Erlang tokens was extended to
- handle Unicode. To begin with the support is limited to strings,
- but Erlang/OTP R18 is expected to handle Unicode atoms as well.
- More about the usage of Unicode in Erlang source files can be
- found in <seealso
- marker="stdlib:unicode_usage#unicode_in_erlang">STDLIB's User'S
- Guide</seealso>. The default encoding for Erlang source files
- is still Latin-1, but in Erlang/OTP R17 the default encoding
- will be UTF-8. The details on how to state the encoding of an
- Erlang source file can be found in <seealso
- marker="stdlib:epp#encoding">epp(3)</seealso>.</p>
- </section>
</chapter>
diff --git a/system/doc/reference_manual/macros.xml b/system/doc/reference_manual/macros.xml
index ef2db93f94..9fd0b0f287 100644
--- a/system/doc/reference_manual/macros.xml
+++ b/system/doc/reference_manual/macros.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2011</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/modules.xml b/system/doc/reference_manual/modules.xml
index 51c8157764..f0ec7ef165 100644
--- a/system/doc/reference_manual/modules.xml
+++ b/system/doc/reference_manual/modules.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2012</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -53,10 +53,10 @@ fact(0) -> % |
<pre>
-Tag(Value).</pre>
<p><c>Tag</c> must be an atom, while <c>Value</c> must be a literal
- term. As a convenience in user-defined attributes, the literal term
- <c>Value</c> the syntax <c>Name/Arity</c>
- (where <c>Name</c> is an atom and <c>Arity</c> a positive integer)
- will be translated to <c>{Name,Arity}</c>.</p>
+ term. As a convenience in user-defined attributes, if the literal term
+ <c>Value</c> has the syntax <c>Name/Arity</c>
+ (where <c>Name</c> is an atom and <c>Arity</c> a positive integer),
+ the term <c>Name/Arity</c> will be translated to <c>{Name,Arity}</c>.</p>
<p>Any module attribute can be specified. The attributes are stored
in the compiled code and can be retrieved by calling
@@ -134,8 +134,21 @@ fact(0) -> % |
standard behaviours <c>gen_server</c>, <c>gen_fsm</c>,
<c>gen_event</c> or <c>supervisor</c>.</p>
<p>The spelling <c>behavior</c> is also accepted.</p>
- <p>Read more about behaviours and callback modules in OTP Design
- Principles.</p>
+ <p>The callback functions of the module can be specified either
+ directly by the exported function <c>behaviour_info/1</c>:</p>
+ <pre>
+behaviour_info(callbacks) -> Callbacks.</pre>
+ <p>or by a <c>-callback</c> attribute for each callback
+ function:</p>
+ <pre>
+-callback Name(Arguments) -> Result.</pre>
+ <p>where <c>Arguments</c> is a list of zero or more arguments.
+ The <c>-callback</c> attribute is to be preferred since the
+ extra type information can be used by tools to produce
+ documentation or find discrepancies.</p>
+ <p>Read more about behaviours and callback modules in
+ <seealso marker="doc/design_principles:spec_proc#behaviours">
+ OTP Design Principles</seealso>.</p>
</section>
<section>
diff --git a/system/doc/reference_manual/part.xml b/system/doc/reference_manual/part.xml
index 8151f4c4e1..ee8f3dd7eb 100644
--- a/system/doc/reference_manual/part.xml
+++ b/system/doc/reference_manual/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2003</year><year>2010</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -28,6 +28,7 @@
<rev></rev>
</header>
<xi:include href="introduction.xml"/>
+ <xi:include href="character_set.xml"/>
<xi:include href="data_types.xml"/>
<xi:include href="patterns.xml"/>
<xi:include href="modules.xml"/>
diff --git a/system/doc/reference_manual/patterns.xml b/system/doc/reference_manual/patterns.xml
index 7289f14d73..1611002fa1 100644
--- a/system/doc/reference_manual/patterns.xml
+++ b/system/doc/reference_manual/patterns.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/ports.xml b/system/doc/reference_manual/ports.xml
index 58e2baac17..621af10624 100644
--- a/system/doc/reference_manual/ports.xml
+++ b/system/doc/reference_manual/ports.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
diff --git a/system/doc/reference_manual/processes.xml b/system/doc/reference_manual/processes.xml
index 305d7d9c66..95ae0672ec 100644
--- a/system/doc/reference_manual/processes.xml
+++ b/system/doc/reference_manual/processes.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -114,8 +114,8 @@ spawn(Module, Name, Args) -> pid()
<p>Two processes can be <em>linked</em> to each other. A link
between two processes <c>Pid1</c> and <c>Pid2</c> is created
by <c>Pid1</c> calling the BIF <c>link(Pid2)</c> (or vice versa).
- There also exists a number a <c>spawn_link</c> BIFs, which spawns
- and links to a process in one operation.</p>
+ There also exist a number of <c>spawn_link</c> BIFs, which spawn
+ and link to a process in one operation.</p>
<p>Links are bidirectional and there can only be one link between
two processes. Repeated calls to <c>link(Pid)</c> have no effect.</p>
<p>A link can be removed by calling the BIF <c>unlink(Pid)</c>.</p>
diff --git a/system/doc/reference_manual/records.xml b/system/doc/reference_manual/records.xml
index d01d883ef3..04766531df 100644
--- a/system/doc/reference_manual/records.xml
+++ b/system/doc/reference_manual/records.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2010</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index a3b45e4dca..e4aa2ceda6 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2013</year>
+ <year>2003</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -100,9 +100,10 @@
| Fun
| Integer
| List
+ | Map
| Tuple
| Union
- | UserDefined %% described in Section 6.3
+ | UserDefined %% described in Section 7.3
Atom :: atom()
| Erlang_Atom %% 'foo', 'bar', ...
@@ -118,18 +119,25 @@
| fun((TList) -> Type)
Integer :: integer()
- | Erlang_Integer %% ..., -1, 0, 1, ... 42 ...
- | Erlang_Integer..Erlang_Integer %% specifies an integer range
+ | Erlang_Integer %% ..., -1, 0, 1, ... 42 ...
+ | Erlang_Integer..Erlang_Integer %% specifies an integer range
- List :: list(Type) %% Proper list ([]-terminated)
- | improper_list(Type1, Type2) %% Type1=contents, Type2=termination
- | maybe_improper_list(Type1, Type2) %% Type1 and Type2 as above
- | nonempty_list(Type) %% Proper non-empty list
+ List :: list(Type) %% Proper list ([]-terminated)
+ | maybe_improper_list(Type1, Type2) %% Type1=contents, Type2=termination
+ | nonempty_improper_list(Type1, Type2) %% Type1 and Type2 as above
+ | nonempty_list(Type) %% Proper non-empty list
- Tuple :: tuple() %% stands for a tuple of any size
+ Map :: map() %% stands for a map of any size
+ | #{} %% stands for a map of any size
+ | #{PairList}
+
+ Tuple :: tuple() %% stands for a tuple of any size
| {}
| {TList}
+ PairList :: Type => Type
+ | Type => Type, PairList
+
TList :: Type
| Type, TList
@@ -209,6 +217,9 @@
<cell><c>iolist()</c></cell><cell><c>maybe_improper_list(byte() | binary() | iolist(), binary() | [])</c></cell>
</row>
<row>
+ <cell><c>function()</c></cell><cell><c>fun()</c></cell>
+ </row>
+ <row>
<cell><c>module()</c></cell><cell><c>atom()</c></cell>
</row>
<row>
@@ -275,6 +286,10 @@
Records have been extended to possibly contain type information.
This is described in the sub-section <seealso marker="#typeinrecords">"Type information in record declarations"</seealso> below.
</p>
+ <note>
+ <p>Map types, both <c>map()</c> and <c>#{ ... }</c>, are considered experimental during OTP 17.</p>
+ <p>No type information of maps pairs, only the containing map types, are used by Dialyzer in OTP 17.</p>
+ </note>
</section>
<section>
diff --git a/system/doc/system_architecture_intro/book.xml b/system/doc/system_architecture_intro/book.xml
index e83c1a482a..f010ec53fc 100644
--- a/system/doc/system_architecture_intro/book.xml
+++ b/system/doc/system_architecture_intro/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/system_architecture_intro/part.xml b/system/doc/system_architecture_intro/part.xml
index 7f3ea62190..e5eec36cbb 100644
--- a/system/doc/system_architecture_intro/part.xml
+++ b/system/doc/system_architecture_intro/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/system_architecture_intro/sys_arch_intro.xml b/system/doc/system_architecture_intro/sys_arch_intro.xml
index 1cd8cf99e2..3e88548861 100644
--- a/system/doc/system_architecture_intro/sys_arch_intro.xml
+++ b/system/doc/system_architecture_intro/sys_arch_intro.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -150,7 +150,7 @@
<item>Chapter 8: "Operation and Management Principles" describes the model for operation and maintenance of sub-systems.</item>
<item>Chapter 9: "Tutorial" gives an orientation of the different
interoperability mechanism, which can be used when integrating an
- Erlang program with a program written in an other programming language.</item>
+ Erlang program with a program written in another programming language.</item>
</list>
</section>
diff --git a/system/doc/system_principles/book.xml b/system/doc/system_principles/book.xml
index 868bbeecdd..3692752bbe 100644
--- a/system/doc/system_principles/book.xml
+++ b/system/doc/system_principles/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/system_principles/create_target.xmlsrc b/system/doc/system_principles/create_target.xmlsrc
index bc2a76db47..a8ee2d1245 100644
--- a/system/doc/system_principles/create_target.xmlsrc
+++ b/system/doc/system_principles/create_target.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2002</year><year>2011</year>
+ <year>2002</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -21,7 +21,7 @@
</legalnotice>
- <title>Creating a First Target System</title>
+ <title>Creating and Upgrading a Target System</title>
<prepared>Peter H&ouml;gfeldt</prepared>
<responsible></responsible>
<docno></docno>
@@ -71,26 +71,27 @@
</section>
<section>
+ <marker id="create"/>
<title>Creating a Target System</title>
<p>It is assumed that you have a working Erlang/OTP system structured
according to the OTP Design Principles.</p>
- <p><em>Step 1.</em> First create a <c>.rel</c> file (see
- <c>rel(4)</c>) that specifies the <c>erts</c> version
- and lists all applications that should be included in the new
- basic target system. An example is the following
+ <p><em>Step 1.</em> First create a <c>.rel</c> file (see <seealso
+ marker="sasl:rel">rel(4)</seealso>) that specifies the <c>erts</c>
+ version and lists all applications that should be included in the
+ new basic target system. An example is the following
<c>mysystem.rel</c> file:</p>
<code type="none">
%% mysystem.rel
{release,
{"MYSYSTEM", "FIRST"},
- {erts, "5.1"},
- [{kernel, "2.7"},
- {stdlib, "1.10"},
- {sasl, "1.9.3"},
- {pea, "1.0"}]}. </code>
+ {erts, "5.10.4"},
+ [{kernel, "2.16.4"},
+ {stdlib, "1.19.4"},
+ {sasl, "2.3.4"},
+ {pea, "1.0"}]}.</code>
<p>The listed applications are not only original Erlang/OTP
applications but possibly also new applications that you have
- written yourself (here examplified by the application
+ written yourself (here exemplified by the application
<c>pea</c>). </p>
<p><em>Step 2.</em> From the directory where the <c>mysystem.rel</c>
file reside, start the Erlang/OTP system:</p>
@@ -116,13 +117,13 @@ os> <input>erl -pa /home/user/target_system/myapps/pea-1.0/ebin</input></pre>
<c>systools:make_tar/2</c>. That file has the following
contents:</p>
<code type="none">
-erts-5.1/bin/
+erts-5.10.4/bin/
releases/FIRST/start.boot
releases/FIRST/mysystem.rel
releases/mysystem.rel
-lib/kernel-2.7/
-lib/stdlib-1.10/
-lib/sasl-1.9.3/
+lib/kernel-2.16.4/
+lib/stdlib-1.19.4/
+lib/sasl-2.3.4/
lib/pea-1.0/ </code>
<p>The file <c>releases/FIRST/start.boot</c> is a copy of our
<c>mysystem.boot</c></p>
@@ -142,16 +143,19 @@ lib/pea-1.0/ </code>
<item>Creates the temporary directory <c>tmp</c> and extracts the tar file
<c>mysystem.tar.gz</c> into that directory. </item>
<item>Deletes the <c>erl</c> and <c>start</c> files from
- <c>tmp/erts-5.1/bin</c>. These files will be created again from
+ <c>tmp/erts-5.10.4/bin</c>. These files will be created again from
source when installing the release.</item>
<item>Creates the directory <c>tmp/bin</c>.</item>
<item>Copies the previously created file <c>plain.boot</c> to
<c>tmp/bin/start.boot</c>.</item>
<item>Copies the files <c>epmd</c>, <c>run_erl</c>, and
- <c>to_erl</c> from the directory <c>tmp/erts-5.1/bin</c> to
+ <c>to_erl</c> from the directory <c>tmp/erts-5.10.4/bin</c> to
the directory <c>tmp/bin</c>.</item>
+ <item>Creates the directory <c>tmp/log</c>, which will be used
+ if the system is started as embedded with the <c>bin/start</c>
+ script.</item>
<item>Creates the file <c>tmp/releases/start_erl.data</c> with
- the contents "5.1 FIRST". This file is to be passed as data
+ the contents "5.10.4 FIRST". This file is to be passed as data
file to the <c>start_erl</c> script.
</item>
<item>Recreates the file <c>mysystem.tar.gz</c> from the directories
@@ -171,11 +175,11 @@ lib/pea-1.0/ </code>
<item>Extracts the tar file <c>mysystem.tar.gz</c> into the target
directory <c>/usr/local/erl-target</c>.</item>
<item>In the target directory reads the file <c>releases/start_erl.data</c>
- in order to find the Erlang runtime system version ("5.1").</item>
+ in order to find the Erlang runtime system version ("5.10.4").</item>
<item>Substitutes <c>%FINAL_ROOTDIR%</c> and <c>%EMU%</c> for
<c>/usr/local/erl-target</c> and <c>beam</c>, respectively, in
the files <c>erl.src</c>, <c>start.src</c>, and
- <c>start_erl.src</c> of the target <c>erts-5.1/bin</c>
+ <c>start_erl.src</c> of the target <c>erts-5.10.4/bin</c>
directory, and puts the resulting files <c>erl</c>,
<c>start</c>, and <c>run_erl</c> in the target <c>bin</c>
directory.</item>
@@ -185,6 +189,7 @@ lib/pea-1.0/ </code>
</section>
<section>
+ <marker id="start"/>
<title>Starting a Target System</title>
<p>Now we have a target system that can be started in various ways.</p>
<p>We start it as a <em>basic target system</em> by invoking</p>
@@ -193,7 +198,7 @@ os> <input>/usr/local/erl-target/bin/erl</input></pre>
<p>where only the <c>kernel</c> and <c>stdlib</c> applications are
started, i.e. the system is started as an ordinary development
system. There are only two files needed for all this to work:
- <c>bin/erl</c> file (obtained from <c>erts-5.1/bin/erl.src</c>)
+ <c>bin/erl</c> file (obtained from <c>erts-5.10.4/bin/erl.src</c>)
and the <c>bin/start.boot</c> file (a copy of <c>plain.boot</c>).</p>
<p>We can also start a distributed system (requires <c>bin/epmd</c>).</p>
<p>To start all applications specified in the original
@@ -208,9 +213,10 @@ os> <input>/usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
<c>bin/run_erl</c>, which in turn calls <c>bin/start_erl</c>
(roughly, <c>start_erl</c> is an embedded variant of
<c>erl</c>). </p>
- <p>The shell script <c>start</c> is only an example. You should
- edit it to suite your needs. Typically it is executed when the
- UNIX system boots.</p>
+ <p>The shell script <c>start</c>, which is generated from
+ erts-5.10.4/bin/start.src during installation, is only an
+ example. You should edit it to suite your needs. Typically it is
+ executed when the UNIX system boots.</p>
<p><c>run_erl</c> is a wrapper that provides logging of output from
the run-time system to file. It also provides a simple mechanism
for attaching to the Erlang shell (<c>to_erl</c>).</p>
@@ -218,7 +224,7 @@ os> <input>/usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
(<c>"/usr/local/erl-target"</c>), the releases directory
(<c>"/usr/local/erl-target/releases"</c>), and the location of
the <c>start_erl.data</c> file. It reads the run-time system
- version (<c>"5.1"</c>) and release version (<c>"FIRST"</c>) from
+ version (<c>"5.10.4"</c>) and release version (<c>"FIRST"</c>) from
the <c>start_erl.data</c> file, starts the run-time system of the
version found, and provides <c>-boot</c> flag specifying the boot
file of the release version found
@@ -245,7 +251,7 @@ os> <input>/usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
<c>target_system:create/1</c>. In fact, if you create, in the
current directory, not only the <c>mysystem.rel</c> file, but
also a <c>sys.config</c> file, that latter file will be tacitly
- put in the apropriate directory.</p>
+ put in the appropriate directory.</p>
</section>
<section>
@@ -258,6 +264,198 @@ os> <input>/usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
</section>
<section>
+ <title>Creating the Next Version</title>
+
+ <p>
+ In this example the <c>pea</c> application has been changed, and
+ so are <c>erts</c>, <c>kernel</c>, <c>stdlib</c> and
+ <c>sasl</c>.
+ </p>
+
+ <p>
+ <em>Step 1.</em> Create the <c>.rel</c> file:
+ </p>
+ <code type="none">
+%% mysystem2.rel
+{release,
+ {"MYSYSTEM", "SECOND"},
+ {erts, "6.0"},
+ [{kernel, "3.0"},
+ {stdlib, "2.0"},
+ {sasl, "2.4"},
+ {pea, "2.0"}]}.</code>
+ <p>
+ <em>Step 2.</em> Create the application upgrade file (see
+ <seealso marker="sasl:appup">appup(4)</seealso>) for <c>pea</c>,
+ for example:
+ </p>
+ <code type="none">
+%% pea.appup
+{"2.0",
+ [{"1.0",[{load_module,pea_lib}]}],
+ [{"1.0",[{load_module,pea_lib}]}]}.</code>
+ <p>
+ <em>Step 3.</em> From the directory where the
+ <c>mysystem2.rel</c> file reside, start the Erlang/OTP system:
+ </p>
+ <pre>
+os> <input>erl -pa /home/user/target_system/myapps/pea-2.0/ebin</input></pre>
+ <p>giving the path to the new version of <c>pea</c>. </p>
+
+ <p>
+ <em>Step 4.</em> Create the release upgrade file (see <seealso
+ marker="sasl:relup">relup(4)</seealso>):
+ </p>
+ <pre>
+1> <input>systools:make_relup("mysystem2",["mysystem"],["mysystem"],[{path,["/home/user/target_system/myapps/pea-1.0/ebin","/my/old/erlang/lib/*/ebin"]}]).</input></pre>
+ <p>
+ where <c>"mysystem"</c> is the base release and
+ <c>"mysystem2"</c> is the release to upgrade to.
+ </p>
+ <p>
+ Note that the <c>path</c> option is used for pointing out the
+ old version of all applications. (The new versions are already
+ in the code path - assuming of course that the erlang node on
+ which this is executed is running the correct version of
+ Erlang/OTP.)
+ </p>
+ <p>
+ <em>Step 5.</em> Create the new release:
+ </p>
+ <pre>
+2> <input>target_system:create("mysystem2").</input></pre>
+ <p>
+ Given that the <c>relup</c> file generated in step 4 above is
+ now located in the current directory, it will automatically be
+ included in the release package.
+ </p>
+ </section>
+
+ <section>
+ <title>Upgrading the Target System</title>
+ <p>
+ This part is done on the target node, and for this example we
+ want the node to be running as an embedded system with the
+ <c>-heart</c> option, allowing automatic restart of the
+ node. See <seealso marker="#start">Starting a Target
+ System</seealso> above for more information.
+ </p>
+ <p>
+ We add <c>-heart</c> to <c>bin/start</c>:
+ </p>
+ <code type="none">
+#!/bin/sh
+ROOTDIR=/usr/local/erl-target/
+
+if [ -z "$RELDIR" ]
+then
+ RELDIR=$ROOTDIR/releases
+fi
+
+START_ERL_DATA=${1:-$RELDIR/start_erl.data}
+
+$ROOTDIR/bin/run_erl -daemon /tmp/ $ROOTDIR/log "exec $ROOTDIR/bin/start_erl $ROOTDIR $RELDIR $START_ERL_DATA -heart</code>
+ <p>
+ And we use the simplest possible <c>sys.config</c>, which we
+ store in <c>releases/FIRST</c>:
+ </p>
+ <code type="none">
+%% sys.config
+[].</code>
+ <p>
+ Finally, in order to prepare the upgrade, we need to put the new
+ release package in the <c>releases</c> directory of the first
+ target system:
+ </p>
+ <pre>
+os> <input>cp mysystem2.tar.gz /usr/local/erl-target/releases</input></pre>
+ <p>
+ And assuming that the node has been started like this:
+ </p>
+ <pre>
+os> <input>/usr/local/erl-target/bin/start</input></pre>
+ <p>
+ it can be accessed like this:
+ </p>
+ <pre>
+os> <input>/usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.1</input></pre>
+ <p>
+ Also note that logs can be found in
+ <c>/usr/local/erl-target/log</c>. This directory is specified as
+ an argument to <c>run_erl</c>in the start script listed above.
+ </p>
+ <p>
+ <em>Step 1.</em> Unpack the release:
+ </p>
+ <pre>
+1> <input>{ok,Vsn} = release_handler:unpack_release("mysystem2").</input></pre>
+ <p>
+ <em>Step 2.</em> Install the release:
+ </p>
+ <pre>
+2> <input>release_handler:install_release(Vsn).</input>
+<output>{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>
+ <p>
+ The above return value and output after the call to
+ <c>release_handler:install_release/1</c> means that the
+ <c>release_handler</c> has restarted the node by using
+ <c>heart</c>. This will always be done when the upgrade involves
+ a change of <c>erts</c>, <c>kernel</c>, <c>stdlib</c> or
+ <c>sasl</c>. See <seealso marker="upgrade">Upgrade when
+ Erlang/OTP has Changed</seealso> for more infomation about this.
+ </p>
+ <p>
+ The node will be accessible via a new pipe:
+ </p>
+ <pre>
+os> <input>/usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.2</input></pre>
+ <p>
+ Let's see which releases we have in our system:
+ </p>
+ <pre>
+1> <input>release_handler:which_releases().</input>
+<output>[{"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>
+ <p>
+ Our new release, "SECOND", is now the current release, but we
+ can also see that our "FIRST" release is still permanent. This
+ means that if the node would be restarted at this point, it
+ would come up running the "FIRST" release again.
+ </p>
+ <p>
+ <em>Step 3.</em> Make the new release permanent:
+ </p>
+ <pre>
+2> <input>release_handler:make_permanent("SECOND").</input></pre>
+
+ <p>
+ Now look at the releases again:
+ </p>
+
+ <pre>
+3> <input>release_handler:which_releases().</input>
+<output>[{"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>
+
+ <p>
+ Here we see that the new release version is <c>permanent</c>, so
+ it would be safe to restart the node.
+ </p>
+
+ </section>
+
+ <section>
<title>Listing of target_system.erl</title>
<p>This module can also be found in the <c>examples</c> directory
of the <c>sasl</c> application.</p>
diff --git a/system/doc/system_principles/error_logging.xml b/system/doc/system_principles/error_logging.xml
index 3cb290227e..80d5211323 100644
--- a/system/doc/system_principles/error_logging.xml
+++ b/system/doc/system_principles/error_logging.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2003</year><year>2009</year>
+ <year>2003</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/system_principles/part.xml b/system/doc/system_principles/part.xml
index 94bb29be57..d05c89fde8 100644
--- a/system/doc/system_principles/part.xml
+++ b/system/doc/system_principles/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -31,5 +31,6 @@
<xi:include href="system_principles.xml"/>
<xi:include href="error_logging.xml"/>
<xi:include href="create_target.xml"/>
+ <xi:include href="upgrade.xml"/>
+ <xi:include href="versions.xml"/>
</part>
-
diff --git a/system/doc/system_principles/system_principles.xml b/system/doc/system_principles/system_principles.xml
index 42db8ede03..79ed86cd9f 100644
--- a/system/doc/system_principles/system_principles.xml
+++ b/system/doc/system_principles/system_principles.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -34,13 +34,12 @@
<p>An Erlang runtime system is started with the command <c>erl</c>:</p>
<pre>
% <input>erl</input>
-Erlang (BEAM) emulator version 5.2.3.5 [hipe] [threads:0]
+Erlang/OTP 17 [erts-6.0] [hipe] [smp:8:8]
-Eshell V5.2.3.5 (abort with ^G)
+Eshell V6.0 (abort with ^G)
1> </pre>
<p><c>erl</c> understands a number of command line arguments, see
- <c>erl(1)</c>. A number of them are also described in this
- chapter.</p>
+ <c>erl(1)</c>. A number of them are also described in this chapter.</p>
<p>Application programs can access the values of the command line
arguments by calling one of the functions
<c>init:get_argument(Key)</c>, or <c>init:get_arguments()</c>.
@@ -110,7 +109,7 @@ init:stop()</pre>
<p>Loads the code for and starts the applications Kernel and
STDLIB, skips loading the <c>.erlang</c> file.
Useful for scripts and other tools that should be behave the
- same irregardless of user preferences.
+ same regardless of user preferences.
</p>
</item>
</taglist>
diff --git a/system/doc/system_principles/upgrade.xml b/system/doc/system_principles/upgrade.xml
new file mode 100644
index 0000000000..68e48da0b8
--- /dev/null
+++ b/system/doc/system_principles/upgrade.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Upgrade when Erlang/OTP has Changed</title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2014-02-19</date>
+ <rev></rev>
+ <file>upgrade.xml</file>
+ </header>
+
+ <section>
+ <title>Introduction</title>
+ <p>
+ As of Erlang/OTP 17, most applications deliver a valid
+ application upgrade (<c>appup</c>) file. In earlier releases, a
+ majority of the applications in Erlang/OTP did not support
+ upgrade at all. Many of the applications use the
+ <c>restart_application</c> instruction. These are applications
+ for which it is not crucial to support real soft upgrade, for
+ instance tools and library applications. The
+ <c>restart_application</c> instruction
+ ensures that all modules in the application are reloaded and
+ thereby running the new code.
+ </p>
+ </section>
+
+ <section>
+ <title>Upgrade of core applications</title>
+ <p>
+ The core applications ERTS, Kernel, STDLIB
+ and SASL never allow real soft upgrade, but require the
+ Erlang emulator to be restarted. This is indicated to the
+ <c>release_handler</c> by the upgrade instruction
+ <c>restart_new_emulator</c>. This instruction will always be the
+ very first instruction executed, and it will restart the
+ emulator with the new versions of the above mentioned core
+ applications and the old versions of all other
+ applications. When the node is back up all other upgrade instructions are
+ executed, making sure each application is finally running its
+ new version.
+ </p>
+
+ <p>
+ It might seem strange to do a two-step upgrade instead of
+ just restarting the emulator with the new version of all
+ applications. The reason for this design decision is to allow
+ <c>code_change</c> functions to have side effects, for example changing
+ data on disk. It also makes sure that the upgrade mechanism for
+ non-core applications does not differ depending on whether or not
+ core applications are changed at the same time.
+ </p>
+
+ <p>
+ If, however, the more brutal variant is preferred, it is
+ possible to handwrite the release upgrade file using only the
+ single upgrade instruction <c>restart_emulator</c>. This
+ instruction, in contrast to <c>restart_new_emulator</c>, will
+ cause the emulator to restart with the new versions of
+ <em>all</em> applications.
+ </p>
+
+ <p>
+ <em>Note</em> that if other instructions are included before
+ <c>restart_emulator</c> in the handwritten <c>relup</c> file,
+ they will be executed in the old emulator. This is a big risk
+ since there is no guarantee that new beam code can be loaded
+ into the old emulator. Adding instructions after
+ <c>restart_emulator</c> has no effect as the
+ <c>release_handler</c> will not do any attempt at executing
+ them.
+ </p>
+
+ <p>
+ See <seealso marker="sasl:relup">relup(4)</seealso> for
+ information about the release upgrade file, and <seealso
+ marker="sasl:appup">appup(4)</seealso> for further information
+ about upgrade instructions.
+ </p>
+ </section>
+
+ <section>
+ <title>Applications that still do not allow code upgrade</title>
+ <p>
+ A few applications, for instance HiPE do not support
+ upgrade at all. This is indicated by an application upgrade file
+ containing only <c>{Vsn,[],[]}</c>. Any attempt at creating a release
+ upgrade file with such input will fail.
+ The only way to force an upgrade involving applications like this is to
+ handwrite the <c>relup</c> file, preferably as described above
+ with only the <c>restart_emulator</c> instruction.
+ </p>
+
+ </section>
+</chapter>
diff --git a/system/doc/system_principles/versions.xml b/system/doc/system_principles/versions.xml
new file mode 100644
index 0000000000..ed6fd1f7fe
--- /dev/null
+++ b/system/doc/system_principles/versions.xml
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Versions</title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2014-02-19</date>
+ <rev></rev>
+ <file>versions.xml</file>
+ </header>
+ <section><title>OTP Version</title>
+ <p>As of OTP release 17, the OTP release number corresponds to
+ the major part of the OTP version. The OTP version as a concept was
+ introduced in OTP 17. The <seealso marker="#version_scheme">version
+ scheme</seealso> used is described in more detail below.</p>
+
+ <p>OTP of a specific version is a set of applications of specific
+ versions. The application versions identified by an OTP version
+ corresponds to application versions that have been tested together
+ by the Erlang/OTP team at Ericsson AB. An OTP system can however be
+ put together with applications from different OTP versions. Such a
+ combination of application versions has not been tested by the
+ Erlang/OTP team. It is therefore <em>always preferred to use OTP
+ applications from one single OTP version</em>.</p>
+
+ <p>Release candidates have an <c>-rc&lt;N&gt;</c>
+ suffix. The suffix <c>-rc0</c> will be used during development up to
+ the first release candidate.</p>
+
+ <section><title>Retrieving Current OTP Version</title>
+ <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>
+ <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>
+ <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
+ <seealso marker="../installation_guide/OTP-PATCH-APPLY"><c>otp_patch_apply</c></seealso>
+ tool. In this case, the system consists of application
+ versions from multiple OTP versions. The version preceding the <c>**</c>
+ suffix corresponds to the OTP version of the base system that
+ has been patched. Note that if a development system is updated by
+ other means than <c>otp_patch_apply</c>, the <c>OTP_VERSION</c> file
+ may identify an incorrect OTP version.</p>
+
+ <p>No <c>OTP_VERSION</c> file will be placed in a
+ <seealso marker="create_target">target system</seealso> created
+ by OTP tools. This since one easily can create a target system
+ where it is hard to even determine the base OTP version. You may,
+ however, place such a file there yourself if you know the OTP
+ version.</p>
+ </section>
+
+ <section><title>OTP Versions Table</title>
+ <p>The text file <c>&lt;OTP source root&gt;/otp_versions.table</c> that
+ is part of the source code contains information about all OTP versions
+ from OTP 17.0 up to current OTP version. Each line contains information
+ about application versions that are part of a specific OTP version, and
+ is on the format:</p>
+<pre>
+&lt;OtpVersion&gt; : &lt;ChangedAppVersions&gt; # &lt;UnchangedAppVersions&gt; :
+</pre>
+ <p><c>&lt;OtpVersion&gt;</c> is on the format <c>OTP-&lt;VSN&gt;</c>, i.e.,
+ the same as the git tag used to identify the source.
+ <c>&lt;ChangedAppVersions&gt;</c> and <c>&lt;UnchangedAppVersions&gt;</c>
+ are space separated lists of application versions on the
+ format <c>&lt;application&gt;-&lt;vsn&gt;</c>.
+ <c>&lt;ChangedAppVersions&gt;</c> corresponds to changed applications
+ with new version numbers in this OTP version, and
+ <c>&lt;UnchangedAppVersions&gt;</c> corresponds to unchanged application
+ versions in this OTP version. Both of them might be empty, although
+ not at the same time. If &lt;ChangedAppVersions&gt; is empty, no changes
+ has been made that change the build result of any application. This could
+ for example be a pure bug fix of the build system. The order of lines
+ is undefined. All white space characters in this file are either space
+ (character 32) or line-break (character 10).</p>
+ <p>Using ordinary UNIX tools like <c>sed</c> and <c>grep</c> one
+ can easily find answers to various questions like:</p>
+ <taglist>
+ <tag>Which OTP versions are <c>kernel-3.0</c> part of?</tag>
+ <item><p><c> $ grep ' kernel-3\.0 ' otp_versions.table</c></p></item>
+ <tag>In which OTP version was <c>kernel-3.0</c> introduced?</tag>
+ <item><p><c> $ sed 's/#.*//;/ kernel-3\.0 /!d' otp_versions.table</c></p></item>
+ </taglist>
+ <p>The above commands give a bit more information than the exact answers,
+ but adequate information when manually searching for answers to these
+ questions.</p>
+ <warning><p>The format of the <c>otp_versions.table</c> might be subject
+ to changes during the OTP 17 release.</p></warning>
+ </section>
+ </section>
+
+ <section><title>Application Version</title>
+ <p>As of OTP 17.0 application versions will use the same
+ <seealso marker="#version_scheme">version scheme</seealso> as the
+ OTP version. Application versions part of a release candidate will
+ however not have an <c>-rc&lt;N&gt;</c> suffix as the OTP version.
+ Also note that a major increment in an application version does not
+ necessarily imply a major increment of the OTP version. This depends
+ on whether the major change in the application is considered as a
+ major change for OTP as a whole or not.</p>
+ </section>
+
+ <marker id="version_scheme"/>
+ <section><title>Version Scheme</title>
+ <note>Note that the version scheme was changed as of OTP 17.0. This implies
+ that application versions used prior to OTP 17.0 do not adhere to this
+ version scheme. <seealso marker="#otp_17_0_app_versions">A list of
+ application versions used in OTP 17.0</seealso> can be found
+ at the end of this document.</note>
+
+ <p>In the normal case, a version will be constructed as
+ <c>&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt;</c> where <c>&lt;Major&gt;</c>
+ is the most significant part. However, more dot separated parts than
+ this may exist. The dot separated parts consists of non-negative integers.
+ If all parts less significant than <c>&lt;Minor&gt;</c> equals <c>0</c>,
+ they are omitted. The three normal parts
+ <c>&lt;Major&gt;.&lt;Minor&gt;.&lt;Patch&gt;</c> will be changed as
+ follows:</p>
+ <taglist>
+ <tag><c>&lt;Major&gt;</c></tag><item>Increased when major changes,
+ including incompatibilities, have been made.</item>
+ <tag><c>&lt;Minor&gt;</c></tag><item>Increased when new functionality
+ has been added.</item>
+ <tag><c>&lt;Patch&gt;</c></tag><item>Increased when pure bug fixes
+ have been made.</item>
+ </taglist>
+ <p>When a part in the version number is increased, all less significant
+ parts are set to <c>0</c>.</p>
+
+ <p>An application version or an OTP version identifies source code
+ versions. That is, it does not imply anything about how the application
+ or OTP has been built.</p>
+
+ <section><title>Order of Versions</title>
+ <p>Version numbers in general are only partially ordered. However,
+ normal version numbers (with three parts) as of OTP 17.0 have a total
+ or linear order. This applies both to normal OTP versions and
+ normal application versions.</p>
+
+ <p>When comparing two version numbers that have an order, one
+ compare each part as ordinary integers from the most
+ significant part towards less significant parts. The order is
+ defined by the first parts of the same significance that
+ differ. An OTP version with a larger version include all
+ changes that that are part of a smaller OTP version. The same
+ goes for application versions.</p>
+
+ <p>In the general case, versions may have more than three parts. In
+ this case the versions are only partially ordered. Note that such
+ versions are only used in exceptional cases. When an extra
+ part (out of the normal three parts) is added to a version number,
+ a new branch of versions is made. The new branch has a linear
+ order against the base version. However, versions on different
+ branches have no order. Since they have no order, we
+ only know that they all include what is included in their
+ closest common ancestor. When branching multiple times from the
+ same base version, <c>0</c> parts are added between the base
+ version and the least significant <c>1</c> part until a unique
+ version is found. Versions that have an order can be compared
+ as described in the paragraph above.</p>
+
+ <p>An example of branched versions: The version <c>6.0.2.1</c>
+ is a branched version from the base version <c>6.0.2</c>.
+ Versions on the form <c>6.0.2.&lt;X&gt;</c> can be compared
+ with normal versions smaller than or equal to <c>6.0.2</c>,
+ and other versions on the form <c>6.0.2.&lt;X&gt;</c>. The
+ version <c>6.0.2.1</c> will include all changes in
+ <c>6.0.2</c>. However, <c>6.0.3</c> will most likely
+ <em>not</em> include all changes in <c>6.0.2.1</c> (note that
+ these versions have no order). A second branched version from the base
+ version <c>6.0.2</c> will be version <c>6.0.2.0.1</c>, and a
+ third branched version will be <c>6.0.2.0.0.1</c>.</p>
+ </section>
+ </section>
+
+ <marker id="otp_17_0_app_versions"/>
+ <section><title>OTP 17.0 Application Versions</title>
+ <p>The following application versions were part of OTP 17.0. If
+ the normal part of an applications version number compares
+ as smaller than the corresponding application version in this list,
+ the version number does not adhere to the version scheme introduced
+ in OTP 17.0 and should be considered as not having an order against
+ versions used as of OTP 17.0.</p>
+ <list>
+ <item><c>asn1-3.0</c></item>
+ <item><c>common_test-1.8</c></item>
+ <item><c>compiler-5.0</c></item>
+ <item><c>cosEvent-2.1.15</c></item>
+ <item><c>cosEventDomain-1.1.14</c></item>
+ <item><c>cosFileTransfer-1.1.16</c></item>
+ <item><c>cosNotification-1.1.21</c></item>
+ <item><c>cosProperty-1.1.17</c></item>
+ <item><c>cosTime-1.1.14</c></item>
+ <item><c>cosTransactions-1.2.14</c></item>
+ <item><c>crypto-3.3</c></item>
+ <item><c>debugger-4.0</c></item>
+ <item><c>dialyzer-2.7</c></item>
+ <item><c>diameter-1.6</c></item>
+ <item><c>edoc-0.7.13</c></item>
+ <item><c>eldap-1.0.3</c></item>
+ <item><c>erl_docgen-0.3.5</c></item>
+ <item><c>erl_interface-3.7.16</c></item>
+ <item><c>erts-6.0</c></item>
+ <item><c>et-1.5</c></item>
+ <item><c>eunit-2.2.7</c></item>
+ <item><c>gs-1.5.16</c></item>
+ <item><c>hipe-3.10.3</c></item>
+ <item><c>ic-4.3.5</c></item>
+ <item><c>inets-5.10</c></item>
+ <item><c>jinterface-1.5.9</c></item>
+ <item><c>kernel-3.0</c></item>
+ <item><c>megaco-3.17.1</c></item>
+ <item><c>mnesia-4.12</c></item>
+ <item><c>observer-2.0</c></item>
+ <item><c>odbc-2.10.20</c></item>
+ <item><c>orber-3.6.27</c></item>
+ <item><c>os_mon-2.2.15</c></item>
+ <item><c>ose-1.0</c></item>
+ <item><c>otp_mibs-1.0.9</c></item>
+ <item><c>parsetools-2.0.11</c></item>
+ <item><c>percept-0.8.9</c></item>
+ <item><c>public_key-0.22</c></item>
+ <item><c>reltool-0.6.5</c></item>
+ <item><c>runtime_tools-1.8.14</c></item>
+ <item><c>sasl-2.4</c></item>
+ <item><c>snmp-4.25.1</c></item>
+ <item><c>ssh-3.0.1</c></item>
+ <item><c>ssl-5.3.4</c></item>
+ <item><c>stdlib-2.0</c></item>
+ <item><c>syntax_tools-1.6.14</c></item>
+ <item><c>test_server-3.7</c></item>
+ <item><c>tools-2.6.14</c></item>
+ <item><c>typer-0.9.6</c></item>
+ <item><c>webtool-0.8.10</c></item>
+ <item><c>wx-1.2</c></item>
+ <item><c>xmerl-1.3.7</c></item>
+ </list>
+ </section>
+</chapter>
+
diff --git a/system/doc/system_principles/xmlfiles.mk b/system/doc/system_principles/xmlfiles.mk
index 4cbc00ed52..c60ffbad28 100644
--- a/system/doc/system_principles/xmlfiles.mk
+++ b/system/doc/system_principles/xmlfiles.mk
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009. All Rights Reserved.
+# Copyright Ericsson AB 2009-2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -19,4 +19,6 @@
SYSTEM_PRINCIPLES_CHAPTER_FILES = \
system_principles.xml \
error_logging.xml \
- create_target.xml
+ create_target.xml \
+ upgrade.xml \
+ versions.xml
diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile
index 20ef9fe781..319f08f010 100644
--- a/system/doc/top/Makefile
+++ b/system/doc/top/Makefile
@@ -114,7 +114,7 @@ $(INDEX_SCRIPT): $(INDEX_SRC)
$(ERLC) -o$(EBIN) +warn_unused_vars $<
# We don't list toc_*.html as targets because we don't know
-$(HTMLDIR)/index.html + $(HTMLDIR)/applications.html: $(INDEX_SCRIPT)
+$(HTMLDIR)/index.html + $(HTMLDIR)/applications.html: $(INDEX_SCRIPT) $(TEMPLATES)
echo "Generating index $@"
# Check if we are building the index from source or an installed release
if test "$$RELEASE_ROOT" = "" ; then \
@@ -198,7 +198,7 @@ $(GLOSSARY): $(GLOSSARY_SCRIPT)
#--------------------------------------------------------------------------
-PR.template: PR.template.src $(ERL_TOP)/erts/vsn.mk
+PR.template: PR.template.src $(ERL_TOP)/make/$(TARGET)/otp.mk
sed -e 's;%VSN%;$(VSN);' \
-e 's;%SYSTEM_VSN%;$(SYSTEM_VSN);' \
$< > $@
diff --git a/system/doc/top/book.xml b/system/doc/top/book.xml
index 96f39b0b83..600f87e0ae 100644
--- a/system/doc/top/book.xml
+++ b/system/doc/top/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/top/templates/index.html.src b/system/doc/top/templates/index.html.src
index a176bc9a14..7acdadbf8a 100644
--- a/system/doc/top/templates/index.html.src
+++ b/system/doc/top/templates/index.html.src
@@ -2,7 +2,7 @@
<!--
%CopyrightBegin%
-Copyright Ericsson AB 2009-2013. All Rights Reserved.
+Copyright Ericsson AB 2009-2014. All Rights Reserved.
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
@@ -104,10 +104,16 @@ In addition to the documentation here Erlang is described in several recent book
</p>
<ul>
<li>
+<a href="http://shop.oreilly.com/product/0636920025818.do">"Introducing Erlang"</a> from O'Reilly.
+</li>
+<li>
+<a href="http://www.nostarch.com/erlang">"Learn You Some Erlang for Great Good!"</a> from nostarch.
+</li>
+<li>
<a href="http://oreilly.com/catalog/9780596518189">"Erlang Programming"</a> from O'Reilly.
</li>
<li>
-<a href="http://www.pragprog.com/titles/jaerlang">"Programming Erlang"</a> from Pragmatic.
+<a href="http://www.pragprog.com/book/jaerlang2/programming-erlang">"Programming Erlang"</a> from Pragmatic.
</li>
<li>
<a href="http://www.manning.com/logan">"Erlang and OTP in Action"</a> from Manning.
diff --git a/system/doc/tutorial/appendix.xmlsrc b/system/doc/tutorial/appendix.xmlsrc
index faa6319df2..418df30bc8 100644
--- a/system/doc/tutorial/appendix.xmlsrc
+++ b/system/doc/tutorial/appendix.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/book.xml b/system/doc/tutorial/book.xml
index 1273bbb865..57c2ac4373 100644
--- a/system/doc/tutorial/book.xml
+++ b/system/doc/tutorial/book.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book SYSTEM "book.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/c_port.xmlsrc b/system/doc/tutorial/c_port.xmlsrc
index b139fe0678..8579da8520 100644
--- a/system/doc/tutorial/c_port.xmlsrc
+++ b/system/doc/tutorial/c_port.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/c_portdriver.xmlsrc b/system/doc/tutorial/c_portdriver.xmlsrc
index 09a89f792a..2fd6fb0aac 100644
--- a/system/doc/tutorial/c_portdriver.xmlsrc
+++ b/system/doc/tutorial/c_portdriver.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2012</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,7 +35,7 @@
<section>
<title>Port Drivers</title>
- <p>A port driver is a linked in driver, that is accessible as a
+ <p>A port driver is a linked in driver that is accessible as a
port from an Erlang program. It is a shared library (SO in Unix,
DLL in Windows), with special entry points. The Erlang runtime
calls these entry points, when the driver is started and when
diff --git a/system/doc/tutorial/cnode.xmlsrc b/system/doc/tutorial/cnode.xmlsrc
index a5443104de..293406160f 100644
--- a/system/doc/tutorial/cnode.xmlsrc
+++ b/system/doc/tutorial/cnode.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/distribution.xml b/system/doc/tutorial/distribution.xml
index 54d352dd5a..6a0ea759c4 100644
--- a/system/doc/tutorial/distribution.xml
+++ b/system/doc/tutorial/distribution.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/erl_interface.xmlsrc b/system/doc/tutorial/erl_interface.xmlsrc
index 752eec1d3e..0c4c5a99c2 100644
--- a/system/doc/tutorial/erl_interface.xmlsrc
+++ b/system/doc/tutorial/erl_interface.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/example.xmlsrc b/system/doc/tutorial/example.xmlsrc
index 7ee2ef6ff3..f87eb217e9 100644
--- a/system/doc/tutorial/example.xmlsrc
+++ b/system/doc/tutorial/example.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/introduction.xml b/system/doc/tutorial/introduction.xml
index 0a761f77fb..ed86a00f76 100644
--- a/system/doc/tutorial/introduction.xml
+++ b/system/doc/tutorial/introduction.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/nif.xmlsrc b/system/doc/tutorial/nif.xmlsrc
index 79cef31160..8ddad60f74 100644
--- a/system/doc/tutorial/nif.xmlsrc
+++ b/system/doc/tutorial/nif.xmlsrc
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2011</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/overview.xml b/system/doc/tutorial/overview.xml
index b8a9b88a86..1fe1aad22b 100644
--- a/system/doc/tutorial/overview.xml
+++ b/system/doc/tutorial/overview.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/system/doc/tutorial/part.xml b/system/doc/tutorial/part.xml
index ff73b668c0..f33bd97e29 100644
--- a/system/doc/tutorial/part.xml
+++ b/system/doc/tutorial/part.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE part SYSTEM "part.dtd">
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2000</year><year>2010</year>
+ <year>2000</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/xcomp/README.md b/xcomp/README.md
index 768efc9c7d..d88fb89fd8 100644
--- a/xcomp/README.md
+++ b/xcomp/README.md
@@ -1,559 +1,7 @@
Cross Compiling Erlang/OTP
==========================
-Introduction
-------------
+See the [$ERL_TOP/HOWTO/INSTALL-CROSS.md][] documentation.
-This document describes how to cross compile Erlang/OTP-%OTP-REL%. Note that
-the support for cross compiling Erlang/OTP should be considered as
-experimental. As far as we know, the %OTP-REL% release should cross compile
-fine, but since we currently have a very limited set of cross compilation
-environments to test with we cannot be sure. The cross compilation support
-will remain in an experimental state until we get a lot more cross compilation
-environments to test with.
-You are advised to read the whole document before attempting to cross
-compile Erlang/OTP. However, before reading this document, you should read
-the [$ERL_TOP/INSTALL.md][] document which describes building and installing
-Erlang/OTP in general. `$ERL_TOP` is the top directory in the source tree.
-
-### otp\_build Versus configure/make ###
-
-Building Erlang/OTP can be done either by using the `$ERL_TOP/otp_build`
-script, or by invoking `$ERL_TOP/configure` and `make` directly. Building using
-`otp_build` is easier since it involves fewer steps, but the `otp_build` build
-procedure is not as flexible as the `configure`/`make` build procedure. Note
-that `otp_build configure` will produce a default configuration that differs
-from what `configure` will produce by default. For example, currently
-`--disable-dynamic-ssl-lib` is added to the `configure` command line arguments
-unless `--enable-dynamic-ssl-lib` has been explicitly passed. The binary
-releases that we deliver are built using `otp_build`. The defaults used by
-`otp_build configure` may change at any time without prior notice.
-
-### Cross Configuration ###
-
-The `$ERL_TOP/xcomp/erl-xcomp.conf.template` file contains all available cross
-configuration variables and can be used as a template when creating a cross
-compilation configuration. All [cross configuration variables][] are also
-listed at the end of this document. For examples of working cross
-configurations see the `$ERL_TOP/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf`
-file and the `$ERL_TOP/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf` file. If the
-default behavior of a variable is satisfactory, the variable does not need to
-be set. However, the `configure` script will issue a warning when a default
-value is used. When a variable has been set, no warning will be issued.
-
-A cross configuration file can be passed to `otp_build configure` using the
-`--xcomp-conf` command line argument. Note that `configure` does not accept
-this command line argument. When using the `configure` script directly, pass
-the configuration variables as arguments to `configure` using a
-`<VARIABLE>=<VALUE>` syntax. Variables can also be passed as environment
-variables to `configure`. However, if you pass the configuration in the
-environment, make sure to unset all of these environment variables before
-invoking `make`; otherwise, the environment variables might set make variables
-in some applications, or parts of some applications, and you may end up with
-an erroneously configured build.
-
-### What can be Cross Compiled? ###
-
-All Erlang/OTP applications except the `wx` application can be cross compiled.
-The build of the `wx` driver will currently be automatically disabled when
-cross compiling.
-
-### Compatibility ###
-
-The build system, including cross compilation configuration variables used,
-may be subject to non backward compatible changes without prior notice.
-Current cross build system has been tested when cross compiling some Linux/GNU
-systems, but has only been partly tested for more esoteric platforms. The
-VxWorks example file is highly dependent on our environment and is here more
-or less only for internal use.
-
-### Patches ###
-
-Please submit any patches for cross compiling in a way consistent with this
-system. All input is welcome as we have a very limited set of cross compiling
-environments to test with. If a new configuration variable is needed, add it
-to `$ERL_TOP/xcomp/erl-xcomp.conf.template`, and use it in `configure.in`.
-Other files that might need to be updated are:
-
-- `$ERL_TOP/xcomp/erl-xcomp-vars.sh`
-- `$ERL_TOP/erl-build-tool-vars.sh`
-- `$ERL_TOP/erts/aclocal.m4`
-- `$ERL_TOP/xcomp/README.md`
-- `$ERL_TOP/xcomp/erl-xcomp-*.conf`
-
-Note that this might be an incomplete list of files that need to be updated.
-
-General information on how to submit patches can be found at:
- <http://wiki.github.com/erlang/otp/submitting-patches>
-
-Build and Install Procedure
----------------------------
-
-If you are building in Git, you want to read the [Building in Git][] section
-of [$ERL_TOP/INSTALL.md][] before proceeding.
-
-We will first go through the `configure`/`make` build procedure which people
-probably are most familiar with.
-
-### Building With configure/make Directly ###
-
- (1)
-
-Change directory into the top directory of the Erlang/OTP source tree.
-
- $ cd $ERL_TOP
-
-In order to compile Erlang code, a small Erlang bootstrap system has to be
-built, or an Erlang/OTP system of the same release as the one being built
-has to be provided in the `$PATH`. The Erlang/OTP for the target system will
-be built using this Erlang system, together with the cross compilation tools
-provided.
-
-If you want to build the documentation out of the same source tree as you are
-cross compiling in, you currently need a full Erlang/OTP system of the same
-release as the one being built for the build machine. If this is the case,
-build and install one for the build machine (or use one already built) and add
-it to the `$PATH` before cross building, and building the documentation. See
-the [How to Build the Documentation][] section in the [$ERL_TOP/INSTALL.md][]
-document for information on how to build the documentation.
-
-If you want to build using a compatible Erlang/OTP system in the `$PATH`,
-jump to (3).
-
-#### Building a Bootstrap System ####
-
- (2)
-
- $ ./configure --enable-bootstrap-only
- $ make
-
-The `--enable-bootstrap-only` argument to `configure` isn't strictly necessary,
-but will speed things up. It will only run `configure` in applications
-necessary for the bootstrap, and will disable a lot of things not needed by
-the bootstrap system. If you run `configure` without `--enable-boostrap-only`
-you also have to run make as `make bootstrap`; otherwise, the whole system will
-be built.
-
-#### Cross Building the System ####
-
- (3)
-
- $ ./configure --host=<HOST> --build=<BUILD> [Other Config Args]
- $ make
-
-`<HOST>` is the host/target system that you build for. It does not have to be
-a full `CPU-VENDOR-OS` triplet, but can be. The full `CPU-VENDOR-OS` triplet
-will be created by executing `$ERL_TOP/erts/autoconf/config.sub <HOST>`. If
-`config.sub` fails, you need to be more specific.
-
-`<BUILD>` should equal the `CPU-VENDOR-OS` triplet of the system that you
-build on. If you execute `$ERL_TOP/erts/autoconf/config.guess`, it will in
-most cases print the triplet you want to use for this.
-
-Pass the cross compilation variables as command line arguments to `configure`
-using a `<VARIABLE>=<VALUE>` syntax.
-
-> *NOTE*: You can *not* pass a configuration file using the `--xcomp-conf`
-> argument when you invoke `configure` directly. The `--xcomp-conf` argument
-> can only be passed to `otp_build configure`.
-
-`make` will verify that the Erlang/OTP system used when building is of the
-same release as the system being built, and will fail if this is not the case.
-It is possible, however not recommended, to force the cross compilation even
-though the wrong Erlang/OTP system is used. This by invoking `make` like this:
-`make ERL_XCOMP_FORCE_DIFFERENT_OTP=yes`.
-
-> *WARNING*: Invoking `make ERL_XCOMP_FORCE_DIFFERENT_OTP=yes` might fail,
-> silently produce suboptimal code, or silently produce erroneous code.
-
-#### Installing ####
-
-You can either install using the installation paths determined by `configure`
-(4), or install manually using (5).
-
-##### Installing Using Paths Determined by configure #####
-
- (4)
-
- $ make install DESTDIR=<TEMPORARY_PREFIX>
-
-`make install` will install at a location specified when doing `configure`.
-`configure` arguments specifying where the installation should reside are for
-example: `--prefix`, `--exec-prefix`, `--libdir`, `--bindir`, etc. By default
-it will install under `/usr/local`. You typically do not want to install your
-cross build under `/usr/local` on your build machine. Using [DESTDIR][]
-will cause the installation paths to be prefixed by `$DESTDIR`. This makes it
-possible to install and package the installation on the build machine without
-having to place the installation in the same directory on the build machine as
-it should be executed from on the target machine.
-
-When `make install` has finished, change directory into `$DESTDIR`, package
-the system, move it to the target machine, and unpack it. Note that the
-installation will only be working on the target machine at the location
-determined by `configure`.
-
-##### Installing Manually #####
-
- (5)
-
- $ make release RELEASE_ROOT=<RELEASE_DIR>
-
-`make release` will copy what you have built for the target machine to
-`<RELEASE_DIR>`. The `Install` script will not be run. The content of
-`<RELEASE_DIR>` is what by default ends up in `/usr/local/lib/erlang`.
-
-The `Install` script used when installing Erlang/OTP requires common Unix
-tools such as `sed` to be present in your `$PATH`. If your target system
-does not have such tools, you need to run the `Install` script on your
-build machine before packaging Erlang/OTP. The `Install` script should
-currently be invoked as follows in the directory where it resides
-(the top directory):
-
- $ ./Install [-cross] [-minimal|-sasl] <ERL_ROOT>
-
-where:
-
-* `-minimal` Creates an installation that starts up a minimal amount
- of applications, i.e., only `kernel` and `stdlib` are started. The
- minimal system is normally enough, and is what `make install` uses.
-* `-sasl` Creates an installation that also starts up the `sasl`
- application.
-* `-cross` For cross compilation. Informs the install script that it
- is run on the build machine.
-* `<ERL_ROOT>` - The absolute path to the Erlang installation to use
- at run time. This is often the same as the current working directory,
- but does not have to be. It can follow any other path through the file
- system to the same directory.
-
-If neither `-minimal`, nor `-sasl` is passed as argument you will be
-prompted.
-
-You can now either do:
-
- (6)
-
-* Decide where the installation should be located on the target machine,
- run the `Install` script on the build machine, and package the installed
- installation. The installation just need to be unpacked at the right
- location on the target machine:
-
- $ cd <RELEASE_DIR>
- $ ./Install -cross [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
-
-or:
-
- (7)
-
-* Package the installation in `<RELEASE_DIR>`, place it wherever you want
- on your target machine, and run the `Install` script on your target
- machine:
-
- $ cd <ABSOLUTE_INSTALL_DIR_ON_TARGET>
- $ ./Install [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
-
-### Building With the otp\_build Script ###
-
- (8)
-
- $ cd $ERL_TOP
-
- (9)
-
- $ ./otp_build configure --xcomp-conf=<FILE> [Other Config Args]
-
-alternatively:
-
- $ ./otp_build configure --host=<HOST> --build=<BUILD> [Other Config Args]
-
-If you have your cross compilation configuration in a file, pass it using the
-`--xcomp-conf=<FILE>` command line argument. If not, pass `--host=<HOST>`,
-`--build=<BUILD>`, and the configuration variables using a `<VARIABLE>=<VALUE>`
-syntax on the command line (same as in (3)). Note that `<HOST>` and `<BUILD>`
-have to be passed one way or the other; either by using `erl_xcomp_host=<HOST>`
-and `erl_xcomp_build=<BUILD>` in the configuration file, or by using the
-`--host=<HOST>`, and `--build=<BUILD>` command line arguments.
-
-`otp_build configure` will configure both for the boostrap system on the
-build machine and the cross host system.
-
- (10)
-
- $ ./otp_build boot -a
-
-`otp_build boot -a` will first build a bootstrap system for the build machine
-and then do the cross build of the system.
-
- (11)
-
- $ ./otp_build release -a <RELEASE_DIR>
-
-`otp_build release -a` will do the same as (5), and you will after this have
-to do a manual install either by doing (6), or (7).
-
-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
-the tests as usual.
-
- $ make release_tests
-
-or
-
- $ ./otp_build tests
-
-The tests will be released into `$ERL_TOP/release/tests`. After releasing the
-tests you have to install the tests on the build machine. You supply the same
-xcomp file as to `./otp_build` in (9).
-
- $ cd $ERL_TOP/release/tests/test_server/
- $ $ERL_TOP/bootstrap/bin/erl -eval 'ts:install([{xcomp,"<FILE>"}])' -s ts compile_testcases -s init stop
-
-You should get a lot of printouts as the testcases are compiled. Once done you
-should copy the entire `$ERL_TOP/release/tests` folder to the cross host system.
-
-Then go to the cross host system and setup the erlang installed in (4) or (5)
-to be in your `$PATH`. Then go to what previously was
-`$ERL_TOP/release/tests/test_server` and issue the following command.
-
- $ erl -s ts install -s ts run all_tests -s init stop
-
-The configure should be skipped and all tests should hopefully pass. For more
-details about how to use ts run `erl -s ts help -s init stop`
-
-Currently Used Configuration Variables
---------------------------------------
-
-Note that you cannot define arbitrary variables in a cross compilation
-configuration file. Only the ones listed below will be guaranteed to be
-visible throughout the whole execution of all `configure` scripts. Other
-variables needs to be defined as arguments to `configure` or exported in
-the environment.
-
-### Variables for otp\_build Only ###
-
-Variables in this section are only used, when configuring Erlang/OTP for
-cross compilation using `$ERL_TOP/otp_build configure`.
-
-> *NOTE*: These variables currently have *no* effect if you configure using
-> the `configure` script directly.
-
-* `erl_xcomp_build` - The build system used. This value will be passed as
- `--build=$erl_xcomp_build` argument to the `configure` script. It does
- not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
- `CPU-VENDOR-OS` triplet will be created by
- `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`. If set to `guess`,
- the build system will be guessed using
- `$ERL_TOP/erts/autoconf/config.guess`.
-
-* `erl_xcomp_host` - Cross host/target system to build for. This value will
- be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
- It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
- full `CPU-VENDOR-OS` triplet will be created by
- `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`.
-
-* `erl_xcomp_configure_flags` - Extra configure flags to pass to the
- `configure` script.
-
-### Cross Compiler and Other Tools ###
-
-If the cross compilation tools are prefixed by `<HOST>-` you probably do
-not need to set these variables (where `<HOST>` is what has been passed as
-`--host=<HOST>` argument to `configure`).
-
-All variables in this section can also be used when native compiling.
-
-* `CC` - C compiler.
-
-* `CFLAGS` - C compiler flags.
-
-* `STATIC_CFLAGS` - Static C compiler flags.
-
-* `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
- search path for the shared libraries. Note that this actually is a
- linker flag, but it needs to be passed via the compiler.
-
-* `CPP` - C pre-processor.
-
-* `CPPFLAGS` - C pre-processor flags.
-
-* `CXX` - C++ compiler.
-
-* `CXXFLAGS` - C++ compiler flags.
-
-* `LD` - Linker.
-
-* `LDFLAGS` - Linker flags.
-
-* `LIBS` - Libraries.
-
-#### Dynamic Erlang Driver Linking ####
-
-> *NOTE*: Either set all or none of the `DED_LD*` variables.
-
-* `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
-
-* `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
-
-* `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
- search path for shared libraries when linking with `DED_LD`.
-
-#### Large File Support ####
-
-> *NOTE*: Either set all or none of the `LFS_*` variables.
-
-* `LFS_CFLAGS` - Large file support C compiler flags.
-
-* `LFS_LDFLAGS` - Large file support linker flags.
-
-* `LFS_LIBS` - Large file support libraries.
-
-#### Other Tools ####
-
-* `RANLIB` - `ranlib` archive index tool.
-
-* `AR` - `ar` archiving tool.
-
-* `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
- currently used for finding out large file support flags to use, and
- on Linux systems for finding out if we have an NPTL thread library or
- not.
-
-### Cross System Root Locations ###
-
-* `erl_xcomp_sysroot` - The absolute path to the system root of the cross
- compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
- `ssl` applications need the system root. These applications will be
- skipped if the system root has not been set. The system root might be
- needed for other things too. If this is the case and the system root
- has not been set, `configure` will fail and request you to set it.
-
-* `erl_xcomp_isysroot` - The absolute path to the system root for includes
- of the cross compilation environment. If not set, this value defaults
- to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
- root path is not the same as the system root path.
-
-### Optional Feature, and Bug Tests ###
-
-These tests cannot (always) be done automatically when cross compiling. You
-usually do not need to set these variables.
-
-> *WARNING*: Setting these variables wrong may cause hard to detect
-> runtime errors. If you need to change these values, *really* make sure
-> that the values are correct.
-
-> *NOTE*: Some of these values will override results of tests performed
-> by `configure`, and some will not be used until `configure` is sure that
-> it cannot figure the result out.
-
-The `configure` script will issue a warning when a default value is used.
-When a variable has been set, no warning will be issued.
-
-* `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`,
- the target system must have a working `__after_morecore_hook` that can be
- used for tracking used `malloc()` implementations core memory usage.
- This is currently only used by unsupported features.
-
-* `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
- must be big endian. If `no`, little endian. This can often be
- automatically detected, but not always. If not automatically detected,
- `configure` will fail unless this variable is set. Since no default
- value is used, `configure` will try to figure this out automatically.
-
-* `erl_xcomp_double_middle` - `yes|no`. Defaults to `no`.
- If `yes`, the target system must have doubles in "middle-endian" format. If
- `no`, it has "regular" endianness.
-
-* `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
- the target system must have a working `clock_gettime()` implementation
- that can be used for retrieving process CPU time.
-
-* `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
- system must have a working `getaddrinfo()` implementation that can
- handle both IPv4 and IPv6.
-
-* `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
- the target system must have a working `gethrvtime()` implementation and
- is used with procfs `ioctl()`.
-
-* `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
- target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
- that can be used on `brk` and `sbrk` symbols used by the `malloc()`
- implementation in use, and by this track the `malloc()` implementations
- core memory usage. This is currently only used by unsupported features.
-
-* `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target
- system must have a working `kqueue()` implementation that returns a file
- descriptor which can be used by `poll()` and/or `select()`. If `no` and
- the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
- feature will be disabled.
-
-* `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
- Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
- the target system must work. This variable is recommended to be set to
- `no` on Linux systems with kernel versions less than 2.6.
-
-* `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
- `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
- Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
- kernel versions typically less than 2.6).
-
-* `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
- otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
- system. `sigaltstack()` on Linux kernel versions less than 2.4 are
- broken.
-
-* `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
- the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
- LinuxThreads thread libraries (Linux kernel versions typically less than
- 2.2) used these signals and made them unusable by the ERTS.
-
-* `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
- `yes`. If `yes`, the target system must have a working `poll()`
- implementation that also can handle devices. If `no`, `select()` will be
- used instead of `poll()`.
-
-* `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
- system must have a `putenv()` implementation that stores a copy of the
- key/value pair.
-
-* `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
- system must have reliable floating point exceptions.
-
-Copyright and License
----------------------
-
-%CopyrightBegin%
-
-Copyright Ericsson AB 2009-2012. All Rights Reserved.
-
-The contents of this file are subject to the Erlang Public License,
-Version 1.1, (the "License"); you may not use this file except in
-compliance with the License. You should have received a copy of the
-Erlang Public License along with this software. If not, it can be
-retrieved online at http://www.erlang.org/.
-
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-the License for the specific language governing rights and limitations
-under the License.
-
-%CopyrightEnd%
-
-Modifying This Document
------------------------
-
-Before modifying this document you need to have a look at the
-`$ERL_TOP/README.md.txt` document.
-
-
-
- [$ERL_TOP/INSTALL.md]: INSTALL
- [Building in Git]: INSTALL#How-to-Build-and-Install-ErlangOTP_Building-in-Git
- [How to Build the Documentation]: INSTALL#The-ErlangOTP-Documentation_How-to-Build-the-Documentation
- [cross configuration variables]: #Currently-Used-Configuration-Variables
- [DESTDIR]: http://www.gnu.org/prep/standards/html_node/DESTDIR.html
-
- [?TOC]: true
+ [$ERL_TOP/HOWTO/INSTALL-CROSS.md]: ../HOWTO/INSTALL-CROSS.md
diff --git a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
index 84bf735ff2..fe0886ac8a 100644
--- a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
+++ b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
@@ -19,6 +19,7 @@
##
## File: erl-xcomp-TileraMDE2.0-tilepro.conf
## Author: Rickard Green
+## Tested on: TileraMDE-2.0, TileraMDE-3.0.1.125620
##
## -----------------------------------------------------------------------------
## When cross compiling Erlang/OTP using `otp_build', copy this file and set
diff --git a/xcomp/erl-xcomp-arm-android.conf b/xcomp/erl-xcomp-arm-android.conf
new file mode 100644
index 0000000000..4fd1f270d1
--- /dev/null
+++ b/xcomp/erl-xcomp-arm-android.conf
@@ -0,0 +1,264 @@
+## -*-shell-script-*-
+##
+## %CopyrightBegin%
+##
+## Copyright Ericsson AB 2009-2010. All Rights Reserved.
+##
+## The contents of this file are subject to the Erlang Public License,
+## Version 1.1, (the "License"); you may not use this file except in
+## compliance with the License. You should have received a copy of the
+## Erlang Public License along with this software. If not, it can be
+## retrieved online at http://www.erlang.org/.
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and limitations
+## under the License.
+##
+## %CopyrightEnd%
+##
+## File: erl-xcomp.conf.template
+## Author:
+##
+## -----------------------------------------------------------------------------
+## When cross compiling Erlang/OTP using `otp_build', copy this file and set
+## the variables needed below. Then pass the path to the copy of this file as
+## an argument to `otp_build' in the configure stage:
+## `otp_build configure --xcomp-conf=<FILE>'
+## -----------------------------------------------------------------------------
+
+## Note that you cannot define arbitrary variables in a cross compilation
+## configuration file. Only the ones listed below will be guaranteed to be
+## visible throughout the whole execution of all `configure' scripts. Other
+## variables needs to be defined as arguments to `configure' or exported in
+## the environment.
+
+## -- Variables for `otp_build' Only -------------------------------------------
+
+## Variables in this section are only used, when configuring Erlang/OTP for
+## cross compilation using `$ERL_TOP/otp_build configure'.
+
+## *NOTE*! These variables currently have *no* effect if you configure using
+## the `configure' script directly.
+
+# * `erl_xcomp_build' - The build system used. This value will be passed as
+# `--build=$erl_xcomp_build' argument to the `configure' script. It does
+# not have to be a full `CPU-VENDOR-OS' triplet, but can be. The full
+# `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'. If set to `guess',
+# the build system will be guessed using
+# `$ERL_TOP/erts/autoconf/config.guess'.
+erl_xcomp_build=guess
+
+# * `erl_xcomp_host' - Cross host/target system to build for. This value will
+# be passed as `--host=$erl_xcomp_host' argument to the `configure' script.
+# It does not have to be a full `CPU-VENDOR-OS' triplet, but can be. The
+# full `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'.
+erl_xcomp_host=arm-linux-androideabi
+
+# * `erl_xcomp_configure_flags' - Extra configure flags to pass to the
+# `configure' script.
+erl_xcomp_configure_flags="--disable-hipe --without-termcap"
+
+
+## -- Cross Compiler and Other Tools -------------------------------------------
+
+##
+##
+NDK_SYSROOT=$NDK_ROOT/platforms/$NDK_PLAT/arch-arm
+
+## If the cross compilation tools are prefixed by `<HOST>-' you probably do
+## not need to set these variables (where `<HOST>' is what has been passed as
+## `--host=<HOST>' argument to `configure').
+
+## All variables in this section can also be used when native compiling.
+
+# * `CC' - C compiler.
+CC="arm-linux-androideabi-gcc --sysroot=$NDK_SYSROOT"
+
+# * `CFLAGS' - C compiler flags.
+CFLAGS="-static -march=armv7-a -msoft-float -mthumb"
+
+# * `STATIC_CFLAGS' - Static C compiler flags.
+#STATIC_CFLAGS=
+
+# * `CFLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for the shared libraries. Note that this actually is a
+# linker flag, but it needs to be passed via the compiler.
+#CFLAG_RUNTIME_LIBRARY_PATH=
+
+# * `CPP' - C pre-processor.
+CPP="arm-linux-androideabi-cpp --sysroot=$NDK_SYSROOT"
+
+# * `CPPFLAGS' - C pre-processor flags.
+CPPFLAGS="-static -march=armv7-a -msoft-float -mthumb"
+
+# * `CXX' - C++ compiler.
+CXX="arm-linux-androideabi-c++ --sysroot=$NDK_SYSROOT"
+
+# * `CXXFLAGS' - C++ compiler flags.
+CXXFLAGS="-static -march=armv7-a -msoft-float -mthumb"
+
+# * `LD' - Linker.
+#LD=
+
+# * `LDFLAGS' - Linker flags.
+LDFLAGS="-static -march=armv7-a -msoft-float -mthumb"
+
+# * `LIBS' - Libraries.
+#LIBS=
+
+## -- *D*ynamic *E*rlang *D*river Linking --
+
+## *NOTE*! Either set all or none of the `DED_LD*' variables.
+
+# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
+#DED_LD=
+
+# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
+#DED_LDFLAGS=
+
+# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for shared libraries when linking with `DED_LD'.
+#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
+
+## -- Large File Support --
+
+## *NOTE*! Either set all or none of the `LFS_*' variables.
+
+# * `LFS_CFLAGS' - Large file support C compiler flags.
+#LFS_CFLAGS=
+
+# * `LFS_LDFLAGS' - Large file support linker flags.
+#LFS_LDFLAGS=
+
+# * `LFS_LIBS' - Large file support libraries.
+#LFS_LIBS=
+
+## -- Other Tools --
+
+# * `RANLIB' - `ranlib' archive index tool.
+#RANLIB=
+
+# * `AR' - `ar' archiving tool.
+#AR=
+
+# * `GETCONF' - `getconf' system configuration inspection tool. `getconf' is
+# currently used for finding out large file support flags to use, and
+# on Linux systems for finding out if we have an NPTL thread library or
+# not.
+#GETCONF=
+
+## -- Cross System Root Locations ----------------------------------------------
+
+# * `erl_xcomp_sysroot' - The absolute path to the system root of the cross
+# compilation environment. Currently, the `crypto', `odbc', `ssh' and
+# `ssl' applications need the system root. These applications will be
+# skipped if the system root has not been set. The system root might be
+# needed for other things too. If this is the case and the system root
+# has not been set, `configure' will fail and request you to set it.
+erl_xcomp_sysroot="$NDK_SYSROOT"
+
+
+# * `erl_xcomp_isysroot' - The absolute path to the system root for includes
+# of the cross compilation environment. If not set, this value defaults
+# to `$erl_xcomp_sysroot', i.e., only set this value if the include system
+# root path is not the same as the system root path.
+#erl_xcomp_isysroot=
+
+## -- Optional Feature, and Bug Tests ------------------------------------------
+
+## These tests cannot (always) be done automatically when cross compiling. You
+## usually do not need to set these variables. Only set these if you really
+## know what you are doing.
+
+## Note that some of these values will override results of tests performed
+## by `configure', and some will not be used until `configure' is sure that
+## it cannot figure the result out.
+
+## The `configure' script will issue a warning when a default value is used.
+## When a variable has been set, no warning will be issued.
+
+# * `erl_xcomp_after_morecore_hook' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `__after_morecore_hook' that can be
+# used for tracking used `malloc()' implementations core memory usage.
+# This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
+
+# * `erl_xcomp_bigendian' - `yes|no'. No default. If `yes', the target system
+# must be big endian. If `no', little endian. This can often be
+# automatically detected, but not always. If not automatically detected,
+# `configure' will fail unless this variable is set. Since no default
+# value is used, `configure' will try to figure this out automatically.
+#erl_xcomp_bigendian=
+
+# * `erl_xcomp_clock_gettime_cpu_time' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `clock_gettime()' implementation
+# that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
+
+# * `erl_xcomp_getaddrinfo' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `getaddrinfo()' implementation that can
+# handle both IPv4 and IPv6.
+#erl_xcomp_getaddrinfo=
+
+# * `erl_xcomp_gethrvtime_procfs_ioctl' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `gethrvtime()' implementation and
+# is used with procfs `ioctl()'.
+#erl_xcomp_gethrvtime_procfs_ioctl=
+
+# * `erl_xcomp_dlsym_brk_wrappers' - `yes|no'. Defaults to `no'. If `yes', the
+# target system must have a working `dlsym(RTLD_NEXT, <S>)' implementation
+# that can be used on `brk' and `sbrk' symbols used by the `malloc()'
+# implementation in use, and by this track the `malloc()' implementations
+# core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
+
+# * `erl_xcomp_kqueue' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `kqueue()' implementation that returns a file
+# descriptor which can be used by `poll()' and/or `select()'. If `no' and
+# the target system has not got `epoll()' or `/dev/poll', the kernel-poll
+# feature will be disabled.
+#erl_xcomp_kqueue=
+
+# * `erl_xcomp_linux_clock_gettime_correction' - `yes|no'. Defaults to `yes' on
+# Linux; otherwise, `no'. If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on
+# the target system must work. This variable is recommended to be set to
+# `no' on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
+
+# * `erl_xcomp_linux_nptl' - `yes|no'. Defaults to `yes' on Linux; otherwise,
+# `no'. If `yes', the target system must have NPTL (Native POSIX Thread
+# Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+# kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
+
+# * `erl_xcomp_linux_usable_sigaltstack' - `yes|no'. Defaults to `yes' on Linux;
+# otherwise, `no'. If `yes', `sigaltstack()' must be usable on the target
+# system. `sigaltstack()' on Linux kernel versions less than 2.4 are
+# broken.
+#erl_xcomp_linux_usable_sigaltstack=
+
+# * `erl_xcomp_linux_usable_sigusrx' - `yes|no'. Defaults to `yes'. If `yes',
+# the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS. Old
+# LinuxThreads thread libraries (Linux kernel versions typically less than
+# 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
+
+# * `erl_xcomp_poll' - `yes|no'. Defaults to `no' on Darwin/MacOSX; otherwise,
+# `yes'. If `yes', the target system must have a working `poll()'
+# implementation that also can handle devices. If `no', `select()' will be
+# used instead of `poll()'.
+#erl_xcomp_poll=
+
+# * `erl_xcomp_putenv_copy' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a `putenv()' implementation that stores a copy of the
+# key/value pair.
+#erl_xcomp_putenv_copy=
+
+# * `erl_xcomp_reliable_fpe' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
+
+## -----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp-arm-linux.conf b/xcomp/erl-xcomp-arm-linux.conf
index 76912d25e0..6656c1a1aa 100644
--- a/xcomp/erl-xcomp-arm-linux.conf
+++ b/xcomp/erl-xcomp-arm-linux.conf
@@ -74,7 +74,8 @@ erl_xcomp_configure_flags="--disable-hipe"
CC="arm-wrs-linux-gnueabi-gcc --sysroot=$ARM_SYSROOT"
# * `CFLAGS' - C compiler flags.
-#CFLAGS="-O@OPT_LEVEL@ -DSMALL_MEMORY"
+CFLAGS="-O2 -DSMALL_MEMORY --sysroot=$ARM_SYSROOT -Wall -g"
+
# * `STATIC_CFLAGS' - Static C compiler flags.
#STATIC_CFLAGS=
@@ -87,19 +88,19 @@ CC="arm-wrs-linux-gnueabi-gcc --sysroot=$ARM_SYSROOT"
CPP="arm-wrs-linux-gnueabi-cpp --sysroot=$ARM_SYSROOT"
# * `CPPFLAGS' - C pre-processor flags.
-#CPPFLAGS="--sysroot=$ARM_SYSROOT"
+CPPFLAGS="--sysroot=$ARM_SYSROOT"
# * `CXX' - C++ compiler.
CXX="arm-wrs-linux-gnueabi-c++ --sysroot=$ARM_SYSROOT"
# * `CXXFLAGS' - C++ compiler flags.
-#CXXFLAGS=
+CXXFLAGS="--sysroot=$ARM_SYSROOT"
# * `LD' - Linker.
-#LD=
+LD="arm-wrs-linux-gnueabi-gcc"
# * `LDFLAGS' - Linker flags.
-#LDFLAGS=
+LDFLAGS="--sysroot=$ARM_SYSROOT"
# * `LIBS' - Libraries.
#LIBS=
@@ -109,14 +110,14 @@ CXX="arm-wrs-linux-gnueabi-c++ --sysroot=$ARM_SYSROOT"
## *NOTE*! Either set all or none of the `DED_LD*' variables.
# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
-#DED_LD=
+DED_LD="arm-wrs-linux-gnueabi-gcc"
# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
-#DED_LDFLAGS=
+DED_LDFLAGS="--sysroot=$ARM_SYSROOT -shared -Wl,-Bsymbolic"
# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
# search path for shared libraries when linking with `DED_LD'.
-#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
+DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-Wl,-R"
## -- Large File Support --
diff --git a/xcomp/erl-xcomp-powerpc-dso-linux-gnu.conf b/xcomp/erl-xcomp-powerpc-dso-linux-gnu.conf
index c245b493a5..cc6c5a9678 100644
--- a/xcomp/erl-xcomp-powerpc-dso-linux-gnu.conf
+++ b/xcomp/erl-xcomp-powerpc-dso-linux-gnu.conf
@@ -55,7 +55,7 @@ erl_xcomp_build=guess
# It does not have to be a full `CPU-VENDOR-OS' triplet, but can be. The
# full `CPU-VENDOR-OS' triplet will be created by
# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'.
-erl_xcomp_host=powerpc-linux-gnu
+erl_xcomp_host=powerpc-wrs-linux-gnu
# * `erl_xcomp_configure_flags' - Extra configure flags to pass to the
# `configure' script.
@@ -70,10 +70,10 @@ erl_xcomp_configure_flags="--without-termcap"
## All variables in this section can also be used when native compiling.
# * `CC' - C compiler.
-CC=powerpc-linux-gnu-gcc
+CC=powerpc-wrs-linux-gnu-gcc
# * `CFLAGS' - C compiler flags.
-#CFLAGS=
+CFLAGS="-O2 --sysroot=/ldisk/cross/gcc-toolchain/sysroot -Wall -g"
# * `STATIC_CFLAGS' - Static C compiler flags.
#STATIC_CFLAGS=
@@ -84,22 +84,22 @@ CC=powerpc-linux-gnu-gcc
#CFLAG_RUNTIME_LIBRARY_PATH=
# * `CPP' - C pre-processor.
-#CPP=
+CPP="powerpc-wrs-linux-gnu-cpp "
# * `CPPFLAGS' - C pre-processor flags.
-#CPPFLAGS=
+CPPFLAGS="--sysroot=/ldisk/cross/gcc-toolchain/sysroot"
# * `CXX' - C++ compiler.
-CXX=powerpc-linux-gnu-g++
+CXX="powerpc-wrs-linux-gnu-g++"
# * `CXXFLAGS' - C++ compiler flags.
-#CXXFLAGS=
+CXXFLAGS="--sysroot=/ldisk/cross/gcc-toolchain/sysroot"
# * `LD' - Linker.
-LD=powerpc-linux-gnu-ld
+LD="powerpc-wrs-linux-gnu-gcc"
# * `LDFLAGS' - Linker flags.
-#LDFLAGS=
+LDFLAGS="--sysroot=/ldisk/cross/gcc-toolchain/sysroot"
# * `LIBS' - Libraries.
#LIBS=
@@ -109,14 +109,14 @@ LD=powerpc-linux-gnu-ld
## *NOTE*! Either set all or none of the `DED_LD*' variables.
# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
-#DED_LD=
+DED_LD="powerpc-wrs-linux-gnu-gcc"
# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
-#DED_LDFLAGS=
+DED_LDFLAGS="--sysroot=/ldisk/cross/gcc-toolchain/sysroot -shared -Wl,-Bsymbolic"
# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
# search path for shared libraries when linking with `DED_LD'.
-#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
+DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-Wl,-R"
## -- Large File Support --
@@ -134,10 +134,10 @@ LD=powerpc-linux-gnu-ld
## -- Other Tools --
# * `RANLIB' - `ranlib' archive index tool.
-RANLIB=powerpc-linux-gnu-ranlib
+RANLIB=powerpc-wrs-linux-gnu-ranlib
# * `AR' - `ar' archiving tool.
-AR=powerpc-linux-gnu-ar
+AR=powerpc-wrs-linux-gnu-ar
# * `GETCONF' - `getconf' system configuration inspection tool. `getconf' is
# currently used for finding out large file support flags to use, and
diff --git a/xcomp/erl-xcomp-powerpc-ose5.conf b/xcomp/erl-xcomp-powerpc-ose5.conf
new file mode 100644
index 0000000000..bf49b32827
--- /dev/null
+++ b/xcomp/erl-xcomp-powerpc-ose5.conf
@@ -0,0 +1,357 @@
+## -*-shell-script-*-
+##
+## %CopyrightBegin%
+##
+## Copyright Ericsson AB 2009-2012. All Rights Reserved.
+##
+## The contents of this file are subject to the Erlang Public License,
+## Version 1.1, (the "License"); you may not use this file except in
+## compliance with the License. You should have received a copy of the
+## Erlang Public License along with this software. If not, it can be
+## retrieved online at http://www.erlang.org/.
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and limitations
+## under the License.
+##
+## %CopyrightEnd%
+##
+## File: erl-xcomp-sfk-linux-ose5.conf
+## Author: Petre Pircalabu
+##
+## -----------------------------------------------------------------------------
+## When cross compiling Erlang/OTP using `otp_build', copy this file and set
+## the variables needed below. Then pass the path to the copy of this file as
+## an argument to `otp_build' in the configure stage:
+## `otp_build configure --xcomp-conf=<FILE>'
+## -----------------------------------------------------------------------------
+
+## Note that you cannot define arbitrary variables in a cross compilation
+## configuration file. Only the ones listed below will be guaranteed to be
+## visible throughout the whole execution of all `configure' scripts. Other
+## variables needs to be defined as arguments to `configure' or exported in
+## the environment.
+
+## -- Variables needed for an OSE5 build ---------------------------------------
+OSEROOT="/vobs/ose5/system"
+HOST="linux"
+
+GCCVERSION="4.4.3"
+GCCROOT="${OSEROOT}/gcc_linux_powerpc_${GCCVERSION}"
+
+OSEDEBUG="no"
+OSESSL="no"
+
+case ${GCCVERSION} in
+4.4.3)
+ GCCTARGET="powerpc-eabi"
+ ;;
+4.6.3)
+ GCCTARGET="powerpc-ose-eabi"
+ ;;
+*)
+ echo "Error: Unknown GCCVERSION: ${GCCVERSION}"
+ exit 1
+esac
+
+if [ ${OSEDEBUG} != "yes" ];
+then
+OPT_LEVEL="-O2"
+else
+OPT_LEVEL=""
+fi
+
+if [ ${OSESSL} = "yes" ];
+then
+## If your crypto is not in OSEROOT then you have to use --with-ssl to
+## point to the correct place. Also CRYPTO_LIB_PATH has to be modified to
+## point there as well.
+CRYPTO_CONFIG_OPTION="--disable-dynamic-ssl-lib"
+CRYPTO_NIF_PATH=",$ERL_TOP/lib/crypto/priv/lib/powerpc-unknown-ose/crypto.a"
+CRYPTO_LIB_PATH="${OSEROOT}/lib/powerpc/libsslcrypto.a"
+else
+CRYPTO_CONFIG_OPTION="--without-ssl"
+CRYPTO_NIF_PATH=""
+CRYPTO_LIB_PATH=""
+fi
+
+
+## -- Variables for `otp_build' Only -------------------------------------------
+
+## Variables in this section are only used, when configuring Erlang/OTP for
+## cross compilation using `$ERL_TOP/otp_build configure'.
+
+## *NOTE*! These variables currently have *no* effect if you configure using
+## the `configure' script directly.
+
+# * `erl_xcomp_build' - The build system used. This value will be passed as
+# `--build=$erl_xcomp_build' argument to the `configure' script. It does
+# not have to be a full `CPU-VENDOR-OS' triplet, but can be. The full
+# `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'. If set to `guess',
+# the build system will be guessed using
+# `$ERL_TOP/erts/autoconf/config.guess'.
+erl_xcomp_build=guess
+
+# * `erl_xcomp_host' - Cross host/target system to build for. This value will
+# be passed as `--host=$erl_xcomp_host' argument to the `configure' script.
+# It does not have to be a full `CPU-VENDOR-OS' triplet, but can be. The
+# full `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'.
+erl_xcomp_host="powerpc-ose"
+
+disabled_apps="--without-erl_interface --without-os_mon --without-megaco --without-observer --without-wx --without-appmon --without-cosEvent --without-cosEventDomain --without-cosFileTransfer --without-cosNotification --without-cosProperty --without-cosTime --without-cosTransactions --without-debugger --without-dialyzer --without-edoc --without-erl_docgen --without-eunit --without-gs --without-hipe --without-ic --without-orber --without-pman --without-toolbar --without-tv --without-webtool --without-typer"
+
+# * `erl_xcomp_configure_flags' - Extra configure flags to pass to the
+# `configure' script.
+erl_xcomp_configure_flags="${CRYPTO_CONFIG_OPTION} --disable-kernel-poll --disable-hipe --without-termcap --without-javac ${disabled_apps} --enable-static-nifs=$ERL_TOP/lib/asn1/priv/lib/powerpc-unknown-ose/asn1rt_nif.a${CRYPTO_NIF_PATH}"
+
+## -- Cross Compiler and Other Tools -------------------------------------------
+
+## If the cross compilation tools are prefixed by `<HOST>-' you probably do
+## not need to set these variables (where `<HOST>' is what has been passed as
+## `--host=<HOST>' argument to `configure').
+
+## All variables in this section can also be used when native compiling.
+
+# * `CC' - C compiler.
+CC="$GCCROOT/bin/$GCCTARGET-gcc"
+
+# * `CFLAGS' - C compiler flags.
+CFLAGS="-msoft-float -g -fno-strict-aliasing -fno-builtin -fshort-wchar -Wall -Wno-unknown-pragmas -mpowerpc -nostdlib -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/ose_spi -I$OSEROOT/include/gcc -MD -MP -D__OSE__ -DBIG_ENDIAN -DCF_CONF_SIZE=0x800 ${OPT_LEVEL}"
+
+
+# * `STATIC_CFLAGS' - Static C compiler flags.
+#STATIC_CFLAGS=
+
+# * `CFLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for the shared libraries. Note that this actually is a
+# linker flag, but it needs to be passed via the compiler.
+#CFLAG_RUNTIME_LIBRARY_PATH=
+
+# * `CPP' - C pre-processor.
+CPP="$GCCROOT/bin/$GCCTARGET-cpp"
+
+# * `CPPFLAGS' - C pre-processor flags.
+CPPFLAGS="-msoft-float -g -fno-strict-aliasing -fno-builtin -fshort-wchar -Wall -Wno-unknown-pragmas -mpowerpc -nostdlib -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/ose_spi -I$OSEROOT/include/gcc -MD -MP -D__OSE__ -DBIG_ENDIAN -DCF_CONF_SIZE=0x800 ${OPT_LEVEL}"
+
+
+# * `CXX' - C++ compiler.
+CXX="$GCCROOT/bin/$GCCTARGET-g++"
+
+# * `CXXFLAGS' - C++ compiler flags.
+CXXFLAGS="-msoft-float -g -fno-strict-aliasing -ansi -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/gcc ${OPT_LEVEL}"
+
+# * `LD' - Linker.
+LD="${GCCROOT}/bin/${GCCTARGET}-ld"
+
+# * `LDFLAGS' - Linker flags.
+LDFLAGS="-Wl,-ecrt0_lm -Wl,-T,${ERL_TOP}/erts/emulator/sys/ose/gcc_${GCCVERSION}_lm_ppc.lcf"
+
+# * `LIBS' - Libraries.
+LIBS="${OSEROOT}/lib/powerpc/libcrt.a ${OSEROOT}/lib/powerpc/libm.a ${GCCROOT}/lib/gcc/${GCCTARGET}/${GCCVERSION}/nof/libgcc.a ${CRYPTO_LIB_PATH}"
+
+## -- *D*ynamic *E*rlang *D*river Linking --
+
+## *NOTE*! Either set all or none of the `DED_LD*' variables.
+
+# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
+DED_LD=
+
+# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
+DED_LDFLAGS=
+
+# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for shared libraries when linking with `DED_LD'.
+DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
+
+## -- Large File Support --
+
+## *NOTE*! Either set all or none of the `LFS_*' variables.
+
+# * `LFS_CFLAGS' - Large file support C compiler flags.
+#LFS_CFLAGS=
+
+# * `LFS_LDFLAGS' - Large file support linker flags.
+#LFS_LDFLAGS=
+
+# * `LFS_LIBS' - Large file support libraries.
+#LFS_LIBS=
+
+## -- Other Tools --
+
+# * `RANLIB' - `ranlib' archive index tool.
+RANLIB="$GCCROOT/bin/$GCCTARGET-ranlib"
+
+# * `AR' - `ar' archiving tool.
+AR="$GCCROOT/bin/$GCCTARGET-ar"
+
+# * `STRIP' - `strip
+STRIP="$GCCROOT/bin/$GCCTARGET-strip"
+
+# * `GETCONF' - `getconf' system configuration inspection tool. `getconf' is
+# currently used for finding out large file support flags to use, and
+# on Linux systems for finding out if we have an NPTL thread library or
+# not.
+#GETCONF=
+
+## -- Cross System Root Locations ----------------------------------------------
+
+# * `erl_xcomp_sysroot' - The absolute path to the system root of the cross
+# compilation environment. Currently, the `crypto', `odbc', `ssh' and
+# `ssl' applications need the system root. These applications will be
+# skipped if the system root has not been set. The system root might be
+# needed for other things too. If this is the case and the system root
+# has not been set, `configure' will fail and request you to set it.
+erl_xcomp_sysroot="$OSEROOT"
+
+# * `erl_xcomp_isysroot' - The absolute path to the system root for includes
+# of the cross compilation environment. If not set, this value defaults
+# to `$erl_xcomp_sysroot', i.e., only set this value if the include system
+# root path is not the same as the system root path.
+#erl_xcomp_isysroot="$OSEROOT"
+
+## -- Optional Feature, and Bug Tests ------------------------------------------
+
+## These tests cannot (always) be done automatically when cross compiling. You
+## usually do not need to set these variables. Only set these if you really
+## know what you are doing.
+
+## Note that some of these values will override results of tests performed
+## by `configure', and some will not be used until `configure' is sure that
+## it cannot figure the result out.
+
+## The `configure' script will issue a warning when a default value is used.
+## When a variable has been set, no warning will be issued.
+
+# * `erl_xcomp_after_morecore_hook' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `__after_morecore_hook' that can be
+# used for tracking used `malloc()' implementations core memory usage.
+# This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
+
+# * `erl_xcomp_bigendian' - `yes|no'. No default. If `yes', the target system
+# must be big endian. If `no', little endian. This can often be
+# automatically detected, but not always. If not automatically detected,
+# `configure' will fail unless this variable is set. Since no default
+# value is used, `configure' will try to figure this out automatically.
+#erl_xcomp_bigendian=
+
+# * `erl_xcomp_double_middle` - `yes|no`. No default. If `yes`, the
+# target system must have doubles in "middle-endian" format. If
+# `no`, it has "regular" endianness. This can often be automatically
+# detected, but not always. If not automatically detected,
+# `configure` will fail unless this variable is set. Since no
+# default value is used, `configure` will try to figure this out
+# automatically.
+#erl_xcomp_double_middle_endian
+
+# * `erl_xcomp_clock_gettime_cpu_time' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `clock_gettime()' implementation
+# that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
+
+# * `erl_xcomp_getaddrinfo' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `getaddrinfo()' implementation that can
+# handle both IPv4 and IPv6.
+#erl_xcomp_getaddrinfo=
+
+# * `erl_xcomp_gethrvtime_procfs_ioctl' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `gethrvtime()' implementation and
+# is used with procfs `ioctl()'.
+#erl_xcomp_gethrvtime_procfs_ioctl=
+
+# * `erl_xcomp_dlsym_brk_wrappers' - `yes|no'. Defaults to `no'. If `yes', the
+# target system must have a working `dlsym(RTLD_NEXT, <S>)' implementation
+# that can be used on `brk' and `sbrk' symbols used by the `malloc()'
+# implementation in use, and by this track the `malloc()' implementations
+# core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
+
+# * `erl_xcomp_kqueue' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `kqueue()' implementation that returns a file
+# descriptor which can be used by `poll()' and/or `select()'. If `no' and
+# the target system has not got `epoll()' or `/dev/poll', the kernel-poll
+# feature will be disabled.
+#erl_xcomp_kqueue=
+
+# * `erl_xcomp_linux_clock_gettime_correction' - `yes|no'. Defaults to `yes' on
+# Linux; otherwise, `no'. If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on
+# the target system must work. This variable is recommended to be set to
+# `no' on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
+
+# * `erl_xcomp_linux_nptl' - `yes|no'. Defaults to `yes' on Linux; otherwise,
+# `no'. If `yes', the target system must have NPTL (Native POSIX Thread
+# Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+# kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
+
+# * `erl_xcomp_linux_usable_sigaltstack' - `yes|no'. Defaults to `yes' on Linux;
+# otherwise, `no'. If `yes', `sigaltstack()' must be usable on the target
+# system. `sigaltstack()' on Linux kernel versions less than 2.4 are
+# broken.
+#erl_xcomp_linux_usable_sigaltstack=
+
+# * `erl_xcomp_linux_usable_sigusrx' - `yes|no'. Defaults to `yes'. If `yes',
+# the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS. Old
+# LinuxThreads thread libraries (Linux kernel versions typically less than
+# 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
+
+# * `erl_xcomp_poll' - `yes|no'. Defaults to `no' on Darwin/MacOSX; otherwise,
+# `yes'. If `yes', the target system must have a working `poll()'
+# implementation that also can handle devices. If `no', `select()' will be
+# used instead of `poll()'.
+erl_xcomp_poll=no
+
+# * `erl_xcomp_putenv_copy' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a `putenv()' implementation that stores a copy of the
+# key/value pair.
+#erl_xcomp_putenv_copy=
+
+# * `erl_xcomp_reliable_fpe' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
+# * `erl_xcomp_ose_ldflags_pass1` - Linker flags for the OSE module (pass 1)
+erl_xcomp_ose_ldflags_pass1="-r --no-omagic"
+
+# * `erl_xcomp_ose_ldflags_pass2` - Linker flags for the OSE module (pass 2)
+erl_xcomp_ose_ldflags_pass2="-n --emit-relocs -ecrt0_lm --no-omagic"
+
+# * `erl_xcomp_ose_OSEROOT` - OSE installation root directory
+erl_xcomp_ose_OSEROOT="${OSEROOT}"
+
+# * `erl_xcomp_ose_STRIP` - Strip utility shipped with the OSE distribution
+erl_xcomp_ose_STRIP="${GCCROOT}/bin/${GCCTARGET}-strip"
+
+# * `erl_xcomp_ose_LM_POST_LINK` - OSE postlink tool
+erl_xcomp_ose_LM_POST_LINK="${OSEROOT}/bin/${HOST}/lm_post_link"
+
+# * `erl_xcomp_ose_LM_SET_CONF` - Sets the configuration for an OSE load module
+erl_xcomp_ose_LM_SET_CONF="${OSEROOT}/bin/${HOST}/lm_set_conf"
+
+# * `erl_xcomp_ose_LM_ELF_SIZE` - OSE load module elf size tool
+erl_xcomp_ose_LM_ELF_SIZE="${OSEROOT}/bin/${HOST}/lm_elf_size"
+
+# * `erl_xcomp_ose_LM_LCF` - OSE load module linker configuration file
+erl_xcomp_ose_LM_LCF="${ERL_TOP}/erts/emulator/sys/ose/gcc_${GCCVERSION}_lm_ppc.lcf"
+
+# * `erl_xcomp_ose_BEAM_LM_CONF` - beam OSE load module configuration file
+erl_xcomp_ose_BEAM_LM_CONF="${ERL_TOP}/erts/emulator/sys/ose/beam.lmconf"
+
+# * `erl_xcomp_ose_RUN_ERL_LM_CONF` - run_erl_lm OSE load module configuration file
+erl_xcomp_ose_RUN_ERL_LM_CONF="${ERL_TOP}/erts/etc/ose/etc.lmconf"
+
+# * `erl_xcomp_ose_EPMD_LM_CONF` - epmd OSE load module configuration file
+erl_xcomp_ose_EPMD_LM_CONF="${ERL_TOP}/erts/etc/ose/etc.lmconf"
+
+# * `erl_xcomp_ose_CONFD` - OSE confd source file
+erl_xcomp_ose_CONFD="${OSEROOT}/src/ose_confd.c"
+
+# * `erl_xcomp_ose_CRT0_LM` - OSE crt0 lm source file
+erl_xcomp_ose_CRT0_LM="${OSEROOT}/src/crt0_lm.c"
+
+
+## -----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp-sfk-linux-ose5.conf b/xcomp/erl-xcomp-sfk-linux-ose5.conf
new file mode 100644
index 0000000000..a9c06f3cb4
--- /dev/null
+++ b/xcomp/erl-xcomp-sfk-linux-ose5.conf
@@ -0,0 +1,304 @@
+## -*-shell-script-*-
+##
+## %CopyrightBegin%
+##
+## Copyright Ericsson AB 2009-2012. All Rights Reserved.
+##
+## The contents of this file are subject to the Erlang Public License,
+## Version 1.1, (the "License"); you may not use this file except in
+## compliance with the License. You should have received a copy of the
+## Erlang Public License along with this software. If not, it can be
+## retrieved online at http://www.erlang.org/.
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and limitations
+## under the License.
+##
+## %CopyrightEnd%
+##
+## File: erl-xcomp-sfk-linux-ose5.conf
+## Author: Petre Pircalabu
+##
+## -----------------------------------------------------------------------------
+## When cross compiling Erlang/OTP using `otp_build', copy this file and set
+## the variables needed below. Then pass the path to the copy of this file as
+## an argument to `otp_build' in the configure stage:
+## `otp_build configure --xcomp-conf=<FILE>'
+## -----------------------------------------------------------------------------
+
+## Note that you cannot define arbitrary variables in a cross compilation
+## configuration file. Only the ones listed below will be guaranteed to be
+## visible throughout the whole execution of all `configure' scripts. Other
+## variables needs to be defined as arguments to `configure' or exported in
+## the environment.
+
+## -- Variables needed for an OSE5 build ---------------------------------------
+OSEROOT="/vobs/ose5/system"
+HOST="linux"
+GCCVERSION="4.6.3"
+GCCROOT="${OSEROOT}/gcc_linux_x86_${GCCVERSION}"
+GCCTARGET="i386-elf"
+
+## -- Variables for `otp_build' Only -------------------------------------------
+
+## Variables in this section are only used, when configuring Erlang/OTP for
+## cross compilation using `$ERL_TOP/otp_build configure'.
+
+## *NOTE*! These variables currently have *no* effect if you configure using
+## the `configure' script directly.
+
+# * `erl_xcomp_build' - The build system used. This value will be passed as
+# `--build=$erl_xcomp_build' argument to the `configure' script. It does
+# not have to be a full `CPU-VENDOR-OS' triplet, but can be. The full
+# `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'. If set to `guess',
+# the build system will be guessed using
+# `$ERL_TOP/erts/autoconf/config.guess'.
+erl_xcomp_build=guess
+
+# * `erl_xcomp_host' - Cross host/target system to build for. This value will
+# be passed as `--host=$erl_xcomp_host' argument to the `configure' script.
+# It does not have to be a full `CPU-VENDOR-OS' triplet, but can be. The
+# full `CPU-VENDOR-OS' triplet will be created by
+# `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'.
+erl_xcomp_host="$GCCTARGET-ose"
+
+# * `erl_xcomp_configure_flags' - Extra configure flags to pass to the
+# `configure' script.
+erl_xcomp_configure_flags="--disable-threads --disable-smp-support --disable-kernel-poll --disable-hipe --without-termcap --without-javac --disable-dynamic-ssl-lib --disable-shared-zlib --without-ssl --enable-static-nifs --enable-static-nifs=$ERL_TOP/lib/asn1/priv/lib/powerpc-unknown-ose/asn1rt_nif.a"
+
+## -- Cross Compiler and Other Tools -------------------------------------------
+
+## If the cross compilation tools are prefixed by `<HOST>-' you probably do
+## not need to set these variables (where `<HOST>' is what has been passed as
+## `--host=<HOST>' argument to `configure').
+
+## All variables in this section can also be used when native compiling.
+
+# * `CC' - C compiler.
+CC="$GCCROOT/bin/$GCCTARGET-gcc"
+
+# * `CFLAGS' - C compiler flags.
+CFLAGS="-g -fno-strict-aliasing -fno-builtin -fshort-wchar -Wall -Wno-unknown-pragmas -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/ose_spi -I$OSEROOT/include/gcc -MD -MP -D__OSE__ -DLITTLE_ENDIAN -DCF_CONF_SIZE=0x800"
+
+# * `STATIC_CFLAGS' - Static C compiler flags.
+#STATIC_CFLAGS=
+
+# * `CFLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for the shared libraries. Note that this actually is a
+# linker flag, but it needs to be passed via the compiler.
+#CFLAG_RUNTIME_LIBRARY_PATH=
+
+# * `CPP' - C pre-processor.
+#CPP=
+
+# * `CPPFLAGS' - C pre-processor flags.
+CPPFLAGS="-g -fno-strict-aliasing -fno-builtin -fshort-wchar -Wall -Wno-unknown-pragmas -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/ose_spi -I$OSEROOT/include/gcc -MD -MP -D__OSE__ -DLITTLE_ENDIAN -DCF_CONF_SIZE=0x800"
+
+# * `CXX' - C++ compiler.
+#CXX=
+
+# * `CXXFLAGS' - C++ compiler flags.
+CXXFLAGS="-g -fno-strict-aliasing -ansi -I$GCCROOT/include/c++/$GCCVERSION -I$OSEROOT/include -I$OSEROOT/include/gcc "
+
+# * `LD' - Linker.
+LD="$GCCROOT/bin/$GCCTARGET-ld"
+
+# * `LDFLAGS' - Linker flags.
+LDFLAGS="-Wl,-ecrt0_lm -Wl,-T,$ERL_TOP/erts/emulator/sys/ose/gcc_lm_x86_$GCCVERSION.lcf"
+
+# * `LIBS' - Libraries.
+LIBS="$OSEROOT/lib/x86/libcrt.a $OSEROOT/lib/x86/libm.a $GCCROOT/lib/gcc/$GCCTARGET/$GCCVERSION/libgcc.a"
+
+## -- *D*ynamic *E*rlang *D*river Linking --
+
+## *NOTE*! Either set all or none of the `DED_LD*' variables.
+
+# * `DED_LD' - Linker for Dynamically loaded Erlang Drivers.
+#DED_LD=
+
+# * `DED_LDFLAGS' - Linker flags to use with `DED_LD'.
+#DED_LDFLAGS=
+
+# * `DED_LD_FLAG_RUNTIME_LIBRARY_PATH' - This flag should set runtime library
+# search path for shared libraries when linking with `DED_LD'.
+#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
+
+## -- Large File Support --
+
+## *NOTE*! Either set all or none of the `LFS_*' variables.
+
+# * `LFS_CFLAGS' - Large file support C compiler flags.
+#LFS_CFLAGS=
+
+# * `LFS_LDFLAGS' - Large file support linker flags.
+#LFS_LDFLAGS=
+
+# * `LFS_LIBS' - Large file support libraries.
+#LFS_LIBS=
+
+## -- Other Tools --
+
+# * `RANLIB' - `ranlib' archive index tool.
+RANLIB="$GCCROOT/bin/$GCCTARGET-ranlib"
+
+# * `AR' - `ar' archiving tool.
+AR="$GCCROOT/bin/$GCCTARGET-ar"
+
+# * `STRIP' - `strip
+STRIP="$GCCROOT/bin/$GCCTARGET-strip"
+
+# * `GETCONF' - `getconf' system configuration inspection tool. `getconf' is
+# currently used for finding out large file support flags to use, and
+# on Linux systems for finding out if we have an NPTL thread library or
+# not.
+#GETCONF=
+
+## -- Cross System Root Locations ----------------------------------------------
+
+# * `erl_xcomp_sysroot' - The absolute path to the system root of the cross
+# compilation environment. Currently, the `crypto', `odbc', `ssh' and
+# `ssl' applications need the system root. These applications will be
+# skipped if the system root has not been set. The system root might be
+# needed for other things too. If this is the case and the system root
+# has not been set, `configure' will fail and request you to set it.
+erl_xcomp_sysroot="$OSEROOT"
+
+# * `erl_xcomp_isysroot' - The absolute path to the system root for includes
+# of the cross compilation environment. If not set, this value defaults
+# to `$erl_xcomp_sysroot', i.e., only set this value if the include system
+# root path is not the same as the system root path.
+erl_xcomp_isysroot="$OSEROOT/include"
+
+## -- Optional Feature, and Bug Tests ------------------------------------------
+
+## These tests cannot (always) be done automatically when cross compiling. You
+## usually do not need to set these variables. Only set these if you really
+## know what you are doing.
+
+## Note that some of these values will override results of tests performed
+## by `configure', and some will not be used until `configure' is sure that
+## it cannot figure the result out.
+
+## The `configure' script will issue a warning when a default value is used.
+## When a variable has been set, no warning will be issued.
+
+# * `erl_xcomp_after_morecore_hook' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `__after_morecore_hook' that can be
+# used for tracking used `malloc()' implementations core memory usage.
+# This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
+
+# * `erl_xcomp_bigendian' - `yes|no'. No default. If `yes', the target system
+# must be big endian. If `no', little endian. This can often be
+# automatically detected, but not always. If not automatically detected,
+# `configure' will fail unless this variable is set. Since no default
+# value is used, `configure' will try to figure this out automatically.
+#erl_xcomp_bigendian=
+
+# * `erl_xcomp_double_middle` - `yes|no`. No default. If `yes`, the
+# target system must have doubles in "middle-endian" format. If
+# `no`, it has "regular" endianness. This can often be automatically
+# detected, but not always. If not automatically detected,
+# `configure` will fail unless this variable is set. Since no
+# default value is used, `configure` will try to figure this out
+# automatically.
+#erl_xcomp_double_middle_endian
+
+# * `erl_xcomp_clock_gettime_cpu_time' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `clock_gettime()' implementation
+# that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
+
+# * `erl_xcomp_getaddrinfo' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `getaddrinfo()' implementation that can
+# handle both IPv4 and IPv6.
+#erl_xcomp_getaddrinfo=
+
+# * `erl_xcomp_gethrvtime_procfs_ioctl' - `yes|no'. Defaults to `no'. If `yes',
+# the target system must have a working `gethrvtime()' implementation and
+# is used with procfs `ioctl()'.
+#erl_xcomp_gethrvtime_procfs_ioctl=
+
+# * `erl_xcomp_dlsym_brk_wrappers' - `yes|no'. Defaults to `no'. If `yes', the
+# target system must have a working `dlsym(RTLD_NEXT, <S>)' implementation
+# that can be used on `brk' and `sbrk' symbols used by the `malloc()'
+# implementation in use, and by this track the `malloc()' implementations
+# core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
+
+# * `erl_xcomp_kqueue' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a working `kqueue()' implementation that returns a file
+# descriptor which can be used by `poll()' and/or `select()'. If `no' and
+# the target system has not got `epoll()' or `/dev/poll', the kernel-poll
+# feature will be disabled.
+#erl_xcomp_kqueue=
+
+# * `erl_xcomp_linux_clock_gettime_correction' - `yes|no'. Defaults to `yes' on
+# Linux; otherwise, `no'. If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on
+# the target system must work. This variable is recommended to be set to
+# `no' on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
+
+# * `erl_xcomp_linux_nptl' - `yes|no'. Defaults to `yes' on Linux; otherwise,
+# `no'. If `yes', the target system must have NPTL (Native POSIX Thread
+# Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+# kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
+
+# * `erl_xcomp_linux_usable_sigaltstack' - `yes|no'. Defaults to `yes' on Linux;
+# otherwise, `no'. If `yes', `sigaltstack()' must be usable on the target
+# system. `sigaltstack()' on Linux kernel versions less than 2.4 are
+# broken.
+#erl_xcomp_linux_usable_sigaltstack=
+
+# * `erl_xcomp_linux_usable_sigusrx' - `yes|no'. Defaults to `yes'. If `yes',
+# the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS. Old
+# LinuxThreads thread libraries (Linux kernel versions typically less than
+# 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
+
+# * `erl_xcomp_poll' - `yes|no'. Defaults to `no' on Darwin/MacOSX; otherwise,
+# `yes'. If `yes', the target system must have a working `poll()'
+# implementation that also can handle devices. If `no', `select()' will be
+# used instead of `poll()'.
+erl_xcomp_poll=no
+
+# * `erl_xcomp_putenv_copy' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have a `putenv()' implementation that stores a copy of the
+# key/value pair.
+#erl_xcomp_putenv_copy=
+
+# * `erl_xcomp_reliable_fpe' - `yes|no'. Defaults to `no'. If `yes', the target
+# system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
+
+# * `erl_xcomp_ose_ldflags_pass1` - Linker flags for the OSE module (pass 1)
+erl_xcomp_ose_ldflags_pass1="-r --no-omagic"
+
+# * `erl_xcomp_ose_ldflags_pass2` - Linker flags for the OSE module (pass 2)
+erl_xcomp_ose_ldflags_pass2="-n --emit-relocs -ecrt0_lm --no-omagic"
+
+# * `erl_xcomp_ose_OSEROOT` - OSE installation root directory
+erl_xcomp_ose_OSEROOT="$OSEROOT"
+
+# * `erl_xcomp_ose_STRIP` - Strip utility shipped with the OSE distribution
+erl_xcomp_ose_STRIP="$GCCROOT/bin/$GCCTARGET-strip"
+
+# * `erl_xcomp_ose_LM_POST_LINK` - OSE postlink tool
+erl_xcomp_ose_LM_POST_LINK="$OSEROOT/bin/$HOST/lm_post_link"
+
+# * `erl_xcomp_ose_LM_SET_CONF` - OSE load module configuration tool
+erl_xcomp_ose_LM_SET_CONF="$OSEROOT/bin/$HOST/lm_set_conf"
+
+# * `erl_xcomp_ose_LM_GET_CONF` - OSE load module elf size tool
+erl_xcomp_ose_LM_ELF_SIZE="$OSEROOT/bin/$HOST/lm_elf_size"
+
+# * `erl_xcomp_ose_LM_LCF` - OSE load module linker configuration file
+erl_xcomp_ose_LM_LCF="${ERL_TOP}/erts/emulator/sys/ose/gcc_lm_x86_$GCCVERSION.lcf"
+
+# * `erl_xcomp_ose_LM_CONF` - OSE load module default configuration file
+erl_xcomp_ose_LM_CONF="${ERL_TOP}/erts/emulator/sys/ose/default.lmconf"
+
+## -----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp-vars.sh b/xcomp/erl-xcomp-vars.sh
index 337e0fb809..5e55c3af1b 100644
--- a/xcomp/erl-xcomp-vars.sh
+++ b/xcomp/erl-xcomp-vars.sh
@@ -26,4 +26,4 @@
# and precious variables in $ERL_TOP/erts/aclocal.m4.
#
-erl_xcomp_vars="erl_xcomp_sysroot erl_xcomp_isysroot erl_xcomp_bigendian erl_xcomp_double_middle_endian erl_xcomp_linux_clock_gettime_correction erl_xcomp_linux_nptl erl_xcomp_linux_usable_sigusrx erl_xcomp_linux_usable_sigaltstack erl_xcomp_poll erl_xcomp_kqueue erl_xcomp_putenv_copy erl_xcomp_reliable_fpe erl_xcomp_getaddrinfo erl_xcomp_gethrvtime_procfs_ioctl erl_xcomp_clock_gettime_cpu_time erl_xcomp_after_morecore_hook erl_xcomp_dlsym_brk_wrappers erl_xcomp_posix_memalign"
+erl_xcomp_vars="erl_xcomp_sysroot erl_xcomp_isysroot erl_xcomp_bigendian erl_xcomp_double_middle_endian erl_xcomp_linux_clock_gettime_correction erl_xcomp_linux_nptl erl_xcomp_linux_usable_sigusrx erl_xcomp_linux_usable_sigaltstack erl_xcomp_poll erl_xcomp_kqueue erl_xcomp_putenv_copy erl_xcomp_reliable_fpe erl_xcomp_getaddrinfo erl_xcomp_gethrvtime_procfs_ioctl erl_xcomp_clock_gettime_cpu_time erl_xcomp_after_morecore_hook erl_xcomp_dlsym_brk_wrappers erl_xcomp_posix_memalign erl_xcomp_ose_ldflags_pass1 erl_xcomp_ose_ldflags_pass2 erl_xcomp_ose_OSEROOT erl_xcomp_ose_STRIP erl_xcomp_ose_LM_POST_LINK erl_xcomp_ose_LM_SET_CONF erl_xcomp_ose_LM_GET_CONF erl_xcomp_ose_LM_ELF_SIZE erl_xcomp_ose_LM_LCF erl_xcomp_ose_BEAM_LM_CONF erl_xcomp_ose_EPMD_LM_CONF erl_xcomp_ose_RUN_ERL_LM_CONF erl_xcomp_ose_CONFD erl_xcomp_ose_CRT0_LM"